diff --git a/.github/workflows/linux-build-clang.yaml b/.github/workflows/linux-build-clang.yaml index da617398f7..3f53f5c521 100644 --- a/.github/workflows/linux-build-clang.yaml +++ b/.github/workflows/linux-build-clang.yaml @@ -34,7 +34,6 @@ jobs: libfreetype6-dev libx11-dev libxrandr-dev libgl1-mesa-dev \ libudev-dev libopenal-dev libflac-dev libogg-dev libvorbis-dev - - name: Setup sccache uses: hendrikmuhs/ccache-action@v1.2.12 with: diff --git a/.vs/launch.vs.json b/.vs/launch.vs.json index ec09354c91..eec32c8868 100644 --- a/.vs/launch.vs.json +++ b/.vs/launch.vs.json @@ -146,9 +146,9 @@ { "type": "default", "project": "CMakeLists.txt", - "projectTarget": "goalc.exe (bin\\goalc.exe)", - "name": "REPL", - "args": ["--user-auto"] + "projectTarget": "gk.exe (bin\\gk.exe)", + "name": "Game - Jak 3 - Runtime (boot)", + "args": ["-v", "--game", "jak3", "--", "-boot", "-fakeiso", "-debug"] }, { "type": "default", diff --git a/.vscode/settings.json b/.vscode/settings.json index fe629a0f67..545e13bd62 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,5 +7,6 @@ }, "editor.wordBasedSuggestions": "matchingDocuments", "editor.snippetSuggestions": "top" - } + }, + "cmake.configureOnOpen": false } diff --git a/CMakeLists.txt b/CMakeLists.txt index 99399f1166..bf5881eea6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -217,7 +217,6 @@ build_third_party_lib(sqlite3 sqlite3) # build tree-sitter parser include_directories(third-party/tree-sitter/tree-sitter/lib/include) -include_directories(third-party/tree-sitter/tree-sitter-opengoal) build_third_party_lib(tree-sitter tree-sitter) # native OS dialogs for error messages diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index cb0f075e79..fd61aaa104 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -66,6 +66,7 @@ add_library(common type_system/TypeSpec.cpp type_system/TypeSystem.cpp util/Assert.cpp + util/ast_util.cpp util/BitUtils.cpp util/compress.cpp util/crc32.cpp @@ -86,8 +87,7 @@ add_library(common util/term_util.cpp util/Timer.cpp util/unicode_util.cpp - versions/versions.cpp - ) + versions/versions.cpp) target_link_libraries(common fmt lzokay replxx libzstd_static tree-sitter sqlite3 libtinyfiledialogs) diff --git a/common/formatter/formatter.cpp b/common/formatter/formatter.cpp index 243ebdd28f..5aa0205b7e 100644 --- a/common/formatter/formatter.cpp +++ b/common/formatter/formatter.cpp @@ -2,8 +2,11 @@ #include "formatter_tree.h" +#include "common/formatter/rules/formatting_rules.h" +#include "common/formatter/rules/rule_config.h" #include "common/log/log.h" #include "common/util/FileUtil.h" +#include "common/util/ast_util.h" #include "common/util/string_util.h" #include "tree_sitter/api.h" @@ -144,7 +147,7 @@ void apply_formatting_config( // Find the maximum number of columns int max_columns = 0; for (const auto& field : curr_node.refs) { - if (field.refs.size() > max_columns) { + if ((int)field.refs.size() > max_columns) { max_columns = field.refs.size(); } } @@ -153,7 +156,7 @@ void apply_formatting_config( for (int col = 0; col < max_columns; col++) { column_max_widths.push_back(0); for (const auto& field : curr_node.refs) { - if (field.refs.size() > col) { + if ((int)field.refs.size() > col) { const auto width = get_total_form_inlined_width(field.refs.at(col)); if (width > column_max_widths.at(col)) { column_max_widths[col] = width; @@ -268,7 +271,7 @@ std::vector apply_formatting(const FormatterTreeNode& curr_node, val = comments::format_block_comment(ref.token_str()); } form_lines.push_back(val); - if (!curr_node.metadata.is_top_level && i == curr_node.refs.size() - 1 && + if (!curr_node.metadata.is_top_level && i == (int)curr_node.refs.size() - 1 && (ref.metadata.is_comment)) { // if there's an inline comment at the end of a form, we have to force the paren to the next // line and do a new-line paren this is ugly, but we have no choice! @@ -351,9 +354,9 @@ std::vector apply_formatting(const FormatterTreeNode& curr_node, // Add any column padding if (!curr_node.formatting_config.list_element_column_widths.empty()) { - for (int i = 0; i < form_lines.size(); i++) { + for (int i = 0; i < (int)form_lines.size(); i++) { const auto& token = form_lines.at(i); - if (i < form_lines.size() - 1) { + if (i < (int)form_lines.size() - 1) { form_lines[i] = str_util::pad_right( token, curr_node.formatting_config.list_element_column_widths.at(i), ' '); } @@ -400,8 +403,6 @@ std::string join_formatted_lines(const std::vector& lines, std::optional formatter::format_code(const std::string& source) { // Create a parser. std::shared_ptr parser(ts_parser_new(), TreeSitterParserDeleter()); - - // Set the parser's language (JSON in this case). ts_parser_set_language(parser.get(), tree_sitter_opengoal()); // Build a syntax tree based on source code stored in a string. diff --git a/common/formatter/formatter.h b/common/formatter/formatter.h index 7c7eebc295..bb9e3aa0ba 100644 --- a/common/formatter/formatter.h +++ b/common/formatter/formatter.h @@ -3,13 +3,8 @@ #include #include -#include "common/formatter/rules/formatting_rules.h" -#include "common/formatter/rules/rule_config.h" - #include "tree_sitter/api.h" -// TODO: -// - Considering _eventually_ adding line-length heuristics namespace formatter { struct TreeSitterParserDeleter { void operator()(TSParser* ptr) const { ts_parser_delete(ptr); } diff --git a/common/goos/Interpreter.cpp b/common/goos/Interpreter.cpp index cdee3d2929..40a4103620 100644 --- a/common/goos/Interpreter.cpp +++ b/common/goos/Interpreter.cpp @@ -571,104 +571,6 @@ Object Interpreter::eval(Object obj, const std::shared_ptr& e } } -EnvironmentMap::EnvironmentMap() { - clear(); -} - -void EnvironmentMap::clear() { - m_entries.clear(); - m_power_of_two_size = 3; // 2 ^ 3 = 8 - m_entries.resize(8); - m_used_entries = 0; - m_next_resize = (m_entries.size() * kMaxUsed); - m_mask = 0b111; -} - -Object* EnvironmentMap::lookup(InternedSymbolPtr str) { - if (m_entries.size() < 10) { - for (auto& e : m_entries) { - if (e.key == str.name_ptr) { - return &e.value; - } - } - return nullptr; - } - u32 hash = crc32((const u8*)&str.name_ptr, sizeof(const char*)); - - // probe - for (u32 i = 0; i < m_entries.size(); i++) { - u32 slot_addr = (hash + i) & m_mask; - auto& slot = m_entries[slot_addr]; - if (!slot.key) { - return nullptr; - } else { - if (slot.key != str.name_ptr) { - continue; // bad hash - } - return &slot.value; - } - } - - // should be impossible to reach. - ASSERT_NOT_REACHED(); -} - -void EnvironmentMap::set(InternedSymbolPtr ptr, const Object& obj) { - u32 hash = crc32((const u8*)&ptr.name_ptr, sizeof(const char*)); - - // probe - for (u32 i = 0; i < m_entries.size(); i++) { - u32 slot_addr = (hash + i) & m_mask; - auto& slot = m_entries[slot_addr]; - if (!slot.key) { - // not found, insert! - slot.key = ptr.name_ptr; - slot.value = obj; - m_used_entries++; - - if (m_used_entries >= m_next_resize) { - resize(); - } - return; - } else { - if (slot.key == ptr.name_ptr) { - slot.value = obj; - return; - } - } - } - - // should be impossible to reach. - ASSERT_NOT_REACHED(); -} - -void EnvironmentMap::resize() { - m_power_of_two_size++; - m_mask = (1U << m_power_of_two_size) - 1; - - std::vector new_entries(m_entries.size() * 2); - for (const auto& old_entry : m_entries) { - if (old_entry.key) { - bool done = false; - u32 hash = crc32((const u8*)&old_entry.key, sizeof(const char*)); - for (u32 i = 0; i < new_entries.size(); i++) { - u32 slot_addr = (hash + i) & m_mask; - auto& slot = new_entries[slot_addr]; - if (!slot.key) { - slot.key = old_entry.key; - slot.value = std::move(old_entry.value); - done = true; - break; - } - } - ASSERT(done); - } - } - - m_entries = std::move(new_entries); - m_next_resize = kMaxUsed * m_entries.size(); -} - namespace { /*! diff --git a/common/goos/Object.h b/common/goos/Object.h index b01efc036c..6aac254eb4 100644 --- a/common/goos/Object.h +++ b/common/goos/Object.h @@ -55,6 +55,7 @@ #include "common/common_types.h" #include "common/util/Assert.h" +#include "common/util/crc32.h" namespace goos { @@ -456,23 +457,111 @@ class PairObject : public HeapObject { ~PairObject() = default; }; -class EnvironmentMap { +template +class InternedPtrMap { public: - EnvironmentMap(const EnvironmentMap&) = delete; - EnvironmentMap& operator=(const EnvironmentMap&) = delete; - EnvironmentMap(); - Object* lookup(InternedSymbolPtr ptr); - void set(InternedSymbolPtr ptr, const Object& obj); - void clear(); + InternedPtrMap(const InternedPtrMap&) = delete; + InternedPtrMap& operator=(const InternedPtrMap&) = delete; + InternedPtrMap() { clear(); } + + T* lookup(InternedSymbolPtr str) { + if (m_entries.size() < 10) { + for (auto& e : m_entries) { + if (e.key == str.name_ptr) { + return &e.value; + } + } + return nullptr; + } + u32 hash = crc32((const u8*)&str.name_ptr, sizeof(const char*)); + + // probe + for (u32 i = 0; i < m_entries.size(); i++) { + u32 slot_addr = (hash + i) & m_mask; + auto& slot = m_entries[slot_addr]; + if (!slot.key) { + return nullptr; + } else { + if (slot.key != str.name_ptr) { + continue; // bad hash + } + return &slot.value; + } + } + + // should be impossible to reach. + ASSERT_NOT_REACHED(); + } + void set(InternedSymbolPtr ptr, const T& obj) { + u32 hash = crc32((const u8*)&ptr.name_ptr, sizeof(const char*)); + + // probe + for (u32 i = 0; i < m_entries.size(); i++) { + u32 slot_addr = (hash + i) & m_mask; + auto& slot = m_entries[slot_addr]; + if (!slot.key) { + // not found, insert! + slot.key = ptr.name_ptr; + slot.value = obj; + m_used_entries++; + + if (m_used_entries >= m_next_resize) { + resize(); + } + return; + } else { + if (slot.key == ptr.name_ptr) { + slot.value = obj; + return; + } + } + } + + // should be impossible to reach. + ASSERT_NOT_REACHED(); + } + void clear() { + m_entries.clear(); + m_power_of_two_size = 3; // 2 ^ 3 = 8 + m_entries.resize(8); + m_used_entries = 0; + m_next_resize = (m_entries.size() * kMaxUsed); + m_mask = 0b111; + } private: struct Entry { const char* key = nullptr; - Object value; + T value; }; std::vector m_entries; - void resize(); + void resize() { + m_power_of_two_size++; + m_mask = (1U << m_power_of_two_size) - 1; + + std::vector new_entries(m_entries.size() * 2); + for (const auto& old_entry : m_entries) { + if (old_entry.key) { + bool done = false; + u32 hash = crc32((const u8*)&old_entry.key, sizeof(const char*)); + for (u32 i = 0; i < new_entries.size(); i++) { + u32 slot_addr = (hash + i) & m_mask; + auto& slot = new_entries[slot_addr]; + if (!slot.key) { + slot.key = old_entry.key; + slot.value = std::move(old_entry.value); + done = true; + break; + } + } + ASSERT(done); + } + } + + m_entries = std::move(new_entries); + m_next_resize = kMaxUsed * m_entries.size(); + } int m_power_of_two_size = 0; int m_used_entries = 0; int m_next_resize = 0; @@ -480,6 +569,8 @@ class EnvironmentMap { static constexpr float kMaxUsed = 0.7; }; +using EnvironmentMap = InternedPtrMap; + class EnvironmentObject : public HeapObject { public: std::string name; diff --git a/common/type_system/TypeSystem.cpp b/common/type_system/TypeSystem.cpp index 9171ed1361..40efe45d97 100644 --- a/common/type_system/TypeSystem.cpp +++ b/common/type_system/TypeSystem.cpp @@ -1442,6 +1442,21 @@ std::vector TypeSystem::search_types_by_parent_type( return results; } +std::vector TypeSystem::search_types_by_parent_type_strict( + const std::string& parent_type) { + std::vector results = {}; + for (const auto& [type_name, type_info] : m_types) { + // Only NullType's have no parent + if (!type_info->has_parent()) { + continue; + } + if (type_info->get_parent() == parent_type) { + results.push_back(type_name); + } + } + return results; +} + std::vector TypeSystem::search_types_by_minimum_method_id( const int minimum_method_id, const std::optional>& existing_matches) { diff --git a/common/type_system/TypeSystem.h b/common/type_system/TypeSystem.h index f28cb9a693..dbd61bd825 100644 --- a/common/type_system/TypeSystem.h +++ b/common/type_system/TypeSystem.h @@ -278,6 +278,7 @@ class TypeSystem { std::vector search_types_by_parent_type( const std::string& parent_type, const std::optional>& existing_matches = {}); + std::vector search_types_by_parent_type_strict(const std::string& parent_type); std::vector search_types_by_minimum_method_id( const int minimum_method_id, diff --git a/common/type_system/deftype.cpp b/common/type_system/deftype.cpp index 513dd99405..6c844025f2 100644 --- a/common/type_system/deftype.cpp +++ b/common/type_system/deftype.cpp @@ -84,12 +84,10 @@ double get_float(const goos::Object& obj) { throw std::runtime_error(obj.print() + " was supposed to be an number, but isn't"); } -void add_field( - StructureType* structure, - TypeSystem* ts, - const goos::Object& def, - std::unordered_map& - constants) { +void add_field(StructureType* structure, + TypeSystem* ts, + const goos::Object& def, + goos::EnvironmentMap* constants) { auto rest = &def; auto name = symbol_string(car(rest)); @@ -113,9 +111,8 @@ void add_field( if (car(rest).is_int()) { array_size = car(rest).integer_obj.value; rest = cdr(rest); - } else if (car(rest).is_symbol() && - constants.find((car(rest)).as_symbol()) != constants.end()) { - array_size = get_int(constants[(car(rest)).as_symbol()]); + } else if (car(rest).is_symbol() && constants && constants->lookup((car(rest)).as_symbol())) { + array_size = get_int(*constants->lookup((car(rest)).as_symbol())); rest = cdr(rest); } @@ -543,13 +540,11 @@ void declare_state(Type* type, }); } -StructureDefResult parse_structure_def( - StructureType* type, - TypeSystem* ts, - const goos::Object& fields, - const goos::Object& options, - std::unordered_map& - constants) { +StructureDefResult parse_structure_def(StructureType* type, + TypeSystem* ts, + const goos::Object& fields, + const goos::Object& options, + goos::EnvironmentMap* constants) { StructureDefResult result; for_each_in_list(fields, [&](const goos::Object& o) { add_field(type, ts, o, constants); }); TypeFlags flags; @@ -811,18 +806,11 @@ TypeSpec parse_typespec(const TypeSystem* type_system, const goos::Object& src) return {}; } -DeftypeResult parse_deftype( - const goos::Object& deftype, - TypeSystem* ts, - std::unordered_map* - constants) { +DeftypeResult parse_deftype(const goos::Object& deftype, + TypeSystem* ts, + goos::EnvironmentMap* constants) { DefinitionMetadata symbol_metadata; - std::unordered_map - no_consts; - auto& constants_to_use = no_consts; - if (constants != nullptr) { - constants_to_use = *constants; - } + goos::EnvironmentMap no_consts; auto iter = &deftype; @@ -861,8 +849,7 @@ DeftypeResult parse_deftype( } new_type->inherit(pto); ts->forward_declare_type_as(name, pto->get_name()); - auto sr = - parse_structure_def(new_type.get(), ts, field_list_obj, options_obj, constants_to_use); + auto sr = parse_structure_def(new_type.get(), ts, field_list_obj, options_obj, constants); result.flags = sr.flags; result.create_runtime_type = sr.generate_runtime_type; structure_result = sr; @@ -891,8 +878,7 @@ DeftypeResult parse_deftype( ASSERT(pto); new_type->inherit(pto); ts->forward_declare_type_as(name, pto->get_name()); - auto sr = - parse_structure_def(new_type.get(), ts, field_list_obj, options_obj, constants_to_use); + auto sr = parse_structure_def(new_type.get(), ts, field_list_obj, options_obj, constants); result.flags = sr.flags; result.create_runtime_type = sr.generate_runtime_type; structure_result = sr; diff --git a/common/type_system/deftype.h b/common/type_system/deftype.h index a8270216e2..6c65117a20 100644 --- a/common/type_system/deftype.h +++ b/common/type_system/deftype.h @@ -17,9 +17,7 @@ struct DeftypeResult { bool create_runtime_type = true; }; -DeftypeResult parse_deftype( - const goos::Object& deftype, - TypeSystem* ts, - std::unordered_map* - constants = nullptr); +DeftypeResult parse_deftype(const goos::Object& deftype, + TypeSystem* ts, + goos::EnvironmentMap* constants = nullptr); TypeSpec parse_typespec(const TypeSystem* type_system, const goos::Object& src); diff --git a/common/util/FileUtil.cpp b/common/util/FileUtil.cpp index 6a36b9fa2e..1cf7f72911 100644 --- a/common/util/FileUtil.cpp +++ b/common/util/FileUtil.cpp @@ -766,4 +766,25 @@ std::string get_majority_file_line_endings(const std::string& file_contents) { return "\n"; } +std::pair get_majority_file_line_endings_and_count( + const std::string& file_contents) { + size_t lf_count = 0; + size_t crlf_count = 0; + + for (size_t i = 0; i < file_contents.size(); ++i) { + if (file_contents[i] == '\n') { + if (i > 0 && file_contents[i - 1] == '\r') { + crlf_count++; + } else { + lf_count++; + } + } + } + + if (crlf_count > lf_count) { + return {lf_count + crlf_count, "\r\n"}; + } + return {lf_count + crlf_count, "\n"}; +} + } // namespace file_util diff --git a/common/util/FileUtil.h b/common/util/FileUtil.h index a8ad679b27..e13d109c78 100644 --- a/common/util/FileUtil.h +++ b/common/util/FileUtil.h @@ -72,4 +72,6 @@ std::vector sort_filepaths(const std::vector& paths, const b void copy_file(const fs::path& src, const fs::path& dst); std::string make_screenshot_filepath(const GameVersion game_version, const std::string& name = ""); 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); } // namespace file_util diff --git a/common/util/Range.h b/common/util/Range.h index 99f3018109..0fb2e7a8fc 100644 --- a/common/util/Range.h +++ b/common/util/Range.h @@ -67,4 +67,4 @@ class Range { private: T m_start = {}; T m_end = {}; -}; \ No newline at end of file +}; diff --git a/common/util/Trie.h b/common/util/Trie.h index d108bfeb8f..76a6a86a6a 100644 --- a/common/util/Trie.h +++ b/common/util/Trie.h @@ -12,7 +12,7 @@ * It owns the memory for the objects it stores. * Doing an insert will create a copy of your object. * - * Other that deleting the whole thing, there is no support for removing a node. + * Other than deleting the whole thing, there is no support for removing a node. */ template class Trie { @@ -187,4 +187,4 @@ std::vector Trie::get_all_nodes() const { std::vector result; m_root.get_all_children(result); return result; -} +} \ No newline at end of file diff --git a/common/util/ast_util.cpp b/common/util/ast_util.cpp new file mode 100644 index 0000000000..8fef6d99c6 --- /dev/null +++ b/common/util/ast_util.cpp @@ -0,0 +1,31 @@ +#include "ast_util.h" + +namespace ast_util { +std::string get_source_code(const std::string& source, const TSNode& node) { + uint32_t start = ts_node_start_byte(node); + uint32_t end = ts_node_end_byte(node); + return source.substr(start, end - start); +} + +void search_for_forms_that_begin_with(const std::string& source, + const TSNode curr_node, + const std::vector& prefix, + std::vector& results) { + if (ts_node_child_count(curr_node) == 0) { + return; + } + std::vector node_elements; + bool added = false; + for (size_t i = 0; i < ts_node_child_count(curr_node); i++) { + const auto child_node = ts_node_child(curr_node, i); + const auto contents = get_source_code(source, child_node); + node_elements.push_back(contents); + // Check for a match + if (node_elements == prefix && !added) { + results.push_back(curr_node); + added = true; + } + search_for_forms_that_begin_with(source, child_node, prefix, results); + } +} +} // namespace ast_util diff --git a/common/util/ast_util.h b/common/util/ast_util.h new file mode 100644 index 0000000000..8889120d47 --- /dev/null +++ b/common/util/ast_util.h @@ -0,0 +1,15 @@ +#pragma once + +#include +#include + +#include "tree_sitter/api.h" + +namespace ast_util { +std::string get_source_code(const std::string& source, const TSNode& node); +void search_for_forms_that_begin_with(const std::string& source, + const TSNode curr_node, + const std::vector& prefix, + std::vector& results); + +} // namespace ast_util diff --git a/common/util/crc32.h b/common/util/crc32.h index a874fe1888..4ce43c7cba 100644 --- a/common/util/crc32.h +++ b/common/util/crc32.h @@ -1,3 +1,5 @@ +#pragma once + #include #include "common/common_types.h" diff --git a/common/util/string_util.cpp b/common/util/string_util.cpp index 5f8db4f80e..b4fd766121 100644 --- a/common/util/string_util.cpp +++ b/common/util/string_util.cpp @@ -247,7 +247,7 @@ std::string titlize(const std::string& str) { } std::string pad_right(const std::string& input, const int width, const char padding_char) { - if (input.length() >= width) { + if ((int)input.length() >= width) { return input; // No need to pad if input length is already greater or equal to width } else { int padding_width = width - input.length(); diff --git a/common/util/trie_with_duplicates.h b/common/util/trie_with_duplicates.h new file mode 100644 index 0000000000..4134301bf3 --- /dev/null +++ b/common/util/trie_with_duplicates.h @@ -0,0 +1,149 @@ +#pragma once + +#include +#include +#include +#include + +// A normal Trie does not allow for duplicate keys, however this one does +// It allows for insertion and removal +// +// Note, keys assume only basic ASCII, which is _fine_ as OpenGOAL itself has this +// limitation as well. +template +class TrieWithDuplicates { + private: + struct TrieNode { + std::array, 256> children; + std::vector> elements; + }; + + std::unique_ptr root = std::make_unique(); + + public: + TrieWithDuplicates() {} + + T* insert(const std::string& key, const T& element) { + std::unique_ptr new_element = std::make_unique(element); + TrieNode* curr_node = root.get(); + for (const char character : key) { + auto& child = curr_node->children[(uint8_t)character]; + if (!child) { + child = std::make_unique(); + } + curr_node = child.get(); + } + curr_node->elements.push_back(std::move(new_element)); + return curr_node->elements.back().get(); + } + + std::vector retrieve_with_prefix(const std::string& prefix, int max_count = -1) const { + std::vector results; + TrieNode* curr_node = root.get(); + for (const char character : prefix) { + if (max_count >= 0 && (int)results.size() > max_count) { + return results; + } + const auto& child = curr_node->children.at((uint8_t)character); + if (child == nullptr) { + return results; // tree ends, nothing found with that prefix + } else { + curr_node = child.get(); + } + } + retrieve_elements(curr_node, results, max_count); + return results; + } + + std::vector retrieve_with_exact(const std::string& key) const { + std::vector results; + TrieNode* curr_node = root.get(); + for (const char character : key) { + const auto& child = curr_node->children.at((uint8_t)character); + if (child == nullptr) { + return results; // tree ends, nothing found with that key + } else { + curr_node = child.get(); + } + } + for (const auto& element : curr_node->elements) { + results.push_back(element.get()); + } + return results; + } + + bool remove(const std::string& key, const T* to_be_removed) { + TrieNode* curr_node = root.get(); + for (const char character : key) { + const auto& child = curr_node->children.at((uint8_t)character); + if (child == nullptr) { + return false; // tree ends, nothing found with that key + } else { + curr_node = child.get(); + } + } + // Since the trie holds duplicates, we can't delete on the key alone + // now search to see which element is identical + auto it = curr_node->elements.begin(); + while (it != curr_node->elements.end()) { + if (it->get() == to_be_removed) { + it = curr_node->elements.erase(it); + return true; // we can assume that the same ptr isn't stored twice. + } else { + ++it; + } + } + return false; + } + + // Return the total number of elements stored in the TrieMap + int size() const { + int count = 0; + count_elements(root.get(), count); + return count; + } + + std::vector get_all_elements() const { + std::vector results; + get_all_elements_helper(root.get(), results); + return results; + } + + private: + void retrieve_elements(const TrieNode* node, std::vector& results, int max_count = -1) const { + for (const auto& element : node->elements) { + if (max_count >= 0 && (int)results.size() > max_count) { + return; + } + results.push_back(element.get()); + } + for (const auto& child : node->children) { + if (max_count >= 0 && (int)results.size() > max_count) { + return; + } + if (child.get() != nullptr) { + retrieve_elements(child.get(), results, max_count); + } + } + } + + void count_elements(const TrieNode* node, int& count) const { + count += node->elements.size(); + for (const auto& child : node->children) { + if (child.get() != nullptr) { + count_elements(child.get(), count); + } + } + } + + void get_all_elements_helper(const TrieNode* node, std::vector& result) const { + for (const auto& element : node->elements) { + result.push_back(element.get()); + } + for (const auto& child : node->children) { + if (child.get() != nullptr) { + get_all_elements_helper(child.get(), result); + } + } + } +}; diff --git a/decompiler/IR2/Form.cpp b/decompiler/IR2/Form.cpp index 0a3844d625..3cfb897524 100644 --- a/decompiler/IR2/Form.cpp +++ b/decompiler/IR2/Form.cpp @@ -3447,7 +3447,7 @@ goos::Object DefpartElement::to_form_internal(const Env& env) const { break; } item_forms.push_back(decompile_sparticle_field_init(e.data, e.field_id, e.flags, e.sound_spec, - e.userdata, env.dts->ts, env.version)); + e.userdata, env.dts->ts, env.version, env)); } if (!item_forms.empty()) { forms.push_back(pretty_print::to_symbol(":init-specs")); diff --git a/decompiler/IR2/Form.h b/decompiler/IR2/Form.h index ffff0181d3..3f09a14304 100644 --- a/decompiler/IR2/Form.h +++ b/decompiler/IR2/Form.h @@ -1178,6 +1178,7 @@ class StringConstantElement : public FormElement { FormStack& stack, std::vector* result, bool allow_side_effects) override; + const std::string& value() const { return m_value; } private: std::string m_value; diff --git a/decompiler/IR2/FormExpressionAnalysis.cpp b/decompiler/IR2/FormExpressionAnalysis.cpp index d8457c4fb3..2ff5958673 100644 --- a/decompiler/IR2/FormExpressionAnalysis.cpp +++ b/decompiler/IR2/FormExpressionAnalysis.cpp @@ -3300,6 +3300,36 @@ void FunctionCallElement::update_from_stack(const Env& env, return; } + // tpage and texture macros + { + auto func = Matcher::symbol("lookup-texture-by-id"); + auto func_fast = Matcher::symbol("lookup-texture-by-id-fast"); + auto mr = match(func, unstacked.at(0)); + auto mr_fast = match(func_fast, unstacked.at(0)); + if (mr.matched || mr_fast.matched) { + auto tex_id = Matcher::any_integer(0); + auto mr2 = match(tex_id, unstacked.at(1)); + if (mr2.matched) { + auto id = mr2.maps.ints.at(0); + u16 tpage = (id & 0xfff00000) >> 20; + u16 idx = (id & 0x000fff00) >> 8; + auto fixed_id = tpage << 16 | idx; + if (!env.dts->textures.empty() && + env.dts->textures.find(fixed_id) != env.dts->textures.end()) { + std::vector macro_args; + auto tex = env.dts->textures.at(fixed_id); + macro_args.push_back(pool.form(tex.name)); + macro_args.push_back(pool.form(tex.tpage_name)); + auto macro = pool.alloc_element( + GenericOperator::make_function(pool.form("get-texture")), + macro_args); + result->push_back(macro); + return; + } + } + } + } + { // deal with virtual method calls. auto matcher = Matcher::op(GenericOpMatcher::fixed(FixedOperatorKind::METHOD_OF_OBJECT), @@ -5475,6 +5505,14 @@ FormElement* ConditionElement::make_generic(const Env& env, casted); } + case IR2_Condition::Kind::LEQ_ZERO_UNSIGNED: { + auto casted = make_casts_if_needed(source_forms, types, TypeSpec("uint"), pool, env); + auto zero = pool.form(SimpleAtom::make_int_constant(0)); + casted.push_back(zero); + return pool.alloc_element(GenericOperator::make_fixed(FixedOperatorKind::LEQ), + casted); + } + case IR2_Condition::Kind::GEQ_ZERO_SIGNED: { return make_geq_zero_signed_check_generic(env, pool, source_forms, types); } @@ -6548,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 e559e6dd37..54fd5a733a 100644 --- a/decompiler/IR2/GenericElementMatcher.cpp +++ b/decompiler/IR2/GenericElementMatcher.cpp @@ -243,6 +243,15 @@ Matcher Matcher::let(bool is_star, return m; } +Matcher Matcher::unmerged_let(const std::vector& entries, + const std::vector& elts) { + Matcher m; + m.m_kind = Kind::UNMERGED_LET; + m.m_entry_matchers = entries; + m.m_sub_matchers = elts; + return m; +} + bool Matcher::do_match(Form* input, MatchResult::Maps* maps_out, const Env* const env) const { switch (m_kind) { case Kind::ANY: @@ -722,6 +731,68 @@ bool Matcher::do_match(Form* input, MatchResult::Maps* maps_out, const Env* cons return false; } + case Kind::UNMERGED_LET: { + auto as_let = dynamic_cast(input->try_as_single_active_element()); + if (as_let) { + size_t entries_matched = 0; + Form* innermost_let_body = nullptr; + // first try to find the innermost let, matching all let entries with the entry matchers + // throughout + as_let->apply_form([&](Form* form) { + for (int idx = 0; idx < form->size(); idx++) { + auto* f = form->at(idx); + // if this is the entry of the outermost let, try to do the first match + if (f->parent_form->parent_element == as_let) { + if (m_entry_matchers.at(entries_matched) + .do_match(as_let->entries().at(0), maps_out, env)) { + entries_matched++; + } else { + return; + } + } + auto let = dynamic_cast(f); + if (!let) { + continue; + } + + auto let_body = dynamic_cast(let->body()->at(0)); + if (!let_body) { + 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++; + } else { + return; + } + + if (entries_matched == m_entry_matchers.size()) { + innermost_let_body = let_body->body(); + return; + } + } + }); + + if (entries_matched == m_entry_matchers.size() && innermost_let_body) { + // now match body of innermost let + for (int i = 0; i < (int)m_sub_matchers.size(); ++i) { + Form fake; + fake.elts().push_back(innermost_let_body->elts().at(i)); + if (!m_sub_matchers.at(i).do_match(&fake, maps_out, env)) { + return false; + } + } + return true; + } + } + return false; + } + default: ASSERT(false); return false; diff --git a/decompiler/IR2/GenericElementMatcher.h b/decompiler/IR2/GenericElementMatcher.h index 6ba41f32ed..d1c9d0fca9 100644 --- a/decompiler/IR2/GenericElementMatcher.h +++ b/decompiler/IR2/GenericElementMatcher.h @@ -76,6 +76,8 @@ class Matcher { static Matcher let(bool is_star, const std::vector& entries, const std::vector& elts); + static Matcher unmerged_let(const std::vector& entries, + const std::vector& elts); enum class Kind { ANY_REG, // matching any register @@ -106,6 +108,7 @@ class Matcher { QUOTED_SYMBOL, SAME_VAR, LET, + UNMERGED_LET, VAR_NAME, INVALID }; diff --git a/decompiler/IR2/bitfields.cpp b/decompiler/IR2/bitfields.cpp index 2199b6bd88..2fa4778ddf 100644 --- a/decompiler/IR2/bitfields.cpp +++ b/decompiler/IR2/bitfields.cpp @@ -974,18 +974,29 @@ Form* cast_to_bitfield_enum(const EnumType* type_info, if (in == -1) { return nullptr; } - auto elts = decompile_bitfield_enum_from_int(TypeSpec(type_info->get_name()), env.dts->ts, in); + TypeSpec ts(type_info->get_name()); + auto elts = try_decompile_bitfield_enum_from_int(ts, env.dts->ts, in, no_head); if (no_head) { - ASSERT(elts.size() >= 1); + ASSERT(elts->size() >= 1); } + + if (!elts) { + if (in == 0xffff'ffff || in == INT64_MIN) { + return pool.form( + ts, pool.form(SimpleAtom::make_int_constant(in))); + } + // backup failed, run again to get the nice error print. + try_decompile_bitfield_enum_from_int(ts, env.dts->ts, in, true); + } + auto oper = GenericOperator::make_function( - pool.form(no_head ? elts.at(0) : type_info->get_name())); + pool.form(no_head ? elts->at(0) : type_info->get_name())); if (no_head) { - elts.erase(elts.begin()); + elts->erase(elts->begin()); } std::vector form_elts; - for (auto& x : elts) { + for (auto& x : *elts) { form_elts.push_back(pool.form(x)); } return pool.form(oper, form_elts); diff --git a/decompiler/ObjectFile/ObjectFileDB.cpp b/decompiler/ObjectFile/ObjectFileDB.cpp index 6f59329f32..393cb113f5 100644 --- a/decompiler/ObjectFile/ObjectFileDB.cpp +++ b/decompiler/ObjectFile/ObjectFileDB.cpp @@ -120,6 +120,7 @@ ObjectFileDB::ObjectFileDB(const std::vector& _dgos, const std::vector& object_files, const std::vector& str_files, const std::vector& str_tex_files, + const std::vector& str_art_files, const Config& config) : dts(config.game_version), m_version(config.game_version) { Timer timer; @@ -237,6 +238,18 @@ ObjectFileDB::ObjectFileDB(const std::vector& _dgos, } } + if (!str_art_files.empty()) { + lg::info("-Loading {} streaming art files...", str_art_files.size()); + for (auto& obj : str_art_files) { + StrFileReader reader(obj, version()); + for (int i = 0; i < reader.chunk_count(); i++) { + auto name = reader.get_chunk_art_name(i); + add_obj_from_dgo(name, name, reader.get_chunk(i).data(), reader.get_chunk(i).size(), + "ARTSPOOL", config, name); + } + } + } + lg::info("ObjectFileDB Initialized"); if (obj_files_by_name.empty()) { lg::error( @@ -717,7 +730,8 @@ void ObjectFileDB::find_and_write_scripts(const fs::path& output_dir) { std::string ObjectFileDB::process_tpages(TextureDB& tex_db, const fs::path& output_path, - const Config& cfg) { + const Config& cfg, + const fs::path& dump_out) { lg::info("- Finding textures in tpages..."); std::string tpage_string = "tpage-"; int total = 0, success = 0; @@ -766,6 +780,27 @@ std::string ObjectFileDB::process_tpages(TextureDB& tex_db, lg::warn("Did not find tpage-dir."); return {}; } + + if (cfg.write_tpage_imports) { + file_util::create_dir_if_needed(dump_out); + std::string tpage_dump; + std::string tex_dump; + for (auto& tpage : tex_db.tpage_names) { + tpage_dump += print_tpage_for_dump(tpage.second, tpage.first); + } + for (auto& tex : tex_db.textures) { + auto tpage_name = tex_db.tpage_names[tex.second.page]; + dts.textures.emplace(tex.first, TexInfo{tex.second.name, tpage_name, tex.first & 0x0000ffff}); + tex_dump += print_tex_for_dump(tex.second.name, tpage_name, tex.first & 0x0000ffff); + } + + auto tpage_dump_out = dump_out / "tpages.gc"; + auto tex_dump_out = dump_out / "textures.gc"; + + file_util::write_text_file(tpage_dump_out, tpage_dump); + file_util::write_text_file(tex_dump_out, tex_dump); + } + return result; } @@ -1107,4 +1142,10 @@ std::string print_art_elt_for_dump(const std::string& group_name, std::string print_jg_for_dump(const std::string& jg_name, const std::string& joint_name, int idx) { return fmt::format("(def-joint-node {} \"{}\" {})\n", jg_name, joint_name, idx); } +std::string print_tpage_for_dump(const std::string& debug_name, u32 id) { + return fmt::format("(defconstant {} {})\n", debug_name, id); +} +std::string print_tex_for_dump(const std::string& name, const std::string& page_name, u32 idx) { + return fmt::format("(def-tex {} {} {})\n", name, page_name, idx); +} } // namespace decompiler diff --git a/decompiler/ObjectFile/ObjectFileDB.h b/decompiler/ObjectFile/ObjectFileDB.h index 951e5cbe06..0811bafb3c 100644 --- a/decompiler/ObjectFile/ObjectFileDB.h +++ b/decompiler/ObjectFile/ObjectFileDB.h @@ -169,6 +169,7 @@ class ObjectFileDB { const std::vector& object_files, const std::vector& str_files, const std::vector& str_tex_files, + const std::vector& str_art_files, const Config& config); std::string generate_dgo_listing(); std::string generate_obj_listing(const std::unordered_set& merged_objs); @@ -254,7 +255,10 @@ class ObjectFileDB { const std::vector& imports, const std::unordered_set& skip_functions); - std::string process_tpages(TextureDB& tex_db, const fs::path& output_path, const Config& cfg); + std::string process_tpages(TextureDB& tex_db, + const fs::path& output_path, + const Config& cfg, + const fs::path& dump_out); std::string process_game_count_file(); std::string process_game_text_files(const Config& cfg); std::string process_all_spool_subtitles(const Config& cfg, const fs::path& image_out); @@ -397,4 +401,6 @@ class ObjectFileDB { std::string print_art_elt_for_dump(const std::string& group_name, const std::string& name, int idx); std::string print_jg_for_dump(const std::string& jg_name, const std::string& joint_name, int idx); +std::string print_tpage_for_dump(const std::string& debug_name, u32 id); +std::string print_tex_for_dump(const std::string& name, const std::string& page_name, u32 idx); } // namespace decompiler diff --git a/decompiler/analysis/find_defstates.cpp b/decompiler/analysis/find_defstates.cpp index 9cae8fafb3..2f59fd0424 100644 --- a/decompiler/analysis/find_defstates.cpp +++ b/decompiler/analysis/find_defstates.cpp @@ -355,6 +355,21 @@ FormElement* rewrite_virtual_defstate( inherit_info = {{mot_mr.maps.strings.at(0), mot_mr.maps.strings.at(1)}}; } + // jak 3: some virtual states set their parent here and inherit from their own type's states... + std::string maybe_parent_state; + std::string maybe_state_type; + auto maybe_parent = elt->body()->at(body_idx); + auto maybe_parent_matcher = + Matcher::set(Matcher::deref(Matcher::any_reg(), false, {DerefTokenMatcher::string("parent")}), + Matcher::op(GenericOpMatcher::fixed(FixedOperatorKind::METHOD_OF_TYPE), + {Matcher::any_symbol(0), Matcher::any_constant_token(1)})); + auto maybe_parent_mr = match(maybe_parent_matcher, maybe_parent); + if (maybe_parent_mr.matched) { + maybe_state_type = maybe_parent_mr.maps.strings.at(0); + maybe_parent_state = maybe_parent_mr.maps.strings.at(1); + body_idx++; + } + // checks to check: method type is a state // if inherit matches expected. @@ -411,7 +426,14 @@ FormElement* rewrite_virtual_defstate( // expected_state_name, type_name); } } else { - if (inherit_info) { + // if we set our parent state, check that that state's type and this type are the same + if (inherit_info && maybe_parent_mr.matched && maybe_state_type == type_name) { + env.func->warnings.warning( + "Virtual defstate {} is inheriting from state {} which is one of its own type's " + "states.", + expected_state_name, maybe_parent_state); + } + if (inherit_info && !maybe_parent_mr.matched) { env.func->warnings.error_and_throw( "Virtual defstate for state {} in type {}: the state wasn't defined in the " "parent but was inherited.", @@ -421,7 +443,7 @@ FormElement* rewrite_virtual_defstate( } // checks: parent_type_name is the parent - if (inherit_info) { + if (inherit_info && !maybe_parent_mr.matched) { auto child_type_info = env.dts->ts.lookup_type(type_name); if (child_type_info->get_parent() != inherit_info->parent_type_name) { env.func->warnings.error_and_throw( @@ -451,8 +473,115 @@ FormElement* rewrite_virtual_defstate( elt->body(), body_idx + 1, env, expected_state_name, elt->entries().at(0).dest, method_info.type.substitute_for_method_call(type_name), pool, type_name, skip_states); - return pool.alloc_element(type_name, expected_state_name, "", entries, true, - state_override); + std::string parent_str; + if (!maybe_parent_state.empty()) { + parent_str = fmt::format("({} {})", type_name, maybe_parent_state); + } + + return pool.alloc_element(type_name, expected_state_name, parent_str, entries, + true, state_override); +} + +FormElement* rewrite_virtual_defstate_with_nonvirtual_inherit( + LetElement* elt, + const Env& env, + const std::string& expected_state_name, + FormPool& pool, + const std::unordered_map>& skip_states = {}) { + // (let ((gp-6 (new 'static 'state + // :name 'spinning + // :next #f + // :exit #f + // :parent #f + // :code #f + // :trans #f + // :post #f + // :enter #f + // :event #f + // ) + // ) + // ) + // (inherit-state gp-6 gun-yellow-3-saucer-base-state) + // (set! (-> gp-6 parent) gun-yellow-3-saucer-base-state) + // (method-set! gun-yellow-3-saucer 46 gp-6) + // (set! (-> gp-6 enter) L255) + // (set! (-> gp-6 exit) (the-as (function object) L251)) + // (set! (-> gp-6 trans) (the-as (function object) L253)) + // ) + env.func->warnings.warning("Encountered virtual defstate {} with non-virtual inherit.", + expected_state_name); + // variable at the top of let, contains the static state with name exptected_state_name + auto state_var_from_let_def = elt->entries().at(0).dest; + // our index into the let body + int body_idx = 0; + + // the setup + auto first_in_body = elt->body()->at(body_idx); + auto inherit = dynamic_cast(first_in_body); + std::string parent_state; + if (inherit) { + parent_state = inherit->elts().at(1)->to_string(env); + } + body_idx += 2; + + // checks to check: method type is a state + // if inherit matches expected. + + // next, find (method-set! sunken-elevator 22 (the-as function gp-0)) + auto method_set_form = elt->body()->at(body_idx); + Form temp = Form(); + temp.elts().push_back(method_set_form); + auto mset_matcher = + Matcher::op(GenericOpMatcher::func(Matcher::symbol("method-set!")), + {Matcher::any_symbol(0), Matcher::any_integer(1), Matcher::any(2)}); + auto mset_mr = match(mset_matcher, &temp); + if (!mset_mr.matched) { + env.func->warnings.error_and_throw( + "Failed to recognize virtual defstate. Got a {} as the third thing, but was " + "expecting method-set! call", + temp.to_string(env)); + } + + // the actual type that gets this as a state + auto type_name = mset_mr.maps.strings.at(0); + auto method_id = mset_mr.maps.ints.at(1); + + // should be the state again. + auto val = strip_cast(mset_mr.maps.forms.at(2)->try_as_single_element()); + if (val->to_string(env) != env.get_variable_name(state_var_from_let_def)) { + env.func->warnings.error_and_throw( + "Variable name disagreement in virtual defstate: began with {}, but did method " + "set using {}", + val->to_string(env), env.get_variable_name(state_var_from_let_def)); + } + + // we should double check that the type in the defstate is correct + auto method_info = env.dts->ts.lookup_method(type_name, method_id); + if (method_info.type.base_type() != "state" || + method_info.type.last_arg().base_type() != "_type_") { + env.func->warnings.error_and_throw( + "Virtual defstate is defining a virtual state \"{}\" in method {} of {}, but the type " + "of this method is {}, which is not a valid virtual state type (must be " + "\"(state ... _type_)\")", + expected_state_name, method_info.name, type_name, method_info.type.print()); + } + + bool state_override = false; + + // name matches + if (expected_state_name != method_info.name) { + env.func->warnings.error_and_throw( + "Disagreement between state name and type system name. The state is named {}, " + "but the slot is named {}, defined in type {}", + expected_state_name, method_info.name, method_info.defined_in_type); + } + + auto entries = get_defstate_entries( + elt->body(), body_idx + 1, env, expected_state_name, elt->entries().at(0).dest, + method_info.type.substitute_for_method_call(type_name), pool, type_name, skip_states); + + return pool.alloc_element(type_name, expected_state_name, parent_state, entries, + true, state_override); } FormElement* rewrite_nonvirtual_defstate_with_inherit( @@ -482,7 +611,7 @@ FormElement* rewrite_nonvirtual_defstate_with_inherit( // (set! (-> gp-1 trans) (the-as (function object) L107)) // (set! (-> gp-1 code) L95) // ) - env.func->warnings.warning("Encountered non-virtual defstate {} with inherit.", + env.func->warnings.warning("Encountered non-virtual defstate {} with non-virtual inherit.", expected_state_name); ASSERT(elt->body()->size() > 0); int body_index = 0; @@ -532,6 +661,33 @@ bool is_nonvirtual_state_with_inherit(LetElement* elt) { return false; } +bool is_virtual_state_with_nonvirtual_inherit(LetElement* elt) { + if (elt->body()->size() >= 3) { + auto inherit = dynamic_cast(elt->body()->at(0)); + auto parent = dynamic_cast(elt->body()->at(1)); + auto method_set = dynamic_cast(elt->body()->at(2)); + if (!inherit || !parent || !method_set) { + return false; + } + std::vector forms = {inherit, parent, method_set}; + std::vector matchers = { + Matcher::op(GenericOpMatcher::func(Matcher::symbol("inherit-state")), + {Matcher::any_reg(0), Matcher::any_symbol(1)}), + Matcher::set(Matcher::deref(Matcher::any(), false, {DerefTokenMatcher::string("parent")}), + Matcher::any_symbol()), + Matcher::op(GenericOpMatcher::func(Matcher::symbol("method-set!")), + {Matcher::any_symbol(0), Matcher::any_integer(1), Matcher::any(2)})}; + for (size_t i = 0; i < matchers.size(); i++) { + auto mr = match(matchers.at(i), forms.at(i)); + if (!mr.matched) { + return false; + } + } + return true; + } + return false; +} + } // namespace void run_defstate( @@ -570,6 +726,12 @@ void run_defstate( if (rewritten) { fe = rewritten; } + } else if (is_virtual_state_with_nonvirtual_inherit(as_let)) { + auto rewritten = rewrite_virtual_defstate_with_nonvirtual_inherit( + as_let, env, expected_state_name, pool, skip_states); + if (rewritten) { + fe = rewritten; + } } else if (is_nonvirtual_state_with_inherit(as_let)) { auto rewritten = rewrite_nonvirtual_defstate_with_inherit( as_let, env, expected_state_name, pool, skip_states); diff --git a/decompiler/analysis/find_skelgroups.cpp b/decompiler/analysis/find_skelgroups.cpp index 869374a8b4..ab3a8bb705 100644 --- a/decompiler/analysis/find_skelgroups.cpp +++ b/decompiler/analysis/find_skelgroups.cpp @@ -233,25 +233,30 @@ DefskelgroupElement::StaticInfo inspect_skel_group_data_jak3(DecompiledDataEleme .word 0x0 // jgeo // 36 .word 0x0 // janim // 40 .word 0x0 // ? (word 10) // 44 - .word 0x0 // bounds x // 48 - .word 0x0 // bounds y // 52 - .word 0x0 // bounds z // 56 - .word 0x464ccccd // bounds w/radius // 60 - .word 0x0 // mgeo 0/1 // 64 - .word 0x0 // mgeo 2/3 // 68 - .word 0x0 // mgeo 4/5 // 72 - .word 0x0 // max-lod // 76 - .word 0x0 // lod-dist 0 // 80 - .word 0x0 // lod-dist 1 // 84 - .word 0x0 // lod-dist 2 // 88 - .word 0x0 // lod-dist 3 // 92 - .word 0x0 // lod-dist 4 // 96 - .word 0x0 // lod-dist 5 // 100 - .word 0x45800000 // longest-edge // 104 - .word 0x80a // texture-level/version/shadow/sort // 108 - .word 0x10303 // origin-joint-index/shadow-joint-index/light-index/pad // 112 - .symbol #f // clothing // 116 - .word 0x0 // global-effects // 120 + .word 0x0 // bounds x // 48 11 + .word 0x0 // bounds y // 52 12 + .word 0x0 // bounds z // 56 13 + .word 0x464ccccd // bounds w/radius // 60 14 + .word 0x0 // mgeo 0/1 // 64 15 + .word 0x0 // mgeo 2/3 // 68 16 + .word 0x0 // mgeo 4/5 // 72 17 + .word 0x0 // max-lod // 76 18 + .word 0x0 // lod-dist 0 // 80 19 + .word 0x0 // lod-dist 1 // 84 20 + .word 0x0 // lod-dist 2 // 88 21 + .word 0x0 // lod-dist 3 // 92 22 + .word 0x0 // lod-dist 4 // 96 23 + .word 0x0 // lod-dist 5 // 100 24 + .word 0x45800000 // longest-edge // 104 25 + (texture-level int8 :offset-assert 108) ;; word 26 + (version int8 :offset-assert 109) + (shadow int16 :offset-assert 110) + (shadow-joint-index int8 :offset-assert 112) ;; word 27 + (origin-joint-index int8 :offset-assert 113) + (sort int8 :offset-assert 114) + (light-index uint8 :offset-assert 115) + (clothing (array cloth-params) :offset-assert 116) ;; word 28 + (global-effects uint8 :offset-assert 120) ;; word 29 .word 0x0 // pad */ @@ -297,15 +302,16 @@ DefskelgroupElement::StaticInfo inspect_skel_group_data_jak3(DecompiledDataEleme } result.tex_level = other_word.get_byte(0); result.version = other_word.get_byte(1); - result.shadow = other_word.get_byte(2); - result.sort = other_word.get_byte(3); + result.shadow = ((u32)other_word.get_byte(2)) | (((u32)other_word.get_byte(3)) << 8); + auto& index_word = words.at(start_word_idx + 27); if (index_word.kind() != LinkedWord::PLAIN_DATA) { env.func->warnings.error_and_throw("Reference to skelgroup bad: invalid index data"); } - result.origin_joint_index = index_word.get_byte(0); - result.shadow_joint_index = index_word.get_byte(1); - result.light_index = index_word.get_byte(2); + result.shadow_joint_index = index_word.get_byte(0); + result.origin_joint_index = index_word.get_byte(1); + result.sort = index_word.get_byte(2); + result.light_index = index_word.get_byte(3); auto& clothing = words.at(start_word_idx + 28); if (clothing.kind() != LinkedWord::SYM_PTR && clothing.symbol_name() != "#f") { @@ -570,7 +576,7 @@ void inspect_cloth_data_jak3(LetElement* let, DefskelgroupElement::StaticInfo& i auto array_set = dynamic_cast(when_body->at(0)); if (array_set) { // get elements - auto elts = when_body->elts().size() - 2; + auto elts = (int)when_body->elts().size() - 2; for (int i = 0; i < elts; i++) { auto parms_form = dynamic_cast(when_body->at(i + 1)); if (parms_form) { diff --git a/decompiler/analysis/insert_lets.cpp b/decompiler/analysis/insert_lets.cpp index 9acd898146..29d5a420e4 100644 --- a/decompiler/analysis/insert_lets.cpp +++ b/decompiler/analysis/insert_lets.cpp @@ -1239,15 +1239,18 @@ FormElement* rewrite_joint_macro(LetElement* in, const Env& env, FormPool& pool) } auto channel_form = mr_chan.int_or_form_to_form(pool, 0); - // now we checks for set!'s. the actual contents of the macro are not very complicated to match. + // now we check for set!'s. the actual contents of the macro are not very complicated to match. // there is just a LOT to match. and then to write! bool bad = false; int idx = 0; auto set_fi = match_ja_set(env, chan, "frame-interp", -1, in->body(), &idx, &bad); + auto set_fi1 = match_ja_set(env, chan, "frame-interp", 1, in->body(), &idx, &bad); + auto set_fi0 = match_ja_set(env, chan, "frame-interp", 0, in->body(), &idx, &bad); auto set_dist = match_ja_set(env, chan, "dist", -1, in->body(), &idx, &bad); auto set_fg = match_ja_set(env, chan, "frame-group", -1, in->body(), &idx, &bad); auto set_p0 = match_ja_set(env, chan, "param", 0, in->body(), &idx, &bad); auto set_p1 = match_ja_set(env, chan, "param", 1, in->body(), &idx, &bad); + auto set_p2 = match_ja_set(env, chan, "param", 2, in->body(), &idx, &bad); auto set_nf = match_ja_set(env, chan, "num-func", -1, in->body(), &idx, &bad); auto set_fn = match_ja_set(env, chan, "frame-num", -1, in->body(), &idx, &bad); @@ -1367,14 +1370,15 @@ FormElement* rewrite_joint_macro(LetElement* in, const Env& env, FormPool& pool) Form* num_form = nullptr; // check the num! arg if (prelim_num == "identity") { - if (env.version == GameVersion::Jak2 && set_fn && !set_fn2) { + if (env.version >= GameVersion::Jak2 && set_fn && !set_fn2) { // jak 2-specific made-up thing! // this has only appeared once so far. if (set_fn->to_form(env).is_float(0.0)) { num_form = pool.form("zero"); set_fn = nullptr; } else { - return nullptr; + num_form = pool.form( + GenericOperator::make_function(pool.form(prelim_num)), set_fn); } } else if (set_fn2) { auto obj_fn2 = set_fn2->to_form(env); @@ -1479,12 +1483,17 @@ FormElement* rewrite_joint_macro(LetElement* in, const Env& env, FormPool& pool) // other generic args ja_push_form_to_args(pool, args, set_fi, "frame-interp"); + ja_push_form_to_args(pool, args, set_fi0, "frame-interp0"); + ja_push_form_to_args(pool, args, set_fi1, "frame-interp1"); ja_push_form_to_args(pool, args, set_dist, "dist"); // ja_push_form_to_args(pool, args, form_fg, "frame-group"); ja_push_form_to_args(pool, args, set_p0, "param0"); ja_push_form_to_args(pool, args, set_p1, "param1"); + ja_push_form_to_args(pool, args, set_p2, "param2"); ja_push_form_to_args(pool, args, set_nf, "num-func"); - ja_push_form_to_args(pool, args, set_fn, "frame-num"); + if (arg_num_func != "num-func-identity") { + ja_push_form_to_args(pool, args, set_fn, "frame-num"); + } // TODO if (set_fn2) { @@ -1506,6 +1515,164 @@ FormElement* rewrite_joint_macro(LetElement* in, const Env& env, FormPool& pool) args); } +FormElement* rewrite_part_tracker_new(const std::string& type, + LetElement* in, + const Env& env, + FormPool& pool) { + // (let ((s4-11 (get-process *default-dead-pool* part-tracker #x4000 0))) + // (when s4-11 + // (let ((t9-26 (method-of-type part-tracker activate))) + // (t9-26 (the-as part-tracker s4-11) s5-1 "part-tracker" (the-as pointer #x70004000)) + // ) + // (let ((t9-27 run-function-in-process) + // (a0-84 s4-11) + // (a1-36 part-tracker-init) + // ) + // (set! (-> *part-tracker-params-default* group) (-> this collect-effect)) + // (set! (-> *part-tracker-params-default* duration) 0) + // (set! (-> *part-tracker-params-default* callback) part-tracker-track-target) + // (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-27) a0-84 a1-36 + // *part-tracker-params-default*) + // ) + // (-> s4-11 ppointer) + // ) + // ) + auto cond = dynamic_cast(in->body()->at(0)); + if (!cond) { + return nullptr; + } + auto when_body = cond->entries.at(0).body; + auto activate_let = dynamic_cast(when_body->at(0)); + if (!activate_let) { + return nullptr; + } + auto activate_matcher = Matcher::let( + false, + {LetEntryMatcher::any(Matcher::op(GenericOpMatcher::fixed(FixedOperatorKind::METHOD_OF_TYPE), + {Matcher::any(), Matcher::constant_token("activate")}), + 0)}, + {Matcher::func(Matcher::reg(Register(Reg::GPR, Reg::T9)), + {Matcher::any(), Matcher::any(1), Matcher::any(2), Matcher::any()})}); + auto activate_mr = match(activate_matcher, when_body->at(0)); + if (!activate_mr.matched) { + return nullptr; + } + auto name = activate_mr.maps.forms.find(2); + auto to = activate_mr.maps.forms.find(1); + auto params_let = dynamic_cast(when_body->at(1)); + if (!params_let) { + return nullptr; + } + auto part_tracker_subsampler_params_body_matcher = { + Matcher::set(Matcher::deref(Matcher::symbol("*part-tracker-subsampler-params-default*"), + false, {DerefTokenMatcher::string("group")}), + Matcher::any(0)), + Matcher::set(Matcher::deref(Matcher::symbol("*part-tracker-subsampler-params-default*"), + false, {DerefTokenMatcher::string("duration")}), + Matcher::any(1)), + Matcher::set(Matcher::deref(Matcher::symbol("*part-tracker-subsampler-params-default*"), + false, {DerefTokenMatcher::string("callback")}), + Matcher::any(2)), + Matcher::set(Matcher::deref(Matcher::symbol("*part-tracker-subsampler-params-default*"), + false, {DerefTokenMatcher::string("userdata")}), + Matcher::any(3)), + Matcher::set(Matcher::deref(Matcher::symbol("*part-tracker-subsampler-params-default*"), + false, {DerefTokenMatcher::string("target")}), + Matcher::any(4)), + Matcher::set(Matcher::deref(Matcher::symbol("*part-tracker-subsampler-params-default*"), + false, {DerefTokenMatcher::string("mat-joint")}), + Matcher::any(5)), + Matcher::set(Matcher::deref(Matcher::symbol("*part-tracker-subsampler-params-default*"), + false, {DerefTokenMatcher::string("subsample-num")}), + Matcher::any(6)), + Matcher::any()}; + auto part_tracker_params_body_matcher = { + Matcher::set(Matcher::deref(Matcher::symbol("*part-tracker-params-default*"), false, + {DerefTokenMatcher::string("group")}), + Matcher::any(0)), + Matcher::set(Matcher::deref(Matcher::symbol("*part-tracker-params-default*"), false, + {DerefTokenMatcher::string("duration")}), + Matcher::any(1)), + Matcher::set(Matcher::deref(Matcher::symbol("*part-tracker-params-default*"), false, + {DerefTokenMatcher::string("callback")}), + Matcher::any(2)), + Matcher::set(Matcher::deref(Matcher::symbol("*part-tracker-params-default*"), false, + {DerefTokenMatcher::string("userdata")}), + Matcher::any(3)), + Matcher::set(Matcher::deref(Matcher::symbol("*part-tracker-params-default*"), false, + {DerefTokenMatcher::string("target")}), + Matcher::any(4)), + Matcher::set(Matcher::deref(Matcher::symbol("*part-tracker-params-default*"), false, + {DerefTokenMatcher::string("mat-joint")}), + Matcher::any(5)), + Matcher::any()}; + auto params_body_matcher = type == "part-tracker-subsampler" + ? part_tracker_subsampler_params_body_matcher + : part_tracker_params_body_matcher; + auto params_matcher = Matcher::unmerged_let( + {LetEntryMatcher::any(Matcher::symbol("run-function-in-process")), + LetEntryMatcher::any(Matcher::any()), LetEntryMatcher::any(Matcher::any())}, + params_body_matcher); + auto params_mr = match(params_matcher, when_body->at(1)); + if (!params_mr.matched) { + return nullptr; + } + + std::vector macro_args; + macro_args.push_back(pool.form(type)); + macro_args.push_back(pool.form(":to")); + macro_args.push_back(to->second); + auto name_str = dynamic_cast(name->second->try_as_single_element()); + if (name_str && name_str->value() != type) { + macro_args.push_back(pool.form(":name")); + macro_args.push_back(name->second); + } + auto group = params_mr.maps.forms.find(0); + macro_args.push_back(pool.form(":group")); + macro_args.push_back(group->second); + auto duration = params_mr.maps.forms.find(1); + if (duration->second->to_string(env) != "0") { + macro_args.push_back(pool.form(":duration")); + macro_args.push_back(duration->second); + } + auto callback = params_mr.maps.forms.find(2); + if (callback->second->to_string(env) != "#f") { + macro_args.push_back(pool.form(":callback")); + macro_args.push_back(callback->second); + } + auto userdata = params_mr.maps.forms.find(3); + if (userdata->second->to_string(env) != "(the-as uint #f)") { + macro_args.push_back(pool.form(":userdata")); + macro_args.push_back(userdata->second); + } + auto target = params_mr.maps.forms.find(4); + if (target->second->to_string(env) != "#f") { + macro_args.push_back(pool.form(":target")); + macro_args.push_back(target->second); + } + auto mat_joint = params_mr.maps.forms.find(5); + if (mat_joint->second->to_string(env) != "*launch-matrix*") { + macro_args.push_back(pool.form(":mat-joint")); + macro_args.push_back(mat_joint->second); + } + if (type == "part-tracker-subsampler") { + auto subsample_num = params_mr.maps.forms.find(6); + if (subsample_num->second->to_string(env) != "1.0") { + macro_args.push_back(pool.form(":subsample-num")); + macro_args.push_back(subsample_num->second); + } + } + + return pool + .form( + GenericOperator::make_function(pool.form("part-tracker-spawn")), + macro_args) + ->try_as_single_element(); +} + FormElement* rewrite_proc_new(LetElement* in, const Env& env, FormPool& pool) { // this function checks for the process-spawn macros. // it uses recursive form scanning to wrap the macro inside a potential "shell" @@ -1530,6 +1697,13 @@ FormElement* rewrite_proc_new(LetElement* in, const Env& env, FormPool& pool) { } const auto& proc_type = mr_get_proc.maps.strings.at(1); + + // part-tracker-spawn macro for jak 3 + if (env.version >= GameVersion::Jak3 && + (proc_type == "part-tracker" || proc_type == "part-tracker-subsampler")) { + return rewrite_part_tracker_new(proc_type, in, env, pool); + } + auto macro_form = is_full_let ? in->body()->at(0) : in->entries().at(1).src->try_as_single_element(); diff --git a/decompiler/analysis/mips2c.cpp b/decompiler/analysis/mips2c.cpp index 5645990dfd..9fb30b3dc0 100644 --- a/decompiler/analysis/mips2c.cpp +++ b/decompiler/analysis/mips2c.cpp @@ -716,6 +716,20 @@ Mips2C_Line handle_generic_op2(const Instruction& i0, instr_str}; } +Mips2C_Line handle_div_divu(const Instruction& i0, + const std::string& instr_str, + const std::string& op_name) { + return {fmt::format("c->{}({}, {});", op_name, reg_to_name(i0.get_src(0)), + reg_to_name(i0.get_src(1))), + instr_str}; +} + +Mips2C_Line handle_generic_op1(const Instruction& i0, + const std::string& instr_str, + const std::string& op_name) { + return {fmt::format("c->{}({});", op_name, reg_to_name(i0.get_dst(0))), instr_str}; +} + Mips2C_Line handle_plain_op(const Instruction& /*i0*/, const std::string& instr_str, const std::string& op_name) { @@ -1216,6 +1230,14 @@ Mips2C_Line handle_normal_instr(Mips2C_Output& output, return handle_vopmsub(i0, instr_str); case InstructionKind::PMFHL_LH: return handle_pmfhl_lh(i0, instr_str); + case InstructionKind::DIV: + return handle_div_divu(i0, instr_str, "div"); + case InstructionKind::DIVU: + return handle_div_divu(i0, instr_str, "divu"); + case InstructionKind::MFHI: + return handle_generic_op1(i0, instr_str, "mfhi"); + case InstructionKind::MFLO: + return handle_generic_op1(i0, instr_str, "mflo"); default: unknown_count++; return handle_unknown(instr_str); diff --git a/decompiler/config.cpp b/decompiler/config.cpp index bf02c11430..984b1f564a 100644 --- a/decompiler/config.cpp +++ b/decompiler/config.cpp @@ -7,10 +7,23 @@ #include "decompiler/util/config_parsers.h" #include "fmt/core.h" -#include "third-party/json.hpp" namespace decompiler { +void from_json(const nlohmann::json& j, TexInfo& info) { + j.at("name").get_to(info.name); + j.at("tpage_name").get_to(info.tpage_name); + j.at("idx").get_to(info.idx); +} + +void to_json(nlohmann::json& j, const TexInfo& info) { + j = { + {"name", info.name}, + {"tpage_name", info.tpage_name}, + {"idx", info.idx}, + }; +} + namespace { /*! * Read an entry from cfg containing the name of a json file, and parse that file. @@ -35,7 +48,9 @@ Config make_config_via_json(nlohmann::json& json) { config.all_types_file = json.at("all_types_file").get(); auto inputs_json = read_json_file_from_config(json, "inputs_file"); - config.dgo_names = inputs_json.at("dgo_names").get>(); + config.dgo_names = json.contains("dgo_names") + ? json.at("dgo_names").get>() + : inputs_json.at("dgo_names").get>(); config.object_file_names = inputs_json.at("object_file_names").get>(); config.str_file_names = inputs_json.at("str_file_names").get>(); @@ -44,6 +59,11 @@ Config make_config_via_json(nlohmann::json& json) { inputs_json.at("str_texture_file_names").get>(); } + if (inputs_json.contains("str_art_file_names")) { + config.str_art_file_names = + inputs_json.at("str_art_file_names").get>(); + } + config.audio_dir_file_name = inputs_json.at("audio_dir_file_name").get(); config.streamed_audio_file_names = inputs_json.at("streamed_audio_file_names").get>(); @@ -64,6 +84,13 @@ Config make_config_via_json(nlohmann::json& json) { config.jg_info_dump = serialized; } + if (json.contains("tex_dump_file")) { + auto json_data = file_util::read_text_file( + file_util::get_file_path({json.at("tex_dump_file").get()})); + std::unordered_map serialized = parse_commented_json(json_data, "tex_dump_file"); + config.texture_info_dump = serialized; + } + if (json.contains("obj_file_name_map_file")) { config.obj_file_name_map_file = json.at("obj_file_name_map_file").get(); } @@ -73,6 +100,7 @@ Config make_config_via_json(nlohmann::json& json) { config.write_scripts = json.at("write_scripts").get(); config.disassemble_data = json.at("disassemble_data").get(); config.process_tpages = json.at("process_tpages").get(); + config.write_tpage_imports = json.at("write_tpage_imports").get(); config.process_game_text = json.at("process_game_text").get(); config.process_game_count = json.at("process_game_count").get(); config.process_art_groups = json.at("process_art_groups").get(); @@ -84,6 +112,7 @@ Config make_config_via_json(nlohmann::json& json) { } config.dump_art_group_info = json.at("dump_art_group_info").get(); config.dump_joint_geo_info = json.at("dump_joint_geo_info").get(); + config.dump_tex_info = json.at("dump_tex_info").get(); config.hexdump_code = json.at("hexdump_code").get(); config.hexdump_data = json.at("hexdump_data").get(); config.find_functions = json.at("find_functions").get(); @@ -359,9 +388,9 @@ Config read_config_file(const fs::path& path_to_config_file, // Then, update any config overrides if (override_json != "{}" && !override_json.empty()) { - lg::info("Config Overide: '{}'", override_json); + lg::info("Config Override: '{}'", override_json); auto cfg_override = parse_commented_json(override_json, ""); - json.update(cfg_override); + json.update(cfg_override, true); } // debugging, dump the JSON config to a file diff --git a/decompiler/config.h b/decompiler/config.h index fe17380350..01ddca559a 100644 --- a/decompiler/config.h +++ b/decompiler/config.h @@ -11,8 +11,11 @@ #include "common/versions/versions.h" #include "decompiler/Disasm/Register.h" +#include "decompiler/data/TextureDB.h" #include "decompiler/data/game_text.h" +#include "third-party/json.hpp" + namespace decompiler { struct RegisterTypeCast { int atomic_op_idx = -1; @@ -98,6 +101,7 @@ struct Config { std::vector object_file_names; std::vector str_file_names; std::vector str_texture_file_names; + std::vector str_art_file_names; std::string audio_dir_file_name; std::vector streamed_audio_file_names; @@ -110,6 +114,7 @@ struct Config { bool write_scripts = false; bool disassemble_data = false; bool process_tpages = false; + bool write_tpage_imports = false; bool process_game_text = false; bool process_game_count = false; bool process_art_groups = false; @@ -117,6 +122,7 @@ struct Config { bool process_subtitle_images = false; bool dump_art_group_info = false; bool dump_joint_geo_info = false; + bool dump_tex_info = false; bool rip_levels = false; bool extract_collision = false; bool find_functions = false; @@ -176,6 +182,7 @@ struct Config { art_group_file_override; std::unordered_map> art_group_info_dump; std::unordered_map> jg_info_dump; + std::unordered_map texture_info_dump; std::unordered_map joint_node_hacks; std::unordered_map process_stack_size_overrides; @@ -188,4 +195,7 @@ Config read_config_file(const fs::path& path_to_config_file, const std::string& config_game_version, const std::string& override_json = "{}"); +void from_json(const nlohmann::json& j, TexInfo& info); +void to_json(nlohmann::json& j, const TexInfo& info); + } // namespace decompiler diff --git a/decompiler/config/jak1/jak1_config.jsonc b/decompiler/config/jak1/jak1_config.jsonc index 94c53c73c7..b8d20a4310 100644 --- a/decompiler/config/jak1/jak1_config.jsonc +++ b/decompiler/config/jak1/jak1_config.jsonc @@ -34,6 +34,8 @@ // unpack textures to assets folder "process_tpages": true, + // write goal imports for tpages and textures + "write_tpage_imports": false, // unpack game text to assets folder "process_game_text": true, // unpack game count to assets folder @@ -44,6 +46,8 @@ "dump_art_group_info": false, // write out a json file containing the joint node mapping, run this with all objects allowed "dump_joint_geo_info": false, + // write out a json file containing tpage and texture mappings, run with all objects allowed + "dump_tex_info": false, /////////////////////////// // WEIRD OPTIONS @@ -91,6 +95,7 @@ "all_types_file": "decompiler/config/jak1/all-types.gc", "art_group_dump_file": "decompiler/config/jak1/ntsc_v1/art-group-info.min.json", "joint_node_dump_file": "decompiler/config/jak1/ntsc_v1/joint-node-info.min.json", + "tex_dump_file": "decompiler/config/jak1/ntsc_v1/tex-info.min.json", "process_stack_size_file": "decompiler/config/jak1/ntsc_v1/process_stack_size_overrides.jsonc", // optional: a predetermined object file name map from a file. diff --git a/decompiler/config/jak1/ntsc_v1/tex-info.min.json b/decompiler/config/jak1/ntsc_v1/tex-info.min.json new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/decompiler/config/jak1/ntsc_v1/tex-info.min.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/decompiler/config/jak2/jak2_config.jsonc b/decompiler/config/jak2/jak2_config.jsonc index 6446674487..460731425c 100644 --- a/decompiler/config/jak2/jak2_config.jsonc +++ b/decompiler/config/jak2/jak2_config.jsonc @@ -34,6 +34,8 @@ // unpack textures to assets folder "process_tpages": true, + // write goal imports for tpages and textures + "write_tpage_imports": false, // unpack game text to assets folder "process_game_text": true, // unpack game count to assets folder @@ -44,6 +46,8 @@ "dump_art_group_info": false, // write out a json file containing the joint node mapping, run this with all objects allowed "dump_joint_geo_info": false, + // write out a json file containing tpage and texture mappings, run with all objects allowed + "dump_tex_info": false, // set to false to skip adding .STR files to the decompiler database "read_spools": false, @@ -101,6 +105,7 @@ "all_types_file": "decompiler/config/jak2/all-types.gc", "art_group_dump_file": "decompiler/config/jak2/ntsc_v1/art-group-info.min.json", "joint_node_dump_file": "decompiler/config/jak2/ntsc_v1/joint-node-info.min.json", + "tex_dump_file": "decompiler/config/jak2/ntsc_v1/tex-info.min.json", "process_stack_size_file": "decompiler/config/jak2/ntsc_v1/process_stack_size_overrides.jsonc", // optional: a predetermined object file name map from a file. diff --git a/decompiler/config/jak2/ntsc_v1/tex-info.min.json b/decompiler/config/jak2/ntsc_v1/tex-info.min.json new file mode 100644 index 0000000000..0637a088a0 --- /dev/null +++ b/decompiler/config/jak2/ntsc_v1/tex-info.min.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/decompiler/config/jak3/all-types.gc b/decompiler/config/jak3/all-types.gc index cdf64fcfee..caf1b19124 100644 --- a/decompiler/config/jak3/all-types.gc +++ b/decompiler/config/jak3/all-types.gc @@ -19,6 +19,7 @@ (define-extern boolean type) ;; not actually added as a runtime type in jak2, but valid? supports it. (define-extern uint16 type) (define-extern uint32 type) +(define-extern int8 type) (define-extern int32 type) (define-extern int64 type) (define-extern uint8 type) @@ -29,6 +30,7 @@ (define-extern global kheap) (define-extern kheap type) (define-extern pointer type) +(define-extern string type) (define-extern #t symbol) (define-extern #f symbol) @@ -99,7 +101,7 @@ (define-extern file-stream-write (function file-stream pointer uint uint)) (define-extern file-stream-close (function file-stream file-stream)) (define-extern new-dynamic-structure (function symbol type int structure)) -(define-extern kernel-shutdown (function none)) +(define-extern kernel-shutdown (function int none)) (define-extern scf-get-timeout (function int)) (define-extern scf-get-inactive-timeout (function int)) (define-extern syncv (function int int)) @@ -821,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 @@ -831,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 @@ -1797,13 +1800,13 @@ "A 4x4 matrix, stored in row-major order. some, but not all, functions assume that a matrix is an affine transform. others assume that the rotation has no scale or shear (and that its inverse is its transpose)." - ((data float 16 :offset-assert 0 :score -2) ;; guessed by decompiler - (vector vector 4 :offset 0 :score -1) ;; guessed by decompiler - (quad uint128 4 :offset 0) ;; guessed by decompiler - (rvec vector :inline :offset 0 :score 1) - (uvec vector :inline :offset 16 :score 1) - (fvec vector :inline :offset 32 :score 1) - (trans vector :inline :offset 48 :score 1) + ((data float 16 :offset-assert 0 :score -3) ;; guessed by decompiler + (vector vector 4 :inline :offset 0 :score -2) ;; guessed by decompiler + (quad uint128 4 :offset 0 :score -1) ;; guessed by decompiler + (rvec vector :inline :offset 0 :score 0) + (uvec vector :inline :offset 16 :score 0) + (fvec vector :inline :offset 32 :score 0) + (trans vector :inline :offset 48 :score 0) ) :method-count-assert 10 :size-assert #x40 @@ -2263,16 +2266,16 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define-extern matrix-fur-compose (function matrix vector vector vector matrix)) -(define-extern matrix-fu-compose (function matrix vector vector vector matrix)) -(define-extern matrix-fr-compose (function matrix vector vector vector matrix)) +(define-extern matrix-fu-compose (function matrix vector vector matrix)) +(define-extern matrix-fr-compose (function matrix vector vector matrix)) (define-extern matrix-ur-compose (function matrix vector vector vector matrix)) -(define-extern matrix-f-u-compose (function matrix vector vector vector matrix)) -(define-extern matrix-f-r-compose (function matrix vector vector vector matrix)) -(define-extern matrix-u-f-compose (function matrix vector vector vector matrix)) +(define-extern matrix-f-u-compose (function matrix vector vector matrix)) +(define-extern matrix-f-r-compose (function matrix vector vector matrix)) +(define-extern matrix-u-f-compose (function matrix vector vector matrix)) (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 vector vector matrix)) +(define-extern matrix-f-compose (function matrix vector float matrix)) (define-extern matrix-u-compose (function matrix vector vector vector matrix)) (define-extern matrix-r-compose (function matrix vector vector vector matrix)) @@ -2646,6 +2649,7 @@ (reg1) (reg2) (unk) + (unk2) ) (defenum stream-status @@ -3002,9 +3006,23 @@ :flag-assert #x90000004c ) +(defenum sound-bank-mode + :type uint32 + (none 0) + (unknown 1) + (common 2) + (mode 3) + (full 4) + (half 5) + (halfa 6) + (halfb 7) + (halfc 8) + (virtual 9) + ) + (deftype sound-bank-state (structure) ((name symbol :offset-assert 0) - (mode uint32 :offset-assert 4) + (mode sound-bank-mode :offset-assert 4) ) :pack-me :method-count-assert 9 @@ -3518,7 +3536,7 @@ :type int32 (bucket0 0) (bucket1 1) - (bucket2 2) + (bucket2 2) ;; pc vis stuff (bucket3 3) ;; blit? (tex-lcom-sky-pre 4) (bucket5 5) ;; sky @@ -3528,363 +3546,363 @@ (bucket9 9) ;; hfrag (tex-l0-tfrag 10) ;; texture - (bucket11 11) ;; tfrag - (bucket12 12) ;; tie - (bucket13 13) ;; tie - (bucket14 14) ;; tfrag - (bucket15 15) ;; tie - (bucket16 16) ;; tie + (tfrag-l0-tfrag 11) ;; tfrag + (tie-l0-tfrag 12) ;; tie + (etie-l0-tfrag 13) ;; tie + (tfrag-scissor-l0-tfrag 14) ;; tfrag + (tie-scissor-l0-tfrag 15) ;; tie + (etie-scissor-l0-tfrag 16) ;; tie (merc-l0-tfrag 17) ;; merc (emerc-l0-tfrag 18) ;; emerc (gmerc-l0-tfrag 19) ;; generic - (bucket20 20) ;; tie + (tie-vanish-l0-tfrag 20) ;; tie (gmerc2-l0-tfrag 21) ;; generic (tex-l1-tfrag 22) - (bucket23 23) - (bucket24 24) - (bucket25 25) - (bucket26 26) - (bucket27 27) - (bucket28 28) + (tfrag-l1-tfrag 23) + (tie-l1-tfrag 24) + (etie-l1-tfrag 25) + (tfrag-scissor-l1-tfrag 26) + (tie-scissor-l1-tfrag 27) + (etie-scissor-l1-tfrag 28) (merc-l1-tfrag 29) (emerc-l1-tfrag 30) (gmerc-l1-tfrag 31) - (bucket32 32) + (tie-vanish-l1-tfrag 32) (gmerc2-l1-tfrag 33) (tex-l2-tfrag 34) - (bucket35 35) - (bucket36 36) - (bucket37 37) - (bucket38 38) - (bucket39 39) - (bucket40 40) + (tfrag-l2-tfrag 35) + (tie-l2-tfrag 36) + (etie-l2-tfrag 37) + (tfrag-scissor-l2-tfrag 38) + (tie-scissor-l2-tfrag 39) + (etie-scissor-l2-tfrag 40) (merc-l2-tfrag 41) (emerc-l2-tfrag 42) (gmerc-l2-tfrag 43) - (bucket44 44) + (tie-vanish-l2-tfrag 44) (gmerc2-l2-tfrag 45) (tex-l3-tfrag 46) - (bucket47 47) - (bucket48 48) - (bucket49 49) - (bucket50 50) - (bucket51 51) - (bucket52 52) + (tfrag-l3-tfrag 47) + (tie-l3-tfrag 48) + (etie-l3-tfrag 49) + (tfrag-scissor-l3-tfrag 50) + (tie-scissor-l3-tfrag 51) + (etie-scissor-l3-tfrag 52) (merc-l3-tfrag 53) (emerc-l3-tfrag 54) (gmerc-l3-tfrag 55) - (bucket56 56) + (tie-vanish-l3-tfrag 56) (gmerc2-l3-tfrag 57) (tex-l4-tfrag 58) - (bucket59 59) - (bucket60 60) - (bucket61 61) - (bucket62 62) - (bucket63 63) - (bucket64 64) + (tfrag-l4-tfrag 59) + (tie-l4-tfrag 60) + (etie-l4-tfrag 61) + (tfrag-scissor-l4-tfrag 62) + (tie-scissor-l4-tfrag 63) + (etie-scissor-l4-tfrag 64) (merc-l4-tfrag 65) (emerc-l4-tfrag 66) (gmerc-l4-tfrag 67) - (bucket68 68) + (tie-vanish-l4-tfrag 68) (gmerc2-l4-tfrag 69) (tex-l5-tfrag 70) - (bucket71 71) - (bucket72 72) - (bucket73 73) - (bucket74 74) - (bucket75 75) - (bucket76 76) + (tfrag-l5-tfrag 71) + (tie-l5-tfrag 72) + (etie-l5-tfrag 73) + (tfrag-scissor-l5-tfrag 74) + (tie-scissor-l5-tfrag 75) + (etie-scissor-l5-tfrag 76) (merc-l5-tfrag 77) (emerc-l5-tfrag 78) (gmerc-l5-tfrag 79) - (bucket80 80) + (tie-vanish-l5-tfrag 80) (gmerc2-l5-tfrag 81) (tex-l6-tfrag 82) - (bucket83 83) - (bucket84 84) - (bucket85 85) - (bucket86 86) - (bucket87 87) - (bucket88 88) + (tfrag-l6-tfrag 83) + (tie-l6-tfrag 84) + (etie-l6-tfrag 85) + (tfrag-scissor-l6-tfrag 86) + (tie-scissor-l6-tfrag 87) + (etie-scissor-l6-tfrag 88) (merc-l6-tfrag 89) (emerc-l6-tfrag 90) (gmerc-l6-tfrag 91) - (bucket92 92) + (tie-vanish-l6-tfrag 92) (gmerc2-l6-tfrag 93) (tex-l7-tfrag 94) - (bucket95 95) - (bucket96 96) - (bucket97 97) - (bucket98 98) - (bucket99 99) - (bucket100 100) + (tfrag-l7-tfrag 95) + (tie-l7-tfrag 96) + (etie-l7-tfrag 97) + (tfrag-scissor-l7-tfrag 98) + (tie-scissor-l7-tfrag 99) + (etie-scissor-l7-tfrag 100) (merc-l7-tfrag 101) (emerc-l7-tfrag 102) (gmerc-l7-tfrag 103) - (bucket104 104) + (tie-vanish-l7-tfrag 104) (gmerc2-l7-tfrag 105) (tex-l8-tfrag 106) - (bucket107 107) - (bucket108 108) - (bucket109 109) - (bucket110 110) - (bucket111 111) - (bucket112 112) + (tfrag-l8-tfrag 107) + (tie-l8-tfrag 108) + (etie-l8-tfrag 109) + (tfrag-scissor-l8-tfrag 110) + (tie-scissor-l8-tfrag 111) + (etie-scissor-l8-tfrag 112) (merc-l8-tfrag 113) (emerc-l8-tfrag 114) (gmerc-l8-tfrag 115) - (bucket116 116) + (tie-vanish-l8-tfrag 116) (gmerc2-l8-tfrag 117) (tex-l9-tfrag 118) - (bucket119 119) - (bucket120 120) - (bucket121 121) - (bucket122 122) - (bucket123 123) - (bucket124 124) + (tfrag-l9-tfrag 119) + (tie-l9-tfrag 120) + (etie-l9-tfrag 121) + (tfrag-scissor-l9-tfrag 122) + (tie-scissor-l9-tfrag 123) + (etie-scissor-l9-tfrag 124) (merc-l9-tfrag 125) (emerc-l9-tfrag 126) (gmerc-l9-tfrag 127) - (bucket128 128) + (tie-vanish-l9-tfrag 128) (gmerc2-l9-tfrag 129) (tex-l0-shrub 130) - (bucket131 131) - (bucket132 132) - (bucket133 133) - (bucket134 134) - (bucket135 135) + (shrub-l0-shrub 131) + (shrub-near-l0-shrub 132) + (billboard-l0-shrub 133) + (shrub-vanish-l0-shrub 134) + (shrub-near-trans-l0-shrub 135) (merc-l0-shrub 136) (emerc-l0-shrub 137) (gmerc-l0-shrub 138) (gmerc2-l0-shrub 139) (tex-l1-shrub 140) - (bucket141 141) - (bucket142 142) - (bucket143 143) - (bucket144 144) - (bucket145 145) + (shrub-l1-shrub 141) + (shrub-near-l1-shrub 142) + (billboard-l1-shrub 143) + (shrub-vanish-l1-shrub 144) + (shrub-near-trans-l1-shrub 145) (merc-l1-shrub 146) (emerc-l1-shrub 147) (gmerc-l1-shrub 148) (gmerc2-l1-shrub 149) (tex-l2-shrub 150) - (bucket151 151) - (bucket152 152) - (bucket153 153) - (bucket154 154) - (bucket155 155) + (shrub-l2-shrub 151) + (shrub-near-l2-shrub 152) + (billboard-l2-shrub 153) + (shrub-vanish-l2-shrub 154) + (shrub-near-trans-l2-shrub 155) (merc-l2-shrub 156) (emerc-l2-shrub 157) (gmerc-l2-shrub 158) (gmerc2-l2-shrub 159) (tex-l3-shrub 160) - (bucket161 161) - (bucket162 162) - (bucket163 163) - (bucket164 164) - (bucket165 165) + (shrub-l3-shrub 161) + (shrub-near-l3-shrub 162) + (billboard-l3-shrub 163) + (shrub-vanish-l3-shrub 164) + (shrub-near-trans-l3-shrub 165) (merc-l3-shrub 166) (emerc-l3-shrub 167) (gmerc-l3-shrub 168) (gmerc2-l3-shrub 169) (tex-l4-shrub 170) - (bucket171 171) - (bucket172 172) - (bucket173 173) - (bucket174 174) - (bucket175 175) + (shrub-l4-shrub 171) + (shrub-near-l4-shrub 172) + (billboard-l4-shrub 173) + (shrub-vanish-l4-shrub 174) + (shrub-near-trans-l4-shrub 175) (merc-l4-shrub 176) (emerc-l4-shrub 177) (gmerc-l4-shrub 178) (gmerc2-l4-shrub 179) (tex-l5-shrub 180) - (bucket181 181) - (bucket182 182) - (bucket183 183) - (bucket184 184) - (bucket185 185) + (shrub-l5-shrub 181) + (shrub-near-l5-shrub 182) + (billboard-l5-shrub 183) + (shrub-vanish-l5-shrub 184) + (shrub-near-trans-l5-shrub 185) (merc-l5-shrub 186) (emerc-l5-shrub 187) (gmerc-l5-shrub 188) (gmerc2-l5-shrub 189) (tex-l6-shrub 190) - (bucket191 191) - (bucket192 192) - (bucket193 193) - (bucket194 194) - (bucket195 195) + (shrub-l6-shrub 191) + (shrub-near-l6-shrub 192) + (billboard-l6-shrub 193) + (shrub-vanish-l6-shrub 194) + (shrub-near-trans-l6-shrub 195) (merc-l6-shrub 196) (emerc-l6-shrub 197) (gmerc-l6-shrub 198) (gmerc2-l6-shrub 199) (tex-l7-shrub 200) - (bucket201 201) - (bucket202 202) - (bucket203 203) - (bucket204 204) - (bucket205 205) + (shrub-l7-shrub 201) + (shrub-near-l7-shrub 202) + (billboard-l7-shrub 203) + (shrub-vanish-l7-shrub 204) + (shrub-near-trans-l7-shrub 205) (merc-l7-shrub 206) (emerc-l7-shrub 207) (gmerc-l7-shrub 208) (gmerc2-l7-shrub 209) (tex-l8-shrub 210) - (bucket211 211) - (bucket212 212) - (bucket213 213) - (bucket214 214) - (bucket215 215) + (shrub-l8-shrub 211) + (shrub-near-l8-shrub 212) + (billboard-l8-shrub 213) + (shrub-vanish-l8-shrub 214) + (shrub-near-trans-l8-shrub 215) (merc-l8-shrub 216) (emerc-l8-shrub 217) (gmerc-l8-shrub 218) (gmerc2-l8-shrub 219) (tex-l9-shrub 220) - (bucket221 221) - (bucket222 222) - (bucket223 223) - (bucket224 224) - (bucket225 225) + (shrub-l9-shrub 221) + (shrub-near-l9-shrub 222) + (billboard-l9-shrub 223) + (shrub-vanish-l9-shrub 224) + (shrub-near-trans-l9-shrub 225) (merc-l9-shrub 226) (emerc-l9-shrub 227) (gmerc-l9-shrub 228) (gmerc2-l9-shrub 229) (tex-l0-alpha 230) - (bucket231 231) - (bucket232 232) - (bucket233 233) + (tfrag-l0-alpha 231) + (tie-l0-alpha 232) + (etie-l0-alpha 233) (merc-l0-alpha 234) (emerc-l0-alpha 235) (gmerc-l0-alpha 236) - (bucket237 237) - (bucket238 238) - (bucket239 239) + (tfrag-scissor-l0-alpha 237) + (tie-scissor-l0-alpha 238) + (etie-scissor-l0-alpha 239) (gmerc2-l0-alpha 240) (tex-l1-alpha 241) - (bucket242 242) - (bucket243 243) - (bucket244 244) + (tfrag-l1-alpha 242) + (tie-l1-alpha 243) + (etie-l1-alpha 244) (merc-l1-alpha 245) (emerc-l1-alpha 246) (gmerc-l1-alpha 247) - (bucket248 248) - (bucket249 249) - (bucket250 250) + (tfrag-scissor-l1-alpha 248) + (tie-scissor-l1-alpha 249) + (etie-scissor-l1-alpha 250) (gmerc2-l1-alpha 251) (tex-l2-alpha 252) - (bucket253 253) - (bucket254 254) - (bucket255 255) + (tfrag-l2-alpha 253) + (tie-l2-alpha 254) + (etie-l2-alpha 255) (merc-l2-alpha 256) (emerc-l2-alpha 257) (gmerc-l2-alpha 258) - (bucket259 259) - (bucket260 260) - (bucket261 261) + (tfrag-scissor-l2-alpha 259) + (tie-scissor-l2-alpha 260) + (etie-scissor-l2-alpha 261) (gmerc2-l2-alpha 262) (tex-l3-alpha 263) - (bucket264 264) - (bucket265 265) - (bucket266 266) + (tfrag-l3-alpha 264) + (tie-l3-alpha 265) + (etie-l3-alpha 266) (merc-l3-alpha 267) (emerc-l3-alpha 268) (gmerc-l3-alpha 269) - (bucket270 270) - (bucket271 271) - (bucket272 272) + (tfrag-scissor-l3-alpha 270) + (tie-scissor-l3-alpha 271) + (etie-scissor-l3-alpha 272) (gmerc2-l3-alpha 273) (tex-l4-alpha 274) - (bucket275 275) - (bucket276 276) - (bucket277 277) + (tfrag-l4-alpha 275) + (tie-l4-alpha 276) + (etie-l4-alpha 277) (merc-l4-alpha 278) (emerc-l4-alpha 279) (gmerc-l4-alpha 280) - (bucket281 281) - (bucket282 282) - (bucket283 283) + (tfrag-scissor-l4-alpha 281) + (tie-scissor-l4-alpha 282) + (etie-scissor-l4-alpha 283) (gmerc2-l4-alpha 284) (tex-l5-alpha 285) - (bucket286 286) - (bucket287 287) - (bucket288 288) + (tfrag-l5-alpha 286) + (tie-l5-alpha 287) + (etie-l5-alpha 288) (merc-l5-alpha 289) (emerc-l5-alpha 290) (gmerc-l5-alpha 291) - (bucket292 292) - (bucket293 293) - (bucket294 294) + (tfrag-scissor-l5-alpha 292) + (tie-scissor-l5-alpha 293) + (etie-scissor-l5-alpha 294) (gmerc2-l5-alpha 295) (tex-l6-alpha 296) - (bucket297 297) - (bucket298 298) - (bucket299 299) + (tfrag-l6-alpha 297) + (tie-l6-alpha 298) + (etie-l6-alpha 299) (merc-l6-alpha 300) (emerc-l6-alpha 301) (gmerc-l6-alpha 302) - (bucket303 303) - (bucket304 304) - (bucket305 305) + (tfrag-scissor-l6-alpha 303) + (tie-scissor-l6-alpha 304) + (etie-scissor-l6-alpha 305) (gmerc2-l6-alpha 306) (tex-l7-alpha 307) - (bucket308 308) - (bucket309 309) - (bucket310 310) + (tfrag-l7-alpha 308) + (tie-l7-alpha 309) + (etie-l7-alpha 310) (merc-l7-alpha 311) (emerc-l7-alpha 312) (gmerc-l7-alpha 313) - (bucket314 314) - (bucket315 315) - (bucket316 316) + (tfrag-scissor-l7-alpha 314) + (tie-scissor-l7-alpha 315) + (etie-scissor-l7-alpha 316) (gmerc2-l7-alpha 317) (tex-l8-alpha 318) - (bucket319 319) - (bucket320 320) - (bucket321 321) + (tfrag-l8-alpha 319) + (tie-l8-alpha 320) + (etie-l8-alpha 321) (merc-l8-alpha 322) (emerc-l8-alpha 323) (gmerc-l8-alpha 324) - (bucket325 325) - (bucket326 326) - (bucket327 327) + (tfrag-scissor-l8-alpha 325) + (tie-scissor-l8-alpha 326) + (etie-scissor-l8-alpha 327) (gmerc2-l8-alpha 328) (tex-l9-alpha 329) - (bucket330 330) - (bucket331 331) - (bucket332 332) + (tfrag-l9-alpha 330) + (tie-l9-alpha 331) + (etie-l9-alpha 332) (merc-l9-alpha 333) (emerc-l9-alpha 334) (gmerc-l9-alpha 335) - (bucket336 336) - (bucket337 337) - (bucket338 338) + (tfrag-scissor-l9-alpha 336) + (tie-scissor-l9-alpha 337) + (etie-scissor-l9-alpha 338) (gmerc2-l9-alpha 339) (tex-lcom-tfrag 340) @@ -4039,111 +4057,111 @@ (tex-l0-water 463) (merc-l0-water 464) (gmerc-l0-water 465) - (bucket466 466) - (bucket467 467) - (bucket468 468) - (bucket469 469) - (bucket470 470) - (bucket471 471) + (tfrag-l0-water 466) + (tie-l0-water 467) + (etie-l0-water 468) + (tie-scissor-l0-water 469) + (tfrag-scissor-l0-water 470) + (etie-scissor-l0-water 471) (gmerc2-l0-water 472) (tex-l1-water 473) (merc-l1-water 474) (gmerc-l1-water 475) - (bucket476 476) - (bucket477 477) - (bucket478 478) - (bucket479 479) - (bucket480 480) - (bucket481 481) + (tfrag-l1-water 476) + (tie-l1-water 477) + (etie-l1-water 478) + (tie-scissor-l1-water 479) + (tfrag-scissor-l1-water 480) + (etie-scissor-l1-water 481) (gmerc2-l1-water 482) (tex-l2-water 483) (merc-l2-water 484) (gmerc-l2-water 485) - (bucket486 486) - (bucket487 487) - (bucket488 488) - (bucket489 489) - (bucket490 490) - (bucket491 491) + (tfrag-l2-water 486) + (tie-l2-water 487) + (etie-l2-water 488) + (tie-scissor-l2-water 489) + (tfrag-scissor-l2-water 490) + (etie-scissor-l2-water 491) (gmerc2-l2-water 492) (tex-l3-water 493) (merc-l3-water 494) (gmerc-l3-water 495) - (bucket496 496) - (bucket497 497) - (bucket498 498) - (bucket499 499) - (bucket500 500) - (bucket501 501) + (tfrag-l3-water 496) + (tie-l3-water 497) + (etie-l3-water 498) + (tie-scissor-l3-water 499) + (tfrag-scissor-l3-water 500) + (etie-scissor-l3-water 501) (gmerc2-l3-water 502) (tex-l4-water 503) (merc-l4-water 504) (gmerc-l4-water 505) - (bucket506 506) - (bucket507 507) - (bucket508 508) - (bucket509 509) - (bucket510 510) - (bucket511 511) + (tfrag-l4-water 506) + (tie-l4-water 507) + (etie-l4-water 508) + (tie-scissor-l4-water 509) + (tfrag-scissor-l4-water 510) + (etie-scissor-l4-water 511) (gmerc2-l4-water 512) (tex-l5-water 513) (merc-l5-water 514) (gmerc-l5-water 515) - (bucket516 516) - (bucket517 517) - (bucket518 518) - (bucket519 519) - (bucket520 520) - (bucket521 521) + (tfrag-l5-water 516) + (tie-l5-water 517) + (etie-l5-water 518) + (tie-scissor-l5-water 519) + (tfrag-scissor-l5-water 520) + (etie-scissor-l5-water 521) (gmerc2-l5-water 522) (tex-l6-water 523) (merc-l6-water 524) (gmerc-l6-water 525) - (bucket526 526) - (bucket527 527) - (bucket528 528) - (bucket529 529) - (bucket530 530) - (bucket531 531) + (tfrag-l6-water 526) + (tie-l6-water 527) + (etie-l6-water 528) + (tie-scissor-l6-water 529) + (tfrag-scissor-l6-water 530) + (etie-scissor-l6-water 531) (gmerc2-l6-water 532) (tex-l7-water 533) (merc-l7-water 534) (gmerc-l7-water 535) - (bucket536 536) - (bucket537 537) - (bucket538 538) - (bucket539 539) - (bucket540 540) - (bucket541 541) + (tfrag-l7-water 536) + (tie-l7-water 537) + (etie-l7-water 538) + (tie-scissor-l7-water 539) + (tfrag-scissor-l7-water 540) + (etie-scissor-l7-water 541) (gmerc2-l7-water 542) (tex-l8-water 543) (merc-l8-water 544) (gmerc-l8-water 545) - (bucket546 546) - (bucket547 547) - (bucket548 548) - (bucket549 549) - (bucket550 550) - (bucket551 551) + (tfrag-l8-water 546) + (tie-l8-water 547) + (etie-l8-water 548) + (tie-scissor-l8-water 549) + (tfrag-scissor-l8-water 550) + (etie-scissor-l8-water 551) (gmerc2-l8-water 552) (tex-l9-water 553) (merc-l9-water 554) (gmerc-l9-water 555) - (bucket556 556) - (bucket557 557) - (bucket558 558) - (bucket559 559) - (bucket560 560) - (bucket561 561) + (tfrag-l9-water 556) + (tie-l9-water 557) + (etie-l9-water 558) + (tie-scissor-l9-water 559) + (tfrag-scissor-l9-water 560) + (etie-scissor-l9-water 561) (gmerc2-l9-water 562) (tex-lcom-water 563) @@ -4169,9 +4187,9 @@ (tex-hud-pris2 580) (hud-draw-pris2 581) (bucket582 582) - (bucket583 583) + (debug 583) (debug-no-zbuf2 584) - (bucket585 585) + (debug-menu 585) (bucket586 586) ) @@ -4208,45 +4226,45 @@ ;; ---vu1-user-h:texture-enable-mask-u32 ;; +++vu1-user-h:vu1-renderer-mask -;; TODO stolen from Jak 2 +;; TODO stolen from Jak 2 (and it was all wrong...) (defenum vu1-renderer-mask :type uint64 :bitfield #t (rn0) (rn1) (rn2) - (sky) - (ocean) - (ocean-wave) + (rn3) + (rn4) + (rn5) + (rn6) + (rn7) (tfrag) - (tie) - (tie-envmap) (tie-scissor) - (tie-envmap-scissor) + (tie) + (etie) + (etie-scissor) (tie-vanish) + (generic) ;; right + (merc) ;; right + (emerc) ;; right (shrubbery) (shrub-near) - (generic) - (merc) - (emerc) (billboard) - (shrubbery-vanish) + (shrub-vanish) (tfrag-trans) (tie-scissor-trans) (tie-trans) - (tie-envmap-trans) - (tie-envmap-scissor-trans) + (etie-trans) + (etie-scissor-trans) (tfrag-water) (tie-scissor-water) (tie-water) - (tie-envmap-water) - (tie-envmap-scissor-water) + (etie-water) + (etie-scissor-water) (sprite) - (shadow) - (rn31) (rn32) (rn33) - (depth-cue) + (rn34) (rn35) (rn36) (rn37) @@ -4473,6 +4491,7 @@ (base pointer :offset-assert 8) ;; guessed by decompiler (end pointer :offset-assert 12) ;; guessed by decompiler (real-buffer-end int32 :offset-assert 16) + (data-buffer uint8 :dynamic :offset 16) ;; added (data uint64 1 :offset 32) ;; guessed by decompiler ) (:methods @@ -5627,8 +5646,8 @@ ((on-screen int32 :offset-assert 4) (last-screen int32 :offset-assert 8) (frames display-frame 2 :offset-assert 12) ;; guessed by decompiler - (bgcolor uint64 :offset-assert 24) ;; gs-bgcolor - (pmode uint64 :offset-assert 32) ;; gs-pmode + (bgcolor gs-bgcolor :offset-assert 24) + (pmode gs-pmode :offset-assert 32) (clock clock 22 :offset-assert 40) ;; guessed by decompiler (session-clock clock :offset 40) ;; guessed by decompiler (game-clock clock :offset 44) ;; guessed by decompiler @@ -6629,11 +6648,14 @@ (miptbp1 gs-miptbp :offset 32) ;; (clamp gs-clamp :offset 48) ;; gs-clamp (clamp-reg gs-reg64 :offset 56) ;; - (alpha gs-alpha :offset 64) ;; + (alpha gs-miptbp :offset 64) ;; (link-test link-test-flags :offset 8) ;; guessed by decompiler (texture-id texture-id :offset 24) ;; guessed by decompiler (next shader-ptr :offset 40) ;; guessed by decompiler ;(alpha-as-miptb2 gs-miptbp :offset 64) ;; added!! + (alpha-as-miptb2 gs-miptbp :offset 64) + (reg-4-u32 gs-reg32 :offset 72) + ) :method-count-assert 9 :size-assert #x50 @@ -6864,7 +6886,7 @@ (alpha-near float :offset-assert 124) (alpha-far float :offset-assert 128) (alpha-delta float :offset-assert 132) - (color uint32 :offset-assert 136) + (color rgba :offset-assert 136) ) :method-count-assert 9 :size-assert #x8c @@ -6922,7 +6944,7 @@ (bytes uint8 4 :offset 60) ;; guessed by decompiler (mask uint16 :offset 60) (palette-index int8 :offset 63) - (shadow uint32 :offset 32) + (shadow uint32 :offset 32 :score 1) ) :method-count-assert 9 :size-assert #x40 @@ -6933,6 +6955,7 @@ ((index uint16 :offset-assert 0) (count uint16 :offset-assert 2) ) + :pack-me :method-count-assert 9 :size-assert #x4 :flag-assert #x900000004 @@ -6983,7 +7006,7 @@ (deftype mood-channel (structure) ((data float 24 :offset-assert 0) ;; guessed by decompiler - (vecs vector4 6 :offset 0) ;; guessed by decompiler + (vecs vector4 6 :inline :offset 0) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x60 @@ -7014,6 +7037,7 @@ (deftype mood-fog-table (structure) ((data mood-fog 8 :inline :offset-assert 0) ;; guessed by decompiler + (_data uint128 24 :offset 0 :score -1) ) :method-count-assert 9 :size-assert #x180 @@ -7039,6 +7063,7 @@ (deftype mood-color-table (structure) ((data mood-color 8 :inline :offset-assert 0) ;; guessed by decompiler + (_data uint128 16 :offset 0 :score -1) ) :method-count-assert 9 :size-assert #x100 @@ -7124,6 +7149,7 @@ ((time float :offset-assert 0) (fade float :offset-assert 4) ) + :pack-me :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 @@ -7133,6 +7159,7 @@ ((flicker-off uint8 :offset-assert 0) (flicker-on uint8 :offset-assert 1) ) + :allow-misaligned :method-count-assert 9 :size-assert #x2 :flag-assert #x900000002 @@ -7152,6 +7179,7 @@ ((value float :offset-assert 0) (scale float :offset-assert 4) ) + :pack-me :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 @@ -7163,6 +7191,7 @@ (target-brightness float :offset-assert 8) (speed float :offset-assert 12) ) + :pack-me :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 @@ -7182,6 +7211,7 @@ (length uint8 :offset-assert 5) (height uint8 :offset-assert 6) ) + :pack-me :method-count-assert 9 :size-assert #x7 :flag-assert #x900000007 @@ -7218,6 +7248,7 @@ (deftype mood-context (mood-context-core3) ((itimes vector4w 4 :inline :offset-assert 1776) ;; guessed by decompiler (state uint32 32 :offset-assert 1840) ;; guessed by decompiler + (data uint128 123 :offset 0 :score -1) ) :method-count-assert 9 :size-assert #x7b0 @@ -7279,10 +7310,10 @@ :size-assert #x118 :flag-assert #x1900000118 (:methods - (mood-control-method-9 () none) ;; 9 ;; (init-weather! (_type_) none) - (mood-control-method-10 () none) ;; 10 ;; (update-mood-weather! (_type_ float float float float) none) - (mood-control-method-11 () none) ;; 11 ;; (update-mood-range! (_type_ float float float float) none) - (mood-control-method-12 () none) ;; 12 ;; (set-time-for-random-weather! (_type_ float float) none) + (init-weather! (_type_) none) ;; 9 + (set-cloud-and-fog-interp! (_type_ float float float float) none) ;; 10 ;; (update-mood-weather! (_type_ float float float float) none) + (update-mood-range! (_type_ float float float float) none) ;; 11 + (set-time-for-random-weather! (_type_ float float) none) ;; 12 (set-special-interps! "Sets the `*-special-interp` values with the given values @param! this The [[mood-control]] @@ -7290,20 +7321,20 @@ @param rate-interp Value to set [[this::rate-special-interp]] @param set-current-interp? Uses `target-interp` to set [[this::current-special-interp] @returns [[none]]" - (_type_ float float symbol) none) ;; 13 ;; (apply-mood-clouds-and-fog (_type_ mood-control-work) none) + (_type_ float float symbol) none) ;; 13 (weather-event-concluded? ;; TODO - guess at name "@returns [[#t]] if [[this::override-weather-flag]] is set, we aren't in a cutscene and [[this::current-special-interp]] is equal to `0.0`" (_type_) symbol) ;; 14 ;; (apply-mood-color (_type_ mood-control-work) none) - (mood-control-method-15 () none) ;; 15 ;; (apply-mood-channels (_type_ mood-control-work) none) - (mood-control-method-16 () none) ;; 16 ;; (adjust-num-clouds! (_type_ mood-control-work) none) - (mood-control-method-17 () none) ;; 17 ;; (gen-lightning-and-thunder! (_type_) number) - (mood-control-method-18 () none) ;; 18 ;; (play-or-stop-lightning! (_type_ sound-spec vector) sound-id) - (mood-control-method-19 () none) ;; 19 - (mood-control-method-20 () none) ;; 20 - (mood-control-method-21 () none) ;; 21 - (mood-control-method-22 () none) ;; 22 - (mood-control-method-23 () none) ;; 23 - (mood-control-method-24 () none) ;; 24 + (set-lightning-time! (_type_ int int float) none) ;; 15 ;; (apply-mood-channels (_type_ mood-control-work) none) + (apply-mood-clouds-and-fog (_type_ mood-control-work) none) ;; 16 ;; (adjust-num-clouds! (_type_ mood-control-work) none) + (apply-mood-fog (_type_ mood-control-work mood-color-table mood-color-table mood-color-table float) none) ;; 17 + (apply-fog-height (_type_ mood-control-work float float float float) none) ;; 18 + (apply-mood-colors (_type_ mood-control-work) none) ;; 19 + (mood-control-method-20 (_type_ mood-control-work mood-color-table mood-color-table mood-color-table float) none) ;; 20 + (apply-mood-channels (_type_ mood-control-work) none) ;; 21 + (adjust-num-clouds (_type_ mood-control-work) none) ;; 22 + (gen-lightning-and-thunder! (_type_ int) none) ;; 23 + (play-or-stop-lightning-sfx! (_type_ sound-spec vector) none) ;; 24 ) ) @@ -7374,9 +7405,9 @@ ) (deftype level-borrow-info (basic) - ((alias symbol :offset-assert 4) + ((alias object :offset-assert 4) (borrow-size uint16 5 :offset-assert 8) - (borrow-info symbol 5 :offset-assert 20) + (borrow-info object 5 :offset-assert 20) ) :method-count-assert 9 :size-assert #x28 @@ -7432,6 +7463,19 @@ (movie0 16) (movie1 17) (movie2 18) + (tm19 19) + (tm20 20) + (tm21 21) + (tm22 22) + (tm23 23) + (tm24 24) + (tm25 25) + (tm26 26) + (tm27 27) + (tm28 28) + (tm29 29) + (tm30 30) + (tm31 31) ) ;; ---level-h:task-mask @@ -7479,7 +7523,7 @@ (lf7 7) (lf8 8) (lf9 9) - (lf10 10) + (use-camera-other 10) (lf11 11) (lf12 12) (lf13 13) @@ -7545,6 +7589,14 @@ ) ;; ---level-h:city-map-bits +(defenum level-callback-slot + :type uint32 + (level-birth-1 33) + (level-unload 34) + (level-birth-2 35) + (level-deactivate 36) + ) + (deftype level-load-info (basic) ((name-list symbol 6 :offset-assert 4) ;; guessed by decompiler (name symbol :offset 4) ;; guessed by decompiler @@ -7590,8 +7642,8 @@ :flag-assert #xb000000a0 ;; field extra-sound-bank uses ~A with a signed load. (:methods - (level-load-info-method-9 (_type_ int) object) ;; 9 - (level-load-info-method-10 (_type_) none) ;; 10 + (get-callback-symbol-value-by-slot! "Look up value of symbol in callback-list with the given int as the car. Print warning if symbol's value is 0." (_type_ int) object) ;; 9 + (get-callback-by-slot! "Look up value in callback-list with the given int as the car and return it. Doesn't derefence the symbol." (_type_ int) object) ;; 10 ) ) @@ -7611,6 +7663,7 @@ (declare-type light-hash basic) (declare-type engine basic) (declare-type game-text-info structure) +(declare-type text-id uint32) (deftype level (basic) ((name symbol :offset-assert 4) ;; guessed by decompiler (load-name symbol :offset-assert 8) ;; guessed by decompiler @@ -7629,6 +7682,12 @@ (loaded-texture-page-count int32 :offset-assert 300) (entity entity-links-array :offset-assert 304) ;; guessed by decompiler (closest-object meters 10 :offset-assert 308) + (tie-min-dist float :offset 352) + (fg-tfrag-min-dist float :offset-assert 356) + (fg-prim-min-dist float :offset-assert 360) + (fg-shrub-min-dist float :offset-assert 364) + (fg-warp-min-dist float :offset 372) + (fg-prim2-min-dist float :offset 380) ;; ??? (upload-size int32 20 :offset 388) ;; guessed by decompiler (inside-boxes? basic :offset-assert 468) @@ -7674,7 +7733,7 @@ (alpha-dists pointer :offset-assert 5188) ;; guessed by decompiler (water-masks texture-masks-array :offset-assert 5192) ;; guessed by decompiler (water-dists pointer :offset-assert 5196) ;; guessed by decompiler - (tfrag-last-calls int32 6 :offset-assert 5200) ;; guessed by decompiler + (tfrag-last-calls uint32 6 :offset-assert 5200) ;; guessed by decompiler (texture-anim-array texture-anim-array 11 :offset-assert 5224) ;; guessed by decompiler (light-hash light-hash :offset-assert 5268) ;; guessed by decompiler (draw-priority float :offset-assert 5272) @@ -7695,27 +7754,31 @@ :size-assert #x152c :flag-assert #x1e0000152c (:methods - (level-method-9 () none) ;; 9 ;; (deactivate (_type_) _type_) - (level-method-10 () none) ;; 10 ;; (is-object-visible? (_type_ int) symbol) - (level-method-11 () none) ;; 11 ;; (level-method-11 () none) - (level-method-12 () none) ;; 12 ;; (unload! (_type_) _type_) - (level-method-13 () none) ;; 13 ;; (bsp-name (_type_) symbol) + (deactivate "Keep a level in memory, but kill entities and stop drawing it." (_type_) _type_) ;; 9 + (unload! "Remove level from memory." (_type_) _type_) ;; 10 + (is-object-visible? "Look up object visibility from bit-string." (_type_ int) symbol) ;; 11 + (level-method-12 () none) ;; 12 + (bsp-name "Try getting the name from the BSP. If that fails, return the level's name (typically the same)." (_type_) symbol) ;; 13 (compute-memory-usage! (_type_ symbol) memory-usage-block) ;; 14 - (level-method-15 () none) ;; 15 ;; (inside-boxes-check (_type_ vector) symbol) - (update-vis! (_type_ level-vis-info uint (pointer uint8)) symbol) ;; 16 - (level-method-17 () none) ;; 17 ;; (load-continue (_type_) _type_) - (level-method-18 () none) ;; 18 ;; (load-begin (_type_) _type_) - (level-method-19 () none) ;; 19 ;; (login-begin (_type_) _type_) - (level-method-20 () none) ;; 20 ;; (debug-print-region-splitbox (_type_ vector object) none) - (get-art-group-by-name (_type_ string) art-group) ;; 21 - (level-method-22 () none) ;; 22 ;; (level-method-22 (_type_ symbol) int) - (level-method-23 () none) ;; 23 ;; (lookup-text (_type_ text-id symbol) string) + (inside-bsp? "Check if the camera is inside the BSP for this level." (_type_) symbol) ;; 15 + (update-vis! "Load/decompress precomputed visibility." (_type_ level-vis-info uint (pointer uint8)) symbol) ;; 16 + (load-continue "Main function to run level loading/linking. + Called by the engine to make progress on loading levels." (_type_) _type_) ;; 17 + (load-begin "Start loading data of a level." (_type_) _type_) ;; 18 + (login-begin "Start logging in loaded level data." (_type_) _type_) ;; 19 + (debug-print-region-splitbox (_type_ vector object) none) ;; 20 + (get-art-group-by-name "Look up art-group in this level by name." (_type_ string) art-group) ;; 21 + (set-proto-vis! (_type_ symbol) int) ;; 22 + (lookup-text (_type_ text-id symbol) string) ;; 23 (level-method-24 () none) ;; 24 ;; (level-method-24 () none) - (level-method-25 () none) ;; 25 ;; (birth (_type_) _type_) - (level-method-26 () none) ;; 26 ;; (level-status-update! (_type_ symbol) _type_) - (level-method-27 () none) ;; 27 ;; (load-required-packages (_type_) _type_) - (level-method-28 () none) ;; 28 ;; (init-vis-from-bsp (_type_) none) - (level-method-29 () none) ;; 29 ;; (vis-clear (_type_) none) + (birth "Start running a level." (_type_) _type_) ;; 25 + (level-status-update! "Try to update the level to the given status, calling whatever is needed to make it happen. + This can do both loading, linking, login, and activation. + This is somewhat similar to level-get-for-use, but requires that you already have the level object. + This function is the way to transition from loaded to alive/active." (_type_ symbol) _type_) ;; 26 + (load-common-package "Somewhat useless leftover from a more compliated package system. Will load common in some cases." (_type_) none) ;; 27 + (init-vis-from-bsp "Link vis-infos from the bsp to the level." (_type_) none) ;; 28 + (vis-clear "Clear visibility data: both the info and the cached vis bits. Switch all-visible? to loading." (_type_) none) ;; 29 ) ) @@ -7767,28 +7830,36 @@ :flag-assert #x1f0000ea54 ;; Failed to read some fields. (:methods - (level-get (_type_ symbol) level) ;; 9 - (level-group-method-10 () none) ;; 10 ;; (level-get-with-status (_type_ symbol) level) - (get-level-by-heap-ptr-and-status (_type_ pointer symbol) level) ;; 11 - (level-group-method-12 () none) ;; 12 ;; (level-get-for-use (_type_ symbol symbol) level) - (level-group-method-13 () none) ;; 13 ;; (activate-levels! (_type_) int) - (level-group-method-14 () none) ;; 14 ;; (debug-print-entities (_type_ symbol type) none) - (level-group-method-15 () none) ;; 15 ;; (debug-draw-actors (_type_ symbol) none) - (level-group-method-16 () none) ;; 16 ;; (assign-draw-indices (_type_) none) - (level-group-method-17 () none) ;; 17 ;; (actors-update (_type_) none) - (level-group-method-18 () none) ;; 18 ;; (update-nav-meshes-method (_type_) none) - (level-update (_type_) none) ;; 19 - (level-get-target-inside (_type_) level) ;; 20 - (level-group-method-21 () none) ;; 21 ;; (alloc-levels-if-needed (_type_ symbol) none) - (art-group-get-by-name (_type_ string (pointer level)) art-group) ;; 22 ;; (load-commands-set! (_type_ pair) none) - (level-group-method-23 () none) ;; 23 ;; (art-group-get-by-name (_type_ string (pointer uint32)) art-group) - (level-group-method-24 () none) ;; 24 ;; (alt-load-command-get-index (_type_ symbol int) pair) - (level-group-method-25 () none) ;; 25 ;; (update-vis-volumes (_type_) none) - (level-group-method-26 (_type_ symbol) symbol) ;; 26 ;; (update-vis-volumes-from-nav-mesh (_type_) none) - (level-group-method-27 () none) ;; 27 ;; (print-volume-sizes (_type_) none) - (level-group-method-28 (_type_) symbol) ;; 28 ;; (level-status (_type_ symbol) symbol) - (level-group-method-29 () none) ;; 29 ;; (load-in-progress? (_type_) symbol) - (level-group-method-30 () none) ;; 30 ;; (level-get-most-disposable (_type_) level) + (level-get "Lookup loaded level by name." (_type_ symbol) level) ;; 9 + (level-get-with-status "Get the first level with the given status, #f if there are none." (_type_ symbol) level) ;; 10 + (get-level-by-heap-ptr-and-status "Look up a loaded level, given pointer inside of level's heap, + and the status of the level (active or loading)." (_type_ pointer symbol) level) ;; 11 + (level-get-for-use "Request a level by name in the given state. + Will return quickly (non-blocking) and might not be able to get a level in the desired state, + though it will do some small amount of work to make progress on loading. + + This is the most general/powerful function like this: if there is no level with this name + it will kick out levels as needed to make a free slot, and set up a new level, and start + the load. This should only be used when you might want to start a load." (_type_ symbol symbol) level) ;; 12 + (activate-levels! "Make all levels 'active!" (_type_) int) ;; 13 + (debug-print-entities (_type_ symbol type string) none) ;; 14 + (debug-draw-actors (_type_ symbol) none) ;; 15 + (assign-draw-indices "Assign the order for levels to be drawn." (_type_) none) ;; 16 + (actors-update (_type_) none) ;; 17 + (update-nav-meshes-method (_type_) none) ;; 18 + (level-update "Per-frame update of the level system." (_type_) none) ;; 19 + (level-get-target-inside "Get the level that the player is 'in'." (_type_) level) ;; 20 + (init-level-system "If needed, initialize the level system by loading common/art packages and allocating level heaps." (_type_ symbol) none) ;; 21 + (art-group-get-by-name "Check all levels for an art group with the given name." (_type_ string (pointer level)) art-group) ;; 22 ;; (load-commands-set! (_type_ pair) none) + (update-vis-volumes (_type_) none) ;; 23 ;; (art-group-get-by-name (_type_ string (pointer uint32)) art-group) + (level-group-method-24 (_type_) none) ;; 24 ;; (alt-load-command-get-index (_type_ symbol int) pair) + (print-volume-sizes (_type_) none) ;; 25 + (status-of-level-and-borrows "Get the combined status of a level and borrow levels." (_type_ symbol symbol) symbol) ;; 26 ;; (update-vis-volumes-from-nav-mesh (_type_) none) + (do-nothing "Empty method." (_type_) none) ;; 27 + (load-in-progress? "Is there a load happening now?" (_type_) symbol) ;; 28 ;; (level-status (_type_ symbol) symbol) + (is-load-allowed? "Does the exclusive-load setting allow us to load this level?" (_type_ (pointer symbol)) symbol) ;; 29 + (level-get-most-disposable "Get the level inside this level-group that should + be used to load a new level." (_type_) level) ;; 30 ) ) @@ -8018,6 +8089,7 @@ (right 4) (large 5) (pc-hack 6) + (ff7 7) ) ;; ---font-h:font-flags @@ -8098,6 +8170,7 @@ (projection float :offset-assert 56) (scale float :offset-assert 60) (color font-color :offset-assert 64) ;; guessed by decompiler + (color-signed int32 :overlay-at color) (flags font-flags :offset-assert 68) ;; guessed by decompiler (mat matrix :offset-assert 72) (start-line uint32 :offset-assert 76) @@ -8177,7 +8250,7 @@ :size-assert #xbec :flag-assert #xa00000bec (:methods - (set-context! (_type_ object) none) ;; 9 + (set-context! (_type_ font-context) none) ;; 9 ) ) @@ -8258,8 +8331,8 @@ (moon-count int32 :offset-assert 232) (moon sparticle-launch-control :offset-assert 236) ;; guessed by decompiler (day-star-count int32 :offset-assert 240) - (day-star basic :offset-assert 244) - (day-star-enable basic :offset-assert 248) + (day-star sparticle-launch-control :offset-assert 244) + (day-star-enable symbol :offset-assert 248) (start-timer int32 :offset-assert 252) ) :method-count-assert 14 @@ -8351,6 +8424,7 @@ (define-extern *palette-fade-controls* palette-fade-controls) (define-extern *time-of-day-context* time-of-day-context) +(define-extern *time-of-day* (pointer time-of-day-proc)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; profile ;; @@ -8594,23 +8668,23 @@ (defenum text-id :type uint32 (null #x0) - (text-0001 #x0001) - (text-0002 #x0002) + (progress-quit #x0001) + (progress-pause #x0002) (progress-subtitle-language #x0003) (progress-sound-format #x0004) - (text-0005 #x0005) - (text-0006 #x0006) - (text-0007 #x0007) + (progress-sound-mono #x0005) + (progress-sound-stereo #x0006) + (progress-sound-surround #x0007) (progress-sfx-volume #x0008) (progress-music-volume #x0009) (progress-speech-volume #x000a) (progress-language #x000b) (progress-vibration #x000c) - (text-000d #x000d) + (progress-play-hints #x000d) (progress-graphics-center-screen #x000e) - (text-000f #x000f) - (text-0010 #x0010) - (text-0011 #x0011) + (progress-on #x000f) + (progress-off #x0010) + (progress-graphics-center-screen-dpad #x0011) (progress-language-english #x0012) (progress-language-french #x0013) (progress-language-german #x0014) @@ -8624,39 +8698,39 @@ (progress-game-options #x001c) (progress-graphic-options #x001d) (progress-sound-options #x001e) - (text-001f #x001f) - (text-0020 #x0020) - (text-0021 #x0021) - (text-0022 #x0022) - (text-0023 #x0023) + (progress-aspect-4x3 #x001f) + (progress-aspect-16x9 #x0020) + (progress-refresh-60hz #x0021) + (progress-refresh-50hz #x0022) + (progress-jak3 #x0023) (progress-exit-demo #x0024) - (text-0025 #x0025) - (text-0026 #x0026) + (progress-yes #x0025) + (progress-no #x0026) (progress-back #x0027) - (text-0028 #x0028) - (text-0029 #x0029) - (text-002a #x002a) + (progress-ok #x0028) + (progress-next #x0029) + (progress-prev #x002a) (progress-continue-without-save #x002b) - (text-002c #x002c) - (text-002d #x002d) + (progress-save-file-select #x002c) + (progress-load-file-select #x002d) (progress-load-save #x002e) (progress-save-game #x002f) - (text-0030 #x0030) + (progress-empty #x0030) (progress-options #x0031) (progress-title-new-game #x0032) - (text-0033 #x0033) + (progress-start-button #x0033) (progress-quit-game #x0034) (progress-bigmap #x0035) (progress-select-start #x0036) (progress-highscores #x0037) - (text-0038 #x0038) - (text-0039 #x0039) - (text-003a #x003a) - (text-003b #x003b) - (text-003c #x003c) - (text-003d #x003d) - (text-003e #x003e) - (text-003f #x003f) + (progress-highscores-first-place #x0038) + (progress-highscores-second-place #x0039) + (progress-highscores-third-place #x003a) + (progress-highscores-fourth-place #x003b) + (progress-highscores-fifth-place #x003c) + (progress-highscores-sixth-place #x003d) + (progress-highscores-seventh-place #x003e) + (progress-highscores-eighth-place #x003f) (text-0040 #x0040) (text-0041 #x0041) (text-0042 #x0042) @@ -8688,8 +8762,8 @@ (text-0065 #x0065) (progress-secrets-big-head #x0066) (progress-secrets-little-head #x0067) - (text-0068 #x0068) - (text-0069 #x0069) + (progress-secrets-orbs-available #x0068) + (progress-secrets-orbs-collected #x0069) (progress-missions #x006a) (progress-select-pre-start #x006b) (progress-select-kiosk-start #x006c) @@ -8704,15 +8778,15 @@ (text-0077 #x0077) (text-0078 #x0078) (text-0079 #x0079) - (text-007a #x007a) + (progress-graphics-center-screen-reset #x007a) (text-007b #x007b) (text-007c #x007c) - (text-007d #x007d) - (text-007e #x007e) - (text-007f #x007f) + (progress-missions-completed #x007d) + (progress-missions-todo #x007e) + (progress-memcard-insufficient-space-retry? #x007f) (text-0080 #x0080) (text-0081 #x0081) - (text-0082 #x0082) + (press-triangle-to-talk #x0082) (text-0083 #x0083) (text-0084 #x0084) (text-0085 #x0085) @@ -8722,49 +8796,49 @@ (text-0089 #x0089) (text-008a #x008a) (text-008b #x008b) - (text-008c #x008c) - (text-008d #x008d) - (text-008e #x008e) - (text-008f #x008f) - (text-0090 #x0090) - (text-0091 #x0091) - (text-0092 #x0092) - (text-0093 #x0093) - (text-0094 #x0094) - (text-0095 #x0095) - (text-0096 #x0096) + (progress-graphics-prog-scan-change-notice #x008c) + (progress-graphics-prog-scan-warn-1 #x008d) + (progress-graphics-prog-scan-warn-2 #x008e) + (progress-graphics-60hz-change-notice #x008f) + (progress-graphics-60hz-change-complete #x0090) + (progress-graphics-prog-scan-change-complete #x0091) + (progress-graphics-prog-scan-keep #x0092) + (progress-disc-removed-notice #x0093) + (progress-disc-removed-prompt #x0094) + (progress-disc-read-error #x0095) + (progress-disc-read-error-prompt #x0096) (text-0097 #x0097) (text-0098 #x0098) (text-0099 #x0099) - (text-009a #x009a) - (text-009b #x009b) - (text-009c #x009c) - (text-009d #x009d) - (text-009e #x009e) - (text-009f #x009f) - (text-00a0 #x00a0) - (text-00a1 #x00a1) - (text-00a2 #x00a2) - (text-00a3 #x00a3) - (text-00a4 #x00a4) - (text-00a5 #x00a5) - (text-00a6 #x00a6) - (text-00a7 #x00a7) - (text-00a8 #x00a8) - (text-00a9 #x00a9) - (text-00aa #x00aa) - (text-00ab #x00ab) - (text-00ac #x00ac) - (text-00ad #x00ad) - (text-00ae #x00ae) - (text-00af #x00af) - (text-00b0 #x00b0) - (text-00b1 #x00b1) - (text-00b2 #x00b2) - (text-00b3 #x00b3) - (text-00b4 #x00b4) - (text-00b5 #x00b5) - (text-00b6 #x00b6) + (progress-memcard-no-card-in-slot #x009a) + (progress-memcard-unformatted #x009b) + (progress-memcard-space-requirement #x009c) + (progress-memcard-insert-with-jak3-data #x009d) + (progress-memcard-insert-with-free-space #x009e) + (progress-memcard-formatting-required-notice #x009f) + (progress-memcard-saving #x00a0) + (progress-memcard-loading #x00a1) + (progress-memcard-formatting #x00a2) + (progress-memcard-creating-save-data #x00a3) + (progress-memcard-remove-warn #x00a4) + (progress-memcard-overwrite-warning #x00a5) + (progress-memcard-overwrite-confirm? #x00a6) + (progress-memcard-format? #x00a7) + (progress-memcard-continue? #x00a8) + (progress-memcard-go-back? #x00a9) + (progress-memcard-load-error #x00aa) + (progress-memcard-save-error #x00ab) + (progress-memcard-format-error #x00ac) + (progress-memcard-create-save-error #x00ad) + (progress-memcard-check #x00ae) + (progress-memcard-check-and-try-again #x00af) + (progress-memcard-removed #x00b0) + (progress-autosave-disabled #x00b1) + (progress-autosave-reenable-info #x00b2) + (progress-memcard-no-save-data #x00b3) + (progress-memcard-create-save-data? #x00b4) + (progress-autosave-notice #x00b5) + (progress-autosave-remove-warn #x00b6) (text-012c #x012c) (text-012d #x012d) (text-012e #x012e) @@ -8803,7 +8877,7 @@ (text-020b #x020b) (text-020c #x020c) (text-020d #x020d) - (text-020e #x020e) + (progress-continue #x020e) (text-03bf #x03bf) (text-03c0 #x03c0) (text-03c1 #x03c1) @@ -8813,8 +8887,8 @@ (text-03c5 #x03c5) (text-03c6 #x03c6) (text-03c7 #x03c7) - (text-03c8 #x03c8) - (text-03c9 #x03c9) + (progress-missions-todo-icon #x03c8) + (progress-missions-complete-icon #x03c9) (text-03d1 #x03d1) (text-0408 #x0408) (text-0409 #x0409) @@ -9040,8 +9114,8 @@ (text-05f9 #x05f9) (progress-camera-horizontal #x05fa) (progress-camera-vertical #x05fb) - (text-05fc #x05fc) - (text-05fd #x05fd) + (progress-camera-default #x05fc) + (progress-camera-flipped #x05fd) (progress-camera-options #x05fe) (text-05ff #x05ff) (text-0600 #x0600) @@ -9326,8 +9400,8 @@ (text-07cd #x07cd) (text-07ce #x07ce) (text-07cf #x07cf) - (text-07d0 #x07d0) - (text-07d1 #x07d1) + (progress-footer-next-r1 #x07d0) + (progress-footer-prev-l1 #x07d1) (progress-title-commentary #x07d2) (text-07d3 #x07d3) (text-07d4 #x07d4) @@ -9437,9 +9511,9 @@ (progress-title-level-select-act-2 #x084f) (progress-title-level-select-act-3 #x0850) (progress-secrets-button-invis #x0851) - (text-0852 #x0852) - (text-0853 #x0853) - (text-0856 #x0856) + (progress-secrets-cancel #x0852) + (progress-secrets-buy #x0853) + (progress-secrets-price #x0856) (text-0857 #x0857) (text-0858 #x0858) (text-085a #x085a) @@ -9503,6 +9577,7 @@ ((id text-id :offset-assert 0) ;; guessed by decompiler (text string :offset-assert 4) ;; guessed by decompiler ) + :pack-me :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 @@ -9512,7 +9587,7 @@ ((length int32 :offset-assert 4) (language-id int32 :offset-assert 8) (group-name string :offset-assert 12) ;; guessed by decompiler - (data game-text :dynamic :offset-assert 16) ;; guessed by decompiler + (data game-text :dynamic :inline :offset-assert 16) ;; guessed by decompiler ) :method-count-assert 10 :size-assert #x10 @@ -9574,6 +9649,7 @@ :bitfield #t (tnf0 0) ;; unused?? (tnf1 1) + (tnf2 2) ) (defenum conn-flag @@ -9598,13 +9674,14 @@ (flags trail-node-flag :offset-assert 18) (conn-count uint8 :offset-assert 19) ) + :pack-me :method-count-assert 12 :size-assert #x14 :flag-assert #xc00000014 (:methods - (trail-node-method-9 () none) ;; 9 ;; (get-dist-score (_type_ vector) uint) - (trail-node-method-10 () none) ;; 10 ;; (debug-draw (_type_ int) none) - (trail-node-method-11 () none) ;; 11 ;; (get-position (_type_ vector) vector) + (get-dist-score (_type_ vector) uint) ;; 9 + (debug-draw (_type_ int) none) ;; 10 + (get-position (_type_ vector) vector) ;; 11 ) ) @@ -9628,6 +9705,7 @@ :flag-assert #x900000020 ) +(declare-type trail-graph basic) (deftype trail-conn (structure) ((head-id uint16 :offset-assert 0) (tail-id uint16 :offset-assert 2) @@ -9635,11 +9713,12 @@ (visgroup-id uint8 :offset-assert 5) (cost uint16 :offset-assert 6) ) + :pack-me :method-count-assert 10 :size-assert #x8 :flag-assert #xa00000008 (:methods - (trail-conn-method-9 () none) ;; 9 ;; (debug-draw (_type_ trail-graph int) none) + (debug-draw (_type_ trail-graph int) none) ;; 9 ) ) @@ -9649,6 +9728,7 @@ (pov-count uint8 :offset-assert 3) (first-pov uint16 :offset-assert 4) ) + :pack-me :method-count-assert 9 :size-assert #x6 :flag-assert #x900000006 @@ -9741,31 +9821,31 @@ :size-assert #x190 :flag-assert #x2200000190 (:methods - (trail-graph-method-9 () none) ;; 9 ;; (trail-graph-method-9 (_type_ int) none) - (trail-graph-method-10 () none) ;; 10 ;; (trail-graph-method-10 (_type_ int) none) - (trail-graph-method-11 () none) ;; 11 ;; (trail-graph-method-11 (_type_ int int) trail-node) - (trail-graph-method-12 () none) ;; 12 ;; (debug-draw (_type_) none) - (trail-graph-method-13 () none) ;; 13 ;; (debug-draw-cell (_type_ int) none) - (trail-graph-method-14 () none) ;; 14 ;; (debug-draw-path (_type_ int (pointer uint16) vector vector rgba float) symbol) - (trail-graph-method-15 () none) ;; 15 ;; (do-path (_type_ vector vector) int) - (trail-graph-method-16 () none) ;; 16 ;; (trail-graph-method-16 () none) - (trail-graph-method-17 () none) ;; 17 ;; (get-node-location-by-id (_type_ uint vector) vector) - (trail-graph-method-18 () none) ;; 18 ;; (get-path-to-root (_type_ (pointer uint16) int (pointer int32) (pointer float)) int) - (trail-graph-method-19 () none) ;; 19 ;; (trail-graph-method-19 (_type_ int int) symbol) - (trail-graph-method-20 () none) ;; 20 ;; (try-initialize (_type_) symbol) - (trail-graph-method-21 () none) ;; 21 ;; (update-node-flags-for-conn (_type_ int trail-node-flag trail-node-flag) none) - (trail-graph-method-22 () none) ;; 22 ;; (trail-graph-method-22 (_type_ int) none) - (trail-graph-method-23 () none) ;; 23 ;; (reset-search-state (_type_) none) - (trail-graph-method-24 () none) ;; 24 ;; (get-next-to-explore (_type_) int) - (trail-graph-method-25 () none) ;; 25 ;; (trail-graph-method-25 (_type_ trail-conn-search int int) none) - (trail-graph-method-26 () none) ;; 26 ;; (do-search! (_type_ vector vector trail-cached-search-info) none) - (trail-graph-method-27 () none) ;; 27 ;; (do-some-work (_type_) int) - (trail-graph-method-28 () none) ;; 28 ;; (run-until-done-or-timeout (_type_ int) none) - (trail-graph-method-29 () none) ;; 29 - (trail-graph-method-30 () none) ;; 30 - (trail-graph-method-31 () none) ;; 31 - (trail-graph-method-32 () none) ;; 32 - (trail-graph-method-33 () none) ;; 33 + (trail-graph-method-9 (_type_ int) none) ;; 9 ;; (trail-graph-method-9 (_type_ int) none) + (trail-graph-method-10 (_type_ int) none) ;; 10 ;; (trail-graph-method-10 (_type_ int) none) + (trail-graph-method-11 (_type_ int int) trail-node) ;; 11 ;; (trail-graph-method-11 (_type_ int int) trail-node) + (trail-graph-method-12 (_type_) none) ;; 12 + (trail-graph-method-13 (_type_ vector vector) none) ;; 13 ;; (debug-draw-cell (_type_ int) none) + (debug-draw (_type_) none) ;; 14 ;; (debug-draw-path (_type_ int (pointer uint16) vector vector rgba float) symbol) + (trail-graph-method-15 (_type_ int) none) ;; 15 ;; (do-path (_type_ vector vector) int) + (trail-graph-method-16 (_type_ int (pointer uint16) vector vector rgba float) none) ;; 16 ;; (trail-graph-method-16 () none) + (trail-graph-method-17 (_type_) none) ;; 17 ;; (get-node-location-by-id (_type_ uint vector) vector) + (trail-graph-method-18 (_type_ vector) int) ;; 18 ;; (get-path-to-root (_type_ (pointer uint16) int (pointer int32) (pointer float)) int) + (trail-graph-method-19 (_type_) none) ;; 19 ;; (trail-graph-method-19 (_type_ int int) symbol) + (trail-graph-method-20 (_type_ uint vector) none) ;; 20 ;; (try-initialize (_type_) symbol) + (trail-graph-method-21 (_type_) none) ;; 21 ;; (update-node-flags-for-conn (_type_ int trail-node-flag trail-node-flag) none) + (trail-graph-method-22 (_type_) none) ;; 22 ;; (trail-graph-method-22 (_type_ int) none) + (trail-graph-method-23 (_type_) none) ;; 23 ;; (reset-search-state (_type_) none) + (trail-graph-method-24 (_type_) none) ;; 24 ;; (get-next-to-explore (_type_) int) + (trail-graph-method-25 (_type_ int) none) ;; 25 ;; (trail-graph-method-25 (_type_ trail-conn-search int int) none) + (trail-graph-method-26 (_type_) none) ;; 26 ;; (do-search! (_type_ vector vector trail-cached-search-info) none) + (trail-graph-method-27 (_type_) none) ;; 27 ;; (do-some-work (_type_) int) + (trail-graph-method-28 (_type_) none) ;; 28 ;; (run-until-done-or-timeout (_type_ int) none) + (trail-graph-method-29 (_type_) none) ;; 29 + (trail-graph-method-30 (_type_) none) ;; 30 + (trail-graph-method-31 (_type_ int) none) ;; 31 + (trail-graph-method-32 (_type_) none) ;; 32 + (trail-graph-method-33 (_type_) none) ;; 33 ) ) @@ -9985,13 +10065,13 @@ (deftype minimap-table-entry (structure) ((corner vector :inline :offset-assert 0) - (level-name basic :offset-assert 16) - (tex-name basic :offset-assert 20) + (level-name symbol :offset-assert 16) + (tex-name string :offset-assert 20) (meters-per-texel float :offset-assert 24) (pos-scale float :offset-assert 28) (min-inv-scale float :offset-assert 32) (max-inv-scale float :offset-assert 36) - (switch-immediate basic :offset-assert 40) + (switch-immediate symbol :offset-assert 40) ) :method-count-assert 9 :size-assert #x2c @@ -10001,7 +10081,7 @@ (deftype minimap-class-node (structure) ((default-position vector :inline :offset-assert 0) (flags minimap-flag :offset-assert 16) - (name basic :offset-assert 20) + (name string :offset-assert 20) (icon-xy vector2ub :inline :offset-assert 24) (class minimap-class :offset-assert 26) ;; minimap-class (scale float :offset-assert 28) @@ -10011,13 +10091,13 @@ :size-assert #x24 :flag-assert #xa00000024 (:methods - (minimap-class-node-method-9 () none) ;; 9 + (minimap-class-node-method-9 (_type_) symbol) ;; 9 ) ) (deftype connection-minimap (connection-pers) ((next connection-minimap :offset-assert 0 :override) ;; connection-pers - (handle handle :offset-assert 8 :overlay-at update-time) ;; + (handle handle :offset-assert 8 :overlay-at update-time :score 1) (position vector :offset-assert 16 :overlay-at (-> param 0)) ;; object (alpha float :offset-assert 20 :overlay-at (-> param 1)) (flags minimap-flag :offset-assert 24 :overlay-at (-> param 2)) @@ -10057,7 +10137,7 @@ :flag-assert #xb000000d0 (:methods (get-distance-with-path (_type_ vector vector) float) ;; 9 - (minimap-trail-method-10 () none) ;; 10 ;; (reset (_type_) none) + (reset (_type_) none) ;; 10 ) ) @@ -10113,25 +10193,25 @@ :size-assert #x658 :flag-assert #x1c00000658 (:methods - (minimap-method-9 () none) ;; 9 ;; (debug-draw (_type_) none) + (debug-draw (_type_) none) ;; 9 (get-trail-for-connection (_type_ connection-minimap symbol) minimap-trail) ;; 10 - (minimap-method-11 () none) ;; 11 ;; (get-icon-draw-pos (_type_ connection-minimap minimap-trail vector float vector) symbol) + (get-icon-draw-pos (_type_ connection-minimap minimap-trail vector float vector) symbol) ;; 11 (add-icon! (_type_ process uint int vector int) connection-minimap) ;; 12 - (minimap-method-13 () none) ;; 13 ;; (free-trail-by-connection (_type_ connection-minimap) none) - (minimap-method-14 () none) ;; 14 ;; (update-trails (_type_) none) - (minimap-method-15 () none) ;; 15 ;; (draw-1 (_type_ dma-buffer vector4w symbol) none) - (minimap-method-16 () none) ;; 16 ;; (draw-connection (_type_ minimap-draw-work connection-minimap) none) - (minimap-method-17 () none) ;; 17 ;; (draw-frustum-1 (_type_ minimap-draw-work connection-minimap) none) - (minimap-method-18 () none) ;; 18 ;; (draw-frustum-2 (_type_ minimap-draw-work connection-minimap) none) - (minimap-method-19 () none) ;; 19 ;; (sub-draw-1-2 (_type_ minimap-draw-work) none) - (minimap-method-20 () none) ;; 20 ;; (update! (_type_) symbol) - (minimap-method-21 () none) ;; 21 ;; (sub-draw-1-1 (_type_ minimap-draw-work) none) - (minimap-method-22 () none) ;; 22 ;; (set-color (_type_ vector) none) - (minimap-method-23 () none) ;; 23 ;; (draw-racer-2 (_type_ minimap-draw-work connection-minimap) none) - (minimap-method-24 () none) ;; 24 ;; (draw-sprite2 (_type_ dma-buffer vector4w symbol) none) - (minimap-method-25 () none) ;; 25 ;; (set-race-texture (_type_ texture float level) none) - (minimap-method-26 () none) ;; 26 ;; (draw-racer-1 (_type_ minimap-draw-work connection-minimap float float float) none) - (minimap-method-27 () none) ;; 27 ;; (set-race-corner (_type_ float float) none) + (free-trail-by-connection (_type_ connection-minimap) none) ;; 13 + (update-trails (_type_) none) ;; 14 + (draw-1 (_type_ dma-buffer vector4w symbol) none) ;; 15 + (draw-connection (_type_ minimap-draw-work connection-minimap) none) ;; 16 + (draw-frustum-1 (_type_ minimap-draw-work connection-minimap) none) ;; 17 + (draw-frustum-2 (_type_ minimap-draw-work connection-minimap) none) ;; 18 + (sub-draw-1-2 (_type_ minimap-draw-work) none) ;; 19 + (update! (_type_) symbol) ;; 20 + (sub-draw-1-1 (_type_ minimap-draw-work) none) ;; 21 + (set-color (_type_ vector) none) ;; 22 + (draw-racer-2 (_type_ minimap-draw-work connection-minimap) none) ;; 23 + (draw-sprite2 (_type_ dma-buffer vector4w symbol) none) ;; 24 + (set-race-texture (_type_ texture float level) none) ;; 25 + (draw-racer-1 (_type_ minimap-draw-work connection-minimap float float float) none) ;; 26 + (set-race-corner (_type_ float float) none) ;; 27 ) ) @@ -10177,7 +10257,7 @@ (tpage external-art-buffer :offset-assert 20) ;; guessed by decompiler (tpage2 basic :offset-assert 24) (progress-minimap texture-page :offset-assert 28) ;; guessed by decompiler - (progress-minimap2 basic :offset-assert 32) + (progress-minimap2 texture-page :offset-assert 32) (load-index uint32 :offset-assert 36) (x0 int32 :offset-assert 40) (y0 int32 :offset-assert 44) @@ -10203,12 +10283,12 @@ (:methods (new (symbol type) _type_) ;; 0 ;; (new (symbol type) _type_) (bigmap-method-9 () none) ;; 9 ;; (initialize (_type_) none) - (bigmap-method-10 () none) ;; 10 ;; (update (_type_) none) - (bigmap-method-11 () none) ;; 11 ;; (draw (_type_ int int int int) int) + (update (_type_) none) ;; 10 + (bigmap-method-11 (_type_) symbol) ;; 11 (bigmap-method-12 () none) ;; 12 ;; (handle-cpad-inputs (_type_) int) (bigmap-method-13 () none) ;; 13 ;; (compress-all (_type_) int) - (bigmap-method-14 () none) ;; 14 ;; (enable-drawing (_type_) none) - (bigmap-method-15 () none) ;; 15 ;; (disable-drawing (_type_) int) + (enable-drawing (_type_) none) ;; 14 + (disable-drawing (_type_) int) ;; 15 (bigmap-method-16 (_type_) none) ;; 16 ;; (dump-to-file (_type_) file-stream) (bigmap-method-17 () none) ;; 17 ;; (set-pos! (_type_ vector) int) (bigmap-method-18 () none) ;; 18 ;; (decompress-current-masks! (_type_) int) @@ -10267,7 +10347,7 @@ (feature36 36) (board-launch 37) (board-trail 38) - (feature39 39) + (board-zap 39) (darkjak 40) (darkjak-smack 41) (darkjak-bomb0 42) @@ -10284,9 +10364,9 @@ (armor1 53) (armor2 54) (armor3 55) - (feature56 56) - (feature57 57) - (feature58 58) + (jakc 56) + (lighteco 57) + (darkeco 58) (feature59 59) (feature60 60) (feature61 61) @@ -10409,6 +10489,14 @@ ) ;; ---settings-h:game-vehicles +;; +++settings-h:game-vehicle-u8 +(defenum game-vehicle-u8 + :type uint8 + :bitfield #t + :copy-entries game-vehicles + ) +;; ---settings-h:game-vehicle-u8 + (declare-type resetter-spec structure) (define-extern crate type) (deftype user-setting-data (structure) @@ -10754,13 +10842,13 @@ :flag-assert #x1400001430 (:methods (new (symbol type int) _type_) ;; 0 - (add-setting (_type_ process symbol object object object) none) ;; 9 + (add-setting (_type_ process symbol object object object) connection) ;; 9 (persist-with-delay (_type_ symbol time-frame symbol symbol float int) none) ;; 10 - (set-setting (_type_ process symbol object object object) none) ;; 11 + (set-setting (_type_ process symbol object object object) connection) ;; 11 (remove-setting (_type_ process symbol) none) ;; 12 (kill-persister (_type_ engine-pers object) none) ;; 13 (setting-control-method-14 (_type_ object) connectable) ;; 14 - (setting-control-method-15 (_type_ object) connectable) ;; 15 + (get-setting (_type_ object) connectable) ;; 15 (remove-setting-by-arg0 (_type_ object) none) ;; 16 (set-setting-by-param (_type_ symbol object object object) connection) ;; 17 (apply-settings (_type_) user-setting-data) ;; 18 @@ -10784,6 +10872,45 @@ :bitfield #f :type uint32 + (drawable-group 0) + + (tfragment 1) + (tfragment-base 2) + (tfragment-common 3) + (tfragment-level0 4) + (tfragment-level1 5) + (tfragment-color 6) + (tfragment-debug 7) + (tfragment-pal 8) + + (tie-fragment 9) + (tie-gif 10) + (tie-points 11) + (tie-colors 12) + (tie-draw-points 13) + (tie-debug 14) + (tie-scissor 15) + (tie-pal 16) + (tie-generic 17) + (instance-tie 18) + (instance-tie-colors0 19) ;; somehow used by tfrag too.. + (instance-tie-colors1 20) + (instance-tie-colors2 21) + (instance-tie-colors3 22) + (instance-tie-colors* 23) + (prototype-bucket-shrub 24) + + + (shrubbery 27) + (shrubbery-object 28) + (shrubbery-vertex 29) + (shrubbery-color 30) + (shrubbery-stq 31) + (shrubbery-pal 32) + (billboard 33) + (instance-shrubbery 34) + + (entity 44) (camera 45) @@ -10791,10 +10918,11 @@ (bsp-misc 60) (bsp-node 61) (bsp-leaf-vis-self 62) - + (bsp-leav-vis-adj 63) + (draw-node 64) (pat 65) - - + (level-code 66) + (entity-links 67) (joint 68) (joint-anim-compressed-control 70) @@ -10808,9 +10936,33 @@ (art-joint-anim 78) (texture 83) - + (string 84) (array 85) + (debug 88) + + (other-pool 91) + (8k-dead-pool 92) + (16k-dead-pool 93) + (nk-dead-pool 94) + (target-dead-pool 95) + (camera-dead-pool 96) + (debug-dead-pool 97) + + (process-active 98) + (heap-total 99) + (heap-process 100) + (heap-header 101) + (head-thread 102) + (heap-root 103) + (heap-draw-control 104) + (heap-joint-control 105) + (heap-cspace 106) + (heap-bone 107) + (heap-part 108) + (heap-collide-prim 109) + (heap-mis 110) + (eye-anim 112) ) @@ -10892,7 +11044,7 @@ (blit-displays-work-method-16 () none) ;; 16 (blit-displays-work-method-17 (_type_ vector int float symbol) none) ;; 17 (blit-displays-work-method-18 () none) ;; 18 - (blit-displays-work-method-19 () none) ;; 19 + (blit-displays-work-method-19 (_type_) none) ;; 19 (called from main.gc) (blit-displays-work-method-20 () none) ;; 20 (get-menu-mode (_type_) symbol) ;; 21 (get-screen-copied (_type_) symbol) ;; 22 @@ -11121,12 +11273,12 @@ :size-assert #x2814 :flag-assert #x2700002814 (:methods - (sky-work-method-9 () none) ;; 9 ;; (init-sun-data! (_type_ int float float float) none) - (sky-work-method-10 () none) ;; 10 ;; (init-orbit-settings! (_type_ int float float float float float float) none) - (sky-work-method-11 () none) ;; 11 ;; (update-colors-for-time (_type_ float) none) - (sky-work-method-12 () none) ;; 12 ;; (update-time-and-speed (_type_ float float) none) - (sky-work-method-13 () none) ;; 13 ;; (draw (_type_) none) - (sky-work-method-14 () none) ;; 14 ;; (update-matrix (_type_ matrix) none) + (init-sun-data! (_type_ int float float float) none) ;; 9 + (init-orbit-settings! (_type_ int float float float float float float) none) ;; 10 + (update-colors-for-time (_type_ float) none) ;; 11 + (update-time-and-speed (_type_ float float) none) ;; 12 + (sky-work-method-13 () none) ;; 13 + (draw (_type_) none) ;; 14 ;; (update-matrix (_type_ matrix) none) (sky-work-method-15 () none) ;; 15 ;; (update-template-colors (_type_) none) (sky-work-method-16 () none) ;; 16 ;; (init-regs-for-large-polygon-draw (_type_) none) (sky-work-method-17 () none) ;; 17 ;; (init-regs-for-sky-asm (_type_) none) @@ -11534,7 +11686,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) @@ -11630,87 +11782,87 @@ :size-assert #x206c :flag-assert #x5c0000206c (:methods - (ocean-method-11 () none) ;; 11 ;; (get-height (_type_ vector symbol) float) - (ocean-method-12 () none) ;; 12 ;; (draw! (_type_) none) - (ocean-method-13 () none) ;; 13 ;; (update-map (_type_) none) - (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) + (get-height (_type_ vector symbol) float) ;; 11 + (draw! (_type_) none) ;; 12 + (update-map (_type_) none) ;; 13 + (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 ) ) @@ -11913,16 +12065,16 @@ (defenum scene-controls :type int64 :bitfield #t - ; (channel) - ; (anim-name) - ; (dma-size) - ; (bounds-spheres) - ; (actors) - ; (actor-marks) - ; (special-fma-spheres) - ; (scene-controls-7) - ; (scene-controls-8) - ; (display-controls) + (channel) + (anim-name) + (dma-size) + (bounds-spheres) + (actors) + (actor-marks) + (special-fma-spheres) + (scene-controls-7) + (scene-controls-8) + (display-controls) ) ;; ---main-h:scene-controls @@ -11952,35 +12104,26 @@ ;; +++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 ;; +++main-h:race-selection (defenum race-selection :type int64 - ; (kiera-class3 0) - ; (kiera-class2 1) - ; (kiera-class1 2) - ; (errol 3) - ; (bush-class3 4) - ; (bush-class2 5) - ; (bush-class1 6) - ; (bush-errol 7) - ; (bush-port 8) - ; (bush-class3-reverse 9) - ; (bush-class2-reverse 10) - ; (bush-class1-reverse 11) + (desertb-race-record 0) + (rs1 1) + (desrally-record 2) ) ;; ---main-h:race-selection @@ -12016,7 +12159,7 @@ (deftype screen-filter (basic) ((draw? symbol :offset-assert 4) ;; guessed by decompiler - (bucket int32 :offset-assert 8) ;; bucket-id + (bucket bucket-id :offset-assert 8) (depth int32 :offset-assert 12) (ztest uint64 :offset-assert 16) (color vector :inline :offset-assert 32) @@ -12025,14 +12168,14 @@ (extra vector :inline :offset-assert 80) (speed float :offset-assert 80 :overlay-at (-> extra x)) (current-interp float :offset-assert 84 :overlay-at (-> extra y)) - (lock-vsync? basic :offset-assert 96) + (lock-vsync? symbol :offset-assert 96) ) :method-count-assert 12 :size-assert #x64 :flag-assert #xc00000064 (:methods - (draw (_type_) none) ;; 9 - (setup (_type_ vector vector float bucket-id) none) ;; 10 + (draw "Add DMA data to our bucket to draw the filter." (_type_) none) ;; 9 + (setup "Initialize the screen-filter with the given settings." (_type_ vector vector float bucket-id int int symbol) none) ;; 10 (disable (_type_) none) ;; 11 ) ) @@ -12054,7 +12197,7 @@ :size-assert #x44 :flag-assert #xa00000044 (:methods - (col-rend-method-9 () none) ;; 9 ;; (col-rend-method-9 (_type_) none) + (draw (_type_) none) ;; 9 ) ) @@ -12150,7 +12293,7 @@ (define-extern *debug-view-anims* symbol) (define-extern *debug-unkillable* symbol) (define-extern *debug-player-vehicle-unkillable* symbol) -(define-extern *debug-actor* object) +(define-extern *debug-actor* process) (define-extern *gun-marks* symbol) (define-extern *bug-report-output-mode* symbol) (define-extern *display-scene-control* scene-controls) @@ -12284,8 +12427,8 @@ (login "Initialize the object after it is loaded." (_type_) _type_);; 9 (draw "Draw the drawable, and typically its children. This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." (_type_) none) ;; 10 - (drawable-method-11 () none) ;; 11 ;; (fill-collide-list-from-box (_type_ int collide-list collide-query) int) - (drawable-method-12 () none) ;; 12 ;; (fill-collide-list-from-line-sphere (_type_ int collide-list collide-query) int) + (drawable-method-11 (_type_) none) ;; 11 ;; (fill-collide-list-from-box (_type_ int collide-list collide-query) int) + (drawable-method-12 (_type_) none) ;; 12 ;; (fill-collide-list-from-line-sphere (_type_ int collide-list collide-query) int) (collect-stats "Collect triangle/perf statistics for rendering. This is only called when viewing stats. The vis-bits and culling registers are loaded during this time." (_type_) none) ;; 13 @@ -12397,7 +12540,7 @@ (deftype drawable-tree-array (drawable-group) "Collection of drawable trees. This might have a tfrag tree, tie tree, etc." - () + ((trees drawable-tree :dynamic :offset 32 :score 100)) :flag-assert #x1100000020 ) @@ -12594,20 +12737,73 @@ ;; +++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 +;; +++traffic-h:vehicle-type +(defenum vehicle-type + :type int32 + (h-bike-a 0) + (h-bike-b 1) + (h-bike-c 2) + (h-car-a 3) + (h-car-b 4) + (h-car-c 5) + (h-bike-d 6) + (h-hellcat 7) + (h-warf 8) + (h-glider 9) + (h-sled 10) + (h-kg-pickup 11) + (v-turtle 12) + (v-snake 13) + (v-scorpion 14) + (v-toad 15) + (v-fox 16) + (v-rhino 17) + (v-mirage 18) + (v-x-ride 19) + (v-marauder 20) + (v-faccar 21) + (v-catapult 22) + (v-marauder-b 23) + (test-car 25) + (wbike-test 26) + (vt27 27) + (evan-test-bike 29) + ) +;; ---traffic-h:vehicle-type + (deftype traffic-danger-info (structure) ((sphere sphere :inline :offset-assert 0) (velocity vector :inline :offset-assert 16) @@ -12662,13 +12858,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 level 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 @@ -13906,11 +14102,11 @@ :flag-assert #xe00000050 ;; field on-open uses ~A with a signed load. field on-close uses ~A with a signed load. (:methods - (game-task-node-info-method-9 () none) ;; 9 ;; (close! (_type_ symbol) int) + (get-idx-in-task-list (_type_) int) ;; 9 ;; (close! (_type_ symbol) int) (open! (_type_ symbol) int) ;; 10 ;; (open! (_type_ symbol) int) - (game-task-node-info-method-11 () none) ;; 11 ;; (open? (_type_) symbol) + (game-task-node-info-method-11 (_type_ symbol) none) ;; 11 ;; (open? (_type_) symbol) (game-task-node-info-method-12 (_type_) symbol) ;; 12 ;; (copy-hooks! (_type_ game-task-node-info) game-task-node-info) - (game-task-node-info-method-13 () none) ;; 13 ;; (eval-add (_type_) int) + (eval-game-task-cmd! (_type_) none) ;; 13 ;; (eval-add (_type_) int) ) ) @@ -13919,7 +14115,7 @@ (text-name text-id :offset-assert 8) ;; guessed by decompiler (pre-play-node game-task-node :offset-assert 12) ;; game-task-node (kiosk-play-node game-task-node :offset-assert 14) ;; game-task-node - (pre-play-continue string :offset-assert 16) ;; guessed by decompiler + (pre-play-continue object :offset-assert 16) ;; guessed by decompiler (play-node game-task-node :offset-assert 20) ;; game-task-node (play-continue string :offset-assert 24) ;; guessed by decompiler (kiosk-play-continue object :offset-assert 28) ;; guessed by decompiler @@ -13929,7 +14125,7 @@ :flag-assert #xa00000020 ;; field kiosk-play-continue uses ~A with a signed load. (:methods - (game-task-info-method-9 (_type_) none) ;; 9 + (get-play-list-idx (_type_) int) ;; 9 ) ) @@ -13966,25 +14162,27 @@ :method-count-assert 32 :size-assert #xf0 :flag-assert #x20007000f0 + (:state-methods + wait ;; 14 + active ;; 15 + complete ;; 16 + resolution ;; 17 + (fail resetter-params) ;; 18 + (restart symbol) ;; 19 + ) (:methods - (task-manager-method-14 () none) ;; 14 ;; (wait () _type_ :state) - (task-manager-method-15 () none) ;; 15 ;; (active () _type_ :state) - (task-manager-method-16 () none) ;; 16 ;; (complete () _type_ :state) - (task-manager-method-17 () none) ;; 17 ;; (fail () _type_ :state) - (task-manager-method-18 () none) ;; 18 ;; (retry () _type_ :state) - (task-manager-method-19 () none) ;; 19 ;; (initialize! (_type_) int) - (task-manager-method-20 () none) ;; 20 ;; (kill-all-children (_type_) int) - (task-manager-method-21 () none) ;; 21 ;; (check-time (_type_) int) - (task-manager-method-22 () none) ;; 22 ;; (task-manager-method-22 (_type_) symbol) - (task-manager-method-23 () none) ;; 23 - (task-manager-method-24 () none) ;; 24 - (task-manager-method-25 () none) ;; 25 - (task-manager-method-26 () none) ;; 26 - (task-manager-method-27 () none) ;; 27 - (task-manager-method-28 () none) ;; 28 - (task-manager-method-29 () none) ;; 29 - (task-manager-method-30 () none) ;; 30 - (task-manager-method-31 (_type_ symbol) resetter-spec) ;; 31 + (init! (_type_) none) ;; 20 + (set-time-limit (_type_) none) ;; + (kill-all-children (_type_) none) ;; 22 ;; (task-manager-method-22 (_type_) symbol) + (hud-timer-handler (_type_) none) ;; 23 + (ready? (_type_) object) ;; 24 + (task-manager-method-25 (_type_) none) ;; 25 + (task-manager-method-26 (_type_) none) ;; 26 + (task-manager-method-27 (_type_) none) ;; 27 + (task-manager-method-28 (_type_) none) ;; 28 + (go-fail (_type_) object) ;; 29 + (taskman-event-handler (_type_ process int symbol event-message-block) object) ;; 30 + (on-fail (_type_ symbol) resetter-params) ;; 31 ) ) @@ -13998,9 +14196,9 @@ :size-assert #x10 :flag-assert #xc00000010 (:methods - (ambient-control-method-9 () none) ;; 9 ;; (dummy-9 () none) - (ambient-control-method-10 () none) ;; 10 ;; (dummy-10 () none) - (ambient-control-method-11 () none) ;; 11 ;; (dummy-11 () none) + (ambient-control-method-9 () none) ;; 9 + (ambient-control-method-10 () none) ;; 10 + (ambient-control-method-11 () none) ;; 11 ) ) @@ -14011,8 +14209,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 ;; @@ -14169,8 +14367,8 @@ ) (deftype generic-gif-tag (structure) - ((data uint32 4 :offset-assert 0) ;; guessed by decompiler - (qword qword :inline :offset 0) + ((data uint32 4 :offset-assert 0 :score -1) ;; guessed by decompiler + (qword qword :inline :offset 0 :score -1) (fan-prim gif-tag-prim :offset 0) ;; guessed by decompiler (str-prim gif-tag-prim :offset 4) ;; guessed by decompiler (regs gif-tag-regs-32 :offset 8) ;; guessed by decompiler @@ -14739,6 +14937,7 @@ ((lod lod-group 6 :inline :offset-assert 0) ;; guessed by decompiler (max-lod int8 :offset-assert 48) ) + :allow-misaligned :method-count-assert 10 :size-assert #x31 :flag-assert #xa00000031 @@ -15383,7 +15582,7 @@ (timer uint8 :offset-assert 6) (overlap uint8 :offset-assert 7) (effect uint32 :offset-assert 8) - (sound symbol :offset-assert 12) ;; guessed by decompiler + (sound string :offset-assert 12) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x10 @@ -15895,7 +16094,7 @@ :size-assert #x60 :flag-assert #xf00000060 (:methods - (new (symbol type float float float vector float float) _type_) ;; 0 + (new (symbol type float float float vector shadow-flags float) _type_) ;; 0 (enable-draw (shadow-control) int) ;; 9 (disable-draw (shadow-control) int) ;; 10 (set-top-plane-offset (shadow-control float) int) ;; 11 @@ -16079,18 +16278,18 @@ :size-assert #x4 :flag-assert #xa00000004 (:methods - (prim-base-method-9 () none) ;; 9 + (generate-dma! "Generate DMA for prim rendering." (_type_ matrix) none) ;; 9 ) ) (defenum prim-flags :type uint32 :bitfield #t - (pf0 0) ;; set by default - (pf1 1) ;; set by default - (pf2 2) - (pf3 3) - (pf4 4) + (alpha-blend-enable 0) ;; set by default + (texture-enable 1) ;; set by default + (fog-enable 2) + (pf3 3) ;; auto-clear vertices? + (pf4 4) ;; has new verts to draw? (no-texture-name 5) ;; only has the ID. ) @@ -16121,7 +16320,7 @@ (:methods (new "Allocate a new prim-strip and room for vertices. The texture can be specified by name or ID." (symbol type int texture-id string) _type_) - (prim-strip-method-10 (_type_ draw-control) none) ;; 10 + (setup-dma-and-tex "Set up the bucket, prim sink, and texture." (_type_ draw-control) none) ;; 10 ) ) @@ -16145,14 +16344,14 @@ (mask vector4w :inline :offset-assert 208) (in-verts int32 :offset-assert 224) (num-verts int32 :offset-assert 228) - (vert-ptr prim-vertex :offset-assert 232) + (vert-ptr (inline-array prim-vertex) :offset-assert 232) (sinks prim-sink 68 :inline :offset-assert 236) ) :method-count-assert 10 :size-assert #x52c :flag-assert #xa0000052c (:methods - (prim-work-method-9 () none) ;; 9 + (reset! "Reset all pending vertex/control data." (_type_) none) ;; 9 ) ) @@ -16329,26 +16528,26 @@ (command-list pair :offset-assert 608) ;; guessed by decompiler (object-name string 256 :offset-assert 612) ;; guessed by decompiler (object-status basic 256 :offset-assert 1636) ;; guessed by decompiler - (update-callback basic :offset-assert 2660) + (update-callback (function load-state object) :offset-assert 2660) ) :method-count-assert 22 :size-assert #xa68 :flag-assert #x1600000a68 (:methods (new (symbol type) _type_) ;; 0 ;; (new (symbol type) _type_) - (load-state-method-9 () none) ;; 9 ;; (reset! (_type_) _type_) - (load-state-method-10 () none) ;; 10 ;; (update! (_type_) int) - (load-state-method-11 () none) ;; 11 ;; (want-levels (_type_ (pointer symbol)) int) + (reset! (_type_) _type_) ;; 9 + (update! (_type_) int) ;; 10 + (want-levels (_type_ (pointer symbol)) int) ;; 11 (want-sound-banks (_type_ (pointer symbol)) none) ;; 12 - (load-state-method-13 () none) ;; 13 ;; (want-display-level (_type_ symbol symbol) int) - (load-state-method-14 () none) ;; 14 ;; (want-vis-level (_type_ symbol) none) - (load-state-method-15 () none) ;; 15 ;; (want-force-vis (_type_ symbol symbol) int) - (load-state-method-16 () none) ;; 16 ;; (want-force-inside (_type_ symbol symbol) none) + (want-display-level (_type_ symbol symbol) int) ;; 13 + (want-vis-level (_type_ symbol) none) ;; 14 + (want-force-vis (_type_ symbol symbol) int) ;; 15 + (want-force-inside (_type_ symbol symbol) none) ;; 16 (execute-commands-up-to (_type_ float) none) ;; 17 (backup-load-state-and-set-cmds (_type_ pair) int) ;; 18 (restore-load-state-and-cleanup (_type_) int) ;; 19 (restore-load-state (_type_) int) ;; 20 - (load-state-method-21 (_type_) none) ;; 21 ;; (add-borrow-levels (_type_) none) + (add-borrow-levels (_type_) none) ;; 21 ) ) @@ -16482,14 +16681,14 @@ (amulet0 0) (amulet1 1) (amulet2 2) - (pass-wascity 3) + (pass-front-gate 3) (seal-of-mar 4) - (pass-factory 5) + (cypher-gliph 5) (artifact-holocube 6) - (artifact-quantum-reflector 7) - (artifact-prism 8) - (artifact-beam-generator 9) - (artifact-time-map 10) + (artifact-av-reflector 7) + (artifact-av-prism 8) + (artifact-av-generator 9) + (artifact-av-map 10) (light-eco-crystal0 11) (light-eco-crystal1 12) (light-eco-crystal2 13) @@ -16579,7 +16778,7 @@ (play-list (array game-task-info) :offset-assert 404) (sub-task-list (array game-task-node-info) :offset-assert 408) (mission-list (array game-task-node-info) :offset-assert 412) - (task-node-commands (array uint8) :offset-assert 416) + (task-node-commands (array game-task-node-command) :offset-assert 416) (task-node-exclusive (array uint16) :offset-assert 420) (task-counter uint32 :offset-assert 424) (unknown-arr4 (array uint16) :offset-assert 428) @@ -16640,7 +16839,7 @@ (dust-storm handle :offset-assert 768) (flut-count int32 :offset-assert 776) (death-resetter resetter-spec :inline :offset-assert 780) - (current-vehicle uint8 :offset-assert 796) + (current-vehicle game-vehicle-u8 :offset-assert 796) (vehicle-turbo-ready float :offset-assert 800) (percent-complete float :offset-assert 804) ) @@ -17154,7 +17353,8 @@ (deftype prototype-bucket-shrub (prototype-bucket) ((next uint32 4 :offset-assert 64) ;; guessed by decompiler (count uint16 4 :offset-assert 80) ;; guessed by decompiler - (mod-count uint16 4 :offset-assert 88) ;; guessed by decompiler + (count-quad uint128 :offset 80) + (mod-count uint16 4 :offset 88) ;; guessed by decompiler (last dma-packet 4 :offset-assert 96) ;; guessed by decompiler (next-clear uint128 :offset 64) (count-clear uint64 :offset 80) @@ -17714,6 +17914,7 @@ "Scratch info computed per-merc-effect by the foreground code, then later read by merc DMA generation. This is only for the currently-processing merc model's effects." ((color-fade rgba :offset-assert 0) ;; guessed by decompiler + (alpha uint8 :offset 3) (merc-path uint8 :offset-assert 4) (ignore-alpha uint8 :offset-assert 5) (disable-draw uint8 :offset-assert 6) @@ -17775,6 +17976,7 @@ :bitfield #t (pls0 0) (pls1 1) + (pls2 2) ) ;; ---engines:part-local-space-flags @@ -17852,7 +18054,7 @@ (radius float :offset-assert 56) (duration float :offset-assert 60) (duration-rand float :offset-assert 64) - (sound symbol :offset-assert 68) + (sound sound-spec :offset-assert 68) (delay float :offset-assert 72) (delay-rand float :offset-assert 76) ) @@ -18675,7 +18877,7 @@ :flag-assert #xd00000053 ;; field actor-option is likely a value type. (:methods - (new (symbol type process (pointer float) pickup-type float) _type_) ;; 0 + (new (symbol type process (pointer float)) _type_) ;; 0 (clear-mask-bits (_type_ int) none) ;; 12 ) ) @@ -18761,9 +18963,9 @@ (new (symbol type process) _type_) ;; 0 (compute-alignment! (_type_) transformq) ;; 9 (align! (_type_ align-opts float float float) trsqv) ;; 10 - (align-control-method-11 () none) ;; 11 ;; (align-vel-and-quat-only! (_type_ align-opts vector int float float) trsqv) - (align-control-method-12 () none) ;; 12 ;; (first-transform (_type_) transform) - (align-control-method-13 () none) ;; 13 ;; (second-transform (_type_) transform) + (align-vel-and-quat-only! (_type_ align-opts vector int float float) trsqv) ;; 11 + (first-transform (_type_) transform) ;; 12 + (second-transform (_type_) transform) ;; 13 ) ) @@ -18772,23 +18974,22 @@ ;; penetrate-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; +++game-h:knocked-type +;; +++penetrate-h:knocked-type (defenum knocked-type :type uint8 - (knocked-type-0 0) - (knocked-type-1 1) - (knocked-type-2 2) - (knocked-type-3 3) - (knocked-type-4 4) ;; what the heck is this! (its on gator, and cant trigger it for the life of me) - (knocked-type-5 5) - (knocked-type-6 6) - (knocked-type-7 7) - (knocked-type-8 8) - (knocked-type-9 9) - (knocked-type-10 10) - ) -;; ---game-h:knocked-type - + (none 0) + (mech-punch 1) + (explode-or-darkjak 2) + (dark-shot 3) + (yellow-shot 4) + (red-shot 5) + (blue-shot 6) + (vehicle 7) + (knocked-off 8) + ) +;; ---penetrate-h:knocked-type + +;; +++penetrate-h:penetrate (defenum penetrate :type uint64 :bitfield #t @@ -18830,7 +19031,35 @@ (jak-dark-nuke 35) (jak-dark-blackhole 36) (emp-blast 37) - ) + (penetrate38 38) + (penetrate39 39) + (penetrate40 40) + (penetrate41 41) + (penetrate42 42) + (penetrate43 43) + (penetrate44 44) + (penetrate45 45) + (penetrate46 46) + (penetrate47 47) + (penetrate48 48) + (penetrate49 49) + (penetrate50 50) + (penetrate51 51) + (penetrate52 52) + (penetrate53 53) + (penetrate54 54) + (penetrate55 55) + (penetrate56 56) + (penetrate57 57) + (penetrate58 58) + (penetrate59 59) + (penetrate60 60) + (penetrate61 61) + (penetrate64 62) + (penetrate63 63) + ) +;; ---penetrate-h:penetrate + (define-extern penetrate->string (function penetrate string)) (define-extern penetrate-using->damage (function penetrate float)) (define-extern penetrated-by-all&hit-points->penetrated-by (function penetrate int penetrate)) @@ -18891,7 +19120,8 @@ 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) + (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 @@ -19244,6 +19474,7 @@ (spec pair :offset-assert 4) ;; guessed by decompiler (func (function script-context object) :offset-assert 8) ;; guessed by decompiler ) + :pack-me :method-count-assert 10 :size-assert #xc :flag-assert #xa0000000c @@ -19273,8 +19504,8 @@ (:methods (new (symbol type object process vector) _type_) ;; 0 (eval! (_type_ pair) object) ;; 9 - (script-context-method-10 () none) ;; 10 ;; (script-context-method-10 (_type_ object pair) object) - (script-context-method-11 () none) ;; 11 ;; (script-context-method-11 (_type_ pair pair symbol) symbol) + (script-context-method-10 (_type_ object pair) object) ;; 10 + (script-context-method-11 (_type_ pair pair symbol) symbol) ;; 11 ) ) @@ -19284,6 +19515,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (declare-type continue-point basic) +(declare-type scene-player process) (deftype scene-actor (basic) ((name string :offset-assert 4) ;; guessed by decompiler @@ -19292,34 +19524,52 @@ (prefix string :offset-assert 16) ;; guessed by decompiler (draw-frames pair :offset-assert 20) ;; guessed by decompiler (scissor-frames pair :offset-assert 24) ;; guessed by decompiler - (shadow-frames basic :offset-assert 28) - (cloth-reset-frames basic :offset-assert 32) - (cloth-commands basic :offset-assert 36) + (shadow-frames pair :offset-assert 28) + (cloth-reset-frames pair :offset-assert 32) + (cloth-commands pair :offset-assert 36) (camera int16 :offset-assert 40) (light-index uint8 :offset-assert 42) (shadow-mask uint8 :offset-assert 43) (shadow-values uint32 :offset-assert 44) (flags uint32 :offset-assert 48) - (command-list basic :offset-assert 52) + (command-list pair :offset-assert 52) (shadow-flags int32 :offset-assert 56) (shadow-volume-joint basic :offset-assert 60) (draw-seg uint64 :offset-assert 64) (no-draw-seg uint64 :offset-assert 72) (last-frame float :offset-assert 80) - (process uint64 :offset-assert 88) ;; handle + (process handle :offset-assert 88) ;; handle ) :method-count-assert 10 :size-assert #x60 :flag-assert #xa00000060 (:methods - (scene-actor-method-9 () none) ;; 9 ;; (scene-actor-method-9 (_type_ scene-player) (pointer process)) + (setup-manipy-for-scene! (_type_ scene-player) (pointer process)) ;; 9 ) ) +;; +++scene-h:scene-flags (defenum scene-flags :bitfield #t :type uint32 - ) + (scf0 0) + (scf1 1) + (scf2 2) + (scf3 3) + (scf4 4) + (scf5 5) + (scf6 6) + (scf7 7) + (scf8 8) + (scf9 9) + (scf10 10) + (scf11 11) + (scf12 12) + (scf13 13) + (scf14 14) + (scf15 15) + ) +;; ---scene-h:scene-flags (deftype scene (art-group) ((scene-flags scene-flags :offset-assert 32) @@ -19334,24 +19584,24 @@ (wait-air-time time-frame :offset-assert 72) ;; time-frame (wait-ground-time time-frame :offset-assert 80) ;; time-frame (actor (array scene-actor) :offset-assert 88) ;; guessed by decompiler - (load-point continue-point :offset-assert 92) ;; guessed by decompiler - (end-point continue-point :offset-assert 96) ;; guessed by decompiler + (load-point basic :offset-assert 92) ;; guessed by decompiler + (end-point basic :offset-assert 96) ;; guessed by decompiler (borrow pair :offset-assert 100) ;; guessed by decompiler (sfx-volume float :offset-assert 104) (ambient-volume float :offset-assert 108) (music-volume float :offset-assert 112) (music-delay float :offset-assert 116) (scene-task uint16 :offset-assert 120) - (on-running basic :offset-assert 124) - (on-complete basic :offset-assert 128) + (on-running pair :offset-assert 124) + (on-complete pair :offset-assert 128) ) :method-count-assert 18 :size-assert #x84 :flag-assert #x1200000084 ;; field on-running uses ~A with a signed load. field on-complete uses ~A with a signed load. (:methods - (scene-method-16 () none) ;; 16 ;; (scene-method-16 (_type_) _type_) - (scene-method-17 () none) ;; 17 + (init-spool-by-scene! (_type_ spool-anim) spool-anim) ;; 16 + (load-scene (_type_) scene) ;; 17 ) ) @@ -19382,21 +19632,23 @@ (last-frame float :offset-assert 376) (end-point basic :offset-assert 380) (blackout-end basic :offset-assert 384) - (new-trans-hook basic :offset-assert 388) - (cur-trans-hook basic :offset-assert 392) + (new-trans-hook (function none) :offset-assert 388) + (cur-trans-hook (function none) :offset-assert 392) (user-data uint64 :offset-assert 400) ) :method-count-assert 26 :size-assert #x198 :flag-assert #x1a01200198 ;; field user-data uses ~A with a 64-bit load. + (:state-methods + (wait symbol) ;; 20 + release ;; 21 + play-anim ;; 22 + ) (:methods - (scene-player-method-20 () none) ;; 20 ;; (wait (symbol) _type_ :state) - (scene-player-method-21 () none) ;; 21 ;; (release () _type_ :state) - (scene-player-method-22 () none) ;; 22 ;; (play-anim () _type_ :state) - (scene-player-method-23 () none) ;; 23 ;; (scene-player-method-23 (_type_ string symbol) none) - (scene-player-method-24 () none) ;; 24 ;; (scene-player-method-24 (_type_ basic symbol) scene) - (scene-player-method-25 () none) ;; 25 ;; (scene-player-method-25 (_type_ float) none) + (scene-player-method-23 (_type_ string symbol) none) ;; 23 + (scene-player-method-24 (_type_ scene symbol) scene) ;; 24 + (scene-player-method-25 (_type_ float float) none) ;; 25 ) ) @@ -19478,6 +19730,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 @@ -19613,11 +19866,11 @@ pov-camera-startup ;; 24 ) (:methods - (pov-camera-method-25 () none) ;; 25 ;; (abort? (_type_) symbol) - (pov-camera-method-26 () none) ;; 26 ;; (target-grabbed? (_type_) symbol) - (pov-camera-method-27 () none) ;; 27 ;; (pov-camera-method-27 () none) - (pov-camera-method-28 () none) ;; 28 ;; (pov-camera-method-28 () none) - (pov-camera-method-29 () none) ;; 29 ;; (target-released? (_type_) symbol) + (abort? (_type_) symbol) ;; 25 + (target-grabbed? (_type_) symbol) ;; 26 + (set-stack-size! (_type_) none) ;; 27 + (pov-camera-method-28 (_type_) none) ;; 28 + (target-released? (_type_) symbol) ;; 29 ) ) @@ -20091,6 +20344,7 @@ :flag-assert #x900000008 ) +(declare-type collide-mesh-cache-tri structure) (deftype collide-mesh (basic) "A collision mesh for foreground objects, bound to the joint specified by `joint-id`." @@ -20104,13 +20358,13 @@ :size-assert #x28 :flag-assert #x1000000028 (:methods - (collide-mesh-method-9 () none) ;; 9 ;; (debug-draw-tris (_type_ process-drawable int) none) - (collide-mesh-method-10 () none) ;; 10 ;; (overlap-test (_type_ collide-mesh-cache-tri vector) symbol) - (collide-mesh-method-11 () none) ;; 11 ;; (should-push-away-test (_type_ collide-mesh-cache-tri collide-tri-result vector float) float) - (collide-mesh-method-12 () none) ;; 12 ;; (sphere-on-platform-test (_type_ collide-mesh-cache-tri collide-tri-result vector float) float) - (collide-mesh-method-13 () none) ;; 13 ;; (unpack-mesh-to-cache! (_type_ (inline-array collide-mesh-cache-tri) matrix) none) - (collide-mesh-method-14 () none) ;; 14 ;; (collide-mesh-math-1 (_type_ object object) none) - (collide-mesh-method-15 () none) ;; 15 ;; (collide-mesh-math-2 (_type_ object object object) none) + (debug-draw-tris (_type_ process-drawable int) none) ;; 9 + (overlap-test (_type_ collide-mesh-cache-tri vector) symbol) ;; 10 + (should-push-away-test (_type_ collide-mesh-cache-tri collide-tri-result vector float) float) ;; 11 + (sphere-on-platform-test (_type_ collide-mesh-cache-tri collide-tri-result vector float) float) ;; 12 + (unpack-mesh-to-cache! (_type_ (inline-array collide-mesh-cache-tri) matrix) none) ;; 13 + (collide-mesh-math-1 (_type_ object object) none) ;; 14 + (collide-mesh-math-2 (_type_ object object object) none) ;; 15 ) ) @@ -20119,7 +20373,7 @@ ((vertex vector 3 :inline :offset-assert 0) ;; guessed by decompiler (normal vector :inline :offset-assert 48) (bbox4w bounding-box4w :inline :offset-assert 64) - (pat pat-surface :offset 60) ;; guessed by decompiler + (pat pat-surface :offset 60 :score 1) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x60 @@ -20129,13 +20383,14 @@ (deftype collide-mesh-cache-entry (structure) "A foreground mesh collide cache entry." ((mat matrix :inline :offset-assert 0) - (tris collide-mesh-cache-tri :dynamic :offset-assert 64) ;; guessed by decompiler + (tris collide-mesh-cache-tri :dynamic :inline :offset-assert 64) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x40 :flag-assert #x900000040 ) +(declare-type collide-shape-prim-mesh basic) (deftype collide-mesh-cache (basic) "A collide cache for foreground meshes." ((used-size uint32 :offset-assert 4) @@ -20147,13 +20402,13 @@ :size-assert #xbb90 :flag-assert #xd0000bb90 (:methods - (collide-mesh-cache-method-9 () none) ;; 9 ;; (populate-for-prim-mesh (_type_ collide-shape-prim-mesh) collide-mesh-cache-entry) + (populate-for-prim-mesh (_type_ collide-shape-prim-mesh) collide-mesh-cache-entry) ;; 9 (is-id? "Does this cache have the given ID?" (_type_ int) symbol) ;; 10 (next-id! "Reset all used entries in the cache and increment the ID. If the id is zero, set it to 1." (_type_) uint) ;; 11 - (collide-mesh-cache-method-12 () none) ;; 12 ;; (allocate! (_type_ int) collide-mesh-cache-entry) + (allocate! (_type_ int) collide-mesh-cache-entry) ;; 12 ) ) @@ -20186,7 +20441,7 @@ :size-assert #x290 :flag-assert #xb00000290 (:methods - (collide-rider-pool-method-9 () none) ;; 9 ;; (add-rider (_type_ handle) collide-rider) + (add-rider (_type_ handle) collide-rider) ;; 9 (prepare (_type_) none) ;; 10 ) ) @@ -20286,6 +20541,10 @@ :flag-assert #x900000020 ) +(declare-type collide-query structure) +(declare-type collide-cache basic) +(declare-type collide-cache-prim structure) +(declare-type collide-shape-prim-group basic) (deftype collide-shape-prim (basic) "Base class for collide primitives." ((cshape collide-shape :offset-assert 4) ;; guessed by decompiler @@ -20307,17 +20566,17 @@ :flag-assert #x1400000050 (:methods (new (symbol type collide-shape uint int) _type_) ;; 0 - (collide-shape-prim-method-9 () none) ;; 9 ;; (debug-draw (_type_) none) - (collide-shape-prim-method-10 () none) ;; 10 ;; (add-fg-prim-using-box (_type_ collide-cache) none) - (collide-shape-prim-method-11 () none) ;; 11 ;; (add-fg-prim-using-line-sphere (_type_ collide-cache object) none) - (collide-shape-prim-method-12 () none) ;; 12 ;; (overlaps-others-test (_type_ overlaps-others-params collide-shape-prim) symbol) - (collide-shape-prim-method-13 () none) ;; 13 ;; (overlaps-others-group (_type_ overlaps-others-params collide-shape-prim-group) symbol) + (debug-draw (_type_) none) ;; 9 + (add-fg-prim-using-box (_type_ collide-cache) none) ;; 10 + (add-fg-prim-using-line-sphere (_type_ collide-cache object) none) ;; 11 + (overlaps-others-test (_type_ overlaps-others-params collide-shape-prim) symbol) ;; 12 + (overlaps-others-group (_type_ overlaps-others-params collide-shape-prim-group) symbol) ;; 13 (collide-shape-prim-method-14 () none) ;; 14 ;; (collide-shape-prim-method-14 () none) - (collide-shape-prim-method-15 () none) ;; 15 ;; (collide-with-collide-cache-prim-mesh (_type_ collide-query collide-cache-prim) none) - (collide-shape-prim-method-16 () none) ;; 16 ;; (collide-with-collide-cache-prim-sphere (_type_ collide-query collide-cache-prim) none) - (collide-shape-prim-method-17 () none) ;; 17 ;; (on-platform-test (_type_ collide-shape-prim collide-query float) none) - (collide-shape-prim-method-18 () none) ;; 18 ;; (should-push-away-test (_type_ collide-shape-prim collide-query) none) - (collide-shape-prim-method-19 () none) ;; 19 ;; (should-push-away-a-group-test (_type_ collide-shape-prim-group collide-query) none) + (collide-with-collide-cache-prim-mesh (_type_ collide-query collide-cache-prim) none) ;; 15 + (collide-with-collide-cache-prim-sphere (_type_ collide-query collide-cache-prim) none) ;; 16 + (on-platform-test (_type_ collide-shape-prim collide-query float) none) ;; 17 + (should-push-away-test (_type_ collide-shape-prim collide-query) none) ;; 18 + (should-push-away-a-group-test (_type_ collide-shape-prim-group collide-query) none) ;; 19 ) ) @@ -20372,14 +20631,25 @@ ) ;; ---collide-shape-h:collide-list-enum +;; +++collide-shape-h:nav-flags +(defenum nav-flags + :type uint8 + :bitfield #t + (has-root-sphere 0) + (has-extra-sphere 1) + (has-child-spheres 2) + ) +;; ---collide-shape-h:nav-flags + (declare-type collide-query structure) +(declare-type water-info structure) (deftype collide-shape (trsqv) "The parent of all of an object's collide primitives. Most [[process-drawable]]s have a [[collide-shape]] that represents their root transform." ((actor-hash-index int16 :offset 12) (process process-drawable :offset-assert 140) ;; guessed by decompiler (max-iteration-count uint8 :offset-assert 144) - (nav-flags uint8 :offset-assert 145) ;; nav-flags + (nav-flags nav-flags :offset-assert 145) ;; nav-flags (total-prims uint8 :offset-assert 146) (num-riders uint8 :offset-assert 147) (pat-ignore-mask pat-surface :offset-assert 148) ;; somehow is missing from inspect?? @@ -20402,31 +20672,31 @@ (new (symbol type process-drawable collide-list-enum) _type_) ;; 0 (move-by-vector! (_type_ vector) none) ;; 28 (move-to-point! (_type_ vector) none) ;; 29 - (collide-shape-method-30 () none) ;; 30 ;; (debug-draw (_type_) none) + (debug-draw (_type_) none) ;; 30 (fill-cache-for-shape (_type_ float collide-query) none) ;; 31 (fill-cache-integrate-and-collide (_type_ vector collide-query meters) none) ;; 32 - (collide-shape-method-33 () none) ;; 33 ;; (find-prim-by-id (_type_ uint) collide-shape-prim) - (collide-shape-method-34 () none) ;; 34 ;; (find-prim-by-id-logtest (_type_ uint) collide-shape-prim) + (find-prim-by-id (_type_ uint) collide-shape-prim) ;; 33 + (find-prim-by-id-logtest (_type_ uint) collide-shape-prim) ;; 34 (detect-riders! (_type_) symbol) ;; 35 - (collide-shape-method-36 () none) ;; 36 ;; (build-bounding-box-for-shape (_type_ bounding-box float collide-spec) symbol) + (build-bounding-box-for-shape (_type_ bounding-box float collide-spec) symbol) ;; 36 (integrate-and-collide! (_type_ vector) none) ;; 37 (find-collision-meshes (_type_) none) ;; 38 - (collide-shape-method-39 () none) ;; 39 ;; (on-platform (_type_ collide-shape collide-query) symbol) + (on-platform (_type_ collide-shape collide-query) symbol) ;; 39 (find-overlapping-shapes (_type_ overlaps-others-params) symbol) ;; 40 - (collide-shape-method-41 () none) ;; 41 ;; (shove-to-closest-point-on-path (_type_ attack-info float) vector) - (collide-shape-method-42 () none) ;; 42 ;; (should-push-away (_type_ collide-shape collide-query) symbol) - (collide-shape-method-43 () none) ;; 43 ;; (pull-rider! (_type_ pull-rider-info) none) + (shove-to-closest-point-on-path (_type_ attack-info float) vector) ;; 41 + (should-push-away (_type_ collide-shape collide-query) symbol) ;; 42 + (pull-rider! (_type_ pull-rider-info) none) ;; 43 (pull-riders! (_type_) symbol) ;; 44 (do-push-aways (_type_) collide-spec) ;; 45 (update-transforms (_type_) none) ;; 46 (set-collide-with! (_type_ collide-spec) none) ;; 47 (set-collide-as! (_type_ collide-spec) none) ;; 48 - (collide-shape-method-49 () none) ;; 49 ;; (modify-collide-as! (_type_ int collide-spec collide-spec) none) - (collide-shape-method-50 () none) ;; 50 ;; (send-shoves (_type_ process touching-shapes-entry float float float) symbol) - (collide-shape-method-51 () none) ;; 51 ;; (above-ground? (_type_ collide-query vector collide-spec float float float) symbol) - (collide-shape-method-52 () none) ;; 52 ;; (water-info-init! (_type_ water-info collide-action) water-info) - (collide-shape-method-53 () none) ;; 53 ;; (iterate-prims (_type_ (function collide-shape-prim none)) none) - (collide-shape-method-54 () none) ;; 54 ;; (pusher-init (_type_) none) + (modify-collide-as! (_type_ int collide-spec collide-spec) none) ;; 49 + (send-shoves (_type_ process touching-shapes-entry float float float) symbol) ;; 50 + (above-ground? (_type_ collide-query vector collide-spec float float float) symbol) ;; 51 + (water-info-init! (_type_ water-info collide-action) water-info) ;; 52 + (iterate-prims (_type_ (function collide-shape-prim none)) none) ;; 53 + (pusher-init (_type_) none) ;; 54 ) ) @@ -20494,11 +20764,14 @@ ;; ---collide-shape-h:collide-status (declare-type collide-query structure) +(declare-type rigid-body-control basic) (deftype collide-shape-moving (collide-shape) "A [[collide-shape]] for moving objects." ((rider-time time-frame :offset-assert 200) ;; time-frame (rider-last-move vector :inline :offset-assert 208) (trans-old vector :inline :offset-assert 224) + (trans-old-old vector :inline :offset 240) ;; added + (trans-old-old-old vector :inline :offset 256) ;; added (poly-pat pat-surface :offset 272) ;; guessed by decompiler (cur-pat pat-surface :offset-assert 276) ;; guessed by decompiler (ground-pat pat-surface :offset-assert 280) ;; guessed by decompiler @@ -20529,19 +20802,19 @@ ;; field penetrate is likely a value type. field penetrate is likely a value type. (:methods (new (symbol type process-drawable collide-list-enum) _type_) ;; 0 - (find-ground (_type_ collide-query collide-spec float float float) symbol) ;; 55 + (find-ground (_type_ collide-query collide-spec float float float process) symbol) ;; 55 (react-to-pat! (_type_ pat-surface) cshape-reaction-flags) ;; 56 - (collide-shape-moving-method-57 () none) ;; 57 ;; (integrate-no-collide! (_type_ vector) none) - (collide-shape-moving-method-58 () none) ;; 58 ;; (integrate-for-enemy-no-mtg (_type_ vector overlaps-others-params) symbol) - (collide-shape-moving-method-59 () none) ;; 59 ;; (move-above-ground (_type_ vector move-above-ground-params) none) - (collide-shape-moving-method-60 () none) ;; 60 ;; (move-to-ground (_type_ float float symbol collide-spec) none) - (collide-shape-moving-method-61 () none) ;; 61 ;; (move-to-ground-point (_type_ vector vector vector) none) + (integrate-no-collide! (_type_ vector) none) ;; 57 + (integrate-for-enemy-no-mtg (_type_ vector overlaps-others-params) symbol) ;; 58 + (move-above-ground (_type_ vector move-above-ground-params) none) ;; 59 + (move-to-ground (_type_ float float symbol collide-spec) none) ;; 60 + (move-to-ground-point (_type_ vector vector vector) none) ;; 61 (compute-acc-due-to-gravity (_type_ vector float) vector) ;; 62 - (collide-shape-moving-method-63 () none) ;; 63 ;; (collide-shape-moving-method-63 (_type_ rigid-body float) none) - (collide-shape-moving-method-64 () none) ;; 64 ;; (try-snap-to-surface (_type_ vector float float float) symbol) + (rbody-collision (_type_ rigid-body-control float) none) ;; 63 + (try-snap-to-surface (_type_ vector float float float) symbol) ;; 64 (fill-and-try-snap-to-surface (_type_ vector float float float collide-query) symbol) ;; 65 - (collide-shape-moving-method-66 () none) ;; 66 ;; (step-collison! (_type_ vector vector float int) float) - (collide-shape-moving-method-67 () none) ;; 67 ;; (collide-with-all-collide-cache-prims (_type_ matrix collide-query) none) + (step-collision! (_type_ vector vector float int) float) ;; 66 + (collide-with-all-collide-cache-prims (_type_ matrix collide-query) none) ;; 67 ) ) @@ -20569,7 +20842,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) @@ -21255,7 +21529,7 @@ (last-nonzero-input-dir-targ quaternion :inline :offset 6384) (time-of-last-wall-hide-first-check-pass time-frame :offset 6400) (time-of-first-wall-hide-first-check-pass time-frame :offset 6408) - (pad uint8 4) + (unknown-float0000 float :offset 6416) ) :size-assert #x1914 :flag-assert #x4400001914 @@ -21291,10 +21565,10 @@ :size-assert #xe8 :flag-assert #xd000000e8 (:methods - (touching-prims-entry-method-9 () none) ;; 9 ;; (get-middle-of-bsphere-overlap (_type_ vector) vector) - (touching-prims-entry-method-10 () none) ;; 10 ;; (get-touched-prim (_type_ collide-shape touching-shapes-entry) collide-shape-prim) - (touching-prims-entry-method-11 () none) ;; 11 ;; (get-touched-tri (_type_ collide-shape touching-shapes-entry) collide-tri-result) - (touching-prims-entry-method-12 () none) ;; 12 + (touching-prims-entry-method-9 (_type_ vector) vector) ;; 9 + (get-middle-of-bsphere-overlap (_type_ vector) vector) ;; 10 + (get-touched-prim (_type_ collide-shape touching-shapes-entry) collide-shape-prim) ;; 11 + (get-touched-tri (_type_ collide-shape touching-shapes-entry) collide-tri-result) ;; 12 ) ) @@ -21308,10 +21582,10 @@ :flag-assert #xd00003c10 (:methods (new (symbol type) _type_) ;; 0 - (touching-prims-entry-pool-method-9 () none) ;; 9 ;; (alloc-node (_type_) touching-prims-entry) - (touching-prims-entry-pool-method-10 () none) ;; 10 ;; (get-free-node-count (_type_) int) + (alloc-node (_type_) touching-prims-entry) ;; 9 + (get-free-node-count (_type_) int) ;; 10 (init-list! (_type_) none) ;; 11 - (touching-prims-entry-pool-method-12 () none) ;; 12 ;; (free-node (_type_ touching-prims-entry) touching-prims-entry) + (free-node (_type_ touching-prims-entry) touching-prims-entry) ;; 12 ) ) @@ -21332,10 +21606,10 @@ (:methods (get-head (_type_) touching-prims-entry) ;; 9 (get-next (_type_ touching-shapes-entry) touching-prims-entry) ;; 10 - (touching-shapes-entry-method-11 () none) ;; 11 ;; (get-touched-shape (_type_ collide-shape) collide-shape) + (get-touched-shape (_type_ collide-shape) collide-shape) ;; 11 (prims-touching? (_type_ collide-shape uint) touching-prims-entry) ;; 12 (prims-touching-action? (_type_ collide-shape collide-action collide-action) basic) ;; 13 - (touching-shapes-entry-method-14 () none) ;; 14 ;; (free-touching-prims-list (_type_) none) + (free-touching-prims-list (_type_) none) ;; 14 ) ) @@ -21349,12 +21623,12 @@ :size-assert #x408 :flag-assert #xe00000408 (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type) _type_) - (touching-list-method-9 () none) ;; 9 ;; (add-touching-prims (_type_ collide-shape-prim collide-shape-prim float collide-tri-result collide-tri-result) none) - (touching-list-method-10 () none) ;; 10 ;; (free-nodes (_type_) none) - (touching-list-method-11 () none) ;; 11 ;; (update-from-step-size (_type_ float) none) - (touching-list-method-12 () none) ;; 12 ;; (send-events-for-touching-shapes (_type_) none) - (touching-list-method-13 () none) ;; 13 ;; (get-shapes-entry (_type_ collide-shape collide-shape) touching-shapes-entry) + (new (symbol type) _type_) ;; 0 + (add-touching-prims (_type_ collide-shape-prim collide-shape-prim float collide-tri-result collide-tri-result) none) ;; 9 + (free-nodes (_type_) none) ;; 10 + (update-from-step-size (_type_ float) none) ;; 11 + (send-events-for-touching-shapes (_type_) none) ;; 12 + (get-shapes-entry (_type_ collide-shape collide-shape) touching-shapes-entry) ;; 13 ) ) @@ -21403,7 +21677,7 @@ :flag-assert #xb000001e4 (:methods (edge-grab-info-method-9 (_type_) symbol) ;; 9 - (edge-grab-info-method-10 () none) ;; 10 ;; (debug-draw (_type_) none) + (edge-grab-info-method-10 (_type_) none) ;; 10 ;; (debug-draw (_type_) none) ) ) @@ -21418,6 +21692,7 @@ :flag-assert #x900000020 ) +(declare-type collide-edge-work structure) (deftype collide-edge-edge (structure) ((ignore symbol :offset-assert 0) (etri collide-edge-tri :offset-assert 4) @@ -21429,7 +21704,7 @@ :size-assert #x30 :flag-assert #xa00000030 (:methods - (collide-edge-edge-method-9 () none) ;; 9 ;; (no-collision-at-edge (_type_ collide-edge-work edge-grab-info) symbol) + (no-collision-at-edge (_type_ collide-edge-work edge-grab-info) symbol) ;; 9 ) ) @@ -21457,8 +21732,8 @@ :size-assert #x810 :flag-assert #xb00000810 (:methods - (collide-edge-hold-list-method-9 () none) ;; 9 ;; (debug-draw (_type_) object) - (collide-edge-hold-list-method-10 () none) ;; 10 ;; (add-to-list! (_type_ collide-edge-hold-item) none) + (debug-draw (_type_) object) ;; 9 + (add-to-list! (_type_ collide-edge-hold-item) none) ;; 10 ) ) @@ -21519,18 +21794,18 @@ :size-assert #x26c0 :flag-assert #x15000026c0 (:methods - (collide-edge-work-method-9 () none) ;; 9 ;; (search-for-edges (_type_ collide-edge-hold-list) none) - (collide-edge-work-method-10 () none) ;; 10 ;; (debug-draw-edges (_type_) object) - (collide-edge-work-method-11 () none) ;; 11 ;; (debug-draw-tris (_type_) none) - (collide-edge-work-method-12 () none) ;; 12 ;; (debug-draw-sphere (_type_) none) - (collide-edge-work-method-13 () none) ;; 13 ;; (find-adjacent-edge (_type_ collide-edge-hold-item edge-grab-info) none) - (collide-edge-work-method-14 () none) ;; 14 ;; (compute-center-point! (_type_ collide-edge-edge vector) float) - (collide-edge-work-method-15 () none) ;; 15 ;; (get-best-hand-point (_type_ vector vector int) float) - (collide-edge-work-method-16 () none) ;; 16 ;; (find-grabbable-edges (_type_) none) - (collide-edge-work-method-17 () none) ;; 17 ;; (find-grabbable-tris (_type_) none) - (collide-edge-work-method-18 () none) ;; 18 ;; (should-add-to-list? (_type_ collide-edge-hold-item collide-edge-edge) symbol) - (collide-edge-work-method-19 () none) ;; 19 ;; (find-best-grab! (_type_ collide-edge-hold-list edge-grab-info) symbol) - (collide-edge-work-method-20 () none) ;; 20 ;; (check-grab-for-collisions (_type_ collide-edge-hold-item edge-grab-info) symbol) + (search-for-edges (_type_ collide-edge-hold-list) none) ;; 9 + (debug-draw-edges (_type_) object) ;; 10 + (debug-draw-tris (_type_) none) ;; 11 + (debug-draw-sphere (_type_) none) ;; 12 + (find-adjacent-edge (_type_ collide-edge-hold-item edge-grab-info) none) ;; 13 + (compute-center-point! (_type_ collide-edge-edge vector) float) ;; 14 + (get-best-hand-point (_type_ vector vector int) float) ;; 15 + (find-grabbable-edges (_type_) none) ;; 16 + (find-grabbable-tris (_type_) none) ;; 17 + (should-add-to-list? (_type_ collide-edge-hold-item collide-edge-edge) symbol) ;; 18 + (find-best-grab! (_type_ collide-edge-hold-list edge-grab-info) symbol) ;; 19 + (check-grab-for-collisions (_type_ collide-edge-hold-item edge-grab-info) symbol) ;; 20 ) ) @@ -21631,8 +21906,9 @@ ;; ---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) + (root collide-shape :override) + (focus-status focus-status :offset-assert 200) ) :method-count-assert 28 :size-assert #xd0 @@ -21657,6 +21933,15 @@ (defenum process-taskable-flags :type uint32 :bitfield #t + (ptf0 0) + (ptf1 1) + (ptf2 2) + (ptf3 3) + (ptf4 4) + (ptf5 5) + (ptf6 6) + (ptf7 7) + (ptf8 8) ) ;; ---process-taskable-h:process-taskable-flags @@ -21685,13 +21970,13 @@ (play-game game-task-event) ) (:methods - (process-taskable-method-33 () none) ;; 33 ;; (init-art! (_type_) none) - (process-taskable-method-34 () none) ;; 34 ;; (process-taskable-method-34 (_type_) symbol) - (process-taskable-method-35 () none) ;; 35 ;; (get-art-elem (_type_) art-element) - (process-taskable-method-36 () none) ;; 36 ;; (process-taskable-method-36 (_type_) none) - (process-taskable-method-37 () none) ;; 37 ;; (process-taskable-method-37 (_type_) none) - (process-taskable-method-38 () none) ;; 38 - (process-taskable-method-39 () none) ;; 39 + (init-collision! (_type_) none) ;; 33 + (init-defaults! (_type_) none) ;; 34 + (init-skeleton! (_type_) none) ;; 35 + (process-taskable-method-36 (_type_) symbol) ;; 36 + (get-art-element (_type_) art-element) ;; 37 + (process-taskable-method-38 (_type_) none) ;; 38 + (update-cloth-and-shadow (_type_) none) ;; 39 ) ) @@ -21709,7 +21994,7 @@ :flag-assert #xd0000000c (:methods (clear-focused "Reset the focus' handle." (_type_) none) ;; 9 - (collide-check? + (collide-spec-match? "If the focused process is not dead, check that the [[collide-spec]] of the focus and the process match." (_type_ process-focusable) object) ;; 10 @@ -21762,11 +22047,11 @@ (:methods (new (symbol type process-drawable) _type_) ;; 0 (effect-control-method-9 (_type_) none) ;; 9 - (do-effect (_type_ symbol float int) none) ;; 10 - (effect-control-method-11 () none) ;; 11 ;; (do-effect-for-surface (_type_ symbol float int basic pat-surface) none) + (do-effect (_type_ string float int) none) ;; 10 + (do-effect-for-surface (_type_ symbol float int basic pat-surface) none) ;; 11 (play-effect-sound (_type_ symbol float int basic sound-name) int) ;; 12 (set-channel-offset! (_type_ int) none) ;; 13 - (effect-control-method-14 () none) ;; 14 ;; (play-effects-from-res-lump (_type_ float float float) none) + (play-effects-from-res-lump (_type_ float float float) none) ;; 14 ) ) @@ -21859,6 +22144,7 @@ ((id uint32 :offset-assert 0) (collidable basic :offset-assert 4) ) + :pack-me :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 @@ -21935,7 +22221,7 @@ (axis-scale vector :inline :offset 48) (avg-extents vector :inline :offset 64) (bucket-array uint32 :offset 44) - (item-array (inline-array collide-hash-item) :offset 60) ;; guessed by decompiler + (item-array (inline-array collide-hash-item) :offset 60 :score 1) ;; guessed by decompiler (dimension-array uint32 3 :offset 76) ;; guessed by decompiler (num-items uint32 :offset 92) ) @@ -22042,7 +22328,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) @@ -22055,22 +22341,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 ) ) @@ -22185,7 +22471,7 @@ (num-children int8 :offset-assert 147) (old-param0 basic :offset-assert 148) (hit-sound sound-name :offset-assert 160) - (ground-pat uint32 :offset-assert 176) + (ground-pat pat-surface :offset-assert 176) (user0 int32 :offset-assert 180) (original-speed float :offset-assert 184) ) @@ -22206,7 +22492,7 @@ (rf5 5) (rf6 6) (rf7 7) - (rf8 8) + (mirror 8) (rf9 9) (rf10 10) (rf11 11) @@ -22254,24 +22540,25 @@ (ragdoll-method-10 (_type_ process-drawable symbol vector symbol) none) ;; 10 (turn-off-for-duration! (_type_ time-frame) none) ;; 11 (get-parent-joint (_type_ (inline-array ragdoll-joint)) ragdoll-joint) ;; 12 - (ragdoll-method-13 (_type_ ragdoll-edit-info) none) ;; 13 - (ragdoll-method-14 (_type_) none) ;; 14 - (ragdoll-method-15 (_type_ process-drawable matrix) none) ;; 15 + (ragdoll-method-13 (_type_ ragdoll-edit-info ragdoll-joint matrix matrix) none) ;; 13 + (ragdoll-method-14 (_type_ process-drawable ragdoll-joint object matrix) none) ;; 14 + (ragdoll-method-15 (_type_ process-drawable ragdoll-edit-info) none) ;; 15 (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-20 (_type_ vector) none) ;; 20 + (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 (ragdoll-method-23 (_type_ vector vector float symbol) none) ;; 23 (ragdoll-method-24 (_type_ vector int) none) ;; 24 - (ragdoll-method-25 (_type_ process-drawable) none) ;; 25 + (enable-ragdoll! (_type_ process-drawable) none) ;; 25 ) ) (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) ) @@ -22283,9 +22570,9 @@ ) (:methods (ragdoll-proc-method-15 (_type_ symbol vector symbol) none) ;; 15 - (ragdoll-proc-method-16 (_type_ int) none) ;; 16 - (ragdoll-proc-method-17 (_type_ matrix) none) ;; 17 - (ragdoll-proc-method-18 (_type_ ragdoll-edit-info process) none) ;; 18 + (disable-for-duration (_type_ time-frame) none) ;; 16 + (ragdoll-proc-method-17 (_type_ ragdoll-edit-info) none) ;; 17 + (ragdoll-proc-method-18 (_type_ ragdoll-edit-info) none) ;; 18 (ragdoll-proc-method-19 (_type_) none) ;; 19 ) ) @@ -22376,7 +22663,7 @@ (sound-id sound-id :offset-assert 464) ;; guessed by decompiler (stop-speed meters :offset-assert 468) (invinc-time time-frame :offset-assert 472) ;; time-frame - (desired-target uint64 :offset-assert 480) + (desired-target handle :offset-assert 480) (desired-target-pos vector :inline :offset-assert 496) ) :method-count-assert 41 @@ -22396,11 +22683,11 @@ (play-impact-sound (_type_ projectile-options) none) ;; 28 (projectile-method-29 (_type_) none) ;; 29 ;; (stop-sound! (_type_) none) (setup-collision! (_type_) none) ;; 30 - (projectile-method-31 (_type_) none) ;; 31 ;; (init-proj-settings! (_type_) none) + (init-proj-settings! (_type_) none) ;; 31 (projectile-method-32 (_type_) none) ;; 32 ;; (go-moving! (_type_) none) (go-impact! (_type_) none) ;; 33 ;; (go-sitting! (_type_) none) (projectile-method-34 (_type_) none) ;; 34 ;; (kill-projectile! (_type_) symbol) - (event-handler! (_type_ process int symbol event-message-block) object) ;; 35 + (proj-event-handler (_type_ process int symbol event-message-block) object) ;; 35 (handle-proj-hit! (_type_ process event-message-block) object) ;; 36 (deal-damage! (_type_ process event-message-block) symbol) ;; 37 (made-impact? (_type_) symbol) ;; 38 @@ -22413,7 +22700,7 @@ ((pos vector :inline :offset-assert 0) (vel vector :inline :offset-assert 16) (target-pos vector :inline :offset-assert 32) - (target-handle uint64 :offset-assert 48) + (target-handle handle :offset-assert 48) (ent entity :offset-assert 56) ;; guessed by decompiler (charge float :offset-assert 60) (attack-id uint32 :offset-assert 64) @@ -22421,7 +22708,7 @@ (notify-handle handle :offset-assert 80) ;; handle (owner-handle handle :offset-assert 88) ;; handle (ignore-handle handle :offset-assert 96) ;; handle - (timeout time-frame :offset-assert 104) ;; time-frame + (timeout time-frame :offset-assert 104) ;; time-frame (damage float :offset-assert 112) (vehicle-damage-factor float :offset-assert 116) (vehicle-impulse-factor float :offset-assert 120) @@ -22432,7 +22719,7 @@ ) (deftype projectile-bounce (projectile) - ((played-bounce-time time-frame :offset-assert 512) ;; time-frame + ((played-bounce-time time-frame :offset-assert 512) ;; time-frame (tumble-quat quaternion :inline :offset-assert 528) (gravity float :offset-assert 544) ) @@ -22553,6 +22840,7 @@ (defenum target-anim :type int32 (uninitialized -2) + (unknown -1) (default 0) (board 1) (dark 2) @@ -22576,7 +22864,8 @@ (declare-type rigid-body-impact structure) (deftype target (process-focusable) - ((control control-info :offset 128 :score 1) ;; guessed by decompiler + ((self 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 @@ -22591,7 +22880,8 @@ (leg-ik joint-mod-ik 2 :offset-assert 252) ;; guessed by decompiler (foot joint-mod 2 :offset-assert 260) ;; guessed by decompiler (cloth symbol :offset-assert 268) - (init-time time-frame :offset-assert 272) ;; time-frame + (mech-ik joint-mod-ik 2 :offset-assert 272) ;; added + (init-time time-frame :offset 272) ;; time-frame (teleport-time time-frame :offset-assert 280) ;; time-frame (state-hook-time time-frame :offset-assert 288) ;; time-frame (state-hook (function none :behavior target) :offset-assert 296) ;; guessed by decompiler @@ -22626,9 +22916,9 @@ (mode-param1 handle :offset-assert 2320) ;; handle (mode-param2 uint64 :offset-assert 2328) (mode-param3 uint64 :offset-assert 2336) - (major-mode-exit-hook basic :offset-assert 2344) - (major-mode-event-hook basic :offset-assert 2348) - (sub-mode-exit-hook basic :offset-assert 2352) + (major-mode-exit-hook (function none :behavior target) :offset-assert 2344) + (major-mode-event-hook (function none :behavior target) :offset-assert 2348) + (sub-mode-exit-hook (function none :behavior target) :offset-assert 2352) (ext-geo-control external-art-buffer :offset-assert 2356) (pending-ext-geo target-geo :offset-assert 2360) (ext-geo target-geo :offset-assert 2364) @@ -22693,14 +22983,14 @@ target-hide target-float (target-grab symbol) - (target-play-anim string handle) ;; associated process guessed by decompiler, old: (state string handle target) - (target-clone-anim handle) ;; associated process guessed by decompiler, old: (state handle target) - (target-continue continue-point) ;; associated process guessed by decompiler, old: (state continue-point target) + (target-play-anim string handle) + (target-clone-anim handle) + (target-continue continue-point) (target-blast-recover rigid-body-impact) - (target-warp-in vector vector) ;; associated process guessed by decompiler, old: (state vector vector target target) - target-warp-out ;; associated process guessed by decompiler, old: (state vector vector target target) + (target-warp-in vector vector object) + (target-warp-out vector vector handle) target-launch-dir - (target-death symbol) ;; associated process guessed by decompiler, old: (state symbol target) + (target-death symbol) ;; general states target-stance target-stance-ambient @@ -22710,16 +23000,16 @@ target-attack target-running-attack (target-attack-air symbol) - (target-attack-uppercut float float) ;; associated process guessed by decompiler, old: (state float float target) - (target-attack-uppercut-jump float float) ;; associated process guessed by decompiler, old: (state float float target) + (target-attack-uppercut float float) + (target-attack-uppercut-jump float float) target-roll (target-roll-flip float float) target-turn-around (target-jump float float surface) - (target-jump-forward float float) + (target-jump-forward float float symbol) (target-high-jump float float object) (target-double-jump float float) - (target-falling symbol) + (target-falling object) target-slide-down (target-flop float float float object) (target-hit-ground symbol) @@ -22729,7 +23019,7 @@ (target-duck-walk symbol) (target-duck-high-jump float float symbol) (target-duck-high-jump-jump float float symbol) - (target-hit symbol attack-info) ;; associated process guessed by decompiler, old: (state symbol attack-info target) + (target-hit symbol attack-info) target-slide-down-to-ground ;; gun target-gun-stance @@ -22742,7 +23032,7 @@ target-darkjak-running-attack target-darkjak-smack-charge target-darkjak-smack - target-darkjak-bomb1 ;; associated process guessed by decompiler, old: (state float float target) + (target-darkjak-bomb1 float float) target-darkjak-bomb0 (target-invisible-get-on handle time-frame) ;; lightjak @@ -22780,62 +23070,63 @@ (target-board-clone-anim handle) ;; flut (target-flut-start handle symbol int) - target-flut-get-on - target-flut-get-off + (target-flut-get-on handle) + (target-flut-get-off handle) target-flut-get-off-jump - target-flut-eject + (target-flut-eject symbol) target-flut-grab target-flut-stance target-flut-walk - target-flut-jump - target-flut-double-jump + (target-flut-jump float float) + (target-flut-double-jump float float) target-flut-running-attack - target-flut-air-attack + (target-flut-air-attack float) target-flut-air-attack-hit-ground - target-flut-hit + (target-flut-hit symbol attack-info) target-flut-hit-ground - target-flut-falling - target-flut-kanga-catch - target-flut-death - target-flut-clone-anim + (target-flut-falling object) + (target-flut-kanga-catch handle symbol) + (target-flut-death symbol) + (target-flut-clone-anim handle) + target-flut-run-wild ;; mech (target-mech-start handle float symbol) - target-mech-get-on ;; associated process guessed by decompiler, old: (state handle target) + (target-mech-get-on handle) target-mech-get-off - target-mech-get-up + (target-mech-get-up handle) target-mech-grab target-mech-stance target-mech-walk - target-mech-jump ;; associated process guessed by decompiler, old: (state float float surface target) + (target-mech-jump float float surface) target-mech-punch target-mech-shield - target-mech-hit ;; associated process guessed by decompiler, old: (state symbol attack-info target) - target-mech-hit-ground ;; associated process guessed by decompiler, old: (state symbol target) - target-mech-falling ;; associated process guessed by decompiler, old: (state symbol target) + (target-mech-hit symbol attack-info) + (target-mech-hit-ground symbol) + (target-mech-falling symbol) target-mech-carry-pickup target-mech-carry-stance target-mech-carry-walk - target-mech-carry-jump ;; associated process guessed by decompiler, old: (state float float symbol target) + (target-mech-carry-jump float float) target-mech-carry-drag target-mech-carry-drop target-mech-carry-throw - target-mech-carry-hit-ground ;; associated process guessed by decompiler, old: (state symbol target) + (target-mech-carry-hit-ground symbol) target-mech-carry-falling - target-mech-death ;; associated process guessed by decompiler, old: (state symbol target) - target-mech-clone-anim ;; associated process guessed by decompiler, old: (state handle target) + (target-mech-death symbol) + (target-mech-clone-anim handle) ;; pilot (target-racing-start handle) (target-grab-ride handle) - (target-pilot-edge-grab pilot-edge-grab-info) ;; associated process guessed by decompiler, old: (state pilot-edge-grab-info target) + (target-pilot-edge-grab pilot-edge-grab-info) (target-pilot-start handle symbol symbol) target-pilot-get-on - target-pilot-get-off + (target-pilot-get-off handle) target-pilot-stance target-pilot-grab target-pilot-impact - target-pilot-hit ;; associated process guessed by decompiler, old: (state symbol attack-info target) - target-pilot-death ;; associated process guessed by decompiler, old: (state symbol target) - target-pilot-clone-anim ;; associated process guessed by decompiler, old: (state handle target) + (target-pilot-hit symbol attack-info) + (target-pilot-death symbol) + (target-pilot-clone-anim handle) target-pilot-daxter-perch ;; indax (target-indax-start handle object) ;; associated process guessed by decompiler, old: (state handle target) @@ -22844,16 +23135,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 @@ -22867,7 +23164,7 @@ ;; pole (target-pole-cycle handle) (target-pole-flip-up float float float) - (target-pole-flip-up-jump float float) + (target-pole-flip-up-jump float float symbol) (target-pole-flip-forward float float float) (target-pole-flip-forward-jump float float) (target-launch float symbol vector int) @@ -22883,9 +23180,19 @@ ;; ladder (target-ladder-start handle) target-ladder + target-ladder-stance + target-ladder-walk-up + target-ladder-walk-down + target-ladder-slide-down + target-ladder-switch + target-ladder-jump-off ;; tube - (target-tube-start handle) target-tube + target-tube-walk + (target-tube-start handle) + (target-tube-jump float float) + (target-tube-hit symbol attack-info) + (target-tube-death symbol) ;; tobot tobot-stance ) @@ -22995,7 +23302,7 @@ (nav) (nav-dma-all) (nav-dma-read) - (nav-dma-write) + (nav-dma-write) ;; 10 (nav-dma-work) (nav-part1) (nav-part2) @@ -23005,7 +23312,7 @@ (nav-part6) (nav-part7) (nav-part8) - (nav-part9) + (nav-part9) ;; 20 (nav-part10) (add-to-translation) (update-current-poly) @@ -23015,7 +23322,7 @@ (travel-around-spheres) (avoid-spheres) (check-vector-collision-with-nav-spheres) - (find-nearest-poly) + (find-nearest-poly) ;; 30 (find-containing-poly) (generate-velocity) (apply-rotation) @@ -23025,7 +23332,7 @@ (misc) (mercneric) (tie-generic) - (background) + (background) ;; 40 (drawable) (tfrag) (tfrag-scissor) @@ -23035,7 +23342,7 @@ (proto-tie) (bones) (camera) - (foreground) + (foreground) ;; 50 (hover-path) (hover-spheres) (hover-update) @@ -23057,6 +23364,9 @@ ) (declare-type entity-camera entity) +(declare-type entity-nav-mesh structure) +(declare-type entity-race-mesh entity) +(declare-type city-level-info structure) (deftype bsp-node (structure) "A node in the 'BSP' tree. This is really a bounding volume tree, where each volume is an axis-aligned box, containing 2 child boxes. @@ -23078,50 +23388,51 @@ "The bsp-header is really an entire level. This probably started as a very simple structure, but now it is extremely complicated." ((info file-info :offset 4) - (all-visible-list (pointer uint16) :offset 32) ;; guessed by decompiler - (visible-list-length int16 :offset 36) - (drawable-trees drawable-tree-array :offset 40) ;; guessed by decompiler - (pat pointer :offset 44) ;; guessed by decompiler - (pat-length int32 :offset 48) + (all-visible-list (pointer uint8) :offset-assert 32) ;; guessed by decompiler + (visible-list-length int16 :offset-assert 36) + (extra-vis-list-length int16 :offset-assert 38) + (drawable-trees drawable-tree-array :offset-assert 40) ;; guessed by decompiler + (pat pointer :offset-assert 44) ;; guessed by decompiler + (pat-length int32 :offset-assert 48) ;; jak2: unlikely to match jak 3 exactly!! (texture-remap-table (pointer uint64) :offset-assert 52) (texture-remap-table-len int32 :offset-assert 56) (texture-ids (pointer texture-id) :offset-assert 60) (texture-page-count int32 :offset-assert 64) (unknown-basic basic :offset-assert 68) ;; seems to be 0 everywhere. - ; (name symbol :offset-assert 72) - ; (nickname symbol :offset-assert 76) - ; (vis-info level-vis-info 8 :offset-assert 80) - (actors drawable-inline-array-actor :offset 112) + (name symbol :offset-assert 72) + (nickname symbol :offset-assert 76) + (vis-info level-vis-info 8 :offset-assert 80) + (actors drawable-inline-array-actor :offset-assert 112) (cameras (array entity-camera) :offset-assert 116) - (nodes (inline-array bsp-node) :offset 120) + (nodes (inline-array bsp-node) :offset-assert 120) ;; jak2: unlikely to match jak 3 exactly!! (level level :offset-assert 124) (current-leaf-idx uint16 :offset-assert 128) - (texture-flags texture-page-flag 10 :offset 130) + (texture-flags texture-page-flag 10 :offset-assert 130) (cam-outside-bsp uint8 :offset 152) (cam-using-back uint8 :offset-assert 153) (cam-box-idx uint16 :offset-assert 154) - ; (ambients symbol :offset-assert 156) ;; now just #t? - ; (subdivide-close float :offset-assert 160) - ; (subdivide-far float :offset-assert 164) - ; (race-meshes (array entity-race-mesh) :offset-assert 168) + (ambients symbol :offset-assert 156) ;; now just #t? + (subdivide-close float :offset 160) + (subdivide-far float :offset-assert 164) + (race-meshes (array entity-race-mesh) :offset-assert 168) (actor-birth-order (pointer uint32) :offset 172) - ; (light-hash light-hash :offset-assert 176) - ; (nav-meshes (array entity-nav-mesh) :offset-assert 180) - ; (actor-groups (array actor-group) :offset-assert 184) + (light-hash light-hash :offset-assert 176) + (nav-meshes (array entity-nav-mesh) :offset-assert 180) + (actor-groups (array actor-group) :offset-assert 184) (region-trees (array drawable-tree-region-prim) :offset 188) - ; (region-array region-array :offset-assert 192) + (region-array region-array :offset-assert 192) (collide-hash collide-hash :offset 196) ; ;; 200 is some array - ; (wind-array uint32 :offset 200) + (wind-array uint32 :offset 200) ; ;; 204 is maybe that array's length - ; (wind-array-length int32 :offset 204) - ; (city-level-info city-level-info :offset 208) + (wind-array-length int32 :offset 204) + (city-level-info city-level-info :offset 208) (vis-spheres vector-array :offset 216) (vis-spheres-length uint32 :offset 248) - ; (region-tree drawable-tree-region-prim :offset 252) + (region-tree drawable-tree-region-prim :offset 252) (tfrag-masks texture-masks-array :offset 256) (tfrag-closest (pointer float) :offset-assert 260) @@ -23142,7 +23453,7 @@ (bsp-scale vector :inline :offset 288) (bsp-offset vector :inline :offset-assert 304) - (unk-drawable drawable :offset 320) + (hfrag-drawable drawable :offset 320) (end uint8 :offset #x18f) @@ -23251,6 +23562,7 @@ (prim-index uint16 :offset 56) (user16 uint16 :offset 58) (user32 uint32 :offset 60) + (clear-flags uint128 :offset 48) ;; added ) :method-count-assert 9 :size-assert #x40 @@ -23266,6 +23578,7 @@ (fake-prim 2) ) +(declare-type collide-list structure) (deftype collide-cache-prim (structure) "A primitive inside the collide-cache. This can represent a sphere, a triangle mesh, or a group of other primitives within a bounding sphere." @@ -23285,8 +23598,8 @@ :size-assert #x30 :flag-assert #xb00000030 (:methods - (collide-cache-prim-method-9 () none) ;; 9 ;; (resolve-moving-sphere-tri (_type_ collide-tri-result collide-prim-core vector float collide-action) float) - (collide-cache-prim-method-10 () none) ;; 10 ;; (resolve-moving-sphere-sphere (_type_ collide-tri-result collide-prim-core vector float collide-action) float) + (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 ) ) @@ -23298,7 +23611,9 @@ The supported queries are 'line-sphere' (raycast) and 'spheres' (check if intersecting anything). It is not useful for ollision queries against a specific foreground object, like 'am I on top of platform X right now?'." ((num-tris int32 :offset-assert 4) + (num-tris-u32 uint32 :offset 4) (num-prims int32 :offset-assert 8) + (num-prims-u32 uint32 :offset 8) (ignore-mask pat-surface :offset-assert 12) ;; guessed by decompiler (ignore-processes process 2 :offset-assert 16) ;; guessed by decompiler (collide-box bounding-box :inline :offset-assert 32) @@ -23312,19 +23627,19 @@ :size-assert #x8670 :flag-assert #x1a00008670 (:methods - (collide-cache-method-9 () none) ;; 9 ;; (debug-draw (_type_) none) + (debug-draw (_type_) none) ;; 9 (fill-and-probe-using-line-sphere (_type_ collide-query) float) ;; 10 (fill-and-probe-using-spheres (_type_ collide-query) symbol) ;; 11 - (collide-cache-method-12 () none) ;; 12 ;; (fill-using-bounding-box (_type_ collide-query) none) + (fill-using-bounding-box (_type_ collide-query) none) ;; 12 (fill-using-line-sphere (_type_ collide-query) none) ;; 13 - (collide-cache-method-14 () none) ;; 14 ;; (fill-using-spheres (_type_ collide-query) none) - (collide-cache-method-15 () none) ;; 15 ;; (reset (_type_) none) + (fill-using-spheres (_type_ collide-query) none) ;; 14 + (reset (_type_) none) ;; 15 (probe-using-line-sphere (_type_ collide-query) float) ;; 16 - (collide-cache-method-17 () none) ;; 17 ;; (probe-using-spheres (_type_ collide-query) symbol) - (collide-cache-method-18 () none) ;; 18 ;; (fill-from-bg (_type_ (function collide-hash int collide-list collide-query int) (function collide-cache collide-list collide-query none) collide-query) none) - (collide-cache-method-19 () none) ;; 19 ;; (fill-from-fg-boxes (_type_) none) - (collide-cache-method-20 () none) ;; 20 ;; (fill-from-fg-line-sphere (_type_ collide-query) none) - (collide-cache-method-21 () none) ;; 21 ;; (fill-from-water (_type_ water-control) none) + (probe-using-spheres (_type_ collide-query) symbol) ;; 17 + (fill-from-bg (_type_ (function collide-hash int collide-list collide-query int) (function collide-cache collide-list collide-query none) collide-query) none) ;; 18 + (fill-from-fg-boxes (_type_) none) ;; 19 + (fill-from-fg-line-sphere (_type_ collide-query) none) ;; 20 + (fill-from-water (_type_ water-control) none) ;; 21 (collide-cache-method-22 () none) ;; 22 ;; (collide-cache-method-22 () none) (collide-cache-method-23 () none) ;; 23 ;; (collide-cache-method-23 () none) (collide-cache-method-24 () none) ;; 24 ;; (collide-cache-method-24 () none) @@ -23370,7 +23685,9 @@ (ignore-process0 process-tree :offset 88) ;; guessed by decompiler (ignore-process1 process-tree :offset 92) ;; guessed by decompiler (ignore-pat pat-surface :offset-assert 96) ;; guessed by decompiler + (ignore-pat-s32 int32 :offset 96) (collide-with collide-spec :offset-assert 100) ;; guessed by decompiler + (collide-with-s32 int32 :offset 100) (overlay-params uint32 3 :offset 112) ;; guessed by decompiler (bbox bounding-box :inline :offset-assert 128) (bbox4w bounding-box4w :inline :offset-assert 160) @@ -23384,7 +23701,7 @@ (spheres (inline-array sphere) :offset 112 :score 1) ;; guessed by decompiler (num-spheres uint32 :offset 116) (solid-only symbol :offset 120) ;; guessed by decompiler - (best-dist float :offset 112) + (best-dist float :offset 112 :score 2) (best-other-prim collide-shape-prim :offset 116 :score 1) ;; guessed by decompiler (best-my-prim collide-shape-prim :offset 120 :score 1) ;; guessed by decompiler (move-vec vector :inline :offset 224) @@ -23407,6 +23724,15 @@ :flag-assert #x90000021c ) +(deftype do-push-aways-work (structure) + "Added" + ((cquery collide-query :inline) + (push-vel vector :inline) + (vec33 vector :inline :offset 560) + (cspec collide-spec :offset 576) + ) + ) + (define-extern *collide-test-flag* symbol) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -23547,7 +23873,7 @@ (vertex-tmpl dma-packet :inline :offset-assert 64) (mscal-tmpl dma-packet :inline :offset-assert 80) (init-tmpl dma-packet :inline :offset-assert 96) - (init-data qword 8 :offset-assert 112) ;; guessed by decompiler + (init-data qword 2 :inline :offset-assert 112) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x90 @@ -24019,6 +24345,7 @@ (dma-base uint32 :offset 36) (dma-level-1 uint32 :offset 40) (dma-qwc uint8 4 :offset 44) ;; guessed by decompiler + (dma-qwc-word uint32 :overlay-at dma-qwc) (shader (inline-array adgif-shader) :offset 48) ;; guessed by decompiler (num-shaders uint8 :offset 52) (num-base-colors uint8 :offset 53) @@ -24028,6 +24355,7 @@ (color-count uint8 :offset 57) (texture-masks-index uint16 :offset 58) (generic generic-tfragment :offset 60) + (generic-u32 uint32 :offset 60) ;; added ) :method-count-assert 17 :size-assert #x40 @@ -24244,7 +24572,8 @@ ) (deftype hfrag-packed-index (uint16) - () + ((bit11 uint8 :offset 11 :size 5) + ) :flag-assert #x900000002 ) @@ -24495,14 +24824,14 @@ ((start-corner vector :inline :offset-assert 32) (spheres uint32 :offset-assert 48) (visids uint32 :offset-assert 52) - (shaders (inline-array adgif-shader) :offset-assert 56) + (shaders (inline-array adgif-shader) :offset-assert 56) (colors basic :offset-assert 60) (montage uint32 :offset-assert 64) (buckets-far uint32 :offset-assert 68) (buckets-mid uint32 :offset-assert 72) (buckets-near uint32 :offset-assert 76) - (verts uint32 :offset-assert 80) - (pat-array uint32 :offset-assert 84) + (verts (inline-array hfrag-vertex) :offset-assert 80) + (pat-array (pointer pat-surface) :offset-assert 84) (pat-length uint16 :offset-assert 88) (num-buckets-far uint16 :offset-assert 90) (num-buckets-mid uint16 :offset-assert 92) @@ -24513,11 +24842,11 @@ :size-assert #x60 :flag-assert #x1600000060 (:methods - (hfragment-method-17 () none) ;; 17 - (hfragment-method-18 () none) ;; 18 - (hfragment-method-19 () none) ;; 19 - (hfragment-method-20 () none) ;; 20 - (hfragment-method-21 () none) ;; 21 + (hfragment-method-17 (_type_ collide-cache collide-query) none) ;; 17 + (hfragment-method-18 (_type_ collide-cache collide-query) none) ;; 18 + (hfragment-method-19 (_type_ collide-cache collide-query int int int int) none) ;; 19 + (hfragment-method-20 (_type_ collide-cache int int uint uint uint pat-surface) none) ;; 20 + (hfragment-method-21 (_type_ collide-cache int int uint uint uint pat-surface) none) ;; 21 ) ) @@ -24945,7 +25274,7 @@ :size-assert #x40 :flag-assert #xa00000040 (:methods - (entity-links-method-9 () none) ;; 9 ;; (birth? (_type_ vector) symbol) + (birth? (_type_ vector) symbol) ;; 9 ) ) @@ -25042,7 +25371,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 @@ -25099,7 +25428,7 @@ (sx float :offset 12) (sy float :offset 28) (rot float :offset 24) - (flag int32 :offset 16) + (flag int32 :offset 16 :score 1) (matrix int32 :offset 20) (warp-turns int32 :offset 16) (r float :offset 32) @@ -25844,6 +26173,7 @@ (sym symbol :offset 4) ;; guessed by decompiler (sound sound-spec :offset 4) ;; guessed by decompiler ) + :allow-misaligned :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 @@ -25941,7 +26271,7 @@ (matrix int8 :offset-assert 32) (state-mode uint8 3 :offset-assert 33) ;; guessed by decompiler (state-counter uint32 :offset-assert 36) - (local-space-binding particle-local-space-info :offset 28) + (local-space-binding particle-local-space-info :offset 28 :score 1) (last-spawn-frame int32 :offset-assert 40) (last-spawn-time int32 :offset-assert 44) (origin matrix :inline :offset-assert 48) @@ -25952,13 +26282,13 @@ :size-assert #x70 :flag-assert #x1500000070 (:methods - (sparticle-launch-control-method-14 () none) ;; 14 ;; (kill-and-free-particles (_type_) none) - (sparticle-launch-control-method-15 () none) ;; 15 ;; (kill-particles (_type_) none) + (initialize (_type_ sparticle-launch-group process-drawable) none) ;; 14 ;; (kill-and-free-particles (_type_) none) + (is-visible? (_type_ vector) symbol) ;; 15 ;; (kill-particles (_type_) none) (spawn (_type_ vector) object) ;; 16 - (sparticle-launch-control-method-17 (_type_ matrix) none) ;; 17 - (sparticle-launch-control-method-18 (_type_ cspace) none) ;; 18 + (spawn-from-mat (_type_ matrix) none) ;; 17 + (spawn-from-cspace (_type_ cspace) none) ;; 18 (kill-particles (_type_) none) ;; 19 - (sparticle-launch-control-method-20 (_type_ float) none) ;; 20 + (set-local-space-info (_type_ particle-local-space-info) none) ;; 20 ) ) @@ -25974,8 +26304,8 @@ :flag-assert #xb00000054 (:methods (new (symbol type sparticle-system sparticle-launcher float) _type_) - (sparticle-subsampler-method-9 () none) ;; 9 - (sparticle-subsampler-method-10 (_type_ matrix) none) ;; 10 + (init-with-vec! (_type_ vector) vector) ;; 9 + (init-with-mat! (_type_ matrix) matrix) ;; 10 ) ) @@ -26036,6 +26366,7 @@ (friction float :offset-assert 96) (timer int32 :offset-assert 100) (flags sp-cpuinfo-flag :offset-assert 104) ;; guessed by decompiler + (flags-s32 int32 :offset 104) ;; added (user-int32 int32 :offset-assert 108) (user-uint32 uint32 :offset 108) (user-float float :offset 108 :score 1) @@ -26099,6 +26430,9 @@ :method-count-assert 9 :size-assert #x34 :flag-assert #x900000034 + (:methods + (new (symbol type int int symbol pointer (inline-array adgif-shader)) _type_) ;; 0 + ) ) (define-extern *sp-60-hz* symbol) @@ -26244,25 +26578,49 @@ :flag-assert #x900000020 ) +;; +++hud-h:hud-sprite-flags +(defenum hud-sprite-flags + :type uint32 + :bitfield #t + (hsf0 0) + (hsf1 1) + (hsf2 2) + (hsf3 3) + (hsf4 4) + (hsf5 5) + (hsf6 6) + (hsf7 7) + (hsf8 8) + (hsf9 9) + (hsf10 10) + (hsf11 11) + (hsf12 12) + (hsf13 13) + (hsf14 14) + (hsf15 15) + ) +;; ---hud-h:hud-sprite-flags + (deftype hud-sprite (structure) ((pos vector4w :inline :offset-assert 0) (offset-x float :offset 0) (offset-y float :offset 4) (color vector4w :inline :offset-assert 16) - (flags uint32 :offset-assert 32) + (color-ptr int32 4 :offset 16 :score 1) ;; added + (flags hud-sprite-flags :offset-assert 32) (scale-x float :offset-assert 36) (scale-y float :offset-assert 40) (angle float :offset-assert 44) (tex texture :offset-assert 48) ;; guessed by decompiler - (tid uint32 :offset 48) + (tid texture-id :offset 48 :score 1) ) :method-count-assert 12 :size-assert #x34 :flag-assert #xc00000034 (:methods - (draw (_type_ dma-buffer level) none) ;; 9 - (hud-sprite-method-10 () none) ;; 10 ;; (hud-sprite-method-10 (_type_ dma-buffer level int int int int) object) - (hud-sprite-method-11 () none) ;; 11 + (draw (_type_ dma-buffer level symbol) none) ;; 9 + (hud-sprite-method-10 (_type_ dma-buffer level int int int int) object) ;; 10 + (hud-sprite-method-11 (_type_ hud-sprite vector4w int int) none) ;; 11 ) ) @@ -26276,11 +26634,11 @@ :size-assert #x20 :flag-assert #xe00000020 (:methods - (hud-box-method-9 () none) ;; 9 ;; (draw-box-prim-only (_type_ dma-buffer) none) - (hud-box-method-10 () none) ;; 10 ;; (draw-box-alpha-1 (_type_ dma-buffer) none) - (hud-box-method-11 () none) ;; 11 ;; (draw-box-alpha-2 (_type_ dma-buffer) none) - (hud-box-method-12 () none) ;; 12 ;; (draw-box-alpha-3 (_type_ dma-buffer) none) - (hud-box-method-13 () none) ;; 13 ;; (draw-scan-and-line (_type_ dma-buffer float) int) + (draw-box-prim-only (_type_ dma-buffer) none) ;; 9 + (draw-box-alpha-1 (_type_ dma-buffer) none) ;; 10 + (draw-box-alpha-2 (_type_ dma-buffer) none) ;; 11 + (draw-box-alpha-3 (_type_ dma-buffer) none) ;; 12 + (draw-scan-and-line (_type_ dma-buffer float) int) ;; 13 ) ) @@ -26335,25 +26693,25 @@ :size-assert #xac4 :flag-assert #x1b0a500ac4 (:methods - (hud-method-14 () none) ;; 14 ;; (hidden? (_type_) symbol) - (hud-method-15 () none) ;; 15 ;; (draw (_type_) none) - (hud-method-16 () none) ;; 16 ;; (update-values (_type_) none) - (hud-method-17 () none) ;; 17 ;; (init-callback (_type_) none) - (hud-method-18 () none) ;; 18 ;; (event-callback (_type_ process int symbol event-message-block) symbol) - (hud-method-19 () none) ;; 19 ;; (hud-method-19 (_type_) none) - (hud-method-20 () none) ;; 20 ;; (hud-method-20 (_type_) none) - (hud-method-21 () none) ;; 21 ;; (hud-method-21 (_type_) none) - (hud-method-22 () none) ;; 22 ;; (hud-method-22 (_type_) none) - (hud-method-23 () none) ;; 23 ;; (hud-method-23 (_type_) none) - (hud-method-24 () none) ;; 24 ;; (check-ready-and-maybe-show (_type_ symbol) symbol) - (hud-method-25 () none) ;; 25 ;; (update-value-callback (_type_ int int) none) - (hud-method-26 () none) ;; 26 ;; (alloc-string-if-needed (_type_ int) none) + (hidden? (_type_) object) ;; 14 + (draw (_type_) none) ;; 15 + (update-values! (_type_) none) ;; 16 + (init-callback (_type_) none) ;; 17 + (event-callback (_type_ process int symbol event-message-block) object) ;; 18 + (hud-method-19 (_type_) none) ;; 19 + (hud-method-20 (_type_) none) ;; 20 + (hud-method-21 (_type_) none) ;; 21 + (hud-method-22 (_type_) none) ;; 22 + (hud-method-23 (_type_) none) ;; 23 + (check-ready-and-maybe-show (_type_ symbol) symbol) ;; 24 + (update-value-callback (_type_ int int) none) ;; 25 + (alloc-string-if-needed (_type_ int) none) ;; 26 ) (:states - hud-leaving ;; associated process guessed by decompiler, old: (state float hud) - hud-in ;; associated process guessed by decompiler, old: (state hud) - hud-arriving ;; associated process guessed by decompiler, old: (state hud) - hud-hidden ;; associated process guessed by decompiler, old: (state hud) + (hud-leaving float) + hud-in + hud-arriving + hud-hidden ) ) @@ -26554,7 +26912,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 @@ -26719,13 +27079,14 @@ ;; progress-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(declare-type menu-option basic) (deftype progress-list (basic) () :method-count-assert 10 :size-assert #x4 :flag-assert #xa00000004 (:methods - (progress-list-method-9 () none) ;; 9 + (progress-list-method-9 (_type_ int) game-task-info) ;; 9 ) ) @@ -26812,41 +27173,43 @@ :method-count-assert 54 :size-assert #x298 :flag-assert #x3602200298 - (:methods - (progress-method-20 () none) ;; 20 ;; (come-in () _type_ :state) - (progress-method-21 () none) ;; 21 ;; (idle () _type_ :state) - (progress-method-22 () none) ;; 22 ;; (go-away () _type_ :state) - (progress-method-23 () none) ;; 23 ;; (gone () _type_ :state) - (progress-method-24 () none) ;; 24 ;; (init-defaults (_type_) object) - (progress-method-25 () none) ;; 25 ;; (respond-to-cpad (_type_) none) - (progress-method-26 () none) ;; 26 ;; (gone? (_type_) object) - (progress-method-27 () none) ;; 27 ;; (can-go-back? (_type_) symbol) - (progress-method-28 () none) ;; 28 ;; (get-state-check-card (_type_ symbol) symbol) - (progress-method-29 () none) ;; 29 ;; (push-state (_type_) int) - (progress-method-30 () none) ;; 30 ;; (pop-state (_type_) int) - (progress-method-31 () none) ;; 31 ;; (set-next-state (_type_ symbol int) int) - (progress-method-32 () none) ;; 32 ;; (set-menu-options (_type_ symbol) int) - (progress-method-33 () none) ;; 33 - (progress-method-34 () none) ;; 34 - (progress-method-35 () none) ;; 35 - (progress-method-36 () none) ;; 36 - (progress-method-37 () none) ;; 37 - (progress-method-38 () none) ;; 38 - (progress-method-39 () none) ;; 39 - (progress-method-40 () none) ;; 40 - (progress-method-41 () none) ;; 41 - (progress-method-42 () none) ;; 42 - (progress-method-43 () none) ;; 43 - (progress-method-44 () none) ;; 44 - (progress-method-45 () none) ;; 45 - (progress-method-46 () none) ;; 46 - (progress-method-47 () none) ;; 47 - (progress-method-48 () none) ;; 48 - (progress-method-49 () none) ;; 49 - (progress-method-50 () none) ;; 50 - (progress-method-51 () none) ;; 51 - (progress-method-52 () none) ;; 52 - (progress-method-53 () none) ;; 53 + (:state-methods + come-in ;; 21 + idle ;; 22 + go-away ;; 23 + gone ;; 24 + ) + (:methods + (init-defaults (_type_) object) ;; 24 + (respond-to-cpad (_type_) none) ;; 25 + (gone? (_type_) object) ;; 26 + (can-go-back? (_type_) symbol) ;; 27 + (get-state-check-card (_type_ symbol) symbol) ;; 28 + (push-state (_type_) int) ;; 29 + (pop-state (_type_) int) ;; 30 + (set-next-state (_type_ symbol int) int) ;; 31 + (set-menu-options (_type_ symbol) int) ;; 32 + (progress-method-33 (_type_ progress-box) none) ;; 33 + (progress-method-34 (_type_) none) ;; 34 + (get-scissor-stack-top (_type_) vector) ;; 35 + (get-language-by-idx (_type_ int) int) ;; 36 + (progress-method-37 (_type_) none) ;; 37 + (progress-method-38 (_type_ font-context float) none) ;; 38 + (progress-method-39 (_type_) none) ;; 39 + (progress-method-40 (_type_ font-context int int float) none) ;; 40 + (progress-method-41 (_type_ progress-box float) none) ;; 41 + (progress-method-42 (_type_ progress-box float) none) ;; 42 + (progress-method-43 (_type_ progress-box float) none) ;; 43 + (progress-method-44 (_type_ font-context string) none) ;; 44 + (progress-method-45 (_type_ font-context float float string float float int) float) ;; 45 + (progress-method-46 (_type_ font-context float int) none) ;; 46 + (progress-method-47 (_type_ font-context symbol symbol) none) ;; 47 + (draw-prev-next-footer (_type_ font-context float) none) ;; 48 + (draw-yes-no-style-footer (_type_ font-context text-id text-id) none) ;; 49 + (progress-method-50 (_type_ font-context text-id text-id text-id symbol symbol float) none) ;; 50 + (progress-method-51 (_type_ font-context) none) ;; 51 + (progress-method-52 (_type_ font-context string float float float float float) none) ;; 52 + (progress-method-53 (_type_ font-context) none) ;; 53 ) ) @@ -26938,7 +27301,7 @@ :size-assert #x10 :flag-assert #xa00000010 (:methods - (progress-icon-array-method-9 () none) ;; 9 + (draw-icon-array! (_type_ int int float float rgba float) none) ;; 9 ) ) @@ -26952,8 +27315,8 @@ :size-assert #x30 :flag-assert #xc00000030 (:methods - (menu-option-method-9 () none) ;; 9 ;; (respond-progress (_type_ progress symbol) int) - (menu-option-method-10 () none) ;; 10 ;; (draw-option (_type_ progress font-context int symbol) none) + (respond-progress (_type_ progress symbol) int) ;; 9 + (draw-option (_type_ progress font-context int symbol) none) ;; 10 (menu-option-method-11 () none) ;; 11 ;; (menu-option-method-11 () none) ) ) @@ -27220,10 +27583,10 @@ :size-assert #x28 :flag-assert #xd00000028 (:methods - (highscore-page-info-method-9 () none) ;; 9 - (highscore-page-info-method-10 () none) ;; 10 - (highscore-page-info-method-11 () none) ;; 11 - (highscore-page-info-method-12 () none) ;; 12 + (highscore-page-info-method-9 (_type_ progress font-context float float) none) ;; 9 + (highscore-page-info-method-10 (_type_ font-context float float float) none) ;; 10 + (highscore-page-info-method-11 (_type_ font-context int float float float) none) ;; 11 + (highscore-time->string (_type_ float) string) ;; 12 ) ) @@ -27231,14 +27594,14 @@ ((current-index float :offset-assert 48) (target-index float :offset-assert 52) (num-pages int32 :offset-assert 56) - (pages highscore-page-info 16 :offset-assert 60) - (info basic :offset-assert 124) + (pages paged-menu-option 16 :offset-assert 60) + (info (array highscore-page-info) :offset-assert 124) ) :method-count-assert 13 :size-assert #x80 :flag-assert #xd00000080 (:methods - (menu-highscores-option-method-12 () none) ;; 12 + (menu-highscores-option-method-12 (_type_) int) ;; 12 ) ) @@ -27253,7 +27616,7 @@ :size-assert #x20 :flag-assert #xa00000020 (:methods - (controls-string-info-method-9 () none) ;; 9 + (controls-string-info-method-9 (_type_ progress font-context float float float float float) none) ;; 9 ) ) @@ -27265,17 +27628,17 @@ (current-index float :offset-assert 32) (target-index float :offset-assert 36) (num-text int32 :offset-assert 40) - (on-screen basic :offset-assert 44) - (text text-id 9 :offset-assert 48) + (on-screen symbol :offset-assert 44) + (text game-text 9 :offset-assert 48) (strings (array controls-string-info) :offset-assert 84) ) :method-count-assert 12 :size-assert #x58 :flag-assert #xc00000058 (:methods - (controls-page-info-method-9 () none) ;; 9 - (controls-page-info-method-10 () none) ;; 10 - (controls-page-info-method-11 () none) ;; 11 + (init-text! (_type_) int) ;; 9 + (controls-page-info-method-10 (_type_) none) ;; 10 + (controls-page-info-method-11 (_type_ progress font-context float float) none) ;; 11 ) ) @@ -27283,13 +27646,13 @@ ((current-index float :offset-assert 64) (target-index float :offset-assert 68) (pages controls-page-info 7 :offset 76) - (info basic :offset-assert 104) + (info (array controls-page-info) :offset-assert 104) ) :method-count-assert 13 :size-assert #x6c :flag-assert #xd0000006c (:methods - (menu-controls-option-method-12 () none) ;; 12 + (menu-controls-option-method-12 (_type_) int) ;; 12 ) ) @@ -27320,8 +27683,8 @@ :size-assert #x59 :flag-assert #xe00000059 (:methods - (secret-item-option-method-12 () none) ;; 12 - (secret-item-option-method-13 () none) ;; 13 + (secret-item-option-method-12 (_type_) int) ;; 12 + (secret-item-option-method-13 (_type_) game-vehicles) ;; 13 ) ) @@ -27532,8 +27895,8 @@ :size-assert #x30 :flag-assert #xb00000030 (:methods - (inventory-item-method-9 () none) ;; 9 - (inventory-item-method-10 () none) ;; 10 + (item-obtained? (_type_) symbol) ;; 9 + (inventory-item-method-10 (_type_ progress font-context float float symbol) none) ;; 10 ) ) @@ -27549,8 +27912,8 @@ :size-assert #xc :flag-assert #xb0000000c (:methods - (inventory-item-group-method-9 () none) ;; 9 - (inventory-item-group-method-10 () none) ;; 10 + (have-items? (_type_) symbol) ;; 9 + (inventory-item-group-method-10 (_type_ progress font-context float float int) none) ;; 10 ) ) @@ -27563,7 +27926,7 @@ :size-assert #xc :flag-assert #xa0000000c (:methods - (inventory-screen-method-9 () none) ;; 9 + (inventory-screen-method-9 (_type_ progress font-context float float) none) ;; 9 ) ) @@ -27657,29 +28020,29 @@ :flag-assert #x2000000024 (:methods (new "Allocate a new path-control, set up the curve to point to the specified lump data." (symbol type process symbol float entity symbol) _type_) ;; 0 - (path-control-method-9 (_type_) none) ;; 9 ;; (debug-draw (_type_) none) - (path-control-method-10 () none) ;; 10 ;; (get-point-in-path! (_type_ vector float symbol) vector) - (path-control-method-11 () none) ;; 11 ;; (get-random-point (_type_ vector) vector) - (path-control-method-12 () none) ;; 12 ;; (displacement-between-two-points-copy! (_type_ vector float float) vector) - (path-control-method-13 () none) ;; 13 ;; (displacement-between-two-points-normalized! (_type_ vector float) vector) + (debug-draw (_type_) none) ;; 9 + (get-point-in-path! (_type_ vector float symbol) vector) ;; 10 + (get-random-point (_type_ vector) vector) ;; 11 + (path-control-method-12 (_type_ vector float float) vector) ;; 12 ;; (displacement-between-two-points-copy! (_type_ vector float float) vector) + (displacement-between-two-points-normalized! (_type_ vector float) vector) ;; 13 (get-point-at-percent-along-path! (_type_ vector float symbol) vector) ;; 14 - (path-control-method-15 () none) ;; 15 ;; (displacement-between-points-at-percent-scaled! (_type_ vector float float) vector) + (path-control-method-15 (_type_ vector float float) vector) ;; 15 ;; (displacement-between-points-at-percent-scaled! (_type_ vector float float) vector) (displacement-between-points-at-percent-normalized! (_type_ vector float) vector) ;; 16 (get-num-segments (_type_) float) ;; 17 - (path-control-method-18 () none) ;; 18 ;; (total-distance (_type_) float) + (total-distance (_type_) float) ;; 18 (get-num-verts (_type_) int) ;; 19 (segement-duration->path-duration (_type_ float) float) ;; 20 (path-duration->segment-duration (_type_ float) float) ;; 21 - (path-control-method-22 () none) ;; 22 ;; (get-furthest-point-on-path (_type_ vector) float) - (path-control-method-23 () none) ;; 23 ;; (get-path-percentage-at-furthest-point (_type_ vector) float) - (path-control-method-24 () none) ;; 24 ;; (path-control-method-24 (_type_ vector) vector) + (path-control-method-22 (_type_ vector) float) ;; 22 ;; (get-furthest-point-on-path (_type_ vector) float) + (path-control-method-23 (_type_ vector) float) ;; 23 ;; (get-path-percentage-at-furthest-point (_type_ vector) float) + (path-control-method-24 (_type_ vector) float) ;; 24 ;; (path-control-method-24 (_type_ vector) vector) (path-control-method-25 (_type_ vector) float) ;; 25 - (path-control-method-26 () none) ;; 26 ;; (displacement-between-two-points! (_type_ vector float float) vector) - (path-control-method-27 () none) ;; 27 - (path-control-method-28 () none) ;; 28 - (path-control-method-29 () none) ;; 29 + (path-control-method-26 (_type_ float float) float) ;; 26 ;; (displacement-between-two-points! (_type_ vector float float) vector) + (path-control-method-27 (_type_ vector) vector) ;; 27 + (path-control-method-28 (_type_ vector vector symbol) float) ;; 28 + (path-control-method-29 (_type_ vector int float) float) ;; 29 (should-display-marks? (_type_) symbol) ;; 30 - (path-control-method-31 () none) ;; 31 + (displacement-between-two-points! (_type_ vector float float) vector) ;; 31 ) ) @@ -27906,47 +28269,47 @@ :flag-assert #x3200000070 ;; field nav-mesh-flag is likely a value type. (:methods - (nav-mesh-method-9 () none) ;; 9 ;; (debug-draw (_type_) none) - (nav-mesh-method-10 () none) ;; 10 ;; (nav-mesh-method-10 (_type_ vector vector nav-poly) nav-poly) - (nav-mesh-method-11 () none) ;; 11 ;; (poly-centroid (_type_ nav-poly vector) vector) - (nav-mesh-method-12 () none) ;; 12 ;; (poly-centroid-local (_type_ nav-poly vector) vector) - (nav-mesh-method-13 () none) ;; 13 ;; (lookup-poly-on-route-to-target (_type_ nav-poly nav-poly) nav-poly) - (nav-mesh-method-14 () none) ;; 14 ;; (get-route-portal (_type_ nav-poly nav-poly nav-route-portal) (inline-array nav-vertex)) - (nav-mesh-method-15 () none) ;; 15 ;; (initialize-mesh! (_type_) none) - (nav-mesh-method-16 () none) ;; 16 - (nav-mesh-method-17 () none) ;; 17 ;; (try-move-along-ray (_type_ nav-poly vector vector float) meters) - (advance-ray-to-nearest-poly-edge-or-dest! (_type_ nav-ray) none) ;; 18 ;; (clamp-vector-to-mesh-cross-gaps (_type_ vector nav-poly vector float symbol clamp-travel-vector-to-mesh-return-info) none) - (nav-mesh-method-19 () none) ;; 19 ;; (clamp-vector-to-mesh-no-gaps (_type_ vector nav-poly vector clamp-travel-vector-to-mesh-return-info) none) - (nav-mesh-method-20 () none) ;; 20 ;; (set-normals-from-adjacent-bounds (_type_ clamp-travel-vector-to-mesh-return-info) none) - (nav-mesh-method-21 () none) ;; 21 ;; (find-adjacent-bounds-one (_type_ vector nav-poly int int) none) - (nav-mesh-method-22 () none) ;; 22 ;; (compute-bounding-box-from-vertices (_type_ vector vector) none) - (nav-mesh-method-23 () none) ;; 23 ;; (init-from-entity (_type_ entity-nav-mesh) none) - (nav-mesh-method-24 () none) ;; 24 ;; (handle-birth (_type_) none) - (nav-mesh-method-25 () none) ;; 25 ;; (handle-kill (_type_) none) - (nav-mesh-method-26 () none) ;; 26 ;; (update-navigation (_type_) none) - (nav-mesh-method-27 () none) ;; 27 ;; (new-nav-control (_type_ process-drawable) nav-control) - (nav-mesh-method-28 () none) ;; 28 ;; (remove-nav-control (_type_ nav-control) none) - (nav-mesh-method-29 () none) ;; 29 ;; (add-process-drawable-to-navmesh (_type_ process-drawable symbol) none) - (nav-mesh-method-30 () none) ;; 30 ;; (remove-process-drawable (_type_ process-drawable) none) - (nav-mesh-method-31 () none) ;; 31 ;; (change-to (_type_ process-drawable) none) - (nav-mesh-method-32 () none) ;; 32 ;; (link-by-id (_type_ uint) symbol) - (nav-mesh-method-33 () none) ;; 33 ;; (unlink-by-id (_type_ uint) symbol) - (nav-mesh-method-34 () none) ;; 34 ;; (nav-mesh-method-34 (_type_ vector vector float) float) - (nav-mesh-method-35 () none) ;; 35 ;; (nav-mesh-method-35 (_type_ vector vector float) float) - (nav-mesh-method-36 () none) ;; 36 ;; (debug-draw-poly (_type_ nav-poly rgba) none) - (nav-mesh-method-37 () none) ;; 37 ; - (nav-mesh-method-38 () none) ;; 38 ;; (nav-mesh-method-38 (_type_ nav-poly vector vector vector (pointer nav-poly)) vector) - (nav-mesh-method-39 () none) ;; 39 - (point-in-poly? "Check if a point is inside a poly of this mesh" (_type_ nav-poly vector) symbol) ;; 40 ;; (project-point-onto-plane-of-poly-local (_type_ nav-poly vector vector vector) none) - (nav-mesh-method-41 () none) ;; 41 + (debug-draw (_type_) none) ;; 9 + (nav-mesh-method-10 (_type_ vector vector nav-poly) nav-poly) ;; 10 + (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 + (lookup-poly-on-route-to-target (_type_ nav-poly nav-poly) nav-poly) ;; 15 + (get-route-portal (_type_ nav-poly nav-poly nav-route-portal) (inline-array nav-vertex)) ;; 16 + (initialize-mesh! (_type_) none) ;; 17 + (advance-ray-to-nearest-poly-edge-or-dest! (_type_ nav-ray) none) ;; 18 + (try-move-along-ray (_type_ nav-poly vector vector float) meters) ;; 19 + (clamp-vector-to-mesh-cross-gaps (_type_ vector nav-poly vector float symbol clamp-travel-vector-to-mesh-return-info) none) ;; 20 + (clamp-vector-to-mesh-no-gaps (_type_ vector nav-poly vector clamp-travel-vector-to-mesh-return-info) none) ;; 21 + (set-normals-from-adjacent-bounds (_type_ clamp-travel-vector-to-mesh-return-info) none) ;; 22 + (find-adjacent-bounds-one (_type_ vector nav-poly int int) none) ;; 23 + (compute-bounding-box-from-vertices (_type_ vector vector) none) ;; 24 + (init-from-entity (_type_ entity-nav-mesh) none) ;; 25 + (handle-birth (_type_) none) ;; 26 + (handle-kill (_type_) none) ;; 27 + (update-navigation (_type_) none) ;; 28 + (new-nav-control (_type_) nav-control) ;; 29 + (remove-nav-control (_type_ nav-control) none) ;; 30 + (add-process-drawable-to-nav-mesh (_type_ process-drawable symbol) none) ;; 31 + (remove-process-drawable (_type_ process-drawable) none) ;; 32 + (change-to (_type_ process-drawable) none) ;; 33 + (link-by-id (_type_ uint) symbol) ;; 34 + (unlink-by-id (_type_ uint) symbol) ;; 35 + (nav-mesh-method-36 (_type_ vector vector float) float) ;; 36 + (nav-mesh-method-37 (_type_ vector vector float) float) ;; 37 + (nav-mesh-method-38 (_type_ nav-poly) none) ;; 38 + (debug-draw-poly (_type_ nav-poly rgba) none) ;; 39 + (point-in-poly? "Check if a point is inside a poly of this mesh" (_type_ nav-poly vector) symbol) ;; 40 + (nav-mesh-method-41 (_type_ nav-poly vector vector vector (pointer nav-poly)) vector) ;; 41 (closest-point-on-boundary "Find the point on the polygon edge that is closest to the query point." (_type_ nav-poly vector vector) vector) ;; 42 ;; (find-poly-containing-point-local (_type_ nav-find-poly-parms) nav-poly) - (nav-mesh-method-43 () none) ;; 43 ;; (find-nearest-poly-to-point-local (_type_ nav-find-poly-parms) nav-find-poly-parms) - (project-point-into-poly-2d "Find the point in the polygon closest to the query point." (_type_ nav-poly vector vector) vector) ;; 44 ;; (is-in-mesh-local? (_type_ vector float float) symbol) - (nav-mesh-method-45 () none) ;; 45 ;; (link-to-other-mesh (_type_ nav-mesh-link) symbol) - (nav-mesh-method-46 () none) ;; 46 ;; (unlink-mesh (_type_ nav-mesh-link) none) - (nav-mesh-method-47 () none) ;; 47 - (nav-mesh-method-48 () none) ;; 48 - (nav-mesh-method-49 () none) ;; 49 + (project-point-onto-plane-of-poly-local (_type_ nav-poly vector vector vector) none) ;; 43 ;; (find-nearest-poly-to-point-local (_type_ nav-find-poly-parms) nav-find-poly-parms) + (project-point-into-poly-2d "Find the point in the polygon closest to the query point." (_type_ nav-poly vector vector) vector) ;; 44 + (nav-mesh-method-45 (_type_ nav-poly) nav-poly) ;; 45 + (nav-mesh-method-46 (_type_ nav-poly) nav-poly) ;; 46 + (is-in-mesh-local? (_type_ vector float float) symbol) ;; 47 + (link-to-other-mesh (_type_ nav-mesh-link) symbol) ;; 48 + (unlink-mesh (_type_ nav-mesh-link) none) ;; 49 ) ) @@ -28065,53 +28428,53 @@ :size-assert #xb0 :flag-assert #x38000000b0 (:methods - (nav-state-method-9 () none) ;; 9 ;; (debug-draw (_type_) none) - (nav-state-method-10 () none) ;; 10 ;; (nav-state-method-10 (_type_) none) - (nav-state-method-11 () none) ;; 11 ;; (plan-over-pat1-polys-using-route (_type_ nav-gap-info) symbol) - (nav-state-method-12 () none) ;; 12 ;; (get-velocity (_type_ vector) vector) - (nav-state-method-13 () none) ;; 13 ;; (get-travel (_type_ vector) vector) - (nav-state-method-14 () none) ;; 14 ;; (get-heading (_type_ vector) vector) - (nav-state-method-15 () none) ;; 15 ;; (get-target-post (_type_ vector) vector) - (nav-state-method-16 () none) ;; 16 ;; (get-speed (_type_) meters) - (nav-state-method-17 () none) ;; 17 ;; (get-rotation-rate (_type_) float) - (nav-state-method-18 () none) ;; 18 ;; (try-projecting-to-current-poly (_type_ vector object vector) symbol) - (nav-state-method-19 () none) ;; 19 ;; (get-current-poly (_type_) nav-poly) - (nav-state-method-20 () none) ;; 20 ;; (copy-nav-state! (_type_ (pointer nav-state)) none) - (nav-state-method-21 () none) ;; 21 ;; (nav-state-method-21 () none) - (nav-state-method-22 () none) ;; 22 ;; (nav-state-method-22 () none) - (nav-state-method-23 () none) ;; 23 ;; (nav-state-method-23 () none) - (nav-state-method-24 () none) ;; 24 ;; (turn-and-navigate-to-destination (_type_) none) - (nav-state-method-25 () none) ;; 25 ;; (navigate-using-route-portals-wrapper (_type_) none) - (nav-state-method-26 () none) ;; 26 ;; (navigate-using-best-dir-recompute-avoid-spheres-1-wrapper (_type_) none) - (nav-state-method-27 () none) ;; 27 ;; (navigate-within-poly-wrapper (_type_) none) - (nav-state-method-28 () none) ;; 28 ;; (compute-travel-speed (_type_) none) - (nav-state-method-29 () none) ;; 29 ;; (nav-state-method-29 (_type_) none) - (nav-state-method-30 () none) ;; 30 ;; (nav-state-method-30 (_type_) none) - (nav-state-method-31 () none) ;; 31 ;; (navigate-using-best-dir-recompute-avoid-spheres-2 (_type_) none) - (nav-state-method-32 () none) ;; 32 ;; (update-travel-dir-from-spheres (_type_) none) - (nav-state-method-33 () none) ;; 33 ;; (compute-speed-simple (_type_) none) - (nav-state-method-34 () none) ;; 34 ;; (navigate-v1! (_type_) none) - (nav-state-method-35 () none) ;; 35 ;; (reset-target! (_type_) none) - (nav-state-method-36 () none) ;; 36 ;; (add-offset-to-target! (_type_ vector) none) - (nav-state-method-37 () none) ;; 37 ;; (navigate-v2! (_type_) none) - (nav-state-method-38 () none) ;; 38 ;; (set-current-poly! (_type_ nav-poly) none) - (nav-state-method-39 () none) ;; 39 ;; (nav-state-method-39 (_type_) symbol) - (nav-state-method-40 () none) ;; 40 ;; (do-navigation-to-destination (_type_ vector) none) - (nav-state-method-41 () none) ;; 41 ;; (clamp-vector-to-mesh-cross-gaps (_type_ vector) symbol) - (nav-state-method-42 () none) ;; 42 ;; (set-target-post! (_type_ vector) none) - (nav-state-method-43 () none) ;; 43 ;; (set-travel! (_type_ vector) none) - (nav-state-method-44 () none) ;; 44 ;; (set-velocity! (_type_ vector) none) - (nav-state-method-45 () none) ;; 45 ;; (set-heading! (_type_ vector) none) - (nav-state-method-46 () none) ;; 46 ;; (set-speed! (_type_ meters) none) - (nav-state-method-47 () none) ;; 47 ;; (reset! (_type_ nav-control) none) - (nav-state-method-48 () none) ;; 48 ;; (nav-state-method-48 () none) - (nav-state-method-49 () none) ;; 49 ;; (navigate-using-best-dir-use-existing-avoid-spheres (_type_ nav-avoid-spheres-params) none) - (nav-state-method-50 () none) ;; 50 ;; (nav-state-method-50 (_type_) none) - (nav-state-method-51 () none) ;; 51 ;; (navigate-using-route-portals (_type_) none) - (nav-state-method-52 () none) ;; 52 ;; (navigate-using-best-dir-recompute-avoid-spheres-1 (_type_) none) - (nav-state-method-53 () none) ;; 53 ;; (navigate-within-poly (_type_) none) - (nav-state-method-54 () none) ;; 54 ;; (clamp-travel-vector (_type_) none) - (nav-state-method-55 () none) ;; 55 + (debug-draw (_type_) none) ;; 9 + (nav-state-method-10 (_type_) none) ;; 10 + (plan-over-pat1-polys-using-route (_type_ nav-gap-info) symbol) ;; 11 + (get-velocity (_type_ vector) vector) ;; 12 + (get-travel (_type_ vector) vector) ;; 13 + (get-heading (_type_ vector) vector) ;; 14 + (get-target-pos (_type_ vector) vector) ;; 15 + (get-speed (_type_) meters) ;; 16 + (get-rotation-rate (_type_) float) ;; 17 + (try-projecting-to-current-poly (_type_ vector vector vector) symbol) ;; 18 + (get-current-poly (_type_) nav-poly) ;; 19 + (copy-nav-state! (_type_ (pointer nav-state)) none) ;; 20 + (nav-state-method-21 () none) ;; 21 + (nav-state-method-22 () none) ;; 22 + (nav-state-method-23 () none) ;; 23 + (turn-and-navigate-to-destination (_type_) none) ;; 24 + (navigate-using-route-portals-wrapper (_type_) none) ;; 25 + (navigate-using-best-dir-recompute-avoid-spheres-1-wrapper (_type_) none) ;; 26 + (navigate-within-poly-wrapper (_type_) none) ;; 27 + (compute-travel-speed (_type_) none) ;; 28 + (nav-state-method-29 (_type_) none) ;; 29 + (nav-state-method-30 (_type_) none) ;; 30 + (navigate-using-best-dir-recompute-avoid-spheres-2 (_type_) none) ;; 31 + (update-travel-dir-from-spheres (_type_) none) ;; 32 + (compute-speed-simple (_type_) none) ;; 33 + (navigate-v1! (_type_) none) ;; 34 + (reset-target! (_type_) none) ;; 35 + (add-offset-to-target! (_type_ vector) none) ;; 36 + (navigate-v2! (_type_) none) ;; 37 + (set-current-poly! (_type_ nav-poly) none) ;; 38 + (nav-state-method-39 (_type_) symbol) ;; 39 + (do-navigation-to-destination (_type_ vector) none) ;; 40 + (clamp-vector-to-mesh-cross-gaps (_type_ vector) symbol) ;; 41 + (set-target-pos! (_type_ vector) none) ;; 42 + (set-virtual-cur-pos! (_type_ vector) none) ;; 43 + (set-travel! (_type_ vector) none) ;; 44 + (set-velocity! (_type_ vector) none) ;; 45 + (set-heading! (_type_ vector) none) ;; 46 + (set-speed! (_type_ meters) none) ;; 47 + (reset! (_type_ nav-control) none) ;; 48 + (nav-state-method-49 () none) ;; 49 + (navigate-using-best-dir-use-existing-avoid-spheres (_type_ nav-avoid-spheres-params) none) ;; 50 ;; (nav-state-method-50 (_type_) none) + (nav-state-method-51 (_type_) none) ;; 51 + (navigate-using-route-portals (_type_) none) ;; 52 + (navigate-using-best-dir-recompute-avoid-spheres-1 (_type_) none) ;; 53 + (navigate-within-poly (_type_) none) ;; 54 + (clamp-travel-vector (_type_) none) ;; 55 ) ) @@ -28145,44 +28508,44 @@ :size-assert #x120 :flag-assert #x2f00000120 (:methods - (nav-control-method-9 () none) ;; 9 ;; (debug-draw (_type_) none) - (nav-control-method-10 () none) ;; 10 ;; (point-in-bsphere? (_type_ vector) symbol) + (debug-draw (_type_) none) ;; 9 + (point-in-bsphere? (_type_ vector) symbol) ;; 10 (find-poly-containing-point-1 (_type_ vector) nav-poly) ;; 11 - (nav-control-method-12 () none) ;; 12 ;; (cloest-point-on-mesh (_type_ vector vector nav-poly) nav-poly) - (nav-control-method-13 () none) ;; 13 ;; (find-nearest-poly-to-point (_type_ vector) nav-poly) - (nav-control-method-14 () none) ;; 14 ;; (project-point-onto-plane-of-poly (_type_ nav-poly vector vector vector) none) - (nav-control-method-15 () none) ;; 15 ;; (find-poly-containing-point-2 (_type_ vector) nav-poly) - (nav-control-method-16 () none) ;; 16 ;; (is-above-poly-max-height? (_type_ vector float) symbol) - (nav-control-method-17 () none) ;; 17 ;; (is-in-mesh? (_type_ vector float) symbol) - (nav-control-method-18 () none) ;; 18 ;; (avoid-spheres-1! (_type_ nav-avoid-spheres-params) symbol) - (nav-control-method-19 () none) ;; 19 ;; (avoid-spheres-2! (_type_ nav-avoid-spheres-params) symbol) - (nav-control-method-20 () none) ;; 20 ;; (clamp-vector-to-mesh-cross-gaps (_type_ vector nav-poly vector float symbol clamp-travel-vector-to-mesh-return-info) none) - (nav-control-method-21 () none) ;; 21 ;; (clamp-vector-to-mesh-no-gaps (_type_ vector nav-poly vector clamp-travel-vector-to-mesh-return-info) none) - (nav-control-method-22 () none) ;; 22 ;; (find-first-sphere-and-update-avoid-params (_type_ vector nav-avoid-spheres-params) float) - (nav-control-method-23 () none) ;; 23 ;; (set-spheres-from-nav-ids (_type_) none) - (nav-control-method-24 () none) ;; 24 ;; (add-root-sphere-to-hash! (_type_ vector int) symbol) - (nav-control-method-25 () none) ;; 25 ;; (get-max-rotation-rate (_type_) float) - (nav-control-method-26 () none) ;; 26 ;; (get-sphere-mask (_type_) uint) - (nav-control-method-27 () none) ;; 27 ;; (get-target-speed (_type_) meters) - (nav-control-method-28 () none) ;; 28 ;; (enable-extra-sphere! (_type_) none) - (nav-control-method-29 () none) ;; 29 ;; (disable-extra-sphere! (_type_) none) - (nav-control-method-30 () none) ;; 30 ;; (copy-extra-nav-sphere! (_type_ sphere) none) - (nav-control-method-31 () none) ;; 31 ;; (set-extra-nav-sphere-xyz! (_type_ sphere) none) - (nav-control-method-32 () none) ;; 32 ;; (set-extra-nav-sphere-radius! (_type_ float) none) - (nav-control-method-33 () none) ;; 33 ;; (set-nearest-y-thres! (_type_ float) none) - (nav-control-method-34 () none) ;; 34 ;; (set-nav-cull-radius! (_type_ meters) none) - (nav-control-method-35 () none) ;; 35 ;; (set-speed-scale! (_type_ float) none) - (nav-control-method-36 () none) ;; 36 ;; (set-target-speed! (_type_ meters) none) - (nav-control-method-37 () none) ;; 37 ;; (set-acceleration! (_type_ meters) none) - (nav-control-method-38 () none) ;; 38 ;; (set-turning-acceleration! (_type_ meters) none) - (nav-control-method-39 () none) ;; 39 ;; (set-max-rotation-rate! (_type_ float) none) - (nav-control-method-40 () none) ;; 40 ;; (set-sphere-mask! (_type_ uint) none) - (nav-control-method-41 () none) ;; 41 ;; (remove! (_type_) none) - (nav-control-method-42 () none) ;; 42 ;; (init! (_type_ collide-shape) none) - (nav-control-method-43 () none) ;; 43 ;; (display-marks? (_type_) symbol) - (nav-control-method-44 () none) ;; 44 ;; (nav-control-method-44 () none) - (nav-control-method-45 () none) ;; 45 ;; (find-first-sphere-intersecting-ray (_type_ vector vector vector) sphere) - (nav-control-method-46 () none) ;; 46 ;; (find-sphere-ids-from-sphere-hash (_type_ symbol) none) + (closest-point-on-mesh (_type_ vector vector nav-poly) nav-poly) ;; 12 + (find-nearest-poly-to-point (_type_ vector) nav-poly) ;; 13 + (project-point-onto-plane-of-poly (_type_ nav-poly vector vector vector) none) ;; 14 + (find-poly-containing-point-2 (_type_ vector) nav-poly) ;; 15 + (is-above-poly-max-height? (_type_ vector float) symbol) ;; 16 + (is-in-mesh? (_type_ vector float) symbol) ;; 17 + (avoid-spheres-1! (_type_ nav-avoid-spheres-params) symbol) ;; 18 + (avoid-spheres-2! (_type_ nav-avoid-spheres-params) symbol) ;; 19 + (clamp-vector-to-mesh-cross-gaps (_type_ vector nav-poly vector float symbol clamp-travel-vector-to-mesh-return-info) none) ;; 20 + (clamp-vector-to-mesh-no-gaps (_type_ vector nav-poly vector clamp-travel-vector-to-mesh-return-info) none) ;; 21 + (find-first-sphere-and-update-avoid-params (_type_ vector nav-avoid-spheres-params) float) ;; 22 + (set-spheres-from-nav-ids (_type_) none) ;; 23 + (add-root-sphere-to-hash! (_type_ vector int) symbol) ;; 24 + (get-max-rotation-rate (_type_) float) ;; 25 + (get-sphere-mask (_type_) uint) ;; 26 + (get-target-speed (_type_) meters) ;; 27 + (enable-extra-sphere! (_type_) none) ;; 28 + (disable-extra-sphere! (_type_) none) ;; 29 + (copy-extra-nav-sphere! (_type_ sphere) none) ;; 30 + (set-extra-nav-sphere-xyz! (_type_ sphere) none) ;; 31 + (set-extra-nav-sphere-radius! (_type_ float) none) ;; 32 + (set-nearest-y-thres! (_type_ float) none) ;; 33 + (set-nav-cull-radius! (_type_ meters) none) ;; 34 + (set-speed-scale! (_type_ float) none) ;; 35 + (set-target-speed! (_type_ meters) none) ;; 36 + (set-acceleration! (_type_ meters) none) ;; 37 + (set-turning-acceleration! (_type_ meters) none) ;; 38 + (set-max-rotation-rate! (_type_ float) none) ;; 39 + (set-sphere-mask! (_type_ uint) none) ;; 40 + (remove! (_type_) none) ;; 41 + (init! (_type_ collide-shape) none) ;; 42 + (display-marks? (_type_) symbol) ;; 43 + (nav-control-method-44 () none) ;; 44 + (find-first-sphere-intersecting-ray (_type_ vector vector vector) sphere) ;; 45 + (find-sphere-ids-from-sphere-hash (_type_ symbol) none) ;; 46 ) ) @@ -28268,6 +28631,34 @@ :flag-assert #x900000020 ) +(deftype nav-stack-type (structure) + "nav-mesh::12" + ((nav-id-params find-nav-sphere-ids-params :inline :offset 0) + (vec1 vector :inline :offset 32) + (vec2 vector :inline :offset 48) + (vec3 vector :inline :offset 64) + (byte01 int8 :offset 64) + (byte02 int8 :offset 65) + (byte03 int8 :offset 66) + (byte04 int8 :offset 67) + (vec4 vector :inline :offset 80) + (vec5 vector :inline :offset 96) + (vec6 vector :inline :offset 112) + (byte-arr uint8 20 :offset 128) + ) + ) + +(deftype nav-stack-type2 (structure) + "nav-mesh::25" + ((float00 float :offset 0) + (float01 float :offset 8) + (word00 int32 :offset 16) + (word01 int32 :offset 20) + (word02 int32 :offset 24) + (word03 int32 :offset 28) + ) + ) + (deftype sphere-hash (grid-hash) "An extension of grid hash that holds spheres inside of the grid." ((sphere-array (inline-array sphere) :offset-assert 88) ;; guessed by decompiler @@ -28285,8 +28676,8 @@ (add-a-sphere (_type_ vector) int) ;; 26 (add-a-sphere-with-flag (_type_ vector int) int) ;; 27 (update-from-spheres (_type_) none) ;; 28 - (sphere-hash-method-29 (_type_ find-nav-sphere-ids-params int int int) none) ;; 29 - (find-nav-sphere-ids (_type_ find-nav-sphere-ids-params) none) ;; 30 + (sphere-hash-method-29 (_type_ find-nav-sphere-ids-params) none) ;; 29 + (find-nav-sphere-ids (_type_ find-nav-sphere-ids-params int int) symbol) ;; 30 (add-sphere-with-mask-and-id (_type_ vector int int) symbol) ;; 31 (sphere-hash-method-32 (_type_ sphere int) symbol) ;; 32 ) @@ -28311,10 +28702,10 @@ :flag-assert #x2800000074 (:methods (new (symbol type int int) _type_) ;; 0 - (spatial-hash-method-33 () none) ;; 33 - (add-an-object (_type_ vector hash-object-info) int) ;; 34 + (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-sphere (_type_ sphere (pointer collide-shape) int) int) ;; 36 + (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 (spatial-hash-method-39 (_type_ object hash-object-info) int) ;; 39 @@ -28414,7 +28805,7 @@ :size-assert #xbc :flag-assert #xa000000bc (:methods - (rigid-body-info-method-9 () none) ;; 9 ;; (rigid-body-info-method-9 (_type_) none) + (rigid-body-info-method-9 (_type_) none) ;; 9 ;; (rigid-body-info-method-9 (_type_) none) ) ) @@ -28462,7 +28853,7 @@ (velocity vector :inline :offset-assert 32) (impulse float :offset-assert 48) (pat pat-surface :offset-assert 52) ;; guessed by decompiler - (process basic :offset-assert 56) + (process process :offset-assert 56) (prim-id uint32 :offset-assert 60) ) :method-count-assert 9 @@ -28470,12 +28861,13 @@ :flag-assert #x900000040 ) +(declare-type rigid-body-object basic) (deftype rigid-body-control (basic) ((flags rigid-body-flag :offset-assert 4) (info rigid-body-info :offset-assert 8) - (force-callback basic :offset-assert 12) + (force-callback (function rigid-body-object float none) :offset-assert 12) (process process :offset-assert 16) ;; guessed by decompiler - (blocked-by basic :offset-assert 20) + (blocked-by process-focusable :offset-assert 20) (time-remaining float :offset-assert 24) (step-count int16 :offset-assert 28) (linear-damping float :offset-assert 32) @@ -28498,37 +28890,38 @@ :size-assert #x130 :flag-assert #x2200000130 (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type process) _type_) - (rigid-body-control-method-9 () none) ;; 9 ;; (rigid-body-control-method-9 (_type_ collide-shape-moving float) none) - (rigid-body-control-method-10 () none) ;; 10 ;; (rigid-body-control-method-10 (_type_ rigid-body-object float float) object) - (rigid-body-control-method-11 () none) ;; 11 ;; (rigid-body-control-method-11 (_type_ collide-shape-moving) none) - (rigid-body-control-method-12 () none) ;; 12 ;; (rigid-body-control-method-12 (_type_ float) none) - (rigid-body-control-method-13 () none) ;; 13 ;; (rigid-body-control-method-13 (_type_) none) - (rigid-body-control-method-14 () none) ;; 14 ;; (rigid-body-control-method-14 (_type_ float) none) - (rigid-body-control-method-15 () none) ;; 15 ;; (clear-force-torque! (_type_) none) - (rigid-body-control-method-16 () none) ;; 16 ;; (clear-momentum! (_type_) none) - (rigid-body-control-method-17 () none) ;; 17 ;; (rigid-body-control-method-17 (_type_ vector vector) none) - (rigid-body-control-method-18 () none) ;; 18 ;; (rigid-body-control-method-18 (_type_ vector vector) none) - (rigid-body-control-method-19 () none) ;; 19 ;; (rigid-body-control-method-19 (_type_ vector) none) - (rigid-body-control-method-20 () none) ;; 20 ;; (rigid-body-control-method-20 (_type_ vector vector float) none) - (rigid-body-control-method-21 () none) ;; 21 ;; (rigid-body-control-method-21 (_type_ vector vector) vector) - (rigid-body-control-method-22 () none) ;; 22 ;; (rigid-body-control-method-22 (_type_ vector) vector) - (rigid-body-control-method-23 () none) ;; 23 ;; (rigid-body-control-method-23 (_type_) none) - (rigid-body-control-method-24 () none) ;; 24 ;; (rigid-body-control-method-24 (_type_ rigid-body-info vector quaternion basic) none) - (rigid-body-control-method-25 () none) ;; 25 ;; (rigid-body-control-method-25 (_type_ vector quaternion) none) - (rigid-body-control-method-26 () none) ;; 26 - (rigid-body-control-method-27 () none) ;; 27 - (rigid-body-control-method-28 () none) ;; 28 - (rigid-body-control-method-29 () none) ;; 29 - (rigid-body-control-method-30 () none) ;; 30 - (rigid-body-control-method-31 () none) ;; 31 - (rigid-body-control-method-32 () none) ;; 32 - (rigid-body-control-method-33 () none) ;; 33 + (new (symbol type process) _type_) ;; 0 + (rigid-body-control-method-9 (_type_ collide-shape-moving float) none) ;; 9 + (rigid-body-control-method-10 (_type_ rigid-body-object float float) object) ;; 10 + (update-rbody-transform! (_type_ collide-shape-moving) none) ;; 11 + (rigid-body-control-method-12 (_type_ float) none) ;; 12 + (init-velocities! (_type_) none) ;; 13 + (rigid-body-control-method-14 (_type_ float) none) ;; 14 + (rigid-body-control-method-15 (_type_) none) ;; 15 + (reset-force-and-torque! (_type_) none) ;; 16 + (reset-momentum! (_type_) none) ;; 17 + (apply-impact! (_type_ vector vector) none) ;; 18 + (rigid-body-control-method-19 (_type_ vector vector) none) ;; 19 + (add-force! (_type_ vector) none) ;; 20 + (rigid-body-control-method-21 (_type_ vector vector float) none) ;; 21 + (rigid-body-control-method-22 (_type_ vector vector) none) ;; 22 + (rigid-body-control-method-23 (_type_ vector vector) none) ;; 23 + (rigid-body-control-method-24 (_type_ vector vector) none) ;; 24 + (rigid-body-control-method-25 (_type_ vector) none) ;; 25 + (rigid-body-control-method-26 (_type_) none) ;; 26 + (init! (_type_ rigid-body-info vector quaternion (function rigid-body-object float)) none) ;; 27 + (rigid-body-control-method-28 (_type_ vector quaternion) none) ;; 28 + (debug-print-info (_type_ object) none) ;; 29 + (debug-print-force-torque (_type_ object) none) ;; 30 + (debug-print-pos-rot (_type_ object) none) ;; 31 + (debug-print-momentum (_type_ object) none) ;; 32 + (debug-print-velocity (_type_ object) none) ;; 33 ) ) (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) @@ -28541,55 +28934,57 @@ :size-assert #x120 :flag-assert #x3800a00120 ;; field rigid-body-object-flag is likely a value type. + (:state-methods + idle ;; 28 + active ;; 29 + ) (:methods - (rigid-body-object-method-28 () none) ;; 28 ;; (active () _type_ :state) - (rigid-body-object-method-29 () none) ;; 29 ;; (rigid-body-object-method-29 (_type_ float) none) - (rigid-body-object-method-30 () none) ;; 30 ;; (rigid-body-object-method-30 (_type_) none) - (rigid-body-object-method-31 () none) ;; 31 ;; (alloc-and-init-rigid-body-control (_type_ rigid-body-object-constants) none) - (rigid-body-object-method-32 () none) ;; 32 ;; (allocate-and-init-cshape (_type_) none) - (rigid-body-object-method-33 () none) ;; 33 ;; (init-skel-and-rigid-body (_type_) none) - (rigid-body-object-method-34 () none) ;; 34 ;; (rigid-body-object-method-34 (_type_) none) - (rigid-body-object-method-35 () none) ;; 35 ;; (rigid-body-object-method-35 (_type_) none) - (rigid-body-object-method-36 () none) ;; 36 ;; (do-engine-sounds (_type_) none) - (rigid-body-object-method-37 () none) ;; 37 ;; (rigid-body-object-method-37 (_type_) none) - (rigid-body-object-method-38 () none) ;; 38 ;; (rigid-body-object-method-38 (_type_) none) - (rigid-body-object-method-39 () none) ;; 39 ;; (rigid-body-object-method-39 (_type_) none) - (rigid-body-object-method-40 () none) ;; 40 ;; (rigid-body-object-method-40 (_type_) none) - (rigid-body-object-method-41 () none) ;; 41 ;; (rigid-body-object-method-41 (_type_) none) - (rigid-body-object-method-42 () none) ;; 42 ;; (rigid-body-object-method-42 (_type_) none) - (rigid-body-object-method-43 () none) ;; 43 ;; (rigid-body-object-method-43 (_type_) none) - (rigid-body-object-method-44 () none) ;; 44 ;; (apply-damage (_type_ float rigid-body-impact) none) - (rigid-body-object-method-45 () none) ;; 45 ;; (rigid-body-object-method-45 (_type_ rigid-body-impact) none) - (rigid-body-object-method-46 () none) ;; 46 ;; (rigid-body-object-method-46 (_type_ process-drawable int symbol event-message-block) object) - (rigid-body-object-method-47 () none) ;; 47 ;; (rigid-body-object-method-47 (_type_ process-drawable attack-info touching-shapes-entry penetrate) symbol) - (rigid-body-object-method-48 () none) ;; 48 ;; (rigid-body-object-method-48 (_type_ process-focusable touching-shapes-entry) symbol) - (rigid-body-object-method-49 () none) ;; 49 ;; (rigid-body-object-method-49 (_type_ rigid-body-impact touching-shapes-entry) none) - (rigid-body-object-method-50 () none) ;; 50 ;; (rigid-body-object-method-50 (_type_ float) none) - (rigid-body-object-method-51 () none) ;; 51 ;; (rigid-body-object-method-51 (_type_) none) - (rigid-body-object-method-52 () none) ;; 52 ;; (rigid-body-object-method-52 (_type_) none) - (rigid-body-object-method-53 () none) ;; 53 - (rigid-body-object-method-54 () none) ;; 54 - (rigid-body-object-method-55 () none) ;; 55 + (rigid-body-object-method-30 (_type_) none) ;; 30 + (apply-gravity! (_type_ float) none) ;; 31 + (rigid-body-object-method-32 (_type_) none) ;; 32 + (alloc-rbody-control! (_type_ rigid-body-object-constants) none) ;; 33 ;; (init-skel-and-rigid-body (_type_) none) + (init-collision! (_type_) none) ;; 34 + (init-rbody-control! (_type_) none) ;; 35 + (go-idle (_type_) object) ;; 36 ;; (do-engine-sounds (_type_) none) + (rigid-body-object-method-37 (_type_) none) ;; 37 + (rigid-body-object-method-38 (_type_) none) ;; 38 + (rbody-post (_type_) none) ;; 39 + (apply-momentum! (_type_) none) ;; 40 + (disable-physics! (_type_) none) ;; 41 + (rigid-body-object-method-42 (_type_) none) ;; 42 + (rigid-body-object-method-43 (_type_) none) ;; 43 + (impulse-handler (_type_) none) ;; 44 + (go-active (_type_) object) ;; 45 + (apply-damage (_type_ float rigid-body-impact) none) ;; 46 + (impulse-force<-penetrate (_type_ rigid-body-impact attack-info penetrate) none) ;; 47 + (on-impact (_type_ rigid-body-impact) none) ;; 48 + (rbody-event-handler (_type_ process int symbol event-message-block) object) ;; 49 + (attack-handler (_type_ process-drawable attack-info touching-shapes-entry penetrate) symbol) ;; 50 + (touch-handler (_type_ process-focusable touching-shapes-entry) symbol) ;; 51 + (init-rbody-impact-from-tshape! (_type_ rigid-body-impact touching-shapes-entry) none) ;; 52 + (rigid-body-object-method-53 (_type_ float) none) ;; 53 + (rigid-body-object-method-54 (_type_) none) ;; 54 + (clear-impulse-force-flag! (_type_) none) ;; 55 ) ) (deftype rigid-body-queue (structure) ((count int8 :offset-assert 0) - (manager uint64 :offset-assert 8) + (manager handle :offset-assert 8) (array handle 128 :offset-assert 16) ;; guessed by decompiler ) :method-count-assert 17 :size-assert #x410 :flag-assert #x1100000410 (:methods - (rigid-body-queue-method-9 () none) ;; 9 ;; (rigid-body-queue-method-9 (_type_) none) - (rigid-body-queue-method-10 () none) ;; 10 ;; (rigid-body-queue-method-10 (_type_) none) - (rigid-body-queue-method-11 () none) ;; 11 ;; (rigid-body-queue-method-11 (_type_ rigid-body-object) none) - (rigid-body-queue-method-12 () none) ;; 12 ;; (rigid-body-queue-method-12 (_type_ int int) none) - (rigid-body-queue-method-13 () none) ;; 13 ;; (rigid-body-queue-method-13 (_type_ int rigid-body-object) none) - (rigid-body-queue-method-14 () none) ;; 14 ;; (rigid-body-queue-method-14 (_type_ int) none) - (rigid-body-queue-method-15 () none) ;; 15 ;; (rigid-body-queue-method-15 (_type_ rigid-body-object) none) - (rigid-body-queue-method-16 () none) ;; 16 ;; (validate (_type_) symbol) + (init-queue! (_type_ process) none) ;; 9 + (rigid-body-queue-method-10 (_type_) none) ;; 10 ;; (rigid-body-queue-method-10 (_type_) none) + (rigid-body-queue-method-11 (_type_ process) none) ;; 11 ;; (rigid-body-queue-method-11 (_type_ rigid-body-object) none) + (rigid-body-queue-method-12 (_type_ int int) none) ;; 12 ;; (rigid-body-queue-method-12 (_type_ int int) none) + (rigid-body-queue-method-13 (_type_ int process) none) ;; 13 ;; (rigid-body-queue-method-13 (_type_ int rigid-body-object) none) + (rigid-body-queue-method-14 (_type_ int) none) ;; 14 ;; (rigid-body-queue-method-14 (_type_ int) none) + (rigid-body-queue-method-15 (_type_ process) none) ;; 15 ;; (rigid-body-queue-method-15 (_type_ rigid-body-object) none) + (rigid-body-queue-method-16 (_type_) none) ;; 16 ;; (validate (_type_) symbol) ) ) @@ -28905,7 +29300,7 @@ (define-extern joint-anim-login "Login a joint-anim-drawable by calling login on all drawables" (function joint-anim-drawable joint-anim-drawable)) (define-extern joint-anim-inspect-elt "Inspect an uncompressed anim (unused)" (function joint-anim float joint-anim)) (define-extern jacc-mem-usage "Compute memory usage stats for a compressed joint anim." (function joint-anim-compressed-control memory-usage-block int joint-anim-compressed-control)) -(define-extern joint-control-cleanup "Remove all animations that are stored on the given heap and return those slots to a safe default." (function joint-control kheap art-joint-anim none)) +(define-extern joint-control-cleanup "Remove all animations that are stored on the given heap and return those slots to a safe default." (function joint-control kheap art-joint-anim symbol)) (define-extern joint-control-channel-eval "Run the num-func to produce the current frame for this channel." (function joint-control-channel float :behavior process)) (define-extern joint-control-channel-eval! "Update the num-func for this channel and evaluate it." (function joint-control-channel (function joint-control-channel float float float float) float :behavior process)) (define-extern joint-control-channel-group-eval! (function joint-control-channel art-joint-anim (function joint-control-channel float float float float) int)) @@ -29005,7 +29400,7 @@ (define-extern update-wind "Update the wind force for this frame. This value will be used by level-update-wind to update tie/shrub wind values." (function wind-work (array uint8) none)) (define-extern wind-get-hashed-index "Unused function, likely a leftover from Jak 1's different wind system." (function vector wind-work int)) -;; (define-extern level-update-wind function) ;; (function wind-work none) +(define-extern level-update-wind (function wind-work none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; bsp ;; @@ -29613,7 +30008,6 @@ ;; merc-blend-shape ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype blerc-block-header (structure) ((tag generic-merc-tag :inline :offset-assert 0) (vtx-count uint32 :offset-assert 16) @@ -29625,9 +30019,7 @@ :size-assert #x20 :flag-assert #x900000020 ) -|# -#| (deftype blerc-block (structure) ((output uint8 848 :offset-assert 0) ;; guessed by decompiler (header blerc-block-header :inline :offset-assert 848) @@ -29636,19 +30028,15 @@ :size-assert #x370 :flag-assert #x900000370 ) -|# -#| (deftype blerc-dcache (structure) - ((repl-mult vector 40 :offset-assert 0) ;; guessed by decompiler + ((repl-mult vector 40 :inline :offset-assert 0) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x280 :flag-assert #x900000280 ) -|# -#| (deftype blerc-globals (structure) ((first uint32 :offset-assert 0) (next uint32 :offset-assert 4) @@ -29662,9 +30050,7 @@ :size-assert #x18 :flag-assert #x900000018 ) -|# -#| (deftype blerc-context (structure) ((block-a blerc-block :inline :offset-assert 0) (dummy uint8 7312 :offset-assert 880) ;; guessed by decompiler @@ -29674,19 +30060,18 @@ :size-assert #x2370 :flag-assert #x900002370 ) -|# -;; (define-extern *stats-blerc* object) ;; symbol -;; (define-extern *blerc-globals* object) ;; blerc-globals -;; (define-extern blerc-stats-init function) ;; (function none) -;; (define-extern blerc-init function) ;; (function none) -;; (define-extern blerc-a-fragment function) -;; (define-extern dma-from-spr function) -;; (define-extern merc-dma-chain-to-spr function) -;; (define-extern blerc-execute function) ;; (function none) +(define-extern *stats-blerc* symbol) +(define-extern *blerc-globals* blerc-globals) +(define-extern blerc-stats-init (function none)) +(define-extern blerc-init (function none)) +(define-extern blerc-a-fragment function) +(define-extern dma-from-spr function) +(define-extern merc-dma-chain-to-spr function) +(define-extern blerc-execute (function none)) (define-extern merc-blend-shape (function process-drawable object)) -;; (define-extern setup-blerc-chains-for-one-fragment function) ;; (function object object object object object object object) -;; (define-extern setup-blerc-chains function) ;; (function merc-ctrl (pointer int16) dma-buffer none) +(define-extern setup-blerc-chains-for-one-fragment (function object object object object object object object)) +(define-extern setup-blerc-chains (function merc-ctrl (pointer int16) dma-buffer none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; merc ;; @@ -29719,39 +30104,36 @@ ;; ripple ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype ripple-request (structure) ((waveform ripple-wave :offset-assert 0) ;; guessed by decompiler (effect merc-effect :offset-assert 4) ) + :pack-me :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype ripple-globals (structure) ((count int32 :offset-assert 0) - (requests ripple-request 16 :offset-assert 4) ;; guessed by decompiler + (requests ripple-request 16 :inline :offset-assert 4) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x84 :flag-assert #x900000084 ) -|# -;; (define-extern *ripple-globals* object) ;; ripple-globals +(define-extern *ripple-globals* ripple-globals) (define-extern ripple-make-request (function ripple-wave merc-effect none)) -;; (define-extern ripple-update-waveform-offs function) ;; (function ripple-wave-set clock none) -;; (define-extern ripple-execute-init function) ;; (function none) -;; (define-extern ripple-create-wave-table function) ;; (function ripple-wave-set int) -;; (define-extern ripple-apply-wave-table function) ;; (function merc-effect symbol) -;; (define-extern ripple-execute function) ;; (function none) -;; (define-extern ripple-matrix-scale function) ;; function -;; (define-extern ripple-add-debug-sphere function) ;; (function process-drawable vector float float none) -;; (define-extern ripple-slow-add-sine-waves function) ;; (function ripple-wave-set float float float) -;; (define-extern ripple-find-height function) ;; (function process-drawable int vector float) +(define-extern ripple-update-waveform-offs (function ripple-wave-set clock none)) +(define-extern ripple-execute-init (function none)) +(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 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)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; bones ;; @@ -29817,7 +30199,7 @@ (define-extern foreground-check-longest-edge-asm (function draw-control float symbol)) (define-extern foreground-ripple (function draw-control merc-ctrl pointer int pointer)) (define-extern foreground-draw (function draw-control dma-buffer float none)) -;; (define-extern foreground-draw-hud function) ;; (function draw-control dma-buffer float none) +(define-extern foreground-draw-hud (function draw-control dma-buffer float none)) (define-extern *foreground* foreground-globals) (define-extern *foreground-draw-engine* engine) @@ -29845,14 +30227,14 @@ ;; generic-effect ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *target-lock* object) ;; object -;; (define-extern *generic-consts* object) ;; generic-consts -;; (define-extern generic-work-init function) ;; (function generic-bucket-state none) -;; (define-extern generic-upload-vu0 function) ;; (function none) -;; (define-extern upload-vu0-program function) ;; (function vu-function pointer none) -;; (define-extern generic-initialize-without-sync function) ;; (function matrix vu-lights none) -;; (define-extern generic-initialize function) ;; (function generic-bucket-state matrix vu-lights none) -;; (define-extern generic-wrapup function) ;; (function generic-bucket-state none) +(define-extern *target-lock* object) +(define-extern *generic-consts* generic-consts) +(define-extern generic-work-init "Initialize the scratchpad work for generic." (function generic-bucket-state none)) +(define-extern generic-upload-vu0 "Upload generic VU0 program." (function none)) +(define-extern upload-vu0-program "Upload vu-function to VU0." (function vu-function pointer none)) +(define-extern generic-initialize-without-sync "Init generic, version for generic-merc, which relies on generic-merc init running after." (function matrix vu-lights none)) +(define-extern generic-initialize "Normal init for generic - sets up scratchpad and VU0." (function generic-bucket-state matrix vu-lights none)) +(define-extern generic-wrapup (function generic-bucket-state none)) ;; (define-extern generic-dma-from-spr function) ;; (define-extern generic-light-proc function) ;; (define-extern generic-envmap-proc function) @@ -29870,9 +30252,9 @@ ;; (define-extern generic-copy-vtx-dclr-dtex function) ;; (define-extern generic-none function) ;; (define-extern generic-none-dma-wait function) -;; (define-extern *warp-data* object) ;; object -;; (define-extern generic-warp-source-proc function) ;; (function none) -;; (define-extern generic-warp-source function) ;; (function gsf-buffer none) +(define-extern *warp-data* object) ;; object +(define-extern generic-warp-source-proc (function none)) +(define-extern generic-warp-source (function gsf-buffer none)) ;; (define-extern generic-warp-dest-proc function) ;; (define-extern generic-warp-dest function) ;; (define-extern generic-warp-envmap-dest function) @@ -29908,7 +30290,7 @@ ;; (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-execute-all function) ;; (function dma-buffer none) +(define-extern generic-merc-execute-all (function dma-buffer none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; generic-tie ;; @@ -30001,7 +30383,7 @@ ;; (define-extern debug-draw-settings function) ;; (function shadow-settings symbol) ;; (define-extern shadow-execute function) ;; (function shadow-dma-packet pointer pointer) ;; (define-extern shadow-vu0-upload function) ;; (function none) -;; (define-extern shadow-execute-all function) ;; (function dma-buffer none) +(define-extern shadow-execute-all (function dma-buffer none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; shadow-vu1 ;; @@ -30057,10 +30439,10 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define-extern fx-copy-buf (function dma-buffer none)) -;; (define-extern *warp-shader* object) ;; adgif-shader -;; (define-extern create-blanket function) ;; (function symbol) -;; (define-extern *warp* object) ;; symbol -;; (define-extern warp-test function) ;; (function object object int none) +(define-extern *warp-shader* adgif-shader) +(define-extern create-blanket (function symbol)) +(define-extern *warp* symbol) +(define-extern warp-test (function object object int none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; texture-anim ;; @@ -30122,31 +30504,31 @@ ;; texture-anim-tables ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *sky-texture-anim-array* texture-anim-array) ;; (texture-anim-array texture-anim) -;; (define-extern set-fog-height! function) ;; (function float none) -;; (define-extern set-cloud-minmax! function) ;; (function float float none) -;; (define-extern *darkjak-texture-anim-array* texture-anim-array) ;; (texture-anim-array texture-anim) -;; (define-extern set-darkjak-texture-morph! function) ;; (function float none) -;; (define-extern *darkjak-highres-texture-anim-array* texture-anim-array) +(define-extern *sky-texture-anim-array* (texture-anim-array texture-anim)) +(define-extern set-fog-height! (function float none)) +(define-extern set-cloud-minmax! (function float float none)) +(define-extern *darkjak-texture-anim-array* (texture-anim-array texture-anim)) +(define-extern set-darkjak-texture-morph! (function float none)) +(define-extern *darkjak-highres-texture-anim-array* (texture-anim-array texture-anim)) ;; (define-extern set-darkjak-highres-texture-morph! function) ;; (function float symbol) (define-extern *skull-gem-texture-anim-array* (texture-anim-array texture-anim)) -;; (define-extern *default-water-texture-anim-array* texture-anim-array) -;; (define-extern *default-warp-texture-anim-array* texture-anim-array) +(define-extern *default-water-texture-anim-array* (texture-anim-array texture-anim)) +(define-extern *default-warp-texture-anim-array* (texture-anim-array texture-anim)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; blit-displays ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define-extern *blit-displays-work* blit-displays-work) -;; (define-extern draw-color-bars function) ;; (function none) +(define-extern draw-color-bars (function blit-displays-work none)) ;; (define-extern draw-raw-image function) ;; (function bucket-id art-group int int level int none) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; font-data ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *font12-table* object) ;; (inline-array vector) -;; (define-extern *font24-table* object) ;; (inline-array vector) +(define-extern *font12-table* (inline-array vector)) +(define-extern *font24-table* (inline-array vector)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; font ;; @@ -30157,17 +30539,16 @@ (b float :offset 32)) ) -;; (define-extern draw-string-asm function) ;; (function string dma-buffer font-context draw-string-result) +(define-extern draw-string-asm (function string dma-buffer font-context draw-string-result)) (define-extern draw-string (function string dma-buffer font-context draw-string-result)) -;; (define-extern get-string-length function) ;; (function string font-context draw-string-result) +(define-extern get-string-length (function string font-context draw-string-result)) (define-extern draw-string-xy (function string dma-buffer int int font-color font-flags draw-string-result)) -;; (define-extern draw-string-adv function) ;; (function string dma-buffer font-context none) +(define-extern draw-string-adv (function string dma-buffer font-context none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; decomp ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype huf-dictionary-node (structure) ((zero uint16 :offset-assert 0) (one uint16 :offset-assert 2) @@ -30176,27 +30557,26 @@ :size-assert #x4 :flag-assert #x900000004 ) -|# -;; (define-extern unpack-comp-rle function) ;; (function (pointer int8) (pointer int8) (pointer int8)) -;; (define-extern unpack-comp-huf function) ;; (function (pointer uint8) (pointer uint8) uint huf-dictionary-node none) -(define-extern unpack-comp-lzo (function (pointer uint8) (pointer uint8) none)) -;; (define-extern pack-comp-rle function) ;; (function (pointer uint8) (pointer uint8) int int (pointer uint8)) +(define-extern unpack-comp-rle "Decompress data compressed with run-length encoding." (function (pointer int8) (pointer int8) (pointer int8))) +(define-extern unpack-comp-huf "Decompress data compressed with huffman encoding." (function (pointer uint8) (pointer uint8) uint huf-dictionary-node none)) +(define-extern unpack-comp-lzo "Decompress data compressed with LZO encoding." (function (pointer uint8) (pointer uint8) none)) +(define-extern pack-comp-rle "Compress data, used for map mask stuff." (function (pointer uint8) (pointer uint8) int int (pointer uint8))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; background ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *background-work* object) ;; background-work -;; (define-extern background-vu0-block object) ;; vu-function -;; (define-extern background-upload-vu0 function) ;; (function none) -;; (define-extern init-background function) ;; (function none) -;; (define-extern upload-vis-bits function) ;; (function level level bsp-header none) -;; (define-extern set-background-regs! function) ;; (function level none) -;; (define-extern set-tie-quard-planes! function) ;; (function level none) -;; (define-extern set-shrub-quard-planes! function) ;; (function level none) -;; (define-extern set-subdivide-settings! function) -;; (define-extern finish-background function) ;; (function none) +(define-extern *background-work* background-work) +(define-extern background-vu0-block vu-function) +(define-extern background-upload-vu0 "Upload VU0 functions for background. (believed unused?)" (function none)) +(define-extern init-background "Reset lists of trees to draw for background rendering." (function none)) +(define-extern upload-vis-bits "Upload vis data to the scratchpad." (function level level bsp-header none)) +(define-extern set-background-regs! (function level none)) +(define-extern set-tie-quard-planes! "Set up TIE work guard planes." (function level none)) +(define-extern set-shrub-quard-planes! "Set shrub work guard planes." (function level none)) +(define-extern set-subdivide-settings! "Set subdivide settings from the level." (function level none)) +(define-extern finish-background "Run all renderers for background data added." (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; draw-node ;; @@ -30214,23 +30594,20 @@ ) |# -;; (define-extern draw-node-cull function) ;; (function pointer pointer (inline-array draw-node) int none) +(define-extern draw-node-cull (function pointer pointer (inline-array draw-node) int none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; shrubbery ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype dma-test (structure) - ((data qword 101 :offset-assert 0) ;; guessed by decompiler + ((data qword 101 :inline :offset-assert 0) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x650 :flag-assert #x900000650 ) -|# -#| (deftype dma-test-work (structure) ((upload dma-packet :inline :offset-assert 0) (end dma-packet :inline :offset-assert 16) @@ -30239,7 +30616,6 @@ :size-assert #x20 :flag-assert #x900000020 ) -|# #| (deftype prototype-shrubbery (drawable-inline-array) @@ -30253,25 +30629,25 @@ ) |# -;; (define-extern mem-usage-shrub-walk function) ;; (function draw-node int memory-usage-block int draw-node) -;; (define-extern highres-shrub-login function) -;; (define-extern shrub-vu1-block object) ;; vu-function -;; (define-extern shrub-num-tris function) ;; (function shrubbery uint) -(define-extern shrub-make-perspective-matrix (function matrix matrix matrix)) -;; (define-extern shrub-init-view-data function) ;; (function shrub-view-data symbol) -;; (define-extern shrub-upload-view-data function) ;; (function dma-buffer symbol) -;; (define-extern shrub-time function) ;; (function int int int int int int) -;; (define-extern shrub-do-init-frame function) ;; (function dma-buffer symbol) -;; (define-extern shrub-init-frame function) ;; (function dma-buffer gs-test symbol) -;; (define-extern shrub-upload-model function) ;; (function shrubbery dma-buffer int symbol) -;; (define-extern draw-inline-array-instance-shrub function) ;; (function dma-buffer drawable int (inline-array prototype-bucket-shrub) none) -;; (define-extern draw-prototype-inline-array-shrub function) ;; (function int (inline-array prototype-bucket-shrub) pointer) -;; (define-extern draw-drawable-tree-instance-shrub function) ;; (function drawable-tree-instance-shrub level none) -;; (define-extern *dma-test* object) ;; dma-test -;; (define-extern *dma-test-work* object) ;; dma-test-work -;; (define-extern init-dma-test function) ;; (function none) -;; (define-extern dma-test-func function) ;; (function none) -;; (define-extern move-test-func function) ;; (function none) +(define-extern mem-usage-shrub-walk "Walk the shrub tree and compute memory usagbe for draw nodes and shrub instances." (function draw-node int memory-usage-block int draw-node)) +(define-extern highres-shrub-login "Set draw-node's distance to max, to force to always draw." (function draw-node none)) +(define-extern shrub-vu1-block vu-function) +(define-extern shrub-num-tris "Get the number of triangles in this shrubbery." (function shrubbery uint)) +(define-extern shrub-make-perspective-matrix "Create shrub drawing matrix." (function matrix matrix matrix)) +(define-extern shrub-init-view-data "Initialize shrub drawing constants." (function shrub-view-data symbol)) +(define-extern shrub-upload-view-data "Create DMA to set shrub vu1 constants." (function dma-buffer symbol)) +(define-extern shrub-time "Unknown. Maybe rough cycle count for a shrub fragment?" (function int int int int int int)) +(define-extern shrub-do-init-frame "Set up DMA to set up VU1 for shrub rendering." (function dma-buffer symbol)) +(define-extern shrub-init-frame "Set up DMA to set up VU1 and GS for shrub rendering." (function dma-buffer gs-test symbol)) +(define-extern shrub-upload-model "Set up DMA to upload a single shrub model." (function shrubbery dma-buffer int symbol)) +(define-extern draw-inline-array-instance-shrub (function dma-buffer drawable int (inline-array prototype-bucket-shrub) none)) +(define-extern draw-prototype-inline-array-shrub (function int (inline-array prototype-bucket-shrub) pointer)) +(define-extern draw-drawable-tree-instance-shrub "Draw a shrub tree!" (function drawable-tree-instance-shrub level none)) +(define-extern *dma-test* dma-test) +(define-extern *dma-test-work* dma-test-work) +(define-extern init-dma-test (function none)) +(define-extern dma-test-func (function none)) +(define-extern move-test-func (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; shrub-work ;; @@ -30283,9 +30659,9 @@ ;; tfrag-near ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern tnear-vu1-block object) ;; vu-function -;; (define-extern tfrag-details function) ;; (function tfragment none) -;; (define-extern clip-restore function) ;; (function none) +(define-extern tnear-vu1-block vu-function) +(define-extern tfrag-details (function tfragment none)) +(define-extern clip-restore (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; tfrag ;; @@ -30303,49 +30679,47 @@ ) |# -;; (define-extern *tfrag-display-stats* object) ;; symbol -;; (define-extern tfrag-vu1-block object) ;; vu-function -;; (define-extern tfrag-data-setup function) ;; (function tfrag-data int int none) -;; (define-extern add-tfrag-mtx-0 function) ;; (function dma-buffer symbol none) -;; (define-extern add-tfrag-mtx-1 function) ;; (function dma-buffer symbol none) -;; (define-extern add-tfrag-data function) ;; (function dma-buffer int int none) -;; (define-extern t-stat object) ;; tfrag-stats -;; (define-extern tfrag-print-stats function) ;; (function symbol none) -;; (define-extern tfrag-init-buffer function) ;; (function dma-buffer gs-test int symbol none) -;; (define-extern tfrag-end-buffer function) ;; (function dma-buffer int none) -;; (define-extern draw-inline-array-tfrag function) ;; (function pointer drawable-inline-array int dma-buffer none) -;; (define-extern tfrag-scissor-init-buffer function) ;; (function dma-buffer gs-test int symbol none) -;; (define-extern tfrag-scissor-end-buffer function) ;; (function dma-buffer uint none) -;; (define-extern draw-inline-array-tfrag-scissor function) ;; (function pointer drawable-inline-array int dma-buffer none) -;; (define-extern stats-tfrag-asm function) ;; (function tfragment none) +(define-extern *tfrag-display-stats* symbol) +(define-extern tfrag-vu1-block vu-function) +(define-extern tfrag-data-setup "Set up VU1 constants" (function tfrag-data int int none)) +(define-extern add-tfrag-mtx-0 "Add DMA for transferring matrix0 (same as matrix1)" (function dma-buffer symbol none)) +(define-extern add-tfrag-mtx-1 "Add DMA for transferring matrix1 (same as matrix0)" (function dma-buffer symbol none)) +(define-extern add-tfrag-data "Add DMA for tfrag constants." (function dma-buffer int int none)) +(define-extern t-stat tfrag-stats) +(define-extern tfrag-print-stats "Print out accumulated tfrag stats." (function symbol none)) +(define-extern tfrag-init-buffer "Initialize DMA bucket for Tfrag rendering." (function dma-buffer gs-test int symbol none)) +(define-extern tfrag-end-buffer "Finalize DMA bucket for tfrag rendering." (function dma-buffer int none)) +(define-extern draw-inline-array-tfrag (function pointer drawable-inline-array int dma-buffer none)) +(define-extern tfrag-scissor-init-buffer (function dma-buffer gs-test int symbol none)) +(define-extern tfrag-scissor-end-buffer (function dma-buffer uint none)) +(define-extern draw-inline-array-tfrag-scissor (function pointer drawable-inline-array int dma-buffer none)) +(define-extern stats-tfrag-asm (function tfragment none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; tfrag-methods ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype tfrag-init-data (structure) - ((tfrag-bucket int32 :offset-assert 0) ;; bucket-id - (tfrag-scissor-bucket int32 :offset-assert 4) ;; bucket-id - (tfrag-trans-bucket int32 :offset-assert 8) ;; bucket-id - (tfrag-scissor-trans-bucket int32 :offset-assert 12) ;; bucket-id - (tfrag-water-bucket int32 :offset-assert 16) ;; bucket-id - (tfrag-water-scissor-bucket int32 :offset-assert 20) ;; bucket-id + ((tfrag-bucket bucket-id :offset-assert 0) + (tfrag-scissor-bucket bucket-id :offset-assert 4) + (tfrag-trans-bucket bucket-id :offset-assert 8) + (tfrag-scissor-trans-bucket bucket-id :offset-assert 12) + (tfrag-water-bucket bucket-id :offset-assert 16) + (tfrag-water-scissor-bucket bucket-id :offset-assert 20) ) :method-count-assert 9 :size-assert #x18 :flag-assert #x900000018 ) -|# -;; (define-extern edge-debug-lines function) ;; (function (array vector-array) none) -;; (define-extern draw-drawable-tree-tfrag function) ;; (function drawable-tree-tfrag none) -;; (define-extern draw-drawable-tree-tfrag-trans function) ;; (function drawable-tree-tfrag none) -;; (define-extern draw-drawable-tree-tfrag-water function) ;; (function drawable-tree-tfrag none) -;; (define-extern tfrag-vu1-init-buf function) ;; (function bucket-id gs-test int uint symbol none) -;; (define-extern tfrag-scissor-vu1-init-buf function) ;; (function bucket-id gs-test int uint symbol none) -;; (define-extern *tfrag-init-table* object) ;; (inline-array tfrag-init-data) -;; (define-extern tfrag-vu1-init-buffers function) ;; (function none) +(define-extern edge-debug-lines "Draw tfrag debug lines. These debug-lines are not stored in retail copies." (function (array vector-array) none)) +(define-extern draw-drawable-tree-tfrag "Top-level function to generate DMA for tfrag." (function drawable-tree-tfrag none)) +(define-extern draw-drawable-tree-tfrag-trans "Top-level function to generate DMA for tfrag." (function drawable-tree-tfrag none)) +(define-extern draw-drawable-tree-tfrag-water "Top-level function to generate DMA for tfrag." (function drawable-tree-tfrag none)) +(define-extern tfrag-vu1-init-buf "Do all tfrag buffer setup for a single bucket." (function bucket-id gs-test int uint symbol none)) +(define-extern tfrag-scissor-vu1-init-buf (function bucket-id gs-test int uint symbol none)) +(define-extern *tfrag-init-table* (inline-array tfrag-init-data)) +(define-extern tfrag-vu1-init-buffers "Initialize all tfrag buckets." (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; tfrag-work ;; @@ -30357,28 +30731,26 @@ ;; tie ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype tie-consts (structure) ((data uint32 40 :offset-assert 0) ;; guessed by decompiler - (vector vector 10 :offset-assert 0) ;; guessed by decompiler - (quads uint128 10 :offset-assert 0) ;; guessed by decompiler - (adgif qword :inline :offset-assert 0) ;; gs-gif-tag :inline - (strgif qword :inline :offset-assert 16) ;; gs-gif-tag :inline - (extra qword :inline :offset-assert 32) ;; vector :inline - (gifbufs qword :inline :offset-assert 48) ;; vector :inline - (clrbufs qword :inline :offset-assert 64) - (misc qword :inline :offset-assert 80) - (atestgif qword :inline :offset-assert 96) ;; gs-gif-tag :inline - (alpha qword :inline :offset-assert 112) ;; gs-adcmd :inline - (atest gs-adcmd 2 :offset-assert 128) ;; guessed by decompiler - (atest-tra gs-adcmd :inline :offset-assert 128) - (atest-def gs-adcmd :inline :offset-assert 144) + (vector vector 10 :inline :offset 0) ;; guessed by decompiler + (quads uint128 10 :offset 0) ;; guessed by decompiler + (adgif gs-gif-tag :inline :offset 0) ;; gs-gif-tag :inline + (strgif gs-gif-tag :inline :offset 16) ;; gs-gif-tag :inline + (extra vector :inline :offset 32) ;; vector :inline + (gifbufs vector :inline :offset 48) ;; vector :inline + (clrbufs qword :inline :offset 64) + (misc qword :inline :offset 80) + (atestgif gs-gif-tag :inline :offset 96) ;; gs-gif-tag :inline + (alpha gs-adcmd :inline :offset 112) ;; gs-adcmd :inline + (atest gs-adcmd 2 :inline :offset 128 :score -1) ;; guessed by decompiler + (atest-tra gs-adcmd :inline :offset 128) + (atest-def gs-adcmd :inline :offset 144) ) :method-count-assert 9 :size-assert #xa0 :flag-assert #x9000000a0 ) -|# #| (deftype drawable-inline-array-instance-tie (drawable-inline-array) @@ -30404,26 +30776,25 @@ ) |# -;; (define-extern tie-vu1-block object) ;; vu-function -;; (define-extern tie-init-consts function) ;; (function tie-consts gs-alpha gs-test gs-test none) -;; (define-extern tie-init-engine function) ;; (function dma-buffer gs-alpha gs-test gs-test none) -;; (define-extern tie-end-buffer function) ;; (function dma-buffer none) -;; (define-extern tie-int-reg function) ;; (function int string) -;; (define-extern tie-float-reg function) ;; (function int string) -;; (define-extern tie-ints function) ;; (function none) -;; (define-extern tie-floats function) ;; (function none) +(define-extern tie-vu1-block vu-function) +(define-extern tie-init-consts "Set up tie-consts for VU1" (function tie-consts gs-alpha gs-test gs-test none)) +(define-extern tie-init-engine "Set up DMA to initialize TIE vu1." (function dma-buffer gs-alpha gs-test gs-test none)) +(define-extern tie-end-buffer "Set up DMA to finish TIE." (function dma-buffer none)) +(define-extern tie-int-reg "Get the name of TIE VU1 program integer register." (function int string)) +(define-extern tie-float-reg "Get the name of TIE VU1 program float register." (function int string)) +(define-extern tie-ints "Dump TIE integer regs for debug." (function none)) +(define-extern tie-floats "Dump TIE float regs for debug." (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; etie-vu1 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype etie-consts (structure) ((gifbufs qword :inline :offset-assert 0) - (adgif qword :inline :offset-assert 16) ;; gs-gif-tag :inline + (adgif gs-gif-tag :inline :offset-assert 16) ;; :inline (alpha qword :inline :offset-assert 32) - (strgif qword :inline :offset-assert 48) ;; gs-gif-tag :inline - (envgif qword :inline :offset-assert 64) ;; gs-gif-tag :inline + (strgif gs-gif-tag :inline :offset-assert 48) ;; gs-gif-tag :inline + (envgif gs-gif-tag :inline :offset-assert 64) ;; gs-gif-tag :inline (envmap adgif-shader :inline :offset-assert 80) (pers0 vector :inline :offset-assert 160) (pers1 vector :inline :offset-assert 176) @@ -30432,28 +30803,25 @@ :size-assert #xc0 :flag-assert #x9000000c0 ) -|# -#| (deftype etie-matrix (structure) ((rmtx matrix :inline :offset-assert 0) (nmtx matrix3 :inline :offset-assert 64) - (morph float :offset-assert 76) - (fog float :offset-assert 92) - (fade uint32 :offset-assert 108) + (morph float :offset 76) + (fog float :offset 92) + (fade uint32 :offset 108) (tint qword :inline :offset-assert 112) ) :method-count-assert 9 :size-assert #x80 :flag-assert #x900000080 ) -|# -;; (define-extern etie-vu1-block object) ;; vu-function -;; (define-extern etie-magic function) ;; (function int int) -;; (define-extern etie-init-consts function) ;; (function etie-consts gs-alpha none) -;; (define-extern etie-init-engine function) ;; (function dma-buffer gs-alpha gs-test none) -;; (define-extern etie-end-buffer function) ;; (function dma-buffer none) +(define-extern etie-vu1-block vu-function) +(define-extern etie-magic (function int int)) +(define-extern etie-init-consts (function etie-consts gs-alpha none)) +(define-extern etie-init-engine (function dma-buffer gs-alpha gs-test none)) +(define-extern etie-end-buffer (function dma-buffer none)) ;; (define-extern etie-float-reg-bp function) ;; (define-extern etie-float-reg function) ;; (define-extern etie-floats function) @@ -30568,7 +30936,7 @@ ;; (define-extern tie-near-init-consts function) ;; (define-extern tie-near-init-engine function) ;; (function dma-buffer gs-test int none) ;; (define-extern tie-near-end-buffer function) ;; (function dma-buffer none) -;; (define-extern tie-scissor-make-perspective-matrix function) ;; (function matrix matrix none) +(define-extern tie-scissor-make-perspective-matrix (function matrix matrix none)) ;; (define-extern tie-near-int-reg function) ;; (define-extern tie-near-float-reg function) @@ -30583,7 +30951,6 @@ ;; tie-methods ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype tie-debug (structure) ((max-instance uint32 :offset-assert 0) (min-instance uint32 :offset-assert 4) @@ -30594,54 +30961,51 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype tie-init-data (structure) - ((tie-bucket int32 :offset-assert 0) ;; bucket-id - (tie-scissor-bucket int32 :offset-assert 4) ;; bucket-id - (tie-envmap-bucket int32 :offset-assert 8) ;; bucket-id - (tie-envmap-scissor-bucket int32 :offset-assert 12) ;; bucket-id - (tie-vanish-bucket int32 :offset-assert 16) ;; bucket-id - (tie-trans-bucket int32 :offset-assert 20) ;; bucket-id - (tie-scissor-trans-bucket int32 :offset-assert 24) ;; bucket-id - (tie-envmap-trans-bucket int32 :offset-assert 28) ;; bucket-id - (tie-envmap-scissor-trans-bucket int32 :offset-assert 32) ;; bucket-id - (tie-water-bucket int32 :offset-assert 36) ;; bucket-id - (tie-scissor-water-bucket int32 :offset-assert 40) ;; bucket-id - (tie-envmap-water-bucket int32 :offset-assert 44) ;; bucket-id - (tie-envmap-scissor-water-bucket int32 :offset-assert 48) ;; bucket-id + ((tie-bucket bucket-id :offset-assert 0) + (tie-scissor-bucket bucket-id :offset-assert 4) + (tie-envmap-bucket bucket-id :offset-assert 8) + (tie-envmap-scissor-bucket bucket-id :offset-assert 12) + (tie-vanish-bucket bucket-id :offset-assert 16) + (tie-trans-bucket bucket-id :offset-assert 20) + (tie-scissor-trans-bucket bucket-id :offset-assert 24) + (tie-envmap-trans-bucket bucket-id :offset-assert 28) + (tie-envmap-scissor-trans-bucket bucket-id :offset-assert 32) + (tie-water-bucket bucket-id :offset-assert 36) + (tie-scissor-water-bucket bucket-id :offset-assert 40) + (tie-envmap-water-bucket bucket-id :offset-assert 44) + (tie-envmap-scissor-water-bucket bucket-id :offset-assert 48) ) :method-count-assert 9 :size-assert #x34 :flag-assert #x900000034 ) -|# -;; (define-extern *tie* object) ;; tie-debug -;; (define-extern tie-debug-between function) ;; (function uint uint uint) -;; (define-extern tie-debug-one function) ;; (function uint uint uint) -;; (define-extern tie-debug-frag-between function) ;; (function uint uint uint) -;; (define-extern tie-debug-frag-one function) ;; (function uint uint uint) -;; (define-extern walk-tie-generic-prototypes function) ;; (function none) -;; (define-extern *pke-hack* object) ;; vector -;; (define-extern draw-inline-array-instance-tie function) ;; (function pointer (inline-array instance-tie) int dma-buffer none) -;; (define-extern draw-inline-array-prototype-tie-asm function) ;; (function dma-buffer int prototype-array-tie none) -;; (define-extern instance-tie-patch-buckets function) ;; (function dma-buffer level object) -;; (define-extern draw-drawable-tree-instance-tie function) ;; (function drawable-tree-instance-tie level none) -;; (define-extern tie-init-scissor-buf function) ;; (function bucket-id gs-alpha gs-test gs-test none) -;; (define-extern tie-init-buf function) ;; (function bucket-id gs-alpha gs-test gs-test none) -;; (define-extern tie-init-envmap-buf function) ;; (function bucket-id gs-alpha gs-test none) -;; (define-extern tie-init-envmap-scissor-buf function) ;; (function bucket-id gs-alpha int int none) -;; (define-extern *tie-init-table* object) ;; (inline-array tie-init-data) -;; (define-extern tie-vu1-init-buffers function) ;; (function none) +(define-extern *tie* tie-debug) +(define-extern tie-debug-between (function uint uint uint)) +(define-extern tie-debug-one (function uint uint uint)) +(define-extern tie-debug-frag-between (function uint uint uint)) +(define-extern tie-debug-frag-one (function uint uint uint)) +(define-extern walk-tie-generic-prototypes (function none)) +(define-extern *pke-hack* vector) +(define-extern draw-inline-array-instance-tie (function pointer (inline-array instance-tie) int dma-buffer none)) +(define-extern draw-inline-array-prototype-tie-asm (function dma-buffer int prototype-array-tie none)) +(define-extern instance-tie-patch-buckets (function dma-buffer level object)) +(define-extern draw-drawable-tree-instance-tie (function drawable-tree-instance-tie level none)) +(define-extern tie-init-scissor-buf (function bucket-id gs-alpha gs-test gs-test none)) +(define-extern tie-init-buf (function bucket-id gs-alpha gs-test gs-test none)) +(define-extern tie-init-envmap-buf (function bucket-id gs-alpha gs-test none)) +(define-extern tie-init-envmap-scissor-buf (function bucket-id gs-alpha int int none)) +(define-extern *tie-init-table* (inline-array tie-init-data)) +(define-extern tie-vu1-init-buffers (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; prim ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *prim-work* object) -;; (define-extern prim-engine-execute function) +(define-extern *prim-work* prim-work) +(define-extern prim-engine-execute "Generate all prim DMA." (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sync-info ;; @@ -30659,7 +31023,6 @@ ;; sparticle-launcher ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype sp-queued-launch-particles (structure) ((sp-system sparticle-system :offset-assert 0) ;; guessed by decompiler (sp-launcher sparticle-launcher :offset-assert 4) ;; guessed by decompiler @@ -30669,34 +31032,28 @@ :size-assert #x20 :flag-assert #x900000020 ) -|# -#| (deftype sp-launch-queue (basic) ((in-use int32 :offset-assert 4) - (queue sp-queued-launch-particles 256 :offset-assert 16) ;; guessed by decompiler + (queue sp-queued-launch-particles 256 :inline :offset-assert 16) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x2010 :flag-assert #x900002010 ) -|# -#| (deftype particle-adgif-cache (basic) ((used int32 :offset-assert 4) (last uint16 :offset-assert 8) (lastgif adgif-shader :offset-assert 12) (tidhash uint16 80 :offset-assert 16) ;; guessed by decompiler - (spadgif adgif-shader 80 :offset-assert 176) ;; guessed by decompiler + (spadgif adgif-shader 80 :inline :offset-assert 176) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x19b0 :flag-assert #x9000019b0 ) -|# -#| (deftype sp-launch-stack (structure) ((ra basic :offset-assert 0) (dummy0 basic :offset-assert 4) @@ -30720,125 +31077,124 @@ :flag-assert #x900000130 ;; field ra uses ~A with a signed load. field dummy0 uses ~A with a signed load. field dummy1 uses ~A with a signed load. field b-spfic uses ~A with a signed load. field l-spfic uses ~A with a signed load. ) -|# ;; sparticle-launcher is already defined! (define-extern *part-id-table* (array sparticle-launcher)) (define-extern *part-group-id-table* (array sparticle-launch-group)) -;; (define-extern *sp-temp* object) ;; float -;; (define-extern lookup-part-group-by-name function) ;; (function string sparticle-launch-group) +(define-extern *sp-temp* float) +(define-extern lookup-part-group-by-name (function string sparticle-launch-group)) (define-extern lookup-part-group-pointer-by-name (function string (pointer object))) (define-extern part-group-pointer? (function pointer symbol)) -;; (define-extern unlink-part-group-by-heap function) ;; (function kheap int) -;; (define-extern sp-init-fields! function) ;; (function (pointer float) (inline-array sp-field-init-spec) sp-field-id sp-field-id symbol (inline-array sp-field-init-spec)) -;; (define-extern *sp-launcher-lock* object) ;; symbol -;; (define-extern *sp-launch-queue* object) ;; sp-launch-queue -;; (define-extern *sp-launcher-enable* object) ;; symbol -;; (define-extern particle-setup-adgif function) ;; (function adgif-shader int none) -;; (define-extern *particle-adgif-cache* object) ;; particle-adgif-cache -;; (define-extern particle-adgif-cache-flush function) ;; (function none) -;; (define-extern particle-adgif function) ;; (function adgif-shader texture-id none) -;; (define-extern particle-adgif-callback function) ;; (function adgif-shader texture-id none) -;; (define-extern sp-queue-launch function) ;; (function sparticle-system sparticle-launcher matrix int) -;; (define-extern sp-adjust-launch function) ;; (function sparticle-launchinfo sparticle-cpuinfo (inline-array sp-field-init-spec) matrix symbol none) -;; (define-extern sp-euler-convert function) ;; (function sparticle-launchinfo sparticle-cpuinfo none) -;; (define-extern sp-rotate-system function) ;; (function sparticle-launchinfo sparticle-cpuinfo transformq none) +(define-extern unlink-part-group-by-heap (function kheap int)) +(define-extern sp-init-fields! (function (pointer float) (inline-array sp-field-init-spec) sp-field-id sp-field-id symbol (inline-array sp-field-init-spec))) +(define-extern *sp-launcher-lock* symbol) +(define-extern *sp-launch-queue* sp-launch-queue) +(define-extern *sp-launcher-enable* symbol) +(define-extern particle-setup-adgif (function adgif-shader int none)) +(define-extern *particle-adgif-cache* particle-adgif-cache) +(define-extern particle-adgif-cache-flush (function none)) +(define-extern particle-adgif (function adgif-shader texture-id none)) +(define-extern particle-adgif-callback (function adgif-shader texture-id none)) +(define-extern sp-queue-launch (function sparticle-system sparticle-launcher matrix int)) +(define-extern sp-adjust-launch (function sparticle-launchinfo sparticle-cpuinfo (inline-array sp-field-init-spec) matrix symbol none)) +(define-extern sp-euler-convert (function sparticle-launchinfo sparticle-cpuinfo none)) +(define-extern sp-rotate-system (function sparticle-launchinfo sparticle-cpuinfo transformq none)) (define-extern sp-launch-particles-var (function sparticle-system sparticle-launcher matrix sparticle-launch-state sparticle-launch-control float none)) -;; (define-extern *death-adgif* object) ;; adgif-shader -;; (define-extern sp-launch-particles-death function) ;; (function sparticle-system sparticle-launcher vector none) -;; (define-extern sp-clear-queue function) ;; (function none) -;; (define-extern sp-relaunch-setup-fields function) ;; (function object sparticle-launcher sparticle-cpuinfo sprite-vec-data-3d none) -;; (define-extern sp-relaunch-particle-2d function) ;; (function object sparticle-launcher sparticle-cpuinfo sprite-vec-data-3d none) -;; (define-extern sp-relaunch-particle-3d function) ;; (function object sparticle-launcher sparticle-cpuinfo sprite-vec-data-3d none) -;; (define-extern execute-particle-local-space-engine function) -;; (define-extern local-space-camera function) +(define-extern *death-adgif* adgif-shader) +(define-extern sp-launch-particles-death (function sparticle-system sparticle-launcher vector none)) +(define-extern sp-clear-queue (function none)) +(define-extern sp-relaunch-setup-fields (function object sparticle-launcher sparticle-cpuinfo sprite-vec-data-3d none)) +(define-extern sp-relaunch-particle-2d (function object sparticle-launcher sparticle-cpuinfo sprite-vec-data-2d none)) +(define-extern sp-relaunch-particle-3d (function object sparticle-launcher sparticle-cpuinfo sprite-vec-data-3d none)) +(define-extern execute-particle-local-space-engine (function int none)) +(define-extern local-space-camera (function particle-local-space-info none)) (define-extern local-space-proc-joint (function particle-local-space-info none)) -;; (define-extern execute-part-engine function) ;; (function none) -;; (define-extern sparticle-track-root function) ;; (function object sparticle-cpuinfo vector none) -;; (define-extern sparticle-track-root-prim function) ;; (function object sparticle-cpuinfo vector none) -;; (define-extern sparticle-track-joint function) ;; (function sparticle-system sparticle-cpuinfo vector none) -;; (define-extern sparticle-turn-to-vel function) ;; (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d none) -;; (define-extern sparticle-rotate-to-vel-3d function) -;; (define-extern birth-func-clean function) -;; (define-extern birth-func-process-clock function) -;; (define-extern birth-func-copy-rot-color function) ;; (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none) -;; (define-extern *global-toggle* object) ;; int -;; (define-extern birth-func-copy2-rot-color function) ;; (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none) -;; (define-extern birth-func-copy-omega-to-z function) ;; (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none) -;; (define-extern birth-func-random-next-time function) ;; (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none) -;; (define-extern sparticle-respawn-heights function) ;; (function sparticle-system sparticle-cpuinfo vector none) -;; (define-extern sparticle-respawn-timer function) ;; (function sparticle-system sparticle-cpuinfo vector none) -;; (define-extern sparticle-texture-animate function) ;; (function sparticle-system sparticle-cpuinfo vector none) -;; (define-extern sparticle-texture-day-night function) ;; (function sparticle-system sparticle-cpuinfo sprite-vec-data-2d none) -;; (define-extern sparticle-mode-animate function) ;; (function sparticle-system sparticle-cpuinfo sprite-vec-data-2d none) -;; (define-extern sparticle-motion-blur function) ;; (function sparticle-system sparticle-cpuinfo vector none) -;; (define-extern sparticle-motion-blur-old function) ;; (function object sparticle-cpuinfo sprite-vec-data-3d object) -;; (define-extern sparticle-set-conerot function) ;; (function sparticle-launcher vector none) -;; (define-extern sparticle-next-on-mode-1 function) ;; (function sparticle-system sparticle-cpuinfo sparticle-launchinfo float) -;; (define-extern check-ground-bounce function) ;; (function sparticle-system sparticle-cpuinfo sparticle-launchinfo float) -;; (define-extern check-drop-group-center function) ;; (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none) -;; (define-extern check-bubble-height function) -;; (define-extern check-raise-group-center function) -;; (define-extern birth-func-y->userdata function) ;; (function sparticle-system sparticle-cpuinfo matrix none) -;; (define-extern birth-func-ocean-height function) ;; (function sparticle-system sparticle-cpuinfo matrix none) -;; (define-extern birth-func-camera-orient function) ;; (function int sparticle-cpuinfo sparticle-launchinfo none) -;; (define-extern birth-func-set-parent-pntr function) -;; (define-extern birth-func-get-parent-quat function) -;; (define-extern spt-func-camera-facing-orbiter function) +(define-extern execute-part-engine (function none)) +(define-extern sparticle-track-root (function object sparticle-cpuinfo vector none)) +(define-extern sparticle-track-root-prim (function object sparticle-cpuinfo vector none)) +(define-extern sparticle-track-joint (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern sparticle-turn-to-vel (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d none)) +(define-extern sparticle-rotate-to-vel-3d (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d vector none)) +(define-extern birth-func-clean (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) +(define-extern birth-func-process-clock (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) +(define-extern birth-func-copy-rot-color (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) +(define-extern *global-toggle* int) +(define-extern birth-func-copy2-rot-color (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) +(define-extern birth-func-copy-omega-to-z (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) +(define-extern birth-func-random-next-time (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) +(define-extern sparticle-respawn-heights (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern sparticle-respawn-timer (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern sparticle-texture-animate (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern sparticle-texture-day-night (function sparticle-system sparticle-cpuinfo sprite-vec-data-2d none)) +(define-extern sparticle-mode-animate (function sparticle-system sparticle-cpuinfo sprite-vec-data-2d none)) +(define-extern sparticle-motion-blur (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern sparticle-motion-blur-old (function object sparticle-cpuinfo sprite-vec-data-3d object)) +(define-extern sparticle-set-conerot (function sparticle-launcher vector none)) +(define-extern sparticle-next-on-mode-1 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo float)) +(define-extern check-ground-bounce (function sparticle-system sparticle-cpuinfo sparticle-launchinfo float)) +(define-extern check-drop-group-center (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern check-bubble-height (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern check-raise-group-center (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern birth-func-y->userdata (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern birth-func-ocean-height (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern birth-func-camera-orient (function int sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern birth-func-set-parent-pntr (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) +(define-extern birth-func-get-parent-quat (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) +(define-extern spt-func-camera-facing-orbiter (function sparticle-system sparticle-cpuinfo sparticle-launchinfo quaternion)) (define-extern *particle-quat* quaternion) -;; (define-extern birth-func-set-quat function) ;; (function int sparticle-cpuinfo sparticle-launchinfo none) +(define-extern birth-func-set-quat (function int sparticle-cpuinfo sparticle-launchinfo none)) (define-extern *particle-vel* vector) -;; (define-extern birth-func-set-vel function) ;; (function object sparticle-cpuinfo sparticle-launchinfo none) -;; (define-extern birth-func-texture-group function) ;; (function int sparticle-cpuinfo sparticle-launchinfo none) -;; (define-extern rot-to-particle function) -;; (define-extern birth-func-flip-based-on-scale function) -;; (define-extern sparticle-2d-spline-align function) -;; (define-extern sparticle-2d-spline-align-instant function) -;; (define-extern birth-func-inherit-size function) -;; (define-extern birth-func-texture-group-2d function) -;; (define-extern birth-func-set-vel-2d function) -;; (define-extern sparticle-3d-rotate-xz-to-camera function) -;; (define-extern spt-func-relative-pos function) -;; (define-extern spt-func-turn-to-vel-radial function) +(define-extern birth-func-set-vel (function object sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern birth-func-texture-group (function int sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern rot-to-particle (function degrees sprite-vec-data-2d matrix none)) +(define-extern birth-func-flip-based-on-scale (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) +(define-extern sparticle-2d-spline-align (function object sparticle-cpuinfo sprite-vec-data-2d object none)) +(define-extern sparticle-2d-spline-align-instant (function object sparticle-cpuinfo sprite-vec-data-2d none)) +(define-extern birth-func-inherit-size (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) +(define-extern birth-func-texture-group-2d (function object sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern birth-func-set-vel-2d (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern sparticle-3d-rotate-xz-to-camera (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d none)) +(define-extern spt-func-relative-pos (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d none)) +(define-extern spt-func-turn-to-vel-radial (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sparticle ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern sp-particle-copy! function) ;; (function sparticle-cpuinfo sparticle-cpuinfo none) +(define-extern sp-particle-copy! (function sparticle-cpuinfo sparticle-cpuinfo none)) (define-extern *sp-particle-system-2d* sparticle-system) (define-extern *sp-particle-system-3d* sparticle-system) -;; (define-extern sp-get-block-size function) ;; (function sparticle-system int int) -;; (define-extern sp-get-approx-alloc-size function) ;; (function sparticle-system int int) -;; (define-extern sp-free-particle function) ;; (function sparticle-system int sparticle-cpuinfo sprite-vec-data-2d none) -;; (define-extern sp-get-particle function) ;; (function sparticle-system int sparticle-launch-state sparticle-cpuinfo) -;; (define-extern sp-kill-particle function) ;; (function sparticle-system sparticle-cpuinfo symbol) -;; (define-extern sp-orbiter function) ;; (function sparticle-system sparticle-cpuinfo vector none) -;; (define-extern sp-process-block-2d function) ;; (function sparticle-system int int int int symbol none) -;; (define-extern sp-process-block-3d function) ;; (function sparticle-system int int int int symbol none) -;; (define-extern sp-copy-to-spr function) ;; (function int pointer int none) -;; (define-extern sp-copy-from-spr function) ;; (function int pointer int none) -;; (define-extern memcpy function) ;; function -;; (define-extern sp-process-block function) ;; (function sparticle-system int sprite-array-2d int none) -;; (define-extern sp-process-particle-system function) ;; (function sparticle-system int sprite-array-2d none) -;; (define-extern *particles-flag* object) ;; symbol -;; (define-extern forall-particles-with-key-runner function) ;; (function sparticle-launch-control (function sparticle-system sparticle-cpuinfo none) sparticle-system none) -;; (define-extern forall-particles-with-key function) ;; (function sparticle-launch-control (function sparticle-system sparticle-cpuinfo none) symbol symbol none) -;; (define-extern sparticle-kill-it function) ;; (function sparticle-system sparticle-cpuinfo none) -;; (define-extern *sparticle-kill-it-level* object) -;; (define-extern sparticle-kill-it-level function) -;; (define-extern sparticle-60-to-50 function) ;; (function sparticle-system sparticle-cpuinfo pointer none) -;; (define-extern sparticle-50-to-60 function) ;; (function sparticle-system sparticle-cpuinfo pointer none) +(define-extern sp-get-block-size (function sparticle-system int int)) +(define-extern sp-get-approx-alloc-size (function sparticle-system int int)) +(define-extern sp-free-particle (function sparticle-system int sparticle-cpuinfo sprite-vec-data-2d none)) +(define-extern sp-get-particle (function sparticle-system int sparticle-launch-state sparticle-cpuinfo)) +(define-extern sp-kill-particle (function sparticle-system sparticle-cpuinfo symbol)) +(define-extern sp-orbiter (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern sp-process-block-2d (function sparticle-system int int int int symbol none)) +(define-extern sp-process-block-3d (function sparticle-system int int int int symbol none)) +(define-extern sp-copy-to-spr (function int pointer int none)) +(define-extern sp-copy-from-spr (function int pointer int none)) +(define-extern memcpy (function pointer pointer none)) +(define-extern sp-process-block (function sparticle-system int sprite-array-2d int none)) +(define-extern sp-process-particle-system (function sparticle-system int sprite-array-2d none)) +(define-extern *particles-flag* symbol) +(define-extern forall-particles-with-key-runner (function sparticle-launch-control (function sparticle-system sparticle-cpuinfo none) sparticle-system none)) +(define-extern forall-particles-with-key (function sparticle-launch-control (function sparticle-system sparticle-cpuinfo none) symbol symbol none)) +(define-extern sparticle-kill-it (function sparticle-system sparticle-cpuinfo none)) +(define-extern *sparticle-kill-it-level* int) +(define-extern sparticle-kill-it-level (function sparticle-system sparticle-cpuinfo pointer none)) +(define-extern sparticle-60-to-50 (function sparticle-system sparticle-cpuinfo pointer none)) +(define-extern sparticle-50-to-60 (function sparticle-system sparticle-cpuinfo pointer none)) (define-extern kill-all-particles-with-key (function sparticle-launch-control none)) -;; (define-extern forall-particles-runner function) ;; (function (function sparticle-system sparticle-cpuinfo pointer none) sparticle-system none) -;; (define-extern forall-particles function) ;; (function function symbol symbol none) -;; (define-extern kill-all-particles-in-level function) ;; (function level int) -;; (define-extern all-particles-50-to-60 function) ;; (function none) -;; (define-extern all-particles-60-to-50 function) ;; (function none) -;; (define-extern remap-particle function) ;; (function sparticle-system sparticle-cpuinfo pointer none) -;; (define-extern remap-all-particles function) ;; (function none) -;; (define-extern process-particles function) ;; (function none) +(define-extern forall-particles-runner (function (function sparticle-system sparticle-cpuinfo pointer none) sparticle-system none)) +(define-extern forall-particles (function function symbol symbol none)) +(define-extern kill-all-particles-in-level (function level int)) +(define-extern all-particles-50-to-60 (function none)) +(define-extern all-particles-60-to-50 (function none)) +(define-extern remap-particle (function sparticle-system sparticle-cpuinfo pointer none)) +(define-extern remap-all-particles (function none)) +(define-extern process-particles (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; entity-table ;; @@ -31240,7 +31596,7 @@ @returns [[none]]" (function mood-table none)) ;; (define-extern *overide-table* mood-table) ;; mood-table -(define-extern print-mood-tables "Generates the GOAL code for defining the current state of [[*overide-table*]]" (function none)) ;; ( +(define-extern print-mood-tables "Generates the GOAL code for defining the current state of [[*overide-table*]]" (function none)) (define-extern desaturate-mood-colors "Unused - Generate GOAL code for a new [[*overide-mood-color-table*]] definition that desaturates the color Apply said overrides to the [[*overide-table*]]" @@ -31266,15 +31622,15 @@ (define-extern palette-select-special (function mood-context-core3 symbol)) (define-extern clear-mood-times (function mood-context symbol)) ;; -;; (define-extern update-mood-itimes function) ;; (function mood-context none) -;; (define-extern update-mood-direction function) ;; (function mood-context-core3 mood-table float float) -;; (define-extern update-mood-exterior function) ;; (function mood-context-core3 mood-table float int object) -;; (define-extern copy-mood-exterior function) ;; (function mood-context symbol) -;; (define-extern copy-mood-exterior-ambi function) ;; (function mood-context symbol none) -;; (define-extern clear-mood-context function) ;; (function mood-context symbol) -;; (define-extern update-mood-interior function) ;; (function mood-context float) -;; (define-extern update-mood-interior-ambient function) -;; (define-extern update-mood-flames function) ;; (function mood-context int int int float float float float :behavior time-of-day-proc) +(define-extern update-mood-itimes (function mood-context none)) +(define-extern update-mood-direction (function mood-context-core3 mood-table float float)) +(define-extern update-mood-exterior (function mood-context-core3 mood-table float int object)) +(define-extern copy-mood-exterior (function mood-context symbol)) +(define-extern copy-mood-exterior-ambi (function mood-context symbol none)) +(define-extern clear-mood-context (function mood-context symbol)) +(define-extern update-mood-interior (function mood-context symbol float)) +(define-extern update-mood-interior-ambient (function mood-context symbol float vector)) +(define-extern update-mood-flames (function mood-context int int int float float float float :behavior time-of-day-proc)) (define-extern *flash0* (array float)) (define-extern *flash1* (array float)) (define-extern *flash2* (array float)) @@ -31283,22 +31639,21 @@ (define-extern *flash5* (array float)) (define-extern *flash6* (array float)) (define-extern *flash7* (array float)) -;; (define-extern update-mood-light function) ;; (function mood-context int int float float float float float float) -;; (define-extern update-mood-lava function) ;; (function mood-context int int float float float float float float) -;; (define-extern update-mood-flicker function) ;; (function mood-context int int none) -;; (define-extern update-mood-florescent function) ;; (function mood-context int int float) -;; (define-extern update-mood-electricity function) ;; (function mood-context int int float float none) -;; (define-extern update-mood-pulse function) ;; (function mood-context int int float float float float none) -;; (define-extern update-mood-strobe function) ;; (function mood-context int int int float float) -;; (define-extern update-mood-caustics function) ;; (function mood-context int float float float float float) -;; (define-extern overide-mood-fog function) -;; (define-extern overide-mood-color function) +(define-extern update-mood-light (function mood-context int int float float float float float float)) +(define-extern update-mood-lava (function mood-context int int float float float float float float)) +(define-extern update-mood-flicker (function mood-context int int none)) +(define-extern update-mood-florescent (function mood-context int int float)) +(define-extern update-mood-electricity (function mood-context int int float float none)) +(define-extern update-mood-pulse (function mood-context int int float float float float none)) +(define-extern update-mood-strobe (function mood-context int int int float float)) +(define-extern update-mood-caustics (function mood-context int float float float float float)) +(define-extern overide-mood-fog (function mood-context float int float none)) +(define-extern overide-mood-color (function mood-context float int float none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mood-funcs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype ctywide-states (structure) ((light light-state :inline :offset-assert 0) (flame flames-state :inline :offset-assert 8) @@ -31307,9 +31662,7 @@ :size-assert #xf :flag-assert #x90000000f ) -|# -#| (deftype ctysluma-states (structure) ((light light-state :inline :offset-assert 0) (flame flames-state :inline :offset-assert 8) @@ -31321,9 +31674,7 @@ :size-assert #x1c :flag-assert #x90000001c ) -|# -#| (deftype ctyslumb-states (structure) ((light light-state :inline :offset-assert 0) (spec-0 sp-field-init-spec :offset-assert 8) @@ -31334,9 +31685,7 @@ :size-assert #x14 :flag-assert #x900000014 ) -|# -#| (deftype ctyslumc-states (structure) ((light light-state :inline :offset-assert 0) (spec-0 sp-field-init-spec :offset-assert 8) @@ -31347,9 +31696,7 @@ :size-assert #x14 :flag-assert #x900000014 ) -|# -#| (deftype ctygenb-states (structure) ((light light-state :inline :offset-assert 0) (flame flames-state :inline :offset-assert 8) @@ -31364,9 +31711,7 @@ :size-assert #x28 :flag-assert #x900000028 ) -|# -#| (deftype mhcitya-states (structure) ((pulse pulse-state :inline :offset-assert 0) ) @@ -31374,9 +31719,7 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype mhcityb-states (structure) ((pulse pulse-state :inline :offset-assert 0) ) @@ -31384,9 +31727,7 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype ctyport-states (structure) ((light light-state :inline :offset-assert 0) (spec-0 sp-field-init-spec :offset-assert 8) @@ -31396,9 +31737,7 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype ctymarka-states (structure) ((light light-state :inline :offset-assert 0) (blink float :offset-assert 8) @@ -31407,9 +31746,7 @@ :size-assert #xc :flag-assert #x90000000c ) -|# -#| (deftype mountain-states (structure) ((light0 light-state :inline :offset-assert 0) (light1 light-state :inline :offset-assert 8) @@ -31425,9 +31762,7 @@ :size-assert #x2c :flag-assert #x90000002c ) -|# -#| (deftype ctyinda-states (structure) ((light light-state :inline :offset-assert 0) ) @@ -31435,9 +31770,7 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype ctyindb-states (structure) ((light light-state :inline :offset-assert 0) (flicker float :offset-assert 8) @@ -31446,9 +31779,7 @@ :size-assert #xc :flag-assert #x90000000c ) -|# -#| (deftype atoll-states (structure) ((light light-state :inline :offset-assert 0) (explosion float :offset-assert 8) @@ -31457,43 +31788,42 @@ :size-assert #xc :flag-assert #x90000000c ) -|# -;; (define-extern update-mood-default function) ;; (function mood-context float int none :behavior time-of-day-proc) -;; (define-extern update-mood-copy-parent function) -;; (define-extern get-sphere-interp function) ;; (function sphere vector float float float) -;; (define-extern update-mood-ctywide function) ;; (function mood-context float int none :behavior time-of-day-proc) -;; (define-extern update-mood-copy-ctywide function) ;; (function mood-context float int none :behavior time-of-day-proc) -;; (define-extern init-mood-ctysluma function) ;; (function mood-context float) -;; (define-extern update-mood-ctysluma function) ;; (function mood-context float int none :behavior time-of-day-proc) -;; (define-extern init-mood-ctyslumb function) ;; (function mood-context uint) -;; (define-extern update-mood-ctyslumb function) ;; (function mood-context float int none :behavior time-of-day-proc) -;; (define-extern init-mood-ctyslumc function) ;; (function mood-context none) -;; (define-extern update-mood-ctyslumc function) ;; (function mood-context float int none :behavior time-of-day-proc) -;; (define-extern init-mood-ctygenb function) -;; (define-extern update-mood-ctygenb function) -;; (define-extern *mhcity-mood-fog-table* object) -;; (define-extern overide-mhcity-fog function) -;; (define-extern init-mood-mhcitya function) -;; (define-extern update-mood-mhcitya function) -;; (define-extern init-mood-mhcityb function) -;; (define-extern update-mood-mhcityb function) -;; (define-extern calc-lmhcity-palettes function) -;; (define-extern update-mood-lmhcitya function) -;; (define-extern update-mood-lmhcityb function) -;; (define-extern *ctyport-level* object) -;; (define-extern update-mood-ctyport function) ;; (function mood-context float int none :behavior time-of-day-proc) -;; (define-extern reset-marquee-color! function) -;; (define-extern add-marquee-color! function) -;; (define-extern update-mood-ctymarka function) ;; (function mood-context float int none :behavior time-of-day-proc) -;; (define-extern init-mood-mountain function) ;; (function mood-context uint) -;; (define-extern update-mood-mountain function) ;; (function mood-context float int none :behavior time-of-day-proc) -;; (define-extern update-mood-ctyinda function) -;; (define-extern update-mood-ctyindb function) -;; (define-extern init-mood-atoll function) ;; (function mood-context float) -;; (define-extern update-mood-atoll function) ;; (function mood-context float int none :behavior time-of-day-proc) -;; (define-extern set-atoll-explosion! function) ;; (function float float) -;; (define-extern update-mood-atollext function) ;; (function mood-context float int none :behavior time-of-day-proc) +(define-extern update-mood-default (function mood-context float int none :behavior time-of-day-proc)) +(define-extern update-mood-copy-parent (function mood-context object int none)) +(define-extern get-sphere-interp (function sphere vector float float float)) +(define-extern update-mood-ctywide (function mood-context float int none :behavior time-of-day-proc)) +(define-extern update-mood-copy-ctywide (function mood-context float int none :behavior time-of-day-proc)) +(define-extern init-mood-ctysluma (function mood-context float)) +(define-extern update-mood-ctysluma (function mood-context float int none :behavior time-of-day-proc)) +(define-extern init-mood-ctyslumb (function mood-context uint)) +(define-extern update-mood-ctyslumb (function mood-context float int none :behavior time-of-day-proc)) +(define-extern init-mood-ctyslumc (function mood-context none)) +(define-extern update-mood-ctyslumc (function mood-context float int none :behavior time-of-day-proc)) +(define-extern init-mood-ctygenb (function mood-context object)) +(define-extern update-mood-ctygenb (function mood-context float int none :behavior time-of-day-proc)) +(define-extern *mhcity-mood-fog-table* mood-fog-table) +(define-extern overide-mhcity-fog function) +(define-extern init-mood-mhcitya (function mood-context object)) +(define-extern update-mood-mhcitya (function mood-context float int none :behavior time-of-day-proc)) +(define-extern init-mood-mhcityb (function mood-context object)) +(define-extern update-mood-mhcityb (function mood-context float int none :behavior time-of-day-proc)) +(define-extern calc-lmhcity-palettes function) +(define-extern update-mood-lmhcitya (function mood-context float int none :behavior time-of-day-proc)) +(define-extern update-mood-lmhcityb (function mood-context float int none :behavior time-of-day-proc)) +(define-extern *ctyport-level* level-group) +(define-extern update-mood-ctyport (function mood-context float int none :behavior time-of-day-proc)) +(define-extern reset-marquee-color! function) +(define-extern add-marquee-color! function) +(define-extern update-mood-ctymarka (function mood-context float int none :behavior time-of-day-proc)) +(define-extern init-mood-mountain (function mood-context uint)) +(define-extern update-mood-mountain (function mood-context float int none :behavior time-of-day-proc)) +(define-extern update-mood-ctyinda (function mood-context float int none :behavior time-of-day-proc)) +(define-extern update-mood-ctyindb (function mood-context float int none :behavior time-of-day-proc)) +(define-extern init-mood-atoll (function mood-context float)) +(define-extern update-mood-atoll (function mood-context float int none :behavior time-of-day-proc)) +(define-extern set-atoll-explosion! (function float float)) +(define-extern update-mood-atollext (function mood-context float int none :behavior time-of-day-proc)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mood-funcs2 ;; @@ -31633,51 +31963,51 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define-extern group-rain-screend-drop sparticle-launch-group) -;; (define-extern update-snow function) ;; (function float vector vector none) -;; (define-extern birth-func-omega-normal-orient function) ;; (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none) -;; (define-extern birth-func-rain function) ;; (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none) -;; (define-extern check-drop-level-rain function) ;; (function sparticle-system sparticle-cpuinfo vector none) -;; (define-extern check-drop-level-rain2 function) ;; (function sparticle-system sparticle-cpuinfo vector none) -;; (define-extern check-drop-level-splash function) ;; (function sparticle-system sparticle-cpuinfo vector none) -;; (define-extern update-rain function) ;; (function float vector vector none) +(define-extern update-snow (function float vector vector none)) +(define-extern birth-func-omega-normal-orient (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) +(define-extern birth-func-rain (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) +(define-extern check-drop-level-rain (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern check-drop-level-rain2 (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern check-drop-level-splash (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern update-rain (function float vector vector none)) (define-extern cam-master-effect (function none :behavior camera-master)) -;; (define-extern sparticle-track-sun function) ;; (function int sparticle-cpuinfo matrix none) +(define-extern sparticle-track-sun (function int sparticle-cpuinfo matrix none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; time-of-day ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern time-of-day-effect object) ;; (function none) -;; (define-extern time-of-day-update function) ;; (function none :behavior time-of-day-proc) -;; (define-extern update-counters function) ;; (function float :behavior time-of-day-proc) -;; (define-extern time-of-day-tick state) ;; (state time-of-day-proc) -;; (define-extern init-time-of-day function) ;; (function object :behavior time-of-day-proc) -;; (define-extern start-time-of-day function) ;; (function (pointer process)) -;; (define-extern time-of-day-setup function) ;; (function symbol symbol) -;; (define-extern time-of-day-interp-colors function) ;; (function (pointer rgba) uint mood-context none) -;; (define-extern time-of-day-interp-colors-scratch function) ;; (function (pointer rgba) time-of-day-palette mood-context none) -;; (define-extern init-time-of-day-context function) ;; (function time-of-day-context symbol) -;; (define-extern set-filter-color! function) ;; (function float float float none) -;; (define-extern tod-madd! function) ;; (function vector vector vector float) -;; (define-extern update-environment-colors function) ;; (function time-of-day-context vector) -;; (define-extern update-time-of-day function) ;; (function time-of-day-context none) -;; (define-extern calc-fade-from-fog function) ;; (function vector float) +(define-extern time-of-day-effect (function none)) +(define-extern time-of-day-update "Update particles, sky, and effect for time-of-day." (function none :behavior time-of-day-proc)) +(define-extern update-counters "Set hours, minutes, senonds based on current frame." (function float :behavior time-of-day-proc)) +(define-extern time-of-day-tick (state time-of-day-proc)) +(define-extern init-time-of-day "Initialize the time-of-day process" (function object :behavior time-of-day-proc)) +(define-extern start-time-of-day "Start a new time of day process, killing old one if needed." (function (pointer time-of-day-proc))) +(define-extern time-of-day-setup "Check if the time of day ratio is set up or not. If arg0 = #t, then set it if needed." (function symbol symbol)) +(define-extern time-of-day-interp-colors (function (pointer rgba) uint mood-context none)) +(define-extern time-of-day-interp-colors-scratch (function (pointer rgba) time-of-day-palette mood-context none)) +(define-extern init-time-of-day-context "Set up lighting data to defaults" (function time-of-day-context symbol)) +(define-extern set-filter-color! "Set RGB of filter." (function float float float none)) +(define-extern tod-madd! "Multiply-add" (function vector vector vector float)) +(define-extern update-environment-colors (function time-of-day-context vector)) +(define-extern update-time-of-day (function time-of-day-context none)) +(define-extern calc-fade-from-fog (function vector float)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sky-data ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define-extern *sky-work* sky-work) -;; (define-extern sky-base-polygons object) ;; (inline-array sky-vertex) -;; (define-extern sky-roof-polygons object) ;; (inline-array sky-vertex) -;; (define-extern *cloud-vert-array* object) ;; cloud-vert-array -;; (define-extern *cloud-poly* object) ;; (inline-array sky-vertex) -;; (define-extern init-cloud-vert-array function) ;; (function symbol) -;; (define-extern *haze-vert-array* object) ;; haze-vert-array -;; (define-extern *haze-poly* object) ;; (inline-array sky-vertex) -;; (define-extern init-haze-vert-array function) ;; (function symbol) -;; (define-extern sky-make-sun-data function) ;; (function sky-work int float none) -;; (define-extern sky-make-moon-data function) ;; (function sky-work float none) +(define-extern sky-base-polygons (inline-array sky-vertex)) +(define-extern sky-roof-polygons (inline-array sky-vertex)) +(define-extern *cloud-vert-array* cloud-vert-array) +(define-extern *cloud-poly* (inline-array sky-vertex)) +(define-extern init-cloud-vert-array (function symbol)) +(define-extern *haze-vert-array* haze-vert-array) +(define-extern *haze-poly* (inline-array sky-vertex)) +(define-extern init-haze-vert-array (function symbol)) +(define-extern sky-make-sun-data (function sky-work int float none)) +(define-extern sky-make-moon-data (function sky-work float none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sky-tng ;; @@ -31695,14 +32025,14 @@ ;; load-state ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern level-base-level-name function) -;; (define-extern *borrow-city-expansion-list* object) -;; (define-extern *borrow-city-status-list* object) -;; (define-extern borrow-city-expansion function) -;; (define-extern add-want-level function) -;; (define-extern *display-load-commands* object) ;; symbol -;; (define-extern *backup-load-state* object) ;; load-state -;; (define-extern *load-state* object) ;; load-state +(define-extern level-base-level-name (function symbol object)) +(define-extern *borrow-city-expansion-list* pair) +(define-extern *borrow-city-status-list* pair) +(define-extern borrow-city-expansion (function pair object)) +(define-extern add-want-level (function (inline-array level-buffer-state) (pointer int64) symbol symbol symbol symbol object)) +(define-extern *display-load-commands* symbol) +(define-extern *backup-load-state* load-state) +(define-extern *load-state* load-state) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; level-info ;; @@ -32010,21 +32340,30 @@ ;; level ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(define-extern level-memory-mode->string (function level-memory-mode string)) -(define-extern lookup-level-info (function symbol level-load-info)) -;; (define-extern remap-level-name function) ;; (function level-load-info symbol) -;; (define-extern add-bsp-drawable function) ;; (function bsp-header level symbol display-frame none) -;; (define-extern *login-state* object) ;; login-state +(define-extern *level-type-list* type) +(define-extern level-memory-mode->string "Convert level-memory-mode enum to string." (function level-memory-mode string)) +(define-extern lookup-level-info "Get the level load info. Symbol can be the level name, visname, nickname, or a symbol that contains a level-load-info value." (function symbol level-load-info)) +(define-extern remap-level-name "Get the load name, depending on if we should load a vis level or not." (function level-load-info symbol)) +(define-extern add-bsp-drawable "Callback function used by background-engine to draw a bsp. + Note that most drawing work has been moved into finish-background, + and the draw method called here just adds references to high-level rendering data + to lists. The exception is debug-draw, which does run here (only for draw-strip-lines)." (function bsp-header level symbol display-frame none)) +(define-extern *login-state* login-state) (define-extern *print-login* symbol) -;; (define-extern load-buffer-resize function) ;; (function level dgo-header none) -;; (define-extern level-find-borrow-slot function) -;; (define-extern level-update-after-load function) ;; (function level login-state level) -;; (define-extern bg function) ;; (function symbol none) -;; (define-extern play function) ;; (function symbol symbol int) -;; (define-extern play-boot function) ;; (function none) -;; (define-extern sound-bank-name->mode function) -;; (define-extern update-sound-banks function) ;; (function int) -;; (define-extern show-level function) ;; (function symbol int) +(define-extern load-buffer-resize "Resize and relocate the DGO load buffers, making sure there is enough room to both load objects and heap alloc in the linker." (function level dgo-header none)) +(define-extern level-find-borrow-slot "Set up a level to 'borrow' from another. + This function finds the right 'host' level, which should + have prepared a heap for this level. This level will then + be configured to use this heap." (function level level-memory-mode none)) +(define-extern level-update-after-load "Run the post-load state machine to login level data." (function level login-state level)) +(define-extern bg "Debug function to start playing a given level." (function symbol none)) +(define-extern play "Start (or restart) the game! + This will start up the display process, and load the initial level." (function symbol symbol int)) +(define-extern play-boot + "Function called by the C Kernel to start the game (wrapper around play)." (function none)) +(define-extern sound-bank-name->mode (function symbol sound-bank-mode)) +(define-extern update-sound-banks (function load-state (inline-array sound-bank-state) none)) +(define-extern show-level (function symbol none)) (define-extern *default-level* level) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -32033,39 +32372,38 @@ ;; game-text-info is already defined! -;; (define-extern *expand-buf-number* object) ;; int -;; (define-extern *game-text-word* object) ;; string -;; (define-extern *game-text-line* object) ;; string -;; (define-extern *expanded-text-line0* object) ;; string -;; (define-extern *expanded-text-line1* object) ;; string -;; (define-extern *level-text-file-load-flag* object) ;; symbol -;; (define-extern convert-korean-text function) ;; (function string string) -;; (define-extern text-is-loading object) ;; symbol -;; (define-extern load-game-text-info function) ;; (function string (pointer object) kheap int) -;; (define-extern load-level-text-files function) ;; (function int none) -;; (define-extern draw-debug-text-box function) ;; (function font-context none) -;; (define-extern print-game-text-scaled function) ;; (function string float font-context bucket-id none) +(define-extern *expand-buf-number* int) +(define-extern *game-text-word* string) +(define-extern *game-text-line* string) +(define-extern *expanded-text-line0* string) +(define-extern *expanded-text-line1* string) +(define-extern *level-text-file-load-flag* symbol) +(define-extern convert-korean-text (function string string)) +(define-extern text-is-loading symbol) +(define-extern load-game-text-info (function string (pointer object) kheap int)) +(define-extern load-level-text-files (function int none)) +(define-extern draw-debug-text-box (function font-context none)) +(define-extern print-game-text-scaled (function string float font-context bucket-id none)) (define-extern print-game-text (function string font-context symbol int bucket-id float)) -;; (define-extern disable-level-text-file-loading function) ;; (function none) -;; (define-extern enable-level-text-file-loading function) ;; (function none) +(define-extern disable-level-text-file-loading (function none)) +(define-extern enable-level-text-file-loading (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; collide-hash ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern add-collide-debug-box function) ;; (function vector rgba none) -;; (define-extern print-collide-cache-tri-count function) ;; (function none) -;; (define-extern print-exceeded-max-cache-tris function) ;; (function none) -;; (define-extern fill-bg-using-box-new function) ;; (function collide-cache object collide-query none) -;; (define-extern fill-bg-using-line-sphere-new function) ;; (function collide-cache object collide-query none) -;; (define-extern collide-list-fill-bg-using-box function) ;; (function collide-cache collide-list collide-query none) -;; (define-extern collide-list-fill-bg-using-line-sphere function) ;; (function collide-cache collide-list collide-query none) +(define-extern add-collide-debug-box (function vector rgba none)) +(define-extern print-collide-cache-tri-count (function none)) +(define-extern print-exceeded-max-cache-tris (function none)) +(define-extern fill-bg-using-box-new (function collide-cache object collide-query none)) +(define-extern fill-bg-using-line-sphere-new (function collide-cache object collide-query none)) +(define-extern collide-list-fill-bg-using-box (function collide-cache collide-list collide-query none)) +(define-extern collide-list-fill-bg-using-line-sphere (function collide-cache collide-list collide-query none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; collide-probe ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype collide-probe-stack-elem (structure) ((child uint32 :offset-assert 0) (count uint32 :offset-assert 4) @@ -32074,40 +32412,37 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype collide-probe-stack (structure) - ((data collide-probe-stack-elem 1024 :offset-assert 0) ;; guessed by decompiler + ((data collide-probe-stack-elem 1024 :inline :offset-assert 0) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x4000 :flag-assert #x900004000 ) -|# -;; (define-extern creates-new-method? function) ;; (function type int symbol) -;; (define-extern overrides-parent-method? function) ;; (function type int symbol) -;; (define-extern describe-methods function) ;; (function type symbol) -;; (define-extern indent-to function) ;; (function int none) -;; (define-extern probe-traverse-draw-node function) ;; (function draw-node int none) -;; (define-extern probe-traverse-inline-array-node function) ;; (function drawable-inline-array-node int none) -;; (define-extern probe-traverse-collide-fragment function) ;; (function drawable-tree-collide-fragment int none) -;; (define-extern *collide-probe-stack* object) ;; collide-probe-stack -;; (define-extern collide-vu0-block object) ;; vu-function -;; (define-extern collide-probe-node function) ;; (function (inline-array draw-node) int collide-list int) -;; (define-extern print-out function) ;; (function int object) -;; (define-extern collide-probe-instance-tie-collide-frags function) ;; (function none) -;; (define-extern collide-probe-instance-tie function) ;; (function object int collide-list int int) -;; (define-extern collide-probe-collide-fragment-tree-make-list function) ;; (function drawable-tree-collide-fragment collide-list none) -;; (define-extern collide-probe-instance-tie-tree-make-list function) ;; (function drawable-tree-instance-tie collide-list int) -;; (define-extern collide-upload-vu0 function) ;; (function none) -;; (define-extern collide-probe-make-list function) ;; (function level collide-list none) -;; (define-extern distc function) ;; (function vector vector float) -;; (define-extern interpolate function) ;; (function float float float float float float) -;; (define-extern misty-ambush-height function) ;; (function vector float) -;; (define-extern misty-ambush-height-probe function) ;; (function vector float float) -;; (define-extern pke-collide-test function) ;; (function none) +(define-extern creates-new-method? (function type int symbol)) +(define-extern overrides-parent-method? (function type int symbol)) +(define-extern describe-methods (function type symbol)) +(define-extern indent-to (function int none)) +(define-extern probe-traverse-draw-node (function draw-node int none)) +(define-extern probe-traverse-inline-array-node (function drawable-inline-array-node int none)) +(define-extern probe-traverse-collide-fragment (function drawable-tree-collide-fragment int none)) +(define-extern *collide-probe-stack* collide-probe-stack) +(define-extern collide-vu0-block vu-function) +(define-extern collide-probe-node (function (inline-array draw-node) int collide-list int)) +(define-extern print-out (function int object)) +(define-extern collide-probe-instance-tie-collide-frags (function none)) +(define-extern collide-probe-instance-tie (function object int collide-list int int)) +(define-extern collide-probe-collide-fragment-tree-make-list (function drawable-tree-collide-fragment collide-list none)) +(define-extern collide-probe-instance-tie-tree-make-list (function drawable-tree-instance-tie collide-list int)) +(define-extern collide-upload-vu0 (function none)) +(define-extern collide-probe-make-list (function level collide-list none)) +(define-extern distc (function vector vector float)) +(define-extern interpolate (function float float float float float float)) +(define-extern misty-ambush-height (function vector float)) +(define-extern misty-ambush-height-probe (function vector float float)) +(define-extern pke-collide-test (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; collide-frag ;; @@ -32118,7 +32453,6 @@ ;; collide-mesh ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype sopt-work (structure) ((intersect vector :inline :offset-assert 0) (sphere-bbox4w bounding-box4w :inline :offset-assert 16) @@ -32127,9 +32461,7 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype spat-work (structure) ((intersect vector :inline :offset-assert 0) (sphere-bbox4w bounding-box4w :inline :offset-assert 16) @@ -32138,9 +32470,7 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype oot-work (structure) ((intersect vector :inline :offset-assert 0) (sphere-bbox4w bounding-box4w :inline :offset-assert 16) @@ -32149,14 +32479,11 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; collide-touch ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype add-prims-touching-work (structure) ((tri1 collide-tri-result :offset-assert 0) (tri2 collide-tri-result :offset-assert 4) @@ -32165,7 +32492,6 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# (define-extern get-intersect-point (function vector touching-prims-entry collide-shape touching-shapes-entry vector)) @@ -32173,7 +32499,6 @@ ;; collide-edge-grab ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype pbhp-stack-vars (structure) ((edge collide-edge-edge :offset-assert 0) (allocated basic :offset-assert 4) @@ -32184,9 +32509,7 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype faei-stack-vars (structure) ((hold-edge-vec-norm vector :inline :offset-assert 0) (adj-edge-vec-norm vector :inline :offset-assert 16) @@ -32199,25 +32522,24 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# -;; (define-extern *no-walk-surface* surface) ;; surface +(define-extern *no-walk-surface* surface) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; collide-shape ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern find-ground-point function) ;; (function control-info vector float float vector) -;; (define-extern target-attack-up function) ;; (function target symbol symbol none) +(define-extern find-ground-point (function control-info vector float float vector)) +(define-extern target-attack-up (function target symbol symbol none)) (define-extern collide-shape-moving-angle-set! (function collide-shape-moving vector vector none)) (define-extern cshape-reaction-update-state (function control-info collide-query vector none)) (define-extern cshape-reaction-default (function control-info collide-query vector vector collide-status)) -;; (define-extern cshape-reaction-just-move function) ;; (function control-info collide-query vector collide-status) -;; (define-extern collide-shape-draw-debug-marks function) ;; (function none) -;; (define-extern *col-timer* object) ;; stopwatch -;; (define-extern *frame-timer* object) ;; stopwatch -;; (define-extern *col-timer-enable* object) ;; symbol -;; (define-extern debug-report-col-stats function) ;; (function int) +(define-extern cshape-reaction-just-move (function control-info collide-query vector collide-status)) +(define-extern collide-shape-draw-debug-marks (function none)) +(define-extern *col-timer* stopwatch) +(define-extern *frame-timer* stopwatch) +(define-extern *col-timer-enable* symbol) +(define-extern debug-report-col-stats (function int)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; collide-shape-rider ;; @@ -32228,7 +32550,7 @@ ;; collide ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *collide-vif0-init* array) ;; (array uint32) +(define-extern *collide-vif0-init* (array uint32)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; collide-planes ;; @@ -32243,10 +32565,9 @@ ;; spatial-hash ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype grid-hash-work (basic) - ((result-words uint8 32 :offset-assert 16) ;; guessed by decompiler - (result-bits uint8 32 :offset-assert 16) ;; guessed by decompiler + ((result-words uint8 32 :offset 16) ;; guessed by decompiler + (result-bits uint8 32 :offset 16) ;; guessed by decompiler (object-id int32 :offset-assert 48) (temp-box-min vector :inline :offset-assert 64) (temp-box-max vector :inline :offset-assert 80) @@ -32261,19 +32582,17 @@ :size-assert #x78 :flag-assert #x900000078 ) -|# -;; (define-extern *grid-hash-work* grid-hash-work) ;; grid-hash-work -;; (define-extern validate-bucket-bits function) ;; (function grid-hash (pointer grid-hash-word) symbol) -;; (define-extern draw-grid function) ;; (function vector vector (pointer int8) rgba none) -;; (define-extern draw-sphere-box function) ;; (function sphere rgba none) -;; (define-extern draw-line-sphere function) ;; (function vector vector float rgba none) +(define-extern *grid-hash-work* grid-hash-work) +(define-extern validate-bucket-bits (function grid-hash (pointer grid-hash-word) symbol)) +(define-extern draw-grid (function vector vector (pointer int8) rgba none)) +(define-extern draw-sphere-box (function sphere rgba none)) +(define-extern draw-line-sphere (function vector vector float rgba none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; actor-hash ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype actor-cshape-ptr (structure) ((cshape collide-shape :offset-assert 0) ;; guessed by decompiler ) @@ -32281,56 +32600,52 @@ :size-assert #x4 :flag-assert #x900000004 ) -|# -#| (deftype actor-hash-bucket (structure) ((length int16 :offset-assert 0) (max-length int16 :offset-assert 2) (data (inline-array actor-cshape-ptr) :offset-assert 4) ;; guessed by decompiler ) + :allow-misaligned :method-count-assert 10 :size-assert #x8 :flag-assert #xa00000008 (:methods - (actor-hash-bucket-method-9 () none) ;; 9 ;; (add-actor-cshape (_type_ collide-shape) none) + (add-actor-cshape (_type_ collide-shape) none) ;; 9 ) ) -|# -#| (deftype actor-hash-buckets (structure) ((hash spatial-hash :offset-assert 0) ;; guessed by decompiler (list engine :offset-assert 4) ;; guessed by decompiler - (data actor-hash-bucket 4 :offset-assert 8) ;; guessed by decompiler + (data actor-hash-bucket 4 :inline :offset-assert 8) ;; guessed by decompiler (tpos vector :inline :offset-assert 80) ) :method-count-assert 10 :size-assert #x60 :flag-assert #xa00000060 (:methods - (actor-hash-buckets-method-9 () none) ;; 9 ;; (hash-actors (_type_) none) + (hash-actors (_type_) none) ;; 9 ) ) -|# (define-extern *actor-hash* spatial-hash) -;; (define-extern *actor-hash-buckets* object) ;; actor-hash-buckets -;; (define-extern update-actor-hash function) ;; (function none) +(define-extern *actor-hash-buckets* actor-hash-buckets) +(define-extern update-actor-hash (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; merc-death ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *merc-death-globals* object) ;; vector -;; (define-extern birth-func-death-sparks function) ;; (function none) -;; (define-extern death-seed death-info) ;; death-info -;; (define-extern start-seed-effect function) ;; (function process-drawable vector cspace none) -;; (define-extern death-default death-info) ;; death-info -;; (define-extern death-warp-in death-info) ;; death-info -;; (define-extern death-warp-out death-info) ;; death-info -;; (define-extern sparticle-texture-glow-soft function) ;; (function sparticle-system sparticle-cpuinfo vector none) -;; (define-extern merc-death-spawn function) ;; (function int vector vector none) +(define-extern *merc-death-globals* vector) +(define-extern birth-func-death-sparks (function none)) +(define-extern death-seed death-info) +(define-extern start-seed-effect (function process-drawable vector cspace none)) +(define-extern death-default death-info) +(define-extern death-warp-in death-info) +(define-extern death-warp-out death-info) +(define-extern sparticle-texture-glow-soft (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern merc-death-spawn (function int vector vector none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; water-h ;; @@ -32384,15 +32699,15 @@ :flag-assert #x1200000150 (:methods (new (symbol type process int float float float) _type_) ;; 0 - (water-control-method-9 () none) ;; 9 ;; (water-control-method-9 (_type_) none) - (water-control-method-10 () none) ;; 10 ;; (water-control-method-10 (_type_) none) + (water-control-method-9 (_type_) none) ;; 9 + (water-control-method-10 (_type_) none) ;; 10 (start-bobbing! (_type_ float int int) none) ;; 11 (distance-from-surface (_type_) float) ;; 12 (spawn-ripples (_type_ float vector int vector symbol) none) ;; 13 (display-water-marks? (_type_) symbol) ;; 14 - (water-control-method-15 () none) ;; 15 ;; (enter-water (_type_) none) - (water-control-method-16 () none) ;; 16 ;; (water-control-method-16 (_type_) none) - (water-control-method-17 () none) ;; 17 + (enter-water (_type_) none) ;; 15 + (water-control-method-16 (_type_) none) ;; 16 + (water-control-method-17 (_type_) none) ;; 17 ) ) @@ -33039,7 +33354,7 @@ (define-extern slave-los-state->string (function slave-los-state string)) ;; (define-extern cam-line-dma function) ;; (function pointer) ;; (define-extern camera-line2d function) ;; (function vector4w vector4w pointer) -;; (define-extern camera-plot-float-func function) ;; (function float float float float (function float float) vector4w none) +(define-extern camera-plot-float-func (function float float float float (function float float) vector4w none)) (define-extern camera-line-setup (function vector4w none)) (define-extern camera-line-draw (function vector vector none)) (define-extern camera-line (function vector vector vector4w none)) @@ -33091,6 +33406,7 @@ (constraint-length-sqd float :offset-assert 8) (particle0 uint16 :offset-assert 12) (particle1 uint16 :offset-assert 14) + (vec vector :inline :offset 0 :score -1) ;; added ) :method-count-assert 9 :size-assert #x10 @@ -33433,7 +33749,7 @@ :size-assert #x10 :flag-assert #xc00000010 (:methods - (curve2d-piecewise-method-10 (_type_ int symbol uint) none) ;; 10 + (curve2d-piecewise-method-10 (_type_ int symbol int) none) ;; 10 (curve2d-piecewise-method-11 (_type_) none) ;; 11 ) ) @@ -33535,12 +33851,22 @@ ;; fma-sphere ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++fma-sphere:fma-sphere-mode +(defenum fma-sphere-mode + :type uint32 + :bitfield #t + (nav 0) + (kill-once 1) + (danger 2) + (deadly-overlap 3) + ) +;; ---fma-sphere:fma-sphere-mode + (deftype fma-sphere-params (structure) - ((mode uint32 :offset-assert 0) - (proc basic :offset-assert 4) + ((mode fma-sphere-mode :offset-assert 0) + (proc process-focusable :offset-assert 4) (track-joint int32 :offset-assert 8) - (duration uint64 :offset-assert 16) + (duration time-frame :offset-assert 16) (sphere sphere :offset-assert 24) (danger traffic-danger-info :offset-assert 28) (nav-mesh-id uint32 :offset-assert 32) @@ -33549,16 +33875,15 @@ :size-assert #x24 :flag-assert #x900000024 ) -|# -#| (deftype fma-sphere (process-drawable) - ((first-time? symbol :offset-assert 200) ;; guessed by decompiler + ((root collide-shape :override) + (first-time? symbol :offset-assert 200) ;; guessed by decompiler (mode fma-sphere-mode :offset-assert 204) ;; guessed by decompiler - (track-handle uint64 :offset-assert 208) ;; handle + (track-handle handle :offset-assert 208) ;; handle (track-joint int32 :offset-assert 216) (attack-id uint32 :offset-assert 220) - (duration uint64 :offset-assert 224) ;; time-frame + (duration time-frame :offset-assert 224) ;; time-frame (sphere sphere :inline :offset-assert 240) (danger traffic-danger-info :inline :offset-assert 256) ) @@ -33566,21 +33891,19 @@ :size-assert #x136 :flag-assert #x1500c00136 (:state-methods - idle ;; 20, old: (idle () _type_ :state) + idle ;; 20 ) ) -|# -;; (define-extern fma-sphere-init-by-other function) ;; (function fma-sphere-mode process-drawable int time-frame vector vector none :behavior fma-sphere) +(define-extern fma-sphere-init-by-other (function fma-sphere-params object :behavior fma-sphere)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; prim-beam-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype prim-beam-settings (structure) ((width float :offset-assert 0) - (color uint32 :offset-assert 4) + (color rgba :offset-assert 4) (alpha float :offset-assert 8) (tex-id uint32 :offset-assert 12) (num-tiles float :offset-assert 16) @@ -33589,9 +33912,7 @@ :size-assert #x14 :flag-assert #x900000014 ) -|# -#| (deftype prim-beam-params (structure) ((appearance prim-beam-settings :offset-assert 0) ) @@ -33599,23 +33920,20 @@ :size-assert #x4 :flag-assert #x900000004 ) -|# -#| (deftype prim-beam-tracker-params (prim-beam-params) - ((track-obj1 uint64 :offset-assert 8) - (track-obj2 uint64 :offset-assert 16) + ((track-obj1 handle :offset-assert 8) + (track-obj2 handle :offset-assert 16) (track-joint1 int32 :offset-assert 24) (track-joint2 int32 :offset-assert 28) (pos0 vector :offset-assert 32) (pos1 vector :offset-assert 36) - (duration uint64 :offset-assert 40) + (duration time-frame :offset-assert 40) ) :method-count-assert 9 :size-assert #x30 :flag-assert #x900000030 ) -|# ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -33624,17 +33942,17 @@ (define-extern command-get-int (function object int int)) (define-extern command-get-float (function object float float)) -;; (define-extern command-get-time function) ;; (function object int time-frame) +(define-extern command-get-time (function object int time-frame)) (define-extern command-get-param (function object object object)) -;; (define-extern command-get-quoted-param function) ;; (function object object object) +(define-extern command-get-quoted-param (function object object object)) (define-extern command-get-process (function object process process)) -;; (define-extern command-get-entity function) ;; (function object entity entity) -;; (define-extern command-get-trans function) ;; (function object vector vector) -;; (define-extern key-assoc function) ;; (function object pair vector4w pair) -;; (define-extern *script-form* object) ;; (inline-array script-form) -;; (define-extern level-from-heap function) ;; (function int level) -;; (define-extern *syntax-context* object) ;; script-context -;; (define-extern *script-context* object) ;; script-context +(define-extern command-get-entity (function object entity entity)) +(define-extern command-get-trans (function object vector vector)) +(define-extern key-assoc (function object pair vector4w pair)) +(define-extern *script-form* (inline-array script-form)) +(define-extern level-from-heap (function int level)) +(define-extern *syntax-context* script-context) +(define-extern *script-context* script-context) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; generic-obs ;; @@ -33817,7 +34135,7 @@ (define-extern touch-tracker-init (function vector float time-frame none :behavior touch-tracker)) (define-extern explosion-init-by-other (function explosion-init-params object :behavior explosion)) (define-extern explosion-spawn-legacy-version (function process-drawable type explosion-init-params (pointer process))) -(define-extern explosion-spawn (function process-drawable type explosion-init-params none)) +(define-extern explosion-spawn (function explosion-init-params process-drawable none)) (define-extern find-closest-solid-sphere-prim (function collide-shape vector collide-spec collide-shape-prim)) (define-extern *explosion-debug-sphere* sphere) (define-extern process-drawable-random-point! (function process-drawable vector vector)) @@ -33869,17 +34187,17 @@ (deftype light-trail-composition (structure) ((color-mode uint64 :offset-assert 0) - (color-curve curve-color-fast :offset-assert 8) + (color-curve curve-color-piecewise :offset-assert 8) (color-repeat-dist float :offset-assert 12) (alpha-1-mode uint64 :offset-assert 16) (alpha-2-mode uint64 :offset-assert 24) (base-alpha float :offset-assert 32) - (alpha-curve-1 curve-color-fast :offset-assert 36) - (alpha-curve-2 curve-color-fast :offset-assert 40) + (alpha-curve-1 curve2d-piecewise :offset-assert 36) + (alpha-curve-2 curve2d-piecewise :offset-assert 40) (alpha-repeat-dist float :offset-assert 44) (width-mode uint64 :offset-assert 48) (base-width float :offset-assert 56) - (width-curve curve-color-fast :offset-assert 60) + (width-curve curve2d-piecewise :offset-assert 60) (width-repeat-dist float :offset-assert 64) (uv-mode uint64 :offset-assert 72) (uv-repeat-dist float :offset-assert 80) @@ -33907,7 +34225,7 @@ ) (deftype breadcrumb-array (inline-array-class) - ((data light-trail-breadcrumb :dynamic :inline :offset-assert 16) + ((data light-trail-breadcrumb :dynamic :offset-assert 16) ) :method-count-assert 14 :size-assert #x10 @@ -33915,7 +34233,7 @@ ) (deftype light-trail (basic) - ((crumb-array breadcrumb-array :offset-assert 4) + ((crumb-array (array light-trail-breadcrumb) :offset-assert 4) (crumb-size uint8 :offset-assert 8) (crumb-count int16 :offset-assert 10) (max-crumb-count int16 :offset-assert 12) @@ -33934,17 +34252,17 @@ (:methods (light-trail-method-9 (_type_ light-trail-composition int) none) ;; 9 (light-trail-method-10 (_type_) none) ;; 10 - (light-trail-method-11 (_type_ vector int) none) ;; 11 + (light-trail-method-11 (_type_ vector time-frame) int) ;; 11 (light-trail-method-12 (_type_) none) ;; 12 (light-trail-method-13 (_type_) int) ;; 13 (light-trail-method-14 (_type_) none) ;; 14 (light-trail-method-15 (_type_) none) ;; 15 - (light-trail-method-16 (_type_) none) ;; 16 - (light-trail-method-17 (_type_ vector float float int float) none) ;; 17 - (light-trail-method-18 (_type_ vector vector vector vector) none) ;; 18 - (light-trail-method-19 (_type_) none) ;; 19 + (add-vert! (_type_ prim-strip vector float float float) none) ;; 16 + (light-trail-method-17 (_type_ vector float float vector float) symbol) ;; 17 + (light-trail-method-18 (_type_ light-trail-breadcrumb int vector vector) none) ;; 18 + (light-trail-method-19 (_type_ float int) none) ;; 19 (reset-crumbs! (_type_) none) ;; 20 - (light-trail-method-21 (_type_) none) ;; 21 + (light-trail-method-21 (_type_ vector) none) ;; 21 ) ) @@ -33962,8 +34280,8 @@ :size-assert #x80 :flag-assert #x1800000080 (:methods - (weapon-trail-method-22 (_type_) none) ;; 22 - (weapon-trail-method-23 (_type_) none) ;; 23 + (weapon-trail-method-22 (_type_ vector vector) light-trail-breadcrumb) ;; 22 + (weapon-trail-method-23 (_type_ vector vector) none) ;; 23 ) ) @@ -33981,8 +34299,8 @@ :size-assert #x80 :flag-assert #x1800000080 (:methods - (tread-trail-method-22 (_type_) none) ;; 22 - (tread-trail-method-23 (_type_) none) ;; 23 + (tread-trail-method-22 (_type_ vector vector) light-trail-breadcrumb) ;; 22 + (tread-trail-method-23 (_type_ vector vector) light-trail-breadcrumb) ;; 23 ) ) @@ -34024,8 +34342,8 @@ (:methods (light-trail-tracker-method-16 (_type_ process-focusable vector) vector) ;; 16 (light-trail-tracker-method-17 (_type_ process-focusable) symbol) ;; 17 - (light-trail-tracker-method-18 (_type_ process-focusable) none) ;; 18 - (light-trail-tracker-method-19 (_type_) none) ;; 19 + (light-trail-tracker-method-18 (_type_ process-focusable) symbol) ;; 18 + (light-trail-tracker-method-19 (_type_) symbol) ;; 19 (light-trail-tracker-method-20 (_type_ vector) none) ;; 20 ) ) @@ -34078,82 +34396,72 @@ ;; lightning-new-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype lightning-appearance (structure) ((base-alpha float :offset-assert 0) (width-range-start float :offset-assert 4) (width-range-end float :offset-assert 8) (tex-id uint32 :offset-assert 12) (blend-mode uint64 :offset-assert 16) - (fade-time uint64 :offset-assert 24) - (regenerate-time-start uint64 :offset-assert 32) - (regenerate-time-end uint64 :offset-assert 40) - (alpha-1-curve basic :offset-assert 48) + (fade-time time-frame :offset-assert 24) + (regenerate-time-start time-frame :offset-assert 32) + (regenerate-time-end time-frame :offset-assert 40) + (alpha-1-curve curve2d-fast :offset-assert 48) (alpha-1-mode uint64 :offset-assert 56) (alpha-1-repeat-dist float :offset-assert 64) - (alpha-2-curve basic :offset-assert 68) + (alpha-2-curve curve2d-fast :offset-assert 68) (alpha-2-mode uint64 :offset-assert 72) (alpha-2-repeat-dist float :offset-assert 80) - (width-curve basic :offset-assert 84) + (width-curve curve2d-fast :offset-assert 84) (width-mode uint64 :offset-assert 88) (width-repeat-dist float :offset-assert 96) (uv-repeat-dist float :offset-assert 100) - (uv-shift? basic :offset-assert 104) - (uv-shift-speed uint64 :offset-assert 112) - (fade-time uint64 :offset-assert 24) - (use-sprite-bucket? basic :offset-assert 128) - (use-accurate-interp? basic :offset-assert 132) + (uv-shift? symbol :offset-assert 104) + (uv-shift-speed time-frame :offset-assert 112) + (use-sprite-bucket? symbol :offset 128) + (use-accurate-interp? symbol :offset-assert 132) ) :method-count-assert 9 :size-assert #x88 :flag-assert #x900000088 ) -|# -#| (deftype lightning-span-internal (structure) ((index int16 :offset-assert 0) (span-flags uint8 :offset-assert 2) (num-inner-points int8 :offset-assert 3) ) + :pack-me :method-count-assert 9 :size-assert #x4 :flag-assert #x900000004 ) -|# -#| (deftype lightning-span (structure) ((random-offset-size-start float :offset-assert 0) (inner-random-offset-size float :offset-assert 4) ) + :pack-me :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype lightning-spans-array (inline-array-class) - ((data UNKNOWN :dynamic :offset-assert 16) + ((data lightning-span :dynamic :inline :offset-assert 16) ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype lightning-spans-internal-array (inline-array-class) - ((data UNKNOWN :dynamic :offset-assert 16) + ((data lightning-span-internal :dynamic :inline :offset-assert 16) ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype tex-u-holder (structure) ((uu float :offset-assert 0) (last-dist float :offset-assert 4) @@ -34162,21 +34470,19 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype lightning-bolt (basic) - ((current-points basic :offset-assert 4) - (desired-points basic :offset-assert 8) - (span-pts-start basic :offset-assert 12) - (spans basic :offset-assert 16) - (spans-internal basic :offset-assert 20) - (strip1 basic :offset-assert 24) - (strip2 basic :offset-assert 28) - (inner-point-travel-time uint64 :offset-assert 32) - (start-fade-time uint64 :offset-assert 40) - (new-inner-point-generate-time uint64 :offset-assert 48) - (last-generate-time uint64 :offset-assert 56) + ((current-points vector-array :offset-assert 4) + (desired-points vector-array :offset-assert 8) + (span-pts-start vector-array :offset-assert 12) + (spans lightning-spans-array :offset-assert 16) + (spans-internal lightning-spans-internal-array :offset-assert 20) + (strip1 prim-strip :offset-assert 24) + (strip2 prim-strip :offset-assert 28) + (inner-point-travel-time time-frame :offset-assert 32) + (start-fade-time time-frame :offset-assert 40) + (new-inner-point-generate-time time-frame :offset-assert 48) + (last-generate-time time-frame :offset-assert 56) (base-width float :offset-assert 64) (current-uv-shift float :offset-assert 68) (current-fade-scalar float :offset-assert 72) @@ -34184,56 +34490,52 @@ (appearance lightning-appearance :offset-assert 80) (fade-mode uint64 :offset-assert 88) (generate-mode uint64 :offset-assert 96) - (snap-inner-points? basic :offset-assert 104) - (span-data UNKNOWN 2 :offset-assert 108) - (num-active-spans int8 :offset-assert 108) - (num-spans int8 :offset-assert 109) - (base-color uint32 :offset-assert 112) + (snap-inner-points? symbol :offset-assert 104) + (span-data int8 2 :offset-assert 108) + (num-active-spans int8 :offset 108) + (num-spans int8 :offset 109) + (base-color rgba :offset-assert 112) ) :method-count-assert 23 :size-assert #x74 :flag-assert #x1700000074 (:methods - (lightning-bolt-method-9 () none) ;; 9 - (lightning-bolt-method-10 () none) ;; 10 - (lightning-bolt-method-11 () none) ;; 11 - (lightning-bolt-method-12 () none) ;; 12 - (lightning-bolt-method-13 () none) ;; 13 - (lightning-bolt-method-14 () none) ;; 14 - (lightning-bolt-method-15 () none) ;; 15 - (lightning-bolt-method-16 () none) ;; 16 - (lightning-bolt-method-17 () none) ;; 17 - (lightning-bolt-method-18 () none) ;; 18 - (lightning-bolt-method-19 () none) ;; 19 - (lightning-bolt-method-20 () none) ;; 20 - (lightning-bolt-method-21 () none) ;; 21 - (lightning-bolt-method-22 () none) ;; 22 + (init! (_type_ int int lightning-appearance) none) ;; 9 + (reset-spans! (_type_) none) ;; 10 + (lightning-bolt-method-11 (_type_) none) ;; 11 + (lightning-bolt-method-12 (_type_) none) ;; 12 + (lightning-bolt-method-13 (_type_ int) none) ;; 13 + (lightning-bolt-method-14 (_type_) int) ;; 14 + (lightning-bolt-method-15 (_type_ object int lightning-span-internal) none) ;; 15 + (lightning-bolt-method-16 (_type_ vector float float vector matrix) none) ;; 16 + (lightning-bolt-method-17 (_type_ uint float float curve2d-fast float) float) ;; 17 + (lightning-bolt-method-18 (_type_ prim-strip vector rgba float float) none) ;; 18 + (lightning-bolt-method-19 (_type_ vector int int matrix float float) none) ;; 19 + (lightning-bolt-method-20 (_type_ int lightning-span-internal) vector) ;; 20 + (lightning-bolt-method-21 (_type_ int int float) none) ;; 21 + (lightning-bolt-method-22 (_type_) none) ;; 22 ) ) -|# -#| (deftype lightning-new-tracker (process) - ((bolt basic :offset-assert 128) - (lifetime uint64 :offset-assert 136) - (state-time uint64 :offset-assert 144) + ((bolt lightning-bolt :offset-assert 128) + (lifetime time-frame :offset-assert 136) + (state-time time-frame :offset-assert 144) ) :method-count-assert 16 :size-assert #x98 :flag-assert #x1000200098 - (:methods - (lightning-new-tracker-method-14 () none) ;; 14 - (lightning-new-tracker-method-15 () none) ;; 15 + (:state-methods + active ;; 14 + die ;; 15 ) ) -|# -#| (deftype lightning-tracker-init-params (structure) ((appearance lightning-appearance :offset-assert 0) (start-pt vector :inline :offset-assert 16) (end-pt vector :inline :offset-assert 32) - (lifetime uint64 :offset-assert 48) + (lifetime time-frame :offset-assert 48) (num-inner-points int8 :offset-assert 56) (inner-random-offset-size float :offset-assert 60) (random-offset-size-start float :offset-assert 64) @@ -34242,14 +34544,20 @@ :size-assert #x44 :flag-assert #x900000044 ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; particle-curves ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++particle-curves:particle-curve-flags +(defenum particle-curve-flags + :type uint64 + :bitfield #t + (pcf0 0) + (pcf1 1) + ) +;; ---particle-curves:particle-curve-flags + (deftype particle-curve-settings (structure) ((color-start basic :offset-assert 0) (alpha-start basic :offset-assert 4) @@ -34261,25 +34569,24 @@ (a-scalar basic :offset-assert 28) (scale-x-scalar basic :offset-assert 32) (scale-y-scalar basic :offset-assert 36) - (lifetime-base uint64 :offset-assert 40) - (lifetime-offset uint64 :offset-assert 48) - (flags uint64 :offset-assert 56) + (lifetime-base time-frame :offset-assert 40) + (lifetime-offset time-frame :offset-assert 48) + (flags particle-curve-flags :offset-assert 56) ) :method-count-assert 9 :size-assert #x40 :flag-assert #x900000040 ) -|# -;; (define-extern birth-func-curve function) -;; (define-extern live-func-curve function) -;; (define-extern *alpha-fast* curve2d-fast) -;; (define-extern *unity-fast* curve2d-fast) -;; (define-extern *ccro* curve-color-fast) -;; (define-extern *scale-curve* curve2d-fast) -;; (define-extern *scale-range* curve2d-fast) -;; (define-extern *part-function-curve-test-curve-settings* object) -;; (define-extern ptest function) +(define-extern birth-func-curve (function int sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern live-func-curve (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern *alpha-fast* curve2d-fast) +(define-extern *unity-fast* curve2d-fast) +(define-extern *ccro* curve-color-fast) +(define-extern *scale-curve* curve2d-fast) +(define-extern *scale-range* curve2d-fast) +(define-extern *part-function-curve-test-curve-settings* particle-curve-settings) +(define-extern ptest (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; light-trails ;; @@ -34289,19 +34596,19 @@ (define-extern *dist-cache-array* (pointer float)) (define-extern *total-length* float) (define-extern light-trail-tracker-common-post (function object :behavior light-trail-tracker)) -(define-extern estimate-light-trail-mem-usage (function light-trail none)) +(define-extern estimate-light-trail-mem-usage (function uint uint int)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; lightning-new ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *lightning-alpha-additive* object) -;; (define-extern *lightning-alpha-blend* object) -;; (define-extern *lightning-alpha-subtractive* object) -;; (define-extern matrix<-vector-yz2! function) -;; (define-extern choose-nice-perp function) -;; (define-extern lightning-new-tracker-init-by-other function) -;; (define-extern create-lightning-tracker-new function) +(define-extern *lightning-alpha-additive* gs-alpha) +(define-extern *lightning-alpha-blend* gs-alpha) +(define-extern *lightning-alpha-subtractive* gs-alpha) +(define-extern matrix<-vector-yz2! (function matrix vector vector matrix)) +(define-extern choose-nice-perp (function vector vector)) +(define-extern lightning-new-tracker-init-by-other (function lightning-tracker-init-params object :behavior lightning-new-tracker)) +(define-extern create-lightning-tracker-new (function lightning-tracker-init-params lightning-new-tracker)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; carry-h ;; @@ -34438,7 +34745,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) @@ -34506,7 +34814,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) @@ -34659,7 +34968,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 @@ -34934,14 +35244,14 @@ (clock-on symbol :offset-assert 80) ;; guessed by decompiler (hud handle 1 :offset-assert 88) ;; guessed by decompiler (tone sound-id :offset-assert 96) ;; guessed by decompiler - (bomb uint32 :offset-assert 100) + (bomb (pointer process) :offset-assert 100) (mode-sound-bank connection :offset-assert 104) ) :method-count-assert 10 :size-assert #x6c :flag-assert #xa0000006c (:methods - (darkjak-info-method-9 () none) ;; 9 ;; (update-clock! (_type_ int) none) + (update-clock! (_type_ int) none) ;; 9 ) ) @@ -34993,33 +35303,40 @@ (defenum flut-flag :type uint64 :bitfield #t + (ff0 0) + (ff1 1) + (ff2 2) + (ff3 3) ) ;; ---flut-h:flut-flag (deftype flut (process-focusable) - ((extra-trans vector :inline :offset-assert 208) + ((root collide-shape-moving :override) + (extra-trans vector :inline :offset-assert 208) (condition int32 :offset-assert 224) (shadow-backup shadow-geo :offset-assert 228) (rider handle :offset-assert 232) (nav-sphere-handle handle :offset-assert 240) (probe-time time-frame :offset-assert 248) - (count-lock basic :offset-assert 256) + (count-lock symbol :offset-assert 256) (flags flut-flag :offset-assert 264) - (mode basic :offset-assert 272) + (mode symbol :offset-assert 272) (color-index int32 :offset-assert 276) (minimap connection-minimap :offset-assert 280) ) :method-count-assert 35 :size-assert #x11c :flag-assert #x2300a0011c + (:state-methods + wait-for-start ;; 28 + idle ;; 29 + (pickup (state flut)) ;; 30 + wait-for-return ;; 31 + die ;; 32 + ) (:methods - (flut-method-28 () none) ;; 28 - (flut-method-29 () none) ;; 29 - (flut-method-30 () none) ;; 30 - (flut-method-31 () none) ;; 31 - (flut-method-32 () none) ;; 32 - (flut-method-33 () none) ;; 33 - (flut-method-34 () none) ;; 34 + (flut-method-33 (_type_) symbol) ;; 33 + (spawn-part-and-sound! (_type_) none) ;; 34 ) ) @@ -35159,7 +35476,7 @@ (define-extern move-legs? (function symbol :behavior target)) (define-extern jump-hit-ground-stuck? (function symbol :behavior target)) (define-extern target-time-to-ground (function time-frame :behavior target)) -(define-extern fall-test (function (state symbol target) float none :behavior target)) +(define-extern fall-test (function (state object target) float none :behavior target)) (define-extern slide-down-test (function none :behavior target)) (define-extern smack-surface? (function symbol symbol :behavior target)) (define-extern can-roll? (function symbol :behavior target)) @@ -35188,78 +35505,78 @@ ;; target-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern spt-birth-func-brightness-part-droppings-for function) -;; (define-extern birth-func-copy-target-y-rot function) ;; (function int sparticle-cpuinfo sparticle-launchinfo none) -;; (define-extern birth-func-ground-orient function) ;; (function int sparticle-cpuinfo sparticle-launchinfo none) -;; (define-extern birth-func-target-orient function) ;; (function int sparticle-cpuinfo sparticle-launchinfo none) -;; (define-extern birth-func-vector-orient function) ;; (function int sparticle-cpuinfo sparticle-launchinfo none) -;; (define-extern birth-func-set-alpha-from-userdata function) ;; (function int sparticle-cpuinfo sparticle-launchinfo float) -;; (define-extern part-tracker-track-target-joint function) ;; (function int sparticle-cpuinfo sparticle-launchinfo none) -;; (define-extern spt-birth-func-part-land-droppings-for function) -;; (define-extern spt-birth-func-part-droppings-for function) -;; (define-extern spt-birth-func-part-slide-droppings-for function) -;; (define-extern spt-birth-func-part-jump-droppings-for function) +(define-extern spt-birth-func-brightness-part-droppings-for (function sparticle-system sparticle-cpuinfo sprite-vec-data-2d object object none)) +(define-extern birth-func-copy-target-y-rot (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern birth-func-ground-orient (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern birth-func-target-orient (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern birth-func-vector-orient (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern birth-func-set-alpha-from-userdata (function sparticle-system sparticle-cpuinfo sparticle-launchinfo float)) +(define-extern part-tracker-track-target-joint (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern spt-birth-func-part-land-droppings-for (function sparticle-system sparticle-cpuinfo sprite-vec-data-2d object object none)) +(define-extern spt-birth-func-part-droppings-for (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-slide-droppings-for (function int sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-jump-droppings-for (function int sparticle-cpuinfo sparticle-launchinfo object object none)) (define-extern process-drawable-burn-effect (function time-frame rgbaf :behavior target)) (define-extern lightning-probe-callback (function lightning-tracker none)) -;; (define-extern process-drawable-shock-effect-replace function) +(define-extern process-drawable-shock-effect-replace (function process-drawable lightning-spec (function lightning-tracker none) int int float none)) (define-extern process-drawable-shock-effect (function process-drawable lightning-spec (function lightning-tracker none) sparticle-launcher int int float object)) -;; (define-extern process-drawable-shock-wall-effect function) ;; (function process-drawable lightning-spec (function lightning-tracker none) sparticle-launcher symbol) +(define-extern process-drawable-shock-wall-effect (function process-drawable lightning-spec (function lightning-tracker none) sparticle-launcher symbol)) (define-extern process-drawable2-shock-effect (function process-drawable process-drawable lightning-spec (function lightning-tracker none) sparticle-launcher none)) -;; (define-extern process-drawable-shock-skel-effect function) ;; (function process-drawable lightning-spec (function lightning-tracker none) sparticle-launcher float int int none) +(define-extern process-drawable-shock-skel-effect (function process-drawable lightning-spec (function lightning-tracker none) sparticle-launcher float int int none)) (define-extern *lightning-darkjak-pill* lightning-spec) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; gun-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern sparticle-track-gun-joint function) -;; (define-extern *red-shot-colors* object) ;; (pointer rgba) -;; (define-extern *range-explo-dust-color* curve-color-fast) -;; (define-extern *range-explo-dust-alpha* curve2d-fast) -;; (define-extern *range-explo-dust-scale-x* curve2d-fast) -;; (define-extern *range-explo-dust-scale-y* curve2d-fast) -;; (define-extern *curve-explo-dust-alpha* curve2d-fast) -;; (define-extern *curve-explo-dust-scale-x* curve2d-fast) -;; (define-extern *curve-explo-dust-scale-y* curve2d-fast) -;; (define-extern *part-gun-red3-explosion-dust-in-curve-settings* object) -;; (define-extern *range-explo-color* curve-color-fast) -;; (define-extern *range-explo-alpha* curve2d-fast) -;; (define-extern *range-explo-scale-x* curve2d-fast) -;; (define-extern *range-explo-scale-y* curve2d-fast) -;; (define-extern *curve-explo-alpha* curve2d-fast) -;; (define-extern *curve-explo-scale-x* curve2d-fast) -;; (define-extern *curve-explo-scale-y* curve2d-fast) -;; (define-extern *part-gun-red3-explosion-texture-curve-settings* object) -;; (define-extern *curve-linear-up-red* object) -;; (define-extern *red-shot-3-trail* object) -;; (define-extern *curve-yellow2-shot-alpha* object) -;; (define-extern *curve-yellow2-shot-color* curve-color-fast) -;; (define-extern *curve-linear-down-long* curve2d-fast) -;; (define-extern *yellow-shot-2-trail* object) -;; (define-extern check-shell-level1 function) ;; (function sparticle-system sparticle-cpuinfo vector none) -;; (define-extern check-shell-level2 function) ;; (function sparticle-system sparticle-cpuinfo vector none) -;; (define-extern sparticle-dark-shot-lightning function) ;; (function sparticle-system sparticle-cpuinfo vector none) -;; (define-extern sparticle-track-gun-joint-3d function) -;; (define-extern sparticle-track-gun-joint-player-y function) -;; (define-extern *last-player-pos* object) -;; (define-extern birth-func-converge function) -;; (define-extern sparticle-red-2-converge function) -;; (define-extern sparticle-red-2-glow-trail-halt function) -;; (define-extern *gun-dark-3-nuke-fade-time* object) -;; (define-extern *gun-dark-3-nuke-fade-curve* object) -;; (define-extern *gun-dark-3-nuke-blur-segs* object) -;; (define-extern *gun-dark-3-nuke-blur-time* object) -;; (define-extern *gun-dark-3-nuke-blur-curve* object) -;; (define-extern *gun-dark-3-mushroom-speed* object) -;; (define-extern *gun-dark-3-mushroom-size-time* object) -;; (define-extern *gun-dark-3-nuke-mushroom-size-curve-x* object) -;; (define-extern *gun-dark-3-nuke-mushroom-size-curve-y* object) -;; (define-extern *gun-dark-3-nuke-fade-time-small* object) -;; (define-extern *gun-dark-3-nuke-fade-curve-small* object) -;; (define-extern *gun-dark-3-nuke-blur-segs-small* object) -;; (define-extern *gun-dark-3-nuke-blur-time-small* object) -;; (define-extern *gun-dark-3-nuke-blur-curve-small* object) -;; (define-extern spt-func-part-gun-dark-1-upgrade-shot-edges function) +(define-extern sparticle-track-gun-joint (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern *red-shot-colors* (pointer rgba)) +(define-extern *range-explo-dust-color* curve-color-fast) +(define-extern *range-explo-dust-alpha* curve2d-fast) +(define-extern *range-explo-dust-scale-x* curve2d-fast) +(define-extern *range-explo-dust-scale-y* curve2d-fast) +(define-extern *curve-explo-dust-alpha* curve2d-fast) +(define-extern *curve-explo-dust-scale-x* curve2d-fast) +(define-extern *curve-explo-dust-scale-y* curve2d-fast) +(define-extern *part-gun-red3-explosion-dust-in-curve-settings* particle-curve-settings) +(define-extern *range-explo-color* curve-color-fast) +(define-extern *range-explo-alpha* curve2d-fast) +(define-extern *range-explo-scale-x* curve2d-fast) +(define-extern *range-explo-scale-y* curve2d-fast) +(define-extern *curve-explo-alpha* curve2d-fast) +(define-extern *curve-explo-scale-x* curve2d-fast) +(define-extern *curve-explo-scale-y* curve2d-fast) +(define-extern *part-gun-red3-explosion-texture-curve-settings* particle-curve-settings) +(define-extern *curve-linear-up-red* curve2d-piecewise) +(define-extern *red-shot-3-trail* light-trail-composition) +(define-extern *curve-yellow2-shot-alpha* curve2d-piecewise) +(define-extern *curve-yellow2-shot-color* curve-color-fast) +(define-extern *curve-linear-down-long* curve2d-fast) +(define-extern *yellow-shot-2-trail* light-trail-composition) +(define-extern check-shell-level1 (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern check-shell-level2 (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern sparticle-dark-shot-lightning (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern sparticle-track-gun-joint-3d (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern sparticle-track-gun-joint-player-y (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern *last-player-pos* vector) +(define-extern birth-func-converge (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern sparticle-red-2-converge (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern sparticle-red-2-glow-trail-halt (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern *gun-dark-3-nuke-fade-time* time-frame) +(define-extern *gun-dark-3-nuke-fade-curve* curve-color-piecewise) +(define-extern *gun-dark-3-nuke-blur-segs* uint) +(define-extern *gun-dark-3-nuke-blur-time* time-frame) +(define-extern *gun-dark-3-nuke-blur-curve* curve2d-piecewise) +(define-extern *gun-dark-3-mushroom-speed* float) +(define-extern *gun-dark-3-mushroom-size-time* time-frame) +(define-extern *gun-dark-3-nuke-mushroom-size-curve-x* curve2d-piecewise) +(define-extern *gun-dark-3-nuke-mushroom-size-curve-y* curve2d-piecewise) +(define-extern *gun-dark-3-nuke-fade-time-small* time-frame) +(define-extern *gun-dark-3-nuke-fade-curve-small* curve-color-piecewise) +(define-extern *gun-dark-3-nuke-blur-segs-small* uint) +(define-extern *gun-dark-3-nuke-blur-time-small* time-frame) +(define-extern *gun-dark-3-nuke-blur-curve-small* curve2d-piecewise) +(define-extern spt-func-part-gun-dark-1-upgrade-shot-edges (function sparticle-system sparticle-cpuinfo vector none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; collide-reaction-target ;; @@ -35420,17 +35737,18 @@ ;; collectables-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern eco-fadeout function) ;; (function sparticle-system sparticle-cpuinfo none) -;; (define-extern eco-track-root-prim-fadeout function) ;; (function sparticle-system sparticle-cpuinfo vector none) -;; (define-extern sparticle-3d-rotate-xz-to-camera-eco-shaft function) -;; (define-extern spt-func-part-vent-eco-dark-shaft function) -;; (define-extern spt-func-part-vent-eco-dark-touched-specs function) +(define-extern eco-fadeout (function sparticle-system sparticle-cpuinfo none)) +(define-extern eco-track-root-prim-fadeout (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern sparticle-3d-rotate-xz-to-camera-eco-shaft (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d none)) +(define-extern spt-func-part-vent-eco-dark-shaft (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern spt-func-part-vent-eco-dark-touched-specs (function sparticle-system sparticle-cpuinfo vector none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; debug-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern sparticle-track-root-money function) ;; (function sparticle-system sparticle-cpuinfo vector none) +(define-extern hud-money type) +(define-extern sparticle-track-root-money (function sparticle-system sparticle-cpuinfo vector none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; find-nearest ;; @@ -35527,9 +35845,9 @@ ;; ragdoll ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(define-extern ragdoll-matrix-interp function) -(define-extern ragdoll-joint-callback function) -(define-extern ragdoll-other-joint-callback function) +(define-extern ragdoll-matrix-interp (function matrix matrix matrix float matrix)) +(define-extern ragdoll-joint-callback (function cspace transformq process-drawable ragdoll-proc none)) +(define-extern ragdoll-other-joint-callback (function cspace transformq none :behavior ragdoll-proc)) (define-extern ragdoll-reflect-matrix (function matrix vector vector vector)) (define-extern ragdoll-proc-init-by-other (function ragdoll-setup object :behavior ragdoll-proc)) @@ -35638,9 +35956,9 @@ ((impact? symbol :offset-assert 512) (fire-point vector :inline :offset-assert 528) (explode-sound uint32 :offset-assert 544) - (bolts basic :offset-assert 548) + (bolts (array lightning-bolt) :offset-assert 548) (ball-pos vector 2 :inline :offset-assert 560) - (trail light-trail :offset-assert 592) + (trail sparticle-launch-control :offset-assert 592) (ball1 sparticle-launch-control :offset-assert 596) (last-ground-height float :offset-assert 600) (fire-sound sound-id :offset-assert 604) @@ -35652,22 +35970,22 @@ impact ;; 22 ) (:methods - (darkjak-ball-method-41 () none) ;; 41 + (setup-bolts! (_type_ vector vector) none) ;; 41 ) ) -(define-extern darkjak-ball-slide-reaction (function none :behavior darkjak-ball)) -(define-extern darkjak-ball-move (function none :behavior darkjak-ball)) -(define-extern *darkjak-ball-lightning* lightning-spec) +(define-extern darkjak-ball-slide-reaction (function control-info collide-query vector vector collide-status)) +(define-extern darkjak-ball-move (function darkjak-ball none)) +(define-extern *darkjak-ball-lightning* lightning-appearance) (define-extern *darkjak-ball-lightning-colors* (array rgba)) -(define-extern sparticle-track-hadouken (function none)) +(define-extern sparticle-track-hadouken (function object sparticle-cpuinfo vector none)) (define-extern target-darkjak-setup (function symbol none :behavior target)) (define-extern want-to-darkjak? (function symbol :behavior target)) (define-extern *darkjak-trans-mods* surface) (define-extern target-darkjak-end-mode (function symbol none :behavior target)) (define-extern target-darkjak-process (function none :behavior target)) -(define-extern target-darkjak-bomb-collide (function float float none :behavior target)) -(define-extern target-bomb1-fire-shot (function (pointer handle) int int int none :behavior target)) +(define-extern target-darkjak-bomb-collide (function (pointer float) float none :behavior target)) +(define-extern target-bomb1-fire-shot (function (array handle) int int object :behavior target)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; target-lightjak ;; @@ -35710,7 +36028,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 @@ -35900,7 +36219,7 @@ (define-extern gun-init (function none :behavior gun)) (define-extern do-fire-backcheck (function vector vector symbol)) (define-extern get-remaining-player-ammo (function pickup-type float)) -(define-extern adjust-player-ammo (function int pickup-type float)) +(define-extern adjust-player-ammo (function float pickup-type float)) (define-extern adjust-player-ammo-over-time (function int float pickup-type float float)) (define-extern truncate-player-ammo (function pickup-type none)) (define-extern *last-gun-fire-time* last-gun-fire-time) @@ -35912,9 +36231,8 @@ ;; gun-blue-shot ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype gun-blue-shot-3 (projectile) - ((hit-actor? basic :offset-assert 512) + ((hit-actor? symbol :offset-assert 512) (start-pos vector :inline :offset-assert 528) (track-mode uint64 :offset-assert 544) (random-travel-distance float :offset-assert 552) @@ -35927,9 +36245,7 @@ dissipate ;; 21 ) ) -|# -#| (deftype dist-dot-val (structure) ((dot float :offset-assert 0) (dist float :offset-assert 4) @@ -35940,76 +36256,72 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype light-trail-tracker-blue-3 (light-trail-tracker-projectile) () :method-count-assert 22 :size-assert #xb8 :flag-assert #x16004000b8 ) -|# -#| (deftype target-quality-info (structure) - ((targ uint64 :offset-assert 0) + ((targ handle :offset-assert 0) (value float :offset-assert 8) ) :method-count-assert 9 :size-assert #xc :flag-assert #x90000000c ) -|# -#| (deftype timeframe-wrapper (structure) - ((time uint64 :offset-assert 0) + ((time time-frame :offset-assert 0) ) :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype gun-blue-2-lightning-info (structure) - ((pts UNKNOWN 32 :offset-assert 0) + ((pts vector 32 :inline :offset-assert 0) (num-pts int8 :offset-assert 512) - (should-draw-terminal-sparks? basic :offset-assert 516) + (should-draw-terminal-sparks? symbol :offset-assert 516) (terminal-spark-pos vector :inline :offset-assert 528) - (should-draw-extension? basic :offset-assert 544) + (should-draw-extension? symbol :offset-assert 544) (extension-end-point vector :inline :offset-assert 560) ) :method-count-assert 9 :size-assert #x240 :flag-assert #x900000240 ) -|# -#| +;; +++gun-blue-shot:gun-blue-lightning-cmd-msg +(defenum gun-blue-lightning-cmd-msg + :type uint64 + (active 0) + (inactive 1) + ) +;; ---gun-blue-shot:gun-blue-lightning-cmd-msg + (deftype gun-blue-lightning-command (structure) - ((msg uint64 :offset-assert 0) + ((msg gun-blue-lightning-cmd-msg :offset-assert 0) (lightning-info gun-blue-2-lightning-info :inline :offset-assert 16) ) :method-count-assert 9 :size-assert #x250 :flag-assert #x900000250 ) -|# -#| (deftype gun-blue-2-lightning-tracker (process-drawable) - ((lt-array basic :offset-assert 200) - (should-draw-this-frame? basic :offset-assert 204) - (last-spark-time uint64 :offset-assert 216) - (spark-time-interval uint64 :offset-assert 224) - (last-deduct-ammo-time uint64 :offset-assert 232) - (snd-lightning uint32 :offset-assert 240) - (active-enter-time uint64 :offset-assert 248) + ((lt-array (array lightning-bolt) :offset-assert 200) + (should-draw-this-frame? symbol :offset-assert 204) + (last-spark-time time-frame :offset 216) + (spark-time-interval time-frame :offset-assert 224) + (last-deduct-ammo-time time-frame :offset-assert 232) + (snd-lightning sound-id :offset-assert 240) + (active-enter-time time-frame :offset-assert 248) (revolve-angle float :offset-assert 256) (sway-angle float :offset-assert 260) - (snd-spin uint32 :offset-assert 264) + (snd-spin sound-id :offset-assert 264) (spin-intensity float :offset-assert 268) (prev-targ-pos vector :inline :offset-assert 272) (last-probe-index int16 :offset-assert 288) @@ -36017,32 +36329,28 @@ :method-count-assert 27 :size-assert #x122 :flag-assert #x1b00b00122 - (:methods - (gun-blue-2-lightning-tracker-method-24 () none) ;; 24 - (gun-blue-2-lightning-tracker-method-25 () none) ;; 25 - (gun-blue-2-lightning-tracker-method-26 () none) ;; 26 - ) (:state-methods - test ;; 23 active ;; 20 inactive ;; 21 die ;; 22 + test ;; 23 + ) + (:methods + (setup-draw! (_type_ gun-blue-2-lightning-info) none) ;; 24 + (gun-blue-2-lightning-tracker-method-25 (_type_) object) ;; 25 + (gun-blue-2-lightning-tracker-method-26 (_type_ vector vector gun-blue-lightning-command) symbol) ;; 26 ) ) -|# -#| (deftype gun-blue-2-target-info (structure) - ((target uint64 :offset-assert 0) - (start-time uint64 :offset-assert 8) + ((target handle :offset-assert 0) + (start-time time-frame :offset-assert 8) ) :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype constraint-knot (structure) ((pt vector :inline :offset-assert 0) (dir vector :inline :offset-assert 16) @@ -36052,23 +36360,19 @@ :size-assert #x24 :flag-assert #x900000024 ) -|# -#| (deftype rope-constraint (structure) - ((constraints UNKNOWN 12 :offset-assert 0) + ((constraints constraint-knot 12 :inline :offset-assert 0) (num-knots uint8 :offset-assert 576) ) :method-count-assert 10 :size-assert #x241 :flag-assert #xa00000241 (:methods - (rope-constraint-method-9 () none) ;; 9 + (rope-constraint-method-9 (_type_ int) symbol) ;; 9 ) ) -|# -#| (deftype gun-blue-2-lightning-init-params (structure) ((num-beams int8 :offset-assert 0) ) @@ -36076,9 +36380,7 @@ :size-assert #x1 :flag-assert #x900000001 ) -|# -#| (deftype gun-blue-shot (projectile) ((init-pos vector :inline :offset-assert 512) (init-dir vector :inline :offset-assert 528) @@ -36088,315 +36390,292 @@ :size-assert #x230 :flag-assert #x2901b00230 ) -|# -#| (deftype gun-blue-shot-2 (gun-blue-shot) () :method-count-assert 41 :size-assert #x230 :flag-assert #x2901b00230 ) -|# -;; (define-extern sparticle-fade-alpha-dist function) -;; (define-extern gun-fire-blue-1 function) -;; (define-extern fmod-2 function) -;; (define-extern get-dist-and-dot function) -;; (define-extern gun-blue-shot-3-move function) -;; (define-extern *blue-shot-trail* object) -;; (define-extern gun-fire-blue-3 function) -;; (define-extern draw-beam-segment function) -;; (define-extern *found-objects* object) -;; (define-extern *gun-blue-2-last-attack-id* object) -;; (define-extern *gun-blue-2-last-attack-id-time* object) -;; (define-extern fire-projectile-if-necessary function) -;; (define-extern *gun-blue-2-targets* object) -;; (define-extern *blue-2-lightning-shape* object) -;; (define-extern *uv-loop-curve* object) -;; (define-extern *blue-light-test* object) -;; (define-extern *blue-light-test-end* object) -;; (define-extern *blue-light-test-big* object) -;; (define-extern *blue-light-test-big-intense* object) -;; (define-extern *blue-light-test-small-fade* object) -;; (define-extern gun-blue-2-lightning-init-by-other function) -;; (define-extern create-lightning-tracker-if-necessary function) -;; (define-extern is-valid-blue-2-target function) -;; (define-extern find-gun-blue-2-target function) -;; (define-extern find-gun-blue-2-target-old function) -;; (define-extern *lightning-pts-cache* object) -;; (define-extern gun-fire-blue-2 function) -;; (define-extern gun-fire-blue-2-old function) +(define-extern sparticle-fade-alpha-dist (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern gun-fire-blue-1 (function object :behavior target)) +(define-extern fmod-2 (function float float float)) +(define-extern get-dist-and-dot (function gun-blue-shot dist-dot-val object)) +(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 *found-objects* (pointer handle)) +(define-extern *gun-blue-2-last-attack-id* uint) +(define-extern *gun-blue-2-last-attack-id-time* timeframe-wrapper) +(define-extern fire-projectile-if-necessary (function vector vector handle (pointer gun-blue-shot-2))) +(define-extern *gun-blue-2-targets* (inline-array gun-blue-2-target-info)) +(define-extern *blue-2-lightning-shape* rope-constraint) +(define-extern *uv-loop-curve* curve2d-piecewise) +(define-extern *blue-light-test* lightning-appearance) +(define-extern *blue-light-test-end* lightning-appearance) +(define-extern *blue-light-test-big* lightning-appearance) +(define-extern *blue-light-test-big-intense* lightning-appearance) +(define-extern *blue-light-test-small-fade* lightning-appearance) +(define-extern gun-blue-2-lightning-init-by-other (function gun-blue-2-lightning-init-params object :behavior gun-blue-2-lightning-tracker)) +(define-extern create-lightning-tracker-if-necessary (function handle :behavior target)) +(define-extern is-valid-blue-2-target (function process-focusable int symbol)) +(define-extern find-gun-blue-2-target (function vector int process-drawable)) +(define-extern find-gun-blue-2-target-old (function vector int vector process-drawable)) +(define-extern *lightning-pts-cache* (inline-array vector)) +(define-extern gun-fire-blue-2 (function object :behavior target)) +(define-extern gun-fire-blue-2-old (function object :behavior target)) (define-extern target-gun-can-fire-blue? (function pickup-type symbol :behavior target)) -;; (define-extern *last-fire-blue-time* object) +(define-extern *last-fire-blue-time* time-frame) (define-extern target-gun-fire-blue (function pickup-type (pointer process) :behavior target)) -;; (define-extern gun-blue-shot-move function) ;; (function gun-blue-shot none) -;; (define-extern cshape-reaction-blue-shot function) ;; (function control-info collide-query vector vector collide-status) +(define-extern gun-blue-shot-move (function gun-blue-shot none)) +(define-extern cshape-reaction-blue-shot (function control-info collide-query vector vector collide-status)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; gun-yellow-shot ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype gun-yellow-shot (projectile) ((hit-actor? symbol :offset-assert 512) ;; guessed by decompiler (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) - (shot-ring-part basic :offset-assert 584) + (last-hit-time time-frame :offset-assert 560) + (snd-whoosh sound-id :offset-assert 568) + (muzzle-flash-part sparticle-launcher :offset-assert 572) + (main-shot-part sparticle-launcher :offset-assert 576) + (shot-aim-part sparticle-launcher :offset-assert 580) + (shot-ring-part sparticle-launcher :offset-assert 584) ) :method-count-assert 44 :size-assert #x24c :flag-assert #x2c01d0024c (:methods - (gun-yellow-shot-method-41 () none) ;; 41 - (gun-yellow-shot-method-42 () none) ;; 42 - (gun-yellow-shot-method-43 () none) ;; 43 + (draw-main-shot (_type_ vector vector) none) ;; 41 + (gun-yellow-shot-method-42 (_type_ float float matrix) none) ;; 42 + (spawn-particles (_type_ vector) none) ;; 43 ) ) -|# -#| (deftype gun-yellow-2-proc-ignore (structure) - ((hand uint64 :offset-assert 0) - (time uint64 :offset-assert 8) + ((hand handle :offset-assert 0) + (time time-frame :offset-assert 8) ) + :pack-me :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype gun-yellow-shot-2 (gun-yellow-shot) - ((last-collide-time uint64 :offset-assert 592) - (snd-trail uint32 :offset-assert 600) - (hit-yet? basic :offset-assert 604) - (actor-deflect? basic :offset-assert 608) + ((last-collide-time time-frame :offset-assert 592) + (snd-trail sound-id :offset-assert 600) + (hit-yet? symbol :offset-assert 604) + (actor-deflect? symbol :offset-assert 608) (max-actor-deflect-count int32 :offset-assert 612) - (last-hit-enemy uint64 :offset-assert 616) - (delay-attack uint64 :offset-assert 624) + (last-hit-enemy handle :offset-assert 616) + (delay-attack time-frame :offset-assert 624) (delay-norm vector :inline :offset-assert 640) (enemy-hit-count int32 :offset-assert 656) - (ignore-list UNKNOWN 6 :offset-assert 664) - (last-attack-time uint64 :offset-assert 760) + (ignore-list gun-yellow-2-proc-ignore 6 :inline :offset-assert 664) + (last-attack-time time-frame :offset-assert 760) ) :method-count-assert 48 :size-assert #x300 :flag-assert #x3002800300 - (:methods - (gun-yellow-shot-2-method-44 () none) ;; 44 - (gun-yellow-shot-2-method-45 () none) ;; 45 - (gun-yellow-shot-2-method-46 () none) ;; 46 - (gun-yellow-shot-2-method-47 () none) ;; 47 - ) (:state-methods impact ;; 22 ) + (:methods + (on-impact (_type_ handle) object) ;; 44 + (handle-impact (_type_ handle) object) ;; 45 + (is-in-ignore-list? (_type_ handle) symbol) ;; 46 + (add-to-ignore-list! (_type_ handle) int) ;; 47 + ) ) -|# -#| (deftype gun-yellow-shot-3 (gun-yellow-shot) () :method-count-assert 44 :size-assert #x24c :flag-assert #x2c01d0024c ) -|# -#| (deftype gun-yellow-3-saucer (projectile-bounce) - ((total-float-time uint64 :offset-assert 552) - (state-time uint64 :offset-assert 192) - (firing? basic :offset-assert 568) - (asleep? basic :offset-assert 572) - (first-fire-time uint64 :offset-assert 576) - (activated? basic :offset-assert 584) - (collided-with-surface? basic :offset-assert 588) - (last-deflect-time uint64 :offset-assert 592) - (last-fire-time uint64 :offset-assert 600) - (spawn-part basic :offset-assert 608) - (last-blink-time uint64 :offset-assert 616) - (finished? basic :offset-assert 624) + ((total-float-time time-frame :offset-assert 552) + (firing? symbol :offset 568) + (asleep? symbol :offset-assert 572) + (first-fire-time time-frame :offset-assert 576) + (activated? symbol :offset-assert 584) + (collided-with-surface? symbol :offset-assert 588) + (last-deflect-time time-frame :offset-assert 592) + (last-fire-time time-frame :offset-assert 600) + (spawn-part sparticle-launch-control :offset-assert 608) + (last-blink-time time-frame :offset-assert 616) + (finished? symbol :offset-assert 624) (initial-fire-dir vector :inline :offset-assert 640) (initial-fire-pos vector :inline :offset-assert 656) - (last-deduct-ammo-time uint64 :offset-assert 672) + (last-deduct-ammo-time time-frame :offset-assert 672) (total-ammo-drained float :offset-assert 680) (total-ammo-to-drain float :offset-assert 684) - (total-fire-time uint64 :offset-assert 688) - (snd-hum uint32 :offset-assert 696) - (snd-shoot uint32 :offset-assert 700) + (total-fire-time time-frame :offset-assert 688) + (snd-hum sound-id :offset-assert 696) + (snd-shoot sound-id :offset-assert 700) ) :method-count-assert 54 :size-assert #x2c0 :flag-assert #x36024002c0 - (:methods - (gun-yellow-3-saucer-method-44 () none) ;; 44 - (gun-yellow-3-saucer-method-50 () none) ;; 50 - (gun-yellow-3-saucer-method-51 () none) ;; 51 - (gun-yellow-3-saucer-method-52 () none) ;; 52 - (gun-yellow-3-saucer-method-53 () none) ;; 53 - ) (:state-methods - spinning ;; 46 + moving ;; 23 + sitting ;; 41 + undefined ;; 44 navigating ;; 45 + spinning ;; 46 impact-explode ;; 47 falling-down ;; 48 - moving ;; 23 - burnt-husk ;; 49 - sitting ;; 41 + burnt-husk + ) + (:methods + (start-firing (_type_) none) ;; 50 + (init-antigrav (_type_) none) ;; 51 + (find-targets (_type_) int) ;; 52 + (spawn-shot (_type_ vector) (pointer gun-yellow-shot-3)) ;; 53 ) (:states gun-yellow-3-saucer-base-state ) ) -|# -#| (deftype target-quality-info-saucer (structure) - ((targ uint64 :offset-assert 0) + ((targ handle :offset-assert 0) (value float :offset-assert 8) ) :method-count-assert 9 :size-assert #xc :flag-assert #x90000000c ) -|# -#| (deftype gun-yellow-3-event-msg (structure) - ((activated? basic :offset-assert 0) - (finished? basic :offset-assert 4) + ((activated? symbol :offset-assert 0) + (finished? symbol :offset-assert 4) ) :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 ) -|# -;; (define-extern saucer-land-move function) -;; (define-extern gun-fire-yellow-3 function) -;; (define-extern gun-fire-yellow-2 function) -;; (define-extern gun-fire-yellow-1 function) +(define-extern saucer-land-move (function gun-yellow-3-saucer none)) +(define-extern gun-fire-yellow-3 (function object :behavior target)) +(define-extern gun-fire-yellow-2 (function (pointer gun-yellow-shot-2) :behavior target)) +(define-extern gun-fire-yellow-1 (function (pointer gun-yellow-shot) :behavior target)) (define-extern target-gun-can-fire-yellow? (function pickup-type symbol :behavior target)) (define-extern target-gun-fire-yellow (function pickup-type (pointer process) :behavior target)) -;; (define-extern someone-fire-yellow function) ;; (function process-drawable vector vector (pointer process)) -;; (define-extern gun-yellow-shot-move function) ;; (function gun-yellow-shot none) -;; (define-extern *last-hit-deflect-target-handle* object) -;; (define-extern gun-yellow-shot-do-deflect function) -;; (define-extern gun-yellow-deflect-reaction function) -;; (define-extern gun-yellow-shot-2-move function) +(define-extern someone-fire-yellow (function process-drawable vector vector (pointer process))) +(define-extern gun-yellow-shot-move (function gun-yellow-shot none)) +(define-extern *last-hit-deflect-target-handle* (pointer process)) +(define-extern gun-yellow-shot-do-deflect (function gun-yellow-shot-2 vector vector vector none :behavior gun-yellow-shot-2)) +(define-extern gun-yellow-deflect-reaction (function control-info collide-query vector vector collide-status)) +(define-extern gun-yellow-shot-2-move (function gun-yellow-shot-2 none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; gun-red-shot ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype gun-red-shot (process-drawable) - ((probe-count int32 :offset-assert 200) - (probe-mask uint32 :offset-assert 204) - (actor-count int32 :offset-assert 208) - (attack-id uint32 :offset-assert 212) - (start-pos vector :inline :offset-assert 224) - (start-dir vector :inline :offset-assert 240) - (start-rot vector :inline :offset-assert 256) - (probe-dir vector 19 :offset-assert 272) ;; guessed by decompiler + ((parent (pointer gun) :override) + (root collide-shape-moving :override) + (probe-count int32 :offset-assert 200) + (probe-mask uint32 :offset-assert 204) + (actor-count int32 :offset-assert 208) + (attack-id uint32 :offset-assert 212) + (start-pos vector :inline :offset-assert 224) + (start-dir vector :inline :offset-assert 240) + (start-rot vector :inline :offset-assert 256) + (probe-dir vector 19 :inline :offset-assert 272) ;; guessed by decompiler ) :method-count-assert 30 :size-assert #x240 :flag-assert #x1e01c00240 - (:methods - (gun-red-shot-method-23 () none) ;; 23 ;; (init-probes! (_type_ collide-shape) none) - (gun-red-shot-method-24 () none) ;; 24 ;; (gun-red-shot-method-24 (_type_) symbol) - (gun-red-shot-method-25 () none) ;; 25 ;; (noop (_type_) none) - (gun-red-shot-method-26 () none) ;; 26 ;; (gun-red-shot-method-26 (_type_) none) - (gun-red-shot-method-27 () none) ;; 27 ;; (gun-red-shot-method-27 (_type_) none) - (gun-red-shot-method-28 () none) ;; 28 ;; (gun-red-shot-method-28 (_type_ vector) sound-id) - (gun-red-shot-method-29 () none) ;; 29 ;; (fire! (_type_ process-drawable int) object) - ) (:state-methods - idle ;; 22, old: (idle () _type_ :state) - blocked ;; 20, old: (blocked () _type_ :state) - debug-idle ;; 21, old: (debug-idle () _type_ :state) + blocked ;; 20 + debug-idle ;; 21 + idle ;; 22 + ) + (:methods + (init-probes! (_type_ collide-shape) none) ;; 23 + (check-blocked? (_type_) symbol) ;; 24 + (stub (_type_) none) ;; 25 + (find-targets (_type_) none) ;; 26 + (setup-probes (_type_) none) ;; 27 + (do-collision (_type_ vector) none) ;; 28 + (send-attack! (_type_ process-drawable touching-shapes-entry) none) ;; 29 ) ) -|# -#| (deftype gun-red-3-grenade (projectile-bounce) ((blast-radius float :offset-assert 548) - (should-explode-soon? basic :offset-assert 552) - (explode-tick-time uint64 :offset-assert 560) - (birth-time uint64 :offset-assert 568) - (immediate-detonation? basic :offset-assert 576) - (attack-id uint32 :offset-assert 444) - (explode-delay-time uint64 :offset-assert 584) + (should-explode-soon? symbol :offset-assert 552) + (explode-tick-time time-frame :offset-assert 560) + (birth-time time-frame :offset-assert 568) + (immediate-detonation? symbol :offset-assert 576) + (explode-delay-time time-frame :offset-assert 584) ) :method-count-assert 48 :size-assert #x250 :flag-assert #x3001d00250 - (:methods - (gun-red-3-grenade-method-45 () none) ;; 45 - (gun-red-3-grenade-method-46 () none) ;; 46 - (gun-red-3-grenade-method-47 () none) ;; 47 - ) (:state-methods impact ;; 22 - impact-tiny ;; 44 - sitting ;; 41 moving ;; 23 + sitting ;; 41 + impact-tiny ;; 44 + ) + (:methods + (check-should-explode (_type_) int) ;; 45 + (go-impact (_type_) object) ;; 46 + (find-and-damage-targets (_type_) object) ;; 47 ) ) -|# -#| (deftype shockwave-collision-pt (structure) ((collision-pt vector :inline :offset-assert 0) (normal vector :inline :offset-assert 16) - (found? basic :offset-assert 32) - (angle float :offset-assert 36) + (found? symbol :offset-assert 32) + (angle degrees :offset-assert 36) ) :method-count-assert 9 :size-assert #x28 :flag-assert #x900000028 ) -|# -#| (deftype gun-red-2-shockwave (process) ((origin vector :inline :offset-assert 128) (max-radius float :offset-assert 144) (strength float :offset-assert 148) (current-radius float :offset-assert 152) (current-intensity float :offset-assert 156) - (state-time uint64 :offset-assert 160) + (state-time time-frame :offset-assert 160) (alpha-scalar float :offset-assert 168) (base-damage float :offset-assert 172) - (snd-charge uint32 :offset-assert 176) + (snd-charge sound-id :offset-assert 176) (min-charge-radius float :offset-assert 180) (max-charge-radius float :offset-assert 184) - (total-charge-time uint64 :offset-assert 192) - (total-explode-time uint64 :offset-assert 200) - (ring-expansion-time uint64 :offset-assert 208) - (burst-expansion-time uint64 :offset-assert 216) - (warp-expansion-time uint64 :offset-assert 224) - (previously-attacked-targets UNKNOWN 64 :offset-assert 232) + (total-charge-time time-frame :offset-assert 192) + (total-explode-time time-frame :offset-assert 200) + (ring-expansion-time time-frame :offset-assert 208) + (burst-expansion-time time-frame :offset-assert 216) + (warp-expansion-time time-frame :offset-assert 224) + (previously-attacked-targets handle 64 :offset-assert 232) (num-previously-attacked-targets int8 :offset-assert 744) - (start-pilot? basic :offset-assert 748) - (explosion-0 uint64 :offset-assert 752) - (explosion-1 uint64 :offset-assert 760) - (generate-order-array UNKNOWN 127 :offset-assert 768) + (start-pilot? symbol :offset-assert 748) + (explosion-0 handle :offset-assert 752) + (explosion-1 handle :offset-assert 760) + (generate-order-array uint8 127 :offset-assert 768) (current-stage-t float :offset-assert 896) (ammo-drained float :offset-assert 900) - (eventual-collision-points UNKNOWN 128 :offset-assert 912) + (eventual-collision-points shockwave-collision-pt 128 :inline :offset-assert 912) (next-computed-collision-point int8 :offset-assert 7056) (num-collision-pts-to-generate int8 :offset-assert 7057) - (show-scorch-marks? basic :offset-assert 7060) + (show-scorch-marks? symbol :offset-assert 7060) (height-off-ground float :offset-assert 7064) (max-ground-radius float :offset-assert 7068) (current-ring-radius float :offset-assert 7072) @@ -36405,35 +36684,33 @@ (current-warp-alpha float :offset-assert 7084) (current-burst-radius float :offset-assert 7088) (current-burst-alpha float :offset-assert 7092) - (generating-marks? basic :offset-assert 7096) - (generated-particles? basic :offset-assert 7100) - (charge-part-tracker uint64 :offset-assert 7104) + (generating-marks? symbol :offset-assert 7096) + (generated-particles? symbol :offset-assert 7100) + (charge-part-tracker handle :offset-assert 7104) ) :method-count-assert 28 :size-assert #x1bc8 :flag-assert #x1c1b501bc8 - (:methods - (gun-red-2-shockwave-method-17 () none) ;; 17 - (gun-red-2-shockwave-method-18 () none) ;; 18 - (gun-red-2-shockwave-method-19 () none) ;; 19 - (gun-red-2-shockwave-method-20 () none) ;; 20 - (gun-red-2-shockwave-method-21 () none) ;; 21 - (gun-red-2-shockwave-method-22 () none) ;; 22 - (gun-red-2-shockwave-method-23 () none) ;; 23 - (gun-red-2-shockwave-method-24 () none) ;; 24 - (gun-red-2-shockwave-method-25 () none) ;; 25 - (gun-red-2-shockwave-method-26 () none) ;; 26 - (gun-red-2-shockwave-method-27 () none) ;; 27 - ) (:state-methods + charging ;; 14 explode ;; 15 die ;; 16 - charging ;; 14 + ) + (:methods + (find-targets-and-attack! (_type_) none) ;; 17 + (send-attack! (_type_ process-focusable symbol) none) ;; 18 + (find-collision-point! (_type_) int) ;; 19 + (generate-collision-points! (_type_) none) ;; 20 + (adjust-height-and-radius (_type_) none) ;; 21 + (gun-red-2-shockwave-method-22 (_type_ int int int int) none) ;; 22 + (generate-shockwave-particles (_type_) none) ;; 23 + (adjust-warp-radius-and-alpha (_type_) object) ;; 24 + (adjust-ring-radius-and-alpha (_type_) none) ;; 25 + (generate-order-array (_type_) none) ;; 26 + (spawn-ring (_type_) none) ;; 27 ) ) -|# -#| (deftype gun-red-2-shockwave-init-params (structure) ((pos vector :inline :offset-assert 0) (max-radius float :offset-assert 16) @@ -36443,38 +36720,33 @@ :size-assert #x18 :flag-assert #x900000018 ) -|# -#| (deftype gun-red-2-explosion (process-drawable) () :method-count-assert 21 :size-assert #xc8 :flag-assert #x15005000c8 (:methods - (gun-red-2-explosion-method-20 () none) ;; 20 + (gun-red-2-explosion-method-20 (_type_) none) ;; 20 ) ) -|# -#| (deftype red-2-ring (process-drawable) ((current-alpha float :offset-assert 200) + (pad uint8 12) ;; added ) :method-count-assert 23 :size-assert #xd8 :flag-assert #x17006000d8 - (:methods - (red-2-ring-method-21 () none) ;; 21 - (red-2-ring-method-22 () none) ;; 22 - ) (:state-methods active ;; 20 + fading ;; 21, referenced in event handler, but doesn't exist + ) + (:methods + (red-2-ring-method-22 () none) ;; 22, also doesn't exist ) ) -|# -#| (deftype red-2-ring-init-params (structure) ((pos vector :inline :offset-assert 0) ) @@ -36482,26 +36754,23 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype red-3-sphere (process-drawable) ((current-alpha float :offset-assert 200) + (pad uint8 12) ;; added ) :method-count-assert 23 :size-assert #xd8 :flag-assert #x17006000d8 - (:methods - (red-3-sphere-method-21 () none) ;; 21 - (red-3-sphere-method-22 () none) ;; 22 - ) (:state-methods active ;; 20 ) + (:methods + (red-3-sphere-method-21 (_type_) none) ;; 21 + (red-3-sphere-method-22 (_type_) none) ;; 22 + ) ) -|# -#| (deftype red-3-sphere-init-params (structure) ((pos vector :inline :offset-assert 0) ) @@ -36509,59 +36778,55 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -;; (define-extern part-tracker-move-to-target-gun function) -;; (define-extern gun-red-2-shockwave-init-by-other function) -;; (define-extern generate-shockwave-scorch-marks-3 function) -;; (define-extern generate-shockwave-scorch-marks-2 function) -;; (define-extern red-2-ring-event-handler function) -;; (define-extern red-2-ring-init-by-other function) -;; (define-extern *impact-blur* object) -;; (define-extern *shockwave-blur-red-2* object) -;; (define-extern gun-fire-red-2 function) -;; (define-extern red-3-sphere-init-by-other function) -;; (define-extern gun-fire-red-3 function) -;; (define-extern gun-fire-red-1 function) +(define-extern part-tracker-move-to-target-gun (function part-tracker none)) +(define-extern gun-red-2-shockwave-init-by-other (function gun-red-2-shockwave-init-params object :behavior gun-red-2-shockwave)) +(define-extern generate-shockwave-scorch-marks-3 (function int none :behavior gun-red-2-shockwave)) +(define-extern generate-shockwave-scorch-marks-2 (function none :behavior gun-red-2-shockwave)) +(define-extern red-2-ring-event-handler (function process int symbol event-message-block object :behavior red-2-ring)) +(define-extern red-2-ring-init-by-other (function red-2-ring-init-params object :behavior red-2-ring)) +(define-extern *impact-blur* curve2d-piecewise) +(define-extern *shockwave-blur-red-2* curve2d-piecewise) +(define-extern gun-fire-red-2 (function object :behavior target)) +(define-extern red-3-sphere-init-by-other (function red-3-sphere-init-params object :behavior red-3-sphere)) +(define-extern gun-fire-red-3 (function gun-red-3-grenade :behavior target)) +(define-extern gun-fire-red-1 (function object :behavior target)) (define-extern target-gun-can-fire-red? (function pickup-type symbol :behavior target)) (define-extern target-gun-fire-red (function pickup-type (pointer process) :behavior target)) -;; (define-extern gun-red-shot-event-handler function) ;; (function process-drawable int symbol event-message-block object :behavior gun-red-shot) -;; (define-extern gun-red-shot-init-by-other function) ;; (function vector vector gun-red-shot :behavior gun-red-shot) +(define-extern gun-red-shot-event-handler (function process int symbol event-message-block object :behavior gun-red-shot)) +(define-extern gun-red-shot-init-by-other (function vector vector object :behavior gun-red-shot)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; gun-dark-shot ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype gun-dark-shot (projectile) ((blast-radius float :offset-assert 512) (core-position vector :inline :offset-assert 528) (core-velocity vector :inline :offset-assert 544) (spin-vector vector :inline :offset-assert 560) - (track-target uint64 :offset-assert 576) ;; handle + (track-target handle :offset-assert 576) (size-t float :offset-assert 584) - (result-array handle 16 :offset-assert 592) ;; guessed by decompiler + (result-array handle 16 :offset-assert 592) (result-count int8 :offset-assert 720) - (charge-sound sound-id :offset-assert 724) ;; guessed by decompiler - (fire-sound sound-id :offset-assert 728) ;; guessed by decompiler - (trail-sound sound-id :offset-assert 732) ;; guessed by decompiler - (explode-sound sound-id :offset-assert 736) ;; guessed by decompiler - (start-pilot? basic :offset-assert 740) - (spread-timer uint64 :offset-assert 744) + (charge-sound sound-id :offset-assert 724) + (fire-sound sound-id :offset-assert 728) + (trail-sound sound-id :offset-assert 732) + (explode-sound sound-id :offset-assert 736) + (start-pilot? symbol :offset-assert 740) + (spread-timer time-frame :offset-assert 744) ) :method-count-assert 43 :size-assert #x2f0 :flag-assert #x2b027002f0 (:state-methods impact ;; 22 - fizzle ;; 42 moving ;; 23 - startup ;; 41, old: (fizzle () _type_ :state) + startup ;; 41 + fizzle ;; 42 ) ) -|# -#| (deftype gun-dark-3-sphere (process-drawable) ((alpha-val float :offset-assert 200) ) @@ -36572,9 +36837,7 @@ active ;; 20 ) ) -|# -#| (deftype gun-dark-3-sphere-init-params (structure) ((pos vector :inline :offset-assert 0) (size-x float :offset-assert 16) @@ -36585,122 +36848,114 @@ :size-assert #x1c :flag-assert #x90000001c ) -|# -#| (deftype last-active-nuke-info (structure) - ((last-active-nuke uint64 :offset-assert 0) + ((last-active-nuke handle :offset-assert 0) ) :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype gun-dark-3-nuke (projectile) - ((flash-time uint64 :offset-assert 512) - (blur-time uint64 :offset-assert 520) - (spawned-mushroom-cloud? basic :offset-assert 528) - (strip basic :offset-assert 532) + ((flash-time time-frame :offset-assert 512) + (blur-time time-frame :offset-assert 520) + (spawned-mushroom-cloud? symbol :offset-assert 528) + (strip prim-strip :offset-assert 532) (mushroom-top-pos vector :inline :offset-assert 544) - (warp uint64 :offset-assert 560) + (warp handle :offset-assert 560) (initial-velocity vector :inline :offset-assert 576) (start-y float :offset-assert 592) (y-vel-adjust float :offset-assert 596) (launch-speed float :offset-assert 600) (launch-sin-region-start float :offset-assert 604) (launch-sin-region-end float :offset-assert 608) - (launch-stay-state-time uint64 :offset-assert 616) - (launch-next-state basic :offset-assert 624) - (launch-impact-state basic :offset-assert 628) + (launch-stay-state-time time-frame :offset-assert 616) + (launch-next-state (state gun-dark-3-nuke) :offset-assert 624) + (launch-impact-state (state gun-dark-3-nuke) :offset-assert 628) (launch-y-scale float :offset-assert 632) (launch-height-t float :offset-assert 636) (expected-height float :offset-assert 640) - (total-fly-time uint64 :offset-assert 648) + (total-fly-time time-frame :offset-assert 648) (num-dying-vehicles uint8 :offset-assert 656) (num-dying-guards uint8 :offset-assert 657) (num-dying-civilians uint8 :offset-assert 658) - (last-death-sound-play-time uint64 :offset-assert 664) - (blur-curve basic :offset-assert 672) - (fade-curve basic :offset-assert 676) + (last-death-sound-play-time time-frame :offset-assert 664) + (blur-curve curve2d-piecewise :offset-assert 672) + (fade-curve curve-color-piecewise :offset-assert 676) (num-blur-segments uint8 :offset-assert 680) - (shook-camera? basic :offset-assert 684) - (hit-wall? basic :offset-assert 688) - (killed-everything? basic :offset-assert 696) - (explode-sound uint32 :offset-assert 700) - (explode-wall-sound uint32 :offset-assert 704) - (played-trail? basic :offset-assert 708) - (smoke-trail basic :offset-assert 712) - (killed-objects UNKNOWN 64 :offset-assert 720) + (shook-camera? symbol :offset-assert 684) + (hit-wall? symbol :offset-assert 688) + (killed-everything? symbol :offset 696) + (explode-sound sound-id :offset-assert 700) + (explode-wall-sound sound-id :offset-assert 704) + (played-trail? symbol :offset-assert 708) + (smoke-trail sparticle-subsampler :offset-assert 712) + (killed-objects handle 64 :offset-assert 720) (num-killed-objects int32 :offset-assert 1232) - (last-kill-time uint64 :offset-assert 1240) + (last-kill-time time-frame :offset-assert 1240) ) :method-count-assert 60 :size-assert #x4e0 :flag-assert #x3c046004e0 - (:methods - (gun-dark-3-nuke-method-41 () none) ;; 41 - (gun-dark-3-nuke-method-51 () none) ;; 51 - (gun-dark-3-nuke-method-52 () none) ;; 52 - (gun-dark-3-nuke-method-53 () none) ;; 53 - (gun-dark-3-nuke-method-54 () none) ;; 54 - (gun-dark-3-nuke-method-55 () none) ;; 55 - (gun-dark-3-nuke-method-56 () none) ;; 56 - (gun-dark-3-nuke-method-57 () none) ;; 57 - (gun-dark-3-nuke-method-58 () none) ;; 58 - (gun-dark-3-nuke-method-59 () none) ;; 59 - ) (:state-methods - wait-for-alive ;; 50 - impact-small ;; 47 - impact-embedded ;; 49 impact ;; 22 - impact-dud ;; 48 - launch-3 ;; 46 - launch-2 ;; 45 - launch-1 ;; 44 - launch-0 ;; 43 + undefined ;; 41, not defined launching-base-state ;; 42 + launch-0 ;; 43 + launch-1 ;; 44 + launch-2 ;; 45 + launch-3 ;; 46 + impact-small ;; 47 + impact-dud ;; 48 + impact-embedded ;; 49 + wait-for-alive ;; 50 + ) + (:methods + (set-launch-height! (_type_) none) ;; 51 + (do-blur-effect (_type_) none) ;; 52 + (do-white-screen-effect (_type_) none) ;; 53 + (count-casualties (_type_) none) ;; 54 + (send-attack! (_type_ process-focusable) none) ;; 55 + (play-death-sounds (_type_) none) ;; 56 + (do-camera-shake (_type_) none) ;; 57 + (do-vibration (_type_) none) ;; 58 + (check-for-impact (_type_) none) ;; 59 ) ) -|# -#| (deftype gravity-spinner (process) ((cached-damage float :offset-assert 128) - (end-time uint64 :offset-assert 136) - (time-subtract uint64 :offset-assert 144) - (parent-hand uint64 :offset-assert 152) + (end-time time-frame :offset-assert 136) + (time-subtract time-frame :offset-assert 144) + (parent-hand handle :offset-assert 152) (rotation-accel vector :inline :offset-assert 160) (original-sphere-offset sphere :inline :offset-assert 176) (obj-radius float :offset-assert 192) - (was-hit-previously? basic :offset-assert 196) + (was-hit-previously? symbol :offset-assert 196) (ground-height float :offset-assert 200) - (next-ground-probe-time uint64 :offset-assert 208) + (next-ground-probe-time time-frame :offset-assert 208) ) :method-count-assert 25 :size-assert #xd8 :flag-assert #x19006000d8 - (:methods - (gravity-spinner-method-16 () none) ;; 16 - (gravity-spinner-method-17 () none) ;; 17 - (gravity-spinner-method-18 () none) ;; 18 - (gravity-spinner-method-19 () none) ;; 19 - (gravity-spinner-method-20 () none) ;; 20 - (gravity-spinner-method-21 () none) ;; 21 - (gravity-spinner-method-22 () none) ;; 22 - (gravity-spinner-method-23 () none) ;; 23 - (gravity-spinner-method-24 () none) ;; 24 - ) (:state-methods zero-g ;; 14 zero-g-vehicle ;; 15 ) + (:methods + (gravity-spinner-method-16 (_type_ vector vector) none) ;; 16 + (update-rotation (_type_ symbol) none) ;; 17 + (gravity-spinner-method-18 (_type_ process) float) ;; 18 + (handle-impact (_type_ symbol) vector) ;; 19 + (probe-ground (_type_) none) ;; 20 + (get-float-speed (_type_) float) ;; 21 + (gravity-spinner-method-22 (_type_) none) ;; 22 + (spawn-part (_type_) none) ;; 23 + (rotate! (_type_ quaternion) none) ;; 24 + ) ) -|# -#| (deftype gravity-ring (process-drawable) ((start-pos vector :inline :offset-assert 208) (jmod-outer joint-mod-add-local :inline :offset-assert 224) @@ -36708,67 +36963,68 @@ (ring-scale-t float :offset-assert 352) (current-radius float :offset-assert 356) (max-radius float :offset-assert 360) - (reverse? basic :offset-assert 364) + (reverse? symbol :offset-assert 364) (total-time float :offset-assert 368) (ring-width float :offset-assert 372) - (stop-time uint64 :offset-assert 376) + (stop-time time-frame :offset-assert 376) ) :method-count-assert 22 :size-assert #x180 :flag-assert #x1601000180 - (:methods - (gravity-ring-method-21 () none) ;; 21 - ) (:state-methods expand ;; 20 ) + (:methods + (gravity-ring-method-21 (_type_) none) ;; 21 + ) ) -|# -#| (deftype gun-gravity (process-drawable) ((current-radius float :offset-assert 200) (max-radius float :offset-assert 204) (lowest-y float :offset-assert 208) (start-pos vector :inline :offset-assert 224) (total-time float :offset-assert 240) - (ring-closest uint64 :offset-assert 248) - (ring-furthest uint64 :offset-assert 256) - (gravity-sound uint32 :offset-assert 264) + (ring-closest handle :offset-assert 248) + (ring-furthest handle :offset-assert 256) + (gravity-sound sound-id :offset-assert 264) ) :method-count-assert 25 :size-assert #x10c :flag-assert #x190090010c - (:methods - (gun-gravity-method-21 () none) ;; 21 - (gun-gravity-method-22 () none) ;; 22 - (gun-gravity-method-23 () none) ;; 23 - (gun-gravity-method-24 () none) ;; 24 - ) (:state-methods expand ;; 20 ) + (:methods + (gun-gravity-method-21 (_type_) none) ;; 21 + (gun-gravity-method-22 (_type_ symbol) none) ;; 22 + (spawn-gravity-spinner (_type_ process) (pointer gravity-spinner)) ;; 23 + (gun-gravity-method-24 (_type_) none) ;; 24 + ) ) -|# -;; (define-extern sparticle-lightning-2d-spline-align-plus-rotz function) -;; (define-extern gun-fire-dark-1 function) -;; (define-extern gun-dark-3-sphere-init-by-other function) -;; (define-extern *last-active-nuke* object) -;; (define-extern gun-dark-reaction function) -;; (define-extern nuke-move function) +(define-extern market-object type) +(define-extern fruit-stand type) +(define-extern missile-bot type) + +(define-extern sparticle-lightning-2d-spline-align-plus-rotz (function object sparticle-cpuinfo sprite-vec-data-2d object none)) +(define-extern gun-fire-dark-1 (function (pointer process) :behavior target)) +(define-extern gun-dark-3-sphere-init-by-other (function gun-dark-3-sphere-init-params object :behavior gun-dark-3-sphere)) +(define-extern *last-active-nuke* last-active-nuke-info) +(define-extern gun-dark-reaction (function control-info collide-query vector vector collide-status)) +(define-extern nuke-move (function object :behavior gun-dark-3-nuke)) (define-extern target-gun-can-fire-dark? (function pickup-type symbol :behavior target)) -;; (define-extern gun-fire-dark-3 function) -;; (define-extern process-drawable-shock-effect-bullseye function) ;; (function process-focusable process-focusable matrix int sparticle-launcher sparticle-launcher sparticle-launcher none) -;; (define-extern gun-dark-shot-init-fizzle function) ;; (function vector none :behavior gun-dark-shot) -;; (define-extern *gravity-origin-pos* object) -;; (define-extern gravity-spinner-init-by-other function) -;; (define-extern zero-g-wait-for-land function) -;; (define-extern *zero-g-fake-attack-vec* object) -;; (define-extern *gun-gravity-shadow-control* shadow-control) -;; (define-extern gravity-ring-init-by-other function) -;; (define-extern gun-gravity-init-by-other function) -;; (define-extern gun-fire-dark-2 function) +(define-extern gun-fire-dark-3 (function (pointer process) :behavior target)) +(define-extern process-drawable-shock-effect-bullseye (function process-focusable process-focusable lightning-spec (function lightning-tracker none) sparticle-launcher sparticle-launcher sparticle-launcher none)) +(define-extern gun-dark-shot-init-fizzle (function vector none :behavior gun-dark-shot)) +(define-extern *gravity-origin-pos* vector) +(define-extern gravity-spinner-init-by-other (function handle object time-frame object :behavior gravity-spinner)) +(define-extern zero-g-wait-for-land (function object :behavior gravity-spinner)) +(define-extern *zero-g-fake-attack-vec* vector) +(define-extern *gun-gravity-shadow-control* shadow-control) +(define-extern gravity-ring-init-by-other (function vector symbol float float float time-frame object :behavior gravity-ring)) +(define-extern gun-gravity-init-by-other (function vector vector object :behavior gun-gravity)) +(define-extern gun-fire-dark-2 (function (pointer process) :behavior target)) (define-extern target-gun-fire-dark (function pickup-type (pointer process) :behavior target)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -36834,8 +37090,8 @@ ;; board-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern board-charge-track function) -;; (define-extern board-zap-track function) +(define-extern board-charge-track (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern board-zap-track (function sparticle-system sparticle-cpuinfo vector none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; board-states ;; @@ -36869,6 +37125,7 @@ (drag-sound-id sound-id :offset-assert 80) ;; guessed by decompiler (whine-sound-id sound-id :offset-assert 84) ;; guessed by decompiler (shield-sound-id sound-id :offset-assert 88) + (mode-sound-bank connection :offset-assert 92) ;; added (mech-start-time time-frame :offset-assert 96) ;; time-frame (mech-time time-frame :offset-assert 104) ;; time-frame (no-get-off-time time-frame :offset-assert 112) ;; time-frame @@ -36898,7 +37155,7 @@ (smoke-local-vel vector 2 :inline :offset-assert 464) ;; guessed by decompiler (particle-system-2d basic :offset-assert 496) (particle-system-3d basic :offset-assert 500) - (part-thruster sparticle-launch-control :offset-assert 504) + (part-thruster sparticle-launcher :offset-assert 504) (part-thruster-scale-x sp-field-init-spec :offset-assert 508) (part-thruster-scale-y sp-field-init-spec :offset-assert 512) (part-quat quaternion :offset-assert 516) @@ -36915,14 +37172,18 @@ ;; menu ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +(declare-type debug-menu-node basic) +(declare-type debug-menu debug-menu-node) +(declare-type debug-menu-item debug-menu-node) + + (deftype debug-menu-context (basic) ((is-active symbol :offset-assert 4) ;; guessed by decompiler (sel-length int32 :offset-assert 8) (sel-menu debug-menu 8 :offset-assert 12) ;; guessed by decompiler (root-menu debug-menu :offset-assert 44) ;; guessed by decompiler (joypad-func (function basic int none) :offset-assert 48) ;; guessed by decompiler - (joypad-item basic :offset-assert 52) + (joypad-item debug-menu-item :offset-assert 52) (font font-context :offset-assert 56) ;; guessed by decompiler (is-hidden symbol :offset-assert 60) ;; guessed by decompiler (joypad-number int32 :offset-assert 64) @@ -36930,10 +37191,11 @@ :method-count-assert 9 :size-assert #x44 :flag-assert #x900000044 + (:methods + (new (symbol type) _type_) ;; 0 + ) ) -|# -#| (deftype debug-menu-node (basic) ((name string :offset-assert 4) ;; guessed by decompiler (parent debug-menu :offset-assert 8) ;; guessed by decompiler @@ -36944,9 +37206,7 @@ :size-assert #x14 :flag-assert #x900000014 ) -|# -#| (deftype debug-menu (debug-menu-node) ((context debug-menu-context :offset-assert 20) ;; guessed by decompiler (selected-item debug-menu-item :offset-assert 24) ;; guessed by decompiler @@ -36957,10 +37217,11 @@ :method-count-assert 9 :size-assert #x28 :flag-assert #x900000028 + (:methods + (new (symbol type debug-menu-context string) _type_) ;; 0 + ) ) -|# -#| (deftype debug-menu-item (debug-menu-node) ((id int32 :offset-assert 20) ) @@ -36968,19 +37229,18 @@ :size-assert #x18 :flag-assert #x900000018 ) -|# -#| (deftype debug-menu-item-submenu (debug-menu-item) ((submenu debug-menu :offset-assert 24) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x1c :flag-assert #x90000001c + (:methods + (new (symbol type string debug-menu) _type_) ;; 0 + ) ) -|# -#| (deftype debug-menu-item-function (debug-menu-item) ((activate-func (function object object) :offset-assert 24) ;; guessed by decompiler (hilite-timer int8 :offset-assert 28) @@ -36988,21 +37248,33 @@ :method-count-assert 9 :size-assert #x1d :flag-assert #x90000001d + (:methods + (new (symbol type string object (function object object)) _type_) ;; 0 + ) ) -|# -#| +;; +++menu:debug-menu-msg +(defenum debug-menu-msg + :type int32 + (activate 1) + (deactivate 2) + (update 3) + (press 4) + ) +;; ---menu:debug-menu-msg + (deftype debug-menu-item-flag (debug-menu-item) ((activate-func (function object debug-menu-msg object) :offset-assert 24) ;; guessed by decompiler - (is-on object :offset-assert 28) ;; guessed by decompiler + (is-on symbol :offset-assert 28) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x20 :flag-assert #x900000020 + (:methods + (new (symbol type string object (function object debug-menu-msg object)) _type_) ;; 0 + ) ) -|# -#| (deftype debug-menu-item-var (debug-menu-item) ((display-str string :offset-assert 24) ;; guessed by decompiler (grabbed-joypad-p symbol :offset-assert 28) ;; guessed by decompiler @@ -37021,112 +37293,132 @@ (fstep float :offset-assert 80) (fprecision int32 :offset-assert 84) (factivate-func (function int debug-menu-msg float float float) :offset-assert 88) ;; guessed by decompiler - (ival int32 :offset-assert 60) - (iundo-val int32 :offset-assert 64) - (irange-min int32 :offset-assert 68) - (irange-max int32 :offset-assert 72) - (istart-inc int32 :offset-assert 76) - (istep int32 :offset-assert 80) + (ival int32 :offset 60) + (iundo-val int32 :offset 64) + (irange-min int32 :offset 68) + (irange-max int32 :offset 72) + (istart-inc int32 :offset 76) + (istep int32 :offset 80) (ihex-p symbol :offset-assert 92) ;; guessed by decompiler - (iactivate-func (function int debug-menu-msg int int int) :offset-assert 88) ;; guessed by decompiler + (iactivate-func (function int debug-menu-msg int int int) :offset 88) ;; guessed by decompiler (ifloat-p symbol :offset-assert 96) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x64 :flag-assert #x900000064 + (:methods + (new (symbol type string int int) _type_) ;; 0 + ) ) -|# -;; (define-extern debug-menu-item-var-update-display-str function) ;; (function debug-menu-item-var debug-menu-item-var) -;; (define-extern debug-menu-item-var-make-int function) ;; (function debug-menu-item-var (function int debug-menu-msg int int int) int symbol int int symbol debug-menu-item-var) -;; (define-extern debug-menu-item-var-make-float function) ;; (function debug-menu-item-var (function int debug-menu-msg float float float) float symbol float float int debug-menu-item-var) -;; (define-extern debug-menu-context-grab-joypad function) ;; (function debug-menu-context basic (function basic int none) symbol) -;; (define-extern debug-menu-context-release-joypad function) ;; (function debug-menu-context symbol) -;; (define-extern debug-menu-item-get-max-width function) ;; (function debug-menu-item debug-menu int) -;; (define-extern debug-menu-context-default-selection function) ;; (function debug-menu-context symbol debug-menu-context) -;; (define-extern debug-menu-rebuild function) ;; (function debug-menu debug-menu) -;; (define-extern debug-menu-context-set-root-menu function) ;; (function debug-menu-context debug-menu debug-menu-context) -;; (define-extern debug-menu-append-item function) ;; (function debug-menu debug-menu-node debug-menu-node) -;; (define-extern debug-menu-remove-all-items function) ;; (function debug-menu debug-menu) -;; (define-extern debug-menu-func-decode function) ;; (function object function) -;; (define-extern debug-menu-make-from-template function) ;; (function debug-menu-context pair debug-menu-node) -;; (define-extern debug-menu-find-from-template function) ;; (function debug-menu-context pair debug-menu) -;; (define-extern debug-menu-item-submenu-render function) ;; (function debug-menu-item-submenu int int int symbol debug-menu-item-submenu) -;; (define-extern debug-menu-item-function-render function) ;; (function debug-menu-item-function int int int symbol debug-menu-item-function) -;; (define-extern debug-menu-item-flag-render function) ;; (function debug-menu-item-flag int int int symbol debug-menu-item-flag) -;; (define-extern debug-menu-item-var-render function) ;; (function debug-menu-item-var int int int symbol debug-menu-item-var) -;; (define-extern debug-menu-item-render function) ;; (function debug-menu-item int int int symbol debug-menu-item) -;; (define-extern debug-menu-render function) ;; (function debug-menu int int debug-menu-node int debug-menu) -;; (define-extern debug-menu-context-render function) ;; (function debug-menu-context debug-menu-context) -;; (define-extern debug-menu-context-select-next-or-prev-item function) ;; (function debug-menu-context int debug-menu-context) -;; (define-extern debug-menu-context-select-new-item function) ;; (function debug-menu-context int debug-menu-context) -;; (define-extern debug-menu-context-open-submenu function) ;; (function debug-menu-context debug-menu basic) -;; (define-extern debug-menu-context-close-submenu function) ;; (function debug-menu-context debug-menu-context) -;; (define-extern debug-menu-item-submenu-msg function) ;; (function debug-menu-item-submenu debug-menu-msg debug-menu-item-submenu) -;; (define-extern debug-menu-item-function-msg function) ;; (function debug-menu-item-function debug-menu-msg debug-menu-item-function) -;; (define-extern debug-menu-item-flag-msg function) ;; (function debug-menu-item-flag debug-menu-msg debug-menu-item-flag) -;; (define-extern debug-menu-item-var-joypad-handler function) ;; (function debug-menu-item-var int debug-menu-item-var) -;; (define-extern debug-menu-item-var-msg function) ;; (function debug-menu-item-var debug-menu-msg debug-menu-item-var) -;; (define-extern debug-menu-item-send-msg function) ;; (function debug-menu-item debug-menu-msg debug-menu-item) -;; (define-extern debug-menu-send-msg function) ;; (function debug-menu debug-menu-msg symbol debug-menu) -;; (define-extern debug-menu-context-send-msg function) ;; (function debug-menu-context debug-menu-msg debug-menu-dest debug-menu-context) -;; (define-extern debug-menu-context-activate-selection function) ;; (function debug-menu-context debug-menu-context) -;; (define-extern debug-menus-default-joypad-func function) ;; (function debug-menu-context debug-menu-context) -;; (define-extern debug-menus-active function) ;; (function debug-menu-context debug-menu-context) -;; (define-extern debug-menus-handler function) ;; (function debug-menu-context debug-menu-context) +;; +++menu:debug-menu-dest +(defenum debug-menu-dest + :type int32 + (activation 0) + (root 1) + (open-menus 2) + (current-selection 3) + ) +;; ---menu:debug-menu-dest + +(define-extern debug-menu-item-var-update-display-str (function debug-menu-item-var debug-menu-item-var)) +(define-extern debug-menu-item-var-make-int (function debug-menu-item-var (function int debug-menu-msg int int int) int symbol int int symbol debug-menu-item-var)) +(define-extern debug-menu-item-var-make-float (function debug-menu-item-var (function int debug-menu-msg float float float) float symbol float float int debug-menu-item-var)) +(define-extern debug-menu-context-grab-joypad (function debug-menu-context basic (function basic int none) symbol)) +(define-extern debug-menu-context-release-joypad (function debug-menu-context symbol)) +(define-extern debug-menu-item-get-max-width (function debug-menu-item debug-menu int)) +(define-extern debug-menu-context-default-selection (function debug-menu-context symbol debug-menu-context)) +(define-extern debug-menu-rebuild (function debug-menu debug-menu)) +(define-extern debug-menu-context-set-root-menu (function debug-menu-context debug-menu debug-menu-context)) +(define-extern debug-menu-append-item (function debug-menu debug-menu-node debug-menu-node)) +(define-extern debug-menu-remove-all-items (function debug-menu debug-menu)) +(define-extern debug-menu-func-decode (function object function)) +(define-extern debug-menu-make-from-template (function debug-menu-context pair debug-menu-node)) +(define-extern debug-menu-find-from-template (function debug-menu-context pair debug-menu)) +(define-extern debug-menu-item-submenu-render (function debug-menu-item-submenu int int int symbol debug-menu-item-submenu)) +(define-extern debug-menu-item-function-render (function debug-menu-item-function int int int symbol debug-menu-item-function)) +(define-extern debug-menu-item-flag-render (function debug-menu-item-flag int int int symbol debug-menu-item-flag)) +(define-extern debug-menu-item-var-render (function debug-menu-item-var int int int symbol debug-menu-item-var)) +(define-extern debug-menu-item-render (function debug-menu-item int int int symbol debug-menu-item)) +(define-extern debug-menu-render (function debug-menu int int debug-menu-node int debug-menu)) +(define-extern debug-menu-context-render (function debug-menu-context debug-menu-context)) +(define-extern debug-menu-context-select-next-or-prev-item (function debug-menu-context int debug-menu-context)) +(define-extern debug-menu-context-select-new-item (function debug-menu-context int debug-menu-context)) +(define-extern debug-menu-context-open-submenu (function debug-menu-context debug-menu basic)) +(define-extern debug-menu-context-close-submenu (function debug-menu-context debug-menu-context)) +(define-extern debug-menu-item-submenu-msg (function debug-menu-item-submenu debug-menu-msg debug-menu-item-submenu)) +(define-extern debug-menu-item-function-msg (function debug-menu-item-function debug-menu-msg debug-menu-item-function)) +(define-extern debug-menu-item-flag-msg (function debug-menu-item-flag debug-menu-msg debug-menu-item-flag)) +(define-extern debug-menu-item-var-joypad-handler (function debug-menu-item-var int debug-menu-item-var)) +(define-extern debug-menu-item-var-msg (function debug-menu-item-var debug-menu-msg debug-menu-item-var)) +(define-extern debug-menu-item-send-msg (function debug-menu-item debug-menu-msg debug-menu-item)) +(define-extern debug-menu-send-msg (function debug-menu debug-menu-msg symbol debug-menu)) +(define-extern debug-menu-context-send-msg (function debug-menu-context debug-menu-msg debug-menu-dest debug-menu-context)) +(define-extern debug-menu-context-activate-selection (function debug-menu-context debug-menu-context)) +(define-extern debug-menus-default-joypad-func (function debug-menu-context debug-menu-context)) +(define-extern debug-menus-active (function debug-menu-context debug-menu-context)) +(define-extern debug-menus-handler (function debug-menu-context debug-menu-context)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; drawable ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern sphere-cull function) ;; (function vector symbol) -;; (define-extern guard-band-cull function) ;; (function vector symbol) -(define-extern sphere-in-view-frustum? (function sphere symbol)) -(define-extern line-in-view-frustum? (function vector vector symbol)) -;; (define-extern vis-cull function) ;; (function int symbol) -;; (define-extern vis-cull-debug function) ;; (function work-area int symbol) -;; (define-extern error-sphere function) ;; (function drawable-error string none) -;; (define-extern *edit-instance* object) ;; string -;; (define-extern *instance-mem-usage* object) ;; memory-usage-block -;; (define-extern find-instance-by-name-level function) ;; (function string level prototype-bucket) -;; (define-extern find-instance-by-name function) ;; (function string prototype-bucket) -;; (define-extern prototypes-game-visible-set! function) ;; (function pair symbol int) -;; (define-extern find-instance-by-index function) ;; (function type int bsp-header prototype-bucket) -;; (define-extern prototype-bucket-type function) ;; (function prototype-bucket type) -;; (define-extern prototype-bucket-recalc-fields function) ;; (function prototype-bucket prototype-bucket) -;; (define-extern print-prototype-list function) ;; (function none) -;; (define-extern draw-instance-info function) ;; (function string none) -;; (define-extern set-shadow-by-name function) ;; (function string int int none) -;; (define-extern get-shadow-by-name function) ;; (function string none) -;; (define-extern teleport-camera-by-name function) ;; (function string none) -;; (define-extern teleport-camera-by-pos function) -;; (define-extern calc-vu1-shadow function) -;; (define-extern calc-shadow-masks function) -;; (define-extern calc-realtime-lights function) -(define-extern calc-vu1-lights (function vu-lights draw-control uint none)) -(define-extern dma-add-process-drawable (function process-drawable draw-control symbol dma-buffer none)) -;; (define-extern *hud-lights* object) ;; vu-lights -;; (define-extern dma-add-process-drawable-hud function) ;; (function process-drawable draw-control float dma-buffer none) -(define-extern add-process-drawable (function process-drawable draw-control symbol dma-buffer none)) -;; (define-extern foreground-engine-execute function) ;; (function engine display-frame none) -;; (define-extern main-debug-hook function) ;; (function none) -;; (define-extern *debug-hook* object) ;; pair -;; (define-extern *add-sphere* object) ;; symbol -;; (define-extern *generic-effect-mode* object) ;; int -;; (define-extern foreground-initialize-engines function) ;; (function none) -;; (define-extern foreground-execute-cpu-vu0-engines function) ;; (function none) -;; (define-extern real-main-draw-hook function) ;; (function none) -;; (define-extern main-draw-hook function) ;; (function none) -;; (define-extern *draw-hook* object) ;; (function none) -;; (define-extern default-init-buffer function) ;; (function bucket-id gs-zbuf gs-test none) -;; (define-extern default-end-buffer function) ;; (function bucket-id gs-zbuf gs-test none) -;; (define-extern screen-shot-scale function) ;; (function int string none) -;; (define-extern screen-shot function) ;; (function none) -;; (define-extern display-frame-start function) ;; (function display int float none) -;; (define-extern display-frame-finish function) ;; (function display display) -;; (define-extern determine-pause-mode function) ;; (function int) -;; (define-extern calc-ratio function) -;; (define-extern display-sync function) ;; (function display none) +(define-extern draw-vortex (function none)) ;; doesn't exist in jak 3!! +(define-extern sphere-cull "Is this sphere visible? Uses cached camera matrix registers, so use with care." (function vector symbol)) +(define-extern guard-band-cull "Is this sphere within the guard band, and maybe needs clipping? Uses cached camera matrix registers, so use with care." (function vector symbol)) +(define-extern sphere-in-view-frustum? "Check if sphere is in view frustum. Uses math-camera, so doesn't need register setup." (function sphere symbol)) +(define-extern line-in-view-frustum? "Check if line is in view frustum. Uses math-camera, so doesn't need register setup." (function vector vector symbol)) +(define-extern vis-cull "Check if object is visible by ID with precomputed visibility. Requres scratchpad to have vis-bits loaded." (function int symbol)) +(define-extern vis-cull-debug (function work-area int symbol)) +(define-extern error-sphere "Draw an error sphere and text for a drawable-error." (function drawable-error string none)) +(define-extern *edit-instance* string) +(define-extern *instance-mem-usage* memory-usage-block) +(define-extern find-instance-by-name-level "Find shrub or tie prototype by name in a level. + Yes it says instance. No it does not return an instance." (function string level prototype-bucket)) +(define-extern find-instance-by-name "Find shrub or tie prototype by name in any level. + Yes it says instance. No it does not return an instance." (function string prototype-bucket)) +(define-extern prototypes-game-visible-set! + "Disable collision/visibilty of tie/shrub based on a list of prototype names. + Only looks in the given level." + (function pair symbol level int)) +(define-extern find-instance-by-index (function type int bsp-header prototype-bucket)) +(define-extern prototype-bucket-type (function prototype-bucket type)) +(define-extern prototype-bucket-recalc-fields (function prototype-bucket prototype-bucket)) +(define-extern print-prototype-list (function none)) +(define-extern draw-instance-info (function string none)) +(define-extern set-shadow-by-name "Modify the shadow values for a process." (function string int int none)) +(define-extern get-shadow-by-name "Print to stdout the mask/values for the given process shadows" (function string none)) +(define-extern teleport-camera-by-name "Move camera to entity by name" (function string none)) +(define-extern teleport-camera-by-pos "Move camera to position" (function float float float none)) +(define-extern calc-vu1-shadow "Update shadow-ctrl based on lights" (function light-group draw-control none)) +(define-extern calc-shadow-masks (function light-group draw-control uint none)) +(define-extern calc-realtime-lights (function light-group draw-control uint none)) +(define-extern calc-vu1-lights (function vu-lights draw-control symbol none)) +(define-extern dma-add-process-drawable "Generate DMA for foreground object, calculate lights/shadows, etc." (function process-drawable draw-control symbol dma-buffer none)) +(define-extern *hud-lights* vu-lights) +(define-extern dma-add-process-drawable-hud "Special version of dma-add-process-drawable for drawing hud foreground objects" (function process-drawable draw-control float dma-buffer none)) +(define-extern add-process-drawable "Foreground engine function to generate dma for a process-drawable." (function process-drawable draw-control symbol dma-buffer none)) +(define-extern foreground-engine-execute "Draw all foreground objects!" (function engine none)) +(define-extern main-debug-hook "Run debug engine, collision renderer." (function none)) +(define-extern *debug-hook* pair) +(define-extern *add-sphere* symbol) +(define-extern *generic-effect-mode* int) +(define-extern foreground-initialize-engines "Initialize shadow chains prior to foreground drawing." (function none)) +(define-extern foreground-execute-cpu-vu0-engines "Run foreground drawing code on EE/VU0 (bones, generic merc, part of shadow, lightning, prim)" (function none)) +(define-extern real-main-draw-hook "Do all drawing! Called by main loop to run drawing for a frame. + Note that this also dispatches collide events, updates actors, etc. + It's a bit more than just drawing." (function none)) +(define-extern main-draw-hook "Wrapper of real-main-draw-hook" (function none)) +(define-extern *draw-hook* (function none)) +(define-extern default-init-buffer "Initialize DMA chain for a bucket." (function bucket-id gs-zbuf gs-test none)) +(define-extern default-end-buffer "Add DMA data at the end of a bucket to reset settings." (function bucket-id gs-zbuf gs-test none)) +(define-extern screen-shot-scale (function int string none)) +(define-extern screen-shot "Take a screenshot." (function none)) +(define-extern display-frame-start "Advance clocks, poll pads/mouse, set up buckets." (function display int float none)) +(define-extern display-frame-finish "Do final texture remaps, sync DMA (wait for previous rendering to finish), and finalize DMA chain." (function display display)) +(define-extern determine-pause-mode "Update pause modes" (function none)) +(define-extern calc-ratio (function int int float)) +(define-extern display-sync (function display none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; drawable-group ;; @@ -37152,58 +37444,61 @@ ;; main-collide ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern drawable-sphere-box-intersect? function) ;; (function drawable bounding-box4w symbol) -;; (define-extern instance-sphere-box-intersect? function) ;; (function drawable instance-tie bounding-box4w symbol) -;; (define-extern instance-tfragment-add-debug-sphere function) ;; (function drawable instance-tie symbol) +(define-extern drawable-sphere-box-intersect? (function drawable bounding-box4w symbol)) +(define-extern instance-sphere-box-intersect? (function drawable instance-tie bounding-box4w symbol)) +(define-extern instance-tfragment-add-debug-sphere (function drawable instance-tie symbol)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; video ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(define-extern *video-mode* int) (define-extern set-video-mode (function symbol none)) (define-extern get-video-mode (function symbol)) (define-extern set-aspect-ratio (function symbol none)) -;; (define-extern get-aspect-ratio function) ;; (function symbol) -;; (define-extern set-progressive-scan function) ;; (function symbol none) -;; (define-extern get-progressive-scan function) ;; (function symbol) -;; (define-extern set-graphics-mode function) ;; (function none) +(define-extern get-aspect-ratio (function symbol)) +(define-extern set-progressive-scan (function symbol none)) +(define-extern get-progressive-scan (function symbol)) +(define-extern set-graphics-mode (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; main ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(define-extern set-letterbox-frames (function time-frame none)) -(define-extern letterbox (function none)) -(define-extern set-blackout-frames (function time-frame none)) -(define-extern blackout (function none)) -(define-extern add-blackout (function time-frame int int int int int)) -(define-extern paused? (function symbol)) -(define-extern movie? (function symbol)) -;; (define-extern scene-select? function) -(define-extern demo? (function symbol)) -(define-extern kiosk? (function symbol)) -;; (define-extern *last-master-mode* object) ;; symbol -(define-extern set-master-mode (function symbol none)) -;; (define-extern pause-allowed? function) ;; (function symbol) -;; (define-extern toggle-pause function) ;; (function int) +(define-extern set-letterbox-frames "Enable letterbox for the given amount of time." (function time-frame none)) +(define-extern letterbox "Draw letterbox" (function bucket-id float none)) +(define-extern set-blackout-frames "Enable blackout for the given amount of time." (function time-frame none)) +(define-extern blackout "Draw blackout as a sprite." (function bucket-id none)) +(define-extern add-blackout "Update display settings to do blackout with GS pmode alp." (function time-frame int int int int int)) +(define-extern paused? "Are we paused? Counts any type of pause/menu/freeze." (function symbol)) +(define-extern movie? "Are we in a movie?" (function symbol)) +(define-extern scene-select? (function symbol)) +(define-extern demo? "Is this a demo version?" (function symbol)) +(define-extern kiosk? "Is this a kiosk version of the game?" (function symbol)) +(define-extern *last-master-mode* symbol) +(define-extern set-master-mode "Change the master mode and adjust a few masks" (function symbol none)) +(define-extern pause-allowed? "Should we allow a pause?" (function symbol)) +(define-extern toggle-pause "Update the pause state. Call this if the user presses a pause button + This function will check the button and state and do a pause if needed." + (function int)) (define-extern *screen-filter* screen-filter) -;; (define-extern *cheat-temp* object) ;; (pointer int32) +(define-extern *cheat-temp* (pointer int32)) (define-extern *master-exit* symbol) -;; (define-extern *progress-cheat* object) ;; symbol -;; (define-extern *first-boot* object) ;; symbol -;; (define-extern main-timeouts function) -;; (define-extern main-cheats function) ;; (function int) -;; (define-extern end-display function) ;; (function display none) -;; (define-extern display-loop-main function) ;; (function display none) -;; (define-extern display-loop function) ;; (function int :behavior process) -;; (define-extern on function) ;; (function symbol process) -;; (define-extern off function) ;; (function int) +(define-extern *progress-cheat* symbol) +(define-extern *first-boot* symbol) +(define-extern main-timeouts "Maybe reset/restart the game if no input has been given. + Mainly used for kiosk/demo modes." (function none)) +(define-extern main-cheats (function none)) +(define-extern end-display (function display none)) +(define-extern display-loop-main (function display none)) +(define-extern display-loop "Main loop for running the game." (function int :behavior process)) +(define-extern on "Start the display process." (function symbol process)) +(define-extern off "Stop the display process." (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; collide-cache ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype collide-puls-work (structure) ((ignore-pat pat-surface :offset-assert 0) ;; guessed by decompiler (bsphere sphere :inline :offset-assert 16) @@ -37213,9 +37508,7 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype lsmi-work (structure) ((best-u float :offset-assert 0) (orig-best-u float :offset-assert 4) @@ -37226,15 +37519,13 @@ :size-assert #x22c :flag-assert #x90000022c ) -|# -;; (define-extern test-closest-pt-in-triangle function) ;; (function collide-cache symbol) +(define-extern test-closest-pt-in-triangle (function collide-cache symbol)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; collide-debug ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype col-rend-filter (structure) ((show-pat-set pat-surface :offset-assert 0) ;; guessed by decompiler (show-pat-clear pat-surface :offset-assert 4) ;; guessed by decompiler @@ -37244,9 +37535,8 @@ :size-assert #xc :flag-assert #x90000000c ) -|# -;; (define-extern col-rend-draw function) ;; (function col-rend col-rend-filter none) +(define-extern col-rend-draw (function col-rend col-rend-filter none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; relocate ;; @@ -37260,7 +37550,7 @@ ;; memory-usage-block is already defined! (define-extern mem-size (function basic symbol int int)) -;; (define-extern *max-dma* object) ;; int +(define-extern *max-dma* int) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; entity ;; @@ -37278,45 +37568,45 @@ ) (define-extern *spawn-actors* symbol) -;; (define-extern *compact-actors* object) ;; symbol -;; (define-extern *vis-actors* object) ;; symbol +(define-extern *compact-actors* symbol) +(define-extern *vis-actors* symbol) (define-extern entity-by-name (function string entity)) -;; (define-extern entity-by-type function) ;; (function type entity-actor) +(define-extern entity-by-type (function type entity-actor)) (define-extern entity-by-aid (function uint entity)) -;; (define-extern entity-actor-from-level-name function) ;; (function symbol entity-actor) -;; (define-extern entity-nav-mesh-by-aid function) ;; (function actor-id entity-nav-mesh) -;; (define-extern nav-mesh-from-res-tag function) ;; (function entity symbol int nav-mesh) -;; (define-extern entity-by-meters function) ;; (function float float float entity-actor) -;; (define-extern process-by-ename function) ;; (function string process) -;; (define-extern entity-process-count function) ;; (function symbol int) -;; (define-extern entity-count function) ;; (function int) -;; (define-extern entity-remap-names function) ;; (function pair none) -;; (define-extern process-status-bits function) ;; (function process symbol none) +(define-extern entity-actor-from-level-name (function symbol entity-actor)) +(define-extern entity-nav-mesh-by-aid (function actor-id entity-nav-mesh)) +(define-extern nav-mesh-from-res-tag (function entity symbol int nav-mesh)) +(define-extern entity-by-meters (function float float float entity-actor)) +(define-extern process-by-ename (function string process)) +(define-extern entity-process-count (function symbol int)) +(define-extern entity-count (function int)) +(define-extern entity-remap-names (function pair none)) +(define-extern process-status-bits (function process symbol none)) (define-extern process-entity-set! (function process entity entity)) (define-extern process-task-mask (function process task-mask)) -;; (define-extern update-actor-vis-box function) ;; (function process-drawable vector vector none) -;; (define-extern expand-bounding-box function) ;; (function vector vector vector vector none) -;; (define-extern expand-bounding-box-from-nav-meshes function) -;; (define-extern expand-vis-box-with-point function) ;; (function entity vector none) -;; (define-extern *debug-actor-info* debug-actor-info) ;; debug-actor-info -;; (define-extern *pid-string* object) ;; string -;; (define-extern debug-actor function) ;; (function string none) -;; (define-extern debug-actor-process function) -;; (define-extern draw-actor-marks function) ;; (function process none) +(define-extern update-actor-vis-box (function process-drawable vector vector none)) +(define-extern expand-bounding-box (function vector vector vector vector none)) +(define-extern expand-bounding-box-from-nav-meshes (function entity vector vector object)) +(define-extern expand-vis-box-with-point (function entity vector none)) +(define-extern *debug-actor-info* debug-actor-info) +(define-extern *pid-string* string) +(define-extern debug-actor (function string none)) +(define-extern debug-actor-process (function process none)) +(define-extern draw-actor-marks (function process none)) (define-extern init-entity (function process entity-actor type none)) -;; (define-extern entity-deactivate-handler function) ;; (function process entity-actor none) -;; (define-extern check-for-rougue-process function) ;; (function process int int level none) -;; (define-extern process-drawable-scale-from-entity! function) ;; (function process-drawable entity none) +(define-extern entity-deactivate-handler (function process entity-actor none)) +(define-extern check-for-rougue-process (function process int int level none)) +(define-extern process-drawable-scale-from-entity! (function process-drawable entity none)) (define-extern process-drawable-from-entity! (function process-drawable entity-actor none)) (define-extern reset-actors (function symbol none)) -;; (define-extern reset-cameras function) ;; (function none) +(define-extern reset-cameras (function none)) (define-extern entity-birth-no-kill (function entity process)) -;; (define-extern entity-task-complete-on function) ;; (function entity none) -;; (define-extern entity-task-complete-off function) ;; (function entity none) +(define-extern entity-task-complete-on (function entity none)) +(define-extern entity-task-complete-off (function entity none)) (define-extern process-entity-status! (function process entity-perm-status symbol entity-perm-status)) (define-extern find-nearest-entity (function vector type entity)) -;; (define-extern entity-speed-test function) ;; (function string entity) -;; (define-extern dump-entity-remap function) ;; (function object object none) +(define-extern entity-speed-test (function string entity)) +(define-extern dump-entity-remap (function object object none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; path ;; @@ -37333,25 +37623,23 @@ ;; nav-engine ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype nav-engine-spr-buffer (structure) ((mem-addr (pointer nav-mesh) :offset-assert 0) ;; guessed by decompiler - (mem-nav uint32 :offset-assert 0) + (mem-nav uint32 :offset 0) (spr-addr (inline-array nav-control) :offset-assert 4) ;; guessed by decompiler - (spr-nav uint32 :offset-assert 4) + (spr-nav uint32 :offset 4) (q-size uint32 :offset-assert 8) (i-nav uint8 :offset-assert 12) (done int8 :offset-assert 13) (nav-count int8 :offset-assert 14) (i-pass int8 :offset-assert 15) ) + :pack-me :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype nav-engine (structure) ((spr-addr uint32 :offset-assert 0) (nav-work-addr uint32 :offset-assert 4) @@ -37362,15 +37650,15 @@ (buf-nav-control-count int8 :offset-assert 24) (max-pass-count int8 :offset-assert 25) (output-sphere-hash uint8 :offset-assert 26) - (work-buf-array nav-engine-spr-buffer 3 :offset-assert 28) ;; guessed by decompiler - (spr-work nav-mesh-work :offset-assert 4) + (work-buf-array nav-engine-spr-buffer 3 :inline :offset-assert 28) ;; guessed by decompiler + (spr-work nav-mesh-work :offset 4) (mem-work nav-mesh-work :offset-assert 76) - (spr-mesh nav-mesh :offset-assert 8) ;; guessed by decompiler + (spr-mesh nav-mesh :offset 8) ;; guessed by decompiler (mem-mesh nav-mesh :offset-assert 80) ;; guessed by decompiler - (spr-poly-array uint32 :offset-assert 12) + (spr-poly-array uint32 :offset 12) (mem-poly-array (inline-array nav-poly) :offset-assert 84) ;; guessed by decompiler - (hash-sphere-list uint32 :offset-assert 16) - (hash-buckets uint32 :offset-assert 20) + (hash-sphere-list uint32 :offset 16) + (hash-buckets uint32 :offset 20) (to-spr-wait uint32 :offset-assert 88) (from-spr-wait uint32 :offset-assert 92) ) @@ -37378,81 +37666,77 @@ :size-assert #x60 :flag-assert #x1600000060 (:methods - (nav-engine-method-9 () none) ;; 9 ;; (inc-spr-addr! (_type_ uint) uint) - (nav-engine-method-10 () none) ;; 10 ;; (lay-out-spad-memory (_type_ nav-mesh) none) - (nav-engine-method-11 () none) ;; 11 ;; (set-up-mem-work (_type_) none) - (nav-engine-method-12 () none) ;; 12 ;; (add-spheres-from-mesh-user-list (_type_ sphere-hash nav-mesh) none) - (nav-engine-method-13 () none) ;; 13 ;; (add-all-spheres (_type_) none) - (nav-engine-method-14 () none) ;; 14 ;; (do-sphere-lookups (_type_) none) - (nav-engine-method-15 () none) ;; 15 ;; (update-nav-controls-pipelined-in-spr (_type_) none) - (nav-engine-method-16 () none) ;; 16 ;; (update-nav-controls-in-spr (_type_) none) - (nav-engine-method-17 () none) ;; 17 ;; (upload-nav-to-spr (_type_ nav-engine-spr-buffer) none) - (nav-engine-method-18 () none) ;; 18 ;; (download-nav-from-spr (_type_ nav-engine-spr-buffer) none) - (nav-engine-method-19 () none) ;; 19 ;; (do-callbacks (_type_ nav-engine-spr-buffer) none) - (nav-engine-method-20 () none) ;; 20 ;; (reloc-ptrs-to-spad (_type_ nav-engine-spr-buffer) none) - (nav-engine-method-21 () none) ;; 21 ;; (reloc-ptrs-to-mem (_type_ nav-engine-spr-buffer) none) + (inc-spr-addr! (_type_ uint) uint) ;; 9 + (lay-out-spad-memory (_type_ nav-mesh) none) ;; 10 + (set-up-mem-work (_type_) none) ;; 11 + (add-spheres-from-mesh-user-list (_type_ sphere-hash nav-mesh) none) ;; 12 + (add-all-spheres (_type_) none) ;; 13 + (do-sphere-lookups (_type_) none) ;; 14 + (update-nav-controls-pipelined-in-spr (_type_) none) ;; 15 + (update-nav-controls-in-spr (_type_) none) ;; 16 + (upload-nav-to-spr (_type_ nav-engine-spr-buffer) none) ;; 17 + (download-nav-from-spr (_type_ nav-engine-spr-buffer) none) ;; 18 + (do-callbacks (_type_ nav-engine-spr-buffer) none) ;; 19 + (reloc-ptrs-to-spad (_type_ nav-engine-spr-buffer) none) ;; 20 + (reloc-ptrs-to-mem (_type_ nav-engine-spr-buffer) none) ;; 21 ) ) -|# -;; (define-extern nav-dma-send-to-spr-no-flush function) ;; (function pointer pointer int none) -;; (define-extern nav-dma-send-from-spr-no-flush function) ;; (function pointer pointer int none) -;; (define-extern inc-mod3 function) ;; (function int int) -;; (define-extern nav-state-patch-pointers function) ;; (function nav-state int none) +(define-extern nav-dma-send-to-spr-no-flush (function pointer pointer int none)) +(define-extern nav-dma-send-from-spr-no-flush (function pointer pointer int none)) +(define-extern inc-mod3 (function int int)) +(define-extern nav-state-patch-pointers (function nav-state int none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; nav-mesh ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype nav-find-clear-spot-work (structure) - ((id-array UNKNOWN 16 :offset-assert 0) - (sphere-array UNKNOWN 16 :offset-assert 16) + ((id-array int8 16 :offset-assert 0) + (sphere-array sphere 16 :inline :offset-assert 16) ) :method-count-assert 9 :size-assert #x110 :flag-assert #x900000110 ) -|# -;; (define-extern *debug-nav-control-output* object) ;; symbol -;; (define-extern *debug-nav-control* object) ;; symbol -;; (define-extern *debug-nav-mesh-output* object) ;; symbol -;; (define-extern *debug-nav-ray* object) ;; nav-ray -;; (define-extern *debug-ray-offset* object) ;; vector -;; (define-extern *debug-offset* object) ;; vector -;; (define-extern *nav-mesh-work* object) ;; nav-mesh-work -;; (define-extern *default-nav-mesh* nav-mesh) ;; nav-mesh +(define-extern *debug-nav-control-output* symbol) +(define-extern *debug-nav-control* symbol) +(define-extern *debug-nav-mesh-output* symbol) +(define-extern *debug-nav-ray* nav-ray) +(define-extern *debug-ray-offset* vector) +(define-extern *debug-offset* vector) +(define-extern *nav-mesh-work* nav-mesh-work) +(define-extern *default-nav-mesh* nav-mesh) (define-extern nav-mesh-connect-from-ent (function process-drawable symbol)) -;; (define-extern connection-validate function) ;; (function connection none) -;; (define-extern connection-list-validate function) ;; (function (inline-array connection) symbol) -;; (define-extern nav-control-validate function) ;; (function process-drawable none) -;; (define-extern debug-validate-nav-poly function) ;; (function nav-mesh-link nav-poly none) -;; (define-extern vu-point-triangle-intersection? function) ;; (function vector vector vector vector symbol) -;; (define-extern poly-in-height-range? function) ;; (function nav-poly float float symbol) -;; (define-extern init-ray-local function) ;; (function nav-ray nav-poly vector vector none) -;; (define-extern init-ray-dir-local function) ;; (function nav-ray nav-poly vector vector float none) -;; (define-extern nav-ray-test function) ;; (function nav-mesh nav-poly vector vector meters) -;; (define-extern point-poly-distance-min function) ;; (function nav-mesh-work nav-poly float nav-poly float) -;; (define-extern nav-mesh-route-table-bit-index function) ;; (function nav-mesh uint int int) -;; (define-extern ray-ccw-line-segment-intersection? function) ;; (function vector vector vector vector symbol) -;; (define-extern ray-line-segment-intersection? function) ;; (function vector vector vector vector symbol) -;; (define-extern plane-height-at-xz-point function) ;; (function plane vector float) -;; (define-extern nav-normal-from-3-points function) ;; (function vector vector vector vector none) -;; (define-extern get-nav-mesh function) ;; (function actor-id nav-mesh) -;; (define-extern find-nearest-nav-mesh function) ;; (function vector float nav-mesh) -;; (define-extern point-to-poly-boundary function) ;; (function nav-poly vector vector float) +(define-extern connection-validate (function connection none)) +(define-extern connection-list-validate (function (inline-array connection) symbol)) +(define-extern nav-control-validate (function process-drawable none)) +(define-extern debug-validate-nav-poly (function nav-mesh-link nav-poly none)) +(define-extern vu-point-triangle-intersection? (function vector vector vector vector symbol)) +(define-extern poly-in-height-range? (function nav-poly float float symbol)) +(define-extern init-ray-local (function nav-ray nav-poly vector vector none)) +(define-extern init-ray-dir-local (function nav-ray nav-poly vector vector float none)) +(define-extern nav-ray-test (function nav-mesh nav-poly vector vector meters)) +(define-extern point-poly-distance-min (function nav-mesh-work nav-poly float nav-poly float)) +(define-extern nav-mesh-route-table-bit-index (function nav-mesh uint int int)) +(define-extern ray-ccw-line-segment-intersection? (function vector vector vector vector symbol)) +(define-extern ray-line-segment-intersection? (function vector vector vector vector symbol)) +(define-extern plane-height-at-xz-point (function plane vector float)) +(define-extern nav-normal-from-3-points (function vector vector vector vector none)) +(define-extern get-nav-mesh (function actor-id nav-mesh)) +(define-extern find-nearest-nav-mesh (function vector float nav-mesh)) +(define-extern point-to-poly-boundary (function nav-poly vector vector float)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; nav-control ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype nav-control-cfs-work (structure) ((in-dir vector :inline :offset-assert 0) (right-dir vector :inline :offset-assert 16) - (best-dir vector 2 :offset-assert 32) ;; guessed by decompiler - (temp-dir vector 2 :offset-assert 64) ;; guessed by decompiler + (best-dir vector 2 :inline :offset-assert 32) ;; guessed by decompiler + (temp-dir vector 2 :inline :offset-assert 64) ;; guessed by decompiler (away-dir vector :inline :offset-assert 96) (best-dir-angle degrees 2 :offset-assert 112) ;; guessed by decompiler (ignore-mask uint64 :offset-assert 120) @@ -37473,24 +37757,23 @@ :size-assert #xc0 :flag-assert #x9000000c0 ) -|# -;; (define-extern *nav-triangle-test-count* object) ;; int -;; (define-extern *nav-last-triangle-test-count* object) ;; int -;; (define-extern debug-nav-validate-current-poly function) ;; (function nav-mesh nav-poly vector symbol) -;; (define-extern debug-report-nav-stats function) ;; (function none) -;; (define-extern get-nav-control function) ;; (function process-drawable nav-mesh none) -;; (define-extern add-nav-sphere function) ;; (function nav-control sphere int none) -;; (define-extern add-collide-shape-spheres function) ;; (function nav-control collide-shape sphere none) -;; (define-extern circle-tangent-directions function) ;; (function vector vector vector vector vector) -;; (define-extern circle-ray-intersection? function) ;; (function vector vector float vector symbol) -;; (define-extern find-closest-circle-ray-intersection function) ;; (function vector vector float int (inline-array vector) int int) -;; (define-extern compute-dir-parm function) ;; (function vector vector vector float) -;; (define-extern vector-rotate-y-sincos! function) ;; (function vector vector float float float) -;; (define-extern test-xz-point-on-line-segment? function) ;; (function vector vector vector float symbol) -;; (define-extern *null-nav-callback-info* object) -;; (define-extern *default-nav-callback-info* object) -;; (define-extern *physics-nav-callback-info* object) +(define-extern *nav-triangle-test-count* int) +(define-extern *nav-last-triangle-test-count* int) +(define-extern debug-nav-validate-current-poly (function nav-mesh nav-poly vector symbol)) +(define-extern debug-report-nav-stats (function none)) +(define-extern get-nav-control (function process-drawable nav-mesh none)) +(define-extern add-nav-sphere (function nav-control sphere int none)) +(define-extern add-collide-shape-spheres (function nav-control collide-shape sphere none)) +(define-extern circle-tangent-directions (function vector vector vector vector vector)) +(define-extern circle-ray-intersection? (function vector vector float vector symbol)) +(define-extern find-closest-circle-ray-intersection (function vector vector float int (inline-array vector) int int)) +(define-extern compute-dir-parm (function vector vector vector float)) +(define-extern vector-rotate-y-sincos! (function vector vector float float float)) +(define-extern test-xz-point-on-line-segment? (function vector vector vector float symbol)) +(define-extern *null-nav-callback-info* nav-callback-info) +(define-extern *default-nav-callback-info* nav-callback-info) +(define-extern *physics-nav-callback-info* nav-callback-info) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; aligner ;; @@ -37501,9 +37784,9 @@ ;; effect-control ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *footstep-surface* object) ;; pat-surface +(define-extern *footstep-surface* pat-surface) (define-extern *debug-effect-control* symbol) -;; (define-extern sound-name-with-material function) ;; (function string pat-surface string sound-name) +(define-extern sound-name-with-material (function string pat-surface string sound-name)) (define-extern effect-param->sound-spec (function sound-spec (pointer float) int process-focusable sound-spec)) (define-extern target-land-effect (function none :behavior target)) @@ -37511,53 +37794,52 @@ ;; water-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *range-wsplash-color* curve-color-fast) -;; (define-extern *range-wsplash-alpha* curve2d-fast) -;; (define-extern *range-wsplash-scale-x* curve2d-fast) -;; (define-extern *range-wsplash-scale-y* curve2d-fast) -;; (define-extern *curve-wsplash-alpha* curve2d-fast) -;; (define-extern *curve-wsplash-scale-x* curve2d-fast) -;; (define-extern *curve-wsplash-scale-y* curve2d-fast) -;; (define-extern *part-water-splash-curve-settings* object) -;; (define-extern *range-splash-color* curve-color-fast) -;; (define-extern *range-splash-alpha* curve2d-fast) -;; (define-extern *range-splash-scale-x* curve2d-fast) -;; (define-extern *range-splash-scale-y* curve2d-fast) -;; (define-extern *curve-splash-alpha* curve2d-fast) -;; (define-extern *curve-splash-scale-x* curve2d-fast) -;; (define-extern *curve-splash-scale-y* curve2d-fast) -;; (define-extern *part-water-splash-center-curve-settings* object) -;; (define-extern *curve-wsplash-small-scale-x* curve2d-fast) -;; (define-extern *curve-wsplash-small-scale-y* curve2d-fast) -;; (define-extern *part-water-splash-small-curve-settings* object) +(define-extern *range-wsplash-color* curve-color-fast) +(define-extern *range-wsplash-alpha* curve2d-fast) +(define-extern *range-wsplash-scale-x* curve2d-fast) +(define-extern *range-wsplash-scale-y* curve2d-fast) +(define-extern *curve-wsplash-alpha* curve2d-fast) +(define-extern *curve-wsplash-scale-x* curve2d-fast) +(define-extern *curve-wsplash-scale-y* curve2d-fast) +(define-extern *part-water-splash-curve-settings* particle-curve-settings) +(define-extern *range-splash-color* curve-color-fast) +(define-extern *range-splash-alpha* curve2d-fast) +(define-extern *range-splash-scale-x* curve2d-fast) +(define-extern *range-splash-scale-y* curve2d-fast) +(define-extern *curve-splash-alpha* curve2d-fast) +(define-extern *curve-splash-scale-x* curve2d-fast) +(define-extern *curve-splash-scale-y* curve2d-fast) +(define-extern *part-water-splash-center-curve-settings* particle-curve-settings) +(define-extern *curve-wsplash-small-scale-x* curve2d-fast) +(define-extern *curve-wsplash-small-scale-y* curve2d-fast) +(define-extern *part-water-splash-small-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; water ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern check-water-level-drop function) ;; (function sparticle-system sparticle-cpuinfo vector none) -;; (define-extern check-water-level-drop-and-die function) ;; (function sparticle-system sparticle-cpuinfo vector none) -;; (define-extern check-water-level-drop-and-die-motion function) ;; (function sparticle-system sparticle-cpuinfo vector none) -;; (define-extern check-water-level-above-and-die function) ;; (function sparticle-system sparticle-cpuinfo vector none) -;; (define-extern check-water-level-drop-motion function) ;; (function sparticle-system sparticle-cpuinfo vector none) -;; (define-extern *water-simple-alpha-curve-in* object) -;; (define-extern *growing-curve* object) -;; (define-extern *water-simple-alpha-curve-fade-out* object) -;; (define-extern *color-curve-tan-brown* object) -;; (define-extern *water-wake-trail* object) -;; (define-extern part-water-splash-callback function) ;; (function part-tracker none) -;; (define-extern splash-spawn function) ;; (function float vector int none) -;; (define-extern rings-water-spawn function) ;; (function float vector vector float float none) -(define-extern water-info<-region (function water-info drawable-region-prim collide-shape collide-action water-info)) +(define-extern check-water-level-drop (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern check-water-level-drop-and-die (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern check-water-level-drop-and-die-motion (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern check-water-level-above-and-die (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern check-water-level-drop-motion (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern *water-simple-alpha-curve-in* curve2d-piecewise) +(define-extern *growing-curve* curve2d-piecewise) +(define-extern *water-simple-alpha-curve-fade-out* curve2d-piecewise) +(define-extern *color-curve-tan-brown* curve-color-piecewise) +(define-extern *water-wake-trail* light-trail-composition) +(define-extern part-water-splash-callback (function part-tracker none)) +(define-extern splash-spawn (function float vector int none)) +(define-extern rings-water-spawn (function float vector vector float float none)) +(define-extern water-info<-region (function water-info drawable-region-prim (inline-array water-sphere) collide-action process-drawable water-info)) (define-extern find-water-1 (function water-sphere water-info water-info symbol)) -(define-extern find-water-2 (function (inline-array water-sphere) int water-info water-info symbol)) +(define-extern find-water-2 (function (inline-array water-sphere) int water-info water-info process-drawable water-info)) (define-extern find-water-with-spheres (function (inline-array water-sphere) int water-info object)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; water-flow ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype flow-section (structure) ((start vector :inline :offset-assert 0) (trailing plane :inline :offset-assert 16) @@ -37569,19 +37851,15 @@ :size-assert #x44 :flag-assert #x900000044 ) -|# -#| (deftype flow-section-array (inline-array-class) - ((data flow-section :dynamic :offset-assert 16) ;; guessed by decompiler + ((data flow-section :dynamic :inline :offset-assert 16) ;; guessed by decompiler ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype flow-control (basic) ((path path-control :offset-assert 4) ;; guessed by decompiler (speed float :offset-assert 8) @@ -37594,20 +37872,18 @@ :size-assert #x40 :flag-assert #xe00000040 (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type process-drawable res-lump) _type_) - (flow-control-method-9 () none) ;; 9 ;; (draw-path (_type_) none) - (flow-control-method-10 () none) ;; 10 ;; (setup (_type_) none) - (flow-control-method-11 () none) ;; 11 ;; (push-process (_type_ process-focusable) none) - (flow-control-method-12 () none) ;; 12 ;; (find-and-push-things (_type_) none) - (flow-control-method-13 () none) ;; 13 + (new (symbol type process-drawable res-lump) _type_) ;; 0 + (draw-path (_type_) none) ;; 9 + (setup (_type_ (pointer float) int) none) ;; 10 + (push-process (_type_ process-focusable) none) ;; 11 + (find-and-push-things (_type_) none) ;; 12 + (flow-control-method-13 (_type_ water-info vector) symbol) ;; 13 ) ) -|# -#| (deftype water-flow (process) - ((root basic :offset-assert 128) - (flow basic :offset-assert 132) + ((root collide-shape :offset-assert 128) + (flow flow-control :offset-assert 132) ) :method-count-assert 15 :size-assert #x88 @@ -37616,9 +37892,8 @@ idle ;; 14 ) ) -|# -;; (define-extern ray-plane-equation-intersect function) ;; (function vector vector vector vector float) +(define-extern ray-plane-equation-intersect (function vector vector vector vector float)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; gem-pool ;; @@ -37864,7 +38139,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 @@ -37914,103 +38189,96 @@ ;; task-control ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype resetter-control (basic) - ((process uint64 :offset-assert 8) - (handle-init-hack basic :offset-assert 8) + ((process handle :offset-assert 8) + (handle-init-hack symbol :offset 8) ) :method-count-assert 13 :size-assert #x10 :flag-assert #xd00000010 (:methods - (resetter-control-method-9 () none) ;; 9 - (resetter-control-method-10 () none) ;; 10 - (resetter-control-method-11 () none) ;; 11 - (resetter-control-method-12 () none) ;; 12 + (check-reset (_type_) object) ;; 9 + (get-resetter (_type_) process) ;; 10 + (spawn-resetter! (_type_ resetter-params game-task-node-info) symbol) ;; 11 + (do-reset (_type_) object) ;; 12 ) ) -|# -#| (deftype resetter (process) ((params resetter-params :inline :offset-assert 128) - (message uint8 :offset-assert 128) - (flags uint16 :offset-assert 130) - (reset-delay uint32 :offset-assert 164) - (task uint8 :offset-assert 168) - (text-message uint32 :offset-assert 172) - (retry resetter-spec :inline :offset-assert 148) - (retry-continue basic :offset-assert 148) - (retry-node uint16 :offset-assert 152) - (retry-reset-mode basic :offset-assert 156) - (fail resetter-spec :inline :offset-assert 132) - (fail-continue basic :offset-assert 132) - (fail-node uint16 :offset-assert 136) - (fail-reset-mode basic :offset-assert 140) - (resetter-id uint32 :offset-assert 176) - (grabbed-player? basic :offset-assert 180) - (grabbed-time uint64 :offset-assert 184) - (dead-player? basic :offset-assert 192) - (retry? basic :offset-assert 196) - (message-id uint32 :offset-assert 200) + (message resetter-message :offset 128) + (flags resetter-flag :offset 130) + (reset-delay uint32 :offset 164 :decomp-as time-frame) + (task game-task :offset 168) + (text-message text-id :offset 172) + (retry resetter-spec :inline :offset 148) + (retry-continue continue-point :offset 148) + (retry-node game-task-node :offset 152) + (retry-reset-mode symbol :offset 156) + (fail resetter-spec :inline :offset 132) + (fail-continue continue-point :offset 132) + (fail-node game-task-node :offset 136) + (fail-reset-mode symbol :offset 140) + (resetter-id text-id :offset 176) + (grabbed-player? symbol :offset 180) + (grabbed-time time-frame :offset-assert 184) + (dead-player? symbol :offset-assert 192) + (retry? symbol :offset-assert 196) + (message-id text-id :offset-assert 200) (stinger uint32 :offset-assert 204) - (start-time uint64 :offset-assert 208) + (start-time time-frame :offset-assert 208) ) :method-count-assert 17 :size-assert #xd8 :flag-assert #x11006000d8 - (:methods - (resetter-method-16 () none) ;; 16 - ) (:state-methods - resetting ;; 15 idle ;; 14 + resetting ;; 15 + ) + (:methods + (resetter-method-16 (_type_) none) ;; 16 ) ) -|# -;; (define-extern *resetter-control* resetter-control) +(define-extern *resetter-control* resetter-control) (define-extern game-task-node->string (function game-task-node string)) -;; (define-extern reset-city-squad-control function) -;; (define-extern city-task-faction-commands function) -;; (define-extern evaluate-faction-commands function) +(define-extern reset-city-squad-control (function symbol none)) +(define-extern city-task-faction-commands (function object)) +(define-extern evaluate-faction-commands (function pair object)) (define-extern update-task-masks (function symbol int)) -;; (define-extern play-clean function) ;; (function symbol int) -;; (define-extern play-task function) ;; (function game-task symbol symbol string) -;; (define-extern restart-mission function) ;; (function int) -;; (define-extern fail-mission function) ;; type -;; (define-extern task-node-by-name function) ;; (function string game-task-node-info) +(define-extern play-clean (function symbol int)) +(define-extern play-task (function game-task symbol symbol string)) +(define-extern restart-mission (function int)) +(define-extern fail-mission (function none)) +(define-extern task-node-by-name (function string game-task-node-info)) (define-extern task-node-index-by-name (function string int)) (define-extern task-resolution-close! (function game-task symbol)) (define-extern task-close! (function string symbol)) -;; (define-extern task-closed? function) ;; (function string symbol) -;; (define-extern open-task-nodes function) ;; (function (array game-task-node-info) (array game-task-node-info)) +(define-extern task-closed? (function string symbol)) +(define-extern open-task-nodes (function (array game-task-node-info) (array game-task-node-info))) (define-extern task-node-closed? (function game-task-node symbol)) -;; (define-extern task-node-close! function) ;; (function game-task-node int) -;; (define-extern task-open? function) -;; (define-extern task-node-open? function) ;; (function game-task-node symbol) +(define-extern task-node-close! (function game-task-node symbol int)) +(define-extern task-open? (function string symbol)) +(define-extern task-node-open? (function game-task-node symbol)) (define-extern task-node-open! (function game-task-node symbol int)) -;; (define-extern task-node-close-upwards function) +(define-extern task-node-close-upwards (function (array game-task-node-info) int none)) (define-extern task-node-reset (function symbol int)) -;; (define-extern task-node-dump function) ;; (function symbol symbol) -;; (define-extern resetter-init-by-other function) -;; (define-extern task-manager-init-by-other function) ;; (function game-task-node-info symbol object :behavior task-manager) -;; (define-extern task-manager-event-handler function) ;; (function process int symbol event-message-block object :behavior task-manager) +(define-extern task-node-dump (function symbol symbol)) +(define-extern resetter-init-by-other (function resetter-params game-task-node-info object :behavior resetter)) +(define-extern task-manager-init-by-other (function game-task-node-info symbol object :behavior task-manager)) +(define-extern task-manager-event-handler (function process int symbol event-message-block object :behavior task-manager)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; scene ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype scene-stage (process-hidden) () :method-count-assert 15 :size-assert #x80 :flag-assert #xf00000080 ) -|# -#| (deftype subtitle-work (structure) ((draw-tmpl dma-gif-packet :inline :offset-assert 0) (color0 vector4w :inline :offset-assert 32) @@ -38020,34 +38288,33 @@ :size-assert #x40 :flag-assert #x900000040 ) -|# -;; (define-extern scene-decode-continue function) ;; (function basic continue-point) -;; (define-extern scene-lookup function) ;; (function basic scene) -;; (define-extern *subtitle-work* object) ;; subtitle-work -;; (define-extern draw-subtitle-image function) ;; (function subtitle-image font-context none) -;; (define-extern process-drawable-draw-subtitles function) ;; (function none :behavior process-drawable) -;; (define-extern scene-player-init function) ;; (function object symbol string none :behavior scene-player) +(define-extern scene-decode-continue (function basic continue-point)) +(define-extern scene-lookup (function basic scene)) +(define-extern *subtitle-work* subtitle-work) +(define-extern draw-subtitle-image (function subtitle-image font-context none)) +(define-extern process-drawable-draw-subtitles (function none :behavior process-drawable)) +(define-extern scene-player-init (function object symbol string none :behavior scene-player)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; pov-camera ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern pov-camera-play-and-reposition function) ;; (function art-joint-anim vector float none :behavior pov-camera) +(define-extern pov-camera-play-and-reposition (function art-joint-anim vector float none :behavior pov-camera)) (define-extern pov-camera-init-by-other (function vector skeleton-group string pov-camera-flag process-drawable pair none :behavior pov-camera)) -;; (define-extern othercam-calc function) ;; (function float float) +(define-extern othercam-calc (function float float)) (define-extern othercam-init-by-other (function pov-camera int symbol symbol none :behavior othercam)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; powerups ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern cloud-track function) ;; (function process-tree process-tree (function vector none) time-frame time-frame time-frame none :behavior process) +(define-extern cloud-track (function process-tree process-tree (function vector none) time-frame time-frame time-frame none :behavior process)) (define-extern eco-blue-glow (function vector none)) -;; (define-extern target-eco-process function) ;; (function none :behavior target) -;; (define-extern target-color-effect-process function) ;; (function none :behavior target) -(define-extern target-update-segs (function process-drawable none)) -;; (define-extern target-draw-process function) +(define-extern target-eco-process (function none :behavior target)) +(define-extern target-color-effect-process (function none :behavior target)) +(define-extern target-update-segs (function process-drawable float)) +(define-extern target-draw-process (function none :behavior target)) (define-extern target-powerup-process (function none :behavior target)) (define-extern target-powerup-effect (function symbol none :behavior target)) (define-extern process-contact-action (function process none :behavior target)) @@ -38146,7 +38413,6 @@ ;; hud ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype hud-sprite-work (structure) ((adgif-tmpl dma-gif-packet :inline :offset-assert 0) (sprite-tmpl dma-gif-packet :inline :offset-assert 32) @@ -38156,35 +38422,34 @@ (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 uint64 :offset-assert 256) ;; gs-rgbaq - (scan-colors vector4w 32 :offset-assert 272) ;; guessed by decompiler + (line-color gs-rgbaq :offset-assert 256) ;; gs-rgbaq + (scan-colors vector4w 32 :inline :offset-assert 272) ;; guessed by decompiler (scanline uint32 :offset-assert 784) ) :method-count-assert 9 :size-assert #x314 :flag-assert #x900000314 ) -|# -;; (define-extern *hud-sprite-work* object) ;; hud-sprite-work -;; (define-extern hud-create-icon function) ;; (function hud int int (pointer manipy)) -;; (define-extern hud-hidden-event-handler function) +(define-extern *hud-sprite-work* hud-sprite-work) +(define-extern hud-create-icon (function hud int int (pointer manipy))) +(define-extern hud-hidden-event-handler (function process int symbol event-message-block object :behavior hud)) (define-extern hud-init-by-other (function object :behavior hud)) (define-extern hide-hud (function symbol none)) -;; (define-extern enable-hud function) ;; (function none) -;; (define-extern hide-hud-quick function) ;; (function symbol none) +(define-extern enable-hud (function none)) +(define-extern hide-hud-quick (function symbol none)) (define-extern show-hud (function object none)) (define-extern ready-hud (function symbol int none)) -;; (define-extern hud-hidden? function) ;; (function symbol) -;; (define-extern set-hud-piece-position! function) ;; (function hud-sprite int int none) -;; (define-extern set-as-offset-from! function) ;; (function hud-sprite vector4w int int none) +(define-extern hud-hidden? (function symbol)) +(define-extern set-hud-piece-position! (function hud-sprite int int none)) +(define-extern set-as-offset-from! (function hud-sprite vector4w int int none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; hud-classes ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *hud-skullgem* object) ;; (pointer hud-skullgem) -;; (define-extern *gun-arrow-table* object) +(define-extern *hud-skullgem* (pointer hud-skullgem)) +(define-extern *gun-arrow-table* (inline-array hud-sprite)) (define-extern activate-hud (function target none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -38260,7 +38525,7 @@ (define-extern *hud-ring-graphic-remap* (array uint64)) (define-extern *hud-ring-kiosk-graphic-remap* (array uint64)) (define-extern *hud-ring-demo-graphic-remap* (array uint64)) -(define-extern *hud-ring-demo-shared-graphic-remap* array) +(define-extern *hud-ring-demo-shared-graphic-remap* (array uint64)) (define-extern *hud-select-scene-act1* (array hud-scene-info)) (define-extern *hud-select-scene-act2* (array hud-scene-info)) (define-extern *hud-select-scene-act3* (array hud-scene-info)) @@ -38272,9 +38537,9 @@ ;; progress ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype hud-ring-cell (process-drawable) - ((joint-idx int32 :offset-assert 200) + ((parent (pointer progress) :override) + (joint-idx int32 :offset-assert 200) (init-angle float :offset-assert 204) ;; degrees (graphic-index int32 :offset-assert 208) ) @@ -38282,52 +38547,51 @@ :size-assert #xd4 :flag-assert #x15006000d4 (:state-methods - idle ;; 20, old: (idle () _type_ :state) + idle ;; 20 ) ) -|# -;; (define-extern *progress-stack* object) ;; (pointer uint8) +(define-extern *progress-stack* (pointer uint8)) (define-extern *progress-process* (pointer progress)) -;; (define-extern *progress-save-info* object) ;; mc-slot-info +(define-extern *progress-save-info* mc-slot-info) (define-extern *progress-work* progress-work) -;; (define-extern min-max-wrap-around function) ;; (function int int int int) -;; (define-extern progress-intro-start function) ;; (function symbol int) -;; (define-extern hud-ring-cell-remap function) -;; (define-extern hud-ring-cell-init-by-other function) ;; (function int float int object :behavior hud-ring-cell) -;; (define-extern progress-init-by-other function) ;; (function symbol object :behavior progress) -;; (define-extern set-ring-position function) ;; (function progress float) +(define-extern min-max-wrap-around (function int int int 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)) +(define-extern set-ring-position (function progress float)) (define-extern activate-progress (function process symbol none)) -;; (define-extern deactivate-progress function) ;; (function none) -;; (define-extern hide-progress-screen function) ;; (function none) +(define-extern deactivate-progress (function none)) +(define-extern hide-progress-screen (function none)) (define-extern progress-allowed? (function symbol)) -;; (define-extern progress-trans function) ;; (function none :behavior progress) -;; (define-extern begin-scan function) ;; (function hud-box progress int) -;; (define-extern end-scan function) ;; (function hud-box float int) -;; (define-extern progress-post function) ;; (function none :behavior progress) +(define-extern progress-trans (function none :behavior progress)) +(define-extern begin-scan (function hud-box progress int)) +(define-extern end-scan (function hud-box float int)) +(define-extern progress-post (function none :behavior progress)) (define-extern *last-powerup-collect-amount* int) (define-extern spawn-secret-notify-message (function int none)) -;; (define-extern menu-secrets-notify-task-node-close function) +(define-extern menu-secrets-notify-task-node-close (function game-task-node none)) (define-extern menu-secrets-notify-powerup-collect (function int)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; progress-draw ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *progress-list-level* object) -;; (define-extern sort-task-node-result function) ;; (function int none) -;; (define-extern find-mission-text-at-index function) ;; (function int game-task-node-info) -;; (define-extern unlocked-secret-menu? function) ;; (function game-secrets symbol) -;; (define-extern memcard-unlocked-secrets? function) ;; (function symbol game-secrets) -;; (define-extern num-unlocked-secret? function) ;; (function game-secrets int) +(define-extern *progress-list-level* progress-list-level) +(define-extern sort-task-node-result (function int none)) +(define-extern find-mission-text-at-index (function progress int game-task-node-info)) +(define-extern unlocked-secret-menu? (function game-secrets symbol)) +(define-extern memcard-unlocked-secrets? (function object symbol game-secrets)) +(define-extern num-unlocked-secret? (function game-secrets int)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 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) @@ -38340,24 +38604,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 ;; @@ -38368,13 +38632,12 @@ ;; ocean-near ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern ocean-near-block object) ;; vu-function +(define-extern ocean-near-block vu-function) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; minimap ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype minimap-texture-name-array (structure) ((data string 35 :offset-assert 0) ;; guessed by decompiler ) @@ -38382,26 +38645,21 @@ :size-assert #x8c :flag-assert #x90000008c ) -|# -#| (deftype minimap-corner-array (structure) - ((data vector 35 :offset-assert 0) ;; guessed by decompiler + ((data vector 35 :inline :offset-assert 0) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x230 :flag-assert #x900000230 ) -|# - -;; engine-minimap is already defined! -;; (define-extern *minimap-texture-name-array* object) ;; minimap-texture-name-array -;; (define-extern *minimap-corner-array* object) ;; minimap-corner-array +(define-extern *minimap-texture-name-array* minimap-texture-name-array) +(define-extern *minimap-corner-array* minimap-corner-array) (define-extern *minimap* minimap) -;; (define-extern *minimap-class-list* object) ;; (inline-array minimap-class-node) -;; (define-extern lookup-minimap-texture-by-name function) ;; (function string string (pointer texture-page) texture) -;; (define-extern *minimap-table-entry-array* array) +(define-extern *minimap-class-list* (inline-array minimap-class-node)) +(define-extern lookup-minimap-texture-by-name (function string string (pointer texture-page) texture)) +(define-extern *minimap-table-entry-array* (array minimap-table-entry)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; bigmap ;; @@ -38429,7 +38687,6 @@ ;; glist-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype glst-node (structure) ((next glst-node :offset-assert 0) (prev glst-node :offset-assert 4) @@ -38438,9 +38695,7 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype glst-named-node (glst-node) ((privname string :offset-assert 8) ;; guessed by decompiler ) @@ -38448,54 +38703,51 @@ :size-assert #xc :flag-assert #x90000000c ) -|# -#| (deftype glst-list (structure) ((head glst-node :offset-assert 0) (tail glst-node :offset-assert 4) (tailpred glst-node :offset-assert 8) (numelem int32 :offset-assert 12) ) + :pack-me :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 ) -|# -;; (define-extern glst-next function) ;; (function glst-node glst-node) -;; (define-extern glst-prev function) ;; (function glst-node glst-node) -;; (define-extern glst-head function) ;; (function glst-list glst-node) -;; (define-extern glst-tail function) ;; (function glst-list glst-node) -;; (define-extern glst-end-of-list? function) ;; (function glst-node symbol) -;; (define-extern glst-start-of-list? function) ;; (function glst-node symbol) -;; (define-extern glst-empty? function) ;; (function glst-list symbol) -;; (define-extern glst-node-name function) ;; (function glst-named-node string) -;; (define-extern glst-set-name! function) ;; (function glst-named-node string string) +(define-extern glst-next (function glst-node glst-node)) +(define-extern glst-prev (function glst-node glst-node)) +(define-extern glst-head (function glst-list glst-node)) +(define-extern glst-tail (function glst-list glst-node)) +(define-extern glst-end-of-list? (function glst-node symbol)) +(define-extern glst-start-of-list? (function glst-node symbol)) +(define-extern glst-empty? (function glst-list symbol)) +(define-extern glst-node-name (function glst-named-node string)) +(define-extern glst-set-name! (function glst-named-node string string)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; glist ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern glst-num-elements function) ;; (function glst-list int) -;; (define-extern glst-remove function) ;; (function glst-list glst-node glst-node) -;; (define-extern glst-remove-tail function) ;; (function glst-list glst-node) -;; (define-extern glst-remove-head function) ;; (function glst-list glst-node) -;; (define-extern glst-insert-before function) ;; (function glst-list glst-node glst-node glst-node) -;; (define-extern glst-insert-after function) ;; (function glst-list glst-node glst-node glst-node) -;; (define-extern glst-add-tail function) ;; (function glst-list glst-node glst-node) -;; (define-extern glst-add-head function) ;; (function glst-list glst-node glst-node) -;; (define-extern glst-init-list! function) ;; (function glst-list glst-list) -;; (define-extern glst-find-node-by-name function) ;; (function glst-list string glst-node) -;; (define-extern glst-get-node-by-index function) ;; (function glst-list int glst-node) -;; (define-extern glst-length-of-longest-name function) ;; (function glst-list int) -;; (define-extern glst-get-node-index function) ;; (function glst-list glst-node int) +(define-extern glst-num-elements (function glst-list int)) +(define-extern glst-remove (function glst-list glst-node glst-node)) +(define-extern glst-remove-tail (function glst-list glst-node)) +(define-extern glst-remove-head (function glst-list glst-node)) +(define-extern glst-insert-before (function glst-list glst-node glst-node glst-node)) +(define-extern glst-insert-after (function glst-list glst-node glst-node glst-node)) +(define-extern glst-add-tail (function glst-list glst-node glst-node)) +(define-extern glst-add-head (function glst-list glst-node glst-node)) +(define-extern glst-init-list! (function glst-list glst-list)) +(define-extern glst-find-node-by-name (function glst-list string glst-node)) +(define-extern glst-get-node-by-index (function glst-list int glst-node)) +(define-extern glst-length-of-longest-name (function glst-list int)) +(define-extern glst-get-node-index (function glst-list glst-node int)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; anim-tester ;; +;; anim-tester ;;ä ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype list-control (structure) ((listfunc (function int list-control symbol) :offset-assert 0) ;; guessed by decompiler (list-owner uint32 :offset-assert 4) @@ -38518,13 +38770,12 @@ (user-info int32 :offset-assert 72) (return-int int32 :offset-assert 76) ) + :allow-misaligned :method-count-assert 9 :size-assert #x50 :flag-assert #x900000050 ) -|# -#| (deftype list-field (structure) ((left int32 :offset-assert 0) (width int32 :offset-assert 4) @@ -38533,9 +38784,7 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype DISP_LIST-bank (basic) ((V_SPACING int32 :offset-assert 4) (BORDER_WIDTH int32 :offset-assert 8) @@ -38553,9 +38802,7 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype anim-tester-bank (basic) ((ANIM_SPEED float :offset-assert 4) (BLEND float :offset-assert 8) @@ -38578,11 +38825,57 @@ :size-assert #x44 :flag-assert #x900000044 ) -|# -;; anim-tester is already defined! +(defenum anim-tester-flags + :bitfield #t + :type int32 + (fanimt0) + (fanimt1) + (fanimt2) + (fanimt3) + (fanimt4) + (fanimt5) + ) + +;; (defenum anim-tester-debug-flags +;; :bitfield #t +;; :type int32 +;; (unk0) +;; (unk1) +;; (unk2) +;; (unk3) +;; (at-show-joint-info) +;; (at-apply-align) +;; (unk6) +;; ) + +(deftype anim-tester (process-focusable) + ((flags anim-tester-flags :offset-assert 208) + ;; (debug-flags anim-tester-debug-flags :offset-assert 204) + (obj-list glst-list :inline :offset-assert 212) + (current-obj string :offset-assert 228) + (speed int32 :offset-assert 232) + (list-con list-control :inline :offset-assert 236) + (pick-con list-control :inline :offset-assert 316) + (item-field int64 :offset-assert 400) + (inc-delay int32 :offset-assert 408) + (inc-timer int32 :offset-assert 412) + (edit-mode int32 :offset-assert 416) + (old-mode int32 :offset-assert 420) + (anim-speed float :offset-assert 424) + (anim-gspeed float :offset-assert 428) + (anim-first float :offset-assert 432) + (anim-last float :offset-assert 436) + ) + :method-count-assert 28 + :size-assert #x1b8 + :heap-base #x140 + :flag-assert #x1c014001b8 + (:states + anim-tester-process + ) + ) -#| (deftype anim-test-obj (glst-named-node) ((obj-art-group basic :offset-assert 12) (seq-list glst-list :inline :offset-assert 16) @@ -38600,9 +38893,7 @@ :size-assert #x90 :flag-assert #x900000090 ) -|# -#| (deftype anim-test-sequence (glst-named-node) ((item-list glst-list :inline :offset-assert 12) (playing-item int32 :offset-assert 28) @@ -38614,9 +38905,7 @@ :size-assert #x78 :flag-assert #x900000078 ) -|# -#| (deftype anim-test-seq-item (glst-named-node) ((speed int32 :offset-assert 12) (blend int32 :offset-assert 16) @@ -38631,13 +38920,12 @@ :size-assert #x2c :flag-assert #x90000002c ) -|# ;; (define-extern *DISP_LIST-bank* DISP_LIST-bank) ;; (define-extern display-list-control function) ;; (define-extern *ANIM_TESTER-bank* anim-tester-bank) ;; (define-extern anim-tester-num-print function) -;; (define-extern *anim-tester* object) ;; (pointer anim-tester) +(define-extern *anim-tester* (pointer anim-tester)) ;; (define-extern anim-test-obj-init function) ;; (define-extern anim-test-sequence-init function) ;; (define-extern anim-test-seq-item-copy! function) @@ -38667,8 +38955,8 @@ ;; (define-extern anim-tester-save-all-objects function) ;; (define-extern anim-tester-add-newobj function) ;; (define-extern anim-tester-stop function) -;; (define-extern anim-tester-start function) ;; (function symbol) -;; (define-extern anim-tester-add-object function) ;; (function string none) +(define-extern anim-tester-start (function symbol)) +(define-extern anim-tester-add-object (function string none)) ;; (define-extern anim-tester-set-name function) ;; (define-extern anim-tester-add-sequence function) @@ -38703,7 +38991,6 @@ ;; part-tester ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype part-tester (process) ((root trsqv :offset-assert 128) ;; guessed by decompiler (part sparticle-launch-control :offset-assert 132) ;; guessed by decompiler @@ -38716,22 +39003,44 @@ part-tester-idle ;; associated process guessed by decompiler, old: (state part-tester) ) ) -|# -;; (define-extern *part-tester-name* object) ;; string -;; (define-extern part-tester-init-by-other function) ;; (function vector none :behavior process-drawable) -;; (define-extern *debug-part-dead-pool* object) ;; dead-pool -;; (define-extern start-part function) ;; (function none) +(define-extern *part-tester-name* string) +(define-extern part-tester-init-by-other (function vector none :behavior process-drawable)) +(define-extern *debug-part-dead-pool* dead-pool) +(define-extern start-part (function none)) +(define-extern *part-tester* (pointer part-tester)) +(define-extern part-tester-idle (state part-tester)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; manipulator ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++manipulator:manipulator-mode +(defenum manipulator-mode + :type uint32 + (mm0 0) + (mm1 1) + ) +;; ---manipulator:manipulator-mode + +;; +++manipulator:manipulator-action +(defenum manipulator-action + :type uint32 + (ma0 0) + (ma1 1) + (ma2 2) + (ma3 3) + (ma4 4) + (ma5 5) + (ma6 6) + (ma7 7) + ) +;; ---manipulator:manipulator-action + (deftype manipulator (structure) - ((action uint32 :offset-assert 0) - (mode uint32 :offset-assert 4) - (dragging? basic :offset-assert 8) + ((action manipulator-action :offset-assert 0) + (mode manipulator-mode :offset-assert 4) + (dragging? symbol :offset-assert 8) (position vector :inline :offset-assert 16) (speed vector :inline :offset-assert 32) (drag-ref-position vector :inline :offset-assert 48) @@ -38744,23 +39053,127 @@ :size-assert #xb0 :flag-assert #xf000000b0 (:methods - (manipulator-method-9 () none) ;; 9 - (manipulator-method-10 () none) ;; 10 - (manipulator-method-11 () none) ;; 11 - (manipulator-method-12 () none) ;; 12 - (manipulator-method-13 () none) ;; 13 - (manipulator-method-14 () none) ;; 14 + (set-mode (_type_ manipulator-mode) none) ;; 9 + (manipulator-method-10 (_type_) none) ;; 10 + (manipulator-method-11 (_type_) none) ;; 11 + (manipulator-method-12 (_type_ vector) none) ;; 12 + (manipulator-method-13 (_type_ vector vector) none) ;; 13 + (manipulator-method-14 (_type_) none) ;; 14 ) ) -|# -;; (define-extern draw-axis function) +(define-extern draw-axis (function vector vector float float rgba none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; editable-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++editable-h:editable-command +(defenum editable-command + :type uint32 + (none 0) + (exit 1) + (kill 2) + (select-one 3) + (select-add 4) + (select-remove 5) + (select-toggle 6) + (select-all 7) + (select-none 8) + (select-region 9) + (select-face 10) + (select-prim 11) + (select-current-owner 12) + (select-current-region 13) + (select-current-face 14) + (select-current-prim 15) + (pick-target 16) + (pick-loc 17) + (pick-yes-no 18) + (cancel 19) + (drag-none 20) + (drag-move 21) + (drag-scale 22) + (drag-rotate 23) + (drag-resize 24) + (camera-tumble 25) + (camera-xz 26) + (camera-xy 27) + (camera-rotate 28) + (camera-move 29) + (camera-zoom 30) + (insert-sphere 31) + (insert-point 32) + (insert-sample 33) + (insert-simple-camera 34) + (insert-light 35) + (insert-entity 36) + (insert-face 37) + (insert-plane 38) + (insert-box 39) + (insert-wall 40) + (delete 41) + (copy 42) + (resize 43) + (snap-to-ground 44) + (snap-xz 45) + (snap-y 46) + (snap-rotate 47) + (flip-side 48) + (region-set 49) + (region-new 50) + (edit-plane-set 51) + (edit-plane-clear 52) + (delete-region 53) + (copy-region 54) + (region-add 55) + (save 56) + (load 57) + (update-game 58) + (print-region-info 59) + (refresh-filter 60) + (rotate-level 61) + (translate-y-level 62) + (select-user0 63) + (select-user1 64) + (select-user2 65) + (select-user3 66) + (select-user4 67) + (select-user5 68) + (select-user6 69) + (select-user7 70) + (select-user8 71) + (select-user9 72) + (select-user10 73) + (select-user11 74) + (select-user12 75) + ) +;; ---editable-h:editable-command + +;; +++editable-h:editable-filter +(defenum editable-filter + :type uint32 + :bitfield #t + (none 0) + (unknown 1) + (sound 2) + (part 3) + (user-setting 4) + (cam-setting 5) + (load 6) + (water-command 7) + (camera 8) + (target 9) + (water 10) + (data 11) + (city_vis 12) + (sample 13) + (light 14) + (entity 15) + (selected 16) + ) +;; ---editable-h:editable-filter + (deftype editable-region (basic) ((changed symbol :offset-assert 4) ;; guessed by decompiler (locked symbol :offset-assert 8) ;; guessed by decompiler @@ -38777,16 +39190,33 @@ :flag-assert #xd00000030 ;; field on-enter uses ~A with a signed load. field on-inside uses ~A with a signed load. field on-exit uses ~A with a signed load. (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type) _type_) + (new (symbol type) _type_) ;; 0 (editable-region-method-9 () none) ;; 9 ;; (editable-region-method-9 (_type_ editable-array int int) symbol) (editable-region-method-10 () none) ;; 10 ;; (editable-region-method-10 (_type_ int) symbol) (editable-region-method-11 () none) ;; 11 ;; (editable-region-method-11 (_type_ vector int) none) (editable-region-method-12 () none) ;; 12 ;; (editable-region-method-12 (_type_) editable-filter) ) ) -|# -#| +;; +++editable-h:editable-flag +(defenum editable-flag + :type uint32 + :bitfield #t + (selected) + (no-save) + (orient) + (x) + (y) + (z) + (no-plane-snap) + (no-update) + (mark) + (top-set) + (bot-set) + (changed) + ) +;; ---editable-h:editable-flag + (deftype editable (basic) ((flags editable-flag :offset-assert 4) (name string :offset-assert 8) ;; guessed by decompiler @@ -38828,9 +39258,8 @@ (editable-method-35 () none) ;; 35 ) ) -|# -#| +(declare-type editable-plane editable) (deftype editable-array (basic) ((allocated-length int32 :offset-assert 4) (length int32 :offset-assert 8) @@ -38853,13 +39282,12 @@ (level uint32 :offset-assert 116) ;; guessed by decompiler (edit-param0 float :offset-assert 120) (data editable :dynamic :offset-assert 124) ;; guessed by decompiler - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. ) :method-count-assert 20 :size-assert #x7c :flag-assert #x140000007c (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type int) _type_) + (new (symbol type int) _type_) ;; 0 (editable-array-method-9 () none) ;; 9 ;; (editable-array-method-9 (_type_ editable-command mouse-info) symbol) (editable-array-method-10 () none) ;; 10 ;; (editable-array-method-10 (_type_ vector int) editable) (editable-array-method-11 () none) ;; 11 ;; (editable-array-method-11 (_type_) int) @@ -38873,137 +39301,104 @@ (editable-array-method-19 () none) ;; 19 ) ) -|# -#| (deftype editable-point (editable) - ((flags editable-flag :offset-assert 0) - (name string :offset-assert 4) ;; guessed by decompiler - (id uint32 :offset-assert 8) - (region editable-region :offset-assert 12) ;; guessed by decompiler - (owner pair :offset-assert 16) ;; guessed by decompiler - (prefix basic :offset-assert 20) - (radius meters :offset-assert 24) ;; float - (trans vector :inline :offset-assert 28) + ((radius meters :offset-assert 28) ;; float + (trans vector :inline :offset-assert 32) ) :method-count-assert 36 :size-assert #x30 :flag-assert #x2400000030 (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type vector editable-region) _type_) + (new (symbol type vector editable-region) _type_) ;; 0 ) ) -|# -#| (deftype editable-sphere (editable-point) () :method-count-assert 36 :size-assert #x30 :flag-assert #x2400000030 (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type vector float editable-region) _type_) + (new (symbol type vector float editable-region) _type_) ;; 0 ) ) -|# -#| (deftype editable-sample (editable-point) () :method-count-assert 36 :size-assert #x30 :flag-assert #x2400000030 ) -|# -#| (deftype editable-light (editable-sphere) - ((direction vector :inline :offset-assert 44) - (color vector :inline :offset-assert 60) - (decay-start float :offset-assert 76) - (ambient-point-ratio float :offset-assert 80) - (brightness float :offset-assert 84) - (shadow uint32 :offset-assert 44) - (shadows UNKNOWN 5 :offset-assert 88) - (shadow-ambi float :offset-assert 88) - (shadow-dir0 float :offset-assert 92) - (shadow-dir1 float :offset-assert 96) - (shadow-dir2 float :offset-assert 100) - (shadow-dir3 float :offset-assert 104) + ((direction vector :inline :offset-assert 48) + (color vector :inline :offset-assert 64) + (decay-start float :offset-assert 80) + (ambient-point-ratio float :offset-assert 84) + (brightness float :offset-assert 88) + (shadow uint32 :offset 48) + (shadows float 5 :offset-assert 92) + (shadow-ambi float :offset 92) + (shadow-dir0 float :offset 96) + (shadow-dir1 float :offset 100) + (shadow-dir2 float :offset 104) + (shadow-dir3 float :offset 108) ) :method-count-assert 36 :size-assert #x70 :flag-assert #x2400000070 (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type vector float editable-region) _type_) + (new (symbol type vector float editable-region) _type_) ;; 0 ) ) -|# -#| (deftype editable-entity (editable-point) - ((angles euler-angles :inline :offset-assert 44) - (idx int32 :offset-assert 60) + ((angles euler-angles :inline :offset-assert 48) + (idx int32 :offset-assert 64) ) :method-count-assert 37 :size-assert #x44 :flag-assert #x2500000044 (:methods + (new (symbol type vector float editable-region) _type_) ;; 0 (editable-entity-method-36 () none) ;; 36 ) ) -|# -#| (deftype editable-face (editable) - ((flags editable-flag :offset-assert 0) - (name string :offset-assert 4) ;; guessed by decompiler - (id uint32 :offset-assert 8) - (region editable-region :offset-assert 12) ;; guessed by decompiler - (owner pair :offset-assert 16) ;; guessed by decompiler - (prefix basic :offset-assert 20) - (length int32 :offset-assert 24) - (normal vector :inline :offset-assert 28) - (center vector :inline :offset-assert 44) - (vertex editable-point 6 :offset-assert 60) ;; guessed by decompiler - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. + ((length int32 :offset-assert 28) + (normal vector :inline :offset-assert 32) + (center vector :inline :offset-assert 48) + (vertex editable-point 6 :offset-assert 64) ;; guessed by decompiler ) :method-count-assert 38 :size-assert #x58 :flag-assert #x2600000058 (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type editable-region) _type_) + (new (symbol type editable-region) _type_) ;; 0 (editable-face-method-36 () none) ;; 36 (editable-face-method-37 () none) ;; 37 ) ) -|# -#| (deftype editable-plane (editable) - ((flags editable-flag :offset-assert 0) - (name string :offset-assert 4) ;; guessed by decompiler - (id uint32 :offset-assert 8) - (region editable-region :offset-assert 12) ;; guessed by decompiler - (owner pair :offset-assert 16) ;; guessed by decompiler - (prefix basic :offset-assert 20) - (length int32 :offset-assert 24) - (radius meters :offset-assert 28) ;; float - (vertex editable-point 2 :offset-assert 32) ;; guessed by decompiler - (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read. + ((length int32 :offset-assert 28) + (radius meters :offset-assert 32) ;; float + (vertex editable-point 2 :offset-assert 36) ;; guessed by decompiler ) :method-count-assert 38 :size-assert #x2c :flag-assert #x260000002c (:methods - (new (symbol type) _type_) ;; 0 ;; (new (symbol type editable-region) _type_) + (new (symbol type editable-region) _type_) ;; 0 (editable-plane-method-36 () none) ;; 36 (editable-plane-method-37 () none) ;; 37 ) ) -|# -#| +(declare-type editable-player process-drawable) +(declare-type editable-array basic) (deftype editable-player (process-drawable) ((current editable-array :offset-assert 200) ;; guessed by decompiler (current-command uint32 :offset-assert 204) @@ -39014,11 +39409,11 @@ (light-names basic :offset-assert 224) (external-cam-mode symbol :offset-assert 228) ;; guessed by decompiler (command editable-command 6 :offset-assert 232) ;; guessed by decompiler - (close-menu-time uint64 :offset-assert 256) ;; time-frame + (close-menu-time time-frame :offset-assert 256) ;; time-frame (mouse-pos vector :inline :offset-assert 272) (mouse-end vector :inline :offset-assert 288) (manipulator manipulator :inline :offset-assert 304) - (mouse-box UNKNOWN 2 :offset-assert 480) + (mouse-box vector 2 :inline :offset-assert 480) (mouse-hit vector :inline :offset-assert 512) (mouse-normal vector :inline :offset-assert 528) (float-variable float :offset-assert 544) @@ -39037,15 +39432,13 @@ (editable-player-method-23 () none) ;; 23 ) ) -|# -#| (deftype editable-work (basic) ((num-found int16 :offset-assert 4) (last-found int16 :offset-assert 6) (last-x float :offset-assert 8) (last-y float :offset-assert 12) - (hide basic :offset-assert 16) + (hide symbol :offset-assert 16) (found editable 256 :offset-assert 20) ;; guessed by decompiler (dists uint32 256 :offset-assert 1044) ;; guessed by decompiler ) @@ -39053,14 +39446,13 @@ :size-assert #x814 :flag-assert #x900000814 ) -|# -;; (define-extern *editable-temp-id* object) ;; int -;; (define-extern *editable-default-name* object) -;; (define-extern editable-command->string function) ;; (function editable-command string) -;; (define-extern editable-filter->string function) ;; (function editable-filter basic string) -;; (define-extern *editable-work* object) ;; editable-work -;; (define-extern *editable* object) ;; (pointer editable-player) +(define-extern *editable-temp-id* int) +(define-extern *editable-default-name* string) +(define-extern editable-command->string (function editable-command string)) +(define-extern editable-filter->string (function editable-filter basic string)) +(define-extern *editable-work* editable-work) +(define-extern *editable* (pointer editable-player)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; editable ;; @@ -39087,10 +39479,10 @@ ;; (define-extern get-light-value function) ;; (define-extern set-light-value function) ;; (define-extern keybd-set-time-of-day! function) -;; (define-extern editable-player-init function) ;; (function symbol none :behavior editable-player) +(define-extern editable-player-init (function symbol none :behavior editable-player)) ;; (define-extern set-editable-name function) ;; (define-extern select-editable-by-name function) -;; (define-extern *editable-menu-context* object) ;; debug-menu-context +(define-extern *editable-menu-context* debug-menu-context) ;; (define-extern editable-menu-command function) ;; (function int none) ;; (define-extern editable-menu-command-no-close function) ;; (function int none) ;; (define-extern dm-region-tree-pick-func function) ;; (function symbol debug-menu-msg symbol) @@ -39108,7 +39500,30 @@ ;; mysql-nav-graph ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++mysql-nav-graph:mysql-save-flag +(defenum mysql-save-flag + :type uint32 + :bitfield #t + (delete 1) + (update 2) + (insert 3) + ) +;; ---mysql-nav-graph:mysql-save-flag + +;; +++mysql-nav-graph:nav-node-flag +(defenum nav-node-flag + "This string value is stored in their SQL database" + :type uint32 + :bitfield #t + (visited 0) + (blocked 1) + (pedestrian 2) + (selected 3) + (hidden 4) + ) +;; ---mysql-nav-graph:nav-node-flag + +(declare-type mysql-nav-edge structure) (deftype mysql-nav-node (structure) ((mysql-save-flag mysql-save-flag :offset-assert 0) ;; guessed by decompiler (runtime-id uint32 :offset-assert 4) @@ -39135,9 +39550,7 @@ (mysql-nav-node-method-10 () none) ;; 10 ;; (temp-edge-size (_type_) int) ) ) -|# -#| (deftype mysql-nav-node-array (inline-array-class) ((data mysql-nav-node :dynamic :offset-assert 16) ;; guessed by decompiler ) @@ -39145,9 +39558,45 @@ :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| +;; +++mysql-nav-graph:nav-directionality +(defenum nav-directionality + :type uint32 + :bitfield #f + (default 0) + (directed 1) + (bi_directional 2) + ) +;; ---mysql-nav-graph:nav-directionality + +;; +++mysql-nav-graph:nav-clock-mask +(defenum nav-clock-mask + "This string value is stored in their SQL database" + :type uint32 + :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) + ) +;; ---mysql-nav-graph:nav-clock-mask + +;; +++mysql-nav-graph:nav-clock-type +(defenum nav-clock-type + "This string value is stored in their SQL database" + :type uint32 + :bitfield #f + (no-clock 0) + (clock2 1) + (clock3 2) + (clock4 3) + ) +;; ---mysql-nav-graph:nav-clock-type + (deftype mysql-nav-edge (structure) ((mysql-save-flag mysql-save-flag :offset-assert 0) ;; guessed by decompiler (runtime-id uint32 :offset-assert 4) @@ -39169,6 +39618,7 @@ (width float :offset-assert 68) (minimap_edge_flag int32 :offset-assert 72) ;; nav-minimap-edge-flag ) + :allow-misaligned :method-count-assert 10 :size-assert #x4c :flag-assert #xa0000004c @@ -39176,19 +39626,15 @@ (mysql-nav-edge-method-9 () none) ;; 9 ;; (exec-sql! (_type_) symbol) ) ) -|# -#| (deftype mysql-nav-edge-array (inline-array-class) - ((data mysql-nav-edge :dynamic :offset-assert 16) ;; guessed by decompiler + ((data mysql-nav-edge :dynamic :inline :offset-assert 16) ;; guessed by decompiler ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype mysql-nav-visnode (structure) ((mysql-save-flag mysql-save-flag :offset-assert 0) ;; guessed by decompiler (runtime-node-id int32 :offset-assert 4) @@ -39205,19 +39651,15 @@ (mysql-nav-visnode-method-9 () none) ;; 9 ;; (exec-sql! (_type_) symbol) ) ) -|# -#| (deftype mysql-nav-visnode-array (inline-array-class) - ((data mysql-nav-visnode :dynamic :offset-assert 16) ;; guessed by decompiler + ((data mysql-nav-visnode :dynamic :inline :offset-assert 16) ;; guessed by decompiler ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype mysql-nav-pov-conn (structure) ((runtime-node-id-1 int32 :offset-assert 0) (runtime-node-id-2 int32 :offset-assert 4) @@ -39226,9 +39668,7 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype mysql-nav-graph-level-info (structure) ((level symbol :offset-assert 0) ;; guessed by decompiler (level-id uint32 :offset-assert 4) @@ -39236,13 +39676,12 @@ (branch-count int32 :offset-assert 12) (to-link-count int32 :offset-assert 16) ) + :allow-misaligned :method-count-assert 9 :size-assert #x14 :flag-assert #x900000014 ) -|# -#| (deftype mysql-nav-graph (basic) ((nav_graph_id uint32 :offset-assert 4) (graph-type basic :offset-assert 8) @@ -39253,7 +39692,7 @@ (pov-conn-array-length int32 :offset-assert 28) (level-info-array-length int32 :offset-assert 32) (level-info-last-lookup int32 :offset-assert 36) - (level-info-array mysql-nav-graph-level-info 32 :offset-assert 40) ;; guessed by decompiler + (level-info-array mysql-nav-graph-level-info 32 :inline :offset-assert 40) ;; guessed by decompiler ) :method-count-assert 24 :size-assert #x428 @@ -39277,14 +39716,11 @@ (mysql-nav-graph-method-23 () none) ;; 23 ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; nav-graph-editor ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype nav-graph-command (structure) ((com-type uint32 :offset-assert 0) (id int32 :offset-assert 4) @@ -39295,19 +39731,15 @@ :size-assert #x20 :flag-assert #x900000020 ) -|# -#| (deftype nav-graph-command-array (inline-array-class) - ((data nav-graph-command :dynamic :offset-assert 16) ;; guessed by decompiler + ((data nav-graph-command :dynamic :inline :offset-assert 16) ;; guessed by decompiler ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype nav-graph-editor (process) ((nav-graph mysql-nav-graph :offset-assert 128) ;; guessed by decompiler (mode symbol :offset-assert 132) ;; guessed by decompiler @@ -39341,6 +39773,23 @@ :method-count-assert 68 :size-assert #x1cc :flag-assert #x44015001cc + (:state-methods + move-node ;; 14 + move-plane ;; 15 + create ;; 16 + edit-edge ;; 17 + create-edge ;; 18 + adjust-plane ;; 19 + adjust-it ;; 20 + adjust-minimap ;; 21 + adjust-node-angle ;; 22 + adjust-node-radius ;; 23 + adjust-edge-visibility ;; 24 + adjust-edge-width ;; 25 + adjust-edge-density ;; 26 + draw-closest-minimap ;; 27 + create-pov ;; 28 + ) (:methods (nav-graph-editor-method-29 () none) ;; 29 ;; (nav-graph-editor-method-29 (_type_ string string string) none) (nav-graph-editor-method-30 () none) ;; 30 ;; (nav-graph-editor-method-30 (_type_ int) symbol) @@ -39382,32 +39831,14 @@ (nav-graph-editor-method-66 () none) ;; 66 (nav-graph-editor-method-67 () none) ;; 67 ) - (:state-methods - create-pov ;; 28, old: (nav-graph-editor-method-28 (_type_) none) - create ;; 16, old: (create () _type_ :state) - move-node ;; 14, old: (move-node () _type_ :state) - draw-closest-minimap ;; 27, old: (draw-closest-minimap () _type_ :state) - adjust-plane ;; 19, old: (adjust-plane () _type_ :state) - move-plane ;; 15, old: (move-plane () _type_ :state) - create-edge ;; 18, old: (create-edge () _type_ :state) - edit-edge ;; 17, old: (edit-edge () _type_ :state) - adjust-edge-visibility ;; 24, old: (adjust-edge-visibility () _type_ :state) - adjust-node-angle ;; 22, old: (adjust-node-angle () _type_ :state) - adjust-node-radius ;; 23, old: (adjust-node-radius () _type_ :state) - adjust-edge-width ;; 25, old: (adjust-edge-width () _type_ :state) - adjust-edge-density ;; 26, old: (adjust-edge-density () _type_ :state) - adjust-it ;; 20, old: (adjust-it () _type_ :state) - adjust-minimap ;; 21, old: (adjust-minimap () _type_ :state) - ) ) -|# -;; (define-extern *nav-graph-editor* object) ;; (pointer nav-graph-editor) +(define-extern *nav-graph-editor* (pointer nav-graph-editor)) ;; (define-extern get-node-draw-position function) ;; (define-extern nav-graph-editor-init-by-other function) ;; (function string none :behavior nav-graph-editor) -;; (define-extern run-nav-graph-editor function) ;; (function symbol (pointer process)) -;; (define-extern get-nav-graph-editor function) ;; (function nav-graph-editor) -;; (define-extern exit-nav-graph-editor function) ;; (function none) +(define-extern run-nav-graph-editor (function symbol (pointer process))) +(define-extern get-nav-graph-editor (function nav-graph-editor)) +(define-extern exit-nav-graph-editor (function none)) ;; (define-extern nav-graph-set-level function) ;; (define-extern set-minimap-edge-flag function) ;; (function nav-minimap-edge-flag uint) ;; (define-extern set-vehicle-edit-mode function) ;; (function symbol none) @@ -39424,17 +39855,14 @@ ;; vector-array is already defined! -#| (deftype int16-array (inline-array-class) - ((data UNKNOWN :dynamic :offset-assert 16) + ((data int16 :dynamic :offset-assert 16) ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype nav-mesh-poly (structure) ((poly-id uint32 :offset-assert 0) (flags uint32 :offset-assert 4) @@ -39445,6 +39873,7 @@ :size-assert #x10 :flag-assert #xf00000010 (:methods + (new (symbol type) _type_) ;; 0 (nav-mesh-poly-method-9 () none) ;; 9 (nav-mesh-poly-method-10 () none) ;; 10 (nav-mesh-poly-method-11 () none) ;; 11 @@ -39453,50 +39882,42 @@ (nav-mesh-poly-method-14 () none) ;; 14 ) ) -|# -#| (deftype nav-mesh-poly-array (inline-array-class) - ((data UNKNOWN :dynamic :offset-assert 16) + ((data nav-mesh-poly :dynamic :inline :offset-assert 16) ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype nav-mesh-tri-quad (structure) - ((indices UNKNOWN 4 :offset-assert 0) + ((indices int32 4 :offset-assert 0) (poly uint32 :offset-assert 16) ) :method-count-assert 9 :size-assert #x14 :flag-assert #x900000014 ) -|# -#| (deftype nav-mesh-tri-quad-array (inline-array-class) - ((data UNKNOWN :dynamic :offset-assert 16) + ((data nav-mesh-tri-quad :dynamic :inline :offset-assert 16) ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype nav-mesh-editable (structure) ((flags uint32 :offset-assert 0) (verts basic :offset-assert 4) (tris basic :offset-assert 8) - (quads basic :offset-assert 12) + (quads nav-mesh-tri-quad-array :offset-assert 12) (navmesh-id uint32 :offset-assert 16) (idx uint32 :offset-assert 20) - (level-name basic :offset-assert 24) + (level-name symbol :offset-assert 24) (level-id uint32 :offset-assert 28) - (polys basic :offset-assert 32) + (polys nav-mesh-poly-array :offset-assert 32) (selected-poly uint32 :offset-assert 36) ) :method-count-assert 19 @@ -39515,19 +39936,15 @@ (nav-mesh-editable-method-18 () none) ;; 18 ) ) -|# -#| (deftype nav-mesh-editable-array (inline-array-class) - ((data UNKNOWN :dynamic :offset-assert 16) + ((data nav-mesh-editable :dynamic :inline :offset-assert 16) ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype nav-mesh-editor-undo (structure) ((current-nav-mesh nav-mesh-editable :offset-assert 0) (selected-poly uint32 :offset-assert 4) @@ -39539,22 +39956,19 @@ :size-assert #x14 :flag-assert #xa00000014 (:methods + (new (symbol type) _type_) ;; 0 (nav-mesh-editor-undo-method-9 () none) ;; 9 ) ) -|# -#| (deftype nav-mesh-editor-undo-array (inline-array-class) - ((data UNKNOWN :dynamic :offset-assert 16) + ((data nav-mesh-editor-undo :dynamic :inline :offset-assert 16) ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype nav-mesh-editor (process-drawable) ((close-menu-time uint64 :offset-assert 200) (external-cam-mode basic :offset-assert 208) @@ -39600,9 +40014,8 @@ (nav-mesh-editor-method-27 () none) ;; 27 ) ) -|# -;; (define-extern *nav-mesh-editor* object) +(define-extern *nav-mesh-editor* nav-mesh-editor) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; nav-mesh-editor ;; @@ -39642,37 +40055,35 @@ ;; (define-extern nav-mesh-editor-set-level function) ;; (define-extern nav-set-lev function) ;; (define-extern nav-set-flag function) -;; (define-extern nav-mesh-editor-init function) +(define-extern nav-mesh-editor-init (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; bug-report ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype bug-report (process) - ((bug-number UNKNOWN 5 :offset-assert 128) + ((bug-number uint32 5 :offset-assert 128) (digit uint32 :offset-assert 148) - (state-time uint64 :offset-assert 152) - (next-down uint64 :offset-assert 160) + (state-time time-frame :offset-assert 152) + (next-down time-frame :offset-assert 160) ) :method-count-assert 17 :size-assert #xa8 :flag-assert #x11003000a8 - (:methods - (bug-report-method-15 () none) ;; 15 - (bug-report-method-16 () none) ;; 16 - ) (:state-methods idle ;; 14 ) + (:methods + (bug-report-method-15 (_type_) none) ;; 15 + (bug-report-method-16 (_type_) none) ;; 16 + ) ) -|# -;; (define-extern *continue-bug-report* continue-point) -;; (define-extern *bug-report* object) -;; (define-extern bug-report-init function) -;; (define-extern bug-report-stop function) -;; (define-extern bug-report-start function) +(define-extern *continue-bug-report* continue-point) +(define-extern *bug-report* (pointer bug-report)) +(define-extern bug-report-init (function object :behavior bug-report)) +(define-extern bug-report-stop (function none)) +(define-extern bug-report-start (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sampler ;; @@ -39689,108 +40100,110 @@ ;; default-menu ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *debug-menu-context* object) ;; debug-menu-context -;; (define-extern *dm-cam-mode-interpolation* object) ;; int -;; (define-extern dm-cam-mode-func function) ;; (function (state camera-slave) debug-menu-msg object) -;; (define-extern dm-cam-mode-default function) ;; (function object debug-menu-msg symbol) -;; (define-extern dm-cam-settings-default function) ;; (function object debug-menu-msg symbol) -;; (define-extern dm-cam-settings-func function) ;; (function int debug-menu-msg symbol) -;; (define-extern dm-cam-settings-func-int function) ;; (function int debug-menu-msg int int int) -;; (define-extern dm-cam-externalize function) ;; (function symbol debug-menu-msg symbol) -;; (define-extern dm-cam-setting-float function) ;; (function float debug-menu-msg float float float) -;; (define-extern dm-cam-render-float function) ;; (function int debug-menu-msg float float float) -;; (define-extern dm-subdiv-float function) ;; (function symbol debug-menu-msg float float float) -;; (define-extern dm-subdiv-int function) ;; (function symbol debug-menu-msg int int int) -;; (define-extern dm-select-race-path function) ;; (function object debug-menu-msg int int) -;; (define-extern dm-setting-language function) ;; (function int debug-menu-msg symbol) -;; (define-extern dm-setting-subtitle-language function) ;; (function int debug-menu-msg symbol) -;; (define-extern dm-setting-audio-language function) -;; (define-extern dm-setting-stereo-mode function) ;; (function object debug-menu-msg symbol) -;; (define-extern dm-current-continue function) ;; (function string debug-menu-msg symbol) -;; (define-extern dm-subdiv-draw-func function) ;; (function int debug-menu-msg symbol) -;; (define-extern dm-scissor-subdiv-draw-func function) ;; (function int debug-menu-msg symbol) -;; (define-extern dm-foreground-subdiv-draw-func function) ;; (function int debug-menu-msg symbol) -;; (define-extern dm-col-rend-on-func function) ;; (function object debug-menu-msg symbol) -;; (define-extern dm-col-rend-outline-func function) ;; (function object debug-menu-msg symbol) -;; (define-extern dm-col-rend-back-face-func function) ;; (function object debug-menu-msg symbol) -;; (define-extern dm-col-rend-normals-func function) ;; (function object debug-menu-msg symbol) -;; (define-extern dm-col-rend-ghost-hidden-func function) ;; (function object debug-menu-msg symbol) -;; (define-extern dm-col-rend-track-func function) ;; (function int debug-menu-msg symbol) -;; (define-extern dm-col-rend-show-only-toggle-func function) ;; (function uint debug-menu-msg symbol) -;; (define-extern dm-col-rend-show-only-set-func function) ;; (function uint debug-menu-msg symbol) -;; (define-extern dm-col-rend-cspec-toggle function) ;; (function uint debug-menu-msg symbol) -;; (define-extern dm-col-rend-size function) ;; (function object debug-menu-msg float float) -;; (define-extern dm-col-rend-cam-dist function) ;; (function object debug-menu-msg float float) -;; (define-extern dm-ocean-height-func function) ;; (function ocean-height-hack debug-menu-msg symbol) -;; (define-extern dm-ocean-subdiv-draw-func function) ;; (function object debug-menu-msg symbol) -;; (define-extern dm-time-of-day-func function) ;; (function dm-time-of-day-setting debug-menu-msg symbol) -;; (define-extern dm-time-of-day-func2 function) ;; (function symbol debug-menu-msg object) -;; (define-extern dm-time-of-day-palette-func function) ;; (function dm-time-of-day-palette-settings debug-menu-msg symbol) -;; (define-extern dm-boolean-toggle-pick-func function) ;; (function symbol debug-menu-msg object) -;; (define-extern dm-time-of-day-pick-func function) ;; (function symbol debug-menu-msg symbol) -;; (define-extern dm-stats-memory-func function) ;; (function int debug-menu-msg symbol) -;; (define-extern dm-actor-marks-pick-func function) ;; (function symbol debug-menu-msg symbol) -;; (define-extern dm-debug-actor-lod-dist function) -;; (define-extern dm-select-race-pick-func function) ;; (function int debug-menu-msg symbol) -;; (define-extern dm-compact-actor-pick-func function) ;; (function symbol debug-menu-msg symbol) -;; (define-extern dm-actor-vis-pick-func function) ;; (function symbol debug-menu-msg symbol) -;; (define-extern dm-game-mode-pick-func function) ;; (function symbol debug-menu-msg symbol) -;; (define-extern dm-game-feature-toggle-pick-func function) ;; (function int debug-menu-msg symbol) -;; (define-extern dm-game-vehicle-toggle-pick-func function) -;; (define-extern dm-game-secret-toggle-pick-func function) ;; (function int debug-menu-msg symbol) -;; (define-extern display-scene-control-toggle-pick-func function) ;; (function int debug-menu-msg symbol) -;; (define-extern display-scene-control-set-pick-func function) ;; (function scene-controls debug-menu-msg symbol) -;; (define-extern display-bot-marks-toggle-pick-func function) ;; (function int debug-menu-msg symbol) -;; (define-extern display-bot-marks-set-pick-func function) ;; (function bot-marks-controls debug-menu-msg symbol) -;; (define-extern display-race-marks-toggle-pick-func function) ;; (function int debug-menu-msg symbol) -;; (define-extern display-race-marks-set-pick-func function) ;; (function race-marks-controls debug-menu-msg symbol) -;; (define-extern dm-vu1-user-toggle-pick-func function) ;; (function vu1-renderer-mask debug-menu-msg symbol) -;; (define-extern dm-vu1-user-all-pick-func function) ;; (function symbol debug-menu-msg symbol) -;; (define-extern dm-vu1-user-none-pick-func function) ;; (function symbol debug-menu-msg symbol) -;; (define-extern dm-texture-user-toggle-pick-func function) ;; (function int debug-menu-msg symbol) -;; (define-extern dm-texture-user-set-pick-func function) ;; (function int debug-menu-msg symbol) -;; (define-extern dm-strip-lines-toggle-pick-func function) ;; (function int debug-menu-msg symbol) -;; (define-extern dm-strip-lines-set-pick-func function) ;; (function strip-lines-controls debug-menu-msg symbol) -;; (define-extern dm-edit-instance-toggle-pick-func function) ;; (function int debug-menu-msg symbol) -;; (define-extern all-texture-tweak-adjust function) ;; (function texture-page-dir float none) -;; (define-extern dm-float-field-tie-rvanish-func function) ;; (function symbol debug-menu-msg float float float) -;; (define-extern dm-float-field-tie-vanish-far-func function) ;; (function symbol debug-menu-msg float float float) -;; (define-extern dm-bug-report-output-pick-func function) ;; (function symbol debug-menu-msg symbol) -;; (define-extern dm-bug-report-report-pick-func function) ;; (function symbol debug-menu-msg none) -;; (define-extern debug-menu-nodeknocked (_type_ penetrate) knocked-type) - (enemy-method-132 () none) ;; 132 ;; (dying (_type_) none) - (enemy-method-133 () none) ;; 133 ;; (enemy-method-133 (_type_) symbol) - (enemy-method-134 () none) ;; 134 ;; (get-attacker (_type_ process attack-info) process-focusable) - (enemy-method-135 () none) ;; 135 ;; (enemy-method-135 (_type_ int) sound-id) - (enemy-method-136 () none) ;; 136 ;; (enemy-method-136 (_type_) enemy-flag) - (enemy-method-137 () none) ;; 137 - (enemy-method-138 () none) ;; 138 - (enemy-method-139 () none) ;; 139 - (enemy-method-140 () none) ;; 140 - (enemy-method-141 () none) ;; 141 - (enemy-method-142 () none) ;; 142 - (enemy-method-143 () none) ;; 143 - (enemy-method-144 () none) ;; 144 - (enemy-method-145 () none) ;; 145 - (enemy-method-146 () none) ;; 146 - (enemy-method-147 () none) ;; 147 - (enemy-method-148 () none) ;; 148 - (enemy-method-149 () none) ;; 149 - (enemy-method-150 () none) ;; 150 - (enemy-method-151 () none) ;; 151 - (enemy-method-152 () none) ;; 152 - (enemy-method-153 () none) ;; 153 - (enemy-method-154 () none) ;; 154 + (:state-methods + dormant ;; 28 + dormant-aware ;; 29 + hit ;; 30 + knocked ;; 31 + knocked-recover ;; 32 + idle ;; 33 + active ;; 34 + notice ;; 35 + flee ;; 36 + stare ;; 37 + hostile ;; 38 + victory ;; 39 + die ;; 40 + die-falling ;; 41 + die-fast ;; 42 + directed ;; 43 + jump ;; 44 + jump-blocked ;; 45 + ambush-delay ;; 46 + ambush ;; 47 + view-anims ;; 48 + gun-dark-2-stretch ;; 49 + ) + (:methods + (enemy-method-50 (_type_ int) none) ;; 50 + (accelerate-fall! (_type_ vector) float) ;; 51 + (damage-enemy! (_type_ object event-message-block) float) ;; 52 + (reset-penetrate! (_type_) none) ;; 53 + (get-knockback-dir! (_type_ vector) vector) ;; 54 + (get-knockback-angle (_type_) degrees) ;; 55 + (knocked-handler (_type_ vector) object) ;; 56 + (can-collide-with-focus? (_type_ process-focusable) object) ;; 57 + (check-water (_type_) object) ;; 58 + (enemy-common-post (_type_) none) ;; 59 + (lerp-damage (_type_ float) float) ;; 60 + (scale-impact-vel-y! (_type_ vector vector float) vector) ;; 61 + (get-damage-from-attack (_type_ object event-message-block) float) ;; 62 + (enemy-method-63 (_type_ float) float) ;; 63 + (update-awareness! (_type_ process-focusable enemy-best-focus) enemy-aware) ;; 64 + (penetrate->next-state (_type_) symbol) ;; 65 + (get-penetrated-by (_type_) penetrate) ;; 66 + (coin-flip? (_type_) symbol) ;; 67 + (get-enemy-aware (_type_ enemy-aware) enemy-aware) ;; 68 + (enemy-method-69 (_type_) none) ;; 69 + (enemy-method-70 (_type_ process-focusable enemy-aware) none) ;; 70 + (go-dormant (_type_) object) ;; 71 + (go-dormant-aware (_type_) object) ;; 72 + (go-idle (_type_) object) ;; 73 + (go-ambush-delay (_type_) object) ;; 74 + (go-stare (_type_) object) ;; 75 + (go-stare2 (_type_) object) ;; 76 + (go-directed (_type_) object) ;; 77 + (go-hostile (_type_) object) ;; 78 + (go-flee (_type_) object) ;; 79 + (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) 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 + (enemy-method-88 (_type_ enemy-knocked-info) symbol) ;; 88 + (within-gspot-range? (_type_) symbol) ;; 89 + (enemy-method-90 (_type_ ragdoll-proc) none) ;; 90 + (enemy-method-91 (_type_ enemy-jump-info) object) ;; 91 + (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_ 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 + (jump-anim-handler (_type_ int enemy-jump-info) symbol) ;; 99 + (in-jump-handler (_type_ int enemy-jump-info) none) ;; 100 + (enemy-method-101 (_type_ int enemy-jump-info) none) ;; 101 + (go-directed2 (_type_) object) ;; 102 + (enemy-method-103 (_type_ vector float) symbol) ;; 103 + (enemy-method-104 (_type_ vector float) symbol) ;; 104 + (enemy-method-105 (_type_ float symbol) symbol) ;; 105 + (find-best-focus (_type_) process) ;; 106 + (is-pfoc-in-mesh? (_type_ process-focusable vector) symbol) ;; 107 + (enemy-method-108 (_type_ process-focusable) symbol) ;; 108 + (enemy-method-109 (_type_) symbol) ;; 109 + (send-attack (_type_ process touching-shapes-entry uint) symbol) ;; 110 + (on-attack (_type_ process-focusable) none) ;; 111 + (get-incoming-attack! (_type_ process-drawable event-message-block penetrate attack-info touching-shapes-entry) none) ;; 112 + (get-focus! (_type_) process-focusable) ;; 113 + (send-attack-to-all-tshapes (_type_ process-focusable event-message-block) int) ;; 114 + (set-look-at-mode! (_type_ int) none) ;; 115 + (stop-look-at! (_type_) none) ;; 116 + (apply-friction (_type_) none) ;; 117 + (init-enemy-info! (_type_ enemy-info) none) ;; 118 + (init-enemy-defaults! (_type_ enemy-info) none) ;; 119 + (init-enemy-collision! (_type_) none) ;; 120 + (init-enemy! (_type_) none) ;; 121 + (go-idle2 (_type_) object) ;; 122 + (enemy-method-123 (_type_) symbol) ;; 123 + (disable-ragdoll (_type_) none) ;; 124 + (ragdoll-settled? (_type_) object) ;; 125 + (ragdoll-spawn! (_type_ symbol symbol) vector) ;; 126 + (deactivate-ragdoll! (_type_) none) ;; 127 + (rnd-float (_type_) float) ;; 128 + (rnd-float-range (_type_ float float) float) ;; 129 + (rnd-int (_type_ int) int) ;; 130 + (enemy-method-131 (_type_ int int) int) ;; 131 + (set-reaction-time! (_type_ time-frame time-frame) time-frame) ;; 132 + (rnd-chance? (_type_ float) symbol) ;; 133 + (enemy-method-134 (_type_ float) symbol) ;; 134 + (enemy-method-135 (_type_) none) ;; 135 + (set-ground-pat! (_type_ collide-query collide-spec float float float process) pat-surface) ;; 136 + (enemy-above-ground? (_type_ collide-query vector collide-spec float float float) symbol) ;; 137 + (try-locate-ground (_type_ meters meters symbol collide-spec) symbol) ;; 138 + (move-above-ground! (_type_ vector move-above-ground-params) none) ;; 139 + (update-focus (_type_) process) ;; 140 + (enemy-method-141 (_type_ float) symbol) ;; 141 + (penetrate->knocked-type (_type_ penetrate) knocked-type) ;; 142 + (on-dying (_type_) none) ;; 143 + (falling? (_type_) symbol) ;; 144 + (find-offending-pfoc (_type_ process attack-info) process-focusable) ;; 145 + (play-damage-sound (_type_ int) sound-id) ;; 146 + (check-victory (_type_) none) ;; 147 + (go-gun-dark-2-stretch (_type_) object) ;; 148 + (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 + (get-gem-pool-idx (_type_) int) ;; 153 + (mark-as-dead (_type_) none) ;; 154 ) ) -|# -#| (deftype anim-info (structure) ((anim-index int32 :offset-assert 0) (travel-speed meters :offset-assert 4) @@ -40652,14 +41141,11 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; nav-enemy-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype nav-enemy-info (enemy-info) ((callback-info nav-callback-info :offset-assert 420) (use-momentum symbol :offset-assert 424) ;; guessed by decompiler @@ -40677,11 +41163,11 @@ (walk-travel-speed meters :offset-assert 472) (walk-acceleration meters :offset-assert 476) (walk-turning-acceleration meters :offset-assert 480) - (maximum-rotation-rate deg :offset-assert 484) ;; degrees + (maximum-rotation-rate degrees :offset-assert 484) ;; degrees (notice-nav-radius meters :offset-assert 488) (frustration-distance meters :offset-assert 492) - (frustration-time uint64 :offset-assert 496) ;; time-frame - (blocked-time uint64 :offset-assert 504) ;; time-frame + (frustration-time time-frame :offset-assert 496) ;; time-frame + (blocked-time time-frame :offset-assert 504) ;; time-frame (circle-dist-lo float :offset-assert 512) (circle-dist-hi float :offset-assert 516) (nav-mesh nav-mesh :offset-assert 520) ;; guessed by decompiler @@ -40690,67 +41176,66 @@ :size-assert #x20c :flag-assert #xb0000020c (:methods - (nav-enemy-info-method-10 () none) ;; 10 ;; (copy-nav-enemy-info! (_type_ nav-enemy-info) none) + (copy! (_type_ nav-enemy-info) none) ;; 10 ) ) -|# -#| (deftype nav-enemy (enemy) - ((frustration-point vector :inline :offset-assert 560) + ((enemy-info nav-enemy-info :override) + (frustration-point vector :inline :offset-assert 560) (move-dest vector :inline :offset-assert 576) - (frustration-time uint64 :offset-assert 592) ;; time-frame - (blocked-start-time uint64 :offset-assert 600) ;; time-frame - (restore-nav-radius-time uint64 :offset-assert 608) ;; time-frame + (frustration-time time-frame :offset-assert 592) ;; time-frame + (blocked-start-time time-frame :offset-assert 600) ;; time-frame + (restore-nav-radius-time time-frame :offset-assert 608) ;; time-frame (nav-radius-backup float :offset-assert 616) - (circle-radial-dist float :offset-assert 244) + (circle-radial-dist float :offset 244) ) :method-count-assert 190 :size-assert #x26c :flag-assert #xbe01f0026c - (:methods - (nav-enemy-method-155 () none) ;; 155 ;; (nav-enemy-method-155 (_type_) none) - (nav-enemy-method-156 () none) ;; 156 ;; (nav-enemy-method-156 (_type_) none) - (nav-enemy-method-157 () none) ;; 157 ;; (nav-enemy-method-157 (_type_ vector) nav-poly) - (nav-enemy-method-158 () none) ;; 158 ;; (nav-enemy-method-158 (_type_ vector) object) - (nav-enemy-method-159 () none) ;; 159 ;; (nav-enemy-method-159 (_type_ vector) symbol) - (nav-enemy-method-160 () none) ;; 160 ;; (nav-enemy-method-160 (_type_) none) - (nav-enemy-method-161 () none) ;; 161 ;; (nav-enemy-method-161 (_type_) none) - (nav-enemy-method-162 () none) ;; 162 ;; (nav-enemy-method-162 (_type_) none) - (nav-enemy-method-163 () none) ;; 163 ;; (nav-enemy-method-163 (_type_) symbol) - (nav-enemy-method-164 () none) ;; 164 ;; (nav-enemy-method-164 (_type_) none) - (nav-enemy-method-165 () none) ;; 165 ;; (nav-enemy-method-165 (_type_) none) - (nav-enemy-method-166 () none) ;; 166 ;; (nav-enemy-method-166 (_type_) none) - (nav-enemy-method-167 () none) ;; 167 ;; (nav-enemy-method-167 (_type_) none) - (nav-enemy-method-168 () none) ;; 168 ;; (nav-enemy-method-168 (_type_) float) - (nav-enemy-method-169 () none) ;; 169 ;; (nav-enemy-method-169 (_type_ float symbol) float) - (nav-enemy-method-170 () none) ;; 170 ;; (nav-enemy-method-170 (_type_) none) - (nav-enemy-method-171 () none) ;; 171 ;; (nav-enemy-method-171 (_type_) none) - (nav-enemy-method-172 () none) ;; 172 ;; (nav-enemy-method-172 (_type_) none) - (nav-enemy-method-173 () none) ;; 173 ;; (nav-enemy-method-173 (_type_) none) - (nav-enemy-method-174 () none) ;; 174 ;; (nav-enemy-method-174 (_type_) symbol) - (nav-enemy-method-175 () none) ;; 175 ;; (nav-enemy-method-175 (_type_) symbol) - (nav-enemy-method-176 () none) ;; 176 ;; (nav-enemy-method-176 (_type_) none) - (nav-enemy-method-177 () none) ;; 177 ;; (nav-enemy-method-177 (_type_) none) - (nav-enemy-method-178 () none) ;; 178 - (nav-enemy-method-179 () none) ;; 179 - (nav-enemy-method-180 () none) ;; 180 - (nav-enemy-method-181 () none) ;; 181 - (nav-enemy-method-182 () none) ;; 182 - (nav-enemy-method-183 () none) ;; 183 - (nav-enemy-method-184 () none) ;; 184 - (nav-enemy-method-185 () none) ;; 185 - (nav-enemy-method-186 () none) ;; 186 - (nav-enemy-method-187 () none) ;; 187 - (nav-enemy-method-188 () none) ;; 188 - (nav-enemy-method-189 () none) ;; 189 + (:state-methods + taunt ;; 155 + pacing ;; 156 + circling ;; 157 + stop-chase ;; 158 + debug-control ;; 159 + ) + (:methods + (normalize-heading! (_type_ nav-control) none) ;; 160 + (nav-enemy-method-161 (_type_ nav-control) none) ;; 161 + (nav-enemy-method-162 (_type_) none) ;; 162 + (nav-enemy-method-163 (_type_) none) ;; 163 + (nav-enemy-method-164 (_type_) none) ;; 164 + (nav-enemy-method-165 (_type_ vector vector) none) ;; 165 + (nav-enemy-method-166 (_type_ vector vector) vector) ;; 166 + (nav-enemy-method-167 (_type_) vector) ;; 167 + (nav-enemy-method-168 (_type_ vector) nav-poly) ;; 168 + (nav-enemy-method-169 (_type_ vector) object) ;; 169 + (is-notice-point-in-mesh? (_type_ vector) symbol) ;; 170 + (nav-enemy-method-171 (_type_) none) ;; 171 + (nav-enemy-method-172 (_type_) none) ;; 172 + (nav-enemy-method-173 (_type_) none) ;; 173 + (nav-enemy-method-174 (_type_) symbol) ;; 174 + (nav-enemy-method-175 (_type_) none) ;; 175 + (nav-enemy-method-176 (_type_) none) ;; 176 + (nav-enemy-method-177 (_type_) none) ;; 177 + (nav-enemy-method-178 (_type_) none) ;; 178 + (nav-enemy-method-179 (_type_) none) ;; 179 + (nav-enemy-method-180 (_type_ float float) none) ;; 180 + (nav-enemy-method-181 (_type_) none) ;; 181 + (nav-enemy-method-182 (_type_) none) ;; 182 + (nav-enemy-method-183 (_type_) none) ;; 183 + (nav-enemy-method-184 (_type_) none) ;; 184 + (nav-enemy-method-185 (_type_) symbol) ;; 185 + (nav-enemy-method-186 (_type_) symbol) ;; 186 + (nav-enemy-method-187 (_type_) none) ;; 187 + (nav-enemy-method-188 (_type_) none) ;; 188 + (copy-nav-state-vel! (_type_ vector) none) ;; 189 ) ) -|# -#| (deftype nav-enemy-debug-control-info (basic) - ((enable basic :offset-assert 4) + ((enable symbol :offset-assert 4) (steering float :offset-assert 8) (throttle float :offset-assert 12) ) @@ -40758,59 +41243,56 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; enemy ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *enemy-dummy-shadow-control* shadow-control) ;; shadow-control -;; (define-extern get-penetrate-using-from-attack-event function) ;; (function process-drawable event-message-block penetrate) -;; (define-extern enemy-setup-gem function) -;; (define-extern enemy-init-by-other function) ;; (function process-drawable enemy-init-by-other-params none :behavior enemy) -;; (define-extern enemy-event-handler function) ;; (function process int symbol event-message-block object :behavior enemy) -;; (define-extern enemy-simple-post function) ;; (function none :behavior enemy) -;; (define-extern enemy-falling-post function) ;; (function none :behavior enemy) -;; (define-extern enemy-die-falling-post function) ;; (function none :behavior enemy) -;; (define-extern *shockwave-knock-scalar* curve2d-fast) -;; (define-extern ja-group-index? function) ;; (function int symbol :behavior enemy) +(define-extern *enemy-dummy-shadow-control* shadow-control) +(define-extern get-penetrate-using-from-attack-event (function process-drawable event-message-block penetrate)) +(define-extern enemy-setup-gem (function object :behavior enemy)) +(define-extern enemy-init-by-other (function process-drawable enemy-init-by-other-params object :behavior enemy)) +(define-extern enemy-event-handler (function process int symbol event-message-block object :behavior enemy)) +(define-extern enemy-simple-post (function none :behavior enemy)) +(define-extern enemy-falling-post (function none :behavior enemy)) +(define-extern enemy-die-falling-post (function none :behavior enemy)) +(define-extern *shockwave-knock-scalar* curve2d-fast) +(define-extern ja-group-index? (function int symbol :behavior enemy)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; enemy-states ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern gun-dark-2-anim-code function) -;; (define-extern gun-dark-2-ragdoll-start function) +(define-extern gun-dark-2-anim-code (function object :behavior enemy)) +(define-extern gun-dark-2-ragdoll-start (function enemy object)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; nav-enemy ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *nav-enemy-dummy-shadow-control* shadow-control) ;; shadow-control -;; (define-extern nav-enemy-simple-post function) ;; (function none :behavior nav-enemy) -;; (define-extern nav-enemy-die-falling-post function) ;; (function none :behavior nav-enemy) -;; (define-extern nav-enemy-travel-post function) ;; (function none :behavior nav-enemy) -;; (define-extern nav-enemy-patrol-post function) ;; (function none :behavior nav-enemy) -;; (define-extern nav-enemy-chase-post function) ;; (function none :behavior nav-enemy) -;; (define-extern nav-enemy-flee-post function) ;; (function none :behavior nav-enemy) -;; (define-extern nav-enemy-face-focus-post function) ;; (function none :behavior nav-enemy) -;; (define-extern nav-enemy-stare-post function) ;; (function none :behavior nav-enemy) -;; (define-extern nav-enemy-falling-post function) ;; (function none :behavior nav-enemy) -;; (define-extern nav-enemy-turn-to-face-dir function) ;; (function vector float none :behavior nav-enemy) -;; (define-extern nav-enemy-turn-to-face-point function) ;; (function vector float none :behavior nav-enemy) -;; (define-extern *nav-enemy-debug-control-info* nav-enemy-debug-control-info) ;; nav-enemy-debug-control-info -;; (define-extern nav-enemy-debug-control-post function) ;; (function none :behavior nav-enemy) +(define-extern *nav-enemy-dummy-shadow-control* shadow-control) +(define-extern nav-enemy-simple-post (function none :behavior nav-enemy)) +(define-extern nav-enemy-die-falling-post (function none :behavior nav-enemy)) +(define-extern nav-enemy-travel-post (function none :behavior nav-enemy)) +(define-extern nav-enemy-patrol-post (function none :behavior nav-enemy)) +(define-extern nav-enemy-chase-post (function none :behavior nav-enemy)) +(define-extern nav-enemy-flee-post (function none :behavior nav-enemy)) +(define-extern nav-enemy-face-focus-post (function none :behavior nav-enemy)) +(define-extern nav-enemy-stare-post (function none :behavior nav-enemy)) +(define-extern nav-enemy-falling-post (function none :behavior nav-enemy)) +(define-extern nav-enemy-turn-to-face-dir (function vector float none :behavior nav-enemy)) +(define-extern nav-enemy-turn-to-face-point (function vector float none :behavior nav-enemy)) +(define-extern *nav-enemy-debug-control-info* nav-enemy-debug-control-info) +(define-extern nav-enemy-debug-control-post (function none :behavior nav-enemy)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; base-plat ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype base-plat (process-focusable) ((smush smush-control :inline :offset-assert 208) (basetrans vector :inline :offset-assert 240) - (bounce-time uint64 :offset-assert 256) ;; time-frame + (bounce-time time-frame :offset-assert 256) ;; time-frame (bouncing symbol :offset-assert 264) ;; guessed by decompiler (bounce-scale meters :offset-assert 268) ) @@ -40818,27 +41300,37 @@ :size-assert #x110 :flag-assert #x2300900110 (:methods - (base-plat-method-28 () none) ;; 28 ;; (stop-bouncing! (_type_) none) - (base-plat-method-29 () none) ;; 29 ;; (start-bouncing! (_type_) none) - (base-plat-method-30 () none) ;; 30 ;; (get-art-group (_type_) art-group) - (base-plat-method-31 () none) ;; 31 ;; (init-plat-collision! (_type_) none) - (base-plat-method-32 () none) ;; 32 ;; (base-plat-method-32 (_type_) none) - (base-plat-method-33 () none) ;; 33 ;; (init-plat! (_type_) none) - (base-plat-method-34 () none) ;; 34 + (update-part-and-sfx! (_type_) none) ;; 28 ;; (stop-bouncing! (_type_) none) + (init-bounce-params! (_type_) none) ;; 29 + (start-bounce! (_type_) none :behavior base-plat) ;; 30 ;; (get-art-group (_type_) art-group) + (get-art-group (_type_) art-group) ;; 31 + (init-collision! (_type_) none) ;; 32 + (base-plat-method-33 (_type_) none) ;; 33 ;; (init-plat! (_type_) none) + (base-plat-method-34 (_type_) none) ;; 34 ) ) -|# -#| +;; +++base-plat:eco-door-flags +(defenum eco-door-flags + :type int32 + :bitfield #t + (locked 0) + (unlocked 1) + (auto-close 2) + (one-way 3) + ) +;; ---base-plat:eco-door-flags + (deftype eco-door (process-drawable) - ((speed float :offset-assert 200) + ((root collide-shape :override) + (speed float :offset-assert 200) (open-distance float :offset-assert 204) (close-distance float :offset-assert 208) (out-dir vector :inline :offset-assert 224) - (open-sound uint128 :offset-assert 240) ;; sound-name - (close-sound uint128 :offset-assert 256) ;; sound-name + (open-sound sound-name :offset-assert 240) ;; sound-name + (close-sound sound-name :offset-assert 256) ;; sound-name (state-actor entity-actor :offset-assert 272) ;; guessed by decompiler - (flags int32 :offset-assert 276) ;; eco-door-flags + (flags eco-door-flags :offset-assert 276) ;; eco-door-flags (locked symbol :offset-assert 280) ;; guessed by decompiler (auto-close symbol :offset-assert 284) ;; guessed by decompiler (one-way symbol :offset-assert 288) ;; guessed by decompiler @@ -40846,31 +41338,29 @@ :method-count-assert 27 :size-assert #x124 :flag-assert #x1b00b00124 - (:methods - (eco-door-method-24 () none) ;; 24 ;; (lock-according-to-task! (_type_) none) - (eco-door-method-25 () none) ;; 25 ;; (eco-door-method-25 (_type_) none) - (eco-door-method-26 () none) ;; 26 ;; (stub (_type_) none) - ) (:state-methods - door-closing ;; 23, old: (door-closing () _type_ :state) - door-open ;; 22, old: (door-open () _type_ :state) - door-opening ;; 21, old: (door-opening () _type_ :state) - door-closed ;; 20, old: (door-closed () _type_ :state) + door-closed ;; 20 + door-opening ;; 21 + door-open ;; 22 + door-closing ;; 23 + ) + (:methods + (update-lock-status! (_type_) none) ;; 24 + (init-collision! (_type_) none) ;; 25 + (eco-door-method-26 (_type_) none) ;; 26 ;; (stub (_type_) none) ) ) -|# -;; (define-extern plat-code function) ;; (function none :behavior base-plat) -;; (define-extern plat-trans function) ;; (function none :behavior base-plat) -;; (define-extern plat-post function) ;; (function none :behavior base-plat) -;; (define-extern plat-event function) ;; (function process int symbol event-message-block object :behavior base-plat) -;; (define-extern eco-door-event-handler function) ;; (function process int symbol event-message-block object :behavior eco-door) +(define-extern plat-code (function none :behavior base-plat)) +(define-extern plat-trans (function none :behavior base-plat)) +(define-extern plat-post (function none :behavior base-plat)) +(define-extern plat-event (function process int symbol event-message-block object :behavior base-plat)) +(define-extern eco-door-event-handler (function process int symbol event-message-block object :behavior eco-door)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; plat ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype plat (base-plat) ((path-pos float :offset-assert 272) (sound-id sound-id :offset-assert 276) ;; guessed by decompiler @@ -40879,83 +41369,92 @@ :method-count-assert 38 :size-assert #x144 :flag-assert #x2600d00144 - (:methods - (plat-method-37 () none) ;; 37 - ) (:state-methods - plat-path-active ;; 36, old: (plat-path-sync (_type_) object) - plat-idle ;; 35, old: (plat-path-active () _type_ :state) + plat-idle ;; 35 + plat-path-active ;; 36 + ) + (:methods + (go-initial-state (_type_) object) ;; 37 ) ) -|# -#| (deftype drop-plat (base-plat) ((art-name string :offset-assert 272) ;; guessed by decompiler (anim spool-anim :offset-assert 276) ;; guessed by decompiler (break-anim-name string :offset-assert 280) ;; guessed by decompiler - (safe-time uint64 :offset-assert 288) ;; time-frame + (safe-time time-frame :offset-assert 288) ;; time-frame (hit-point vector :inline :offset-assert 304) ) :method-count-assert 37 :size-assert #x140 :flag-assert #x2500c00140 (:state-methods - fall ;; 36 - idle ;; 35, old: (fall (symbol) _type_ :state) + idle ;; 35 + (fall symbol) ;; 36 ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; bouncer ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype bouncer (process-drawable) - ((spring-height meters :offset-assert 200) + ((root collide-shape :override) + (spring-height meters :offset-assert 200) (smush float :offset-assert 204) (mods basic :offset-assert 208) - (use-alternate-jump? basic :offset-assert 212) + (use-alternate-jump? symbol :offset-assert 212) ) :method-count-assert 27 :size-assert #xd8 :flag-assert #x1b006000d8 - (:methods - (bouncer-method-23 () none) ;; 23 ;; (init-skeleton! (_type_) none) - (bouncer-method-24 () none) ;; 24 ;; (bouncer-method-24 (_type_) none) - (bouncer-method-25 () none) ;; 25 - (bouncer-method-26 () none) ;; 26 - ) (:state-methods - fire ;; 21, old: (fire () _type_ :state) - smush ;; 22, old: (smush () _type_ :state) - idle ;; 20, old: (idle () _type_ :state) + idle ;; 20 + fire ;; 21 + smush ;; 22 + ) + (:methods + (bouncer-method-23 (_type_) none) ;; 23 ;; (init-skeleton! (_type_) none) + (bouncer-method-24 (_type_) none) ;; 24 ;; (bouncer-method-24 (_type_) none) + (play-sound (_type_) none) ;; 25 + (bouncer-method-26 (_type_) none) ;; 26 ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; elevator ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++elevator:elevator-flags +(defenum elevator-flags + :type uint64 + :bitfield #t + (running 0) + (ef1 1) + (waiting 2) + (ef3 3) + (teleport 4) + (prevent-jump 5) + (arrived 6) + (ef7 7) + (fence 8) + (grab 9) + (dormant 10) + ) +;; ---elevator:elevator-flags + (deftype elevator-params (structure) ((xz-threshold float :offset-assert 0) (y-threshold float :offset-assert 4) (start-pos float :offset-assert 8) (move-rate float :offset-assert 12) - (flags uint64 :offset-assert 16) ;; elevator-flags + (flags elevator-flags :offset-assert 16) ;; elevator-flags ) :method-count-assert 9 :size-assert #x18 :flag-assert #x900000018 ) -|# -#| (deftype path-step (structure) ((next-pos float :offset-assert 0) (dist float :offset-assert 4) @@ -40964,19 +41463,25 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype path-step-inline-array (inline-array-class) - ((data path-step :dynamic :offset-assert 16) ;; guessed by decompiler + ((data path-step :dynamic :inline :offset-assert 16) ;; guessed by decompiler ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| +;; +++elevator:elevator-status +(defenum elevator-status + :type uint64 + :bitfield #t + (waiting-to-descend) + (waiting-to-ascend) + (moving) + ) +;; ---elevator:elevator-status + (deftype elevator (base-plat) ((params elevator-params :inline :offset-assert 272) (path-seq path-step-inline-array :offset-assert 296) ;; guessed by decompiler @@ -40986,62 +41491,60 @@ (move-dist float :offset-assert 320) (path-pos float :offset-assert 324) (path-eased-pos float :offset-assert 328) - (ride-timer uint64 :offset-assert 336) ;; time-frame - (sticky-player-last-ride-time uint64 :offset-assert 344) ;; time-frame - (elevator-status uint64 :offset-assert 352) ;; elevator-status + (ride-timer time-frame :offset-assert 336) ;; time-frame + (sticky-player-last-ride-time time-frame :offset-assert 344) ;; time-frame + (elevator-status elevator-status :offset-assert 352) ;; elevator-status (on-activate pair :offset-assert 360) ;; guessed by decompiler (on-deactivate pair :offset-assert 364) ;; guessed by decompiler - (on-up basic :offset-assert 368) - (on-down basic :offset-assert 372) - (on-running basic :offset-assert 376) - (on-notice basic :offset-assert 380) - (on-wait basic :offset-assert 384) - (sound-id uint32 :offset-assert 388) - (sound-running-loop basic :offset-assert 392) - (sound-arrived basic :offset-assert 396) + (on-up pair :offset-assert 368) + (on-down pair :offset-assert 372) + (on-running pair :offset-assert 376) + (on-notice pair :offset-assert 380) + (on-wait pair :offset-assert 384) + (sound-id sound-id :offset-assert 388) + (sound-running-loop sound-spec :offset-assert 392) + (sound-arrived sound-spec :offset-assert 396) (fence-prim-index uint32 :offset-assert 400) (speed float :offset-assert 404) - (sound-start basic :offset-assert 408) - (activate-test basic :offset-assert 412) + (sound-start sound-spec :offset-assert 408) + (activate-test pair :offset-assert 412) ) :method-count-assert 52 :size-assert #x1a0 :flag-assert #x34012001a0 ;; field on-activate uses ~A with a signed load. field on-deactivate uses ~A with a signed load. field on-up uses ~A with a signed load. field on-down uses ~A with a signed load. field on-running uses ~A with a signed load. field on-notice uses ~A with a signed load. field on-wait uses ~A with a signed load. field activate-test uses ~A with a signed load. - (:methods - (elevator-method-39 () none) ;; 39 ;; (calc-dist-between-points! (_type_ int int) none) - (elevator-method-41 () none) ;; 41 ;; (init-defaults! (_type_) none) - (elevator-method-42 () none) ;; 42 ;; (set-ambient-sound! (_type_) none) - (elevator-method-43 () none) ;; 43 ;; (move-between-points (_type_ vector float float) symbol) - (elevator-method-44 () none) ;; 44 ;; (elevator-method-44 (_type_) symbol) - (elevator-method-45 () none) ;; 45 ;; (commited-to-ride? (_type_) symbol) - (elevator-method-46 () none) ;; 46 ;; (move-to-next-point! (_type_) none) - (elevator-method-47 () none) ;; 47 ;; (find-closest-point-in-path! (_type_ vector (pointer float) symbol symbol) symbol) - (elevator-method-48 () none) ;; 48 ;; (elevator-method-48 (_type_) none) - (elevator-method-49 () none) ;; 49 - (elevator-method-50 () none) ;; 50 - (elevator-method-51 () none) ;; 51 - ) (:state-methods - die ;; 40, old: (activate-elevator (_type_) object) - arrived ;; 38, old: (elevator-method-38 (_type_) none) - running ;; 37, old: (arrived () _type_ :state) - waiting ;; 36, old: (running () _type_ :state) - dormant ;; 35, old: (waiting () _type_ :state) + dormant ;; 35 + waiting ;; 36 + running ;; 37 + arrived ;; 38 + unknown ;; 39, method not defined! + die ;; 40 + ) + (:methods + (calc-dist-between-points! (_type_ int int) none) ;; 41 ;; (init-defaults! (_type_) none) + (go-arrived-or-waiting (_type_) none) ;; 42 ;; (set-ambient-sound! (_type_) none) + (init-params! (_type_) none) ;; 43 ;; (move-between-points (_type_ vector float float) symbol) + (init-sound! (_type_) none) ;; 44 + (point-inside-shaft? (_type_ vector float float) symbol) ;; 45 ;; (commited-to-ride? (_type_) symbol) + (elevator-method-46 (_type_) object) ;; 46 ;; (move-to-next-point! (_type_) none) + (elevator-method-47 (_type_) symbol) ;; 47 ;; (find-closest-point-in-path! (_type_ vector (pointer float) symbol symbol) symbol) + (elevator-method-48 (_type_) none) ;; 48 ;; (elevator-method-48 (_type_) none) + (find-closest-point-in-path! (_type_ vector (pointer float) symbol symbol) symbol) ;; 49 + (elevator-method-50 (_type_) none) ;; 50 + (toggle-fence-collision (_type_ symbol) none) ;; 51 ) ) -|# -;; (define-extern ease-value-in-out function) ;; (function float float float) -;; (define-extern elevator-event function) ;; (function process int symbol event-message-block object :behavior elevator) -;; (define-extern move-post function) ;; (function none :behavior elevator) -;; (define-extern teleport-check function) +(define-extern ease-value-in-out (function float float float)) +(define-extern elevator-event (function process int symbol event-message-block object :behavior elevator)) +(define-extern move-post (function none :behavior elevator)) +(define-extern teleport-check (function none :behavior elevator)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; rigid-body ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype rigid-body-work (structure) ((max-ang-momentum float :offset-assert 0) (max-ang-velocity float :offset-assert 4) @@ -41050,11 +41553,10 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype rigid-body-move-work (structure) ((cquery collide-query :inline :offset-assert 0) + (best-dist float :offset 112 :score 2) ;; added (mat matrix :inline :offset-assert 544) (impact-info rigid-body-impact :inline :offset-assert 608) (impact-info2 rigid-body-impact :inline :offset-assert 672) @@ -41065,8 +41567,8 @@ (p-body vector :inline :offset-assert 800) (tmp vector :inline :offset-assert 816) (tangent-dir vector :inline :offset-assert 832) - (proc2 basic :offset-assert 848) - (rbody2 basic :offset-assert 852) + (proc2 process-focusable :offset-assert 848) + (rbody2 rigid-body-control :offset-assert 852) (vel-dot-norm float :offset-assert 856) (denom float :offset-assert 860) (denom2 float :offset-assert 864) @@ -41078,20 +41580,18 @@ :size-assert #x36d :flag-assert #x90000036d ) -|# -;; (define-extern *rigid-body-work* object) ;; rigid-body-work -;; (define-extern matrix-3x3-triple-transpose-product function) ;; (function matrix matrix matrix matrix) -;; (define-extern damping-time-adjust function) ;; (function float float float) -;; (define-extern transform-rigid-body-prims function) ;; (function collide-shape-prim matrix symbol) -;; (define-extern *rigid-body-object-constants* object) ;; rigid-body-object-constants -;; (define-extern rigid-body-object-event-handler function) ;; (function process int symbol event-message-block object :behavior rigid-body-object) +(define-extern *rigid-body-work* rigid-body-work) +(define-extern matrix-3x3-triple-transpose-product (function matrix matrix matrix matrix)) +(define-extern damping-time-adjust (function float float float)) +(define-extern transform-rigid-body-prims (function collide-shape-prim matrix symbol)) +(define-extern *rigid-body-object-constants* rigid-body-object-constants) +(define-extern rigid-body-object-event-handler (function process int symbol event-message-block object :behavior rigid-body-object)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; rigid-body-queue ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype rigid-body-queue-manager (process) ((queue rigid-body-queue :offset-assert 128) ) @@ -41099,23 +41599,21 @@ :size-assert #x84 :flag-assert #xf00100084 (:state-methods - idle ;; 14, old: (idle () _type_ :state) + idle ;; 14 ) ) -|# -;; (define-extern *rigid-body-queue-manager* object) -;; (define-extern rigid-body-queue-manager-init-by-other function) ;; (function rigid-body-queue object :behavior rigid-body-queue-manager) -;; (define-extern rigid-body-queue-manager-spawn function) ;; (function rigid-body-queue process-tree process) +(define-extern *rigid-body-queue-manager* rigid-body-queue-manager) +(define-extern rigid-body-queue-manager-init-by-other (function rigid-body-queue object :behavior rigid-body-queue-manager)) +(define-extern rigid-body-queue-manager-spawn (function rigid-body-queue process-tree process)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; joint-exploder ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype joint-exploder-tuning (structure) ((explosion uint64 :offset-assert 0) - (duration uint64 :offset-assert 8) ;; time-frame + (duration time-frame :offset-assert 8) ;; time-frame (gravity float :offset-assert 16) (rot-speed float :offset-assert 20) (bounds-inflate float :offset-assert 24) @@ -41126,21 +41624,22 @@ (friction float :offset-assert 44) (fountain-rand-transv-lo vector :inline :offset-assert 48) (fountain-rand-transv-hi vector :inline :offset-assert 64) - (away-from-focal-pt vector :inline :offset-assert 48) - (away-from-rand-transv-xz-lo float :offset-assert 64) - (away-from-rand-transv-xz-hi float :offset-assert 68) - (away-from-rand-transv-y-lo float :offset-assert 72) - (away-from-rand-transv-y-hi float :offset-assert 76) + (away-from-focal-pt vector :inline :offset 48) + (away-from-rand-transv-xz-lo float :offset 64) + (away-from-rand-transv-xz-hi float :offset 68) + (away-from-rand-transv-y-lo float :offset 72) + (away-from-rand-transv-y-hi float :offset 76) (hit-xz-reaction float :offset-assert 80) (hit-y-reaction float :offset-assert 84) ) :method-count-assert 9 :size-assert #x58 :flag-assert #x900000058 + (:methods + (new (symbol type uint) _type_) ;; 0 + ) ) -|# -#| (deftype joint-exploder-static-joint-params (structure) ((joint-index int16 :offset-assert 0) (parent-joint-index int16 :offset-assert 2) @@ -41149,23 +41648,19 @@ :size-assert #x4 :flag-assert #x900000004 ) -|# -#| (deftype joint-exploder-static-params (basic) ((joints (array joint-exploder-static-joint-params) :offset-assert 4) ;; guessed by decompiler - (collide-spec uint32 :offset-assert 8) + (collide-spec collide-spec :offset-assert 8) (art-level symbol :offset-assert 12) ;; guessed by decompiler - (collide-sound uint128 :offset-assert 16) - (collide-sound-interval uint64 :offset-assert 32) + (collide-sound sound-name :offset-assert 16) + (collide-sound-interval time-frame :offset-assert 32) ) :method-count-assert 9 :size-assert #x28 :flag-assert #x900000028 ) -|# -#| (deftype joint-exploder-joint (structure) ((next int16 :offset-assert 0) (prev int16 :offset-assert 2) @@ -41180,20 +41675,19 @@ :size-assert #xf0 :flag-assert #x9000000f0 ) -|# -#| (deftype joint-exploder-joints (basic) ((num-joints int32 :offset-assert 4) - (joint joint-exploder-joint :dynamic :offset-assert 16) ;; guessed by decompiler + (joint joint-exploder-joint :dynamic :inline :offset-assert 16) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 + (:methods + (new (symbol type joint-exploder-static-params) _type_) ;; 0 + ) ) -|# -#| (deftype joint-exploder-list (structure) ((head int32 :offset-assert 0) (pre-moved? symbol :offset-assert 4) ;; guessed by decompiler @@ -41205,59 +41699,54 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype joint-exploder-list-array (inline-array-class) - ((data UNKNOWN :dynamic :offset-assert 16) + ((data joint-exploder-list :dynamic :inline :offset-assert 16) ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype joint-exploder (process-drawable) - ((die-if-below-y float :offset-assert 200) + ((parent (pointer process-drawable) :override) + (die-if-below-y float :offset-assert 200) (die-if-beyond-xz-dist-sqrd float :offset-assert 204) (joints joint-exploder-joints :offset-assert 208) ;; guessed by decompiler (static-params joint-exploder-static-params :offset-assert 212) ;; guessed by decompiler (anim art-joint-anim :offset-assert 216) ;; guessed by decompiler (scale-vector vector :inline :offset-assert 224) (tuning joint-exploder-tuning :inline :offset-assert 240) - (lists joint-exploder-list :offset-assert 328) ;; guessed by decompiler - (last-colsound-time uint64 :offset-assert 336) + (lists joint-exploder-list-array :offset-assert 328) ;; guessed by decompiler + (last-colsound-time time-frame :offset-assert 336) ) :method-count-assert 30 :size-assert #x158 :flag-assert #x1e00e00158 (:methods - (joint-exploder-method-20 () none) ;; 20 ;; (add-joint-to-list (_type_ joint-exploder-list int) int) - (joint-exploder-method-21 () none) ;; 21 ;; (update-bbox-for-joint (_type_ joint-exploder-list joint-exploder-joint) none) - (joint-exploder-method-22 () none) ;; 22 ;; (do-collision-response (_type_ joint-exploder-list) none) - (joint-exploder-method-23 () none) ;; 23 ;; (init-joint-list (_type_) none) - (joint-exploder-method-24 () none) ;; 24 ;; (remove-from-list-and-reset (_type_ joint-exploder-list int) int) - (joint-exploder-method-25 () none) ;; 25 ;; (final-adjust (_type_ joint-exploder-list int) int) - (joint-exploder-method-26 () none) ;; 26 ;; (integrate-and-kill (_type_ joint-exploder-list) none) - (joint-exploder-method-27 () none) ;; 27 ;; (remove-joint-from-list (_type_ joint-exploder-list int) int) - (joint-exploder-method-28 () none) ;; 28 ;; (adjust-bbox-for-limits-along-axis (_type_ joint-exploder-list int) joint-exploder-list) - (joint-exploder-method-29 () none) ;; 29 ;; (adjust-bbox-for-limits (_type_ joint-exploder-list) none) + (add-joint-to-list (_type_ joint-exploder-list int) int) ;; 20 + (update-bbox-for-joint (_type_ joint-exploder-list joint-exploder-joint) none) ;; 21 + (do-collision-response (_type_ joint-exploder-list) none) ;; 22 + (init-joint-list (_type_) none) ;; 23 + (remove-from-list-and-reset (_type_ joint-exploder-list int) int) ;; 24 + (final-adjust (_type_ joint-exploder-list int) int) ;; 25 + (integrate-and-kill (_type_ joint-exploder-list) none) ;; 26 + (remove-joint-from-list (_type_ joint-exploder-list int) int) ;; 27 + (adjust-bbox-for-limits-along-axis (_type_ joint-exploder-list int) joint-exploder-list) ;; 28 + (adjust-bbox-for-limits (_type_ joint-exploder-list) none) ;; 29 ) (:states joint-exploder-shatter ;; associated process guessed by decompiler, old: (state joint-exploder) ) ) -|# -;; (define-extern joint-exploder-joint-callback function) ;; (function draw-control cspace-array joint-control none) -;; (define-extern joint-exploder-init-by-other function) ;; (function skeleton-group int joint-exploder-tuning joint-exploder-static-params none :behavior joint-exploder) +(define-extern joint-exploder-joint-callback (function draw-control cspace-array joint-control none)) +(define-extern joint-exploder-init-by-other (function skeleton-group int joint-exploder-tuning joint-exploder-static-params object :behavior joint-exploder)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; simple-nav-sphere ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype simple-nav-sphere (process-drawable) ((first-time? symbol :offset-assert 200) ;; guessed by decompiler (track-joint int32 :offset-assert 204) @@ -41266,20 +41755,19 @@ :size-assert #xd0 :flag-assert #x16005000d0 (:state-methods - active ;; 21, old: (active () _type_ :state) - idle ;; 20, old: (idle () _type_ :state) + idle ;; 20 + active ;; 21 ) ) -|# -;; (define-extern simple-nav-sphere-event-handler function) ;; (function process int symbol event-message-block object :behavior simple-nav-sphere) -;; (define-extern simple-nav-sphere-init-by-other function) ;; (function float vector nav-mesh int none :behavior simple-nav-sphere) +(define-extern simple-nav-sphere-event-handler (function process int symbol event-message-block object :behavior simple-nav-sphere)) +(define-extern simple-nav-sphere-init-by-other (function float vector nav-mesh int object :behavior simple-nav-sphere)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; process-taskable ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern process-taskable-anim-loop function) ;; (function (function process-taskable object) none :behavior process-taskable) +(define-extern process-taskable-anim-loop (function (function process-taskable object) none :behavior process-taskable)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; scene-actor ;; @@ -41391,6 +41879,14 @@ :flag-assert #x2800a00118 ) +;; added, was inside a top-level lambda +(deftype flut-npc (process-taskable) + () + :method-count-assert 40 + :size-assert #x118 + :flag-assert #x2800a00118 + ) + (define-extern pre-intro-play (function none)) (define-extern intro-play (function none)) (define-extern outro-play (function none)) @@ -41399,9 +41895,9 @@ ;; warp-gate ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype warp-gate (process-drawable) - ((level-name uint32 :offset-assert 200) ;; guessed by decompiler + ((root collide-shape :override) + (level-name symbol :offset-assert 200) ;; guessed by decompiler (on-notice pair :offset-assert 204) ;; guessed by decompiler (on-activate pair :offset-assert 208) ;; guessed by decompiler (on-close pair :offset-assert 212) ;; guessed by decompiler @@ -41409,27 +41905,25 @@ (continue continue-point :offset-assert 220) ;; guessed by decompiler (distance meters :offset-assert 224) (anim-speed float :offset-assert 228) - (test-time uint64 :offset-assert 232) ;; time-frame + (test-time time-frame :offset-assert 232) ;; time-frame (center vector :inline :offset-assert 240) ) :method-count-assert 26 :size-assert #x100 :flag-assert #x1a00800100 ;; field on-notice uses ~A with a signed load. field on-activate uses ~A with a signed load. field on-close uses ~A with a signed load. - (:methods - (warp-gate-method-23 () none) ;; 23 ;; (init-skel-and-collide (_type_) none) - (warp-gate-method-24 () none) ;; 24 ;; (setup-fields (_type_) none) - (warp-gate-method-25 () none) ;; 25 ;; (handle-notice (_type_) continue-point) - ) (:state-methods - use ;; 21, old: (use (continue-point) _type_ :state) - idle ;; 20, old: (idle () _type_ :state) - hidden ;; 22, old: (hidden () _type_ :state) + idle ;; 20 + (use continue-point) ;; 21 + hidden ;; 22 + ) + (:methods + (init-skel-and-collide! (_type_) none) ;; 23 + (init-defaults! (_type_) none) ;; 24 + (eval-on-notice (_type_) continue-point) ;; 25 ) ) -|# -#| (deftype air-train (warp-gate) ((part-exhaust-left sparticle-launch-control :offset-assert 256) ;; guessed by decompiler (part-exhaust-right sparticle-launch-control :offset-assert 260) ;; guessed by decompiler @@ -41441,29 +41935,24 @@ :method-count-assert 26 :size-assert #x130 :flag-assert #x1a00b00130 - (:state-methods - use ;; 21 - idle ;; 20 - ) ) -|# -;; (define-extern warp-gate-init function) ;; (function entity-actor vector none :behavior warp-gate) -;; (define-extern *warp-jump-mods* surface) ;; surface -;; (define-extern *range-warp-dust-color* curve-color-fast) -;; (define-extern *range-warp-dust-alpha* curve2d-fast) -;; (define-extern *range-warp-dust-scale-x* curve2d-fast) -;; (define-extern *range-warp-dust-scale-y* curve2d-fast) -;; (define-extern *curve-warp-dust-alpha* curve2d-fast) -;; (define-extern *curve-warp-dust-scale-x* curve2d-fast) -;; (define-extern *curve-warp-dust-scale-y* curve2d-fast) -;; (define-extern *part-warp-fma-dust-takeoff-curve-settings* object) +(define-extern v-marauder type) +(define-extern warp-gate-init (function entity-actor vector none :behavior warp-gate)) +(define-extern *warp-jump-mods* surface) +(define-extern *range-warp-dust-color* curve-color-fast) +(define-extern *range-warp-dust-alpha* curve2d-fast) +(define-extern *range-warp-dust-scale-x* curve2d-fast) +(define-extern *range-warp-dust-scale-y* curve2d-fast) +(define-extern *curve-warp-dust-alpha* curve2d-fast) +(define-extern *curve-warp-dust-scale-x* curve2d-fast) +(define-extern *curve-warp-dust-scale-y* curve2d-fast) +(define-extern *part-warp-fma-dust-takeoff-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; guard-projectile ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype guard-shot (projectile) ((hit-actor? symbol :offset-assert 512) ;; guessed by decompiler (tail-pos vector :inline :offset-assert 528) @@ -41472,16 +41961,14 @@ :size-assert #x220 :flag-assert #x2901a00220 ) -|# -;; (define-extern guard-shot-move function) ;; (function guard-shot none) -;; (define-extern spawn-guard-projectile function) +(define-extern guard-shot-move (function guard-shot none)) +(define-extern spawn-guard-projectile (function process-focusable vector vector float vector (pointer guard-shot))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; metalhead-projectile ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype metalhead-shot (projectile) ((tail-pos vector :inline :offset-assert 512) ) @@ -41489,9 +41976,7 @@ :size-assert #x210 :flag-assert #x2901900210 ) -|# -#| (deftype metalhead-grenade-shot (projectile) ((tumble-quat quaternion :inline :offset-assert 512) (blast-radius float :offset-assert 528) @@ -41504,19 +41989,18 @@ impact ;; 22 ) ) -|# -;; (define-extern metalhead-shot-move function) ;; (function metalhead-shot none) -;; (define-extern spawn-metalhead-projectile function) ;; (function metalhead-shot vector vector float (pointer metalhead-shot)) -;; (define-extern gren-canister-move function) ;; (function metalhead-grenade-shot none) -;; (define-extern gren-cshape-reaction-canister function) ;; (function collide-shape-moving metalhead-grenade-shot none) -;; (define-extern spawn-metalhead-grenade function) ;; (function metalhead-grenade-shot vector vector float (pointer metalhead-grenade-shot)) +(define-extern metalhead-shot-move (function metalhead-shot none)) +(define-extern spawn-metalhead-projectile (function metalhead-shot vector vector float (pointer metalhead-shot))) +(define-extern gren-canister-move (function metalhead-grenade-shot none)) +(define-extern gren-cshape-reaction-canister (function collide-shape-moving metalhead-grenade-shot none)) +(define-extern spawn-metalhead-grenade (function metalhead-grenade-shot vector vector float (pointer metalhead-grenade-shot))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; los-control ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *los-time-offset* object) ;; time-frame +(define-extern *los-time-offset* time-frame) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; enemy-part ;; @@ -41527,60 +42011,54 @@ ;; ragdoll-test ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype ragdoll-test (process-focusable) - ((ragdoll-proc uint64 :offset-assert 208) + ((ragdoll-proc handle :offset-assert 208) ) :method-count-assert 33 :size-assert #xd8 :flag-assert #x21006000d8 (:state-methods - idle ;; 32 - freefall ;; 31 - freefall-reform ;; 30 - tweak ;; 29 reform ;; 28 + tweak ;; 29 + freefall-reform ;; 30 + freefall ;; 31 + idle ;; 32 ) ) -|# -;; (define-extern *ragdoll-test-ragdoll-setup* object) -;; (define-extern ragdoll-test-init-by-other function) +(define-extern *ragdoll-test-ragdoll-setup* ragdoll-setup) +(define-extern ragdoll-test-init-by-other (function ragdoll-setup entity-actor object :behavior ragdoll-test)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; debris ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +(declare-type debris-group process) (deftype debris-static-joint-params (structure) ((parent-joint-index int16 :offset-assert 0) - (group basic :offset-assert 4) + (group string :offset-assert 4) (offset vector :offset-assert 8) ) :method-count-assert 9 :size-assert #xc :flag-assert #x90000000c ) -|# -#| (deftype debris-static-params (basic) - ((joints basic :offset-assert 4) - (collide-spec uint32 :offset-assert 8) - (sound-hit uint128 :offset-assert 16) - (art-level basic :offset-assert 32) + ((joints (array debris-static-joint-params) :offset-assert 4) + (collide-spec collide-spec :offset-assert 8) + (sound-hit sound-name :offset-assert 16) + (art-level symbol :offset-assert 32) ) :method-count-assert 9 :size-assert #x24 :flag-assert #x900000024 ) -|# -#| (deftype debris (basic) ((root transformq :inline :offset-assert 16) - (node-list basic :offset-assert 64) - (draw basic :offset-assert 68) + (node-list cspace-array :offset-assert 64) + (draw draw-control :offset-assert 68) (duration float :offset-assert 72) (hit-xz-reaction float :offset-assert 76) (hit-y-reaction float :offset-assert 80) @@ -41589,16 +42067,14 @@ (rot-axis vector :inline :offset-assert 128) (rot-angle float :offset-assert 144) (transv vector :inline :offset-assert 160) - (time-fade-out uint64 :offset-assert 176) - (params basic :offset-assert 184) + (time-fade-out time-frame :offset-assert 176) + (params debris-static-params :offset-assert 184) ) :method-count-assert 9 :size-assert #xbc :flag-assert #x9000000bc ) -|# -#| (deftype debris-box (structure) ((start uint32 :offset-assert 0) (num uint32 :offset-assert 4) @@ -41608,35 +42084,31 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype debris-group (process) ((dead-debris-num int32 :offset-assert 128) (debris-num int32 :offset-assert 132) - (debris basic :offset-assert 136) + (debris (array debris) :offset-assert 136) (max-probe-width float :offset-assert 140) - (state-time uint64 :offset-assert 144) + (state-time time-frame :offset-assert 144) (num-boxes uint32 :offset-assert 152) - (boxes UNKNOWN 16 :offset-assert 160) + (boxes debris-box 16 :inline :offset-assert 160) ) :method-count-assert 17 :size-assert #x3a0 :flag-assert #x11032003a0 - (:methods - (debris-group-method-15 () none) ;; 15 - (debris-group-method-16 () none) ;; 16 - ) (:state-methods idle ;; 14 ) + (:methods + (do-collision (_type_ int) none) ;; 15 + (update-box! (_type_ int) none) ;; 16 + ) ) -|# -#| (deftype debris-tuning (structure) ((explosion uint64 :offset-assert 0) - (duration uint64 :offset-assert 8) + (duration time-frame :offset-assert 8) (gravity float :offset-assert 16) (rot-speed float :offset-assert 20) (bounds-inflate float :offset-assert 24) @@ -41645,11 +42117,11 @@ (max-probe-depth float :offset-assert 36) (fountain-rand-transv-lo vector :inline :offset-assert 48) (fountain-rand-transv-hi vector :inline :offset-assert 64) - (away-from-focal-pt vector :inline :offset-assert 48) - (away-from-rand-transv-xz-lo float :offset-assert 64) - (away-from-rand-transv-xz-hi float :offset-assert 68) - (away-from-rand-transv-y-lo float :offset-assert 72) - (away-from-rand-transv-y-hi float :offset-assert 76) + (away-from-focal-pt vector :inline :offset 48) + (away-from-rand-transv-xz-lo float :offset 64) + (away-from-rand-transv-xz-hi float :offset 68) + (away-from-rand-transv-y-lo float :offset 72) + (away-from-rand-transv-y-hi float :offset 76) (hit-xz-reaction float :offset-assert 80) (hit-y-reaction float :offset-assert 84) (scale-rand-lo float :offset-assert 88) @@ -41658,88 +42130,91 @@ :method-count-assert 9 :size-assert #x60 :flag-assert #x900000060 + (:methods + (new (symbol type uint) _type_) ;; 0 + ) ) -|# -;; (define-extern debris-group-init-by-other function) -;; (define-extern debris-spawn function) +(define-extern debris-group-init-by-other (function debris-tuning debris-static-params process-drawable object :behavior debris-group)) +(define-extern debris-spawn (function process-drawable debris-tuning debris-static-params process-drawable (pointer debris-group))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; shield-sphere ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype shield-sphere-heat (structure) ((current-heat-value float :offset-assert 0) (damage-scalar float :offset-assert 4) - (last-heat-time uint64 :offset-assert 8) - (distort-handle uint64 :offset-assert 16) + (last-heat-time time-frame :offset-assert 8) + (distort-handle handle :offset-assert 16) ) :method-count-assert 9 :size-assert #x18 :flag-assert #x900000018 ) -|# -#| (deftype shield-sphere-toggle (structure) - ((enable-time uint64 :offset-assert 0) - (disable-time uint64 :offset-assert 8) + ((enable-time time-frame :offset-assert 0) + (disable-time time-frame :offset-assert 8) ) :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 ) -|# -#| +;; +++shield-sphere:shield-type +(defenum shield-type + :type uint8 + (shield-type-0) + (shield-type-1) + ) +;; ---shield-sphere:shield-type + (deftype shield-sphere (process-focusable) - ((owner uint64 :offset-assert 208) + ((owner handle :offset-assert 208) (sphere-size float :offset-assert 216) (offset-vec vector :inline :offset-assert 224) - (enabled? basic :offset-assert 240) - (shield-type uint8 :offset-assert 244) + (enabled? symbol :offset-assert 240) + (shield-type shield-type :offset-assert 244) (track-joint int32 :offset-assert 248) (heat-info shield-sphere-heat :inline :offset-assert 256) - (toggle-info shield-sphere-toggle :inline :offset-assert 256) - (last-attack-time uint64 :offset-assert 280) + (toggle-info shield-sphere-toggle :inline :offset 256) + (last-attack-time time-frame :offset-assert 280) (last-attack-id uint32 :offset-assert 288) (persistent-attack-id uint32 :offset-assert 292) ) :method-count-assert 43 :size-assert #x128 :flag-assert #x2b00b00128 - (:methods - (shield-sphere-method-32 () none) ;; 32 - (shield-sphere-method-33 () none) ;; 33 - (shield-sphere-method-34 () none) ;; 34 - (shield-sphere-method-35 () none) ;; 35 - (shield-sphere-method-36 () none) ;; 36 - (shield-sphere-method-37 () none) ;; 37 - (shield-sphere-method-38 () none) ;; 38 - (shield-sphere-method-39 () none) ;; 39 - (shield-sphere-method-40 () none) ;; 40 - (shield-sphere-method-41 () none) ;; 41 - (shield-sphere-method-42 () none) ;; 42 - ) (:state-methods - die ;; 31 - explode ;; 30 - shield-disabled ;; 29 shield-enabled ;; 28 + shield-disabled ;; 29 + explode ;; 30 + die ;; 31 + ) + (:methods + (shield-sphere-method-32 (_type_) quaternion) ;; 32 + (shield-enabled-trans (_type_) none) ;; 33 + (toggle-shield (_type_ symbol) none) ;; 34 + (shield-post (_type_) object) ;; 35 + (init-and-go! (_type_) object) ;; 36 + (init-collision! (_type_) none) ;; 37 + (shield-event-handler (_type_ process int symbol event-message-block) object) ;; 38 + (get-attack-damage (_type_ process-focusable event-message-block) int) ;; 39 + (shield-touch-handler (_type_ process-focusable event-message-block) object) ;; 40 + (shield-attack-handler (_type_ process-focusable event-message-block) symbol) ;; 41 + (send-shield-attack (_type_ process-focusable touching-shapes-entry int) object) ;; 42 ) ) -|# -#| (deftype shield-sphere-spawn-params (structure) ((offset-vec vector :inline :offset-assert 0) - (owner uint64 :offset-assert 16) + (owner handle :offset-assert 16) (sphere-size float :offset-assert 24) - (shield-type uint8 :offset-assert 28) + (shield-type shield-type :offset-assert 28) (track-joint int32 :offset-assert 32) - (enable-time uint64 :offset-assert 40) - (disable-time uint64 :offset-assert 48) + (enable-time time-frame :offset-assert 40) + (disable-time time-frame :offset-assert 48) (shield-strength int8 :offset-assert 56) (pad int16 :offset-assert 58) ) @@ -41747,11 +42222,9 @@ :size-assert #x3c :flag-assert #x90000003c ) -|# -#| (deftype shield-sphere-distort (process-drawable) - ((owner uint64 :offset-assert 200) + ((owner handle :offset-assert 200) (sphere-size float :offset-assert 208) ) :method-count-assert 23 @@ -41763,22 +42236,19 @@ die ;; 22 ) ) -|# -#| (deftype shield-sphere-distort-spawn-params (structure) - ((owner uint64 :offset-assert 0) + ((owner handle :offset-assert 0) (sphere-size float :offset-assert 8) ) :method-count-assert 9 :size-assert #xc :flag-assert #x90000000c ) -|# -;; (define-extern shield-sphere-distort-init-by-other function) -;; (define-extern *shield-sphere-exploder-params* joint-exploder-static-params) -;; (define-extern shield-sphere-init-by-other function) +(define-extern shield-sphere-distort-init-by-other (function shield-sphere-distort-spawn-params object :behavior shield-sphere-distort)) +(define-extern *shield-sphere-exploder-params* joint-exploder-static-params) +(define-extern shield-sphere-init-by-other (function shield-sphere-spawn-params object :behavior shield-sphere)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; des-bush-part ;; @@ -42088,76 +42558,79 @@ ;; grunt ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype grunt-anim-info (structure) ((anim-index int32 :offset-assert 0) (travel-speed meters :offset-assert 4) ) + :pack-me :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype grunt-global-info (basic) - ((patrol-anim grunt-anim-info 4 :offset-assert 4) ;; guessed by decompiler - (charge-anim grunt-anim-info 3 :offset-assert 36) ;; guessed by decompiler - (attack-anim grunt-anim-info 2 :offset-assert 60) ;; guessed by decompiler + ((patrol-anim grunt-anim-info 4 :inline :offset-assert 4) ;; guessed by decompiler + (charge-anim grunt-anim-info 3 :inline :offset-assert 36) ;; guessed by decompiler + (attack-anim grunt-anim-info 2 :inline :offset-assert 60) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x4c :flag-assert #x90000004c ) -|# -#| +;; +++grunt:grunt-flags +(defenum grunt-flags + :type uint8 + :bitfield #t + (gf0 0) + (gf1 1) + (gf2 2) + ) +;; ---grunt:grunt-flags + (deftype grunt (nav-enemy) ((patrol-anim grunt-anim-info :offset-assert 620) (charge-anim grunt-anim-info :offset-assert 624) (attack-anim grunt-anim-info :offset-assert 628) (intro-path path-control :offset-assert 632) ;; guessed by decompiler - (use-charge-anim-index int8 :offset-assert 640) + (use-charge-anim-index int8 :offset 640) (jumping-ambush-path-pt int8 :offset-assert 641) - (grunt-flags uint8 :offset-assert 642) - (state-timeout2 uint64 :offset-assert 648) - (next-warn-time uint64 :offset-assert 656) ;; time-frame + (grunt-flags grunt-flags :offset-assert 642) + (state-timeout2 time-frame :offset-assert 648) + (next-warn-time time-frame :offset-assert 656) ;; time-frame (dest vector :inline :offset-assert 672) - (focus-pos vector :inline :offset-assert 352) - (minimap connection-minimap :offset-assert 704) + (minimap connection-minimap :offset 704) ) :method-count-assert 198 :size-assert #x2c4 :flag-assert #xc6025002c4 - (:methods - (grunt-method-196 () none) ;; 196 - (grunt-method-197 () none) ;; 197 - ) (:state-methods knocked-recover ;; 32 - stop-chase ;; 158 - circling ;; 157 - pacing ;; 156 - spin-attack ;; 195 - wait-for-focus ;; 194 + active ;; 34 hostile ;; 38 + pacing ;; 156 + circling ;; 157 + stop-chase ;; 158 attack ;; 190 - active ;; 34 - jumping-ambush-cont ;; 193 - jumping-ambush ;; 192 falling-ambush ;; 191 + jumping-ambush ;; 192 + jumping-ambush-cont ;; 193 + wait-for-focus ;; 194 + spin-attack ;; 195 + ) + (:methods + (grunt-method-196 (_type_ float) process-focusable) ;; 196 + (get-enemy-info (_type_) nav-enemy-info) ;; 197 ) ) -|# -;; (define-extern *grunt-global-info* grunt-global-info) ;; grunt-global-info -;; (define-extern *grunt-nav-enemy-info* nav-enemy-info) ;; nav-enemy-info +(define-extern *grunt-global-info* grunt-global-info) +(define-extern *grunt-nav-enemy-info* nav-enemy-info) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; battle ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype battle-info (basic) ((id int8 :offset-assert 4) (notice-spec uint64 :offset-assert 8) @@ -42180,9 +42653,7 @@ :size-assert #x48 :flag-assert #x900000048 ) -|# -#| (deftype battle-ally (structure) ((entity entity-actor :offset-assert 0) ;; guessed by decompiler ) @@ -42190,19 +42661,15 @@ :size-assert #x4 :flag-assert #x900000004 ) -|# -#| (deftype battle-ally-array (inline-array-class) - ((data battle-ally :dynamic :offset-assert 16) ;; guessed by decompiler + ((data battle-ally :dynamic :inline :offset-assert 16) ;; guessed by decompiler ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype battle-breed (structure) ((breed-type type :offset-assert 0) ;; guessed by decompiler (percent float :offset-assert 4) @@ -42211,21 +42678,25 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype battle-breed-array (inline-array-class) - ((data battle-breed :dynamic :offset-assert 16) ;; guessed by decompiler + ((data battle-breed :dynamic :inline :offset-assert 16) ;; guessed by decompiler ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| +;; +++battle:battle-spawner-flags +(defenum battle-spawner-flags + :bitfield #t + :type int64 + (hit) + ) +;; ---battle:battle-spawner-flags + (deftype battle-spawner (structure) - ((flags uint64 :offset-assert 0) ;; battle-spawner-flags + ((flags battle-spawner-flags :offset-assert 0) ;; battle-spawner-flags (entity entity-actor :offset-assert 8) ;; guessed by decompiler (breeds battle-breed-array :offset-assert 12) ;; guessed by decompiler (creature-index int8 :offset-assert 16) @@ -42234,31 +42705,39 @@ (mode uint8 :offset-assert 19) (intro-path path-control :offset-assert 20) ;; guessed by decompiler (notice-attack-delay uint32 :offset-assert 24) - (creature uint64 :offset-assert 32) ;; handle - (last-spawn-time uint64 :offset-assert 40) ;; time-frame - (noticed-attack-time uint64 :offset-assert 48) ;; time-frame + (creature handle :offset-assert 32) ;; handle + (last-spawn-time time-frame :offset-assert 40) ;; time-frame + (noticed-attack-time time-frame :offset-assert 48) ;; time-frame (attack-pos vector :inline :offset-assert 64) ) :method-count-assert 9 :size-assert #x50 :flag-assert #x900000050 ) -|# -#| (deftype battle-spawner-array (inline-array-class) - ((data battle-spawner :dynamic :offset-assert 16) ;; guessed by decompiler + ((data battle-spawner :dynamic :inline :offset-assert 16) ;; guessed by decompiler ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| +;; +++battle:battle-flags +(defenum battle-flags + :bitfield #t + :type uint8 + (noticed) + (active) + (beaten) + (no-spawner-block) + (battle-music-set) + ) +;; ---battle:battle-flags + (deftype battle (process-drawable) ((info battle-info :offset-assert 200) ;; guessed by decompiler - (flags uint8 :offset-assert 204) ;; battle-flags + (flags battle-flags :offset-assert 204) ;; battle-flags (spawn-initial-creatures? symbol :offset-assert 208) ;; guessed by decompiler (next-spawn-delay uint32 :offset-assert 212) (on-notice basic :offset-assert 216) @@ -42268,8 +42747,8 @@ (count uint32 :offset-assert 232) (die-count uint32 :offset-assert 236) (stat-child-count uint16 :offset-assert 240) - (cant-spawn-time uint64 :offset-assert 248) ;; time-frame - (jammed-starting-time uint64 :offset-assert 256) ;; time-frame + (cant-spawn-time time-frame :offset-assert 248) ;; time-frame + (jammed-starting-time time-frame :offset-assert 256) ;; time-frame (spawners battle-spawner-array :offset-assert 264) ;; guessed by decompiler (allies battle-ally-array :offset-assert 268) ;; guessed by decompiler ) @@ -42277,62 +42756,60 @@ :size-assert #x110 :flag-assert #x3500900110 ;; field on-notice uses ~A with a signed load. field on-hostile uses ~A with a signed load. field on-beaten uses ~A with a signed load. - (:methods - (battle-method-21 () none) ;; 21 ;; (battle-state-21 () _type_ :state) - (battle-method-25 () none) ;; 25 ;; (spawner-blocked? (_type_ battle-spawner) symbol) - (battle-method-26 () none) ;; 26 ;; (spawner-blocked-by-collide? (_type_ battle-spawner) symbol) - (battle-method-27 () none) ;; 27 ;; (draw-battle-marks (_type_) none) - (battle-method-28 () none) ;; 28 ;; (initialize-enemy-lists (_type_) none) - (battle-method-29 () none) ;; 29 ;; (initialize-spawner-breeds (_type_ battle-spawner entity-actor) none) - (battle-method-30 () none) ;; 30 ;; (get-spawner-for-enemy (_type_ process) battle-spawner) - (battle-method-31 () none) ;; 31 ;; (initialize-ally (_type_ battle-ally entity-actor) none) - (battle-method-32 () none) ;; 32 ;; (initialize-spawner (_type_ battle-spawner entity-actor) none) - (battle-method-33 () none) ;; 33 ;; (initialize-battle (_type_) none) - (battle-method-34 () none) ;; 34 ;; (init-go (_type_) int) - (battle-method-35 () none) ;; 35 ;; (get-spawn-delay (_type_) int) - (battle-method-36 () none) ;; 36 ;; (get-best-spawner (_type_) battle-spawner) - (battle-method-37 () none) ;; 37 ;; (spawner-free? (_type_ battle-spawner) symbol) - (battle-method-38 () none) ;; 38 ;; (spawn-from-breed (_type_ battle-breed enemy-init-by-other-params) handle) - (battle-method-39 () none) ;; 39 ;; (spawn-from-spawner (_type_ battle-spawner symbol) none) - (battle-method-40 () none) ;; 40 ;; (spawn-initial-creatures (_type_) none) - (battle-method-41 () none) ;; 41 ;; (get-random-breed (_type_ battle-spawner) battle-breed) - (battle-method-42 () none) ;; 42 ;; (spawner-hit (_type_ battle-spawner process) symbol) - (battle-method-43 () none) ;; 43 ;; (spawner-try-jump (_type_ battle-spawner enemy) symbol) - (battle-method-44 () none) ;; 44 ;; (spawner-do-jump (_type_ battle-spawner) int) - (battle-method-45 () none) ;; 45 ;; (spawner-hittable? (_type_ battle-spawner) symbol) - (battle-method-46 () none) ;; 46 ;; (spawner-in-intro? (_type_ battle-spawner) symbol) - (battle-method-47 () none) ;; 47 ;; (set-battle-music (_type_) none) - (battle-method-48 () none) ;; 48 ;; (unset-battle-music (_type_) none) - (battle-method-49 () none) ;; 49 ;; (update-allies-list (_type_) int) - (battle-method-50 () none) ;; 50 ;; (beaten? (_type_) symbol) - (battle-method-51 () none) ;; 51 ;; (spawner-active? (_type_ battle-spawner symbol) symbol) - (battle-method-52 () none) ;; 52 ;; (spawner-active-count (_type_) int) - ) - (:state-methods - beaten ;; 24, old: (beaten () _type_ :state) - hostile ;; 23, old: (hostile () _type_ :state) - notice ;; 22, old: (notice () _type_ :state) - idle ;; 20, old: (idle () _type_ :state) - ) - ) -|# - -;; (define-extern *battles* array) ;; (array battle-info) -;; (define-extern battle-event-handler function) ;; (function process int symbol event-message-block object :behavior battle) + (:state-methods + idle ;; 20 + undefined ;; 21, not defined + notice ;; 22 + hostile ;; 23 + beaten ;; 24 + ) + (:methods + (spawner-blocked? (_type_ battle-spawner) symbol) ;; 25 + (spawner-blocked-by-collide? (_type_ battle-spawner) symbol) ;; 26 + (draw-battle-marks (_type_) none) ;; 27 + (initialize-enemy-lists (_type_) none) ;; 28 + (initialize-spawner-breeds (_type_ battle-spawner entity-actor) none) ;; 29 + (get-spawner-for-enemy (_type_ process) battle-spawner) ;; 30 + (initialize-ally (_type_ battle-ally entity-actor) none) ;; 31 + (initialize-spawner (_type_ battle-spawner entity-actor) none) ;; 32 + (initialize-battle (_type_) none) ;; 33 + (init-go (_type_) int) ;; 34 + (get-spawn-delay (_type_) int) ;; 35 + (get-best-spawner (_type_) battle-spawner) ;; 36 + (spawner-free? (_type_ battle-spawner) symbol) ;; 37 + (spawn-from-breed (_type_ battle-breed enemy-init-by-other-params) handle) ;; 38 + (spawn-from-spawner (_type_ battle-spawner symbol) none) ;; 39 + (spawn-initial-creatures (_type_) none) ;; 40 + (get-random-breed (_type_ battle-spawner) battle-breed) ;; 41 + (spawner-hit (_type_ battle-spawner process) symbol) ;; 42 + (spawner-try-jump (_type_ battle-spawner enemy) symbol) ;; 43 + (spawner-do-jump (_type_ battle-spawner) int) ;; 44 + (spawner-hittable? (_type_ battle-spawner) symbol) ;; 45 + (spawner-in-intro? (_type_ battle-spawner) symbol) ;; 46 + (set-battle-music (_type_) none) ;; 47 + (unset-battle-music (_type_) none) ;; 48 + (update-allies-list (_type_) int) ;; 49 + (beaten? (_type_) symbol) ;; 50 + (spawner-active? (_type_ battle-spawner symbol) symbol) ;; 51 + (spawner-active-count (_type_) int) ;; 52 + ) + ) + +(define-extern *battles* (array battle-info)) +(define-extern battle-event-handler (function process int symbol event-message-block object :behavior battle)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 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) ) @@ -42340,31 +42817,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) @@ -42374,45 +42858,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) @@ -42421,19 +42902,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) @@ -42442,9 +42919,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) @@ -42457,9 +42941,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) @@ -42472,19 +42954,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) @@ -42495,24 +42973,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) ) @@ -42520,58 +42994,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 ) @@ -42579,41 +43046,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 + (nav-network-method-9 (_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) @@ -42625,23 +43090,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) @@ -42654,9 +43131,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) @@ -42675,46 +43152,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 - ) - ) -|# - -;; (define-extern *debug-hover* object) ;; symbol -;; (define-extern *dummy-adjacency* object) -;; (define-extern *hover-nav-time-offset* object) ;; int + (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* 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) @@ -42729,7 +43204,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) ) @@ -42737,12 +43212,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) @@ -42755,7 +43228,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) @@ -42771,39 +43244,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 ) @@ -42811,31 +43283,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) @@ -42845,19 +43315,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 ;; @@ -42920,7 +43387,6 @@ ;; dp-bipedal-shot ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype dp-bipedal-grenade-shot (projectile-bounce) ((blast-radius float :offset-assert 548) ) @@ -42932,110 +43398,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) ) @@ -43043,128 +43501,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 @@ -43174,11 +43622,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 @@ -43187,25 +43633,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 @@ -43215,11 +43657,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 @@ -43229,79 +43669,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) @@ -43312,13 +43744,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) @@ -43334,9 +43764,7 @@ idle ;; 20 ) ) -|# -#| (deftype tpl-fan-three (process-drawable) ((quat quaternion :inline :offset-assert 208) (cycle-time float :offset-assert 224) @@ -43352,66 +43780,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) ) @@ -43419,124 +43843,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 @@ -43545,9 +43956,7 @@ open ;; 20 ) ) -|# -#| (deftype tpl-banner-b (process-drawable) () :method-count-assert 21 @@ -43557,9 +43966,7 @@ idle ;; 20 ) ) -|# -#| (deftype tpl-elevator (elevator) () :method-count-assert 52 @@ -43569,11 +43976,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 @@ -43582,21 +43987,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) @@ -43605,9 +44008,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) @@ -43616,14 +44017,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 ;; @@ -43640,69 +44040,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 @@ -43711,46 +44104,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 + active ;; 34 notice ;; 35 + hostile ;; 38 attack ;; 190 - active ;; 34 + 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) @@ -43765,17 +44151,16 @@ :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 ;; @@ -43948,42 +44333,49 @@ ;; 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 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype jump-pad (bouncer) ((fan-quat quaternion :inline :offset-assert 224) (rot-vel float :offset-assert 240) - (fan-loop-sound-id uint32 :offset-assert 244) - (fan-loop-sound basic :offset-assert 248) - (jump-sound basic :offset-assert 252) + (fan-loop-sound-id sound-id :offset-assert 244) + (fan-loop-sound sound-spec :offset-assert 248) + (jump-sound sound-spec :offset-assert 252) ) :method-count-assert 30 :size-assert #x100 :flag-assert #x1e00800100 - (:methods - (jump-pad-method-27 () none) ;; 27 - (jump-pad-method-28 () none) ;; 28 - (jump-pad-method-29 () none) ;; 29 - ) (:state-methods - fire ;; 21 idle ;; 20 + fire ;; 21 + ) + (:methods + (get-skel (_type_) art-group) ;; 27 + (get-fan-joint-idx (_type_) int) ;; 28 + (init-sounds (_type_) none) ;; 29 ) ) -|# -;; (define-extern jump-pad-joint-fan function) +(define-extern jump-pad-joint-fan (function cspace quaternion none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; roboguard ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++roboguard:roboguard-flag +(defenum roboguard-flag + :type uint16 + :bitfield #t + (rf0 0) + (rf1 1) + (rf2 2) + ) +;; ---roboguard:roboguard-flag + (deftype roboguard (nav-enemy) ((los los-control :inline :offset-assert 624) (rotation-matrix matrix :inline :offset-assert 800) @@ -43993,82 +44385,78 @@ (focus-formation-source vector :inline :offset-assert 960) (me-to-focus-dir vector :inline :offset-assert 976) (me-to-focus-angle float :offset-assert 992) - (flags uint16 :offset-assert 996) + (flags roboguard-flag :offset-assert 996) (torso-aim-blend float :offset-assert 1000) (torso-angle float :offset-assert 1004) (torso-seek-speed float :offset-assert 1008) (torso-to-focus-angle float :offset-assert 1012) (last-torso-frame-num float :offset-assert 1016) (stand-angle-threshold float :offset-assert 1020) - (arm-rot-mult UNKNOWN 2 :offset-assert 1024) - (arm-rot UNKNOWN 2 :offset-assert 1032) - (fire-time uint64 :offset-assert 1040) + (arm-rot-mult float 2 :offset-assert 1024) + (arm-rot degrees 2 :offset-assert 1032) + (fire-time time-frame :offset-assert 1040) (fire-count uint32 :offset-assert 1048) - (last-attack-time uint64 :offset-assert 1056) - (update-focus-pos basic :offset-assert 1064) + (last-attack-time time-frame :offset-assert 1056) + (update-focus-pos symbol :offset-assert 1064) (formation-angle-sign float :offset-assert 1068) (last-hit-points int32 :offset-assert 1072) ) :method-count-assert 197 :size-assert #x434 :flag-assert #xc503c00434 - (:methods - (roboguard-method-194 () none) ;; 194 - (roboguard-method-195 () none) ;; 195 - (roboguard-method-196 () none) ;; 196 - ) (:state-methods - die ;; 40 - knocked-recover ;; 32 knocked ;; 31 - shoot-attack ;; 192 - hostile-stand ;; 190 - hostile ;; 38 - explode ;; 193 + knocked-recover ;; 32 + idle ;; 33 + notice ;; 35 stare ;; 37 + hostile ;; 38 + die ;; 40 + hostile-stand ;; 190 close-attack ;; 191 - notice ;; 35 - idle ;; 33 + shoot-attack ;; 192 + explode ;; 193 + ) + (:methods + (roboguard-method-194 (_type_ vector float) symbol) ;; 194 + (roboguard-method-195 (_type_) none) ;; 195 + (roboguard-method-196 (_type_ int) none) ;; 196 ) ) -|# -;; (define-extern *roboguard-exploder-params* joint-exploder-static-params) -;; (define-extern *roboguard-explode-joints* array) -;; (define-extern *roboguard-debris-array-params* array) -;; (define-extern *fact-info-roboguard-defaults* fact-info-enemy-defaults) -;; (define-extern *roboguard-nav-enemy-info* nav-enemy-info) -;; (define-extern roboguard-turn-torso-post function) -;; (define-extern roboguard-turret-code function) -;; (define-extern *roboguard-formation-table* array) +(define-extern *roboguard-exploder-params* joint-exploder-static-params) +(define-extern *roboguard-explode-joints* (array int32)) +(define-extern *roboguard-debris-array-params* (array debris-static-params)) +(define-extern *fact-info-roboguard-defaults* fact-info-enemy-defaults) +(define-extern *roboguard-nav-enemy-info* nav-enemy-info) +(define-extern roboguard-turn-torso-post (function none :behavior roboguard)) +(define-extern roboguard-turret-code (function none :behavior roboguard)) +(define-extern *roboguard-formation-table* (array float)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 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) @@ -44080,66 +44468,61 @@ :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 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype kg-grunt-anim-info (structure) ((anim-index int32 :offset-assert 0) (travel-speed meters :offset-assert 4) ) + :pack-me :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype kg-grunt-global-info (basic) ((prev-knocked-anim-index int32 :offset-assert 4) (prev-yellow-hit-anim-index int32 :offset-assert 8) (prev-blue-hit-anim-index int32 :offset-assert 12) - (patrol-anim UNKNOWN 4 :offset-assert 16) - (charge-anim UNKNOWN 3 :offset-assert 48) - (attack-anim UNKNOWN 2 :offset-assert 72) - (knocked-anim UNKNOWN 4 :offset-assert 88) - (knocked-land-anim UNKNOWN 4 :offset-assert 120) - (yellow-hit-anim UNKNOWN 4 :offset-assert 152) - (blue-hit-anim UNKNOWN 6 :offset-assert 184) + (patrol-anim kg-grunt-anim-info 4 :inline :offset-assert 16) + (charge-anim kg-grunt-anim-info 3 :inline :offset-assert 48) + (attack-anim kg-grunt-anim-info 2 :inline :offset-assert 72) + (knocked-anim kg-grunt-anim-info 4 :inline :offset-assert 88) + (knocked-land-anim kg-grunt-anim-info 4 :inline :offset-assert 120) + (yellow-hit-anim kg-grunt-anim-info 4 :inline :offset-assert 152) + (blue-hit-anim kg-grunt-anim-info 6 :inline :offset-assert 184) ) :method-count-assert 9 :size-assert #xe8 :flag-assert #x9000000e8 ) -|# -#| (deftype kg-grunt (nav-enemy) ((patrol-anim kg-grunt-anim-info :offset-assert 620) (charge-anim kg-grunt-anim-info :offset-assert 624) @@ -44147,105 +44530,102 @@ (knocked-anim kg-grunt-anim-info :offset-assert 632) (yellow-hit-anim kg-grunt-anim-info :offset-assert 636) (blue-hit-anim kg-grunt-anim-info :offset-assert 640) - (intro-path basic :offset-assert 644) - (use-charge-anim-index int8 :offset-assert 652) + (intro-path path-control :offset-assert 644) + (use-charge-anim-index int8 :offset 652) (knocked-anim-index int8 :offset-assert 653) (jumping-ambush-path-pt int8 :offset-assert 654) (kg-grunt-flags uint8 :offset-assert 655) - (state-timeout2 uint64 :offset-assert 656) - (next-warn-time uint64 :offset-assert 664) + (state-timeout2 time-frame :offset-assert 656) + (next-warn-time time-frame :offset-assert 664) (dest vector :inline :offset-assert 672) - (focus-pos vector :inline :offset-assert 352) - (minimap connection-minimap :offset-assert 704) + (minimap connection-minimap :offset 704) (debris-count uint32 :offset-assert 708) (debris-mask uint32 :offset-assert 712) ) :method-count-assert 199 :size-assert #x2cc :flag-assert #xc7025002cc - (:methods - (kg-grunt-method-197 () none) ;; 197 - (kg-grunt-method-198 () none) ;; 198 - ) (:state-methods - stop-chase ;; 158 - pacing ;; 156 - spin-attack ;; 195 - wait-for-focus ;; 194 + active ;; 34 hostile ;; 38 + pacing ;; 156 + circling ;; 157 + stop-chase ;; 158 attack ;; 190 - active ;; 34 - jumping-ambush-cont ;; 193 - jumping-ambush ;; 192 falling-ambush ;; 191 - circling ;; 157 + jumping-ambush ;; 192 + jumping-ambush-cont ;; 193 + wait-for-focus ;; 194 + spin-attack ;; 195 explode ;; 196 ) + (:methods + (go-attack (_type_ float) process-focusable) ;; 197 + (get-nav-enemy-info (_type_) nav-enemy-info) ;; 198 + ) ) -|# -;; (define-extern *kg-grunt-debris-params* debris-static-params) -;; (define-extern *kg-grunt-debris-elbow-shoulder-params* debris-static-params) -;; (define-extern *kg-grunt-debris-array-params* array) -;; (define-extern *kg-grunt-debris-knee-hip-params* debris-static-params) -;; (define-extern *kg-grunt-global-info* kg-grunt-global-info) -;; (define-extern *fact-info-kg-grunt-defaults* fact-info-enemy-defaults) -;; (define-extern *kg-grunt-nav-enemy-info* nav-enemy-info) +(define-extern *kg-grunt-debris-params* debris-static-params) +(define-extern *kg-grunt-debris-elbow-shoulder-params* debris-static-params) +(define-extern *kg-grunt-debris-array-params* (array debris-static-params)) +(define-extern *kg-grunt-debris-knee-hip-params* debris-static-params) +(define-extern *kg-grunt-global-info* kg-grunt-global-info) +(define-extern *fact-info-kg-grunt-defaults* fact-info-enemy-defaults) +(define-extern *kg-grunt-nav-enemy-info* nav-enemy-info) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 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 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *range-color-sewer-gas* curve-color-fast) -;; (define-extern *range-alpha-sewer-gas* curve2d-fast) -;; (define-extern *range-scale-sewer-gas-x* curve2d-fast) -;; (define-extern *range-scale-sewer-gas-y* curve2d-fast) -;; (define-extern *r-curve-sewer-gas* curve2d-fast) -;; (define-extern *g-curve-sewer-gas* curve2d-fast) -;; (define-extern *b-curve-sewer-gas* curve2d-fast) -;; (define-extern *curve-alpha-sewer-gas* curve2d-fast) -;; (define-extern *curve-sewer-gas-x* curve2d-fast) -;; (define-extern *curve-sewer-gas-y* curve2d-fast) -;; (define-extern *part-sewer-steam-puff-curve-settings* object) -;; (define-extern *steam-particle-list* array) -;; (define-extern birth-func-texture-group-steam function) -;; (define-extern spt-func-birth-on-bubble-pop function) +(define-extern *range-color-sewer-gas* curve-color-fast) +(define-extern *range-alpha-sewer-gas* curve2d-fast) +(define-extern *range-scale-sewer-gas-x* curve2d-fast) +(define-extern *range-scale-sewer-gas-y* curve2d-fast) +(define-extern *r-curve-sewer-gas* curve2d-fast) +(define-extern *g-curve-sewer-gas* curve2d-fast) +(define-extern *b-curve-sewer-gas* curve2d-fast) +(define-extern *curve-alpha-sewer-gas* curve2d-fast) +(define-extern *curve-sewer-gas-x* curve2d-fast) +(define-extern *curve-sewer-gas-y* curve2d-fast) +(define-extern *part-sewer-steam-puff-curve-settings* particle-curve-settings) +(define-extern *steam-particle-list* (array int32)) +(define-extern birth-func-texture-group-steam (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-func-birth-on-bubble-pop (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sewer-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype sewb-states (structure) ((pulse pulse-state :inline :offset-assert 0) ) @@ -44253,9 +44633,7 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype sewc-states (structure) ((pulse pulse-state :inline :offset-assert 0) (electricity electricity-state :inline :offset-assert 16) @@ -44265,9 +44643,7 @@ :size-assert #x1c :flag-assert #x90000001c ) -|# -#| (deftype sewd-states (structure) ((pulse pulse-state :inline :offset-assert 0) (electricity electricity-state :inline :offset-assert 16) @@ -44277,31 +44653,25 @@ :size-assert #x1c :flag-assert #x90000001c ) -|# -#| (deftype sewg-states (structure) - ((electricity UNKNOWN 2 :offset-assert 0) - (rot float :offset-assert 32) + ((electricity electricity-state 2 :inline :offset-assert 0) + (rot float :offset 32) ) :method-count-assert 9 :size-assert #x24 :flag-assert #x900000024 ) -|# -#| (deftype sewh-states (structure) - ((electricity UNKNOWN 5 :offset-assert 0) - (turret-value float :offset-assert 80) + ((electricity electricity-state 5 :inline :offset-assert 0) + (turret-value float :offset 80) ) :method-count-assert 9 :size-assert #x54 :flag-assert #x900000054 ) -|# -#| (deftype sewj-states (structure) ((rot float :offset-assert 0) ) @@ -44309,40 +44679,33 @@ :size-assert #x4 :flag-assert #x900000004 ) -|# -#| -(deftype sewa-states (UNKNOWN) +(deftype sewa-states (structure) () - :method-count-assert 0 - :size-assert #x0 - :flag-assert #x0 ) -|# -;; (define-extern update-sewer-lights function) ;; (function mood-context none) -;; (define-extern update-mood-sewa function) -;; (define-extern init-mood-sewb function) -;; (define-extern update-mood-sewb function) -;; (define-extern init-mood-sewc function) -;; (define-extern update-mood-sewc function) -;; (define-extern init-mood-sewd function) -;; (define-extern update-mood-sewd function) -;; (define-extern set-sewd-light! function) -;; (define-extern init-mood-sewg function) -;; (define-extern update-mood-sewg function) -;; (define-extern set-sewg-electricity-scale! function) -;; (define-extern init-mood-sewh function) -;; (define-extern update-mood-sewh function) -;; (define-extern set-sewh-electricity-scale! function) -;; (define-extern set-sewh-turret-flash! function) -;; (define-extern update-mood-sewj function) +(define-extern update-sewer-lights (function mood-context none)) +(define-extern update-mood-sewa (function mood-context float int none :behavior time-of-day-proc)) +(define-extern init-mood-sewb (function mood-context float)) +(define-extern update-mood-sewb (function mood-context float int none :behavior time-of-day-proc)) +(define-extern init-mood-sewc (function mood-context float)) +(define-extern update-mood-sewc (function mood-context float int none :behavior time-of-day-proc)) +(define-extern init-mood-sewd (function mood-context float)) +(define-extern update-mood-sewd (function mood-context float int none :behavior time-of-day-proc)) +(define-extern set-sewd-light! (function float none)) +(define-extern init-mood-sewg (function mood-context float)) +(define-extern update-mood-sewg (function mood-context float int none :behavior time-of-day-proc)) +(define-extern set-sewg-electricity-scale! (function float int none)) +(define-extern init-mood-sewh (function mood-context float)) +(define-extern update-mood-sewh (function mood-context float int none :behavior time-of-day-proc)) +(define-extern set-sewh-electricity-scale! (function float int none)) +(define-extern set-sewh-turret-flash! (function none)) +(define-extern update-mood-sewj (function mood-context float int none :behavior time-of-day-proc)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sew-laser-guard ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype gun-turret-params (structure) ((normal-sg skeleton-group :offset-assert 0) ;; guessed by decompiler (explode-sg skeleton-group :offset-assert 4) ;; guessed by decompiler @@ -44358,39 +44721,35 @@ :size-assert #x40 :flag-assert #x900000040 ) -|# -#| (deftype sew-laser-guard (enemy) ((params gun-turret-params :offset-assert 552) (aim-pos vector :inline :offset-assert 560) - (smoke-part basic :offset-assert 576) - (casing-part basic :offset-assert 580) + (smoke-part sparticle-launch-control :offset-assert 576) + (casing-part sparticle-launch-control :offset-assert 580) (sync-orient sync-linear :inline :offset-assert 584) (start-orient quaternion :inline :offset-assert 608) (end-orient quaternion :inline :offset-assert 624) - (last-play-sweep-dir-positive? basic :offset-assert 640) + (last-play-sweep-dir-positive? symbol :offset-assert 640) (last-play-sweep-sync float :offset-assert 644) - (sound-hum uint32 :offset-assert 648) - (sound-scorch uint32 :offset-assert 652) + (sound-hum sound-id :offset-assert 648) + (sound-scorch sound-id :offset-assert 652) ) :method-count-assert 157 :size-assert #x290 :flag-assert #x9d02100290 - (:methods - (sew-laser-guard-method-155 () none) ;; 155 - (sew-laser-guard-method-156 () none) ;; 156 - ) (:state-methods hit ;; 30 - die ;; 40 stare ;; 37 hostile ;; 38 + die ;; 40 + ) + (:methods + (sew-laser-guard-method-155 (_type_) none) ;; 155 + (sew-laser-guard-method-156 (_type_) none) ;; 156 ) ) -|# -#| (deftype sew-laser-shot (projectile) () :method-count-assert 41 @@ -44400,40 +44759,34 @@ dissipate ;; 21 ) ) -|# -;; (define-extern sew-laser-shot-move function) -;; (define-extern *sew-laser-guard-enemy-info* enemy-info) -;; (define-extern fire-laser! function) +(define-extern sew-laser-shot-move (function sew-laser-shot none)) +(define-extern *sew-laser-guard-enemy-info* enemy-info) +(define-extern fire-laser! (function vector vector sew-laser-guard float none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sewer-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype sew-curved-door (com-airlock) () :method-count-assert 30 :size-assert #x1b0 :flag-assert #x1e013001b0 ) -|# -#| (deftype sew-floating-plat (elevator) () :method-count-assert 52 :size-assert #x1a0 :flag-assert #x34012001a0 ) -|# -#| (deftype sew-cam-sequencer (process) - ((activate-script basic :offset-assert 132) - (enter-script basic :offset-assert 136) - (exit-script basic :offset-assert 140) - (timeout uint64 :offset-assert 144) + ((activate-script pair :offset 132) + (enter-script pair :offset-assert 136) + (exit-script pair :offset-assert 140) + (timeout time-frame :offset-assert 144) (offset uint64 :offset-assert 152) ) :method-count-assert 15 @@ -44444,32 +44797,26 @@ active ;; 14 ) ) -|# -#| (deftype sew-floor-switch (process-drawable) () :method-count-assert 23 :size-assert #xc8 :flag-assert #x17005000c8 (:state-methods - idle-down ;; 22 - going-down ;; 21 idle-up ;; 20 + going-down ;; 21 + idle-down ;; 22 ) ) -|# -#| (deftype sew-jump-pad (jump-pad) () :method-count-assert 30 :size-assert #x100 :flag-assert #x1e00800100 ) -|# -#| (deftype sew-fan (enemy) ((activate-distance float :offset-assert 552) (path-pos float :offset-assert 556) @@ -44481,93 +44828,83 @@ (dest-quat quaternion :inline :offset-assert 624) (fan-rot float :offset-assert 640) (fan-rot-vel float :offset-assert 644) - (hostile-part basic :offset-assert 648) - (gust-part basic :offset-assert 652) - (sound-fan-loop-id uint32 :offset-assert 656) + (hostile-part sparticle-launch-control :offset-assert 648) + (gust-part sparticle-launch-control :offset-assert 652) + (sound-fan-loop-id sound-id :offset-assert 656) ) :method-count-assert 155 :size-assert #x294 :flag-assert #x9b02200294 (:state-methods - die ;; 40 - hostile ;; 38 + idle ;; 33 active ;; 34 notice ;; 35 - idle ;; 33 + hostile ;; 38 + die ;; 40 ) ) -|# -#| (deftype sew-elevator (process-drawable) () :method-count-assert 22 :size-assert #xc8 :flag-assert #x16005000c8 - (:methods - (sew-elevator-method-21 () none) ;; 21 - ) (:state-methods idle ;; 20 ) + (:methods + (init-collision! (_type_) none) ;; 21 + ) ) -|# -#| (deftype sew-gate (process-drawable) - ((play-time uint64 :offset-assert 200) - (sound-played1 basic :offset-assert 208) - (sound-played2 basic :offset-assert 212) + ((play-time time-frame :offset-assert 200) + (sound-played1 symbol :offset-assert 208) + (sound-played2 symbol :offset-assert 212) ) :method-count-assert 23 :size-assert #xd8 :flag-assert #x17006000d8 (:state-methods - opened ;; 22 - open ;; 21 idle ;; 20 + open ;; 21 + opened ;; 22 ) ) -|# -#| (deftype sew-wall-switch (process-drawable) - ((actor-group uint32 :offset-assert 196) - (actor-group-count int32 :offset-assert 200) - (minimap connection-minimap :offset-assert 204) + ((actor-group (pointer actor-group) :offset-assert 200) + (actor-group-count int32 :offset-assert 204) + (minimap connection-minimap :offset-assert 208) ) :method-count-assert 23 :size-assert #xd4 :flag-assert #x17006000d4 (:state-methods - opened ;; 22 - open ;; 21 idle ;; 20 + open ;; 21 + opened ;; 22 ) ) -|# -#| (deftype sew-fence-gate (process-drawable) () :method-count-assert 24 :size-assert #xc8 :flag-assert #x18005000c8 (:state-methods - closing ;; 23 - opening ;; 22 - open ;; 21 closed ;; 20 + open ;; 21 + opening ;; 22 + closing ;; 23 ) ) -|# -#| (deftype sew-vent (process-drawable) ((sync sync-linear :inline :offset-assert 200) (attack-id int32 :offset-assert 216) (last-sync-val float :offset-assert 220) - (vent-sound uint32 :offset-assert 224) + (vent-sound sound-id :offset-assert 224) ) :method-count-assert 21 :size-assert #xe4 @@ -44576,27 +44913,23 @@ idle ;; 20 ) ) -|# -#| (deftype sew-power-switch (process-drawable) () :method-count-assert 22 :size-assert #xc8 :flag-assert #x16005000c8 (:state-methods - turned-off ;; 21 idle ;; 20 + turned-off ;; 21 ) ) -|# -#| (deftype sew-gas-step (base-plat) - ((sound-id uint32 :offset-assert 272) + ((sound-id sound-id :offset-assert 272) (sync sync-linear :inline :offset-assert 280) (last-sync-val float :offset-assert 296) - (gas-time uint64 :offset-assert 304) + (gas-time time-frame :offset-assert 304) (attack-id int32 :offset-assert 312) ) :method-count-assert 36 @@ -44606,34 +44939,32 @@ idle ;; 35 ) ) -|# -;; (define-extern sewer-login function) -;; (define-extern sewer-logout function) -;; (define-extern sewb-activate function) -;; (define-extern sewc-activate function) -;; (define-extern sewg-activate function) -;; (define-extern sewl-activate function) -;; (define-extern sewo-activate function) -;; (define-extern sewj-activate function) -;; (define-extern sew-cam-sequencer-init-by-other function) -;; (define-extern sew-cam-eval-script function) -;; (define-extern *sew-fan-enemy-info* enemy-info) -;; (define-extern *sew-fan-exploder-params* joint-exploder-static-params) -;; (define-extern update-surface-float function) -;; (define-extern update-idle function) -;; (define-extern update-hostile function) -;; (define-extern sew-fan-joint-fan function) -;; (define-extern sew-fan-joint-floor function) +(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) +(define-extern *sew-fan-exploder-params* joint-exploder-static-params) +(define-extern update-surface-float (function float :behavior sew-fan)) +(define-extern update-idle (function none :behavior sew-fan)) +(define-extern update-hostile (function none :behavior sew-fan)) +(define-extern sew-fan-joint-fan (function cspace transformq none)) +(define-extern sew-fan-joint-floor (function cspace transformq none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sewer-obs2 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype sew-laser-beam (process-drawable) ((sync sync-linear :inline :offset-assert 200) - (sound-id uint32 :offset-assert 216) + (sound-id sound-id :offset-assert 216) ) :method-count-assert 21 :size-assert #xdc @@ -44642,41 +44973,35 @@ idle ;; 20 ) ) -|# -#| (deftype sew-m-gate (process-drawable) - ((actor-group uint32 :offset-assert 196) - (actor-group-count int32 :offset-assert 200) + ((actor-group (pointer actor-group) :offset-assert 200) + (actor-group-count int32 :offset-assert 204) ) :method-count-assert 23 :size-assert #xd0 :flag-assert #x17005000d0 (:state-methods - raised ;; 22 - open ;; 21 idle ;; 20 + open ;; 21 + raised ;; 22 ) ) -|# -#| (deftype sew-pipe (process-drawable) - ((actor-group uint32 :offset-assert 196) - (actor-group-count int32 :offset-assert 200) + ((actor-group (pointer actor-group) :offset-assert 200) + (actor-group-count int32 :offset-assert 204) ) :method-count-assert 23 :size-assert #xd0 :flag-assert #x17005000d0 (:state-methods - down ;; 22 - lower ;; 21 idle ;; 20 + lower ;; 21 + down ;; 22 ) ) -|# -#| (deftype sew-grate-plat (process-drawable) ((test-pos vector :inline :offset-assert 208) (closed-x float :offset-assert 224) @@ -44686,73 +45011,68 @@ :size-assert #xe8 :flag-assert #x18007000e8 (:state-methods - close ;; 23 - opened ;; 22 - open ;; 21 closed ;; 20 + open ;; 21 + opened ;; 22 + close ;; 23 ) ) -|# -;; (define-extern fire-sew-laser-beam! function) -;; (define-extern *sew-laser-beam-shadow-control* shadow-control) +(define-extern fire-sew-laser-beam! (function vector vector sew-laser-beam none)) +(define-extern *sew-laser-beam-shadow-control* shadow-control) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sewer-move-turret ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype sew-move-turret (process-drawable) - ((sound-id uint32 :offset-assert 200) - (use-doppler? basic :offset-assert 204) + ((sound-id sound-id :offset-assert 200) + (use-doppler? symbol :offset-assert 204) ) :method-count-assert 23 :size-assert #xd0 :flag-assert #x17005000d0 - (:methods - (sew-move-turret-method-22 () none) ;; 22 - ) (:state-methods - active ;; 21 idle ;; 20 + active ;; 21 + ) + (:methods + (sew-move-turret-method-22 (_type_ int) none) ;; 22 ) ) -|# -#| (deftype sew-move-turret-shot (guard-shot) - ((doppler-sound uint32 :offset-assert 544) - (use-doppler? basic :offset-assert 548) + ((doppler-sound sound-id :offset-assert 544) + (use-doppler? symbol :offset-assert 548) ) :method-count-assert 41 :size-assert #x228 :flag-assert #x2901b00228 ) -|# -;; (define-extern sew-turret-shot-move function) -;; (define-extern spawn-sew-move-turret-projectile function) +(define-extern sew-turret-shot-move (function sew-move-turret-shot none)) +(define-extern spawn-sew-move-turret-projectile (function sew-move-turret vector vector float vector (pointer sew-move-turret-shot))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 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 ;; @@ -44760,60 +45080,57 @@ ;; gun-turret-params is already defined! -#| (deftype sew-laser-turret (enemy) ((params gun-turret-params :offset-assert 552) (aim-pos vector :inline :offset-assert 560) - (smoke-part basic :offset-assert 576) - (casing-part basic :offset-assert 580) - (flash-state basic :offset-assert 584) - (can-shoot basic :offset-assert 588) - (last-active-time uint64 :offset-assert 592) + (smoke-part sparticle-launch-control :offset-assert 576) + (casing-part sparticle-launch-control :offset-assert 580) + (flash-state symbol :offset-assert 584) + (can-shoot symbol :offset-assert 588) + (last-active-time time-frame :offset-assert 592) (target-distance float :offset-assert 600) - (target-on-ground basic :offset-assert 604) - (was-hit basic :offset-assert 608) + (target-on-ground symbol :offset-assert 604) + (was-hit symbol :offset-assert 608) (awareness-radius float :offset-assert 612) - (ring-rate uint64 :offset-assert 616) + (ring-rate time-frame :offset-assert 616) (max-num-rings int32 :offset-assert 624) (last-spawn-index int32 :offset-assert 628) - (spin-sound-id uint32 :offset-assert 632) - (last-play-time uint64 :offset-assert 640) - (strip basic :offset-assert 648) + (spin-sound-id sound-id :offset-assert 632) + (last-play-time time-frame :offset-assert 640) + (strip prim-strip :offset-assert 648) ) :method-count-assert 164 :size-assert #x28c :flag-assert #xa40210028c - (:methods - (sew-laser-turret-method-159 () none) ;; 159 - (sew-laser-turret-method-160 () none) ;; 160 - (sew-laser-turret-method-161 () none) ;; 161 - (sew-laser-turret-method-162 () none) ;; 162 - (sew-laser-turret-method-163 () none) ;; 163 - ) (:state-methods - turn-off ;; 158 hostile ;; 38 - alert ;; 155 die ;; 40 - spinning-down ;; 157 + alert ;; 155 spinning-up ;; 156 + spinning-down ;; 157 + turn-off ;; 158 + ) + (:methods + (start-firing (_type_ symbol int) none) ;; 159 + (sew-laser-turret-method-160 (_type_) none) ;; 160 + (generate-prim-verts! (_type_ float float) none) ;; 161 + (check-suitable-focus (_type_) symbol) ;; 162 + (sew-laser-turret-method-163 (_type_) none) ;; 163 ) ) -|# -;; (define-extern *sew-laser-turret-enemy-info* enemy-info) -;; (define-extern do-spin function) -;; (define-extern compute-ring-period function) -;; (define-extern compute-ring-position function) -;; (define-extern compute-num-rings-to-draw function) -;; (define-extern compute-ring-size function) -;; (define-extern check-enemy function) +(define-extern *sew-laser-turret-enemy-info* enemy-info) +(define-extern do-spin (function sew-laser-turret float quaternion)) +(define-extern compute-ring-period (function int float)) +(define-extern compute-ring-position (function int int float)) +(define-extern compute-num-rings-to-draw (function time-frame time-frame float int int)) +(define-extern compute-ring-size (function float float float)) +(define-extern check-enemy (function sew-laser-turret float process-focusable symbol)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sew-platforms ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype sew-plat-updown (base-plat) ((sync sync-eased :inline :offset-assert 272) (path-pos float :offset-assert 316) @@ -44821,19 +45138,17 @@ :method-count-assert 38 :size-assert #x140 :flag-assert #x2600c00140 - (:methods - (sew-plat-updown-method-37 () none) ;; 37 - ) (:state-methods - active ;; 36 idle ;; 35 + active ;; 36 + ) + (:methods + (get-skel (_type_) art-group) ;; 37 ) ) -|# -#| (deftype sew-slide-step (sew-plat-updown) - ((last-played-start? basic :offset-assert 320) + ((last-played-start? symbol :offset-assert 320) ) :method-count-assert 38 :size-assert #x144 @@ -44842,11 +45157,9 @@ active ;; 36 ) ) -|# -#| (deftype sew-moving-step-a (sew-plat-updown) - ((last-played-start? basic :offset-assert 320) + ((last-played-start? symbol :offset-assert 320) (last-val float :offset-assert 324) ) :method-count-assert 38 @@ -44856,36 +45169,32 @@ active ;; 36 ) ) -|# -#| (deftype sew-moving-step-b (process-drawable) ((sync sync-linear :inline :offset-assert 200) (num-steps int8 :offset-assert 216) - (step-delay uint64 :offset-assert 224) + (step-delay time-frame :offset-assert 224) (start-step-pos vector :inline :offset-assert 240) (end-step-pos vector :inline :offset-assert 256) (last-sync-val float :offset-assert 272) - (sound-idle uint32 :offset-assert 276) + (sound-idle sound-id :offset-assert 276) ) :method-count-assert 27 :size-assert #x118 :flag-assert #x1b00a00118 - (:methods - (sew-moving-step-b-method-22 () none) ;; 22 - (sew-moving-step-b-method-23 () none) ;; 23 - (sew-moving-step-b-method-24 () none) ;; 24 - (sew-moving-step-b-method-25 () none) ;; 25 - (sew-moving-step-b-method-26 () none) ;; 26 - ) (:state-methods - active ;; 21 idle ;; 20 + active ;; 21 + ) + (:methods + (sew-moving-step-b-method-22 (_type_ float) int) ;; 22 + (sew-moving-step-b-method-23 (_type_) float) ;; 23 + (sew-moving-step-b-method-24 (_type_) int) ;; 24 + (alloc-trsqv! (_type_) none) ;; 25 + (sew-moving-step-b-method-26 (_type_ int float) float) ;; 26 ) ) -|# -#| (deftype sew-moving-step-b-step (base-plat) ((start-pos vector :inline :offset-assert 272) (end-pos vector :inline :offset-assert 288) @@ -44903,25 +45212,21 @@ die ;; 36 ) ) -|# -#| (deftype sew-moving-step-b-step-param (structure) ((start-pos vector :inline :offset-assert 0) (end-pos vector :inline :offset-assert 16) - (ent basic :offset-assert 32) - (period uint64 :offset-assert 40) + (ent entity-actor :offset-assert 32) + (period time-frame :offset-assert 40) (offset float :offset-assert 48) ) :method-count-assert 9 :size-assert #x34 :flag-assert #x900000034 ) -|# -#| (deftype sew-rove-plat (sew-plat-updown) - ((sound-id uint32 :offset-assert 320) + ((sound-id sound-id :offset-assert 320) ) :method-count-assert 38 :size-assert #x144 @@ -44930,12 +45235,10 @@ active ;; 36 ) ) -|# -#| (deftype sew-move-plat (base-plat) - ((sound-id uint32 :offset-assert 272) - (positions UNKNOWN 2 :offset-assert 288) + ((sound-id sound-id :offset-assert 272) + (positions vector 2 :inline :offset-assert 288) (current-pos-index int8 :offset-assert 320) (dest-pos-index int8 :offset-assert 321) (speed float :offset-assert 324) @@ -44943,27 +45246,25 @@ :method-count-assert 38 :size-assert #x148 :flag-assert #x2600d00148 - (:methods - (sew-move-plat-method-37 () none) ;; 37 - ) (:state-methods - active ;; 36 waiting ;; 35 + active ;; 36 + ) + (:methods + (sew-move-plat-method-37 (_type_) int) ;; 37 ) ) -|# -;; (define-extern sew-moving-step-b-step-init-by-other function) -;; (define-extern fmod function) -;; (define-extern spawn-moving-step-b-step function) +(define-extern sew-moving-step-b-step-init-by-other (function sew-moving-step-b-step-param object :behavior sew-moving-step-b-step)) +(define-extern fmod (function float float float)) +(define-extern spawn-moving-step-b-step (function sew-moving-step-b float sew-moving-step-b-step)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; sew-whirlpool ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype sew-whirlpool (process-drawable) - ((spool-sound-id uint32 :offset-assert 200) + ((spool-sound-id sound-id :offset-assert 200) ) :method-count-assert 21 :size-assert #xcc @@ -44972,239 +45273,262 @@ idle ;; 20 ) ) -|# ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; saberfish ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype saberfish-jump-info (structure) ((windup-anim uint32 :offset-assert 0) (air-anim uint32 :offset-assert 4) (land-anim uint32 :offset-assert 8) ) + :pack-me :method-count-assert 9 :size-assert #xc :flag-assert #x90000000c ) -|# -#| (deftype saberfish-init-by-other-params (enemy-init-by-other-params) - ((spawn-parent uint64 :offset-assert 48) - (message basic :offset-assert 56) + ((spawn-parent handle :offset-assert 48) + (message symbol :offset-assert 56) (pos vector :inline :offset-assert 64) (orient quaternion :inline :offset-assert 80) - (initial-state basic :offset-assert 96) + (initial-state symbol :offset-assert 96) ) :method-count-assert 9 :size-assert #x64 :flag-assert #x900000064 ) -|# -#| +;; +++saberfish:saberfish-query-type +(defenum saberfish-query-type + :type uint64 + (set-nav-idx) + (set-mesh) + (set-in-water) + (can-go-to-ground?) + ) +;; ---saberfish:saberfish-query-type + +;; +++saberfish:saberfish-find-behavior +(defenum saberfish-find-behavior + :type uint64 + (none) + (behavior1) + (behavior2) + ) +;; ---saberfish:saberfish-find-behavior + (deftype saberfish-spawner-query-msg (structure) - ((query-type uint64 :offset-assert 0) + ((query-type saberfish-query-type :offset-assert 0) (closest-nav-mesh-index int8 :offset-assert 8) (pos vector :inline :offset-assert 16) - (behavior uint64 :offset-assert 32) - (nav-mesh-index int8 :offset-assert 8) - (mesh basic :offset-assert 16) - (in-water? basic :offset-assert 40) - (can-go-to-ground? basic :offset-assert 40) + (behavior saberfish-find-behavior :offset-assert 32) + (nav-mesh-index int8 :offset 8) + (mesh nav-mesh :offset 16 :score 1) + (in-water? symbol :offset 40) + (can-go-to-ground? symbol :offset 40) ) :method-count-assert 9 :size-assert #x2c :flag-assert #x90000002c ) -|# -#| +;; +++saberfish:saberfish-command +(defenum saberfish-command + :type int32 + (attack 0) + (hostile-orient 1) + (hostile 2) + (spin-attack 3) + (stare 4) + (start-terrain-transition 5) + ) +;; ---saberfish:saberfish-command + (deftype saberfish (nav-enemy) ((initial-y-angle float :offset-assert 620) - (last-attack-time uint64 :offset-assert 624) - (in-pursuit? basic :offset-assert 632) - (flee-to-readjust? basic :offset-assert 636) - (use-stored-flee-point? basic :offset-assert 640) - (scare-start-time uint64 :offset-assert 648) - (scare-time uint64 :offset-assert 656) + (last-attack-time time-frame :offset-assert 624) + (in-pursuit? symbol :offset-assert 632) + (flee-to-readjust? symbol :offset-assert 636) + (use-stored-flee-point? symbol :offset-assert 640) + (scare-start-time time-frame :offset-assert 648) + (scare-time time-frame :offset-assert 656) (jump-point-start vector :inline :offset-assert 672) (jump-point-end vector :inline :offset-assert 688) - (align basic :offset-assert 148) - (jump saberfish-jump-info :inline :offset-assert 708) + (jump saberfish-jump-info :inline :offset 708) (flee-point-temp vector :inline :offset-assert 720) - (last-land-check-time uint64 :offset-assert 736) - (last-target-check-time uint64 :offset-assert 744) - (is-submerged? basic :offset-assert 752) + (last-land-check-time time-frame :offset-assert 736) + (last-target-check-time time-frame :offset-assert 744) + (is-submerged? symbol :offset-assert 752) (current-nav-mesh-index int8 :offset-assert 756) (dest-nav-mesh-index int8 :offset-assert 757) (desired-dest-nav-point vector :inline :offset-assert 768) (desired-dest-mesh-index int8 :offset-assert 784) (flee-point vector :inline :offset-assert 800) - (spawn-parent uint64 :offset-assert 816) + (spawn-parent handle :offset-assert 816) (pos-start vector :inline :offset-assert 832) (quat-start quaternion :inline :offset-assert 848) - (move-to-ground? basic :offset-assert 864) + (move-to-ground? symbol :offset-assert 864) (swim-final-rotate-deg float :offset-assert 868) (swim-travel-anim int8 :offset-assert 872) (swim-speed float :offset-assert 876) (swim-rotate-last-dot float :offset-assert 880) (swim-anim-last-dot float :offset-assert 884) - (last-swim-flip-time uint64 :offset-assert 888) + (last-swim-flip-time time-frame :offset-assert 888) (saberfish-y-rotate float :offset-assert 896) - (doing-180-spin? basic :offset-assert 900) - (adjusted-y-yet? basic :offset-assert 904) + (doing-180-spin? symbol :offset-assert 900) + (adjusted-y-yet? symbol :offset-assert 904) (attack-dir vector :inline :offset-assert 912) (rotate-anim-quat quaternion :inline :offset-assert 928) (post-spinflip-expected-heading vector :inline :offset-assert 944) (nav-velocity vector :inline :offset-assert 960) (nav-dir vector :inline :offset-assert 976) - (initial-state basic :offset-assert 992) - (knocked-under-water? basic :offset-assert 996) + (initial-state symbol :offset-assert 992) + (knocked-under-water? symbol :offset-assert 996) (ground-state uint8 :offset-assert 1000) (jump-start-ground-state uint8 :offset-assert 1001) - (ground-only? basic :offset-assert 1004) + (ground-only? symbol :offset-assert 1004) ) :method-count-assert 245 :size-assert #x3f0 :flag-assert #xf5037003f0 - (:methods - (saberfish-method-195 () none) ;; 195 - (saberfish-method-199 () none) ;; 199 - (saberfish-method-201 () none) ;; 201 - (saberfish-method-202 () none) ;; 202 - (saberfish-method-210 () none) ;; 210 - (saberfish-method-214 () none) ;; 214 - (saberfish-method-215 () none) ;; 215 - (saberfish-method-216 () none) ;; 216 - (saberfish-method-217 () none) ;; 217 - (saberfish-method-218 () none) ;; 218 - (saberfish-method-219 () none) ;; 219 - (saberfish-method-220 () none) ;; 220 - (saberfish-method-221 () none) ;; 221 - (saberfish-method-222 () none) ;; 222 - (saberfish-method-223 () none) ;; 223 - (saberfish-method-224 () none) ;; 224 - (saberfish-method-225 () none) ;; 225 - (saberfish-method-226 () none) ;; 226 - (saberfish-method-227 () none) ;; 227 - (saberfish-method-228 () none) ;; 228 - (saberfish-method-229 () none) ;; 229 - (saberfish-method-230 () none) ;; 230 - (saberfish-method-231 () none) ;; 231 - (saberfish-method-232 () none) ;; 232 - (saberfish-method-233 () none) ;; 233 - (saberfish-method-234 () none) ;; 234 - (saberfish-method-235 () none) ;; 235 - (saberfish-method-236 () none) ;; 236 - (saberfish-method-237 () none) ;; 237 - (saberfish-method-238 () none) ;; 238 - (saberfish-method-239 () none) ;; 239 - (saberfish-method-240 () none) ;; 240 - (saberfish-method-241 () none) ;; 241 - (saberfish-method-242 () none) ;; 242 - (saberfish-method-243 () none) ;; 243 - (saberfish-method-244 () none) ;; 244 - ) (:state-methods - saberfish-swimming ;; 213 - saberfish-crawl-out-of-tube ;; 209 - notice ;; 35 - command-mode ;; 206 + hit ;; 30 + knocked ;; 31 knocked-recover ;; 32 + idle ;; 33 + active ;; 34 + notice ;; 35 flee ;; 36 + stare ;; 37 + hostile ;; 38 + attack ;; 190 + hostile-orient ;; 191 + swimming-hostile ;; 192 + spin-attack ;; 193 + stare-idle ;; 194 + undefined0 ;; 195, not defined transition-terrain-move-towards-initial-jump ;; 196 transition-terrain-orient-towards-initial-jump ;; 197 transition-terrain-jump ;; 198 - knocked ;; 31 - water-impact ;; 205 + undefined1 ;; 199, not defined + water-land ;; 200 + undefined2 ;; 201, not defined + undefined3 ;; 202, not defined base-saberfish-state ;; 203 - attack ;; 190 diving-into-water ;; 204 - hit ;; 30 - knocked-recover-water ;; 212 - hostile ;; 38 - stare-idle ;; 194 - idle ;; 33 + water-impact ;; 205 + command-mode ;; 206 swim-180-spin ;; 207 - hostile-orient ;; 191 - saberfish-sitting-on-land ;; 211 - stare ;; 37 - spin-attack ;; 193 - water-land ;; 200 - active ;; 34 swimming-base ;; 208 - swimming-hostile ;; 192 + saberfish-crawl-out-of-tube ;; 209 + undefined4 ;; 210, not defined + saberfish-sitting-on-land ;; 211 + knocked-recover-water ;; 212 + saberfish-swimming ;; 213 ) - ) -|# - -;; (define-extern find-behavior<-in-water? function) -;; (define-extern in-water<-find-behavior function) -;; (define-extern *saberfish-nav-enemy-info* nav-enemy-info) -;; (define-extern get-spawn-parent function) -;; (define-extern saberfish-water-post function) -;; (define-extern saberfish-chase-post function) -;; (define-extern saberfish-orient-code-setup function) -;; (define-extern saberfish-orient-code-single-pass function) -;; (define-extern saberfish-orient-code function) -;; (define-extern saberfish-swim-code function) -;; (define-extern saberfish-swim-travel-trans function) -;; (define-extern swimming-base-exit function) -;; (define-extern transition-terrain-jump-from-water state) -;; (define-extern jump-from-land-dive-anim function) -;; (define-extern transition-terrain-jump-from-land state) -;; (define-extern transition-pursue-behavior function) -;; (define-extern turbo-swim function) -;; (define-extern saberfish-command-event-handler function) -;; (define-extern saberfish-init-by-other function) -;; (define-extern find-ground-for-obj function) + (:methods + (saberfish-method-214 (_type_ vector) float) ;; 214 + (saberfish-method-215 (_type_) float) ;; 215 + (get-cmd (_type_) saberfish-command) ;; 216 + (saberfish-method-217 (_type_) none) ;; 217 + (saberfish-method-218 (_type_) none) ;; 218 + (saberfish-method-219 (_type_) none) ;; 219 + (saberfish-method-220 (_type_) none) ;; 220 + (handle-cmd (_type_ saberfish-command) object) ;; 221 + (attack-delay-elapsed? (_type_) symbol) ;; 222 + (saberfish-method-223 (_type_) none) ;; 223 + (go-terrain-transition (_type_ symbol) object) ;; 224 + (get-nav-mesh-idx (_type_ vector saberfish-find-behavior) int) ;; 225 + (start-terrain-transition (_type_) object) ;; 226 + (desired-nav-idx-valid? (_type_) symbol) ;; 227 + (saberfish-method-228 (_type_) symbol) ;; 228 + (set-dest-nav! (_type_ vector saberfish-find-behavior) none) ;; 229 + (change-nav-mesh (_type_) none) ;; 230 + (saberfish-method-231 (_type_ vector float symbol vector) symbol) ;; 231 + (do-jump (_type_) object) ;; 232 + (saberfish-method-233 (_type_) nav-poly) ;; 233 + (saberfish-method-234 (_type_ vector) none) ;; 234 + (on-submerged (_type_ symbol) none) ;; 235 + (saberfish-method-236 (_type_ int) nav-mesh) ;; 236 + (saberfish-method-237 (_type_ int) symbol) ;; 237 + (saberfish-method-238 (_type_ symbol float float) object) ;; 238 + (saberfish-method-239 (_type_ vector) float) ;; 239 + (saberfish-method-240 (_type_ time-frame) none) ;; 240 + (saberfish-method-241 (_type_) symbol) ;; 241 + (get-ground-state (_type_) int) ;; 242 + (saberfish-method-243 (_type_) symbol) ;; 243 + (set-should-move-to-ground (_type_) none) ;; 244 + ) + (:states + transition-terrain-jump-from-water + transition-terrain-jump-from-land + ) + ) + +(define-extern find-behavior<-in-water? (function symbol saberfish-find-behavior)) +(define-extern in-water<-find-behavior (function saberfish-find-behavior symbol)) +(define-extern *saberfish-nav-enemy-info* nav-enemy-info) +(define-extern get-spawn-parent (function process :behavior saberfish)) +(define-extern saberfish-water-post (function none :behavior saberfish)) +(define-extern saberfish-chase-post (function none :behavior saberfish)) +(define-extern saberfish-orient-code-setup (function none :behavior saberfish)) +(define-extern saberfish-orient-code-single-pass (function float float :behavior saberfish)) +(define-extern saberfish-orient-code (function none :behavior saberfish)) +(define-extern saberfish-swim-code (function none :behavior saberfish)) +(define-extern saberfish-swim-travel-trans (function none :behavior saberfish)) +(define-extern swimming-base-exit (function none :behavior saberfish)) +(define-extern jump-from-land-dive-anim (function none :behavior saberfish)) +(define-extern transition-pursue-behavior (function none :behavior saberfish)) +(define-extern turbo-swim (function symbol :behavior saberfish)) +(define-extern saberfish-command-event-handler (function process int symbol event-message-block object :behavior saberfish)) +(define-extern saberfish-init-by-other (function process-drawable saberfish-init-by-other-params object :behavior saberfish)) +(define-extern find-ground-for-obj (function process-focusable int)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; saberfish-spawner ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; path-index-array is already defined! +(deftype path-index-array (inline-array-class) + ((data int8 :dynamic :offset-assert 16) ;; guessed by decompiler + ) + :method-count-assert 14 + :size-assert #x10 + :flag-assert #xe00000010 + ) -#| (deftype nav-mesh-jump (structure) - ((mesh basic :offset-assert 0) - (paths basic :offset-assert 4) - (in-water? basic :offset-assert 8) + ((mesh nav-mesh :offset-assert 0) + (paths path-index-array :offset-assert 4) + (in-water? symbol :offset-assert 8) ) :method-count-assert 9 :size-assert #xc :flag-assert #x90000000c ) -|# -#| (deftype nav-mesh-jump-array (inline-array-class) - ((data UNKNOWN :dynamic :offset-assert 16) + ((data nav-mesh-jump :dynamic :inline :offset-assert 16) ) :method-count-assert 14 :size-assert #x10 :flag-assert #xe00000010 ) -|# -#| (deftype saberfish-spawner-command (structure) - ((command basic :offset-assert 0) - (message basic :offset-assert 4) - (initial-state basic :offset-assert 8) - (parent uint64 :offset-assert 16) + ((command symbol :offset-assert 0) + (message symbol :offset-assert 4) + (initial-state symbol :offset-assert 8) + (parent handle :offset-assert 16) ) :method-count-assert 9 :size-assert #x18 :flag-assert #x900000018 ) -|# -#| (deftype saberfish-spawn-query (structure) ((alive-count int16 :offset-assert 0) ) @@ -45212,61 +45536,55 @@ :size-assert #x2 :flag-assert #x900000002 ) -|# -#| (deftype saberfish-spawner (process-drawable) - ((jump-paths basic :offset-assert 200) - (nav-mesh-jumps basic :offset-assert 204) + ((jump-paths (array path-control) :offset-assert 200) + (nav-mesh-jumps nav-mesh-jump-array :offset-assert 204) (live-count int8 :offset-assert 208) - (last-spawned-process uint64 :offset-assert 216) - (mgr-parent uint64 :offset-assert 224) - (spawned-saberfish UNKNOWN 128 :offset-assert 232) + (last-spawned-process handle :offset-assert 216) + (mgr-parent handle :offset-assert 224) + (spawned-saberfish handle 128 :offset-assert 232) (num-spawned-saberfish int32 :offset-assert 1256) ) :method-count-assert 27 :size-assert #x4ec :flag-assert #x1b047004ec - (:methods - (saberfish-spawner-method-21 () none) ;; 21 - (saberfish-spawner-method-22 () none) ;; 22 - (saberfish-spawner-method-23 () none) ;; 23 - (saberfish-spawner-method-24 () none) ;; 24 - (saberfish-spawner-method-25 () none) ;; 25 - (saberfish-spawner-method-26 () none) ;; 26 - ) (:state-methods saberfish-spawner-base-state ;; 20 ) + (:methods + (saberfish-spawner-method-21 (_type_) none) ;; 21 + (saberfish-spawner-method-22 (_type_ vector saberfish-find-behavior) int) ;; 22 + (draw-paths (_type_) none) ;; 23 + (saberfish-spawner-method-24 (_type_ saberfish) int) ;; 24 + (spawn-saberfish (_type_ symbol symbol process) none) ;; 25 + (saberfish-spawner-method-26 (_type_ process int symbol event-message-block) object) ;; 26 + ) ) -|# -#| (deftype saberfish-spawn-manager-base (process) - ((actor-group uint32 :offset-assert 124) - (actor-group-count int32 :offset-assert 128) - (total-num-spawned int32 :offset-assert 132) - (total-alive int32 :offset-assert 136) - (spawn-timer uint64 :offset-assert 140) - (state-time uint64 :offset-assert 148) - (allowed-on-land-count int8 :offset-assert 156) + ((actor-group (pointer actor-group) :offset-assert 128) + (actor-group-count int32 :offset-assert 132) + (total-num-spawned int32 :offset-assert 136) + (total-alive int32 :offset-assert 140) + (spawn-timer time-frame :offset-assert 144) + (state-time time-frame :offset-assert 152) + (allowed-on-land-count int8 :offset-assert 160) ) :method-count-assert 19 :size-assert #xa1 :flag-assert #x13003000a1 - (:methods - (saberfish-spawn-manager-base-method-16 () none) ;; 16 - (saberfish-spawn-manager-base-method-17 () none) ;; 17 - (saberfish-spawn-manager-base-method-18 () none) ;; 18 - ) (:state-methods - idle ;; 15 active ;; 14 + idle ;; 15 + ) + (:methods + (go-active (_type_) object) ;; 16 + (get-alive-count (_type_) int) ;; 17 + (get-alive-count-grounded (_type_ int) int) ;; 18 ) ) -|# -#| (deftype saberfish-mgr-room1 (saberfish-spawn-manager-base) () :method-count-assert 19 @@ -45276,25 +45594,22 @@ active ;; 14 ) ) -|# -#| (deftype saberfish-mgr-room2 (saberfish-spawn-manager-base) () :method-count-assert 22 :size-assert #xa1 :flag-assert #x16003000a1 (:state-methods - stage-2 ;; 21 - stage-1 ;; 20 stage-0 ;; 19 + stage-1 ;; 20 + stage-2 ;; 21 ) ) -|# -;; (define-extern *temporary-closest-nav-mesh-indices* object) -;; (define-extern *temporary-num-paths-per-nav-mesh-count* object) -;; (define-extern saberfish-mgr-event-handler function) +(define-extern *temporary-closest-nav-mesh-indices* (pointer int8)) +(define-extern *temporary-num-paths-per-nav-mesh-count* (pointer uint8)) +(def-event-handler saberfish-mgr-event-handler saberfish-spawn-manager-base) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; needle-fish ;; @@ -45361,117 +45676,119 @@ ;; sewer-frog ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype sewer-frog (nav-enemy) - ((scared-timer uint64 :offset-assert 624) + ((scared-timer time-frame :offset-assert 624) ) :method-count-assert 193 :size-assert #x278 :flag-assert #xc102000278 - (:methods - (sewer-frog-method-192 () none) ;; 192 - ) (:state-methods knocked ;; 31 + active ;; 34 flee ;; 36 - hostile ;; 38 stare ;; 37 + hostile ;; 38 attack ;; 190 - active ;; 34 turn-to-face-focus ;; 191 ) + (:methods + (sewer-frog-method-192 (_type_) none) ;; 192 + ) ) -|# -;; (define-extern *fact-info-sewer-frog-defaults* fact-info-enemy-defaults) -;; (define-extern *sewer-frog-nav-enemy-info* nav-enemy-info) -;; (define-extern sewer-frog-hop function) -;; (define-extern sewer-frog-turn-to-face function) -;; (define-extern sewer-frog-check-hop function) +(define-extern *fact-info-sewer-frog-defaults* fact-info-enemy-defaults) +(define-extern *sewer-frog-nav-enemy-info* nav-enemy-info) +(define-extern sewer-frog-hop (function none :behavior sewer-frog)) +(define-extern sewer-frog-turn-to-face (function vector none :behavior sewer-frog)) +(define-extern sewer-frog-check-hop (function none :behavior sewer-frog)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; spydroid-orig ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++spydroid-orig:spydroid-orig-flag +(defenum spydroid-orig-flag + :type uint64 + :bitfield #t + (sof0 0) + (sof1 1) + (sof2 2) + ) +;; ---spydroid-orig:spydroid-orig-flag + (deftype spydroid-orig (nav-enemy) ((old-y-deg float :offset-assert 620) (diff-angle float :offset-assert 624) - (flags uint64 :offset-assert 632) - (lightning UNKNOWN 4 :offset-assert 640) + (flags spydroid-orig-flag :offset-assert 632) + (lightning lightning-control 4 :offset-assert 640) (floor float :offset-assert 656) - (explode-part basic :offset-assert 660) + (explode-part sparticle-launch-control :offset-assert 660) ) :method-count-assert 192 :size-assert #x298 :flag-assert #xc002200298 (:state-methods stare ;; 37 + notice ;; 35 + hostile ;; 38 + die-falling ;; 41 pacing ;; 156 circling ;; 157 - hostile ;; 38 attack ;; 190 - die-falling ;; 41 - notice ;; 35 explode ;; 191 ) ) -|# -;; (define-extern *spydroid-orig-exploder-params* joint-exploder-static-params) -;; (define-extern *fact-info-spydroid-orig-defaults* fact-info-enemy-defaults) -;; (define-extern *spydroid-orig-nav-enemy-info* nav-enemy-info) +(define-extern *spydroid-orig-exploder-params* joint-exploder-static-params) +(define-extern *fact-info-spydroid-orig-defaults* fact-info-enemy-defaults) +(define-extern *spydroid-orig-nav-enemy-info* nav-enemy-info) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 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 @@ -45481,10 +45798,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 ;; @@ -45505,13 +45821,12 @@ ;; kg-hopper ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype kg-hopper (nav-enemy) ((speed-y float :offset-assert 620) (accel-y float :offset-assert 624) (next-jump-time int32 :offset-assert 628) - (path-intro basic :offset-assert 632) - (can-go-knocked? basic :offset-assert 636) + (path-intro path-control :offset-assert 632) + (can-go-knocked? symbol :offset-assert 636) (land-anim-index int32 :offset-assert 640) (step-num int32 :offset-assert 644) (best-point vector :inline :offset-assert 656) @@ -45530,57 +45845,52 @@ :method-count-assert 194 :size-assert #x2f0 :flag-assert #xc2027002f0 - (:methods - (kg-hopper-method-191 () none) ;; 191 - (kg-hopper-method-192 () none) ;; 192 - (kg-hopper-method-193 () none) ;; 193 - ) (:state-methods + active ;; 34 notice ;; 35 - hostile ;; 38 stare ;; 37 + hostile ;; 38 jump ;; 44 ambush ;; 47 - active ;; 34 explode ;; 190 ) + (:methods + (kg-hopper-method-191 (_type_) symbol) ;; 191 + (kg-hopper-method-192 () none) ;; 192 + (get-skel (_type_) art-group) ;; 193 + ) ) -|# -#| (deftype kg-hopper-anim-info (structure) ((hit-anim-index int32 :offset-assert 0) (land-anim-index int32 :offset-assert 4) ) + :pack-me :method-count-assert 9 :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype kg-hopper-global-info (basic) ((prev-yellow-hit int8 :offset-assert 4) (prev-blue-hit int8 :offset-assert 5) - (yellow-hit-anim UNKNOWN 3 :offset-assert 8) - (blue-hit-anim UNKNOWN 3 :offset-assert 32) + (yellow-hit-anim kg-hopper-anim-info 3 :inline :offset-assert 8) + (blue-hit-anim kg-hopper-anim-info 3 :inline :offset-assert 32) ) :method-count-assert 9 :size-assert #x38 :flag-assert #x900000038 ) -|# -;; (define-extern *kg-hopper-debris-params* debris-static-params) -;; (define-extern *kg-hopper-global-info* kg-hopper-global-info) -;; (define-extern *kg-hopper-nav-enemy-info* nav-enemy-info) -;; (define-extern *kg-hopper-next-jump-time* object) +(define-extern *kg-hopper-debris-params* debris-static-params) +(define-extern *kg-hopper-global-info* kg-hopper-global-info) +(define-extern *kg-hopper-nav-enemy-info* nav-enemy-info) +(define-extern *kg-hopper-next-jump-time* time-frame) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; neo-grenadier ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype bank-info (structure) ((circle sphere :inline :offset-assert 0) (tangent-pos vector :inline :offset-assert 16) @@ -45591,53 +45901,60 @@ :size-assert #x40 :flag-assert #x900000040 ) -|# -#| +;; +++neo-grenadier:grenadier-status-flag +(defenum grenadier-status-flag + :type uint64 + :bitfield #t + (gsf0 0) + (gsf1 1) + (gsf2 2) + (gsf3 3) + ) +;; ---neo-grenadier:grenadier-status-flag + (deftype neo-grenadier (nav-enemy) ((shot-trajectory trajectory :inline :offset-assert 624) - (hostile-path basic :offset-assert 664) + (hostile-path path-control :offset-assert 664) (bank bank-info :inline :offset-assert 672) (joint joint-mod-blend-world :offset-assert 736) - (heading basic :offset-assert 740) + (heading symbol :offset-assert 740) (move-pos vector :inline :offset-assert 752) (move-angle float :offset-assert 768) - (status-flags uint64 :offset-assert 776) - (suppress-knockaside-timer uint64 :offset-assert 784) + (status-flags grenadier-status-flag :offset-assert 776) + (suppress-knockaside-timer time-frame :offset-assert 784) ) :method-count-assert 196 :size-assert #x318 :flag-assert #xc402a00318 - (:methods - (neo-grenadier-method-193 () none) ;; 193 - (neo-grenadier-method-194 () none) ;; 194 - (neo-grenadier-method-195 () none) ;; 195 - ) (:state-methods - victory ;; 39 hit ;; 30 - spin-kick ;; 192 - hostile ;; 38 - backup ;; 191 + active ;; 34 notice ;; 35 + hostile ;; 38 + victory ;; 39 attack ;; 190 - active ;; 34 + backup ;; 191 + spin-kick ;; 192 + ) + (:methods + (neo-grenadier-method-193 (_type_) none) ;; 193 + (set-bank-info! (_type_ vector) none) ;; 194 + (neo-grenadier-method-195 (_type_) none) ;; 195 ) ) -|# -;; (define-extern *fact-info-neo-grenadier-defaults* fact-info-enemy-defaults) -;; (define-extern *neo-grenadier-nav-enemy-info* nav-enemy-info) -;; (define-extern pos-rotate-y<-vector+vector function) ;; (function vector vector float) +(define-extern *fact-info-neo-grenadier-defaults* fact-info-enemy-defaults) +(define-extern *neo-grenadier-nav-enemy-info* nav-enemy-info) +(define-extern pos-rotate-y<-vector+vector (function vector vector float)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; neo-juicer ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype neo-juicer-shot (projectile) - ((lightning UNKNOWN 5 :offset-assert 512) - (victim uint64 :offset-assert 536) + ((lightning lightning-control 5 :offset-assert 512) + (victim handle :offset-assert 536) ) :method-count-assert 41 :size-assert #x220 @@ -45646,87 +45963,81 @@ dissipate ;; 21 ) ) -|# -#| (deftype neo-juicer-anim-info (structure) ((anim-index int32 :offset-assert 0) ) + :pack-me :method-count-assert 9 :size-assert #x4 :flag-assert #x900000004 ) -|# -#| (deftype neo-juicer-global-info (basic) ((prev-yellow-hit int8 :offset-assert 4) (prev-blue-hit int8 :offset-assert 5) - (idle-anim UNKNOWN 3 :offset-assert 8) - (patrol-anim UNKNOWN 2 :offset-assert 20) - (notice-anim UNKNOWN 2 :offset-assert 28) - (charge-anim UNKNOWN 2 :offset-assert 36) - (knocked-anim UNKNOWN 2 :offset-assert 44) - (celebrate-anim UNKNOWN 2 :offset-assert 52) - (yellow-hit-anim UNKNOWN 4 :offset-assert 60) - (blue-hit-anim UNKNOWN 6 :offset-assert 76) + (idle-anim neo-juicer-anim-info 3 :inline :offset-assert 8) + (patrol-anim neo-juicer-anim-info 2 :inline :offset-assert 20) + (notice-anim neo-juicer-anim-info 2 :inline :offset-assert 28) + (charge-anim neo-juicer-anim-info 2 :inline :offset-assert 36) + (knocked-anim neo-juicer-anim-info 2 :inline :offset-assert 44) + (celebrate-anim neo-juicer-anim-info 2 :inline :offset-assert 52) + (yellow-hit-anim neo-juicer-anim-info 4 :inline :offset-assert 60) + (blue-hit-anim neo-juicer-anim-info 6 :inline :offset-assert 76) ) :method-count-assert 9 :size-assert #x64 :flag-assert #x900000064 ) -|# -#| (deftype neo-juicer (nav-enemy) ((los los-control :inline :offset-assert 624) - (intro-path basic :offset-assert 788) - (joint basic :offset-assert 792) - (joint-enable basic :offset-assert 796) + (intro-path path-control :offset-assert 788) + (joint joint-mod :offset-assert 792) + (joint-enable symbol :offset-assert 796) (joint-blend float :offset-assert 800) - (last-fire-time uint64 :offset-assert 808) - (heading basic :offset-assert 816) + (last-fire-time time-frame :offset-assert 808) + (heading symbol :offset-assert 816) (move-angle float :offset-assert 820) - (torso-track-player basic :offset-assert 824) - (circle-backward? basic :offset-assert 832) - (using-turn-anim basic :offset-assert 836) - (hit-focus basic :offset-assert 840) + (torso-track-player joint-mod :offset-assert 824) + (circle-backward? symbol :offset 832) + (using-turn-anim symbol :offset-assert 836) + (hit-focus focus :offset-assert 840) (ambush-path-pt int8 :offset-assert 844) (charge-index int8 :offset-assert 845) (hostile-dest vector :inline :offset-assert 848) - (current-projectile uint64 :offset-assert 864) + (current-projectile handle :offset-assert 864) ) :method-count-assert 197 :size-assert #x368 :flag-assert #xc502f00368 - (:methods - (neo-juicer-method-192 () none) ;; 192 - (neo-juicer-method-193 () none) ;; 193 - (neo-juicer-method-194 () none) ;; 194 - (neo-juicer-method-195 () none) ;; 195 - (neo-juicer-method-196 () none) ;; 196 - ) (:state-methods - stare ;; 37 hit ;; 30 - circling ;; 157 - taunt ;; 155 + active ;; 34 + notice ;; 35 + stare ;; 37 hostile ;; 38 victory ;; 39 - attack ;; 191 - notice ;; 35 - ambush-cont ;; 190 ambush ;; 47 - active ;; 34 + taunt ;; 155 + circling ;; 157 + ambush-cont ;; 190 + attack ;; 191 + ) + (:methods + (go-die-or-knocked (_type_) object) ;; 192 + (spawn-proj! (_type_ process-focusable uint) none) ;; 193 + (track-focus! (_type_) none) ;; 194 + (start-tracking (_type_) none) ;; 195 + (toggle-deadly-flag (_type_ symbol) none) ;; 196 ) ) -|# -;; (define-extern neo-juicer-proj-move function) -;; (define-extern *neo-juicer-global-info* neo-juicer-global-info) -;; (define-extern *fact-info-neo-juicer-defaults* fact-info-enemy-defaults) -;; (define-extern *neo-juicer-nav-enemy-info* nav-enemy-info) -;; (define-extern neo-juicer-face-player-post function) +(define-extern neo-juicer-proj-move (function neo-juicer-shot none)) +(define-extern *neo-juicer-global-info* neo-juicer-global-info) +(define-extern *fact-info-neo-juicer-defaults* fact-info-enemy-defaults) +(define-extern *neo-juicer-nav-enemy-info* nav-enemy-info) +(define-extern neo-juicer-face-player-post (function none :behavior neo-juicer)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mh-wasp-part ;; @@ -46116,67 +46427,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 ;; @@ -46488,7 +46767,6 @@ ;; target-turret-shot ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype turret-shot (guard-shot) ((hit-pos vector :inline :offset-assert 544) ) @@ -46499,16 +46777,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) @@ -46523,16 +46798,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) ) @@ -46540,169 +46813,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 ) - ) -|# - -;; (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 + (: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* 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) @@ -46715,164 +46978,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) ) @@ -46884,24 +47208,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) @@ -46911,245 +47233,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) ) @@ -47157,25 +47488,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) @@ -47183,23 +47512,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) @@ -47212,77 +47541,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 ) - ) -|# - -;; (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) + (: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* 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 ;; @@ -47298,18 +47626,58 @@ ;; nav-graph-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++nav-graph-h:nav-branch-clock-type +(defenum nav-branch-clock-type + :type uint8 + (no-clock 0) + (clock2 1) + (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 + (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-graph-h:nav-branch-clock-mask + +;; +++nav-graph-h: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-graph-h:nav-branch-flags + +(declare-type nav-node structure) (deftype nav-branch (structure) ((node nav-node 2 :offset-assert 0) ;; guessed by decompiler - (src-node nav-node :offset-assert 0) ;; guessed by decompiler - (dest-node nav-node :offset-assert 4) ;; guessed by decompiler - (temp-dest-node-id int32 :offset-assert 4) + (src-node nav-node :offset 0) ;; guessed by decompiler + (dest-node nav-node :offset 4) ;; guessed by decompiler + (temp-dest-node-id int32 :offset 4) (speed-limit uint8 :offset-assert 8) (density uint8 :offset-assert 9) - (clock-type uint8 :offset-assert 10) ;; nav-branch-clock-type - (clock-mask uint8 :offset-assert 11) ;; nav-branch-clock-mask - (territory uint8 :offset-assert 10) - (exclusive-branch-id uint8 :offset-assert 11) + (clock-type nav-branch-clock-type :offset-assert 10) + (clock-mask nav-branch-clock-mask :offset-assert 11) + (territory uint8 :offset 10) + (exclusive-branch-id uint8 :offset 11) (max-user-count uint8 :offset-assert 12) (user-count uint8 :offset-assert 13) (width uint8 :offset-assert 14) @@ -47321,11 +47689,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) @@ -47333,24 +47701,35 @@ (nav-branch-method-20 () none) ;; 20 ;; (set-dst-node (_type_ nav-node) none) ) ) -|# -#| +;; +++nav-graph-h: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-graph-h:nav-node-flag-byte + (deftype nav-node (structure) - ((data uint32 32 :offset-assert 0) ;; guessed by decompiler - (position vector :inline :offset-assert 0) - (pos-x float :offset-assert 0) - (pos-y float :offset-assert 4) - (pos-z float :offset-assert 8) - (angle uint16 :offset-assert 12) - (id uint16 :offset-assert 14) - (radius uint8 :offset-assert 16) - (branch-count int8 :offset-assert 17) - (flags nav-node-flag :offset-assert 18) ;; nav-node-flag-byte - (pad0 int8 1 :offset-assert 19) ;; guessed by decompiler - (branch-array (inline-array nav-branch) :offset-assert 20) ;; guessed by decompiler - (nav-mesh-id uint32 :offset-assert 24) - (level symbol :offset-assert 28) ;; guessed by decompiler + ((data uint32 8 :offset-assert 0 :score -1) ;; guessed by decompiler + (position vector :inline :offset 0) + (pos-x float :offset 0) + (pos-y float :offset 4) + (pos-z float :offset 8) + (angle uint16 :offset 12) + (id uint16 :offset 14) + (radius uint8 :offset 16) + (branch-count int8 :offset 17) + (flags nav-node-flag-byte :offset 18) ;; nav-node-flag-byte + (pad0 int8 1 :offset 19) ;; guessed by decompiler + (branch-array (inline-array nav-branch) :offset 20) ;; guessed by decompiler + (nav-mesh-id uint32 :offset 24) + (level symbol :offset 28) ;; guessed by decompiler ) :method-count-assert 22 :size-assert #x20 @@ -47366,15 +47745,13 @@ (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 ) ) -|# -#| (deftype nav-graph-link (structure) ((id uint32 :offset-assert 0) (dest-graph-id uint32 :offset-assert 4) @@ -47387,9 +47764,7 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype nav-graph (basic) ((node-count int16 :offset-assert 4) (branch-count int16 :offset-assert 6) @@ -47411,10 +47786,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) @@ -47441,157 +47816,161 @@ (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 ) ) -|# -;; (define-extern *city-borrow-manager* object) +(declare-type cty-borrow-manager basic) +(define-extern *city-borrow-manager* cty-borrow-manager) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 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 @@ -47618,17 +47997,26 @@ ) |# -;; (define-extern *cty-faction-manager* object) +(define-extern *cty-faction-manager* symbol) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 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) @@ -47641,9 +48029,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 @@ -47653,7 +48039,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 @@ -47665,22 +48051,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) @@ -47689,9 +48072,7 @@ :size-assert #x6 :flag-assert #x900000006 ) -|# -#| (deftype vis-ray (structure) ((pos vector :inline :offset-assert 0) (dir vector :inline :offset-assert 16) @@ -47705,9 +48086,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 @@ -47722,13 +48101,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 @@ -47755,9 +48134,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) @@ -47778,22 +48155,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) @@ -47806,22 +48195,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 @@ -47834,9 +48236,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 @@ -47857,7 +48257,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) @@ -47871,12 +48271,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) @@ -47884,23 +48283,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) @@ -47910,9 +48309,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) @@ -47950,48 +48349,64 @@ (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 + (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-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 @@ -48004,7 +48419,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) @@ -48014,24 +48429,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 ;; @@ -48457,7 +48871,7 @@ ) |# -;; (define-extern *ff-squad-control* object) +(define-extern *ff-squad-control* squad-control) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mh-squad-control-h ;; @@ -48535,10 +48949,10 @@ ;; (define-extern *default-faction-info* array) ;; (define-extern *default-faction-mod* object) ;; (define-extern *default-faction-strength-mod* object) -;; (define-extern setup-city-task-faction function) +(define-extern setup-city-task-faction (function object)) ;; (define-extern *exclusive-nav-mesh-list* array) ;; (define-extern map-symbol-to-nav-territory-type function) -;; (define-extern cty-faction-evaluate-commands function) +(define-extern cty-faction-evaluate-commands (function pair object)) ;; (define-extern is-faction-level-loaded? function) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -48722,22 +49136,26 @@ ;; (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* object) +(define-extern *cty-attack-controller* symbol) ;; (define-extern initialize-cty-attack-controller function) -;; (define-extern cty-attack-reset function) +(define-extern cty-attack-reset (function symbol symbol symbol none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 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 +; ) +; ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -49098,7 +49516,6 @@ ;; traffic-engine ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype traffic-find-segment-struct (structure) ((best-seg nav-segment :offset-assert 0) (best-rating float :offset-assert 4) @@ -49108,7 +49525,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) @@ -49127,71 +49543,65 @@ :method-count-assert 23 :size-assert #x104 :flag-assert #x1700900104 - (: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 - ) (:state-methods - active ;; 15, old: (active () _type_ :state) - idle ;; 14, old: (idle () _type_ :state) + idle ;; 14 + active ;; 15 + ) + (:methods + (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-start function) ;; (function none) -;; (define-extern traffic-kill function) ;; (function none) -;; (define-extern ctywide-entity-hack function) ;; (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-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 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 ;; @@ -49957,59 +50367,56 @@ ;; mech-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern mech-spawn-thruster function) ;; (function mech-info vector vector float float none) +(define-extern mech-spawn-thruster (function mech-info vector vector float float none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mech ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype mech (process-drawable) - ((extra-trans vector :inline :offset-assert 208) + ((root collide-shape-moving :override) + (extra-trans vector :inline :offset-assert 208) (condition int32 :offset-assert 224) - (shadow-backup basic :offset-assert 228) - (rider uint64 :offset-assert 232) + (shadow-backup shadow-geo :offset-assert 228) + (rider handle :offset-assert 232) (shield-value float :offset-assert 240) - (nav-sphere-handle uint64 :offset-assert 248) - (probe-time uint64 :offset-assert 256) ;; time-frame + (nav-sphere-handle handle :offset-assert 248) + (probe-time time-frame :offset-assert 256) ;; time-frame ) :method-count-assert 25 :size-assert #x108 :flag-assert #x1900900108 - (:methods - (mech-method-24 () none) ;; 24 ;; (mech-method-24 (_type_) none) - ) (:state-methods - wait-for-return ;; 23, old: (wait-for-return () _type_ :state) - pickup ;; 22, old: (pickup ((state mech)) _type_ :state) - idle ;; 21, old: (idle () _type_ :state) - wait-for-start ;; 20, old: (wait-for-start () _type_ :state) + wait-for-start ;; 20 + idle ;; 21 + (pickup (state mech)) ;; 22 + wait-for-return ;; 23 + ) + (:methods + (mech-method-24 (_type_) none) ;; 24 ) ) -|# -#| (deftype mech-target (process-drawable) - () + ((parent (pointer target) :override) + ) :method-count-assert 22 :size-assert #xc8 :flag-assert #x16005000c8 (:state-methods - active ;; 21, old: (active () _type_ :state) - idle ;; 20, old: (idle () _type_ :state) + idle ;; 20 + active ;; 21 ) ) -|# -;; (define-extern mech-init function) ;; (function entity-actor matrix3 handle float none :behavior mech) -;; (define-extern mech-target-init function) ;; (function vector quaternion entity-actor none :behavior mech) -;; (define-extern mech-target-spawn function) ;; (function vector process quaternion entity-actor (pointer mech-target)) +(define-extern mech-init (function entity-actor matrix3 handle float object :behavior mech)) +(define-extern mech-target-init (function vector quaternion entity-actor object :behavior mech)) +(define-extern mech-target-spawn (function vector process quaternion entity-actor (pointer mech-target))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; target-mech ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype mech-shield (shield-sphere) () :method-count-assert 43 @@ -50019,43 +50426,42 @@ shield-disabled ;; 29 ) ) -|# -;; (define-extern mech-shield-init-by-other function) -;; (define-extern *mech-stance-mods* surface) ;; surface -;; (define-extern *mech-walk-mods* surface) ;; surface -;; (define-extern *mech-jump-mods* surface) ;; surface -;; (define-extern *mech-punch-mods* surface) ;; surface -;; (define-extern *mech-pickup-mods* surface) ;; surface -;; (define-extern *mech-carry-walk-mods* surface) ;; surface -;; (define-extern *mech-carry-drag-mods* surface) ;; surface -;; (define-extern *mech-carry-jump-mods* surface) ;; surface -;; (define-extern target-mech-falling-anim-trans function) ;; (function none :behavior target) -;; (define-extern target-mech-mech-effect function) ;; (function target none :behavior mech) -;; (define-extern mech-on-ground? function) ;; (function symbol :behavior target) -;; (define-extern target-mech-get-off? function) ;; (function symbol :behavior target) -;; (define-extern target-mech-handler function) ;; (function process int symbol event-message-block object :behavior target) -;; (define-extern target-mech-bonk-event-handler function) ;; (function process int symbol event-message-block object :behavior target) -;; (define-extern mech-leg-ik-callback function) ;; (function joint-mod-ik matrix matrix vector object :behavior target) -;; (define-extern mech-update-ik function) ;; (function none :behavior target) -;; (define-extern target-mech-init function) ;; (function handle float symbol none :behavior target) -;; (define-extern target-mech-exit function) ;; (function none :behavior target) -;; (define-extern target-mech-effect function) ;; (function none :behavior target) -;; (define-extern target-mech-add-thrust function) ;; (function none :behavior target) -;; (define-extern target-mech-collision function) ;; (function none :behavior target) -;; (define-extern target-mech-real-post function) ;; (function none :behavior target) -;; (define-extern target-mech-post function) ;; (function none :behavior target) +(define-extern mech-shield-init-by-other (function shield-sphere-spawn-params object :behavior mech-shield)) +(define-extern *mech-stance-mods* surface) +(define-extern *mech-walk-mods* surface) +(define-extern *mech-jump-mods* surface) +(define-extern *mech-punch-mods* surface) +(define-extern *mech-pickup-mods* surface) +(define-extern *mech-carry-walk-mods* surface) +(define-extern *mech-carry-drag-mods* surface) +(define-extern *mech-carry-jump-mods* surface) +(define-extern target-mech-falling-anim-trans (function none :behavior target)) +(define-extern target-mech-mech-effect (function target none :behavior mech)) +(define-extern mech-on-ground? (function symbol :behavior target)) +(define-extern target-mech-get-off? (function symbol :behavior target)) +(define-extern target-mech-handler (function process int symbol event-message-block object :behavior target)) +(define-extern target-mech-bonk-event-handler (function process int symbol event-message-block object :behavior target)) +(define-extern mech-leg-ik-callback (function joint-mod-ik matrix matrix vector object :behavior target)) +(define-extern mech-update-ik (function none :behavior target)) +(define-extern target-mech-init (function handle float symbol none :behavior target)) +(define-extern target-mech-exit (function none :behavior target)) +(define-extern target-mech-effect (function none :behavior target)) +(define-extern target-mech-add-thrust (function none :behavior target)) +(define-extern target-mech-collision (function none :behavior target)) +(define-extern target-mech-real-post (function none :behavior target)) +(define-extern target-mech-post (function none :behavior target)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mech-states ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *mech-exploder-params* joint-exploder-static-params) ;; joint-exploder-static-params -;; (define-extern check-turn-on-shield function) -;; (define-extern mech-can-throw? function) -;; (define-extern target-mech-punch-pick function) ;; (function symbol int :behavior target) -;; (define-extern target-mech-carry-update function) ;; (function none :behavior target) -;; (define-extern target-mech-carry-post function) ;; (function none :behavior target) +(define-extern *mech-exploder-params* joint-exploder-static-params) +(define-extern check-turn-on-shield (function target object)) +(define-extern mech-can-throw? (function symbol :behavior target)) +(define-extern target-mech-punch-pick (function symbol int :behavior target)) +(define-extern target-mech-carry-update (function none :behavior target)) +(define-extern target-mech-carry-post (function none :behavior target)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; nstb-texture ;; @@ -50067,7 +50473,6 @@ ;; nst-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype nsta-states (structure) ((poison-interp float :offset-assert 0) ) @@ -50075,280 +50480,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) @@ -50357,27 +50735,26 @@ :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 ;; @@ -50439,32 +50816,29 @@ ;; 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) @@ -50474,74 +50848,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 ;; @@ -50826,48 +51198,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) @@ -50875,32 +51253,30 @@ (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 ;; @@ -51349,32 +51725,27 @@ ;; 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 ;; @@ -51928,7 +52299,7 @@ ;; hfrag ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *hfrag-debug* object) +(define-extern *hfrag-debug* symbol) ;; (define-extern hfrag-vert-print function) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -51951,7 +52322,6 @@ ;; desert-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype desert-states (structure) ((light light-state :inline :offset-assert 0) (flame flames-state :inline :offset-assert 8) @@ -51962,9 +52332,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) @@ -51974,9 +52342,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) @@ -51987,205 +52353,213 @@ :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 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype squad-unit-settings (structure) ((target-count int8 :offset-assert 0) (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 :flag-assert #x900000012 ) -|# -#| +;; +++squad-control-h:squad-target-flag +(defenum squad-target-flag + :type uint8 + :bitfield #t + (visible-now) + (visible-recently) + (visible-ever) + (updated) + (force-visible) + ) +;; ---squad-control-h:squad-target-flag + (deftype squad-target-status (structure) ((flags squad-target-flag :offset-assert 0) - (handle uint64 :offset-assert 8) - (last-seen-time uint64 :offset-assert 16) + (handle handle :offset-assert 8) + (last-seen-time time-frame :offset-assert 16) (position vector :inline :offset-assert 32) (velocity vector :inline :offset-assert 48) (threat-level float :offset-assert 64) @@ -52195,9 +52569,21 @@ :flag-assert #x900000044 ;; field squad-target-flag is likely a value type. ) -|# -#| +;; +++squad-control-h:squad-alert-flag +(defenum squad-alert-flag + :type uint8 + :bitfield #t + (alert-ending) + (alarm-on) + (guard-multi-focus) + (sticky-guard-settings) + (disable-pursuit-control) + (update-target-search) + (war) + ) +;; ---squad-control-h:squad-alert-flag + (deftype squad-alert-state (structure) ((flags squad-alert-flag :offset-assert 0) (level uint8 :offset-assert 1) @@ -52206,78 +52592,89 @@ (guard-aim-count int8 :offset-assert 4) (guard-inaccuracy-factor float :offset-assert 8) (guard-target-level float :offset-assert 12) - (duration uint32 :offset-assert 16) - (start-time uint64 :offset-assert 24) - (notify-time uint64 :offset-assert 32) - (alarm-sound-id uint32 :offset-assert 40) - (target-status-array UNKNOWN 3 :offset-assert 48) - (target-status squad-target-status :inline :offset-assert 48) + (duration uint32 :offset-assert 16 :decomp-as time-frame) + (start-time time-frame :offset-assert 24) + (notify-time time-frame :offset-assert 32) + (alarm-sound-id sound-id :offset-assert 40) + (target-status-array squad-target-status 3 :inline :offset-assert 48) + (target-status squad-target-status :inline :offset 48) ) :method-count-assert 10 :size-assert #x120 :flag-assert #xa00000120 ;; field squad-alert-flag is likely a value type. (:methods - (squad-alert-state-method-9 () none) ;; 9 + (init! (_type_) none) ;; 9 ) ) -|# -#| (deftype primary-target-pos-vel (structure) ((position vector :inline :offset-assert 0) (velocity vector :inline :offset-assert 16) - (time uint32 :offset-assert 28) + (time uint32 :offset 28 :score 1) ) :method-count-assert 9 :size-assert #x20 :flag-assert #x900000020 ) -|# -#| (deftype squad-control (basic) ((sync-clock uint8 :offset-assert 4) (sync-mask-8 uint8 :offset-assert 5) (sync-mask-16 uint16 :offset-assert 6) (sync-mask-32 uint32 :offset-assert 8) (alert-state squad-alert-state :inline :offset-assert 16) - (primary-target-history UNKNOWN 16 :offset-assert 304) + (primary-target-history primary-target-pos-vel 16 :inline :offset-assert 304) ) :method-count-assert 34 :size-assert #x330 :flag-assert #x2200000330 (:methods - (squad-control-method-9 () none) ;; 9 - (squad-control-method-10 () none) ;; 10 - (squad-control-method-11 () none) ;; 11 - (squad-control-method-12 () none) ;; 12 - (squad-control-method-13 () none) ;; 13 - (squad-control-method-14 () none) ;; 14 - (squad-control-method-15 () none) ;; 15 - (squad-control-method-16 () none) ;; 16 - (squad-control-method-17 () none) ;; 17 - (squad-control-method-18 () none) ;; 18 - (squad-control-method-19 () none) ;; 19 - (squad-control-method-20 () none) ;; 20 - (squad-control-method-21 () none) ;; 21 - (squad-control-method-22 () none) ;; 22 - (squad-control-method-23 () none) ;; 23 - (squad-control-method-24 () none) ;; 24 - (squad-control-method-25 () none) ;; 25 - (squad-control-method-26 () none) ;; 26 - (squad-control-method-27 () none) ;; 27 - (squad-control-method-28 () none) ;; 28 - (squad-control-method-29 () none) ;; 29 - (squad-control-method-30 () none) ;; 30 - (squad-control-method-31 () none) ;; 31 - (squad-control-method-32 () none) ;; 32 - (squad-control-method-33 () none) ;; 33 - ) - ) -|# - -;; (define-extern *waswide-squad-control* object) + (initialize (_type_ process) none) ;; 9 + (squad-control-method-10 (_type_) none) ;; 10 + (stop-alarm-sound (_type_) none) ;; 11 + (init-alert (_type_) none) ;; 12 + (update (_type_) none) ;; 13 + (set-sync-mask (_type_) none) ;; 14 + (probe-backgnd-collision (_type_ vector vector) symbol) ;; 15 + (squad-control-method-16 (_type_ vector process-focusable squad-target-status) none) ;; 16 + (squad-control-method-17 (_type_ vector int squad-target-status) none) ;; 17 + (squad-control-method-18 (_type_ int process) int) ;; 18 + (set-alert-level0 (_type_ int) int) ;; 19 + (start-alert (_type_ int) none) ;; 20 + (set-alert-level (_type_ int) none) ;; 21 + (get-alert-level (_type_) int) ;; 22 + (set-alert-duration (_type_ time-frame) none) ;; 23 + (squad-control-method-24 (_type_) int) ;; 24 + (squad-control-method-25 (_type_ primary-target-pos-vel time-frame) none) ;; 25 + (set-pos-vel (_type_ primary-target-pos-vel) primary-target-pos-vel) ;; 26 + (squad-control-method-27 (_type_ process float) none) ;; 27 + (get-idx-in-status-arr (_type_ handle) int) ;; 28 + (valid-target-handle? (_type_ handle) symbol) ;; 29 + (get-target-focus (_type_) process-focusable) ;; 30 + (squad-control-method-31 (_type_ vector process-focusable handle float float) none) ;; 31 + (get-handle-pos (_type_ handle vector) vector) ;; 32 + (get-focus-in-range (_type_ process-focusable) process-focusable) ;; 33 + ) + ) + +;; added +(deftype squad-control-stack-type0 (structure) + ((vec0 vector :inline :offset 0) + (vec1 vector :inline :offset 16) + (float0 float :offset 32) + (byte0 int8 :offset 36) + (mesh nav-mesh :offset 40) + (cquery collide-query :inline :offset 64) + (vec2 vector :inline :offset 272) + (vec3 vector :inline :offset 288) + (float1 float :offset 604) + (float2 float :offset 608) + (float3 float :offset 612) + ) + ) + +(define-extern *waswide-squad-control* squad-control) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; squad-control ;; @@ -52288,17 +52685,14 @@ ;; vehicle-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype vehicle-info (structure) - ((handle-by-vehicle-type UNKNOWN 44 :offset-assert 0) + ((handle-by-vehicle-type handle 44 :offset-assert 0) ) :method-count-assert 9 :size-assert #x160 :flag-assert #x900000160 ) -|# -#| (deftype vehicle-lookup-info (structure) ((turn-radius meters :offset-assert 0) (throttle-turning float :offset-assert 4) @@ -52308,9 +52702,7 @@ :size-assert #xc :flag-assert #x90000000c ) -|# -#| (deftype vehicle-control-point (structure) ((local-pos vector :inline :offset-assert 0) (normal vector :inline :offset-assert 16) @@ -52319,9 +52711,7 @@ :size-assert #x20 :flag-assert #x900000020 ) -|# -#| (deftype vehicle-attach-point (structure) ((local-pos vector :inline :offset-assert 0) (rot vector :inline :offset-assert 16) @@ -52330,13 +52720,26 @@ :size-assert #x20 :flag-assert #x900000020 ) -|# -#| +;; +++vehicle-h:vehicle-wheel-flag +(defenum vehicle-wheel-flag + :type uint64 + :bitfield #t + (vwf0 0) + (vwf1 1) + (vwf2 2) + (vwf3 3) + (vwf4 4) + (vwf5 5) + ) +;; ---vehicle-h:vehicle-wheel-flag + +(declare-type vehicle-wheel-state structure) + (deftype vehicle-wheel-info (structure) ((local-pos vector :inline :offset-assert 0) - (flags uint64 :offset-assert 16) - (callback basic :offset-assert 24) + (flags vehicle-wheel-flag :offset-assert 16) + (callback (function rigid-body-object vehicle-wheel-state vehicle-wheel-info none) :offset-assert 24) (inertia float :offset-assert 28) (radius float :offset-assert 32) (susp-arm-length float :offset-assert 36) @@ -52353,16 +52756,14 @@ (camber float :offset-assert 80) (settle-pos float :offset-assert 84) (probe-radius float :offset-assert 88) - (tread-texture basic :offset-assert 92) - (tread-tid uint32 :offset-assert 96) + (tread-texture string :offset-assert 92) + (tread-tid texture-id :offset-assert 96) ) :method-count-assert 9 :size-assert #x64 :flag-assert #x900000064 ) -|# -#| (deftype vehicle-engine-info (structure) ((max-torque float :offset-assert 0) (inertia float :offset-assert 4) @@ -52375,28 +52776,25 @@ (peak-torque-rpm float :offset-assert 32) (powerband-width-rpm float :offset-assert 36) ) + :pack-me :method-count-assert 9 :size-assert #x28 :flag-assert #x900000028 ) -|# -#| (deftype vehicle-transmission-info (structure) ((inertia float :offset-assert 0) (upshift-rpm float :offset-assert 4) (downshift-rpm float :offset-assert 8) (final-drive-ratio float :offset-assert 12) - (gear-ratio-array UNKNOWN 8 :offset-assert 16) + (gear-ratio-array float 8 :offset-assert 16) (gear-count int8 :offset-assert 48) ) :method-count-assert 9 :size-assert #x31 :flag-assert #x900000031 ) -|# -#| (deftype vehicle-handling-info (structure) ((max-engine-thrust meters :offset-assert 0) (inv-max-engine-thrust float :offset-assert 4) @@ -52404,7 +52802,7 @@ (engine-intake-factor float :offset-assert 12) (brake-factor float :offset-assert 16) (turbo-boost-factor float :offset-assert 20) - (turbo-boost-duration uint16 :offset-assert 24) + (turbo-boost-duration uint16 :offset-assert 24 :decomp-as time-frame) (max-xz-speed meters :offset-assert 28) (player-turn-anim-bias float :offset-assert 32) (player-turn-anim-min float :offset-assert 36) @@ -52454,21 +52852,20 @@ (ai-steering-factor float :offset-assert 212) (ai-throttle-factor float :offset-assert 216) ) + :pack-me :method-count-assert 9 :size-assert #xdc :flag-assert #x9000000dc ) -|# -#| (deftype vehicle-physics-model-info (structure) ((lift-thruster-count int8 :offset-assert 0) (roll-thruster-count int8 :offset-assert 1) (stabilizer-count int8 :offset-assert 2) (inv-lift-thruster-count float :offset-assert 4) - (lift-thruster-array UNKNOWN 4 :offset-assert 16) - (roll-thruster-array UNKNOWN 2 :offset-assert 144) - (stabilizer-array UNKNOWN 6 :offset-assert 208) + (lift-thruster-array vehicle-attach-point 4 :inline :offset-assert 16) + (roll-thruster-array vehicle-attach-point 2 :inline :offset-assert 144) + (stabilizer-array vehicle-attach-point 6 :inline :offset-assert 208) (engine-thrust-local-pos vector :inline :offset-assert 400) (brake-local-pos vector :inline :offset-assert 416) (wheel-count int8 :offset-assert 432) @@ -52480,9 +52877,7 @@ :size-assert #x294 :flag-assert #x900000294 ) -|# -#| (deftype vehicle-camera-info (structure) ((string-min-height meters :offset-assert 0) (string-max-height meters :offset-assert 4) @@ -52495,21 +52890,19 @@ (normal-max-angle-offset float :offset-assert 32) (air-max-angle-offset float :offset-assert 36) (max-lookaround-speed float :offset-assert 40) - (look-pos-array UNKNOWN 4 :offset-assert 48) - (look-front vector :inline :offset-assert 48) - (look-left vector :inline :offset-assert 64) - (look-right vector :inline :offset-assert 80) - (look-rear vector :inline :offset-assert 96) + (look-pos-array vector 4 :inline :offset-assert 48) + (look-front vector :inline :offset 48) + (look-left vector :inline :offset 64) + (look-right vector :inline :offset 80) + (look-rear vector :inline :offset 96) ) :method-count-assert 9 :size-assert #x70 :flag-assert #x900000070 ) -|# -#| (deftype vehicle-sound-loop-info (structure) - ((sound uint128 :offset-assert 0) + ((sound sound-name :offset-assert 0) (speed float :offset-assert 16) (min-speed float :offset-assert 20) (max-speed float :offset-assert 24) @@ -52522,87 +52915,99 @@ :size-assert #x2c :flag-assert #x90000002c ) -|# -#| (deftype vehicle-sound-info (structure) ((engine-pitch-scale float :offset-assert 0) (engine-pitch-offset float :offset-assert 4) (engine-pitch-mod-amp float :offset-assert 8) (engine-sound-select int8 :offset-assert 12) - (thrust-sound uint8 16 :offset-assert 16) ;; field uses ~g print with a quadword load! - (scrape-sound uint8 16 :offset-assert 32) ;; field uses ~g print with a quadword load! - (glance-sound uint8 16 :offset-assert 48) ;; field uses ~g print with a quadword load! - (impact-sound uint8 16 :offset-assert 64) ;; field uses ~g print with a quadword load! - (impact2-sound uint8 16 :offset-assert 80) ;; field uses ~g print with a quadword load! - (explode-sound uint8 16 :offset-assert 96) ;; field uses ~g print with a quadword load! - (explode2-sound uint8 16 :offset-assert 112) ;; field uses ~g print with a quadword load! - (extra-sound uint8 16 :offset-assert 128) ;; field uses ~g print with a quadword load! - (water-sound uint8 16 :offset-assert 144) ;; field uses ~g print with a quadword load! - (jump-sound uint8 16 :offset-assert 160) ;; field uses ~g print with a quadword load! - (turbo-sound uint8 16 :offset-assert 176) ;; field uses ~g print with a quadword load! - (damage-sound uint8 16 :offset-assert 192) ;; field uses ~g print with a quadword load! - (bank-replace basic :offset-assert 208) + ; (thrust-sound uint8 16 :offset 16) ;; field uses ~g print with a quadword load! + ; (scrape-sound uint8 16 :offset-assert 32) ;; field uses ~g print with a quadword load! + ; (glance-sound uint8 16 :offset-assert 48) ;; field uses ~g print with a quadword load! + ; (impact-sound uint8 16 :offset-assert 64) ;; field uses ~g print with a quadword load! + ; (impact2-sound uint8 16 :offset-assert 80) ;; field uses ~g print with a quadword load! + ; (explode-sound uint8 16 :offset-assert 96) ;; field uses ~g print with a quadword load! + ; (explode2-sound uint8 16 :offset-assert 112) ;; field uses ~g print with a quadword load! + ; (extra-sound uint8 16 :offset-assert 128) ;; field uses ~g print with a quadword load! + ; (water-sound uint8 16 :offset-assert 144) ;; field uses ~g print with a quadword load! + ; (jump-sound uint8 16 :offset-assert 160) ;; field uses ~g print with a quadword load! + ; (turbo-sound uint8 16 :offset-assert 176) ;; field uses ~g print with a quadword load! + ; (damage-sound uint8 16 :offset-assert 192) ;; field uses ~g print with a quadword load! + (thrust-sound sound-name :offset 16) + (scrape-sound sound-name :offset-assert 32) + (glance-sound sound-name :offset-assert 48) + (impact-sound sound-name :offset-assert 64) + (impact2-sound sound-name :offset-assert 80) + (explode-sound sound-name :offset-assert 96) + (explode2-sound sound-name :offset-assert 112) + (extra-sound sound-name :offset-assert 128) + (water-sound sound-name :offset-assert 144) + (jump-sound sound-name :offset-assert 160) + (turbo-sound sound-name :offset-assert 176) + (damage-sound sound-name :offset-assert 192) + (bank-replace pair :offset-assert 208) (idle-rpm float :offset-assert 212) (idle-pitch-scale float :offset-assert 216) (idle-crossover-rpm float :offset-assert 220) (engine-rpm float :offset-assert 224) (engine-crossover-rpm float :offset-assert 228) - (start-sound uint8 16 :offset-assert 240) ;; field uses ~g print with a quadword load! - (stop-sound uint8 16 :offset-assert 256) ;; field uses ~g print with a quadword load! - (idle-sound uint8 16 :offset-assert 272) ;; field uses ~g print with a quadword load! - (engine-sound uint8 16 :offset-assert 288) ;; field uses ~g print with a quadword load! - (engine-load-sound uint8 16 :offset-assert 304) ;; field uses ~g print with a quadword load! - (susp-creak-sound uint8 16 :offset-assert 320) ;; field uses ~g print with a quadword load! - (susp-bottom-out-sound uint8 16 :offset-assert 336) ;; field uses ~g print with a quadword load! + ; (start-sound uint8 16 :offset 240) ;; field uses ~g print with a quadword load! + ; (stop-sound uint8 16 :offset-assert 256) ;; field uses ~g print with a quadword load! + ; (idle-sound uint8 16 :offset-assert 272) ;; field uses ~g print with a quadword load! + ; (engine-sound uint8 16 :offset-assert 288) ;; field uses ~g print with a quadword load! + ; (engine-load-sound uint8 16 :offset-assert 304) ;; field uses ~g print with a quadword load! + ; (susp-creak-sound uint8 16 :offset-assert 320) ;; field uses ~g print with a quadword load! + ; (susp-bottom-out-sound uint8 16 :offset-assert 336) ;; field uses ~g print with a quadword load! + (start-sound sound-name :offset 240) + (stop-sound sound-name :offset-assert 256) + (idle-sound sound-name :offset-assert 272) + (engine-sound sound-name :offset-assert 288) + (engine-load-sound sound-name :offset-assert 304) + (susp-creak-sound sound-name :offset-assert 320) + (susp-bottom-out-sound sound-name :offset-assert 336) (susp-speed-threshold float :offset-assert 352) - (tire-roll-sounds UNKNOWN 4 :offset-assert 368) - (tire-slide-sounds UNKNOWN 2 :offset-assert 560) - (tire-roll-hum-sound vehicle-sound-loop-info :inline :offset-assert 368) - (tire-roll-dirt-sound vehicle-sound-loop-info :inline :offset-assert 416) - (tire-roll-sand-sound vehicle-sound-loop-info :inline :offset-assert 464) - (tire-roll-knobby-sound vehicle-sound-loop-info :inline :offset-assert 512) - (tire-slide-road-sound vehicle-sound-loop-info :inline :offset-assert 560) - (tire-slide-dirt-sound vehicle-sound-loop-info :inline :offset-assert 608) + (tire-roll-sounds vehicle-sound-loop-info 4 :inline :offset-assert 368) + (tire-slide-sounds vehicle-sound-loop-info 2 :inline :offset-assert 560) + (tire-roll-hum-sound vehicle-sound-loop-info :inline :offset 368) + (tire-roll-dirt-sound vehicle-sound-loop-info :inline :offset 416) + (tire-roll-sand-sound vehicle-sound-loop-info :inline :offset 464) + (tire-roll-knobby-sound vehicle-sound-loop-info :inline :offset 512) + (tire-slide-road-sound vehicle-sound-loop-info :inline :offset 560) + (tire-slide-dirt-sound vehicle-sound-loop-info :inline :offset 608) ) :method-count-assert 9 :size-assert #x290 :flag-assert #x900000290 ) -|# -#| (deftype vehicle-particle-info (structure) ((headlight-count int8 :offset-assert 0) (taillight-count int8 :offset-assert 1) (thruster-flame-width meters :offset-assert 4) (thruster-flame-length meters :offset-assert 8) - (thruster-local-pos UNKNOWN 2 :offset-assert 16) - (exhaust-local-pos UNKNOWN 2 :offset-assert 48) - (exhaust-local-dir UNKNOWN 2 :offset-assert 80) - (smoke-local-pos UNKNOWN 2 :offset-assert 112) - (smoke-local-vel UNKNOWN 2 :offset-assert 144) - (headlight-local-pos UNKNOWN 3 :offset-assert 176) - (taillight-local-pos UNKNOWN 2 :offset-assert 224) + (thruster-local-pos vector 2 :inline :offset-assert 16) + (exhaust-local-pos vector 2 :inline :offset-assert 48) + (exhaust-local-dir vector 2 :inline :offset-assert 80) + (smoke-local-pos vector 2 :inline :offset-assert 112) + (smoke-local-vel vector 2 :inline :offset-assert 144) + (headlight-local-pos vector 3 :inline :offset-assert 176) + (taillight-local-pos vector 2 :inline :offset-assert 224) ) :method-count-assert 9 :size-assert #x100 :flag-assert #x900000100 ) -|# -#| (deftype vehicle-section-info (structure) ((damage-seg-array uint64 3 :offset-assert 0) ;; guessed by decompiler (damage-seg-count int8 :offset-assert 24) ) + :pack-me :method-count-assert 9 :size-assert #x19 :flag-assert #x900000019 ) -|# -#| (deftype vehicle-damage-info (structure) ((inv-toughness-factor float :offset-assert 0) (hit-points float :offset-assert 4) @@ -52613,21 +53018,19 @@ (hit-deadly float :offset-assert 24) (impact-damage-factor float :offset-assert 28) (section-count int8 :offset-assert 32) - (section-array UNKNOWN 4 :offset-assert 40) - (section-bike-front vehicle-section-info :inline :offset-assert 40) - (section-bike-rear vehicle-section-info :inline :offset-assert 72) - (section-car-front-left vehicle-section-info :inline :offset-assert 40) - (section-car-rear-left vehicle-section-info :inline :offset-assert 72) - (section-car-front-right vehicle-section-info :inline :offset-assert 104) - (section-car-rear-right vehicle-section-info :inline :offset-assert 136) + (section-array vehicle-section-info 4 :inline :offset-assert 40) + (section-bike-front vehicle-section-info :inline :offset 40) + (section-bike-rear vehicle-section-info :inline :offset 72) + (section-car-front-left vehicle-section-info :inline :offset 40) + (section-car-rear-left vehicle-section-info :inline :offset 72) + (section-car-front-right vehicle-section-info :inline :offset 104) + (section-car-rear-right vehicle-section-info :inline :offset 136) ) :method-count-assert 9 :size-assert #xa8 :flag-assert #x9000000a8 ) -|# -#| (deftype vehicle-setup-info (structure) ((settle-height float :offset-assert 0) (settle-rot-x float :offset-assert 4) @@ -52636,63 +53039,67 @@ (look-select uint8 :offset-assert 16) (color-option-count int8 :offset-assert 17) (color-option-select int8 :offset-assert 18) + (color vector :offset-assert 20) ;; added (gun-yaw-min float :offset-assert 24) (gun-yaw-max float :offset-assert 28) (gun-pitch-min float :offset-assert 32) (gun-pitch-max float :offset-assert 36) (gun-z-offset float :offset-assert 40) ) + :pack-me :method-count-assert 9 :size-assert #x2c :flag-assert #x90000002c ) -|# -#| +;; +++vehicle-h:vehicle-seat-flag +(defenum vehicle-seat-flag + :type uint8 + :bitfield #t + (vsf0 0) + (vsf1 1) + (vsf2 2) + ) +;; ---vehicle-h:vehicle-seat-flag + (deftype vehicle-seat-info (structure) - ((data uint8 16 :offset-assert 0) ;; guessed by decompiler - (position vector :inline :offset-assert 0) - (pos-x float :offset-assert 0) - (pos-y float :offset-assert 4) - (pos-z float :offset-assert 8) - (angle int16 :offset-assert 12) - (flags uint8 :offset-assert 14) + ((data uint8 16 :offset-assert 0 :score -1) ;; guessed by decompiler + (position vector :inline :offset 0) + (pos-x float :offset 0) + (pos-y float :offset 4) + (pos-z float :offset 8) + (angle int16 :offset 12) + (flags vehicle-seat-flag :offset 14) ) :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype vehicle-grab-rail-info (structure) - ((local-pos vector 2 :offset-assert 0) ;; guessed by decompiler + ((local-pos vector 2 :inline :offset-assert 0) ;; guessed by decompiler (normal vector :inline :offset-assert 32) ) :method-count-assert 9 :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype vehicle-rider-info (structure) ((seat-count int8 :offset-assert 0) (rider-stance uint8 :offset-assert 1) (grab-rail-count int8 :offset-assert 2) (attach-point-count int8 :offset-assert 3) - (grab-rail-array uint32 :offset-assert 4) - (seat-array UNKNOWN 4 :offset-assert 16) - (rider-hand-offset UNKNOWN 2 :offset-assert 80) - (attach-point-array uint32 :offset-assert 112) + (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) ) :method-count-assert 9 :size-assert #x74 :flag-assert #x900000074 ) -|# -#| (deftype vehicle-explosion-info (joint-exploder-static-params) ((skel skeleton-group :offset-assert 40) ;; guessed by decompiler (skel-name string :offset-assert 44) ;; guessed by decompiler @@ -52702,11 +53109,17 @@ :size-assert #x34 :flag-assert #x900000034 ) -|# -#| +;; bunch of fields missing from inspect (deftype vehicle-particle-common-info (structure) - ((headlight-glow-template sprite-glow-data :offset-assert 28) + ((sp-system2d sparticle-system :offset-assert 0) + (sp-system3d sparticle-system :offset-assert 4) + (part-thruster sparticle-launcher :offset-assert 8) + (part-thruster-x sp-field-init-spec :offset-assert 12) + (part-spec2 sp-field-init-spec :offset-assert 16) + (part-quat quaternion :offset-assert 20) + (part-vel vector :offset-assert 24) + (headlight-glow-template sprite-glow-data :offset-assert 28) (taillight-glow-template sprite-glow-data :offset-assert 32) (thruster-glow-template sprite-glow-data :offset-assert 36) ) @@ -52714,17 +53127,22 @@ :size-assert #x28 :flag-assert #xa00000028 (:methods - (vehicle-particle-common-info-method-9 () none) ;; 9 + (init! (_type_) none) ;; 9 ) ) -|# -#| +;; +++vehicle-h:vehicle-type-u8 +(defenum vehicle-type-u8 + :type uint8 + :copy-entries vehicle-type + ) +;; ---vehicle-h:vehicle-type-u8 + (deftype rigid-body-vehicle-constants (rigid-body-object-constants) ((flags uint32 :offset-assert 208) (object-type uint8 :offset-assert 212) (guard-type uint8 :offset-assert 213) - (vehicle-type uint8 :offset-assert 214) + (vehicle-type vehicle-type-u8 :offset-assert 214) (engine vehicle-engine-info :inline :offset-assert 216) (transmission vehicle-transmission-info :inline :offset-assert 256) (handling vehicle-handling-info :inline :offset-assert 308) @@ -52739,193 +53157,307 @@ (rider vehicle-rider-info :inline :offset-assert 2448) (explosion vehicle-explosion-info :offset-assert 2564) ;; guessed by decompiler (explosion-part int32 :offset-assert 2568) - (debris basic :offset-assert 2572) - (name-text uint32 :offset-assert 2576) + (debris debris-static-params :offset-assert 2572) + (name-text text-id :offset-assert 2576) (particle-common vehicle-particle-common-info :offset-assert 2580) ) :method-count-assert 10 :size-assert #xa18 :flag-assert #xa00000a18 (:methods - (rigid-body-vehicle-constants-method-9 () none) ;; 9 ;; (rigid-body-vehicle-constants-method-9 (_type_) none) + (init-part! (_type_) none) ;; 9 ) ) -|# -#| (deftype vehicle-section (structure) ((damage float :offset-assert 0) ) + :allow-misaligned :method-count-assert 9 :size-assert #x4 :flag-assert #x900000004 ) -|# -#| +;; +++vehicle-h:vehicle-flag +(defenum vehicle-flag + :type uint64 + :bitfield #t + (enable-collision 0) + (disturbed 1) + (damaged 2) + (dead 3) + (player-touching 4) + (player-edge-grabbing 5) + (player-standing-on 6) + (player-impulse-force 7) + (player-contact-force 8) + (persistent 9) + (impact 10) + (in-air 11) + (on-ground 12) + (on-flight-level 13) + (riding 14) + (player-grabbed 15) + (player-dismounting 16) + (player-driving 17) + (net-player-driving 18) + (ai-driving 19) + (waiting-for-player 20) + (ignition 21) + (nav-spheres 22) + (turbo-boost 23) + (reverse-gear 24) + (traffic-managed 25) + (flight-level-transition 26) + (flight-level-transition-ending 27) + (camera-bike-mode 28) + (camera-rapid-tracking-mode 29) + (camera 30) + (camera-inside-view 31) + (camera-look-mode 32) + (alert 33) + (in-pursuit 34) + (target-in-sight 35) + (rammed-target 36) + (sounds 37) + (particles 38) + (joints 39) + (lights-on 40) + (lights-update 41) + (lights-dead 42) + (no-hijack 43) + (unique 44) + (tracking-mode 45) + (overturned 46) + (gun-dark-2-zero-g 47) + (ignore-damage 48) + (ignore-impulse 49) + (player-killed 50) + (draw-marks 51) + (vf52 52) + (vf53 53) + (vf54 54) + (vf55 55) + (vf56 56) + ) +;; ---vehicle-h:vehicle-flag + +(deftype mystery-vehicle-type1 (structure) + "vehicle::94" + ((vec0 vector :inline :offset 0) + (time uint32 :offset 0) + (word01 uint32 :offset 4) + (word00 uint32 :offset 8) + (float00 float :offset 16) + (word02 uint32 :offset 20) + ) + ) + +(deftype mystery-vehicle-type2 (structure) + "vehicle::93" + ((time uint32 :offset 0) + (word01 uint32 :offset 4) + (word00 uint32 :offset 8) + (float00 float :offset 16) + (word02 uint32 :offset 20) + ) + ) + +;; added +(deftype vehicle-thruster-work (structure) + ((quat0 quaternion :inline :offset 0) + (vec0 vector :inline :offset 32) + (vec1 vector :inline :offset 48) + (quat1 quaternion :inline :offset 64) + (vec2 vector :inline :offset 80) + (vec3 vector :inline :offset 96) + (vec4 vector :inline :offset 112) + (float0 float :offset 128) + (float1 float :offset 132) + (glow sprite-glow-data :inline :offset 144) + ) + ) + +(deftype vehicle-stack-type3 (structure) + ((vec0 vector :inline :offset 0) + (vec1 vector :inline :offset 16) + (vec2 vector :inline :offset 32) + (vec3 vector :inline :offset 48) + (mat0 matrix :inline :offset 64) + (glow sprite-glow-data :inline :offset 128) + (float0 float :offset 192) + (float1 float :offset 196) + (byte0 int8 :offset 200) + ) + ) + +(declare-type vehicle-physics-work structure) + (deftype vehicle (rigid-body-object) - ((flags vehicle-flag :offset-assert 212) ;; rigid-body-object-flag - (squad basic :offset-assert 300) - (control-hook basic :offset-assert 304) - (controls vehicle-controls :inline :offset-assert 308) - (prev-controls vehicle-controls :inline :offset-assert 332) - (engine-power-factor float :offset-assert 356) - (force-scale float :offset-assert 360) - (target-distance2 meters :offset-assert 364) - (water-flags uint32 :offset-assert 368) - (target-acceleration vector :inline :offset-assert 380) - (impact-pos vector :inline :offset-assert 396) - (impact-local-pos vector :inline :offset-assert 412) - (lin-acceleration vector :inline :offset-assert 428) - (hit-points float :offset-assert 444) - (damage-factor float :offset-assert 448) - (crash-level int8 :offset-assert 452) - (force-level int8 :offset-assert 453) - (traffic-hash-id int8 :offset-assert 454) - (traffic-priority-id int8 :offset-assert 455) - (power-fluctuation-factor float :offset-assert 456) - (power-level float :offset-assert 460) - (overlap-player-counter uint8 :offset-assert 464) - (physics-counter uint8 :offset-assert 465) - (cam-view int8 :offset-assert 466) - (brake-factor float :offset-assert 468) - (cam-speed-interp float :offset-assert 472) - (camera-dist2 float :offset-assert 476) - (player-dist2 float :offset-assert 480) - (bound-radius float :offset-assert 484) - (rider-array handle 4 :offset-assert 492) ;; guessed by decompiler - (impact-proc uint64 :offset-assert 524) - (impact-pat uint32 :offset-assert 532) - (impact-time uint32 :offset-assert 536) - (prev-impact-time uint32 :offset-assert 540) - (sent-attack-time time-frame :offset-assert 544) ;; guessed by decompiler - (air-time time-frame :offset-assert 548) ;; guessed by decompiler - (water-time uint32 :offset-assert 552) - (offscreen-time uint32 :offset-assert 556) - (crash-time time-frame :offset-assert 560) ;; guessed by decompiler - (turbo-boost-time time-frame :offset-assert 564) ;; guessed by decompiler - (player-dismount-time uint32 :offset-assert 568) - (crash-duration uint16 :offset-assert 572) - (turbo-boost-duration uint16 :offset-assert 574) - (turbo-boost-factor float :offset-assert 576) - (crash-impulse float :offset-assert 580) - (water-height float :offset-assert 584) - (lights-factor float :offset-assert 588) - (outgoing-attack-id uint32 :offset-assert 592) - (fog-fade float :offset-assert 596) - (scrape-sound-id sound-id :offset-assert 600) ;; guessed by decompiler - (damage-zap-sound-id sound-id :offset-assert 604) ;; guessed by decompiler - (scrape-sound-envelope float :offset-assert 608) - (exhaust-part-accum basic 2 :offset-assert 612) ;; guessed by decompiler - (smoke-part-accum basic 2 :offset-assert 620) ;; guessed by decompiler - (section-array vehicle-section 4 :offset-assert 628) ;; guessed by decompiler + ((info rigid-body-vehicle-constants :override) + (v-flags vehicle-flag :offset 216 :score 1) ;; rigid-body-object-flag + (unknown-flags vehicle-flag :offset 296) + (squad squad-control :offset-assert 304) + (control-hook (function vehicle vehicle-controls) :offset-assert 308) + (controls vehicle-controls :inline :offset-assert 312) + (prev-controls vehicle-controls :inline :offset-assert 336) + (engine-power-factor float :offset-assert 360) + (force-scale float :offset-assert 364) + (target-distance2 meters :offset-assert 368) + (water-flags uint32 :offset-assert 372) + (target-acceleration vector :inline :offset-assert 384) + (impact-pos vector :inline :offset-assert 400) + (impact-local-pos vector :inline :offset-assert 416) + (lin-acceleration vector :inline :offset-assert 432) + (hit-points float :offset-assert 448) + (damage-factor float :offset-assert 452) + (crash-level int8 :offset-assert 456) + (force-level int8 :offset-assert 457) + (traffic-hash-id int8 :offset-assert 458) + (traffic-priority-id int8 :offset-assert 459) + (power-fluctuation-factor float :offset-assert 460) + (power-level float :offset-assert 464) + (overlap-player-counter uint8 :offset-assert 468) + (physics-counter uint8 :offset-assert 469) + (cam-view int8 :offset-assert 470) + (brake-factor float :offset-assert 472) + (cam-speed-interp float :offset-assert 476) + (camera-dist2 float :offset-assert 480) + (player-dist2 float :offset-assert 484) + (bound-radius float :offset-assert 488) + (rider-array handle 4 :offset-assert 496) ;; guessed by decompiler + (impact-proc handle :offset-assert 528) + (impact-pat uint32 :offset-assert 536) + (impact-time uint32 :offset-assert 540) + (prev-impact-time uint32 :offset-assert 544) + (sent-attack-time uint32 :offset-assert 548) ;; guessed by decompiler + (air-time uint32 :offset-assert 552) ;; guessed by decompiler + (water-time uint32 :offset-assert 556) + (offscreen-time uint32 :offset-assert 560) + (crash-time uint32 :offset-assert 564) ;; guessed by decompiler + (turbo-boost-time uint32 :offset-assert 568) ;; guessed by decompiler + (player-dismount-time uint32 :offset-assert 572) + (crash-duration uint16 :offset-assert 576) + (turbo-boost-duration uint16 :offset-assert 578) + (turbo-boost-factor float :offset-assert 580) + (crash-impulse float :offset-assert 584) + (water-height float :offset-assert 588) + (lights-factor float :offset-assert 592) + (outgoing-attack-id uint32 :offset-assert 596) + (fog-fade float :offset-assert 600) + (scrape-sound-id sound-id :offset-assert 604) ;; guessed by decompiler + (damage-zap-sound-id sound-id :offset-assert 608) ;; guessed by decompiler + (scrape-sound-envelope float :offset-assert 612) + (exhaust-part-accum sparticle-launch-control 2 :offset-assert 616) ;; guessed by decompiler + (smoke-part-accum sparticle-launch-control 2 :offset-assert 624) ;; guessed by decompiler + (section-array vehicle-section 4 :inline :offset-assert 632) ;; guessed by decompiler ) :method-count-assert 152 :size-assert #x2b8 :flag-assert #x98024002b8 ;; field vehicle-flag is likely a value type. + (:state-methods + inactive ;; 56 + waiting ;; 57 + player-control ;; 58 + crash ;; 59 + explode ;; 60 + die ;; 61 + ) (:methods - (vehicle-method-56 () none) ;; 56 ;; (vehicle-state-56 () _type_ :state) - (vehicle-method-57 () none) ;; 57 ;; (player-control () _type_ :state) - (vehicle-method-58 () none) ;; 58 ;; (crash () _type_ :state) - (vehicle-method-59 () none) ;; 59 ;; (explode () _type_ :state) - (vehicle-method-60 () none) ;; 60 ;; (die () _type_ :state) - (vehicle-method-61 () none) ;; 61 ;; (measure-control-parameters () _type_ :state) - (vehicle-method-62 () none) ;; 62 ;; (vehicle-method-62 (_type_ float) none) - (vehicle-method-63 () none) ;; 63 ;; (vehicle-method-63 (_type_ float) none) - (vehicle-method-64 () none) ;; 64 ;; (vehicle-method-64 () none) - (vehicle-method-65 () none) ;; 65 ;; (start-jump (_type_) none) - (vehicle-method-66 () none) ;; 66 ;; (vehicle-method-66 (_type_) none) - (vehicle-method-67 () none) ;; 67 ;; (get-seat-count (_type_) int) - (vehicle-method-68 () none) ;; 68 ;; (compute-seat-position (_type_ vector int) none) - (vehicle-method-69 () none) ;; 69 ;; (get-rider-in-seat (_type_ int) process) - (vehicle-method-70 () none) ;; 70 ;; (vehicle-method-70 (_type_) process) - (vehicle-method-71 () none) ;; 71 ;; (put-rider-in-seat (_type_ int process-focusable) none) - (vehicle-method-72 () none) ;; 72 ;; (vehicle-method-72 (_type_) uint) - (vehicle-method-73 () none) ;; 73 ;; (get-best-seat-for-vehicle (_type_ vector int int) int) - (vehicle-method-74 () none) ;; 74 ;; (remove-rider (_type_ process) none) - (vehicle-method-75 () none) ;; 75 ;; (vehicle-method-75 (_type_) float) - (vehicle-method-76 () none) ;; 76 ;; (vehicle-method-76 (_type_ int uint) none) - (vehicle-method-77 () none) ;; 77 ;; (vehicle-method-77 (_type_) none) - (vehicle-method-78 () none) ;; 78 ;; (vehicle-method-78 (_type_ int) none) - (vehicle-method-79 () none) ;; 79 ;; (vehicle-method-79 (_type_) none) - (vehicle-method-80 () none) ;; 80 ;; (vehicle-method-80 (_type_) none) - (vehicle-method-81 () none) ;; 81 ;; (vehicle-method-81 (_type_) none) - (vehicle-method-82 () none) ;; 82 ;; (vehicle-method-82 (_type_) none) - (vehicle-method-83 () none) ;; 83 ;; (vehicle-method-83 (_type_) none) - (vehicle-method-84 () none) ;; 84 ;; (draw-thruster (_type_ vector vector float float) none) - (vehicle-method-85 () none) ;; 85 ;; (draw-thrusters (_type_) none) - (vehicle-method-86 () none) ;; 86 ;; (update-joint-mods (_type_) none) - (vehicle-method-87 () none) ;; 87 ;; (vehicle-method-87 (_type_) none) - (vehicle-method-88 () none) ;; 88 ;; (vehicle-method-88 (_type_) none) - (vehicle-method-89 () none) ;; 89 ;; (vehicle-method-89 (_type_) none) - (vehicle-method-90 () none) ;; 90 ;; (vehicle-method-90 (_type_) none) - (vehicle-method-91 () none) ;; 91 ;; (vehicle-method-91 (_type_) none) - (vehicle-method-92 () none) ;; 92 ;; (vehicle-method-92 (_type_) none) - (vehicle-method-93 () none) ;; 93 ;; (vehicle-method-93 (_type_) none) - (vehicle-method-94 () none) ;; 94 ;; (vehicle-method-94 (_type_) none) - (vehicle-method-95 () none) ;; 95 ;; (vehicle-method-95 (_type_ vector) none) - (vehicle-method-96 () none) ;; 96 ;; (vehicle-method-96 (_type_) none) - (vehicle-method-97 () none) ;; 97 ;; (vehicle-method-97 (_type_) none) - (vehicle-method-98 () none) ;; 98 ;; (vehicle-method-98 (_type_ float) none) - (vehicle-method-99 () none) ;; 99 ;; (vehicle-method-99 (_type_ float) none) - (vehicle-method-100 () none) ;; 100 ;; (vehicle-method-100 (_type_ float vehicle-physics-work) none) - (vehicle-method-101 () none) ;; 101 ;; (vehicle-method-101 (_type_) none) - (vehicle-method-102 () none) ;; 102 ;; (shadow-enable (_type_) none) - (vehicle-method-103 () none) ;; 103 ;; (shadow-disable (_type_) none) - (vehicle-method-104 () none) ;; 104 ;; (vehicle-method-104 (_type_) none) - (vehicle-method-105 () none) ;; 105 ;; (vehicle-method-105 (_type_) symbol) - (vehicle-method-106 () none) ;; 106 ;; (vehicle-method-106 (_type_) none) - (vehicle-method-107 () none) ;; 107 ;; (vehicle-method-107 (_type_) none) - (vehicle-method-108 () none) ;; 108 ;; (vehicle-method-108 (_type_) none) - (vehicle-method-109 () none) ;; 109 ;; (vehicle-method-109 (_type_) none) - (vehicle-method-110 () none) ;; 110 ;; (vehicle-method-110 (_type_) none) - (vehicle-method-111 () none) ;; 111 ;; (vehicle-method-111 (_type_ object target) none) - (vehicle-method-112 () none) ;; 112 ;; (decrease-traffic-alert-level (_type_ int) int) - (vehicle-method-113 () none) ;; 113 ;; (vehicle-method-113 (_type_) none) - (vehicle-method-114 () none) ;; 114 ;; (vehicle-method-114 (_type_) none) - (vehicle-method-115 () none) ;; 115 ;; (vehicle-method-115 (_type_ vector) none) - (vehicle-method-116 () none) ;; 116 ;; (vehicle-method-116 (_type_ (pointer vehicle-controls)) none) - (vehicle-method-117 () none) ;; 117 ;; (vehicle-method-117 (_type_ vector int int) none) - (vehicle-method-118 () none) ;; 118 ;; (vehicle-method-118 (_type_ int) none) - (vehicle-method-119 () none) ;; 119 ;; (vehicle-method-119 (_type_) none) - (vehicle-method-120 () none) ;; 120 ;; (vehicle-method-120 (_type_) none) - (vehicle-method-121 () none) ;; 121 ;; (vehicle-method-121 (_type_) none) - (vehicle-method-122 () none) ;; 122 ;; (vehicle-method-122 (_type_) none) - (vehicle-method-123 () none) ;; 123 ;; (vehicle-method-123 (_type_) none) - (vehicle-method-124 () none) ;; 124 ;; (vehicle-method-124 (_type_) none) - (vehicle-method-125 () none) ;; 125 ;; (vehicle-method-125 (_type_ float) none) - (vehicle-method-126 () none) ;; 126 ;; (vehicle-method-126 (_type_ float) none) - (vehicle-method-127 () none) ;; 127 ;; (vehicle-method-127 (_type_) none) - (vehicle-method-128 () none) ;; 128 ;; (vehicle-method-128 (_type_) none) - (vehicle-method-129 () none) ;; 129 ;; (vehicle-method-129 (_type_) none) - (vehicle-method-130 () none) ;; 130 ;; (vehicle-method-130 (_type_ traffic-object-spawn-params) none) - (vehicle-method-131 () none) ;; 131 ;; (vehicle-method-131 (_type_) none) - (vehicle-method-132 () none) ;; 132 ;; (vehicle-method-132 (_type_) none) - (vehicle-method-133 () none) ;; 133 ;; (check-player-get-on (_type_) none) - (vehicle-method-134 () none) ;; 134 ;; (vehicle-method-134 (_type_ process) none) - (vehicle-method-135 () none) ;; 135 ;; (vehicle-method-135 (_type_ traffic-object-spawn-params) none) - (vehicle-method-136 () none) ;; 136 ;; (vehicle-method-136 (_type_ traffic-object-spawn-params) none) - (vehicle-method-137 () none) ;; 137 ;; (vehicle-method-137 (_type_ traffic-object-spawn-params) none) - (vehicle-method-138 () none) ;; 138 ;; (vehicle-method-138 (_type_) none) - (vehicle-method-139 () none) ;; 139 ;; (vehicle-method-139 (_type_) none) - (vehicle-method-140 () none) ;; 140 ;; (vehicle-method-140 (_type_) none) - (vehicle-method-141 () none) ;; 141 ;; (vehicle-method-141 (_type_) none) - (vehicle-method-142 () none) ;; 142 ;; (vehicle-method-142 (_type_) none) - (vehicle-method-143 () none) ;; 143 ;; (vehicle-method-143 (_type_) none) - (vehicle-method-144 () none) ;; 144 - (vehicle-method-145 () none) ;; 145 - (vehicle-method-146 () none) ;; 146 - (vehicle-method-147 () none) ;; 147 - (vehicle-method-148 () none) ;; 148 - (vehicle-method-149 () none) ;; 149 - (vehicle-method-150 () none) ;; 150 - (vehicle-method-151 () none) ;; 151 + (vehicle-method-62 (_type_) none) ;; 62 ;; (vehicle-method-62 (_type_ float) none) + (vehicle-method-63 (_type_) none) ;; 63 ;; (vehicle-method-63 (_type_ float) none) + (vehicle-method-64 (_type_) none) ;; 64 + (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_) 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_) 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) + (vehicle-method-74 (_type_ int time-frame) none) ;; 74 ;; (remove-rider (_type_ process) none) + (vehicle-method-75 (_type_) none) ;; 75 ;; (vehicle-method-75 (_type_) float) + (vehicle-method-76 (_type_) none) ;; 76 ;; (vehicle-method-76 (_type_ int uint) none) + (vehicle-method-77 (_type_) none) ;; 77 + (vehicle-method-78 (_type_) none) ;; 78 ;; (vehicle-method-78 (_type_ int) none) + (vehicle-method-79 (_type_) none) ;; 79 + (vehicle-method-80 (_type_) none) ;; 80 + (vehicle-method-81 (_type_) none) ;; 81 + (vehicle-method-82 (_type_) none) ;; 82 + (vehicle-method-83 (_type_) none) ;; 83 + (vehicle-method-84 (_type_) none) ;; 84 ;; (draw-thruster (_type_ vector vector float float) none) + (vehicle-method-85 (_type_) none) ;; 85 ;; (draw-thrusters (_type_) none) + (vehicle-method-86 (_type_) none) ;; 86 ;; (update-joint-mods (_type_) none) + (vehicle-method-87 (_type_) none) ;; 87 + (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 + (vehicle-method-92 (_type_ vehicle-controls) none) ;; 92 + (vehicle-method-93 (_type_) none) ;; 93 + (vehicle-method-94 (_type_) none) ;; 94 + (vehicle-method-95 (_type_ vector float) none) ;; 95 ;; (vehicle-method-95 (_type_ vector) none) + (vehicle-method-96 (_type_ float) none) ;; 96 + (vehicle-method-97 (_type_ float vehicle-physics-work) none) ;; 97 + (vehicle-method-98 (_type_) none) ;; 98 ;; (vehicle-method-98 (_type_ float) none) + (vehicle-method-99 (_type_) none) ;; 99 ;; (vehicle-method-99 (_type_ float) none) + (vehicle-method-100 (_type_) none) ;; 100 ;; (vehicle-method-100 (_type_ float vehicle-physics-work) none) + (vehicle-method-101 (_type_) none) ;; 101 + (vehicle-method-102 (_type_) symbol) ;; 102 ;; (shadow-enable (_type_) none) + (vehicle-method-103 (_type_) none) ;; 103 ;; (shadow-disable (_type_) none) + (vehicle-method-104 (_type_) none) ;; 104 + (vehicle-method-105 (_type_) none) ;; 105 ;; (vehicle-method-105 (_type_) symbol) + (vehicle-method-106 (_type_) none) ;; 106 + (vehicle-method-107 (_type_ int process) none) ;; 107 + (vehicle-method-108 (_type_ int) none) ;; 108 + (vehicle-method-109 (_type_) none) ;; 109 + (vehicle-method-110 (_type_) none) ;; 110 + (get-linear-accel! (_type_ vector) none) ;; 111 ;; (vehicle-method-111 (_type_ object target) none) + (copy-vehicle-controls! (_type_ vehicle-controls) none) ;; 112 ;; (decrease-traffic-alert-level (_type_ int) int) + (vehicle-method-113 (_type_ vector int int) none) ;; 113 + (vehicle-method-114 (_type_ int) none) ;; 114 + (vehicle-method-115 (_type_) none) ;; 115 ;; (vehicle-method-115 (_type_ vector) none) + (vehicle-method-116 (_type_ symbol) none) ;; 116 ;; (vehicle-method-116 (_type_ (pointer vehicle-controls)) none) + (vehicle-method-117 (_type_) none) ;; 117 ;; (vehicle-method-117 (_type_ vector int int) none) + (vehicle-method-118 (_type_) none) ;; 118 ;; (vehicle-method-118 (_type_ int) none) + (vehicle-method-119 (_type_) none) ;; 119 + (apply-gravity (_type_ float) none) ;; 120 + (apply-gravity1 (_type_ float) none) ;; 121 + (vehicle-method-122 (_type_) none) ;; 122 + (vehicle-method-123 (_type_) none) ;; 123 + (vehicle-method-124 (_type_) none) ;; 124 + (vehicle-method-125 (_type_) none) ;; 125 ;; (vehicle-method-125 (_type_ float) none) + (vehicle-method-126 (_type_) none) ;; 126 ;; (vehicle-method-126 (_type_ float) none) + (check-player-get-on (_type_ process-focusable) symbol) ;; 127 ;; (vehicle-method-127 (_type_) none) + (vehicle-method-128 (_type_) symbol) ;; 128 + (vehicle-method-129 (_type_) none) ;; 129 + (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_ 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) + (vehicle-method-137 (_type_) none) ;; 137 ;; (vehicle-method-137 (_type_ traffic-object-spawn-params) none) + (vehicle-method-138 (_type_) none) ;; 138 + (vehicle-method-139 (_type_) none) ;; 139 + (vehicle-method-140 (_type_) none) ;; 140 + (vehicle-method-141 (_type_) symbol) ;; 141 + (vehicle-method-142 (_type_) none) ;; 142 + (vehicle-method-143 (_type_ process) object) ;; 143 + (vehicle-method-144 (_type_) none) ;; 144 + (vehicle-method-145 (_type_) none) ;; 145 + (vehicle-method-146 (_type_ vector) none) ;; 146 + (vehicle-method-147 (_type_) none) ;; 147 + (vehicle-method-148 (_type_) none) ;; 148 + (vehicle-method-149 (_type_) none) ;; 149 + (vehicle-method-150 (_type_) none) ;; 150 + (set-hit-points (_type_ float) none) ;; 151 ) ) -|# -#| (deftype vehicle-probe-work (structure) ((local-pos vector :inline :offset-assert 0) (local-normal vector :inline :offset-assert 16) @@ -52942,9 +53474,7 @@ :size-assert #xa0 :flag-assert #x9000000a0 ) -|# -#| (deftype vehicle-physics-work (structure) ((mat matrix :inline :offset-assert 0) (force vector :inline :offset-assert 64) @@ -52964,15 +53494,13 @@ (vel-dot-norm float :offset-assert 276) (friction-coef float :offset-assert 280) (speed-factor float :offset-assert 284) - (probe-work-array vehicle-probe-work 4 :offset-assert 288) ;; guessed by decompiler + (probe-work-array vehicle-probe-work 4 :inline :offset-assert 288) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x3a0 :flag-assert #x9000003a0 ) -|# -#| (deftype vehicle-draw-thruster-params (structure) ((quat quaternion :inline :offset-assert 0) (trans vector :inline :offset-assert 16) @@ -52985,14 +53513,21 @@ :size-assert #x30 :flag-assert #x900000030 ) -|# ;; (deftype debug-vehicle-work (basic) ;; () ;; :flag-assert #x900000070 ;; ) -;; (define-extern meters-per-sec->mph function) +(deftype debug-vehicle-work (basic) + ((impact-time time-frame :offset-assert 8) + (impact rigid-body-impact :inline :offset-assert 16) + (prim-sphere1 sphere :inline :offset-assert 80) + (prim-sphere2 sphere :inline :offset-assert 96) + ) + ) + +(define-extern meters-per-sec->mph (function float float)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; vehicle-part ;; @@ -53003,55 +53538,62 @@ ;; vehicle-effects ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern calc-fade-vals function) ;; (function float none) -;; (define-extern *vehicle-headlight-glow-template* object) ;; sprite-glow-data -;; (define-extern *vehicle-taillight-glow-template* object) ;; sprite-glow-data -;; (define-extern *vehicle-thruster-glow-template* object) ;; sprite-glow-data -;; (define-extern *vehicle-particle-common-info* object) -;; (define-extern vehicle-draw-thruster function) +(define-extern calc-fade-vals (function float none)) +(define-extern *vehicle-headlight-glow-template* sprite-glow-data) +(define-extern *vehicle-taillight-glow-template* sprite-glow-data) +(define-extern *vehicle-thruster-glow-template* sprite-glow-data) +(define-extern *vehicle-particle-common-info* vehicle-particle-common-info) +(define-extern vehicle-draw-thruster (function vehicle-particle-common-info vehicle-draw-thruster-params none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; vehicle ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *debug-vehicle-work* debug-vehicle-work) ;; debug-vehicle-work -;; (define-extern *vehicle-shadow-control* shadow-control) ;; shadow-control -;; (define-extern *vehicle-shadow-control-disabled* shadow-control) ;; shadow-control -;; (define-extern vehicle-event-handler function) ;; (function process int symbol event-message-block object :behavior vehicle) +(define-extern *debug-vehicle-work* debug-vehicle-work) +(define-extern *vehicle-shadow-control* shadow-control) +(define-extern *vehicle-shadow-control-disabled* shadow-control) +(define-extern vehicle-event-handler (function process int symbol event-message-block object :behavior vehicle)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; vehicle-util ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +(deftype mystery-vehicle-type0 (structure) + "vehicle::check-player-get-on" + ((mat matrix 3 :inline :offset-assert 0) + (vec vector 2 :inline :offset-assert 192) + (proc handle 2 :offset-assert 224) + (cquery collide-query :inline :offset-assert 240) + (floats float 5 :offset-assert 780) + ) + ) + (deftype vehicle-hud-request (structure) - ((handle uint64 :offset-assert 0) ;; handle - (hack-handle-init basic :offset-assert 0) + ((handle handle :offset-assert 0) ;; handle + (hack-handle-init symbol :offset 0) (priority float :offset-assert 8) ) + :pack-me :method-count-assert 9 :size-assert #xc :flag-assert #x90000000c ) -|# -#| (deftype vehicle-hud-requests (structure) - ((time uint64 :offset-assert 0) ;; time-frame - (requests vehicle-hud-request 4 :offset-assert 8) ;; guessed by decompiler + ((time time-frame :offset-assert 0) ;; time-frame + (requests vehicle-hud-request 4 :inline :offset-assert 8) ;; guessed by decompiler ) + :pack-me :method-count-assert 12 :size-assert #x48 :flag-assert #xc00000048 (:methods - (vehicle-hud-requests-method-9 () none) ;; 9 ;; (vehicle-hud-requests-method-9 (_type_) none) - (vehicle-hud-requests-method-10 () none) ;; 10 ;; (vehicle-hud-requests-method-10 (_type_) vehicle-hud-request) - (vehicle-hud-requests-method-11 () none) ;; 11 ;; (vehicle-hud-requests-method-11 (_type_) vehicle-hud-request) + (vehicle-hud-requests-method-9 (_type_) none) ;; 9 + (vehicle-hud-requests-method-10 (_type_) vehicle-hud-request) ;; 10 ;; (vehicle-hud-requests-method-10 (_type_) vehicle-hud-request) + (vehicle-hud-requests-method-11 (_type_) vehicle-hud-request) ;; 11 ) ) -|# -#| (deftype vehicle-hud-chooser (structure) ((cur vehicle-hud-requests :inline :offset-assert 0) (last vehicle-hud-requests :inline :offset-assert 72) @@ -53060,13 +53602,12 @@ :size-assert #x90 :flag-assert #xa00000090 (:methods - (vehicle-hud-chooser-method-9 () none) ;; 9 ;; (vehicle-hud-chooser-method-9 (_type_ handle float) symbol) + (vehicle-hud-chooser-method-9 (_type_ handle float) symbol) ;; 9 ) ) -|# -;; (define-extern *vehicle-hud-chooser* object) ;; vehicle-hud-chooser -;; (define-extern *pilot-edge-grab-info* object) ;; pilot-edge-grab-info +(define-extern *vehicle-hud-chooser* vehicle-hud-chooser) +(define-extern *pilot-edge-grab-info* pilot-edge-grab-info) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; vehicle-physics ;; @@ -53077,7 +53618,7 @@ ;; vehicle-states ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern vehicle-explode-post function) ;; (function none :behavior vehicle) +(define-extern vehicle-explode-post (function none :behavior vehicle)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; vehicle-manager ;; @@ -53088,48 +53629,97 @@ :method-count-assert 18 :size-assert #x80 :flag-assert #x1200000080 - (:methods - (vehicle-manager-method-16 () none) ;; 16 - (vehicle-manager-method-17 () none) ;; 17 - ) (:state-methods - active ;; 15 idle ;; 14 + active ;; 15 ) - ) - -;; (define-extern *vehicle-rigid-body-queue* object) -;; (define-extern *vehicle-info* object) -;; (define-extern vehicle-entity-hack function) -;; (define-extern vehicle-manager-event-handler function) -;; (define-extern vehicle-manager-init-by-other function) -;; (define-extern vehicle-manager-start function) -;; (define-extern vehicle-manager-kill function) -;; (define-extern vehicle-init-by-other function) ;; (function traffic-object-spawn-params none :behavior vehicle) -;; (define-extern vehicle-spawn-hack function) -(define-extern vehicle-spawn (function process type traffic-object-spawn-params process-drawable)) -;; (define-extern type-from-vehicle-type function) ;; (function vehicle-type type) + (:methods + (vehicle-manager-method-16 (_type_) none) ;; 16 + (vehicle-manager-method-17 (_type_) none) ;; 17 + ) + ) + +(define-extern *vehicle-rigid-body-queue* rigid-body-queue) +(define-extern *vehicle-info* vehicle-info) +(define-extern vehicle-entity-hack (function int none)) +(def-event-handler vehicle-manager-event-handler vehicle-manager) +(define-extern vehicle-manager-init-by-other (function object :behavior vehicle-manager)) +(define-extern vehicle-manager-start (function process none)) +(define-extern vehicle-manager-kill (function none)) +(define-extern vehicle-init-by-other (function int traffic-object-spawn-params object :behavior vehicle)) +(define-extern vehicle-spawn-hack (function type traffic-object-spawn-params process vehicle)) +(define-extern vehicle-spawn (function vehicle-type traffic-object-spawn-params process-drawable)) +(define-extern type-from-vehicle-type (function vehicle-type type)) + +(define-extern h-bike-a type) +(declare-type h-bike-a vehicle) +(define-extern h-bike-b type) +(declare-type h-bike-b vehicle) +(define-extern h-bike-c type) +(declare-type h-bike-c vehicle) +(define-extern h-bike-d type) +(declare-type h-bike-d vehicle) +(define-extern h-car-a type) +(declare-type h-car-a vehicle) +(define-extern h-car-b type) +(declare-type h-car-b vehicle) +(define-extern h-car-c type) +(declare-type h-car-c vehicle) +(define-extern h-car-d type) +(declare-type h-car-d vehicle) +(define-extern h-hellcat type) +(declare-type h-hellcat vehicle) +(define-extern h-warf type) +(declare-type h-warf vehicle) +(define-extern h-glider type) +(declare-type h-glider vehicle) +(define-extern h-sled type) +(declare-type h-sled vehicle) +(define-extern h-kg-pickup type) +(declare-type h-kg-pickup vehicle) +(define-extern v-scorpion type) +(declare-type v-scorpion vehicle) +(define-extern v-toad type) +(declare-type v-toad vehicle) +(define-extern v-fox type) +(declare-type v-fox vehicle) +(define-extern v-rhino type) +(declare-type v-rhino vehicle) +(define-extern v-mirage type) +(declare-type v-mirage vehicle) +(define-extern v-x-ride type) +(declare-type v-x-ride vehicle) +(declare-type v-marauder vehicle) +(define-extern v-faccar type) +(declare-type v-faccar vehicle) +(define-extern v-catapult type) +(declare-type v-catapult vehicle) +(define-extern v-marauder-b type) +(declare-type v-marauder-b vehicle) +(define-extern evan-test-bike type) +(declare-type evan-test-bike vehicle) +(define-extern wbike-test type) +(declare-type wbike-test vehicle) +(define-extern test-car type) +(declare-type test-car vehicle) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; vehicle-hud ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype hud-vehicle-health (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -;; (define-extern hud-vehicle-health-spawn function) +(define-extern hud-vehicle-health-spawn (function vehicle hud-vehicle-health)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; turret-control ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype turret-barrel-info (structure) ((local-pos vector :inline :offset-assert 0) (local-dir vector :inline :offset-assert 16) @@ -53138,11 +53728,34 @@ :size-assert #x20 :flag-assert #x900000020 ) -|# -#| +(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) + ) + ) + (deftype turret-control-info (structure) - ((shot-type basic :offset-assert 0) + ((shot-type type :offset-assert 0) (joint-index int8 :offset-assert 4) (barrel-count int8 :offset-assert 5) (shot-speed float :offset-assert 8) @@ -53152,21 +53765,32 @@ (vehicle-impulse-factor float :offset-assert 24) (rot-min float 2 :offset-assert 28) ;; guessed by decompiler (rot-max float 2 :offset-assert 36) ;; guessed by decompiler - (rot-x-min float :offset-assert 28) - (rot-x-max float :offset-assert 36) - (rot-y-min float :offset-assert 32) - (rot-y-max float :offset-assert 40) + (rot-x-min float :offset 28) + (rot-x-max float :offset 36) + (rot-y-min float :offset 32) + (rot-y-max float :offset 40) (local-pos vector :inline :offset-assert 48) (local-dir vector :inline :offset-assert 64) - (barrel-array turret-barrel-info 4 :offset-assert 80) ;; guessed by decompiler + (barrel-array turret-barrel-info 4 :inline :offset-assert 80) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #xd0 :flag-assert #x9000000d0 ) -|# -#| +;; +++turret-control: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-control:turret-flag + (deftype turret-control (structure) ((info turret-control-info :offset-assert 0) (guard-settings squad-unit-settings :offset-assert 4) ;; traffic-guard-type-settings @@ -53178,87 +53802,93 @@ (target-dist float :offset-assert 16) (inaccuracy float :offset-assert 20) (burst-delay-factor float :offset-assert 24) - (aim-offset-angle float :offset-assert 28) ;; degrees + (aim-offset-angle degrees :offset-assert 28) ;; degrees (aim-rot float 2 :offset-assert 32) ;; guessed by decompiler (aim-rot-vel float 2 :offset-assert 40) ;; guessed by decompiler (aim-rot-offset float 2 :offset-assert 48) ;; guessed by decompiler - (aim-rot-x float :offset-assert 32) - (aim-rot-y float :offset-assert 36) - (aim-rot-vel-x float :offset-assert 40) - (aim-rot-vel-y float :offset-assert 44) - (target-in-sight-time uint64 :offset-assert 56) ;; time-frame - (aim-acquire-time uint64 :offset-assert 64) ;; time-frame - (shoot-time uint64 :offset-assert 72) ;; time-frame - (owner-handle uint64 :offset-assert 80) ;; handle - (ignore-handle uint64 :offset-assert 88) + (aim-rot-x float :offset 32) + (aim-rot-y float :offset 36) + (aim-rot-vel-x float :offset 40) + (aim-rot-vel-y float :offset 44) + (target-in-sight-time time-frame :offset-assert 56) ;; time-frame + (aim-acquire-time time-frame :offset-assert 64) ;; time-frame + (shoot-time time-frame :offset-assert 72) ;; time-frame + (owner-handle handle :offset-assert 80) ;; handle + (ignore-handle handle :offset-assert 88) ) :method-count-assert 18 :size-assert #x60 :flag-assert #x1200000060 ;; field turret-flag is likely a value type. (:methods - (turret-control-method-9 () none) ;; 9 ;; (turret-control-method-9 (_type_ vehicle vector vector) none) - (turret-control-method-10 () none) ;; 10 ;; (turret-control-method-10 (_type_ vehicle) none) - (turret-control-method-11 () none) ;; 11 ;; (turret-control-method-11 (_type_ object object vector) none) - (turret-control-method-12 () none) ;; 12 ;; (update-joint-mod (_type_ joint-mod-rotate-local) none) - (turret-control-method-13 () none) ;; 13 ;; (turret-control-method-13 (_type_) none) - (turret-control-method-14 () none) ;; 14 ;; (turret-control-method-14 (_type_) none) - (turret-control-method-15 () none) ;; 15 ;; (set-info (_type_ turret-control-info) none) - (turret-control-method-16 () none) ;; 16 ;; (turret-control-method-16 (_type_ float float) none) - (turret-control-method-17 () none) ;; 17 ;; (turret-control-method-17 (_type_ vehicle) none) + (turret-control-method-9 (_type_ vehicle vector vector) none) ;; 9 + (turret-control-method-10 (_type_ vehicle) none) ;; 10 + (turret-control-method-11 (_type_ object object vector) none) ;; 11 + (update-joint-mod (_type_ joint-mod-rotate-local) none) ;; 12 + (turret-control-method-13 (_type_) none) ;; 13 + (turret-control-method-14 (_type_) none) ;; 14 + (set-info (_type_ turret-control-info) none) ;; 15 + (turret-control-method-16 (_type_ float float) none) ;; 16 + (turret-control-method-17 (_type_ vehicle) none) ;; 17 ) ) -|# -;; (define-extern vehicle-los-clear? function) ;; (function vector vector symbol) -;; (define-extern vehicle-draw-beam function) ;; (function sparticle-launcher vector vector object symbol none) -;; (define-extern vehicle-draw-laser-spot function) ;; (function vector vector symbol none) -;; (define-extern vehicle-draw-laser function) ;; (function vector vector none) +(define-extern vehicle-los-clear? (function vector vector symbol)) +(define-extern vehicle-draw-beam (function sparticle-launcher vector vector object symbol none)) +(define-extern vehicle-draw-laser-spot (function vector vector symbol none)) +(define-extern vehicle-draw-laser (function vector vector none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; target-pilot ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *pilot-mods* surface) ;; surface -;; (define-extern target-pilot-handler function) ;; (function process int symbol event-message-block object :behavior target) -;; (define-extern target-pilot-pidax-enter function) ;; (function object :behavior target) -;; (define-extern target-pilot-pidax-exit function) ;; (function object :behavior target) -;; (define-extern target-pilot-exit function) ;; (function object :behavior target) -;; (define-extern target-pilot-init function) ;; (function handle symbol object :behavior target) -;; (define-extern pilot-on-ground? function) ;; (function symbol :behavior target) -;; (define-extern target-pilot-post function) ;; (function none :behavior target) +(deftype cquery-with-5vec (structure) + "target-pilot-post" + ((cquery collide-query :inline) + (vec vector 5 :inline) + ) + ) + +(define-extern h-warf type) +(define-extern *pilot-mods* surface) +(define-extern target-pilot-handler (function process int symbol event-message-block object :behavior target)) +(define-extern target-pilot-pidax-enter (function object :behavior target)) +(define-extern target-pilot-pidax-exit (function object :behavior target)) +(define-extern target-pilot-exit (function object :behavior target)) +(define-extern target-pilot-init (function handle symbol object :behavior target)) +(define-extern pilot-on-ground? (function symbol :behavior target)) +(define-extern target-pilot-post (function none :behavior target)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; pilot-states ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern target-pilot-bike-anim-loop function) ;; (function none :behavior target) -;; (define-extern target-pilot-car-anim-loop function) ;; (function none :behavior target) -;; (define-extern target-pilot-wcar-anim-loop function) -;; (define-extern target-pilot-glider-anim-loop function) -;; (define-extern target-daxter-pilot-car-anim-loop function) ;; (function none :behavior target) -;; (define-extern target-pilot-trans function) ;; (function none :behavior target) -;; (define-extern target-pilot-signal-ready function) ;; (function object :behavior target) -;; (define-extern *pilot-get-on-mods* object) ;; surface -;; (define-extern *pilot-get-off-mods* object) ;; surface +(define-extern target-pilot-bike-anim-loop (function none :behavior target)) +(define-extern target-pilot-car-anim-loop (function none :behavior target)) +(define-extern target-pilot-wcar-anim-loop (function none :behavior target)) +(define-extern target-pilot-glider-anim-loop (function none :behavior target)) +(define-extern target-daxter-pilot-car-anim-loop (function none :behavior target)) +(define-extern target-pilot-trans (function none :behavior target)) +(define-extern target-pilot-signal-ready (function object :behavior target)) +(define-extern *pilot-get-on-mods* surface) +(define-extern *pilot-get-off-mods* surface) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 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) @@ -53266,46 +53896,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) @@ -53315,6 +53942,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) @@ -53322,27 +53955,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 ;; @@ -53358,6 +53982,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 ;; @@ -53368,25 +53998,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) @@ -53394,22 +54021,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) @@ -53417,171 +54042,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) @@ -53590,57 +54205,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 @@ -53650,27 +54260,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 ;; @@ -53681,16 +54290,15 @@ ;; 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 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype elec-gate-params (structure) ((bolt-spec lightning-spec :offset-assert 0) ;; guessed by decompiler (ring-spec lightning-spec :offset-assert 4) ;; guessed by decompiler @@ -53707,9 +54315,7 @@ :size-assert #x28 :flag-assert #x900000028 ) -|# -#| (deftype elec-gate-bolt (structure) ((ring lightning-control 2 :offset-assert 0) ;; guessed by decompiler (bolt lightning-control :offset-assert 8) ;; guessed by decompiler @@ -53720,9 +54326,7 @@ :size-assert #x14 :flag-assert #x900000014 ) -|# -#| (deftype elec-wall (structure) ((pos vector :inline :offset-assert 0) (dir vector :inline :offset-assert 16) @@ -53731,24 +54335,22 @@ :size-assert #x20 :flag-assert #x900000020 ) -|# -#| (deftype elec-gate (process-drawable) ((params elec-gate-params :offset-assert 200) - (path-l path-control :offset-assert 152) ;; guessed by decompiler + (path-l path-control :offset 152) ;; guessed by decompiler (path-r path-control :offset-assert 204) ;; guessed by decompiler - (l-bolt elec-gate-bolt 5 :offset-assert 208) ;; guessed by decompiler - (part-on sparticle-launch-control :offset-assert 168) ;; guessed by decompiler + (l-bolt elec-gate-bolt 5 :inline :offset-assert 208) ;; guessed by decompiler + (part-on sparticle-launch-control :offset 168) ;; guessed by decompiler (part-off sparticle-launch-control :offset-assert 368) ;; guessed by decompiler (part-spawner-left part-spawner :offset-assert 372) ;; guessed by decompiler (part-spawner-right part-spawner :offset-assert 376) ;; guessed by decompiler (on-start pair :offset-assert 380) ;; guessed by decompiler (on-stop pair :offset-assert 384) ;; guessed by decompiler - (on-shutdown basic :offset-assert 388) - (on-trigger basic :offset-assert 392) + (on-shutdown pair :offset-assert 388) + (on-trigger pair :offset-assert 392) (dividing-wall elec-wall :inline :offset-assert 400) - (plane elec-wall 2 :offset-assert 432) ;; guessed by decompiler + (plane elec-wall 2 :inline :offset-assert 432) ;; guessed by decompiler (wall-y float :offset-assert 496) (wall-xz float :offset-assert 500) (lightning-quality float :offset-assert 504) @@ -53758,25 +54360,23 @@ :size-assert #x200 :flag-assert #x1f01800200 ;; field on-start uses ~A with a signed load. field on-stop uses ~A with a signed load. field on-shutdown uses ~A with a signed load. field on-trigger uses ~A with a signed load. - (:methods - (elec-gate-method-24 () none) ;; 24 ;; (elec-gate-method-24 (_type_) none) - (elec-gate-method-25 () none) ;; 25 ;; (set-palette! (_type_) none) - (elec-gate-method-26 () none) ;; 26 ;; (set-state! (_type_) none) - (elec-gate-method-27 () none) ;; 27 ;; (spawn-particles (_type_ sparticle-launch-control) none) - (elec-gate-method-28 () none) ;; 28 ;; (set-elec-scale-if-close! (_type_ float) none) - (elec-gate-method-29 () none) ;; 29 ;; (set-elec-scale! (_type_ float) none) - (elec-gate-method-30 () none) ;; 30 - ) (:state-methods - shutdown ;; 23, old: (get-params (_type_) elec-gate-params) - shutdown-camera ;; 22, old: (shutdown () _type_ :state) - active ;; 21, old: (active () _type_ :state) - idle ;; 20, old: (idle () _type_ :state) + idle ;; 20 + active ;; 21 + shutdown-camera ;; 22 + shutdown ;; 23 + ) + (:methods + (get-params (_type_) elec-gate-params) ;; 24 + (elec-gate-method-25 (_type_) none) ;; 25 ;; (set-palette! (_type_) none) + (elec-gate-method-26 (_type_) none) ;; 26 ;; (set-state! (_type_) none) + (go-initial-state (_type_) object) ;; 27 + (spawn-particles (_type_ sparticle-launch-control) none) ;; 28 ;; (set-elec-scale-if-close! (_type_ float) none) + (set-elec-scale! (_type_ float) none) ;; 29 + (elec-gate-method-30 (_type_ float) none) ;; 30 ) ) -|# -#| (deftype sewer-elec-gate (elec-gate) ((gate-index int32 :offset-assert 512) ) @@ -53784,10 +54384,9 @@ :size-assert #x204 :flag-assert #x1f01900204 ) -|# -;; (define-extern *default-elec-gate-params* object) ;; elec-gate-params -;; (define-extern elec-gate-post function) ;; (function none :behavior elec-gate) +(define-extern *default-elec-gate-params* elec-gate-params) +(define-extern elec-gate-post (function none :behavior elec-gate)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; intro-part ;; @@ -54095,35 +54694,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 - (:methods - (desert-eggwall-method-22 () none) ;; 22 - ) (:state-methods - die ;; 21 idle ;; 20 + die ;; 21 + ) + (:methods + (desert-eggwall-method-22 () none) ;; 22 ) ) -|# -#| (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 @@ -54132,73 +54726,80 @@ 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 + notice ;; 35 stare ;; 37 + hostile ;; 38 jump ;; 44 - notice ;; 35 + 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 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++prebot-eco-creature:eco-creature-flag +(defenum eco-creature-flag + :type uint64 + :bitfield #t + (ecf0 0) + (ecf1 1) + (ecf2 2) + (ecf3 3) + (ecf4 4) + (ecf5 5) + ) +;; ---prebot-eco-creature:eco-creature-flag + (deftype prebot-large-eco-creature (nav-enemy) ((old-y-deg float :offset-assert 620) (diff-angle float :offset-assert 624) - (attack-anims basic :offset-assert 628) - (victory-anims basic :offset-assert 632) + (attack-anims (array int32) :offset-assert 628) + (victory-anims (array int32) :offset-assert 632) (turn-left-anim int32 :offset-assert 636) (turn-right-anim int32 :offset-assert 640) - (split-type basic :offset-assert 644) + (split-type type :offset-assert 644) (attack-stop-frame float :offset-assert 648) (traj trajectory :inline :offset-assert 656) (which-trajectory int8 :offset-assert 696) @@ -54206,35 +54807,33 @@ (y-rotate float :offset-assert 704) (launch-pos vector :inline :offset-assert 720) (launch vector :inline :offset-assert 736) - (spin-jm basic :offset-assert 752) - (trail-part basic :offset-assert 756) - (trail-sound uint32 :offset-assert 760) - (flags uint64 :offset-assert 768) + (spin-jm joint-mod :offset-assert 752) + (trail-part sparticle-launch-control :offset-assert 756) + (trail-sound sound-id :offset-assert 760) + (flags eco-creature-flag :offset-assert 768) ) :method-count-assert 196 :size-assert #x308 :flag-assert #xc402900308 - (:methods - (prebot-large-eco-creature-method-194 () none) ;; 194 - (prebot-large-eco-creature-method-195 () none) ;; 195 - ) (:state-methods - unfold ;; 190 + knocked ;; 31 + notice ;; 35 + stare ;; 37 + hostile ;; 38 victory ;; 39 pacing ;; 156 circling ;; 157 - hostile ;; 38 + unfold ;; 190 fly-to-dest ;; 191 - notice ;; 35 attack ;; 192 - stare ;; 37 wait-for-children ;; 193 - knocked ;; 31 + ) + (:methods + (prebot-large-eco-creature-method-194 (_type_) none) ;; 194 + (prebot-large-eco-creature-method-195 (_type_) none) ;; 195 ) ) -|# -#| (deftype prebot-medium-eco-creature (prebot-large-eco-creature) ((is-top basic :offset-assert 776) (is-bottom basic :offset-assert 780) @@ -54244,76 +54843,63 @@ :method-count-assert 198 :size-assert #x318 :flag-assert #xc602a00318 - (:methods - (prebot-medium-eco-creature-method-196 () none) ;; 196 - (prebot-medium-eco-creature-method-197 () none) ;; 197 - ) (:state-methods knocked-recover ;; 32 ) + (:methods + (prebot-medium-eco-creature-method-196 (_type_) none) ;; 196 + (prebot-medium-eco-creature-method-197 (_type_) none) ;; 197 + ) ) -|# -#| (deftype prebot-small-eco-creature (prebot-medium-eco-creature) () :method-count-assert 198 :size-assert #x318 :flag-assert #xc602a00318 ) -|# -#| (deftype medium-eco-creature-launched (prebot-medium-eco-creature) () :method-count-assert 198 :size-assert #x318 :flag-assert #xc602a00318 ) -|# -#| (deftype small-eco-creature-launched (prebot-small-eco-creature) () :method-count-assert 198 :size-assert #x318 :flag-assert #xc602a00318 ) -|# -#| (deftype large-eco-creature (prebot-large-eco-creature) () :method-count-assert 196 :size-assert #x308 :flag-assert #xc402900308 ) -|# -#| (deftype medium-eco-creature (prebot-medium-eco-creature) () :method-count-assert 198 :size-assert #x318 :flag-assert #xc602a00318 ) -|# -#| (deftype small-eco-creature (prebot-small-eco-creature) () :method-count-assert 198 :size-assert #x318 :flag-assert #xc602a00318 ) -|# -;; (define-extern *prebot-large-eco-creature-nav-enemy-info* nav-enemy-info) -;; (define-extern large-eco-creature-split function) -;; (define-extern *prebot-medium-eco-creature-nav-enemy-info* nav-enemy-info) -;; (define-extern prebot-eco-creature-joint-callback function) -;; (define-extern adjust-split-joints function) -;; (define-extern *prebot-small-eco-creature-nav-enemy-info* nav-enemy-info) +(define-extern *prebot-large-eco-creature-nav-enemy-info* nav-enemy-info) +(define-extern large-eco-creature-split (function none :behavior prebot-large-eco-creature)) +(define-extern *prebot-medium-eco-creature-nav-enemy-info* nav-enemy-info) +(define-extern prebot-eco-creature-joint-callback (function cspace transformq none)) +(define-extern adjust-split-joints (function none :behavior prebot-medium-eco-creature)) +(define-extern *prebot-small-eco-creature-nav-enemy-info* nav-enemy-info) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; deswalk-part ;; @@ -54324,41 +54910,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 @@ -54367,23 +54950,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 @@ -54392,42 +54972,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) ) @@ -54435,60 +55037,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 ;; @@ -55010,7 +55605,6 @@ ;; for-turret-shot ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype for-turret-shot (projectile) ((tail-pos vector :inline :offset-assert 512) ) @@ -55018,10 +55612,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 ;; @@ -55029,9 +55622,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 @@ -55039,46 +55631,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 ;; @@ -55089,26 +55678,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) @@ -55117,41 +55703,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) ) @@ -55159,43 +55743,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 @@ -55204,81 +55784,73 @@ 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 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype race-turbo-pad (structure) ((position vector :inline :offset-assert 0) - (handle uint64 :offset-assert 16) ;; handle + (handle handle :offset-assert 16) ;; handle ) :method-count-assert 9 :size-assert #x18 :flag-assert #x900000018 ) -|# -#| (deftype race-decision-point (structure) ((pos float :offset-assert 0) (decision-type uint8 :offset-assert 4) @@ -55289,26 +55861,44 @@ :size-assert #x7 :flag-assert #x900000007 ) -|# -#| +;; +++race-h:racer-info-flag +(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 + (deftype race-racer-info (structure) ((rider uint8 :offset-assert 0) (vehicle uint8 :offset-assert 1) - (flags uint8 :offset-assert 2) ;; racer-info-flags + (flags racer-info-flag :offset-assert 2) ;; racer-info-flags (seek-offset int8 :offset-assert 3) ) :method-count-assert 9 :size-assert #x4 :flag-assert #x900000004 ) -|# -#| +;; +++race-h:race-info-flag +(defenum race-info-flag + :type uint8 + :bitfield #t + ) +;; ---race-h:race-info-flag + (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) @@ -55318,7 +55908,7 @@ (finish-sphere sphere :inline :offset-assert 64) (finish-dir vector :inline :offset-assert 80) (player-intro-pos vector :inline :offset-assert 96) - (flags uint8 :offset-assert 112) ;; race-info-flags + (flags racer-info-flag :offset-assert 112) ;; race-info-flags (score uint8 :offset-assert 113) (lap-count int8 :offset-assert 114) (racer-count int8 :offset-assert 115) @@ -55332,8 +55922,8 @@ (level symbol :offset-assert 132) ;; guessed by decompiler (borrow-level symbol :offset-assert 136) ;; guessed by decompiler (borrow pair :offset-assert 140) ;; guessed by decompiler - (manager uint64 :offset-assert 144) ;; handle - (manager-handle-init-hack basic :offset-assert 144) + (manager handle :offset-assert 144) ;; handle + (manager-handle-init-hack symbol :offset 144) (hatch-actor-name string :offset-assert 152) ;; guessed by decompiler (countdown-scene string :offset-assert 156) ;; guessed by decompiler (complete-continue string :offset-assert 160) ;; guessed by decompiler @@ -55345,16 +55935,31 @@ :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 ) ) -|# -#| +;; +++race-h:racer-state-flags +(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 uint64 :offset-assert 16) ;; handle - (flags uint8 :offset-assert 24) ;; racer-flags + (racer handle :offset-assert 16) ;; handle + (flags racer-state-flags :offset-assert 24) ;; racer-flags (rank int8 :offset-assert 25) (finish-count int8 :offset-assert 26) (lap-count int8 :offset-assert 27) @@ -55375,168 +55980,190 @@ :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 + (deftype race-state (structure) ((info race-info :offset-assert 0) ;; guessed by decompiler - (flags uint8 :offset-assert 4) ;; race-flags - (state uint8 :offset-assert 5) ;; race-state-enum + (flags race-flag :offset-assert 4) ;; race-flags + (state race-state-enum :offset-assert 5) ;; race-state-enum (racer-count int8 :offset-assert 6) (finished-count int8 :offset-assert 7) (i-player int8 :offset-assert 8) (i-countdown int8 :offset-assert 9) - (manager uint64 :offset-assert 16) ;; handle - (scene-player uint64 :offset-assert 24) ;; handle - (race-signal uint64 :offset-assert 32) ;; handle - (arrow uint64 :offset-assert 40) ;; handle - (hud-timer uint64 :offset-assert 48) ;; handle - (hud-lap-counter uint64 :offset-assert 56) ;; handle - (hud-turbo-counter uint64 :offset-assert 64) ;; handle - (hud-position uint64 :offset-assert 72) ;; handle + (manager handle :offset-assert 16) ;; handle + (scene-player handle :offset-assert 24) ;; handle + (race-signal handle :offset-assert 32) ;; handle + (arrow handle :offset-assert 40) ;; handle + (hud-timer handle :offset-assert 48) ;; handle + (hud-lap-counter handle :offset-assert 56) ;; handle + (hud-turbo-counter handle :offset-assert 64) ;; handle + (hud-position handle :offset-assert 72) ;; handle (current-time uint32 :offset-assert 80) (countdown-start-time uint32 :offset-assert 84) (race-start-time uint32 :offset-assert 88) (rankings int8 10 :offset-assert 92) ;; guessed by decompiler (target-pos float :offset-assert 104) (suck-factor float :offset-assert 108) - (player-win? basic :offset-assert 112) - (new-score? basic :offset-assert 116) - (racer-array racer-state 10 :offset-assert 128) ;; guessed by decompiler + (player-win? symbol :offset-assert 112) + (new-score? symbol :offset-assert 116) + (racer-array racer-state 10 :inline :offset-assert 128) ;; guessed by decompiler (player-intro-curve cubic-curve :inline :offset-assert 1248) ) :method-count-assert 21 :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 ) ) -|# -#| (deftype race-manager (process) ((race-state race-state :offset-assert 128) - (state-time uint64 :offset-assert 136) ;; time-frame - (player-on-track-time uint64 :offset-assert 144) ;; time-frame + (state-time time-frame :offset-assert 136) ;; time-frame + (player-on-track-time time-frame :offset-assert 144) ;; time-frame (message-id sound-id :offset-assert 152) ;; guessed by decompiler (finish-sound-id sound-id :offset-assert 156) ;; guessed by decompiler - (show-stats? basic :offset-assert 160) + (show-stats? symbol :offset-assert 160) ) :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 ) ) -|# -#| (deftype hud-race-timer (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype hud-race-lap-counter (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype hud-race-turbo-counter (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -#| (deftype hud-race-position (hud) () :method-count-assert 27 :size-assert #xac4 :flag-assert #x1b0a500ac4 ) -|# -;; (define-extern *race-manager* object) ;; (pointer race-manager) +(define-extern *race-manager* (pointer race-manager)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; race-mesh ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype race-mesh-hash-search (structure) ((best-dist float :offset-assert 0) (debug-cells-searched int32 :offset-assert 4) (debug-slices-searched int32 :offset-assert 8) (bounds bounding-box4w :inline :offset-assert 16) - (cell-quads vector 2 :offset-assert 48) ;; guessed by decompiler - (slice-quads vector 4 :offset-assert 80) ;; guessed by decompiler - (cell-bits vector16ub 2 :offset-assert 48) ;; guessed by decompiler - (slice-bits vector16ub 2 :offset-assert 80) ;; guessed by decompiler + (cell-quads vector 2 :inline :offset-assert 48) ;; guessed by decompiler + (slice-quads vector 4 :inline :offset-assert 80) ;; guessed by decompiler + (cell-bits vector16ub 2 :inline :offset 48) ;; guessed by decompiler + (slice-bits vector16ub 2 :inline :offset 80) ;; guessed by decompiler ) :method-count-assert 9 :size-assert #x90 :flag-assert #x900000090 ) -|# -#| (deftype race-mesh-slice-query (structure) ((slice-id int16 :offset-assert 0) (lap-dist float :offset-assert 4) (pt-on-slice vector :inline :offset-assert 16) - (slice-corners vector 4 :offset-assert 32) ;; guessed by decompiler + (slice-corners vector 4 :inline :offset-assert 32) ;; guessed by decompiler (search-sphere sphere :inline :offset-assert 96) ) :method-count-assert 9 :size-assert #x70 :flag-assert #x900000070 ) -|# -#| (deftype race-path-edge-info (structure) ((sample-t float :offset-assert 0) ) @@ -55544,25 +56171,21 @@ :size-assert #x4 :flag-assert #x900000004 ) -|# -#| (deftype race-path-sample (structure) - ((bytes uint8 32 :offset-assert 0) ;; guessed by decompiler - (pos vector :inline :offset-assert 0) - (quat quaternion :inline :offset-assert 16) - (stick-x int8 :offset-assert 12) - (stick-y int8 :offset-assert 13) - (throttle uint8 :offset-assert 14) - (flags uint8 :offset-assert 15) + ((bytes uint8 32 :offset-assert 0 :score -1) ;; guessed by decompiler + (pos vector :inline :offset 0) + (quat quaternion :inline :offset 16) + (stick-x int8 :offset 12) + (stick-y int8 :offset 13) + (throttle uint8 :offset 14) + (flags uint8 :offset 15) ) :method-count-assert 9 :size-assert #x20 :flag-assert #x900000020 ) -|# -#| (deftype race-path (structure) ((sample-count uint16 :offset-assert 0) (record-id int8 :offset-assert 2) @@ -55574,15 +56197,13 @@ :size-assert #xc :flag-assert #xd0000000c (:methods - (race-path-method-9 () none) ;; 9 ;; (draw-path-debug (_type_ rgba rgba) none) - (race-path-method-10 () none) ;; 10 ;; (race-path-method-10 (_type_ vector float float) none) - (race-path-method-11 () none) ;; 11 ;; (race-path-method-11 (_type_ race-path-sample vector float) none) - (race-path-method-12 () none) ;; 12 ;; (race-path-method-12 (_type_ vector float float) float) + (draw-path-debug (_type_ rgba rgba) none) ;; 9 + (race-path-method-10 (_type_ vector float float) none) ;; 10 + (race-path-method-11 (_type_ race-path-sample vector float) none) ;; 11 + (race-path-method-12 (_type_ vector float float) float) ;; 12 ) ) -|# -#| (deftype race-path-group (structure) ((name string :offset-assert 0) ;; guessed by decompiler (path-count int8 :offset-assert 4) @@ -55593,33 +56214,28 @@ :size-assert #xc :flag-assert #x90000000c ) -|# -#| (deftype race-mesh-edge (structure) ((left vector :inline :offset-assert 0) (right vector :inline :offset-assert 16) - (lap-dist float :offset-assert 12) + (lap-dist float :offset 12) ) :method-count-assert 9 :size-assert #x20 :flag-assert #x900000020 ) -|# -#| (deftype race-mesh-slice (structure) ((edge-index-array uint16 2 :offset-assert 0) ;; guessed by decompiler - (start-edge int16 :offset-assert 0) - (end-edge int16 :offset-assert 2) + (start-edge int16 :offset 0) + (end-edge int16 :offset 2) ) + :pack-me :method-count-assert 9 :size-assert #x4 :flag-assert #x900000004 ) -|# -#| (deftype race-mesh-hash-cell (structure) ((first-slice int16 :offset-assert 0) (slice-count uint8 :offset-assert 2) @@ -55629,9 +56245,7 @@ :size-assert #x4 :flag-assert #x900000004 ) -|# -#| (deftype race-mesh-hash (structure) ((cells-wide int8 :offset-assert 0) (cells-tall int8 :offset-assert 1) @@ -55644,13 +56258,20 @@ :size-assert #x20 :flag-assert #x900000020 ) -|# -#| +;; +++race-h:race-mesh-flag +(defenum race-mesh-flag + :type uint8 + :bitfield #t + (rmf0 0) + (rmf1 1) + ) +;; ---race-h:race-mesh-flag + (deftype race-mesh (basic) ((version uint8 :offset-assert 4) (path-group-count uint8 :offset-assert 5) - (flags uint8 :offset-assert 6) ;; race-mesh-flags + (flags race-mesh-flag :offset-assert 6) ;; race-mesh-flags (pad uint8 1 :offset-assert 7) ;; guessed by decompiler (slice-count int16 :offset-assert 8) (edge-count int16 :offset-assert 10) @@ -55663,27 +56284,24 @@ :size-assert #x1c :flag-assert #x140000001c (:methods - (race-mesh-method-9 () none) ;; 9 ;; (debug-draw-path (_type_ int int rgba rgba) none) - (race-mesh-method-10 () none) ;; 10 ;; (debug-draw-path-from-history (_type_ int int) symbol) - (race-mesh-method-11 () none) ;; 11 ;; (debug-draw-slice (_type_ int) none) - (race-mesh-method-12 () none) ;; 12 ;; (debug-draw-edges (_type_) none) - (race-mesh-method-13 () none) ;; 13 ;; (race-mesh-method-13 (_type_ race-mesh-slice-query) none) - (race-mesh-method-14 () none) ;; 14 ;; (race-mesh-method-14 (_type_ race-mesh-slice-query) none) - (race-mesh-method-15 () none) ;; 15 ;; (race-mesh-method-15 (_type_ int race-mesh-slice-query) none) - (race-mesh-method-16 () none) ;; 16 ;; (race-mesh-method-16 (_type_ race-mesh-slice-query) none) - (race-mesh-method-17 () none) ;; 17 ;; (race-mesh-method-17 (_type_ race-mesh-slice-query) symbol) - (race-mesh-method-18 () none) ;; 18 ;; (race-mesh-method-18 (_type_ race-mesh-hash-search int int race-mesh-slice-query) none) - (race-mesh-method-19 () none) ;; 19 ;; (race-mesh-method-19 (_type_ int race-mesh-slice-query) symbol) + (debug-draw-path (_type_ int int rgba rgba) none) ;; 9 + (debug-draw-path-from-history (_type_ int int) symbol) ;; 10 + (debug-draw-slice (_type_ int) none) ;; 11 + (debug-draw-edges (_type_) none) ;; 12 + (race-mesh-method-13 (_type_ race-mesh-slice-query) none) ;; 13 + (race-mesh-method-14 (_type_ race-mesh-slice-query) none) ;; 14 + (race-mesh-method-15 (_type_ int race-mesh-slice-query) none) ;; 15 + (race-mesh-method-16 (_type_ race-mesh-slice-query) none) ;; 16 + (race-mesh-method-17 (_type_ race-mesh-slice-query) symbol) ;; 17 + (race-mesh-method-18 (_type_ race-mesh-hash-search int int race-mesh-slice-query) none) ;; 18 + (race-mesh-method-19 (_type_ int race-mesh-slice-query) symbol) ;; 19 ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; race-control ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype race-control (structure) ((state race-state :offset-assert 0) (mesh race-mesh :offset-assert 4) ;; guessed by decompiler @@ -55700,35 +56318,51 @@ :size-assert #x60 :flag-assert #xd00000060 (:methods - (race-control-method-9 () none) ;; 9 ;; (race-control-method-9 (_type_ int vector) none) - (race-control-method-10 () none) ;; 10 ;; (race-control-method-10 (_type_ race-state racer-state) none) - (race-control-method-11 () none) ;; 11 ;; (race-control-method-11 (_type_ float) none) - (race-control-method-12 () none) ;; 12 ;; (race-control-method-12 (_type_ vector) none) + (race-control-method-9 (_type_ int vector) none) ;; 9 + (race-control-method-10 (_type_ race-state racer-state) none) ;; 10 + (race-control-method-11 (_type_ float) none) ;; 11 + (race-control-method-12 (_type_ vector) none) ;; 12 ) ) -|# ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; race-info ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *race-info-array* array) ;; (array race-info) +(define-extern *race-info-array* (array race-info)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 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 ;; @@ -55812,7 +56446,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 ;; @@ -55823,87 +56457,79 @@ ;; 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 ;; @@ -56360,154 +56986,142 @@ ;; 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 ;; @@ -56739,9 +57353,8 @@ ;; was-squad-control ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype was-squad-control (squad-control) - ((manager uint64 :offset-assert 816) + ((manager handle :offset-assert 816) (target-count int8 :offset-assert 824) (process-count int8 :offset-assert 825) (active-count int8 :offset-assert 826) @@ -56754,62 +57367,73 @@ (inaccuracy-factor float :offset-assert 852) (attack-delay-factor float :offset-assert 856) (target-speed float :offset-assert 860) - (nav-mesh basic :offset-assert 864) - (units UNKNOWN 10 :offset-assert 872) + (nav-mesh nav-mesh :offset-assert 864) + (units handle 10 :offset-assert 872) ) :method-count-assert 37 :size-assert #x3b8 :flag-assert #x25000003b8 (:methods - (was-squad-control-method-34 () none) ;; 34 - (was-squad-control-method-35 () none) ;; 35 - (was-squad-control-method-36 () none) ;; 36 + (spawn-unit (_type_ vector quaternion) none) ;; 34 + (spawn-unit-offscreen (_type_) none) ;; 35 + (add-unit (_type_ process-focusable) none) ;; 36 ) ) -|# -#| (deftype was-squad-manager (process) - ((squad basic :offset-assert 128) + ((squad squad-control :offset-assert 128) ) :method-count-assert 17 :size-assert #x84 :flag-assert #x1100100084 - (:methods - (was-squad-manager-method-15 () none) ;; 15 - (was-squad-manager-method-16 () none) ;; 16 - ) (:state-methods idle ;; 14 ) + (:methods + (was-squad-manager-method-15 (_type_) none) ;; 15 + (was-squad-manager-method-16 (_type_) none) ;; 16 + ) ) -|# -;; (define-extern *was-squad-control* was-squad-control) -;; (define-extern *was-squad-manager* object) -;; (define-extern was-squad-manager-event-handler function) -;; (define-extern was-squad-manager-init-by-other function) -;; (define-extern was-squad-manager-start function) -;; (define-extern was-squad-manager-kill function) -;; (define-extern wvh function) +(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 *was-squad-control* was-squad-control) +(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 process none)) +(define-extern was-squad-manager-kill (function none)) +(define-extern wvh (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wvehicle-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype wvehicle-sound-loop-state (structure) - ((id uint32 :offset-assert 0) + ((id sound-id :offset-assert 0) (vol float :offset-assert 4) (pitch float :offset-assert 8) ) + :allow-misaligned :method-count-assert 9 :size-assert #xc :flag-assert #x90000000c ) -|# -#| +;; +++wvehicle-h:vehicle-wheel-surface-flag +(defenum vehicle-wheel-surface-flag + :type uint8 + :bitfield #t + (moving) + ) +;; ---wvehicle-h:vehicle-wheel-surface-flag + (deftype vehicle-wheel-surface (structure) ((flags vehicle-wheel-surface-flag :offset-assert 0) (surface-type uint8 :offset-assert 1) @@ -56817,28 +57441,26 @@ (drag float :offset-assert 8) (depth float :offset-assert 12) (damage float :offset-assert 16) - (tire-roll-mix UNKNOWN 4 :offset-assert 20) - (tire-roll-hum float :offset-assert 20) - (tire-roll-dirt float :offset-assert 24) - (tire-roll-sand float :offset-assert 28) - (tire-roll-knobby float :offset-assert 32) - (tire-slide-mix UNKNOWN 2 :offset-assert 36) - (tire-slide-road float :offset-assert 36) - (tire-slide-dirt float :offset-assert 40) + (tire-roll-mix float 4 :offset-assert 20) + (tire-roll-hum float :offset 20) + (tire-roll-dirt float :offset 24) + (tire-roll-sand float :offset 28) + (tire-roll-knobby float :offset 32) + (tire-slide-mix float 2 :offset-assert 36) + (tire-slide-road float :offset 36) + (tire-slide-dirt float :offset 40) ) :method-count-assert 9 :size-assert #x2c :flag-assert #x90000002c ;; field vehicle-wheel-surface-flag is likely a value type. ) -|# -#| (deftype vehicle-wheel-state (structure) ((info vehicle-wheel-info :offset-assert 0) (flags uint8 :offset-assert 4) (prev-flags uint8 :offset-assert 5) - (handle uint64 :offset-assert 8) + (handle handle :offset-assert 8) (probe-local-pos vector :inline :offset-assert 16) (probe-local-dir vector :inline :offset-assert 32) (local-axis vector :inline :offset-assert 48) @@ -56847,7 +57469,7 @@ (ground-normal vector :inline :offset-assert 96) (trans vector :inline :offset-assert 112) (quat quaternion :inline :offset-assert 128) - (trail-pos UNKNOWN 2 :offset-assert 144) + (trail-pos vector 2 :inline :offset-assert 144) (surface vehicle-wheel-surface :offset-assert 176) (pos float :offset-assert 180) (pos2 float :offset-assert 184) @@ -56868,17 +57490,15 @@ (sink-depth float :offset-assert 244) (sin-susp-ang float :offset-assert 248) (cos-susp-ang float :offset-assert 252) - (part-birth-accum UNKNOWN 4 :offset-assert 256) + (part-birth-accum sparticle-launch-control 4 :offset-assert 256) (tread-time uint32 :offset-assert 272) - (tread-tracker uint64 :offset-assert 280) + (tread-tracker handle :offset-assert 280) ) :method-count-assert 9 :size-assert #x120 :flag-assert #x900000120 ) -|# -#| (deftype wvehicle-probe-work (structure) ((local-pos vector :inline :offset-assert 0) (local-normal vector :inline :offset-assert 16) @@ -56894,9 +57514,7 @@ :size-assert #x84 :flag-assert #x900000084 ) -|# -#| (deftype wvehicle-physics-work (structure) ((mat matrix :inline :offset-assert 0) (force vector :inline :offset-assert 64) @@ -56934,16 +57552,18 @@ (surface-type uint8 :offset-assert 396) (surface-depth float :offset-assert 400) (material uint64 :offset-assert 408) - (probe-work-array UNKNOWN 4 :offset-assert 416) + (probe-work-array wvehicle-probe-work 4 :inline :offset-assert 416) (cquery collide-query :inline :offset-assert 992) ) :method-count-assert 9 :size-assert #x5fc :flag-assert #x9000005fc ) -|# -#| +(declare-type vehicle-wheel-init-params structure) +(declare-type wvehicle-wheel-launcher-spec structure) +(declare-type wvehicle-part-work structure) + (deftype wvehicle (vehicle) ((race race-control :inline :offset-assert 704) (target-status squad-target-status :inline :offset-assert 800) @@ -56986,7 +57606,7 @@ (next-gear-select int8 :offset-assert 1017) (shift-time uint32 :offset-assert 1020) (impact rigid-body-impact :inline :offset-assert 1024) - (wheel UNKNOWN 4 :offset-assert 1088) + (wheel vehicle-wheel-state 4 :inline :offset-assert 1088) (gravity-dir vector :inline :offset-assert 2240) (ai-target-point vector :inline :offset-assert 2256) (surface-velocity vector :inline :offset-assert 2272) @@ -57003,14 +57623,14 @@ (gun-pitch-vel float :offset-assert 2364) (gun-kick float :offset-assert 2368) (lock-turret basic :offset-assert 2372) - (tire-roll-loop-state UNKNOWN 4 :offset-assert 2376) - (tire-slide-loop-state UNKNOWN 2 :offset-assert 2440) - (engine1-sound-id uint32 :offset-assert 2472) - (engine2-sound-id uint32 :offset-assert 2476) - (engine3-sound-id uint32 :offset-assert 2480) - (damage-sound-id uint32 :offset-assert 2484) - (water-sound-id uint32 :offset-assert 2488) - (turbo-sound-id uint32 :offset-assert 2492) + (tire-roll-loop-state wvehicle-sound-loop-state 4 :inline :offset-assert 2376) + (tire-slide-loop-state wvehicle-sound-loop-state 2 :inline :offset-assert 2440) + (engine1-sound-id sound-id :offset 2472) + (engine2-sound-id sound-id :offset-assert 2476) + (engine3-sound-id sound-id :offset-assert 2480) + (damage-sound-id sound-id :offset-assert 2484) + (water-sound-id sound-id :offset-assert 2488) + (turbo-sound-id sound-id :offset-assert 2492) (shortcut-time uint32 :offset-assert 2496) (overturned-time uint32 :offset-assert 2500) (splash-time uint32 :offset-assert 2504) @@ -57021,7 +57641,7 @@ (jump-time uint32 :offset-assert 2524) (ground-time uint32 :offset-assert 2528) (ram-time uint32 :offset-assert 2532) - (attached-array UNKNOWN 16 :offset-assert 2536) + (attached-array handle 16 :offset-assert 2536) (eng1-vol float :offset-assert 2664) (eng2-vol float :offset-assert 2668) (eng3-vol float :offset-assert 2672) @@ -57032,151 +57652,149 @@ (eng-pitch-offset float :offset-assert 2692) (eng-flutter-envelope float :offset-assert 2696) (water-sound-envelope float :offset-assert 2700) - (other-proc uint64 :offset-assert 2704) + (other-proc handle :offset-assert 2704) (other-pos vector :inline :offset-assert 2720) ) + :allow-misaligned :method-count-assert 203 :size-assert #xab0 :flag-assert #xcb0a300ab0 - (:methods - (wvehicle-method-152 () none) ;; 152 - (wvehicle-method-153 () none) ;; 153 - (wvehicle-method-154 () none) ;; 154 - (wvehicle-method-155 () none) ;; 155 - (wvehicle-method-156 () none) ;; 156 - (wvehicle-method-157 () none) ;; 157 - (wvehicle-method-158 () none) ;; 158 - (wvehicle-method-159 () none) ;; 159 - (wvehicle-method-160 () none) ;; 160 - (wvehicle-method-161 () none) ;; 161 - (wvehicle-method-162 () none) ;; 162 - (wvehicle-method-163 () none) ;; 163 - (wvehicle-method-164 () none) ;; 164 - (wvehicle-method-165 () none) ;; 165 - (wvehicle-method-166 () none) ;; 166 - (wvehicle-method-167 () none) ;; 167 - (wvehicle-method-168 () none) ;; 168 - (wvehicle-method-169 () none) ;; 169 - (wvehicle-method-170 () none) ;; 170 - (wvehicle-method-171 () none) ;; 171 - (wvehicle-method-172 () none) ;; 172 - (wvehicle-method-173 () none) ;; 173 - (wvehicle-method-174 () none) ;; 174 - (wvehicle-method-175 () none) ;; 175 - (wvehicle-method-176 () none) ;; 176 - (wvehicle-method-177 () none) ;; 177 - (wvehicle-method-178 () none) ;; 178 - (wvehicle-method-179 () none) ;; 179 - (wvehicle-method-180 () none) ;; 180 - (wvehicle-method-181 () none) ;; 181 - (wvehicle-method-182 () none) ;; 182 - (wvehicle-method-183 () none) ;; 183 - (wvehicle-method-184 () none) ;; 184 - (wvehicle-method-185 () none) ;; 185 - (wvehicle-method-186 () none) ;; 186 - (wvehicle-method-187 () none) ;; 187 - (wvehicle-method-188 () none) ;; 188 - (wvehicle-method-189 () none) ;; 189 - (wvehicle-method-190 () none) ;; 190 - (wvehicle-method-191 () none) ;; 191 - (wvehicle-method-192 () none) ;; 192 - (wvehicle-method-193 () none) ;; 193 - (wvehicle-method-194 () none) ;; 194 - (wvehicle-method-195 () none) ;; 195 - (wvehicle-method-196 () none) ;; 196 - (wvehicle-method-197 () none) ;; 197 - (wvehicle-method-198 () none) ;; 198 - (wvehicle-method-199 () none) ;; 199 - (wvehicle-method-200 () none) ;; 200 - (wvehicle-method-201 () none) ;; 201 - (wvehicle-method-202 () none) ;; 202 + (:state-methods + hostile ;; 152 + undefined0 ;; 153, not defined + race-waiting ;; 154 + race-racing ;; 155 + race-finished ;; 156 + undefined1 ;; 157, not defined + explode-into-nothing ;; 158 + sink ;; 159 + ) + (:methods + (wvehicle-method-160 (_type_ wvehicle-physics-work) none) ;; 160 + (spawn-wheels! (_type_ skeleton-group skeleton-group skeleton-group skeleton-group) none) ;; 161 + (wvehicle-method-162 (_type_ float) none) ;; 162 + (wvehicle-method-163 (_type_) none) ;; 163 + (wvehicle-method-164 (_type_ vehicle-wheel-state vehicle-wheel-info) none) ;; 164 + (wvehicle-method-165 (_type_) none) ;; 165 + (wvehicle-method-166 (_type_ float float) float) ;; 166 + (wvehicle-method-167 (_type_) none) ;; 167 + (wvehicle-method-168 (_type_) none) ;; 168 + (wvehicle-method-169 (_type_) none) ;; 169 + (wvehicle-method-170 (_type_) none) ;; 170 + (wvehicle-method-171 (_type_ vector int) none) ;; 171 + (wvehicle-method-172 (_type_ quaternion int) none) ;; 172 + (wvehicle-method-173 (_type_ vector) int) ;; 173 + (get-attached-by-idx (_type_ int) process-focusable) ;; 174 + (add-attached-at-idx (_type_ int process-focusable) none) ;; 175 + (remove-attached-from-arr (_type_ process-focusable) symbol) ;; 176 + (wvehicle-method-177 (_type_ vehicle-controls) none) ;; 177 + (wvehicle-method-178 (_type_) none) ;; 178 + (wvehicle-method-179 (_type_) none) ;; 179 + (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_ vehicle-controls) none) ;; 183 + (wvehicle-method-184 (_type_) none) ;; 184 + (wvehicle-method-185 (_type_) none) ;; 185 + (wvehicle-method-186 (_type_) none) ;; 186 + (wvehicle-method-187 (_type_) none) ;; 187 + (wvehicle-method-188 (_type_) none) ;; 188 + (wvehicle-method-189 (_type_ vehicle-wheel-state wvehicle-part-work wvehicle-wheel-launcher-spec) none) ;; 189 + (wvehicle-method-190 (_type_ vehicle-wheel-state wvehicle-part-work) none) ;; 190 + (wvehicle-method-191 (_type_ vehicle-wheel-state wvehicle-part-work) symbol) ;; 191 + (wvehicle-method-192 (_type_ vehicle-wheel-state wvehicle-part-work) none) ;; 192 + (wvehicle-method-193 (_type_ vehicle-wheel-state wvehicle-part-work) none) ;; 193 + (wvehicle-method-194 (_type_ vehicle-wheel-state wvehicle-part-work) none) ;; 194 + (wvehicle-method-195 (_type_) none) ;; 195 + (wvehicle-method-196 (_type_) none) ;; 196 + (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_ float) none) ;; 201 + (wvehicle-method-202 (_type_ float) none) ;; 202 ) ) -|# -#| (deftype wvehicle-ai-drop-off-params (structure) ((dest vector :inline :offset-assert 0) - (proc basic :offset-assert 16) + (proc process :offset-assert 16) ) :method-count-assert 9 :size-assert #x14 :flag-assert #x900000014 ) -|# -;; (define-extern rpm->radians-per-sec function) -;; (define-extern radians-per-sec->rpm function) -;; (define-extern wvehicle-surface-type-from-material function) +(define-extern rpm->radians-per-sec (function float degrees)) +(define-extern radians-per-sec->rpm (function degrees float)) +(define-extern wvehicle-surface-type-from-material (function int int)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wvehicle-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern sparticle-motion-blur-dirt function) -;; (define-extern spt-birth-func-brightness-buggy-rocks function) -;; (define-extern spt-birth-func-part-buggy-rocks function) -;; (define-extern spt-birth-func-part-dbuggy-debris function) -;; (define-extern *range-wv-wsplash-color* curve-color-fast) -;; (define-extern *range-wv-wsplash-alpha* curve2d-fast) -;; (define-extern *range-wv-wsplash-scale-x* curve2d-fast) -;; (define-extern *range-wv-wsplash-scale-y* curve2d-fast) -;; (define-extern *curve-wv-wsplash-alpha* curve2d-fast) -;; (define-extern *curve-wv-wsplash-scale-x* curve2d-fast) -;; (define-extern *curve-wv-wsplash-scale-y* curve2d-fast) -;; (define-extern *part-wv-water-splash-curve-settings* object) -;; (define-extern *range-wv-splash-color* curve-color-fast) -;; (define-extern *range-wv-splash-alpha* curve2d-fast) -;; (define-extern *range-wv-splash-scale-x* curve2d-fast) -;; (define-extern *range-wv-splash-scale-y* curve2d-fast) -;; (define-extern *curve-wv-splash-alpha* curve2d-fast) -;; (define-extern *curve-wv-splash-scale-x* curve2d-fast) -;; (define-extern *curve-wv-splash-scale-y* curve2d-fast) -;; (define-extern *part-wv-water-splash-center-curve-settings* object) -;; (define-extern check-scorp-shell-level1 function) -;; (define-extern check-scorp-shell-level2 function) -;; (define-extern *curve-toad-linear-up-red* object) -;; (define-extern *trail-color-curve-toad-grenade* curve-color-fast) -;; (define-extern *curve-grenade-linear-toad-trail* curve2d-fast) -;; (define-extern *toad-grenade-trail* object) +(define-extern sparticle-motion-blur-dirt (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern spt-birth-func-brightness-buggy-rocks (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-part-buggy-rocks (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-dbuggy-debris (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern *range-wv-wsplash-color* curve-color-fast) +(define-extern *range-wv-wsplash-alpha* curve2d-fast) +(define-extern *range-wv-wsplash-scale-x* curve2d-fast) +(define-extern *range-wv-wsplash-scale-y* curve2d-fast) +(define-extern *curve-wv-wsplash-alpha* curve2d-fast) +(define-extern *curve-wv-wsplash-scale-x* curve2d-fast) +(define-extern *curve-wv-wsplash-scale-y* curve2d-fast) +(define-extern *part-wv-water-splash-curve-settings* particle-curve-settings) +(define-extern *range-wv-splash-color* curve-color-fast) +(define-extern *range-wv-splash-alpha* curve2d-fast) +(define-extern *range-wv-splash-scale-x* curve2d-fast) +(define-extern *range-wv-splash-scale-y* curve2d-fast) +(define-extern *curve-wv-splash-alpha* curve2d-fast) +(define-extern *curve-wv-splash-scale-x* curve2d-fast) +(define-extern *curve-wv-splash-scale-y* curve2d-fast) +(define-extern *part-wv-water-splash-center-curve-settings* particle-curve-settings) +(define-extern check-scorp-shell-level1 (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern check-scorp-shell-level2 (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern *curve-toad-linear-up-red* curve2d-piecewise) +(define-extern *trail-color-curve-toad-grenade* curve-color-fast) +(define-extern *curve-grenade-linear-toad-trail* curve2d-fast) +(define-extern *toad-grenade-trail* light-trail-composition) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wvehicle-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype turbo-pickup (process-drawable) - ((available symbol :offset-assert 200) ;; guessed by decompiler - (persistent basic :offset-assert 204) - (birth-time uint64 :offset-assert 208) - (collector uint64 :offset-assert 216) + ((root collide-shape :override) + (available symbol :offset-assert 200) ;; guessed by decompiler + (persistent symbol :offset-assert 204) + (birth-time time-frame :offset-assert 208) + (collector handle :offset-assert 216) ) :method-count-assert 23 :size-assert #xe0 :flag-assert #x17006000e0 - (:methods - (turbo-pickup-method-22 () none) ;; 22 ;; (find-ground (_type_) symbol) - ) (:state-methods - die ;; 21, old: (die () _type_ :state) - idle ;; 20, old: (idle () _type_ :state) + idle ;; 20 + die ;; 21 + ) + (:methods + (find-ground (_type_) symbol) ;; 22 ) ) -|# -;; (define-extern turbo-pickup-init-by-other function) ;; (function vector none :behavior turbo-pickup) -;; (define-extern race-turbo-pickup-spawn function) -;; (define-extern turbo-pickup-spawn function) ;; (function process vector turbo-pickup :behavior turbo-pickup) +(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 vector turbo-pickup :behavior turbo-pickup)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wvehicle-wheel ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype vehicle-wheel-init-params (structure) - ((skel basic :offset-assert 0) - (skel-blur basic :offset-assert 4) - (level basic :offset-assert 8) + ((skel skeleton-group :offset-assert 0) + (skel-blur skeleton-group :offset-assert 4) + (level symbol :offset-assert 8) (radius float :offset-assert 12) (collision-mesh-index int8 :offset-assert 16) (position vector :inline :offset-assert 32) @@ -57187,11 +57805,9 @@ :size-assert #x50 :flag-assert #x900000050 ) -|# -#| (deftype vehicle-wheel (rigid-body-object) - ((collision-enable? basic :offset-assert 288) + ((collision-enable? symbol :offset-assert 288) (normal-look lod-set :inline :offset-assert 292) (blur-look lod-set :inline :offset-assert 344) ) @@ -57199,27 +57815,28 @@ :size-assert #x189 :flag-assert #x3b01100189 (:state-methods - die ;; 58 - fade-out ;; 57 - explode ;; 56 idle ;; 28 + explode ;; 56 + fade-out ;; 57 + die ;; 58 + ) + (:methods + (init-collision! (_type_ vehicle-wheel-init-params) none :replace) ) ) -|# -;; (define-extern *vehicle-wheel-constants* object) -;; (define-extern vehicle-wheel-init-by-other function) -;; (define-extern vehicle-wheel-spawn function) +(define-extern *vehicle-wheel-constants* rigid-body-object-constants) +(define-extern vehicle-wheel-init-by-other (function vehicle-wheel-init-params object :behavior vehicle-wheel)) +(define-extern vehicle-wheel-spawn (function process vehicle-wheel-init-params vehicle-wheel)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wvehicle-effects ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype wvehicle-wheel-launcher-spec (structure) ((mat matrix :offset-assert 0) - (particle-system basic :offset-assert 4) - (launcher basic :offset-assert 8) + (particle-system sparticle-system :offset-assert 4) + (launcher sparticle-launcher :offset-assert 8) (num-spec sp-field-init-spec :offset-assert 12) (r-spec sp-field-init-spec :offset-assert 16) (g-spec sp-field-init-spec :offset-assert 20) @@ -57228,16 +57845,78 @@ (scale-x-spec sp-field-init-spec :offset-assert 32) (scale-y-spec sp-field-init-spec :offset-assert 36) (fade-a-spec sp-field-init-spec :offset-assert 40) - (ptr-birth-accum uint32 :offset-assert 44) + (ptr-birth-accum (pointer sparticle-launch-control) :offset-assert 44) (i-birth-accum int8 :offset-assert 48) ) + :pack-me :method-count-assert 9 :size-assert #x31 :flag-assert #x900000031 ) -|# -#| +;; added +(deftype wvehicle-draw-thruster-params (structure) + ((quat quaternion :inline :offset-assert 0) + (trans vector :inline :offset-assert 16) + (mat matrix :inline :offset 48) + (thrust float :offset 32) + (width float :offset 36) + (length float :offset 40) + (fog-fade float :offset 44) + ) + ) + +(deftype wvehicle-stack-type0 (structure) + ((float-arr float 4 :offset 0) + (vec00 vector :inline :offset 96) + (float03326 float :offset 16) + (float0335 float :offset 20) + (float032 float :offset 24) + (float03623423 float :offset 28) + (word00 uint32 :offset 28 :score 1) + (float00 float :offset 80) + (float01 float :offset 96) + (float000 float :offset 116) + (float8 float :offset 120) + (float02 float :offset 124) + (float03 float :offset 128) + (float04 float :offset 132) + (float05 float :offset 136) + (float06 float :offset 140) + (float07 float :offset 144) + ) + ) + +;; added +(deftype wvehicle-stack-type5 (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) + ) + ) + +(deftype wvehicle-stack-type6 (structure) + ((mat0 matrix :inline :offset 0) + (quat0 quaternion :inline :offset 64) + (quat1 quaternion :inline :offset 80) + (quat2 quaternion :inline :offset 96) + (quat3 quaternion :inline :offset 112) + (quat4 quaternion :inline :offset 128) + (vec0 vector :inline :offset 144) + (vec1 vector :inline :offset 160) + (vec2 vector :inline :offset 176) + (vec3 vector :inline :offset 192) + (float0 float :offset 240) + ) + ) + (deftype wvehicle-part-work (structure) ((local-mat matrix :inline :offset-assert 0) (world-mat matrix :inline :offset-assert 64) @@ -57278,33 +57957,27 @@ :size-assert #x25c :flag-assert #x90000025c ) -|# -#| (deftype tire-trail-crumb (light-trail-breadcrumb) ((offset vector :inline :offset-assert 16) - (uu float :offset-assert 28) + (uu float :offset 28) ) :method-count-assert 9 :size-assert #x20 :flag-assert #x900000020 ) -|# -#| (deftype tire-trail (light-trail) () :method-count-assert 24 :size-assert #x80 :flag-assert #x1800000080 (:methods - (tire-trail-method-22 () none) ;; 22 - (tire-trail-method-23 () none) ;; 23 + (tire-trail-method-22 (_type_) none) ;; 22 + (tire-trail-method-23 (_type_) none) ;; 23 ) ) -|# -#| (deftype tire-trail-tracker (light-trail-tracker) () :method-count-assert 21 @@ -57314,9 +57987,7 @@ tracking ;; 14 ) ) -|# -#| (deftype wvehicle-sound-loop-params (structure) ((speed float :offset-assert 0) (weight float :offset-assert 4) @@ -57325,22 +57996,30 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype wvehicle-sound-work (structure) - ((roll-basis-params UNKNOWN 4 :offset-assert 0) - (slide-basis-params UNKNOWN 2 :offset-assert 64) + ((roll-basis-params wvehicle-sound-loop-params 4 :inline :offset-assert 0) + (slide-basis-params wvehicle-sound-loop-params 2 :inline :offset-assert 64) ) :method-count-assert 9 :size-assert #x60 :flag-assert #x900000060 ) -|# -;; (define-extern *wheel-trail-info* object) -;; (define-extern tire-trail-tracker-init-by-other function) -;; (define-extern spawn-tire-trail-tracker function) +(deftype wvehicle-stack-type7 (structure) + ((work wvehicle-sound-work :inline :offset 0) + (vec0 vector :inline :offset 96) + (float3 float :offset 116) + (float2 float :offset 120) + (float0 float :offset 124) + (vec1 vector :inline :offset 128) + (float1 float :offset 144) + ) + ) + +(define-extern *wheel-trail-info* light-trail-composition) +(define-extern tire-trail-tracker-init-by-other (function light-trail-tracker-spawn-params object :behavior tire-trail-tracker)) +(define-extern spawn-tire-trail-tracker (function process light-trail-tracker-spawn-params tire-trail-tracker)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wvehicle ;; @@ -57351,25 +58030,70 @@ ;; wvehicle-util ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype kill-player-process (process) - ((player uint64 :offset-assert 128) - (mode basic :offset-assert 136) + ((player handle :offset-assert 128) + (mode symbol :offset-assert 136) ) :method-count-assert 16 :size-assert #x8c :flag-assert #x100010008c (:state-methods - die ;; 15 idle ;; 14 + die ;; 15 ) ) -|# -;; (define-extern have-earned-vehicle-v-type? function) +;; added +(deftype wvehicle-stack-type1 (structure) + ((vec00 vector :inline :offset 0) + (float00 float :offset 16) + (float01 float :offset 20) + (byte00 int8 :offset 24) + ) + ) + +(deftype wvehicle-stack-type2 (structure) + ((cquery collide-query :inline :offset 0) + (mat0 matrix :inline :offset 544) + (vec0 vector :inline :offset 592) + (vec1 vector :inline :offset 624) + (vec2 vector :inline :offset 640) + (vec3 vector :inline :offset 656) + (float0 float :offset 672) + ) + ) + +(deftype wvehicle-stack-type3 (structure) + ((vec0 vector :inline :offset 0) + (mat0 matrix :inline :offset 16) + (float0 float :offset 80) + ) + ) + +(deftype wvehicle-stack-type4 (structure) + ((byte0 int8 :offset 0) + (float0 float :offset 4) + (float1 float :offset 8) + (float2 float :offset 12) + ) + ) + +;; added +(deftype wvehicle-jmod-work (structure) + ((quat0 quaternion :inline :offset 0) + (quat1 quaternion :inline :offset 16) + (mat0 matrix :inline :offset 32) + (vec0 vector :inline :offset 96) + (float0 float :offset 112) + (float1 float :offset 116) + (float2 float :offset 120) + ) + ) + +(define-extern have-earned-vehicle-v-type? (function int symbol)) (define-extern have-vehicle-v-type? (function int symbol)) -;; (define-extern kill-player-process-init-by-other function) -;; (define-extern kill-player-process-spawn function) +(define-extern kill-player-process-init-by-other (function process symbol object :behavior kill-player-process)) +(define-extern kill-player-process-spawn (function process process symbol kill-player-process)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wvehicle-ai ;; @@ -57380,6 +58104,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 ;; @@ -57390,31 +58143,28 @@ ;; wvehicle-physics ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *wvehicle-surfaces* object) +(define-extern *wvehicle-surfaces* (inline-array vehicle-wheel-surface)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wvehicle-hud ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype hud-vehicle-turbo (hud) - ((tex-rim basic :offset-assert 2756) - (tex-on basic :offset-assert 2760) - (tex-off basic :offset-assert 2764) + ((tex-rim texture :offset-assert 2756) + (tex-on texture :offset-assert 2760) + (tex-off texture :offset-assert 2764) ) :method-count-assert 27 :size-assert #xad0 :flag-assert #x1b0a500ad0 ) -|# -;; (define-extern hud-vehicle-turbo-spawn function) +(define-extern hud-vehicle-turbo-spawn (function process hud-vehicle-turbo)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wcar-projectiles ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype v-scorp-shot (projectile) ((init-pos vector :inline :offset-assert 512) (init-dir vector :inline :offset-assert 528) @@ -57424,106 +58174,112 @@ :size-assert #x230 :flag-assert #x2901b00230 ) -|# -#| (deftype v-snake-shot (v-scorp-shot) () :method-count-assert 41 :size-assert #x230 :flag-assert #x2901b00230 ) -|# -#| (deftype v-rhino-shot (guard-shot) () :method-count-assert 41 :size-assert #x220 :flag-assert #x2901a00220 ) -|# -#| (deftype v-toad-shot (projectile) - ((trail-tracker uint64 :offset-assert 512) + ((trail-tracker handle :offset-assert 512) (blast-radius float :offset-assert 520) ) :method-count-assert 42 :size-assert #x20c :flag-assert #x2a0190020c - (:methods - (v-toad-shot-method-41 () none) ;; 41 - ) (:state-methods impact ;; 22 ) + (:methods + (set-y-vel (_type_) none) ;; 41 + ) ) -|# -#| (deftype v-marauder-shot (guard-shot) () :method-count-assert 41 :size-assert #x220 :flag-assert #x2901a00220 ) -|# -;; (define-extern v-scorp-shot-move function) -;; (define-extern cshape-reaction-scorp-shot function) +(define-extern v-scorp-shot-move (function v-scorp-shot none)) +(define-extern cshape-reaction-scorp-shot (function control-info collide-query vector vector collide-status)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wcar ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype wcar-base (wvehicle) - ((rider-hand-joint-array UNKNOWN 2 :offset-assert 2736) + ((rider-hand-joint-array int8 2 :offset-assert 2736) ) :method-count-assert 203 :size-assert #xab2 :flag-assert #xcb0a400ab2 ) -|# -#| (deftype wcar-snake-base (wcar-base) - ((local-gun-pos UNKNOWN 2 :offset-assert 2752) - (jmod-axles UNKNOWN 4 :offset-assert 2784) - (jmod-shock-tops UNKNOWN 4 :offset-assert 2912) - (jmod-shock-mids UNKNOWN 4 :offset-assert 3040) - (jmod-guns UNKNOWN 2 :offset-assert 3296) + ((local-gun-pos vector 2 :inline :offset-assert 2752) + (jmod-axles joint-mod-rotate-local 4 :inline :offset-assert 2784) + (jmod-shock-tops joint-mod-rotate-local 4 :inline :offset-assert 2912) + (jmod-shock-mids joint-mod-set-local 4 :inline :offset-assert 3040) + (jmod-guns joint-mod-set-local 2 :inline :offset-assert 3296) ) :method-count-assert 203 :size-assert #xd60 :flag-assert #xcb0ce00d60 ) -|# -;; (define-extern *v-turtle-constants* object) -;; (define-extern *v-snake-constants* object) -;; (define-extern *v-scorpion-constants* object) -;; (define-extern *v-toad-constants* object) -;; (define-extern *v-fox-constants* object) -;; (define-extern *v-rhino-constants* object) -;; (define-extern *v-mirage-constants* object) -;; (define-extern *v-x-ride-constants* object) -;; (define-extern *v-marauder-constants* object) -;; (define-extern *v-faccar-constants* object) -;; (define-extern *v-catapult-constants* object) -;; (define-extern *wcar-explosion-info* vehicle-explosion-info) +;; added +(deftype wcar-proj-init-by-other-params (structure) + ((params projectile-init-by-other-params :inline :offset 0) + (vec1 vector :inline :offset 32) + (mat0 matrix :inline :offset 128) + (mat1 matrix :inline :offset 192) + (vec0 vector 8 :inline :offset 256) + (barrel-idx int8 :offset 384) + ) + ) + +(deftype wcar-stack-type1 (structure) + ((vec0 vector 10 :inline :offset 0) + (vec1 vector 3 :inline :offset 176) + (float01 float :offset 252) + (float0 float :offset 256) + (float2 float :offset 260) + ) + ) + +(define-extern *v-turtle-constants* rigid-body-vehicle-constants) +(define-extern *v-snake-constants* rigid-body-vehicle-constants) +(define-extern *v-scorpion-constants* rigid-body-vehicle-constants) +(define-extern *v-toad-constants* rigid-body-vehicle-constants) +(define-extern *v-fox-constants* rigid-body-vehicle-constants) +(define-extern *v-rhino-constants* rigid-body-vehicle-constants) +(define-extern *v-mirage-constants* rigid-body-vehicle-constants) +(define-extern *v-x-ride-constants* rigid-body-vehicle-constants) +(define-extern *v-marauder-constants* rigid-body-vehicle-constants) +(define-extern *v-faccar-constants* rigid-body-vehicle-constants) +(define-extern *v-catapult-constants* rigid-body-vehicle-constants) +(define-extern *wcar-explosion-info* vehicle-explosion-info) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wcar-turtle ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype v-turtle (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) (ant-tip-vel vector :inline :offset-assert 3392) (spring-pos vector :inline :offset-assert 3408) (spring-vel vector :inline :offset-assert 3424) @@ -57532,33 +58288,27 @@ :size-assert #xd70 :flag-assert #xcb0cf00d70 ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wcar-snake ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype v-snake (wcar-snake-base) () :method-count-assert 203 :size-assert #xd60 :flag-assert #xcb0ce00d60 ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wcar-scorpion ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype v-scorpion (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-shock-bots 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-shock-bots joint-mod-set-local 4 :inline :offset-assert 3264) (jmod-gun-kick joint-mod-add-local :inline :offset-assert 3520) (jmod-gun-tilt joint-mod-add-local :inline :offset-assert 3584) (jmod-gun-turn joint-mod-rotate-local :inline :offset-assert 3648) @@ -57567,50 +58317,71 @@ :size-assert #xe60 :flag-assert #xcb0de00e60 ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wcar-toad ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +(deftype wcar-toad-stack-var0 (structure) + ((params projectile-init-by-other-params :inline :offset 0) + (mat0 matrix :inline :offset 128) + (vec0 vector :inline :offset 256) + (vec1 vector :inline :offset 272) + (vec2 vector :inline :offset 288) + (vec3 vector :inline :offset 304) + (vec4 vector :inline :offset 320) + (vec5 vector :inline :offset 336) + (vec6 vector :inline :offset 368) + (vec7 vector :inline :offset 384) + (vec8 vector :inline :offset 416) + (vec9 vector :inline :offset 432) + (vec10 vector :inline :offset 448) + (vec11 vector :inline :offset 464) + (barrel-idx int8 :offset 480) + ) + ) + (deftype v-toad (wcar-base) - ((jmod-axles UNKNOWN 4 :offset-assert 2752) - (jmod-shock-tops UNKNOWN 2 :offset-assert 2880) - (jmod-shock-bots UNKNOWN 2 :offset-assert 2944) + ((jmod-axles joint-mod-rotate-local 4 :inline :offset-assert 2752) + (jmod-shock-tops joint-mod-rotate-local 2 :inline :offset-assert 2880) + (jmod-shock-bots joint-mod-set-local 2 :inline :offset-assert 2944) ) :method-count-assert 204 :size-assert #xc00 :flag-assert #xcc0b800c00 (:methods - (v-toad-method-203 () none) ;; 203 + (v-toad-method-203 (_type_ vehicle-wheel-state vehicle-wheel-info) none) ;; 203 ) ) -|# ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wcar-fox ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype v-fox (wcar-snake-base) () :method-count-assert 203 :size-assert #xd60 :flag-assert #xcb0ce00d60 ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wcar-rhino ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; added +(deftype wcar-rhino-proj-params (structure) + ((mat matrix :inline :offset 0) + (gun-local-pos vector :inline :offset 64) + (gun-local-dir vector :inline :offset 80) + (gun-dir vector :inline :offset 96) + (params projectile-init-by-other-params :inline :offset 128) + ) + ) + (deftype v-rhino (wcar-base) - ((jmod-axles UNKNOWN 4 :offset-assert 2752) + ((jmod-axles joint-mod-rotate-local 4 :inline :offset-assert 2752) (jmod-gun-kick joint-mod-add-local :inline :offset-assert 2880) (jmod-gun-turn joint-mod-rotate-local :inline :offset-assert 2944) ) @@ -57618,44 +58389,35 @@ :size-assert #xba0 :flag-assert #xcb0b200ba0 ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wcar-mirage ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype v-mirage (wcar-snake-base) () :method-count-assert 203 :size-assert #xd60 :flag-assert #xcb0ce00d60 ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wcar-x-ride ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype v-x-ride (wcar-snake-base) () :method-count-assert 203 :size-assert #xd60 :flag-assert #xcb0ce00d60 ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wcar-marauder ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype v-marauder (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) (jmod-hatch joint-mod-rotate-local :inline :offset-assert 2944) @@ -57667,48 +58429,53 @@ :method-count-assert 204 :size-assert #xc09 :flag-assert #xcc0b900c09 - (:methods - (v-marauder-method-203 () none) ;; 203 - ) (:state-methods explode ;; 60 ) + (:methods + (setup-draw-masks (_type_ int) none) ;; 203 + ) + ) + +(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* object) -;; (define-extern *v-marauder-turret-guard-settings* object) +(define-extern *v-marauder-turret-control-info* turret-control-info) +(define-extern *v-marauder-turret-guard-settings* squad-unit-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; w-parking-spot ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype w-parking-spot (process-drawable) - ((vehicle uint64 :offset-assert 200) - (should-spawn? basic :offset-assert 208) - (should-cleanup? basic :offset-assert 212) - (v-type uint8 :offset-assert 216) + ((vehicle handle :offset-assert 200) + (should-spawn? symbol :offset-assert 208) + (should-cleanup? symbol :offset-assert 212) + (v-type game-vehicle-u8 :offset-assert 216) (minimap connection-minimap :offset-assert 220) (test-sphere sphere :inline :offset-assert 224) - (arrow uint64 :offset-assert 240) + (arrow handle :offset-assert 240) ) :method-count-assert 27 :size-assert #xf8 :flag-assert #x1b008000f8 - (:methods - (w-parking-spot-method-21 () none) ;; 21 - (w-parking-spot-method-22 () none) ;; 22 - (w-parking-spot-method-23 () none) ;; 23 - (w-parking-spot-method-24 () none) ;; 24 - (w-parking-spot-method-25 () none) ;; 25 - (w-parking-spot-method-26 () none) ;; 26 - ) (:state-methods idle ;; 20 ) + (:methods + (w-parking-spot-method-21 (_type_) none) ;; 21 + (w-parking-spot-method-22 (_type_) none) ;; 22 + (w-parking-spot-method-23 (_type_) none) ;; 23 + (w-parking-spot-method-24 (_type_) none) ;; 24 + (w-parking-spot-method-25 (_type_) symbol) ;; 25 + (w-parking-spot-method-26 (_type_) int) ;; 26 + ) ) -|# ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -58321,63 +59088,59 @@ ;; 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 + knocked ;; 31 idle ;; 33 + stare ;; 37 + hostile ;; 38 victory ;; 39 - jump-out ;; 195 - knocked ;; 31 jump ;; 44 - gun-shoot ;; 194 - hostile ;; 38 - save-wait ;; 192 + 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 ;; @@ -58524,9 +59287,20 @@ ;; basebutton ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++basebutton:button-status +(defenum button-status + :type uint16 + :bitfield #t + (pressed) + (button-status-1) + (button-status-2) + (button-status-3) + (button-status-4) + ) +;; ---basebutton:button-status + (deftype basebutton (process-focusable) - ((button-status uint16 :offset-assert 208) ;; button-status + ((button-status button-status :offset-assert 208) ;; button-status (notify-actor entity :offset-assert 212) ;; guessed by decompiler (actor-group (pointer actor-group) :offset-assert 216) ;; guessed by decompiler (actor-group-count int32 :offset-assert 220) @@ -58543,26 +59317,25 @@ :method-count-assert 40 :size-assert #x120 :flag-assert #x2800a00120 - (:methods - (basebutton-method-32 () none) ;; 32 ;; (idle-state-transition (_type_) object) - (basebutton-method-33 () none) ;; 33 ;; (basebutton-method-33 (_type_) none) - (basebutton-method-34 () none) ;; 34 ;; (basebutton-method-34 (_type_) none) - (basebutton-method-35 () none) ;; 35 ;; (prepare-trigger-event! (_type_) none) - (basebutton-method-36 () none) ;; 36 ;; (send-event! (_type_ symbol) none) - (basebutton-method-37 () none) ;; 37 ;; (move-to! (_type_ vector quaternion) none) - (basebutton-method-38 () none) ;; 38 ;; (press! (_type_ symbol) entity-perm-status) - (basebutton-method-39 () none) ;; 39 - ) (:state-methods - going-up ;; 30, old: (up-idle () _type_ :state) - down-idle ;; 28, old: (going-down () _type_ :state) - going-down ;; 29, old: (going-up () _type_ :state) - up-idle ;; 31, old: (reset! (_type_) none) + down-idle ;; 28 + going-down ;; 29 + going-up ;; 30 + up-idle ;; 31 + ) + (:methods + (init! (_type_) none) ;; 32 + (idle-state-transition (_type_) object) ;; 33 + (init-skel-and-ja! (_type_) none) ;; 34 + (init-collision! (_type_) none) ;; 35 + (prepare-trigger-event! (_type_) none) ;; 36 + (send-event! (_type_ symbol) none) ;; 37 + (move-to! (_type_ vector quaternion) none) ;; 38 + (press! (_type_ symbol) entity-perm-status) ;; 39 ) ) -|# -;; (define-extern basebutton-init-by-other function) ;; (function entity-actor vector quaternion entity-actor symbol float none :behavior basebutton) +(define-extern basebutton-init-by-other (function entity-actor vector quaternion entity-actor symbol float none :behavior basebutton)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mine-obs-h ;; @@ -58573,28 +59346,27 @@ ;; mine-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *range-explo-dust-color* curve-color-fast) -;; (define-extern *range-explo-dust-alpha* curve2d-fast) -;; (define-extern *range-explo-dust-scale-x* curve2d-fast) -;; (define-extern *range-explo-dust-scale-y* curve2d-fast) -;; (define-extern *curve-explo-dust-alpha* curve2d-fast) -;; (define-extern *curve-explo-dust-scale-x* curve2d-fast) -;; (define-extern *curve-explo-dust-scale-y* curve2d-fast) -;; (define-extern *part-bomb-train-explosion-dust-in-curve-settings* object) -;; (define-extern *range-explo-color* curve-color-fast) -;; (define-extern *range-explo-alpha* curve2d-fast) -;; (define-extern *range-explo-scale-x* curve2d-fast) -;; (define-extern *range-explo-scale-y* curve2d-fast) -;; (define-extern *curve-explo-alpha* curve2d-fast) -;; (define-extern *curve-explo-scale-x* curve2d-fast) -;; (define-extern *curve-explo-scale-y* curve2d-fast) -;; (define-extern *part-bomb-train-explosion-texture-curve-settings* object) +(define-extern *range-explo-dust-color* curve-color-fast) +(define-extern *range-explo-dust-alpha* curve2d-fast) +(define-extern *range-explo-dust-scale-x* curve2d-fast) +(define-extern *range-explo-dust-scale-y* curve2d-fast) +(define-extern *curve-explo-dust-alpha* curve2d-fast) +(define-extern *curve-explo-dust-scale-x* curve2d-fast) +(define-extern *curve-explo-dust-scale-y* curve2d-fast) +(define-extern *part-bomb-train-explosion-dust-in-curve-settings* particle-curve-settings) +(define-extern *range-explo-color* curve-color-fast) +(define-extern *range-explo-alpha* curve2d-fast) +(define-extern *range-explo-scale-x* curve2d-fast) +(define-extern *range-explo-scale-y* curve2d-fast) +(define-extern *curve-explo-alpha* curve2d-fast) +(define-extern *curve-explo-scale-x* curve2d-fast) +(define-extern *curve-explo-scale-y* curve2d-fast) +(define-extern *part-bomb-train-explosion-texture-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mine-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype mineb-light-state (structure) ((current float :offset-assert 0) (target float :offset-assert 4) @@ -58603,19 +59375,15 @@ :size-assert #x8 :flag-assert #x900000008 ) -|# -#| (deftype mineb-states (structure) - ((lights UNKNOWN 3 :offset-assert 0) + ((lights mineb-light-state 3 :inline :offset-assert 0) ) :method-count-assert 9 :size-assert #x30 :flag-assert #x900000030 ) -|# -#| (deftype minec-states (structure) ((light light-state :inline :offset-assert 0) (electricity electricity-state :inline :offset-assert 8) @@ -58624,53 +59392,47 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -;; (define-extern init-mood-minea function) -;; (define-extern update-mood-minea function) -;; (define-extern init-mood-mineb function) -;; (define-extern update-mood-mineb function) -;; (define-extern set-mineb-lights! function) -;; (define-extern init-mood-minec function) -;; (define-extern update-mood-minec function) +(define-extern init-mood-minea (function mood-context float)) +(define-extern update-mood-minea (function mood-context float int none :behavior time-of-day-proc)) +(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 set-mineb-lights! (function int float none)) +(define-extern init-mood-minec (function mood-context float)) +(define-extern update-mood-minec (function mood-context float int none :behavior time-of-day-proc)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mine-platforms ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype mine-platform-base (base-plat) () :method-count-assert 38 :size-assert #x110 :flag-assert #x2600900110 - (:methods - (mine-platform-base-method-36 () none) ;; 36 - (mine-platform-base-method-37 () none) ;; 37 - ) (:state-methods plat-base-state ;; 35 ) + (:methods + (get-skel (_type_) art-group) ;; 36 + (alloc-path! (_type_ entity) none) ;; 37 + ) ) -|# -#| (deftype min-moving-plat-spooler (process-drawable) - ((spool-sound uint32 :offset-assert 200) + ((spool-sound sound-id :offset-assert 200) ) :method-count-assert 22 :size-assert #xcc :flag-assert #x16005000cc - (:methods - (min-moving-plat-spooler-method-21 () none) ;; 21 - ) (:state-methods active ;; 20 ) + (:methods + (queue-drill-sound (_type_) none) ;; 21 + ) ) -|# -#| (deftype min-moving-plat (mine-platform-base) ((animation-speed float :offset-assert 272) (sync sync-linear :inline :offset-assert 280) @@ -58681,137 +59443,123 @@ (sound-bit uint32 :offset-assert 312) (sound-gear uint32 :offset-assert 316) (last-frame float :offset-assert 320) - (spooler uint64 :offset-assert 328) + (spooler handle :offset-assert 328) (sync-offset float :offset-assert 336) ) :method-count-assert 40 :size-assert #x154 :flag-assert #x2800e00154 (:state-methods - active ;; 39 idle ;; 38 + active ;; 39 ) ) -|# -#| (deftype min-rotating-plat (mine-platform-base) ((animation-speed float :offset-assert 272) (sync sync-linear :inline :offset-assert 280) - (sound-loop-id uint32 :offset-assert 296) + (sound-loop-id sound-id :offset-assert 296) ) :method-count-assert 40 :size-assert #x12c :flag-assert #x2800b0012c (:state-methods - active ;; 39 idle ;; 38 + active ;; 39 ) ) -|# -#| (deftype min-falling-elevator (elevator) ((wheel-angle float :offset-assert 416) - (stop-sound basic :offset-assert 420) + (stop-sound symbol :offset-assert 420) + (pad uint8 4) ) :method-count-assert 55 :size-assert #x1ac :flag-assert #x37013001ac (:state-methods - resetting ;; 54 - falling ;; 53 - unstable ;; 52 - arrived ;; 38 running ;; 37 + arrived ;; 38 + unstable ;; 52 + falling ;; 53 + resetting ;; 54 ) ) -|# -#| (deftype min-falling-step (mine-platform-base) - ((should-fall basic :offset-assert 268) - (actor-group uint32 :offset-assert 272) - (actor-group-count int32 :offset-assert 276) + ((should-fall symbol :offset-assert 272) + (actor-group (pointer actor-group) :offset-assert 276) + (actor-group-count int32 :offset-assert 280) ) :method-count-assert 41 :size-assert #x11c :flag-assert #x2900a0011c (:state-methods - lowered ;; 40 - lowering ;; 39 idle ;; 38 + lowering ;; 39 + lowered ;; 40 ) ) -|# -#| (deftype min-elev-track (elevator) () :method-count-assert 52 :size-assert #x1a0 :flag-assert #x34012001a0 ) -|# -#| (deftype min-folding-plat (process-drawable) - ((stop-sound basic :offset-assert 200) - (sound-id uint32 :offset-assert 204) + ((root collide-shape-moving :override) + (stop-sound symbol :offset-assert 200) + (sound-id sound-id :offset-assert 204) ) :method-count-assert 24 :size-assert #xd0 :flag-assert #x18005000d0 - (:methods - (min-folding-plat-method-23 () none) ;; 23 - ) (:state-methods - extended ;; 22 - extend ;; 21 idle ;; 20 + extend ;; 21 + extended ;; 22 + ) + (:methods + (set-bounds! (_type_) none) ;; 23 ) ) -|# -#| (deftype min-ramp (process-drawable) - ((angle float :offset-assert 200) - (play-anim? basic :offset-assert 204) - (play-ramp-sound? basic :offset-assert 208) - (stop-ramp-sound basic :offset-assert 212) - (ramp-sound uint32 :offset-assert 216) + ((angle degrees :offset-assert 200) + (play-anim? symbol :offset-assert 204) + (play-ramp-sound? symbol :offset-assert 208) + (stop-ramp-sound symbol :offset-assert 212) + (ramp-sound sound-id :offset-assert 216) ) :method-count-assert 23 :size-assert #xdc :flag-assert #x17006000dc (:state-methods - rotated ;; 22 - rotating ;; 21 idle ;; 20 + rotating ;; 21 + rotated ;; 22 ) ) -|# -#| (deftype min-bridge (process-drawable) - ((stop-bridge-sound basic :offset-assert 200) - (bridge-sound uint32 :offset-assert 204) + ((stop-bridge-sound symbol :offset-assert 200) + (bridge-sound sound-id :offset-assert 204) ) :method-count-assert 24 :size-assert #xd0 :flag-assert #x18005000d0 - (:methods - (min-bridge-method-23 () none) ;; 23 - ) (:state-methods - extended ;; 22 - extend ;; 21 idle ;; 20 + extend ;; 21 + extended ;; 22 + ) + (:methods + (init-collision! (_type_) none) ;; 23 ) ) -|# -#| (deftype min-plat-updown (base-plat) ((sync sync-eased :inline :offset-assert 272) (path-pos float :offset-assert 316) @@ -58819,17 +59567,15 @@ :method-count-assert 38 :size-assert #x140 :flag-assert #x2600c00140 - (:methods - (min-plat-updown-method-37 () none) ;; 37 - ) (:state-methods - active ;; 36 idle ;; 35 + active ;; 36 + ) + (:methods + (get-skel (_type_) art-group) ;; 37 ) ) -|# -#| (deftype min-moving-step (min-plat-updown) ((holding? basic :offset-assert 320) ) @@ -58841,9 +59587,7 @@ dormant ;; 38 ) ) -|# -#| (deftype min-elevator (elevator) () :method-count-assert 52 @@ -58853,115 +59597,106 @@ running ;; 37 ) ) -|# -;; (define-extern min-moving-plat-spooler-init-by-other function) -;; (define-extern *drill-loop-mid-curve* object) -;; (define-extern min-falling-elevator-callback function) -;; (define-extern min-ramp-callback function) +(define-extern min-moving-plat-spooler-init-by-other (function vector object :behavior min-moving-plat-spooler)) +(define-extern *drill-loop-mid-curve* curve2d-piecewise) +(define-extern min-falling-elevator-callback (function cspace transformq none)) +(define-extern min-ramp-callback (function cspace transformq none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mine-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype rat-light-manager (process) - ((actor-group uint32 :offset-assert 124) - (actor-group-count int32 :offset-assert 128) + ((actor-group (pointer actor-group) :offset-assert 128) + (actor-group-count int32 :offset-assert 132) ) :method-count-assert 17 :size-assert #x88 :flag-assert #x1100100088 - (:methods - (rat-light-manager-method-15 () none) ;; 15 - (rat-light-manager-method-16 () none) ;; 16 - ) (:state-methods idle ;; 14 ) + (:methods + (rat-light-manager-method-15 (_type_ int int symbol) none) ;; 15 + (rat-light-manager-method-16 (_type_ int symbol) none) ;; 16 + ) ) -|# -#| (deftype min-rat-engine (process-drawable) - ((init-quat quaternion :inline :offset-assert 204) - (force-pos vector :inline :offset-assert 220) - (actor-group uint32 :offset-assert 236) - (actor-group-count int32 :offset-assert 240) - (rot-speed float :offset-assert 244) - (ang-momentum float :offset-assert 248) - (rat-timer uint64 :offset-assert 252) - (notify-actor basic :offset-assert 260) - (sound-id uint32 :offset-assert 264) - (rat-sound-id uint32 :offset-assert 268) - (rat-wheel-sound-id uint32 :offset-assert 272) - (light-index uint32 :offset-assert 276) - (light-target float :offset-assert 280) - (wheel-angle float :offset-assert 284) - (wheel-sound-volume float :offset-assert 288) - (last-turn-time uint64 :offset-assert 292) - (rat-count uint32 :offset-assert 300) + ((root collide-shape-moving :override) + (init-quat quaternion :inline :offset-assert 208) + (force-pos vector :inline :offset-assert 224) + (actor-group (pointer actor-group) :offset-assert 240) + (actor-group-count int32 :offset-assert 244) + (rot-speed float :offset-assert 248) + (ang-momentum float :offset-assert 252) + (rat-timer time-frame :offset-assert 256) + (notify-actor entity-actor :offset-assert 264) + (sound-id sound-id :offset-assert 268) + (rat-sound-id sound-id :offset-assert 272) + (rat-wheel-sound-id sound-id :offset-assert 276) + (light-index uint32 :offset-assert 280) + (light-target float :offset-assert 284) + (wheel-angle float :offset-assert 288) + (wheel-sound-volume float :offset-assert 292) + (last-turn-time time-frame :offset-assert 296) + (rat-count uint32 :offset-assert 304) ) :method-count-assert 29 :size-assert #x134 :flag-assert #x1d00c00134 - (:methods - (min-rat-engine-method-24 () none) ;; 24 - (min-rat-engine-method-25 () none) ;; 25 - (min-rat-engine-method-26 () none) ;; 26 - (min-rat-engine-method-27 () none) ;; 27 - (min-rat-engine-method-28 () none) ;; 28 - ) (:state-methods - shutdown ;; 23 - running ;; 22 - active ;; 21 inactive ;; 20 + active ;; 21 + running ;; 22 + shutdown ;; 23 + ) + (:methods + (min-rat-engine-method-24 (_type_) none) ;; 24 + (min-rat-engine-method-25 (_type_) none) ;; 25 + (min-rat-engine-method-26 (_type_ float float float float) symbol) ;; 26 + (min-rat-engine-method-27 (_type_ process focus) none) ;; 27 + (min-rat-engine-method-28 (_type_) none) ;; 28 ) ) -|# -#| (deftype min-crane (process-drawable) () :method-count-assert 22 :size-assert #xc8 :flag-assert #x16005000c8 - (:methods - (min-crane-method-21 () none) ;; 21 - ) (:state-methods idle ;; 20 ) + (:methods + (min-crane-method-21 (_type_) none) ;; 21 + ) ) -|# -#| (deftype min-target-sign (mine-platform-base) - ((off-part basic :offset-assert 272) - (on-part basic :offset-assert 276) + ((off-part sparticle-launch-control :offset-assert 272) + (on-part sparticle-launch-control :offset-assert 276) (track-pos vector :inline :offset-assert 288) - (alt-actor basic :offset-assert 304) - (touched-train? basic :offset-assert 308) + (alt-actor entity-actor :offset-assert 304) + (touched-train? symbol :offset-assert 308) ) :method-count-assert 43 :size-assert #x138 :flag-assert #x2b00c00138 - (:methods - (min-target-sign-method-42 () none) ;; 42 - ) (:state-methods - idle-down ;; 41 - lowering ;; 40 - idle ;; 39 dormant ;; 38 + idle ;; 39 + lowering ;; 40 + idle-down ;; 41 + ) + (:methods + (spawn-on-off-part (_type_ symbol) object) ;; 42 ) ) -|# -#| (deftype min-bomb-elevator (elevator) - ((alt-actor basic :offset-assert 416) + ((alt-actor entity-actor :offset-assert 416) (bomb-train-offset float :offset-assert 420) (wheel-angle float :offset-assert 424) ) @@ -58969,309 +59704,295 @@ :size-assert #x1ac :flag-assert #x34013001ac (:state-methods - arrived ;; 38 - running ;; 37 waiting ;; 36 + running ;; 37 + arrived ;; 38 ) ) -|# -#| (deftype min-elev-doors (process-drawable) () :method-count-assert 24 :size-assert #xc8 :flag-assert #x18005000c8 - (:methods - (min-elev-doors-method-23 () none) ;; 23 - ) (:state-methods - opened ;; 22 - open ;; 21 idle ;; 20 + open ;; 21 + opened ;; 22 + ) + (:methods + (min-elev-doors-method-23 (_type_) none) ;; 23 ) ) -|# -#| (deftype min-crane-switch (basebutton) - ((rog uint64 :offset-assert 288) + ((rog handle :offset-assert 288) ) :method-count-assert 40 :size-assert #x128 :flag-assert #x2800b00128 (:state-methods - up-idle ;; 31 down-idle ;; 28 + up-idle ;; 31 ) ) -|# -#| (deftype min-door (process-drawable) () :method-count-assert 24 :size-assert #xc8 :flag-assert #x18005000c8 - (:methods - (min-door-method-22 () none) ;; 22 - (min-door-method-23 () none) ;; 23 - ) (:state-methods - exploded ;; 21 idle ;; 20 + exploded ;; 21 + ) + (:methods + (min-door-method-22 (_type_) none) ;; 22 + (min-door-method-23 (_type_) none) ;; 23 ) ) -|# -#| (deftype min-elec-gate (elec-gate) () :method-count-assert 31 :size-assert #x200 :flag-assert #x1f01800200 ) -|# -#| (deftype min-boss-elev (elevator) - ((going-down? basic :offset-assert 416) - (sound-rotating-loop basic :offset-assert 420) + ((going-down? symbol :offset-assert 416) + (sound-rotating-loop sound-spec :offset-assert 420) ) :method-count-assert 52 :size-assert #x1a8 :flag-assert #x34013001a8 (:state-methods - running ;; 37 dormant ;; 35 + running ;; 37 ) ) -|# -#| (deftype min-airlock-door (com-airlock) () :method-count-assert 30 :size-assert #x1b0 :flag-assert #x1e013001b0 ) -|# -#| (deftype mine-music-manager (task-manager) () :method-count-assert 32 :size-assert #xf0 :flag-assert #x20007000f0 ) -|# -;; (define-extern mineb-activate function) -;; (define-extern min-rat-engine-handler function) -;; (define-extern min-rat-engine-post function) -;; (define-extern joint-mod-rat-engine-callback function) -;; (define-extern target-sign-event-handler function) -;; (define-extern min-bomb-elevator-callback function) +(define-extern mineb-activate (function none)) +(define-extern min-rat-engine-handler (function process int symbol event-message-block object :behavior min-rat-engine)) +(define-extern min-rat-engine-post (function none :behavior min-rat-engine)) +(define-extern joint-mod-rat-engine-callback (function cspace transformq none)) +(define-extern target-sign-event-handler (function process int symbol event-message-block object :behavior min-target-sign)) +(define-extern min-bomb-elevator-callback (function cspace transformq none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mine-train ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype min-bomb-train (process-focusable) ((path-pos float :offset-assert 208) (path-length float :offset-assert 212) (speed float :offset-assert 216) (fall-travel-time float :offset-assert 220) - (actor-group uint32 :offset-assert 224) + (actor-group (pointer actor-group) :offset-assert 224) (actor-group-count int32 :offset-assert 228) - (wheel-angle float :offset-assert 232) - (sound-loop-id uint32 :offset-assert 236) + (wheel-angle degrees :offset-assert 232) + (sound-loop-id sound-id :offset-assert 236) (attack-id uint32 :offset-assert 240) - (spark-part basic :offset-assert 244) - (smoke-part basic :offset-assert 248) - (light-part basic :offset-assert 252) - (doors-exploded? basic :offset-assert 256) - (taskman uint64 :offset-assert 264) + (spark-part sparticle-launch-control :offset-assert 244) + (smoke-part sparticle-launch-control :offset-assert 248) + (light-part sparticle-launch-control :offset-assert 252) + (doors-exploded? symbol :offset-assert 256) + (taskman handle :offset-assert 264) (current-rail uint8 :offset-assert 272) (suck-level float :offset-assert 276) - (minimap basic :offset-assert 280) + (minimap (array connection-minimap) :offset-assert 280) ) :method-count-assert 41 :size-assert #x11c :flag-assert #x2900a0011c - (:methods - (min-bomb-train-method-35 () none) ;; 35 - (min-bomb-train-method-36 () none) ;; 36 - (min-bomb-train-method-37 () none) ;; 37 - (min-bomb-train-method-38 () none) ;; 38 - (min-bomb-train-method-39 () none) ;; 39 - (min-bomb-train-method-40 () none) ;; 40 - ) (:state-methods - explode-doors ;; 34 + idle ;; 28 + wait ;; 29 + active ;; 30 explode ;; 31 fall ;; 32 die ;; 33 - active ;; 30 - wait ;; 29 - idle ;; 28 + explode-doors ;; 34 + ) + (:methods + (alloc-path! (_type_) symbol) ;; 35 + (init-collision! (_type_) none) ;; 36 + (get-path-progress (_type_ float float) float) ;; 37 + (update-task-manager (_type_) object) ;; 38 + (spawn-debris (_type_) none) ;; 39 + (explode-sound (_type_) none) ;; 40 ) ) -|# -;; (define-extern *min-bomb-train-times* array) -;; (define-extern *min-bomb-train-debris-params* debris-static-params) -;; (define-extern min-bomb-train-callback function) +(define-extern *min-bomb-train-times* (array float)) +(define-extern *min-bomb-train-debris-params* debris-static-params) +(define-extern min-bomb-train-callback (function cspace transformq none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mine-scenes ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype leggings (process-drawable) - ((alt-actor basic :offset-assert 200) + ((alt-actor entity-actor :offset-assert 200) ) :method-count-assert 22 :size-assert #xcc :flag-assert #x16005000cc (:state-methods - die ;; 21 idle ;; 20 + die ;; 21 ) ) -|# -;; (define-extern *range-explo-door-dust-color* curve-color-fast) -;; (define-extern *range-explo-door-dust-alpha* curve2d-fast) -;; (define-extern *range-explo-door-dust-scale-x* curve2d-fast) -;; (define-extern *range-explo-door-dust-scale-y* curve2d-fast) -;; (define-extern *curve-explo-door-dust-alpha* curve2d-fast) -;; (define-extern *curve-explo-door-dust-scale-x* curve2d-fast) -;; (define-extern *curve-explo-door-dust-scale-y* curve2d-fast) -;; (define-extern *part-bomb-door-explosion-dust-in-curve-settings* object) -;; (define-extern *range-explo-door-color* curve-color-fast) -;; (define-extern *range-explo-door-alpha* curve2d-fast) -;; (define-extern *range-explo-door-scale-x* curve2d-fast) -;; (define-extern *range-explo-door-scale-y* curve2d-fast) -;; (define-extern *curve-explo-door-alpha* curve2d-fast) -;; (define-extern *curve-explo-door-scale-x* curve2d-fast) -;; (define-extern *curve-explo-door-scale-y* curve2d-fast) -;; (define-extern *part-bomb-door-explosion-texture-curve-settings* object) +(define-extern *range-explo-door-dust-color* curve-color-fast) +(define-extern *range-explo-door-dust-alpha* curve2d-fast) +(define-extern *range-explo-door-dust-scale-x* curve2d-fast) +(define-extern *range-explo-door-dust-scale-y* curve2d-fast) +(define-extern *curve-explo-door-dust-alpha* curve2d-fast) +(define-extern *curve-explo-door-dust-scale-x* curve2d-fast) +(define-extern *curve-explo-door-dust-scale-y* curve2d-fast) +(define-extern *part-bomb-door-explosion-dust-in-curve-settings* particle-curve-settings) +(define-extern *range-explo-door-color* curve-color-fast) +(define-extern *range-explo-door-alpha* curve2d-fast) +(define-extern *range-explo-door-scale-x* curve2d-fast) +(define-extern *range-explo-door-scale-y* curve2d-fast) +(define-extern *curve-explo-door-alpha* curve2d-fast) +(define-extern *curve-explo-door-scale-x* curve2d-fast) +(define-extern *curve-explo-door-scale-y* curve2d-fast) +(define-extern *part-bomb-door-explosion-texture-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 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 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++manta:manta-flags +(defenum manta-flags + :type uint16 + :bitfield #t + (mf0 0) + (mf1 1) + ) +;; ---manta:manta-flags + (deftype manta (nav-enemy) - ((info rigid-body-object-constants :offset-assert 616) - (move-matrix matrix :inline :offset-assert 620) - (curve-matrix matrix :inline :offset-assert 684) - (move-vel vector :inline :offset-assert 748) - (move-u float :offset-assert 764) - (move-du float :offset-assert 768) - (move-force float :offset-assert 772) - (flags uint16 :offset-assert 776) - (go-enable basic :offset-assert 780) - (orbit-speed float :offset-assert 784) - (max-time-step float :offset-assert 788) - (gravity float :offset-assert 792) - (landed-pos vector :inline :offset-assert 796) - (dest-pos vector :inline :offset-assert 812) - (attack-pos vector :inline :offset-assert 828) - (up-dir vector :inline :offset-assert 844) - (forward-dir vector :inline :offset-assert 860) - (knocked-force vector :inline :offset-assert 876) - (knocked-force-mult float :offset-assert 892) - (default-y-offset float :offset-assert 896) - (y-offset float :offset-assert 900) - (last-attack-time uint64 :offset-assert 908) - (attack-y-offset float :offset-assert 916) - (attack-path-blocked-time uint64 :offset-assert 924) - (track-timer uint64 :offset-assert 932) - (angle-to-player float :offset-assert 940) - (offset-difference float :offset-assert 944) - (sound-volume float :offset-assert 948) - (restart-fly-anims basic :offset-assert 952) - (fly-anim-speed float :offset-assert 956) - (hit-ground-count uint32 :offset-assert 960) - (fade-level float :offset-assert 964) - (actor-group uint32 :offset-assert 496) - (actor-group-count int32 :offset-assert 500) + ((info rigid-body-object-constants :offset-assert 620) + (move-matrix matrix :inline :offset-assert 624) + (curve-matrix matrix :inline :offset-assert 688) + (move-vel vector :inline :offset-assert 752) + (move-u float :offset-assert 768) + (move-du float :offset-assert 772) + (move-force float :offset-assert 776) + (flags manta-flags :offset-assert 780) + (go-enable symbol :offset-assert 784) + (orbit-speed float :offset-assert 788) + (max-time-step float :offset-assert 792) + (gravity float :offset-assert 796) + (landed-pos vector :inline :offset-assert 800) + (dest-pos vector :inline :offset-assert 816) + (attack-pos vector :inline :offset-assert 832) + (up-dir vector :inline :offset-assert 848) + (forward-dir vector :inline :offset-assert 864) + (knocked-force vector :inline :offset-assert 880) + (knocked-force-mult float :offset-assert 896) + (default-y-offset float :offset-assert 900) + (y-offset float :offset-assert 904) + (last-attack-time time-frame :offset-assert 912) + (attack-y-offset float :offset-assert 920) + (attack-path-blocked-time time-frame :offset-assert 928) + (track-timer time-frame :offset-assert 936) + (angle-to-player float :offset-assert 944) + (offset-difference float :offset-assert 948) + (sound-volume float :offset-assert 952) + (restart-fly-anims symbol :offset-assert 956) + (fly-anim-speed float :offset-assert 960) + (hit-ground-count uint32 :offset-assert 964) + (fade-level float :offset-assert 968) + ; (actor-group (pointer actor-group) :offset-assert 496) + ; (actor-group-count int32 :offset-assert 500) + (pad uint8 8) ) :method-count-assert 209 :size-assert #x3d4 :flag-assert #xd1036003d4 - (:methods - (manta-method-195 () none) ;; 195 - (manta-method-196 () none) ;; 196 - (manta-method-197 () none) ;; 197 - (manta-method-198 () none) ;; 198 - (manta-method-199 () none) ;; 199 - (manta-method-200 () none) ;; 200 - (manta-method-201 () none) ;; 201 - (manta-method-202 () none) ;; 202 - (manta-method-203 () none) ;; 203 - (manta-method-204 () none) ;; 204 - (manta-method-205 () none) ;; 205 - (manta-method-206 () none) ;; 206 - (manta-method-207 () none) ;; 207 - (manta-method-208 () none) ;; 208 - ) (:state-methods - knocked-recover ;; 32 knocked ;; 31 - attack-end ;; 194 - hostile ;; 38 - attack ;; 193 + knocked-recover ;; 32 + idle ;; 33 + active ;; 34 stare ;; 37 - notice-to-fly ;; 192 - land ;; 191 + hostile ;; 38 ambush ;; 47 - active ;; 34 land-approach ;; 190 - idle ;; 33 + land ;; 191 + notice-to-fly ;; 192 + attack ;; 193 + attack-end ;; 194 + ) + (:methods + (manta-method-195 (_type_) none) ;; 195 + (manta-method-196 (_type_) symbol) ;; 196 + (manta-method-197 (_type_) none) ;; 197 + (manta-method-198 (_type_) none) ;; 198 + (manta-method-199 (_type_) none) ;; 199 + (manta-method-200 (_type_) none) ;; 200 + (manta-method-201 (_type_ float) none) ;; 201 + (do-impact (_type_) none) ;; 202 + (manta-method-203 (_type_ float) none) ;; 203 + (manta-method-204 (_type_) none) ;; 204 + (update-target-pos! (_type_) none) ;; 205 + (manta-method-206 (_type_) none) ;; 206 + (alloc-rbody! (_type_ rigid-body-object-constants) none) ;; 207 + (manta-method-208 (_type_) none) ;; 208 ) ) -|# -;; (define-extern *manta-rigid-body-constants* object) -;; (define-extern *fact-info-manta-defaults* fact-info-enemy-defaults) -;; (define-extern *manta-nav-enemy-info* nav-enemy-info) -;; (define-extern manta-hostile-post function) -;; (define-extern manta-attack-post function) -;; (define-extern manta-fly-code function) +(define-extern *manta-rigid-body-constants* rigid-body-object-constants) +(define-extern *fact-info-manta-defaults* fact-info-enemy-defaults) +(define-extern *manta-nav-enemy-info* nav-enemy-info) +(define-extern manta-hostile-post (function none :behavior manta)) +(define-extern manta-attack-post (function none :behavior manta)) +(define-extern manta-fly-code (function none :behavior manta)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; gekko ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype gekko-foot-info (structure) ((ground-pos vector :inline :offset-assert 0) (ground-normal vector :inline :offset-assert 16) (foot-transform transformq :inline :offset-assert 32) - (leg-ik basic :offset-assert 80) + (leg-ik joint-mod-ik :offset-assert 80) ) :method-count-assert 9 :size-assert #x54 :flag-assert #x900000054 ) -|# -#| (deftype gekko-ik-setup (structure) ((elbow-index int32 :offset-assert 0) (hand-index int32 :offset-assert 4) @@ -59282,200 +60003,197 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype gekko-shadow-spot (structure) ((position vector :inline :offset-assert 0) (normal vector :inline :offset-assert 16) - (valid? basic :offset-assert 32) + (valid? symbol :offset-assert 32) (pat uint32 :offset-assert 36) ) :method-count-assert 9 :size-assert #x28 :flag-assert #x900000028 ) -|# -#| +;; +++gekko:gekko-flag +(defenum gekko-flag + :type uint16 + :bitfield #t + (update-foot-position?) + (follow-terrain) + (update-tilt) + (on-wall?) + (falling-off-wall?) + ) +;; ---gekko:gekko-flag + (deftype gekko (nav-enemy) - ((shadow-spot gekko-shadow-spot :inline :offset-assert 620) - (foot UNKNOWN 4 :offset-assert 668) - (rot-matrix matrix :inline :offset-assert 1052) - (gspot-normal vector :inline :offset-assert 1116) - (tilt-quat quaternion :inline :offset-assert 1132) - (dest-to-me-dir vector :inline :offset-assert 1148) - (turn-face-point vector :inline :offset-assert 1164) - (flags gekko-flag :offset-assert 1180) - (attack-time uint64 :offset-assert 1188) - (last-turn-time uint64 :offset-assert 1196) - (fade float :offset-assert 1204) - (rot-mult float :offset-assert 1208) - (move-speed float :offset-assert 1212) - (move-decel float :offset-assert 1216) - (turn-next-state basic :offset-assert 1220) - (path-wall basic :offset-assert 1224) - (scared-timer uint64 :offset-assert 1228) - (scale float :offset-assert 1236) - (probe-len float :offset-assert 1240) + ((shadow-spot gekko-shadow-spot :inline :offset-assert 624) + (foot gekko-foot-info 4 :inline :offset-assert 672) + (rot-matrix matrix :inline :offset-assert 1056) + (gspot-normal vector :inline :offset-assert 1120) + (tilt-quat quaternion :inline :offset-assert 1136) + (dest-to-me-dir vector :inline :offset-assert 1152) + (turn-face-point vector :inline :offset-assert 1168) + (flags gekko-flag :offset-assert 1184) + (attack-time time-frame :offset-assert 1192) + (last-turn-time time-frame :offset-assert 1200) + (fade float :offset-assert 1208) + (rot-mult float :offset-assert 1212) + (move-speed float :offset-assert 1216) + (move-decel float :offset-assert 1220) + (turn-next-state (state gekko) :offset-assert 1224) + (path-wall path-control :offset-assert 1228) + (scared-timer time-frame :offset-assert 1232) + (scale float :offset-assert 1240) + (probe-len float :offset-assert 1244) ) :method-count-assert 209 :size-assert #x4e0 :flag-assert #xd1046004e0 ;; field gekko-flag is likely a value type. - (:methods - (gekko-method-202 () none) ;; 202 - (gekko-method-203 () none) ;; 203 - (gekko-method-204 () none) ;; 204 - (gekko-method-205 () none) ;; 205 - (gekko-method-206 () none) ;; 206 - (gekko-method-207 () none) ;; 207 - (gekko-method-208 () none) ;; 208 - ) (:state-methods - knocked-recover ;; 32 knocked ;; 31 - jump ;; 44 - turn-quick ;; 201 - turn ;; 200 - attack ;; 199 - pre-attack ;; 198 - hostile ;; 38 + knocked-recover ;; 32 idle ;; 33 - active-wall ;; 190 active ;; 34 notice ;; 35 + flee ;; 36 + stare ;; 37 + hostile ;; 38 + jump ;; 44 + active-wall ;; 190 hostile-wall ;; 191 turn-wall ;; 192 - flee ;; 36 attack-wall ;; 193 - stare ;; 37 knocked-wall ;; 194 jump-off-wall ;; 195 jump-off-wall-falling ;; 196 jump-off-wall-recover ;; 197 + pre-attack ;; 198 + attack ;; 199 + turn ;; 200 + turn-quick ;; 201 + ) + (:methods + (gekko-method-202 (_type_) none) ;; 202 + (gekko-method-203 (_type_) none) ;; 203 + (gekko-method-204 (_type_) none) ;; 204 + (gekko-method-205 (_type_) none) ;; 205 + (gekko-method-206 (_type_) none) ;; 206 + (gekko-method-207 (_type_) none) ;; 207 + (gekko-method-208 (_type_) none) ;; 208 ) ) -|# -#| (deftype gecko (gekko) () :method-count-assert 209 :size-assert #x4e0 :flag-assert #xd1046004e0 ) -|# -;; (define-extern *gekko-ik-setup* object) -;; (define-extern *gekko-foot-offset* array) -;; (define-extern *fact-info-gekko-defaults* fact-info-enemy-defaults) -;; (define-extern *gekko-nav-enemy-info* nav-enemy-info) -;; (define-extern hostile-wall-trans function) -;; (define-extern gekko-stare-code function) -;; (define-extern gekko-foot-rot-handler function) -;; (define-extern gekko-postbind function) -;; (define-extern gekko-postbind-callback function) +(define-extern *gekko-ik-setup* (inline-array gekko-ik-setup)) +(define-extern *gekko-foot-offset* (array gekko-foot-info)) +(define-extern *fact-info-gekko-defaults* fact-info-enemy-defaults) +(define-extern *gekko-nav-enemy-info* nav-enemy-info) +(define-extern hostile-wall-trans (function none :behavior gekko)) +(define-extern gekko-stare-code (function none :behavior gekko)) +(define-extern gekko-foot-rot-handler (function cspace transformq none)) +(define-extern gekko-postbind (function draw-control cspace-array none)) +(define-extern gekko-postbind-callback (function draw-control cspace-array joint-control none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; rat ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype rat (nav-enemy) ((init-quat quaternion :inline :offset-assert 624) (roll-transform transformq :inline :offset-assert 640) (face-dir vector :inline :offset-assert 688) (flee-focus-pos vector :inline :offset-assert 704) - (wheel-actor basic :offset-assert 720) - (permanently-scared basic :offset-assert 724) + (wheel-actor entity-actor :offset-assert 720) + (permanently-scared symbol :offset-assert 724) (slide-sound-id uint32 :offset-assert 728) - (scared-timer uint64 :offset-assert 736) - (scared-interval uint64 :offset-assert 744) - (return-to-nav-mesh? basic :offset-assert 752) + (scared-timer time-frame :offset-assert 736) + (scared-interval time-frame :offset-assert 744) + (return-to-nav-mesh? symbol :offset-assert 752) ) :method-count-assert 198 :size-assert #x2f4 :flag-assert #xc6028002f4 - (:methods - (rat-method-195 () none) ;; 195 - ) (:state-methods - wheel-die ;; 197 - running-in-wheel ;; 196 + knocked ;; 31 knocked-recover ;; 32 idle ;; 33 active ;; 34 - wait-by-wheel-seek ;; 190 - ambush ;; 47 - active-turn ;; 192 - flee ;; 36 notice ;; 35 - wait-by-wheel-wait ;; 191 + flee ;; 36 + stare ;; 37 hostile ;; 38 - flee-stare ;; 194 + ambush ;; 47 + wait-by-wheel-seek ;; 190 + wait-by-wheel-wait ;; 191 + active-turn ;; 192 attack ;; 193 - stare ;; 37 - knocked ;; 31 + flee-stare ;; 194 + undefined ;; 195, not defined + running-in-wheel ;; 196 + wheel-die ;; 197 ) ) -|# -#| (deftype rat-spawner (process) - ((rats-spawned uint32 :offset-assert 124) - (wheel-entity basic :offset-assert 128) - (state-time uint64 :offset-assert 132) - (active? basic :offset-assert 140) - (rats-to-spawn uint32 :offset-assert 144) - (actor-group uint32 :offset-assert 148) - (actor-group-count int32 :offset-assert 152) + ((rats-spawned uint32 :offset-assert 128) + (wheel-entity entity-actor :offset-assert 132) + (state-time time-frame :offset-assert 136) + (active? symbol :offset-assert 144) + (rats-to-spawn uint32 :offset-assert 148) + (actor-group (pointer actor-group) :offset-assert 152) + (actor-group-count int32 :offset-assert 156) ) :method-count-assert 16 :size-assert #xa0 :flag-assert #x10002000a0 (:state-methods - die ;; 15 idle ;; 14 + die ;; 15 ) ) -|# -;; (define-extern *fact-info-rat-defaults* fact-info-enemy-defaults) -;; (define-extern *rat-nav-enemy-info* nav-enemy-info) -;; (define-extern rat-run-code function) -;; (define-extern rat-falling-post function) -;; (define-extern rat-joint-mod-roll function) +(define-extern *fact-info-rat-defaults* fact-info-enemy-defaults) +(define-extern *rat-nav-enemy-info* nav-enemy-info) +(define-extern rat-run-code (function none :behavior rat)) +(define-extern rat-falling-post (function none :behavior rat)) +(define-extern rat-joint-mod-roll (function cspace transformq none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; monster-frog ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype monster-frog (nav-enemy) () :method-count-assert 193 :size-assert #x26c :flag-assert #xc101f0026c (:state-methods - turn ;; 192 - hostile ;; 38 + active ;; 34 + notice ;; 35 stare ;; 37 - circling ;; 157 + hostile ;; 38 + ambush ;; 47 pacing ;; 156 + circling ;; 157 + (attack vector) ;; 190 attack-recover ;; 191 - notice ;; 35 - attack ;; 190 - active ;; 34 - ambush ;; 47 + turn ;; 192 ) ) -|# -;; (define-extern *fact-info-monster-frog-defaults* fact-info-enemy-defaults) -;; (define-extern *monster-frog-nav-enemy-info* nav-enemy-info) ;; nav-enemy-info -;; (define-extern monster-frog-hop-slow-code function) ;; (function symbol :behavior monster-frog) -;; (define-extern monster-frog-hop-fast-code function) ;; (function symbol :behavior monster-frog) +(define-extern *fact-info-monster-frog-defaults* fact-info-enemy-defaults) +(define-extern *monster-frog-nav-enemy-info* nav-enemy-info) +(define-extern monster-frog-hop-slow-code (function symbol :behavior monster-frog)) +(define-extern monster-frog-hop-fast-code (function symbol :behavior monster-frog)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mhcityb-texture ;; @@ -59492,59 +60210,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 @@ -59554,9 +60264,7 @@ idle ;; 33 ) ) -|# -#| (deftype des-beast (enemy) ((path-pos float :offset-assert 552) (path-pos-speed float :offset-assert 556) @@ -59564,89 +60272,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 + idle ;; 33 die ;; 40 + turn-back ;; 155 + falling ;; 156 down ;; 157 + get-up ;; 158 die-run ;; 159 - falling ;; 156 - turn-back ;; 155 - idle ;; 33 ) - ) -|# - -;; (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) + (: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_ bounding-box) symbol) ;; 167 + ) + ) + +(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) @@ -59666,9 +60372,7 @@ impact ;; 22 ) ) -|# -#| (deftype mh-flyer (enemy) ((rotation-matrix matrix :inline :offset-assert 560) (move-curve cubic-curve :inline :offset-assert 624) @@ -59679,62 +60383,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) @@ -59743,23 +60443,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) @@ -59769,56 +60467,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 @@ -59827,9 +60520,7 @@ idle ;; 14 ) ) -|# -#| (deftype scorpion-gun-shot (projectile) ((init-pos vector :inline :offset-assert 512) (init-dir vector :inline :offset-assert 528) @@ -59839,23 +60530,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) @@ -59866,22 +60555,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) @@ -59890,9 +60577,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) @@ -59903,9 +60588,7 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype scorpion-gun-manager (process) ((trans vector :inline :offset-assert 128) (quat quaternion :inline :offset-assert 144) @@ -59914,59 +60597,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) @@ -59976,44 +60664,40 @@ :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 ;; @@ -60050,14 +60734,13 @@ ;; 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) @@ -60068,54 +60751,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 @@ -60124,87 +60804,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 ;; @@ -60332,43 +61010,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) @@ -60377,29 +61052,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) ) @@ -60407,22 +61078,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) @@ -60431,41 +61098,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) @@ -60474,42 +61139,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 @@ -60517,11 +61180,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 @@ -60530,9 +61192,7 @@ idle ;; 20 ) ) -|# -#| (deftype terraformer-foot-water-splash (structure) ((frame float :offset-assert 0) ) @@ -60540,26 +61200,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 @@ -60568,59 +61228,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 - ) - ) -|# - -;; (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) + (task-manager-terraformer-method-32 (_type_) none) ;; 32 + ) + ) + +(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 ;; @@ -60657,7 +61312,7 @@ ;; hover-nav-towera ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *towera-adjacency* object) +(define-extern *towera-adjacency* nav-network-data) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; tower-part ;; @@ -60668,7 +61323,6 @@ ;; tower-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype tower-states (structure) ((pulse pulse-state :inline :offset-assert 0) ) @@ -60676,128 +61330,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 @@ -60806,29 +61451,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 ;; @@ -60956,34 +61597,31 @@ ;; prim-beam ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype prim-beam (process-drawable) - ((strip basic :offset-assert 200) + ((strip prim-strip :offset-assert 200) (pos0 vector :inline :offset-assert 208) (pos1 vector :inline :offset-assert 224) (appearance prim-beam-settings :inline :offset-assert 240) - (duration uint64 :offset-assert 272) + (duration time-frame :offset 272) ) :method-count-assert 26 :size-assert #x118 :flag-assert #x1a00a00118 - (:methods - (prim-beam-method-22 () none) ;; 22 - (prim-beam-method-23 () none) ;; 23 - (prim-beam-method-24 () none) ;; 24 - (prim-beam-method-25 () none) ;; 25 - ) (:state-methods - hidden ;; 21 active ;; 20 + hidden ;; 21 + ) + (:methods + (prim-beam-method-22 (_type_) none) ;; 22 + (prim-beam-method-23 (_type_) none) ;; 23 + (prim-beam-method-24 (_type_) none) ;; 24 + (init-strip! (_type_) none) ;; 25 ) ) -|# -#| (deftype prim-beam-tracker (prim-beam) - ((track-obj1 uint64 :offset-assert 280) - (track-obj2 uint64 :offset-assert 288) + ((track-obj1 handle :offset-assert 280) + (track-obj2 handle :offset-assert 288) (track-joint1 int32 :offset-assert 296) (track-joint2 int32 :offset-assert 300) ) @@ -60991,11 +61629,10 @@ :size-assert #x130 :flag-assert #x1a00b00130 ) -|# -;; (define-extern *default-prim-beam-appearance* object) -;; (define-extern prim-beam-tracker-init-by-other function) -;; (define-extern spawn-prim-beam-tracker function) +(define-extern *default-prim-beam-appearance* prim-beam-settings) +(define-extern prim-beam-tracker-init-by-other (function prim-beam-tracker-params object :behavior prim-beam-tracker)) +(define-extern spawn-prim-beam-tracker (function prim-beam-tracker-params symbol process handle)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; precurd-obs ;; @@ -61707,79 +62344,68 @@ ;; wascitya-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype wascity-stad-door (com-airlock) () :method-count-assert 30 :size-assert #x1b0 :flag-assert #x1e013001b0 ) -|# -#| (deftype waspala-elevator (elevator) () :method-count-assert 52 :size-assert #x1a0 :flag-assert #x34012001a0 ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 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 ;; @@ -62413,7 +63039,6 @@ ;; desert-dust-storm ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype desert-dust-storm (process) ((intensity float :offset-assert 128) (intensity-rate float :offset-assert 132) @@ -62425,35 +63050,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) @@ -62465,21 +63088,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 ;; @@ -62619,31 +63241,26 @@ ;; 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 ;; @@ -62661,7 +63278,6 @@ ;; stadium-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype stadium-states (structure) ((light light-state :inline :offset-assert 0) (flame flames-state :inline :offset-assert 8) @@ -62670,9 +63286,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 ;; @@ -62688,63 +63303,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 @@ -62754,11 +63373,9 @@ idle ;; 20 ) ) -|# -#| (deftype wstd-blocker (process-drawable) - () + ((root collide-shape :override)) :method-count-assert 21 :size-assert #xc8 :flag-assert #x15005000c8 @@ -62766,28 +63383,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 @@ -62796,34 +63411,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) ) @@ -62832,13 +63445,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 @@ -62847,49 +63458,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 ;; @@ -62901,7 +63511,6 @@ ;; wasstada-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype wasstada-states (structure) ((flame0 flames-state :inline :offset-assert 0) (flame1 flames-state :inline :offset-assert 8) @@ -62910,12 +63519,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 ;; @@ -62984,108 +63592,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) @@ -63094,115 +63720,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 @@ -63212,24 +63825,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 ;; @@ -63254,8 +63866,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 ;; @@ -63398,115 +64010,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 + active ;; 34 + notice ;; 35 hostile ;; 38 + victory ;; 39 attack ;; 190 - active ;; 34 backup ;; 191 - notice ;; 35 + ) + (: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 @@ -63514,54 +64129,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) @@ -63575,61 +64190,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) + active ;; 34 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 + 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 @@ -63638,30 +64258,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 @@ -63672,121 +64288,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) @@ -63796,74 +64404,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 @@ -63871,74 +64482,81 @@ 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 + active ;; 15 go-down ;; 37 + done ;; 38 wait-start ;; 39 - active ;; 15 ) ) -|# -#| (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 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| +;; +++target-ladder:ladder-options +(defenum ladder-options + :type uint32 + :bitfield #t + (lo0 0) + (lo1 1) + (lo2 2) + (nodraw 3) + ) +;; ---target-ladder:ladder-options + (deftype ladder-info (basic) - ((ladder uint64 :offset-assert 8) - (flip deg :offset-assert 16) + ((ladder handle :offset-assert 8) + (flip degrees :offset-assert 16) (interp float :offset-assert 20) (start-mat matrix :inline :offset-assert 32) ) @@ -63946,47 +64564,38 @@ :size-assert #x60 :flag-assert #x900000060 ) -|# -;; (define-extern *ladder-mods* object) -;; (define-extern target-ladder-stance object) -;; (define-extern target-ladder-walk-up object) -;; (define-extern target-ladder-walk-down object) -;; (define-extern target-ladder-slide-down object) -;; (define-extern target-ladder-switch object) -;; (define-extern target-ladder-jump-off object) +(define-extern *ladder-mods* surface) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ladder ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype ladder (process-drawable) - ((rider-unit float :offset-assert 200) - (rider-time uint64 :offset-assert 208) + ((root collide-shape :override) + (rider-unit float :offset-assert 200) + (rider-time time-frame :offset-assert 208) (art-height meters :offset-assert 216) (set-height meters :offset-assert 220) (meters-per-unit meters :offset-assert 224) (meters-per-rung meters :offset-assert 228) - (options uint32 :offset-assert 232) + (options ladder-options :offset-assert 232) ) :method-count-assert 27 :size-assert #xec :flag-assert #x1b007000ec - (:methods - (ladder-method-22 () none) ;; 22 - (ladder-method-23 () none) ;; 23 - (ladder-method-24 () none) ;; 24 - (ladder-method-25 () none) ;; 25 - (ladder-method-26 () none) ;; 26 - ) (:state-methods - active ;; 21 idle ;; 20 + (active handle) ;; 21 + ) + (:methods + (init-collision! (_type_) none) ;; 22 + (init-skel! (_type_) none) ;; 23 + (init-params! (_type_) none) ;; 24 + (ladder-method-25 (_type_ matrix float) matrix) ;; 25 + (nop (_type_) none) ;; 26 ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; lfaccity-mood ;; @@ -64332,10 +64941,9 @@ ;; forest-obs-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype shaker (structure) ((axis vector :inline :offset-assert 0) - (start-time uint64 :offset-assert 16) ;; time-frame + (start-time time-frame :offset-assert 16) ;; time-frame (decay-time float :offset-assert 24) (amplitude float :offset-assert 28) (freq float :offset-assert 32) @@ -64349,209 +64957,186 @@ :size-assert #x38 :flag-assert #xa00000038 (:methods - (shaker-method-9 () none) ;; 9 ;; (shaker-method-9 (_type_) none) + (shaker-method-9 (_type_) none) ) ) -|# ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 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) @@ -64562,37 +65147,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 @@ -64601,9 +65182,7 @@ complete ;; 22 ) ) -|# -#| (deftype shoulder-plates (process-drawable) () :method-count-assert 21 @@ -64613,81 +65192,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 @@ -64696,97 +65263,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 ;; @@ -64800,149 +65357,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 @@ -64952,47 +65495,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 @@ -65001,23 +65540,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 ;; @@ -65090,9 +65626,8 @@ ;; turtle-training ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype des-train-bollard (process-drawable) - () + ((root collide-shape :override)) :method-count-assert 21 :size-assert #xc8 :flag-assert #x15005000c8 @@ -65100,9 +65635,7 @@ idle ;; 20 ) ) -|# -#| (deftype des-train-barrier (process-drawable) () :method-count-assert 21 @@ -65112,9 +65645,7 @@ idle ;; 20 ) ) -|# -#| (deftype des-train-stones (process-drawable) () :method-count-assert 21 @@ -65124,9 +65655,7 @@ idle ;; 20 ) ) -|# -#| (deftype turtle-training-goal (structure) ((pos vector :inline :offset-assert 0) ) @@ -65134,42 +65663,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) @@ -65180,15 +65702,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) @@ -65199,53 +65719,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) ) @@ -65253,13 +65778,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) @@ -65268,21 +65791,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 @@ -65291,11 +65810,9 @@ active ;; 15 ) ) -|# -#| (deftype des-rally-bollard (process-drawable) - () + ((root collide-shape :override)) :method-count-assert 21 :size-assert #xc8 :flag-assert #x15005000c8 @@ -65303,12 +65820,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 @@ -65317,16 +65832,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 ;; @@ -65337,17 +65858,16 @@ ;; flut ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *flut-shadow-control* shadow-control) -;; (define-extern *flut-color-table* array) -;; (define-extern flut-color-from-index function) -;; (define-extern flut-random-color-index function) -;; (define-extern flut-init function) +(define-extern *flut-shadow-control* shadow-control) +(define-extern *flut-color-table* (array rgbaf)) +(define-extern flut-color-from-index (function int none :behavior flut)) +(define-extern flut-random-color-index (function int)) +(define-extern flut-init (function entity-actor transformq handle flut-flag symbol object :behavior flut)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; target-flut ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype flut-bank (basic) ((jump-height-min meters :offset-assert 4) (jump-height-max meters :offset-assert 8) @@ -65360,100 +65880,85 @@ :size-assert #x20 :flag-assert #x900000020 ) -|# -;; (define-extern *FLUT-bank* flut-bank) -;; (define-extern *flut-walk-mods* surface) -;; (define-extern *flut-run-racer-mods* surface) -;; (define-extern *flut-run-wild-mods* surface) -;; (define-extern *flut-jump-wild-mods* surface) -;; (define-extern *flut-jump-mods* surface) -;; (define-extern *flut-jump-racer-mods* surface) -;; (define-extern *flut-double-jump-mods* surface) -;; (define-extern *flut-double-jump-racer-mods* surface) -;; (define-extern *flut-run-attack-mods* surface) -;; (define-extern *flut-air-attack-mods* surface) -;; (define-extern flut-leg-ik-callback function) -;; (define-extern flut-update-ik function) -;; (define-extern target-flut-get-off? function) -;; (define-extern target-flut-post-post function) -;; (define-extern target-flut-wild-post function) -;; (define-extern target-flut-post function) -;; (define-extern target-flut-falling-anim-trans function) -;; (define-extern target-flut-hit-ground-anim function) -;; (define-extern target-flut-standard-event-handler function) -;; (define-extern target-flut-dangerous-event-handler function) -;; (define-extern target-fldax-enter function) -;; (define-extern target-fldax-exit function) -;; (define-extern target-flut-run-wild object) -;; (define-extern *flut-get-off-mods* object) +(define-extern *FLUT-bank* flut-bank) +(define-extern *flut-walk-mods* surface) +(define-extern *flut-run-racer-mods* surface) +(define-extern *flut-run-wild-mods* surface) +(define-extern *flut-jump-wild-mods* surface) +(define-extern *flut-jump-mods* surface) +(define-extern *flut-jump-racer-mods* surface) +(define-extern *flut-double-jump-mods* surface) +(define-extern *flut-double-jump-racer-mods* surface) +(define-extern *flut-run-attack-mods* surface) +(define-extern *flut-air-attack-mods* surface) +(define-extern flut-leg-ik-callback (function joint-mod-ik object object vector none)) +(define-extern flut-update-ik (function object :behavior target)) +(define-extern target-flut-get-off? (function symbol :behavior target)) +(define-extern target-flut-post-post (function none :behavior target)) +(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 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)) +(define-extern target-fldax-exit (function object :behavior target)) +(define-extern *flut-get-off-mods* surface) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ctymark-obs-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype market-object (crate) - ((sound-explode basic :offset-assert 288) - (part-explode basic :offset-assert 292) + ((sound-explode sound-spec :offset-assert 288) + (part-explode sparticle-launch-group :offset-assert 292) (explode-matrix matrix :inline :offset-assert 304) ) :method-count-assert 43 :size-assert #x170 :flag-assert #x2b00f00170 (:state-methods - die ;; 30 idle ;; 29 + ;; (die symbol int) ;; 30 ) ) -|# -#| (deftype market-basket-a (market-object) () :method-count-assert 43 :size-assert #x170 :flag-assert #x2b00f00170 ) -|# -#| (deftype market-basket-b (market-object) () :method-count-assert 43 :size-assert #x170 :flag-assert #x2b00f00170 ) -|# -#| (deftype market-crate (market-object) () :method-count-assert 43 :size-assert #x170 :flag-assert #x2b00f00170 ) -|# -#| (deftype market-sack-a (market-object) () :method-count-assert 43 :size-assert #x170 :flag-assert #x2b00f00170 ) -|# -#| (deftype market-sack-b (market-object) () :method-count-assert 43 :size-assert #x170 :flag-assert #x2b00f00170 ) -|# -#| (deftype fruit-stand (process-focusable) ((incoming-attack-id uint32 :offset-assert 208) (hack-counter uint32 :offset-assert 212) @@ -65461,31 +65966,32 @@ (first-sparts uint32 :offset-assert 220) (num-sparts uint32 :offset-assert 224) (sparts-index uint32 4 :offset-assert 228) ;; guessed by decompiler - (sparts-pos vector 4 :offset-assert 256) ;; guessed by decompiler - (parts-alive? basic :offset-assert 320) + (sparts-pos vector 4 :inline :offset-assert 256) ;; guessed by decompiler + (parts-alive? symbol :offset-assert 320) ) :method-count-assert 31 :size-assert #x144 :flag-assert #x1f00d00144 + (:state-methods + idle ;; 28 + ) (:methods - (fruit-stand-method-28 () none) ;; 28 ;; (fruit-stand-method-28 (_type_) none) - (fruit-stand-method-29 () none) ;; 29 ;; (fruit-stand-method-29 (_type_) none) - (fruit-stand-method-30 () none) ;; 30 + (fruit-stand-method-29 (_type_) none) ;; 29 + (fruit-stand-method-30 (_type_) none) ;; 30 ) ) -|# ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ctymark-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern check-market-piece-ground function) ;; (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none) -;; (define-extern market-activate function) ;; (function level none) -;; (define-extern *fruit-check-ground-counter* object) ;; int -;; (define-extern fruit-check-ground-bounce function) ;; (function sparticle-system sparticle-cpuinfo sparticle-launchinfo matrix float) -;; (define-extern fruit-sparticle-next-on-mode-1 function) ;; (function sparticle-system sparticle-cpuinfo sparticle-launchinfo float) -;; (define-extern fruit-stand-event-handler function) ;; (function process int symbol event-message-block object :behavior fruit-stand) +(define-extern check-market-piece-ground (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern market-activate (function level none)) +(define-extern *fruit-check-ground-counter* int) +(define-extern fruit-check-ground-bounce (function sparticle-system sparticle-cpuinfo sparticle-launchinfo matrix float)) +(define-extern fruit-sparticle-next-on-mode-1 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo float)) +(define-extern fruit-stand-event-handler (function process int symbol event-message-block object :behavior fruit-stand)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wasteland-scenes ;; @@ -65633,76 +66139,75 @@ ;; 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 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern spt-birth-func-brightness-sat-scrape-dirt function) -;; (define-extern spt-birth-func-part-sat-scrape-dirt function) -;; (define-extern spt-birth-func-part-sat-scrape-rocks function) -;; (define-extern *range-sat-explo-scene-color* curve-color-fast) -;; (define-extern *range-sat-explo-scene-alpha* curve2d-fast) -;; (define-extern *range-sat-explo-scene-scale-x* curve2d-fast) -;; (define-extern *range-sat-explo-scene-scale-y* curve2d-fast) -;; (define-extern *curve-sat-explo-scene-alpha* curve2d-fast) -;; (define-extern *curve-sat-explo-scene-scale-x* curve2d-fast) -;; (define-extern *curve-sat-explo-scene-scale-y* curve2d-fast) -;; (define-extern *part-neo-satellite-explosion-texture-scene-curve-settings* object) -;; (define-extern *range-color-wascity-palace-fire-beacon-flame* curve-color-fast) -;; (define-extern *range-alpha-wascity-palace-fire-beacon-flame* curve2d-fast) -;; (define-extern *range-scale-wascity-palace-fire-beacon-flame-x* curve2d-fast) -;; (define-extern *range-scale-wascity-palace-fire-beacon-flame-y* curve2d-fast) -;; (define-extern *r-curve-wascity-palace-fire-beacon-flame* curve2d-fast) -;; (define-extern *g-curve-wascity-palace-fire-beacon-flame* curve2d-fast) -;; (define-extern *b-curve-wascity-palace-fire-beacon-flame* curve2d-fast) -;; (define-extern *curve-alpha-wascity-palace-fire-beacon-flame* curve2d-fast) -;; (define-extern *curve-wascity-palace-fire-beacon-flame-x* curve2d-fast) -;; (define-extern *curve-wascity-palace-fire-beacon-flame-y* curve2d-fast) -;; (define-extern *part-wascity-palace-fire-beacon-flame-curve-settings* object) -;; (define-extern *range-wrsplash-color* curve-color-fast) -;; (define-extern *range-wrsplash-alpha* curve2d-fast) -;; (define-extern *range-wrsplash-scale-x* curve2d-fast) -;; (define-extern *range-wrsplash-scale-y* curve2d-fast) -;; (define-extern *curve-wrsplash-alpha* curve2d-fast) -;; (define-extern *curve-wrsplash-scale-x* curve2d-fast) -;; (define-extern *curve-wrsplash-scale-y* curve2d-fast) -;; (define-extern *part-water-rocks-splash-curve-settings* object) -;; (define-extern part-wascityb-bird1-path function) -;; (define-extern part-wascityb-bird2-path function) -;; (define-extern part-wascityb-bird3-path function) -;; (define-extern part-wascityb-bird4-path function) -;; (define-extern part-wascityb-bird5-path function) -;; (define-extern part-wascityb-bird6-path function) -;; (define-extern part-wascityb-bird7-path function) -;; (define-extern part-wascityb-bird8-path function) -;; (define-extern part-wascityb-bird9-path function) -;; (define-extern part-wascityb-bird10-path function) -;; (define-extern part-wascitya-fly1-path function) -;; (define-extern part-wascitya-fly2-path function) -;; (define-extern part-wascitya-fly3-path function) -;; (define-extern *range-color-flame* curve-color-fast) -;; (define-extern *range-alpha-flame* curve2d-fast) -;; (define-extern *range-scale-flame-x* curve2d-fast) -;; (define-extern *range-scale-flame-y* curve2d-fast) -;; (define-extern *r-curve-flame* curve2d-fast) -;; (define-extern *g-curve-flame* curve2d-fast) -;; (define-extern *b-curve-flame* curve2d-fast) -;; (define-extern *curve-alpha-flame* curve2d-fast) -;; (define-extern *curve-flame-x* curve2d-fast) -;; (define-extern *curve-flame-y* curve2d-fast) -;; (define-extern *part-gas-lamp-flame-curve-settings* object) -;; (define-extern *part-talltorch-flame-curve-settings* object) +(define-extern spt-birth-func-brightness-sat-scrape-dirt (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-part-sat-scrape-dirt (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-sat-scrape-rocks (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern *range-sat-explo-scene-color* curve-color-fast) +(define-extern *range-sat-explo-scene-alpha* curve2d-fast) +(define-extern *range-sat-explo-scene-scale-x* curve2d-fast) +(define-extern *range-sat-explo-scene-scale-y* curve2d-fast) +(define-extern *curve-sat-explo-scene-alpha* curve2d-fast) +(define-extern *curve-sat-explo-scene-scale-x* curve2d-fast) +(define-extern *curve-sat-explo-scene-scale-y* curve2d-fast) +(define-extern *part-neo-satellite-explosion-texture-scene-curve-settings* particle-curve-settings) +(define-extern *range-color-wascity-palace-fire-beacon-flame* curve-color-fast) +(define-extern *range-alpha-wascity-palace-fire-beacon-flame* curve2d-fast) +(define-extern *range-scale-wascity-palace-fire-beacon-flame-x* curve2d-fast) +(define-extern *range-scale-wascity-palace-fire-beacon-flame-y* curve2d-fast) +(define-extern *r-curve-wascity-palace-fire-beacon-flame* curve2d-fast) +(define-extern *g-curve-wascity-palace-fire-beacon-flame* curve2d-fast) +(define-extern *b-curve-wascity-palace-fire-beacon-flame* curve2d-fast) +(define-extern *curve-alpha-wascity-palace-fire-beacon-flame* curve2d-fast) +(define-extern *curve-wascity-palace-fire-beacon-flame-x* curve2d-fast) +(define-extern *curve-wascity-palace-fire-beacon-flame-y* curve2d-fast) +(define-extern *part-wascity-palace-fire-beacon-flame-curve-settings* particle-curve-settings) +(define-extern *range-wrsplash-color* curve-color-fast) +(define-extern *range-wrsplash-alpha* curve2d-fast) +(define-extern *range-wrsplash-scale-x* curve2d-fast) +(define-extern *range-wrsplash-scale-y* curve2d-fast) +(define-extern *curve-wrsplash-alpha* curve2d-fast) +(define-extern *curve-wrsplash-scale-x* curve2d-fast) +(define-extern *curve-wrsplash-scale-y* curve2d-fast) +(define-extern *part-water-rocks-splash-curve-settings* particle-curve-settings) +(define-extern part-wascityb-bird1-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-wascityb-bird2-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-wascityb-bird3-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-wascityb-bird4-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-wascityb-bird5-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-wascityb-bird6-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-wascityb-bird7-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-wascityb-bird8-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-wascityb-bird9-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-wascityb-bird10-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-wascitya-fly1-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-wascitya-fly2-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-wascitya-fly3-path (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern *range-color-flame* curve-color-fast) +(define-extern *range-alpha-flame* curve2d-fast) +(define-extern *range-scale-flame-x* curve2d-fast) +(define-extern *range-scale-flame-y* curve2d-fast) +(define-extern *r-curve-flame* curve2d-fast) +(define-extern *g-curve-flame* curve2d-fast) +(define-extern *b-curve-flame* curve2d-fast) +(define-extern *curve-alpha-flame* curve2d-fast) +(define-extern *curve-flame-x* curve2d-fast) +(define-extern *curve-flame-y* curve2d-fast) +(define-extern *part-gas-lamp-flame-curve-settings* particle-curve-settings) +(define-extern *part-talltorch-flame-curve-settings* particle-curve-settings) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; waswide-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype wascity-windmill (process-drawable) ((quat quaternion :inline :offset-assert 208) ) @@ -65713,61 +66218,49 @@ idle ;; 20 ) ) -|# -#| (deftype wascity-flag-base (process-drawable) () :method-count-assert 23 :size-assert #xc8 :flag-assert #x17005000c8 - (:methods - (wascity-flag-base-method-21 () none) ;; 21 - (wascity-flag-base-method-22 () none) ;; 22 - ) (:state-methods idle ;; 20 ) + (:methods + (get-skel (_type_) art-group) ;; 21 + (wascity-flag-base-method-22 (_type_) none) ;; 22 + ) ) -|# -#| (deftype wascity-flag-a (wascity-flag-base) () :method-count-assert 23 :size-assert #xc8 :flag-assert #x17005000c8 ) -|# -#| (deftype wascity-flag-b (wascity-flag-base) () :method-count-assert 23 :size-assert #xc8 :flag-assert #x17005000c8 ) -|# -#| (deftype wascity-flag-c (wascity-flag-base) () :method-count-assert 23 :size-assert #xc8 :flag-assert #x17005000c8 ) -|# -#| (deftype wascity-flag-d (wascity-flag-base) () :method-count-assert 23 :size-assert #xc8 :flag-assert #x17005000c8 ) -|# -#| (deftype wascity-wind-fan (process-drawable) ((quat quaternion :inline :offset-assert 208) ) @@ -65778,86 +66271,70 @@ idle ;; 20 ) ) -|# ;; shaker is already defined! -#| (deftype wascity-cactus (process-focusable) - ((shakers UNKNOWN 6 :offset-assert 208) + ((shakers shaker 6 :inline :offset-assert 208) (incoming-attack-id uint32 :offset-assert 592) - (incoming-attack-time uint64 :offset-assert 600) + (incoming-attack-time time-frame :offset-assert 600) (hit-points float :offset-assert 608) ) :method-count-assert 32 :size-assert #x264 :flag-assert #x2001f00264 - (:methods - (wascity-cactus-method-30 () none) ;; 30 - (wascity-cactus-method-31 () none) ;; 31 - ) (:state-methods idle ;; 28 die ;; 29 ) + (:methods + (wascity-cactus-method-30 (_type_) none) ;; 30 + (wascity-cactus-method-31 (_type_) none) ;; 31 + ) ) -|# -#| (deftype wascity-market-crate (market-crate) () :method-count-assert 43 :size-assert #x170 :flag-assert #x2b00f00170 ) -|# -#| (deftype wascity-market-basket-a (market-basket-a) () :method-count-assert 43 :size-assert #x170 :flag-assert #x2b00f00170 ) -|# -#| (deftype wascity-market-basket-b (market-basket-b) () :method-count-assert 43 :size-assert #x170 :flag-assert #x2b00f00170 ) -|# -#| (deftype wascity-market-sack-a (market-sack-a) () :method-count-assert 43 :size-assert #x170 :flag-assert #x2b00f00170 ) -|# -#| (deftype wascity-market-sack-b (market-sack-b) () :method-count-assert 43 :size-assert #x170 :flag-assert #x2b00f00170 ) -|# -#| (deftype wascity-fruit-stand (fruit-stand) () :method-count-assert 31 :size-assert #x144 :flag-assert #x1f00d00144 ) -|# -#| (deftype wascity-water-pump (process-drawable) () :method-count-assert 21 @@ -65867,112 +66344,101 @@ idle ;; 20 ) ) -|# -#| (deftype wascity-awning-a (bouncer) () :method-count-assert 27 :size-assert #xd8 :flag-assert #x1b006000d8 ) -|# -#| (deftype wascity-awning-b (bouncer) () :method-count-assert 27 :size-assert #xd8 :flag-assert #x1b006000d8 ) -|# -#| (deftype monk-npc (process-taskable) () :method-count-assert 40 :size-assert #x118 :flag-assert #x2800a00118 ) -|# -;; (define-extern wascity-windmill-callback function) -;; (define-extern *wascity-cactus-exploder-params* joint-exploder-static-params) -;; (define-extern wascity-cactus-callback function) +(define-extern wascity-windmill-callback (function cspace transformq none)) +(define-extern *wascity-cactus-exploder-params* joint-exploder-static-params) +(define-extern wascity-cactus-callback (function cspace transformq none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 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 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype dogat (nav-enemy) ((rotation-matrix matrix :inline :offset-assert 624) - (scared-timer uint64 :offset-assert 688) + (scared-timer time-frame :offset-assert 688) ) :method-count-assert 192 :size-assert #x2b8 :flag-assert #xc0024002b8 - (:methods - (dogat-method-191 () none) ;; 191 - ) (:state-methods - flee ;; 36 - notice ;; 35 + idle ;; 33 active ;; 34 + notice ;; 35 + flee ;; 36 sit-idle ;; 190 - idle ;; 33 + ) + (:methods + (dogat-method-191 (_type_) none) ;; 191 ) ) -|# -;; (define-extern *dogat-nav-enemy-info* nav-enemy-info) -;; (define-extern dogat-travel-post function) +(define-extern *dogat-nav-enemy-info* nav-enemy-info) +(define-extern dogat-travel-post (function none :behavior dogat)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; blow-tower-shared ;; @@ -67938,10 +68404,9 @@ ;; target-tube ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype tube-info (basic) - ((entity basic :offset-assert 4) - (tube uint64 :offset-assert 8) ;; handle + ((entity entity :offset-assert 4) + (tube handle :offset-assert 8) ;; handle (downhill vector :inline :offset-assert 16) (centertube vector :inline :offset-assert 32) (downtube vector :inline :offset-assert 48) @@ -67950,7 +68415,7 @@ (old-transv vector :inline :offset-assert 96) (mod-x float :offset-assert 112) (mod-y float :offset-assert 116) - (start-time uint64 :offset-assert 120) ;; time-frame + (start-time time-frame :offset-assert 120) ;; time-frame (turn-anim-targ float :offset-assert 128) (turn-anim-frame float :offset-assert 132) (turn-anim-vel float :offset-assert 136) @@ -67962,20 +68427,16 @@ :size-assert #x98 :flag-assert #x900000098 ) -|# -#| (deftype tube-bank (basic) () :method-count-assert 9 :size-assert #x4 :flag-assert #x900000004 ) -|# -#| (deftype slide-control (process-drawable) - ((target uint64 :offset-assert 200) ;; handle + ((target handle :offset-assert 200) ;; handle (pos float :offset-assert 208) (trans vector :inline :offset-assert 224) (rot vector :inline :offset-assert 240) @@ -67985,27 +68446,23 @@ :size-assert #x110 :flag-assert #x1600900110 (:state-methods - slide-control-ride ;; 21, old: (slide-control-ride () _type_ :state) - slide-control-watch ;; 20, old: (slide-control-watch () _type_ :state) + slide-control-watch ;; 20 + slide-control-ride ;; 21 ) ) -|# -;; (define-extern *tube-mods* surface) ;; surface -;; (define-extern *tube-jump-mods* surface) ;; surface -;; (define-extern *tube-hit-mods* surface) ;; surface -;; (define-extern *tube-surface* surface) ;; surface -;; (define-extern *TUBE-bank* tube-bank) ;; tube-bank -;; (define-extern tube-sounds function) ;; (function sound-id :behavior target) -;; (define-extern tube-thrust function) ;; (function float float none :behavior target) -;; (define-extern target-tube-post function) ;; (function none :behavior target) -;; (define-extern target-tube-turn-anim function) ;; (function none :behavior target) -;; (define-extern target-tube-walk object) -;; (define-extern target-tube-jump object) ;; (state float float target) -;; (define-extern target-tube-hit object) ;; (state symbol attack-info target) -;; (define-extern target-tube-death object) ;; (state symbol target) -;; (define-extern distance-from-tangent function) ;; (function path-control float vector vector vector vector float) -;; (define-extern find-target-point function) ;; (function vector float :behavior slide-control) +(define-extern *tube-mods* surface) +(define-extern *tube-jump-mods* surface) +(define-extern *tube-hit-mods* surface) +(define-extern *tube-surface* surface) +(define-extern *TUBE-bank* tube-bank) +(define-extern tube-sounds (function sound-id :behavior target)) +(define-extern tube-thrust (function float float none :behavior target)) +(define-extern target-tube-post (function none :behavior target)) +(define-extern target-tube-turn-anim (function none :behavior target)) + +(define-extern distance-from-tangent (function path-control float vector vector vector vector float)) +(define-extern find-target-point (function vector float :behavior slide-control)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; precurc-part ;; @@ -68138,9 +68595,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) @@ -68152,11 +68608,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 ;; @@ -69012,19 +69467,19 @@ ;; 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 mark-permanent-holds function) -;; (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-expand-want-list 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 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)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ctywide-init ;; @@ -69533,7 +69988,6 @@ ;; mhcity-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype bubbles-path (process-drawable) () :method-count-assert 22 @@ -69544,67 +69998,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) @@ -69615,17 +70058,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 @@ -69635,9 +70076,7 @@ idle ;; 31 ) ) -|# -#| (deftype mhcity-vein-writhing-small (mhcity-ambient-killable) () :method-count-assert 32 @@ -69647,9 +70086,7 @@ idle ;; 31 ) ) -|# -#| (deftype mhcity-claw-finger-small (mhcity-ambient-killable) ((twitch-speed float :offset-assert 228) (twitch-angle-current float :offset-assert 232) @@ -69664,9 +70101,7 @@ idle ;; 31 ) ) -|# -#| (deftype mhcity-twitch-blade (process-drawable) () :method-count-assert 21 @@ -69676,9 +70111,7 @@ idle ;; 20 ) ) -|# -#| (deftype mhcity-vine-wriggler (mhcity-ambient-killable) () :method-count-assert 32 @@ -69688,9 +70121,7 @@ idle ;; 31 ) ) -|# -#| (deftype mhcity-vine-wriggler-big (mhcity-ambient-killable) () :method-count-assert 32 @@ -69700,9 +70131,7 @@ idle ;; 31 ) ) -|# -#| (deftype mhcity-de-tower-undervines (mhcity-ambient-killable) () :method-count-assert 32 @@ -69712,9 +70141,7 @@ idle ;; 31 ) ) -|# -#| (deftype mhcity-grunt-egg-c (mhcity-ambient-killable) () :method-count-assert 32 @@ -69724,9 +70151,7 @@ idle ;; 31 ) ) -|# -#| (deftype mhcity-grunt-egg-b (mhcity-ambient-killable) () :method-count-assert 32 @@ -69736,9 +70161,7 @@ idle ;; 31 ) ) -|# -#| (deftype mhcity-grunt-egg-d (mhcity-ambient-killable) () :method-count-assert 32 @@ -69748,9 +70171,7 @@ idle ;; 31 ) ) -|# -#| (deftype mhcity-grunt-egg-a (mhcity-ambient-killable) () :method-count-assert 32 @@ -69760,18 +70181,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 @@ -69781,20 +70198,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) @@ -69805,21 +70219,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) @@ -69834,9 +70246,7 @@ :size-assert #x48 :flag-assert #x900000048 ) -|# -#| (deftype mhcity-puffer-large (mhcity-puffer) () :method-count-assert 35 @@ -69848,9 +70258,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 ;; @@ -69899,7 +70308,6 @@ ;; trail ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype trail-vis-work (structure) ((best-count uint32 :offset-assert 0) (best-dist float :offset-assert 4) @@ -69912,15 +70320,13 @@ :size-assert #xb0 :flag-assert #x9000000b0 ) -|# -;; (define-extern *trail-graph* object) ;; trail-graph +(define-extern *trail-graph* trail-graph) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; minee-scenes ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype minee-elevator (process-drawable) () :method-count-assert 21 @@ -69930,8 +70336,6 @@ idle ;; 20 ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; assault-shared ;; @@ -70732,71 +71136,64 @@ ;; 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 @@ -70804,24 +71201,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) @@ -70833,24 +71226,22 @@ :method-count-assert 193 :size-assert #x28c :flag-assert #xc10210028c - (:methods - (desert-lizard-method-192 () none) ;; 192 - ) (:state-methods - catching-daxter ;; 190 + notice ;; 35 flee ;; 36 + catching-daxter ;; 190 disappear ;; 191 - notice ;; 35 + ) + (: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 @@ -70859,60 +71250,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 @@ -70922,27 +71303,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 @@ -70950,61 +71327,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) @@ -71013,10 +71388,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 ;; @@ -71039,133 +71413,91 @@ ;; wasall-init ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *wasall-reserve* object) -;; (define-extern wasall-login function) -;; (define-extern wasall-logout function) -;; (define-extern wasall-activate function) -;; (define-extern wasall-deactivate function) -;; (define-extern desert-game-activate function) -;; (define-extern desert-race-level-activate function) -;; (define-extern desert-race-level-deactivate function) +(define-extern *wasall-reserve* symbol) +(define-extern wasall-login (function level none)) +(define-extern wasall-logout (function level none)) +(define-extern wasall-activate (function level none)) +(define-extern wasall-deactivate (function level none)) +(define-extern desert-game-activate (function level none)) +(define-extern desert-race-level-activate (function level none)) +(define-extern desert-race-level-deactivate (function level none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wasall-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern spt-birth-func-brightness-buggy-dirt-bits function) -;; (define-extern spt-birth-func-part-buggy-dirt-bits function) -;; (define-extern spt-birth-func-part-buggy-skid-bits function) -;; (define-extern *wasdoors-range-color-flame* curve-color-fast) -;; (define-extern *wasdoors-range-alpha-flame* curve2d-fast) -;; (define-extern *wasdoors-range-scale-flame-x* curve2d-fast) -;; (define-extern *wasdoors-range-scale-flame-y* curve2d-fast) -;; (define-extern *r-wasdoors-curve-flame* curve2d-fast) -;; (define-extern *g-wasdoors-curve-flame* curve2d-fast) -;; (define-extern *b-wasdoors-curve-flame* curve2d-fast) -;; (define-extern *wasdoors-curve-alpha-flame* curve2d-fast) -;; (define-extern *wasdoors-curve-flame-x* curve2d-fast) -;; (define-extern *wasdoors-curve-flame-y* curve2d-fast) -;; (define-extern *part-wasdoors-gas-lamp-flame-curve-settings* object) -;; (define-extern spt-birth-func-brightness-part-desert-boss-slide-dust function) +(define-extern spt-birth-func-brightness-buggy-dirt-bits (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-part-buggy-dirt-bits (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-buggy-skid-bits (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern *wasdoors-range-color-flame* curve-color-fast) +(define-extern *wasdoors-range-alpha-flame* curve2d-fast) +(define-extern *wasdoors-range-scale-flame-x* curve2d-fast) +(define-extern *wasdoors-range-scale-flame-y* curve2d-fast) +(define-extern *r-wasdoors-curve-flame* curve2d-fast) +(define-extern *g-wasdoors-curve-flame* curve2d-fast) +(define-extern *b-wasdoors-curve-flame* curve2d-fast) +(define-extern *wasdoors-curve-alpha-flame* curve2d-fast) +(define-extern *wasdoors-curve-flame-x* curve2d-fast) +(define-extern *wasdoors-curve-flame-y* curve2d-fast) +(define-extern *part-wasdoors-gas-lamp-flame-curve-settings* particle-curve-settings) +(define-extern spt-birth-func-brightness-part-desert-boss-slide-dust (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; wasall-obs ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype wascity-airlock (com-airlock) () :method-count-assert 30 :size-assert #x1b0 :flag-assert #x1e013001b0 ) -|# -#| (deftype wascity-airlock-small (com-airlock) () :method-count-assert 30 :size-assert #x1b0 :flag-assert #x1e013001b0 ) -|# -#| (deftype wascity-elevator-door (com-airlock) () :method-count-assert 30 :size-assert #x1b0 :flag-assert #x1e013001b0 - (:state-methods - open ;; 20 - ) ) -|# -#| (deftype tentacle (process-drawable) ((init-pos vector :inline :offset-assert 208) (focus-pos vector :inline :offset-assert 224) - (nav-mesh basic :offset-assert 240) - (active-timer uint64 :offset-assert 248) + (nav-mesh nav-mesh :offset-assert 240) + (active-timer time-frame :offset-assert 248) (fade-level float :offset-assert 256) - (sound-id-loop uint32 :offset-assert 260) - (sound-id-attack uint32 :offset-assert 264) + (sound-id-loop sound-id :offset-assert 260) + (sound-id-attack sound-id :offset-assert 264) ) :method-count-assert 26 :size-assert #x10c :flag-assert #x1a0090010c (:state-methods - wait ;; 25 - kill-player ;; 24 - attacking-1 ;; 23 - attacking-0 ;; 22 - un-dive-player ;; 21 dormant ;; 20 + un-dive-player ;; 21 + attacking-0 ;; 22 + attacking-1 ;; 23 + kill-player ;; 24 + wait ;; 25 ) ) -|# -;; (define-extern tentacle-follow-post function) -;; (define-extern tentacle-attack-handler function) +(define-extern tentacle-follow-post (function none :behavior tentacle)) +(define-extern tentacle-attack-handler (function process int symbol event-message-block object :behavior tentacle)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; 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 @@ -71173,12 +71505,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) ) @@ -71186,13 +71516,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 @@ -71202,9 +71530,7 @@ active ;; 15 ) ) -|# -#| (deftype task-manager-temple-tests (task-manager-temple) () :method-count-assert 34 @@ -71214,23 +71540,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 @@ -71240,9 +71562,7 @@ active ;; 15 ) ) -|# -#| (deftype task-manager-vehicle-training-2 (task-manager) () :method-count-assert 32 @@ -71252,18 +71572,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 @@ -71273,9 +71589,7 @@ active ;; 15 ) ) -|# -#| (deftype task-manager-highlight-vehicle-wait (task-manager) () :method-count-assert 32 @@ -71285,9 +71599,7 @@ active ;; 15 ) ) -|# -#| (deftype task-manager-vehicle-wait (task-manager) () :method-count-assert 32 @@ -71297,9 +71609,7 @@ active ;; 15 ) ) -|# -#| (deftype task-manager-lock-wasdoors (task-manager) () :method-count-assert 32 @@ -71309,68 +71619,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) @@ -71379,9 +71677,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) @@ -71390,9 +71686,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) @@ -71402,12 +71696,11 @@ :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 ;; @@ -72268,81 +72561,78 @@ ;; mined-mood ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype mined-states (structure) - ((filter UNKNOWN 2 :offset-assert 0) - (light UNKNOWN 2 :offset-assert 32) + ((filter vector 2 :inline :offset-assert 0) + (light light-sphere 2 :offset-assert 32) ) :method-count-assert 9 :size-assert #x28 :flag-assert #x900000028 ) -|# -;; (define-extern set-mined-filter-light! function) -;; (define-extern init-mood-mined function) -;; (define-extern update-mood-mined function) -;; (define-extern set-mined-filter! function) +(define-extern set-mined-filter-light! (function string light-hash vector light-sphere light-sphere)) +(define-extern init-mood-mined (function mood-context float)) +(define-extern update-mood-mined (function mood-context float int none :behavior time-of-day-proc)) +(define-extern set-mined-filter! (function vector int none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mined-texture ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *mined-tfrag-texture-anim-array* texture-anim-array) -;; (define-extern set-mined-pillar-texture! function) +(define-extern *mined-tfrag-texture-anim-array* texture-anim-array) +(define-extern set-mined-pillar-texture! (function float none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; prebot-part ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern birth-func-pillar-rocks-bounce function) -;; (define-extern spt-func-pillar-rocks-bounce1 function) -;; (define-extern spt-func-pillar-rocks-bounce2 function) -;; (define-extern spt-func-pillar-rocks-bounce3 function) -;; (define-extern spt-birth-func-brightness-prebot-eco-pillar-rocks function) -;; (define-extern spt-birth-func-brightness-prebot-eco-pillar-rocks2 function) -;; (define-extern spt-birth-func-brightness-prebot-eco-pillar-rocks3 function) -;; (define-extern spt-birth-func-part-prebot-eco-pillar-rocks function) -;; (define-extern spt-func-part-prebot-eco-pillar-rocks function) -;; (define-extern spt-birth-func-part-prebot-eco-pillar-rocks-bounce1 function) -;; (define-extern spt-func-part-prebot-eco-pillar-rocks-bounce1 function) -;; (define-extern spt-birth-func-part-prebot-eco-pillar-rocks-bounce2 function) -;; (define-extern *range-mine-boss-stuck-flame-color* curve-color-fast) -;; (define-extern *range-mine-boss-stuck-flame-alpha* curve2d-fast) -;; (define-extern *range-mine-boss-stuck-flame-scale-x* curve2d-fast) -;; (define-extern *range-mine-boss-stuck-flame-scale-y* curve2d-fast) -;; (define-extern *r-curve-mine-boss-stuck-flame* curve2d-fast) -;; (define-extern *g-curve-mine-boss-stuck-flame* curve2d-fast) -;; (define-extern *b-curve-mine-boss-stuck-flame* curve2d-fast) -;; (define-extern *curve-mine-boss-stuck-flame-alpha* curve2d-fast) -;; (define-extern *curve-mine-boss-stuck-flame-scale-x* curve2d-fast) -;; (define-extern *curve-mine-boss-stuck-flame-scale-y* curve2d-fast) -;; (define-extern *part-prebot-stuck-flame-curve-settings* object) -;; (define-extern *range-mine-boss-explo-color* curve-color-fast) -;; (define-extern *range-mine-boss-explo-alpha* curve2d-fast) -;; (define-extern *range-mine-boss-explo-scale-x* curve2d-fast) -;; (define-extern *range-mine-boss-explo-scale-y* curve2d-fast) -;; (define-extern *curve-mine-boss-explo-alpha* curve2d-fast) -;; (define-extern *curve-mine-boss-explo-scale-x* curve2d-fast) -;; (define-extern *curve-mine-boss-explo-scale-y* curve2d-fast) -;; (define-extern *part-prebot-chasm-explosion-texture-curve-settings* object) -;; (define-extern *range-final-mine-boss-explo-color* curve-color-fast) -;; (define-extern *range-final-mine-boss-explo-alpha* curve2d-fast) -;; (define-extern *range-final-mine-boss-explo-scale-x* curve2d-fast) -;; (define-extern *range-final-mine-boss-explo-scale-y* curve2d-fast) -;; (define-extern *curve-final-mine-boss-explo-alpha* curve2d-fast) -;; (define-extern *curve-final-mine-boss-explo-scale-x* curve2d-fast) -;; (define-extern *curve-final-mine-boss-explo-scale-y* curve2d-fast) -;; (define-extern *part-final-prebot-chasm-explosion-texture-curve-settings* object) -;; (define-extern spt-birth-func-brightness-prebot-pillar-shatter-rocks function) -;; (define-extern spt-birth-func-part-prebot-eco-pillar-shatter function) -;; (define-extern spt-func-part-prebot-eco-pillar-shatter function) +(define-extern birth-func-pillar-rocks-bounce (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-func-pillar-rocks-bounce1 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-func-pillar-rocks-bounce2 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-func-pillar-rocks-bounce3 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-brightness-prebot-eco-pillar-rocks (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-brightness-prebot-eco-pillar-rocks2 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-brightness-prebot-eco-pillar-rocks3 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern spt-birth-func-part-prebot-eco-pillar-rocks (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-part-prebot-eco-pillar-rocks (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-prebot-eco-pillar-rocks-bounce1 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-part-prebot-eco-pillar-rocks-bounce1 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-prebot-eco-pillar-rocks-bounce2 (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern *range-mine-boss-stuck-flame-color* curve-color-fast) +(define-extern *range-mine-boss-stuck-flame-alpha* curve2d-fast) +(define-extern *range-mine-boss-stuck-flame-scale-x* curve2d-fast) +(define-extern *range-mine-boss-stuck-flame-scale-y* curve2d-fast) +(define-extern *r-curve-mine-boss-stuck-flame* curve2d-fast) +(define-extern *g-curve-mine-boss-stuck-flame* curve2d-fast) +(define-extern *b-curve-mine-boss-stuck-flame* curve2d-fast) +(define-extern *curve-mine-boss-stuck-flame-alpha* curve2d-fast) +(define-extern *curve-mine-boss-stuck-flame-scale-x* curve2d-fast) +(define-extern *curve-mine-boss-stuck-flame-scale-y* curve2d-fast) +(define-extern *part-prebot-stuck-flame-curve-settings* particle-curve-settings) +(define-extern *range-mine-boss-explo-color* curve-color-fast) +(define-extern *range-mine-boss-explo-alpha* curve2d-fast) +(define-extern *range-mine-boss-explo-scale-x* curve2d-fast) +(define-extern *range-mine-boss-explo-scale-y* curve2d-fast) +(define-extern *curve-mine-boss-explo-alpha* curve2d-fast) +(define-extern *curve-mine-boss-explo-scale-x* curve2d-fast) +(define-extern *curve-mine-boss-explo-scale-y* curve2d-fast) +(define-extern *part-prebot-chasm-explosion-texture-curve-settings* particle-curve-settings) +(define-extern *range-final-mine-boss-explo-color* curve-color-fast) +(define-extern *range-final-mine-boss-explo-alpha* curve2d-fast) +(define-extern *range-final-mine-boss-explo-scale-x* curve2d-fast) +(define-extern *range-final-mine-boss-explo-scale-y* curve2d-fast) +(define-extern *curve-final-mine-boss-explo-alpha* curve2d-fast) +(define-extern *curve-final-mine-boss-explo-scale-x* curve2d-fast) +(define-extern *curve-final-mine-boss-explo-scale-y* curve2d-fast) +(define-extern *part-final-prebot-chasm-explosion-texture-curve-settings* particle-curve-settings) +(define-extern spt-birth-func-brightness-prebot-pillar-shatter-rocks (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-birth-func-part-prebot-eco-pillar-shatter (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) +(define-extern spt-func-part-prebot-eco-pillar-shatter (function sparticle-system sparticle-cpuinfo sparticle-launchinfo object object none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; prebot-setup ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype prebot-eco-pillar-launch-spec (structure) ((offset vector :offset-assert 0) (height float :offset-assert 4) @@ -72352,223 +72642,232 @@ :size-assert #x9 :flag-assert #x900000009 ) -|# -#| (deftype prebot-eco-pillar (process-drawable) - ((vulnerable basic :offset-assert 200) - (hot basic :offset-assert 204) + ((root collide-shape-moving :override) + (vulnerable symbol :offset-assert 200) + (hot symbol :offset-assert 204) (start-y float :offset-assert 208) (end-y float :offset-assert 212) - (heat-part basic :offset-assert 216) - (cool-part basic :offset-assert 220) + (heat-part sparticle-launch-control :offset-assert 216) + (cool-part sparticle-launch-control :offset-assert 220) ) :method-count-assert 26 :size-assert #xe0 :flag-assert #x1a006000e0 - (:methods - (prebot-eco-pillar-method-20 () none) ;; 20 - (prebot-eco-pillar-method-21 () none) ;; 21 - (prebot-eco-pillar-method-22 () none) ;; 22 - (prebot-eco-pillar-method-23 () none) ;; 23 - (prebot-eco-pillar-method-24 () none) ;; 24 - (prebot-eco-pillar-method-25 () none) ;; 25 + (:state-methods + wait-to-die ;; 20 + heat-up ;; 21 + grow ;; 22 + cool-down ;; 23 + wait-to-cool ;; 24 + idle ;; 25 ) ) -|# -#| (deftype cav-railblocker (process-focusable) ((incoming-attack-id uint32 :offset-assert 208) (hit-points float :offset-assert 212) - (notify-on-die basic :offset-assert 216) - (notify-on-die-2 basic :offset-assert 220) - (trackable basic :offset-assert 224) - (red-tip-change-time uint64 :offset-assert 232) - (alt-red-tip-on basic :offset-assert 240) + (notify-on-die entity :offset-assert 216) + (notify-on-die-2 entity :offset-assert 220) + (trackable symbol :offset-assert 224) + (red-tip-change-time time-frame :offset-assert 232) + (alt-red-tip-on symbol :offset-assert 240) ) :method-count-assert 31 :size-assert #xf4 :flag-assert #x1f008000f4 + (:state-methods + idle ;; 28 + fall ;; 29 + ) (:methods - (cav-railblocker-method-28 () none) ;; 28 - (cav-railblocker-method-29 () none) ;; 29 - (cav-railblocker-method-30 () none) ;; 30 + (cav-railblocker-method-30 (_type_ symbol) none) ;; 30 ) ) -|# -#| (deftype cav-minecar (process-drawable) () :method-count-assert 21 :size-assert #xc8 :flag-assert #x15005000c8 - (:methods - (cav-minecar-method-20 () none) ;; 20 + (:state-methods + idle ;; 20 ) ) -|# -#| +(declare-type prebot process-focusable) + (deftype prebot-sword (process-drawable) - ((prefix basic :offset-assert 200) + ((parent (pointer prebot) :override) + (root collide-shape-moving :override) + (prefix string :offset-assert 200) (blade-scale cam-float-seeker :inline :offset-assert 204) - (blade-jm basic :offset-assert 228) - (sword-sound uint32 :offset-assert 232) - (sword-sound-playing basic :offset-assert 236) + (blade-jm joint-mod :offset-assert 228) + (sword-sound sound-id :offset-assert 232) + (sword-sound-playing symbol :offset-assert 236) (prev-position vector :inline :offset-assert 240) - (use-pos-pitch basic :offset-assert 256) + (use-pos-pitch symbol :offset-assert 256) (old-target-dist float :offset-assert 260) - (alternate-sound basic :offset-assert 264) + (alternate-sound sound-spec :offset-assert 264) (whoosh-lead float :offset-assert 268) - (allow-whoosh basic :offset-assert 272) + (allow-whoosh symbol :offset-assert 272) (current-volume float :offset-assert 276) ) :method-count-assert 21 :size-assert #x118 :flag-assert #x1500a00118 - (:methods - (prebot-sword-method-20 () none) ;; 20 + (:state-methods + idle ;; 20 ) ) -|# -#| (deftype prebot-shockwave (process-drawable) () :method-count-assert 21 :size-assert #xc8 :flag-assert #x15005000c8 - (:methods - (prebot-shockwave-method-20 () none) ;; 20 + (:state-methods + idle ;; 20 ) ) -|# -#| (deftype prebot-gun (process-drawable) - ((prefix basic :offset-assert 200) + ((parent (pointer prebot) :override) + (root collide-shape-moving :override) + (prefix string :offset-assert 200) ) :method-count-assert 21 :size-assert #xcc :flag-assert #x15005000cc - (:methods - (prebot-gun-method-20 () none) ;; 20 + (:state-methods + idle ;; 20 ) ) -|# -#| (deftype prebot-tentacle (process-drawable) - ((prefix basic :offset-assert 200) - (aim-jm basic :offset-assert 204) - (half-aim-jm basic :offset-assert 208) - (laser-sound uint32 :offset-assert 212) - (laser-sound-playing basic :offset-assert 216) + ((parent (pointer prebot) :override) + (root collide-shape-moving :override) + (prefix string :offset-assert 200) + (aim-jm joint-mod-polar-look-at :offset-assert 204) + (half-aim-jm joint-mod-polar-look-at :offset-assert 208) + (laser-sound sound-id :offset-assert 212) + (laser-sound-playing symbol :offset-assert 216) ) :method-count-assert 21 :size-assert #xdc :flag-assert #x15006000dc - (:methods - (prebot-tentacle-method-20 () none) ;; 20 + (:state-methods + idle ;; 20 ) ) -|# -#| (deftype prebot-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 ) -|# -#| +;; +++prebot-setup:prebot-flag +(defenum prebot-flag + :type uint32 + :bitfield #t + (pf0 0) + (pf1 1) + (pf2 2) + (pf3 3) + (pf4 4) + (pf5 5) + (pf6 6) + (pf7 7) + (pf8 8) + ) +;; ---prebot-setup:prebot-flag + (deftype prebot (process-focusable) - ((critters UNKNOWN 28 :offset-assert 208) + ((critters handle 28 :offset-assert 208) (critters-to-launch int8 :offset-assert 432) - (gun uint64 :offset-assert 440) - (swords UNKNOWN 2 :offset-assert 448) - (tentacles UNKNOWN 5 :offset-assert 464) - (beam-projectile uint64 :offset-assert 504) - (pillars UNKNOWN 5 :offset-assert 512) + (gun handle :offset-assert 440) + (swords handle 2 :offset-assert 448) + (tentacles handle 5 :offset-assert 464) + (beam-projectile handle :offset-assert 504) + (pillars handle 5 :offset-assert 512) (original-position vector :inline :offset-assert 560) (position cam-vector-seeker :inline :offset-assert 576) (stage int8 :offset-assert 636) (stage-hit-points float :offset-assert 640) (last-attack-id uint32 :offset-assert 644) (neck-angle cam-float-seeker :inline :offset-assert 648) - (no-collision-timer uint64 :offset-assert 672) + (no-collision-timer time-frame :offset-assert 672) (num-attacks uint8 :offset-assert 680) - (shoulder-aim-jm basic :offset-assert 684) + (shoulder-aim-jm joint-mod-polar-look-at :offset-assert 684) (shot-extra-y float :offset-assert 688) (shot-extra-xz float :offset-assert 692) (which-movie int8 :offset-assert 696) (light-flash cam-vector-seeker :inline :offset-assert 704) (light-pulse oscillating-vector :inline :offset-assert 768) (light-pulse-flicker delayed-rand-vector :inline :offset-assert 832) - (laugh-played basic :offset-assert 880) - (grunt-played basic :offset-assert 884) - (trythis-played basic :offset-assert 888) - (laugh-timer uint64 :offset-assert 896) - (blocker uint64 :offset-assert 904) - (flags uint32 :offset-assert 912) - (pillar-hint-timer uint64 :offset-assert 920) - (minecar-hint-timer uint64 :offset-assert 928) - (ammo UNKNOWN 20 :offset-assert 944) + (laugh-played symbol :offset-assert 880) + (grunt-played symbol :offset-assert 884) + (trythis-played symbol :offset-assert 888) + (laugh-timer time-frame :offset-assert 896) + (blocker handle :offset-assert 904) + (flags prebot-flag :offset-assert 912) + (pillar-hint-timer time-frame :offset-assert 920) + (minecar-hint-timer time-frame :offset-assert 928) + (ammo prebot-ammo-tracker 20 :inline :offset-assert 944) ) :method-count-assert 47 :size-assert #x770 :flag-assert #x2f06f00770 + (:state-methods + beaten ;; 28 + play-fma ;; 29 + play-hit-movie ;; 30 + destroy-pillars ;; 31 + watch-pillars ;; 32 + create-pillars ;; 33 + activate-tentacles ;; 34 + watch-critters ;; 35 + launch-critters ;; 36 + sweep-done + sweep + slam-done + slam + pre-slam + jump-to-hover + hidden + test + ) (:methods - (prebot-method-28 () none) ;; 28 - (prebot-method-29 () none) ;; 29 - (prebot-method-30 () none) ;; 30 - (prebot-method-31 () none) ;; 31 - (prebot-method-32 () none) ;; 32 - (prebot-method-33 () none) ;; 33 - (prebot-method-34 () none) ;; 34 - (prebot-method-35 () none) ;; 35 - (prebot-method-36 () none) ;; 36 - (prebot-method-37 () none) ;; 37 - (prebot-method-38 () none) ;; 38 - (prebot-method-39 () none) ;; 39 - (prebot-method-40 () none) ;; 40 - (prebot-method-41 () none) ;; 41 - (prebot-method-42 () none) ;; 42 - (prebot-method-43 () none) ;; 43 - (prebot-method-44 () none) ;; 44 - (prebot-method-45 () none) ;; 45 - (prebot-method-46 () none) ;; 46 - ) - ) -|# - -;; (define-extern *cav-railblocker-exploder-params* joint-exploder-static-params) -;; (define-extern prebot-eco-pillar-init-by-other function) -;; (define-extern *prebot-sword-color-curve* object) -;; (define-extern *prebot-sword-white-red-curve* object) -;; (define-extern *prebot-sword-width-curve* curve2d-fast) -;; (define-extern *prebot-sword-color-array* object) -;; (define-extern prebot-sword-init-by-other function) -;; (define-extern prebot-shockwave-init-by-other function) -;; (define-extern prebot-gun-init-by-other function) -;; (define-extern prebot-tentacle-init-by-other function) + (prebot-method-45 (_type_) none) ;; 45 + (prebot-method-46 (_type_) none) ;; 46 + ) + ) + +(define-extern *cav-railblocker-exploder-params* joint-exploder-static-params) +(define-extern prebot-eco-pillar-init-by-other (function vector prebot-eco-pillar-launch-spec object :behavior prebot-eco-pillar)) +(define-extern *prebot-sword-color-curve* curve-color-piecewise) +(define-extern *prebot-sword-white-red-curve* curve-color-piecewise) +(define-extern *prebot-sword-width-curve* curve2d-fast) +(define-extern *prebot-sword-color-array* light-trail-composition) +(define-extern prebot-sword-init-by-other (function string vector basic sound-spec object :behavior prebot-sword)) +(define-extern prebot-shockwave-init-by-other (function vector quaternion object :behavior prebot-shockwave)) +(define-extern prebot-gun-init-by-other (function string vector object :behavior prebot-gun)) +(define-extern prebot-tentacle-init-by-other (function string vector int object :behavior prebot-tentacle)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; prebot-states ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype task-manager-prebot (task-manager) - ((manager-entity basic :offset-assert 240) - (check-timer uint64 :offset-assert 248) + ((manager-entity entity :offset-assert 240) + (check-timer time-frame :offset-assert 248) ) :method-count-assert 32 :size-assert #x100 @@ -72577,27 +72876,25 @@ active ;; 15 ) ) -|# -;; (define-extern prebot-neck-callback function) -;; (define-extern prebot-light-pulse-off function) -;; (define-extern prebot-light-pulse-on function) -;; (define-extern prebot-light-flash function) -;; (define-extern prebot-prespool function) -;; (define-extern prebot-common function) -;; (define-extern prebot-go-next-stage function) -;; (define-extern prebot-handler function) -;; (define-extern prebot-set-cam-slave-fov function) -;; (define-extern prebot-setup-shot-offsets function) -;; (define-extern prebot-fire-tentacle function) -;; (define-extern prebot-launch-critter function) -;; (define-extern prebot-spawn-shockwave function) +(define-extern prebot-neck-callback (function cspace transformq none :behavior prebot)) +(define-extern prebot-light-pulse-off (function none :behavior prebot)) +(define-extern prebot-light-pulse-on (function float float float vector :behavior prebot)) +(define-extern prebot-light-flash (function float float float vector :behavior prebot)) +(define-extern prebot-prespool (function object :behavior prebot)) +(define-extern prebot-common (function object :behavior prebot)) +(define-extern prebot-go-next-stage (function object :behavior prebot)) +(define-extern prebot-handler (function process int symbol event-message-block object :behavior prebot)) +(define-extern prebot-set-cam-slave-fov (function float float :behavior prebot)) +(define-extern prebot-setup-shot-offsets (function object :behavior prebot)) +(define-extern prebot-fire-tentacle (function handle vector object :behavior prebot)) +(define-extern prebot-launch-critter (function object :behavior prebot)) +(define-extern prebot-spawn-shockwave (function object :behavior prebot)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; prebot-extras ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype cav-break-bridge (process-drawable) () :method-count-assert 21 @@ -72607,9 +72904,7 @@ idle ;; 20 ) ) -|# -#| (deftype prebot-shockwave-joint-position (structure) ((joint-index int8 :offset-assert 0) (position vector :inline :offset-assert 16) @@ -72618,9 +72913,7 @@ :size-assert #x20 :flag-assert #x900000020 ) -|# -#| (deftype prebot-gun-shot (projectile) ((whoosh-sound uint32 :offset-assert 512) ) @@ -72632,9 +72925,7 @@ moving ;; 23 ) ) -|# -#| (deftype cav-exit-door (process-drawable) ((initial-y float :offset-assert 200) ) @@ -72646,32 +72937,29 @@ rise ;; 21 ) ) -|# -;; (define-extern *prebot-eco-pillar-debris-params* debris-static-params) -;; (define-extern prebot-eco-pillar-handler function) +(define-extern *prebot-eco-pillar-debris-params* debris-static-params) +(define-extern prebot-eco-pillar-handler (function process int symbol event-message-block object :behavior prebot-eco-pillar)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; mined-scenes ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype cav-airlock-door (com-airlock) () :method-count-assert 30 :size-assert #x1b0 :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 ;; @@ -72684,57 +72972,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 @@ -72744,54 +73024,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) @@ -72800,84 +73074,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 + active ;; 34 + stare ;; 37 hostile ;; 38 + victory ;; 39 die ;; 40 + ambush ;; 47 circling ;; 157 - stare ;; 37 - ambush-jumping ;; 191 attack ;; 190 - active ;; 34 - ambush ;; 47 + 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) @@ -72886,10 +73158,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 ;; @@ -72901,62 +73172,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) @@ -72966,7 +73232,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 @@ -72976,9 +73242,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) @@ -72988,108 +73252,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 @@ -73098,141 +73348,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) @@ -73244,11 +73477,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 @@ -73257,70 +73488,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 ;; @@ -73332,88 +73555,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 ;; 31 knocked-recover ;; 32 - notice ;; 35 - rolling ;; 191 active ;; 34 - rolling-start ;; 190 - pacing ;; 156 - turn ;; 195 - circling ;; 157 + notice ;; 35 stare ;; 37 - attack ;; 193 hostile ;; 38 - attack-recover ;; 194 + pacing ;; 156 + circling ;; 157 + rolling-start ;; 190 + rolling ;; 191 rolling-stop ;; 192 - knocked ;; 31 + (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 ;; @@ -73421,10 +73636,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) @@ -73432,14 +73646,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) @@ -73452,168 +73666,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 + dormant ;; 28 + dormant-aware ;; 29 + idle ;; 33 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 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 @@ -73623,15 +73821,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 ;; @@ -74042,22 +74239,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 @@ -74066,8 +74260,6 @@ active ;; 15 ) ) -|# - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; deshover-texture ;; @@ -74080,54 +74272,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) ) @@ -74135,18 +74351,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 @@ -74155,9 +74371,7 @@ idle ;; 28 ) ) -|# -#| (deftype terraformer-head-laser-projectile (projectile) () :method-count-assert 41 @@ -74167,80 +74381,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) @@ -74250,29 +74503,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/jak3_config.jsonc b/decompiler/config/jak3/jak3_config.jsonc index 7db1bb3cf8..3377deaca1 100644 --- a/decompiler/config/jak3/jak3_config.jsonc +++ b/decompiler/config/jak3/jak3_config.jsonc @@ -8,7 +8,7 @@ // if you want to filter to only some object names. // it will make the decompiler much faster. "allowed_objects": [], - "banned_objects": ["collide-shape", "spatial-hash"], + "banned_objects": [], //////////////////////////// // CODE ANALYSIS OPTIONS @@ -34,6 +34,8 @@ // unpack textures to assets folder "process_tpages": true, + // write goal imports for tpages and textures + "write_tpage_imports": false, // unpack game text to assets folder "process_game_text": true, // unpack game count to assets folder @@ -44,6 +46,8 @@ "dump_art_group_info": false, // write out a json file containing the joint node mapping, run this with all objects allowed "dump_joint_geo_info": false, + // write out a json file containing tpage and texture mappings, run with all objects allowed + "dump_tex_info": false, // set to false to skip adding .STR files to the decompiler database "read_spools": true, @@ -100,11 +104,12 @@ "all_types_file": "decompiler/config/jak3/all-types.gc", "art_group_dump_file": "decompiler/config/jak3/ntsc_v1/art-group-info.min.json", "joint_node_dump_file": "decompiler/config/jak3/ntsc_v1/joint-node-info.min.json", + "tex_dump_file": "decompiler/config/jak3/ntsc_v1/tex-info.min.json", "process_stack_size_file": "decompiler/config/jak3/ntsc_v1/process_stack_size_overrides.jsonc", // optional: a predetermined object file name map from a file. // this will make decompilation naming consistent even if you only run on some objects. - "obj_file_name_map_file": "goal_src/jak3/build/all_objs.json", + // "obj_file_name_map_file": "goal_src/jak3/build/all_objs.json", //////////////////////////// // LEVEL EXTRACTION @@ -116,7 +121,7 @@ "rip_levels": false, // should we also extract collision meshes to the .fr3 files? // these can be displayed in-game with the OpenGOAL collision renderer - "extract_collision": false, + "extract_collision": true, // turn this on if you want extracted level collision to be saved as .obj files in debug_out/ "rip_collision": false, // save game textures as .png files to decompiler_out//textures diff --git a/decompiler/config/jak3/ntsc_v1/anonymous_function_types.jsonc b/decompiler/config/jak3/ntsc_v1/anonymous_function_types.jsonc index c6647d3353..dea6a94f5e 100644 --- a/decompiler/config/jak3/ntsc_v1/anonymous_function_types.jsonc +++ b/decompiler/config/jak3/ntsc_v1/anonymous_function_types.jsonc @@ -124,5 +124,658 @@ [77, "(function part-tracker vector)"], [78, "(function part-tracker vector)"] ], - "trajectory": [[15, "(function trajectory none)"]] + "trajectory": [[15, "(function trajectory none)"]], + "progress": [[3, "(function int none :behavior process)"]], + "level": [ + [25, "(function level-group int symbol)"], + [7, "(function none)"], + [4, "(function load-state sound-bank-state symbol)"] + ], + "main": [ + [11, "(function int none)"], + [9, "(function none)"], + [8, "(function none)"], + [7, "(function none)"], + [3, "(function symbol :behavior process)"] + ], + "scene": [[4, "(function none :behavior scene-player)"]], + "pov-camera": [ + [ + 7, + "(function process int symbol event-message-block object :behavior pov-camera)" + ] + ], + "airlock": [ + [7, "(function object :behavior com-airlock)"], + [11, "(function object :behavior com-airlock)"], + [12, "(function object :behavior com-airlock)"] + ], + "default-menu": [ + [3, "(function object)"], + [4, "(function object)"], + [5, "(function object)"], + [6, "(function object)"], + [7, "(function int debug-menu-msg object)"], + [8, "(function object)"], + [9, "(function object)"], + [10, "(function object)"], + [11, "(function object)"], + [12, "(function object)"], + [13, "(function object)"], + [14, "(function object)"], + [15, "(function object)"], + [16, "(function object)"], + [17, "(function object)"], + [18, "(function int debug-menu-msg float object)"], + [20, "(function object)"], + [21, "(function object)"], + [22, "(function object)"], + [23, "(function object)"], + [24, "(function object)"], + [25, "(function object)"], + [26, "(function object)"], + [27, "(function int debug-menu-msg float object)"], + [28, "(function int debug-menu-msg float object)"], + [29, "(function object)"], + [30, "(function int debug-menu-msg float object)"], + [31, "(function int debug-menu-msg float object)"], + [32, "(function int debug-menu-msg float object)"], + [33, "(function int debug-menu-msg float object)"], + [34, "(function object)"], + [35, "(function object)"], + [36, "(function int debug-menu-msg float object)"], + [37, "(function int debug-menu-msg float object)"], + [38, "(function int debug-menu-msg float object)"], + [39, "(function int debug-menu-msg float object)"], + [40, "(function object)"], + [41, "(function object)"], + [42, "(function int debug-menu-msg float object)"], + [43, "(function int debug-menu-msg float object)"], + [44, "(function int debug-menu-msg float object)"], + [45, "(function int debug-menu-msg float object)"], + [46, "(function int debug-menu-msg float object)"], + [47, "(function int debug-menu-msg float object)"], + [48, "(function int debug-menu-msg float object)"], + [49, "(function int debug-menu-msg float object)"], + [50, "(function int debug-menu-msg float object)"], + [51, "(function int debug-menu-msg float object)"], + [52, "(function int debug-menu-msg float object)"], + [53, "(function int debug-menu-msg float object)"], + [54, "(function int debug-menu-msg float object)"], + [55, "(function int debug-menu-msg float object)"], + [56, "(function int debug-menu-msg float object)"], + [57, "(function int debug-menu-msg float object)"], + [58, "(function int debug-menu-msg float object)"], + [59, "(function int debug-menu-msg float object)"], + [60, "(function int debug-menu-msg float object)"], + [61, "(function int debug-menu-msg float object)"], + [62, "(function int debug-menu-msg float object)"], + [63, "(function int debug-menu-msg float object)"], + [64, "(function int debug-menu-msg float object)"], + [65, "(function int debug-menu-msg float object)"], + [66, "(function int debug-menu-msg float object)"], + [67, "(function int debug-menu-msg float object)"], + [68, "(function int debug-menu-msg float object)"], + [69, "(function int debug-menu-msg float object)"], + [70, "(function int debug-menu-msg float object)"], + [71, "(function int debug-menu-msg float object)"], + [72, "(function int debug-menu-msg float object)"], + [73, "(function int debug-menu-msg float object)"], + [74, "(function int debug-menu-msg float object)"], + [75, "(function int debug-menu-msg float object)"], + [76, "(function int debug-menu-msg float object)"], + [77, "(function int debug-menu-msg float object)"], + [78, "(function int debug-menu-msg float object)"], + [79, "(function int debug-menu-msg float object)"], + [80, "(function int debug-menu-msg float object)"], + [81, "(function int debug-menu-msg float object)"], + [82, "(function int debug-menu-msg float object)"], + [83, "(function int debug-menu-msg float object)"], + [84, "(function int debug-menu-msg float object)"], + [85, "(function int debug-menu-msg float object)"], + [86, "(function int debug-menu-msg float object)"], + [87, "(function int debug-menu-msg float object)"], + [88, "(function int debug-menu-msg float object)"], + [89, "(function int debug-menu-msg float object)"], + [90, "(function int debug-menu-msg float object)"], + [91, "(function int debug-menu-msg float object)"], + [92, "(function int debug-menu-msg float object)"], + [93, "(function int debug-menu-msg float object)"], + [94, "(function int debug-menu-msg float object)"], + [95, "(function int debug-menu-msg float object)"], + [96, "(function int debug-menu-msg float object)"], + [97, "(function int debug-menu-msg float object)"], + [98, "(function int debug-menu-msg float object)"], + [99, "(function int debug-menu-msg float object)"], + [100, "(function int debug-menu-msg float object)"], + [101, "(function int debug-menu-msg float object)"], + [102, "(function int debug-menu-msg float object)"], + [103, "(function int debug-menu-msg float object)"], + [104, "(function int debug-menu-msg float object)"], + [105, "(function int debug-menu-msg float object)"], + [106, "(function int debug-menu-msg float object)"], + [107, "(function int debug-menu-msg float object)"], + [108, "(function int debug-menu-msg float object)"], + [109, "(function int debug-menu-msg float object)"], + [110, "(function int debug-menu-msg float object)"], + [111, "(function int debug-menu-msg float object)"], + [112, "(function int debug-menu-msg float object)"], + [113, "(function int debug-menu-msg float object)"], + [114, "(function int debug-menu-msg float object)"], + [115, "(function int debug-menu-msg float object)"], + [116, "(function int debug-menu-msg float object)"], + [117, "(function int debug-menu-msg float object)"], + [118, "(function int debug-menu-msg float object)"], + [119, "(function int debug-menu-msg float object)"], + [120, "(function int debug-menu-msg float object)"], + [121, "(function int debug-menu-msg float object)"], + [122, "(function int debug-menu-msg float object)"], + [123, "(function int debug-menu-msg float object)"], + [124, "(function int debug-menu-msg float object)"], + [125, "(function int debug-menu-msg float object)"], + [126, "(function int debug-menu-msg float object)"], + [127, "(function int debug-menu-msg float object)"], + [128, "(function int debug-menu-msg float object)"], + [129, "(function int debug-menu-msg float object)"], + [130, "(function int debug-menu-msg float object)"], + [131, "(function int debug-menu-msg float object)"], + [132, "(function int debug-menu-msg float object)"], + [133, "(function int debug-menu-msg float object)"], + [134, "(function int debug-menu-msg float object)"], + [135, "(function int debug-menu-msg float object)"], + [136, "(function int debug-menu-msg float object)"], + [137, "(function int debug-menu-msg float object)"], + [138, "(function int debug-menu-msg float object)"], + [139, "(function int debug-menu-msg float object)"], + [140, "(function int debug-menu-msg float object)"], + [141, "(function int debug-menu-msg float object)"], + [142, "(function int debug-menu-msg float object)"], + [143, "(function int debug-menu-msg float object)"], + [144, "(function int debug-menu-msg float object)"], + [145, "(function int debug-menu-msg float object)"], + [146, "(function int debug-menu-msg float object)"], + [147, "(function int debug-menu-msg float object)"], + [148, "(function int debug-menu-msg float object)"], + [149, "(function int debug-menu-msg float object)"], + [150, "(function int debug-menu-msg float object)"], + [151, "(function int debug-menu-msg float object)"], + [152, "(function int debug-menu-msg float object)"], + [153, "(function int debug-menu-msg float object)"], + [154, "(function int debug-menu-msg float object)"], + [155, "(function int debug-menu-msg float object)"], + [156, "(function int debug-menu-msg float object)"], + [157, "(function int debug-menu-msg float object)"], + [158, "(function int debug-menu-msg float object)"], + [159, "(function int debug-menu-msg float object)"], + [160, "(function object)"], + [161, "(function object)"], + [162, "(function object)"], + [163, "(function object)"], + [164, "(function object)"], + [165, "(function object)"], + [166, "(function object)"], + [167, "(function object)"], + [168, "(function int debug-menu-msg object)"], + [169, "(function int debug-menu-msg object)"], + [170, "(function int debug-menu-msg object)"], + [171, "(function int debug-menu-msg object)"], + [172, "(function int debug-menu-msg object)"], + [173, "(function int debug-menu-msg float object)"], + [174, "(function int debug-menu-msg float object)"], + [175, "(function int debug-menu-msg float object)"], + [176, "(function int debug-menu-msg float object)"], + [177, "(function int debug-menu-msg float object)"], + [178, "(function int debug-menu-msg float object)"], + [179, "(function int debug-menu-msg float object)"], + [180, "(function int debug-menu-msg float object)"], + [181, "(function int debug-menu-msg float object)"], + [182, "(function int debug-menu-msg float object)"], + [183, "(function int debug-menu-msg float object)"], + [184, "(function int debug-menu-msg float object)"], + [185, "(function int debug-menu-msg float object)"], + [186, "(function int debug-menu-msg float object)"], + [187, "(function int debug-menu-msg float object)"], + [188, "(function int debug-menu-msg float object)"], + [189, "(function int debug-menu-msg float object)"], + [190, "(function int debug-menu-msg float object)"], + [191, "(function int debug-menu-msg float object)"], + [192, "(function int debug-menu-msg float object)"], + [193, "(function int debug-menu-msg float object)"], + [194, "(function int debug-menu-msg float object)"], + [195, "(function int debug-menu-msg float object)"], + [196, "(function int debug-menu-msg float object)"], + [197, "(function int debug-menu-msg float object)"], + [198, "(function int debug-menu-msg float object)"], + [199, "(function int debug-menu-msg float object)"], + [200, "(function int debug-menu-msg float object)"], + [201, "(function int debug-menu-msg float object)"], + [202, "(function int debug-menu-msg float object)"], + [203, "(function int debug-menu-msg float object)"], + [204, "(function int debug-menu-msg float object)"], + [205, "(function int debug-menu-msg float object)"], + [206, "(function int debug-menu-msg float object)"], + [207, "(function int debug-menu-msg float object)"], + [208, "(function int debug-menu-msg float object)"], + [209, "(function int debug-menu-msg float object)"], + [210, "(function int debug-menu-msg float object)"], + [211, "(function int debug-menu-msg float object)"], + [212, "(function int debug-menu-msg float object)"], + [213, "(function int debug-menu-msg float object)"], + [214, "(function int debug-menu-msg float object)"], + [215, "(function symbol debug-menu-msg float float object)"], + [216, "(function symbol debug-menu-msg float float object)"], + [217, "(function int debug-menu-msg float object)"], + [218, "(function symbol debug-menu-msg float float object)"], + [219, "(function symbol debug-menu-msg float float object)"], + [220, "(function symbol debug-menu-msg float float object)"], + [221, "(function symbol debug-menu-msg float float object)"], + [222, "(function symbol debug-menu-msg float float object)"], + [223, "(function symbol debug-menu-msg float float object)"], + [224, "(function symbol debug-menu-msg float float object)"], + [225, "(function symbol debug-menu-msg float float object)"], + [226, "(function symbol debug-menu-msg float float object)"], + [227, "(function symbol debug-menu-msg float float object)"], + [228, "(function symbol debug-menu-msg float float object)"], + [229, "(function symbol debug-menu-msg float float object)"], + [230, "(function symbol debug-menu-msg float float object)"], + [231, "(function symbol debug-menu-msg float float object)"], + [232, "(function symbol debug-menu-msg float float object)"], + [233, "(function symbol debug-menu-msg float float object)"], + [234, "(function symbol debug-menu-msg float float object)"], + [235, "(function object)"], + [236, "(function object)"], + [237, "(function symbol debug-menu-msg float float object)"], + [239, "(function symbol debug-menu-msg object)"], + [240, "(function int debug-menu-msg float object)"], + [241, "(function int debug-menu-msg float object)"], + [242, "(function int debug-menu-msg float object)"], + [243, "(function int debug-menu-msg float object)"], + [244, "(function debug-menu debug-menu symbol)"], + [245, "(function debug-menu debug-menu symbol)"], + [246, "(function debug-menu debug-menu symbol)"], + [247, "(function debug-menu debug-menu symbol)"] + ], + "enemy-states": [[38, "(function object :behavior enemy)"]], + "scene-actor": [ + [0, "(function none)"], + [1, "(function flut-npc none)"], + [2, "(function flut-npc art-element)"], + [39, "(function flut-npc flut-npc)"] + ], + "warp-gate": [ + [0, "(function object)"], + [8, "(function string object :behavior process)"], + [12, "(function object :behavior target)"] + ], + "gun-yellow-shot": [[59, "(function handle object :behavior process)"]], + "gun-dark-shot": [ + [25, "(function collide-shape-prim none :behavior gravity-spinner)"], + [34, "(function handle float object :behavior process)"] + ], + "entity": [ + [11, "(function process object)"], + [16, "(function process object)"], + [57, "(function process object)"], + [61, "(function process object)"] + ], + "target-darkjak": [ + [5, "(function object :behavior target)"], + [ + 20, + "(function (pointer float) (pointer int64) (pointer int64) object :behavior target)" + ], + [21, "(function object :behavior target)"] + ], + "memory-usage": [ + [2, "(function process-drawable symbol)"], + [3, "(function basic symbol)"] + ], + "bug-report": [ + [0, "(function object :behavior bug-report)"], + [1, "(function object :behavior bug-report)"] + ], + "script": [ + [0, "(function script-context (pointer prim-beam-tracker))"], + [1, "(function script-context symbol)"], + [2, "(function script-context object)"], + [3, "(function script-context object)"], + [4, "(function script-context object)"], + [5, "(function script-context object)"], + [6, "(function script-context object)"], + [7, "(function script-context object)"], + [8, "(function script-context object)"], + [9, "(function script-context object)"], + [10, "(function script-context object)"], + [11, "(function script-context object)"], + [12, "(function script-context object)"], + [13, "(function script-context object)"], + [14, "(function script-context int)"], + [15, "(function script-context object)"], + [16, "(function script-context object)"], + [17, "(function script-context object)"], + [18, "(function script-context object)"], + [19, "(function script-context object)"], + [20, "(function script-context object)"], + [21, "(function script-context object)"], + [22, "(function script-context object)"], + [23, "(function script-context object)"], + [24, "(function script-context symbol)"], + [25, "(function script-context symbol)"], + [26, "(function script-context symbol)"], + [27, "(function script-context symbol)"], + [28, "(function script-context object)"], + [29, "(function script-context symbol)"], + [30, "(function script-context object)"], + [31, "(function script-context object)"], + [32, "(function script-context symbol)"], + [33, "(function script-context symbol)"], + [34, "(function script-context symbol)"], + [35, "(function script-context object)"], + [36, "(function script-context object)"], + [37, "(function script-context object)"], + [38, "(function script-context object)"], + [39, "(function script-context symbol)"], + [40, "(function script-context object)"], + [41, "(function script-context entity-perm-status)"], + [42, "(function script-context symbol)"], + [43, "(function basic symbol)"], + [44, "(function script-context (pointer process))"], + [45, "(function script-context int)"], + [46, "(function script-context object)"], + [47, "(function script-context object)"], + [48, "(function script-context object)"], + [49, "(function script-context symbol)"], + [50, "(function script-context region)"], + [51, "(function script-context drawable-region-prim)"], + [52, "(function script-context object)"], + [53, "(function script-context object)"], + [54, "(function script-context object)"], + [55, "(function script-context object)"], + [56, "(function script-context object)"], + [57, "(function script-context object)"], + [58, "(function script-context object)"], + [59, "(function script-context object)"], + [60, "(function script-context object)"], + [61, "(function script-context object)"], + [62, "(function script-context object)"], + [63, "(function script-context object)"], + [64, "(function script-context object)"], + [65, "(function script-context object)"], + [66, "(function script-context symbol)"], + [67, "(function script-context symbol)"], + [68, "(function script-context symbol)"], + [69, "(function script-context symbol)"], + [70, "(function script-context object)"], + [71, "(function script-context object)"], + [72, "(function script-context object)"], + [73, "(function script-context object)"], + [74, "(function script-context object)"], + [75, "(function script-context object)"], + [76, "(function script-context object)"], + [77, "(function script-context object)"], + [78, "(function script-context object)"], + [79, "(function script-context object)"], + [80, "(function script-context object)"], + [81, "(function script-context symbol)"], + [82, "(function script-context float)"], + [83, "(function script-context vector)"], + [84, "(function script-context meters)"], + [85, "(function script-context object)"], + [86, "(function script-context object)"], + [87, "(function script-context object)"], + [88, "(function script-context object)"], + [89, "(function script-context object)"], + [90, "(function script-context object)"], + [91, "(function script-context object)"], + [92, "(function script-context object)"], + [93, "(function script-context object)"], + [94, "(function script-context object)"], + [95, "(function script-context object)"], + [96, "(function script-context object)"], + [97, "(function script-context object)"], + [98, "(function script-context object)"], + [99, "(function script-context object)"], + [100, "(function script-context object)"], + [101, "(function script-context object)"], + [102, "(function script-context object)"], + [103, "(function script-context object)"], + [104, "(function script-context object)"], + [105, "(function script-context object)"], + [106, "(function script-context object)"], + [107, "(function script-context object)"], + [108, "(function script-context object)"] + ], + "relocate": [[7, "(function sparticle-system sparticle-cpuinfo none)"]], + "target-mech": [ + [7, "(function object :behavior target)"], + [8, "(function object :behavior target)"], + [9, "(function object :behavior target)"], + [18, "(function surface surface surface int object :behavior target)"], + [19, "(function surface surface surface int object :behavior target)"] + ], + "mech-states": [[57, "(function object :behavior target)"]], + "target-flut": [ + [14, "(function surface surface surface int object :behavior target)"], + [20, "(function object :behavior target)"], + [21, "(function object :behavior target)"], + [33, "(function process-focusable object)"], + [72, "(function object)"], + [73, "(function object :behavior target)"], + [74, "(function object :behavior target)"] + ], + "nav-control": [ + [0, "(function object nav-control none)"], + [1, "(function object nav-control none)"], + [2, "(function object nav-control none)"], + [3, "(function object nav-control none)"], + [4, "(function object nav-control none)"], + [5, "(function object nav-control none)"], + [6, "(function object nav-control none)"], + [7, "(function object nav-control none)"], + [8, "(function object nav-control none)"], + [9, "(function object nav-control none)"] + ], + "nav-enemy": [[7, "(function enemy-jump-info none :behavior nav-enemy)"]], + "task-control": [ + [53, "(function game-task-node-info symbol object)"], + [54, "(function game-task-node-info object)"], + [67, "(function pair symbol)"] + ], + "merc-death": [[3, "(function time-frame :behavior process-drawable)"]], + "vehicle-states": [ + [10, "(function collide-shape-prim none)"], + [12, "(function collide-shape-prim none)"] + ], + "prebot-states": [[21, "(function vector :behavior prebot)"]], + "wasall-obs": [ + [0, "(function object)"], + [1, "(function object)"], + [2, "(function object)"], + [3, "(function object)"] + ], + "roboguard": [ + [1, "(function cspace transformq none)"], + [2, "(function cspace transformq none)"], + [25, "(function int int float object :behavior roboguard)"], + [45, "(function roboguard symbol object)"] + ], + "vehicle": [ + [6, "(function collide-shape-prim none)"], + [7, "(function collide-shape-prim none)"] + ], + "wvehicle-wheel": [ + [7, "(function collide-shape-prim none)"], + [11, "(function collide-shape-prim none)"], + [17, "(function collide-shape-prim none)"] + ], + "wvehicle-states": [ + [20, "(function collide-shape-prim none)"], + [22, "(function collide-shape-prim none)"] + ], + "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)"] + ] } diff --git a/decompiler/config/jak3/ntsc_v1/art_info.jsonc b/decompiler/config/jak3/ntsc_v1/art_info.jsonc index 99d1d1fc40..71f670a5d4 100644 --- a/decompiler/config/jak3/ntsc_v1/art_info.jsonc +++ b/decompiler/config/jak3/ntsc_v1/art_info.jsonc @@ -13,7 +13,16 @@ "sidekick": "daxter-ag", "wings": "jakb-ag", "lightjak-shield": "jakb-ag", - "freeze-screen": "collectables-ag" + "freeze-screen": "collectables-ag", + "red-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" }, // 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 9aa2ebb8de..7a63c11b4a 100644 --- a/decompiler/config/jak3/ntsc_v1/hacks.jsonc +++ b/decompiler/config/jak3/ntsc_v1/hacks.jsonc @@ -105,19 +105,11 @@ "adgif-shader<-texture!", // jak 3 - "command-get-process", - "(anon-function 4 gun-states)", "(method 10 manipulator)", "(method 46 ff-squad-control)", - "borrow-city-expansion", - "(method 26 level-group)", - "(anon-function 65 temple-obs)", - "(method 33 task-manager-nest-cocoons)", "(method 33 rub-tower)", "(method 261 crimson-guard)", - "(anon-function 25 volcanox-obs)", - "find-nearest-entity", - "foreground-draw-hud" + "memcpy" ], // these functions use pairs and the decompiler @@ -213,7 +205,25 @@ "(method 22 fort-floor-spike-c)", "(method 11 sew-catwalk)", "(method 11 mtn-aval-rocks)", - "(method 11 gar-curtain)" + "(method 11 gar-curtain)", + "(method 10 level-load-info)", + "(method 29 level-group)", + "(method 26 level-group)", + "(method 19 level)", + "(method 10 level)", + "update-sound-banks", + "level-base-level-name", + "borrow-city-expansion", + "add-want-level", + "level-find-borrow-slot", + "(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, @@ -247,7 +257,19 @@ "~33L~C~34L~S~33L~C": 3, "~35L~S ~33L~S~1L": 2, "~33L~S ~35L~S~1L": 2, - "~33L~C": 1 + "~33L~C": 1, + "~33L~S~44L ~S": 2, + "~44L~S ~33L~S": 2, + "~10Htfrag: ~8,,0m": 1, + "~140Hshrub: ~8,,0m": 1, + "~272Halpha: ~8,,0m~%": 1, + "~27Htie: ~8,,0m": 1, + "~140Hfg-tf: ~8,,0m": 1, + "~270Hfg-pr: ~8,,0m~%": 1, + "~10Hfg-wa: ~8,,0m": 1, + "~140Hfg-sh: ~8,,0m": 1, + "~267Hfg-p2: ~8,,0m~%": 1, + "~30Hp2: ~8D~131Hhf: ~8D~%~1K": 2 }, "blocks_ending_in_asm_branch": { @@ -277,7 +299,149 @@ "add-debug-box-with-transform": [0, 3], "add-debug-line-sphere": [0], "bones-mtx-calc-execute": [19, 7], - "foreground-draw": [0, 1, 126] + "foreground-draw": [0, 1, 126], + "unpack-comp-rle": [1, 3, 5, 6], + "unpack-comp-huf": [2, 4, 5, 6, 7, 8, 9], + "unpack-comp-lzo": [ + 0, + 1, + 4, + 5, + 6, + 7, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, // branch fwd 39 + 39, // branch fwd no delay + 43, // goto 18 + 45 // goto 6 + ], + "(method 16 level)": [0, 1, 5, 13, 14, 15], + "upload-vis-bits": [2, 6, 3, 0], + "set-background-regs!": [4, 3], + "draw-drawable-tree-instance-shrub": [5, 7, 9, 11], + "draw-drawable-tree-instance-tie": [21, 23, 31, 33], + "(method 12 flow-control)": [3, 9, 22], + "(method 26 level-group)": [40, 41, 67], + "borrow-city-expansion": [0, 9, 13, 15, 17], + "dma-add-process-drawable": [0, 77], + "real-main-draw-hook": [120, 122], + "display-frame-finish": [61], + "display-loop-main": [130], + "(method 63 collide-shape-moving)": [1, 2, 14, 49], + "(method 67 collide-shape-moving)": [2, 3, 13], + "(method 51 rigid-body-object)": [5], + "(anon-function 2 rigid-body-queue)": [0, 2], + "(method 15 rigid-body-queue)": [5, 6, 7, 9], + "(method 13 rigid-body-queue)": [5, 6, 7, 9], + "(method 11 rigid-body-queue)": [0, 6, 7, 9], + "(method 10 rigid-body-queue)": [10, 34, 37], + "(method 9 los-control)": [0, 43], + "load-game-text-info": [19, 20, 21], + "draw-actor-marks": [8], + "find-nearest-entity": [7, 9], + "(method 13 collide-cache)": [7, 9], + "(method 11 collide-mesh)": [2, 4], + "(method 12 collide-mesh-cache)": [0, 1, 2, 3, 4, 5], + "(method 10 collide-mesh)": [2], + "(method 42 collide-shape)": [0, 1, 2, 3, 4, 7], + "(method 18 collide-shape-prim-mesh)": [2, 3, 4, 5, 6, 7], + "(method 18 collide-shape-prim-sphere)": [2, 3, 4], + "(method 15 collide-shape-prim-sphere)": [1, 2, 3, 4, 5, 6], + "(method 16 collide-shape-prim-sphere)": [0, 1, 2, 3, 4], + "(method 36 collide-shape)": [8, 9], + "(method 45 collide-shape)": [33], + "(method 40 collide-shape)": [ + 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 + ], + "(method 12 collide-shape-prim-group)": [1, 2, 3, 4, 5, 6], + "(method 13 collide-shape-prim)": [1, 2, 3, 4, 5, 6], + "(method 12 collide-shape-prim-sphere)": [ + 1, 2, 3, 4, 5, 8, 10, 11, 13, 14, 15 + ], + "(method 12 collide-shape-prim-mesh)": [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16 + ], + "update-actor-hash": [0, 2, 4], + "(method 24 grid-hash)": [39, 35, 22, 15], + "(anon-function 4 gun-states)": [ + 18, 128, 129, 131, 133, 135, 138, 139, 143 + ], + "(method 16 sparticle-launch-control)": [25, 35, 36, 48, 62, 65, 100, 102], + "(anon-function 17 target-ladder)": [0, 1], + "command-get-process": [46], + "foreground-draw-hud": [0, 7, 8, 9, 16, 22], + "target-flut-falling-anim-trans": [8, 9], + "(method 12 nav-mesh)": [0, 1, 2, 9], + "(method 20 nav-mesh)": [9], + "(method 21 nav-mesh)": [7], + "(method 29 nav-mesh)": [0, 1, 2, 4], + "(method 33 nav-mesh)": [10, 11, 12, 13], + "(method 34 nav-mesh)": [0, 1, 2, 4], + "(method 35 nav-mesh)": [0, 1, 2, 4], + "(method 36 nav-mesh)": [1, 2], + "(method 37 nav-mesh)": [4], + "(method 45 nav-mesh)": [1, 2], + "(method 46 nav-mesh)": [1, 2, 19, 20], + "(method 48 nav-mesh)": [4, 5, 6, 8], + "(method 49 nav-mesh)": [0, 1, 2, 3, 5], + "(method 18 nav-control)": [11, 12, 19, 20, 31, 34], + "(method 19 nav-control)": [9, 10], + "(method 40 nav-state)": [1, 2], + "point-poly-distance-min": [0, 1, 2, 3, 4, 5, 6, 7, 10], + "find-closest-circle-ray-intersection": [0, 4, 15, 16, 17, 18], + "(method 39 vehicle)": [0, 10, 12, 15], + "(anon-function 7 vehicle-states)": [0, 2], + "(method 11 vehicle-hud-requests)": [0, 6, 7, 10], + "(anon-function 12 neo-juicer)": [29, 30], + "(method 160 neo-grenadier)": [1, 2, 3], + "(method 82 spydroid-orig)": [13], + "(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, 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] }, // Sometimes the game might use format strings that are fetched dynamically, @@ -286,7 +450,72 @@ // e.g. "function-name":[[op, argc], [op, argc], ...] // where "op" is the op number for the call to format. "dynamic_format_arg_counts": { - "auto-save-post": [[182, 1]] + "auto-save-post": [[182, 1]], + "(method 10 menu-secret-option)": [[289, 1]], + "(method 10 menu-create-game-option)": [[49, 1]], + "(method 10 menu-format-card-option)": [[49, 1]], + "(method 10 menu-card-removed-option)": [[49, 1]], + "(method 10 menu-insert-card-option)": [[49, 1]], + "(method 10 menu-hero-mode-message-option)": [[50, 1]], + "(method 10 menu-secrets-insufficient-space-option)": [[51, 1]], + "(method 10 menu-error-loading-option)": [ + [65, 1], + [100, 1] + ], + "(method 10 menu-insufficient-space-option)": [ + [72, 1], + [112, 1] + ], + "(method 10 menu-error-auto-saving-option)": [[73, 1]], + "(method 10 menu-loading-option)": [[113, 1]], + "(method 10 menu-icon-info-option)": [[150, 1]], + "(method 17 hud-goal)": [[71, 0]], + "(method 17 hud-miss)": [[71, 0]], + "(method 16 resetter)": [ + [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]] }, "mips2c_functions_by_name": [ @@ -294,7 +523,7 @@ "moving-sphere-triangle-intersect", "calc-animation-from-spr", "draw-string-asm", - "draw-string", + // "draw-string", "get-string-length", "adgif-shader<-texture-with-update!", "init-boundary-regs", @@ -325,7 +554,6 @@ "fill-bg-using-box-new", "fill-bg-using-line-sphere-new", "(method 12 collide-mesh)", - "(method 11 collide-mesh)", "(method 14 collide-mesh)", "(method 15 collide-mesh)", "(method 10 collide-edge-hold-list)", @@ -350,11 +578,11 @@ "(method 30 sphere-hash)", "(method 31 sphere-hash)", "(method 32 sphere-hash)", - "(method 33 spatial-hash)", - "(method 39 spatial-hash)", - "(method 36 spatial-hash)", - "(method 37 spatial-hash)", + "(method 32 spatial-hash)", + "(method 34 spatial-hash)", "(method 35 spatial-hash)", + "(method 36 spatial-hash)", + "(method 38 spatial-hash)", "(method 10 collide-shape-prim-mesh)", "(method 10 collide-shape-prim-sphere)", "(method 10 collide-shape-prim-group)", @@ -414,7 +642,13 @@ "generic-warp-envmap-dest", "generic-no-light-proc", "(method 21 cloth-system)", - "debug-line-clip?" + "debug-line-clip?", + "(method 9 font-work)", + "(method 9 prim-strip)", + "live-func-curve", + "birth-func-curve", + "sparticle-motion-blur-dirt", + "foreground-draw-hud" ], "mips2c_jump_table_functions": {}, @@ -428,7 +662,12 @@ ["pow", 0, 0], ["wasintro", 0, 0], ["lfacctyb", 0, 0], - ["intpfall", 0, 0] + ["intpfall", 0, 0], + ["lfaccity", 0, 0], + ["lfacctyb-vis", 0, 0], + ["ltowcity", 0, 0], + ["powergd", 0, 0], + ["lcitysml", 0, 0] ], // some object files have garbage pad data at the end which makes the decompiler diff --git a/decompiler/config/jak3/ntsc_v1/inputs.jsonc b/decompiler/config/jak3/ntsc_v1/inputs.jsonc index 9b72b5cc82..360e027ec3 100644 --- a/decompiler/config/jak3/ntsc_v1/inputs.jsonc +++ b/decompiler/config/jak3/ntsc_v1/inputs.jsonc @@ -8,288 +8,315 @@ // the DGOs will be processed in this order. Usually it's best to have KERNEL, ENGINE, then the levels when // you want to run on the entire game. "dgo_names": [ - //"CGO/ART.CGO", - "CGO/KERNEL.CGO", - // "CGO/ENGINE.CGO", - "CGO/GAME.CGO" + // engine files + // "CGO/ART.CGO", // "CGO/COMMON.CGO", - // "DGO/LJKDMPK.DGO", - // "DGO/LBBSDRP1.DGO", - // "DGO/LTNJXHIP.DGO", - // "DGO/MIC.DGO", + // "CGO/ENGINE.CGO", + "CGO/KERNEL.CGO", + "CGO/GAME.CGO", + // wascity + "DGO/WASALL.DGO", + "DGO/WWD.DGO", // waswide + "DGO/WSD.DGO", // wasdoors (garage) + "DGO/WASCHASE.DGO", + "DGO/WASDEFEN.DGO", + "DGO/WASLEAPR.DGO", + "DGO/WASPALA.DGO", + "DGO/WASSEEM.DGO", + "DGO/WASPGAME.DGO", + "DGO/WCA.DGO", + "DGO/WCB.DGO", + "DGO/WCASEEM.DGO", + "DGO/WASCAST.DGO", + // // arena + "DGO/WASSTADA.DGO", + "DGO/WASSTADB.DGO", + "DGO/WASSTADC.DGO", + "DGO/ARENACST.DGO", + // // desert + // "DGO/DESA.DGO", + "DGO/DESB.DGO", + "DGO/DESBATTL.DGO", + // "DGO/DESBCST.DGO", + "DGO/DESBOSS1.DGO", + "DGO/DESBOSS2.DGO", + // "DGO/DESC.DGO", + "DGO/DESCHASE.DGO", + "DGO/DESD.DGO", + // "DGO/DESE.DGO", + // "DGO/DESERROL.DGO", + "DGO/DESF.DGO", + "DGO/DESG.DGO", + // "DGO/DESH.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/DESRESCC.DGO", + // "DGO/DESRESCG.DGO", + "DGO/DESTRACK.DGO", + "DGO/DESW.DGO", + "DGO/DST.DGO", // "DGO/OASISCST.DGO", - // "DGO/CTYPEPA.DGO", - // "DGO/LPRENME.DGO", - // "DGO/LFREEOUT.DGO", - // "DGO/LGUNNORM.DGO", - // "DGO/LTOWA.DGO", - // "DGO/TEMA.DGO", - // "DGO/CTA.DGO", - // "DGO/LPRECC.DGO", - // "DGO/LJKDXVIN.DGO", - // "DGO/CTYPEPC.DGO", - // "DGO/SEA.DGO", - // "DGO/COMBE.DGO", - // "DGO/CTYPESA.DGO", - // "DGO/LBLOWCST.DGO", - // "DGO/WSD.DGO", - // "DGO/LBBRING3.DGO", - // "DGO/LCTYPATK.DGO", - // "DGO/WCB.DGO", - // "DGO/DESRESC.DGO", - // "DGO/LBBRING4.DGO", - // "DGO/GRIDCST.DGO", - // "DGO/RAILX.DGO", - // "DGO/SEJ.DGO", - // "DGO/LJAKC.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", + // mine + "DGO/MIA.DGO", + "DGO/MIB.DGO", + "DGO/MIC.DGO", + "DGO/MINED.DGO", + "DGO/MINEE.DGO", + // city + "DGO/CWI.DGO", // ctywide + // "DGO/CFA.DGO", // ctyfarm + // "DGO/CFB.DGO", + // "DGO/CGB.DGO", // ctygen + // "DGO/CIA.DGO", // ctyind + // "DGO/CIB.DGO", + // "DGO/CPO.DGO", // ctyport + // "DGO/CTA.DGO", // ctyslum // "DGO/CTB.DGO", - // "DGO/CTYCARC.DGO", - // "DGO/LMECH.DGO", - // "DGO/LBBSDRP2.DGO", - // "DGO/NSA.DGO", - // "DGO/LBBTCHA3.DGO", - // "DGO/GUNGAME2.DGO", // "DGO/CTC.DGO", - // "DGO/LVINCST.DGO", - // "DGO/COMBX.DGO", - // "DGO/DESH.DGO", - // "DGO/DESRACE2.DGO", - // "DGO/RAILD.DGO", - // "DGO/FACC.DGO", - // "DGO/CTYPESC.DGO", - // "DGO/LWASBBV.DGO", - // "DGO/TOWB.DGO", - // "DGO/HGA.DGO", - // "DGO/SEH.DGO", - // "DGO/MHCTYCST.DGO", + // "DGO/CTYPEPA.DGO", // citizens + // "DGO/CTYPEPB.DGO", // predator + // "DGO/CTYPEPC.DGO", // empty + // "DGO/CTYPESA.DGO", // guards + // "DGO/CTYPESB.DGO", // metal heads + // "DGO/CTYPESC.DGO", // kg + // "DGO/CTYCARA.DGO", // cars + // "DGO/CTYCARB.DGO", // bikes + // "DGO/CTYCARC.DGO", // hellcat + // "DGO/CTYCARKG.DGO", // empty + // "DGO/ONINTENT.DGO", + // "DGO/VIN.DGO", + // "DGO/HHG.DGO", // hiphog + // "DGO/GGA.DGO", // gungame // "DGO/GUNGAME1.DGO", - // "DGO/INTROCST.DGO", - // "DGO/DESJUMP.DGO", - // "DGO/SEM.DGO", - // "DGO/SEI.DGO", - // "DGO/DESG.DGO", - // "DGO/DESW.DGO", - // "DGO/LOUTRO3.DGO", - // "DGO/LDAMKLEV.DGO", - // "DGO/DESERROL.DGO", - // "DGO/RAILB2.DGO", - // "DGO/LERROL.DGO", - // "DGO/IPF.DGO", - // "DGO/RAILB.DGO", - // "DGO/LCTYHIJK.DGO", - // "DGO/CTYPEPB.DGO", - // "DGO/PRECB.DGO", - // "DGO/LFORM.DGO", - // "DGO/WASLEAPR.DGO", - // "DGO/LKEIRA.DGO", - // "DGO/LJAK.DGO", - // "DGO/SLUMBSET.DGO", - // "DGO/FACD.DGO", - // "DGO/LWASSIG.DGO", - // "DGO/LBIPED.DGO", - // "DGO/DESD.DGO", - // "DGO/CFB.DGO", + // "DGO/GUNGAME2.DGO", + // "DGO/POWERGD.DGO", + // "DGO/FREEHQ.DGO", // "DGO/FREECAST.DGO", + // "DGO/CITYCAST.DGO", + // "DGO/GRIDCST.DGO", // city-destroy-grid-res + // "DGO/SLUMBSET.DGO", // sewer-met-hum-intro + // sewer + "DGO/SEA.DGO", + // "DGO/SEB.DGO", + // "DGO/SEC.DGO", + // "DGO/SED.DGO", + // "DGO/SEE.DGO", + // "DGO/SEF.DGO", // "DGO/SEG.DGO", + // "DGO/SEH.DGO", + // "DGO/SEI.DGO", + // "DGO/SEJ.DGO", + // "DGO/SEK.DGO", + // "DGO/SEL.DGO", + // "DGO/SEM.DGO", + // "DGO/SEN.DGO", + // "DGO/SEO.DGO", + // 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/LPATK.DGO", - // "DGO/FRSTX.DGO", - // "DGO/SEB.DGO", - // "DGO/DESBCST.DGO", - // "DGO/DESE.DGO", - // "DGO/DESOASIS.DGO", - // "DGO/CTYCARA.DGO", - // "DGO/LSIGKLV.DGO", - // "DGO/CIB.DGO", - // "DGO/LBBRING2.DGO", - // "DGO/LTNFXHIP.DGO", - // "DGO/MIA.DGO", - // "DGO/MHCB.DGO", - // "DGO/LNSTOBC.DGO", - // "DGO/COMBD.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", - // "DGO/LTORNJNX.DGO", - // "DGO/DESBATTL.DGO", - // "DGO/SEK.DGO", - // "DGO/LSNKWHLS.DGO", - // "DGO/LMHCB.DGO", - // "DGO/LBOMBBOT.DGO", - // "DGO/OUTCAST3.DGO", - // "DGO/LBLOWTMH.DGO", - // "DGO/TEMD.DGO", - // "DGO/LTOWCITY.DGO", - // "DGO/OUTROCST.DGO", - // "DGO/WASCAST.DGO", - // "DGO/LFACRM2.DGO", - // "DGO/WASPGAME.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/RAILB.DGO", + // "DGO/RAILB2.DGO", + // "DGO/RAILC.DGO", + // "DGO/RAILCST.DGO", + // "DGO/RAILD.DGO", // "DGO/RAILE.DGO", - // "DGO/CTYPESB.DGO", - // "DGO/DESBOSS1.DGO", - // "DGO/FREEHQ.DGO", - // "DGO/LTORN.DGO", - // "DGO/TOWERA.DGO", - // "DGO/LSAMOS.DGO", - // "DGO/LFORP.DGO", - // "DGO/CFA.DGO", - // "DGO/LJINX.DGO", - // "DGO/SEO.DGO", + // "DGO/RAILF.DGO", + // "DGO/RAILX.DGO", + // // precursor // "DGO/PRECA.DGO", - // "DGO/TOWERC.DGO", - // "DGO/WCA.DGO", - // "DGO/SEC.DGO", - // "DGO/DESF.DGO", - // "DGO/SEL.DGO", - // "DGO/LCTYDEST.DGO", - // "DGO/LTORNSAM.DGO", - // "DGO/MUSEUM3B.DGO", - // "DGO/SEE.DGO", - // "DGO/DESHUNT.DGO", - // "DGO/RAILA.DGO", + // "DGO/PRECB.DGO", + // "DGO/PRECC.DGO", + // "DGO/PRECD.DGO", + // // title/intro + // "DGO/WIN.DGO", // wasintro // "DGO/TITLE.DGO", - // "DGO/RUBC.DGO", - // "DGO/DESB.DGO", - // "DGO/LFACCAR.DGO", - // "DGO/LNSTOA.DGO", - // "DGO/MUSEUM3.DGO", - // "DGO/ONINTENT.DGO", - // "DGO/STA.DGO", - // "DGO/WASSTADA.DGO", - // "DGO/POWERGD.DGO", - // "DGO/LKLEEVER.DGO", - // "DGO/FACB.DGO", - // "DGO/LCTYASS.DGO", - // "DGO/MHCA.DGO", - // "DGO/LTOWB.DGO", - // "DGO/LNSTCST.DGO", - // "DGO/DESRESCG.DGO", - // "DGO/INTPALRF.DGO", - // "DGO/LMHCA.DGO", - // "DGO/TOWERCST.DGO", - // "DGO/RAILF.DGO", - // "DGO/CIA.DGO", - // "DGO/CTYCARKG.DGO", - // "DGO/WASCHASE.DGO", - // "DGO/LFACO.DGO", - // "DGO/WIN.DGO", - // "DGO/TEMPLEE.DGO", - // "DGO/LBBSPIRT.DGO", - // "DGO/MUSEUM2.DGO", // "DGO/INTTITLE.DGO", - // "DGO/STAA.DGO", + // "DGO/INTPALRF.DGO", // intro-palace-roof + // "DGO/IPF.DGO", // intro-palace-fall + // "DGO/INTROCST.DGO", + // // outro + // "DGO/OUTCAST3.DGO", + // "DGO/OUTROCST.DGO", + // // museum + // "DGO/MUSEUM.DGO", + // "DGO/MUSEUM2.DGO", + // "DGO/MUSEUM3.DGO", + // "DGO/MUSEUM3B.DGO", + // "DGO/MUSEUM4.DGO", // "DGO/MUSEUM4B.DGO", - // "DGO/PRECD.DGO", - // "DGO/SEF.DGO", - // "DGO/CTYCARB.DGO", - // "DGO/WASDEFEN.DGO", - // "DGO/LBLOWTKG.DGO", - // "DGO/DESA.DGO", - // "DGO/COMBB.DGO", - // "DGO/WASSTADC.DGO", - // "DGO/DESC.DGO", - // "DGO/LDAMPECK.DGO", - // "DGO/LJAKSIG.DGO", - // "DGO/HALFPIPE.DGO", - // "DGO/DESRACE1.DGO", - // "DGO/SEN.DGO", - // "DGO/TEMP.DGO", - // "DGO/SED.DGO", - // "DGO/LFACB.DGO", - // "DGO/LCTYSNPR.DGO", - // "DGO/LBBSPID.DGO", - // "DGO/FRSTA.DGO", + // test + "DGO/HALFPIPE.DGO", + // // borrow + // "DGO/LASHELIN.DGO", + // "DGO/LBBRING1.DGO", + // "DGO/LBBRING2.DGO", + // "DGO/LBBRING3.DGO", + // "DGO/LBBRING4.DGO", // "DGO/LBBRING5.DGO", - // "DGO/LBBSPRT3.DGO", - // "DGO/HHG.DGO", + // "DGO/LBBRING6.DGO", + // "DGO/LBBSDRP1.DGO", + // "DGO/LBBSDRP2.DGO", + // "DGO/LBBSDRP3.DGO", + // "DGO/LBBSPID.DGO", + // "DGO/LBBSPIRT.DGO", // "DGO/LBBSPRT2.DGO", - // "DGO/CGB.DGO", - // "DGO/LDMPCKGN.DGO", - // "DGO/LSEEMWCA.DGO", - // "DGO/HGB.DGO", - // "DGO/LONINSIM.DGO", - // "DGO/RUBA.DGO", - // "DGO/DESRALLY.DGO", - // "DGO/WWD.DGO", - // "DGO/STB.DGO", - // "DGO/MIB.DGO", + // "DGO/LBBSPRT3.DGO", + // "DGO/LBBTCHA1.DGO", + // "DGO/LBBTCHA2.DGO", + // "DGO/LBBTCHA3.DGO", + // "DGO/LBIPED.DGO", + // "DGO/LBLOWCST.DGO", + // "DGO/LBLOWTKG.DGO", + // "DGO/LBLOWTMH.DGO", + // "DGO/LBOMBBOT.DGO", + // "DGO/LCITYSML.DGO", + // "DGO/LCTYASS.DGO", // "DGO/LCTYBLOW.DGO", - // "DGO/LWSTDPCK.DGO", - // "DGO/MUSEUM.DGO", - // "DGO/LJAKCKLV.DGO", - // "DGO/LBBRING1.DGO", - // "DGO/MUSEUM4.DGO", - // "DGO/LFACRM1.DGO", - // "DGO/LJKCDMKL.DGO", + // "DGO/LCTYDEST.DGO", + // "DGO/LCTYHIJK.DGO", + // "DGO/LCTYPALT.DGO", + // "DGO/LCTYPATK.DGO", + // "DGO/LCTYPROT.DGO", + // "DGO/LCTYSNPR.DGO", + // "DGO/LDAMKLEV.DGO", + // "DGO/LDAMPECK.DGO", + // "DGO/LDAMPKSM.DGO", // "DGO/LDAMSIG.DGO", - // "DGO/DESTRACK.DGO", - // "DGO/GGA.DGO", - // "DGO/RAILC.DGO", - // "DGO/LBBTCHA2.DGO", - // "DGO/DESINTER.DGO", - // "DGO/NSB.DGO", - // "DGO/LOUTRO.DGO", - // "DGO/VIN.DGO", + // "DGO/LDAX.DGO", // "DGO/LDESGCST.DGO", - // "DGO/WARPCAST.DGO", - // "DGO/LBBRING6.DGO", - // "DGO/FRSTB.DGO", - // "DGO/TEMC.DGO", - // "DGO/COMBC.DGO", - // "DGO/LTRTWHLS.DGO", - // "DGO/PRECC.DGO", - // "DGO/DESCHASE.DGO", - // "DGO/CITYCAST.DGO", - // "DGO/CPO.DGO", - // "DGO/LFACCITY.DGO", - // "DGO/RAILCST.DGO", - // "DGO/LJNDKLEV.DGO", - // "DGO/CWI.DGO", - // "DGO/MINEE.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/LFORRING.DGO", - // "DGO/LASHELIN.DGO", - // "DGO/LJAKKLEV.DGO", - // "DGO/LCTYPALT.DGO", - // "DGO/LNSTOBB.DGO", - // "DGO/LJKFEET.DGO", - // "DGO/DST.DGO", - // "DGO/LBBTCHA1.DGO", + // "DGO/LFREEOUT.DGO", + // "DGO/LGUNNORM.DGO", // "DGO/LGUNRNC.DGO", - // "DGO/COMBN.DGO", - // "DGO/DESRESCC.DGO", - // "DGO/LSIGJAKC.DGO", - // "DGO/DESLIZ.DGO", - // "DGO/WASPALA.DGO", + // "DGO/LJAK.DGO", + // "DGO/LJAKC.DGO", + // "DGO/LJAKCKLV.DGO", + // "DGO/LJAKKLEV.DGO", // "DGO/LJAKNDAX.DGO", - // "DGO/WASSEEM.DGO", - // "DGO/WASALL.DGO", - // "DGO/WCASEEM.DGO", - // "DGO/LSIG.DGO", - // "DGO/LFACTORY.DGO", - // "DGO/LWLANDM.DGO", - // "DGO/LPTRL.DGO", - // "DGO/MINED.DGO", - // "DGO/LDAMPKSM.DGO", - // "DGO/RUBB.DGO", - // "DGO/LCITYSML.DGO", - // "DGO/RUBA2.DGO", + // "DGO/LJAKSIG.DGO", + // "DGO/LJINX.DGO", + // "DGO/LJKCDMKL.DGO", + // "DGO/LJKDMPK.DGO", + // "DGO/LJKDXVIN.DGO", + // "DGO/LJKFEET.DGO", + // "DGO/LJNDKLEV.DGO", + // "DGO/LKEIRA.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/LONINSIM.DGO", + // "DGO/LOUTRO.DGO", // "DGO/LOUTRO2.DGO", - // "DGO/VOCX.DGO", - // "DGO/TEMX.DGO", - // "DGO/ARENACST.DGO", - // "DGO/TEMB.DGO", - // "DGO/COMBA.DGO", - // "DGO/LBBSDRP3.DGO", + // "DGO/LOUTRO3.DGO", + // "DGO/LPATK.DGO", // "DGO/LPATKCS.DGO", - // "DGO/VOCA.DGO", - // "DGO/WASSTADB.DGO", - // "DGO/LDAX.DGO", - // "DGO/LCTYPROT.DGO", - // "DGO/DESHOVER.DGO", - // "DGO/DESBOSS2.DGO" + // "DGO/LPRECC.DGO", + // "DGO/LPRENME.DGO", + // "DGO/LPTRL.DGO", + // "DGO/LSAMOS.DGO", + // "DGO/LSEEMWCA.DGO", + // "DGO/LSIG.DGO", + // "DGO/LSIGJAKC.DGO", + // "DGO/LSIGKLV.DGO", + // "DGO/LSNKWHLS.DGO", + // "DGO/LTNFXHIP.DGO", + // "DGO/LTNJXHIP.DGO", + // "DGO/LTORN.DGO", + // "DGO/LTORNJNX.DGO", + // "DGO/LTORNSAM.DGO", + // "DGO/LTOWA.DGO", + // "DGO/LTOWB.DGO", + // "DGO/LTOWCITY.DGO", + // "DGO/LTRTWHLS.DGO", + // "DGO/LVINCST.DGO", + // "DGO/LWASBBV.DGO", + "DGO/LWASSIG.DGO", + // "DGO/LWLANDM.DGO", + "DGO/LWSTDPCK.DGO" ], // some objects are part of STR files (streaming data). "str_file_names": [], + // streaming "art" that should be added to GAME.FR3. + "str_art_file_names": ["STR/JAEXTERN.STR"], + // some objects are directly stored as files on the DVD. This is just text files. "object_file_names": [ "TEXT/0COMMON.TXT", @@ -321,277 +348,300 @@ ], "levels_to_extract": [ - "LJKDMPK.DGO", - "LBBSDRP1.DGO", - "LTNJXHIP.DGO", - "MIC.DGO", - "OASISCST.DGO", - "CTYPEPA.DGO", - "LPRENME.DGO", - "LFREEOUT.DGO", - "LGUNNORM.DGO", - // "LTOWA.DGO", - "TEMA.DGO", - "CTA.DGO", - "LPRECC.DGO", - "LJKDXVIN.DGO", - "CTYPEPC.DGO", - "SEA.DGO", - "COMBE.DGO", - "CTYPESA.DGO", - "LBLOWCST.DGO", - "WSD.DGO", - "LBBRING3.DGO", - "LCTYPATK.DGO", + // wascity + "WASALL.DGO", + "WWD.DGO", // waswide + "WSD.DGO", // wasdoors (garage) + "WASCHASE.DGO", + "WASDEFEN.DGO", + "WASLEAPR.DGO", + "WASPALA.DGO", + "WASSEEM.DGO", + "WASPGAME.DGO", + "WCA.DGO", "WCB.DGO", - "DESRESC.DGO", - "LBBRING4.DGO", - "GRIDCST.DGO", - // "RAILX.DGO", - "SEJ.DGO", - "LJAKC.DGO", - "CTB.DGO", - "CTYCARC.DGO", - "LMECH.DGO", - "LBBSDRP2.DGO", - "NSA.DGO", - "LBBTCHA3.DGO", - "GUNGAME2.DGO", - "CTC.DGO", - "LVINCST.DGO", - // "COMBX.DGO", + "WCASEEM.DGO", + "WASCAST.DGO", + // arena + "WASSTADA.DGO", + "WASSTADB.DGO", + "WASSTADC.DGO", + "ARENACST.DGO", + // desert + "DESA.DGO", + "DESB.DGO", + "DESBATTL.DGO", + "DESBCST.DGO", + "DESBOSS1.DGO", + "DESBOSS2.DGO", + "DESC.DGO", + "DESCHASE.DGO", + "DESD.DGO", + "DESE.DGO", + "DESERROL.DGO", + "DESF.DGO", + "DESG.DGO", "DESH.DGO", - "DESRACE2.DGO", - "RAILD.DGO", - "FACC.DGO", - "CTYPESC.DGO", - "LWASBBV.DGO", - "TOWB.DGO", - "HGA.DGO", - "SEH.DGO", - "MHCTYCST.DGO", - "GUNGAME1.DGO", - // "INTROCST.DGO", + "DESHOVER.DGO", + "DESHUNT.DGO", + "DESINTER.DGO", "DESJUMP.DGO", - "SEM.DGO", - "SEI.DGO", - "DESG.DGO", + "DESLIZ.DGO", + "DESOASIS.DGO", + "DESRACE1.DGO", + "DESRACE2.DGO", + "DESRALLY.DGO", + "DESRESC.DGO", + "DESRESCC.DGO", + "DESRESCG.DGO", + "DESTRACK.DGO", "DESW.DGO", - "LOUTRO3.DGO", - "LDAMKLEV.DGO", - "DESERROL.DGO", - "RAILB2.DGO", - "LERROL.DGO", - "IPF.DGO", - "RAILB.DGO", - "LCTYHIJK.DGO", - "CTYPEPB.DGO", - "PRECB.DGO", - "LFORM.DGO", - "WASLEAPR.DGO", - // "LKEIRA.DGO", - "LJAK.DGO", - "SLUMBSET.DGO", - "FACD.DGO", - // "LWASSIG.DGO", - "LBIPED.DGO", - "DESD.DGO", + "DST.DGO", + "OASISCST.DGO", + "WARPCAST.DGO", // air train + // nest + "NSA.DGO", + "NSB.DGO", + // temple + "TEMA.DGO", + "TEMB.DGO", + "TEMC.DGO", + "TEMD.DGO", + "TEMP.DGO", + "TEMPLEE.DGO", + "TEMX.DGO", + // hang + "HGA.DGO", + "HGB.DGO", + // volcano + "VOCA.DGO", + "VOCX.DGO", + // mine + "MIA.DGO", + "MIB.DGO", + "MIC.DGO", + "MINED.DGO", + "MINEE.DGO", + // city + "CWI.DGO", // ctywide + "CFA.DGO", // ctyfarm "CFB.DGO", - "FREECAST.DGO", - "SEG.DGO", - "FACTORYA.DGO", - "LPATK.DGO", - "FRSTX.DGO", - "SEB.DGO", - // "DESBCST.DGO", - "DESE.DGO", - "DESOASIS.DGO", - "CTYCARA.DGO", - "LSIGKLV.DGO", + "CGB.DGO", // ctygen + "CIA.DGO", // ctyind "CIB.DGO", - "LBBRING2.DGO", - "LTNFXHIP.DGO", - "MIA.DGO", - "MHCB.DGO", - "LNSTOBC.DGO", - "COMBD.DGO", - // "RBCT.DGO", - "LTORNJNX.DGO", - // "DESBATTL.DGO", - "SEK.DGO", - "LSNKWHLS.DGO", - "LMHCB.DGO", - // "LBOMBBOT.DGO", - "OUTCAST3.DGO", - "LBLOWTMH.DGO", - "TEMD.DGO", - "LTOWCITY.DGO", - // "OUTROCST.DGO", - "WASCAST.DGO", - "LFACRM2.DGO", - "WASPGAME.DGO", - "RAILE.DGO", - "CTYPESB.DGO", - "DESBOSS1.DGO", + "CPO.DGO", // ctyport + "CTA.DGO", // ctyslum + "CTB.DGO", + "CTC.DGO", + "CTYPEPA.DGO", // citizens + "CTYPEPB.DGO", // predator + "CTYPEPC.DGO", // empty + "CTYPESA.DGO", // guards + "CTYPESB.DGO", // metal heads + "CTYPESC.DGO", // kg + "CTYCARA.DGO", // cars + "CTYCARB.DGO", // bikes + "CTYCARC.DGO", // hellcat + "CTYCARKG.DGO", // empty + "ONINTENT.DGO", + "VIN.DGO", + "HHG.DGO", // hiphog + "GGA.DGO", // gungame + "GUNGAME1.DGO", + "GUNGAME2.DGO", + "POWERGD.DGO", "FREEHQ.DGO", - "LTORN.DGO", - "TOWERA.DGO", - "LSAMOS.DGO", - "LFORP.DGO", - "CFA.DGO", - "LJINX.DGO", - "SEO.DGO", - "PRECA.DGO", - "TOWERC.DGO", - "WCA.DGO", + "FREECAST.DGO", + "CITYCAST.DGO", + "GRIDCST.DGO", // city-destroy-grid-res + "SLUMBSET.DGO", // sewer-met-hum-intro + // sewer + "SEA.DGO", + "SEB.DGO", "SEC.DGO", - "DESF.DGO", + "SED.DGO", + "SEE.DGO", + "SEF.DGO", + "SEG.DGO", + "SEH.DGO", + "SEI.DGO", + "SEJ.DGO", + "SEK.DGO", "SEL.DGO", - "LCTYDEST.DGO", - "LTORNSAM.DGO", - "MUSEUM3B.DGO", - // "SEE.DGO", - "DESHUNT.DGO", - "RAILA.DGO", - "TITLE.DGO", - "RUBC.DGO", - // "DESB.DGO", - "LFACCAR.DGO", - "LNSTOA.DGO", - "MUSEUM3.DGO", - "ONINTENT.DGO", - "STA.DGO", - "WASSTADA.DGO", - "POWERGD.DGO", - "LKLEEVER.DGO", - "FACB.DGO", - "LCTYASS.DGO", + "SEM.DGO", + "SEN.DGO", + "SEO.DGO", + // mhcity "MHCA.DGO", - "LTOWB.DGO", - "LNSTCST.DGO", - "DESRESCG.DGO", - "INTPALRF.DGO", - "LMHCA.DGO", + "MHCB.DGO", + "MHCTYCST.DGO", + // forest + "FRSTA.DGO", + "FRSTB.DGO", + "FRSTX.DGO", + // factory + "FACTORYA.DGO", + "FACB.DGO", + "FACC.DGO", + "FACD.DGO", + // tower + "TOWB.DGO", + "TOWERA.DGO", + "TOWERC.DGO", "TOWERCST.DGO", + // stadium + "STA.DGO", + "STAA.DGO", + "STB.DGO", + // rubble + "RUBA.DGO", + "RUBA2.DGO", + "RUBB.DGO", + "RUBC.DGO", + "RBCT.DGO", + // comb + "COMBA.DGO", + "COMBB.DGO", + "COMBC.DGO", + "COMBD.DGO", + "COMBE.DGO", + "COMBN.DGO", + "COMBX.DGO", + "RAILA.DGO", + "RAILB.DGO", + "RAILB2.DGO", + "RAILC.DGO", + "RAILCST.DGO", + "RAILD.DGO", + "RAILE.DGO", "RAILF.DGO", - "CIA.DGO", - "CTYCARKG.DGO", - "WASCHASE.DGO", - "LFACO.DGO", - "WIN.DGO", - "TEMPLEE.DGO", - "LBBSPIRT.DGO", - "MUSEUM2.DGO", + "RAILX.DGO", + // precursor + "PRECA.DGO", + "PRECB.DGO", + "PRECC.DGO", + "PRECD.DGO", + // title + "WIN.DGO", // wasintro + "TITLE.DGO", "INTTITLE.DGO", - "STAA.DGO", + "INTPALRF.DGO", // intro-palace-roof + "IPF.DGO", // intro-palace-fall + "INTROCST.DGO", + // outro + "OUTCAST3.DGO", + "OUTROCST.DGO", + // museum + "MUSEUM.DGO", + "MUSEUM2.DGO", + "MUSEUM3.DGO", + "MUSEUM3B.DGO", + "MUSEUM4.DGO", "MUSEUM4B.DGO", - // "PRECD.DGO", - "SEF.DGO", - "CTYCARB.DGO", - "WASDEFEN.DGO", - "LBLOWTKG.DGO", - "DESA.DGO", - "COMBB.DGO", - // "WASSTADC.DGO", - "DESC.DGO", - // "LDAMPECK.DGO", - // "LJAKSIG.DGO", + // test "HALFPIPE.DGO", - "DESRACE1.DGO", - "SEN.DGO", - "TEMP.DGO", - "SED.DGO", - "LFACB.DGO", - "LCTYSNPR.DGO", - "LBBSPID.DGO", - "FRSTA.DGO", + // borrow + "LASHELIN.DGO", + "LBBRING1.DGO", + "LBBRING2.DGO", + "LBBRING3.DGO", + "LBBRING4.DGO", "LBBRING5.DGO", - "LBBSPRT3.DGO", - "HHG.DGO", + "LBBRING6.DGO", + "LBBSDRP1.DGO", + "LBBSDRP2.DGO", + "LBBSDRP3.DGO", + "LBBSPID.DGO", + "LBBSPIRT.DGO", "LBBSPRT2.DGO", - "CGB.DGO", - "LDMPCKGN.DGO", - "LSEEMWCA.DGO", - // "HGB.DGO", - "LONINSIM.DGO", - "RUBA.DGO", - "DESRALLY.DGO", - "WWD.DGO", - "STB.DGO", - "MIB.DGO", + "LBBSPRT3.DGO", + "LBBTCHA1.DGO", + "LBBTCHA2.DGO", + "LBBTCHA3.DGO", + "LBIPED.DGO", + "LBLOWCST.DGO", + "LBLOWTKG.DGO", + "LBLOWTMH.DGO", + "LBOMBBOT.DGO", + "LCITYSML.DGO", + "LCTYASS.DGO", "LCTYBLOW.DGO", - "LWSTDPCK.DGO", - // "MUSEUM.DGO", - "LJAKCKLV.DGO", - "LBBRING1.DGO", - "MUSEUM4.DGO", - "LFACRM1.DGO", - "LJKCDMKL.DGO", + "LCTYDEST.DGO", + "LCTYHIJK.DGO", + "LCTYPALT.DGO", + "LCTYPATK.DGO", + "LCTYPROT.DGO", + "LCTYSNPR.DGO", + "LDAMKLEV.DGO", + "LDAMPECK.DGO", + "LDAMPKSM.DGO", "LDAMSIG.DGO", - "DESTRACK.DGO", - "GGA.DGO", - "RAILC.DGO", - "LBBTCHA2.DGO", - "DESINTER.DGO", - // "NSB.DGO", - "LOUTRO.DGO", - "VIN.DGO", + "LDAX.DGO", "LDESGCST.DGO", - "WARPCAST.DGO", - "LBBRING6.DGO", - "FRSTB.DGO", - "TEMC.DGO", - // "COMBC.DGO", - "LTRTWHLS.DGO", - "PRECC.DGO", - "DESCHASE.DGO", - "CITYCAST.DGO", - // "CPO.DGO", + "LDMPCKGN.DGO", + "LERROL.DGO", + "LFACB.DGO", + "LFACCAR.DGO", "LFACCITY.DGO", - "RAILCST.DGO", - "LJNDKLEV.DGO", - "CWI.DGO", - "MINEE.DGO", + "LFACO.DGO", + "LFACRM1.DGO", + "LFACRM2.DGO", + "LFACTORY.DGO", + "LFORM.DGO", + "LFORP.DGO", "LFORRING.DGO", - "LASHELIN.DGO", - "LJAKKLEV.DGO", - "LCTYPALT.DGO", - "LNSTOBB.DGO", - "LJKFEET.DGO", - "DST.DGO", - "LBBTCHA1.DGO", + "LFREEOUT.DGO", + "LGUNNORM.DGO", "LGUNRNC.DGO", - "COMBN.DGO", - "DESRESCC.DGO", - "LSIGJAKC.DGO", - "DESLIZ.DGO", - "WASPALA.DGO", + "LJAK.DGO", + "LJAKC.DGO", + "LJAKCKLV.DGO", + "LJAKKLEV.DGO", "LJAKNDAX.DGO", - // "WASSEEM.DGO", - "WASALL.DGO", - "WCASEEM.DGO", - // "LSIG.DGO", - "LFACTORY.DGO", - "LWLANDM.DGO", - "LPTRL.DGO", - "MINED.DGO", - "LDAMPKSM.DGO", - "RUBB.DGO", - "LCITYSML.DGO", - "RUBA2.DGO", + "LJAKSIG.DGO", + "LJINX.DGO", + "LJKCDMKL.DGO", + "LJKDMPK.DGO", + "LJKDXVIN.DGO", + "LJKFEET.DGO", + "LJNDKLEV.DGO", + "LKEIRA.DGO", + "LKLEEVER.DGO", + "LMECH.DGO", + "LMHCA.DGO", + "LMHCB.DGO", + "LNSTCST.DGO", + "LNSTOA.DGO", + "LNSTOBB.DGO", + "LNSTOBC.DGO", + "LONINSIM.DGO", + "LOUTRO.DGO", "LOUTRO2.DGO", - "VOCX.DGO", - // "TEMX.DGO", - "ARENACST.DGO", - "TEMB.DGO", - "COMBA.DGO", - "LBBSDRP3.DGO", + "LOUTRO3.DGO", + "LPATK.DGO", "LPATKCS.DGO", - "VOCA.DGO", - "WASSTADB.DGO", - "LDAX.DGO", - "LCTYPROT.DGO", - "DESHOVER.DGO", - "DESBOSS2.DGO" + "LPRECC.DGO", + "LPRENME.DGO", + "LPTRL.DGO", + "LSAMOS.DGO", + "LSEEMWCA.DGO", + "LSIG.DGO", + "LSIGJAKC.DGO", + "LSIGKLV.DGO", + "LSNKWHLS.DGO", + "LTNFXHIP.DGO", + "LTNJXHIP.DGO", + "LTORN.DGO", + "LTORNJNX.DGO", + "LTORNSAM.DGO", + "LTOWA.DGO", + "LTOWB.DGO", + "LTOWCITY.DGO", + "LTRTWHLS.DGO", + "LVINCST.DGO", + "LWASBBV.DGO", + "LWASSIG.DGO", + "LWLANDM.DGO", + "LWSTDPCK.DGO" ] } diff --git a/decompiler/config/jak3/ntsc_v1/label_types.jsonc b/decompiler/config/jak3/ntsc_v1/label_types.jsonc index 411dd9b193..75908da03d 100644 --- a/decompiler/config/jak3/ntsc_v1/label_types.jsonc +++ b/decompiler/config/jak3/ntsc_v1/label_types.jsonc @@ -66,7 +66,8 @@ ["L305", "cloth-params"], ["L304", "cloth-params"], ["L303", "cloth-params"], - ["L296", "cloth-params"] + ["L296", "cloth-params"], + ["L198", "cloth-params"] ], "joint-mod": [["L212", "(inline-array vector)", 3]], "game-info": [ @@ -314,9 +315,1080 @@ ["L794", "vector4w"], ["L792", "vector4w"] ], - "level": [["L1003", "uint64", true]], "foreground": [ ["L215", "(pointer bucket-id-16)", 462], ["L214", "vector"] + ], + "font-data": [ + ["L1", "(inline-array vector)", 250], + ["L2", "(inline-array vector)", 250] + ], + "shrubbery": [ + ["L155", "(pointer bucket-id)", 12], + ["L152", "(pointer bucket-id)", 12], + ["L151", "(pointer bucket-id)", 12], + ["L150", "(pointer bucket-id)", 12], + ["L153", "(pointer bucket-id)", 12] + ], + "tfrag-methods": [ + ["L89", "(inline-array tfrag-init-data)", 10], + ["L90", "(pointer bucket-id)", 12], + ["L91", "(pointer bucket-id)", 12], + ["L92", "(pointer bucket-id)", 12], + ["L93", "(pointer bucket-id)", 12], + ["L95", "(pointer bucket-id)", 10], + ["L96", "(pointer bucket-id)", 10] + ], + "tie-methods": [ + ["L268", "(inline-array tie-init-data)", 10], + ["L284", "(pointer bucket-id)", 10], + ["L282", "(pointer bucket-id)", 10], + ["L280", "(pointer bucket-id)", 10], + ["L279", "(pointer bucket-id)", 10], + ["L278", "(pointer bucket-id)", 10], + ["L277", "(pointer bucket-id)", 10], + ["L276", "(pointer bucket-id)", 10], + ["L275", "(pointer bucket-id)", 10], + ["L274", "(pointer bucket-id)", 10], + ["L273", "(pointer bucket-id)", 10], + ["L272", "(pointer bucket-id)", 10], + ["L271", "(pointer bucket-id)", 10], + ["L270", "(pointer bucket-id)", 10] + ], + "fma-sphere": [["L45", "attack-info"]], + "water": [ + ["L249", "attack-info"], + ["L248", "attack-info"], + ["L242", "(inline-array water-sphere)", 30] + ], + "progress": [ + ["L970", "uint64", true], + ["L944", "uint64", true], + ["L954", "uint64", true], + ["L949", "uint64", true], + ["L948", "uint64", true], + ["L947", "uint64", true], + ["L955", "uint64", true], + ["L950", "uint64", true], + ["L957", "uint64", true], + ["L958", "uint64", true], + ["L945", "uint64", true], + ["L951", "uint64", true], + ["L953", "uint64", true], + ["L959", "uint64", true], + ["L961", "uint64", true], + ["L956", "uint64", true], + ["L946", "uint64", true], + ["L952", "uint64", true], + ["L960", "uint64", true] + ], + "progress-draw": [ + ["L462", "uint64", true], + ["L463", "uint64", true], + ["L464", "uint64", true] + ], + "hud": [["L240", "vector"]], + "hud-classes": [ + ["L205", "(inline-array hud-sprite)", 24], + ["L214", "(inline-array vector)", 16] + ], + "level": [ + ["L1004", "uint64", true], + ["L1003", "uint64", true] + ], + "airlock": [ + ["L316", "vector"], + ["L317", "vector"], + ["L321", "(inline-array vector)", 2], + ["L320", "vector"], + ["L319", "vector"], + ["L318", "(inline-array vector)", 2] + ], + "water-anim": [ + ["L63", "attack-info"], + ["L62", "attack-info"] + ], + "blocking-plane": [ + ["L55", "vector"], + ["L57", "attack-info"] + ], + "enemy": [ + ["L658", "uint64", true], + ["L660", "uint64", true], + ["L659", "uint64", true], + ["L652", "attack-info"] + ], + "enemy-states": [["L357", "attack-info"]], + "process-taskable": [["L127", "attack-info"]], + "warp-gate": [ + ["L677", "uint64", true], + ["L676", "uint64", true], + ["L562", "vector"], + ["L641", "uint64", true], + ["L642", "uint64", true], + ["L640", "uint64", true] + ], + "shield-sphere": [["L129", "attack-info"]], + "text": [["L97", "(inline-array vector4w)", 4]], + "gun-red-shot": [ + ["L558", "uint64", true], + ["L556", "uint64", true], + ["L554", "uint64", true], + ["L553", "uint64", true], + ["L559", "uint64", true], + ["L555", "uint64", true], + ["L557", "uint64", true], + ["L552", "uint64", true], + ["L445", "uint64", true], + ["L442", "uint64", true], + ["L451", "uint64", true], + ["L444", "uint64", true], + ["L412", "attack-info"], + ["L446", "uint64", true], + ["L449", "uint64", true], + ["L448", "uint64", true], + ["L447", "uint64", true], + ["L440", "uint64", true], + ["L432", "attack-info"], + ["L431", "attack-info"], + ["L428", "attack-info"], + ["L439", "uint64", true], + ["L441", "uint64", true], + ["L443", "uint64", true], + ["L405", "attack-info"], + ["L450", "uint64", true] + ], + "gun-dark-shot": [ + ["L824", "uint64", true], + ["L827", "uint64", true], + ["L823", "uint64", true], + ["L826", "uint64", true], + ["L828", "uint64", true], + ["L829", "uint64", true], + ["L825", "uint64", true], + ["L830", "uint64", true], + ["L707", "uint64", true], + ["L704", "uint64", true], + ["L702", "uint64", true], + ["L701", "uint64", true], + ["L700", "uint64", true], + ["L710", "uint64", true], + ["L648", "attack-info"], + ["L647", "attack-info"], + ["L638", "attack-info"], + ["L637", "attack-info"], + ["L639", "attack-info"], + ["L708", "uint64", true], + ["L643", "attack-info"], + ["L644", "attack-info"], + ["L712", "uint64", true], + ["L711", "uint64", true], + ["L709", "uint64", true], + ["L664", "attack-info"], + ["L703", "uint64", true], + ["L699", "uint64", true], + ["L705", "uint64", true], + ["L706", "uint64", true] + ], + "gun-part": [["L537", "(pointer rgba)", 36]], + "target-darkjak": [ + ["L526", "uint64", true], + ["L506", "uint64", true], + ["L500", "uint64", true], + ["L504", "uint64", true], + ["L499", "uint64", true], + ["L507", "uint64", true], + ["L497", "uint64", true], + ["L498", "uint64", true], + ["L509", "uint64", true], + ["L494", "uint64", true], + ["L508", "uint64", true], + ["L496", "uint64", true], + ["L450", "attack-info"], + ["L505", "uint64", true], + ["L495", "uint64", true], + ["L503", "uint64", true], + ["L501", "uint64", true], + ["L502", "uint64", true] + ], + "gun-blue-shot": [ + ["L405", "(inline-array vector)", 20], + ["L404", "(pointer int32)", 12] + ], + "collide-shape": [ + ["L372", "attack-info"], + ["L379", "vector"], + ["L392", "attack-info"], + ["L391", "attack-info"], + ["L390", "attack-info"], + ["L389", "attack-info"], + ["L388", "attack-info"], + ["L387", "attack-info"], + ["L386", "attack-info"], + ["L385", "attack-info"], + ["L384", "attack-info"], + ["L383", "attack-info"], + ["L382", "attack-info"] + ], + "collide-cache": [["L184", "vector"]], + "default-menu": [ + ["L6792", "attack-info"], + ["L6786", "attack-info"], + ["L7268", "uint64", true], + ["L7274", "uint64", true], + ["L7271", "uint64", true], + ["L7267", "uint64", true], + ["L7269", "uint64", true], + ["L7273", "uint64", true], + ["L7272", "uint64", true], + ["L7270", "uint64", true] + ], + "anim-tester": [ + ["L705", "uint64", true], + ["L701", "uint64", true], + ["L700", "uint64", true], + ["L704", "uint64", true], + ["L699", "uint64", true], + ["L698", "uint64", true], + ["L703", "uint64", true], + ["L702", "uint64", true] + ], + "target-part": [["L627", "uint64", true]], + "script": [ + ["L3032", "vector"], + ["L1164", "attack-info"], + ["L2329", "attack-info"], + ["L2328", "attack-info"], + ["L2578", "vector"] + ], + "mood": [ + ["L267", "vector"], + ["L265", "vector"], + ["L263", "vector"], + ["L261", "vector"], + ["L259", "vector"], + ["L257", "vector"] + ], + "sky-data": [ + ["L26", "(inline-array sky-vertex)", 12], + ["L25", "(inline-array sky-vertex)", 12], + ["L23", "(inline-array sky-vertex)", 648], + ["L21", "(inline-array sky-vertex)", 144] + ], + "mood-funcs": [ + ["L198", "uint64", true], + ["L197", "uint64", true], + ["L202", "uint64", true], + ["L199", "uint64", true], + ["L196", "uint64", true], + ["L200", "uint64", true], + ["L203", "uint64", true], + ["L201", "uint64", true] + ], + "target-tube": [["L191", "attack-info"]], + "mech": [["L118", "attack-info"]], + "target-mech": [ + ["L256", "attack-info"], + ["L250", "vector"], + ["L249", "vector"] + ], + "mech-states": [ + ["L675", "uint64", true], + ["L655", "uint64", true], + ["L663", "uint64", true], + ["L668", "uint64", true], + ["L659", "uint64", true], + ["L669", "uint64", true], + ["L654", "uint64", true], + ["L653", "uint64", true], + ["L672", "uint64", true], + ["L657", "uint64", true], + ["L656", "uint64", true], + ["L674", "uint64", true], + ["L676", "uint64", true], + ["L667", "uint64", true], + ["L658", "uint64", true], + ["L673", "uint64", true], + ["L670", "uint64", true], + ["L662", "uint64", true], + ["L661", "uint64", true], + ["L660", "uint64", true], + ["L666", "uint64", true], + ["L665", "uint64", true], + ["L652", "uint64", true], + ["L629", "attack-info"], + ["L671", "uint64", true], + ["L664", "uint64", true] + ], + "target-flut": [ + ["L789", "uint64", true], + ["L766", "uint64", true], + ["L767", "uint64", true], + ["L774", "uint64", true], + ["L765", "uint64", true], + ["L768", "uint64", true], + ["L771", "uint64", true], + ["L773", "uint64", true], + ["L776", "uint64", true], + ["L750", "attack-info"], + ["L775", "uint64", true], + ["L770", "uint64", true], + ["L748", "attack-info"], + ["L769", "uint64", true], + ["L736", "attack-info"], + ["L735", "attack-info"], + ["L741", "attack-info"], + ["L740", "attack-info"], + ["L739", "attack-info"], + ["L772", "uint64", true], + ["L727", "attack-info"], + ["L764", "uint64", true], + ["L763", "uint64", true], + ["L762", "uint64", true] + ], + "flut": [ + ["L139", "attack-info"], + ["L138", "attack-info"], + ["L137", "attack-info"] + ], + "minimap": [ + ["L557", "uint64", true], + ["L556", "uint64", true], + ["L314", "(inline-array minimap-class-node)", 177], + ["L522", "uint64", true], + ["L521", "uint64", true], + ["L518", "uint64", true], + ["L523", "uint64", true], + ["L517", "uint64", true], + ["L524", "uint64", true], + ["L519", "uint64", true], + ["L520", "uint64", true] + ], + "task-control": [ + ["L1270", "uint64", true], + ["L1271", "uint64", true], + ["L851", "uint64", true], + ["L750", "attack-info"], + ["L850", "uint64", true], + ["L849", "uint64", true], + ["L852", "uint64", true], + ["L853", "uint64", true] + ], + "nav-mesh": [["L271", "(inline-array vector)", 2]], + "nav-enemy": [ + ["L458", "uint64", true], + ["L459", "uint64", true], + ["L464", "uint64", true], + ["L463", "uint64", true], + ["L462", "uint64", true], + ["L461", "uint64", true], + ["L460", "uint64", true] + ], + "elec-gate": [["L155", "attack-info"]], + "gekko": [ + ["L544", "uint64", true], + ["L541", "uint64", true], + ["L542", "uint64", true], + ["L543", "uint64", true], + ["L479", "uint64", true], + ["L478", "uint64", true], + ["L474", "uint64", true], + ["L477", "uint64", true], + ["L476", "uint64", true], + ["L468", "(inline-array gekko-ik-setup)", 4], + ["L473", "uint64", true], + ["L475", "uint64", true] + ], + "mine-train": [["L190", "attack-info"]], + "grunt": [ + ["L204", "vector"], + ["L203", "vector"] + ], + "merc-blend-shape": [["L71", "(pointer int16)", 40]], + "vehicle-util": [["L245", "attack-info"]], + "prebot-eco-creature": [ + ["L320", "attack-info"], + ["L319", "attack-info"], + ["L331", "attack-info"] + ], + "prebot-extras": [ + ["L290", "uint64", true], + ["L293", "uint64", true], + ["L291", "uint64", true], + ["L292", "uint64", true], + ["L205", "attack-info"], + ["L262", "uint64", true], + ["L263", "uint64", true], + ["L268", "uint64", true], + ["L264", "uint64", true], + ["L266", "uint64", true], + ["L265", "uint64", true], + ["L227", "attack-info"], + ["L242", "attack-info"], + ["L267", "uint64", true], + ["L259", "uint64", true], + ["L261", "uint64", true], + ["L269", "uint64", true], + ["L246", "attack-info"], + ["L260", "uint64", true], + ["L270", "uint64", true], + ["L254", "vector"], + ["L255", "vector"], + ["L256", "vector"] + ], + "prebot-states": [ + ["L921", "uint64", true], + ["L912", "uint64", true], + ["L907", "uint64", true], + ["L913", "uint64", true], + ["L885", "(inline-array vector)", 2], + ["L887", "vector"], + ["L904", "uint64", true], + ["L902", "uint64", true], + ["L911", "uint64", true], + ["L899", "uint64", true], + ["L910", "uint64", true], + ["L909", "uint64", true], + ["L900", "uint64", true], + ["L906", "uint64", true], + ["L901", "uint64", true], + ["L905", "uint64", true], + ["L903", "uint64", true], + ["L898", "uint64", true], + ["L908", "uint64", true] + ], + "wasall-obs": [ + ["L1352", "uint64", true], + ["L1351", "uint64", true], + ["L1324", "uint64", true], + ["L1323", "uint64", true], + ["L1279", "attack-info"] + ], + "sew-laser-guard": [ + ["L75", "attack-info"], + ["L78", "attack-info"], + ["L81", "attack-info"] + ], + "sewer-obs": [ + ["L496", "uint64", true], + ["L495", "uint64", true], + ["L493", "uint64", true], + ["L497", "uint64", true], + ["L491", "uint64", true], + ["L494", "uint64", true], + ["L498", "uint64", true], + ["L490", "uint64", true], + ["L487", "uint64", true], + ["L488", "uint64", true], + ["L492", "uint64", true], + ["L489", "uint64", true], + ["L252", "attack-info"], + ["L390", "uint64", true], + ["L391", "uint64", true], + ["L397", "uint64", true], + ["L323", "attack-info"], + ["L396", "uint64", true], + ["L395", "uint64", true], + ["L331", "vector"], + ["L392", "uint64", true], + ["L399", "uint64", true], + ["L393", "uint64", true], + ["L398", "uint64", true], + ["L265", "vector"], + ["L394", "uint64", true], + ["L289", "attack-info"] + ], + "sew-laser-turret": [["L127", "attack-info"]], + "sew-whirlpool": [["L14", "attack-info"]], + "saberfish": [ + ["L749", "uint64", true], + ["L750", "uint64", true], + ["L752", "uint64", true], + ["L751", "uint64", true], + ["L667", "uint64", true], + ["L666", "uint64", true], + ["L668", "uint64", true], + ["L665", "uint64", true] + ], + "saberfish-spawner": [ + ["L262", "(pointer int8)", 64], + ["L263", "(pointer int8)", 64] + ], + "neo-juicer": [ + ["L270", "vector"], + ["L269", "vector"], + ["L268", "vector"] + ], + "neo-grenadier": [ + ["L200", "vector"], + ["L199", "vector"], + ["L206", "(pointer uint64)", 3], + ["L205", "(pointer int32)", 4], + ["L216", "(pointer uint64)", 2], + ["L223", "(pointer uint64)", 2] + ], + "spydroid-orig": [ + ["L247", "attack-info"], + ["L246", "attack-info"], + ["L231", "vector"], + ["L230", "vector"], + ["L229", "vector"], + ["L228", "vector"], + ["L227", "vector"] + ], + "roboguard": [ + ["L305", "uint64", true], + ["L272", "uint64", true], + ["L271", "uint64", true] + ], + "vehicle": [["L204", "vector"]], + "wvehicle": [ + ["L270", "attack-info"], + ["L269", "vector"], + ["L268", "vector"] + ], + "wvehicle-util": [["L186", "attack-info"]], + "wvehicle-physics": [["L55", "(inline-array vehicle-wheel-surface)", 7]], + "wcar": [ + ["L175", "(inline-array vehicle-attach-point)", 14], + ["L111", "(inline-array vector)", 2], + ["L110", "vector"], + ["L109", "vector"], + ["L108", "vector"], + ["L107", "vector"], + ["L105", "vector"], + ["L104", "vector"], + ["L103", "vector"], + ["L106", "vector"], + ["L102", "vector"], + ["L101", "vector"], + ["L100", "vector"], + ["L99", "vector"] + ], + "wcar-turtle": [ + ["L18", "vector"], + ["L17", "vector"], + ["L16", "vector"], + ["L15", "vector"], + ["L14", "vector"], + ["L13", "vector"] + ], + "race-mesh": [["L112", "(pointer rgba)", 16]], + "wcar-snake": [ + ["L7", "vector"], + ["L6", "vector"], + ["L15", "vector"], + ["L14", "vector"], + ["L13", "vector"], + ["L12", "vector"], + ["L11", "vector"], + ["L10", "vector"], + ["L9", "vector"] + ], + "wcar-scorpion": [ + ["L37", "vector"], + ["L42", "vector"], + ["L41", "vector"], + ["L40", "vector"], + ["L39", "vector"], + ["L51", "vector"], + ["L50", "vector"], + ["L49", "vector"], + ["L48", "vector"], + ["L47", "vector"], + ["L46", "vector"], + ["L45", "vector"] + ], + "wcar-toad": [ + ["L37", "vector"], + ["L36", "vector"], + ["L46", "attack-info"], + ["L45", "vector"], + ["L44", "vector"], + ["L43", "vector"], + ["L42", "vector"], + ["L41", "vector"], + ["L40", "vector"], + ["L39", "vector"], + ["L47", "(inline-array vector)", 2], + ["L38", "vector"] + ], + "wcar-fox": [ + ["L7", "vector"], + ["L6", "vector"], + ["L15", "vector"], + ["L14", "vector"], + ["L13", "vector"], + ["L12", "vector"], + ["L11", "vector"], + ["L10", "vector"], + ["L9", "vector"] + ], + "wcar-rhino": [ + ["L30", "vector"], + ["L29", "vector"], + ["L28", "vector"], + ["L27", "vector"], + ["L26", "vector"], + ["L25", "vector"], + ["L24", "vector"], + ["L23", "vector"], + ["L21", "vector"] + ], + "wcar-mirage": [ + ["L23", "vector"], + ["L22", "vector"], + ["L21", "vector"], + ["L20", "vector"], + ["L19", "vector"], + ["L18", "vector"], + ["L17", "vector"], + ["L24", "vector"], + ["L15", "vector"], + ["L14", "vector"] + ], + "wcar-x-ride": [ + ["L9", "vector"], + ["L8", "vector"], + ["L17", "vector"], + ["L16", "vector"], + ["L15", "vector"], + ["L14", "vector"], + ["L13", "vector"], + ["L12", "vector"], + ["L11", "vector"] + ], + "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] ] } 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 a54c3909b1..5a617ff4cc 100644 --- a/decompiler/config/jak3/ntsc_v1/process_stack_size_overrides.jsonc +++ b/decompiler/config/jak3/ntsc_v1/process_stack_size_overrides.jsonc @@ -1,4 +1,9 @@ // This overrides the stack size for calls to stack-size-set! in given functions. { - "(method 29 target)": 2048 + "(method 29 target)": 2048, + "(method 11 part-spawner)": 64, + "(method 11 elevator)": 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 564070dd99..3835f8b7b9 100644 --- a/decompiler/config/jak3/ntsc_v1/stack_structures.jsonc +++ b/decompiler/config/jak3/ntsc_v1/stack_structures.jsonc @@ -203,7 +203,7 @@ [640, ["inline-array", "sphere", 1]], [656, "vector"] ], - "target-gun-can-fire-yellow?": [[16, ["array", "symbol", 2]]], + "target-gun-can-fire-yellow?": [[16, "gun-yellow-3-event-msg"]], "draw-beam": [[16, ["inline-array", "vector", 2]]], "(code die gun)": [[144, "vector"]], "light-trail-tracker-init-by-other": [[16, "vector"]], @@ -359,5 +359,1380 @@ [112, "vector"] ], "(method 23 tracking-spline)": [[32, "vector"]], - "(method 21 tracking-spline)": [[16, "tracking-spline-sampler"]] + "(method 21 tracking-spline)": [[16, "tracking-spline-sampler"]], + "(method 18 light-trail)": [[16, "vector"]], + "ragdoll-joint-callback": [ + [112, "vector"], + [128, "matrix"], + [192, "vector"], + [224, "vector"] + ], + "ragdoll-matrix-interp": [ + [16, "matrix"], + [144, "matrix"] + ], + "(method 15 ragdoll)": [ + [80, "matrix"], + [160, "vector"], + [304, "vector"], + [144, "vector"], + [176, "vector"], + [192, "vector"], + [208, "vector"], + [224, "vector"], + [240, "vector"] + ], + "(method 14 ragdoll)": [[144, "vector"]], + "(method 14 light-trail)": [[16, "light-trail-breadcrumb"]], + "check-water-level-drop": [[16, "vector"]], + "check-water-level-drop-motion": [[16, "vector"]], + "(method 17 water-control)": [[16, "light-trail-tracker-spawn-params"]], + "(method 10 water-control)": [[288, "vector"]], + "(method 11 flow-control)": [ + [80, "vector"], + [128, "vector"] + ], + "(method 13 flow-control)": [ + [64, "vector"], + [80, "vector"], + [96, "vector"], + [128, "vector"] + ], + "progress-post": [[176, "hud-box"]], + "(method 15 hud-gun)": [[16, "hud-sprite"]], + "play": [[96, ["array", "symbol", 10]]], + "update-sound-banks": [[16, ["array", "int8", 36]]], + "show-level": [[16, ["array", "symbol", 10]]], + "(method 20 load-state)": [ + [16, ["inline-array", "level-buffer-state", 10]], + [176, ["inline-array", "level-buffer-state", 10]] + ], + "calc-vu1-lights": [[16, "light-group"]], + "teleport-camera-by-pos": [[16, "vector"]], + "water-anim-event-handler": [[16, "vector"]], + "blocking-plane-spawn": [[16, ["inline-array", "vector", 2]]], + "(method 11 blocking-plane)": [[16, ["inline-array", "vector", 2]]], + "(method 56 enemy)": [ + [48, "vector"], + [32, "vector"] + ], + "(method 58 enemy)": [[80, "vector"]], + "(method 82 enemy)": [[96, "attack-info"]], + "(post knocked-recover enemy)": [ + [1120, "vector"], + [1136, "vector"] + ], + "(post running elevator)": [[16, "vector"]], + "matrix-3x3-triple-transpose-product": [[16, ["inline-array", "matrix", 3]]], + "(method 63 collide-shape-moving)": [[16, "rigid-body-move-work"]], + "(method 18 rigid-body-control)": [[16, ["inline-array", "vector", 2]]], + "(method 22 rigid-body-control)": [[16, ["inline-array", "vector", 2]]], + "(method 23 rigid-body-control)": [[16, ["inline-array", "vector", 2]]], + "(method 24 rigid-body-control)": [[16, ["inline-array", "vector", 2]]], + "(method 28 rigid-body-control)": [[16, "rigid-body-impact"]], + "(method 50 rigid-body-object)": [[16, "rigid-body-impact"]], + "(method 51 rigid-body-object)": [[16, "rigid-body-impact"]], + "ptest": [[16, "vector"]], + "spawn-guard-projectile": [[16, "projectile-init-by-other-params"]], + "(method 25 guard-shot)": [[32, "vector"]], + "(method 25 metalhead-shot)": [[32, "vector"]], + "(event impact metalhead-grenade-shot)": [[16, "collide-query"]], + "(method 9 los-control)": [ + [32, "collide-query"], + [16, "vector"] + ], + "(method 22 joint-exploder)": [[16, "collide-query"]], + "(method 25 joint-exploder)": [[16, "bounding-box"]], + "(method 15 debris-group)": [[64, "vector"]], + "debris-group-init-by-other": [[16, "vector"]], + "shield-sphere-init-by-other": [[16, "shield-sphere-distort-spawn-params"]], + "gun-yellow-shot-do-deflect": [ + [144, ["array", "collide-shape", 384]], + [64, "vector"] + ], + "(method 31 gun-yellow-shot-2)": [[16, "light-trail-tracker-spawn-params"]], + "(method 25 gun-yellow-shot)": [[32, "vector"]], + "gun-fire-yellow-3": [[16, "gun-yellow-3-event-msg"]], + "(code impact-explode gun-yellow-3-saucer)": [[16, "explosion-init-params"]], + "saucer-land-move": [[16, "vector"]], + "(method 25 gun-yellow-shot-2)": [[32, "vector"]], + "(method 36 gun-yellow-shot-2)": [[96, "vector"]], + "(method 52 gun-yellow-3-saucer)": [ + [48, ["inline-array", "target-quality-info-saucer", 66]], + [1104, ["array", "collide-shape", 384]], + [32, "vector"], + [3728, ["array", "int8", 100]], + [3824, "vector"] + ], + "(code impact gun-red-3-grenade)": [[16, "red-3-sphere-init-params"]], + "(post explode gun-red-2-shockwave)": [[16, "vector"]], + "(method 27 gun-red-2-shockwave)": [ + [16, "vector"], + [32, "red-2-ring-init-params"] + ], + "(method 31 gun-red-3-grenade)": [ + [16, "vector"], + [32, "light-trail-tracker-spawn-params"] + ], + "(method 45 gun-red-3-grenade)": [ + [16, "vector"], + [112, ["array", "collide-shape", 384]] + ], + "(method 47 gun-red-3-grenade)": [ + [16, "vector"], + [112, ["array", "collide-shape", 384]] + ], + "(method 17 gun-red-2-shockwave)": [ + [48, ["array", "collide-shape", 384]], + [16, "vector"], + [1584, "collide-query"] + ], + "(method 19 gun-red-2-shockwave)": [ + [16, "collide-query"], + [576, "vector"], + [624, "vector"], + [592, "vector"] + ], + "(method 23 gun-red-2-shockwave)": [[32, "vector"]], + "(method 24 gun-red-2-shockwave)": [[16, "vector"]], + "gun-fire-red-2": [[16, "gun-red-2-shockwave-init-params"]], + "gun-fire-red-3": [ + [160, ["array", "collide-shape", 384]], + [112, "vector"], + [128, "vector"], + [1696, "vector"] + ], + "(method 26 gun-red-shot)": [[16, "bounding-box"]], + "gun-dark-reaction": [[112, "vector"]], + "gun-fire-red-1": [ + [16, "vector"], + [32, "event-message-block"], + [112, "vector"] + ], + "(trans expand gun-gravity)": [ + [16, "vector"], + [32, "vector"], + [48, "vector"], + [80, "collide-query"], + [624, "matrix"] + ], + "gun-fire-dark-3": [[16, "projectile-init-by-other-params"]], + "(trans moving gun-dark-shot)": [[16, "vector"]], + "(enter impact gun-dark-shot)": [ + [192, ["array", "collide-shape", 384]], + [96, "vector"] + ], + "gravity-spinner-init-by-other": [[32, "vector"]], + "(code zero-g gravity-spinner)": [[112, "vector"]], + "(method 25 gun-dark-3-nuke)": [[16, "matrix"]], + "(code impact-dud gun-dark-3-nuke)": [[16, "explosion-init-params"]], + "(method 54 gun-dark-3-nuke)": [ + [32, ["array", "collide-shape", 384]], + [16, "vector"] + ], + "(trans impact gun-dark-3-nuke)": [ + [96, "gun-dark-3-sphere-init-params"], + [128, "gun-dark-3-sphere-init-params"] + ], + "(method 19 gravity-spinner)": [ + [176, ["array", "collide-shape", 384]], + [128, "vector"], + [112, "vector"], + [1712, "vector"], + [2288, "vector"] + ], + "(method 16 gravity-spinner)": [[32, "vector"]], + "(method 22 gun-gravity)": [ + [112, ["array", "collide-shape", 384]], + [16, "vector"] + ], + "target-bomb1-fire-shot": [ + [96, "vector"], + [112, "vector"] + ], + "(code target-darkjak-smack)": [[112, "projectile-init-by-other-params"]], + "(method 25 darkjak-ball)": [[32, "vector"]], + "sparticle-track-hadouken": [[16, "vector"]], + "sparticle-red-2-converge": [[16, "vector"]], + "(method 9 rope-constraint)": [ + [16, "vector"], + [32, "vector"] + ], + "(method 26 gun-blue-shot)": [[32, "vector"]], + "(method 24 gun-blue-shot)": [[96, "vector"]], + "gun-fire-blue-2": [[16, "gun-blue-lightning-command"]], + "gun-fire-blue-2-old": [ + [16, "gun-blue-lightning-command"], + [752, "vector"], + [704, "vector"], + [736, "vector"], + [816, "vector"] + ], + "find-gun-blue-2-target-old": [ + [48, ["array", "collide-shape", 384]], + [16, "vector"] + ], + "find-gun-blue-2-target": [ + [48, ["array", "collide-shape", 384]], + [16, "vector"] + ], + "(method 31 gun-blue-shot-3)": [[16, "light-trail-tracker-spawn-params"]], + "gun-blue-shot-3-move": [[160, "dist-dot-val"]], + "gun-fire-blue-3": [ + [16, "projectile-init-by-other-params"], + [160, "vector"], + [3968, "vector"], + [176, ["inline-array", "target-quality-info", 384]], + [1312, ["array", "collide-shape", 384]] + ], + "create-lightning-tracker-if-necessary": [ + [16, "gun-blue-2-lightning-init-params"] + ], + "(method 25 gun-blue-2-lightning-tracker)": [ + [32, "gun-blue-lightning-command"], + [704, "vector"], + [736, "collide-query"] + ], + "collide-list-fill-bg-using-line-sphere": [ + [32, "matrix"], + [96, "collide-query"] + ], + "collide-list-fill-bg-using-box": [ + [32, "matrix"], + [96, "collide-query"] + ], + "add-collide-debug-box": [[16, "bounding-box"]], + "(method 10 collide-mesh)": [[16, "oot-work"]], + "(method 9 touching-list)": [[16, "add-prims-touching-work"]], + "(method 9 collide-edge-edge)": [ + [16, "matrix"], + [80, ["inline-array", "sphere", 6]], + [176, "collide-query"] + ], + "(method 13 collide-edge-work)": [[16, "faei-stack-vars"]], + "(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"]], + "cshape-reaction-update-state": [ + [16, "vector"], + [32, "vector"] + ], + "(method 37 control-info)": [[48, "vector"]], + "(method 23 grid-hash)": [ + [16, "grid-hash-box"], + [32, "grid-hash-box"], + [48, "vector"], + [64, "vector"] + ], + "(method 11 grid-hash)": [ + [16, "vector"], + [32, "vector"] + ], + "draw-grid": [ + [16, "vector"], + [32, "vector"], + [48, "vector"] + ], + "(method 9 actor-hash-buckets)": [ + [16, ["inline-array", "vector", 2]], + [48, ["inline-array", "vector", 2]] + ], + "(method 15 sphere-hash)": [[16, "vector"]], + "(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 20 collide-cache)": [[16, "matrix"]], + "col-rend-draw": [[16, "matrix"]], + "(method 11 collide-mesh)": [[16, "spat-work"]], + "(method 11 manipulator)": [[80, "vector"]], + "draw-axis": [ + [32, "vector"], + [48, "vector"], + [64, "vector"], + [96, "vector"], + [112, "vector"] + ], + "(method 16 bug-report)": [ + [160, ["array", "float", 9]], + [48, "vector"], + [64, "vector"] + ], + "particle-adgif-callback": [[16, ["inline-array", "vector", 4]]], + "sp-adjust-launch": [[16, "matrix"]], + "sp-launch-particles-death": [[16, "matrix"]], + "sp-relaunch-setup-fields": [[16, "matrix"]], + "sparticle-respawn-timer": [[16, "vector"]], + "sparticle-respawn-heights": [[16, "vector"]], + "sparticle-rotate-to-vel-3d": [[16, "vector"]], + "spt-func-turn-to-vel-radial": [[16, "vector"]], + "spt-func-relative-pos": [ + [16, "vector"], + [32, "vector"], + [48, "vector"], + [64, "matrix"], + [128, "matrix"], + [192, "matrix"] + ], + "sparticle-3d-rotate-xz-to-camera": [[16, "vector"]], + "sparticle-3d-rotate-xz-to-camera-eco-shaft": [[16, "vector"]], + "sparticle-2d-spline-align-instant": [[16, "vector"]], + "birth-func-converge": [[16, "vector"]], + "check-shell-level2": [[16, "vector"]], + "check-shell-level1": [[16, "vector"]], + "process-drawable-burn-effect": [[32, "rgbaf"]], + "birth-func-vector-orient": [ + [16, "vector"], + [32, "vector"], + [48, "vector"] + ], + "birth-func-target-orient": [[48, "vector"]], + "process-drawable-shock-skel-effect": [ + [176, "matrix"], + [256, "vector"], + [272, "vector"], + [288, "vector"], + [304, "quaternion"], + [384, "vector"] + ], + "process-drawable-shock-effect": [ + [80, "collide-query"], + [16, "matrix"] + ], + "process-drawable-shock-effect-replace": [ + [80, "collide-query"], + [16, "matrix"] + ], + "(trans target-ladder-walk-up)": [[96, "vector"]], + "(trans target-ladder-walk-down)": [[96, "vector"]], + "(post target-ladder)": [[96, "matrix"]], + "(anon-function 0 script)": [[16, "prim-beam-tracker-params"]], + "(anon-function 47 script)": [[16, "vector"]], + "(anon-function 48 script)": [ + [16, "vector"], + [32, "vector"] + ], + "(anon-function 49 script)": [ + [128, "part-tracker-subsampler-init-params"], + [176, "part-tracker-init-params"] + ], + "(method 9 mood-control)": [[16, "mood-control-work"]], + "check-drop-level-rain": [[16, "vector"]], + "(method 28 path-control)": [ + [16, "vector"], + [32, "vector"], + [48, "vector"], + [64, "vector"], + [80, "vector"] + ], + "(method 29 path-control)": [[32, "vector"]], + "print-default-collision": [ + [144, "vector"], + [96, "vector"], + [112, "vector"], + [128, "vector"], + [160, "matrix"] + ], + "mech-spawn-thruster": [[32, "vector"]], + "mech-shield-init-by-other": [[16, "shield-sphere-distort-spawn-params"]], + "target-mech-get-off?": [[560, ["inline-array", "sphere", 1]]], + "mech-update-ik": [ + [16, "collide-query"], + [592, "vector"], + [608, "vector"], + [624, "vector"], + [640, "vector"], + [656, "vector"], + [672, "vector"] + ], + "target-mech-init": [[96, "shield-sphere-spawn-params"]], + "target-mech-add-thrust": [[16, "vector"]], + "target-mech-collision": [[144, "vector"]], + "(code target-mech-carry-throw)": [[640, ["inline-array", "sphere", 1]]], + "(trans target-mech-carry-drag)": [[560, ["inline-array", "sphere", 1]]], + "(code target-mech-carry-drop)": [[672, ["inline-array", "sphere", 1]]], + "target-mech-carry-update": [[560, ["inline-array", "sphere", 1]]], + "flut-update-ik": [ + [16, "collide-query"], + [624, "vector"], + [640, "vector"], + [656, "vector"], + [592, "vector"], + [608, "vector"] + ], + "(code target-flut-get-on)": [ + [16, "vector"], + [32, "vector"] + ], + "(method 11 minimap)": [[16, ["inline-array", "vector", 4]]], + "(method 15 minimap)": [[16, "minimap-draw-work"]], + "(method 19 minimap)": [ + [32, "vector"], + [16, "vector"] + ], + "(method 24 minimap)": [[16, "minimap-draw-work"]], + "(method 23 minimap)": [ + [32, "vector"], + [48, "vector"], + [64, "vector"], + [80, "matrix"], + [144, "matrix"] + ], + "(method 26 minimap)": [ + [32, "vector"], + [48, "vector"], + [64, "matrix"] + ], + "(method 17 minimap)": [ + [32, "vector"], + [48, "vector"], + [64, "vector"], + [80, "matrix"], + [144, "matrix"], + [256, "vector"], + [240, "vector"] + ], + "(method 18 minimap)": [ + [32, "vector"], + [48, "vector"], + [64, "vector"], + [80, "matrix"], + [144, "matrix"], + [240, "vector"], + [256, "vector"] + ], + "(method 14 trail-graph)": [[16, ["inline-array", "vector", 2]]], + "(method 15 trail-graph)": [[16, ["inline-array", "vector", 4]]], + "(method 12 lightning-bolt)": [ + [80, "vector"], + [112, "matrix"], + [176, "vector"], + [192, "vector"], + [16, "vector"], + [32, "matrix"], + [304, "matrix"], + [272, "vector"], + [368, "vector"], + [384, "vector"] + ], + "(method 11 lightning-bolt)": [[48, "vector"]], + "(method 20 lightning-bolt)": [[16, "vector"]], + "(method 16 lightning-bolt)": [[144, ["array", "rgba", 1]]], + "(method 9 nav-mesh)": [[16, "vector"]], + "(method 10 nav-mesh)": [[32, "nav-find-poly-parms"]], + "find-nearest-nav-mesh": [[16, "nav-find-poly-parms"]], + "point-to-poly-boundary": [[16, ["inline-array", "vector", 4]]], + "(method 11 nav-mesh)": [[16, "nav-find-poly-parms"]], + "(method 31 entity-actor)": [[16, "nav-find-poly-parms"]], + "(method 32 entity-actor)": [[32, "nav-find-poly-parms"]], + "(method 15 nav-mesh)": [[16, ["array", "int8", 4]]], + "(method 17 nav-mesh)": [[16, "vector"]], + "(method 20 nav-mesh)": [[16, "nav-ray"]], + "(method 21 nav-mesh)": [ + [16, "nav-ray"], + [96, "vector"] + ], + "(method 36 nav-mesh)": [[16, "nav-poly"]], + "(method 37 nav-mesh)": [[16, ["inline-array", "nav-poly", 3]]], + "(method 39 nav-mesh)": [[16, ["inline-array", "vector", 3]]], + "(method 43 nav-mesh)": [[16, "vector"]], + "(method 25 nav-mesh)": [[32, "nav-stack-type2"]], + "(method 12 nav-mesh)": [[16, "nav-stack-type"]], + "(anon-function 9 nav-control)": [[16, ["inline-array", "vector", 1]]], + "(anon-function 4 nav-control)": [[16, ["inline-array", "vector", 1]]], + "debug-nav-validate-current-poly": [[16, "vector"]], + "(method 9 nav-control)": [[16, "vector"]], + "circle-tangent-directions": [[48, "vector"]], + "(method 18 nav-control)": [[16, "nav-control-cfs-work"]], + "(method 19 nav-control)": [[16, "nav-control-cfs-work"]], + "(method 11 nav-state)": [ + [16, "vector"], + [32, "vector"] + ], + "(method 24 nav-state)": [[16, ["inline-array", "vector", 1]]], + "(method 28 nav-state)": [[208, "vector"]], + "(method 31 nav-state)": [ + [16, "nav-avoid-spheres-params"], + [112, "nav-ray"] + ], + "(method 32 nav-state)": [[16, "nav-control-cfs-work"]], + "(method 34 nav-state)": [[16, ["inline-array", "vector", 1]]], + "(method 37 nav-state)": [[16, ["inline-array", "vector", 1]]], + "(method 50 nav-state)": [[16, "nav-ray"]], + "(method 52 nav-state)": [ + [16, "vector"], + [32, "nav-route-portal"], + [80, ["inline-array", "vector", 2]], + [192, "matrix"] + ], + "(method 53 nav-state)": [ + [16, "nav-avoid-spheres-params"], + [112, "nav-ray"] + ], + "(method 91 nav-enemy)": [[16, "vector"]], + "(method 161 nav-enemy)": [[16, "vector"]], + "(method 160 nav-enemy)": [[16, "vector"]], + "(code hostile monster-frog)": [[16, "vector"]], + "(code notice monster-frog)": [[16, "vector"]], + "elec-gate-post": [[48, "vector"]], + "(enter active elec-gate)": [[176, ["inline-array", "vector", 2]]], + "(method 26 min-rat-engine)": [[96, "vector"]], + "(code arrived min-bomb-elevator)": [[16, ["array", "symbol", 3]]], + "(code down-idle min-crane-switch)": [[16, ["array", "symbol", 3]]], + "(method 208 manta)": [ + [16, "vector"], + [32, "vector"] + ], + "(method 200 manta)": [[16, "vector"]], + "(method 201 manta)": [[16, ["inline-array", "matrix", 2]]], + "(method 109 rat)": [[112, "vector"]], + "(post running-in-wheel rat)": [ + [96, "vector"], + [112, "vector"], + [128, "vector"] + ], + "(post idle rat-spawner)": [ + [96, "vector"], + [112, "enemy-init-by-other-params"] + ], + "(method 37 min-bomb-train)": [[144, "vector"]], + "(method 10 game-task-node-info)": [[16, ["array", "game-task-node", 64]]], + "fail-mission": [[96, "resetter-params"]], + "restart-mission": [[96, "resetter-params"]], + "gekko-postbind": [ + [576, ["inline-array", "vector", 1]], + [656, "vector"], + [672, "vector"], + [752, "vector"], + [768, "vector"], + [848, "vector"], + [864, "vector"], + [944, "vector"], + [960, "vector"] + ], + "(method 202 gekko)": [ + [16, "vector"], + [32, "vector"] + ], + "merc-blend-shape": [[16, ["array", "int16", 128]]], + "(method 26 battle)": [[16, "vector"]], + "fruit-check-ground-bounce": [[16, "vector"]], + "wascity-cactus-callback": [[16, "vector"]], + "vehicle-draw-thruster": [[16, "vehicle-thruster-work"]], + "(method 30 vehicle)": [[16, ["array", "uint32", 1]]], + "(method 55 vehicle)": [[16, "matrix"]], + "(method 54 vehicle)": [[16, "rigid-body-move-work"]], + "(method 78 vehicle)": [ + [16, "vehicle-stack-type3"], + [144, "sprite-glow-data"], + [208, "sprite-glow-data"] + ], + "vehicle-explode-post": [[16, ["array", "uint32", 1]]], + "(method 129 vehicle)": [[16, "mystery-vehicle-type0"]], + "(event fly-to-dest prebot-large-eco-creature)": [[96, "vector"]], + "large-eco-creature-split": [ + [16, "enemy-init-by-other-params"], + [64, "vector"] + ], + "spt-func-pillar-rocks-bounce1": [[16, "vector"]], + "spt-func-pillar-rocks-bounce2": [[16, "vector"]], + "prebot-sword-init-by-other": [[16, "weapon-trail-tracker-spawn-params"]], + "(trans idle prebot-shockwave)": [[560, "bounding-box"]], + "(enter test prebot)": [ + [16, "enemy-init-by-other-params"], + [64, "vector"] + ], + "prebot-spawn-shockwave": [[16, "vector"]], + "prebot-light-flash": [[16, "vector"]], + "prebot-common": [ + [112, "vector"], + [96, "vector"] + ], + "prebot-neck-callback": [[144, "vector"]], + "prebot-launch-critter": [ + [64, "vector"], + [80, "vector"], + [16, "enemy-init-by-other-params"] + ], + "(post attacking-1 tentacle)": [[16, "vector"]], + "(method 155 sew-laser-guard)": [ + [32, "vector"], + [160, "vector"] + ], + "(trans idle sew-laser-beam)": [[32, "vector"]], + "(method 25 sew-move-turret-shot)": [[32, "vector"]], + "spawn-sew-move-turret-projectile": [ + [16, "projectile-init-by-other-params"], + [144, "vector"] + ], + "(method 162 sew-laser-turret)": [ + [32, ["array", "collide-shape", 384]], + [16, "bounding-box"] + ], + "(trans alert sew-laser-turret)": [ + [32, ["array", "collide-shape", 384]], + [16, "bounding-box"] + ], + "(method 161 sew-laser-turret)": [[64, "rgbaf"]], + "(method 159 sew-laser-turret)": [[32, "vector"]], + "(trans active sew-moving-step-a)": [[16, "vector"]], + "spawn-moving-step-b-step": [[16, "sew-moving-step-b-step-param"]], + "(method 231 saberfish)": [ + [16, "vector"], + [32, "vector"], + [48, "vector"] + ], + "(method 236 saberfish)": [[16, "saberfish-spawner-query-msg"]], + "(method 237 saberfish)": [[16, "saberfish-spawner-query-msg"]], + "(method 238 saberfish)": [ + [16, "saberfish-spawner-query-msg"], + [576, "vector"], + [144, "vector"], + [272, "vector"], + [288, "vector"], + [448, "vector"], + [464, "vector"], + [480, "vector"], + [496, "vector"] + ], + "(method 225 saberfish)": [[16, "saberfish-spawner-query-msg"]], + "(code active saberfish-mgr-room1)": [[16, "saberfish-spawner-command"]], + "(code stage-0 saberfish-mgr-room2)": [[16, "saberfish-spawner-command"]], + "(code stage-2 saberfish-mgr-room2)": [[16, "saberfish-spawner-command"]], + "(code stage-1 saberfish-mgr-room2)": [[16, "saberfish-spawner-command"]], + "(method 22 saberfish-spawner)": [[16, "nav-poly"]], + "(method 24 saberfish-spawner)": [ + [16, "vector"], + [32, "vector"] + ], + "(method 11 saberfish-spawner)": [[32, "vector"]], + "(method 25 saberfish-spawner)": [[16, "saberfish-init-by-other-params"]], + "(method 17 saberfish-spawn-manager-base)": [[16, "saberfish-spawn-query"]], + "(method 18 saberfish-spawn-manager-base)": [[16, "saberfish-spawn-query"]], + "(code active kg-hopper)": [[16, "vector"]], + "(method 191 kg-hopper)": [ + [96, "vector"], + [176, "collide-query"] + ], + "(method 99 kg-hopper)": [[80, "vector"]], + "spt-func-birth-on-bubble-pop": [ + [16, "vector"], + [32, "vector"] + ], + "(code turned-off sew-power-switch)": [[16, ["array", "symbol", 10]]], + "(method 18 hfragment)": [ + [48, "vector"], + [16, "vector"], + [32, "vector"], + [96, "vector"], + [112, "vector"] + ], + "(trans hostile neo-grenadier)": [[48, "vector"]], + "(code flee sewer-frog)": [[16, "vector"]], + "(enter explode spydroid-orig)": [[192, "vector"]], + "(method 196 roboguard)": [ + [16, "vector"], + [32, "vector"] + ], + "(method 195 roboguard)": [[16, "vector"]], + "(anon-function 1 roboguard)": [ + [16, "vector"], + [32, "vector"] + ], + "(anon-function 25 roboguard)": [[48, "matrix"]], + "(method 91 vehicle)": [[16, "vehicle-controls"]], + "(method 48 vehicle)": [[16, "matrix"]], + "(method 118 vehicle)": [[16, "vehicle-controls"]], + "(method 32 squad-control)": [[16, "vector"]], + "(method 17 squad-control)": [[16, "primary-target-pos-vel"]], + "(method 16 squad-control)": [ + [16, ["inline-array", "primary-target-pos-vel", 2]] + ], + "(method 24 squad-control)": [[16, "primary-target-pos-vel"]], + "(method 25 squad-control)": [ + [16, ["inline-array", "primary-target-pos-vel", 2]] + ], + "(method 50 vehicle)": [[16, ["inline-array", "rigid-body-impact", 2]]], + "(method 93 vehicle)": [[16, "mystery-vehicle-type2"]], + "(method 94 vehicle)": [ + [16, "mystery-vehicle-type1"], + [128, ["inline-array", "collide-query", 2]], + [816, ["inline-array", "matrix", 2]] + ], + "(method 135 vehicle)": [[16, ["inline-array", "matrix", 2]]], + "(method 13 was-squad-control)": [ + [16, ["inline-array", "matrix", 2]], + [192, "matrix"], + [208, ["array", "uint32", 1]] + ], + "(method 35 was-squad-control)": [ + [16, ["inline-array", "matrix", 2]], + [240, "cquery-with-5vec"] + ], + "(method 39 vehicle-wheel)": [[16, "rigid-body-move-work"]], + "(enter explode wvehicle)": [[16, "matrix"]], + "(method 77 wvehicle)": [[16, "vector"]], + "(method 30 wvehicle)": [[16, "matrix"]], + "(method 92 wvehicle)": [[16, "vector"]], + "(method 163 wvehicle)": [[16, "matrix"]], + "(method 165 wvehicle)": [ + [16, "vehicle-controls"], + [32, "matrix"] + ], + "(method 198 wvehicle)": [[16, "wvehicle-physics-work"]], + "(method 195 wvehicle)": [[16, "light-trail-tracker-spawn-params"]], + "cshape-reaction-scorp-shot": [[16, "vector"]], + "(method 26 v-scorp-shot)": [[32, "vector"]], + "(method 25 v-rhino-shot)": [[32, "vector"]], + "(method 31 v-toad-shot)": [ + [32, "light-trail-tracker-spawn-params"], + [16, "vector"] + ], + "(method 78 wvehicle)": [ + [16, "wvehicle-part-work"], + [624, "wvehicle-draw-thruster-params"] + ], + "(method 172 wvehicle)": [[16, ["inline-array", "quaternion", 2]]], + "(method 173 wvehicle)": [[16, "wvehicle-stack-type1"]], + "(method 161 wvehicle)": [[16, "vehicle-wheel-init-params"]], + "(method 31 wvehicle)": [[16, "wvehicle-physics-work"]], + "(method 162 wvehicle)": [[16, "wvehicle-physics-work"]], + "(method 164 wvehicle)": [[16, "wvehicle-stack-type6"]], + "(method 95 vehicle)": [[16, "matrix"]], + "(method 93 wvehicle)": [ + [16, ["inline-array", "matrix", 2]], + [112, "wvehicle-physics-work"], + [128, "matrix"] + ], + "(method 33 wvehicle)": [ + [16, ["inline-array", "quaternion", 2]], + [48, "wvehicle-stack-type4"] + ], + "(method 149 wvehicle)": [[16, "wvehicle-stack-type2"]], + "(method 199 wvehicle)": [[16, "wvehicle-stack-type3"]], + "(method 169 wcar-snake-base)": [[16, "wcar-proj-init-by-other-params"]], + "(method 79 wcar-snake-base)": [ + [16, ["inline-array", "quaternion", 2]], + [64, "wcar-stack-type1"] + ], + "(method 79 v-turtle)": [ + [16, ["inline-array", "quaternion", 2]], + [64, "wvehicle-physics-work"], + [128, "wvehicle-jmod-work"] + ], + "(method 31 squad-control)": [[48, "squad-control-stack-type0"]], + "target-pilot-post": [ + [48, "cquery-with-5vec"], + [640, "matrix"] + ], + "(code target-pilot-get-off)": [[96, "matrix"]], + "target-pilot-trans": [[16, ["inline-array", "vector", 10]]], + "(method 34 was-squad-control)": [ + [16, "cquery-with-vec"], + [576, ["inline-array", "vector", 2]], + [592, "mystery-traffic-object-spawn-params0"] + ], + "(method 9 race-control)": [[16, "race-mesh-slice-query"]], + "(method 9 race-path)": [[16, "vector"]], + "(method 10 race-path)": [[16, ["inline-array", "vector", 4]]], + "(method 11 race-path)": [[16, ["inline-array", "race-path-sample", 6]]], + "(method 16 race-mesh)": [[16, "race-mesh-hash-search"]], + "(method 12 race-path)": [[16, "matrix"]], + "(method 18 race-mesh)": [[16, "race-mesh-slice-query"]], + "(method 17 race-mesh)": [[16, "race-mesh-slice-query"]], + "sparticle-motion-blur-dirt": [[16, "matrix"]], + "check-scorp-shell-level1": [[16, "vector"]], + "check-scorp-shell-level2": [[16, "vector"]], + "(method 22 turbo-pickup)": [[16, "cquery-with-vec"]], + "(method 17 tire-trail)": [[16, "matrix"]], + "(method 200 wvehicle)": [[16, "wvehicle-physics-work"]], + "(method 38 wvehicle)": [ + [16, "wvehicle-stack-type5"], + [112, "wvehicle-stack-type7"], + [272, "wvehicle-stack-type5"], + [304, "matrix"] + ], + "(method 24 w-parking-spot)": [[16, "cquery-with-5vec"]], + "(method 79 v-scorpion)": [ + [32, ["inline-array", "quaternion", 2]], + [16, "vector"], + [80, "wvehicle-physics-work"] + ], + "(method 169 v-scorpion)": [[16, "wcar-rhino-proj-params"]], + "(method 169 v-toad)": [[16, "wcar-toad-stack-var0"]], + "(method 79 v-toad)": [ + [16, ["inline-array", "quaternion", 2]], + [48, ["inline-array", "quaternion", 1]], + [64, "wvehicle-physics-work"] + ], + "(method 203 v-toad)": [[16, "wvehicle-physics-work"]], + "(method 169 v-rhino)": [[16, "wcar-rhino-proj-params"]], + "(method 169 v-mirage)": [[16, "wcar-toad-stack-var0"]], + "(method 79 v-rhino)": [ + [16, ["inline-array", "quaternion", 2]], + [48, ["inline-array", "quaternion", 1]], + [64, ["inline-array", "quaternion", 2]] + ], + "(method 17 turret-control)": [[16, "turret-control-stack-var0"]], + "(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, "bounding-box"], + [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"]] } diff --git a/decompiler/config/jak3/ntsc_v1/tex-info.min.json b/decompiler/config/jak3/ntsc_v1/tex-info.min.json new file mode 100644 index 0000000000..afdde7e8d0 --- /dev/null +++ b/decompiler/config/jak3/ntsc_v1/tex-info.min.json @@ -0,0 +1 @@ +[[224067587,{"idx":3,"name":"common-gray-dark","tpage_name":"museum4-water"}],[224067586,{"idx":2,"name":"common-glass","tpage_name":"museum4-water"}],[223936522,{"idx":10,"name":"bab-skin","tpage_name":"museum4b-pris"}],[223936521,{"idx":9,"name":"bab-shoulderstrap","tpage_name":"museum4b-pris"}],[223936520,{"idx":8,"name":"bab-pendant","tpage_name":"museum4b-pris"}],[223936519,{"idx":7,"name":"bab-nail-01","tpage_name":"museum4b-pris"}],[223936518,{"idx":6,"name":"bab-longfur","tpage_name":"museum4b-pris"}],[223936517,{"idx":5,"name":"bab-furtrans","tpage_name":"museum4b-pris"}],[223936516,{"idx":4,"name":"bab-furskin-trans","tpage_name":"museum4b-pris"}],[223936515,{"idx":3,"name":"bab-fur","tpage_name":"museum4b-pris"}],[223936514,{"idx":2,"name":"bab-eye","tpage_name":"museum4b-pris"}],[223936513,{"idx":1,"name":"bab-diaper","tpage_name":"museum4b-pris"}],[223936512,{"idx":0,"name":"bab-allfur","tpage_name":"museum4b-pris"}],[223871035,{"idx":59,"name":"environment-oldmetal","tpage_name":"museum3b-pris2"}],[223871034,{"idx":58,"name":"daxter-furhilite","tpage_name":"museum3b-pris2"}],[223871033,{"idx":57,"name":"charHOLD","tpage_name":"museum3b-pris2"}],[223871032,{"idx":56,"name":"brut-toenails","tpage_name":"museum3b-pris2"}],[223871031,{"idx":55,"name":"brut-ties","tpage_name":"museum3b-pris2"}],[223871030,{"idx":54,"name":"brut-teeth","tpage_name":"museum3b-pris2"}],[223871029,{"idx":53,"name":"brut-shirt","tpage_name":"museum3b-pris2"}],[223871028,{"idx":52,"name":"brut-metalrim","tpage_name":"museum3b-pris2"}],[223871027,{"idx":51,"name":"brut-lens","tpage_name":"museum3b-pris2"}],[223871026,{"idx":50,"name":"brut-legfur","tpage_name":"museum3b-pris2"}],[223871025,{"idx":49,"name":"brut-jaw","tpage_name":"museum3b-pris2"}],[223871024,{"idx":48,"name":"brut-jacket","tpage_name":"museum3b-pris2"}],[223871023,{"idx":47,"name":"brut-headtop","tpage_name":"museum3b-pris2"}],[223871022,{"idx":46,"name":"brut-handpalm","tpage_name":"museum3b-pris2"}],[223871021,{"idx":45,"name":"brut-hair","tpage_name":"museum3b-pris2"}],[223871020,{"idx":44,"name":"brut-foottop","tpage_name":"museum3b-pris2"}],[223871019,{"idx":43,"name":"brut-footstrap","tpage_name":"museum3b-pris2"}],[223871018,{"idx":42,"name":"brut-footbottom","tpage_name":"museum3b-pris2"}],[223871017,{"idx":41,"name":"brut-finger","tpage_name":"museum3b-pris2"}],[223871016,{"idx":40,"name":"brut-feather","tpage_name":"museum3b-pris2"}],[223871015,{"idx":39,"name":"brut-eyelid","tpage_name":"museum3b-pris2"}],[223871014,{"idx":38,"name":"brut-eye","tpage_name":"museum3b-pris2"}],[223871013,{"idx":37,"name":"brut-diaper","tpage_name":"museum3b-pris2"}],[223871012,{"idx":36,"name":"brut-cloaktop","tpage_name":"museum3b-pris2"}],[223871011,{"idx":35,"name":"brut-cloaktail","tpage_name":"museum3b-pris2"}],[223871010,{"idx":34,"name":"brut-button","tpage_name":"museum3b-pris2"}],[223871009,{"idx":33,"name":"brut-armsleeve","tpage_name":"museum3b-pris2"}],[223805572,{"idx":132,"name":"krew-rteye","tpage_name":"museum3b-pris"}],[223805571,{"idx":131,"name":"krew-lfteye","tpage_name":"museum3b-pris"}],[223805570,{"idx":130,"name":"krew-eyelid","tpage_name":"museum3b-pris"}],[223805569,{"idx":129,"name":"vin-waistband","tpage_name":"museum3b-pris"}],[223805568,{"idx":128,"name":"vin-teeth-01","tpage_name":"museum3b-pris"}],[223805567,{"idx":127,"name":"vin-suspendercenter","tpage_name":"museum3b-pris"}],[223805566,{"idx":126,"name":"vin-shoe-02","tpage_name":"museum3b-pris"}],[223805565,{"idx":125,"name":"vin-shoe-01","tpage_name":"museum3b-pris"}],[223805564,{"idx":124,"name":"vin-shirt-02","tpage_name":"museum3b-pris"}],[223805563,{"idx":123,"name":"vin-shirt-01","tpage_name":"museum3b-pris"}],[223805562,{"idx":122,"name":"vin-pants","tpage_name":"museum3b-pris"}],[223805561,{"idx":121,"name":"vin-metal","tpage_name":"museum3b-pris"}],[223805560,{"idx":120,"name":"vin-ltbrownstrap","tpage_name":"museum3b-pris"}],[223805559,{"idx":119,"name":"vin-lens","tpage_name":"museum3b-pris"}],[223805558,{"idx":118,"name":"vin-hair-02","tpage_name":"museum3b-pris"}],[223805557,{"idx":117,"name":"vin-hair-01","tpage_name":"museum3b-pris"}],[223805556,{"idx":116,"name":"vin-gunhandle-01","tpage_name":"museum3b-pris"}],[223805555,{"idx":115,"name":"vin-gunbarrel-02","tpage_name":"museum3b-pris"}],[223805554,{"idx":114,"name":"vin-gunbarrel","tpage_name":"museum3b-pris"}],[223805553,{"idx":113,"name":"vin-glove-02","tpage_name":"museum3b-pris"}],[223805552,{"idx":112,"name":"vin-glove-01","tpage_name":"museum3b-pris"}],[223805551,{"idx":111,"name":"vin-finger-01","tpage_name":"museum3b-pris"}],[223805550,{"idx":110,"name":"vin-face-01","tpage_name":"museum3b-pris"}],[223805549,{"idx":109,"name":"vin-emblem","tpage_name":"museum3b-pris"}],[223805548,{"idx":108,"name":"vin-ear","tpage_name":"museum3b-pris"}],[223805547,{"idx":107,"name":"vin-clip","tpage_name":"museum3b-pris"}],[223805546,{"idx":106,"name":"vin-blackstrap","tpage_name":"museum3b-pris"}],[223805545,{"idx":105,"name":"vin-belt-02","tpage_name":"museum3b-pris"}],[223805544,{"idx":104,"name":"vin-belt","tpage_name":"museum3b-pris"}],[223805543,{"idx":103,"name":"vin-armor","tpage_name":"museum3b-pris"}],[223805542,{"idx":102,"name":"crocadog-upperbody-01","tpage_name":"museum3b-pris"}],[223805541,{"idx":101,"name":"crocadog-toenails","tpage_name":"museum3b-pris"}],[223805540,{"idx":100,"name":"crocadog-teeth","tpage_name":"museum3b-pris"}],[223805539,{"idx":99,"name":"crocadog-scale","tpage_name":"museum3b-pris"}],[223805538,{"idx":98,"name":"crocadog-nose","tpage_name":"museum3b-pris"}],[223805537,{"idx":97,"name":"crocadog-lowerbody-01","tpage_name":"museum3b-pris"}],[223805536,{"idx":96,"name":"crocadog-insidemouth","tpage_name":"museum3b-pris"}],[223805535,{"idx":95,"name":"crocadog-footbottom","tpage_name":"museum3b-pris"}],[223805534,{"idx":94,"name":"crocadog-faceyellow","tpage_name":"museum3b-pris"}],[223805533,{"idx":93,"name":"crocadog-facegreen","tpage_name":"museum3b-pris"}],[223805532,{"idx":92,"name":"crocadog-eyelid","tpage_name":"museum3b-pris"}],[223805531,{"idx":91,"name":"crocadog-eye","tpage_name":"museum3b-pris"}],[223805530,{"idx":90,"name":"crocadog-collar","tpage_name":"museum3b-pris"}],[223805529,{"idx":89,"name":"kid-teeth","tpage_name":"museum3b-pris"}],[223805528,{"idx":88,"name":"kid-shirt","tpage_name":"museum3b-pris"}],[223805527,{"idx":87,"name":"kid-sash","tpage_name":"museum3b-pris"}],[223805526,{"idx":86,"name":"kid-overalls","tpage_name":"museum3b-pris"}],[223805525,{"idx":85,"name":"kid-medallion","tpage_name":"museum3b-pris"}],[223805524,{"idx":84,"name":"kid-helmet","tpage_name":"museum3b-pris"}],[223805523,{"idx":83,"name":"kid-hair","tpage_name":"museum3b-pris"}],[223805522,{"idx":82,"name":"kid-foot","tpage_name":"museum3b-pris"}],[223805521,{"idx":81,"name":"kid-finger","tpage_name":"museum3b-pris"}],[223805520,{"idx":80,"name":"kid-face","tpage_name":"museum3b-pris"}],[223805519,{"idx":79,"name":"kid-eyelid","tpage_name":"museum3b-pris"}],[223805518,{"idx":78,"name":"kid-eye","tpage_name":"museum3b-pris"}],[223805517,{"idx":77,"name":"kid-clips","tpage_name":"museum3b-pris"}],[223805516,{"idx":76,"name":"kid-brownstrap","tpage_name":"museum3b-pris"}],[223805515,{"idx":75,"name":"kid-blackstrap","tpage_name":"museum3b-pris"}],[223805514,{"idx":74,"name":"krewleg","tpage_name":"museum3b-pris"}],[223805513,{"idx":73,"name":"krew-vehicle2","tpage_name":"museum3b-pris"}],[223805512,{"idx":72,"name":"krew-vehicle","tpage_name":"museum3b-pris"}],[223805511,{"idx":71,"name":"krew-shirtleather","tpage_name":"museum3b-pris"}],[223805460,{"idx":20,"name":"errol-gunhandle","tpage_name":"museum3b-pris"}],[223805459,{"idx":19,"name":"errol-gunbarrel-03","tpage_name":"museum3b-pris"}],[223805458,{"idx":18,"name":"errol-gunbarrel-02","tpage_name":"museum3b-pris"}],[223805457,{"idx":17,"name":"errol-gunbarrel-01","tpage_name":"museum3b-pris"}],[223805456,{"idx":16,"name":"errol-facemask","tpage_name":"museum3b-pris"}],[223805455,{"idx":15,"name":"errol-faceemblem","tpage_name":"museum3b-pris"}],[223805454,{"idx":14,"name":"errol-face","tpage_name":"museum3b-pris"}],[223805453,{"idx":13,"name":"errol-eyelid","tpage_name":"museum3b-pris"}],[223805452,{"idx":12,"name":"errol-eyebrow","tpage_name":"museum3b-pris"}],[223805451,{"idx":11,"name":"errol-eye","tpage_name":"museum3b-pris"}],[223805450,{"idx":10,"name":"errol-earcup","tpage_name":"museum3b-pris"}],[223805449,{"idx":9,"name":"errol-ear","tpage_name":"museum3b-pris"}],[223805447,{"idx":7,"name":"errol-chestplateside","tpage_name":"museum3b-pris"}],[223805446,{"idx":6,"name":"errol-chestplate","tpage_name":"museum3b-pris"}],[223805445,{"idx":5,"name":"errol-brownpipe","tpage_name":"museum3b-pris"}],[223805444,{"idx":4,"name":"errol-boottoe","tpage_name":"museum3b-pris"}],[223805443,{"idx":3,"name":"errol-blackpipe","tpage_name":"museum3b-pris"}],[223805442,{"idx":2,"name":"environment-oldmetal","tpage_name":"museum3b-pris"}],[223805441,{"idx":1,"name":"bam-hairhilite","tpage_name":"museum3b-pris"}],[223805440,{"idx":0,"name":"bam-eyelight","tpage_name":"museum3b-pris"}],[223346693,{"idx":5,"name":"rub-cement-broken-end","tpage_name":"lpattack-vis-tfrag"}],[223346692,{"idx":4,"name":"rub-elec-switch-light-on-orange","tpage_name":"lpattack-vis-tfrag"}],[223346691,{"idx":3,"name":"rub-elec-switch-pole-01","tpage_name":"lpattack-vis-tfrag"}],[223346690,{"idx":2,"name":"rub-wall-gen-03","tpage_name":"lpattack-vis-tfrag"}],[223346689,{"idx":1,"name":"rub-elec-switch-panel-01","tpage_name":"lpattack-vis-tfrag"}],[223346688,{"idx":0,"name":"rub-elec-switch-blue-paint-01","tpage_name":"lpattack-vis-tfrag"}],[223150165,{"idx":85,"name":"vehicle-wheel-01","tpage_name":"rublcst-vis-pris"}],[223150164,{"idx":84,"name":"rhino-wheel-01","tpage_name":"rublcst-vis-pris"}],[223150163,{"idx":83,"name":"rhino-horn-02","tpage_name":"rublcst-vis-pris"}],[223150162,{"idx":82,"name":"kid-teeth","tpage_name":"rublcst-vis-pris"}],[223150161,{"idx":81,"name":"kid-shirt","tpage_name":"rublcst-vis-pris"}],[223150160,{"idx":80,"name":"kid-sash","tpage_name":"rublcst-vis-pris"}],[223150159,{"idx":79,"name":"kid-overalls","tpage_name":"rublcst-vis-pris"}],[223150158,{"idx":78,"name":"kid-medallion","tpage_name":"rublcst-vis-pris"}],[223150157,{"idx":77,"name":"kid-helmet","tpage_name":"rublcst-vis-pris"}],[223150156,{"idx":76,"name":"kid-hair","tpage_name":"rublcst-vis-pris"}],[223150155,{"idx":75,"name":"kid-foot","tpage_name":"rublcst-vis-pris"}],[223150154,{"idx":74,"name":"kid-finger","tpage_name":"rublcst-vis-pris"}],[223150153,{"idx":73,"name":"kid-face","tpage_name":"rublcst-vis-pris"}],[223150152,{"idx":72,"name":"kid-eyelid","tpage_name":"rublcst-vis-pris"}],[223150151,{"idx":71,"name":"kid-eye","tpage_name":"rublcst-vis-pris"}],[223150150,{"idx":70,"name":"kid-clips","tpage_name":"rublcst-vis-pris"}],[223150149,{"idx":69,"name":"kid-brownstrap","tpage_name":"rublcst-vis-pris"}],[223150148,{"idx":68,"name":"kid-blackstrap","tpage_name":"rublcst-vis-pris"}],[223150147,{"idx":67,"name":"jakchires-teeth","tpage_name":"rublcst-vis-pris"}],[223150146,{"idx":66,"name":"jakchires-shoeteop","tpage_name":"rublcst-vis-pris"}],[223150145,{"idx":65,"name":"jakchires-shoemetal","tpage_name":"rublcst-vis-pris"}],[223150144,{"idx":64,"name":"jakchires-shoebottom","tpage_name":"rublcst-vis-pris"}],[223150143,{"idx":63,"name":"jakchires-precarmor-01","tpage_name":"rublcst-vis-pris"}],[223150142,{"idx":62,"name":"jakchires-pants","tpage_name":"rublcst-vis-pris"}],[223150141,{"idx":61,"name":"jakchires-lightbrownspat","tpage_name":"rublcst-vis-pris"}],[223150140,{"idx":60,"name":"jakchires-leatherpouch","tpage_name":"rublcst-vis-pris"}],[223150116,{"idx":36,"name":"jakchires-brwnleather","tpage_name":"rublcst-vis-pris"}],[223150115,{"idx":35,"name":"jakchires-brownstrap","tpage_name":"rublcst-vis-pris"}],[223150114,{"idx":34,"name":"jakchires-blackstrap","tpage_name":"rublcst-vis-pris"}],[223150113,{"idx":33,"name":"jakchires-arm-norm","tpage_name":"rublcst-vis-pris"}],[223150112,{"idx":32,"name":"jakchires-arm-dark","tpage_name":"rublcst-vis-pris"}],[223150111,{"idx":31,"name":"jakchires-arm","tpage_name":"rublcst-vis-pris"}],[223150110,{"idx":30,"name":"jakc-wristband-a2","tpage_name":"rublcst-vis-pris"}],[223150109,{"idx":29,"name":"jakc-wraps","tpage_name":"rublcst-vis-pris"}],[223150108,{"idx":28,"name":"jakc-waistband2","tpage_name":"rublcst-vis-pris"}],[223150107,{"idx":27,"name":"jakc-skirt","tpage_name":"rublcst-vis-pris"}],[223150106,{"idx":26,"name":"jakc-scarfhanging","tpage_name":"rublcst-vis-pris"}],[223150105,{"idx":25,"name":"jakc-scarf","tpage_name":"rublcst-vis-pris"}],[223150103,{"idx":23,"name":"jakc-gogglemetal","tpage_name":"rublcst-vis-pris"}],[223150102,{"idx":22,"name":"jakc-chestplate-straps","tpage_name":"rublcst-vis-pris"}],[223150101,{"idx":21,"name":"jakc-armor","tpage_name":"rublcst-vis-pris"}],[223150100,{"idx":20,"name":"intcept-tread01","tpage_name":"rublcst-vis-pris"}],[223150099,{"idx":19,"name":"environment-oldmetal","tpage_name":"rublcst-vis-pris"}],[223150098,{"idx":18,"name":"daxtertuft","tpage_name":"rublcst-vis-pris"}],[223150097,{"idx":17,"name":"daxterteeth","tpage_name":"rublcst-vis-pris"}],[223150096,{"idx":16,"name":"daxternose","tpage_name":"rublcst-vis-pris"}],[223150095,{"idx":15,"name":"daxterlense","tpage_name":"rublcst-vis-pris"}],[223150094,{"idx":14,"name":"daxterhelmetplain","tpage_name":"rublcst-vis-pris"}],[223150093,{"idx":13,"name":"daxterheadwidenew","tpage_name":"rublcst-vis-pris"}],[223150092,{"idx":12,"name":"daxtergoggles","tpage_name":"rublcst-vis-pris"}],[223150091,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"rublcst-vis-pris"}],[223150090,{"idx":10,"name":"daxterfoot","tpage_name":"rublcst-vis-pris"}],[223150089,{"idx":9,"name":"daxterfinger","tpage_name":"rublcst-vis-pris"}],[223150088,{"idx":8,"name":"daxterear","tpage_name":"rublcst-vis-pris"}],[223150087,{"idx":7,"name":"daxterbolt","tpage_name":"rublcst-vis-pris"}],[223150086,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"rublcst-vis-pris"}],[223150085,{"idx":5,"name":"daxterarm","tpage_name":"rublcst-vis-pris"}],[223150084,{"idx":4,"name":"daxter-orange","tpage_name":"rublcst-vis-pris"}],[223150083,{"idx":3,"name":"daxter-furhilite","tpage_name":"rublcst-vis-pris"}],[223150082,{"idx":2,"name":"daxter-eyelid","tpage_name":"rublcst-vis-pris"}],[223150081,{"idx":1,"name":"bam-hairhilite","tpage_name":"rublcst-vis-pris"}],[223150080,{"idx":0,"name":"bam-eyelight","tpage_name":"rublcst-vis-pris"}],[223084559,{"idx":15,"name":"rail-light-green","tpage_name":"rublcst-vis-shrub"}],[223084558,{"idx":14,"name":"rail-light-blue","tpage_name":"rublcst-vis-shrub"}],[223084557,{"idx":13,"name":"rail-chair-01","tpage_name":"rublcst-vis-shrub"}],[223084556,{"idx":12,"name":"rail-car-vent-01","tpage_name":"rublcst-vis-shrub"}],[223084555,{"idx":11,"name":"rail-gray-metal-01","tpage_name":"rublcst-vis-shrub"}],[223084554,{"idx":10,"name":"rail-dash-01","tpage_name":"rublcst-vis-shrub"}],[223084553,{"idx":9,"name":"rail-pipe-03","tpage_name":"rublcst-vis-shrub"}],[223084552,{"idx":8,"name":"rail-rider-decal-01","tpage_name":"rublcst-vis-shrub"}],[223084551,{"idx":7,"name":"rail-base-dark-01","tpage_name":"rublcst-vis-shrub"}],[223084550,{"idx":6,"name":"rail-env-wall-01","tpage_name":"rublcst-vis-shrub"}],[223084549,{"idx":5,"name":"rub-met-strp-close","tpage_name":"rublcst-vis-shrub"}],[223084548,{"idx":4,"name":"rub-ground-01-small","tpage_name":"rublcst-vis-shrub"}],[223084547,{"idx":3,"name":"rub-wall-small-grill","tpage_name":"rublcst-vis-shrub"}],[223084546,{"idx":2,"name":"rub-beam-gen","tpage_name":"rublcst-vis-shrub"}],[223084545,{"idx":1,"name":"rub-greyblue-plain-lowres","tpage_name":"rublcst-vis-shrub"}],[223084544,{"idx":0,"name":"rub-crater-shards-01","tpage_name":"rublcst-vis-shrub"}],[223019050,{"idx":42,"name":"rail-env-wall-01","tpage_name":"rublcst-vis-tfrag"}],[223019049,{"idx":41,"name":"rail-env-car-01","tpage_name":"rublcst-vis-tfrag"}],[223019048,{"idx":40,"name":"slum-ground-01","tpage_name":"rublcst-vis-tfrag"}],[223019047,{"idx":39,"name":"rub-wallrock-dirt","tpage_name":"rublcst-vis-tfrag"}],[223019046,{"idx":38,"name":"rub-dirt-a","tpage_name":"rublcst-vis-tfrag"}],[223019045,{"idx":37,"name":"rail-pipe-05","tpage_name":"rublcst-vis-tfrag"}],[223019033,{"idx":25,"name":"rail-pipe-03","tpage_name":"rublcst-vis-tfrag"}],[223019029,{"idx":21,"name":"rail-edge-01","tpage_name":"rublcst-vis-tfrag"}],[223019028,{"idx":20,"name":"rail-light-blue","tpage_name":"rublcst-vis-tfrag"}],[223019027,{"idx":19,"name":"rail-patch-01","tpage_name":"rublcst-vis-tfrag"}],[223019026,{"idx":18,"name":"rub-met-strp-close","tpage_name":"rublcst-vis-tfrag"}],[223019025,{"idx":17,"name":"rub-palace-tower-side","tpage_name":"rublcst-vis-tfrag"}],[223019024,{"idx":16,"name":"rub-copper-metal-02","tpage_name":"rublcst-vis-tfrag"}],[223019023,{"idx":15,"name":"rub-floor-c","tpage_name":"rublcst-vis-tfrag"}],[223019022,{"idx":14,"name":"rub-wall-trim","tpage_name":"rublcst-vis-tfrag"}],[223019021,{"idx":13,"name":"rub-wall-gen-02","tpage_name":"rublcst-vis-tfrag"}],[223019020,{"idx":12,"name":"rub-wall-gen-04","tpage_name":"rublcst-vis-tfrag"}],[223019019,{"idx":11,"name":"rub-beam-gen","tpage_name":"rublcst-vis-tfrag"}],[223019018,{"idx":10,"name":"rub-city-wall-inside-damaged","tpage_name":"rublcst-vis-tfrag"}],[223019017,{"idx":9,"name":"rub-wall-side-beam-02","tpage_name":"rublcst-vis-tfrag"}],[223019016,{"idx":8,"name":"rub-wall-gen-01","tpage_name":"rublcst-vis-tfrag"}],[223019015,{"idx":7,"name":"rub-cement-broken-end","tpage_name":"rublcst-vis-tfrag"}],[223019014,{"idx":6,"name":"rub-cement-pillars","tpage_name":"rublcst-vis-tfrag"}],[223019013,{"idx":5,"name":"rub-cement-a","tpage_name":"rublcst-vis-tfrag"}],[223019010,{"idx":2,"name":"rub-rubble-01","tpage_name":"rublcst-vis-tfrag"}],[223019009,{"idx":1,"name":"rub-marble-floor-01-hitweak","tpage_name":"rublcst-vis-tfrag"}],[223019008,{"idx":0,"name":"stdm-wallrock-dirt","tpage_name":"rublcst-vis-tfrag"}],[222953476,{"idx":4,"name":"palcab-lowres-ctyslum-wall-03","tpage_name":"lfacctyb-vis-alpha"}],[222953475,{"idx":3,"name":"palcab-lowres-background-trees2","tpage_name":"lfacctyb-vis-alpha"}],[222953474,{"idx":2,"name":"palcab-lowres-background-trees-edge","tpage_name":"lfacctyb-vis-alpha"}],[222953473,{"idx":1,"name":"palcab-lowres-background-crater-rim","tpage_name":"lfacctyb-vis-alpha"}],[222953472,{"idx":0,"name":"palcab-lowres-background-shoreline-02","tpage_name":"lfacctyb-vis-alpha"}],[222888061,{"idx":125,"name":"palcab-lowres-background-mountains-02","tpage_name":"lfacctyb-vis-tfrag"}],[222888060,{"idx":124,"name":"palcab-lowres-background-peaks-02","tpage_name":"lfacctyb-vis-tfrag"}],[222888059,{"idx":123,"name":"palcab-smallpipe-lores","tpage_name":"lfacctyb-vis-tfrag"}],[222888058,{"idx":122,"name":"palcab-lowres-background-crater-01","tpage_name":"lfacctyb-vis-tfrag"}],[222888057,{"idx":121,"name":"palcab-lowres-background-desert-to-shore","tpage_name":"lfacctyb-vis-tfrag"}],[222888056,{"idx":120,"name":"palcab-lowres-background-shoreline-02","tpage_name":"lfacctyb-vis-tfrag"}],[222888055,{"idx":119,"name":"palcab-lowres-background-peaks-01","tpage_name":"lfacctyb-vis-tfrag"}],[222888054,{"idx":118,"name":"tcab-blue-ring-01","tpage_name":"lfacctyb-vis-tfrag"}],[222888053,{"idx":117,"name":"tcab-beam01-lores","tpage_name":"lfacctyb-vis-tfrag"}],[222888052,{"idx":116,"name":"city-lowres-mhcity-ground-01","tpage_name":"lfacctyb-vis-tfrag"}],[222888051,{"idx":115,"name":"palcab-lowres-background-desert-01","tpage_name":"lfacctyb-vis-tfrag"}],[222888050,{"idx":114,"name":"palcab-lowres-background-hilltops-01","tpage_name":"lfacctyb-vis-tfrag"}],[222888049,{"idx":113,"name":"palcab-lowres-background-mounatin-window","tpage_name":"lfacctyb-vis-tfrag"}],[222888048,{"idx":112,"name":"palcab-lowres-background-grass-to-desert-01","tpage_name":"lfacctyb-vis-tfrag"}],[222888047,{"idx":111,"name":"palcab-lowres-background-grass-to-desert-02","tpage_name":"lfacctyb-vis-tfrag"}],[222888046,{"idx":110,"name":"palcab-lowres-background-mountains","tpage_name":"lfacctyb-vis-tfrag"}],[222888045,{"idx":109,"name":"palcab-lowres-background-shoreline-01","tpage_name":"lfacctyb-vis-tfrag"}],[222888044,{"idx":108,"name":"city-lowres-mhcity-tower-02","tpage_name":"lfacctyb-vis-tfrag"}],[222888043,{"idx":107,"name":"palcab-swingp-trim","tpage_name":"lfacctyb-vis-tfrag"}],[222888042,{"idx":106,"name":"city-lowres-mhcity-tower-01","tpage_name":"lfacctyb-vis-tfrag"}],[222888041,{"idx":105,"name":"palcab-lorez-plates-red-stripe01","tpage_name":"lfacctyb-vis-tfrag"}],[222888040,{"idx":104,"name":"t-palshaft-r-strp-plate01","tpage_name":"lfacctyb-vis-tfrag"}],[222888039,{"idx":103,"name":"ctywide-ox-met-01","tpage_name":"lfacctyb-vis-tfrag"}],[222888038,{"idx":102,"name":"t-palshaft-pil-01","tpage_name":"lfacctyb-vis-tfrag"}],[222888037,{"idx":101,"name":"palcab-lowres-background-strip","tpage_name":"lfacctyb-vis-tfrag"}],[222888036,{"idx":100,"name":"ctyp-metal-01","tpage_name":"lfacctyb-vis-tfrag"}],[222888035,{"idx":99,"name":"palcab-lowres-stadium-grass","tpage_name":"lfacctyb-vis-tfrag"}],[222888034,{"idx":98,"name":"citywide-consite-steel","tpage_name":"lfacctyb-vis-tfrag"}],[222888033,{"idx":97,"name":"t-palshaft-panl-01","tpage_name":"lfacctyb-vis-tfrag"}],[222888032,{"idx":96,"name":"palace-break-brokenwall","tpage_name":"lfacctyb-vis-tfrag"}],[222888031,{"idx":95,"name":"tcab-plat-edg-01-lores","tpage_name":"lfacctyb-vis-tfrag"}],[222888030,{"idx":94,"name":"palcab-wall-lores","tpage_name":"lfacctyb-vis-tfrag"}],[222888029,{"idx":93,"name":"tcab-beam01","tpage_name":"lfacctyb-vis-tfrag"}],[222888028,{"idx":92,"name":"palcab-lorez-plates01","tpage_name":"lfacctyb-vis-tfrag"}],[222888027,{"idx":91,"name":"palcab-lorez-metal01-red-stripe","tpage_name":"lfacctyb-vis-tfrag"}],[222888026,{"idx":90,"name":"palcab-lorez-metal01-red","tpage_name":"lfacctyb-vis-tfrag"}],[222888025,{"idx":89,"name":"palcab-lorez-metal02","tpage_name":"lfacctyb-vis-tfrag"}],[222888024,{"idx":88,"name":"palcab-lowres-background-trees2","tpage_name":"lfacctyb-vis-tfrag"}],[222888023,{"idx":87,"name":"palcab-lowres-background-trees-edge","tpage_name":"lfacctyb-vis-tfrag"}],[222888022,{"idx":86,"name":"palcab-lorez-asphalt01","tpage_name":"lfacctyb-vis-tfrag"}],[222888021,{"idx":85,"name":"palcab-swingp-base-lores","tpage_name":"lfacctyb-vis-tfrag"}],[222888020,{"idx":84,"name":"city-lowres-mhcity-wall-03","tpage_name":"lfacctyb-vis-tfrag"}],[222888019,{"idx":83,"name":"common-black","tpage_name":"lfacctyb-vis-tfrag"}],[222888018,{"idx":82,"name":"city-lowres-mhcity-wall-05","tpage_name":"lfacctyb-vis-tfrag"}],[222888017,{"idx":81,"name":"city-lowres-mhcity-wall-06","tpage_name":"lfacctyb-vis-tfrag"}],[222888016,{"idx":80,"name":"city-lowres-mhcity-detower-02","tpage_name":"lfacctyb-vis-tfrag"}],[222888015,{"idx":79,"name":"city-lowres-mhcity-detower-01","tpage_name":"lfacctyb-vis-tfrag"}],[222888014,{"idx":78,"name":"city-lowres-mhcity-wall-01","tpage_name":"lfacctyb-vis-tfrag"}],[222888013,{"idx":77,"name":"city-lowres-mhcity-wall-02","tpage_name":"lfacctyb-vis-tfrag"}],[222888012,{"idx":76,"name":"citywide-hangmetal","tpage_name":"lfacctyb-vis-tfrag"}],[222888011,{"idx":75,"name":"citywide-palace-01","tpage_name":"lfacctyb-vis-tfrag"}],[222888010,{"idx":74,"name":"palace-break-girder01","tpage_name":"lfacctyb-vis-tfrag"}],[222888009,{"idx":73,"name":"t-palshaft-roof-01","tpage_name":"lfacctyb-vis-tfrag"}],[222888008,{"idx":72,"name":"palcab-lowres-farm-wall-top","tpage_name":"lfacctyb-vis-tfrag"}],[222888007,{"idx":71,"name":"palcab-lowres-farm-wall","tpage_name":"lfacctyb-vis-tfrag"}],[222888006,{"idx":70,"name":"t-citywide-wall-tile-01","tpage_name":"lfacctyb-vis-tfrag"}],[222888005,{"idx":69,"name":"city-lowres-damaged-01","tpage_name":"lfacctyb-vis-tfrag"}],[222888004,{"idx":68,"name":"city-lowres-newslums-stripe-01","tpage_name":"lfacctyb-vis-tfrag"}],[222888003,{"idx":67,"name":"city-lowres-newslums-bigwindows-02","tpage_name":"lfacctyb-vis-tfrag"}],[222888002,{"idx":66,"name":"city-lowres-newslums-stripe-02","tpage_name":"lfacctyb-vis-tfrag"}],[222888001,{"idx":65,"name":"t-strip-lo-palsup-danger2","tpage_name":"lfacctyb-vis-tfrag"}],[222888000,{"idx":64,"name":"t-strip-lo-palsup-danger1","tpage_name":"lfacctyb-vis-tfrag"}],[222887999,{"idx":63,"name":"t-strip-lo-palsup-panel-5","tpage_name":"lfacctyb-vis-tfrag"}],[222887998,{"idx":62,"name":"t-strip-lo-palsup-panel-4","tpage_name":"lfacctyb-vis-tfrag"}],[222887997,{"idx":61,"name":"t-strip-lo-palsup-panel-3","tpage_name":"lfacctyb-vis-tfrag"}],[222887996,{"idx":60,"name":"t-strip-lo-palsup-panel-2","tpage_name":"lfacctyb-vis-tfrag"}],[222887995,{"idx":59,"name":"t-strip-lo-palsup-panel-1","tpage_name":"lfacctyb-vis-tfrag"}],[222887994,{"idx":58,"name":"rub-palace-tower-side","tpage_name":"lfacctyb-vis-tfrag"}],[222887993,{"idx":57,"name":"palcab-lowres-background-mount-build-03","tpage_name":"lfacctyb-vis-tfrag"}],[222887992,{"idx":56,"name":"palcab-lowres-background-mount-build-02","tpage_name":"lfacctyb-vis-tfrag"}],[222887991,{"idx":55,"name":"palcab-lowres-background-mount-build-01","tpage_name":"lfacctyb-vis-tfrag"}],[222887990,{"idx":54,"name":"t-palshaft-plate01","tpage_name":"lfacctyb-vis-tfrag"}],[222887989,{"idx":53,"name":"t-citywide-met-wall-02","tpage_name":"lfacctyb-vis-tfrag"}],[222887988,{"idx":52,"name":"t-citywide-red-met-01","tpage_name":"lfacctyb-vis-tfrag"}],[222887987,{"idx":51,"name":"t-citywide-met-pill-01","tpage_name":"lfacctyb-vis-tfrag"}],[222887986,{"idx":50,"name":"t-citywide-met-strp01","tpage_name":"lfacctyb-vis-tfrag"}],[222887985,{"idx":49,"name":"t-citywide-met-strp02","tpage_name":"lfacctyb-vis-tfrag"}],[222887984,{"idx":48,"name":"palcab-lorez-metal01","tpage_name":"lfacctyb-vis-tfrag"}],[222887983,{"idx":47,"name":"palcab-lorez-metal03","tpage_name":"lfacctyb-vis-tfrag"}],[222887982,{"idx":46,"name":"city-lowres-ctygen-stripe-02","tpage_name":"lfacctyb-vis-tfrag"}],[222887981,{"idx":45,"name":"city-lowres-ctygen-roof-01","tpage_name":"lfacctyb-vis-tfrag"}],[222887980,{"idx":44,"name":"city-lowres-ctygen-build-04","tpage_name":"lfacctyb-vis-tfrag"}],[222887979,{"idx":43,"name":"city-lowres-ctygen-build-05","tpage_name":"lfacctyb-vis-tfrag"}],[222887978,{"idx":42,"name":"city-lowres-ctygen-build-03","tpage_name":"lfacctyb-vis-tfrag"}],[222887977,{"idx":41,"name":"city-lowres-ctygen-side-01","tpage_name":"lfacctyb-vis-tfrag"}],[222887976,{"idx":40,"name":"city-lowres-ctygen-build-02","tpage_name":"lfacctyb-vis-tfrag"}],[222887975,{"idx":39,"name":"palcab-lowres-mark-highway","tpage_name":"lfacctyb-vis-tfrag"}],[222887974,{"idx":38,"name":"city-lowres-ctygen-build-01","tpage_name":"lfacctyb-vis-tfrag"}],[222887973,{"idx":37,"name":"city-lowres-ctygen-roof-02","tpage_name":"lfacctyb-vis-tfrag"}],[222887972,{"idx":36,"name":"city-lowres-ctygen-stripe-01","tpage_name":"lfacctyb-vis-tfrag"}],[222887971,{"idx":35,"name":"city-lowres-ctygen-side-02","tpage_name":"lfacctyb-vis-tfrag"}],[222887970,{"idx":34,"name":"palcab-lowres-mark-awning-red","tpage_name":"lfacctyb-vis-tfrag"}],[222887969,{"idx":33,"name":"palcab-lowres-mark-awning-green","tpage_name":"lfacctyb-vis-tfrag"}],[222167092,{"idx":52,"name":"blady-eyelid","tpage_name":"museum4-tfrag"}],[222167091,{"idx":51,"name":"blady-eyecentered-32x32","tpage_name":"museum4-tfrag"}],[222167090,{"idx":50,"name":"blady-armband","tpage_name":"museum4-tfrag"}],[222167089,{"idx":49,"name":"blady-brown4x4","tpage_name":"museum4-tfrag"}],[222167088,{"idx":48,"name":"blady-bag","tpage_name":"museum4-tfrag"}],[222167087,{"idx":47,"name":"blady-metal","tpage_name":"museum4-tfrag"}],[222167086,{"idx":46,"name":"blady-feaTher","tpage_name":"museum4-tfrag"}],[222167085,{"idx":45,"name":"farmer-toes","tpage_name":"museum4-tfrag"}],[222167084,{"idx":44,"name":"farmer-whitestraps","tpage_name":"museum4-tfrag"}],[222167083,{"idx":43,"name":"blady-diaper","tpage_name":"museum4-tfrag"}],[222167082,{"idx":42,"name":"blady-shirt","tpage_name":"museum4-tfrag"}],[222167081,{"idx":41,"name":"farmer-teeth","tpage_name":"museum4-tfrag"}],[222167080,{"idx":40,"name":"blady-belt","tpage_name":"museum4-tfrag"}],[222167079,{"idx":39,"name":"blady-brownleather","tpage_name":"museum4-tfrag"}],[222167078,{"idx":38,"name":"farmer-flesh4x4","tpage_name":"museum4-tfrag"}],[222167077,{"idx":37,"name":"blady-hateyecenter","tpage_name":"museum4-tfrag"}],[222167076,{"idx":36,"name":"blady-hatseamend","tpage_name":"museum4-tfrag"}],[222167075,{"idx":35,"name":"blady-hateye","tpage_name":"museum4-tfrag"}],[222167074,{"idx":34,"name":"blady-hatplain","tpage_name":"museum4-tfrag"}],[222167073,{"idx":33,"name":"blady-hat","tpage_name":"museum4-tfrag"}],[222167072,{"idx":32,"name":"blady-mouthtop","tpage_name":"museum4-tfrag"}],[222167071,{"idx":31,"name":"blady-lense","tpage_name":"museum4-tfrag"}],[222167070,{"idx":30,"name":"flut-eyelid","tpage_name":"museum4-tfrag"}],[222167069,{"idx":29,"name":"flut-eye-16x16","tpage_name":"museum4-tfrag"}],[222167068,{"idx":28,"name":"war-autoeye","tpage_name":"museum4-tfrag"}],[222167067,{"idx":27,"name":"war-booboo","tpage_name":"museum4-tfrag"}],[222167063,{"idx":23,"name":"assis-flesh4x4","tpage_name":"museum4-tfrag"}],[222167062,{"idx":22,"name":"war-hair","tpage_name":"museum4-tfrag"}],[222167061,{"idx":21,"name":"war-largebutton","tpage_name":"museum4-tfrag"}],[222167060,{"idx":20,"name":"war-skirt","tpage_name":"museum4-tfrag"}],[222167059,{"idx":19,"name":"bab-pendant","tpage_name":"museum4-tfrag"}],[222167058,{"idx":18,"name":"war-guards","tpage_name":"museum4-tfrag"}],[222167057,{"idx":17,"name":"war-chestplate","tpage_name":"museum4-tfrag"}],[222167056,{"idx":16,"name":"war-brokenstrap","tpage_name":"museum4-tfrag"}],[222167055,{"idx":15,"name":"war-cape","tpage_name":"museum4-tfrag"}],[222167054,{"idx":14,"name":"war-teeth","tpage_name":"museum4-tfrag"}],[222167053,{"idx":13,"name":"flut-nostril","tpage_name":"museum4-tfrag"}],[222167052,{"idx":12,"name":"flut-tail","tpage_name":"museum4-tfrag"}],[222167051,{"idx":11,"name":"flut-leg","tpage_name":"museum4-tfrag"}],[222167050,{"idx":10,"name":"orange","tpage_name":"museum4-tfrag"}],[222167049,{"idx":9,"name":"flut-brow","tpage_name":"museum4-tfrag"}],[222167048,{"idx":8,"name":"flut-face","tpage_name":"museum4-tfrag"}],[222167047,{"idx":7,"name":"flut-plume","tpage_name":"museum4-tfrag"}],[222167046,{"idx":6,"name":"flut-wing","tpage_name":"museum4-tfrag"}],[222167045,{"idx":5,"name":"flut-wingends","tpage_name":"museum4-tfrag"}],[223412224,{"idx":0,"name":"cactus-bit1","tpage_name":"desertg-sprite"}],[222167044,{"idx":4,"name":"flut-creamfeathers","tpage_name":"museum4-tfrag"}],[222167043,{"idx":3,"name":"flut-dkbluefeathers","tpage_name":"museum4-tfrag"}],[221904992,{"idx":96,"name":"jak-orig-hairplain","tpage_name":"museum4-pris2"}],[223150139,{"idx":59,"name":"jakchires-jacket","tpage_name":"rublcst-vis-pris"}],[221904959,{"idx":63,"name":"jak-orig-wraps","tpage_name":"museum4-pris2"}],[223150138,{"idx":58,"name":"jakchires-horn","tpage_name":"rublcst-vis-pris"}],[221904958,{"idx":62,"name":"jak-orig-teeth","tpage_name":"museum4-pris2"}],[223150137,{"idx":57,"name":"jakchires-hair-norm","tpage_name":"rublcst-vis-pris"}],[221904957,{"idx":61,"name":"jak-orig-strap","tpage_name":"museum4-pris2"}],[223150136,{"idx":56,"name":"jakchires-hair-dark","tpage_name":"rublcst-vis-pris"}],[221904956,{"idx":60,"name":"jak-orig-skirt","tpage_name":"museum4-pris2"}],[223150135,{"idx":55,"name":"jakchires-hair","tpage_name":"rublcst-vis-pris"}],[221904955,{"idx":59,"name":"jak-orig-pants","tpage_name":"museum4-pris2"}],[223150134,{"idx":54,"name":"jakchires-glovetop","tpage_name":"rublcst-vis-pris"}],[221904954,{"idx":58,"name":"jak-orig-lenscover","tpage_name":"museum4-pris2"}],[223150133,{"idx":53,"name":"jakchires-facert-norm","tpage_name":"rublcst-vis-pris"}],[221904953,{"idx":57,"name":"jak-orig-lens","tpage_name":"museum4-pris2"}],[223150132,{"idx":52,"name":"jakchires-facert-dark","tpage_name":"rublcst-vis-pris"}],[221904952,{"idx":56,"name":"jak-orig-leatherpouch","tpage_name":"museum4-pris2"}],[223150131,{"idx":51,"name":"jakchires-facert","tpage_name":"rublcst-vis-pris"}],[221904951,{"idx":55,"name":"jak-orig-jackettop","tpage_name":"museum4-pris2"}],[223150130,{"idx":50,"name":"jakchires-facelft-norm","tpage_name":"rublcst-vis-pris"}],[221904950,{"idx":54,"name":"jak-orig-handwraps","tpage_name":"museum4-pris2"}],[223150129,{"idx":49,"name":"jakchires-facelft-dark","tpage_name":"rublcst-vis-pris"}],[221904949,{"idx":53,"name":"jak-orig-hair","tpage_name":"museum4-pris2"}],[223150128,{"idx":48,"name":"jakchires-facelft","tpage_name":"rublcst-vis-pris"}],[221904948,{"idx":52,"name":"jak-orig-goggles","tpage_name":"museum4-pris2"}],[223150127,{"idx":47,"name":"jakchires-eyelid-norm","tpage_name":"rublcst-vis-pris"}],[221904947,{"idx":51,"name":"jak-orig-finger","tpage_name":"museum4-pris2"}],[223150126,{"idx":46,"name":"jakchires-eyelid-dark","tpage_name":"rublcst-vis-pris"}],[221904946,{"idx":50,"name":"jak-orig-face","tpage_name":"museum4-pris2"}],[223150125,{"idx":45,"name":"jakchires-eyelid","tpage_name":"rublcst-vis-pris"}],[221904945,{"idx":49,"name":"jak-orig-eyelid","tpage_name":"museum4-pris2"}],[223150124,{"idx":44,"name":"jakchires-eyebrow-norm","tpage_name":"rublcst-vis-pris"}],[221904944,{"idx":48,"name":"jak-orig-eyebrow","tpage_name":"museum4-pris2"}],[223150123,{"idx":43,"name":"jakchires-eyebrow-dark","tpage_name":"rublcst-vis-pris"}],[221904943,{"idx":47,"name":"jak-orig-eye","tpage_name":"museum4-pris2"}],[223150122,{"idx":42,"name":"jakchires-eyebrow","tpage_name":"rublcst-vis-pris"}],[221904942,{"idx":46,"name":"jak-orig-earflaps","tpage_name":"museum4-pris2"}],[223150121,{"idx":41,"name":"jakchires-eye-norm","tpage_name":"rublcst-vis-pris"}],[221904941,{"idx":45,"name":"jak-orig-clips","tpage_name":"museum4-pris2"}],[223150120,{"idx":40,"name":"jakchires-eye-dark","tpage_name":"rublcst-vis-pris"}],[221904940,{"idx":44,"name":"jak-orig-belt","tpage_name":"museum4-pris2"}],[223150119,{"idx":39,"name":"jakchires-eye","tpage_name":"rublcst-vis-pris"}],[221904939,{"idx":43,"name":"jak-orig-armor","tpage_name":"museum4-pris2"}],[223150118,{"idx":38,"name":"jakchires-clips","tpage_name":"rublcst-vis-pris"}],[221904938,{"idx":42,"name":"jak-orig-arm","tpage_name":"museum4-pris2"}],[223150117,{"idx":37,"name":"jakchires-chestplate","tpage_name":"rublcst-vis-pris"}],[221904937,{"idx":41,"name":"environment-oldmetal","tpage_name":"museum4-pris2"}],[223150104,{"idx":24,"name":"jakc-lens","tpage_name":"rublcst-vis-pris"}],[221904924,{"idx":28,"name":"charHOLD","tpage_name":"museum4-pris2"}],[221904897,{"idx":1,"name":"bam-hairhilite","tpage_name":"museum4-pris2"}],[221904896,{"idx":0,"name":"bam-eyelight","tpage_name":"museum4-pris2"}],[221839363,{"idx":3,"name":"hud-small-frame-02","tpage_name":"deswalk-minimap"}],[221839362,{"idx":2,"name":"hud-small-frame-01","tpage_name":"deswalk-minimap"}],[221839361,{"idx":1,"name":"hud-mhcentipede-meter-01","tpage_name":"deswalk-minimap"}],[221773825,{"idx":1,"name":"cactus-bit1","tpage_name":"desertd-sprite"}],[221773824,{"idx":0,"name":"ceiling-dust","tpage_name":"desertd-sprite"}],[221511680,{"idx":0,"name":"des-bush-timer-chase-trail","tpage_name":"lbbtcha3-water"}],[221446144,{"idx":0,"name":"des-bush-timer-chase-trail","tpage_name":"lbbtcha2-water"}],[220529050,{"idx":410,"name":"minetall-eye-16x16","tpage_name":"museum4-pris"}],[220529049,{"idx":409,"name":"mineshort-eye-16x16","tpage_name":"museum4-pris"}],[220529048,{"idx":408,"name":"geo-eye-16x16","tpage_name":"museum4-pris"}],[220529047,{"idx":407,"name":"gambler-eye-16x16","tpage_name":"museum4-pris"}],[220529017,{"idx":377,"name":"war-teeth","tpage_name":"museum4-pris"}],[220529008,{"idx":368,"name":"p-white","tpage_name":"museum4-pris"}],[220529007,{"idx":367,"name":"ogre-wristband","tpage_name":"museum4-pris"}],[220529006,{"idx":366,"name":"ogre-vestfront","tpage_name":"museum4-pris"}],[220529005,{"idx":365,"name":"ogre-tanleather","tpage_name":"museum4-pris"}],[220529004,{"idx":364,"name":"ogre-skinbone","tpage_name":"museum4-pris"}],[220529003,{"idx":363,"name":"ogre-pipeholders","tpage_name":"museum4-pris"}],[220529002,{"idx":362,"name":"ogre-pipeends","tpage_name":"museum4-pris"}],[220529001,{"idx":361,"name":"ogre-pipe","tpage_name":"museum4-pris"}],[220529000,{"idx":360,"name":"ogre-nose","tpage_name":"museum4-pris"}],[220528999,{"idx":359,"name":"ogre-ltmetal","tpage_name":"museum4-pris"}],[220528998,{"idx":358,"name":"ogre-lens","tpage_name":"museum4-pris"}],[220528997,{"idx":357,"name":"ogre-hair","tpage_name":"museum4-pris"}],[220528996,{"idx":356,"name":"ogre-greymetalbolt","tpage_name":"museum4-pris"}],[220528995,{"idx":355,"name":"ogre-furtrans2","tpage_name":"museum4-pris"}],[220528994,{"idx":354,"name":"ogre-furtrans","tpage_name":"museum4-pris"}],[220528993,{"idx":353,"name":"ogre-furlong","tpage_name":"museum4-pris"}],[220528992,{"idx":352,"name":"ogre-eye","tpage_name":"museum4-pris"}],[220528991,{"idx":351,"name":"ogre-claw","tpage_name":"museum4-pris"}],[220528990,{"idx":350,"name":"ogre-brownleather","tpage_name":"museum4-pris"}],[220528989,{"idx":349,"name":"ogre-bolt","tpage_name":"museum4-pris"}],[220528988,{"idx":348,"name":"ogre-bluefur","tpage_name":"museum4-pris"}],[220528987,{"idx":347,"name":"ogre-beardring","tpage_name":"museum4-pris"}],[220528986,{"idx":346,"name":"ogre-arm","tpage_name":"museum4-pris"}],[220528985,{"idx":345,"name":"minetall-stick","tpage_name":"museum4-pris"}],[220528984,{"idx":344,"name":"minetall-shoveltop","tpage_name":"museum4-pris"}],[220528983,{"idx":343,"name":"minetall-shovelbottom","tpage_name":"museum4-pris"}],[220528982,{"idx":342,"name":"minetall-shirtbuckles","tpage_name":"museum4-pris"}],[220528981,{"idx":341,"name":"minetall-pants","tpage_name":"museum4-pris"}],[220528980,{"idx":340,"name":"minetall-overalls","tpage_name":"museum4-pris"}],[220528979,{"idx":339,"name":"minetall-overallbutton","tpage_name":"museum4-pris"}],[220528978,{"idx":338,"name":"minetall-leggings","tpage_name":"museum4-pris"}],[220528977,{"idx":337,"name":"minetall-leatherstrap","tpage_name":"museum4-pris"}],[220528976,{"idx":336,"name":"minetall-hair","tpage_name":"museum4-pris"}],[220528975,{"idx":335,"name":"minetall-dynamite","tpage_name":"museum4-pris"}],[220528974,{"idx":334,"name":"minetall-birdwings","tpage_name":"museum4-pris"}],[220528973,{"idx":333,"name":"minetall-birdtail","tpage_name":"museum4-pris"}],[220528972,{"idx":332,"name":"minetall-birdfoot","tpage_name":"museum4-pris"}],[220528971,{"idx":331,"name":"minetall-birbody","tpage_name":"museum4-pris"}],[220528970,{"idx":330,"name":"minetall-belt","tpage_name":"museum4-pris"}],[220528969,{"idx":329,"name":"geo-vest4","tpage_name":"museum4-pris"}],[220528968,{"idx":328,"name":"geo-vest3","tpage_name":"museum4-pris"}],[220528967,{"idx":327,"name":"geo-vest2","tpage_name":"museum4-pris"}],[220528966,{"idx":326,"name":"geo-vest","tpage_name":"museum4-pris"}],[220528965,{"idx":325,"name":"geo-shirt","tpage_name":"museum4-pris"}],[220528964,{"idx":324,"name":"geo-rope","tpage_name":"museum4-pris"}],[220528963,{"idx":323,"name":"geo-pants","tpage_name":"museum4-pris"}],[220528962,{"idx":322,"name":"geo-lips","tpage_name":"museum4-pris"}],[220528961,{"idx":321,"name":"geo-liner","tpage_name":"museum4-pris"}],[220528960,{"idx":320,"name":"geo-lense","tpage_name":"museum4-pris"}],[220528959,{"idx":319,"name":"geo-lamp","tpage_name":"museum4-pris"}],[220528958,{"idx":318,"name":"geo-kneebuckle","tpage_name":"museum4-pris"}],[220528957,{"idx":317,"name":"geo-headstrap","tpage_name":"museum4-pris"}],[220528956,{"idx":316,"name":"geo-hat-02","tpage_name":"museum4-pris"}],[220528955,{"idx":315,"name":"geo-hat","tpage_name":"museum4-pris"}],[220528954,{"idx":314,"name":"geo-eyebrow","tpage_name":"museum4-pris"}],[220528953,{"idx":313,"name":"geo-buckle","tpage_name":"museum4-pris"}],[220528952,{"idx":312,"name":"geo-braid","tpage_name":"museum4-pris"}],[220528951,{"idx":311,"name":"geo-belt","tpage_name":"museum4-pris"}],[220528950,{"idx":310,"name":"gambler-vest","tpage_name":"museum4-pris"}],[220528949,{"idx":309,"name":"gambler-tie","tpage_name":"museum4-pris"}],[220528948,{"idx":308,"name":"gambler-spats","tpage_name":"museum4-pris"}],[220528947,{"idx":307,"name":"gambler-shirtsmall","tpage_name":"museum4-pris"}],[220528946,{"idx":306,"name":"gambler-shirt","tpage_name":"museum4-pris"}],[220528945,{"idx":305,"name":"gambler-metal","tpage_name":"museum4-pris"}],[220528944,{"idx":304,"name":"gambler-hat","tpage_name":"museum4-pris"}],[220528943,{"idx":303,"name":"gambler-hair2","tpage_name":"museum4-pris"}],[220528942,{"idx":302,"name":"gambler-hair","tpage_name":"museum4-pris"}],[220528941,{"idx":301,"name":"gambler-glasses","tpage_name":"museum4-pris"}],[220528940,{"idx":300,"name":"gambler-cork","tpage_name":"museum4-pris"}],[220528939,{"idx":299,"name":"gambler-card","tpage_name":"museum4-pris"}],[220528938,{"idx":298,"name":"gambler-barrel","tpage_name":"museum4-pris"}],[220528936,{"idx":296,"name":"mineshort-wrap","tpage_name":"museum4-pris"}],[220528935,{"idx":295,"name":"mineshort-twine","tpage_name":"museum4-pris"}],[220528934,{"idx":294,"name":"mineshort-teeth","tpage_name":"museum4-pris"}],[220528933,{"idx":293,"name":"mineshort-suspenders","tpage_name":"museum4-pris"}],[220528932,{"idx":292,"name":"mineshort-stick2","tpage_name":"museum4-pris"}],[220528931,{"idx":291,"name":"mineshort-stick1","tpage_name":"museum4-pris"}],[220528930,{"idx":290,"name":"mineshort-shirtplain","tpage_name":"museum4-pris"}],[220528929,{"idx":289,"name":"mineshort-shirt2","tpage_name":"museum4-pris"}],[220528928,{"idx":288,"name":"mineshort-shirt1","tpage_name":"museum4-pris"}],[220528927,{"idx":287,"name":"mineshort-screw","tpage_name":"museum4-pris"}],[220528926,{"idx":286,"name":"mineshort-pothandle","tpage_name":"museum4-pris"}],[220528925,{"idx":285,"name":"mineshort-pot","tpage_name":"museum4-pris"}],[220528924,{"idx":284,"name":"mineshort-pants","tpage_name":"museum4-pris"}],[220528923,{"idx":283,"name":"mineshort-mustache","tpage_name":"museum4-pris"}],[220528922,{"idx":282,"name":"mineshort-metalmud","tpage_name":"museum4-pris"}],[220528921,{"idx":281,"name":"mineshort-metal","tpage_name":"museum4-pris"}],[220528920,{"idx":280,"name":"mineshort-leathermud","tpage_name":"museum4-pris"}],[220528919,{"idx":279,"name":"mineshort-lampback","tpage_name":"museum4-pris"}],[220528918,{"idx":278,"name":"mineshort-lamp","tpage_name":"museum4-pris"}],[220528917,{"idx":277,"name":"mineshort-hairyflesh","tpage_name":"museum4-pris"}],[220528916,{"idx":276,"name":"mineshort-flesh","tpage_name":"museum4-pris"}],[220528915,{"idx":275,"name":"mineshort-candle","tpage_name":"museum4-pris"}],[220528914,{"idx":274,"name":"mayor-white-eye","tpage_name":"museum4-pris"}],[220528913,{"idx":273,"name":"mayor-vesthole","tpage_name":"museum4-pris"}],[220528912,{"idx":272,"name":"mayor-vestbutton","tpage_name":"museum4-pris"}],[220528911,{"idx":271,"name":"mayor-spats","tpage_name":"museum4-pris"}],[220528910,{"idx":270,"name":"mayor-shirt2","tpage_name":"museum4-pris"}],[220528909,{"idx":269,"name":"mayor-shirt","tpage_name":"museum4-pris"}],[220528908,{"idx":268,"name":"mayor-scarf","tpage_name":"museum4-pris"}],[220528907,{"idx":267,"name":"mayor-pants","tpage_name":"museum4-pris"}],[220528906,{"idx":266,"name":"mayor-hat","tpage_name":"museum4-pris"}],[220528905,{"idx":265,"name":"mayor-haircurl","tpage_name":"museum4-pris"}],[220528904,{"idx":264,"name":"mayor-hair-03","tpage_name":"museum4-pris"}],[220528903,{"idx":263,"name":"mayor-hair-02","tpage_name":"museum4-pris"}],[220528902,{"idx":262,"name":"mayor-hair-01","tpage_name":"museum4-pris"}],[220528901,{"idx":261,"name":"mayor-eyelid","tpage_name":"museum4-pris"}],[220528900,{"idx":260,"name":"yelsage-yellowlens","tpage_name":"museum4-pris"}],[220528899,{"idx":259,"name":"yelsage-teeth","tpage_name":"museum4-pris"}],[220528898,{"idx":258,"name":"yelsage-staffmetal-01","tpage_name":"museum4-pris"}],[220528897,{"idx":257,"name":"yelsage-smallplainmetal","tpage_name":"museum4-pris"}],[220528896,{"idx":256,"name":"yelsage-ring","tpage_name":"museum4-pris"}],[220528895,{"idx":255,"name":"yelsage-pantsbutton","tpage_name":"museum4-pris"}],[220528894,{"idx":254,"name":"yelsage-lens","tpage_name":"museum4-pris"}],[220528893,{"idx":253,"name":"yelsage-leatherstrapblack","tpage_name":"museum4-pris"}],[220528892,{"idx":252,"name":"yelsage-leatherstrap","tpage_name":"museum4-pris"}],[220528891,{"idx":251,"name":"yelsage-leatherbutton","tpage_name":"museum4-pris"}],[220528890,{"idx":250,"name":"yelsage-leather","tpage_name":"museum4-pris"}],[220528889,{"idx":249,"name":"yelsage-jacketwhite-02","tpage_name":"museum4-pris"}],[220528888,{"idx":248,"name":"yelsage-jacketwhite-01","tpage_name":"museum4-pris"}],[220528887,{"idx":247,"name":"yelsage-jacketbrown","tpage_name":"museum4-pris"}],[220528886,{"idx":246,"name":"yelsage-helmet","tpage_name":"museum4-pris"}],[220528885,{"idx":245,"name":"yelsage-headpipe-01","tpage_name":"museum4-pris"}],[220528884,{"idx":244,"name":"yelsage-handlewrap","tpage_name":"museum4-pris"}],[220528883,{"idx":243,"name":"yelsage-flesh","tpage_name":"museum4-pris"}],[220528882,{"idx":242,"name":"yelsage-eyelid","tpage_name":"museum4-pris"}],[220528881,{"idx":241,"name":"yelsage-eye-16x16new","tpage_name":"museum4-pris"}],[220528880,{"idx":240,"name":"yelsage-boltstrip","tpage_name":"museum4-pris"}],[220528879,{"idx":239,"name":"yelsage-beard","tpage_name":"museum4-pris"}],[220528878,{"idx":238,"name":"yelsage-barreltop","tpage_name":"museum4-pris"}],[220528877,{"idx":237,"name":"yelsage-barrelstrap","tpage_name":"museum4-pris"}],[220528876,{"idx":236,"name":"yelsage-barrelplain","tpage_name":"museum4-pris"}],[220528874,{"idx":234,"name":"vest-01","tpage_name":"museum4-pris"}],[220528873,{"idx":233,"name":"sculptor-visor","tpage_name":"museum4-pris"}],[220528872,{"idx":232,"name":"sculptor-vestbottom","tpage_name":"museum4-pris"}],[220528871,{"idx":231,"name":"sculptor-teeth-02","tpage_name":"museum4-pris"}],[220528870,{"idx":230,"name":"sculptor-teeth","tpage_name":"museum4-pris"}],[220528869,{"idx":229,"name":"sculptor-shirt","tpage_name":"museum4-pris"}],[220528868,{"idx":228,"name":"sculptor-screw","tpage_name":"museum4-pris"}],[220528867,{"idx":227,"name":"sculptor-scarf","tpage_name":"museum4-pris"}],[220528866,{"idx":226,"name":"sculptor-patch-02","tpage_name":"museum4-pris"}],[220528865,{"idx":225,"name":"sculptor-patch-01","tpage_name":"museum4-pris"}],[220528864,{"idx":224,"name":"sculptor-pants","tpage_name":"museum4-pris"}],[220528863,{"idx":223,"name":"sculptor-metal","tpage_name":"museum4-pris"}],[220528862,{"idx":222,"name":"sculptor-headband","tpage_name":"museum4-pris"}],[220528861,{"idx":221,"name":"sculptor-hammer","tpage_name":"museum4-pris"}],[220528860,{"idx":220,"name":"sculptor-hair","tpage_name":"museum4-pris"}],[220528859,{"idx":219,"name":"sculptor-glove","tpage_name":"museum4-pris"}],[220528858,{"idx":218,"name":"sculptor-eyelid","tpage_name":"museum4-pris"}],[220528857,{"idx":217,"name":"sculptor-eye","tpage_name":"museum4-pris"}],[220528856,{"idx":216,"name":"sculptor-belt","tpage_name":"museum4-pris"}],[220528855,{"idx":215,"name":"redsage-squaretile","tpage_name":"museum4-pris"}],[220528854,{"idx":214,"name":"redsage-multitileglow","tpage_name":"museum4-pris"}],[220528853,{"idx":213,"name":"redsage-multitile","tpage_name":"museum4-pris"}],[220528852,{"idx":212,"name":"redsage-lense","tpage_name":"museum4-pris"}],[220528851,{"idx":211,"name":"redsage-flesh","tpage_name":"museum4-pris"}],[220528850,{"idx":210,"name":"redsage-dial","tpage_name":"museum4-pris"}],[220528848,{"idx":208,"name":"mayor-flesh","tpage_name":"museum4-pris"}],[220528844,{"idx":204,"name":"hudax-wrap","tpage_name":"museum4-pris"}],[220528843,{"idx":203,"name":"hudax-vestedge","tpage_name":"museum4-pris"}],[220528842,{"idx":202,"name":"hudax-vestbutton","tpage_name":"museum4-pris"}],[220528841,{"idx":201,"name":"hudax-vest","tpage_name":"museum4-pris"}],[220528840,{"idx":200,"name":"hudax-tooth","tpage_name":"museum4-pris"}],[220528839,{"idx":199,"name":"hudax-lenseside","tpage_name":"museum4-pris"}],[220528838,{"idx":198,"name":"hudax-lense","tpage_name":"museum4-pris"}],[220528837,{"idx":197,"name":"hudax-leather-02","tpage_name":"museum4-pris"}],[220528836,{"idx":196,"name":"hudax-leather-01","tpage_name":"museum4-pris"}],[220528835,{"idx":195,"name":"hudax-hair","tpage_name":"museum4-pris"}],[220528834,{"idx":194,"name":"hudax-flesh","tpage_name":"museum4-pris"}],[220528833,{"idx":193,"name":"hudax-eyelid","tpage_name":"museum4-pris"}],[220528832,{"idx":192,"name":"hudax-cotton-gather","tpage_name":"museum4-pris"}],[220528831,{"idx":191,"name":"hudax-cotton-32x32","tpage_name":"museum4-pris"}],[220528830,{"idx":190,"name":"hudax-buckle","tpage_name":"museum4-pris"}],[220528829,{"idx":189,"name":"hair-01","tpage_name":"museum4-pris"}],[220528827,{"idx":187,"name":"fman-wrap","tpage_name":"museum4-pris"}],[220528826,{"idx":186,"name":"fman-vestplain","tpage_name":"museum4-pris"}],[220528825,{"idx":185,"name":"fman-vest","tpage_name":"museum4-pris"}],[220528824,{"idx":184,"name":"fman-toothstring","tpage_name":"museum4-pris"}],[220528823,{"idx":183,"name":"fman-teeth","tpage_name":"museum4-pris"}],[220528822,{"idx":182,"name":"fman-tatoo","tpage_name":"museum4-pris"}],[220528821,{"idx":181,"name":"fman-shirt","tpage_name":"museum4-pris"}],[220528820,{"idx":180,"name":"fman-sharktooth","tpage_name":"museum4-pris"}],[220528819,{"idx":179,"name":"fman-metal","tpage_name":"museum4-pris"}],[220528818,{"idx":178,"name":"fman-flesh","tpage_name":"museum4-pris"}],[220528817,{"idx":177,"name":"fman-eyelid","tpage_name":"museum4-pris"}],[220528816,{"idx":176,"name":"fman-eye-centered-16x16","tpage_name":"museum4-pris"}],[220528815,{"idx":175,"name":"fman-belt","tpage_name":"museum4-pris"}],[220528814,{"idx":174,"name":"fman-beard-03","tpage_name":"museum4-pris"}],[220528813,{"idx":173,"name":"fman-beard-02","tpage_name":"museum4-pris"}],[220528812,{"idx":172,"name":"fman-beard-01","tpage_name":"museum4-pris"}],[220528811,{"idx":171,"name":"fman-bandanna2","tpage_name":"museum4-pris"}],[220528810,{"idx":170,"name":"fman-bandanna","tpage_name":"museum4-pris"}],[220528809,{"idx":169,"name":"fman-armhair","tpage_name":"museum4-pris"}],[220528789,{"idx":149,"name":"farmer-whitestraps","tpage_name":"museum4-pris"}],[220528788,{"idx":148,"name":"farmer-toes","tpage_name":"museum4-pris"}],[220528787,{"idx":147,"name":"farmer-teeth","tpage_name":"museum4-pris"}],[220528786,{"idx":146,"name":"farmer-stick","tpage_name":"museum4-pris"}],[220528785,{"idx":145,"name":"farmer-shirt2","tpage_name":"museum4-pris"}],[220528784,{"idx":144,"name":"farmer-shirt","tpage_name":"museum4-pris"}],[220528783,{"idx":143,"name":"farmer-redstraps","tpage_name":"museum4-pris"}],[220528782,{"idx":142,"name":"farmer-pants","tpage_name":"museum4-pris"}],[220528781,{"idx":141,"name":"farmer-mustach","tpage_name":"museum4-pris"}],[220528780,{"idx":140,"name":"farmer-mouth","tpage_name":"museum4-pris"}],[220528779,{"idx":139,"name":"farmer-headband","tpage_name":"museum4-pris"}],[220528778,{"idx":138,"name":"farmer-hat-02","tpage_name":"museum4-pris"}],[220528777,{"idx":137,"name":"farmer-hat","tpage_name":"museum4-pris"}],[220528776,{"idx":136,"name":"farmer-hair","tpage_name":"museum4-pris"}],[220528775,{"idx":135,"name":"farmer-flesh4x4","tpage_name":"museum4-pris"}],[220528774,{"idx":134,"name":"farmer-fag-edgewrap","tpage_name":"museum4-pris"}],[220528773,{"idx":133,"name":"farmer-fag-02","tpage_name":"museum4-pris"}],[220528772,{"idx":132,"name":"farmer-fag-01","tpage_name":"museum4-pris"}],[220528771,{"idx":131,"name":"farmer-belt","tpage_name":"museum4-pris"}],[220528770,{"idx":130,"name":"explorer-vest-02","tpage_name":"museum4-pris"}],[220528769,{"idx":129,"name":"explorer-vest-01","tpage_name":"museum4-pris"}],[220528768,{"idx":128,"name":"explorer-stick","tpage_name":"museum4-pris"}],[220528767,{"idx":127,"name":"explorer-spats","tpage_name":"museum4-pris"}],[220528766,{"idx":126,"name":"explorer-ring","tpage_name":"museum4-pris"}],[220528765,{"idx":125,"name":"explorer-pants","tpage_name":"museum4-pris"}],[220528764,{"idx":124,"name":"explorer-mustache","tpage_name":"museum4-pris"}],[220528763,{"idx":123,"name":"explorer-eyelid","tpage_name":"museum4-pris"}],[220528762,{"idx":122,"name":"explorer-eye-centered-16x16","tpage_name":"museum4-pris"}],[220528761,{"idx":121,"name":"explorer-buckle","tpage_name":"museum4-pris"}],[220528760,{"idx":120,"name":"explorer-belt","tpage_name":"museum4-pris"}],[220528759,{"idx":119,"name":"explorer-ball","tpage_name":"museum4-pris"}],[220528758,{"idx":118,"name":"evilbro-wrap","tpage_name":"museum4-pris"}],[220528757,{"idx":117,"name":"evilbro-teeth","tpage_name":"museum4-pris"}],[220528756,{"idx":116,"name":"evilbro-strap","tpage_name":"museum4-pris"}],[220528755,{"idx":115,"name":"evilbro-rings","tpage_name":"museum4-pris"}],[220528754,{"idx":114,"name":"evilbro-redcape","tpage_name":"museum4-pris"}],[220528753,{"idx":113,"name":"evilbro-pipes","tpage_name":"museum4-pris"}],[220528752,{"idx":112,"name":"evilbro-pants","tpage_name":"museum4-pris"}],[220528751,{"idx":111,"name":"evilbro-mechglove-02","tpage_name":"museum4-pris"}],[220528750,{"idx":110,"name":"evilbro-mechglove-01","tpage_name":"museum4-pris"}],[220528749,{"idx":109,"name":"evilbro-mecharm-03","tpage_name":"museum4-pris"}],[220528748,{"idx":108,"name":"evilbro-mecharm-02","tpage_name":"museum4-pris"}],[220528747,{"idx":107,"name":"evilbro-mecharm-01","tpage_name":"museum4-pris"}],[220528746,{"idx":106,"name":"evilbro-hair-01","tpage_name":"museum4-pris"}],[220528745,{"idx":105,"name":"evilbro-flesh","tpage_name":"museum4-pris"}],[220528744,{"idx":104,"name":"evilbro-eyelid","tpage_name":"museum4-pris"}],[220528743,{"idx":103,"name":"evilbro-chin","tpage_name":"museum4-pris"}],[220528742,{"idx":102,"name":"evilbro-brownleather","tpage_name":"museum4-pris"}],[220528741,{"idx":101,"name":"evilbro-blueleather-02","tpage_name":"museum4-pris"}],[220528740,{"idx":100,"name":"evilbro-blueleather-01","tpage_name":"museum4-pris"}],[220528739,{"idx":99,"name":"evilbro-belt","tpage_name":"museum4-pris"}],[220528738,{"idx":98,"name":"evilbro-beard","tpage_name":"museum4-pris"}],[220528737,{"idx":97,"name":"evilbro-balls","tpage_name":"museum4-pris"}],[220528736,{"idx":96,"name":"esskin","tpage_name":"museum4-pris"}],[220528735,{"idx":95,"name":"espants-02","tpage_name":"museum4-pris"}],[220528734,{"idx":94,"name":"espants-01","tpage_name":"museum4-pris"}],[220528733,{"idx":93,"name":"eseyebrow","tpage_name":"museum4-pris"}],[220528732,{"idx":92,"name":"eseye","tpage_name":"museum4-pris"}],[220528731,{"idx":91,"name":"esbelly-01","tpage_name":"museum4-pris"}],[220528730,{"idx":90,"name":"es-precursor-metal-01","tpage_name":"museum4-pris"}],[220528729,{"idx":89,"name":"es-green-metal","tpage_name":"museum4-pris"}],[220528728,{"idx":88,"name":"es-eyelid","tpage_name":"museum4-pris"}],[220528726,{"idx":86,"name":"charHOLD","tpage_name":"museum4-pris"}],[220528720,{"idx":80,"name":"bluesage-staffhandle","tpage_name":"museum4-pris"}],[220528719,{"idx":79,"name":"bluesage-staff","tpage_name":"museum4-pris"}],[220528718,{"idx":78,"name":"bluesage-pants2","tpage_name":"museum4-pris"}],[220528717,{"idx":77,"name":"bluesage-pants","tpage_name":"museum4-pris"}],[220528716,{"idx":76,"name":"bluesage-lense","tpage_name":"museum4-pris"}],[220528714,{"idx":74,"name":"bluesage-leather","tpage_name":"museum4-pris"}],[220528713,{"idx":73,"name":"bluesage-jacket","tpage_name":"museum4-pris"}],[220528712,{"idx":72,"name":"bluesage-helmetwires2","tpage_name":"museum4-pris"}],[220528711,{"idx":71,"name":"bluesage-helmetwires","tpage_name":"museum4-pris"}],[220528710,{"idx":70,"name":"bluesage-greenwire","tpage_name":"museum4-pris"}],[220528709,{"idx":69,"name":"bluesage-flesh","tpage_name":"museum4-pris"}],[220528708,{"idx":68,"name":"bluesage-eyelid","tpage_name":"museum4-pris"}],[220528707,{"idx":67,"name":"bluesage-eye-centered-16x16","tpage_name":"museum4-pris"}],[220528706,{"idx":66,"name":"bluesage-copperwire","tpage_name":"museum4-pris"}],[220528705,{"idx":65,"name":"bluesage-copperfixture","tpage_name":"museum4-pris"}],[220528704,{"idx":64,"name":"bluesage-barreltop","tpage_name":"museum4-pris"}],[220528703,{"idx":63,"name":"bluesage-barrel","tpage_name":"museum4-pris"}],[223019044,{"idx":36,"name":"rail-pipe-02","tpage_name":"rublcst-vis-tfrag"}],[220528684,{"idx":44,"name":"billy-wrap","tpage_name":"museum4-pris"}],[223019043,{"idx":35,"name":"rail-pipe-01","tpage_name":"rublcst-vis-tfrag"}],[220528683,{"idx":43,"name":"billy-tail","tpage_name":"museum4-pris"}],[223019042,{"idx":34,"name":"rail-cord-01","tpage_name":"rublcst-vis-tfrag"}],[220528682,{"idx":42,"name":"billy-shirt","tpage_name":"museum4-pris"}],[223019041,{"idx":33,"name":"rail-trim-01","tpage_name":"rublcst-vis-tfrag"}],[220528681,{"idx":41,"name":"billy-pants","tpage_name":"museum4-pris"}],[223019040,{"idx":32,"name":"rail-light-blue-small","tpage_name":"rublcst-vis-tfrag"}],[220528680,{"idx":40,"name":"billy-jugtop","tpage_name":"museum4-pris"}],[223019039,{"idx":31,"name":"rail-detail-01","tpage_name":"rublcst-vis-tfrag"}],[220528679,{"idx":39,"name":"billy-jugrope","tpage_name":"museum4-pris"}],[223019038,{"idx":30,"name":"comb-ring","tpage_name":"rublcst-vis-tfrag"}],[220528678,{"idx":38,"name":"billy-jug","tpage_name":"museum4-pris"}],[223019037,{"idx":29,"name":"rub-precursor-c","tpage_name":"rublcst-vis-tfrag"}],[220528677,{"idx":37,"name":"billy-hat","tpage_name":"museum4-pris"}],[223019036,{"idx":28,"name":"rub-precursor-a","tpage_name":"rublcst-vis-tfrag"}],[220528676,{"idx":36,"name":"billy-hair","tpage_name":"museum4-pris"}],[223019035,{"idx":27,"name":"rail-light-yellow-small","tpage_name":"rublcst-vis-tfrag"}],[220528675,{"idx":35,"name":"billy-flesh","tpage_name":"museum4-pris"}],[223019034,{"idx":26,"name":"comb-temp-glass","tpage_name":"rublcst-vis-tfrag"}],[220528674,{"idx":34,"name":"bam-iris-16x16","tpage_name":"museum4-pris"}],[223019032,{"idx":24,"name":"rail-gray-metal-01","tpage_name":"rublcst-vis-tfrag"}],[220528672,{"idx":32,"name":"assis-lens","tpage_name":"museum4-pris"}],[223019031,{"idx":23,"name":"rail-base-dark-01","tpage_name":"rublcst-vis-tfrag"}],[220528671,{"idx":31,"name":"assis-glove","tpage_name":"museum4-pris"}],[223019030,{"idx":22,"name":"rail-base-mid-01","tpage_name":"rublcst-vis-tfrag"}],[220528670,{"idx":30,"name":"assis-brownstrapas","tpage_name":"museum4-pris"}],[223019012,{"idx":4,"name":"rub-pal-red","tpage_name":"rublcst-vis-tfrag"}],[220528652,{"idx":12,"name":"bam-hairhilite","tpage_name":"museum4-pris"}],[223019011,{"idx":3,"name":"rub-panels-01","tpage_name":"rublcst-vis-tfrag"}],[220528651,{"idx":11,"name":"bam-eyelight","tpage_name":"museum4-pris"}],[220332032,{"idx":0,"name":"keira-mask","tpage_name":"museum3-water"}],[220266561,{"idx":65,"name":"samosbird-wing","tpage_name":"museum3-pris2"}],[220266560,{"idx":64,"name":"samosbird-plume","tpage_name":"museum3-pris2"}],[220266559,{"idx":63,"name":"samosbird-eye","tpage_name":"museum3-pris2"}],[220266558,{"idx":62,"name":"samosbird-body","tpage_name":"museum3-pris2"}],[220266557,{"idx":61,"name":"samosbird-beak","tpage_name":"museum3-pris2"}],[220266556,{"idx":60,"name":"samos-vest","tpage_name":"museum3-pris2"}],[220266555,{"idx":59,"name":"samos-teeth2","tpage_name":"museum3-pris2"}],[220266554,{"idx":58,"name":"samos-strap","tpage_name":"museum3-pris2"}],[220266553,{"idx":57,"name":"samos-metal","tpage_name":"museum3-pris2"}],[220266552,{"idx":56,"name":"samos-log-03","tpage_name":"museum3-pris2"}],[220266551,{"idx":55,"name":"samos-log-02","tpage_name":"museum3-pris2"}],[220266550,{"idx":54,"name":"samos-log-01","tpage_name":"museum3-pris2"}],[220266549,{"idx":53,"name":"samos-lens","tpage_name":"museum3-pris2"}],[220266548,{"idx":52,"name":"samos-leaf","tpage_name":"museum3-pris2"}],[220266547,{"idx":51,"name":"samos-helmet","tpage_name":"museum3-pris2"}],[220266546,{"idx":50,"name":"samos-hair","tpage_name":"museum3-pris2"}],[220266545,{"idx":49,"name":"samos-finger-01","tpage_name":"museum3-pris2"}],[220266544,{"idx":48,"name":"samos-face","tpage_name":"museum3-pris2"}],[220266543,{"idx":47,"name":"samos-eyelid","tpage_name":"museum3-pris2"}],[220266542,{"idx":46,"name":"samos-eye","tpage_name":"museum3-pris2"}],[220266541,{"idx":45,"name":"samos-ear","tpage_name":"museum3-pris2"}],[220266540,{"idx":44,"name":"samos-diaper","tpage_name":"museum3-pris2"}],[220266539,{"idx":43,"name":"samos-arm","tpage_name":"museum3-pris2"}],[220266497,{"idx":1,"name":"bam-hairhilite","tpage_name":"museum3-pris2"}],[220266496,{"idx":0,"name":"bam-eyelight","tpage_name":"museum3-pris2"}],[220201225,{"idx":265,"name":"cguardred-teeth","tpage_name":"museum3-pris"}],[220201224,{"idx":264,"name":"cguardred-sleeve","tpage_name":"museum3-pris"}],[220201223,{"idx":263,"name":"cguardred-shouldershield","tpage_name":"museum3-pris"}],[220201222,{"idx":262,"name":"cguardred-shoemetal","tpage_name":"museum3-pris"}],[220201221,{"idx":261,"name":"cguardred-shoebottom","tpage_name":"museum3-pris"}],[220201220,{"idx":260,"name":"cguardred-shirt","tpage_name":"museum3-pris"}],[220201219,{"idx":259,"name":"cguardred-scarf","tpage_name":"museum3-pris"}],[220201218,{"idx":258,"name":"cguardred-rubber-01","tpage_name":"museum3-pris"}],[220201217,{"idx":257,"name":"cguardred-pants","tpage_name":"museum3-pris"}],[220201216,{"idx":256,"name":"cguardred-metalcollar","tpage_name":"museum3-pris"}],[220201215,{"idx":255,"name":"cguardred-lens","tpage_name":"museum3-pris"}],[220201214,{"idx":254,"name":"cguardred-jacketstraps","tpage_name":"museum3-pris"}],[220201213,{"idx":253,"name":"cguardred-headshield","tpage_name":"museum3-pris"}],[220201212,{"idx":252,"name":"cguardred-guntube","tpage_name":"museum3-pris"}],[220201211,{"idx":251,"name":"cguardred-gunstrap","tpage_name":"museum3-pris"}],[220201210,{"idx":250,"name":"cguardred-gunmetaldark2","tpage_name":"museum3-pris"}],[220201209,{"idx":249,"name":"cguardred-gunmetaldark","tpage_name":"museum3-pris"}],[220201208,{"idx":248,"name":"cguardred-gunleather","tpage_name":"museum3-pris"}],[220201207,{"idx":247,"name":"cguardred-gunhandle","tpage_name":"museum3-pris"}],[220201206,{"idx":246,"name":"cguardred-gunboltlight","tpage_name":"museum3-pris"}],[220201205,{"idx":245,"name":"cguardred-greyheadshield","tpage_name":"museum3-pris"}],[220201204,{"idx":244,"name":"cguardred-glove","tpage_name":"museum3-pris"}],[220201203,{"idx":243,"name":"cguardred-face","tpage_name":"museum3-pris"}],[220201202,{"idx":242,"name":"cguardred-eyering","tpage_name":"museum3-pris"}],[220201201,{"idx":241,"name":"cguardred-chestplate","tpage_name":"museum3-pris"}],[220201200,{"idx":240,"name":"cguardred-brushedmetal","tpage_name":"museum3-pris"}],[220201199,{"idx":239,"name":"cguardred-boottop","tpage_name":"museum3-pris"}],[220201198,{"idx":238,"name":"cguardred-backmetal","tpage_name":"museum3-pris"}],[220201197,{"idx":237,"name":"cguardred-armshield","tpage_name":"museum3-pris"}],[220201196,{"idx":236,"name":"samos-eyelid","tpage_name":"museum3-pris"}],[220201195,{"idx":235,"name":"samos-eye","tpage_name":"museum3-pris"}],[220201194,{"idx":234,"name":"kor-wrapsdirty","tpage_name":"museum3-pris"}],[220201193,{"idx":233,"name":"kor-wrapsclean","tpage_name":"museum3-pris"}],[220201192,{"idx":232,"name":"kor-wraps","tpage_name":"museum3-pris"}],[220201191,{"idx":231,"name":"kor-uppercaps","tpage_name":"museum3-pris"}],[220201190,{"idx":230,"name":"kor-toe","tpage_name":"museum3-pris"}],[220201189,{"idx":229,"name":"kor-stickside","tpage_name":"museum3-pris"}],[220201188,{"idx":228,"name":"kor-stickend","tpage_name":"museum3-pris"}],[220201187,{"idx":227,"name":"kor-sleevetight","tpage_name":"museum3-pris"}],[220201186,{"idx":226,"name":"kor-sleeveoutside","tpage_name":"museum3-pris"}],[220201185,{"idx":225,"name":"kor-sleeveinside","tpage_name":"museum3-pris"}],[220201184,{"idx":224,"name":"kor-robelight","tpage_name":"museum3-pris"}],[220201183,{"idx":223,"name":"kor-panel","tpage_name":"museum3-pris"}],[220201182,{"idx":222,"name":"kor-lowercaps","tpage_name":"museum3-pris"}],[220201181,{"idx":221,"name":"kor-leatherstrap","tpage_name":"museum3-pris"}],[220201180,{"idx":220,"name":"kor-jewellight","tpage_name":"museum3-pris"}],[220201179,{"idx":219,"name":"kor-jeweldark","tpage_name":"museum3-pris"}],[220201178,{"idx":218,"name":"kor-hood","tpage_name":"museum3-pris"}],[220201177,{"idx":217,"name":"kor-head","tpage_name":"museum3-pris"}],[220201176,{"idx":216,"name":"kor-hair","tpage_name":"museum3-pris"}],[220201175,{"idx":215,"name":"kor-finger","tpage_name":"museum3-pris"}],[220201174,{"idx":214,"name":"kor-eyelid","tpage_name":"museum3-pris"}],[220201173,{"idx":213,"name":"kor-eye","tpage_name":"museum3-pris"}],[220201172,{"idx":212,"name":"kor-chain","tpage_name":"museum3-pris"}],[220201171,{"idx":211,"name":"kor-bootsole","tpage_name":"museum3-pris"}],[220201170,{"idx":210,"name":"kor-boot","tpage_name":"museum3-pris"}],[220201169,{"idx":209,"name":"kor-belt","tpage_name":"museum3-pris"}],[220201168,{"idx":208,"name":"kor-bag3","tpage_name":"museum3-pris"}],[220201167,{"idx":207,"name":"kor-bag2","tpage_name":"museum3-pris"}],[220201166,{"idx":206,"name":"kor-bag1","tpage_name":"museum3-pris"}],[220201150,{"idx":190,"name":"vin-teeth-01","tpage_name":"museum3-pris"}],[220201149,{"idx":189,"name":"samosyoung-vest","tpage_name":"museum3-pris"}],[220201148,{"idx":188,"name":"samosyoung-shirt","tpage_name":"museum3-pris"}],[220201147,{"idx":187,"name":"samosyoung-pants","tpage_name":"museum3-pris"}],[220201146,{"idx":186,"name":"samosyoung-log-03","tpage_name":"museum3-pris"}],[220201145,{"idx":185,"name":"samosyoung-log-01","tpage_name":"museum3-pris"}],[220201144,{"idx":184,"name":"samosyoung-hair","tpage_name":"museum3-pris"}],[220201143,{"idx":183,"name":"samosyoung-face","tpage_name":"museum3-pris"}],[220201142,{"idx":182,"name":"samosyoung-egg","tpage_name":"museum3-pris"}],[220201141,{"idx":181,"name":"samosyoung-diaper","tpage_name":"museum3-pris"}],[220201140,{"idx":180,"name":"samosyoung-buckle","tpage_name":"museum3-pris"}],[220201139,{"idx":179,"name":"samosyoung-belt","tpage_name":"museum3-pris"}],[220201138,{"idx":178,"name":"samosyoung-beard","tpage_name":"museum3-pris"}],[220201137,{"idx":177,"name":"samos-strap","tpage_name":"museum3-pris"}],[220201136,{"idx":176,"name":"samos-metal","tpage_name":"museum3-pris"}],[220201135,{"idx":175,"name":"samos-log-03","tpage_name":"museum3-pris"}],[220201134,{"idx":174,"name":"samos-lens","tpage_name":"museum3-pris"}],[220201133,{"idx":173,"name":"samos-leaf","tpage_name":"museum3-pris"}],[220201132,{"idx":172,"name":"samos-helmet","tpage_name":"museum3-pris"}],[220201131,{"idx":171,"name":"samos-finger-01","tpage_name":"museum3-pris"}],[220201130,{"idx":170,"name":"samos-ear","tpage_name":"museum3-pris"}],[220201129,{"idx":169,"name":"samos-arm","tpage_name":"museum3-pris"}],[220201128,{"idx":168,"name":"keira-torch-nozzle-02","tpage_name":"museum3-pris"}],[220201127,{"idx":167,"name":"keira-torch-nozzle-01","tpage_name":"museum3-pris"}],[220201126,{"idx":166,"name":"keira-torch-guard-01","tpage_name":"museum3-pris"}],[220201125,{"idx":165,"name":"keira-shoebottom","tpage_name":"museum3-pris"}],[220201124,{"idx":164,"name":"keira-shirt","tpage_name":"museum3-pris"}],[220201123,{"idx":163,"name":"keira-pantslarge","tpage_name":"museum3-pris"}],[220201122,{"idx":162,"name":"keira-maskbolt","tpage_name":"museum3-pris"}],[220201121,{"idx":161,"name":"keira-lens-large","tpage_name":"museum3-pris"}],[220201120,{"idx":160,"name":"keira-largewraps","tpage_name":"museum3-pris"}],[220201119,{"idx":159,"name":"keira-iris-64x64","tpage_name":"museum3-pris"}],[220201118,{"idx":158,"name":"keira-handtop","tpage_name":"museum3-pris"}],[220201117,{"idx":157,"name":"keira-handbottom","tpage_name":"museum3-pris"}],[220201116,{"idx":156,"name":"keira-hair-newest","tpage_name":"museum3-pris"}],[220201115,{"idx":155,"name":"keira-gogglestrap","tpage_name":"museum3-pris"}],[220201114,{"idx":154,"name":"keira-glovenewlarge","tpage_name":"museum3-pris"}],[220201113,{"idx":153,"name":"keira-glasses","tpage_name":"museum3-pris"}],[220201112,{"idx":152,"name":"keira-face","tpage_name":"museum3-pris"}],[220201111,{"idx":151,"name":"keira-eyelid","tpage_name":"museum3-pris"}],[220201110,{"idx":150,"name":"keira-chokermetal","tpage_name":"museum3-pris"}],[220201109,{"idx":149,"name":"keira-chokerhighres","tpage_name":"museum3-pris"}],[220201108,{"idx":148,"name":"keira-brownstraps-new","tpage_name":"museum3-pris"}],[220201107,{"idx":147,"name":"keira-blackstrap","tpage_name":"museum3-pris"}],[220201106,{"idx":146,"name":"keira-belt","tpage_name":"museum3-pris"}],[220201105,{"idx":145,"name":"keira-bellylong","tpage_name":"museum3-pris"}],[220201104,{"idx":144,"name":"jakb-shoeteop","tpage_name":"museum3-pris"}],[220201103,{"idx":143,"name":"jakb-shoemetal","tpage_name":"museum3-pris"}],[220201102,{"idx":142,"name":"jakb-shoebottom","tpage_name":"museum3-pris"}],[220201101,{"idx":141,"name":"jakb-scarf","tpage_name":"museum3-pris"}],[220201100,{"idx":140,"name":"jakb-pants","tpage_name":"museum3-pris"}],[220201099,{"idx":139,"name":"jakb-lightbrownstrap","tpage_name":"museum3-pris"}],[220201098,{"idx":138,"name":"jakb-lightbrownspat","tpage_name":"museum3-pris"}],[220201097,{"idx":137,"name":"jakb-leatherstrap","tpage_name":"museum3-pris"}],[220201096,{"idx":136,"name":"jakb-leatherpouch","tpage_name":"museum3-pris"}],[220201095,{"idx":135,"name":"jakb-jacketsleeve","tpage_name":"museum3-pris"}],[220201094,{"idx":134,"name":"jakb-jacketbody","tpage_name":"museum3-pris"}],[220201093,{"idx":133,"name":"jakb-horn","tpage_name":"museum3-pris"}],[220201092,{"idx":132,"name":"jakb-hairtrans","tpage_name":"museum3-pris"}],[220201091,{"idx":131,"name":"jakb-glovetop","tpage_name":"museum3-pris"}],[220201090,{"idx":130,"name":"jakb-facert","tpage_name":"museum3-pris"}],[220201089,{"idx":129,"name":"jakb-facelft","tpage_name":"museum3-pris"}],[220201088,{"idx":128,"name":"jakb-eyelid","tpage_name":"museum3-pris"}],[220201087,{"idx":127,"name":"jakb-eyebrow","tpage_name":"museum3-pris"}],[220201086,{"idx":126,"name":"jakb-eye","tpage_name":"museum3-pris"}],[220201085,{"idx":125,"name":"jakb-clips","tpage_name":"museum3-pris"}],[220201084,{"idx":124,"name":"jakb-brownleather","tpage_name":"museum3-pris"}],[220201083,{"idx":123,"name":"jakb-blackstrap","tpage_name":"museum3-pris"}],[220201082,{"idx":122,"name":"jakb-armor","tpage_name":"museum3-pris"}],[220201081,{"idx":121,"name":"jak-teeth","tpage_name":"museum3-pris"}],[220201080,{"idx":120,"name":"jak-gogglemetal","tpage_name":"museum3-pris"}],[220201079,{"idx":119,"name":"jak-belt","tpage_name":"museum3-pris"}],[220201078,{"idx":118,"name":"jackb-lens","tpage_name":"museum3-pris"}],[220201077,{"idx":117,"name":"environment-oldmetal","tpage_name":"museum3-pris"}],[220201076,{"idx":116,"name":"daxtertuft","tpage_name":"museum3-pris"}],[220201075,{"idx":115,"name":"daxterteeth","tpage_name":"museum3-pris"}],[220201074,{"idx":114,"name":"daxternose","tpage_name":"museum3-pris"}],[220201073,{"idx":113,"name":"daxterlense","tpage_name":"museum3-pris"}],[220201072,{"idx":112,"name":"daxterhelmetplain","tpage_name":"museum3-pris"}],[220201071,{"idx":111,"name":"daxterheadwidenew","tpage_name":"museum3-pris"}],[220201070,{"idx":110,"name":"daxtergoggles","tpage_name":"museum3-pris"}],[220201069,{"idx":109,"name":"daxterfoot-bottom","tpage_name":"museum3-pris"}],[220201068,{"idx":108,"name":"daxterfoot","tpage_name":"museum3-pris"}],[220201067,{"idx":107,"name":"daxterfinger","tpage_name":"museum3-pris"}],[220201066,{"idx":106,"name":"daxterear","tpage_name":"museum3-pris"}],[220201065,{"idx":105,"name":"daxterbolt","tpage_name":"museum3-pris"}],[220201064,{"idx":104,"name":"daxterbodyshort-eix","tpage_name":"museum3-pris"}],[220201063,{"idx":103,"name":"daxterarm","tpage_name":"museum3-pris"}],[220201062,{"idx":102,"name":"daxter-orange","tpage_name":"museum3-pris"}],[220201061,{"idx":101,"name":"daxter-furhilite","tpage_name":"museum3-pris"}],[220201060,{"idx":100,"name":"daxter-eyelid","tpage_name":"museum3-pris"}],[220200961,{"idx":1,"name":"bam-hairhilite","tpage_name":"museum3-pris"}],[220200960,{"idx":0,"name":"bam-eyelight","tpage_name":"museum3-pris"}],[218169346,{"idx":2,"name":"time-bubble-orbiter","tpage_name":"lbbsdrp2-sprite"}],[218169344,{"idx":0,"name":"time-bubble","tpage_name":"lbbsdrp2-sprite"}],[218038274,{"idx":2,"name":"time-bubble-orbiter","tpage_name":"lbbtcha3-sprite"}],[218038273,{"idx":1,"name":"time-bubble-clock","tpage_name":"lbbtcha3-sprite"}],[218038272,{"idx":0,"name":"time-bubble","tpage_name":"lbbtcha3-sprite"}],[217120769,{"idx":1,"name":"sig-flatfangs","tpage_name":"museum2-water"}],[217120768,{"idx":0,"name":"errolcyber-lens","tpage_name":"museum2-water"}],[217055377,{"idx":145,"name":"veger-whitecloth","tpage_name":"museum2-pris2"}],[217055376,{"idx":144,"name":"veger-walkingstick-03","tpage_name":"museum2-pris2"}],[217055375,{"idx":143,"name":"veger-walkingstick-02","tpage_name":"museum2-pris2"}],[217055374,{"idx":142,"name":"veger-walkingstick-01","tpage_name":"museum2-pris2"}],[217055373,{"idx":141,"name":"veger-vest","tpage_name":"museum2-pris2"}],[217055372,{"idx":140,"name":"veger-teeth","tpage_name":"museum2-pris2"}],[217055371,{"idx":139,"name":"veger-stickwrap","tpage_name":"museum2-pris2"}],[217055370,{"idx":138,"name":"veger-sleevelower","tpage_name":"museum2-pris2"}],[217055369,{"idx":137,"name":"veger-sleeve","tpage_name":"museum2-pris2"}],[217055368,{"idx":136,"name":"veger-shoulderplatemetal","tpage_name":"museum2-pris2"}],[217055367,{"idx":135,"name":"veger-shoulderplate","tpage_name":"museum2-pris2"}],[217055366,{"idx":134,"name":"veger-shoebottom","tpage_name":"museum2-pris2"}],[217055365,{"idx":133,"name":"veger-parchment","tpage_name":"museum2-pris2"}],[217055364,{"idx":132,"name":"veger-pants","tpage_name":"museum2-pris2"}],[217055363,{"idx":131,"name":"veger-pages","tpage_name":"museum2-pris2"}],[217055362,{"idx":130,"name":"veger-legwraps","tpage_name":"museum2-pris2"}],[217055361,{"idx":129,"name":"veger-iris","tpage_name":"museum2-pris2"}],[217055360,{"idx":128,"name":"veger-hand","tpage_name":"museum2-pris2"}],[217055359,{"idx":127,"name":"veger-gold","tpage_name":"museum2-pris2"}],[217055358,{"idx":126,"name":"veger-fingertop","tpage_name":"museum2-pris2"}],[217055357,{"idx":125,"name":"veger-fingerbottom","tpage_name":"museum2-pris2"}],[217055356,{"idx":124,"name":"veger-face","tpage_name":"museum2-pris2"}],[217055355,{"idx":123,"name":"veger-eyelid","tpage_name":"museum2-pris2"}],[217055354,{"idx":122,"name":"veger-endpaper","tpage_name":"museum2-pris2"}],[217055353,{"idx":121,"name":"veger-coatbelt","tpage_name":"museum2-pris2"}],[217055352,{"idx":120,"name":"veger-coat","tpage_name":"museum2-pris2"}],[217055351,{"idx":119,"name":"veger-bootstrap","tpage_name":"museum2-pris2"}],[217055350,{"idx":118,"name":"veger-bootfoot","tpage_name":"museum2-pris2"}],[217055349,{"idx":117,"name":"veger-bootbolt","tpage_name":"museum2-pris2"}],[217055348,{"idx":116,"name":"veger-bookspine","tpage_name":"museum2-pris2"}],[217055347,{"idx":115,"name":"veger-booksides","tpage_name":"museum2-pris2"}],[217055346,{"idx":114,"name":"veger-bookleather","tpage_name":"museum2-pris2"}],[217055345,{"idx":113,"name":"vin-teeth-01","tpage_name":"museum2-pris2"}],[217055344,{"idx":112,"name":"sig-undergarments","tpage_name":"museum2-pris2"}],[217055343,{"idx":111,"name":"sig-skirts-03","tpage_name":"museum2-pris2"}],[217055342,{"idx":110,"name":"sig-skirts-02","tpage_name":"museum2-pris2"}],[217055341,{"idx":109,"name":"sig-skirts","tpage_name":"museum2-pris2"}],[217055340,{"idx":108,"name":"sig-shoulderarmor","tpage_name":"museum2-pris2"}],[217055339,{"idx":107,"name":"sig-shoetop","tpage_name":"museum2-pris2"}],[217055338,{"idx":106,"name":"sig-shoebottom","tpage_name":"museum2-pris2"}],[217055337,{"idx":105,"name":"sig-sac","tpage_name":"museum2-pris2"}],[217055336,{"idx":104,"name":"sig-metal-dirty","tpage_name":"museum2-pris2"}],[217055335,{"idx":103,"name":"sig-metal-01","tpage_name":"museum2-pris2"}],[217055334,{"idx":102,"name":"sig-lens","tpage_name":"museum2-pris2"}],[217055333,{"idx":101,"name":"sig-horn","tpage_name":"museum2-pris2"}],[217055332,{"idx":100,"name":"sig-headgear","tpage_name":"museum2-pris2"}],[217055331,{"idx":99,"name":"sig-gun-05","tpage_name":"museum2-pris2"}],[217055330,{"idx":98,"name":"sig-gun-04","tpage_name":"museum2-pris2"}],[217055329,{"idx":97,"name":"sig-gun-03","tpage_name":"museum2-pris2"}],[217055328,{"idx":96,"name":"sig-gun-02","tpage_name":"museum2-pris2"}],[217055327,{"idx":95,"name":"sig-gun-01","tpage_name":"museum2-pris2"}],[217055326,{"idx":94,"name":"sig-glovetop","tpage_name":"museum2-pris2"}],[217055325,{"idx":93,"name":"sig-glove","tpage_name":"museum2-pris2"}],[217055324,{"idx":92,"name":"sig-gem-01","tpage_name":"museum2-pris2"}],[217055323,{"idx":91,"name":"sig-flask","tpage_name":"museum2-pris2"}],[217055322,{"idx":90,"name":"sig-facert","tpage_name":"museum2-pris2"}],[217055321,{"idx":89,"name":"sig-faceleft","tpage_name":"museum2-pris2"}],[217055320,{"idx":88,"name":"sig-eyelid","tpage_name":"museum2-pris2"}],[217055319,{"idx":87,"name":"sig-eye","tpage_name":"museum2-pris2"}],[217055318,{"idx":86,"name":"sig-belt","tpage_name":"museum2-pris2"}],[217055317,{"idx":85,"name":"charHOLD","tpage_name":"museum2-pris2"}],[217055316,{"idx":84,"name":"veger-scarf","tpage_name":"museum2-pris2"}],[217055315,{"idx":83,"name":"veger-hair","tpage_name":"museum2-pris2"}],[217055314,{"idx":82,"name":"veger-coatclips","tpage_name":"museum2-pris2"}],[217055313,{"idx":81,"name":"prec-veger-vest","tpage_name":"museum2-pris2"}],[217055312,{"idx":80,"name":"prec-veger-spat","tpage_name":"museum2-pris2"}],[217055311,{"idx":79,"name":"prec-veger-sleeve","tpage_name":"museum2-pris2"}],[217055310,{"idx":78,"name":"prec-veger-orange","tpage_name":"museum2-pris2"}],[217055309,{"idx":77,"name":"prec-veger-nose","tpage_name":"museum2-pris2"}],[217055308,{"idx":76,"name":"prec-veger-newface","tpage_name":"museum2-pris2"}],[217055307,{"idx":75,"name":"prec-veger-neck","tpage_name":"museum2-pris2"}],[217055306,{"idx":74,"name":"prec-veger-mouth","tpage_name":"museum2-pris2"}],[217055305,{"idx":73,"name":"prec-veger-leg","tpage_name":"museum2-pris2"}],[217055304,{"idx":72,"name":"prec-veger-handpalm","tpage_name":"museum2-pris2"}],[217055303,{"idx":71,"name":"prec-veger-handback","tpage_name":"museum2-pris2"}],[217055302,{"idx":70,"name":"prec-veger-foot-02","tpage_name":"museum2-pris2"}],[217055301,{"idx":69,"name":"prec-veger-foot","tpage_name":"museum2-pris2"}],[217055300,{"idx":68,"name":"prec-veger-ear","tpage_name":"museum2-pris2"}],[217055299,{"idx":67,"name":"prec-veger-body","tpage_name":"museum2-pris2"}],[217055298,{"idx":66,"name":"king-wristband","tpage_name":"museum2-pris2"}],[217055297,{"idx":65,"name":"king-wraps","tpage_name":"museum2-pris2"}],[217055296,{"idx":64,"name":"king-wrap","tpage_name":"museum2-pris2"}],[217055295,{"idx":63,"name":"king-vestback","tpage_name":"museum2-pris2"}],[217055294,{"idx":62,"name":"king-vest","tpage_name":"museum2-pris2"}],[217055293,{"idx":61,"name":"king-thinstrap","tpage_name":"museum2-pris2"}],[217055292,{"idx":60,"name":"king-teeth","tpage_name":"museum2-pris2"}],[217055291,{"idx":59,"name":"king-skirt-b","tpage_name":"museum2-pris2"}],[217055290,{"idx":58,"name":"king-skirt","tpage_name":"museum2-pris2"}],[217055289,{"idx":57,"name":"king-shoebottom","tpage_name":"museum2-pris2"}],[217055288,{"idx":56,"name":"king-precursermetal-trimbolt","tpage_name":"museum2-pris2"}],[217055287,{"idx":55,"name":"king-precursermetal-trim2","tpage_name":"museum2-pris2"}],[217055286,{"idx":54,"name":"king-precursermetal-trim","tpage_name":"museum2-pris2"}],[217055285,{"idx":53,"name":"king-precursermetal-plain","tpage_name":"museum2-pris2"}],[217055284,{"idx":52,"name":"king-precursermetal-decor","tpage_name":"museum2-pris2"}],[217055283,{"idx":51,"name":"king-lgblackstrap","tpage_name":"museum2-pris2"}],[217055282,{"idx":50,"name":"king-leg","tpage_name":"museum2-pris2"}],[217055281,{"idx":49,"name":"king-iris","tpage_name":"museum2-pris2"}],[217055280,{"idx":48,"name":"king-horn","tpage_name":"museum2-pris2"}],[217055279,{"idx":47,"name":"king-hand","tpage_name":"museum2-pris2"}],[217055278,{"idx":46,"name":"king-hair","tpage_name":"museum2-pris2"}],[217055277,{"idx":45,"name":"king-greenmetalplain","tpage_name":"museum2-pris2"}],[217055276,{"idx":44,"name":"king-greenmetal","tpage_name":"museum2-pris2"}],[217055275,{"idx":43,"name":"king-finger","tpage_name":"museum2-pris2"}],[217055274,{"idx":42,"name":"king-face-01","tpage_name":"museum2-pris2"}],[217055273,{"idx":41,"name":"king-earing","tpage_name":"museum2-pris2"}],[217055272,{"idx":40,"name":"king-ear","tpage_name":"museum2-pris2"}],[217055271,{"idx":39,"name":"king-clip-02","tpage_name":"museum2-pris2"}],[217055270,{"idx":38,"name":"king-chest","tpage_name":"museum2-pris2"}],[217055269,{"idx":37,"name":"king-bolt","tpage_name":"museum2-pris2"}],[217055268,{"idx":36,"name":"king-bluemetal","tpage_name":"museum2-pris2"}],[217055267,{"idx":35,"name":"king-blackskirt2","tpage_name":"museum2-pris2"}],[217055266,{"idx":34,"name":"king-arm","tpage_name":"museum2-pris2"}],[217055265,{"idx":33,"name":"jinx-wraps","tpage_name":"museum2-pris2"}],[217055264,{"idx":32,"name":"jinx-teeth","tpage_name":"museum2-pris2"}],[217055263,{"idx":31,"name":"jinx-singlerope","tpage_name":"museum2-pris2"}],[217055262,{"idx":30,"name":"jinx-shoebottom2","tpage_name":"museum2-pris2"}],[217055261,{"idx":29,"name":"jinx-shirt","tpage_name":"museum2-pris2"}],[217055260,{"idx":28,"name":"jinx-scarf","tpage_name":"museum2-pris2"}],[217055259,{"idx":27,"name":"jinx-rope-01","tpage_name":"museum2-pris2"}],[217055258,{"idx":26,"name":"jinx-pants","tpage_name":"museum2-pris2"}],[217055257,{"idx":25,"name":"jinx-kneepad","tpage_name":"museum2-pris2"}],[217055256,{"idx":24,"name":"jinx-iris","tpage_name":"museum2-pris2"}],[217055255,{"idx":23,"name":"jinx-handle","tpage_name":"museum2-pris2"}],[217055254,{"idx":22,"name":"jinx-hairtye","tpage_name":"museum2-pris2"}],[217055253,{"idx":21,"name":"jinx-hair","tpage_name":"museum2-pris2"}],[217055252,{"idx":20,"name":"jinx-glovepalm","tpage_name":"museum2-pris2"}],[217055251,{"idx":19,"name":"jinx-glove","tpage_name":"museum2-pris2"}],[217055250,{"idx":18,"name":"jinx-finger","tpage_name":"museum2-pris2"}],[217055249,{"idx":17,"name":"jinx-face","tpage_name":"museum2-pris2"}],[217055248,{"idx":16,"name":"jinx-eyelid","tpage_name":"museum2-pris2"}],[217055247,{"idx":15,"name":"jinx-cigarflame","tpage_name":"museum2-pris2"}],[217055246,{"idx":14,"name":"jinx-cigar","tpage_name":"museum2-pris2"}],[217055245,{"idx":13,"name":"jinx-buckles","tpage_name":"museum2-pris2"}],[217055244,{"idx":12,"name":"jinx-brownstrapbolts","tpage_name":"museum2-pris2"}],[217055243,{"idx":11,"name":"jinx-brownstrap","tpage_name":"museum2-pris2"}],[217055242,{"idx":10,"name":"jinx-boottop","tpage_name":"museum2-pris2"}],[216989806,{"idx":110,"name":"prec-veger-sleeve","tpage_name":"museum2-pris"}],[216989805,{"idx":109,"name":"daxtertuft","tpage_name":"museum2-pris"}],[216989804,{"idx":108,"name":"daxterlense","tpage_name":"museum2-pris"}],[216989803,{"idx":107,"name":"daxterhelmetplain","tpage_name":"museum2-pris"}],[216989802,{"idx":106,"name":"daxtergoggles","tpage_name":"museum2-pris"}],[216989801,{"idx":105,"name":"daxterbolt","tpage_name":"museum2-pris"}],[216989800,{"idx":104,"name":"daxter-pants","tpage_name":"museum2-pris"}],[216989799,{"idx":103,"name":"daxter-furhilite","tpage_name":"museum2-pris"}],[216989798,{"idx":102,"name":"prec-tess-nose","tpage_name":"museum2-pris"}],[216989797,{"idx":101,"name":"prec-tess-sleeve","tpage_name":"museum2-pris"}],[216989796,{"idx":100,"name":"prec-tess-shirtstraps","tpage_name":"museum2-pris"}],[216989795,{"idx":99,"name":"prec-tess-shirt","tpage_name":"museum2-pris"}],[216989794,{"idx":98,"name":"prec-tess-scarf","tpage_name":"museum2-pris"}],[216989793,{"idx":97,"name":"prec-tess-pantsfront","tpage_name":"museum2-pris"}],[216989792,{"idx":96,"name":"prec-tess-pantscuff","tpage_name":"museum2-pris"}],[216989791,{"idx":95,"name":"prec-tess-pantsback","tpage_name":"museum2-pris"}],[216989790,{"idx":94,"name":"prec-tess-necktrans","tpage_name":"museum2-pris"}],[216989789,{"idx":93,"name":"prec-tess-headband","tpage_name":"museum2-pris"}],[216989788,{"idx":92,"name":"prec-tess-hair","tpage_name":"museum2-pris"}],[216989787,{"idx":91,"name":"prec-tess-glove","tpage_name":"museum2-pris"}],[223215686,{"idx":70,"name":"veger-whitecloth","tpage_name":"rublcst-vis-pris2"}],[216989786,{"idx":90,"name":"prec-tess-face","tpage_name":"museum2-pris"}],[223215685,{"idx":69,"name":"veger-walkingstick-03","tpage_name":"rublcst-vis-pris2"}],[216989785,{"idx":89,"name":"prec-tess-eyelid","tpage_name":"museum2-pris"}],[223215684,{"idx":68,"name":"veger-walkingstick-02","tpage_name":"rublcst-vis-pris2"}],[216989784,{"idx":88,"name":"prec-tess-eye","tpage_name":"museum2-pris"}],[223215683,{"idx":67,"name":"veger-walkingstick-01","tpage_name":"rublcst-vis-pris2"}],[216989783,{"idx":87,"name":"prec-tess-emblem","tpage_name":"museum2-pris"}],[223215682,{"idx":66,"name":"veger-vest","tpage_name":"rublcst-vis-pris2"}],[216989782,{"idx":86,"name":"prec-tess-belt2","tpage_name":"museum2-pris"}],[223215681,{"idx":65,"name":"veger-teeth","tpage_name":"rublcst-vis-pris2"}],[216989781,{"idx":85,"name":"prec-tess-belt","tpage_name":"museum2-pris"}],[223215680,{"idx":64,"name":"veger-stickwrap","tpage_name":"rublcst-vis-pris2"}],[216989780,{"idx":84,"name":"prec-teeth","tpage_name":"museum2-pris"}],[223215679,{"idx":63,"name":"veger-sleevelower","tpage_name":"rublcst-vis-pris2"}],[216989779,{"idx":83,"name":"prec-surfer-sleeve","tpage_name":"museum2-pris"}],[223215678,{"idx":62,"name":"veger-sleeve","tpage_name":"rublcst-vis-pris2"}],[216989778,{"idx":82,"name":"prec-surfer-shirt","tpage_name":"museum2-pris"}],[223215677,{"idx":61,"name":"veger-shoulderplatemetal","tpage_name":"rublcst-vis-pris2"}],[216989777,{"idx":81,"name":"prec-surfer-sash","tpage_name":"museum2-pris"}],[223215676,{"idx":60,"name":"veger-shoulderplate","tpage_name":"rublcst-vis-pris2"}],[216989776,{"idx":80,"name":"prec-surfer-pants","tpage_name":"museum2-pris"}],[223215675,{"idx":59,"name":"veger-shoebottom","tpage_name":"rublcst-vis-pris2"}],[216989775,{"idx":79,"name":"prec-surfer-hairshort","tpage_name":"museum2-pris"}],[223215674,{"idx":58,"name":"veger-scarf","tpage_name":"rublcst-vis-pris2"}],[216989774,{"idx":78,"name":"prec-surfer-hair","tpage_name":"museum2-pris"}],[223215673,{"idx":57,"name":"veger-parchment","tpage_name":"rublcst-vis-pris2"}],[216989773,{"idx":77,"name":"prec-surfer-chain-03","tpage_name":"museum2-pris"}],[223215672,{"idx":56,"name":"veger-pants","tpage_name":"rublcst-vis-pris2"}],[216989772,{"idx":76,"name":"prec-surfer-chain-02","tpage_name":"museum2-pris"}],[223215671,{"idx":55,"name":"veger-pages","tpage_name":"rublcst-vis-pris2"}],[216989771,{"idx":75,"name":"prec-surfer-chain","tpage_name":"museum2-pris"}],[223215670,{"idx":54,"name":"veger-legwraps","tpage_name":"rublcst-vis-pris2"}],[216989770,{"idx":74,"name":"prec-staff-02","tpage_name":"museum2-pris"}],[223215669,{"idx":53,"name":"veger-iris","tpage_name":"rublcst-vis-pris2"}],[216989769,{"idx":73,"name":"prec-staff-01","tpage_name":"museum2-pris"}],[223215668,{"idx":52,"name":"veger-hand","tpage_name":"rublcst-vis-pris2"}],[216989768,{"idx":72,"name":"prec-orbsmall","tpage_name":"museum2-pris"}],[223215667,{"idx":51,"name":"veger-hair","tpage_name":"rublcst-vis-pris2"}],[216989767,{"idx":71,"name":"prec-orblarge","tpage_name":"museum2-pris"}],[223215666,{"idx":50,"name":"veger-gold","tpage_name":"rublcst-vis-pris2"}],[216989766,{"idx":70,"name":"prec-neck","tpage_name":"museum2-pris"}],[223215665,{"idx":49,"name":"veger-fingertop","tpage_name":"rublcst-vis-pris2"}],[216989765,{"idx":69,"name":"prec-leader-wrap","tpage_name":"museum2-pris"}],[223215664,{"idx":48,"name":"veger-fingerbottom","tpage_name":"rublcst-vis-pris2"}],[216989764,{"idx":68,"name":"prec-leader-shirt","tpage_name":"museum2-pris"}],[223215663,{"idx":47,"name":"veger-face","tpage_name":"rublcst-vis-pris2"}],[216989763,{"idx":67,"name":"prec-leader-robe-02","tpage_name":"museum2-pris"}],[223215662,{"idx":46,"name":"veger-eyelid","tpage_name":"rublcst-vis-pris2"}],[216989762,{"idx":66,"name":"prec-leader-robe-01","tpage_name":"museum2-pris"}],[223215661,{"idx":45,"name":"veger-endpaper","tpage_name":"rublcst-vis-pris2"}],[216989761,{"idx":65,"name":"prec-leader-pants","tpage_name":"museum2-pris"}],[223215660,{"idx":44,"name":"veger-coatclips","tpage_name":"rublcst-vis-pris2"}],[216989760,{"idx":64,"name":"prec-leader-headshield","tpage_name":"museum2-pris"}],[223215659,{"idx":43,"name":"veger-coatbelt","tpage_name":"rublcst-vis-pris2"}],[216989759,{"idx":63,"name":"prec-leader-hair","tpage_name":"museum2-pris"}],[223215658,{"idx":42,"name":"veger-coat","tpage_name":"rublcst-vis-pris2"}],[216989758,{"idx":62,"name":"prec-leader-frontskirt","tpage_name":"museum2-pris"}],[223215657,{"idx":41,"name":"veger-bootstrap","tpage_name":"rublcst-vis-pris2"}],[216989757,{"idx":61,"name":"prec-leader-foreheadshield","tpage_name":"museum2-pris"}],[223215656,{"idx":40,"name":"veger-bootfoot","tpage_name":"rublcst-vis-pris2"}],[216989756,{"idx":60,"name":"prec-leader-face2","tpage_name":"museum2-pris"}],[223215655,{"idx":39,"name":"veger-bootbolt","tpage_name":"rublcst-vis-pris2"}],[216989755,{"idx":59,"name":"prec-leader-belt","tpage_name":"museum2-pris"}],[223215654,{"idx":38,"name":"veger-bookspine","tpage_name":"rublcst-vis-pris2"}],[216989754,{"idx":58,"name":"prec-leader-beard","tpage_name":"museum2-pris"}],[223215653,{"idx":37,"name":"veger-booksides","tpage_name":"rublcst-vis-pris2"}],[216989753,{"idx":57,"name":"prec-leader-armband","tpage_name":"museum2-pris"}],[223215652,{"idx":36,"name":"veger-bookleather","tpage_name":"rublcst-vis-pris2"}],[216989752,{"idx":56,"name":"prec-leader-arm","tpage_name":"museum2-pris"}],[223215651,{"idx":35,"name":"king-wristband","tpage_name":"rublcst-vis-pris2"}],[216989751,{"idx":55,"name":"prec-insidemouth","tpage_name":"museum2-pris"}],[223215650,{"idx":34,"name":"king-wraps","tpage_name":"rublcst-vis-pris2"}],[216989750,{"idx":54,"name":"prec-handpalm","tpage_name":"museum2-pris"}],[223215649,{"idx":33,"name":"king-wrap","tpage_name":"rublcst-vis-pris2"}],[216989749,{"idx":53,"name":"prec-hand-back","tpage_name":"museum2-pris"}],[223215648,{"idx":32,"name":"king-vestback","tpage_name":"rublcst-vis-pris2"}],[216989748,{"idx":52,"name":"prec-dumb-sleeve","tpage_name":"museum2-pris"}],[223215647,{"idx":31,"name":"king-vest","tpage_name":"rublcst-vis-pris2"}],[216989747,{"idx":51,"name":"prec-dumb-shirt","tpage_name":"museum2-pris"}],[223215646,{"idx":30,"name":"king-thinstrap","tpage_name":"rublcst-vis-pris2"}],[216989746,{"idx":50,"name":"prec-dumb-pants","tpage_name":"museum2-pris"}],[223215645,{"idx":29,"name":"king-teeth","tpage_name":"rublcst-vis-pris2"}],[216989745,{"idx":49,"name":"prec-dumb-helmet","tpage_name":"museum2-pris"}],[223215644,{"idx":28,"name":"king-skirt-b","tpage_name":"rublcst-vis-pris2"}],[216989744,{"idx":48,"name":"errolcyber-teeth","tpage_name":"museum2-pris"}],[223215643,{"idx":27,"name":"king-skirt","tpage_name":"rublcst-vis-pris2"}],[216989743,{"idx":47,"name":"errolcyber-spine","tpage_name":"museum2-pris"}],[223215642,{"idx":26,"name":"king-shoebottom","tpage_name":"rublcst-vis-pris2"}],[216989742,{"idx":46,"name":"errolcyber-rubberpipe-light","tpage_name":"museum2-pris"}],[223215641,{"idx":25,"name":"king-precursermetal-trimbolt","tpage_name":"rublcst-vis-pris2"}],[216989741,{"idx":45,"name":"errolcyber-rubberpipe","tpage_name":"museum2-pris"}],[223215640,{"idx":24,"name":"king-precursermetal-trim2","tpage_name":"rublcst-vis-pris2"}],[216989740,{"idx":44,"name":"errolcyber-roboeye","tpage_name":"museum2-pris"}],[223215639,{"idx":23,"name":"king-precursermetal-trim","tpage_name":"rublcst-vis-pris2"}],[216989739,{"idx":43,"name":"errolcyber-redmetal-03","tpage_name":"museum2-pris"}],[223215638,{"idx":22,"name":"king-precursermetal-plain","tpage_name":"rublcst-vis-pris2"}],[216989738,{"idx":42,"name":"errolcyber-redmetal-02","tpage_name":"museum2-pris"}],[223215637,{"idx":21,"name":"king-precursermetal-decor","tpage_name":"rublcst-vis-pris2"}],[216989737,{"idx":41,"name":"errolcyber-redmetal-01","tpage_name":"museum2-pris"}],[223215636,{"idx":20,"name":"king-lgblackstrap","tpage_name":"rublcst-vis-pris2"}],[216989736,{"idx":40,"name":"errolcyber-pipes-03","tpage_name":"museum2-pris"}],[223215635,{"idx":19,"name":"king-leg","tpage_name":"rublcst-vis-pris2"}],[216989735,{"idx":39,"name":"errolcyber-pipes-02","tpage_name":"museum2-pris"}],[223215634,{"idx":18,"name":"king-iris","tpage_name":"rublcst-vis-pris2"}],[216989734,{"idx":38,"name":"errolcyber-pipes-01","tpage_name":"museum2-pris"}],[223215633,{"idx":17,"name":"king-horn","tpage_name":"rublcst-vis-pris2"}],[216989733,{"idx":37,"name":"errolcyber-metalgold","tpage_name":"museum2-pris"}],[223215632,{"idx":16,"name":"king-hand","tpage_name":"rublcst-vis-pris2"}],[216989732,{"idx":36,"name":"errolcyber-metaleyelid","tpage_name":"museum2-pris"}],[223215631,{"idx":15,"name":"king-hair","tpage_name":"rublcst-vis-pris2"}],[216989731,{"idx":35,"name":"errolcyber-jointpipe","tpage_name":"museum2-pris"}],[223215630,{"idx":14,"name":"king-greenmetalplain","tpage_name":"rublcst-vis-pris2"}],[216989730,{"idx":34,"name":"errolcyber-insidewires","tpage_name":"museum2-pris"}],[223215629,{"idx":13,"name":"king-greenmetal","tpage_name":"rublcst-vis-pris2"}],[216989729,{"idx":33,"name":"errolcyber-insidemouth","tpage_name":"museum2-pris"}],[223215628,{"idx":12,"name":"king-finger","tpage_name":"rublcst-vis-pris2"}],[216989728,{"idx":32,"name":"errolcyber-head-02","tpage_name":"museum2-pris"}],[223215627,{"idx":11,"name":"king-face-01","tpage_name":"rublcst-vis-pris2"}],[216989727,{"idx":31,"name":"errolcyber-head-01","tpage_name":"museum2-pris"}],[223215626,{"idx":10,"name":"king-earing","tpage_name":"rublcst-vis-pris2"}],[216989726,{"idx":30,"name":"errolcyber-hair","tpage_name":"museum2-pris"}],[223215625,{"idx":9,"name":"king-ear","tpage_name":"rublcst-vis-pris2"}],[216989725,{"idx":29,"name":"errolcyber-greymetal-02","tpage_name":"museum2-pris"}],[223215624,{"idx":8,"name":"king-clip-02","tpage_name":"rublcst-vis-pris2"}],[216989724,{"idx":28,"name":"errolcyber-greymetal","tpage_name":"museum2-pris"}],[223215623,{"idx":7,"name":"king-chest","tpage_name":"rublcst-vis-pris2"}],[216989723,{"idx":27,"name":"errolcyber-greyknobs","tpage_name":"museum2-pris"}],[223215622,{"idx":6,"name":"king-bolt","tpage_name":"rublcst-vis-pris2"}],[216989722,{"idx":26,"name":"errolcyber-glovepalm","tpage_name":"museum2-pris"}],[223215621,{"idx":5,"name":"king-bluemetal","tpage_name":"rublcst-vis-pris2"}],[216989721,{"idx":25,"name":"errolcyber-fingers","tpage_name":"museum2-pris"}],[223215620,{"idx":4,"name":"king-blackskirt2","tpage_name":"rublcst-vis-pris2"}],[216989720,{"idx":24,"name":"errolcyber-earcup","tpage_name":"museum2-pris"}],[223215619,{"idx":3,"name":"king-arm","tpage_name":"rublcst-vis-pris2"}],[216989719,{"idx":23,"name":"errolcyber-dirtymetal","tpage_name":"museum2-pris"}],[223215618,{"idx":2,"name":"environment-oldmetal","tpage_name":"rublcst-vis-pris2"}],[221970438,{"idx":6,"name":"final-beam-light","tpage_name":"precurd-sprite"}],[216989718,{"idx":22,"name":"errolcyber-chestplate","tpage_name":"museum2-pris"}],[223215617,{"idx":1,"name":"bam-hairhilite","tpage_name":"rublcst-vis-pris2"}],[221970437,{"idx":5,"name":"final-beam-dark","tpage_name":"precurd-sprite"}],[216989717,{"idx":21,"name":"errolcyber-bluewrap","tpage_name":"museum2-pris"}],[223215616,{"idx":0,"name":"bam-eyelight","tpage_name":"rublcst-vis-pris2"}],[221970436,{"idx":4,"name":"final-beam-comb","tpage_name":"precurd-sprite"}],[216989716,{"idx":20,"name":"errolcyber-bluemetal-01","tpage_name":"museum2-pris"}],[216989715,{"idx":19,"name":"errolcyber-bluedome","tpage_name":"museum2-pris"}],[221970434,{"idx":2,"name":"gen-03","tpage_name":"precurd-sprite"}],[216989714,{"idx":18,"name":"errolcyber-bigshoulder","tpage_name":"museum2-pris"}],[221970433,{"idx":1,"name":"gen-02","tpage_name":"precurd-sprite"}],[216989713,{"idx":17,"name":"errolcyber-bighand-01","tpage_name":"museum2-pris"}],[216924160,{"idx":0,"name":"keira-mask","tpage_name":"museum-water"}],[222887968,{"idx":32,"name":"palcab-lowres-mark-shops-01","tpage_name":"lfacctyb-vis-tfrag"}],[216662068,{"idx":52,"name":"torn-vest","tpage_name":"outcast3-pris"}],[222887967,{"idx":31,"name":"palcab-lowres-mark-roof-rim-01","tpage_name":"lfacctyb-vis-tfrag"}],[216662067,{"idx":51,"name":"torn-teeth-01","tpage_name":"outcast3-pris"}],[222887966,{"idx":30,"name":"city-lowres-ind-wall-06","tpage_name":"lfacctyb-vis-tfrag"}],[216662066,{"idx":50,"name":"torn-shoe-02","tpage_name":"outcast3-pris"}],[222887965,{"idx":29,"name":"city-lowres-ind-wall-05","tpage_name":"lfacctyb-vis-tfrag"}],[216662065,{"idx":49,"name":"torn-shoe","tpage_name":"outcast3-pris"}],[222887964,{"idx":28,"name":"city-lowres-ind-wall-08","tpage_name":"lfacctyb-vis-tfrag"}],[216662064,{"idx":48,"name":"torn-scarf","tpage_name":"outcast3-pris"}],[222887963,{"idx":27,"name":"city-lowres-ind-wall-07","tpage_name":"lfacctyb-vis-tfrag"}],[216662063,{"idx":47,"name":"torn-pipe","tpage_name":"outcast3-pris"}],[222887962,{"idx":26,"name":"city-lowres-ind-wall-03","tpage_name":"lfacctyb-vis-tfrag"}],[216662062,{"idx":46,"name":"torn-mouth","tpage_name":"outcast3-pris"}],[222887961,{"idx":25,"name":"city-lowres-port-roof","tpage_name":"lfacctyb-vis-tfrag"}],[216662061,{"idx":45,"name":"torn-metal2","tpage_name":"outcast3-pris"}],[222887960,{"idx":24,"name":"city-lowres-ind-wall-01","tpage_name":"lfacctyb-vis-tfrag"}],[216662060,{"idx":44,"name":"torn-legshield","tpage_name":"outcast3-pris"}],[222887959,{"idx":23,"name":"palcab-lowres-mark-roof-01","tpage_name":"lfacctyb-vis-tfrag"}],[216662059,{"idx":43,"name":"torn-handle-01","tpage_name":"outcast3-pris"}],[222887958,{"idx":22,"name":"city-lowres-fort-red","tpage_name":"lfacctyb-vis-tfrag"}],[216662058,{"idx":42,"name":"torn-hair-02","tpage_name":"outcast3-pris"}],[222887957,{"idx":21,"name":"city-lowres-fort-yellow","tpage_name":"lfacctyb-vis-tfrag"}],[216662057,{"idx":41,"name":"torn-hair-01","tpage_name":"outcast3-pris"}],[222887956,{"idx":20,"name":"city-lowres-ind-wall-02","tpage_name":"lfacctyb-vis-tfrag"}],[216662056,{"idx":40,"name":"torn-gunbarrel-02","tpage_name":"outcast3-pris"}],[222887955,{"idx":19,"name":"palcab-lowres-stadium-canopy","tpage_name":"lfacctyb-vis-tfrag"}],[216662055,{"idx":39,"name":"torn-gunbarrel","tpage_name":"outcast3-pris"}],[222887954,{"idx":18,"name":"palcab-steel-lores","tpage_name":"lfacctyb-vis-tfrag"}],[216662054,{"idx":38,"name":"torn-footleather","tpage_name":"outcast3-pris"}],[222887953,{"idx":17,"name":"city-lowres-ind-wall-04","tpage_name":"lfacctyb-vis-tfrag"}],[216662053,{"idx":37,"name":"torn-finger","tpage_name":"outcast3-pris"}],[222887952,{"idx":16,"name":"palcab-lowres-mark-roof-02","tpage_name":"lfacctyb-vis-tfrag"}],[216662052,{"idx":36,"name":"torn-face-right","tpage_name":"outcast3-pris"}],[222887951,{"idx":15,"name":"palcab-pipe-hoze","tpage_name":"lfacctyb-vis-tfrag"}],[216662051,{"idx":35,"name":"torn-face","tpage_name":"outcast3-pris"}],[216072324,{"idx":132,"name":"seem-uppertorso","tpage_name":"museum-pris2"}],[216072323,{"idx":131,"name":"seem-teeth","tpage_name":"museum-pris2"}],[216072322,{"idx":130,"name":"seem-straps","tpage_name":"museum-pris2"}],[216072321,{"idx":129,"name":"seem-skirt-small","tpage_name":"museum-pris2"}],[216072320,{"idx":128,"name":"seem-skirt","tpage_name":"museum-pris2"}],[216072319,{"idx":127,"name":"seem-precmetal-plain","tpage_name":"museum-pris2"}],[216072318,{"idx":126,"name":"seem-precmetal-edge","tpage_name":"museum-pris2"}],[216072317,{"idx":125,"name":"seem-precmetal-chestplate-01","tpage_name":"museum-pris2"}],[216072316,{"idx":124,"name":"seem-pipes-02","tpage_name":"museum-pris2"}],[216072315,{"idx":123,"name":"seem-pipes-01","tpage_name":"museum-pris2"}],[216072314,{"idx":122,"name":"seem-pipeend","tpage_name":"museum-pris2"}],[216072313,{"idx":121,"name":"seem-headpiecetop","tpage_name":"museum-pris2"}],[216072312,{"idx":120,"name":"seem-headgearback","tpage_name":"museum-pris2"}],[216072311,{"idx":119,"name":"seem-hand","tpage_name":"museum-pris2"}],[216072310,{"idx":118,"name":"seem-finger","tpage_name":"museum-pris2"}],[216072309,{"idx":117,"name":"seem-face","tpage_name":"museum-pris2"}],[216072308,{"idx":116,"name":"seem-eyelid","tpage_name":"museum-pris2"}],[216072307,{"idx":115,"name":"seem-eye","tpage_name":"museum-pris2"}],[216072306,{"idx":114,"name":"seem-ear","tpage_name":"museum-pris2"}],[216072305,{"idx":113,"name":"seem-boottoe","tpage_name":"museum-pris2"}],[216072304,{"idx":112,"name":"seem-bootmet","tpage_name":"museum-pris2"}],[216072303,{"idx":111,"name":"seem-bootlower","tpage_name":"museum-pris2"}],[216072302,{"idx":110,"name":"seem-bootleg","tpage_name":"museum-pris2"}],[216072301,{"idx":109,"name":"seem-bootbottom","tpage_name":"museum-pris2"}],[216072300,{"idx":108,"name":"seem-arm","tpage_name":"museum-pris2"}],[216072299,{"idx":107,"name":"samosbird-wing","tpage_name":"museum-pris2"}],[216072298,{"idx":106,"name":"samosbird-plume","tpage_name":"museum-pris2"}],[216072297,{"idx":105,"name":"samosbird-eye","tpage_name":"museum-pris2"}],[216072296,{"idx":104,"name":"samosbird-body","tpage_name":"museum-pris2"}],[216072295,{"idx":103,"name":"samosbird-beak","tpage_name":"museum-pris2"}],[216072294,{"idx":102,"name":"samos-vest","tpage_name":"museum-pris2"}],[216072293,{"idx":101,"name":"samos-teeth2","tpage_name":"museum-pris2"}],[216072292,{"idx":100,"name":"samos-strap","tpage_name":"museum-pris2"}],[216072291,{"idx":99,"name":"samos-metal","tpage_name":"museum-pris2"}],[216072290,{"idx":98,"name":"samos-log-03","tpage_name":"museum-pris2"}],[216072289,{"idx":97,"name":"samos-log-02","tpage_name":"museum-pris2"}],[216072288,{"idx":96,"name":"samos-log-01","tpage_name":"museum-pris2"}],[216072287,{"idx":95,"name":"samos-lens","tpage_name":"museum-pris2"}],[216072286,{"idx":94,"name":"samos-leaf","tpage_name":"museum-pris2"}],[216072285,{"idx":93,"name":"samos-helmet","tpage_name":"museum-pris2"}],[216072284,{"idx":92,"name":"samos-hair","tpage_name":"museum-pris2"}],[216072283,{"idx":91,"name":"samos-finger-01","tpage_name":"museum-pris2"}],[216072282,{"idx":90,"name":"samos-face","tpage_name":"museum-pris2"}],[216072281,{"idx":89,"name":"samos-eyelid","tpage_name":"museum-pris2"}],[216072280,{"idx":88,"name":"samos-eye","tpage_name":"museum-pris2"}],[216072279,{"idx":87,"name":"samos-ear","tpage_name":"museum-pris2"}],[216072278,{"idx":86,"name":"samos-diaper","tpage_name":"museum-pris2"}],[216072277,{"idx":85,"name":"samos-arm","tpage_name":"museum-pris2"}],[216072276,{"idx":84,"name":"tess-upperboot","tpage_name":"museum-pris2"}],[216072275,{"idx":83,"name":"tess-underwear","tpage_name":"museum-pris2"}],[216072274,{"idx":82,"name":"tess-teeth","tpage_name":"museum-pris2"}],[216072273,{"idx":81,"name":"tess-sleeve","tpage_name":"museum-pris2"}],[216072272,{"idx":80,"name":"tess-shoetop","tpage_name":"museum-pris2"}],[216072271,{"idx":79,"name":"tess-shoebottom","tpage_name":"museum-pris2"}],[216072270,{"idx":78,"name":"tess-shirtstraps","tpage_name":"museum-pris2"}],[216072269,{"idx":77,"name":"tess-shirt-128","tpage_name":"museum-pris2"}],[216072268,{"idx":76,"name":"tess-scarf","tpage_name":"museum-pris2"}],[216072267,{"idx":75,"name":"tess-lowerboot","tpage_name":"museum-pris2"}],[216072266,{"idx":74,"name":"tess-jeanscuff","tpage_name":"museum-pris2"}],[216072265,{"idx":73,"name":"tess-jeansback","tpage_name":"museum-pris2"}],[216072264,{"idx":72,"name":"tess-jeans","tpage_name":"museum-pris2"}],[216072263,{"idx":71,"name":"tess-hairband","tpage_name":"museum-pris2"}],[216072262,{"idx":70,"name":"tess-hair","tpage_name":"museum-pris2"}],[216072261,{"idx":69,"name":"tess-glove","tpage_name":"museum-pris2"}],[216072260,{"idx":68,"name":"tess-finger","tpage_name":"museum-pris2"}],[216072259,{"idx":67,"name":"tess-face","tpage_name":"museum-pris2"}],[216072258,{"idx":66,"name":"tess-eyelid","tpage_name":"museum-pris2"}],[216072257,{"idx":65,"name":"tess-eye","tpage_name":"museum-pris2"}],[216072256,{"idx":64,"name":"tess-emblem","tpage_name":"museum-pris2"}],[216072255,{"idx":63,"name":"tess-chest","tpage_name":"museum-pris2"}],[216072254,{"idx":62,"name":"tess-buckle","tpage_name":"museum-pris2"}],[216072253,{"idx":61,"name":"tess-belt2","tpage_name":"museum-pris2"}],[216072252,{"idx":60,"name":"tess-belt","tpage_name":"museum-pris2"}],[216072251,{"idx":59,"name":"tess-belly","tpage_name":"museum-pris2"}],[216072250,{"idx":58,"name":"torn-vest","tpage_name":"museum-pris2"}],[216072249,{"idx":57,"name":"torn-teeth-01","tpage_name":"museum-pris2"}],[216072248,{"idx":56,"name":"torn-shoe-02","tpage_name":"museum-pris2"}],[216072247,{"idx":55,"name":"torn-shoe","tpage_name":"museum-pris2"}],[216072246,{"idx":54,"name":"torn-scarf","tpage_name":"museum-pris2"}],[216072245,{"idx":53,"name":"torn-pipe","tpage_name":"museum-pris2"}],[216072244,{"idx":52,"name":"torn-mouth","tpage_name":"museum-pris2"}],[216072243,{"idx":51,"name":"torn-metal2","tpage_name":"museum-pris2"}],[216072242,{"idx":50,"name":"torn-legshield","tpage_name":"museum-pris2"}],[216072241,{"idx":49,"name":"torn-handle-01","tpage_name":"museum-pris2"}],[216072240,{"idx":48,"name":"torn-hair-02","tpage_name":"museum-pris2"}],[216072239,{"idx":47,"name":"torn-hair-01","tpage_name":"museum-pris2"}],[216072238,{"idx":46,"name":"torn-gunbarrel-02","tpage_name":"museum-pris2"}],[216072237,{"idx":45,"name":"torn-gunbarrel","tpage_name":"museum-pris2"}],[216072236,{"idx":44,"name":"torn-footleather","tpage_name":"museum-pris2"}],[216072235,{"idx":43,"name":"torn-finger","tpage_name":"museum-pris2"}],[216072234,{"idx":42,"name":"torn-face-right","tpage_name":"museum-pris2"}],[216072233,{"idx":41,"name":"torn-face","tpage_name":"museum-pris2"}],[216072232,{"idx":40,"name":"torn-eyelid","tpage_name":"museum-pris2"}],[216072231,{"idx":39,"name":"torn-eye","tpage_name":"museum-pris2"}],[216072230,{"idx":38,"name":"torn-ear","tpage_name":"museum-pris2"}],[216072229,{"idx":37,"name":"torn-blademetal","tpage_name":"museum-pris2"}],[216072228,{"idx":36,"name":"torn-belt2","tpage_name":"museum-pris2"}],[216072227,{"idx":35,"name":"torn-belt","tpage_name":"museum-pris2"}],[216072226,{"idx":34,"name":"torn-armor","tpage_name":"museum-pris2"}],[216072225,{"idx":33,"name":"torn-armlft","tpage_name":"museum-pris2"}],[216072224,{"idx":32,"name":"environment-oldmetal","tpage_name":"museum-pris2"}],[216072223,{"idx":31,"name":"charHOLD","tpage_name":"museum-pris2"}],[216072222,{"idx":30,"name":"bam-hairhilite","tpage_name":"museum-pris2"}],[216072221,{"idx":29,"name":"bam-eyelight","tpage_name":"museum-pris2"}],[216072220,{"idx":28,"name":"ashelin-whitestrap","tpage_name":"museum-pris2"}],[216072219,{"idx":27,"name":"ashelin-teeth","tpage_name":"museum-pris2"}],[216072218,{"idx":26,"name":"ashelin-shoemetal","tpage_name":"museum-pris2"}],[216072217,{"idx":25,"name":"ashelin-shoebottom","tpage_name":"museum-pris2"}],[216072216,{"idx":24,"name":"ashelin-shield","tpage_name":"museum-pris2"}],[216072215,{"idx":23,"name":"ashelin-shells","tpage_name":"museum-pris2"}],[216072214,{"idx":22,"name":"ashelin-redtop","tpage_name":"museum-pris2"}],[216072213,{"idx":21,"name":"ashelin-pantstop","tpage_name":"museum-pris2"}],[216072212,{"idx":20,"name":"ashelin-jacketstraps","tpage_name":"museum-pris2"}],[216072211,{"idx":19,"name":"ashelin-jacketsleeve","tpage_name":"museum-pris2"}],[216072210,{"idx":18,"name":"ashelin-jacketbody","tpage_name":"museum-pris2"}],[216072209,{"idx":17,"name":"ashelin-handle-01","tpage_name":"museum-pris2"}],[216072208,{"idx":16,"name":"ashelin-hair","tpage_name":"museum-pris2"}],[216072207,{"idx":15,"name":"ashelin-gunholster","tpage_name":"museum-pris2"}],[216072206,{"idx":14,"name":"ashelin-gunbarrel-03","tpage_name":"museum-pris2"}],[216072205,{"idx":13,"name":"ashelin-gunbarrel-02","tpage_name":"museum-pris2"}],[216072204,{"idx":12,"name":"ashelin-gunbarrel-01","tpage_name":"museum-pris2"}],[216072203,{"idx":11,"name":"ashelin-glove","tpage_name":"museum-pris2"}],[216072202,{"idx":10,"name":"ashelin-face","tpage_name":"museum-pris2"}],[216072201,{"idx":9,"name":"ashelin-eyelid","tpage_name":"museum-pris2"}],[216072200,{"idx":8,"name":"ashelin-eyebrow","tpage_name":"museum-pris2"}],[216072199,{"idx":7,"name":"ashelin-eye","tpage_name":"museum-pris2"}],[216072198,{"idx":6,"name":"ashelin-chest","tpage_name":"museum-pris2"}],[217317377,{"idx":1,"name":"fora-shrub-vine","tpage_name":"forestx-vis-shrub"}],[216072197,{"idx":5,"name":"ashelin-cgrank","tpage_name":"museum-pris2"}],[217317376,{"idx":0,"name":"fora-shrub-pebbles","tpage_name":"forestx-vis-shrub"}],[216072196,{"idx":4,"name":"ashelin-cglogo","tpage_name":"museum-pris2"}],[216072195,{"idx":3,"name":"ashelin-brownstrap","tpage_name":"museum-pris2"}],[216072194,{"idx":2,"name":"ashelin-boottop","tpage_name":"museum-pris2"}],[216072193,{"idx":1,"name":"ashelin-bolts","tpage_name":"museum-pris2"}],[216006826,{"idx":170,"name":"onin-toe","tpage_name":"museum-pris"}],[216006825,{"idx":169,"name":"onin-teeth","tpage_name":"museum-pris"}],[216006824,{"idx":168,"name":"onin-skirt","tpage_name":"museum-pris"}],[216006823,{"idx":167,"name":"onin-shirt","tpage_name":"museum-pris"}],[216006822,{"idx":166,"name":"onin-scarf","tpage_name":"museum-pris"}],[216006821,{"idx":165,"name":"onin-rings2","tpage_name":"museum-pris"}],[216006820,{"idx":164,"name":"onin-rings","tpage_name":"museum-pris"}],[216006819,{"idx":163,"name":"onin-neck","tpage_name":"museum-pris"}],[216006818,{"idx":162,"name":"onin-mat","tpage_name":"museum-pris"}],[216006817,{"idx":161,"name":"onin-idoleye","tpage_name":"museum-pris"}],[216006816,{"idx":160,"name":"onin-idol","tpage_name":"museum-pris"}],[216006815,{"idx":159,"name":"onin-handpalm","tpage_name":"museum-pris"}],[216006814,{"idx":158,"name":"onin-hand","tpage_name":"museum-pris"}],[216006813,{"idx":157,"name":"onin-hair","tpage_name":"museum-pris"}],[216006812,{"idx":156,"name":"onin-finger","tpage_name":"museum-pris"}],[216006811,{"idx":155,"name":"onin-face","tpage_name":"museum-pris"}],[216006810,{"idx":154,"name":"onin-eyelid","tpage_name":"museum-pris"}],[216006809,{"idx":153,"name":"onin-eye","tpage_name":"museum-pris"}],[216006808,{"idx":152,"name":"onin-chain","tpage_name":"museum-pris"}],[216006807,{"idx":151,"name":"onin-braclet","tpage_name":"museum-pris"}],[216006806,{"idx":150,"name":"onin-bowlhead","tpage_name":"museum-pris"}],[216006805,{"idx":149,"name":"onin-arm","tpage_name":"museum-pris"}],[216006801,{"idx":145,"name":"klever-widebrownstrap","tpage_name":"museum-pris"}],[216006800,{"idx":144,"name":"klever-undershirt","tpage_name":"museum-pris"}],[216006799,{"idx":143,"name":"klever-thighs","tpage_name":"museum-pris"}],[216006798,{"idx":142,"name":"klever-skirtlight","tpage_name":"museum-pris"}],[216006797,{"idx":141,"name":"klever-skirtdark","tpage_name":"museum-pris"}],[216006796,{"idx":140,"name":"klever-shoebottom","tpage_name":"museum-pris"}],[216006795,{"idx":139,"name":"klever-shoe","tpage_name":"museum-pris"}],[216006794,{"idx":138,"name":"klever-mustache","tpage_name":"museum-pris"}],[216006793,{"idx":137,"name":"klever-horn","tpage_name":"museum-pris"}],[216006792,{"idx":136,"name":"klever-handwrap","tpage_name":"museum-pris"}],[216006791,{"idx":135,"name":"klever-hand","tpage_name":"museum-pris"}],[216006790,{"idx":134,"name":"klever-hair","tpage_name":"museum-pris"}],[216006789,{"idx":133,"name":"klever-gunmetal-05","tpage_name":"museum-pris"}],[216006788,{"idx":132,"name":"klever-gunmetal-04","tpage_name":"museum-pris"}],[216006787,{"idx":131,"name":"klever-gunmetal-03","tpage_name":"museum-pris"}],[216006786,{"idx":130,"name":"klever-gunmetal-02","tpage_name":"museum-pris"}],[216006785,{"idx":129,"name":"klever-gunmetal-01","tpage_name":"museum-pris"}],[216006784,{"idx":128,"name":"klever-fingertop","tpage_name":"museum-pris"}],[216006783,{"idx":127,"name":"klever-fingerbottom","tpage_name":"museum-pris"}],[216006782,{"idx":126,"name":"klever-face-01scars","tpage_name":"museum-pris"}],[216006781,{"idx":125,"name":"klever-face-01","tpage_name":"museum-pris"}],[216006780,{"idx":124,"name":"klever-eyelid","tpage_name":"museum-pris"}],[216006779,{"idx":123,"name":"klever-eye","tpage_name":"museum-pris"}],[216006778,{"idx":122,"name":"klever-earcup","tpage_name":"museum-pris"}],[216006777,{"idx":121,"name":"klever-clips","tpage_name":"museum-pris"}],[216006776,{"idx":120,"name":"klever-chest","tpage_name":"museum-pris"}],[216006775,{"idx":119,"name":"klever-brownstrap","tpage_name":"museum-pris"}],[216006774,{"idx":118,"name":"klever-bolt","tpage_name":"museum-pris"}],[216006773,{"idx":117,"name":"klever-blackstrap","tpage_name":"museum-pris"}],[216006772,{"idx":116,"name":"klever-armor-02","tpage_name":"museum-pris"}],[216006771,{"idx":115,"name":"klever-armor-01","tpage_name":"museum-pris"}],[216006770,{"idx":114,"name":"klever-arm","tpage_name":"museum-pris"}],[216006769,{"idx":113,"name":"keira-torch-nozzle-02","tpage_name":"museum-pris"}],[216006768,{"idx":112,"name":"keira-torch-nozzle-01","tpage_name":"museum-pris"}],[216006767,{"idx":111,"name":"keira-torch-guard-01","tpage_name":"museum-pris"}],[216006766,{"idx":110,"name":"keira-shoebottom","tpage_name":"museum-pris"}],[216006765,{"idx":109,"name":"keira-shirt","tpage_name":"museum-pris"}],[216006764,{"idx":108,"name":"keira-pantslarge","tpage_name":"museum-pris"}],[216006763,{"idx":107,"name":"keira-maskbolt","tpage_name":"museum-pris"}],[216006762,{"idx":106,"name":"keira-lens-large","tpage_name":"museum-pris"}],[216006761,{"idx":105,"name":"keira-largewraps","tpage_name":"museum-pris"}],[216006760,{"idx":104,"name":"keira-iris-64x64","tpage_name":"museum-pris"}],[216006759,{"idx":103,"name":"keira-handtop","tpage_name":"museum-pris"}],[216006758,{"idx":102,"name":"keira-handbottom","tpage_name":"museum-pris"}],[216006757,{"idx":101,"name":"keira-hair-newest","tpage_name":"museum-pris"}],[216006756,{"idx":100,"name":"keira-gogglestrap","tpage_name":"museum-pris"}],[216006755,{"idx":99,"name":"keira-glovenewlarge","tpage_name":"museum-pris"}],[216006754,{"idx":98,"name":"keira-glasses","tpage_name":"museum-pris"}],[216006753,{"idx":97,"name":"keira-face","tpage_name":"museum-pris"}],[216006752,{"idx":96,"name":"keira-eyelid","tpage_name":"museum-pris"}],[216006751,{"idx":95,"name":"keira-chokermetal","tpage_name":"museum-pris"}],[216006750,{"idx":94,"name":"keira-chokerhighres","tpage_name":"museum-pris"}],[216006749,{"idx":93,"name":"keira-brownstraps-new","tpage_name":"museum-pris"}],[216006748,{"idx":92,"name":"keira-blackstrap","tpage_name":"museum-pris"}],[216006747,{"idx":91,"name":"keira-belt","tpage_name":"museum-pris"}],[216006746,{"idx":90,"name":"keira-bellylong","tpage_name":"museum-pris"}],[216006727,{"idx":71,"name":"pecker-yellowfur","tpage_name":"museum-pris"}],[216006726,{"idx":70,"name":"pecker-wingtop","tpage_name":"museum-pris"}],[216006725,{"idx":69,"name":"pecker-wingbottom","tpage_name":"museum-pris"}],[216006724,{"idx":68,"name":"pecker-teeth","tpage_name":"museum-pris"}],[216006723,{"idx":67,"name":"pecker-tail","tpage_name":"museum-pris"}],[216006722,{"idx":66,"name":"pecker-plume","tpage_name":"museum-pris"}],[216006721,{"idx":65,"name":"pecker-face","tpage_name":"museum-pris"}],[216006720,{"idx":64,"name":"pecker-eyelid","tpage_name":"museum-pris"}],[216006719,{"idx":63,"name":"pecker-body-01","tpage_name":"museum-pris"}],[216006718,{"idx":62,"name":"jakchires-teeth","tpage_name":"museum-pris"}],[216006717,{"idx":61,"name":"jakchires-shoeteop","tpage_name":"museum-pris"}],[216006716,{"idx":60,"name":"jakchires-shoemetal","tpage_name":"museum-pris"}],[216006715,{"idx":59,"name":"jakchires-shoebottom","tpage_name":"museum-pris"}],[216006714,{"idx":58,"name":"jakchires-precarmor-01","tpage_name":"museum-pris"}],[216006713,{"idx":57,"name":"jakchires-pants","tpage_name":"museum-pris"}],[216006712,{"idx":56,"name":"jakchires-lightbrownspat","tpage_name":"museum-pris"}],[216006711,{"idx":55,"name":"jakchires-leatherpouch","tpage_name":"museum-pris"}],[216006710,{"idx":54,"name":"jakchires-jacket","tpage_name":"museum-pris"}],[216006709,{"idx":53,"name":"jakchires-horn","tpage_name":"museum-pris"}],[216006708,{"idx":52,"name":"jakchires-hair","tpage_name":"museum-pris"}],[216006707,{"idx":51,"name":"jakchires-glovetop","tpage_name":"museum-pris"}],[216006706,{"idx":50,"name":"jakchires-facert","tpage_name":"museum-pris"}],[216006705,{"idx":49,"name":"jakchires-facelft","tpage_name":"museum-pris"}],[216006704,{"idx":48,"name":"jakchires-eyelid","tpage_name":"museum-pris"}],[216006703,{"idx":47,"name":"jakchires-eyebrow","tpage_name":"museum-pris"}],[216006702,{"idx":46,"name":"jakchires-eye","tpage_name":"museum-pris"}],[216006701,{"idx":45,"name":"jakchires-clips","tpage_name":"museum-pris"}],[216006700,{"idx":44,"name":"jakchires-chestplate","tpage_name":"museum-pris"}],[216006699,{"idx":43,"name":"jakchires-brwnleather","tpage_name":"museum-pris"}],[216006698,{"idx":42,"name":"jakchires-brownstrap","tpage_name":"museum-pris"}],[216006697,{"idx":41,"name":"jakchires-blackstrap","tpage_name":"museum-pris"}],[216006696,{"idx":40,"name":"jakchires-arm","tpage_name":"museum-pris"}],[216006695,{"idx":39,"name":"jakc-wristband-a2","tpage_name":"museum-pris"}],[216006694,{"idx":38,"name":"jakc-wraps","tpage_name":"museum-pris"}],[216006693,{"idx":37,"name":"jakc-waistband2","tpage_name":"museum-pris"}],[216006692,{"idx":36,"name":"jakc-skirt","tpage_name":"museum-pris"}],[216006691,{"idx":35,"name":"jakc-scarfhanging","tpage_name":"museum-pris"}],[216006690,{"idx":34,"name":"jakc-scarf","tpage_name":"museum-pris"}],[216006689,{"idx":33,"name":"jakc-lens","tpage_name":"museum-pris"}],[216006688,{"idx":32,"name":"jakc-gogglemetal","tpage_name":"museum-pris"}],[216006687,{"idx":31,"name":"jakc-chestplate-straps","tpage_name":"museum-pris"}],[216006686,{"idx":30,"name":"jakc-armor","tpage_name":"museum-pris"}],[222887950,{"idx":14,"name":"palcab-lowres-ctyslum-wall-03","tpage_name":"lfacctyb-vis-tfrag"}],[216662050,{"idx":34,"name":"torn-eyelid","tpage_name":"outcast3-pris"}],[215416870,{"idx":38,"name":"fac-tower-02-hitweak","tpage_name":"lfacout-vis-tfrag"}],[222887949,{"idx":13,"name":"palcab-lowres-ctyslum-wall-04","tpage_name":"lfacctyb-vis-tfrag"}],[216662049,{"idx":33,"name":"torn-eye","tpage_name":"outcast3-pris"}],[215416869,{"idx":37,"name":"fac-tower-06","tpage_name":"lfacout-vis-tfrag"}],[222887948,{"idx":12,"name":"palcab-lowres-ctyslum-roof-02","tpage_name":"lfacctyb-vis-tfrag"}],[216662048,{"idx":32,"name":"torn-ear","tpage_name":"outcast3-pris"}],[215416868,{"idx":36,"name":"fac-tower-base-04","tpage_name":"lfacout-vis-tfrag"}],[222887947,{"idx":11,"name":"palcab-lowres-ctyslum-wall-02","tpage_name":"lfacctyb-vis-tfrag"}],[216662047,{"idx":31,"name":"torn-blademetal","tpage_name":"outcast3-pris"}],[215416867,{"idx":35,"name":"facb_bluewindow_selfilluminated","tpage_name":"lfacout-vis-tfrag"}],[222887946,{"idx":10,"name":"palcab-lowres-ctyslum-wall-01","tpage_name":"lfacctyb-vis-tfrag"}],[216662046,{"idx":30,"name":"torn-belt2","tpage_name":"outcast3-pris"}],[215416866,{"idx":34,"name":"facb_redmetal-03","tpage_name":"lfacout-vis-tfrag"}],[222887945,{"idx":9,"name":"palcab-lowres-ctyslum-roof-01","tpage_name":"lfacctyb-vis-tfrag"}],[216662045,{"idx":29,"name":"torn-belt","tpage_name":"outcast3-pris"}],[215416865,{"idx":33,"name":"facb_dec-metal-02","tpage_name":"lfacout-vis-tfrag"}],[214958086,{"idx":6,"name":"rub-rubble-01","tpage_name":"lppatrol-vis-tfrag"}],[214892559,{"idx":15,"name":"grunt-teeth-01","tpage_name":"lppatrol-vis-pris"}],[214892558,{"idx":14,"name":"grunt-gem-01","tpage_name":"lppatrol-vis-pris"}],[221970432,{"idx":0,"name":"gen-01","tpage_name":"precurd-sprite"}],[216989712,{"idx":16,"name":"errocyber-faceflesh","tpage_name":"museum2-pris"}],[214499352,{"idx":24,"name":"onin-toe","tpage_name":"loutro3-pris"}],[216989711,{"idx":15,"name":"errocyber-eyelid","tpage_name":"museum2-pris"}],[214499351,{"idx":23,"name":"onin-teeth","tpage_name":"loutro3-pris"}],[220725250,{"idx":2,"name":"cty-explode-barrel-rim","tpage_name":"lblowcst-tfrag"}],[216989710,{"idx":14,"name":"errocyber-eye","tpage_name":"museum2-pris"}],[214499350,{"idx":22,"name":"onin-skirt","tpage_name":"loutro3-pris"}],[220725249,{"idx":1,"name":"cty-explode-barrel-orange","tpage_name":"lblowcst-tfrag"}],[216989709,{"idx":13,"name":"environment-oldmetal","tpage_name":"museum2-pris"}],[214499349,{"idx":21,"name":"onin-shirt","tpage_name":"loutro3-pris"}],[220725248,{"idx":0,"name":"cty-explode-barrel-cap","tpage_name":"lblowcst-tfrag"}],[216989708,{"idx":12,"name":"daxterteeth","tpage_name":"museum2-pris"}],[214499348,{"idx":20,"name":"onin-scarf","tpage_name":"loutro3-pris"}],[216989707,{"idx":11,"name":"daxternose","tpage_name":"museum2-pris"}],[214499347,{"idx":19,"name":"onin-rings2","tpage_name":"loutro3-pris"}],[216989706,{"idx":10,"name":"daxterheadwidenew","tpage_name":"museum2-pris"}],[214499346,{"idx":18,"name":"onin-rings","tpage_name":"loutro3-pris"}],[216989705,{"idx":9,"name":"daxterfoot-bottom","tpage_name":"museum2-pris"}],[214499345,{"idx":17,"name":"onin-neck","tpage_name":"loutro3-pris"}],[216989704,{"idx":8,"name":"daxterfoot","tpage_name":"museum2-pris"}],[214499344,{"idx":16,"name":"onin-mat","tpage_name":"loutro3-pris"}],[216989703,{"idx":7,"name":"daxterfinger","tpage_name":"museum2-pris"}],[214499343,{"idx":15,"name":"onin-idoleye","tpage_name":"loutro3-pris"}],[218234882,{"idx":2,"name":"time-bubble-orbiter","tpage_name":"lbbsdrp3-sprite"}],[216989702,{"idx":6,"name":"daxterear","tpage_name":"museum2-pris"}],[214499342,{"idx":14,"name":"onin-idol","tpage_name":"loutro3-pris"}],[216989701,{"idx":5,"name":"daxterbodyshort-eix","tpage_name":"museum2-pris"}],[214499341,{"idx":13,"name":"onin-handpalm","tpage_name":"loutro3-pris"}],[218234880,{"idx":0,"name":"time-bubble","tpage_name":"lbbsdrp3-sprite"}],[216989700,{"idx":4,"name":"daxterarm","tpage_name":"museum2-pris"}],[214499340,{"idx":12,"name":"onin-hand","tpage_name":"loutro3-pris"}],[216989699,{"idx":3,"name":"daxter-orange","tpage_name":"museum2-pris"}],[214499339,{"idx":11,"name":"onin-hair","tpage_name":"loutro3-pris"}],[216989698,{"idx":2,"name":"daxter-eyelid","tpage_name":"museum2-pris"}],[214499338,{"idx":10,"name":"onin-finger","tpage_name":"loutro3-pris"}],[216989697,{"idx":1,"name":"bam-hairhilite","tpage_name":"museum2-pris"}],[214499337,{"idx":9,"name":"onin-face","tpage_name":"loutro3-pris"}],[216989696,{"idx":0,"name":"bam-eyelight","tpage_name":"museum2-pris"}],[214499336,{"idx":8,"name":"onin-eyelid","tpage_name":"loutro3-pris"}],[214499335,{"idx":7,"name":"onin-eye","tpage_name":"loutro3-pris"}],[214499334,{"idx":6,"name":"onin-chain","tpage_name":"loutro3-pris"}],[214499333,{"idx":5,"name":"onin-braclet","tpage_name":"loutro3-pris"}],[214499332,{"idx":4,"name":"onin-bowlhead","tpage_name":"loutro3-pris"}],[214499331,{"idx":3,"name":"onin-arm","tpage_name":"loutro3-pris"}],[214499330,{"idx":2,"name":"environment-oldmetal","tpage_name":"loutro3-pris"}],[214499329,{"idx":1,"name":"bam-hairhilite","tpage_name":"loutro3-pris"}],[214499328,{"idx":0,"name":"bam-eyelight","tpage_name":"loutro3-pris"}],[221839360,{"idx":0,"name":"hud-terraformer-head-01","tpage_name":"deswalk-minimap"}],[214368280,{"idx":24,"name":"onin-toe","tpage_name":"loninsim-pris"}],[214368279,{"idx":23,"name":"onin-teeth","tpage_name":"loninsim-pris"}],[214368278,{"idx":22,"name":"onin-skirt","tpage_name":"loninsim-pris"}],[214368277,{"idx":21,"name":"onin-shirt","tpage_name":"loninsim-pris"}],[214368276,{"idx":20,"name":"onin-scarf","tpage_name":"loninsim-pris"}],[214368275,{"idx":19,"name":"onin-rings2","tpage_name":"loninsim-pris"}],[214368274,{"idx":18,"name":"onin-rings","tpage_name":"loninsim-pris"}],[214368273,{"idx":17,"name":"onin-neck","tpage_name":"loninsim-pris"}],[214368272,{"idx":16,"name":"onin-mat","tpage_name":"loninsim-pris"}],[214368271,{"idx":15,"name":"onin-idoleye","tpage_name":"loninsim-pris"}],[218103810,{"idx":2,"name":"time-bubble-orbiter","tpage_name":"lbbsdrp1-sprite"}],[214368270,{"idx":14,"name":"onin-idol","tpage_name":"loninsim-pris"}],[214368269,{"idx":13,"name":"onin-handpalm","tpage_name":"loninsim-pris"}],[218103808,{"idx":0,"name":"time-bubble","tpage_name":"lbbsdrp1-sprite"}],[214368268,{"idx":12,"name":"onin-hand","tpage_name":"loninsim-pris"}],[214368267,{"idx":11,"name":"onin-hair","tpage_name":"loninsim-pris"}],[214368266,{"idx":10,"name":"onin-finger","tpage_name":"loninsim-pris"}],[214368265,{"idx":9,"name":"onin-face","tpage_name":"loninsim-pris"}],[216858624,{"idx":0,"name":"jakc-scarf","tpage_name":"deserta-vis-pris"}],[214368264,{"idx":8,"name":"onin-eyelid","tpage_name":"loninsim-pris"}],[214368263,{"idx":7,"name":"onin-eye","tpage_name":"loninsim-pris"}],[214368262,{"idx":6,"name":"onin-chain","tpage_name":"loninsim-pris"}],[214368261,{"idx":5,"name":"onin-braclet","tpage_name":"loninsim-pris"}],[214368260,{"idx":4,"name":"onin-bowlhead","tpage_name":"loninsim-pris"}],[214368259,{"idx":3,"name":"onin-arm","tpage_name":"loninsim-pris"}],[223805510,{"idx":70,"name":"krew-shirt","tpage_name":"museum3b-pris"}],[213844070,{"idx":102,"name":"king-wristband-small","tpage_name":"lpattack-vis-pris"}],[223805509,{"idx":69,"name":"krew-ring","tpage_name":"museum3b-pris"}],[213844069,{"idx":101,"name":"king-wrap-small","tpage_name":"lpattack-vis-pris"}],[223805508,{"idx":68,"name":"krew-plainmetal","tpage_name":"museum3b-pris"}],[213844068,{"idx":100,"name":"king-vestback-small","tpage_name":"lpattack-vis-pris"}],[223805507,{"idx":67,"name":"krew-pipe-anim","tpage_name":"museum3b-pris"}],[213844067,{"idx":99,"name":"king-vest-small","tpage_name":"lpattack-vis-pris"}],[223805506,{"idx":66,"name":"krew-pipe-02","tpage_name":"museum3b-pris"}],[213844066,{"idx":98,"name":"king-thinstrap-small","tpage_name":"lpattack-vis-pris"}],[223805505,{"idx":65,"name":"krew-pipe-01","tpage_name":"museum3b-pris"}],[213844065,{"idx":97,"name":"king-skirt-small","tpage_name":"lpattack-vis-pris"}],[223805504,{"idx":64,"name":"krew-pants","tpage_name":"museum3b-pris"}],[213844064,{"idx":96,"name":"king-shoebottom-small","tpage_name":"lpattack-vis-pris"}],[223805503,{"idx":63,"name":"krew-mole","tpage_name":"museum3b-pris"}],[213844063,{"idx":95,"name":"king-precursermetal-trimbolt-small","tpage_name":"lpattack-vis-pris"}],[223805502,{"idx":62,"name":"krew-metalattachment","tpage_name":"museum3b-pris"}],[213844062,{"idx":94,"name":"king-precursermetal-trim2-small","tpage_name":"lpattack-vis-pris"}],[223805501,{"idx":61,"name":"krew-loop2","tpage_name":"museum3b-pris"}],[213844061,{"idx":93,"name":"king-precursermetal-plain-small","tpage_name":"lpattack-vis-pris"}],[223805500,{"idx":60,"name":"krew-loop","tpage_name":"museum3b-pris"}],[213844060,{"idx":92,"name":"king-lgblackstrap-small","tpage_name":"lpattack-vis-pris"}],[223805499,{"idx":59,"name":"krew-light","tpage_name":"museum3b-pris"}],[213844059,{"idx":91,"name":"king-leg-small","tpage_name":"lpattack-vis-pris"}],[223805498,{"idx":58,"name":"krew-leatherplain","tpage_name":"museum3b-pris"}],[213844058,{"idx":90,"name":"king-horn-small","tpage_name":"lpattack-vis-pris"}],[223805497,{"idx":57,"name":"krew-lamp","tpage_name":"museum3b-pris"}],[213844057,{"idx":89,"name":"king-hand-small","tpage_name":"lpattack-vis-pris"}],[223805496,{"idx":56,"name":"krew-jewe-smaller","tpage_name":"museum3b-pris"}],[213844056,{"idx":88,"name":"king-hair-small","tpage_name":"lpattack-vis-pris"}],[223805495,{"idx":55,"name":"krew-handle","tpage_name":"museum3b-pris"}],[213844055,{"idx":87,"name":"king-greenmetalplain-small","tpage_name":"lpattack-vis-pris"}],[223805494,{"idx":54,"name":"krew-hand","tpage_name":"museum3b-pris"}],[213844054,{"idx":86,"name":"king-greenmetal-small","tpage_name":"lpattack-vis-pris"}],[223805493,{"idx":53,"name":"krew-goldtooth","tpage_name":"museum3b-pris"}],[213844053,{"idx":85,"name":"king-finger-small","tpage_name":"lpattack-vis-pris"}],[223805492,{"idx":52,"name":"krew-foot","tpage_name":"museum3b-pris"}],[213844052,{"idx":84,"name":"king-face-01-small","tpage_name":"lpattack-vis-pris"}],[223805491,{"idx":51,"name":"krew-fan-01","tpage_name":"museum3b-pris"}],[213844051,{"idx":83,"name":"king-earing-small","tpage_name":"lpattack-vis-pris"}],[223805490,{"idx":50,"name":"krew-facert","tpage_name":"museum3b-pris"}],[213844050,{"idx":82,"name":"king-ear-small","tpage_name":"lpattack-vis-pris"}],[223805489,{"idx":49,"name":"krew-facelft","tpage_name":"museum3b-pris"}],[213844049,{"idx":81,"name":"king-clip-02-small","tpage_name":"lpattack-vis-pris"}],[223805488,{"idx":48,"name":"krew-eyebrow","tpage_name":"museum3b-pris"}],[213844048,{"idx":80,"name":"king-chest-small","tpage_name":"lpattack-vis-pris"}],[223805487,{"idx":47,"name":"krew-chairleather","tpage_name":"museum3b-pris"}],[213844047,{"idx":79,"name":"king-bolt-small","tpage_name":"lpattack-vis-pris"}],[223805486,{"idx":46,"name":"krew-chain","tpage_name":"museum3b-pris"}],[213844046,{"idx":78,"name":"king-blackskirt2-small","tpage_name":"lpattack-vis-pris"}],[223805485,{"idx":45,"name":"krew-bracelet","tpage_name":"museum3b-pris"}],[213844045,{"idx":77,"name":"king-arm-small","tpage_name":"lpattack-vis-pris"}],[223805484,{"idx":44,"name":"krew-belt","tpage_name":"museum3b-pris"}],[213844044,{"idx":76,"name":"tread-interceptor-rhino","tpage_name":"lpattack-vis-pris"}],[223805483,{"idx":43,"name":"krew-arm","tpage_name":"museum3b-pris"}],[213844043,{"idx":75,"name":"neo-wasp-eye","tpage_name":"lpattack-vis-pris"}],[223805482,{"idx":42,"name":"errol-wristband","tpage_name":"museum3b-pris"}],[213844042,{"idx":74,"name":"neo-wasp-dark-brown","tpage_name":"lpattack-vis-pris"}],[223805481,{"idx":41,"name":"errol-teeth","tpage_name":"museum3b-pris"}],[213844041,{"idx":73,"name":"neo-wasp-brown","tpage_name":"lpattack-vis-pris"}],[223805480,{"idx":40,"name":"errol-sleeve-rttop","tpage_name":"museum3b-pris"}],[213844040,{"idx":72,"name":"neo-wasp-body","tpage_name":"lpattack-vis-pris"}],[223805479,{"idx":39,"name":"errol-sleeve-lfttop","tpage_name":"museum3b-pris"}],[213844039,{"idx":71,"name":"neo-wasp-base","tpage_name":"lpattack-vis-pris"}],[223805478,{"idx":38,"name":"errol-sleeve","tpage_name":"museum3b-pris"}],[213844038,{"idx":70,"name":"vehicle-wire-01","tpage_name":"lpattack-vis-pris"}],[223805477,{"idx":37,"name":"errol-shoulder-rtshield","tpage_name":"museum3b-pris"}],[213844037,{"idx":69,"name":"vehicle-wheel-01","tpage_name":"lpattack-vis-pris"}],[223805476,{"idx":36,"name":"errol-shoebottom","tpage_name":"museum3b-pris"}],[213844036,{"idx":68,"name":"vehicle-pipe-01","tpage_name":"lpattack-vis-pris"}],[223805475,{"idx":35,"name":"errol-shoe","tpage_name":"museum3b-pris"}],[213844035,{"idx":67,"name":"vehicle-gun-box-01","tpage_name":"lpattack-vis-pris"}],[223805474,{"idx":34,"name":"errol-scarf","tpage_name":"museum3b-pris"}],[213844034,{"idx":66,"name":"vehicle-gas-tank-01","tpage_name":"lpattack-vis-pris"}],[223805473,{"idx":33,"name":"errol-pipeends","tpage_name":"museum3b-pris"}],[213844033,{"idx":65,"name":"vehicle-exhaust-pipe-01","tpage_name":"lpattack-vis-pris"}],[223805472,{"idx":32,"name":"errol-pantleg","tpage_name":"museum3b-pris"}],[213844032,{"idx":64,"name":"vehicle-cushion-01","tpage_name":"lpattack-vis-pris"}],[223805471,{"idx":31,"name":"errol-mouthpiece","tpage_name":"museum3b-pris"}],[213844031,{"idx":63,"name":"vehicle-chrome-pipe-01","tpage_name":"lpattack-vis-pris"}],[223805470,{"idx":30,"name":"errol-metalrim","tpage_name":"museum3b-pris"}],[213844030,{"idx":62,"name":"vehicle-cap-pin-01","tpage_name":"lpattack-vis-pris"}],[223805469,{"idx":29,"name":"errol-lens","tpage_name":"museum3b-pris"}],[213844029,{"idx":61,"name":"vehicle-brace-pipe-01","tpage_name":"lpattack-vis-pris"}],[223805468,{"idx":28,"name":"errol-kneepadstrap","tpage_name":"museum3b-pris"}],[213844028,{"idx":60,"name":"rhino-wheel-01","tpage_name":"lpattack-vis-pris"}],[223805467,{"idx":27,"name":"errol-kneeguard","tpage_name":"museum3b-pris"}],[213844027,{"idx":59,"name":"rhino-scoop-01","tpage_name":"lpattack-vis-pris"}],[223805466,{"idx":26,"name":"errol-jacket","tpage_name":"museum3b-pris"}],[213844026,{"idx":58,"name":"rhino-rag-01","tpage_name":"lpattack-vis-pris"}],[223805465,{"idx":25,"name":"errol-inseam","tpage_name":"museum3b-pris"}],[213844025,{"idx":57,"name":"rhino-metal-01","tpage_name":"lpattack-vis-pris"}],[223805464,{"idx":24,"name":"errol-headleather","tpage_name":"museum3b-pris"}],[213844024,{"idx":56,"name":"rhino-horn-02","tpage_name":"lpattack-vis-pris"}],[223805463,{"idx":23,"name":"errol-handpalm","tpage_name":"museum3b-pris"}],[213844023,{"idx":55,"name":"rhino-horn-01","tpage_name":"lpattack-vis-pris"}],[223805462,{"idx":22,"name":"errol-handback","tpage_name":"museum3b-pris"}],[213844022,{"idx":54,"name":"rhino-front-02","tpage_name":"lpattack-vis-pris"}],[223805461,{"idx":21,"name":"errol-hair","tpage_name":"museum3b-pris"}],[213844021,{"idx":53,"name":"rhino-front-01","tpage_name":"lpattack-vis-pris"}],[223805448,{"idx":8,"name":"errol-chinstrap","tpage_name":"museum3b-pris"}],[213844008,{"idx":40,"name":"king-iris","tpage_name":"lpattack-vis-pris"}],[213843993,{"idx":25,"name":"intcept-tread01","tpage_name":"lpattack-vis-pris"}],[213843991,{"idx":23,"name":"environment-darkprec","tpage_name":"lpattack-vis-pris"}],[213843990,{"idx":22,"name":"dp-bipedal-toe-01","tpage_name":"lpattack-vis-pris"}],[213843989,{"idx":21,"name":"dp-bipedal-spine-01","tpage_name":"lpattack-vis-pris"}],[213843988,{"idx":20,"name":"dp-bipedal-skin-ribs-01","tpage_name":"lpattack-vis-pris"}],[213843987,{"idx":19,"name":"dp-bipedal-skin-plate-small-01","tpage_name":"lpattack-vis-pris"}],[213843986,{"idx":18,"name":"dp-bipedal-skin-plate-01","tpage_name":"lpattack-vis-pris"}],[213843985,{"idx":17,"name":"dp-bipedal-skin-bulge-02","tpage_name":"lpattack-vis-pris"}],[213843984,{"idx":16,"name":"dp-bipedal-skin-bulge-01","tpage_name":"lpattack-vis-pris"}],[213843983,{"idx":15,"name":"dp-bipedal-power-hose","tpage_name":"lpattack-vis-pris"}],[213843982,{"idx":14,"name":"dp-bipedal-nose-01","tpage_name":"lpattack-vis-pris"}],[213843981,{"idx":13,"name":"dp-bipedal-finger-plate-01","tpage_name":"lpattack-vis-pris"}],[213843980,{"idx":12,"name":"dp-bipedal-eye-01","tpage_name":"lpattack-vis-pris"}],[213843979,{"idx":11,"name":"dp-bipedal-dk-stomach-plate-01","tpage_name":"lpattack-vis-pris"}],[213843978,{"idx":10,"name":"dp-bipedal-dk-sm-plate-01","tpage_name":"lpattack-vis-pris"}],[213843977,{"idx":9,"name":"dp-bipedal-dk-plate-04","tpage_name":"lpattack-vis-pris"}],[213843976,{"idx":8,"name":"dp-bipedal-dk-plate-03","tpage_name":"lpattack-vis-pris"}],[213843975,{"idx":7,"name":"dp-bipedal-dk-plate-02","tpage_name":"lpattack-vis-pris"}],[213843974,{"idx":6,"name":"dp-bipedal-dk-plate-01","tpage_name":"lpattack-vis-pris"}],[213843973,{"idx":5,"name":"dp-bipedal-dk-hose-01","tpage_name":"lpattack-vis-pris"}],[213843972,{"idx":4,"name":"dp-bipedal-chest-01","tpage_name":"lpattack-vis-pris"}],[213843971,{"idx":3,"name":"dp-bipedal-backhand-01","tpage_name":"lpattack-vis-pris"}],[213843970,{"idx":2,"name":"common-transparent","tpage_name":"lpattack-vis-pris"}],[213843969,{"idx":1,"name":"common-black","tpage_name":"lpattack-vis-pris"}],[212860928,{"idx":0,"name":"mech-flame","tpage_name":"ltowera-sprite"}],[212008966,{"idx":6,"name":"hud-turbo-boost-rim-01","tpage_name":"lpattack-minimap"}],[212008965,{"idx":5,"name":"hud-turbo-boost-on-01","tpage_name":"lpattack-minimap"}],[212008964,{"idx":4,"name":"hud-turbo-boost-off-01","tpage_name":"lpattack-minimap"}],[212008963,{"idx":3,"name":"hud-small-vehicle-health-bar-01","tpage_name":"lpattack-minimap"}],[212008962,{"idx":2,"name":"stadiumb-hud-booster-on-01","tpage_name":"lpattack-minimap"}],[212008961,{"idx":1,"name":"stadiumb-hud-booster-off-01","tpage_name":"lpattack-minimap"}],[211550224,{"idx":16,"name":"preship-metal-hull-02","tpage_name":"temp-shrub"}],[211550223,{"idx":15,"name":"preship-metal-trim-02","tpage_name":"temp-shrub"}],[211550222,{"idx":14,"name":"preship-metal-trim-01","tpage_name":"temp-shrub"}],[211550221,{"idx":13,"name":"preship-metal-edge-02","tpage_name":"temp-shrub"}],[211550220,{"idx":12,"name":"preship-metal-edge-01","tpage_name":"temp-shrub"}],[211550218,{"idx":10,"name":"preship-metal-trim-03","tpage_name":"temp-shrub"}],[211550217,{"idx":9,"name":"preship-metal-edge-03","tpage_name":"temp-shrub"}],[211550216,{"idx":8,"name":"preship-metal-hull-01","tpage_name":"temp-shrub"}],[211550215,{"idx":7,"name":"preship-metal-hull-03","tpage_name":"temp-shrub"}],[211550214,{"idx":6,"name":"preship-window-strip-01","tpage_name":"temp-shrub"}],[211550209,{"idx":1,"name":"preship-glass-01","tpage_name":"temp-shrub"}],[211353602,{"idx":2,"name":"tow-eggside-01","tpage_name":"towercst-alpha"}],[211353601,{"idx":1,"name":"tow-eggtop-01","tpage_name":"towercst-alpha"}],[211353600,{"idx":0,"name":"tow-eggcase-01","tpage_name":"towercst-alpha"}],[214958085,{"idx":5,"name":"rub-statue-stone-01","tpage_name":"lppatrol-vis-tfrag"}],[211222545,{"idx":17,"name":"tow-wall-tentacle-02","tpage_name":"towercst-tfrag"}],[214958084,{"idx":4,"name":"lt-eco-vent-side-01","tpage_name":"lppatrol-vis-tfrag"}],[211222544,{"idx":16,"name":"rail-env-wall-01","tpage_name":"towercst-tfrag"}],[214958083,{"idx":3,"name":"lt-eco-vent-blue-01","tpage_name":"lppatrol-vis-tfrag"}],[211222543,{"idx":15,"name":"tow-plat-side","tpage_name":"towercst-tfrag"}],[214958082,{"idx":2,"name":"dk-eco-vent-side-01","tpage_name":"lppatrol-vis-tfrag"}],[211222542,{"idx":14,"name":"tow-base-ground","tpage_name":"towercst-tfrag"}],[214958081,{"idx":1,"name":"dk-eco-vent-glow-01","tpage_name":"lppatrol-vis-tfrag"}],[211222541,{"idx":13,"name":"tow-pup-detail-01","tpage_name":"towercst-tfrag"}],[214958080,{"idx":0,"name":"environment-darkprec","tpage_name":"lppatrol-vis-tfrag"}],[211222540,{"idx":12,"name":"tow-pup-metal-01","tpage_name":"towercst-tfrag"}],[211222539,{"idx":11,"name":"tow-pup-skin-01","tpage_name":"towercst-tfrag"}],[211222538,{"idx":10,"name":"tow-pupeyes-01","tpage_name":"towercst-tfrag"}],[211222537,{"idx":9,"name":"tow-eggside-01","tpage_name":"towercst-tfrag"}],[211222536,{"idx":8,"name":"mhcity-skin-ground-01","tpage_name":"towercst-tfrag"}],[211222535,{"idx":7,"name":"tow-eggtop-01","tpage_name":"towercst-tfrag"}],[211222534,{"idx":6,"name":"tow-egg-group-base","tpage_name":"towercst-tfrag"}],[211222533,{"idx":5,"name":"tow-blackhole","tpage_name":"towercst-tfrag"}],[211222532,{"idx":4,"name":"tow-basebone-01","tpage_name":"towercst-tfrag"}],[211222531,{"idx":3,"name":"tow-groundpod","tpage_name":"towercst-tfrag"}],[211222530,{"idx":2,"name":"tow-eggpod-01","tpage_name":"towercst-tfrag"}],[211222529,{"idx":1,"name":"tow-wall-supports","tpage_name":"towercst-tfrag"}],[211222528,{"idx":0,"name":"tow-baserock","tpage_name":"towercst-tfrag"}],[211025924,{"idx":4,"name":"wascitya-airlock-door","tpage_name":"desjump-tfrag"}],[211025923,{"idx":3,"name":"wascity-metal-door-01","tpage_name":"desjump-tfrag"}],[211025922,{"idx":2,"name":"wascity-outerwall-metal-c","tpage_name":"desjump-tfrag"}],[211025920,{"idx":0,"name":"wascitya-airlock-metal-bits","tpage_name":"desjump-tfrag"}],[209518592,{"idx":0,"name":"hud-darkeco-tower-egg","tpage_name":"lctydest-minimap"}],[208928777,{"idx":9,"name":"terraformer-metal-08","tpage_name":"precurd-vis-pris2"}],[208928776,{"idx":8,"name":"terraformer-metal-07","tpage_name":"precurd-vis-pris2"}],[208928774,{"idx":6,"name":"terraformer-metal-04","tpage_name":"precurd-vis-pris2"}],[208928772,{"idx":4,"name":"terraformer-metal-02","tpage_name":"precurd-vis-pris2"}],[208928770,{"idx":2,"name":"terraformer-footpipes-01","tpage_name":"precurd-vis-pris2"}],[208928769,{"idx":1,"name":"terraformer-bodyside-top","tpage_name":"precurd-vis-pris2"}],[208928768,{"idx":0,"name":"terraformer-bodyside-bottom","tpage_name":"precurd-vis-pris2"}],[208470026,{"idx":10,"name":"time-bubble-orbiter","tpage_name":"powergd-sprite"}],[208470025,{"idx":9,"name":"whack-scoreboard-9","tpage_name":"powergd-sprite"}],[208470024,{"idx":8,"name":"whack-scoreboard-8","tpage_name":"powergd-sprite"}],[208470023,{"idx":7,"name":"whack-scoreboard-7","tpage_name":"powergd-sprite"}],[208470022,{"idx":6,"name":"whack-scoreboard-6","tpage_name":"powergd-sprite"}],[208470021,{"idx":5,"name":"whack-scoreboard-5","tpage_name":"powergd-sprite"}],[217055241,{"idx":9,"name":"jinx-boottoe","tpage_name":"museum2-pris2"}],[208338981,{"idx":37,"name":"errolcyber-teeth","tpage_name":"deserrol-pris"}],[217055240,{"idx":8,"name":"jinx-blademetal","tpage_name":"museum2-pris2"}],[208338980,{"idx":36,"name":"errolcyber-spine","tpage_name":"deserrol-pris"}],[217055239,{"idx":7,"name":"jinx-belt","tpage_name":"museum2-pris2"}],[208338979,{"idx":35,"name":"errolcyber-rubberpipe-light","tpage_name":"deserrol-pris"}],[217055238,{"idx":6,"name":"jinx-arm","tpage_name":"museum2-pris2"}],[208338978,{"idx":34,"name":"errolcyber-rubberpipe","tpage_name":"deserrol-pris"}],[217055237,{"idx":5,"name":"environment-oldmetal","tpage_name":"museum2-pris2"}],[208338977,{"idx":33,"name":"errolcyber-roboeye","tpage_name":"deserrol-pris"}],[217055236,{"idx":4,"name":"daxterteeth","tpage_name":"museum2-pris2"}],[208338976,{"idx":32,"name":"errolcyber-redmetal-03","tpage_name":"deserrol-pris"}],[217055235,{"idx":3,"name":"daxter-furhilite","tpage_name":"museum2-pris2"}],[208338975,{"idx":31,"name":"errolcyber-redmetal-02","tpage_name":"deserrol-pris"}],[217055234,{"idx":2,"name":"daxter-eyelid","tpage_name":"museum2-pris2"}],[208338974,{"idx":30,"name":"errolcyber-redmetal-01","tpage_name":"deserrol-pris"}],[217055233,{"idx":1,"name":"bam-hairhilite","tpage_name":"museum2-pris2"}],[208338973,{"idx":29,"name":"errolcyber-pipes-03","tpage_name":"deserrol-pris"}],[217055232,{"idx":0,"name":"bam-eyelight","tpage_name":"museum2-pris2"}],[208338972,{"idx":28,"name":"errolcyber-pipes-02","tpage_name":"deserrol-pris"}],[208338971,{"idx":27,"name":"errolcyber-pipes-01","tpage_name":"deserrol-pris"}],[208338970,{"idx":26,"name":"errolcyber-metalgold","tpage_name":"deserrol-pris"}],[208338969,{"idx":25,"name":"errolcyber-metaleyelid","tpage_name":"deserrol-pris"}],[208338968,{"idx":24,"name":"errolcyber-jointpipe","tpage_name":"deserrol-pris"}],[208338967,{"idx":23,"name":"errolcyber-insidewires","tpage_name":"deserrol-pris"}],[208338966,{"idx":22,"name":"errolcyber-insidemouth","tpage_name":"deserrol-pris"}],[208338965,{"idx":21,"name":"errolcyber-head-02","tpage_name":"deserrol-pris"}],[214564864,{"idx":0,"name":"preship-metal-hull-03","tpage_name":"loutro3-shrub"}],[208338964,{"idx":20,"name":"errolcyber-head-01","tpage_name":"deserrol-pris"}],[208338963,{"idx":19,"name":"errolcyber-hair","tpage_name":"deserrol-pris"}],[208338962,{"idx":18,"name":"errolcyber-greymetal-02","tpage_name":"deserrol-pris"}],[208338961,{"idx":17,"name":"errolcyber-greymetal","tpage_name":"deserrol-pris"}],[208338960,{"idx":16,"name":"errolcyber-greyknobs","tpage_name":"deserrol-pris"}],[208338959,{"idx":15,"name":"errolcyber-glovepalm","tpage_name":"deserrol-pris"}],[208338958,{"idx":14,"name":"errolcyber-fingers","tpage_name":"deserrol-pris"}],[208338957,{"idx":13,"name":"errolcyber-earcup","tpage_name":"deserrol-pris"}],[208338956,{"idx":12,"name":"errolcyber-dirtymetal","tpage_name":"deserrol-pris"}],[208338955,{"idx":11,"name":"errolcyber-chestplate","tpage_name":"deserrol-pris"}],[208338954,{"idx":10,"name":"errolcyber-bluewrap","tpage_name":"deserrol-pris"}],[208338953,{"idx":9,"name":"errolcyber-bluemetal-01","tpage_name":"deserrol-pris"}],[208338952,{"idx":8,"name":"errolcyber-bluedome","tpage_name":"deserrol-pris"}],[208338951,{"idx":7,"name":"errolcyber-bigshoulder","tpage_name":"deserrol-pris"}],[208338950,{"idx":6,"name":"errolcyber-bighand-01","tpage_name":"deserrol-pris"}],[208338949,{"idx":5,"name":"errocyber-faceflesh","tpage_name":"deserrol-pris"}],[208338948,{"idx":4,"name":"errocyber-eyelid","tpage_name":"deserrol-pris"}],[208338947,{"idx":3,"name":"errocyber-eye","tpage_name":"deserrol-pris"}],[208338946,{"idx":2,"name":"environment-oldmetal","tpage_name":"deserrol-pris"}],[208338945,{"idx":1,"name":"bam-hairhilite","tpage_name":"deserrol-pris"}],[208338944,{"idx":0,"name":"bam-eyelight","tpage_name":"deserrol-pris"}],[207880193,{"idx":1,"name":"terraformer-cpitwindows-02","tpage_name":"desboss1-water"}],[207814663,{"idx":7,"name":"rc-mnstr-target-03-silver","tpage_name":"lgunrnc-pris"}],[207814662,{"idx":6,"name":"rc-mnstr-target-04","tpage_name":"lgunrnc-pris"}],[207814661,{"idx":5,"name":"rc-mnstr-target-03","tpage_name":"lgunrnc-pris"}],[207814660,{"idx":4,"name":"rc-mnstr-target-02","tpage_name":"lgunrnc-pris"}],[207814659,{"idx":3,"name":"rc-mnstr-target-01","tpage_name":"lgunrnc-pris"}],[207814658,{"idx":2,"name":"kg-target-side-01","tpage_name":"lgunrnc-pris"}],[207814657,{"idx":1,"name":"gun-ratchet-target-01","tpage_name":"lgunrnc-pris"}],[206241800,{"idx":8,"name":"mhcity-grind-strand-01","tpage_name":"lctydest-tfrag"}],[206241798,{"idx":6,"name":"mhcity-goo-base","tpage_name":"lctydest-tfrag"}],[205848577,{"idx":1,"name":"mhcityb-base-goo-01-dest","tpage_name":"lmhcityb-vis-tfrag"}],[205848576,{"idx":0,"name":"mhcityb-base-goo-01","tpage_name":"lmhcityb-vis-tfrag"}],[206962700,{"idx":12,"name":"citywide-palace-support-03","tpage_name":"lfreeout-tfrag"}],[205717520,{"idx":16,"name":"kg-target-c-front","tpage_name":"lgunnorm-pris"}],[206962699,{"idx":11,"name":"citywide-wall-greybolts","tpage_name":"lfreeout-tfrag"}],[205717519,{"idx":15,"name":"bomb-target-01","tpage_name":"lgunnorm-pris"}],[206962698,{"idx":10,"name":"citywide-wall-boltedmetal","tpage_name":"lfreeout-tfrag"}],[205717518,{"idx":14,"name":"kg-target-side-01","tpage_name":"lgunnorm-pris"}],[206962697,{"idx":9,"name":"citywide-wall-orange-plain","tpage_name":"lfreeout-tfrag"}],[205717517,{"idx":13,"name":"kg-target-gun-05","tpage_name":"lgunnorm-pris"}],[206962696,{"idx":8,"name":"citywide-wall-frame","tpage_name":"lfreeout-tfrag"}],[205717516,{"idx":12,"name":"kg-target-gun-04","tpage_name":"lgunnorm-pris"}],[206962695,{"idx":7,"name":"citywide-wall-mainmetal","tpage_name":"lfreeout-tfrag"}],[205717515,{"idx":11,"name":"kg-target-gun-02","tpage_name":"lgunnorm-pris"}],[203292673,{"idx":1,"name":"fan-blade","tpage_name":"factorya-sprite"}],[203292672,{"idx":0,"name":"dust-sparkle","tpage_name":"factorya-sprite"}],[203096106,{"idx":42,"name":"widow-bomb-thrust","tpage_name":"lctyass-pris"}],[203096105,{"idx":41,"name":"widow-bomb-glow","tpage_name":"lctyass-pris"}],[203096104,{"idx":40,"name":"widow-bomb","tpage_name":"lctyass-pris"}],[203096103,{"idx":39,"name":"citn-allsuede","tpage_name":"lctyass-pris"}],[203096102,{"idx":38,"name":"citn-allshoebottom","tpage_name":"lctyass-pris"}],[203096101,{"idx":37,"name":"citn-allleye","tpage_name":"lctyass-pris"}],[208076820,{"idx":20,"name":"terraformer-bluelight","tpage_name":"desboss2-pris2"}],[203096100,{"idx":36,"name":"citn-allleatherwrinkled","tpage_name":"lctyass-pris"}],[208076819,{"idx":19,"name":"terraformer-tank-01","tpage_name":"desboss2-pris2"}],[203096099,{"idx":35,"name":"citn-allleatherstrap","tpage_name":"lctyass-pris"}],[208076818,{"idx":18,"name":"terraformer-organic-05","tpage_name":"desboss2-pris2"}],[203096098,{"idx":34,"name":"citn-allleather-shoulder","tpage_name":"lctyass-pris"}],[208076817,{"idx":17,"name":"terraformer-organic-04","tpage_name":"desboss2-pris2"}],[203096097,{"idx":33,"name":"citn-allleather-edge","tpage_name":"lctyass-pris"}],[213057536,{"idx":0,"name":"mech-flame","tpage_name":"lprecurc-sprite"}],[208076816,{"idx":16,"name":"terraformer-organic-03","tpage_name":"desboss2-pris2"}],[203096096,{"idx":32,"name":"citn-allleather","tpage_name":"lctyass-pris"}],[208076815,{"idx":15,"name":"terraformer-organic-02","tpage_name":"desboss2-pris2"}],[203096095,{"idx":31,"name":"citn-alllcotton-wrinkled","tpage_name":"lctyass-pris"}],[208076814,{"idx":14,"name":"terraformer-organic-01","tpage_name":"desboss2-pris2"}],[203096094,{"idx":30,"name":"citn-alllcotton","tpage_name":"lctyass-pris"}],[208076813,{"idx":13,"name":"terraformer-minestrips-01","tpage_name":"desboss2-pris2"}],[203096093,{"idx":29,"name":"citn-allflesh","tpage_name":"lctyass-pris"}],[208076812,{"idx":12,"name":"terraformer-metal-11","tpage_name":"desboss2-pris2"}],[203096092,{"idx":28,"name":"citn-alleyebrow","tpage_name":"lctyass-pris"}],[208076811,{"idx":11,"name":"terraformer-metal-10","tpage_name":"desboss2-pris2"}],[203096091,{"idx":27,"name":"citn-allbuckel","tpage_name":"lctyass-pris"}],[208076810,{"idx":10,"name":"terraformer-metal-09","tpage_name":"desboss2-pris2"}],[203096090,{"idx":26,"name":"citn-1-pants","tpage_name":"lctyass-pris"}],[208076809,{"idx":9,"name":"terraformer-metal-08","tpage_name":"desboss2-pris2"}],[203096089,{"idx":25,"name":"citfat-hairflat","tpage_name":"lctyass-pris"}],[208076808,{"idx":8,"name":"terraformer-metal-07","tpage_name":"desboss2-pris2"}],[203096088,{"idx":24,"name":"bam-hairhilite","tpage_name":"lctyass-pris"}],[208076807,{"idx":7,"name":"terraformer-metal-05","tpage_name":"desboss2-pris2"}],[203096087,{"idx":23,"name":"roboguard-headshield","tpage_name":"lctyass-pris"}],[202571784,{"idx":8,"name":"rail-pipe-02","tpage_name":"raila-tfrag"}],[202571783,{"idx":7,"name":"rail-gray-metal-01","tpage_name":"raila-tfrag"}],[202571782,{"idx":6,"name":"comb-redmarker","tpage_name":"raila-tfrag"}],[202571781,{"idx":5,"name":"rail-cord-01","tpage_name":"raila-tfrag"}],[202571780,{"idx":4,"name":"rail-pipe-03","tpage_name":"raila-tfrag"}],[202571779,{"idx":3,"name":"rail-edge-01","tpage_name":"raila-tfrag"}],[202571778,{"idx":2,"name":"rail-pipe-01","tpage_name":"raila-tfrag"}],[202309633,{"idx":1,"name":"hud-sniper-button-red-01","tpage_name":"lctysnpr-minimap"}],[202309632,{"idx":0,"name":"hud-sniper-button-green-01","tpage_name":"lctysnpr-minimap"}],[216072192,{"idx":0,"name":"ashelin-beltbuckle","tpage_name":"museum-pris2"}],[201130032,{"idx":48,"name":"prec-tess-nose","tpage_name":"loutro2-pris"}],[201130031,{"idx":47,"name":"prec-tess-eyelid","tpage_name":"loutro2-pris"}],[201130030,{"idx":46,"name":"prec-tess-eye","tpage_name":"loutro2-pris"}],[214827009,{"idx":1,"name":"flamingstick","tpage_name":"factoryc-sprite"}],[201130029,{"idx":45,"name":"prec-tess-necktrans","tpage_name":"loutro2-pris"}],[214827008,{"idx":0,"name":"explosion-wave","tpage_name":"factoryc-sprite"}],[201130028,{"idx":44,"name":"prec-tess-face","tpage_name":"loutro2-pris"}],[201130027,{"idx":43,"name":"prec-neck","tpage_name":"loutro2-pris"}],[201130026,{"idx":42,"name":"daxter-eyelid","tpage_name":"loutro2-pris"}],[201130025,{"idx":41,"name":"prec-veger-sleeve","tpage_name":"loutro2-pris"}],[201130024,{"idx":40,"name":"daxtertuft","tpage_name":"loutro2-pris"}],[201130023,{"idx":39,"name":"daxterteeth","tpage_name":"loutro2-pris"}],[201130022,{"idx":38,"name":"daxternose","tpage_name":"loutro2-pris"}],[201130021,{"idx":37,"name":"daxterlense","tpage_name":"loutro2-pris"}],[201130020,{"idx":36,"name":"daxterhelmetplain","tpage_name":"loutro2-pris"}],[201130019,{"idx":35,"name":"daxterheadwidenew","tpage_name":"loutro2-pris"}],[201130018,{"idx":34,"name":"daxtergoggles","tpage_name":"loutro2-pris"}],[201130017,{"idx":33,"name":"daxterbolt","tpage_name":"loutro2-pris"}],[201130016,{"idx":32,"name":"daxter-pants","tpage_name":"loutro2-pris"}],[201130015,{"idx":31,"name":"daxter-orange","tpage_name":"loutro2-pris"}],[201130014,{"idx":30,"name":"bam-eyelight","tpage_name":"loutro2-pris"}],[201130013,{"idx":29,"name":"prec-staff-02","tpage_name":"loutro2-pris"}],[209846272,{"idx":0,"name":"cty-roboscreen-dest","tpage_name":"foresta-warp"}],[201130012,{"idx":28,"name":"prec-leader-headshield","tpage_name":"loutro2-pris"}],[207355911,{"idx":7,"name":"grunt-vector-trail-01","tpage_name":"powergd-water"}],[201130011,{"idx":27,"name":"prec-leader-foreheadshield","tpage_name":"loutro2-pris"}],[207355910,{"idx":6,"name":"pow-pow-ring-red-07","tpage_name":"powergd-water"}],[201130010,{"idx":26,"name":"prec-handpalm","tpage_name":"loutro2-pris"}],[207355909,{"idx":5,"name":"pow-pow-ring-red-06","tpage_name":"powergd-water"}],[201130009,{"idx":25,"name":"prec-hand-back","tpage_name":"loutro2-pris"}],[207355908,{"idx":4,"name":"pow-pow-ring-red-05","tpage_name":"powergd-water"}],[201130008,{"idx":24,"name":"prec-dumb-sleeve","tpage_name":"loutro2-pris"}],[207355907,{"idx":3,"name":"pow-pow-ring-red-04","tpage_name":"powergd-water"}],[201130007,{"idx":23,"name":"prec-dumb-shirt","tpage_name":"loutro2-pris"}],[207355906,{"idx":2,"name":"pow-pow-ring-red-03","tpage_name":"powergd-water"}],[201130006,{"idx":22,"name":"prec-dumb-pants","tpage_name":"loutro2-pris"}],[207355905,{"idx":1,"name":"pow-pow-ring-red-02","tpage_name":"powergd-water"}],[201130005,{"idx":21,"name":"prec-dumb-helmet","tpage_name":"loutro2-pris"}],[207355904,{"idx":0,"name":"pow-pow-ring-red-01","tpage_name":"powergd-water"}],[201130004,{"idx":20,"name":"prec-tess-sleeve","tpage_name":"loutro2-pris"}],[201130003,{"idx":19,"name":"prec-tess-shirtstraps","tpage_name":"loutro2-pris"}],[201130002,{"idx":18,"name":"prec-tess-shirt","tpage_name":"loutro2-pris"}],[201130001,{"idx":17,"name":"prec-tess-scarf","tpage_name":"loutro2-pris"}],[201130000,{"idx":16,"name":"prec-tess-pantsfront","tpage_name":"loutro2-pris"}],[201129999,{"idx":15,"name":"prec-tess-pantscuff","tpage_name":"loutro2-pris"}],[201129998,{"idx":14,"name":"prec-tess-pantsback","tpage_name":"loutro2-pris"}],[201129997,{"idx":13,"name":"prec-tess-headband","tpage_name":"loutro2-pris"}],[201129996,{"idx":12,"name":"prec-tess-hair","tpage_name":"loutro2-pris"}],[201129995,{"idx":11,"name":"prec-tess-glove","tpage_name":"loutro2-pris"}],[201129986,{"idx":2,"name":"daxterarm","tpage_name":"loutro2-pris"}],[201129985,{"idx":1,"name":"daxter-furhilite","tpage_name":"loutro2-pris"}],[201129984,{"idx":0,"name":"bam-hairhilite","tpage_name":"loutro2-pris"}],[214892557,{"idx":13,"name":"grunt-skin-03","tpage_name":"lppatrol-vis-pris"}],[198705217,{"idx":65,"name":"torn-vest","tpage_name":"lblowcst-pris"}],[214892556,{"idx":12,"name":"grunt-skin-02","tpage_name":"lppatrol-vis-pris"}],[198705216,{"idx":64,"name":"torn-shoe-02","tpage_name":"lblowcst-pris"}],[214892555,{"idx":11,"name":"grunt-skin-01","tpage_name":"lppatrol-vis-pris"}],[198705215,{"idx":63,"name":"torn-shoe","tpage_name":"lblowcst-pris"}],[214892554,{"idx":10,"name":"grunt-metal-01","tpage_name":"lppatrol-vis-pris"}],[198705214,{"idx":62,"name":"torn-scarf","tpage_name":"lblowcst-pris"}],[214892553,{"idx":9,"name":"grunt-hose","tpage_name":"lppatrol-vis-pris"}],[198705213,{"idx":61,"name":"torn-pipe","tpage_name":"lblowcst-pris"}],[217382912,{"idx":0,"name":"fora-dirt","tpage_name":"forestx-vis-alpha"}],[214892552,{"idx":8,"name":"grunt-eye-01","tpage_name":"lppatrol-vis-pris"}],[198705212,{"idx":60,"name":"torn-metal2","tpage_name":"lblowcst-pris"}],[214892551,{"idx":7,"name":"dm_mine-spider-spawn-small-tube","tpage_name":"lppatrol-vis-pris"}],[198705211,{"idx":59,"name":"torn-legshield","tpage_name":"lblowcst-pris"}],[214892550,{"idx":6,"name":"dm_mine-spider-spawn-hole","tpage_name":"lppatrol-vis-pris"}],[198705210,{"idx":58,"name":"torn-handle-01","tpage_name":"lblowcst-pris"}],[214892549,{"idx":5,"name":"dm_mine-spider-spawn","tpage_name":"lppatrol-vis-pris"}],[198705209,{"idx":57,"name":"torn-hair-02","tpage_name":"lblowcst-pris"}],[214892548,{"idx":4,"name":"environment-darkprec","tpage_name":"lppatrol-vis-pris"}],[198705208,{"idx":56,"name":"torn-hair-01","tpage_name":"lblowcst-pris"}],[214892547,{"idx":3,"name":"dm-mspider-tubes-01","tpage_name":"lppatrol-vis-pris"}],[198705207,{"idx":55,"name":"torn-gunbarrel-02","tpage_name":"lblowcst-pris"}],[214892546,{"idx":2,"name":"dm-mspider-purplesac","tpage_name":"lppatrol-vis-pris"}],[198705206,{"idx":54,"name":"torn-gunbarrel","tpage_name":"lblowcst-pris"}],[214892545,{"idx":1,"name":"dm-mspider-plate-01","tpage_name":"lppatrol-vis-pris"}],[198705205,{"idx":53,"name":"torn-footleather","tpage_name":"lblowcst-pris"}],[214892544,{"idx":0,"name":"dm-mspider-pipe","tpage_name":"lppatrol-vis-pris"}],[198705204,{"idx":52,"name":"torn-finger","tpage_name":"lblowcst-pris"}],[198705203,{"idx":51,"name":"torn-face-right","tpage_name":"lblowcst-pris"}],[198705202,{"idx":50,"name":"torn-face","tpage_name":"lblowcst-pris"}],[198705201,{"idx":49,"name":"torn-eye-lorez","tpage_name":"lblowcst-pris"}],[198705200,{"idx":48,"name":"torn-ear","tpage_name":"lblowcst-pris"}],[198705199,{"idx":47,"name":"torn-belt2","tpage_name":"lblowcst-pris"}],[198705198,{"idx":46,"name":"torn-belt","tpage_name":"lblowcst-pris"}],[198705197,{"idx":45,"name":"torn-armor","tpage_name":"lblowcst-pris"}],[198705196,{"idx":44,"name":"torn-armlft","tpage_name":"lblowcst-pris"}],[198705195,{"idx":43,"name":"charHOLD","tpage_name":"lblowcst-pris"}],[198705194,{"idx":42,"name":"bam-hairhilite","tpage_name":"lblowcst-pris"}],[198705193,{"idx":41,"name":"sig2-undergarments","tpage_name":"lblowcst-pris"}],[198705192,{"idx":40,"name":"sig2-skirts-03","tpage_name":"lblowcst-pris"}],[198705191,{"idx":39,"name":"sig2-skirts","tpage_name":"lblowcst-pris"}],[209911810,{"idx":2,"name":"artifact-plain-01","tpage_name":"deschase-tfrag"}],[198705190,{"idx":38,"name":"sig2-shoulderarmor","tpage_name":"lblowcst-pris"}],[209911809,{"idx":1,"name":"artifact-blue-glow-01","tpage_name":"deschase-tfrag"}],[198705189,{"idx":37,"name":"sig2-shoetop","tpage_name":"lblowcst-pris"}],[209911808,{"idx":0,"name":"artifact-dec-01","tpage_name":"deschase-tfrag"}],[198705188,{"idx":36,"name":"sig2-shoebottom","tpage_name":"lblowcst-pris"}],[198705187,{"idx":35,"name":"sig2-sac","tpage_name":"lblowcst-pris"}],[198705186,{"idx":34,"name":"sig2-metal-dirty","tpage_name":"lblowcst-pris"}],[208666625,{"idx":1,"name":"hud-gladiator","tpage_name":"deschase-minimap"}],[198705185,{"idx":33,"name":"sig2-metal-01","tpage_name":"lblowcst-pris"}],[208666624,{"idx":0,"name":"hud-marauder-vehicle","tpage_name":"deschase-minimap"}],[198705184,{"idx":32,"name":"sig2-lens","tpage_name":"lblowcst-pris"}],[198705183,{"idx":31,"name":"sig2-horn","tpage_name":"lblowcst-pris"}],[198705182,{"idx":30,"name":"sig2-headgear","tpage_name":"lblowcst-pris"}],[198705181,{"idx":29,"name":"sig2-gun-05","tpage_name":"lblowcst-pris"}],[198705180,{"idx":28,"name":"sig2-gun-04","tpage_name":"lblowcst-pris"}],[198705179,{"idx":27,"name":"sig2-gun-03","tpage_name":"lblowcst-pris"}],[198705178,{"idx":26,"name":"sig2-gun-02","tpage_name":"lblowcst-pris"}],[198705177,{"idx":25,"name":"sig2-gun-01","tpage_name":"lblowcst-pris"}],[198705176,{"idx":24,"name":"sig2-glovetop","tpage_name":"lblowcst-pris"}],[198705175,{"idx":23,"name":"sig2-glove","tpage_name":"lblowcst-pris"}],[198705174,{"idx":22,"name":"sig2-gem-01","tpage_name":"lblowcst-pris"}],[198705173,{"idx":21,"name":"sig2-flask","tpage_name":"lblowcst-pris"}],[198705172,{"idx":20,"name":"sig2-facert","tpage_name":"lblowcst-pris"}],[198705171,{"idx":19,"name":"sig2-faceleft","tpage_name":"lblowcst-pris"}],[198705170,{"idx":18,"name":"sig2-eyestillsmall","tpage_name":"lblowcst-pris"}],[198705169,{"idx":17,"name":"sig2-belt","tpage_name":"lblowcst-pris"}],[198705168,{"idx":16,"name":"sig-skirts-02","tpage_name":"lblowcst-pris"}],[198705167,{"idx":15,"name":"jakbsmall-glovetop","tpage_name":"lblowcst-pris"}],[198705166,{"idx":14,"name":"jakbsmall-finger","tpage_name":"lblowcst-pris"}],[198705165,{"idx":13,"name":"jakbsmall-blackstrap","tpage_name":"lblowcst-pris"}],[198705164,{"idx":12,"name":"environment-oldmetal","tpage_name":"lblowcst-pris"}],[198705163,{"idx":11,"name":"citn-allleye","tpage_name":"lblowcst-pris"}],[198705162,{"idx":10,"name":"citn-allleatherwrinkled","tpage_name":"lblowcst-pris"}],[198705161,{"idx":9,"name":"citn-allleatherstrap","tpage_name":"lblowcst-pris"}],[201195520,{"idx":0,"name":"sig-flatfangs","tpage_name":"loutro2-water"}],[198705160,{"idx":8,"name":"citn-allleather","tpage_name":"lblowcst-pris"}],[198705159,{"idx":7,"name":"citn-alllcotton","tpage_name":"lblowcst-pris"}],[198705158,{"idx":6,"name":"citn-allflesh","tpage_name":"lblowcst-pris"}],[198705157,{"idx":5,"name":"citn-alleyebrow","tpage_name":"lblowcst-pris"}],[198705156,{"idx":4,"name":"citn-allbuckel","tpage_name":"lblowcst-pris"}],[198705155,{"idx":3,"name":"citn-1-pants","tpage_name":"lblowcst-pris"}],[198705154,{"idx":2,"name":"citfat-hairflat","tpage_name":"lblowcst-pris"}],[198705153,{"idx":1,"name":"cguardgame-scarf","tpage_name":"lblowcst-pris"}],[198705152,{"idx":0,"name":"bam-eyelight","tpage_name":"lblowcst-pris"}],[201129994,{"idx":10,"name":"prec-tess-emblem","tpage_name":"loutro2-pris"}],[198639634,{"idx":18,"name":"tpl-wing03","tpage_name":"hanga-vis-pris"}],[201129993,{"idx":9,"name":"prec-tess-belt2","tpage_name":"loutro2-pris"}],[198639633,{"idx":17,"name":"tpl-wing01","tpage_name":"hanga-vis-pris"}],[201129992,{"idx":8,"name":"prec-tess-belt","tpage_name":"loutro2-pris"}],[198639632,{"idx":16,"name":"tpl-rut01","tpage_name":"hanga-vis-pris"}],[201129991,{"idx":7,"name":"daxterfoot-bottom","tpage_name":"loutro2-pris"}],[198639631,{"idx":15,"name":"tpl-glider-wood03","tpage_name":"hanga-vis-pris"}],[201129990,{"idx":6,"name":"daxterfoot","tpage_name":"loutro2-pris"}],[198639630,{"idx":14,"name":"tpl-glider-precursor01","tpage_name":"hanga-vis-pris"}],[201129989,{"idx":5,"name":"daxterfinger","tpage_name":"loutro2-pris"}],[198639629,{"idx":13,"name":"tpl-glider-metal02","tpage_name":"hanga-vis-pris"}],[201129988,{"idx":4,"name":"daxterear","tpage_name":"loutro2-pris"}],[198639628,{"idx":12,"name":"tpl-glider-metal01","tpage_name":"hanga-vis-pris"}],[201129987,{"idx":3,"name":"daxterbodyshort-eix","tpage_name":"loutro2-pris"}],[198639627,{"idx":11,"name":"tpl-glider-grip01","tpage_name":"hanga-vis-pris"}],[198639618,{"idx":2,"name":"des-glider-ring-yellow","tpage_name":"hanga-vis-pris"}],[198639617,{"idx":1,"name":"des-glider-ring-deco","tpage_name":"hanga-vis-pris"}],[198639616,{"idx":0,"name":"des-burn-precursor-01","tpage_name":"hanga-vis-pris"}],[198574139,{"idx":59,"name":"des-low-sand-green-03","tpage_name":"hanga-vis-tfrag"}],[216006658,{"idx":2,"name":"environment-oldmetal","tpage_name":"museum-pris"}],[198574138,{"idx":58,"name":"des-low-sand-green-01","tpage_name":"hanga-vis-tfrag"}],[216006657,{"idx":1,"name":"bam-hairhilite","tpage_name":"museum-pris"}],[198574137,{"idx":57,"name":"des-low-sand-grey-02","tpage_name":"hanga-vis-tfrag"}],[216006656,{"idx":0,"name":"bam-eyelight","tpage_name":"museum-pris"}],[198574136,{"idx":56,"name":"des-low-sand-green-02","tpage_name":"hanga-vis-tfrag"}],[198574135,{"idx":55,"name":"des-low-sand-grey-01","tpage_name":"hanga-vis-tfrag"}],[198574134,{"idx":54,"name":"des-low-sand-brown-02","tpage_name":"hanga-vis-tfrag"}],[198574133,{"idx":53,"name":"des-low-sand-brown-01","tpage_name":"hanga-vis-tfrag"}],[198574132,{"idx":52,"name":"des-low-sand-brown-03","tpage_name":"hanga-vis-tfrag"}],[198574131,{"idx":51,"name":"des-low-sand-brown-big","tpage_name":"hanga-vis-tfrag"}],[198574130,{"idx":50,"name":"des-low-metal-bridge","tpage_name":"hanga-vis-tfrag"}],[198574129,{"idx":49,"name":"des-low-palm-leaf-01","tpage_name":"hanga-vis-tfrag"}],[198574128,{"idx":48,"name":"des-low-tree-bark","tpage_name":"hanga-vis-tfrag"}],[198574127,{"idx":47,"name":"des-low-sand","tpage_name":"hanga-vis-tfrag"}],[211025921,{"idx":1,"name":"wascity-metal-dirty","tpage_name":"desjump-tfrag"}],[198574121,{"idx":41,"name":"des-cave-floor-01","tpage_name":"hanga-vis-tfrag"}],[198574119,{"idx":39,"name":"des-mount-bottom-01","tpage_name":"hanga-vis-tfrag"}],[198574118,{"idx":38,"name":"des-cliff-top-02","tpage_name":"hanga-vis-tfrag"}],[198574117,{"idx":37,"name":"des-cliff-trans-01","tpage_name":"hanga-vis-tfrag"}],[198574115,{"idx":35,"name":"des-cliff-top-05","tpage_name":"hanga-vis-tfrag"}],[198574114,{"idx":34,"name":"des-mount-sand-trans","tpage_name":"hanga-vis-tfrag"}],[198574113,{"idx":33,"name":"des-beach-01","tpage_name":"hanga-vis-tfrag"}],[198574105,{"idx":25,"name":"des-ruins-roof-01","tpage_name":"hanga-vis-tfrag"}],[198574097,{"idx":17,"name":"des-ruins-top-01","tpage_name":"hanga-vis-tfrag"}],[198574086,{"idx":6,"name":"des-cliff-01","tpage_name":"hanga-vis-tfrag"}],[198574084,{"idx":4,"name":"des-totem-stone-01","tpage_name":"hanga-vis-tfrag"}],[198574081,{"idx":1,"name":"des-mount-02","tpage_name":"hanga-vis-tfrag"}],[198443059,{"idx":51,"name":"des-low-sand-green-02","tpage_name":"hangb-vis-tfrag"}],[198443058,{"idx":50,"name":"des-low-sand-green-03","tpage_name":"hangb-vis-tfrag"}],[198443057,{"idx":49,"name":"des-low-sand-green-01","tpage_name":"hangb-vis-tfrag"}],[198443056,{"idx":48,"name":"des-low-sand-brown-02","tpage_name":"hangb-vis-tfrag"}],[198443055,{"idx":47,"name":"des-low-sand-brown-03","tpage_name":"hangb-vis-tfrag"}],[198443054,{"idx":46,"name":"des-low-sand-brown-big","tpage_name":"hangb-vis-tfrag"}],[198443053,{"idx":45,"name":"des-low-sand-brown-01","tpage_name":"hangb-vis-tfrag"}],[197722135,{"idx":23,"name":"widow-dull-inards","tpage_name":"lfacrm2-pris"}],[197722134,{"idx":22,"name":"squid-tubes","tpage_name":"lfacrm2-pris"}],[197722133,{"idx":21,"name":"squid-bulb-sm","tpage_name":"lfacrm2-pris"}],[197722132,{"idx":20,"name":"roboguard-shouldershield","tpage_name":"lfacrm2-pris"}],[197722131,{"idx":19,"name":"roboguard-headshield","tpage_name":"lfacrm2-pris"}],[197722130,{"idx":18,"name":"roboguard-die-stamped-metal-red","tpage_name":"lfacrm2-pris"}],[197722129,{"idx":17,"name":"roboguard-die-stamped-metal-blue","tpage_name":"lfacrm2-pris"}],[202702848,{"idx":0,"name":"hud-torn-head-01","tpage_name":"lctypalt-minimap"}],[197722128,{"idx":16,"name":"kg-grunt-rim-03","tpage_name":"lfacrm2-pris"}],[197722127,{"idx":15,"name":"kg-grunt-rim-02","tpage_name":"lfacrm2-pris"}],[198574080,{"idx":0,"name":"des-mount-01","tpage_name":"hanga-vis-tfrag"}],[197328900,{"idx":4,"name":"facc-door-frame-01","tpage_name":"factorya-shrub"}],[197328899,{"idx":3,"name":"facc-hole-grill-01","tpage_name":"factorya-shrub"}],[197328898,{"idx":2,"name":"facc-beam-01","tpage_name":"factorya-shrub"}],[197328897,{"idx":1,"name":"facc-metal-panel-09","tpage_name":"factorya-shrub"}],[197328896,{"idx":0,"name":"facc-metal-panel-07","tpage_name":"factorya-shrub"}],[195821580,{"idx":12,"name":"mech-flame","tpage_name":"factoryd-sprite"}],[195821579,{"idx":11,"name":"glass-shard-04","tpage_name":"factoryd-sprite"}],[195821578,{"idx":10,"name":"glass-shard-03","tpage_name":"factoryd-sprite"}],[195821571,{"idx":3,"name":"errolbomb-target-reg-corner-01","tpage_name":"factoryd-sprite"}],[195821570,{"idx":2,"name":"errolbomb-target-reg-01","tpage_name":"factoryd-sprite"}],[195821569,{"idx":1,"name":"errolbomb-target-indicator-arrow-01","tpage_name":"factoryd-sprite"}],[195821568,{"idx":0,"name":"errolbomb-target-dot-01","tpage_name":"factoryd-sprite"}],[195559509,{"idx":85,"name":"vin-teeth-01","tpage_name":"towercst-pris2"}],[195559508,{"idx":84,"name":"torn-vest","tpage_name":"towercst-pris2"}],[195559507,{"idx":83,"name":"torn-teeth-01","tpage_name":"towercst-pris2"}],[195559506,{"idx":82,"name":"torn-shoe-02","tpage_name":"towercst-pris2"}],[195559505,{"idx":81,"name":"torn-shoe","tpage_name":"towercst-pris2"}],[195559504,{"idx":80,"name":"torn-scarf","tpage_name":"towercst-pris2"}],[195559503,{"idx":79,"name":"torn-pipe","tpage_name":"towercst-pris2"}],[195559502,{"idx":78,"name":"torn-mouth","tpage_name":"towercst-pris2"}],[195559501,{"idx":77,"name":"torn-metal2","tpage_name":"towercst-pris2"}],[195559500,{"idx":76,"name":"torn-legshield","tpage_name":"towercst-pris2"}],[195559499,{"idx":75,"name":"torn-handle-01","tpage_name":"towercst-pris2"}],[217972738,{"idx":2,"name":"time-bubble-orbiter","tpage_name":"lbbtcha2-sprite"}],[195559498,{"idx":74,"name":"torn-hair-02","tpage_name":"towercst-pris2"}],[217972737,{"idx":1,"name":"time-bubble-clock","tpage_name":"lbbtcha2-sprite"}],[195559497,{"idx":73,"name":"torn-hair-01","tpage_name":"towercst-pris2"}],[217972736,{"idx":0,"name":"time-bubble","tpage_name":"lbbtcha2-sprite"}],[195559496,{"idx":72,"name":"torn-gunbarrel-02","tpage_name":"towercst-pris2"}],[195559495,{"idx":71,"name":"torn-gunbarrel","tpage_name":"towercst-pris2"}],[195559494,{"idx":70,"name":"torn-footleather","tpage_name":"towercst-pris2"}],[195559493,{"idx":69,"name":"torn-finger","tpage_name":"towercst-pris2"}],[216727552,{"idx":0,"name":"keira-mask","tpage_name":"outcast3-water"}],[195559492,{"idx":68,"name":"torn-face-right","tpage_name":"towercst-pris2"}],[195559491,{"idx":67,"name":"torn-face","tpage_name":"towercst-pris2"}],[195559490,{"idx":66,"name":"torn-eyelid","tpage_name":"towercst-pris2"}],[215482369,{"idx":1,"name":"facb-roadmarkings-01","tpage_name":"lfacout-vis-alpha"}],[195559489,{"idx":65,"name":"torn-eye","tpage_name":"towercst-pris2"}],[215482368,{"idx":0,"name":"facb-bridgelights-01","tpage_name":"lfacout-vis-alpha"}],[195559488,{"idx":64,"name":"torn-ear","tpage_name":"towercst-pris2"}],[195559487,{"idx":63,"name":"torn-blademetal","tpage_name":"towercst-pris2"}],[195559486,{"idx":62,"name":"torn-belt2","tpage_name":"towercst-pris2"}],[195559485,{"idx":61,"name":"torn-belt","tpage_name":"towercst-pris2"}],[214237184,{"idx":0,"name":"kg-rob-target-01","tpage_name":"lctyprot-sprite"}],[195559484,{"idx":60,"name":"torn-armor","tpage_name":"towercst-pris2"}],[195559483,{"idx":59,"name":"torn-armlft","tpage_name":"towercst-pris2"}],[195559482,{"idx":58,"name":"sig-undergarments","tpage_name":"towercst-pris2"}],[195559481,{"idx":57,"name":"sig-skirts-03","tpage_name":"towercst-pris2"}],[212992000,{"idx":0,"name":"mech-flame","tpage_name":"lpattack-sprite"}],[195559480,{"idx":56,"name":"sig-skirts-02","tpage_name":"towercst-pris2"}],[195559479,{"idx":55,"name":"sig-skirts","tpage_name":"towercst-pris2"}],[195559478,{"idx":54,"name":"sig-shoulderarmor","tpage_name":"towercst-pris2"}],[195559477,{"idx":53,"name":"sig-shoetop","tpage_name":"towercst-pris2"}],[195559476,{"idx":52,"name":"sig-shoebottom","tpage_name":"towercst-pris2"}],[195559475,{"idx":51,"name":"sig-sac","tpage_name":"towercst-pris2"}],[195559474,{"idx":50,"name":"sig-metal-dirty","tpage_name":"towercst-pris2"}],[195559473,{"idx":49,"name":"sig-metal-01","tpage_name":"towercst-pris2"}],[195559472,{"idx":48,"name":"sig-lens","tpage_name":"towercst-pris2"}],[195559471,{"idx":47,"name":"sig-horn","tpage_name":"towercst-pris2"}],[195559470,{"idx":46,"name":"sig-headgear","tpage_name":"towercst-pris2"}],[195559469,{"idx":45,"name":"sig-gun-05","tpage_name":"towercst-pris2"}],[195559468,{"idx":44,"name":"sig-gun-04","tpage_name":"towercst-pris2"}],[195559467,{"idx":43,"name":"sig-gun-03","tpage_name":"towercst-pris2"}],[195559466,{"idx":42,"name":"sig-gun-02","tpage_name":"towercst-pris2"}],[195559465,{"idx":41,"name":"sig-gun-01","tpage_name":"towercst-pris2"}],[195559464,{"idx":40,"name":"sig-glovetop","tpage_name":"towercst-pris2"}],[195559463,{"idx":39,"name":"sig-glove","tpage_name":"towercst-pris2"}],[195559462,{"idx":38,"name":"sig-gem-01","tpage_name":"towercst-pris2"}],[195559461,{"idx":37,"name":"sig-flask","tpage_name":"towercst-pris2"}],[195559460,{"idx":36,"name":"sig-facert","tpage_name":"towercst-pris2"}],[195559459,{"idx":35,"name":"sig-faceleft","tpage_name":"towercst-pris2"}],[195559458,{"idx":34,"name":"sig-eyelid","tpage_name":"towercst-pris2"}],[195559457,{"idx":33,"name":"sig-eye","tpage_name":"towercst-pris2"}],[195559456,{"idx":32,"name":"sig-belt","tpage_name":"towercst-pris2"}],[195559455,{"idx":31,"name":"jinx-wraps","tpage_name":"towercst-pris2"}],[195559454,{"idx":30,"name":"jinx-teeth","tpage_name":"towercst-pris2"}],[195559453,{"idx":29,"name":"jinx-singlerope","tpage_name":"towercst-pris2"}],[195559452,{"idx":28,"name":"jinx-shoebottom2","tpage_name":"towercst-pris2"}],[195559451,{"idx":27,"name":"jinx-shirt","tpage_name":"towercst-pris2"}],[195559450,{"idx":26,"name":"jinx-scarf","tpage_name":"towercst-pris2"}],[195559449,{"idx":25,"name":"jinx-rope-01","tpage_name":"towercst-pris2"}],[195559448,{"idx":24,"name":"jinx-pants","tpage_name":"towercst-pris2"}],[195559447,{"idx":23,"name":"jinx-kneepad","tpage_name":"towercst-pris2"}],[195559446,{"idx":22,"name":"jinx-iris","tpage_name":"towercst-pris2"}],[195559445,{"idx":21,"name":"jinx-handle","tpage_name":"towercst-pris2"}],[195559444,{"idx":20,"name":"jinx-hairtye","tpage_name":"towercst-pris2"}],[195559443,{"idx":19,"name":"jinx-hair","tpage_name":"towercst-pris2"}],[195559442,{"idx":18,"name":"jinx-glovepalm","tpage_name":"towercst-pris2"}],[195559441,{"idx":17,"name":"jinx-glove","tpage_name":"towercst-pris2"}],[195559440,{"idx":16,"name":"jinx-finger","tpage_name":"towercst-pris2"}],[195559439,{"idx":15,"name":"jinx-face","tpage_name":"towercst-pris2"}],[195559438,{"idx":14,"name":"jinx-eyelid","tpage_name":"towercst-pris2"}],[195559437,{"idx":13,"name":"jinx-cigarflame","tpage_name":"towercst-pris2"}],[199294976,{"idx":0,"name":"hud-temple-token","tpage_name":"templec-minimap"}],[195559436,{"idx":12,"name":"jinx-cigar","tpage_name":"towercst-pris2"}],[195559435,{"idx":11,"name":"jinx-buckles","tpage_name":"towercst-pris2"}],[195559434,{"idx":10,"name":"jinx-brownstrapbolts","tpage_name":"towercst-pris2"}],[222887944,{"idx":8,"name":"palcab-lowres-ctyslum-roof-03","tpage_name":"lfacctyb-vis-tfrag"}],[216662044,{"idx":28,"name":"torn-armor","tpage_name":"outcast3-pris"}],[215416864,{"idx":32,"name":"fac-tower-01","tpage_name":"lfacout-vis-tfrag"}],[195493984,{"idx":96,"name":"gun-purple-glow","tpage_name":"towercst-pris"}],[222887943,{"idx":7,"name":"palcab-lowres-ctyslum-ground","tpage_name":"lfacctyb-vis-tfrag"}],[216662043,{"idx":27,"name":"torn-armlft","tpage_name":"outcast3-pris"}],[215416863,{"idx":31,"name":"fac-tower-pipe-03","tpage_name":"lfacout-vis-tfrag"}],[195493983,{"idx":95,"name":"gun-main","tpage_name":"towercst-pris"}],[222887942,{"idx":6,"name":"palcab-lowres-ctywide-wall-02","tpage_name":"lfacctyb-vis-tfrag"}],[216662042,{"idx":26,"name":"keira-torch-nozzle-02","tpage_name":"outcast3-pris"}],[215416862,{"idx":30,"name":"facb_redmetal-d-01","tpage_name":"lfacout-vis-tfrag"}],[195493982,{"idx":94,"name":"gun-dark-mag","tpage_name":"towercst-pris"}],[222887941,{"idx":5,"name":"palcab-lowres-background-rocksnow","tpage_name":"lfacctyb-vis-tfrag"}],[216662041,{"idx":25,"name":"keira-torch-nozzle-01","tpage_name":"outcast3-pris"}],[215416861,{"idx":29,"name":"facb-metal-grill-01","tpage_name":"lfacout-vis-tfrag"}],[195493981,{"idx":93,"name":"wing02grey01","tpage_name":"towercst-pris"}],[222887940,{"idx":4,"name":"palcab-lowres-background-rocksnow2","tpage_name":"lfacctyb-vis-tfrag"}],[216662040,{"idx":24,"name":"keira-torch-guard-01","tpage_name":"outcast3-pris"}],[215416860,{"idx":28,"name":"facb-spotlight","tpage_name":"lfacout-vis-tfrag"}],[195493980,{"idx":92,"name":"wing02","tpage_name":"towercst-pris"}],[222887939,{"idx":3,"name":"palcab-lowres-background-crater-bottom-enviro","tpage_name":"lfacctyb-vis-tfrag"}],[216662039,{"idx":23,"name":"keira-shoebottom","tpage_name":"outcast3-pris"}],[215416859,{"idx":27,"name":"facb_dec-metal-01","tpage_name":"lfacout-vis-tfrag"}],[195493979,{"idx":91,"name":"wing01","tpage_name":"towercst-pris"}],[222887938,{"idx":2,"name":"palcab-lowres-ctywide-wall-01","tpage_name":"lfacctyb-vis-tfrag"}],[216662038,{"idx":22,"name":"keira-shirt","tpage_name":"outcast3-pris"}],[215416858,{"idx":26,"name":"facb-big-metal-panl01","tpage_name":"lfacout-vis-tfrag"}],[195493978,{"idx":90,"name":"turret01","tpage_name":"towercst-pris"}],[222887937,{"idx":1,"name":"strip-metal-02-lores","tpage_name":"lfacctyb-vis-tfrag"}],[216662037,{"idx":21,"name":"keira-pantslarge","tpage_name":"outcast3-pris"}],[215416857,{"idx":25,"name":"fac-tower-door-02","tpage_name":"lfacout-vis-tfrag"}],[195493977,{"idx":89,"name":"stripe03","tpage_name":"towercst-pris"}],[222887936,{"idx":0,"name":"palcab-lowres-background-hills-01","tpage_name":"lfacctyb-vis-tfrag"}],[216662036,{"idx":20,"name":"keira-maskbolt","tpage_name":"outcast3-pris"}],[215416856,{"idx":24,"name":"fac-tower-08","tpage_name":"lfacout-vis-tfrag"}],[195493976,{"idx":88,"name":"seat01","tpage_name":"towercst-pris"}],[216662035,{"idx":19,"name":"keira-lens-large","tpage_name":"outcast3-pris"}],[215416855,{"idx":23,"name":"fac-tower-door-03","tpage_name":"lfacout-vis-tfrag"}],[195493975,{"idx":87,"name":"rail01","tpage_name":"towercst-pris"}],[216662034,{"idx":18,"name":"keira-largewraps","tpage_name":"outcast3-pris"}],[215416854,{"idx":22,"name":"facb-beam01","tpage_name":"lfacout-vis-tfrag"}],[195493974,{"idx":86,"name":"post01","tpage_name":"towercst-pris"}],[216662033,{"idx":17,"name":"keira-iris-64x64","tpage_name":"outcast3-pris"}],[215416853,{"idx":21,"name":"facb_redmetal-d-02","tpage_name":"lfacout-vis-tfrag"}],[195493973,{"idx":85,"name":"mhcity-wall-tentacle-01","tpage_name":"towercst-pris"}],[216662032,{"idx":16,"name":"keira-handtop","tpage_name":"outcast3-pris"}],[215416852,{"idx":20,"name":"facb_dec-metal-03","tpage_name":"lfacout-vis-tfrag"}],[195493972,{"idx":84,"name":"mhcity-vein-01","tpage_name":"towercst-pris"}],[216662031,{"idx":15,"name":"keira-handbottom","tpage_name":"outcast3-pris"}],[215416851,{"idx":19,"name":"facb_blue-metal-02","tpage_name":"lfacout-vis-tfrag"}],[195493971,{"idx":83,"name":"mhcity-tower-door-metal-01","tpage_name":"towercst-pris"}],[216662030,{"idx":14,"name":"keira-hair-newest","tpage_name":"outcast3-pris"}],[215416850,{"idx":18,"name":"fac-tower-pipe-01","tpage_name":"lfacout-vis-tfrag"}],[195493970,{"idx":82,"name":"mhcity-tower-door-frame-01","tpage_name":"towercst-pris"}],[216662029,{"idx":13,"name":"keira-gogglestrap","tpage_name":"outcast3-pris"}],[215416849,{"idx":17,"name":"facb-light-01","tpage_name":"lfacout-vis-tfrag"}],[195493969,{"idx":81,"name":"mhcity-grunt-egg-horns-01","tpage_name":"towercst-pris"}],[216662028,{"idx":12,"name":"keira-glovenewlarge","tpage_name":"outcast3-pris"}],[215416848,{"idx":16,"name":"fac-tower-door-01","tpage_name":"lfacout-vis-tfrag"}],[195493968,{"idx":80,"name":"mhcity-eggskin","tpage_name":"towercst-pris"}],[216662027,{"idx":11,"name":"keira-glasses","tpage_name":"outcast3-pris"}],[215416847,{"idx":15,"name":"facb-big-metal-panl02","tpage_name":"lfacout-vis-tfrag"}],[195493967,{"idx":79,"name":"lightCase01","tpage_name":"towercst-pris"}],[216662026,{"idx":10,"name":"keira-face","tpage_name":"outcast3-pris"}],[215416846,{"idx":14,"name":"facb-bigpipe-01","tpage_name":"lfacout-vis-tfrag"}],[195493966,{"idx":78,"name":"light01","tpage_name":"towercst-pris"}],[216662025,{"idx":9,"name":"keira-eyelid","tpage_name":"outcast3-pris"}],[215416845,{"idx":13,"name":"facb_redmetal-d-01b","tpage_name":"lfacout-vis-tfrag"}],[195493965,{"idx":77,"name":"kg-pickup-wings02","tpage_name":"towercst-pris"}],[216662024,{"idx":8,"name":"keira-chokermetal","tpage_name":"outcast3-pris"}],[215416844,{"idx":12,"name":"fac-tower-base-rim-03","tpage_name":"lfacout-vis-tfrag"}],[195493964,{"idx":76,"name":"kg-pickup-wings01","tpage_name":"towercst-pris"}],[216662023,{"idx":7,"name":"keira-chokerhighres","tpage_name":"outcast3-pris"}],[215416843,{"idx":11,"name":"fac-tower-base-rim-02","tpage_name":"lfacout-vis-tfrag"}],[195493963,{"idx":75,"name":"kg-pickup-sidelogo","tpage_name":"towercst-pris"}],[217907202,{"idx":2,"name":"time-bubble-orbiter","tpage_name":"lbbtcha1-sprite"}],[216662022,{"idx":6,"name":"keira-brownstraps-new","tpage_name":"outcast3-pris"}],[215416842,{"idx":10,"name":"facb_blue-metal-03","tpage_name":"lfacout-vis-tfrag"}],[195493962,{"idx":74,"name":"kg-pickup-pipe","tpage_name":"towercst-pris"}],[217907201,{"idx":1,"name":"time-bubble-clock","tpage_name":"lbbtcha1-sprite"}],[216662021,{"idx":5,"name":"keira-blackstrap","tpage_name":"outcast3-pris"}],[215416841,{"idx":9,"name":"common-black","tpage_name":"lfacout-vis-tfrag"}],[195493961,{"idx":73,"name":"kg-pickup-joint","tpage_name":"towercst-pris"}],[217907200,{"idx":0,"name":"time-bubble","tpage_name":"lbbtcha1-sprite"}],[216662020,{"idx":4,"name":"keira-belt","tpage_name":"outcast3-pris"}],[215416840,{"idx":8,"name":"fac-tower-panel-01","tpage_name":"lfacout-vis-tfrag"}],[195493960,{"idx":72,"name":"kg-pickup-hood","tpage_name":"towercst-pris"}],[216662019,{"idx":3,"name":"keira-bellylong","tpage_name":"outcast3-pris"}],[215416839,{"idx":7,"name":"fac-tower-base-rim-04","tpage_name":"lfacout-vis-tfrag"}],[195493959,{"idx":71,"name":"kg-pickup-handrail","tpage_name":"towercst-pris"}],[216662018,{"idx":2,"name":"charHOLD","tpage_name":"outcast3-pris"}],[215416838,{"idx":6,"name":"facb_temp_dark","tpage_name":"lfacout-vis-tfrag"}],[195493958,{"idx":70,"name":"kg-pickup-fender-edge","tpage_name":"towercst-pris"}],[216662017,{"idx":1,"name":"bam-hairhilite","tpage_name":"outcast3-pris"}],[215416837,{"idx":5,"name":"fac-tower-base-02","tpage_name":"lfacout-vis-tfrag"}],[195493957,{"idx":69,"name":"kg-pickup-fender","tpage_name":"towercst-pris"}],[216662016,{"idx":0,"name":"bam-eyelight","tpage_name":"outcast3-pris"}],[215416836,{"idx":4,"name":"facb-big-metal-panl04","tpage_name":"lfacout-vis-tfrag"}],[195493956,{"idx":68,"name":"kg-pickup-engine-01","tpage_name":"towercst-pris"}],[215416835,{"idx":3,"name":"fac-tower-base-03","tpage_name":"lfacout-vis-tfrag"}],[195493955,{"idx":67,"name":"kg-pickup-body","tpage_name":"towercst-pris"}],[215416834,{"idx":2,"name":"facb_redmetal-02","tpage_name":"lfacout-vis-tfrag"}],[195493954,{"idx":66,"name":"kg-pickup-bed","tpage_name":"towercst-pris"}],[215416833,{"idx":1,"name":"facb_redmetal-01","tpage_name":"lfacout-vis-tfrag"}],[195493953,{"idx":65,"name":"kcfrontend01","tpage_name":"towercst-pris"}],[215416832,{"idx":0,"name":"facb_redmetal-d-03","tpage_name":"lfacout-vis-tfrag"}],[195493952,{"idx":64,"name":"jets01","tpage_name":"towercst-pris"}],[195493951,{"idx":63,"name":"jetTop01","tpage_name":"towercst-pris"}],[195493950,{"idx":62,"name":"hood01","tpage_name":"towercst-pris"}],[195493949,{"idx":61,"name":"gunbox02","tpage_name":"towercst-pris"}],[195493948,{"idx":60,"name":"gunbox01","tpage_name":"towercst-pris"}],[195493947,{"idx":59,"name":"gunBoxFront01","tpage_name":"towercst-pris"}],[195493946,{"idx":58,"name":"gunBoxBack01","tpage_name":"towercst-pris"}],[195493945,{"idx":57,"name":"grillRim01","tpage_name":"towercst-pris"}],[212926464,{"idx":0,"name":"mech-flame","tpage_name":"lformach-sprite"}],[195493944,{"idx":56,"name":"gauge01","tpage_name":"towercst-pris"}],[195493943,{"idx":55,"name":"dash01","tpage_name":"towercst-pris"}],[195493942,{"idx":54,"name":"common-black","tpage_name":"towercst-pris"}],[195493941,{"idx":53,"name":"backThing01","tpage_name":"towercst-pris"}],[195493940,{"idx":52,"name":"jakchires-teeth","tpage_name":"towercst-pris"}],[195493939,{"idx":51,"name":"jakchires-shoeteop","tpage_name":"towercst-pris"}],[195493938,{"idx":50,"name":"jakchires-shoemetal","tpage_name":"towercst-pris"}],[195493937,{"idx":49,"name":"jakchires-shoebottom","tpage_name":"towercst-pris"}],[195493936,{"idx":48,"name":"jakchires-precarmor-01","tpage_name":"towercst-pris"}],[195493935,{"idx":47,"name":"jakchires-pants","tpage_name":"towercst-pris"}],[195493934,{"idx":46,"name":"jakchires-lightbrownspat","tpage_name":"towercst-pris"}],[195493933,{"idx":45,"name":"jakchires-leatherpouch","tpage_name":"towercst-pris"}],[195493932,{"idx":44,"name":"jakchires-jacket","tpage_name":"towercst-pris"}],[195493931,{"idx":43,"name":"jakchires-horn","tpage_name":"towercst-pris"}],[195493930,{"idx":42,"name":"jakchires-hair","tpage_name":"towercst-pris"}],[195493929,{"idx":41,"name":"jakchires-glovetop","tpage_name":"towercst-pris"}],[195493928,{"idx":40,"name":"jakchires-facert","tpage_name":"towercst-pris"}],[195493927,{"idx":39,"name":"jakchires-facelft","tpage_name":"towercst-pris"}],[195493926,{"idx":38,"name":"jakchires-eyelid","tpage_name":"towercst-pris"}],[195493925,{"idx":37,"name":"jakchires-eyebrow","tpage_name":"towercst-pris"}],[195493924,{"idx":36,"name":"jakchires-eye","tpage_name":"towercst-pris"}],[195493923,{"idx":35,"name":"jakchires-clips","tpage_name":"towercst-pris"}],[195166238,{"idx":30,"name":"wire-metal","tpage_name":"lblowtmh-pris"}],[195166237,{"idx":29,"name":"widow-pod-gun-metal","tpage_name":"lblowtmh-pris"}],[195166236,{"idx":28,"name":"roboguard-shouldershield","tpage_name":"lblowtmh-pris"}],[195166235,{"idx":27,"name":"roboguard-headshield","tpage_name":"lblowtmh-pris"}],[195166234,{"idx":26,"name":"roboguard-die-stamped-metal-blue","tpage_name":"lblowtmh-pris"}],[195166233,{"idx":25,"name":"environment-oldmetal","tpage_name":"lblowtmh-pris"}],[195166232,{"idx":24,"name":"cguardgame-shoebottom","tpage_name":"lblowtmh-pris"}],[195166231,{"idx":23,"name":"cguardgame-metallight-01small","tpage_name":"lblowtmh-pris"}],[195166230,{"idx":22,"name":"cguardgame-backplate","tpage_name":"lblowtmh-pris"}],[195166229,{"idx":21,"name":"cguard1-lens","tpage_name":"lblowtmh-pris"}],[195166228,{"idx":20,"name":"cguard1-guntube","tpage_name":"lblowtmh-pris"}],[195166227,{"idx":19,"name":"cguard1-chestplate","tpage_name":"lblowtmh-pris"}],[195166226,{"idx":18,"name":"cguard1-backmetal","tpage_name":"lblowtmh-pris"}],[195166225,{"idx":17,"name":"brown-hose","tpage_name":"lblowtmh-pris"}],[195166224,{"idx":16,"name":"blue-gem","tpage_name":"lblowtmh-pris"}],[195166223,{"idx":15,"name":"bam-eyelight","tpage_name":"lblowtmh-pris"}],[195166222,{"idx":14,"name":"cty-grunt-teeth-01","tpage_name":"lblowtmh-pris"}],[195166221,{"idx":13,"name":"cty-grunt-skin-03","tpage_name":"lblowtmh-pris"}],[195166220,{"idx":12,"name":"cty-grunt-skin-02","tpage_name":"lblowtmh-pris"}],[195166219,{"idx":11,"name":"cty-grunt-skin-01","tpage_name":"lblowtmh-pris"}],[195166218,{"idx":10,"name":"cty-grunt-metal-01","tpage_name":"lblowtmh-pris"}],[195166217,{"idx":9,"name":"cty-grunt-hose","tpage_name":"lblowtmh-pris"}],[195166215,{"idx":7,"name":"cty-grunt-eye-01","tpage_name":"lblowtmh-pris"}],[195100734,{"idx":62,"name":"kg-grunt-rim-03","tpage_name":"lblowtkg-pris"}],[195100733,{"idx":61,"name":"kg-grunt-cable-01","tpage_name":"lblowtkg-pris"}],[195100732,{"idx":60,"name":"bombot-wheel","tpage_name":"lblowtkg-pris"}],[195100731,{"idx":59,"name":"bombot-turret01","tpage_name":"lblowtkg-pris"}],[195100730,{"idx":58,"name":"bombot-roundend","tpage_name":"lblowtkg-pris"}],[195100729,{"idx":57,"name":"bombot-rimgrey","tpage_name":"lblowtkg-pris"}],[195100728,{"idx":56,"name":"bombot-redplate-01","tpage_name":"lblowtkg-pris"}],[195100727,{"idx":55,"name":"bombot-rail01","tpage_name":"lblowtkg-pris"}],[211288066,{"idx":2,"name":"tow-eggside-01","tpage_name":"towercst-shrub"}],[195100726,{"idx":54,"name":"bombot-post01","tpage_name":"lblowtkg-pris"}],[211288065,{"idx":1,"name":"tow-groundpod","tpage_name":"towercst-shrub"}],[195100725,{"idx":53,"name":"bombot-lens","tpage_name":"lblowtkg-pris"}],[211288064,{"idx":0,"name":"tow-wall-supports","tpage_name":"towercst-shrub"}],[195100724,{"idx":52,"name":"bombot-joint","tpage_name":"lblowtkg-pris"}],[195100723,{"idx":51,"name":"bombot-insidegun","tpage_name":"lblowtkg-pris"}],[195100722,{"idx":50,"name":"bombot-guntop","tpage_name":"lblowtkg-pris"}],[195100721,{"idx":49,"name":"bombot-guards","tpage_name":"lblowtkg-pris"}],[195100720,{"idx":48,"name":"bombot-greybarrelside","tpage_name":"lblowtkg-pris"}],[195100719,{"idx":47,"name":"bombot-greybarrelend","tpage_name":"lblowtkg-pris"}],[195100718,{"idx":46,"name":"bombot-gearsides","tpage_name":"lblowtkg-pris"}],[195100717,{"idx":45,"name":"bombot-darkgrey-02","tpage_name":"lblowtkg-pris"}],[195100716,{"idx":44,"name":"bombot-darkgrey-01","tpage_name":"lblowtkg-pris"}],[195100715,{"idx":43,"name":"homing-missle-fin-01","tpage_name":"lblowtkg-pris"}],[195100714,{"idx":42,"name":"homing-missle-exhaust","tpage_name":"lblowtkg-pris"}],[195100713,{"idx":41,"name":"homing-missle-body-tip","tpage_name":"lblowtkg-pris"}],[195100712,{"idx":40,"name":"homing-missle-body","tpage_name":"lblowtkg-pris"}],[195100711,{"idx":39,"name":"nwasp-skin-03","tpage_name":"lblowtkg-pris"}],[195100710,{"idx":38,"name":"nwasp-skin-02","tpage_name":"lblowtkg-pris"}],[195100709,{"idx":37,"name":"nwasp-skin-01","tpage_name":"lblowtkg-pris"}],[195100708,{"idx":36,"name":"nwasp-metal-01","tpage_name":"lblowtkg-pris"}],[195100707,{"idx":35,"name":"nwasp-hose","tpage_name":"lblowtkg-pris"}],[195100706,{"idx":34,"name":"nwasp-gem-01","tpage_name":"lblowtkg-pris"}],[202571785,{"idx":9,"name":"rail-pipe-05","tpage_name":"raila-tfrag"}],[195100705,{"idx":33,"name":"nwasp-eye-01","tpage_name":"lblowtkg-pris"}],[214368258,{"idx":2,"name":"environment-oldmetal","tpage_name":"loninsim-pris"}],[194445378,{"idx":66,"name":"pipe01","tpage_name":"gridcst-pris"}],[214368257,{"idx":1,"name":"bam-hairhilite","tpage_name":"loninsim-pris"}],[194445377,{"idx":65,"name":"moter01","tpage_name":"gridcst-pris"}],[214368256,{"idx":0,"name":"bam-eyelight","tpage_name":"loninsim-pris"}],[208142356,{"idx":20,"name":"terraformer-bluelight","tpage_name":"desboss1-pris2"}],[194445376,{"idx":64,"name":"floorboard01","tpage_name":"gridcst-pris"}],[208142355,{"idx":19,"name":"terraformer-tank-01","tpage_name":"desboss1-pris2"}],[194445375,{"idx":63,"name":"cushion01","tpage_name":"gridcst-pris"}],[208142354,{"idx":18,"name":"terraformer-organic-05","tpage_name":"desboss1-pris2"}],[194445374,{"idx":62,"name":"carawing01","tpage_name":"gridcst-pris"}],[208142353,{"idx":17,"name":"terraformer-organic-04","tpage_name":"desboss1-pris2"}],[194445373,{"idx":61,"name":"carafront01","tpage_name":"gridcst-pris"}],[208142352,{"idx":16,"name":"terraformer-organic-03","tpage_name":"desboss1-pris2"}],[194445372,{"idx":60,"name":"brace01","tpage_name":"gridcst-pris"}],[208142351,{"idx":15,"name":"terraformer-organic-02","tpage_name":"desboss1-pris2"}],[194445371,{"idx":59,"name":"back01","tpage_name":"gridcst-pris"}],[208142350,{"idx":14,"name":"terraformer-organic-01","tpage_name":"desboss1-pris2"}],[194445370,{"idx":58,"name":"gun-main","tpage_name":"gridcst-pris"}],[208142349,{"idx":13,"name":"terraformer-minestrips-01","tpage_name":"desboss1-pris2"}],[194445369,{"idx":57,"name":"citwide-crimson-wall-plain","tpage_name":"gridcst-pris"}],[208142348,{"idx":12,"name":"terraformer-metal-11","tpage_name":"desboss1-pris2"}],[194445368,{"idx":56,"name":"citwide-crimson-tube","tpage_name":"gridcst-pris"}],[208142347,{"idx":11,"name":"terraformer-metal-10","tpage_name":"desboss1-pris2"}],[194445367,{"idx":55,"name":"citwide-crimson-red","tpage_name":"gridcst-pris"}],[208142346,{"idx":10,"name":"terraformer-metal-09","tpage_name":"desboss1-pris2"}],[194445366,{"idx":54,"name":"citwide-crimson-light","tpage_name":"gridcst-pris"}],[208142345,{"idx":9,"name":"terraformer-metal-08","tpage_name":"desboss1-pris2"}],[194445365,{"idx":53,"name":"citwide-crimson-gold","tpage_name":"gridcst-pris"}],[208142344,{"idx":8,"name":"terraformer-metal-07","tpage_name":"desboss1-pris2"}],[194445364,{"idx":52,"name":"daxtertuft","tpage_name":"gridcst-pris"}],[208142343,{"idx":7,"name":"terraformer-metal-05","tpage_name":"desboss1-pris2"}],[194445363,{"idx":51,"name":"daxterteeth","tpage_name":"gridcst-pris"}],[208142341,{"idx":5,"name":"terraformer-metal-03","tpage_name":"desboss1-pris2"}],[194445361,{"idx":49,"name":"daxterlense","tpage_name":"gridcst-pris"}],[208142340,{"idx":4,"name":"terraformer-metal-02","tpage_name":"desboss1-pris2"}],[194445360,{"idx":48,"name":"daxterhelmetplain","tpage_name":"gridcst-pris"}],[208142339,{"idx":3,"name":"terraformer-metal-01","tpage_name":"desboss1-pris2"}],[194445359,{"idx":47,"name":"daxterheadwidenew","tpage_name":"gridcst-pris"}],[208142338,{"idx":2,"name":"terraformer-footpipes-01","tpage_name":"desboss1-pris2"}],[194445358,{"idx":46,"name":"daxtergoggles","tpage_name":"gridcst-pris"}],[208142337,{"idx":1,"name":"terraformer-bodyside-top","tpage_name":"desboss1-pris2"}],[194445357,{"idx":45,"name":"daxterfoot-bottom","tpage_name":"gridcst-pris"}],[208142336,{"idx":0,"name":"terraformer-bodyside-bottom","tpage_name":"desboss1-pris2"}],[194445356,{"idx":44,"name":"daxterfoot","tpage_name":"gridcst-pris"}],[194445355,{"idx":43,"name":"daxterfinger","tpage_name":"gridcst-pris"}],[194445354,{"idx":42,"name":"daxterear","tpage_name":"gridcst-pris"}],[194445353,{"idx":41,"name":"daxterbolt","tpage_name":"gridcst-pris"}],[194445352,{"idx":40,"name":"daxterbodyshort-eix","tpage_name":"gridcst-pris"}],[194445351,{"idx":39,"name":"daxterarm","tpage_name":"gridcst-pris"}],[194445350,{"idx":38,"name":"daxter-orange","tpage_name":"gridcst-pris"}],[194445349,{"idx":37,"name":"daxter-furhilite","tpage_name":"gridcst-pris"}],[194445347,{"idx":35,"name":"jakchires-teeth","tpage_name":"gridcst-pris"}],[194052163,{"idx":67,"name":"intcept-b-teeth01","tpage_name":"deschase-pris"}],[194052162,{"idx":66,"name":"intcept-b-pipe01","tpage_name":"deschase-pris"}],[194052161,{"idx":65,"name":"intcept-b-gun01","tpage_name":"deschase-pris"}],[194052160,{"idx":64,"name":"intcept-b-base-patern02","tpage_name":"deschase-pris"}],[194052159,{"idx":63,"name":"intcept-b-base-patern01","tpage_name":"deschase-pris"}],[194052158,{"idx":62,"name":"intcept-b-base-green01","tpage_name":"deschase-pris"}],[194052156,{"idx":60,"name":"vehicle-wire-01","tpage_name":"deschase-pris"}],[194052155,{"idx":59,"name":"vehicle-exhaust-pipe-01","tpage_name":"deschase-pris"}],[194052154,{"idx":58,"name":"rhino-metal-01","tpage_name":"deschase-pris"}],[194052153,{"idx":57,"name":"rhino-horn-01","tpage_name":"deschase-pris"}],[194052152,{"idx":56,"name":"catapult-wood-tip","tpage_name":"deschase-pris"}],[194052151,{"idx":55,"name":"catapult-wood-rope","tpage_name":"deschase-pris"}],[194052150,{"idx":54,"name":"catapult-wood-arm-01","tpage_name":"deschase-pris"}],[194052149,{"idx":53,"name":"catapult-panel-small","tpage_name":"deschase-pris"}],[194052148,{"idx":52,"name":"catapult-panel-pattern-01","tpage_name":"deschase-pris"}],[194052147,{"idx":51,"name":"catapult-panel-face","tpage_name":"deschase-pris"}],[194052146,{"idx":50,"name":"catapult-metal-plate-01","tpage_name":"deschase-pris"}],[194052145,{"idx":49,"name":"catapult-metal-part-01","tpage_name":"deschase-pris"}],[194052144,{"idx":48,"name":"catapult-gun-box-01","tpage_name":"deschase-pris"}],[194052143,{"idx":47,"name":"catapult-cap-pin-01","tpage_name":"deschase-pris"}],[194052142,{"idx":46,"name":"catapult-brass-pipe01","tpage_name":"deschase-pris"}],[207749121,{"idx":1,"name":"kg-target-c-forcefield-01","tpage_name":"lgunnorm-water"}],[194052141,{"idx":45,"name":"catapult-brace-pipe-01","tpage_name":"deschase-pris"}],[207749120,{"idx":0,"name":"kg-target-c-forcefield-01-dest","tpage_name":"lgunnorm-water"}],[194052140,{"idx":44,"name":"catapult-bowl","tpage_name":"deschase-pris"}],[194052139,{"idx":43,"name":"catapult-bone-spike","tpage_name":"deschase-pris"}],[194052138,{"idx":42,"name":"catapult-body-under","tpage_name":"deschase-pris"}],[194052137,{"idx":41,"name":"vehicle-wheel-blur-01","tpage_name":"deschase-pris"}],[194052136,{"idx":40,"name":"vehicle-wheel-01","tpage_name":"deschase-pris"}],[194052135,{"idx":39,"name":"vehicle-tread-blur-02","tpage_name":"deschase-pris"}],[194052134,{"idx":38,"name":"vehicle-toad-exhaust-01","tpage_name":"deschase-pris"}],[205258753,{"idx":1,"name":"dust-sparkle","tpage_name":"waspala-sprite"}],[194052133,{"idx":37,"name":"vehicle-metal-plate-01","tpage_name":"deschase-pris"}],[205258752,{"idx":0,"name":"ceiling-dust","tpage_name":"waspala-sprite"}],[194052132,{"idx":36,"name":"vehicle-gun-box-01","tpage_name":"deschase-pris"}],[202768391,{"idx":7,"name":"hud-torn-head-01","tpage_name":"lblowcst-minimap"}],[194052131,{"idx":35,"name":"vehicle-gas-tank-01","tpage_name":"deschase-pris"}],[202768390,{"idx":6,"name":"hud-target-reticle-fancy-02","tpage_name":"lblowcst-minimap"}],[194052130,{"idx":34,"name":"vehicle-chrome-pipe-01","tpage_name":"deschase-pris"}],[202768389,{"idx":5,"name":"hud-target-reticle-fancy-01","tpage_name":"lblowcst-minimap"}],[194052129,{"idx":33,"name":"vehicle-cap-pin-01","tpage_name":"deschase-pris"}],[202768388,{"idx":4,"name":"hud-vehicle-health-bar-01","tpage_name":"lblowcst-minimap"}],[194052128,{"idx":32,"name":"vehicle-brace-pipe-01","tpage_name":"deschase-pris"}],[202768387,{"idx":3,"name":"hud-target-box-01","tpage_name":"lblowcst-minimap"}],[194052127,{"idx":31,"name":"vehicle-body-panel-01","tpage_name":"deschase-pris"}],[202768386,{"idx":2,"name":"wascity-turret-hud-big-arrow-01","tpage_name":"lblowcst-minimap"}],[194052126,{"idx":30,"name":"intcept-tread01","tpage_name":"deschase-pris"}],[202768385,{"idx":1,"name":"hud-target-reticle","tpage_name":"lblowcst-minimap"}],[194052125,{"idx":29,"name":"intcept-teeth01","tpage_name":"deschase-pris"}],[194052124,{"idx":28,"name":"intcept-pipe01","tpage_name":"deschase-pris"}],[194052123,{"idx":27,"name":"intcept-gun01","tpage_name":"deschase-pris"}],[194052122,{"idx":26,"name":"intcept-base-patern02","tpage_name":"deschase-pris"}],[194052121,{"idx":25,"name":"intcept-base-patern01","tpage_name":"deschase-pris"}],[194052120,{"idx":24,"name":"intcept-base-green01","tpage_name":"deschase-pris"}],[194052119,{"idx":23,"name":"marauder-sword-metal","tpage_name":"deschase-pris"}],[194052118,{"idx":22,"name":"marauder-sword-edge","tpage_name":"deschase-pris"}],[194052117,{"idx":21,"name":"marauder-spike","tpage_name":"deschase-pris"}],[194052116,{"idx":20,"name":"marauder-skirt-02","tpage_name":"deschase-pris"}],[194052115,{"idx":19,"name":"marauder-skirt-01","tpage_name":"deschase-pris"}],[194052114,{"idx":18,"name":"marauder-skin-nipple","tpage_name":"deschase-pris"}],[194052113,{"idx":17,"name":"marauder-skin","tpage_name":"deschase-pris"}],[194052112,{"idx":16,"name":"marauder-shoe-bottom","tpage_name":"deschase-pris"}],[194052111,{"idx":15,"name":"marauder-metal-plate","tpage_name":"deschase-pris"}],[197722126,{"idx":14,"name":"kg-grunt-rim-01","tpage_name":"lfacrm2-pris"}],[193986586,{"idx":26,"name":"seem-uppertorso","tpage_name":"templed-vis-pris2"}],[197722125,{"idx":13,"name":"kg-grunt-cable-01","tpage_name":"lfacrm2-pris"}],[193986585,{"idx":25,"name":"seem-teeth","tpage_name":"templed-vis-pris2"}],[197722124,{"idx":12,"name":"environment-oldmetal","tpage_name":"lfacrm2-pris"}],[193986584,{"idx":24,"name":"seem-straps","tpage_name":"templed-vis-pris2"}],[197722123,{"idx":11,"name":"cguardgame-shoebottom","tpage_name":"lfacrm2-pris"}],[193986583,{"idx":23,"name":"seem-skirt-small","tpage_name":"templed-vis-pris2"}],[197722122,{"idx":10,"name":"cguardgame-metallight-01small","tpage_name":"lfacrm2-pris"}],[193986582,{"idx":22,"name":"seem-skirt","tpage_name":"templed-vis-pris2"}],[197722121,{"idx":9,"name":"cguardgame-metaledark-02","tpage_name":"lfacrm2-pris"}],[193986581,{"idx":21,"name":"seem-precmetal-plain","tpage_name":"templed-vis-pris2"}],[197722120,{"idx":8,"name":"cguardgame-backplate","tpage_name":"lfacrm2-pris"}],[193986580,{"idx":20,"name":"seem-precmetal-edge","tpage_name":"templed-vis-pris2"}],[197722119,{"idx":7,"name":"cguard1-lens","tpage_name":"lfacrm2-pris"}],[193986579,{"idx":19,"name":"seem-precmetal-chestplate-01","tpage_name":"templed-vis-pris2"}],[193724428,{"idx":12,"name":"dm-ship-tentacle-01","tpage_name":"lprenme-pris"}],[193724427,{"idx":11,"name":"dm-ship-plate-01","tpage_name":"lprenme-pris"}],[193724426,{"idx":10,"name":"dm-ship-nose-02","tpage_name":"lprenme-pris"}],[193724425,{"idx":9,"name":"dm-ship-nose-01","tpage_name":"lprenme-pris"}],[193724424,{"idx":8,"name":"dm-ship-hull-02","tpage_name":"lprenme-pris"}],[193724423,{"idx":7,"name":"dm-ship-hull-01","tpage_name":"lprenme-pris"}],[193724422,{"idx":6,"name":"dm-ship-cockpit-01","tpage_name":"lprenme-pris"}],[193724421,{"idx":5,"name":"neo-wasp-eye","tpage_name":"lprenme-pris"}],[193724420,{"idx":4,"name":"neo-wasp-dark-brown","tpage_name":"lprenme-pris"}],[193724419,{"idx":3,"name":"neo-wasp-brown","tpage_name":"lprenme-pris"}],[193724418,{"idx":2,"name":"neo-wasp-body","tpage_name":"lprenme-pris"}],[193724417,{"idx":1,"name":"neo-wasp-base","tpage_name":"lprenme-pris"}],[193724416,{"idx":0,"name":"environment-darkprec","tpage_name":"lprenme-pris"}],[193593344,{"idx":0,"name":"racegate","tpage_name":"lbbring6-sprite"}],[222167066,{"idx":26,"name":"billy-wrap","tpage_name":"museum4-tfrag"}],[193527926,{"idx":118,"name":"vehicle-wheel-01","tpage_name":"desboss2-pris"}],[222167065,{"idx":25,"name":"explorer-belt","tpage_name":"museum4-tfrag"}],[193527925,{"idx":117,"name":"vehicle-snake-tread-02","tpage_name":"desboss2-pris"}],[222167064,{"idx":24,"name":"war-wrapstrap","tpage_name":"museum4-tfrag"}],[193527924,{"idx":116,"name":"vehicle-snake-tread-01","tpage_name":"desboss2-pris"}],[222167042,{"idx":2,"name":"flut-neck","tpage_name":"museum4-tfrag"}],[193527902,{"idx":94,"name":"errolcyber-teeth","tpage_name":"desboss2-pris"}],[222167041,{"idx":1,"name":"flut-yellow2dkblue","tpage_name":"museum4-tfrag"}],[193527901,{"idx":93,"name":"errolcyber-spine","tpage_name":"desboss2-pris"}],[222167040,{"idx":0,"name":"bam-eyelight","tpage_name":"museum4-tfrag"}],[193527900,{"idx":92,"name":"errolcyber-rubberpipe-light","tpage_name":"desboss2-pris"}],[193527899,{"idx":91,"name":"errolcyber-rubberpipe","tpage_name":"desboss2-pris"}],[193527898,{"idx":90,"name":"errolcyber-roboeye","tpage_name":"desboss2-pris"}],[193527897,{"idx":89,"name":"errolcyber-redmetal-03","tpage_name":"desboss2-pris"}],[193527896,{"idx":88,"name":"errolcyber-redmetal-02","tpage_name":"desboss2-pris"}],[193527895,{"idx":87,"name":"errolcyber-redmetal-01","tpage_name":"desboss2-pris"}],[193527894,{"idx":86,"name":"errolcyber-pipes-03","tpage_name":"desboss2-pris"}],[193527893,{"idx":85,"name":"errolcyber-pipes-02","tpage_name":"desboss2-pris"}],[193527892,{"idx":84,"name":"errolcyber-pipes-01","tpage_name":"desboss2-pris"}],[193527891,{"idx":83,"name":"errolcyber-metalgold","tpage_name":"desboss2-pris"}],[193527890,{"idx":82,"name":"errolcyber-metaleyelid","tpage_name":"desboss2-pris"}],[193527889,{"idx":81,"name":"errolcyber-jointpipe","tpage_name":"desboss2-pris"}],[193527888,{"idx":80,"name":"errolcyber-insidewires","tpage_name":"desboss2-pris"}],[193527887,{"idx":79,"name":"errolcyber-insidemouth","tpage_name":"desboss2-pris"}],[193527886,{"idx":78,"name":"errolcyber-head-02","tpage_name":"desboss2-pris"}],[193527885,{"idx":77,"name":"errolcyber-head-01","tpage_name":"desboss2-pris"}],[193527884,{"idx":76,"name":"errolcyber-hair","tpage_name":"desboss2-pris"}],[193527883,{"idx":75,"name":"errolcyber-greymetal-02","tpage_name":"desboss2-pris"}],[193527882,{"idx":74,"name":"errolcyber-greymetal","tpage_name":"desboss2-pris"}],[193527881,{"idx":73,"name":"errolcyber-greyknobs","tpage_name":"desboss2-pris"}],[193527880,{"idx":72,"name":"errolcyber-glovepalm","tpage_name":"desboss2-pris"}],[193527879,{"idx":71,"name":"errolcyber-fingers","tpage_name":"desboss2-pris"}],[193527878,{"idx":70,"name":"errolcyber-earcup","tpage_name":"desboss2-pris"}],[193527877,{"idx":69,"name":"errolcyber-dirtymetal","tpage_name":"desboss2-pris"}],[214695936,{"idx":0,"name":"bt-wasp-flame","tpage_name":"lblowcst-sprite"}],[193527876,{"idx":68,"name":"errolcyber-chestplate","tpage_name":"desboss2-pris"}],[193527875,{"idx":67,"name":"errolcyber-bluewrap","tpage_name":"desboss2-pris"}],[193527874,{"idx":66,"name":"errolcyber-bluemetal-01","tpage_name":"desboss2-pris"}],[193527873,{"idx":65,"name":"errolcyber-bluedome","tpage_name":"desboss2-pris"}],[193527872,{"idx":64,"name":"errolcyber-bigshoulder","tpage_name":"desboss2-pris"}],[193527871,{"idx":63,"name":"errolcyber-bighand-01","tpage_name":"desboss2-pris"}],[193527870,{"idx":62,"name":"errocyber-faceflesh","tpage_name":"desboss2-pris"}],[193527869,{"idx":61,"name":"errocyber-eyelid","tpage_name":"desboss2-pris"}],[193527868,{"idx":60,"name":"errocyber-eye","tpage_name":"desboss2-pris"}],[208470020,{"idx":4,"name":"whack-scoreboard-4","tpage_name":"powergd-sprite"}],[193527860,{"idx":52,"name":"jakchires-teeth","tpage_name":"desboss2-pris"}],[208470019,{"idx":3,"name":"whack-scoreboard-3","tpage_name":"powergd-sprite"}],[193527859,{"idx":51,"name":"jakchires-shoeteop","tpage_name":"desboss2-pris"}],[208470018,{"idx":2,"name":"whack-scoreboard-2","tpage_name":"powergd-sprite"}],[193527858,{"idx":50,"name":"jakchires-shoemetal","tpage_name":"desboss2-pris"}],[208470017,{"idx":1,"name":"whack-scoreboard-1","tpage_name":"powergd-sprite"}],[193527857,{"idx":49,"name":"jakchires-shoebottom","tpage_name":"desboss2-pris"}],[208470016,{"idx":0,"name":"whack-scoreboard-0","tpage_name":"powergd-sprite"}],[193527856,{"idx":48,"name":"jakchires-precarmor-01","tpage_name":"desboss2-pris"}],[193527855,{"idx":47,"name":"jakchires-pants","tpage_name":"desboss2-pris"}],[193527854,{"idx":46,"name":"jakchires-lightbrownspat","tpage_name":"desboss2-pris"}],[193527853,{"idx":45,"name":"jakchires-leatherpouch","tpage_name":"desboss2-pris"}],[193527852,{"idx":44,"name":"jakchires-jacket","tpage_name":"desboss2-pris"}],[193527851,{"idx":43,"name":"jakchires-horn","tpage_name":"desboss2-pris"}],[193527850,{"idx":42,"name":"jakchires-hair","tpage_name":"desboss2-pris"}],[193527849,{"idx":41,"name":"jakchires-glovetop","tpage_name":"desboss2-pris"}],[193527848,{"idx":40,"name":"jakchires-facert","tpage_name":"desboss2-pris"}],[193527847,{"idx":39,"name":"jakchires-facelft","tpage_name":"desboss2-pris"}],[193527846,{"idx":38,"name":"jakchires-eyelid","tpage_name":"desboss2-pris"}],[193527845,{"idx":37,"name":"jakchires-eyebrow","tpage_name":"desboss2-pris"}],[193527844,{"idx":36,"name":"jakchires-eye","tpage_name":"desboss2-pris"}],[193527843,{"idx":35,"name":"jakchires-clips","tpage_name":"desboss2-pris"}],[193527842,{"idx":34,"name":"jakchires-chestplate","tpage_name":"desboss2-pris"}],[193527841,{"idx":33,"name":"jakchires-brwnleather","tpage_name":"desboss2-pris"}],[193527840,{"idx":32,"name":"jakchires-brownstrap","tpage_name":"desboss2-pris"}],[193527839,{"idx":31,"name":"jakchires-blackstrap","tpage_name":"desboss2-pris"}],[193527838,{"idx":30,"name":"jakchires-arm","tpage_name":"desboss2-pris"}],[193527837,{"idx":29,"name":"jakc-wristband-a2","tpage_name":"desboss2-pris"}],[193527836,{"idx":28,"name":"jakc-wraps","tpage_name":"desboss2-pris"}],[193527835,{"idx":27,"name":"jakc-waistband2","tpage_name":"desboss2-pris"}],[193527834,{"idx":26,"name":"jakc-skirt","tpage_name":"desboss2-pris"}],[193527833,{"idx":25,"name":"jakc-scarfhanging","tpage_name":"desboss2-pris"}],[193527832,{"idx":24,"name":"jakc-scarf","tpage_name":"desboss2-pris"}],[193527831,{"idx":23,"name":"jakc-lens","tpage_name":"desboss2-pris"}],[193527830,{"idx":22,"name":"jakc-gogglemetal","tpage_name":"desboss2-pris"}],[193527829,{"idx":21,"name":"jakc-chestplate-straps","tpage_name":"desboss2-pris"}],[192675840,{"idx":0,"name":"racegate","tpage_name":"lbbring5-sprite"}],[190840846,{"idx":14,"name":"precur-nail-01","tpage_name":"precurd-vis-shrub"}],[190840840,{"idx":8,"name":"precur-small-plate-edge","tpage_name":"precurd-vis-shrub"}],[190840839,{"idx":7,"name":"precur-bridge-floor-01","tpage_name":"precurd-vis-shrub"}],[190840838,{"idx":6,"name":"precur-wall-groove-01","tpage_name":"precurd-vis-shrub"}],[190840833,{"idx":1,"name":"precur-blue-light-01","tpage_name":"precurd-vis-shrub"}],[190840832,{"idx":0,"name":"precur-tube-joint-01","tpage_name":"precurd-vis-shrub"}],[190709762,{"idx":2,"name":"neo-wasp-body","tpage_name":"ltowera-vis-pris"}],[190709761,{"idx":1,"name":"neo-wasp-base","tpage_name":"ltowera-vis-pris"}],[208076806,{"idx":6,"name":"terraformer-metal-04","tpage_name":"desboss2-pris2"}],[203096086,{"idx":22,"name":"kg-grunt-rim-03","tpage_name":"lctyass-pris"}],[190644286,{"idx":62,"name":"seem-uppertorso","tpage_name":"templee-pris2"}],[208076805,{"idx":5,"name":"terraformer-metal-03","tpage_name":"desboss2-pris2"}],[203096085,{"idx":21,"name":"kg-grunt-cable-01","tpage_name":"lctyass-pris"}],[190644285,{"idx":61,"name":"seem-teeth","tpage_name":"templee-pris2"}],[208076804,{"idx":4,"name":"terraformer-metal-02","tpage_name":"desboss2-pris2"}],[203096084,{"idx":20,"name":"cguard1-guntube","tpage_name":"lctyass-pris"}],[190644284,{"idx":60,"name":"seem-straps","tpage_name":"templee-pris2"}],[203227137,{"idx":1,"name":"temple_sandstone_ground01","tpage_name":"templed-vis-shrub"}],[194510877,{"idx":29,"name":"jinx-teeth","tpage_name":"gridcst-pris2"}],[189530157,{"idx":45,"name":"wstlander-02-scarf","tpage_name":"desrally-pris"}],[203227136,{"idx":0,"name":"wstd-torchbowl-coal-01","tpage_name":"templed-vis-shrub"}],[194510876,{"idx":28,"name":"jinx-singlerope","tpage_name":"gridcst-pris2"}],[189530156,{"idx":44,"name":"wstlander-02-ponytail","tpage_name":"desrally-pris"}],[194510875,{"idx":27,"name":"jinx-shoebottom2","tpage_name":"gridcst-pris2"}],[189530155,{"idx":43,"name":"wstlander-02-head","tpage_name":"desrally-pris"}],[194510874,{"idx":26,"name":"jinx-shirt","tpage_name":"gridcst-pris2"}],[189530154,{"idx":42,"name":"wstlander-02-glove","tpage_name":"desrally-pris"}],[194510873,{"idx":25,"name":"jinx-scarf","tpage_name":"gridcst-pris2"}],[189530153,{"idx":41,"name":"wstlander-02-eye","tpage_name":"desrally-pris"}],[194510872,{"idx":24,"name":"jinx-rope-01","tpage_name":"gridcst-pris2"}],[189530152,{"idx":40,"name":"wstlander-02-bootheel","tpage_name":"desrally-pris"}],[194510871,{"idx":23,"name":"jinx-pants","tpage_name":"gridcst-pris2"}],[189530151,{"idx":39,"name":"wstlander-02-belt","tpage_name":"desrally-pris"}],[194510870,{"idx":22,"name":"jinx-kneepad","tpage_name":"gridcst-pris2"}],[189530150,{"idx":38,"name":"wstlander-02-armor","tpage_name":"desrally-pris"}],[194510869,{"idx":21,"name":"jinx-iris","tpage_name":"gridcst-pris2"}],[189530149,{"idx":37,"name":"wstlander-02-arm","tpage_name":"desrally-pris"}],[194510868,{"idx":20,"name":"jinx-handle","tpage_name":"gridcst-pris2"}],[189530148,{"idx":36,"name":"wstlander-01-wrap","tpage_name":"desrally-pris"}],[194510867,{"idx":19,"name":"jinx-hairtye","tpage_name":"gridcst-pris2"}],[189530147,{"idx":35,"name":"wstlander-01-skirt","tpage_name":"desrally-pris"}],[194510866,{"idx":18,"name":"jinx-hair","tpage_name":"gridcst-pris2"}],[189530146,{"idx":34,"name":"wstlander-01-shoulderarmor","tpage_name":"desrally-pris"}],[194510865,{"idx":17,"name":"jinx-glovepalm","tpage_name":"gridcst-pris2"}],[189530145,{"idx":33,"name":"wstlander-01-shoetop","tpage_name":"desrally-pris"}],[194510864,{"idx":16,"name":"jinx-glove","tpage_name":"gridcst-pris2"}],[189530144,{"idx":32,"name":"wstlander-01-shoebottom","tpage_name":"desrally-pris"}],[194510863,{"idx":15,"name":"jinx-finger","tpage_name":"gridcst-pris2"}],[189530143,{"idx":31,"name":"wstlander-01-pants","tpage_name":"desrally-pris"}],[194510862,{"idx":14,"name":"jinx-face","tpage_name":"gridcst-pris2"}],[189530142,{"idx":30,"name":"wstlander-01-mustache","tpage_name":"desrally-pris"}],[194510857,{"idx":9,"name":"jinx-brownstrapbolts","tpage_name":"gridcst-pris2"}],[189530137,{"idx":25,"name":"wstlander-01-gunmetal-02","tpage_name":"desrally-pris"}],[194510856,{"idx":8,"name":"jinx-brownstrap","tpage_name":"gridcst-pris2"}],[189530136,{"idx":24,"name":"wstlander-01-gunmetal-01","tpage_name":"desrally-pris"}],[194510855,{"idx":7,"name":"jinx-boottop","tpage_name":"gridcst-pris2"}],[189530135,{"idx":23,"name":"wstlander-01-eye","tpage_name":"desrally-pris"}],[194510854,{"idx":6,"name":"jinx-boottoe","tpage_name":"gridcst-pris2"}],[189530134,{"idx":22,"name":"des-rope-01","tpage_name":"desrally-pris"}],[194510853,{"idx":5,"name":"jinx-blademetal","tpage_name":"gridcst-pris2"}],[189530133,{"idx":21,"name":"des-pole-brace","tpage_name":"desrally-pris"}],[194510852,{"idx":4,"name":"jinx-belt","tpage_name":"gridcst-pris2"}],[189530132,{"idx":20,"name":"des-pole-01","tpage_name":"desrally-pris"}],[194510851,{"idx":3,"name":"jinx-arm","tpage_name":"gridcst-pris2"}],[189530131,{"idx":19,"name":"des-corral-plate-02","tpage_name":"desrally-pris"}],[194510850,{"idx":2,"name":"environment-oldmetal","tpage_name":"gridcst-pris2"}],[189530130,{"idx":18,"name":"des-corral-metal-01","tpage_name":"desrally-pris"}],[194510849,{"idx":1,"name":"bam-hairhilite","tpage_name":"gridcst-pris2"}],[189530129,{"idx":17,"name":"vehicle-wheel-blur-01","tpage_name":"desrally-pris"}],[194510848,{"idx":0,"name":"bam-eyelight","tpage_name":"gridcst-pris2"}],[189530128,{"idx":16,"name":"vehicle-wheel-01","tpage_name":"desrally-pris"}],[193265667,{"idx":3,"name":"tow-energy-bridge","tpage_name":"towerb-vis-water"}],[189530127,{"idx":15,"name":"vehicle-tread-blur-02","tpage_name":"desrally-pris"}],[195559433,{"idx":9,"name":"jinx-brownstrap","tpage_name":"towercst-pris2"}],[189333533,{"idx":29,"name":"rail-light-green","tpage_name":"comba-shrub"}],[195559432,{"idx":8,"name":"jinx-boottop","tpage_name":"towercst-pris2"}],[189333532,{"idx":28,"name":"vehicle-snake-drum-03","tpage_name":"comba-shrub"}],[195559431,{"idx":7,"name":"jinx-boottoe","tpage_name":"towercst-pris2"}],[189333531,{"idx":27,"name":"vehicle-snake-drum-01","tpage_name":"comba-shrub"}],[195559430,{"idx":6,"name":"jinx-blademetal","tpage_name":"towercst-pris2"}],[189333530,{"idx":26,"name":"vehicle-snake-tank-01","tpage_name":"comba-shrub"}],[195559429,{"idx":5,"name":"jinx-belt","tpage_name":"towercst-pris2"}],[189333529,{"idx":25,"name":"vehicle-snake-drum-02","tpage_name":"comba-shrub"}],[195559428,{"idx":4,"name":"jinx-arm","tpage_name":"towercst-pris2"}],[189333528,{"idx":24,"name":"vehicle-rims-01","tpage_name":"comba-shrub"}],[195559427,{"idx":3,"name":"environment-oldmetal","tpage_name":"towercst-pris2"}],[189333527,{"idx":23,"name":"vehicle-snake-gun-01","tpage_name":"comba-shrub"}],[195559426,{"idx":2,"name":"charHOLD","tpage_name":"towercst-pris2"}],[189333526,{"idx":22,"name":"vehicle-cushion-01","tpage_name":"comba-shrub"}],[195559425,{"idx":1,"name":"bam-hairhilite","tpage_name":"towercst-pris2"}],[189333525,{"idx":21,"name":"common-black","tpage_name":"comba-shrub"}],[195559424,{"idx":0,"name":"bam-eyelight","tpage_name":"towercst-pris2"}],[189333524,{"idx":20,"name":"vehicle-snake-gun-02","tpage_name":"comba-shrub"}],[189333523,{"idx":19,"name":"vehicle-cap-pin-01","tpage_name":"comba-shrub"}],[189333522,{"idx":18,"name":"vehicle-brace-pipe-01","tpage_name":"comba-shrub"}],[189333521,{"idx":17,"name":"vehicle-metal-plate-02","tpage_name":"comba-shrub"}],[189333520,{"idx":16,"name":"vehicle-safety-plate-01","tpage_name":"comba-shrub"}],[189333519,{"idx":15,"name":"vehicle-body-panel-01","tpage_name":"comba-shrub"}],[189333518,{"idx":14,"name":"vehicle-chrome-pipe-01","tpage_name":"comba-shrub"}],[189333517,{"idx":13,"name":"vehicle-pipe-01","tpage_name":"comba-shrub"}],[189333516,{"idx":12,"name":"vehicle-snake-tank-02","tpage_name":"comba-shrub"}],[189333515,{"idx":11,"name":"vehicle-exhaust-pipe-01","tpage_name":"comba-shrub"}],[189333514,{"idx":10,"name":"vehicle-snake-chassis-01","tpage_name":"comba-shrub"}],[189333512,{"idx":8,"name":"rail-light-blue","tpage_name":"comba-shrub"}],[189333511,{"idx":7,"name":"rail-chair-01","tpage_name":"comba-shrub"}],[189333510,{"idx":6,"name":"rail-car-vent-01","tpage_name":"comba-shrub"}],[189333509,{"idx":5,"name":"rail-gray-metal-01","tpage_name":"comba-shrub"}],[189333508,{"idx":4,"name":"rail-dash-01","tpage_name":"comba-shrub"}],[189333507,{"idx":3,"name":"rail-pipe-03","tpage_name":"comba-shrub"}],[189333506,{"idx":2,"name":"rail-rider-decal-01","tpage_name":"comba-shrub"}],[189333505,{"idx":1,"name":"rail-base-dark-01","tpage_name":"comba-shrub"}],[189333504,{"idx":0,"name":"rail-env-wall-01","tpage_name":"comba-shrub"}],[223871008,{"idx":32,"name":"brut-armfur","tpage_name":"museum3b-pris2"}],[189005968,{"idx":144,"name":"errolcyber-roboeye","tpage_name":"factoryd-vis-pris"}],[223871007,{"idx":31,"name":"brut-ankle","tpage_name":"museum3b-pris2"}],[189005967,{"idx":143,"name":"errolcyber-metaleyelid","tpage_name":"factoryd-vis-pris"}],[223871006,{"idx":30,"name":"baron-wristguard","tpage_name":"museum3b-pris2"}],[189005966,{"idx":142,"name":"errocyber-eyelid","tpage_name":"factoryd-vis-pris"}],[223871005,{"idx":29,"name":"baron-whitestrap","tpage_name":"museum3b-pris2"}],[189005965,{"idx":141,"name":"errocyber-eye","tpage_name":"factoryd-vis-pris"}],[223871004,{"idx":28,"name":"baron-swordtop","tpage_name":"museum3b-pris2"}],[189005964,{"idx":140,"name":"eco-lt-cryst-03","tpage_name":"factoryd-vis-pris"}],[223871003,{"idx":27,"name":"baron-swordhilt","tpage_name":"museum3b-pris2"}],[189005963,{"idx":139,"name":"eco-lt-cryst-02","tpage_name":"factoryd-vis-pris"}],[223871002,{"idx":26,"name":"baron-swordhandles","tpage_name":"museum3b-pris2"}],[189005962,{"idx":138,"name":"squid-drabgun","tpage_name":"factoryd-vis-pris"}],[223871001,{"idx":25,"name":"baron-swordcovertip","tpage_name":"museum3b-pris2"}],[189005961,{"idx":137,"name":"neo-wasp-eye","tpage_name":"factoryd-vis-pris"}],[223871000,{"idx":24,"name":"baron-swordcover","tpage_name":"museum3b-pris2"}],[189005960,{"idx":136,"name":"neo-wasp-dark-brown","tpage_name":"factoryd-vis-pris"}],[223870999,{"idx":23,"name":"baron-shoulder","tpage_name":"museum3b-pris2"}],[189005959,{"idx":135,"name":"neo-wasp-brown","tpage_name":"factoryd-vis-pris"}],[223870998,{"idx":22,"name":"baron-shoebottom","tpage_name":"museum3b-pris2"}],[189005958,{"idx":134,"name":"neo-wasp-body","tpage_name":"factoryd-vis-pris"}],[223870997,{"idx":21,"name":"baron-scarfend","tpage_name":"museum3b-pris2"}],[189005957,{"idx":133,"name":"neo-wasp-base","tpage_name":"factoryd-vis-pris"}],[223870996,{"idx":20,"name":"baron-scarf","tpage_name":"museum3b-pris2"}],[189005956,{"idx":132,"name":"environment-darkprec","tpage_name":"factoryd-vis-pris"}],[223870995,{"idx":19,"name":"baron-pipes","tpage_name":"museum3b-pris2"}],[189005955,{"idx":131,"name":"dp-bipedal-toe-01","tpage_name":"factoryd-vis-pris"}],[223870994,{"idx":18,"name":"baron-pants","tpage_name":"museum3b-pris2"}],[189005954,{"idx":130,"name":"dp-bipedal-spine-01","tpage_name":"factoryd-vis-pris"}],[223870993,{"idx":17,"name":"baron-largebutton","tpage_name":"museum3b-pris2"}],[189005953,{"idx":129,"name":"dp-bipedal-skin-ribs-01","tpage_name":"factoryd-vis-pris"}],[223870992,{"idx":16,"name":"baron-jacketsleeve","tpage_name":"museum3b-pris2"}],[189005952,{"idx":128,"name":"dp-bipedal-skin-plate-small-01","tpage_name":"factoryd-vis-pris"}],[223870991,{"idx":15,"name":"baron-jacketinside","tpage_name":"museum3b-pris2"}],[189005951,{"idx":127,"name":"dp-bipedal-skin-plate-01","tpage_name":"factoryd-vis-pris"}],[223870990,{"idx":14,"name":"baron-headshield","tpage_name":"museum3b-pris2"}],[189005950,{"idx":126,"name":"dp-bipedal-skin-bulge-02","tpage_name":"factoryd-vis-pris"}],[223870989,{"idx":13,"name":"baron-hand","tpage_name":"museum3b-pris2"}],[189005949,{"idx":125,"name":"dp-bipedal-skin-bulge-01","tpage_name":"factoryd-vis-pris"}],[223870988,{"idx":12,"name":"baron-face","tpage_name":"museum3b-pris2"}],[189005948,{"idx":124,"name":"dp-bipedal-power-hose","tpage_name":"factoryd-vis-pris"}],[223870987,{"idx":11,"name":"baron-eyelid","tpage_name":"museum3b-pris2"}],[189005947,{"idx":123,"name":"dp-bipedal-nose-01","tpage_name":"factoryd-vis-pris"}],[223870986,{"idx":10,"name":"baron-eye","tpage_name":"museum3b-pris2"}],[189005946,{"idx":122,"name":"dp-bipedal-finger-plate-01","tpage_name":"factoryd-vis-pris"}],[223870985,{"idx":9,"name":"baron-chestemblem","tpage_name":"museum3b-pris2"}],[189005945,{"idx":121,"name":"dp-bipedal-eye-01","tpage_name":"factoryd-vis-pris"}],[223870984,{"idx":8,"name":"baron-brushedmetal","tpage_name":"museum3b-pris2"}],[189005944,{"idx":120,"name":"dp-bipedal-dk-stomach-plate-01","tpage_name":"factoryd-vis-pris"}],[223870983,{"idx":7,"name":"baron-brownleatherstrap","tpage_name":"museum3b-pris2"}],[189005943,{"idx":119,"name":"dp-bipedal-dk-sm-plate-01","tpage_name":"factoryd-vis-pris"}],[223870982,{"idx":6,"name":"baron-bolts","tpage_name":"museum3b-pris2"}],[189005942,{"idx":118,"name":"dp-bipedal-dk-plate-04","tpage_name":"factoryd-vis-pris"}],[223870981,{"idx":5,"name":"baron-blackleatherstrap","tpage_name":"museum3b-pris2"}],[189005941,{"idx":117,"name":"dp-bipedal-dk-plate-03","tpage_name":"factoryd-vis-pris"}],[223870980,{"idx":4,"name":"baron-beard","tpage_name":"museum3b-pris2"}],[189005940,{"idx":116,"name":"dp-bipedal-dk-plate-02","tpage_name":"factoryd-vis-pris"}],[223870979,{"idx":3,"name":"baron-armshield","tpage_name":"museum3b-pris2"}],[189005939,{"idx":115,"name":"dp-bipedal-dk-plate-01","tpage_name":"factoryd-vis-pris"}],[223870978,{"idx":2,"name":"baron-armor","tpage_name":"museum3b-pris2"}],[189005938,{"idx":114,"name":"dp-bipedal-dk-hose-01","tpage_name":"factoryd-vis-pris"}],[223870977,{"idx":1,"name":"bam-hairhilite","tpage_name":"museum3b-pris2"}],[189005937,{"idx":113,"name":"dp-bipedal-chest-01","tpage_name":"factoryd-vis-pris"}],[223870976,{"idx":0,"name":"bam-eyelight","tpage_name":"museum3b-pris2"}],[189005936,{"idx":112,"name":"dp-bipedal-backhand-01","tpage_name":"factoryd-vis-pris"}],[189005935,{"idx":111,"name":"missle-bot-wire-01","tpage_name":"factoryd-vis-pris"}],[189005934,{"idx":110,"name":"missle-bot-thruster-02","tpage_name":"factoryd-vis-pris"}],[189005933,{"idx":109,"name":"missle-bot-thruster-01","tpage_name":"factoryd-vis-pris"}],[189005932,{"idx":108,"name":"missle-bot-pipe-02","tpage_name":"factoryd-vis-pris"}],[189005931,{"idx":107,"name":"missle-bot-pipe-01","tpage_name":"factoryd-vis-pris"}],[189005930,{"idx":106,"name":"missle-bot-leg-01","tpage_name":"factoryd-vis-pris"}],[189005929,{"idx":105,"name":"missle-bot-hull-01","tpage_name":"factoryd-vis-pris"}],[221380608,{"idx":0,"name":"des-bush-timer-chase-trail","tpage_name":"lbbtcha1-water"}],[189005928,{"idx":104,"name":"missle-bot-generator-03","tpage_name":"factoryd-vis-pris"}],[189005927,{"idx":103,"name":"missle-bot-generator-02","tpage_name":"factoryd-vis-pris"}],[189005926,{"idx":102,"name":"missle-bot-generator-01","tpage_name":"factoryd-vis-pris"}],[189005925,{"idx":101,"name":"missle-bot-gear-03","tpage_name":"factoryd-vis-pris"}],[189005924,{"idx":100,"name":"missle-bot-gear-02","tpage_name":"factoryd-vis-pris"}],[189005923,{"idx":99,"name":"missle-bot-gear-01","tpage_name":"factoryd-vis-pris"}],[189005922,{"idx":98,"name":"missle-bot-eye-01","tpage_name":"factoryd-vis-pris"}],[189005921,{"idx":97,"name":"common-black","tpage_name":"factoryd-vis-pris"}],[189005919,{"idx":95,"name":"wire-metal","tpage_name":"factoryd-vis-pris"}],[189005918,{"idx":94,"name":"widow-pod-gun-metal","tpage_name":"factoryd-vis-pris"}],[189005917,{"idx":93,"name":"widow-dull-inards","tpage_name":"factoryd-vis-pris"}],[189005916,{"idx":92,"name":"squid-tubes","tpage_name":"factoryd-vis-pris"}],[189005913,{"idx":89,"name":"squid-bulb-sm","tpage_name":"factoryd-vis-pris"}],[189005912,{"idx":88,"name":"spydroid-red","tpage_name":"factoryd-vis-pris"}],[189005911,{"idx":87,"name":"spydroid-light-small-red","tpage_name":"factoryd-vis-pris"}],[189005910,{"idx":86,"name":"spydroid-light-small","tpage_name":"factoryd-vis-pris"}],[189005909,{"idx":85,"name":"spydroid-light","tpage_name":"factoryd-vis-pris"}],[208928788,{"idx":20,"name":"terraformer-bluelight","tpage_name":"precurd-vis-pris2"}],[189005908,{"idx":84,"name":"spydroid-leg-grey-end","tpage_name":"factoryd-vis-pris"}],[208928787,{"idx":19,"name":"terraformer-tank-01","tpage_name":"precurd-vis-pris2"}],[189005907,{"idx":83,"name":"spydroid-leg-grey","tpage_name":"factoryd-vis-pris"}],[208928786,{"idx":18,"name":"terraformer-organic-05","tpage_name":"precurd-vis-pris2"}],[189005906,{"idx":82,"name":"spydroid-gold","tpage_name":"factoryd-vis-pris"}],[208928785,{"idx":17,"name":"terraformer-organic-04","tpage_name":"precurd-vis-pris2"}],[189005905,{"idx":81,"name":"roboguard-shouldershield","tpage_name":"factoryd-vis-pris"}],[213909504,{"idx":0,"name":"kg-rob-trans-tank-01","tpage_name":"lctyprot-water"}],[208928784,{"idx":16,"name":"terraformer-organic-03","tpage_name":"precurd-vis-pris2"}],[189005904,{"idx":80,"name":"roboguard-headshield","tpage_name":"factoryd-vis-pris"}],[208928783,{"idx":15,"name":"terraformer-organic-02","tpage_name":"precurd-vis-pris2"}],[189005903,{"idx":79,"name":"roboguard-die-stamped-metal-red","tpage_name":"factoryd-vis-pris"}],[208928782,{"idx":14,"name":"terraformer-organic-01","tpage_name":"precurd-vis-pris2"}],[189005902,{"idx":78,"name":"roboguard-die-stamped-metal-blue","tpage_name":"factoryd-vis-pris"}],[208928781,{"idx":13,"name":"terraformer-minestrips-01","tpage_name":"precurd-vis-pris2"}],[189005901,{"idx":77,"name":"kg-grunt-rim-03","tpage_name":"factoryd-vis-pris"}],[208928780,{"idx":12,"name":"terraformer-metal-11","tpage_name":"precurd-vis-pris2"}],[189005900,{"idx":76,"name":"kg-grunt-rim-02","tpage_name":"factoryd-vis-pris"}],[208928779,{"idx":11,"name":"terraformer-metal-10","tpage_name":"precurd-vis-pris2"}],[189005899,{"idx":75,"name":"kg-grunt-rim-01","tpage_name":"factoryd-vis-pris"}],[208928778,{"idx":10,"name":"terraformer-metal-09","tpage_name":"precurd-vis-pris2"}],[189005898,{"idx":74,"name":"kg-grunt-cable-01","tpage_name":"factoryd-vis-pris"}],[208928775,{"idx":7,"name":"terraformer-metal-05","tpage_name":"precurd-vis-pris2"}],[189005895,{"idx":71,"name":"cguardgame-shoebottom","tpage_name":"factoryd-vis-pris"}],[208928773,{"idx":5,"name":"terraformer-metal-03","tpage_name":"precurd-vis-pris2"}],[189005893,{"idx":69,"name":"cguardgame-metallight-01small","tpage_name":"factoryd-vis-pris"}],[208928771,{"idx":3,"name":"terraformer-metal-01","tpage_name":"precurd-vis-pris2"}],[189005891,{"idx":67,"name":"cguardgame-metaledark-02","tpage_name":"factoryd-vis-pris"}],[189005882,{"idx":58,"name":"cguardgame-backplate","tpage_name":"factoryd-vis-pris"}],[189005881,{"idx":57,"name":"cguard1-lens","tpage_name":"factoryd-vis-pris"}],[189005880,{"idx":56,"name":"cguard1-guntube","tpage_name":"factoryd-vis-pris"}],[189005879,{"idx":55,"name":"cguard1-gunmetaldark2","tpage_name":"factoryd-vis-pris"}],[197722138,{"idx":26,"name":"squid-drabgun","tpage_name":"lfacrm2-pris"}],[189005878,{"idx":54,"name":"cguard1-chestplate","tpage_name":"factoryd-vis-pris"}],[197722137,{"idx":25,"name":"wire-metal","tpage_name":"lfacrm2-pris"}],[189005877,{"idx":53,"name":"cguard1-backmetal","tpage_name":"factoryd-vis-pris"}],[197722136,{"idx":24,"name":"widow-pod-gun-metal","tpage_name":"lfacrm2-pris"}],[189005876,{"idx":52,"name":"brown-hose","tpage_name":"factoryd-vis-pris"}],[198967298,{"idx":2,"name":"terraformer-cpitwindows-02","tpage_name":"desboss2-water"}],[197722118,{"idx":6,"name":"cguard1-guntube","tpage_name":"lfacrm2-pris"}],[193986578,{"idx":18,"name":"seem-pipes-02","tpage_name":"templed-vis-pris2"}],[189005858,{"idx":34,"name":"blue-gem","tpage_name":"factoryd-vis-pris"}],[198967297,{"idx":1,"name":"terraformer-cpitwindows-01","tpage_name":"desboss2-water"}],[197722117,{"idx":5,"name":"cguard1-gunmetaldark2","tpage_name":"lfacrm2-pris"}],[193986577,{"idx":17,"name":"seem-pipes-01","tpage_name":"templed-vis-pris2"}],[189005857,{"idx":33,"name":"errolcyber-teeth","tpage_name":"factoryd-vis-pris"}],[198967296,{"idx":0,"name":"errolcyber-lens","tpage_name":"desboss2-water"}],[197722116,{"idx":4,"name":"cguard1-chestplate","tpage_name":"lfacrm2-pris"}],[193986576,{"idx":16,"name":"seem-pipeend","tpage_name":"templed-vis-pris2"}],[189005856,{"idx":32,"name":"errolcyber-spine","tpage_name":"factoryd-vis-pris"}],[197722115,{"idx":3,"name":"cguard1-backmetal","tpage_name":"lfacrm2-pris"}],[193986575,{"idx":15,"name":"seem-headpiecetop","tpage_name":"templed-vis-pris2"}],[189005855,{"idx":31,"name":"errolcyber-rubberpipe-light","tpage_name":"factoryd-vis-pris"}],[197722114,{"idx":2,"name":"brown-hose","tpage_name":"lfacrm2-pris"}],[193986574,{"idx":14,"name":"seem-headgearback","tpage_name":"templed-vis-pris2"}],[189005854,{"idx":30,"name":"errolcyber-rubberpipe","tpage_name":"factoryd-vis-pris"}],[197722113,{"idx":1,"name":"blue-gem","tpage_name":"lfacrm2-pris"}],[193986573,{"idx":13,"name":"seem-hand","tpage_name":"templed-vis-pris2"}],[189005853,{"idx":29,"name":"errolcyber-redmetal-03","tpage_name":"factoryd-vis-pris"}],[197722112,{"idx":0,"name":"bam-eyelight","tpage_name":"lfacrm2-pris"}],[193986572,{"idx":12,"name":"seem-finger","tpage_name":"templed-vis-pris2"}],[189005852,{"idx":28,"name":"errolcyber-redmetal-02","tpage_name":"factoryd-vis-pris"}],[193986571,{"idx":11,"name":"seem-face","tpage_name":"templed-vis-pris2"}],[189005851,{"idx":27,"name":"errolcyber-redmetal-01","tpage_name":"factoryd-vis-pris"}],[193986570,{"idx":10,"name":"seem-eyelid","tpage_name":"templed-vis-pris2"}],[189005850,{"idx":26,"name":"errolcyber-pipes-03","tpage_name":"factoryd-vis-pris"}],[188940299,{"idx":11,"name":"facc-markings-05","tpage_name":"factoryd-vis-shrub"}],[188940298,{"idx":10,"name":"facc-markings-06","tpage_name":"factoryd-vis-shrub"}],[206241799,{"idx":7,"name":"mhcity-mektunnel","tpage_name":"lctydest-tfrag"}],[188809279,{"idx":63,"name":"facc-redspot","tpage_name":"factoryd-vis-tfrag"}],[206241797,{"idx":5,"name":"mhcity-building-base-01","tpage_name":"lctydest-tfrag"}],[188809277,{"idx":61,"name":"facc-metal-panel-07-lotweak","tpage_name":"factoryd-vis-tfrag"}],[202506247,{"idx":7,"name":"rail-light-red","tpage_name":"raila-alpha"}],[188809267,{"idx":51,"name":"facd-blue-glow-panel-01","tpage_name":"factoryd-vis-tfrag"}],[188088323,{"idx":3,"name":"holograph-env-scan","tpage_name":"lvincst-warp"}],[188088322,{"idx":2,"name":"holograph-env-rim","tpage_name":"lvincst-warp"}],[188088321,{"idx":1,"name":"holograph-env-noise","tpage_name":"lvincst-warp"}],[188088320,{"idx":0,"name":"holograph-env-rim-dest","tpage_name":"lvincst-warp"}],[195493922,{"idx":34,"name":"jakchires-chestplate","tpage_name":"towercst-pris"}],[188022842,{"idx":58,"name":"cipher-side-03","tpage_name":"lvincst-pris"}],[195493921,{"idx":33,"name":"jakchires-brwnleather","tpage_name":"towercst-pris"}],[188022841,{"idx":57,"name":"cipher-side-02","tpage_name":"lvincst-pris"}],[195493920,{"idx":32,"name":"jakchires-brownstrap","tpage_name":"towercst-pris"}],[188022840,{"idx":56,"name":"cipher-side-01","tpage_name":"lvincst-pris"}],[195493919,{"idx":31,"name":"jakchires-blackstrap","tpage_name":"towercst-pris"}],[188022839,{"idx":55,"name":"cipher-drum-03","tpage_name":"lvincst-pris"}],[195493918,{"idx":30,"name":"jakchires-arm","tpage_name":"towercst-pris"}],[188022838,{"idx":54,"name":"cipher-drum-02","tpage_name":"lvincst-pris"}],[195493917,{"idx":29,"name":"jakc-wristband-a2","tpage_name":"towercst-pris"}],[188022837,{"idx":53,"name":"cipher-drum-01","tpage_name":"lvincst-pris"}],[195493916,{"idx":28,"name":"jakc-wraps","tpage_name":"towercst-pris"}],[188022836,{"idx":52,"name":"jakchires-teeth","tpage_name":"lvincst-pris"}],[195493915,{"idx":27,"name":"jakc-waistband2","tpage_name":"towercst-pris"}],[188022835,{"idx":51,"name":"jakchires-shoeteop","tpage_name":"lvincst-pris"}],[195493914,{"idx":26,"name":"jakc-skirt","tpage_name":"towercst-pris"}],[188022834,{"idx":50,"name":"jakchires-shoemetal","tpage_name":"lvincst-pris"}],[195493913,{"idx":25,"name":"jakc-scarfhanging","tpage_name":"towercst-pris"}],[188022833,{"idx":49,"name":"jakchires-shoebottom","tpage_name":"lvincst-pris"}],[195493912,{"idx":24,"name":"jakc-scarf","tpage_name":"towercst-pris"}],[188022832,{"idx":48,"name":"jakchires-precarmor-01","tpage_name":"lvincst-pris"}],[195493911,{"idx":23,"name":"jakc-lens","tpage_name":"towercst-pris"}],[188022831,{"idx":47,"name":"jakchires-pants","tpage_name":"lvincst-pris"}],[195493910,{"idx":22,"name":"jakc-gogglemetal","tpage_name":"towercst-pris"}],[188022830,{"idx":46,"name":"jakchires-lightbrownspat","tpage_name":"lvincst-pris"}],[195493909,{"idx":21,"name":"jakc-chestplate-straps","tpage_name":"towercst-pris"}],[188022829,{"idx":45,"name":"jakchires-leatherpouch","tpage_name":"lvincst-pris"}],[195493908,{"idx":20,"name":"jakc-armor","tpage_name":"towercst-pris"}],[188022828,{"idx":44,"name":"jakchires-jacket","tpage_name":"lvincst-pris"}],[195493907,{"idx":19,"name":"environment-oldmetal","tpage_name":"towercst-pris"}],[188022827,{"idx":43,"name":"jakchires-horn","tpage_name":"lvincst-pris"}],[195493906,{"idx":18,"name":"daxtertuft","tpage_name":"towercst-pris"}],[188022826,{"idx":42,"name":"jakchires-hair","tpage_name":"lvincst-pris"}],[195493905,{"idx":17,"name":"daxterteeth","tpage_name":"towercst-pris"}],[188022825,{"idx":41,"name":"jakchires-glovetop","tpage_name":"lvincst-pris"}],[195493904,{"idx":16,"name":"daxternose","tpage_name":"towercst-pris"}],[188022824,{"idx":40,"name":"jakchires-facert","tpage_name":"lvincst-pris"}],[195493903,{"idx":15,"name":"daxterlense","tpage_name":"towercst-pris"}],[188022823,{"idx":39,"name":"jakchires-facelft","tpage_name":"lvincst-pris"}],[195493902,{"idx":14,"name":"daxterhelmetplain","tpage_name":"towercst-pris"}],[188022822,{"idx":38,"name":"jakchires-eyelid","tpage_name":"lvincst-pris"}],[195493901,{"idx":13,"name":"daxterheadwidenew","tpage_name":"towercst-pris"}],[188022821,{"idx":37,"name":"jakchires-eyebrow","tpage_name":"lvincst-pris"}],[195493900,{"idx":12,"name":"daxtergoggles","tpage_name":"towercst-pris"}],[188022820,{"idx":36,"name":"jakchires-eye","tpage_name":"lvincst-pris"}],[195493899,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"towercst-pris"}],[188022819,{"idx":35,"name":"jakchires-clips","tpage_name":"lvincst-pris"}],[195493898,{"idx":10,"name":"daxterfoot","tpage_name":"towercst-pris"}],[188022818,{"idx":34,"name":"jakchires-chestplate","tpage_name":"lvincst-pris"}],[195493897,{"idx":9,"name":"daxterfinger","tpage_name":"towercst-pris"}],[188022817,{"idx":33,"name":"jakchires-brwnleather","tpage_name":"lvincst-pris"}],[195493896,{"idx":8,"name":"daxterear","tpage_name":"towercst-pris"}],[188022816,{"idx":32,"name":"jakchires-brownstrap","tpage_name":"lvincst-pris"}],[195493895,{"idx":7,"name":"daxterbolt","tpage_name":"towercst-pris"}],[188022815,{"idx":31,"name":"jakchires-blackstrap","tpage_name":"lvincst-pris"}],[195493894,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"towercst-pris"}],[188022814,{"idx":30,"name":"jakchires-arm","tpage_name":"lvincst-pris"}],[195493893,{"idx":5,"name":"daxterarm","tpage_name":"towercst-pris"}],[188022813,{"idx":29,"name":"jakc-wristband-a2","tpage_name":"lvincst-pris"}],[195493892,{"idx":4,"name":"daxter-orange","tpage_name":"towercst-pris"}],[188022812,{"idx":28,"name":"jakc-wraps","tpage_name":"lvincst-pris"}],[195493891,{"idx":3,"name":"daxter-furhilite","tpage_name":"towercst-pris"}],[188022811,{"idx":27,"name":"jakc-waistband2","tpage_name":"lvincst-pris"}],[195493890,{"idx":2,"name":"daxter-eyelid","tpage_name":"towercst-pris"}],[188022810,{"idx":26,"name":"jakc-skirt","tpage_name":"lvincst-pris"}],[195493889,{"idx":1,"name":"bam-hairhilite","tpage_name":"towercst-pris"}],[194248709,{"idx":5,"name":"neo-wasp-eye","tpage_name":"lprecurc-vis-pris"}],[188022809,{"idx":25,"name":"jakc-scarfhanging","tpage_name":"lvincst-pris"}],[195493888,{"idx":0,"name":"bam-eyelight","tpage_name":"towercst-pris"}],[194248708,{"idx":4,"name":"neo-wasp-dark-brown","tpage_name":"lprecurc-vis-pris"}],[188022808,{"idx":24,"name":"jakc-scarf","tpage_name":"lvincst-pris"}],[194248707,{"idx":3,"name":"neo-wasp-brown","tpage_name":"lprecurc-vis-pris"}],[188022807,{"idx":23,"name":"jakc-lens","tpage_name":"lvincst-pris"}],[194248706,{"idx":2,"name":"neo-wasp-body","tpage_name":"lprecurc-vis-pris"}],[188022806,{"idx":22,"name":"jakc-gogglemetal","tpage_name":"lvincst-pris"}],[194248705,{"idx":1,"name":"neo-wasp-base","tpage_name":"lprecurc-vis-pris"}],[188022805,{"idx":21,"name":"jakc-chestplate-straps","tpage_name":"lvincst-pris"}],[194248704,{"idx":0,"name":"environment-darkprec","tpage_name":"lprecurc-vis-pris"}],[188022804,{"idx":20,"name":"jakc-armor","tpage_name":"lvincst-pris"}],[188022803,{"idx":19,"name":"environment-oldmetal","tpage_name":"lvincst-pris"}],[188022802,{"idx":18,"name":"daxtertuft","tpage_name":"lvincst-pris"}],[188022801,{"idx":17,"name":"daxterteeth","tpage_name":"lvincst-pris"}],[188022800,{"idx":16,"name":"daxternose","tpage_name":"lvincst-pris"}],[188022799,{"idx":15,"name":"daxterlense","tpage_name":"lvincst-pris"}],[188022798,{"idx":14,"name":"daxterhelmetplain","tpage_name":"lvincst-pris"}],[188022797,{"idx":13,"name":"daxterheadwidenew","tpage_name":"lvincst-pris"}],[188022796,{"idx":12,"name":"daxtergoggles","tpage_name":"lvincst-pris"}],[188022795,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"lvincst-pris"}],[188022794,{"idx":10,"name":"daxterfoot","tpage_name":"lvincst-pris"}],[188022793,{"idx":9,"name":"daxterfinger","tpage_name":"lvincst-pris"}],[187367424,{"idx":0,"name":"racegate","tpage_name":"lbbring3-sprite"}],[187170866,{"idx":50,"name":"dm-urchin-light-02-dest","tpage_name":"deswalk-vis-pris"}],[187170865,{"idx":49,"name":"terraformer-transstrips-01","tpage_name":"deswalk-vis-pris"}],[187170864,{"idx":48,"name":"terraformer-minecore","tpage_name":"deswalk-vis-pris"}],[187170863,{"idx":47,"name":"ecocreature-palm","tpage_name":"deswalk-vis-pris"}],[187170862,{"idx":46,"name":"ecocreature-joint","tpage_name":"deswalk-vis-pris"}],[187170861,{"idx":45,"name":"ecocreature-insidemouth","tpage_name":"deswalk-vis-pris"}],[187170860,{"idx":44,"name":"ecocreature-flesh","tpage_name":"deswalk-vis-pris"}],[187170859,{"idx":43,"name":"ecocreature-eye","tpage_name":"deswalk-vis-pris"}],[187170858,{"idx":42,"name":"ecocreature-claws","tpage_name":"deswalk-vis-pris"}],[187170853,{"idx":37,"name":"terraformer-organic-02","tpage_name":"deswalk-vis-pris"}],[187170852,{"idx":36,"name":"terraformer-organic-01","tpage_name":"deswalk-vis-pris"}],[187170851,{"idx":35,"name":"terraformer-minestrips-01","tpage_name":"deswalk-vis-pris"}],[187170849,{"idx":33,"name":"terraformer-metal-10","tpage_name":"deswalk-vis-pris"}],[187170848,{"idx":32,"name":"terraformer-metal-09","tpage_name":"deswalk-vis-pris"}],[187170847,{"idx":31,"name":"terraformer-metal-08","tpage_name":"deswalk-vis-pris"}],[187170845,{"idx":29,"name":"terraformer-metal-05","tpage_name":"deswalk-vis-pris"}],[187170844,{"idx":28,"name":"terraformer-metal-04","tpage_name":"deswalk-vis-pris"}],[187170843,{"idx":27,"name":"terraformer-metal-03","tpage_name":"deswalk-vis-pris"}],[187170842,{"idx":26,"name":"terraformer-metal-02","tpage_name":"deswalk-vis-pris"}],[187170841,{"idx":25,"name":"terraformer-metal-01","tpage_name":"deswalk-vis-pris"}],[187170840,{"idx":24,"name":"terraformer-footpipes-01","tpage_name":"deswalk-vis-pris"}],[187170837,{"idx":21,"name":"dm-ecotank-trim-03","tpage_name":"deswalk-vis-pris"}],[187170836,{"idx":20,"name":"dm-ecotank-trim-02","tpage_name":"deswalk-vis-pris"}],[187170835,{"idx":19,"name":"dm-ecotank-trim-01","tpage_name":"deswalk-vis-pris"}],[187170833,{"idx":17,"name":"dm-ecotank-cap-01","tpage_name":"deswalk-vis-pris"}],[187170832,{"idx":16,"name":"dm-tentacle-skin-02","tpage_name":"deswalk-vis-pris"}],[187170831,{"idx":15,"name":"dm-tentacle-skin-01","tpage_name":"deswalk-vis-pris"}],[187170830,{"idx":14,"name":"dm-tentacle-armor-05","tpage_name":"deswalk-vis-pris"}],[187170829,{"idx":13,"name":"dm-tentacle-armor-04","tpage_name":"deswalk-vis-pris"}],[187170828,{"idx":12,"name":"dm-tentacle-armor-03","tpage_name":"deswalk-vis-pris"}],[187170827,{"idx":11,"name":"dm-tentacle-armor-02","tpage_name":"deswalk-vis-pris"}],[187170826,{"idx":10,"name":"dm-tentacle-armor-01","tpage_name":"deswalk-vis-pris"}],[187170825,{"idx":9,"name":"dm-urchin-skin-01","tpage_name":"deswalk-vis-pris"}],[187170822,{"idx":6,"name":"dm-urchin-base-01","tpage_name":"deswalk-vis-pris"}],[187170821,{"idx":5,"name":"environment-darkprec","tpage_name":"deswalk-vis-pris"}],[195821577,{"idx":9,"name":"glass-shard-02","tpage_name":"factoryd-sprite"}],[187105317,{"idx":37,"name":"desw-wall-light-03","tpage_name":"deswalk-vis-tfrag"}],[195821576,{"idx":8,"name":"glass-shard-01","tpage_name":"factoryd-sprite"}],[187105316,{"idx":36,"name":"desw-wall-light-02","tpage_name":"deswalk-vis-tfrag"}],[195821575,{"idx":7,"name":"dust-sparkle","tpage_name":"factoryd-sprite"}],[187105315,{"idx":35,"name":"dk-eco-vent-side-01","tpage_name":"deswalk-vis-tfrag"}],[195821574,{"idx":6,"name":"ceiling-dust","tpage_name":"factoryd-sprite"}],[187105314,{"idx":34,"name":"dk-eco-vent-glow-01","tpage_name":"deswalk-vis-tfrag"}],[195821573,{"idx":5,"name":"errolbomb-target-supr-ring-01","tpage_name":"factoryd-sprite"}],[187105313,{"idx":33,"name":"lt-eco-vent-side-01","tpage_name":"deswalk-vis-tfrag"}],[195821572,{"idx":4,"name":"errolbomb-target-supr-01","tpage_name":"factoryd-sprite"}],[187105312,{"idx":32,"name":"lt-eco-vent-blue-01","tpage_name":"deswalk-vis-tfrag"}],[190840845,{"idx":13,"name":"precur-nail-02","tpage_name":"precurd-vis-shrub"}],[187105305,{"idx":25,"name":"environment-darkprec","tpage_name":"deswalk-vis-tfrag"}],[190840844,{"idx":12,"name":"precur-bridge-stage-01","tpage_name":"precurd-vis-shrub"}],[187105304,{"idx":24,"name":"desw-wall-glow-02","tpage_name":"deswalk-vis-tfrag"}],[190840843,{"idx":11,"name":"precur-small-plate-02","tpage_name":"precurd-vis-shrub"}],[187105303,{"idx":23,"name":"desw-light-trim-01","tpage_name":"deswalk-vis-tfrag"}],[190840842,{"idx":10,"name":"precur-small-plate-01","tpage_name":"precurd-vis-shrub"}],[187105302,{"idx":22,"name":"desw-skirt-01","tpage_name":"deswalk-vis-tfrag"}],[190840841,{"idx":9,"name":"precur-floor-large-01","tpage_name":"precurd-vis-shrub"}],[187105301,{"idx":21,"name":"desw-skirt-02","tpage_name":"deswalk-vis-tfrag"}],[190840837,{"idx":5,"name":"precur-floor-plate-01","tpage_name":"precurd-vis-shrub"}],[187105297,{"idx":17,"name":"desw-wall-tube-01-hitweak","tpage_name":"deswalk-vis-tfrag"}],[190840836,{"idx":4,"name":"precur-bridge-plate-edge","tpage_name":"precurd-vis-shrub"}],[187105296,{"idx":16,"name":"desw-wall-light-01","tpage_name":"deswalk-vis-tfrag"}],[190840835,{"idx":3,"name":"precur-bridge-plate-01","tpage_name":"precurd-vis-shrub"}],[187105295,{"idx":15,"name":"desw-tubes-bundle-01-hitweak","tpage_name":"deswalk-vis-tfrag"}],[190840834,{"idx":2,"name":"precur-tubes-small-01","tpage_name":"precurd-vis-shrub"}],[187105294,{"idx":14,"name":"desw-hardplate-01-hitweak","tpage_name":"deswalk-vis-tfrag"}],[187105291,{"idx":11,"name":"desw-tentacle-01","tpage_name":"deswalk-vis-tfrag"}],[187105290,{"idx":10,"name":"desw-tubes-small-01","tpage_name":"deswalk-vis-tfrag"}],[189595649,{"idx":1,"name":"wstlander-01-glovetop","tpage_name":"desrally-water"}],[187105289,{"idx":9,"name":"desw-tubes-segment-01","tpage_name":"deswalk-vis-tfrag"}],[189595648,{"idx":0,"name":"intcept-lorez-spike01","tpage_name":"desrally-water"}],[187105288,{"idx":8,"name":"desw-wall-pucker-01","tpage_name":"deswalk-vis-tfrag"}],[187105287,{"idx":7,"name":"desw-beam01","tpage_name":"deswalk-vis-tfrag"}],[187105286,{"idx":6,"name":"desw-plate-large-01","tpage_name":"deswalk-vis-tfrag"}],[187105285,{"idx":5,"name":"desw-container-plate-01","tpage_name":"deswalk-vis-tfrag"}],[187105284,{"idx":4,"name":"desw-plate-pattern-01","tpage_name":"deswalk-vis-tfrag"}],[187105283,{"idx":3,"name":"desw-tubes-segment-02","tpage_name":"deswalk-vis-tfrag"}],[187105282,{"idx":2,"name":"desw-hardplate-01","tpage_name":"deswalk-vis-tfrag"}],[187105281,{"idx":1,"name":"desw-hardplate-edge-01","tpage_name":"deswalk-vis-tfrag"}],[187105280,{"idx":0,"name":"desw-wall-tube-01","tpage_name":"deswalk-vis-tfrag"}],[193986569,{"idx":9,"name":"seem-eye","tpage_name":"templed-vis-pris2"}],[189005849,{"idx":25,"name":"errolcyber-pipes-02","tpage_name":"factoryd-vis-pris"}],[186515489,{"idx":33,"name":"wing02grey01","tpage_name":"lctyblow-pris"}],[193986568,{"idx":8,"name":"seem-ear","tpage_name":"templed-vis-pris2"}],[189005848,{"idx":24,"name":"errolcyber-pipes-01","tpage_name":"factoryd-vis-pris"}],[186515488,{"idx":32,"name":"wing02","tpage_name":"lctyblow-pris"}],[193986567,{"idx":7,"name":"seem-boottoe","tpage_name":"templed-vis-pris2"}],[189005847,{"idx":23,"name":"errolcyber-metalgold","tpage_name":"factoryd-vis-pris"}],[186515487,{"idx":31,"name":"wing01","tpage_name":"lctyblow-pris"}],[193986566,{"idx":6,"name":"seem-bootmet","tpage_name":"templed-vis-pris2"}],[189005846,{"idx":22,"name":"errolcyber-jointpipe","tpage_name":"factoryd-vis-pris"}],[186515486,{"idx":30,"name":"turret01","tpage_name":"lctyblow-pris"}],[193986565,{"idx":5,"name":"seem-bootlower","tpage_name":"templed-vis-pris2"}],[189005845,{"idx":21,"name":"errolcyber-insidewires","tpage_name":"factoryd-vis-pris"}],[186515485,{"idx":29,"name":"stripe03","tpage_name":"lctyblow-pris"}],[193986564,{"idx":4,"name":"seem-bootleg","tpage_name":"templed-vis-pris2"}],[189005844,{"idx":20,"name":"errolcyber-insidemouth","tpage_name":"factoryd-vis-pris"}],[186515484,{"idx":28,"name":"seat01","tpage_name":"lctyblow-pris"}],[193986563,{"idx":3,"name":"seem-bootbottom","tpage_name":"templed-vis-pris2"}],[189005843,{"idx":19,"name":"errolcyber-head-02","tpage_name":"factoryd-vis-pris"}],[186515483,{"idx":27,"name":"rail01","tpage_name":"lctyblow-pris"}],[193986562,{"idx":2,"name":"seem-arm","tpage_name":"templed-vis-pris2"}],[189005842,{"idx":18,"name":"errolcyber-head-01","tpage_name":"factoryd-vis-pris"}],[186515482,{"idx":26,"name":"post01","tpage_name":"lctyblow-pris"}],[193986561,{"idx":1,"name":"environment-oldmetal","tpage_name":"templed-vis-pris2"}],[189005841,{"idx":17,"name":"errolcyber-hair","tpage_name":"factoryd-vis-pris"}],[186515481,{"idx":25,"name":"lightCase01","tpage_name":"lctyblow-pris"}],[193986560,{"idx":0,"name":"bam-eyelight","tpage_name":"templed-vis-pris2"}],[189005840,{"idx":16,"name":"errolcyber-greymetal-02","tpage_name":"factoryd-vis-pris"}],[186515480,{"idx":24,"name":"light01","tpage_name":"lctyblow-pris"}],[189005839,{"idx":15,"name":"errolcyber-greymetal","tpage_name":"factoryd-vis-pris"}],[186515479,{"idx":23,"name":"kg-pickup-wings02","tpage_name":"lctyblow-pris"}],[189005838,{"idx":14,"name":"errolcyber-greyknobs","tpage_name":"factoryd-vis-pris"}],[186515478,{"idx":22,"name":"kg-pickup-wings01","tpage_name":"lctyblow-pris"}],[189005837,{"idx":13,"name":"errolcyber-glovepalm","tpage_name":"factoryd-vis-pris"}],[186515477,{"idx":21,"name":"kg-pickup-sidelogo","tpage_name":"lctyblow-pris"}],[189005836,{"idx":12,"name":"errolcyber-fingers","tpage_name":"factoryd-vis-pris"}],[186515476,{"idx":20,"name":"kg-pickup-pipe","tpage_name":"lctyblow-pris"}],[189005824,{"idx":0,"name":"bam-eyelight","tpage_name":"factoryd-vis-pris"}],[186515464,{"idx":8,"name":"hood01","tpage_name":"lctyblow-pris"}],[186515460,{"idx":4,"name":"gunBoxBack01","tpage_name":"lctyblow-pris"}],[186515459,{"idx":3,"name":"grillRim01","tpage_name":"lctyblow-pris"}],[186515458,{"idx":2,"name":"gauge01","tpage_name":"lctyblow-pris"}],[186515457,{"idx":1,"name":"dash01","tpage_name":"lctyblow-pris"}],[186515456,{"idx":0,"name":"backThing01","tpage_name":"lctyblow-pris"}],[184549376,{"idx":0,"name":"citywide-sail-01","tpage_name":"stadiuma-vis-pris"}],[203096077,{"idx":13,"name":"bombot-redplate-01","tpage_name":"lctyass-pris"}],[190644277,{"idx":53,"name":"seem-pipes-01","tpage_name":"templee-pris2"}],[184418377,{"idx":73,"name":"city-lowres-mhcity-tower-02","tpage_name":"stadiuma-vis-tfrag"}],[203096069,{"idx":5,"name":"bombot-greybarrelside","tpage_name":"lctyass-pris"}],[190644269,{"idx":45,"name":"seem-eye","tpage_name":"templee-pris2"}],[184418369,{"idx":65,"name":"citywide-wall-grill","tpage_name":"stadiuma-vis-tfrag"}],[188153858,{"idx":2,"name":"des-sand-grass-01","tpage_name":"desertf-vis-shrub"}],[184418318,{"idx":14,"name":"rub-blastdoors","tpage_name":"stadiuma-vis-tfrag"}],[181272582,{"idx":6,"name":"hud-wasdoors-ring","tpage_name":"desjump-minimap"}],[181272578,{"idx":2,"name":"hud-wasdoors","tpage_name":"desjump-minimap"}],[193527828,{"idx":20,"name":"jakc-armor","tpage_name":"desboss2-pris"}],[181076028,{"idx":60,"name":"vin-teeth-01","tpage_name":"desbcst-pris2"}],[193527827,{"idx":19,"name":"environment-oldmetal","tpage_name":"desboss2-pris"}],[181076027,{"idx":59,"name":"sig-undergarments","tpage_name":"desbcst-pris2"}],[198508546,{"idx":2,"name":"des-waterfall-dest","tpage_name":"hanga-vis-water"}],[193527826,{"idx":18,"name":"daxtertuft","tpage_name":"desboss2-pris"}],[181076026,{"idx":58,"name":"sig-skirts-03","tpage_name":"desbcst-pris2"}],[193527825,{"idx":17,"name":"daxterteeth","tpage_name":"desboss2-pris"}],[181076025,{"idx":57,"name":"sig-skirts-02","tpage_name":"desbcst-pris2"}],[193527824,{"idx":16,"name":"daxternose","tpage_name":"desboss2-pris"}],[181076024,{"idx":56,"name":"sig-skirts","tpage_name":"desbcst-pris2"}],[193527823,{"idx":15,"name":"daxterlense","tpage_name":"desboss2-pris"}],[181076023,{"idx":55,"name":"sig-shoulderarmor","tpage_name":"desbcst-pris2"}],[193527822,{"idx":14,"name":"daxterhelmetplain","tpage_name":"desboss2-pris"}],[181076022,{"idx":54,"name":"sig-shoetop","tpage_name":"desbcst-pris2"}],[193527821,{"idx":13,"name":"daxterheadwidenew","tpage_name":"desboss2-pris"}],[181076021,{"idx":53,"name":"sig-shoebottom","tpage_name":"desbcst-pris2"}],[193527820,{"idx":12,"name":"daxtergoggles","tpage_name":"desboss2-pris"}],[181076020,{"idx":52,"name":"sig-sac","tpage_name":"desbcst-pris2"}],[193527819,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"desboss2-pris"}],[181076019,{"idx":51,"name":"sig-metal-dirty","tpage_name":"desbcst-pris2"}],[193527818,{"idx":10,"name":"daxterfoot","tpage_name":"desboss2-pris"}],[181076018,{"idx":50,"name":"sig-metal-01","tpage_name":"desbcst-pris2"}],[193527817,{"idx":9,"name":"daxterfinger","tpage_name":"desboss2-pris"}],[181076017,{"idx":49,"name":"sig-lens","tpage_name":"desbcst-pris2"}],[193527816,{"idx":8,"name":"daxterear","tpage_name":"desboss2-pris"}],[181076016,{"idx":48,"name":"sig-horn","tpage_name":"desbcst-pris2"}],[193527815,{"idx":7,"name":"daxterbolt","tpage_name":"desboss2-pris"}],[181076015,{"idx":47,"name":"sig-headgear","tpage_name":"desbcst-pris2"}],[193527814,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"desboss2-pris"}],[181076014,{"idx":46,"name":"sig-gun-05","tpage_name":"desbcst-pris2"}],[193527813,{"idx":5,"name":"daxterarm","tpage_name":"desboss2-pris"}],[181076013,{"idx":45,"name":"sig-gun-04","tpage_name":"desbcst-pris2"}],[193527812,{"idx":4,"name":"daxter-orange","tpage_name":"desboss2-pris"}],[181076012,{"idx":44,"name":"sig-gun-03","tpage_name":"desbcst-pris2"}],[193527811,{"idx":3,"name":"daxter-furhilite","tpage_name":"desboss2-pris"}],[181076011,{"idx":43,"name":"sig-gun-02","tpage_name":"desbcst-pris2"}],[193527810,{"idx":2,"name":"daxter-eyelid","tpage_name":"desboss2-pris"}],[181076010,{"idx":42,"name":"sig-gun-01","tpage_name":"desbcst-pris2"}],[193527809,{"idx":1,"name":"bam-hairhilite","tpage_name":"desboss2-pris"}],[181076009,{"idx":41,"name":"sig-glovetop","tpage_name":"desbcst-pris2"}],[193527808,{"idx":0,"name":"bam-eyelight","tpage_name":"desboss2-pris"}],[181076008,{"idx":40,"name":"sig-glove","tpage_name":"desbcst-pris2"}],[181076007,{"idx":39,"name":"sig-gem-01","tpage_name":"desbcst-pris2"}],[181076006,{"idx":38,"name":"sig-flask","tpage_name":"desbcst-pris2"}],[181076005,{"idx":37,"name":"sig-facert","tpage_name":"desbcst-pris2"}],[181076004,{"idx":36,"name":"sig-faceleft","tpage_name":"desbcst-pris2"}],[181076003,{"idx":35,"name":"sig-eyelid","tpage_name":"desbcst-pris2"}],[181076002,{"idx":34,"name":"sig-eye","tpage_name":"desbcst-pris2"}],[181076001,{"idx":33,"name":"sig-belt","tpage_name":"desbcst-pris2"}],[181076000,{"idx":32,"name":"environment-oldmetal","tpage_name":"desbcst-pris2"}],[181075999,{"idx":31,"name":"charHOLD","tpage_name":"desbcst-pris2"}],[181075998,{"idx":30,"name":"bam-hairhilite","tpage_name":"desbcst-pris2"}],[181075997,{"idx":29,"name":"bam-eyelight","tpage_name":"desbcst-pris2"}],[181075996,{"idx":28,"name":"ashelin-whitestrap","tpage_name":"desbcst-pris2"}],[181075995,{"idx":27,"name":"ashelin-teeth","tpage_name":"desbcst-pris2"}],[181075994,{"idx":26,"name":"ashelin-shoemetal","tpage_name":"desbcst-pris2"}],[181075993,{"idx":25,"name":"ashelin-shoebottom","tpage_name":"desbcst-pris2"}],[181075992,{"idx":24,"name":"ashelin-shield","tpage_name":"desbcst-pris2"}],[181075991,{"idx":23,"name":"ashelin-shells","tpage_name":"desbcst-pris2"}],[181075990,{"idx":22,"name":"ashelin-redtop","tpage_name":"desbcst-pris2"}],[181075989,{"idx":21,"name":"ashelin-pantstop","tpage_name":"desbcst-pris2"}],[187301888,{"idx":0,"name":"racegate","tpage_name":"lbbring2-sprite"}],[181075988,{"idx":20,"name":"ashelin-jacketstraps","tpage_name":"desbcst-pris2"}],[181075987,{"idx":19,"name":"ashelin-jacketsleeve","tpage_name":"desbcst-pris2"}],[181075986,{"idx":18,"name":"ashelin-jacketbody","tpage_name":"desbcst-pris2"}],[181075985,{"idx":17,"name":"ashelin-handle-01","tpage_name":"desbcst-pris2"}],[181075984,{"idx":16,"name":"ashelin-hair","tpage_name":"desbcst-pris2"}],[181075983,{"idx":15,"name":"ashelin-gunholster","tpage_name":"desbcst-pris2"}],[181075982,{"idx":14,"name":"ashelin-gunbarrel-03","tpage_name":"desbcst-pris2"}],[181075981,{"idx":13,"name":"ashelin-gunbarrel-02","tpage_name":"desbcst-pris2"}],[181075980,{"idx":12,"name":"ashelin-gunbarrel-01","tpage_name":"desbcst-pris2"}],[181075979,{"idx":11,"name":"ashelin-glove","tpage_name":"desbcst-pris2"}],[181075978,{"idx":10,"name":"ashelin-face","tpage_name":"desbcst-pris2"}],[181075977,{"idx":9,"name":"ashelin-eyelid","tpage_name":"desbcst-pris2"}],[181075976,{"idx":8,"name":"ashelin-eyebrow","tpage_name":"desbcst-pris2"}],[181075975,{"idx":7,"name":"ashelin-eye","tpage_name":"desbcst-pris2"}],[181075974,{"idx":6,"name":"ashelin-chest","tpage_name":"desbcst-pris2"}],[181075973,{"idx":5,"name":"ashelin-cgrank","tpage_name":"desbcst-pris2"}],[181075972,{"idx":4,"name":"ashelin-cglogo","tpage_name":"desbcst-pris2"}],[181075971,{"idx":3,"name":"ashelin-brownstrap","tpage_name":"desbcst-pris2"}],[181075970,{"idx":2,"name":"ashelin-boottop","tpage_name":"desbcst-pris2"}],[181075969,{"idx":1,"name":"ashelin-bolts","tpage_name":"desbcst-pris2"}],[181075968,{"idx":0,"name":"ashelin-beltbuckle","tpage_name":"desbcst-pris2"}],[198443052,{"idx":44,"name":"des-low-metal-bridge","tpage_name":"hangb-vis-tfrag"}],[181010532,{"idx":100,"name":"environment-darkprec","tpage_name":"desbcst-pris"}],[198443051,{"idx":43,"name":"des-low-pinetree-leaf-01","tpage_name":"hangb-vis-tfrag"}],[181010531,{"idx":99,"name":"dm-urchin-plate-01","tpage_name":"desbcst-pris"}],[198443050,{"idx":42,"name":"des-low-palm-leaf-01","tpage_name":"hangb-vis-tfrag"}],[181010530,{"idx":98,"name":"dm-urchin-finger-01","tpage_name":"desbcst-pris"}],[198443049,{"idx":41,"name":"des-low-tree-bark","tpage_name":"hangb-vis-tfrag"}],[181010529,{"idx":97,"name":"dm-urchin-cables-01","tpage_name":"desbcst-pris"}],[198443048,{"idx":40,"name":"des-low-sand","tpage_name":"hangb-vis-tfrag"}],[181010528,{"idx":96,"name":"desw-tubes-small-01","tpage_name":"desbcst-pris"}],[198443047,{"idx":39,"name":"des-wascity-cement-road","tpage_name":"hangb-vis-tfrag"}],[181010527,{"idx":95,"name":"desw-tubes-segment-02","tpage_name":"desbcst-pris"}],[198443046,{"idx":38,"name":"des-wascity-outerwall-rock","tpage_name":"hangb-vis-tfrag"}],[181010526,{"idx":94,"name":"desw-hardplate-edge-01","tpage_name":"desbcst-pris"}],[198443045,{"idx":37,"name":"des-wascity-palace-siding-01","tpage_name":"hangb-vis-tfrag"}],[181010525,{"idx":93,"name":"desw-hardplate-01","tpage_name":"desbcst-pris"}],[198443044,{"idx":36,"name":"des-wascity-outerwall-metal-d","tpage_name":"hangb-vis-tfrag"}],[181010524,{"idx":92,"name":"errolcyber-teeth","tpage_name":"desbcst-pris"}],[198443043,{"idx":35,"name":"des-wascity-outerwall-metal-b","tpage_name":"hangb-vis-tfrag"}],[181010523,{"idx":91,"name":"errolcyber-spine","tpage_name":"desbcst-pris"}],[198443042,{"idx":34,"name":"des-volcano-lava","tpage_name":"hangb-vis-tfrag"}],[181010522,{"idx":90,"name":"errolcyber-rubberpipe-light","tpage_name":"desbcst-pris"}],[181010521,{"idx":89,"name":"errolcyber-rubberpipe","tpage_name":"desbcst-pris"}],[208404480,{"idx":0,"name":"errolcyber-lens","tpage_name":"deserrol-water"}],[198443040,{"idx":32,"name":"des-cave-floor-01","tpage_name":"hangb-vis-tfrag"}],[181010520,{"idx":88,"name":"errolcyber-roboeye","tpage_name":"desbcst-pris"}],[198443039,{"idx":31,"name":"des-marauder-bridge-floor","tpage_name":"hangb-vis-tfrag"}],[181010519,{"idx":87,"name":"errolcyber-redmetal-03","tpage_name":"desbcst-pris"}],[198443038,{"idx":30,"name":"wascity-outerwall-metal-b","tpage_name":"hangb-vis-tfrag"}],[181010518,{"idx":86,"name":"errolcyber-redmetal-02","tpage_name":"desbcst-pris"}],[198443037,{"idx":29,"name":"common-black","tpage_name":"hangb-vis-tfrag"}],[181010517,{"idx":85,"name":"errolcyber-redmetal-01","tpage_name":"desbcst-pris"}],[198443036,{"idx":28,"name":"wascitya-airlock-metal","tpage_name":"hangb-vis-tfrag"}],[181010516,{"idx":84,"name":"errolcyber-pipes-03","tpage_name":"desbcst-pris"}],[198443035,{"idx":27,"name":"wascity-base","tpage_name":"hangb-vis-tfrag"}],[181010515,{"idx":83,"name":"errolcyber-pipes-02","tpage_name":"desbcst-pris"}],[198443034,{"idx":26,"name":"wascity-outerwall-metal-d","tpage_name":"hangb-vis-tfrag"}],[181010514,{"idx":82,"name":"errolcyber-pipes-01","tpage_name":"desbcst-pris"}],[205914113,{"idx":1,"name":"mhcitya-base-goo-01-dest","tpage_name":"lmhcitya-vis-tfrag"}],[198443033,{"idx":25,"name":"des-wasmetal07","tpage_name":"hangb-vis-tfrag"}],[181010513,{"idx":81,"name":"errolcyber-metalgold","tpage_name":"desbcst-pris"}],[205914112,{"idx":0,"name":"mhcitya-base-goo-01","tpage_name":"lmhcitya-vis-tfrag"}],[198443032,{"idx":24,"name":"des-corral-metal-04","tpage_name":"hangb-vis-tfrag"}],[181010512,{"idx":80,"name":"errolcyber-metaleyelid","tpage_name":"desbcst-pris"}],[181010511,{"idx":79,"name":"errolcyber-jointpipe","tpage_name":"desbcst-pris"}],[198443030,{"idx":22,"name":"des-corral-metal-01","tpage_name":"hangb-vis-tfrag"}],[181010510,{"idx":78,"name":"errolcyber-insidewires","tpage_name":"desbcst-pris"}],[181010509,{"idx":77,"name":"errolcyber-insidemouth","tpage_name":"desbcst-pris"}],[181010508,{"idx":76,"name":"errolcyber-head-02","tpage_name":"desbcst-pris"}],[198443027,{"idx":19,"name":"des-corral-plate-01","tpage_name":"hangb-vis-tfrag"}],[181010507,{"idx":75,"name":"errolcyber-head-01","tpage_name":"desbcst-pris"}],[198443026,{"idx":18,"name":"des-ruins-top-01","tpage_name":"hangb-vis-tfrag"}],[181010506,{"idx":74,"name":"errolcyber-hair","tpage_name":"desbcst-pris"}],[181010505,{"idx":73,"name":"errolcyber-greymetal-02","tpage_name":"desbcst-pris"}],[198443024,{"idx":16,"name":"des-wasmetal01","tpage_name":"hangb-vis-tfrag"}],[181010504,{"idx":72,"name":"errolcyber-greymetal","tpage_name":"desbcst-pris"}],[181010503,{"idx":71,"name":"errolcyber-greyknobs","tpage_name":"desbcst-pris"}],[198443022,{"idx":14,"name":"des-pole-01","tpage_name":"hangb-vis-tfrag"}],[181010502,{"idx":70,"name":"errolcyber-glovepalm","tpage_name":"desbcst-pris"}],[181010501,{"idx":69,"name":"errolcyber-fingers","tpage_name":"desbcst-pris"}],[181010500,{"idx":68,"name":"errolcyber-earcup","tpage_name":"desbcst-pris"}],[198443019,{"idx":11,"name":"des-rock-01","tpage_name":"hangb-vis-tfrag"}],[181010499,{"idx":67,"name":"errolcyber-dirtymetal","tpage_name":"desbcst-pris"}],[198443018,{"idx":10,"name":"des-bridge-plank","tpage_name":"hangb-vis-tfrag"}],[181010498,{"idx":66,"name":"errolcyber-chestplate","tpage_name":"desbcst-pris"}],[181010497,{"idx":65,"name":"errolcyber-bluewrap","tpage_name":"desbcst-pris"}],[181010496,{"idx":64,"name":"errolcyber-bluemetal-01","tpage_name":"desbcst-pris"}],[181010495,{"idx":63,"name":"errolcyber-bluedome","tpage_name":"desbcst-pris"}],[181010494,{"idx":62,"name":"errolcyber-bigshoulder","tpage_name":"desbcst-pris"}],[198443013,{"idx":5,"name":"des-totem-stone-01","tpage_name":"hangb-vis-tfrag"}],[181010493,{"idx":61,"name":"errolcyber-bighand-01","tpage_name":"desbcst-pris"}],[181010492,{"idx":60,"name":"errocyber-faceflesh","tpage_name":"desbcst-pris"}],[181010491,{"idx":59,"name":"errocyber-eyelid","tpage_name":"desbcst-pris"}],[198443010,{"idx":2,"name":"des-mount-02","tpage_name":"hangb-vis-tfrag"}],[181010490,{"idx":58,"name":"errocyber-eye","tpage_name":"desbcst-pris"}],[198443009,{"idx":1,"name":"des-mount-01","tpage_name":"hangb-vis-tfrag"}],[181010489,{"idx":57,"name":"deswalk-break-03","tpage_name":"desbcst-pris"}],[181010488,{"idx":56,"name":"deswalk-break-01","tpage_name":"desbcst-pris"}],[181010487,{"idx":55,"name":"vehicle-wheel-01","tpage_name":"desbcst-pris"}],[181010486,{"idx":54,"name":"vehicle-snake-tread-02","tpage_name":"desbcst-pris"}],[181010485,{"idx":53,"name":"vehicle-snake-tread-01","tpage_name":"desbcst-pris"}],[181010484,{"idx":52,"name":"jakchires-teeth","tpage_name":"desbcst-pris"}],[181010483,{"idx":51,"name":"jakchires-shoeteop","tpage_name":"desbcst-pris"}],[181010482,{"idx":50,"name":"jakchires-shoemetal","tpage_name":"desbcst-pris"}],[181010481,{"idx":49,"name":"jakchires-shoebottom","tpage_name":"desbcst-pris"}],[181010480,{"idx":48,"name":"jakchires-precarmor-01","tpage_name":"desbcst-pris"}],[181010479,{"idx":47,"name":"jakchires-pants","tpage_name":"desbcst-pris"}],[181010478,{"idx":46,"name":"jakchires-lightbrownspat","tpage_name":"desbcst-pris"}],[181010477,{"idx":45,"name":"jakchires-leatherpouch","tpage_name":"desbcst-pris"}],[181010476,{"idx":44,"name":"jakchires-jacket","tpage_name":"desbcst-pris"}],[181010475,{"idx":43,"name":"jakchires-horn","tpage_name":"desbcst-pris"}],[181010474,{"idx":42,"name":"jakchires-hair","tpage_name":"desbcst-pris"}],[181010473,{"idx":41,"name":"jakchires-glovetop","tpage_name":"desbcst-pris"}],[181010472,{"idx":40,"name":"jakchires-facert","tpage_name":"desbcst-pris"}],[181010471,{"idx":39,"name":"jakchires-facelft","tpage_name":"desbcst-pris"}],[181010470,{"idx":38,"name":"jakchires-eyelid","tpage_name":"desbcst-pris"}],[181010469,{"idx":37,"name":"jakchires-eyebrow","tpage_name":"desbcst-pris"}],[181010468,{"idx":36,"name":"jakchires-eye","tpage_name":"desbcst-pris"}],[181010467,{"idx":35,"name":"jakchires-clips","tpage_name":"desbcst-pris"}],[181010466,{"idx":34,"name":"jakchires-chestplate","tpage_name":"desbcst-pris"}],[181010465,{"idx":33,"name":"jakchires-brwnleather","tpage_name":"desbcst-pris"}],[181010464,{"idx":32,"name":"jakchires-brownstrap","tpage_name":"desbcst-pris"}],[181010463,{"idx":31,"name":"jakchires-blackstrap","tpage_name":"desbcst-pris"}],[181010462,{"idx":30,"name":"jakchires-arm","tpage_name":"desbcst-pris"}],[181010461,{"idx":29,"name":"jakc-wristband-a2","tpage_name":"desbcst-pris"}],[181010460,{"idx":28,"name":"jakc-wraps","tpage_name":"desbcst-pris"}],[181010459,{"idx":27,"name":"jakc-waistband2","tpage_name":"desbcst-pris"}],[181010458,{"idx":26,"name":"jakc-skirt","tpage_name":"desbcst-pris"}],[181010457,{"idx":25,"name":"jakc-scarfhanging","tpage_name":"desbcst-pris"}],[181010456,{"idx":24,"name":"jakc-scarf","tpage_name":"desbcst-pris"}],[181010455,{"idx":23,"name":"jakc-lens","tpage_name":"desbcst-pris"}],[181010454,{"idx":22,"name":"jakc-gogglemetal","tpage_name":"desbcst-pris"}],[181010453,{"idx":21,"name":"jakc-chestplate-straps","tpage_name":"desbcst-pris"}],[181010452,{"idx":20,"name":"jakc-armor","tpage_name":"desbcst-pris"}],[181010451,{"idx":19,"name":"environment-oldmetal","tpage_name":"desbcst-pris"}],[181010450,{"idx":18,"name":"daxtertuft","tpage_name":"desbcst-pris"}],[181010449,{"idx":17,"name":"daxterteeth","tpage_name":"desbcst-pris"}],[181010448,{"idx":16,"name":"daxternose","tpage_name":"desbcst-pris"}],[181010447,{"idx":15,"name":"daxterlense","tpage_name":"desbcst-pris"}],[181010446,{"idx":14,"name":"daxterhelmetplain","tpage_name":"desbcst-pris"}],[181010445,{"idx":13,"name":"daxterheadwidenew","tpage_name":"desbcst-pris"}],[181010444,{"idx":12,"name":"daxtergoggles","tpage_name":"desbcst-pris"}],[181010443,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"desbcst-pris"}],[181010442,{"idx":10,"name":"daxterfoot","tpage_name":"desbcst-pris"}],[181010441,{"idx":9,"name":"daxterfinger","tpage_name":"desbcst-pris"}],[181010440,{"idx":8,"name":"daxterear","tpage_name":"desbcst-pris"}],[181010439,{"idx":7,"name":"daxterbolt","tpage_name":"desbcst-pris"}],[181010438,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"desbcst-pris"}],[181010437,{"idx":5,"name":"daxterarm","tpage_name":"desbcst-pris"}],[181010436,{"idx":4,"name":"daxter-orange","tpage_name":"desbcst-pris"}],[181010435,{"idx":3,"name":"daxter-furhilite","tpage_name":"desbcst-pris"}],[181010434,{"idx":2,"name":"daxter-eyelid","tpage_name":"desbcst-pris"}],[181010433,{"idx":1,"name":"bam-hairhilite","tpage_name":"desbcst-pris"}],[181010432,{"idx":0,"name":"bam-eyelight","tpage_name":"desbcst-pris"}],[179961913,{"idx":57,"name":"vin-teeth-01","tpage_name":"loutro2-pris2"}],[193658892,{"idx":12,"name":"targetred","tpage_name":"lmech-pris"}],[179961912,{"idx":56,"name":"sig-undergarments","tpage_name":"loutro2-pris2"}],[193658891,{"idx":11,"name":"environment-darkprec","tpage_name":"lmech-pris"}],[179961911,{"idx":55,"name":"sig-skirts-03","tpage_name":"loutro2-pris2"}],[193658890,{"idx":10,"name":"dm-mech-waist","tpage_name":"lmech-pris"}],[179961910,{"idx":54,"name":"sig-skirts-02","tpage_name":"loutro2-pris2"}],[193658889,{"idx":9,"name":"dm-mech-tubes-01","tpage_name":"lmech-pris"}],[179961909,{"idx":53,"name":"sig-skirts","tpage_name":"loutro2-pris2"}],[193658888,{"idx":8,"name":"dm-mech-plate-shoulder","tpage_name":"lmech-pris"}],[179961908,{"idx":52,"name":"sig-shoulderarmor","tpage_name":"loutro2-pris2"}],[193658887,{"idx":7,"name":"dm-mech-plate-shin","tpage_name":"lmech-pris"}],[179961907,{"idx":51,"name":"sig-shoetop","tpage_name":"loutro2-pris2"}],[193658886,{"idx":6,"name":"dm-mech-plate-head","tpage_name":"lmech-pris"}],[179961906,{"idx":50,"name":"sig-shoebottom","tpage_name":"loutro2-pris2"}],[193658885,{"idx":5,"name":"dm-mech-pipe","tpage_name":"lmech-pris"}],[179961905,{"idx":49,"name":"sig-sac","tpage_name":"loutro2-pris2"}],[193658884,{"idx":4,"name":"dm-mech-joint-cap","tpage_name":"lmech-pris"}],[179961904,{"idx":48,"name":"sig-metal-dirty","tpage_name":"loutro2-pris2"}],[193658883,{"idx":3,"name":"dm-mech-joint","tpage_name":"lmech-pris"}],[179961903,{"idx":47,"name":"sig-metal-01","tpage_name":"loutro2-pris2"}],[193658882,{"idx":2,"name":"dm-mech-head","tpage_name":"lmech-pris"}],[179961902,{"idx":46,"name":"sig-lens","tpage_name":"loutro2-pris2"}],[193658881,{"idx":1,"name":"dm-mech-eye","tpage_name":"lmech-pris"}],[179961901,{"idx":45,"name":"sig-horn","tpage_name":"loutro2-pris2"}],[193658880,{"idx":0,"name":"dm-mech-claws","tpage_name":"lmech-pris"}],[179961900,{"idx":44,"name":"sig-headgear","tpage_name":"loutro2-pris2"}],[179961898,{"idx":42,"name":"sig-gun-04","tpage_name":"loutro2-pris2"}],[179961897,{"idx":41,"name":"sig-gun-03","tpage_name":"loutro2-pris2"}],[179961896,{"idx":40,"name":"sig-gun-02","tpage_name":"loutro2-pris2"}],[179961892,{"idx":36,"name":"sig-gem-01","tpage_name":"loutro2-pris2"}],[179961889,{"idx":33,"name":"sig-faceleft","tpage_name":"loutro2-pris2"}],[179961885,{"idx":29,"name":"environment-oldmetal","tpage_name":"loutro2-pris2"}],[177733636,{"idx":4,"name":"terraformer-cpitwindows-02","tpage_name":"precurd-vis-water"}],[177733635,{"idx":3,"name":"terraformer-cpitwindows-01","tpage_name":"precurd-vis-water"}],[177471508,{"idx":20,"name":"comb-yell-light","tpage_name":"railb2-tfrag"}],[177471501,{"idx":13,"name":"rail-pipe-03","tpage_name":"railb2-tfrag"}],[177471500,{"idx":12,"name":"rail-pipe-01","tpage_name":"railb2-tfrag"}],[176160771,{"idx":3,"name":"holograph-env-scan","tpage_name":"templea-warp"}],[176160770,{"idx":2,"name":"holograph-env-rim","tpage_name":"templea-warp"}],[176160769,{"idx":1,"name":"holograph-env-noise","tpage_name":"templea-warp"}],[208142342,{"idx":6,"name":"terraformer-metal-04","tpage_name":"desboss1-pris2"}],[194445362,{"idx":50,"name":"daxternose","tpage_name":"gridcst-pris"}],[175767662,{"idx":110,"name":"prec-leader-robe-01","tpage_name":"loutro-pris"}],[194445348,{"idx":36,"name":"daxter-eyelid","tpage_name":"gridcst-pris"}],[175767648,{"idx":96,"name":"prec-insidemouth","tpage_name":"loutro-pris"}],[175767578,{"idx":26,"name":"prec-surfer-sash","tpage_name":"loutro-pris"}],[175374337,{"idx":1,"name":"hud-small-vehicle-health-bar-01","tpage_name":"comba-minimap"}],[174456832,{"idx":0,"name":"sig-flatfangs","tpage_name":"ldesgcst-water"}],[174391326,{"idx":30,"name":"vin-teeth-01","tpage_name":"ldesgcst-pris2"}],[174391325,{"idx":29,"name":"sig-undergarments","tpage_name":"ldesgcst-pris2"}],[174391324,{"idx":28,"name":"sig-skirts-03","tpage_name":"ldesgcst-pris2"}],[174391323,{"idx":27,"name":"sig-skirts-02","tpage_name":"ldesgcst-pris2"}],[174391322,{"idx":26,"name":"sig-skirts","tpage_name":"ldesgcst-pris2"}],[174391321,{"idx":25,"name":"sig-shoulderarmor","tpage_name":"ldesgcst-pris2"}],[174391320,{"idx":24,"name":"sig-shoetop","tpage_name":"ldesgcst-pris2"}],[174391319,{"idx":23,"name":"sig-shoebottom","tpage_name":"ldesgcst-pris2"}],[174391318,{"idx":22,"name":"sig-sac","tpage_name":"ldesgcst-pris2"}],[174391317,{"idx":21,"name":"sig-metal-dirty","tpage_name":"ldesgcst-pris2"}],[174391316,{"idx":20,"name":"sig-metal-01","tpage_name":"ldesgcst-pris2"}],[174391315,{"idx":19,"name":"sig-lens","tpage_name":"ldesgcst-pris2"}],[174391314,{"idx":18,"name":"sig-horn","tpage_name":"ldesgcst-pris2"}],[174391313,{"idx":17,"name":"sig-headgear","tpage_name":"ldesgcst-pris2"}],[174391312,{"idx":16,"name":"sig-gun-05","tpage_name":"ldesgcst-pris2"}],[174391311,{"idx":15,"name":"sig-gun-04","tpage_name":"ldesgcst-pris2"}],[174391310,{"idx":14,"name":"sig-gun-03","tpage_name":"ldesgcst-pris2"}],[174391309,{"idx":13,"name":"sig-gun-02","tpage_name":"ldesgcst-pris2"}],[174391308,{"idx":12,"name":"sig-gun-01","tpage_name":"ldesgcst-pris2"}],[174391307,{"idx":11,"name":"sig-glovetop","tpage_name":"ldesgcst-pris2"}],[174391306,{"idx":10,"name":"sig-glove","tpage_name":"ldesgcst-pris2"}],[176881665,{"idx":1,"name":"ecocreature-teeth","tpage_name":"towera-water"}],[174391305,{"idx":9,"name":"sig-gem-01","tpage_name":"ldesgcst-pris2"}],[174391304,{"idx":8,"name":"sig-flask","tpage_name":"ldesgcst-pris2"}],[174391303,{"idx":7,"name":"sig-facert","tpage_name":"ldesgcst-pris2"}],[174391302,{"idx":6,"name":"sig-faceleft","tpage_name":"ldesgcst-pris2"}],[174391301,{"idx":5,"name":"sig-eyelid","tpage_name":"ldesgcst-pris2"}],[174391300,{"idx":4,"name":"sig-eye","tpage_name":"ldesgcst-pris2"}],[174391299,{"idx":3,"name":"sig-belt","tpage_name":"ldesgcst-pris2"}],[174391298,{"idx":2,"name":"environment-oldmetal","tpage_name":"ldesgcst-pris2"}],[174391297,{"idx":1,"name":"charHOLD","tpage_name":"ldesgcst-pris2"}],[174391296,{"idx":0,"name":"bam-eyelight","tpage_name":"ldesgcst-pris2"}],[188022792,{"idx":8,"name":"daxterear","tpage_name":"lvincst-pris"}],[174325812,{"idx":52,"name":"jakchires-teeth","tpage_name":"ldesgcst-pris"}],[188022791,{"idx":7,"name":"daxterbolt","tpage_name":"lvincst-pris"}],[174325811,{"idx":51,"name":"jakchires-shoeteop","tpage_name":"ldesgcst-pris"}],[188022789,{"idx":5,"name":"daxterarm","tpage_name":"lvincst-pris"}],[174325809,{"idx":49,"name":"jakchires-shoebottom","tpage_name":"ldesgcst-pris"}],[188022788,{"idx":4,"name":"daxter-orange","tpage_name":"lvincst-pris"}],[184287248,{"idx":16,"name":"preship-metal-hull-02","tpage_name":"loutro-shrub"}],[174325808,{"idx":48,"name":"jakchires-precarmor-01","tpage_name":"ldesgcst-pris"}],[188022787,{"idx":3,"name":"daxter-furhilite","tpage_name":"lvincst-pris"}],[184287247,{"idx":15,"name":"preship-metal-trim-02","tpage_name":"loutro-shrub"}],[176816167,{"idx":39,"name":"neo-wasp-eye","tpage_name":"towera-pris"}],[174325807,{"idx":47,"name":"jakchires-pants","tpage_name":"ldesgcst-pris"}],[188022786,{"idx":2,"name":"daxter-eyelid","tpage_name":"lvincst-pris"}],[184287246,{"idx":14,"name":"preship-metal-trim-01","tpage_name":"loutro-shrub"}],[176816166,{"idx":38,"name":"neo-wasp-dark-brown","tpage_name":"towera-pris"}],[174325806,{"idx":46,"name":"jakchires-lightbrownspat","tpage_name":"ldesgcst-pris"}],[188022785,{"idx":1,"name":"bam-hairhilite","tpage_name":"lvincst-pris"}],[184287245,{"idx":13,"name":"preship-metal-edge-02","tpage_name":"loutro-shrub"}],[176816165,{"idx":37,"name":"neo-wasp-brown","tpage_name":"towera-pris"}],[174325805,{"idx":45,"name":"jakchires-leatherpouch","tpage_name":"ldesgcst-pris"}],[188022784,{"idx":0,"name":"bam-eyelight","tpage_name":"lvincst-pris"}],[184287244,{"idx":12,"name":"preship-metal-edge-01","tpage_name":"loutro-shrub"}],[176816164,{"idx":36,"name":"neo-wasp-body","tpage_name":"towera-pris"}],[174325804,{"idx":44,"name":"jakchires-jacket","tpage_name":"ldesgcst-pris"}],[184287243,{"idx":11,"name":"preship-metal-ring-top","tpage_name":"loutro-shrub"}],[176816163,{"idx":35,"name":"neo-wasp-base","tpage_name":"towera-pris"}],[174325803,{"idx":43,"name":"jakchires-horn","tpage_name":"ldesgcst-pris"}],[184287242,{"idx":10,"name":"preship-metal-trim-03","tpage_name":"loutro-shrub"}],[174325802,{"idx":42,"name":"jakchires-hair","tpage_name":"ldesgcst-pris"}],[184287241,{"idx":9,"name":"preship-metal-edge-03","tpage_name":"loutro-shrub"}],[174325801,{"idx":41,"name":"jakchires-glovetop","tpage_name":"ldesgcst-pris"}],[184287240,{"idx":8,"name":"preship-metal-hull-01","tpage_name":"loutro-shrub"}],[174325800,{"idx":40,"name":"jakchires-facert","tpage_name":"ldesgcst-pris"}],[184287239,{"idx":7,"name":"preship-metal-hull-03","tpage_name":"loutro-shrub"}],[174325799,{"idx":39,"name":"jakchires-facelft","tpage_name":"ldesgcst-pris"}],[184287238,{"idx":6,"name":"preship-window-strip-01","tpage_name":"loutro-shrub"}],[174325798,{"idx":38,"name":"jakchires-eyelid","tpage_name":"ldesgcst-pris"}],[184287237,{"idx":5,"name":"preship-blue-thruster","tpage_name":"loutro-shrub"}],[174325797,{"idx":37,"name":"jakchires-eyebrow","tpage_name":"ldesgcst-pris"}],[184287236,{"idx":4,"name":"preship-blue-window-glue","tpage_name":"loutro-shrub"}],[174325796,{"idx":36,"name":"jakchires-eye","tpage_name":"ldesgcst-pris"}],[184287235,{"idx":3,"name":"preship-blue-window-blue-02","tpage_name":"loutro-shrub"}],[176816155,{"idx":27,"name":"ecocreature-palm","tpage_name":"towera-pris"}],[174325795,{"idx":35,"name":"jakchires-clips","tpage_name":"ldesgcst-pris"}],[184287233,{"idx":1,"name":"preship-glass-01","tpage_name":"loutro-shrub"}],[176816153,{"idx":25,"name":"ecocreature-insidemouth","tpage_name":"towera-pris"}],[174325793,{"idx":33,"name":"jakchires-brwnleather","tpage_name":"ldesgcst-pris"}],[176816152,{"idx":24,"name":"ecocreature-flesh","tpage_name":"towera-pris"}],[174325792,{"idx":32,"name":"jakchires-brownstrap","tpage_name":"ldesgcst-pris"}],[176816151,{"idx":23,"name":"ecocreature-eye","tpage_name":"towera-pris"}],[174325791,{"idx":31,"name":"jakchires-blackstrap","tpage_name":"ldesgcst-pris"}],[176816149,{"idx":21,"name":"environment-darkprec","tpage_name":"towera-pris"}],[174325789,{"idx":29,"name":"jakc-wristband-a2","tpage_name":"ldesgcst-pris"}],[194052110,{"idx":14,"name":"marauder-metal-mask","tpage_name":"deschase-pris"}],[174129230,{"idx":78,"name":"veger-scarf","tpage_name":"loutro-pris2"}],[194052109,{"idx":13,"name":"marauder-leather-strap","tpage_name":"deschase-pris"}],[174129229,{"idx":77,"name":"veger-hair","tpage_name":"loutro-pris2"}],[194052108,{"idx":12,"name":"marauder-leather-part","tpage_name":"deschase-pris"}],[174129228,{"idx":76,"name":"veger-coatclips","tpage_name":"loutro-pris2"}],[194052107,{"idx":11,"name":"marauder-leather-handle","tpage_name":"deschase-pris"}],[174129227,{"idx":75,"name":"prec-veger-vest","tpage_name":"loutro-pris2"}],[194052106,{"idx":10,"name":"marauder-leather-buckle","tpage_name":"deschase-pris"}],[174129226,{"idx":74,"name":"prec-veger-spat","tpage_name":"loutro-pris2"}],[194052105,{"idx":9,"name":"marauder-leather-brown","tpage_name":"deschase-pris"}],[174129225,{"idx":73,"name":"prec-veger-sleeve","tpage_name":"loutro-pris2"}],[194052104,{"idx":8,"name":"marauder-leather-brnstrap","tpage_name":"deschase-pris"}],[174129224,{"idx":72,"name":"prec-veger-orange","tpage_name":"loutro-pris2"}],[194052103,{"idx":7,"name":"marauder-hand-blue","tpage_name":"deschase-pris"}],[174129223,{"idx":71,"name":"prec-veger-nose","tpage_name":"loutro-pris2"}],[194052102,{"idx":6,"name":"marauder-gun-tip","tpage_name":"deschase-pris"}],[174129222,{"idx":70,"name":"prec-veger-newface","tpage_name":"loutro-pris2"}],[194052101,{"idx":5,"name":"marauder-gun-part","tpage_name":"deschase-pris"}],[174129221,{"idx":69,"name":"prec-veger-neck","tpage_name":"loutro-pris2"}],[194052100,{"idx":4,"name":"marauder-gun-metal","tpage_name":"deschase-pris"}],[174129220,{"idx":68,"name":"prec-veger-mouth","tpage_name":"loutro-pris2"}],[194052099,{"idx":3,"name":"marauder-gun-blade","tpage_name":"deschase-pris"}],[174129219,{"idx":67,"name":"prec-veger-leg","tpage_name":"loutro-pris2"}],[194052098,{"idx":2,"name":"marauder-blade-joint","tpage_name":"deschase-pris"}],[174129218,{"idx":66,"name":"prec-veger-handpalm","tpage_name":"loutro-pris2"}],[194052097,{"idx":1,"name":"marauder-blade","tpage_name":"deschase-pris"}],[174129217,{"idx":65,"name":"prec-veger-handback","tpage_name":"loutro-pris2"}],[194052096,{"idx":0,"name":"marauder-belt","tpage_name":"deschase-pris"}],[174129216,{"idx":64,"name":"prec-veger-foot-02","tpage_name":"loutro-pris2"}],[174129152,{"idx":0,"name":"bam-eyelight","tpage_name":"loutro-pris2"}],[173998082,{"idx":2,"name":"errolcyber-lens","tpage_name":"ltowerb-vis-water"}],[173998081,{"idx":1,"name":"sig-flatfangs","tpage_name":"ltowerb-vis-water"}],[202506245,{"idx":5,"name":"comb-env2","tpage_name":"raila-alpha"}],[173867105,{"idx":97,"name":"dark-crystal-pickup-03","tpage_name":"ltowerb-vis-pris"}],[173867104,{"idx":96,"name":"dark-crystal-pickup-02","tpage_name":"ltowerb-vis-pris"}],[173867103,{"idx":95,"name":"dark-crystal-pickup-01","tpage_name":"ltowerb-vis-pris"}],[188809262,{"idx":46,"name":"facc-floor-trim","tpage_name":"factoryd-vis-tfrag"}],[173867102,{"idx":94,"name":"dark-crystal-knob-02","tpage_name":"ltowerb-vis-pris"}],[188809261,{"idx":45,"name":"facc-big-metal-panl01","tpage_name":"factoryd-vis-tfrag"}],[173867101,{"idx":93,"name":"dark-crystal-knob-01","tpage_name":"ltowerb-vis-pris"}],[188809260,{"idx":44,"name":"facc-metal-panel-07","tpage_name":"factoryd-vis-tfrag"}],[173867100,{"idx":92,"name":"errolcyber-roboeye","tpage_name":"ltowerb-vis-pris"}],[188809259,{"idx":43,"name":"facc-big-metal-panl04-hitweak","tpage_name":"factoryd-vis-tfrag"}],[173867099,{"idx":91,"name":"errolcyber-metaleyelid","tpage_name":"ltowerb-vis-pris"}],[188809258,{"idx":42,"name":"facd-yellow-glow","tpage_name":"factoryd-vis-tfrag"}],[173867098,{"idx":90,"name":"errocyber-eyelid","tpage_name":"ltowerb-vis-pris"}],[188809257,{"idx":41,"name":"facd-metal-nut-02","tpage_name":"factoryd-vis-tfrag"}],[173867097,{"idx":89,"name":"errocyber-eye","tpage_name":"ltowerb-vis-pris"}],[188809256,{"idx":40,"name":"facd-metal-nut-01","tpage_name":"factoryd-vis-tfrag"}],[173867096,{"idx":88,"name":"errolcyber-spine","tpage_name":"ltowerb-vis-pris"}],[188809255,{"idx":39,"name":"facd-metal-wall-01","tpage_name":"factoryd-vis-tfrag"}],[173867095,{"idx":87,"name":"errolcyber-rubberpipe-light","tpage_name":"ltowerb-vis-pris"}],[195035154,{"idx":18,"name":"stadiumb-hud-lap-03","tpage_name":"desrally-minimap"}],[188809254,{"idx":38,"name":"facc-seam-metal","tpage_name":"factoryd-vis-tfrag"}],[173867094,{"idx":86,"name":"errolcyber-rubberpipe","tpage_name":"ltowerb-vis-pris"}],[195035153,{"idx":17,"name":"stadiumb-hud-lap-02","tpage_name":"desrally-minimap"}],[188809253,{"idx":37,"name":"facd-metal-wall-rim-01","tpage_name":"factoryd-vis-tfrag"}],[173867093,{"idx":85,"name":"errolcyber-redmetal-03","tpage_name":"ltowerb-vis-pris"}],[195035152,{"idx":16,"name":"stadiumb-hud-lap-01","tpage_name":"desrally-minimap"}],[188809252,{"idx":36,"name":"facd-wall-girders-01","tpage_name":"factoryd-vis-tfrag"}],[173867092,{"idx":84,"name":"errolcyber-redmetal-02","tpage_name":"ltowerb-vis-pris"}],[195035151,{"idx":15,"name":"stadiumb-hud-ord-th","tpage_name":"desrally-minimap"}],[188809251,{"idx":35,"name":"facd-wall-01","tpage_name":"factoryd-vis-tfrag"}],[173867091,{"idx":83,"name":"errolcyber-redmetal-01","tpage_name":"ltowerb-vis-pris"}],[195035150,{"idx":14,"name":"stadiumb-hud-ord-st","tpage_name":"desrally-minimap"}],[188809250,{"idx":34,"name":"facc-metal-panel-10","tpage_name":"factoryd-vis-tfrag"}],[173867090,{"idx":82,"name":"errolcyber-metalgold","tpage_name":"ltowerb-vis-pris"}],[195035149,{"idx":13,"name":"stadiumb-hud-ord-rd","tpage_name":"desrally-minimap"}],[188809249,{"idx":33,"name":"facd-metal-blue-glue-01","tpage_name":"factoryd-vis-tfrag"}],[173867089,{"idx":81,"name":"errolcyber-jointpipe","tpage_name":"ltowerb-vis-pris"}],[198770688,{"idx":0,"name":"sig2-flatfangs","tpage_name":"lblowcst-water"}],[195035148,{"idx":12,"name":"stadiumb-hud-ord-o","tpage_name":"desrally-minimap"}],[188809248,{"idx":32,"name":"facc-hole-grill-01","tpage_name":"factoryd-vis-tfrag"}],[173867088,{"idx":80,"name":"errolcyber-insidewires","tpage_name":"ltowerb-vis-pris"}],[195035147,{"idx":11,"name":"stadiumb-hud-ord-nd","tpage_name":"desrally-minimap"}],[188809247,{"idx":31,"name":"facc-beam-01","tpage_name":"factoryd-vis-tfrag"}],[173867087,{"idx":79,"name":"errolcyber-greymetal-02","tpage_name":"ltowerb-vis-pris"}],[195035146,{"idx":10,"name":"stadiumb-hud-ord-korean","tpage_name":"desrally-minimap"}],[188809246,{"idx":30,"name":"facc-wall-trim-01","tpage_name":"factoryd-vis-tfrag"}],[173867086,{"idx":78,"name":"errolcyber-greymetal","tpage_name":"ltowerb-vis-pris"}],[173867020,{"idx":12,"name":"errolcyber-pipes-01","tpage_name":"ltowerb-vis-pris"}],[173867019,{"idx":11,"name":"errolcyber-insidemouth","tpage_name":"ltowerb-vis-pris"}],[173867018,{"idx":10,"name":"errolcyber-head-02","tpage_name":"ltowerb-vis-pris"}],[173867017,{"idx":9,"name":"errolcyber-head-01","tpage_name":"ltowerb-vis-pris"}],[173867015,{"idx":7,"name":"errolcyber-earcup","tpage_name":"ltowerb-vis-pris"}],[173867014,{"idx":6,"name":"errolcyber-bluedome","tpage_name":"ltowerb-vis-pris"}],[173867013,{"idx":5,"name":"errocyber-faceflesh","tpage_name":"ltowerb-vis-pris"}],[173867012,{"idx":4,"name":"environment-oldmetal","tpage_name":"ltowerb-vis-pris"}],[173670426,{"idx":26,"name":"tow-wall-tentacle-02","tpage_name":"towerb-vis-tfrag"}],[181141505,{"idx":1,"name":"errolcyber-lens","tpage_name":"desbcst-water"}],[173670425,{"idx":25,"name":"rail-env-wall-01","tpage_name":"towerb-vis-tfrag"}],[181141504,{"idx":0,"name":"sig-flatfangs","tpage_name":"desbcst-water"}],[173670424,{"idx":24,"name":"tow-baserock","tpage_name":"towerb-vis-tfrag"}],[173670423,{"idx":23,"name":"tow-bridge-source","tpage_name":"towerb-vis-tfrag"}],[173670422,{"idx":22,"name":"tow-blackhole","tpage_name":"towerb-vis-tfrag"}],[173670421,{"idx":21,"name":"tow-wall-supports-HI","tpage_name":"towerb-vis-tfrag"}],[173670420,{"idx":20,"name":"tow-groundpod","tpage_name":"towerb-vis-tfrag"}],[173670419,{"idx":19,"name":"tow-eggside-01","tpage_name":"towerb-vis-tfrag"}],[173670418,{"idx":18,"name":"tow-egg-group-base","tpage_name":"towerb-vis-tfrag"}],[173670417,{"idx":17,"name":"tow-pup-metal-01","tpage_name":"towerb-vis-tfrag"}],[173670416,{"idx":16,"name":"tow-dplight-blue-01","tpage_name":"towerb-vis-tfrag"}],[173670415,{"idx":15,"name":"tow-base-ground-plat","tpage_name":"towerb-vis-tfrag"}],[173670414,{"idx":14,"name":"tow-plat-side","tpage_name":"towerb-vis-tfrag"}],[173670413,{"idx":13,"name":"tow-base-ground","tpage_name":"towerb-vis-tfrag"}],[173670412,{"idx":12,"name":"tow-wall-supports","tpage_name":"towerb-vis-tfrag"}],[176160768,{"idx":0,"name":"holograph-env-rim-dest","tpage_name":"templea-warp"}],[173670408,{"idx":8,"name":"mhcity-wall-tentacle-02","tpage_name":"towerb-vis-tfrag"}],[173670407,{"idx":7,"name":"tow-basebone-01","tpage_name":"towerb-vis-tfrag"}],[173670406,{"idx":6,"name":"tow-eggtop-01","tpage_name":"towerb-vis-tfrag"}],[173670404,{"idx":4,"name":"tow-pup-detail-01","tpage_name":"towerb-vis-tfrag"}],[173670403,{"idx":3,"name":"tow-pupeyes-01","tpage_name":"towerb-vis-tfrag"}],[173670402,{"idx":2,"name":"tow-pup-skin-01","tpage_name":"towerb-vis-tfrag"}],[173670401,{"idx":1,"name":"tow-egg-remains-side","tpage_name":"towerb-vis-tfrag"}],[173670400,{"idx":0,"name":"tow-eggpod-01","tpage_name":"towerb-vis-tfrag"}],[173473819,{"idx":27,"name":"tow-outer-tubes","tpage_name":"ltowerb-vis-tfrag"}],[173473810,{"idx":18,"name":"tow-egg-group-base","tpage_name":"ltowerb-vis-tfrag"}],[173473809,{"idx":17,"name":"tow-wall-supports","tpage_name":"ltowerb-vis-tfrag"}],[173473807,{"idx":15,"name":"tow-eggside-01","tpage_name":"ltowerb-vis-tfrag"}],[173473806,{"idx":14,"name":"mhcity-base-ground","tpage_name":"ltowerb-vis-tfrag"}],[173473802,{"idx":10,"name":"city-lowres-mhcity-wall-06","tpage_name":"ltowerb-vis-tfrag"}],[173473800,{"idx":8,"name":"tow-basebone-01","tpage_name":"ltowerb-vis-tfrag"}],[173473799,{"idx":7,"name":"tow-pup-detail-01","tpage_name":"ltowerb-vis-tfrag"}],[173473798,{"idx":6,"name":"tow-pupeyes-01","tpage_name":"ltowerb-vis-tfrag"}],[173473797,{"idx":5,"name":"tow-pup-skin-01","tpage_name":"ltowerb-vis-tfrag"}],[173473796,{"idx":4,"name":"tow-eggtop-01","tpage_name":"ltowerb-vis-tfrag"}],[173211648,{"idx":0,"name":"hud-tformer-target-01","tpage_name":"desboss1-minimap"}],[173146115,{"idx":3,"name":"precur-blue-light-01","tpage_name":"precurc-vis-shrub"}],[173146114,{"idx":2,"name":"precur-tube-joint-01","tpage_name":"precurc-vis-shrub"}],[173146112,{"idx":0,"name":"precur-nail-01","tpage_name":"precurc-vis-shrub"}],[173015104,{"idx":64,"name":"precur-floor-large-01-lotweak","tpage_name":"precurc-vis-tfrag"}],[173015100,{"idx":60,"name":"environment-precur-level","tpage_name":"precurc-vis-tfrag"}],[173015045,{"idx":5,"name":"precur-nail-02","tpage_name":"precurc-vis-tfrag"}],[211550219,{"idx":11,"name":"preship-metal-ring-top","tpage_name":"temp-shrub"}],[172949639,{"idx":135,"name":"precur-planet-water-01","tpage_name":"precurd-vis-pris"}],[211550213,{"idx":5,"name":"preship-blue-thruster","tpage_name":"temp-shrub"}],[172949633,{"idx":129,"name":"errolcyber-roboeye","tpage_name":"precurd-vis-pris"}],[211550212,{"idx":4,"name":"preship-blue-window-glue","tpage_name":"temp-shrub"}],[172949632,{"idx":128,"name":"errolcyber-metaleyelid","tpage_name":"precurd-vis-pris"}],[211550211,{"idx":3,"name":"preship-blue-window-blue-02","tpage_name":"temp-shrub"}],[172949631,{"idx":127,"name":"errocyber-eyelid","tpage_name":"precurd-vis-pris"}],[211550210,{"idx":2,"name":"preship-metal-window-01","tpage_name":"temp-shrub"}],[172949630,{"idx":126,"name":"errocyber-eye","tpage_name":"precurd-vis-pris"}],[207814656,{"idx":0,"name":"gun-clank-target-01","tpage_name":"lgunrnc-pris"}],[172949616,{"idx":112,"name":"errolcyber-spine","tpage_name":"precurd-vis-pris"}],[172949615,{"idx":111,"name":"errolcyber-rubberpipe-light","tpage_name":"precurd-vis-pris"}],[172949614,{"idx":110,"name":"errolcyber-rubberpipe","tpage_name":"precurd-vis-pris"}],[172949613,{"idx":109,"name":"errolcyber-redmetal-03","tpage_name":"precurd-vis-pris"}],[172949612,{"idx":108,"name":"errolcyber-redmetal-02","tpage_name":"precurd-vis-pris"}],[172949611,{"idx":107,"name":"errolcyber-redmetal-01","tpage_name":"precurd-vis-pris"}],[172949610,{"idx":106,"name":"errolcyber-metalgold","tpage_name":"precurd-vis-pris"}],[172949609,{"idx":105,"name":"errolcyber-jointpipe","tpage_name":"precurd-vis-pris"}],[172949608,{"idx":104,"name":"errolcyber-insidewires","tpage_name":"precurd-vis-pris"}],[172949607,{"idx":103,"name":"errolcyber-greymetal-02","tpage_name":"precurd-vis-pris"}],[172949606,{"idx":102,"name":"errolcyber-greymetal","tpage_name":"precurd-vis-pris"}],[172949605,{"idx":101,"name":"errolcyber-greyknobs","tpage_name":"precurd-vis-pris"}],[172949604,{"idx":100,"name":"errolcyber-glovepalm","tpage_name":"precurd-vis-pris"}],[172949603,{"idx":99,"name":"errolcyber-fingers","tpage_name":"precurd-vis-pris"}],[172949602,{"idx":98,"name":"errolcyber-dirtymetal","tpage_name":"precurd-vis-pris"}],[172949601,{"idx":97,"name":"errolcyber-chestplate","tpage_name":"precurd-vis-pris"}],[172949600,{"idx":96,"name":"errolcyber-bluewrap","tpage_name":"precurd-vis-pris"}],[172949599,{"idx":95,"name":"errolcyber-bluemetal-01","tpage_name":"precurd-vis-pris"}],[172949598,{"idx":94,"name":"errolcyber-bigshoulder","tpage_name":"precurd-vis-pris"}],[172949597,{"idx":93,"name":"errolcyber-bighand-01","tpage_name":"precurd-vis-pris"}],[172949596,{"idx":92,"name":"dm-ship-tentacle-01","tpage_name":"precurd-vis-pris"}],[172949595,{"idx":91,"name":"jakchires-teeth","tpage_name":"precurd-vis-pris"}],[172949594,{"idx":90,"name":"jakchires-shoeteop","tpage_name":"precurd-vis-pris"}],[172949593,{"idx":89,"name":"jakchires-shoemetal","tpage_name":"precurd-vis-pris"}],[200343552,{"idx":0,"name":"flamer-wing","tpage_name":"templea-vis-alpha"}],[172949592,{"idx":88,"name":"jakchires-shoebottom","tpage_name":"precurd-vis-pris"}],[172949591,{"idx":87,"name":"jakchires-precarmor-01","tpage_name":"precurd-vis-pris"}],[172949590,{"idx":86,"name":"jakchires-pants","tpage_name":"precurd-vis-pris"}],[190382109,{"idx":29,"name":"rail-light-green","tpage_name":"raila-shrub"}],[172949589,{"idx":85,"name":"jakchires-lightbrownspat","tpage_name":"precurd-vis-pris"}],[190382108,{"idx":28,"name":"vehicle-snake-drum-03","tpage_name":"raila-shrub"}],[172949588,{"idx":84,"name":"jakchires-leatherpouch","tpage_name":"precurd-vis-pris"}],[190382107,{"idx":27,"name":"vehicle-snake-drum-01","tpage_name":"raila-shrub"}],[172949587,{"idx":83,"name":"jakchires-jacket","tpage_name":"precurd-vis-pris"}],[190382106,{"idx":26,"name":"vehicle-snake-tank-01","tpage_name":"raila-shrub"}],[172949586,{"idx":82,"name":"jakchires-horn","tpage_name":"precurd-vis-pris"}],[190382105,{"idx":25,"name":"vehicle-snake-drum-02","tpage_name":"raila-shrub"}],[172949585,{"idx":81,"name":"jakchires-hair","tpage_name":"precurd-vis-pris"}],[190382104,{"idx":24,"name":"vehicle-rims-01","tpage_name":"raila-shrub"}],[172949584,{"idx":80,"name":"jakchires-glovetop","tpage_name":"precurd-vis-pris"}],[190382103,{"idx":23,"name":"vehicle-snake-gun-01","tpage_name":"raila-shrub"}],[172949583,{"idx":79,"name":"jakchires-facert","tpage_name":"precurd-vis-pris"}],[190382102,{"idx":22,"name":"vehicle-cushion-01","tpage_name":"raila-shrub"}],[172949582,{"idx":78,"name":"jakchires-facelft","tpage_name":"precurd-vis-pris"}],[190382101,{"idx":21,"name":"common-black","tpage_name":"raila-shrub"}],[172949581,{"idx":77,"name":"jakchires-eyelid","tpage_name":"precurd-vis-pris"}],[190382100,{"idx":20,"name":"vehicle-snake-gun-02","tpage_name":"raila-shrub"}],[172949580,{"idx":76,"name":"jakchires-eyebrow","tpage_name":"precurd-vis-pris"}],[190382099,{"idx":19,"name":"vehicle-cap-pin-01","tpage_name":"raila-shrub"}],[172949579,{"idx":75,"name":"jakchires-eye","tpage_name":"precurd-vis-pris"}],[190382098,{"idx":18,"name":"vehicle-brace-pipe-01","tpage_name":"raila-shrub"}],[172949578,{"idx":74,"name":"jakchires-clips","tpage_name":"precurd-vis-pris"}],[190382097,{"idx":17,"name":"vehicle-metal-plate-02","tpage_name":"raila-shrub"}],[172949577,{"idx":73,"name":"jakchires-chestplate","tpage_name":"precurd-vis-pris"}],[190382096,{"idx":16,"name":"vehicle-safety-plate-01","tpage_name":"raila-shrub"}],[172949576,{"idx":72,"name":"jakchires-brwnleather","tpage_name":"precurd-vis-pris"}],[190382095,{"idx":15,"name":"vehicle-body-panel-01","tpage_name":"raila-shrub"}],[172949575,{"idx":71,"name":"jakchires-brownstrap","tpage_name":"precurd-vis-pris"}],[190382094,{"idx":14,"name":"vehicle-chrome-pipe-01","tpage_name":"raila-shrub"}],[172949574,{"idx":70,"name":"jakchires-blackstrap","tpage_name":"precurd-vis-pris"}],[190382093,{"idx":13,"name":"vehicle-pipe-01","tpage_name":"raila-shrub"}],[172949573,{"idx":69,"name":"jakchires-arm","tpage_name":"precurd-vis-pris"}],[194117632,{"idx":0,"name":"intcept-lorez-spike01","tpage_name":"deschase-water"}],[190382092,{"idx":12,"name":"vehicle-snake-tank-02","tpage_name":"raila-shrub"}],[172949572,{"idx":68,"name":"jakc-wristband-a2","tpage_name":"precurd-vis-pris"}],[190382091,{"idx":11,"name":"vehicle-exhaust-pipe-01","tpage_name":"raila-shrub"}],[172949571,{"idx":67,"name":"jakc-wraps","tpage_name":"precurd-vis-pris"}],[190382090,{"idx":10,"name":"vehicle-snake-chassis-01","tpage_name":"raila-shrub"}],[172949570,{"idx":66,"name":"jakc-waistband2","tpage_name":"precurd-vis-pris"}],[172949569,{"idx":65,"name":"jakc-skirt","tpage_name":"precurd-vis-pris"}],[190382088,{"idx":8,"name":"rail-light-blue","tpage_name":"raila-shrub"}],[172949568,{"idx":64,"name":"jakc-scarfhanging","tpage_name":"precurd-vis-pris"}],[190382087,{"idx":7,"name":"rail-chair-01","tpage_name":"raila-shrub"}],[172949567,{"idx":63,"name":"jakc-scarf","tpage_name":"precurd-vis-pris"}],[190382086,{"idx":6,"name":"rail-car-vent-01","tpage_name":"raila-shrub"}],[172949566,{"idx":62,"name":"jakc-lens","tpage_name":"precurd-vis-pris"}],[190382085,{"idx":5,"name":"rail-gray-metal-01","tpage_name":"raila-shrub"}],[172949565,{"idx":61,"name":"jakc-gogglemetal","tpage_name":"precurd-vis-pris"}],[190382084,{"idx":4,"name":"rail-dash-01","tpage_name":"raila-shrub"}],[172949564,{"idx":60,"name":"jakc-chestplate-straps","tpage_name":"precurd-vis-pris"}],[190382083,{"idx":3,"name":"rail-pipe-03","tpage_name":"raila-shrub"}],[172949563,{"idx":59,"name":"jakc-armor","tpage_name":"precurd-vis-pris"}],[190382082,{"idx":2,"name":"rail-rider-decal-01","tpage_name":"raila-shrub"}],[172949562,{"idx":58,"name":"terraformer-transbodytop-01","tpage_name":"precurd-vis-pris"}],[190382081,{"idx":1,"name":"rail-base-dark-01","tpage_name":"raila-shrub"}],[172949561,{"idx":57,"name":"terraformer-organic-03","tpage_name":"precurd-vis-pris"}],[190382080,{"idx":0,"name":"rail-env-wall-01","tpage_name":"raila-shrub"}],[172949560,{"idx":56,"name":"terraformer-organic-02","tpage_name":"precurd-vis-pris"}],[172949559,{"idx":55,"name":"terraformer-organic-01","tpage_name":"precurd-vis-pris"}],[187891718,{"idx":6,"name":"hud-turbo-boost-rim-01","tpage_name":"lfaccar-minimap"}],[172949558,{"idx":54,"name":"terraformer-minestrips-01","tpage_name":"precurd-vis-pris"}],[187891717,{"idx":5,"name":"hud-turbo-boost-on-01","tpage_name":"lfaccar-minimap"}],[172949557,{"idx":53,"name":"terraformer-metal-10","tpage_name":"precurd-vis-pris"}],[187891716,{"idx":4,"name":"hud-turbo-boost-off-01","tpage_name":"lfaccar-minimap"}],[172949556,{"idx":52,"name":"terraformer-metal-09","tpage_name":"precurd-vis-pris"}],[187891715,{"idx":3,"name":"hud-small-vehicle-health-bar-01","tpage_name":"lfaccar-minimap"}],[172949555,{"idx":51,"name":"terraformer-metal-08","tpage_name":"precurd-vis-pris"}],[187891714,{"idx":2,"name":"stadiumb-hud-booster-on-01","tpage_name":"lfaccar-minimap"}],[172949554,{"idx":50,"name":"terraformer-metal-07","tpage_name":"precurd-vis-pris"}],[187891713,{"idx":1,"name":"stadiumb-hud-booster-off-01","tpage_name":"lfaccar-minimap"}],[172949553,{"idx":49,"name":"terraformer-metal-05","tpage_name":"precurd-vis-pris"}],[175439879,{"idx":7,"name":"king-clip-02","tpage_name":"rubblea-vis-pris2"}],[174194699,{"idx":11,"name":"jakc-scarf","tpage_name":"ljkfeet-pris"}],[172949519,{"idx":15,"name":"daxterlense","tpage_name":"precurd-vis-pris"}],[175439877,{"idx":5,"name":"king-bolt","tpage_name":"rubblea-vis-pris2"}],[174194697,{"idx":9,"name":"jakc-gogglemetal","tpage_name":"ljkfeet-pris"}],[172949517,{"idx":13,"name":"daxterheadwidenew","tpage_name":"precurd-vis-pris"}],[172884006,{"idx":38,"name":"dp-bipedal-spine-01","tpage_name":"precura-vis-pris"}],[172884005,{"idx":37,"name":"dp-bipedal-skin-ribs-01","tpage_name":"precura-vis-pris"}],[172884004,{"idx":36,"name":"dp-bipedal-skin-plate-small-01","tpage_name":"precura-vis-pris"}],[172884000,{"idx":32,"name":"dp-bipedal-power-hose","tpage_name":"precura-vis-pris"}],[172883997,{"idx":29,"name":"dp-bipedal-eye-01","tpage_name":"precura-vis-pris"}],[172883992,{"idx":24,"name":"dp-bipedal-dk-plate-02","tpage_name":"precura-vis-pris"}],[172883991,{"idx":23,"name":"dp-bipedal-dk-plate-01","tpage_name":"precura-vis-pris"}],[189005835,{"idx":11,"name":"errolcyber-earcup","tpage_name":"factoryd-vis-pris"}],[186515475,{"idx":19,"name":"kg-pickup-joint","tpage_name":"lctyblow-pris"}],[172818495,{"idx":63,"name":"precur-light-green-big","tpage_name":"precurd-vis-tfrag"}],[189005834,{"idx":10,"name":"errolcyber-dirtymetal","tpage_name":"factoryd-vis-pris"}],[186515474,{"idx":18,"name":"kg-pickup-hood","tpage_name":"lctyblow-pris"}],[172818494,{"idx":62,"name":"precur-floor-large-01-lotweak","tpage_name":"precurd-vis-tfrag"}],[189005833,{"idx":9,"name":"errolcyber-chestplate","tpage_name":"factoryd-vis-pris"}],[186515473,{"idx":17,"name":"kg-pickup-handrail","tpage_name":"lctyblow-pris"}],[172818493,{"idx":61,"name":"precur-terraformer-low-body-01","tpage_name":"precurd-vis-tfrag"}],[189005832,{"idx":8,"name":"errolcyber-bluewrap","tpage_name":"factoryd-vis-pris"}],[186515472,{"idx":16,"name":"kg-pickup-fender-edge","tpage_name":"lctyblow-pris"}],[172818492,{"idx":60,"name":"precur-terraformer-low-body-03","tpage_name":"precurd-vis-tfrag"}],[189005831,{"idx":7,"name":"errolcyber-bluemetal-01","tpage_name":"factoryd-vis-pris"}],[186515471,{"idx":15,"name":"kg-pickup-fender","tpage_name":"lctyblow-pris"}],[172818491,{"idx":59,"name":"precur-terraformer-low-metal-01","tpage_name":"precurd-vis-tfrag"}],[189005830,{"idx":6,"name":"errolcyber-bluedome","tpage_name":"factoryd-vis-pris"}],[186515470,{"idx":14,"name":"kg-pickup-engine-01","tpage_name":"lctyblow-pris"}],[172818490,{"idx":58,"name":"precur-terraformer-low-body-02","tpage_name":"precurd-vis-tfrag"}],[190251009,{"idx":1,"name":"common-glass","tpage_name":"precurc-vis-water"}],[189005829,{"idx":5,"name":"errolcyber-bigshoulder","tpage_name":"factoryd-vis-pris"}],[186515469,{"idx":13,"name":"kg-pickup-body","tpage_name":"lctyblow-pris"}],[172818489,{"idx":57,"name":"precur-terraformer-low-legs","tpage_name":"precurd-vis-tfrag"}],[190251008,{"idx":0,"name":"precur-ice-01","tpage_name":"precurc-vis-water"}],[189005828,{"idx":4,"name":"errolcyber-bighand-01","tpage_name":"factoryd-vis-pris"}],[186515468,{"idx":12,"name":"kg-pickup-bed","tpage_name":"lctyblow-pris"}],[172818488,{"idx":56,"name":"precur-terraformer-low-metal-02","tpage_name":"precurd-vis-tfrag"}],[189005827,{"idx":3,"name":"errocyber-faceflesh","tpage_name":"factoryd-vis-pris"}],[186515467,{"idx":11,"name":"kcfrontend01","tpage_name":"lctyblow-pris"}],[172818487,{"idx":55,"name":"precur-blue-light-02","tpage_name":"precurd-vis-tfrag"}],[189005826,{"idx":2,"name":"environment-oldmetal","tpage_name":"factoryd-vis-pris"}],[186515466,{"idx":10,"name":"jets01","tpage_name":"lctyblow-pris"}],[172818486,{"idx":54,"name":"environment-precur-level","tpage_name":"precurd-vis-tfrag"}],[189005825,{"idx":1,"name":"bam-hairhilite","tpage_name":"factoryd-vis-pris"}],[186515465,{"idx":9,"name":"jetTop01","tpage_name":"lctyblow-pris"}],[172818485,{"idx":53,"name":"precur-floor-large-01","tpage_name":"precurd-vis-tfrag"}],[186515463,{"idx":7,"name":"gunbox02","tpage_name":"lctyblow-pris"}],[172818483,{"idx":51,"name":"precur-floor-base-01","tpage_name":"precurd-vis-tfrag"}],[186515462,{"idx":6,"name":"gunbox01","tpage_name":"lctyblow-pris"}],[172818482,{"idx":50,"name":"precur-wall-tube-03","tpage_name":"precurd-vis-tfrag"}],[186515461,{"idx":5,"name":"gunBoxFront01","tpage_name":"lctyblow-pris"}],[172818481,{"idx":49,"name":"precur-trim-01","tpage_name":"precurd-vis-tfrag"}],[172818471,{"idx":39,"name":"precur-bridge-plate-01","tpage_name":"precurd-vis-tfrag"}],[172818470,{"idx":38,"name":"precur-bridge-floor-01","tpage_name":"precurd-vis-tfrag"}],[172818469,{"idx":37,"name":"precur-bridge-stage-01","tpage_name":"precurd-vis-tfrag"}],[172818468,{"idx":36,"name":"precur-engine-frame-01","tpage_name":"precurd-vis-tfrag"}],[172818465,{"idx":33,"name":"precur-pipe-round-01","tpage_name":"precurd-vis-tfrag"}],[172818464,{"idx":32,"name":"precur-floor-plate-01","tpage_name":"precurd-vis-tfrag"}],[172818462,{"idx":30,"name":"precur-plate-honey-01","tpage_name":"precurd-vis-tfrag"}],[172818461,{"idx":29,"name":"precur-plate-pattern-01","tpage_name":"precurd-vis-tfrag"}],[172818460,{"idx":28,"name":"precur-light-green-02","tpage_name":"precurd-vis-tfrag"}],[172818458,{"idx":26,"name":"precur-tubes-bundle-02","tpage_name":"precurd-vis-tfrag"}],[172818457,{"idx":25,"name":"precur-wall-blade-01","tpage_name":"precurd-vis-tfrag"}],[172752896,{"idx":0,"name":"precur-tube-joint-01","tpage_name":"precurb-vis-shrub"}],[172621826,{"idx":2,"name":"precur-nail-01","tpage_name":"precura-vis-shrub"}],[172556349,{"idx":61,"name":"precur-floor-large-01-lotweak","tpage_name":"precurb-vis-tfrag"}],[172556348,{"idx":60,"name":"precur-small-plate-02","tpage_name":"precurb-vis-tfrag"}],[172556347,{"idx":59,"name":"environment-precur-level","tpage_name":"precurb-vis-tfrag"}],[172556346,{"idx":58,"name":"precur-small-plate-edge","tpage_name":"precurb-vis-tfrag"}],[172556345,{"idx":57,"name":"precur-switch-light","tpage_name":"precurb-vis-tfrag"}],[172556344,{"idx":56,"name":"precur-bomb-spawner-hole","tpage_name":"precurb-vis-tfrag"}],[172556343,{"idx":55,"name":"precur-floor-large-01","tpage_name":"precurb-vis-tfrag"}],[172556342,{"idx":54,"name":"precur-light-red-01","tpage_name":"precurb-vis-tfrag"}],[172556341,{"idx":53,"name":"precur-tube-honey-big","tpage_name":"precurb-vis-tfrag"}],[172556340,{"idx":52,"name":"precur-floor-base-01","tpage_name":"precurb-vis-tfrag"}],[172556339,{"idx":51,"name":"precur-trim-01","tpage_name":"precurb-vis-tfrag"}],[172556338,{"idx":50,"name":"precur-generator-crystal-01","tpage_name":"precurb-vis-tfrag"}],[172556337,{"idx":49,"name":"precur-wall-tube-03","tpage_name":"precurb-vis-tfrag"}],[172556336,{"idx":48,"name":"precur-light-green-big","tpage_name":"precurb-vis-tfrag"}],[172556327,{"idx":39,"name":"precur-control-screen","tpage_name":"precurb-vis-tfrag"}],[172556326,{"idx":38,"name":"common-black","tpage_name":"precurb-vis-tfrag"}],[172556325,{"idx":37,"name":"precur-wall-blade-01","tpage_name":"precurb-vis-tfrag"}],[172556324,{"idx":36,"name":"precur-blue-light-02","tpage_name":"precurb-vis-tfrag"}],[172556323,{"idx":35,"name":"precur-pipe-round-01","tpage_name":"precurb-vis-tfrag"}],[172556321,{"idx":33,"name":"precur-nail-02","tpage_name":"precurb-vis-tfrag"}],[181272580,{"idx":4,"name":"hud-wasdoors-health","tpage_name":"desjump-minimap"}],[172556320,{"idx":32,"name":"precur-road-plate-01","tpage_name":"precurb-vis-tfrag"}],[181272579,{"idx":3,"name":"hud-catapult-01","tpage_name":"desjump-minimap"}],[172556319,{"idx":31,"name":"precur-engine-frame-01","tpage_name":"precurb-vis-tfrag"}],[172556316,{"idx":28,"name":"precur-container-plate-01","tpage_name":"precurb-vis-tfrag"}],[172556315,{"idx":27,"name":"precur-plate-pattern-01","tpage_name":"precurb-vis-tfrag"}],[172556314,{"idx":26,"name":"precur-plate-honey-01","tpage_name":"precurb-vis-tfrag"}],[172556312,{"idx":24,"name":"precur-wall-tube-02","tpage_name":"precurb-vis-tfrag"}],[172556311,{"idx":23,"name":"precur-tubes-bundle-02","tpage_name":"precurb-vis-tfrag"}],[172556310,{"idx":22,"name":"precur-platform-plate","tpage_name":"precurb-vis-tfrag"}],[172556309,{"idx":21,"name":"precur-wall-tube-01","tpage_name":"precurb-vis-tfrag"}],[172556308,{"idx":20,"name":"precur-tentacle-01","tpage_name":"precurb-vis-tfrag"}],[172556306,{"idx":18,"name":"precur-plate-plain-01","tpage_name":"precurb-vis-tfrag"}],[179961899,{"idx":43,"name":"sig-gun-05","tpage_name":"loutro2-pris2"}],[172490819,{"idx":67,"name":"precur-floor-large-01-lotweak","tpage_name":"precura-vis-tfrag"}],[179961895,{"idx":39,"name":"sig-gun-01","tpage_name":"loutro2-pris2"}],[172490815,{"idx":63,"name":"environment-precur-level","tpage_name":"precura-vis-tfrag"}],[179961894,{"idx":38,"name":"sig-glovetop","tpage_name":"loutro2-pris2"}],[172490814,{"idx":62,"name":"precur-small-plate-edge","tpage_name":"precura-vis-tfrag"}],[179961893,{"idx":37,"name":"sig-glove","tpage_name":"loutro2-pris2"}],[172490813,{"idx":61,"name":"precur-bomb-spawner-hole","tpage_name":"precura-vis-tfrag"}],[179961891,{"idx":35,"name":"sig-flask","tpage_name":"loutro2-pris2"}],[172490811,{"idx":59,"name":"precur-floor-base-01","tpage_name":"precura-vis-tfrag"}],[179961890,{"idx":34,"name":"sig-facert","tpage_name":"loutro2-pris2"}],[172490810,{"idx":58,"name":"precur-light-red-01","tpage_name":"precura-vis-tfrag"}],[179961888,{"idx":32,"name":"sig-eyelid","tpage_name":"loutro2-pris2"}],[172490808,{"idx":56,"name":"precur-bomb-light","tpage_name":"precura-vis-tfrag"}],[179961887,{"idx":31,"name":"sig-eye","tpage_name":"loutro2-pris2"}],[172490807,{"idx":55,"name":"precur-trim-01","tpage_name":"precura-vis-tfrag"}],[179961886,{"idx":30,"name":"sig-belt","tpage_name":"loutro2-pris2"}],[172490806,{"idx":54,"name":"precur-light-green-big","tpage_name":"precura-vis-tfrag"}],[172490802,{"idx":50,"name":"precur-blue-light-02","tpage_name":"precura-vis-tfrag"}],[172490801,{"idx":49,"name":"precur-wall-tube-03","tpage_name":"precura-vis-tfrag"}],[172490800,{"idx":48,"name":"precur-generator-crystal-01","tpage_name":"precura-vis-tfrag"}],[177471513,{"idx":25,"name":"rail-env-wall-01","tpage_name":"railb2-tfrag"}],[172490793,{"idx":41,"name":"precur-floor-large-01","tpage_name":"precura-vis-tfrag"}],[172490792,{"idx":40,"name":"common-black","tpage_name":"precura-vis-tfrag"}],[177471511,{"idx":23,"name":"rail-rock-01","tpage_name":"railb2-tfrag"}],[172490791,{"idx":39,"name":"precur-control-screen","tpage_name":"precura-vis-tfrag"}],[177471510,{"idx":22,"name":"rail-light-red","tpage_name":"railb2-tfrag"}],[172490790,{"idx":38,"name":"precur-tube-honey-big","tpage_name":"precura-vis-tfrag"}],[177471509,{"idx":21,"name":"rail-trim-01","tpage_name":"railb2-tfrag"}],[172490789,{"idx":37,"name":"precur-light-blue-01","tpage_name":"precura-vis-tfrag"}],[177471507,{"idx":19,"name":"rail-pipe-05","tpage_name":"railb2-tfrag"}],[172490787,{"idx":35,"name":"precur-rubber-01","tpage_name":"precura-vis-tfrag"}],[177471506,{"idx":18,"name":"comb-redmarker","tpage_name":"railb2-tfrag"}],[172490786,{"idx":34,"name":"precur-tubes-bundle-02","tpage_name":"precura-vis-tfrag"}],[177471505,{"idx":17,"name":"rail-pipe-02","tpage_name":"railb2-tfrag"}],[172490785,{"idx":33,"name":"precur-platform-plate","tpage_name":"precura-vis-tfrag"}],[177471504,{"idx":16,"name":"rail-light-yellow-small","tpage_name":"railb2-tfrag"}],[172490784,{"idx":32,"name":"precur-wall-tube-01","tpage_name":"precura-vis-tfrag"}],[177471503,{"idx":15,"name":"rail-light-yellow","tpage_name":"railb2-tfrag"}],[172490783,{"idx":31,"name":"precur-engine-frame-01","tpage_name":"precura-vis-tfrag"}],[177471502,{"idx":14,"name":"rail-env-car-01","tpage_name":"railb2-tfrag"}],[172490782,{"idx":30,"name":"precur-plate-honey-01","tpage_name":"precura-vis-tfrag"}],[177471499,{"idx":11,"name":"rail-cord-01","tpage_name":"railb2-tfrag"}],[172490779,{"idx":27,"name":"precur-container-plate-01","tpage_name":"precura-vis-tfrag"}],[179961858,{"idx":2,"name":"charHOLD","tpage_name":"loutro2-pris2"}],[177471498,{"idx":10,"name":"rail-detail-01","tpage_name":"railb2-tfrag"}],[172490778,{"idx":26,"name":"precur-road-plate-01","tpage_name":"precura-vis-tfrag"}],[177471497,{"idx":9,"name":"rail-light-blue-small","tpage_name":"railb2-tfrag"}],[172490777,{"idx":25,"name":"precur-plate-large-01","tpage_name":"precura-vis-tfrag"}],[179961856,{"idx":0,"name":"bam-eyelight","tpage_name":"loutro2-pris2"}],[177471496,{"idx":8,"name":"rail-gray-metal-01","tpage_name":"railb2-tfrag"}],[172490776,{"idx":24,"name":"precur-plate-thin-01","tpage_name":"precura-vis-tfrag"}],[172490763,{"idx":11,"name":"precur-light-green-01","tpage_name":"precura-vis-tfrag"}],[172490762,{"idx":10,"name":"precur-wall-brace-01","tpage_name":"precura-vis-tfrag"}],[172490760,{"idx":8,"name":"precur-wall-tube-02","tpage_name":"precura-vis-tfrag"}],[172490759,{"idx":7,"name":"precur-plate-end-01","tpage_name":"precura-vis-tfrag"}],[173735938,{"idx":2,"name":"tow-eggside-01","tpage_name":"towerb-vis-alpha"}],[172490758,{"idx":6,"name":"precur-floor-plate-01","tpage_name":"precura-vis-tfrag"}],[173735937,{"idx":1,"name":"tow-eggtop-01","tpage_name":"towerb-vis-alpha"}],[172490757,{"idx":5,"name":"precur-nail-02","tpage_name":"precura-vis-tfrag"}],[173735936,{"idx":0,"name":"tow-eggcase-01","tpage_name":"towerb-vis-alpha"}],[172490756,{"idx":4,"name":"precur-nail-01","tpage_name":"precura-vis-tfrag"}],[172490755,{"idx":3,"name":"precur-tubes-segment-01","tpage_name":"precura-vis-tfrag"}],[172490754,{"idx":2,"name":"precur-plate-pattern-01","tpage_name":"precura-vis-tfrag"}],[172490753,{"idx":1,"name":"precur-tubes-small-01","tpage_name":"precura-vis-tfrag"}],[172490752,{"idx":0,"name":"precur-floor-plate-02","tpage_name":"precura-vis-tfrag"}],[187170834,{"idx":18,"name":"dm-ecotank-light-rim-01","tpage_name":"deswalk-vis-pris"}],[172228674,{"idx":66,"name":"templea_sandstone01","tpage_name":"templeb-vis-pris"}],[172228650,{"idx":42,"name":"temple_sandstone_trim02","tpage_name":"templeb-vis-pris"}],[172228649,{"idx":41,"name":"temple_sandstone_stepside01","tpage_name":"templeb-vis-pris"}],[172228648,{"idx":40,"name":"temple_sandstone_pill05","tpage_name":"templeb-vis-pris"}],[172228647,{"idx":39,"name":"temple_sandstone_pill02","tpage_name":"templeb-vis-pris"}],[172228638,{"idx":30,"name":"temple_metal02","tpage_name":"templeb-vis-pris"}],[173473817,{"idx":25,"name":"tow-base-ground","tpage_name":"ltowerb-vis-tfrag"}],[172228637,{"idx":29,"name":"temple_pre-04","tpage_name":"templeb-vis-pris"}],[173473816,{"idx":24,"name":"tow-wall-tentacle-02","tpage_name":"ltowerb-vis-tfrag"}],[172228636,{"idx":28,"name":"temple_pre-03","tpage_name":"templeb-vis-pris"}],[173473815,{"idx":23,"name":"tow-outerpod-shell","tpage_name":"ltowerb-vis-tfrag"}],[172228635,{"idx":27,"name":"rail-env-wall-01","tpage_name":"templeb-vis-pris"}],[173473813,{"idx":21,"name":"tow-baserock","tpage_name":"ltowerb-vis-tfrag"}],[172228633,{"idx":25,"name":"temple_pre-01","tpage_name":"templeb-vis-pris"}],[173473812,{"idx":20,"name":"tow-pup-metal-01","tpage_name":"ltowerb-vis-tfrag"}],[172228632,{"idx":24,"name":"temple_sandstone_pill01","tpage_name":"templeb-vis-pris"}],[190644227,{"idx":3,"name":"veger-bookleather","tpage_name":"templee-pris2"}],[184418327,{"idx":23,"name":"rub-metal-wallgrill","tpage_name":"stadiuma-vis-tfrag"}],[171966527,{"idx":63,"name":"charHOLD","tpage_name":"templea-vis-pris2"}],[171900928,{"idx":0,"name":"minc-pre-12","tpage_name":"templed-vis-water"}],[171769982,{"idx":126,"name":"temple_sandstone_brick-01","tpage_name":"templea-vis-pris"}],[171769981,{"idx":125,"name":"temple_metal03","tpage_name":"templea-vis-pris"}],[171769974,{"idx":118,"name":"temple_metal02","tpage_name":"templea-vis-pris"}],[207880192,{"idx":0,"name":"terraformer-cpitwindows-01","tpage_name":"desboss1-water"}],[171769972,{"idx":116,"name":"environment-darkprec","tpage_name":"templea-vis-pris"}],[171769971,{"idx":115,"name":"dp-bipedal-toe-01","tpage_name":"templea-vis-pris"}],[192938030,{"idx":46,"name":"lt-eco-vent-side-01","tpage_name":"lprecurc-vis-tfrag"}],[171769970,{"idx":114,"name":"dp-bipedal-spine-01","tpage_name":"templea-vis-pris"}],[192938029,{"idx":45,"name":"lt-eco-vent-blue-01","tpage_name":"lprecurc-vis-tfrag"}],[171769969,{"idx":113,"name":"dp-bipedal-skin-ribs-01","tpage_name":"templea-vis-pris"}],[171769968,{"idx":112,"name":"dp-bipedal-skin-plate-small-01","tpage_name":"templea-vis-pris"}],[171769967,{"idx":111,"name":"dp-bipedal-skin-plate-01","tpage_name":"templea-vis-pris"}],[205389826,{"idx":2,"name":"ecocreature-teeth","tpage_name":"deswalk-vis-water"}],[192938026,{"idx":42,"name":"precur-trim-01","tpage_name":"lprecurc-vis-tfrag"}],[171769966,{"idx":110,"name":"dp-bipedal-skin-bulge-02","tpage_name":"templea-vis-pris"}],[171769965,{"idx":109,"name":"dp-bipedal-skin-bulge-01","tpage_name":"templea-vis-pris"}],[192938024,{"idx":40,"name":"precur-small-plate-edge","tpage_name":"lprecurc-vis-tfrag"}],[171769964,{"idx":108,"name":"dp-bipedal-power-hose","tpage_name":"templea-vis-pris"}],[171769963,{"idx":107,"name":"dp-bipedal-nose-01","tpage_name":"templea-vis-pris"}],[171769962,{"idx":106,"name":"dp-bipedal-finger-plate-01","tpage_name":"templea-vis-pris"}],[171769961,{"idx":105,"name":"dp-bipedal-eye-01","tpage_name":"templea-vis-pris"}],[171769960,{"idx":104,"name":"dp-bipedal-dk-stomach-plate-01","tpage_name":"templea-vis-pris"}],[171769959,{"idx":103,"name":"dp-bipedal-dk-sm-plate-01","tpage_name":"templea-vis-pris"}],[171769958,{"idx":102,"name":"dp-bipedal-dk-plate-04","tpage_name":"templea-vis-pris"}],[171769957,{"idx":101,"name":"dp-bipedal-dk-plate-03","tpage_name":"templea-vis-pris"}],[171769956,{"idx":100,"name":"dp-bipedal-dk-plate-02","tpage_name":"templea-vis-pris"}],[171769955,{"idx":99,"name":"dp-bipedal-dk-plate-01","tpage_name":"templea-vis-pris"}],[171769954,{"idx":98,"name":"dp-bipedal-dk-hose-01","tpage_name":"templea-vis-pris"}],[171769953,{"idx":97,"name":"dp-bipedal-chest-01","tpage_name":"templea-vis-pris"}],[171769952,{"idx":96,"name":"dp-bipedal-backhand-01","tpage_name":"templea-vis-pris"}],[171769951,{"idx":95,"name":"common-black","tpage_name":"templea-vis-pris"}],[171769943,{"idx":87,"name":"kid-medallion","tpage_name":"templea-vis-pris"}],[171769942,{"idx":86,"name":"comb-env2","tpage_name":"templea-vis-pris"}],[192937998,{"idx":14,"name":"precur-rubber-01","tpage_name":"lprecurc-vis-tfrag"}],[171769938,{"idx":82,"name":"pre-pipe-01","tpage_name":"templea-vis-pris"}],[171769937,{"idx":81,"name":"pre-med-01","tpage_name":"templea-vis-pris"}],[192937996,{"idx":12,"name":"precur-wall-groove-01","tpage_name":"lprecurc-vis-tfrag"}],[171769936,{"idx":80,"name":"pre-light-01","tpage_name":"templea-vis-pris"}],[171769935,{"idx":79,"name":"pre-lens-glass01","tpage_name":"templea-vis-pris"}],[171769934,{"idx":78,"name":"pre-lens-01","tpage_name":"templea-vis-pris"}],[171769932,{"idx":76,"name":"tpl-symbl-yellow-glow-01","tpage_name":"templea-vis-pris"}],[192937991,{"idx":7,"name":"precur-tubes-segment-01","tpage_name":"lprecurc-vis-tfrag"}],[171769931,{"idx":75,"name":"tpl-symbl-yellow-01","tpage_name":"templea-vis-pris"}],[171769930,{"idx":74,"name":"temple_sandstone_trim02","tpage_name":"templea-vis-pris"}],[171769929,{"idx":73,"name":"temple_sandstone_scale_01","tpage_name":"templea-vis-pris"}],[171769928,{"idx":72,"name":"temple_sandstone_out_01","tpage_name":"templea-vis-pris"}],[171769927,{"idx":71,"name":"tpl-door-round-01","tpage_name":"templea-vis-pris"}],[192937986,{"idx":2,"name":"precur-tubes-small-01","tpage_name":"lprecurc-vis-tfrag"}],[171769926,{"idx":70,"name":"tpl-door-face-01","tpage_name":"templea-vis-pris"}],[192937985,{"idx":1,"name":"precur-plate-large-01","tpage_name":"lprecurc-vis-tfrag"}],[173015105,{"idx":65,"name":"precur-light-green-big","tpage_name":"precurc-vis-tfrag"}],[171769925,{"idx":69,"name":"tpl-door-edge-01","tpage_name":"templea-vis-pris"}],[173015099,{"idx":59,"name":"precur-floor-large-01","tpage_name":"precurc-vis-tfrag"}],[171769919,{"idx":63,"name":"temple_flag01","tpage_name":"templea-vis-pris"}],[173015098,{"idx":58,"name":"precur-light-red-01","tpage_name":"precurc-vis-tfrag"}],[171769918,{"idx":62,"name":"jakchires-teeth","tpage_name":"templea-vis-pris"}],[173015097,{"idx":57,"name":"precur-tube-honey-big","tpage_name":"precurc-vis-tfrag"}],[171769917,{"idx":61,"name":"jakchires-shoeteop","tpage_name":"templea-vis-pris"}],[190447616,{"idx":0,"name":"racegate","tpage_name":"lbbring4-sprite"}],[173015096,{"idx":56,"name":"precur-floor-base-01","tpage_name":"precurc-vis-tfrag"}],[171769916,{"idx":60,"name":"jakchires-shoemetal","tpage_name":"templea-vis-pris"}],[173015095,{"idx":55,"name":"precur-wall-tube-03","tpage_name":"precurc-vis-tfrag"}],[171769915,{"idx":59,"name":"jakchires-shoebottom","tpage_name":"templea-vis-pris"}],[173015094,{"idx":54,"name":"precur-small-plate-edge","tpage_name":"precurc-vis-tfrag"}],[171769914,{"idx":58,"name":"jakchires-precarmor-01","tpage_name":"templea-vis-pris"}],[173015093,{"idx":53,"name":"precur-trim-01","tpage_name":"precurc-vis-tfrag"}],[171769913,{"idx":57,"name":"jakchires-pants","tpage_name":"templea-vis-pris"}],[171769912,{"idx":56,"name":"jakchires-lightbrownspat","tpage_name":"templea-vis-pris"}],[171769911,{"idx":55,"name":"jakchires-leatherpouch","tpage_name":"templea-vis-pris"}],[171769910,{"idx":54,"name":"jakchires-jacket","tpage_name":"templea-vis-pris"}],[171769909,{"idx":53,"name":"jakchires-horn","tpage_name":"templea-vis-pris"}],[171769908,{"idx":52,"name":"jakchires-hair","tpage_name":"templea-vis-pris"}],[171769907,{"idx":51,"name":"jakchires-glovetop","tpage_name":"templea-vis-pris"}],[171769906,{"idx":50,"name":"jakchires-facert","tpage_name":"templea-vis-pris"}],[171769905,{"idx":49,"name":"jakchires-facelft","tpage_name":"templea-vis-pris"}],[171769904,{"idx":48,"name":"jakchires-eyelid","tpage_name":"templea-vis-pris"}],[171769903,{"idx":47,"name":"jakchires-eyebrow","tpage_name":"templea-vis-pris"}],[171769902,{"idx":46,"name":"jakchires-eye","tpage_name":"templea-vis-pris"}],[171769901,{"idx":45,"name":"jakchires-clips","tpage_name":"templea-vis-pris"}],[171769900,{"idx":44,"name":"jakchires-chestplate","tpage_name":"templea-vis-pris"}],[173015079,{"idx":39,"name":"precur-tubes-bundle-02","tpage_name":"precurc-vis-tfrag"}],[171769899,{"idx":43,"name":"jakchires-brwnleather","tpage_name":"templea-vis-pris"}],[173015078,{"idx":38,"name":"precur-floor-plate-01","tpage_name":"precurc-vis-tfrag"}],[171769898,{"idx":42,"name":"jakchires-brownstrap","tpage_name":"templea-vis-pris"}],[173015077,{"idx":37,"name":"precur-platform-plate","tpage_name":"precurc-vis-tfrag"}],[171769897,{"idx":41,"name":"jakchires-blackstrap","tpage_name":"templea-vis-pris"}],[173015076,{"idx":36,"name":"precur-floor-plate-02","tpage_name":"precurc-vis-tfrag"}],[171769896,{"idx":40,"name":"jakchires-arm","tpage_name":"templea-vis-pris"}],[173015075,{"idx":35,"name":"precur-wall-blade-01","tpage_name":"precurc-vis-tfrag"}],[171769895,{"idx":39,"name":"jakc-wristband-a2","tpage_name":"templea-vis-pris"}],[173015074,{"idx":34,"name":"precur-blue-light-02","tpage_name":"precurc-vis-tfrag"}],[171769894,{"idx":38,"name":"jakc-wraps","tpage_name":"templea-vis-pris"}],[173015073,{"idx":33,"name":"precur-engine-frame-01","tpage_name":"precurc-vis-tfrag"}],[171769893,{"idx":37,"name":"jakc-waistband2","tpage_name":"templea-vis-pris"}],[171769892,{"idx":36,"name":"jakc-skirt","tpage_name":"templea-vis-pris"}],[173015071,{"idx":31,"name":"precur-tube-joint-02","tpage_name":"precurc-vis-tfrag"}],[171769891,{"idx":35,"name":"jakc-scarfhanging","tpage_name":"templea-vis-pris"}],[171769890,{"idx":34,"name":"jakc-scarf","tpage_name":"templea-vis-pris"}],[171769889,{"idx":33,"name":"jakc-lens","tpage_name":"templea-vis-pris"}],[173015068,{"idx":28,"name":"precur-container-plate-01","tpage_name":"precurc-vis-tfrag"}],[171769888,{"idx":32,"name":"jakc-gogglemetal","tpage_name":"templea-vis-pris"}],[173015067,{"idx":27,"name":"precur-plate-plain-01","tpage_name":"precurc-vis-tfrag"}],[171769887,{"idx":31,"name":"jakc-chestplate-straps","tpage_name":"templea-vis-pris"}],[173015066,{"idx":26,"name":"precur-pipe-round-01","tpage_name":"precurc-vis-tfrag"}],[171769886,{"idx":30,"name":"jakc-armor","tpage_name":"templea-vis-pris"}],[173015065,{"idx":25,"name":"precur-lightball-base","tpage_name":"precurc-vis-tfrag"}],[171769885,{"idx":29,"name":"environment-oldmetal","tpage_name":"templea-vis-pris"}],[173015064,{"idx":24,"name":"precur-light-green-02","tpage_name":"precurc-vis-tfrag"}],[171769884,{"idx":28,"name":"daxtertuft","tpage_name":"templea-vis-pris"}],[173015063,{"idx":23,"name":"precur-frame-small-01","tpage_name":"precurc-vis-tfrag"}],[171769883,{"idx":27,"name":"daxterteeth","tpage_name":"templea-vis-pris"}],[173015062,{"idx":22,"name":"precur-tubes-bundle-01","tpage_name":"precurc-vis-tfrag"}],[171769882,{"idx":26,"name":"daxternose","tpage_name":"templea-vis-pris"}],[173015061,{"idx":21,"name":"precur-plate-honey-01","tpage_name":"precurc-vis-tfrag"}],[171769881,{"idx":25,"name":"daxterlense","tpage_name":"templea-vis-pris"}],[173015060,{"idx":20,"name":"precur-plate-pattern-01","tpage_name":"precurc-vis-tfrag"}],[171769880,{"idx":24,"name":"daxterhelmetplain","tpage_name":"templea-vis-pris"}],[173015059,{"idx":19,"name":"precur-plate-end-01","tpage_name":"precurc-vis-tfrag"}],[171769879,{"idx":23,"name":"daxterheadwidenew","tpage_name":"templea-vis-pris"}],[171769878,{"idx":22,"name":"daxtergoggles","tpage_name":"templea-vis-pris"}],[173015057,{"idx":17,"name":"precur-plate-thin-01","tpage_name":"precurc-vis-tfrag"}],[171769877,{"idx":21,"name":"daxterfoot-bottom","tpage_name":"templea-vis-pris"}],[173015056,{"idx":16,"name":"precur-wall-tube-02","tpage_name":"precurc-vis-tfrag"}],[171769876,{"idx":20,"name":"daxterfoot","tpage_name":"templea-vis-pris"}],[171769875,{"idx":19,"name":"daxterfinger","tpage_name":"templea-vis-pris"}],[173015054,{"idx":14,"name":"precur-rubber-01","tpage_name":"precurc-vis-tfrag"}],[171769874,{"idx":18,"name":"daxterear","tpage_name":"templea-vis-pris"}],[173015053,{"idx":13,"name":"common-black","tpage_name":"precurc-vis-tfrag"}],[171769873,{"idx":17,"name":"daxterbolt","tpage_name":"templea-vis-pris"}],[173015052,{"idx":12,"name":"precur-wall-groove-01","tpage_name":"precurc-vis-tfrag"}],[171769872,{"idx":16,"name":"daxterbodyshort-eix","tpage_name":"templea-vis-pris"}],[175505411,{"idx":3,"name":"hud-progress-meter-arrow-02","tpage_name":"precura-minimap"}],[173015051,{"idx":11,"name":"precur-tubes-segment-02","tpage_name":"precurc-vis-tfrag"}],[171769871,{"idx":15,"name":"daxterarm","tpage_name":"templea-vis-pris"}],[175505410,{"idx":2,"name":"hud-darkmaker-mech-shield-01","tpage_name":"precura-minimap"}],[173015050,{"idx":10,"name":"precur-wall-tube-01","tpage_name":"precurc-vis-tfrag"}],[171769870,{"idx":14,"name":"daxter-orange","tpage_name":"templea-vis-pris"}],[173015049,{"idx":9,"name":"precur-tentacle-01","tpage_name":"precurc-vis-tfrag"}],[171769869,{"idx":13,"name":"daxter-furhilite","tpage_name":"templea-vis-pris"}],[173015048,{"idx":8,"name":"precur-road-plate-01","tpage_name":"precurc-vis-tfrag"}],[171769868,{"idx":12,"name":"daxter-eyelid","tpage_name":"templea-vis-pris"}],[173015047,{"idx":7,"name":"precur-tubes-segment-01","tpage_name":"precurc-vis-tfrag"}],[171769867,{"idx":11,"name":"bam-hairhilite","tpage_name":"templea-vis-pris"}],[173015046,{"idx":6,"name":"precur-nail-01","tpage_name":"precurc-vis-tfrag"}],[171769866,{"idx":10,"name":"bam-eyelight","tpage_name":"templea-vis-pris"}],[173015044,{"idx":4,"name":"precur-light-green-01","tpage_name":"precurc-vis-tfrag"}],[171769864,{"idx":8,"name":"dk-maker-idol-tubes-01","tpage_name":"templea-vis-pris"}],[173015043,{"idx":3,"name":"precur-tube-joint-01","tpage_name":"precurc-vis-tfrag"}],[171769863,{"idx":7,"name":"dk-maker-idol-metal-01","tpage_name":"templea-vis-pris"}],[173015042,{"idx":2,"name":"precur-tubes-small-01","tpage_name":"precurc-vis-tfrag"}],[171769862,{"idx":6,"name":"dk-maker-idol-head-01","tpage_name":"templea-vis-pris"}],[173015041,{"idx":1,"name":"precur-plate-large-01","tpage_name":"precurc-vis-tfrag"}],[171769861,{"idx":5,"name":"dk-maker-idol-globes-dk-01","tpage_name":"templea-vis-pris"}],[173015040,{"idx":0,"name":"precur-wall-brace-01","tpage_name":"precurc-vis-tfrag"}],[171769860,{"idx":4,"name":"dk-maker-idol-globes-01","tpage_name":"templea-vis-pris"}],[171769859,{"idx":3,"name":"dk-maker-idol-eye-dk-01","tpage_name":"templea-vis-pris"}],[171769858,{"idx":2,"name":"dk-maker-idol-eye-01","tpage_name":"templea-vis-pris"}],[171769857,{"idx":1,"name":"dk-maker-idol-collar-02","tpage_name":"templea-vis-pris"}],[171769856,{"idx":0,"name":"dk-maker-idol-collar-01","tpage_name":"templea-vis-pris"}],[175439878,{"idx":6,"name":"king-chest","tpage_name":"rubblea-vis-pris2"}],[174194698,{"idx":10,"name":"jakc-lens","tpage_name":"ljkfeet-pris"}],[172949518,{"idx":14,"name":"daxterhelmetplain","tpage_name":"precurd-vis-pris"}],[171704338,{"idx":18,"name":"temple_sandstone_dtale02","tpage_name":"templec-vis-tfrag"}],[175439876,{"idx":4,"name":"king-bluemetal","tpage_name":"rubblea-vis-pris2"}],[174194696,{"idx":8,"name":"jakc-chestplate-straps","tpage_name":"ljkfeet-pris"}],[172949516,{"idx":12,"name":"daxtergoggles","tpage_name":"precurd-vis-pris"}],[171704336,{"idx":16,"name":"temple_sandstone_box01","tpage_name":"templec-vis-tfrag"}],[174129215,{"idx":63,"name":"prec-veger-foot","tpage_name":"loutro-pris2"}],[171638855,{"idx":71,"name":"dk-eco-vent-side-01","tpage_name":"templed-vis-tfrag"}],[190316554,{"idx":10,"name":"rail-light-green","tpage_name":"railcst-shrub"}],[174129214,{"idx":62,"name":"prec-veger-ear","tpage_name":"loutro-pris2"}],[171638854,{"idx":70,"name":"dk-eco-vent-glow-01","tpage_name":"templed-vis-tfrag"}],[174129213,{"idx":61,"name":"prec-veger-body","tpage_name":"loutro-pris2"}],[171638853,{"idx":69,"name":"environment-darkprec","tpage_name":"templed-vis-tfrag"}],[190316552,{"idx":8,"name":"rail-light-blue","tpage_name":"railcst-shrub"}],[174129212,{"idx":60,"name":"daxterteeth","tpage_name":"loutro-pris2"}],[171638852,{"idx":68,"name":"temple_sandstone_ground01","tpage_name":"templed-vis-tfrag"}],[190316551,{"idx":7,"name":"rail-chair-01","tpage_name":"railcst-shrub"}],[174129211,{"idx":59,"name":"daxter-furhilite","tpage_name":"loutro-pris2"}],[171638851,{"idx":67,"name":"temple_sandstone_ground04","tpage_name":"templed-vis-tfrag"}],[190316550,{"idx":6,"name":"rail-car-vent-01","tpage_name":"railcst-shrub"}],[174129210,{"idx":58,"name":"daxter-eyelid","tpage_name":"loutro-pris2"}],[171638850,{"idx":66,"name":"temple_metal04","tpage_name":"templed-vis-tfrag"}],[190316549,{"idx":5,"name":"rail-gray-metal-01","tpage_name":"railcst-shrub"}],[171638849,{"idx":65,"name":"temple_sandstone_taper01","tpage_name":"templed-vis-tfrag"}],[190316548,{"idx":4,"name":"rail-dash-01","tpage_name":"railcst-shrub"}],[171638848,{"idx":64,"name":"temple_sandstone_pill06","tpage_name":"templed-vis-tfrag"}],[190316547,{"idx":3,"name":"rail-pipe-03","tpage_name":"railcst-shrub"}],[171638847,{"idx":63,"name":"temple_sandstone_ground03","tpage_name":"templed-vis-tfrag"}],[190316546,{"idx":2,"name":"rail-rider-decal-01","tpage_name":"railcst-shrub"}],[171638846,{"idx":62,"name":"temple_sandstone_pill05","tpage_name":"templed-vis-tfrag"}],[190316545,{"idx":1,"name":"rail-base-dark-01","tpage_name":"railcst-shrub"}],[171638845,{"idx":61,"name":"tpl-door-face-01","tpage_name":"templed-vis-tfrag"}],[190316544,{"idx":0,"name":"rail-env-wall-01","tpage_name":"railcst-shrub"}],[172884024,{"idx":56,"name":"neo-wasp-eye","tpage_name":"precura-vis-pris"}],[171638844,{"idx":60,"name":"temple_sandstone_brick-02","tpage_name":"templed-vis-tfrag"}],[172884023,{"idx":55,"name":"neo-wasp-dark-brown","tpage_name":"precura-vis-pris"}],[171638843,{"idx":59,"name":"temple_sandstone_pill07","tpage_name":"templed-vis-tfrag"}],[172884022,{"idx":54,"name":"neo-wasp-brown","tpage_name":"precura-vis-pris"}],[171638842,{"idx":58,"name":"common_sandstone_base01","tpage_name":"templed-vis-tfrag"}],[172884021,{"idx":53,"name":"neo-wasp-body","tpage_name":"precura-vis-pris"}],[171638841,{"idx":57,"name":"common_sandstone_pill01","tpage_name":"templed-vis-tfrag"}],[189071360,{"idx":0,"name":"errolcyber-lens","tpage_name":"factoryd-vis-water"}],[172884020,{"idx":52,"name":"neo-wasp-base","tpage_name":"precura-vis-pris"}],[171638840,{"idx":56,"name":"common_sandstone_trim01","tpage_name":"templed-vis-tfrag"}],[171638839,{"idx":55,"name":"common_sandstone_taper01","tpage_name":"templed-vis-tfrag"}],[171638838,{"idx":54,"name":"common_sandstone_ground01","tpage_name":"templed-vis-tfrag"}],[171638837,{"idx":53,"name":"temple_pre-03","tpage_name":"templed-vis-tfrag"}],[171638836,{"idx":52,"name":"temple_pre-04","tpage_name":"templed-vis-tfrag"}],[171638835,{"idx":51,"name":"temple_sandstone_pill02","tpage_name":"templed-vis-tfrag"}],[171638834,{"idx":50,"name":"temple_pre-01","tpage_name":"templed-vis-tfrag"}],[186580992,{"idx":0,"name":"windshield01","tpage_name":"lctyblow-water"}],[171638832,{"idx":48,"name":"temple_sandstone_star01","tpage_name":"templed-vis-tfrag"}],[171638831,{"idx":47,"name":"temple_sandstone_pill03","tpage_name":"templed-vis-tfrag"}],[171638830,{"idx":46,"name":"temple_sandstone_steptop01","tpage_name":"templed-vis-tfrag"}],[171638829,{"idx":45,"name":"temple_sandstone_trim01","tpage_name":"templed-vis-tfrag"}],[172884008,{"idx":40,"name":"environment-darkprec","tpage_name":"precura-vis-pris"}],[171638828,{"idx":44,"name":"temple_sandstone_trim02","tpage_name":"templed-vis-tfrag"}],[172884007,{"idx":39,"name":"dp-bipedal-toe-01","tpage_name":"precura-vis-pris"}],[171638827,{"idx":43,"name":"temple_sandstone_brick-01","tpage_name":"templed-vis-tfrag"}],[172884003,{"idx":35,"name":"dp-bipedal-skin-plate-01","tpage_name":"precura-vis-pris"}],[171638823,{"idx":39,"name":"rail-env-wall-01","tpage_name":"templed-vis-tfrag"}],[172884002,{"idx":34,"name":"dp-bipedal-skin-bulge-02","tpage_name":"precura-vis-pris"}],[171638822,{"idx":38,"name":"temple-celing-01","tpage_name":"templed-vis-tfrag"}],[174129181,{"idx":29,"name":"environment-oldmetal","tpage_name":"loutro-pris2"}],[172884001,{"idx":33,"name":"dp-bipedal-skin-bulge-01","tpage_name":"precura-vis-pris"}],[171638821,{"idx":37,"name":"temple_bark01","tpage_name":"templed-vis-tfrag"}],[172883999,{"idx":31,"name":"dp-bipedal-nose-01","tpage_name":"precura-vis-pris"}],[171638819,{"idx":35,"name":"temple_sandstone_stepside01","tpage_name":"templed-vis-tfrag"}],[172883998,{"idx":30,"name":"dp-bipedal-finger-plate-01","tpage_name":"precura-vis-pris"}],[171638818,{"idx":34,"name":"wascity-rope","tpage_name":"templed-vis-tfrag"}],[172883996,{"idx":28,"name":"dp-bipedal-dk-stomach-plate-01","tpage_name":"precura-vis-pris"}],[171638816,{"idx":32,"name":"wstd-torchbowl-coal-01","tpage_name":"templed-vis-tfrag"}],[172883995,{"idx":27,"name":"dp-bipedal-dk-sm-plate-01","tpage_name":"precura-vis-pris"}],[171638815,{"idx":31,"name":"temple_metal02","tpage_name":"templed-vis-tfrag"}],[172883994,{"idx":26,"name":"dp-bipedal-dk-plate-04","tpage_name":"precura-vis-pris"}],[171638814,{"idx":30,"name":"temple_metal01","tpage_name":"templed-vis-tfrag"}],[172883993,{"idx":25,"name":"dp-bipedal-dk-plate-03","tpage_name":"precura-vis-pris"}],[171638813,{"idx":29,"name":"templea_sandstone01","tpage_name":"templed-vis-tfrag"}],[172883990,{"idx":22,"name":"dp-bipedal-dk-hose-01","tpage_name":"precura-vis-pris"}],[171638810,{"idx":26,"name":"temple_sandstone_pill01","tpage_name":"templed-vis-tfrag"}],[172883989,{"idx":21,"name":"dp-bipedal-chest-01","tpage_name":"precura-vis-pris"}],[171638809,{"idx":25,"name":"temple_sandstone_box01","tpage_name":"templed-vis-tfrag"}],[172883988,{"idx":20,"name":"dp-bipedal-backhand-01","tpage_name":"precura-vis-pris"}],[171638808,{"idx":24,"name":"temple_sandstone_base01","tpage_name":"templed-vis-tfrag"}],[172883987,{"idx":19,"name":"common-black","tpage_name":"precura-vis-pris"}],[171638807,{"idx":23,"name":"warpgate-post-01","tpage_name":"templed-vis-tfrag"}],[171638806,{"idx":22,"name":"warpgate-precursormetal","tpage_name":"templed-vis-tfrag"}],[171638805,{"idx":21,"name":"warpgate-circuitpattern2","tpage_name":"templed-vis-tfrag"}],[171638804,{"idx":20,"name":"minc-pre-11","tpage_name":"templed-vis-tfrag"}],[171638803,{"idx":19,"name":"minc-pre-04","tpage_name":"templed-vis-tfrag"}],[171638801,{"idx":17,"name":"minc-01","tpage_name":"templed-vis-tfrag"}],[171638800,{"idx":16,"name":"min-env-mar-01","tpage_name":"templed-vis-tfrag"}],[171638799,{"idx":15,"name":"lt-eco-vent-side-01","tpage_name":"templed-vis-tfrag"}],[175374338,{"idx":2,"name":"hud-small-vehicle-health-bar-02","tpage_name":"comba-minimap"}],[171638798,{"idx":14,"name":"lt-eco-vent-blue-01","tpage_name":"templed-vis-tfrag"}],[171638795,{"idx":11,"name":"templea_sandstone_brick01","tpage_name":"templed-vis-tfrag"}],[171638794,{"idx":10,"name":"temple_sandstone_out_01","tpage_name":"templed-vis-tfrag"}],[174129153,{"idx":1,"name":"bam-hairhilite","tpage_name":"loutro-pris2"}],[171638793,{"idx":9,"name":"temple-steps-brown","tpage_name":"templed-vis-tfrag"}],[171638790,{"idx":6,"name":"temple_sandstone_ground02","tpage_name":"templed-vis-tfrag"}],[171638789,{"idx":5,"name":"temple_sandstone_dtale02","tpage_name":"templed-vis-tfrag"}],[171638788,{"idx":4,"name":"comb-temp-glass","tpage_name":"templed-vis-tfrag"}],[171638787,{"idx":3,"name":"comb-crct-medium","tpage_name":"templed-vis-tfrag"}],[171638785,{"idx":1,"name":"comb-pipe2","tpage_name":"templed-vis-tfrag"}],[188940297,{"idx":9,"name":"facc-markings-04","tpage_name":"factoryd-vis-shrub"}],[171507777,{"idx":65,"name":"common-black","tpage_name":"templeb-vis-tfrag"}],[188940296,{"idx":8,"name":"facc-markings-01","tpage_name":"factoryd-vis-shrub"}],[171507776,{"idx":64,"name":"temple_metal04","tpage_name":"templeb-vis-tfrag"}],[190185475,{"idx":3,"name":"holograph-env-rim-dest","tpage_name":"volcanox-warp"}],[188940295,{"idx":7,"name":"facc-markings-03","tpage_name":"factoryd-vis-shrub"}],[171507775,{"idx":63,"name":"dk-eco-vent-side-01","tpage_name":"templeb-vis-tfrag"}],[190185474,{"idx":2,"name":"holograph-env-scan","tpage_name":"volcanox-warp"}],[188940294,{"idx":6,"name":"facc-markings-02","tpage_name":"factoryd-vis-shrub"}],[171507774,{"idx":62,"name":"dk-eco-vent-glow-01","tpage_name":"templeb-vis-tfrag"}],[190185473,{"idx":1,"name":"holograph-env-rim","tpage_name":"volcanox-warp"}],[188940293,{"idx":5,"name":"fac-drop-plat-plate-trim-02","tpage_name":"factoryd-vis-shrub"}],[171507773,{"idx":61,"name":"environment-darkprec","tpage_name":"templeb-vis-tfrag"}],[190185472,{"idx":0,"name":"holograph-env-noise","tpage_name":"volcanox-warp"}],[188940292,{"idx":4,"name":"fac-drop-plat-plate-trim-01","tpage_name":"factoryd-vis-shrub"}],[171507772,{"idx":60,"name":"tpl-symbl-yellow-glow-01","tpage_name":"templeb-vis-tfrag"}],[188940291,{"idx":3,"name":"fac-drop-plat-plate-side-01","tpage_name":"factoryd-vis-shrub"}],[171507771,{"idx":59,"name":"temple_sandstone_scale_01","tpage_name":"templeb-vis-tfrag"}],[171507770,{"idx":58,"name":"common_sandstone_base01","tpage_name":"templeb-vis-tfrag"}],[188940289,{"idx":1,"name":"facc-bolt-01","tpage_name":"factoryd-vis-shrub"}],[171507769,{"idx":57,"name":"common_sandstone_pill01","tpage_name":"templeb-vis-tfrag"}],[188940288,{"idx":0,"name":"facc-bolt-02","tpage_name":"factoryd-vis-shrub"}],[171507768,{"idx":56,"name":"common_sandstone_trim01","tpage_name":"templeb-vis-tfrag"}],[171507767,{"idx":55,"name":"common_sandstone_taper01","tpage_name":"templeb-vis-tfrag"}],[171507766,{"idx":54,"name":"common_sandstone_ground01","tpage_name":"templeb-vis-tfrag"}],[171507765,{"idx":53,"name":"temple_sandstone_pill07","tpage_name":"templeb-vis-tfrag"}],[171507764,{"idx":52,"name":"temple_sandstone_wall01","tpage_name":"templeb-vis-tfrag"}],[171507763,{"idx":51,"name":"temple_sandstone_ground01","tpage_name":"templeb-vis-tfrag"}],[171507762,{"idx":50,"name":"temple_sandstone_pill05","tpage_name":"templeb-vis-tfrag"}],[171507761,{"idx":49,"name":"temple_pre-04","tpage_name":"templeb-vis-tfrag"}],[171507760,{"idx":48,"name":"temple_pre-03","tpage_name":"templeb-vis-tfrag"}],[171507759,{"idx":47,"name":"temple_sandstone_pill06","tpage_name":"templeb-vis-tfrag"}],[171507758,{"idx":46,"name":"temple_sandstone_pill04","tpage_name":"templeb-vis-tfrag"}],[171507757,{"idx":45,"name":"rail-env-wall-01","tpage_name":"templeb-vis-tfrag"}],[171507756,{"idx":44,"name":"temple_pre-01","tpage_name":"templeb-vis-tfrag"}],[171507755,{"idx":43,"name":"temple_pre-02","tpage_name":"templeb-vis-tfrag"}],[171507754,{"idx":42,"name":"temple_sandstone_pill02","tpage_name":"templeb-vis-tfrag"}],[171507752,{"idx":40,"name":"temple_sandstone_taper01","tpage_name":"templeb-vis-tfrag"}],[171507751,{"idx":39,"name":"temple_sandstone_trim01","tpage_name":"templeb-vis-tfrag"}],[171507750,{"idx":38,"name":"temple_sandstone_steptop01","tpage_name":"templeb-vis-tfrag"}],[171507749,{"idx":37,"name":"temple_sandstone_trim02","tpage_name":"templeb-vis-tfrag"}],[171507748,{"idx":36,"name":"temple_sandstone_pill03","tpage_name":"templeb-vis-tfrag"}],[171507747,{"idx":35,"name":"temple_sandstone_brick-01","tpage_name":"templeb-vis-tfrag"}],[171507745,{"idx":33,"name":"warpgate-post-01","tpage_name":"templeb-vis-tfrag"}],[181469184,{"idx":0,"name":"intcept-lorez-spike01","tpage_name":"desjump-water"}],[171507744,{"idx":32,"name":"warpgate-precursormetal","tpage_name":"templeb-vis-tfrag"}],[171507743,{"idx":31,"name":"warpgate-circuitpattern2","tpage_name":"templeb-vis-tfrag"}],[171507742,{"idx":30,"name":"wascity-rope","tpage_name":"templeb-vis-tfrag"}],[171507740,{"idx":28,"name":"templea_sandstone_brick01","tpage_name":"templeb-vis-tfrag"}],[177733638,{"idx":6,"name":"lightjak-wings","tpage_name":"precurd-vis-water"}],[171507738,{"idx":26,"name":"lt-eco-vent-side-01","tpage_name":"templeb-vis-tfrag"}],[177733637,{"idx":5,"name":"environment-lightjak","tpage_name":"precurd-vis-water"}],[171507737,{"idx":25,"name":"lt-eco-vent-blue-01","tpage_name":"templeb-vis-tfrag"}],[171507734,{"idx":22,"name":"wstd-torchbowl-coal-01","tpage_name":"templeb-vis-tfrag"}],[177733633,{"idx":1,"name":"errolcyber-lens","tpage_name":"precurd-vis-water"}],[171507733,{"idx":21,"name":"temple_metal02","tpage_name":"templeb-vis-tfrag"}],[177733632,{"idx":0,"name":"precur-window-glass","tpage_name":"precurd-vis-water"}],[171507732,{"idx":20,"name":"temple_metal01","tpage_name":"templeb-vis-tfrag"}],[171507731,{"idx":19,"name":"temple_sandstone_star01","tpage_name":"templeb-vis-tfrag"}],[171507730,{"idx":18,"name":"temple-candle-wax-top","tpage_name":"templeb-vis-tfrag"}],[171507729,{"idx":17,"name":"temple-candle-top","tpage_name":"templeb-vis-tfrag"}],[171507728,{"idx":16,"name":"temple-candle-side","tpage_name":"templeb-vis-tfrag"}],[171507725,{"idx":13,"name":"temple_sandstone_stepside01","tpage_name":"templeb-vis-tfrag"}],[171507724,{"idx":12,"name":"temple_sandstone_pill01","tpage_name":"templeb-vis-tfrag"}],[171507723,{"idx":11,"name":"temple-floor-01","tpage_name":"templeb-vis-tfrag"}],[173998080,{"idx":0,"name":"windshield01","tpage_name":"ltowerb-vis-water"}],[171507720,{"idx":8,"name":"temple_sandstone_box01","tpage_name":"templeb-vis-tfrag"}],[172752898,{"idx":2,"name":"precur-nail-01","tpage_name":"precurb-vis-shrub"}],[171507718,{"idx":6,"name":"temple_sandstone_dtale02","tpage_name":"templeb-vis-tfrag"}],[172752897,{"idx":1,"name":"precur-blue-light-01","tpage_name":"precurb-vis-shrub"}],[171507717,{"idx":5,"name":"temple-steps-brown","tpage_name":"templeb-vis-tfrag"}],[171507715,{"idx":3,"name":"temple_sandstone_base01","tpage_name":"templeb-vis-tfrag"}],[171507714,{"idx":2,"name":"temple_sandstone_ground02","tpage_name":"templeb-vis-tfrag"}],[171376643,{"idx":3,"name":"lightjak-wings","tpage_name":"templea-vis-water"}],[171376642,{"idx":2,"name":"environment-lightjak","tpage_name":"templea-vis-water"}],[171376640,{"idx":0,"name":"templea-waterfall","tpage_name":"templea-vis-water"}],[208076803,{"idx":3,"name":"terraformer-metal-01","tpage_name":"desboss2-pris2"}],[203096083,{"idx":19,"name":"cguard1-backmetal","tpage_name":"lctyass-pris"}],[190644283,{"idx":59,"name":"seem-skirt-small","tpage_name":"templee-pris2"}],[170721403,{"idx":123,"name":"rub-palace-tower-side","tpage_name":"lcitysml-tfrag"}],[208076802,{"idx":2,"name":"terraformer-footpipes-01","tpage_name":"desboss2-pris2"}],[203096082,{"idx":18,"name":"environment-oldmetal","tpage_name":"lctyass-pris"}],[190644282,{"idx":58,"name":"seem-skirt","tpage_name":"templee-pris2"}],[170721402,{"idx":122,"name":"palcab-lowres-background-hilltops-01","tpage_name":"lcitysml-tfrag"}],[208076801,{"idx":1,"name":"terraformer-bodyside-top","tpage_name":"desboss2-pris2"}],[203096081,{"idx":17,"name":"bombot-wheel","tpage_name":"lctyass-pris"}],[190644281,{"idx":57,"name":"seem-precmetal-plain","tpage_name":"templee-pris2"}],[170721401,{"idx":121,"name":"palcab-lowres-background-mountains-02","tpage_name":"lcitysml-tfrag"}],[208076800,{"idx":0,"name":"terraformer-bodyside-bottom","tpage_name":"desboss2-pris2"}],[203096080,{"idx":16,"name":"bombot-turret01","tpage_name":"lctyass-pris"}],[190644280,{"idx":56,"name":"seem-precmetal-edge","tpage_name":"templee-pris2"}],[170721400,{"idx":120,"name":"palcab-lowres-background-grass-to-desert-02","tpage_name":"lcitysml-tfrag"}],[203096079,{"idx":15,"name":"bombot-roundend","tpage_name":"lctyass-pris"}],[190644279,{"idx":55,"name":"seem-precmetal-chestplate-01","tpage_name":"templee-pris2"}],[170721399,{"idx":119,"name":"palcab-lowres-background-crater-01","tpage_name":"lcitysml-tfrag"}],[203096078,{"idx":14,"name":"bombot-rimgrey","tpage_name":"lctyass-pris"}],[190644278,{"idx":54,"name":"seem-pipes-02","tpage_name":"templee-pris2"}],[184418378,{"idx":74,"name":"rub-copper","tpage_name":"stadiuma-vis-tfrag"}],[170721398,{"idx":118,"name":"palcab-lowres-background-desert-to-shore","tpage_name":"lcitysml-tfrag"}],[203096076,{"idx":12,"name":"bombot-rail01","tpage_name":"lctyass-pris"}],[190644276,{"idx":52,"name":"seem-pipeend","tpage_name":"templee-pris2"}],[184418376,{"idx":72,"name":"rub-cement-pillars","tpage_name":"stadiuma-vis-tfrag"}],[170721396,{"idx":116,"name":"palcab-lowres-background-peaks-02","tpage_name":"lcitysml-tfrag"}],[203096075,{"idx":11,"name":"bombot-post01","tpage_name":"lctyass-pris"}],[190644275,{"idx":51,"name":"seem-headpiecetop","tpage_name":"templee-pris2"}],[184418375,{"idx":71,"name":"city-lowres-mhcity-tower-01","tpage_name":"stadiuma-vis-tfrag"}],[170721395,{"idx":115,"name":"palcab-lowres-background-peaks-01","tpage_name":"lcitysml-tfrag"}],[203096074,{"idx":10,"name":"bombot-lens","tpage_name":"lctyass-pris"}],[190644274,{"idx":50,"name":"seem-headgearback","tpage_name":"templee-pris2"}],[184418374,{"idx":70,"name":"rub-statue-stone-01","tpage_name":"stadiuma-vis-tfrag"}],[170721394,{"idx":114,"name":"palcab-lowres-background-mountains","tpage_name":"lcitysml-tfrag"}],[203096073,{"idx":9,"name":"bombot-joint","tpage_name":"lctyass-pris"}],[190644273,{"idx":49,"name":"seem-hand","tpage_name":"templee-pris2"}],[184418373,{"idx":69,"name":"stdm-lg-stone-trim-01","tpage_name":"stadiuma-vis-tfrag"}],[170721393,{"idx":113,"name":"palcab-lowres-background-shoreline-01","tpage_name":"lcitysml-tfrag"}],[203096072,{"idx":8,"name":"bombot-insidegun","tpage_name":"lctyass-pris"}],[190644272,{"idx":48,"name":"seem-finger","tpage_name":"templee-pris2"}],[184418372,{"idx":68,"name":"rub-rubble-01","tpage_name":"stadiuma-vis-tfrag"}],[170721392,{"idx":112,"name":"tcab-beam01-lores","tpage_name":"lcitysml-tfrag"}],[203096071,{"idx":7,"name":"bombot-guntop","tpage_name":"lctyass-pris"}],[190644271,{"idx":47,"name":"seem-face","tpage_name":"templee-pris2"}],[184418371,{"idx":67,"name":"citywide-wall-greydrain","tpage_name":"stadiuma-vis-tfrag"}],[170721391,{"idx":111,"name":"palcab-lowres-background-mounatin-window","tpage_name":"lcitysml-tfrag"}],[203096070,{"idx":6,"name":"bombot-guards","tpage_name":"lctyass-pris"}],[190644270,{"idx":46,"name":"seem-eyelid","tpage_name":"templee-pris2"}],[184418370,{"idx":66,"name":"citywide-wall-mainmetal","tpage_name":"stadiuma-vis-tfrag"}],[170721390,{"idx":110,"name":"palcab-swingp-trim","tpage_name":"lcitysml-tfrag"}],[203096068,{"idx":4,"name":"bombot-greybarrelend","tpage_name":"lctyass-pris"}],[190644268,{"idx":44,"name":"seem-ear","tpage_name":"templee-pris2"}],[184418368,{"idx":64,"name":"citywide-wall-grey","tpage_name":"stadiuma-vis-tfrag"}],[170721388,{"idx":108,"name":"tcab-blue-ring-01","tpage_name":"lcitysml-tfrag"}],[203096067,{"idx":3,"name":"bombot-gearsides","tpage_name":"lctyass-pris"}],[190644267,{"idx":43,"name":"seem-boottoe","tpage_name":"templee-pris2"}],[184418367,{"idx":63,"name":"rub-pal-metal","tpage_name":"stadiuma-vis-tfrag"}],[170721387,{"idx":107,"name":"citywide-consite-steel","tpage_name":"lcitysml-tfrag"}],[203096066,{"idx":2,"name":"bombot-darkgrey-02","tpage_name":"lctyass-pris"}],[190644266,{"idx":42,"name":"seem-bootmet","tpage_name":"templee-pris2"}],[184418366,{"idx":62,"name":"fora-cliff-face-far","tpage_name":"stadiuma-vis-tfrag"}],[170721386,{"idx":106,"name":"palcab-lowres-background-grass-to-desert-01","tpage_name":"lcitysml-tfrag"}],[203096065,{"idx":1,"name":"bombot-darkgrey-01","tpage_name":"lctyass-pris"}],[190644265,{"idx":41,"name":"seem-bootlower","tpage_name":"templee-pris2"}],[184418365,{"idx":61,"name":"rub-wall-gen-04","tpage_name":"stadiuma-vis-tfrag"}],[170721385,{"idx":105,"name":"ctywide-ox-met-01","tpage_name":"lcitysml-tfrag"}],[203096064,{"idx":0,"name":"bam-eyelight","tpage_name":"lctyass-pris"}],[190644264,{"idx":40,"name":"seem-bootleg","tpage_name":"templee-pris2"}],[184418364,{"idx":60,"name":"rub-metal-01","tpage_name":"stadiuma-vis-tfrag"}],[170721384,{"idx":104,"name":"t-palshaft-pil-01","tpage_name":"lcitysml-tfrag"}],[190644263,{"idx":39,"name":"seem-bootbottom","tpage_name":"templee-pris2"}],[184418363,{"idx":59,"name":"rub-wall-gen-06","tpage_name":"stadiuma-vis-tfrag"}],[170721383,{"idx":103,"name":"t-palshaft-panl-01","tpage_name":"lcitysml-tfrag"}],[190644262,{"idx":38,"name":"seem-arm","tpage_name":"templee-pris2"}],[184418362,{"idx":58,"name":"rub-metal-pipeside-01","tpage_name":"stadiuma-vis-tfrag"}],[170721382,{"idx":102,"name":"city-lowres-mhcity-tower-02","tpage_name":"lcitysml-tfrag"}],[190644261,{"idx":37,"name":"veger-whitecloth","tpage_name":"templee-pris2"}],[184418361,{"idx":57,"name":"rub-metal-flatpipe-01","tpage_name":"stadiuma-vis-tfrag"}],[170721381,{"idx":101,"name":"city-lowres-mhcity-tower-01","tpage_name":"lcitysml-tfrag"}],[190644260,{"idx":36,"name":"veger-walkingstick-03","tpage_name":"templee-pris2"}],[184418360,{"idx":56,"name":"rub-palshaft-dirt-blue-01","tpage_name":"stadiuma-vis-tfrag"}],[170721380,{"idx":100,"name":"palcab-lowres-background-desert-01","tpage_name":"lcitysml-tfrag"}],[190644259,{"idx":35,"name":"veger-walkingstick-02","tpage_name":"templee-pris2"}],[184418359,{"idx":55,"name":"rub-wall-side-beam-02","tpage_name":"stadiuma-vis-tfrag"}],[170721379,{"idx":99,"name":"palcab-lorez-plates-red-stripe01","tpage_name":"lcitysml-tfrag"}],[190644258,{"idx":34,"name":"veger-walkingstick-01","tpage_name":"templee-pris2"}],[184418358,{"idx":54,"name":"rub-beam-gen-hole","tpage_name":"stadiuma-vis-tfrag"}],[170721378,{"idx":98,"name":"t-palshaft-r-strp-plate01","tpage_name":"lcitysml-tfrag"}],[190644257,{"idx":33,"name":"veger-vest","tpage_name":"templee-pris2"}],[184418357,{"idx":53,"name":"rub-panels-01","tpage_name":"stadiuma-vis-tfrag"}],[170721377,{"idx":97,"name":"city-lowres-mhcity-ground-01","tpage_name":"lcitysml-tfrag"}],[190644256,{"idx":32,"name":"veger-teeth","tpage_name":"templee-pris2"}],[184418356,{"idx":52,"name":"rub-wall-gen-02","tpage_name":"stadiuma-vis-tfrag"}],[170721376,{"idx":96,"name":"palace-break-brokenwall","tpage_name":"lcitysml-tfrag"}],[190644255,{"idx":31,"name":"veger-stickwrap","tpage_name":"templee-pris2"}],[184418355,{"idx":51,"name":"rub-rock","tpage_name":"stadiuma-vis-tfrag"}],[170721375,{"idx":95,"name":"ctyp-metal-01","tpage_name":"lcitysml-tfrag"}],[190644254,{"idx":30,"name":"veger-sleevelower","tpage_name":"templee-pris2"}],[184418354,{"idx":50,"name":"rub-palace-tower-side","tpage_name":"stadiuma-vis-tfrag"}],[170721374,{"idx":94,"name":"palcab-wall-lores","tpage_name":"lcitysml-tfrag"}],[190644253,{"idx":29,"name":"veger-sleeve","tpage_name":"templee-pris2"}],[184418353,{"idx":49,"name":"rub-wall-side-beam","tpage_name":"stadiuma-vis-tfrag"}],[170721373,{"idx":93,"name":"tcab-beam01","tpage_name":"lcitysml-tfrag"}],[190644252,{"idx":28,"name":"veger-shoulderplatemetal","tpage_name":"templee-pris2"}],[184418352,{"idx":48,"name":"rub-city-wall-inside-damaged","tpage_name":"stadiuma-vis-tfrag"}],[170721372,{"idx":92,"name":"tcab-plat-edg-01-lores","tpage_name":"lcitysml-tfrag"}],[190644251,{"idx":27,"name":"veger-shoulderplate","tpage_name":"templee-pris2"}],[184418351,{"idx":47,"name":"rub-city-wall-main","tpage_name":"stadiuma-vis-tfrag"}],[170721371,{"idx":91,"name":"palcab-lorez-metal01-red-stripe","tpage_name":"lcitysml-tfrag"}],[190644250,{"idx":26,"name":"veger-shoebottom","tpage_name":"templee-pris2"}],[184418350,{"idx":46,"name":"city-bridgeseam","tpage_name":"stadiuma-vis-tfrag"}],[170721370,{"idx":90,"name":"palcab-lorez-plates01","tpage_name":"lcitysml-tfrag"}],[190644249,{"idx":25,"name":"veger-scarf","tpage_name":"templee-pris2"}],[184418349,{"idx":45,"name":"city-metal-strip-01","tpage_name":"stadiuma-vis-tfrag"}],[170721369,{"idx":89,"name":"palcab-lorez-metal01-red","tpage_name":"lcitysml-tfrag"}],[190644248,{"idx":24,"name":"veger-parchment","tpage_name":"templee-pris2"}],[184418348,{"idx":44,"name":"rub-metal-green-main","tpage_name":"stadiuma-vis-tfrag"}],[170721368,{"idx":88,"name":"palcab-lorez-metal02","tpage_name":"lcitysml-tfrag"}],[190644247,{"idx":23,"name":"veger-pants","tpage_name":"templee-pris2"}],[184418347,{"idx":43,"name":"rub-citywall-frame","tpage_name":"stadiuma-vis-tfrag"}],[170721367,{"idx":87,"name":"palcab-lowres-background-trees2","tpage_name":"lcitysml-tfrag"}],[190644246,{"idx":22,"name":"veger-pages","tpage_name":"templee-pris2"}],[184418346,{"idx":42,"name":"rub-roof-support","tpage_name":"stadiuma-vis-tfrag"}],[170721366,{"idx":86,"name":"palcab-lowres-background-trees-edge","tpage_name":"lcitysml-tfrag"}],[190644245,{"idx":21,"name":"veger-legwraps","tpage_name":"templee-pris2"}],[184418345,{"idx":41,"name":"city-lowres-mhcity-wall-03","tpage_name":"stadiuma-vis-tfrag"}],[170721365,{"idx":85,"name":"palcab-lorez-asphalt01","tpage_name":"lcitysml-tfrag"}],[190644244,{"idx":20,"name":"veger-iris","tpage_name":"templee-pris2"}],[184418344,{"idx":40,"name":"city-lowres-mhcity-wall-05","tpage_name":"stadiuma-vis-tfrag"}],[170721364,{"idx":84,"name":"city-lowres-mhcity-wall-03","tpage_name":"lcitysml-tfrag"}],[190644243,{"idx":19,"name":"veger-hand","tpage_name":"templee-pris2"}],[184418343,{"idx":39,"name":"city-lowres-mhcity-wall-06","tpage_name":"stadiuma-vis-tfrag"}],[170721363,{"idx":83,"name":"common-black","tpage_name":"lcitysml-tfrag"}],[190644242,{"idx":18,"name":"veger-hair","tpage_name":"templee-pris2"}],[184418342,{"idx":38,"name":"city-lowres-mhcity-wall-02","tpage_name":"stadiuma-vis-tfrag"}],[171966542,{"idx":78,"name":"flamer-wing","tpage_name":"templea-vis-pris2"}],[170721362,{"idx":82,"name":"city-lowres-mhcity-wall-05","tpage_name":"lcitysml-tfrag"}],[195624961,{"idx":1,"name":"windshield01","tpage_name":"towercst-water"}],[190644241,{"idx":17,"name":"veger-gold","tpage_name":"templee-pris2"}],[184418341,{"idx":37,"name":"ctyslumc-window-panes-LOW","tpage_name":"stadiuma-vis-tfrag"}],[171966541,{"idx":77,"name":"spidereye-environment","tpage_name":"templea-vis-pris2"}],[170721361,{"idx":81,"name":"city-lowres-mhcity-wall-06","tpage_name":"lcitysml-tfrag"}],[195624960,{"idx":0,"name":"sig-flatfangs","tpage_name":"towercst-water"}],[190644240,{"idx":16,"name":"veger-fingertop","tpage_name":"templee-pris2"}],[184418340,{"idx":36,"name":"city-tile-LOW","tpage_name":"stadiuma-vis-tfrag"}],[171966540,{"idx":76,"name":"spidereye","tpage_name":"templea-vis-pris2"}],[170721360,{"idx":80,"name":"city-lowres-mhcity-detower-02","tpage_name":"lcitysml-tfrag"}],[190644239,{"idx":15,"name":"veger-fingerbottom","tpage_name":"templee-pris2"}],[184418339,{"idx":35,"name":"cityslumc-awning-LOW","tpage_name":"stadiuma-vis-tfrag"}],[171966539,{"idx":75,"name":"spider-tusk","tpage_name":"templea-vis-pris2"}],[170721359,{"idx":79,"name":"city-lowres-mhcity-detower-01","tpage_name":"lcitysml-tfrag"}],[190644238,{"idx":14,"name":"veger-face","tpage_name":"templee-pris2"}],[184418338,{"idx":34,"name":"cityslumc-purple-plain","tpage_name":"stadiuma-vis-tfrag"}],[171966538,{"idx":74,"name":"spider-leg","tpage_name":"templea-vis-pris2"}],[170721358,{"idx":78,"name":"city-lowres-mhcity-wall-01","tpage_name":"lcitysml-tfrag"}],[190644237,{"idx":13,"name":"veger-eyelid","tpage_name":"templee-pris2"}],[184418337,{"idx":33,"name":"ctyslumc-light-blue","tpage_name":"stadiuma-vis-tfrag"}],[171966537,{"idx":73,"name":"spider-emblem","tpage_name":"templea-vis-pris2"}],[170721357,{"idx":77,"name":"city-lowres-mhcity-wall-02","tpage_name":"lcitysml-tfrag"}],[190644236,{"idx":12,"name":"veger-endpaper","tpage_name":"templee-pris2"}],[184418336,{"idx":32,"name":"cityslumc-purple-column","tpage_name":"stadiuma-vis-tfrag"}],[171966536,{"idx":72,"name":"spider-allfur-med","tpage_name":"templea-vis-pris2"}],[170721356,{"idx":76,"name":"citywide-hangmetal","tpage_name":"lcitysml-tfrag"}],[190644235,{"idx":11,"name":"veger-coatclips","tpage_name":"templee-pris2"}],[184418335,{"idx":31,"name":"t-citywide-met-strp01","tpage_name":"stadiuma-vis-tfrag"}],[171966535,{"idx":71,"name":"spider-allfur-dark","tpage_name":"templea-vis-pris2"}],[170721355,{"idx":75,"name":"citywide-palace-01","tpage_name":"lcitysml-tfrag"}],[190644234,{"idx":10,"name":"veger-coatbelt","tpage_name":"templee-pris2"}],[171966534,{"idx":70,"name":"grunt-skin-03","tpage_name":"templea-vis-pris2"}],[170721354,{"idx":74,"name":"palace-break-girder01","tpage_name":"lcitysml-tfrag"}],[190644233,{"idx":9,"name":"veger-coat","tpage_name":"templee-pris2"}],[184418333,{"idx":29,"name":"citywide-wall-brown-strip","tpage_name":"stadiuma-vis-tfrag"}],[171966533,{"idx":69,"name":"grunt-skin-02","tpage_name":"templea-vis-pris2"}],[170721353,{"idx":73,"name":"t-palshaft-roof-01","tpage_name":"lcitysml-tfrag"}],[190644232,{"idx":8,"name":"veger-bootstrap","tpage_name":"templee-pris2"}],[184418332,{"idx":28,"name":"rub-metal-green-02","tpage_name":"stadiuma-vis-tfrag"}],[171966532,{"idx":68,"name":"grunt-skin-01","tpage_name":"templea-vis-pris2"}],[170721352,{"idx":72,"name":"palcab-lowres-farm-wall-top","tpage_name":"lcitysml-tfrag"}],[190644231,{"idx":7,"name":"veger-bootfoot","tpage_name":"templee-pris2"}],[184418331,{"idx":27,"name":"rub-city-wall-bottom-frame","tpage_name":"stadiuma-vis-tfrag"}],[171966531,{"idx":67,"name":"grunt-metal-01","tpage_name":"templea-vis-pris2"}],[170721351,{"idx":71,"name":"palcab-lowres-farm-wall","tpage_name":"lcitysml-tfrag"}],[190644230,{"idx":6,"name":"veger-bootbolt","tpage_name":"templee-pris2"}],[184418330,{"idx":26,"name":"rub-butress-metal-02","tpage_name":"stadiuma-vis-tfrag"}],[171966530,{"idx":66,"name":"grunt-hose","tpage_name":"templea-vis-pris2"}],[170721350,{"idx":70,"name":"t-citywide-wall-tile-01","tpage_name":"lcitysml-tfrag"}],[190644229,{"idx":5,"name":"veger-bookspine","tpage_name":"templee-pris2"}],[184418329,{"idx":25,"name":"rub-butress-metal-01","tpage_name":"stadiuma-vis-tfrag"}],[171966529,{"idx":65,"name":"grunt-gem-01","tpage_name":"templea-vis-pris2"}],[170721349,{"idx":69,"name":"city-lowres-damaged-01","tpage_name":"lcitysml-tfrag"}],[190644228,{"idx":4,"name":"veger-booksides","tpage_name":"templee-pris2"}],[184418328,{"idx":24,"name":"rub-supportmetall","tpage_name":"stadiuma-vis-tfrag"}],[171966528,{"idx":64,"name":"grunt-eye-01","tpage_name":"templea-vis-pris2"}],[170721348,{"idx":68,"name":"city-lowres-newslums-stripe-01","tpage_name":"lcitysml-tfrag"}],[190644226,{"idx":2,"name":"environment-oldmetal","tpage_name":"templee-pris2"}],[184418326,{"idx":22,"name":"rub-endblocks","tpage_name":"stadiuma-vis-tfrag"}],[170721346,{"idx":66,"name":"city-lowres-newslums-stripe-02","tpage_name":"lcitysml-tfrag"}],[190644225,{"idx":1,"name":"bam-hairhilite","tpage_name":"templee-pris2"}],[184418325,{"idx":21,"name":"rub-stone-05","tpage_name":"stadiuma-vis-tfrag"}],[170721345,{"idx":65,"name":"t-strip-lo-palsup-danger2","tpage_name":"lcitysml-tfrag"}],[190644224,{"idx":0,"name":"bam-eyelight","tpage_name":"templee-pris2"}],[184418324,{"idx":20,"name":"rub-citywall","tpage_name":"stadiuma-vis-tfrag"}],[170721344,{"idx":64,"name":"t-strip-lo-palsup-danger1","tpage_name":"lcitysml-tfrag"}],[184418323,{"idx":19,"name":"rub-city-wall-frame","tpage_name":"stadiuma-vis-tfrag"}],[170721343,{"idx":63,"name":"t-strip-lo-palsup-panel-5","tpage_name":"lcitysml-tfrag"}],[184418322,{"idx":18,"name":"rub-wall-trim","tpage_name":"stadiuma-vis-tfrag"}],[170721342,{"idx":62,"name":"t-strip-lo-palsup-panel-4","tpage_name":"lcitysml-tfrag"}],[184418321,{"idx":17,"name":"common-black","tpage_name":"stadiuma-vis-tfrag"}],[170721341,{"idx":61,"name":"t-strip-lo-palsup-panel-3","tpage_name":"lcitysml-tfrag"}],[184418320,{"idx":16,"name":"stdm-cobble-floor-01","tpage_name":"stadiuma-vis-tfrag"}],[170721340,{"idx":60,"name":"t-strip-lo-palsup-panel-2","tpage_name":"lcitysml-tfrag"}],[184418319,{"idx":15,"name":"rub-wall-gen-01","tpage_name":"stadiuma-vis-tfrag"}],[170721339,{"idx":59,"name":"t-strip-lo-palsup-panel-1","tpage_name":"lcitysml-tfrag"}],[188153857,{"idx":1,"name":"des-rock-shrub-01","tpage_name":"desertf-vis-shrub"}],[184418317,{"idx":13,"name":"stdm-trim-02","tpage_name":"stadiuma-vis-tfrag"}],[170721337,{"idx":57,"name":"palcab-lowres-background-mount-build-03","tpage_name":"lcitysml-tfrag"}],[188153856,{"idx":0,"name":"des-shrub-pebbles","tpage_name":"desertf-vis-shrub"}],[184418316,{"idx":12,"name":"rub-marble-floor-01-hitweak","tpage_name":"stadiuma-vis-tfrag"}],[170721336,{"idx":56,"name":"palcab-lowres-background-mount-build-02","tpage_name":"lcitysml-tfrag"}],[184418315,{"idx":11,"name":"stdm-wall-03","tpage_name":"stadiuma-vis-tfrag"}],[170721335,{"idx":55,"name":"palcab-lowres-background-mount-build-01","tpage_name":"lcitysml-tfrag"}],[184418314,{"idx":10,"name":"stdm-wall-04","tpage_name":"stadiuma-vis-tfrag"}],[170721334,{"idx":54,"name":"t-palshaft-plate01","tpage_name":"lcitysml-tfrag"}],[184418313,{"idx":9,"name":"rub-stad-brick","tpage_name":"stadiuma-vis-tfrag"}],[170721333,{"idx":53,"name":"t-citywide-met-wall-02","tpage_name":"lcitysml-tfrag"}],[184418312,{"idx":8,"name":"citywide-stadium-lightbank","tpage_name":"stadiuma-vis-tfrag"}],[170721332,{"idx":52,"name":"t-citywide-red-met-01","tpage_name":"lcitysml-tfrag"}],[184418311,{"idx":7,"name":"citywide-stadium-lightpost-end","tpage_name":"stadiuma-vis-tfrag"}],[170721331,{"idx":51,"name":"t-citywide-met-pill-01","tpage_name":"lcitysml-tfrag"}],[184418310,{"idx":6,"name":"citywide-stadium-lightpost-end-02","tpage_name":"stadiuma-vis-tfrag"}],[170721330,{"idx":50,"name":"t-citywide-met-strp01","tpage_name":"lcitysml-tfrag"}],[184418309,{"idx":5,"name":"citywide-stadium-lightpost-base","tpage_name":"stadiuma-vis-tfrag"}],[170721329,{"idx":49,"name":"t-citywide-met-strp02","tpage_name":"lcitysml-tfrag"}],[184418308,{"idx":4,"name":"citywide-stadium-lightpost","tpage_name":"stadiuma-vis-tfrag"}],[170721328,{"idx":48,"name":"palcab-lorez-metal01","tpage_name":"lcitysml-tfrag"}],[184418307,{"idx":3,"name":"citywide-stadium-lightpost-base-02","tpage_name":"stadiuma-vis-tfrag"}],[170721327,{"idx":47,"name":"palcab-lorez-metal03","tpage_name":"lcitysml-tfrag"}],[184418306,{"idx":2,"name":"citywide-sail-01","tpage_name":"stadiuma-vis-tfrag"}],[170721326,{"idx":46,"name":"city-lowres-ctygen-stripe-02","tpage_name":"lcitysml-tfrag"}],[184418305,{"idx":1,"name":"rub-copper-metal-02","tpage_name":"stadiuma-vis-tfrag"}],[170721325,{"idx":45,"name":"city-lowres-ctygen-roof-01","tpage_name":"lcitysml-tfrag"}],[184418304,{"idx":0,"name":"rub-beam-gen","tpage_name":"stadiuma-vis-tfrag"}],[170721324,{"idx":44,"name":"city-lowres-ctygen-build-04","tpage_name":"lcitysml-tfrag"}],[170721323,{"idx":43,"name":"city-lowres-ctygen-build-05","tpage_name":"lcitysml-tfrag"}],[170721322,{"idx":42,"name":"city-lowres-ctygen-build-03","tpage_name":"lcitysml-tfrag"}],[170721321,{"idx":41,"name":"city-lowres-ctygen-side-01","tpage_name":"lcitysml-tfrag"}],[170721320,{"idx":40,"name":"city-lowres-ctygen-build-02","tpage_name":"lcitysml-tfrag"}],[181927939,{"idx":3,"name":"lava-drop-04","tpage_name":"mined-sprite"}],[170721319,{"idx":39,"name":"palcab-lowres-mark-highway","tpage_name":"lcitysml-tfrag"}],[181927938,{"idx":2,"name":"lava-drop-03","tpage_name":"mined-sprite"}],[170721318,{"idx":38,"name":"city-lowres-ctygen-build-01","tpage_name":"lcitysml-tfrag"}],[181927937,{"idx":1,"name":"lava-drop-02","tpage_name":"mined-sprite"}],[170721317,{"idx":37,"name":"city-lowres-ctygen-roof-02","tpage_name":"lcitysml-tfrag"}],[181927936,{"idx":0,"name":"lava-drop-01","tpage_name":"mined-sprite"}],[170721316,{"idx":36,"name":"city-lowres-ctygen-stripe-01","tpage_name":"lcitysml-tfrag"}],[170721315,{"idx":35,"name":"city-lowres-ctygen-side-02","tpage_name":"lcitysml-tfrag"}],[170721314,{"idx":34,"name":"palcab-lowres-mark-awning-red","tpage_name":"lcitysml-tfrag"}],[170721313,{"idx":33,"name":"palcab-lowres-mark-awning-green","tpage_name":"lcitysml-tfrag"}],[170721312,{"idx":32,"name":"palcab-lowres-mark-shops-01","tpage_name":"lcitysml-tfrag"}],[170721311,{"idx":31,"name":"palcab-lowres-mark-roof-rim-01","tpage_name":"lcitysml-tfrag"}],[170721310,{"idx":30,"name":"city-lowres-ind-wall-08","tpage_name":"lcitysml-tfrag"}],[170721309,{"idx":29,"name":"city-lowres-ind-wall-07","tpage_name":"lcitysml-tfrag"}],[170721305,{"idx":25,"name":"city-lowres-ind-wall-01","tpage_name":"lcitysml-tfrag"}],[170721304,{"idx":24,"name":"city-lowres-port-roof","tpage_name":"lcitysml-tfrag"}],[170721303,{"idx":23,"name":"palcab-lowres-mark-roof-01","tpage_name":"lcitysml-tfrag"}],[170721302,{"idx":22,"name":"city-lowres-fort-red","tpage_name":"lcitysml-tfrag"}],[170721301,{"idx":21,"name":"city-lowres-fort-yellow","tpage_name":"lcitysml-tfrag"}],[170721300,{"idx":20,"name":"city-lowres-ind-wall-02","tpage_name":"lcitysml-tfrag"}],[170721299,{"idx":19,"name":"palcab-lowres-stadium-canopy","tpage_name":"lcitysml-tfrag"}],[170721298,{"idx":18,"name":"strip-metal-02-lores","tpage_name":"lcitysml-tfrag"}],[170721297,{"idx":17,"name":"palcab-steel-lores","tpage_name":"lcitysml-tfrag"}],[170721296,{"idx":16,"name":"city-lowres-ind-wall-04","tpage_name":"lcitysml-tfrag"}],[170721295,{"idx":15,"name":"palcab-lowres-mark-roof-02","tpage_name":"lcitysml-tfrag"}],[170721294,{"idx":14,"name":"palcab-pipe-hoze","tpage_name":"lcitysml-tfrag"}],[170721291,{"idx":11,"name":"palcab-lowres-ctyslum-wall-02","tpage_name":"lcitysml-tfrag"}],[170721287,{"idx":7,"name":"palcab-lowres-ctyslum-roof-03","tpage_name":"lcitysml-tfrag"}],[170721286,{"idx":6,"name":"palcab-lowres-ctyslum-ground","tpage_name":"lcitysml-tfrag"}],[170721285,{"idx":5,"name":"palcab-lowres-ctywide-wall-02","tpage_name":"lcitysml-tfrag"}],[170721284,{"idx":4,"name":"palcab-lowres-background-rocksnow","tpage_name":"lcitysml-tfrag"}],[170721283,{"idx":3,"name":"palcab-lowres-background-rocksnow2","tpage_name":"lcitysml-tfrag"}],[170721282,{"idx":2,"name":"palcab-lowres-ctywide-wall-01","tpage_name":"lcitysml-tfrag"}],[170721281,{"idx":1,"name":"palcab-lowres-background-crater-bottom-enviro","tpage_name":"lcitysml-tfrag"}],[170721280,{"idx":0,"name":"palcab-lowres-background-hills-01","tpage_name":"lcitysml-tfrag"}],[170524675,{"idx":3,"name":"holograph-env-scan","tpage_name":"ljkdxvin-warp"}],[170524674,{"idx":2,"name":"holograph-env-rim","tpage_name":"ljkdxvin-warp"}],[170524673,{"idx":1,"name":"holograph-env-noise","tpage_name":"ljkdxvin-warp"}],[170524672,{"idx":0,"name":"holograph-env-rim-dest","tpage_name":"ljkdxvin-warp"}],[172949552,{"idx":48,"name":"terraformer-metal-04","tpage_name":"precurd-vis-pris"}],[170459192,{"idx":56,"name":"jakchires-teeth","tpage_name":"ljkdxvin-pris"}],[172949551,{"idx":47,"name":"terraformer-metal-03","tpage_name":"precurd-vis-pris"}],[170459191,{"idx":55,"name":"jakchires-shoeteop","tpage_name":"ljkdxvin-pris"}],[172949550,{"idx":46,"name":"terraformer-metal-02","tpage_name":"precurd-vis-pris"}],[170459190,{"idx":54,"name":"jakchires-shoemetal","tpage_name":"ljkdxvin-pris"}],[172949549,{"idx":45,"name":"terraformer-metal-01","tpage_name":"precurd-vis-pris"}],[170459189,{"idx":53,"name":"jakchires-shoebottom","tpage_name":"ljkdxvin-pris"}],[172949548,{"idx":44,"name":"terraformer-footpipes-01","tpage_name":"precurd-vis-pris"}],[170459188,{"idx":52,"name":"jakchires-precarmor-01","tpage_name":"ljkdxvin-pris"}],[171704367,{"idx":47,"name":"common_sandstone_base01","tpage_name":"templec-vis-tfrag"}],[170459187,{"idx":51,"name":"jakchires-pants","tpage_name":"ljkdxvin-pris"}],[175439906,{"idx":34,"name":"king-wristband","tpage_name":"rubblea-vis-pris2"}],[172949546,{"idx":42,"name":"terraformer-cockpit","tpage_name":"precurd-vis-pris"}],[171704366,{"idx":46,"name":"common_sandstone_pill01","tpage_name":"templec-vis-tfrag"}],[170459186,{"idx":50,"name":"jakchires-lightbrownspat","tpage_name":"ljkdxvin-pris"}],[175439905,{"idx":33,"name":"king-wraps","tpage_name":"rubblea-vis-pris2"}],[172949545,{"idx":41,"name":"terraformer-bodytopstrans","tpage_name":"precurd-vis-pris"}],[171704365,{"idx":45,"name":"common_sandstone_trim01","tpage_name":"templec-vis-tfrag"}],[170459185,{"idx":49,"name":"jakchires-leatherpouch","tpage_name":"ljkdxvin-pris"}],[175439904,{"idx":32,"name":"king-wrap","tpage_name":"rubblea-vis-pris2"}],[172949544,{"idx":40,"name":"terraformer-bodytopplain","tpage_name":"precurd-vis-pris"}],[171704364,{"idx":44,"name":"common_sandstone_ground01","tpage_name":"templec-vis-tfrag"}],[170459184,{"idx":48,"name":"jakchires-jacket","tpage_name":"ljkdxvin-pris"}],[175439903,{"idx":31,"name":"king-vestback","tpage_name":"rubblea-vis-pris2"}],[172949543,{"idx":39,"name":"terraformer-bodyside-top","tpage_name":"precurd-vis-pris"}],[171704363,{"idx":43,"name":"common_sandstone_taper01","tpage_name":"templec-vis-tfrag"}],[170459183,{"idx":47,"name":"jakchires-horn","tpage_name":"ljkdxvin-pris"}],[175439902,{"idx":30,"name":"king-vest","tpage_name":"rubblea-vis-pris2"}],[172949542,{"idx":38,"name":"terraformer-bodyside-bottom","tpage_name":"precurd-vis-pris"}],[171704362,{"idx":42,"name":"temple-wall-01","tpage_name":"templec-vis-tfrag"}],[170459182,{"idx":46,"name":"jakchires-hair","tpage_name":"ljkdxvin-pris"}],[175439901,{"idx":29,"name":"king-thinstrap","tpage_name":"rubblea-vis-pris2"}],[174194721,{"idx":33,"name":"jakchires-teeth","tpage_name":"ljkfeet-pris"}],[172949541,{"idx":37,"name":"errolcyber-teeth","tpage_name":"precurd-vis-pris"}],[171704361,{"idx":41,"name":"temple_sandstone_ground03","tpage_name":"templec-vis-tfrag"}],[170459181,{"idx":45,"name":"jakchires-glovetop","tpage_name":"ljkdxvin-pris"}],[175439900,{"idx":28,"name":"king-teeth","tpage_name":"rubblea-vis-pris2"}],[174194720,{"idx":32,"name":"jakchires-precarmor-01","tpage_name":"ljkfeet-pris"}],[172949540,{"idx":36,"name":"errolcyber-pipes-03","tpage_name":"precurd-vis-pris"}],[171704360,{"idx":40,"name":"temple_sandstone_wall01","tpage_name":"templec-vis-tfrag"}],[170459180,{"idx":44,"name":"jakchires-facert","tpage_name":"ljkdxvin-pris"}],[175439899,{"idx":27,"name":"king-skirt-b","tpage_name":"rubblea-vis-pris2"}],[174194719,{"idx":31,"name":"jakchires-pants","tpage_name":"ljkfeet-pris"}],[172949539,{"idx":35,"name":"errolcyber-pipes-02","tpage_name":"precurd-vis-pris"}],[171704359,{"idx":39,"name":"temple_sandstone_ground01","tpage_name":"templec-vis-tfrag"}],[170459179,{"idx":43,"name":"jakchires-facelft","tpage_name":"ljkdxvin-pris"}],[175439898,{"idx":26,"name":"king-skirt","tpage_name":"rubblea-vis-pris2"}],[174194718,{"idx":30,"name":"jakchires-leatherpouch","tpage_name":"ljkfeet-pris"}],[172949538,{"idx":34,"name":"errolcyber-pipes-01","tpage_name":"precurd-vis-pris"}],[171704358,{"idx":38,"name":"temple_sandstone_pill06","tpage_name":"templec-vis-tfrag"}],[170459178,{"idx":42,"name":"jakchires-eyelid","tpage_name":"ljkdxvin-pris"}],[175439897,{"idx":25,"name":"king-shoebottom","tpage_name":"rubblea-vis-pris2"}],[174194717,{"idx":29,"name":"jakchires-jacket","tpage_name":"ljkfeet-pris"}],[172949537,{"idx":33,"name":"errolcyber-insidemouth","tpage_name":"precurd-vis-pris"}],[171704357,{"idx":37,"name":"temple_sandstone_brick-02","tpage_name":"templec-vis-tfrag"}],[170459177,{"idx":41,"name":"jakchires-eyebrow","tpage_name":"ljkdxvin-pris"}],[175439896,{"idx":24,"name":"king-precursermetal-trimbolt","tpage_name":"rubblea-vis-pris2"}],[174194716,{"idx":28,"name":"jakchires-horn","tpage_name":"ljkfeet-pris"}],[172949536,{"idx":32,"name":"errolcyber-head-02","tpage_name":"precurd-vis-pris"}],[171704356,{"idx":36,"name":"temple_sandstone_taper01","tpage_name":"templec-vis-tfrag"}],[170459176,{"idx":40,"name":"jakchires-eye","tpage_name":"ljkdxvin-pris"}],[175439895,{"idx":23,"name":"king-precursermetal-trim2","tpage_name":"rubblea-vis-pris2"}],[174194715,{"idx":27,"name":"jakchires-hair","tpage_name":"ljkfeet-pris"}],[172949535,{"idx":31,"name":"errolcyber-head-01","tpage_name":"precurd-vis-pris"}],[171704355,{"idx":35,"name":"temple_metal04","tpage_name":"templec-vis-tfrag"}],[170459175,{"idx":39,"name":"jakchires-clips","tpage_name":"ljkdxvin-pris"}],[175439894,{"idx":22,"name":"king-precursermetal-trim","tpage_name":"rubblea-vis-pris2"}],[174194714,{"idx":26,"name":"jakchires-glovetop","tpage_name":"ljkfeet-pris"}],[172949534,{"idx":30,"name":"errolcyber-hair","tpage_name":"precurd-vis-pris"}],[171704354,{"idx":34,"name":"temple_bark01","tpage_name":"templec-vis-tfrag"}],[170459174,{"idx":38,"name":"jakchires-chestplate","tpage_name":"ljkdxvin-pris"}],[175439893,{"idx":21,"name":"king-precursermetal-plain","tpage_name":"rubblea-vis-pris2"}],[174194713,{"idx":25,"name":"jakchires-facert","tpage_name":"ljkfeet-pris"}],[172949533,{"idx":29,"name":"errolcyber-earcup","tpage_name":"precurd-vis-pris"}],[171704353,{"idx":33,"name":"temple_sandstone_pill07","tpage_name":"templec-vis-tfrag"}],[170459173,{"idx":37,"name":"jakchires-brwnleather","tpage_name":"ljkdxvin-pris"}],[175439892,{"idx":20,"name":"king-precursermetal-decor","tpage_name":"rubblea-vis-pris2"}],[174194712,{"idx":24,"name":"jakchires-facelft","tpage_name":"ljkfeet-pris"}],[172949532,{"idx":28,"name":"errolcyber-bluedome","tpage_name":"precurd-vis-pris"}],[171704352,{"idx":32,"name":"temple_sandstone_pill05","tpage_name":"templec-vis-tfrag"}],[170459172,{"idx":36,"name":"jakchires-brownstrap","tpage_name":"ljkdxvin-pris"}],[175439891,{"idx":19,"name":"king-lgblackstrap","tpage_name":"rubblea-vis-pris2"}],[174194711,{"idx":23,"name":"jakchires-eyelid","tpage_name":"ljkfeet-pris"}],[172949531,{"idx":27,"name":"errocyber-faceflesh","tpage_name":"precurd-vis-pris"}],[171704351,{"idx":31,"name":"temple_pre-03","tpage_name":"templec-vis-tfrag"}],[170459171,{"idx":35,"name":"jakchires-blackstrap","tpage_name":"ljkdxvin-pris"}],[175439890,{"idx":18,"name":"king-leg","tpage_name":"rubblea-vis-pris2"}],[174194710,{"idx":22,"name":"jakchires-eyebrow","tpage_name":"ljkfeet-pris"}],[172949530,{"idx":26,"name":"environment-oldmetal","tpage_name":"precurd-vis-pris"}],[170459170,{"idx":34,"name":"jakchires-arm","tpage_name":"ljkdxvin-pris"}],[175439889,{"idx":17,"name":"king-iris","tpage_name":"rubblea-vis-pris2"}],[174194709,{"idx":21,"name":"jakchires-eye","tpage_name":"ljkfeet-pris"}],[172949529,{"idx":25,"name":"environment-darkprec","tpage_name":"precurd-vis-pris"}],[171704349,{"idx":29,"name":"rail-env-wall-01","tpage_name":"templec-vis-tfrag"}],[170459169,{"idx":33,"name":"jakc-wristband-a2","tpage_name":"ljkdxvin-pris"}],[175439888,{"idx":16,"name":"king-horn","tpage_name":"rubblea-vis-pris2"}],[174194708,{"idx":20,"name":"jakchires-clips","tpage_name":"ljkfeet-pris"}],[172949528,{"idx":24,"name":"dm-ship-plate-01","tpage_name":"precurd-vis-pris"}],[171704348,{"idx":28,"name":"temple_sandstone_pill02","tpage_name":"templec-vis-tfrag"}],[170459168,{"idx":32,"name":"jakc-wraps","tpage_name":"ljkdxvin-pris"}],[175439887,{"idx":15,"name":"king-hand","tpage_name":"rubblea-vis-pris2"}],[174194707,{"idx":19,"name":"jakchires-chestplate","tpage_name":"ljkfeet-pris"}],[172949527,{"idx":23,"name":"dm-ship-nose-02","tpage_name":"precurd-vis-pris"}],[171704347,{"idx":27,"name":"temple_pre-01","tpage_name":"templec-vis-tfrag"}],[170459167,{"idx":31,"name":"jakc-waistband2","tpage_name":"ljkdxvin-pris"}],[175439886,{"idx":14,"name":"king-hair","tpage_name":"rubblea-vis-pris2"}],[174194706,{"idx":18,"name":"jakchires-brwnleather","tpage_name":"ljkfeet-pris"}],[172949526,{"idx":22,"name":"dm-ship-nose-01","tpage_name":"precurd-vis-pris"}],[171704346,{"idx":26,"name":"temple_pre-02","tpage_name":"templec-vis-tfrag"}],[170459166,{"idx":30,"name":"jakc-skirt","tpage_name":"ljkdxvin-pris"}],[175439885,{"idx":13,"name":"king-greenmetalplain","tpage_name":"rubblea-vis-pris2"}],[174194705,{"idx":17,"name":"jakchires-brownstrap","tpage_name":"ljkfeet-pris"}],[172949525,{"idx":21,"name":"dm-ship-hull-02","tpage_name":"precurd-vis-pris"}],[171704345,{"idx":25,"name":"temple_sandstone_pill03","tpage_name":"templec-vis-tfrag"}],[170459165,{"idx":29,"name":"jakc-scarfhanging","tpage_name":"ljkdxvin-pris"}],[175439884,{"idx":12,"name":"king-greenmetal","tpage_name":"rubblea-vis-pris2"}],[174194704,{"idx":16,"name":"jakchires-blackstrap","tpage_name":"ljkfeet-pris"}],[172949524,{"idx":20,"name":"dm-ship-hull-01","tpage_name":"precurd-vis-pris"}],[171704344,{"idx":24,"name":"temple_sandstone_trim01","tpage_name":"templec-vis-tfrag"}],[170459164,{"idx":28,"name":"jakc-scarf","tpage_name":"ljkdxvin-pris"}],[175439883,{"idx":11,"name":"king-finger","tpage_name":"rubblea-vis-pris2"}],[174194703,{"idx":15,"name":"jakchires-arm","tpage_name":"ljkfeet-pris"}],[172949523,{"idx":19,"name":"dm-ship-cockpit-01","tpage_name":"precurd-vis-pris"}],[171704343,{"idx":23,"name":"temple_sandstone_trim02","tpage_name":"templec-vis-tfrag"}],[170459163,{"idx":27,"name":"jakc-lens","tpage_name":"ljkdxvin-pris"}],[175439882,{"idx":10,"name":"king-face-01","tpage_name":"rubblea-vis-pris2"}],[174194702,{"idx":14,"name":"jakc-wristband-a2","tpage_name":"ljkfeet-pris"}],[172949522,{"idx":18,"name":"daxtertuft","tpage_name":"precurd-vis-pris"}],[171704342,{"idx":22,"name":"temple_sandstone_brick-01","tpage_name":"templec-vis-tfrag"}],[170459162,{"idx":26,"name":"jakc-gogglemetal","tpage_name":"ljkdxvin-pris"}],[175439881,{"idx":9,"name":"king-earing","tpage_name":"rubblea-vis-pris2"}],[174194701,{"idx":13,"name":"jakc-wraps","tpage_name":"ljkfeet-pris"}],[172949521,{"idx":17,"name":"daxterteeth","tpage_name":"precurd-vis-pris"}],[170459161,{"idx":25,"name":"jakc-chestplate-straps","tpage_name":"ljkdxvin-pris"}],[175439880,{"idx":8,"name":"king-ear","tpage_name":"rubblea-vis-pris2"}],[174194700,{"idx":12,"name":"jakc-waistband2","tpage_name":"ljkfeet-pris"}],[172949520,{"idx":16,"name":"daxternose","tpage_name":"precurd-vis-pris"}],[171704340,{"idx":20,"name":"temple_sandstone_out_01","tpage_name":"templec-vis-tfrag"}],[170459160,{"idx":24,"name":"jakc-armor","tpage_name":"ljkdxvin-pris"}],[175439875,{"idx":3,"name":"king-blackskirt2","tpage_name":"rubblea-vis-pris2"}],[174194695,{"idx":7,"name":"jakc-armor","tpage_name":"ljkfeet-pris"}],[172949515,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"precurd-vis-pris"}],[171704335,{"idx":15,"name":"temple_sandstone_stepside01","tpage_name":"templec-vis-tfrag"}],[170459155,{"idx":19,"name":"environment-oldmetal","tpage_name":"ljkdxvin-pris"}],[175439874,{"idx":2,"name":"king-arm","tpage_name":"rubblea-vis-pris2"}],[174194694,{"idx":6,"name":"jakb-prison-wraps","tpage_name":"ljkfeet-pris"}],[172949514,{"idx":10,"name":"daxterfoot","tpage_name":"precurd-vis-pris"}],[171704334,{"idx":14,"name":"temple_sandstone_steptop01","tpage_name":"templec-vis-tfrag"}],[170459154,{"idx":18,"name":"daxtertuft","tpage_name":"ljkdxvin-pris"}],[175439873,{"idx":1,"name":"environment-oldmetal","tpage_name":"rubblea-vis-pris2"}],[174194693,{"idx":5,"name":"jakb-prison-handwraps","tpage_name":"ljkfeet-pris"}],[172949513,{"idx":9,"name":"daxterfinger","tpage_name":"precurd-vis-pris"}],[171704333,{"idx":13,"name":"temple_sandstone_ground02","tpage_name":"templec-vis-tfrag"}],[170459153,{"idx":17,"name":"daxterteeth","tpage_name":"ljkdxvin-pris"}],[175439872,{"idx":0,"name":"bam-eyelight","tpage_name":"rubblea-vis-pris2"}],[174194692,{"idx":4,"name":"jak-orig-finger-formorph","tpage_name":"ljkfeet-pris"}],[172949512,{"idx":8,"name":"daxterear","tpage_name":"precurd-vis-pris"}],[171704332,{"idx":12,"name":"temple-box-brown","tpage_name":"templec-vis-tfrag"}],[170459152,{"idx":16,"name":"daxternose","tpage_name":"ljkdxvin-pris"}],[174194691,{"idx":3,"name":"jak-orig-arm-formorph","tpage_name":"ljkfeet-pris"}],[172949511,{"idx":7,"name":"daxterbolt","tpage_name":"precurd-vis-pris"}],[171704331,{"idx":11,"name":"temple_sandstone_star01","tpage_name":"templec-vis-tfrag"}],[170459151,{"idx":15,"name":"daxterlense","tpage_name":"ljkdxvin-pris"}],[174194690,{"idx":2,"name":"environment-oldmetal","tpage_name":"ljkfeet-pris"}],[172949510,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"precurd-vis-pris"}],[171704330,{"idx":10,"name":"temple_sandstone_base01","tpage_name":"templec-vis-tfrag"}],[170459150,{"idx":14,"name":"daxterhelmetplain","tpage_name":"ljkdxvin-pris"}],[174194689,{"idx":1,"name":"bam-hairhilite","tpage_name":"ljkfeet-pris"}],[172949509,{"idx":5,"name":"daxterarm","tpage_name":"precurd-vis-pris"}],[171704329,{"idx":9,"name":"wstd-torchbowl-coal-01","tpage_name":"templec-vis-tfrag"}],[170459149,{"idx":13,"name":"daxterheadwidenew","tpage_name":"ljkdxvin-pris"}],[174194688,{"idx":0,"name":"bam-eyelight","tpage_name":"ljkfeet-pris"}],[172949508,{"idx":4,"name":"daxter-orange","tpage_name":"precurd-vis-pris"}],[171704328,{"idx":8,"name":"temple_metal02","tpage_name":"templec-vis-tfrag"}],[170459148,{"idx":12,"name":"daxtergoggles","tpage_name":"ljkdxvin-pris"}],[172949507,{"idx":3,"name":"daxter-furhilite","tpage_name":"precurd-vis-pris"}],[171704327,{"idx":7,"name":"temple_metal01","tpage_name":"templec-vis-tfrag"}],[170459147,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"ljkdxvin-pris"}],[172949506,{"idx":2,"name":"daxter-eyelid","tpage_name":"precurd-vis-pris"}],[171704326,{"idx":6,"name":"wascity-rope","tpage_name":"templec-vis-tfrag"}],[170459146,{"idx":10,"name":"daxterfoot","tpage_name":"ljkdxvin-pris"}],[172949505,{"idx":1,"name":"bam-hairhilite","tpage_name":"precurd-vis-pris"}],[171704325,{"idx":5,"name":"temple_sandstone_pill01","tpage_name":"templec-vis-tfrag"}],[170459145,{"idx":9,"name":"daxterfinger","tpage_name":"ljkdxvin-pris"}],[172949504,{"idx":0,"name":"bam-eyelight","tpage_name":"precurd-vis-pris"}],[171704324,{"idx":4,"name":"templea_sandstone_brick01","tpage_name":"templec-vis-tfrag"}],[170459144,{"idx":8,"name":"daxterear","tpage_name":"ljkdxvin-pris"}],[171704323,{"idx":3,"name":"temple-floor-01","tpage_name":"templec-vis-tfrag"}],[170459143,{"idx":7,"name":"daxterbolt","tpage_name":"ljkdxvin-pris"}],[171704322,{"idx":2,"name":"templea_sandstone01","tpage_name":"templec-vis-tfrag"}],[170459142,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"ljkdxvin-pris"}],[170459141,{"idx":5,"name":"daxterarm","tpage_name":"ljkdxvin-pris"}],[172818456,{"idx":24,"name":"precur-plate-end-01","tpage_name":"precurd-vis-tfrag"}],[170328096,{"idx":32,"name":"rail-light-red","tpage_name":"combe-tfrag"}],[172818455,{"idx":23,"name":"precur-wall-tube-02","tpage_name":"precurd-vis-tfrag"}],[170328095,{"idx":31,"name":"comb-redmarker","tpage_name":"combe-tfrag"}],[172818454,{"idx":22,"name":"precur-small-plate-02","tpage_name":"precurd-vis-tfrag"}],[170328094,{"idx":30,"name":"rail-env-wall-01","tpage_name":"combe-tfrag"}],[172818453,{"idx":21,"name":"precur-small-plate-edge","tpage_name":"precurd-vis-tfrag"}],[170328093,{"idx":29,"name":"rail-fit-01","tpage_name":"combe-tfrag"}],[172818452,{"idx":20,"name":"precur-small-plate-01","tpage_name":"precurd-vis-tfrag"}],[170328092,{"idx":28,"name":"rail-rock-01","tpage_name":"combe-tfrag"}],[172818451,{"idx":19,"name":"precur-floor-plate-02","tpage_name":"precurd-vis-tfrag"}],[170328091,{"idx":27,"name":"rail-pipe-02","tpage_name":"combe-tfrag"}],[172818450,{"idx":18,"name":"precur-tubes-segment-01","tpage_name":"precurd-vis-tfrag"}],[170328090,{"idx":26,"name":"rail-pipe-05","tpage_name":"combe-tfrag"}],[172818449,{"idx":17,"name":"precur-nail-01","tpage_name":"precurd-vis-tfrag"}],[170328089,{"idx":25,"name":"rail-gray-metal-01","tpage_name":"combe-tfrag"}],[172818448,{"idx":16,"name":"precur-nail-02","tpage_name":"precurd-vis-tfrag"}],[170328088,{"idx":24,"name":"rail-light-yellow","tpage_name":"combe-tfrag"}],[202571777,{"idx":1,"name":"rail-light-red","tpage_name":"raila-tfrag"}],[170197097,{"idx":105,"name":"tess-upperboot","tpage_name":"outrocst-pris2"}],[202571776,{"idx":0,"name":"rail-base-mid-01","tpage_name":"raila-tfrag"}],[200081416,{"idx":8,"name":"grunt-skin-03","tpage_name":"volcanoa-vis-pris2"}],[170197096,{"idx":104,"name":"tess-underwear","tpage_name":"outrocst-pris2"}],[200081415,{"idx":7,"name":"grunt-skin-02","tpage_name":"volcanoa-vis-pris2"}],[170197095,{"idx":103,"name":"tess-teeth","tpage_name":"outrocst-pris2"}],[200081414,{"idx":6,"name":"grunt-skin-01","tpage_name":"volcanoa-vis-pris2"}],[195100694,{"idx":22,"name":"roboguard-headshield","tpage_name":"lblowtkg-pris"}],[170197094,{"idx":102,"name":"tess-sleeve","tpage_name":"outrocst-pris2"}],[200081413,{"idx":5,"name":"grunt-metal-01","tpage_name":"volcanoa-vis-pris2"}],[170197093,{"idx":101,"name":"tess-shoetop","tpage_name":"outrocst-pris2"}],[200081412,{"idx":4,"name":"grunt-hose","tpage_name":"volcanoa-vis-pris2"}],[195100692,{"idx":20,"name":"kg-fl-tret-red-plate","tpage_name":"lblowtkg-pris"}],[170197092,{"idx":100,"name":"tess-shoebottom","tpage_name":"outrocst-pris2"}],[200081411,{"idx":3,"name":"grunt-gem-01","tpage_name":"volcanoa-vis-pris2"}],[195100691,{"idx":19,"name":"kg-fl-tret-post01","tpage_name":"lblowtkg-pris"}],[170197091,{"idx":99,"name":"tess-shirtstraps","tpage_name":"outrocst-pris2"}],[200081410,{"idx":2,"name":"grunt-eye-01","tpage_name":"volcanoa-vis-pris2"}],[195100690,{"idx":18,"name":"kg-fl-tret-motor","tpage_name":"lblowtkg-pris"}],[170197090,{"idx":98,"name":"tess-shirt-128","tpage_name":"outrocst-pris2"}],[200081409,{"idx":1,"name":"flamer-wing","tpage_name":"volcanoa-vis-pris2"}],[195100689,{"idx":17,"name":"kg-fl-tret-jets01","tpage_name":"lblowtkg-pris"}],[170197089,{"idx":97,"name":"tess-scarf","tpage_name":"outrocst-pris2"}],[200081408,{"idx":0,"name":"charHOLD","tpage_name":"volcanoa-vis-pris2"}],[195100688,{"idx":16,"name":"kg-fl-tret-hood01","tpage_name":"lblowtkg-pris"}],[170197088,{"idx":96,"name":"tess-lowerboot","tpage_name":"outrocst-pris2"}],[195100687,{"idx":15,"name":"kg-fl-tret-guntrack","tpage_name":"lblowtkg-pris"}],[170197087,{"idx":95,"name":"tess-jeanscuff","tpage_name":"outrocst-pris2"}],[195100686,{"idx":14,"name":"kg-fl-tret-dash01","tpage_name":"lblowtkg-pris"}],[170197086,{"idx":94,"name":"tess-jeansback","tpage_name":"outrocst-pris2"}],[195100685,{"idx":13,"name":"kg-fl-tret-black-plate","tpage_name":"lblowtkg-pris"}],[170197085,{"idx":93,"name":"tess-jeans","tpage_name":"outrocst-pris2"}],[195100684,{"idx":12,"name":"kg-fl-tret-backthing01","tpage_name":"lblowtkg-pris"}],[170197084,{"idx":92,"name":"tess-hairband","tpage_name":"outrocst-pris2"}],[195100683,{"idx":11,"name":"kg-fl-tret-backend","tpage_name":"lblowtkg-pris"}],[170197083,{"idx":91,"name":"tess-hair","tpage_name":"outrocst-pris2"}],[197591042,{"idx":2,"name":"hud-small-vehicle-health-bar-02","tpage_name":"raila-minimap"}],[195100682,{"idx":10,"name":"environment-oldmetal","tpage_name":"lblowtkg-pris"}],[170197082,{"idx":90,"name":"tess-glove","tpage_name":"outrocst-pris2"}],[197591041,{"idx":1,"name":"hud-small-vehicle-health-bar-01","tpage_name":"raila-minimap"}],[170197081,{"idx":89,"name":"tess-finger","tpage_name":"outrocst-pris2"}],[170197080,{"idx":88,"name":"tess-face","tpage_name":"outrocst-pris2"}],[170197079,{"idx":87,"name":"tess-eyelid","tpage_name":"outrocst-pris2"}],[170197078,{"idx":86,"name":"tess-eye","tpage_name":"outrocst-pris2"}],[195100677,{"idx":5,"name":"cguard1-guntube","tpage_name":"lblowtkg-pris"}],[190119957,{"idx":21,"name":"environment-darkprec","tpage_name":"lbiped-pris"}],[170197077,{"idx":85,"name":"tess-emblem","tpage_name":"outrocst-pris2"}],[190119956,{"idx":20,"name":"dp-bipedal-toe-01","tpage_name":"lbiped-pris"}],[170197076,{"idx":84,"name":"tess-chest","tpage_name":"outrocst-pris2"}],[195100675,{"idx":3,"name":"cguard1-backmetal","tpage_name":"lblowtkg-pris"}],[190119955,{"idx":19,"name":"dp-bipedal-spine-01","tpage_name":"lbiped-pris"}],[170197075,{"idx":83,"name":"tess-buckle","tpage_name":"outrocst-pris2"}],[190119954,{"idx":18,"name":"dp-bipedal-skin-ribs-01","tpage_name":"lbiped-pris"}],[170197074,{"idx":82,"name":"tess-belt2","tpage_name":"outrocst-pris2"}],[190119953,{"idx":17,"name":"dp-bipedal-skin-plate-small-01","tpage_name":"lbiped-pris"}],[170197073,{"idx":81,"name":"tess-belt","tpage_name":"outrocst-pris2"}],[195100672,{"idx":0,"name":"bam-eyelight","tpage_name":"lblowtkg-pris"}],[190119952,{"idx":16,"name":"dp-bipedal-skin-plate-01","tpage_name":"lbiped-pris"}],[170197072,{"idx":80,"name":"tess-belly","tpage_name":"outrocst-pris2"}],[190119951,{"idx":15,"name":"dp-bipedal-skin-bulge-02","tpage_name":"lbiped-pris"}],[170197071,{"idx":79,"name":"seem-uppertorso","tpage_name":"outrocst-pris2"}],[190119950,{"idx":14,"name":"dp-bipedal-skin-bulge-01","tpage_name":"lbiped-pris"}],[170197070,{"idx":78,"name":"seem-teeth","tpage_name":"outrocst-pris2"}],[190119949,{"idx":13,"name":"dp-bipedal-power-hose","tpage_name":"lbiped-pris"}],[170197069,{"idx":77,"name":"seem-straps","tpage_name":"outrocst-pris2"}],[190119948,{"idx":12,"name":"dp-bipedal-nose-01","tpage_name":"lbiped-pris"}],[181403688,{"idx":40,"name":"vehicle-wire-01","tpage_name":"desjump-pris"}],[170197068,{"idx":76,"name":"seem-skirt-small","tpage_name":"outrocst-pris2"}],[190119947,{"idx":11,"name":"dp-bipedal-finger-plate-01","tpage_name":"lbiped-pris"}],[181403687,{"idx":39,"name":"vehicle-exhaust-pipe-01","tpage_name":"desjump-pris"}],[170197067,{"idx":75,"name":"seem-skirt","tpage_name":"outrocst-pris2"}],[190119946,{"idx":10,"name":"dp-bipedal-eye-01","tpage_name":"lbiped-pris"}],[181403686,{"idx":38,"name":"rhino-metal-01","tpage_name":"desjump-pris"}],[170197066,{"idx":74,"name":"seem-precmetal-plain","tpage_name":"outrocst-pris2"}],[190119945,{"idx":9,"name":"dp-bipedal-dk-stomach-plate-01","tpage_name":"lbiped-pris"}],[181403685,{"idx":37,"name":"rhino-horn-01","tpage_name":"desjump-pris"}],[170197065,{"idx":73,"name":"seem-precmetal-edge","tpage_name":"outrocst-pris2"}],[190119944,{"idx":8,"name":"dp-bipedal-dk-sm-plate-01","tpage_name":"lbiped-pris"}],[181403684,{"idx":36,"name":"beamgen-metal-edge-02","tpage_name":"desjump-pris"}],[170197064,{"idx":72,"name":"seem-precmetal-chestplate-01","tpage_name":"outrocst-pris2"}],[190119943,{"idx":7,"name":"dp-bipedal-dk-plate-04","tpage_name":"lbiped-pris"}],[181403683,{"idx":35,"name":"beamgen-metal-edge-01","tpage_name":"desjump-pris"}],[170197063,{"idx":71,"name":"seem-pipes-02","tpage_name":"outrocst-pris2"}],[190119942,{"idx":6,"name":"dp-bipedal-dk-plate-03","tpage_name":"lbiped-pris"}],[181403682,{"idx":34,"name":"beamgen-metal-dec-trim-01","tpage_name":"desjump-pris"}],[170197062,{"idx":70,"name":"seem-pipes-01","tpage_name":"outrocst-pris2"}],[190119941,{"idx":5,"name":"dp-bipedal-dk-plate-02","tpage_name":"lbiped-pris"}],[181403681,{"idx":33,"name":"beamgen-lens","tpage_name":"desjump-pris"}],[170197061,{"idx":69,"name":"seem-pipeend","tpage_name":"outrocst-pris2"}],[190119940,{"idx":4,"name":"dp-bipedal-dk-plate-01","tpage_name":"lbiped-pris"}],[181403680,{"idx":32,"name":"catapult-wood-tip","tpage_name":"desjump-pris"}],[170197060,{"idx":68,"name":"seem-headpiecetop","tpage_name":"outrocst-pris2"}],[190119939,{"idx":3,"name":"dp-bipedal-dk-hose-01","tpage_name":"lbiped-pris"}],[181403679,{"idx":31,"name":"catapult-wood-rope","tpage_name":"desjump-pris"}],[170197059,{"idx":67,"name":"seem-headgearback","tpage_name":"outrocst-pris2"}],[190119938,{"idx":2,"name":"dp-bipedal-chest-01","tpage_name":"lbiped-pris"}],[181403678,{"idx":30,"name":"catapult-wood-arm-01","tpage_name":"desjump-pris"}],[170197058,{"idx":66,"name":"seem-hand","tpage_name":"outrocst-pris2"}],[190119937,{"idx":1,"name":"dp-bipedal-backhand-01","tpage_name":"lbiped-pris"}],[181403677,{"idx":29,"name":"catapult-panel-small","tpage_name":"desjump-pris"}],[170197057,{"idx":65,"name":"seem-finger","tpage_name":"outrocst-pris2"}],[190119936,{"idx":0,"name":"common-black","tpage_name":"lbiped-pris"}],[181403676,{"idx":28,"name":"catapult-panel-pattern-01","tpage_name":"desjump-pris"}],[170197056,{"idx":64,"name":"seem-face","tpage_name":"outrocst-pris2"}],[186384395,{"idx":11,"name":"des-wasmetal07","tpage_name":"desertf-vis-pris"}],[181403675,{"idx":27,"name":"catapult-panel-face","tpage_name":"desjump-pris"}],[171442235,{"idx":59,"name":"temple_metal04","tpage_name":"templea-vis-tfrag"}],[170197055,{"idx":63,"name":"seem-eyelid","tpage_name":"outrocst-pris2"}],[188874754,{"idx":2,"name":"fac-drop-plat-plate-01","tpage_name":"factoryd-vis-alpha"}],[186384394,{"idx":10,"name":"des-corral-plate-02","tpage_name":"desertf-vis-pris"}],[181403674,{"idx":26,"name":"catapult-metal-plate-01","tpage_name":"desjump-pris"}],[171442234,{"idx":58,"name":"temple_sandstone_brick-02","tpage_name":"templea-vis-tfrag"}],[170197054,{"idx":62,"name":"seem-eye","tpage_name":"outrocst-pris2"}],[188874753,{"idx":1,"name":"facd-spotlights","tpage_name":"factoryd-vis-alpha"}],[186384393,{"idx":9,"name":"des-corral-metal-02","tpage_name":"desertf-vis-pris"}],[181403673,{"idx":25,"name":"catapult-metal-part-01","tpage_name":"desjump-pris"}],[177668133,{"idx":37,"name":"pre-mic-speaker","tpage_name":"railcst-tfrag"}],[171442233,{"idx":57,"name":"tpl-symbl-yellow-glow-01","tpage_name":"templea-vis-tfrag"}],[170197053,{"idx":61,"name":"seem-ear","tpage_name":"outrocst-pris2"}],[188874752,{"idx":0,"name":"facc-hole-grill-01","tpage_name":"factoryd-vis-alpha"}],[186384392,{"idx":8,"name":"des-corral-plate-03","tpage_name":"desertf-vis-pris"}],[181403672,{"idx":24,"name":"catapult-gun-box-01","tpage_name":"desjump-pris"}],[177668132,{"idx":36,"name":"pre-mic-plain","tpage_name":"railcst-tfrag"}],[171442232,{"idx":56,"name":"temple_sandstone_pill06","tpage_name":"templea-vis-tfrag"}],[170197052,{"idx":60,"name":"seem-boottoe","tpage_name":"outrocst-pris2"}],[186384391,{"idx":7,"name":"des-bridge-plank","tpage_name":"desertf-vis-pris"}],[181403671,{"idx":23,"name":"catapult-cap-pin-01","tpage_name":"desjump-pris"}],[177668131,{"idx":35,"name":"pre-mic-dark","tpage_name":"railcst-tfrag"}],[171442231,{"idx":55,"name":"temple_sandstone_wall01","tpage_name":"templea-vis-tfrag"}],[170197051,{"idx":59,"name":"seem-bootmet","tpage_name":"outrocst-pris2"}],[186384390,{"idx":6,"name":"des-wasmetal01","tpage_name":"desertf-vis-pris"}],[181403670,{"idx":22,"name":"catapult-brass-pipe01","tpage_name":"desjump-pris"}],[177668130,{"idx":34,"name":"pre-mic-groove","tpage_name":"railcst-tfrag"}],[171442230,{"idx":54,"name":"temple_sandstone_scale_01","tpage_name":"templea-vis-tfrag"}],[170197050,{"idx":58,"name":"seem-bootlower","tpage_name":"outrocst-pris2"}],[186384389,{"idx":5,"name":"des-plainrope","tpage_name":"desertf-vis-pris"}],[181403669,{"idx":21,"name":"catapult-brace-pipe-01","tpage_name":"desjump-pris"}],[177668129,{"idx":33,"name":"cmn-precursor-plat-lod03","tpage_name":"railcst-tfrag"}],[171442229,{"idx":53,"name":"temple_sandstone_pill07","tpage_name":"templea-vis-tfrag"}],[170197049,{"idx":57,"name":"seem-bootleg","tpage_name":"outrocst-pris2"}],[186384388,{"idx":4,"name":"des-corral-bar-03","tpage_name":"desertf-vis-pris"}],[181403668,{"idx":20,"name":"catapult-bowl","tpage_name":"desjump-pris"}],[177668128,{"idx":32,"name":"cmn-precursor-stonehengetop","tpage_name":"railcst-tfrag"}],[171442228,{"idx":52,"name":"dk-eco-vent-side-01","tpage_name":"templea-vis-tfrag"}],[170197048,{"idx":56,"name":"seem-bootbottom","tpage_name":"outrocst-pris2"}],[186384387,{"idx":3,"name":"des-corral-bar-01","tpage_name":"desertf-vis-pris"}],[181403667,{"idx":19,"name":"catapult-bone-spike","tpage_name":"desjump-pris"}],[177668127,{"idx":31,"name":"cmn-precursor-stonehenge-side","tpage_name":"railcst-tfrag"}],[171442227,{"idx":51,"name":"dk-eco-vent-glow-01","tpage_name":"templea-vis-tfrag"}],[170197047,{"idx":55,"name":"seem-arm","tpage_name":"outrocst-pris2"}],[186384386,{"idx":2,"name":"des-bridge-bar-01","tpage_name":"desertf-vis-pris"}],[181403666,{"idx":18,"name":"catapult-body-under","tpage_name":"desjump-pris"}],[177668126,{"idx":30,"name":"cmn-precursor-plainstripe","tpage_name":"railcst-tfrag"}],[171442226,{"idx":50,"name":"environment-darkprec","tpage_name":"templea-vis-tfrag"}],[170197046,{"idx":54,"name":"samosbird-wing","tpage_name":"outrocst-pris2"}],[186384385,{"idx":1,"name":"des-pole-brace","tpage_name":"desertf-vis-pris"}],[181403665,{"idx":17,"name":"vehicle-wheel-blur-01","tpage_name":"desjump-pris"}],[177668125,{"idx":29,"name":"cmn-precursor-blue-glow","tpage_name":"railcst-tfrag"}],[171442225,{"idx":49,"name":"temple_sandstone_pill05","tpage_name":"templea-vis-tfrag"}],[170197045,{"idx":53,"name":"samosbird-plume","tpage_name":"outrocst-pris2"}],[186384384,{"idx":0,"name":"des-pole-01","tpage_name":"desertf-vis-pris"}],[181403664,{"idx":16,"name":"vehicle-wheel-01","tpage_name":"desjump-pris"}],[171442224,{"idx":48,"name":"temple_pre-03","tpage_name":"templea-vis-tfrag"}],[170197044,{"idx":52,"name":"samosbird-eye","tpage_name":"outrocst-pris2"}],[181403663,{"idx":15,"name":"vehicle-tread-blur-02","tpage_name":"desjump-pris"}],[171442223,{"idx":47,"name":"temple_pre-02","tpage_name":"templea-vis-tfrag"}],[170197043,{"idx":51,"name":"samosbird-body","tpage_name":"outrocst-pris2"}],[181403662,{"idx":14,"name":"vehicle-toad-exhaust-01","tpage_name":"desjump-pris"}],[171442222,{"idx":46,"name":"temple_sandstone_pill02","tpage_name":"templea-vis-tfrag"}],[170197042,{"idx":50,"name":"samosbird-beak","tpage_name":"outrocst-pris2"}],[181403661,{"idx":13,"name":"vehicle-metal-plate-01","tpage_name":"desjump-pris"}],[171442221,{"idx":45,"name":"temple_bark01","tpage_name":"templea-vis-tfrag"}],[170197041,{"idx":49,"name":"samos-vest","tpage_name":"outrocst-pris2"}],[181403660,{"idx":12,"name":"vehicle-gun-box-01","tpage_name":"desjump-pris"}],[171442220,{"idx":44,"name":"temple_sandstone_pill03","tpage_name":"templea-vis-tfrag"}],[170197040,{"idx":48,"name":"samos-teeth2","tpage_name":"outrocst-pris2"}],[181403659,{"idx":11,"name":"vehicle-gas-tank-01","tpage_name":"desjump-pris"}],[171442219,{"idx":43,"name":"temple_pre-04","tpage_name":"templea-vis-tfrag"}],[170197039,{"idx":47,"name":"samos-strap","tpage_name":"outrocst-pris2"}],[181403658,{"idx":10,"name":"vehicle-chrome-pipe-01","tpage_name":"desjump-pris"}],[171442218,{"idx":42,"name":"temple_pre_arrow-04","tpage_name":"templea-vis-tfrag"}],[170197038,{"idx":46,"name":"samos-metal","tpage_name":"outrocst-pris2"}],[181403657,{"idx":9,"name":"vehicle-cap-pin-01","tpage_name":"desjump-pris"}],[171442217,{"idx":41,"name":"temple_pre-01","tpage_name":"templea-vis-tfrag"}],[170197037,{"idx":45,"name":"samos-log-03","tpage_name":"outrocst-pris2"}],[181403656,{"idx":8,"name":"vehicle-brace-pipe-01","tpage_name":"desjump-pris"}],[171442216,{"idx":40,"name":"temple_pre_arrow-05","tpage_name":"templea-vis-tfrag"}],[170197036,{"idx":44,"name":"samos-log-02","tpage_name":"outrocst-pris2"}],[181403655,{"idx":7,"name":"vehicle-body-panel-01","tpage_name":"desjump-pris"}],[171442215,{"idx":39,"name":"rail-env-wall-01","tpage_name":"templea-vis-tfrag"}],[170197035,{"idx":43,"name":"samos-log-01","tpage_name":"outrocst-pris2"}],[181403654,{"idx":6,"name":"intcept-tread01","tpage_name":"desjump-pris"}],[173932574,{"idx":30,"name":"vin-teeth-01","tpage_name":"ltowerb-vis-pris2"}],[171442214,{"idx":38,"name":"temple_sandstone_brick-01","tpage_name":"templea-vis-tfrag"}],[170197034,{"idx":42,"name":"samos-lens","tpage_name":"outrocst-pris2"}],[181403653,{"idx":5,"name":"intcept-teeth01","tpage_name":"desjump-pris"}],[173932573,{"idx":29,"name":"sig-undergarments","tpage_name":"ltowerb-vis-pris2"}],[171442213,{"idx":37,"name":"temple_metal03","tpage_name":"templea-vis-tfrag"}],[170197033,{"idx":41,"name":"samos-leaf","tpage_name":"outrocst-pris2"}],[181403652,{"idx":4,"name":"intcept-pipe01","tpage_name":"desjump-pris"}],[173932572,{"idx":28,"name":"sig-skirts-03","tpage_name":"ltowerb-vis-pris2"}],[171442212,{"idx":36,"name":"warpgate-post-01","tpage_name":"templea-vis-tfrag"}],[170197032,{"idx":40,"name":"samos-helmet","tpage_name":"outrocst-pris2"}],[181403651,{"idx":3,"name":"intcept-gun01","tpage_name":"desjump-pris"}],[173932571,{"idx":27,"name":"sig-skirts-02","tpage_name":"ltowerb-vis-pris2"}],[171442211,{"idx":35,"name":"warpgate-precursormetal","tpage_name":"templea-vis-tfrag"}],[170197031,{"idx":39,"name":"samos-hair","tpage_name":"outrocst-pris2"}],[181403650,{"idx":2,"name":"intcept-base-patern02","tpage_name":"desjump-pris"}],[173932570,{"idx":26,"name":"sig-skirts","tpage_name":"ltowerb-vis-pris2"}],[171442210,{"idx":34,"name":"warpgate-circuitpattern2","tpage_name":"templea-vis-tfrag"}],[170197030,{"idx":38,"name":"samos-finger-01","tpage_name":"outrocst-pris2"}],[181403649,{"idx":1,"name":"intcept-base-patern01","tpage_name":"desjump-pris"}],[173932569,{"idx":25,"name":"sig-shoulderarmor","tpage_name":"ltowerb-vis-pris2"}],[170197029,{"idx":37,"name":"samos-face","tpage_name":"outrocst-pris2"}],[181403648,{"idx":0,"name":"intcept-base-green01","tpage_name":"desjump-pris"}],[173932568,{"idx":24,"name":"sig-shoetop","tpage_name":"ltowerb-vis-pris2"}],[171442208,{"idx":32,"name":"common_sandstone_base01","tpage_name":"templea-vis-tfrag"}],[170197028,{"idx":36,"name":"samos-eyelid","tpage_name":"outrocst-pris2"}],[173932567,{"idx":23,"name":"sig-shoebottom","tpage_name":"ltowerb-vis-pris2"}],[171442207,{"idx":31,"name":"common_sandstone_pill01","tpage_name":"templea-vis-tfrag"}],[170197027,{"idx":35,"name":"samos-eye","tpage_name":"outrocst-pris2"}],[173932566,{"idx":22,"name":"sig-sac","tpage_name":"ltowerb-vis-pris2"}],[171442206,{"idx":30,"name":"common_sandstone_trim01","tpage_name":"templea-vis-tfrag"}],[170197026,{"idx":34,"name":"samos-ear","tpage_name":"outrocst-pris2"}],[173932565,{"idx":21,"name":"sig-metal-dirty","tpage_name":"ltowerb-vis-pris2"}],[171442205,{"idx":29,"name":"common_sandstone_taper01","tpage_name":"templea-vis-tfrag"}],[170197025,{"idx":33,"name":"samos-diaper","tpage_name":"outrocst-pris2"}],[173932564,{"idx":20,"name":"sig-metal-01","tpage_name":"ltowerb-vis-pris2"}],[171442204,{"idx":28,"name":"common_sandstone_ground01","tpage_name":"templea-vis-tfrag"}],[170197024,{"idx":32,"name":"samos-arm","tpage_name":"outrocst-pris2"}],[173932563,{"idx":19,"name":"sig-lens","tpage_name":"ltowerb-vis-pris2"}],[170197023,{"idx":31,"name":"environment-oldmetal","tpage_name":"outrocst-pris2"}],[173932562,{"idx":18,"name":"sig-horn","tpage_name":"ltowerb-vis-pris2"}],[171442202,{"idx":26,"name":"temple_sandstone_trim01","tpage_name":"templea-vis-tfrag"}],[170197022,{"idx":30,"name":"bam-hairhilite","tpage_name":"outrocst-pris2"}],[173932561,{"idx":17,"name":"sig-headgear","tpage_name":"ltowerb-vis-pris2"}],[171442201,{"idx":25,"name":"temple_sandstone_ground01","tpage_name":"templea-vis-tfrag"}],[170197021,{"idx":29,"name":"bam-eyelight","tpage_name":"outrocst-pris2"}],[173932557,{"idx":13,"name":"sig-gun-02","tpage_name":"ltowerb-vis-pris2"}],[171442197,{"idx":21,"name":"temple_sandstone_steptop01","tpage_name":"templea-vis-tfrag"}],[170197017,{"idx":25,"name":"ashelin-shoebottom","tpage_name":"outrocst-pris2"}],[173932556,{"idx":12,"name":"sig-gun-01","tpage_name":"ltowerb-vis-pris2"}],[171442196,{"idx":20,"name":"wascity-rope","tpage_name":"templea-vis-tfrag"}],[170197016,{"idx":24,"name":"ashelin-shield","tpage_name":"outrocst-pris2"}],[176422915,{"idx":3,"name":"token-white","tpage_name":"templec-sprite"}],[173932555,{"idx":11,"name":"sig-glovetop","tpage_name":"ltowerb-vis-pris2"}],[170197015,{"idx":23,"name":"ashelin-shells","tpage_name":"outrocst-pris2"}],[176422914,{"idx":2,"name":"tpl-symbol-tail","tpage_name":"templec-sprite"}],[173932554,{"idx":10,"name":"sig-glove","tpage_name":"ltowerb-vis-pris2"}],[171442194,{"idx":18,"name":"temple_sandstone_dtale02","tpage_name":"templea-vis-tfrag"}],[170197014,{"idx":22,"name":"ashelin-redtop","tpage_name":"outrocst-pris2"}],[176422913,{"idx":1,"name":"token-purple","tpage_name":"templec-sprite"}],[173932553,{"idx":9,"name":"sig-gem-01","tpage_name":"ltowerb-vis-pris2"}],[170197013,{"idx":21,"name":"ashelin-pantstop","tpage_name":"outrocst-pris2"}],[173932552,{"idx":8,"name":"sig-flask","tpage_name":"ltowerb-vis-pris2"}],[171442192,{"idx":16,"name":"templea_sandstone_brick01","tpage_name":"templea-vis-tfrag"}],[170197012,{"idx":20,"name":"ashelin-jacketstraps","tpage_name":"outrocst-pris2"}],[173932551,{"idx":7,"name":"sig-facert","tpage_name":"ltowerb-vis-pris2"}],[171442191,{"idx":15,"name":"temple_sandstone_box01","tpage_name":"templea-vis-tfrag"}],[170197011,{"idx":19,"name":"ashelin-jacketsleeve","tpage_name":"outrocst-pris2"}],[173932550,{"idx":6,"name":"sig-faceleft","tpage_name":"ltowerb-vis-pris2"}],[171442190,{"idx":14,"name":"temple_sandstone_star01","tpage_name":"templea-vis-tfrag"}],[170197010,{"idx":18,"name":"ashelin-jacketbody","tpage_name":"outrocst-pris2"}],[173932549,{"idx":5,"name":"sig-eyelid","tpage_name":"ltowerb-vis-pris2"}],[171442189,{"idx":13,"name":"temple_sandstone_trim02","tpage_name":"templea-vis-tfrag"}],[170197009,{"idx":17,"name":"ashelin-handle-01","tpage_name":"outrocst-pris2"}],[173932548,{"idx":4,"name":"sig-eye","tpage_name":"ltowerb-vis-pris2"}],[170197008,{"idx":16,"name":"ashelin-hair","tpage_name":"outrocst-pris2"}],[173932547,{"idx":3,"name":"sig-belt","tpage_name":"ltowerb-vis-pris2"}],[171442187,{"idx":11,"name":"temple_sandstone_pill01","tpage_name":"templea-vis-tfrag"}],[170197007,{"idx":15,"name":"ashelin-gunholster","tpage_name":"outrocst-pris2"}],[173932546,{"idx":2,"name":"environment-oldmetal","tpage_name":"ltowerb-vis-pris2"}],[171442186,{"idx":10,"name":"wstd-torchbowl-coal-01","tpage_name":"templea-vis-tfrag"}],[170197006,{"idx":14,"name":"ashelin-gunbarrel-03","tpage_name":"outrocst-pris2"}],[172687361,{"idx":1,"name":"common-glass","tpage_name":"precura-vis-water"}],[170197001,{"idx":9,"name":"ashelin-eyelid","tpage_name":"outrocst-pris2"}],[172687360,{"idx":0,"name":"precur-window-glass","tpage_name":"precura-vis-water"}],[171442180,{"idx":4,"name":"templea_sandstone01","tpage_name":"templea-vis-tfrag"}],[170197000,{"idx":8,"name":"ashelin-eyebrow","tpage_name":"outrocst-pris2"}],[171442179,{"idx":3,"name":"temple_sandstone_base01","tpage_name":"templea-vis-tfrag"}],[170196999,{"idx":7,"name":"ashelin-eye","tpage_name":"outrocst-pris2"}],[171442178,{"idx":2,"name":"temple_sandstone_ground02","tpage_name":"templea-vis-tfrag"}],[170196998,{"idx":6,"name":"ashelin-chest","tpage_name":"outrocst-pris2"}],[170196997,{"idx":5,"name":"ashelin-cgrank","tpage_name":"outrocst-pris2"}],[170196996,{"idx":4,"name":"ashelin-cglogo","tpage_name":"outrocst-pris2"}],[206241796,{"idx":4,"name":"mhcity-vein-01","tpage_name":"lctydest-tfrag"}],[188809276,{"idx":60,"name":"facc-redmetal-01-hitweak","tpage_name":"factoryd-vis-tfrag"}],[170131576,{"idx":120,"name":"pecker-yellowfur","tpage_name":"outrocst-pris"}],[206241795,{"idx":3,"name":"mhcity-grunt-egg-03","tpage_name":"lctydest-tfrag"}],[188809275,{"idx":59,"name":"facd-wall-girders-01-hitweak","tpage_name":"factoryd-vis-tfrag"}],[170131575,{"idx":119,"name":"pecker-wingtop","tpage_name":"outrocst-pris"}],[206241794,{"idx":2,"name":"mhcity-grunt-egg-gem-01","tpage_name":"lctydest-tfrag"}],[188809274,{"idx":58,"name":"facc-metal-ring-03","tpage_name":"factoryd-vis-tfrag"}],[170131574,{"idx":118,"name":"pecker-wingbottom","tpage_name":"outrocst-pris"}],[206241793,{"idx":1,"name":"mhcity-grunt-egg-rim-01","tpage_name":"lctydest-tfrag"}],[188809273,{"idx":57,"name":"facd-darkmaker-tentacle-01","tpage_name":"factoryd-vis-tfrag"}],[170131573,{"idx":117,"name":"pecker-teeth","tpage_name":"outrocst-pris"}],[206241792,{"idx":0,"name":"mhcity-de-tower-puff-01","tpage_name":"lctydest-tfrag"}],[202506252,{"idx":12,"name":"comb-pre-metal-fade-plain","tpage_name":"raila-alpha"}],[188809272,{"idx":56,"name":"facd-darkmaker-web-01","tpage_name":"factoryd-vis-tfrag"}],[170131572,{"idx":116,"name":"pecker-tail","tpage_name":"outrocst-pris"}],[202506251,{"idx":11,"name":"comb-pre-metal-01-plain","tpage_name":"raila-alpha"}],[188809271,{"idx":55,"name":"facd-darkmaker-metal-01","tpage_name":"factoryd-vis-tfrag"}],[170131571,{"idx":115,"name":"pecker-plume","tpage_name":"outrocst-pris"}],[202506250,{"idx":10,"name":"comb-pre-metal-fade-yellow","tpage_name":"raila-alpha"}],[188809270,{"idx":54,"name":"facd-tubes-segment-02","tpage_name":"factoryd-vis-tfrag"}],[170131570,{"idx":114,"name":"pecker-face","tpage_name":"outrocst-pris"}],[202506249,{"idx":9,"name":"comb-pre-metal-01-yellow","tpage_name":"raila-alpha"}],[188809269,{"idx":53,"name":"facd-tubing-01","tpage_name":"factoryd-vis-tfrag"}],[170131569,{"idx":113,"name":"pecker-eyelid","tpage_name":"outrocst-pris"}],[188809268,{"idx":52,"name":"facd-wires-01","tpage_name":"factoryd-vis-tfrag"}],[170131568,{"idx":112,"name":"pecker-body-01","tpage_name":"outrocst-pris"}],[195035145,{"idx":9,"name":"stadiumb-hud-ord-er","tpage_name":"desrally-minimap"}],[188809245,{"idx":29,"name":"facc-redstriping-01-hitweak","tpage_name":"factoryd-vis-tfrag"}],[173867085,{"idx":77,"name":"errolcyber-greyknobs","tpage_name":"ltowerb-vis-pris"}],[170131545,{"idx":89,"name":"klever-widebrownstrap","tpage_name":"outrocst-pris"}],[195035144,{"idx":8,"name":"stadiumb-hud-ord-e","tpage_name":"desrally-minimap"}],[188809244,{"idx":28,"name":"facc-redstriping-01","tpage_name":"factoryd-vis-tfrag"}],[173867084,{"idx":76,"name":"errolcyber-glovepalm","tpage_name":"ltowerb-vis-pris"}],[170131544,{"idx":88,"name":"klever-undershirt","tpage_name":"outrocst-pris"}],[195035143,{"idx":7,"name":"stadiumb-hud-nmbr-08","tpage_name":"desrally-minimap"}],[188809243,{"idx":27,"name":"facc-metal-panel-09","tpage_name":"factoryd-vis-tfrag"}],[173867083,{"idx":75,"name":"errolcyber-fingers","tpage_name":"ltowerb-vis-pris"}],[170131543,{"idx":87,"name":"klever-thighs","tpage_name":"outrocst-pris"}],[195035142,{"idx":6,"name":"stadiumb-hud-nmbr-07","tpage_name":"desrally-minimap"}],[188809242,{"idx":26,"name":"facc-big-metal-panl02","tpage_name":"factoryd-vis-tfrag"}],[173867082,{"idx":74,"name":"errolcyber-dirtymetal","tpage_name":"ltowerb-vis-pris"}],[170131542,{"idx":86,"name":"klever-skirtlight","tpage_name":"outrocst-pris"}],[195035141,{"idx":5,"name":"stadiumb-hud-nmbr-06","tpage_name":"desrally-minimap"}],[188809241,{"idx":25,"name":"facc-pipe-04","tpage_name":"factoryd-vis-tfrag"}],[173867081,{"idx":73,"name":"errolcyber-chestplate","tpage_name":"ltowerb-vis-pris"}],[170131541,{"idx":85,"name":"klever-skirtdark","tpage_name":"outrocst-pris"}],[195035140,{"idx":4,"name":"stadiumb-hud-nmbr-05","tpage_name":"desrally-minimap"}],[188809240,{"idx":24,"name":"facc-redmetal-01","tpage_name":"factoryd-vis-tfrag"}],[173867080,{"idx":72,"name":"errolcyber-bluewrap","tpage_name":"ltowerb-vis-pris"}],[170131540,{"idx":84,"name":"klever-shoebottom","tpage_name":"outrocst-pris"}],[195035139,{"idx":3,"name":"stadiumb-hud-nmbr-04","tpage_name":"desrally-minimap"}],[188809239,{"idx":23,"name":"facc-light-01","tpage_name":"factoryd-vis-tfrag"}],[173867079,{"idx":71,"name":"errolcyber-bluemetal-01","tpage_name":"ltowerb-vis-pris"}],[170131539,{"idx":83,"name":"klever-shoe","tpage_name":"outrocst-pris"}],[195035138,{"idx":2,"name":"stadiumb-hud-nmbr-03","tpage_name":"desrally-minimap"}],[188809238,{"idx":22,"name":"facc-light-02","tpage_name":"factoryd-vis-tfrag"}],[173867078,{"idx":70,"name":"errolcyber-bigshoulder","tpage_name":"ltowerb-vis-pris"}],[170131538,{"idx":82,"name":"klever-mustache","tpage_name":"outrocst-pris"}],[195035137,{"idx":1,"name":"stadiumb-hud-nmbr-02","tpage_name":"desrally-minimap"}],[188809237,{"idx":21,"name":"facc-beam-02","tpage_name":"factoryd-vis-tfrag"}],[173867077,{"idx":69,"name":"errolcyber-bighand-01","tpage_name":"ltowerb-vis-pris"}],[170131537,{"idx":81,"name":"klever-horn","tpage_name":"outrocst-pris"}],[195035136,{"idx":0,"name":"stadiumb-hud-nmbr-01","tpage_name":"desrally-minimap"}],[188809236,{"idx":20,"name":"facc-seam-metal-hitweak","tpage_name":"factoryd-vis-tfrag"}],[173867076,{"idx":68,"name":"wing02grey01","tpage_name":"ltowerb-vis-pris"}],[170131536,{"idx":80,"name":"klever-handwrap","tpage_name":"outrocst-pris"}],[188809235,{"idx":19,"name":"facc-metal-panel-10-hitweak","tpage_name":"factoryd-vis-tfrag"}],[173867075,{"idx":67,"name":"wing02","tpage_name":"ltowerb-vis-pris"}],[170131535,{"idx":79,"name":"klever-hand","tpage_name":"outrocst-pris"}],[188809234,{"idx":18,"name":"facc-arches-01","tpage_name":"factoryd-vis-tfrag"}],[173867074,{"idx":66,"name":"wing01","tpage_name":"ltowerb-vis-pris"}],[170131534,{"idx":78,"name":"klever-hair","tpage_name":"outrocst-pris"}],[188809233,{"idx":17,"name":"facc-metal-rim-03-hitweak","tpage_name":"factoryd-vis-tfrag"}],[173867073,{"idx":65,"name":"turret01","tpage_name":"ltowerb-vis-pris"}],[170131533,{"idx":77,"name":"klever-gunmetal-05","tpage_name":"outrocst-pris"}],[188809232,{"idx":16,"name":"facc-bigredplates-01","tpage_name":"factoryd-vis-tfrag"}],[173867072,{"idx":64,"name":"stripe03","tpage_name":"ltowerb-vis-pris"}],[170131532,{"idx":76,"name":"klever-gunmetal-04","tpage_name":"outrocst-pris"}],[188809231,{"idx":15,"name":"facc-big-metal-panl04","tpage_name":"factoryd-vis-tfrag"}],[173867071,{"idx":63,"name":"seat01","tpage_name":"ltowerb-vis-pris"}],[170131531,{"idx":75,"name":"klever-gunmetal-03","tpage_name":"outrocst-pris"}],[188809230,{"idx":14,"name":"facc-panel-03","tpage_name":"factoryd-vis-tfrag"}],[173867070,{"idx":62,"name":"rail01","tpage_name":"ltowerb-vis-pris"}],[170131530,{"idx":74,"name":"klever-gunmetal-02","tpage_name":"outrocst-pris"}],[188809229,{"idx":13,"name":"facc-panel-02","tpage_name":"factoryd-vis-tfrag"}],[173867069,{"idx":61,"name":"post01","tpage_name":"ltowerb-vis-pris"}],[170131529,{"idx":73,"name":"klever-gunmetal-01","tpage_name":"outrocst-pris"}],[188809228,{"idx":12,"name":"facc-panel-01","tpage_name":"factoryd-vis-tfrag"}],[173867068,{"idx":60,"name":"lightCase01","tpage_name":"ltowerb-vis-pris"}],[170131528,{"idx":72,"name":"klever-fingertop","tpage_name":"outrocst-pris"}],[188809227,{"idx":11,"name":"facc-wall-rnd-light-01","tpage_name":"factoryd-vis-tfrag"}],[173867067,{"idx":59,"name":"light01","tpage_name":"ltowerb-vis-pris"}],[170131527,{"idx":71,"name":"klever-fingerbottom","tpage_name":"outrocst-pris"}],[188809226,{"idx":10,"name":"facc-panel-06","tpage_name":"factoryd-vis-tfrag"}],[173867066,{"idx":58,"name":"kcfrontend01","tpage_name":"ltowerb-vis-pris"}],[170131526,{"idx":70,"name":"klever-face-01scars","tpage_name":"outrocst-pris"}],[188809225,{"idx":9,"name":"facc-pipe-02","tpage_name":"factoryd-vis-tfrag"}],[173867065,{"idx":57,"name":"jets01","tpage_name":"ltowerb-vis-pris"}],[170131525,{"idx":69,"name":"klever-face-01","tpage_name":"outrocst-pris"}],[188809224,{"idx":8,"name":"facc-pipe-01","tpage_name":"factoryd-vis-tfrag"}],[173867064,{"idx":56,"name":"jetTop01","tpage_name":"ltowerb-vis-pris"}],[170131524,{"idx":68,"name":"klever-eyelid","tpage_name":"outrocst-pris"}],[188809223,{"idx":7,"name":"facc-wall-01","tpage_name":"factoryd-vis-tfrag"}],[173867063,{"idx":55,"name":"jakchires-teeth","tpage_name":"ltowerb-vis-pris"}],[170131523,{"idx":67,"name":"klever-eye","tpage_name":"outrocst-pris"}],[188809222,{"idx":6,"name":"facc-pipe-03","tpage_name":"factoryd-vis-tfrag"}],[173867062,{"idx":54,"name":"jakchires-shoeteop","tpage_name":"ltowerb-vis-pris"}],[170131522,{"idx":66,"name":"klever-earcup","tpage_name":"outrocst-pris"}],[188809221,{"idx":5,"name":"facc-door-frame-01","tpage_name":"factoryd-vis-tfrag"}],[173867061,{"idx":53,"name":"jakchires-shoemetal","tpage_name":"ltowerb-vis-pris"}],[170131521,{"idx":65,"name":"klever-clips","tpage_name":"outrocst-pris"}],[188809220,{"idx":4,"name":"facc-door-frame-02","tpage_name":"factoryd-vis-tfrag"}],[173867060,{"idx":52,"name":"jakchires-shoebottom","tpage_name":"ltowerb-vis-pris"}],[170131520,{"idx":64,"name":"klever-chest","tpage_name":"outrocst-pris"}],[188809219,{"idx":3,"name":"common-black","tpage_name":"factoryd-vis-tfrag"}],[173867059,{"idx":51,"name":"jakchires-precarmor-01","tpage_name":"ltowerb-vis-pris"}],[170131519,{"idx":63,"name":"klever-brownstrap","tpage_name":"outrocst-pris"}],[188809218,{"idx":2,"name":"facc-panel-04","tpage_name":"factoryd-vis-tfrag"}],[173867058,{"idx":50,"name":"jakchires-pants","tpage_name":"ltowerb-vis-pris"}],[170131518,{"idx":62,"name":"klever-bolt","tpage_name":"outrocst-pris"}],[188809217,{"idx":1,"name":"facc-panel-05","tpage_name":"factoryd-vis-tfrag"}],[173867057,{"idx":49,"name":"jakchires-lightbrownspat","tpage_name":"ltowerb-vis-pris"}],[170131517,{"idx":61,"name":"klever-blackstrap","tpage_name":"outrocst-pris"}],[188809216,{"idx":0,"name":"facc-metal-panel-11","tpage_name":"factoryd-vis-tfrag"}],[173867056,{"idx":48,"name":"jakchires-leatherpouch","tpage_name":"ltowerb-vis-pris"}],[170131516,{"idx":60,"name":"klever-armor-02","tpage_name":"outrocst-pris"}],[173867055,{"idx":47,"name":"jakchires-jacket","tpage_name":"ltowerb-vis-pris"}],[170131515,{"idx":59,"name":"klever-armor-01","tpage_name":"outrocst-pris"}],[173867054,{"idx":46,"name":"jakchires-horn","tpage_name":"ltowerb-vis-pris"}],[170131514,{"idx":58,"name":"klever-arm","tpage_name":"outrocst-pris"}],[173867053,{"idx":45,"name":"jakchires-hair","tpage_name":"ltowerb-vis-pris"}],[170131513,{"idx":57,"name":"jakchires-teeth","tpage_name":"outrocst-pris"}],[173867052,{"idx":44,"name":"jakchires-glovetop","tpage_name":"ltowerb-vis-pris"}],[170131512,{"idx":56,"name":"jakchires-shoeteop","tpage_name":"outrocst-pris"}],[173867051,{"idx":43,"name":"jakchires-facert","tpage_name":"ltowerb-vis-pris"}],[170131511,{"idx":55,"name":"jakchires-shoemetal","tpage_name":"outrocst-pris"}],[173867050,{"idx":42,"name":"jakchires-facelft","tpage_name":"ltowerb-vis-pris"}],[170131510,{"idx":54,"name":"jakchires-shoebottom","tpage_name":"outrocst-pris"}],[173867049,{"idx":41,"name":"jakchires-eyelid","tpage_name":"ltowerb-vis-pris"}],[170131509,{"idx":53,"name":"jakchires-precarmor-01","tpage_name":"outrocst-pris"}],[173867048,{"idx":40,"name":"jakchires-eyebrow","tpage_name":"ltowerb-vis-pris"}],[170131508,{"idx":52,"name":"jakchires-pants","tpage_name":"outrocst-pris"}],[173867047,{"idx":39,"name":"jakchires-eye","tpage_name":"ltowerb-vis-pris"}],[170131507,{"idx":51,"name":"jakchires-lightbrownspat","tpage_name":"outrocst-pris"}],[173867046,{"idx":38,"name":"jakchires-clips","tpage_name":"ltowerb-vis-pris"}],[170131506,{"idx":50,"name":"jakchires-leatherpouch","tpage_name":"outrocst-pris"}],[173867045,{"idx":37,"name":"jakchires-chestplate","tpage_name":"ltowerb-vis-pris"}],[170131505,{"idx":49,"name":"jakchires-jacket","tpage_name":"outrocst-pris"}],[173867044,{"idx":36,"name":"jakchires-brwnleather","tpage_name":"ltowerb-vis-pris"}],[170131504,{"idx":48,"name":"jakchires-horn","tpage_name":"outrocst-pris"}],[173867043,{"idx":35,"name":"jakchires-brownstrap","tpage_name":"ltowerb-vis-pris"}],[170131503,{"idx":47,"name":"jakchires-hair","tpage_name":"outrocst-pris"}],[173867042,{"idx":34,"name":"jakchires-blackstrap","tpage_name":"ltowerb-vis-pris"}],[170131502,{"idx":46,"name":"jakchires-glovetop","tpage_name":"outrocst-pris"}],[173867041,{"idx":33,"name":"jakchires-arm","tpage_name":"ltowerb-vis-pris"}],[170131501,{"idx":45,"name":"jakchires-facert","tpage_name":"outrocst-pris"}],[173867040,{"idx":32,"name":"jakc-wristband-a2","tpage_name":"ltowerb-vis-pris"}],[170131500,{"idx":44,"name":"jakchires-facelft","tpage_name":"outrocst-pris"}],[173867039,{"idx":31,"name":"jakc-wraps","tpage_name":"ltowerb-vis-pris"}],[170131499,{"idx":43,"name":"jakchires-eyelid","tpage_name":"outrocst-pris"}],[173867038,{"idx":30,"name":"jakc-waistband2","tpage_name":"ltowerb-vis-pris"}],[170131498,{"idx":42,"name":"jakchires-eyebrow","tpage_name":"outrocst-pris"}],[173867037,{"idx":29,"name":"jakc-skirt","tpage_name":"ltowerb-vis-pris"}],[170131497,{"idx":41,"name":"jakchires-eye","tpage_name":"outrocst-pris"}],[173867036,{"idx":28,"name":"jakc-scarfhanging","tpage_name":"ltowerb-vis-pris"}],[170131496,{"idx":40,"name":"jakchires-clips","tpage_name":"outrocst-pris"}],[173867035,{"idx":27,"name":"jakc-scarf","tpage_name":"ltowerb-vis-pris"}],[170131495,{"idx":39,"name":"jakchires-chestplate","tpage_name":"outrocst-pris"}],[173867034,{"idx":26,"name":"jakc-lens","tpage_name":"ltowerb-vis-pris"}],[170131494,{"idx":38,"name":"jakchires-brwnleather","tpage_name":"outrocst-pris"}],[173867033,{"idx":25,"name":"jakc-gogglemetal","tpage_name":"ltowerb-vis-pris"}],[170131493,{"idx":37,"name":"jakchires-brownstrap","tpage_name":"outrocst-pris"}],[181338112,{"idx":0,"name":"racegate","tpage_name":"lbbring1-sprite"}],[173867032,{"idx":24,"name":"jakc-chestplate-straps","tpage_name":"ltowerb-vis-pris"}],[170131492,{"idx":36,"name":"jakchires-blackstrap","tpage_name":"outrocst-pris"}],[173867031,{"idx":23,"name":"jakc-armor","tpage_name":"ltowerb-vis-pris"}],[170131491,{"idx":35,"name":"jakchires-arm","tpage_name":"outrocst-pris"}],[173867030,{"idx":22,"name":"hood01","tpage_name":"ltowerb-vis-pris"}],[170131490,{"idx":34,"name":"jakc-wristband-a2","tpage_name":"outrocst-pris"}],[173867029,{"idx":21,"name":"gunbox02","tpage_name":"ltowerb-vis-pris"}],[170131489,{"idx":33,"name":"jakc-wraps","tpage_name":"outrocst-pris"}],[173867028,{"idx":20,"name":"gunbox01","tpage_name":"ltowerb-vis-pris"}],[170131488,{"idx":32,"name":"jakc-waistband2","tpage_name":"outrocst-pris"}],[173867027,{"idx":19,"name":"gunBoxFront01","tpage_name":"ltowerb-vis-pris"}],[170131487,{"idx":31,"name":"jakc-skirt","tpage_name":"outrocst-pris"}],[173867026,{"idx":18,"name":"gunBoxBack01","tpage_name":"ltowerb-vis-pris"}],[170131486,{"idx":30,"name":"jakc-scarfhanging","tpage_name":"outrocst-pris"}],[173867025,{"idx":17,"name":"grillRim01","tpage_name":"ltowerb-vis-pris"}],[170131485,{"idx":29,"name":"jakc-scarf","tpage_name":"outrocst-pris"}],[173867024,{"idx":16,"name":"gauge01","tpage_name":"ltowerb-vis-pris"}],[170131484,{"idx":28,"name":"jakc-lens","tpage_name":"outrocst-pris"}],[173867023,{"idx":15,"name":"errolcyber-teeth","tpage_name":"ltowerb-vis-pris"}],[170131483,{"idx":27,"name":"jakc-gogglemetal","tpage_name":"outrocst-pris"}],[173867022,{"idx":14,"name":"errolcyber-pipes-03","tpage_name":"ltowerb-vis-pris"}],[170131482,{"idx":26,"name":"jakc-chestplate-straps","tpage_name":"outrocst-pris"}],[173867021,{"idx":13,"name":"errolcyber-pipes-02","tpage_name":"ltowerb-vis-pris"}],[170131481,{"idx":25,"name":"jakc-armor","tpage_name":"outrocst-pris"}],[173867016,{"idx":8,"name":"errolcyber-hair","tpage_name":"ltowerb-vis-pris"}],[170131476,{"idx":20,"name":"environment-oldmetal","tpage_name":"outrocst-pris"}],[170131457,{"idx":1,"name":"bam-hairhilite","tpage_name":"outrocst-pris"}],[169869345,{"idx":33,"name":"kg-rob-trans-gun04","tpage_name":"lctyprot-pris"}],[169869344,{"idx":32,"name":"missle-launcher-tube-end-02","tpage_name":"lctyprot-pris"}],[169869343,{"idx":31,"name":"missle-launcher-tube-end-01","tpage_name":"lctyprot-pris"}],[169869342,{"idx":30,"name":"missle-launcher-tube","tpage_name":"lctyprot-pris"}],[169869341,{"idx":29,"name":"missle-launcher-top-02","tpage_name":"lctyprot-pris"}],[169869340,{"idx":28,"name":"missle-launcher-top-01","tpage_name":"lctyprot-pris"}],[169869339,{"idx":27,"name":"missle-launcher-shaft-01","tpage_name":"lctyprot-pris"}],[169869327,{"idx":15,"name":"kg-rob-trans-rod-02","tpage_name":"lctyprot-pris"}],[173604864,{"idx":0,"name":"tow-eggcase-01","tpage_name":"ltowerb-vis-alpha"}],[169869324,{"idx":12,"name":"kg-rob-trans-panel-06","tpage_name":"lctyprot-pris"}],[169869322,{"idx":10,"name":"kg-rob-trans-panel-04","tpage_name":"lctyprot-pris"}],[169869314,{"idx":2,"name":"homing-missle-exhaust","tpage_name":"lctyprot-pris"}],[169869313,{"idx":1,"name":"homing-missle-body-tip","tpage_name":"lctyprot-pris"}],[169869312,{"idx":0,"name":"homing-missle-body","tpage_name":"lctyprot-pris"}],[169869338,{"idx":26,"name":"missle-launcher-rim-01","tpage_name":"lctyprot-pris"}],[168624158,{"idx":30,"name":"tread-interceptor-rhino","tpage_name":"lfaccar-pris"}],[177340417,{"idx":1,"name":"temple_flag02","tpage_name":"templec-vis-pris"}],[169869337,{"idx":25,"name":"missle-launcher-panel-02","tpage_name":"lctyprot-pris"}],[168624157,{"idx":29,"name":"lightCase01","tpage_name":"lfaccar-pris"}],[168624156,{"idx":28,"name":"light01","tpage_name":"lfaccar-pris"}],[169869335,{"idx":23,"name":"missle-launcher-metal-01","tpage_name":"lctyprot-pris"}],[168624155,{"idx":27,"name":"jets01","tpage_name":"lfaccar-pris"}],[169869334,{"idx":22,"name":"missle-launcher-gear-02","tpage_name":"lctyprot-pris"}],[168624154,{"idx":26,"name":"fac-vehicle-tire-tread-01","tpage_name":"lfaccar-pris"}],[168624153,{"idx":25,"name":"fac-vehicle-tank-02","tpage_name":"lfaccar-pris"}],[169869332,{"idx":20,"name":"kg-rob-trans-thruster-glow-01","tpage_name":"lctyprot-pris"}],[168624152,{"idx":24,"name":"fac-vehicle-tank-01","tpage_name":"lfaccar-pris"}],[169869331,{"idx":19,"name":"kg-rob-trans-thruster-04","tpage_name":"lctyprot-pris"}],[168624151,{"idx":23,"name":"fac-vehicle-safety-plate-01","tpage_name":"lfaccar-pris"}],[169869330,{"idx":18,"name":"kg-rob-trans-thruster-03","tpage_name":"lctyprot-pris"}],[168624150,{"idx":22,"name":"fac-vehicle-rim-01","tpage_name":"lfaccar-pris"}],[169869329,{"idx":17,"name":"kg-rob-trans-thruster-02","tpage_name":"lctyprot-pris"}],[168624149,{"idx":21,"name":"fac-vehicle-metal-plate-02","tpage_name":"lfaccar-pris"}],[169869328,{"idx":16,"name":"kg-rob-trans-thruster-01","tpage_name":"lctyprot-pris"}],[168624148,{"idx":20,"name":"fac-vehicle-hubcap-01","tpage_name":"lfaccar-pris"}],[173604866,{"idx":2,"name":"tow-eggside-01","tpage_name":"ltowerb-vis-alpha"}],[169869326,{"idx":14,"name":"kg-rob-trans-rod-01","tpage_name":"lctyprot-pris"}],[168624146,{"idx":18,"name":"fac-vehicle-exhaust-pipe-01","tpage_name":"lfaccar-pris"}],[173604865,{"idx":1,"name":"tow-eggtop-01","tpage_name":"ltowerb-vis-alpha"}],[169869325,{"idx":13,"name":"kg-rob-trans-ribs01","tpage_name":"lctyprot-pris"}],[168624145,{"idx":17,"name":"fac-vehicle-exhaust-01","tpage_name":"lfaccar-pris"}],[169869323,{"idx":11,"name":"kg-rob-trans-panel-05","tpage_name":"lctyprot-pris"}],[168624143,{"idx":15,"name":"fac-vehicle-detail-01","tpage_name":"lfaccar-pris"}],[169869321,{"idx":9,"name":"kg-rob-trans-panel-03","tpage_name":"lctyprot-pris"}],[168624141,{"idx":13,"name":"fac-vehicle-controls","tpage_name":"lfaccar-pris"}],[169869320,{"idx":8,"name":"kg-rob-trans-panel-02","tpage_name":"lctyprot-pris"}],[168624140,{"idx":12,"name":"fac-vehicle-cap-pin-01","tpage_name":"lfaccar-pris"}],[169869319,{"idx":7,"name":"kg-rob-trans-panel-01","tpage_name":"lctyprot-pris"}],[168624139,{"idx":11,"name":"fac-vehicle-brace-pipe-01","tpage_name":"lfaccar-pris"}],[169869318,{"idx":6,"name":"kg-rob-trans-gun05","tpage_name":"lctyprot-pris"}],[168624138,{"idx":10,"name":"fac-vehicle-bolt-01","tpage_name":"lfaccar-pris"}],[169869317,{"idx":5,"name":"kg-rob-trans-door-edge-01","tpage_name":"lctyprot-pris"}],[168624137,{"idx":9,"name":"fac-vehicle-body-02","tpage_name":"lfaccar-pris"}],[169869316,{"idx":4,"name":"common-black","tpage_name":"lctyprot-pris"}],[168624136,{"idx":8,"name":"fac-vehicle-body-01","tpage_name":"lfaccar-pris"}],[169869315,{"idx":3,"name":"homing-missle-fin-01","tpage_name":"lctyprot-pris"}],[168624135,{"idx":7,"name":"common-black","tpage_name":"lfaccar-pris"}],[167313433,{"idx":25,"name":"daxtertuft","tpage_name":"stadium-vis-pris"}],[167313432,{"idx":24,"name":"daxterteeth","tpage_name":"stadium-vis-pris"}],[173539331,{"idx":3,"name":"tow-wall-supports","tpage_name":"ltowerb-vis-shrub"}],[167313431,{"idx":23,"name":"daxternose","tpage_name":"stadium-vis-pris"}],[173539330,{"idx":2,"name":"tow-groundpod","tpage_name":"ltowerb-vis-shrub"}],[167313430,{"idx":22,"name":"daxterlense","tpage_name":"stadium-vis-pris"}],[167313429,{"idx":21,"name":"daxterhelmetplain","tpage_name":"stadium-vis-pris"}],[167313428,{"idx":20,"name":"daxterheadwidenew","tpage_name":"stadium-vis-pris"}],[167313427,{"idx":19,"name":"daxtergoggles","tpage_name":"stadium-vis-pris"}],[167313426,{"idx":18,"name":"daxterfoot-bottom","tpage_name":"stadium-vis-pris"}],[167313425,{"idx":17,"name":"daxterfoot","tpage_name":"stadium-vis-pris"}],[167313424,{"idx":16,"name":"daxterfinger","tpage_name":"stadium-vis-pris"}],[167313423,{"idx":15,"name":"daxterear","tpage_name":"stadium-vis-pris"}],[167313422,{"idx":14,"name":"daxterbolt","tpage_name":"stadium-vis-pris"}],[194445346,{"idx":34,"name":"jakchires-shoeteop","tpage_name":"gridcst-pris"}],[165806206,{"idx":126,"name":"rub-palace-tower-side","tpage_name":"ltowcity-tfrag"}],[194445345,{"idx":33,"name":"jakchires-shoemetal","tpage_name":"gridcst-pris"}],[165806205,{"idx":125,"name":"palcab-lowres-background-mountains-02","tpage_name":"ltowcity-tfrag"}],[194445344,{"idx":32,"name":"jakchires-shoebottom","tpage_name":"gridcst-pris"}],[165806204,{"idx":124,"name":"palcab-lowres-background-peaks-02","tpage_name":"ltowcity-tfrag"}],[194445343,{"idx":31,"name":"jakchires-precarmor-01","tpage_name":"gridcst-pris"}],[165806203,{"idx":123,"name":"palcab-smallpipe-lores","tpage_name":"ltowcity-tfrag"}],[194445342,{"idx":30,"name":"jakchires-pants","tpage_name":"gridcst-pris"}],[193200162,{"idx":34,"name":"neo-wasp-eye","tpage_name":"towerb-vis-pris"}],[165806202,{"idx":122,"name":"palcab-lowres-background-crater-01","tpage_name":"ltowcity-tfrag"}],[194445341,{"idx":29,"name":"jakchires-lightbrownspat","tpage_name":"gridcst-pris"}],[193200161,{"idx":33,"name":"neo-wasp-dark-brown","tpage_name":"towerb-vis-pris"}],[165806201,{"idx":121,"name":"palcab-lowres-background-desert-to-shore","tpage_name":"ltowcity-tfrag"}],[194445340,{"idx":28,"name":"jakchires-leatherpouch","tpage_name":"gridcst-pris"}],[193200160,{"idx":32,"name":"neo-wasp-brown","tpage_name":"towerb-vis-pris"}],[165806200,{"idx":120,"name":"palcab-lowres-background-shoreline-02","tpage_name":"ltowcity-tfrag"}],[194445339,{"idx":27,"name":"jakchires-jacket","tpage_name":"gridcst-pris"}],[193200159,{"idx":31,"name":"neo-wasp-body","tpage_name":"towerb-vis-pris"}],[165806199,{"idx":119,"name":"palcab-lowres-background-peaks-01","tpage_name":"ltowcity-tfrag"}],[194445338,{"idx":26,"name":"jakchires-horn","tpage_name":"gridcst-pris"}],[193200158,{"idx":30,"name":"neo-wasp-base","tpage_name":"towerb-vis-pris"}],[165806198,{"idx":118,"name":"tcab-blue-ring-01","tpage_name":"ltowcity-tfrag"}],[194445337,{"idx":25,"name":"jakchires-hair","tpage_name":"gridcst-pris"}],[193200157,{"idx":29,"name":"environment-darkprec","tpage_name":"towerb-vis-pris"}],[165806197,{"idx":117,"name":"tcab-beam01-lores","tpage_name":"ltowcity-tfrag"}],[194445336,{"idx":24,"name":"jakchires-glovetop","tpage_name":"gridcst-pris"}],[165806196,{"idx":116,"name":"city-lowres-mhcity-ground-01","tpage_name":"ltowcity-tfrag"}],[194445335,{"idx":23,"name":"jakchires-facert","tpage_name":"gridcst-pris"}],[165806195,{"idx":115,"name":"palcab-lowres-background-desert-01","tpage_name":"ltowcity-tfrag"}],[194445334,{"idx":22,"name":"jakchires-facelft","tpage_name":"gridcst-pris"}],[165806194,{"idx":114,"name":"palcab-lowres-background-hilltops-01","tpage_name":"ltowcity-tfrag"}],[194445333,{"idx":21,"name":"jakchires-eyelid","tpage_name":"gridcst-pris"}],[165806193,{"idx":113,"name":"palcab-lowres-background-mounatin-window","tpage_name":"ltowcity-tfrag"}],[194445332,{"idx":20,"name":"jakchires-eyebrow","tpage_name":"gridcst-pris"}],[165806192,{"idx":112,"name":"palcab-lowres-background-grass-to-desert-01","tpage_name":"ltowcity-tfrag"}],[194445331,{"idx":19,"name":"jakchires-eye","tpage_name":"gridcst-pris"}],[165806191,{"idx":111,"name":"palcab-lowres-background-grass-to-desert-02","tpage_name":"ltowcity-tfrag"}],[199426050,{"idx":2,"name":"dust-sparkle","tpage_name":"templea-sprite"}],[194445330,{"idx":18,"name":"jakchires-clips","tpage_name":"gridcst-pris"}],[175767630,{"idx":78,"name":"prec-teeth","tpage_name":"loutro-pris"}],[165806190,{"idx":110,"name":"palcab-lowres-background-mountains","tpage_name":"ltowcity-tfrag"}],[194445329,{"idx":17,"name":"jakchires-chestplate","tpage_name":"gridcst-pris"}],[175767629,{"idx":77,"name":"prec-staff-02","tpage_name":"loutro-pris"}],[165806189,{"idx":109,"name":"palcab-lowres-background-shoreline-01","tpage_name":"ltowcity-tfrag"}],[199426048,{"idx":0,"name":"ceiling-dust","tpage_name":"templea-sprite"}],[194445328,{"idx":16,"name":"jakchires-brwnleather","tpage_name":"gridcst-pris"}],[175767628,{"idx":76,"name":"prec-staff-01","tpage_name":"loutro-pris"}],[165806188,{"idx":108,"name":"city-lowres-mhcity-tower-02","tpage_name":"ltowcity-tfrag"}],[194445327,{"idx":15,"name":"jakchires-brownstrap","tpage_name":"gridcst-pris"}],[175767627,{"idx":75,"name":"prec-orbsmall","tpage_name":"loutro-pris"}],[165806187,{"idx":107,"name":"palcab-swingp-trim","tpage_name":"ltowcity-tfrag"}],[194445326,{"idx":14,"name":"jakchires-blackstrap","tpage_name":"gridcst-pris"}],[175767626,{"idx":74,"name":"prec-orblarge","tpage_name":"loutro-pris"}],[165806186,{"idx":106,"name":"city-lowres-mhcity-tower-01","tpage_name":"ltowcity-tfrag"}],[194445325,{"idx":13,"name":"jakchires-arm","tpage_name":"gridcst-pris"}],[175767625,{"idx":73,"name":"prec-leader-wrap","tpage_name":"loutro-pris"}],[165806185,{"idx":105,"name":"palcab-lorez-plates-red-stripe01","tpage_name":"ltowcity-tfrag"}],[194445324,{"idx":12,"name":"jakc-wristband-a2","tpage_name":"gridcst-pris"}],[175767624,{"idx":72,"name":"prec-leader-shirt","tpage_name":"loutro-pris"}],[165806184,{"idx":104,"name":"t-palshaft-r-strp-plate01","tpage_name":"ltowcity-tfrag"}],[194445323,{"idx":11,"name":"jakc-wraps","tpage_name":"gridcst-pris"}],[175767623,{"idx":71,"name":"prec-leader-robe-02","tpage_name":"loutro-pris"}],[165806183,{"idx":103,"name":"ctywide-ox-met-01","tpage_name":"ltowcity-tfrag"}],[194445322,{"idx":10,"name":"jakc-waistband2","tpage_name":"gridcst-pris"}],[175767622,{"idx":70,"name":"prec-leader-pants","tpage_name":"loutro-pris"}],[165806182,{"idx":102,"name":"t-palshaft-pil-01","tpage_name":"ltowcity-tfrag"}],[194445321,{"idx":9,"name":"jakc-skirt","tpage_name":"gridcst-pris"}],[175767621,{"idx":69,"name":"prec-leader-hair","tpage_name":"loutro-pris"}],[165806181,{"idx":101,"name":"palcab-lowres-background-strip","tpage_name":"ltowcity-tfrag"}],[194445320,{"idx":8,"name":"jakc-scarfhanging","tpage_name":"gridcst-pris"}],[175767620,{"idx":68,"name":"prec-leader-frontskirt","tpage_name":"loutro-pris"}],[165806180,{"idx":100,"name":"ctyp-metal-01","tpage_name":"ltowcity-tfrag"}],[194445319,{"idx":7,"name":"jakc-scarf","tpage_name":"gridcst-pris"}],[175767619,{"idx":67,"name":"prec-leader-face2","tpage_name":"loutro-pris"}],[165806179,{"idx":99,"name":"palcab-lowres-stadium-grass","tpage_name":"ltowcity-tfrag"}],[194445318,{"idx":6,"name":"jakc-lens","tpage_name":"gridcst-pris"}],[175767618,{"idx":66,"name":"prec-leader-belt","tpage_name":"loutro-pris"}],[165806178,{"idx":98,"name":"citywide-consite-steel","tpage_name":"ltowcity-tfrag"}],[194445317,{"idx":5,"name":"jakc-gogglemetal","tpage_name":"gridcst-pris"}],[175767617,{"idx":65,"name":"prec-leader-beard","tpage_name":"loutro-pris"}],[165806177,{"idx":97,"name":"t-palshaft-panl-01","tpage_name":"ltowcity-tfrag"}],[194445316,{"idx":4,"name":"jakc-chestplate-straps","tpage_name":"gridcst-pris"}],[175767616,{"idx":64,"name":"prec-leader-arm","tpage_name":"loutro-pris"}],[165806176,{"idx":96,"name":"palace-break-brokenwall","tpage_name":"ltowcity-tfrag"}],[194445315,{"idx":3,"name":"jakc-armor","tpage_name":"gridcst-pris"}],[175767615,{"idx":63,"name":"daxtertuft","tpage_name":"loutro-pris"}],[165806175,{"idx":95,"name":"tcab-plat-edg-01-lores","tpage_name":"ltowcity-tfrag"}],[194445314,{"idx":2,"name":"environment-oldmetal","tpage_name":"gridcst-pris"}],[175767614,{"idx":62,"name":"daxterlense","tpage_name":"loutro-pris"}],[165806174,{"idx":94,"name":"palcab-wall-lores","tpage_name":"ltowcity-tfrag"}],[194445313,{"idx":1,"name":"bam-hairhilite","tpage_name":"gridcst-pris"}],[175767613,{"idx":61,"name":"daxtergoggles","tpage_name":"loutro-pris"}],[165806173,{"idx":93,"name":"tcab-beam01","tpage_name":"ltowcity-tfrag"}],[194445312,{"idx":0,"name":"bam-eyelight","tpage_name":"gridcst-pris"}],[175767612,{"idx":60,"name":"daxterbolt","tpage_name":"loutro-pris"}],[165806172,{"idx":92,"name":"palcab-lorez-plates01","tpage_name":"ltowcity-tfrag"}],[175767611,{"idx":59,"name":"daxter-eyelid","tpage_name":"loutro-pris"}],[165806171,{"idx":91,"name":"palcab-lorez-metal01-red-stripe","tpage_name":"ltowcity-tfrag"}],[165806170,{"idx":90,"name":"palcab-lorez-metal01-red","tpage_name":"ltowcity-tfrag"}],[165806169,{"idx":89,"name":"palcab-lorez-metal02","tpage_name":"ltowcity-tfrag"}],[165806168,{"idx":88,"name":"palcab-lowres-background-trees2","tpage_name":"ltowcity-tfrag"}],[165806167,{"idx":87,"name":"palcab-lowres-background-trees-edge","tpage_name":"ltowcity-tfrag"}],[165806166,{"idx":86,"name":"palcab-lorez-asphalt01","tpage_name":"ltowcity-tfrag"}],[190709765,{"idx":5,"name":"neo-wasp-eye","tpage_name":"ltowera-vis-pris"}],[165806165,{"idx":85,"name":"palcab-swingp-base-lores","tpage_name":"ltowcity-tfrag"}],[190709764,{"idx":4,"name":"neo-wasp-dark-brown","tpage_name":"ltowera-vis-pris"}],[165806164,{"idx":84,"name":"city-lowres-mhcity-wall-03","tpage_name":"ltowcity-tfrag"}],[190709763,{"idx":3,"name":"neo-wasp-brown","tpage_name":"ltowera-vis-pris"}],[165806163,{"idx":83,"name":"common-black","tpage_name":"ltowcity-tfrag"}],[190709760,{"idx":0,"name":"environment-darkprec","tpage_name":"ltowera-vis-pris"}],[165806160,{"idx":80,"name":"city-lowres-mhcity-detower-02","tpage_name":"ltowcity-tfrag"}],[165806159,{"idx":79,"name":"city-lowres-mhcity-detower-01","tpage_name":"ltowcity-tfrag"}],[165806158,{"idx":78,"name":"city-lowres-mhcity-wall-01","tpage_name":"ltowcity-tfrag"}],[165806157,{"idx":77,"name":"city-lowres-mhcity-wall-02","tpage_name":"ltowcity-tfrag"}],[165806156,{"idx":76,"name":"citywide-hangmetal","tpage_name":"ltowcity-tfrag"}],[165806155,{"idx":75,"name":"citywide-palace-01","tpage_name":"ltowcity-tfrag"}],[165806154,{"idx":74,"name":"palace-break-girder01","tpage_name":"ltowcity-tfrag"}],[165806153,{"idx":73,"name":"t-palshaft-roof-01","tpage_name":"ltowcity-tfrag"}],[165806152,{"idx":72,"name":"palcab-lowres-farm-wall-top","tpage_name":"ltowcity-tfrag"}],[165806151,{"idx":71,"name":"palcab-lowres-farm-wall","tpage_name":"ltowcity-tfrag"}],[165806150,{"idx":70,"name":"t-citywide-wall-tile-01","tpage_name":"ltowcity-tfrag"}],[165806149,{"idx":69,"name":"city-lowres-damaged-01","tpage_name":"ltowcity-tfrag"}],[165806148,{"idx":68,"name":"city-lowres-newslums-stripe-01","tpage_name":"ltowcity-tfrag"}],[165806147,{"idx":67,"name":"city-lowres-newslums-bigwindows-02","tpage_name":"ltowcity-tfrag"}],[165806146,{"idx":66,"name":"city-lowres-newslums-stripe-02","tpage_name":"ltowcity-tfrag"}],[165806145,{"idx":65,"name":"t-strip-lo-palsup-danger2","tpage_name":"ltowcity-tfrag"}],[165806144,{"idx":64,"name":"t-strip-lo-palsup-danger1","tpage_name":"ltowcity-tfrag"}],[165806143,{"idx":63,"name":"t-strip-lo-palsup-panel-5","tpage_name":"ltowcity-tfrag"}],[165806142,{"idx":62,"name":"t-strip-lo-palsup-panel-4","tpage_name":"ltowcity-tfrag"}],[165806141,{"idx":61,"name":"t-strip-lo-palsup-panel-3","tpage_name":"ltowcity-tfrag"}],[184483840,{"idx":0,"name":"citywide-stdm-wire","tpage_name":"stadiuma-vis-shrub"}],[175767580,{"idx":28,"name":"prec-surfer-sleeve","tpage_name":"loutro-pris"}],[165806140,{"idx":60,"name":"t-strip-lo-palsup-panel-2","tpage_name":"ltowcity-tfrag"}],[175767579,{"idx":27,"name":"prec-surfer-shirt","tpage_name":"loutro-pris"}],[165806139,{"idx":59,"name":"t-strip-lo-palsup-panel-1","tpage_name":"ltowcity-tfrag"}],[175767577,{"idx":25,"name":"prec-surfer-pants","tpage_name":"loutro-pris"}],[165806137,{"idx":57,"name":"palcab-lowres-background-mount-build-03","tpage_name":"ltowcity-tfrag"}],[175767576,{"idx":24,"name":"prec-surfer-hairshort","tpage_name":"loutro-pris"}],[165806136,{"idx":56,"name":"palcab-lowres-background-mount-build-02","tpage_name":"ltowcity-tfrag"}],[175767573,{"idx":21,"name":"prec-surfer-chain-02","tpage_name":"loutro-pris"}],[165806133,{"idx":53,"name":"t-citywide-met-wall-02","tpage_name":"ltowcity-tfrag"}],[175767572,{"idx":20,"name":"prec-surfer-chain","tpage_name":"loutro-pris"}],[173277212,{"idx":28,"name":"tow-dplight-blue-01","tpage_name":"ltowera-vis-tfrag"}],[165806132,{"idx":52,"name":"t-citywide-red-met-01","tpage_name":"ltowcity-tfrag"}],[175767571,{"idx":19,"name":"prec-neck","tpage_name":"loutro-pris"}],[173277211,{"idx":27,"name":"tow-wall-supports-HI","tpage_name":"ltowera-vis-tfrag"}],[165806131,{"idx":51,"name":"t-citywide-met-pill-01","tpage_name":"ltowcity-tfrag"}],[175767570,{"idx":18,"name":"prec-leader-armband","tpage_name":"loutro-pris"}],[173277210,{"idx":26,"name":"rail-env-wall-01","tpage_name":"ltowera-vis-tfrag"}],[165806130,{"idx":50,"name":"t-citywide-met-strp01","tpage_name":"ltowcity-tfrag"}],[175767562,{"idx":10,"name":"daxterhelmetplain","tpage_name":"loutro-pris"}],[173277202,{"idx":18,"name":"tow-base-ground-plat","tpage_name":"ltowera-vis-tfrag"}],[165806122,{"idx":42,"name":"city-lowres-ctygen-build-03","tpage_name":"ltowcity-tfrag"}],[175767561,{"idx":9,"name":"daxterheadwidenew","tpage_name":"loutro-pris"}],[173277201,{"idx":17,"name":"tow-plat-side","tpage_name":"ltowera-vis-tfrag"}],[165806121,{"idx":41,"name":"city-lowres-ctygen-side-01","tpage_name":"ltowcity-tfrag"}],[175767560,{"idx":8,"name":"daxterfoot-bottom","tpage_name":"loutro-pris"}],[173277200,{"idx":16,"name":"tow-base-ground","tpage_name":"ltowera-vis-tfrag"}],[165806120,{"idx":40,"name":"city-lowres-ctygen-build-02","tpage_name":"ltowcity-tfrag"}],[175767559,{"idx":7,"name":"daxterfoot","tpage_name":"loutro-pris"}],[173277199,{"idx":15,"name":"tow-wall-supports","tpage_name":"ltowera-vis-tfrag"}],[165806119,{"idx":39,"name":"palcab-lowres-mark-highway","tpage_name":"ltowcity-tfrag"}],[175767558,{"idx":6,"name":"daxterfinger","tpage_name":"loutro-pris"}],[173277198,{"idx":14,"name":"lt-eco-vent-side-01","tpage_name":"ltowera-vis-tfrag"}],[165806118,{"idx":38,"name":"city-lowres-ctygen-build-01","tpage_name":"ltowcity-tfrag"}],[175767557,{"idx":5,"name":"daxterear","tpage_name":"loutro-pris"}],[173277197,{"idx":13,"name":"lt-eco-vent-blue-01","tpage_name":"ltowera-vis-tfrag"}],[165806117,{"idx":37,"name":"city-lowres-ctygen-roof-02","tpage_name":"ltowcity-tfrag"}],[175767556,{"idx":4,"name":"daxterbodyshort-eix","tpage_name":"loutro-pris"}],[173277196,{"idx":12,"name":"tow-egg-remains-side","tpage_name":"ltowera-vis-tfrag"}],[165806116,{"idx":36,"name":"city-lowres-ctygen-stripe-01","tpage_name":"ltowcity-tfrag"}],[175767555,{"idx":3,"name":"daxterarm","tpage_name":"loutro-pris"}],[165806115,{"idx":35,"name":"city-lowres-ctygen-side-02","tpage_name":"ltowcity-tfrag"}],[175767554,{"idx":2,"name":"daxter-orange","tpage_name":"loutro-pris"}],[165806114,{"idx":34,"name":"palcab-lowres-mark-awning-red","tpage_name":"ltowcity-tfrag"}],[175767553,{"idx":1,"name":"daxter-furhilite","tpage_name":"loutro-pris"}],[173277193,{"idx":9,"name":"tow-basebone-01","tpage_name":"ltowera-vis-tfrag"}],[165806113,{"idx":33,"name":"palcab-lowres-mark-awning-green","tpage_name":"ltowcity-tfrag"}],[175767552,{"idx":0,"name":"bam-eyelight","tpage_name":"loutro-pris"}],[173277192,{"idx":8,"name":"tow-eggtop-01","tpage_name":"ltowera-vis-tfrag"}],[165806112,{"idx":32,"name":"palcab-lowres-mark-shops-01","tpage_name":"ltowcity-tfrag"}],[173277190,{"idx":6,"name":"tow-pup-detail-01","tpage_name":"ltowera-vis-tfrag"}],[165806110,{"idx":30,"name":"city-lowres-ind-wall-06","tpage_name":"ltowcity-tfrag"}],[173277189,{"idx":5,"name":"tow-pupeyes-01","tpage_name":"ltowera-vis-tfrag"}],[165806109,{"idx":29,"name":"city-lowres-ind-wall-05","tpage_name":"ltowcity-tfrag"}],[173277188,{"idx":4,"name":"tow-eggpod-01","tpage_name":"ltowera-vis-tfrag"}],[165806108,{"idx":28,"name":"city-lowres-ind-wall-08","tpage_name":"ltowcity-tfrag"}],[173277187,{"idx":3,"name":"tow-pup-skin-01","tpage_name":"ltowera-vis-tfrag"}],[165806107,{"idx":27,"name":"city-lowres-ind-wall-07","tpage_name":"ltowcity-tfrag"}],[165806106,{"idx":26,"name":"city-lowres-ind-wall-03","tpage_name":"ltowcity-tfrag"}],[165806105,{"idx":25,"name":"city-lowres-port-roof","tpage_name":"ltowcity-tfrag"}],[165806104,{"idx":24,"name":"city-lowres-ind-wall-01","tpage_name":"ltowcity-tfrag"}],[165806103,{"idx":23,"name":"palcab-lowres-mark-roof-01","tpage_name":"ltowcity-tfrag"}],[172032001,{"idx":1,"name":"wstd-torchbowl-coal-01","tpage_name":"templeb-vis-shrub"}],[165806101,{"idx":21,"name":"city-lowres-fort-yellow","tpage_name":"ltowcity-tfrag"}],[172032000,{"idx":0,"name":"temple-candle-wick","tpage_name":"templeb-vis-shrub"}],[170786820,{"idx":4,"name":"palcab-lowres-ctyslum-wall-03","tpage_name":"lcitysml-alpha"}],[165806100,{"idx":20,"name":"city-lowres-ind-wall-02","tpage_name":"ltowcity-tfrag"}],[170786819,{"idx":3,"name":"palcab-lowres-background-trees2","tpage_name":"lcitysml-alpha"}],[165806099,{"idx":19,"name":"palcab-lowres-stadium-canopy","tpage_name":"ltowcity-tfrag"}],[170786818,{"idx":2,"name":"palcab-lowres-background-trees-edge","tpage_name":"lcitysml-alpha"}],[165806098,{"idx":18,"name":"palcab-steel-lores","tpage_name":"ltowcity-tfrag"}],[170786817,{"idx":1,"name":"palcab-lowres-background-crater-rim","tpage_name":"lcitysml-alpha"}],[165806097,{"idx":17,"name":"city-lowres-ind-wall-04","tpage_name":"ltowcity-tfrag"}],[165806093,{"idx":13,"name":"palcab-lowres-ctyslum-wall-04","tpage_name":"ltowcity-tfrag"}],[165806092,{"idx":12,"name":"palcab-lowres-ctyslum-roof-02","tpage_name":"ltowcity-tfrag"}],[165806088,{"idx":8,"name":"palcab-lowres-ctyslum-roof-03","tpage_name":"ltowcity-tfrag"}],[164692023,{"idx":55,"name":"prec-veger-vest","tpage_name":"railcst-pris2"}],[164692022,{"idx":54,"name":"prec-veger-spat","tpage_name":"railcst-pris2"}],[164692021,{"idx":53,"name":"prec-veger-sleeve","tpage_name":"railcst-pris2"}],[164692020,{"idx":52,"name":"prec-veger-orange","tpage_name":"railcst-pris2"}],[164692019,{"idx":51,"name":"prec-veger-nose","tpage_name":"railcst-pris2"}],[164692018,{"idx":50,"name":"prec-veger-newface","tpage_name":"railcst-pris2"}],[164692017,{"idx":49,"name":"prec-veger-neck","tpage_name":"railcst-pris2"}],[164692016,{"idx":48,"name":"prec-veger-mouth","tpage_name":"railcst-pris2"}],[164692015,{"idx":47,"name":"prec-veger-leg","tpage_name":"railcst-pris2"}],[164692014,{"idx":46,"name":"prec-veger-handpalm","tpage_name":"railcst-pris2"}],[164692013,{"idx":45,"name":"prec-veger-handback","tpage_name":"railcst-pris2"}],[164692012,{"idx":44,"name":"prec-veger-foot-02","tpage_name":"railcst-pris2"}],[164692011,{"idx":43,"name":"prec-veger-foot","tpage_name":"railcst-pris2"}],[164692010,{"idx":42,"name":"prec-veger-ear","tpage_name":"railcst-pris2"}],[164692009,{"idx":41,"name":"prec-veger-body","tpage_name":"railcst-pris2"}],[164692008,{"idx":40,"name":"daxterteeth","tpage_name":"railcst-pris2"}],[164692007,{"idx":39,"name":"daxter-furhilite","tpage_name":"railcst-pris2"}],[164692006,{"idx":38,"name":"daxter-eyelid","tpage_name":"railcst-pris2"}],[164692005,{"idx":37,"name":"veger-whitecloth","tpage_name":"railcst-pris2"}],[164692004,{"idx":36,"name":"veger-walkingstick-03","tpage_name":"railcst-pris2"}],[164692003,{"idx":35,"name":"veger-walkingstick-02","tpage_name":"railcst-pris2"}],[164692002,{"idx":34,"name":"veger-walkingstick-01","tpage_name":"railcst-pris2"}],[164692001,{"idx":33,"name":"veger-vest","tpage_name":"railcst-pris2"}],[164692000,{"idx":32,"name":"veger-teeth","tpage_name":"railcst-pris2"}],[164691999,{"idx":31,"name":"veger-stickwrap","tpage_name":"railcst-pris2"}],[173408258,{"idx":2,"name":"tow-eggside-01","tpage_name":"ltowera-vis-alpha"}],[172163078,{"idx":6,"name":"tpl-symbl-yellow-01","tpage_name":"templec-vis-water"}],[164691998,{"idx":30,"name":"veger-sleevelower","tpage_name":"railcst-pris2"}],[173408257,{"idx":1,"name":"tow-eggtop-01","tpage_name":"ltowera-vis-alpha"}],[172163077,{"idx":5,"name":"tpl-symbl-violet-01","tpage_name":"templec-vis-water"}],[164691997,{"idx":29,"name":"veger-sleeve","tpage_name":"railcst-pris2"}],[173408256,{"idx":0,"name":"tow-eggcase-01","tpage_name":"ltowera-vis-alpha"}],[172163076,{"idx":4,"name":"tpl-symbl-yellow-glow-01","tpage_name":"templec-vis-water"}],[164691996,{"idx":28,"name":"veger-shoulderplatemetal","tpage_name":"railcst-pris2"}],[172163075,{"idx":3,"name":"tpl-symbl-violet-glow-01","tpage_name":"templec-vis-water"}],[164691995,{"idx":27,"name":"veger-shoulderplate","tpage_name":"railcst-pris2"}],[172163074,{"idx":2,"name":"tplc-water","tpage_name":"templec-vis-water"}],[164691994,{"idx":26,"name":"veger-shoebottom","tpage_name":"railcst-pris2"}],[172163073,{"idx":1,"name":"tplc-water-dest","tpage_name":"templec-vis-water"}],[164691993,{"idx":25,"name":"veger-scarf","tpage_name":"railcst-pris2"}],[164691992,{"idx":24,"name":"veger-parchment","tpage_name":"railcst-pris2"}],[164691991,{"idx":23,"name":"veger-pants","tpage_name":"railcst-pris2"}],[164691990,{"idx":22,"name":"veger-pages","tpage_name":"railcst-pris2"}],[164691989,{"idx":21,"name":"veger-legwraps","tpage_name":"railcst-pris2"}],[164691988,{"idx":20,"name":"veger-iris","tpage_name":"railcst-pris2"}],[206962694,{"idx":6,"name":"cityslumc-purple-plain","tpage_name":"lfreeout-tfrag"}],[205717514,{"idx":10,"name":"kg-target-gun-01","tpage_name":"lgunnorm-pris"}],[164626574,{"idx":142,"name":"prec-leader-robe-01","tpage_name":"railcst-pris"}],[206962693,{"idx":5,"name":"ctyslumc-light-blue","tpage_name":"lfreeout-tfrag"}],[205717513,{"idx":9,"name":"kg-target-d-front","tpage_name":"lgunnorm-pris"}],[189530173,{"idx":61,"name":"intcept-b-teeth01","tpage_name":"desrally-pris"}],[164626573,{"idx":141,"name":"prec-controller-rim","tpage_name":"railcst-pris"}],[206962692,{"idx":4,"name":"cityslumc-purple-column","tpage_name":"lfreeout-tfrag"}],[205717512,{"idx":8,"name":"kg-target-bonus-01","tpage_name":"lgunnorm-pris"}],[189530172,{"idx":60,"name":"intcept-b-pipe01","tpage_name":"desrally-pris"}],[164626572,{"idx":140,"name":"prec-controller-plain","tpage_name":"railcst-pris"}],[206962691,{"idx":3,"name":"ctyslumc-wall-trim-LOW","tpage_name":"lfreeout-tfrag"}],[205717511,{"idx":7,"name":"kg-target-blasted-01","tpage_name":"lgunnorm-pris"}],[189530171,{"idx":59,"name":"intcept-b-gun01","tpage_name":"desrally-pris"}],[164626571,{"idx":139,"name":"prec-controller-dk","tpage_name":"railcst-pris"}],[206962690,{"idx":2,"name":"ctyslumc-window-panes-LOW","tpage_name":"lfreeout-tfrag"}],[205717510,{"idx":6,"name":"kg-target-b-front-01","tpage_name":"lgunnorm-pris"}],[189530170,{"idx":58,"name":"intcept-b-base-patern02","tpage_name":"desrally-pris"}],[164626570,{"idx":138,"name":"prec-controller-but2","tpage_name":"railcst-pris"}],[206962689,{"idx":1,"name":"city-tile-LOW","tpage_name":"lfreeout-tfrag"}],[205717509,{"idx":5,"name":"kg-target-01","tpage_name":"lgunnorm-pris"}],[189530169,{"idx":57,"name":"intcept-b-base-patern01","tpage_name":"desrally-pris"}],[164626569,{"idx":137,"name":"prec-controller-but","tpage_name":"railcst-pris"}],[206962688,{"idx":0,"name":"cityslumc-awning-LOW","tpage_name":"lfreeout-tfrag"}],[205717508,{"idx":4,"name":"gun-dummy-side-a-01","tpage_name":"lgunnorm-pris"}],[189530168,{"idx":56,"name":"intcept-b-base-green01","tpage_name":"desrally-pris"}],[164626568,{"idx":136,"name":"prec-controller-black","tpage_name":"railcst-pris"}],[205717507,{"idx":3,"name":"gun-citd-front-01","tpage_name":"lgunnorm-pris"}],[189530167,{"idx":55,"name":"wstlander-04-skirt","tpage_name":"desrally-pris"}],[164626567,{"idx":135,"name":"prec-insidemouth","tpage_name":"railcst-pris"}],[205717506,{"idx":2,"name":"gun-citc-front-01","tpage_name":"lgunnorm-pris"}],[189530166,{"idx":54,"name":"wstlander-04-shirt-strap","tpage_name":"desrally-pris"}],[164626566,{"idx":134,"name":"prec-tess-shirtstraps","tpage_name":"railcst-pris"}],[205717505,{"idx":1,"name":"gun-citb-front-01","tpage_name":"lgunnorm-pris"}],[189530165,{"idx":53,"name":"wstlander-04-shirt","tpage_name":"desrally-pris"}],[164626565,{"idx":133,"name":"prec-dumb-sleeve","tpage_name":"railcst-pris"}],[205717504,{"idx":0,"name":"gun-cita-front-01","tpage_name":"lgunnorm-pris"}],[189530164,{"idx":52,"name":"wstlander-04-headband","tpage_name":"desrally-pris"}],[164626564,{"idx":132,"name":"prec-dumb-shirt","tpage_name":"railcst-pris"}],[189530163,{"idx":51,"name":"wstlander-04-gun","tpage_name":"desrally-pris"}],[164626563,{"idx":131,"name":"prec-dumb-pants","tpage_name":"railcst-pris"}],[189530162,{"idx":50,"name":"wstlander-04-dark-blue","tpage_name":"desrally-pris"}],[164626562,{"idx":130,"name":"prec-dumb-helmet","tpage_name":"railcst-pris"}],[189530161,{"idx":49,"name":"wstlander-03-flesh","tpage_name":"desrally-pris"}],[164626561,{"idx":129,"name":"eco-lt-cryst-02","tpage_name":"railcst-pris"}],[189530160,{"idx":48,"name":"wstlander-03-eye","tpage_name":"desrally-pris"}],[164626560,{"idx":128,"name":"eco-lt-cryst-01","tpage_name":"railcst-pris"}],[189530159,{"idx":47,"name":"wstlander-02-skirt","tpage_name":"desrally-pris"}],[164626559,{"idx":127,"name":"dark-crystal-knob-02","tpage_name":"railcst-pris"}],[194510878,{"idx":30,"name":"jinx-wraps","tpage_name":"gridcst-pris2"}],[189530158,{"idx":46,"name":"wstlander-02-shirt","tpage_name":"desrally-pris"}],[164626558,{"idx":126,"name":"dark-crystal-knob-01","tpage_name":"railcst-pris"}],[194510861,{"idx":13,"name":"jinx-eyelid","tpage_name":"gridcst-pris2"}],[189530141,{"idx":29,"name":"wstlander-01-leatherstrap","tpage_name":"desrally-pris"}],[164626541,{"idx":109,"name":"torn-handle-01","tpage_name":"railcst-pris"}],[194510860,{"idx":12,"name":"jinx-cigarflame","tpage_name":"gridcst-pris2"}],[189530140,{"idx":28,"name":"wstlander-01-head","tpage_name":"desrally-pris"}],[164626540,{"idx":108,"name":"torn-gunbarrel-02","tpage_name":"railcst-pris"}],[194510859,{"idx":11,"name":"jinx-cigar","tpage_name":"gridcst-pris2"}],[189530139,{"idx":27,"name":"wstlander-01-gunmetal-04","tpage_name":"desrally-pris"}],[164626539,{"idx":107,"name":"torn-gunbarrel","tpage_name":"railcst-pris"}],[194510858,{"idx":10,"name":"jinx-buckles","tpage_name":"gridcst-pris2"}],[189530138,{"idx":26,"name":"wstlander-01-gunmetal-03","tpage_name":"desrally-pris"}],[164626538,{"idx":106,"name":"torn-armor","tpage_name":"railcst-pris"}],[193265666,{"idx":2,"name":"tow-energy-bridge-dest","tpage_name":"towerb-vis-water"}],[189530126,{"idx":14,"name":"vehicle-toad-exhaust-01","tpage_name":"desrally-pris"}],[164626526,{"idx":94,"name":"prec-staff-02","tpage_name":"railcst-pris"}],[189530125,{"idx":13,"name":"vehicle-metal-plate-01","tpage_name":"desrally-pris"}],[164626525,{"idx":93,"name":"prec-staff-01","tpage_name":"railcst-pris"}],[189530124,{"idx":12,"name":"vehicle-gun-box-01","tpage_name":"desrally-pris"}],[164626524,{"idx":92,"name":"prec-orbsmall","tpage_name":"railcst-pris"}],[189530123,{"idx":11,"name":"vehicle-gas-tank-01","tpage_name":"desrally-pris"}],[164626523,{"idx":91,"name":"prec-orblarge","tpage_name":"railcst-pris"}],[189530122,{"idx":10,"name":"vehicle-chrome-pipe-01","tpage_name":"desrally-pris"}],[164626522,{"idx":90,"name":"prec-leader-wrap","tpage_name":"railcst-pris"}],[189530121,{"idx":9,"name":"vehicle-cap-pin-01","tpage_name":"desrally-pris"}],[164626521,{"idx":89,"name":"prec-leader-shirt","tpage_name":"railcst-pris"}],[189530120,{"idx":8,"name":"vehicle-brace-pipe-01","tpage_name":"desrally-pris"}],[164626520,{"idx":88,"name":"prec-leader-robe-02","tpage_name":"railcst-pris"}],[189530119,{"idx":7,"name":"vehicle-body-panel-01","tpage_name":"desrally-pris"}],[164626519,{"idx":87,"name":"prec-leader-pants","tpage_name":"railcst-pris"}],[189530118,{"idx":6,"name":"intcept-tread01","tpage_name":"desrally-pris"}],[164626518,{"idx":86,"name":"prec-leader-frontskirt","tpage_name":"railcst-pris"}],[189530117,{"idx":5,"name":"intcept-teeth01","tpage_name":"desrally-pris"}],[164626517,{"idx":85,"name":"prec-leader-belt","tpage_name":"railcst-pris"}],[189530116,{"idx":4,"name":"intcept-pipe01","tpage_name":"desrally-pris"}],[164626516,{"idx":84,"name":"prec-leader-arm","tpage_name":"railcst-pris"}],[189530115,{"idx":3,"name":"intcept-gun01","tpage_name":"desrally-pris"}],[164626515,{"idx":83,"name":"prec-surfer-sleeve","tpage_name":"railcst-pris"}],[189530114,{"idx":2,"name":"intcept-base-patern02","tpage_name":"desrally-pris"}],[164626514,{"idx":82,"name":"prec-surfer-shirt","tpage_name":"railcst-pris"}],[189530113,{"idx":1,"name":"intcept-base-patern01","tpage_name":"desrally-pris"}],[164626513,{"idx":81,"name":"prec-surfer-sash","tpage_name":"railcst-pris"}],[189530112,{"idx":0,"name":"intcept-base-green01","tpage_name":"desrally-pris"}],[164626512,{"idx":80,"name":"prec-surfer-pants","tpage_name":"railcst-pris"}],[164626511,{"idx":79,"name":"prec-surfer-hairshort","tpage_name":"railcst-pris"}],[164626510,{"idx":78,"name":"prec-surfer-hair","tpage_name":"railcst-pris"}],[164626509,{"idx":77,"name":"prec-surfer-chain-03","tpage_name":"railcst-pris"}],[164626508,{"idx":76,"name":"prec-surfer-chain-02","tpage_name":"railcst-pris"}],[164626507,{"idx":75,"name":"prec-surfer-chain","tpage_name":"railcst-pris"}],[164626506,{"idx":74,"name":"prec-neck","tpage_name":"railcst-pris"}],[164626505,{"idx":73,"name":"prec-leader-armband","tpage_name":"railcst-pris"}],[164626504,{"idx":72,"name":"prec-handpalm","tpage_name":"railcst-pris"}],[164626503,{"idx":71,"name":"prec-hand-back","tpage_name":"railcst-pris"}],[164626491,{"idx":59,"name":"prec-teeth","tpage_name":"railcst-pris"}],[164626490,{"idx":58,"name":"prec-leader-headshield","tpage_name":"railcst-pris"}],[164626489,{"idx":57,"name":"prec-leader-hair","tpage_name":"railcst-pris"}],[164626488,{"idx":56,"name":"prec-leader-foreheadshield","tpage_name":"railcst-pris"}],[164626487,{"idx":55,"name":"prec-leader-face2","tpage_name":"railcst-pris"}],[164626486,{"idx":54,"name":"prec-leader-beard","tpage_name":"railcst-pris"}],[164626485,{"idx":53,"name":"jakchires-teeth","tpage_name":"railcst-pris"}],[164626484,{"idx":52,"name":"jakchires-shoeteop","tpage_name":"railcst-pris"}],[164626483,{"idx":51,"name":"jakchires-shoemetal","tpage_name":"railcst-pris"}],[164626482,{"idx":50,"name":"jakchires-shoebottom","tpage_name":"railcst-pris"}],[164626481,{"idx":49,"name":"jakchires-precarmor-01","tpage_name":"railcst-pris"}],[164626480,{"idx":48,"name":"jakchires-pants","tpage_name":"railcst-pris"}],[164626479,{"idx":47,"name":"jakchires-lightbrownspat","tpage_name":"railcst-pris"}],[164626478,{"idx":46,"name":"jakchires-leatherpouch","tpage_name":"railcst-pris"}],[164626477,{"idx":45,"name":"jakchires-jacket","tpage_name":"railcst-pris"}],[164626476,{"idx":44,"name":"jakchires-horn","tpage_name":"railcst-pris"}],[164626475,{"idx":43,"name":"jakchires-hair","tpage_name":"railcst-pris"}],[164626474,{"idx":42,"name":"jakchires-glovetop","tpage_name":"railcst-pris"}],[164626473,{"idx":41,"name":"jakchires-facert","tpage_name":"railcst-pris"}],[164626472,{"idx":40,"name":"jakchires-facelft","tpage_name":"railcst-pris"}],[164626471,{"idx":39,"name":"jakchires-eyelid","tpage_name":"railcst-pris"}],[164626470,{"idx":38,"name":"jakchires-eyebrow","tpage_name":"railcst-pris"}],[164626469,{"idx":37,"name":"jakchires-eye","tpage_name":"railcst-pris"}],[174587908,{"idx":4,"name":"nst-egg-spider-pipe","tpage_name":"lbbspid-pris"}],[164626468,{"idx":36,"name":"jakchires-clips","tpage_name":"railcst-pris"}],[174587907,{"idx":3,"name":"nst-egg-spider-metal","tpage_name":"lbbspid-pris"}],[164626467,{"idx":35,"name":"jakchires-chestplate","tpage_name":"railcst-pris"}],[174587906,{"idx":2,"name":"nst-egg-spider-eye","tpage_name":"lbbspid-pris"}],[173342726,{"idx":6,"name":"tow-slime-01","tpage_name":"ltowera-vis-shrub"}],[164626466,{"idx":34,"name":"jakchires-brwnleather","tpage_name":"railcst-pris"}],[174587905,{"idx":1,"name":"nst-egg-spider-egg","tpage_name":"lbbspid-pris"}],[173342725,{"idx":5,"name":"tow-eggside-01","tpage_name":"ltowera-vis-shrub"}],[164626465,{"idx":33,"name":"jakchires-brownstrap","tpage_name":"railcst-pris"}],[174587904,{"idx":0,"name":"nst-egg-spider-body","tpage_name":"lbbspid-pris"}],[173342724,{"idx":4,"name":"tow-groundpod","tpage_name":"ltowera-vis-shrub"}],[164626464,{"idx":32,"name":"jakchires-blackstrap","tpage_name":"railcst-pris"}],[173342723,{"idx":3,"name":"tow-wall-supports","tpage_name":"ltowera-vis-shrub"}],[164626463,{"idx":31,"name":"jakchires-arm","tpage_name":"railcst-pris"}],[164626462,{"idx":30,"name":"jakc-wristband-a2","tpage_name":"railcst-pris"}],[164495365,{"idx":5,"name":"rub-water-wave-01-dest","tpage_name":"rubblea2-vis-water"}],[164495363,{"idx":3,"name":"rub-water-desta2","tpage_name":"rubblea2-vis-water"}],[164495362,{"idx":2,"name":"rub-watera2","tpage_name":"rubblea2-vis-water"}],[164495361,{"idx":1,"name":"rub-dirt-a","tpage_name":"rubblea2-vis-water"}],[164429837,{"idx":13,"name":"rub-stain-01","tpage_name":"rubblea2-vis-shrub"}],[164429836,{"idx":12,"name":"rub-overlay-bullethole-c","tpage_name":"rubblea2-vis-shrub"}],[164429835,{"idx":11,"name":"rub-shrub-cattail","tpage_name":"rubblea2-vis-shrub"}],[164429830,{"idx":6,"name":"rub-ground-01-small","tpage_name":"rubblea2-vis-shrub"}],[164429829,{"idx":5,"name":"rub-crater-shards-01","tpage_name":"rubblea2-vis-shrub"}],[164429828,{"idx":4,"name":"rub-shrub-grass","tpage_name":"rubblea2-vis-shrub"}],[164429827,{"idx":3,"name":"rub-met-strp-close","tpage_name":"rubblea2-vis-shrub"}],[164429826,{"idx":2,"name":"rub-wall-small-grill","tpage_name":"rubblea2-vis-shrub"}],[164429825,{"idx":1,"name":"rub-beam-gen","tpage_name":"rubblea2-vis-shrub"}],[164429824,{"idx":0,"name":"rub-greyblue-plain-lowres","tpage_name":"rubblea2-vis-shrub"}],[184287234,{"idx":2,"name":"preship-metal-window-01","tpage_name":"loutro-shrub"}],[176816154,{"idx":26,"name":"ecocreature-joint","tpage_name":"towera-pris"}],[174325794,{"idx":34,"name":"jakchires-chestplate","tpage_name":"ldesgcst-pris"}],[164364354,{"idx":66,"name":"rub-cement-top","tpage_name":"rubblea2-vis-tfrag"}],[173867011,{"idx":3,"name":"dash01","tpage_name":"ltowerb-vis-pris"}],[163905571,{"idx":35,"name":"rail-trim-01","tpage_name":"raila-pris"}],[173867010,{"idx":2,"name":"bam-hairhilite","tpage_name":"ltowerb-vis-pris"}],[163905570,{"idx":34,"name":"rail-detail-01","tpage_name":"raila-pris"}],[173867009,{"idx":1,"name":"bam-eyelight","tpage_name":"ltowerb-vis-pris"}],[163905569,{"idx":33,"name":"rail-pipe-01","tpage_name":"raila-pris"}],[173867008,{"idx":0,"name":"backThing01","tpage_name":"ltowerb-vis-pris"}],[163905568,{"idx":32,"name":"rail-edge-01","tpage_name":"raila-pris"}],[163905567,{"idx":31,"name":"rail-cord-01","tpage_name":"raila-pris"}],[171376645,{"idx":5,"name":"lightjak-wings-v-src","tpage_name":"templea-vis-water"}],[163905565,{"idx":29,"name":"rail-pipe-03","tpage_name":"raila-pris"}],[172621824,{"idx":0,"name":"precur-tube-joint-01","tpage_name":"precura-vis-shrub"}],[171376644,{"idx":4,"name":"lightjak-wings-u-src","tpage_name":"templea-vis-water"}],[163905564,{"idx":28,"name":"rail-light-red","tpage_name":"raila-pris"}],[171376641,{"idx":1,"name":"templea-waterfall-dest","tpage_name":"templea-vis-water"}],[163905561,{"idx":25,"name":"rail-env-wall-01","tpage_name":"raila-pris"}],[170131456,{"idx":0,"name":"bam-eyelight","tpage_name":"outrocst-pris"}],[163905556,{"idx":20,"name":"rail-base-mid-01","tpage_name":"raila-pris"}],[170459140,{"idx":4,"name":"daxter-orange","tpage_name":"ljkdxvin-pris"}],[162988060,{"idx":28,"name":"comb-env2","tpage_name":"railb-tfrag"}],[170459139,{"idx":3,"name":"daxter-furhilite","tpage_name":"ljkdxvin-pris"}],[162988059,{"idx":27,"name":"rail-env-wall-01","tpage_name":"railb-tfrag"}],[170459138,{"idx":2,"name":"daxter-eyelid","tpage_name":"ljkdxvin-pris"}],[162988058,{"idx":26,"name":"comb-pipe2","tpage_name":"railb-tfrag"}],[170459137,{"idx":1,"name":"bam-hairhilite","tpage_name":"ljkdxvin-pris"}],[162988057,{"idx":25,"name":"rail-light-red","tpage_name":"railb-tfrag"}],[170459136,{"idx":0,"name":"bam-eyelight","tpage_name":"ljkdxvin-pris"}],[162988056,{"idx":24,"name":"comb-ring","tpage_name":"railb-tfrag"}],[162988055,{"idx":23,"name":"rail-pipe-02","tpage_name":"railb-tfrag"}],[162988054,{"idx":22,"name":"rail-pipe-05","tpage_name":"railb-tfrag"}],[162988053,{"idx":21,"name":"comb-redmarker","tpage_name":"railb-tfrag"}],[162988052,{"idx":20,"name":"rail-trim-01","tpage_name":"railb-tfrag"}],[162988051,{"idx":19,"name":"rail-light-yellow","tpage_name":"railb-tfrag"}],[162988050,{"idx":18,"name":"rail-light-yellow-small","tpage_name":"railb-tfrag"}],[162988049,{"idx":17,"name":"rail-env-car-01","tpage_name":"railb-tfrag"}],[162988048,{"idx":16,"name":"rail-rock-01","tpage_name":"railb-tfrag"}],[162988047,{"idx":15,"name":"rail-pipe-03","tpage_name":"railb-tfrag"}],[162988046,{"idx":14,"name":"rail-pipe-01","tpage_name":"railb-tfrag"}],[162988045,{"idx":13,"name":"rail-cord-01","tpage_name":"railb-tfrag"}],[162988044,{"idx":12,"name":"rail-detail-01","tpage_name":"railb-tfrag"}],[162988043,{"idx":11,"name":"rail-light-blue-small","tpage_name":"railb-tfrag"}],[162988042,{"idx":10,"name":"rail-gray-metal-01","tpage_name":"railb-tfrag"}],[162988041,{"idx":9,"name":"rail-base-dark-01","tpage_name":"railb-tfrag"}],[162988040,{"idx":8,"name":"rail-base-mid-01","tpage_name":"railb-tfrag"}],[162988039,{"idx":7,"name":"rail-edge-01","tpage_name":"railb-tfrag"}],[162988038,{"idx":6,"name":"rail-light-blue","tpage_name":"railb-tfrag"}],[162988037,{"idx":5,"name":"rail-patch-01","tpage_name":"railb-tfrag"}],[162988035,{"idx":3,"name":"comb-temp-glass","tpage_name":"railb-tfrag"}],[162988034,{"idx":2,"name":"comb-temp-dark","tpage_name":"railb-tfrag"}],[171638786,{"idx":2,"name":"comb-plate-02","tpage_name":"templed-vis-tfrag"}],[162922526,{"idx":30,"name":"rail-env-wall-01","tpage_name":"raild-tfrag"}],[171638784,{"idx":0,"name":"comb-temp-dark","tpage_name":"templed-vis-tfrag"}],[162922524,{"idx":28,"name":"rail-tread-01","tpage_name":"raild-tfrag"}],[162922523,{"idx":27,"name":"comb-ring","tpage_name":"raild-tfrag"}],[162922522,{"idx":26,"name":"rail-fit-01","tpage_name":"raild-tfrag"}],[162922521,{"idx":25,"name":"rail-pipe-02","tpage_name":"raild-tfrag"}],[162922520,{"idx":24,"name":"rail-light-yellow-small","tpage_name":"raild-tfrag"}],[162922518,{"idx":22,"name":"rail-light-red","tpage_name":"raild-tfrag"}],[162922517,{"idx":21,"name":"rail-light-yellow","tpage_name":"raild-tfrag"}],[162922516,{"idx":20,"name":"comb-redmarker","tpage_name":"raild-tfrag"}],[162922515,{"idx":19,"name":"rail-rock-01","tpage_name":"raild-tfrag"}],[162922514,{"idx":18,"name":"rail-pipe-05","tpage_name":"raild-tfrag"}],[162922513,{"idx":17,"name":"rail-gray-metal-01","tpage_name":"raild-tfrag"}],[162922512,{"idx":16,"name":"rail-light-blue","tpage_name":"raild-tfrag"}],[162922511,{"idx":15,"name":"rail-pipe-03","tpage_name":"raild-tfrag"}],[162922510,{"idx":14,"name":"rail-pipe-01","tpage_name":"raild-tfrag"}],[162922509,{"idx":13,"name":"rail-cord-01","tpage_name":"raild-tfrag"}],[162922508,{"idx":12,"name":"rail-detail-01","tpage_name":"raild-tfrag"}],[162922507,{"idx":11,"name":"rail-env-car-01","tpage_name":"raild-tfrag"}],[162922505,{"idx":9,"name":"rail-base-dark-01","tpage_name":"raild-tfrag"}],[162922504,{"idx":8,"name":"rail-base-mid-01","tpage_name":"raild-tfrag"}],[162922503,{"idx":7,"name":"rail-edge-01","tpage_name":"raild-tfrag"}],[162922502,{"idx":6,"name":"rail-light-blue-small","tpage_name":"raild-tfrag"}],[162922501,{"idx":5,"name":"rail-patch-01","tpage_name":"raild-tfrag"}],[162922500,{"idx":4,"name":"rail-trim-01","tpage_name":"raild-tfrag"}],[162922498,{"idx":2,"name":"comb-temp-glass","tpage_name":"raild-tfrag"}],[162922497,{"idx":1,"name":"comb-temp-dark","tpage_name":"raild-tfrag"}],[162791453,{"idx":29,"name":"rail-fit-01","tpage_name":"railc-tfrag"}],[162791452,{"idx":28,"name":"comb-ring","tpage_name":"railc-tfrag"}],[162791451,{"idx":27,"name":"rail-pipe-02","tpage_name":"railc-tfrag"}],[170262530,{"idx":2,"name":"dust-sparkle","tpage_name":"stadiuma-sprite"}],[162791450,{"idx":26,"name":"rail-light-red","tpage_name":"railc-tfrag"}],[162791449,{"idx":25,"name":"rail-pipe-05","tpage_name":"railc-tfrag"}],[170262528,{"idx":0,"name":"missile-target-01","tpage_name":"stadiuma-sprite"}],[162791448,{"idx":24,"name":"rail-light-yellow","tpage_name":"railc-tfrag"}],[162791447,{"idx":23,"name":"comb-redmarker","tpage_name":"railc-tfrag"}],[162791446,{"idx":22,"name":"rail-env-wall-01","tpage_name":"railc-tfrag"}],[162791445,{"idx":21,"name":"rail-rock-01","tpage_name":"railc-tfrag"}],[162791444,{"idx":20,"name":"rail-light-yellow-small","tpage_name":"railc-tfrag"}],[162791443,{"idx":19,"name":"rail-tread-01","tpage_name":"railc-tfrag"}],[162791442,{"idx":18,"name":"rail-trim-01","tpage_name":"railc-tfrag"}],[162791441,{"idx":17,"name":"rail-pipe-03","tpage_name":"railc-tfrag"}],[162791440,{"idx":16,"name":"rail-pipe-01","tpage_name":"railc-tfrag"}],[162791439,{"idx":15,"name":"rail-cord-01","tpage_name":"railc-tfrag"}],[162791438,{"idx":14,"name":"rail-detail-01","tpage_name":"railc-tfrag"}],[162791437,{"idx":13,"name":"rail-light-blue-small","tpage_name":"railc-tfrag"}],[162791436,{"idx":12,"name":"rail-gray-metal-01","tpage_name":"railc-tfrag"}],[170196994,{"idx":2,"name":"ashelin-boottop","tpage_name":"outrocst-pris2"}],[162725914,{"idx":26,"name":"comb-env2","tpage_name":"railf-tfrag"}],[170196993,{"idx":1,"name":"ashelin-bolts","tpage_name":"outrocst-pris2"}],[162725913,{"idx":25,"name":"comb-pipe2","tpage_name":"railf-tfrag"}],[162725891,{"idx":3,"name":"rail-light-yellow-small","tpage_name":"railf-tfrag"}],[162725890,{"idx":2,"name":"rail-light-blue","tpage_name":"railf-tfrag"}],[162725889,{"idx":1,"name":"rail-base-dark-01","tpage_name":"railf-tfrag"}],[176816148,{"idx":20,"name":"dp-bipedal-toe-01","tpage_name":"towera-pris"}],[174325788,{"idx":28,"name":"jakc-wraps","tpage_name":"ldesgcst-pris"}],[164364348,{"idx":60,"name":"rub-elec-switch-light-off","tpage_name":"rubblea2-vis-tfrag"}],[159383628,{"idx":76,"name":"keira-torch-nozzle-02","tpage_name":"slumbset-pris"}],[176816147,{"idx":19,"name":"dp-bipedal-spine-01","tpage_name":"towera-pris"}],[174325787,{"idx":27,"name":"jakc-waistband2","tpage_name":"ldesgcst-pris"}],[164364347,{"idx":59,"name":"rub-elec-switch-light-on","tpage_name":"rubblea2-vis-tfrag"}],[159383627,{"idx":75,"name":"keira-torch-nozzle-01","tpage_name":"slumbset-pris"}],[176816146,{"idx":18,"name":"dp-bipedal-skin-ribs-01","tpage_name":"towera-pris"}],[174325786,{"idx":26,"name":"jakc-skirt","tpage_name":"ldesgcst-pris"}],[164364346,{"idx":58,"name":"rub-copper-metal-01","tpage_name":"rubblea2-vis-tfrag"}],[159383626,{"idx":74,"name":"keira-torch-guard-01","tpage_name":"slumbset-pris"}],[176816145,{"idx":17,"name":"dp-bipedal-skin-plate-small-01","tpage_name":"towera-pris"}],[174325785,{"idx":25,"name":"jakc-scarfhanging","tpage_name":"ldesgcst-pris"}],[164364345,{"idx":57,"name":"rub-lamp-light-01","tpage_name":"rubblea2-vis-tfrag"}],[159383625,{"idx":73,"name":"keira-shoebottom","tpage_name":"slumbset-pris"}],[176816144,{"idx":16,"name":"dp-bipedal-skin-plate-01","tpage_name":"towera-pris"}],[174325784,{"idx":24,"name":"jakc-scarf","tpage_name":"ldesgcst-pris"}],[164364344,{"idx":56,"name":"rub-lamp-fencespike-round","tpage_name":"rubblea2-vis-tfrag"}],[159383624,{"idx":72,"name":"keira-shirt","tpage_name":"slumbset-pris"}],[176816143,{"idx":15,"name":"dp-bipedal-skin-bulge-02","tpage_name":"towera-pris"}],[174325783,{"idx":23,"name":"jakc-lens","tpage_name":"ldesgcst-pris"}],[159383623,{"idx":71,"name":"keira-pantslarge","tpage_name":"slumbset-pris"}],[176816142,{"idx":14,"name":"dp-bipedal-skin-bulge-01","tpage_name":"towera-pris"}],[174325782,{"idx":22,"name":"jakc-gogglemetal","tpage_name":"ldesgcst-pris"}],[159383622,{"idx":70,"name":"keira-maskbolt","tpage_name":"slumbset-pris"}],[179306501,{"idx":5,"name":"hud-small-frame-02","tpage_name":"factoryd-minimap"}],[176816141,{"idx":13,"name":"dp-bipedal-power-hose","tpage_name":"towera-pris"}],[174325781,{"idx":21,"name":"jakc-chestplate-straps","tpage_name":"ldesgcst-pris"}],[159383621,{"idx":69,"name":"keira-lens-large","tpage_name":"slumbset-pris"}],[179306500,{"idx":4,"name":"hud-small-frame-01","tpage_name":"factoryd-minimap"}],[176816140,{"idx":12,"name":"dp-bipedal-nose-01","tpage_name":"towera-pris"}],[174325780,{"idx":20,"name":"jakc-armor","tpage_name":"ldesgcst-pris"}],[159383620,{"idx":68,"name":"keira-largewraps","tpage_name":"slumbset-pris"}],[179306499,{"idx":3,"name":"hud-mhcentipede-meter-01","tpage_name":"factoryd-minimap"}],[176816139,{"idx":11,"name":"dp-bipedal-finger-plate-01","tpage_name":"towera-pris"}],[174325779,{"idx":19,"name":"environment-oldmetal","tpage_name":"ldesgcst-pris"}],[159383619,{"idx":67,"name":"keira-iris-64x64","tpage_name":"slumbset-pris"}],[176816138,{"idx":10,"name":"dp-bipedal-eye-01","tpage_name":"towera-pris"}],[174325778,{"idx":18,"name":"daxtertuft","tpage_name":"ldesgcst-pris"}],[159383618,{"idx":66,"name":"keira-handtop","tpage_name":"slumbset-pris"}],[179306497,{"idx":1,"name":"hud-errol-02","tpage_name":"factoryd-minimap"}],[176816137,{"idx":9,"name":"dp-bipedal-dk-stomach-plate-01","tpage_name":"towera-pris"}],[174325777,{"idx":17,"name":"daxterteeth","tpage_name":"ldesgcst-pris"}],[159383617,{"idx":65,"name":"keira-handbottom","tpage_name":"slumbset-pris"}],[179306496,{"idx":0,"name":"hud-errol-01","tpage_name":"factoryd-minimap"}],[176816136,{"idx":8,"name":"dp-bipedal-dk-sm-plate-01","tpage_name":"towera-pris"}],[174325776,{"idx":16,"name":"daxternose","tpage_name":"ldesgcst-pris"}],[164364336,{"idx":48,"name":"rub-rock-small","tpage_name":"rubblea2-vis-tfrag"}],[159383616,{"idx":64,"name":"keira-hair-newest","tpage_name":"slumbset-pris"}],[176816135,{"idx":7,"name":"dp-bipedal-dk-plate-04","tpage_name":"towera-pris"}],[174325775,{"idx":15,"name":"daxterlense","tpage_name":"ldesgcst-pris"}],[164364335,{"idx":47,"name":"rub-window-02","tpage_name":"rubblea2-vis-tfrag"}],[159383615,{"idx":63,"name":"keira-gogglestrap","tpage_name":"slumbset-pris"}],[176816134,{"idx":6,"name":"dp-bipedal-dk-plate-03","tpage_name":"towera-pris"}],[174325774,{"idx":14,"name":"daxterhelmetplain","tpage_name":"ldesgcst-pris"}],[171835414,{"idx":22,"name":"timemap-wordborder","tpage_name":"templed-vis-pris"}],[164364334,{"idx":46,"name":"rub-roof-tile","tpage_name":"rubblea2-vis-tfrag"}],[159383614,{"idx":62,"name":"keira-glovenewlarge","tpage_name":"slumbset-pris"}],[176816133,{"idx":5,"name":"dp-bipedal-dk-plate-02","tpage_name":"towera-pris"}],[174325773,{"idx":13,"name":"daxterheadwidenew","tpage_name":"ldesgcst-pris"}],[171835413,{"idx":21,"name":"timemap-smallball-02","tpage_name":"templed-vis-pris"}],[164364333,{"idx":45,"name":"rub-grass-fringe","tpage_name":"rubblea2-vis-tfrag"}],[159383613,{"idx":61,"name":"keira-glasses","tpage_name":"slumbset-pris"}],[176816132,{"idx":4,"name":"dp-bipedal-dk-plate-01","tpage_name":"towera-pris"}],[174325772,{"idx":12,"name":"daxtergoggles","tpage_name":"ldesgcst-pris"}],[171835412,{"idx":20,"name":"timemap-smallball-01","tpage_name":"templed-vis-pris"}],[164364332,{"idx":44,"name":"rub-cement-broken-end","tpage_name":"rubblea2-vis-tfrag"}],[159383612,{"idx":60,"name":"keira-face","tpage_name":"slumbset-pris"}],[176816131,{"idx":3,"name":"dp-bipedal-dk-hose-01","tpage_name":"towera-pris"}],[174325771,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"ldesgcst-pris"}],[171835411,{"idx":19,"name":"timemap-precmetal-teeth","tpage_name":"templed-vis-pris"}],[164364331,{"idx":43,"name":"rub-wallrock-dirt","tpage_name":"rubblea2-vis-tfrag"}],[159383611,{"idx":59,"name":"keira-eyelid","tpage_name":"slumbset-pris"}],[176816130,{"idx":2,"name":"dp-bipedal-chest-01","tpage_name":"towera-pris"}],[174325770,{"idx":10,"name":"daxterfoot","tpage_name":"ldesgcst-pris"}],[171835410,{"idx":18,"name":"timemap-precmetal-plain-large","tpage_name":"templed-vis-pris"}],[164364330,{"idx":42,"name":"rub-stream-rocks","tpage_name":"rubblea2-vis-tfrag"}],[159383610,{"idx":58,"name":"keira-chokermetal","tpage_name":"slumbset-pris"}],[176816129,{"idx":1,"name":"dp-bipedal-backhand-01","tpage_name":"towera-pris"}],[174325769,{"idx":9,"name":"daxterfinger","tpage_name":"ldesgcst-pris"}],[171835409,{"idx":17,"name":"timemap-precmetal-feet","tpage_name":"templed-vis-pris"}],[164364329,{"idx":41,"name":"rub-grass","tpage_name":"rubblea2-vis-tfrag"}],[159383609,{"idx":57,"name":"keira-chokerhighres","tpage_name":"slumbset-pris"}],[176816128,{"idx":0,"name":"common-black","tpage_name":"towera-pris"}],[174325768,{"idx":8,"name":"daxterear","tpage_name":"ldesgcst-pris"}],[171835408,{"idx":16,"name":"timemap-notchborder","tpage_name":"templed-vis-pris"}],[164364328,{"idx":40,"name":"rub-wall-side-beam","tpage_name":"rubblea2-vis-tfrag"}],[159383608,{"idx":56,"name":"keira-brownstraps-new","tpage_name":"slumbset-pris"}],[174325767,{"idx":7,"name":"daxterbolt","tpage_name":"ldesgcst-pris"}],[171835407,{"idx":15,"name":"timemap-centerball","tpage_name":"templed-vis-pris"}],[164364327,{"idx":39,"name":"rub-metal-01","tpage_name":"rubblea2-vis-tfrag"}],[159383607,{"idx":55,"name":"keira-blackstrap","tpage_name":"slumbset-pris"}],[174325766,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"ldesgcst-pris"}],[171835406,{"idx":14,"name":"timemap-ball-precmetal","tpage_name":"templed-vis-pris"}],[164364326,{"idx":38,"name":"rub-wall-gen-06","tpage_name":"rubblea2-vis-tfrag"}],[159383606,{"idx":54,"name":"keira-belt","tpage_name":"slumbset-pris"}],[174325765,{"idx":5,"name":"daxterarm","tpage_name":"ldesgcst-pris"}],[164364325,{"idx":37,"name":"rub-cement-a","tpage_name":"rubblea2-vis-tfrag"}],[159383605,{"idx":53,"name":"keira-bellylong","tpage_name":"slumbset-pris"}],[174325764,{"idx":4,"name":"daxter-orange","tpage_name":"ldesgcst-pris"}],[164364324,{"idx":36,"name":"rub-metal-pipeside-01","tpage_name":"rubblea2-vis-tfrag"}],[159383604,{"idx":52,"name":"jakchires-teeth","tpage_name":"slumbset-pris"}],[174325763,{"idx":3,"name":"daxter-furhilite","tpage_name":"ldesgcst-pris"}],[164364323,{"idx":35,"name":"rub-dirt-a","tpage_name":"rubblea2-vis-tfrag"}],[159383603,{"idx":51,"name":"jakchires-shoeteop","tpage_name":"slumbset-pris"}],[174325762,{"idx":2,"name":"daxter-eyelid","tpage_name":"ldesgcst-pris"}],[164364322,{"idx":34,"name":"rub-copper-metal-02","tpage_name":"rubblea2-vis-tfrag"}],[159383602,{"idx":50,"name":"jakchires-shoemetal","tpage_name":"slumbset-pris"}],[174325761,{"idx":1,"name":"bam-hairhilite","tpage_name":"ldesgcst-pris"}],[164364321,{"idx":33,"name":"rub-statue-stone-01","tpage_name":"rubblea2-vis-tfrag"}],[159383601,{"idx":49,"name":"jakchires-shoebottom","tpage_name":"slumbset-pris"}],[174325760,{"idx":0,"name":"bam-eyelight","tpage_name":"ldesgcst-pris"}],[164364320,{"idx":32,"name":"rub-ground","tpage_name":"rubblea2-vis-tfrag"}],[159383600,{"idx":48,"name":"jakchires-precarmor-01","tpage_name":"slumbset-pris"}],[164364319,{"idx":31,"name":"rub-butress-metal-02","tpage_name":"rubblea2-vis-tfrag"}],[159383599,{"idx":47,"name":"jakchires-pants","tpage_name":"slumbset-pris"}],[164364318,{"idx":30,"name":"rub-butress-metal-01","tpage_name":"rubblea2-vis-tfrag"}],[159383598,{"idx":46,"name":"jakchires-lightbrownspat","tpage_name":"slumbset-pris"}],[164364317,{"idx":29,"name":"rub-supportmetall","tpage_name":"rubblea2-vis-tfrag"}],[159383597,{"idx":45,"name":"jakchires-leatherpouch","tpage_name":"slumbset-pris"}],[164364316,{"idx":28,"name":"rub-metal-wallgrill","tpage_name":"rubblea2-vis-tfrag"}],[159383596,{"idx":44,"name":"jakchires-jacket","tpage_name":"slumbset-pris"}],[164364315,{"idx":27,"name":"rub-endblocks","tpage_name":"rubblea2-vis-tfrag"}],[159383595,{"idx":43,"name":"jakchires-horn","tpage_name":"slumbset-pris"}],[164364314,{"idx":26,"name":"rub-city-wall-main","tpage_name":"rubblea2-vis-tfrag"}],[159383594,{"idx":42,"name":"jakchires-hair","tpage_name":"slumbset-pris"}],[165609493,{"idx":21,"name":"dm-missle-tip-glow-01","tpage_name":"wasdefen-pris"}],[164364313,{"idx":25,"name":"rub-city-wall-bottom-frame","tpage_name":"rubblea2-vis-tfrag"}],[159383593,{"idx":41,"name":"jakchires-glovetop","tpage_name":"slumbset-pris"}],[165609492,{"idx":20,"name":"dm-missle-tubes","tpage_name":"wasdefen-pris"}],[159383592,{"idx":40,"name":"jakchires-facert","tpage_name":"slumbset-pris"}],[165609491,{"idx":19,"name":"dm-missle-tip","tpage_name":"wasdefen-pris"}],[159383591,{"idx":39,"name":"jakchires-facelft","tpage_name":"slumbset-pris"}],[165609490,{"idx":18,"name":"dm-missle-body","tpage_name":"wasdefen-pris"}],[159383590,{"idx":38,"name":"jakchires-eyelid","tpage_name":"slumbset-pris"}],[165609489,{"idx":17,"name":"dp-robot-tentacle-01","tpage_name":"wasdefen-pris"}],[159383589,{"idx":37,"name":"jakchires-eyebrow","tpage_name":"slumbset-pris"}],[165609488,{"idx":16,"name":"dp-robot-pipe-01","tpage_name":"wasdefen-pris"}],[164364308,{"idx":20,"name":"rub-palshaft-dirt-blue-01","tpage_name":"rubblea2-vis-tfrag"}],[159383588,{"idx":36,"name":"jakchires-eye","tpage_name":"slumbset-pris"}],[165609487,{"idx":15,"name":"dp-robot-panel-06","tpage_name":"wasdefen-pris"}],[164364307,{"idx":19,"name":"rub-citywall","tpage_name":"rubblea2-vis-tfrag"}],[159383587,{"idx":35,"name":"jakchires-clips","tpage_name":"slumbset-pris"}],[165609486,{"idx":14,"name":"dp-robot-panel-02","tpage_name":"wasdefen-pris"}],[164364306,{"idx":18,"name":"rub-city-wall-frame","tpage_name":"rubblea2-vis-tfrag"}],[159383586,{"idx":34,"name":"jakchires-chestplate","tpage_name":"slumbset-pris"}],[165609485,{"idx":13,"name":"dp-robot-hull-04","tpage_name":"wasdefen-pris"}],[164364305,{"idx":17,"name":"rub-stone-05","tpage_name":"rubblea2-vis-tfrag"}],[159383585,{"idx":33,"name":"jakchires-brwnleather","tpage_name":"slumbset-pris"}],[165609484,{"idx":12,"name":"dp-robot-hull-02","tpage_name":"wasdefen-pris"}],[164364304,{"idx":16,"name":"rub-roof-support","tpage_name":"rubblea2-vis-tfrag"}],[159383584,{"idx":32,"name":"jakchires-brownstrap","tpage_name":"slumbset-pris"}],[165609483,{"idx":11,"name":"dp-robot-hull-01","tpage_name":"wasdefen-pris"}],[164364303,{"idx":15,"name":"rub-rock","tpage_name":"rubblea2-vis-tfrag"}],[159383583,{"idx":31,"name":"jakchires-blackstrap","tpage_name":"slumbset-pris"}],[165609482,{"idx":10,"name":"dp-robot-hex-pattern-01","tpage_name":"wasdefen-pris"}],[164364302,{"idx":14,"name":"rub-wall-gen-01","tpage_name":"rubblea2-vis-tfrag"}],[159383582,{"idx":30,"name":"jakchires-arm","tpage_name":"slumbset-pris"}],[165609481,{"idx":9,"name":"dp-robot-globe-joint","tpage_name":"wasdefen-pris"}],[164364301,{"idx":13,"name":"rub-met-strp-close","tpage_name":"rubblea2-vis-tfrag"}],[159383581,{"idx":29,"name":"jakc-wristband-a2","tpage_name":"slumbset-pris"}],[165609480,{"idx":8,"name":"dp-robot-eyes","tpage_name":"wasdefen-pris"}],[164364300,{"idx":12,"name":"rub-wall-gen-02","tpage_name":"rubblea2-vis-tfrag"}],[159383580,{"idx":28,"name":"jakc-wraps","tpage_name":"slumbset-pris"}],[165609479,{"idx":7,"name":"dp-robot-cable-01","tpage_name":"wasdefen-pris"}],[164364299,{"idx":11,"name":"rub-wall-gen-04","tpage_name":"rubblea2-vis-tfrag"}],[159383579,{"idx":27,"name":"jakc-waistband2","tpage_name":"slumbset-pris"}],[165609478,{"idx":6,"name":"dp-robot-tendons-01","tpage_name":"wasdefen-pris"}],[164364298,{"idx":10,"name":"rub-panels-01","tpage_name":"rubblea2-vis-tfrag"}],[159383578,{"idx":26,"name":"jakc-skirt","tpage_name":"slumbset-pris"}],[165609477,{"idx":5,"name":"dp-robot-rim-01","tpage_name":"wasdefen-pris"}],[164364297,{"idx":9,"name":"rub-palace-tower-side","tpage_name":"rubblea2-vis-tfrag"}],[159383577,{"idx":25,"name":"jakc-scarfhanging","tpage_name":"slumbset-pris"}],[165609476,{"idx":4,"name":"dp-robot-panel-05","tpage_name":"wasdefen-pris"}],[164364296,{"idx":8,"name":"rub-city-wall-inside-damaged","tpage_name":"rubblea2-vis-tfrag"}],[159383576,{"idx":24,"name":"jakc-scarf","tpage_name":"slumbset-pris"}],[165609475,{"idx":3,"name":"dp-robot-panel-03","tpage_name":"wasdefen-pris"}],[164364295,{"idx":7,"name":"rub-wall-side-beam-02","tpage_name":"rubblea2-vis-tfrag"}],[159383575,{"idx":23,"name":"jakc-lens","tpage_name":"slumbset-pris"}],[165609474,{"idx":2,"name":"dp-robot-leg-hull-01","tpage_name":"wasdefen-pris"}],[164364294,{"idx":6,"name":"rub-wall-trim","tpage_name":"rubblea2-vis-tfrag"}],[159383574,{"idx":22,"name":"jakc-gogglemetal","tpage_name":"slumbset-pris"}],[165609473,{"idx":1,"name":"dp-robot-hull-03","tpage_name":"wasdefen-pris"}],[164364293,{"idx":5,"name":"rub-rubble-01","tpage_name":"rubblea2-vis-tfrag"}],[159383573,{"idx":21,"name":"jakc-chestplate-straps","tpage_name":"slumbset-pris"}],[165609472,{"idx":0,"name":"environment-darkprec","tpage_name":"wasdefen-pris"}],[159383572,{"idx":20,"name":"jakc-armor","tpage_name":"slumbset-pris"}],[164364291,{"idx":3,"name":"rub-metal-flatpipe-01","tpage_name":"rubblea2-vis-tfrag"}],[159383571,{"idx":19,"name":"environment-oldmetal","tpage_name":"slumbset-pris"}],[159383570,{"idx":18,"name":"daxtertuft","tpage_name":"slumbset-pris"}],[164364289,{"idx":1,"name":"rub-beam-gen","tpage_name":"rubblea2-vis-tfrag"}],[159383569,{"idx":17,"name":"daxterteeth","tpage_name":"slumbset-pris"}],[164364288,{"idx":0,"name":"rub-wall-gen-03","tpage_name":"rubblea2-vis-tfrag"}],[159383568,{"idx":16,"name":"daxternose","tpage_name":"slumbset-pris"}],[159383567,{"idx":15,"name":"daxterlense","tpage_name":"slumbset-pris"}],[159383566,{"idx":14,"name":"daxterhelmetplain","tpage_name":"slumbset-pris"}],[159383565,{"idx":13,"name":"daxterheadwidenew","tpage_name":"slumbset-pris"}],[159383564,{"idx":12,"name":"daxtergoggles","tpage_name":"slumbset-pris"}],[159383563,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"slumbset-pris"}],[159383562,{"idx":10,"name":"daxterfoot","tpage_name":"slumbset-pris"}],[159383561,{"idx":9,"name":"daxterfinger","tpage_name":"slumbset-pris"}],[159383560,{"idx":8,"name":"daxterear","tpage_name":"slumbset-pris"}],[159383559,{"idx":7,"name":"daxterbolt","tpage_name":"slumbset-pris"}],[159383558,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"slumbset-pris"}],[159383557,{"idx":5,"name":"daxterarm","tpage_name":"slumbset-pris"}],[159383556,{"idx":4,"name":"daxter-orange","tpage_name":"slumbset-pris"}],[159383555,{"idx":3,"name":"daxter-furhilite","tpage_name":"slumbset-pris"}],[159383554,{"idx":2,"name":"daxter-eyelid","tpage_name":"slumbset-pris"}],[159383553,{"idx":1,"name":"bam-hairhilite","tpage_name":"slumbset-pris"}],[159383552,{"idx":0,"name":"bam-eyelight","tpage_name":"slumbset-pris"}],[159318050,{"idx":34,"name":"rail-pipe-05","tpage_name":"comba-tfrag"}],[159318049,{"idx":33,"name":"rail-pipe-02","tpage_name":"comba-tfrag"}],[159318048,{"idx":32,"name":"rail-gray-metal-01","tpage_name":"comba-tfrag"}],[159318047,{"idx":31,"name":"comb-redmarker","tpage_name":"comba-tfrag"}],[159318045,{"idx":29,"name":"rail-cord-01","tpage_name":"comba-tfrag"}],[159318044,{"idx":28,"name":"rail-pipe-03","tpage_name":"comba-tfrag"}],[159318043,{"idx":27,"name":"rail-edge-01","tpage_name":"comba-tfrag"}],[159318042,{"idx":26,"name":"comb-yell-light","tpage_name":"comba-tfrag"}],[159318041,{"idx":25,"name":"comb-env2","tpage_name":"comba-tfrag"}],[159318040,{"idx":24,"name":"comb-grate","tpage_name":"comba-tfrag"}],[159318033,{"idx":17,"name":"comb-pipe","tpage_name":"comba-tfrag"}],[159252482,{"idx":2,"name":"ctyslumb-fountain-fall-dest","tpage_name":"slumbset-water"}],[159252481,{"idx":1,"name":"keira-mask","tpage_name":"slumbset-water"}],[159252480,{"idx":0,"name":"ctyslumb-water-dest","tpage_name":"slumbset-water"}],[159186952,{"idx":8,"name":"ctyslumc-wire","tpage_name":"slumbset-shrub"}],[159186951,{"idx":7,"name":"ctyslumc-light","tpage_name":"slumbset-shrub"}],[159186950,{"idx":6,"name":"ctyslumc-wall","tpage_name":"slumbset-shrub"}],[159186949,{"idx":5,"name":"ctyslumc-decal-04","tpage_name":"slumbset-shrub"}],[159186948,{"idx":4,"name":"ctyslumc-decal-02","tpage_name":"slumbset-shrub"}],[159186947,{"idx":3,"name":"cityslumc-grass-yellow","tpage_name":"slumbset-shrub"}],[159186946,{"idx":2,"name":"ctyslumc-stain","tpage_name":"slumbset-shrub"}],[159186945,{"idx":1,"name":"cityslumc-gold-trim","tpage_name":"slumbset-shrub"}],[159186944,{"idx":0,"name":"cityslumc-grass","tpage_name":"slumbset-shrub"}],[172818432,{"idx":0,"name":"precur-road-plate-01","tpage_name":"precurd-vis-tfrag"}],[170328072,{"idx":8,"name":"comb-yell-light","tpage_name":"combe-tfrag"}],[159121452,{"idx":44,"name":"cityslumc-metal-trim","tpage_name":"slumbset-tfrag"}],[171573251,{"idx":3,"name":"temple_flag03","tpage_name":"templea-vis-shrub"}],[159121451,{"idx":43,"name":"ctyslumc-wall-colored2","tpage_name":"slumbset-tfrag"}],[170328070,{"idx":6,"name":"rail-light-blue","tpage_name":"combe-tfrag"}],[159121450,{"idx":42,"name":"ctyslumc-wall-colored","tpage_name":"slumbset-tfrag"}],[171573249,{"idx":1,"name":"temple_sandstone_ground01","tpage_name":"templea-vis-shrub"}],[170328069,{"idx":5,"name":"rail-edge-01","tpage_name":"combe-tfrag"}],[159121449,{"idx":41,"name":"ctyslumc-light","tpage_name":"slumbset-tfrag"}],[171573248,{"idx":0,"name":"wstd-torchbowl-coal-01","tpage_name":"templea-vis-shrub"}],[170328068,{"idx":4,"name":"rail-cord-01","tpage_name":"combe-tfrag"}],[159121448,{"idx":40,"name":"stdm-bush-01","tpage_name":"slumbset-tfrag"}],[170328067,{"idx":3,"name":"rail-base-dark-01","tpage_name":"combe-tfrag"}],[159121447,{"idx":39,"name":"ctyslumc-vine-hang-a","tpage_name":"slumbset-tfrag"}],[162856986,{"idx":26,"name":"rail-trim-01","tpage_name":"raile-tfrag"}],[159121446,{"idx":38,"name":"ctyslumc-wall-sliver","tpage_name":"slumbset-tfrag"}],[170328065,{"idx":1,"name":"comb-temp-glass","tpage_name":"combe-tfrag"}],[162856985,{"idx":25,"name":"comb-ring","tpage_name":"raile-tfrag"}],[159121445,{"idx":37,"name":"common-gun-panel-03","tpage_name":"slumbset-tfrag"}],[170328064,{"idx":0,"name":"comb-temp-dark","tpage_name":"combe-tfrag"}],[162856984,{"idx":24,"name":"comb-temp-dark","tpage_name":"raile-tfrag"}],[159121444,{"idx":36,"name":"ctyslumc-brown","tpage_name":"slumbset-tfrag"}],[162856983,{"idx":23,"name":"rail-env-wall-01","tpage_name":"raile-tfrag"}],[159121443,{"idx":35,"name":"ctyslumc-window","tpage_name":"slumbset-tfrag"}],[162856982,{"idx":22,"name":"rail-pipe-02","tpage_name":"raile-tfrag"}],[159121442,{"idx":34,"name":"cityslumc-pipe","tpage_name":"slumbset-tfrag"}],[162856981,{"idx":21,"name":"rail-pipe-05","tpage_name":"raile-tfrag"}],[159121441,{"idx":33,"name":"cityslumc-door","tpage_name":"slumbset-tfrag"}],[162856980,{"idx":20,"name":"rail-fit-01","tpage_name":"raile-tfrag"}],[159121440,{"idx":32,"name":"cityslumc-top-pillar","tpage_name":"slumbset-tfrag"}],[159121439,{"idx":31,"name":"cityslumc-little-gold","tpage_name":"slumbset-tfrag"}],[162856978,{"idx":18,"name":"rail-light-red","tpage_name":"raile-tfrag"}],[159121438,{"idx":30,"name":"ctyslumc-light-blue","tpage_name":"slumbset-tfrag"}],[162856977,{"idx":17,"name":"rail-light-yellow","tpage_name":"raile-tfrag"}],[159121437,{"idx":29,"name":"cityslumc-gold-trim","tpage_name":"slumbset-tfrag"}],[162856976,{"idx":16,"name":"comb-redmarker","tpage_name":"raile-tfrag"}],[159121436,{"idx":28,"name":"ctyslumc-overhang-01","tpage_name":"slumbset-tfrag"}],[162856975,{"idx":15,"name":"rail-light-yellow-small","tpage_name":"raile-tfrag"}],[159121435,{"idx":27,"name":"cityslumc-wall-surface-01","tpage_name":"slumbset-tfrag"}],[162856974,{"idx":14,"name":"comb-temp-glass","tpage_name":"raile-tfrag"}],[159121434,{"idx":26,"name":"ctyslumc-wall-trim","tpage_name":"slumbset-tfrag"}],[162856973,{"idx":13,"name":"rail-rock-01","tpage_name":"raile-tfrag"}],[159121433,{"idx":25,"name":"cityslumc-grey-side-pillar","tpage_name":"slumbset-tfrag"}],[162856972,{"idx":12,"name":"rail-env-car-01","tpage_name":"raile-tfrag"}],[159121432,{"idx":24,"name":"cityslumc-awning","tpage_name":"slumbset-tfrag"}],[162856971,{"idx":11,"name":"rail-gray-metal-01","tpage_name":"raile-tfrag"}],[159121431,{"idx":23,"name":"ctyslumc-window-panes","tpage_name":"slumbset-tfrag"}],[162856970,{"idx":10,"name":"rail-base-dark-01","tpage_name":"raile-tfrag"}],[159121430,{"idx":22,"name":"ctyslumc-roof","tpage_name":"slumbset-tfrag"}],[162856969,{"idx":9,"name":"rail-light-blue","tpage_name":"raile-tfrag"}],[159121429,{"idx":21,"name":"ctyslumc-green","tpage_name":"slumbset-tfrag"}],[162856968,{"idx":8,"name":"rail-patch-01","tpage_name":"raile-tfrag"}],[159121428,{"idx":20,"name":"ctyslumc-window-panes2","tpage_name":"slumbset-tfrag"}],[162856967,{"idx":7,"name":"rail-pipe-03","tpage_name":"raile-tfrag"}],[159121427,{"idx":19,"name":"cityslumc-pinkish-purple","tpage_name":"slumbset-tfrag"}],[162856966,{"idx":6,"name":"rail-pipe-01","tpage_name":"raile-tfrag"}],[159121426,{"idx":18,"name":"ctyslumc-overhang-03","tpage_name":"slumbset-tfrag"}],[162856965,{"idx":5,"name":"rail-cord-01","tpage_name":"raile-tfrag"}],[159121425,{"idx":17,"name":"ctyslumc-pinetree-big-bark","tpage_name":"slumbset-tfrag"}],[162856964,{"idx":4,"name":"rail-detail-01","tpage_name":"raile-tfrag"}],[159121424,{"idx":16,"name":"ctyslumc-tree-top","tpage_name":"slumbset-tfrag"}],[162856963,{"idx":3,"name":"rail-light-blue-small","tpage_name":"raile-tfrag"}],[159121423,{"idx":15,"name":"ctyslumc-flowerbed-flowers-a","tpage_name":"slumbset-tfrag"}],[162856962,{"idx":2,"name":"rail-base-mid-01","tpage_name":"raile-tfrag"}],[159121422,{"idx":14,"name":"ctyslumc-grass","tpage_name":"slumbset-tfrag"}],[162856961,{"idx":1,"name":"rail-edge-01","tpage_name":"raile-tfrag"}],[159121421,{"idx":13,"name":"common-black","tpage_name":"slumbset-tfrag"}],[159121420,{"idx":12,"name":"ctyslumc-overhang-02","tpage_name":"slumbset-tfrag"}],[159121419,{"idx":11,"name":"cityslumc-purple-column-2","tpage_name":"slumbset-tfrag"}],[159121418,{"idx":10,"name":"cityslumc-purple-column","tpage_name":"slumbset-tfrag"}],[159121417,{"idx":9,"name":"cityslumc-door-plate","tpage_name":"slumbset-tfrag"}],[159121416,{"idx":8,"name":"cityslumc-lamp-gold","tpage_name":"slumbset-tfrag"}],[159121415,{"idx":7,"name":"cityslumc-lamp-red","tpage_name":"slumbset-tfrag"}],[159121414,{"idx":6,"name":"ctyslumc-light-amber","tpage_name":"slumbset-tfrag"}],[159121413,{"idx":5,"name":"cityslumc-lamp-small","tpage_name":"slumbset-tfrag"}],[159121412,{"idx":4,"name":"ctyslumc-billc","tpage_name":"slumbset-tfrag"}],[159121411,{"idx":3,"name":"ctyslumc-wall","tpage_name":"slumbset-tfrag"}],[159121410,{"idx":2,"name":"ctyslumc-floor-base","tpage_name":"slumbset-tfrag"}],[159121409,{"idx":1,"name":"ctyslumc-railing-trim","tpage_name":"slumbset-tfrag"}],[159121408,{"idx":0,"name":"cityslumc-purple-plain","tpage_name":"slumbset-tfrag"}],[172556305,{"idx":17,"name":"precur-light-green-02","tpage_name":"precurb-vis-tfrag"}],[155123785,{"idx":73,"name":"mhcity-de-tower-egg-inside","tpage_name":"mhctycst-pris"}],[172556304,{"idx":16,"name":"precur-frame-small-01","tpage_name":"precurb-vis-tfrag"}],[155123784,{"idx":72,"name":"jakchires-hair-norm","tpage_name":"mhctycst-pris"}],[172556303,{"idx":15,"name":"precur-tube-joint-02","tpage_name":"precurb-vis-tfrag"}],[155123783,{"idx":71,"name":"jakchires-hair-dark","tpage_name":"mhctycst-pris"}],[172556302,{"idx":14,"name":"precur-plate-end-01","tpage_name":"precurb-vis-tfrag"}],[155123782,{"idx":70,"name":"jakchires-facert-norm","tpage_name":"mhctycst-pris"}],[172556301,{"idx":13,"name":"precur-floor-plate-01","tpage_name":"precurb-vis-tfrag"}],[155123781,{"idx":69,"name":"jakchires-facert-dark","tpage_name":"mhctycst-pris"}],[172556300,{"idx":12,"name":"precur-tubes-segment-01","tpage_name":"precurb-vis-tfrag"}],[155123780,{"idx":68,"name":"jakchires-facelft-norm","tpage_name":"mhctycst-pris"}],[172556299,{"idx":11,"name":"precur-nail-01","tpage_name":"precurb-vis-tfrag"}],[155123779,{"idx":67,"name":"jakchires-facelft-dark","tpage_name":"mhctycst-pris"}],[173801478,{"idx":6,"name":"tow-slime-01","tpage_name":"towerb-vis-shrub"}],[172556298,{"idx":10,"name":"precur-light-green-01","tpage_name":"precurb-vis-tfrag"}],[155123778,{"idx":66,"name":"jakchires-eyelid-norm","tpage_name":"mhctycst-pris"}],[173801477,{"idx":5,"name":"tow-eggside-01","tpage_name":"towerb-vis-shrub"}],[172556297,{"idx":9,"name":"precur-floor-plate-02","tpage_name":"precurb-vis-tfrag"}],[155123777,{"idx":65,"name":"jakchires-eyelid-dark","tpage_name":"mhctycst-pris"}],[173801476,{"idx":4,"name":"tow-groundpod","tpage_name":"towerb-vis-shrub"}],[172556296,{"idx":8,"name":"precur-tubes-bundle-01","tpage_name":"precurb-vis-tfrag"}],[155123776,{"idx":64,"name":"jakchires-eyebrow-norm","tpage_name":"mhctycst-pris"}],[173801475,{"idx":3,"name":"tow-wall-supports","tpage_name":"towerb-vis-shrub"}],[172556295,{"idx":7,"name":"precur-tube-joint-01","tpage_name":"precurb-vis-tfrag"}],[155123775,{"idx":63,"name":"jakchires-eyebrow-dark","tpage_name":"mhctycst-pris"}],[172556294,{"idx":6,"name":"precur-plate-thin-01","tpage_name":"precurb-vis-tfrag"}],[155123774,{"idx":62,"name":"jakchires-eye-norm","tpage_name":"mhctycst-pris"}],[172556293,{"idx":5,"name":"precur-tubes-segment-02","tpage_name":"precurb-vis-tfrag"}],[155123773,{"idx":61,"name":"jakchires-eye-dark","tpage_name":"mhctycst-pris"}],[172556292,{"idx":4,"name":"precur-wall-groove-01","tpage_name":"precurb-vis-tfrag"}],[155123772,{"idx":60,"name":"jakchires-arm-norm","tpage_name":"mhctycst-pris"}],[172556291,{"idx":3,"name":"precur-wall-brace-01","tpage_name":"precurb-vis-tfrag"}],[155123771,{"idx":59,"name":"jakchires-arm-dark","tpage_name":"mhctycst-pris"}],[172556290,{"idx":2,"name":"precur-light-blue-01","tpage_name":"precurb-vis-tfrag"}],[155123770,{"idx":58,"name":"mhcity-vein-01","tpage_name":"mhctycst-pris"}],[172556289,{"idx":1,"name":"precur-tubes-small-01","tpage_name":"precurb-vis-tfrag"}],[155123769,{"idx":57,"name":"mhcity-grunt-egg-metal-01","tpage_name":"mhctycst-pris"}],[172556288,{"idx":0,"name":"precur-plate-large-01","tpage_name":"precurb-vis-tfrag"}],[155123768,{"idx":56,"name":"mhcity-grunt-egg-horns-01","tpage_name":"mhctycst-pris"}],[155123764,{"idx":52,"name":"jakchires-teeth","tpage_name":"mhctycst-pris"}],[155123763,{"idx":51,"name":"jakchires-shoeteop","tpage_name":"mhctycst-pris"}],[155123762,{"idx":50,"name":"jakchires-shoemetal","tpage_name":"mhctycst-pris"}],[155123761,{"idx":49,"name":"jakchires-shoebottom","tpage_name":"mhctycst-pris"}],[170065920,{"idx":0,"name":"comb-grate","tpage_name":"combn-alpha"}],[155123760,{"idx":48,"name":"jakchires-precarmor-01","tpage_name":"mhctycst-pris"}],[155123759,{"idx":47,"name":"jakchires-pants","tpage_name":"mhctycst-pris"}],[155123758,{"idx":46,"name":"jakchires-lightbrownspat","tpage_name":"mhctycst-pris"}],[155123757,{"idx":45,"name":"jakchires-leatherpouch","tpage_name":"mhctycst-pris"}],[155123756,{"idx":44,"name":"jakchires-jacket","tpage_name":"mhctycst-pris"}],[155123755,{"idx":43,"name":"jakchires-horn","tpage_name":"mhctycst-pris"}],[155123754,{"idx":42,"name":"jakchires-hair","tpage_name":"mhctycst-pris"}],[162594833,{"idx":17,"name":"comb-pre-metal-fade-plain","tpage_name":"comba-alpha"}],[155123753,{"idx":41,"name":"jakchires-glovetop","tpage_name":"mhctycst-pris"}],[162594832,{"idx":16,"name":"comb-pre-metal-01-plain","tpage_name":"comba-alpha"}],[155123752,{"idx":40,"name":"jakchires-facert","tpage_name":"mhctycst-pris"}],[162594831,{"idx":15,"name":"comb-pre-metal-fade-yellow","tpage_name":"comba-alpha"}],[155123751,{"idx":39,"name":"jakchires-facelft","tpage_name":"mhctycst-pris"}],[162594830,{"idx":14,"name":"comb-pre-metal-01-yellow","tpage_name":"comba-alpha"}],[155123750,{"idx":38,"name":"jakchires-eyelid","tpage_name":"mhctycst-pris"}],[155123749,{"idx":37,"name":"jakchires-eyebrow","tpage_name":"mhctycst-pris"}],[162594828,{"idx":12,"name":"rail-light-red","tpage_name":"comba-alpha"}],[155123748,{"idx":36,"name":"jakchires-eye","tpage_name":"mhctycst-pris"}],[155123747,{"idx":35,"name":"jakchires-clips","tpage_name":"mhctycst-pris"}],[162594826,{"idx":10,"name":"comb-env2","tpage_name":"comba-alpha"}],[155123746,{"idx":34,"name":"jakchires-chestplate","tpage_name":"mhctycst-pris"}],[155123745,{"idx":33,"name":"jakchires-brwnleather","tpage_name":"mhctycst-pris"}],[155123744,{"idx":32,"name":"jakchires-brownstrap","tpage_name":"mhctycst-pris"}],[155123743,{"idx":31,"name":"jakchires-blackstrap","tpage_name":"mhctycst-pris"}],[155123742,{"idx":30,"name":"jakchires-arm","tpage_name":"mhctycst-pris"}],[155123741,{"idx":29,"name":"jakc-wristband-a2","tpage_name":"mhctycst-pris"}],[155123740,{"idx":28,"name":"jakc-wraps","tpage_name":"mhctycst-pris"}],[155123739,{"idx":27,"name":"jakc-waistband2","tpage_name":"mhctycst-pris"}],[155123738,{"idx":26,"name":"jakc-skirt","tpage_name":"mhctycst-pris"}],[155123737,{"idx":25,"name":"jakc-scarfhanging","tpage_name":"mhctycst-pris"}],[162594816,{"idx":0,"name":"comb-grate","tpage_name":"comba-alpha"}],[155123736,{"idx":24,"name":"jakc-scarf","tpage_name":"mhctycst-pris"}],[155123735,{"idx":23,"name":"jakc-lens","tpage_name":"mhctycst-pris"}],[155123734,{"idx":22,"name":"jakc-gogglemetal","tpage_name":"mhctycst-pris"}],[155123733,{"idx":21,"name":"jakc-chestplate-straps","tpage_name":"mhctycst-pris"}],[155123732,{"idx":20,"name":"jakc-armor","tpage_name":"mhctycst-pris"}],[155123731,{"idx":19,"name":"environment-oldmetal","tpage_name":"mhctycst-pris"}],[155123730,{"idx":18,"name":"daxtertuft","tpage_name":"mhctycst-pris"}],[155123729,{"idx":17,"name":"daxterteeth","tpage_name":"mhctycst-pris"}],[155123728,{"idx":16,"name":"daxternose","tpage_name":"mhctycst-pris"}],[155123727,{"idx":15,"name":"daxterlense","tpage_name":"mhctycst-pris"}],[155123726,{"idx":14,"name":"daxterhelmetplain","tpage_name":"mhctycst-pris"}],[155123725,{"idx":13,"name":"daxterheadwidenew","tpage_name":"mhctycst-pris"}],[155123724,{"idx":12,"name":"daxtergoggles","tpage_name":"mhctycst-pris"}],[155123723,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"mhctycst-pris"}],[155123722,{"idx":10,"name":"daxterfoot","tpage_name":"mhctycst-pris"}],[155123721,{"idx":9,"name":"daxterfinger","tpage_name":"mhctycst-pris"}],[154796084,{"idx":52,"name":"jakchires-teeth","tpage_name":"ljakndax-pris"}],[154796083,{"idx":51,"name":"jakchires-shoeteop","tpage_name":"ljakndax-pris"}],[154796057,{"idx":25,"name":"jakc-scarfhanging","tpage_name":"ljakndax-pris"}],[155910144,{"idx":0,"name":"mhcity-de-tower-egg","tpage_name":"mhctycst-water"}],[154664964,{"idx":4,"name":"wascity-turret-hud-health-01","tpage_name":"wascityb-minimap"}],[154664963,{"idx":3,"name":"hud-dmrobot-target-02","tpage_name":"wascityb-minimap"}],[154664962,{"idx":2,"name":"hud-dmrobot-target-01","tpage_name":"wascityb-minimap"}],[154664961,{"idx":1,"name":"wascity-turret-hud-big-arrow-01","tpage_name":"wascityb-minimap"}],[154402818,{"idx":2,"name":"vehicle-tread-02","tpage_name":"ltrtwhls-pris"}],[154402817,{"idx":1,"name":"vehicle-wheel-01","tpage_name":"ltrtwhls-pris"}],[154337282,{"idx":2,"name":"remote-button","tpage_name":"ltnjxhip-tfrag"}],[154337281,{"idx":1,"name":"remote-metal-face-01","tpage_name":"ltnjxhip-tfrag"}],[154337280,{"idx":0,"name":"remote-metal-face-02","tpage_name":"ltnjxhip-tfrag"}],[153944087,{"idx":23,"name":"king-precursermetal-trim2","tpage_name":"ldmpckgn-pris2"}],[155123720,{"idx":8,"name":"daxterear","tpage_name":"mhctycst-pris"}],[153878540,{"idx":12,"name":"pecker-yellowfur","tpage_name":"ldmpckgn-pris"}],[155123719,{"idx":7,"name":"daxterbolt","tpage_name":"mhctycst-pris"}],[153878539,{"idx":11,"name":"pecker-wingtop","tpage_name":"ldmpckgn-pris"}],[155123718,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"mhctycst-pris"}],[153878538,{"idx":10,"name":"pecker-wingbottom","tpage_name":"ldmpckgn-pris"}],[153813023,{"idx":31,"name":"mhcity-bubble","tpage_name":"mhcityb-vis-pris"}],[153813021,{"idx":29,"name":"mhcity-basebone","tpage_name":"mhcityb-vis-pris"}],[153813015,{"idx":23,"name":"mh-spawner-metal-tooth","tpage_name":"mhcityb-vis-pris"}],[153813013,{"idx":21,"name":"mh-spawner-inner-mouth-01","tpage_name":"mhcityb-vis-pris"}],[153813009,{"idx":17,"name":"mhcity-tower-door-metal-01","tpage_name":"mhcityb-vis-pris"}],[153813007,{"idx":15,"name":"mhcity-grunt-egg-horns-01","tpage_name":"mhcityb-vis-pris"}],[153813005,{"idx":13,"name":"mhcity-puffer-top-01","tpage_name":"mhcityb-vis-pris"}],[153813004,{"idx":12,"name":"mhcity-puffer-mid-01","tpage_name":"mhcityb-vis-pris"}],[153813003,{"idx":11,"name":"mhcity-floor-brace-02","tpage_name":"mhcityb-vis-pris"}],[153813001,{"idx":9,"name":"mhcity-twitch-blade-cap","tpage_name":"mhcityb-vis-pris"}],[153813000,{"idx":8,"name":"mhcity-grunt-egg-metal-01","tpage_name":"mhcityb-vis-pris"}],[153681964,{"idx":44,"name":"mhcity-base","tpage_name":"mhcityb-vis-tfrag"}],[153681960,{"idx":40,"name":"mhcity-basebone","tpage_name":"mhcityb-vis-tfrag"}],[153681959,{"idx":39,"name":"mhcity-grind-strand-01","tpage_name":"mhcityb-vis-tfrag"}],[153681958,{"idx":38,"name":"mhcity-goo-base","tpage_name":"mhcityb-vis-tfrag"}],[153681957,{"idx":37,"name":"mhcity-de-tower-puff-01","tpage_name":"mhcityb-vis-tfrag"}],[153681955,{"idx":35,"name":"mhcity-tallhouse","tpage_name":"mhcityb-vis-tfrag"}],[153681946,{"idx":26,"name":"mhcity-de-tower-under","tpage_name":"mhcityb-vis-tfrag"}],[153681945,{"idx":25,"name":"mhcity-mektunnel","tpage_name":"mhcityb-vis-tfrag"}],[153681941,{"idx":21,"name":"mhcity-bigwall","tpage_name":"mhcityb-vis-tfrag"}],[153681940,{"idx":20,"name":"mhcity-base-02","tpage_name":"mhcityb-vis-tfrag"}],[153681939,{"idx":19,"name":"mhcity-lilhouse-door-frame","tpage_name":"mhcityb-vis-tfrag"}],[153681938,{"idx":18,"name":"mhcity-black","tpage_name":"mhcityb-vis-tfrag"}],[153681937,{"idx":17,"name":"mhcity-grunt-egg-neck-01","tpage_name":"mhcityb-vis-tfrag"}],[153681936,{"idx":16,"name":"mhcity-building-door-frame","tpage_name":"mhcityb-vis-tfrag"}],[153681935,{"idx":15,"name":"mhcity-building-base-01","tpage_name":"mhcityb-vis-tfrag"}],[153681934,{"idx":14,"name":"mhcity-grunt-egg-metal-01","tpage_name":"mhcityb-vis-tfrag"}],[157417473,{"idx":1,"name":"hud-jetboard-health","tpage_name":"lforplnt-minimap"}],[153681933,{"idx":13,"name":"mhcity-gapfiller-top-01","tpage_name":"mhcityb-vis-tfrag"}],[153681931,{"idx":11,"name":"mhcity-grunt-egg-gem-01","tpage_name":"mhcityb-vis-tfrag"}],[153681930,{"idx":10,"name":"mhcity-grunt-egg-03-to-floor","tpage_name":"mhcityb-vis-tfrag"}],[153681929,{"idx":9,"name":"mhcity-skin-ground-to-floor-01","tpage_name":"mhcityb-vis-tfrag"}],[153681928,{"idx":8,"name":"mhcity-vein-01","tpage_name":"mhcityb-vis-tfrag"}],[153681927,{"idx":7,"name":"mhcity-floor-brace-02","tpage_name":"mhcityb-vis-tfrag"}],[153681926,{"idx":6,"name":"mhcity-skin-ground-01","tpage_name":"mhcityb-vis-tfrag"}],[153681925,{"idx":5,"name":"mhcity-grunt-egg-03","tpage_name":"mhcityb-vis-tfrag"}],[153681924,{"idx":4,"name":"mhcity-baserock","tpage_name":"mhcityb-vis-tfrag"}],[153681923,{"idx":3,"name":"mhcity-wall-tentacle-02","tpage_name":"mhcityb-vis-tfrag"}],[153681922,{"idx":2,"name":"mhcity-grunt-egg-rim-01","tpage_name":"mhcityb-vis-tfrag"}],[153681921,{"idx":1,"name":"mhcity-eggskin","tpage_name":"mhcityb-vis-tfrag"}],[153681920,{"idx":0,"name":"mhcity-wall-tentacle-01","tpage_name":"mhcityb-vis-tfrag"}],[153354270,{"idx":30,"name":"mhcity-twitch-blade-cap","tpage_name":"mhcitya-vis-pris"}],[153354269,{"idx":29,"name":"mhcity-puffer-top-01","tpage_name":"mhcitya-vis-pris"}],[153354262,{"idx":22,"name":"mhcity-de-door-glow-off","tpage_name":"mhcitya-vis-pris"}],[153354261,{"idx":21,"name":"mhcity-de-door-glow-01","tpage_name":"mhcitya-vis-pris"}],[159318039,{"idx":23,"name":"comb-pipe3","tpage_name":"comba-tfrag"}],[153092139,{"idx":43,"name":"rail-monitor-screen-02","tpage_name":"railx-tfrag"}],[159318038,{"idx":22,"name":"comb-pipe2","tpage_name":"comba-tfrag"}],[153092138,{"idx":42,"name":"rail-monitor-screen-01","tpage_name":"railx-tfrag"}],[159318037,{"idx":21,"name":"comb-plate-02","tpage_name":"comba-tfrag"}],[153092137,{"idx":41,"name":"rail-light-red","tpage_name":"railx-tfrag"}],[159318036,{"idx":20,"name":"comb-comb-tile","tpage_name":"comba-tfrag"}],[153092136,{"idx":40,"name":"rail-light-blue-small-2","tpage_name":"railx-tfrag"}],[159318035,{"idx":19,"name":"rail-pipe-01","tpage_name":"comba-tfrag"}],[153092135,{"idx":39,"name":"rail-light-blue-small-3","tpage_name":"railx-tfrag"}],[159318034,{"idx":18,"name":"comb-long-vent","tpage_name":"comba-tfrag"}],[153092134,{"idx":38,"name":"rail-light-blue-small","tpage_name":"railx-tfrag"}],[159318032,{"idx":16,"name":"rail-light-red","tpage_name":"comba-tfrag"}],[153092132,{"idx":36,"name":"rail-grate-01","tpage_name":"railx-tfrag"}],[159318031,{"idx":15,"name":"comb-ring","tpage_name":"comba-tfrag"}],[153092131,{"idx":35,"name":"rail-step-07","tpage_name":"railx-tfrag"}],[159318030,{"idx":14,"name":"comb-pipe1","tpage_name":"comba-tfrag"}],[153092130,{"idx":34,"name":"rail-step-02","tpage_name":"railx-tfrag"}],[153092129,{"idx":33,"name":"rail-step-06","tpage_name":"railx-tfrag"}],[159318028,{"idx":12,"name":"comb-env","tpage_name":"comba-tfrag"}],[153092128,{"idx":32,"name":"rail-step-01","tpage_name":"railx-tfrag"}],[159318027,{"idx":11,"name":"rail-base-mid-01","tpage_name":"comba-tfrag"}],[153092127,{"idx":31,"name":"rail-step-04","tpage_name":"railx-tfrag"}],[153092126,{"idx":30,"name":"rail-step-03","tpage_name":"railx-tfrag"}],[153092125,{"idx":29,"name":"rail-step-05","tpage_name":"railx-tfrag"}],[159318024,{"idx":8,"name":"comb-tarn-fade-wall-01","tpage_name":"comba-tfrag"}],[153092124,{"idx":28,"name":"rail-fit-01","tpage_name":"railx-tfrag"}],[159318023,{"idx":7,"name":"comb-tarn-wall-01","tpage_name":"comba-tfrag"}],[153092123,{"idx":27,"name":"rail-light-yellow-small","tpage_name":"railx-tfrag"}],[159318022,{"idx":6,"name":"comb-crct-small","tpage_name":"comba-tfrag"}],[153092122,{"idx":26,"name":"rail-pipe-04","tpage_name":"railx-tfrag"}],[159318021,{"idx":5,"name":"comb-crct-medium","tpage_name":"comba-tfrag"}],[153092121,{"idx":25,"name":"rail-pipe-03","tpage_name":"railx-tfrag"}],[160563200,{"idx":0,"name":"hud-vehicle-health-bar-01","tpage_name":"stadiuma-minimap"}],[159318020,{"idx":4,"name":"comb-crct-small-drk","tpage_name":"comba-tfrag"}],[153092120,{"idx":24,"name":"rail-env-ground-01","tpage_name":"railx-tfrag"}],[159318019,{"idx":3,"name":"comb-temp-light","tpage_name":"comba-tfrag"}],[153092119,{"idx":23,"name":"rail-base-mid-trim-01","tpage_name":"railx-tfrag"}],[159318018,{"idx":2,"name":"comb-temp-glass","tpage_name":"comba-tfrag"}],[153092118,{"idx":22,"name":"rail-tread-01","tpage_name":"railx-tfrag"}],[159318017,{"idx":1,"name":"comb-temp-dark","tpage_name":"comba-tfrag"}],[153092117,{"idx":21,"name":"rail-base-dark-trim-01","tpage_name":"railx-tfrag"}],[159318016,{"idx":0,"name":"comb-temp-medium","tpage_name":"comba-tfrag"}],[153092116,{"idx":20,"name":"rail-comb-02","tpage_name":"railx-tfrag"}],[153092115,{"idx":19,"name":"rail-vent-01","tpage_name":"railx-tfrag"}],[153092114,{"idx":18,"name":"rail-env-wall-01","tpage_name":"railx-tfrag"}],[153092113,{"idx":17,"name":"rail-pipe-02","tpage_name":"railx-tfrag"}],[153092112,{"idx":16,"name":"rail-detail-01","tpage_name":"railx-tfrag"}],[153092111,{"idx":15,"name":"rail-light-yellow","tpage_name":"railx-tfrag"}],[153092110,{"idx":14,"name":"rail-trim-01","tpage_name":"railx-tfrag"}],[153092109,{"idx":13,"name":"rail-pipe-01","tpage_name":"railx-tfrag"}],[153092108,{"idx":12,"name":"rail-edge-01","tpage_name":"railx-tfrag"}],[153092107,{"idx":11,"name":"rail-base-dark-01","tpage_name":"railx-tfrag"}],[153092106,{"idx":10,"name":"rail-light-blue","tpage_name":"railx-tfrag"}],[153092105,{"idx":9,"name":"rail-base-mid-01","tpage_name":"railx-tfrag"}],[154337284,{"idx":4,"name":"remote-rim-01","tpage_name":"ltnjxhip-tfrag"}],[153092104,{"idx":8,"name":"rail-cord-01","tpage_name":"railx-tfrag"}],[154337283,{"idx":3,"name":"common-black","tpage_name":"ltnjxhip-tfrag"}],[153092103,{"idx":7,"name":"rail-comb-01","tpage_name":"railx-tfrag"}],[152961024,{"idx":0,"name":"minc-pre-12","tpage_name":"combx-water"}],[152895502,{"idx":14,"name":"tpl-door-face-01","tpage_name":"combx-tfrag"}],[152895501,{"idx":13,"name":"rail-env-wall-01","tpage_name":"combx-tfrag"}],[152895499,{"idx":11,"name":"comb-comb-tile","tpage_name":"combx-tfrag"}],[152436738,{"idx":2,"name":"temple_sandstone_dirt01","tpage_name":"templex-vis-water"}],[152436737,{"idx":1,"name":"temple-waterfall-dest","tpage_name":"templex-vis-water"}],[152436736,{"idx":0,"name":"temple-waterfall","tpage_name":"templex-vis-water"}],[164691987,{"idx":19,"name":"veger-hand","tpage_name":"railcst-pris2"}],[152240187,{"idx":59,"name":"king-wristband","tpage_name":"wascast-pris2"}],[164691986,{"idx":18,"name":"veger-hair","tpage_name":"railcst-pris2"}],[152240186,{"idx":58,"name":"king-wraps","tpage_name":"wascast-pris2"}],[164691985,{"idx":17,"name":"veger-gold","tpage_name":"railcst-pris2"}],[152240185,{"idx":57,"name":"king-wrap","tpage_name":"wascast-pris2"}],[164691984,{"idx":16,"name":"veger-fingertop","tpage_name":"railcst-pris2"}],[152240184,{"idx":56,"name":"king-vestback","tpage_name":"wascast-pris2"}],[164691983,{"idx":15,"name":"veger-fingerbottom","tpage_name":"railcst-pris2"}],[152240183,{"idx":55,"name":"king-vest","tpage_name":"wascast-pris2"}],[164691982,{"idx":14,"name":"veger-face","tpage_name":"railcst-pris2"}],[152240182,{"idx":54,"name":"king-thinstrap","tpage_name":"wascast-pris2"}],[164691981,{"idx":13,"name":"veger-eyelid","tpage_name":"railcst-pris2"}],[152240181,{"idx":53,"name":"king-teeth","tpage_name":"wascast-pris2"}],[164691980,{"idx":12,"name":"veger-endpaper","tpage_name":"railcst-pris2"}],[152240180,{"idx":52,"name":"king-skirt-b","tpage_name":"wascast-pris2"}],[164691979,{"idx":11,"name":"veger-coatclips","tpage_name":"railcst-pris2"}],[152240179,{"idx":51,"name":"king-skirt","tpage_name":"wascast-pris2"}],[164691978,{"idx":10,"name":"veger-coatbelt","tpage_name":"railcst-pris2"}],[152240178,{"idx":50,"name":"king-shoebottom","tpage_name":"wascast-pris2"}],[164691977,{"idx":9,"name":"veger-coat","tpage_name":"railcst-pris2"}],[152240177,{"idx":49,"name":"king-precursermetal-trimbolt","tpage_name":"wascast-pris2"}],[164691976,{"idx":8,"name":"veger-bootstrap","tpage_name":"railcst-pris2"}],[152240176,{"idx":48,"name":"king-precursermetal-trim2","tpage_name":"wascast-pris2"}],[164691975,{"idx":7,"name":"veger-bootfoot","tpage_name":"railcst-pris2"}],[153485355,{"idx":43,"name":"mhcity-base","tpage_name":"mhcitya-vis-tfrag"}],[152240175,{"idx":47,"name":"king-precursermetal-trim","tpage_name":"wascast-pris2"}],[164691974,{"idx":6,"name":"veger-bootbolt","tpage_name":"railcst-pris2"}],[152240174,{"idx":46,"name":"king-precursermetal-plain","tpage_name":"wascast-pris2"}],[164691973,{"idx":5,"name":"veger-bookspine","tpage_name":"railcst-pris2"}],[152240173,{"idx":45,"name":"king-precursermetal-decor","tpage_name":"wascast-pris2"}],[164691972,{"idx":4,"name":"veger-booksides","tpage_name":"railcst-pris2"}],[153485352,{"idx":40,"name":"mhcity-goo-base","tpage_name":"mhcitya-vis-tfrag"}],[152240172,{"idx":44,"name":"king-lgblackstrap","tpage_name":"wascast-pris2"}],[164691971,{"idx":3,"name":"veger-bookleather","tpage_name":"railcst-pris2"}],[153485351,{"idx":39,"name":"mhcity-de-tower-puff-01","tpage_name":"mhcitya-vis-tfrag"}],[152240171,{"idx":43,"name":"king-leg","tpage_name":"wascast-pris2"}],[164691970,{"idx":2,"name":"environment-oldmetal","tpage_name":"railcst-pris2"}],[152240170,{"idx":42,"name":"king-iris","tpage_name":"wascast-pris2"}],[164691969,{"idx":1,"name":"bam-hairhilite","tpage_name":"railcst-pris2"}],[152240169,{"idx":41,"name":"king-horn","tpage_name":"wascast-pris2"}],[164691968,{"idx":0,"name":"bam-eyelight","tpage_name":"railcst-pris2"}],[152240168,{"idx":40,"name":"king-hand","tpage_name":"wascast-pris2"}],[153485347,{"idx":35,"name":"mhcity-toadstool-vein-01","tpage_name":"mhcitya-vis-tfrag"}],[152240167,{"idx":39,"name":"king-hair","tpage_name":"wascast-pris2"}],[152240166,{"idx":38,"name":"king-greenmetalplain","tpage_name":"wascast-pris2"}],[153485345,{"idx":33,"name":"mhcity-base-ground","tpage_name":"mhcitya-vis-tfrag"}],[152240165,{"idx":37,"name":"king-greenmetal","tpage_name":"wascast-pris2"}],[153485344,{"idx":32,"name":"mhcity-basebone","tpage_name":"mhcitya-vis-tfrag"}],[152240164,{"idx":36,"name":"king-finger","tpage_name":"wascast-pris2"}],[153485343,{"idx":31,"name":"mhcity-farm-dirt-01","tpage_name":"mhcitya-vis-tfrag"}],[152240163,{"idx":35,"name":"king-face-01","tpage_name":"wascast-pris2"}],[152240162,{"idx":34,"name":"king-earing","tpage_name":"wascast-pris2"}],[153485341,{"idx":29,"name":"mhcity-mektunnel","tpage_name":"mhcitya-vis-tfrag"}],[152240161,{"idx":33,"name":"king-ear","tpage_name":"wascast-pris2"}],[152240160,{"idx":32,"name":"king-clip-02","tpage_name":"wascast-pris2"}],[152240159,{"idx":31,"name":"king-chest","tpage_name":"wascast-pris2"}],[153485338,{"idx":26,"name":"mhcity-bigwall","tpage_name":"mhcitya-vis-tfrag"}],[152240158,{"idx":30,"name":"king-bolt","tpage_name":"wascast-pris2"}],[153485337,{"idx":25,"name":"mhcity-base-02","tpage_name":"mhcitya-vis-tfrag"}],[152240157,{"idx":29,"name":"king-bluemetal","tpage_name":"wascast-pris2"}],[153485314,{"idx":2,"name":"mhcity-grunt-egg-rim-01","tpage_name":"mhcitya-vis-tfrag"}],[152240134,{"idx":6,"name":"seem-bootmet","tpage_name":"wascast-pris2"}],[153485313,{"idx":1,"name":"mhcity-eggskin","tpage_name":"mhcitya-vis-tfrag"}],[152240133,{"idx":5,"name":"seem-bootlower","tpage_name":"wascast-pris2"}],[153485312,{"idx":0,"name":"mhcity-wall-tentacle-01","tpage_name":"mhcitya-vis-tfrag"}],[152240132,{"idx":4,"name":"seem-bootleg","tpage_name":"wascast-pris2"}],[152240131,{"idx":3,"name":"seem-bootbottom","tpage_name":"wascast-pris2"}],[152240130,{"idx":2,"name":"seem-arm","tpage_name":"wascast-pris2"}],[167313421,{"idx":13,"name":"daxterbodyshort-eix","tpage_name":"stadium-vis-pris"}],[151126081,{"idx":65,"name":"pecker-eyelid","tpage_name":"combx-pris"}],[167313420,{"idx":12,"name":"daxterarm","tpage_name":"stadium-vis-pris"}],[151126080,{"idx":64,"name":"pecker-yellowfur","tpage_name":"combx-pris"}],[167313419,{"idx":11,"name":"daxter-orange","tpage_name":"stadium-vis-pris"}],[151126079,{"idx":63,"name":"pecker-wingtop","tpage_name":"combx-pris"}],[167313418,{"idx":10,"name":"daxter-furhilite","tpage_name":"stadium-vis-pris"}],[151126078,{"idx":62,"name":"pecker-wingbottom","tpage_name":"combx-pris"}],[167313417,{"idx":9,"name":"daxter-eyelid","tpage_name":"stadium-vis-pris"}],[151126077,{"idx":61,"name":"pecker-teeth","tpage_name":"combx-pris"}],[167313416,{"idx":8,"name":"bam-hairhilite","tpage_name":"stadium-vis-pris"}],[151126076,{"idx":60,"name":"pecker-tail","tpage_name":"combx-pris"}],[167313415,{"idx":7,"name":"bam-eyelight","tpage_name":"stadium-vis-pris"}],[151126075,{"idx":59,"name":"pecker-plume","tpage_name":"combx-pris"}],[151126074,{"idx":58,"name":"pecker-face","tpage_name":"combx-pris"}],[151126073,{"idx":57,"name":"pecker-body-01","tpage_name":"combx-pris"}],[151126068,{"idx":52,"name":"jakchires-teeth","tpage_name":"combx-pris"}],[151126067,{"idx":51,"name":"jakchires-shoeteop","tpage_name":"combx-pris"}],[151126066,{"idx":50,"name":"jakchires-shoemetal","tpage_name":"combx-pris"}],[151126065,{"idx":49,"name":"jakchires-shoebottom","tpage_name":"combx-pris"}],[151126064,{"idx":48,"name":"jakchires-precarmor-01","tpage_name":"combx-pris"}],[151126063,{"idx":47,"name":"jakchires-pants","tpage_name":"combx-pris"}],[151126062,{"idx":46,"name":"jakchires-lightbrownspat","tpage_name":"combx-pris"}],[151126061,{"idx":45,"name":"jakchires-leatherpouch","tpage_name":"combx-pris"}],[151126060,{"idx":44,"name":"jakchires-jacket","tpage_name":"combx-pris"}],[151126042,{"idx":26,"name":"jakc-skirt","tpage_name":"combx-pris"}],[151126041,{"idx":25,"name":"jakc-scarfhanging","tpage_name":"combx-pris"}],[151126040,{"idx":24,"name":"jakc-scarf","tpage_name":"combx-pris"}],[151126039,{"idx":23,"name":"jakc-lens","tpage_name":"combx-pris"}],[151126038,{"idx":22,"name":"jakc-gogglemetal","tpage_name":"combx-pris"}],[151126037,{"idx":21,"name":"jakc-chestplate-straps","tpage_name":"combx-pris"}],[151126036,{"idx":20,"name":"jakc-armor","tpage_name":"combx-pris"}],[151126035,{"idx":19,"name":"environment-oldmetal","tpage_name":"combx-pris"}],[151126034,{"idx":18,"name":"daxtertuft","tpage_name":"combx-pris"}],[151126033,{"idx":17,"name":"daxterteeth","tpage_name":"combx-pris"}],[151126032,{"idx":16,"name":"daxternose","tpage_name":"combx-pris"}],[154796077,{"idx":45,"name":"jakchires-leatherpouch","tpage_name":"ljakndax-pris"}],[151060537,{"idx":57,"name":"spydroid-light-small","tpage_name":"factoryc-vis-pris"}],[154796076,{"idx":44,"name":"jakchires-jacket","tpage_name":"ljakndax-pris"}],[151060536,{"idx":56,"name":"spydroid-light","tpage_name":"factoryc-vis-pris"}],[154796075,{"idx":43,"name":"jakchires-horn","tpage_name":"ljakndax-pris"}],[151060535,{"idx":55,"name":"spydroid-leg-grey-end","tpage_name":"factoryc-vis-pris"}],[154796074,{"idx":42,"name":"jakchires-hair","tpage_name":"ljakndax-pris"}],[151060534,{"idx":54,"name":"spydroid-leg-grey","tpage_name":"factoryc-vis-pris"}],[152240129,{"idx":1,"name":"environment-oldmetal","tpage_name":"wascast-pris2"}],[150994949,{"idx":5,"name":"tentacle-02","tpage_name":"desert-vis-pris"}],[152240128,{"idx":0,"name":"bam-eyelight","tpage_name":"wascast-pris2"}],[150994948,{"idx":4,"name":"tentacle-01","tpage_name":"desert-vis-pris"}],[150863890,{"idx":18,"name":"daxtertuft","tpage_name":"towerc-pris"}],[150863889,{"idx":17,"name":"daxterteeth","tpage_name":"towerc-pris"}],[155844608,{"idx":0,"name":"mhcity-de-tower-egg","tpage_name":"lctydest-water"}],[153354248,{"idx":8,"name":"mhcity-vein-01","tpage_name":"mhcitya-vis-pris"}],[150863888,{"idx":16,"name":"daxternose","tpage_name":"towerc-pris"}],[150863879,{"idx":7,"name":"daxterbolt","tpage_name":"towerc-pris"}],[150863872,{"idx":0,"name":"bam-eyelight","tpage_name":"towerc-pris"}],[188022790,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"lvincst-pris"}],[174325810,{"idx":50,"name":"jakchires-shoemetal","tpage_name":"ldesgcst-pris"}],[150667390,{"idx":126,"name":"tow-pup-skin-01","tpage_name":"towerc-tfrag"}],[176816150,{"idx":22,"name":"ecocreature-claws","tpage_name":"towera-pris"}],[174325790,{"idx":30,"name":"jakchires-arm","tpage_name":"ldesgcst-pris"}],[150667370,{"idx":106,"name":"city-lowres-mhcity-tower-01","tpage_name":"towerc-tfrag"}],[150274073,{"idx":25,"name":"sig-shoulderarmor","tpage_name":"lsigklv-pris2"}],[150274071,{"idx":23,"name":"sig-shoebottom","tpage_name":"lsigklv-pris2"}],[150274070,{"idx":22,"name":"sig-sac","tpage_name":"lsigklv-pris2"}],[150274069,{"idx":21,"name":"sig-metal-dirty","tpage_name":"lsigklv-pris2"}],[150274068,{"idx":20,"name":"sig-metal-01","tpage_name":"lsigklv-pris2"}],[150274067,{"idx":19,"name":"sig-lens","tpage_name":"lsigklv-pris2"}],[150274066,{"idx":18,"name":"sig-horn","tpage_name":"lsigklv-pris2"}],[150274065,{"idx":17,"name":"sig-headgear","tpage_name":"lsigklv-pris2"}],[150274064,{"idx":16,"name":"sig-gun-05","tpage_name":"lsigklv-pris2"}],[150274063,{"idx":15,"name":"sig-gun-04","tpage_name":"lsigklv-pris2"}],[150274062,{"idx":14,"name":"sig-gun-03","tpage_name":"lsigklv-pris2"}],[150274061,{"idx":13,"name":"sig-gun-02","tpage_name":"lsigklv-pris2"}],[150274060,{"idx":12,"name":"sig-gun-01","tpage_name":"lsigklv-pris2"}],[150274059,{"idx":11,"name":"sig-glovetop","tpage_name":"lsigklv-pris2"}],[150274058,{"idx":10,"name":"sig-glove","tpage_name":"lsigklv-pris2"}],[150274057,{"idx":9,"name":"sig-gem-01","tpage_name":"lsigklv-pris2"}],[150274056,{"idx":8,"name":"sig-flask","tpage_name":"lsigklv-pris2"}],[151519235,{"idx":3,"name":"holograph-env-scan","tpage_name":"ltnfxhip-warp"}],[150274055,{"idx":7,"name":"sig-facert","tpage_name":"lsigklv-pris2"}],[151519234,{"idx":2,"name":"holograph-env-rim","tpage_name":"ltnfxhip-warp"}],[150274054,{"idx":6,"name":"sig-faceleft","tpage_name":"lsigklv-pris2"}],[151519233,{"idx":1,"name":"holograph-env-noise","tpage_name":"ltnfxhip-warp"}],[150274053,{"idx":5,"name":"sig-eyelid","tpage_name":"lsigklv-pris2"}],[151519232,{"idx":0,"name":"holograph-env-rim-dest","tpage_name":"ltnfxhip-warp"}],[150274052,{"idx":4,"name":"sig-eye","tpage_name":"lsigklv-pris2"}],[150274051,{"idx":3,"name":"sig-belt","tpage_name":"lsigklv-pris2"}],[150274050,{"idx":2,"name":"environment-oldmetal","tpage_name":"lsigklv-pris2"}],[150274049,{"idx":1,"name":"charHOLD","tpage_name":"lsigklv-pris2"}],[150274048,{"idx":0,"name":"bam-eyelight","tpage_name":"lsigklv-pris2"}],[149553159,{"idx":7,"name":"facc-markings-04","tpage_name":"lfacrm2-shrub"}],[149553158,{"idx":6,"name":"facc-markings-03","tpage_name":"lfacrm2-shrub"}],[149553157,{"idx":5,"name":"facc-markings-01","tpage_name":"lfacrm2-shrub"}],[149553156,{"idx":4,"name":"facc-markings-05","tpage_name":"lfacrm2-shrub"}],[149553155,{"idx":3,"name":"facc-markings-06","tpage_name":"lfacrm2-shrub"}],[149553154,{"idx":2,"name":"facc-markings-02","tpage_name":"lfacrm2-shrub"}],[149553153,{"idx":1,"name":"facc-bolt-01","tpage_name":"lfacrm2-shrub"}],[149553152,{"idx":0,"name":"facc-bolt-02","tpage_name":"lfacrm2-shrub"}],[149028867,{"idx":3,"name":"gun-tip","tpage_name":"gungame1-pris"}],[149028866,{"idx":2,"name":"gun-main","tpage_name":"gungame1-pris"}],[149028865,{"idx":1,"name":"gun-laser","tpage_name":"gungame1-pris"}],[149028864,{"idx":0,"name":"gun-barrel-alt","tpage_name":"gungame1-pris"}],[153747465,{"idx":9,"name":"city-ind-stain-02","tpage_name":"mhcityb-vis-shrub"}],[152502285,{"idx":13,"name":"temple_metal02","tpage_name":"templex-vis-tfrag"}],[148766745,{"idx":25,"name":"jakchires-hair","tpage_name":"warpcast-pris"}],[156237824,{"idx":0,"name":"hud-kg-bombbot-hud-01","tpage_name":"lbombbot-minimap"}],[153747464,{"idx":8,"name":"mhcity-goo-plants","tpage_name":"mhcityb-vis-shrub"}],[152502284,{"idx":12,"name":"temple_sandstone_box01","tpage_name":"templex-vis-tfrag"}],[148766744,{"idx":24,"name":"jakchires-glovetop","tpage_name":"warpcast-pris"}],[152502283,{"idx":11,"name":"temple_sandstone_star01","tpage_name":"templex-vis-tfrag"}],[148766743,{"idx":23,"name":"jakchires-facert","tpage_name":"warpcast-pris"}],[153747462,{"idx":6,"name":"city-wire","tpage_name":"mhcityb-vis-shrub"}],[152502282,{"idx":10,"name":"temple_sandstone_stepside01","tpage_name":"templex-vis-tfrag"}],[148766742,{"idx":22,"name":"jakchires-facelft","tpage_name":"warpcast-pris"}],[152502281,{"idx":9,"name":"temple_sandstone_trim02","tpage_name":"templex-vis-tfrag"}],[148766741,{"idx":21,"name":"jakchires-eyelid","tpage_name":"warpcast-pris"}],[153747460,{"idx":4,"name":"mhcity-plant-light-01","tpage_name":"mhcityb-vis-shrub"}],[152502280,{"idx":8,"name":"wstd-torchbowl-coal-01","tpage_name":"templex-vis-tfrag"}],[148766740,{"idx":20,"name":"jakchires-eyebrow","tpage_name":"warpcast-pris"}],[153747459,{"idx":3,"name":"mhcity-plant-01","tpage_name":"mhcityb-vis-shrub"}],[152502279,{"idx":7,"name":"temple_sandstone_ground01","tpage_name":"templex-vis-tfrag"}],[148766739,{"idx":19,"name":"jakchires-eye","tpage_name":"warpcast-pris"}],[153747458,{"idx":2,"name":"mhcity-grunt-egg-horns-01","tpage_name":"mhcityb-vis-shrub"}],[152502278,{"idx":6,"name":"temple_sandstone_taper01","tpage_name":"templex-vis-tfrag"}],[148766738,{"idx":18,"name":"jakchires-clips","tpage_name":"warpcast-pris"}],[153747457,{"idx":1,"name":"mhcity-eggskin","tpage_name":"mhcityb-vis-shrub"}],[152502277,{"idx":5,"name":"temple_sandstone_pill01","tpage_name":"templex-vis-tfrag"}],[148766737,{"idx":17,"name":"jakchires-chestplate","tpage_name":"warpcast-pris"}],[153747456,{"idx":0,"name":"mhcity-grunt-egg-rim-01","tpage_name":"mhcityb-vis-shrub"}],[152502276,{"idx":4,"name":"temple_sandstone_trim01","tpage_name":"templex-vis-tfrag"}],[148766736,{"idx":16,"name":"jakchires-brwnleather","tpage_name":"warpcast-pris"}],[152502275,{"idx":3,"name":"temple_sandstone01","tpage_name":"templex-vis-tfrag"}],[148766735,{"idx":15,"name":"jakchires-brownstrap","tpage_name":"warpcast-pris"}],[152502274,{"idx":2,"name":"temple_sandstone_base01","tpage_name":"templex-vis-tfrag"}],[148766734,{"idx":14,"name":"jakchires-blackstrap","tpage_name":"warpcast-pris"}],[152502273,{"idx":1,"name":"temple_bark01","tpage_name":"templex-vis-tfrag"}],[148766733,{"idx":13,"name":"jakchires-arm","tpage_name":"warpcast-pris"}],[152502272,{"idx":0,"name":"temple_sandstone_out_01","tpage_name":"templex-vis-tfrag"}],[148766732,{"idx":12,"name":"jakc-wristband-a2","tpage_name":"warpcast-pris"}],[163577859,{"idx":3,"name":"security-env-uscroll","tpage_name":"comba-water"}],[151126059,{"idx":43,"name":"jakchires-horn","tpage_name":"combx-pris"}],[147390519,{"idx":55,"name":"switch-body-02","tpage_name":"powergd-pris"}],[163577858,{"idx":2,"name":"security-dot-src","tpage_name":"comba-water"}],[151126058,{"idx":42,"name":"jakchires-hair","tpage_name":"combx-pris"}],[147390518,{"idx":54,"name":"switch-body-01","tpage_name":"powergd-pris"}],[163577857,{"idx":1,"name":"security-env-dest","tpage_name":"comba-water"}],[151126057,{"idx":41,"name":"jakchires-glovetop","tpage_name":"combx-pris"}],[147390517,{"idx":53,"name":"squid-drabgun","tpage_name":"powergd-pris"}],[163577856,{"idx":0,"name":"security-dot-dest","tpage_name":"comba-water"}],[151126056,{"idx":40,"name":"jakchires-facert","tpage_name":"combx-pris"}],[147390516,{"idx":52,"name":"cipher-side-03","tpage_name":"powergd-pris"}],[151126055,{"idx":39,"name":"jakchires-facelft","tpage_name":"combx-pris"}],[147390515,{"idx":51,"name":"cipher-side-02","tpage_name":"powergd-pris"}],[151126054,{"idx":38,"name":"jakchires-eyelid","tpage_name":"combx-pris"}],[147390514,{"idx":50,"name":"cipher-side-01","tpage_name":"powergd-pris"}],[151126053,{"idx":37,"name":"jakchires-eyebrow","tpage_name":"combx-pris"}],[147390513,{"idx":49,"name":"cipher-drum-03","tpage_name":"powergd-pris"}],[151126052,{"idx":36,"name":"jakchires-eye","tpage_name":"combx-pris"}],[147390512,{"idx":48,"name":"cipher-drum-02","tpage_name":"powergd-pris"}],[151126051,{"idx":35,"name":"jakchires-clips","tpage_name":"combx-pris"}],[147390511,{"idx":47,"name":"cipher-drum-01","tpage_name":"powergd-pris"}],[151126050,{"idx":34,"name":"jakchires-chestplate","tpage_name":"combx-pris"}],[147390510,{"idx":46,"name":"grunt-vector-eye-01","tpage_name":"powergd-pris"}],[151126049,{"idx":33,"name":"jakchires-brwnleather","tpage_name":"combx-pris"}],[147390509,{"idx":45,"name":"grunt-vector-02","tpage_name":"powergd-pris"}],[151126048,{"idx":32,"name":"jakchires-brownstrap","tpage_name":"combx-pris"}],[147390508,{"idx":44,"name":"grunt-vector-01","tpage_name":"powergd-pris"}],[151126047,{"idx":31,"name":"jakchires-blackstrap","tpage_name":"combx-pris"}],[147390507,{"idx":43,"name":"sk-yellowfurnew","tpage_name":"powergd-pris"}],[151126046,{"idx":30,"name":"jakchires-arm","tpage_name":"combx-pris"}],[147390506,{"idx":42,"name":"sk-solidorangefur","tpage_name":"powergd-pris"}],[151126045,{"idx":29,"name":"jakc-wristband-a2","tpage_name":"combx-pris"}],[147390505,{"idx":41,"name":"sk-orange2yellowfur","tpage_name":"powergd-pris"}],[151126044,{"idx":28,"name":"jakc-wraps","tpage_name":"combx-pris"}],[147390504,{"idx":40,"name":"sk-ear","tpage_name":"powergd-pris"}],[151126043,{"idx":27,"name":"jakc-waistband2","tpage_name":"combx-pris"}],[147390503,{"idx":39,"name":"sk-eye-lid","tpage_name":"powergd-pris"}],[151126031,{"idx":15,"name":"daxterlense","tpage_name":"combx-pris"}],[147390491,{"idx":27,"name":"bam-leather-belt-blue","tpage_name":"powergd-pris"}],[151126030,{"idx":14,"name":"daxterhelmetplain","tpage_name":"combx-pris"}],[147390490,{"idx":26,"name":"bam-hairhilite","tpage_name":"powergd-pris"}],[151126029,{"idx":13,"name":"daxterheadwidenew","tpage_name":"combx-pris"}],[147390489,{"idx":25,"name":"widow-pod-gun-metal","tpage_name":"powergd-pris"}],[154861568,{"idx":0,"name":"turbo-circle","tpage_name":"destrack-sprite"}],[151126028,{"idx":12,"name":"daxtergoggles","tpage_name":"combx-pris"}],[147390488,{"idx":24,"name":"widow-dull-inards","tpage_name":"powergd-pris"}],[151126027,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"combx-pris"}],[147390487,{"idx":23,"name":"squid-bulb-sm","tpage_name":"powergd-pris"}],[151126026,{"idx":10,"name":"daxterfoot","tpage_name":"combx-pris"}],[147390486,{"idx":22,"name":"roboguard-shouldershield","tpage_name":"powergd-pris"}],[151126025,{"idx":9,"name":"daxterfinger","tpage_name":"combx-pris"}],[147390485,{"idx":21,"name":"roboguard-headshield","tpage_name":"powergd-pris"}],[151126024,{"idx":8,"name":"daxterear","tpage_name":"combx-pris"}],[147390484,{"idx":20,"name":"kg-grunt-rim-03","tpage_name":"powergd-pris"}],[151126023,{"idx":7,"name":"daxterbolt","tpage_name":"combx-pris"}],[147390483,{"idx":19,"name":"kg-grunt-rim-02","tpage_name":"powergd-pris"}],[151126022,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"combx-pris"}],[147390482,{"idx":18,"name":"kg-grunt-rim-01","tpage_name":"powergd-pris"}],[151126021,{"idx":5,"name":"daxterarm","tpage_name":"combx-pris"}],[147390481,{"idx":17,"name":"kg-grunt-cable-01","tpage_name":"powergd-pris"}],[151126020,{"idx":4,"name":"daxter-orange","tpage_name":"combx-pris"}],[147390480,{"idx":16,"name":"grunt-teeth-01","tpage_name":"powergd-pris"}],[151126019,{"idx":3,"name":"daxter-furhilite","tpage_name":"combx-pris"}],[147390479,{"idx":15,"name":"grunt-skin-03","tpage_name":"powergd-pris"}],[151126018,{"idx":2,"name":"daxter-eyelid","tpage_name":"combx-pris"}],[147390478,{"idx":14,"name":"grunt-skin-02","tpage_name":"powergd-pris"}],[151126017,{"idx":1,"name":"bam-hairhilite","tpage_name":"combx-pris"}],[147390477,{"idx":13,"name":"grunt-skin-01","tpage_name":"powergd-pris"}],[151126016,{"idx":0,"name":"bam-eyelight","tpage_name":"combx-pris"}],[147390476,{"idx":12,"name":"grunt-metal-01","tpage_name":"powergd-pris"}],[162791435,{"idx":11,"name":"rail-base-dark-01","tpage_name":"railc-tfrag"}],[146604095,{"idx":63,"name":"jakchires-teeth","tpage_name":"lforplnt-vis-pris"}],[162791434,{"idx":10,"name":"rail-base-mid-01","tpage_name":"railc-tfrag"}],[146604094,{"idx":62,"name":"jakchires-shoeteop","tpage_name":"lforplnt-vis-pris"}],[162791433,{"idx":9,"name":"rail-edge-01","tpage_name":"railc-tfrag"}],[146604093,{"idx":61,"name":"jakchires-shoemetal","tpage_name":"lforplnt-vis-pris"}],[162791432,{"idx":8,"name":"rail-light-blue","tpage_name":"railc-tfrag"}],[146604092,{"idx":60,"name":"jakchires-shoebottom","tpage_name":"lforplnt-vis-pris"}],[162791431,{"idx":7,"name":"rail-env-car-01","tpage_name":"railc-tfrag"}],[146604091,{"idx":59,"name":"jakchires-pants","tpage_name":"lforplnt-vis-pris"}],[146604090,{"idx":58,"name":"jakchires-lightbrownspat","tpage_name":"lforplnt-vis-pris"}],[146604089,{"idx":57,"name":"jakchires-leatherpouch","tpage_name":"lforplnt-vis-pris"}],[162791428,{"idx":4,"name":"comb-temp-dark","tpage_name":"railc-tfrag"}],[146604088,{"idx":56,"name":"jakchires-jacket","tpage_name":"lforplnt-vis-pris"}],[162791427,{"idx":3,"name":"comb-temp-glass","tpage_name":"railc-tfrag"}],[146604087,{"idx":55,"name":"jakchires-horn","tpage_name":"lforplnt-vis-pris"}],[162791426,{"idx":2,"name":"rail-patch-01","tpage_name":"railc-tfrag"}],[146604086,{"idx":54,"name":"jakchires-hair","tpage_name":"lforplnt-vis-pris"}],[146604085,{"idx":53,"name":"jakchires-glovetop","tpage_name":"lforplnt-vis-pris"}],[146604084,{"idx":52,"name":"jakchires-facert","tpage_name":"lforplnt-vis-pris"}],[146604083,{"idx":51,"name":"jakchires-facelft","tpage_name":"lforplnt-vis-pris"}],[146604082,{"idx":50,"name":"jakchires-eyelid","tpage_name":"lforplnt-vis-pris"}],[146604081,{"idx":49,"name":"jakchires-eyebrow","tpage_name":"lforplnt-vis-pris"}],[146604080,{"idx":48,"name":"jakchires-eye","tpage_name":"lforplnt-vis-pris"}],[146604079,{"idx":47,"name":"jakchires-clips","tpage_name":"lforplnt-vis-pris"}],[146604078,{"idx":46,"name":"jakchires-chestplate","tpage_name":"lforplnt-vis-pris"}],[146604077,{"idx":45,"name":"jakchires-brwnleather","tpage_name":"lforplnt-vis-pris"}],[146604076,{"idx":44,"name":"jakchires-brownstrap","tpage_name":"lforplnt-vis-pris"}],[146604075,{"idx":43,"name":"jakchires-blackstrap","tpage_name":"lforplnt-vis-pris"}],[146604074,{"idx":42,"name":"jakchires-arm","tpage_name":"lforplnt-vis-pris"}],[146604073,{"idx":41,"name":"jakc-wristband-a2","tpage_name":"lforplnt-vis-pris"}],[146604072,{"idx":40,"name":"jakc-wraps","tpage_name":"lforplnt-vis-pris"}],[146604071,{"idx":39,"name":"jakc-waistband2","tpage_name":"lforplnt-vis-pris"}],[153944073,{"idx":9,"name":"king-earing","tpage_name":"ldmpckgn-pris2"}],[151453713,{"idx":17,"name":"torn-hair-01","tpage_name":"ltnfxhip-pris2"}],[150208533,{"idx":21,"name":"klever-gunmetal-05","tpage_name":"lsigklv-pris"}],[146472993,{"idx":33,"name":"facc-markings-01","tpage_name":"factoryc-vis-shrub"}],[153944072,{"idx":8,"name":"king-ear","tpage_name":"ldmpckgn-pris2"}],[151453712,{"idx":16,"name":"torn-gunbarrel-02","tpage_name":"ltnfxhip-pris2"}],[150208532,{"idx":20,"name":"klever-gunmetal-04","tpage_name":"lsigklv-pris"}],[146472992,{"idx":32,"name":"facc-markings-05","tpage_name":"factoryc-vis-shrub"}],[177471495,{"idx":7,"name":"rail-base-dark-01","tpage_name":"railb2-tfrag"}],[172490775,{"idx":23,"name":"precur-light-green-02","tpage_name":"precura-vis-tfrag"}],[146341995,{"idx":107,"name":"facc-redspot","tpage_name":"factoryc-vis-tfrag"}],[177471494,{"idx":6,"name":"rail-base-mid-01","tpage_name":"railb2-tfrag"}],[172490774,{"idx":22,"name":"precur-frame-small-01","tpage_name":"precura-vis-tfrag"}],[146341994,{"idx":106,"name":"facc-metal-panel-12","tpage_name":"factoryc-vis-tfrag"}],[177471493,{"idx":5,"name":"rail-edge-01","tpage_name":"railb2-tfrag"}],[172490773,{"idx":21,"name":"precur-plate-plain-01","tpage_name":"precura-vis-tfrag"}],[146341993,{"idx":105,"name":"facc-big-metal-panl01-hitweak","tpage_name":"factoryc-vis-tfrag"}],[178716672,{"idx":0,"name":"hud-des-beast","tpage_name":"deshover-minimap"}],[177471492,{"idx":4,"name":"rail-light-blue","tpage_name":"railb2-tfrag"}],[172490772,{"idx":20,"name":"precur-tubes-segment-02","tpage_name":"precura-vis-tfrag"}],[146341992,{"idx":104,"name":"facc-big-metal-panl04-hitweak","tpage_name":"factoryc-vis-tfrag"}],[177471491,{"idx":3,"name":"rail-patch-01","tpage_name":"railb2-tfrag"}],[172490771,{"idx":19,"name":"precur-wall-blade-01","tpage_name":"precura-vis-tfrag"}],[146341991,{"idx":103,"name":"facc-seam-metal-hitweak","tpage_name":"factoryc-vis-tfrag"}],[177471490,{"idx":2,"name":"comb-temp-glass","tpage_name":"railb2-tfrag"}],[172490770,{"idx":18,"name":"precur-tentacle-01","tpage_name":"precura-vis-tfrag"}],[146341990,{"idx":102,"name":"facc-metal-rim-03-hitweak","tpage_name":"factoryc-vis-tfrag"}],[177471489,{"idx":1,"name":"comb-temp-dark","tpage_name":"railb2-tfrag"}],[172490769,{"idx":17,"name":"precur-wall-groove-01","tpage_name":"precura-vis-tfrag"}],[146341989,{"idx":101,"name":"facc-redmetal-02","tpage_name":"factoryc-vis-tfrag"}],[172490768,{"idx":16,"name":"precur-pipe-round-01","tpage_name":"precura-vis-tfrag"}],[146341988,{"idx":100,"name":"facc-redmetaledge-01-hitweak","tpage_name":"factoryc-vis-tfrag"}],[146341987,{"idx":99,"name":"facc-redmetaledge-01","tpage_name":"factoryc-vis-tfrag"}],[172490766,{"idx":14,"name":"precur-tubes-bundle-01","tpage_name":"precura-vis-tfrag"}],[146341986,{"idx":98,"name":"fac-punch-wall--metal-edge-02","tpage_name":"factoryc-vis-tfrag"}],[172490765,{"idx":13,"name":"precur-tube-joint-02","tpage_name":"precura-vis-tfrag"}],[146341985,{"idx":97,"name":"fac-punch-wall--metal-edge-01","tpage_name":"factoryc-vis-tfrag"}],[172490764,{"idx":12,"name":"precur-tube-joint-01","tpage_name":"precura-vis-tfrag"}],[146341984,{"idx":96,"name":"facc-bigredplates-01-hitweak","tpage_name":"factoryc-vis-tfrag"}],[146341959,{"idx":71,"name":"facc-grill-02","tpage_name":"factoryc-vis-tfrag"}],[146341958,{"idx":70,"name":"facc-grill-01","tpage_name":"factoryc-vis-tfrag"}],[146341957,{"idx":69,"name":"facc-metal-rim-02","tpage_name":"factoryc-vis-tfrag"}],[146341956,{"idx":68,"name":"facc-metal-panel-07","tpage_name":"factoryc-vis-tfrag"}],[146341955,{"idx":67,"name":"facc-metal-rim-03","tpage_name":"factoryc-vis-tfrag"}],[146341954,{"idx":66,"name":"facc-metal-panel-10-hitweak","tpage_name":"factoryc-vis-tfrag"}],[146341953,{"idx":65,"name":"facc-floor-grill-01","tpage_name":"factoryc-vis-tfrag"}],[146341952,{"idx":64,"name":"facc-big-metal-panl02","tpage_name":"factoryc-vis-tfrag"}],[146341951,{"idx":63,"name":"facc-redmetal-01","tpage_name":"factoryc-vis-tfrag"}],[146341950,{"idx":62,"name":"facc-wheel-face-01","tpage_name":"factoryc-vis-tfrag"}],[146341949,{"idx":61,"name":"facc-wheel-rim-02","tpage_name":"factoryc-vis-tfrag"}],[146341948,{"idx":60,"name":"facc-wheel-rim-01","tpage_name":"factoryc-vis-tfrag"}],[146341945,{"idx":57,"name":"facc-bigredplates-01","tpage_name":"factoryc-vis-tfrag"}],[153813022,{"idx":30,"name":"mhcity-dirtymetal","tpage_name":"mhcityb-vis-pris"}],[146341942,{"idx":54,"name":"facc-beam-plat","tpage_name":"factoryc-vis-tfrag"}],[146341940,{"idx":52,"name":"facc-light-01","tpage_name":"factoryc-vis-tfrag"}],[146341939,{"idx":51,"name":"facc-light-02","tpage_name":"factoryc-vis-tfrag"}],[146341938,{"idx":50,"name":"facc-techwall-01","tpage_name":"factoryc-vis-tfrag"}],[146341937,{"idx":49,"name":"facc-wall-trim-02","tpage_name":"factoryc-vis-tfrag"}],[146341936,{"idx":48,"name":"facc-door-frame-02","tpage_name":"factoryc-vis-tfrag"}],[153813014,{"idx":22,"name":"mh-spawner-metal-01","tpage_name":"mhcityb-vis-pris"}],[146341934,{"idx":46,"name":"facc-beam-02","tpage_name":"factoryc-vis-tfrag"}],[153813012,{"idx":20,"name":"mh-spawner-02","tpage_name":"mhcityb-vis-pris"}],[146341932,{"idx":44,"name":"facc-redstriping-01-hitweak","tpage_name":"factoryc-vis-tfrag"}],[153813011,{"idx":19,"name":"mh-spawner-01","tpage_name":"mhcityb-vis-pris"}],[146341931,{"idx":43,"name":"facc-pipe-03","tpage_name":"factoryc-vis-tfrag"}],[153813010,{"idx":18,"name":"mhcity-wall-tentacle-01","tpage_name":"mhcityb-vis-pris"}],[146341930,{"idx":42,"name":"common-black","tpage_name":"factoryc-vis-tfrag"}],[153813008,{"idx":16,"name":"mhcity-tower-door-frame-01","tpage_name":"mhcityb-vis-pris"}],[146341928,{"idx":40,"name":"facc-sewer-floor","tpage_name":"factoryc-vis-tfrag"}],[153813006,{"idx":14,"name":"common-black","tpage_name":"mhcityb-vis-pris"}],[146341926,{"idx":38,"name":"facc-metal-ring-03","tpage_name":"factoryc-vis-tfrag"}],[153813002,{"idx":10,"name":"mhcity-eggskin","tpage_name":"mhcityb-vis-pris"}],[146341922,{"idx":34,"name":"facc-metal-panel-10","tpage_name":"factoryc-vis-tfrag"}],[153812999,{"idx":7,"name":"mhcity-grunt-egg-03","tpage_name":"mhcityb-vis-pris"}],[146341919,{"idx":31,"name":"facc-floor-trim","tpage_name":"factoryc-vis-tfrag"}],[153812998,{"idx":6,"name":"mhcity-vein-01","tpage_name":"mhcityb-vis-pris"}],[146341918,{"idx":30,"name":"facc-corrugate-01","tpage_name":"factoryc-vis-tfrag"}],[153812997,{"idx":5,"name":"mhcity-grunt-egg-rim-01","tpage_name":"mhcityb-vis-pris"}],[146341917,{"idx":29,"name":"facc-redstriping-01","tpage_name":"factoryc-vis-tfrag"}],[153812996,{"idx":4,"name":"mhcity-grunt-egg-neck-01","tpage_name":"mhcityb-vis-pris"}],[146341916,{"idx":28,"name":"facc-seam-metal","tpage_name":"factoryc-vis-tfrag"}],[153812995,{"idx":3,"name":"mhcity-grunt-egg-gem-01","tpage_name":"mhcityb-vis-pris"}],[146341915,{"idx":27,"name":"facc-pipe-rim-01","tpage_name":"factoryc-vis-tfrag"}],[153812994,{"idx":2,"name":"mhcity-grunt-egg-bulbtop-01","tpage_name":"mhcityb-vis-pris"}],[152567814,{"idx":6,"name":"temple_sandstone_ground01","tpage_name":"templex-vis-shrub"}],[146341914,{"idx":26,"name":"facc-bigpipe-01","tpage_name":"factoryc-vis-tfrag"}],[153812993,{"idx":1,"name":"mhcity-grunt-egg-bulb-01","tpage_name":"mhcityb-vis-pris"}],[146341913,{"idx":25,"name":"facc-big-metal-panl04","tpage_name":"factoryc-vis-tfrag"}],[153812992,{"idx":0,"name":"mhcity-grunt-egg-base-01","tpage_name":"mhcityb-vis-pris"}],[146341912,{"idx":24,"name":"facc-panel-01","tpage_name":"factoryc-vis-tfrag"}],[152567811,{"idx":3,"name":"wstd-torchbowl-coal-01","tpage_name":"templex-vis-shrub"}],[146341911,{"idx":23,"name":"facc-pipe-02","tpage_name":"factoryc-vis-tfrag"}],[152567810,{"idx":2,"name":"for-shrub-grass","tpage_name":"templex-vis-shrub"}],[146341910,{"idx":22,"name":"facc-panel-03","tpage_name":"factoryc-vis-tfrag"}],[152567809,{"idx":1,"name":"temple_leaf01","tpage_name":"templex-vis-shrub"}],[146341909,{"idx":21,"name":"facc-panel-02","tpage_name":"factoryc-vis-tfrag"}],[152567808,{"idx":0,"name":"temple_leaf02","tpage_name":"templex-vis-shrub"}],[146341908,{"idx":20,"name":"facc-wall-rnd-light-01","tpage_name":"factoryc-vis-tfrag"}],[146341907,{"idx":19,"name":"facc-panel-06","tpage_name":"factoryc-vis-tfrag"}],[146341906,{"idx":18,"name":"facc-pipe-01","tpage_name":"factoryc-vis-tfrag"}],[146341905,{"idx":17,"name":"facc-panel-04","tpage_name":"factoryc-vis-tfrag"}],[146341904,{"idx":16,"name":"facc-panel-05","tpage_name":"factoryc-vis-tfrag"}],[146341903,{"idx":15,"name":"facc-arches-01","tpage_name":"factoryc-vis-tfrag"}],[146341902,{"idx":14,"name":"facc-big-metal-panl01","tpage_name":"factoryc-vis-tfrag"}],[146341901,{"idx":13,"name":"fac-tower-pipe-01","tpage_name":"factoryc-vis-tfrag"}],[146341900,{"idx":12,"name":"facb_temp_medium","tpage_name":"factoryc-vis-tfrag"}],[145489936,{"idx":16,"name":"sniper-core-glow-01","tpage_name":"lctysnpr-tfrag"}],[145489935,{"idx":15,"name":"cty-sniper-red","tpage_name":"lctysnpr-tfrag"}],[145489934,{"idx":14,"name":"kgt-gun01","tpage_name":"lctysnpr-tfrag"}],[145489933,{"idx":13,"name":"kgt-rim01","tpage_name":"lctysnpr-tfrag"}],[145489931,{"idx":11,"name":"kgt-gun02","tpage_name":"lctysnpr-tfrag"}],[145489930,{"idx":10,"name":"kgt-gun03","tpage_name":"lctysnpr-tfrag"}],[145489929,{"idx":9,"name":"common-black","tpage_name":"lctysnpr-tfrag"}],[145489928,{"idx":8,"name":"snip-trt-metal-08","tpage_name":"lctysnpr-tfrag"}],[145489927,{"idx":7,"name":"snip-trt-metal-06","tpage_name":"lctysnpr-tfrag"}],[145489926,{"idx":6,"name":"snip-trt-metal-07","tpage_name":"lctysnpr-tfrag"}],[145489925,{"idx":5,"name":"snip-trt-metal-05","tpage_name":"lctysnpr-tfrag"}],[145489924,{"idx":4,"name":"snip-trt-metal-02","tpage_name":"lctysnpr-tfrag"}],[145489923,{"idx":3,"name":"snip-trt-metal-bolt","tpage_name":"lctysnpr-tfrag"}],[145489922,{"idx":2,"name":"snip-trt-metal-01","tpage_name":"lctysnpr-tfrag"}],[145489921,{"idx":1,"name":"snip-trt-metal-04","tpage_name":"lctysnpr-tfrag"}],[145489920,{"idx":0,"name":"snip-trt-metal-03","tpage_name":"lctysnpr-tfrag"}],[144834584,{"idx":24,"name":"common-black","tpage_name":"combn-tfrag"}],[145752064,{"idx":0,"name":"hud-vehicle-health-bar-01","tpage_name":"wasdefen-minimap"}],[144506884,{"idx":4,"name":"dax-msl-lnch-clamp-01","tpage_name":"lpatkcs-tfrag"}],[144048130,{"idx":2,"name":"map-ctymarka","tpage_name":"mhcityb-minimap"}],[144048128,{"idx":0,"name":"map-ctyfarmb","tpage_name":"mhcityb-minimap"}],[144834582,{"idx":22,"name":"comb-tarn-wall-01","tpage_name":"combn-tfrag"}],[143589402,{"idx":26,"name":"comb-redmarker","tpage_name":"combc-tfrag"}],[144834580,{"idx":20,"name":"comb-crct-medium","tpage_name":"combn-tfrag"}],[143589400,{"idx":24,"name":"rail-rock-01","tpage_name":"combc-tfrag"}],[144834579,{"idx":19,"name":"comb-crct-small-drk","tpage_name":"combn-tfrag"}],[143589399,{"idx":23,"name":"rail-pipe-02","tpage_name":"combc-tfrag"}],[144834575,{"idx":15,"name":"minc-pre-11","tpage_name":"combn-tfrag"}],[143589395,{"idx":19,"name":"rail-light-yellow-small","tpage_name":"combc-tfrag"}],[144834574,{"idx":14,"name":"minc-pre-04","tpage_name":"combn-tfrag"}],[143589394,{"idx":18,"name":"rail-pipe-03","tpage_name":"combc-tfrag"}],[144834573,{"idx":13,"name":"minc-pre-10","tpage_name":"combn-tfrag"}],[143589393,{"idx":17,"name":"rail-pipe-01","tpage_name":"combc-tfrag"}],[144834572,{"idx":12,"name":"minc-01","tpage_name":"combn-tfrag"}],[143589392,{"idx":16,"name":"rail-cord-01","tpage_name":"combc-tfrag"}],[144834571,{"idx":11,"name":"min-env-mar-01","tpage_name":"combn-tfrag"}],[143589391,{"idx":15,"name":"rail-detail-01","tpage_name":"combc-tfrag"}],[143327247,{"idx":15,"name":"pow-green-edge-05","tpage_name":"powergd-tfrag"}],[143327246,{"idx":14,"name":"pow-green-edge-04","tpage_name":"powergd-tfrag"}],[143327245,{"idx":13,"name":"pow-green-tile-05","tpage_name":"powergd-tfrag"}],[143327244,{"idx":12,"name":"pow-green-tile-04","tpage_name":"powergd-tfrag"}],[143327243,{"idx":11,"name":"pow-green-tile-02","tpage_name":"powergd-tfrag"}],[143327242,{"idx":10,"name":"pow-green-tile-01","tpage_name":"powergd-tfrag"}],[143327241,{"idx":9,"name":"pow-green-tile-03","tpage_name":"powergd-tfrag"}],[143327240,{"idx":8,"name":"common-black","tpage_name":"powergd-tfrag"}],[143327239,{"idx":7,"name":"pow-green-edge-01","tpage_name":"powergd-tfrag"}],[142016553,{"idx":41,"name":"fac-elevator-side-01","tpage_name":"lfacrm2-tfrag"}],[154468352,{"idx":0,"name":"water-splat","tpage_name":"lforplnt-sprite"}],[142016552,{"idx":40,"name":"facc-floor-trim","tpage_name":"lfacrm2-tfrag"}],[142016551,{"idx":39,"name":"facc-metal-panel-07","tpage_name":"lfacrm2-tfrag"}],[142016550,{"idx":38,"name":"facc-big-metal-panl01","tpage_name":"lfacrm2-tfrag"}],[142016549,{"idx":37,"name":"facc-beam-02","tpage_name":"lfacrm2-tfrag"}],[142016548,{"idx":36,"name":"facc-seam-metal-hitweak","tpage_name":"lfacrm2-tfrag"}],[142016547,{"idx":35,"name":"facc-metal-panel-10-hitweak","tpage_name":"lfacrm2-tfrag"}],[142016546,{"idx":34,"name":"facc-metal-rim-03-hitweak","tpage_name":"lfacrm2-tfrag"}],[142016545,{"idx":33,"name":"fac-elevator-top-01","tpage_name":"lfacrm2-tfrag"}],[142016544,{"idx":32,"name":"fac-elevator-side-02","tpage_name":"lfacrm2-tfrag"}],[142016543,{"idx":31,"name":"fac-elevator-rail-02","tpage_name":"lfacrm2-tfrag"}],[142016542,{"idx":30,"name":"fac-elevator-rail-01","tpage_name":"lfacrm2-tfrag"}],[142016541,{"idx":29,"name":"facc-light-01","tpage_name":"lfacrm2-tfrag"}],[142016540,{"idx":28,"name":"facc-light-02","tpage_name":"lfacrm2-tfrag"}],[142016538,{"idx":26,"name":"facc-arches-01","tpage_name":"lfacrm2-tfrag"}],[142016536,{"idx":24,"name":"facc-pipe-03","tpage_name":"lfacrm2-tfrag"}],[142016535,{"idx":23,"name":"facc-door-frame-01","tpage_name":"lfacrm2-tfrag"}],[142016534,{"idx":22,"name":"facc-door-frame-02","tpage_name":"lfacrm2-tfrag"}],[142016533,{"idx":21,"name":"common-black","tpage_name":"lfacrm2-tfrag"}],[142016532,{"idx":20,"name":"facc-big-metal-panl04","tpage_name":"lfacrm2-tfrag"}],[144506891,{"idx":11,"name":"dax-msl-lnch-table-01","tpage_name":"lpatkcs-tfrag"}],[142016531,{"idx":19,"name":"facc-wall-rnd-light-01","tpage_name":"lfacrm2-tfrag"}],[144506890,{"idx":10,"name":"dax-msl-lnch-table-side-01","tpage_name":"lpatkcs-tfrag"}],[142016530,{"idx":18,"name":"facc-panel-06","tpage_name":"lfacrm2-tfrag"}],[144506889,{"idx":9,"name":"dax-msl-lnch-side-01","tpage_name":"lpatkcs-tfrag"}],[142016529,{"idx":17,"name":"facc-panel-01","tpage_name":"lfacrm2-tfrag"}],[144506888,{"idx":8,"name":"dax-msl-lnch-side-rim-01","tpage_name":"lpatkcs-tfrag"}],[142016528,{"idx":16,"name":"facc-pipe-02","tpage_name":"lfacrm2-tfrag"}],[144506887,{"idx":7,"name":"dax-msl-lnch-table-box-01","tpage_name":"lpatkcs-tfrag"}],[142016527,{"idx":15,"name":"facc-panel-03","tpage_name":"lfacrm2-tfrag"}],[144506886,{"idx":6,"name":"dax-msl-lnch-pipe-01","tpage_name":"lpatkcs-tfrag"}],[142016526,{"idx":14,"name":"facc-panel-02","tpage_name":"lfacrm2-tfrag"}],[144506885,{"idx":5,"name":"dax-msl-lnch-rim-01","tpage_name":"lpatkcs-tfrag"}],[142016525,{"idx":13,"name":"facc-pipe-01","tpage_name":"lfacrm2-tfrag"}],[144506883,{"idx":3,"name":"missle-launcher-shaft-01","tpage_name":"lpatkcs-tfrag"}],[142016523,{"idx":11,"name":"facc-wall-01","tpage_name":"lfacrm2-tfrag"}],[144506882,{"idx":2,"name":"missle-launcher-panel-03","tpage_name":"lpatkcs-tfrag"}],[142016522,{"idx":10,"name":"facc-panel-04","tpage_name":"lfacrm2-tfrag"}],[142016521,{"idx":9,"name":"facc-panel-05","tpage_name":"lfacrm2-tfrag"}],[144506880,{"idx":0,"name":"missle-launcher-gear-01","tpage_name":"lpatkcs-tfrag"}],[142016520,{"idx":8,"name":"facc-bigredplates-01","tpage_name":"lfacrm2-tfrag"}],[142016516,{"idx":4,"name":"facc-alt-wall","tpage_name":"lfacrm2-tfrag"}],[142016515,{"idx":3,"name":"facc-sewer-floor","tpage_name":"lfacrm2-tfrag"}],[142016512,{"idx":0,"name":"facc-metal-panel-11","tpage_name":"lfacrm2-tfrag"}],[146604070,{"idx":38,"name":"jakc-skirt","tpage_name":"lforplnt-vis-pris"}],[140378170,{"idx":58,"name":"jakchires-teeth","tpage_name":"minee-pris"}],[157810689,{"idx":1,"name":"hud-gladiator","tpage_name":"desoasis-minimap"}],[146604069,{"idx":37,"name":"jakc-scarfhanging","tpage_name":"lforplnt-vis-pris"}],[140378169,{"idx":57,"name":"jakchires-shoeteop","tpage_name":"minee-pris"}],[157810688,{"idx":0,"name":"hud-ashlyn-head","tpage_name":"desoasis-minimap"}],[146604068,{"idx":36,"name":"jakc-scarf","tpage_name":"lforplnt-vis-pris"}],[140378168,{"idx":56,"name":"jakchires-shoemetal","tpage_name":"minee-pris"}],[146604067,{"idx":35,"name":"jakc-lens","tpage_name":"lforplnt-vis-pris"}],[140378167,{"idx":55,"name":"jakchires-shoebottom","tpage_name":"minee-pris"}],[156565506,{"idx":2,"name":"dust-sparkle","tpage_name":"mhcitya-sprite"}],[146604066,{"idx":34,"name":"jakc-gogglemetal","tpage_name":"lforplnt-vis-pris"}],[140378166,{"idx":54,"name":"jakchires-precarmor-01","tpage_name":"minee-pris"}],[146604062,{"idx":30,"name":"daxtertuft","tpage_name":"lforplnt-vis-pris"}],[140378162,{"idx":50,"name":"jakchires-jacket","tpage_name":"minee-pris"}],[146604061,{"idx":29,"name":"daxterteeth","tpage_name":"lforplnt-vis-pris"}],[140378161,{"idx":49,"name":"jakchires-horn","tpage_name":"minee-pris"}],[146604060,{"idx":28,"name":"daxternose","tpage_name":"lforplnt-vis-pris"}],[140378160,{"idx":48,"name":"jakchires-hair","tpage_name":"minee-pris"}],[146604059,{"idx":27,"name":"daxterlense","tpage_name":"lforplnt-vis-pris"}],[140378159,{"idx":47,"name":"jakchires-glovetop","tpage_name":"minee-pris"}],[146604058,{"idx":26,"name":"daxterhelmetplain","tpage_name":"lforplnt-vis-pris"}],[140378158,{"idx":46,"name":"jakchires-facert","tpage_name":"minee-pris"}],[146604057,{"idx":25,"name":"daxterheadwidenew","tpage_name":"lforplnt-vis-pris"}],[140378157,{"idx":45,"name":"jakchires-facelft","tpage_name":"minee-pris"}],[152829956,{"idx":4,"name":"fac-punch-wall-glass-edge-01","tpage_name":"factoryc-vis-water"}],[146604056,{"idx":24,"name":"daxtergoggles","tpage_name":"lforplnt-vis-pris"}],[140378156,{"idx":44,"name":"jakchires-eyelid","tpage_name":"minee-pris"}],[152829955,{"idx":3,"name":"fac-punch-wall-glass-01","tpage_name":"factoryc-vis-water"}],[146604055,{"idx":23,"name":"daxterfoot-bottom","tpage_name":"lforplnt-vis-pris"}],[140378155,{"idx":43,"name":"jakchires-eyebrow","tpage_name":"minee-pris"}],[146604054,{"idx":22,"name":"daxterfoot","tpage_name":"lforplnt-vis-pris"}],[140378154,{"idx":42,"name":"jakchires-eye","tpage_name":"minee-pris"}],[146604053,{"idx":21,"name":"daxterfinger","tpage_name":"lforplnt-vis-pris"}],[140378153,{"idx":41,"name":"jakchires-clips","tpage_name":"minee-pris"}],[146604052,{"idx":20,"name":"daxterear","tpage_name":"lforplnt-vis-pris"}],[144113692,{"idx":28,"name":"rail-light-red","tpage_name":"combd-tfrag"}],[140378152,{"idx":40,"name":"jakchires-chestplate","tpage_name":"minee-pris"}],[146604051,{"idx":19,"name":"daxterbolt","tpage_name":"lforplnt-vis-pris"}],[144113691,{"idx":27,"name":"comb-redmarker","tpage_name":"combd-tfrag"}],[140378151,{"idx":39,"name":"jakchires-brwnleather","tpage_name":"minee-pris"}],[146604050,{"idx":18,"name":"daxterbodyshort-eix","tpage_name":"lforplnt-vis-pris"}],[144113690,{"idx":26,"name":"rail-env-wall-01","tpage_name":"combd-tfrag"}],[140378150,{"idx":38,"name":"jakchires-brownstrap","tpage_name":"minee-pris"}],[146604049,{"idx":17,"name":"daxterarm","tpage_name":"lforplnt-vis-pris"}],[144113689,{"idx":25,"name":"rail-fit-01","tpage_name":"combd-tfrag"}],[140378149,{"idx":37,"name":"jakchires-blackstrap","tpage_name":"minee-pris"}],[146604048,{"idx":16,"name":"daxter-orange","tpage_name":"lforplnt-vis-pris"}],[144113688,{"idx":24,"name":"rail-tread-01","tpage_name":"combd-tfrag"}],[140378148,{"idx":36,"name":"jakchires-arm","tpage_name":"minee-pris"}],[146604047,{"idx":15,"name":"daxter-furhilite","tpage_name":"lforplnt-vis-pris"}],[144113687,{"idx":23,"name":"rail-rock-01","tpage_name":"combd-tfrag"}],[140378147,{"idx":35,"name":"jakc-wristband-a2","tpage_name":"minee-pris"}],[146604046,{"idx":14,"name":"daxter-eyelid","tpage_name":"lforplnt-vis-pris"}],[144113686,{"idx":22,"name":"rail-pipe-02","tpage_name":"combd-tfrag"}],[140378146,{"idx":34,"name":"jakc-wraps","tpage_name":"minee-pris"}],[146604045,{"idx":13,"name":"bam-hairhilite","tpage_name":"lforplnt-vis-pris"}],[144113685,{"idx":21,"name":"rail-pipe-05","tpage_name":"combd-tfrag"}],[140378145,{"idx":33,"name":"jakc-waistband2","tpage_name":"minee-pris"}],[150339584,{"idx":0,"name":"sig-flatfangs","tpage_name":"lsigklv-water"}],[146604044,{"idx":12,"name":"bam-eyelight","tpage_name":"lforplnt-vis-pris"}],[144113684,{"idx":20,"name":"rail-gray-metal-01","tpage_name":"combd-tfrag"}],[140378144,{"idx":32,"name":"jakc-skirt","tpage_name":"minee-pris"}],[146604043,{"idx":11,"name":"jakchires-precarmor-01","tpage_name":"lforplnt-vis-pris"}],[144113683,{"idx":19,"name":"rail-light-yellow","tpage_name":"combd-tfrag"}],[140378143,{"idx":31,"name":"jakc-scarfhanging","tpage_name":"minee-pris"}],[149094402,{"idx":2,"name":"gun-red-mag","tpage_name":"gungame2-pris"}],[146604042,{"idx":10,"name":"mh-plant-legs","tpage_name":"lforplnt-vis-pris"}],[144113682,{"idx":18,"name":"rail-pipe-03","tpage_name":"combd-tfrag"}],[140378142,{"idx":30,"name":"jakc-scarf","tpage_name":"minee-pris"}],[149094401,{"idx":1,"name":"gun-red-glow","tpage_name":"gungame2-pris"}],[146604041,{"idx":9,"name":"mh-plant-head","tpage_name":"lforplnt-vis-pris"}],[144113681,{"idx":17,"name":"rail-pipe-01","tpage_name":"combd-tfrag"}],[140378141,{"idx":29,"name":"jakc-lens","tpage_name":"minee-pris"}],[149094400,{"idx":0,"name":"gun-main","tpage_name":"gungame2-pris"}],[146604040,{"idx":8,"name":"mh-gem-dest","tpage_name":"lforplnt-vis-pris"}],[144113680,{"idx":16,"name":"rail-cord-01","tpage_name":"combd-tfrag"}],[140378140,{"idx":28,"name":"jakc-gogglemetal","tpage_name":"minee-pris"}],[146604039,{"idx":7,"name":"mh-gem-alpha-02","tpage_name":"lforplnt-vis-pris"}],[144113679,{"idx":15,"name":"rail-detail-01","tpage_name":"combd-tfrag"}],[140378139,{"idx":27,"name":"jakc-chestplate-straps","tpage_name":"minee-pris"}],[146604038,{"idx":6,"name":"mh-gem-alpha-01","tpage_name":"lforplnt-vis-pris"}],[144113678,{"idx":14,"name":"rail-light-blue","tpage_name":"combd-tfrag"}],[140378138,{"idx":26,"name":"jakc-armor","tpage_name":"minee-pris"}],[146604037,{"idx":5,"name":"mh-gem","tpage_name":"lforplnt-vis-pris"}],[144113677,{"idx":13,"name":"rail-light-yellow-small","tpage_name":"combd-tfrag"}],[140378137,{"idx":25,"name":"environment-oldmetal","tpage_name":"minee-pris"}],[146604036,{"idx":4,"name":"nst-egg-spider-pipe","tpage_name":"lforplnt-vis-pris"}],[144113676,{"idx":12,"name":"rail-trim-01","tpage_name":"combd-tfrag"}],[140378136,{"idx":24,"name":"daxtertuft","tpage_name":"minee-pris"}],[146604035,{"idx":3,"name":"nst-egg-spider-metal","tpage_name":"lforplnt-vis-pris"}],[144113675,{"idx":11,"name":"rail-light-blue-small","tpage_name":"combd-tfrag"}],[140378135,{"idx":23,"name":"daxterteeth","tpage_name":"minee-pris"}],[146604034,{"idx":2,"name":"nst-egg-spider-eye","tpage_name":"lforplnt-vis-pris"}],[144113674,{"idx":10,"name":"rail-base-mid-01","tpage_name":"combd-tfrag"}],[140378134,{"idx":22,"name":"daxternose","tpage_name":"minee-pris"}],[146604033,{"idx":1,"name":"nst-egg-spider-egg","tpage_name":"lforplnt-vis-pris"}],[144113673,{"idx":9,"name":"rail-edge-01","tpage_name":"combd-tfrag"}],[140378133,{"idx":21,"name":"daxterlense","tpage_name":"minee-pris"}],[146604032,{"idx":0,"name":"nst-egg-spider-body","tpage_name":"lforplnt-vis-pris"}],[144113672,{"idx":8,"name":"rail-base-dark-01","tpage_name":"combd-tfrag"}],[140378132,{"idx":20,"name":"daxterhelmetplain","tpage_name":"minee-pris"}],[144113671,{"idx":7,"name":"rail-env-car-01","tpage_name":"combd-tfrag"}],[140378131,{"idx":19,"name":"daxterheadwidenew","tpage_name":"minee-pris"}],[140312576,{"idx":0,"name":"sewer-pipe-small-01","tpage_name":"minee-shrub"}],[146472961,{"idx":1,"name":"fac-fence-rim-01","tpage_name":"factoryc-vis-shrub"}],[140247061,{"idx":21,"name":"sewer-plate-02","tpage_name":"minee-tfrag"}],[140247051,{"idx":11,"name":"sewer-mantel-01","tpage_name":"minee-tfrag"}],[139657240,{"idx":24,"name":"keira-torch-nozzle-01","tpage_name":"lkeira-pris"}],[139657239,{"idx":23,"name":"keira-torch-guard-01","tpage_name":"lkeira-pris"}],[139657238,{"idx":22,"name":"keira-shoebottom","tpage_name":"lkeira-pris"}],[139657237,{"idx":21,"name":"keira-shirt","tpage_name":"lkeira-pris"}],[139657236,{"idx":20,"name":"keira-pantslarge","tpage_name":"lkeira-pris"}],[139657235,{"idx":19,"name":"keira-maskbolt","tpage_name":"lkeira-pris"}],[139657234,{"idx":18,"name":"keira-lens-large","tpage_name":"lkeira-pris"}],[139657233,{"idx":17,"name":"keira-largewraps","tpage_name":"lkeira-pris"}],[139657232,{"idx":16,"name":"keira-iris-64x64","tpage_name":"lkeira-pris"}],[139657231,{"idx":15,"name":"keira-handtop","tpage_name":"lkeira-pris"}],[139657230,{"idx":14,"name":"keira-handbottom","tpage_name":"lkeira-pris"}],[139657229,{"idx":13,"name":"keira-hair-newest","tpage_name":"lkeira-pris"}],[139657228,{"idx":12,"name":"keira-gogglestrap","tpage_name":"lkeira-pris"}],[139657227,{"idx":11,"name":"keira-glovenewlarge","tpage_name":"lkeira-pris"}],[139657226,{"idx":10,"name":"keira-glasses","tpage_name":"lkeira-pris"}],[142147585,{"idx":1,"name":"ceiling-dust","tpage_name":"templex-sprite"}],[139657225,{"idx":9,"name":"keira-face","tpage_name":"lkeira-pris"}],[139657224,{"idx":8,"name":"keira-eyelid","tpage_name":"lkeira-pris"}],[139657223,{"idx":7,"name":"keira-chokermetal","tpage_name":"lkeira-pris"}],[139657222,{"idx":6,"name":"keira-chokerhighres","tpage_name":"lkeira-pris"}],[139657221,{"idx":5,"name":"keira-brownstraps-new","tpage_name":"lkeira-pris"}],[139657220,{"idx":4,"name":"keira-blackstrap","tpage_name":"lkeira-pris"}],[139657217,{"idx":1,"name":"bam-hairhilite","tpage_name":"lkeira-pris"}],[139657216,{"idx":0,"name":"bam-eyelight","tpage_name":"lkeira-pris"}],[139591698,{"idx":18,"name":"daxtertuft","tpage_name":"ldax-pris"}],[139788302,{"idx":14,"name":"samos-log-02","tpage_name":"lsamos-pris2"}],[137297942,{"idx":22,"name":"torn-mouth","tpage_name":"citycast-pris2"}],[139788301,{"idx":13,"name":"samos-log-01","tpage_name":"lsamos-pris2"}],[137297941,{"idx":21,"name":"torn-metal2","tpage_name":"citycast-pris2"}],[139788300,{"idx":12,"name":"samos-lens","tpage_name":"lsamos-pris2"}],[137297940,{"idx":20,"name":"torn-legshield","tpage_name":"citycast-pris2"}],[154664960,{"idx":0,"name":"wascity-turret-hud-arrow-01","tpage_name":"wascityb-minimap"}],[137232440,{"idx":56,"name":"yellowcard01","tpage_name":"citycast-pris"}],[137232439,{"idx":55,"name":"palm-speaker","tpage_name":"citycast-pris"}],[137232438,{"idx":54,"name":"flatgerydark01","tpage_name":"citycast-pris"}],[137232436,{"idx":52,"name":"jakchires-teeth","tpage_name":"citycast-pris"}],[137232435,{"idx":51,"name":"jakchires-shoeteop","tpage_name":"citycast-pris"}],[137232434,{"idx":50,"name":"jakchires-shoemetal","tpage_name":"citycast-pris"}],[137232433,{"idx":49,"name":"jakchires-shoebottom","tpage_name":"citycast-pris"}],[137232432,{"idx":48,"name":"jakchires-precarmor-01","tpage_name":"citycast-pris"}],[137232431,{"idx":47,"name":"jakchires-pants","tpage_name":"citycast-pris"}],[143458330,{"idx":26,"name":"rail-light-red","tpage_name":"combb-tfrag"}],[137232430,{"idx":46,"name":"jakchires-lightbrownspat","tpage_name":"citycast-pris"}],[143458329,{"idx":25,"name":"rail-light-yellow","tpage_name":"combb-tfrag"}],[137232429,{"idx":45,"name":"jakchires-leatherpouch","tpage_name":"citycast-pris"}],[137232415,{"idx":31,"name":"jakchires-blackstrap","tpage_name":"citycast-pris"}],[139722752,{"idx":0,"name":"keira-mask","tpage_name":"lkeira-water"}],[137232392,{"idx":8,"name":"daxterear","tpage_name":"citycast-pris"}],[137232389,{"idx":5,"name":"daxterarm","tpage_name":"citycast-pris"}],[137232388,{"idx":4,"name":"daxter-orange","tpage_name":"citycast-pris"}],[137232387,{"idx":3,"name":"daxter-furhilite","tpage_name":"citycast-pris"}],[137232386,{"idx":2,"name":"daxter-eyelid","tpage_name":"citycast-pris"}],[137232385,{"idx":1,"name":"bam-hairhilite","tpage_name":"citycast-pris"}],[137035790,{"idx":14,"name":"sewer-screw-02","tpage_name":"lctysnpr-pris"}],[137035789,{"idx":13,"name":"sewer-plate-05","tpage_name":"lctysnpr-pris"}],[137035788,{"idx":12,"name":"sewer-plate-02","tpage_name":"lctysnpr-pris"}],[137035787,{"idx":11,"name":"sewer-pipe-rim-07","tpage_name":"lctysnpr-pris"}],[137035786,{"idx":10,"name":"sewer-metal-floor-01","tpage_name":"lctysnpr-pris"}],[137035785,{"idx":9,"name":"outer","tpage_name":"lctysnpr-pris"}],[137035784,{"idx":8,"name":"mid","tpage_name":"lctysnpr-pris"}],[137035783,{"idx":7,"name":"inner","tpage_name":"lctysnpr-pris"}],[135725082,{"idx":26,"name":"seem-uppertorso","tpage_name":"lseemwca-pris2"}],[135725081,{"idx":25,"name":"seem-teeth","tpage_name":"lseemwca-pris2"}],[135725080,{"idx":24,"name":"seem-straps","tpage_name":"lseemwca-pris2"}],[135725079,{"idx":23,"name":"seem-skirt-small","tpage_name":"lseemwca-pris2"}],[135725078,{"idx":22,"name":"seem-skirt","tpage_name":"lseemwca-pris2"}],[135725077,{"idx":21,"name":"seem-precmetal-plain","tpage_name":"lseemwca-pris2"}],[135725076,{"idx":20,"name":"seem-precmetal-edge","tpage_name":"lseemwca-pris2"}],[135725075,{"idx":19,"name":"seem-precmetal-chestplate-01","tpage_name":"lseemwca-pris2"}],[135725074,{"idx":18,"name":"seem-pipes-02","tpage_name":"lseemwca-pris2"}],[135725073,{"idx":17,"name":"seem-pipes-01","tpage_name":"lseemwca-pris2"}],[135725072,{"idx":16,"name":"seem-pipeend","tpage_name":"lseemwca-pris2"}],[135725071,{"idx":15,"name":"seem-headpiecetop","tpage_name":"lseemwca-pris2"}],[135725070,{"idx":14,"name":"seem-headgearback","tpage_name":"lseemwca-pris2"}],[135725069,{"idx":13,"name":"seem-hand","tpage_name":"lseemwca-pris2"}],[135725068,{"idx":12,"name":"seem-finger","tpage_name":"lseemwca-pris2"}],[135725067,{"idx":11,"name":"seem-face","tpage_name":"lseemwca-pris2"}],[135725066,{"idx":10,"name":"seem-eyelid","tpage_name":"lseemwca-pris2"}],[135725065,{"idx":9,"name":"seem-eye","tpage_name":"lseemwca-pris2"}],[135725064,{"idx":8,"name":"seem-ear","tpage_name":"lseemwca-pris2"}],[135725063,{"idx":7,"name":"seem-boottoe","tpage_name":"lseemwca-pris2"}],[135725062,{"idx":6,"name":"seem-bootmet","tpage_name":"lseemwca-pris2"}],[135725061,{"idx":5,"name":"seem-bootlower","tpage_name":"lseemwca-pris2"}],[135725060,{"idx":4,"name":"seem-bootleg","tpage_name":"lseemwca-pris2"}],[135659525,{"idx":5,"name":"lfacrm-hangar-tooth-01","tpage_name":"lfacrm1-pris"}],[135659524,{"idx":4,"name":"lfacrm-hangar-panel-rim-01","tpage_name":"lfacrm1-pris"}],[135659523,{"idx":3,"name":"lfacrm-hangar-panel-02","tpage_name":"lfacrm1-pris"}],[135659522,{"idx":2,"name":"lfacrm-hangar-panel-01","tpage_name":"lfacrm1-pris"}],[135659521,{"idx":1,"name":"lfacrm-hangar-edge-01","tpage_name":"lfacrm1-pris"}],[172818447,{"idx":15,"name":"precur-light-green-01","tpage_name":"precurd-vis-tfrag"}],[170328087,{"idx":23,"name":"rail-light-yellow-small","tpage_name":"combe-tfrag"}],[135463047,{"idx":135,"name":"dk-sat-shell-lod-01","tpage_name":"rubblea-vis-pris"}],[172818446,{"idx":14,"name":"precur-tube-honey-big","tpage_name":"precurd-vis-tfrag"}],[170328086,{"idx":22,"name":"rail-pipe-03","tpage_name":"combe-tfrag"}],[135463046,{"idx":134,"name":"dk-sat-rim-lod-01","tpage_name":"rubblea-vis-pris"}],[172818445,{"idx":13,"name":"precur-tube-joint-02","tpage_name":"precurd-vis-tfrag"}],[170328085,{"idx":21,"name":"rail-pipe-01","tpage_name":"combe-tfrag"}],[135463045,{"idx":133,"name":"dk-sat-shell-01","tpage_name":"rubblea-vis-pris"}],[172818444,{"idx":12,"name":"precur-tubes-bundle-01","tpage_name":"precurd-vis-tfrag"}],[170328084,{"idx":20,"name":"rail-detail-01","tpage_name":"combe-tfrag"}],[135463044,{"idx":132,"name":"dk-sat-screen-rim-01","tpage_name":"rubblea-vis-pris"}],[172818443,{"idx":11,"name":"precur-tube-joint-01","tpage_name":"precurd-vis-tfrag"}],[170328083,{"idx":19,"name":"rail-trim-01","tpage_name":"combe-tfrag"}],[135463043,{"idx":131,"name":"dk-sat-screen-01","tpage_name":"rubblea-vis-pris"}],[170328082,{"idx":18,"name":"rail-light-blue-small","tpage_name":"combe-tfrag"}],[135463042,{"idx":130,"name":"dk-sat-rim-bright-01","tpage_name":"rubblea-vis-pris"}],[172818441,{"idx":9,"name":"precur-plate-thin-01","tpage_name":"precurd-vis-tfrag"}],[170328081,{"idx":17,"name":"rail-base-mid-01","tpage_name":"combe-tfrag"}],[135463041,{"idx":129,"name":"dk-sat-rim-03","tpage_name":"rubblea-vis-pris"}],[172818440,{"idx":8,"name":"precur-tubes-segment-02","tpage_name":"precurd-vis-tfrag"}],[170328080,{"idx":16,"name":"rail-env-car-01","tpage_name":"combe-tfrag"}],[135463040,{"idx":128,"name":"dk-sat-rim-02","tpage_name":"rubblea-vis-pris"}],[172818439,{"idx":7,"name":"precur-wall-tube-01","tpage_name":"precurd-vis-tfrag"}],[170328079,{"idx":15,"name":"rail-patch-01","tpage_name":"combe-tfrag"}],[135463039,{"idx":127,"name":"dk-sat-rim-01","tpage_name":"rubblea-vis-pris"}],[172818438,{"idx":6,"name":"precur-wall-groove-01","tpage_name":"precurd-vis-tfrag"}],[170328078,{"idx":14,"name":"comb-env2","tpage_name":"combe-tfrag"}],[159121458,{"idx":50,"name":"city-ind-black","tpage_name":"slumbset-tfrag"}],[135463038,{"idx":126,"name":"dk-sat-panel-01","tpage_name":"rubblea-vis-pris"}],[170328077,{"idx":13,"name":"comb-pipe2","tpage_name":"combe-tfrag"}],[159121457,{"idx":49,"name":"ctyslumc-wall-trim-LOW","tpage_name":"slumbset-tfrag"}],[135463037,{"idx":125,"name":"dk-sat-claw-01","tpage_name":"rubblea-vis-pris"}],[172818436,{"idx":4,"name":"precur-tubes-small-01","tpage_name":"precurd-vis-tfrag"}],[159121456,{"idx":48,"name":"ctyslumc-window-panes-LOW","tpage_name":"slumbset-tfrag"}],[135463036,{"idx":124,"name":"dk-sat-cable-03","tpage_name":"rubblea-vis-pris"}],[172818435,{"idx":3,"name":"precur-plate-large-01","tpage_name":"precurd-vis-tfrag"}],[159121455,{"idx":47,"name":"city-tile-LOW","tpage_name":"slumbset-tfrag"}],[135463035,{"idx":123,"name":"dk-sat-cable-02","tpage_name":"rubblea-vis-pris"}],[172818434,{"idx":2,"name":"precur-tentacle-01","tpage_name":"precurd-vis-tfrag"}],[159121454,{"idx":46,"name":"cityslumc-awning-LOW","tpage_name":"slumbset-tfrag"}],[135463034,{"idx":122,"name":"dk-sat-cable-01","tpage_name":"rubblea-vis-pris"}],[172818433,{"idx":1,"name":"precur-wall-brace-01","tpage_name":"precurd-vis-tfrag"}],[159121453,{"idx":45,"name":"ctyslumc-grate1","tpage_name":"slumbset-tfrag"}],[135463033,{"idx":121,"name":"environment-darkprec","tpage_name":"rubblea-vis-pris"}],[152895498,{"idx":10,"name":"comb-crct-medium","tpage_name":"combx-tfrag"}],[135462978,{"idx":66,"name":"daxtertuft","tpage_name":"rubblea-vis-pris"}],[152895497,{"idx":9,"name":"comb-plate-02","tpage_name":"combx-tfrag"}],[135462977,{"idx":65,"name":"daxterteeth","tpage_name":"rubblea-vis-pris"}],[152895496,{"idx":8,"name":"comb-pipe2","tpage_name":"combx-tfrag"}],[135462976,{"idx":64,"name":"daxternose","tpage_name":"rubblea-vis-pris"}],[152895495,{"idx":7,"name":"minc-pre-11","tpage_name":"combx-tfrag"}],[135462975,{"idx":63,"name":"daxterlense","tpage_name":"rubblea-vis-pris"}],[152895494,{"idx":6,"name":"minc-pre-04","tpage_name":"combx-tfrag"}],[135462974,{"idx":62,"name":"daxterhelmetplain","tpage_name":"rubblea-vis-pris"}],[135462973,{"idx":61,"name":"daxterheadwidenew","tpage_name":"rubblea-vis-pris"}],[152895492,{"idx":4,"name":"minc-01","tpage_name":"combx-tfrag"}],[135462972,{"idx":60,"name":"daxtergoggles","tpage_name":"rubblea-vis-pris"}],[152895491,{"idx":3,"name":"min-env-mar-01","tpage_name":"combx-tfrag"}],[135462971,{"idx":59,"name":"daxterfoot-bottom","tpage_name":"rubblea-vis-pris"}],[152895490,{"idx":2,"name":"comb-temp-glass","tpage_name":"combx-tfrag"}],[135462970,{"idx":58,"name":"daxterfoot","tpage_name":"rubblea-vis-pris"}],[135462969,{"idx":57,"name":"daxterfinger","tpage_name":"rubblea-vis-pris"}],[152895488,{"idx":0,"name":"comb-temp-dark","tpage_name":"combx-tfrag"}],[135462968,{"idx":56,"name":"daxterear","tpage_name":"rubblea-vis-pris"}],[135462967,{"idx":55,"name":"daxterbolt","tpage_name":"rubblea-vis-pris"}],[135462966,{"idx":54,"name":"daxterbodyshort-eix","tpage_name":"rubblea-vis-pris"}],[135397391,{"idx":15,"name":"rub-ground-01-small","tpage_name":"rubblea-vis-shrub"}],[173932560,{"idx":16,"name":"sig-gun-05","tpage_name":"ltowerb-vis-pris2"}],[171442200,{"idx":24,"name":"temple_sandstone_taper01","tpage_name":"templea-vis-tfrag"}],[170197020,{"idx":28,"name":"ashelin-whitestrap","tpage_name":"outrocst-pris2"}],[135331980,{"idx":140,"name":"rub-cement-top","tpage_name":"rubblea-vis-tfrag"}],[173932559,{"idx":15,"name":"sig-gun-04","tpage_name":"ltowerb-vis-pris2"}],[170197019,{"idx":27,"name":"ashelin-teeth","tpage_name":"outrocst-pris2"}],[135331979,{"idx":139,"name":"rub-door-metal","tpage_name":"rubblea-vis-tfrag"}],[173932558,{"idx":14,"name":"sig-gun-03","tpage_name":"ltowerb-vis-pris2"}],[171442198,{"idx":22,"name":"temple_sandstone_stepside01","tpage_name":"templea-vis-tfrag"}],[170197018,{"idx":26,"name":"ashelin-shoemetal","tpage_name":"outrocst-pris2"}],[135331978,{"idx":138,"name":"rub-door-metal-frame","tpage_name":"rubblea-vis-tfrag"}],[173932545,{"idx":1,"name":"charHOLD","tpage_name":"ltowerb-vis-pris2"}],[171442185,{"idx":9,"name":"temple_metal02","tpage_name":"templea-vis-tfrag"}],[170197005,{"idx":13,"name":"ashelin-gunbarrel-02","tpage_name":"outrocst-pris2"}],[135331965,{"idx":125,"name":"rub-lamp-light-01","tpage_name":"rubblea-vis-tfrag"}],[173932544,{"idx":0,"name":"bam-eyelight","tpage_name":"ltowerb-vis-pris2"}],[171442184,{"idx":8,"name":"temple_metal01","tpage_name":"templea-vis-tfrag"}],[170197004,{"idx":12,"name":"ashelin-gunbarrel-01","tpage_name":"outrocst-pris2"}],[135331964,{"idx":124,"name":"rub-lamp-fencespike-round","tpage_name":"rubblea-vis-tfrag"}],[171442183,{"idx":7,"name":"temple-floor-01","tpage_name":"templea-vis-tfrag"}],[170197003,{"idx":11,"name":"ashelin-glove","tpage_name":"outrocst-pris2"}],[135331963,{"idx":123,"name":"rub-stad-brick-pieces","tpage_name":"rubblea-vis-tfrag"}],[170197002,{"idx":10,"name":"ashelin-face","tpage_name":"outrocst-pris2"}],[135331962,{"idx":122,"name":"rub-blastdoors","tpage_name":"rubblea-vis-tfrag"}],[170196995,{"idx":3,"name":"ashelin-brownstrap","tpage_name":"outrocst-pris2"}],[135331955,{"idx":115,"name":"rub-endblocks","tpage_name":"rubblea-vis-tfrag"}],[170196992,{"idx":0,"name":"ashelin-beltbuckle","tpage_name":"outrocst-pris2"}],[162725912,{"idx":24,"name":"comb-ring","tpage_name":"railf-tfrag"}],[135331952,{"idx":112,"name":"rub-cement-broken-end","tpage_name":"rubblea-vis-tfrag"}],[162725911,{"idx":23,"name":"rail-env-wall-01","tpage_name":"railf-tfrag"}],[135331951,{"idx":111,"name":"rub-copper-metal-02","tpage_name":"rubblea-vis-tfrag"}],[162725910,{"idx":22,"name":"rail-fit-01","tpage_name":"railf-tfrag"}],[135331950,{"idx":110,"name":"rub-marble-floor-01-hitweak","tpage_name":"rubblea-vis-tfrag"}],[162725909,{"idx":21,"name":"rail-light-red","tpage_name":"railf-tfrag"}],[135331949,{"idx":109,"name":"rub-stad-brick","tpage_name":"rubblea-vis-tfrag"}],[162725908,{"idx":20,"name":"rail-rock-01","tpage_name":"railf-tfrag"}],[135331948,{"idx":108,"name":"rub-pal-glass","tpage_name":"rubblea-vis-tfrag"}],[162725907,{"idx":19,"name":"rail-pipe-02","tpage_name":"railf-tfrag"}],[135331947,{"idx":107,"name":"rub-pal-pillar","tpage_name":"rubblea-vis-tfrag"}],[162725906,{"idx":18,"name":"rail-light-blue-small","tpage_name":"railf-tfrag"}],[135331946,{"idx":106,"name":"rub-pal-metal-trim","tpage_name":"rubblea-vis-tfrag"}],[162725905,{"idx":17,"name":"rail-light-yellow","tpage_name":"railf-tfrag"}],[135331945,{"idx":105,"name":"rub-pal-metal","tpage_name":"rubblea-vis-tfrag"}],[162725904,{"idx":16,"name":"comb-redmarker","tpage_name":"railf-tfrag"}],[135331944,{"idx":104,"name":"rub-citywall","tpage_name":"rubblea-vis-tfrag"}],[162725903,{"idx":15,"name":"comb-temp-dark","tpage_name":"railf-tfrag"}],[135331943,{"idx":103,"name":"rub-cement-a","tpage_name":"rubblea-vis-tfrag"}],[162725902,{"idx":14,"name":"rail-patch-01","tpage_name":"railf-tfrag"}],[135331942,{"idx":102,"name":"rub-roof-tile","tpage_name":"rubblea-vis-tfrag"}],[162725901,{"idx":13,"name":"comb-temp-glass","tpage_name":"railf-tfrag"}],[135331941,{"idx":101,"name":"rub-metal-pipeside-01","tpage_name":"rubblea-vis-tfrag"}],[162725900,{"idx":12,"name":"rail-pipe-05","tpage_name":"railf-tfrag"}],[135331940,{"idx":100,"name":"rub-palshaft-dirt-blue-01","tpage_name":"rubblea-vis-tfrag"}],[162725899,{"idx":11,"name":"rail-env-car-01","tpage_name":"railf-tfrag"}],[135331939,{"idx":99,"name":"rub-wall-gen-06","tpage_name":"rubblea-vis-tfrag"}],[162725898,{"idx":10,"name":"rail-pipe-01","tpage_name":"railf-tfrag"}],[135331938,{"idx":98,"name":"rub-window-01","tpage_name":"rubblea-vis-tfrag"}],[162725897,{"idx":9,"name":"rail-pipe-03","tpage_name":"railf-tfrag"}],[135331937,{"idx":97,"name":"rub-wall-small-grill","tpage_name":"rubblea-vis-tfrag"}],[162725896,{"idx":8,"name":"rail-gray-metal-01","tpage_name":"railf-tfrag"}],[135331936,{"idx":96,"name":"rub-wall-side-beam","tpage_name":"rubblea-vis-tfrag"}],[162725895,{"idx":7,"name":"rail-base-mid-01","tpage_name":"railf-tfrag"}],[135331935,{"idx":95,"name":"rub-statue-stone-01","tpage_name":"rubblea-vis-tfrag"}],[162725894,{"idx":6,"name":"rail-detail-01","tpage_name":"railf-tfrag"}],[135331934,{"idx":94,"name":"rub-ground","tpage_name":"rubblea-vis-tfrag"}],[162725893,{"idx":5,"name":"rail-cord-01","tpage_name":"railf-tfrag"}],[135331933,{"idx":93,"name":"rub-wall-gen-05","tpage_name":"rubblea-vis-tfrag"}],[162725892,{"idx":4,"name":"rail-edge-01","tpage_name":"railf-tfrag"}],[135331932,{"idx":92,"name":"rub-window-02","tpage_name":"rubblea-vis-tfrag"}],[135331928,{"idx":88,"name":"rub-greyblue-plain-lowres","tpage_name":"rubblea-vis-tfrag"}],[135331927,{"idx":87,"name":"rub-wall-gen-01","tpage_name":"rubblea-vis-tfrag"}],[135331926,{"idx":86,"name":"rub-met-strp-close","tpage_name":"rubblea-vis-tfrag"}],[135331925,{"idx":85,"name":"rub-wall-gen-02","tpage_name":"rubblea-vis-tfrag"}],[135331924,{"idx":84,"name":"rub-wall-gen-04","tpage_name":"rubblea-vis-tfrag"}],[135331923,{"idx":83,"name":"rub-panels-01","tpage_name":"rubblea-vis-tfrag"}],[135331922,{"idx":82,"name":"rub-wall-trim","tpage_name":"rubblea-vis-tfrag"}],[135331921,{"idx":81,"name":"rub-palace-tower-side","tpage_name":"rubblea-vis-tfrag"}],[135331920,{"idx":80,"name":"rub-city-wall-inside-damaged","tpage_name":"rubblea-vis-tfrag"}],[135331919,{"idx":79,"name":"rub-wall-side-beam-02","tpage_name":"rubblea-vis-tfrag"}],[150274078,{"idx":30,"name":"vin-teeth-01","tpage_name":"lsigklv-pris2"}],[135331918,{"idx":78,"name":"rub-pal-red","tpage_name":"rubblea-vis-tfrag"}],[150274077,{"idx":29,"name":"sig-undergarments","tpage_name":"lsigklv-pris2"}],[135331917,{"idx":77,"name":"rub-metal-flatpipe-01","tpage_name":"rubblea-vis-tfrag"}],[150274076,{"idx":28,"name":"sig-skirts-03","tpage_name":"lsigklv-pris2"}],[135331916,{"idx":76,"name":"rub-beam-gen","tpage_name":"rubblea-vis-tfrag"}],[150274075,{"idx":27,"name":"sig-skirts-02","tpage_name":"lsigklv-pris2"}],[135331915,{"idx":75,"name":"rub-wall-gen-03","tpage_name":"rubblea-vis-tfrag"}],[150274074,{"idx":26,"name":"sig-skirts","tpage_name":"lsigklv-pris2"}],[135331914,{"idx":74,"name":"rub-dirt-a","tpage_name":"rubblea-vis-tfrag"}],[150274072,{"idx":24,"name":"sig-shoetop","tpage_name":"lsigklv-pris2"}],[135331912,{"idx":72,"name":"rub-stream-rocks","tpage_name":"rubblea-vis-tfrag"}],[135331847,{"idx":7,"name":"rub-rubble-01","tpage_name":"rubblea-vis-tfrag"}],[135331841,{"idx":1,"name":"rub-blue-paint-rust04","tpage_name":"rubblea-vis-tfrag"}],[135331840,{"idx":0,"name":"rub-metal-01","tpage_name":"rubblea-vis-tfrag"}],[134873264,{"idx":176,"name":"rub-door-metal","tpage_name":"rubbleb-vis-tfrag"}],[187170823,{"idx":7,"name":"dm-urchin-horn-01","tpage_name":"deswalk-vis-pris"}],[134873263,{"idx":175,"name":"rub-door-metal-frame","tpage_name":"rubbleb-vis-tfrag"}],[134873258,{"idx":170,"name":"rub-elec-switch-light-off","tpage_name":"rubbleb-vis-tfrag"}],[134873257,{"idx":169,"name":"rub-elec-switch-light-on","tpage_name":"rubbleb-vis-tfrag"}],[134873256,{"idx":168,"name":"rub-beam-gen-hole","tpage_name":"rubbleb-vis-tfrag"}],[134873255,{"idx":167,"name":"rub-lamp-light-01","tpage_name":"rubbleb-vis-tfrag"}],[134873254,{"idx":166,"name":"rub-lamp-fencespike-round","tpage_name":"rubbleb-vis-tfrag"}],[172228646,{"idx":38,"name":"temple_sandstone_brick-01","tpage_name":"templeb-vis-pris"}],[134873246,{"idx":158,"name":"rub-metal-pipeside-01","tpage_name":"rubbleb-vis-tfrag"}],[134873245,{"idx":157,"name":"rub-palshaft-dirt-blue-01","tpage_name":"rubbleb-vis-tfrag"}],[134873244,{"idx":156,"name":"rub-pal-glass","tpage_name":"rubbleb-vis-tfrag"}],[134873243,{"idx":155,"name":"rub-pal-pillar","tpage_name":"rubbleb-vis-tfrag"}],[134873242,{"idx":154,"name":"rub-pal-metal-trim","tpage_name":"rubbleb-vis-tfrag"}],[134873241,{"idx":153,"name":"rub-pal-metal","tpage_name":"rubbleb-vis-tfrag"}],[173473814,{"idx":22,"name":"tow-wall-supports-HI","tpage_name":"ltowerb-vis-tfrag"}],[134873234,{"idx":146,"name":"rub-butress-metal-02","tpage_name":"rubbleb-vis-tfrag"}],[173473811,{"idx":19,"name":"tow-groundpod","tpage_name":"ltowerb-vis-tfrag"}],[172228631,{"idx":23,"name":"temple_sandstone01","tpage_name":"templeb-vis-pris"}],[134873231,{"idx":143,"name":"rub-endblocks","tpage_name":"rubbleb-vis-tfrag"}],[173473805,{"idx":13,"name":"mhcity-baserock","tpage_name":"ltowerb-vis-tfrag"}],[134873225,{"idx":137,"name":"rub-city-wall-frame","tpage_name":"rubbleb-vis-tfrag"}],[173473804,{"idx":12,"name":"city-lowres-mhcity-tower-01","tpage_name":"ltowerb-vis-tfrag"}],[134873224,{"idx":136,"name":"rub-stad-brick-pieces","tpage_name":"rubbleb-vis-tfrag"}],[173473803,{"idx":11,"name":"city-lowres-mhcity-wall-05","tpage_name":"ltowerb-vis-tfrag"}],[134873223,{"idx":135,"name":"rub-blastdoors","tpage_name":"rubbleb-vis-tfrag"}],[173473801,{"idx":9,"name":"mhcity-basebone","tpage_name":"ltowerb-vis-tfrag"}],[134873221,{"idx":133,"name":"rub-stream-rocks","tpage_name":"rubbleb-vis-tfrag"}],[173473795,{"idx":3,"name":"tow-eggcase-01","tpage_name":"ltowerb-vis-tfrag"}],[134873215,{"idx":127,"name":"rub-cement-broken-end","tpage_name":"rubbleb-vis-tfrag"}],[173473794,{"idx":2,"name":"mhcity-wall-tentacle-02","tpage_name":"ltowerb-vis-tfrag"}],[134873214,{"idx":126,"name":"rub-copper-metal-02","tpage_name":"rubbleb-vis-tfrag"}],[173473793,{"idx":1,"name":"tow-eggpod-01","tpage_name":"ltowerb-vis-tfrag"}],[134873213,{"idx":125,"name":"rub-marble-floor-01-hitweak","tpage_name":"rubbleb-vis-tfrag"}],[134873212,{"idx":124,"name":"rub-greyblue-plain-lowres","tpage_name":"rubbleb-vis-tfrag"}],[172228608,{"idx":0,"name":"temple_sandstone_base01","tpage_name":"templeb-vis-pris"}],[134873208,{"idx":120,"name":"rub-ground","tpage_name":"rubbleb-vis-tfrag"}],[134873207,{"idx":119,"name":"rub-stad-brick","tpage_name":"rubbleb-vis-tfrag"}],[154796082,{"idx":50,"name":"jakchires-shoemetal","tpage_name":"ljakndax-pris"}],[134873202,{"idx":114,"name":"rub-wall-gen-06","tpage_name":"rubbleb-vis-tfrag"}],[154796081,{"idx":49,"name":"jakchires-shoebottom","tpage_name":"ljakndax-pris"}],[134873201,{"idx":113,"name":"rub-cement-a","tpage_name":"rubbleb-vis-tfrag"}],[154796080,{"idx":48,"name":"jakchires-precarmor-01","tpage_name":"ljakndax-pris"}],[134873200,{"idx":112,"name":"rub-wall-small-grill","tpage_name":"rubbleb-vis-tfrag"}],[154796079,{"idx":47,"name":"jakchires-pants","tpage_name":"ljakndax-pris"}],[151060539,{"idx":59,"name":"spydroid-red","tpage_name":"factoryc-vis-pris"}],[134873199,{"idx":111,"name":"rub-wall-gen-05","tpage_name":"rubbleb-vis-tfrag"}],[154796078,{"idx":46,"name":"jakchires-lightbrownspat","tpage_name":"ljakndax-pris"}],[151060538,{"idx":58,"name":"spydroid-light-small-red","tpage_name":"factoryc-vis-pris"}],[134873198,{"idx":110,"name":"rub-window-02","tpage_name":"rubbleb-vis-tfrag"}],[154796073,{"idx":41,"name":"jakchires-glovetop","tpage_name":"ljakndax-pris"}],[151060533,{"idx":53,"name":"spydroid-gold","tpage_name":"factoryc-vis-pris"}],[134873193,{"idx":105,"name":"rub-city-wall-inside-damaged","tpage_name":"rubbleb-vis-tfrag"}],[167247872,{"idx":0,"name":"hud-jinx-head","tpage_name":"ljinx-minimap"}],[154796072,{"idx":40,"name":"jakchires-facert","tpage_name":"ljakndax-pris"}],[151060532,{"idx":52,"name":"kg-grunt-rim-03","tpage_name":"factoryc-vis-pris"}],[134873192,{"idx":104,"name":"rub-window-01","tpage_name":"rubbleb-vis-tfrag"}],[154796071,{"idx":39,"name":"jakchires-facelft","tpage_name":"ljakndax-pris"}],[134873191,{"idx":103,"name":"rub-roof-tile","tpage_name":"rubbleb-vis-tfrag"}],[154796070,{"idx":38,"name":"jakchires-eyelid","tpage_name":"ljakndax-pris"}],[134873190,{"idx":102,"name":"rub-wall-side-beam","tpage_name":"rubbleb-vis-tfrag"}],[154796069,{"idx":37,"name":"jakchires-eyebrow","tpage_name":"ljakndax-pris"}],[151060529,{"idx":49,"name":"kg-grunt-cable-01","tpage_name":"factoryc-vis-pris"}],[134873189,{"idx":101,"name":"rub-wall-gen-01","tpage_name":"rubbleb-vis-tfrag"}],[154796068,{"idx":36,"name":"jakchires-eye","tpage_name":"ljakndax-pris"}],[134873188,{"idx":100,"name":"rub-wall-trim","tpage_name":"rubbleb-vis-tfrag"}],[154796067,{"idx":35,"name":"jakchires-clips","tpage_name":"ljakndax-pris"}],[134873187,{"idx":99,"name":"rub-wall-side-beam-02","tpage_name":"rubbleb-vis-tfrag"}],[154796066,{"idx":34,"name":"jakchires-chestplate","tpage_name":"ljakndax-pris"}],[134873186,{"idx":98,"name":"rub-wall-gen-02","tpage_name":"rubbleb-vis-tfrag"}],[154796065,{"idx":33,"name":"jakchires-brwnleather","tpage_name":"ljakndax-pris"}],[134873185,{"idx":97,"name":"rub-wall-gen-04","tpage_name":"rubbleb-vis-tfrag"}],[164757504,{"idx":0,"name":"stdm-grass-fringe","tpage_name":"stadium-vis-alpha"}],[154796064,{"idx":32,"name":"jakchires-brownstrap","tpage_name":"ljakndax-pris"}],[134873184,{"idx":96,"name":"rub-panels-01","tpage_name":"rubbleb-vis-tfrag"}],[154796063,{"idx":31,"name":"jakchires-blackstrap","tpage_name":"ljakndax-pris"}],[134873183,{"idx":95,"name":"rub-met-strp-close","tpage_name":"rubbleb-vis-tfrag"}],[154796062,{"idx":30,"name":"jakchires-arm","tpage_name":"ljakndax-pris"}],[134873182,{"idx":94,"name":"rub-palace-tower-side","tpage_name":"rubbleb-vis-tfrag"}],[154796061,{"idx":29,"name":"jakc-wristband-a2","tpage_name":"ljakndax-pris"}],[134873181,{"idx":93,"name":"rub-pal-red","tpage_name":"rubbleb-vis-tfrag"}],[154796060,{"idx":28,"name":"jakc-wraps","tpage_name":"ljakndax-pris"}],[134873180,{"idx":92,"name":"rub-metal-flatpipe-01","tpage_name":"rubbleb-vis-tfrag"}],[154796059,{"idx":27,"name":"jakc-waistband2","tpage_name":"ljakndax-pris"}],[134873179,{"idx":91,"name":"rub-beam-gen","tpage_name":"rubbleb-vis-tfrag"}],[154796058,{"idx":26,"name":"jakc-skirt","tpage_name":"ljakndax-pris"}],[134873178,{"idx":90,"name":"rub-wall-gen-03","tpage_name":"rubbleb-vis-tfrag"}],[154796056,{"idx":24,"name":"jakc-scarf","tpage_name":"ljakndax-pris"}],[134873176,{"idx":88,"name":"rub-dirt-a","tpage_name":"rubbleb-vis-tfrag"}],[137232393,{"idx":9,"name":"daxterfinger","tpage_name":"citycast-pris"}],[134742033,{"idx":17,"name":"rub-stain-01","tpage_name":"rubblec-vis-shrub"}],[137232391,{"idx":7,"name":"daxterbolt","tpage_name":"citycast-pris"}],[134742031,{"idx":15,"name":"rub-ground-01-small","tpage_name":"rubblec-vis-shrub"}],[137232384,{"idx":0,"name":"bam-eyelight","tpage_name":"citycast-pris"}],[134742024,{"idx":8,"name":"rub-wall-small-grill","tpage_name":"rubblec-vis-shrub"}],[134742023,{"idx":7,"name":"rub-beam-gen","tpage_name":"rubblec-vis-shrub"}],[175767575,{"idx":23,"name":"prec-surfer-hair","tpage_name":"loutro-pris"}],[165806135,{"idx":55,"name":"palcab-lowres-background-mount-build-01","tpage_name":"ltowcity-tfrag"}],[134676635,{"idx":155,"name":"rub-door-metal","tpage_name":"rubblec-vis-tfrag"}],[175767574,{"idx":22,"name":"prec-surfer-chain-03","tpage_name":"loutro-pris"}],[165806134,{"idx":54,"name":"t-palshaft-plate01","tpage_name":"ltowcity-tfrag"}],[134676634,{"idx":154,"name":"rub-door-metal-frame","tpage_name":"rubblec-vis-tfrag"}],[175767569,{"idx":17,"name":"prec-handpalm","tpage_name":"loutro-pris"}],[173277209,{"idx":25,"name":"tow-wall-tentacle-02","tpage_name":"ltowera-vis-tfrag"}],[165806129,{"idx":49,"name":"t-citywide-met-strp02","tpage_name":"ltowcity-tfrag"}],[134676629,{"idx":149,"name":"rub-elec-switch-light-on","tpage_name":"rubblec-vis-tfrag"}],[175767568,{"idx":16,"name":"prec-hand-back","tpage_name":"loutro-pris"}],[173277208,{"idx":24,"name":"tow-eggside-01","tpage_name":"ltowera-vis-tfrag"}],[165806128,{"idx":48,"name":"palcab-lorez-metal01","tpage_name":"ltowcity-tfrag"}],[134676628,{"idx":148,"name":"rub-elec-switch-light-off","tpage_name":"rubblec-vis-tfrag"}],[175767567,{"idx":15,"name":"bam-hairhilite","tpage_name":"loutro-pris"}],[173277207,{"idx":23,"name":"tow-blackhole","tpage_name":"ltowera-vis-tfrag"}],[165806127,{"idx":47,"name":"palcab-lorez-metal03","tpage_name":"ltowcity-tfrag"}],[134676627,{"idx":147,"name":"rub-beam-gen-hole","tpage_name":"rubblec-vis-tfrag"}],[175767566,{"idx":14,"name":"prec-leader-headshield","tpage_name":"loutro-pris"}],[173277206,{"idx":22,"name":"tow-groundpod","tpage_name":"ltowera-vis-tfrag"}],[165806126,{"idx":46,"name":"city-lowres-ctygen-stripe-02","tpage_name":"ltowcity-tfrag"}],[134676626,{"idx":146,"name":"rub-lamp-light-01","tpage_name":"rubblec-vis-tfrag"}],[175767565,{"idx":13,"name":"prec-leader-foreheadshield","tpage_name":"loutro-pris"}],[173277205,{"idx":21,"name":"tow-egg-group-base","tpage_name":"ltowera-vis-tfrag"}],[165806125,{"idx":45,"name":"city-lowres-ctygen-roof-01","tpage_name":"ltowcity-tfrag"}],[134676625,{"idx":145,"name":"rub-lamp-fencespike-round","tpage_name":"rubblec-vis-tfrag"}],[175767564,{"idx":12,"name":"daxterteeth","tpage_name":"loutro-pris"}],[173277204,{"idx":20,"name":"tow-pup-metal-01","tpage_name":"ltowera-vis-tfrag"}],[165806124,{"idx":44,"name":"city-lowres-ctygen-build-04","tpage_name":"ltowcity-tfrag"}],[134676624,{"idx":144,"name":"rub-butress-metal-02","tpage_name":"rubblec-vis-tfrag"}],[175767563,{"idx":11,"name":"daxternose","tpage_name":"loutro-pris"}],[173277203,{"idx":19,"name":"tow-baserock","tpage_name":"ltowera-vis-tfrag"}],[165806123,{"idx":43,"name":"city-lowres-ctygen-build-05","tpage_name":"ltowcity-tfrag"}],[134676623,{"idx":143,"name":"rub-endblocks","tpage_name":"rubblec-vis-tfrag"}],[165806111,{"idx":31,"name":"palcab-lowres-mark-roof-rim-01","tpage_name":"ltowcity-tfrag"}],[134676611,{"idx":131,"name":"stdm-trim-02","tpage_name":"rubblec-vis-tfrag"}],[165806102,{"idx":22,"name":"city-lowres-fort-red","tpage_name":"ltowcity-tfrag"}],[134676602,{"idx":122,"name":"stdm-grass","tpage_name":"rubblec-vis-tfrag"}],[170786816,{"idx":0,"name":"palcab-lowres-background-shoreline-02","tpage_name":"lcitysml-alpha"}],[165806096,{"idx":16,"name":"palcab-lowres-mark-roof-02","tpage_name":"ltowcity-tfrag"}],[134676596,{"idx":116,"name":"rub-city-wall-frame","tpage_name":"rubblec-vis-tfrag"}],[165806095,{"idx":15,"name":"palcab-pipe-hoze","tpage_name":"ltowcity-tfrag"}],[134676595,{"idx":115,"name":"rub-stad-brick-pieces","tpage_name":"rubblec-vis-tfrag"}],[165806094,{"idx":14,"name":"palcab-lowres-ctyslum-wall-03","tpage_name":"ltowcity-tfrag"}],[134676594,{"idx":114,"name":"rub-stream-rocks","tpage_name":"rubblec-vis-tfrag"}],[165806091,{"idx":11,"name":"palcab-lowres-ctyslum-wall-02","tpage_name":"ltowcity-tfrag"}],[134676591,{"idx":111,"name":"rub-copper-metal-02","tpage_name":"rubblec-vis-tfrag"}],[165806090,{"idx":10,"name":"palcab-lowres-ctyslum-wall-01","tpage_name":"ltowcity-tfrag"}],[134676590,{"idx":110,"name":"rub-cement-broken-end","tpage_name":"rubblec-vis-tfrag"}],[165806089,{"idx":9,"name":"palcab-lowres-ctyslum-roof-01","tpage_name":"ltowcity-tfrag"}],[134676589,{"idx":109,"name":"rub-marble-floor-01-hitweak","tpage_name":"rubblec-vis-tfrag"}],[165806087,{"idx":7,"name":"palcab-lowres-ctyslum-ground","tpage_name":"ltowcity-tfrag"}],[134676587,{"idx":107,"name":"ctyn-beams","tpage_name":"rubblec-vis-tfrag"}],[165806086,{"idx":6,"name":"palcab-lowres-ctywide-wall-02","tpage_name":"ltowcity-tfrag"}],[134676586,{"idx":106,"name":"rub-wall-small-grill","tpage_name":"rubblec-vis-tfrag"}],[165806085,{"idx":5,"name":"palcab-lowres-background-rocksnow","tpage_name":"ltowcity-tfrag"}],[134676585,{"idx":105,"name":"ctyn-brown-red","tpage_name":"rubblec-vis-tfrag"}],[165806084,{"idx":4,"name":"palcab-lowres-background-rocksnow2","tpage_name":"ltowcity-tfrag"}],[134676584,{"idx":104,"name":"ctyn-wall-2","tpage_name":"rubblec-vis-tfrag"}],[165806083,{"idx":3,"name":"palcab-lowres-background-crater-bottom-enviro","tpage_name":"ltowcity-tfrag"}],[134676583,{"idx":103,"name":"ctyn-black-wall-lower-01","tpage_name":"rubblec-vis-tfrag"}],[165806082,{"idx":2,"name":"palcab-lowres-ctywide-wall-01","tpage_name":"ltowcity-tfrag"}],[134676582,{"idx":102,"name":"ctyn-top-bevel-small-bottom","tpage_name":"rubblec-vis-tfrag"}],[165806081,{"idx":1,"name":"strip-metal-02-lores","tpage_name":"ltowcity-tfrag"}],[134676581,{"idx":101,"name":"rub-metal-pipeside-01","tpage_name":"rubblec-vis-tfrag"}],[165806080,{"idx":0,"name":"palcab-lowres-background-hills-01","tpage_name":"ltowcity-tfrag"}],[153354280,{"idx":40,"name":"mhcity-bubble","tpage_name":"mhcitya-vis-pris"}],[134676580,{"idx":100,"name":"rub-palshaft-dirt-blue-01","tpage_name":"rubblec-vis-tfrag"}],[153354273,{"idx":33,"name":"mhcity-dirtymetal","tpage_name":"mhcitya-vis-pris"}],[134676573,{"idx":93,"name":"rub-cement-a","tpage_name":"rubblec-vis-tfrag"}],[153354272,{"idx":32,"name":"mhcity-basebone","tpage_name":"mhcitya-vis-pris"}],[134676572,{"idx":92,"name":"rub-window-02","tpage_name":"rubblec-vis-tfrag"}],[153354268,{"idx":28,"name":"mhcity-puffer-mid-01","tpage_name":"mhcitya-vis-pris"}],[134676568,{"idx":88,"name":"rub-roof-tile","tpage_name":"rubblec-vis-tfrag"}],[153354267,{"idx":27,"name":"mhcity-floor-brace-02","tpage_name":"mhcitya-vis-pris"}],[134676567,{"idx":87,"name":"rub-wall-gen-06","tpage_name":"rubblec-vis-tfrag"}],[153354266,{"idx":26,"name":"mhcity-eggskin","tpage_name":"mhcitya-vis-pris"}],[134676566,{"idx":86,"name":"rub-wall-gen-05","tpage_name":"rubblec-vis-tfrag"}],[153354265,{"idx":25,"name":"mhcity-wall-tentacle-01","tpage_name":"mhcitya-vis-pris"}],[134676565,{"idx":85,"name":"rub-wall-side-beam","tpage_name":"rubblec-vis-tfrag"}],[153354264,{"idx":24,"name":"mhcity-grunt-egg-rim-burn","tpage_name":"mhcitya-vis-pris"}],[134676564,{"idx":84,"name":"rub-window-01","tpage_name":"rubblec-vis-tfrag"}],[153354260,{"idx":20,"name":"mhcity-grunt-egg-metal-01","tpage_name":"mhcitya-vis-pris"}],[134676560,{"idx":80,"name":"t-citypal-red-met-01","tpage_name":"rubblec-vis-tfrag"}],[158334979,{"idx":3,"name":"rub-water-dest","tpage_name":"rubblea-vis-water"}],[153354259,{"idx":19,"name":"mhcity-grunt-egg-03","tpage_name":"mhcitya-vis-pris"}],[134676559,{"idx":79,"name":"t-citypal-small-block-01","tpage_name":"rubblec-vis-tfrag"}],[158334978,{"idx":2,"name":"rub-water","tpage_name":"rubblea-vis-water"}],[134676558,{"idx":78,"name":"ctypal-wall-tile-01","tpage_name":"rubblec-vis-tfrag"}],[134676553,{"idx":73,"name":"rub-wall-gen-02","tpage_name":"rubblec-vis-tfrag"}],[134676552,{"idx":72,"name":"rub-wall-gen-04","tpage_name":"rubblec-vis-tfrag"}],[134676551,{"idx":71,"name":"rub-stad-brick","tpage_name":"rubblec-vis-tfrag"}],[153354247,{"idx":7,"name":"mhcity-grunt-egg-rim-01","tpage_name":"mhcitya-vis-pris"}],[150863887,{"idx":15,"name":"daxterlense","tpage_name":"towerc-pris"}],[134676547,{"idx":67,"name":"rub-ground","tpage_name":"rubblec-vis-tfrag"}],[154599426,{"idx":2,"name":"hud-dax-missle-meter-03","tpage_name":"lpatkcs-minimap"}],[153354246,{"idx":6,"name":"mhcity-grunt-egg-neck-01","tpage_name":"mhcitya-vis-pris"}],[150863886,{"idx":14,"name":"daxterhelmetplain","tpage_name":"towerc-pris"}],[134676546,{"idx":66,"name":"rub-wall-gen-01","tpage_name":"rubblec-vis-tfrag"}],[154599425,{"idx":1,"name":"hud-dax-missle-meter-02","tpage_name":"lpatkcs-minimap"}],[153354245,{"idx":5,"name":"mhcity-grunt-egg-gem-01","tpage_name":"mhcitya-vis-pris"}],[150863885,{"idx":13,"name":"daxterheadwidenew","tpage_name":"towerc-pris"}],[134676545,{"idx":65,"name":"rub-wall-trim","tpage_name":"rubblec-vis-tfrag"}],[154599424,{"idx":0,"name":"hud-dax-missle-meter-01","tpage_name":"lpatkcs-minimap"}],[153354244,{"idx":4,"name":"mhcity-grunt-egg-bulbtop-01","tpage_name":"mhcitya-vis-pris"}],[150863884,{"idx":12,"name":"daxtergoggles","tpage_name":"towerc-pris"}],[134676544,{"idx":64,"name":"rub-met-strp-close","tpage_name":"rubblec-vis-tfrag"}],[153354243,{"idx":3,"name":"mhcity-grunt-egg-bulb-01","tpage_name":"mhcitya-vis-pris"}],[150863883,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"towerc-pris"}],[134676543,{"idx":63,"name":"rub-panels-01","tpage_name":"rubblec-vis-tfrag"}],[153354242,{"idx":2,"name":"mhcity-grunt-egg-base-01","tpage_name":"mhcitya-vis-pris"}],[150863882,{"idx":10,"name":"daxterfoot","tpage_name":"towerc-pris"}],[134676542,{"idx":62,"name":"rub-city-wall-inside-damaged","tpage_name":"rubblec-vis-tfrag"}],[153354241,{"idx":1,"name":"mhcity-de-door-skin-02","tpage_name":"mhcitya-vis-pris"}],[150863881,{"idx":9,"name":"daxterfinger","tpage_name":"towerc-pris"}],[134676541,{"idx":61,"name":"rub-palace-tower-side","tpage_name":"rubblec-vis-tfrag"}],[153354240,{"idx":0,"name":"mhcity-de-door-skin-01","tpage_name":"mhcitya-vis-pris"}],[150863880,{"idx":8,"name":"daxterear","tpage_name":"towerc-pris"}],[134676540,{"idx":60,"name":"rub-wall-side-beam-02","tpage_name":"rubblec-vis-tfrag"}],[150863878,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"towerc-pris"}],[134676538,{"idx":58,"name":"rub-metal-flatpipe-01","tpage_name":"rubblec-vis-tfrag"}],[150863877,{"idx":5,"name":"daxterarm","tpage_name":"towerc-pris"}],[134676537,{"idx":57,"name":"rub-beam-gen","tpage_name":"rubblec-vis-tfrag"}],[150863876,{"idx":4,"name":"daxter-orange","tpage_name":"towerc-pris"}],[134676536,{"idx":56,"name":"rub-wall-gen-03","tpage_name":"rubblec-vis-tfrag"}],[150863875,{"idx":3,"name":"daxter-furhilite","tpage_name":"towerc-pris"}],[134676535,{"idx":55,"name":"rub-statue-stone-01","tpage_name":"rubblec-vis-tfrag"}],[150863874,{"idx":2,"name":"daxter-eyelid","tpage_name":"towerc-pris"}],[134676534,{"idx":54,"name":"rub-copper-metal-01","tpage_name":"rubblec-vis-tfrag"}],[150863873,{"idx":1,"name":"bam-hairhilite","tpage_name":"towerc-pris"}],[134676533,{"idx":53,"name":"rub-dirt-a","tpage_name":"rubblec-vis-tfrag"}],[134676487,{"idx":7,"name":"rub-rubble-01","tpage_name":"rubblec-vis-tfrag"}],[134676481,{"idx":1,"name":"rub-blue-paint-rust04","tpage_name":"rubblec-vis-tfrag"}],[134676480,{"idx":0,"name":"rub-metal-01","tpage_name":"rubblec-vis-tfrag"}],[134348806,{"idx":6,"name":"forest-leaf","tpage_name":"volcanoa-sprite"}],[134283272,{"idx":8,"name":"sig2-shoulderarmor","tpage_name":"ltnjxhip-pris"}],[134283271,{"idx":7,"name":"sig2-metal-01","tpage_name":"ltnjxhip-pris"}],[134283270,{"idx":6,"name":"sig2-gun-04","tpage_name":"ltnjxhip-pris"}],[134283269,{"idx":5,"name":"sig2-gun-03","tpage_name":"ltnjxhip-pris"}],[134283268,{"idx":4,"name":"sig2-gun-02","tpage_name":"ltnjxhip-pris"}],[135462965,{"idx":53,"name":"daxterarm","tpage_name":"rubblea-vis-pris"}],[134217785,{"idx":57,"name":"torn-vest","tpage_name":"ltnjxhip-pris2"}],[135462964,{"idx":52,"name":"daxter-orange","tpage_name":"rubblea-vis-pris"}],[134217784,{"idx":56,"name":"torn-teeth-01","tpage_name":"ltnjxhip-pris2"}],[135462963,{"idx":51,"name":"daxter-furhilite","tpage_name":"rubblea-vis-pris"}],[134217783,{"idx":55,"name":"torn-shoe-02","tpage_name":"ltnjxhip-pris2"}],[135462962,{"idx":50,"name":"daxter-eyelid","tpage_name":"rubblea-vis-pris"}],[134217782,{"idx":54,"name":"torn-shoe","tpage_name":"ltnjxhip-pris2"}],[135462961,{"idx":49,"name":"bam-hairhilite","tpage_name":"rubblea-vis-pris"}],[134217781,{"idx":53,"name":"torn-scarf","tpage_name":"ltnjxhip-pris2"}],[135462960,{"idx":48,"name":"pecker-yellowfur","tpage_name":"rubblea-vis-pris"}],[134217780,{"idx":52,"name":"torn-pipe","tpage_name":"ltnjxhip-pris2"}],[135462959,{"idx":47,"name":"pecker-wingtop","tpage_name":"rubblea-vis-pris"}],[134217779,{"idx":51,"name":"torn-mouth","tpage_name":"ltnjxhip-pris2"}],[135462958,{"idx":46,"name":"pecker-wingbottom","tpage_name":"rubblea-vis-pris"}],[134217778,{"idx":50,"name":"torn-metal2","tpage_name":"ltnjxhip-pris2"}],[135462957,{"idx":45,"name":"pecker-teeth","tpage_name":"rubblea-vis-pris"}],[134217777,{"idx":49,"name":"torn-legshield","tpage_name":"ltnjxhip-pris2"}],[135462956,{"idx":44,"name":"pecker-tail","tpage_name":"rubblea-vis-pris"}],[134217776,{"idx":48,"name":"torn-handle-01","tpage_name":"ltnjxhip-pris2"}],[135462955,{"idx":43,"name":"pecker-plume","tpage_name":"rubblea-vis-pris"}],[134217775,{"idx":47,"name":"torn-hair-02","tpage_name":"ltnjxhip-pris2"}],[135462954,{"idx":42,"name":"pecker-face","tpage_name":"rubblea-vis-pris"}],[134217774,{"idx":46,"name":"torn-hair-01","tpage_name":"ltnjxhip-pris2"}],[135462953,{"idx":41,"name":"pecker-eyelid","tpage_name":"rubblea-vis-pris"}],[134217773,{"idx":45,"name":"torn-gunbarrel-02","tpage_name":"ltnjxhip-pris2"}],[135462952,{"idx":40,"name":"pecker-body-01","tpage_name":"rubblea-vis-pris"}],[134217772,{"idx":44,"name":"torn-gunbarrel","tpage_name":"ltnjxhip-pris2"}],[135462951,{"idx":39,"name":"bam-eyelight","tpage_name":"rubblea-vis-pris"}],[134217771,{"idx":43,"name":"torn-footleather","tpage_name":"ltnjxhip-pris2"}],[134217770,{"idx":42,"name":"torn-finger","tpage_name":"ltnjxhip-pris2"}],[134217769,{"idx":41,"name":"torn-face-right","tpage_name":"ltnjxhip-pris2"}],[135462948,{"idx":36,"name":"vehicle-wheel-01","tpage_name":"rubblea-vis-pris"}],[134217768,{"idx":40,"name":"torn-face","tpage_name":"ltnjxhip-pris2"}],[134217767,{"idx":39,"name":"torn-eyelid","tpage_name":"ltnjxhip-pris2"}],[134217766,{"idx":38,"name":"torn-eye","tpage_name":"ltnjxhip-pris2"}],[134217765,{"idx":37,"name":"torn-ear","tpage_name":"ltnjxhip-pris2"}],[134217764,{"idx":36,"name":"torn-blademetal","tpage_name":"ltnjxhip-pris2"}],[134217763,{"idx":35,"name":"torn-belt2","tpage_name":"ltnjxhip-pris2"}],[134217762,{"idx":34,"name":"torn-belt","tpage_name":"ltnjxhip-pris2"}],[134217761,{"idx":33,"name":"torn-armor","tpage_name":"ltnjxhip-pris2"}],[134217760,{"idx":32,"name":"torn-armlft","tpage_name":"ltnjxhip-pris2"}],[134217759,{"idx":31,"name":"charHOLD","tpage_name":"ltnjxhip-pris2"}],[134217758,{"idx":30,"name":"jinx-wraps","tpage_name":"ltnjxhip-pris2"}],[134217757,{"idx":29,"name":"jinx-teeth","tpage_name":"ltnjxhip-pris2"}],[134217756,{"idx":28,"name":"jinx-singlerope","tpage_name":"ltnjxhip-pris2"}],[134217755,{"idx":27,"name":"jinx-shoebottom2","tpage_name":"ltnjxhip-pris2"}],[134217754,{"idx":26,"name":"jinx-shirt","tpage_name":"ltnjxhip-pris2"}],[134217753,{"idx":25,"name":"jinx-scarf","tpage_name":"ltnjxhip-pris2"}],[134217752,{"idx":24,"name":"jinx-rope-01","tpage_name":"ltnjxhip-pris2"}],[134217751,{"idx":23,"name":"jinx-pants","tpage_name":"ltnjxhip-pris2"}],[134217750,{"idx":22,"name":"jinx-kneepad","tpage_name":"ltnjxhip-pris2"}],[134217749,{"idx":21,"name":"jinx-iris","tpage_name":"ltnjxhip-pris2"}],[134217748,{"idx":20,"name":"jinx-handle","tpage_name":"ltnjxhip-pris2"}],[134217747,{"idx":19,"name":"jinx-hairtye","tpage_name":"ltnjxhip-pris2"}],[134217746,{"idx":18,"name":"jinx-hair","tpage_name":"ltnjxhip-pris2"}],[134217745,{"idx":17,"name":"jinx-glovepalm","tpage_name":"ltnjxhip-pris2"}],[135462924,{"idx":12,"name":"rhino-wheel-01","tpage_name":"rubblea-vis-pris"}],[134217744,{"idx":16,"name":"jinx-glove","tpage_name":"ltnjxhip-pris2"}],[134217743,{"idx":15,"name":"jinx-finger","tpage_name":"ltnjxhip-pris2"}],[134217742,{"idx":14,"name":"jinx-face","tpage_name":"ltnjxhip-pris2"}],[134217741,{"idx":13,"name":"jinx-eyelid","tpage_name":"ltnjxhip-pris2"}],[135462920,{"idx":8,"name":"rhino-horn-02","tpage_name":"rubblea-vis-pris"}],[134217740,{"idx":12,"name":"jinx-cigarflame","tpage_name":"ltnjxhip-pris2"}],[134217739,{"idx":11,"name":"jinx-cigar","tpage_name":"ltnjxhip-pris2"}],[134217738,{"idx":10,"name":"jinx-buckles","tpage_name":"ltnjxhip-pris2"}],[134217737,{"idx":9,"name":"jinx-brownstrapbolts","tpage_name":"ltnjxhip-pris2"}],[135462916,{"idx":4,"name":"intcept-tread01","tpage_name":"rubblea-vis-pris"}],[134217736,{"idx":8,"name":"jinx-brownstrap","tpage_name":"ltnjxhip-pris2"}],[134217735,{"idx":7,"name":"jinx-boottop","tpage_name":"ltnjxhip-pris2"}],[134217734,{"idx":6,"name":"jinx-boottoe","tpage_name":"ltnjxhip-pris2"}],[134217733,{"idx":5,"name":"jinx-blademetal","tpage_name":"ltnjxhip-pris2"}],[134217732,{"idx":4,"name":"jinx-belt","tpage_name":"ltnjxhip-pris2"}],[134217731,{"idx":3,"name":"jinx-arm","tpage_name":"ltnjxhip-pris2"}],[134217730,{"idx":2,"name":"environment-oldmetal","tpage_name":"ltnjxhip-pris2"}],[134217729,{"idx":1,"name":"bam-hairhilite","tpage_name":"ltnjxhip-pris2"}],[134217728,{"idx":0,"name":"bam-eyelight","tpage_name":"ltnjxhip-pris2"}],[130744321,{"idx":1,"name":"des-shrub-pebbles","tpage_name":"deserth-vis-shrub"}],[130744320,{"idx":0,"name":"des-sand-grass-01","tpage_name":"deserth-vis-shrub"}],[130351116,{"idx":12,"name":"des-beast-skin","tpage_name":"deshover-pris2"}],[130351115,{"idx":11,"name":"des-beast-nails","tpage_name":"deshover-pris2"}],[130351114,{"idx":10,"name":"des-beast-mouth","tpage_name":"deshover-pris2"}],[130351113,{"idx":9,"name":"des-beast-metal-teeth","tpage_name":"deshover-pris2"}],[130351112,{"idx":8,"name":"des-beast-metal-riveting","tpage_name":"deshover-pris2"}],[130351111,{"idx":7,"name":"des-beast-metal-cap","tpage_name":"deshover-pris2"}],[130351110,{"idx":6,"name":"des-beast-metal-02","tpage_name":"deshover-pris2"}],[130351107,{"idx":3,"name":"des-beast-gunend","tpage_name":"deshover-pris2"}],[129368071,{"idx":7,"name":"rub-wall-small-grill","tpage_name":"stadiumb-vis-shrub"}],[129368070,{"idx":6,"name":"rub-beam-gen","tpage_name":"stadiumb-vis-shrub"}],[129368069,{"idx":5,"name":"rub-greyblue-plain-lowres","tpage_name":"stadiumb-vis-shrub"}],[129302562,{"idx":34,"name":"grunt-teeth-01","tpage_name":"sewn-vis-pris"}],[129302561,{"idx":33,"name":"grunt-skin-03","tpage_name":"sewn-vis-pris"}],[129302560,{"idx":32,"name":"grunt-skin-02","tpage_name":"sewn-vis-pris"}],[129302559,{"idx":31,"name":"grunt-skin-01","tpage_name":"sewn-vis-pris"}],[129302558,{"idx":30,"name":"grunt-metal-01","tpage_name":"sewn-vis-pris"}],[129302557,{"idx":29,"name":"grunt-hose","tpage_name":"sewn-vis-pris"}],[129302556,{"idx":28,"name":"grunt-gem-01","tpage_name":"sewn-vis-pris"}],[129302555,{"idx":27,"name":"grunt-eye-01","tpage_name":"sewn-vis-pris"}],[129236992,{"idx":0,"name":"sewer-pipe-small-01","tpage_name":"sewn-vis-shrub"}],[146604065,{"idx":33,"name":"jakc-chestplate-straps","tpage_name":"lforplnt-vis-pris"}],[140378165,{"idx":53,"name":"jakchires-pants","tpage_name":"minee-pris"}],[129171545,{"idx":89,"name":"sewer-round-01","tpage_name":"sewn-vis-tfrag"}],[156565504,{"idx":0,"name":"water-splat","tpage_name":"mhcitya-sprite"}],[146604064,{"idx":32,"name":"jakc-armor","tpage_name":"lforplnt-vis-pris"}],[140378164,{"idx":52,"name":"jakchires-lightbrownspat","tpage_name":"minee-pris"}],[129171544,{"idx":88,"name":"sewer-round-02","tpage_name":"sewn-vis-tfrag"}],[146604063,{"idx":31,"name":"environment-oldmetal","tpage_name":"lforplnt-vis-pris"}],[140378163,{"idx":51,"name":"jakchires-leatherpouch","tpage_name":"minee-pris"}],[129171543,{"idx":87,"name":"sewer-round-03","tpage_name":"sewn-vis-tfrag"}],[144113670,{"idx":6,"name":"rail-patch-01","tpage_name":"combd-tfrag"}],[140378130,{"idx":18,"name":"daxtergoggles","tpage_name":"minee-pris"}],[129171510,{"idx":54,"name":"sewer-big-brace-trim-02","tpage_name":"sewn-vis-tfrag"}],[140378129,{"idx":17,"name":"daxterfoot-bottom","tpage_name":"minee-pris"}],[129171509,{"idx":53,"name":"sewer-metal-block-06","tpage_name":"sewn-vis-tfrag"}],[140378128,{"idx":16,"name":"daxterfoot","tpage_name":"minee-pris"}],[129171508,{"idx":52,"name":"sewer-grate-01","tpage_name":"sewn-vis-tfrag"}],[140378127,{"idx":15,"name":"daxterfinger","tpage_name":"minee-pris"}],[129171507,{"idx":51,"name":"sewer-grindpipe","tpage_name":"sewn-vis-tfrag"}],[144113666,{"idx":2,"name":"comb-temp-glass","tpage_name":"combd-tfrag"}],[140378126,{"idx":14,"name":"daxterear","tpage_name":"minee-pris"}],[129171506,{"idx":50,"name":"strip-black","tpage_name":"sewn-vis-tfrag"}],[144113665,{"idx":1,"name":"comb-temp-dark","tpage_name":"combd-tfrag"}],[140378125,{"idx":13,"name":"daxterbolt","tpage_name":"minee-pris"}],[129171505,{"idx":49,"name":"sewer-plate-03","tpage_name":"sewn-vis-tfrag"}],[140378124,{"idx":12,"name":"daxterbodyshort-eix","tpage_name":"minee-pris"}],[129171504,{"idx":48,"name":"sewer-pipe-rim-05b","tpage_name":"sewn-vis-tfrag"}],[140378123,{"idx":11,"name":"daxterarm","tpage_name":"minee-pris"}],[129171503,{"idx":47,"name":"sewer-pipe-02","tpage_name":"sewn-vis-tfrag"}],[140378122,{"idx":10,"name":"daxter-orange","tpage_name":"minee-pris"}],[129171502,{"idx":46,"name":"sewer-plate-02","tpage_name":"sewn-vis-tfrag"}],[140378121,{"idx":9,"name":"daxter-furhilite","tpage_name":"minee-pris"}],[129171501,{"idx":45,"name":"sewer-metal-floor-01","tpage_name":"sewn-vis-tfrag"}],[140378120,{"idx":8,"name":"daxter-eyelid","tpage_name":"minee-pris"}],[129171500,{"idx":44,"name":"sewer-pipe-01","tpage_name":"sewn-vis-tfrag"}],[140378119,{"idx":7,"name":"bam-hairhilite","tpage_name":"minee-pris"}],[129171499,{"idx":43,"name":"sewer-pipe-rim-07","tpage_name":"sewn-vis-tfrag"}],[140378118,{"idx":6,"name":"bam-eyelight","tpage_name":"minee-pris"}],[129171498,{"idx":42,"name":"sewer-nut-01","tpage_name":"sewn-vis-tfrag"}],[140378117,{"idx":5,"name":"airlockl-door-metalframe","tpage_name":"minee-pris"}],[129171497,{"idx":41,"name":"sewer-brick-roof-06","tpage_name":"sewn-vis-tfrag"}],[140378116,{"idx":4,"name":"airlock-door-metal2","tpage_name":"minee-pris"}],[129171496,{"idx":40,"name":"sewer-stone-arch-02-hitweak","tpage_name":"sewn-vis-tfrag"}],[140378115,{"idx":3,"name":"airlock-door-main","tpage_name":"minee-pris"}],[129171495,{"idx":39,"name":"sewer-pipe-rim-10","tpage_name":"sewn-vis-tfrag"}],[140378114,{"idx":2,"name":"airlock-door-cog1","tpage_name":"minee-pris"}],[129171494,{"idx":38,"name":"sewer-scaffold-02","tpage_name":"sewn-vis-tfrag"}],[140378113,{"idx":1,"name":"airlock-door-cog","tpage_name":"minee-pris"}],[129171493,{"idx":37,"name":"sewer-scaffold-01","tpage_name":"sewn-vis-tfrag"}],[140378112,{"idx":0,"name":"airlock-door-bolt","tpage_name":"minee-pris"}],[129171492,{"idx":36,"name":"sewer-plate-05","tpage_name":"sewn-vis-tfrag"}],[135397390,{"idx":14,"name":"rub-crater-shards-01","tpage_name":"rubblea-vis-shrub"}],[129171490,{"idx":34,"name":"sewer-black","tpage_name":"sewn-vis-tfrag"}],[135397389,{"idx":13,"name":"rub-scorch","tpage_name":"rubblea-vis-shrub"}],[129171489,{"idx":33,"name":"sewer-mantel-02","tpage_name":"sewn-vis-tfrag"}],[135397388,{"idx":12,"name":"rub-met-strp-close","tpage_name":"rubblea-vis-shrub"}],[129171488,{"idx":32,"name":"sewer-stone-crack-03","tpage_name":"sewn-vis-tfrag"}],[135397387,{"idx":11,"name":"rub-wall-small-grill","tpage_name":"rubblea-vis-shrub"}],[129171487,{"idx":31,"name":"sewer-block-03-hitweak","tpage_name":"sewn-vis-tfrag"}],[135397386,{"idx":10,"name":"rub-beam-gen","tpage_name":"rubblea-vis-shrub"}],[129171486,{"idx":30,"name":"sewer-brick-wall-01","tpage_name":"sewn-vis-tfrag"}],[135397385,{"idx":9,"name":"rub-greyblue-plain-lowres","tpage_name":"rubblea-vis-shrub"}],[129171485,{"idx":29,"name":"sewer-hall-light-01","tpage_name":"sewn-vis-tfrag"}],[129171484,{"idx":28,"name":"sewer-metal-block-04","tpage_name":"sewn-vis-tfrag"}],[129171483,{"idx":27,"name":"sewer-stone-arch-01","tpage_name":"sewn-vis-tfrag"}],[129171482,{"idx":26,"name":"sewer-stone-arch-02","tpage_name":"sewn-vis-tfrag"}],[129171481,{"idx":25,"name":"sewer-concrete-block-02","tpage_name":"sewn-vis-tfrag"}],[129171480,{"idx":24,"name":"sewer-brick-roof-01","tpage_name":"sewn-vis-tfrag"}],[129171479,{"idx":23,"name":"sewer-stone-crack-02","tpage_name":"sewn-vis-tfrag"}],[129171478,{"idx":22,"name":"sewer-mantel-01","tpage_name":"sewn-vis-tfrag"}],[129171477,{"idx":21,"name":"sewer-brick-roof-03","tpage_name":"sewn-vis-tfrag"}],[129171476,{"idx":20,"name":"sewer-metal-02","tpage_name":"sewn-vis-tfrag"}],[129171475,{"idx":19,"name":"sewer-pillar-01","tpage_name":"sewn-vis-tfrag"}],[129171474,{"idx":18,"name":"sewer-lip-01","tpage_name":"sewn-vis-tfrag"}],[129171473,{"idx":17,"name":"sewer-metal-trim-02","tpage_name":"sewn-vis-tfrag"}],[129171472,{"idx":16,"name":"sewer-stone-crack-01-hitweak","tpage_name":"sewn-vis-tfrag"}],[129171471,{"idx":15,"name":"sewer-block-02","tpage_name":"sewn-vis-tfrag"}],[130416650,{"idx":10,"name":"vol-bark-burnt","tpage_name":"volcanox-shrub"}],[129171470,{"idx":14,"name":"sewer-stone-crack-01","tpage_name":"sewn-vis-tfrag"}],[129171469,{"idx":13,"name":"sewer-stone-newarch-01-lotweak","tpage_name":"sewn-vis-tfrag"}],[129171468,{"idx":12,"name":"sewer-pipe-rim-08","tpage_name":"sewn-vis-tfrag"}],[130416647,{"idx":7,"name":"vola-grass-floor-01","tpage_name":"volcanox-shrub"}],[129171467,{"idx":11,"name":"sewer-small-light-01","tpage_name":"sewn-vis-tfrag"}],[130416646,{"idx":6,"name":"vola-small-rock-sides","tpage_name":"volcanox-shrub"}],[129171466,{"idx":10,"name":"sewer-brick-block-10-hitweak","tpage_name":"sewn-vis-tfrag"}],[130416645,{"idx":5,"name":"fora-shrub-pebbles","tpage_name":"volcanox-shrub"}],[129171465,{"idx":9,"name":"sewer-brick-block-11-hitweak","tpage_name":"sewn-vis-tfrag"}],[130416644,{"idx":4,"name":"vola-shrub-leaf","tpage_name":"volcanox-shrub"}],[129171464,{"idx":8,"name":"sewer-stone-newarch-01","tpage_name":"sewn-vis-tfrag"}],[129171462,{"idx":6,"name":"sewer-block-01","tpage_name":"sewn-vis-tfrag"}],[130416641,{"idx":1,"name":"vol-metal-01","tpage_name":"volcanox-shrub"}],[129171461,{"idx":5,"name":"sewer-brick-block-04","tpage_name":"sewn-vis-tfrag"}],[130416640,{"idx":0,"name":"vol-shrub-grass","tpage_name":"volcanox-shrub"}],[129171460,{"idx":4,"name":"sewer-brick-block-02","tpage_name":"sewn-vis-tfrag"}],[129171459,{"idx":3,"name":"sewer-brick-block-10","tpage_name":"sewn-vis-tfrag"}],[130351109,{"idx":5,"name":"des-beast-metal-01","tpage_name":"deshover-pris2"}],[129105929,{"idx":9,"name":"sewer-waterfall-01-n-dest","tpage_name":"sewn-vis-water"}],[130351108,{"idx":4,"name":"des-beast-leg","tpage_name":"deshover-pris2"}],[129105928,{"idx":8,"name":"sewer-water-wave-01-n-dest","tpage_name":"sewn-vis-water"}],[130351106,{"idx":2,"name":"des-beast-feet","tpage_name":"deshover-pris2"}],[129105926,{"idx":6,"name":"sewer-water-still-01-n-dest","tpage_name":"sewn-vis-water"}],[155123717,{"idx":5,"name":"daxterarm","tpage_name":"mhctycst-pris"}],[153878537,{"idx":9,"name":"pecker-teeth","tpage_name":"ldmpckgn-pris"}],[128974937,{"idx":89,"name":"ashelin-whitestrap","tpage_name":"freecast-pris2"}],[155123716,{"idx":4,"name":"daxter-orange","tpage_name":"mhctycst-pris"}],[153878536,{"idx":8,"name":"pecker-tail","tpage_name":"ldmpckgn-pris"}],[128974936,{"idx":88,"name":"ashelin-teeth","tpage_name":"freecast-pris2"}],[155123715,{"idx":3,"name":"daxter-furhilite","tpage_name":"mhctycst-pris"}],[153878535,{"idx":7,"name":"pecker-plume","tpage_name":"ldmpckgn-pris"}],[128974935,{"idx":87,"name":"ashelin-shoemetal","tpage_name":"freecast-pris2"}],[155123714,{"idx":2,"name":"daxter-eyelid","tpage_name":"mhctycst-pris"}],[153878534,{"idx":6,"name":"pecker-face","tpage_name":"ldmpckgn-pris"}],[128974934,{"idx":86,"name":"ashelin-shoebottom","tpage_name":"freecast-pris2"}],[155123713,{"idx":1,"name":"bam-hairhilite","tpage_name":"mhctycst-pris"}],[153878533,{"idx":5,"name":"pecker-eyelid","tpage_name":"ldmpckgn-pris"}],[128974933,{"idx":85,"name":"ashelin-shield","tpage_name":"freecast-pris2"}],[155123712,{"idx":0,"name":"bam-eyelight","tpage_name":"mhctycst-pris"}],[153878532,{"idx":4,"name":"pecker-body-01","tpage_name":"ldmpckgn-pris"}],[128974932,{"idx":84,"name":"ashelin-shells","tpage_name":"freecast-pris2"}],[153878531,{"idx":3,"name":"bam-eyelight","tpage_name":"ldmpckgn-pris"}],[128974931,{"idx":83,"name":"ashelin-redtop","tpage_name":"freecast-pris2"}],[153878530,{"idx":2,"name":"jakchires-precarmor-01","tpage_name":"ldmpckgn-pris"}],[128974930,{"idx":82,"name":"ashelin-pantstop","tpage_name":"freecast-pris2"}],[153878529,{"idx":1,"name":"jakchires-brownstrap","tpage_name":"ldmpckgn-pris"}],[128974929,{"idx":81,"name":"ashelin-jacketstraps","tpage_name":"freecast-pris2"}],[153878528,{"idx":0,"name":"jakc-wristband-a2","tpage_name":"ldmpckgn-pris"}],[128974928,{"idx":80,"name":"ashelin-jacketsleeve","tpage_name":"freecast-pris2"}],[128974927,{"idx":79,"name":"ashelin-jacketbody","tpage_name":"freecast-pris2"}],[128974926,{"idx":78,"name":"ashelin-handle-01","tpage_name":"freecast-pris2"}],[128974925,{"idx":77,"name":"ashelin-hair","tpage_name":"freecast-pris2"}],[128974924,{"idx":76,"name":"ashelin-gunholster","tpage_name":"freecast-pris2"}],[128974923,{"idx":75,"name":"ashelin-gunbarrel-03","tpage_name":"freecast-pris2"}],[128974922,{"idx":74,"name":"ashelin-gunbarrel-02","tpage_name":"freecast-pris2"}],[128974921,{"idx":73,"name":"ashelin-gunbarrel-01","tpage_name":"freecast-pris2"}],[128974920,{"idx":72,"name":"ashelin-glove","tpage_name":"freecast-pris2"}],[128974919,{"idx":71,"name":"ashelin-face","tpage_name":"freecast-pris2"}],[128974918,{"idx":70,"name":"ashelin-eyelid","tpage_name":"freecast-pris2"}],[128974917,{"idx":69,"name":"ashelin-eyebrow","tpage_name":"freecast-pris2"}],[128974916,{"idx":68,"name":"ashelin-eye","tpage_name":"freecast-pris2"}],[128974915,{"idx":67,"name":"ashelin-chest","tpage_name":"freecast-pris2"}],[128974914,{"idx":66,"name":"ashelin-cgrank","tpage_name":"freecast-pris2"}],[128974913,{"idx":65,"name":"ashelin-cglogo","tpage_name":"freecast-pris2"}],[128974912,{"idx":64,"name":"ashelin-brownstrap","tpage_name":"freecast-pris2"}],[128974911,{"idx":63,"name":"ashelin-boottop","tpage_name":"freecast-pris2"}],[146407430,{"idx":6,"name":"facc-convey-02","tpage_name":"factoryc-vis-alpha"}],[128974910,{"idx":62,"name":"ashelin-bolts","tpage_name":"freecast-pris2"}],[146407429,{"idx":5,"name":"facc-convey-02-dest","tpage_name":"factoryc-vis-alpha"}],[128974909,{"idx":61,"name":"ashelin-beltbuckle","tpage_name":"freecast-pris2"}],[146407428,{"idx":4,"name":"facc-convey-dest","tpage_name":"factoryc-vis-alpha"}],[128974908,{"idx":60,"name":"veger-whitecloth","tpage_name":"freecast-pris2"}],[146407427,{"idx":3,"name":"facc-convey","tpage_name":"factoryc-vis-alpha"}],[128974907,{"idx":59,"name":"veger-walkingstick-03","tpage_name":"freecast-pris2"}],[146407426,{"idx":2,"name":"facc-hole-grill-01","tpage_name":"factoryc-vis-alpha"}],[128974906,{"idx":58,"name":"veger-walkingstick-02","tpage_name":"freecast-pris2"}],[128974905,{"idx":57,"name":"veger-walkingstick-01","tpage_name":"freecast-pris2"}],[146407424,{"idx":0,"name":"facb-glass-01","tpage_name":"factoryc-vis-alpha"}],[128974904,{"idx":56,"name":"veger-vest","tpage_name":"freecast-pris2"}],[128974903,{"idx":55,"name":"veger-teeth","tpage_name":"freecast-pris2"}],[128974902,{"idx":54,"name":"veger-stickwrap","tpage_name":"freecast-pris2"}],[128974901,{"idx":53,"name":"veger-sleevelower","tpage_name":"freecast-pris2"}],[128974900,{"idx":52,"name":"veger-sleeve","tpage_name":"freecast-pris2"}],[128974899,{"idx":51,"name":"veger-shoulderplatemetal","tpage_name":"freecast-pris2"}],[128974898,{"idx":50,"name":"veger-shoulderplate","tpage_name":"freecast-pris2"}],[128974897,{"idx":49,"name":"veger-shoebottom","tpage_name":"freecast-pris2"}],[128974896,{"idx":48,"name":"veger-scarf","tpage_name":"freecast-pris2"}],[128974895,{"idx":47,"name":"veger-parchment","tpage_name":"freecast-pris2"}],[128974894,{"idx":46,"name":"veger-pants","tpage_name":"freecast-pris2"}],[128974893,{"idx":45,"name":"veger-pages","tpage_name":"freecast-pris2"}],[142671872,{"idx":0,"name":"sniper-core-glass-01","tpage_name":"lctysnpr-water"}],[128974892,{"idx":44,"name":"veger-legwraps","tpage_name":"freecast-pris2"}],[128974891,{"idx":43,"name":"veger-iris","tpage_name":"freecast-pris2"}],[128974890,{"idx":42,"name":"veger-hand","tpage_name":"freecast-pris2"}],[128974889,{"idx":41,"name":"veger-hair","tpage_name":"freecast-pris2"}],[128974888,{"idx":40,"name":"veger-gold","tpage_name":"freecast-pris2"}],[128974887,{"idx":39,"name":"veger-fingertop","tpage_name":"freecast-pris2"}],[128974886,{"idx":38,"name":"veger-fingerbottom","tpage_name":"freecast-pris2"}],[128974885,{"idx":37,"name":"veger-face","tpage_name":"freecast-pris2"}],[128974884,{"idx":36,"name":"veger-eyelid","tpage_name":"freecast-pris2"}],[128974883,{"idx":35,"name":"veger-endpaper","tpage_name":"freecast-pris2"}],[128974882,{"idx":34,"name":"veger-coatclips","tpage_name":"freecast-pris2"}],[128974881,{"idx":33,"name":"veger-coatbelt","tpage_name":"freecast-pris2"}],[128974880,{"idx":32,"name":"veger-coat","tpage_name":"freecast-pris2"}],[128974879,{"idx":31,"name":"veger-bootstrap","tpage_name":"freecast-pris2"}],[128974878,{"idx":30,"name":"veger-bootfoot","tpage_name":"freecast-pris2"}],[128974877,{"idx":29,"name":"veger-bootbolt","tpage_name":"freecast-pris2"}],[128974876,{"idx":28,"name":"veger-bookspine","tpage_name":"freecast-pris2"}],[128974875,{"idx":27,"name":"veger-booksides","tpage_name":"freecast-pris2"}],[128974874,{"idx":26,"name":"veger-bookleather","tpage_name":"freecast-pris2"}],[128974873,{"idx":25,"name":"samosbird-wing","tpage_name":"freecast-pris2"}],[128974872,{"idx":24,"name":"samosbird-plume","tpage_name":"freecast-pris2"}],[128974871,{"idx":23,"name":"samosbird-eye","tpage_name":"freecast-pris2"}],[130220050,{"idx":18,"name":"daxtertuft","tpage_name":"lpatkcs-pris"}],[128974870,{"idx":22,"name":"samosbird-body","tpage_name":"freecast-pris2"}],[130220049,{"idx":17,"name":"daxterteeth","tpage_name":"lpatkcs-pris"}],[128974869,{"idx":21,"name":"samosbird-beak","tpage_name":"freecast-pris2"}],[130220048,{"idx":16,"name":"daxternose","tpage_name":"lpatkcs-pris"}],[128974868,{"idx":20,"name":"samos-vest","tpage_name":"freecast-pris2"}],[130220047,{"idx":15,"name":"daxterlense","tpage_name":"lpatkcs-pris"}],[128974867,{"idx":19,"name":"samos-teeth2","tpage_name":"freecast-pris2"}],[130220046,{"idx":14,"name":"daxterhelmetplain","tpage_name":"lpatkcs-pris"}],[128974866,{"idx":18,"name":"samos-strap","tpage_name":"freecast-pris2"}],[130220045,{"idx":13,"name":"daxterheadwidenew","tpage_name":"lpatkcs-pris"}],[128974865,{"idx":17,"name":"samos-metal","tpage_name":"freecast-pris2"}],[130220044,{"idx":12,"name":"daxtergoggles","tpage_name":"lpatkcs-pris"}],[128974864,{"idx":16,"name":"samos-log-03","tpage_name":"freecast-pris2"}],[130220043,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"lpatkcs-pris"}],[128974863,{"idx":15,"name":"samos-log-02","tpage_name":"freecast-pris2"}],[130220042,{"idx":10,"name":"daxterfoot","tpage_name":"lpatkcs-pris"}],[128974862,{"idx":14,"name":"samos-log-01","tpage_name":"freecast-pris2"}],[130220041,{"idx":9,"name":"daxterfinger","tpage_name":"lpatkcs-pris"}],[128974861,{"idx":13,"name":"samos-lens","tpage_name":"freecast-pris2"}],[130220040,{"idx":8,"name":"daxterear","tpage_name":"lpatkcs-pris"}],[128974860,{"idx":12,"name":"samos-leaf","tpage_name":"freecast-pris2"}],[130220039,{"idx":7,"name":"daxterbolt","tpage_name":"lpatkcs-pris"}],[128974859,{"idx":11,"name":"samos-helmet","tpage_name":"freecast-pris2"}],[130220038,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"lpatkcs-pris"}],[128974858,{"idx":10,"name":"samos-hair","tpage_name":"freecast-pris2"}],[130220037,{"idx":5,"name":"daxterarm","tpage_name":"lpatkcs-pris"}],[128974857,{"idx":9,"name":"samos-finger-01","tpage_name":"freecast-pris2"}],[130220036,{"idx":4,"name":"daxter-orange","tpage_name":"lpatkcs-pris"}],[128974856,{"idx":8,"name":"samos-face","tpage_name":"freecast-pris2"}],[130220035,{"idx":3,"name":"daxter-furhilite","tpage_name":"lpatkcs-pris"}],[128974855,{"idx":7,"name":"samos-eyelid","tpage_name":"freecast-pris2"}],[130220034,{"idx":2,"name":"daxter-eyelid","tpage_name":"lpatkcs-pris"}],[128974854,{"idx":6,"name":"samos-eye","tpage_name":"freecast-pris2"}],[130220033,{"idx":1,"name":"bam-hairhilite","tpage_name":"lpatkcs-pris"}],[128974853,{"idx":5,"name":"samos-ear","tpage_name":"freecast-pris2"}],[130220032,{"idx":0,"name":"bam-eyelight","tpage_name":"lpatkcs-pris"}],[128974852,{"idx":4,"name":"samos-diaper","tpage_name":"freecast-pris2"}],[128974851,{"idx":3,"name":"samos-arm","tpage_name":"freecast-pris2"}],[128974850,{"idx":2,"name":"environment-oldmetal","tpage_name":"freecast-pris2"}],[128974849,{"idx":1,"name":"bam-hairhilite","tpage_name":"freecast-pris2"}],[128974848,{"idx":0,"name":"bam-eyelight","tpage_name":"freecast-pris2"}],[128909378,{"idx":66,"name":"talkbox-light-02","tpage_name":"freecast-pris"}],[128909377,{"idx":65,"name":"jakc-armor","tpage_name":"freecast-pris"}],[128909376,{"idx":64,"name":"gun-yellowgreen","tpage_name":"freecast-pris"}],[128909375,{"idx":63,"name":"gun-yellow-mag-end","tpage_name":"freecast-pris"}],[146341894,{"idx":6,"name":"facc-metal-panel-09","tpage_name":"factoryc-vis-tfrag"}],[128909374,{"idx":62,"name":"gun-tip","tpage_name":"freecast-pris"}],[146341893,{"idx":5,"name":"facc-beam-01","tpage_name":"factoryc-vis-tfrag"}],[128909373,{"idx":61,"name":"gun-teeth","tpage_name":"freecast-pris"}],[146341892,{"idx":4,"name":"facc-door-frame-01","tpage_name":"factoryc-vis-tfrag"}],[128909372,{"idx":60,"name":"gun-main","tpage_name":"freecast-pris"}],[146341891,{"idx":3,"name":"facc-turret-base","tpage_name":"factoryc-vis-tfrag"}],[128909371,{"idx":59,"name":"gun-eye","tpage_name":"freecast-pris"}],[146341890,{"idx":2,"name":"facc-wall-trim-01","tpage_name":"factoryc-vis-tfrag"}],[128909370,{"idx":58,"name":"environment-title","tpage_name":"freecast-pris"}],[146341889,{"idx":1,"name":"facc-wall-01","tpage_name":"factoryc-vis-tfrag"}],[128909369,{"idx":57,"name":"pecker-yellowfur","tpage_name":"freecast-pris"}],[146341888,{"idx":0,"name":"facc-metal-panel-11","tpage_name":"factoryc-vis-tfrag"}],[128909368,{"idx":56,"name":"pecker-wingtop","tpage_name":"freecast-pris"}],[128909367,{"idx":55,"name":"pecker-wingbottom","tpage_name":"freecast-pris"}],[128909366,{"idx":54,"name":"pecker-teeth","tpage_name":"freecast-pris"}],[128909365,{"idx":53,"name":"pecker-tail","tpage_name":"freecast-pris"}],[128909364,{"idx":52,"name":"pecker-plume","tpage_name":"freecast-pris"}],[128909363,{"idx":51,"name":"pecker-face","tpage_name":"freecast-pris"}],[128909362,{"idx":50,"name":"pecker-eyelid","tpage_name":"freecast-pris"}],[128909361,{"idx":49,"name":"pecker-body-01","tpage_name":"freecast-pris"}],[128909360,{"idx":48,"name":"onin-toe","tpage_name":"freecast-pris"}],[128909359,{"idx":47,"name":"onin-teeth","tpage_name":"freecast-pris"}],[128909358,{"idx":46,"name":"onin-skirt","tpage_name":"freecast-pris"}],[128909357,{"idx":45,"name":"onin-shirt","tpage_name":"freecast-pris"}],[128909356,{"idx":44,"name":"onin-scarf","tpage_name":"freecast-pris"}],[128909355,{"idx":43,"name":"onin-rings2","tpage_name":"freecast-pris"}],[128909354,{"idx":42,"name":"onin-rings","tpage_name":"freecast-pris"}],[128909353,{"idx":41,"name":"onin-neck","tpage_name":"freecast-pris"}],[128909352,{"idx":40,"name":"onin-mat","tpage_name":"freecast-pris"}],[128909351,{"idx":39,"name":"onin-idoleye","tpage_name":"freecast-pris"}],[128909350,{"idx":38,"name":"onin-idol","tpage_name":"freecast-pris"}],[128909349,{"idx":37,"name":"onin-handpalm","tpage_name":"freecast-pris"}],[128909348,{"idx":36,"name":"onin-hand","tpage_name":"freecast-pris"}],[128909347,{"idx":35,"name":"onin-hair","tpage_name":"freecast-pris"}],[128909346,{"idx":34,"name":"onin-finger","tpage_name":"freecast-pris"}],[128909345,{"idx":33,"name":"onin-face","tpage_name":"freecast-pris"}],[128909344,{"idx":32,"name":"onin-eyelid","tpage_name":"freecast-pris"}],[128909343,{"idx":31,"name":"onin-eye","tpage_name":"freecast-pris"}],[128909342,{"idx":30,"name":"onin-chain","tpage_name":"freecast-pris"}],[128909341,{"idx":29,"name":"onin-braclet","tpage_name":"freecast-pris"}],[128909340,{"idx":28,"name":"onin-bowlhead","tpage_name":"freecast-pris"}],[128909339,{"idx":27,"name":"onin-arm","tpage_name":"freecast-pris"}],[128909338,{"idx":26,"name":"keira-torch-nozzle-02","tpage_name":"freecast-pris"}],[128909337,{"idx":25,"name":"keira-torch-nozzle-01","tpage_name":"freecast-pris"}],[128909336,{"idx":24,"name":"keira-torch-guard-01","tpage_name":"freecast-pris"}],[128909335,{"idx":23,"name":"keira-shoebottom","tpage_name":"freecast-pris"}],[128909334,{"idx":22,"name":"keira-shirt","tpage_name":"freecast-pris"}],[128909333,{"idx":21,"name":"keira-pantslarge","tpage_name":"freecast-pris"}],[128909332,{"idx":20,"name":"keira-maskbolt","tpage_name":"freecast-pris"}],[128909331,{"idx":19,"name":"keira-lens-large","tpage_name":"freecast-pris"}],[128909330,{"idx":18,"name":"keira-largewraps","tpage_name":"freecast-pris"}],[128909329,{"idx":17,"name":"keira-iris-64x64","tpage_name":"freecast-pris"}],[128909328,{"idx":16,"name":"keira-handtop","tpage_name":"freecast-pris"}],[128909327,{"idx":15,"name":"keira-handbottom","tpage_name":"freecast-pris"}],[128909322,{"idx":10,"name":"keira-face","tpage_name":"freecast-pris"}],[128909321,{"idx":9,"name":"keira-eyelid","tpage_name":"freecast-pris"}],[129433612,{"idx":12,"name":"dp-text-13","tpage_name":"wasseem-sprite"}],[128188432,{"idx":16,"name":"des-burn-precursor-head-01","tpage_name":"waswide-vis-shrub"}],[129433611,{"idx":11,"name":"dp-text-12","tpage_name":"wasseem-sprite"}],[128188431,{"idx":15,"name":"des-burn-precursor-01-bottom","tpage_name":"waswide-vis-shrub"}],[129433610,{"idx":10,"name":"dp-text-11","tpage_name":"wasseem-sprite"}],[128188430,{"idx":14,"name":"des-burn-precursor-01","tpage_name":"waswide-vis-shrub"}],[129433609,{"idx":9,"name":"dp-text-10","tpage_name":"wasseem-sprite"}],[128188429,{"idx":13,"name":"des-burn-eye-on","tpage_name":"waswide-vis-shrub"}],[127795331,{"idx":131,"name":"rub-palace-tower-side","tpage_name":"lfaccity-tfrag"}],[127795330,{"idx":130,"name":"palcab-lorez-plates-red-stripe01","tpage_name":"lfaccity-tfrag"}],[127795329,{"idx":129,"name":"palcab-lorez-plates01","tpage_name":"lfaccity-tfrag"}],[127795328,{"idx":128,"name":"palcab-lorez-asphalt01","tpage_name":"lfaccity-tfrag"}],[127795327,{"idx":127,"name":"palcab-lorez-metal01-red-stripe","tpage_name":"lfaccity-tfrag"}],[127795326,{"idx":126,"name":"palcab-lorez-metal01-red","tpage_name":"lfaccity-tfrag"}],[127795325,{"idx":125,"name":"palcab-lowres-background-peaks-02","tpage_name":"lfaccity-tfrag"}],[127795324,{"idx":124,"name":"palcab-smallpipe-lores","tpage_name":"lfaccity-tfrag"}],[127795323,{"idx":123,"name":"palcab-lowres-background-shoreline-02","tpage_name":"lfaccity-tfrag"}],[127795322,{"idx":122,"name":"palcab-lowres-background-grass-to-desert-01","tpage_name":"lfaccity-tfrag"}],[127795321,{"idx":121,"name":"palcab-lowres-background-grass-to-desert-02","tpage_name":"lfaccity-tfrag"}],[127795320,{"idx":120,"name":"palcab-lowres-background-mountains","tpage_name":"lfaccity-tfrag"}],[127795319,{"idx":119,"name":"palcab-lowres-background-peaks-01","tpage_name":"lfaccity-tfrag"}],[153944098,{"idx":34,"name":"king-wristband","tpage_name":"ldmpckgn-pris2"}],[127795318,{"idx":118,"name":"palcab-lowres-background-crater-01","tpage_name":"lfaccity-tfrag"}],[153944097,{"idx":33,"name":"king-wraps","tpage_name":"ldmpckgn-pris2"}],[127795317,{"idx":117,"name":"palcab-lowres-background-desert-to-shore","tpage_name":"lfaccity-tfrag"}],[153944096,{"idx":32,"name":"king-wrap","tpage_name":"ldmpckgn-pris2"}],[127795316,{"idx":116,"name":"palcab-lowres-background-hilltops-01","tpage_name":"lfaccity-tfrag"}],[153944095,{"idx":31,"name":"king-vestback","tpage_name":"ldmpckgn-pris2"}],[127795315,{"idx":115,"name":"palcab-lowres-background-mounatin-window","tpage_name":"lfaccity-tfrag"}],[153944094,{"idx":30,"name":"king-vest","tpage_name":"ldmpckgn-pris2"}],[127795314,{"idx":114,"name":"palcab-lowres-background-shoreline-01","tpage_name":"lfaccity-tfrag"}],[153944093,{"idx":29,"name":"king-thinstrap","tpage_name":"ldmpckgn-pris2"}],[127795313,{"idx":113,"name":"palcab-swingp-trim","tpage_name":"lfaccity-tfrag"}],[153944092,{"idx":28,"name":"king-teeth","tpage_name":"ldmpckgn-pris2"}],[127795312,{"idx":112,"name":"tcab-blue-ring-01","tpage_name":"lfaccity-tfrag"}],[153944091,{"idx":27,"name":"king-skirt-b","tpage_name":"ldmpckgn-pris2"}],[127795311,{"idx":111,"name":"city-lowres-mhcity-tower-01","tpage_name":"lfaccity-tfrag"}],[153944090,{"idx":26,"name":"king-skirt","tpage_name":"ldmpckgn-pris2"}],[127795310,{"idx":110,"name":"city-lowres-mhcity-tower-02","tpage_name":"lfaccity-tfrag"}],[153944089,{"idx":25,"name":"king-shoebottom","tpage_name":"ldmpckgn-pris2"}],[127795309,{"idx":109,"name":"ctywide-ox-met-01","tpage_name":"lfaccity-tfrag"}],[153944088,{"idx":24,"name":"king-precursermetal-trimbolt","tpage_name":"ldmpckgn-pris2"}],[127795308,{"idx":108,"name":"t-palshaft-pil-01","tpage_name":"lfaccity-tfrag"}],[153944086,{"idx":22,"name":"king-precursermetal-trim","tpage_name":"ldmpckgn-pris2"}],[127795306,{"idx":106,"name":"tcab-beam01-lores","tpage_name":"lfaccity-tfrag"}],[153944085,{"idx":21,"name":"king-precursermetal-plain","tpage_name":"ldmpckgn-pris2"}],[150208545,{"idx":33,"name":"klever-widebrownstrap","tpage_name":"lsigklv-pris"}],[127795305,{"idx":105,"name":"t-palshaft-r-strp-plate01","tpage_name":"lfaccity-tfrag"}],[153944084,{"idx":20,"name":"king-precursermetal-decor","tpage_name":"ldmpckgn-pris2"}],[151453724,{"idx":28,"name":"torn-vest","tpage_name":"ltnfxhip-pris2"}],[150208544,{"idx":32,"name":"klever-undershirt","tpage_name":"lsigklv-pris"}],[127795304,{"idx":104,"name":"city-lowres-mhcity-ground-01","tpage_name":"lfaccity-tfrag"}],[153944083,{"idx":19,"name":"king-lgblackstrap","tpage_name":"ldmpckgn-pris2"}],[151453723,{"idx":27,"name":"torn-teeth-01","tpage_name":"ltnfxhip-pris2"}],[150208543,{"idx":31,"name":"klever-thighs","tpage_name":"lsigklv-pris"}],[127795303,{"idx":103,"name":"palcab-lowres-background-strip","tpage_name":"lfaccity-tfrag"}],[153944082,{"idx":18,"name":"king-leg","tpage_name":"ldmpckgn-pris2"}],[151453722,{"idx":26,"name":"torn-shoe-02","tpage_name":"ltnfxhip-pris2"}],[150208542,{"idx":30,"name":"klever-skirtlight","tpage_name":"lsigklv-pris"}],[127795302,{"idx":102,"name":"t-palshaft-panl-01","tpage_name":"lfaccity-tfrag"}],[153944081,{"idx":17,"name":"king-iris","tpage_name":"ldmpckgn-pris2"}],[151453721,{"idx":25,"name":"torn-shoe","tpage_name":"ltnfxhip-pris2"}],[150208541,{"idx":29,"name":"klever-skirtdark","tpage_name":"lsigklv-pris"}],[127795301,{"idx":101,"name":"citywide-consite-steel","tpage_name":"lfaccity-tfrag"}],[153944080,{"idx":16,"name":"king-horn","tpage_name":"ldmpckgn-pris2"}],[151453720,{"idx":24,"name":"torn-scarf","tpage_name":"ltnfxhip-pris2"}],[150208540,{"idx":28,"name":"klever-shoebottom","tpage_name":"lsigklv-pris"}],[127795300,{"idx":100,"name":"palace-break-brokenwall","tpage_name":"lfaccity-tfrag"}],[153944079,{"idx":15,"name":"king-hand","tpage_name":"ldmpckgn-pris2"}],[151453719,{"idx":23,"name":"torn-pipe","tpage_name":"ltnfxhip-pris2"}],[150208539,{"idx":27,"name":"klever-shoe","tpage_name":"lsigklv-pris"}],[127795299,{"idx":99,"name":"palcab-lowres-stadium-grass","tpage_name":"lfaccity-tfrag"}],[157679618,{"idx":2,"name":"hud-target-reticle","tpage_name":"desbattl-minimap"}],[153944078,{"idx":14,"name":"king-hair","tpage_name":"ldmpckgn-pris2"}],[151453718,{"idx":22,"name":"torn-mouth","tpage_name":"ltnfxhip-pris2"}],[150208538,{"idx":26,"name":"klever-mustache","tpage_name":"lsigklv-pris"}],[127795298,{"idx":98,"name":"palcab-wall-lores","tpage_name":"lfaccity-tfrag"}],[157679617,{"idx":1,"name":"hud-des-beast","tpage_name":"desbattl-minimap"}],[153944077,{"idx":13,"name":"king-greenmetalplain","tpage_name":"ldmpckgn-pris2"}],[151453717,{"idx":21,"name":"torn-metal2","tpage_name":"ltnfxhip-pris2"}],[150208537,{"idx":25,"name":"klever-horn","tpage_name":"lsigklv-pris"}],[127795297,{"idx":97,"name":"ctyp-metal-01","tpage_name":"lfaccity-tfrag"}],[157679616,{"idx":0,"name":"wascity-turret-hud-big-arrow-01","tpage_name":"desbattl-minimap"}],[153944076,{"idx":12,"name":"king-greenmetal","tpage_name":"ldmpckgn-pris2"}],[151453716,{"idx":20,"name":"torn-legshield","tpage_name":"ltnfxhip-pris2"}],[150208536,{"idx":24,"name":"klever-handwrap","tpage_name":"lsigklv-pris"}],[146472996,{"idx":36,"name":"facc-markings-06","tpage_name":"factoryc-vis-shrub"}],[127795296,{"idx":96,"name":"tcab-plat-edg-01-lores","tpage_name":"lfaccity-tfrag"}],[153944075,{"idx":11,"name":"king-finger","tpage_name":"ldmpckgn-pris2"}],[151453715,{"idx":19,"name":"torn-handle-01","tpage_name":"ltnfxhip-pris2"}],[150208535,{"idx":23,"name":"klever-hand","tpage_name":"lsigklv-pris"}],[146472995,{"idx":35,"name":"facc-markings-03","tpage_name":"factoryc-vis-shrub"}],[127795295,{"idx":95,"name":"tcab-beam01","tpage_name":"lfaccity-tfrag"}],[153944074,{"idx":10,"name":"king-face-01","tpage_name":"ldmpckgn-pris2"}],[151453714,{"idx":18,"name":"torn-hair-02","tpage_name":"ltnfxhip-pris2"}],[150208534,{"idx":22,"name":"klever-hair","tpage_name":"lsigklv-pris"}],[146472994,{"idx":34,"name":"facc-markings-04","tpage_name":"factoryc-vis-shrub"}],[127795294,{"idx":94,"name":"palcab-lowres-background-desert-01","tpage_name":"lfaccity-tfrag"}],[153944071,{"idx":7,"name":"king-clip-02","tpage_name":"ldmpckgn-pris2"}],[151453711,{"idx":15,"name":"torn-gunbarrel","tpage_name":"ltnfxhip-pris2"}],[150208531,{"idx":19,"name":"klever-gunmetal-03","tpage_name":"lsigklv-pris"}],[146472991,{"idx":31,"name":"facc-markings-02","tpage_name":"factoryc-vis-shrub"}],[127795291,{"idx":91,"name":"palcab-lowres-background-trees2","tpage_name":"lfaccity-tfrag"}],[153944070,{"idx":6,"name":"king-chest","tpage_name":"ldmpckgn-pris2"}],[151453710,{"idx":14,"name":"torn-footleather","tpage_name":"ltnfxhip-pris2"}],[150208530,{"idx":18,"name":"klever-gunmetal-02","tpage_name":"lsigklv-pris"}],[146472990,{"idx":30,"name":"facb-move-plat-plate-02","tpage_name":"factoryc-vis-shrub"}],[127795290,{"idx":90,"name":"palcab-lowres-background-trees-edge","tpage_name":"lfaccity-tfrag"}],[153944069,{"idx":5,"name":"king-bolt","tpage_name":"ldmpckgn-pris2"}],[151453709,{"idx":13,"name":"torn-finger","tpage_name":"ltnfxhip-pris2"}],[150208529,{"idx":17,"name":"klever-gunmetal-01","tpage_name":"lsigklv-pris"}],[146472989,{"idx":29,"name":"facb-move-plat-plate-01","tpage_name":"factoryc-vis-shrub"}],[127795289,{"idx":89,"name":"palcab-swingp-base-lores","tpage_name":"lfaccity-tfrag"}],[153944068,{"idx":4,"name":"king-bluemetal","tpage_name":"ldmpckgn-pris2"}],[151453708,{"idx":12,"name":"torn-face-right","tpage_name":"ltnfxhip-pris2"}],[150208528,{"idx":16,"name":"klever-fingertop","tpage_name":"lsigklv-pris"}],[127795288,{"idx":88,"name":"city-lowres-mhcity-wall-03","tpage_name":"lfaccity-tfrag"}],[153944067,{"idx":3,"name":"king-blackskirt2","tpage_name":"ldmpckgn-pris2"}],[151453707,{"idx":11,"name":"torn-face","tpage_name":"ltnfxhip-pris2"}],[150208527,{"idx":15,"name":"klever-fingerbottom","tpage_name":"lsigklv-pris"}],[127795287,{"idx":87,"name":"common-black","tpage_name":"lfaccity-tfrag"}],[153944066,{"idx":2,"name":"king-arm","tpage_name":"ldmpckgn-pris2"}],[151453706,{"idx":10,"name":"torn-eyelid","tpage_name":"ltnfxhip-pris2"}],[150208526,{"idx":14,"name":"klever-face-01scars","tpage_name":"lsigklv-pris"}],[127795286,{"idx":86,"name":"city-lowres-mhcity-wall-05","tpage_name":"lfaccity-tfrag"}],[153944065,{"idx":1,"name":"environment-oldmetal","tpage_name":"ldmpckgn-pris2"}],[151453705,{"idx":9,"name":"torn-eye","tpage_name":"ltnfxhip-pris2"}],[150208525,{"idx":13,"name":"klever-face-01","tpage_name":"lsigklv-pris"}],[146472985,{"idx":25,"name":"facc-floor-grill-01","tpage_name":"factoryc-vis-shrub"}],[127795285,{"idx":85,"name":"city-lowres-mhcity-wall-06","tpage_name":"lfaccity-tfrag"}],[153944064,{"idx":0,"name":"bam-eyelight","tpage_name":"ldmpckgn-pris2"}],[151453704,{"idx":8,"name":"torn-ear","tpage_name":"ltnfxhip-pris2"}],[150208524,{"idx":12,"name":"klever-eyelid","tpage_name":"lsigklv-pris"}],[146472984,{"idx":24,"name":"facc-bolt-01","tpage_name":"factoryc-vis-shrub"}],[127795284,{"idx":84,"name":"palcab-lowres-background-mountains-02","tpage_name":"lfaccity-tfrag"}],[152698883,{"idx":3,"name":"tpl-symbl-yellow-01","tpage_name":"templex-vis-pris"}],[151453703,{"idx":7,"name":"torn-blademetal","tpage_name":"ltnfxhip-pris2"}],[150208523,{"idx":11,"name":"klever-eye","tpage_name":"lsigklv-pris"}],[146472983,{"idx":23,"name":"facc-bolt-02","tpage_name":"factoryc-vis-shrub"}],[127795283,{"idx":83,"name":"city-lowres-mhcity-detower-02","tpage_name":"lfaccity-tfrag"}],[152698882,{"idx":2,"name":"temple_sandstone_trim02","tpage_name":"templex-vis-pris"}],[151453702,{"idx":6,"name":"torn-belt2","tpage_name":"ltnfxhip-pris2"}],[150208522,{"idx":10,"name":"klever-earcup","tpage_name":"lsigklv-pris"}],[146472982,{"idx":22,"name":"fac-rotofan-rim-02","tpage_name":"factoryc-vis-shrub"}],[127795282,{"idx":82,"name":"city-lowres-mhcity-detower-01","tpage_name":"lfaccity-tfrag"}],[152698881,{"idx":1,"name":"temple_sandstone_scale_01","tpage_name":"templex-vis-pris"}],[151453701,{"idx":5,"name":"torn-belt","tpage_name":"ltnfxhip-pris2"}],[150208521,{"idx":9,"name":"klever-clips","tpage_name":"lsigklv-pris"}],[146472981,{"idx":21,"name":"fac-rotofan-blade-01","tpage_name":"factoryc-vis-shrub"}],[127795281,{"idx":81,"name":"city-lowres-mhcity-wall-01","tpage_name":"lfaccity-tfrag"}],[152698880,{"idx":0,"name":"temple_sandstone_out_01","tpage_name":"templex-vis-pris"}],[151453700,{"idx":4,"name":"torn-armor","tpage_name":"ltnfxhip-pris2"}],[150208520,{"idx":8,"name":"klever-chest","tpage_name":"lsigklv-pris"}],[146472980,{"idx":20,"name":"fac-rotofan-blade-02","tpage_name":"factoryc-vis-shrub"}],[127795280,{"idx":80,"name":"city-lowres-mhcity-wall-02","tpage_name":"lfaccity-tfrag"}],[151453699,{"idx":3,"name":"torn-armlft","tpage_name":"ltnfxhip-pris2"}],[150208519,{"idx":7,"name":"klever-brownstrap","tpage_name":"lsigklv-pris"}],[146472979,{"idx":19,"name":"fac-rotofan-cap-01","tpage_name":"factoryc-vis-shrub"}],[127795279,{"idx":79,"name":"citywide-hangmetal","tpage_name":"lfaccity-tfrag"}],[151453698,{"idx":2,"name":"charHOLD","tpage_name":"ltnfxhip-pris2"}],[150208518,{"idx":6,"name":"klever-bolt","tpage_name":"lsigklv-pris"}],[146472978,{"idx":18,"name":"fac-rotofan-cap-02","tpage_name":"factoryc-vis-shrub"}],[127795278,{"idx":78,"name":"citywide-palace-01","tpage_name":"lfaccity-tfrag"}],[151453697,{"idx":1,"name":"bam-hairhilite","tpage_name":"ltnfxhip-pris2"}],[150208517,{"idx":5,"name":"klever-blackstrap","tpage_name":"lsigklv-pris"}],[146472977,{"idx":17,"name":"fac-rotofan-rim-01","tpage_name":"factoryc-vis-shrub"}],[127795277,{"idx":77,"name":"palace-break-girder01","tpage_name":"lfaccity-tfrag"}],[151453696,{"idx":0,"name":"bam-eyelight","tpage_name":"ltnfxhip-pris2"}],[150208516,{"idx":4,"name":"klever-armor-02","tpage_name":"lsigklv-pris"}],[146472976,{"idx":16,"name":"robopod-rim-02","tpage_name":"factoryc-vis-shrub"}],[127795276,{"idx":76,"name":"t-palshaft-roof-01","tpage_name":"lfaccity-tfrag"}],[150208515,{"idx":3,"name":"klever-armor-01","tpage_name":"lsigklv-pris"}],[146472975,{"idx":15,"name":"robopod-panel-02","tpage_name":"factoryc-vis-shrub"}],[127795275,{"idx":75,"name":"palcab-lowres-farm-wall-top","tpage_name":"lfaccity-tfrag"}],[150208514,{"idx":2,"name":"klever-arm","tpage_name":"lsigklv-pris"}],[146472974,{"idx":14,"name":"robopod-door-01","tpage_name":"factoryc-vis-shrub"}],[127795274,{"idx":74,"name":"palcab-lowres-farm-wall","tpage_name":"lfaccity-tfrag"}],[150208513,{"idx":1,"name":"bam-hairhilite","tpage_name":"lsigklv-pris"}],[146472973,{"idx":13,"name":"robopod-panel-01","tpage_name":"factoryc-vis-shrub"}],[127795273,{"idx":73,"name":"t-citywide-wall-tile-01","tpage_name":"lfaccity-tfrag"}],[150208512,{"idx":0,"name":"bam-eyelight","tpage_name":"lsigklv-pris"}],[146472972,{"idx":12,"name":"common-black","tpage_name":"factoryc-vis-shrub"}],[127795272,{"idx":72,"name":"city-lowres-damaged-01","tpage_name":"lfaccity-tfrag"}],[146472971,{"idx":11,"name":"robopod-door-02","tpage_name":"factoryc-vis-shrub"}],[140247071,{"idx":31,"name":"sew-elevator-lod0top","tpage_name":"minee-tfrag"}],[127795271,{"idx":71,"name":"city-lowres-newslums-stripe-01","tpage_name":"lfaccity-tfrag"}],[146472970,{"idx":10,"name":"robopod-rim-01","tpage_name":"factoryc-vis-shrub"}],[140247070,{"idx":30,"name":"sewer-screw-02","tpage_name":"minee-tfrag"}],[127795270,{"idx":70,"name":"city-lowres-newslums-bigwindows-02","tpage_name":"lfaccity-tfrag"}],[146472969,{"idx":9,"name":"fac-firetorch-fire-01","tpage_name":"factoryc-vis-shrub"}],[140247069,{"idx":29,"name":"sewer-plate-05","tpage_name":"minee-tfrag"}],[127795269,{"idx":69,"name":"city-lowres-newslums-stripe-02","tpage_name":"lfaccity-tfrag"}],[146472968,{"idx":8,"name":"fac-firetorch-01","tpage_name":"factoryc-vis-shrub"}],[140247068,{"idx":28,"name":"sewer-pipe-01","tpage_name":"minee-tfrag"}],[127795268,{"idx":68,"name":"t-strip-lo-palsup-danger2","tpage_name":"lfaccity-tfrag"}],[146472967,{"idx":7,"name":"fac-break-floor-edge-02","tpage_name":"factoryc-vis-shrub"}],[140247067,{"idx":27,"name":"sewer-grate-01","tpage_name":"minee-tfrag"}],[127795267,{"idx":67,"name":"t-strip-lo-palsup-danger1","tpage_name":"lfaccity-tfrag"}],[146472966,{"idx":6,"name":"facc-beam-02","tpage_name":"factoryc-vis-shrub"}],[127795266,{"idx":66,"name":"t-strip-lo-palsup-panel-5","tpage_name":"lfaccity-tfrag"}],[146472965,{"idx":5,"name":"fac-break-floor-edge-01","tpage_name":"factoryc-vis-shrub"}],[127795265,{"idx":65,"name":"t-strip-lo-palsup-panel-4","tpage_name":"lfaccity-tfrag"}],[146472964,{"idx":4,"name":"fac-break-floor-bolt","tpage_name":"factoryc-vis-shrub"}],[127795264,{"idx":64,"name":"t-strip-lo-palsup-panel-3","tpage_name":"lfaccity-tfrag"}],[146472963,{"idx":3,"name":"fac-fence-rim-03","tpage_name":"factoryc-vis-shrub"}],[140247063,{"idx":23,"name":"sewer-concrete-edge-02","tpage_name":"minee-tfrag"}],[127795263,{"idx":63,"name":"t-strip-lo-palsup-panel-2","tpage_name":"lfaccity-tfrag"}],[146472962,{"idx":2,"name":"fac-fence-rim-02","tpage_name":"factoryc-vis-shrub"}],[140247062,{"idx":22,"name":"sewer-metal-floor-02","tpage_name":"minee-tfrag"}],[127795262,{"idx":62,"name":"t-strip-lo-palsup-panel-1","tpage_name":"lfaccity-tfrag"}],[146472960,{"idx":0,"name":"fac-fence-rim-grill-01","tpage_name":"factoryc-vis-shrub"}],[140247060,{"idx":20,"name":"sewer-metal-floor-01","tpage_name":"minee-tfrag"}],[127795260,{"idx":60,"name":"palcab-lowres-background-mount-build-03","tpage_name":"lfaccity-tfrag"}],[140247059,{"idx":19,"name":"sewer-metal-block-04","tpage_name":"minee-tfrag"}],[127795259,{"idx":59,"name":"palcab-lowres-background-mount-build-02","tpage_name":"lfaccity-tfrag"}],[140247058,{"idx":18,"name":"sewer-metal-01","tpage_name":"minee-tfrag"}],[127795258,{"idx":58,"name":"palcab-lowres-background-mount-build-01","tpage_name":"lfaccity-tfrag"}],[140247057,{"idx":17,"name":"sewer-metal-block-06","tpage_name":"minee-tfrag"}],[127795257,{"idx":57,"name":"t-palshaft-plate01","tpage_name":"lfaccity-tfrag"}],[140247056,{"idx":16,"name":"sewer-pipe-rim-08","tpage_name":"minee-tfrag"}],[127795256,{"idx":56,"name":"t-citywide-met-wall-02","tpage_name":"lfaccity-tfrag"}],[140247055,{"idx":15,"name":"sewer-small-light-01","tpage_name":"minee-tfrag"}],[127795255,{"idx":55,"name":"t-citywide-met-pill-01","tpage_name":"lfaccity-tfrag"}],[143982594,{"idx":2,"name":"map-ctyporta","tpage_name":"mhcitya-minimap"}],[140247054,{"idx":14,"name":"sewer-lip-01-hitweak","tpage_name":"minee-tfrag"}],[127795254,{"idx":54,"name":"t-citywide-met-strp02","tpage_name":"lfaccity-tfrag"}],[143982593,{"idx":1,"name":"map-ctyfarmb","tpage_name":"mhcitya-minimap"}],[140247053,{"idx":13,"name":"sewer-pipe-rim-05b","tpage_name":"minee-tfrag"}],[127795253,{"idx":53,"name":"t-citywide-red-met-01","tpage_name":"lfaccity-tfrag"}],[140247052,{"idx":12,"name":"sewer-metal-block-05","tpage_name":"minee-tfrag"}],[127795252,{"idx":52,"name":"t-citywide-met-strp01","tpage_name":"lfaccity-tfrag"}],[140247050,{"idx":10,"name":"sewer-mantel-02","tpage_name":"minee-tfrag"}],[127795250,{"idx":50,"name":"palcab-lorez-metal02","tpage_name":"lfaccity-tfrag"}],[140247049,{"idx":9,"name":"sewer-concrete-block-02","tpage_name":"minee-tfrag"}],[127795249,{"idx":49,"name":"palcab-lorez-metal01","tpage_name":"lfaccity-tfrag"}],[140247048,{"idx":8,"name":"sewer-brick-block-01","tpage_name":"minee-tfrag"}],[127795248,{"idx":48,"name":"palcab-lorez-metal03","tpage_name":"lfaccity-tfrag"}],[140247047,{"idx":7,"name":"sewer-block-01","tpage_name":"minee-tfrag"}],[127795247,{"idx":47,"name":"city-lowres-ctygen-stripe-02","tpage_name":"lfaccity-tfrag"}],[140247046,{"idx":6,"name":"sewer-metal-block-01","tpage_name":"minee-tfrag"}],[127795246,{"idx":46,"name":"city-lowres-ctygen-roof-01","tpage_name":"lfaccity-tfrag"}],[140247045,{"idx":5,"name":"sewer-big-brace-01","tpage_name":"minee-tfrag"}],[127795245,{"idx":45,"name":"city-lowres-ctygen-build-04","tpage_name":"lfaccity-tfrag"}],[140247044,{"idx":4,"name":"sewer-pipe-rim-01","tpage_name":"minee-tfrag"}],[127795244,{"idx":44,"name":"city-lowres-ctygen-build-05","tpage_name":"lfaccity-tfrag"}],[140247043,{"idx":3,"name":"sewer-plate-01","tpage_name":"minee-tfrag"}],[127795243,{"idx":43,"name":"city-lowres-ctygen-build-03","tpage_name":"lfaccity-tfrag"}],[140247042,{"idx":2,"name":"sewer-brick-block-06","tpage_name":"minee-tfrag"}],[127795242,{"idx":42,"name":"city-lowres-ctygen-side-01","tpage_name":"lfaccity-tfrag"}],[140247041,{"idx":1,"name":"sewer-brick-block-11","tpage_name":"minee-tfrag"}],[127795241,{"idx":41,"name":"city-lowres-ctygen-build-02","tpage_name":"lfaccity-tfrag"}],[140247040,{"idx":0,"name":"sewer-brick-block-10","tpage_name":"minee-tfrag"}],[127795240,{"idx":40,"name":"palcab-lowres-mark-highway","tpage_name":"lfaccity-tfrag"}],[127795239,{"idx":39,"name":"city-lowres-ctygen-build-01","tpage_name":"lfaccity-tfrag"}],[127795238,{"idx":38,"name":"city-lowres-ctygen-roof-02","tpage_name":"lfaccity-tfrag"}],[127795237,{"idx":37,"name":"city-lowres-ctygen-stripe-01","tpage_name":"lfaccity-tfrag"}],[127795236,{"idx":36,"name":"city-lowres-ctygen-side-02","tpage_name":"lfaccity-tfrag"}],[127795235,{"idx":35,"name":"palcab-lowres-mark-awning-red","tpage_name":"lfaccity-tfrag"}],[127795234,{"idx":34,"name":"palcab-lowres-mark-awning-green","tpage_name":"lfaccity-tfrag"}],[127795233,{"idx":33,"name":"palcab-lowres-mark-shops-01","tpage_name":"lfaccity-tfrag"}],[127795232,{"idx":32,"name":"palcab-lowres-mark-roof-rim-01","tpage_name":"lfaccity-tfrag"}],[127795231,{"idx":31,"name":"city-lowres-ind-wall-06","tpage_name":"lfaccity-tfrag"}],[127795230,{"idx":30,"name":"city-lowres-ind-wall-05","tpage_name":"lfaccity-tfrag"}],[127795229,{"idx":29,"name":"city-lowres-ind-wall-08","tpage_name":"lfaccity-tfrag"}],[127795228,{"idx":28,"name":"city-lowres-ind-wall-07","tpage_name":"lfaccity-tfrag"}],[127795227,{"idx":27,"name":"city-lowres-ind-wall-03","tpage_name":"lfaccity-tfrag"}],[127795226,{"idx":26,"name":"city-lowres-port-roof","tpage_name":"lfaccity-tfrag"}],[127795225,{"idx":25,"name":"city-lowres-ind-wall-01","tpage_name":"lfaccity-tfrag"}],[127795223,{"idx":23,"name":"palcab-lowres-mark-roof-01","tpage_name":"lfaccity-tfrag"}],[127795222,{"idx":22,"name":"city-lowres-fort-red","tpage_name":"lfaccity-tfrag"}],[127795221,{"idx":21,"name":"city-lowres-fort-yellow","tpage_name":"lfaccity-tfrag"}],[127795220,{"idx":20,"name":"city-lowres-ind-wall-02","tpage_name":"lfaccity-tfrag"}],[127795219,{"idx":19,"name":"palcab-lowres-stadium-canopy","tpage_name":"lfaccity-tfrag"}],[127795218,{"idx":18,"name":"palcab-steel-lores","tpage_name":"lfaccity-tfrag"}],[127795217,{"idx":17,"name":"city-lowres-ind-wall-04","tpage_name":"lfaccity-tfrag"}],[127795216,{"idx":16,"name":"palcab-lowres-mark-roof-02","tpage_name":"lfaccity-tfrag"}],[127795215,{"idx":15,"name":"palcab-pipe-hoze","tpage_name":"lfaccity-tfrag"}],[127795214,{"idx":14,"name":"palcab-lowres-ctyslum-wall-03","tpage_name":"lfaccity-tfrag"}],[127795213,{"idx":13,"name":"palcab-lowres-ctyslum-wall-04","tpage_name":"lfaccity-tfrag"}],[127795212,{"idx":12,"name":"palcab-lowres-ctyslum-roof-02","tpage_name":"lfaccity-tfrag"}],[127795211,{"idx":11,"name":"palcab-lowres-ctyslum-wall-02","tpage_name":"lfaccity-tfrag"}],[127795210,{"idx":10,"name":"palcab-lowres-ctyslum-wall-01","tpage_name":"lfaccity-tfrag"}],[127795209,{"idx":9,"name":"palcab-lowres-ctyslum-roof-01","tpage_name":"lfaccity-tfrag"}],[127795208,{"idx":8,"name":"palcab-lowres-ctyslum-roof-03","tpage_name":"lfaccity-tfrag"}],[127795207,{"idx":7,"name":"palcab-lowres-ctyslum-ground","tpage_name":"lfaccity-tfrag"}],[127795206,{"idx":6,"name":"palcab-lowres-ctywide-wall-02","tpage_name":"lfaccity-tfrag"}],[127795205,{"idx":5,"name":"palcab-lowres-background-rocksnow","tpage_name":"lfaccity-tfrag"}],[129040384,{"idx":0,"name":"keira-mask","tpage_name":"freecast-water"}],[127795204,{"idx":4,"name":"palcab-lowres-background-rocksnow2","tpage_name":"lfaccity-tfrag"}],[127795203,{"idx":3,"name":"palcab-lowres-background-crater-bottom-enviro","tpage_name":"lfaccity-tfrag"}],[127795202,{"idx":2,"name":"palcab-lowres-ctywide-wall-01","tpage_name":"lfaccity-tfrag"}],[127795201,{"idx":1,"name":"strip-metal-02-lores","tpage_name":"lfaccity-tfrag"}],[127795200,{"idx":0,"name":"palcab-lowres-background-hills-01","tpage_name":"lfaccity-tfrag"}],[127008795,{"idx":27,"name":"minc-light","tpage_name":"volcanox-tfrag"}],[127008794,{"idx":26,"name":"common_sandstone_base01","tpage_name":"volcanox-tfrag"}],[127008793,{"idx":25,"name":"common_sandstone_trim01","tpage_name":"volcanox-tfrag"}],[127008790,{"idx":22,"name":"warpgate-post-01","tpage_name":"volcanox-tfrag"}],[127008787,{"idx":19,"name":"vol-bark-burnt","tpage_name":"volcanox-tfrag"}],[127008786,{"idx":18,"name":"temple_sandstone_trim02","tpage_name":"volcanox-tfrag"}],[127008785,{"idx":17,"name":"temple_sandstone_plat01","tpage_name":"volcanox-tfrag"}],[127008784,{"idx":16,"name":"temple_sandstone_taper01","tpage_name":"volcanox-tfrag"}],[130744323,{"idx":3,"name":"des-rock-shrub-01","tpage_name":"deserth-vis-shrub"}],[127008783,{"idx":15,"name":"vola-grass-fringe-05-HI","tpage_name":"volcanox-tfrag"}],[127008775,{"idx":7,"name":"vola-rock-side-wall","tpage_name":"volcanox-tfrag"}],[127008774,{"idx":6,"name":"vol-ladder-wood","tpage_name":"volcanox-tfrag"}],[127008773,{"idx":5,"name":"vola-grass-blob","tpage_name":"volcanox-tfrag"}],[126877774,{"idx":78,"name":"lfacrm-gar-dumpster-03","tpage_name":"lfacrm1-tfrag"}],[126877773,{"idx":77,"name":"lfacrm-gar-dumpster-02","tpage_name":"lfacrm1-tfrag"}],[126877772,{"idx":76,"name":"lfacrm-gar-dumpster-01","tpage_name":"lfacrm1-tfrag"}],[126877771,{"idx":75,"name":"lfacrm-ind-wall-base-07","tpage_name":"lfacrm1-tfrag"}],[126877770,{"idx":74,"name":"lfacrm-plate-05-bridge","tpage_name":"lfacrm1-tfrag"}],[126877769,{"idx":73,"name":"lfacrm-wall-circuit","tpage_name":"lfacrm1-tfrag"}],[126877768,{"idx":72,"name":"lfacrm-monitor-rim-02","tpage_name":"lfacrm1-tfrag"}],[126877767,{"idx":71,"name":"lfacrm-red-light-01","tpage_name":"lfacrm1-tfrag"}],[126877766,{"idx":70,"name":"lfacrm-floor-01","tpage_name":"lfacrm1-tfrag"}],[126877765,{"idx":69,"name":"lfacrm-chrome-pipe-01","tpage_name":"lfacrm1-tfrag"}],[126877764,{"idx":68,"name":"lfacrm-brace-pipe-01","tpage_name":"lfacrm1-tfrag"}],[126877763,{"idx":67,"name":"lfacrm-blue-light-01","tpage_name":"lfacrm1-tfrag"}],[126877762,{"idx":66,"name":"lfacrm-wall-01","tpage_name":"lfacrm1-tfrag"}],[126877761,{"idx":65,"name":"lfacrm-yellowstripe","tpage_name":"lfacrm1-tfrag"}],[126877760,{"idx":64,"name":"lfacrm-grill-02","tpage_name":"lfacrm1-tfrag"}],[126877759,{"idx":63,"name":"lfacrm-smallpipe","tpage_name":"lfacrm1-tfrag"}],[126877758,{"idx":62,"name":"lfacrm-monitor-rim-03","tpage_name":"lfacrm1-tfrag"}],[126877757,{"idx":61,"name":"lfacrm-roof-03","tpage_name":"lfacrm1-tfrag"}],[126877756,{"idx":60,"name":"lfacrm-grill-01","tpage_name":"lfacrm1-tfrag"}],[126877755,{"idx":59,"name":"lfacrm-rivet-02","tpage_name":"lfacrm1-tfrag"}],[126877754,{"idx":58,"name":"lfacrml-beam02","tpage_name":"lfacrm1-tfrag"}],[126877753,{"idx":57,"name":"lfacrm-trim-02","tpage_name":"lfacrm1-tfrag"}],[126877752,{"idx":56,"name":"lfacrm-plate-06","tpage_name":"lfacrm1-tfrag"}],[126877751,{"idx":55,"name":"lfacrm-monitor-rim-01","tpage_name":"lfacrm1-tfrag"}],[126877750,{"idx":54,"name":"lfacrm-blue-light-02","tpage_name":"lfacrm1-tfrag"}],[126877749,{"idx":53,"name":"lfacrm-wall-02","tpage_name":"lfacrm1-tfrag"}],[126877748,{"idx":52,"name":"lfacrm-panl02","tpage_name":"lfacrm1-tfrag"}],[126877747,{"idx":51,"name":"lfacrm-rivet-01","tpage_name":"lfacrm1-tfrag"}],[126877746,{"idx":50,"name":"lfacrm-monitor-rim-04","tpage_name":"lfacrm1-tfrag"}],[126877745,{"idx":49,"name":"lfacrml-beam01","tpage_name":"lfacrm1-tfrag"}],[126877744,{"idx":48,"name":"lfacrm-tasphlt01","tpage_name":"lfacrm1-tfrag"}],[126877743,{"idx":47,"name":"lfacrm-arches-01","tpage_name":"lfacrm1-tfrag"}],[126877742,{"idx":46,"name":"lfacrm-starpanel-01","tpage_name":"lfacrm1-tfrag"}],[126877741,{"idx":45,"name":"lfacrm-metal-panel-08","tpage_name":"lfacrm1-tfrag"}],[126877740,{"idx":44,"name":"lfacrm-box-01","tpage_name":"lfacrm1-tfrag"}],[126877739,{"idx":43,"name":"lfacrm-plate-04","tpage_name":"lfacrm1-tfrag"}],[126877738,{"idx":42,"name":"lfacrm-pipe-01","tpage_name":"lfacrm1-tfrag"}],[126877736,{"idx":40,"name":"common-black","tpage_name":"lfacrm1-tfrag"}],[126877731,{"idx":35,"name":"freehq-gray-metal-disc01","tpage_name":"lfacrm1-tfrag"}],[126877730,{"idx":34,"name":"ctyslumc-overhang-01","tpage_name":"lfacrm1-tfrag"}],[134348809,{"idx":9,"name":"forest-leaf4","tpage_name":"volcanoa-sprite"}],[126877729,{"idx":33,"name":"ctyslumc-light","tpage_name":"lfacrm1-tfrag"}],[134348808,{"idx":8,"name":"forest-leaf3","tpage_name":"volcanoa-sprite"}],[126877728,{"idx":32,"name":"ctyslumc-window-panes2","tpage_name":"lfacrm1-tfrag"}],[134348807,{"idx":7,"name":"forest-leaf2","tpage_name":"volcanoa-sprite"}],[126877727,{"idx":31,"name":"cityslumc-pipe","tpage_name":"lfacrm1-tfrag"}],[134348805,{"idx":5,"name":"lava-bubble","tpage_name":"volcanoa-sprite"}],[126877725,{"idx":29,"name":"common-gray","tpage_name":"lfacrm1-tfrag"}],[126877724,{"idx":28,"name":"lfacrm-yellow-metalrim-01","tpage_name":"lfacrm1-tfrag"}],[134348803,{"idx":3,"name":"lava-drop-04","tpage_name":"volcanoa-sprite"}],[129368083,{"idx":19,"name":"rub-crater-shards-01","tpage_name":"stadiumb-vis-shrub"}],[126877723,{"idx":27,"name":"lfacrm-girder-01","tpage_name":"lfacrm1-tfrag"}],[134348802,{"idx":2,"name":"lava-drop-03","tpage_name":"volcanoa-sprite"}],[129368082,{"idx":18,"name":"rub-ground-01-small","tpage_name":"stadiumb-vis-shrub"}],[126877722,{"idx":26,"name":"lfacrm-oilcap-01","tpage_name":"lfacrm1-tfrag"}],[134348801,{"idx":1,"name":"lava-drop-02","tpage_name":"volcanoa-sprite"}],[129368081,{"idx":17,"name":"rub-coil-support","tpage_name":"stadiumb-vis-shrub"}],[126877721,{"idx":25,"name":"lfacrm-lens-01","tpage_name":"lfacrm1-tfrag"}],[134348800,{"idx":0,"name":"lava-drop-01","tpage_name":"volcanoa-sprite"}],[129368080,{"idx":16,"name":"rub-rubble-01","tpage_name":"stadiumb-vis-shrub"}],[126877720,{"idx":24,"name":"lfacrm-pbox-02","tpage_name":"lfacrm1-tfrag"}],[129368079,{"idx":15,"name":"rub-statue-stone-01","tpage_name":"stadiumb-vis-shrub"}],[126877719,{"idx":23,"name":"lfacrm-pbox-01","tpage_name":"lfacrm1-tfrag"}],[129368078,{"idx":14,"name":"rub-scorch","tpage_name":"stadiumb-vis-shrub"}],[126877718,{"idx":22,"name":"lfacrm-yellow-metal-01","tpage_name":"lfacrm1-tfrag"}],[129368077,{"idx":13,"name":"rub-overlay-bullethole-a","tpage_name":"stadiumb-vis-shrub"}],[126877717,{"idx":21,"name":"lfacrm-rubber-01","tpage_name":"lfacrm1-tfrag"}],[129368076,{"idx":12,"name":"rub-overlay-bullethole-c","tpage_name":"stadiumb-vis-shrub"}],[126877716,{"idx":20,"name":"lfacrm-rivet-metal-01","tpage_name":"lfacrm1-tfrag"}],[129368075,{"idx":11,"name":"rub-overlay-bullethole-b","tpage_name":"stadiumb-vis-shrub"}],[126877715,{"idx":19,"name":"freehq-gray-metal-disc08","tpage_name":"lfacrm1-tfrag"}],[129368074,{"idx":10,"name":"rub-stain-02","tpage_name":"stadiumb-vis-shrub"}],[126877714,{"idx":18,"name":"lfacrm-plate-05","tpage_name":"lfacrm1-tfrag"}],[129368073,{"idx":9,"name":"rub-blotch-withstreaks-01","tpage_name":"stadiumb-vis-shrub"}],[126877713,{"idx":17,"name":"lfacrm-plate-01","tpage_name":"lfacrm1-tfrag"}],[129368072,{"idx":8,"name":"rub-met-strp-close","tpage_name":"stadiumb-vis-shrub"}],[126877712,{"idx":16,"name":"cityslumc-metal-trim","tpage_name":"lfacrm1-tfrag"}],[126877704,{"idx":8,"name":"cityslumc-pinkish-purple","tpage_name":"lfacrm1-tfrag"}],[126877703,{"idx":7,"name":"ctyslumc-wall-trim","tpage_name":"lfacrm1-tfrag"}],[126877699,{"idx":3,"name":"ctyslumc-wall","tpage_name":"lfacrm1-tfrag"}],[126877696,{"idx":0,"name":"ctyslumc-overhang-02","tpage_name":"lfacrm1-tfrag"}],[126812164,{"idx":4,"name":"holograph-env-rim-dest","tpage_name":"deshover-warp"}],[143589390,{"idx":14,"name":"rail-light-blue","tpage_name":"combc-tfrag"}],[126156870,{"idx":70,"name":"sewer-grill-02","tpage_name":"sewo-vis-tfrag"}],[143589389,{"idx":13,"name":"rail-base-dark-01","tpage_name":"combc-tfrag"}],[126156869,{"idx":69,"name":"sewer-metal-block-05","tpage_name":"sewo-vis-tfrag"}],[143589388,{"idx":12,"name":"rail-base-mid-01","tpage_name":"combc-tfrag"}],[126156868,{"idx":68,"name":"sew-metal-floor-01","tpage_name":"sewo-vis-tfrag"}],[144834567,{"idx":7,"name":"mina-idol-02","tpage_name":"combn-tfrag"}],[143589387,{"idx":11,"name":"rail-edge-01","tpage_name":"combc-tfrag"}],[126156867,{"idx":67,"name":"sewer-block-02","tpage_name":"sewo-vis-tfrag"}],[144834566,{"idx":6,"name":"minb-stone23","tpage_name":"combn-tfrag"}],[143589386,{"idx":10,"name":"rail-light-blue-small","tpage_name":"combc-tfrag"}],[126156866,{"idx":66,"name":"sewer-grate-01","tpage_name":"sewo-vis-tfrag"}],[144834565,{"idx":5,"name":"minb-stone22","tpage_name":"combn-tfrag"}],[143589385,{"idx":9,"name":"rail-trim-01","tpage_name":"combc-tfrag"}],[126156865,{"idx":65,"name":"sewer-metal-floor-01","tpage_name":"sewo-vis-tfrag"}],[144834564,{"idx":4,"name":"minb-stone15","tpage_name":"combn-tfrag"}],[143589384,{"idx":8,"name":"rail-env-car-01","tpage_name":"combc-tfrag"}],[126156864,{"idx":64,"name":"sewer-big-brace-02","tpage_name":"sewo-vis-tfrag"}],[144834563,{"idx":3,"name":"minb-stone11","tpage_name":"combn-tfrag"}],[126156863,{"idx":63,"name":"sewer-big-brace-01","tpage_name":"sewo-vis-tfrag"}],[144834562,{"idx":2,"name":"minb-stone20","tpage_name":"combn-tfrag"}],[143589382,{"idx":6,"name":"rail-patch-01","tpage_name":"combc-tfrag"}],[126156862,{"idx":62,"name":"sewer-brick-roof-04","tpage_name":"sewo-vis-tfrag"}],[126156855,{"idx":55,"name":"strip-black","tpage_name":"sewo-vis-tfrag"}],[126156854,{"idx":54,"name":"sewer-plate-03","tpage_name":"sewo-vis-tfrag"}],[126156853,{"idx":53,"name":"sewer-plate-02","tpage_name":"sewo-vis-tfrag"}],[126156852,{"idx":52,"name":"sewer-metal-block-01","tpage_name":"sewo-vis-tfrag"}],[126156851,{"idx":51,"name":"sewer-metal-block-04-hitweak","tpage_name":"sewo-vis-tfrag"}],[126156850,{"idx":50,"name":"sewer-concrete-edge-01","tpage_name":"sewo-vis-tfrag"}],[126156849,{"idx":49,"name":"sewer-pipe-rim-03","tpage_name":"sewo-vis-tfrag"}],[126156848,{"idx":48,"name":"sewer-small-light-01","tpage_name":"sewo-vis-tfrag"}],[126156847,{"idx":47,"name":"sewer-metal-block-02","tpage_name":"sewo-vis-tfrag"}],[126156846,{"idx":46,"name":"sewer-plate-01","tpage_name":"sewo-vis-tfrag"}],[126156844,{"idx":44,"name":"sewer-big-brace-trim-02","tpage_name":"sewo-vis-tfrag"}],[126156843,{"idx":43,"name":"sewer-big-brace-trim-01","tpage_name":"sewo-vis-tfrag"}],[126156842,{"idx":42,"name":"sewer-plate-04","tpage_name":"sewo-vis-tfrag"}],[126156841,{"idx":41,"name":"sewer-plate-03-hitweak","tpage_name":"sewo-vis-tfrag"}],[126156840,{"idx":40,"name":"sewer-plate-06","tpage_name":"sewo-vis-tfrag"}],[131137559,{"idx":23,"name":"mhcity-bubble","tpage_name":"lctydest-pris"}],[126156839,{"idx":39,"name":"sewer-pipe-rim-07","tpage_name":"sewo-vis-tfrag"}],[131137558,{"idx":22,"name":"mhcity-de-tower-egg-inside","tpage_name":"lctydest-pris"}],[126156838,{"idx":38,"name":"sewer-metal-edge-01","tpage_name":"sewo-vis-tfrag"}],[126156837,{"idx":37,"name":"sewer-flat-pipe-01","tpage_name":"sewo-vis-tfrag"}],[125829125,{"idx":5,"name":"comm-metal-03","tpage_name":"deshover-tfrag"}],[125829124,{"idx":4,"name":"comm-metal-02","tpage_name":"deshover-tfrag"}],[125829123,{"idx":3,"name":"comm-hose-01","tpage_name":"deshover-tfrag"}],[125829122,{"idx":2,"name":"comm-metal-01","tpage_name":"deshover-tfrag"}],[125829121,{"idx":1,"name":"comm-centre-glow","tpage_name":"deshover-tfrag"}],[125829120,{"idx":0,"name":"comm-centre-glow-02","tpage_name":"deshover-tfrag"}],[164626461,{"idx":29,"name":"jakc-wraps","tpage_name":"railcst-pris"}],[122290341,{"idx":165,"name":"facb-big-metal-panl02","tpage_name":"factoryb-vis-pris"}],[164626460,{"idx":28,"name":"jakc-waistband2","tpage_name":"railcst-pris"}],[122290340,{"idx":164,"name":"facb_dec-metal-02","tpage_name":"factoryb-vis-pris"}],[164626459,{"idx":27,"name":"jakc-skirt","tpage_name":"railcst-pris"}],[122290339,{"idx":163,"name":"facb_blue-metal-02","tpage_name":"factoryb-vis-pris"}],[164626458,{"idx":26,"name":"jakc-scarfhanging","tpage_name":"railcst-pris"}],[122290338,{"idx":162,"name":"fac-target-redglow-01","tpage_name":"factoryb-vis-pris"}],[164626457,{"idx":25,"name":"jakc-scarf","tpage_name":"railcst-pris"}],[122290337,{"idx":161,"name":"jakchires-teeth","tpage_name":"factoryb-vis-pris"}],[172097536,{"idx":0,"name":"wstd-torchbowl-coal-01","tpage_name":"templec-vis-shrub"}],[164626456,{"idx":24,"name":"jakc-lens","tpage_name":"railcst-pris"}],[122290336,{"idx":160,"name":"jakchires-shoeteop","tpage_name":"factoryb-vis-pris"}],[164626455,{"idx":23,"name":"jakc-gogglemetal","tpage_name":"railcst-pris"}],[122290335,{"idx":159,"name":"jakchires-shoemetal","tpage_name":"factoryb-vis-pris"}],[164626454,{"idx":22,"name":"jakc-chestplate-straps","tpage_name":"railcst-pris"}],[122290334,{"idx":158,"name":"jakchires-shoebottom","tpage_name":"factoryb-vis-pris"}],[164626453,{"idx":21,"name":"jakc-armor","tpage_name":"railcst-pris"}],[122290333,{"idx":157,"name":"jakchires-precarmor-01","tpage_name":"factoryb-vis-pris"}],[164626452,{"idx":20,"name":"environment-oldmetal","tpage_name":"railcst-pris"}],[122290332,{"idx":156,"name":"jakchires-pants","tpage_name":"factoryb-vis-pris"}],[122290331,{"idx":155,"name":"jakchires-lightbrownspat","tpage_name":"factoryb-vis-pris"}],[169607170,{"idx":2,"name":"vehicle-wheel-01","tpage_name":"lsnkwhls-pris"}],[164626450,{"idx":18,"name":"daxtertuft","tpage_name":"railcst-pris"}],[122290330,{"idx":154,"name":"jakchires-leatherpouch","tpage_name":"factoryb-vis-pris"}],[169607169,{"idx":1,"name":"vehicle-snake-tread-02","tpage_name":"lsnkwhls-pris"}],[164626449,{"idx":17,"name":"daxterteeth","tpage_name":"railcst-pris"}],[122290329,{"idx":153,"name":"jakchires-jacket","tpage_name":"factoryb-vis-pris"}],[169607168,{"idx":0,"name":"vehicle-snake-tread-01","tpage_name":"lsnkwhls-pris"}],[164626448,{"idx":16,"name":"daxternose","tpage_name":"railcst-pris"}],[122290328,{"idx":152,"name":"jakchires-horn","tpage_name":"factoryb-vis-pris"}],[164626447,{"idx":15,"name":"daxterlense","tpage_name":"railcst-pris"}],[122290327,{"idx":151,"name":"jakchires-hair","tpage_name":"factoryb-vis-pris"}],[164626446,{"idx":14,"name":"daxterhelmetplain","tpage_name":"railcst-pris"}],[122290326,{"idx":150,"name":"jakchires-glovetop","tpage_name":"factoryb-vis-pris"}],[164626445,{"idx":13,"name":"daxterheadwidenew","tpage_name":"railcst-pris"}],[122290325,{"idx":149,"name":"jakchires-facert","tpage_name":"factoryb-vis-pris"}],[164626444,{"idx":12,"name":"daxtergoggles","tpage_name":"railcst-pris"}],[122290324,{"idx":148,"name":"jakchires-facelft","tpage_name":"factoryb-vis-pris"}],[164626443,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"railcst-pris"}],[122290323,{"idx":147,"name":"jakchires-eyelid","tpage_name":"factoryb-vis-pris"}],[164626442,{"idx":10,"name":"daxterfoot","tpage_name":"railcst-pris"}],[122290322,{"idx":146,"name":"jakchires-eyebrow","tpage_name":"factoryb-vis-pris"}],[164626441,{"idx":9,"name":"daxterfinger","tpage_name":"railcst-pris"}],[122290321,{"idx":145,"name":"jakchires-eye","tpage_name":"factoryb-vis-pris"}],[165871620,{"idx":4,"name":"palcab-lowres-ctyslum-wall-03","tpage_name":"ltowcity-alpha"}],[164626440,{"idx":8,"name":"daxterear","tpage_name":"railcst-pris"}],[122290320,{"idx":144,"name":"jakchires-clips","tpage_name":"factoryb-vis-pris"}],[165871619,{"idx":3,"name":"palcab-lowres-background-trees2","tpage_name":"ltowcity-alpha"}],[164626439,{"idx":7,"name":"daxterbolt","tpage_name":"railcst-pris"}],[122290319,{"idx":143,"name":"jakchires-chestplate","tpage_name":"factoryb-vis-pris"}],[165871618,{"idx":2,"name":"palcab-lowres-background-trees-edge","tpage_name":"ltowcity-alpha"}],[164626438,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"railcst-pris"}],[122290318,{"idx":142,"name":"jakchires-brwnleather","tpage_name":"factoryb-vis-pris"}],[165871617,{"idx":1,"name":"palcab-lowres-background-crater-rim","tpage_name":"ltowcity-alpha"}],[164626437,{"idx":5,"name":"daxterarm","tpage_name":"railcst-pris"}],[122290317,{"idx":141,"name":"jakchires-brownstrap","tpage_name":"factoryb-vis-pris"}],[165871616,{"idx":0,"name":"palcab-lowres-background-shoreline-02","tpage_name":"ltowcity-alpha"}],[164626436,{"idx":4,"name":"daxter-orange","tpage_name":"railcst-pris"}],[122290316,{"idx":140,"name":"jakchires-blackstrap","tpage_name":"factoryb-vis-pris"}],[164626435,{"idx":3,"name":"daxter-furhilite","tpage_name":"railcst-pris"}],[122290315,{"idx":139,"name":"jakchires-arm","tpage_name":"factoryb-vis-pris"}],[164626434,{"idx":2,"name":"daxter-eyelid","tpage_name":"railcst-pris"}],[122290314,{"idx":138,"name":"jakc-wristband-a2","tpage_name":"factoryb-vis-pris"}],[164626433,{"idx":1,"name":"bam-hairhilite","tpage_name":"railcst-pris"}],[122290313,{"idx":137,"name":"jakc-wraps","tpage_name":"factoryb-vis-pris"}],[164626432,{"idx":0,"name":"bam-eyelight","tpage_name":"railcst-pris"}],[122290312,{"idx":136,"name":"jakc-waistband2","tpage_name":"factoryb-vis-pris"}],[122290311,{"idx":135,"name":"jakc-skirt","tpage_name":"factoryb-vis-pris"}],[122290310,{"idx":134,"name":"jakc-scarfhanging","tpage_name":"factoryb-vis-pris"}],[122290309,{"idx":133,"name":"jakc-scarf","tpage_name":"factoryb-vis-pris"}],[122290308,{"idx":132,"name":"jakc-lens","tpage_name":"factoryb-vis-pris"}],[122290307,{"idx":131,"name":"jakc-gogglemetal","tpage_name":"factoryb-vis-pris"}],[122290306,{"idx":130,"name":"jakc-chestplate-straps","tpage_name":"factoryb-vis-pris"}],[122290305,{"idx":129,"name":"jakc-armor","tpage_name":"factoryb-vis-pris"}],[122290304,{"idx":128,"name":"environment-oldmetal","tpage_name":"factoryb-vis-pris"}],[122290303,{"idx":127,"name":"daxtertuft","tpage_name":"factoryb-vis-pris"}],[122290302,{"idx":126,"name":"daxterteeth","tpage_name":"factoryb-vis-pris"}],[122290301,{"idx":125,"name":"daxternose","tpage_name":"factoryb-vis-pris"}],[122290300,{"idx":124,"name":"daxterlense","tpage_name":"factoryb-vis-pris"}],[122290299,{"idx":123,"name":"daxterhelmetplain","tpage_name":"factoryb-vis-pris"}],[122290298,{"idx":122,"name":"daxterheadwidenew","tpage_name":"factoryb-vis-pris"}],[122290297,{"idx":121,"name":"daxtergoggles","tpage_name":"factoryb-vis-pris"}],[154664976,{"idx":16,"name":"hud-target-reticle","tpage_name":"wascityb-minimap"}],[122290296,{"idx":120,"name":"daxterfoot-bottom","tpage_name":"factoryb-vis-pris"}],[122290295,{"idx":119,"name":"daxterfoot","tpage_name":"factoryb-vis-pris"}],[122290294,{"idx":118,"name":"daxterfinger","tpage_name":"factoryb-vis-pris"}],[122290293,{"idx":117,"name":"daxterear","tpage_name":"factoryb-vis-pris"}],[122290292,{"idx":116,"name":"daxterbolt","tpage_name":"factoryb-vis-pris"}],[122290291,{"idx":115,"name":"daxterbodyshort-eix","tpage_name":"factoryb-vis-pris"}],[122290290,{"idx":114,"name":"daxterarm","tpage_name":"factoryb-vis-pris"}],[154664969,{"idx":9,"name":"hud-dmrobot-target-small-01","tpage_name":"wascityb-minimap"}],[122290289,{"idx":113,"name":"daxter-orange","tpage_name":"factoryb-vis-pris"}],[154664968,{"idx":8,"name":"hud-dmrobot-target-03","tpage_name":"wascityb-minimap"}],[122290288,{"idx":112,"name":"daxter-furhilite","tpage_name":"factoryb-vis-pris"}],[154664967,{"idx":7,"name":"wascity-turret-hud-health-04","tpage_name":"wascityb-minimap"}],[122290287,{"idx":111,"name":"daxter-eyelid","tpage_name":"factoryb-vis-pris"}],[154664966,{"idx":6,"name":"wascity-turret-hud-health-03","tpage_name":"wascityb-minimap"}],[122290286,{"idx":110,"name":"bam-hairhilite","tpage_name":"factoryb-vis-pris"}],[154664965,{"idx":5,"name":"wascity-turret-hud-health-02","tpage_name":"wascityb-minimap"}],[122290285,{"idx":109,"name":"bam-eyelight","tpage_name":"factoryb-vis-pris"}],[137232428,{"idx":44,"name":"jakchires-jacket","tpage_name":"citycast-pris"}],[122290268,{"idx":92,"name":"robotank-tread-r-dest","tpage_name":"factoryb-vis-pris"}],[143458327,{"idx":23,"name":"comb-redmarker","tpage_name":"combb-tfrag"}],[137232427,{"idx":43,"name":"jakchires-horn","tpage_name":"citycast-pris"}],[122290267,{"idx":91,"name":"robotank-tread-l-dest","tpage_name":"factoryb-vis-pris"}],[137232426,{"idx":42,"name":"jakchires-hair","tpage_name":"citycast-pris"}],[122290266,{"idx":90,"name":"robotank-tank-rim","tpage_name":"factoryb-vis-pris"}],[143458325,{"idx":21,"name":"rail-pipe-05","tpage_name":"combb-tfrag"}],[137232425,{"idx":41,"name":"jakchires-glovetop","tpage_name":"citycast-pris"}],[122290265,{"idx":89,"name":"robotank-tank-red-cap","tpage_name":"factoryb-vis-pris"}],[143458324,{"idx":20,"name":"rail-rock-01","tpage_name":"combb-tfrag"}],[137232424,{"idx":40,"name":"jakchires-facert","tpage_name":"citycast-pris"}],[122290264,{"idx":88,"name":"robotank-tank-red","tpage_name":"factoryb-vis-pris"}],[143458323,{"idx":19,"name":"rail-gray-metal-01","tpage_name":"combb-tfrag"}],[137232423,{"idx":39,"name":"jakchires-facelft","tpage_name":"citycast-pris"}],[122290263,{"idx":87,"name":"robotank-tank-metal-plain","tpage_name":"factoryb-vis-pris"}],[143458322,{"idx":18,"name":"rail-pipe-03","tpage_name":"combb-tfrag"}],[137232422,{"idx":38,"name":"jakchires-eyelid","tpage_name":"citycast-pris"}],[122290262,{"idx":86,"name":"robotank-tank-lod-top","tpage_name":"factoryb-vis-pris"}],[143458321,{"idx":17,"name":"rail-pipe-01","tpage_name":"combb-tfrag"}],[137232421,{"idx":37,"name":"jakchires-eyebrow","tpage_name":"citycast-pris"}],[122290261,{"idx":85,"name":"robotank-tank-hubcap","tpage_name":"factoryb-vis-pris"}],[143458320,{"idx":16,"name":"rail-cord-01","tpage_name":"combb-tfrag"}],[137232420,{"idx":36,"name":"jakchires-eye","tpage_name":"citycast-pris"}],[122290260,{"idx":84,"name":"robotank-tank-grey","tpage_name":"factoryb-vis-pris"}],[143458319,{"idx":15,"name":"rail-light-blue","tpage_name":"combb-tfrag"}],[137232419,{"idx":35,"name":"jakchires-clips","tpage_name":"citycast-pris"}],[122290259,{"idx":83,"name":"robotank-tank-blackstrip","tpage_name":"factoryb-vis-pris"}],[143458318,{"idx":14,"name":"rail-light-yellow-small","tpage_name":"combb-tfrag"}],[137232418,{"idx":34,"name":"jakchires-chestplate","tpage_name":"citycast-pris"}],[122290258,{"idx":82,"name":"robotank-tank-beige-logo","tpage_name":"factoryb-vis-pris"}],[143458317,{"idx":13,"name":"rail-detail-01","tpage_name":"combb-tfrag"}],[137232417,{"idx":33,"name":"jakchires-brwnleather","tpage_name":"citycast-pris"}],[122290257,{"idx":81,"name":"robotank-tank-beige","tpage_name":"factoryb-vis-pris"}],[143458316,{"idx":12,"name":"rail-base-dark-01","tpage_name":"combb-tfrag"}],[137232416,{"idx":32,"name":"jakchires-brownstrap","tpage_name":"citycast-pris"}],[122290256,{"idx":80,"name":"robotank-pipe-small-01","tpage_name":"factoryb-vis-pris"}],[143458314,{"idx":10,"name":"rail-light-blue-small","tpage_name":"combb-tfrag"}],[137232414,{"idx":30,"name":"jakchires-arm","tpage_name":"citycast-pris"}],[122290254,{"idx":78,"name":"kgfighter-trim-03","tpage_name":"factoryb-vis-pris"}],[143458313,{"idx":9,"name":"rail-base-mid-01","tpage_name":"combb-tfrag"}],[137232413,{"idx":29,"name":"jakc-wristband-a2","tpage_name":"citycast-pris"}],[122290253,{"idx":77,"name":"kgfighter-trim-02","tpage_name":"factoryb-vis-pris"}],[143458312,{"idx":8,"name":"rail-edge-01","tpage_name":"combb-tfrag"}],[137232412,{"idx":28,"name":"jakc-wraps","tpage_name":"citycast-pris"}],[122290252,{"idx":76,"name":"kgfighter-trim-01","tpage_name":"factoryb-vis-pris"}],[143458311,{"idx":7,"name":"rail-env-car-01","tpage_name":"combb-tfrag"}],[137232411,{"idx":27,"name":"jakc-waistband2","tpage_name":"citycast-pris"}],[122290251,{"idx":75,"name":"kgfighter-lod02-top","tpage_name":"factoryb-vis-pris"}],[143458310,{"idx":6,"name":"rail-patch-01","tpage_name":"combb-tfrag"}],[137232410,{"idx":26,"name":"jakc-skirt","tpage_name":"citycast-pris"}],[122290250,{"idx":74,"name":"kgfighter-lod02-tail","tpage_name":"factoryb-vis-pris"}],[137232409,{"idx":25,"name":"jakc-scarfhanging","tpage_name":"citycast-pris"}],[122290249,{"idx":73,"name":"kgfighter-lod02-side","tpage_name":"factoryb-vis-pris"}],[137232408,{"idx":24,"name":"jakc-scarf","tpage_name":"citycast-pris"}],[122290248,{"idx":72,"name":"kgfighter-lod02-cpit","tpage_name":"factoryb-vis-pris"}],[137232407,{"idx":23,"name":"jakc-lens","tpage_name":"citycast-pris"}],[122290247,{"idx":71,"name":"kgfighter-lens-01","tpage_name":"factoryb-vis-pris"}],[143458306,{"idx":2,"name":"comb-temp-glass","tpage_name":"combb-tfrag"}],[137232406,{"idx":22,"name":"jakc-gogglemetal","tpage_name":"citycast-pris"}],[122290246,{"idx":70,"name":"kgfighter-14","tpage_name":"factoryb-vis-pris"}],[143458305,{"idx":1,"name":"comb-temp-dark","tpage_name":"combb-tfrag"}],[137232405,{"idx":21,"name":"jakc-chestplate-straps","tpage_name":"citycast-pris"}],[122290245,{"idx":69,"name":"kgfighter-13","tpage_name":"factoryb-vis-pris"}],[137232404,{"idx":20,"name":"jakc-armor","tpage_name":"citycast-pris"}],[122290244,{"idx":68,"name":"kgfighter-12","tpage_name":"factoryb-vis-pris"}],[137232403,{"idx":19,"name":"environment-oldmetal","tpage_name":"citycast-pris"}],[122290243,{"idx":67,"name":"kgfighter-11","tpage_name":"factoryb-vis-pris"}],[137232402,{"idx":18,"name":"daxtertuft","tpage_name":"citycast-pris"}],[122290242,{"idx":66,"name":"kgfighter-10","tpage_name":"factoryb-vis-pris"}],[137232401,{"idx":17,"name":"daxterteeth","tpage_name":"citycast-pris"}],[122290241,{"idx":65,"name":"kgfighter-09","tpage_name":"factoryb-vis-pris"}],[137232400,{"idx":16,"name":"daxternose","tpage_name":"citycast-pris"}],[122290240,{"idx":64,"name":"kgfighter-08","tpage_name":"factoryb-vis-pris"}],[137232399,{"idx":15,"name":"daxterlense","tpage_name":"citycast-pris"}],[122290239,{"idx":63,"name":"kgfighter-07","tpage_name":"factoryb-vis-pris"}],[137232398,{"idx":14,"name":"daxterhelmetplain","tpage_name":"citycast-pris"}],[122290238,{"idx":62,"name":"kgfighter-06","tpage_name":"factoryb-vis-pris"}],[137232397,{"idx":13,"name":"daxterheadwidenew","tpage_name":"citycast-pris"}],[134742037,{"idx":21,"name":"rub-scorch","tpage_name":"rubblec-vis-shrub"}],[122290237,{"idx":61,"name":"kgfighter-05","tpage_name":"factoryb-vis-pris"}],[137232396,{"idx":12,"name":"daxtergoggles","tpage_name":"citycast-pris"}],[122290236,{"idx":60,"name":"kgfighter-03","tpage_name":"factoryb-vis-pris"}],[137232395,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"citycast-pris"}],[134742035,{"idx":19,"name":"rub-overlay-bullethole-c","tpage_name":"rubblec-vis-shrub"}],[122290235,{"idx":59,"name":"kgfighter-02","tpage_name":"factoryb-vis-pris"}],[137232394,{"idx":10,"name":"daxterfoot","tpage_name":"citycast-pris"}],[134742034,{"idx":18,"name":"rub-blotch-withstreaks-01","tpage_name":"rubblec-vis-shrub"}],[122290234,{"idx":58,"name":"kgfighter-01","tpage_name":"factoryb-vis-pris"}],[137232390,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"citycast-pris"}],[134742030,{"idx":14,"name":"rub-crater-shards-01","tpage_name":"rubblec-vis-shrub"}],[122290230,{"idx":54,"name":"fac-tower-pipe-01","tpage_name":"factoryb-vis-pris"}],[134742022,{"idx":6,"name":"rub-greyblue-plain-lowres","tpage_name":"rubblec-vis-shrub"}],[122290222,{"idx":46,"name":"fac-tower-base-rim-04","tpage_name":"factoryb-vis-pris"}],[134742021,{"idx":5,"name":"rub-met-strp-close","tpage_name":"rubblec-vis-shrub"}],[122290221,{"idx":45,"name":"fac-tower-base-rim-03","tpage_name":"factoryb-vis-pris"}],[139591697,{"idx":17,"name":"daxterteeth","tpage_name":"ldax-pris"}],[122159177,{"idx":73,"name":"fac-tower-pipe-02b","tpage_name":"factoryb-vis-tfrag"}],[139591696,{"idx":16,"name":"daxternose","tpage_name":"ldax-pris"}],[122159176,{"idx":72,"name":"facb_redmetal-03","tpage_name":"factoryb-vis-tfrag"}],[139591695,{"idx":15,"name":"daxterlense","tpage_name":"ldax-pris"}],[122159175,{"idx":71,"name":"facb-beam01-hitweak","tpage_name":"factoryb-vis-tfrag"}],[139591694,{"idx":14,"name":"daxterhelmetplain","tpage_name":"ldax-pris"}],[122159174,{"idx":70,"name":"fac-tower-door-03-hitweak","tpage_name":"factoryb-vis-tfrag"}],[139591693,{"idx":13,"name":"daxterheadwidenew","tpage_name":"ldax-pris"}],[122159173,{"idx":69,"name":"fac-tower-02-hitweak","tpage_name":"factoryb-vis-tfrag"}],[143327232,{"idx":0,"name":"pow-flat002","tpage_name":"powergd-tfrag"}],[139591692,{"idx":12,"name":"daxtergoggles","tpage_name":"ldax-pris"}],[122159172,{"idx":68,"name":"fac-tower-base-02-hitweak","tpage_name":"factoryb-vis-tfrag"}],[139591691,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"ldax-pris"}],[122159171,{"idx":67,"name":"facb_blue-metal-03-lotweak","tpage_name":"factoryb-vis-tfrag"}],[139591690,{"idx":10,"name":"daxterfoot","tpage_name":"ldax-pris"}],[122159170,{"idx":66,"name":"facb_bluewindow_selfilluminated","tpage_name":"factoryb-vis-tfrag"}],[142082049,{"idx":1,"name":"facc-hole-grill-01","tpage_name":"lfacrm2-alpha"}],[139591689,{"idx":9,"name":"daxterfinger","tpage_name":"ldax-pris"}],[122159169,{"idx":65,"name":"fac-tower-07","tpage_name":"factoryb-vis-tfrag"}],[139591688,{"idx":8,"name":"daxterear","tpage_name":"ldax-pris"}],[122159168,{"idx":64,"name":"fac-tower-lens-01","tpage_name":"factoryb-vis-tfrag"}],[139591687,{"idx":7,"name":"daxterbolt","tpage_name":"ldax-pris"}],[122159167,{"idx":63,"name":"fac-tower-door-04","tpage_name":"factoryb-vis-tfrag"}],[139591686,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"ldax-pris"}],[122159166,{"idx":62,"name":"fac-tower-door-05","tpage_name":"factoryb-vis-tfrag"}],[139591685,{"idx":5,"name":"daxterarm","tpage_name":"ldax-pris"}],[122159165,{"idx":61,"name":"fac-tower-03","tpage_name":"factoryb-vis-tfrag"}],[139591684,{"idx":4,"name":"daxter-orange","tpage_name":"ldax-pris"}],[122159164,{"idx":60,"name":"fac-tower-05","tpage_name":"factoryb-vis-tfrag"}],[139591683,{"idx":3,"name":"daxter-furhilite","tpage_name":"ldax-pris"}],[122159163,{"idx":59,"name":"fac-tower-break-wall-01","tpage_name":"factoryb-vis-tfrag"}],[139591682,{"idx":2,"name":"daxter-eyelid","tpage_name":"ldax-pris"}],[122159162,{"idx":58,"name":"fac-tower-girder-02","tpage_name":"factoryb-vis-tfrag"}],[139591681,{"idx":1,"name":"bam-hairhilite","tpage_name":"ldax-pris"}],[122159161,{"idx":57,"name":"fac-tower-panel-02","tpage_name":"factoryb-vis-tfrag"}],[139591680,{"idx":0,"name":"bam-eyelight","tpage_name":"ldax-pris"}],[122159160,{"idx":56,"name":"fac-tower-pipe-02","tpage_name":"factoryb-vis-tfrag"}],[122159159,{"idx":55,"name":"palace-break-rebar","tpage_name":"factoryb-vis-tfrag"}],[122159158,{"idx":54,"name":"fac-tower-girder-01","tpage_name":"factoryb-vis-tfrag"}],[122159157,{"idx":53,"name":"fac-tower-base-rim-01","tpage_name":"factoryb-vis-tfrag"}],[122159156,{"idx":52,"name":"fac-tower-broken-metal-02","tpage_name":"factoryb-vis-tfrag"}],[122093572,{"idx":4,"name":"fac-target-glass-01","tpage_name":"factoryb-vis-water"}],[122093571,{"idx":3,"name":"hemi-gradient-flames-dest","tpage_name":"factoryb-vis-water"}],[122093570,{"idx":2,"name":"hemi-gradient-dest","tpage_name":"factoryb-vis-water"}],[122093569,{"idx":1,"name":"hemi-gradient-rim","tpage_name":"factoryb-vis-water"}],[128909326,{"idx":14,"name":"keira-hair-newest","tpage_name":"freecast-pris"}],[121438246,{"idx":38,"name":"quantref-04","tpage_name":"desbattl-pris"}],[128909325,{"idx":13,"name":"keira-gogglestrap","tpage_name":"freecast-pris"}],[121438245,{"idx":37,"name":"quantref-03","tpage_name":"desbattl-pris"}],[128909324,{"idx":12,"name":"keira-glovenewlarge","tpage_name":"freecast-pris"}],[121438244,{"idx":36,"name":"quantref-02","tpage_name":"desbattl-pris"}],[128909323,{"idx":11,"name":"keira-glasses","tpage_name":"freecast-pris"}],[121438243,{"idx":35,"name":"quantref-01","tpage_name":"desbattl-pris"}],[128909320,{"idx":8,"name":"keira-chokermetal","tpage_name":"freecast-pris"}],[121438240,{"idx":32,"name":"homing-missle-fin-01","tpage_name":"desbattl-pris"}],[128909319,{"idx":7,"name":"keira-chokerhighres","tpage_name":"freecast-pris"}],[121438239,{"idx":31,"name":"homing-missle-exhaust","tpage_name":"desbattl-pris"}],[128909318,{"idx":6,"name":"keira-brownstraps-new","tpage_name":"freecast-pris"}],[121438238,{"idx":30,"name":"homing-missle-body-tip","tpage_name":"desbattl-pris"}],[128909317,{"idx":5,"name":"keira-blackstrap","tpage_name":"freecast-pris"}],[121438237,{"idx":29,"name":"homing-missle-body","tpage_name":"desbattl-pris"}],[128909316,{"idx":4,"name":"keira-belt","tpage_name":"freecast-pris"}],[121438236,{"idx":28,"name":"mh-flyer-wing","tpage_name":"desbattl-pris"}],[128909315,{"idx":3,"name":"keira-bellylong","tpage_name":"freecast-pris"}],[121438235,{"idx":27,"name":"mh-flyer-skin-finger-01","tpage_name":"desbattl-pris"}],[128909314,{"idx":2,"name":"environment-oldmetal","tpage_name":"freecast-pris"}],[121438234,{"idx":26,"name":"mh-flyer-skin-01","tpage_name":"desbattl-pris"}],[128909313,{"idx":1,"name":"bam-hairhilite","tpage_name":"freecast-pris"}],[121438233,{"idx":25,"name":"mh-flyer-seat-02","tpage_name":"desbattl-pris"}],[128909312,{"idx":0,"name":"bam-eyelight","tpage_name":"freecast-pris"}],[121438232,{"idx":24,"name":"mh-flyer-seat-01","tpage_name":"desbattl-pris"}],[121438231,{"idx":23,"name":"mh-flyer-metal-01","tpage_name":"desbattl-pris"}],[126156836,{"idx":36,"name":"sewer-round-01","tpage_name":"sewo-vis-tfrag"}],[121176116,{"idx":52,"name":"jakchires-teeth","tpage_name":"hiphog-vis-pris"}],[134873095,{"idx":7,"name":"rub-rubble-01","tpage_name":"rubbleb-vis-tfrag"}],[126156835,{"idx":35,"name":"sewer-pipe-rim-08","tpage_name":"sewo-vis-tfrag"}],[121176115,{"idx":51,"name":"jakchires-shoeteop","tpage_name":"hiphog-vis-pris"}],[131137554,{"idx":18,"name":"mhcity-grunt-egg-metal-01","tpage_name":"lctydest-pris"}],[126156834,{"idx":34,"name":"sewer-pipe-small-02","tpage_name":"sewo-vis-tfrag"}],[121176114,{"idx":50,"name":"jakchires-shoemetal","tpage_name":"hiphog-vis-pris"}],[131137553,{"idx":17,"name":"mhcity-grunt-egg-horns-01","tpage_name":"lctydest-pris"}],[126156833,{"idx":33,"name":"sewer-rubber-rim-01","tpage_name":"sewo-vis-tfrag"}],[121176113,{"idx":49,"name":"jakchires-shoebottom","tpage_name":"hiphog-vis-pris"}],[126156832,{"idx":32,"name":"sewer-metal-03","tpage_name":"sewo-vis-tfrag"}],[121176112,{"idx":48,"name":"jakchires-precarmor-01","tpage_name":"hiphog-vis-pris"}],[126156831,{"idx":31,"name":"sewer-stone-arch-01","tpage_name":"sewo-vis-tfrag"}],[121176111,{"idx":47,"name":"jakchires-pants","tpage_name":"hiphog-vis-pris"}],[131137550,{"idx":14,"name":"mhcity-vein-01","tpage_name":"lctydest-pris"}],[126156830,{"idx":30,"name":"sewer-round-02","tpage_name":"sewo-vis-tfrag"}],[121176110,{"idx":46,"name":"jakchires-lightbrownspat","tpage_name":"hiphog-vis-pris"}],[134873089,{"idx":1,"name":"rub-blue-paint-rust04","tpage_name":"rubbleb-vis-tfrag"}],[126156829,{"idx":29,"name":"sewer-round-03","tpage_name":"sewo-vis-tfrag"}],[121176109,{"idx":45,"name":"jakchires-leatherpouch","tpage_name":"hiphog-vis-pris"}],[131137541,{"idx":5,"name":"mhcity-eggskin","tpage_name":"lctydest-pris"}],[126156821,{"idx":21,"name":"sewer-bolt-side-02","tpage_name":"sewo-vis-tfrag"}],[121176101,{"idx":37,"name":"jakchires-eyebrow","tpage_name":"hiphog-vis-pris"}],[126156820,{"idx":20,"name":"sewer-bolt-side-01","tpage_name":"sewo-vis-tfrag"}],[121176100,{"idx":36,"name":"jakchires-eye","tpage_name":"hiphog-vis-pris"}],[126156814,{"idx":14,"name":"sewer-nut-01","tpage_name":"sewo-vis-tfrag"}],[121176094,{"idx":30,"name":"jakchires-arm","tpage_name":"hiphog-vis-pris"}],[126156813,{"idx":13,"name":"sewer-scaffold-02","tpage_name":"sewo-vis-tfrag"}],[121176093,{"idx":29,"name":"jakc-wristband-a2","tpage_name":"hiphog-vis-pris"}],[126156812,{"idx":12,"name":"sewer-brick-block-09","tpage_name":"sewo-vis-tfrag"}],[121176092,{"idx":28,"name":"jakc-wraps","tpage_name":"hiphog-vis-pris"}],[153485336,{"idx":24,"name":"mhcity-lilhouse-door-frame","tpage_name":"mhcitya-vis-tfrag"}],[152240156,{"idx":28,"name":"king-blackskirt2","tpage_name":"wascast-pris2"}],[121110656,{"idx":128,"name":"hip-environment","tpage_name":"hiphog-vis-tfrag"}],[153485335,{"idx":23,"name":"mhcity-de-tower-under","tpage_name":"mhcitya-vis-tfrag"}],[152240155,{"idx":27,"name":"king-arm","tpage_name":"wascast-pris2"}],[121110655,{"idx":127,"name":"gun-gunrack-02","tpage_name":"hiphog-vis-tfrag"}],[152240154,{"idx":26,"name":"seem-uppertorso","tpage_name":"wascast-pris2"}],[121110654,{"idx":126,"name":"gun-gunrack-01","tpage_name":"hiphog-vis-tfrag"}],[152240153,{"idx":25,"name":"seem-teeth","tpage_name":"wascast-pris2"}],[121110653,{"idx":125,"name":"hip-carawing01","tpage_name":"hiphog-vis-tfrag"}],[152240152,{"idx":24,"name":"seem-straps","tpage_name":"wascast-pris2"}],[121110652,{"idx":124,"name":"hip-gun-dark-mag","tpage_name":"hiphog-vis-tfrag"}],[152240151,{"idx":23,"name":"seem-skirt-small","tpage_name":"wascast-pris2"}],[121110651,{"idx":123,"name":"hip-gun-barrel-alt","tpage_name":"hiphog-vis-tfrag"}],[153485330,{"idx":18,"name":"mhcity-gapfiller-top-01","tpage_name":"mhcitya-vis-tfrag"}],[152240150,{"idx":22,"name":"seem-skirt","tpage_name":"wascast-pris2"}],[121110650,{"idx":122,"name":"hip-gun-cover","tpage_name":"hiphog-vis-tfrag"}],[152240149,{"idx":21,"name":"seem-precmetal-plain","tpage_name":"wascast-pris2"}],[121110649,{"idx":121,"name":"hip-gun-magport","tpage_name":"hiphog-vis-tfrag"}],[153485328,{"idx":16,"name":"mhcity-grunt-egg-03-to-floor","tpage_name":"mhcitya-vis-tfrag"}],[152240148,{"idx":20,"name":"seem-precmetal-edge","tpage_name":"wascast-pris2"}],[121110648,{"idx":120,"name":"common-black","tpage_name":"hiphog-vis-tfrag"}],[153485327,{"idx":15,"name":"mhcity-skin-ground-to-floor-01","tpage_name":"mhcitya-vis-tfrag"}],[152240147,{"idx":19,"name":"seem-precmetal-chestplate-01","tpage_name":"wascast-pris2"}],[121110647,{"idx":119,"name":"hip-gun-main","tpage_name":"hiphog-vis-tfrag"}],[153485326,{"idx":14,"name":"mhcity-floor-brace-02","tpage_name":"mhcitya-vis-tfrag"}],[152240146,{"idx":18,"name":"seem-pipes-02","tpage_name":"wascast-pris2"}],[121110646,{"idx":118,"name":"hip-gun-pump","tpage_name":"hiphog-vis-tfrag"}],[153485325,{"idx":13,"name":"mhcity-grunt-egg-gem-01","tpage_name":"mhcitya-vis-tfrag"}],[152240145,{"idx":17,"name":"seem-pipes-01","tpage_name":"wascast-pris2"}],[121110645,{"idx":117,"name":"hip-gun-leather","tpage_name":"hiphog-vis-tfrag"}],[153485324,{"idx":12,"name":"mhcity-skin-ground-01","tpage_name":"mhcitya-vis-tfrag"}],[152240144,{"idx":16,"name":"seem-pipeend","tpage_name":"wascast-pris2"}],[121110644,{"idx":116,"name":"hip-gun-gray-01","tpage_name":"hiphog-vis-tfrag"}],[153485323,{"idx":11,"name":"mhcity-vein-01","tpage_name":"mhcitya-vis-tfrag"}],[152240143,{"idx":15,"name":"seem-headpiecetop","tpage_name":"wascast-pris2"}],[121110643,{"idx":115,"name":"hip-gun-barrel-01","tpage_name":"hiphog-vis-tfrag"}],[153485322,{"idx":10,"name":"mhcity-black","tpage_name":"mhcitya-vis-tfrag"}],[152240142,{"idx":14,"name":"seem-headgearback","tpage_name":"wascast-pris2"}],[121110642,{"idx":114,"name":"hip-gun-gray-02","tpage_name":"hiphog-vis-tfrag"}],[153485321,{"idx":9,"name":"mhcity-grunt-egg-neck-01","tpage_name":"mhcitya-vis-tfrag"}],[152240141,{"idx":13,"name":"seem-hand","tpage_name":"wascast-pris2"}],[121110641,{"idx":113,"name":"hip-crate-body","tpage_name":"hiphog-vis-tfrag"}],[153485320,{"idx":8,"name":"mhcity-building-door-frame","tpage_name":"mhcitya-vis-tfrag"}],[152240140,{"idx":12,"name":"seem-finger","tpage_name":"wascast-pris2"}],[121110640,{"idx":112,"name":"hip-map2","tpage_name":"hiphog-vis-tfrag"}],[153485319,{"idx":7,"name":"mhcity-grunt-egg-metal-01","tpage_name":"mhcitya-vis-tfrag"}],[152240139,{"idx":11,"name":"seem-face","tpage_name":"wascast-pris2"}],[121110639,{"idx":111,"name":"hip-map3","tpage_name":"hiphog-vis-tfrag"}],[153485318,{"idx":6,"name":"mhcity-building-base-01","tpage_name":"mhcitya-vis-tfrag"}],[152240138,{"idx":10,"name":"seem-eyelid","tpage_name":"wascast-pris2"}],[121110638,{"idx":110,"name":"hip-map4","tpage_name":"hiphog-vis-tfrag"}],[153485317,{"idx":5,"name":"mhcity-grunt-egg-03","tpage_name":"mhcitya-vis-tfrag"}],[152240137,{"idx":9,"name":"seem-eye","tpage_name":"wascast-pris2"}],[121110637,{"idx":109,"name":"hip-map1","tpage_name":"hiphog-vis-tfrag"}],[153485316,{"idx":4,"name":"mhcity-baserock","tpage_name":"mhcitya-vis-tfrag"}],[152240136,{"idx":8,"name":"seem-ear","tpage_name":"wascast-pris2"}],[121110636,{"idx":108,"name":"hip-curtain","tpage_name":"hiphog-vis-tfrag"}],[153485315,{"idx":3,"name":"mhcity-wall-tentacle-02","tpage_name":"mhcitya-vis-tfrag"}],[152240135,{"idx":7,"name":"seem-boottoe","tpage_name":"wascast-pris2"}],[121110635,{"idx":107,"name":"hip-glass-shard-01","tpage_name":"hiphog-vis-tfrag"}],[121110627,{"idx":99,"name":"hip-blue-light","tpage_name":"hiphog-vis-tfrag"}],[121110625,{"idx":97,"name":"hip-tred-trim02","tpage_name":"hiphog-vis-tfrag"}],[121110624,{"idx":96,"name":"hip-tblack-trim01","tpage_name":"hiphog-vis-tfrag"}],[121110623,{"idx":95,"name":"hip-tred-trim01","tpage_name":"hiphog-vis-tfrag"}],[121110622,{"idx":94,"name":"hip-tcounter03","tpage_name":"hiphog-vis-tfrag"}],[121110621,{"idx":93,"name":"hip-tcounter01","tpage_name":"hiphog-vis-tfrag"}],[121110620,{"idx":92,"name":"hip-tgreen-try01","tpage_name":"hiphog-vis-tfrag"}],[121110619,{"idx":91,"name":"hip-tred-step05","tpage_name":"hiphog-vis-tfrag"}],[121110618,{"idx":90,"name":"hip-tmetfloor13","tpage_name":"hiphog-vis-tfrag"}],[121110617,{"idx":89,"name":"hip-tmetfloor08","tpage_name":"hiphog-vis-tfrag"}],[121110616,{"idx":88,"name":"hip-tmetfloor12","tpage_name":"hiphog-vis-tfrag"}],[121110615,{"idx":87,"name":"hip-tmetfloor06","tpage_name":"hiphog-vis-tfrag"}],[139788312,{"idx":24,"name":"samosbird-wing","tpage_name":"lsamos-pris2"}],[121110612,{"idx":84,"name":"hip-tmetfloor-vent04","tpage_name":"hiphog-vis-tfrag"}],[139788311,{"idx":23,"name":"samosbird-plume","tpage_name":"lsamos-pris2"}],[121110611,{"idx":83,"name":"hip-tred-check12","tpage_name":"hiphog-vis-tfrag"}],[139788310,{"idx":22,"name":"samosbird-eye","tpage_name":"lsamos-pris2"}],[121110610,{"idx":82,"name":"hip-tred-check06","tpage_name":"hiphog-vis-tfrag"}],[139788309,{"idx":21,"name":"samosbird-body","tpage_name":"lsamos-pris2"}],[121110609,{"idx":81,"name":"hip-tred-check07","tpage_name":"hiphog-vis-tfrag"}],[139788308,{"idx":20,"name":"samosbird-beak","tpage_name":"lsamos-pris2"}],[137297948,{"idx":28,"name":"torn-vest","tpage_name":"citycast-pris2"}],[121110608,{"idx":80,"name":"hip-tmetfloor01","tpage_name":"hiphog-vis-tfrag"}],[139788307,{"idx":19,"name":"samos-vest","tpage_name":"lsamos-pris2"}],[137297947,{"idx":27,"name":"torn-teeth-01","tpage_name":"citycast-pris2"}],[121110607,{"idx":79,"name":"hip-tred-check05","tpage_name":"hiphog-vis-tfrag"}],[139788306,{"idx":18,"name":"samos-teeth2","tpage_name":"lsamos-pris2"}],[137297946,{"idx":26,"name":"torn-shoe-02","tpage_name":"citycast-pris2"}],[121110606,{"idx":78,"name":"hip-tred-check02","tpage_name":"hiphog-vis-tfrag"}],[139788305,{"idx":17,"name":"samos-strap","tpage_name":"lsamos-pris2"}],[137297945,{"idx":25,"name":"torn-shoe","tpage_name":"citycast-pris2"}],[121110605,{"idx":77,"name":"hip-tred-check11","tpage_name":"hiphog-vis-tfrag"}],[139788304,{"idx":16,"name":"samos-metal","tpage_name":"lsamos-pris2"}],[137297944,{"idx":24,"name":"torn-scarf","tpage_name":"citycast-pris2"}],[121110604,{"idx":76,"name":"hip-tmetfloor03","tpage_name":"hiphog-vis-tfrag"}],[139788303,{"idx":15,"name":"samos-log-03","tpage_name":"lsamos-pris2"}],[137297943,{"idx":23,"name":"torn-pipe","tpage_name":"citycast-pris2"}],[121110603,{"idx":75,"name":"hip-tmetfloor02","tpage_name":"hiphog-vis-tfrag"}],[139788299,{"idx":11,"name":"samos-leaf","tpage_name":"lsamos-pris2"}],[137297939,{"idx":19,"name":"torn-handle-01","tpage_name":"citycast-pris2"}],[121110599,{"idx":71,"name":"hip-tred-steptrim01","tpage_name":"hiphog-vis-tfrag"}],[139788298,{"idx":10,"name":"samos-helmet","tpage_name":"lsamos-pris2"}],[137297938,{"idx":18,"name":"torn-hair-02","tpage_name":"citycast-pris2"}],[121110598,{"idx":70,"name":"hip-tred-step06","tpage_name":"hiphog-vis-tfrag"}],[139788297,{"idx":9,"name":"samos-hair","tpage_name":"lsamos-pris2"}],[137297937,{"idx":17,"name":"torn-hair-01","tpage_name":"citycast-pris2"}],[121110597,{"idx":69,"name":"hip-tred-check08","tpage_name":"hiphog-vis-tfrag"}],[139788296,{"idx":8,"name":"samos-finger-01","tpage_name":"lsamos-pris2"}],[137297936,{"idx":16,"name":"torn-gunbarrel-02","tpage_name":"citycast-pris2"}],[121110596,{"idx":68,"name":"hip-tred-step02","tpage_name":"hiphog-vis-tfrag"}],[139788295,{"idx":7,"name":"samos-face","tpage_name":"lsamos-pris2"}],[137297935,{"idx":15,"name":"torn-gunbarrel","tpage_name":"citycast-pris2"}],[121110595,{"idx":67,"name":"hip-tpillerpaint01","tpage_name":"hiphog-vis-tfrag"}],[139788294,{"idx":6,"name":"samos-eyelid","tpage_name":"lsamos-pris2"}],[137297934,{"idx":14,"name":"torn-footleather","tpage_name":"citycast-pris2"}],[121110594,{"idx":66,"name":"hip-tred-step03","tpage_name":"hiphog-vis-tfrag"}],[139788293,{"idx":5,"name":"samos-eye","tpage_name":"lsamos-pris2"}],[137297933,{"idx":13,"name":"torn-finger","tpage_name":"citycast-pris2"}],[121110593,{"idx":65,"name":"hip-tred-step04","tpage_name":"hiphog-vis-tfrag"}],[139788292,{"idx":4,"name":"samos-ear","tpage_name":"lsamos-pris2"}],[137297932,{"idx":12,"name":"torn-face-right","tpage_name":"citycast-pris2"}],[121110592,{"idx":64,"name":"hip-twood01","tpage_name":"hiphog-vis-tfrag"}],[139788291,{"idx":3,"name":"samos-diaper","tpage_name":"lsamos-pris2"}],[137297931,{"idx":11,"name":"torn-face","tpage_name":"citycast-pris2"}],[121110591,{"idx":63,"name":"hip-tpillerpaint04","tpage_name":"hiphog-vis-tfrag"}],[139788290,{"idx":2,"name":"samos-arm","tpage_name":"lsamos-pris2"}],[137297930,{"idx":10,"name":"torn-eyelid","tpage_name":"citycast-pris2"}],[121110590,{"idx":62,"name":"hip-tpillerpaint05","tpage_name":"hiphog-vis-tfrag"}],[139788289,{"idx":1,"name":"bam-hairhilite","tpage_name":"lsamos-pris2"}],[137297929,{"idx":9,"name":"torn-eye","tpage_name":"citycast-pris2"}],[121110589,{"idx":61,"name":"hip-tpillerpaint02","tpage_name":"hiphog-vis-tfrag"}],[139788288,{"idx":0,"name":"bam-eyelight","tpage_name":"lsamos-pris2"}],[137297928,{"idx":8,"name":"torn-ear","tpage_name":"citycast-pris2"}],[121110588,{"idx":60,"name":"hip-tred-trim03","tpage_name":"hiphog-vis-tfrag"}],[120324097,{"idx":1,"name":"ctydecoy-glass-01","tpage_name":"lctyhijk-water"}],[120258586,{"idx":26,"name":"kg-pickup-wings02","tpage_name":"lctyhijk-pris"}],[120258585,{"idx":25,"name":"kg-pickup-wings01","tpage_name":"lctyhijk-pris"}],[120258584,{"idx":24,"name":"kg-pickup-sidelogo","tpage_name":"lctyhijk-pris"}],[120258583,{"idx":23,"name":"kg-pickup-pipe","tpage_name":"lctyhijk-pris"}],[120258582,{"idx":22,"name":"kg-pickup-joint","tpage_name":"lctyhijk-pris"}],[120258581,{"idx":21,"name":"kg-pickup-hood","tpage_name":"lctyhijk-pris"}],[120258580,{"idx":20,"name":"kg-pickup-handrail","tpage_name":"lctyhijk-pris"}],[120258579,{"idx":19,"name":"kg-pickup-fender-edge","tpage_name":"lctyhijk-pris"}],[120258578,{"idx":18,"name":"kg-pickup-fender","tpage_name":"lctyhijk-pris"}],[120258577,{"idx":17,"name":"kg-pickup-engine-01","tpage_name":"lctyhijk-pris"}],[120258576,{"idx":16,"name":"kg-pickup-body","tpage_name":"lctyhijk-pris"}],[120258575,{"idx":15,"name":"kg-pickup-bed","tpage_name":"lctyhijk-pris"}],[120258574,{"idx":14,"name":"homing-missle-fin-01","tpage_name":"lctyhijk-pris"}],[120258573,{"idx":13,"name":"homing-missle-exhaust","tpage_name":"lctyhijk-pris"}],[120258572,{"idx":12,"name":"homing-missle-body-tip","tpage_name":"lctyhijk-pris"}],[120258571,{"idx":11,"name":"homing-missle-body","tpage_name":"lctyhijk-pris"}],[120258570,{"idx":10,"name":"ctydecoy-siren-01","tpage_name":"lctyhijk-pris"}],[120258569,{"idx":9,"name":"ctydecoy-round-01","tpage_name":"lctyhijk-pris"}],[120258568,{"idx":8,"name":"ctydecoy-plate-09","tpage_name":"lctyhijk-pris"}],[120258567,{"idx":7,"name":"ctydecoy-plate-08","tpage_name":"lctyhijk-pris"}],[120258566,{"idx":6,"name":"ctydecoy-plate-07","tpage_name":"lctyhijk-pris"}],[120258565,{"idx":5,"name":"ctydecoy-plate-05","tpage_name":"lctyhijk-pris"}],[121503744,{"idx":0,"name":"dust-cloud","tpage_name":"title-sprite"}],[120258564,{"idx":4,"name":"ctydecoy-plate-03","tpage_name":"lctyhijk-pris"}],[120258563,{"idx":3,"name":"ctydecoy-plate-02","tpage_name":"lctyhijk-pris"}],[120258562,{"idx":2,"name":"ctydecoy-plate-01","tpage_name":"lctyhijk-pris"}],[120258561,{"idx":1,"name":"ctydecoy-light-01","tpage_name":"lctyhijk-pris"}],[120258560,{"idx":0,"name":"ctydecoy-glow-02","tpage_name":"lctyhijk-pris"}],[118751258,{"idx":26,"name":"seem-skirt","tpage_name":"wcaseem-pris2"}],[126222337,{"idx":1,"name":"sewer-pipe-small-01","tpage_name":"sewo-vis-shrub"}],[118751257,{"idx":25,"name":"seem-uppertorso","tpage_name":"wcaseem-pris2"}],[126222336,{"idx":0,"name":"sewer-nut","tpage_name":"sewo-vis-shrub"}],[118751256,{"idx":24,"name":"seem-teeth","tpage_name":"wcaseem-pris2"}],[118751255,{"idx":23,"name":"seem-straps","tpage_name":"wcaseem-pris2"}],[118751254,{"idx":22,"name":"seem-precmetal-plain","tpage_name":"wcaseem-pris2"}],[118751253,{"idx":21,"name":"seem-precmetal-edge","tpage_name":"wcaseem-pris2"}],[118751252,{"idx":20,"name":"seem-precmetal-chestplate-01","tpage_name":"wcaseem-pris2"}],[118751251,{"idx":19,"name":"seem-pipes-02","tpage_name":"wcaseem-pris2"}],[118751250,{"idx":18,"name":"seem-pipes-01","tpage_name":"wcaseem-pris2"}],[118751249,{"idx":17,"name":"seem-pipeend","tpage_name":"wcaseem-pris2"}],[118751248,{"idx":16,"name":"seem-headpiecetop","tpage_name":"wcaseem-pris2"}],[118751247,{"idx":15,"name":"seem-headgearback","tpage_name":"wcaseem-pris2"}],[118751246,{"idx":14,"name":"seem-hand","tpage_name":"wcaseem-pris2"}],[118751245,{"idx":13,"name":"seem-finger","tpage_name":"wcaseem-pris2"}],[118751244,{"idx":12,"name":"seem-face","tpage_name":"wcaseem-pris2"}],[118751243,{"idx":11,"name":"seem-eyelid","tpage_name":"wcaseem-pris2"}],[118751242,{"idx":10,"name":"seem-eye","tpage_name":"wcaseem-pris2"}],[118751241,{"idx":9,"name":"seem-ear","tpage_name":"wcaseem-pris2"}],[118751240,{"idx":8,"name":"seem-boottoe","tpage_name":"wcaseem-pris2"}],[118751239,{"idx":7,"name":"seem-bootmet","tpage_name":"wcaseem-pris2"}],[118751238,{"idx":6,"name":"seem-bootlower","tpage_name":"wcaseem-pris2"}],[118751237,{"idx":5,"name":"seem-bootleg","tpage_name":"wcaseem-pris2"}],[118751236,{"idx":4,"name":"seem-bootbottom","tpage_name":"wcaseem-pris2"}],[118751235,{"idx":3,"name":"seem-arm","tpage_name":"wcaseem-pris2"}],[118751233,{"idx":1,"name":"environment-oldmetal","tpage_name":"wcaseem-pris2"}],[137297927,{"idx":7,"name":"torn-blademetal","tpage_name":"citycast-pris2"}],[121110587,{"idx":59,"name":"hip-tyellwall04","tpage_name":"hiphog-vis-tfrag"}],[118620227,{"idx":67,"name":"klever-widebrownstrap","tpage_name":"ljkcdmkl-pris"}],[137297926,{"idx":6,"name":"torn-belt2","tpage_name":"citycast-pris2"}],[121110586,{"idx":58,"name":"hip-tred-step01","tpage_name":"hiphog-vis-tfrag"}],[118620226,{"idx":66,"name":"klever-undershirt","tpage_name":"ljkcdmkl-pris"}],[138543105,{"idx":1,"name":"windshield01","tpage_name":"desoasis-water"}],[137297925,{"idx":5,"name":"torn-belt","tpage_name":"citycast-pris2"}],[121110585,{"idx":57,"name":"hip-tlogorag01","tpage_name":"hiphog-vis-tfrag"}],[118620225,{"idx":65,"name":"klever-thighs","tpage_name":"ljkcdmkl-pris"}],[138543104,{"idx":0,"name":"intcept-lorez-spike01","tpage_name":"desoasis-water"}],[137297924,{"idx":4,"name":"torn-armor","tpage_name":"citycast-pris2"}],[121110584,{"idx":56,"name":"hip-tpillerpaint03","tpage_name":"hiphog-vis-tfrag"}],[118620224,{"idx":64,"name":"klever-skirtlight","tpage_name":"ljkcdmkl-pris"}],[137297923,{"idx":3,"name":"torn-armlft","tpage_name":"citycast-pris2"}],[121110583,{"idx":55,"name":"hip-tpillerpaint06","tpage_name":"hiphog-vis-tfrag"}],[118620223,{"idx":63,"name":"klever-skirtdark","tpage_name":"ljkcdmkl-pris"}],[137297922,{"idx":2,"name":"charHOLD","tpage_name":"citycast-pris2"}],[121110582,{"idx":54,"name":"hip-tyellwall03","tpage_name":"hiphog-vis-tfrag"}],[118620222,{"idx":62,"name":"klever-shoebottom","tpage_name":"ljkcdmkl-pris"}],[137297921,{"idx":1,"name":"bam-hairhilite","tpage_name":"citycast-pris2"}],[121110581,{"idx":53,"name":"hip-tyellwall02","tpage_name":"hiphog-vis-tfrag"}],[118620221,{"idx":61,"name":"klever-shoe","tpage_name":"ljkcdmkl-pris"}],[137297920,{"idx":0,"name":"bam-eyelight","tpage_name":"citycast-pris2"}],[121110580,{"idx":52,"name":"hip-tyellwall01","tpage_name":"hiphog-vis-tfrag"}],[118620220,{"idx":60,"name":"klever-mustache","tpage_name":"ljkcdmkl-pris"}],[118620219,{"idx":59,"name":"klever-horn","tpage_name":"ljkcdmkl-pris"}],[118620218,{"idx":58,"name":"klever-handwrap","tpage_name":"ljkcdmkl-pris"}],[118620217,{"idx":57,"name":"klever-hand","tpage_name":"ljkcdmkl-pris"}],[134807556,{"idx":4,"name":"rub-water-destc","tpage_name":"rubblec-vis-water"}],[118620216,{"idx":56,"name":"klever-hair","tpage_name":"ljkcdmkl-pris"}],[134807555,{"idx":3,"name":"rub-waterc","tpage_name":"rubblec-vis-water"}],[121110575,{"idx":47,"name":"hip-daxter-portrate06","tpage_name":"hiphog-vis-tfrag"}],[118620215,{"idx":55,"name":"klever-gunmetal-05","tpage_name":"ljkcdmkl-pris"}],[121110574,{"idx":46,"name":"hip-daxter-portrate04","tpage_name":"hiphog-vis-tfrag"}],[118620214,{"idx":54,"name":"klever-gunmetal-04","tpage_name":"ljkcdmkl-pris"}],[121110573,{"idx":45,"name":"hip-tpinup02","tpage_name":"hiphog-vis-tfrag"}],[118620213,{"idx":53,"name":"klever-gunmetal-03","tpage_name":"ljkcdmkl-pris"}],[121110572,{"idx":44,"name":"hip-tgreenmed01","tpage_name":"hiphog-vis-tfrag"}],[118620212,{"idx":52,"name":"klever-gunmetal-02","tpage_name":"ljkcdmkl-pris"}],[121110571,{"idx":43,"name":"hip-tgreenlite01","tpage_name":"hiphog-vis-tfrag"}],[118620211,{"idx":51,"name":"klever-gunmetal-01","tpage_name":"ljkcdmkl-pris"}],[118620210,{"idx":50,"name":"klever-fingertop","tpage_name":"ljkcdmkl-pris"}],[121110569,{"idx":41,"name":"hip-tredlite01","tpage_name":"hiphog-vis-tfrag"}],[118620209,{"idx":49,"name":"klever-fingerbottom","tpage_name":"ljkcdmkl-pris"}],[121110568,{"idx":40,"name":"hip-treddark01","tpage_name":"hiphog-vis-tfrag"}],[118620208,{"idx":48,"name":"klever-face-01scars","tpage_name":"ljkcdmkl-pris"}],[118620207,{"idx":47,"name":"klever-face-01","tpage_name":"ljkcdmkl-pris"}],[121110566,{"idx":38,"name":"hip-tredmed01","tpage_name":"hiphog-vis-tfrag"}],[118620206,{"idx":46,"name":"klever-eyelid","tpage_name":"ljkcdmkl-pris"}],[121110565,{"idx":37,"name":"hip-tamblit01","tpage_name":"hiphog-vis-tfrag"}],[118620205,{"idx":45,"name":"klever-eye","tpage_name":"ljkcdmkl-pris"}],[121110564,{"idx":36,"name":"hip-tmetfloor04","tpage_name":"hiphog-vis-tfrag"}],[118620204,{"idx":44,"name":"klever-earcup","tpage_name":"ljkcdmkl-pris"}],[121110563,{"idx":35,"name":"hip-tcounter04","tpage_name":"hiphog-vis-tfrag"}],[118620203,{"idx":43,"name":"klever-clips","tpage_name":"ljkcdmkl-pris"}],[121110562,{"idx":34,"name":"hip-tcounter02","tpage_name":"hiphog-vis-tfrag"}],[118620202,{"idx":42,"name":"klever-chest","tpage_name":"ljkcdmkl-pris"}],[121110561,{"idx":33,"name":"hip-tredlight01","tpage_name":"hiphog-vis-tfrag"}],[118620201,{"idx":41,"name":"klever-brownstrap","tpage_name":"ljkcdmkl-pris"}],[121110556,{"idx":28,"name":"hip-tyellmetal02","tpage_name":"hiphog-vis-tfrag"}],[118620196,{"idx":36,"name":"klever-arm","tpage_name":"ljkcdmkl-pris"}],[121110555,{"idx":27,"name":"hip-tyellmetal01","tpage_name":"hiphog-vis-tfrag"}],[118620195,{"idx":35,"name":"jakchires-teeth","tpage_name":"ljkcdmkl-pris"}],[121110554,{"idx":26,"name":"hip-tredmetal03","tpage_name":"hiphog-vis-tfrag"}],[118620194,{"idx":34,"name":"jakchires-shoeteop","tpage_name":"ljkcdmkl-pris"}],[121110553,{"idx":25,"name":"hip-tyellmetal04","tpage_name":"hiphog-vis-tfrag"}],[118620193,{"idx":33,"name":"jakchires-shoemetal","tpage_name":"ljkcdmkl-pris"}],[121110552,{"idx":24,"name":"hip-tyellmetal03","tpage_name":"hiphog-vis-tfrag"}],[118620192,{"idx":32,"name":"jakchires-shoebottom","tpage_name":"ljkcdmkl-pris"}],[121110551,{"idx":23,"name":"hip-tboothlight01","tpage_name":"hiphog-vis-tfrag"}],[118620191,{"idx":31,"name":"jakchires-precarmor-01","tpage_name":"ljkcdmkl-pris"}],[121110550,{"idx":22,"name":"hip-tbooth02","tpage_name":"hiphog-vis-tfrag"}],[118620190,{"idx":30,"name":"jakchires-pants","tpage_name":"ljkcdmkl-pris"}],[121110549,{"idx":21,"name":"hip-tgreenmetal01","tpage_name":"hiphog-vis-tfrag"}],[118620189,{"idx":29,"name":"jakchires-lightbrownspat","tpage_name":"ljkcdmkl-pris"}],[117637284,{"idx":164,"name":"intcept-b-teeth01","tpage_name":"destrack-pris"}],[117637283,{"idx":163,"name":"intcept-b-pipe01","tpage_name":"destrack-pris"}],[117637282,{"idx":162,"name":"intcept-b-gun01","tpage_name":"destrack-pris"}],[117637281,{"idx":161,"name":"intcept-b-base-patern02","tpage_name":"destrack-pris"}],[117637280,{"idx":160,"name":"intcept-b-base-patern01","tpage_name":"destrack-pris"}],[117637279,{"idx":159,"name":"intcept-b-base-green01","tpage_name":"destrack-pris"}],[117637278,{"idx":158,"name":"wstlander-04-skirt","tpage_name":"destrack-pris"}],[117637277,{"idx":157,"name":"wstlander-04-shirt-strap","tpage_name":"destrack-pris"}],[117637276,{"idx":156,"name":"wstlander-04-shirt","tpage_name":"destrack-pris"}],[117637275,{"idx":155,"name":"wstlander-04-headband","tpage_name":"destrack-pris"}],[117637274,{"idx":154,"name":"wstlander-04-gun","tpage_name":"destrack-pris"}],[117637273,{"idx":153,"name":"wstlander-04-dark-blue","tpage_name":"destrack-pris"}],[148766772,{"idx":52,"name":"daxtertuft","tpage_name":"warpcast-pris"}],[117637272,{"idx":152,"name":"wstlander-03-flesh","tpage_name":"destrack-pris"}],[148766771,{"idx":51,"name":"daxterteeth","tpage_name":"warpcast-pris"}],[117637271,{"idx":151,"name":"wstlander-03-eye","tpage_name":"destrack-pris"}],[148766770,{"idx":50,"name":"daxternose","tpage_name":"warpcast-pris"}],[117637270,{"idx":150,"name":"wstlander-02-skirt","tpage_name":"destrack-pris"}],[148766769,{"idx":49,"name":"daxterlense","tpage_name":"warpcast-pris"}],[117637269,{"idx":149,"name":"wstlander-02-shirt","tpage_name":"destrack-pris"}],[148766768,{"idx":48,"name":"daxterhelmetplain","tpage_name":"warpcast-pris"}],[117637268,{"idx":148,"name":"wstlander-02-scarf","tpage_name":"destrack-pris"}],[148766767,{"idx":47,"name":"daxterheadwidenew","tpage_name":"warpcast-pris"}],[117637267,{"idx":147,"name":"wstlander-02-ponytail","tpage_name":"destrack-pris"}],[148766766,{"idx":46,"name":"daxtergoggles","tpage_name":"warpcast-pris"}],[117637266,{"idx":146,"name":"wstlander-02-head","tpage_name":"destrack-pris"}],[148766765,{"idx":45,"name":"daxterfoot-bottom","tpage_name":"warpcast-pris"}],[117637265,{"idx":145,"name":"wstlander-02-glove","tpage_name":"destrack-pris"}],[148766764,{"idx":44,"name":"daxterfoot","tpage_name":"warpcast-pris"}],[117637264,{"idx":144,"name":"wstlander-02-eye","tpage_name":"destrack-pris"}],[148766763,{"idx":43,"name":"daxterfinger","tpage_name":"warpcast-pris"}],[117637263,{"idx":143,"name":"wstlander-02-bootheel","tpage_name":"destrack-pris"}],[152502302,{"idx":30,"name":"temple_pre-04","tpage_name":"templex-vis-tfrag"}],[148766762,{"idx":42,"name":"daxterear","tpage_name":"warpcast-pris"}],[117637262,{"idx":142,"name":"wstlander-02-belt","tpage_name":"destrack-pris"}],[152502301,{"idx":29,"name":"temple_pre-01","tpage_name":"templex-vis-tfrag"}],[148766761,{"idx":41,"name":"daxterbolt","tpage_name":"warpcast-pris"}],[117637261,{"idx":141,"name":"wstlander-02-armor","tpage_name":"destrack-pris"}],[148766760,{"idx":40,"name":"daxterbodyshort-eix","tpage_name":"warpcast-pris"}],[117637260,{"idx":140,"name":"wstlander-02-arm","tpage_name":"destrack-pris"}],[152502299,{"idx":27,"name":"temple_sandstone_pill07","tpage_name":"templex-vis-tfrag"}],[148766759,{"idx":39,"name":"daxterarm","tpage_name":"warpcast-pris"}],[117637259,{"idx":139,"name":"wstlander-01-wrap","tpage_name":"destrack-pris"}],[148766758,{"idx":38,"name":"daxter-orange","tpage_name":"warpcast-pris"}],[117637258,{"idx":138,"name":"wstlander-01-skirt","tpage_name":"destrack-pris"}],[148766757,{"idx":37,"name":"daxter-furhilite","tpage_name":"warpcast-pris"}],[117637257,{"idx":137,"name":"wstlander-01-shoulderarmor","tpage_name":"destrack-pris"}],[71630876,{"idx":28,"name":"king-thinstrap","tpage_name":"ldampksm-pris2"}],[122224640,{"idx":0,"name":"facb-bridgelights-01","tpage_name":"factoryb-vis-alpha"}],[118489100,{"idx":12,"name":"sig-gun-01","tpage_name":"deshunt-pris2"}],[104792120,{"idx":56,"name":"wstlander-01-shoebottom","tpage_name":"desresc-pris"}],[71630875,{"idx":27,"name":"king-teeth","tpage_name":"ldampksm-pris2"}],[71630874,{"idx":26,"name":"king-skirt","tpage_name":"ldampksm-pris2"}],[71630872,{"idx":24,"name":"king-precursermetal-trimbolt","tpage_name":"ldampksm-pris2"}],[71630856,{"idx":8,"name":"king-ear","tpage_name":"ldampksm-pris2"}],[71630855,{"idx":7,"name":"king-clip-02","tpage_name":"ldampksm-pris2"}],[71630854,{"idx":6,"name":"king-chest","tpage_name":"ldampksm-pris2"}],[71630853,{"idx":5,"name":"king-bolt","tpage_name":"ldampksm-pris2"}],[71630849,{"idx":1,"name":"environment-oldmetal","tpage_name":"ldampksm-pris2"}],[71630848,{"idx":0,"name":"bam-eyelight","tpage_name":"ldampksm-pris2"}],[71434295,{"idx":55,"name":"wstd-platform-base","tpage_name":"wasstadc-tfrag"}],[71303229,{"idx":61,"name":"king-wraps","tpage_name":"ldamsig-pris2"}],[71303226,{"idx":58,"name":"king-vest","tpage_name":"ldamsig-pris2"}],[71303223,{"idx":55,"name":"king-skirt","tpage_name":"ldamsig-pris2"}],[71303222,{"idx":54,"name":"king-shoebottom","tpage_name":"ldamsig-pris2"}],[71303215,{"idx":47,"name":"king-leg","tpage_name":"ldamsig-pris2"}],[106364964,{"idx":36,"name":"veger-walkingstick-03","tpage_name":"mined-pris2"}],[106364952,{"idx":24,"name":"veger-parchment","tpage_name":"mined-pris2"}],[106364951,{"idx":23,"name":"veger-pants","tpage_name":"mined-pris2"}],[71303200,{"idx":32,"name":"king-blackskirt2","tpage_name":"ldamsig-pris2"}],[106364949,{"idx":21,"name":"veger-legwraps","tpage_name":"mined-pris2"}],[71172103,{"idx":7,"name":"pecker-wingbottom","tpage_name":"ldampeck-pris"}],[71172102,{"idx":6,"name":"pecker-teeth","tpage_name":"ldampeck-pris"}],[71172101,{"idx":5,"name":"pecker-tail","tpage_name":"ldampeck-pris"}],[71172100,{"idx":4,"name":"pecker-plume","tpage_name":"ldampeck-pris"}],[71172099,{"idx":3,"name":"pecker-face","tpage_name":"ldampeck-pris"}],[71172098,{"idx":2,"name":"pecker-eyelid","tpage_name":"ldampeck-pris"}],[71172097,{"idx":1,"name":"pecker-body-01","tpage_name":"ldampeck-pris"}],[71172096,{"idx":0,"name":"bam-eyelight","tpage_name":"ldampeck-pris"}],[327702,{"idx":22,"name":"lightjak-wings","tpage_name":"level-default-water"}],[70254595,{"idx":3,"name":"map-nst-upper-2","tpage_name":"nsta-minimap"}],[14811214,{"idx":78,"name":"tcab-beam-bolt01","tpage_name":"ctygenb-vis-tfrag"}],[14811212,{"idx":76,"name":"tcab-ring-01","tpage_name":"ctygenb-vis-tfrag"}],[71565313,{"idx":1,"name":"pecker-body-01","tpage_name":"ldampksm-pris"}],[67829773,{"idx":13,"name":"screen-10","tpage_name":"freehq-sprite"}],[71565312,{"idx":0,"name":"bam-eyelight","tpage_name":"ldampksm-pris"}],[67829772,{"idx":12,"name":"screen-09","tpage_name":"freehq-sprite"}],[67829771,{"idx":11,"name":"screen-08","tpage_name":"freehq-sprite"}],[70320130,{"idx":2,"name":"NaughtyDog","tpage_name":"inttitle-minimap"}],[67829770,{"idx":10,"name":"screen-07","tpage_name":"freehq-sprite"}],[48758837,{"idx":53,"name":"sewer-big-brace-trim-02","tpage_name":"sewc-vis-tfrag"}],[48758836,{"idx":52,"name":"sewer-big-brace-trim-01","tpage_name":"sewc-vis-tfrag"}],[48758835,{"idx":51,"name":"sewer-plate-03-hitweak","tpage_name":"sewc-vis-tfrag"}],[48758840,{"idx":56,"name":"sewer-scaffold-01","tpage_name":"sewc-vis-tfrag"}],[66191360,{"idx":0,"name":"fora-dirt","tpage_name":"foresta-vis-alpha"}],[62717963,{"idx":11,"name":"cguardgame-gunmetaldark","tpage_name":"ctypesa-pris"}],[8716350,{"idx":62,"name":"baron-neon-white-b","tpage_name":"ctysluma-sprite"}],[8716349,{"idx":61,"name":"baron-neon-white-a-on","tpage_name":"ctysluma-sprite"}],[8716348,{"idx":60,"name":"baron-neon-white-a","tpage_name":"ctysluma-sprite"}],[8716347,{"idx":59,"name":"baron-neon-triangle-a-on","tpage_name":"ctysluma-sprite"}],[8716346,{"idx":58,"name":"baron-neon-triangle-a","tpage_name":"ctysluma-sprite"}],[8716345,{"idx":57,"name":"baron-neon-skull-main-on","tpage_name":"ctysluma-sprite"}],[8716344,{"idx":56,"name":"baron-neon-skull-main","tpage_name":"ctysluma-sprite"}],[8716343,{"idx":55,"name":"baron-neon-skull-circle-on","tpage_name":"ctysluma-sprite"}],[8716342,{"idx":54,"name":"baron-neon-skull-circle","tpage_name":"ctysluma-sprite"}],[8716341,{"idx":53,"name":"baron-neon-nose-on","tpage_name":"ctysluma-sprite"}],[10616840,{"idx":8,"name":"sign-square-b","tpage_name":"ctyslumb-sprite"}],[8716335,{"idx":47,"name":"baron-neon-eye-c-on","tpage_name":"ctysluma-sprite"}],[10616839,{"idx":7,"name":"sign-square-a","tpage_name":"ctyslumb-sprite"}],[8716334,{"idx":46,"name":"baron-neon-eye-c","tpage_name":"ctysluma-sprite"}],[10616838,{"idx":6,"name":"sign-hiphog","tpage_name":"ctyslumb-sprite"}],[8716333,{"idx":45,"name":"baron-neon-eye-border-on","tpage_name":"ctysluma-sprite"}],[10616837,{"idx":5,"name":"sign-happy-pirate","tpage_name":"ctyslumb-sprite"}],[8716332,{"idx":44,"name":"baron-neon-eye-border","tpage_name":"ctysluma-sprite"}],[8716331,{"idx":43,"name":"baron-neon-eye-b-on","tpage_name":"ctysluma-sprite"}],[10616835,{"idx":3,"name":"sign-future","tpage_name":"ctyslumb-sprite"}],[8716330,{"idx":42,"name":"baron-neon-eye-b","tpage_name":"ctysluma-sprite"}],[10616834,{"idx":2,"name":"sign-crimson","tpage_name":"ctyslumb-sprite"}],[8716329,{"idx":41,"name":"baron-neon-eye-a-on","tpage_name":"ctysluma-sprite"}],[10616832,{"idx":0,"name":"sign-baron","tpage_name":"ctyslumb-sprite"}],[8716327,{"idx":39,"name":"baron-neon-dot-ring-on","tpage_name":"ctysluma-sprite"}],[66191361,{"idx":1,"name":"fora-precursor-glass-b-02","tpage_name":"foresta-vis-alpha"}],[48758841,{"idx":57,"name":"sewer-metal-trim-01","tpage_name":"sewc-vis-tfrag"}],[154796035,{"idx":3,"name":"daxter-furhilite","tpage_name":"ljakndax-pris"}],[144834595,{"idx":35,"name":"comb-long-vent","tpage_name":"combn-tfrag"}],[106234015,{"idx":159,"name":"airlock-door-metal2","tpage_name":"mined-pris"}],[12320774,{"idx":6,"name":"city-ind-border-stripe-dark-01","tpage_name":"ctyindb-vis-tfrag"}],[12320773,{"idx":5,"name":"city-ind-wall-noisy-border-05","tpage_name":"ctyindb-vis-tfrag"}],[12320772,{"idx":4,"name":"city-inda-wallbase","tpage_name":"ctyindb-vis-tfrag"}],[12320771,{"idx":3,"name":"city-port-metal-green-main-side","tpage_name":"ctyindb-vis-tfrag"}],[12320769,{"idx":1,"name":"city-ind-metal-green-main-side","tpage_name":"ctyindb-vis-tfrag"}],[12320768,{"idx":0,"name":"city-ind-black","tpage_name":"ctyindb-vis-tfrag"}],[61669392,{"idx":16,"name":"fora-precursor-tube-ring-02","tpage_name":"foresta-vis-shrub"}],[61669390,{"idx":14,"name":"fora-precursor-circuitpattern-01","tpage_name":"foresta-vis-shrub"}],[61669389,{"idx":13,"name":"fora-precursor-metal-plain-01","tpage_name":"foresta-vis-shrub"}],[61669387,{"idx":11,"name":"fora-shrub-vine","tpage_name":"foresta-vis-shrub"}],[61669386,{"idx":10,"name":"fora-shrub-growth","tpage_name":"foresta-vis-shrub"}],[61538340,{"idx":36,"name":"common-glass","tpage_name":"freehq-water"}],[61079640,{"idx":88,"name":"pecker-eyelid","tpage_name":"minec-vis-pris"}],[130351104,{"idx":0,"name":"des-beast-brown-tube","tpage_name":"deshover-pris2"}],[129105924,{"idx":4,"name":"sewer-waterfall-01-n","tpage_name":"sewn-vis-water"}],[94240884,{"idx":116,"name":"tpal-big-metal-panl01","tpage_name":"intpfall-vis-tfrag"}],[61079639,{"idx":87,"name":"pecker-yellowfur","tpage_name":"minec-vis-pris"}],[129105923,{"idx":3,"name":"sewer-water-wave-01-n","tpage_name":"sewn-vis-water"}],[94240883,{"idx":115,"name":"tpal-horiz-trim01","tpage_name":"intpfall-vis-tfrag"}],[61079637,{"idx":85,"name":"pecker-wingbottom","tpage_name":"minec-vis-pris"}],[129105921,{"idx":1,"name":"sewer-water-still-01-n","tpage_name":"sewn-vis-water"}],[94240881,{"idx":113,"name":"intr-grey-holes","tpage_name":"intpfall-vis-tfrag"}],[61079629,{"idx":77,"name":"widow-pod-gun-metal","tpage_name":"minec-vis-pris"}],[94240873,{"idx":105,"name":"troof-beam01","tpage_name":"intpfall-vis-tfrag"}],[48758847,{"idx":63,"name":"sewer-block-02-hitweak","tpage_name":"sewc-vis-tfrag"}],[154796041,{"idx":9,"name":"daxterfinger","tpage_name":"ljakndax-pris"}],[151060501,{"idx":21,"name":"widow-dull-inards","tpage_name":"factoryc-vis-pris"}],[144834601,{"idx":41,"name":"comb-stone-02","tpage_name":"combn-tfrag"}],[106234021,{"idx":165,"name":"roboboss-antennae","tpage_name":"mined-pris"}],[94240861,{"idx":93,"name":"palcab-lowres-background-peaks-01","tpage_name":"intpfall-vis-tfrag"}],[48758846,{"idx":62,"name":"sewer-metal-floor-02","tpage_name":"sewc-vis-tfrag"}],[154796040,{"idx":8,"name":"daxterear","tpage_name":"ljakndax-pris"}],[153550860,{"idx":12,"name":"mhcity-pebbles","tpage_name":"mhcitya-vis-shrub"}],[144834600,{"idx":40,"name":"comb-stone-01","tpage_name":"combn-tfrag"}],[106234020,{"idx":164,"name":"roboboss-abs","tpage_name":"mined-pris"}],[94240860,{"idx":92,"name":"palcab-lowres-background-desert-to-shore","tpage_name":"intpfall-vis-tfrag"}],[48758845,{"idx":61,"name":"sewer-brick-roof-05","tpage_name":"sewc-vis-tfrag"}],[154796039,{"idx":7,"name":"daxterbolt","tpage_name":"ljakndax-pris"}],[153550859,{"idx":11,"name":"mhcity-goo-plants","tpage_name":"mhcitya-vis-shrub"}],[144834599,{"idx":39,"name":"comb-stone-05","tpage_name":"combn-tfrag"}],[106234019,{"idx":163,"name":"prebot-innermetal-edges","tpage_name":"mined-pris"}],[94240859,{"idx":91,"name":"palcab-lowres-background-hilltops-01","tpage_name":"intpfall-vis-tfrag"}],[48758844,{"idx":60,"name":"sewer-red-light-02","tpage_name":"sewc-vis-tfrag"}],[154796038,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"ljakndax-pris"}],[144834598,{"idx":38,"name":"comb-stone-04","tpage_name":"combn-tfrag"}],[106234018,{"idx":162,"name":"prebot-foot","tpage_name":"mined-pris"}],[94240858,{"idx":90,"name":"strip-metal-02-hitweak","tpage_name":"intpfall-vis-tfrag"}],[48758843,{"idx":59,"name":"sewer-red-light-01","tpage_name":"sewc-vis-tfrag"}],[154796037,{"idx":5,"name":"daxterarm","tpage_name":"ljakndax-pris"}],[151060497,{"idx":17,"name":"roboguard-headshield","tpage_name":"factoryc-vis-pris"}],[144834597,{"idx":37,"name":"comb-stone-03","tpage_name":"combn-tfrag"}],[106234017,{"idx":161,"name":"gun-blue-glow","tpage_name":"mined-pris"}],[121634817,{"idx":1,"name":"minb-spidweb-02","tpage_name":"mineb-vis-water"}],[94240857,{"idx":89,"name":"palcab-lowres-background-shoreline-01","tpage_name":"intpfall-vis-tfrag"}],[66191362,{"idx":2,"name":"precprism-lens-07","tpage_name":"foresta-vis-alpha"}],[48758842,{"idx":58,"name":"sewer-metal-trim-02","tpage_name":"sewc-vis-tfrag"}],[154796036,{"idx":4,"name":"daxter-orange","tpage_name":"ljakndax-pris"}],[153550856,{"idx":8,"name":"city-ind-stain-02","tpage_name":"mhcitya-vis-shrub"}],[144834596,{"idx":36,"name":"comb-comb-tile","tpage_name":"combn-tfrag"}],[106234016,{"idx":160,"name":"airlockl-door-metalframe","tpage_name":"mined-pris"}],[121634816,{"idx":0,"name":"minb-spidweb-01","tpage_name":"mineb-vis-water"}],[94240856,{"idx":88,"name":"tcab-blue-ring-01","tpage_name":"intpfall-vis-tfrag"}],[62259208,{"idx":8,"name":"gunbox02","tpage_name":"ctycarc-pris"}],[61014028,{"idx":12,"name":"minc-blue-paint-01","tpage_name":"minec-vis-shrub"}],[81723480,{"idx":88,"name":"jakc-wristband-a2","tpage_name":"ljndklev-pris"}],[81723453,{"idx":61,"name":"klever-blackstrap","tpage_name":"ljndklev-pris"}],[60882979,{"idx":35,"name":"minc-rust-pipe-05","tpage_name":"mineb-vis-pris"}],[81723451,{"idx":59,"name":"klever-armor-01","tpage_name":"ljndklev-pris"}],[60882977,{"idx":33,"name":"minc-blue-paint-rust01","tpage_name":"mineb-vis-pris"}],[95879172,{"idx":4,"name":"torn-armor","tpage_name":"ltorn-pris2"}],[112328763,{"idx":59,"name":"bat-amulet-01","tpage_name":"wascast-pris"}],[122290195,{"idx":19,"name":"fac-tower-pipe-rim-01","tpage_name":"factoryb-vis-pris"}],[112328755,{"idx":51,"name":"jakchires-shoebottom","tpage_name":"wascast-pris"}],[122290194,{"idx":18,"name":"fac-tower-pipe-03","tpage_name":"factoryb-vis-pris"}],[112328754,{"idx":50,"name":"jakchires-precarmor-01","tpage_name":"wascast-pris"}],[122290193,{"idx":17,"name":"fac-tower-base-03","tpage_name":"factoryb-vis-pris"}],[112328753,{"idx":49,"name":"jakchires-pants","tpage_name":"wascast-pris"}],[122290192,{"idx":16,"name":"fac-tower-panel-02","tpage_name":"factoryb-vis-pris"}],[112328752,{"idx":48,"name":"jakchires-lightbrownspat","tpage_name":"wascast-pris"}],[112328750,{"idx":46,"name":"jakchires-jacket","tpage_name":"wascast-pris"}],[112328749,{"idx":45,"name":"jakchires-horn","tpage_name":"wascast-pris"}],[112328748,{"idx":44,"name":"jakchires-hair","tpage_name":"wascast-pris"}],[122290186,{"idx":10,"name":"fac-tower-07","tpage_name":"factoryb-vis-pris"}],[112328746,{"idx":42,"name":"jakchires-facert","tpage_name":"wascast-pris"}],[60686348,{"idx":12,"name":"minb-hang-strut-metl-01","tpage_name":"mineb-vis-tfrag"}],[60686346,{"idx":10,"name":"minc-blue-paint-rust01","tpage_name":"mineb-vis-tfrag"}],[60686345,{"idx":9,"name":"minc-rust-pipe-03","tpage_name":"mineb-vis-tfrag"}],[60686344,{"idx":8,"name":"minc-rust-pipe-04","tpage_name":"mineb-vis-tfrag"}],[60686339,{"idx":3,"name":"minb-stone12","tpage_name":"mineb-vis-tfrag"}],[60686338,{"idx":2,"name":"minb-stone-brick","tpage_name":"mineb-vis-tfrag"}],[60686337,{"idx":1,"name":"minc-cliff-face-01","tpage_name":"mineb-vis-tfrag"}],[14680086,{"idx":22,"name":"jakchires-blackstrap","tpage_name":"ctygenb-vis-pris"}],[10879076,{"idx":100,"name":"cityslumc-gold-trim","tpage_name":"ctyslumb-vis-tfrag"}],[14680076,{"idx":12,"name":"environment-oldmetal","tpage_name":"ctygenb-vis-pris"}],[10879066,{"idx":90,"name":"cityslumc-grey-side-pillar","tpage_name":"ctyslumb-vis-tfrag"}],[14680075,{"idx":11,"name":"bam-hairhilite","tpage_name":"ctygenb-vis-pris"}],[10879065,{"idx":89,"name":"ctyslumc-overhang-02","tpage_name":"ctyslumb-vis-tfrag"}],[14680074,{"idx":10,"name":"bam-eyelight","tpage_name":"ctygenb-vis-pris"}],[10879064,{"idx":88,"name":"ctyslumc-overhang-01","tpage_name":"ctyslumb-vis-tfrag"}],[14680073,{"idx":9,"name":"jakc-skirt","tpage_name":"ctygenb-vis-pris"}],[10879063,{"idx":87,"name":"ctyslumc-floor-base","tpage_name":"ctyslumb-vis-tfrag"}],[10879062,{"idx":86,"name":"ctyslumc-railing-trim","tpage_name":"ctyslumb-vis-tfrag"}],[10879060,{"idx":84,"name":"ctyslumc-vine-hang-a","tpage_name":"ctyslumb-vis-tfrag"}],[8912938,{"idx":42,"name":"city-fort-red","tpage_name":"ctysluma-vis-tfrag"}],[8912937,{"idx":41,"name":"city-slum-burning-can","tpage_name":"ctysluma-vis-tfrag"}],[60555307,{"idx":43,"name":"minb-stone14","tpage_name":"minea-vis-tfrag"}],[8912936,{"idx":40,"name":"city-slum-lightwall","tpage_name":"ctysluma-vis-tfrag"}],[60555306,{"idx":42,"name":"minc-rust-pipe-03","tpage_name":"minea-vis-tfrag"}],[8912935,{"idx":39,"name":"slum-stone-bottom","tpage_name":"ctysluma-vis-tfrag"}],[8912933,{"idx":37,"name":"city-wall-plain-1","tpage_name":"ctysluma-vis-tfrag"}],[8912931,{"idx":35,"name":"city-slum-bigpipe-02","tpage_name":"ctysluma-vis-tfrag"}],[8912929,{"idx":33,"name":"city-slum-building-frame","tpage_name":"ctysluma-vis-tfrag"}],[8912928,{"idx":32,"name":"city-slumbase-wall-boarded","tpage_name":"ctysluma-vis-tfrag"}],[8912927,{"idx":31,"name":"city-side-support-tops","tpage_name":"ctysluma-vis-tfrag"}],[8912926,{"idx":30,"name":"common-black","tpage_name":"ctysluma-vis-tfrag"}],[60555317,{"idx":53,"name":"minc-pre-11","tpage_name":"minea-vis-tfrag"}],[8912945,{"idx":49,"name":"slum-ground-01","tpage_name":"ctysluma-vis-tfrag"}],[8912944,{"idx":48,"name":"slum-ditch-bottom-01","tpage_name":"ctysluma-vis-tfrag"}],[94240817,{"idx":49,"name":"city-lowres-ctygen-side-01","tpage_name":"intpfall-vis-tfrag"}],[94240816,{"idx":48,"name":"city-lowres-ctygen-build-02","tpage_name":"intpfall-vis-tfrag"}],[94240815,{"idx":47,"name":"city-lowres-ctygen-roof-02","tpage_name":"intpfall-vis-tfrag"}],[94240814,{"idx":46,"name":"city-lowres-ctygen-stripe-02","tpage_name":"intpfall-vis-tfrag"}],[94240813,{"idx":45,"name":"city-lowres-ctygen-roof-01","tpage_name":"intpfall-vis-tfrag"}],[94240812,{"idx":44,"name":"city-lowres-ctygen-stripe-01","tpage_name":"intpfall-vis-tfrag"}],[94240811,{"idx":43,"name":"city-lowres-ctygen-build-01","tpage_name":"intpfall-vis-tfrag"}],[2147418112,{"idx":0,"name":"placeholder-white","tpage_name":"placeholder"}],[94240810,{"idx":42,"name":"city-lowres-ctygen-side-02","tpage_name":"intpfall-vis-tfrag"}],[94240809,{"idx":41,"name":"palcab-lowres-mark-highway","tpage_name":"intpfall-vis-tfrag"}],[94240808,{"idx":40,"name":"palcab-lowres-mark-awning-red","tpage_name":"intpfall-vis-tfrag"}],[94240807,{"idx":39,"name":"palcab-lowres-mark-awning-green","tpage_name":"intpfall-vis-tfrag"}],[94240806,{"idx":38,"name":"palcab-lowres-mark-shops-01","tpage_name":"intpfall-vis-tfrag"}],[94240805,{"idx":37,"name":"palcab-lowres-mark-roof-rim-01","tpage_name":"intpfall-vis-tfrag"}],[61079560,{"idx":8,"name":"gekko-tubes","tpage_name":"minec-vis-pris"}],[94240804,{"idx":36,"name":"palcab-lowres-farm-wall-top","tpage_name":"intpfall-vis-tfrag"}],[94240803,{"idx":35,"name":"palcab-lowres-farm-wall","tpage_name":"intpfall-vis-tfrag"}],[60620942,{"idx":142,"name":"pecker-yellowfur","tpage_name":"minea-vis-pris"}],[94240802,{"idx":34,"name":"city-lowres-ind-wall-06","tpage_name":"intpfall-vis-tfrag"}],[60620932,{"idx":132,"name":"minc-rust-02","tpage_name":"minea-vis-pris"}],[94240792,{"idx":24,"name":"city-lowres-fort-yellow","tpage_name":"intpfall-vis-tfrag"}],[60620931,{"idx":131,"name":"minc-bolt","tpage_name":"minea-vis-pris"}],[94240791,{"idx":23,"name":"city-lowres-ind-wall-02","tpage_name":"intpfall-vis-tfrag"}],[60620930,{"idx":130,"name":"minc-base-metal-platfrom-01","tpage_name":"minea-vis-pris"}],[94240790,{"idx":22,"name":"palcab-lowres-stadium-canopy","tpage_name":"intpfall-vis-tfrag"}],[60620928,{"idx":128,"name":"jakc-scarfhanging","tpage_name":"minea-vis-pris"}],[94240788,{"idx":20,"name":"palcab-lowres-mark-roof-02","tpage_name":"intpfall-vis-tfrag"}],[60620927,{"idx":127,"name":"jakchires-teeth","tpage_name":"minea-vis-pris"}],[94240787,{"idx":19,"name":"palcab-pipe-hoze","tpage_name":"intpfall-vis-tfrag"}],[60620926,{"idx":126,"name":"jakchires-shoeteop","tpage_name":"minea-vis-pris"}],[94240786,{"idx":18,"name":"palcab-lowres-ctyslumc-wall-02","tpage_name":"intpfall-vis-tfrag"}],[60620924,{"idx":124,"name":"jakchires-shoebottom","tpage_name":"minea-vis-pris"}],[94240784,{"idx":16,"name":"palcab-steel","tpage_name":"intpfall-vis-tfrag"}],[134938636,{"idx":12,"name":"rub-beam-gen","tpage_name":"rubbleb-vis-shrub"}],[105054316,{"idx":108,"name":"intcept-tread01","tpage_name":"desoasis-pris"}],[134938635,{"idx":11,"name":"rub-greyblue-plain-lowres","tpage_name":"rubbleb-vis-shrub"}],[105054315,{"idx":107,"name":"intcept-teeth01","tpage_name":"desoasis-pris"}],[134938634,{"idx":10,"name":"rub-met-strp-close","tpage_name":"rubbleb-vis-shrub"}],[105054314,{"idx":106,"name":"intcept-pipe01","tpage_name":"desoasis-pris"}],[105054313,{"idx":105,"name":"intcept-gun01","tpage_name":"desoasis-pris"}],[105054312,{"idx":104,"name":"intcept-base-patern02","tpage_name":"desoasis-pris"}],[112525389,{"idx":77,"name":"jakchires-teeth","tpage_name":"desrescc-pris"}],[105054309,{"idx":101,"name":"marauder-sword-metal","tpage_name":"desoasis-pris"}],[57212938,{"idx":10,"name":"wascitya-flag-d","tpage_name":"waswide-vis-tfrag"}],[70254593,{"idx":1,"name":"map-nst-upper","tpage_name":"nsta-minimap"}],[55312433,{"idx":49,"name":"tentacle-01","tpage_name":"wascityb-vis-pris"}],[57212937,{"idx":9,"name":"wascitya-flag-c","tpage_name":"waswide-vis-tfrag"}],[57212936,{"idx":8,"name":"wascity-metal-piece-02","tpage_name":"waswide-vis-tfrag"}],[112525377,{"idx":65,"name":"jakchires-facert","tpage_name":"desrescc-pris"}],[105054297,{"idx":89,"name":"marauder-leather-handle","tpage_name":"desoasis-pris"}],[57212935,{"idx":7,"name":"wascitya-flag-b","tpage_name":"waswide-vis-tfrag"}],[55312428,{"idx":44,"name":"was-kangalizard-fin","tpage_name":"wascityb-vis-pris"}],[55312423,{"idx":39,"name":"was-dogat-nose","tpage_name":"wascityb-vis-pris"}],[92209163,{"idx":11,"name":"klever-armor-02","tpage_name":"ldamklev-pris"}],[92209160,{"idx":8,"name":"klever-mustache","tpage_name":"ldamklev-pris"}],[92209159,{"idx":7,"name":"klever-hair","tpage_name":"ldamklev-pris"}],[92209158,{"idx":6,"name":"klever-face-01scars","tpage_name":"ldamklev-pris"}],[57147399,{"idx":7,"name":"king-clip-02","tpage_name":"waspala-pris2"}],[57147397,{"idx":5,"name":"king-bolt","tpage_name":"waspala-pris2"}],[57147396,{"idx":4,"name":"king-bluemetal","tpage_name":"waspala-pris2"}],[57147395,{"idx":3,"name":"king-blackskirt2","tpage_name":"waspala-pris2"}],[57147393,{"idx":1,"name":"environment-oldmetal","tpage_name":"waspala-pris2"}],[57147392,{"idx":0,"name":"bam-eyelight","tpage_name":"waspala-pris2"}],[42401805,{"idx":13,"name":"wascity-steel-bar","tpage_name":"wasdoors-vis-tfrag"}],[42401804,{"idx":12,"name":"wascity-torch-tank","tpage_name":"wasdoors-vis-tfrag"}],[42401803,{"idx":11,"name":"wascity-metal-dirty","tpage_name":"wasdoors-vis-tfrag"}],[42401802,{"idx":10,"name":"wascity-metal-wall-base-plate","tpage_name":"wasdoors-vis-tfrag"}],[42401801,{"idx":9,"name":"wascity-outerwall-metal","tpage_name":"wasdoors-vis-tfrag"}],[42401800,{"idx":8,"name":"wascity-metal-door-01","tpage_name":"wasdoors-vis-tfrag"}],[42401799,{"idx":7,"name":"wascity-outerwall-metal-d","tpage_name":"wasdoors-vis-tfrag"}],[90243118,{"idx":46,"name":"des-mount-02","tpage_name":"desertb-vis-tfrag"}],[90243117,{"idx":45,"name":"des-corral-plate-02","tpage_name":"desertb-vis-tfrag"}],[90243116,{"idx":44,"name":"des-corral-metal-01","tpage_name":"desertb-vis-tfrag"}],[90243115,{"idx":43,"name":"des-pole-01","tpage_name":"desertb-vis-tfrag"}],[90243114,{"idx":42,"name":"des-pole-brace","tpage_name":"desertb-vis-tfrag"}],[90243113,{"idx":41,"name":"des-mount-01","tpage_name":"desertb-vis-tfrag"}],[90243112,{"idx":40,"name":"des-rock-01","tpage_name":"desertb-vis-tfrag"}],[57081867,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"waspala-pris"}],[90243110,{"idx":38,"name":"des-bridge-brace-01","tpage_name":"desertb-vis-tfrag"}],[90243109,{"idx":37,"name":"des-bridge-plank","tpage_name":"desertb-vis-tfrag"}],[90243108,{"idx":36,"name":"des-corral-plate-03","tpage_name":"desertb-vis-tfrag"}],[90243105,{"idx":33,"name":"des-cliff-top-01","tpage_name":"desertb-vis-tfrag"}],[90243104,{"idx":32,"name":"des-cliff-trans-01","tpage_name":"desertb-vis-tfrag"}],[90243101,{"idx":29,"name":"des-red-rock-01","tpage_name":"desertb-vis-tfrag"}],[90243100,{"idx":28,"name":"des-branch-01","tpage_name":"desertb-vis-tfrag"}],[104792206,{"idx":142,"name":"environment-darkprec","tpage_name":"desresc-pris"}],[104792205,{"idx":141,"name":"dark-crystal-pickup-03","tpage_name":"desresc-pris"}],[104792204,{"idx":140,"name":"dark-crystal-pickup-02","tpage_name":"desresc-pris"}],[104792203,{"idx":139,"name":"dark-crystal-pickup-01","tpage_name":"desresc-pris"}],[104792202,{"idx":138,"name":"dark-crystal-knob-02","tpage_name":"desresc-pris"}],[139657241,{"idx":25,"name":"keira-torch-nozzle-02","tpage_name":"lkeira-pris"}],[104792201,{"idx":137,"name":"dark-crystal-knob-01","tpage_name":"desresc-pris"}],[60686375,{"idx":39,"name":"minc-rust-pipe-05","tpage_name":"mineb-vis-tfrag"}],[56950835,{"idx":51,"name":"waspala-step-02","tpage_name":"waspala-tfrag"}],[60686372,{"idx":36,"name":"minc-grill-01","tpage_name":"mineb-vis-tfrag"}],[56950832,{"idx":48,"name":"waspala-chain-anchor","tpage_name":"waspala-tfrag"}],[60686371,{"idx":35,"name":"minc-red-paint-02","tpage_name":"mineb-vis-tfrag"}],[56950831,{"idx":47,"name":"waspala-elevator-shaft","tpage_name":"waspala-tfrag"}],[60686370,{"idx":34,"name":"minc-chain-metal-01","tpage_name":"mineb-vis-tfrag"}],[56950830,{"idx":46,"name":"waspala-pool-floor","tpage_name":"waspala-tfrag"}],[60686369,{"idx":33,"name":"minc-ox-pipe-01","tpage_name":"mineb-vis-tfrag"}],[56950829,{"idx":45,"name":"waspala-elevator-cable","tpage_name":"waspala-tfrag"}],[60686368,{"idx":32,"name":"minb-stone-tile","tpage_name":"mineb-vis-tfrag"}],[56950828,{"idx":44,"name":"waspala-elevator-tube","tpage_name":"waspala-tfrag"}],[56950827,{"idx":43,"name":"waspala-elevator-metal-plate","tpage_name":"waspala-tfrag"}],[60686366,{"idx":30,"name":"minc-rust-bars-01","tpage_name":"mineb-vis-tfrag"}],[56950826,{"idx":42,"name":"waspala-elevator-metal","tpage_name":"waspala-tfrag"}],[60686365,{"idx":29,"name":"minc-yel-paint-rust01","tpage_name":"mineb-vis-tfrag"}],[56950825,{"idx":41,"name":"waspala-window-frame","tpage_name":"waspala-tfrag"}],[60686364,{"idx":28,"name":"minc-blue-paint-01","tpage_name":"mineb-vis-tfrag"}],[56950824,{"idx":40,"name":"waspala-column-piece","tpage_name":"waspala-tfrag"}],[60686363,{"idx":27,"name":"minc-rust-01","tpage_name":"mineb-vis-tfrag"}],[56950823,{"idx":39,"name":"waspala-fire-holder04","tpage_name":"waspala-tfrag"}],[60686358,{"idx":22,"name":"minb-stone00","tpage_name":"mineb-vis-tfrag"}],[56950818,{"idx":34,"name":"waspala-fire-holder03","tpage_name":"waspala-tfrag"}],[139657219,{"idx":3,"name":"keira-belt","tpage_name":"lkeira-pris"}],[104792179,{"idx":115,"name":"dk-sat-shell-lod-01","tpage_name":"desresc-pris"}],[60686357,{"idx":21,"name":"minb-stone-edge","tpage_name":"mineb-vis-tfrag"}],[56950817,{"idx":33,"name":"waspala-column-02","tpage_name":"waspala-tfrag"}],[139657218,{"idx":2,"name":"keira-bellylong","tpage_name":"lkeira-pris"}],[104792178,{"idx":114,"name":"dk-sat-rim-lod-01","tpage_name":"desresc-pris"}],[60686356,{"idx":20,"name":"minb-stone19","tpage_name":"mineb-vis-tfrag"}],[56950816,{"idx":32,"name":"waspala-column-01","tpage_name":"waspala-tfrag"}],[60686351,{"idx":15,"name":"minb-stone20","tpage_name":"mineb-vis-tfrag"}],[56950811,{"idx":27,"name":"waspala-metal-bar","tpage_name":"waspala-tfrag"}],[60686350,{"idx":14,"name":"minb-stone26","tpage_name":"mineb-vis-tfrag"}],[56950810,{"idx":26,"name":"waspala-metal-plate02","tpage_name":"waspala-tfrag"}],[60686349,{"idx":13,"name":"minb-hang-strut-metl-02","tpage_name":"mineb-vis-tfrag"}],[56950809,{"idx":25,"name":"waspala-metal-plate01","tpage_name":"waspala-tfrag"}],[60686342,{"idx":6,"name":"minb-stone09","tpage_name":"mineb-vis-tfrag"}],[56950802,{"idx":18,"name":"waspala-yellow-01","tpage_name":"waspala-tfrag"}],[60686341,{"idx":5,"name":"minb-stone17","tpage_name":"mineb-vis-tfrag"}],[56950801,{"idx":17,"name":"waspala-red-01","tpage_name":"waspala-tfrag"}],[56950788,{"idx":4,"name":"waspala-corgmetal","tpage_name":"waspala-tfrag"}],[130940929,{"idx":1,"name":"hologram-lines","tpage_name":"deshover-sprite"}],[104792149,{"idx":85,"name":"dk-sat-cable-02","tpage_name":"desresc-pris"}],[55312434,{"idx":50,"name":"tentacle-02","tpage_name":"wascityb-vis-pris"}],[55312427,{"idx":43,"name":"was-kangalizard-face","tpage_name":"wascityb-vis-pris"}],[55312426,{"idx":42,"name":"was-kangalizard-body-bottom","tpage_name":"wascityb-vis-pris"}],[55312425,{"idx":41,"name":"was-kangalizard-body","tpage_name":"wascityb-vis-pris"}],[55312424,{"idx":40,"name":"was-dogat-tail","tpage_name":"wascityb-vis-pris"}],[55312422,{"idx":38,"name":"was-dogat-face","tpage_name":"wascityb-vis-pris"}],[55312421,{"idx":37,"name":"was-dogat-body","tpage_name":"wascityb-vis-pris"}],[55312420,{"idx":36,"name":"was-tizard-nail","tpage_name":"wascityb-vis-pris"}],[55312419,{"idx":35,"name":"was-tizard-hair","tpage_name":"wascityb-vis-pris"}],[55312418,{"idx":34,"name":"was-tizard-fin","tpage_name":"wascityb-vis-pris"}],[55312417,{"idx":33,"name":"was-tizard-facefin","tpage_name":"wascityb-vis-pris"}],[55312416,{"idx":32,"name":"was-tizard-face","tpage_name":"wascityb-vis-pris"}],[55312415,{"idx":31,"name":"was-tizard-body","tpage_name":"wascityb-vis-pris"}],[38731793,{"idx":17,"name":"flying-bird-02","tpage_name":"wasstada-sprite"}],[38731792,{"idx":16,"name":"flying-bird-01","tpage_name":"wasstada-sprite"}],[71303177,{"idx":9,"name":"sig-gem-01","tpage_name":"ldamsig-pris2"}],[73793537,{"idx":1,"name":"sewer-water-01-g","tpage_name":"sewg-vis-water"}],[106954781,{"idx":29,"name":"vol-ladder-wood","tpage_name":"volcanoa-vis-tfrag"}],[106954780,{"idx":28,"name":"vol-plate-01","tpage_name":"volcanoa-vis-tfrag"}],[106954777,{"idx":25,"name":"vol-dpipe-02","tpage_name":"volcanoa-vis-tfrag"}],[106954776,{"idx":24,"name":"vola-rock-top","tpage_name":"volcanoa-vis-tfrag"}],[106954775,{"idx":23,"name":"vol-bushbase-01","tpage_name":"volcanoa-vis-tfrag"}],[106954774,{"idx":22,"name":"vola-grass-fringe-full","tpage_name":"volcanoa-vis-tfrag"}],[106954773,{"idx":21,"name":"vola-vine","tpage_name":"volcanoa-vis-tfrag"}],[55312399,{"idx":15,"name":"gekko-fingers","tpage_name":"wascityb-vis-pris"}],[55312398,{"idx":14,"name":"gekko-eye-01","tpage_name":"wascityb-vis-pris"}],[55312397,{"idx":13,"name":"gekko-body","tpage_name":"wascityb-vis-pris"}],[55312396,{"idx":12,"name":"wst-turret-side","tpage_name":"wascityb-vis-pris"}],[106954767,{"idx":15,"name":"vola-jump-plat","tpage_name":"volcanoa-vis-tfrag"}],[106954764,{"idx":12,"name":"vola-rock-side","tpage_name":"volcanoa-vis-tfrag"}],[106954763,{"idx":11,"name":"vola-grass-floor-01","tpage_name":"volcanoa-vis-tfrag"}],[55246857,{"idx":9,"name":"wascity-ground-stain-01","tpage_name":"wascityb-vis-shrub"}],[55246854,{"idx":6,"name":"wascity-stain-wall-01","tpage_name":"wascityb-vis-shrub"}],[55246853,{"idx":5,"name":"wascity-steel-bar","tpage_name":"wascityb-vis-shrub"}],[73596939,{"idx":11,"name":"sewer-pipe-small-02","tpage_name":"sewi-vis-tfrag"}],[73596933,{"idx":5,"name":"sewer-block-01","tpage_name":"sewi-vis-tfrag"}],[73596928,{"idx":0,"name":"sewer-brick-block-09","tpage_name":"sewi-vis-tfrag"}],[55115793,{"idx":17,"name":"wascity-metal-indent","tpage_name":"wascityb-vis-tfrag"}],[148766756,{"idx":36,"name":"daxter-eyelid","tpage_name":"warpcast-pris"}],[117637256,{"idx":136,"name":"wstlander-01-shoetop","tpage_name":"destrack-pris"}],[148766755,{"idx":35,"name":"jakchires-teeth","tpage_name":"warpcast-pris"}],[117637255,{"idx":135,"name":"wstlander-01-shoebottom","tpage_name":"destrack-pris"}],[148766754,{"idx":34,"name":"jakchires-shoeteop","tpage_name":"warpcast-pris"}],[117637254,{"idx":134,"name":"wstlander-01-pants","tpage_name":"destrack-pris"}],[262193,{"idx":49,"name":"lasersmoke-23","tpage_name":"level-default-sprite"}],[262192,{"idx":48,"name":"lasersmoke-22","tpage_name":"level-default-sprite"}],[262189,{"idx":45,"name":"lasersmoke-19","tpage_name":"level-default-sprite"}],[262188,{"idx":44,"name":"lasersmoke-18","tpage_name":"level-default-sprite"}],[262186,{"idx":42,"name":"lasersmoke-16","tpage_name":"level-default-sprite"}],[262185,{"idx":41,"name":"lasersmoke-15","tpage_name":"level-default-sprite"}],[53674003,{"idx":19,"name":"turret-hose","tpage_name":"forestb-vis-tfrag"}],[52428800,{"idx":0,"name":"sewer-pipe-small-01","tpage_name":"sewa-vis-shrub"}],[48627790,{"idx":78,"name":"sewer-grill-02","tpage_name":"sewb-vis-tfrag"}],[655369,{"idx":9,"name":"sat-shield-env-uvscroll","tpage_name":"level-default-warp"}],[655367,{"idx":7,"name":"sat-shield-dest","tpage_name":"level-default-warp"}],[655366,{"idx":6,"name":"sat-shield","tpage_name":"level-default-warp"}],[105054311,{"idx":103,"name":"intcept-base-patern01","tpage_name":"desoasis-pris"}],[112525391,{"idx":79,"name":"jakc-scarfhanging","tpage_name":"desrescc-pris"}],[105054310,{"idx":102,"name":"intcept-base-green01","tpage_name":"desoasis-pris"}],[112525390,{"idx":78,"name":"jakc-skirt","tpage_name":"desrescc-pris"}],[105054308,{"idx":100,"name":"marauder-sword-edge","tpage_name":"desoasis-pris"}],[112525388,{"idx":76,"name":"jakchires-shoeteop","tpage_name":"desrescc-pris"}],[50790409,{"idx":9,"name":"fora-waterfall-01-dest","tpage_name":"foresta-vis-water"}],[8585216,{"idx":0,"name":"map-ctysluma","tpage_name":"ctysluma-minimap"}],[74907698,{"idx":50,"name":"sewer-brick-block-11","tpage_name":"sewl-vis-tfrag"}],[74907695,{"idx":47,"name":"sewer-pipe-small-02","tpage_name":"sewl-vis-tfrag"}],[74907694,{"idx":46,"name":"sewer-concrete-edge-01","tpage_name":"sewl-vis-tfrag"}],[74907693,{"idx":45,"name":"sewer-pipe-rim-07","tpage_name":"sewl-vis-tfrag"}],[74907692,{"idx":44,"name":"sewer-grill-02","tpage_name":"sewl-vis-tfrag"}],[74907691,{"idx":43,"name":"sewer-metal-02","tpage_name":"sewl-vis-tfrag"}],[74907690,{"idx":42,"name":"sewer-pipe-rim-05","tpage_name":"sewl-vis-tfrag"}],[74907689,{"idx":41,"name":"sewer-plate-04","tpage_name":"sewl-vis-tfrag"}],[74907688,{"idx":40,"name":"sewer-block-01","tpage_name":"sewl-vis-tfrag"}],[74907685,{"idx":37,"name":"sewer-pipe-rim-03","tpage_name":"sewl-vis-tfrag"}],[74907684,{"idx":36,"name":"sewer-brick-roof-01","tpage_name":"sewl-vis-tfrag"}],[74907682,{"idx":34,"name":"sewer-metal-block-01","tpage_name":"sewl-vis-tfrag"}],[74907681,{"idx":33,"name":"sewer-metal-block-02","tpage_name":"sewl-vis-tfrag"}],[74907680,{"idx":32,"name":"sewer-pipe-rim-01","tpage_name":"sewl-vis-tfrag"}],[74907679,{"idx":31,"name":"sewer-pipe-02-edge-01","tpage_name":"sewl-vis-tfrag"}],[74907678,{"idx":30,"name":"sewer-pipe-01","tpage_name":"sewl-vis-tfrag"}],[74907677,{"idx":29,"name":"sewer-pipe-rim-10","tpage_name":"sewl-vis-tfrag"}],[74907676,{"idx":28,"name":"sewer-pipe-rim-09","tpage_name":"sewl-vis-tfrag"}],[74907675,{"idx":27,"name":"sewer-metal-block-06-hitweak","tpage_name":"sewl-vis-tfrag"}],[74907674,{"idx":26,"name":"sewer-flat-pipe-01","tpage_name":"sewl-vis-tfrag"}],[74907673,{"idx":25,"name":"sewer-metal-floor-02","tpage_name":"sewl-vis-tfrag"}],[60686340,{"idx":4,"name":"minb-stone11","tpage_name":"mineb-vis-tfrag"}],[56950800,{"idx":16,"name":"waspala-blue-01","tpage_name":"waspala-tfrag"}],[50724900,{"idx":36,"name":"fora-precursor-circuitpattern-01","tpage_name":"foresta-vis-pris"}],[50724867,{"idx":3,"name":"airlock-door-metal2","tpage_name":"foresta-vis-pris"}],[50659369,{"idx":41,"name":"fora-butress-metal-02","tpage_name":"foresta-vis-tfrag"}],[50659365,{"idx":37,"name":"fora-grass-to-mud","tpage_name":"foresta-vis-tfrag"}],[50659363,{"idx":35,"name":"fora-endblocks","tpage_name":"foresta-vis-tfrag"}],[50659362,{"idx":34,"name":"fora-stone-05","tpage_name":"foresta-vis-tfrag"}],[50659361,{"idx":33,"name":"fora-grass-patch","tpage_name":"foresta-vis-tfrag"}],[50659360,{"idx":32,"name":"fora-small-bottom","tpage_name":"foresta-vis-tfrag"}],[48758855,{"idx":71,"name":"sewer-metal-trim-02-hitweak","tpage_name":"sewc-vis-tfrag"}],[50659359,{"idx":31,"name":"fora-foliage","tpage_name":"foresta-vis-tfrag"}],[48758854,{"idx":70,"name":"sewer-metal-edge-01","tpage_name":"sewc-vis-tfrag"}],[50659358,{"idx":30,"name":"fora-metal-wallgrill","tpage_name":"foresta-vis-tfrag"}],[48758853,{"idx":69,"name":"sewer-flat-pipe-01-hitweak","tpage_name":"sewc-vis-tfrag"}],[50659357,{"idx":29,"name":"fora-metal-green-main","tpage_name":"foresta-vis-tfrag"}],[48758852,{"idx":68,"name":"sewer-mantel-02","tpage_name":"sewc-vis-tfrag"}],[50659356,{"idx":28,"name":"fora-metal-green-02","tpage_name":"foresta-vis-tfrag"}],[48758851,{"idx":67,"name":"sewer-metal-block-04-hitweak","tpage_name":"sewc-vis-tfrag"}],[50659355,{"idx":27,"name":"fora-citywall","tpage_name":"foresta-vis-tfrag"}],[48758850,{"idx":66,"name":"sewer-metal-block-02","tpage_name":"sewc-vis-tfrag"}],[50659354,{"idx":26,"name":"fora-citywall-frame","tpage_name":"foresta-vis-tfrag"}],[48758849,{"idx":65,"name":"sewer-small-light-01","tpage_name":"sewc-vis-tfrag"}],[48758824,{"idx":40,"name":"sew-gun-panel-03","tpage_name":"sewc-vis-tfrag"}],[62193669,{"idx":5,"name":"bikecmotor01","tpage_name":"ctycarb-pris"}],[57212949,{"idx":21,"name":"wascity-cement-road","tpage_name":"waswide-vis-tfrag"}],[60948489,{"idx":9,"name":"minc-rust-bars-01","tpage_name":"minec-vis-tfrag"}],[49741828,{"idx":4,"name":"airlockl-door-metalframe","tpage_name":"sewf-vis-pris"}],[14680079,{"idx":15,"name":"jakc-gogglemetal","tpage_name":"ctygenb-vis-pris"}],[10879069,{"idx":93,"name":"ctyslumc-overhang-03","tpage_name":"ctyslumb-vis-tfrag"}],[94240795,{"idx":27,"name":"city-side-support","tpage_name":"intpfall-vis-tfrag"}],[60620935,{"idx":135,"name":"pecker-eyelid","tpage_name":"minea-vis-pris"}],[50724884,{"idx":20,"name":"fora-bridge-plank","tpage_name":"foresta-vis-pris"}],[50724882,{"idx":18,"name":"fora-precursor-tube-ring-02","tpage_name":"foresta-vis-pris"}],[50724864,{"idx":0,"name":"airlock-door-bolt","tpage_name":"foresta-vis-pris"}],[60817423,{"idx":15,"name":"minc-safe-plate-01","tpage_name":"mineb-vis-shrub"}],[49610803,{"idx":51,"name":"sewer-scaffold-02","tpage_name":"sewf-vis-tfrag"}],[49610807,{"idx":55,"name":"sewer-bolt-side-01","tpage_name":"sewf-vis-tfrag"}],[60817427,{"idx":19,"name":"minc-blue-paint-rust02","tpage_name":"mineb-vis-shrub"}],[95879176,{"idx":8,"name":"torn-ear","tpage_name":"ltorn-pris2"}],[49610766,{"idx":14,"name":"sewer-pipe-02-edge-01","tpage_name":"sewf-vis-tfrag"}],[49610806,{"idx":54,"name":"sewer-pipe-rim-07-hitweak","tpage_name":"sewf-vis-tfrag"}],[60817426,{"idx":18,"name":"minc-metal-grate-01","tpage_name":"mineb-vis-shrub"}],[95879175,{"idx":7,"name":"torn-blademetal","tpage_name":"ltorn-pris2"}],[49610765,{"idx":13,"name":"sewer-pipe-01","tpage_name":"sewf-vis-tfrag"}],[49610805,{"idx":53,"name":"sewer-plate-06","tpage_name":"sewf-vis-tfrag"}],[60817425,{"idx":17,"name":"minc-blue-paint-safe-rust04","tpage_name":"mineb-vis-shrub"}],[95879174,{"idx":6,"name":"torn-belt2","tpage_name":"ltorn-pris2"}],[49610764,{"idx":12,"name":"sewer-stone-arch-01","tpage_name":"sewf-vis-tfrag"}],[49610804,{"idx":52,"name":"sewer-nut-01","tpage_name":"sewf-vis-tfrag"}],[60817424,{"idx":16,"name":"minc-blue-yel-paint-safe-rust04","tpage_name":"mineb-vis-shrub"}],[95879173,{"idx":5,"name":"torn-belt","tpage_name":"ltorn-pris2"}],[49610763,{"idx":11,"name":"sewer-metal-block-07","tpage_name":"sewf-vis-tfrag"}],[49610800,{"idx":48,"name":"sewer-metal-floor-01","tpage_name":"sewf-vis-tfrag"}],[60817420,{"idx":12,"name":"minc-blue-paint-rust04","tpage_name":"mineb-vis-shrub"}],[95879169,{"idx":1,"name":"bam-hairhilite","tpage_name":"ltorn-pris2"}],[49610759,{"idx":7,"name":"sewer-pipe-02","tpage_name":"sewf-vis-tfrag"}],[49545270,{"idx":54,"name":"squid-drabgun","tpage_name":"sewe-vis-pris"}],[49545269,{"idx":53,"name":"kg-grunt-rim-03","tpage_name":"sewe-vis-pris"}],[49545268,{"idx":52,"name":"kg-grunt-rim-02","tpage_name":"sewe-vis-pris"}],[49545267,{"idx":51,"name":"kg-grunt-rim-01","tpage_name":"sewe-vis-pris"}],[49545266,{"idx":50,"name":"kg-grunt-cable-01","tpage_name":"sewe-vis-pris"}],[86507520,{"idx":0,"name":"bam-eyelight","tpage_name":"lbombbot-pris"}],[49545264,{"idx":48,"name":"widow-pod-gun-metal","tpage_name":"sewe-vis-pris"}],[49545263,{"idx":47,"name":"widow-dull-inards","tpage_name":"sewe-vis-pris"}],[49545261,{"idx":45,"name":"squid-bulb-sm","tpage_name":"sewe-vis-pris"}],[49545260,{"idx":44,"name":"roboguard-shouldershield","tpage_name":"sewe-vis-pris"}],[49545254,{"idx":38,"name":"cguardgame-metallight-01small","tpage_name":"sewe-vis-pris"}],[49545251,{"idx":35,"name":"cguard1-lens","tpage_name":"sewe-vis-pris"}],[56950822,{"idx":38,"name":"waspala-column-base","tpage_name":"waspala-tfrag"}],[60686362,{"idx":26,"name":"minc-platfrom-metal-01","tpage_name":"mineb-vis-tfrag"}],[50724881,{"idx":17,"name":"fora-precursor-small-groove","tpage_name":"foresta-vis-pris"}],[49479701,{"idx":21,"name":"sewer-waterfall-02-e","tpage_name":"sewe-vis-water"}],[56950821,{"idx":37,"name":"waspala-cliff-rock-01","tpage_name":"waspala-tfrag"}],[60686361,{"idx":25,"name":"minc-light","tpage_name":"mineb-vis-tfrag"}],[56950820,{"idx":36,"name":"waspala-cliff-rock-02","tpage_name":"waspala-tfrag"}],[60686360,{"idx":24,"name":"minb-brok-floor","tpage_name":"mineb-vis-tfrag"}],[50724879,{"idx":15,"name":"fora-precursor-metal-plain-01","tpage_name":"foresta-vis-pris"}],[49479699,{"idx":19,"name":"sewer-water-highlight-01-e","tpage_name":"sewe-vis-water"}],[56950819,{"idx":35,"name":"waspala-cliff-rock-top","tpage_name":"waspala-tfrag"}],[60686359,{"idx":23,"name":"minb-brok-edge-02","tpage_name":"mineb-vis-tfrag"}],[56950815,{"idx":31,"name":"waspala-fountain-bar","tpage_name":"waspala-tfrag"}],[60686355,{"idx":19,"name":"minb-idol-02","tpage_name":"mineb-vis-tfrag"}],[56950814,{"idx":30,"name":"waspala-column-plate","tpage_name":"waspala-tfrag"}],[60686354,{"idx":18,"name":"minb-stone23","tpage_name":"mineb-vis-tfrag"}],[56950813,{"idx":29,"name":"waspala-fire-holder02","tpage_name":"waspala-tfrag"}],[60686353,{"idx":17,"name":"minb-stone22","tpage_name":"mineb-vis-tfrag"}],[56950812,{"idx":28,"name":"waspala-fire-holder01","tpage_name":"waspala-tfrag"}],[60686352,{"idx":16,"name":"minb-stone15","tpage_name":"mineb-vis-tfrag"}],[60620837,{"idx":37,"name":"daxterhelmetplain","tpage_name":"minea-vis-pris"}],[49414217,{"idx":73,"name":"kg-grunt-rim-02","tpage_name":"sewc-vis-pris"}],[117637210,{"idx":90,"name":"jakchires-blackstrap","tpage_name":"destrack-pris"}],[117637207,{"idx":87,"name":"jakc-wraps","tpage_name":"destrack-pris"}],[117637205,{"idx":85,"name":"jakc-skirt","tpage_name":"destrack-pris"}],[117637204,{"idx":84,"name":"jakc-scarfhanging","tpage_name":"destrack-pris"}],[117637203,{"idx":83,"name":"jakc-scarf","tpage_name":"destrack-pris"}],[117637202,{"idx":82,"name":"jakc-lens","tpage_name":"destrack-pris"}],[118489089,{"idx":1,"name":"charHOLD","tpage_name":"deshunt-pris2"}],[101056569,{"idx":57,"name":"klever-horn","tpage_name":"ljakcklv-pris"}],[117637191,{"idx":71,"name":"daxtergoggles","tpage_name":"destrack-pris"}],[49414190,{"idx":46,"name":"cguardgame-shoebottom","tpage_name":"sewc-vis-pris"}],[101056561,{"idx":49,"name":"klever-gunmetal-01","tpage_name":"ljakcklv-pris"}],[49414186,{"idx":42,"name":"cguardgame-metallight-01small","tpage_name":"sewc-vis-pris"}],[101056557,{"idx":45,"name":"klever-face-01","tpage_name":"ljakcklv-pris"}],[50659364,{"idx":36,"name":"fora-supportmetall","tpage_name":"foresta-vis-tfrag"}],[49414184,{"idx":40,"name":"cguardgame-metaledark-02","tpage_name":"sewc-vis-pris"}],[101056555,{"idx":43,"name":"klever-eye","tpage_name":"ljakcklv-pris"}],[61669385,{"idx":9,"name":"for-bark","tpage_name":"foresta-vis-shrub"}],[61669384,{"idx":8,"name":"fora-shrub-weed","tpage_name":"foresta-vis-shrub"}],[61669383,{"idx":7,"name":"fora-shrub-cattail","tpage_name":"foresta-vis-shrub"}],[61669382,{"idx":6,"name":"fora-shrub-asian-grass","tpage_name":"foresta-vis-shrub"}],[61669381,{"idx":5,"name":"fora-shrub-pebbles","tpage_name":"foresta-vis-shrub"}],[61669379,{"idx":3,"name":"fora-shrub-grass","tpage_name":"foresta-vis-shrub"}],[8912950,{"idx":54,"name":"fort-door-metal","tpage_name":"ctysluma-vis-tfrag"}],[8912949,{"idx":53,"name":"sewer-rubber-rim-01","tpage_name":"ctysluma-vis-tfrag"}],[8912948,{"idx":52,"name":"city-slum-stonewall-bricks","tpage_name":"ctysluma-vis-tfrag"}],[8912947,{"idx":51,"name":"city-dirtywood","tpage_name":"ctysluma-vis-tfrag"}],[71565319,{"idx":7,"name":"pecker-wingbottom","tpage_name":"ldampksm-pris"}],[67829779,{"idx":19,"name":"vinroom-small-monitor-01","tpage_name":"freehq-sprite"}],[71565318,{"idx":6,"name":"pecker-teeth","tpage_name":"ldampksm-pris"}],[67829778,{"idx":18,"name":"screen-15","tpage_name":"freehq-sprite"}],[8912940,{"idx":44,"name":"fort-exhaust-body","tpage_name":"ctysluma-vis-tfrag"}],[71565317,{"idx":5,"name":"pecker-tail","tpage_name":"ldampksm-pris"}],[67829777,{"idx":17,"name":"screen-14","tpage_name":"freehq-sprite"}],[8912939,{"idx":43,"name":"city-fort-yellow","tpage_name":"ctysluma-vis-tfrag"}],[71565316,{"idx":4,"name":"pecker-plume","tpage_name":"ldampksm-pris"}],[67829776,{"idx":16,"name":"screen-13","tpage_name":"freehq-sprite"}],[8912934,{"idx":38,"name":"city-wall-plain-bottom","tpage_name":"ctysluma-vis-tfrag"}],[8912932,{"idx":36,"name":"city-slum-bigpipe-03","tpage_name":"ctysluma-vis-tfrag"}],[70320129,{"idx":1,"name":"jak3-japan","tpage_name":"inttitle-minimap"}],[67829769,{"idx":9,"name":"screen-06","tpage_name":"freehq-sprite"}],[8912930,{"idx":34,"name":"city-side-support","tpage_name":"ctysluma-vis-tfrag"}],[67829767,{"idx":7,"name":"screen-04","tpage_name":"freehq-sprite"}],[49283141,{"idx":69,"name":"cguardgame-backplate","tpage_name":"sewd-vis-pris"}],[16121897,{"idx":41,"name":"citywide-wall-greydrain","tpage_name":"ctyfarma-vis-tfrag"}],[70451200,{"idx":0,"name":"wstlander-01-glovetop","tpage_name":"waswide-vis-water"}],[49283140,{"idx":68,"name":"sew-wallswitch-metal-04","tpage_name":"sewd-vis-pris"}],[16121896,{"idx":40,"name":"citywide-wall-greybolts","tpage_name":"ctyfarma-vis-tfrag"}],[49283139,{"idx":67,"name":"sew-wallswitch-metal-03","tpage_name":"sewd-vis-pris"}],[16121895,{"idx":39,"name":"farm-grass-ground-01","tpage_name":"ctyfarma-vis-tfrag"}],[67960838,{"idx":6,"name":"wang_4","tpage_name":"wasintro-hfrag"}],[49283138,{"idx":66,"name":"sew-wallswitch-metal-02","tpage_name":"sewd-vis-pris"}],[16121894,{"idx":38,"name":"city-farm-mark-roof-tiles","tpage_name":"ctyfarma-vis-tfrag"}],[16121893,{"idx":37,"name":"city-farm-road-01","tpage_name":"ctyfarma-vis-tfrag"}],[67960836,{"idx":4,"name":"wang_2","tpage_name":"wasintro-hfrag"}],[49283136,{"idx":64,"name":"sewer-pipe-small-01","tpage_name":"sewd-vis-pris"}],[16121892,{"idx":36,"name":"city-farm-mar-main","tpage_name":"ctyfarma-vis-tfrag"}],[67960835,{"idx":3,"name":"wang_1","tpage_name":"wasintro-hfrag"}],[49283135,{"idx":63,"name":"sewer-pipe-rim-07","tpage_name":"sewd-vis-pris"}],[16121891,{"idx":35,"name":"city-farm-cartwheeltread","tpage_name":"ctyfarma-vis-tfrag"}],[16121890,{"idx":34,"name":"city-farm-cartwheeltrim","tpage_name":"ctyfarma-vis-tfrag"}],[16121889,{"idx":33,"name":"city-farm-cartbase","tpage_name":"ctyfarma-vis-tfrag"}],[16121888,{"idx":32,"name":"city-ind-bigpipe-siding","tpage_name":"ctyfarma-vis-tfrag"}],[49283111,{"idx":39,"name":"sew-laserturret-top","tpage_name":"sewd-vis-pris"}],[16121867,{"idx":11,"name":"city-farm-tree-bark-01","tpage_name":"ctyfarma-vis-tfrag"}],[49283110,{"idx":38,"name":"sew-laserturret-red","tpage_name":"sewd-vis-pris"}],[16121866,{"idx":10,"name":"city-farm-aquaduct-glass-02","tpage_name":"ctyfarma-vis-tfrag"}],[49283109,{"idx":37,"name":"sew-laserturret-pole","tpage_name":"sewd-vis-pris"}],[49283108,{"idx":36,"name":"sew-laserturret-center","tpage_name":"sewd-vis-pris"}],[49283107,{"idx":35,"name":"sew-laserturret-bot-lod1","tpage_name":"sewd-vis-pris"}],[49283106,{"idx":34,"name":"sew-laserturret-bot","tpage_name":"sewd-vis-pris"}],[49283105,{"idx":33,"name":"sew-laserturret-3","tpage_name":"sewd-vis-pris"}],[49283104,{"idx":32,"name":"sew-laserturret-2","tpage_name":"sewd-vis-pris"}],[49283103,{"idx":31,"name":"sew-laserturret-1","tpage_name":"sewd-vis-pris"}],[16121859,{"idx":3,"name":"city-farm-wall-top","tpage_name":"ctyfarma-vis-tfrag"}],[49283102,{"idx":30,"name":"sew-gun-round-cap-01","tpage_name":"sewd-vis-pris"}],[16121858,{"idx":2,"name":"city-farm-stonewall-base-01","tpage_name":"ctyfarma-vis-tfrag"}],[49283101,{"idx":29,"name":"sew-gun-round-02","tpage_name":"sewd-vis-pris"}],[16121857,{"idx":1,"name":"city-farm-stone-wall-01","tpage_name":"ctyfarma-vis-tfrag"}],[49283100,{"idx":28,"name":"sew-gun-round-01","tpage_name":"sewd-vis-pris"}],[16121856,{"idx":0,"name":"city-farm-stonewall-bricks","tpage_name":"ctyfarma-vis-tfrag"}],[49283099,{"idx":27,"name":"sew-gun-rim-05","tpage_name":"sewd-vis-pris"}],[49283098,{"idx":26,"name":"sew-gun-rim-04","tpage_name":"sewd-vis-pris"}],[49283097,{"idx":25,"name":"sew-gun-rim-03","tpage_name":"sewd-vis-pris"}],[49283096,{"idx":24,"name":"sew-gun-rim-02","tpage_name":"sewd-vis-pris"}],[49283095,{"idx":23,"name":"sew-gun-rim-01","tpage_name":"sewd-vis-pris"}],[49283094,{"idx":22,"name":"sew-gun-panel-06","tpage_name":"sewd-vis-pris"}],[49283093,{"idx":21,"name":"sew-gun-panel-05","tpage_name":"sewd-vis-pris"}],[49283092,{"idx":20,"name":"sew-gun-panel-03","tpage_name":"sewd-vis-pris"}],[49283091,{"idx":19,"name":"sew-gun-panel-02","tpage_name":"sewd-vis-pris"}],[49283090,{"idx":18,"name":"sew-gun-panel-01","tpage_name":"sewd-vis-pris"}],[100925461,{"idx":21,"name":"king-precursermetal-plain","tpage_name":"ljkdmpk-pris2"}],[49283089,{"idx":17,"name":"sew-gun-drum-01","tpage_name":"sewd-vis-pris"}],[100925460,{"idx":20,"name":"king-precursermetal-decor","tpage_name":"ljkdmpk-pris2"}],[49283088,{"idx":16,"name":"sew-gun-body-01","tpage_name":"sewd-vis-pris"}],[100925459,{"idx":19,"name":"king-lgblackstrap","tpage_name":"ljkdmpk-pris2"}],[49283087,{"idx":15,"name":"sew-gun-barrel-01","tpage_name":"sewd-vis-pris"}],[100925458,{"idx":18,"name":"king-leg","tpage_name":"ljkdmpk-pris2"}],[49283086,{"idx":14,"name":"common-black","tpage_name":"sewd-vis-pris"}],[71630871,{"idx":23,"name":"king-precursermetal-trim2","tpage_name":"ldampksm-pris2"}],[49217549,{"idx":13,"name":"sewer-water-wave-01-c","tpage_name":"sewc-vis-water"}],[49217543,{"idx":7,"name":"sewer-water-highlight-01-c-dest","tpage_name":"sewc-vis-water"}],[49217542,{"idx":6,"name":"sewer-water-01-c","tpage_name":"sewc-vis-water"}],[49217541,{"idx":5,"name":"sewer-waterfall-02-c","tpage_name":"sewc-vis-water"}],[49217540,{"idx":4,"name":"sewer-water-01-c-dest","tpage_name":"sewc-vis-water"}],[49152017,{"idx":17,"name":"sew-wallswitch-red-01","tpage_name":"sewd-vis-water"}],[49152016,{"idx":16,"name":"sew-wallswitch-green-01","tpage_name":"sewd-vis-water"}],[49152015,{"idx":15,"name":"sewer-water-wave-02-d-dest","tpage_name":"sewd-vis-water"}],[49152014,{"idx":14,"name":"sewer-water-highlight-01-d","tpage_name":"sewd-vis-water"}],[49152013,{"idx":13,"name":"sewer-water-wave-02-d","tpage_name":"sewd-vis-water"}],[49152006,{"idx":6,"name":"sewer-water-wave-01-d","tpage_name":"sewd-vis-water"}],[49152001,{"idx":1,"name":"sewer-water-01-d-dest","tpage_name":"sewd-vis-water"}],[49021007,{"idx":79,"name":"sewer-stone-newarch-01","tpage_name":"sewe-vis-tfrag"}],[49021006,{"idx":78,"name":"sewer-metal-edge-01","tpage_name":"sewe-vis-tfrag"}],[71434245,{"idx":5,"name":"wstd-spear02","tpage_name":"wasstadc-tfrag"}],[49021005,{"idx":77,"name":"sewer-pipe-rim-06","tpage_name":"sewe-vis-tfrag"}],[71434244,{"idx":4,"name":"wstd-spear01","tpage_name":"wasstadc-tfrag"}],[49021004,{"idx":76,"name":"sewer-red-light-02","tpage_name":"sewe-vis-tfrag"}],[49021003,{"idx":75,"name":"sewer-red-light-01","tpage_name":"sewe-vis-tfrag"}],[62717980,{"idx":28,"name":"darkguard-shouldershield","tpage_name":"ctypesa-pris"}],[49021000,{"idx":72,"name":"sewer-metal-02","tpage_name":"sewe-vis-tfrag"}],[49020996,{"idx":68,"name":"sewer-flat-pipe-01-red","tpage_name":"sewe-vis-tfrag"}],[62717971,{"idx":19,"name":"cguardgame-metallight-plain","tpage_name":"ctypesa-pris"}],[49020991,{"idx":63,"name":"sewer-black","tpage_name":"sewe-vis-tfrag"}],[62717970,{"idx":18,"name":"cguardgame-metallight-02","tpage_name":"ctypesa-pris"}],[49020990,{"idx":62,"name":"sewer-brick-block-10","tpage_name":"sewe-vis-tfrag"}],[62717969,{"idx":17,"name":"cguardgame-metallight-01small","tpage_name":"ctypesa-pris"}],[49020989,{"idx":61,"name":"sewer-brick-block-11","tpage_name":"sewe-vis-tfrag"}],[62717968,{"idx":16,"name":"cguardgame-metalered-01","tpage_name":"ctypesa-pris"}],[49020988,{"idx":60,"name":"sewer-stone-arch-02","tpage_name":"sewe-vis-tfrag"}],[62717967,{"idx":15,"name":"cguardgame-metaledark-02","tpage_name":"ctypesa-pris"}],[49020987,{"idx":59,"name":"sewer-scaffold-01","tpage_name":"sewe-vis-tfrag"}],[62717966,{"idx":14,"name":"cguardgame-jacketstrap","tpage_name":"ctypesa-pris"}],[49020986,{"idx":58,"name":"sewer-plate-06","tpage_name":"sewe-vis-tfrag"}],[62717965,{"idx":13,"name":"cguardgame-guntube","tpage_name":"ctypesa-pris"}],[49020985,{"idx":57,"name":"sewer-metal-trim-02","tpage_name":"sewe-vis-tfrag"}],[62717964,{"idx":12,"name":"cguardgame-gunmetaldark2","tpage_name":"ctypesa-pris"}],[49020984,{"idx":56,"name":"sewer-light-flourescent-01","tpage_name":"sewe-vis-tfrag"}],[62717962,{"idx":10,"name":"cguardgame-gunleather","tpage_name":"ctypesa-pris"}],[63963142,{"idx":6,"name":"wang_mip","tpage_name":"desert-hfrag"}],[49020982,{"idx":54,"name":"sewer-round-02","tpage_name":"sewe-vis-tfrag"}],[62717961,{"idx":9,"name":"cguardgame-gunhandle","tpage_name":"ctypesa-pris"}],[63963141,{"idx":5,"name":"wang_black","tpage_name":"desert-hfrag"}],[49020981,{"idx":53,"name":"sewer-round-03","tpage_name":"sewe-vis-tfrag"}],[62717960,{"idx":8,"name":"cguardgame-gunboltlight","tpage_name":"ctypesa-pris"}],[63963140,{"idx":4,"name":"wang_4","tpage_name":"desert-hfrag"}],[49020980,{"idx":52,"name":"sewer-round-01","tpage_name":"sewe-vis-tfrag"}],[62717959,{"idx":7,"name":"cguardgame-greyheadshield","tpage_name":"ctypesa-pris"}],[63963139,{"idx":3,"name":"wang_3","tpage_name":"desert-hfrag"}],[49020979,{"idx":51,"name":"sewer-lip-01","tpage_name":"sewe-vis-tfrag"}],[71434294,{"idx":54,"name":"wstd-scaffold-wall-01","tpage_name":"wasstadc-tfrag"}],[49020971,{"idx":43,"name":"sewer-concrete-edge-01","tpage_name":"sewe-vis-tfrag"}],[49020970,{"idx":42,"name":"common-black","tpage_name":"sewe-vis-tfrag"}],[49020969,{"idx":41,"name":"sewer-plate-03","tpage_name":"sewe-vis-tfrag"}],[49020968,{"idx":40,"name":"sewer-plate-02","tpage_name":"sewe-vis-tfrag"}],[49020967,{"idx":39,"name":"sewer-metal-block-06","tpage_name":"sewe-vis-tfrag"}],[49020966,{"idx":38,"name":"sewer-hall-light-01","tpage_name":"sewe-vis-tfrag"}],[55246865,{"idx":17,"name":"wascity-awning-b","tpage_name":"wascityb-vis-shrub"}],[49020965,{"idx":37,"name":"sewer-plate-04","tpage_name":"sewe-vis-tfrag"}],[55246864,{"idx":16,"name":"wascity-ground-stain-satellite-01","tpage_name":"wascityb-vis-shrub"}],[49020964,{"idx":36,"name":"sewer-pipe-rim-07","tpage_name":"sewe-vis-tfrag"}],[55246863,{"idx":15,"name":"wascity-cactus-flower","tpage_name":"wascityb-vis-shrub"}],[49020963,{"idx":35,"name":"sewer-pipe-rim-10","tpage_name":"sewe-vis-tfrag"}],[55246862,{"idx":14,"name":"wascity-cactus-green","tpage_name":"wascityb-vis-shrub"}],[49020962,{"idx":34,"name":"sewer-pipe-02-edge-01","tpage_name":"sewe-vis-tfrag"}],[55246861,{"idx":13,"name":"wascitya-stone-top","tpage_name":"wascityb-vis-shrub"}],[49020961,{"idx":33,"name":"sewer-pipe-rim-01","tpage_name":"sewe-vis-tfrag"}],[71434282,{"idx":42,"name":"wstd-fight-plat-lrg-floor-01","tpage_name":"wasstadc-tfrag"}],[55246860,{"idx":12,"name":"wascity-overlay-crack","tpage_name":"wascityb-vis-shrub"}],[49020960,{"idx":32,"name":"sewer-pipe-01","tpage_name":"sewe-vis-tfrag"}],[55246859,{"idx":11,"name":"wascity-overlay-tribal-3","tpage_name":"wascityb-vis-shrub"}],[49020959,{"idx":31,"name":"sewer-pipe-rim-05b","tpage_name":"sewe-vis-tfrag"}],[55246858,{"idx":10,"name":"wascity-overlay-tribal-1","tpage_name":"wascityb-vis-shrub"}],[49020958,{"idx":30,"name":"sewer-pipe-rim-05","tpage_name":"sewe-vis-tfrag"}],[55246856,{"idx":8,"name":"wascity-shrub-orange-01","tpage_name":"wascityb-vis-shrub"}],[49020956,{"idx":28,"name":"sewer-brick-block-02","tpage_name":"sewe-vis-tfrag"}],[55246855,{"idx":7,"name":"wascity-ditch-wall-top-to-ground","tpage_name":"wascityb-vis-shrub"}],[49020955,{"idx":27,"name":"sewer-pool-rim-02","tpage_name":"sewe-vis-tfrag"}],[55246852,{"idx":4,"name":"wascity-blotch-withstreaks-01","tpage_name":"wascityb-vis-shrub"}],[49020952,{"idx":24,"name":"sewer-concrete-edge-02","tpage_name":"sewe-vis-tfrag"}],[55246851,{"idx":3,"name":"wascity-overlay-bullethole-c","tpage_name":"wascityb-vis-shrub"}],[49020951,{"idx":23,"name":"sewer-metal-03","tpage_name":"sewe-vis-tfrag"}],[55246850,{"idx":2,"name":"wascity-overlay-bullethole-b","tpage_name":"wascityb-vis-shrub"}],[49020950,{"idx":22,"name":"sewer-pipe-small-02","tpage_name":"sewe-vis-tfrag"}],[55246849,{"idx":1,"name":"wascity-overlay-bullethole-a","tpage_name":"wascityb-vis-shrub"}],[49020949,{"idx":21,"name":"sewer-pipe-rim-09","tpage_name":"sewe-vis-tfrag"}],[55246848,{"idx":0,"name":"wascity-stain-window-01","tpage_name":"wascityb-vis-shrub"}],[49020948,{"idx":20,"name":"sewer-pipe-02","tpage_name":"sewe-vis-tfrag"}],[49020946,{"idx":18,"name":"sewer-mantel-02","tpage_name":"sewe-vis-tfrag"}],[49020945,{"idx":17,"name":"sewer-mantel-01","tpage_name":"sewe-vis-tfrag"}],[49020944,{"idx":16,"name":"sewer-concrete-block-02","tpage_name":"sewe-vis-tfrag"}],[49020943,{"idx":15,"name":"sewer-block-02","tpage_name":"sewe-vis-tfrag"}],[71434264,{"idx":24,"name":"wstd-stands-black","tpage_name":"wasstadc-tfrag"}],[49020942,{"idx":14,"name":"sewer-brick-block-04","tpage_name":"sewe-vis-tfrag"}],[49020941,{"idx":13,"name":"sewer-brick-block-01","tpage_name":"sewe-vis-tfrag"}],[49020940,{"idx":12,"name":"sewer-stone-arch-01","tpage_name":"sewe-vis-tfrag"}],[49020939,{"idx":11,"name":"sewer-brick-block-03","tpage_name":"sewe-vis-tfrag"}],[49020937,{"idx":9,"name":"sewer-block-01","tpage_name":"sewe-vis-tfrag"}],[49020936,{"idx":8,"name":"sewer-plate-05-hitweak","tpage_name":"sewe-vis-tfrag"}],[49020935,{"idx":7,"name":"sewer-pipe-rim-08","tpage_name":"sewe-vis-tfrag"}],[49020934,{"idx":6,"name":"sewer-pipe-rim-03","tpage_name":"sewe-vis-tfrag"}],[49020933,{"idx":5,"name":"sewer-plate-05","tpage_name":"sewe-vis-tfrag"}],[49020932,{"idx":4,"name":"sewer-metal-block-04","tpage_name":"sewe-vis-tfrag"}],[49020930,{"idx":2,"name":"sewer-metal-block-01","tpage_name":"sewe-vis-tfrag"}],[48955397,{"idx":5,"name":"sewer-metal-01","tpage_name":"sewd-vis-shrub"}],[48955394,{"idx":2,"name":"sewer-moss-01","tpage_name":"sewd-vis-shrub"}],[71303176,{"idx":8,"name":"sig-flask","tpage_name":"ldamsig-pris2"}],[73793536,{"idx":0,"name":"sewer-waterfall-02-g","tpage_name":"sewg-vis-water"}],[48889936,{"idx":80,"name":"sewer-block-01-hitweak","tpage_name":"sewd-vis-tfrag"}],[71303175,{"idx":7,"name":"sig-facert","tpage_name":"ldamsig-pris2"}],[48889935,{"idx":79,"name":"sewer-brick-block-04-hitweak","tpage_name":"sewd-vis-tfrag"}],[71303174,{"idx":6,"name":"sig-faceleft","tpage_name":"ldamsig-pris2"}],[48889934,{"idx":78,"name":"sewer-lip-01-hitweak","tpage_name":"sewd-vis-tfrag"}],[71303173,{"idx":5,"name":"sig-eyelid","tpage_name":"ldamsig-pris2"}],[48889933,{"idx":77,"name":"sewer-stone-arch-01","tpage_name":"sewd-vis-tfrag"}],[71303172,{"idx":4,"name":"sig-eye","tpage_name":"ldamsig-pris2"}],[48889932,{"idx":76,"name":"sewer-flat-pipe-01-hitweak","tpage_name":"sewd-vis-tfrag"}],[71303171,{"idx":3,"name":"sig-belt","tpage_name":"ldamsig-pris2"}],[48889931,{"idx":75,"name":"sewer-metal-block-04-hitweak","tpage_name":"sewd-vis-tfrag"}],[71303169,{"idx":1,"name":"charHOLD","tpage_name":"ldamsig-pris2"}],[48889929,{"idx":73,"name":"sewer-red-light-01","tpage_name":"sewd-vis-tfrag"}],[55115817,{"idx":41,"name":"wascity-palm-leaf-worn","tpage_name":"wascityb-vis-tfrag"}],[48889917,{"idx":61,"name":"sewer-light-flourescent-01","tpage_name":"sewd-vis-tfrag"}],[71303230,{"idx":62,"name":"king-wristband","tpage_name":"ldamsig-pris2"}],[71303228,{"idx":60,"name":"king-wrap","tpage_name":"ldamsig-pris2"}],[71303227,{"idx":59,"name":"king-vestback","tpage_name":"ldamsig-pris2"}],[71303225,{"idx":57,"name":"king-thinstrap","tpage_name":"ldamsig-pris2"}],[71303224,{"idx":56,"name":"king-teeth","tpage_name":"ldamsig-pris2"}],[71303221,{"idx":53,"name":"king-precursermetal-trimbolt","tpage_name":"ldamsig-pris2"}],[55115799,{"idx":23,"name":"wascitya-stone-bottom","tpage_name":"wascityb-vis-tfrag"}],[48889899,{"idx":43,"name":"sewer-pipe-rim-06","tpage_name":"sewd-vis-tfrag"}],[71303220,{"idx":52,"name":"king-precursermetal-trim2","tpage_name":"ldamsig-pris2"}],[71303219,{"idx":51,"name":"king-precursermetal-trim","tpage_name":"ldamsig-pris2"}],[71303218,{"idx":50,"name":"king-precursermetal-plain","tpage_name":"ldamsig-pris2"}],[71303217,{"idx":49,"name":"king-precursermetal-decor","tpage_name":"ldamsig-pris2"}],[71303216,{"idx":48,"name":"king-lgblackstrap","tpage_name":"ldamsig-pris2"}],[106364965,{"idx":37,"name":"veger-whitecloth","tpage_name":"mined-pris2"}],[71303214,{"idx":46,"name":"king-iris","tpage_name":"ldamsig-pris2"}],[106364963,{"idx":35,"name":"veger-walkingstick-02","tpage_name":"mined-pris2"}],[55115792,{"idx":16,"name":"wascity-stonewall-bricks","tpage_name":"wascityb-vis-tfrag"}],[48889892,{"idx":36,"name":"sewer-hall-light-01","tpage_name":"sewd-vis-tfrag"}],[71303213,{"idx":45,"name":"king-horn","tpage_name":"ldamsig-pris2"}],[106364962,{"idx":34,"name":"veger-walkingstick-01","tpage_name":"mined-pris2"}],[55115791,{"idx":15,"name":"wascity-stucco-wall-bleached-cut-01","tpage_name":"wascityb-vis-tfrag"}],[48889891,{"idx":35,"name":"sewer-mantel-02","tpage_name":"sewd-vis-tfrag"}],[71303212,{"idx":44,"name":"king-hand","tpage_name":"ldamsig-pris2"}],[106364961,{"idx":33,"name":"veger-vest","tpage_name":"mined-pris2"}],[71303211,{"idx":43,"name":"king-hair","tpage_name":"ldamsig-pris2"}],[106364960,{"idx":32,"name":"veger-teeth","tpage_name":"mined-pris2"}],[55115789,{"idx":13,"name":"wascity-stucco-wall-bleached-01","tpage_name":"wascityb-vis-tfrag"}],[48889889,{"idx":33,"name":"sewer-metal-block-06","tpage_name":"sewd-vis-tfrag"}],[71303210,{"idx":42,"name":"king-greenmetalplain","tpage_name":"ldamsig-pris2"}],[106364959,{"idx":31,"name":"veger-stickwrap","tpage_name":"mined-pris2"}],[71303209,{"idx":41,"name":"king-greenmetal","tpage_name":"ldamsig-pris2"}],[106364958,{"idx":30,"name":"veger-sleevelower","tpage_name":"mined-pris2"}],[71303208,{"idx":40,"name":"king-finger","tpage_name":"ldamsig-pris2"}],[106364957,{"idx":29,"name":"veger-sleeve","tpage_name":"mined-pris2"}],[55115786,{"idx":10,"name":"wascity-wallspike-01","tpage_name":"wascityb-vis-tfrag"}],[48889886,{"idx":30,"name":"sewer-metal-03","tpage_name":"sewd-vis-tfrag"}],[71303207,{"idx":39,"name":"king-face-01","tpage_name":"ldamsig-pris2"}],[73203712,{"idx":0,"name":"fora-dirt","tpage_name":"forestb-vis-alpha"}],[106364956,{"idx":28,"name":"veger-shoulderplatemetal","tpage_name":"mined-pris2"}],[55115785,{"idx":9,"name":"wascity-wallspike-2-ground-01","tpage_name":"wascityb-vis-tfrag"}],[48889885,{"idx":29,"name":"sewer-pipe-02-edge-01","tpage_name":"sewd-vis-tfrag"}],[71303206,{"idx":38,"name":"king-earing","tpage_name":"ldamsig-pris2"}],[106364955,{"idx":27,"name":"veger-shoulderplate","tpage_name":"mined-pris2"}],[55115784,{"idx":8,"name":"wascity-steel-bar","tpage_name":"wascityb-vis-tfrag"}],[48889884,{"idx":28,"name":"sewer-pipe-rim-01","tpage_name":"sewd-vis-tfrag"}],[106364954,{"idx":26,"name":"veger-shoebottom","tpage_name":"mined-pris2"}],[55115783,{"idx":7,"name":"wascity-greenmetal-tube","tpage_name":"wascityb-vis-tfrag"}],[48889883,{"idx":27,"name":"sewer-pipe-01","tpage_name":"sewd-vis-tfrag"}],[106364953,{"idx":25,"name":"veger-scarf","tpage_name":"mined-pris2"}],[55115782,{"idx":6,"name":"wascity-metal-spike-01","tpage_name":"wascityb-vis-tfrag"}],[48889882,{"idx":26,"name":"sewer-brick-block-06","tpage_name":"sewd-vis-tfrag"}],[106364950,{"idx":22,"name":"veger-pages","tpage_name":"mined-pris2"}],[106364948,{"idx":20,"name":"veger-iris","tpage_name":"mined-pris2"}],[106364947,{"idx":19,"name":"veger-hand","tpage_name":"mined-pris2"}],[106364946,{"idx":18,"name":"veger-hair","tpage_name":"mined-pris2"}],[106364945,{"idx":17,"name":"veger-gold","tpage_name":"mined-pris2"}],[106364944,{"idx":16,"name":"veger-fingertop","tpage_name":"mined-pris2"}],[106364943,{"idx":15,"name":"veger-fingerbottom","tpage_name":"mined-pris2"}],[106364942,{"idx":14,"name":"veger-face","tpage_name":"mined-pris2"}],[57081969,{"idx":113,"name":"palm-speaker","tpage_name":"waspala-pris"}],[75759669,{"idx":53,"name":"onin-eye","tpage_name":"onintent-pris"}],[81985569,{"idx":33,"name":"marauder-skirt-02","tpage_name":"wasstadc-pris"}],[26542187,{"idx":107,"name":"wstd-stands-plateedge","tpage_name":"wasstada-tfrag"}],[26542186,{"idx":106,"name":"wstd-spear02","tpage_name":"wasstada-tfrag"}],[81985567,{"idx":31,"name":"marauder-skin-nipple","tpage_name":"wasstadc-pris"}],[26542185,{"idx":105,"name":"wstd-throne-wall02","tpage_name":"wasstada-tfrag"}],[26542184,{"idx":104,"name":"wstd-throne-floor02","tpage_name":"wasstada-tfrag"}],[115081306,{"idx":90,"name":"vehicle-wheel-01","tpage_name":"desboss1-pris"}],[115081305,{"idx":89,"name":"vehicle-snake-tread-02","tpage_name":"desboss1-pris"}],[115081303,{"idx":87,"name":"jakchires-teeth","tpage_name":"desboss1-pris"}],[53739533,{"idx":13,"name":"cguardgame-guntube","tpage_name":"forestb-vis-pris"}],[48758813,{"idx":29,"name":"sewer-pipe-02-edge-01","tpage_name":"sewc-vis-tfrag"}],[115081301,{"idx":85,"name":"jakchires-shoemetal","tpage_name":"desboss1-pris"}],[15597568,{"idx":0,"name":"map-ctyfarma","tpage_name":"ctyfarma-minimap"}],[115081300,{"idx":84,"name":"jakchires-shoebottom","tpage_name":"desboss1-pris"}],[115081299,{"idx":83,"name":"jakchires-precarmor-01","tpage_name":"desboss1-pris"}],[115081298,{"idx":82,"name":"jakchires-pants","tpage_name":"desboss1-pris"}],[11796555,{"idx":75,"name":"city-base-vent-01","tpage_name":"ctyinda-vis-tfrag"}],[115081297,{"idx":81,"name":"jakchires-lightbrownspat","tpage_name":"desboss1-pris"}],[11796554,{"idx":74,"name":"city-ind-ventglow","tpage_name":"ctyinda-vis-tfrag"}],[115081296,{"idx":80,"name":"jakchires-leatherpouch","tpage_name":"desboss1-pris"}],[53739527,{"idx":7,"name":"cguardgame-greyheadshield","tpage_name":"forestb-vis-pris"}],[48758807,{"idx":23,"name":"sewer-block-01","tpage_name":"sewc-vis-tfrag"}],[11796553,{"idx":73,"name":"city-red-light-monster","tpage_name":"ctyinda-vis-tfrag"}],[115081295,{"idx":79,"name":"jakchires-jacket","tpage_name":"desboss1-pris"}],[53739526,{"idx":6,"name":"cguardgame-face","tpage_name":"forestb-vis-pris"}],[48758806,{"idx":22,"name":"sewer-block-02","tpage_name":"sewc-vis-tfrag"}],[11796552,{"idx":72,"name":"city-yellow-light-monster","tpage_name":"ctyinda-vis-tfrag"}],[115081294,{"idx":78,"name":"jakchires-horn","tpage_name":"desboss1-pris"}],[53739525,{"idx":5,"name":"cguardgame-ear","tpage_name":"forestb-vis-pris"}],[48758805,{"idx":21,"name":"sewer-pipe-02","tpage_name":"sewc-vis-tfrag"}],[11796551,{"idx":71,"name":"city-ind-palace-cable-section","tpage_name":"ctyinda-vis-tfrag"}],[115081293,{"idx":77,"name":"jakchires-hair","tpage_name":"desboss1-pris"}],[11796550,{"idx":70,"name":"city-ind-palace-cable-section-band","tpage_name":"ctyinda-vis-tfrag"}],[115081292,{"idx":76,"name":"jakchires-glovetop","tpage_name":"desboss1-pris"}],[53739523,{"idx":3,"name":"cguardgame-boottop","tpage_name":"forestb-vis-pris"}],[48758803,{"idx":19,"name":"sewer-concrete-edge-02","tpage_name":"sewc-vis-tfrag"}],[11796549,{"idx":69,"name":"cty-ind-ground01","tpage_name":"ctyinda-vis-tfrag"}],[115081291,{"idx":75,"name":"jakchires-facert","tpage_name":"desboss1-pris"}],[11796547,{"idx":67,"name":"city-ind-buldge-light-self-illuminated-03","tpage_name":"ctyinda-vis-tfrag"}],[115081289,{"idx":73,"name":"jakchires-eyelid","tpage_name":"desboss1-pris"}],[53739520,{"idx":0,"name":"cguardgame-armshield","tpage_name":"forestb-vis-pris"}],[48758800,{"idx":16,"name":"sewer-concrete-edge-01","tpage_name":"sewc-vis-tfrag"}],[115081288,{"idx":72,"name":"jakchires-eyebrow","tpage_name":"desboss1-pris"}],[48758799,{"idx":15,"name":"common-black","tpage_name":"sewc-vis-tfrag"}],[11796545,{"idx":65,"name":"sewer-metal-block-01","tpage_name":"ctyinda-vis-tfrag"}],[115081287,{"idx":71,"name":"jakchires-eye","tpage_name":"desboss1-pris"}],[48758798,{"idx":14,"name":"sewer-hall-light-01","tpage_name":"sewc-vis-tfrag"}],[115081286,{"idx":70,"name":"jakchires-clips","tpage_name":"desboss1-pris"}],[48758797,{"idx":13,"name":"sewer-pipe-rim-08","tpage_name":"sewc-vis-tfrag"}],[135004165,{"idx":5,"name":"security-env-dest","tpage_name":"rubbleb-vis-water"}],[115081285,{"idx":69,"name":"jakchires-chestplate","tpage_name":"desboss1-pris"}],[48758796,{"idx":12,"name":"sewer-metal-03","tpage_name":"sewc-vis-tfrag"}],[135004164,{"idx":4,"name":"security-dot-dest","tpage_name":"rubbleb-vis-water"}],[115081284,{"idx":68,"name":"jakchires-brwnleather","tpage_name":"desboss1-pris"}],[48758795,{"idx":11,"name":"sewer-plate-03","tpage_name":"sewc-vis-tfrag"}],[135004163,{"idx":3,"name":"rub-water-destb","tpage_name":"rubbleb-vis-water"}],[115081283,{"idx":67,"name":"jakchires-brownstrap","tpage_name":"desboss1-pris"}],[48758794,{"idx":10,"name":"sewer-plate-02","tpage_name":"sewc-vis-tfrag"}],[135004162,{"idx":2,"name":"rub-waterb","tpage_name":"rubbleb-vis-water"}],[115081282,{"idx":66,"name":"jakchires-blackstrap","tpage_name":"desboss1-pris"}],[48758792,{"idx":8,"name":"sewer-pipe-rim-03","tpage_name":"sewc-vis-tfrag"}],[115081280,{"idx":64,"name":"jakc-wristband-a2","tpage_name":"desboss1-pris"}],[48758791,{"idx":7,"name":"sewer-pipe-rim-07","tpage_name":"sewc-vis-tfrag"}],[115081279,{"idx":63,"name":"jakc-wraps","tpage_name":"desboss1-pris"}],[48758790,{"idx":6,"name":"sewer-pipe-rim-05b","tpage_name":"sewc-vis-tfrag"}],[115081278,{"idx":62,"name":"jakc-waistband2","tpage_name":"desboss1-pris"}],[48758789,{"idx":5,"name":"sewer-plate-04","tpage_name":"sewc-vis-tfrag"}],[115081277,{"idx":61,"name":"jakc-skirt","tpage_name":"desboss1-pris"}],[48758788,{"idx":4,"name":"sewer-metal-block-01","tpage_name":"sewc-vis-tfrag"}],[11796534,{"idx":54,"name":"city-ind-grnd-cobl-02","tpage_name":"ctyinda-vis-tfrag"}],[115081276,{"idx":60,"name":"jakc-scarfhanging","tpage_name":"desboss1-pris"}],[48758787,{"idx":3,"name":"sewer-pipe-rim-05","tpage_name":"sewc-vis-tfrag"}],[11796533,{"idx":53,"name":"city-ind-grnd-cobl-01","tpage_name":"ctyinda-vis-tfrag"}],[115081275,{"idx":59,"name":"jakc-scarf","tpage_name":"desboss1-pris"}],[48758786,{"idx":2,"name":"sewer-metal-block-04","tpage_name":"sewc-vis-tfrag"}],[11796532,{"idx":52,"name":"city-ind-litwindow-TOP-04","tpage_name":"ctyinda-vis-tfrag"}],[115081274,{"idx":58,"name":"jakc-lens","tpage_name":"desboss1-pris"}],[48758785,{"idx":1,"name":"sewer-plate-05","tpage_name":"sewc-vis-tfrag"}],[115081273,{"idx":57,"name":"jakc-gogglemetal","tpage_name":"desboss1-pris"}],[115081272,{"idx":56,"name":"jakc-chestplate-straps","tpage_name":"desboss1-pris"}],[60948499,{"idx":19,"name":"minc-strut-01","tpage_name":"minec-vis-tfrag"}],[10879079,{"idx":103,"name":"cityslumc-awning-HI","tpage_name":"ctyslumb-vis-tfrag"}],[14680089,{"idx":25,"name":"jakchires-chestplate","tpage_name":"ctygenb-vis-pris"}],[48627785,{"idx":73,"name":"sewer-red-light-01","tpage_name":"sewb-vis-tfrag"}],[60948498,{"idx":18,"name":"minc-yel-safe-paint-rust01","tpage_name":"minec-vis-tfrag"}],[14680088,{"idx":24,"name":"jakchires-brwnleather","tpage_name":"ctygenb-vis-pris"}],[10879078,{"idx":102,"name":"cityslumc-purple-column","tpage_name":"ctyslumb-vis-tfrag"}],[106954783,{"idx":31,"name":"wascity-metal-ladder-rung","tpage_name":"volcanoa-vis-tfrag"}],[99483703,{"idx":55,"name":"dp-bipedal-chest-01","tpage_name":"lformach-vis-pris"}],[48627784,{"idx":72,"name":"sewer-scaffold-03","tpage_name":"sewb-vis-tfrag"}],[16121865,{"idx":9,"name":"city-farm-bigpipe-01","tpage_name":"ctyfarma-vis-tfrag"}],[17367045,{"idx":5,"name":"map-ctyportf","tpage_name":"ctyport-minimap"}],[60948497,{"idx":17,"name":"minc-blue-paint-rust04","tpage_name":"minec-vis-tfrag"}],[14680087,{"idx":23,"name":"jakchires-brownstrap","tpage_name":"ctygenb-vis-pris"}],[10879077,{"idx":101,"name":"cityslumc-purple-column-2","tpage_name":"ctyslumb-vis-tfrag"}],[106954782,{"idx":30,"name":"wascity-wood-plain","tpage_name":"volcanoa-vis-tfrag"}],[99483702,{"idx":54,"name":"dp-bipedal-backhand-01","tpage_name":"lformach-vis-pris"}],[48627783,{"idx":71,"name":"sewer-metal-trim-01","tpage_name":"sewb-vis-tfrag"}],[16121864,{"idx":8,"name":"city-farm-metal-bracket-02","tpage_name":"ctyfarma-vis-tfrag"}],[17367044,{"idx":4,"name":"map-ctyporte","tpage_name":"ctyport-minimap"}],[16121863,{"idx":7,"name":"city-farm-smalldirt","tpage_name":"ctyfarma-vis-tfrag"}],[17367043,{"idx":3,"name":"map-ctyportd","tpage_name":"ctyport-minimap"}],[14680085,{"idx":21,"name":"jakchires-arm","tpage_name":"ctygenb-vis-pris"}],[10879075,{"idx":99,"name":"cityslumc-pinkish-purple","tpage_name":"ctyslumb-vis-tfrag"}],[94240801,{"idx":33,"name":"city-lowres-ind-wall-05","tpage_name":"intpfall-vis-tfrag"}],[60620941,{"idx":141,"name":"pecker-wingtop","tpage_name":"minea-vis-pris"}],[16121862,{"idx":6,"name":"city-farm-stone-border-02","tpage_name":"ctyfarma-vis-tfrag"}],[17367042,{"idx":2,"name":"map-ctyportc","tpage_name":"ctyport-minimap"}],[10879074,{"idx":98,"name":"cityslumc-little-gold","tpage_name":"ctyslumb-vis-tfrag"}],[94240800,{"idx":32,"name":"city-lowres-ind-wall-08","tpage_name":"intpfall-vis-tfrag"}],[60620940,{"idx":140,"name":"pecker-wingbottom","tpage_name":"minea-vis-pris"}],[16121861,{"idx":5,"name":"city-farm-black","tpage_name":"ctyfarma-vis-tfrag"}],[17367041,{"idx":1,"name":"map-ctyportb","tpage_name":"ctyport-minimap"}],[14680083,{"idx":19,"name":"jakc-wraps","tpage_name":"ctygenb-vis-pris"}],[10879073,{"idx":97,"name":"cityslumc-top-pillar","tpage_name":"ctyslumb-vis-tfrag"}],[94240799,{"idx":31,"name":"city-lowres-ind-wall-07","tpage_name":"intpfall-vis-tfrag"}],[60620939,{"idx":139,"name":"pecker-teeth","tpage_name":"minea-vis-pris"}],[16121860,{"idx":4,"name":"city-farm-sprinkle-metalbase","tpage_name":"ctyfarma-vis-tfrag"}],[17367040,{"idx":0,"name":"map-ctyporta","tpage_name":"ctyport-minimap"}],[14680082,{"idx":18,"name":"jakc-waistband2","tpage_name":"ctygenb-vis-pris"}],[10879072,{"idx":96,"name":"ctyslumc-wall-sliver","tpage_name":"ctyslumb-vis-tfrag"}],[94240798,{"idx":30,"name":"city-lowres-ind-wall-03","tpage_name":"intpfall-vis-tfrag"}],[60620938,{"idx":138,"name":"pecker-tail","tpage_name":"minea-vis-pris"}],[14680081,{"idx":17,"name":"jakc-scarf","tpage_name":"ctygenb-vis-pris"}],[10879071,{"idx":95,"name":"cityslumc-awning","tpage_name":"ctyslumb-vis-tfrag"}],[94240797,{"idx":29,"name":"city-lowres-port-roof","tpage_name":"intpfall-vis-tfrag"}],[60620937,{"idx":137,"name":"pecker-plume","tpage_name":"minea-vis-pris"}],[62193670,{"idx":6,"name":"bikecnosecone01","tpage_name":"ctycarb-pris"}],[57212950,{"idx":22,"name":"wascity-palace-siding-01","tpage_name":"waswide-vis-tfrag"}],[60948490,{"idx":10,"name":"minc-blue-paint-safe-rust04","tpage_name":"minec-vis-tfrag"}],[14680080,{"idx":16,"name":"jakc-lens","tpage_name":"ctygenb-vis-pris"}],[10879070,{"idx":94,"name":"city-tile","tpage_name":"ctyslumb-vis-tfrag"}],[94240796,{"idx":28,"name":"city-lowres-ind-wall-01","tpage_name":"intpfall-vis-tfrag"}],[60620936,{"idx":136,"name":"pecker-face","tpage_name":"minea-vis-pris"}],[62193668,{"idx":4,"name":"bikebside01","tpage_name":"ctycarb-pris"}],[57212948,{"idx":20,"name":"wascity-metal-door-01","tpage_name":"waswide-vis-tfrag"}],[60948488,{"idx":8,"name":"minc-yel-paint-rust01","tpage_name":"minec-vis-tfrag"}],[49741827,{"idx":3,"name":"airlock-door-metal2","tpage_name":"sewf-vis-pris"}],[14680078,{"idx":14,"name":"jakc-chestplate-straps","tpage_name":"ctygenb-vis-pris"}],[10879068,{"idx":92,"name":"cityslumc-wall-surface-01","tpage_name":"ctyslumb-vis-tfrag"}],[94240794,{"idx":26,"name":"palcab-lowres-mark-roof-01","tpage_name":"intpfall-vis-tfrag"}],[60620934,{"idx":134,"name":"pecker-body-01","tpage_name":"minea-vis-pris"}],[62193667,{"idx":3,"name":"bikebjets01","tpage_name":"ctycarb-pris"}],[57212947,{"idx":19,"name":"wascity-metal-fan","tpage_name":"waswide-vis-tfrag"}],[60948487,{"idx":7,"name":"minc-safe-plate-01","tpage_name":"minec-vis-tfrag"}],[14680077,{"idx":13,"name":"jakc-armor","tpage_name":"ctygenb-vis-pris"}],[10879067,{"idx":91,"name":"ctyslumc-roof","tpage_name":"ctyslumb-vis-tfrag"}],[94240793,{"idx":25,"name":"city-lowres-fort-red","tpage_name":"intpfall-vis-tfrag"}],[60620933,{"idx":133,"name":"minc-rust-03","tpage_name":"minea-vis-pris"}],[62193666,{"idx":2,"name":"bike-03","tpage_name":"ctycarb-pris"}],[57212946,{"idx":18,"name":"wascity-metal-indent","tpage_name":"waswide-vis-tfrag"}],[60948486,{"idx":6,"name":"minc-blue-paint-rust01","tpage_name":"minec-vis-tfrag"}],[62193665,{"idx":1,"name":"bike-02","tpage_name":"ctycarb-pris"}],[57212945,{"idx":17,"name":"wascity-outerwall-metal-d","tpage_name":"waswide-vis-tfrag"}],[60948485,{"idx":5,"name":"minc-blue-paint-rust02","tpage_name":"minec-vis-tfrag"}],[62193664,{"idx":0,"name":"bike-01","tpage_name":"ctycarb-pris"}],[60948484,{"idx":4,"name":"minc-rust-01","tpage_name":"minec-vis-tfrag"}],[61079570,{"idx":18,"name":"manta-gem-01","tpage_name":"minec-vis-pris"}],[48627770,{"idx":58,"name":"sewer-round-02","tpage_name":"sewb-vis-tfrag"}],[60948483,{"idx":3,"name":"minc-base-metal-platfrom-01","tpage_name":"minec-vis-tfrag"}],[61079569,{"idx":17,"name":"manta-eye-01","tpage_name":"minec-vis-pris"}],[48627769,{"idx":57,"name":"sewer-round-03","tpage_name":"sewb-vis-tfrag"}],[57212942,{"idx":14,"name":"wascity-metal-dirty","tpage_name":"waswide-vis-tfrag"}],[60948482,{"idx":2,"name":"minc-train-pipe-cap-02","tpage_name":"minec-vis-tfrag"}],[60948481,{"idx":1,"name":"minc-door-metal-01","tpage_name":"minec-vis-tfrag"}],[64815107,{"idx":3,"name":"minc-blue-paint-rust02","tpage_name":"minea-vis-shrub"}],[61079567,{"idx":15,"name":"grunt-skin-03","tpage_name":"minec-vis-pris"}],[48627767,{"idx":55,"name":"sewer-bolt-side-01","tpage_name":"sewb-vis-tfrag"}],[57212940,{"idx":12,"name":"wascity-outerwall-metal-b","tpage_name":"waswide-vis-tfrag"}],[60948480,{"idx":0,"name":"minc-cliff-face-01","tpage_name":"minec-vis-tfrag"}],[64815106,{"idx":2,"name":"minc-plate-01","tpage_name":"minea-vis-shrub"}],[61079566,{"idx":14,"name":"grunt-skin-02","tpage_name":"minec-vis-pris"}],[48627766,{"idx":54,"name":"sewer-pipe-rim-07-hitweak","tpage_name":"sewb-vis-tfrag"}],[64815105,{"idx":1,"name":"minb-stone26","tpage_name":"minea-vis-shrub"}],[61079565,{"idx":13,"name":"grunt-skin-01","tpage_name":"minec-vis-pris"}],[48627765,{"idx":53,"name":"sewer-nut-01","tpage_name":"sewb-vis-tfrag"}],[64815104,{"idx":0,"name":"minc-rust-01","tpage_name":"minea-vis-shrub"}],[61079564,{"idx":12,"name":"grunt-metal-01","tpage_name":"minec-vis-pris"}],[48627764,{"idx":52,"name":"sewer-scaffold-02","tpage_name":"sewb-vis-tfrag"}],[61079563,{"idx":11,"name":"grunt-hose","tpage_name":"minec-vis-pris"}],[48627763,{"idx":51,"name":"sewer-scaffold-01","tpage_name":"sewb-vis-tfrag"}],[61079562,{"idx":10,"name":"grunt-gem-01","tpage_name":"minec-vis-pris"}],[48627762,{"idx":50,"name":"sewer-brick-block-09","tpage_name":"sewb-vis-tfrag"}],[61079561,{"idx":9,"name":"grunt-eye-01","tpage_name":"minec-vis-pris"}],[48627761,{"idx":49,"name":"sewer-lip-01","tpage_name":"sewb-vis-tfrag"}],[61079559,{"idx":7,"name":"gekko-nails","tpage_name":"minec-vis-pris"}],[48627759,{"idx":47,"name":"sewer-metal-floor-01","tpage_name":"sewb-vis-tfrag"}],[61079558,{"idx":6,"name":"gekko-metal-01","tpage_name":"minec-vis-pris"}],[48627758,{"idx":46,"name":"sewer-metal-block-05","tpage_name":"sewb-vis-tfrag"}],[61079557,{"idx":5,"name":"gekko-laserbarrel","tpage_name":"minec-vis-pris"}],[48627757,{"idx":45,"name":"sew-metal-floor-01","tpage_name":"sewb-vis-tfrag"}],[61079555,{"idx":3,"name":"gekko-hose","tpage_name":"minec-vis-pris"}],[48627755,{"idx":43,"name":"strip-black","tpage_name":"sewb-vis-tfrag"}],[61079554,{"idx":2,"name":"gekko-fingers","tpage_name":"minec-vis-pris"}],[48627754,{"idx":42,"name":"sewer-block-02","tpage_name":"sewb-vis-tfrag"}],[61079553,{"idx":1,"name":"gekko-eye-01","tpage_name":"minec-vis-pris"}],[48627753,{"idx":41,"name":"sewer-plate-01","tpage_name":"sewb-vis-tfrag"}],[61079552,{"idx":0,"name":"gekko-body","tpage_name":"minec-vis-pris"}],[48627752,{"idx":40,"name":"sewer-pipe-rim-09","tpage_name":"sewb-vis-tfrag"}],[48627751,{"idx":39,"name":"sewer-plate-02","tpage_name":"sewb-vis-tfrag"}],[48627748,{"idx":36,"name":"sewer-metal-block-01","tpage_name":"sewb-vis-tfrag"}],[48627746,{"idx":34,"name":"sewer-plate-04","tpage_name":"sewb-vis-tfrag"}],[48627745,{"idx":33,"name":"sewer-plate-03","tpage_name":"sewb-vis-tfrag"}],[48627744,{"idx":32,"name":"sewer-plate-06","tpage_name":"sewb-vis-tfrag"}],[48627743,{"idx":31,"name":"sewer-pipe-rim-05b","tpage_name":"sewb-vis-tfrag"}],[48627742,{"idx":30,"name":"sewer-pipe-rim-07","tpage_name":"sewb-vis-tfrag"}],[48627741,{"idx":29,"name":"sewer-flat-pipe-01","tpage_name":"sewb-vis-tfrag"}],[48627740,{"idx":28,"name":"sewer-pipe-rim-08","tpage_name":"sewb-vis-tfrag"}],[129433601,{"idx":1,"name":"dp-text-02","tpage_name":"wasseem-sprite"}],[115736621,{"idx":45,"name":"jakchires-pants","tpage_name":"lnstcst-pris"}],[48627737,{"idx":25,"name":"sewer-pipe-rim-03","tpage_name":"sewb-vis-tfrag"}],[129433600,{"idx":0,"name":"dp-text-01","tpage_name":"wasseem-sprite"}],[115736620,{"idx":44,"name":"jakchires-lightbrownspat","tpage_name":"lnstcst-pris"}],[43647016,{"idx":40,"name":"fruit1","tpage_name":"waswide-sprite"}],[48627736,{"idx":24,"name":"sewer-metal-03","tpage_name":"sewb-vis-tfrag"}],[115736619,{"idx":43,"name":"jakchires-leatherpouch","tpage_name":"lnstcst-pris"}],[48627735,{"idx":23,"name":"sewer-stone-arch-01","tpage_name":"sewb-vis-tfrag"}],[105054307,{"idx":99,"name":"marauder-spike","tpage_name":"desoasis-pris"}],[112525387,{"idx":75,"name":"jakchires-shoemetal","tpage_name":"desrescc-pris"}],[62259225,{"idx":25,"name":"wing02","tpage_name":"ctycarc-pris"}],[61014045,{"idx":29,"name":"minc-light-red","tpage_name":"minec-vis-shrub"}],[57278505,{"idx":41,"name":"metalflut-leatherstrap-c","tpage_name":"waswide-vis-pris"}],[52297785,{"idx":57,"name":"freehq-projector02","tpage_name":"freehq-tfrag"}],[67239945,{"idx":9,"name":"vin-floor-02","tpage_name":"vinroom-vis-tfrag"}],[48562245,{"idx":69,"name":"jakchires-eyelid","tpage_name":"sewa-vis-pris"}],[81723489,{"idx":97,"name":"jakchires-eyelid","tpage_name":"ljndklev-pris"}],[105054306,{"idx":98,"name":"marauder-skirt-02","tpage_name":"desoasis-pris"}],[112525386,{"idx":74,"name":"jakchires-shoebottom","tpage_name":"desrescc-pris"}],[62259222,{"idx":22,"name":"stripe03","tpage_name":"ctycarc-pris"}],[61014042,{"idx":26,"name":"minc-screw-01","tpage_name":"minec-vis-shrub"}],[57278502,{"idx":38,"name":"environment-oldmetal","tpage_name":"waswide-vis-pris"}],[52297782,{"idx":54,"name":"freehq-monitor06","tpage_name":"freehq-tfrag"}],[67239942,{"idx":6,"name":"vin-control-panel-01","tpage_name":"vinroom-vis-tfrag"}],[48562242,{"idx":66,"name":"jakchires-clips","tpage_name":"sewa-vis-pris"}],[81723486,{"idx":94,"name":"jakchires-clips","tpage_name":"ljndklev-pris"}],[105054303,{"idx":95,"name":"marauder-skin","tpage_name":"desoasis-pris"}],[112525383,{"idx":71,"name":"jakchires-lightbrownspat","tpage_name":"desrescc-pris"}],[81723485,{"idx":93,"name":"jakchires-chestplate","tpage_name":"ljndklev-pris"}],[74579991,{"idx":23,"name":"sewer-metal-block-06","tpage_name":"sewm-vis-tfrag"}],[60883011,{"idx":67,"name":"mine-red-big-metal-01","tpage_name":"mineb-vis-pris"}],[62259220,{"idx":20,"name":"rail01","tpage_name":"ctycarc-pris"}],[61014040,{"idx":24,"name":"minc-blue-paint-rust05","tpage_name":"minec-vis-shrub"}],[52297780,{"idx":52,"name":"freehq-monitor07","tpage_name":"freehq-tfrag"}],[67239940,{"idx":4,"name":"vin-black","tpage_name":"vinroom-vis-tfrag"}],[48562240,{"idx":64,"name":"jakchires-brwnleather","tpage_name":"sewa-vis-pris"}],[81723484,{"idx":92,"name":"jakchires-brwnleather","tpage_name":"ljndklev-pris"}],[60883010,{"idx":66,"name":"mine-pipe-metal-01","tpage_name":"mineb-vis-pris"}],[105054301,{"idx":93,"name":"marauder-metal-plate","tpage_name":"desoasis-pris"}],[112525381,{"idx":69,"name":"jakchires-jacket","tpage_name":"desrescc-pris"}],[62259219,{"idx":19,"name":"post01","tpage_name":"ctycarc-pris"}],[61014039,{"idx":23,"name":"minc-metal-grate-01","tpage_name":"minec-vis-shrub"}],[52297779,{"idx":51,"name":"freehq-monitor02","tpage_name":"freehq-tfrag"}],[67239939,{"idx":3,"name":"strip-vin-rim-02","tpage_name":"vinroom-vis-tfrag"}],[48562239,{"idx":63,"name":"jakchires-brownstrap","tpage_name":"sewa-vis-pris"}],[81723483,{"idx":91,"name":"jakchires-brownstrap","tpage_name":"ljndklev-pris"}],[105054300,{"idx":92,"name":"marauder-metal-mask","tpage_name":"desoasis-pris"}],[112525380,{"idx":68,"name":"jakchires-horn","tpage_name":"desrescc-pris"}],[62259218,{"idx":18,"name":"lightCase01","tpage_name":"ctycarc-pris"}],[61014038,{"idx":22,"name":"minc-blue-paint-safe-rust04","tpage_name":"minec-vis-shrub"}],[57278498,{"idx":34,"name":"citn-allleatherstrap","tpage_name":"waswide-vis-pris"}],[52297778,{"idx":50,"name":"freehq-wal-plate03","tpage_name":"freehq-tfrag"}],[67239938,{"idx":2,"name":"strip-vin-pipe-01","tpage_name":"vinroom-vis-tfrag"}],[48562238,{"idx":62,"name":"jakchires-blackstrap","tpage_name":"sewa-vis-pris"}],[81723482,{"idx":90,"name":"jakchires-blackstrap","tpage_name":"ljndklev-pris"}],[105054299,{"idx":91,"name":"marauder-leather-strap","tpage_name":"desoasis-pris"}],[112525379,{"idx":67,"name":"jakchires-hair","tpage_name":"desrescc-pris"}],[81723481,{"idx":89,"name":"jakchires-arm","tpage_name":"ljndklev-pris"}],[105054298,{"idx":90,"name":"marauder-leather-part","tpage_name":"desoasis-pris"}],[112525378,{"idx":66,"name":"jakchires-glovetop","tpage_name":"desrescc-pris"}],[81723479,{"idx":87,"name":"jakc-wraps","tpage_name":"ljndklev-pris"}],[105054296,{"idx":88,"name":"marauder-leather-buckle","tpage_name":"desoasis-pris"}],[112525376,{"idx":64,"name":"jakchires-facelft","tpage_name":"desrescc-pris"}],[81723478,{"idx":86,"name":"jakc-waistband2","tpage_name":"ljndklev-pris"}],[105054295,{"idx":87,"name":"marauder-leather-brown","tpage_name":"desoasis-pris"}],[112525375,{"idx":63,"name":"jakchires-eyelid","tpage_name":"desrescc-pris"}],[81723477,{"idx":85,"name":"jakc-skirt","tpage_name":"ljndklev-pris"}],[105054294,{"idx":86,"name":"marauder-leather-brnstrap","tpage_name":"desoasis-pris"}],[112525374,{"idx":62,"name":"jakchires-eyebrow","tpage_name":"desrescc-pris"}],[81723476,{"idx":84,"name":"jakc-scarfhanging","tpage_name":"ljndklev-pris"}],[105054293,{"idx":85,"name":"marauder-hand-blue","tpage_name":"desoasis-pris"}],[112525373,{"idx":61,"name":"jakchires-eye","tpage_name":"desrescc-pris"}],[81723475,{"idx":83,"name":"jakc-scarf","tpage_name":"ljndklev-pris"}],[105054292,{"idx":84,"name":"marauder-gun-tip","tpage_name":"desoasis-pris"}],[112525372,{"idx":60,"name":"jakchires-clips","tpage_name":"desrescc-pris"}],[81723474,{"idx":82,"name":"jakc-lens","tpage_name":"ljndklev-pris"}],[105054291,{"idx":83,"name":"marauder-gun-part","tpage_name":"desoasis-pris"}],[112525371,{"idx":59,"name":"jakchires-chestplate","tpage_name":"desrescc-pris"}],[81723473,{"idx":81,"name":"jakc-gogglemetal","tpage_name":"ljndklev-pris"}],[105054290,{"idx":82,"name":"marauder-gun-metal","tpage_name":"desoasis-pris"}],[112525370,{"idx":58,"name":"jakchires-brwnleather","tpage_name":"desrescc-pris"}],[81723472,{"idx":80,"name":"jakc-chestplate-straps","tpage_name":"ljndklev-pris"}],[105054289,{"idx":81,"name":"marauder-gun-blade","tpage_name":"desoasis-pris"}],[112525369,{"idx":57,"name":"jakchires-brownstrap","tpage_name":"desrescc-pris"}],[81723471,{"idx":79,"name":"jakc-armor","tpage_name":"ljndklev-pris"}],[11141131,{"idx":11,"name":"sign-tall-b","tpage_name":"ctyslumc-sprite"}],[105054288,{"idx":80,"name":"marauder-blade-joint","tpage_name":"desoasis-pris"}],[112525368,{"idx":56,"name":"jakchires-blackstrap","tpage_name":"desrescc-pris"}],[81723470,{"idx":78,"name":"klever-fingertop","tpage_name":"ljndklev-pris"}],[11141130,{"idx":10,"name":"sign-tall-a","tpage_name":"ctyslumc-sprite"}],[105054287,{"idx":79,"name":"marauder-blade","tpage_name":"desoasis-pris"}],[112525367,{"idx":55,"name":"jakchires-arm","tpage_name":"desrescc-pris"}],[81723469,{"idx":77,"name":"klever-fingerbottom","tpage_name":"ljndklev-pris"}],[11141129,{"idx":9,"name":"sign-hiphog","tpage_name":"ctyslumc-sprite"}],[105054286,{"idx":78,"name":"marauder-belt","tpage_name":"desoasis-pris"}],[112525366,{"idx":54,"name":"jakc-wristband-a2","tpage_name":"desrescc-pris"}],[720920,{"idx":24,"name":"loadsave-metalframe-02","tpage_name":"level-default-shrub"}],[81723468,{"idx":76,"name":"klever-widebrownstrap","tpage_name":"ljndklev-pris"}],[11141128,{"idx":8,"name":"sign-happy-pirate","tpage_name":"ctyslumc-sprite"}],[112525365,{"idx":53,"name":"jakc-wraps","tpage_name":"desrescc-pris"}],[720919,{"idx":23,"name":"loadsave-post","tpage_name":"level-default-shrub"}],[81723467,{"idx":75,"name":"klever-undershirt","tpage_name":"ljndklev-pris"}],[11141127,{"idx":7,"name":"sign-gt2","tpage_name":"ctyslumc-sprite"}],[112525364,{"idx":52,"name":"jakc-waistband2","tpage_name":"desrescc-pris"}],[720918,{"idx":22,"name":"loadsave-metalframe","tpage_name":"level-default-shrub"}],[62062629,{"idx":37,"name":"flying-bird-10","tpage_name":"wascityb-sprite"}],[49610829,{"idx":77,"name":"sewer-yellow-light-01","tpage_name":"sewf-vis-tfrag"}],[67043349,{"idx":21,"name":"vinroom-small-monitor-04","tpage_name":"vinroom-sprite"}],[81723466,{"idx":74,"name":"klever-thighs","tpage_name":"ljndklev-pris"}],[11141126,{"idx":6,"name":"sign-crimson","tpage_name":"ctyslumc-sprite"}],[112525363,{"idx":51,"name":"jakc-scarf","tpage_name":"desrescc-pris"}],[720917,{"idx":21,"name":"loadsave-frametop","tpage_name":"level-default-shrub"}],[11141125,{"idx":5,"name":"sign-blank","tpage_name":"ctyslumc-sprite"}],[112525362,{"idx":50,"name":"jakc-lens","tpage_name":"desrescc-pris"}],[720916,{"idx":20,"name":"loadsave-part-02c","tpage_name":"level-default-shrub"}],[81723464,{"idx":72,"name":"klever-skirtdark","tpage_name":"ljndklev-pris"}],[74579970,{"idx":2,"name":"sewer-metal-block-02-small","tpage_name":"sewm-vis-tfrag"}],[60882990,{"idx":46,"name":"min-rust-01","tpage_name":"mineb-vis-pris"}],[11141124,{"idx":4,"name":"sign-baron","tpage_name":"ctyslumc-sprite"}],[112525361,{"idx":49,"name":"jakc-gogglemetal","tpage_name":"desrescc-pris"}],[720915,{"idx":19,"name":"loadsave-secrets","tpage_name":"level-default-shrub"}],[81723463,{"idx":71,"name":"klever-shoebottom","tpage_name":"ljndklev-pris"}],[74579969,{"idx":1,"name":"sewer-mantel-01","tpage_name":"sewm-vis-tfrag"}],[60882989,{"idx":45,"name":"min-rat-mesh-01","tpage_name":"mineb-vis-pris"}],[55312414,{"idx":30,"name":"was-tizard-beak","tpage_name":"wascityb-vis-pris"}],[62783494,{"idx":6,"name":"grunt-skin-03","tpage_name":"ctypepb-pris"}],[11141123,{"idx":3,"name":"sign-square-b","tpage_name":"ctyslumc-sprite"}],[112525360,{"idx":48,"name":"jakc-chestplate-straps","tpage_name":"desrescc-pris"}],[81723462,{"idx":70,"name":"klever-shoe","tpage_name":"ljndklev-pris"}],[55312413,{"idx":29,"name":"city-mark-rope-01","tpage_name":"wascityb-vis-pris"}],[62783493,{"idx":5,"name":"grunt-skin-02","tpage_name":"ctypepb-pris"}],[11141122,{"idx":2,"name":"sign-future-slumc","tpage_name":"ctyslumc-sprite"}],[118751259,{"idx":27,"name":"seem-skirt-small","tpage_name":"wcaseem-pris2"}],[112525359,{"idx":47,"name":"jakc-armor","tpage_name":"desrescc-pris"}],[720913,{"idx":17,"name":"loadsave-save","tpage_name":"level-default-shrub"}],[81723461,{"idx":69,"name":"klever-horn","tpage_name":"ljndklev-pris"}],[60882987,{"idx":43,"name":"min-blue-paint-rust01","tpage_name":"mineb-vis-pris"}],[55312412,{"idx":28,"name":"city-mark-wood-plain","tpage_name":"wascityb-vis-pris"}],[62783492,{"idx":4,"name":"grunt-skin-01","tpage_name":"ctypepb-pris"}],[11141121,{"idx":1,"name":"sign-square-a","tpage_name":"ctyslumc-sprite"}],[720912,{"idx":16,"name":"loadsave-part-01","tpage_name":"level-default-shrub"}],[81723459,{"idx":67,"name":"klever-gunmetal-05","tpage_name":"ljndklev-pris"}],[720910,{"idx":14,"name":"loadsave-map","tpage_name":"level-default-shrub"}],[81723458,{"idx":66,"name":"klever-gunmetal-04","tpage_name":"ljndklev-pris"}],[60882984,{"idx":40,"name":"minc-metal-grate-01","tpage_name":"mineb-vis-pris"}],[55312409,{"idx":25,"name":"city-mark-rope-mesh-01","tpage_name":"wascityb-vis-pris"}],[62783489,{"idx":1,"name":"grunt-gem-01","tpage_name":"ctypepb-pris"}],[720909,{"idx":13,"name":"loadsave-load","tpage_name":"level-default-shrub"}],[81723457,{"idx":65,"name":"klever-gunmetal-03","tpage_name":"ljndklev-pris"}],[60882983,{"idx":39,"name":"minc-light-smallcase","tpage_name":"mineb-vis-pris"}],[720908,{"idx":12,"name":"loadsave-journal","tpage_name":"level-default-shrub"}],[60882982,{"idx":38,"name":"minc-blue-paint-safe-rust04","tpage_name":"mineb-vis-pris"}],[720907,{"idx":11,"name":"loadsave-graphic-options","tpage_name":"level-default-shrub"}],[81723455,{"idx":63,"name":"klever-gunmetal-01","tpage_name":"ljndklev-pris"}],[720906,{"idx":10,"name":"loadsave-game-options","tpage_name":"level-default-shrub"}],[81723454,{"idx":62,"name":"klever-bolt","tpage_name":"ljndklev-pris"}],[60882975,{"idx":31,"name":"monster-frog-toenails","tpage_name":"mineb-vis-pris"}],[720900,{"idx":4,"name":"loadsave-03","tpage_name":"level-default-shrub"}],[49152009,{"idx":9,"name":"sewer-water-still-01-d-dest","tpage_name":"sewd-vis-water"}],[47906829,{"idx":13,"name":"nsta-cave-top-platform-shrub","tpage_name":"nsta-vis-shrub"}],[49152008,{"idx":8,"name":"sewer-water-wave-01-d-dest","tpage_name":"sewd-vis-water"}],[47906828,{"idx":12,"name":"nsta-cave-sides-shrub","tpage_name":"nsta-vis-shrub"}],[49152007,{"idx":7,"name":"sewer-water-still-01-d","tpage_name":"sewd-vis-water"}],[47906827,{"idx":11,"name":"nst-egg-bulb-01","tpage_name":"nsta-vis-shrub"}],[49152005,{"idx":5,"name":"sewer-water-highlight-01-d-dest","tpage_name":"sewd-vis-water"}],[47906825,{"idx":9,"name":"nsta-rock-shrubs","tpage_name":"nsta-vis-shrub"}],[49152004,{"idx":4,"name":"sewer-water-01-d","tpage_name":"sewd-vis-water"}],[47906824,{"idx":8,"name":"nstab-eggskin","tpage_name":"nsta-vis-shrub"}],[49152003,{"idx":3,"name":"sewer-waterfall-02-d","tpage_name":"sewd-vis-water"}],[47906823,{"idx":7,"name":"nestb-basekor","tpage_name":"nsta-vis-shrub"}],[49152002,{"idx":2,"name":"sewer-waterfall-02-d-dest","tpage_name":"sewd-vis-water"}],[47906822,{"idx":6,"name":"nsta-finger-pipe","tpage_name":"nsta-vis-shrub"}],[47906818,{"idx":2,"name":"nestb-eggskin","tpage_name":"nsta-vis-shrub"}],[47906817,{"idx":1,"name":"nest-fingerback","tpage_name":"nsta-vis-shrub"}],[47906816,{"idx":0,"name":"nsta-transparent","tpage_name":"nsta-vis-shrub"}],[48627739,{"idx":27,"name":"sewer-pipe-small-02","tpage_name":"sewb-vis-tfrag"}],[43647019,{"idx":43,"name":"baron-propoganda-logo","tpage_name":"waswide-sprite"}],[52297758,{"idx":30,"name":"freehq-ground-tile-set1-rm","tpage_name":"freehq-tfrag"}],[61014018,{"idx":2,"name":"minc-plate-01","tpage_name":"minec-vis-shrub"}],[42467334,{"idx":6,"name":"wascity-shrub-orange-01","tpage_name":"wasdoors-vis-shrub"}],[42467330,{"idx":2,"name":"wascity-blotch-withstreaks-01","tpage_name":"wasdoors-vis-shrub"}],[42336268,{"idx":12,"name":"dust-sparkle","tpage_name":"nstb-sprite"}],[42336267,{"idx":11,"name":"crack01","tpage_name":"nstb-sprite"}],[42336265,{"idx":9,"name":"ceiling-dust","tpage_name":"nstb-sprite"}],[42336264,{"idx":8,"name":"flying-gull-06","tpage_name":"nstb-sprite"}],[42336263,{"idx":7,"name":"flying-gull-05","tpage_name":"nstb-sprite"}],[42336262,{"idx":6,"name":"flying-gull-04","tpage_name":"nstb-sprite"}],[42336261,{"idx":5,"name":"flying-gull-03","tpage_name":"nstb-sprite"}],[38731960,{"idx":184,"name":"femcher2_19","tpage_name":"wasstada-sprite"}],[92274700,{"idx":12,"name":"vehicle-gun-box-01","tpage_name":"desrace2-pris"}],[73597000,{"idx":72,"name":"sewer-block-01-hitweak","tpage_name":"sewi-vis-tfrag"}],[42336260,{"idx":4,"name":"flying-gull-02","tpage_name":"nstb-sprite"}],[38731959,{"idx":183,"name":"femcher2_18","tpage_name":"wasstada-sprite"}],[92274699,{"idx":11,"name":"vehicle-gas-tank-01","tpage_name":"desrace2-pris"}],[73596999,{"idx":71,"name":"sewer-brick-block-04-hitweak","tpage_name":"sewi-vis-tfrag"}],[42336259,{"idx":3,"name":"flying-gull-01","tpage_name":"nstb-sprite"}],[38731958,{"idx":182,"name":"femcher2_17","tpage_name":"wasstada-sprite"}],[92274698,{"idx":10,"name":"vehicle-chrome-pipe-01","tpage_name":"desrace2-pris"}],[73596998,{"idx":70,"name":"sewer-brick-block-10-hitweak","tpage_name":"sewi-vis-tfrag"}],[42336258,{"idx":2,"name":"racegate","tpage_name":"nstb-sprite"}],[38731957,{"idx":181,"name":"femcher2_16","tpage_name":"wasstada-sprite"}],[92274697,{"idx":9,"name":"vehicle-cap-pin-01","tpage_name":"desrace2-pris"}],[73596997,{"idx":69,"name":"sewer-stone-newarch-01","tpage_name":"sewi-vis-tfrag"}],[42336257,{"idx":1,"name":"errol-ring-02","tpage_name":"nstb-sprite"}],[42336256,{"idx":0,"name":"errol-ring-01","tpage_name":"nstb-sprite"}],[48758820,{"idx":36,"name":"sewer-pipe-rim-09","tpage_name":"sewc-vis-tfrag"}],[53739540,{"idx":20,"name":"cguardgame-scarf","tpage_name":"forestb-vis-pris"}],[55115806,{"idx":30,"name":"wascity-metal-piece-03","tpage_name":"wascityb-vis-tfrag"}],[48889906,{"idx":50,"name":"strip-black","tpage_name":"sewd-vis-tfrag"}],[41418826,{"idx":74,"name":"waspala-elevator-metal-plate","tpage_name":"wascitya-vis-tfrag"}],[48758819,{"idx":35,"name":"sewer-plate-06","tpage_name":"sewc-vis-tfrag"}],[53739539,{"idx":19,"name":"cguardgame-metallight-plain","tpage_name":"forestb-vis-pris"}],[48758818,{"idx":34,"name":"sewer-pipe-rim-10","tpage_name":"sewc-vis-tfrag"}],[53739538,{"idx":18,"name":"cguardgame-metallight-02","tpage_name":"forestb-vis-pris"}],[48758817,{"idx":33,"name":"sewer-metal-block-06-hitweak","tpage_name":"sewc-vis-tfrag"}],[53739537,{"idx":17,"name":"cguardgame-metallight-01small","tpage_name":"forestb-vis-pris"}],[53739536,{"idx":16,"name":"cguardgame-metalered-01","tpage_name":"forestb-vis-pris"}],[48758815,{"idx":31,"name":"sewer-pipe-rim-06","tpage_name":"sewc-vis-tfrag"}],[53739535,{"idx":15,"name":"cguardgame-metaledark-02","tpage_name":"forestb-vis-pris"}],[55115801,{"idx":25,"name":"wascity-metal-wall-base-plate","tpage_name":"wascityb-vis-tfrag"}],[41418821,{"idx":69,"name":"wascitya-stone-top-door","tpage_name":"wascitya-vis-tfrag"}],[53739534,{"idx":14,"name":"cguardgame-jacketstrap","tpage_name":"forestb-vis-pris"}],[55115800,{"idx":24,"name":"wascitya-redish-metal","tpage_name":"wascityb-vis-tfrag"}],[41418820,{"idx":68,"name":"wascity-steps-red","tpage_name":"wascitya-vis-tfrag"}],[48758812,{"idx":28,"name":"sewer-pipe-rim-01","tpage_name":"sewc-vis-tfrag"}],[53739532,{"idx":12,"name":"cguardgame-gunmetaldark2","tpage_name":"forestb-vis-pris"}],[55115798,{"idx":22,"name":"wascitya-stone-top","tpage_name":"wascityb-vis-tfrag"}],[48889898,{"idx":42,"name":"sewer-pipe-rim-09","tpage_name":"sewd-vis-tfrag"}],[41418818,{"idx":66,"name":"wascity-elev-door-dark","tpage_name":"wascitya-vis-tfrag"}],[48758811,{"idx":27,"name":"sewer-rubber-rim-01","tpage_name":"sewc-vis-tfrag"}],[53739531,{"idx":11,"name":"cguardgame-gunmetaldark","tpage_name":"forestb-vis-pris"}],[55115797,{"idx":21,"name":"wascity-wall-canister","tpage_name":"wascityb-vis-tfrag"}],[48889897,{"idx":41,"name":"sewer-pipe-02","tpage_name":"sewd-vis-tfrag"}],[41418817,{"idx":65,"name":"wascity-elev-door-orange-2","tpage_name":"wascitya-vis-tfrag"}],[112328743,{"idx":39,"name":"jakchires-eyebrow","tpage_name":"wascast-pris"}],[91160683,{"idx":107,"name":"jakchires-teeth","tpage_name":"gungame-vis-pris"}],[48758810,{"idx":26,"name":"sewer-metal-block-05","tpage_name":"sewc-vis-tfrag"}],[53739530,{"idx":10,"name":"cguardgame-gunleather","tpage_name":"forestb-vis-pris"}],[55115796,{"idx":20,"name":"wascity-metal-pole","tpage_name":"wascityb-vis-tfrag"}],[48889896,{"idx":40,"name":"sewer-plate-03","tpage_name":"sewd-vis-tfrag"}],[41418816,{"idx":64,"name":"wascity-elev-door-orange","tpage_name":"wascitya-vis-tfrag"}],[112328742,{"idx":38,"name":"jakchires-eye","tpage_name":"wascast-pris"}],[91160682,{"idx":106,"name":"jakchires-shoeteop","tpage_name":"gungame-vis-pris"}],[48758809,{"idx":25,"name":"sewer-flat-pipe-01","tpage_name":"sewc-vis-tfrag"}],[53739529,{"idx":9,"name":"cguardgame-gunhandle","tpage_name":"forestb-vis-pris"}],[55115795,{"idx":19,"name":"wascity-stucco-wall-supports","tpage_name":"wascityb-vis-tfrag"}],[48889895,{"idx":39,"name":"sewer-pipe-rim-07","tpage_name":"sewd-vis-tfrag"}],[41418815,{"idx":63,"name":"wascity-elev-door-snake-eye","tpage_name":"wascitya-vis-tfrag"}],[112328741,{"idx":37,"name":"jakchires-clips","tpage_name":"wascast-pris"}],[91160681,{"idx":105,"name":"jakchires-shoemetal","tpage_name":"gungame-vis-pris"}],[48758808,{"idx":24,"name":"sewer-pipe-01","tpage_name":"sewc-vis-tfrag"}],[53739528,{"idx":8,"name":"cguardgame-gunboltlight","tpage_name":"forestb-vis-pris"}],[55115794,{"idx":18,"name":"wascity-stucco-wall-supports-end","tpage_name":"wascityb-vis-tfrag"}],[48889894,{"idx":38,"name":"sewer-plate-04","tpage_name":"sewd-vis-tfrag"}],[41418814,{"idx":62,"name":"wascity-elev-door-snake","tpage_name":"wascitya-vis-tfrag"}],[112328740,{"idx":36,"name":"jakchires-chestplate","tpage_name":"wascast-pris"}],[91160680,{"idx":104,"name":"jakchires-shoebottom","tpage_name":"gungame-vis-pris"}],[48758804,{"idx":20,"name":"sewer-plate-05-hitweak","tpage_name":"sewc-vis-tfrag"}],[53739524,{"idx":4,"name":"cguardgame-chestplate","tpage_name":"forestb-vis-pris"}],[55115790,{"idx":14,"name":"wascity-stucco-wall-bleached-2-bricks-01","tpage_name":"wascityb-vis-tfrag"}],[48889890,{"idx":34,"name":"sewer-mantel-01","tpage_name":"sewd-vis-tfrag"}],[41418810,{"idx":58,"name":"common-gray-dark","tpage_name":"wascitya-vis-tfrag"}],[122290176,{"idx":0,"name":"common-black","tpage_name":"factoryb-vis-pris"}],[112328736,{"idx":32,"name":"jakchires-arm","tpage_name":"wascast-pris"}],[104857656,{"idx":56,"name":"vehicle-wheel-01","tpage_name":"oasiscst-pris"}],[91160676,{"idx":100,"name":"jakchires-leatherpouch","tpage_name":"gungame-vis-pris"}],[53739522,{"idx":2,"name":"cguardgame-blackstrap","tpage_name":"forestb-vis-pris"}],[55115788,{"idx":12,"name":"wascity-metal-piece-01","tpage_name":"wascityb-vis-tfrag"}],[48889888,{"idx":32,"name":"sewer-flat-pipe-01","tpage_name":"sewd-vis-tfrag"}],[41418808,{"idx":56,"name":"wascitya-airlock-groove","tpage_name":"wascitya-vis-tfrag"}],[112328734,{"idx":30,"name":"jakc-wraps","tpage_name":"wascast-pris"}],[104857654,{"idx":54,"name":"intcept-pipe01","tpage_name":"oasiscst-pris"}],[91160674,{"idx":98,"name":"jakchires-horn","tpage_name":"gungame-vis-pris"}],[48758801,{"idx":17,"name":"sewer-pipe-small-02","tpage_name":"sewc-vis-tfrag"}],[53739521,{"idx":1,"name":"cguardgame-backplate","tpage_name":"forestb-vis-pris"}],[55115787,{"idx":11,"name":"wascity-metal-piece-02","tpage_name":"wascityb-vis-tfrag"}],[48889887,{"idx":31,"name":"sewer-pipe-rim-05","tpage_name":"sewd-vis-tfrag"}],[41418807,{"idx":55,"name":"wascity-roof-1","tpage_name":"wascitya-vis-tfrag"}],[104857653,{"idx":53,"name":"kid-medallion","tpage_name":"oasiscst-pris"}],[112328733,{"idx":29,"name":"jakc-waistband2","tpage_name":"wascast-pris"}],[91160673,{"idx":97,"name":"jakchires-hair","tpage_name":"gungame-vis-pris"}],[55115781,{"idx":5,"name":"wascity-metal-dirty","tpage_name":"wascityb-vis-tfrag"}],[41418801,{"idx":49,"name":"wascity-base","tpage_name":"wascitya-vis-tfrag"}],[67108965,{"idx":101,"name":"vin-support-base-02","tpage_name":"vinroom-vis-pris"}],[88277025,{"idx":33,"name":"cguard-air-train-fin","tpage_name":"introcst-tfrag"}],[74580045,{"idx":77,"name":"sewer-metal-block-04-hitweak","tpage_name":"sewm-vis-tfrag"}],[112328727,{"idx":23,"name":"jakc-chestplate-straps","tpage_name":"wascast-pris"}],[104857647,{"idx":47,"name":"jakchires-shoebottom","tpage_name":"oasiscst-pris"}],[91160667,{"idx":91,"name":"jakchires-eye","tpage_name":"gungame-vis-pris"}],[55115780,{"idx":4,"name":"wascity-metal-door-01","tpage_name":"wascityb-vis-tfrag"}],[41418800,{"idx":48,"name":"wascitya-airlock-door","tpage_name":"wascitya-vis-tfrag"}],[104857646,{"idx":46,"name":"jakchires-precarmor-01","tpage_name":"oasiscst-pris"}],[112328726,{"idx":22,"name":"jakc-armor","tpage_name":"wascast-pris"}],[91160666,{"idx":90,"name":"jakchires-clips","tpage_name":"gungame-vis-pris"}],[48889879,{"idx":23,"name":"sewer-concrete-block-02","tpage_name":"sewd-vis-tfrag"}],[41418799,{"idx":47,"name":"wascitya-slum-lightwall","tpage_name":"wascitya-vis-tfrag"}],[74580043,{"idx":75,"name":"sewer-pipe-rim-05b-hitweak","tpage_name":"sewm-vis-tfrag"}],[55115778,{"idx":2,"name":"wascity-metal-segments","tpage_name":"wascityb-vis-tfrag"}],[41418798,{"idx":46,"name":"wascitya-redish-metal","tpage_name":"wascitya-vis-tfrag"}],[74580042,{"idx":74,"name":"sewer-scaffold-03-hitweak","tpage_name":"sewm-vis-tfrag"}],[118554624,{"idx":0,"name":"sig-flatfangs","tpage_name":"deshunt-water"}],[104857644,{"idx":44,"name":"jakchires-lightbrownspat","tpage_name":"oasiscst-pris"}],[112328724,{"idx":20,"name":"eco-lt-cryst-02","tpage_name":"wascast-pris"}],[91160664,{"idx":88,"name":"jakchires-brwnleather","tpage_name":"gungame-vis-pris"}],[55115777,{"idx":1,"name":"wascity-stone-bricks-2-plain","tpage_name":"wascityb-vis-tfrag"}],[48889877,{"idx":21,"name":"sewer-brick-block-02","tpage_name":"sewd-vis-tfrag"}],[41418797,{"idx":45,"name":"wascitya-airlock-metal","tpage_name":"wascitya-vis-tfrag"}],[74580041,{"idx":73,"name":"sewer-brick-block-04-highertweak","tpage_name":"sewm-vis-tfrag"}],[104857643,{"idx":43,"name":"jakchires-leatherpouch","tpage_name":"oasiscst-pris"}],[91160663,{"idx":87,"name":"jakchires-brownstrap","tpage_name":"gungame-vis-pris"}],[55115776,{"idx":0,"name":"wascity-stone-plain-wall-3","tpage_name":"wascityb-vis-tfrag"}],[48889876,{"idx":20,"name":"sewer-brick-block-01","tpage_name":"sewd-vis-tfrag"}],[41418796,{"idx":44,"name":"wascity-ditch-wall-top-to-ground-edging","tpage_name":"wascitya-vis-tfrag"}],[74580040,{"idx":72,"name":"sewer-metal-block-01-hitweak","tpage_name":"sewm-vis-tfrag"}],[112328722,{"idx":18,"name":"daxtertuft","tpage_name":"wascast-pris"}],[104857642,{"idx":42,"name":"jakchires-jacket","tpage_name":"oasiscst-pris"}],[91160662,{"idx":86,"name":"jakchires-blackstrap","tpage_name":"gungame-vis-pris"}],[48889875,{"idx":19,"name":"sewer-block-01","tpage_name":"sewd-vis-tfrag"}],[41418795,{"idx":43,"name":"wascity-cement-road","tpage_name":"wascitya-vis-tfrag"}],[74580039,{"idx":71,"name":"sewer-flat-pipe-01-hitweak","tpage_name":"sewm-vis-tfrag"}],[48889874,{"idx":18,"name":"sewer-brick-block-03","tpage_name":"sewd-vis-tfrag"}],[41418794,{"idx":42,"name":"wascity-torch-tank","tpage_name":"wascitya-vis-tfrag"}],[48889873,{"idx":17,"name":"sewer-pipe-rim-03","tpage_name":"sewd-vis-tfrag"}],[41418793,{"idx":41,"name":"wascity-steps","tpage_name":"wascitya-vis-tfrag"}],[48889872,{"idx":16,"name":"sewer-concrete-edge-01","tpage_name":"sewd-vis-tfrag"}],[41418792,{"idx":40,"name":"city-slum-burning-can","tpage_name":"wascitya-vis-tfrag"}],[48889871,{"idx":15,"name":"common-black","tpage_name":"sewd-vis-tfrag"}],[41418791,{"idx":39,"name":"wascity-outerwall-metal-d","tpage_name":"wascitya-vis-tfrag"}],[41418790,{"idx":38,"name":"wascity-outerwall-metal-b","tpage_name":"wascitya-vis-tfrag"}],[94961666,{"idx":2,"name":"environment-oldmetal","tpage_name":"lsigjakc-pris"}],[48889869,{"idx":13,"name":"sewer-rubber-rim-01","tpage_name":"sewd-vis-tfrag"}],[41418789,{"idx":37,"name":"wascity-outerwall-metal-c","tpage_name":"wascitya-vis-tfrag"}],[94961665,{"idx":1,"name":"bam-hairhilite","tpage_name":"lsigjakc-pris"}],[48889868,{"idx":12,"name":"sewer-plate-02","tpage_name":"sewd-vis-tfrag"}],[41418788,{"idx":36,"name":"wascity-outerwall-metal","tpage_name":"wascitya-vis-tfrag"}],[48889867,{"idx":11,"name":"sewer-metal-block-05","tpage_name":"sewd-vis-tfrag"}],[41418787,{"idx":35,"name":"wascitya-stone-top-breakaway","tpage_name":"wascitya-vis-tfrag"}],[48889866,{"idx":10,"name":"sewer-metal-block-04","tpage_name":"sewd-vis-tfrag"}],[41418786,{"idx":34,"name":"wascity-metal-piece-01","tpage_name":"wascitya-vis-tfrag"}],[48889865,{"idx":9,"name":"sewer-pipe-rim-08","tpage_name":"sewd-vis-tfrag"}],[41418785,{"idx":33,"name":"wascity-metal-indent","tpage_name":"wascitya-vis-tfrag"}],[48889864,{"idx":8,"name":"sewer-pipe-rim-05b","tpage_name":"sewd-vis-tfrag"}],[41418784,{"idx":32,"name":"wascity-wood-plain","tpage_name":"wascitya-vis-tfrag"}],[48889863,{"idx":7,"name":"sewer-plate-05","tpage_name":"sewd-vis-tfrag"}],[41418783,{"idx":31,"name":"wascity-steel-bar","tpage_name":"wascitya-vis-tfrag"}],[48889862,{"idx":6,"name":"sewer-pipe-small-02","tpage_name":"sewd-vis-tfrag"}],[41418782,{"idx":30,"name":"wascity-wall-canister","tpage_name":"wascitya-vis-tfrag"}],[111542280,{"idx":8,"name":"wascity-ground-01","tpage_name":"desert-vis-shrub"}],[48889861,{"idx":5,"name":"sewer-block-02","tpage_name":"sewd-vis-tfrag"}],[41418781,{"idx":29,"name":"wascity-stonewall-bricks-HI","tpage_name":"wascitya-vis-tfrag"}],[111542279,{"idx":7,"name":"des-burn-precursor-head-01","tpage_name":"desert-vis-shrub"}],[48889860,{"idx":4,"name":"sewer-metal-block-01","tpage_name":"sewd-vis-tfrag"}],[41418780,{"idx":28,"name":"wascity-stucco-wall-bleached-cut-01","tpage_name":"wascitya-vis-tfrag"}],[111542278,{"idx":6,"name":"des-burn-precursor-01-bottom","tpage_name":"desert-vis-shrub"}],[48889859,{"idx":3,"name":"sewer-metal-block-06-hitweak","tpage_name":"sewd-vis-tfrag"}],[41418779,{"idx":27,"name":"wascity-metal-pole","tpage_name":"wascitya-vis-tfrag"}],[111542277,{"idx":5,"name":"des-burn-precursor-01","tpage_name":"desert-vis-shrub"}],[48889858,{"idx":2,"name":"sewer-plate-05-hitweak","tpage_name":"sewd-vis-tfrag"}],[41418778,{"idx":26,"name":"wascity-stonewall-bricks","tpage_name":"wascitya-vis-tfrag"}],[111542276,{"idx":4,"name":"des-burn-eye-on","tpage_name":"desert-vis-shrub"}],[48889857,{"idx":1,"name":"sewer-concrete-edge-02","tpage_name":"sewd-vis-tfrag"}],[41418777,{"idx":25,"name":"wascity-wall-weathered","tpage_name":"wascitya-vis-tfrag"}],[41418776,{"idx":24,"name":"wascity-stone-bricks-2-plain","tpage_name":"wascitya-vis-tfrag"}],[41418775,{"idx":23,"name":"wascity-stone-plain-wall-3","tpage_name":"wascitya-vis-tfrag"}],[74580019,{"idx":51,"name":"sewer-brick-roof-05","tpage_name":"sewm-vis-tfrag"}],[41418774,{"idx":22,"name":"wascity-stucco-wall-supports","tpage_name":"wascitya-vis-tfrag"}],[74580018,{"idx":50,"name":"sewer-pipe-rim-06","tpage_name":"sewm-vis-tfrag"}],[76480523,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"freehq-pris"}],[41418773,{"idx":21,"name":"wascity-stucco-wall-supports-end","tpage_name":"wascitya-vis-tfrag"}],[74580017,{"idx":49,"name":"sewer-round-01","tpage_name":"sewm-vis-tfrag"}],[76480522,{"idx":10,"name":"daxterfoot","tpage_name":"freehq-pris"}],[41418772,{"idx":20,"name":"wascity-ground-2-ditch-05","tpage_name":"wascitya-vis-tfrag"}],[74580016,{"idx":48,"name":"sewer-round-02","tpage_name":"sewm-vis-tfrag"}],[76480521,{"idx":9,"name":"daxterfinger","tpage_name":"freehq-pris"}],[41418771,{"idx":19,"name":"wascity-rock-small","tpage_name":"wascitya-vis-tfrag"}],[74580015,{"idx":47,"name":"sewer-round-03","tpage_name":"sewm-vis-tfrag"}],[76480520,{"idx":8,"name":"daxterear","tpage_name":"freehq-pris"}],[41418770,{"idx":18,"name":"wascity-ground-2-ditch-03","tpage_name":"wascitya-vis-tfrag"}],[74580014,{"idx":46,"name":"sewer-pipe-rim-01","tpage_name":"sewm-vis-tfrag"}],[76480519,{"idx":7,"name":"daxterbolt","tpage_name":"freehq-pris"}],[41418769,{"idx":17,"name":"wascity-ground-01","tpage_name":"wascitya-vis-tfrag"}],[74580013,{"idx":45,"name":"sewer-pipe-02-edge-01","tpage_name":"sewm-vis-tfrag"}],[76480518,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"freehq-pris"}],[41418768,{"idx":16,"name":"wascity-ground-2-ditch-04","tpage_name":"wascitya-vis-tfrag"}],[74580012,{"idx":44,"name":"sewer-pipe-01","tpage_name":"sewm-vis-tfrag"}],[76480517,{"idx":5,"name":"daxterarm","tpage_name":"freehq-pris"}],[41418767,{"idx":15,"name":"wascity-ditch-wall-top-to-ground","tpage_name":"wascitya-vis-tfrag"}],[74580011,{"idx":43,"name":"sewer-brick-block-02","tpage_name":"sewm-vis-tfrag"}],[76480516,{"idx":4,"name":"daxter-orange","tpage_name":"freehq-pris"}],[41418766,{"idx":14,"name":"wascity-stucco-wall-bleached-edge-01","tpage_name":"wascitya-vis-tfrag"}],[74580010,{"idx":42,"name":"sewer-concrete-block-02","tpage_name":"sewm-vis-tfrag"}],[76480515,{"idx":3,"name":"daxter-furhilite","tpage_name":"freehq-pris"}],[41418765,{"idx":13,"name":"wascity-stucco-wall-bleached-2-bricks-01","tpage_name":"wascitya-vis-tfrag"}],[74580009,{"idx":41,"name":"sewer-brick-block-06","tpage_name":"sewm-vis-tfrag"}],[76480514,{"idx":2,"name":"daxter-eyelid","tpage_name":"freehq-pris"}],[41418764,{"idx":12,"name":"wascity-stucco-wall-bleached-01","tpage_name":"wascitya-vis-tfrag"}],[74580008,{"idx":40,"name":"sewer-brick-block-01","tpage_name":"sewm-vis-tfrag"}],[76480513,{"idx":1,"name":"bam-hairhilite","tpage_name":"freehq-pris"}],[41418763,{"idx":11,"name":"wascity-wallspike-01","tpage_name":"wascitya-vis-tfrag"}],[74580007,{"idx":39,"name":"sewer-brick-block-10","tpage_name":"sewm-vis-tfrag"}],[41418762,{"idx":10,"name":"wascity-wallspike-2-ground-01","tpage_name":"wascitya-vis-tfrag"}],[74580006,{"idx":38,"name":"sewer-brick-block-11","tpage_name":"sewm-vis-tfrag"}],[41418761,{"idx":9,"name":"wascity-metal-door-01","tpage_name":"wascitya-vis-tfrag"}],[74580005,{"idx":37,"name":"sewer-scaffold-03","tpage_name":"sewm-vis-tfrag"}],[41418760,{"idx":8,"name":"common-black","tpage_name":"wascitya-vis-tfrag"}],[41418759,{"idx":7,"name":"wascity-metal-dirty","tpage_name":"wascitya-vis-tfrag"}],[41418758,{"idx":6,"name":"wascity-metal-piece-02","tpage_name":"wascitya-vis-tfrag"}],[60883022,{"idx":78,"name":"jakchires-precarmor-01","tpage_name":"mineb-vis-pris"}],[74580002,{"idx":34,"name":"sewer-flat-pipe-01","tpage_name":"sewm-vis-tfrag"}],[41418757,{"idx":5,"name":"wascity-greenmetal-tube","tpage_name":"wascitya-vis-tfrag"}],[60883021,{"idx":77,"name":"mine-slate-metal-01","tpage_name":"mineb-vis-pris"}],[74580001,{"idx":33,"name":"sewer-plate-03","tpage_name":"sewm-vis-tfrag"}],[41418756,{"idx":4,"name":"wascity-metal-segments","tpage_name":"wascitya-vis-tfrag"}],[60883020,{"idx":76,"name":"mine-rust-01","tpage_name":"mineb-vis-pris"}],[74580000,{"idx":32,"name":"sewer-pipe-rim-07","tpage_name":"sewm-vis-tfrag"}],[41418755,{"idx":3,"name":"wascity-metal-wall-base-plate","tpage_name":"wascitya-vis-tfrag"}],[60883019,{"idx":75,"name":"mine-red-paint-rust05","tpage_name":"mineb-vis-pris"}],[74579999,{"idx":31,"name":"sewer-plate-04","tpage_name":"sewm-vis-tfrag"}],[41418754,{"idx":2,"name":"wascity-metal-spike-01","tpage_name":"wascitya-vis-tfrag"}],[60883018,{"idx":74,"name":"mine-metal-wheel-01","tpage_name":"mineb-vis-pris"}],[74579998,{"idx":30,"name":"sewer-pipe-rim-05","tpage_name":"sewm-vis-tfrag"}],[41418753,{"idx":1,"name":"wascitya-stone-top","tpage_name":"wascitya-vis-tfrag"}],[60883017,{"idx":73,"name":"mine-blue-metal-01","tpage_name":"mineb-vis-pris"}],[74579997,{"idx":29,"name":"sewer-concrete-edge-02","tpage_name":"sewm-vis-tfrag"}],[41418752,{"idx":0,"name":"wascitya-stone-bottom","tpage_name":"wascitya-vis-tfrag"}],[60883016,{"idx":72,"name":"mine-white-stripe-metal-01","tpage_name":"mineb-vis-pris"}],[74579996,{"idx":28,"name":"sewer-scaffold-01","tpage_name":"sewm-vis-tfrag"}],[20906060,{"idx":76,"name":"stdmb-track-side-01","tpage_name":"stadiumb-vis-tfrag"}],[39911428,{"idx":4,"name":"wstd-lava-base-dest","tpage_name":"wasstada-alpha"}],[121176076,{"idx":12,"name":"daxtergoggles","tpage_name":"hiphog-vis-pris"}],[118685716,{"idx":20,"name":"king-precursermetal-decor","tpage_name":"ljkcdmkl-pris2"}],[106233916,{"idx":60,"name":"jakchires-facert","tpage_name":"mined-pris"}],[39911426,{"idx":2,"name":"wstd-lava-base","tpage_name":"wasstada-alpha"}],[121176074,{"idx":10,"name":"daxterfoot","tpage_name":"hiphog-vis-pris"}],[118685714,{"idx":18,"name":"king-leg","tpage_name":"ljkcdmkl-pris2"}],[106233914,{"idx":58,"name":"jakchires-eyelid","tpage_name":"mined-pris"}],[39845894,{"idx":6,"name":"nstb-water","tpage_name":"nstb-vis-water"}],[121110542,{"idx":14,"name":"hip-tbotblue01","tpage_name":"hiphog-vis-tfrag"}],[118620182,{"idx":22,"name":"jakchires-facelft","tpage_name":"ljkcdmkl-pris"}],[106168382,{"idx":62,"name":"mined-pillar-molten-top","tpage_name":"mined-tfrag"}],[14352384,{"idx":0,"name":"map-ctygenb","tpage_name":"ctygenb-minimap"}],[10616844,{"idx":12,"name":"sign-wide-b","tpage_name":"ctyslumb-sprite"}],[8716339,{"idx":51,"name":"baron-neon-mouth-on","tpage_name":"ctysluma-sprite"}],[39845893,{"idx":5,"name":"environment-nstb-water","tpage_name":"nstb-vis-water"}],[121110541,{"idx":13,"name":"hip-tbotred01","tpage_name":"hiphog-vis-tfrag"}],[118620181,{"idx":21,"name":"jakchires-eyelid","tpage_name":"ljkcdmkl-pris"}],[106168381,{"idx":61,"name":"mined-pillar-top-dest","tpage_name":"mined-tfrag"}],[61079638,{"idx":86,"name":"pecker-wingtop","tpage_name":"minec-vis-pris"}],[129105922,{"idx":2,"name":"sewer-waterfall-02-n","tpage_name":"sewn-vis-water"}],[94240882,{"idx":114,"name":"intr-grey","tpage_name":"intpfall-vis-tfrag"}],[39780369,{"idx":17,"name":"nsta-goo-base","tpage_name":"nstb-vis-pris"}],[21299242,{"idx":42,"name":"vehicle-wheel-blur-01","tpage_name":"wasall-pris"}],[39714829,{"idx":13,"name":"nsta-cave-top-platform-shrub","tpage_name":"nstb-vis-shrub"}],[71434320,{"idx":80,"name":"wstd-scaffold-strut","tpage_name":"wasstadc-tfrag"}],[91357200,{"idx":16,"name":"klever-blackstrap","tpage_name":"lkleever-pris"}],[39714828,{"idx":12,"name":"nsta-cave-sides-shrub","tpage_name":"nstb-vis-shrub"}],[71434319,{"idx":79,"name":"wstd-fight-plat-floor-02","tpage_name":"wasstadc-tfrag"}],[91357199,{"idx":15,"name":"klever-armor-02","tpage_name":"lkleever-pris"}],[39714827,{"idx":11,"name":"nst-egg-bulb-01","tpage_name":"nstb-vis-shrub"}],[71434318,{"idx":78,"name":"wstd-fight-plat-floor-01","tpage_name":"wasstadc-tfrag"}],[91357198,{"idx":14,"name":"klever-armor-01","tpage_name":"lkleever-pris"}],[39714824,{"idx":8,"name":"nsta-finger-pipe","tpage_name":"nstb-vis-shrub"}],[71434315,{"idx":75,"name":"wstd-fight-plat-grate","tpage_name":"wasstadc-tfrag"}],[91357195,{"idx":11,"name":"klever-chest","tpage_name":"lkleever-pris"}],[43647018,{"idx":42,"name":"burning-bush-off","tpage_name":"waswide-sprite"}],[71434314,{"idx":74,"name":"wstd-fight-plat-wall-01","tpage_name":"wasstadc-tfrag"}],[91357194,{"idx":10,"name":"klever-brownstrap","tpage_name":"lkleever-pris"}],[71434313,{"idx":73,"name":"wstd-scaffold-bar","tpage_name":"wasstadc-tfrag"}],[91357193,{"idx":9,"name":"klever-arm","tpage_name":"lkleever-pris"}],[91357190,{"idx":6,"name":"klever-face-01scars","tpage_name":"lkleever-pris"}],[71434308,{"idx":68,"name":"wstd-fight-plat-tube","tpage_name":"wasstadc-tfrag"}],[91357188,{"idx":4,"name":"klever-eyelid","tpage_name":"lkleever-pris"}],[62717958,{"idx":6,"name":"cguardgame-face","tpage_name":"ctypesa-pris"}],[63963138,{"idx":2,"name":"wang_2","tpage_name":"desert-hfrag"}],[39649311,{"idx":31,"name":"nstab-mekbrain-plain","tpage_name":"nstb-vis-tfrag"}],[62717957,{"idx":5,"name":"cguardgame-ear","tpage_name":"ctypesa-pris"}],[49020977,{"idx":49,"name":"sewer-plate-01","tpage_name":"sewe-vis-tfrag"}],[63963137,{"idx":1,"name":"wang_1","tpage_name":"desert-hfrag"}],[39649310,{"idx":30,"name":"nsta-cave-trim-top","tpage_name":"nstb-vis-tfrag"}],[49610831,{"idx":79,"name":"sewer-red-light-01","tpage_name":"sewf-vis-tfrag"}],[67043351,{"idx":23,"name":"vinroom-small-monitor-06","tpage_name":"vinroom-sprite"}],[62062631,{"idx":39,"name":"flying-bird-12","tpage_name":"wascityb-sprite"}],[39649309,{"idx":29,"name":"nsta-cave-trim","tpage_name":"nstb-vis-tfrag"}],[49610830,{"idx":78,"name":"sewer-yellow-light-02","tpage_name":"sewf-vis-tfrag"}],[67043350,{"idx":22,"name":"vinroom-small-monitor-05","tpage_name":"vinroom-sprite"}],[62062630,{"idx":38,"name":"flying-bird-11","tpage_name":"wascityb-sprite"}],[39649308,{"idx":28,"name":"nsta-cave-mites","tpage_name":"nstb-vis-tfrag"}],[49610828,{"idx":76,"name":"sewer-metal-trim-02","tpage_name":"sewf-vis-tfrag"}],[67043348,{"idx":20,"name":"vinroom-small-monitor-03","tpage_name":"vinroom-sprite"}],[62062628,{"idx":36,"name":"flying-bird-09","tpage_name":"wascityb-sprite"}],[39649306,{"idx":26,"name":"nsta-cave-sides","tpage_name":"nstb-vis-tfrag"}],[49610827,{"idx":75,"name":"sewer-small-light-01","tpage_name":"sewf-vis-tfrag"}],[67043347,{"idx":19,"name":"vinroom-small-monitor-02","tpage_name":"vinroom-sprite"}],[62062627,{"idx":35,"name":"flying-bird-08","tpage_name":"wascityb-sprite"}],[39649305,{"idx":25,"name":"nsta-cave-top-platform","tpage_name":"nstb-vis-tfrag"}],[49610826,{"idx":74,"name":"sewer-metal-block-02","tpage_name":"sewf-vis-tfrag"}],[67043346,{"idx":18,"name":"vinroom-small-monitor-01","tpage_name":"vinroom-sprite"}],[62062626,{"idx":34,"name":"flying-bird-07","tpage_name":"wascityb-sprite"}],[39649304,{"idx":24,"name":"nsta-cave-teeth","tpage_name":"nstb-vis-tfrag"}],[49610825,{"idx":73,"name":"sewer-scaffold-03","tpage_name":"sewf-vis-tfrag"}],[67043345,{"idx":17,"name":"tinydot","tpage_name":"vinroom-sprite"}],[62062625,{"idx":33,"name":"flying-bird-06","tpage_name":"wascityb-sprite"}],[39649303,{"idx":23,"name":"nsta-fingerback","tpage_name":"nstb-vis-tfrag"}],[49610824,{"idx":72,"name":"sewer-metal-trim-01","tpage_name":"sewf-vis-tfrag"}],[67043344,{"idx":16,"name":"screen-15","tpage_name":"vinroom-sprite"}],[62062624,{"idx":32,"name":"flying-bird-05","tpage_name":"wascityb-sprite"}],[39649302,{"idx":22,"name":"nstab-basekor","tpage_name":"nstb-vis-tfrag"}],[39649301,{"idx":21,"name":"nestb-basekor","tpage_name":"nstb-vis-tfrag"}],[39649299,{"idx":19,"name":"nsta-cave-plain-edging","tpage_name":"nstb-vis-tfrag"}],[39649298,{"idx":18,"name":"nsta-cave-carved-surface","tpage_name":"nstb-vis-tfrag"}],[39649297,{"idx":17,"name":"nsta-cave-carved-surface-bottom","tpage_name":"nstb-vis-tfrag"}],[39649296,{"idx":16,"name":"nsta-cave-stalags-04-insides","tpage_name":"nstb-vis-tfrag"}],[39649295,{"idx":15,"name":"nsta-cave-plain","tpage_name":"nstb-vis-tfrag"}],[39649292,{"idx":12,"name":"nsta-cave-floor-01","tpage_name":"nstb-vis-tfrag"}],[39649290,{"idx":10,"name":"nstab-eggskin","tpage_name":"nstb-vis-tfrag"}],[39649286,{"idx":6,"name":"nsta-finger-pipe","tpage_name":"nstb-vis-tfrag"}],[73859137,{"idx":65,"name":"sewer-pool-rim-02","tpage_name":"sewg-vis-tfrag"}],[91291657,{"idx":9,"name":"fort-door-metal","tpage_name":"gungame-vis-tfrag"}],[39649285,{"idx":5,"name":"nsta-cave-stalags-04","tpage_name":"nstb-vis-tfrag"}],[73859136,{"idx":64,"name":"sewer-metal-edge-01","tpage_name":"sewg-vis-tfrag"}],[91291656,{"idx":8,"name":"common-gun-panel-03","tpage_name":"gungame-vis-tfrag"}],[39649282,{"idx":2,"name":"nsta-wall","tpage_name":"nstb-vis-tfrag"}],[73859133,{"idx":61,"name":"sewer-plate-03-hitweak","tpage_name":"sewg-vis-tfrag"}],[91291653,{"idx":5,"name":"city-port-metal","tpage_name":"gungame-vis-tfrag"}],[62259224,{"idx":24,"name":"wing01","tpage_name":"ctycarc-pris"}],[61014044,{"idx":28,"name":"minc-light-gray","tpage_name":"minec-vis-shrub"}],[57278504,{"idx":40,"name":"metalflut-leatherstrap-b-01","tpage_name":"waswide-vis-pris"}],[52297784,{"idx":56,"name":"freehq-projector01","tpage_name":"freehq-tfrag"}],[67239944,{"idx":8,"name":"vin-floor-01","tpage_name":"vinroom-vis-tfrag"}],[48562244,{"idx":68,"name":"jakchires-eyebrow","tpage_name":"sewa-vis-pris"}],[81723488,{"idx":96,"name":"jakchires-eyebrow","tpage_name":"ljndklev-pris"}],[74579994,{"idx":26,"name":"sewer-metal-03","tpage_name":"sewm-vis-tfrag"}],[60883014,{"idx":70,"name":"mine-red-white-metal-01","tpage_name":"mineb-vis-pris"}],[39583745,{"idx":1,"name":"nstb-quicksand-dest","tpage_name":"nstb-vis-alpha"}],[81723487,{"idx":95,"name":"jakchires-eye","tpage_name":"ljndklev-pris"}],[74579993,{"idx":25,"name":"sewer-pipe-rim-09","tpage_name":"sewm-vis-tfrag"}],[60883013,{"idx":69,"name":"mine-red-stripe-metal-01","tpage_name":"mineb-vis-pris"}],[39583744,{"idx":0,"name":"nstb-quicksand-scroll","tpage_name":"nstb-vis-alpha"}],[73924620,{"idx":12,"name":"sew-gasstep-tube","tpage_name":"sewg-vis-shrub"}],[38862868,{"idx":20,"name":"nsta-fingerback","tpage_name":"nsta-vis-tfrag"}],[73924617,{"idx":9,"name":"sewer-pipe-rim-02","tpage_name":"sewg-vis-shrub"}],[73596945,{"idx":17,"name":"sewer-metal-trim-02","tpage_name":"sewi-vis-tfrag"}],[38862851,{"idx":3,"name":"nstab-eggskin","tpage_name":"nsta-vis-tfrag"}],[38862848,{"idx":0,"name":"nsta-wall","tpage_name":"nsta-vis-tfrag"}],[393230,{"idx":14,"name":"krimsoncrate-04","tpage_name":"level-default-tfrag"}],[8912924,{"idx":28,"name":"city-slum-wood-plain","tpage_name":"ctysluma-vis-tfrag"}],[393229,{"idx":13,"name":"krimsoncrate-02","tpage_name":"level-default-tfrag"}],[393228,{"idx":12,"name":"krimsoncrate-01","tpage_name":"level-default-tfrag"}],[8912922,{"idx":26,"name":"city-slumbase-wall-broken-to-bricks","tpage_name":"ctysluma-vis-tfrag"}],[393227,{"idx":11,"name":"grunt-gem-01","tpage_name":"level-default-tfrag"}],[8912921,{"idx":25,"name":"city-slum-awning-rustedmetal","tpage_name":"ctysluma-vis-tfrag"}],[38731907,{"idx":131,"name":"flying-bird-04","tpage_name":"wasstada-sprite"}],[73596947,{"idx":19,"name":"sewer-metal-02","tpage_name":"sewi-vis-tfrag"}],[58654787,{"idx":67,"name":"holo-line","tpage_name":"hiphog-sprite"}],[393226,{"idx":10,"name":"fuel-cell-inside","tpage_name":"level-default-tfrag"}],[38731906,{"idx":130,"name":"flying-bird-03","tpage_name":"wasstada-sprite"}],[73596946,{"idx":18,"name":"sewer-pipe-rim-05","tpage_name":"sewi-vis-tfrag"}],[58654786,{"idx":66,"name":"vinroom-tv-circle","tpage_name":"hiphog-sprite"}],[393225,{"idx":9,"name":"fuel-cell-endcaps","tpage_name":"level-default-tfrag"}],[8912919,{"idx":23,"name":"city-slum-roof-1","tpage_name":"ctysluma-vis-tfrag"}],[393224,{"idx":8,"name":"egg-ndimadman","tpage_name":"level-default-tfrag"}],[8912918,{"idx":22,"name":"city-slum-roof-side","tpage_name":"ctysluma-vis-tfrag"}],[393223,{"idx":7,"name":"common-transparent","tpage_name":"level-default-tfrag"}],[8912917,{"idx":21,"name":"city-slum-roof","tpage_name":"ctysluma-vis-tfrag"}],[393222,{"idx":6,"name":"common-black","tpage_name":"level-default-tfrag"}],[8912916,{"idx":20,"name":"slum-stone-03","tpage_name":"ctysluma-vis-tfrag"}],[393221,{"idx":5,"name":"cmn-precursor-metal-plain-01small","tpage_name":"level-default-tfrag"}],[8912915,{"idx":19,"name":"slum-stone-broken","tpage_name":"ctysluma-vis-tfrag"}],[393220,{"idx":4,"name":"charHOLD","tpage_name":"level-default-tfrag"}],[8912914,{"idx":18,"name":"city-slumwall-06","tpage_name":"ctysluma-vis-tfrag"}],[8912912,{"idx":16,"name":"city-slumbase-wall-broken-to-bricks-2","tpage_name":"ctysluma-vis-tfrag"}],[85196832,{"idx":32,"name":"intcept-b-teeth01","tpage_name":"desrace1-pris"}],[85196831,{"idx":31,"name":"intcept-b-pipe01","tpage_name":"desrace1-pris"}],[85196830,{"idx":30,"name":"intcept-b-gun01","tpage_name":"desrace1-pris"}],[8912909,{"idx":13,"name":"city-slum-bigpipe-04","tpage_name":"ctysluma-vis-tfrag"}],[85196829,{"idx":29,"name":"intcept-b-base-patern02","tpage_name":"desrace1-pris"}],[8912908,{"idx":12,"name":"city-slumwall-01","tpage_name":"ctysluma-vis-tfrag"}],[85196828,{"idx":28,"name":"intcept-b-base-patern01","tpage_name":"desrace1-pris"}],[8912907,{"idx":11,"name":"city-slumbase-wall","tpage_name":"ctysluma-vis-tfrag"}],[122159108,{"idx":4,"name":"facb_temp_rust2","tpage_name":"factoryb-vis-tfrag"}],[119668748,{"idx":12,"name":"citn-allflesh","tpage_name":"ljinx-pris"}],[38732048,{"idx":272,"name":"male5_02","tpage_name":"wasstada-sprite"}],[85196827,{"idx":27,"name":"intcept-b-base-green01","tpage_name":"desrace1-pris"}],[8912906,{"idx":10,"name":"city-slum-hangsign-03","tpage_name":"ctysluma-vis-tfrag"}],[122159107,{"idx":3,"name":"fac-tower-door-03","tpage_name":"factoryb-vis-tfrag"}],[119668747,{"idx":11,"name":"citn-alleyebrow","tpage_name":"ljinx-pris"}],[38732047,{"idx":271,"name":"male5_01","tpage_name":"wasstada-sprite"}],[8912905,{"idx":9,"name":"city-slum-hangsign-02","tpage_name":"ctysluma-vis-tfrag"}],[122159106,{"idx":2,"name":"facb_redmetal-01","tpage_name":"factoryb-vis-tfrag"}],[119668746,{"idx":10,"name":"citn-allbuckel","tpage_name":"ljinx-pris"}],[38732046,{"idx":270,"name":"male5_00","tpage_name":"wasstada-sprite"}],[10879093,{"idx":117,"name":"city-tile-LOW","tpage_name":"ctyslumb-vis-tfrag"}],[16580608,{"idx":0,"name":"ctyfarm-cab-body","tpage_name":"ctyfarmb-sprite"}],[106954798,{"idx":46,"name":"vol-dk-sat-environment-map","tpage_name":"volcanoa-vis-tfrag"}],[99483718,{"idx":70,"name":"dp-bipedal-skin-ribs-01","tpage_name":"lformach-vis-pris"}],[14680102,{"idx":38,"name":"jakchires-pants","tpage_name":"ctygenb-vis-pris"}],[10879092,{"idx":116,"name":"cityslumc-awning-LOW","tpage_name":"ctyslumb-vis-tfrag"}],[106954797,{"idx":45,"name":"vola-dp-tendon","tpage_name":"volcanoa-vis-tfrag"}],[99483717,{"idx":69,"name":"dp-bipedal-skin-plate-01","tpage_name":"lformach-vis-pris"}],[14680101,{"idx":37,"name":"jakchires-lightbrownspat","tpage_name":"ctygenb-vis-pris"}],[10879091,{"idx":115,"name":"cityslumc-pipe","tpage_name":"ctyslumb-vis-tfrag"}],[99483716,{"idx":68,"name":"dp-bipedal-skin-bulge-02","tpage_name":"lformach-vis-pris"}],[14680097,{"idx":33,"name":"jakchires-hair","tpage_name":"ctygenb-vis-pris"}],[10879087,{"idx":111,"name":"cityslumc-door","tpage_name":"ctyslumb-vis-tfrag"}],[10879086,{"idx":110,"name":"cityslumc-lamp-red","tpage_name":"ctyslumb-vis-tfrag"}],[14680095,{"idx":31,"name":"jakchires-facert","tpage_name":"ctygenb-vis-pris"}],[10879085,{"idx":109,"name":"ctyslumc-wall-colored2","tpage_name":"ctyslumb-vis-tfrag"}],[14680094,{"idx":30,"name":"jakchires-facelft","tpage_name":"ctygenb-vis-pris"}],[10879084,{"idx":108,"name":"cityslumc-metal-trim","tpage_name":"ctyslumb-vis-tfrag"}],[99483709,{"idx":61,"name":"dp-bipedal-dk-sm-plate-01","tpage_name":"lformach-vis-pris"}],[14680093,{"idx":29,"name":"jakchires-eyelid","tpage_name":"ctygenb-vis-pris"}],[10879083,{"idx":107,"name":"ctyslumc-wall-colored","tpage_name":"ctyslumb-vis-tfrag"}],[49741842,{"idx":18,"name":"sewer-plate-05","tpage_name":"sewf-vis-pris"}],[262299,{"idx":155,"name":"edge-cloud","tpage_name":"level-default-sprite"}],[14680067,{"idx":3,"name":"airlock-door-metal2","tpage_name":"ctygenb-vis-pris"}],[10879057,{"idx":81,"name":"ctyslumc-grate1","tpage_name":"ctyslumb-vis-tfrag"}],[94240783,{"idx":15,"name":"palcab-swingp-trim","tpage_name":"intpfall-vis-tfrag"}],[60620923,{"idx":123,"name":"jakchires-precarmor-01","tpage_name":"minea-vis-pris"}],[262298,{"idx":154,"name":"redpuff","tpage_name":"level-default-sprite"}],[14680066,{"idx":2,"name":"airlock-door-main","tpage_name":"ctygenb-vis-pris"}],[94240782,{"idx":14,"name":"palcab-lowres-ctyslum-roof-03","tpage_name":"intpfall-vis-tfrag"}],[60620922,{"idx":122,"name":"jakchires-pants","tpage_name":"minea-vis-pris"}],[94240781,{"idx":13,"name":"palcab-lowres-ctyslum-wall-03","tpage_name":"intpfall-vis-tfrag"}],[60620921,{"idx":121,"name":"jakchires-lightbrownspat","tpage_name":"minea-vis-pris"}],[61079636,{"idx":84,"name":"pecker-teeth","tpage_name":"minec-vis-pris"}],[129105920,{"idx":0,"name":"sewer-water-highlight-01-n","tpage_name":"sewn-vis-water"}],[127860740,{"idx":4,"name":"palcab-lowres-ctyslum-wall-03","tpage_name":"lfaccity-alpha"}],[94240880,{"idx":112,"name":"tpal-horiz-trim02","tpage_name":"intpfall-vis-tfrag"}],[39780367,{"idx":15,"name":"nestb-mektunnel","tpage_name":"nstb-vis-pris"}],[21299240,{"idx":40,"name":"vehicle-snake-tread-02","tpage_name":"wasall-pris"}],[94240780,{"idx":12,"name":"palcab-lowres-ctyslum-wall-02","tpage_name":"intpfall-vis-tfrag"}],[60620920,{"idx":120,"name":"jakchires-leatherpouch","tpage_name":"minea-vis-pris"}],[458850,{"idx":98,"name":"jakc-glovetop","tpage_name":"level-default-pris"}],[20840482,{"idx":34,"name":"jakchires-eyelid","tpage_name":"stadiumb-vis-pris"}],[76480530,{"idx":18,"name":"daxtertuft","tpage_name":"freehq-pris"}],[35389590,{"idx":150,"name":"handcuff-03","tpage_name":"introcst-pris"}],[458849,{"idx":97,"name":"jakc-forearm-arm","tpage_name":"level-default-pris"}],[76480529,{"idx":17,"name":"daxterteeth","tpage_name":"freehq-pris"}],[35389589,{"idx":149,"name":"handcuff-02","tpage_name":"introcst-pris"}],[458848,{"idx":96,"name":"jakc-flap","tpage_name":"level-default-pris"}],[76480528,{"idx":16,"name":"daxternose","tpage_name":"freehq-pris"}],[35389588,{"idx":148,"name":"handcuff-01","tpage_name":"introcst-pris"}],[458847,{"idx":95,"name":"jakc-finger","tpage_name":"level-default-pris"}],[76480527,{"idx":15,"name":"daxterlense","tpage_name":"freehq-pris"}],[35389587,{"idx":147,"name":"common-black","tpage_name":"introcst-pris"}],[458846,{"idx":94,"name":"jakc-face","tpage_name":"level-default-pris"}],[76480526,{"idx":14,"name":"daxterhelmetplain","tpage_name":"freehq-pris"}],[35389586,{"idx":146,"name":"beacon-lens","tpage_name":"introcst-pris"}],[73728078,{"idx":78,"name":"sewer-plate-01-hitweak","tpage_name":"sewh-vis-tfrag"}],[12320810,{"idx":42,"name":"city-ind-wall-04","tpage_name":"ctyindb-vis-tfrag"}],[118751232,{"idx":0,"name":"bam-eyelight","tpage_name":"wcaseem-pris2"}],[117506052,{"idx":4,"name":"freehq-wal-tilem07","tpage_name":"freehq-shrub"}],[12255237,{"idx":5,"name":"city-ind-decal-01","tpage_name":"ctyindb-vis-shrub"}],[12255236,{"idx":4,"name":"city-ind-decal-03","tpage_name":"ctyindb-vis-shrub"}],[12255235,{"idx":3,"name":"city-ind-decal-02","tpage_name":"ctyindb-vis-shrub"}],[12255234,{"idx":2,"name":"city-ind-stain-01","tpage_name":"ctyindb-vis-shrub"}],[12255233,{"idx":1,"name":"city-ind-blotch-withstreaks-01","tpage_name":"ctyindb-vis-shrub"}],[12255232,{"idx":0,"name":"city-ind-stain-02","tpage_name":"ctyindb-vis-shrub"}],[60555305,{"idx":41,"name":"minc-rust-pipe-04","tpage_name":"minea-vis-tfrag"}],[35651705,{"idx":121,"name":"veger-iris","tpage_name":"introcst-pris2"}],[60555304,{"idx":40,"name":"minc-train-pipe-01","tpage_name":"minea-vis-tfrag"}],[35651704,{"idx":120,"name":"veger-eyelid","tpage_name":"introcst-pris2"}],[88277040,{"idx":48,"name":"cguard-air-train-light","tpage_name":"introcst-tfrag"}],[100728840,{"idx":8,"name":"sig-flask","tpage_name":"ljaksig-pris2"}],[60555302,{"idx":38,"name":"minc-blue-paint-rust03","tpage_name":"minea-vis-tfrag"}],[35651702,{"idx":118,"name":"veger-walkingstick-03","tpage_name":"introcst-pris2"}],[67829802,{"idx":42,"name":"vinroom-tv-text-n","tpage_name":"freehq-sprite"}],[115081239,{"idx":23,"name":"terraformer-organic-01","tpage_name":"desboss1-pris"}],[60555294,{"idx":30,"name":"minb-stone12","tpage_name":"minea-vis-tfrag"}],[35651694,{"idx":110,"name":"veger-shoulderplatemetal","tpage_name":"introcst-pris2"}],[75759633,{"idx":17,"name":"daxterteeth","tpage_name":"onintent-pris"}],[74514453,{"idx":21,"name":"roboguard-die-stamped-metal-blue","tpage_name":"sewj-vis-pris"}],[49020976,{"idx":48,"name":"sewer-metal-block-05","tpage_name":"sewe-vis-tfrag"}],[63963136,{"idx":0,"name":"wang_0","tpage_name":"desert-hfrag"}],[62717956,{"idx":4,"name":"cguardgame-chestplate","tpage_name":"ctypesa-pris"}],[11730955,{"idx":11,"name":"city-inda-scorch-big","tpage_name":"ctyinda-vis-shrub"}],[8716352,{"idx":64,"name":"baron-neon-white-c","tpage_name":"ctysluma-sprite"}],[11403332,{"idx":68,"name":"ctyslumc-vine-hang-a","tpage_name":"ctyslumc-vis-tfrag"}],[49020975,{"idx":47,"name":"strip-black","tpage_name":"sewe-vis-tfrag"}],[62717955,{"idx":3,"name":"cguardgame-boottop","tpage_name":"ctypesa-pris"}],[11730954,{"idx":10,"name":"city-inda-scorch-small","tpage_name":"ctyinda-vis-shrub"}],[8716351,{"idx":63,"name":"baron-neon-white-b-on","tpage_name":"ctysluma-sprite"}],[11403328,{"idx":64,"name":"ctyslumc-brown","tpage_name":"ctyslumc-vis-tfrag"}],[41287691,{"idx":11,"name":"wstd-rock-shrubs","tpage_name":"wasstada-shrub"}],[11403371,{"idx":107,"name":"cityslumc-door-metal","tpage_name":"ctyslumc-vis-tfrag"}],[983074,{"idx":34,"name":"dk-maker-idol-tubes-01","tpage_name":"halfpipe-pris"}],[62259203,{"idx":3,"name":"gauge01","tpage_name":"ctycarc-pris"}],[61014023,{"idx":7,"name":"minc-strut-01","tpage_name":"minec-vis-shrub"}],[52297763,{"idx":35,"name":"freehq-ground-tile-set1-tm","tpage_name":"freehq-tfrag"}],[41287690,{"idx":10,"name":"nsta-transparent","tpage_name":"wasstada-shrub"}],[11403370,{"idx":106,"name":"cityslumc-door","tpage_name":"ctyslumc-vis-tfrag"}],[220529060,{"idx":420,"name":"bluesage-leatherbuckle","tpage_name":"museum4-pris"}],[983073,{"idx":33,"name":"dk-maker-idol-metal-01","tpage_name":"halfpipe-pris"}],[28049422,{"idx":14,"name":"tpal-horiz-trim02","tpage_name":"intpalrf-tfrag"}],[94371910,{"idx":70,"name":"palace-break-spike02","tpage_name":"intpfall-vis-pris"}],[35651620,{"idx":36,"name":"samos-eyelid","tpage_name":"introcst-pris2"}],[11403369,{"idx":105,"name":"cityslumc-lamp-red","tpage_name":"ctyslumc-vis-tfrag"}],[10944512,{"idx":0,"name":"map-ctyslumc","tpage_name":"ctyslumc-minimap"}],[983072,{"idx":32,"name":"dk-maker-idol-head-01","tpage_name":"halfpipe-pris"}],[61014021,{"idx":5,"name":"minc-rust-01","tpage_name":"minec-vis-shrub"}],[52297761,{"idx":33,"name":"freehq-ground-tile-set1-rbc","tpage_name":"freehq-tfrag"}],[11403368,{"idx":104,"name":"cityslumc-door-plate","tpage_name":"ctyslumc-vis-tfrag"}],[983071,{"idx":31,"name":"dk-maker-idol-globes-dk-01","tpage_name":"halfpipe-pris"}],[11403367,{"idx":103,"name":"cityslumc-purple-plain","tpage_name":"ctyslumc-vis-tfrag"}],[983070,{"idx":30,"name":"dk-maker-idol-globes-01","tpage_name":"halfpipe-pris"}],[61014019,{"idx":3,"name":"minc-rocky-ground-01","tpage_name":"minec-vis-shrub"}],[52297759,{"idx":31,"name":"freehq-monitor04","tpage_name":"freehq-tfrag"}],[11403366,{"idx":102,"name":"ctyslumc-wall-trim","tpage_name":"ctyslumc-vis-tfrag"}],[983069,{"idx":29,"name":"dk-maker-idol-eye-dk-01","tpage_name":"halfpipe-pris"}],[61014017,{"idx":1,"name":"minc-light","tpage_name":"minec-vis-shrub"}],[52297757,{"idx":29,"name":"freehq-ground-tile-set1-lm","tpage_name":"freehq-tfrag"}],[11403364,{"idx":100,"name":"cityslumc-purple-column-2","tpage_name":"ctyslumc-vis-tfrag"}],[983067,{"idx":27,"name":"dk-maker-idol-collar-02","tpage_name":"halfpipe-pris"}],[71106565,{"idx":5,"name":"wstd-floor-panel01","tpage_name":"wasstadb-tfrag"}],[61014016,{"idx":0,"name":"minc-bolt","tpage_name":"minec-vis-shrub"}],[52297756,{"idx":28,"name":"freehq-panel-05","tpage_name":"freehq-tfrag"}],[11403363,{"idx":99,"name":"cityslumc-purple-column","tpage_name":"ctyslumc-vis-tfrag"}],[983066,{"idx":26,"name":"dk-maker-idol-collar-01","tpage_name":"halfpipe-pris"}],[11403362,{"idx":98,"name":"cityslumc-gold-trim","tpage_name":"ctyslumc-vis-tfrag"}],[52297754,{"idx":26,"name":"freehq-monitor01","tpage_name":"freehq-tfrag"}],[11403361,{"idx":97,"name":"cityslumc-little-gold","tpage_name":"ctyslumc-vis-tfrag"}],[11403360,{"idx":96,"name":"cityslumc-top-pillar","tpage_name":"ctyslumc-vis-tfrag"}],[52297752,{"idx":24,"name":"freehq-panel-01","tpage_name":"freehq-tfrag"}],[11403359,{"idx":95,"name":"cityslumc-pinkish-purple","tpage_name":"ctyslumc-vis-tfrag"}],[52297751,{"idx":23,"name":"freehq-green-light","tpage_name":"freehq-tfrag"}],[11403358,{"idx":94,"name":"ctyslumc-overhang-03","tpage_name":"ctyslumc-vis-tfrag"}],[52297750,{"idx":22,"name":"freehq-blue-light","tpage_name":"freehq-tfrag"}],[11403357,{"idx":93,"name":"ctyslumc-wall-sliver","tpage_name":"ctyslumc-vis-tfrag"}],[52297749,{"idx":21,"name":"freehq-gray-metal-disc07","tpage_name":"freehq-tfrag"}],[11403356,{"idx":92,"name":"cityslumc-awning","tpage_name":"ctyslumc-vis-tfrag"}],[11403355,{"idx":91,"name":"city-tile","tpage_name":"ctyslumc-vis-tfrag"}],[52297747,{"idx":19,"name":"freehq-gray-metal-disc05","tpage_name":"freehq-tfrag"}],[11403354,{"idx":90,"name":"ctyslumc-roof","tpage_name":"ctyslumc-vis-tfrag"}],[11403353,{"idx":89,"name":"cityslumc-grey-side-pillar","tpage_name":"ctyslumc-vis-tfrag"}],[52297745,{"idx":17,"name":"freehq-handle-01","tpage_name":"freehq-tfrag"}],[11403352,{"idx":88,"name":"ctyslumc-overhang-02","tpage_name":"ctyslumc-vis-tfrag"}],[52297744,{"idx":16,"name":"freehq-gray-metal-disc04","tpage_name":"freehq-tfrag"}],[11403351,{"idx":87,"name":"cityslumc-wall-surface-01","tpage_name":"ctyslumc-vis-tfrag"}],[52297743,{"idx":15,"name":"freehq-gray-metal-disc03","tpage_name":"freehq-tfrag"}],[11403350,{"idx":86,"name":"ctyslumc-overhang-01","tpage_name":"ctyslumc-vis-tfrag"}],[52297742,{"idx":14,"name":"freehq-wal-tilem01","tpage_name":"freehq-tfrag"}],[11403349,{"idx":85,"name":"ctyslumc-railing-trim","tpage_name":"ctyslumc-vis-tfrag"}],[48562201,{"idx":25,"name":"environment-oldmetal","tpage_name":"sewa-vis-pris"}],[52297741,{"idx":13,"name":"freehq-gray-metal-disc02","tpage_name":"freehq-tfrag"}],[11403348,{"idx":84,"name":"ctyslumc-floor-base","tpage_name":"ctyslumc-vis-tfrag"}],[49610802,{"idx":50,"name":"sewer-scaffold-01","tpage_name":"sewf-vis-tfrag"}],[60817422,{"idx":14,"name":"minc-blue-paint-rust01","tpage_name":"mineb-vis-shrub"}],[95879171,{"idx":3,"name":"torn-armlft","tpage_name":"ltorn-pris2"}],[8716368,{"idx":80,"name":"red-tracer","tpage_name":"ctysluma-sprite"}],[11403346,{"idx":82,"name":"ctyslumc-grate1","tpage_name":"ctyslumc-vis-tfrag"}],[11403336,{"idx":72,"name":"ctyslumc-grass","tpage_name":"ctyslumc-vis-tfrag"}],[57081870,{"idx":14,"name":"daxterhelmetplain","tpage_name":"waspala-pris"}],[60817410,{"idx":2,"name":"minc-light","tpage_name":"mineb-vis-shrub"}],[8716356,{"idx":68,"name":"baron-neon-white-e","tpage_name":"ctysluma-sprite"}],[8912923,{"idx":27,"name":"city-metal-wall","tpage_name":"ctysluma-vis-tfrag"}],[11403283,{"idx":19,"name":"city-slums-nail","tpage_name":"ctyslumc-vis-tfrag"}],[48496643,{"idx":3,"name":"sewer-metal-block-01","tpage_name":"sewa-vis-tfrag"}],[8716303,{"idx":15,"name":"baron-neon-blue-h-on","tpage_name":"ctysluma-sprite"}],[53805068,{"idx":12,"name":"forb-water-wave-01","tpage_name":"forestb-vis-water"}],[262328,{"idx":184,"name":"radial-gradient-yellow","tpage_name":"level-default-sprite"}],[458769,{"idx":17,"name":"gun-blue-glow","tpage_name":"level-default-pris"}],[10879100,{"idx":124,"name":"ctyslumc-bigtext","tpage_name":"ctyslumb-vis-tfrag"}],[220529117,{"idx":477,"name":"ogre-phong","tpage_name":"museum4-pris"}],[14680110,{"idx":46,"name":"bat-amulet-03","tpage_name":"ctygenb-vis-pris"}],[8847366,{"idx":6,"name":"city-slum-wire","tpage_name":"ctysluma-vis-shrub"}],[16908306,{"idx":18,"name":"city-farm-dirt-small-01","tpage_name":"ctyfarmb-vis-tfrag"}],[327684,{"idx":4,"name":"loadsave-screen","tpage_name":"level-default-water"}],[57081859,{"idx":3,"name":"daxter-furhilite","tpage_name":"waspala-pris"}],[52101139,{"idx":19,"name":"nst-egg-spider-metal","tpage_name":"nsta-vis-pris"}],[458768,{"idx":16,"name":"gun-barrel-alt","tpage_name":"level-default-pris"}],[10879099,{"idx":123,"name":"lfacrm-rubber-01","tpage_name":"ctyslumb-vis-tfrag"}],[220529116,{"idx":476,"name":"ogre-envmap","tpage_name":"museum4-pris"}],[14680109,{"idx":45,"name":"bat-amulet-02","tpage_name":"ctygenb-vis-pris"}],[99483724,{"idx":76,"name":"spawner-base-main-dead","tpage_name":"lformach-vis-pris"}],[8847365,{"idx":5,"name":"city-slum-dirt-overlay-dirt","tpage_name":"ctysluma-vis-shrub"}],[16908305,{"idx":17,"name":"city-farm-dirt-mound-blend-01","tpage_name":"ctyfarmb-vis-tfrag"}],[327683,{"idx":3,"name":"loadsave-frame","tpage_name":"level-default-water"}],[57081858,{"idx":2,"name":"daxter-eyelid","tpage_name":"waspala-pris"}],[52101138,{"idx":18,"name":"nst-egg-spider-eye","tpage_name":"nsta-vis-pris"}],[458767,{"idx":15,"name":"gun-backslit","tpage_name":"level-default-pris"}],[16580613,{"idx":5,"name":"ctyfarm-eggplant-leaf-2","tpage_name":"ctyfarmb-sprite"}],[14680108,{"idx":44,"name":"bat-amulet-01","tpage_name":"ctygenb-vis-pris"}],[106954803,{"idx":51,"name":"minc-platfrom-metal-01","tpage_name":"volcanoa-vis-tfrag"}],[99483723,{"idx":75,"name":"spawner-base-dead","tpage_name":"lformach-vis-pris"}],[8847364,{"idx":4,"name":"city-slum-bracketmetal-tiny","tpage_name":"ctysluma-vis-shrub"}],[16908304,{"idx":16,"name":"city-farm-dirtymetal-01","tpage_name":"ctyfarmb-vis-tfrag"}],[327682,{"idx":2,"name":"bomb-gradient-rim","tpage_name":"level-default-water"}],[458766,{"idx":14,"name":"environment-title","tpage_name":"level-default-pris"}],[16580612,{"idx":4,"name":"ctyfarm-eggplant-leaf-1","tpage_name":"ctyfarmb-sprite"}],[106954802,{"idx":50,"name":"minc-light","tpage_name":"volcanoa-vis-tfrag"}],[99483722,{"idx":74,"name":"environment-darkprec","tpage_name":"lformach-vis-pris"}],[8847363,{"idx":3,"name":"city-dirtywood-small","tpage_name":"ctysluma-vis-shrub"}],[16908303,{"idx":15,"name":"city-farm-cart-woodslat-02","tpage_name":"ctyfarmb-vis-tfrag"}],[327681,{"idx":1,"name":"bomb-gradient-flames","tpage_name":"level-default-water"}],[458765,{"idx":13,"name":"environment-oldmetal","tpage_name":"level-default-pris"}],[10879096,{"idx":120,"name":"city-ind-black","tpage_name":"ctyslumb-vis-tfrag"}],[16580611,{"idx":3,"name":"ctyfarm-eggplant-body","tpage_name":"ctyfarmb-sprite"}],[14680106,{"idx":42,"name":"jakchires-shoeteop","tpage_name":"ctygenb-vis-pris"}],[106954801,{"idx":49,"name":"vola-dp-organic-pipe","tpage_name":"volcanoa-vis-tfrag"}],[99483721,{"idx":73,"name":"dp-bipedal-skin-plate-small-01","tpage_name":"lformach-vis-pris"}],[8847362,{"idx":2,"name":"city-slum-cattail-grass","tpage_name":"ctysluma-vis-shrub"}],[16908302,{"idx":14,"name":"city-farm-tree-bark-01","tpage_name":"ctyfarmb-vis-tfrag"}],[327680,{"idx":0,"name":"bomb-gradient","tpage_name":"level-default-water"}],[10879095,{"idx":119,"name":"ctyslumc-wall-trim-LOW","tpage_name":"ctyslumb-vis-tfrag"}],[16580610,{"idx":2,"name":"ctyfarm-chili-stem","tpage_name":"ctyfarmb-sprite"}],[14680105,{"idx":41,"name":"jakchires-shoemetal","tpage_name":"ctygenb-vis-pris"}],[106954800,{"idx":48,"name":"min-env-mar-01","tpage_name":"volcanoa-vis-tfrag"}],[99483720,{"idx":72,"name":"dp-bipedal-toe-01","tpage_name":"lformach-vis-pris"}],[53674005,{"idx":21,"name":"fora-green-eco-vent-hole","tpage_name":"forestb-vis-tfrag"}],[8847361,{"idx":1,"name":"city-slum-blotch-withstreaks-01","tpage_name":"ctysluma-vis-shrub"}],[88277031,{"idx":39,"name":"cguard-air-train-side1","tpage_name":"introcst-tfrag"}],[74580051,{"idx":83,"name":"sewer-grindpipe","tpage_name":"sewm-vis-tfrag"}],[99483651,{"idx":3,"name":"for-egg-gem-01","tpage_name":"lformach-vis-pris"}],[16908301,{"idx":13,"name":"city-farm-aquaduct-glass-02","tpage_name":"ctyfarmb-vis-tfrag"}],[10879094,{"idx":118,"name":"ctyslumc-window-panes-LOW","tpage_name":"ctyslumb-vis-tfrag"}],[16580609,{"idx":1,"name":"ctyfarm-chili-leaf","tpage_name":"ctyfarmb-sprite"}],[14680104,{"idx":40,"name":"jakchires-shoebottom","tpage_name":"ctygenb-vis-pris"}],[106954799,{"idx":47,"name":"vol-bark-burnt-hole","tpage_name":"volcanoa-vis-tfrag"}],[99483719,{"idx":71,"name":"dp-bipedal-spine-01","tpage_name":"lformach-vis-pris"}],[53674004,{"idx":20,"name":"fora-spawn-root","tpage_name":"forestb-vis-tfrag"}],[8847360,{"idx":0,"name":"slum-ground-01-small","tpage_name":"ctysluma-vis-shrub"}],[104857611,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"oasiscst-pris"}],[148766723,{"idx":3,"name":"jakc-armor","tpage_name":"warpcast-pris"}],[117637223,{"idx":103,"name":"jakchires-jacket","tpage_name":"destrack-pris"}],[16908300,{"idx":12,"name":"city-farm-bigpipe-01","tpage_name":"ctyfarmb-vis-tfrag"}],[104857610,{"idx":10,"name":"daxterfoot","tpage_name":"oasiscst-pris"}],[148766722,{"idx":2,"name":"environment-oldmetal","tpage_name":"warpcast-pris"}],[117637222,{"idx":102,"name":"jakchires-horn","tpage_name":"destrack-pris"}],[16908299,{"idx":11,"name":"city-farm-metal-bracket-01","tpage_name":"ctyfarmb-vis-tfrag"}],[14811152,{"idx":16,"name":"city-step","tpage_name":"ctygenb-vis-tfrag"}],[12320792,{"idx":24,"name":"city-bigpipe-main-02","tpage_name":"ctyindb-vis-tfrag"}],[60620889,{"idx":89,"name":"mine-red-white-metal-01","tpage_name":"minea-vis-pris"}],[104857609,{"idx":9,"name":"daxterfinger","tpage_name":"oasiscst-pris"}],[148766721,{"idx":1,"name":"bam-hairhilite","tpage_name":"warpcast-pris"}],[117637221,{"idx":101,"name":"jakchires-hair","tpage_name":"destrack-pris"}],[16908298,{"idx":10,"name":"city-farm-metal-bracket-02","tpage_name":"ctyfarmb-vis-tfrag"}],[14811151,{"idx":15,"name":"city-roofmetal-rim","tpage_name":"ctygenb-vis-tfrag"}],[12320791,{"idx":23,"name":"city-ind-grnd-cobl-02","tpage_name":"ctyindb-vis-tfrag"}],[104857608,{"idx":8,"name":"daxterear","tpage_name":"oasiscst-pris"}],[148766720,{"idx":0,"name":"bam-eyelight","tpage_name":"warpcast-pris"}],[117637220,{"idx":100,"name":"jakchires-glovetop","tpage_name":"destrack-pris"}],[16908297,{"idx":9,"name":"city-farm-metal-panel-02","tpage_name":"ctyfarmb-vis-tfrag"}],[10879090,{"idx":114,"name":"cityslumc-lamp-gold","tpage_name":"ctyslumb-vis-tfrag"}],[14680100,{"idx":36,"name":"jakchires-leatherpouch","tpage_name":"ctygenb-vis-pris"}],[106954795,{"idx":43,"name":"vol-plat-top","tpage_name":"volcanoa-vis-tfrag"}],[99483715,{"idx":67,"name":"dp-bipedal-skin-bulge-01","tpage_name":"lformach-vis-pris"}],[60620887,{"idx":87,"name":"mine-red-metal-01","tpage_name":"minea-vis-pris"}],[104857607,{"idx":7,"name":"daxterbolt","tpage_name":"oasiscst-pris"}],[117637219,{"idx":99,"name":"jakchires-facert","tpage_name":"destrack-pris"}],[16908296,{"idx":8,"name":"city-farm-metal-panel-01","tpage_name":"ctyfarmb-vis-tfrag"}],[10879089,{"idx":113,"name":"cityslumc-lamp-small","tpage_name":"ctyslumb-vis-tfrag"}],[14680099,{"idx":35,"name":"jakchires-jacket","tpage_name":"ctygenb-vis-pris"}],[60620886,{"idx":86,"name":"mine-red-big-metal-01","tpage_name":"minea-vis-pris"}],[104857606,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"oasiscst-pris"}],[117637218,{"idx":98,"name":"jakchires-facelft","tpage_name":"destrack-pris"}],[16908295,{"idx":7,"name":"city-farm-smalldirt","tpage_name":"ctyfarmb-vis-tfrag"}],[49414223,{"idx":79,"name":"widow-pod-gun-metal","tpage_name":"sewc-vis-pris"}],[104857604,{"idx":4,"name":"daxter-orange","tpage_name":"oasiscst-pris"}],[117637216,{"idx":96,"name":"jakchires-eyebrow","tpage_name":"destrack-pris"}],[16908293,{"idx":5,"name":"city-farm-black","tpage_name":"ctyfarmb-vis-tfrag"}],[60620883,{"idx":83,"name":"mine-decal-metal-01","tpage_name":"minea-vis-pris"}],[60620842,{"idx":42,"name":"environment-oldmetal","tpage_name":"minea-vis-pris"}],[49414222,{"idx":78,"name":"widow-dull-inards","tpage_name":"sewc-vis-pris"}],[104857603,{"idx":3,"name":"daxter-furhilite","tpage_name":"oasiscst-pris"}],[117637215,{"idx":95,"name":"jakchires-eye","tpage_name":"destrack-pris"}],[16908292,{"idx":4,"name":"city-farm-sprinkle-metalbase","tpage_name":"ctyfarmb-vis-tfrag"}],[60620882,{"idx":82,"name":"mine-caution-metal-01","tpage_name":"minea-vis-pris"}],[60620841,{"idx":41,"name":"daxtertuft","tpage_name":"minea-vis-pris"}],[49414221,{"idx":77,"name":"squid-bulb-sm","tpage_name":"sewc-vis-pris"}],[104857602,{"idx":2,"name":"daxter-eyelid","tpage_name":"oasiscst-pris"}],[117637214,{"idx":94,"name":"jakchires-clips","tpage_name":"destrack-pris"}],[16908291,{"idx":3,"name":"city-farm-wall-top","tpage_name":"ctyfarmb-vis-tfrag"}],[55312408,{"idx":24,"name":"city-mark-cotton-wrap","tpage_name":"wascityb-vis-pris"}],[62783488,{"idx":0,"name":"grunt-eye-01","tpage_name":"ctypepb-pris"}],[35389528,{"idx":88,"name":"pecker-yellowfur","tpage_name":"introcst-pris"}],[60620881,{"idx":81,"name":"mine-can-metal-01","tpage_name":"minea-vis-pris"}],[60620840,{"idx":40,"name":"daxterteeth","tpage_name":"minea-vis-pris"}],[49414220,{"idx":76,"name":"roboguard-shouldershield","tpage_name":"sewc-vis-pris"}],[104857601,{"idx":1,"name":"bam-hairhilite","tpage_name":"oasiscst-pris"}],[117637213,{"idx":93,"name":"jakchires-chestplate","tpage_name":"destrack-pris"}],[16908290,{"idx":2,"name":"city-farm-stonewall-base-01","tpage_name":"ctyfarmb-vis-tfrag"}],[55312407,{"idx":23,"name":"city-mark-cotton-32x32","tpage_name":"wascityb-vis-pris"}],[35389527,{"idx":87,"name":"pecker-wingtop","tpage_name":"introcst-pris"}],[60620839,{"idx":39,"name":"daxternose","tpage_name":"minea-vis-pris"}],[49414219,{"idx":75,"name":"roboguard-headshield","tpage_name":"sewc-vis-pris"}],[104857600,{"idx":0,"name":"bam-eyelight","tpage_name":"oasiscst-pris"}],[117637212,{"idx":92,"name":"jakchires-brwnleather","tpage_name":"destrack-pris"}],[16908289,{"idx":1,"name":"city-farm-stone-wall-01","tpage_name":"ctyfarmb-vis-tfrag"}],[55312406,{"idx":22,"name":"city-mark-clay-pot-01","tpage_name":"wascityb-vis-pris"}],[35389526,{"idx":86,"name":"pecker-wingbottom","tpage_name":"introcst-pris"}],[50659376,{"idx":48,"name":"fora-spawn-root","tpage_name":"foresta-vis-tfrag"}],[49283131,{"idx":59,"name":"sonar-wave","tpage_name":"sewd-vis-pris"}],[16121887,{"idx":31,"name":"city-ind-metal-02","tpage_name":"ctyfarma-vis-tfrag"}],[15990804,{"idx":20,"name":"city-farm-veg-green-2","tpage_name":"ctyfarma-vis-pris"}],[10616843,{"idx":11,"name":"sign-wide-a","tpage_name":"ctyslumb-sprite"}],[8716338,{"idx":50,"name":"baron-neon-mouth","tpage_name":"ctysluma-sprite"}],[57081866,{"idx":10,"name":"daxterfoot","tpage_name":"waspala-pris"}],[49610786,{"idx":34,"name":"sewer-pipe-rim-05b","tpage_name":"sewf-vis-tfrag"}],[15990803,{"idx":19,"name":"city-farm-veg-chilberry-02","tpage_name":"ctyfarma-vis-pris"}],[49283129,{"idx":57,"name":"sewer-grill-01","tpage_name":"sewd-vis-pris"}],[16121885,{"idx":29,"name":"city-farm-rock-small","tpage_name":"ctyfarma-vis-tfrag"}],[10616842,{"idx":10,"name":"sign-tall-b","tpage_name":"ctyslumb-sprite"}],[8716337,{"idx":49,"name":"baron-neon-ghotee-on","tpage_name":"ctysluma-sprite"}],[57081865,{"idx":9,"name":"daxterfinger","tpage_name":"waspala-pris"}],[49610785,{"idx":33,"name":"sewer-plate-01","tpage_name":"sewf-vis-tfrag"}],[15990802,{"idx":18,"name":"city-farm-veg-cablip","tpage_name":"ctyfarma-vis-pris"}],[10616841,{"idx":9,"name":"sign-tall-a","tpage_name":"ctyslumb-sprite"}],[8716336,{"idx":48,"name":"baron-neon-ghotee","tpage_name":"ctysluma-sprite"}],[57081864,{"idx":8,"name":"daxterear","tpage_name":"waspala-pris"}],[49610784,{"idx":32,"name":"sewer-pipe-rim-07","tpage_name":"sewf-vis-tfrag"}],[15990801,{"idx":17,"name":"city-farm-sprinkle-suppport","tpage_name":"ctyfarma-vis-pris"}],[57081863,{"idx":7,"name":"daxterbolt","tpage_name":"waspala-pris"}],[49610783,{"idx":31,"name":"sewer-screw-02","tpage_name":"sewf-vis-tfrag"}],[15990800,{"idx":16,"name":"city-farm-sprinkle-metal-dirt","tpage_name":"ctyfarma-vis-pris"}],[57081862,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"waspala-pris"}],[49610782,{"idx":30,"name":"sew-gun-rim-03","tpage_name":"sewf-vis-tfrag"}],[62062622,{"idx":30,"name":"flying-bird-03","tpage_name":"wascityb-sprite"}],[49610822,{"idx":70,"name":"sewer-big-brace-trim-01","tpage_name":"sewf-vis-tfrag"}],[67043342,{"idx":14,"name":"screen-13","tpage_name":"vinroom-sprite"}],[60817442,{"idx":34,"name":"minc-blue-white-paint-safe-rust04","tpage_name":"mineb-vis-shrub"}],[57081861,{"idx":5,"name":"daxterarm","tpage_name":"waspala-pris"}],[49610781,{"idx":29,"name":"sewer-rubber-rim-01","tpage_name":"sewf-vis-tfrag"}],[49610821,{"idx":69,"name":"sewer-big-brace-02","tpage_name":"sewf-vis-tfrag"}],[67043341,{"idx":13,"name":"screen-12","tpage_name":"vinroom-sprite"}],[62062621,{"idx":29,"name":"flying-bird-02","tpage_name":"wascityb-sprite"}],[60817441,{"idx":33,"name":"minc-chain-metal-01","tpage_name":"mineb-vis-shrub"}],[57081860,{"idx":4,"name":"daxter-orange","tpage_name":"waspala-pris"}],[52101140,{"idx":20,"name":"nst-egg-spider-pipe","tpage_name":"nsta-vis-pris"}],[49610780,{"idx":28,"name":"sewer-pipe-rim-10","tpage_name":"sewf-vis-tfrag"}],[49610820,{"idx":68,"name":"sewer-big-brace-01","tpage_name":"sewf-vis-tfrag"}],[67043340,{"idx":12,"name":"screen-11","tpage_name":"vinroom-sprite"}],[62062620,{"idx":28,"name":"flying-bird-01","tpage_name":"wascityb-sprite"}],[60817440,{"idx":32,"name":"mine-moving-plat-top-lod1","tpage_name":"mineb-vis-shrub"}],[49610819,{"idx":67,"name":"sewer-brick-roof-04","tpage_name":"sewf-vis-tfrag"}],[67043339,{"idx":11,"name":"screen-10","tpage_name":"vinroom-sprite"}],[60817439,{"idx":31,"name":"mine-moving-plat-drilltip","tpage_name":"mineb-vis-shrub"}],[49610818,{"idx":66,"name":"sewer-brick-roof-03","tpage_name":"sewf-vis-tfrag"}],[67043338,{"idx":10,"name":"screen-09","tpage_name":"vinroom-sprite"}],[60817438,{"idx":30,"name":"mine-moving-plat-wheel","tpage_name":"mineb-vis-shrub"}],[57081857,{"idx":1,"name":"bam-hairhilite","tpage_name":"waspala-pris"}],[52101137,{"idx":17,"name":"nst-egg-spider-egg","tpage_name":"nsta-vis-pris"}],[49610777,{"idx":25,"name":"sewer-metal-block-04","tpage_name":"sewf-vis-tfrag"}],[10616833,{"idx":1,"name":"sign-blank","tpage_name":"ctyslumb-sprite"}],[61014024,{"idx":8,"name":"minc-rust-pipe-03","tpage_name":"minec-vis-shrub"}],[52297764,{"idx":36,"name":"freehq-ground-tile-set1-ltc","tpage_name":"freehq-tfrag"}],[62259204,{"idx":4,"name":"grillRim01","tpage_name":"ctycarc-pris"}],[8716328,{"idx":40,"name":"baron-neon-eye-a","tpage_name":"ctysluma-sprite"}],[49610817,{"idx":65,"name":"sewer-brick-roof-01","tpage_name":"sewf-vis-tfrag"}],[67043337,{"idx":9,"name":"screen-08","tpage_name":"vinroom-sprite"}],[60817437,{"idx":29,"name":"mine-falling-elevator-top-lod2","tpage_name":"mineb-vis-shrub"}],[57081856,{"idx":0,"name":"bam-eyelight","tpage_name":"waspala-pris"}],[52101136,{"idx":16,"name":"nst-egg-spider-body","tpage_name":"nsta-vis-pris"}],[49610776,{"idx":24,"name":"sewer-block-01","tpage_name":"sewf-vis-tfrag"}],[67043336,{"idx":8,"name":"screen-07","tpage_name":"vinroom-sprite"}],[49610816,{"idx":64,"name":"sewer-brick-roof-02","tpage_name":"sewf-vis-tfrag"}],[60817436,{"idx":28,"name":"minc-yel-paint-wall-01","tpage_name":"mineb-vis-shrub"}],[8912953,{"idx":57,"name":"slum-ditch-bottom-01-small","tpage_name":"ctysluma-vis-tfrag"}],[28049436,{"idx":28,"name":"intr-panl02","tpage_name":"intpalrf-tfrag"}],[120520704,{"idx":0,"name":"airlock-door-bolt","tpage_name":"forestx-vis-pris"}],[94371924,{"idx":84,"name":"post01","tpage_name":"intpfall-vis-pris"}],[38731908,{"idx":132,"name":"flying-bird-05","tpage_name":"wasstada-sprite"}],[73596948,{"idx":20,"name":"sewer-grill-03","tpage_name":"sewi-vis-tfrag"}],[71106588,{"idx":28,"name":"wstd-scaffold-strut","tpage_name":"wasstadb-tfrag"}],[57278507,{"idx":43,"name":"metalflut-plates-02","tpage_name":"waswide-vis-pris"}],[52297787,{"idx":59,"name":"freehq-projector04","tpage_name":"freehq-tfrag"}],[67239947,{"idx":11,"name":"vin-floor-03","tpage_name":"vinroom-vis-tfrag"}],[48562247,{"idx":71,"name":"jakchires-facert","tpage_name":"sewa-vis-pris"}],[81723491,{"idx":99,"name":"jakchires-facert","tpage_name":"ljndklev-pris"}],[75890744,{"idx":56,"name":"onin-tassles","tpage_name":"onintent-tfrag"}],[94371871,{"idx":31,"name":"palace-break-bigwall05","tpage_name":"intpfall-vis-pris"}],[8912925,{"idx":29,"name":"city-bluelight","tpage_name":"ctysluma-vis-tfrag"}],[61669391,{"idx":15,"name":"fora-precursor-metal-edge-01","tpage_name":"foresta-vis-shrub"}],[28049408,{"idx":0,"name":"tpal-panl_piller01","tpage_name":"intpalrf-tfrag"}],[94371896,{"idx":56,"name":"palace-break-rebar","tpage_name":"intpfall-vis-pris"}],[62259226,{"idx":26,"name":"wing02grey01","tpage_name":"ctycarc-pris"}],[61014046,{"idx":30,"name":"minc-light-blue","tpage_name":"minec-vis-shrub"}],[57278506,{"idx":42,"name":"metalflut-nail","tpage_name":"waswide-vis-pris"}],[52297786,{"idx":58,"name":"freehq-projector03","tpage_name":"freehq-tfrag"}],[67239946,{"idx":10,"name":"vin-floor-02a","tpage_name":"vinroom-vis-tfrag"}],[48562246,{"idx":70,"name":"jakchires-facelft","tpage_name":"sewa-vis-pris"}],[81723490,{"idx":98,"name":"jakchires-facelft","tpage_name":"ljndklev-pris"}],[94371870,{"idx":30,"name":"palace-break-bigwall04","tpage_name":"intpfall-vis-pris"}],[73596941,{"idx":13,"name":"sewer-brick-roof-01","tpage_name":"sewi-vis-tfrag"}],[71106581,{"idx":21,"name":"wstd-spear02","tpage_name":"wasstadb-tfrag"}],[851979,{"idx":11,"name":"lt-eco-vent-side-01","tpage_name":"halfpipe-tfrag"}],[42401827,{"idx":35,"name":"wascitya-stone-bottom-door","tpage_name":"wasdoors-vis-tfrag"}],[112525325,{"idx":13,"name":"daxterheadwidenew","tpage_name":"desrescc-pris"}],[94371864,{"idx":24,"name":"palace-break-base01","tpage_name":"intpfall-vis-pris"}],[73596940,{"idx":12,"name":"sewer-metal-block-06","tpage_name":"sewi-vis-tfrag"}],[71106580,{"idx":20,"name":"wstd-spear01","tpage_name":"wasstadb-tfrag"}],[851978,{"idx":10,"name":"lt-eco-vent-blue-01","tpage_name":"halfpipe-tfrag"}],[94371863,{"idx":23,"name":"lightCase01","tpage_name":"intpfall-vis-pris"}],[851977,{"idx":9,"name":"halfpipe-grid-01","tpage_name":"halfpipe-tfrag"}],[49610823,{"idx":71,"name":"sewer-big-brace-trim-02","tpage_name":"sewf-vis-tfrag"}],[62062623,{"idx":31,"name":"flying-bird-04","tpage_name":"wascityb-sprite"}],[60817443,{"idx":35,"name":"minc-ox-pipe-01","tpage_name":"mineb-vis-shrub"}],[67043343,{"idx":15,"name":"screen-14","tpage_name":"vinroom-sprite"}],[81723460,{"idx":68,"name":"klever-hand","tpage_name":"ljndklev-pris"}],[60882986,{"idx":42,"name":"mincrane-piston-01","tpage_name":"mineb-vis-pris"}],[55312411,{"idx":27,"name":"city-mark-rice-01","tpage_name":"wascityb-vis-pris"}],[62783491,{"idx":3,"name":"grunt-metal-01","tpage_name":"ctypepb-pris"}],[720911,{"idx":15,"name":"loadsave-mission","tpage_name":"level-default-shrub"}],[33423360,{"idx":0,"name":"ya-water","tpage_name":"halfpipe-water"}],[104267816,{"idx":40,"name":"rub-ox-pipe-01","tpage_name":"stadium-vis-tfrag"}],[79364216,{"idx":120,"name":"monk-eye-c","tpage_name":"wasseem-pris"}],[89587715,{"idx":3,"name":"pecker-face","tpage_name":"lwstdpck-pris"}],[75890735,{"idx":47,"name":"onin-skull-teeth","tpage_name":"onintent-tfrag"}],[94371862,{"idx":22,"name":"light01","tpage_name":"intpfall-vis-pris"}],[57147411,{"idx":19,"name":"king-lgblackstrap","tpage_name":"waspala-pris2"}],[62128131,{"idx":3,"name":"carawing01","tpage_name":"ctycara-pris"}],[60882951,{"idx":7,"name":"minc-rust-02","tpage_name":"mineb-vis-pris"}],[42401824,{"idx":32,"name":"wascitya-airlock-door","tpage_name":"wasdoors-vis-tfrag"}],[112525322,{"idx":10,"name":"daxterfoot","tpage_name":"desrescc-pris"}],[49676290,{"idx":2,"name":"sewer-shrub-pitting-01","tpage_name":"sewf-vis-shrub"}],[94371861,{"idx":21,"name":"kcfrontend01","tpage_name":"intpfall-vis-pris"}],[53739553,{"idx":33,"name":"kgtrns-topjet01","tpage_name":"forestb-vis-pris"}],[48693249,{"idx":1,"name":"sewer-pipe-small-01","tpage_name":"sewb-vis-shrub"}],[55115819,{"idx":43,"name":"wascity-wood-plain","tpage_name":"wascityb-vis-tfrag"}],[48889919,{"idx":63,"name":"sewer-scaffold-01","tpage_name":"sewd-vis-tfrag"}],[41418839,{"idx":87,"name":"city-slum-medpipe-02","tpage_name":"wascitya-vis-tfrag"}],[851969,{"idx":1,"name":"cv-woodpoles","tpage_name":"halfpipe-tfrag"}],[75890727,{"idx":39,"name":"onin-rug-rolled","tpage_name":"onintent-tfrag"}],[94371854,{"idx":14,"name":"gunBoxBack01","tpage_name":"intpfall-vis-pris"}],[48758832,{"idx":48,"name":"sewer-round-02","tpage_name":"sewc-vis-tfrag"}],[53739552,{"idx":32,"name":"kgtrns-side01","tpage_name":"forestb-vis-pris"}],[55115818,{"idx":42,"name":"wascity-palm-beard","tpage_name":"wascityb-vis-tfrag"}],[41418838,{"idx":86,"name":"city-slum-medpipe-01","tpage_name":"wascitya-vis-tfrag"}],[851968,{"idx":0,"name":"cv-supportpole-end-2x2","tpage_name":"halfpipe-tfrag"}],[35127462,{"idx":166,"name":"errolcyber-bluemetal-01","tpage_name":"factorya-pris"}],[75890726,{"idx":38,"name":"onin-rug-long","tpage_name":"onintent-tfrag"}],[94371853,{"idx":13,"name":"grillRim01","tpage_name":"intpfall-vis-pris"}],[48758826,{"idx":42,"name":"sewer-grate-01","tpage_name":"sewc-vis-tfrag"}],[53739546,{"idx":26,"name":"darkguard-headshield","tpage_name":"forestb-vis-pris"}],[55115812,{"idx":36,"name":"wascity-ground-2-ditch-05","tpage_name":"wascityb-vis-tfrag"}],[48889912,{"idx":56,"name":"sewer-bolt-side-02","tpage_name":"sewd-vis-tfrag"}],[41418832,{"idx":80,"name":"waspala-elevator-cable","tpage_name":"wascitya-vis-tfrag"}],[8912902,{"idx":6,"name":"city-slum-ditch-wall-top-to-ground","tpage_name":"ctysluma-vis-tfrag"}],[73728036,{"idx":36,"name":"sewer-bolt-side-02","tpage_name":"sewh-vis-tfrag"}],[35127456,{"idx":160,"name":"widow-pod-gun-metal","tpage_name":"factorya-pris"}],[60948560,{"idx":80,"name":"minc-slab-01a","tpage_name":"minec-vis-tfrag"}],[75890720,{"idx":32,"name":"onin-genie-lamp-plain","tpage_name":"onintent-tfrag"}],[94371847,{"idx":7,"name":"palcab-lowres-farm-wall-top","tpage_name":"intpfall-vis-pris"}],[48758825,{"idx":41,"name":"strip-black","tpage_name":"sewc-vis-tfrag"}],[53739545,{"idx":25,"name":"darkguard-armshield","tpage_name":"forestb-vis-pris"}],[112328757,{"idx":53,"name":"jakchires-shoeteop","tpage_name":"wascast-pris"}],[91160697,{"idx":121,"name":"jakc-skirt","tpage_name":"gungame-vis-pris"}],[8912901,{"idx":5,"name":"city-slum-ground-2-ditch-03","tpage_name":"ctysluma-vis-tfrag"}],[75890719,{"idx":31,"name":"onin-genie-lamp","tpage_name":"onintent-tfrag"}],[94371846,{"idx":6,"name":"palcab-lowres-farm-wall","tpage_name":"intpfall-vis-pris"}],[112328756,{"idx":52,"name":"jakchires-shoemetal","tpage_name":"wascast-pris"}],[91160696,{"idx":120,"name":"jakc-scarfhanging","tpage_name":"gungame-vis-pris"}],[8912900,{"idx":4,"name":"city-slum-ditch-wall-top-02","tpage_name":"ctysluma-vis-tfrag"}],[60948558,{"idx":78,"name":"minc-train-pipe-cap-01","tpage_name":"minec-vis-tfrag"}],[75890718,{"idx":30,"name":"onin-dresser-wood2","tpage_name":"onintent-tfrag"}],[94371845,{"idx":5,"name":"palcab-lowres-farm-road","tpage_name":"intpfall-vis-pris"}],[71106561,{"idx":1,"name":"wstd-floor-panel02","tpage_name":"wasstadb-tfrag"}],[53739543,{"idx":23,"name":"cguardgame-sleeve","tpage_name":"forestb-vis-pris"}],[55115809,{"idx":33,"name":"wascity-ground-2-ditch-04","tpage_name":"wascityb-vis-tfrag"}],[48889909,{"idx":53,"name":"sewer-round-03","tpage_name":"sewd-vis-tfrag"}],[41418829,{"idx":77,"name":"waspala-corgmetal","tpage_name":"wascitya-vis-tfrag"}],[8912899,{"idx":3,"name":"city-slum-greenmetal-tube","tpage_name":"ctysluma-vis-tfrag"}],[73728033,{"idx":33,"name":"sewer-pipe-01","tpage_name":"sewh-vis-tfrag"}],[35127453,{"idx":157,"name":"squid-bulb-sm","tpage_name":"factorya-pris"}],[60948557,{"idx":77,"name":"minc-safe-slide01","tpage_name":"minec-vis-tfrag"}],[75890717,{"idx":29,"name":"onin-dresser-wood","tpage_name":"onintent-tfrag"}],[94371844,{"idx":4,"name":"palcab-lowres-ctyslum-wall-03","tpage_name":"intpfall-vis-pris"}],[48758822,{"idx":38,"name":"sewer-plate-01","tpage_name":"sewc-vis-tfrag"}],[53739542,{"idx":22,"name":"cguardgame-shouldershield","tpage_name":"forestb-vis-pris"}],[55115808,{"idx":32,"name":"wascity-ditch-wall-top-to-ground","tpage_name":"wascityb-vis-tfrag"}],[48889908,{"idx":52,"name":"sewer-lip-01","tpage_name":"sewd-vis-tfrag"}],[41418828,{"idx":76,"name":"waspala-elevator-wood01","tpage_name":"wascitya-vis-tfrag"}],[8912898,{"idx":2,"name":"city-slum-medpipe-01","tpage_name":"ctysluma-vis-tfrag"}],[75890716,{"idx":28,"name":"onin-dresser-drawer2","tpage_name":"onintent-tfrag"}],[94371843,{"idx":3,"name":"palcab-lowres-background-trees2","tpage_name":"intpfall-vis-pris"}],[48758821,{"idx":37,"name":"sewer-metal-floor-01","tpage_name":"sewc-vis-tfrag"}],[53739541,{"idx":21,"name":"cguardgame-shoebottom","tpage_name":"forestb-vis-pris"}],[55115807,{"idx":31,"name":"wascity-stucco-wall-bleached-2-broken","tpage_name":"wascityb-vis-tfrag"}],[41418827,{"idx":75,"name":"waspala-wheel-edge","tpage_name":"wascitya-vis-tfrag"}],[8912897,{"idx":1,"name":"city-slum-medpipe-02","tpage_name":"ctysluma-vis-tfrag"}],[75890715,{"idx":27,"name":"onin-dresser-drawer-handle","tpage_name":"onintent-tfrag"}],[94371842,{"idx":2,"name":"palcab-lowres-background-trees-edge","tpage_name":"intpfall-vis-pris"}],[10879082,{"idx":106,"name":"cityslumc-door-plate","tpage_name":"ctyslumb-vis-tfrag"}],[60620838,{"idx":38,"name":"daxterlense","tpage_name":"minea-vis-pris"}],[49414218,{"idx":74,"name":"kg-grunt-rim-03","tpage_name":"sewc-vis-pris"}],[117637211,{"idx":91,"name":"jakchires-brownstrap","tpage_name":"destrack-pris"}],[16908288,{"idx":0,"name":"city-farm-stonewall-bricks","tpage_name":"ctyfarmb-vis-tfrag"}],[55312405,{"idx":21,"name":"gekko-tubes","tpage_name":"wascityb-vis-pris"}],[35389525,{"idx":85,"name":"pecker-teeth","tpage_name":"introcst-pris"}],[115736618,{"idx":42,"name":"jakchires-jacket","tpage_name":"lnstcst-pris"}],[48627734,{"idx":22,"name":"sewer-pipe-rim-01","tpage_name":"sewb-vis-tfrag"}],[20840463,{"idx":15,"name":"environment-oldmetal","tpage_name":"stadiumb-vis-pris"}],[62128145,{"idx":17,"name":"carcvent01","tpage_name":"ctycara-pris"}],[57147425,{"idx":33,"name":"king-wristband","tpage_name":"waspala-pris2"}],[10879081,{"idx":105,"name":"cityslumc-purple-plain","tpage_name":"ctyslumb-vis-tfrag"}],[14680091,{"idx":27,"name":"jakchires-eye","tpage_name":"ctygenb-vis-pris"}],[49741840,{"idx":16,"name":"sewer-plate-03","tpage_name":"sewf-vis-pris"}],[61538304,{"idx":0,"name":"freehq-glass-01","tpage_name":"freehq-water"}],[55312404,{"idx":20,"name":"gekko-nails","tpage_name":"wascityb-vis-pris"}],[35389524,{"idx":84,"name":"pecker-tail","tpage_name":"introcst-pris"}],[48627733,{"idx":21,"name":"sewer-pipe-02-edge-01","tpage_name":"sewb-vis-tfrag"}],[458830,{"idx":78,"name":"talkbox-body-06","tpage_name":"level-default-pris"}],[20840462,{"idx":14,"name":"bam-hairhilite","tpage_name":"stadiumb-vis-pris"}],[62128144,{"idx":16,"name":"carcside01","tpage_name":"ctycara-pris"}],[57147424,{"idx":32,"name":"king-wraps","tpage_name":"waspala-pris2"}],[10879080,{"idx":104,"name":"ctyslumc-wall-trim","tpage_name":"ctyslumb-vis-tfrag"}],[14680090,{"idx":26,"name":"jakchires-clips","tpage_name":"ctygenb-vis-pris"}],[55312403,{"idx":19,"name":"gekko-metal-01","tpage_name":"wascityb-vis-pris"}],[35389523,{"idx":83,"name":"pecker-plume","tpage_name":"introcst-pris"}],[48627732,{"idx":20,"name":"sewer-pipe-01","tpage_name":"sewb-vis-tfrag"}],[458829,{"idx":77,"name":"talkbox-body-05","tpage_name":"level-default-pris"}],[20840461,{"idx":13,"name":"bam-eyelight","tpage_name":"stadiumb-vis-pris"}],[62128143,{"idx":15,"name":"carcnose01","tpage_name":"ctycara-pris"}],[57147423,{"idx":31,"name":"king-wrap","tpage_name":"waspala-pris2"}],[14811139,{"idx":3,"name":"city-metal-canal","tpage_name":"ctygenb-vis-tfrag"}],[12320779,{"idx":11,"name":"city-ind-dark-marble","tpage_name":"ctyindb-vis-tfrag"}],[55312402,{"idx":18,"name":"gekko-laserbarrel","tpage_name":"wascityb-vis-pris"}],[35389522,{"idx":82,"name":"pecker-face","tpage_name":"introcst-pris"}],[48627731,{"idx":19,"name":"sewer-pipe-rim-06","tpage_name":"sewb-vis-tfrag"}],[8847391,{"idx":31,"name":"des-burn-precursor-01","tpage_name":"ctysluma-vis-shrub"}],[458828,{"idx":76,"name":"talkbox-body-04","tpage_name":"level-default-pris"}],[62128142,{"idx":14,"name":"carcfoil01","tpage_name":"ctycara-pris"}],[57147422,{"idx":30,"name":"king-vestback","tpage_name":"waspala-pris2"}],[55312401,{"idx":17,"name":"gekko-laser","tpage_name":"wascityb-vis-pris"}],[35389521,{"idx":81,"name":"pecker-eyelid","tpage_name":"introcst-pris"}],[8847390,{"idx":30,"name":"des-burn-eye-on","tpage_name":"ctysluma-vis-shrub"}],[458827,{"idx":75,"name":"talkbox-body-03","tpage_name":"level-default-pris"}],[62128141,{"idx":13,"name":"carccase01","tpage_name":"ctycara-pris"}],[60882961,{"idx":17,"name":"minc-train-pipe-02","tpage_name":"mineb-vis-pris"}],[57147421,{"idx":29,"name":"king-vest","tpage_name":"waspala-pris2"}],[35127463,{"idx":167,"name":"errolcyber-bluewrap","tpage_name":"factorya-pris"}],[73728043,{"idx":43,"name":"sewer-metal-block-06-slime","tpage_name":"sewh-vis-tfrag"}],[95944710,{"idx":6,"name":"torn-belt2","tpage_name":"freehq-pris2"}],[92209170,{"idx":18,"name":"klever-fingertop","tpage_name":"ldamklev-pris"}],[55312400,{"idx":16,"name":"gekko-hose","tpage_name":"wascityb-vis-pris"}],[35389520,{"idx":80,"name":"pecker-body-01","tpage_name":"introcst-pris"}],[458826,{"idx":74,"name":"talkbox-body-02","tpage_name":"level-default-pris"}],[62128140,{"idx":12,"name":"carbwing01","tpage_name":"ctycara-pris"}],[57147420,{"idx":28,"name":"king-thinstrap","tpage_name":"waspala-pris2"}],[17563648,{"idx":0,"name":"ctyport-hiphog-halo","tpage_name":"ctyport-sprite"}],[8847388,{"idx":28,"name":"city-ind-overlay-bullethole-c","tpage_name":"ctysluma-vis-shrub"}],[94240779,{"idx":11,"name":"palcab-lowres-ctyslum-wall-04","tpage_name":"intpfall-vis-tfrag"}],[60620919,{"idx":119,"name":"jakchires-jacket","tpage_name":"minea-vis-pris"}],[655363,{"idx":3,"name":"shield-env-rim-src","tpage_name":"level-default-warp"}],[16908328,{"idx":40,"name":"citywide-wall-greybolts","tpage_name":"ctyfarmb-vis-tfrag"}],[35389455,{"idx":15,"name":"cguard1-gunleather","tpage_name":"introcst-pris"}],[62128139,{"idx":11,"name":"carbside01","tpage_name":"ctycara-pris"}],[57147419,{"idx":27,"name":"king-teeth","tpage_name":"waspala-pris2"}],[12320775,{"idx":7,"name":"city-ind-wall-noisy-border-02","tpage_name":"ctyindb-vis-tfrag"}],[8847387,{"idx":27,"name":"city-ind-overlay-bullethole-b","tpage_name":"ctysluma-vis-shrub"}],[62128138,{"idx":10,"name":"carbdash01","tpage_name":"ctycara-pris"}],[57147418,{"idx":26,"name":"king-skirt","tpage_name":"waspala-pris2"}],[62652439,{"idx":23,"name":"citichic-pants-02","tpage_name":"ctypepa-pris"}],[458777,{"idx":25,"name":"gun-main","tpage_name":"level-default-pris"}],[8847386,{"idx":26,"name":"city-ind-overlay-bullethole-a","tpage_name":"ctysluma-vis-shrub"}],[57147417,{"idx":25,"name":"king-shoebottom","tpage_name":"waspala-pris2"}],[62652438,{"idx":22,"name":"citichic-pants","tpage_name":"ctypepa-pris"}],[458776,{"idx":24,"name":"gun-magport","tpage_name":"level-default-pris"}],[8847385,{"idx":25,"name":"city-inda-scorch-small","tpage_name":"ctysluma-vis-shrub"}],[62652437,{"idx":21,"name":"citichic-hair-01","tpage_name":"ctypepa-pris"}],[458775,{"idx":23,"name":"gun-leather","tpage_name":"level-default-pris"}],[55312395,{"idx":11,"name":"wst-turret-barrel","tpage_name":"wascityb-vis-pris"}],[35389515,{"idx":75,"name":"jakb-shoeteop","tpage_name":"introcst-pris"}],[8847384,{"idx":24,"name":"city-inda-scorch-big","tpage_name":"ctysluma-vis-shrub"}],[62128135,{"idx":7,"name":"moter01","tpage_name":"ctycara-pris"}],[57147415,{"idx":23,"name":"king-precursermetal-trim2","tpage_name":"waspala-pris2"}],[62652436,{"idx":20,"name":"citichic-flesh","tpage_name":"ctypepa-pris"}],[458774,{"idx":22,"name":"gun-laser","tpage_name":"level-default-pris"}],[55312394,{"idx":10,"name":"wst-plain-metal","tpage_name":"wascityb-vis-pris"}],[35389514,{"idx":74,"name":"jakb-shoemetal","tpage_name":"introcst-pris"}],[8847383,{"idx":23,"name":"city-slum-crater-shards-01","tpage_name":"ctysluma-vis-shrub"}],[16908323,{"idx":35,"name":"city-port-roofmetal","tpage_name":"ctyfarmb-vis-tfrag"}],[62652435,{"idx":19,"name":"citichic-eye","tpage_name":"ctypepa-pris"}],[458773,{"idx":21,"name":"gun-eye","tpage_name":"level-default-pris"}],[55312393,{"idx":9,"name":"wascitya-redish-metal","tpage_name":"wascityb-vis-pris"}],[35389513,{"idx":73,"name":"jakb-shoebottom","tpage_name":"introcst-pris"}],[8847382,{"idx":22,"name":"wascitya-stone-top","tpage_name":"ctysluma-vis-shrub"}],[16908322,{"idx":34,"name":"city-port-metal-block-04","tpage_name":"ctyfarmb-vis-tfrag"}],[57147413,{"idx":21,"name":"king-precursermetal-plain","tpage_name":"waspala-pris2"}],[35127455,{"idx":159,"name":"widow-dull-inards","tpage_name":"factorya-pris"}],[73728035,{"idx":35,"name":"sewer-bolt-side-01","tpage_name":"sewh-vis-tfrag"}],[92209162,{"idx":10,"name":"klever-armor-01","tpage_name":"ldamklev-pris"}],[62652434,{"idx":18,"name":"citichic-boot-04","tpage_name":"ctypepa-pris"}],[458772,{"idx":20,"name":"gun-dark-mag","tpage_name":"level-default-pris"}],[55312392,{"idx":8,"name":"wascity-wall-canister","tpage_name":"wascityb-vis-pris"}],[35389512,{"idx":72,"name":"jakb-scarf","tpage_name":"introcst-pris"}],[8847381,{"idx":21,"name":"city-fort-decal","tpage_name":"ctysluma-vis-shrub"}],[16908321,{"idx":33,"name":"city-ind-bigpipe-siding","tpage_name":"ctyfarmb-vis-tfrag"}],[327699,{"idx":19,"name":"red-bomb-gradient","tpage_name":"level-default-water"}],[62128132,{"idx":4,"name":"cushion01","tpage_name":"ctycara-pris"}],[57147412,{"idx":20,"name":"king-precursermetal-decor","tpage_name":"waspala-pris2"}],[35127454,{"idx":158,"name":"squid-tubes","tpage_name":"factorya-pris"}],[73728034,{"idx":34,"name":"sewer-flat-pipe-01","tpage_name":"sewh-vis-tfrag"}],[92209161,{"idx":9,"name":"klever-arm","tpage_name":"ldamklev-pris"}],[62652433,{"idx":17,"name":"citichic-boot-03","tpage_name":"ctypepa-pris"}],[458771,{"idx":19,"name":"gun-cover","tpage_name":"level-default-pris"}],[55312391,{"idx":7,"name":"wascity-steel-bar","tpage_name":"wascityb-vis-pris"}],[41615411,{"idx":51,"name":"city-mark-rope-01","tpage_name":"wascitya-vis-pris"}],[35389511,{"idx":71,"name":"jakb-pants","tpage_name":"introcst-pris"}],[8847380,{"idx":20,"name":"city-slum-decal-01","tpage_name":"ctysluma-vis-shrub"}],[88014871,{"idx":23,"name":"sig2-shoetop","tpage_name":"lwassig-pris"}],[94240771,{"idx":3,"name":"palcab-lowres-background-crater-bottom-enviro","tpage_name":"intpfall-vis-tfrag"}],[60620911,{"idx":111,"name":"jakchires-eye","tpage_name":"minea-vis-pris"}],[10616836,{"idx":4,"name":"sign-gt2","tpage_name":"ctyslumb-sprite"}],[11862016,{"idx":0,"name":"map-ctyindb","tpage_name":"ctyindb-minimap"}],[16908320,{"idx":32,"name":"city-ind-metal-02","tpage_name":"ctyfarmb-vis-tfrag"}],[458770,{"idx":18,"name":"gun-blue-mag","tpage_name":"level-default-pris"}],[55312390,{"idx":6,"name":"wascity-outerwall-metal-b","tpage_name":"wascityb-vis-pris"}],[41615410,{"idx":50,"name":"city-mark-wood-plain","tpage_name":"wascitya-vis-pris"}],[35389510,{"idx":70,"name":"jakb-lightbrownstrap","tpage_name":"introcst-pris"}],[8847379,{"idx":19,"name":"city-slumwall-metalsiding-01","tpage_name":"ctysluma-vis-shrub"}],[458816,{"idx":64,"name":"sk-armfur","tpage_name":"level-default-pris"}],[16908319,{"idx":31,"name":"city-farm-lamp","tpage_name":"ctyfarmb-vis-tfrag"}],[327697,{"idx":17,"name":"environment-lightjak-wing","tpage_name":"level-default-water"}],[55312389,{"idx":5,"name":"wascity-outerwall-metal","tpage_name":"wascityb-vis-pris"}],[41615409,{"idx":49,"name":"city-mark-rice-01","tpage_name":"wascitya-vis-pris"}],[35389509,{"idx":69,"name":"jakb-lightbrownspat","tpage_name":"introcst-pris"}],[43646998,{"idx":22,"name":"basket-debris-01","tpage_name":"waswide-sprite"}],[48627718,{"idx":6,"name":"sewer-concrete-edge-02","tpage_name":"sewb-vis-tfrag"}],[8847378,{"idx":18,"name":"city-slum-bigpipe-04","tpage_name":"ctysluma-vis-shrub"}],[100728848,{"idx":16,"name":"sig-gun-05","tpage_name":"ljaksig-pris2"}],[99483668,{"idx":20,"name":"for-egg-bulbtop-02","tpage_name":"lformach-vis-pris"}],[16908318,{"idx":30,"name":"farm-grass-ground-01","tpage_name":"ctyfarmb-vis-tfrag"}],[327696,{"idx":16,"name":"environment-lightjak","tpage_name":"level-default-water"}],[55312388,{"idx":4,"name":"wascity-metal-indent","tpage_name":"wascityb-vis-pris"}],[41615408,{"idx":48,"name":"city-mark-basket2","tpage_name":"wascitya-vis-pris"}],[35389508,{"idx":68,"name":"jakb-leatherstrap","tpage_name":"introcst-pris"}],[8847377,{"idx":17,"name":"city-slum-decal-02","tpage_name":"ctysluma-vis-shrub"}],[100728847,{"idx":15,"name":"sig-gun-04","tpage_name":"ljaksig-pris2"}],[99483667,{"idx":19,"name":"turret-mh-metal","tpage_name":"lformach-vis-pris"}],[16908317,{"idx":29,"name":"city-farm-sprinkle-pipe","tpage_name":"ctyfarmb-vis-tfrag"}],[327695,{"idx":15,"name":"blue-needle","tpage_name":"level-default-water"}],[55312387,{"idx":3,"name":"wascity-metal-door-01","tpage_name":"wascityb-vis-pris"}],[41615407,{"idx":47,"name":"city-mark-rope-mesh-01","tpage_name":"wascitya-vis-pris"}],[35389507,{"idx":67,"name":"jakb-leatherpouch","tpage_name":"introcst-pris"}],[8847376,{"idx":16,"name":"city-slum-clothesline-01","tpage_name":"ctysluma-vis-shrub"}],[88014867,{"idx":19,"name":"sig2-metal-01","tpage_name":"lwassig-pris"}],[60620907,{"idx":107,"name":"jakchires-brownstrap","tpage_name":"minea-vis-pris"}],[20840481,{"idx":33,"name":"jakchires-eyebrow","tpage_name":"stadiumb-vis-pris"}],[10879041,{"idx":65,"name":"ctyslumc-flowerbed-flowers-a","tpage_name":"ctyslumb-vis-tfrag"}],[16908316,{"idx":28,"name":"city-farm-sprinkle-metal","tpage_name":"ctyfarmb-vis-tfrag"}],[327694,{"idx":14,"name":"lightning-beam-02","tpage_name":"level-default-water"}],[62652428,{"idx":12,"name":"citfat-fleshbrown","tpage_name":"ctypepa-pris"}],[55312386,{"idx":2,"name":"drill-turret-control-02","tpage_name":"wascityb-vis-pris"}],[41615406,{"idx":46,"name":"city-mark-cotton-wrap","tpage_name":"wascitya-vis-pris"}],[35389506,{"idx":66,"name":"jakb-jacketsleeve","tpage_name":"introcst-pris"}],[42401815,{"idx":23,"name":"wascity-rock-small","tpage_name":"wasdoors-vis-tfrag"}],[43646995,{"idx":19,"name":"wood-plain-debris","tpage_name":"waswide-sprite"}],[48627715,{"idx":3,"name":"sewer-plate-05","tpage_name":"sewb-vis-tfrag"}],[8847375,{"idx":15,"name":"city-slumwall-05","tpage_name":"ctysluma-vis-shrub"}],[786435,{"idx":3,"name":"font.24hi2","tpage_name":"gamefont"}],[88014866,{"idx":18,"name":"sig2-lens","tpage_name":"lwassig-pris"}],[60620906,{"idx":106,"name":"jakchires-blackstrap","tpage_name":"minea-vis-pris"}],[20840480,{"idx":32,"name":"jakchires-eye","tpage_name":"stadiumb-vis-pris"}],[10879040,{"idx":64,"name":"ctyslumc-bush-01","tpage_name":"ctyslumb-vis-tfrag"}],[100728845,{"idx":13,"name":"sig-gun-02","tpage_name":"ljaksig-pris2"}],[99483665,{"idx":17,"name":"turret-metal-2","tpage_name":"lformach-vis-pris"}],[16908315,{"idx":27,"name":"city-farm-sprinkle-suppport","tpage_name":"ctyfarmb-vis-tfrag"}],[327693,{"idx":13,"name":"lightning-beam-01","tpage_name":"level-default-water"}],[62652427,{"idx":11,"name":"citfat-eyebrow-bro","tpage_name":"ctypepa-pris"}],[55312385,{"idx":1,"name":"common-black","tpage_name":"wascityb-vis-pris"}],[41615405,{"idx":45,"name":"city-mark-cotton-32x32","tpage_name":"wascitya-vis-pris"}],[35389505,{"idx":65,"name":"jakb-jacketbody","tpage_name":"introcst-pris"}],[8847374,{"idx":14,"name":"city-slum-vine","tpage_name":"ctysluma-vis-shrub"}],[786434,{"idx":2,"name":"font.24hi","tpage_name":"gamefont"}],[20840479,{"idx":31,"name":"jakchires-clips","tpage_name":"stadiumb-vis-pris"}],[10879039,{"idx":63,"name":"stdm-bush-01","tpage_name":"ctyslumb-vis-tfrag"}],[100728844,{"idx":12,"name":"sig-gun-01","tpage_name":"ljaksig-pris2"}],[99483664,{"idx":16,"name":"turret-metal","tpage_name":"lformach-vis-pris"}],[16908314,{"idx":26,"name":"city-farm-sprinkle-metal-dirt","tpage_name":"ctyfarmb-vis-tfrag"}],[8847373,{"idx":13,"name":"city-slum-shrub-overhang-02","tpage_name":"ctysluma-vis-shrub"}],[20840478,{"idx":30,"name":"jakchires-chestplate","tpage_name":"stadiumb-vis-pris"}],[10879038,{"idx":62,"name":"ctyslumc-grass","tpage_name":"ctyslumb-vis-tfrag"}],[88277043,{"idx":51,"name":"cguard-air-train-window-trim","tpage_name":"introcst-tfrag"}],[100728843,{"idx":11,"name":"sig-glovetop","tpage_name":"ljaksig-pris2"}],[99483663,{"idx":15,"name":"turret-light","tpage_name":"lformach-vis-pris"}],[16908313,{"idx":25,"name":"city-farm-dirt-mound-01","tpage_name":"ctyfarmb-vis-tfrag"}],[458763,{"idx":11,"name":"board-main-bottom","tpage_name":"level-default-pris"}],[35389503,{"idx":63,"name":"jakb-hairtrans","tpage_name":"introcst-pris"}],[8847372,{"idx":12,"name":"city-slum-shrub-overhang","tpage_name":"ctysluma-vis-shrub"}],[88014863,{"idx":15,"name":"sig2-gun-05","tpage_name":"lwassig-pris"}],[60620903,{"idx":103,"name":"jakc-wraps","tpage_name":"minea-vis-pris"}],[88277042,{"idx":50,"name":"cguard-air-train-seat","tpage_name":"introcst-tfrag"}],[100728842,{"idx":10,"name":"sig-glove","tpage_name":"ljaksig-pris2"}],[99483662,{"idx":14,"name":"turret-hose","tpage_name":"lformach-vis-pris"}],[16908312,{"idx":24,"name":"city-farm-vegtree-bark-01","tpage_name":"ctyfarmb-vis-tfrag"}],[8847371,{"idx":11,"name":"city-slum-stain-window-01","tpage_name":"ctysluma-vis-shrub"}],[16908311,{"idx":23,"name":"for-foliage","tpage_name":"ctyfarmb-vis-tfrag"}],[8847370,{"idx":10,"name":"city-slum-dirt-overlay","tpage_name":"ctysluma-vis-shrub"}],[458807,{"idx":55,"name":"jakbsmall-jacketsleeve","tpage_name":"level-default-pris"}],[16908310,{"idx":22,"name":"city-farm-cart-woodslat","tpage_name":"ctyfarmb-vis-tfrag"}],[327688,{"idx":8,"name":"water-wake","tpage_name":"level-default-water"}],[62652422,{"idx":6,"name":"citfat-cotton-gather","tpage_name":"ctypepa-pris"}],[121110548,{"idx":20,"name":"hip-tred-check09","tpage_name":"hiphog-vis-tfrag"}],[118620188,{"idx":28,"name":"jakchires-leatherpouch","tpage_name":"ljkcdmkl-pris"}],[112394288,{"idx":48,"name":"intcept-b-teeth01","tpage_name":"desrescg-pris"}],[458760,{"idx":8,"name":"board-iris","tpage_name":"level-default-pris"}],[35389500,{"idx":60,"name":"jakb-facelft","tpage_name":"introcst-pris"}],[8847369,{"idx":9,"name":"city-slum-stain-wall-01","tpage_name":"ctysluma-vis-shrub"}],[458806,{"idx":54,"name":"jakbsmall-jacketbody","tpage_name":"level-default-pris"}],[16908309,{"idx":21,"name":"city-farm-rock-small","tpage_name":"ctyfarmb-vis-tfrag"}],[327687,{"idx":7,"name":"blue-beam-dest","tpage_name":"level-default-water"}],[121110547,{"idx":19,"name":"hip-tred-check10","tpage_name":"hiphog-vis-tfrag"}],[118620187,{"idx":27,"name":"jakchires-jacket","tpage_name":"ljkcdmkl-pris"}],[112394287,{"idx":47,"name":"intcept-b-pipe01","tpage_name":"desrescg-pris"}],[458759,{"idx":7,"name":"board-fins-bottom","tpage_name":"level-default-pris"}],[41615399,{"idx":39,"name":"was-kangalizard-fin","tpage_name":"wascitya-vis-pris"}],[35389499,{"idx":59,"name":"jakb-eyelid","tpage_name":"introcst-pris"}],[8847368,{"idx":8,"name":"city-slum-brick-showing-through","tpage_name":"ctysluma-vis-shrub"}],[16908308,{"idx":20,"name":"city-farm-rock","tpage_name":"ctyfarmb-vis-tfrag"}],[458758,{"idx":6,"name":"board-fins","tpage_name":"level-default-pris"}],[41615398,{"idx":38,"name":"was-kangalizard-face","tpage_name":"wascitya-vis-pris"}],[35389498,{"idx":58,"name":"jakb-eyebrow","tpage_name":"introcst-pris"}],[8847367,{"idx":7,"name":"city-slum-bigpipe-02","tpage_name":"ctysluma-vis-shrub"}],[16908307,{"idx":19,"name":"farm-grass-ground-02","tpage_name":"ctyfarmb-vis-tfrag"}],[458757,{"idx":5,"name":"board-edge","tpage_name":"level-default-pris"}],[49086477,{"idx":13,"name":"sewer-shrub-pitting-01","tpage_name":"sewe-vis-shrub"}],[41615397,{"idx":37,"name":"was-kangalizard-body-bottom","tpage_name":"wascitya-vis-pris"}],[35389497,{"idx":57,"name":"jakb-eye","tpage_name":"introcst-pris"}],[94240777,{"idx":9,"name":"palcab-lowres-ctyslum-wall-01","tpage_name":"intpfall-vis-tfrag"}],[60620917,{"idx":117,"name":"jakchires-hair","tpage_name":"minea-vis-pris"}],[458754,{"idx":2,"name":"bam-iris-16x16","tpage_name":"level-default-pris"}],[49086474,{"idx":10,"name":"sew-moving-stepb-grate","tpage_name":"sewe-vis-shrub"}],[41615394,{"idx":34,"name":"was-dogat-nose","tpage_name":"wascitya-vis-pris"}],[35389494,{"idx":54,"name":"jakb-blackstrap","tpage_name":"introcst-pris"}],[458752,{"idx":0,"name":"bam-eyelight","tpage_name":"level-default-pris"}],[41615392,{"idx":32,"name":"was-dogat-body","tpage_name":"wascitya-vis-pris"}],[49086472,{"idx":8,"name":"sewer-pipe-01","tpage_name":"sewe-vis-shrub"}],[35389492,{"idx":52,"name":"jak-teeth","tpage_name":"introcst-pris"}],[49086471,{"idx":7,"name":"sewer-pipe-rim-07","tpage_name":"sewe-vis-shrub"}],[35389491,{"idx":51,"name":"jak-gogglemetal","tpage_name":"introcst-pris"}],[49610799,{"idx":47,"name":"sewer-corroded-trim","tpage_name":"sewf-vis-tfrag"}],[60817419,{"idx":11,"name":"minc-rust-bars-01","tpage_name":"mineb-vis-shrub"}],[95879168,{"idx":0,"name":"bam-eyelight","tpage_name":"ltorn-pris2"}],[49610758,{"idx":6,"name":"common-black","tpage_name":"sewf-vis-tfrag"}],[8716365,{"idx":77,"name":"sign-metalhead","tpage_name":"ctysluma-sprite"}],[49610798,{"idx":46,"name":"sewer-nut-rim","tpage_name":"sewf-vis-tfrag"}],[60817418,{"idx":10,"name":"minc-rust-pipe-03","tpage_name":"mineb-vis-shrub"}],[49610757,{"idx":5,"name":"sewer-metal-block-06","tpage_name":"sewf-vis-tfrag"}],[8716364,{"idx":76,"name":"sign-m5","tpage_name":"ctysluma-sprite"}],[49610797,{"idx":45,"name":"sewer-rusted-metal","tpage_name":"sewf-vis-tfrag"}],[60817417,{"idx":9,"name":"minc-screw-01","tpage_name":"mineb-vis-shrub"}],[8716363,{"idx":75,"name":"sign-hiphog","tpage_name":"ctysluma-sprite"}],[57081869,{"idx":13,"name":"daxterheadwidenew","tpage_name":"waspala-pris"}],[60817409,{"idx":1,"name":"minc-bolt","tpage_name":"mineb-vis-shrub"}],[8716355,{"idx":67,"name":"baron-neon-white-d-on","tpage_name":"ctysluma-sprite"}],[57081868,{"idx":12,"name":"daxtergoggles","tpage_name":"waspala-pris"}],[60817408,{"idx":0,"name":"minc-rust-01","tpage_name":"mineb-vis-shrub"}],[8716354,{"idx":66,"name":"baron-neon-white-d","tpage_name":"ctysluma-sprite"}],[11403334,{"idx":70,"name":"ctyslumc-billc","tpage_name":"ctyslumc-vis-tfrag"}],[8716353,{"idx":65,"name":"baron-neon-white-c-on","tpage_name":"ctysluma-sprite"}],[11403333,{"idx":69,"name":"ctyslumc-light","tpage_name":"ctyslumc-vis-tfrag"}],[11403327,{"idx":63,"name":"ctyslumc-window","tpage_name":"ctyslumc-vis-tfrag"}],[11403326,{"idx":62,"name":"ctyslumc-pinetree-big-bark","tpage_name":"ctyslumc-vis-tfrag"}],[11403325,{"idx":61,"name":"ctyslumc-tree-top","tpage_name":"ctyslumc-vis-tfrag"}],[11730948,{"idx":4,"name":"city-ind-decal-03","tpage_name":"ctyinda-vis-shrub"}],[11403324,{"idx":60,"name":"ctyslumc-green","tpage_name":"ctyslumc-vis-tfrag"}],[11730947,{"idx":3,"name":"city-ind-decal-02","tpage_name":"ctyinda-vis-shrub"}],[65542,{"idx":6,"name":"skull-gem-env","tpage_name":"common"}],[11403323,{"idx":59,"name":"common-gray-dark","tpage_name":"ctyslumc-vis-tfrag"}],[11730946,{"idx":2,"name":"city-ind-decal-01","tpage_name":"ctyinda-vis-shrub"}],[11403322,{"idx":58,"name":"ctyslumc-flowerbed-flowers-a","tpage_name":"ctyslumc-vis-tfrag"}],[11730945,{"idx":1,"name":"city-ind-stain-01","tpage_name":"ctyinda-vis-shrub"}],[11730944,{"idx":0,"name":"city-ind-blotch-withstreaks-01","tpage_name":"ctyinda-vis-shrub"}],[8716340,{"idx":52,"name":"baron-neon-nose","tpage_name":"ctysluma-sprite"}],[11403319,{"idx":55,"name":"ctyslumc-light-amber","tpage_name":"ctyslumc-vis-tfrag"}],[11403318,{"idx":54,"name":"ctyslumc-wall","tpage_name":"ctyslumc-vis-tfrag"}],[57212934,{"idx":6,"name":"wascitya-flag-a","tpage_name":"waswide-vis-tfrag"}],[48496674,{"idx":34,"name":"sewer-lip-01-hitweak","tpage_name":"sewa-vis-tfrag"}],[81657918,{"idx":62,"name":"vin-teeth-01","tpage_name":"arenacst-pris2"}],[57212933,{"idx":5,"name":"wascity-steel-bar","tpage_name":"waswide-vis-tfrag"}],[48496673,{"idx":33,"name":"sewer-concrete-block-02","tpage_name":"sewa-vis-tfrag"}],[81657917,{"idx":61,"name":"sig-undergarments","tpage_name":"arenacst-pris2"}],[48496672,{"idx":32,"name":"sewer-big-brace-01","tpage_name":"sewa-vis-tfrag"}],[81657916,{"idx":60,"name":"sig-skirts-03","tpage_name":"arenacst-pris2"}],[48496671,{"idx":31,"name":"sew-elevator-lod0top","tpage_name":"sewa-vis-tfrag"}],[81657915,{"idx":59,"name":"sig-skirts-02","tpage_name":"arenacst-pris2"}],[48496670,{"idx":30,"name":"sewer-screw-02","tpage_name":"sewa-vis-tfrag"}],[81657914,{"idx":58,"name":"sig-skirts","tpage_name":"arenacst-pris2"}],[48496669,{"idx":29,"name":"sewer-plate-05","tpage_name":"sewa-vis-tfrag"}],[81657913,{"idx":57,"name":"sig-shoulderarmor","tpage_name":"arenacst-pris2"}],[57212928,{"idx":0,"name":"wascity-outerwall-rock","tpage_name":"waswide-vis-tfrag"}],[48496668,{"idx":28,"name":"sewer-pipe-01","tpage_name":"sewa-vis-tfrag"}],[81657912,{"idx":56,"name":"sig-shoetop","tpage_name":"arenacst-pris2"}],[48496667,{"idx":27,"name":"sewer-grate-01","tpage_name":"sewa-vis-tfrag"}],[81657911,{"idx":55,"name":"sig-shoebottom","tpage_name":"arenacst-pris2"}],[49741846,{"idx":22,"name":"sewcurved-door-06","tpage_name":"sewf-vis-pris"}],[48496666,{"idx":26,"name":"sewer-plate-02","tpage_name":"sewa-vis-tfrag"}],[81657910,{"idx":54,"name":"sig-sac","tpage_name":"arenacst-pris2"}],[8716326,{"idx":38,"name":"baron-neon-dot-ring","tpage_name":"ctysluma-sprite"}],[61014022,{"idx":6,"name":"minc-blue-paint-rust04","tpage_name":"minec-vis-shrub"}],[52297762,{"idx":34,"name":"freehq-ground-tile-set1-m","tpage_name":"freehq-tfrag"}],[62259202,{"idx":2,"name":"dash01","tpage_name":"ctycarc-pris"}],[49741845,{"idx":21,"name":"sewcurved-door-05","tpage_name":"sewf-vis-pris"}],[48496665,{"idx":25,"name":"sewer-small-light-01","tpage_name":"sewa-vis-tfrag"}],[81657909,{"idx":53,"name":"sig-metal-dirty","tpage_name":"arenacst-pris2"}],[8716325,{"idx":37,"name":"baron-neon-dot-d-on","tpage_name":"ctysluma-sprite"}],[49741844,{"idx":20,"name":"sewcurved-door-04","tpage_name":"sewf-vis-pris"}],[48496664,{"idx":24,"name":"sewer-brick-block-11","tpage_name":"sewa-vis-tfrag"}],[81657908,{"idx":52,"name":"sig-metal-01","tpage_name":"arenacst-pris2"}],[8716324,{"idx":36,"name":"baron-neon-dot-d","tpage_name":"ctysluma-sprite"}],[61014020,{"idx":4,"name":"minc-grass-ill-01","tpage_name":"minec-vis-shrub"}],[52297760,{"idx":32,"name":"freehq-ground-tile-set1-lbc","tpage_name":"freehq-tfrag"}],[62259200,{"idx":0,"name":"backThing01","tpage_name":"ctycarc-pris"}],[49741843,{"idx":19,"name":"sewcurved-door-01","tpage_name":"sewf-vis-pris"}],[48496663,{"idx":23,"name":"sewer-brick-block-10","tpage_name":"sewa-vis-tfrag"}],[81657907,{"idx":51,"name":"sig-lens","tpage_name":"arenacst-pris2"}],[8716323,{"idx":35,"name":"baron-neon-dot-c-on","tpage_name":"ctysluma-sprite"}],[8716322,{"idx":34,"name":"baron-neon-dot-c","tpage_name":"ctysluma-sprite"}],[49741841,{"idx":17,"name":"sewer-plate-04","tpage_name":"sewf-vis-pris"}],[48496661,{"idx":21,"name":"sewer-pipe-rim-08","tpage_name":"sewa-vis-tfrag"}],[81657905,{"idx":49,"name":"sig-headgear","tpage_name":"arenacst-pris2"}],[8716321,{"idx":33,"name":"baron-neon-dot-b-on","tpage_name":"ctysluma-sprite"}],[8716320,{"idx":32,"name":"baron-neon-dot-b","tpage_name":"ctysluma-sprite"}],[49741839,{"idx":15,"name":"sewer-metal-block-06","tpage_name":"sewf-vis-pris"}],[48496659,{"idx":19,"name":"sewer-metal-01","tpage_name":"sewa-vis-tfrag"}],[81657903,{"idx":47,"name":"sig-gun-04","tpage_name":"arenacst-pris2"}],[8716319,{"idx":31,"name":"baron-neon-dot-a-on","tpage_name":"ctysluma-sprite"}],[49741838,{"idx":14,"name":"sewer-flat-pipe-01","tpage_name":"sewf-vis-pris"}],[48496658,{"idx":18,"name":"sewer-metal-block-04","tpage_name":"sewa-vis-tfrag"}],[81657902,{"idx":46,"name":"sig-gun-03","tpage_name":"arenacst-pris2"}],[8716318,{"idx":30,"name":"baron-neon-dot-a","tpage_name":"ctysluma-sprite"}],[14680065,{"idx":1,"name":"airlock-door-cog","tpage_name":"ctygenb-vis-pris"}],[12189705,{"idx":9,"name":"citwide-crimson-wall-plain","tpage_name":"ctyindb-vis-pris"}],[14680064,{"idx":0,"name":"airlock-door-bolt","tpage_name":"ctygenb-vis-pris"}],[12189704,{"idx":8,"name":"citwide-crimson-tube","tpage_name":"ctyindb-vis-pris"}],[12189703,{"idx":7,"name":"citwide-crimson-red","tpage_name":"ctyindb-vis-pris"}],[17563663,{"idx":15,"name":"sign-blank","tpage_name":"ctyport-sprite"}],[12189702,{"idx":6,"name":"citwide-crimson-light","tpage_name":"ctyindb-vis-pris"}],[49741834,{"idx":10,"name":"sew-movingstep-grate","tpage_name":"sewf-vis-pris"}],[48496654,{"idx":14,"name":"sewer-metal-block-06","tpage_name":"sewa-vis-tfrag"}],[74186818,{"idx":66,"name":"spydroid-red","tpage_name":"sewh-vis-pris"}],[81657898,{"idx":42,"name":"sig-glove","tpage_name":"arenacst-pris2"}],[8716314,{"idx":26,"name":"baron-neon-cheek-c","tpage_name":"ctysluma-sprite"}],[12189701,{"idx":5,"name":"citwide-crimson-gold","tpage_name":"ctyindb-vis-pris"}],[49741833,{"idx":9,"name":"sew-gasstep-vent","tpage_name":"sewf-vis-pris"}],[48496653,{"idx":13,"name":"sewer-concrete-edge-02","tpage_name":"sewa-vis-tfrag"}],[74186817,{"idx":65,"name":"spydroid-light-small-red","tpage_name":"sewh-vis-pris"}],[81657897,{"idx":41,"name":"sig-gem-01","tpage_name":"arenacst-pris2"}],[8716313,{"idx":25,"name":"baron-neon-cheek-b-on","tpage_name":"ctysluma-sprite"}],[49741832,{"idx":8,"name":"sew-gasstep-tube","tpage_name":"sewf-vis-pris"}],[48496652,{"idx":12,"name":"sewer-pipe-rim-05b","tpage_name":"sewa-vis-tfrag"}],[74186816,{"idx":64,"name":"spydroid-light-small","tpage_name":"sewh-vis-pris"}],[81657896,{"idx":40,"name":"sig-flask","tpage_name":"arenacst-pris2"}],[49741831,{"idx":7,"name":"sew-gasstep-rim-lod1","tpage_name":"sewf-vis-pris"}],[48496651,{"idx":11,"name":"sewer-metal-block-05","tpage_name":"sewa-vis-tfrag"}],[74186815,{"idx":63,"name":"spydroid-light","tpage_name":"sewh-vis-pris"}],[81657895,{"idx":39,"name":"sig-facert","tpage_name":"arenacst-pris2"}],[8716311,{"idx":23,"name":"baron-neon-cheek-a-on","tpage_name":"ctysluma-sprite"}],[49741830,{"idx":6,"name":"airlock-door-cog1","tpage_name":"sewf-vis-pris"}],[48496650,{"idx":10,"name":"sewer-mantel-02","tpage_name":"sewa-vis-tfrag"}],[74186814,{"idx":62,"name":"spydroid-leg-grey-end","tpage_name":"sewh-vis-pris"}],[81657894,{"idx":38,"name":"sig-faceleft","tpage_name":"arenacst-pris2"}],[8716310,{"idx":22,"name":"baron-neon-cheek-a","tpage_name":"ctysluma-sprite"}],[49741829,{"idx":5,"name":"sewer-pipe-01","tpage_name":"sewf-vis-pris"}],[48496649,{"idx":9,"name":"sewer-brick-block-06","tpage_name":"sewa-vis-tfrag"}],[74186813,{"idx":61,"name":"spydroid-leg-grey","tpage_name":"sewh-vis-pris"}],[81657893,{"idx":37,"name":"sig-eyelid","tpage_name":"arenacst-pris2"}],[8716309,{"idx":21,"name":"baron-neon-blue-k-on","tpage_name":"ctysluma-sprite"}],[94240785,{"idx":17,"name":"palcab-lowres-ctyslumc-wall-01","tpage_name":"intpfall-vis-tfrag"}],[60620925,{"idx":125,"name":"jakchires-shoemetal","tpage_name":"minea-vis-pris"}],[8716308,{"idx":20,"name":"baron-neon-blue-k","tpage_name":"ctysluma-sprite"}],[8716307,{"idx":19,"name":"baron-neon-blue-j-on","tpage_name":"ctysluma-sprite"}],[49741826,{"idx":2,"name":"airlock-door-main","tpage_name":"sewf-vis-pris"}],[48496646,{"idx":6,"name":"sewer-mantel-01","tpage_name":"sewa-vis-tfrag"}],[8716306,{"idx":18,"name":"baron-neon-blue-j","tpage_name":"ctysluma-sprite"}],[49741825,{"idx":1,"name":"airlock-door-cog","tpage_name":"sewf-vis-pris"}],[48496645,{"idx":5,"name":"sewer-brick-block-01","tpage_name":"sewa-vis-tfrag"}],[8716305,{"idx":17,"name":"baron-neon-blue-i-on","tpage_name":"ctysluma-sprite"}],[655365,{"idx":5,"name":"shield-env-uvscroll","tpage_name":"level-default-warp"}],[49741824,{"idx":0,"name":"airlock-door-bolt","tpage_name":"sewf-vis-pris"}],[48496644,{"idx":4,"name":"sewer-block-01","tpage_name":"sewa-vis-tfrag"}],[8716304,{"idx":16,"name":"baron-neon-blue-i","tpage_name":"ctysluma-sprite"}],[16908329,{"idx":41,"name":"citywide-wall-greydrain","tpage_name":"ctyfarmb-vis-tfrag"}],[655364,{"idx":4,"name":"shield-env-uscroll","tpage_name":"level-default-warp"}],[8716302,{"idx":14,"name":"baron-neon-blue-h","tpage_name":"ctysluma-sprite"}],[94240778,{"idx":10,"name":"palcab-lowres-ctyslum-roof-02","tpage_name":"intpfall-vis-tfrag"}],[60620918,{"idx":118,"name":"jakchires-horn","tpage_name":"minea-vis-pris"}],[655362,{"idx":2,"name":"shield-env-rim-dest","tpage_name":"level-default-warp"}],[48496641,{"idx":1,"name":"sewer-pipe-rim-01","tpage_name":"sewa-vis-tfrag"}],[8716301,{"idx":13,"name":"baron-neon-blue-g-on","tpage_name":"ctysluma-sprite"}],[327704,{"idx":24,"name":"lightjak-wings-v-src","tpage_name":"level-default-water"}],[655361,{"idx":1,"name":"environment-phong-rim","tpage_name":"level-default-warp"}],[48496640,{"idx":0,"name":"sewer-plate-01","tpage_name":"sewa-vis-tfrag"}],[8716300,{"idx":12,"name":"baron-neon-blue-g","tpage_name":"ctysluma-sprite"}],[94240776,{"idx":8,"name":"palcab-lowres-ctyslum-roof-01","tpage_name":"intpfall-vis-tfrag"}],[60620916,{"idx":116,"name":"jakchires-glovetop","tpage_name":"minea-vis-pris"}],[16908325,{"idx":37,"name":"common-black","tpage_name":"ctyfarmb-vis-tfrag"}],[327703,{"idx":23,"name":"lightjak-wings-u-src","tpage_name":"level-default-water"}],[655360,{"idx":0,"name":"environment-ice","tpage_name":"level-default-warp"}],[8716299,{"idx":11,"name":"baron-neon-blue-f-on","tpage_name":"ctysluma-sprite"}],[8716298,{"idx":10,"name":"baron-neon-blue-f","tpage_name":"ctysluma-sprite"}],[8716297,{"idx":9,"name":"baron-neon-blue-e-on","tpage_name":"ctysluma-sprite"}],[8716296,{"idx":8,"name":"baron-neon-blue-e","tpage_name":"ctysluma-sprite"}],[8716295,{"idx":7,"name":"baron-neon-blue-d-on","tpage_name":"ctysluma-sprite"}],[8716294,{"idx":6,"name":"baron-neon-blue-d","tpage_name":"ctysluma-sprite"}],[196612,{"idx":4,"name":"skull-gem-dest","tpage_name":"programmer"}],[8716293,{"idx":5,"name":"baron-neon-blue-c-on","tpage_name":"ctysluma-sprite"}],[196611,{"idx":3,"name":"programmer_eye_right","tpage_name":"programmer"}],[8716292,{"idx":4,"name":"baron-neon-blue-c","tpage_name":"ctysluma-sprite"}],[196610,{"idx":2,"name":"programmer_eye_left","tpage_name":"programmer"}],[8716291,{"idx":3,"name":"baron-neon-blue-b-on","tpage_name":"ctysluma-sprite"}],[196609,{"idx":1,"name":"colorbars13","tpage_name":"programmer"}],[8716290,{"idx":2,"name":"baron-neon-blue-b","tpage_name":"ctysluma-sprite"}],[196608,{"idx":0,"name":"checker","tpage_name":"programmer"}],[8716289,{"idx":1,"name":"baron-neon-blue-a-on","tpage_name":"ctysluma-sprite"}],[8716288,{"idx":0,"name":"baron-neon-blue-a","tpage_name":"ctysluma-sprite"}],[458856,{"idx":104,"name":"jakc-leatherstrap","tpage_name":"level-default-pris"}],[10879048,{"idx":72,"name":"ctyslumc-window","tpage_name":"ctyslumb-vis-tfrag"}],[20840488,{"idx":40,"name":"jakchires-jacket","tpage_name":"stadiumb-vis-pris"}],[458855,{"idx":103,"name":"jakc-leatherpouch","tpage_name":"level-default-pris"}],[10879047,{"idx":71,"name":"ctyslumc-light-blue","tpage_name":"ctyslumb-vis-tfrag"}],[20840487,{"idx":39,"name":"jakchires-horn","tpage_name":"stadiumb-vis-pris"}],[458854,{"idx":102,"name":"jakc-jacketbody","tpage_name":"level-default-pris"}],[20840486,{"idx":38,"name":"jakchires-hair","tpage_name":"stadiumb-vis-pris"}],[458853,{"idx":101,"name":"jakc-horn","tpage_name":"level-default-pris"}],[10879045,{"idx":69,"name":"ctyslumc-tree-top","tpage_name":"ctyslumb-vis-tfrag"}],[20840485,{"idx":37,"name":"jakchires-glovetop","tpage_name":"stadiumb-vis-pris"}],[35389593,{"idx":153,"name":"prebot-envmap","tpage_name":"introcst-pris"}],[458845,{"idx":93,"name":"jakc-eyebrow","tpage_name":"level-default-pris"}],[20840477,{"idx":29,"name":"jakchires-brwnleather","tpage_name":"stadiumb-vis-pris"}],[76480525,{"idx":13,"name":"daxterheadwidenew","tpage_name":"freehq-pris"}],[35389585,{"idx":145,"name":"beacon-body-03","tpage_name":"introcst-pris"}],[458844,{"idx":92,"name":"jakc-chestplate-straps","tpage_name":"level-default-pris"}],[10879036,{"idx":60,"name":"ctyslumc-green","tpage_name":"ctyslumb-vis-tfrag"}],[20840476,{"idx":28,"name":"jakchires-brownstrap","tpage_name":"stadiumb-vis-pris"}],[76480524,{"idx":12,"name":"daxtergoggles","tpage_name":"freehq-pris"}],[35389584,{"idx":144,"name":"beacon-body-02","tpage_name":"introcst-pris"}],[458843,{"idx":91,"name":"jakc-chestplate","tpage_name":"level-default-pris"}],[10879035,{"idx":59,"name":"ctyslumc-brown","tpage_name":"ctyslumb-vis-tfrag"}],[20840475,{"idx":27,"name":"jakchires-blackstrap","tpage_name":"stadiumb-vis-pris"}],[65536,{"idx":0,"name":"autoeye-iris","tpage_name":"common"}],[458842,{"idx":90,"name":"jakc-brownstrap","tpage_name":"level-default-pris"}],[10879034,{"idx":58,"name":"ctyslumc-light-amber","tpage_name":"ctyslumb-vis-tfrag"}],[20840474,{"idx":26,"name":"jakchires-arm","tpage_name":"stadiumb-vis-pris"}],[458839,{"idx":87,"name":"jakc-beltbuckles","tpage_name":"level-default-pris"}],[20840471,{"idx":23,"name":"jakc-waistband2","tpage_name":"stadiumb-vis-pris"}],[20840467,{"idx":19,"name":"jakc-lens","tpage_name":"stadiumb-vis-pris"}],[458861,{"idx":109,"name":"jakc-scarfhanging","tpage_name":"level-default-pris"}],[20840493,{"idx":45,"name":"jakchires-shoebottom","tpage_name":"stadiumb-vis-pris"}],[56950849,{"idx":65,"name":"waspala-elevator-bolt02","tpage_name":"waspala-tfrag"}],[74383369,{"idx":9,"name":"sewer-scaffold-02","tpage_name":"sewj-vis-tfrag"}],[49020974,{"idx":46,"name":"sewer-grate-01","tpage_name":"sewe-vis-tfrag"}],[62717954,{"idx":2,"name":"cguardgame-blackstrap","tpage_name":"ctypesa-pris"}],[11730953,{"idx":9,"name":"city-ind-overlay-bullethole-b","tpage_name":"ctyinda-vis-shrub"}],[524292,{"idx":4,"name":"sky-hotdot","tpage_name":"sky-textures"}],[48562176,{"idx":0,"name":"airlock-door-bolt","tpage_name":"sewa-vis-pris"}],[43646999,{"idx":23,"name":"straw-bit","tpage_name":"waswide-sprite"}],[42401819,{"idx":27,"name":"wascity-ground-01","tpage_name":"wasdoors-vis-tfrag"}],[112525317,{"idx":5,"name":"daxterarm","tpage_name":"desrescc-pris"}],[35127409,{"idx":113,"name":"jakchires-brwnleather","tpage_name":"factorya-pris"}],[11599874,{"idx":2,"name":"sign-praxis-banner","tpage_name":"ctyinda-sprite"}],[10813462,{"idx":22,"name":"cityslumc-grass","tpage_name":"ctyslumb-vis-shrub"}],[75890712,{"idx":24,"name":"onin-dirt-floor","tpage_name":"onintent-tfrag"}],[458860,{"idx":108,"name":"jakc-scarf","tpage_name":"level-default-pris"}],[20840492,{"idx":44,"name":"jakchires-precarmor-01","tpage_name":"stadiumb-vis-pris"}],[56950848,{"idx":64,"name":"waspala-fountain-base03","tpage_name":"waspala-tfrag"}],[74383368,{"idx":8,"name":"sewer-metal-block-07","tpage_name":"sewj-vis-tfrag"}],[35127408,{"idx":112,"name":"jakchires-brownstrap","tpage_name":"factorya-pris"}],[11599872,{"idx":0,"name":"sign-fashion2","tpage_name":"ctyinda-sprite"}],[60948550,{"idx":70,"name":"fora-supportmetall","tpage_name":"minec-vis-tfrag"}],[75890710,{"idx":22,"name":"onin-critter-fur","tpage_name":"onintent-tfrag"}],[458858,{"idx":106,"name":"jakc-lens","tpage_name":"level-default-pris"}],[20840490,{"idx":42,"name":"jakchires-lightbrownspat","tpage_name":"stadiumb-vis-pris"}],[60686386,{"idx":50,"name":"minc-red-paint-01","tpage_name":"mineb-vis-tfrag"}],[56950846,{"idx":62,"name":"waspala-throne-cap","tpage_name":"waspala-tfrag"}],[74383366,{"idx":6,"name":"sewer-pipe-rim-08","tpage_name":"sewj-vis-tfrag"}],[11730950,{"idx":6,"name":"city-ind-decal-04","tpage_name":"ctyinda-vis-shrub"}],[524289,{"idx":1,"name":"environment-ocean-alphamod","tpage_name":"sky-textures"}],[35127406,{"idx":110,"name":"jakchires-arm","tpage_name":"factorya-pris"}],[458857,{"idx":105,"name":"jakc-leggging","tpage_name":"level-default-pris"}],[10879049,{"idx":73,"name":"ctyslumc-window-panes","tpage_name":"ctyslumb-vis-tfrag"}],[20840489,{"idx":41,"name":"jakchires-leatherpouch","tpage_name":"stadiumb-vis-pris"}],[60686385,{"idx":49,"name":"min-env-mar-01","tpage_name":"mineb-vis-tfrag"}],[56950845,{"idx":61,"name":"waspala-stage-end","tpage_name":"waspala-tfrag"}],[74383365,{"idx":5,"name":"sewer-small-light-01","tpage_name":"sewj-vis-tfrag"}],[11730949,{"idx":5,"name":"city-ind-stain-02","tpage_name":"ctyinda-vis-shrub"}],[524288,{"idx":0,"name":"common-gray","tpage_name":"sky-textures"}],[35127405,{"idx":109,"name":"jakc-wristband-a2","tpage_name":"factorya-pris"}],[122093568,{"idx":0,"name":"hemi-gradient-flames","tpage_name":"factoryb-vis-water"}],[107151408,{"idx":48,"name":"spikey-frog-toenails","tpage_name":"volcanoa-vis-pris"}],[16121899,{"idx":43,"name":"t-citywide-met-strp01","tpage_name":"ctyfarma-vis-tfrag"}],[62652416,{"idx":0,"name":"bam-eyelight","tpage_name":"ctypepa-pris"}],[26542196,{"idx":116,"name":"wstd-scaffold-wall-01","tpage_name":"wasstada-tfrag"}],[10878986,{"idx":10,"name":"city-slum-bigpipe-04","tpage_name":"ctyslumb-vis-tfrag"}],[60948496,{"idx":16,"name":"minc-red-paint-02","tpage_name":"minec-vis-tfrag"}],[62193676,{"idx":12,"name":"riges01","tpage_name":"ctycarb-pris"}],[154796047,{"idx":15,"name":"daxterlense","tpage_name":"ljakndax-pris"}],[151060507,{"idx":27,"name":"fac-switch-rim-01","tpage_name":"factoryc-vis-pris"}],[144834607,{"idx":47,"name":"rail-base-mid-01","tpage_name":"combn-tfrag"}],[106234027,{"idx":171,"name":"roboboss-shinyorange-01","tpage_name":"mined-pris"}],[94240867,{"idx":99,"name":"palcab-lowres-background-peaks-02","tpage_name":"intpfall-vis-tfrag"}],[21299283,{"idx":83,"name":"rhino-horn-01","tpage_name":"wasall-pris"}],[458761,{"idx":9,"name":"board-iris-bottom","tpage_name":"level-default-pris"}],[35389501,{"idx":61,"name":"jakb-facert","tpage_name":"introcst-pris"}],[62259211,{"idx":11,"name":"jets01","tpage_name":"ctycarc-pris"}],[61014031,{"idx":15,"name":"minc-blue-paint-rust02","tpage_name":"minec-vis-shrub"}],[48562231,{"idx":55,"name":"jakc-gogglemetal","tpage_name":"sewa-vis-pris"}],[52297771,{"idx":43,"name":"freehg-display01","tpage_name":"freehq-tfrag"}],[11403378,{"idx":114,"name":"cityslumc-awning-LOW","tpage_name":"ctyslumc-vis-tfrag"}],[76480607,{"idx":95,"name":"jakchires-horn","tpage_name":"freehq-pris"}],[35651589,{"idx":5,"name":"ashelin-cgrank","tpage_name":"introcst-pris2"}],[589840,{"idx":16,"name":"hud-green-eco-pickup-01","tpage_name":"level-default-minimap"}],[75890743,{"idx":55,"name":"onin-tank-wood","tpage_name":"onintent-tfrag"}],[89587723,{"idx":11,"name":"environment-oldmetal","tpage_name":"lwstdpck-pris"}],[88277039,{"idx":47,"name":"cguard-air-train-canister","tpage_name":"introcst-tfrag"}],[100728839,{"idx":7,"name":"sig-facert","tpage_name":"ljaksig-pris2"}],[62259209,{"idx":9,"name":"hood01","tpage_name":"ctycarc-pris"}],[61014029,{"idx":13,"name":"minc-safe-plate-01","tpage_name":"minec-vis-shrub"}],[48562229,{"idx":53,"name":"jakc-armor","tpage_name":"sewa-vis-pris"}],[52297769,{"idx":41,"name":"freehq-env","tpage_name":"freehq-tfrag"}],[11403376,{"idx":112,"name":"cityslumc-pipe","tpage_name":"ctyslumc-vis-tfrag"}],[12255242,{"idx":10,"name":"city-ind-overlay-bullethole-b","tpage_name":"ctyindb-vis-shrub"}],[14745602,{"idx":2,"name":"city-copper","tpage_name":"ctygenb-vis-shrub"}],[35651587,{"idx":3,"name":"ashelin-brownstrap","tpage_name":"introcst-pris2"}],[8323202,{"idx":130,"name":"bluecrate-04","tpage_name":"ctywide-vis-tfrag"}],[88277037,{"idx":45,"name":"cguard-air-train-glass","tpage_name":"introcst-tfrag"}],[100728837,{"idx":5,"name":"sig-eyelid","tpage_name":"ljaksig-pris2"}],[393237,{"idx":21,"name":"life-crate-bolt","tpage_name":"level-default-tfrag"}],[35651600,{"idx":16,"name":"ashelin-hair","tpage_name":"introcst-pris2"}],[70320128,{"idx":0,"name":"JakIII","tpage_name":"inttitle-minimap"}],[67829768,{"idx":8,"name":"screen-05","tpage_name":"freehq-sprite"}],[28049428,{"idx":20,"name":"troof-shield-02","tpage_name":"intpalrf-tfrag"}],[94371916,{"idx":76,"name":"palace-break-wall06","tpage_name":"intpfall-vis-pris"}],[99483670,{"idx":22,"name":"common-black","tpage_name":"lformach-vis-pris"}],[100728850,{"idx":18,"name":"sig-horn","tpage_name":"ljaksig-pris2"}],[262275,{"idx":131,"name":"ripples","tpage_name":"level-default-sprite"}],[117637206,{"idx":86,"name":"jakc-waistband2","tpage_name":"destrack-pris"}],[16908324,{"idx":36,"name":"city-farm-mark-roof-tiles","tpage_name":"ctyfarmb-vis-tfrag"}],[28114944,{"idx":0,"name":"troof-beam01","tpage_name":"intpalrf-shrub"}],[11403375,{"idx":111,"name":"cityslumc-lamp-gold","tpage_name":"ctyslumc-vis-tfrag"}],[12255241,{"idx":9,"name":"city-ind-wall-noisy-05","tpage_name":"ctyindb-vis-shrub"}],[14745601,{"idx":1,"name":"city-bluelight","tpage_name":"ctygenb-vis-shrub"}],[35651586,{"idx":2,"name":"ashelin-boottop","tpage_name":"introcst-pris2"}],[851991,{"idx":23,"name":"common_sandstone_pill01","tpage_name":"halfpipe-tfrag"}],[62259207,{"idx":7,"name":"gunbox01","tpage_name":"ctycarc-pris"}],[61014027,{"idx":11,"name":"minc-rust-bars-01","tpage_name":"minec-vis-shrub"}],[52297767,{"idx":39,"name":"freehq-ground-tile-set1-bm","tpage_name":"freehq-tfrag"}],[11403374,{"idx":110,"name":"cityslumc-lamp-small","tpage_name":"ctyslumc-vis-tfrag"}],[983077,{"idx":37,"name":"environment-darkprec","tpage_name":"halfpipe-pris"}],[35651585,{"idx":1,"name":"ashelin-bolts","tpage_name":"introcst-pris2"}],[48824320,{"idx":0,"name":"sewer-nut","tpage_name":"sewc-vis-shrub"}],[262300,{"idx":156,"name":"ring","tpage_name":"level-default-sprite"}],[851990,{"idx":22,"name":"common_sandstone_trim01","tpage_name":"halfpipe-tfrag"}],[8323126,{"idx":54,"name":"citywide-window-litwindow","tpage_name":"ctywide-vis-tfrag"}],[49610801,{"idx":49,"name":"sewer-brick-block-09","tpage_name":"sewf-vis-tfrag"}],[60817421,{"idx":13,"name":"minc-rust-02","tpage_name":"mineb-vis-shrub"}],[95879170,{"idx":2,"name":"charHOLD","tpage_name":"ltorn-pris2"}],[8716367,{"idx":79,"name":"blue-tracer","tpage_name":"ctysluma-sprite"}],[458753,{"idx":1,"name":"bam-hairhilite","tpage_name":"level-default-pris"}],[49086473,{"idx":9,"name":"sew-laserturret-pole","tpage_name":"sewe-vis-shrub"}],[41615393,{"idx":33,"name":"was-dogat-face","tpage_name":"wascitya-vis-pris"}],[35389493,{"idx":53,"name":"beacon-body-01","tpage_name":"introcst-pris"}],[8323122,{"idx":50,"name":"t-palshaft-pil-01","tpage_name":"ctywide-vis-tfrag"}],[262182,{"idx":38,"name":"lasersmoke-12","tpage_name":"level-default-sprite"}],[14680098,{"idx":34,"name":"jakchires-horn","tpage_name":"ctygenb-vis-pris"}],[49610796,{"idx":44,"name":"sewer-metal-block-05","tpage_name":"sewf-vis-tfrag"}],[60817416,{"idx":8,"name":"minc-metal-wheel-01","tpage_name":"mineb-vis-shrub"}],[8716362,{"idx":74,"name":"sign-doctors","tpage_name":"ctysluma-sprite"}],[11403340,{"idx":76,"name":"ctyslumc-window-panes","tpage_name":"ctyslumc-vis-tfrag"}],[57081874,{"idx":18,"name":"daxtertuft","tpage_name":"waspala-pris"}],[49610794,{"idx":42,"name":"sewer-grate-01","tpage_name":"sewf-vis-tfrag"}],[60817414,{"idx":6,"name":"minb-brok-floor","tpage_name":"mineb-vis-shrub"}],[49610753,{"idx":1,"name":"sewer-concrete-edge-02","tpage_name":"sewf-vis-tfrag"}],[8716360,{"idx":72,"name":"sign-blank","tpage_name":"ctysluma-sprite"}],[262197,{"idx":53,"name":"lasersmoke-27","tpage_name":"level-default-sprite"}],[71630852,{"idx":4,"name":"king-bluemetal","tpage_name":"ldampksm-pris2"}],[8323137,{"idx":65,"name":"citywide-exhaust-body","tpage_name":"ctywide-vis-tfrag"}],[11403338,{"idx":74,"name":"ctyslumc-light-blue","tpage_name":"ctyslumc-vis-tfrag"}],[57081872,{"idx":16,"name":"daxternose","tpage_name":"waspala-pris"}],[49610792,{"idx":40,"name":"sewer-plate-04","tpage_name":"sewf-vis-tfrag"}],[60817412,{"idx":4,"name":"minb-stone26","tpage_name":"mineb-vis-shrub"}],[8716358,{"idx":70,"name":"baron-neon-white-long","tpage_name":"ctysluma-sprite"}],[14548994,{"idx":2,"name":"sign-ctygenb-arrows","tpage_name":"ctygenb-sprite"}],[852014,{"idx":46,"name":"metalcrate-lod03","tpage_name":"halfpipe-tfrag"}],[28049437,{"idx":29,"name":"intr-beam-no-alpha01","tpage_name":"intpalrf-tfrag"}],[120520705,{"idx":1,"name":"airlock-door-cog","tpage_name":"forestx-vis-pris"}],[94371925,{"idx":85,"name":"rail01","tpage_name":"intpfall-vis-pris"}],[262196,{"idx":52,"name":"lasersmoke-26","tpage_name":"level-default-sprite"}],[71630851,{"idx":3,"name":"king-blackskirt2","tpage_name":"ldampksm-pris2"}],[8323136,{"idx":64,"name":"ctywide-ox-met-01","tpage_name":"ctywide-vis-tfrag"}],[262195,{"idx":51,"name":"lasersmoke-25","tpage_name":"level-default-sprite"}],[71630850,{"idx":2,"name":"king-arm","tpage_name":"ldampksm-pris2"}],[8323135,{"idx":63,"name":"t-palshaft-plate01","tpage_name":"ctywide-vis-tfrag"}],[106364930,{"idx":2,"name":"environment-oldmetal","tpage_name":"mined-pris2"}],[76480610,{"idx":98,"name":"jakchires-lightbrownspat","tpage_name":"freehq-pris"}],[65994754,{"idx":2,"name":"edgeglow","tpage_name":"intpfall-sprite"}],[48562234,{"idx":58,"name":"jakc-waistband2","tpage_name":"sewa-vis-pris"}],[61014034,{"idx":18,"name":"minc-blue-paint-02","tpage_name":"minec-vis-shrub"}],[52297774,{"idx":46,"name":"freehq-floor-walk-set01","tpage_name":"freehq-tfrag"}],[11403381,{"idx":117,"name":"city-ind-black","tpage_name":"ctyslumc-vis-tfrag"}],[262194,{"idx":50,"name":"lasersmoke-24","tpage_name":"level-default-sprite"}],[852011,{"idx":43,"name":"metalcrate-04","tpage_name":"halfpipe-tfrag"}],[8912951,{"idx":55,"name":"city-slum-crater-blend-01","tpage_name":"ctysluma-vis-tfrag"}],[71565314,{"idx":2,"name":"pecker-eyelid","tpage_name":"ldampksm-pris"}],[67829774,{"idx":14,"name":"screen-11","tpage_name":"freehq-sprite"}],[28049434,{"idx":26,"name":"intr-horiz-trim02","tpage_name":"intpalrf-tfrag"}],[94371922,{"idx":82,"name":"palace-break-winwall01","tpage_name":"intpfall-vis-pris"}],[106364929,{"idx":1,"name":"bam-hairhilite","tpage_name":"mined-pris2"}],[76480609,{"idx":97,"name":"jakchires-leatherpouch","tpage_name":"freehq-pris"}],[61014033,{"idx":17,"name":"minc-rust-02","tpage_name":"minec-vis-shrub"}],[65994753,{"idx":1,"name":"palcab-blue-rotaters","tpage_name":"intpfall-sprite"}],[48562233,{"idx":57,"name":"jakc-scarf","tpage_name":"sewa-vis-pris"}],[52297773,{"idx":45,"name":"freehq-floor-tile-set02","tpage_name":"freehq-tfrag"}],[11403380,{"idx":116,"name":"ctyslumc-wall-trim-LOW","tpage_name":"ctyslumc-vis-tfrag"}],[393242,{"idx":26,"name":"skull-gem-alpha-03","tpage_name":"level-default-tfrag"}],[112394255,{"idx":15,"name":"des-transport-pouch-03","tpage_name":"desrescg-pris"}],[35651605,{"idx":21,"name":"ashelin-pantstop","tpage_name":"introcst-pris2"}],[852010,{"idx":42,"name":"metalcrate-05","tpage_name":"halfpipe-tfrag"}],[106364928,{"idx":0,"name":"bam-eyelight","tpage_name":"mined-pris2"}],[76480608,{"idx":96,"name":"jakchires-jacket","tpage_name":"freehq-pris"}],[61014032,{"idx":16,"name":"minc-yel-safe-paint-rust01","tpage_name":"minec-vis-shrub"}],[48562232,{"idx":56,"name":"jakc-lens","tpage_name":"sewa-vis-pris"}],[65994752,{"idx":0,"name":"seagull-wing","tpage_name":"intpfall-sprite"}],[52297772,{"idx":44,"name":"freehq-floor-tile-set01","tpage_name":"freehq-tfrag"}],[11403379,{"idx":115,"name":"city-tile-LOW","tpage_name":"ctyslumc-vis-tfrag"}],[393241,{"idx":25,"name":"skull-gem-alpha-02","tpage_name":"level-default-tfrag"}],[64225283,{"idx":3,"name":"waspala-shrub-plant","tpage_name":"waspala-shrub"}],[35651604,{"idx":20,"name":"ashelin-jacketstraps","tpage_name":"introcst-pris2"}],[852009,{"idx":41,"name":"metalcrate-02","tpage_name":"halfpipe-tfrag"}],[262191,{"idx":47,"name":"lasersmoke-21","tpage_name":"level-default-sprite"}],[393240,{"idx":24,"name":"skull-gem-alpha-01","tpage_name":"level-default-tfrag"}],[64225282,{"idx":2,"name":"for-shrub-moss","tpage_name":"waspala-shrub"}],[112394253,{"idx":13,"name":"des-transport-pouch-01","tpage_name":"desrescg-pris"}],[35651603,{"idx":19,"name":"ashelin-jacketsleeve","tpage_name":"introcst-pris2"}],[852008,{"idx":40,"name":"bluecrate-lod04","tpage_name":"halfpipe-tfrag"}],[262190,{"idx":46,"name":"lasersmoke-20","tpage_name":"level-default-sprite"}],[393239,{"idx":23,"name":"skull-gem-alpha-00","tpage_name":"level-default-tfrag"}],[112394252,{"idx":12,"name":"des-transport-plate-02","tpage_name":"desrescg-pris"}],[35651602,{"idx":18,"name":"ashelin-jacketbody","tpage_name":"introcst-pris2"}],[8323082,{"idx":10,"name":"citywide-wall-greybolts","tpage_name":"ctywide-vis-tfrag"}],[11403383,{"idx":119,"name":"lfacrm-rubber-01","tpage_name":"ctyslumc-vis-tfrag"}],[393231,{"idx":15,"name":"krimsoncrate-05","tpage_name":"level-default-tfrag"}],[35651594,{"idx":10,"name":"ashelin-face","tpage_name":"introcst-pris2"}],[262181,{"idx":37,"name":"lasersmoke-11","tpage_name":"level-default-sprite"}],[8323081,{"idx":9,"name":"citywide-wall-orange-plain","tpage_name":"ctywide-vis-tfrag"}],[73859141,{"idx":69,"name":"strip-black","tpage_name":"sewg-vis-tfrag"}],[91291661,{"idx":13,"name":"gun-blue-mag","tpage_name":"gungame-vis-tfrag"}],[95027201,{"idx":1,"name":"charHOLD","tpage_name":"lsigjakc-pris2"}],[61014035,{"idx":19,"name":"minc-blue-white-paint-safe-rust04","tpage_name":"minec-vis-shrub"}],[65994755,{"idx":3,"name":"enemy-tracer","tpage_name":"intpfall-sprite"}],[48562235,{"idx":59,"name":"jakc-wraps","tpage_name":"sewa-vis-pris"}],[62259215,{"idx":15,"name":"kcfrontend01","tpage_name":"ctycarc-pris"}],[52297775,{"idx":47,"name":"freehq-floor-walk-set02","tpage_name":"freehq-tfrag"}],[11403382,{"idx":118,"name":"lfacrm-plate-05","tpage_name":"ctyslumc-vis-tfrag"}],[35651593,{"idx":9,"name":"ashelin-eyelid","tpage_name":"introcst-pris2"}],[589844,{"idx":20,"name":"hud-gun-empty-shell-01","tpage_name":"level-default-minimap"}],[11468800,{"idx":0,"name":"map-ctyinda","tpage_name":"ctyinda-minimap"}],[262180,{"idx":36,"name":"lasersmoke-10","tpage_name":"level-default-sprite"}],[16711683,{"idx":3,"name":"city-farm-road-blend-to-alpha-01","tpage_name":"ctyfarmb-vis-alpha"}],[12320818,{"idx":50,"name":"city-ind-wall-05","tpage_name":"ctyindb-vis-tfrag"}],[14811178,{"idx":42,"name":"city-sidewall-2","tpage_name":"ctygenb-vis-tfrag"}],[8323080,{"idx":8,"name":"citywide-wall-frame","tpage_name":"ctywide-vis-tfrag"}],[35651592,{"idx":8,"name":"ashelin-eyebrow","tpage_name":"introcst-pris2"}],[589843,{"idx":19,"name":"hud-gun-blue-shell-01","tpage_name":"level-default-minimap"}],[17563662,{"idx":14,"name":"sign-arrows","tpage_name":"ctyport-sprite"}],[11337762,{"idx":34,"name":"cityslumc-gold-trim","tpage_name":"ctyslumc-vis-shrub"}],[61079628,{"idx":76,"name":"widow-dull-inards","tpage_name":"minec-vis-pris"}],[94240872,{"idx":104,"name":"tpal-beam-red-yellow01","tpage_name":"intpfall-vis-tfrag"}],[262219,{"idx":75,"name":"starflash","tpage_name":"level-default-sprite"}],[262179,{"idx":35,"name":"lasersmoke-09","tpage_name":"level-default-sprite"}],[16711682,{"idx":2,"name":"city-farm-road-01","tpage_name":"ctyfarmb-vis-alpha"}],[12320817,{"idx":49,"name":"city-ind-wall-base-07","tpage_name":"ctyindb-vis-tfrag"}],[14811177,{"idx":41,"name":"city-roof-tile","tpage_name":"ctygenb-vis-tfrag"}],[8323079,{"idx":7,"name":"citywide-wall-boltedmetal","tpage_name":"ctywide-vis-tfrag"}],[35651591,{"idx":7,"name":"ashelin-eye","tpage_name":"introcst-pris2"}],[88277041,{"idx":49,"name":"cguard-air-train-inside-floor","tpage_name":"introcst-tfrag"}],[99483661,{"idx":13,"name":"turret-controls","tpage_name":"lformach-vis-pris"}],[100728841,{"idx":9,"name":"sig-gem-01","tpage_name":"ljaksig-pris2"}],[262266,{"idx":122,"name":"shockwave","tpage_name":"level-default-sprite"}],[49283174,{"idx":102,"name":"widow-dull-inards","tpage_name":"sewd-vis-pris"}],[74186774,{"idx":22,"name":"sewer-pipe-rim-05","tpage_name":"sewh-vis-pris"}],[17563661,{"idx":13,"name":"hiphog-exterior-yellow-on","tpage_name":"ctyport-sprite"}],[11337761,{"idx":33,"name":"cityslumc-grass-yellow","tpage_name":"ctyslumc-vis-shrub"}],[61079627,{"idx":75,"name":"squid-bulb-sm","tpage_name":"minec-vis-pris"}],[94240871,{"idx":103,"name":"tpal-panl_piller01","tpage_name":"intpfall-vis-tfrag"}],[262218,{"idx":74,"name":"specs","tpage_name":"level-default-sprite"}],[262178,{"idx":34,"name":"lasersmoke-08","tpage_name":"level-default-sprite"}],[8323118,{"idx":46,"name":"citywide-consite-steel","tpage_name":"ctywide-vis-tfrag"}],[16711681,{"idx":1,"name":"city-farm-treetop-02","tpage_name":"ctyfarmb-vis-alpha"}],[12320816,{"idx":48,"name":"city-ind-buldge-light-self-illuminated-01","tpage_name":"ctyindb-vis-tfrag"}],[14811176,{"idx":40,"name":"city-roofmetal","tpage_name":"ctygenb-vis-tfrag"}],[8323078,{"idx":6,"name":"citywide-wall-mainmetal","tpage_name":"ctywide-vis-tfrag"}],[35651590,{"idx":6,"name":"ashelin-chest","tpage_name":"introcst-pris2"}],[65537,{"idx":1,"name":"autoeye-lid","tpage_name":"common"}],[71630866,{"idx":18,"name":"king-leg","tpage_name":"ldampksm-pris2"}],[49217544,{"idx":8,"name":"sewer-waterfall-01-c-dest","tpage_name":"sewc-vis-water"}],[8323151,{"idx":79,"name":"palcab-lowres-background-hills-01","tpage_name":"ctywide-vis-tfrag"}],[8847394,{"idx":34,"name":"wascity-ground-01","tpage_name":"ctysluma-vis-shrub"}],[11337754,{"idx":26,"name":"ctyslumc-decal-04","tpage_name":"ctyslumc-vis-shrub"}],[94240864,{"idx":96,"name":"palcab-smallpipe","tpage_name":"intpfall-vis-tfrag"}],[94240870,{"idx":102,"name":"palcab-lowres-background-shoreline-02","tpage_name":"intpfall-vis-tfrag"}],[262177,{"idx":33,"name":"lasersmoke-07","tpage_name":"level-default-sprite"}],[16711680,{"idx":0,"name":"city-farm-treetop","tpage_name":"ctyfarmb-vis-alpha"}],[12320815,{"idx":47,"name":"city-ind-buldge-light-01","tpage_name":"ctyindb-vis-tfrag"}],[14811175,{"idx":39,"name":"city-bluelight","tpage_name":"ctygenb-vis-tfrag"}],[8323077,{"idx":5,"name":"city-bluelight","tpage_name":"ctywide-vis-tfrag"}],[94240869,{"idx":101,"name":"palcab-lowres-background-mountains","tpage_name":"intpfall-vis-tfrag"}],[262176,{"idx":32,"name":"lasersmoke-06","tpage_name":"level-default-sprite"}],[8323116,{"idx":44,"name":"palcab-lowres-background-rocksnow","tpage_name":"ctywide-vis-tfrag"}],[8323076,{"idx":4,"name":"citywide-metal-wall","tpage_name":"ctywide-vis-tfrag"}],[62259210,{"idx":10,"name":"jetTop01","tpage_name":"ctycarc-pris"}],[61014030,{"idx":14,"name":"minc-falngplat-lorez","tpage_name":"minec-vis-shrub"}],[48562230,{"idx":54,"name":"jakc-chestplate-straps","tpage_name":"sewa-vis-pris"}],[52297770,{"idx":42,"name":"freehq-panel-06","tpage_name":"freehq-tfrag"}],[11403377,{"idx":113,"name":"ctyslumc-window-panes-LOW","tpage_name":"ctyslumc-vis-tfrag"}],[12255243,{"idx":11,"name":"city-ind-overlay-bullethole-c","tpage_name":"ctyindb-vis-shrub"}],[14745603,{"idx":3,"name":"city-dirt-overlay","tpage_name":"ctygenb-vis-shrub"}],[35651588,{"idx":4,"name":"ashelin-cglogo","tpage_name":"introcst-pris2"}],[589839,{"idx":15,"name":"hud-egg-glow","tpage_name":"level-default-minimap"}],[75890742,{"idx":54,"name":"onin-tank-metal","tpage_name":"onintent-tfrag"}],[89587722,{"idx":10,"name":"bam-hairhilite","tpage_name":"lwstdpck-pris"}],[8323203,{"idx":131,"name":"bluecrate-01","tpage_name":"ctywide-vis-tfrag"}],[88277038,{"idx":46,"name":"cguard-air-train-side2","tpage_name":"introcst-tfrag"}],[100728838,{"idx":6,"name":"sig-faceleft","tpage_name":"ljaksig-pris2"}],[262175,{"idx":31,"name":"lasersmoke-05","tpage_name":"level-default-sprite"}],[8323115,{"idx":43,"name":"palcab-lowres-background-rocksnow2","tpage_name":"ctywide-vis-tfrag"}],[851995,{"idx":27,"name":"dk-eco-vent-side-01","tpage_name":"halfpipe-tfrag"}],[8323075,{"idx":3,"name":"city-slum-roof","tpage_name":"ctywide-vis-tfrag"}],[71630869,{"idx":21,"name":"king-precursermetal-plain","tpage_name":"ldampksm-pris2"}],[49217547,{"idx":11,"name":"sewer-waterfall-01-c","tpage_name":"sewc-vis-water"}],[8323154,{"idx":82,"name":"can-type","tpage_name":"ctywide-vis-tfrag"}],[262174,{"idx":30,"name":"lasersmoke-04","tpage_name":"level-default-sprite"}],[8323114,{"idx":42,"name":"t-citywide-wall-tile-01","tpage_name":"ctywide-vis-tfrag"}],[851994,{"idx":26,"name":"dk-eco-vent-glow-01","tpage_name":"halfpipe-tfrag"}],[8323074,{"idx":2,"name":"citywide-slum-roof","tpage_name":"ctywide-vis-tfrag"}],[17563656,{"idx":8,"name":"hiphog-exterior-orange","tpage_name":"ctyport-sprite"}],[11337756,{"idx":28,"name":"ctyslumc-light","tpage_name":"ctyslumc-vis-shrub"}],[94240866,{"idx":98,"name":"palcab-lowres-background-crater-01","tpage_name":"intpfall-vis-tfrag"}],[71630868,{"idx":20,"name":"king-precursermetal-decor","tpage_name":"ldampksm-pris2"}],[8323153,{"idx":81,"name":"can-knob","tpage_name":"ctywide-vis-tfrag"}],[262173,{"idx":29,"name":"lasersmoke-03","tpage_name":"level-default-sprite"}],[851993,{"idx":25,"name":"environment-darkprec","tpage_name":"halfpipe-tfrag"}],[8323073,{"idx":1,"name":"city-dirtywood","tpage_name":"ctywide-vis-tfrag"}],[262243,{"idx":99,"name":"hitspark","tpage_name":"level-default-sprite"}],[74580033,{"idx":65,"name":"sewer-black","tpage_name":"sewm-vis-tfrag"}],[90767373,{"idx":13,"name":"des-palmtree-beard","tpage_name":"deserth-vis-tfrag"}],[104792142,{"idx":78,"name":"wstlander-04-shirt-strap","tpage_name":"desresc-pris"}],[8323183,{"idx":111,"name":"fac-lo-tower-base-01","tpage_name":"ctywide-vis-tfrag"}],[8323143,{"idx":71,"name":"palcab-lowres-background-peaks-02","tpage_name":"ctywide-vis-tfrag"}],[262203,{"idx":59,"name":"green-lightning","tpage_name":"level-default-sprite"}],[262169,{"idx":25,"name":"lakedrop","tpage_name":"level-default-sprite"}],[393238,{"idx":22,"name":"life-crate-plain","tpage_name":"level-default-tfrag"}],[35651601,{"idx":17,"name":"ashelin-handle-01","tpage_name":"introcst-pris2"}],[28049429,{"idx":21,"name":"troof-beam01","tpage_name":"intpalrf-tfrag"}],[94371917,{"idx":77,"name":"palace-break-wall07","tpage_name":"intpfall-vis-pris"}],[71630857,{"idx":9,"name":"king-earing","tpage_name":"ldampksm-pris2"}],[8323142,{"idx":70,"name":"palcab-lowres-background-hilltops-01","tpage_name":"ctywide-vis-tfrag"}],[262202,{"idx":58,"name":"lightning-darkjak","tpage_name":"level-default-sprite"}],[262168,{"idx":24,"name":"hotdot","tpage_name":"level-default-sprite"}],[121110544,{"idx":16,"name":"hip-tredmetal09","tpage_name":"hiphog-vis-tfrag"}],[118620184,{"idx":24,"name":"jakchires-glovetop","tpage_name":"ljkcdmkl-pris"}],[112394284,{"idx":44,"name":"intcept-b-base-patern01","tpage_name":"desrescg-pris"}],[458756,{"idx":4,"name":"board-blueglow","tpage_name":"level-default-pris"}],[49086476,{"idx":12,"name":"sewer-metal-block-06","tpage_name":"sewe-vis-shrub"}],[41615396,{"idx":36,"name":"was-kangalizard-body","tpage_name":"wascitya-vis-pris"}],[35389496,{"idx":56,"name":"jakb-clips","tpage_name":"introcst-pris"}],[62259206,{"idx":6,"name":"gunBoxFront01","tpage_name":"ctycarc-pris"}],[61014026,{"idx":10,"name":"minc-blue-paint-rust01","tpage_name":"minec-vis-shrub"}],[52297766,{"idx":38,"name":"freehq-monitor05","tpage_name":"freehq-tfrag"}],[11403373,{"idx":109,"name":"cityslumc-metal-trim","tpage_name":"ctyslumc-vis-tfrag"}],[35651584,{"idx":0,"name":"ashelin-beltbuckle","tpage_name":"introcst-pris2"}],[851989,{"idx":21,"name":"common_sandstone_taper01","tpage_name":"halfpipe-tfrag"}],[28049412,{"idx":4,"name":"tpal-flaps01","tpage_name":"intpalrf-tfrag"}],[94371900,{"idx":60,"name":"palace-break-rooftile","tpage_name":"intpfall-vis-pris"}],[262151,{"idx":7,"name":"explosion-nebula","tpage_name":"level-default-sprite"}],[79364251,{"idx":155,"name":"monk-rope","tpage_name":"wasseem-pris"}],[38862858,{"idx":10,"name":"nsta-cave-floor-01","tpage_name":"nsta-vis-tfrag"}],[262278,{"idx":134,"name":"laser-hit2-add","tpage_name":"level-default-sprite"}],[117637209,{"idx":89,"name":"jakchires-arm","tpage_name":"destrack-pris"}],[16908327,{"idx":39,"name":"citywide-wall-frame","tpage_name":"ctyfarmb-vis-tfrag"}],[28114947,{"idx":3,"name":"tpal-piller-caps01","tpage_name":"intpalrf-shrub"}],[458755,{"idx":3,"name":"bam-leather-belt","tpage_name":"level-default-pris"}],[62259205,{"idx":5,"name":"gunBoxBack01","tpage_name":"ctycarc-pris"}],[61014025,{"idx":9,"name":"minc-platfrom-metal-01","tpage_name":"minec-vis-shrub"}],[52297765,{"idx":37,"name":"freehq-ground-tile-set1-rtc","tpage_name":"freehq-tfrag"}],[41287692,{"idx":12,"name":"wstd-shrub-pebbles","tpage_name":"wasstada-shrub"}],[11403372,{"idx":108,"name":"ctyslumc-wall-colored2","tpage_name":"ctyslumc-vis-tfrag"}],[851988,{"idx":20,"name":"common_sandstone_ground01","tpage_name":"halfpipe-tfrag"}],[75890737,{"idx":49,"name":"onin-table","tpage_name":"onintent-tfrag"}],[89587717,{"idx":5,"name":"pecker-tail","tpage_name":"lwstdpck-pris"}],[61669394,{"idx":18,"name":"fora-precursor-metal-plain-01dk","tpage_name":"foresta-vis-shrub"}],[28049411,{"idx":3,"name":"tpal-beam-redstripe01","tpage_name":"intpalrf-tfrag"}],[94371899,{"idx":59,"name":"palace-break-roof03","tpage_name":"intpfall-vis-pris"}],[57278509,{"idx":45,"name":"metalflut-roll","tpage_name":"waswide-vis-pris"}],[52297789,{"idx":61,"name":"freehq-pipe02","tpage_name":"freehq-tfrag"}],[67239949,{"idx":13,"name":"vin-floor-04","tpage_name":"vinroom-vis-tfrag"}],[48562249,{"idx":73,"name":"jakchires-hair","tpage_name":"sewa-vis-pris"}],[81723493,{"idx":101,"name":"jakchires-hair","tpage_name":"ljndklev-pris"}],[75890746,{"idx":58,"name":"onin-tent","tpage_name":"onintent-tfrag"}],[94371873,{"idx":33,"name":"palace-break-bigwall07","tpage_name":"intpfall-vis-pris"}],[262150,{"idx":6,"name":"crate-wood-01-splinter","tpage_name":"level-default-sprite"}],[79364250,{"idx":154,"name":"monk-redjewel","tpage_name":"wasseem-pris"}],[115081243,{"idx":27,"name":"terraformer-bodyside-top","tpage_name":"desboss1-pris"}],[8323201,{"idx":129,"name":"bluecrate-lod03","tpage_name":"ctywide-vis-tfrag"}],[88277036,{"idx":44,"name":"cguard-air-train-inside-mechanical","tpage_name":"introcst-tfrag"}],[100728836,{"idx":4,"name":"sig-eye","tpage_name":"ljaksig-pris2"}],[60555298,{"idx":34,"name":"minc-metal-patch-01","tpage_name":"minea-vis-tfrag"}],[35651698,{"idx":114,"name":"veger-teeth","tpage_name":"introcst-pris2"}],[35651658,{"idx":74,"name":"king-precursermetal-trimbolt","tpage_name":"introcst-pris2"}],[41615395,{"idx":35,"name":"was-dogat-tail","tpage_name":"wascitya-vis-pris"}],[35389495,{"idx":55,"name":"jakb-brownleather","tpage_name":"introcst-pris"}],[49086475,{"idx":11,"name":"sewer-plate-05","tpage_name":"sewe-vis-shrub"}],[99483666,{"idx":18,"name":"turret-metal-red","tpage_name":"lformach-vis-pris"}],[100728846,{"idx":14,"name":"sig-gun-03","tpage_name":"ljaksig-pris2"}],[8323123,{"idx":51,"name":"t-palshaft-dirt-blue-01","tpage_name":"ctywide-vis-tfrag"}],[262183,{"idx":39,"name":"lasersmoke-13","tpage_name":"level-default-sprite"}],[262149,{"idx":5,"name":"crate-metalbolt-splinter","tpage_name":"level-default-sprite"}],[79364249,{"idx":153,"name":"monk-pipeend","tpage_name":"wasseem-pris"}],[115081242,{"idx":26,"name":"terraformer-bodyside-bottom","tpage_name":"desboss1-pris"}],[8323200,{"idx":128,"name":"bluecrate-02","tpage_name":"ctywide-vis-tfrag"}],[88277035,{"idx":43,"name":"cguard-air-train-inside-wall","tpage_name":"introcst-tfrag"}],[100728835,{"idx":3,"name":"sig-belt","tpage_name":"ljaksig-pris2"}],[60555297,{"idx":33,"name":"minc-base-metal-platfrom-01","tpage_name":"minea-vis-tfrag"}],[35651697,{"idx":113,"name":"veger-stickwrap","tpage_name":"introcst-pris2"}],[35651657,{"idx":73,"name":"king-precursermetal-trim2","tpage_name":"introcst-pris2"}],[11337755,{"idx":27,"name":"ctyslumc-wall","tpage_name":"ctyslumc-vis-shrub"}],[94240865,{"idx":97,"name":"palcab-lowres-background-grass-to-desert-01","tpage_name":"intpfall-vis-tfrag"}],[71630867,{"idx":19,"name":"king-lgblackstrap","tpage_name":"ldampksm-pris2"}],[49217545,{"idx":9,"name":"sewer-water-wave-01-c-dest","tpage_name":"sewc-vis-water"}],[8323152,{"idx":80,"name":"can-cap","tpage_name":"ctywide-vis-tfrag"}],[262172,{"idx":28,"name":"lasersmoke-02","tpage_name":"level-default-sprite"}],[851992,{"idx":24,"name":"common_sandstone_base01","tpage_name":"halfpipe-tfrag"}],[8323072,{"idx":0,"name":"citywide-metal-wall-1","tpage_name":"ctywide-vis-tfrag"}],[62259217,{"idx":17,"name":"light01","tpage_name":"ctycarc-pris"}],[48562237,{"idx":61,"name":"jakchires-arm","tpage_name":"sewa-vis-pris"}],[61014037,{"idx":21,"name":"minc-yel-paint-rust01","tpage_name":"minec-vis-shrub"}],[52297777,{"idx":49,"name":"freehq-wal-plate01","tpage_name":"freehq-tfrag"}],[48758784,{"idx":0,"name":"sewer-metal-block-06","tpage_name":"sewc-vis-tfrag"}],[11403384,{"idx":120,"name":"lfacrm-girder-01","tpage_name":"ctyslumc-vis-tfrag"}],[393232,{"idx":16,"name":"krimsoncrate-lod02","tpage_name":"level-default-tfrag"}],[35651595,{"idx":11,"name":"ashelin-glove","tpage_name":"introcst-pris2"}],[589846,{"idx":22,"name":"hud-gun-purple-shell-01","tpage_name":"level-default-minimap"}],[262236,{"idx":92,"name":"dirtpuff01","tpage_name":"level-default-sprite"}],[74580026,{"idx":58,"name":"sewer-block-02-hitweak","tpage_name":"sewm-vis-tfrag"}],[90767366,{"idx":6,"name":"des-cliff-top-03","tpage_name":"deserth-vis-tfrag"}],[74776576,{"idx":0,"name":"airlock-door-bolt","tpage_name":"sewm-vis-pris"}],[73531396,{"idx":4,"name":"sewer-water-still-01-i","tpage_name":"sewi-vis-water"}],[118489115,{"idx":27,"name":"sig-skirts-02","tpage_name":"deshunt-pris2"}],[104792135,{"idx":71,"name":"wstlander-02-skirt","tpage_name":"desresc-pris"}],[8323176,{"idx":104,"name":"city-lowres-mhcity-tower-02","tpage_name":"ctywide-vis-tfrag"}],[262162,{"idx":18,"name":"gun-blue-puffs","tpage_name":"level-default-sprite"}],[35127393,{"idx":97,"name":"daxterteeth","tpage_name":"factorya-pris"}],[76480512,{"idx":0,"name":"bam-eyelight","tpage_name":"freehq-pris"}],[73990152,{"idx":8,"name":"sew-mine-b-body","tpage_name":"sewh-vis-shrub"}],[262171,{"idx":27,"name":"lasersmoke-01","tpage_name":"level-default-sprite"}],[262187,{"idx":43,"name":"lasersmoke-17","tpage_name":"level-default-sprite"}],[12058627,{"idx":3,"name":"sign-praxis-banner","tpage_name":"ctyindb-sprite"}],[852007,{"idx":39,"name":"bluecrate-lod02","tpage_name":"halfpipe-tfrag"}],[8323087,{"idx":15,"name":"citywide-wall-brown-strip","tpage_name":"ctywide-vis-tfrag"}],[73859147,{"idx":75,"name":"sewer-block-01-hitweak","tpage_name":"sewg-vis-tfrag"}],[95027207,{"idx":7,"name":"sig-facert","tpage_name":"lsigjakc-pris2"}],[393236,{"idx":20,"name":"life-crate-alpha-green","tpage_name":"level-default-tfrag"}],[35651599,{"idx":15,"name":"ashelin-gunholster","tpage_name":"introcst-pris2"}],[28049427,{"idx":19,"name":"thrm-shield-01","tpage_name":"intpalrf-tfrag"}],[94371915,{"idx":75,"name":"palace-break-wall05","tpage_name":"intpfall-vis-pris"}],[58654726,{"idx":6,"name":"hiphog-neon-clock-hand","tpage_name":"hiphog-sprite"}],[262311,{"idx":167,"name":"rockbit09","tpage_name":"level-default-sprite"}],[35127351,{"idx":55,"name":"jets01","tpage_name":"factorya-pris"}],[103350344,{"idx":72,"name":"pecker-body-01","tpage_name":"comba-pris"}],[262160,{"idx":16,"name":"gun-blue-beam","tpage_name":"level-default-sprite"}],[91291680,{"idx":32,"name":"gun-cover","tpage_name":"gungame-vis-tfrag"}],[95027220,{"idx":20,"name":"sig-metal-01","tpage_name":"lsigjakc-pris2"}],[8323187,{"idx":115,"name":"fac-lo-bldng-panel-02","tpage_name":"ctywide-vis-tfrag"}],[262247,{"idx":103,"name":"explosion-edge","tpage_name":"level-default-sprite"}],[74186755,{"idx":3,"name":"sew-gun-panel-05","tpage_name":"sewh-vis-pris"}],[74580037,{"idx":69,"name":"sewer-mantel-02","tpage_name":"sewm-vis-tfrag"}],[90767377,{"idx":17,"name":"des-palm-leaf-01","tpage_name":"deserth-vis-tfrag"}],[94240863,{"idx":95,"name":"palcab-lowres-background-strip","tpage_name":"intpfall-vis-tfrag"}],[262210,{"idx":66,"name":"rod-of-god","tpage_name":"level-default-sprite"}],[262170,{"idx":26,"name":"lasersmoke-00","tpage_name":"level-default-sprite"}],[12058626,{"idx":2,"name":"sign-onin-knows","tpage_name":"ctyindb-sprite"}],[852006,{"idx":38,"name":"bluecrate-01","tpage_name":"halfpipe-tfrag"}],[8323086,{"idx":14,"name":"citywide-wall-greydrain","tpage_name":"ctywide-vis-tfrag"}],[73859146,{"idx":74,"name":"sewer-brick-block-04-hitweak","tpage_name":"sewg-vis-tfrag"}],[91291666,{"idx":18,"name":"gun-building-door-01","tpage_name":"gungame-vis-tfrag"}],[95027206,{"idx":6,"name":"sig-faceleft","tpage_name":"lsigjakc-pris2"}],[393235,{"idx":19,"name":"life-crate","tpage_name":"level-default-tfrag"}],[35651598,{"idx":14,"name":"ashelin-gunbarrel-03","tpage_name":"introcst-pris2"}],[112394254,{"idx":14,"name":"des-transport-pouch-02","tpage_name":"desrescg-pris"}],[106168354,{"idx":34,"name":"cav-stone-01","tpage_name":"mined-tfrag"}],[67829766,{"idx":6,"name":"screen-03","tpage_name":"freehq-sprite"}],[28049426,{"idx":18,"name":"tpal-met-pip-01","tpage_name":"intpalrf-tfrag"}],[94371914,{"idx":74,"name":"palace-break-wall04","tpage_name":"intpfall-vis-pris"}],[38862853,{"idx":5,"name":"nsta-cave-stalags-04","tpage_name":"nsta-vis-tfrag"}],[262273,{"idx":129,"name":"splash","tpage_name":"level-default-sprite"}],[71303202,{"idx":34,"name":"king-bolt","tpage_name":"ldamsig-pris2"}],[55115862,{"idx":86,"name":"city-slum-medpipe-01","tpage_name":"wascityb-vis-tfrag"}],[262310,{"idx":166,"name":"rockbit08","tpage_name":"level-default-sprite"}],[35127350,{"idx":54,"name":"jetTop01","tpage_name":"factorya-pris"}],[103350343,{"idx":71,"name":"jakchires-teeth","tpage_name":"comba-pris"}],[262294,{"idx":150,"name":"diamond-star","tpage_name":"level-default-sprite"}],[262233,{"idx":89,"name":"lightning-anim-03","tpage_name":"level-default-sprite"}],[74580023,{"idx":55,"name":"sewer-natural-rock","tpage_name":"sewm-vis-tfrag"}],[90767363,{"idx":3,"name":"des-cliff-top-01","tpage_name":"deserth-vis-tfrag"}],[118489112,{"idx":24,"name":"sig-shoetop","tpage_name":"deshunt-pris2"}],[104792132,{"idx":68,"name":"wstlander-02-ponytail","tpage_name":"desresc-pris"}],[8323173,{"idx":101,"name":"common-black","tpage_name":"ctywide-vis-tfrag"}],[262159,{"idx":15,"name":"glow-soft","tpage_name":"level-default-sprite"}],[91291679,{"idx":31,"name":"gun-building-windowboard-01","tpage_name":"gungame-vis-tfrag"}],[95027219,{"idx":19,"name":"sig-lens","tpage_name":"lsigjakc-pris2"}],[327720,{"idx":40,"name":"com-rod-01","tpage_name":"level-default-water"}],[41615369,{"idx":9,"name":"gekko-hose","tpage_name":"wascitya-vis-pris"}],[35389469,{"idx":29,"name":"cguard1-sleeve","tpage_name":"introcst-pris"}],[8323125,{"idx":53,"name":"t-palshaft-roof-01","tpage_name":"ctywide-vis-tfrag"}],[852005,{"idx":37,"name":"bluecrate-04","tpage_name":"halfpipe-tfrag"}],[12058625,{"idx":1,"name":"sign-fashion2","tpage_name":"ctyindb-sprite"}],[8323085,{"idx":13,"name":"citywide-wall-grill","tpage_name":"ctywide-vis-tfrag"}],[393234,{"idx":18,"name":"krimsoncrate-lod04","tpage_name":"level-default-tfrag"}],[35651597,{"idx":13,"name":"ashelin-gunbarrel-02","tpage_name":"introcst-pris2"}],[589848,{"idx":24,"name":"hud-gun-red-shell-01","tpage_name":"level-default-minimap"}],[262272,{"idx":128,"name":"vol-light","tpage_name":"level-default-sprite"}],[16121898,{"idx":42,"name":"common-black","tpage_name":"ctyfarma-vis-tfrag"}],[262232,{"idx":88,"name":"lightning-anim-02","tpage_name":"level-default-sprite"}],[74580022,{"idx":54,"name":"sewer-bolt-side-02","tpage_name":"sewm-vis-tfrag"}],[90767362,{"idx":2,"name":"des-cliff-trans-01","tpage_name":"deserth-vis-tfrag"}],[118489111,{"idx":23,"name":"sig-shoebottom","tpage_name":"deshunt-pris2"}],[104792131,{"idx":67,"name":"wstlander-02-head","tpage_name":"desresc-pris"}],[8323172,{"idx":100,"name":"city-lowres-mhcity-wall-05","tpage_name":"ctywide-vis-tfrag"}],[262158,{"idx":14,"name":"glow-hotdot","tpage_name":"level-default-sprite"}],[129171458,{"idx":2,"name":"sewer-brick-block-11","tpage_name":"sewn-vis-tfrag"}],[79364258,{"idx":162,"name":"monk-wristwrap","tpage_name":"wasseem-pris"}],[262184,{"idx":40,"name":"lasersmoke-14","tpage_name":"level-default-sprite"}],[12058624,{"idx":0,"name":"intro-sphere","tpage_name":"ctyindb-sprite"}],[852004,{"idx":36,"name":"bluecrate-lod03","tpage_name":"halfpipe-tfrag"}],[8323084,{"idx":12,"name":"citywide-wall-grey","tpage_name":"ctywide-vis-tfrag"}],[262144,{"idx":0,"name":"bigpuff","tpage_name":"level-default-sprite"}],[79364244,{"idx":148,"name":"monk-maleleg","tpage_name":"wasseem-pris"}],[393233,{"idx":17,"name":"krimsoncrate-lod03","tpage_name":"level-default-tfrag"}],[35651596,{"idx":12,"name":"ashelin-gunbarrel-01","tpage_name":"introcst-pris2"}],[131072,{"idx":0,"name":"environment-ocean","tpage_name":"environment-generic"}],[14811189,{"idx":53,"name":"city-sideframe","tpage_name":"ctygenb-vis-tfrag"}],[131073,{"idx":1,"name":"pal-environment-front","tpage_name":"environment-generic"}],[14811190,{"idx":54,"name":"city-pipe","tpage_name":"ctygenb-vis-tfrag"}],[61079630,{"idx":78,"name":"minc-chain-metal-01","tpage_name":"minec-vis-pris"}],[94240874,{"idx":106,"name":"tpal-piller-caps01","tpage_name":"intpfall-vis-tfrag"}],[262308,{"idx":164,"name":"rockbit06","tpage_name":"level-default-sprite"}],[35127348,{"idx":52,"name":"gunbox02","tpage_name":"factorya-pris"}],[48627716,{"idx":4,"name":"sewer-hall-light-01","tpage_name":"sewb-vis-tfrag"}],[42401816,{"idx":24,"name":"wascitya-redish-metal","tpage_name":"wasdoors-vis-tfrag"}],[43646996,{"idx":20,"name":"clay-pot-debris-01","tpage_name":"waswide-sprite"}],[11403320,{"idx":56,"name":"stdm-bush-01","tpage_name":"ctyslumc-vis-tfrag"}],[8912960,{"idx":64,"name":"city-slum-onintent-skull","tpage_name":"ctysluma-vis-tfrag"}],[10813465,{"idx":25,"name":"ctyslumc-decal-02","tpage_name":"ctyslumb-vis-shrub"}],[28049443,{"idx":35,"name":"intr-drain01","tpage_name":"intpalrf-tfrag"}],[94371931,{"idx":91,"name":"tpal-horiz-trim02","tpage_name":"intpfall-vis-pris"}],[262157,{"idx":13,"name":"glow","tpage_name":"level-default-sprite"}],[129171457,{"idx":1,"name":"sewer-brick-roof-01-mipping","tpage_name":"sewn-vis-tfrag"}],[79364257,{"idx":161,"name":"monk-waistwrap","tpage_name":"wasseem-pris"}],[104792143,{"idx":79,"name":"wstlander-04-skirt","tpage_name":"desresc-pris"}],[8323184,{"idx":112,"name":"facb-lo-grey-panel-02","tpage_name":"ctywide-vis-tfrag"}],[262244,{"idx":100,"name":"laser-hit2","tpage_name":"level-default-sprite"}],[74580034,{"idx":66,"name":"sewer-nut","tpage_name":"sewm-vis-tfrag"}],[90767374,{"idx":14,"name":"des-palmplant-leaf-02","tpage_name":"deserth-vis-tfrag"}],[852003,{"idx":35,"name":"bluecrate-02","tpage_name":"halfpipe-tfrag"}],[8323083,{"idx":11,"name":"citywide-palace-support-03","tpage_name":"ctywide-vis-tfrag"}],[73859143,{"idx":71,"name":"sewer-flat-pipe-01-hitweak","tpage_name":"sewg-vis-tfrag"}],[91291663,{"idx":15,"name":"gun-bridge-main","tpage_name":"gungame-vis-tfrag"}],[95027203,{"idx":3,"name":"sig-belt","tpage_name":"lsigjakc-pris2"}],[61079556,{"idx":4,"name":"gekko-laser","tpage_name":"minec-vis-pris"}],[48627756,{"idx":44,"name":"sewer-grate-01","tpage_name":"sewb-vis-tfrag"}],[62324736,{"idx":0,"name":"windshield01","tpage_name":"ctycarc-water"}],[131074,{"idx":2,"name":"war-armor-weathered","tpage_name":"environment-generic"}],[14811191,{"idx":55,"name":"city-red","tpage_name":"ctygenb-vis-tfrag"}],[71303201,{"idx":33,"name":"king-bluemetal","tpage_name":"ldamsig-pris2"}],[55115861,{"idx":85,"name":"city-slum-medpipe-02","tpage_name":"wascityb-vis-tfrag"}],[262309,{"idx":165,"name":"rockbit07","tpage_name":"level-default-sprite"}],[35127349,{"idx":53,"name":"hood01","tpage_name":"factorya-pris"}],[43646997,{"idx":21,"name":"rope-mesh-debris-01","tpage_name":"waswide-sprite"}],[8912961,{"idx":65,"name":"city-slum-onintent-siding","tpage_name":"ctysluma-vis-tfrag"}],[10813466,{"idx":26,"name":"ctyslumc-decal-04","tpage_name":"ctyslumb-vis-shrub"}],[262327,{"idx":183,"name":"radial-gradient","tpage_name":"level-default-sprite"}],[58654727,{"idx":7,"name":"hiphog-neon-clock-hand-small","tpage_name":"hiphog-sprite"}],[262312,{"idx":168,"name":"rockbit10","tpage_name":"level-default-sprite"}],[35127352,{"idx":56,"name":"kcfrontend01","tpage_name":"factorya-pris"}],[103350345,{"idx":73,"name":"pecker-eyelid","tpage_name":"comba-pris"}],[262155,{"idx":11,"name":"footprntr","tpage_name":"level-default-sprite"}],[79364255,{"idx":159,"name":"monk-trim","tpage_name":"wasseem-pris"}],[262161,{"idx":17,"name":"gun-blue-hit-spek","tpage_name":"level-default-sprite"}],[262163,{"idx":19,"name":"gun-enemy-beam","tpage_name":"level-default-sprite"}],[129171463,{"idx":7,"name":"sewer-block-02-hitweak","tpage_name":"sewn-vis-tfrag"}],[79364263,{"idx":167,"name":"environment-darkprec","tpage_name":"wasseem-pris"}],[262164,{"idx":20,"name":"gun-enemy-muzzleflash","tpage_name":"level-default-sprite"}],[38862871,{"idx":23,"name":"nsta-cave-sides","tpage_name":"nsta-vis-tfrag"}],[262291,{"idx":147,"name":"colorflash","tpage_name":"level-default-sprite"}],[61079631,{"idx":79,"name":"squid-drabgun","tpage_name":"minec-vis-pris"}],[94240875,{"idx":107,"name":"tpal-beam01","tpage_name":"intpfall-vis-tfrag"}],[21299291,{"idx":91,"name":"tread-scorpion","tpage_name":"wasall-pris"}],[8323191,{"idx":119,"name":"fac-lo-red-panel-04","tpage_name":"ctywide-vis-tfrag"}],[262165,{"idx":21,"name":"gun-yellow-beam","tpage_name":"level-default-sprite"}],[8323192,{"idx":120,"name":"fac-lo-tower-door-01","tpage_name":"ctywide-vis-tfrag"}],[262166,{"idx":22,"name":"gun-yellow-muzzleflash","tpage_name":"level-default-sprite"}],[262198,{"idx":54,"name":"lasersmoke-28","tpage_name":"level-default-sprite"}],[11403339,{"idx":75,"name":"common-gun-panel-03","tpage_name":"ctyslumc-vis-tfrag"}],[57081873,{"idx":17,"name":"daxterteeth","tpage_name":"waspala-pris"}],[49610793,{"idx":41,"name":"sew-metal-floor-01","tpage_name":"sewf-vis-tfrag"}],[60817413,{"idx":5,"name":"minc-rocky-ground-01","tpage_name":"mineb-vis-shrub"}],[8716359,{"idx":71,"name":"baron-neon-white-long-on","tpage_name":"ctysluma-sprite"}],[14548995,{"idx":3,"name":"sign-ctygenb-erol","tpage_name":"ctygenb-sprite"}],[852015,{"idx":47,"name":"metalcrate-lod04","tpage_name":"halfpipe-tfrag"}],[28049438,{"idx":30,"name":"intr-scalestone-no-alpha01","tpage_name":"intpalrf-tfrag"}],[120520706,{"idx":2,"name":"airlock-door-cog1","tpage_name":"forestx-vis-pris"}],[94371926,{"idx":86,"name":"seat01","tpage_name":"intpfall-vis-pris"}],[262199,{"idx":55,"name":"lasersmoke-29","tpage_name":"level-default-sprite"}],[262200,{"idx":56,"name":"lasersmoke-30","tpage_name":"level-default-sprite"}],[49348665,{"idx":57,"name":"blue-gem","tpage_name":"sewb-vis-pris"}],[60555285,{"idx":21,"name":"minb-brok-floor","tpage_name":"minea-vis-tfrag"}],[35651685,{"idx":101,"name":"veger-hair","tpage_name":"introcst-pris2"}],[12255239,{"idx":7,"name":"city-ind-wall-noisy-border-05","tpage_name":"ctyindb-vis-shrub"}],[57081871,{"idx":15,"name":"daxterlense","tpage_name":"waspala-pris"}],[60817411,{"idx":3,"name":"minc-plate-01","tpage_name":"mineb-vis-shrub"}],[8716357,{"idx":69,"name":"baron-neon-white-e-on","tpage_name":"ctysluma-sprite"}],[16121878,{"idx":22,"name":"city-farm-sprinkle-metal-dirt","tpage_name":"ctyfarma-vis-tfrag"}],[26542175,{"idx":95,"name":"wstd-stands-black","tpage_name":"wasstada-tfrag"}],[81985556,{"idx":20,"name":"marauder-gun-tip","tpage_name":"wasstadc-pris"}],[262201,{"idx":57,"name":"lasersmoke-31","tpage_name":"level-default-sprite"}],[14745600,{"idx":0,"name":"city-blotch-withstreaks-01","tpage_name":"ctygenb-vis-shrub"}],[12255240,{"idx":8,"name":"city-ind-wall-noisy-03","tpage_name":"ctyindb-vis-shrub"}],[16121879,{"idx":23,"name":"city-farm-sprinkle-suppport","tpage_name":"ctyfarma-vis-tfrag"}],[26542176,{"idx":96,"name":"wstd-stands-rib","tpage_name":"wasstada-tfrag"}],[81985557,{"idx":21,"name":"marauder-hand-blue","tpage_name":"wasstadc-pris"}],[262205,{"idx":61,"name":"middot","tpage_name":"level-default-sprite"}],[8323145,{"idx":73,"name":"palcab-lowres-background-mountains","tpage_name":"ctywide-vis-tfrag"}],[262206,{"idx":62,"name":"motion-blur-part","tpage_name":"level-default-sprite"}],[49217539,{"idx":3,"name":"sewer-waterfall-02-c-dest","tpage_name":"sewc-vis-water"}],[8323146,{"idx":74,"name":"palcab-lowres-background-peaks-01","tpage_name":"ctywide-vis-tfrag"}],[262207,{"idx":63,"name":"pal-lightning","tpage_name":"level-default-sprite"}],[67829800,{"idx":40,"name":"vinroom-tv-text-g","tpage_name":"freehq-sprite"}],[589834,{"idx":10,"name":"hud-darkeco-pickup-01","tpage_name":"level-default-minimap"}],[115081237,{"idx":21,"name":"terraformer-metal-09","tpage_name":"desboss1-pris"}],[60555292,{"idx":28,"name":"minb-stone20","tpage_name":"minea-vis-tfrag"}],[35651692,{"idx":108,"name":"veger-shoebottom","tpage_name":"introcst-pris2"}],[75759631,{"idx":15,"name":"daxterlense","tpage_name":"onintent-pris"}],[67043371,{"idx":43,"name":"vinroom-tv-text-o","tpage_name":"vinroom-sprite"}],[74514451,{"idx":19,"name":"kg-grunt-cable-01","tpage_name":"sewj-vis-pris"}],[262208,{"idx":64,"name":"pal-lightning-red","tpage_name":"level-default-sprite"}],[10878987,{"idx":11,"name":"city-slum-litwindow","tpage_name":"ctyslumb-vis-tfrag"}],[94240868,{"idx":100,"name":"palcab-lowres-background-mountains-02","tpage_name":"intpfall-vis-tfrag"}],[21299284,{"idx":84,"name":"rhino-horn-02","tpage_name":"wasall-pris"}],[983068,{"idx":28,"name":"dk-maker-idol-eye-01","tpage_name":"halfpipe-pris"}],[67829811,{"idx":51,"name":"yavin","tpage_name":"freehq-sprite"}],[115081248,{"idx":32,"name":"terraformer-cockpit","tpage_name":"desboss1-pris"}],[60555303,{"idx":39,"name":"minc-light","tpage_name":"minea-vis-tfrag"}],[35651703,{"idx":119,"name":"veger-whitecloth","tpage_name":"introcst-pris2"}],[458762,{"idx":10,"name":"board-main","tpage_name":"level-default-pris"}],[35389502,{"idx":62,"name":"jakb-glovetop","tpage_name":"introcst-pris"}],[26542194,{"idx":114,"name":"wstd-mount-post","tpage_name":"wasstada-tfrag"}],[11599873,{"idx":1,"name":"sign-onin-knows","tpage_name":"ctyinda-sprite"}],[75890711,{"idx":23,"name":"onin-critter-fur-trans","tpage_name":"onintent-tfrag"}],[458859,{"idx":107,"name":"jakc-pants","tpage_name":"level-default-pris"}],[10879051,{"idx":75,"name":"ctyslumc-window-panes2","tpage_name":"ctyslumb-vis-tfrag"}],[20840491,{"idx":43,"name":"jakchires-pants","tpage_name":"stadiumb-vis-pris"}],[56950847,{"idx":63,"name":"waspala-throne-cushion","tpage_name":"waspala-tfrag"}],[74383367,{"idx":7,"name":"sewer-brick-block-09","tpage_name":"sewj-vis-tfrag"}],[49020972,{"idx":44,"name":"sewer-metal-floor-01","tpage_name":"sewe-vis-tfrag"}],[62717952,{"idx":0,"name":"cguardgame-armshield","tpage_name":"ctypesa-pris"}],[11730951,{"idx":7,"name":"city-ind-overlay-bullethole-c","tpage_name":"ctyinda-vis-shrub"}],[524290,{"idx":2,"name":"full-moon","tpage_name":"sky-textures"}],[35127407,{"idx":111,"name":"jakchires-blackstrap","tpage_name":"factorya-pris"}],[262224,{"idx":80,"name":"woodchip","tpage_name":"level-default-sprite"}],[71630879,{"idx":31,"name":"king-wrap","tpage_name":"ldampksm-pris2"}],[118489103,{"idx":15,"name":"sig-gun-04","tpage_name":"deshunt-pris2"}],[104792123,{"idx":59,"name":"wstlander-01-skirt","tpage_name":"desresc-pris"}],[8323164,{"idx":92,"name":"cityslumc-purple-plain","tpage_name":"ctywide-vis-tfrag"}],[74776578,{"idx":2,"name":"airlock-door-main","tpage_name":"sewm-vis-pris"}],[73531398,{"idx":6,"name":"sewer-water-wave-01-i","tpage_name":"sewi-vis-water"}],[118489117,{"idx":29,"name":"sig-undergarments","tpage_name":"deshunt-pris2"}],[104792137,{"idx":73,"name":"wstlander-03-flesh","tpage_name":"desresc-pris"}],[8323178,{"idx":106,"name":"fac-lo-red-panel-02","tpage_name":"ctywide-vis-tfrag"}],[20840464,{"idx":16,"name":"jakc-armor","tpage_name":"stadiumb-vis-pris"}],[20840465,{"idx":17,"name":"jakc-chestplate-straps","tpage_name":"stadiumb-vis-pris"}],[262228,{"idx":84,"name":"laser-hit","tpage_name":"level-default-sprite"}],[118489107,{"idx":19,"name":"sig-lens","tpage_name":"deshunt-pris2"}],[104792127,{"idx":63,"name":"wstlander-02-belt","tpage_name":"desresc-pris"}],[8323168,{"idx":96,"name":"city-tile-LOW","tpage_name":"ctywide-vis-tfrag"}],[20840466,{"idx":18,"name":"jakc-gogglemetal","tpage_name":"stadiumb-vis-pris"}],[262229,{"idx":85,"name":"laser-hit-rim","tpage_name":"level-default-sprite"}],[118489108,{"idx":20,"name":"sig-metal-01","tpage_name":"deshunt-pris2"}],[104792128,{"idx":64,"name":"wstlander-02-bootheel","tpage_name":"desresc-pris"}],[8323169,{"idx":97,"name":"ctyslumc-window-panes-LOW","tpage_name":"ctywide-vis-tfrag"}],[20840468,{"idx":20,"name":"jakc-scarf","tpage_name":"stadiumb-vis-pris"}],[262231,{"idx":87,"name":"lightning-anim-01","tpage_name":"level-default-sprite"}],[74580021,{"idx":53,"name":"sewer-bolt-side-01","tpage_name":"sewm-vis-tfrag"}],[90767361,{"idx":1,"name":"des-totem-stone-01","tpage_name":"deserth-vis-tfrag"}],[118489110,{"idx":22,"name":"sig-sac","tpage_name":"deshunt-pris2"}],[104792130,{"idx":66,"name":"wstlander-02-glove","tpage_name":"desresc-pris"}],[8323171,{"idx":99,"name":"city-lowres-mhcity-wall-06","tpage_name":"ctywide-vis-tfrag"}],[111869956,{"idx":4,"name":"stadiumb-hud-lap-03","tpage_name":"wasleapr-minimap"}],[99418156,{"idx":44,"name":"jakchires-lightbrownspat","tpage_name":"volcanox-pris"}],[96927796,{"idx":52,"name":"jinx-scarf","tpage_name":"ltornjnx-pris2"}],[20840469,{"idx":21,"name":"jakc-scarfhanging","tpage_name":"stadiumb-vis-pris"}],[458838,{"idx":86,"name":"jakc-armor","tpage_name":"level-default-pris"}],[20840470,{"idx":22,"name":"jakc-skirt","tpage_name":"stadiumb-vis-pris"}],[458841,{"idx":89,"name":"jakc-blackstrap","tpage_name":"level-default-pris"}],[10879033,{"idx":57,"name":"ctyslumc-wall","tpage_name":"ctyslumb-vis-tfrag"}],[20840473,{"idx":25,"name":"jakc-wristband-a2","tpage_name":"stadiumb-vis-pris"}],[262220,{"idx":76,"name":"suckpart","tpage_name":"level-default-sprite"}],[10879012,{"idx":36,"name":"common-black","tpage_name":"ctyslumb-vis-tfrag"}],[57147398,{"idx":6,"name":"king-chest","tpage_name":"waspala-pris2"}],[21299309,{"idx":109,"name":"vehicle-fox-tread-01-blur","tpage_name":"wasall-pris"}],[262227,{"idx":83,"name":"flame01","tpage_name":"level-default-sprite"}],[8323167,{"idx":95,"name":"cityslumc-awning-LOW","tpage_name":"ctywide-vis-tfrag"}],[8323144,{"idx":72,"name":"palcab-lowres-background-mountains-02","tpage_name":"ctywide-vis-tfrag"}],[115081230,{"idx":14,"name":"terraformer-minestrips-01","tpage_name":"desboss1-pris"}],[589827,{"idx":3,"name":"hud-arrow-left-01","tpage_name":"level-default-minimap"}],[262245,{"idx":101,"name":"water-drops","tpage_name":"level-default-sprite"}],[74186753,{"idx":1,"name":"sew-gun-body-01","tpage_name":"sewh-vis-pris"}],[74580035,{"idx":67,"name":"sewer-nut-rim","tpage_name":"sewm-vis-tfrag"}],[90767375,{"idx":15,"name":"des-branch-01","tpage_name":"deserth-vis-tfrag"}],[8323185,{"idx":113,"name":"fac-lo-red-panel-01","tpage_name":"ctywide-vis-tfrag"}],[12320776,{"idx":8,"name":"cty-ind-catwalk-panels","tpage_name":"ctyindb-vis-tfrag"}],[14811136,{"idx":0,"name":"city-canal","tpage_name":"ctygenb-vis-tfrag"}],[458851,{"idx":99,"name":"jakc-gogglemetal","tpage_name":"level-default-pris"}],[20840483,{"idx":35,"name":"jakchires-facelft","tpage_name":"stadiumb-vis-pris"}],[76480531,{"idx":19,"name":"environment-oldmetal","tpage_name":"freehq-pris"}],[35389591,{"idx":151,"name":"handcuff-04","tpage_name":"introcst-pris"}],[262246,{"idx":102,"name":"water-radiate","tpage_name":"level-default-sprite"}],[74580036,{"idx":68,"name":"strip-black","tpage_name":"sewm-vis-tfrag"}],[90767376,{"idx":16,"name":"des-palm-top","tpage_name":"deserth-vis-tfrag"}],[8323186,{"idx":114,"name":"fac-lo-top-01","tpage_name":"ctywide-vis-tfrag"}],[12320777,{"idx":9,"name":"city-ind-catwalk-slope-metal","tpage_name":"ctyindb-vis-tfrag"}],[14811137,{"idx":1,"name":"city-canal-bottom","tpage_name":"ctygenb-vis-tfrag"}],[458852,{"idx":100,"name":"jakc-hair","tpage_name":"level-default-pris"}],[10879044,{"idx":68,"name":"ctyslumc-pinetree-big-bark","tpage_name":"ctyslumb-vis-tfrag"}],[20840484,{"idx":36,"name":"jakchires-facert","tpage_name":"stadiumb-vis-pris"}],[35389592,{"idx":152,"name":"jakb-armor","tpage_name":"introcst-pris"}],[262257,{"idx":113,"name":"topglow","tpage_name":"level-default-sprite"}],[49283165,{"idx":93,"name":"cguard1-guntube","tpage_name":"sewd-vis-pris"}],[74186765,{"idx":13,"name":"sew-gun-round-01","tpage_name":"sewh-vis-pris"}],[12320797,{"idx":29,"name":"city-ind-wall-noisy-03","tpage_name":"ctyindb-vis-tfrag"}],[14811157,{"idx":21,"name":"city-wall-base-rim-02","tpage_name":"ctygenb-vis-tfrag"}],[118489105,{"idx":17,"name":"sig-headgear","tpage_name":"deshunt-pris2"}],[104792125,{"idx":61,"name":"wstlander-02-arm","tpage_name":"desresc-pris"}],[8323166,{"idx":94,"name":"cityslumc-billc-LOW","tpage_name":"ctywide-vis-tfrag"}],[262274,{"idx":130,"name":"splash-foam","tpage_name":"level-default-sprite"}],[118489113,{"idx":25,"name":"sig-shoulderarmor","tpage_name":"deshunt-pris2"}],[104792133,{"idx":69,"name":"wstlander-02-scarf","tpage_name":"desresc-pris"}],[8323174,{"idx":102,"name":"city-lowres-mhcity-wall-03","tpage_name":"ctywide-vis-tfrag"}],[48627795,{"idx":83,"name":"sewer-metal-block-04-hitweak","tpage_name":"sewb-vis-tfrag"}],[73531395,{"idx":3,"name":"sewer-waterfall-02-i-dest","tpage_name":"sewi-vis-water"}],[118489114,{"idx":26,"name":"sig-skirts","tpage_name":"deshunt-pris2"}],[104792134,{"idx":70,"name":"wstlander-02-shirt","tpage_name":"desresc-pris"}],[8323175,{"idx":103,"name":"city-lowres-mhcity-tower-01","tpage_name":"ctywide-vis-tfrag"}],[327710,{"idx":30,"name":"yellow-laser","tpage_name":"level-default-water"}],[262279,{"idx":135,"name":"shell-casing-01","tpage_name":"level-default-sprite"}],[8388610,{"idx":2,"name":"security-env-dest","tpage_name":"ctywide-vis-water"}],[118489118,{"idx":30,"name":"vin-teeth-01","tpage_name":"deshunt-pris2"}],[104792138,{"idx":74,"name":"wstlander-04-dark-blue","tpage_name":"desresc-pris"}],[8323179,{"idx":107,"name":"fac-lo-grey-panel-02","tpage_name":"ctywide-vis-tfrag"}],[327711,{"idx":31,"name":"mushroom-dest","tpage_name":"level-default-water"}],[35389460,{"idx":20,"name":"cguard1-headshield","tpage_name":"introcst-pris"}],[851970,{"idx":2,"name":"t1-grass","tpage_name":"halfpipe-tfrag"}],[48758834,{"idx":50,"name":"sewer-lip-01","tpage_name":"sewc-vis-tfrag"}],[53739554,{"idx":34,"name":"kgtrns-wing01","tpage_name":"forestb-vis-pris"}],[21299290,{"idx":90,"name":"tread-interceptor-rhino","tpage_name":"wasall-pris"}],[48693250,{"idx":2,"name":"sewer-shrub-pitting-01","tpage_name":"sewb-vis-shrub"}],[55115820,{"idx":44,"name":"city-port-bigpipe-ring-side","tpage_name":"wascityb-vis-tfrag"}],[48889920,{"idx":64,"name":"sewer-metal-trim-02","tpage_name":"sewd-vis-tfrag"}],[41418840,{"idx":88,"name":"wascity-metal-ladder-rung","tpage_name":"wascitya-vis-tfrag"}],[8912910,{"idx":14,"name":"city-slum-litwindow","tpage_name":"ctysluma-vis-tfrag"}],[73728044,{"idx":44,"name":"sewer-metal-block-06-slime02","tpage_name":"sewh-vis-tfrag"}],[35127464,{"idx":168,"name":"errolcyber-chestplate","tpage_name":"factorya-pris"}],[75890728,{"idx":40,"name":"onin-rug-rolled-top","tpage_name":"onintent-tfrag"}],[94371855,{"idx":15,"name":"gunBoxFront01","tpage_name":"intpfall-vis-pris"}],[8388611,{"idx":3,"name":"security-env-uscroll","tpage_name":"ctywide-vis-water"}],[104792139,{"idx":75,"name":"wstlander-04-gun","tpage_name":"desresc-pris"}],[8323180,{"idx":108,"name":"fac-lo-grey-panel-01","tpage_name":"ctywide-vis-tfrag"}],[327712,{"idx":32,"name":"mushroom-src","tpage_name":"level-default-water"}],[35389461,{"idx":21,"name":"cguard1-jacketstraps","tpage_name":"introcst-pris"}],[851971,{"idx":3,"name":"vil-beachrock","tpage_name":"halfpipe-tfrag"}],[55115821,{"idx":45,"name":"wascity-cement-road","tpage_name":"wascityb-vis-tfrag"}],[41418841,{"idx":89,"name":"wascity-chimney-hires","tpage_name":"wascitya-vis-tfrag"}],[8912911,{"idx":15,"name":"city-slumbase-wall-3","tpage_name":"ctysluma-vis-tfrag"}],[73728045,{"idx":45,"name":"sewer-metal-block-02-small","tpage_name":"sewh-vis-tfrag"}],[35127465,{"idx":169,"name":"errolcyber-dirtymetal","tpage_name":"factorya-pris"}],[75890729,{"idx":41,"name":"onin-sack","tpage_name":"onintent-tfrag"}],[94371856,{"idx":16,"name":"gunbox01","tpage_name":"intpfall-vis-pris"}],[8388612,{"idx":4,"name":"hidelight-lightfade","tpage_name":"ctywide-vis-water"}],[104792140,{"idx":76,"name":"wstlander-04-headband","tpage_name":"desresc-pris"}],[8323181,{"idx":109,"name":"fac-lo-hangar-door-01","tpage_name":"ctywide-vis-tfrag"}],[458862,{"idx":110,"name":"jakc-shoebottom","tpage_name":"level-default-pris"}],[10879054,{"idx":78,"name":"common-gun-panel-03","tpage_name":"ctyslumb-vis-tfrag"}],[20840494,{"idx":46,"name":"jakchires-shoemetal","tpage_name":"stadiumb-vis-pris"}],[60686390,{"idx":54,"name":"minc-door-metal-03","tpage_name":"mineb-vis-tfrag"}],[74383370,{"idx":10,"name":"sewer-scaffold-03","tpage_name":"sewj-vis-tfrag"}],[458863,{"idx":111,"name":"jakc-shoeplate","tpage_name":"level-default-pris"}],[10879055,{"idx":79,"name":"ctyslumc-light","tpage_name":"ctyslumb-vis-tfrag"}],[20840495,{"idx":47,"name":"jakchires-shoeteop","tpage_name":"stadiumb-vis-pris"}],[60686391,{"idx":55,"name":"minc-door-metal-01","tpage_name":"mineb-vis-tfrag"}],[56950851,{"idx":67,"name":"waspala-ceiling-frame","tpage_name":"waspala-tfrag"}],[74383371,{"idx":11,"name":"sewer-pipe-rim-07-hitweak","tpage_name":"sewj-vis-tfrag"}],[458864,{"idx":112,"name":"jakc-shoetop","tpage_name":"level-default-pris"}],[10879056,{"idx":80,"name":"ctyslumc-billc","tpage_name":"ctyslumb-vis-tfrag"}],[20840496,{"idx":48,"name":"jakchires-teeth","tpage_name":"stadiumb-vis-pris"}],[60686392,{"idx":56,"name":"minc-green-paint-02","tpage_name":"mineb-vis-tfrag"}],[56950852,{"idx":68,"name":"waspala-fire-coal","tpage_name":"waspala-tfrag"}],[74383372,{"idx":12,"name":"common-black","tpage_name":"sewj-vis-tfrag"}],[458865,{"idx":113,"name":"jakc-shoulderarmor-01","tpage_name":"level-default-pris"}],[458866,{"idx":114,"name":"jakc-skirt","tpage_name":"level-default-pris"}],[458867,{"idx":115,"name":"jakc-waistband","tpage_name":"level-default-pris"}],[458868,{"idx":116,"name":"jakc-waistband2","tpage_name":"level-default-pris"}],[50659373,{"idx":45,"name":"fora-statue-stone-sides","tpage_name":"foresta-vis-tfrag"}],[41615376,{"idx":16,"name":"was-tizard-body","tpage_name":"wascitya-vis-pris"}],[35389476,{"idx":36,"name":"daxterbolt","tpage_name":"introcst-pris"}],[458869,{"idx":117,"name":"jakc-wraps","tpage_name":"level-default-pris"}],[41615377,{"idx":17,"name":"was-tizard-face","tpage_name":"wascitya-vis-pris"}],[35389477,{"idx":37,"name":"daxterear","tpage_name":"introcst-pris"}],[458870,{"idx":118,"name":"jakc-wristband-a2","tpage_name":"level-default-pris"}],[81723449,{"idx":57,"name":"klever-clips","tpage_name":"ljndklev-pris"}],[74252369,{"idx":81,"name":"kg-grunt-cable-01","tpage_name":"sewg-vis-pris"}],[50659375,{"idx":47,"name":"fora-cliff-face-far","tpage_name":"foresta-vis-tfrag"}],[458871,{"idx":119,"name":"jakc-wristbands-a","tpage_name":"level-default-pris"}],[458873,{"idx":121,"name":"jakc-arm-dark","tpage_name":"level-default-pris"}],[81723452,{"idx":60,"name":"klever-armor-02","tpage_name":"ljndklev-pris"}],[74252372,{"idx":84,"name":"squid-drabgun","tpage_name":"sewg-vis-pris"}],[49414198,{"idx":54,"name":"environment-oldmetal","tpage_name":"sewc-vis-pris"}],[50659378,{"idx":50,"name":"fora-bridge-green","tpage_name":"foresta-vis-tfrag"}],[458874,{"idx":122,"name":"jakc-arm-norm","tpage_name":"level-default-pris"}],[79364102,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"wasseem-pris"}],[56950862,{"idx":78,"name":"waspala-metal-plate04","tpage_name":"waspala-tfrag"}],[74383382,{"idx":22,"name":"sewer-plate-05","tpage_name":"sewj-vis-tfrag"}],[50659379,{"idx":51,"name":"fora-green-eco-vent-hole","tpage_name":"foresta-vis-tfrag"}],[458875,{"idx":123,"name":"jakc-eyebrow-dark","tpage_name":"level-default-pris"}],[786432,{"idx":0,"name":"font.12hi","tpage_name":"gamefont"}],[73531393,{"idx":1,"name":"sewer-waterfall-02-i","tpage_name":"sewi-vis-water"}],[48627793,{"idx":81,"name":"sewer-brick-block-11","tpage_name":"sewb-vis-tfrag"}],[35389483,{"idx":43,"name":"daxterhelmetplain","tpage_name":"introcst-pris"}],[458876,{"idx":124,"name":"jakc-eyebrow-norm","tpage_name":"level-default-pris"}],[79364104,{"idx":8,"name":"daxterear","tpage_name":"wasseem-pris"}],[74383384,{"idx":24,"name":"sewer-lip-01-hitweak","tpage_name":"sewj-vis-tfrag"}],[786433,{"idx":1,"name":"font.12lo","tpage_name":"gamefont"}],[48627794,{"idx":82,"name":"sewer-brick-block-10","tpage_name":"sewb-vis-tfrag"}],[49086464,{"idx":0,"name":"sewer-moss-01","tpage_name":"sewe-vis-shrub"}],[35389484,{"idx":44,"name":"daxterlense","tpage_name":"introcst-pris"}],[53673984,{"idx":0,"name":"fora-bark","tpage_name":"forestb-vis-tfrag"}],[458877,{"idx":125,"name":"jakc-face-dark","tpage_name":"level-default-pris"}],[79364105,{"idx":9,"name":"daxterfinger","tpage_name":"wasseem-pris"}],[74383385,{"idx":25,"name":"sewer-metal-floor-02","tpage_name":"sewj-vis-tfrag"}],[458878,{"idx":126,"name":"jakc-face-norm","tpage_name":"level-default-pris"}],[79364106,{"idx":10,"name":"daxterfoot","tpage_name":"wasseem-pris"}],[74383386,{"idx":26,"name":"sewer-flat-pipe-01","tpage_name":"sewj-vis-tfrag"}],[53673986,{"idx":2,"name":"fora-grass","tpage_name":"forestb-vis-tfrag"}],[458879,{"idx":127,"name":"jakc-finger-dark","tpage_name":"level-default-pris"}],[79364107,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"wasseem-pris"}],[74383387,{"idx":27,"name":"sewer-metal-block-06-hitweak","tpage_name":"sewj-vis-tfrag"}],[786436,{"idx":4,"name":"font.24lo","tpage_name":"gamefont"}],[49086467,{"idx":3,"name":"sewer-pipe-small-01","tpage_name":"sewe-vis-shrub"}],[35389487,{"idx":47,"name":"daxtertuft","tpage_name":"introcst-pris"}],[53673987,{"idx":3,"name":"fora-stream-rocks","tpage_name":"forestb-vis-tfrag"}],[458880,{"idx":128,"name":"jakc-finger-norm","tpage_name":"level-default-pris"}],[786437,{"idx":5,"name":"font.24lo2","tpage_name":"gamefont"}],[49086468,{"idx":4,"name":"sew-movingstep-grate","tpage_name":"sewe-vis-shrub"}],[35389488,{"idx":48,"name":"environment-oldmetal","tpage_name":"introcst-pris"}],[458881,{"idx":129,"name":"jakc-hair-dark","tpage_name":"level-default-pris"}],[79364109,{"idx":13,"name":"daxterheadwidenew","tpage_name":"wasseem-pris"}],[74383389,{"idx":29,"name":"sewer-pipe-rim-10","tpage_name":"sewj-vis-tfrag"}],[42467328,{"idx":0,"name":"wascity-stain-wall-01","tpage_name":"wasdoors-vis-shrub"}],[458882,{"idx":130,"name":"jakc-hair-norm","tpage_name":"level-default-pris"}],[79364110,{"idx":14,"name":"daxterhelmetplain","tpage_name":"wasseem-pris"}],[74383390,{"idx":30,"name":"sewer-pipe-01","tpage_name":"sewj-vis-tfrag"}],[49086470,{"idx":6,"name":"sewer-metal-block-04","tpage_name":"sewe-vis-shrub"}],[35389490,{"idx":50,"name":"jak-belt","tpage_name":"introcst-pris"}],[53673990,{"idx":6,"name":"fora-foliage","tpage_name":"forestb-vis-tfrag"}],[42467329,{"idx":1,"name":"wascity-stain-window-01","tpage_name":"wasdoors-vis-shrub"}],[458883,{"idx":131,"name":"common-gray-dark","tpage_name":"level-default-pris"}],[79364111,{"idx":15,"name":"daxterlense","tpage_name":"wasseem-pris"}],[56950871,{"idx":87,"name":"waspala-palmtree-trunk-01","tpage_name":"waspala-tfrag"}],[74383391,{"idx":31,"name":"sewer-pipe-02-edge-01","tpage_name":"sewj-vis-tfrag"}],[115081247,{"idx":31,"name":"terraformer-transbodytop-01","tpage_name":"desboss1-pris"}],[71630878,{"idx":30,"name":"king-vestback","tpage_name":"ldampksm-pris2"}],[118489102,{"idx":14,"name":"sig-gun-03","tpage_name":"deshunt-pris2"}],[104792122,{"idx":58,"name":"wstlander-01-shoulderarmor","tpage_name":"desresc-pris"}],[8323163,{"idx":91,"name":"cityslumc-purple-column","tpage_name":"ctywide-vis-tfrag"}],[118489104,{"idx":16,"name":"sig-gun-05","tpage_name":"deshunt-pris2"}],[104792124,{"idx":60,"name":"wstlander-01-wrap","tpage_name":"desresc-pris"}],[8323165,{"idx":93,"name":"ctyslumc-wall-LOW","tpage_name":"ctywide-vis-tfrag"}],[53739547,{"idx":27,"name":"darkguard-scarf","tpage_name":"forestb-vis-pris"}],[55115813,{"idx":37,"name":"wascity-rock-small","tpage_name":"wascityb-vis-tfrag"}],[41418833,{"idx":81,"name":"common_sandstone_ground01","tpage_name":"wascitya-vis-tfrag"}],[8912903,{"idx":7,"name":"city-slum-hangsign-01","tpage_name":"ctysluma-vis-tfrag"}],[73728037,{"idx":37,"name":"sewer-pipe-rim-07","tpage_name":"sewh-vis-tfrag"}],[35127457,{"idx":161,"name":"wire-metal","tpage_name":"factorya-pris"}],[60948561,{"idx":81,"name":"minc-ox-pipe-01","tpage_name":"minec-vis-tfrag"}],[75890721,{"idx":33,"name":"onin-jar","tpage_name":"onintent-tfrag"}],[94371848,{"idx":8,"name":"Ashelin","tpage_name":"intpfall-vis-pris"}],[48758828,{"idx":44,"name":"sewer-bolt-side-01","tpage_name":"sewc-vis-tfrag"}],[53739548,{"idx":28,"name":"darkguard-shouldershield","tpage_name":"forestb-vis-pris"}],[55115814,{"idx":38,"name":"wascity-ocean-shore-rocks","tpage_name":"wascityb-vis-tfrag"}],[48889914,{"idx":58,"name":"sewer-round-01","tpage_name":"sewd-vis-tfrag"}],[41418834,{"idx":82,"name":"common_sandstone_taper01","tpage_name":"wascitya-vis-tfrag"}],[8912904,{"idx":8,"name":"city-slum-bracketmetal-tiny","tpage_name":"ctysluma-vis-tfrag"}],[73728038,{"idx":38,"name":"sewer-stone-arch-01","tpage_name":"sewh-vis-tfrag"}],[35127458,{"idx":162,"name":"errocyber-faceflesh","tpage_name":"factorya-pris"}],[60948562,{"idx":82,"name":"minc-light-blue","tpage_name":"minec-vis-tfrag"}],[75890722,{"idx":34,"name":"onin-jar-bottom","tpage_name":"onintent-tfrag"}],[94371849,{"idx":9,"name":"backThing01","tpage_name":"intpfall-vis-pris"}],[48758829,{"idx":45,"name":"sewer-bolt-side-02","tpage_name":"sewc-vis-tfrag"}],[53739549,{"idx":29,"name":"environment-oldmetal","tpage_name":"forestb-vis-pris"}],[55115815,{"idx":39,"name":"wascity-ground2ocean-shore-rocks","tpage_name":"wascityb-vis-tfrag"}],[48889915,{"idx":59,"name":"sewer-grate-01","tpage_name":"sewd-vis-tfrag"}],[41418835,{"idx":83,"name":"common_sandstone_trim01","tpage_name":"wascitya-vis-tfrag"}],[73728039,{"idx":39,"name":"sewer-brick-roof-01","tpage_name":"sewh-vis-tfrag"}],[35127459,{"idx":163,"name":"errolcyber-bighand-01","tpage_name":"factorya-pris"}],[60948563,{"idx":83,"name":"minc-brick-wall-01","tpage_name":"minec-vis-tfrag"}],[75890723,{"idx":35,"name":"onin-plain-metal","tpage_name":"onintent-tfrag"}],[94371850,{"idx":10,"name":"dash01","tpage_name":"intpfall-vis-pris"}],[74776577,{"idx":1,"name":"airlock-door-cog","tpage_name":"sewm-vis-pris"}],[73531397,{"idx":5,"name":"sewer-water-still-01-i-dest","tpage_name":"sewi-vis-water"}],[118489116,{"idx":28,"name":"sig-skirts-03","tpage_name":"deshunt-pris2"}],[104792136,{"idx":72,"name":"wstlander-03-eye","tpage_name":"desresc-pris"}],[8323177,{"idx":105,"name":"fac-lo-red-panel-03","tpage_name":"ctywide-vis-tfrag"}],[48758830,{"idx":46,"name":"sewer-round-01","tpage_name":"sewc-vis-tfrag"}],[53739550,{"idx":30,"name":"kgtrns-box01","tpage_name":"forestb-vis-pris"}],[48889916,{"idx":60,"name":"sewer-pipe-rim-10","tpage_name":"sewd-vis-tfrag"}],[55115816,{"idx":40,"name":"wascity-palm-trunk","tpage_name":"wascityb-vis-tfrag"}],[41418836,{"idx":84,"name":"common_sandstone_base01","tpage_name":"wascitya-vis-tfrag"}],[73728040,{"idx":40,"name":"sewer-scaffold-03","tpage_name":"sewh-vis-tfrag"}],[35127460,{"idx":164,"name":"errolcyber-bigshoulder","tpage_name":"factorya-pris"}],[60948564,{"idx":84,"name":"lt-eco-vent-blue-01","tpage_name":"minec-vis-tfrag"}],[75890724,{"idx":36,"name":"onin-rocks","tpage_name":"onintent-tfrag"}],[94371851,{"idx":11,"name":"flatgerydark01","tpage_name":"intpfall-vis-pris"}],[48758831,{"idx":47,"name":"sewer-round-03","tpage_name":"sewc-vis-tfrag"}],[53739551,{"idx":31,"name":"kgtrns-hatch01","tpage_name":"forestb-vis-pris"}],[73728041,{"idx":41,"name":"sewer-pipe-rim-03","tpage_name":"sewh-vis-tfrag"}],[35127461,{"idx":165,"name":"errolcyber-bluedome","tpage_name":"factorya-pris"}],[60948565,{"idx":85,"name":"lt-eco-vent-side-01","tpage_name":"minec-vis-tfrag"}],[75890725,{"idx":37,"name":"onin-rope","tpage_name":"onintent-tfrag"}],[94371852,{"idx":12,"name":"gauge01","tpage_name":"intpfall-vis-pris"}],[104792141,{"idx":77,"name":"wstlander-04-shirt","tpage_name":"desresc-pris"}],[8323182,{"idx":110,"name":"fac-lo-panel-01","tpage_name":"ctywide-vis-tfrag"}],[55115822,{"idx":46,"name":"wascity-torch-tank","tpage_name":"wascityb-vis-tfrag"}],[48889922,{"idx":66,"name":"sewer-metal-trim-01","tpage_name":"sewd-vis-tfrag"}],[41418842,{"idx":90,"name":"lt-eco-vent-blue-01","tpage_name":"wascitya-vis-tfrag"}],[43647000,{"idx":24,"name":"straw-ground","tpage_name":"waswide-sprite"}],[48627720,{"idx":8,"name":"sewer-block-01","tpage_name":"sewb-vis-tfrag"}],[42401820,{"idx":28,"name":"wascity-ditch-wall-top-to-ground-edging","tpage_name":"wasdoors-vis-tfrag"}],[112525318,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"desrescc-pris"}],[73728046,{"idx":46,"name":"sewer-lip-01-hitweak","tpage_name":"sewh-vis-tfrag"}],[35127466,{"idx":170,"name":"errolcyber-earcup","tpage_name":"factorya-pris"}],[75890730,{"idx":42,"name":"onin-shelf","tpage_name":"onintent-tfrag"}],[94371857,{"idx":17,"name":"gunbox02","tpage_name":"intpfall-vis-pris"}],[55115823,{"idx":47,"name":"wascity-outerwall-metal-b","tpage_name":"wascityb-vis-tfrag"}],[41418843,{"idx":91,"name":"lt-eco-vent-side-01","tpage_name":"wascitya-vis-tfrag"}],[35389652,{"idx":212,"name":"klever-shoebottom","tpage_name":"introcst-pris"}],[76480592,{"idx":80,"name":"jakc-wraps","tpage_name":"freehq-pris"}],[8912913,{"idx":17,"name":"city-slumwall-07","tpage_name":"ctysluma-vis-tfrag"}],[43647001,{"idx":25,"name":"cotton-wrap-debris","tpage_name":"waswide-sprite"}],[48627721,{"idx":9,"name":"sewer-pipe-rim-10","tpage_name":"sewb-vis-tfrag"}],[42401821,{"idx":29,"name":"wascity-stone-plain-wall-3","tpage_name":"wasdoors-vis-tfrag"}],[112525319,{"idx":7,"name":"daxterbolt","tpage_name":"desrescc-pris"}],[73728047,{"idx":47,"name":"sewer-metal-block-04","tpage_name":"sewh-vis-tfrag"}],[35127467,{"idx":171,"name":"errolcyber-fingers","tpage_name":"factorya-pris"}],[75890731,{"idx":43,"name":"onin-shelf-inside","tpage_name":"onintent-tfrag"}],[94371858,{"idx":18,"name":"hood01","tpage_name":"intpfall-vis-pris"}],[74842116,{"idx":4,"name":"sewer-waterfall-02-l-dest","tpage_name":"sewl-vis-water"}],[71106576,{"idx":16,"name":"wstd-tentacle-plate03","tpage_name":"wasstadb-tfrag"}],[35389653,{"idx":213,"name":"klever-skirtdark","tpage_name":"introcst-pris"}],[76480593,{"idx":81,"name":"jakc-wristband-a2","tpage_name":"freehq-pris"}],[57147409,{"idx":17,"name":"king-iris","tpage_name":"waspala-pris2"}],[62128129,{"idx":1,"name":"brace01","tpage_name":"ctycara-pris"}],[60882949,{"idx":5,"name":"manta-metal-02","tpage_name":"mineb-vis-pris"}],[43647002,{"idx":26,"name":"cherry","tpage_name":"waswide-sprite"}],[42401822,{"idx":30,"name":"wascity-stone-bricks-2-plain","tpage_name":"wasdoors-vis-tfrag"}],[112525320,{"idx":8,"name":"daxterear","tpage_name":"desrescc-pris"}],[49676288,{"idx":0,"name":"sewer-pipe-small-01","tpage_name":"sewf-vis-shrub"}],[111869954,{"idx":2,"name":"stadiumb-hud-lap-01","tpage_name":"wasleapr-minimap"}],[96927794,{"idx":50,"name":"jinx-pants","tpage_name":"ltornjnx-pris2"}],[99418154,{"idx":42,"name":"jakchires-jacket","tpage_name":"volcanox-pris"}],[67829797,{"idx":37,"name":"vinroom-tv-radar","tpage_name":"freehq-sprite"}],[77791237,{"idx":5,"name":"wstd-trapdoor-bolt","tpage_name":"wasstadb-pris"}],[94371859,{"idx":19,"name":"jetTop01","tpage_name":"intpfall-vis-pris"}],[57147410,{"idx":18,"name":"king-leg","tpage_name":"waspala-pris2"}],[62128130,{"idx":2,"name":"carafront01","tpage_name":"ctycara-pris"}],[60882950,{"idx":6,"name":"manta-skin-01","tpage_name":"mineb-vis-pris"}],[42401823,{"idx":31,"name":"wascitya-airlock-metal-bits","tpage_name":"wasdoors-vis-tfrag"}],[112525321,{"idx":9,"name":"daxterfinger","tpage_name":"desrescc-pris"}],[49676289,{"idx":1,"name":"sewer-nut","tpage_name":"sewf-vis-shrub"}],[67829798,{"idx":38,"name":"vinroom-tv-radar-dots","tpage_name":"freehq-sprite"}],[77791238,{"idx":6,"name":"wstd-trapdoor-grate","tpage_name":"wasstadb-pris"}],[94371860,{"idx":20,"name":"jets01","tpage_name":"intpfall-vis-pris"}],[73596942,{"idx":14,"name":"sewer-brick-block-06","tpage_name":"sewi-vis-tfrag"}],[71106582,{"idx":22,"name":"wstd-throne-plat03","tpage_name":"wasstadb-tfrag"}],[35127474,{"idx":178,"name":"errolcyber-head-02","tpage_name":"factorya-pris"}],[89587718,{"idx":6,"name":"pecker-teeth","tpage_name":"lwstdpck-pris"}],[75890738,{"idx":50,"name":"onin-table-rim","tpage_name":"onintent-tfrag"}],[94371865,{"idx":25,"name":"palace-break-base02","tpage_name":"intpfall-vis-pris"}],[73596943,{"idx":15,"name":"sewer-metal-block-06-hitweak","tpage_name":"sewi-vis-tfrag"}],[71106583,{"idx":23,"name":"wstd-flag","tpage_name":"wasstadb-tfrag"}],[62128136,{"idx":8,"name":"pipe01","tpage_name":"ctycara-pris"}],[57147416,{"idx":24,"name":"king-precursermetal-trimbolt","tpage_name":"waspala-pris2"}],[60882956,{"idx":12,"name":"minc-rust-bars-01","tpage_name":"mineb-vis-pris"}],[48627729,{"idx":17,"name":"sewer-concrete-edge-01","tpage_name":"sewb-vis-tfrag"}],[42401829,{"idx":37,"name":"wascity-roof-1","tpage_name":"wasdoors-vis-tfrag"}],[92209165,{"idx":13,"name":"klever-bolt","tpage_name":"ldamklev-pris"}],[95944705,{"idx":1,"name":"bam-hairhilite","tpage_name":"freehq-pris2"}],[112525327,{"idx":15,"name":"daxterlense","tpage_name":"desrescc-pris"}],[89587719,{"idx":7,"name":"pecker-wingbottom","tpage_name":"lwstdpck-pris"}],[75890739,{"idx":51,"name":"onin-tank-bolt","tpage_name":"onintent-tfrag"}],[94371866,{"idx":26,"name":"palace-break-base03","tpage_name":"intpfall-vis-pris"}],[73596944,{"idx":16,"name":"sewer-concrete-block-02","tpage_name":"sewi-vis-tfrag"}],[71106584,{"idx":24,"name":"wstd-tentacle-plate02","tpage_name":"wasstadb-tfrag"}],[89587720,{"idx":8,"name":"pecker-wingtop","tpage_name":"lwstdpck-pris"}],[75890740,{"idx":52,"name":"onin-tank-center-piece","tpage_name":"onintent-tfrag"}],[94371867,{"idx":27,"name":"palace-break-bigwall01","tpage_name":"intpfall-vis-pris"}],[38731909,{"idx":133,"name":"flying-bird-06","tpage_name":"wasstada-sprite"}],[73596949,{"idx":21,"name":"sewer-metal-03","tpage_name":"sewi-vis-tfrag"}],[58654789,{"idx":69,"name":"dust-sparkle","tpage_name":"hiphog-sprite"}],[71106589,{"idx":29,"name":"wstd-ladder","tpage_name":"wasstadb-tfrag"}],[75890736,{"idx":48,"name":"onin-skull-top","tpage_name":"onintent-tfrag"}],[89587716,{"idx":4,"name":"pecker-plume","tpage_name":"lwstdpck-pris"}],[61669393,{"idx":17,"name":"mtn-environment-front-backup","tpage_name":"foresta-vis-shrub"}],[28049410,{"idx":2,"name":"palroof-scalestone-01","tpage_name":"intpalrf-tfrag"}],[94371898,{"idx":58,"name":"palace-break-roof02","tpage_name":"intpfall-vis-pris"}],[57278508,{"idx":44,"name":"metalflut-rings","tpage_name":"waswide-vis-pris"}],[52297788,{"idx":60,"name":"freehq-pipe01","tpage_name":"freehq-tfrag"}],[67239948,{"idx":12,"name":"vin-floor-03c","tpage_name":"vinroom-vis-tfrag"}],[48562248,{"idx":72,"name":"jakchires-glovetop","tpage_name":"sewa-vis-pris"}],[81723492,{"idx":100,"name":"jakchires-glovetop","tpage_name":"ljndklev-pris"}],[75890745,{"idx":57,"name":"onin-temp-01","tpage_name":"onintent-tfrag"}],[95944727,{"idx":23,"name":"torn-pipe","tpage_name":"freehq-pris2"}],[100925447,{"idx":7,"name":"king-clip-02","tpage_name":"ljkdmpk-pris2"}],[61079632,{"idx":80,"name":"pecker-body-01","tpage_name":"minec-vis-pris"}],[127860736,{"idx":0,"name":"palcab-lowres-background-shoreline-02","tpage_name":"lfaccity-alpha"}],[94240876,{"idx":108,"name":"tpal-beam-red01","tpage_name":"intpfall-vis-tfrag"}],[39780363,{"idx":11,"name":"nsta-wall","tpage_name":"nstb-vis-pris"}],[21299236,{"idx":36,"name":"vehicle-snake-drum-03","tpage_name":"wasall-pris"}],[21299292,{"idx":92,"name":"tread-snake","tpage_name":"wasall-pris"}],[95944728,{"idx":24,"name":"torn-scarf","tpage_name":"freehq-pris2"}],[100925448,{"idx":8,"name":"king-ear","tpage_name":"ljkdmpk-pris2"}],[61079633,{"idx":81,"name":"pecker-face","tpage_name":"minec-vis-pris"}],[127860737,{"idx":1,"name":"palcab-lowres-background-crater-rim","tpage_name":"lfaccity-alpha"}],[94240877,{"idx":109,"name":"troof-sndwch-beam-01","tpage_name":"intpfall-vis-tfrag"}],[21299293,{"idx":93,"name":"tread-toad","tpage_name":"wasall-pris"}],[95944729,{"idx":25,"name":"torn-shoe","tpage_name":"freehq-pris2"}],[100925449,{"idx":9,"name":"king-earing","tpage_name":"ljkdmpk-pris2"}],[61079634,{"idx":82,"name":"pecker-plume","tpage_name":"minec-vis-pris"}],[127860738,{"idx":2,"name":"palcab-lowres-background-trees-edge","tpage_name":"lfaccity-alpha"}],[94240878,{"idx":110,"name":"palroof-metal","tpage_name":"intpfall-vis-tfrag"}],[21299294,{"idx":94,"name":"tread-turtle","tpage_name":"wasall-pris"}],[61079635,{"idx":83,"name":"pecker-tail","tpage_name":"minec-vis-pris"}],[127860739,{"idx":3,"name":"palcab-lowres-background-trees2","tpage_name":"lfaccity-alpha"}],[94240879,{"idx":111,"name":"tpal-beam-redstripe01","tpage_name":"intpfall-vis-tfrag"}],[21299295,{"idx":95,"name":"vehicle-tread-02","tpage_name":"wasall-pris"}],[95944731,{"idx":27,"name":"torn-teeth-01","tpage_name":"freehq-pris2"}],[100925451,{"idx":11,"name":"king-finger","tpage_name":"ljkdmpk-pris2"}],[95944732,{"idx":28,"name":"torn-vest","tpage_name":"freehq-pris2"}],[100925452,{"idx":12,"name":"king-greenmetal","tpage_name":"ljkdmpk-pris2"}],[67829761,{"idx":1,"name":"tinydot","tpage_name":"freehq-sprite"}],[16842760,{"idx":8,"name":"city-farm-dirt-small-01","tpage_name":"ctyfarmb-vis-shrub"}],[120455178,{"idx":10,"name":"forx-citywall","tpage_name":"forestx-vis-tfrag"}],[79364238,{"idx":142,"name":"monk-hair-f","tpage_name":"wasseem-pris"}],[28049421,{"idx":13,"name":"tpal-drain01","tpage_name":"intpalrf-tfrag"}],[94371909,{"idx":69,"name":"palace-break-spike01","tpage_name":"intpfall-vis-pris"}],[21299302,{"idx":102,"name":"vehicle-fox-drum-02","tpage_name":"wasall-pris"}],[35651652,{"idx":68,"name":"king-horn","tpage_name":"introcst-pris2"}],[8192026,{"idx":26,"name":"newbike-03","tpage_name":"ctywide-vis-pris"}],[8912941,{"idx":45,"name":"fort-exhaust","tpage_name":"ctysluma-vis-tfrag"}],[67829764,{"idx":4,"name":"screen-01","tpage_name":"freehq-sprite"}],[28049424,{"idx":16,"name":"troof-sndwch-beam-01","tpage_name":"intpalrf-tfrag"}],[94371912,{"idx":72,"name":"palace-break-wall02","tpage_name":"intpfall-vis-pris"}],[74252370,{"idx":82,"name":"kg-grunt-rim-03","tpage_name":"sewg-vis-pris"}],[81723450,{"idx":58,"name":"klever-handwrap","tpage_name":"ljndklev-pris"}],[94371886,{"idx":46,"name":"palace-break-infloor","tpage_name":"intpfall-vis-pris"}],[8912942,{"idx":46,"name":"city-fort-column","tpage_name":"ctysluma-vis-tfrag"}],[67829765,{"idx":5,"name":"screen-02","tpage_name":"freehq-sprite"}],[28049425,{"idx":17,"name":"palroof-metal","tpage_name":"intpalrf-tfrag"}],[94371913,{"idx":73,"name":"palace-break-wall03","tpage_name":"intpfall-vis-pris"}],[117637208,{"idx":88,"name":"jakc-wristband-a2","tpage_name":"destrack-pris"}],[16908326,{"idx":38,"name":"t-citywide-met-strp01","tpage_name":"ctyfarmb-vis-tfrag"}],[28114946,{"idx":2,"name":"tpal-met-pip-01","tpage_name":"intpalrf-shrub"}],[8912952,{"idx":56,"name":"city-slum-crater-blend-02","tpage_name":"ctysluma-vis-tfrag"}],[14548992,{"idx":0,"name":"ctygenb-ticker-backing","tpage_name":"ctygenb-sprite"}],[852012,{"idx":44,"name":"metalcrate-01","tpage_name":"halfpipe-tfrag"}],[71565315,{"idx":3,"name":"pecker-face","tpage_name":"ldampksm-pris"}],[67829775,{"idx":15,"name":"screen-12","tpage_name":"freehq-sprite"}],[28049435,{"idx":27,"name":"intr-panl_piller-no-alpha01","tpage_name":"intpalrf-tfrag"}],[94371923,{"idx":83,"name":"palace-break-winwall02","tpage_name":"intpfall-vis-pris"}],[62717953,{"idx":1,"name":"cguardgame-backplate","tpage_name":"ctypesa-pris"}],[524291,{"idx":3,"name":"sky-glow-soft","tpage_name":"sky-textures"}],[11730952,{"idx":8,"name":"city-ind-overlay-bullethole-a","tpage_name":"ctyinda-vis-shrub"}],[720896,{"idx":0,"name":"environment-oldmetal","tpage_name":"level-default-shrub"}],[81723501,{"idx":109,"name":"jakchires-shoemetal","tpage_name":"ljndklev-pris"}],[49348616,{"idx":8,"name":"sewer-screw-02","tpage_name":"sewb-vis-pris"}],[35651636,{"idx":52,"name":"samosbird-eye","tpage_name":"introcst-pris2"}],[49348657,{"idx":49,"name":"kg-grunt-rim-01","tpage_name":"sewb-vis-pris"}],[60555277,{"idx":13,"name":"minc-rust-01","tpage_name":"minea-vis-tfrag"}],[35651677,{"idx":93,"name":"veger-coat","tpage_name":"introcst-pris2"}],[720897,{"idx":1,"name":"environment-title","tpage_name":"level-default-shrub"}],[81723502,{"idx":110,"name":"jakchires-shoeteop","tpage_name":"ljndklev-pris"}],[49348617,{"idx":9,"name":"sew-laserturret-pole","tpage_name":"sewb-vis-pris"}],[35651637,{"idx":53,"name":"samosbird-plume","tpage_name":"introcst-pris2"}],[49348658,{"idx":50,"name":"kg-grunt-rim-02","tpage_name":"sewb-vis-pris"}],[60555278,{"idx":14,"name":"minc-grill-01","tpage_name":"minea-vis-tfrag"}],[35651678,{"idx":94,"name":"veger-coatbelt","tpage_name":"introcst-pris2"}],[14548993,{"idx":1,"name":"ctygenb-ticker-space","tpage_name":"ctygenb-sprite"}],[852013,{"idx":45,"name":"metalcrate-lod02","tpage_name":"halfpipe-tfrag"}],[8323093,{"idx":21,"name":"citywide-stadium-lightbank","tpage_name":"ctywide-vis-tfrag"}],[91291673,{"idx":25,"name":"gun-building-wall-gray-01","tpage_name":"gungame-vis-tfrag"}],[95027213,{"idx":13,"name":"sig-gun-02","tpage_name":"lsigjakc-pris2"}],[720898,{"idx":2,"name":"loadsave-01","tpage_name":"level-default-shrub"}],[81723503,{"idx":111,"name":"jakchires-teeth","tpage_name":"ljndklev-pris"}],[8192012,{"idx":12,"name":"citfat-hairflat","tpage_name":"ctywide-vis-pris"}],[49348618,{"idx":10,"name":"sew-movingstep-grate","tpage_name":"sewb-vis-pris"}],[35651638,{"idx":54,"name":"samosbird-wing","tpage_name":"introcst-pris2"}],[49348659,{"idx":51,"name":"kg-grunt-rim-03","tpage_name":"sewb-vis-pris"}],[60555279,{"idx":15,"name":"minc-blue-paint-rust04","tpage_name":"minea-vis-tfrag"}],[35651679,{"idx":95,"name":"veger-coatclips","tpage_name":"introcst-pris2"}],[720899,{"idx":3,"name":"loadsave-02","tpage_name":"level-default-shrub"}],[8192013,{"idx":13,"name":"citn-allbuckel","tpage_name":"ctywide-vis-pris"}],[49348619,{"idx":11,"name":"sewer-metal-block-04","tpage_name":"sewb-vis-pris"}],[35651639,{"idx":55,"name":"king-arm","tpage_name":"introcst-pris2"}],[49348660,{"idx":52,"name":"roboguard-headshield","tpage_name":"sewb-vis-pris"}],[60555280,{"idx":16,"name":"minc-safe-plate-01","tpage_name":"minea-vis-tfrag"}],[35651680,{"idx":96,"name":"veger-endpaper","tpage_name":"introcst-pris2"}],[8192014,{"idx":14,"name":"citn-allflesh","tpage_name":"ctywide-vis-pris"}],[49348620,{"idx":12,"name":"sewer-pipe-01","tpage_name":"sewb-vis-pris"}],[35651640,{"idx":56,"name":"king-blackskirt2","tpage_name":"introcst-pris2"}],[11796484,{"idx":4,"name":"city-ind-wall-base-top-01","tpage_name":"ctyinda-vis-tfrag"}],[49348661,{"idx":53,"name":"roboguard-shouldershield","tpage_name":"sewb-vis-pris"}],[35651681,{"idx":97,"name":"veger-face","tpage_name":"introcst-pris2"}],[720901,{"idx":5,"name":"loadsave-04","tpage_name":"level-default-shrub"}],[8192015,{"idx":15,"name":"citn-alllcotton","tpage_name":"ctywide-vis-pris"}],[49348621,{"idx":13,"name":"sewer-metal-floor-01","tpage_name":"sewb-vis-pris"}],[35651641,{"idx":57,"name":"king-bolt","tpage_name":"introcst-pris2"}],[589824,{"idx":0,"name":"checkpoint","tpage_name":"level-default-minimap"}],[115081227,{"idx":11,"name":"terraformer-metal-03","tpage_name":"desboss1-pris"}],[49348662,{"idx":54,"name":"squid-bulb-sm","tpage_name":"sewb-vis-pris"}],[35651682,{"idx":98,"name":"veger-fingerbottom","tpage_name":"introcst-pris2"}],[720902,{"idx":6,"name":"loadsave-05","tpage_name":"level-default-shrub"}],[8192016,{"idx":16,"name":"citn-allleather","tpage_name":"ctywide-vis-pris"}],[49348622,{"idx":14,"name":"sewer-plate-02","tpage_name":"sewb-vis-pris"}],[35651642,{"idx":58,"name":"king-chest","tpage_name":"introcst-pris2"}],[589825,{"idx":1,"name":"hud-arrow-dkpwr-01","tpage_name":"level-default-minimap"}],[115081228,{"idx":12,"name":"terraformer-metal-08","tpage_name":"desboss1-pris"}],[49348663,{"idx":55,"name":"widow-dull-inards","tpage_name":"sewb-vis-pris"}],[60555283,{"idx":19,"name":"minb-rock-floor01","tpage_name":"minea-vis-tfrag"}],[35651683,{"idx":99,"name":"veger-fingertop","tpage_name":"introcst-pris2"}],[720903,{"idx":7,"name":"loadsave-audio-options","tpage_name":"level-default-shrub"}],[8192017,{"idx":17,"name":"citn-allleather-edge","tpage_name":"ctywide-vis-pris"}],[35651643,{"idx":59,"name":"king-clip-02","tpage_name":"introcst-pris2"}],[589826,{"idx":2,"name":"hud-arrow-down-01","tpage_name":"level-default-minimap"}],[115081229,{"idx":13,"name":"terraformer-minecore","tpage_name":"desboss1-pris"}],[49348664,{"idx":56,"name":"widow-pod-gun-metal","tpage_name":"sewb-vis-pris"}],[35651684,{"idx":100,"name":"veger-gold","tpage_name":"introcst-pris2"}],[720904,{"idx":8,"name":"loadsave-back","tpage_name":"level-default-shrub"}],[8192018,{"idx":18,"name":"citn-allleather-shoulder","tpage_name":"ctywide-vis-pris"}],[35651644,{"idx":60,"name":"king-ear","tpage_name":"introcst-pris2"}],[55312410,{"idx":26,"name":"city-mark-basket2","tpage_name":"wascityb-vis-pris"}],[62783490,{"idx":2,"name":"grunt-hose","tpage_name":"ctypepb-pris"}],[589828,{"idx":4,"name":"hud-arrow-right-01","tpage_name":"level-default-minimap"}],[115081231,{"idx":15,"name":"terraformer-transstrips-01","tpage_name":"desboss1-pris"}],[49348666,{"idx":58,"name":"brown-hose","tpage_name":"sewb-vis-pris"}],[60555286,{"idx":22,"name":"minb-brok-edge-02","tpage_name":"minea-vis-tfrag"}],[35651686,{"idx":102,"name":"veger-hand","tpage_name":"introcst-pris2"}],[75759625,{"idx":9,"name":"daxterfinger","tpage_name":"onintent-pris"}],[67043365,{"idx":37,"name":"vinroom-tv-radar","tpage_name":"vinroom-sprite"}],[74514445,{"idx":13,"name":"cguard1-lens","tpage_name":"sewj-vis-pris"}],[8192020,{"idx":20,"name":"citn-allleatherwrinkled","tpage_name":"ctywide-vis-pris"}],[35651646,{"idx":62,"name":"king-face-01","tpage_name":"introcst-pris2"}],[589829,{"idx":5,"name":"hud-arrow-top-01","tpage_name":"level-default-minimap"}],[115081232,{"idx":16,"name":"terraformer-footpipes-01","tpage_name":"desboss1-pris"}],[49348667,{"idx":59,"name":"roboguard-die-stamped-metal-blue","tpage_name":"sewb-vis-pris"}],[60555287,{"idx":23,"name":"minb-stone23","tpage_name":"minea-vis-tfrag"}],[35651687,{"idx":103,"name":"veger-legwraps","tpage_name":"introcst-pris2"}],[8192021,{"idx":21,"name":"citn-allleye","tpage_name":"ctywide-vis-pris"}],[35651647,{"idx":63,"name":"king-finger","tpage_name":"introcst-pris2"}],[11796491,{"idx":11,"name":"city-ind-wall-04","tpage_name":"ctyinda-vis-tfrag"}],[115081233,{"idx":17,"name":"terraformer-metal-01","tpage_name":"desboss1-pris"}],[49348668,{"idx":60,"name":"roboguard-die-stamped-metal-red","tpage_name":"sewb-vis-pris"}],[60555288,{"idx":24,"name":"minb-stone22","tpage_name":"minea-vis-tfrag"}],[35651688,{"idx":104,"name":"veger-pages","tpage_name":"introcst-pris2"}],[8192022,{"idx":22,"name":"citn-allshoebottom","tpage_name":"ctywide-vis-pris"}],[35651648,{"idx":64,"name":"king-greenmetal","tpage_name":"introcst-pris2"}],[11796492,{"idx":12,"name":"city-ind-wall-03","tpage_name":"ctyinda-vis-tfrag"}],[115081234,{"idx":18,"name":"terraformer-metal-02","tpage_name":"desboss1-pris"}],[49348669,{"idx":61,"name":"squid-tubes","tpage_name":"sewb-vis-pris"}],[60555289,{"idx":25,"name":"minb-stone26","tpage_name":"minea-vis-tfrag"}],[35651689,{"idx":105,"name":"veger-pants","tpage_name":"introcst-pris2"}],[8192023,{"idx":23,"name":"citn-allsuede","tpage_name":"ctywide-vis-pris"}],[35651649,{"idx":65,"name":"king-greenmetalplain","tpage_name":"introcst-pris2"}],[11796493,{"idx":13,"name":"city-ind-wall-thin-04","tpage_name":"ctyinda-vis-tfrag"}],[115081235,{"idx":19,"name":"terraformer-metal-04","tpage_name":"desboss1-pris"}],[49348670,{"idx":62,"name":"wire-metal","tpage_name":"sewb-vis-pris"}],[60555290,{"idx":26,"name":"minb-stone15","tpage_name":"minea-vis-tfrag"}],[35651690,{"idx":106,"name":"veger-parchment","tpage_name":"introcst-pris2"}],[75759629,{"idx":13,"name":"daxterheadwidenew","tpage_name":"onintent-pris"}],[67043369,{"idx":41,"name":"vinroom-tv-text-m","tpage_name":"vinroom-sprite"}],[74514449,{"idx":17,"name":"cguardgame-shoebottom","tpage_name":"sewj-vis-pris"}],[8192024,{"idx":24,"name":"newbike-01","tpage_name":"ctywide-vis-pris"}],[35651650,{"idx":66,"name":"king-hair","tpage_name":"introcst-pris2"}],[67829799,{"idx":39,"name":"vinroom-tv-text-a","tpage_name":"freehq-sprite"}],[8060954,{"idx":26,"name":"city-mark-hangsign-01","tpage_name":"ctywide-sprite"}],[11796494,{"idx":14,"name":"city-inda-wallbase","tpage_name":"ctyinda-vis-tfrag"}],[115081236,{"idx":20,"name":"terraformer-metal-05","tpage_name":"desboss1-pris"}],[49348671,{"idx":63,"name":"squid-drabgun","tpage_name":"sewb-vis-pris"}],[60555291,{"idx":27,"name":"minb-stone11","tpage_name":"minea-vis-tfrag"}],[35651691,{"idx":107,"name":"veger-scarf","tpage_name":"introcst-pris2"}],[79495170,{"idx":2,"name":"des-bark-crooked-01","tpage_name":"wasintro-vis-tfrag"}],[75759630,{"idx":14,"name":"daxterhelmetplain","tpage_name":"onintent-pris"}],[67043370,{"idx":42,"name":"vinroom-tv-text-n","tpage_name":"vinroom-sprite"}],[74514450,{"idx":18,"name":"environment-oldmetal","tpage_name":"sewj-vis-pris"}],[8192025,{"idx":25,"name":"newbike-02","tpage_name":"ctywide-vis-pris"}],[49348631,{"idx":23,"name":"cguardgame-backplate","tpage_name":"sewb-vis-pris"}],[35651651,{"idx":67,"name":"king-hand","tpage_name":"introcst-pris2"}],[67829801,{"idx":41,"name":"vinroom-tv-text-m","tpage_name":"freehq-sprite"}],[115081238,{"idx":22,"name":"terraformer-metal-10","tpage_name":"desboss1-pris"}],[60555293,{"idx":29,"name":"minb-stone-edge","tpage_name":"minea-vis-tfrag"}],[35651693,{"idx":109,"name":"veger-shoulderplate","tpage_name":"introcst-pris2"}],[75759632,{"idx":16,"name":"daxternose","tpage_name":"onintent-pris"}],[57081932,{"idx":76,"name":"waspala-chain-anchor","tpage_name":"waspala-pris"}],[67043372,{"idx":44,"name":"vinroom-tv-text-r","tpage_name":"vinroom-sprite"}],[74514452,{"idx":20,"name":"kg-grunt-rim-03","tpage_name":"sewj-vis-pris"}],[35651653,{"idx":69,"name":"king-iris","tpage_name":"introcst-pris2"}],[67829803,{"idx":43,"name":"vinroom-tv-text-o","tpage_name":"freehq-sprite"}],[115081240,{"idx":24,"name":"terraformer-organic-02","tpage_name":"desboss1-pris"}],[60555295,{"idx":31,"name":"minb-stone21","tpage_name":"minea-vis-tfrag"}],[35651695,{"idx":111,"name":"veger-sleeve","tpage_name":"introcst-pris2"}],[75759634,{"idx":18,"name":"daxtertuft","tpage_name":"onintent-pris"}],[74514454,{"idx":22,"name":"roboguard-die-stamped-metal-red","tpage_name":"sewj-vis-pris"}],[35651655,{"idx":71,"name":"king-lgblackstrap","tpage_name":"introcst-pris2"}],[115081241,{"idx":25,"name":"terraformer-metal-07","tpage_name":"desboss1-pris"}],[35651696,{"idx":112,"name":"veger-sleevelower","tpage_name":"introcst-pris2"}],[75759635,{"idx":19,"name":"environment-oldmetal","tpage_name":"onintent-pris"}],[74514455,{"idx":23,"name":"roboguard-headshield","tpage_name":"sewj-vis-pris"}],[35651656,{"idx":72,"name":"king-precursermetal-plain","tpage_name":"introcst-pris2"}],[8323188,{"idx":116,"name":"fac-lo-bldng-panel-01","tpage_name":"ctywide-vis-tfrag"}],[8323189,{"idx":117,"name":"fac-lo-grey-panel-03","tpage_name":"ctywide-vis-tfrag"}],[70254592,{"idx":0,"name":"hud-nest-cocoon-01","tpage_name":"nsta-minimap"}],[14811211,{"idx":75,"name":"tcab-star-01","tpage_name":"ctygenb-vis-tfrag"}],[589850,{"idx":26,"name":"hud-gun-yellow-shell-01","tpage_name":"level-default-minimap"}],[8060930,{"idx":2,"name":"burning-bush-off","tpage_name":"ctywide-sprite"}],[60948514,{"idx":34,"name":"minb-stone26","tpage_name":"minec-vis-tfrag"}],[16121870,{"idx":14,"name":"city-farm-metal-bracket-01","tpage_name":"ctyfarma-vis-tfrag"}],[26542167,{"idx":87,"name":"wstd-throne-arch02","tpage_name":"wasstada-tfrag"}],[16121880,{"idx":24,"name":"city-farm-sprinkle-metal","tpage_name":"ctyfarma-vis-tfrag"}],[26542177,{"idx":97,"name":"wstd-interior-rock01","tpage_name":"wasstada-tfrag"}],[81985558,{"idx":22,"name":"marauder-leather-brnstrap","tpage_name":"wasstadc-pris"}],[16121881,{"idx":25,"name":"city-farm-sprinkle-pipe","tpage_name":"ctyfarma-vis-tfrag"}],[26542178,{"idx":98,"name":"wstd-flag","tpage_name":"wasstada-tfrag"}],[60817415,{"idx":7,"name":"mine-track-metal1","tpage_name":"mineb-vis-shrub"}],[49610754,{"idx":2,"name":"sewer-nut","tpage_name":"sewf-vis-tfrag"}],[8716361,{"idx":73,"name":"sign-crimson","tpage_name":"ctysluma-sprite"}],[16121882,{"idx":26,"name":"farm-grass-ground-02","tpage_name":"ctyfarma-vis-tfrag"}],[26542179,{"idx":99,"name":"wstd-throne-floor01","tpage_name":"wasstada-tfrag"}],[11796483,{"idx":3,"name":"city-ind-wall-base-02","tpage_name":"ctyinda-vis-tfrag"}],[8060943,{"idx":15,"name":"wave-foam","tpage_name":"ctywide-sprite"}],[16121883,{"idx":27,"name":"city-farm-cart-woodslat","tpage_name":"ctyfarma-vis-tfrag"}],[26542180,{"idx":100,"name":"wstd-stands-ceiling","tpage_name":"wasstada-tfrag"}],[14811179,{"idx":43,"name":"city-trim","tpage_name":"ctygenb-vis-tfrag"}],[12320819,{"idx":51,"name":"city-ind-wall-base-05","tpage_name":"ctyindb-vis-tfrag"}],[115081244,{"idx":28,"name":"terraformer-bodytopplain","tpage_name":"desboss1-pris"}],[60555299,{"idx":35,"name":"minc-door-metal-01","tpage_name":"minea-vis-tfrag"}],[35651699,{"idx":115,"name":"veger-vest","tpage_name":"introcst-pris2"}],[35651659,{"idx":75,"name":"king-shoebottom","tpage_name":"introcst-pris2"}],[115081245,{"idx":29,"name":"terraformer-bodytopstrans","tpage_name":"desboss1-pris"}],[60555300,{"idx":36,"name":"minc-train-pipe-cap-02","tpage_name":"minea-vis-tfrag"}],[35651700,{"idx":116,"name":"veger-walkingstick-01","tpage_name":"introcst-pris2"}],[49348640,{"idx":32,"name":"cguardgame-metaledark-02","tpage_name":"sewb-vis-pris"}],[35651660,{"idx":76,"name":"king-skirt","tpage_name":"introcst-pris2"}],[11796531,{"idx":51,"name":"city-ind-metal-04-hitweak","tpage_name":"ctyinda-vis-tfrag"}],[589911,{"idx":87,"name":"hud-newhud-01","tpage_name":"level-default-minimap"}],[67829809,{"idx":49,"name":"circle","tpage_name":"freehq-sprite"}],[115081246,{"idx":30,"name":"terraformer-organic-03","tpage_name":"desboss1-pris"}],[60555301,{"idx":37,"name":"minc-blue-paint-rust05","tpage_name":"minea-vis-tfrag"}],[35651701,{"idx":117,"name":"veger-walkingstick-02","tpage_name":"introcst-pris2"}],[65538,{"idx":2,"name":"autoeye-pupil","tpage_name":"common"}],[53805064,{"idx":8,"name":"forb-waterfall-01","tpage_name":"forestb-vis-water"}],[262324,{"idx":180,"name":"leaf1","tpage_name":"level-default-sprite"}],[65539,{"idx":3,"name":"common-white","tpage_name":"common"}],[53805065,{"idx":9,"name":"forb-waterfall-01-dest","tpage_name":"forestb-vis-water"}],[262325,{"idx":181,"name":"leaf2","tpage_name":"level-default-sprite"}],[65540,{"idx":4,"name":"lens-highlight","tpage_name":"common"}],[71630870,{"idx":22,"name":"king-precursermetal-trim","tpage_name":"ldampksm-pris2"}],[49217548,{"idx":12,"name":"sewer-water-highlight-01-c","tpage_name":"sewc-vis-water"}],[8323155,{"idx":83,"name":"can-side-long","tpage_name":"ctywide-vis-tfrag"}],[53805069,{"idx":13,"name":"forb-water-wave-01-dest","tpage_name":"forestb-vis-water"}],[262329,{"idx":185,"name":"radial-halo","tpage_name":"level-default-sprite"}],[12320793,{"idx":25,"name":"city-bigpipe-ring-02","tpage_name":"ctyindb-vis-tfrag"}],[14811153,{"idx":17,"name":"city-metal-strip-01","tpage_name":"ctygenb-vis-tfrag"}],[71630877,{"idx":29,"name":"king-vest","tpage_name":"ldampksm-pris2"}],[122224641,{"idx":1,"name":"facb-roadmarkings-01","tpage_name":"factoryb-vis-alpha"}],[118489101,{"idx":13,"name":"sig-gun-02","tpage_name":"deshunt-pris2"}],[104792121,{"idx":57,"name":"wstlander-01-shoetop","tpage_name":"desresc-pris"}],[8323162,{"idx":90,"name":"city-step","tpage_name":"ctywide-vis-tfrag"}],[12320794,{"idx":26,"name":"city-muck-01","tpage_name":"ctyindb-vis-tfrag"}],[14811154,{"idx":18,"name":"city-wall","tpage_name":"ctygenb-vis-tfrag"}],[12320795,{"idx":27,"name":"city-ind-grate-01","tpage_name":"ctyindb-vis-tfrag"}],[14811155,{"idx":19,"name":"city-wall-01","tpage_name":"ctygenb-vis-tfrag"}],[57147414,{"idx":22,"name":"king-precursermetal-trim","tpage_name":"waspala-pris2"}],[60882954,{"idx":10,"name":"minc-metal-wheel-01","tpage_name":"mineb-vis-pris"}],[62128134,{"idx":6,"name":"floorboard01","tpage_name":"ctycara-pris"}],[12320796,{"idx":28,"name":"city-ind-band-dark-01","tpage_name":"ctyindb-vis-tfrag"}],[14811156,{"idx":20,"name":"city-wall-inset-panel-01","tpage_name":"ctygenb-vis-tfrag"}],[12320798,{"idx":30,"name":"city-green-pipe01","tpage_name":"ctyindb-vis-tfrag"}],[14811158,{"idx":22,"name":"city-endblocks","tpage_name":"ctygenb-vis-tfrag"}],[118489109,{"idx":21,"name":"sig-metal-dirty","tpage_name":"deshunt-pris2"}],[104792129,{"idx":65,"name":"wstlander-02-eye","tpage_name":"desresc-pris"}],[8323170,{"idx":98,"name":"city-lowres-mhcity-wall-02","tpage_name":"ctywide-vis-tfrag"}],[111869955,{"idx":3,"name":"stadiumb-hud-lap-02","tpage_name":"wasleapr-minimap"}],[99418155,{"idx":43,"name":"jakchires-leatherpouch","tpage_name":"volcanox-pris"}],[96927795,{"idx":51,"name":"jinx-rope-01","tpage_name":"ltornjnx-pris2"}],[8388608,{"idx":0,"name":"security-dot-dest","tpage_name":"ctywide-vis-water"}],[8388613,{"idx":5,"name":"searchlight-envmap","tpage_name":"ctywide-vis-water"}],[8323190,{"idx":118,"name":"fac-lo-glass-01","tpage_name":"ctywide-vis-tfrag"}],[8388609,{"idx":1,"name":"security-dot-src","tpage_name":"ctywide-vis-water"}],[15990792,{"idx":8,"name":"airlock-door-cog1","tpage_name":"ctyfarma-vis-pris"}],[14745612,{"idx":12,"name":"city-wall-decal-02","tpage_name":"ctygenb-vis-shrub"}],[15990793,{"idx":9,"name":"city-farm-beettree-blossom","tpage_name":"ctyfarma-vis-pris"}],[14745613,{"idx":13,"name":"city-wall-decal-04","tpage_name":"ctygenb-vis-shrub"}],[15990794,{"idx":10,"name":"city-farm-beettree-bulb","tpage_name":"ctyfarma-vis-pris"}],[14745614,{"idx":14,"name":"city-wall-decal-05","tpage_name":"ctygenb-vis-shrub"}],[15990795,{"idx":11,"name":"city-farm-beettree-trunk","tpage_name":"ctyfarma-vis-pris"}],[14745615,{"idx":15,"name":"city-windowframe-03","tpage_name":"ctygenb-vis-shrub"}],[15990796,{"idx":12,"name":"city-farm-cabmain","tpage_name":"ctyfarma-vis-pris"}],[14745616,{"idx":16,"name":"city-wire","tpage_name":"ctygenb-vis-shrub"}],[15990797,{"idx":13,"name":"city-farm-mar-leaf-02","tpage_name":"ctyfarma-vis-pris"}],[14745617,{"idx":17,"name":"city-wall-greyblue-plain-lowres","tpage_name":"ctygenb-vis-shrub"}],[15990798,{"idx":14,"name":"city-farm-mar-main","tpage_name":"ctyfarma-vis-pris"}],[14745618,{"idx":18,"name":"city-base-vent-01","tpage_name":"ctygenb-vis-shrub"}],[15990799,{"idx":15,"name":"city-farm-sprinkle-metal","tpage_name":"ctyfarma-vis-pris"}],[14745619,{"idx":19,"name":"city-roofmetal-rim","tpage_name":"ctygenb-vis-shrub"}],[12320778,{"idx":10,"name":"city-ind-catwalk-coping-01","tpage_name":"ctyindb-vis-tfrag"}],[14811138,{"idx":2,"name":"city-metal-canal-smalltop","tpage_name":"ctygenb-vis-tfrag"}],[262326,{"idx":182,"name":"leaf3","tpage_name":"level-default-sprite"}],[12320799,{"idx":31,"name":"city-ind-wall-02","tpage_name":"ctyindb-vis-tfrag"}],[14811159,{"idx":23,"name":"city-wall-base-rim-01","tpage_name":"ctygenb-vis-tfrag"}],[12320800,{"idx":32,"name":"city-ind-wall-band-plain-01","tpage_name":"ctyindb-vis-tfrag"}],[14811160,{"idx":24,"name":"city-metal-wall-lamp-01","tpage_name":"ctygenb-vis-tfrag"}],[12320801,{"idx":33,"name":"city-ind-wall-01","tpage_name":"ctyindb-vis-tfrag"}],[14811161,{"idx":25,"name":"city-metal-wall-lamp-02","tpage_name":"ctygenb-vis-tfrag"}],[12320802,{"idx":34,"name":"city-ind-wall-base-top-01","tpage_name":"ctyindb-vis-tfrag"}],[14811162,{"idx":26,"name":"city-lamp-bluelight","tpage_name":"ctygenb-vis-tfrag"}],[12320803,{"idx":35,"name":"city-ind-wall-base-02","tpage_name":"ctyindb-vis-tfrag"}],[14811163,{"idx":27,"name":"city-bigpipe-ring-02","tpage_name":"ctygenb-vis-tfrag"}],[12320804,{"idx":36,"name":"city-ind-wall-base-01","tpage_name":"ctyindb-vis-tfrag"}],[14811164,{"idx":28,"name":"city-windowframe1","tpage_name":"ctygenb-vis-tfrag"}],[12320805,{"idx":37,"name":"city-ind-wall-band-vent-01","tpage_name":"ctyindb-vis-tfrag"}],[14811165,{"idx":29,"name":"city-ind-buldge-light-01","tpage_name":"ctygenb-vis-tfrag"}],[12320806,{"idx":38,"name":"city-ind-wall-base-08","tpage_name":"ctyindb-vis-tfrag"}],[14811166,{"idx":30,"name":"city-ind-buldge-light-self-illuminated-01","tpage_name":"ctygenb-vis-tfrag"}],[12320807,{"idx":39,"name":"city-ind-wall-07","tpage_name":"ctyindb-vis-tfrag"}],[14811167,{"idx":31,"name":"city-baselight-01","tpage_name":"ctygenb-vis-tfrag"}],[12320808,{"idx":40,"name":"city-ind-door-top-01","tpage_name":"ctyindb-vis-tfrag"}],[14811168,{"idx":32,"name":"city-outpostwall","tpage_name":"ctygenb-vis-tfrag"}],[12320809,{"idx":41,"name":"city-ind-litwindow-TOP-03","tpage_name":"ctyindb-vis-tfrag"}],[14811169,{"idx":33,"name":"city-hole-edge-01","tpage_name":"ctygenb-vis-tfrag"}],[12320811,{"idx":43,"name":"city-ind-wall-03","tpage_name":"ctyindb-vis-tfrag"}],[14811171,{"idx":35,"name":"city-metal-flatpipe-01","tpage_name":"ctygenb-vis-tfrag"}],[12320812,{"idx":44,"name":"city-ind-wall-thin-04","tpage_name":"ctyindb-vis-tfrag"}],[14811172,{"idx":36,"name":"city-windowframe-03","tpage_name":"ctygenb-vis-tfrag"}],[12320813,{"idx":45,"name":"city-ind-door-large-01","tpage_name":"ctyindb-vis-tfrag"}],[14811173,{"idx":37,"name":"common-black","tpage_name":"ctygenb-vis-tfrag"}],[12320814,{"idx":46,"name":"city-ind-wall-noisy-04","tpage_name":"ctyindb-vis-tfrag"}],[14811174,{"idx":38,"name":"city-bulb-blend","tpage_name":"ctygenb-vis-tfrag"}],[12320820,{"idx":52,"name":"city-ind-wall-06","tpage_name":"ctyindb-vis-tfrag"}],[14811180,{"idx":44,"name":"city-light-yellow","tpage_name":"ctygenb-vis-tfrag"}],[14811181,{"idx":45,"name":"city-metal-doorframe2","tpage_name":"ctygenb-vis-tfrag"}],[12320822,{"idx":54,"name":"city-ind-wall-base-top-03","tpage_name":"ctyindb-vis-tfrag"}],[14811182,{"idx":46,"name":"city-door-03","tpage_name":"ctygenb-vis-tfrag"}],[12320823,{"idx":55,"name":"city-ind-metal-04-hitweak","tpage_name":"ctyindb-vis-tfrag"}],[14811183,{"idx":47,"name":"city-smallpipe-pipe-01","tpage_name":"ctygenb-vis-tfrag"}],[12320824,{"idx":56,"name":"city-ind-litwindow-TOP-04","tpage_name":"ctyindb-vis-tfrag"}],[14811184,{"idx":48,"name":"city-smallpipe-ring-01","tpage_name":"ctygenb-vis-tfrag"}],[12320825,{"idx":57,"name":"city-ind-buldge-light-self-illuminated-02","tpage_name":"ctyindb-vis-tfrag"}],[14811185,{"idx":49,"name":"city-smallpipe-elbow-01","tpage_name":"ctygenb-vis-tfrag"}],[12320826,{"idx":58,"name":"city-ind-metal-03","tpage_name":"ctyindb-vis-tfrag"}],[14811186,{"idx":50,"name":"city-base-vent-01","tpage_name":"ctygenb-vis-tfrag"}],[12320827,{"idx":59,"name":"city-ind-ventglow","tpage_name":"ctyindb-vis-tfrag"}],[14811187,{"idx":51,"name":"city-black","tpage_name":"ctygenb-vis-tfrag"}],[14811188,{"idx":52,"name":"city-metal-windowframe","tpage_name":"ctygenb-vis-tfrag"}],[14811192,{"idx":56,"name":"city-wall-bottom","tpage_name":"ctygenb-vis-tfrag"}],[12320833,{"idx":65,"name":"city-ind-panels-scorched-02","tpage_name":"ctyindb-vis-tfrag"}],[14811193,{"idx":57,"name":"city-door-02","tpage_name":"ctygenb-vis-tfrag"}],[62652440,{"idx":24,"name":"citichic-shirt-01","tpage_name":"ctypepa-pris"}],[458778,{"idx":26,"name":"gun-pump","tpage_name":"level-default-pris"}],[17825796,{"idx":4,"name":"airlock-door-bolt","tpage_name":"ctyport-vis-pris"}],[12320834,{"idx":66,"name":"city-ind-panels-scorched-03","tpage_name":"ctyindb-vis-tfrag"}],[14811194,{"idx":58,"name":"city-wall-bottom-greyblue","tpage_name":"ctygenb-vis-tfrag"}],[62652441,{"idx":25,"name":"citichic-skirt-01","tpage_name":"ctypepa-pris"}],[458779,{"idx":27,"name":"gun-purple-glow","tpage_name":"level-default-pris"}],[17825797,{"idx":5,"name":"airlock-door-cog","tpage_name":"ctyport-vis-pris"}],[62652442,{"idx":26,"name":"citichic-vest-01","tpage_name":"ctypepa-pris"}],[458780,{"idx":28,"name":"gun-red-glow","tpage_name":"level-default-pris"}],[17825798,{"idx":6,"name":"airlock-door-main","tpage_name":"ctyport-vis-pris"}],[62652443,{"idx":27,"name":"citn-1-pants","tpage_name":"ctypepa-pris"}],[458781,{"idx":29,"name":"gun-red-mag","tpage_name":"level-default-pris"}],[17825799,{"idx":7,"name":"airlock-door-metal2","tpage_name":"ctyport-vis-pris"}],[71368704,{"idx":0,"name":"sig-flatfangs","tpage_name":"ldamsig-water"}],[62652444,{"idx":28,"name":"citn-allbuckel","tpage_name":"ctypepa-pris"}],[458782,{"idx":30,"name":"gun-teeth","tpage_name":"level-default-pris"}],[17825800,{"idx":8,"name":"airlockl-door-metalframe","tpage_name":"ctyport-vis-pris"}],[62652445,{"idx":29,"name":"citn-alleyebrow","tpage_name":"ctypepa-pris"}],[458783,{"idx":31,"name":"gun-tip","tpage_name":"level-default-pris"}],[17825801,{"idx":9,"name":"mechdax-armfur","tpage_name":"ctyport-vis-pris"}],[62652446,{"idx":30,"name":"citn-allflesh","tpage_name":"ctypepa-pris"}],[10420224,{"idx":0,"name":"map-ctyslumb","tpage_name":"ctyslumb-minimap"}],[458784,{"idx":32,"name":"gun-yellow-glow","tpage_name":"level-default-pris"}],[17825802,{"idx":10,"name":"mechdax-ear","tpage_name":"ctyport-vis-pris"}],[14811201,{"idx":65,"name":"city-metalsiding-02","tpage_name":"ctygenb-vis-tfrag"}],[62652448,{"idx":32,"name":"citn-alllcotton","tpage_name":"ctypepa-pris"}],[458786,{"idx":34,"name":"gun-yellow-mag-end","tpage_name":"level-default-pris"}],[17825804,{"idx":12,"name":"mechdax-finger","tpage_name":"ctyport-vis-pris"}],[14811202,{"idx":66,"name":"city-stonefloor-singlestone","tpage_name":"ctygenb-vis-tfrag"}],[62652449,{"idx":33,"name":"citn-alllcotton-gather","tpage_name":"ctypepa-pris"}],[458787,{"idx":35,"name":"gun-yellowgreen","tpage_name":"level-default-pris"}],[17825805,{"idx":13,"name":"mechdax-horn","tpage_name":"ctyport-vis-pris"}],[49545239,{"idx":23,"name":"power-switch-02","tpage_name":"sewe-vis-pris"}],[12320843,{"idx":75,"name":"city-port-cable-quare-01","tpage_name":"ctyindb-vis-tfrag"}],[14811203,{"idx":67,"name":"t-palshaft-dirt-blue-01","tpage_name":"ctygenb-vis-tfrag"}],[62652450,{"idx":34,"name":"citn-alllcotton-wrinkled","tpage_name":"ctypepa-pris"}],[17825806,{"idx":14,"name":"mechdax-leather","tpage_name":"ctyport-vis-pris"}],[49545240,{"idx":24,"name":"power-switch-03","tpage_name":"sewe-vis-pris"}],[12320844,{"idx":76,"name":"city-ind-palace-cable-section-band","tpage_name":"ctyindb-vis-tfrag"}],[14811204,{"idx":68,"name":"citywide-panels-01","tpage_name":"ctygenb-vis-tfrag"}],[62652451,{"idx":35,"name":"citn-allleather","tpage_name":"ctypepa-pris"}],[17825807,{"idx":15,"name":"mechdax-metallic","tpage_name":"ctyport-vis-pris"}],[49545241,{"idx":25,"name":"power-switch-04","tpage_name":"sewe-vis-pris"}],[12320845,{"idx":77,"name":"city-ind-palace-cable-section","tpage_name":"ctyindb-vis-tfrag"}],[14811205,{"idx":69,"name":"t-citywide-met-pill-01","tpage_name":"ctygenb-vis-tfrag"}],[458790,{"idx":38,"name":"jakbsmall-brownleather","tpage_name":"level-default-pris"}],[17825808,{"idx":16,"name":"mechdax-nose","tpage_name":"ctyport-vis-pris"}],[49545242,{"idx":26,"name":"power-switch-05","tpage_name":"sewe-vis-pris"}],[12320846,{"idx":78,"name":"city-ind-metal-09","tpage_name":"ctyindb-vis-tfrag"}],[14811206,{"idx":70,"name":"t-citywide-met-strp01","tpage_name":"ctygenb-vis-tfrag"}],[17825809,{"idx":17,"name":"mechdax-orange2yel-metal","tpage_name":"ctyport-vis-pris"}],[49545243,{"idx":27,"name":"power-switch-06","tpage_name":"sewe-vis-pris"}],[12320847,{"idx":79,"name":"rub-beam-gen","tpage_name":"ctyindb-vis-tfrag"}],[14811207,{"idx":71,"name":"city-outpostwall-strip","tpage_name":"ctygenb-vis-tfrag"}],[17825810,{"idx":18,"name":"mechdax-solidorangemetal","tpage_name":"ctyport-vis-pris"}],[49545244,{"idx":28,"name":"bam-eyelight","tpage_name":"sewe-vis-pris"}],[8912920,{"idx":24,"name":"city-slum-door-01","tpage_name":"ctysluma-vis-tfrag"}],[16384000,{"idx":0,"name":"map-ctyfarmb","tpage_name":"ctyfarmb-minimap"}],[12320848,{"idx":80,"name":"city-ind-ground-metal","tpage_name":"ctyindb-vis-tfrag"}],[14811208,{"idx":72,"name":"city-ind-metal-green-main-side","tpage_name":"ctygenb-vis-tfrag"}],[17825811,{"idx":19,"name":"mechdax-yellowfur","tpage_name":"ctyport-vis-pris"}],[12320849,{"idx":81,"name":"city-base-vent-01","tpage_name":"ctyindb-vis-tfrag"}],[14811209,{"idx":73,"name":"tcab-beam01","tpage_name":"ctygenb-vis-tfrag"}],[14811210,{"idx":74,"name":"tcab-threads-beam-01","tpage_name":"ctygenb-vis-tfrag"}],[49545247,{"idx":31,"name":"cguard1-backmetal","tpage_name":"sewe-vis-pris"}],[49545248,{"idx":32,"name":"cguard1-chestplate","tpage_name":"sewe-vis-pris"}],[49545249,{"idx":33,"name":"cguard1-gunmetaldark2","tpage_name":"sewe-vis-pris"}],[14811213,{"idx":77,"name":"tcab-i-redstripe-01","tpage_name":"ctygenb-vis-tfrag"}],[49545250,{"idx":34,"name":"cguard1-guntube","tpage_name":"sewe-vis-pris"}],[39714816,{"idx":0,"name":"nest-fingerback","tpage_name":"nstb-vis-shrub"}],[14811216,{"idx":80,"name":"city-metal-pipeside-01","tpage_name":"ctygenb-vis-tfrag"}],[49545253,{"idx":37,"name":"cguardgame-metaledark-02","tpage_name":"sewe-vis-pris"}],[94371869,{"idx":29,"name":"palace-break-bigwall03","tpage_name":"intpfall-vis-pris"}],[103088129,{"idx":1,"name":"des-rock-shrub-01","tpage_name":"desertc-vis-shrub"}],[39714817,{"idx":1,"name":"nestb-eggskin","tpage_name":"nstb-vis-shrub"}],[14811217,{"idx":81,"name":"citywide-pillar","tpage_name":"ctygenb-vis-tfrag"}],[39714819,{"idx":3,"name":"nsta-rock-shrubs","tpage_name":"nstb-vis-shrub"}],[14811219,{"idx":83,"name":"t-citywide-met-strp-close","tpage_name":"ctygenb-vis-tfrag"}],[49545256,{"idx":40,"name":"environment-oldmetal","tpage_name":"sewe-vis-pris"}],[94371872,{"idx":32,"name":"palace-break-bigwall06","tpage_name":"intpfall-vis-pris"}],[103088132,{"idx":4,"name":"des-shrub-pebbles","tpage_name":"desertc-vis-shrub"}],[39714820,{"idx":4,"name":"nsta-transparent","tpage_name":"nstb-vis-shrub"}],[14811220,{"idx":84,"name":"city-burning-can","tpage_name":"ctygenb-vis-tfrag"}],[14811221,{"idx":85,"name":"rub-beam-gen","tpage_name":"ctygenb-vis-tfrag"}],[39714822,{"idx":6,"name":"nestb-basekor","tpage_name":"nstb-vis-shrub"}],[14811222,{"idx":86,"name":"rub-palace-tower-side","tpage_name":"ctygenb-vis-tfrag"}],[49545259,{"idx":43,"name":"roboguard-headshield","tpage_name":"sewe-vis-pris"}],[39714823,{"idx":7,"name":"nstab-eggskin","tpage_name":"nstb-vis-shrub"}],[14811223,{"idx":87,"name":"rub-panels-01","tpage_name":"ctygenb-vis-tfrag"}],[49741835,{"idx":11,"name":"sewer-pipe-rim-07","tpage_name":"sewf-vis-pris"}],[48496655,{"idx":15,"name":"sewer-metal-floor-02","tpage_name":"sewa-vis-tfrag"}],[74186819,{"idx":67,"name":"squid-drabgun","tpage_name":"sewh-vis-pris"}],[81657899,{"idx":43,"name":"sig-glovetop","tpage_name":"arenacst-pris2"}],[8716315,{"idx":27,"name":"baron-neon-cheek-c-on","tpage_name":"ctysluma-sprite"}],[11141132,{"idx":12,"name":"sign-wide-a","tpage_name":"ctyslumc-sprite"}],[14876672,{"idx":0,"name":"city-window-glass-01","tpage_name":"ctygenb-vis-water"}],[8847392,{"idx":32,"name":"des-burn-precursor-01-bottom","tpage_name":"ctysluma-vis-shrub"}],[17563652,{"idx":4,"name":"hiphog-exterior-blue","tpage_name":"ctyport-sprite"}],[35389643,{"idx":203,"name":"klever-bolt","tpage_name":"introcst-pris"}],[49741836,{"idx":12,"name":"sewer-screw-02","tpage_name":"sewf-vis-pris"}],[48496656,{"idx":16,"name":"sewer-metal-floor-01","tpage_name":"sewa-vis-tfrag"}],[81657900,{"idx":44,"name":"sig-gun-01","tpage_name":"arenacst-pris2"}],[8716316,{"idx":28,"name":"baron-neon-cheek-d","tpage_name":"ctysluma-sprite"}],[11141133,{"idx":13,"name":"sign-wide-b","tpage_name":"ctyslumc-sprite"}],[14876673,{"idx":1,"name":"city-door-window-glass-02","tpage_name":"ctygenb-vis-water"}],[8847393,{"idx":33,"name":"des-burn-precursor-head-01","tpage_name":"ctysluma-vis-shrub"}],[11337753,{"idx":25,"name":"ctyslumc-stain","tpage_name":"ctyslumc-vis-shrub"}],[17563653,{"idx":5,"name":"hiphog-exterior-blue-on","tpage_name":"ctyport-sprite"}],[35389644,{"idx":204,"name":"klever-gunmetal-01","tpage_name":"introcst-pris"}],[49741837,{"idx":13,"name":"sew-poison-light","tpage_name":"sewf-vis-pris"}],[48496657,{"idx":17,"name":"sew-metal-floor-01","tpage_name":"sewa-vis-tfrag"}],[81657901,{"idx":45,"name":"sig-gun-02","tpage_name":"arenacst-pris2"}],[8716317,{"idx":29,"name":"baron-neon-cheek-d-on","tpage_name":"ctysluma-sprite"}],[14876674,{"idx":2,"name":"city-window-glass-02","tpage_name":"ctygenb-vis-water"}],[35389645,{"idx":205,"name":"klever-gunmetal-02","tpage_name":"introcst-pris"}],[71630873,{"idx":25,"name":"king-shoebottom","tpage_name":"ldampksm-pris2"}],[8323158,{"idx":86,"name":"ctyslumc-light-blue","tpage_name":"ctywide-vis-tfrag"}],[35389445,{"idx":5,"name":"cguard1-backmetal","tpage_name":"introcst-pris"}],[17956925,{"idx":61,"name":"city-port-barge-glass","tpage_name":"ctyport-vis-tfrag"}],[12320835,{"idx":67,"name":"city-ind-wall-band-striped-01","tpage_name":"ctyindb-vis-tfrag"}],[14811195,{"idx":59,"name":"city-wall-greyblue-plain-lowres","tpage_name":"ctygenb-vis-tfrag"}],[14680068,{"idx":4,"name":"airlockl-door-metalframe","tpage_name":"ctygenb-vis-pris"}],[15925248,{"idx":0,"name":"city-farm-treetop","tpage_name":"ctyfarma-vis-alpha"}],[21299208,{"idx":8,"name":"vehicle-body-panel-01","tpage_name":"wasall-pris"}],[12320836,{"idx":68,"name":"city-ind-panels-scorched","tpage_name":"ctyindb-vis-tfrag"}],[14811196,{"idx":60,"name":"city-wall-plain-greyblue","tpage_name":"ctygenb-vis-tfrag"}],[15925249,{"idx":1,"name":"city-farm-treetop-02","tpage_name":"ctyfarma-vis-alpha"}],[21299209,{"idx":9,"name":"vehicle-brace-pipe-01","tpage_name":"wasall-pris"}],[12320837,{"idx":69,"name":"t-citywide-met-bm-red-strp01","tpage_name":"ctyindb-vis-tfrag"}],[14811197,{"idx":61,"name":"city-dark-grey-plain","tpage_name":"ctygenb-vis-tfrag"}],[15925250,{"idx":2,"name":"city-farm-road-01","tpage_name":"ctyfarma-vis-alpha"}],[21299210,{"idx":10,"name":"vehicle-cap-pin-01","tpage_name":"wasall-pris"}],[12320838,{"idx":70,"name":"city-port-cable-cylinder-01","tpage_name":"ctyindb-vis-tfrag"}],[14811198,{"idx":62,"name":"city-metal-doorframe1","tpage_name":"ctygenb-vis-tfrag"}],[15925251,{"idx":3,"name":"city-farm-road-blend-to-alpha-01","tpage_name":"ctyfarma-vis-alpha"}],[21299211,{"idx":11,"name":"vehicle-cushion-01","tpage_name":"wasall-pris"}],[12320839,{"idx":71,"name":"city-port-bigpipe-ring-side","tpage_name":"ctyindb-vis-tfrag"}],[14811199,{"idx":63,"name":"city-metal-orange","tpage_name":"ctygenb-vis-tfrag"}],[14680072,{"idx":8,"name":"jakc-scarfhanging","tpage_name":"ctygenb-vis-pris"}],[15925252,{"idx":4,"name":"city-farm-road-end-blend-to-alpha","tpage_name":"ctyfarma-vis-alpha"}],[21299212,{"idx":12,"name":"vehicle-dash-01","tpage_name":"wasall-pris"}],[49610808,{"idx":56,"name":"sewer-bolt-side-02","tpage_name":"sewf-vis-tfrag"}],[67043328,{"idx":0,"name":"piss-puddle","tpage_name":"vinroom-sprite"}],[60817428,{"idx":20,"name":"minc-yel-safe-paint-rust01","tpage_name":"mineb-vis-shrub"}],[95879177,{"idx":9,"name":"torn-eye","tpage_name":"ltorn-pris2"}],[49610767,{"idx":15,"name":"sewer-pipe-rim-01","tpage_name":"sewf-vis-tfrag"}],[12255244,{"idx":12,"name":"city-ind-overlay-bullethole-a","tpage_name":"ctyindb-vis-shrub"}],[14745604,{"idx":4,"name":"city-dirt-to-wall","tpage_name":"ctygenb-vis-shrub"}],[15990784,{"idx":0,"name":"airlock-door-bolt","tpage_name":"ctyfarma-vis-pris"}],[95879178,{"idx":10,"name":"torn-eyelid","tpage_name":"ltorn-pris2"}],[49610768,{"idx":16,"name":"sewer-pipe-rim-06","tpage_name":"sewf-vis-tfrag"}],[12255245,{"idx":13,"name":"city-inda-scorch-big","tpage_name":"ctyindb-vis-shrub"}],[14745605,{"idx":5,"name":"city-ground-stain-01","tpage_name":"ctygenb-vis-shrub"}],[15990785,{"idx":1,"name":"airlock-door-cog","tpage_name":"ctyfarma-vis-pris"}],[95879179,{"idx":11,"name":"torn-face","tpage_name":"ltorn-pris2"}],[49610769,{"idx":17,"name":"sewer-plate-05","tpage_name":"sewf-vis-tfrag"}],[12255246,{"idx":14,"name":"city-inda-scorch-small","tpage_name":"ctyindb-vis-shrub"}],[14745606,{"idx":6,"name":"city-mark-wire","tpage_name":"ctygenb-vis-shrub"}],[15990786,{"idx":2,"name":"airlock-door-main","tpage_name":"ctyfarma-vis-pris"}],[49610770,{"idx":18,"name":"sewer-metal-03","tpage_name":"sewf-vis-tfrag"}],[12255247,{"idx":15,"name":"city-wire","tpage_name":"ctyindb-vis-shrub"}],[14745607,{"idx":7,"name":"city-metalrim-01","tpage_name":"ctygenb-vis-shrub"}],[15990787,{"idx":3,"name":"airlock-door-metal2","tpage_name":"ctyfarma-vis-pris"}],[67043332,{"idx":4,"name":"screen-03","tpage_name":"vinroom-sprite"}],[60817432,{"idx":24,"name":"mine-moving-step-top-lod02","tpage_name":"mineb-vis-shrub"}],[12255248,{"idx":16,"name":"city-port-bigpipe-ring-side","tpage_name":"ctyindb-vis-shrub"}],[14745608,{"idx":8,"name":"city-railing","tpage_name":"ctygenb-vis-shrub"}],[15990788,{"idx":4,"name":"airlockl-door-metalframe","tpage_name":"ctyfarma-vis-pris"}],[49610813,{"idx":61,"name":"sewer-round-01","tpage_name":"sewf-vis-tfrag"}],[67043333,{"idx":5,"name":"screen-04","tpage_name":"vinroom-sprite"}],[60817433,{"idx":25,"name":"mine-moving-plat-girder","tpage_name":"mineb-vis-shrub"}],[49610772,{"idx":20,"name":"sewer-metal-block-01","tpage_name":"sewf-vis-tfrag"}],[14745609,{"idx":9,"name":"city-stain-wall-01","tpage_name":"ctygenb-vis-shrub"}],[15990789,{"idx":5,"name":"city-farm-veg-cableaf","tpage_name":"ctyfarma-vis-pris"}],[67043334,{"idx":6,"name":"screen-05","tpage_name":"vinroom-sprite"}],[60817434,{"idx":26,"name":"min-rat-mesh-01","tpage_name":"mineb-vis-shrub"}],[14745610,{"idx":10,"name":"city-stain-window-01","tpage_name":"ctygenb-vis-shrub"}],[15990790,{"idx":6,"name":"city-farm-veg-cabseed","tpage_name":"ctyfarma-vis-pris"}],[67043335,{"idx":7,"name":"screen-06","tpage_name":"vinroom-sprite"}],[60817435,{"idx":27,"name":"minc-yel-paint-rust01","tpage_name":"mineb-vis-shrub"}],[49610774,{"idx":22,"name":"sewer-pipe-rim-08","tpage_name":"sewf-vis-tfrag"}],[14745611,{"idx":11,"name":"city-wall-decal-01","tpage_name":"ctygenb-vis-shrub"}],[15990791,{"idx":7,"name":"city-farm-veg-green-1","tpage_name":"ctyfarma-vis-pris"}],[15990805,{"idx":21,"name":"city-farm-veg-leaf-1","tpage_name":"ctyfarma-vis-pris"}],[57278510,{"idx":46,"name":"metalflut-saddle","tpage_name":"waswide-vis-pris"}],[52297790,{"idx":62,"name":"freehq-pipe04","tpage_name":"freehq-tfrag"}],[67239950,{"idx":14,"name":"vin-floor-04b","tpage_name":"vinroom-vis-tfrag"}],[48562250,{"idx":74,"name":"jakchires-horn","tpage_name":"sewa-vis-pris"}],[81723494,{"idx":102,"name":"jakchires-horn","tpage_name":"ljndklev-pris"}],[75890747,{"idx":59,"name":"onin-tent-base","tpage_name":"onintent-tfrag"}],[94371874,{"idx":34,"name":"palace-break-bigwall08","tpage_name":"intpfall-vis-pris"}],[12320780,{"idx":12,"name":"city-ind-wall-base-03","tpage_name":"ctyindb-vis-tfrag"}],[14811140,{"idx":4,"name":"city-bridge-ends","tpage_name":"ctygenb-vis-tfrag"}],[16056320,{"idx":0,"name":"city-farm-shrub-overhang","tpage_name":"ctyfarma-vis-shrub"}],[57278511,{"idx":47,"name":"metalflut-saddlehang","tpage_name":"waswide-vis-pris"}],[52297791,{"idx":63,"name":"freehq-gray-metal-disc08","tpage_name":"freehq-tfrag"}],[67239951,{"idx":15,"name":"vin-floor-symbol","tpage_name":"vinroom-vis-tfrag"}],[48562251,{"idx":75,"name":"jakchires-jacket","tpage_name":"sewa-vis-pris"}],[81723495,{"idx":103,"name":"jakchires-jacket","tpage_name":"ljndklev-pris"}],[75890748,{"idx":60,"name":"onin-tent-base-patch1","tpage_name":"onintent-tfrag"}],[103088135,{"idx":7,"name":"des-sand-grass-01","tpage_name":"desertc-vis-shrub"}],[94371875,{"idx":35,"name":"palace-break-brokenwall","tpage_name":"intpfall-vis-pris"}],[12320781,{"idx":13,"name":"city-ind-litemetal-01","tpage_name":"ctyindb-vis-tfrag"}],[14811141,{"idx":5,"name":"city-canal-top2","tpage_name":"ctygenb-vis-tfrag"}],[16056321,{"idx":1,"name":"city-farm-shrub-overhang-02","tpage_name":"ctyfarma-vis-shrub"}],[57278512,{"idx":48,"name":"metalflut-saddleseat","tpage_name":"waswide-vis-pris"}],[52297792,{"idx":64,"name":"freehq-pipe03","tpage_name":"freehq-tfrag"}],[67239952,{"idx":16,"name":"vin-handle-01","tpage_name":"vinroom-vis-tfrag"}],[48562252,{"idx":76,"name":"jakchires-leatherpouch","tpage_name":"sewa-vis-pris"}],[81723496,{"idx":104,"name":"jakchires-leatherpouch","tpage_name":"ljndklev-pris"}],[75890749,{"idx":61,"name":"onin-tent-patch1","tpage_name":"onintent-tfrag"}],[103088136,{"idx":8,"name":"des-pinetree-leaf-02","tpage_name":"desertc-vis-shrub"}],[94371876,{"idx":36,"name":"palace-break-door","tpage_name":"intpfall-vis-pris"}],[12320782,{"idx":14,"name":"city-ind-wall-noisy-05","tpage_name":"ctyindb-vis-tfrag"}],[14811142,{"idx":6,"name":"city-bridge-walk","tpage_name":"ctygenb-vis-tfrag"}],[16056322,{"idx":2,"name":"city-farm-stain-01","tpage_name":"ctyfarma-vis-shrub"}],[60882967,{"idx":23,"name":"minc-blue-paint-rust04","tpage_name":"mineb-vis-pris"}],[57278513,{"idx":49,"name":"metalflut-skin-01","tpage_name":"waswide-vis-pris"}],[52297793,{"idx":65,"name":"freehq-wal-tilem05","tpage_name":"freehq-tfrag"}],[67239953,{"idx":17,"name":"vin-monitor-rim","tpage_name":"vinroom-vis-tfrag"}],[48562253,{"idx":77,"name":"jakchires-lightbrownspat","tpage_name":"sewa-vis-pris"}],[81723497,{"idx":105,"name":"jakchires-lightbrownspat","tpage_name":"ljndklev-pris"}],[75890750,{"idx":62,"name":"onin-tent-patch2","tpage_name":"onintent-tfrag"}],[103088137,{"idx":9,"name":"des-pinetree-leaf-01","tpage_name":"desertc-vis-shrub"}],[94371877,{"idx":37,"name":"palace-break-floor01","tpage_name":"intpfall-vis-pris"}],[12320783,{"idx":15,"name":"city-ind-wall-noisy-border-01","tpage_name":"ctyindb-vis-tfrag"}],[14811143,{"idx":7,"name":"city-bridgeseam","tpage_name":"ctygenb-vis-tfrag"}],[16056323,{"idx":3,"name":"city-farm-stain-02","tpage_name":"ctyfarma-vis-shrub"}],[60882968,{"idx":24,"name":"bam-eyelight","tpage_name":"mineb-vis-pris"}],[57278514,{"idx":50,"name":"metalflut-skin-02","tpage_name":"waswide-vis-pris"}],[52297794,{"idx":66,"name":"freehq-wal-tilem06","tpage_name":"freehq-tfrag"}],[67239954,{"idx":18,"name":"vin-monitor-rim-02","tpage_name":"vinroom-vis-tfrag"}],[48562254,{"idx":78,"name":"jakchires-pants","tpage_name":"sewa-vis-pris"}],[81723498,{"idx":106,"name":"jakchires-pants","tpage_name":"ljndklev-pris"}],[75890751,{"idx":63,"name":"onin-tent-wood-posts","tpage_name":"onintent-tfrag"}],[94371878,{"idx":38,"name":"palace-break-floor02","tpage_name":"intpfall-vis-pris"}],[12320784,{"idx":16,"name":"city-ind-wall-noisy-01","tpage_name":"ctyindb-vis-tfrag"}],[14811144,{"idx":8,"name":"city-railing","tpage_name":"ctygenb-vis-tfrag"}],[16056324,{"idx":4,"name":"city-farm-ground-stain-01","tpage_name":"ctyfarma-vis-shrub"}],[60882969,{"idx":25,"name":"monster-frog-back","tpage_name":"mineb-vis-pris"}],[79364096,{"idx":0,"name":"bam-eyelight","tpage_name":"wasseem-pris"}],[57278515,{"idx":51,"name":"metalflut-wrap","tpage_name":"waswide-vis-pris"}],[52297795,{"idx":67,"name":"freehq-wal-tilem02","tpage_name":"freehq-tfrag"}],[67239955,{"idx":19,"name":"vin-monitor-rim-04","tpage_name":"vinroom-vis-tfrag"}],[48562255,{"idx":79,"name":"jakchires-precarmor-01","tpage_name":"sewa-vis-pris"}],[81723499,{"idx":107,"name":"jakchires-precarmor-01","tpage_name":"ljndklev-pris"}],[94371879,{"idx":39,"name":"palace-break-girder01","tpage_name":"intpfall-vis-pris"}],[12320785,{"idx":17,"name":"city-ind-metal-02","tpage_name":"ctyindb-vis-tfrag"}],[14811145,{"idx":9,"name":"city-bridgesupports","tpage_name":"ctygenb-vis-tfrag"}],[16056325,{"idx":5,"name":"city-farm-wall-vine","tpage_name":"ctyfarma-vis-shrub"}],[60882970,{"idx":26,"name":"monster-frog-belly","tpage_name":"mineb-vis-pris"}],[74383377,{"idx":17,"name":"sewer-bolt-side-01","tpage_name":"sewj-vis-tfrag"}],[79364097,{"idx":1,"name":"bam-hairhilite","tpage_name":"wasseem-pris"}],[81723500,{"idx":108,"name":"jakchires-shoebottom","tpage_name":"ljndklev-pris"}],[94371880,{"idx":40,"name":"palace-break-girder02","tpage_name":"intpfall-vis-pris"}],[12320786,{"idx":18,"name":"city-ind-bigpipe-siding","tpage_name":"ctyindb-vis-tfrag"}],[14811146,{"idx":10,"name":"city-lurkermetal-01","tpage_name":"ctygenb-vis-tfrag"}],[16056326,{"idx":6,"name":"city-farm-cattail-grass","tpage_name":"ctyfarma-vis-shrub"}],[60882971,{"idx":27,"name":"monster-frog-eye","tpage_name":"mineb-vis-pris"}],[74383378,{"idx":18,"name":"sewer-bolt-side-02","tpage_name":"sewj-vis-tfrag"}],[79364098,{"idx":2,"name":"daxter-eyelid","tpage_name":"wasseem-pris"}],[94371881,{"idx":41,"name":"palace-break-glass01","tpage_name":"intpfall-vis-pris"}],[12320787,{"idx":19,"name":"city-ind-support-base","tpage_name":"ctyindb-vis-tfrag"}],[14811147,{"idx":11,"name":"city-canal-top","tpage_name":"ctygenb-vis-tfrag"}],[16056327,{"idx":7,"name":"city-farm-blotch-withstreaks-01","tpage_name":"ctyfarma-vis-shrub"}],[49610809,{"idx":57,"name":"sewer-round-03","tpage_name":"sewf-vis-tfrag"}],[60817429,{"idx":21,"name":"minc-blue-paint-rust05","tpage_name":"mineb-vis-shrub"}],[67043329,{"idx":1,"name":"screen-00","tpage_name":"vinroom-sprite"}],[60882972,{"idx":28,"name":"monster-frog-fin","tpage_name":"mineb-vis-pris"}],[74383379,{"idx":19,"name":"sewer-metal-trim-01","tpage_name":"sewj-vis-tfrag"}],[79364099,{"idx":3,"name":"daxter-furhilite","tpage_name":"wasseem-pris"}],[94371882,{"idx":42,"name":"palace-break-glass02","tpage_name":"intpfall-vis-pris"}],[12320788,{"idx":20,"name":"city-ind-bigpipe-siding-02","tpage_name":"ctyindb-vis-tfrag"}],[14811148,{"idx":12,"name":"city-support-main-01","tpage_name":"ctygenb-vis-tfrag"}],[16056328,{"idx":8,"name":"city-farm-dirt-small-01","tpage_name":"ctyfarma-vis-shrub"}],[49610810,{"idx":58,"name":"sewer-round-02","tpage_name":"sewf-vis-tfrag"}],[60817430,{"idx":22,"name":"minc-blue-paint-01","tpage_name":"mineb-vis-shrub"}],[67043330,{"idx":2,"name":"screen-01","tpage_name":"vinroom-sprite"}],[60882973,{"idx":29,"name":"monster-frog-leg","tpage_name":"mineb-vis-pris"}],[79364100,{"idx":4,"name":"daxter-orange","tpage_name":"wasseem-pris"}],[94371883,{"idx":43,"name":"palace-break-glass03","tpage_name":"intpfall-vis-pris"}],[12320789,{"idx":21,"name":"city-ind-redlight","tpage_name":"ctyindb-vis-tfrag"}],[14811149,{"idx":13,"name":"city-wall-plain","tpage_name":"ctygenb-vis-tfrag"}],[16056329,{"idx":9,"name":"city-farm-veg-chilberry","tpage_name":"ctyfarma-vis-shrub"}],[49610811,{"idx":59,"name":"sewer-lip-01","tpage_name":"sewf-vis-tfrag"}],[60817431,{"idx":23,"name":"minc-strut-01","tpage_name":"mineb-vis-shrub"}],[67043331,{"idx":3,"name":"screen-02","tpage_name":"vinroom-sprite"}],[74252368,{"idx":80,"name":"widow-dull-inards","tpage_name":"sewg-vis-pris"}],[81723448,{"idx":56,"name":"klever-chest","tpage_name":"ljndklev-pris"}],[60882974,{"idx":30,"name":"monster-frog-legfront","tpage_name":"mineb-vis-pris"}],[56950861,{"idx":77,"name":"waspala-column-03","tpage_name":"waspala-tfrag"}],[74383381,{"idx":21,"name":"sewer-pipe-rim-06","tpage_name":"sewj-vis-tfrag"}],[79364101,{"idx":5,"name":"daxterarm","tpage_name":"wasseem-pris"}],[14811150,{"idx":14,"name":"city-sideframe-plain","tpage_name":"ctygenb-vis-tfrag"}],[12320790,{"idx":22,"name":"city-ind-grnd-cobl-01","tpage_name":"ctyindb-vis-tfrag"}],[16056330,{"idx":10,"name":"city-farm-flowers","tpage_name":"ctyfarma-vis-shrub"}],[60948500,{"idx":20,"name":"minc-light","tpage_name":"minec-vis-tfrag"}],[48627786,{"idx":74,"name":"sewer-red-light-02","tpage_name":"sewb-vis-tfrag"}],[262287,{"idx":143,"name":"lightning-tile","tpage_name":"level-default-sprite"}],[38862867,{"idx":19,"name":"nstab-basekor","tpage_name":"nsta-vis-tfrag"}],[73924616,{"idx":8,"name":"sewer-pipe-rim-09","tpage_name":"sewg-vis-shrub"}],[48955393,{"idx":1,"name":"sewer-pipe-small-01","tpage_name":"sewd-vis-shrub"}],[26542153,{"idx":73,"name":"wstd-floor-panel03","tpage_name":"wasstada-tfrag"}],[60948501,{"idx":21,"name":"minc-train-pipe-01","tpage_name":"minec-vis-tfrag"}],[48627787,{"idx":75,"name":"sewer-small-light-01","tpage_name":"sewb-vis-tfrag"}],[60948502,{"idx":22,"name":"minc-rust-pipe-04","tpage_name":"minec-vis-tfrag"}],[38862869,{"idx":21,"name":"nsta-cave-top-platform","tpage_name":"nsta-vis-tfrag"}],[71434258,{"idx":18,"name":"wstd-fight-plat-lrg-floor-02","tpage_name":"wasstadc-tfrag"}],[73924618,{"idx":10,"name":"sewer-pipe-small-02","tpage_name":"sewg-vis-shrub"}],[48955395,{"idx":3,"name":"sewer-hang-moss-01","tpage_name":"sewd-vis-shrub"}],[26542155,{"idx":75,"name":"wstd-canopy","tpage_name":"wasstada-tfrag"}],[74514456,{"idx":24,"name":"roboguard-shouldershield","tpage_name":"sewj-vis-pris"}],[81985536,{"idx":0,"name":"wstlander-01-eye","tpage_name":"wasstadc-pris"}],[60948503,{"idx":23,"name":"minc-rust-pipe-03","tpage_name":"minec-vis-tfrag"}],[38862870,{"idx":22,"name":"nsta-cave-teeth","tpage_name":"nsta-vis-tfrag"}],[73924619,{"idx":11,"name":"sew-moving-stepb-grate","tpage_name":"sewg-vis-shrub"}],[48955396,{"idx":4,"name":"sew-jump-pad-grate","tpage_name":"sewd-vis-shrub"}],[26542156,{"idx":76,"name":"wstd-stands-plate01","tpage_name":"wasstada-tfrag"}],[74514457,{"idx":25,"name":"squid-bulb-sm","tpage_name":"sewj-vis-pris"}],[81985537,{"idx":1,"name":"wstlander-01-gunmetal-01","tpage_name":"wasstadc-pris"}],[60948504,{"idx":24,"name":"minc-stone","tpage_name":"minec-vis-tfrag"}],[60948505,{"idx":25,"name":"minc-plate-01","tpage_name":"minec-vis-tfrag"}],[48627791,{"idx":79,"name":"sewer-mantel-02","tpage_name":"sewb-vis-tfrag"}],[262292,{"idx":148,"name":"rainbow-halo","tpage_name":"level-default-sprite"}],[38862872,{"idx":24,"name":"nsta-cave-mites","tpage_name":"nsta-vis-tfrag"}],[48955398,{"idx":6,"name":"sewer-plate-05","tpage_name":"sewd-vis-shrub"}],[26542158,{"idx":78,"name":"wstd-stands-shell","tpage_name":"wasstada-tfrag"}],[74514459,{"idx":27,"name":"widow-dull-inards","tpage_name":"sewj-vis-pris"}],[81985539,{"idx":3,"name":"wstlander-01-gunmetal-03","tpage_name":"wasstadc-pris"}],[60948506,{"idx":26,"name":"minc-blue-paint-02","tpage_name":"minec-vis-tfrag"}],[48627792,{"idx":80,"name":"sewer-metal-edge-01","tpage_name":"sewb-vis-tfrag"}],[71303178,{"idx":10,"name":"sig-glove","tpage_name":"ldamsig-pris2"}],[73793538,{"idx":2,"name":"sewer-water-01-g-dest","tpage_name":"sewg-vis-water"}],[55115838,{"idx":62,"name":"common-gray-dark","tpage_name":"wascityb-vis-tfrag"}],[48955399,{"idx":7,"name":"sewer-pipe-01","tpage_name":"sewd-vis-shrub"}],[26542159,{"idx":79,"name":"wstd-floor-panel01","tpage_name":"wasstada-tfrag"}],[74514460,{"idx":28,"name":"widow-pod-gun-metal","tpage_name":"sewj-vis-pris"}],[81985540,{"idx":4,"name":"wstlander-01-gunmetal-04","tpage_name":"wasstadc-pris"}],[60948507,{"idx":27,"name":"minc-blue-paint-rust03","tpage_name":"minec-vis-tfrag"}],[73793539,{"idx":3,"name":"sewer-waterfall-02-g-dest","tpage_name":"sewg-vis-water"}],[71303179,{"idx":11,"name":"sig-glovetop","tpage_name":"ldamsig-pris2"}],[55115839,{"idx":63,"name":"city-slum-burning-can","tpage_name":"wascityb-vis-tfrag"}],[48955400,{"idx":8,"name":"sewer-pipe-rim-09","tpage_name":"sewd-vis-shrub"}],[26542160,{"idx":80,"name":"wstd-stands-shell01","tpage_name":"wasstada-tfrag"}],[60948508,{"idx":28,"name":"minc-crm-paint-wall-01","tpage_name":"minec-vis-tfrag"}],[48955401,{"idx":9,"name":"sewer-pipe-rim-02","tpage_name":"sewd-vis-shrub"}],[26542161,{"idx":81,"name":"wstd-stands-shell02","tpage_name":"wasstada-tfrag"}],[60948509,{"idx":29,"name":"mina-idol-02","tpage_name":"minec-vis-tfrag"}],[38862876,{"idx":28,"name":"nsta-cave-trim","tpage_name":"nsta-vis-tfrag"}],[48955402,{"idx":10,"name":"sewer-pipe-small-02","tpage_name":"sewd-vis-shrub"}],[26542162,{"idx":82,"name":"wstd-throne-plat03","tpage_name":"wasstada-tfrag"}],[60948510,{"idx":30,"name":"mina-idol-01","tpage_name":"minec-vis-tfrag"}],[38862877,{"idx":29,"name":"nsta-cave-trim-top","tpage_name":"nsta-vis-tfrag"}],[48955403,{"idx":11,"name":"sewer-grate-01","tpage_name":"sewd-vis-shrub"}],[26542163,{"idx":83,"name":"wstd-throne-plat02","tpage_name":"wasstada-tfrag"}],[60948511,{"idx":31,"name":"minc-metal-patch-01","tpage_name":"minec-vis-tfrag"}],[48955404,{"idx":12,"name":"sewer-pipe-02-edge-01","tpage_name":"sewd-vis-shrub"}],[26542164,{"idx":84,"name":"wstd-scaffold-strut","tpage_name":"wasstada-tfrag"}],[60948512,{"idx":32,"name":"minc-yel-paint-wall-01","tpage_name":"minec-vis-tfrag"}],[16121868,{"idx":12,"name":"city-farm-metal-panel-01","tpage_name":"ctyfarma-vis-tfrag"}],[48955405,{"idx":13,"name":"sewer-metal-04","tpage_name":"sewd-vis-shrub"}],[26542165,{"idx":85,"name":"wstd-stands-plate02","tpage_name":"wasstada-tfrag"}],[60948513,{"idx":33,"name":"minc-grill-01","tpage_name":"minec-vis-tfrag"}],[16121869,{"idx":13,"name":"city-farm-metal-panel-02","tpage_name":"ctyfarma-vis-tfrag"}],[26542166,{"idx":86,"name":"wstd-stands-lowall01","tpage_name":"wasstada-tfrag"}],[60948515,{"idx":35,"name":"minb-stone-edge","tpage_name":"minec-vis-tfrag"}],[16121871,{"idx":15,"name":"city-farm-dirtymetal-01","tpage_name":"ctyfarma-vis-tfrag"}],[26542168,{"idx":88,"name":"wstd-throne-arch01","tpage_name":"wasstada-tfrag"}],[60948516,{"idx":36,"name":"minb-stone20","tpage_name":"minec-vis-tfrag"}],[16121872,{"idx":16,"name":"city-farm-cart-woodslat-02","tpage_name":"ctyfarma-vis-tfrag"}],[71303188,{"idx":20,"name":"sig-metal-01","tpage_name":"ldamsig-pris2"}],[55115848,{"idx":72,"name":"wascityskeet-clay","tpage_name":"wascityb-vis-tfrag"}],[26542169,{"idx":89,"name":"wstd-throne-wall01","tpage_name":"wasstada-tfrag"}],[60948517,{"idx":37,"name":"minb-stone-tile","tpage_name":"minec-vis-tfrag"}],[16121873,{"idx":17,"name":"city-farm-dirt-mound-blend-01","tpage_name":"ctyfarma-vis-tfrag"}],[26542170,{"idx":90,"name":"wstd-stands-plate03","tpage_name":"wasstada-tfrag"}],[60948518,{"idx":38,"name":"minb-stone19","tpage_name":"minec-vis-tfrag"}],[16121874,{"idx":18,"name":"city-farm-dirt-small-01","tpage_name":"ctyfarma-vis-tfrag"}],[71303190,{"idx":22,"name":"sig-sac","tpage_name":"ldamsig-pris2"}],[55115850,{"idx":74,"name":"wascity-metal-ladder-rung","tpage_name":"wascityb-vis-tfrag"}],[106364939,{"idx":11,"name":"veger-coatclips","tpage_name":"mined-pris2"}],[90177599,{"idx":63,"name":"des-cactus-needle","tpage_name":"desertg-vis-pris"}],[26542171,{"idx":91,"name":"wstd-spear01","tpage_name":"wasstada-tfrag"}],[60948519,{"idx":39,"name":"minc-crate-02","tpage_name":"minec-vis-tfrag"}],[16121875,{"idx":19,"name":"city-farm-dirt-mound-01","tpage_name":"ctyfarma-vis-tfrag"}],[106364940,{"idx":12,"name":"veger-endpaper","tpage_name":"mined-pris2"}],[90177600,{"idx":64,"name":"des-cactus-small-01","tpage_name":"desertg-vis-pris"}],[55181312,{"idx":0,"name":"wascity-window-glass-01","tpage_name":"wascityb-vis-water"}],[26542172,{"idx":92,"name":"wstd-throne-chair01","tpage_name":"wasstada-tfrag"}],[16121876,{"idx":20,"name":"for-foliage","tpage_name":"ctyfarma-vis-tfrag"}],[106364941,{"idx":13,"name":"veger-eyelid","tpage_name":"mined-pris2"}],[90177601,{"idx":65,"name":"des-cactus-small-02","tpage_name":"desertg-vis-pris"}],[26542173,{"idx":93,"name":"wstd-stands-plate05","tpage_name":"wasstada-tfrag"}],[81985554,{"idx":18,"name":"marauder-gun-metal","tpage_name":"wasstadc-pris"}],[16121877,{"idx":21,"name":"city-farm-vegtree-bark-01","tpage_name":"ctyfarma-vis-tfrag"}],[55181314,{"idx":2,"name":"common-water-canal","tpage_name":"wascityb-vis-water"}],[26542174,{"idx":94,"name":"wstd-stands-plate04","tpage_name":"wasstada-tfrag"}],[81985555,{"idx":19,"name":"marauder-gun-part","tpage_name":"wasstadc-pris"}],[16121884,{"idx":28,"name":"city-farm-lamp","tpage_name":"ctyfarma-vis-tfrag"}],[26542181,{"idx":101,"name":"wstd-stands-ceilingplate","tpage_name":"wasstada-tfrag"}],[60620929,{"idx":129,"name":"jakc-skirt","tpage_name":"minea-vis-pris"}],[94240789,{"idx":21,"name":"city-lowres-ind-wall-04","tpage_name":"intpfall-vis-tfrag"}],[100466689,{"idx":1,"name":"monk-malepants","tpage_name":"wasseem-water"}],[16121886,{"idx":30,"name":"city-farm-rock","tpage_name":"ctyfarma-vis-tfrag"}],[71303203,{"idx":35,"name":"king-chest","tpage_name":"ldamsig-pris2"}],[55115863,{"idx":87,"name":"wascity-roof-1","tpage_name":"wascityb-vis-tfrag"}],[71303204,{"idx":36,"name":"king-clip-02","tpage_name":"ldamsig-pris2"}],[55115864,{"idx":88,"name":"wascity-chimney-hires","tpage_name":"wascityb-vis-tfrag"}],[71303205,{"idx":37,"name":"king-ear","tpage_name":"ldamsig-pris2"}],[55115865,{"idx":89,"name":"wascity-steps","tpage_name":"wascityb-vis-tfrag"}],[16121900,{"idx":44,"name":"citywide-wall-frame","tpage_name":"ctyfarma-vis-tfrag"}],[62652417,{"idx":1,"name":"bam-hairhilite","tpage_name":"ctypepa-pris"}],[26542197,{"idx":117,"name":"wstd-platform-base","tpage_name":"wasstada-tfrag"}],[16121901,{"idx":45,"name":"city-farm-road-blend-to-alpha-01","tpage_name":"ctyfarma-vis-tfrag"}],[62652418,{"idx":2,"name":"citfat-1-beard","tpage_name":"ctypepa-pris"}],[26542198,{"idx":118,"name":"wstd-platform-floor","tpage_name":"wasstada-tfrag"}],[75759679,{"idx":63,"name":"onin-neck","tpage_name":"onintent-pris"}],[81985579,{"idx":43,"name":"wstlander-02-head","tpage_name":"wasstadc-pris"}],[48562236,{"idx":60,"name":"jakc-wristband-a2","tpage_name":"sewa-vis-pris"}],[67239936,{"idx":0,"name":"common-black","tpage_name":"vinroom-vis-tfrag"}],[52297776,{"idx":48,"name":"freehq-wal-plate02","tpage_name":"freehq-tfrag"}],[61014036,{"idx":20,"name":"minc-blue-yel-paint-safe-rust04","tpage_name":"minec-vis-shrub"}],[8716312,{"idx":24,"name":"baron-neon-cheek-b","tpage_name":"ctysluma-sprite"}],[16187392,{"idx":0,"name":"city-farm-aquaduct-glass-01","tpage_name":"ctyfarma-vis-water"}],[67829763,{"idx":3,"name":"screen-00","tpage_name":"freehq-sprite"}],[71303170,{"idx":2,"name":"environment-oldmetal","tpage_name":"ldamsig-pris2"}],[48889930,{"idx":74,"name":"sewer-metal-edge-01","tpage_name":"sewd-vis-tfrag"}],[41615368,{"idx":8,"name":"gekko-fingers","tpage_name":"wascitya-vis-pris"}],[35389468,{"idx":28,"name":"cguard1-shouldershield","tpage_name":"introcst-pris"}],[41549826,{"idx":2,"name":"fora-water-dest","tpage_name":"wascitya-vis-water"}],[91291692,{"idx":44,"name":"gun-guncase-side-01","tpage_name":"gungame-vis-tfrag"}],[41615373,{"idx":13,"name":"gekko-nails","tpage_name":"wascitya-vis-pris"}],[35389473,{"idx":33,"name":"daxter-orange","tpage_name":"introcst-pris"}],[8060959,{"idx":31,"name":"baron-propoganda-logo","tpage_name":"ctywide-sprite"}],[11796499,{"idx":19,"name":"city-bigpipe-main-02","tpage_name":"ctyinda-vis-tfrag"}],[16777219,{"idx":3,"name":"bam-eyelight","tpage_name":"ctyfarmb-vis-pris"}],[49283150,{"idx":78,"name":"cguardgame-metaledark-02","tpage_name":"sewd-vis-pris"}],[11796500,{"idx":20,"name":"city-ind-bigpipe-siding","tpage_name":"ctyinda-vis-tfrag"}],[16777220,{"idx":4,"name":"yak-eye","tpage_name":"ctyfarmb-vis-pris"}],[11796501,{"idx":21,"name":"city-green-pipe01","tpage_name":"ctyinda-vis-tfrag"}],[16777221,{"idx":5,"name":"yak-horn","tpage_name":"ctyfarmb-vis-pris"}],[74186752,{"idx":0,"name":"sew-gun-barrel-01","tpage_name":"sewh-vis-pris"}],[49283152,{"idx":80,"name":"cguardgame-metallight-01small","tpage_name":"sewd-vis-pris"}],[74186754,{"idx":2,"name":"sew-gun-drum-01","tpage_name":"sewh-vis-pris"}],[49283154,{"idx":82,"name":"cguardgame-shoebottom","tpage_name":"sewd-vis-pris"}],[28049413,{"idx":5,"name":"tpal-horiz-trim01","tpage_name":"intpalrf-tfrag"}],[94371901,{"idx":61,"name":"palace-break-scabel1","tpage_name":"intpfall-vis-pris"}],[16842752,{"idx":0,"name":"city-farm-shrub-overhang","tpage_name":"ctyfarmb-vis-shrub"}],[118620162,{"idx":2,"name":"environment-oldmetal","tpage_name":"ljkcdmkl-pris"}],[106168362,{"idx":42,"name":"minc-safe-plate-02","tpage_name":"mined-tfrag"}],[112394262,{"idx":22,"name":"intcept-base-green01","tpage_name":"desrescg-pris"}],[35651612,{"idx":28,"name":"ashelin-whitestrap","tpage_name":"introcst-pris2"}],[28049414,{"idx":6,"name":"tpal-piller-caps02","tpage_name":"intpalrf-tfrag"}],[94371902,{"idx":62,"name":"palace-break-sdanger1","tpage_name":"intpfall-vis-pris"}],[16842753,{"idx":1,"name":"city-farm-shrub-overhang-02","tpage_name":"ctyfarmb-vis-shrub"}],[56950882,{"idx":98,"name":"waspala-lowres-desert-mount-01","tpage_name":"waspala-tfrag"}],[118620163,{"idx":3,"name":"jakc-armor","tpage_name":"ljkcdmkl-pris"}],[106168363,{"idx":43,"name":"minc-blue-paint-rust01","tpage_name":"mined-tfrag"}],[112394263,{"idx":23,"name":"intcept-base-patern01","tpage_name":"desrescg-pris"}],[35651613,{"idx":29,"name":"bam-eyelight","tpage_name":"introcst-pris2"}],[28049415,{"idx":7,"name":"tpal-beam01","tpage_name":"intpalrf-tfrag"}],[94371903,{"idx":63,"name":"palace-break-sdanger2","tpage_name":"intpfall-vis-pris"}],[16842754,{"idx":2,"name":"city-farm-stain-01","tpage_name":"ctyfarmb-vis-shrub"}],[79364232,{"idx":136,"name":"monk-finger","tpage_name":"wasseem-pris"}],[56950883,{"idx":99,"name":"common_sandstone_taper01","tpage_name":"waspala-tfrag"}],[118620164,{"idx":4,"name":"jakc-chestplate-straps","tpage_name":"ljkcdmkl-pris"}],[106168364,{"idx":44,"name":"minc-train-pipe-gen-01","tpage_name":"mined-tfrag"}],[112394264,{"idx":24,"name":"intcept-base-patern02","tpage_name":"desrescg-pris"}],[35651614,{"idx":30,"name":"bam-hairhilite","tpage_name":"introcst-pris2"}],[11796485,{"idx":5,"name":"city-ind-wall-01","tpage_name":"ctyinda-vis-tfrag"}],[589865,{"idx":41,"name":"hud-scoreboard-01","tpage_name":"level-default-minimap"}],[28049416,{"idx":8,"name":"tpal-beam-red01","tpage_name":"intpalrf-tfrag"}],[94371904,{"idx":64,"name":"palace-break-spanel-1","tpage_name":"intpfall-vis-pris"}],[16842755,{"idx":3,"name":"city-farm-stain-02","tpage_name":"ctyfarmb-vis-shrub"}],[120455173,{"idx":5,"name":"sewer-concrete-edge-02","tpage_name":"forestx-vis-tfrag"}],[79364233,{"idx":137,"name":"monk-gem","tpage_name":"wasseem-pris"}],[56950884,{"idx":100,"name":"common_sandstone_ground01","tpage_name":"waspala-tfrag"}],[118620165,{"idx":5,"name":"jakc-gogglemetal","tpage_name":"ljkcdmkl-pris"}],[112394265,{"idx":25,"name":"intcept-gun01","tpage_name":"desrescg-pris"}],[35651615,{"idx":31,"name":"environment-oldmetal","tpage_name":"introcst-pris2"}],[11796486,{"idx":6,"name":"city-ind-wall-band-vent-01","tpage_name":"ctyinda-vis-tfrag"}],[589866,{"idx":42,"name":"hud-timerboard-01","tpage_name":"level-default-minimap"}],[28049417,{"idx":9,"name":"tpal-beam-red-yellow01","tpage_name":"intpalrf-tfrag"}],[94371905,{"idx":65,"name":"palace-break-spanel-2","tpage_name":"intpfall-vis-pris"}],[16842756,{"idx":4,"name":"city-farm-ground-stain-01","tpage_name":"ctyfarmb-vis-shrub"}],[120455174,{"idx":6,"name":"sewer-metal-block-06","tpage_name":"forestx-vis-tfrag"}],[79364234,{"idx":138,"name":"monk-goggleleather","tpage_name":"wasseem-pris"}],[35651616,{"idx":32,"name":"samos-arm","tpage_name":"introcst-pris2"}],[11796487,{"idx":7,"name":"city-ind-wall-band-plain-01","tpage_name":"ctyinda-vis-tfrag"}],[589867,{"idx":43,"name":"hud-transparent-01","tpage_name":"level-default-minimap"}],[28049418,{"idx":10,"name":"tpal-panl02","tpage_name":"intpalrf-tfrag"}],[16842757,{"idx":5,"name":"city-farm-wall-vine","tpage_name":"ctyfarmb-vis-shrub"}],[120455175,{"idx":7,"name":"sewer-metal-block-04","tpage_name":"forestx-vis-tfrag"}],[79364235,{"idx":139,"name":"monk-goggles","tpage_name":"wasseem-pris"}],[56950886,{"idx":102,"name":"common_sandstone_pill01","tpage_name":"waspala-tfrag"}],[118620167,{"idx":7,"name":"jakc-scarf","tpage_name":"ljkcdmkl-pris"}],[106168367,{"idx":47,"name":"mined_red_cgtd","tpage_name":"mined-tfrag"}],[112394267,{"idx":27,"name":"intcept-teeth01","tpage_name":"desrescg-pris"}],[35651617,{"idx":33,"name":"samos-diaper","tpage_name":"introcst-pris2"}],[11796488,{"idx":8,"name":"city-ind-door-large-01","tpage_name":"ctyinda-vis-tfrag"}],[589868,{"idx":44,"name":"minimap-mask","tpage_name":"level-default-minimap"}],[28049419,{"idx":11,"name":"tpal-wind-glass-01","tpage_name":"intpalrf-tfrag"}],[94371907,{"idx":67,"name":"palace-break-spanel-4","tpage_name":"intpfall-vis-pris"}],[16842758,{"idx":6,"name":"city-farm-cattail-grass","tpage_name":"ctyfarmb-vis-shrub"}],[120455176,{"idx":8,"name":"forx-mount-glass01","tpage_name":"forestx-vis-tfrag"}],[79364236,{"idx":140,"name":"monk-goldjewel","tpage_name":"wasseem-pris"}],[35651618,{"idx":34,"name":"samos-ear","tpage_name":"introcst-pris2"}],[11796489,{"idx":9,"name":"city-ind-wall-base-03","tpage_name":"ctyinda-vis-tfrag"}],[589869,{"idx":45,"name":"mini-map-icons","tpage_name":"level-default-minimap"}],[67829760,{"idx":0,"name":"vinroom-tv-circle","tpage_name":"freehq-sprite"}],[28049420,{"idx":12,"name":"tpal-wind-fram-01","tpage_name":"intpalrf-tfrag"}],[94371908,{"idx":68,"name":"palace-break-spanel-5","tpage_name":"intpfall-vis-pris"}],[16842759,{"idx":7,"name":"city-farm-blotch-withstreaks-01","tpage_name":"ctyfarmb-vis-shrub"}],[120455177,{"idx":9,"name":"forx-citywall-frame","tpage_name":"forestx-vis-tfrag"}],[79364237,{"idx":141,"name":"monk-hair-a","tpage_name":"wasseem-pris"}],[35651619,{"idx":35,"name":"samos-eye","tpage_name":"introcst-pris2"}],[11796490,{"idx":10,"name":"city-ind-door-top-01","tpage_name":"ctyinda-vis-tfrag"}],[589870,{"idx":46,"name":"map-guard-frustum","tpage_name":"level-default-minimap"}],[67829762,{"idx":2,"name":"holo-line","tpage_name":"freehq-sprite"}],[16842761,{"idx":9,"name":"city-farm-veg-chilberry","tpage_name":"ctyfarmb-vis-shrub"}],[120455179,{"idx":11,"name":"fora-rock-small","tpage_name":"forestx-vis-tfrag"}],[79364239,{"idx":143,"name":"monk-hand","tpage_name":"wasseem-pris"}],[35651621,{"idx":37,"name":"samos-face","tpage_name":"introcst-pris2"}],[28049423,{"idx":15,"name":"tpal-big-metal-panl01","tpage_name":"intpalrf-tfrag"}],[94371911,{"idx":71,"name":"palace-break-spike03","tpage_name":"intpfall-vis-pris"}],[16842762,{"idx":10,"name":"city-farm-flowers","tpage_name":"ctyfarmb-vis-shrub"}],[79364240,{"idx":144,"name":"monk-jewelry","tpage_name":"wasseem-pris"}],[35651622,{"idx":38,"name":"samos-finger-01","tpage_name":"introcst-pris2"}],[60620885,{"idx":85,"name":"mine-pipe-metal-01","tpage_name":"minea-vis-pris"}],[104857605,{"idx":5,"name":"daxterarm","tpage_name":"oasiscst-pris"}],[117637217,{"idx":97,"name":"jakchires-eyelid","tpage_name":"destrack-pris"}],[16908294,{"idx":6,"name":"city-farm-stone-border-02","tpage_name":"ctyfarmb-vis-tfrag"}],[60948542,{"idx":62,"name":"fora-citywall-frame","tpage_name":"minec-vis-tfrag"}],[75890702,{"idx":14,"name":"onin-cage-top","tpage_name":"onintent-tfrag"}],[35389639,{"idx":199,"name":"klever-handwrap","tpage_name":"introcst-pris"}],[35389640,{"idx":200,"name":"klever-armor-01","tpage_name":"introcst-pris"}],[76480587,{"idx":75,"name":"jakc-chestplate-straps","tpage_name":"freehq-pris"}],[35389647,{"idx":207,"name":"klever-gunmetal-04","tpage_name":"introcst-pris"}],[76480588,{"idx":76,"name":"jakc-gogglemetal","tpage_name":"freehq-pris"}],[35389648,{"idx":208,"name":"klever-gunmetal-05","tpage_name":"introcst-pris"}],[17563658,{"idx":10,"name":"hiphog-exterior-purple","tpage_name":"ctyport-sprite"}],[76480589,{"idx":77,"name":"jakc-lens","tpage_name":"freehq-pris"}],[35389649,{"idx":209,"name":"klever-hand","tpage_name":"introcst-pris"}],[11337759,{"idx":31,"name":"ctyslumc-decal-02","tpage_name":"ctyslumc-vis-shrub"}],[17563659,{"idx":11,"name":"hiphog-exterior-purple-on","tpage_name":"ctyport-sprite"}],[76480590,{"idx":78,"name":"jakc-scarf","tpage_name":"freehq-pris"}],[35389650,{"idx":210,"name":"klever-horn","tpage_name":"introcst-pris"}],[8912943,{"idx":47,"name":"city-fort-grey-trim","tpage_name":"ctysluma-vis-tfrag"}],[11403303,{"idx":39,"name":"common-black","tpage_name":"ctyslumc-vis-tfrag"}],[11337760,{"idx":32,"name":"cityslumc-grass","tpage_name":"ctyslumc-vis-shrub"}],[17563660,{"idx":12,"name":"hiphog-exterior-yellow","tpage_name":"ctyport-sprite"}],[76480591,{"idx":79,"name":"jakc-waistband2","tpage_name":"freehq-pris"}],[35389651,{"idx":211,"name":"klever-shoe","tpage_name":"introcst-pris"}],[62652447,{"idx":31,"name":"citn-allhair","tpage_name":"ctypepa-pris"}],[458785,{"idx":33,"name":"gun-yellow-mag","tpage_name":"level-default-pris"}],[17825803,{"idx":11,"name":"mechdax-eye","tpage_name":"ctyport-vis-pris"}],[49020992,{"idx":64,"name":"sewer-small-light-01","tpage_name":"sewe-vis-tfrag"}],[62717972,{"idx":20,"name":"cguardgame-scarf","tpage_name":"ctypesa-pris"}],[17891328,{"idx":0,"name":"city-port-stain-01","tpage_name":"ctyport-vis-shrub"}],[81985546,{"idx":10,"name":"wstlander-01-shoetop","tpage_name":"wasstadc-pris"}],[79495186,{"idx":18,"name":"des-mount-02","tpage_name":"wasintro-vis-tfrag"}],[49020993,{"idx":65,"name":"sewer-brick-roof-03","tpage_name":"sewe-vis-tfrag"}],[62717973,{"idx":21,"name":"cguardgame-shoebottom","tpage_name":"ctypesa-pris"}],[17891329,{"idx":1,"name":"city-port-stain-02","tpage_name":"ctyport-vis-shrub"}],[81985547,{"idx":11,"name":"wstlander-01-shoulderarmor","tpage_name":"wasstadc-pris"}],[79495187,{"idx":19,"name":"des-mount-bottom-01","tpage_name":"wasintro-vis-tfrag"}],[49020994,{"idx":66,"name":"sewer-brick-roof-01","tpage_name":"sewe-vis-tfrag"}],[62717974,{"idx":22,"name":"cguardgame-shouldershield","tpage_name":"ctypesa-pris"}],[17891330,{"idx":2,"name":"city-port-blotch-withstreaks-01","tpage_name":"ctyport-vis-shrub"}],[58654804,{"idx":84,"name":"screen-08","tpage_name":"hiphog-sprite"}],[71106604,{"idx":44,"name":"dummy-blade-01","tpage_name":"wasstadb-tfrag"}],[38731924,{"idx":148,"name":"female1_04","tpage_name":"wasstada-sprite"}],[81985548,{"idx":12,"name":"wstlander-01-skirt","tpage_name":"wasstadc-pris"}],[79495188,{"idx":20,"name":"des-cliff-trans-01","tpage_name":"wasintro-vis-tfrag"}],[49020995,{"idx":67,"name":"sewer-block-02-hitweak","tpage_name":"sewe-vis-tfrag"}],[62717975,{"idx":23,"name":"cguardgame-sleeve","tpage_name":"ctypesa-pris"}],[17891331,{"idx":3,"name":"city-port-canopyarm-swivel-sides","tpage_name":"ctyport-vis-shrub"}],[58654805,{"idx":85,"name":"screen-09","tpage_name":"hiphog-sprite"}],[71106605,{"idx":45,"name":"dummy-white-bar-01","tpage_name":"wasstadb-tfrag"}],[73596965,{"idx":37,"name":"sewer-metal-block-02","tpage_name":"sewi-vis-tfrag"}],[38731925,{"idx":149,"name":"female1_05","tpage_name":"wasstada-sprite"}],[81985549,{"idx":13,"name":"wstlander-01-wrap","tpage_name":"wasstadc-pris"}],[79495189,{"idx":21,"name":"des-cliff-top-03","tpage_name":"wasintro-vis-tfrag"}],[17891332,{"idx":4,"name":"city-port-bigpipe-ring-side","tpage_name":"ctyport-vis-shrub"}],[58654806,{"idx":86,"name":"screen-10","tpage_name":"hiphog-sprite"}],[71106606,{"idx":46,"name":"dummy-eye-01","tpage_name":"wasstadb-tfrag"}],[73596966,{"idx":38,"name":"sewer-pipe-02","tpage_name":"sewi-vis-tfrag"}],[38731926,{"idx":150,"name":"female1_06","tpage_name":"wasstada-sprite"}],[81985550,{"idx":14,"name":"marauder-belt","tpage_name":"wasstadc-pris"}],[79495190,{"idx":22,"name":"des-rock-01","tpage_name":"wasintro-vis-tfrag"}],[49020997,{"idx":69,"name":"sewer-grill-02","tpage_name":"sewe-vis-tfrag"}],[62717977,{"idx":25,"name":"darkguard-armshield","tpage_name":"ctypesa-pris"}],[17891333,{"idx":5,"name":"city-port-grease-stain-ground","tpage_name":"ctyport-vis-shrub"}],[81985551,{"idx":15,"name":"marauder-blade","tpage_name":"wasstadc-pris"}],[79495191,{"idx":23,"name":"des-cliff-top-01","tpage_name":"wasintro-vis-tfrag"}],[49020998,{"idx":70,"name":"sewer-metal-trim-01","tpage_name":"sewe-vis-tfrag"}],[62717978,{"idx":26,"name":"darkguard-headshield","tpage_name":"ctypesa-pris"}],[17891334,{"idx":6,"name":"city-port-decal-03","tpage_name":"ctyport-vis-shrub"}],[81985552,{"idx":16,"name":"marauder-blade-joint","tpage_name":"wasstadc-pris"}],[79495192,{"idx":24,"name":"des-cliff-01","tpage_name":"wasintro-vis-tfrag"}],[49020999,{"idx":71,"name":"sewer-metal-block-02","tpage_name":"sewe-vis-tfrag"}],[62717979,{"idx":27,"name":"darkguard-scarf","tpage_name":"ctypesa-pris"}],[17891335,{"idx":7,"name":"city-port-decal-02","tpage_name":"ctyport-vis-shrub"}],[81985553,{"idx":17,"name":"marauder-gun-blade","tpage_name":"wasstadc-pris"}],[79495193,{"idx":25,"name":"des-cliff-top-02","tpage_name":"wasintro-vis-tfrag"}],[71434241,{"idx":1,"name":"wstd-floor-panel02","tpage_name":"wasstadc-tfrag"}],[62717981,{"idx":29,"name":"environment-oldmetal","tpage_name":"ctypesa-pris"}],[458817,{"idx":65,"name":"sk-bodyfur","tpage_name":"level-default-pris"}],[17891337,{"idx":9,"name":"city-port-tbolt","tpage_name":"ctyport-vis-shrub"}],[58654811,{"idx":91,"name":"screen-15","tpage_name":"hiphog-sprite"}],[71106611,{"idx":51,"name":"dummy-white-01","tpage_name":"wasstadb-tfrag"}],[73596971,{"idx":43,"name":"sewer-pipe-rim-09","tpage_name":"sewi-vis-tfrag"}],[38731931,{"idx":155,"name":"female1_11","tpage_name":"wasstada-sprite"}],[458818,{"idx":66,"name":"sk-ear","tpage_name":"level-default-pris"}],[17891338,{"idx":10,"name":"city-port-decal-04","tpage_name":"ctyport-vis-shrub"}],[58654812,{"idx":92,"name":"vinroom-tv-radar","tpage_name":"hiphog-sprite"}],[38731932,{"idx":156,"name":"female1_12","tpage_name":"wasstada-sprite"}],[458819,{"idx":67,"name":"sk-eye-lid","tpage_name":"level-default-pris"}],[17891339,{"idx":11,"name":"city-port-boltl-stain-roundl","tpage_name":"ctyport-vis-shrub"}],[58654813,{"idx":93,"name":"vinroom-small-monitor-01","tpage_name":"hiphog-sprite"}],[71106613,{"idx":53,"name":"dummy-env-01","tpage_name":"wasstadb-tfrag"}],[38731933,{"idx":157,"name":"female1_13","tpage_name":"wasstada-sprite"}],[458820,{"idx":68,"name":"sk-finger","tpage_name":"level-default-pris"}],[17891340,{"idx":12,"name":"city-port-decal-01","tpage_name":"ctyport-vis-shrub"}],[58654814,{"idx":94,"name":"vinroom-small-monitor-02","tpage_name":"hiphog-sprite"}],[71106614,{"idx":54,"name":"dummy-red-01","tpage_name":"wasstadb-tfrag"}],[73596974,{"idx":46,"name":"sewer-pool-rim-02","tpage_name":"sewi-vis-tfrag"}],[38731934,{"idx":158,"name":"female1_14","tpage_name":"wasstada-sprite"}],[458821,{"idx":69,"name":"sk-orange2yellowfur","tpage_name":"level-default-pris"}],[17891341,{"idx":13,"name":"city-ind-overlay-bullethole-a","tpage_name":"ctyport-vis-shrub"}],[58654815,{"idx":95,"name":"vinroom-small-monitor-03","tpage_name":"hiphog-sprite"}],[71106615,{"idx":55,"name":"wstd-scaffold-bar","tpage_name":"wasstadb-tfrag"}],[73596975,{"idx":47,"name":"sewer-lip-01","tpage_name":"sewi-vis-tfrag"}],[38731935,{"idx":159,"name":"female1_15","tpage_name":"wasstada-sprite"}],[81985559,{"idx":23,"name":"marauder-leather-brown","tpage_name":"wasstadc-pris"}],[79495199,{"idx":31,"name":"des-wascity-outerwall-metal-b","tpage_name":"wasintro-vis-tfrag"}],[458822,{"idx":70,"name":"sk-shinywhite","tpage_name":"level-default-pris"}],[17891342,{"idx":14,"name":"city-ind-overlay-bullethole-b","tpage_name":"ctyport-vis-shrub"}],[58654816,{"idx":96,"name":"vinroom-small-monitor-04","tpage_name":"hiphog-sprite"}],[73596976,{"idx":48,"name":"sewer-plate-04","tpage_name":"sewi-vis-tfrag"}],[38731936,{"idx":160,"name":"female1_16","tpage_name":"wasstada-sprite"}],[81985560,{"idx":24,"name":"marauder-leather-buckle","tpage_name":"wasstadc-pris"}],[79495200,{"idx":32,"name":"des-wascity-palace-siding-01","tpage_name":"wasintro-vis-tfrag"}],[458823,{"idx":71,"name":"sk-solidorangefur","tpage_name":"level-default-pris"}],[17891343,{"idx":15,"name":"city-ind-overlay-bullethole-c","tpage_name":"ctyport-vis-shrub"}],[58654817,{"idx":97,"name":"vinroom-small-monitor-05","tpage_name":"hiphog-sprite"}],[73596977,{"idx":49,"name":"sewer-flat-pipe-01","tpage_name":"sewi-vis-tfrag"}],[38731937,{"idx":161,"name":"female1_17","tpage_name":"wasstada-sprite"}],[81985561,{"idx":25,"name":"marauder-leather-handle","tpage_name":"wasstadc-pris"}],[79495201,{"idx":33,"name":"des-wascity-cement-road","tpage_name":"wasintro-vis-tfrag"}],[458824,{"idx":72,"name":"sk-yellowfurnew","tpage_name":"level-default-pris"}],[17891344,{"idx":16,"name":"city-inda-scorch-big","tpage_name":"ctyport-vis-shrub"}],[71106618,{"idx":58,"name":"wstd-stands-shell02","tpage_name":"wasstadb-tfrag"}],[58654818,{"idx":98,"name":"vinroom-small-monitor-06","tpage_name":"hiphog-sprite"}],[73596978,{"idx":50,"name":"sewer-pipe-rim-03","tpage_name":"sewi-vis-tfrag"}],[38731938,{"idx":162,"name":"female1_18","tpage_name":"wasstada-sprite"}],[81985562,{"idx":26,"name":"marauder-leather-part","tpage_name":"wasstadc-pris"}],[79495202,{"idx":34,"name":"des-wascity-outerwall-metal-d","tpage_name":"wasintro-vis-tfrag"}],[458825,{"idx":73,"name":"talkbox-body-01","tpage_name":"level-default-pris"}],[17891345,{"idx":17,"name":"city-inda-scorch-small","tpage_name":"ctyport-vis-shrub"}],[58654819,{"idx":99,"name":"vinroom-small-monitor-07","tpage_name":"hiphog-sprite"}],[73596979,{"idx":51,"name":"sewer-scaffold-02","tpage_name":"sewi-vis-tfrag"}],[38731939,{"idx":163,"name":"female1_19","tpage_name":"wasstada-sprite"}],[458831,{"idx":79,"name":"talkbox-body-07","tpage_name":"level-default-pris"}],[17891351,{"idx":23,"name":"city-port-small-metal-highlite","tpage_name":"ctyport-vis-shrub"}],[458832,{"idx":80,"name":"talkbox-body-08","tpage_name":"level-default-pris"}],[17891352,{"idx":24,"name":"city-port-wallbase","tpage_name":"ctyport-vis-shrub"}],[60620890,{"idx":90,"name":"mine-under-metal-01","tpage_name":"minea-vis-pris"}],[88014850,{"idx":2,"name":"sig-skirts-02","tpage_name":"lwassig-pris"}],[458833,{"idx":81,"name":"talkbox-grill-01","tpage_name":"level-default-pris"}],[17891353,{"idx":25,"name":"city-port-roofmetal-rim","tpage_name":"ctyport-vis-shrub"}],[60620891,{"idx":91,"name":"mine-white-stripe-metal-01","tpage_name":"minea-vis-pris"}],[88014851,{"idx":3,"name":"sig2-belt","tpage_name":"lwassig-pris"}],[458834,{"idx":82,"name":"talkbox-light-01","tpage_name":"level-default-pris"}],[17891354,{"idx":26,"name":"kgtrns-side01","tpage_name":"ctyport-vis-shrub"}],[60620892,{"idx":92,"name":"mine-blue-metal-01","tpage_name":"minea-vis-pris"}],[88014852,{"idx":4,"name":"sig2-eyestillsmall","tpage_name":"lwassig-pris"}],[92274688,{"idx":0,"name":"intcept-base-green01","tpage_name":"desrace2-pris"}],[73596988,{"idx":60,"name":"sewer-plate-01","tpage_name":"sewi-vis-tfrag"}],[38731948,{"idx":172,"name":"femcher2_07","tpage_name":"wasstada-sprite"}],[458835,{"idx":83,"name":"talkbox-light-02","tpage_name":"level-default-pris"}],[17891355,{"idx":27,"name":"kgtrns-wing01","tpage_name":"ctyport-vis-shrub"}],[60620893,{"idx":93,"name":"mine-metal-wheel-01","tpage_name":"minea-vis-pris"}],[88014853,{"idx":5,"name":"sig2-faceleft","tpage_name":"lwassig-pris"}],[92274689,{"idx":1,"name":"intcept-base-patern01","tpage_name":"desrace2-pris"}],[73596989,{"idx":61,"name":"sewer-hall-light-01","tpage_name":"sewi-vis-tfrag"}],[38731949,{"idx":173,"name":"femcher2_08","tpage_name":"wasstada-sprite"}],[458836,{"idx":84,"name":"talkbox-orange-01","tpage_name":"level-default-pris"}],[17891356,{"idx":28,"name":"kgtrns-box01","tpage_name":"ctyport-vis-shrub"}],[60620894,{"idx":94,"name":"mine-red-paint-rust05","tpage_name":"minea-vis-pris"}],[88014854,{"idx":6,"name":"sig2-facert","tpage_name":"lwassig-pris"}],[458837,{"idx":85,"name":"jakc-arm","tpage_name":"level-default-pris"}],[17891357,{"idx":29,"name":"kgtrns-topjet01","tpage_name":"ctyport-vis-shrub"}],[60620895,{"idx":95,"name":"mine-rust-01","tpage_name":"minea-vis-pris"}],[88014855,{"idx":7,"name":"sig2-flask","tpage_name":"lwassig-pris"}],[589887,{"idx":63,"name":"hud-gunred-02a","tpage_name":"level-default-minimap"}],[16777227,{"idx":11,"name":"yak-nose","tpage_name":"ctyfarmb-vis-pris"}],[11796507,{"idx":27,"name":"city-ind-wall-noisy-border-05","tpage_name":"ctyinda-vis-tfrag"}],[16711684,{"idx":4,"name":"city-farm-road-end-blend-to-alpha","tpage_name":"ctyfarmb-vis-alpha"}],[17956864,{"idx":0,"name":"city-port-seawalll-front","tpage_name":"ctyport-vis-tfrag"}],[67829813,{"idx":53,"name":"onin-magic-bigpuff","tpage_name":"freehq-sprite"}],[16777228,{"idx":12,"name":"city-farm-beettree-blossom","tpage_name":"ctyfarmb-vis-pris"}],[589888,{"idx":64,"name":"hud-gunred-03a","tpage_name":"level-default-minimap"}],[11796508,{"idx":28,"name":"city-ind-wall-noisy-04","tpage_name":"ctyinda-vis-tfrag"}],[115081250,{"idx":34,"name":"terraformer-jewels","tpage_name":"desboss1-pris"}],[17956865,{"idx":1,"name":"city-port-seawalll-lip","tpage_name":"ctyport-vis-tfrag"}],[16777229,{"idx":13,"name":"city-farm-beettree-bulb","tpage_name":"ctyfarmb-vis-pris"}],[589889,{"idx":65,"name":"hud-gunred-common-01","tpage_name":"level-default-minimap"}],[11796509,{"idx":29,"name":"city-ind-wall-noisy-border-02","tpage_name":"ctyinda-vis-tfrag"}],[115081251,{"idx":35,"name":"bam-eyelight","tpage_name":"desboss1-pris"}],[17956866,{"idx":2,"name":"city-port-seam-side-metal-plain","tpage_name":"ctyport-vis-tfrag"}],[16777230,{"idx":14,"name":"city-farm-beettree-trunk","tpage_name":"ctyfarmb-vis-pris"}],[589890,{"idx":66,"name":"hud-gunyellow-01a","tpage_name":"level-default-minimap"}],[11796510,{"idx":30,"name":"city-ind-wall-noisy-01","tpage_name":"ctyinda-vis-tfrag"}],[126287872,{"idx":0,"name":"airlock-door-bolt","tpage_name":"sewo-vis-pris"}],[115081252,{"idx":36,"name":"bam-hairhilite","tpage_name":"desboss1-pris"}],[17956867,{"idx":3,"name":"city-port-seawalll","tpage_name":"ctyport-vis-tfrag"}],[16777231,{"idx":15,"name":"city-farm-cabmain","tpage_name":"ctyfarmb-vis-pris"}],[589891,{"idx":67,"name":"hud-gunyellow-02a","tpage_name":"level-default-minimap"}],[11796511,{"idx":31,"name":"city-ind-buldge-light-01","tpage_name":"ctyinda-vis-tfrag"}],[126287873,{"idx":1,"name":"airlock-door-cog","tpage_name":"sewo-vis-pris"}],[115081253,{"idx":37,"name":"daxter-eyelid","tpage_name":"desboss1-pris"}],[17956868,{"idx":4,"name":"city-port-grnd-cobl-01","tpage_name":"ctyport-vis-tfrag"}],[16777232,{"idx":16,"name":"city-farm-veg-chilberry-02","tpage_name":"ctyfarmb-vis-pris"}],[589892,{"idx":68,"name":"hud-gunyellow-03a","tpage_name":"level-default-minimap"}],[11796512,{"idx":32,"name":"city-ind-buldge-light-self-illuminated-01","tpage_name":"ctyinda-vis-tfrag"}],[126287874,{"idx":2,"name":"airlock-door-main","tpage_name":"sewo-vis-pris"}],[115081254,{"idx":38,"name":"daxter-furhilite","tpage_name":"desboss1-pris"}],[17956869,{"idx":5,"name":"city-port-seam-metal","tpage_name":"ctyport-vis-tfrag"}],[16777233,{"idx":17,"name":"city-farm-veg-green-2","tpage_name":"ctyfarmb-vis-pris"}],[589893,{"idx":69,"name":"hud-gunyellow-03b","tpage_name":"level-default-minimap"}],[11796513,{"idx":33,"name":"city-port-metal-green-main-side","tpage_name":"ctyinda-vis-tfrag"}],[126287875,{"idx":3,"name":"airlock-door-metal2","tpage_name":"sewo-vis-pris"}],[115081255,{"idx":39,"name":"daxter-orange","tpage_name":"desboss1-pris"}],[17956870,{"idx":6,"name":"city-port-seam-main-metal","tpage_name":"ctyport-vis-tfrag"}],[16777234,{"idx":18,"name":"city-farm-veg-leaf-1","tpage_name":"ctyfarmb-vis-pris"}],[589894,{"idx":70,"name":"hud-gunyellow-common-01","tpage_name":"level-default-minimap"}],[11796514,{"idx":34,"name":"city-ind-wall-noisy-border-01","tpage_name":"ctyinda-vis-tfrag"}],[126287876,{"idx":4,"name":"airlockl-door-metalframe","tpage_name":"sewo-vis-pris"}],[115081256,{"idx":40,"name":"daxterarm","tpage_name":"desboss1-pris"}],[17956871,{"idx":7,"name":"city-port-tower-balcony-under","tpage_name":"ctyport-vis-tfrag"}],[16777235,{"idx":19,"name":"city-farm-mar-leaf-02","tpage_name":"ctyfarmb-vis-pris"}],[589895,{"idx":71,"name":"hud-arrow-down-02","tpage_name":"level-default-minimap"}],[11796515,{"idx":35,"name":"city-ind-catwalk-coping-01","tpage_name":"ctyinda-vis-tfrag"}],[126287877,{"idx":5,"name":"airlock-door-cog1","tpage_name":"sewo-vis-pris"}],[115081257,{"idx":41,"name":"daxterbodyshort-eix","tpage_name":"desboss1-pris"}],[17956872,{"idx":8,"name":"city-port-bridge-top","tpage_name":"ctyport-vis-tfrag"}],[126287878,{"idx":6,"name":"grunt-eye-01","tpage_name":"sewo-vis-pris"}],[115081258,{"idx":42,"name":"daxterbolt","tpage_name":"desboss1-pris"}],[17956873,{"idx":9,"name":"city-port-metal-block-02","tpage_name":"ctyport-vis-tfrag"}],[16777237,{"idx":21,"name":"city-farm-veg-cablip","tpage_name":"ctyfarmb-vis-pris"}],[589897,{"idx":73,"name":"hud-arrow-left-02","tpage_name":"level-default-minimap"}],[11796517,{"idx":37,"name":"city-ind-wall-07","tpage_name":"ctyinda-vis-tfrag"}],[126287879,{"idx":7,"name":"grunt-gem-01","tpage_name":"sewo-vis-pris"}],[115081259,{"idx":43,"name":"daxterear","tpage_name":"desboss1-pris"}],[17956874,{"idx":10,"name":"city-port-metal-rim-01","tpage_name":"ctyport-vis-tfrag"}],[16777238,{"idx":22,"name":"city-farm-sprinkle-metal","tpage_name":"ctyfarmb-vis-pris"}],[589898,{"idx":74,"name":"hud-arrow-left-02-lit","tpage_name":"level-default-minimap"}],[11796518,{"idx":38,"name":"city-ind-litwindow-TOP-03","tpage_name":"ctyinda-vis-tfrag"}],[115081260,{"idx":44,"name":"daxterfinger","tpage_name":"desboss1-pris"}],[17956875,{"idx":11,"name":"city-port-bigtop-underside","tpage_name":"ctyport-vis-tfrag"}],[16777239,{"idx":23,"name":"city-farm-sprinkle-metal-dirt","tpage_name":"ctyfarmb-vis-pris"}],[589899,{"idx":75,"name":"hud-arrow-right-02","tpage_name":"level-default-minimap"}],[11796519,{"idx":39,"name":"cty-ind-catwalk-panels","tpage_name":"ctyinda-vis-tfrag"}],[126287881,{"idx":9,"name":"grunt-metal-01","tpage_name":"sewo-vis-pris"}],[115081261,{"idx":45,"name":"daxterfoot","tpage_name":"desboss1-pris"}],[8060938,{"idx":10,"name":"ticker-a","tpage_name":"ctywide-sprite"}],[589858,{"idx":34,"name":"hud-mapring-01","tpage_name":"level-default-minimap"}],[35651607,{"idx":23,"name":"ashelin-shells","tpage_name":"introcst-pris2"}],[17956876,{"idx":12,"name":"city-port-seam-side-metal","tpage_name":"ctyport-vis-tfrag"}],[16777240,{"idx":24,"name":"city-farm-sprinkle-suppport","tpage_name":"ctyfarmb-vis-pris"}],[589900,{"idx":76,"name":"hud-arrow-right-02-lit","tpage_name":"level-default-minimap"}],[11796520,{"idx":40,"name":"city-ind-catwalk-slope-metal","tpage_name":"ctyinda-vis-tfrag"}],[115081262,{"idx":46,"name":"daxterfoot-bottom","tpage_name":"desboss1-pris"}],[8060939,{"idx":11,"name":"ticker-b","tpage_name":"ctywide-sprite"}],[589859,{"idx":35,"name":"hud-mapring-alarm-01","tpage_name":"level-default-minimap"}],[35651608,{"idx":24,"name":"ashelin-shield","tpage_name":"introcst-pris2"}],[17956877,{"idx":13,"name":"city-port-ground-01","tpage_name":"ctyport-vis-tfrag"}],[100925457,{"idx":17,"name":"king-iris","tpage_name":"ljkdmpk-pris2"}],[104660997,{"idx":5,"name":"des-rock-shrub-01","tpage_name":"deserte-vis-shrub"}],[589901,{"idx":77,"name":"hud-arrow-top-02","tpage_name":"level-default-minimap"}],[11796521,{"idx":41,"name":"city-ind-dark-marble","tpage_name":"ctyinda-vis-tfrag"}],[126287883,{"idx":11,"name":"grunt-skin-02","tpage_name":"sewo-vis-pris"}],[115081263,{"idx":47,"name":"daxtergoggles","tpage_name":"desboss1-pris"}],[11796480,{"idx":0,"name":"city-ind-wall-02","tpage_name":"ctyinda-vis-tfrag"}],[8060940,{"idx":12,"name":"ticker-c","tpage_name":"ctywide-sprite"}],[589860,{"idx":36,"name":"map-target-marker","tpage_name":"level-default-minimap"}],[35651609,{"idx":25,"name":"ashelin-shoebottom","tpage_name":"introcst-pris2"}],[17956878,{"idx":14,"name":"city-port-bridge-grid01","tpage_name":"ctyport-vis-tfrag"}],[589902,{"idx":78,"name":"hud-arrow-top-02-lit","tpage_name":"level-default-minimap"}],[11796522,{"idx":42,"name":"city-ind-litemetal-01","tpage_name":"ctyinda-vis-tfrag"}],[126287884,{"idx":12,"name":"grunt-skin-03","tpage_name":"sewo-vis-pris"}],[115081264,{"idx":48,"name":"daxterheadwidenew","tpage_name":"desboss1-pris"}],[11796481,{"idx":1,"name":"city-ind-band-dark-01","tpage_name":"ctyinda-vis-tfrag"}],[8060941,{"idx":13,"name":"ticker-d","tpage_name":"ctywide-sprite"}],[589861,{"idx":37,"name":"hud-npcring-01","tpage_name":"level-default-minimap"}],[35651610,{"idx":26,"name":"ashelin-shoemetal","tpage_name":"introcst-pris2"}],[17956879,{"idx":15,"name":"city-port-bridge-brace01","tpage_name":"ctyport-vis-tfrag"}],[589903,{"idx":79,"name":"hud-gun-reticle","tpage_name":"level-default-minimap"}],[11796523,{"idx":43,"name":"city-ind-border-stripe-dark-01","tpage_name":"ctyinda-vis-tfrag"}],[126287885,{"idx":13,"name":"nwasp-eye-01","tpage_name":"sewo-vis-pris"}],[115081265,{"idx":49,"name":"daxterhelmetplain","tpage_name":"desboss1-pris"}],[11796482,{"idx":2,"name":"city-ind-wall-base-01","tpage_name":"ctyinda-vis-tfrag"}],[8060942,{"idx":14,"name":"ticker-e","tpage_name":"ctywide-sprite"}],[589862,{"idx":38,"name":"hud-npcring-bar-01","tpage_name":"level-default-minimap"}],[35651611,{"idx":27,"name":"ashelin-teeth","tpage_name":"introcst-pris2"}],[17956880,{"idx":16,"name":"city-port-bridge-grate01","tpage_name":"ctyport-vis-tfrag"}],[589904,{"idx":80,"name":"hud-gunpurple-01a","tpage_name":"level-default-minimap"}],[11796524,{"idx":44,"name":"city-ind-wall-base-05","tpage_name":"ctyinda-vis-tfrag"}],[126287886,{"idx":14,"name":"nwasp-gem-01","tpage_name":"sewo-vis-pris"}],[115081266,{"idx":50,"name":"daxterlense","tpage_name":"desboss1-pris"}],[17956881,{"idx":17,"name":"city-port-green-marble","tpage_name":"ctyport-vis-tfrag"}],[126287887,{"idx":15,"name":"nwasp-hose","tpage_name":"sewo-vis-pris"}],[115081267,{"idx":51,"name":"daxternose","tpage_name":"desboss1-pris"}],[17956882,{"idx":18,"name":"city-port-metal-block-04","tpage_name":"ctyport-vis-tfrag"}],[589906,{"idx":82,"name":"hud-gunpurple-03a","tpage_name":"level-default-minimap"}],[11796526,{"idx":46,"name":"city-ind-wall-06","tpage_name":"ctyinda-vis-tfrag"}],[126287888,{"idx":16,"name":"nwasp-metal-01","tpage_name":"sewo-vis-pris"}],[115081268,{"idx":52,"name":"daxterteeth","tpage_name":"desboss1-pris"}],[17956883,{"idx":19,"name":"city-port-pushblock-metal","tpage_name":"ctyport-vis-tfrag"}],[589907,{"idx":83,"name":"hud-gunpurple-common-01","tpage_name":"level-default-minimap"}],[11796527,{"idx":47,"name":"city-ind-buldge-light-self-illuminated-02","tpage_name":"ctyinda-vis-tfrag"}],[126287889,{"idx":17,"name":"nwasp-skin-01","tpage_name":"sewo-vis-pris"}],[115081269,{"idx":53,"name":"daxtertuft","tpage_name":"desboss1-pris"}],[17956884,{"idx":20,"name":"city-port-wallbase","tpage_name":"ctyport-vis-tfrag"}],[11796528,{"idx":48,"name":"city-ind-wall-base-07","tpage_name":"ctyinda-vis-tfrag"}],[126287890,{"idx":18,"name":"nwasp-skin-02","tpage_name":"sewo-vis-pris"}],[115081270,{"idx":54,"name":"environment-oldmetal","tpage_name":"desboss1-pris"}],[17956885,{"idx":21,"name":"city-port-metal-green-main","tpage_name":"ctyport-vis-tfrag"}],[11796529,{"idx":49,"name":"city-ind-wall-05","tpage_name":"ctyinda-vis-tfrag"}],[126287891,{"idx":19,"name":"nwasp-skin-03","tpage_name":"sewo-vis-pris"}],[115081271,{"idx":55,"name":"jakc-armor","tpage_name":"desboss1-pris"}],[17956886,{"idx":22,"name":"city-port-bigpipe-ring-side","tpage_name":"ctyport-vis-tfrag"}],[17956887,{"idx":23,"name":"city-port-bracketmetal-tiny","tpage_name":"ctyport-vis-tfrag"}],[17956888,{"idx":24,"name":"city-bluelight","tpage_name":"ctyport-vis-tfrag"}],[17956889,{"idx":25,"name":"city-port-black","tpage_name":"ctyport-vis-tfrag"}],[17956890,{"idx":26,"name":"city-port-metal-green-main-side","tpage_name":"ctyport-vis-tfrag"}],[17956891,{"idx":27,"name":"city-port-metal","tpage_name":"ctyport-vis-tfrag"}],[17956892,{"idx":28,"name":"city-port-litwindow","tpage_name":"ctyport-vis-tfrag"}],[11796495,{"idx":15,"name":"city-ind-metal-02","tpage_name":"ctyinda-vis-tfrag"}],[589875,{"idx":51,"name":"hud-arrow-down-01-lit","tpage_name":"level-default-minimap"}],[35651624,{"idx":40,"name":"samos-helmet","tpage_name":"introcst-pris2"}],[17956893,{"idx":29,"name":"city-port-wall-metal-01","tpage_name":"ctyport-vis-tfrag"}],[11796496,{"idx":16,"name":"city-muck-01","tpage_name":"ctyinda-vis-tfrag"}],[16777216,{"idx":0,"name":"city-farm-veg-cableaf","tpage_name":"ctyfarmb-vis-pris"}],[589876,{"idx":52,"name":"hud-arrow-left-01-lit","tpage_name":"level-default-minimap"}],[35651625,{"idx":41,"name":"samos-leaf","tpage_name":"introcst-pris2"}],[17956894,{"idx":30,"name":"city-port-garage-door01","tpage_name":"ctyport-vis-tfrag"}],[11796497,{"idx":17,"name":"city-ind-grate-01","tpage_name":"ctyinda-vis-tfrag"}],[8060957,{"idx":29,"name":"water-splat","tpage_name":"ctywide-sprite"}],[16777217,{"idx":1,"name":"city-farm-veg-cabseed","tpage_name":"ctyfarmb-vis-pris"}],[589877,{"idx":53,"name":"hud-arrow-right-01-lit","tpage_name":"level-default-minimap"}],[35651626,{"idx":42,"name":"samos-lens","tpage_name":"introcst-pris2"}],[17956895,{"idx":31,"name":"city-port-metal-block-01","tpage_name":"ctyport-vis-tfrag"}],[115081281,{"idx":65,"name":"jakchires-arm","tpage_name":"desboss1-pris"}],[8060958,{"idx":30,"name":"mud-bubble","tpage_name":"ctywide-sprite"}],[11796498,{"idx":18,"name":"city-bigpipe-ring-02","tpage_name":"ctyinda-vis-tfrag"}],[16777218,{"idx":2,"name":"city-farm-veg-green-1","tpage_name":"ctyfarmb-vis-pris"}],[589878,{"idx":54,"name":"hud-arrow-top-01-lit","tpage_name":"level-default-minimap"}],[35651627,{"idx":43,"name":"samos-log-01","tpage_name":"introcst-pris2"}],[17956896,{"idx":32,"name":"city-port-bigpipe-siding","tpage_name":"ctyport-vis-tfrag"}],[17956898,{"idx":34,"name":"city-port-canopyarm-swivel-sides","tpage_name":"ctyport-vis-tfrag"}],[11796502,{"idx":22,"name":"city-ind-wall-noisy-03","tpage_name":"ctyinda-vis-tfrag"}],[16777222,{"idx":6,"name":"yak-lightfur","tpage_name":"ctyfarmb-vis-pris"}],[589882,{"idx":58,"name":"hud-gunblue-01a","tpage_name":"level-default-minimap"}],[17956900,{"idx":36,"name":"city-redlight","tpage_name":"ctyport-vis-tfrag"}],[16777223,{"idx":7,"name":"yak-lightmed-transfur","tpage_name":"ctyfarmb-vis-pris"}],[11796503,{"idx":23,"name":"city-ind-wall-noisy-05","tpage_name":"ctyinda-vis-tfrag"}],[589883,{"idx":59,"name":"hud-gunblue-02a","tpage_name":"level-default-minimap"}],[17956901,{"idx":37,"name":"city-port-dark-marble","tpage_name":"ctyport-vis-tfrag"}],[11796504,{"idx":24,"name":"city-ind-metal-green-main-side","tpage_name":"ctyinda-vis-tfrag"}],[16777224,{"idx":8,"name":"yak-lips2","tpage_name":"ctyfarmb-vis-pris"}],[589884,{"idx":60,"name":"hud-gunblue-03a","tpage_name":"level-default-minimap"}],[17956902,{"idx":38,"name":"city-port-small-metal-highlite","tpage_name":"ctyport-vis-tfrag"}],[11796505,{"idx":25,"name":"city-ind-bigpipe-siding-02","tpage_name":"ctyinda-vis-tfrag"}],[16777225,{"idx":9,"name":"yak-medfur","tpage_name":"ctyfarmb-vis-pris"}],[589885,{"idx":61,"name":"hud-gunblue-common-01","tpage_name":"level-default-minimap"}],[17956903,{"idx":39,"name":"city-port-copper-lines","tpage_name":"ctyport-vis-tfrag"}],[11796506,{"idx":26,"name":"city-ind-redlight","tpage_name":"ctyinda-vis-tfrag"}],[16777226,{"idx":10,"name":"yak-medfur-end","tpage_name":"ctyfarmb-vis-pris"}],[589886,{"idx":62,"name":"hud-gunred-01a","tpage_name":"level-default-minimap"}],[49348615,{"idx":7,"name":"sewer-plate-05","tpage_name":"sewb-vis-pris"}],[35651635,{"idx":51,"name":"samosbird-body","tpage_name":"introcst-pris2"}],[17956904,{"idx":40,"name":"city-port-roofmetal","tpage_name":"ctyport-vis-tfrag"}],[11796548,{"idx":68,"name":"cty-ind-ground02","tpage_name":"ctyinda-vis-tfrag"}],[115081290,{"idx":74,"name":"jakchires-facelft","tpage_name":"desboss1-pris"}],[17956905,{"idx":41,"name":"city-roofmetal-rim","tpage_name":"ctyport-vis-tfrag"}],[17956906,{"idx":42,"name":"city-port-metal-beam","tpage_name":"ctyport-vis-tfrag"}],[17956907,{"idx":43,"name":"city-port-bolt","tpage_name":"ctyport-vis-tfrag"}],[17956908,{"idx":44,"name":"city-port-barrel-body","tpage_name":"ctyport-vis-tfrag"}],[17956909,{"idx":45,"name":"city-port-door01","tpage_name":"ctyport-vis-tfrag"}],[17956910,{"idx":46,"name":"city-port-ventbase-01","tpage_name":"ctyport-vis-tfrag"}],[17956911,{"idx":47,"name":"city-port-pavmnt-01","tpage_name":"ctyport-vis-tfrag"}],[17956912,{"idx":48,"name":"city-port-citywall","tpage_name":"ctyport-vis-tfrag"}],[41484288,{"idx":0,"name":"wascity-blotch-withstreaks-01","tpage_name":"wascitya-vis-shrub"}],[17956913,{"idx":49,"name":"city-port-bridge-side","tpage_name":"ctyport-vis-tfrag"}],[41484289,{"idx":1,"name":"wascity-stain-window-01","tpage_name":"wascitya-vis-shrub"}],[16777236,{"idx":20,"name":"city-farm-mar-main","tpage_name":"ctyfarmb-vis-pris"}],[11796516,{"idx":36,"name":"city-ind-wall-base-08","tpage_name":"ctyinda-vis-tfrag"}],[589896,{"idx":72,"name":"hud-arrow-down-02-lit","tpage_name":"level-default-minimap"}],[35651645,{"idx":61,"name":"king-earing","tpage_name":"introcst-pris2"}],[17956914,{"idx":50,"name":"city-port-plate-05","tpage_name":"ctyport-vis-tfrag"}],[41484290,{"idx":2,"name":"wascity-steel-bar","tpage_name":"wascitya-vis-shrub"}],[17956915,{"idx":51,"name":"city-greenlight","tpage_name":"ctyport-vis-tfrag"}],[17956916,{"idx":52,"name":"city-port-piece-metal","tpage_name":"ctyport-vis-tfrag"}],[17956917,{"idx":53,"name":"city-port-bridge-main","tpage_name":"ctyport-vis-tfrag"}],[41484293,{"idx":5,"name":"wascity-overlay-bullethole-c","tpage_name":"wascitya-vis-shrub"}],[17956918,{"idx":54,"name":"city-port-control-panel-litup2","tpage_name":"ctyport-vis-tfrag"}],[41484294,{"idx":6,"name":"wascity-overlay-bullethole-a","tpage_name":"wascitya-vis-shrub"}],[17956919,{"idx":55,"name":"city-roofmetal","tpage_name":"ctyport-vis-tfrag"}],[41484295,{"idx":7,"name":"wascity-stain-wall-01","tpage_name":"wascitya-vis-shrub"}],[35389440,{"idx":0,"name":"bam-eyelight","tpage_name":"introcst-pris"}],[17956920,{"idx":56,"name":"city-port-roofmetal-rim","tpage_name":"ctyport-vis-tfrag"}],[41484296,{"idx":8,"name":"wascity-overlay-crack","tpage_name":"wascitya-vis-shrub"}],[35389441,{"idx":1,"name":"bam-hairhilite","tpage_name":"introcst-pris"}],[17956921,{"idx":57,"name":"city-greenlight2","tpage_name":"ctyport-vis-tfrag"}],[41484297,{"idx":9,"name":"wascity-ditch-wall-top-to-ground","tpage_name":"wascitya-vis-shrub"}],[35389442,{"idx":2,"name":"cguard-shoebottom","tpage_name":"introcst-pris"}],[17956922,{"idx":58,"name":"city-port-barge-plain-metal","tpage_name":"ctyport-vis-tfrag"}],[41484298,{"idx":10,"name":"wascity-shrub-orange-01","tpage_name":"wascitya-vis-shrub"}],[11796525,{"idx":45,"name":"city-ind-wall-base-top-03","tpage_name":"ctyinda-vis-tfrag"}],[589905,{"idx":81,"name":"hud-gunpurple-02a","tpage_name":"level-default-minimap"}],[35651654,{"idx":70,"name":"king-leg","tpage_name":"introcst-pris2"}],[35389443,{"idx":3,"name":"cguard-shoemetal","tpage_name":"introcst-pris"}],[17956923,{"idx":59,"name":"city-port-barge-grating","tpage_name":"ctyport-vis-tfrag"}],[41484299,{"idx":11,"name":"wascity-ground-stain-01","tpage_name":"wascitya-vis-shrub"}],[35389444,{"idx":4,"name":"cguard1-armshield","tpage_name":"introcst-pris"}],[17956924,{"idx":60,"name":"city-port-crate-metal-inside","tpage_name":"ctyport-vis-tfrag"}],[41484301,{"idx":13,"name":"wascity-overlay-damaged","tpage_name":"wascitya-vis-shrub"}],[35389446,{"idx":6,"name":"cguard1-boottop","tpage_name":"introcst-pris"}],[17956926,{"idx":62,"name":"city-port-barge-metal-darker","tpage_name":"ctyport-vis-tfrag"}],[41484302,{"idx":14,"name":"wascitya-stone-top","tpage_name":"wascitya-vis-shrub"}],[35389447,{"idx":7,"name":"cguard1-brushedmetal","tpage_name":"introcst-pris"}],[17956927,{"idx":63,"name":"city-port-barge-plain-metal-1","tpage_name":"ctyport-vis-tfrag"}],[41484303,{"idx":15,"name":"wascity-cactus-green","tpage_name":"wascitya-vis-shrub"}],[35389448,{"idx":8,"name":"cguard1-chestplate","tpage_name":"introcst-pris"}],[17956928,{"idx":64,"name":"city-port-barge-side","tpage_name":"ctyport-vis-tfrag"}],[41484304,{"idx":16,"name":"wascity-cactus-flower","tpage_name":"wascitya-vis-shrub"}],[35389449,{"idx":9,"name":"cguard1-eyering","tpage_name":"introcst-pris"}],[17956929,{"idx":65,"name":"city-port-barge-side-doors","tpage_name":"ctyport-vis-tfrag"}],[35389450,{"idx":10,"name":"cguard1-face","tpage_name":"introcst-pris"}],[17956930,{"idx":66,"name":"city-port-barge-side-plain","tpage_name":"ctyport-vis-tfrag"}],[35389451,{"idx":11,"name":"cguard1-glove","tpage_name":"introcst-pris"}],[17956931,{"idx":67,"name":"environment-oldmetal","tpage_name":"ctyport-vis-tfrag"}],[35389452,{"idx":12,"name":"cguard1-greyheadshield","tpage_name":"introcst-pris"}],[17956932,{"idx":68,"name":"hip-tmetfloor04","tpage_name":"ctyport-vis-tfrag"}],[91226115,{"idx":3,"name":"gun-shellcasings-02","tpage_name":"gungame-vis-shrub"}],[89980935,{"idx":7,"name":"des-corral-plate-03","tpage_name":"desertg-vis-tfrag"}],[589915,{"idx":91,"name":"hud-newhud-greendot-01","tpage_name":"level-default-minimap"}],[49348644,{"idx":36,"name":"cguardgame-shoebottom","tpage_name":"sewb-vis-pris"}],[35651664,{"idx":80,"name":"king-vestback","tpage_name":"introcst-pris2"}],[35389453,{"idx":13,"name":"cguard1-gunboltlight","tpage_name":"introcst-pris"}],[17956933,{"idx":69,"name":"hip-tmetring02","tpage_name":"ctyport-vis-tfrag"}],[35389454,{"idx":14,"name":"cguard1-gunhandle","tpage_name":"introcst-pris"}],[17956934,{"idx":70,"name":"hip-twood01","tpage_name":"ctyport-vis-tfrag"}],[35389456,{"idx":16,"name":"cguard1-gunmetaldark","tpage_name":"introcst-pris"}],[17956936,{"idx":72,"name":"t-citywide-met-strp-close","tpage_name":"ctyport-vis-tfrag"}],[35389459,{"idx":19,"name":"cguard1-guntube","tpage_name":"introcst-pris"}],[17956939,{"idx":75,"name":"t-citywide-met-strp01","tpage_name":"ctyport-vis-tfrag"}],[94961667,{"idx":3,"name":"jakc-armor","tpage_name":"lsigjakc-pris"}],[89980947,{"idx":19,"name":"des-mount-01","tpage_name":"desertg-vis-tfrag"}],[41615370,{"idx":10,"name":"gekko-laser","tpage_name":"wascitya-vis-pris"}],[35389470,{"idx":30,"name":"cguard1-teeth","tpage_name":"introcst-pris"}],[17956950,{"idx":86,"name":"city-port-pavmnt--cracked-01","tpage_name":"ctyport-vis-tfrag"}],[41615371,{"idx":11,"name":"gekko-laserbarrel","tpage_name":"wascitya-vis-pris"}],[35389471,{"idx":31,"name":"daxter-eyelid","tpage_name":"introcst-pris"}],[17956951,{"idx":87,"name":"common-black","tpage_name":"ctyport-vis-tfrag"}],[41615372,{"idx":12,"name":"gekko-metal-01","tpage_name":"wascitya-vis-pris"}],[35389472,{"idx":32,"name":"daxter-furhilite","tpage_name":"introcst-pris"}],[17956952,{"idx":88,"name":"city-port-pavmnt--scorched-01","tpage_name":"ctyport-vis-tfrag"}],[41615378,{"idx":18,"name":"was-tizard-facefin","tpage_name":"wascitya-vis-pris"}],[35389478,{"idx":38,"name":"daxterfinger","tpage_name":"introcst-pris"}],[17956958,{"idx":94,"name":"city-port-cable-cylinder-01","tpage_name":"ctyport-vis-tfrag"}],[41615379,{"idx":19,"name":"was-tizard-fin","tpage_name":"wascitya-vis-pris"}],[35389479,{"idx":39,"name":"daxterfoot","tpage_name":"introcst-pris"}],[17956959,{"idx":95,"name":"city-port-cable-quare-01","tpage_name":"ctyport-vis-tfrag"}],[41615381,{"idx":21,"name":"was-tizard-nail","tpage_name":"wascitya-vis-pris"}],[35389481,{"idx":41,"name":"daxtergoggles","tpage_name":"introcst-pris"}],[17956961,{"idx":97,"name":"city-port-seam-metal-HI","tpage_name":"ctyport-vis-tfrag"}],[35389482,{"idx":42,"name":"daxterheadwidenew","tpage_name":"introcst-pris"}],[17956962,{"idx":98,"name":"city-yellowlight","tpage_name":"ctyport-vis-tfrag"}],[8323204,{"idx":132,"name":"bluecrate-lod02","tpage_name":"ctywide-vis-tfrag"}],[49414144,{"idx":0,"name":"airlock-door-bolt","tpage_name":"sewc-vis-pris"}],[8323205,{"idx":133,"name":"bluecrate-lod04","tpage_name":"ctywide-vis-tfrag"}],[49414145,{"idx":1,"name":"airlock-door-cog","tpage_name":"sewc-vis-pris"}],[129433613,{"idx":13,"name":"dp-text-14","tpage_name":"wasseem-sprite"}],[128188433,{"idx":17,"name":"wascity-ground-01","tpage_name":"waswide-vis-shrub"}],[115736633,{"idx":57,"name":"desert-egg-bulb-01","tpage_name":"lnstcst-pris"}],[50659367,{"idx":39,"name":"fora-statue-stone","tpage_name":"foresta-vis-tfrag"}],[60620807,{"idx":7,"name":"minc-door-metal-01","tpage_name":"minea-vis-pris"}],[8323206,{"idx":134,"name":"metalcrate-02","tpage_name":"ctywide-vis-tfrag"}],[49414146,{"idx":2,"name":"airlock-door-main","tpage_name":"sewc-vis-pris"}],[129433614,{"idx":14,"name":"dp-text-15","tpage_name":"wasseem-sprite"}],[115736634,{"idx":58,"name":"desert-egg-bulbtop-01","tpage_name":"lnstcst-pris"}],[50659368,{"idx":40,"name":"fora-butress-metal-01","tpage_name":"foresta-vis-tfrag"}],[60620808,{"idx":8,"name":"minc-rust-01","tpage_name":"minea-vis-pris"}],[8323207,{"idx":135,"name":"metalcrate-05","tpage_name":"ctywide-vis-tfrag"}],[49414147,{"idx":3,"name":"airlock-door-metal2","tpage_name":"sewc-vis-pris"}],[129433615,{"idx":15,"name":"dp-text-16","tpage_name":"wasseem-sprite"}],[115736635,{"idx":59,"name":"desert-egg-gem-01","tpage_name":"lnstcst-pris"}],[14680111,{"idx":47,"name":"prebot-envmap","tpage_name":"ctygenb-vis-pris"}],[50659328,{"idx":0,"name":"fora-rock","tpage_name":"foresta-vis-tfrag"}],[8323208,{"idx":136,"name":"metalcrate-04","tpage_name":"ctywide-vis-tfrag"}],[49414148,{"idx":4,"name":"airlockl-door-metalframe","tpage_name":"sewc-vis-pris"}],[115736636,{"idx":60,"name":"vehicle-tread-01","tpage_name":"lnstcst-pris"}],[14680112,{"idx":48,"name":"cty-grunt-eye-01","tpage_name":"ctygenb-vis-pris"}],[50659329,{"idx":1,"name":"fora-rock-small","tpage_name":"foresta-vis-tfrag"}],[8323209,{"idx":137,"name":"metalcrate-01","tpage_name":"ctywide-vis-tfrag"}],[49414149,{"idx":5,"name":"sew-gun-barrel-01","tpage_name":"sewc-vis-pris"}],[115736637,{"idx":61,"name":"vehicle-wheel-01","tpage_name":"lnstcst-pris"}],[14680113,{"idx":49,"name":"cty-grunt-gem-01","tpage_name":"ctygenb-vis-pris"}],[50659330,{"idx":2,"name":"fora-grass-fringe","tpage_name":"foresta-vis-tfrag"}],[8323210,{"idx":138,"name":"metalcrate-lod02","tpage_name":"ctywide-vis-tfrag"}],[49414150,{"idx":6,"name":"sew-gun-body-01","tpage_name":"sewc-vis-pris"}],[14680114,{"idx":50,"name":"cty-grunt-hose","tpage_name":"ctygenb-vis-pris"}],[50659372,{"idx":44,"name":"fora-bark-ends","tpage_name":"foresta-vis-tfrag"}],[60620812,{"idx":12,"name":"minc-safe-plate-01","tpage_name":"minea-vis-pris"}],[50659331,{"idx":3,"name":"fora-grass","tpage_name":"foresta-vis-tfrag"}],[8323211,{"idx":139,"name":"metalcrate-lod03","tpage_name":"ctywide-vis-tfrag"}],[49414151,{"idx":7,"name":"sew-gun-drum-01","tpage_name":"sewc-vis-pris"}],[14680115,{"idx":51,"name":"cty-grunt-metal-01","tpage_name":"ctygenb-vis-pris"}],[20840472,{"idx":24,"name":"jakc-wraps","tpage_name":"stadiumb-vis-pris"}],[50659332,{"idx":4,"name":"fora-bark","tpage_name":"foresta-vis-tfrag"}],[8323212,{"idx":140,"name":"metalcrate-lod04","tpage_name":"ctywide-vis-tfrag"}],[49414152,{"idx":8,"name":"sew-gun-panel-02","tpage_name":"sewc-vis-pris"}],[14680116,{"idx":52,"name":"cty-grunt-skin-01","tpage_name":"ctygenb-vis-pris"}],[50659374,{"idx":46,"name":"fora-precursor-metal-plain-01dk","tpage_name":"foresta-vis-tfrag"}],[60620814,{"idx":14,"name":"bam-eyelight","tpage_name":"minea-vis-pris"}],[8323213,{"idx":141,"name":"rub-palace-tower-side","tpage_name":"ctywide-vis-tfrag"}],[49414153,{"idx":9,"name":"sew-gun-panel-05","tpage_name":"sewc-vis-pris"}],[14680117,{"idx":53,"name":"cty-grunt-skin-02","tpage_name":"ctygenb-vis-pris"}],[49414154,{"idx":10,"name":"sew-gun-rim-02","tpage_name":"sewc-vis-pris"}],[14680118,{"idx":54,"name":"cty-grunt-skin-03","tpage_name":"ctygenb-vis-pris"}],[8323215,{"idx":143,"name":"bluecrate-05","tpage_name":"ctywide-vis-tfrag"}],[49414155,{"idx":11,"name":"sew-gun-round-02","tpage_name":"sewc-vis-pris"}],[49414156,{"idx":12,"name":"sew-gun-round-cap-01","tpage_name":"sewc-vis-pris"}],[50659337,{"idx":9,"name":"fora-stream-rocks","tpage_name":"foresta-vis-tfrag"}],[49414157,{"idx":13,"name":"sew-laser-guard-side","tpage_name":"sewc-vis-pris"}],[49414158,{"idx":14,"name":"sew-laserturret-bot","tpage_name":"sewc-vis-pris"}],[50659339,{"idx":11,"name":"sewer-metal-block-06","tpage_name":"foresta-vis-tfrag"}],[49414159,{"idx":15,"name":"sew-laserturret-center","tpage_name":"sewc-vis-pris"}],[14548996,{"idx":4,"name":"sign-ctygenb-praxis-banner","tpage_name":"ctygenb-sprite"}],[15794176,{"idx":0,"name":"ctyfarm-cab-body","tpage_name":"ctyfarma-sprite"}],[50659340,{"idx":12,"name":"sewer-concrete-edge-02","tpage_name":"foresta-vis-tfrag"}],[49414160,{"idx":16,"name":"sew-laserturret-pole","tpage_name":"sewc-vis-pris"}],[103546891,{"idx":11,"name":"missle-launcher-gear-01","tpage_name":"lctyhijk-tfrag"}],[96075811,{"idx":35,"name":"jakc-scarfhanging","tpage_name":"ljakc-pris"}],[101056531,{"idx":19,"name":"jakchires-eyelid","tpage_name":"ljakcklv-pris"}],[15794177,{"idx":1,"name":"ctyfarm-chili-leaf","tpage_name":"ctyfarma-sprite"}],[50659341,{"idx":13,"name":"sewer-metal-block-05","tpage_name":"foresta-vis-tfrag"}],[49414161,{"idx":17,"name":"sewer-pipe-small-01","tpage_name":"sewc-vis-pris"}],[103546892,{"idx":12,"name":"missle-launcher-rim-01","tpage_name":"lctyhijk-tfrag"}],[96075812,{"idx":36,"name":"gun-main","tpage_name":"ljakc-pris"}],[101056532,{"idx":20,"name":"jakchires-facelft","tpage_name":"ljakcklv-pris"}],[8323098,{"idx":26,"name":"citywide-redwall","tpage_name":"ctywide-vis-tfrag"}],[15794178,{"idx":2,"name":"ctyfarm-chili-stem","tpage_name":"ctyfarma-sprite"}],[8323099,{"idx":27,"name":"citywide-fort-gold","tpage_name":"ctywide-vis-tfrag"}],[15794179,{"idx":3,"name":"ctyfarm-eggplant-body","tpage_name":"ctyfarma-sprite"}],[60620824,{"idx":24,"name":"bam-hairhilite","tpage_name":"minea-vis-pris"}],[8323100,{"idx":28,"name":"citywide-pillar","tpage_name":"ctywide-vis-tfrag"}],[15794180,{"idx":4,"name":"ctyfarm-eggplant-leaf-1","tpage_name":"ctyfarma-sprite"}],[60620825,{"idx":25,"name":"daxter-eyelid","tpage_name":"minea-vis-pris"}],[852021,{"idx":53,"name":"bluecrate-05","tpage_name":"halfpipe-tfrag"}],[15794181,{"idx":5,"name":"ctyfarm-eggplant-leaf-2","tpage_name":"ctyfarma-sprite"}],[60620826,{"idx":26,"name":"daxter-furhilite","tpage_name":"minea-vis-pris"}],[60620827,{"idx":27,"name":"daxter-orange","tpage_name":"minea-vis-pris"}],[60620828,{"idx":28,"name":"daxterarm","tpage_name":"minea-vis-pris"}],[49414209,{"idx":65,"name":"bam-eyelight","tpage_name":"sewc-vis-pris"}],[60620829,{"idx":29,"name":"daxterbodyshort-eix","tpage_name":"minea-vis-pris"}],[49414210,{"idx":66,"name":"cguard1-backmetal","tpage_name":"sewc-vis-pris"}],[60620830,{"idx":30,"name":"daxterbolt","tpage_name":"minea-vis-pris"}],[49414211,{"idx":67,"name":"cguard1-chestplate","tpage_name":"sewc-vis-pris"}],[60620831,{"idx":31,"name":"daxterear","tpage_name":"minea-vis-pris"}],[50659350,{"idx":22,"name":"fora-roof-support","tpage_name":"foresta-vis-tfrag"}],[49414170,{"idx":26,"name":"cguardgame-backplate","tpage_name":"sewc-vis-pris"}],[103546901,{"idx":21,"name":"missle-launcher-tube-end-01","tpage_name":"lctyhijk-tfrag"}],[101056541,{"idx":29,"name":"jakchires-precarmor-01","tpage_name":"ljakcklv-pris"}],[49414212,{"idx":68,"name":"cguard1-gunmetaldark2","tpage_name":"sewc-vis-pris"}],[60620832,{"idx":32,"name":"daxterfinger","tpage_name":"minea-vis-pris"}],[49414213,{"idx":69,"name":"cguard1-guntube","tpage_name":"sewc-vis-pris"}],[60620833,{"idx":33,"name":"daxterfoot","tpage_name":"minea-vis-pris"}],[11796536,{"idx":56,"name":"city-ind-black","tpage_name":"ctyinda-vis-tfrag"}],[589916,{"idx":92,"name":"hud-newhud-reddot-01","tpage_name":"level-default-minimap"}],[29229056,{"idx":0,"name":"nest-egg-lens","tpage_name":"nsta-sprite"}],[49414214,{"idx":70,"name":"cguard1-lens","tpage_name":"sewc-vis-pris"}],[60620834,{"idx":34,"name":"daxterfoot-bottom","tpage_name":"minea-vis-pris"}],[11796537,{"idx":57,"name":"city-ind-support-base","tpage_name":"ctyinda-vis-tfrag"}],[589917,{"idx":93,"name":"hud-newhud-shine-01","tpage_name":"level-default-minimap"}],[29229057,{"idx":1,"name":"nest-egg-shell","tpage_name":"nsta-sprite"}],[49414215,{"idx":71,"name":"kg-grunt-cable-01","tpage_name":"sewc-vis-pris"}],[60620835,{"idx":35,"name":"daxtergoggles","tpage_name":"minea-vis-pris"}],[11796538,{"idx":58,"name":"city-ind-metal-03","tpage_name":"ctyinda-vis-tfrag"}],[29229058,{"idx":2,"name":"flying-gull-01","tpage_name":"nsta-sprite"}],[49414216,{"idx":72,"name":"kg-grunt-rim-01","tpage_name":"sewc-vis-pris"}],[60620836,{"idx":36,"name":"daxterheadwidenew","tpage_name":"minea-vis-pris"}],[11796539,{"idx":59,"name":"city-ind-metal-09","tpage_name":"ctyinda-vis-tfrag"}],[29229059,{"idx":3,"name":"flying-gull-02","tpage_name":"nsta-sprite"}],[14680084,{"idx":20,"name":"jakc-wristband-a2","tpage_name":"ctygenb-vis-pris"}],[20905984,{"idx":0,"name":"rub-metal-01","tpage_name":"stadiumb-vis-tfrag"}],[38731975,{"idx":199,"name":"male1_13","tpage_name":"wasstada-sprite"}],[14680092,{"idx":28,"name":"jakchires-eyebrow","tpage_name":"ctygenb-vis-pris"}],[20905992,{"idx":8,"name":"stdm-wallrock-dirt","tpage_name":"stadiumb-vis-tfrag"}],[50724868,{"idx":4,"name":"airlockl-door-metalframe","tpage_name":"foresta-vis-pris"}],[48234508,{"idx":12,"name":"des-corral-metal-01","tpage_name":"desert-vis-tfrag"}],[14680096,{"idx":32,"name":"jakchires-glovetop","tpage_name":"ctygenb-vis-pris"}],[20905996,{"idx":12,"name":"stdm-glass-01","tpage_name":"stadiumb-vis-tfrag"}],[100990987,{"idx":11,"name":"jakb-eye","tpage_name":"ljakklev-pris"}],[103481347,{"idx":3,"name":"des-pinetree-bark","tpage_name":"deserta-vis-shrub"}],[38731987,{"idx":211,"name":"male2_04","tpage_name":"wasstada-sprite"}],[49479692,{"idx":12,"name":"sewer-waterfall-01-e-dest","tpage_name":"sewe-vis-water"}],[48234512,{"idx":16,"name":"des-cliff-01","tpage_name":"desert-vis-tfrag"}],[14680103,{"idx":39,"name":"jakchires-precarmor-01","tpage_name":"ctygenb-vis-pris"}],[20906003,{"idx":19,"name":"rub-rubble-01","tpage_name":"stadiumb-vis-tfrag"}],[48234510,{"idx":14,"name":"des-cliff-trans-01","tpage_name":"desert-vis-tfrag"}],[56950807,{"idx":23,"name":"common-black","tpage_name":"waspala-tfrag"}],[60686347,{"idx":11,"name":"minc-blue-paint-rust02","tpage_name":"mineb-vis-tfrag"}],[14680107,{"idx":43,"name":"jakchires-teeth","tpage_name":"ctygenb-vis-pris"}],[20906007,{"idx":23,"name":"city-slum-burning-can","tpage_name":"stadiumb-vis-tfrag"}],[49479694,{"idx":14,"name":"sewer-water-highlight-01-e-dest","tpage_name":"sewe-vis-water"}],[48234514,{"idx":18,"name":"des-cave-floor-01","tpage_name":"desert-vis-tfrag"}],[56950833,{"idx":49,"name":"waspala-fountain-base01","tpage_name":"waspala-tfrag"}],[60686373,{"idx":37,"name":"minc-blue-paint-rust04","tpage_name":"mineb-vis-tfrag"}],[112328744,{"idx":40,"name":"jakchires-eyelid","tpage_name":"wascast-pris"}],[20906033,{"idx":49,"name":"stdmb-gray-metal-01","tpage_name":"stadiumb-vis-tfrag"}],[100991024,{"idx":48,"name":"klever-gunmetal-04","tpage_name":"ljakklev-pris"}],[112197644,{"idx":12,"name":"vehicle-gun-box-01","tpage_name":"desinter-pris"}],[38732024,{"idx":248,"name":"male3_20","tpage_name":"wasstada-sprite"}],[85196803,{"idx":3,"name":"can-type","tpage_name":"desrace1-pris"}],[112328747,{"idx":43,"name":"jakchires-glovetop","tpage_name":"wascast-pris"}],[20906036,{"idx":52,"name":"stdmb-panel-01","tpage_name":"stadiumb-vis-tfrag"}],[100991027,{"idx":51,"name":"klever-hand","tpage_name":"ljakklev-pris"}],[112197647,{"idx":15,"name":"vehicle-tread-blur-02","tpage_name":"desinter-pris"}],[38732027,{"idx":251,"name":"male4_02","tpage_name":"wasstada-sprite"}],[112328751,{"idx":47,"name":"jakchires-leatherpouch","tpage_name":"wascast-pris"}],[20906040,{"idx":56,"name":"stdmb-panel-09","tpage_name":"stadiumb-vis-tfrag"}],[100991031,{"idx":55,"name":"klever-shoe","tpage_name":"ljakklev-pris"}],[38732031,{"idx":255,"name":"male4_06","tpage_name":"wasstada-sprite"}],[35389610,{"idx":170,"name":"klever-eye","tpage_name":"introcst-pris"}],[85196810,{"idx":10,"name":"intcept-tread01","tpage_name":"desrace1-pris"}],[74383373,{"idx":13,"name":"sewer-pipe-02","tpage_name":"sewj-vis-tfrag"}],[60686393,{"idx":57,"name":"lt-eco-vent-blue-01","tpage_name":"mineb-vis-tfrag"}],[112328764,{"idx":60,"name":"bat-amulet-02","tpage_name":"wascast-pris"}],[20906053,{"idx":69,"name":"stdmb-wall-03","tpage_name":"stadiumb-vis-tfrag"}],[35651633,{"idx":49,"name":"samos-vest","tpage_name":"introcst-pris2"}],[49348613,{"idx":5,"name":"airlock-door-cog1","tpage_name":"sewb-vis-pris"}],[122159104,{"idx":0,"name":"common-black","tpage_name":"factoryb-vis-tfrag"}],[119668744,{"idx":8,"name":"citfat-hairflat","tpage_name":"ljinx-pris"}],[38732044,{"idx":268,"name":"male4_19","tpage_name":"wasstada-sprite"}],[85196823,{"idx":23,"name":"jakchires-brownstrap","tpage_name":"desrace1-pris"}],[74383374,{"idx":14,"name":"sewer-metal-block-06","tpage_name":"sewj-vis-tfrag"}],[60686394,{"idx":58,"name":"lt-eco-vent-side-01","tpage_name":"mineb-vis-tfrag"}],[112328765,{"idx":61,"name":"bat-amulet-03","tpage_name":"wascast-pris"}],[20906054,{"idx":70,"name":"stdmb-marble-floor-01","tpage_name":"stadiumb-vis-tfrag"}],[35651634,{"idx":50,"name":"samosbird-beak","tpage_name":"introcst-pris2"}],[49348614,{"idx":6,"name":"sewer-pipe-rim-07","tpage_name":"sewb-vis-pris"}],[93519905,{"idx":33,"name":"hud-turbo-boost-on-01","tpage_name":"wasall-minimap"}],[38731985,{"idx":209,"name":"male2_02","tpage_name":"wasstada-sprite"}],[100990985,{"idx":9,"name":"jakb-brownleather","tpage_name":"ljakklev-pris"}],[122159105,{"idx":1,"name":"facb_redmetal-02","tpage_name":"factoryb-vis-tfrag"}],[119668745,{"idx":9,"name":"citn-1-pants","tpage_name":"ljinx-pris"}],[38732045,{"idx":269,"name":"male4_20","tpage_name":"wasstada-sprite"}],[85196824,{"idx":24,"name":"jakchires-precarmor-01","tpage_name":"desrace1-pris"}],[20906062,{"idx":78,"name":"rub-marble-floor-01-hitweak","tpage_name":"stadiumb-vis-tfrag"}],[20906063,{"idx":79,"name":"rub-stad-brick","tpage_name":"stadiumb-vis-tfrag"}],[20906064,{"idx":80,"name":"rub-beam-gen","tpage_name":"stadiumb-vis-tfrag"}],[20906065,{"idx":81,"name":"rub-wall-gen-01","tpage_name":"stadiumb-vis-tfrag"}],[20906066,{"idx":82,"name":"rub-wall-side-beam-02","tpage_name":"stadiumb-vis-tfrag"}],[20906067,{"idx":83,"name":"rub-city-wall-inside-damaged","tpage_name":"stadiumb-vis-tfrag"}],[20906068,{"idx":84,"name":"rub-cement-a","tpage_name":"stadiumb-vis-tfrag"}],[20906069,{"idx":85,"name":"rub-cement-broken-end","tpage_name":"stadiumb-vis-tfrag"}],[28180480,{"idx":0,"name":"palroof-stain-wall-01","tpage_name":"intpalrf-alpha"}],[20906070,{"idx":86,"name":"rub-metal-flatpipe-01","tpage_name":"stadiumb-vis-tfrag"}],[10813463,{"idx":23,"name":"cityslumc-grass-yellow","tpage_name":"ctyslumb-vis-shrub"}],[20906071,{"idx":87,"name":"rub-wall-trim","tpage_name":"stadiumb-vis-tfrag"}],[10813464,{"idx":24,"name":"ctyslumc-stain","tpage_name":"ctyslumb-vis-shrub"}],[20906072,{"idx":88,"name":"rub-wall-gen-04","tpage_name":"stadiumb-vis-tfrag"}],[20906073,{"idx":89,"name":"rub-wall-gen-02","tpage_name":"stadiumb-vis-tfrag"}],[20906074,{"idx":90,"name":"rub-cement-pillars","tpage_name":"stadiumb-vis-tfrag"}],[8323107,{"idx":35,"name":"t-citywide-met-bm-red-strp01","tpage_name":"ctywide-vis-tfrag"}],[10813467,{"idx":27,"name":"ctyslumc-wall","tpage_name":"ctyslumb-vis-shrub"}],[16973824,{"idx":0,"name":"city-farm-aquaduct-glass-01","tpage_name":"ctyfarmb-vis-water"}],[38732038,{"idx":262,"name":"male4_13","tpage_name":"wasstada-sprite"}],[85196817,{"idx":17,"name":"vehicle-metal-plate-01","tpage_name":"desrace1-pris"}],[20906075,{"idx":91,"name":"rub-wall-gen-06","tpage_name":"stadiumb-vis-tfrag"}],[8323108,{"idx":36,"name":"t-citywide-met-strp01","tpage_name":"ctywide-vis-tfrag"}],[10813468,{"idx":28,"name":"ctyslumc-light","tpage_name":"ctyslumb-vis-shrub"}],[20906076,{"idx":92,"name":"rub-metal-pipeside-01","tpage_name":"stadiumb-vis-tfrag"}],[10813469,{"idx":29,"name":"ctyslumc-wire","tpage_name":"ctyslumb-vis-shrub"}],[49545217,{"idx":1,"name":"airlock-door-bolt","tpage_name":"sewe-vis-pris"}],[20906077,{"idx":93,"name":"rub-wall-gen-03","tpage_name":"stadiumb-vis-tfrag"}],[49545218,{"idx":2,"name":"airlock-door-cog","tpage_name":"sewe-vis-pris"}],[20906078,{"idx":94,"name":"rub-ox-pipe-01","tpage_name":"stadiumb-vis-tfrag"}],[10813471,{"idx":31,"name":"cityslumc-gold-trim","tpage_name":"ctyslumb-vis-shrub"}],[49545219,{"idx":3,"name":"airlock-door-main","tpage_name":"sewe-vis-pris"}],[20906079,{"idx":95,"name":"stdmb-broken-light","tpage_name":"stadiumb-vis-tfrag"}],[49545220,{"idx":4,"name":"airlock-door-metal2","tpage_name":"sewe-vis-pris"}],[20906080,{"idx":96,"name":"rub-palshaft-dirt-blue-01","tpage_name":"stadiumb-vis-tfrag"}],[49545221,{"idx":5,"name":"airlockl-door-metalframe","tpage_name":"sewe-vis-pris"}],[20906081,{"idx":97,"name":"rub-panels-01","tpage_name":"stadiumb-vis-tfrag"}],[49283132,{"idx":60,"name":"sewer-brick-block-11","tpage_name":"sewd-vis-pris"}],[67960832,{"idx":0,"name":"wang_black","tpage_name":"wasintro-hfrag"}],[20906082,{"idx":98,"name":"rub-palace-tower-side","tpage_name":"stadiumb-vis-tfrag"}],[49283133,{"idx":61,"name":"sewer-pipe-rim-05","tpage_name":"sewd-vis-pris"}],[67960833,{"idx":1,"name":"wang_mip","tpage_name":"wasintro-hfrag"}],[50790403,{"idx":3,"name":"fora-water","tpage_name":"foresta-vis-water"}],[20906083,{"idx":99,"name":"rub-met-strp-close","tpage_name":"stadiumb-vis-tfrag"}],[49283134,{"idx":62,"name":"sewer-pipe-rim-05b-hitweak","tpage_name":"sewd-vis-pris"}],[67960834,{"idx":2,"name":"wang_0","tpage_name":"wasintro-hfrag"}],[50790404,{"idx":4,"name":"fora-waterfall-01","tpage_name":"foresta-vis-water"}],[20906084,{"idx":100,"name":"rub-copper-metal-02","tpage_name":"stadiumb-vis-tfrag"}],[49283137,{"idx":65,"name":"sew-wallswitch-metal-01","tpage_name":"sewd-vis-pris"}],[67960837,{"idx":5,"name":"wang_3","tpage_name":"wasintro-hfrag"}],[50790407,{"idx":7,"name":"fora-water-dest","tpage_name":"foresta-vis-water"}],[20906087,{"idx":103,"name":"stdmb-track-01","tpage_name":"stadiumb-vis-tfrag"}],[20906090,{"idx":106,"name":"stdmb-lightpost-base-02","tpage_name":"stadiumb-vis-tfrag"}],[50790411,{"idx":11,"name":"fora-water-wave-01","tpage_name":"foresta-vis-water"}],[20906091,{"idx":107,"name":"rub-stad-brick-pieces","tpage_name":"stadiumb-vis-tfrag"}],[50790412,{"idx":12,"name":"fora-water-wave-01-dest","tpage_name":"foresta-vis-water"}],[20906092,{"idx":108,"name":"rub-city-wall-frame","tpage_name":"stadiumb-vis-tfrag"}],[50790413,{"idx":13,"name":"for-prec-text","tpage_name":"foresta-vis-water"}],[20906093,{"idx":109,"name":"rub-cement-top","tpage_name":"stadiumb-vis-tfrag"}],[20906094,{"idx":110,"name":"rub-rubble-ground","tpage_name":"stadiumb-vis-tfrag"}],[49545238,{"idx":22,"name":"power-switch-01","tpage_name":"sewe-vis-pris"}],[20906098,{"idx":114,"name":"citywide-sail-01","tpage_name":"stadiumb-vis-tfrag"}],[21299213,{"idx":13,"name":"vehicle-dash-02","tpage_name":"wasall-pris"}],[21299214,{"idx":14,"name":"vehicle-exhaust-pipe-01","tpage_name":"wasall-pris"}],[21299216,{"idx":16,"name":"vehicle-gas-tank-01","tpage_name":"wasall-pris"}],[21299217,{"idx":17,"name":"vehicle-gun-box-01","tpage_name":"wasall-pris"}],[21299218,{"idx":18,"name":"vehicle-gun-box-top-01","tpage_name":"wasall-pris"}],[21299219,{"idx":19,"name":"vehicle-metal-plate-01","tpage_name":"wasall-pris"}],[21299220,{"idx":20,"name":"vehicle-pad-01","tpage_name":"wasall-pris"}],[21299221,{"idx":21,"name":"vehicle-pipe-01","tpage_name":"wasall-pris"}],[48758848,{"idx":64,"name":"sewer-pipe-rim-05b-hitweak","tpage_name":"sewc-vis-tfrag"}],[21299222,{"idx":22,"name":"vehicle-rims-01","tpage_name":"wasall-pris"}],[21299223,{"idx":23,"name":"vehicle-shocks-01","tpage_name":"wasall-pris"}],[21299224,{"idx":24,"name":"vehicle-side-panel-01","tpage_name":"wasall-pris"}],[21299225,{"idx":25,"name":"vehicle-sml-met-01","tpage_name":"wasall-pris"}],[21299226,{"idx":26,"name":"vehicle-tread-01","tpage_name":"wasall-pris"}],[21299227,{"idx":27,"name":"vehicle-wheel-01","tpage_name":"wasall-pris"}],[21299228,{"idx":28,"name":"vehicle-wire-01","tpage_name":"wasall-pris"}],[21299229,{"idx":29,"name":"common-black","tpage_name":"wasall-pris"}],[21299230,{"idx":30,"name":"vehicle-chrome-pipe-01","tpage_name":"wasall-pris"}],[21299231,{"idx":31,"name":"vehicle-metal-plate-02","tpage_name":"wasall-pris"}],[21299232,{"idx":32,"name":"vehicle-safety-plate-01","tpage_name":"wasall-pris"}],[39780359,{"idx":7,"name":"nsta-finger-pipe","tpage_name":"nstb-vis-pris"}],[21299233,{"idx":33,"name":"vehicle-snake-chassis-01","tpage_name":"wasall-pris"}],[21299234,{"idx":34,"name":"vehicle-snake-drum-01","tpage_name":"wasall-pris"}],[21299235,{"idx":35,"name":"vehicle-snake-drum-02","tpage_name":"wasall-pris"}],[21299237,{"idx":37,"name":"vehicle-snake-tank-01","tpage_name":"wasall-pris"}],[21299238,{"idx":38,"name":"vehicle-snake-tank-02","tpage_name":"wasall-pris"}],[73596934,{"idx":6,"name":"sewer-block-02-hitweak","tpage_name":"sewi-vis-tfrag"}],[74842114,{"idx":2,"name":"sewer-watefall-froth-01-l","tpage_name":"sewl-vis-water"}],[21299239,{"idx":39,"name":"vehicle-snake-tread-01","tpage_name":"wasall-pris"}],[73596935,{"idx":7,"name":"sewer-brick-roof-03","tpage_name":"sewi-vis-tfrag"}],[74842115,{"idx":3,"name":"sewer-waterfall-02-l","tpage_name":"sewl-vis-water"}],[11403342,{"idx":78,"name":"ctyslumc-window-panes2","tpage_name":"ctyslumc-vis-tfrag"}],[35061762,{"idx":2,"name":"windshield01","tpage_name":"factorya-water"}],[11403343,{"idx":79,"name":"ctyslumc-tarp-01","tpage_name":"ctyslumc-vis-tfrag"}],[35061763,{"idx":3,"name":"errolcyber-lens","tpage_name":"factorya-water"}],[48627781,{"idx":69,"name":"sewer-big-brace-02","tpage_name":"sewb-vis-tfrag"}],[61079581,{"idx":29,"name":"minc-door-metal-01","tpage_name":"minec-vis-pris"}],[21299241,{"idx":41,"name":"vehicle-tread-blur-01","tpage_name":"wasall-pris"}],[48627782,{"idx":70,"name":"sewer-metal-trim-02","tpage_name":"sewb-vis-tfrag"}],[61079582,{"idx":30,"name":"minc-rust-01","tpage_name":"minec-vis-pris"}],[21299243,{"idx":43,"name":"vehicle-green-dash-01","tpage_name":"wasall-pris"}],[62259221,{"idx":21,"name":"seat01","tpage_name":"ctycarc-pris"}],[61014041,{"idx":25,"name":"mine-moving-step-top-lod02","tpage_name":"minec-vis-shrub"}],[52297781,{"idx":53,"name":"freehq-monitor03","tpage_name":"freehq-tfrag"}],[48562241,{"idx":65,"name":"jakchires-chestplate","tpage_name":"sewa-vis-pris"}],[67239941,{"idx":5,"name":"vin-blue-light","tpage_name":"vinroom-vis-tfrag"}],[115081302,{"idx":86,"name":"jakchires-shoeteop","tpage_name":"desboss1-pris"}],[21299244,{"idx":44,"name":"vehicle-lite-01","tpage_name":"wasall-pris"}],[21299245,{"idx":45,"name":"vehicle-pad-02","tpage_name":"wasall-pris"}],[62259223,{"idx":23,"name":"turret01","tpage_name":"ctycarc-pris"}],[61014043,{"idx":27,"name":"minc-rust-pipe-07","tpage_name":"minec-vis-shrub"}],[57278503,{"idx":39,"name":"metalflut-eye","tpage_name":"waswide-vis-pris"}],[52297783,{"idx":55,"name":"freehq-monitor08","tpage_name":"freehq-tfrag"}],[48562243,{"idx":67,"name":"jakchires-eye","tpage_name":"sewa-vis-pris"}],[67239943,{"idx":7,"name":"vin-control-panel-02","tpage_name":"vinroom-vis-tfrag"}],[115081304,{"idx":88,"name":"vehicle-snake-tread-01","tpage_name":"desboss1-pris"}],[21299246,{"idx":46,"name":"vehicle-shocks-02","tpage_name":"wasall-pris"}],[21299247,{"idx":47,"name":"vehicle-shocks-03","tpage_name":"wasall-pris"}],[48627788,{"idx":76,"name":"sewer-metal-block-02","tpage_name":"sewb-vis-tfrag"}],[61079588,{"idx":36,"name":"minc-blue-paint-rust02","tpage_name":"minec-vis-pris"}],[21299248,{"idx":48,"name":"vehicle-shocks-stretch-01","tpage_name":"wasall-pris"}],[48627789,{"idx":77,"name":"sewer-rubber-rim-01","tpage_name":"sewb-vis-tfrag"}],[61079589,{"idx":37,"name":"minc-plate-01","tpage_name":"minec-vis-pris"}],[21299249,{"idx":49,"name":"vehicle-shocks-stretch-02","tpage_name":"wasall-pris"}],[21299250,{"idx":50,"name":"vehicle-tread-blur-02","tpage_name":"wasall-pris"}],[21299251,{"idx":51,"name":"vehicle-turtle-dash-01","tpage_name":"wasall-pris"}],[21299252,{"idx":52,"name":"vehicle-toad-chassis-01","tpage_name":"wasall-pris"}],[21299253,{"idx":53,"name":"vehicle-toad-chassis-02","tpage_name":"wasall-pris"}],[21299254,{"idx":54,"name":"vehicle-toad-chassis-03","tpage_name":"wasall-pris"}],[21299255,{"idx":55,"name":"vehicle-toad-exhaust-01","tpage_name":"wasall-pris"}],[38731776,{"idx":0,"name":"lava-drop-01","tpage_name":"wasstada-sprite"}],[21299256,{"idx":56,"name":"vehicle-toad-tank-01","tpage_name":"wasall-pris"}],[38731777,{"idx":1,"name":"lava-drop-02","tpage_name":"wasstada-sprite"}],[21299257,{"idx":57,"name":"vehicle-toad-tank-02","tpage_name":"wasall-pris"}],[38731778,{"idx":2,"name":"lava-drop-03","tpage_name":"wasstada-sprite"}],[21299258,{"idx":58,"name":"vehicle-toad-tire-01","tpage_name":"wasall-pris"}],[38731779,{"idx":3,"name":"lava-drop-04","tpage_name":"wasstada-sprite"}],[21299259,{"idx":59,"name":"vehicle-snake-tread-01-blur","tpage_name":"wasall-pris"}],[21299260,{"idx":60,"name":"vehicle-toad-tire-01-blur","tpage_name":"wasall-pris"}],[21299261,{"idx":61,"name":"vehicle-toad-dash-01","tpage_name":"wasall-pris"}],[63438851,{"idx":3,"name":"waspala-water","tpage_name":"waspala-water"}],[57212951,{"idx":23,"name":"was-burningbush-02","tpage_name":"waswide-vis-tfrag"}],[60948491,{"idx":11,"name":"minc-rust-02","tpage_name":"minec-vis-tfrag"}],[62193671,{"idx":7,"name":"bikecside01","tpage_name":"ctycarb-pris"}],[154796042,{"idx":10,"name":"daxterfoot","tpage_name":"ljakndax-pris"}],[144834602,{"idx":42,"name":"rail-patch-01","tpage_name":"combn-tfrag"}],[106234022,{"idx":166,"name":"roboboss-darkmetdull-01","tpage_name":"mined-pris"}],[94240862,{"idx":94,"name":"palcab-lowres-background-grass-to-desert-02","tpage_name":"intpfall-vis-tfrag"}],[21299278,{"idx":78,"name":"vehicle-snake-gun-01","tpage_name":"wasall-pris"}],[63438852,{"idx":4,"name":"waspala-waterfall","tpage_name":"waspala-water"}],[57212952,{"idx":24,"name":"was-burningbush-light-01","tpage_name":"waswide-vis-tfrag"}],[60948492,{"idx":12,"name":"minc-blue-yel-paint-safe-rust04","tpage_name":"minec-vis-tfrag"}],[62193672,{"idx":8,"name":"bikecwing01","tpage_name":"ctycarb-pris"}],[154796043,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"ljakndax-pris"}],[144834603,{"idx":43,"name":"rail-env-car-01","tpage_name":"combn-tfrag"}],[106234023,{"idx":167,"name":"roboboss-darkmetdull-02","tpage_name":"mined-pris"}],[21299279,{"idx":79,"name":"vehicle-snake-gun-02","tpage_name":"wasall-pris"}],[63438853,{"idx":5,"name":"waspala-waterfall-dest","tpage_name":"waspala-water"}],[57212953,{"idx":25,"name":"was-burningbush-03","tpage_name":"waswide-vis-tfrag"}],[60948493,{"idx":13,"name":"minc-blue-white-paint-safe-rust04","tpage_name":"minec-vis-tfrag"}],[62193673,{"idx":9,"name":"exstpipe01","tpage_name":"ctycarb-pris"}],[154796044,{"idx":12,"name":"daxtergoggles","tpage_name":"ljakndax-pris"}],[151060504,{"idx":24,"name":"common-black","tpage_name":"factoryc-vis-pris"}],[106234024,{"idx":168,"name":"roboboss-nose","tpage_name":"mined-pris"}],[21299280,{"idx":80,"name":"intcept-tread01","tpage_name":"wasall-pris"}],[63438854,{"idx":6,"name":"waspala-water-dest","tpage_name":"waspala-water"}],[57212954,{"idx":26,"name":"was-burningbush-01","tpage_name":"waswide-vis-tfrag"}],[60948494,{"idx":14,"name":"minc-blue-paint-01","tpage_name":"minec-vis-tfrag"}],[62193674,{"idx":10,"name":"floorboard01","tpage_name":"ctycarb-pris"}],[154796045,{"idx":13,"name":"daxterheadwidenew","tpage_name":"ljakndax-pris"}],[151060505,{"idx":25,"name":"fac-switch-green-01","tpage_name":"factoryc-vis-pris"}],[144834605,{"idx":45,"name":"rail-light-blue","tpage_name":"combn-tfrag"}],[106234025,{"idx":169,"name":"roboboss-pipe-02","tpage_name":"mined-pris"}],[21299281,{"idx":81,"name":"rhino-front-01","tpage_name":"wasall-pris"}],[57212955,{"idx":27,"name":"was-burningbush-04","tpage_name":"waswide-vis-tfrag"}],[60948495,{"idx":15,"name":"minc-chain-metal-01","tpage_name":"minec-vis-tfrag"}],[62193675,{"idx":11,"name":"pipe01","tpage_name":"ctycarb-pris"}],[154796046,{"idx":14,"name":"daxterhelmetplain","tpage_name":"ljakndax-pris"}],[151060506,{"idx":26,"name":"fac-switch-red-01","tpage_name":"factoryc-vis-pris"}],[144834606,{"idx":46,"name":"rail-edge-01","tpage_name":"combn-tfrag"}],[106234026,{"idx":170,"name":"roboboss-pipe-shin","tpage_name":"mined-pris"}],[21299282,{"idx":82,"name":"rhino-front-02","tpage_name":"wasall-pris"}],[21299285,{"idx":85,"name":"rhino-metal-01","tpage_name":"wasall-pris"}],[21299286,{"idx":86,"name":"rhino-rag-01","tpage_name":"wasall-pris"}],[21299287,{"idx":87,"name":"rhino-scoop-01","tpage_name":"wasall-pris"}],[48693248,{"idx":0,"name":"sewer-nut","tpage_name":"sewb-vis-shrub"}],[21299288,{"idx":88,"name":"rhino-wheel-01","tpage_name":"wasall-pris"}],[57147394,{"idx":2,"name":"king-arm","tpage_name":"waspala-pris2"}],[53673985,{"idx":1,"name":"fora-rock","tpage_name":"forestb-vis-tfrag"}],[21299305,{"idx":105,"name":"vehicle-fox-gun-02","tpage_name":"wasall-pris"}],[57147400,{"idx":8,"name":"king-ear","tpage_name":"waspala-pris2"}],[21299311,{"idx":111,"name":"vehicle-fox-engine","tpage_name":"wasall-pris"}],[17956937,{"idx":73,"name":"city-step","tpage_name":"ctyport-vis-tfrag"}],[35389457,{"idx":17,"name":"cguard1-gunmetaldark2","tpage_name":"introcst-pris"}],[57147401,{"idx":9,"name":"king-earing","tpage_name":"waspala-pris2"}],[21299312,{"idx":112,"name":"vehicle-fox-exhaust-tube","tpage_name":"wasall-pris"}],[17956938,{"idx":74,"name":"citywide-palace-tower-side","tpage_name":"ctyport-vis-tfrag"}],[35389458,{"idx":18,"name":"cguard1-gunstrap","tpage_name":"introcst-pris"}],[57147402,{"idx":10,"name":"king-face-01","tpage_name":"waspala-pris2"}],[21299313,{"idx":113,"name":"vehicle-fox-grill","tpage_name":"wasall-pris"}],[57147403,{"idx":11,"name":"king-finger","tpage_name":"waspala-pris2"}],[92209152,{"idx":0,"name":"bam-eyelight","tpage_name":"ldamklev-pris"}],[21299314,{"idx":114,"name":"vehicle-fox-pipe-large","tpage_name":"wasall-pris"}],[60882944,{"idx":0,"name":"manta-eye-01","tpage_name":"mineb-vis-pris"}],[57147404,{"idx":12,"name":"king-greenmetal","tpage_name":"waspala-pris2"}],[92209153,{"idx":1,"name":"bam-hairhilite","tpage_name":"ldamklev-pris"}],[21299315,{"idx":115,"name":"vehicle-fox-pipe-small","tpage_name":"wasall-pris"}],[60882945,{"idx":1,"name":"manta-gem-01","tpage_name":"mineb-vis-pris"}],[57147405,{"idx":13,"name":"king-greenmetalplain","tpage_name":"waspala-pris2"}],[92209154,{"idx":2,"name":"klever-earcup","tpage_name":"ldamklev-pris"}],[21299316,{"idx":116,"name":"vehicle-fox-plate-back","tpage_name":"wasall-pris"}],[17956942,{"idx":78,"name":"city-metal-pipeside-01","tpage_name":"ctyport-vis-tfrag"}],[35389462,{"idx":22,"name":"cguard1-lens","tpage_name":"introcst-pris"}],[60882946,{"idx":2,"name":"manta-hose","tpage_name":"mineb-vis-pris"}],[57147406,{"idx":14,"name":"king-hair","tpage_name":"waspala-pris2"}],[92209155,{"idx":3,"name":"klever-eye","tpage_name":"ldamklev-pris"}],[21299317,{"idx":117,"name":"vehicle-fox-plate-hood","tpage_name":"wasall-pris"}],[17956943,{"idx":79,"name":"city-railing","tpage_name":"ctyport-vis-tfrag"}],[35389463,{"idx":23,"name":"cguard1-metalcollar","tpage_name":"introcst-pris"}],[60882947,{"idx":3,"name":"manta-laser","tpage_name":"mineb-vis-pris"}],[57147407,{"idx":15,"name":"king-hand","tpage_name":"waspala-pris2"}],[92209156,{"idx":4,"name":"klever-eyelid","tpage_name":"ldamklev-pris"}],[53673998,{"idx":14,"name":"fora-rock-small","tpage_name":"forestb-vis-tfrag"}],[21299318,{"idx":118,"name":"vehicle-fox-yellow-bar","tpage_name":"wasall-pris"}],[17956944,{"idx":80,"name":"city-wall-base-rim-02","tpage_name":"ctyport-vis-tfrag"}],[35389464,{"idx":24,"name":"cguard1-pants","tpage_name":"introcst-pris"}],[62128128,{"idx":0,"name":"back01","tpage_name":"ctycara-pris"}],[60882948,{"idx":4,"name":"manta-metal-01","tpage_name":"mineb-vis-pris"}],[57147408,{"idx":16,"name":"king-horn","tpage_name":"waspala-pris2"}],[92209157,{"idx":5,"name":"klever-face-01","tpage_name":"ldamklev-pris"}],[21299319,{"idx":119,"name":"vehicle-snake-nu-chassis-01","tpage_name":"wasall-pris"}],[17956945,{"idx":81,"name":"citywide-pillar","tpage_name":"ctyport-vis-tfrag"}],[35389465,{"idx":25,"name":"cguard1-rubber-01","tpage_name":"introcst-pris"}],[26542088,{"idx":8,"name":"wstd-rockwall-01","tpage_name":"wasstada-tfrag"}],[26542089,{"idx":9,"name":"wstd-small-rockwall-01","tpage_name":"wasstada-tfrag"}],[48889902,{"idx":46,"name":"sewer-plate-01","tpage_name":"sewd-vis-tfrag"}],[41418822,{"idx":70,"name":"wascitya-stone-bottom-door","tpage_name":"wascitya-vis-tfrag"}],[55115802,{"idx":26,"name":"wascity-outerwall-metal-c","tpage_name":"wascityb-vis-tfrag"}],[73596929,{"idx":1,"name":"sewer-brick-block-10","tpage_name":"sewi-vis-tfrag"}],[26542123,{"idx":43,"name":"wstd-torchbowl-02","tpage_name":"wasstada-tfrag"}],[48889903,{"idx":47,"name":"sewer-black","tpage_name":"sewd-vis-tfrag"}],[41418823,{"idx":71,"name":"waspala-elevator-metal","tpage_name":"wascitya-vis-tfrag"}],[55115803,{"idx":27,"name":"wascity-stucco-wall-bleached-edge-01","tpage_name":"wascityb-vis-tfrag"}],[71106570,{"idx":10,"name":"wstd-stands-shell01","tpage_name":"wasstadb-tfrag"}],[73596930,{"idx":2,"name":"sewer-brick-block-11","tpage_name":"sewi-vis-tfrag"}],[26542124,{"idx":44,"name":"wstd-torchbowl-coal-01","tpage_name":"wasstada-tfrag"}],[41418824,{"idx":72,"name":"waspala-elevator-bolt","tpage_name":"wascitya-vis-tfrag"}],[55115804,{"idx":28,"name":"wascity-wall-weathered","tpage_name":"wascityb-vis-tfrag"}],[71106571,{"idx":11,"name":"wstd-stands-rib","tpage_name":"wasstadb-tfrag"}],[73596931,{"idx":3,"name":"sewer-brick-block-02","tpage_name":"sewi-vis-tfrag"}],[26542125,{"idx":45,"name":"wstd-torchbowl-01","tpage_name":"wasstada-tfrag"}],[48889905,{"idx":49,"name":"sewer-metal-floor-01","tpage_name":"sewd-vis-tfrag"}],[41418825,{"idx":73,"name":"waspala-elevator-wood02","tpage_name":"wascitya-vis-tfrag"}],[55115805,{"idx":29,"name":"wascity-stonewall-bricks-HI","tpage_name":"wascityb-vis-tfrag"}],[73596932,{"idx":4,"name":"sewer-brick-block-04","tpage_name":"sewi-vis-tfrag"}],[26542126,{"idx":46,"name":"wstd-spike-01","tpage_name":"wasstada-tfrag"}],[48889910,{"idx":54,"name":"sewer-round-02","tpage_name":"sewd-vis-tfrag"}],[41418830,{"idx":78,"name":"waspala-elevator-tube","tpage_name":"wascitya-vis-tfrag"}],[55115810,{"idx":34,"name":"wascity-ground-01","tpage_name":"wascityb-vis-tfrag"}],[71106577,{"idx":17,"name":"wstd-stands-lowall01","tpage_name":"wasstadb-tfrag"}],[74842117,{"idx":5,"name":"sewer-watefall-froth-01-l-dest","tpage_name":"sewl-vis-water"}],[73596937,{"idx":9,"name":"sewer-brick-block-01","tpage_name":"sewi-vis-tfrag"}],[41484291,{"idx":3,"name":"wascity-overlay-tribal-1","tpage_name":"wascitya-vis-shrub"}],[26542131,{"idx":51,"name":"mtn-environment-front-backup","tpage_name":"wasstada-tfrag"}],[48889911,{"idx":55,"name":"sewer-bolt-side-01","tpage_name":"sewd-vis-tfrag"}],[41418831,{"idx":79,"name":"waspala-elevator-bolt02","tpage_name":"wascitya-vis-tfrag"}],[55115811,{"idx":35,"name":"wascity-ground-2-ditch-03","tpage_name":"wascityb-vis-tfrag"}],[73596938,{"idx":10,"name":"sewer-black","tpage_name":"sewi-vis-tfrag"}],[41484292,{"idx":4,"name":"wascity-overlay-bullethole-b","tpage_name":"wascitya-vis-shrub"}],[26542132,{"idx":52,"name":"wstd-precursor-metal-plain-01","tpage_name":"wasstada-tfrag"}],[48889924,{"idx":68,"name":"sewer-brick-roof-05","tpage_name":"sewd-vis-tfrag"}],[41418844,{"idx":92,"name":"wascity-palace-elevator-shaft","tpage_name":"wascitya-vis-tfrag"}],[55115824,{"idx":48,"name":"wascity-ditch-wall-top-to-ground-edging","tpage_name":"wascityb-vis-tfrag"}],[41484305,{"idx":17,"name":"wascity-roof-1","tpage_name":"wascitya-vis-shrub"}],[26542145,{"idx":65,"name":"wstd-stands-seats02","tpage_name":"wasstada-tfrag"}],[48889925,{"idx":69,"name":"sewer-brick-block-10","tpage_name":"sewd-vis-tfrag"}],[55115825,{"idx":49,"name":"wascity-ditch-wall-top-to-beach","tpage_name":"wascityb-vis-tfrag"}],[262280,{"idx":136,"name":"shell-casing-02","tpage_name":"level-default-sprite"}],[38862860,{"idx":12,"name":"nsta-cave-stalags-04-insides","tpage_name":"nsta-vis-tfrag"}],[71434249,{"idx":9,"name":"wstd-throne-wall01","tpage_name":"wasstadc-tfrag"}],[49021009,{"idx":81,"name":"sewer-brick-block-04-hitweak","tpage_name":"sewe-vis-tfrag"}],[73924609,{"idx":1,"name":"sewer-pipe-small-01","tpage_name":"sewg-vis-shrub"}],[41484306,{"idx":18,"name":"wascity-outerwall-metal-b","tpage_name":"wascitya-vis-shrub"}],[26542146,{"idx":66,"name":"wstd-stands-seats01","tpage_name":"wasstada-tfrag"}],[48889926,{"idx":70,"name":"sewer-brick-block-11","tpage_name":"sewd-vis-tfrag"}],[55115826,{"idx":50,"name":"wascity-beach-01","tpage_name":"wascityb-vis-tfrag"}],[262281,{"idx":137,"name":"shell-casing-03","tpage_name":"level-default-sprite"}],[38862861,{"idx":13,"name":"nsta-cave-plain","tpage_name":"nsta-vis-tfrag"}],[73924610,{"idx":2,"name":"sewer-moss-01","tpage_name":"sewg-vis-shrub"}],[41484307,{"idx":19,"name":"wascity-outerwall-metal-c","tpage_name":"wascitya-vis-shrub"}],[26542147,{"idx":67,"name":"wstd-stands-stairs02","tpage_name":"wasstada-tfrag"}],[48889927,{"idx":71,"name":"sewer-small-light-01","tpage_name":"sewd-vis-tfrag"}],[55115827,{"idx":51,"name":"wascity-beach-wet-02","tpage_name":"wascityb-vis-tfrag"}],[38862862,{"idx":14,"name":"nsta-cave-plain-edging","tpage_name":"nsta-vis-tfrag"}],[73924611,{"idx":3,"name":"sewer-hang-moss-01","tpage_name":"sewg-vis-shrub"}],[41484308,{"idx":20,"name":"wascity-metal-dirty","tpage_name":"wascitya-vis-shrub"}],[26542148,{"idx":68,"name":"wstd-stands-stairs01","tpage_name":"wasstada-tfrag"}],[71303168,{"idx":0,"name":"bam-eyelight","tpage_name":"ldamsig-pris2"}],[48889928,{"idx":72,"name":"sewer-metal-block-02","tpage_name":"sewd-vis-tfrag"}],[55115828,{"idx":52,"name":"wascity-beach-wet-01","tpage_name":"wascityb-vis-tfrag"}],[262283,{"idx":139,"name":"rockbit01","tpage_name":"level-default-sprite"}],[38862863,{"idx":15,"name":"nsta-cave-carved-surface-bottom","tpage_name":"nsta-vis-tfrag"}],[73924612,{"idx":4,"name":"sew-jump-pad-grate","tpage_name":"sewg-vis-shrub"}],[41484309,{"idx":21,"name":"wascitya-redish-metal","tpage_name":"wascitya-vis-shrub"}],[26542149,{"idx":69,"name":"wstd-tentacle-plate03","tpage_name":"wasstada-tfrag"}],[262284,{"idx":140,"name":"rockbit02","tpage_name":"level-default-sprite"}],[38862864,{"idx":16,"name":"nsta-cave-carved-surface","tpage_name":"nsta-vis-tfrag"}],[73924613,{"idx":5,"name":"sewer-metal-01","tpage_name":"sewg-vis-shrub"}],[41484310,{"idx":22,"name":"wascity-base","tpage_name":"wascitya-vis-shrub"}],[26542150,{"idx":70,"name":"wstd-tentacle-plate01","tpage_name":"wasstada-tfrag"}],[38862865,{"idx":17,"name":"nsta-finger-pipe","tpage_name":"nsta-vis-tfrag"}],[73924614,{"idx":6,"name":"sewer-plate-05","tpage_name":"sewg-vis-shrub"}],[41484311,{"idx":23,"name":"wascity-outerwall-metal-d","tpage_name":"wascitya-vis-shrub"}],[26542151,{"idx":71,"name":"wstd-tentacle-barrel","tpage_name":"wasstada-tfrag"}],[38862866,{"idx":18,"name":"nestb-basekor","tpage_name":"nsta-vis-tfrag"}],[73924615,{"idx":7,"name":"sewer-pipe-01","tpage_name":"sewg-vis-shrub"}],[48955392,{"idx":0,"name":"sewer-nut","tpage_name":"sewd-vis-shrub"}],[41484312,{"idx":24,"name":"common-black","tpage_name":"wascitya-vis-shrub"}],[26542152,{"idx":72,"name":"wstd-floor-panel02","tpage_name":"wasstada-tfrag"}],[62652419,{"idx":3,"name":"citfat-1-headtop","tpage_name":"ctypepa-pris"}],[26542199,{"idx":119,"name":"wstd-platform-wall","tpage_name":"wasstada-tfrag"}],[75759680,{"idx":64,"name":"onin-rings","tpage_name":"onintent-pris"}],[81985580,{"idx":44,"name":"wstlander-02-ponytail","tpage_name":"wasstadc-pris"}],[62652420,{"idx":4,"name":"citfat-1-pants","tpage_name":"ctypepa-pris"}],[26542200,{"idx":120,"name":"wstd-scaffold-teeth","tpage_name":"wasstada-tfrag"}],[75759681,{"idx":65,"name":"onin-rings2","tpage_name":"onintent-pris"}],[81985581,{"idx":45,"name":"wstlander-02-scarf","tpage_name":"wasstadc-pris"}],[62652421,{"idx":5,"name":"citfat-buzzcut","tpage_name":"ctypepa-pris"}],[26542201,{"idx":121,"name":"wstd-scaffold-wall-edge","tpage_name":"wasstada-tfrag"}],[75759682,{"idx":66,"name":"onin-scarf","tpage_name":"onintent-pris"}],[81985582,{"idx":46,"name":"wstlander-02-shirt","tpage_name":"wasstadc-pris"}],[62652423,{"idx":7,"name":"citfat-cottonbutton","tpage_name":"ctypepa-pris"}],[26542203,{"idx":123,"name":"wstd-scaffold-wall-02","tpage_name":"wasstada-tfrag"}],[8847389,{"idx":29,"name":"des-burn-eye-off","tpage_name":"ctysluma-vis-shrub"}],[17563649,{"idx":1,"name":"ctyport-muddrop","tpage_name":"ctyport-sprite"}],[62652424,{"idx":8,"name":"citfat-cottonclip","tpage_name":"ctypepa-pris"}],[26542204,{"idx":124,"name":"wstd-scaffold-plate-01","tpage_name":"wasstada-tfrag"}],[62652425,{"idx":9,"name":"citfat-eye","tpage_name":"ctypepa-pris"}],[26542205,{"idx":125,"name":"wstd-scaffold-wall-03","tpage_name":"wasstada-tfrag"}],[62652426,{"idx":10,"name":"citfat-eyebrow","tpage_name":"ctypepa-pris"}],[26542206,{"idx":126,"name":"wstd-scaffold-bar","tpage_name":"wasstada-tfrag"}],[75759687,{"idx":71,"name":"pecker-body-01","tpage_name":"onintent-pris"}],[96927747,{"idx":3,"name":"torn-armlft","tpage_name":"ltornjnx-pris2"}],[81985587,{"idx":51,"name":"wstlander-04-gun","tpage_name":"wasstadc-pris"}],[62652429,{"idx":13,"name":"citfat-hairflat","tpage_name":"ctypepa-pris"}],[26542209,{"idx":129,"name":"common_sandstone_taper01","tpage_name":"wasstada-tfrag"}],[62652430,{"idx":14,"name":"citfat-hairtrans","tpage_name":"ctypepa-pris"}],[26542210,{"idx":130,"name":"common_sandstone_ground01","tpage_name":"wasstada-tfrag"}],[62652431,{"idx":15,"name":"citichic-boot-01","tpage_name":"ctypepa-pris"}],[26542211,{"idx":131,"name":"common_sandstone_trim01","tpage_name":"wasstada-tfrag"}],[11337757,{"idx":29,"name":"ctyslumc-wire","tpage_name":"ctyslumc-vis-shrub"}],[17563657,{"idx":9,"name":"hiphog-exterior-orange-on","tpage_name":"ctyport-sprite"}],[62652432,{"idx":16,"name":"citichic-boot-02","tpage_name":"ctypepa-pris"}],[26542212,{"idx":132,"name":"wstd-throne-table-big","tpage_name":"wasstada-tfrag"}],[28049439,{"idx":31,"name":"intr-grey-holes","tpage_name":"intpalrf-tfrag"}],[120520707,{"idx":3,"name":"airlock-door-main","tpage_name":"forestx-vis-pris"}],[94371927,{"idx":87,"name":"stripe03","tpage_name":"intpfall-vis-pris"}],[28049440,{"idx":32,"name":"intr-grey","tpage_name":"intpalrf-tfrag"}],[120520708,{"idx":4,"name":"airlock-door-metal2","tpage_name":"forestx-vis-pris"}],[94371928,{"idx":88,"name":"tpal-beam-red01","tpage_name":"intpfall-vis-pris"}],[28049442,{"idx":34,"name":"tpal-piller-caps01","tpage_name":"intpalrf-tfrag"}],[94371930,{"idx":90,"name":"tpal-drain01","tpage_name":"intpfall-vis-pris"}],[11796540,{"idx":60,"name":"city-ind-wall-band-striped-01","tpage_name":"ctyinda-vis-tfrag"}],[29229060,{"idx":4,"name":"flying-gull-03","tpage_name":"nsta-sprite"}],[11796541,{"idx":61,"name":"city-ind-panels-scorched-02","tpage_name":"ctyinda-vis-tfrag"}],[29229061,{"idx":5,"name":"flying-gull-04","tpage_name":"nsta-sprite"}],[11796542,{"idx":62,"name":"city-ind-panels-scorched-03","tpage_name":"ctyinda-vis-tfrag"}],[29229062,{"idx":6,"name":"flying-gull-05","tpage_name":"nsta-sprite"}],[29229063,{"idx":7,"name":"flying-gull-06","tpage_name":"nsta-sprite"}],[11796544,{"idx":64,"name":"sewer-metal-block-06","tpage_name":"ctyinda-vis-tfrag"}],[29229064,{"idx":8,"name":"ceiling-dust","tpage_name":"nsta-sprite"}],[11796546,{"idx":66,"name":"sewer-metal-floor-02","tpage_name":"ctyinda-vis-tfrag"}],[29229066,{"idx":10,"name":"dust-sparkle","tpage_name":"nsta-sprite"}],[48824321,{"idx":1,"name":"sewer-pipe-small-01","tpage_name":"sewc-vis-shrub"}],[35127341,{"idx":45,"name":"backThing01","tpage_name":"factorya-pris"}],[48824322,{"idx":2,"name":"sewer-shrub-rust-01","tpage_name":"sewc-vis-shrub"}],[262302,{"idx":158,"name":"tinyspeck","tpage_name":"level-default-sprite"}],[35127342,{"idx":46,"name":"dash01","tpage_name":"factorya-pris"}],[48824323,{"idx":3,"name":"sewer-moss-01","tpage_name":"sewc-vis-shrub"}],[262303,{"idx":159,"name":"explo-texture","tpage_name":"level-default-sprite"}],[35127343,{"idx":47,"name":"gauge01","tpage_name":"factorya-pris"}],[48824324,{"idx":4,"name":"sewer-hang-moss-01","tpage_name":"sewc-vis-shrub"}],[262304,{"idx":160,"name":"big-cloud","tpage_name":"level-default-sprite"}],[35127344,{"idx":48,"name":"grillRim01","tpage_name":"factorya-pris"}],[53674000,{"idx":16,"name":"fora-grass-fringe","tpage_name":"forestb-vis-tfrag"}],[58654720,{"idx":0,"name":"hiphog-daxter-neon-off","tpage_name":"hiphog-sprite"}],[48824325,{"idx":5,"name":"sewer-shrub-pitting-01","tpage_name":"sewc-vis-shrub"}],[262305,{"idx":161,"name":"rockbit03","tpage_name":"level-default-sprite"}],[35127345,{"idx":49,"name":"gunBoxBack01","tpage_name":"factorya-pris"}],[53674001,{"idx":17,"name":"fora-grass-to-mud","tpage_name":"forestb-vis-tfrag"}],[58654721,{"idx":1,"name":"hiphog-daxter-neon-on","tpage_name":"hiphog-sprite"}],[262306,{"idx":162,"name":"rockbit04","tpage_name":"level-default-sprite"}],[35127346,{"idx":50,"name":"gunBoxFront01","tpage_name":"factorya-pris"}],[53674002,{"idx":18,"name":"turret-mh-metal","tpage_name":"forestb-vis-tfrag"}],[58654722,{"idx":2,"name":"hiphog-mirror","tpage_name":"hiphog-sprite"}],[262307,{"idx":163,"name":"rockbit05","tpage_name":"level-default-sprite"}],[35127347,{"idx":51,"name":"gunbox01","tpage_name":"factorya-pris"}],[61145088,{"idx":0,"name":"waspala-glass-03","tpage_name":"waspala-alpha"}],[58654728,{"idx":8,"name":"hiphog-neon-clock-moon","tpage_name":"hiphog-sprite"}],[262313,{"idx":169,"name":"rockbit11","tpage_name":"level-default-sprite"}],[35127353,{"idx":57,"name":"light01","tpage_name":"factorya-pris"}],[103350346,{"idx":74,"name":"pecker-face","tpage_name":"comba-pris"}],[58654729,{"idx":9,"name":"hiphog-neon-clock-moon-small","tpage_name":"hiphog-sprite"}],[262314,{"idx":170,"name":"rockbit12","tpage_name":"level-default-sprite"}],[35127354,{"idx":58,"name":"lightCase01","tpage_name":"factorya-pris"}],[103350347,{"idx":75,"name":"pecker-plume","tpage_name":"comba-pris"}],[58654730,{"idx":10,"name":"hiphog-neon-clock-sun","tpage_name":"hiphog-sprite"}],[262315,{"idx":171,"name":"rockbit13","tpage_name":"level-default-sprite"}],[35127355,{"idx":59,"name":"post01","tpage_name":"factorya-pris"}],[127008768,{"idx":0,"name":"vola-lava-rock-01","tpage_name":"volcanox-tfrag"}],[103350348,{"idx":76,"name":"pecker-tail","tpage_name":"comba-pris"}],[58654731,{"idx":11,"name":"hiphog-neon-clock-sun-small","tpage_name":"hiphog-sprite"}],[262316,{"idx":172,"name":"rockbit14","tpage_name":"level-default-sprite"}],[35127356,{"idx":60,"name":"rail01","tpage_name":"factorya-pris"}],[127008769,{"idx":1,"name":"vola-grass-floor-01","tpage_name":"volcanox-tfrag"}],[103350349,{"idx":77,"name":"pecker-teeth","tpage_name":"comba-pris"}],[262317,{"idx":173,"name":"rockbit15","tpage_name":"level-default-sprite"}],[35127357,{"idx":61,"name":"seat01","tpage_name":"factorya-pris"}],[127008770,{"idx":2,"name":"vola-rock-top","tpage_name":"volcanox-tfrag"}],[103350350,{"idx":78,"name":"pecker-wingbottom","tpage_name":"comba-pris"}],[262318,{"idx":174,"name":"rockbit16","tpage_name":"level-default-sprite"}],[35127358,{"idx":62,"name":"stripe03","tpage_name":"factorya-pris"}],[127008771,{"idx":3,"name":"vola-rock-side","tpage_name":"volcanox-tfrag"}],[103350351,{"idx":79,"name":"pecker-wingtop","tpage_name":"comba-pris"}],[262319,{"idx":175,"name":"light-burst","tpage_name":"level-default-sprite"}],[35127359,{"idx":63,"name":"turret01","tpage_name":"factorya-pris"}],[103350352,{"idx":80,"name":"pecker-yellowfur","tpage_name":"comba-pris"}],[100925462,{"idx":22,"name":"king-precursermetal-trim","tpage_name":"ljkdmpk-pris2"}],[107151362,{"idx":2,"name":"environment-oldmetal","tpage_name":"volcanoa-vis-pris"}],[262320,{"idx":176,"name":"static1","tpage_name":"level-default-sprite"}],[35127360,{"idx":64,"name":"wing01","tpage_name":"factorya-pris"}],[100925463,{"idx":23,"name":"king-precursermetal-trim2","tpage_name":"ljkdmpk-pris2"}],[107151363,{"idx":3,"name":"metalflut-eye","tpage_name":"volcanoa-vis-pris"}],[53805061,{"idx":5,"name":"forb-water","tpage_name":"forestb-vis-water"}],[262321,{"idx":177,"name":"static2","tpage_name":"level-default-sprite"}],[35127361,{"idx":65,"name":"wing02","tpage_name":"factorya-pris"}],[53805062,{"idx":6,"name":"forb-water-dest","tpage_name":"forestb-vis-water"}],[35127362,{"idx":66,"name":"wing02grey01","tpage_name":"factorya-pris"}],[100925465,{"idx":25,"name":"king-shoebottom","tpage_name":"ljkdmpk-pris2"}],[107151365,{"idx":5,"name":"metalflut-leatherstrap-c","tpage_name":"volcanoa-vis-pris"}],[61079568,{"idx":16,"name":"grunt-teeth-01","tpage_name":"minec-vis-pris"}],[48627768,{"idx":56,"name":"sewer-bolt-side-02","tpage_name":"sewb-vis-tfrag"}],[64815108,{"idx":4,"name":"minc-blue-paint-rust05","tpage_name":"minea-vis-shrub"}],[35127376,{"idx":80,"name":"bam-eyelight","tpage_name":"factorya-pris"}],[127008789,{"idx":21,"name":"warpgate-precursormetal","tpage_name":"volcanox-tfrag"}],[103350369,{"idx":97,"name":"rail-pipe-03","tpage_name":"comba-pris"}],[107151379,{"idx":19,"name":"grunt-skin-01","tpage_name":"volcanoa-vis-pris"}],[35127377,{"idx":81,"name":"bam-hairhilite","tpage_name":"factorya-pris"}],[91815938,{"idx":2,"name":"airlock-door-main","tpage_name":"ctyinda-vis-pris"}],[74383418,{"idx":58,"name":"sewer-round-02","tpage_name":"sewj-vis-tfrag"}],[90570758,{"idx":6,"name":"des-wasmetal12","tpage_name":"desertd-vis-tfrag"}],[107151380,{"idx":20,"name":"grunt-skin-02","tpage_name":"volcanoa-vis-pris"}],[35127378,{"idx":82,"name":"daxter-eyelid","tpage_name":"factorya-pris"}],[127008791,{"idx":23,"name":"common_sandstone_taper01","tpage_name":"volcanox-tfrag"}],[103350371,{"idx":99,"name":"rail-cord-01","tpage_name":"comba-pris"}],[107151381,{"idx":21,"name":"grunt-skin-03","tpage_name":"volcanoa-vis-pris"}],[61079571,{"idx":19,"name":"manta-hose","tpage_name":"minec-vis-pris"}],[48627771,{"idx":59,"name":"sewer-round-01","tpage_name":"sewb-vis-tfrag"}],[64815111,{"idx":7,"name":"minc-blue-paint-rust04","tpage_name":"minea-vis-shrub"}],[35127379,{"idx":83,"name":"daxter-furhilite","tpage_name":"factorya-pris"}],[127008792,{"idx":24,"name":"common_sandstone_ground01","tpage_name":"volcanox-tfrag"}],[103350372,{"idx":100,"name":"rail-edge-01","tpage_name":"comba-pris"}],[107151382,{"idx":22,"name":"bam-eyelight","tpage_name":"volcanoa-vis-pris"}],[61079572,{"idx":20,"name":"manta-laser","tpage_name":"minec-vis-pris"}],[48627772,{"idx":60,"name":"sewer-plate-03-hitweak","tpage_name":"sewb-vis-tfrag"}],[64815112,{"idx":8,"name":"min-env-mar-01","tpage_name":"minea-vis-shrub"}],[35127380,{"idx":84,"name":"daxter-orange","tpage_name":"factorya-pris"}],[61079573,{"idx":21,"name":"manta-metal-01","tpage_name":"minec-vis-pris"}],[48627773,{"idx":61,"name":"sewer-big-brace-trim-01","tpage_name":"sewb-vis-tfrag"}],[64815113,{"idx":9,"name":"minc-rust-pipe-05","tpage_name":"minea-vis-shrub"}],[35127381,{"idx":85,"name":"daxterarm","tpage_name":"factorya-pris"}],[61079574,{"idx":22,"name":"manta-metal-02","tpage_name":"minec-vis-pris"}],[48627774,{"idx":62,"name":"sewer-big-brace-trim-02","tpage_name":"sewb-vis-tfrag"}],[64815114,{"idx":10,"name":"minc-rust-bars-01","tpage_name":"minea-vis-shrub"}],[42401792,{"idx":0,"name":"wascity-outerwall-metal-c","tpage_name":"wasdoors-vis-tfrag"}],[75563036,{"idx":28,"name":"sig-skirts-03","tpage_name":"lsig-pris2"}],[35127382,{"idx":86,"name":"daxterbodyshort-eix","tpage_name":"factorya-pris"}],[61079575,{"idx":23,"name":"manta-skin-01","tpage_name":"minec-vis-pris"}],[64815115,{"idx":11,"name":"minc-blue-paint-rust01","tpage_name":"minea-vis-shrub"}],[42401793,{"idx":1,"name":"wascity-outerwall-metal-b","tpage_name":"wasdoors-vis-tfrag"}],[75563037,{"idx":29,"name":"sig-undergarments","tpage_name":"lsig-pris2"}],[35127383,{"idx":87,"name":"daxterbolt","tpage_name":"factorya-pris"}],[135725056,{"idx":0,"name":"bam-eyelight","tpage_name":"lseemwca-pris2"}],[127008796,{"idx":28,"name":"minc-platfrom-metal-01","tpage_name":"volcanox-tfrag"}],[103350376,{"idx":104,"name":"kid-medallion","tpage_name":"comba-pris"}],[48627776,{"idx":64,"name":"sewer-brick-roof-01","tpage_name":"sewb-vis-tfrag"}],[64815116,{"idx":12,"name":"minc-door-metal-01","tpage_name":"minea-vis-shrub"}],[42401794,{"idx":2,"name":"wascity-greenmetal-tube","tpage_name":"wasdoors-vis-tfrag"}],[75563038,{"idx":30,"name":"vin-teeth-01","tpage_name":"lsig-pris2"}],[35127384,{"idx":88,"name":"daxterear","tpage_name":"factorya-pris"}],[135725057,{"idx":1,"name":"environment-oldmetal","tpage_name":"lseemwca-pris2"}],[103350377,{"idx":105,"name":"rail-pipe-01","tpage_name":"comba-pris"}],[48627777,{"idx":65,"name":"sewer-brick-roof-04","tpage_name":"sewb-vis-tfrag"}],[64815117,{"idx":13,"name":"minc-green-paint-02","tpage_name":"minea-vis-shrub"}],[42401795,{"idx":3,"name":"wascity-metal-spike-01","tpage_name":"wasdoors-vis-tfrag"}],[35127385,{"idx":89,"name":"daxterfinger","tpage_name":"factorya-pris"}],[73990144,{"idx":0,"name":"sewer-moss-01","tpage_name":"sewh-vis-shrub"}],[135725058,{"idx":2,"name":"seem-arm","tpage_name":"lseemwca-pris2"}],[103350378,{"idx":106,"name":"rail-detail-01","tpage_name":"comba-pris"}],[48627778,{"idx":66,"name":"sewer-brick-roof-02","tpage_name":"sewb-vis-tfrag"}],[64815118,{"idx":14,"name":"minc-door-metal-03","tpage_name":"minea-vis-shrub"}],[42401796,{"idx":4,"name":"common-black","tpage_name":"wasdoors-vis-tfrag"}],[35127386,{"idx":90,"name":"daxterfoot","tpage_name":"factorya-pris"}],[73990145,{"idx":1,"name":"sewer-hang-moss-01","tpage_name":"sewh-vis-shrub"}],[135725059,{"idx":3,"name":"seem-bootbottom","tpage_name":"lseemwca-pris2"}],[103350379,{"idx":107,"name":"rail-trim-01","tpage_name":"comba-pris"}],[48627779,{"idx":67,"name":"sewer-brick-roof-03","tpage_name":"sewb-vis-tfrag"}],[61079579,{"idx":27,"name":"minc-blue-paint-rust01","tpage_name":"minec-vis-pris"}],[64815119,{"idx":15,"name":"minc-rust-pipe-03","tpage_name":"minea-vis-shrub"}],[10879097,{"idx":121,"name":"city-ind-buldge-light-self-illuminated-03","tpage_name":"ctyslumb-vis-tfrag"}],[48234497,{"idx":1,"name":"des-beach-01","tpage_name":"desert-vis-tfrag"}],[42401797,{"idx":5,"name":"wascity-base","tpage_name":"wasdoors-vis-tfrag"}],[35127387,{"idx":91,"name":"daxterfoot-bottom","tpage_name":"factorya-pris"}],[73990146,{"idx":2,"name":"sewer-nut","tpage_name":"sewh-vis-shrub"}],[48627780,{"idx":68,"name":"sewer-big-brace-01","tpage_name":"sewb-vis-tfrag"}],[64815120,{"idx":16,"name":"minc-safe-plate-02","tpage_name":"minea-vis-shrub"}],[10879098,{"idx":122,"name":"lfacrm-plate-05","tpage_name":"ctyslumb-vis-tfrag"}],[48234498,{"idx":2,"name":"was-burningbush-02","tpage_name":"desert-vis-tfrag"}],[42401798,{"idx":6,"name":"wascitya-airlock-metal","tpage_name":"wasdoors-vis-tfrag"}],[35127388,{"idx":92,"name":"daxtergoggles","tpage_name":"factorya-pris"}],[73990147,{"idx":3,"name":"sewer-pipe-small-01","tpage_name":"sewh-vis-shrub"}],[74383429,{"idx":69,"name":"sewer-big-brace-02","tpage_name":"sewj-vis-tfrag"}],[90570769,{"idx":17,"name":"des-rock-01","tpage_name":"desertd-vis-tfrag"}],[35127389,{"idx":93,"name":"daxterheadwidenew","tpage_name":"factorya-pris"}],[73990148,{"idx":4,"name":"sew-moving-stepb-grate","tpage_name":"sewh-vis-shrub"}],[74383430,{"idx":70,"name":"sewer-block-02","tpage_name":"sewj-vis-tfrag"}],[90570770,{"idx":18,"name":"des-mount-01","tpage_name":"desertd-vis-tfrag"}],[107151392,{"idx":32,"name":"vol-bouncer-cloth","tpage_name":"volcanoa-vis-pris"}],[35127390,{"idx":94,"name":"daxterhelmetplain","tpage_name":"factorya-pris"}],[73990149,{"idx":5,"name":"sew-gasstep-tube","tpage_name":"sewh-vis-shrub"}],[74383431,{"idx":71,"name":"sewer-grate-01","tpage_name":"sewj-vis-tfrag"}],[90570771,{"idx":19,"name":"des-mount-02","tpage_name":"desertd-vis-tfrag"}],[35127391,{"idx":95,"name":"daxterlense","tpage_name":"factorya-pris"}],[35127392,{"idx":96,"name":"daxternose","tpage_name":"factorya-pris"}],[73990151,{"idx":7,"name":"sewer-plate-05","tpage_name":"sewh-vis-shrub"}],[35127394,{"idx":98,"name":"daxtertuft","tpage_name":"factorya-pris"}],[35127395,{"idx":99,"name":"environment-oldmetal","tpage_name":"factorya-pris"}],[42401806,{"idx":14,"name":"wascitya-stone-top","tpage_name":"wasdoors-vis-tfrag"}],[35127396,{"idx":100,"name":"jakc-armor","tpage_name":"factorya-pris"}],[42401807,{"idx":15,"name":"wascitya-stone-bottom","tpage_name":"wasdoors-vis-tfrag"}],[35127397,{"idx":101,"name":"jakc-chestplate-straps","tpage_name":"factorya-pris"}],[90570778,{"idx":26,"name":"des-mount-bottom-01","tpage_name":"desertd-vis-tfrag"}],[42401808,{"idx":16,"name":"wascity-cement-road","tpage_name":"wasdoors-vis-tfrag"}],[35127398,{"idx":102,"name":"jakc-gogglemetal","tpage_name":"factorya-pris"}],[42401809,{"idx":17,"name":"wascitya-stone-top-breakaway","tpage_name":"wasdoors-vis-tfrag"}],[35127399,{"idx":103,"name":"jakc-lens","tpage_name":"factorya-pris"}],[42401810,{"idx":18,"name":"wascity-stonewall-bricks","tpage_name":"wasdoors-vis-tfrag"}],[35127400,{"idx":104,"name":"jakc-scarf","tpage_name":"factorya-pris"}],[107151403,{"idx":43,"name":"spikey-frog-back","tpage_name":"volcanoa-vis-pris"}],[42401811,{"idx":19,"name":"wascity-ditch-wall-top-to-ground","tpage_name":"wasdoors-vis-tfrag"}],[35127401,{"idx":105,"name":"jakc-scarfhanging","tpage_name":"factorya-pris"}],[107151404,{"idx":44,"name":"spikey-frog-belly","tpage_name":"volcanoa-vis-pris"}],[48627712,{"idx":0,"name":"sewer-metal-block-06","tpage_name":"sewb-vis-tfrag"}],[42401812,{"idx":20,"name":"wascity-ground-2-ditch-04","tpage_name":"wasdoors-vis-tfrag"}],[35127402,{"idx":106,"name":"jakc-skirt","tpage_name":"factorya-pris"}],[107151405,{"idx":45,"name":"spikey-frog-eye","tpage_name":"volcanoa-vis-pris"}],[48627713,{"idx":1,"name":"sewer-metal-block-04","tpage_name":"sewb-vis-tfrag"}],[42401813,{"idx":21,"name":"wascity-ground-2-ditch-03","tpage_name":"wasdoors-vis-tfrag"}],[35127403,{"idx":107,"name":"jakc-waistband2","tpage_name":"factorya-pris"}],[107151406,{"idx":46,"name":"spikey-frog-leg","tpage_name":"volcanoa-vis-pris"}],[48627714,{"idx":2,"name":"sewer-pipe-rim-05","tpage_name":"sewb-vis-tfrag"}],[42401814,{"idx":22,"name":"wascity-ground-2-ditch-05","tpage_name":"wasdoors-vis-tfrag"}],[35127404,{"idx":108,"name":"jakc-wraps","tpage_name":"factorya-pris"}],[107151407,{"idx":47,"name":"spikey-frog-legfront","tpage_name":"volcanoa-vis-pris"}],[48562177,{"idx":1,"name":"airlock-door-cog","tpage_name":"sewa-vis-pris"}],[35127410,{"idx":114,"name":"jakchires-chestplate","tpage_name":"factorya-pris"}],[91226116,{"idx":4,"name":"strip-shurb-dripstain-01","tpage_name":"gungame-vis-shrub"}],[89980936,{"idx":8,"name":"des-corral-bar-03","tpage_name":"desertg-vis-tfrag"}],[92471296,{"idx":0,"name":"water-wake","tpage_name":"sewa-sprite"}],[48562178,{"idx":2,"name":"airlock-door-cog1","tpage_name":"sewa-vis-pris"}],[35127411,{"idx":115,"name":"jakchires-clips","tpage_name":"factorya-pris"}],[89980937,{"idx":9,"name":"des-corral-plate-01","tpage_name":"desertg-vis-tfrag"}],[92471297,{"idx":1,"name":"water-trail","tpage_name":"sewa-sprite"}],[48562179,{"idx":3,"name":"airlock-door-main","tpage_name":"sewa-vis-pris"}],[71237632,{"idx":0,"name":"bam-eyelight","tpage_name":"ldampeck-pris2"}],[35127412,{"idx":116,"name":"jakchires-eye","tpage_name":"factorya-pris"}],[48562180,{"idx":4,"name":"airlock-door-metal2","tpage_name":"sewa-vis-pris"}],[71237633,{"idx":1,"name":"environment-oldmetal","tpage_name":"ldampeck-pris2"}],[35127413,{"idx":117,"name":"jakchires-eyebrow","tpage_name":"factorya-pris"}],[89980939,{"idx":11,"name":"des-corral-metal-01","tpage_name":"desertg-vis-tfrag"}],[92471299,{"idx":3,"name":"mech-flame","tpage_name":"sewa-sprite"}],[48562181,{"idx":5,"name":"airlockl-door-metalframe","tpage_name":"sewa-vis-pris"}],[71237634,{"idx":2,"name":"king-arm","tpage_name":"ldampeck-pris2"}],[35127414,{"idx":118,"name":"jakchires-eyelid","tpage_name":"factorya-pris"}],[89980940,{"idx":12,"name":"des-corral-bar-02","tpage_name":"desertg-vis-tfrag"}],[92471300,{"idx":4,"name":"explosion-wave","tpage_name":"sewa-sprite"}],[48562182,{"idx":6,"name":"bam-eyelight","tpage_name":"sewa-vis-pris"}],[43647005,{"idx":29,"name":"market-melon","tpage_name":"waswide-sprite"}],[48627725,{"idx":13,"name":"common-black","tpage_name":"sewb-vis-tfrag"}],[42401825,{"idx":33,"name":"wascitya-airlock-groove","tpage_name":"wasdoors-vis-tfrag"}],[112525323,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"desrescc-pris"}],[71237635,{"idx":3,"name":"king-blackskirt2","tpage_name":"ldampeck-pris2"}],[35127415,{"idx":119,"name":"jakchires-facelft","tpage_name":"factorya-pris"}],[89980941,{"idx":13,"name":"des-corral-metal-05","tpage_name":"desertg-vis-tfrag"}],[92471301,{"idx":5,"name":"bigstarflash","tpage_name":"sewa-sprite"}],[48562183,{"idx":7,"name":"bam-hairhilite","tpage_name":"sewa-vis-pris"}],[43647006,{"idx":30,"name":"market-orange","tpage_name":"waswide-sprite"}],[48627726,{"idx":14,"name":"sewer-pipe-02","tpage_name":"sewb-vis-tfrag"}],[42401826,{"idx":34,"name":"wascitya-stone-top-door","tpage_name":"wasdoors-vis-tfrag"}],[112525324,{"idx":12,"name":"daxtergoggles","tpage_name":"desrescc-pris"}],[71237636,{"idx":4,"name":"king-bluemetal","tpage_name":"ldampeck-pris2"}],[35127416,{"idx":120,"name":"jakchires-facert","tpage_name":"factorya-pris"}],[89980942,{"idx":14,"name":"des-rock-01","tpage_name":"desertg-vis-tfrag"}],[92471302,{"idx":6,"name":"water-froth","tpage_name":"sewa-sprite"}],[48562184,{"idx":8,"name":"daxter-eyelid","tpage_name":"sewa-vis-pris"}],[71237637,{"idx":5,"name":"king-bolt","tpage_name":"ldampeck-pris2"}],[35127417,{"idx":121,"name":"jakchires-glovetop","tpage_name":"factorya-pris"}],[92471303,{"idx":7,"name":"ceiling-dust","tpage_name":"sewa-sprite"}],[48562185,{"idx":9,"name":"daxter-furhilite","tpage_name":"sewa-vis-pris"}],[42401828,{"idx":36,"name":"wascity-red","tpage_name":"wasdoors-vis-tfrag"}],[92209164,{"idx":12,"name":"klever-blackstrap","tpage_name":"ldamklev-pris"}],[95944704,{"idx":0,"name":"bam-eyelight","tpage_name":"freehq-pris2"}],[112525326,{"idx":14,"name":"daxterhelmetplain","tpage_name":"desrescc-pris"}],[71237638,{"idx":6,"name":"king-chest","tpage_name":"ldampeck-pris2"}],[35127418,{"idx":122,"name":"jakchires-hair","tpage_name":"factorya-pris"}],[94961664,{"idx":0,"name":"bam-eyelight","tpage_name":"lsigjakc-pris"}],[92471304,{"idx":8,"name":"flamingstick","tpage_name":"sewa-sprite"}],[48562186,{"idx":10,"name":"daxter-orange","tpage_name":"sewa-vis-pris"}],[71237639,{"idx":7,"name":"king-clip-02","tpage_name":"ldampeck-pris2"}],[35127419,{"idx":123,"name":"jakchires-horn","tpage_name":"factorya-pris"}],[48562187,{"idx":11,"name":"daxterarm","tpage_name":"sewa-vis-pris"}],[48627730,{"idx":18,"name":"sewer-metal-block-07","tpage_name":"sewb-vis-tfrag"}],[42401830,{"idx":38,"name":"wascity-steel-bar-HI","tpage_name":"wasdoors-vis-tfrag"}],[92209166,{"idx":14,"name":"klever-brownstrap","tpage_name":"ldamklev-pris"}],[95944706,{"idx":2,"name":"charHOLD","tpage_name":"freehq-pris2"}],[112525328,{"idx":16,"name":"daxternose","tpage_name":"desrescc-pris"}],[48562188,{"idx":12,"name":"daxterbodyshort-eix","tpage_name":"sewa-vis-pris"}],[52297729,{"idx":1,"name":"common-gray","tpage_name":"freehq-tfrag"}],[48562189,{"idx":13,"name":"daxterbolt","tpage_name":"sewa-vis-pris"}],[48562190,{"idx":14,"name":"daxterear","tpage_name":"sewa-vis-pris"}],[48562191,{"idx":15,"name":"daxterfinger","tpage_name":"sewa-vis-pris"}],[48562192,{"idx":16,"name":"daxterfoot","tpage_name":"sewa-vis-pris"}],[48562193,{"idx":17,"name":"daxterfoot-bottom","tpage_name":"sewa-vis-pris"}],[48562194,{"idx":18,"name":"daxtergoggles","tpage_name":"sewa-vis-pris"}],[48562195,{"idx":19,"name":"daxterheadwidenew","tpage_name":"sewa-vis-pris"}],[48562196,{"idx":20,"name":"daxterhelmetplain","tpage_name":"sewa-vis-pris"}],[52297737,{"idx":9,"name":"freehq-corrosive-metal-01","tpage_name":"freehq-tfrag"}],[48562197,{"idx":21,"name":"daxterlense","tpage_name":"sewa-vis-pris"}],[52297738,{"idx":10,"name":"freehq-gray-metal-disc01","tpage_name":"freehq-tfrag"}],[48562198,{"idx":22,"name":"daxternose","tpage_name":"sewa-vis-pris"}],[48562199,{"idx":23,"name":"daxterteeth","tpage_name":"sewa-vis-pris"}],[75890696,{"idx":8,"name":"onin-bottle-cork","tpage_name":"onintent-tfrag"}],[52297740,{"idx":12,"name":"freehq-wal-plate04","tpage_name":"freehq-tfrag"}],[48562200,{"idx":24,"name":"daxtertuft","tpage_name":"sewa-vis-pris"}],[75890697,{"idx":9,"name":"onin-bowl","tpage_name":"onintent-tfrag"}],[60948543,{"idx":63,"name":"fora-citywall","tpage_name":"minec-vis-tfrag"}],[75890703,{"idx":15,"name":"onin-candle","tpage_name":"onintent-tfrag"}],[60948544,{"idx":64,"name":"fora-metal-wallgrill","tpage_name":"minec-vis-tfrag"}],[75890704,{"idx":16,"name":"onin-candle-holder","tpage_name":"onintent-tfrag"}],[60948545,{"idx":65,"name":"fora-metal-green-main","tpage_name":"minec-vis-tfrag"}],[75890705,{"idx":17,"name":"onin-circle-rug","tpage_name":"onintent-tfrag"}],[60948546,{"idx":66,"name":"fora-metal-green-02","tpage_name":"minec-vis-tfrag"}],[75890706,{"idx":18,"name":"onin-circle-rug-mid","tpage_name":"onintent-tfrag"}],[60948547,{"idx":67,"name":"fora-roof-support","tpage_name":"minec-vis-tfrag"}],[75890707,{"idx":19,"name":"onin-circle-rug-top","tpage_name":"onintent-tfrag"}],[60948549,{"idx":69,"name":"fora-endblocks","tpage_name":"minec-vis-tfrag"}],[75890709,{"idx":21,"name":"onin-critter-face","tpage_name":"onintent-tfrag"}],[75890713,{"idx":25,"name":"onin-dresser-drawer","tpage_name":"onintent-tfrag"}],[94371840,{"idx":0,"name":"palcab-lowres-background-grass-to-desert-01","tpage_name":"intpfall-vis-pris"}],[41615366,{"idx":6,"name":"gekko-body","tpage_name":"wascitya-vis-pris"}],[35389466,{"idx":26,"name":"cguard1-scarf","tpage_name":"introcst-pris"}],[41549824,{"idx":0,"name":"wascity-window-glass-01","tpage_name":"wascitya-vis-water"}],[41615367,{"idx":7,"name":"gekko-eye-01","tpage_name":"wascitya-vis-pris"}],[35389467,{"idx":27,"name":"cguard1-shirt","tpage_name":"introcst-pris"}],[41615374,{"idx":14,"name":"gekko-tubes","tpage_name":"wascitya-vis-pris"}],[35389474,{"idx":34,"name":"daxterarm","tpage_name":"introcst-pris"}],[41615375,{"idx":15,"name":"was-tizard-beak","tpage_name":"wascitya-vis-pris"}],[35389475,{"idx":35,"name":"daxterbodyshort-eix","tpage_name":"introcst-pris"}],[41615380,{"idx":20,"name":"was-tizard-hair","tpage_name":"wascitya-vis-pris"}],[17956960,{"idx":96,"name":"rub-palace-tower-side","tpage_name":"ctyport-vis-tfrag"}],[35389480,{"idx":40,"name":"daxterfoot-bottom","tpage_name":"introcst-pris"}],[49086465,{"idx":1,"name":"sewer-hang-moss-01","tpage_name":"sewe-vis-shrub"}],[35389485,{"idx":45,"name":"daxternose","tpage_name":"introcst-pris"}],[49086466,{"idx":2,"name":"sewer-nut","tpage_name":"sewe-vis-shrub"}],[35389486,{"idx":46,"name":"daxterteeth","tpage_name":"introcst-pris"}],[49086469,{"idx":5,"name":"sewer-screw-02","tpage_name":"sewe-vis-shrub"}],[35389489,{"idx":49,"name":"jackb-lens","tpage_name":"introcst-pris"}],[55312384,{"idx":0,"name":"wascity-outerwall-metal-c","tpage_name":"wascityb-vis-pris"}],[41615404,{"idx":44,"name":"city-mark-clay-pot-01","tpage_name":"wascitya-vis-pris"}],[35389504,{"idx":64,"name":"jakb-horn","tpage_name":"introcst-pris"}],[35389635,{"idx":195,"name":"klever-arm","tpage_name":"introcst-pris"}],[35389636,{"idx":196,"name":"klever-brownstrap","tpage_name":"introcst-pris"}],[35389637,{"idx":197,"name":"klever-chest","tpage_name":"introcst-pris"}],[35389638,{"idx":198,"name":"klever-clips","tpage_name":"introcst-pris"}],[35389641,{"idx":201,"name":"klever-armor-02","tpage_name":"introcst-pris"}],[35389642,{"idx":202,"name":"klever-blackstrap","tpage_name":"introcst-pris"}],[64225285,{"idx":5,"name":"waspala-small-rocks","tpage_name":"waspala-shrub"}],[112394256,{"idx":16,"name":"des-transport-tread","tpage_name":"desrescg-pris"}],[35651606,{"idx":22,"name":"ashelin-redtop","tpage_name":"introcst-pris2"}],[106168357,{"idx":37,"name":"minc-stone01","tpage_name":"mined-tfrag"}],[112394257,{"idx":17,"name":"des-transport-wall-01","tpage_name":"desrescg-pris"}],[56950877,{"idx":93,"name":"waspala-throne-back-02","tpage_name":"waspala-tfrag"}],[106168358,{"idx":38,"name":"minc-light","tpage_name":"mined-tfrag"}],[112394258,{"idx":18,"name":"des-transport-wheel","tpage_name":"desrescg-pris"}],[56950878,{"idx":94,"name":"waspala-palm-dirt","tpage_name":"waspala-tfrag"}],[106168359,{"idx":39,"name":"minc-brok-edge01","tpage_name":"mined-tfrag"}],[112394259,{"idx":19,"name":"des-transport-wheel-back","tpage_name":"desrescg-pris"}],[56950879,{"idx":95,"name":"waspala-window-side","tpage_name":"waspala-tfrag"}],[118620160,{"idx":0,"name":"bam-eyelight","tpage_name":"ljkcdmkl-pris"}],[106168360,{"idx":40,"name":"minc-brok-edge","tpage_name":"mined-tfrag"}],[112394260,{"idx":20,"name":"des-transport-wheel-side","tpage_name":"desrescg-pris"}],[35651623,{"idx":39,"name":"samos-hair","tpage_name":"introcst-pris2"}],[8192019,{"idx":19,"name":"citn-allleatherstrap","tpage_name":"ctywide-vis-pris"}],[35651661,{"idx":77,"name":"king-teeth","tpage_name":"introcst-pris2"}],[49348642,{"idx":34,"name":"cguardgame-metallight-01small","tpage_name":"sewb-vis-pris"}],[35651662,{"idx":78,"name":"king-thinstrap","tpage_name":"introcst-pris2"}],[35651663,{"idx":79,"name":"king-vest","tpage_name":"introcst-pris2"}],[35651668,{"idx":84,"name":"king-precursermetal-decor","tpage_name":"introcst-pris2"}],[49348649,{"idx":41,"name":"bam-eyelight","tpage_name":"sewb-vis-pris"}],[60555269,{"idx":5,"name":"min-env-mar-01","tpage_name":"minea-vis-tfrag"}],[35651669,{"idx":85,"name":"king-precursermetal-trim","tpage_name":"introcst-pris2"}],[49348650,{"idx":42,"name":"cguard1-backmetal","tpage_name":"sewb-vis-pris"}],[60555270,{"idx":6,"name":"minb-rock01","tpage_name":"minea-vis-tfrag"}],[35651670,{"idx":86,"name":"king-wraps","tpage_name":"introcst-pris2"}],[49348651,{"idx":43,"name":"cguard1-chestplate","tpage_name":"sewb-vis-pris"}],[60555271,{"idx":7,"name":"minc-crate-02","tpage_name":"minea-vis-tfrag"}],[35651671,{"idx":87,"name":"veger-bookleather","tpage_name":"introcst-pris2"}],[49348652,{"idx":44,"name":"cguard1-gunmetaldark2","tpage_name":"sewb-vis-pris"}],[60555272,{"idx":8,"name":"minc-blue-paint-rust01","tpage_name":"minea-vis-tfrag"}],[35651672,{"idx":88,"name":"veger-booksides","tpage_name":"introcst-pris2"}],[49348653,{"idx":45,"name":"cguard1-guntube","tpage_name":"sewb-vis-pris"}],[60555273,{"idx":9,"name":"minc-blue-paint-01","tpage_name":"minea-vis-tfrag"}],[35651673,{"idx":89,"name":"veger-bookspine","tpage_name":"introcst-pris2"}],[60817452,{"idx":44,"name":"minc-rust-pipe-04","tpage_name":"mineb-vis-shrub"}],[49610832,{"idx":80,"name":"sewer-red-light-02","tpage_name":"sewf-vis-tfrag"}],[67043352,{"idx":24,"name":"vinroom-small-monitor-07","tpage_name":"vinroom-sprite"}],[62062632,{"idx":40,"name":"flying-bird-13","tpage_name":"wascityb-sprite"}],[74514432,{"idx":0,"name":"airlock-door-bolt","tpage_name":"sewj-vis-pris"}],[49348654,{"idx":46,"name":"cguard1-lens","tpage_name":"sewb-vis-pris"}],[60555274,{"idx":10,"name":"minc-yel-paint-rust01","tpage_name":"minea-vis-tfrag"}],[35651674,{"idx":90,"name":"veger-bootbolt","tpage_name":"introcst-pris2"}],[60817453,{"idx":45,"name":"minc-rust-pipe-06","tpage_name":"mineb-vis-shrub"}],[49610833,{"idx":81,"name":"sewer-block-02-hitweak","tpage_name":"sewf-vis-tfrag"}],[67043353,{"idx":25,"name":"vinroom-small-monitor-08","tpage_name":"vinroom-sprite"}],[62062633,{"idx":41,"name":"flying-bird-14","tpage_name":"wascityb-sprite"}],[74514433,{"idx":1,"name":"airlock-door-cog","tpage_name":"sewj-vis-pris"}],[49348655,{"idx":47,"name":"environment-oldmetal","tpage_name":"sewb-vis-pris"}],[60555275,{"idx":11,"name":"minc-blue-paint-rust02","tpage_name":"minea-vis-tfrag"}],[35651675,{"idx":91,"name":"veger-bootfoot","tpage_name":"introcst-pris2"}],[60817454,{"idx":46,"name":"minc-crm-paint-wall-01","tpage_name":"mineb-vis-shrub"}],[62062634,{"idx":42,"name":"flying-bird-15","tpage_name":"wascityb-sprite"}],[49610834,{"idx":82,"name":"sewer-brick-block-11","tpage_name":"sewf-vis-tfrag"}],[67043354,{"idx":26,"name":"vinroom-tv-beam","tpage_name":"vinroom-sprite"}],[74514434,{"idx":2,"name":"airlock-door-main","tpage_name":"sewj-vis-pris"}],[49348656,{"idx":48,"name":"kg-grunt-cable-01","tpage_name":"sewb-vis-pris"}],[60555276,{"idx":12,"name":"minc-rust-bars-01","tpage_name":"minea-vis-tfrag"}],[35651676,{"idx":92,"name":"veger-bootstrap","tpage_name":"introcst-pris2"}],[60817455,{"idx":47,"name":"minc-door-metal-03","tpage_name":"mineb-vis-shrub"}],[62062635,{"idx":43,"name":"flying-bird-16","tpage_name":"wascityb-sprite"}],[49610835,{"idx":83,"name":"sewer-brick-block-10","tpage_name":"sewf-vis-tfrag"}],[67043355,{"idx":27,"name":"vinroom-tv-circle","tpage_name":"vinroom-sprite"}],[74514435,{"idx":3,"name":"airlock-door-metal2","tpage_name":"sewj-vis-pris"}],[73596950,{"idx":22,"name":"sewer-small-light-01","tpage_name":"sewi-vis-tfrag"}],[58654790,{"idx":70,"name":"vinroom-tv-text-a","tpage_name":"hiphog-sprite"}],[71106590,{"idx":30,"name":"wstd-scaffold-teeth","tpage_name":"wasstadb-tfrag"}],[38731910,{"idx":134,"name":"flying-bird-07","tpage_name":"wasstada-sprite"}],[58654791,{"idx":71,"name":"vinroom-tv-text-g","tpage_name":"hiphog-sprite"}],[71106591,{"idx":31,"name":"wstd-scaffold-wall-01","tpage_name":"wasstadb-tfrag"}],[73596951,{"idx":23,"name":"sewer-pipe-rim-08","tpage_name":"sewi-vis-tfrag"}],[38731911,{"idx":135,"name":"flying-bird-08","tpage_name":"wasstada-sprite"}],[102301697,{"idx":1,"name":"onin-game-circle-darkener","tpage_name":"waspgame-sprite"}],[101056517,{"idx":5,"name":"jakc-gogglemetal","tpage_name":"ljakcklv-pris"}],[96075797,{"idx":21,"name":"jakchires-facert","tpage_name":"ljakc-pris"}],[58654792,{"idx":72,"name":"vinroom-tv-text-m","tpage_name":"hiphog-sprite"}],[71106592,{"idx":32,"name":"wstd-scaffold-wall-02","tpage_name":"wasstadb-tfrag"}],[73596952,{"idx":24,"name":"sewer-block-02","tpage_name":"sewi-vis-tfrag"}],[38731912,{"idx":136,"name":"flying-bird-09","tpage_name":"wasstada-sprite"}],[102301698,{"idx":2,"name":"onin-game-scatter","tpage_name":"waspgame-sprite"}],[101056518,{"idx":6,"name":"jakc-lens","tpage_name":"ljakcklv-pris"}],[96075798,{"idx":22,"name":"jakchires-glovetop","tpage_name":"ljakc-pris"}],[58654793,{"idx":73,"name":"vinroom-tv-text-n","tpage_name":"hiphog-sprite"}],[71106593,{"idx":33,"name":"wstd-scaffold-wall-edge","tpage_name":"wasstadb-tfrag"}],[73596953,{"idx":25,"name":"sewer-round-01","tpage_name":"sewi-vis-tfrag"}],[38731913,{"idx":137,"name":"flying-bird-10","tpage_name":"wasstada-sprite"}],[102301699,{"idx":3,"name":"onin-game-square","tpage_name":"waspgame-sprite"}],[101056519,{"idx":7,"name":"jakc-scarf","tpage_name":"ljakcklv-pris"}],[96075799,{"idx":23,"name":"jakchires-hair","tpage_name":"ljakc-pris"}],[58654794,{"idx":74,"name":"vinroom-tv-text-o","tpage_name":"hiphog-sprite"}],[73596954,{"idx":26,"name":"sewer-round-03","tpage_name":"sewi-vis-tfrag"}],[38731914,{"idx":138,"name":"flying-bird-11","tpage_name":"wasstada-sprite"}],[102301700,{"idx":4,"name":"onin-game-square-darkener","tpage_name":"waspgame-sprite"}],[101056520,{"idx":8,"name":"jakc-waistband2","tpage_name":"ljakcklv-pris"}],[96075800,{"idx":24,"name":"jakchires-horn","tpage_name":"ljakc-pris"}],[58654795,{"idx":75,"name":"vinroom-tv-text-r","tpage_name":"hiphog-sprite"}],[71106595,{"idx":35,"name":"wstd-scaffold-wall-03","tpage_name":"wasstadb-tfrag"}],[73596955,{"idx":27,"name":"sewer-round-02","tpage_name":"sewi-vis-tfrag"}],[38731915,{"idx":139,"name":"flying-bird-12","tpage_name":"wasstada-sprite"}],[74514461,{"idx":29,"name":"wire-metal","tpage_name":"sewj-vis-pris"}],[81985541,{"idx":5,"name":"wstlander-01-head","tpage_name":"wasstadc-pris"}],[79495181,{"idx":13,"name":"des-palmtree-beard","tpage_name":"wasintro-vis-tfrag"}],[58654798,{"idx":78,"name":"screen-02","tpage_name":"hiphog-sprite"}],[71106598,{"idx":38,"name":"wstd-platform-wall","tpage_name":"wasstadb-tfrag"}],[38731918,{"idx":142,"name":"flying-bird-15","tpage_name":"wasstada-sprite"}],[74514462,{"idx":30,"name":"squid-drabgun","tpage_name":"sewj-vis-pris"}],[81985542,{"idx":6,"name":"wstlander-01-leatherstrap","tpage_name":"wasstadc-pris"}],[79495182,{"idx":14,"name":"des-palmplant-leaf-01","tpage_name":"wasintro-vis-tfrag"}],[81985543,{"idx":7,"name":"wstlander-01-mustache","tpage_name":"wasstadc-pris"}],[79495183,{"idx":15,"name":"des-cactus-02","tpage_name":"wasintro-vis-tfrag"}],[101056525,{"idx":13,"name":"jakchires-brownstrap","tpage_name":"ljakcklv-pris"}],[96075805,{"idx":29,"name":"jakchires-precarmor-01","tpage_name":"ljakc-pris"}],[81985544,{"idx":8,"name":"wstlander-01-pants","tpage_name":"wasstadc-pris"}],[79495184,{"idx":16,"name":"des-cactus-01","tpage_name":"wasintro-vis-tfrag"}],[101056526,{"idx":14,"name":"jakchires-brwnleather","tpage_name":"ljakcklv-pris"}],[96075806,{"idx":30,"name":"jakchires-shoebottom","tpage_name":"ljakc-pris"}],[81985545,{"idx":9,"name":"wstlander-01-shoebottom","tpage_name":"wasstadc-pris"}],[79495185,{"idx":17,"name":"des-mount-01","tpage_name":"wasintro-vis-tfrag"}],[101056527,{"idx":15,"name":"jakchires-chestplate","tpage_name":"ljakcklv-pris"}],[96075807,{"idx":31,"name":"jakchires-shoemetal","tpage_name":"ljakc-pris"}],[73596980,{"idx":52,"name":"sewer-nut-01","tpage_name":"sewi-vis-tfrag"}],[58654820,{"idx":100,"name":"vinroom-small-monitor-08","tpage_name":"hiphog-sprite"}],[38731940,{"idx":164,"name":"female1_20","tpage_name":"wasstada-sprite"}],[73596981,{"idx":53,"name":"sewer-bolt-side-01","tpage_name":"sewi-vis-tfrag"}],[38731941,{"idx":165,"name":"femcher2_00","tpage_name":"wasstada-sprite"}],[73596982,{"idx":54,"name":"sewer-bolt-side-02","tpage_name":"sewi-vis-tfrag"}],[58654822,{"idx":102,"name":"twirl","tpage_name":"hiphog-sprite"}],[38731942,{"idx":166,"name":"femcher2_01","tpage_name":"wasstada-sprite"}],[92274695,{"idx":7,"name":"vehicle-body-panel-01","tpage_name":"desrace2-pris"}],[73596995,{"idx":67,"name":"sewer-pipe-small-01","tpage_name":"sewi-vis-tfrag"}],[38731955,{"idx":179,"name":"femcher2_14","tpage_name":"wasstada-sprite"}],[98500614,{"idx":6,"name":"wang_4","tpage_name":"hanga-hfrag"}],[38731974,{"idx":198,"name":"male1_12","tpage_name":"wasstada-sprite"}],[50724865,{"idx":1,"name":"airlock-door-cog","tpage_name":"foresta-vis-pris"}],[48234505,{"idx":9,"name":"des-plainrope","tpage_name":"desert-vis-tfrag"}],[50724866,{"idx":2,"name":"airlock-door-main","tpage_name":"foresta-vis-pris"}],[48234506,{"idx":10,"name":"des-mount-01","tpage_name":"desert-vis-tfrag"}],[93519904,{"idx":32,"name":"hud-turbo-boost-off-01","tpage_name":"wasall-minimap"}],[103481344,{"idx":0,"name":"des-shrub-pebbles","tpage_name":"deserta-vis-shrub"}],[100990984,{"idx":8,"name":"jakb-blackstrap","tpage_name":"ljakklev-pris"}],[38731984,{"idx":208,"name":"male2_01","tpage_name":"wasstada-sprite"}],[48234509,{"idx":13,"name":"des-corral-plate-02","tpage_name":"desert-vis-tfrag"}],[100990986,{"idx":10,"name":"jakb-clips","tpage_name":"ljakklev-pris"}],[93519906,{"idx":34,"name":"hud-turbo-boost-rim-01","tpage_name":"wasall-minimap"}],[38731986,{"idx":210,"name":"male2_03","tpage_name":"wasstada-sprite"}],[49479691,{"idx":11,"name":"sewer-water-01-e-dest","tpage_name":"sewe-vis-water"}],[48234511,{"idx":15,"name":"des-cliff-top-01","tpage_name":"desert-vis-tfrag"}],[49479693,{"idx":13,"name":"sewer-waterfall-02-e-dest","tpage_name":"sewe-vis-water"}],[48234513,{"idx":17,"name":"des-mount-02","tpage_name":"desert-vis-tfrag"}],[48234515,{"idx":19,"name":"des-cave-wall-01","tpage_name":"desert-vis-tfrag"}],[100990991,{"idx":15,"name":"jakb-facert","tpage_name":"ljakklev-pris"}],[103481351,{"idx":7,"name":"des-sand-grass-01","tpage_name":"deserta-vis-shrub"}],[104726531,{"idx":3,"name":"daxter-furhilite","tpage_name":"deshover-pris"}],[38731991,{"idx":215,"name":"male2_08","tpage_name":"wasstada-sprite"}],[50724876,{"idx":12,"name":"fora-precursor-glass-b-02","tpage_name":"foresta-vis-pris"}],[48234516,{"idx":20,"name":"des-cave-rock","tpage_name":"desert-vis-tfrag"}],[50724877,{"idx":13,"name":"fora-precursor-light","tpage_name":"foresta-vis-pris"}],[48234517,{"idx":21,"name":"des-cliff-top-03","tpage_name":"desert-vis-tfrag"}],[100990993,{"idx":17,"name":"jakb-hairtrans","tpage_name":"ljakklev-pris"}],[103481353,{"idx":9,"name":"des-pinetree-leaf-01","tpage_name":"deserta-vis-shrub"}],[104726533,{"idx":5,"name":"daxterarm","tpage_name":"deshover-pris"}],[38731993,{"idx":217,"name":"male2_10","tpage_name":"wasstada-sprite"}],[50724878,{"idx":14,"name":"fora-precursor-metal-edge-01","tpage_name":"foresta-vis-pris"}],[49479698,{"idx":18,"name":"sewer-water-01-e","tpage_name":"sewe-vis-water"}],[48234518,{"idx":22,"name":"des-cliff-top-04","tpage_name":"desert-vis-tfrag"}],[50724880,{"idx":16,"name":"fora-precursor-metal-plain-01dk","tpage_name":"foresta-vis-pris"}],[49479700,{"idx":20,"name":"sewer-waterfall-01-e","tpage_name":"sewe-vis-water"}],[48234520,{"idx":24,"name":"des-mount-bottom-01","tpage_name":"desert-vis-tfrag"}],[48234526,{"idx":30,"name":"des-cliff-top-02","tpage_name":"desert-vis-tfrag"}],[100991002,{"idx":26,"name":"jakb-scarf","tpage_name":"ljakklev-pris"}],[104726542,{"idx":14,"name":"daxterhelmetplain","tpage_name":"deshover-pris"}],[38732002,{"idx":226,"name":"male2_19","tpage_name":"wasstada-sprite"}],[48234527,{"idx":31,"name":"des-wascity-outerwall-rock","tpage_name":"desert-vis-tfrag"}],[104726544,{"idx":16,"name":"daxternose","tpage_name":"deshover-pris"}],[100991004,{"idx":28,"name":"jakb-shoemetal","tpage_name":"ljakklev-pris"}],[38732004,{"idx":228,"name":"male3_00","tpage_name":"wasstada-sprite"}],[48234529,{"idx":33,"name":"des-wascity-outerwall-metal-b","tpage_name":"desert-vis-tfrag"}],[104726545,{"idx":17,"name":"daxterteeth","tpage_name":"deshover-pris"}],[100991005,{"idx":29,"name":"jakb-shoeteop","tpage_name":"ljakklev-pris"}],[38732005,{"idx":229,"name":"male3_01","tpage_name":"wasstada-sprite"}],[50724890,{"idx":26,"name":"fora-statue-stone","tpage_name":"foresta-vis-pris"}],[48234530,{"idx":34,"name":"des-wascity-palace-siding-01","tpage_name":"desert-vis-tfrag"}],[104726546,{"idx":18,"name":"daxtertuft","tpage_name":"deshover-pris"}],[100991006,{"idx":30,"name":"klever-arm","tpage_name":"ljakklev-pris"}],[38732006,{"idx":230,"name":"male3_02","tpage_name":"wasstada-sprite"}],[50724891,{"idx":27,"name":"fora-statue-stone-sides","tpage_name":"foresta-vis-pris"}],[48234531,{"idx":35,"name":"des-wascity-cement-road","tpage_name":"desert-vis-tfrag"}],[104726547,{"idx":19,"name":"environment-oldmetal","tpage_name":"deshover-pris"}],[100991007,{"idx":31,"name":"klever-armor-01","tpage_name":"ljakklev-pris"}],[38732007,{"idx":231,"name":"male3_03","tpage_name":"wasstada-sprite"}],[50724892,{"idx":28,"name":"mtn-environment-front-backup","tpage_name":"foresta-vis-pris"}],[48234532,{"idx":36,"name":"des-wascity-outerwall-metal-d","tpage_name":"desert-vis-tfrag"}],[100991008,{"idx":32,"name":"klever-armor-02","tpage_name":"ljakklev-pris"}],[38732008,{"idx":232,"name":"male3_04","tpage_name":"wasstada-sprite"}],[48234533,{"idx":37,"name":"was-burningbush-light-01","tpage_name":"desert-vis-tfrag"}],[100991009,{"idx":33,"name":"klever-blackstrap","tpage_name":"ljakklev-pris"}],[38732009,{"idx":233,"name":"male3_05","tpage_name":"wasstada-sprite"}],[48234534,{"idx":38,"name":"was-burningbush-03","tpage_name":"desert-vis-tfrag"}],[100991010,{"idx":34,"name":"klever-bolt","tpage_name":"ljakklev-pris"}],[38732010,{"idx":234,"name":"male3_06","tpage_name":"wasstada-sprite"}],[48234535,{"idx":39,"name":"was-burningbush-01","tpage_name":"desert-vis-tfrag"}],[100991011,{"idx":35,"name":"klever-brownstrap","tpage_name":"ljakklev-pris"}],[38732011,{"idx":235,"name":"male3_07","tpage_name":"wasstada-sprite"}],[60686336,{"idx":0,"name":"minb-rock01","tpage_name":"mineb-vis-tfrag"}],[48234536,{"idx":40,"name":"was-burningbush-04","tpage_name":"desert-vis-tfrag"}],[112197639,{"idx":7,"name":"vehicle-body-panel-01","tpage_name":"desinter-pris"}],[100991019,{"idx":43,"name":"klever-fingerbottom","tpage_name":"ljakklev-pris"}],[38732019,{"idx":243,"name":"male3_15","tpage_name":"wasstada-sprite"}],[100991020,{"idx":44,"name":"klever-fingertop","tpage_name":"ljakklev-pris"}],[112197640,{"idx":8,"name":"vehicle-brace-pipe-01","tpage_name":"desinter-pris"}],[38732020,{"idx":244,"name":"male3_16","tpage_name":"wasstada-sprite"}],[100991021,{"idx":45,"name":"klever-gunmetal-01","tpage_name":"ljakklev-pris"}],[112197641,{"idx":9,"name":"vehicle-cap-pin-01","tpage_name":"desinter-pris"}],[38732021,{"idx":245,"name":"male3_17","tpage_name":"wasstada-sprite"}],[85196800,{"idx":0,"name":"can-cap","tpage_name":"desrace1-pris"}],[20774912,{"idx":0,"name":"stdmb-energy-wall-01","tpage_name":"stadiumb-vis-alpha"}],[100991022,{"idx":46,"name":"klever-gunmetal-02","tpage_name":"ljakklev-pris"}],[112197642,{"idx":10,"name":"vehicle-chrome-pipe-01","tpage_name":"desinter-pris"}],[38732022,{"idx":246,"name":"male3_18","tpage_name":"wasstada-sprite"}],[85196801,{"idx":1,"name":"can-knob","tpage_name":"desrace1-pris"}],[100991023,{"idx":47,"name":"klever-gunmetal-03","tpage_name":"ljakklev-pris"}],[112197643,{"idx":11,"name":"vehicle-gas-tank-01","tpage_name":"desinter-pris"}],[38732023,{"idx":247,"name":"male3_19","tpage_name":"wasstada-sprite"}],[85196802,{"idx":2,"name":"can-side-long","tpage_name":"desrace1-pris"}],[100991025,{"idx":49,"name":"klever-gunmetal-05","tpage_name":"ljakklev-pris"}],[112197645,{"idx":13,"name":"vehicle-metal-plate-01","tpage_name":"desinter-pris"}],[38732025,{"idx":249,"name":"male4_00","tpage_name":"wasstada-sprite"}],[100991026,{"idx":50,"name":"klever-hair","tpage_name":"ljakklev-pris"}],[112197646,{"idx":14,"name":"vehicle-toad-exhaust-01","tpage_name":"desinter-pris"}],[38732026,{"idx":250,"name":"male4_01","tpage_name":"wasstada-sprite"}],[100991028,{"idx":52,"name":"klever-handwrap","tpage_name":"ljakklev-pris"}],[112197648,{"idx":16,"name":"vehicle-wheel-01","tpage_name":"desinter-pris"}],[38732028,{"idx":252,"name":"male4_03","tpage_name":"wasstada-sprite"}],[100991029,{"idx":53,"name":"klever-horn","tpage_name":"ljakklev-pris"}],[112197649,{"idx":17,"name":"vehicle-wheel-blur-01","tpage_name":"desinter-pris"}],[38732029,{"idx":253,"name":"male4_04","tpage_name":"wasstada-sprite"}],[100991030,{"idx":54,"name":"klever-mustache","tpage_name":"ljakklev-pris"}],[38732030,{"idx":254,"name":"male4_05","tpage_name":"wasstada-sprite"}],[35389609,{"idx":169,"name":"klever-earcup","tpage_name":"introcst-pris"}],[85196809,{"idx":9,"name":"intcept-teeth01","tpage_name":"desrace1-pris"}],[100991032,{"idx":56,"name":"klever-shoebottom","tpage_name":"ljakklev-pris"}],[112197652,{"idx":20,"name":"intcept-b-base-green01","tpage_name":"desinter-pris"}],[38732032,{"idx":256,"name":"male4_07","tpage_name":"wasstada-sprite"}],[35389611,{"idx":171,"name":"klever-eyelid","tpage_name":"introcst-pris"}],[85196811,{"idx":11,"name":"vehicle-body-panel-01","tpage_name":"desrace1-pris"}],[100991033,{"idx":57,"name":"klever-skirtdark","tpage_name":"ljakklev-pris"}],[112197653,{"idx":21,"name":"intcept-b-base-patern01","tpage_name":"desinter-pris"}],[38732033,{"idx":257,"name":"male4_08","tpage_name":"wasstada-sprite"}],[88932352,{"idx":0,"name":"mech-flame","tpage_name":"foresta-sprite"}],[35389612,{"idx":172,"name":"klever-face-01","tpage_name":"introcst-pris"}],[85196812,{"idx":12,"name":"vehicle-brace-pipe-01","tpage_name":"desrace1-pris"}],[100991034,{"idx":58,"name":"klever-skirtlight","tpage_name":"ljakklev-pris"}],[112197654,{"idx":22,"name":"intcept-b-base-patern02","tpage_name":"desinter-pris"}],[38732034,{"idx":258,"name":"male4_09","tpage_name":"wasstada-sprite"}],[88932353,{"idx":1,"name":"grenadier-grenade-part","tpage_name":"foresta-sprite"}],[35389613,{"idx":173,"name":"klever-face-01scars","tpage_name":"introcst-pris"}],[85196813,{"idx":13,"name":"vehicle-cap-pin-01","tpage_name":"desrace1-pris"}],[35651665,{"idx":81,"name":"king-wrap","tpage_name":"introcst-pris2"}],[60555265,{"idx":1,"name":"mina-idol-01-noalpha","tpage_name":"minea-vis-tfrag"}],[100991035,{"idx":59,"name":"klever-thighs","tpage_name":"ljakklev-pris"}],[112197655,{"idx":23,"name":"intcept-b-gun01","tpage_name":"desinter-pris"}],[38732035,{"idx":259,"name":"male4_10","tpage_name":"wasstada-sprite"}],[35389614,{"idx":174,"name":"klever-hair","tpage_name":"introcst-pris"}],[85196814,{"idx":14,"name":"vehicle-chrome-pipe-01","tpage_name":"desrace1-pris"}],[35651666,{"idx":82,"name":"king-wristband","tpage_name":"introcst-pris2"}],[60555266,{"idx":2,"name":"mina-idol-02-noalpha","tpage_name":"minea-vis-tfrag"}],[100991017,{"idx":41,"name":"klever-face-01","tpage_name":"ljakklev-pris"}],[113442817,{"idx":1,"name":"sat-shield-env-uvscroll","tpage_name":"desresc-warp"}],[38732017,{"idx":241,"name":"male3_13","tpage_name":"wasstada-sprite"}],[112197637,{"idx":5,"name":"intcept-teeth01","tpage_name":"desinter-pris"}],[100991036,{"idx":60,"name":"klever-undershirt","tpage_name":"ljakklev-pris"}],[112197656,{"idx":24,"name":"intcept-b-pipe01","tpage_name":"desinter-pris"}],[38732036,{"idx":260,"name":"male4_11","tpage_name":"wasstada-sprite"}],[88932355,{"idx":3,"name":"wave-foam","tpage_name":"foresta-sprite"}],[35389615,{"idx":175,"name":"klever-mustache","tpage_name":"introcst-pris"}],[85196815,{"idx":15,"name":"vehicle-gas-tank-01","tpage_name":"desrace1-pris"}],[35651667,{"idx":83,"name":"king-bluemetal","tpage_name":"introcst-pris2"}],[60555267,{"idx":3,"name":"mina-idol-02","tpage_name":"minea-vis-tfrag"}],[113442818,{"idx":2,"name":"sat-shield-dest","tpage_name":"desresc-warp"}],[100991018,{"idx":42,"name":"klever-face-01scars","tpage_name":"ljakklev-pris"}],[38732018,{"idx":242,"name":"male3_14","tpage_name":"wasstada-sprite"}],[112197638,{"idx":6,"name":"intcept-tread01","tpage_name":"desinter-pris"}],[100991037,{"idx":61,"name":"klever-widebrownstrap","tpage_name":"ljakklev-pris"}],[112197657,{"idx":25,"name":"intcept-b-teeth01","tpage_name":"desinter-pris"}],[38732037,{"idx":261,"name":"male4_12","tpage_name":"wasstada-sprite"}],[85196816,{"idx":16,"name":"vehicle-gun-box-01","tpage_name":"desrace1-pris"}],[35651628,{"idx":44,"name":"samos-log-02","tpage_name":"introcst-pris2"}],[49348608,{"idx":0,"name":"airlock-door-bolt","tpage_name":"sewb-vis-pris"}],[38731979,{"idx":203,"name":"male1_17","tpage_name":"wasstada-sprite"}],[100990979,{"idx":3,"name":"jackb-lens","tpage_name":"ljakklev-pris"}],[38732039,{"idx":263,"name":"male4_14","tpage_name":"wasstada-sprite"}],[88932358,{"idx":6,"name":"forest-leaf","tpage_name":"foresta-sprite"}],[85196818,{"idx":18,"name":"vehicle-toad-exhaust-01","tpage_name":"desrace1-pris"}],[35651629,{"idx":45,"name":"samos-log-03","tpage_name":"introcst-pris2"}],[49348609,{"idx":1,"name":"airlock-door-cog","tpage_name":"sewb-vis-pris"}],[38732040,{"idx":264,"name":"male4_15","tpage_name":"wasstada-sprite"}],[88932359,{"idx":7,"name":"forest-leaf2","tpage_name":"foresta-sprite"}],[85196819,{"idx":19,"name":"vehicle-tread-blur-02","tpage_name":"desrace1-pris"}],[35651630,{"idx":46,"name":"samos-metal","tpage_name":"introcst-pris2"}],[49348610,{"idx":2,"name":"airlock-door-main","tpage_name":"sewb-vis-pris"}],[38731981,{"idx":205,"name":"male1_19","tpage_name":"wasstada-sprite"}],[100990981,{"idx":5,"name":"jak-gogglemetal","tpage_name":"ljakklev-pris"}],[38732041,{"idx":265,"name":"male4_16","tpage_name":"wasstada-sprite"}],[88932360,{"idx":8,"name":"forest-leaf3","tpage_name":"foresta-sprite"}],[85196820,{"idx":20,"name":"vehicle-wheel-01","tpage_name":"desrace1-pris"}],[35651631,{"idx":47,"name":"samos-strap","tpage_name":"introcst-pris2"}],[49348611,{"idx":3,"name":"airlock-door-metal2","tpage_name":"sewb-vis-pris"}],[38732042,{"idx":266,"name":"male4_17","tpage_name":"wasstada-sprite"}],[88932361,{"idx":9,"name":"forest-leaf4","tpage_name":"foresta-sprite"}],[85196821,{"idx":21,"name":"vehicle-wheel-blur-01","tpage_name":"desrace1-pris"}],[35651632,{"idx":48,"name":"samos-teeth2","tpage_name":"introcst-pris2"}],[49348612,{"idx":4,"name":"airlockl-door-metalframe","tpage_name":"sewb-vis-pris"}],[93519903,{"idx":31,"name":"hud-small-vehicle-health-bar-01","tpage_name":"wasall-minimap"}],[38731983,{"idx":207,"name":"male2_00","tpage_name":"wasstada-sprite"}],[100990983,{"idx":7,"name":"jakb-armor","tpage_name":"ljakklev-pris"}],[38732043,{"idx":267,"name":"male4_18","tpage_name":"wasstada-sprite"}],[85196822,{"idx":22,"name":"jakc-wristband-a2","tpage_name":"desrace1-pris"}],[104792148,{"idx":84,"name":"dk-sat-cable-01","tpage_name":"desresc-pris"}],[130940930,{"idx":2,"name":"holostatic-01","tpage_name":"deshover-sprite"}],[104792150,{"idx":86,"name":"dk-sat-cable-03","tpage_name":"desresc-pris"}],[130940931,{"idx":3,"name":"holostatic-02","tpage_name":"deshover-sprite"}],[104792151,{"idx":87,"name":"dk-sat-claw-01","tpage_name":"desresc-pris"}],[130940932,{"idx":4,"name":"holostatic-03","tpage_name":"deshover-sprite"}],[104792152,{"idx":88,"name":"dk-sat-panel-01","tpage_name":"desresc-pris"}],[56950836,{"idx":52,"name":"waspala-step-top","tpage_name":"waspala-tfrag"}],[60686376,{"idx":40,"name":"minc-yel-safe-paint-rust01","tpage_name":"mineb-vis-tfrag"}],[73138176,{"idx":0,"name":"for-bark","tpage_name":"forestb-vis-shrub"}],[60686377,{"idx":41,"name":"minc-rust-02","tpage_name":"mineb-vis-tfrag"}],[73138177,{"idx":1,"name":"fora-shrub-hanging-growth","tpage_name":"forestb-vis-shrub"}],[60686378,{"idx":42,"name":"minc-strut-01","tpage_name":"mineb-vis-tfrag"}],[56950838,{"idx":54,"name":"waspala-fountain-base02","tpage_name":"waspala-tfrag"}],[73138178,{"idx":2,"name":"fora-shrub-moss","tpage_name":"forestb-vis-shrub"}],[60686379,{"idx":43,"name":"minc-safe-plate-01","tpage_name":"mineb-vis-tfrag"}],[56950839,{"idx":55,"name":"waspala-stage-tile","tpage_name":"waspala-tfrag"}],[73138179,{"idx":3,"name":"fora-shrub-pebbles","tpage_name":"forestb-vis-shrub"}],[56950840,{"idx":56,"name":"waspala-stage-step","tpage_name":"waspala-tfrag"}],[74383360,{"idx":0,"name":"sewer-metal-block-04","tpage_name":"sewj-vis-tfrag"}],[60686380,{"idx":44,"name":"minb-rock-floor01","tpage_name":"mineb-vis-tfrag"}],[73138180,{"idx":4,"name":"fora-shrub-cattail","tpage_name":"forestb-vis-shrub"}],[60686381,{"idx":45,"name":"minc-safe-plate-02","tpage_name":"mineb-vis-tfrag"}],[56950841,{"idx":57,"name":"waspala-metal-plate03","tpage_name":"waspala-tfrag"}],[74383361,{"idx":1,"name":"sewer-scaffold-01","tpage_name":"sewj-vis-tfrag"}],[73138181,{"idx":5,"name":"fora-shrub-grass","tpage_name":"forestb-vis-shrub"}],[60686382,{"idx":46,"name":"minc-blue-paint-rust03","tpage_name":"mineb-vis-tfrag"}],[56950842,{"idx":58,"name":"waspala-step-01","tpage_name":"waspala-tfrag"}],[74383362,{"idx":2,"name":"sewer-concrete-edge-02","tpage_name":"sewj-vis-tfrag"}],[73138182,{"idx":6,"name":"fora-shrub-asian-grass","tpage_name":"forestb-vis-shrub"}],[60686383,{"idx":47,"name":"minb-stone21","tpage_name":"mineb-vis-tfrag"}],[56950843,{"idx":59,"name":"waspala-throne-base","tpage_name":"waspala-tfrag"}],[74383363,{"idx":3,"name":"sewer-pipe-rim-05b","tpage_name":"sewj-vis-tfrag"}],[73138183,{"idx":7,"name":"fora-shrub-weed","tpage_name":"forestb-vis-shrub"}],[60686384,{"idx":48,"name":"minc-blue-paint-rust05","tpage_name":"mineb-vis-tfrag"}],[56950844,{"idx":60,"name":"waspala-throne-bolt","tpage_name":"waspala-tfrag"}],[75628544,{"idx":0,"name":"sig-flatfangs","tpage_name":"lsig-water"}],[74383364,{"idx":4,"name":"sewer-nut-01","tpage_name":"sewj-vis-tfrag"}],[73138184,{"idx":8,"name":"fora-shrub-vine","tpage_name":"forestb-vis-shrub"}],[57278516,{"idx":52,"name":"wstlander-01-eye","tpage_name":"waswide-vis-pris"}],[52297796,{"idx":68,"name":"freehq-wal-tilem03","tpage_name":"freehq-tfrag"}],[67239956,{"idx":20,"name":"vin-monitor-rim-05","tpage_name":"vinroom-vis-tfrag"}],[48562256,{"idx":80,"name":"jakchires-shoebottom","tpage_name":"sewa-vis-pris"}],[73465856,{"idx":0,"name":"sewer-grate-01","tpage_name":"sewk-vis-tfrag"}],[122159115,{"idx":11,"name":"facb_dec-metal-03","tpage_name":"factoryb-vis-tfrag"}],[38732055,{"idx":279,"name":"male5_09","tpage_name":"wasstada-sprite"}],[104726595,{"idx":67,"name":"jakc-armor","tpage_name":"deshover-pris"}],[57278517,{"idx":53,"name":"wstlander-01-gunmetal-01","tpage_name":"waswide-vis-pris"}],[52297797,{"idx":69,"name":"freehq-wal-tilem04","tpage_name":"freehq-tfrag"}],[67239957,{"idx":21,"name":"vin-panel-01","tpage_name":"vinroom-vis-tfrag"}],[48562257,{"idx":81,"name":"jakchires-shoemetal","tpage_name":"sewa-vis-pris"}],[73465857,{"idx":1,"name":"sew-metal-floor-01","tpage_name":"sewk-vis-tfrag"}],[122159116,{"idx":12,"name":"facb_blue-metal-03","tpage_name":"factoryb-vis-tfrag"}],[119668756,{"idx":20,"name":"citn-allleye","tpage_name":"ljinx-pris"}],[38732056,{"idx":280,"name":"male5_10","tpage_name":"wasstada-sprite"}],[104726596,{"idx":68,"name":"jakc-chestplate-straps","tpage_name":"deshover-pris"}],[57278518,{"idx":54,"name":"wstlander-01-gunmetal-02","tpage_name":"waswide-vis-pris"}],[52297798,{"idx":70,"name":"freehq-red-light","tpage_name":"freehq-tfrag"}],[67239958,{"idx":22,"name":"vin-panel-03","tpage_name":"vinroom-vis-tfrag"}],[48562258,{"idx":82,"name":"jakchires-shoeteop","tpage_name":"sewa-vis-pris"}],[73465858,{"idx":2,"name":"sewer-block-02-hitweak","tpage_name":"sewk-vis-tfrag"}],[122159117,{"idx":13,"name":"facb_temp_medium","tpage_name":"factoryb-vis-tfrag"}],[119668757,{"idx":21,"name":"environment-oldmetal","tpage_name":"ljinx-pris"}],[38732057,{"idx":281,"name":"male5_11","tpage_name":"wasstada-sprite"}],[104726597,{"idx":69,"name":"jakc-gogglemetal","tpage_name":"deshover-pris"}],[67239959,{"idx":23,"name":"vin-panel-04","tpage_name":"vinroom-vis-tfrag"}],[57278519,{"idx":55,"name":"wstlander-01-gunmetal-03","tpage_name":"waswide-vis-pris"}],[52297799,{"idx":71,"name":"freehq-wal-tilem07","tpage_name":"freehq-tfrag"}],[48562259,{"idx":83,"name":"jakchires-teeth","tpage_name":"sewa-vis-pris"}],[73465859,{"idx":3,"name":"sewer-big-brace-01","tpage_name":"sewk-vis-tfrag"}],[122159118,{"idx":14,"name":"facb_redmetal-d-01","tpage_name":"factoryb-vis-tfrag"}],[119668758,{"idx":22,"name":"jakbsmall-blackstrap","tpage_name":"ljinx-pris"}],[38732058,{"idx":282,"name":"male5_12","tpage_name":"wasstada-sprite"}],[104726598,{"idx":70,"name":"jakc-lens","tpage_name":"deshover-pris"}],[122159119,{"idx":15,"name":"facb-beam01","tpage_name":"factoryb-vis-tfrag"}],[119668759,{"idx":23,"name":"jakbsmall-finger","tpage_name":"ljinx-pris"}],[38732059,{"idx":283,"name":"male5_13","tpage_name":"wasstada-sprite"}],[104726599,{"idx":71,"name":"jakc-scarf","tpage_name":"deshover-pris"}],[67239961,{"idx":25,"name":"vin-panel-06","tpage_name":"vinroom-vis-tfrag"}],[57278521,{"idx":57,"name":"wstlander-01-head","tpage_name":"waswide-vis-pris"}],[48562261,{"idx":85,"name":"jakc-skirt","tpage_name":"sewa-vis-pris"}],[74711041,{"idx":1,"name":"sewer-waterfall-02-m-dest","tpage_name":"sewm-vis-water"}],[73465861,{"idx":5,"name":"sewer-metal-block-05","tpage_name":"sewk-vis-tfrag"}],[122159120,{"idx":16,"name":"facb_temp_dark","tpage_name":"factoryb-vis-tfrag"}],[119668760,{"idx":24,"name":"jakbsmall-glovetop","tpage_name":"ljinx-pris"}],[38732060,{"idx":284,"name":"male5_14","tpage_name":"wasstada-sprite"}],[104726600,{"idx":72,"name":"jakc-scarfhanging","tpage_name":"deshover-pris"}],[122159121,{"idx":17,"name":"facb-glass-01","tpage_name":"factoryb-vis-tfrag"}],[38732061,{"idx":285,"name":"male5_15","tpage_name":"wasstada-sprite"}],[104726601,{"idx":73,"name":"jakc-skirt","tpage_name":"deshover-pris"}],[67239963,{"idx":27,"name":"vin-panel-08","tpage_name":"vinroom-vis-tfrag"}],[57278523,{"idx":59,"name":"wstlander-01-mustache","tpage_name":"waswide-vis-pris"}],[73465863,{"idx":7,"name":"sewer-plate-05","tpage_name":"sewk-vis-tfrag"}],[122159122,{"idx":18,"name":"facb_blue-metal-01","tpage_name":"factoryb-vis-tfrag"}],[38732062,{"idx":286,"name":"male5_16","tpage_name":"wasstada-sprite"}],[104726602,{"idx":74,"name":"jakc-waistband2","tpage_name":"deshover-pris"}],[122159123,{"idx":19,"name":"fac-tower-base-02","tpage_name":"factoryb-vis-tfrag"}],[38732063,{"idx":287,"name":"male5_17","tpage_name":"wasstada-sprite"}],[104726603,{"idx":75,"name":"jakc-wraps","tpage_name":"deshover-pris"}],[67239965,{"idx":29,"name":"vin-panel-10","tpage_name":"vinroom-vis-tfrag"}],[57278525,{"idx":61,"name":"wstlander-01-shoebottom","tpage_name":"waswide-vis-pris"}],[74711045,{"idx":5,"name":"sewer-water-highlight-01-m","tpage_name":"sewm-vis-water"}],[73465865,{"idx":9,"name":"sewer-metal-block-01","tpage_name":"sewk-vis-tfrag"}],[122159124,{"idx":20,"name":"facb-corrugate-01","tpage_name":"factoryb-vis-tfrag"}],[38732064,{"idx":288,"name":"male5_18","tpage_name":"wasstada-sprite"}],[104726604,{"idx":76,"name":"jakc-wristband-a2","tpage_name":"deshover-pris"}],[67239966,{"idx":30,"name":"vin-panel-11","tpage_name":"vinroom-vis-tfrag"}],[57278526,{"idx":62,"name":"wstlander-01-shoetop","tpage_name":"waswide-vis-pris"}],[48562266,{"idx":90,"name":"grunt-eye-01","tpage_name":"sewa-vis-pris"}],[74711046,{"idx":6,"name":"sewer-water-still-01-m","tpage_name":"sewm-vis-water"}],[73465866,{"idx":10,"name":"sewer-metal-floor-01","tpage_name":"sewk-vis-tfrag"}],[122159125,{"idx":21,"name":"facb_dec-metal-02","tpage_name":"factoryb-vis-tfrag"}],[119668765,{"idx":29,"name":"sig2-shoebottom","tpage_name":"ljinx-pris"}],[38732065,{"idx":289,"name":"male5_19","tpage_name":"wasstada-sprite"}],[104726605,{"idx":77,"name":"jakchires-arm","tpage_name":"deshover-pris"}],[67239967,{"idx":31,"name":"vin-pipe-01","tpage_name":"vinroom-vis-tfrag"}],[57278527,{"idx":63,"name":"wstlander-01-shoulderarmor","tpage_name":"waswide-vis-pris"}],[48562267,{"idx":91,"name":"grunt-hose","tpage_name":"sewa-vis-pris"}],[74711047,{"idx":7,"name":"sewer-water-wave-01-m","tpage_name":"sewm-vis-water"}],[73465867,{"idx":11,"name":"sewer-brick-block-09","tpage_name":"sewk-vis-tfrag"}],[122159126,{"idx":22,"name":"facb-bigpipe-01","tpage_name":"factoryb-vis-tfrag"}],[119668766,{"idx":30,"name":"sig2-shoetop","tpage_name":"ljinx-pris"}],[38732066,{"idx":290,"name":"male5_20","tpage_name":"wasstada-sprite"}],[104726606,{"idx":78,"name":"jakchires-blackstrap","tpage_name":"deshover-pris"}],[67239968,{"idx":32,"name":"vin-pipe-02","tpage_name":"vinroom-vis-tfrag"}],[57278528,{"idx":64,"name":"wstlander-01-skirt","tpage_name":"waswide-vis-pris"}],[48562268,{"idx":92,"name":"grunt-metal-01","tpage_name":"sewa-vis-pris"}],[74711048,{"idx":8,"name":"sewer-waterfall-01-m","tpage_name":"sewm-vis-water"}],[73465868,{"idx":12,"name":"sewer-scaffold-01","tpage_name":"sewk-vis-tfrag"}],[122159127,{"idx":23,"name":"fac-tower-base-rim-03","tpage_name":"factoryb-vis-tfrag"}],[119668767,{"idx":31,"name":"citwide-crimson-gold","tpage_name":"ljinx-pris"}],[104726607,{"idx":79,"name":"jakchires-brownstrap","tpage_name":"deshover-pris"}],[122159128,{"idx":24,"name":"fac-tower-08","tpage_name":"factoryb-vis-tfrag"}],[119668768,{"idx":32,"name":"citwide-crimson-light","tpage_name":"ljinx-pris"}],[104726608,{"idx":80,"name":"jakchires-brwnleather","tpage_name":"deshover-pris"}],[67239970,{"idx":34,"name":"vin-pipe-04","tpage_name":"vinroom-vis-tfrag"}],[57278530,{"idx":66,"name":"wstlander-02-arm","tpage_name":"waswide-vis-pris"}],[48562270,{"idx":94,"name":"saberfish-skin-01","tpage_name":"sewa-vis-pris"}],[74711050,{"idx":10,"name":"sewer-waterfall-01-m-dest","tpage_name":"sewm-vis-water"}],[73465870,{"idx":14,"name":"sewer-nut-01","tpage_name":"sewk-vis-tfrag"}],[122159129,{"idx":25,"name":"fac-tower-base-rim-04","tpage_name":"factoryb-vis-tfrag"}],[119668769,{"idx":33,"name":"citwide-crimson-red","tpage_name":"ljinx-pris"}],[104726609,{"idx":81,"name":"jakchires-chestplate","tpage_name":"deshover-pris"}],[67239971,{"idx":35,"name":"vin-pipe-05","tpage_name":"vinroom-vis-tfrag"}],[57278531,{"idx":67,"name":"wstlander-02-armor","tpage_name":"waswide-vis-pris"}],[48562271,{"idx":95,"name":"saberfish-skin-02","tpage_name":"sewa-vis-pris"}],[74711051,{"idx":11,"name":"sewer-water-still-01-m-dest","tpage_name":"sewm-vis-water"}],[73465871,{"idx":15,"name":"sewer-pipe-rim-05b","tpage_name":"sewk-vis-tfrag"}],[122159130,{"idx":26,"name":"fac-tower-panel-01","tpage_name":"factoryb-vis-tfrag"}],[119668770,{"idx":34,"name":"citwide-crimson-tube","tpage_name":"ljinx-pris"}],[104726610,{"idx":82,"name":"jakchires-clips","tpage_name":"deshover-pris"}],[67239972,{"idx":36,"name":"vin-red","tpage_name":"vinroom-vis-tfrag"}],[57278532,{"idx":68,"name":"wstlander-02-belt","tpage_name":"waswide-vis-pris"}],[74711052,{"idx":12,"name":"sewer-water-wave-01-m-dest","tpage_name":"sewm-vis-water"}],[48562272,{"idx":96,"name":"saberfish-skin-03","tpage_name":"sewa-vis-pris"}],[73465872,{"idx":16,"name":"sewer-pipe-rim-07-hitweak","tpage_name":"sewk-vis-tfrag"}],[122159131,{"idx":27,"name":"fac-tower-base-rim-02","tpage_name":"factoryb-vis-tfrag"}],[119668771,{"idx":35,"name":"citwide-crimson-wall-plain","tpage_name":"ljinx-pris"}],[104726611,{"idx":83,"name":"jakchires-eye","tpage_name":"deshover-pris"}],[67239973,{"idx":37,"name":"vin-rim-01","tpage_name":"vinroom-vis-tfrag"}],[57278533,{"idx":69,"name":"wstlander-02-bootheel","tpage_name":"waswide-vis-pris"}],[48562273,{"idx":97,"name":"sew-frog-eye-01","tpage_name":"sewa-vis-pris"}],[74711053,{"idx":13,"name":"sewer-watefall-froth-01-m","tpage_name":"sewm-vis-water"}],[73465873,{"idx":17,"name":"common-black","tpage_name":"sewk-vis-tfrag"}],[122159132,{"idx":28,"name":"fac-tower-door-01","tpage_name":"factoryb-vis-tfrag"}],[119668772,{"idx":36,"name":"com-power-box-plate","tpage_name":"ljinx-pris"}],[104726612,{"idx":84,"name":"jakchires-eyebrow","tpage_name":"deshover-pris"}],[67239974,{"idx":38,"name":"vin-rim-02","tpage_name":"vinroom-vis-tfrag"}],[57278534,{"idx":70,"name":"wstlander-02-eye","tpage_name":"waswide-vis-pris"}],[48562274,{"idx":98,"name":"sew-frog-fin-01","tpage_name":"sewa-vis-pris"}],[74711054,{"idx":14,"name":"sewer-watefall-froth-01-m-dest","tpage_name":"sewm-vis-water"}],[73465874,{"idx":18,"name":"sewer-pipe-02","tpage_name":"sewk-vis-tfrag"}],[122159133,{"idx":29,"name":"facb-big-metal-panl02","tpage_name":"factoryb-vis-tfrag"}],[119668773,{"idx":37,"name":"com-power-box-symbol","tpage_name":"ljinx-pris"}],[104726613,{"idx":85,"name":"jakchires-eyelid","tpage_name":"deshover-pris"}],[57278535,{"idx":71,"name":"wstlander-02-glove","tpage_name":"waswide-vis-pris"}],[48562275,{"idx":99,"name":"sew-frog-fin-02","tpage_name":"sewa-vis-pris"}],[67239975,{"idx":39,"name":"vin-rim-03","tpage_name":"vinroom-vis-tfrag"}],[73465875,{"idx":19,"name":"sewer-brick-block-11","tpage_name":"sewk-vis-tfrag"}],[119668774,{"idx":38,"name":"com-power-box-tube","tpage_name":"ljinx-pris"}],[104726614,{"idx":86,"name":"jakchires-facelft","tpage_name":"deshover-pris"}],[57278536,{"idx":72,"name":"wstlander-02-head","tpage_name":"waswide-vis-pris"}],[67239976,{"idx":40,"name":"vin-turbine-panel-01","tpage_name":"vinroom-vis-tfrag"}],[48562276,{"idx":100,"name":"sew-frog-skin-01","tpage_name":"sewa-vis-pris"}],[73465876,{"idx":20,"name":"sewer-brick-block-10","tpage_name":"sewk-vis-tfrag"}],[122159135,{"idx":31,"name":"fac-tower-pipe-01","tpage_name":"factoryb-vis-tfrag"}],[119668775,{"idx":39,"name":"com-power-box-wires-01","tpage_name":"ljinx-pris"}],[104726615,{"idx":87,"name":"jakchires-facert","tpage_name":"deshover-pris"}],[57278537,{"idx":73,"name":"wstlander-02-ponytail","tpage_name":"waswide-vis-pris"}],[67239977,{"idx":41,"name":"vin-turbine-panel-04","tpage_name":"vinroom-vis-tfrag"}],[48562277,{"idx":101,"name":"sew-frog-skin-02","tpage_name":"sewa-vis-pris"}],[73465877,{"idx":21,"name":"sewer-bolt-side-01","tpage_name":"sewk-vis-tfrag"}],[122159136,{"idx":32,"name":"facb_redmetal-d-02","tpage_name":"factoryb-vis-tfrag"}],[119668776,{"idx":40,"name":"jinx-scarf-ingame","tpage_name":"ljinx-pris"}],[104726616,{"idx":88,"name":"jakchires-glovetop","tpage_name":"deshover-pris"}],[57278538,{"idx":74,"name":"wstlander-02-scarf","tpage_name":"waswide-vis-pris"}],[67239978,{"idx":42,"name":"vin-wall-01","tpage_name":"vinroom-vis-tfrag"}],[48562278,{"idx":102,"name":"sew-frog-skin-03","tpage_name":"sewa-vis-pris"}],[73465878,{"idx":22,"name":"sewer-bolt-side-02","tpage_name":"sewk-vis-tfrag"}],[122159137,{"idx":33,"name":"fac-tower-base-04","tpage_name":"factoryb-vis-tfrag"}],[104726617,{"idx":89,"name":"jakchires-hair","tpage_name":"deshover-pris"}],[57278539,{"idx":75,"name":"wstlander-02-shirt","tpage_name":"waswide-vis-pris"}],[67239979,{"idx":43,"name":"vin-wall-02","tpage_name":"vinroom-vis-tfrag"}],[48562279,{"idx":103,"name":"sew-frog-skin-04","tpage_name":"sewa-vis-pris"}],[73465879,{"idx":23,"name":"sewer-metal-trim-01","tpage_name":"sewk-vis-tfrag"}],[122159138,{"idx":34,"name":"fac-tower-large-panel-02","tpage_name":"factoryb-vis-tfrag"}],[104726618,{"idx":90,"name":"jakchires-horn","tpage_name":"deshover-pris"}],[57278540,{"idx":76,"name":"wstlander-02-skirt","tpage_name":"waswide-vis-pris"}],[67239980,{"idx":44,"name":"vin-wall-bottom-greyblue","tpage_name":"vinroom-vis-tfrag"}],[48562280,{"idx":104,"name":"blue-gem","tpage_name":"sewa-vis-pris"}],[73465880,{"idx":24,"name":"sewer-scaffold-03","tpage_name":"sewk-vis-tfrag"}],[122159139,{"idx":35,"name":"facb-spotlight","tpage_name":"factoryb-vis-tfrag"}],[104726619,{"idx":91,"name":"jakchires-jacket","tpage_name":"deshover-pris"}],[57278541,{"idx":77,"name":"wstlander-03-eye","tpage_name":"waswide-vis-pris"}],[67239981,{"idx":45,"name":"vin-rim-04","tpage_name":"vinroom-vis-tfrag"}],[48562281,{"idx":105,"name":"brown-hose","tpage_name":"sewa-vis-pris"}],[73465881,{"idx":25,"name":"sewer-metal-block-07","tpage_name":"sewk-vis-tfrag"}],[122159140,{"idx":36,"name":"fac-tower-door-02","tpage_name":"factoryb-vis-tfrag"}],[104726620,{"idx":92,"name":"jakchires-leatherpouch","tpage_name":"deshover-pris"}],[57278542,{"idx":78,"name":"wstlander-03-flesh","tpage_name":"waswide-vis-pris"}],[67239982,{"idx":46,"name":"warpgate-circuitpattern2","tpage_name":"vinroom-vis-tfrag"}],[48562282,{"idx":106,"name":"cguard1-backmetal","tpage_name":"sewa-vis-pris"}],[73465882,{"idx":26,"name":"sewer-stone-arch-01","tpage_name":"sewk-vis-tfrag"}],[122159141,{"idx":37,"name":"facb-big-metal-panl01","tpage_name":"factoryb-vis-tfrag"}],[104726621,{"idx":93,"name":"jakchires-lightbrownspat","tpage_name":"deshover-pris"}],[57278543,{"idx":79,"name":"wstlander-04-dark-blue","tpage_name":"waswide-vis-pris"}],[67239983,{"idx":47,"name":"warpgate-precursormetal","tpage_name":"vinroom-vis-tfrag"}],[48562283,{"idx":107,"name":"cguard1-chestplate","tpage_name":"sewa-vis-pris"}],[73465883,{"idx":27,"name":"sewer-pipe-01","tpage_name":"sewk-vis-tfrag"}],[122159142,{"idx":38,"name":"facb_dec-metal-01","tpage_name":"factoryb-vis-tfrag"}],[104726622,{"idx":94,"name":"jakchires-pants","tpage_name":"deshover-pris"}],[57278544,{"idx":80,"name":"wstlander-04-gun","tpage_name":"waswide-vis-pris"}],[67239984,{"idx":48,"name":"warpgate-post-01","tpage_name":"vinroom-vis-tfrag"}],[48562284,{"idx":108,"name":"cguard1-gunmetaldark2","tpage_name":"sewa-vis-pris"}],[73465884,{"idx":28,"name":"sewer-pipe-02-edge-01","tpage_name":"sewk-vis-tfrag"}],[104726623,{"idx":95,"name":"jakchires-precarmor-01","tpage_name":"deshover-pris"}],[122159144,{"idx":40,"name":"fac-tower-04","tpage_name":"factoryb-vis-tfrag"}],[104726624,{"idx":96,"name":"jakchires-shoebottom","tpage_name":"deshover-pris"}],[57278546,{"idx":82,"name":"wstlander-04-shirt","tpage_name":"waswide-vis-pris"}],[48562286,{"idx":110,"name":"cguard1-lens","tpage_name":"sewa-vis-pris"}],[73465886,{"idx":30,"name":"sewer-round-03","tpage_name":"sewk-vis-tfrag"}],[122159145,{"idx":41,"name":"fac-tower-01","tpage_name":"factoryb-vis-tfrag"}],[104726625,{"idx":97,"name":"jakchires-shoemetal","tpage_name":"deshover-pris"}],[57278547,{"idx":83,"name":"wstlander-04-shirt-strap","tpage_name":"waswide-vis-pris"}],[48562287,{"idx":111,"name":"cguardgame-backplate","tpage_name":"sewa-vis-pris"}],[73465887,{"idx":31,"name":"sewer-round-02","tpage_name":"sewk-vis-tfrag"}],[122159146,{"idx":42,"name":"fac-tower-pipe-03","tpage_name":"factoryb-vis-tfrag"}],[104726626,{"idx":98,"name":"jakchires-shoeteop","tpage_name":"deshover-pris"}],[57278548,{"idx":84,"name":"wstlander-04-skirt","tpage_name":"waswide-vis-pris"}],[48562288,{"idx":112,"name":"cguardgame-metaledark-02","tpage_name":"sewa-vis-pris"}],[73465888,{"idx":32,"name":"sewer-pipe-rim-06","tpage_name":"sewk-vis-tfrag"}],[122159147,{"idx":43,"name":"fac-tower-large-panel-01","tpage_name":"factoryb-vis-tfrag"}],[104726627,{"idx":99,"name":"jakchires-teeth","tpage_name":"deshover-pris"}],[57278549,{"idx":85,"name":"wstlanderchic-blackstrap","tpage_name":"waswide-vis-pris"}],[48562289,{"idx":113,"name":"cguardgame-metallight-01small","tpage_name":"sewa-vis-pris"}],[73465889,{"idx":33,"name":"sewer-metal-03","tpage_name":"sewk-vis-tfrag"}],[122159148,{"idx":44,"name":"fac-tower-09","tpage_name":"factoryb-vis-tfrag"}],[104726628,{"idx":100,"name":"dark-crystal-knob-01","tpage_name":"deshover-pris"}],[57278550,{"idx":86,"name":"wstlanderchic-blackstrapplain","tpage_name":"waswide-vis-pris"}],[48562290,{"idx":114,"name":"cguardgame-shoebottom","tpage_name":"sewa-vis-pris"}],[73465890,{"idx":34,"name":"sewer-metal-block-02","tpage_name":"sewk-vis-tfrag"}],[104726629,{"idx":101,"name":"dark-crystal-knob-02","tpage_name":"deshover-pris"}],[57278551,{"idx":87,"name":"wstlanderchic-bootarmor","tpage_name":"waswide-vis-pris"}],[48562291,{"idx":115,"name":"roboguard-die-stamped-metal-blue","tpage_name":"sewa-vis-pris"}],[73465891,{"idx":35,"name":"sewer-small-light-01","tpage_name":"sewk-vis-tfrag"}],[122159150,{"idx":46,"name":"facb-light-01","tpage_name":"factoryb-vis-tfrag"}],[104726630,{"idx":102,"name":"dark-crystal-pickup-01","tpage_name":"deshover-pris"}],[57278552,{"idx":88,"name":"wstlanderchic-bootleg","tpage_name":"waswide-vis-pris"}],[52297832,{"idx":104,"name":"ctyslumc-light","tpage_name":"freehq-tfrag"}],[73465892,{"idx":36,"name":"sewer-pipe-rim-08","tpage_name":"sewk-vis-tfrag"}],[122159151,{"idx":47,"name":"facb-metal-grill-01","tpage_name":"factoryb-vis-tfrag"}],[104726631,{"idx":103,"name":"dark-crystal-pickup-02","tpage_name":"deshover-pris"}],[57278553,{"idx":89,"name":"wstlanderchic-corset","tpage_name":"waswide-vis-pris"}],[52297833,{"idx":105,"name":"common-black","tpage_name":"freehq-tfrag"}],[48562293,{"idx":117,"name":"roboguard-headshield","tpage_name":"sewa-vis-pris"}],[73465893,{"idx":37,"name":"sewer-lip-01","tpage_name":"sewk-vis-tfrag"}],[104726632,{"idx":104,"name":"dark-crystal-pickup-03","tpage_name":"deshover-pris"}],[57278554,{"idx":90,"name":"wstlanderchic-eye","tpage_name":"waswide-vis-pris"}],[48562294,{"idx":118,"name":"roboguard-shouldershield","tpage_name":"sewa-vis-pris"}],[73465894,{"idx":38,"name":"sewer-metal-trim-02","tpage_name":"sewk-vis-tfrag"}],[122159153,{"idx":49,"name":"fac-tower-pipe-rim-01","tpage_name":"factoryb-vis-tfrag"}],[104726633,{"idx":105,"name":"vehicle-snake-tread-01","tpage_name":"deshover-pris"}],[57278555,{"idx":91,"name":"wstlanderchic-flesh","tpage_name":"waswide-vis-pris"}],[48562295,{"idx":119,"name":"squid-bulb-sm","tpage_name":"sewa-vis-pris"}],[73465895,{"idx":39,"name":"sewer-block-01","tpage_name":"sewk-vis-tfrag"}],[122159154,{"idx":50,"name":"factory-base-01","tpage_name":"factoryb-vis-tfrag"}],[104726634,{"idx":106,"name":"vehicle-snake-tread-02","tpage_name":"deshover-pris"}],[57278556,{"idx":92,"name":"wstlanderchic-hair","tpage_name":"waswide-vis-pris"}],[48562296,{"idx":120,"name":"squid-tubes","tpage_name":"sewa-vis-pris"}],[73465896,{"idx":40,"name":"sewer-pipe-rim-10","tpage_name":"sewk-vis-tfrag"}],[122159155,{"idx":51,"name":"fac-tower-02","tpage_name":"factoryb-vis-tfrag"}],[104726635,{"idx":107,"name":"vehicle-wheel-01","tpage_name":"deshover-pris"}],[57278557,{"idx":93,"name":"wstlanderchic-hairtop","tpage_name":"waswide-vis-pris"}],[48562297,{"idx":121,"name":"widow-dull-inards","tpage_name":"sewa-vis-pris"}],[73465897,{"idx":41,"name":"sewer-rubber-rim-01","tpage_name":"sewk-vis-tfrag"}],[57278558,{"idx":94,"name":"wstlanderchic-legwrap2","tpage_name":"waswide-vis-pris"}],[48562298,{"idx":122,"name":"widow-pod-gun-metal","tpage_name":"sewa-vis-pris"}],[73465898,{"idx":42,"name":"sew-gun-rim-03","tpage_name":"sewk-vis-tfrag"}],[57278559,{"idx":95,"name":"wstlanderchic-pants","tpage_name":"waswide-vis-pris"}],[48562299,{"idx":123,"name":"wire-metal","tpage_name":"sewa-vis-pris"}],[52297839,{"idx":111,"name":"ctyslumc-wall-trim","tpage_name":"freehq-tfrag"}],[73465899,{"idx":43,"name":"sewer-screw-02","tpage_name":"sewk-vis-tfrag"}],[57278560,{"idx":96,"name":"wstlanderchic-shirt","tpage_name":"waswide-vis-pris"}],[48562300,{"idx":124,"name":"squid-drabgun","tpage_name":"sewa-vis-pris"}],[73465900,{"idx":44,"name":"sewer-pipe-rim-07","tpage_name":"sewk-vis-tfrag"}],[57278561,{"idx":97,"name":"wstlanderchic-shirtb","tpage_name":"waswide-vis-pris"}],[48562301,{"idx":125,"name":"kg-grunt-cable-01","tpage_name":"sewa-vis-pris"}],[73465901,{"idx":45,"name":"sewer-plate-01","tpage_name":"sewk-vis-tfrag"}],[57278562,{"idx":98,"name":"wstlanderchic-shoetop","tpage_name":"waswide-vis-pris"}],[48562302,{"idx":126,"name":"kg-grunt-rim-03","tpage_name":"sewa-vis-pris"}],[73465902,{"idx":46,"name":"sewer-round-01","tpage_name":"sewk-vis-tfrag"}],[57278563,{"idx":99,"name":"wstlanderchic-shoetopb","tpage_name":"waswide-vis-pris"}],[73465903,{"idx":47,"name":"sewer-yellow-light-01","tpage_name":"sewk-vis-tfrag"}],[57278564,{"idx":100,"name":"wstlanderchic-skirt","tpage_name":"waswide-vis-pris"}],[73465904,{"idx":48,"name":"sewer-yellow-light-02","tpage_name":"sewk-vis-tfrag"}],[73465905,{"idx":49,"name":"sewer-red-light-01","tpage_name":"sewk-vis-tfrag"}],[52297846,{"idx":118,"name":"ctyslumc-overhang-02","tpage_name":"freehq-tfrag"}],[73465906,{"idx":50,"name":"sewer-red-light-02","tpage_name":"sewk-vis-tfrag"}],[73465907,{"idx":51,"name":"sewer-brick-roof-02","tpage_name":"sewk-vis-tfrag"}],[73465908,{"idx":52,"name":"sewer-brick-roof-03","tpage_name":"sewk-vis-tfrag"}],[73465909,{"idx":53,"name":"sewer-brick-roof-01","tpage_name":"sewk-vis-tfrag"}],[73465910,{"idx":54,"name":"sewer-brick-roof-04","tpage_name":"sewk-vis-tfrag"}],[73465911,{"idx":55,"name":"sewer-big-brace-02","tpage_name":"sewk-vis-tfrag"}],[73465912,{"idx":56,"name":"sewer-plate-04","tpage_name":"sewk-vis-tfrag"}],[52297853,{"idx":125,"name":"cityslumc-metal-trim","tpage_name":"freehq-tfrag"}],[73465913,{"idx":57,"name":"sewer-big-brace-trim-01","tpage_name":"sewk-vis-tfrag"}],[52297854,{"idx":126,"name":"cityslumc-door-plate","tpage_name":"freehq-tfrag"}],[73465914,{"idx":58,"name":"sewer-big-brace-trim-02","tpage_name":"sewk-vis-tfrag"}],[52297855,{"idx":127,"name":"cityslumc-pipe","tpage_name":"freehq-tfrag"}],[73465915,{"idx":59,"name":"sewer-nut","tpage_name":"sewk-vis-tfrag"}],[52297856,{"idx":128,"name":"lfacrm-girder-01","tpage_name":"freehq-tfrag"}],[73465916,{"idx":60,"name":"sewer-nut-rim","tpage_name":"sewk-vis-tfrag"}],[52297857,{"idx":129,"name":"lfacrm-plate-05","tpage_name":"freehq-tfrag"}],[73465917,{"idx":61,"name":"sewer-plate-06","tpage_name":"sewk-vis-tfrag"}],[73465918,{"idx":62,"name":"sewer-corroded-trim","tpage_name":"sewk-vis-tfrag"}],[73465919,{"idx":63,"name":"sewer-rusted-metal","tpage_name":"sewk-vis-tfrag"}],[73465920,{"idx":64,"name":"sewer-metal-trim-02-hitweak","tpage_name":"sewk-vis-tfrag"}],[73465921,{"idx":65,"name":"strip-black","tpage_name":"sewk-vis-tfrag"}],[73465922,{"idx":66,"name":"sewer-pipe-rim-09","tpage_name":"sewk-vis-tfrag"}],[73465923,{"idx":67,"name":"sewer-pipe-small-02","tpage_name":"sewk-vis-tfrag"}],[58654796,{"idx":76,"name":"screen-00","tpage_name":"hiphog-sprite"}],[71106596,{"idx":36,"name":"wstd-platform-base","tpage_name":"wasstadb-tfrag"}],[38731916,{"idx":140,"name":"flying-bird-13","tpage_name":"wasstada-sprite"}],[73596956,{"idx":28,"name":"sewer-pipe-01","tpage_name":"sewi-vis-tfrag"}],[58654797,{"idx":77,"name":"screen-01","tpage_name":"hiphog-sprite"}],[71106597,{"idx":37,"name":"wstd-platform-floor","tpage_name":"wasstadb-tfrag"}],[38731917,{"idx":141,"name":"flying-bird-14","tpage_name":"wasstada-sprite"}],[73596957,{"idx":29,"name":"sewer-pipe-rim-07","tpage_name":"sewi-vis-tfrag"}],[58654799,{"idx":79,"name":"screen-03","tpage_name":"hiphog-sprite"}],[71106599,{"idx":39,"name":"wstd-scaffold-floor-01","tpage_name":"wasstadb-tfrag"}],[38731919,{"idx":143,"name":"flying-bird-16","tpage_name":"wasstada-sprite"}],[73596959,{"idx":31,"name":"sewer-pipe-rim-05b","tpage_name":"sewi-vis-tfrag"}],[58654800,{"idx":80,"name":"screen-04","tpage_name":"hiphog-sprite"}],[71106600,{"idx":40,"name":"wstd-stands-ceilingplate","tpage_name":"wasstadb-tfrag"}],[38731920,{"idx":144,"name":"female1_00","tpage_name":"wasstada-sprite"}],[73596960,{"idx":32,"name":"sewer-scaffold-01","tpage_name":"sewi-vis-tfrag"}],[58654801,{"idx":81,"name":"screen-05","tpage_name":"hiphog-sprite"}],[71106601,{"idx":41,"name":"dummy-stripe-pole-01","tpage_name":"wasstadb-tfrag"}],[38731921,{"idx":145,"name":"female1_01","tpage_name":"wasstada-sprite"}],[73596961,{"idx":33,"name":"sewer-concrete-edge-02","tpage_name":"sewi-vis-tfrag"}],[58654802,{"idx":82,"name":"screen-06","tpage_name":"hiphog-sprite"}],[71106602,{"idx":42,"name":"dummy-black-01","tpage_name":"wasstadb-tfrag"}],[38731922,{"idx":146,"name":"female1_02","tpage_name":"wasstada-sprite"}],[73596962,{"idx":34,"name":"sewer-metal-block-04","tpage_name":"sewi-vis-tfrag"}],[58654803,{"idx":83,"name":"screen-07","tpage_name":"hiphog-sprite"}],[71106603,{"idx":43,"name":"dummy-chestplate-01","tpage_name":"wasstadb-tfrag"}],[38731923,{"idx":147,"name":"female1_03","tpage_name":"wasstada-sprite"}],[73596963,{"idx":35,"name":"sewer-metal-block-01","tpage_name":"sewi-vis-tfrag"}],[71106607,{"idx":47,"name":"dummy-black-bar-01","tpage_name":"wasstadb-tfrag"}],[58654807,{"idx":87,"name":"screen-11","tpage_name":"hiphog-sprite"}],[38731927,{"idx":151,"name":"female1_07","tpage_name":"wasstada-sprite"}],[73596967,{"idx":39,"name":"sewer-pipe-rim-06","tpage_name":"sewi-vis-tfrag"}],[71106608,{"idx":48,"name":"dummy-blade-long-01","tpage_name":"wasstadb-tfrag"}],[58654808,{"idx":88,"name":"screen-12","tpage_name":"hiphog-sprite"}],[38731928,{"idx":152,"name":"female1_08","tpage_name":"wasstada-sprite"}],[73596968,{"idx":40,"name":"sewer-plate-05","tpage_name":"sewi-vis-tfrag"}],[58654809,{"idx":89,"name":"screen-13","tpage_name":"hiphog-sprite"}],[71106609,{"idx":49,"name":"dummy-faceplate-01","tpage_name":"wasstadb-tfrag"}],[38731929,{"idx":153,"name":"female1_09","tpage_name":"wasstada-sprite"}],[73596969,{"idx":41,"name":"sewer-metal-trim-01","tpage_name":"sewi-vis-tfrag"}],[58654810,{"idx":90,"name":"screen-14","tpage_name":"hiphog-sprite"}],[71106610,{"idx":50,"name":"dummy-blade-handle-01","tpage_name":"wasstadb-tfrag"}],[38731930,{"idx":154,"name":"female1_10","tpage_name":"wasstada-sprite"}],[73596970,{"idx":42,"name":"sewer-rubber-rim-01","tpage_name":"sewi-vis-tfrag"}],[58654823,{"idx":103,"name":"blue-panel","tpage_name":"hiphog-sprite"}],[38731943,{"idx":167,"name":"femcher2_02","tpage_name":"wasstada-sprite"}],[73596983,{"idx":55,"name":"sewer-scaffold-03","tpage_name":"sewi-vis-tfrag"}],[38731944,{"idx":168,"name":"femcher2_03","tpage_name":"wasstada-sprite"}],[73596984,{"idx":56,"name":"common-black","tpage_name":"sewi-vis-tfrag"}],[38731945,{"idx":169,"name":"femcher2_04","tpage_name":"wasstada-sprite"}],[73596985,{"idx":57,"name":"sewer-concrete-edge-01","tpage_name":"sewi-vis-tfrag"}],[38731946,{"idx":170,"name":"femcher2_05","tpage_name":"wasstada-sprite"}],[73596986,{"idx":58,"name":"sewer-plate-02","tpage_name":"sewi-vis-tfrag"}],[38731947,{"idx":171,"name":"femcher2_06","tpage_name":"wasstada-sprite"}],[73596987,{"idx":59,"name":"sewer-plate-03","tpage_name":"sewi-vis-tfrag"}],[92274694,{"idx":6,"name":"intcept-tread01","tpage_name":"desrace2-pris"}],[38731954,{"idx":178,"name":"femcher2_13","tpage_name":"wasstada-sprite"}],[73596994,{"idx":66,"name":"sewer-brick-roof-05","tpage_name":"sewi-vis-tfrag"}],[71172104,{"idx":8,"name":"pecker-wingtop","tpage_name":"ldampeck-pris"}],[73662464,{"idx":0,"name":"sewer-pipe-small-01","tpage_name":"sewi-vis-shrub"}],[71172105,{"idx":9,"name":"pecker-yellowfur","tpage_name":"ldampeck-pris"}],[73662465,{"idx":1,"name":"sewer-moss-01","tpage_name":"sewi-vis-shrub"}],[73662466,{"idx":2,"name":"sewer-nut","tpage_name":"sewi-vis-shrub"}],[73662467,{"idx":3,"name":"sewer-hang-moss-01","tpage_name":"sewi-vis-shrub"}],[90243094,{"idx":22,"name":"wascity-cement-road","tpage_name":"desertb-vis-tfrag"}],[90243095,{"idx":23,"name":"wascity-metal-fan","tpage_name":"desertb-vis-tfrag"}],[90243097,{"idx":25,"name":"wascity-metal-dirty","tpage_name":"desertb-vis-tfrag"}],[90243098,{"idx":26,"name":"wascitya-airlock-metal-bits","tpage_name":"desertb-vis-tfrag"}],[71237640,{"idx":8,"name":"king-ear","tpage_name":"ldampeck-pris2"}],[35127420,{"idx":124,"name":"jakchires-jacket","tpage_name":"factorya-pris"}],[73728000,{"idx":0,"name":"sewer-brick-block-10","tpage_name":"sewh-vis-tfrag"}],[71237641,{"idx":9,"name":"king-earing","tpage_name":"ldampeck-pris2"}],[35127421,{"idx":125,"name":"jakchires-leatherpouch","tpage_name":"factorya-pris"}],[73728001,{"idx":1,"name":"sewer-brick-block-11","tpage_name":"sewh-vis-tfrag"}],[71237642,{"idx":10,"name":"king-face-01","tpage_name":"ldampeck-pris2"}],[35127422,{"idx":126,"name":"jakchires-lightbrownspat","tpage_name":"factorya-pris"}],[73728002,{"idx":2,"name":"sewer-metal-block-02","tpage_name":"sewh-vis-tfrag"}],[71237643,{"idx":11,"name":"king-finger","tpage_name":"ldampeck-pris2"}],[35127423,{"idx":127,"name":"jakchires-pants","tpage_name":"factorya-pris"}],[73728003,{"idx":3,"name":"sewer-pipe-rim-05b","tpage_name":"sewh-vis-tfrag"}],[35127468,{"idx":172,"name":"errolcyber-glovepalm","tpage_name":"factorya-pris"}],[73728048,{"idx":48,"name":"sewer-concrete-edge-02","tpage_name":"sewh-vis-tfrag"}],[35127469,{"idx":173,"name":"errolcyber-greyknobs","tpage_name":"factorya-pris"}],[73728049,{"idx":49,"name":"sewer-metal-block-06","tpage_name":"sewh-vis-tfrag"}],[35127470,{"idx":174,"name":"errolcyber-greymetal","tpage_name":"factorya-pris"}],[73728050,{"idx":50,"name":"sewer-pipe-rim-08","tpage_name":"sewh-vis-tfrag"}],[95944717,{"idx":13,"name":"torn-finger","tpage_name":"freehq-pris2"}],[92209177,{"idx":25,"name":"klever-handwrap","tpage_name":"ldamklev-pris"}],[35127471,{"idx":175,"name":"errolcyber-greymetal-02","tpage_name":"factorya-pris"}],[73728051,{"idx":51,"name":"common-black","tpage_name":"sewh-vis-tfrag"}],[95944718,{"idx":14,"name":"torn-footleather","tpage_name":"freehq-pris2"}],[92209178,{"idx":26,"name":"klever-horn","tpage_name":"ldamklev-pris"}],[35127472,{"idx":176,"name":"errolcyber-hair","tpage_name":"factorya-pris"}],[73728052,{"idx":52,"name":"sewer-concrete-edge-01","tpage_name":"sewh-vis-tfrag"}],[95944719,{"idx":15,"name":"torn-gunbarrel","tpage_name":"freehq-pris2"}],[92209179,{"idx":27,"name":"klever-shoe","tpage_name":"ldamklev-pris"}],[35127473,{"idx":177,"name":"errolcyber-head-01","tpage_name":"factorya-pris"}],[73728053,{"idx":53,"name":"sewer-pipe-small-02","tpage_name":"sewh-vis-tfrag"}],[100925440,{"idx":0,"name":"bam-eyelight","tpage_name":"ljkdmpk-pris2"}],[95944720,{"idx":16,"name":"torn-gunbarrel-02","tpage_name":"freehq-pris2"}],[92209180,{"idx":28,"name":"klever-shoebottom","tpage_name":"ldamklev-pris"}],[100925442,{"idx":2,"name":"king-arm","tpage_name":"ljkdmpk-pris2"}],[95944722,{"idx":18,"name":"torn-hair-02","tpage_name":"freehq-pris2"}],[92209182,{"idx":30,"name":"klever-skirtlight","tpage_name":"ldamklev-pris"}],[100925443,{"idx":3,"name":"king-blackskirt2","tpage_name":"ljkdmpk-pris2"}],[95944723,{"idx":19,"name":"torn-handle-01","tpage_name":"freehq-pris2"}],[92209183,{"idx":31,"name":"klever-thighs","tpage_name":"ldamklev-pris"}],[95944724,{"idx":20,"name":"torn-legshield","tpage_name":"freehq-pris2"}],[100925444,{"idx":4,"name":"king-bluemetal","tpage_name":"ljkdmpk-pris2"}],[92209184,{"idx":32,"name":"klever-undershirt","tpage_name":"ldamklev-pris"}],[91160591,{"idx":15,"name":"daxterlense","tpage_name":"gungame-vis-pris"}],[35127491,{"idx":195,"name":"errolcyber-metaleyelid","tpage_name":"factorya-pris"}],[73728071,{"idx":71,"name":"sewer-brick-block-04-hitweak","tpage_name":"sewh-vis-tfrag"}],[91160592,{"idx":16,"name":"daxternose","tpage_name":"gungame-vis-pris"}],[35127492,{"idx":196,"name":"errolcyber-roboeye","tpage_name":"factorya-pris"}],[73728072,{"idx":72,"name":"sewer-block-01-hitweak","tpage_name":"sewh-vis-tfrag"}],[73728076,{"idx":76,"name":"sewer-metal-block-01-hitweak","tpage_name":"sewh-vis-tfrag"}],[73728077,{"idx":77,"name":"sewer-metal-block-06-highertweak","tpage_name":"sewh-vis-tfrag"}],[73728079,{"idx":79,"name":"sewer-pipe-rim-05b-hitweak","tpage_name":"sewh-vis-tfrag"}],[62652452,{"idx":36,"name":"citn-allleather-edge","tpage_name":"ctypepa-pris"}],[73859072,{"idx":0,"name":"sewer-metal-block-06","tpage_name":"sewg-vis-tfrag"}],[62652453,{"idx":37,"name":"citn-allleather-shoulder","tpage_name":"ctypepa-pris"}],[73859073,{"idx":1,"name":"sewer-metal-block-04","tpage_name":"sewg-vis-tfrag"}],[62652454,{"idx":38,"name":"citn-allleatherstrap","tpage_name":"ctypepa-pris"}],[73859074,{"idx":2,"name":"sewer-pipe-rim-05","tpage_name":"sewg-vis-tfrag"}],[62652455,{"idx":39,"name":"citn-allleatherwrinkled","tpage_name":"ctypepa-pris"}],[73859075,{"idx":3,"name":"sewer-plate-05","tpage_name":"sewg-vis-tfrag"}],[62652456,{"idx":40,"name":"citn-allleye","tpage_name":"ctypepa-pris"}],[73859076,{"idx":4,"name":"sewer-metal-03","tpage_name":"sewg-vis-tfrag"}],[62652457,{"idx":41,"name":"citn-allshoebottom","tpage_name":"ctypepa-pris"}],[73859077,{"idx":5,"name":"sewer-pipe-rim-08","tpage_name":"sewg-vis-tfrag"}],[62652458,{"idx":42,"name":"citn-allsuede","tpage_name":"ctypepa-pris"}],[73859078,{"idx":6,"name":"sewer-hall-light-01","tpage_name":"sewg-vis-tfrag"}],[62652459,{"idx":43,"name":"citn-allsuedeplain","tpage_name":"ctypepa-pris"}],[73859079,{"idx":7,"name":"common-black","tpage_name":"sewg-vis-tfrag"}],[76349440,{"idx":0,"name":"bam-eyelight","tpage_name":"ltornsam-pris2"}],[73859080,{"idx":8,"name":"sewer-concrete-edge-01","tpage_name":"sewg-vis-tfrag"}],[76349441,{"idx":1,"name":"bam-hairhilite","tpage_name":"ltornsam-pris2"}],[73859081,{"idx":9,"name":"sewer-pipe-small-02","tpage_name":"sewg-vis-tfrag"}],[76349443,{"idx":3,"name":"samos-diaper","tpage_name":"ltornsam-pris2"}],[73859083,{"idx":11,"name":"sewer-metal-block-02","tpage_name":"sewg-vis-tfrag"}],[76349444,{"idx":4,"name":"samos-ear","tpage_name":"ltornsam-pris2"}],[73859084,{"idx":12,"name":"sewer-metal-01","tpage_name":"sewg-vis-tfrag"}],[76349445,{"idx":5,"name":"samos-eye","tpage_name":"ltornsam-pris2"}],[73859085,{"idx":13,"name":"sewer-scaffold-01","tpage_name":"sewg-vis-tfrag"}],[76349446,{"idx":6,"name":"samos-eyelid","tpage_name":"ltornsam-pris2"}],[73859086,{"idx":14,"name":"sewer-concrete-edge-02","tpage_name":"sewg-vis-tfrag"}],[76349447,{"idx":7,"name":"samos-face","tpage_name":"ltornsam-pris2"}],[73859087,{"idx":15,"name":"sewer-metal-block-01","tpage_name":"sewg-vis-tfrag"}],[76349448,{"idx":8,"name":"samos-finger-01","tpage_name":"ltornsam-pris2"}],[73859088,{"idx":16,"name":"sewer-plate-04","tpage_name":"sewg-vis-tfrag"}],[76349449,{"idx":9,"name":"samos-hair","tpage_name":"ltornsam-pris2"}],[73859089,{"idx":17,"name":"sewer-pipe-rim-07","tpage_name":"sewg-vis-tfrag"}],[76349450,{"idx":10,"name":"samos-helmet","tpage_name":"ltornsam-pris2"}],[73859090,{"idx":18,"name":"sewer-pipe-rim-03","tpage_name":"sewg-vis-tfrag"}],[76349451,{"idx":11,"name":"samos-leaf","tpage_name":"ltornsam-pris2"}],[73859091,{"idx":19,"name":"sewer-plate-02","tpage_name":"sewg-vis-tfrag"}],[76349459,{"idx":19,"name":"samos-vest","tpage_name":"ltornsam-pris2"}],[80084999,{"idx":7,"name":"ashelin-eye","tpage_name":"lashelin-pris2"}],[73859099,{"idx":27,"name":"sewer-block-01","tpage_name":"sewg-vis-tfrag"}],[76349460,{"idx":20,"name":"samosbird-beak","tpage_name":"ltornsam-pris2"}],[80085000,{"idx":8,"name":"ashelin-eyebrow","tpage_name":"lashelin-pris2"}],[73859100,{"idx":28,"name":"sewer-block-02","tpage_name":"sewg-vis-tfrag"}],[76349461,{"idx":21,"name":"samosbird-body","tpage_name":"ltornsam-pris2"}],[80085001,{"idx":9,"name":"ashelin-eyelid","tpage_name":"lashelin-pris2"}],[73859101,{"idx":29,"name":"sewer-lip-01","tpage_name":"sewg-vis-tfrag"}],[76349462,{"idx":22,"name":"samosbird-eye","tpage_name":"ltornsam-pris2"}],[80085002,{"idx":10,"name":"ashelin-face","tpage_name":"lashelin-pris2"}],[73859102,{"idx":30,"name":"sewer-metal-trim-02","tpage_name":"sewg-vis-tfrag"}],[76349468,{"idx":28,"name":"torn-belt","tpage_name":"ltornsam-pris2"}],[80085008,{"idx":16,"name":"ashelin-hair","tpage_name":"lashelin-pris2"}],[73859108,{"idx":36,"name":"sewer-brick-roof-01","tpage_name":"sewg-vis-tfrag"}],[62062636,{"idx":44,"name":"water-froth","tpage_name":"wascityb-sprite"}],[57081916,{"idx":60,"name":"waspala-elevator-tube","tpage_name":"waspala-pris"}],[67043356,{"idx":28,"name":"vinroom-tv-linetext-01","tpage_name":"vinroom-sprite"}],[74514436,{"idx":4,"name":"airlockl-door-metalframe","tpage_name":"sewj-vis-pris"}],[75759616,{"idx":0,"name":"bam-eyelight","tpage_name":"onintent-pris"}],[62062637,{"idx":45,"name":"wave-foam","tpage_name":"wascityb-sprite"}],[57081917,{"idx":61,"name":"waspala-wheel-edge","tpage_name":"waspala-pris"}],[67043357,{"idx":29,"name":"vinroom-tv-linetext-02","tpage_name":"vinroom-sprite"}],[74514437,{"idx":5,"name":"airlock-door-cog1","tpage_name":"sewj-vis-pris"}],[75759617,{"idx":1,"name":"bam-hairhilite","tpage_name":"onintent-pris"}],[62062638,{"idx":46,"name":"boom","tpage_name":"wascityb-sprite"}],[57081918,{"idx":62,"name":"waspala-wheel-face-01","tpage_name":"waspala-pris"}],[67043358,{"idx":30,"name":"vinroom-tv-linetext-03","tpage_name":"vinroom-sprite"}],[75759618,{"idx":2,"name":"daxter-eyelid","tpage_name":"onintent-pris"}],[62062639,{"idx":47,"name":"twirl-path","tpage_name":"wascityb-sprite"}],[57081919,{"idx":63,"name":"waspala-wheel-face-02","tpage_name":"waspala-pris"}],[67043359,{"idx":31,"name":"vinroom-tv-linetext-04","tpage_name":"vinroom-sprite"}],[74514439,{"idx":7,"name":"blue-gem","tpage_name":"sewj-vis-pris"}],[75759619,{"idx":3,"name":"daxter-furhilite","tpage_name":"onintent-pris"}],[62062640,{"idx":48,"name":"was-gun-beam","tpage_name":"wascityb-sprite"}],[57081920,{"idx":64,"name":"waspala-wheel-interior","tpage_name":"waspala-pris"}],[67043360,{"idx":32,"name":"vinroom-tv-linetext-05","tpage_name":"vinroom-sprite"}],[74514440,{"idx":8,"name":"brown-hose","tpage_name":"sewj-vis-pris"}],[75759620,{"idx":4,"name":"daxter-orange","tpage_name":"onintent-pris"}],[57081921,{"idx":65,"name":"waspala-wheel-paddle","tpage_name":"waspala-pris"}],[67043361,{"idx":33,"name":"vinroom-tv-linetext-06","tpage_name":"vinroom-sprite"}],[74514441,{"idx":9,"name":"cguard1-backmetal","tpage_name":"sewj-vis-pris"}],[75759621,{"idx":5,"name":"daxterarm","tpage_name":"onintent-pris"}],[57081922,{"idx":66,"name":"waspala-wheel-pipe","tpage_name":"waspala-pris"}],[67043362,{"idx":34,"name":"vinroom-tv-linetext-07","tpage_name":"vinroom-sprite"}],[74514442,{"idx":10,"name":"cguard1-chestplate","tpage_name":"sewj-vis-pris"}],[75759622,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"onintent-pris"}],[67043363,{"idx":35,"name":"vinroom-tv-linetext-08","tpage_name":"vinroom-sprite"}],[74514443,{"idx":11,"name":"cguard1-gunmetaldark2","tpage_name":"sewj-vis-pris"}],[75759623,{"idx":7,"name":"daxterbolt","tpage_name":"onintent-pris"}],[67043364,{"idx":36,"name":"vinroom-tv-morgan","tpage_name":"vinroom-sprite"}],[74514444,{"idx":12,"name":"cguard1-guntube","tpage_name":"sewj-vis-pris"}],[75759624,{"idx":8,"name":"daxterear","tpage_name":"onintent-pris"}],[67043366,{"idx":38,"name":"vinroom-tv-radar-dots","tpage_name":"vinroom-sprite"}],[74514446,{"idx":14,"name":"cguardgame-backplate","tpage_name":"sewj-vis-pris"}],[75759626,{"idx":10,"name":"daxterfoot","tpage_name":"onintent-pris"}],[67043367,{"idx":39,"name":"vinroom-tv-text-a","tpage_name":"vinroom-sprite"}],[74514447,{"idx":15,"name":"cguardgame-metaledark-02","tpage_name":"sewj-vis-pris"}],[75759627,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"onintent-pris"}],[79495168,{"idx":0,"name":"des-wascity-outerwall-rock","tpage_name":"wasintro-vis-tfrag"}],[67043368,{"idx":40,"name":"vinroom-tv-text-g","tpage_name":"vinroom-sprite"}],[74514448,{"idx":16,"name":"cguardgame-metallight-01small","tpage_name":"sewj-vis-pris"}],[75759628,{"idx":12,"name":"daxtergoggles","tpage_name":"onintent-pris"}],[49021008,{"idx":80,"name":"sewer-metal-block-04-hitweak","tpage_name":"sewe-vis-tfrag"}],[73924608,{"idx":0,"name":"sewer-nut","tpage_name":"sewg-vis-shrub"}],[73924622,{"idx":14,"name":"sew-mine-b-body","tpage_name":"sewg-vis-shrub"}],[73924623,{"idx":15,"name":"sewer-shrub-pitting-01","tpage_name":"sewg-vis-shrub"}],[71565320,{"idx":8,"name":"pecker-wingtop","tpage_name":"ldampksm-pris"}],[67829780,{"idx":20,"name":"vinroom-small-monitor-02","tpage_name":"freehq-sprite"}],[74055680,{"idx":0,"name":"sewer-plate-02","tpage_name":"sewi-vis-pris"}],[71565321,{"idx":9,"name":"pecker-yellowfur","tpage_name":"ldampksm-pris"}],[67829781,{"idx":21,"name":"vinroom-small-monitor-03","tpage_name":"freehq-sprite"}],[74055681,{"idx":1,"name":"sewer-plate-05","tpage_name":"sewi-vis-pris"}],[67829782,{"idx":22,"name":"vinroom-small-monitor-04","tpage_name":"freehq-sprite"}],[74055682,{"idx":2,"name":"airlock-door-bolt","tpage_name":"sewi-vis-pris"}],[67829783,{"idx":23,"name":"vinroom-small-monitor-05","tpage_name":"freehq-sprite"}],[74055683,{"idx":3,"name":"airlock-door-cog","tpage_name":"sewi-vis-pris"}],[67829784,{"idx":24,"name":"vinroom-small-monitor-06","tpage_name":"freehq-sprite"}],[74055684,{"idx":4,"name":"airlock-door-main","tpage_name":"sewi-vis-pris"}],[67829785,{"idx":25,"name":"vinroom-small-monitor-07","tpage_name":"freehq-sprite"}],[74055685,{"idx":5,"name":"airlock-door-metal2","tpage_name":"sewi-vis-pris"}],[67829786,{"idx":26,"name":"vinroom-small-monitor-08","tpage_name":"freehq-sprite"}],[74055686,{"idx":6,"name":"airlockl-door-metalframe","tpage_name":"sewi-vis-pris"}],[74055687,{"idx":7,"name":"sew-saw-arm","tpage_name":"sewi-vis-pris"}],[67829788,{"idx":28,"name":"vinroom-tv-beam","tpage_name":"freehq-sprite"}],[74055688,{"idx":8,"name":"sew-saw-blade","tpage_name":"sewi-vis-pris"}],[67829789,{"idx":29,"name":"vinroom-tv-linetext-01","tpage_name":"freehq-sprite"}],[74055689,{"idx":9,"name":"sew-saw-body","tpage_name":"sewi-vis-pris"}],[67829790,{"idx":30,"name":"vinroom-tv-linetext-02","tpage_name":"freehq-sprite"}],[74055690,{"idx":10,"name":"sew-saw-fan","tpage_name":"sewi-vis-pris"}],[67829791,{"idx":31,"name":"vinroom-tv-linetext-03","tpage_name":"freehq-sprite"}],[74055691,{"idx":11,"name":"sew-saw-lens","tpage_name":"sewi-vis-pris"}],[67829792,{"idx":32,"name":"vinroom-tv-linetext-04","tpage_name":"freehq-sprite"}],[74055692,{"idx":12,"name":"sew-saw-logo","tpage_name":"sewi-vis-pris"}],[67829793,{"idx":33,"name":"vinroom-tv-linetext-05","tpage_name":"freehq-sprite"}],[74055693,{"idx":13,"name":"sew-saw-part1","tpage_name":"sewi-vis-pris"}],[67829794,{"idx":34,"name":"vinroom-tv-linetext-06","tpage_name":"freehq-sprite"}],[74055694,{"idx":14,"name":"sew-saw-part2","tpage_name":"sewi-vis-pris"}],[67829795,{"idx":35,"name":"vinroom-tv-linetext-07","tpage_name":"freehq-sprite"}],[77791235,{"idx":3,"name":"wstd-scaffold-teeth","tpage_name":"wasstadb-pris"}],[74055695,{"idx":15,"name":"sew-saw-plate","tpage_name":"sewi-vis-pris"}],[67829796,{"idx":36,"name":"vinroom-tv-linetext-08","tpage_name":"freehq-sprite"}],[77791236,{"idx":4,"name":"wstd-tentacle-plate03","tpage_name":"wasstadb-pris"}],[74055696,{"idx":16,"name":"sew-saw-tubes","tpage_name":"sewi-vis-pris"}],[86507521,{"idx":1,"name":"bombot-darkgrey-01","tpage_name":"lbombbot-pris"}],[81526801,{"idx":17,"name":"roboguard-headshield","tpage_name":"ctypesc-pris"}],[74055721,{"idx":41,"name":"sew-gun-panel-03","tpage_name":"sewi-vis-pris"}],[86507523,{"idx":3,"name":"bombot-gearsides","tpage_name":"lbombbot-pris"}],[74055723,{"idx":43,"name":"sewer-nut-01","tpage_name":"sewi-vis-pris"}],[86507524,{"idx":4,"name":"bombot-greybarrelend","tpage_name":"lbombbot-pris"}],[74055724,{"idx":44,"name":"sewer-pipe-small-01","tpage_name":"sewi-vis-pris"}],[71630858,{"idx":10,"name":"king-face-01","tpage_name":"ldampksm-pris2"}],[74121218,{"idx":2,"name":"sewer-water-01-h","tpage_name":"sewh-vis-water"}],[71630859,{"idx":11,"name":"king-finger","tpage_name":"ldampksm-pris2"}],[74121219,{"idx":3,"name":"sewer-waterfall-02-h","tpage_name":"sewh-vis-water"}],[71630860,{"idx":12,"name":"king-greenmetal","tpage_name":"ldampksm-pris2"}],[74121220,{"idx":4,"name":"sewer-water-01-h-dest","tpage_name":"sewh-vis-water"}],[71630861,{"idx":13,"name":"king-greenmetalplain","tpage_name":"ldampksm-pris2"}],[74121221,{"idx":5,"name":"sewer-waterfall-02-h-dest","tpage_name":"sewh-vis-water"}],[71630862,{"idx":14,"name":"king-hair","tpage_name":"ldampksm-pris2"}],[74121222,{"idx":6,"name":"sewer-water-wave-02-h-dest","tpage_name":"sewh-vis-water"}],[71630863,{"idx":15,"name":"king-hand","tpage_name":"ldampksm-pris2"}],[74121223,{"idx":7,"name":"sewer-watefall-froth-01-h","tpage_name":"sewh-vis-water"}],[71630864,{"idx":16,"name":"king-horn","tpage_name":"ldampksm-pris2"}],[74121224,{"idx":8,"name":"sewer-water-wave-02-h","tpage_name":"sewh-vis-water"}],[71630865,{"idx":17,"name":"king-iris","tpage_name":"ldampksm-pris2"}],[74121225,{"idx":9,"name":"sewer-watefall-froth-01-h-dest","tpage_name":"sewh-vis-water"}],[74186756,{"idx":4,"name":"sew-gun-round-cap-01","tpage_name":"sewh-vis-pris"}],[74580038,{"idx":70,"name":"sewer-lip-01-hitweak","tpage_name":"sewm-vis-tfrag"}],[90767378,{"idx":18,"name":"des-palm-root","tpage_name":"deserth-vis-tfrag"}],[74186757,{"idx":5,"name":"sew-laserbeam-tip","tpage_name":"sewh-vis-pris"}],[74186758,{"idx":6,"name":"sewer-plate-03","tpage_name":"sewh-vis-pris"}],[74186759,{"idx":7,"name":"scoutbot-legs","tpage_name":"sewh-vis-pris"}],[49283160,{"idx":88,"name":"blue-gem","tpage_name":"sewd-vis-pris"}],[74186760,{"idx":8,"name":"scoutbot-lens","tpage_name":"sewh-vis-pris"}],[49283161,{"idx":89,"name":"brown-hose","tpage_name":"sewd-vis-pris"}],[74186761,{"idx":9,"name":"scoutbot-plate-body","tpage_name":"sewh-vis-pris"}],[49283162,{"idx":90,"name":"cguard1-backmetal","tpage_name":"sewd-vis-pris"}],[74186762,{"idx":10,"name":"scoutbot-plate-edge","tpage_name":"sewh-vis-pris"}],[67108964,{"idx":100,"name":"vin-door-large-01","tpage_name":"vinroom-vis-pris"}],[74580044,{"idx":76,"name":"sewer-plate-01-hitweak","tpage_name":"sewm-vis-tfrag"}],[90767384,{"idx":24,"name":"des-ruins-wall-01","tpage_name":"deserth-vis-tfrag"}],[49283163,{"idx":91,"name":"cguard1-chestplate","tpage_name":"sewd-vis-pris"}],[74186763,{"idx":11,"name":"scoutbot-plate-logo","tpage_name":"sewh-vis-pris"}],[49283164,{"idx":92,"name":"cguard1-gunmetaldark2","tpage_name":"sewd-vis-pris"}],[74186764,{"idx":12,"name":"scoutbot-shoulder","tpage_name":"sewh-vis-pris"}],[49283166,{"idx":94,"name":"cguard1-lens","tpage_name":"sewd-vis-pris"}],[74186766,{"idx":14,"name":"sew-saw-part1","tpage_name":"sewh-vis-pris"}],[49283167,{"idx":95,"name":"environment-oldmetal","tpage_name":"sewd-vis-pris"}],[74186767,{"idx":15,"name":"sew-saw-part2","tpage_name":"sewh-vis-pris"}],[49283168,{"idx":96,"name":"roboguard-die-stamped-metal-blue","tpage_name":"sewd-vis-pris"}],[74186768,{"idx":16,"name":"sew-saw-tubes","tpage_name":"sewh-vis-pris"}],[49283169,{"idx":97,"name":"roboguard-die-stamped-metal-red","tpage_name":"sewd-vis-pris"}],[74186769,{"idx":17,"name":"sew-gun-panel-02","tpage_name":"sewh-vis-pris"}],[49283170,{"idx":98,"name":"roboguard-headshield","tpage_name":"sewd-vis-pris"}],[74186770,{"idx":18,"name":"sew-gun-rim-03","tpage_name":"sewh-vis-pris"}],[49283171,{"idx":99,"name":"roboguard-shouldershield","tpage_name":"sewd-vis-pris"}],[74186771,{"idx":19,"name":"sew-metal-floor-01","tpage_name":"sewh-vis-pris"}],[49283172,{"idx":100,"name":"squid-bulb-sm","tpage_name":"sewd-vis-pris"}],[74186772,{"idx":20,"name":"sewer-metal-block-04","tpage_name":"sewh-vis-pris"}],[49283173,{"idx":101,"name":"squid-tubes","tpage_name":"sewd-vis-pris"}],[74186773,{"idx":21,"name":"sewer-nut","tpage_name":"sewh-vis-pris"}],[49283175,{"idx":103,"name":"widow-pod-gun-metal","tpage_name":"sewd-vis-pris"}],[74186775,{"idx":23,"name":"sewer-pipe-rim-05b","tpage_name":"sewh-vis-pris"}],[60555308,{"idx":44,"name":"minc-strut-01","tpage_name":"minea-vis-tfrag"}],[35651708,{"idx":124,"name":"king-skirt-b","tpage_name":"introcst-pris2"}],[74252288,{"idx":0,"name":"cguardgame-backplate","tpage_name":"sewg-vis-pris"}],[60555309,{"idx":45,"name":"minc-chain-metal-01","tpage_name":"minea-vis-tfrag"}],[74252289,{"idx":1,"name":"cguardgame-metaledark-02","tpage_name":"sewg-vis-pris"}],[60555310,{"idx":46,"name":"minc-red-paint-02","tpage_name":"minea-vis-tfrag"}],[74252290,{"idx":2,"name":"cguardgame-metallight-01small","tpage_name":"sewg-vis-pris"}],[60555311,{"idx":47,"name":"minc-ox-pipe-01","tpage_name":"minea-vis-tfrag"}],[74252291,{"idx":3,"name":"cguardgame-shoebottom","tpage_name":"sewg-vis-pris"}],[74252293,{"idx":5,"name":"sew-gun-drum-01","tpage_name":"sewg-vis-pris"}],[60555314,{"idx":50,"name":"minc-01","tpage_name":"minea-vis-tfrag"}],[74252294,{"idx":6,"name":"sewer-metal-01","tpage_name":"sewg-vis-pris"}],[60555315,{"idx":51,"name":"minc-pre-10","tpage_name":"minea-vis-tfrag"}],[74252295,{"idx":7,"name":"sewer-metal-block-04","tpage_name":"sewg-vis-pris"}],[60555316,{"idx":52,"name":"minc-pre-04","tpage_name":"minea-vis-tfrag"}],[74252296,{"idx":8,"name":"sewer-metal-floor-02","tpage_name":"sewg-vis-pris"}],[60555318,{"idx":54,"name":"minc-door-metal-03","tpage_name":"minea-vis-tfrag"}],[74252298,{"idx":10,"name":"sewer-pipe-rim-07","tpage_name":"sewg-vis-pris"}],[60555319,{"idx":55,"name":"minc-door-metal-07","tpage_name":"minea-vis-tfrag"}],[74252299,{"idx":11,"name":"sewer-plate-05","tpage_name":"sewg-vis-pris"}],[60555320,{"idx":56,"name":"minc-slab-03","tpage_name":"minea-vis-tfrag"}],[74252300,{"idx":12,"name":"sewer-screw-02","tpage_name":"sewg-vis-pris"}],[60555321,{"idx":57,"name":"minb-stone25","tpage_name":"minea-vis-tfrag"}],[74252301,{"idx":13,"name":"airlock-door-bolt","tpage_name":"sewg-vis-pris"}],[74252302,{"idx":14,"name":"airlock-door-cog","tpage_name":"sewg-vis-pris"}],[74252303,{"idx":15,"name":"airlock-door-cog1","tpage_name":"sewg-vis-pris"}],[74252304,{"idx":16,"name":"airlock-door-main","tpage_name":"sewg-vis-pris"}],[74252305,{"idx":17,"name":"airlock-door-metal2","tpage_name":"sewg-vis-pris"}],[74252306,{"idx":18,"name":"airlockl-door-metalframe","tpage_name":"sewg-vis-pris"}],[86704133,{"idx":5,"name":"king-bolt","tpage_name":"ldamklev-pris2"}],[74252333,{"idx":45,"name":"widow-pod-gun-metal","tpage_name":"sewg-vis-pris"}],[86704134,{"idx":6,"name":"king-chest","tpage_name":"ldamklev-pris2"}],[74252334,{"idx":46,"name":"wire-metal","tpage_name":"sewg-vis-pris"}],[81723443,{"idx":51,"name":"klever-face-01scars","tpage_name":"ljndklev-pris"}],[74252363,{"idx":75,"name":"brown-hose","tpage_name":"sewg-vis-pris"}],[81723444,{"idx":52,"name":"klever-hair","tpage_name":"ljndklev-pris"}],[74252364,{"idx":76,"name":"roboguard-headshield","tpage_name":"sewg-vis-pris"}],[81723445,{"idx":53,"name":"klever-mustache","tpage_name":"ljndklev-pris"}],[74252365,{"idx":77,"name":"roboguard-shouldershield","tpage_name":"sewg-vis-pris"}],[81723446,{"idx":54,"name":"klever-arm","tpage_name":"ljndklev-pris"}],[74252366,{"idx":78,"name":"squid-bulb-sm","tpage_name":"sewg-vis-pris"}],[81723447,{"idx":55,"name":"klever-brownstrap","tpage_name":"ljndklev-pris"}],[74252367,{"idx":79,"name":"squid-tubes","tpage_name":"sewg-vis-pris"}],[49414224,{"idx":80,"name":"roboguard-die-stamped-metal-blue","tpage_name":"sewc-vis-pris"}],[74317824,{"idx":0,"name":"sewer-waterfall-02-j","tpage_name":"sewj-vis-water"}],[49414225,{"idx":81,"name":"blue-gem","tpage_name":"sewc-vis-pris"}],[74317825,{"idx":1,"name":"sewer-waterfall-02-j-dest","tpage_name":"sewj-vis-water"}],[49414226,{"idx":82,"name":"brown-hose","tpage_name":"sewc-vis-pris"}],[74317826,{"idx":2,"name":"sewer-watefall-froth-01-j","tpage_name":"sewj-vis-water"}],[49414227,{"idx":83,"name":"roboguard-die-stamped-metal-red","tpage_name":"sewc-vis-pris"}],[74317827,{"idx":3,"name":"sewer-watefall-froth-01-j-dest","tpage_name":"sewj-vis-water"}],[56950872,{"idx":88,"name":"waspala-palmtree-beard","tpage_name":"waspala-tfrag"}],[79364112,{"idx":16,"name":"daxternose","tpage_name":"wasseem-pris"}],[74383392,{"idx":32,"name":"sewer-pipe-rim-01","tpage_name":"sewj-vis-tfrag"}],[79364113,{"idx":17,"name":"daxterteeth","tpage_name":"wasseem-pris"}],[56950873,{"idx":89,"name":"waspala-branch-01","tpage_name":"waspala-tfrag"}],[74383393,{"idx":33,"name":"sewer-metal-block-02","tpage_name":"sewj-vis-tfrag"}],[79364114,{"idx":18,"name":"daxtertuft","tpage_name":"wasseem-pris"}],[56950874,{"idx":90,"name":"waspala-palmplant-leaf-02","tpage_name":"waspala-tfrag"}],[74383394,{"idx":34,"name":"sewer-metal-block-01","tpage_name":"sewj-vis-tfrag"}],[79364115,{"idx":19,"name":"environment-oldmetal","tpage_name":"wasseem-pris"}],[56950875,{"idx":91,"name":"waspala-throne-back-03","tpage_name":"waspala-tfrag"}],[74383395,{"idx":35,"name":"sewer-brick-block-04","tpage_name":"sewj-vis-tfrag"}],[56950876,{"idx":92,"name":"waspala-throne-back-01","tpage_name":"waspala-tfrag"}],[74383396,{"idx":36,"name":"sewer-brick-roof-01","tpage_name":"sewj-vis-tfrag"}],[56950880,{"idx":96,"name":"waspala-throne-floor","tpage_name":"waspala-tfrag"}],[74383400,{"idx":40,"name":"sewer-block-01","tpage_name":"sewj-vis-tfrag"}],[56950881,{"idx":97,"name":"wascity-outerwall-rock","tpage_name":"waspala-tfrag"}],[74383401,{"idx":41,"name":"sewer-plate-04","tpage_name":"sewj-vis-tfrag"}],[56950885,{"idx":101,"name":"common_sandstone_trim01","tpage_name":"waspala-tfrag"}],[74383405,{"idx":45,"name":"sewer-pipe-rim-07","tpage_name":"sewj-vis-tfrag"}],[56950887,{"idx":103,"name":"common_sandstone_base01","tpage_name":"waspala-tfrag"}],[74383407,{"idx":47,"name":"sewer-pipe-small-02","tpage_name":"sewj-vis-tfrag"}],[74383409,{"idx":49,"name":"sewer-brick-block-10","tpage_name":"sewj-vis-tfrag"}],[74383410,{"idx":50,"name":"sewer-brick-block-11","tpage_name":"sewj-vis-tfrag"}],[74383411,{"idx":51,"name":"sewer-brick-block-02","tpage_name":"sewj-vis-tfrag"}],[74383412,{"idx":52,"name":"sewer-block-02-hitweak","tpage_name":"sewj-vis-tfrag"}],[74383413,{"idx":53,"name":"sewer-brick-roof-03","tpage_name":"sewj-vis-tfrag"}],[91815937,{"idx":1,"name":"airlock-door-cog","tpage_name":"ctyinda-vis-pris"}],[90570757,{"idx":5,"name":"des-wasmetal22","tpage_name":"desertd-vis-tfrag"}],[74383417,{"idx":57,"name":"sewer-round-03","tpage_name":"sewj-vis-tfrag"}],[91815939,{"idx":3,"name":"airlock-door-metal2","tpage_name":"ctyinda-vis-pris"}],[90570759,{"idx":7,"name":"des-wasmetal19","tpage_name":"desertd-vis-tfrag"}],[74383419,{"idx":59,"name":"sewer-plate-03-hitweak","tpage_name":"sewj-vis-tfrag"}],[91815940,{"idx":4,"name":"airlockl-door-metalframe","tpage_name":"ctyinda-vis-pris"}],[90570760,{"idx":8,"name":"des-plate-05","tpage_name":"desertd-vis-tfrag"}],[74383420,{"idx":60,"name":"sewer-big-brace-trim-01","tpage_name":"sewj-vis-tfrag"}],[91815941,{"idx":5,"name":"citwide-crimson-gold","tpage_name":"ctyinda-vis-pris"}],[90570761,{"idx":9,"name":"des-wasmetal02","tpage_name":"desertd-vis-tfrag"}],[74383421,{"idx":61,"name":"sewer-big-brace-trim-02","tpage_name":"sewj-vis-tfrag"}],[92274696,{"idx":8,"name":"vehicle-brace-pipe-01","tpage_name":"desrace2-pris"}],[73596996,{"idx":68,"name":"sewer-metal-block-05","tpage_name":"sewi-vis-tfrag"}],[38731956,{"idx":180,"name":"femcher2_15","tpage_name":"wasstada-sprite"}],[94765056,{"idx":0,"name":"hud-gladiator","tpage_name":"wasstadc-minimap"}],[90570772,{"idx":20,"name":"des-cliff-top-01","tpage_name":"desertd-vis-tfrag"}],[74383432,{"idx":72,"name":"sewer-black","tpage_name":"sewj-vis-tfrag"}],[90570773,{"idx":21,"name":"des-cliff-trans-01","tpage_name":"desertd-vis-tfrag"}],[74383433,{"idx":73,"name":"strip-black","tpage_name":"sewj-vis-tfrag"}],[74383434,{"idx":74,"name":"sewer-metal-floor-01","tpage_name":"sewj-vis-tfrag"}],[74448896,{"idx":0,"name":"sewer-nut","tpage_name":"sewj-vis-shrub"}],[74448897,{"idx":1,"name":"sewer-pipe-small-01","tpage_name":"sewj-vis-shrub"}],[74448901,{"idx":5,"name":"sewer-shrub-pitting-01","tpage_name":"sewj-vis-shrub"}],[92274703,{"idx":15,"name":"vehicle-tread-blur-02","tpage_name":"desrace2-pris"}],[73597003,{"idx":75,"name":"sewer-mantel-02","tpage_name":"sewi-vis-tfrag"}],[38731963,{"idx":187,"name":"male1_01","tpage_name":"wasstada-sprite"}],[91029523,{"idx":19,"name":"gun-cita-bit-03","tpage_name":"gungame-sprite"}],[60882988,{"idx":44,"name":"min-blue-paint-rust02","tpage_name":"mineb-vis-pris"}],[74579968,{"idx":0,"name":"sewer-plate-05","tpage_name":"sewm-vis-tfrag"}],[35127490,{"idx":194,"name":"errocyber-eyelid","tpage_name":"factorya-pris"}],[73728070,{"idx":70,"name":"sewer-flat-pipe-01-hitweak","tpage_name":"sewh-vis-tfrag"}],[91160590,{"idx":14,"name":"daxterhelmetplain","tpage_name":"gungame-vis-pris"}],[60882991,{"idx":47,"name":"min-rust-bars-01","tpage_name":"mineb-vis-pris"}],[74579971,{"idx":3,"name":"sewer-block-02","tpage_name":"sewm-vis-tfrag"}],[73728073,{"idx":73,"name":"sewer-stone-newarch-01","tpage_name":"sewh-vis-tfrag"}],[91160593,{"idx":17,"name":"daxterteeth","tpage_name":"gungame-vis-pris"}],[73728074,{"idx":74,"name":"sewer-brick-block-04-highertweak","tpage_name":"sewh-vis-tfrag"}],[91160594,{"idx":18,"name":"daxtertuft","tpage_name":"gungame-vis-pris"}],[35127495,{"idx":199,"name":"squid-drabgun","tpage_name":"factorya-pris"}],[73728075,{"idx":75,"name":"sewer-scaffold-03-hitweak","tpage_name":"sewh-vis-tfrag"}],[91160595,{"idx":19,"name":"environment-oldmetal","tpage_name":"gungame-vis-pris"}],[60883008,{"idx":64,"name":"mine-decal-metal-01","tpage_name":"mineb-vis-pris"}],[74579988,{"idx":20,"name":"sewer-plate-02","tpage_name":"sewm-vis-tfrag"}],[60883009,{"idx":65,"name":"mine-gray-metal-01","tpage_name":"mineb-vis-pris"}],[79560709,{"idx":5,"name":"des-rock-shrub-01","tpage_name":"wasintro-vis-shrub"}],[74579989,{"idx":21,"name":"sewer-rubber-rim-01","tpage_name":"sewm-vis-tfrag"}],[60883015,{"idx":71,"name":"mine-under-metal-01","tpage_name":"mineb-vis-pris"}],[74579995,{"idx":27,"name":"sewer-metal-trim-01","tpage_name":"sewm-vis-tfrag"}],[88277026,{"idx":34,"name":"cguard-air-train-gold","tpage_name":"introcst-tfrag"}],[74580046,{"idx":78,"name":"sewer-brick-block-04-hitweak","tpage_name":"sewm-vis-tfrag"}],[112328728,{"idx":24,"name":"jakc-gogglemetal","tpage_name":"wascast-pris"}],[104857648,{"idx":48,"name":"jakchires-shoemetal","tpage_name":"oasiscst-pris"}],[91160668,{"idx":92,"name":"jakchires-eyebrow","tpage_name":"gungame-vis-pris"}],[88277027,{"idx":35,"name":"cguard-air-train-hatch-door","tpage_name":"introcst-tfrag"}],[74580047,{"idx":79,"name":"sewer-block-01-hitweak","tpage_name":"sewm-vis-tfrag"}],[112328729,{"idx":25,"name":"jakc-lens","tpage_name":"wascast-pris"}],[104857649,{"idx":49,"name":"jakchires-shoeteop","tpage_name":"oasiscst-pris"}],[91160669,{"idx":93,"name":"jakchires-eyelid","tpage_name":"gungame-vis-pris"}],[88277028,{"idx":36,"name":"cguard-air-train-inside-plain","tpage_name":"introcst-tfrag"}],[99483648,{"idx":0,"name":"for-egg-bottom","tpage_name":"lformach-vis-pris"}],[90767388,{"idx":28,"name":"des-totem-stone-trim","tpage_name":"deserth-vis-tfrag"}],[74580048,{"idx":80,"name":"sewer-panel-01","tpage_name":"sewm-vis-tfrag"}],[104857650,{"idx":50,"name":"jakchires-teeth","tpage_name":"oasiscst-pris"}],[112328730,{"idx":26,"name":"jakc-scarf","tpage_name":"wascast-pris"}],[91160670,{"idx":94,"name":"jakchires-facelft","tpage_name":"gungame-vis-pris"}],[88277029,{"idx":37,"name":"cguard-air-train-backdoor","tpage_name":"introcst-tfrag"}],[99483649,{"idx":1,"name":"for-egg-bulb-01","tpage_name":"lformach-vis-pris"}],[90767389,{"idx":29,"name":"des-totem-stone-eye","tpage_name":"deserth-vis-tfrag"}],[74580049,{"idx":81,"name":"sewer-rim-01","tpage_name":"sewm-vis-tfrag"}],[104857651,{"idx":51,"name":"jakc-skirt","tpage_name":"oasiscst-pris"}],[112328731,{"idx":27,"name":"jakc-scarfhanging","tpage_name":"wascast-pris"}],[91160671,{"idx":95,"name":"jakchires-facert","tpage_name":"gungame-vis-pris"}],[88277030,{"idx":38,"name":"cguard-air-train-belt","tpage_name":"introcst-tfrag"}],[99483650,{"idx":2,"name":"for-egg-bulbtop-01","tpage_name":"lformach-vis-pris"}],[90767390,{"idx":30,"name":"des-temple-stone-01","tpage_name":"deserth-vis-tfrag"}],[74580050,{"idx":82,"name":"sewer-metal-02","tpage_name":"sewm-vis-tfrag"}],[104857652,{"idx":52,"name":"jakc-scarfhanging","tpage_name":"oasiscst-pris"}],[112328732,{"idx":28,"name":"jakc-skirt","tpage_name":"wascast-pris"}],[91160672,{"idx":96,"name":"jakchires-glovetop","tpage_name":"gungame-vis-pris"}],[112328735,{"idx":31,"name":"jakc-wristband-a2","tpage_name":"wascast-pris"}],[104857655,{"idx":55,"name":"intcept-tread01","tpage_name":"oasiscst-pris"}],[91160675,{"idx":99,"name":"jakchires-jacket","tpage_name":"gungame-vis-pris"}],[60948524,{"idx":44,"name":"minc-rocky-ground-01","tpage_name":"minec-vis-tfrag"}],[74645504,{"idx":0,"name":"sewer-nut","tpage_name":"sewm-vis-shrub"}],[60948525,{"idx":45,"name":"minc-rocky-ground-02","tpage_name":"minec-vis-tfrag"}],[74645505,{"idx":1,"name":"sewer-moss-01","tpage_name":"sewm-vis-shrub"}],[60948526,{"idx":46,"name":"minc-blue-paint-rust05","tpage_name":"minec-vis-tfrag"}],[74645506,{"idx":2,"name":"sewer-hang-moss-01","tpage_name":"sewm-vis-shrub"}],[60948527,{"idx":47,"name":"minc-rocky-cliff-02","tpage_name":"minec-vis-tfrag"}],[74645507,{"idx":3,"name":"sewer-shrub-rust-01","tpage_name":"sewm-vis-shrub"}],[60948528,{"idx":48,"name":"minc-slab-01","tpage_name":"minec-vis-tfrag"}],[75890688,{"idx":0,"name":"onin-bamboo-mat","tpage_name":"onintent-tfrag"}],[74645508,{"idx":4,"name":"sewer-pipe-small-01","tpage_name":"sewm-vis-shrub"}],[60948529,{"idx":49,"name":"minc-rocky-cliff-01","tpage_name":"minec-vis-tfrag"}],[75890689,{"idx":1,"name":"onin-basket","tpage_name":"onintent-tfrag"}],[74645509,{"idx":5,"name":"sew-jump-pad-grate","tpage_name":"sewm-vis-shrub"}],[75890690,{"idx":2,"name":"onin-basket-rim","tpage_name":"onintent-tfrag"}],[74645510,{"idx":6,"name":"sewer-metal-01","tpage_name":"sewm-vis-shrub"}],[75890691,{"idx":3,"name":"onin-basket2","tpage_name":"onintent-tfrag"}],[74645511,{"idx":7,"name":"sewer-plate-05","tpage_name":"sewm-vis-shrub"}],[75890692,{"idx":4,"name":"onin-bottle-1","tpage_name":"onintent-tfrag"}],[74645512,{"idx":8,"name":"sewer-pipe-01","tpage_name":"sewm-vis-shrub"}],[60948533,{"idx":53,"name":"minc-safe-plate-02","tpage_name":"minec-vis-tfrag"}],[75890693,{"idx":5,"name":"onin-bottle-2","tpage_name":"onintent-tfrag"}],[74645513,{"idx":9,"name":"sewer-pipe-rim-09","tpage_name":"sewm-vis-shrub"}],[75890694,{"idx":6,"name":"onin-bottle-3","tpage_name":"onintent-tfrag"}],[74645514,{"idx":10,"name":"sewer-pipe-rim-02","tpage_name":"sewm-vis-shrub"}],[60948535,{"idx":55,"name":"min-env-mar-01","tpage_name":"minec-vis-tfrag"}],[75890695,{"idx":7,"name":"onin-bottle-3-label","tpage_name":"onintent-tfrag"}],[74645515,{"idx":11,"name":"sewer-pipe-small-02","tpage_name":"sewm-vis-shrub"}],[67239960,{"idx":24,"name":"vin-panel-05","tpage_name":"vinroom-vis-tfrag"}],[57278520,{"idx":56,"name":"wstlander-01-gunmetal-04","tpage_name":"waswide-vis-pris"}],[48562260,{"idx":84,"name":"jakc-scarfhanging","tpage_name":"sewa-vis-pris"}],[73465860,{"idx":4,"name":"sewer-metal-block-06","tpage_name":"sewk-vis-tfrag"}],[74711040,{"idx":0,"name":"sewer-water-01-m-dest","tpage_name":"sewm-vis-water"}],[73859142,{"idx":70,"name":"sewer-metal-block-04-hitweak","tpage_name":"sewg-vis-tfrag"}],[95027202,{"idx":2,"name":"environment-oldmetal","tpage_name":"lsigjakc-pris2"}],[91291662,{"idx":14,"name":"gun-bridge-brace01","tpage_name":"gungame-vis-tfrag"}],[67239962,{"idx":26,"name":"vin-panel-07","tpage_name":"vinroom-vis-tfrag"}],[57278522,{"idx":58,"name":"wstlander-01-leatherstrap","tpage_name":"waswide-vis-pris"}],[73465862,{"idx":6,"name":"sewer-concrete-edge-02","tpage_name":"sewk-vis-tfrag"}],[74711042,{"idx":2,"name":"sewer-water-highlight-01-m-dest","tpage_name":"sewm-vis-water"}],[73859144,{"idx":72,"name":"sewer-stone-newarch-01","tpage_name":"sewg-vis-tfrag"}],[95027204,{"idx":4,"name":"sig-eye","tpage_name":"lsigjakc-pris2"}],[91291664,{"idx":16,"name":"gun-building-brick-01","tpage_name":"gungame-vis-tfrag"}],[67239969,{"idx":33,"name":"vin-pipe-03","tpage_name":"vinroom-vis-tfrag"}],[57278529,{"idx":65,"name":"wstlander-01-wrap","tpage_name":"waswide-vis-pris"}],[48562269,{"idx":93,"name":"saberfish-nail-01","tpage_name":"sewa-vis-pris"}],[73465869,{"idx":13,"name":"sewer-scaffold-02","tpage_name":"sewk-vis-tfrag"}],[74711049,{"idx":9,"name":"sewer-waterfall-02-m","tpage_name":"sewm-vis-water"}],[73531399,{"idx":7,"name":"sewer-water-wave-01-i-dest","tpage_name":"sewi-vis-water"}],[74776579,{"idx":3,"name":"airlock-door-metal2","tpage_name":"sewm-vis-pris"}],[71434321,{"idx":81,"name":"wstd-fight-plat-floor-03","tpage_name":"wasstadc-tfrag"}],[91357201,{"idx":17,"name":"klever-bolt","tpage_name":"lkleever-pris"}],[74776580,{"idx":4,"name":"airlockl-door-metalframe","tpage_name":"sewm-vis-pris"}],[71434322,{"idx":82,"name":"wstd-scaffold-wall-03","tpage_name":"wasstadc-tfrag"}],[91357202,{"idx":18,"name":"klever-gunmetal-01","tpage_name":"lkleever-pris"}],[74776582,{"idx":6,"name":"sewer-metal-01","tpage_name":"sewm-vis-pris"}],[71434324,{"idx":84,"name":"wstd-fight-plat-lrg-floor-05","tpage_name":"wasstadc-tfrag"}],[91357204,{"idx":20,"name":"klever-gunmetal-03","tpage_name":"lkleever-pris"}],[74776587,{"idx":11,"name":"sewer-plate-05","tpage_name":"sewm-vis-pris"}],[91357209,{"idx":25,"name":"klever-shoe","tpage_name":"lkleever-pris"}],[74776588,{"idx":12,"name":"sew-fan-basetop","tpage_name":"sewm-vis-pris"}],[91357210,{"idx":26,"name":"klever-shoebottom","tpage_name":"lkleever-pris"}],[74776589,{"idx":13,"name":"sew-fan-canopy","tpage_name":"sewm-vis-pris"}],[91357211,{"idx":27,"name":"klever-skirtdark","tpage_name":"lkleever-pris"}],[74776590,{"idx":14,"name":"sew-gun-drum-01","tpage_name":"sewm-vis-pris"}],[74776591,{"idx":15,"name":"sew-gun-rim-04","tpage_name":"sewm-vis-pris"}],[61079612,{"idx":60,"name":"bam-eyelight","tpage_name":"minec-vis-pris"}],[74776592,{"idx":16,"name":"sew-laserturret-pole","tpage_name":"sewm-vis-pris"}],[61079613,{"idx":61,"name":"cguard1-backmetal","tpage_name":"minec-vis-pris"}],[74776593,{"idx":17,"name":"sew-saw-lens","tpage_name":"sewm-vis-pris"}],[61079614,{"idx":62,"name":"cguard1-chestplate","tpage_name":"minec-vis-pris"}],[74776594,{"idx":18,"name":"sew-saw-part2","tpage_name":"sewm-vis-pris"}],[61079615,{"idx":63,"name":"cguard1-gunmetaldark2","tpage_name":"minec-vis-pris"}],[74776595,{"idx":19,"name":"sewer-metal-block-04","tpage_name":"sewm-vis-pris"}],[61079616,{"idx":64,"name":"cguard1-guntube","tpage_name":"minec-vis-pris"}],[74776596,{"idx":20,"name":"sewer-metal-floor-02","tpage_name":"sewm-vis-pris"}],[61079617,{"idx":65,"name":"cguard1-lens","tpage_name":"minec-vis-pris"}],[74776597,{"idx":21,"name":"sewer-pipe-rim-07","tpage_name":"sewm-vis-pris"}],[61079618,{"idx":66,"name":"cguardgame-metaledark-02","tpage_name":"minec-vis-pris"}],[74776598,{"idx":22,"name":"sewer-plate-04","tpage_name":"sewm-vis-pris"}],[61079619,{"idx":67,"name":"cguardgame-metallight-01small","tpage_name":"minec-vis-pris"}],[74776599,{"idx":23,"name":"sewer-screw-02","tpage_name":"sewm-vis-pris"}],[61079620,{"idx":68,"name":"environment-oldmetal","tpage_name":"minec-vis-pris"}],[74776600,{"idx":24,"name":"nfish-eye-01","tpage_name":"sewm-vis-pris"}],[61079621,{"idx":69,"name":"kg-grunt-cable-01","tpage_name":"minec-vis-pris"}],[74776601,{"idx":25,"name":"nfish-hose","tpage_name":"sewm-vis-pris"}],[61079622,{"idx":70,"name":"kg-grunt-rim-01","tpage_name":"minec-vis-pris"}],[74776602,{"idx":26,"name":"nfish-hose-02","tpage_name":"sewm-vis-pris"}],[61079623,{"idx":71,"name":"kg-grunt-rim-02","tpage_name":"minec-vis-pris"}],[74776603,{"idx":27,"name":"nfish-metal-01","tpage_name":"sewm-vis-pris"}],[61079624,{"idx":72,"name":"kg-grunt-rim-03","tpage_name":"minec-vis-pris"}],[74776604,{"idx":28,"name":"nfish-metalspike-01","tpage_name":"sewm-vis-pris"}],[61079625,{"idx":73,"name":"roboguard-headshield","tpage_name":"minec-vis-pris"}],[74776605,{"idx":29,"name":"nfish-skin-01","tpage_name":"sewm-vis-pris"}],[61079626,{"idx":74,"name":"roboguard-shouldershield","tpage_name":"minec-vis-pris"}],[74776606,{"idx":30,"name":"nfish-teeth-01","tpage_name":"sewm-vis-pris"}],[73662468,{"idx":4,"name":"sewer-shrub-rust-01","tpage_name":"sewi-vis-shrub"}],[74907648,{"idx":0,"name":"sewer-metal-block-04","tpage_name":"sewl-vis-tfrag"}],[74907649,{"idx":1,"name":"sewer-scaffold-01","tpage_name":"sewl-vis-tfrag"}],[73662470,{"idx":6,"name":"sew-moving-stepb-grate","tpage_name":"sewi-vis-shrub"}],[74907650,{"idx":2,"name":"sewer-concrete-edge-02","tpage_name":"sewl-vis-tfrag"}],[73662471,{"idx":7,"name":"sew-gasstep-tube","tpage_name":"sewi-vis-shrub"}],[74907651,{"idx":3,"name":"sewer-pipe-rim-05b","tpage_name":"sewl-vis-tfrag"}],[73662472,{"idx":8,"name":"sew-mine-b-body","tpage_name":"sewi-vis-shrub"}],[74907652,{"idx":4,"name":"sewer-nut-01","tpage_name":"sewl-vis-tfrag"}],[73662473,{"idx":9,"name":"sewer-plate-05","tpage_name":"sewi-vis-shrub"}],[74907653,{"idx":5,"name":"sewer-small-light-01","tpage_name":"sewl-vis-tfrag"}],[74907654,{"idx":6,"name":"sewer-pipe-rim-08","tpage_name":"sewl-vis-tfrag"}],[73662475,{"idx":11,"name":"sewer-plate-02","tpage_name":"sewi-vis-shrub"}],[74907655,{"idx":7,"name":"sewer-brick-block-09","tpage_name":"sewl-vis-tfrag"}],[73662476,{"idx":12,"name":"sewer-shrub-pitting-01","tpage_name":"sewi-vis-shrub"}],[74907656,{"idx":8,"name":"sewer-metal-block-07","tpage_name":"sewl-vis-tfrag"}],[74907657,{"idx":9,"name":"sewer-scaffold-02","tpage_name":"sewl-vis-tfrag"}],[74907658,{"idx":10,"name":"sewer-scaffold-03","tpage_name":"sewl-vis-tfrag"}],[121110557,{"idx":29,"name":"hip-tredmetal04","tpage_name":"hiphog-vis-tfrag"}],[118620197,{"idx":37,"name":"klever-armor-01","tpage_name":"ljkcdmkl-pris"}],[106168397,{"idx":77,"name":"cav-metdoor-02","tpage_name":"mined-tfrag"}],[74907659,{"idx":11,"name":"sewer-pipe-rim-07-hitweak","tpage_name":"sewl-vis-tfrag"}],[121110558,{"idx":30,"name":"hip-troofmetal01","tpage_name":"hiphog-vis-tfrag"}],[118620198,{"idx":38,"name":"klever-armor-02","tpage_name":"ljkcdmkl-pris"}],[106168398,{"idx":78,"name":"minc-rust-bars-01","tpage_name":"mined-tfrag"}],[74907660,{"idx":12,"name":"common-black","tpage_name":"sewl-vis-tfrag"}],[121110559,{"idx":31,"name":"hip-tbooth01","tpage_name":"hiphog-vis-tfrag"}],[118620199,{"idx":39,"name":"klever-blackstrap","tpage_name":"ljkcdmkl-pris"}],[106168399,{"idx":79,"name":"minc-green-paint-02","tpage_name":"mined-tfrag"}],[74907661,{"idx":13,"name":"sewer-pipe-02","tpage_name":"sewl-vis-tfrag"}],[121110560,{"idx":32,"name":"hip-temp-02","tpage_name":"hiphog-vis-tfrag"}],[118620200,{"idx":40,"name":"klever-bolt","tpage_name":"ljkcdmkl-pris"}],[106168400,{"idx":80,"name":"sewer-red-light-01","tpage_name":"mined-tfrag"}],[74907662,{"idx":14,"name":"sewer-metal-block-06","tpage_name":"sewl-vis-tfrag"}],[74907665,{"idx":17,"name":"sewer-bolt-side-01","tpage_name":"sewl-vis-tfrag"}],[74907666,{"idx":18,"name":"sewer-bolt-side-02","tpage_name":"sewl-vis-tfrag"}],[74907667,{"idx":19,"name":"sewer-metal-trim-01","tpage_name":"sewl-vis-tfrag"}],[74907669,{"idx":21,"name":"sewer-pipe-rim-06","tpage_name":"sewl-vis-tfrag"}],[74907670,{"idx":22,"name":"sewer-plate-05","tpage_name":"sewl-vis-tfrag"}],[74907671,{"idx":23,"name":"sewer-metal-03","tpage_name":"sewl-vis-tfrag"}],[74907672,{"idx":24,"name":"sewer-lip-01-hitweak","tpage_name":"sewl-vis-tfrag"}],[111869965,{"idx":13,"name":"stadiumb-hud-ord-e","tpage_name":"wasleapr-minimap"}],[111869966,{"idx":14,"name":"stadiumb-hud-ord-er","tpage_name":"wasleapr-minimap"}],[111869967,{"idx":15,"name":"stadiumb-hud-ord-korean","tpage_name":"wasleapr-minimap"}],[97320960,{"idx":0,"name":"hud-arena-token","tpage_name":"wasstadb-minimap"}],[96075780,{"idx":4,"name":"jakc-chestplate-straps","tpage_name":"ljakc-pris"}],[74907720,{"idx":72,"name":"sewer-black","tpage_name":"sewl-vis-tfrag"}],[96075781,{"idx":5,"name":"jakc-gogglemetal","tpage_name":"ljakc-pris"}],[74907721,{"idx":73,"name":"sewer-metal-floor-01","tpage_name":"sewl-vis-tfrag"}],[96075782,{"idx":6,"name":"jakc-lens","tpage_name":"ljakc-pris"}],[74907722,{"idx":74,"name":"strip-black","tpage_name":"sewl-vis-tfrag"}],[96075783,{"idx":7,"name":"jakc-scarf","tpage_name":"ljakc-pris"}],[74907723,{"idx":75,"name":"sewer-metal-block-05","tpage_name":"sewl-vis-tfrag"}],[96075784,{"idx":8,"name":"jakc-waistband2","tpage_name":"ljakc-pris"}],[74907724,{"idx":76,"name":"sewer-brick-block-04-highertweak","tpage_name":"sewl-vis-tfrag"}],[96075785,{"idx":9,"name":"jakc-wraps","tpage_name":"ljakc-pris"}],[74907725,{"idx":77,"name":"sewer-scaffold-03-hitweak","tpage_name":"sewl-vis-tfrag"}],[96075786,{"idx":10,"name":"jakc-wristband-a2","tpage_name":"ljakc-pris"}],[74907726,{"idx":78,"name":"sewer-pipe-rim-05b-hitweak","tpage_name":"sewl-vis-tfrag"}],[96075787,{"idx":11,"name":"jakchires-arm","tpage_name":"ljakc-pris"}],[74907727,{"idx":79,"name":"sewer-plate-01-hitweak","tpage_name":"sewl-vis-tfrag"}],[71237644,{"idx":12,"name":"king-greenmetal","tpage_name":"ldampeck-pris2"}],[35127424,{"idx":128,"name":"jakchires-precarmor-01","tpage_name":"factorya-pris"}],[73728004,{"idx":4,"name":"sewer-plate-05-hitweak","tpage_name":"sewh-vis-tfrag"}],[74973184,{"idx":0,"name":"sewer-nut","tpage_name":"sewl-vis-shrub"}],[126156803,{"idx":3,"name":"sewer-plate-05","tpage_name":"sewo-vis-tfrag"}],[121176083,{"idx":19,"name":"environment-oldmetal","tpage_name":"hiphog-vis-pris"}],[118685723,{"idx":27,"name":"king-skirt-b","tpage_name":"ljkcdmkl-pris2"}],[106233923,{"idx":67,"name":"jakchires-pants","tpage_name":"mined-pris"}],[71237645,{"idx":13,"name":"king-greenmetalplain","tpage_name":"ldampeck-pris2"}],[35127425,{"idx":129,"name":"jakchires-shoebottom","tpage_name":"factorya-pris"}],[73728005,{"idx":5,"name":"sewer-metal-block-01","tpage_name":"sewh-vis-tfrag"}],[74973185,{"idx":1,"name":"sewer-pipe-small-01","tpage_name":"sewl-vis-shrub"}],[126156804,{"idx":4,"name":"sewer-hall-light-01","tpage_name":"sewo-vis-tfrag"}],[121176084,{"idx":20,"name":"jakc-armor","tpage_name":"hiphog-vis-pris"}],[118685724,{"idx":28,"name":"king-teeth","tpage_name":"ljkcdmkl-pris2"}],[106233924,{"idx":68,"name":"jakchires-precarmor-01","tpage_name":"mined-pris"}],[71237646,{"idx":14,"name":"king-hair","tpage_name":"ldampeck-pris2"}],[35127426,{"idx":130,"name":"jakchires-shoemetal","tpage_name":"factorya-pris"}],[73728006,{"idx":6,"name":"sewer-block-01","tpage_name":"sewh-vis-tfrag"}],[74973186,{"idx":2,"name":"sewer-moss-01","tpage_name":"sewl-vis-shrub"}],[126156805,{"idx":5,"name":"sewer-scaffold-01","tpage_name":"sewo-vis-tfrag"}],[121176085,{"idx":21,"name":"jakc-chestplate-straps","tpage_name":"hiphog-vis-pris"}],[118685725,{"idx":29,"name":"king-thinstrap","tpage_name":"ljkcdmkl-pris2"}],[106233925,{"idx":69,"name":"jakchires-shoebottom","tpage_name":"mined-pris"}],[71237647,{"idx":15,"name":"king-hand","tpage_name":"ldampeck-pris2"}],[35127427,{"idx":131,"name":"jakchires-shoeteop","tpage_name":"factorya-pris"}],[73728007,{"idx":7,"name":"sewer-plate-04","tpage_name":"sewh-vis-tfrag"}],[74973187,{"idx":3,"name":"sewer-hang-moss-01","tpage_name":"sewl-vis-shrub"}],[126156806,{"idx":6,"name":"sewer-concrete-edge-02","tpage_name":"sewo-vis-tfrag"}],[121176086,{"idx":22,"name":"jakc-gogglemetal","tpage_name":"hiphog-vis-pris"}],[118685726,{"idx":30,"name":"king-vest","tpage_name":"ljkcdmkl-pris2"}],[106233926,{"idx":70,"name":"jakchires-shoemetal","tpage_name":"mined-pris"}],[126156807,{"idx":7,"name":"sewer-pipe-rim-05b","tpage_name":"sewo-vis-tfrag"}],[121176087,{"idx":23,"name":"jakc-lens","tpage_name":"hiphog-vis-pris"}],[118685727,{"idx":31,"name":"king-vestback","tpage_name":"ljkcdmkl-pris2"}],[106233927,{"idx":71,"name":"jakchires-shoeteop","tpage_name":"mined-pris"}],[126156808,{"idx":8,"name":"sewer-metal-trim-02","tpage_name":"sewo-vis-tfrag"}],[121176088,{"idx":24,"name":"jakc-scarf","tpage_name":"hiphog-vis-pris"}],[118685728,{"idx":32,"name":"king-wrap","tpage_name":"ljkcdmkl-pris2"}],[106233928,{"idx":72,"name":"jakchires-teeth","tpage_name":"mined-pris"}],[73793540,{"idx":4,"name":"sewer-water-still-01-g-dest","tpage_name":"sewg-vis-water"}],[71303180,{"idx":12,"name":"sig-gun-01","tpage_name":"ldamsig-pris2"}],[75038720,{"idx":0,"name":"airlock-door-bolt","tpage_name":"sewl-vis-pris"}],[73793541,{"idx":5,"name":"sewer-water-wave-01-g-dest","tpage_name":"sewg-vis-water"}],[71303181,{"idx":13,"name":"sig-gun-02","tpage_name":"ldamsig-pris2"}],[75038721,{"idx":1,"name":"airlock-door-cog","tpage_name":"sewl-vis-pris"}],[71303182,{"idx":14,"name":"sig-gun-03","tpage_name":"ldamsig-pris2"}],[75038722,{"idx":2,"name":"airlock-door-main","tpage_name":"sewl-vis-pris"}],[71303183,{"idx":15,"name":"sig-gun-04","tpage_name":"ldamsig-pris2"}],[75038723,{"idx":3,"name":"airlock-door-metal2","tpage_name":"sewl-vis-pris"}],[73793544,{"idx":8,"name":"sewer-water-wave-01-g","tpage_name":"sewg-vis-water"}],[71303184,{"idx":16,"name":"sig-gun-05","tpage_name":"ldamsig-pris2"}],[55115844,{"idx":68,"name":"city-slum-wood-plain","tpage_name":"wascityb-vis-tfrag"}],[75038724,{"idx":4,"name":"airlockl-door-metalframe","tpage_name":"sewl-vis-pris"}],[71303185,{"idx":17,"name":"sig-headgear","tpage_name":"ldamsig-pris2"}],[75038725,{"idx":5,"name":"airlock-door-cog1","tpage_name":"sewl-vis-pris"}],[71303186,{"idx":18,"name":"sig-horn","tpage_name":"ldamsig-pris2"}],[55115846,{"idx":70,"name":"environment-oldmetal","tpage_name":"wascityb-vis-tfrag"}],[75038726,{"idx":6,"name":"grunt-eye-01","tpage_name":"sewl-vis-pris"}],[71303187,{"idx":19,"name":"sig-lens","tpage_name":"ldamsig-pris2"}],[55115847,{"idx":71,"name":"wascityskeet-center","tpage_name":"wascityb-vis-tfrag"}],[75038727,{"idx":7,"name":"grunt-gem-01","tpage_name":"sewl-vis-pris"}],[71303189,{"idx":21,"name":"sig-metal-dirty","tpage_name":"ldamsig-pris2"}],[55115849,{"idx":73,"name":"wascityskeet-blade","tpage_name":"wascityb-vis-tfrag"}],[75038729,{"idx":9,"name":"grunt-metal-01","tpage_name":"sewl-vis-pris"}],[71303191,{"idx":23,"name":"sig-shoebottom","tpage_name":"ldamsig-pris2"}],[55115851,{"idx":75,"name":"wascity-satellite-piece-01","tpage_name":"wascityb-vis-tfrag"}],[75038731,{"idx":11,"name":"grunt-skin-02","tpage_name":"sewl-vis-pris"}],[71303192,{"idx":24,"name":"sig-shoetop","tpage_name":"ldamsig-pris2"}],[55115852,{"idx":76,"name":"wascityskeet-clay-silver","tpage_name":"wascityb-vis-tfrag"}],[75038732,{"idx":12,"name":"grunt-skin-03","tpage_name":"sewl-vis-pris"}],[71303193,{"idx":25,"name":"sig-shoulderarmor","tpage_name":"ldamsig-pris2"}],[55115853,{"idx":77,"name":"wascityskeet-clay-gold","tpage_name":"wascityb-vis-tfrag"}],[75038733,{"idx":13,"name":"nwasp-eye-01","tpage_name":"sewl-vis-pris"}],[71303194,{"idx":26,"name":"sig-skirts","tpage_name":"ldamsig-pris2"}],[55115854,{"idx":78,"name":"wascityskeet-center-blue","tpage_name":"wascityb-vis-tfrag"}],[75038734,{"idx":14,"name":"nwasp-gem-01","tpage_name":"sewl-vis-pris"}],[71303195,{"idx":27,"name":"sig-skirts-02","tpage_name":"ldamsig-pris2"}],[55115855,{"idx":79,"name":"wascityskeet-center-green","tpage_name":"wascityb-vis-tfrag"}],[75038735,{"idx":15,"name":"nwasp-hose","tpage_name":"sewl-vis-pris"}],[71303196,{"idx":28,"name":"sig-skirts-03","tpage_name":"ldamsig-pris2"}],[75038736,{"idx":16,"name":"nwasp-metal-01","tpage_name":"sewl-vis-pris"}],[71303197,{"idx":29,"name":"sig-undergarments","tpage_name":"ldamsig-pris2"}],[75038737,{"idx":17,"name":"nwasp-skin-01","tpage_name":"sewl-vis-pris"}],[71303198,{"idx":30,"name":"vin-teeth-01","tpage_name":"ldamsig-pris2"}],[75038738,{"idx":18,"name":"nwasp-skin-02","tpage_name":"sewl-vis-pris"}],[71303199,{"idx":31,"name":"king-arm","tpage_name":"ldamsig-pris2"}],[75038739,{"idx":19,"name":"nwasp-skin-03","tpage_name":"sewl-vis-pris"}],[49414228,{"idx":84,"name":"squid-tubes","tpage_name":"sewc-vis-pris"}],[75563008,{"idx":0,"name":"bam-eyelight","tpage_name":"lsig-pris2"}],[49414229,{"idx":85,"name":"wire-metal","tpage_name":"sewc-vis-pris"}],[75563009,{"idx":1,"name":"charHOLD","tpage_name":"lsig-pris2"}],[49414230,{"idx":86,"name":"squid-drabgun","tpage_name":"sewc-vis-pris"}],[75563010,{"idx":2,"name":"environment-oldmetal","tpage_name":"lsig-pris2"}],[75563011,{"idx":3,"name":"sig-belt","tpage_name":"lsig-pris2"}],[75563012,{"idx":4,"name":"sig-eye","tpage_name":"lsig-pris2"}],[75563013,{"idx":5,"name":"sig-eyelid","tpage_name":"lsig-pris2"}],[75563014,{"idx":6,"name":"sig-faceleft","tpage_name":"lsig-pris2"}],[75563015,{"idx":7,"name":"sig-facert","tpage_name":"lsig-pris2"}],[75563016,{"idx":8,"name":"sig-flask","tpage_name":"lsig-pris2"}],[75563017,{"idx":9,"name":"sig-gem-01","tpage_name":"lsig-pris2"}],[75563018,{"idx":10,"name":"sig-glove","tpage_name":"lsig-pris2"}],[75563019,{"idx":11,"name":"sig-glovetop","tpage_name":"lsig-pris2"}],[75563020,{"idx":12,"name":"sig-gun-01","tpage_name":"lsig-pris2"}],[75563021,{"idx":13,"name":"sig-gun-02","tpage_name":"lsig-pris2"}],[75563022,{"idx":14,"name":"sig-gun-03","tpage_name":"lsig-pris2"}],[75563023,{"idx":15,"name":"sig-gun-04","tpage_name":"lsig-pris2"}],[75563024,{"idx":16,"name":"sig-gun-05","tpage_name":"lsig-pris2"}],[75563025,{"idx":17,"name":"sig-headgear","tpage_name":"lsig-pris2"}],[75563026,{"idx":18,"name":"sig-horn","tpage_name":"lsig-pris2"}],[75563027,{"idx":19,"name":"sig-lens","tpage_name":"lsig-pris2"}],[75563029,{"idx":21,"name":"sig-metal-dirty","tpage_name":"lsig-pris2"}],[75563030,{"idx":22,"name":"sig-sac","tpage_name":"lsig-pris2"}],[60620871,{"idx":71,"name":"minc-rust-pipe-06","tpage_name":"minea-vis-pris"}],[75563031,{"idx":23,"name":"sig-shoebottom","tpage_name":"lsig-pris2"}],[75563032,{"idx":24,"name":"sig-shoetop","tpage_name":"lsig-pris2"}],[75563033,{"idx":25,"name":"sig-shoulderarmor","tpage_name":"lsig-pris2"}],[75563034,{"idx":26,"name":"sig-skirts","tpage_name":"lsig-pris2"}],[75563035,{"idx":27,"name":"sig-skirts-02","tpage_name":"lsig-pris2"}],[94240837,{"idx":69,"name":"palcab-lowres-background-mount-build-01","tpage_name":"intpfall-vis-tfrag"}],[94240838,{"idx":70,"name":"palcab-lowres-background-mount-build-02","tpage_name":"intpfall-vis-tfrag"}],[94240840,{"idx":72,"name":"palcab-swingp-base","tpage_name":"intpfall-vis-tfrag"}],[94240841,{"idx":73,"name":"palcab-lowres-background-trees2","tpage_name":"intpfall-vis-tfrag"}],[94240842,{"idx":74,"name":"palcab-lowres-background-trees-edge","tpage_name":"intpfall-vis-tfrag"}],[94240843,{"idx":75,"name":"citywide-hangmetal","tpage_name":"intpfall-vis-tfrag"}],[94240844,{"idx":76,"name":"tcab-beam01","tpage_name":"intpfall-vis-tfrag"}],[94240845,{"idx":77,"name":"tcab-plat-edg-01","tpage_name":"intpfall-vis-tfrag"}],[94240846,{"idx":78,"name":"city-lowres-damaged-01","tpage_name":"intpfall-vis-tfrag"}],[94240847,{"idx":79,"name":"ctyp-metal-01","tpage_name":"intpfall-vis-tfrag"}],[94240848,{"idx":80,"name":"palace-break-girder01","tpage_name":"intpfall-vis-tfrag"}],[94240849,{"idx":81,"name":"palcab-lowres-stadium-grass","tpage_name":"intpfall-vis-tfrag"}],[94240850,{"idx":82,"name":"palcab-lowres-background-desert-01","tpage_name":"intpfall-vis-tfrag"}],[94240851,{"idx":83,"name":"t-citypal-dmnd-01","tpage_name":"intpfall-vis-tfrag"}],[94240852,{"idx":84,"name":"t-citypal-statue-stone-01","tpage_name":"intpfall-vis-tfrag"}],[94240853,{"idx":85,"name":"t-palshaft-r-strp-plate01","tpage_name":"intpfall-vis-tfrag"}],[94240854,{"idx":86,"name":"palcab-lowres-farm-road","tpage_name":"intpfall-vis-tfrag"}],[94240855,{"idx":87,"name":"palcab-lowres-background-mounatin-window","tpage_name":"intpfall-vis-tfrag"}],[60882992,{"idx":48,"name":"minc-blue-paint-01","tpage_name":"mineb-vis-pris"}],[74579972,{"idx":4,"name":"sewer-block-01","tpage_name":"sewm-vis-tfrag"}],[75825152,{"idx":0,"name":"hummingbird-body","tpage_name":"onintent-sprite"}],[60882993,{"idx":49,"name":"minc-blue-paint-rust03","tpage_name":"mineb-vis-pris"}],[74579973,{"idx":5,"name":"sewer-plate-05-hitweak","tpage_name":"sewm-vis-tfrag"}],[75825153,{"idx":1,"name":"hummingbird-wing","tpage_name":"onintent-sprite"}],[60882994,{"idx":50,"name":"minc-bolt","tpage_name":"mineb-vis-pris"}],[74579974,{"idx":6,"name":"sewer-metal-block-06-hitweak","tpage_name":"sewm-vis-tfrag"}],[75825154,{"idx":2,"name":"hummingbird-wing2","tpage_name":"onintent-sprite"}],[60882995,{"idx":51,"name":"minc-metal-patch-01","tpage_name":"mineb-vis-pris"}],[74579975,{"idx":7,"name":"sewer-plate-01","tpage_name":"sewm-vis-tfrag"}],[75825155,{"idx":3,"name":"onin-game-circle","tpage_name":"onintent-sprite"}],[60882996,{"idx":52,"name":"minc-metal-platfrom-02","tpage_name":"mineb-vis-pris"}],[57147456,{"idx":64,"name":"king-skirt-b","tpage_name":"waspala-pris2"}],[74579976,{"idx":8,"name":"sewer-metal-block-04","tpage_name":"sewm-vis-tfrag"}],[75825156,{"idx":4,"name":"onin-game-circle-darkener","tpage_name":"onintent-sprite"}],[60882997,{"idx":53,"name":"minc-metal-siding-01","tpage_name":"mineb-vis-pris"}],[74579977,{"idx":9,"name":"sewer-pipe-rim-08","tpage_name":"sewm-vis-tfrag"}],[75825157,{"idx":5,"name":"onin-game-scatter","tpage_name":"onintent-sprite"}],[60882998,{"idx":54,"name":"minc-strut-01","tpage_name":"mineb-vis-pris"}],[74579978,{"idx":10,"name":"sewer-metal-block-02","tpage_name":"sewm-vis-tfrag"}],[75825158,{"idx":6,"name":"onin-game-square","tpage_name":"onintent-sprite"}],[60882999,{"idx":55,"name":"rat-eartrans","tpage_name":"mineb-vis-pris"}],[74579979,{"idx":11,"name":"sewer-pipe-rim-05b","tpage_name":"sewm-vis-tfrag"}],[75825159,{"idx":7,"name":"onin-game-square-darkener","tpage_name":"onintent-sprite"}],[108986403,{"idx":35,"name":"monk-finger","tpage_name":"wasleapr-pris"}],[60883000,{"idx":56,"name":"rat-eye","tpage_name":"mineb-vis-pris"}],[74579980,{"idx":12,"name":"sewer-lip-01","tpage_name":"sewm-vis-tfrag"}],[75825160,{"idx":8,"name":"onin-game-triangle","tpage_name":"onintent-sprite"}],[108986404,{"idx":36,"name":"monk-gem","tpage_name":"wasleapr-pris"}],[60883001,{"idx":57,"name":"rat-hair","tpage_name":"mineb-vis-pris"}],[74579981,{"idx":13,"name":"sewer-metal-trim-02","tpage_name":"sewm-vis-tfrag"}],[75825161,{"idx":9,"name":"onin-game-triangle-darkener","tpage_name":"onintent-sprite"}],[108986405,{"idx":37,"name":"monk-goggleleather","tpage_name":"wasleapr-pris"}],[60883002,{"idx":58,"name":"rat-nose","tpage_name":"mineb-vis-pris"}],[74579982,{"idx":14,"name":"common-black","tpage_name":"sewm-vis-tfrag"}],[75825162,{"idx":10,"name":"onin-game-x","tpage_name":"onintent-sprite"}],[108986406,{"idx":38,"name":"monk-goggles","tpage_name":"wasleapr-pris"}],[60883003,{"idx":59,"name":"rat-sidehair","tpage_name":"mineb-vis-pris"}],[74579983,{"idx":15,"name":"sewer-concrete-edge-01","tpage_name":"sewm-vis-tfrag"}],[75825163,{"idx":11,"name":"onin-game-x-darkener","tpage_name":"onintent-sprite"}],[108986407,{"idx":39,"name":"monk-goldjewel","tpage_name":"wasleapr-pris"}],[60883004,{"idx":60,"name":"rat-skin","tpage_name":"mineb-vis-pris"}],[74579984,{"idx":16,"name":"sewer-pipe-small-02","tpage_name":"sewm-vis-tfrag"}],[75825164,{"idx":12,"name":"onin-magic-bigpuff","tpage_name":"onintent-sprite"}],[81592448,{"idx":128,"name":"jakc-skirt","tpage_name":"arenacst-pris"}],[108986408,{"idx":40,"name":"monk-hair-a","tpage_name":"wasleapr-pris"}],[60883005,{"idx":61,"name":"rat-teeth","tpage_name":"mineb-vis-pris"}],[74579985,{"idx":17,"name":"sewer-pipe-rim-03","tpage_name":"sewm-vis-tfrag"}],[79560705,{"idx":1,"name":"des-shrub-pebbles","tpage_name":"wasintro-vis-shrub"}],[75825165,{"idx":13,"name":"onin-spider-01","tpage_name":"onintent-sprite"}],[108986409,{"idx":41,"name":"monk-hair-f","tpage_name":"wasleapr-pris"}],[60883006,{"idx":62,"name":"mine-can-metal-01","tpage_name":"mineb-vis-pris"}],[74579986,{"idx":18,"name":"sewer-metal-block-01","tpage_name":"sewm-vis-tfrag"}],[75825166,{"idx":14,"name":"onin-spider-02","tpage_name":"onintent-sprite"}],[81592450,{"idx":130,"name":"jakc-scarfhanging","tpage_name":"arenacst-pris"}],[108986410,{"idx":42,"name":"monk-hand","tpage_name":"wasleapr-pris"}],[60883007,{"idx":63,"name":"mine-caution-metal-01","tpage_name":"mineb-vis-pris"}],[74579987,{"idx":19,"name":"sewer-metal-block-05","tpage_name":"sewm-vis-tfrag"}],[75825167,{"idx":15,"name":"onin-spider-03","tpage_name":"onintent-sprite"}],[81592451,{"idx":131,"name":"gun-cover","tpage_name":"arenacst-pris"}],[108986411,{"idx":43,"name":"monk-jewelry","tpage_name":"wasleapr-pris"}],[75890698,{"idx":10,"name":"onin-bowl2","tpage_name":"onintent-tfrag"}],[60948539,{"idx":59,"name":"mina-idol-01-noalpha","tpage_name":"minec-vis-tfrag"}],[75890699,{"idx":11,"name":"onin-cage-bottom","tpage_name":"onintent-tfrag"}],[75890700,{"idx":12,"name":"onin-cage-grey","tpage_name":"onintent-tfrag"}],[75890714,{"idx":26,"name":"onin-dresser-drawer-b","tpage_name":"onintent-tfrag"}],[94371841,{"idx":1,"name":"palcab-lowres-background-hills-01","tpage_name":"intpfall-vis-pris"}],[67239964,{"idx":28,"name":"vin-panel-09","tpage_name":"vinroom-vis-tfrag"}],[57278524,{"idx":60,"name":"wstlander-01-pants","tpage_name":"waswide-vis-pris"}],[74711044,{"idx":4,"name":"sewer-water-01-m","tpage_name":"sewm-vis-water"}],[73465864,{"idx":8,"name":"sewer-metal-block-04","tpage_name":"sewk-vis-tfrag"}],[75956224,{"idx":0,"name":"onin-tank-glass","tpage_name":"onintent-water"}],[71237648,{"idx":16,"name":"king-horn","tpage_name":"ldampeck-pris2"}],[35127428,{"idx":132,"name":"jakchires-teeth","tpage_name":"factorya-pris"}],[73728008,{"idx":8,"name":"sewer-brick-block-01","tpage_name":"sewh-vis-tfrag"}],[74973188,{"idx":4,"name":"sewer-shrub-rust-01","tpage_name":"sewl-vis-shrub"}],[76218368,{"idx":0,"name":"bam-eyelight","tpage_name":"onintent-pris2"}],[71237649,{"idx":17,"name":"king-iris","tpage_name":"ldampeck-pris2"}],[35127429,{"idx":133,"name":"lfacrm-hangar-edge-01","tpage_name":"factorya-pris"}],[73728009,{"idx":9,"name":"sewer-brick-block-06","tpage_name":"sewh-vis-tfrag"}],[74973189,{"idx":5,"name":"sewer-shrub-pitting-01","tpage_name":"sewl-vis-shrub"}],[76218369,{"idx":1,"name":"bam-hairhilite","tpage_name":"onintent-pris2"}],[71237650,{"idx":18,"name":"king-leg","tpage_name":"ldampeck-pris2"}],[35127430,{"idx":134,"name":"lfacrm-hangar-panel-01","tpage_name":"factorya-pris"}],[73728010,{"idx":10,"name":"sewer-metal-block-06-hitweak","tpage_name":"sewh-vis-tfrag"}],[76218370,{"idx":2,"name":"samos-arm","tpage_name":"onintent-pris2"}],[71237651,{"idx":19,"name":"king-lgblackstrap","tpage_name":"ldampeck-pris2"}],[35127431,{"idx":135,"name":"lfacrm-hangar-panel-02","tpage_name":"factorya-pris"}],[73728011,{"idx":11,"name":"sewer-block-02","tpage_name":"sewh-vis-tfrag"}],[76218371,{"idx":3,"name":"samos-diaper","tpage_name":"onintent-pris2"}],[71237652,{"idx":20,"name":"king-precursermetal-decor","tpage_name":"ldampeck-pris2"}],[35127432,{"idx":136,"name":"lfacrm-hangar-panel-rim-01","tpage_name":"factorya-pris"}],[73728012,{"idx":12,"name":"sewer-pipe-02","tpage_name":"sewh-vis-tfrag"}],[76218372,{"idx":4,"name":"samos-ear","tpage_name":"onintent-pris2"}],[71237653,{"idx":21,"name":"king-precursermetal-plain","tpage_name":"ldampeck-pris2"}],[35127433,{"idx":137,"name":"lfacrm-hangar-tooth-01","tpage_name":"factorya-pris"}],[73728013,{"idx":13,"name":"sewer-metal-new-01","tpage_name":"sewh-vis-tfrag"}],[76218373,{"idx":5,"name":"samos-eye","tpage_name":"onintent-pris2"}],[71237654,{"idx":22,"name":"king-precursermetal-trim","tpage_name":"ldampeck-pris2"}],[73728014,{"idx":14,"name":"sewer-metal-trim-01","tpage_name":"sewh-vis-tfrag"}],[76218374,{"idx":6,"name":"samos-eyelid","tpage_name":"onintent-pris2"}],[71237655,{"idx":23,"name":"king-precursermetal-trim2","tpage_name":"ldampeck-pris2"}],[73728015,{"idx":15,"name":"sewer-electric-ring","tpage_name":"sewh-vis-tfrag"}],[76218375,{"idx":7,"name":"samos-face","tpage_name":"onintent-pris2"}],[71237656,{"idx":24,"name":"king-precursermetal-trimbolt","tpage_name":"ldampeck-pris2"}],[73728016,{"idx":16,"name":"sewer-pipe-rim-10","tpage_name":"sewh-vis-tfrag"}],[76218376,{"idx":8,"name":"samos-finger-01","tpage_name":"onintent-pris2"}],[71237657,{"idx":25,"name":"king-shoebottom","tpage_name":"ldampeck-pris2"}],[73728017,{"idx":17,"name":"sewer-brick-block-04","tpage_name":"sewh-vis-tfrag"}],[76218377,{"idx":9,"name":"samos-hair","tpage_name":"onintent-pris2"}],[71237658,{"idx":26,"name":"king-skirt","tpage_name":"ldampeck-pris2"}],[73728018,{"idx":18,"name":"sewer-concrete-block-02","tpage_name":"sewh-vis-tfrag"}],[35127438,{"idx":142,"name":"blue-gem","tpage_name":"factorya-pris"}],[76218378,{"idx":10,"name":"samos-helmet","tpage_name":"onintent-pris2"}],[71237659,{"idx":27,"name":"king-teeth","tpage_name":"ldampeck-pris2"}],[73728019,{"idx":19,"name":"sewer-brick-block-02","tpage_name":"sewh-vis-tfrag"}],[35127439,{"idx":143,"name":"brown-hose","tpage_name":"factorya-pris"}],[76218379,{"idx":11,"name":"samos-leaf","tpage_name":"onintent-pris2"}],[71237660,{"idx":28,"name":"king-thinstrap","tpage_name":"ldampeck-pris2"}],[35127440,{"idx":144,"name":"cguard1-backmetal","tpage_name":"factorya-pris"}],[76218380,{"idx":12,"name":"samos-lens","tpage_name":"onintent-pris2"}],[71237661,{"idx":29,"name":"king-vest","tpage_name":"ldampeck-pris2"}],[73728021,{"idx":21,"name":"sewer-block-02-hitweak","tpage_name":"sewh-vis-tfrag"}],[35127441,{"idx":145,"name":"cguard1-chestplate","tpage_name":"factorya-pris"}],[76218381,{"idx":13,"name":"samos-log-01","tpage_name":"onintent-pris2"}],[71237662,{"idx":30,"name":"king-vestback","tpage_name":"ldampeck-pris2"}],[73728022,{"idx":22,"name":"sewer-brick-roof-03","tpage_name":"sewh-vis-tfrag"}],[35127442,{"idx":146,"name":"cguard1-gunmetaldark2","tpage_name":"factorya-pris"}],[76218382,{"idx":14,"name":"samos-log-02","tpage_name":"onintent-pris2"}],[71237663,{"idx":31,"name":"king-wrap","tpage_name":"ldampeck-pris2"}],[73728023,{"idx":23,"name":"sewer-mantel-01","tpage_name":"sewh-vis-tfrag"}],[35127443,{"idx":147,"name":"cguard1-guntube","tpage_name":"factorya-pris"}],[76218383,{"idx":15,"name":"samos-log-03","tpage_name":"onintent-pris2"}],[71237664,{"idx":32,"name":"king-wraps","tpage_name":"ldampeck-pris2"}],[73728024,{"idx":24,"name":"sewer-mantel-02","tpage_name":"sewh-vis-tfrag"}],[35127444,{"idx":148,"name":"cguard1-lens","tpage_name":"factorya-pris"}],[76218384,{"idx":16,"name":"samos-metal","tpage_name":"onintent-pris2"}],[71237665,{"idx":33,"name":"king-wristband","tpage_name":"ldampeck-pris2"}],[73728025,{"idx":25,"name":"sewer-plate-05","tpage_name":"sewh-vis-tfrag"}],[35127445,{"idx":149,"name":"cguardgame-backplate","tpage_name":"factorya-pris"}],[76218385,{"idx":17,"name":"samos-strap","tpage_name":"onintent-pris2"}],[35127446,{"idx":150,"name":"cguardgame-metaledark-02","tpage_name":"factorya-pris"}],[73728026,{"idx":26,"name":"sewer-pipe-rim-06","tpage_name":"sewh-vis-tfrag"}],[76218386,{"idx":18,"name":"samos-teeth2","tpage_name":"onintent-pris2"}],[71237667,{"idx":35,"name":"king-skirt-b","tpage_name":"ldampeck-pris2"}],[35127447,{"idx":151,"name":"cguardgame-metallight-01small","tpage_name":"factorya-pris"}],[73728027,{"idx":27,"name":"sewer-scaffold-01","tpage_name":"sewh-vis-tfrag"}],[76218387,{"idx":19,"name":"samos-vest","tpage_name":"onintent-pris2"}],[35127448,{"idx":152,"name":"cguardgame-shoebottom","tpage_name":"factorya-pris"}],[73728028,{"idx":28,"name":"sewer-plate-01","tpage_name":"sewh-vis-tfrag"}],[76218388,{"idx":20,"name":"samosbird-beak","tpage_name":"onintent-pris2"}],[73728029,{"idx":29,"name":"sewer-scaffold-02","tpage_name":"sewh-vis-tfrag"}],[35127449,{"idx":153,"name":"roboguard-die-stamped-metal-blue","tpage_name":"factorya-pris"}],[76218389,{"idx":21,"name":"samosbird-body","tpage_name":"onintent-pris2"}],[73728030,{"idx":30,"name":"sewer-track-01","tpage_name":"sewh-vis-tfrag"}],[76218390,{"idx":22,"name":"samosbird-eye","tpage_name":"onintent-pris2"}],[73728031,{"idx":31,"name":"sewer-metal-edge-01","tpage_name":"sewh-vis-tfrag"}],[35127451,{"idx":155,"name":"roboguard-headshield","tpage_name":"factorya-pris"}],[76218391,{"idx":23,"name":"samosbird-plume","tpage_name":"onintent-pris2"}],[73728032,{"idx":32,"name":"sewer-pool-rim-02","tpage_name":"sewh-vis-tfrag"}],[35127452,{"idx":156,"name":"roboguard-shouldershield","tpage_name":"factorya-pris"}],[76218392,{"idx":24,"name":"samosbird-wing","tpage_name":"onintent-pris2"}],[73859082,{"idx":10,"name":"sewer-pipe-rim-05b","tpage_name":"sewg-vis-tfrag"}],[76349442,{"idx":2,"name":"samos-arm","tpage_name":"ltornsam-pris2"}],[80085007,{"idx":15,"name":"ashelin-gunholster","tpage_name":"lashelin-pris2"}],[73859107,{"idx":35,"name":"sewer-brick-roof-03","tpage_name":"sewg-vis-tfrag"}],[76349467,{"idx":27,"name":"torn-armor","tpage_name":"ltornsam-pris2"}],[80085009,{"idx":17,"name":"ashelin-handle-01","tpage_name":"lashelin-pris2"}],[73859109,{"idx":37,"name":"sewer-brick-block-02","tpage_name":"sewg-vis-tfrag"}],[76349469,{"idx":29,"name":"torn-belt2","tpage_name":"ltornsam-pris2"}],[80085021,{"idx":29,"name":"bam-eyelight","tpage_name":"lashelin-pris2"}],[73859121,{"idx":49,"name":"sewer-round-01","tpage_name":"sewg-vis-tfrag"}],[76349481,{"idx":41,"name":"torn-hair-02","tpage_name":"ltornsam-pris2"}],[80085022,{"idx":30,"name":"bam-hairhilite","tpage_name":"lashelin-pris2"}],[73859122,{"idx":50,"name":"sewer-round-03","tpage_name":"sewg-vis-tfrag"}],[76349482,{"idx":42,"name":"torn-handle-01","tpage_name":"ltornsam-pris2"}],[80085023,{"idx":31,"name":"environment-oldmetal","tpage_name":"lashelin-pris2"}],[73859123,{"idx":51,"name":"sewer-round-02","tpage_name":"sewg-vis-tfrag"}],[76349483,{"idx":43,"name":"torn-legshield","tpage_name":"ltornsam-pris2"}],[73859125,{"idx":53,"name":"sewer-pipe-rim-01","tpage_name":"sewg-vis-tfrag"}],[76349485,{"idx":45,"name":"torn-mouth","tpage_name":"ltornsam-pris2"}],[73859126,{"idx":54,"name":"sewer-small-light-01","tpage_name":"sewg-vis-tfrag"}],[76349486,{"idx":46,"name":"torn-pipe","tpage_name":"ltornsam-pris2"}],[35389646,{"idx":206,"name":"klever-gunmetal-03","tpage_name":"introcst-pris"}],[76480586,{"idx":74,"name":"jakc-armor","tpage_name":"freehq-pris"}],[35389654,{"idx":214,"name":"klever-skirtlight","tpage_name":"introcst-pris"}],[76480594,{"idx":82,"name":"jakchires-arm","tpage_name":"freehq-pris"}],[35389655,{"idx":215,"name":"klever-thighs","tpage_name":"introcst-pris"}],[76480595,{"idx":83,"name":"jakchires-blackstrap","tpage_name":"freehq-pris"}],[35389656,{"idx":216,"name":"klever-undershirt","tpage_name":"introcst-pris"}],[76480596,{"idx":84,"name":"jakchires-brownstrap","tpage_name":"freehq-pris"}],[35389657,{"idx":217,"name":"klever-widebrownstrap","tpage_name":"introcst-pris"}],[76480597,{"idx":85,"name":"jakchires-brwnleather","tpage_name":"freehq-pris"}],[35389658,{"idx":218,"name":"klever-fingerbottom","tpage_name":"introcst-pris"}],[76480598,{"idx":86,"name":"jakchires-chestplate","tpage_name":"freehq-pris"}],[35389659,{"idx":219,"name":"klever-fingertop","tpage_name":"introcst-pris"}],[76480599,{"idx":87,"name":"jakchires-clips","tpage_name":"freehq-pris"}],[76480600,{"idx":88,"name":"jakchires-eye","tpage_name":"freehq-pris"}],[76480601,{"idx":89,"name":"jakchires-eyebrow","tpage_name":"freehq-pris"}],[76480602,{"idx":90,"name":"jakchires-eyelid","tpage_name":"freehq-pris"}],[76480603,{"idx":91,"name":"jakchires-facelft","tpage_name":"freehq-pris"}],[76480604,{"idx":92,"name":"jakchires-facert","tpage_name":"freehq-pris"}],[76480605,{"idx":93,"name":"jakchires-glovetop","tpage_name":"freehq-pris"}],[76480606,{"idx":94,"name":"jakchires-hair","tpage_name":"freehq-pris"}],[106364931,{"idx":3,"name":"veger-bookleather","tpage_name":"mined-pris2"}],[76480611,{"idx":99,"name":"jakchires-pants","tpage_name":"freehq-pris"}],[106364932,{"idx":4,"name":"veger-booksides","tpage_name":"mined-pris2"}],[76480612,{"idx":100,"name":"jakchires-precarmor-01","tpage_name":"freehq-pris"}],[106364933,{"idx":5,"name":"veger-bookspine","tpage_name":"mined-pris2"}],[76480613,{"idx":101,"name":"jakchires-shoebottom","tpage_name":"freehq-pris"}],[106364935,{"idx":7,"name":"veger-bootfoot","tpage_name":"mined-pris2"}],[90177595,{"idx":59,"name":"des-spiderweb","tpage_name":"desertg-vis-pris"}],[76480615,{"idx":103,"name":"jakchires-shoeteop","tpage_name":"freehq-pris"}],[106364936,{"idx":8,"name":"veger-bootstrap","tpage_name":"mined-pris2"}],[76480616,{"idx":104,"name":"jakchires-teeth","tpage_name":"freehq-pris"}],[106364937,{"idx":9,"name":"veger-coat","tpage_name":"mined-pris2"}],[90177597,{"idx":61,"name":"des-cactus-leaf","tpage_name":"desertg-vis-pris"}],[76480617,{"idx":105,"name":"jakc-skirt","tpage_name":"freehq-pris"}],[106364938,{"idx":10,"name":"veger-coatbelt","tpage_name":"mined-pris2"}],[90177598,{"idx":62,"name":"des-cactus-med-01","tpage_name":"desertg-vis-pris"}],[76480618,{"idx":106,"name":"jakc-scarfhanging","tpage_name":"freehq-pris"}],[74383383,{"idx":23,"name":"sewer-metal-03","tpage_name":"sewj-vis-tfrag"}],[79364103,{"idx":7,"name":"daxterbolt","tpage_name":"wasseem-pris"}],[100925445,{"idx":5,"name":"king-bolt","tpage_name":"ljkdmpk-pris2"}],[92209185,{"idx":33,"name":"klever-widebrownstrap","tpage_name":"ldamklev-pris"}],[95944725,{"idx":21,"name":"torn-metal2","tpage_name":"freehq-pris2"}],[74383388,{"idx":28,"name":"sewer-pipe-rim-09","tpage_name":"sewj-vis-tfrag"}],[79364108,{"idx":12,"name":"daxtergoggles","tpage_name":"wasseem-pris"}],[100925450,{"idx":10,"name":"king-face-01","tpage_name":"ljkdmpk-pris2"}],[95944730,{"idx":26,"name":"torn-shoe-02","tpage_name":"freehq-pris2"}],[90570776,{"idx":24,"name":"des-cliff-top-03","tpage_name":"desertd-vis-tfrag"}],[79364156,{"idx":60,"name":"seem-precmetal-edge","tpage_name":"wasseem-pris"}],[74383442,{"idx":82,"name":"sewer-stone-newarch-01","tpage_name":"sewj-vis-tfrag"}],[79364162,{"idx":66,"name":"dark-crystal-knob-01","tpage_name":"wasseem-pris"}],[74383443,{"idx":83,"name":"sewer-metal-edge-01","tpage_name":"sewj-vis-tfrag"}],[79364163,{"idx":67,"name":"dark-crystal-knob-02","tpage_name":"wasseem-pris"}],[79364164,{"idx":68,"name":"dark-crystal-pickup-01","tpage_name":"wasseem-pris"}],[79364165,{"idx":69,"name":"dark-crystal-pickup-02","tpage_name":"wasseem-pris"}],[79364166,{"idx":70,"name":"dark-crystal-pickup-03","tpage_name":"wasseem-pris"}],[79364167,{"idx":71,"name":"jakc-armor","tpage_name":"wasseem-pris"}],[79364168,{"idx":72,"name":"jakc-chestplate-straps","tpage_name":"wasseem-pris"}],[79364169,{"idx":73,"name":"jakc-gogglemetal","tpage_name":"wasseem-pris"}],[79364170,{"idx":74,"name":"jakc-lens","tpage_name":"wasseem-pris"}],[50725031,{"idx":167,"name":"beamgen-lens","tpage_name":"foresta-vis-pris"}],[79364171,{"idx":75,"name":"jakc-scarf","tpage_name":"wasseem-pris"}],[50725032,{"idx":168,"name":"beamgen-metal-dec-trim-01","tpage_name":"foresta-vis-pris"}],[79364172,{"idx":76,"name":"jakc-scarfhanging","tpage_name":"wasseem-pris"}],[50725033,{"idx":169,"name":"beamgen-metal-edge-01","tpage_name":"foresta-vis-pris"}],[79364173,{"idx":77,"name":"jakc-skirt","tpage_name":"wasseem-pris"}],[50725034,{"idx":170,"name":"beamgen-metal-edge-02","tpage_name":"foresta-vis-pris"}],[79364174,{"idx":78,"name":"jakc-waistband2","tpage_name":"wasseem-pris"}],[50725035,{"idx":171,"name":"holo-cube-face-01","tpage_name":"foresta-vis-pris"}],[79364175,{"idx":79,"name":"jakc-wraps","tpage_name":"wasseem-pris"}],[50725036,{"idx":172,"name":"holo-cube-face-02","tpage_name":"foresta-vis-pris"}],[104267776,{"idx":0,"name":"rub-stad-brick","tpage_name":"stadium-vis-tfrag"}],[79364176,{"idx":80,"name":"jakc-wristband-a2","tpage_name":"wasseem-pris"}],[50725037,{"idx":173,"name":"precprism-lens-03","tpage_name":"foresta-vis-pris"}],[104267777,{"idx":1,"name":"stdm-lg-stone-trim-01","tpage_name":"stadium-vis-tfrag"}],[79364177,{"idx":81,"name":"jakchires-arm","tpage_name":"wasseem-pris"}],[50725038,{"idx":174,"name":"precprism-lens-05","tpage_name":"foresta-vis-pris"}],[104267778,{"idx":2,"name":"rub-statue-stone-01","tpage_name":"stadium-vis-tfrag"}],[79364178,{"idx":82,"name":"jakchires-blackstrap","tpage_name":"wasseem-pris"}],[50725039,{"idx":175,"name":"precprism-lens-06","tpage_name":"foresta-vis-pris"}],[104267779,{"idx":3,"name":"rub-metal-01","tpage_name":"stadium-vis-tfrag"}],[79364179,{"idx":83,"name":"jakchires-brownstrap","tpage_name":"wasseem-pris"}],[50725040,{"idx":176,"name":"quantref-01","tpage_name":"foresta-vis-pris"}],[104267780,{"idx":4,"name":"stdm-light-fix-a","tpage_name":"stadium-vis-tfrag"}],[79364180,{"idx":84,"name":"jakchires-brwnleather","tpage_name":"wasseem-pris"}],[50725041,{"idx":177,"name":"quantref-02","tpage_name":"foresta-vis-pris"}],[104267781,{"idx":5,"name":"stdm-metal-rim-01","tpage_name":"stadium-vis-tfrag"}],[79364181,{"idx":85,"name":"jakchires-chestplate","tpage_name":"wasseem-pris"}],[50725042,{"idx":178,"name":"quantref-03","tpage_name":"foresta-vis-pris"}],[104267782,{"idx":6,"name":"rub-marble-floor-01-hitweak","tpage_name":"stadium-vis-tfrag"}],[79364182,{"idx":86,"name":"jakchires-clips","tpage_name":"wasseem-pris"}],[50725043,{"idx":179,"name":"quantref-04","tpage_name":"foresta-vis-pris"}],[104267783,{"idx":7,"name":"rub-copper-metal-02","tpage_name":"stadium-vis-tfrag"}],[79364183,{"idx":87,"name":"jakchires-eye","tpage_name":"wasseem-pris"}],[81723456,{"idx":64,"name":"klever-gunmetal-02","tpage_name":"ljndklev-pris"}],[101646336,{"idx":0,"name":"wstlander-01-glovetop","tpage_name":"lwlandm-water"}],[104267805,{"idx":29,"name":"stdm-rubble-01","tpage_name":"stadium-vis-tfrag"}],[79364205,{"idx":109,"name":"dk-sat-rim-01","tpage_name":"wasseem-pris"}],[104267808,{"idx":32,"name":"rub-rubble-01","tpage_name":"stadium-vis-tfrag"}],[79364208,{"idx":112,"name":"dk-sat-rim-bright-01","tpage_name":"wasseem-pris"}],[104267809,{"idx":33,"name":"stdm-wallrock-dirt","tpage_name":"stadium-vis-tfrag"}],[114229249,{"idx":1,"name":"ctyslumb-water","tpage_name":"ctyslumb-vis-water"}],[79364209,{"idx":113,"name":"dk-sat-screen-01","tpage_name":"wasseem-pris"}],[114229251,{"idx":3,"name":"ctyslumb-fountain-fall","tpage_name":"ctyslumb-vis-water"}],[104267811,{"idx":35,"name":"rub-metal-pipeside-01","tpage_name":"stadium-vis-tfrag"}],[79364211,{"idx":115,"name":"dk-sat-shell-01","tpage_name":"wasseem-pris"}],[104267812,{"idx":36,"name":"rub-wall-trim","tpage_name":"stadium-vis-tfrag"}],[114229252,{"idx":4,"name":"ctyslumb-fountain-fall-dest","tpage_name":"ctyslumb-vis-water"}],[79364212,{"idx":116,"name":"monk-arm","tpage_name":"wasseem-pris"}],[104267813,{"idx":37,"name":"rub-panels-01","tpage_name":"stadium-vis-tfrag"}],[79364213,{"idx":117,"name":"monk-bootbottom","tpage_name":"wasseem-pris"}],[104267814,{"idx":38,"name":"rub-wall-gen-04","tpage_name":"stadium-vis-tfrag"}],[79364214,{"idx":118,"name":"monk-cheststraps","tpage_name":"wasseem-pris"}],[104267815,{"idx":39,"name":"rub-wall-gen-02","tpage_name":"stadium-vis-tfrag"}],[79364215,{"idx":119,"name":"monk-ear-01","tpage_name":"wasseem-pris"}],[104267819,{"idx":43,"name":"stdm-glass-01","tpage_name":"stadium-vis-tfrag"}],[79364219,{"idx":123,"name":"monk-face-01","tpage_name":"wasseem-pris"}],[104267820,{"idx":44,"name":"city-slum-burning-can","tpage_name":"stadium-vis-tfrag"}],[79364220,{"idx":124,"name":"monk-face-02","tpage_name":"wasseem-pris"}],[104267821,{"idx":45,"name":"rub-wall-gen-06","tpage_name":"stadium-vis-tfrag"}],[79364221,{"idx":125,"name":"monk-face-03","tpage_name":"wasseem-pris"}],[104267824,{"idx":48,"name":"rub-beam-gen-hole","tpage_name":"stadium-vis-tfrag"}],[79364224,{"idx":128,"name":"monk-face-06","tpage_name":"wasseem-pris"}],[104267825,{"idx":49,"name":"rub-palshaft-dirt-blue-01","tpage_name":"stadium-vis-tfrag"}],[79364225,{"idx":129,"name":"monk-femalebelt","tpage_name":"wasseem-pris"}],[104267826,{"idx":50,"name":"rub-metal-flatpipe-01","tpage_name":"stadium-vis-tfrag"}],[79364226,{"idx":130,"name":"monk-femalebootlower","tpage_name":"wasseem-pris"}],[104267827,{"idx":51,"name":"rub-met-strp-close","tpage_name":"stadium-vis-tfrag"}],[79364227,{"idx":131,"name":"monk-femalebootmet","tpage_name":"wasseem-pris"}],[120455168,{"idx":0,"name":"ruins-citywall-frame","tpage_name":"forestx-vis-tfrag"}],[104267828,{"idx":52,"name":"stdm-marble-floor-01","tpage_name":"stadium-vis-tfrag"}],[79364228,{"idx":132,"name":"monk-femalebootoe","tpage_name":"wasseem-pris"}],[79364241,{"idx":145,"name":"monk-lens","tpage_name":"wasseem-pris"}],[79364242,{"idx":146,"name":"monk-malearm","tpage_name":"wasseem-pris"}],[79364243,{"idx":147,"name":"monk-malefoot2","tpage_name":"wasseem-pris"}],[79364245,{"idx":149,"name":"monk-maleshoebottom","tpage_name":"wasseem-pris"}],[79364246,{"idx":150,"name":"monk-maletorso","tpage_name":"wasseem-pris"}],[96075808,{"idx":32,"name":"jakchires-shoeteop","tpage_name":"ljakc-pris"}],[101056528,{"idx":16,"name":"jakchires-clips","tpage_name":"ljakcklv-pris"}],[103546888,{"idx":8,"name":"missle-launcher-shaft-01","tpage_name":"lctyhijk-tfrag"}],[79364247,{"idx":151,"name":"monk-neckcover","tpage_name":"wasseem-pris"}],[96075809,{"idx":33,"name":"jakchires-teeth","tpage_name":"ljakc-pris"}],[101056529,{"idx":17,"name":"jakchires-eye","tpage_name":"ljakcklv-pris"}],[103546889,{"idx":9,"name":"missle-launcher-gear-02","tpage_name":"lctyhijk-tfrag"}],[79364248,{"idx":152,"name":"monk-pipe-01","tpage_name":"wasseem-pris"}],[96075810,{"idx":34,"name":"jakc-skirt","tpage_name":"ljakc-pris"}],[101056530,{"idx":18,"name":"jakchires-eyebrow","tpage_name":"ljakcklv-pris"}],[103546890,{"idx":10,"name":"common-black","tpage_name":"lctyhijk-tfrag"}],[79364252,{"idx":156,"name":"monk-scarob","tpage_name":"wasseem-pris"}],[79364253,{"idx":157,"name":"monk-staffa-wood","tpage_name":"wasseem-pris"}],[79364254,{"idx":158,"name":"monk-strap","tpage_name":"wasseem-pris"}],[129171456,{"idx":0,"name":"sewer-brick-block-01","tpage_name":"sewn-vis-tfrag"}],[79364256,{"idx":160,"name":"monk-uppertorso-01","tpage_name":"wasseem-pris"}],[60948541,{"idx":61,"name":"mina-idol-02-noalpha","tpage_name":"minec-vis-tfrag"}],[75890701,{"idx":13,"name":"onin-cage-plain","tpage_name":"onintent-tfrag"}],[79626241,{"idx":1,"name":"des-waterfall-dest","tpage_name":"wasintro-vis-water"}],[94961683,{"idx":19,"name":"jakchires-eyelid","tpage_name":"lsigjakc-pris"}],[96206863,{"idx":15,"name":"seem-pipes-01","tpage_name":"wasseem-pris2"}],[76349452,{"idx":12,"name":"samos-lens","tpage_name":"ltornsam-pris2"}],[73859092,{"idx":20,"name":"sewer-plate-03","tpage_name":"sewg-vis-tfrag"}],[80084992,{"idx":0,"name":"ashelin-beltbuckle","tpage_name":"lashelin-pris2"}],[76349453,{"idx":13,"name":"samos-log-01","tpage_name":"ltornsam-pris2"}],[73859093,{"idx":21,"name":"sewer-nut-01","tpage_name":"sewg-vis-tfrag"}],[80084993,{"idx":1,"name":"ashelin-bolts","tpage_name":"lashelin-pris2"}],[76349454,{"idx":14,"name":"samos-log-02","tpage_name":"ltornsam-pris2"}],[73859094,{"idx":22,"name":"sewer-pipe-02","tpage_name":"sewg-vis-tfrag"}],[80084994,{"idx":2,"name":"ashelin-boottop","tpage_name":"lashelin-pris2"}],[76349455,{"idx":15,"name":"samos-log-03","tpage_name":"ltornsam-pris2"}],[73859095,{"idx":23,"name":"sewer-pipe-rim-09","tpage_name":"sewg-vis-tfrag"}],[80084995,{"idx":3,"name":"ashelin-brownstrap","tpage_name":"lashelin-pris2"}],[76349456,{"idx":16,"name":"samos-metal","tpage_name":"ltornsam-pris2"}],[73859096,{"idx":24,"name":"sewer-metal-trim-01","tpage_name":"sewg-vis-tfrag"}],[80084996,{"idx":4,"name":"ashelin-cglogo","tpage_name":"lashelin-pris2"}],[76349457,{"idx":17,"name":"samos-strap","tpage_name":"ltornsam-pris2"}],[73859097,{"idx":25,"name":"sewer-plate-01","tpage_name":"sewg-vis-tfrag"}],[80084997,{"idx":5,"name":"ashelin-cgrank","tpage_name":"lashelin-pris2"}],[76349458,{"idx":18,"name":"samos-teeth2","tpage_name":"ltornsam-pris2"}],[73859098,{"idx":26,"name":"sewer-plate-05-hitweak","tpage_name":"sewg-vis-tfrag"}],[80084998,{"idx":6,"name":"ashelin-chest","tpage_name":"lashelin-pris2"}],[76349463,{"idx":23,"name":"samosbird-plume","tpage_name":"ltornsam-pris2"}],[73859103,{"idx":31,"name":"sewer-mantel-02","tpage_name":"sewg-vis-tfrag"}],[80085003,{"idx":11,"name":"ashelin-glove","tpage_name":"lashelin-pris2"}],[76349464,{"idx":24,"name":"samosbird-wing","tpage_name":"ltornsam-pris2"}],[73859104,{"idx":32,"name":"sewer-brick-block-10","tpage_name":"sewg-vis-tfrag"}],[80085004,{"idx":12,"name":"ashelin-gunbarrel-01","tpage_name":"lashelin-pris2"}],[76349465,{"idx":25,"name":"charHOLD","tpage_name":"ltornsam-pris2"}],[73859105,{"idx":33,"name":"sewer-stone-arch-01","tpage_name":"sewg-vis-tfrag"}],[80085005,{"idx":13,"name":"ashelin-gunbarrel-02","tpage_name":"lashelin-pris2"}],[73859106,{"idx":34,"name":"sewer-brick-block-11","tpage_name":"sewg-vis-tfrag"}],[76349466,{"idx":26,"name":"torn-armlft","tpage_name":"ltornsam-pris2"}],[80085006,{"idx":14,"name":"ashelin-gunbarrel-03","tpage_name":"lashelin-pris2"}],[73859110,{"idx":38,"name":"sewer-brick-block-04","tpage_name":"sewg-vis-tfrag"}],[76349470,{"idx":30,"name":"torn-blademetal","tpage_name":"ltornsam-pris2"}],[80085010,{"idx":18,"name":"ashelin-jacketbody","tpage_name":"lashelin-pris2"}],[76349471,{"idx":31,"name":"torn-ear","tpage_name":"ltornsam-pris2"}],[73859111,{"idx":39,"name":"sewer-block-02-hitweak","tpage_name":"sewg-vis-tfrag"}],[80085011,{"idx":19,"name":"ashelin-jacketsleeve","tpage_name":"lashelin-pris2"}],[76349472,{"idx":32,"name":"torn-eye","tpage_name":"ltornsam-pris2"}],[73859112,{"idx":40,"name":"sewer-metal-block-06-hitweak","tpage_name":"sewg-vis-tfrag"}],[80085012,{"idx":20,"name":"ashelin-jacketstraps","tpage_name":"lashelin-pris2"}],[76349473,{"idx":33,"name":"torn-eyelid","tpage_name":"ltornsam-pris2"}],[73859113,{"idx":41,"name":"sewer-pipe-rim-06","tpage_name":"sewg-vis-tfrag"}],[80085013,{"idx":21,"name":"ashelin-pantstop","tpage_name":"lashelin-pris2"}],[76349474,{"idx":34,"name":"torn-face","tpage_name":"ltornsam-pris2"}],[73859114,{"idx":42,"name":"sewer-rubber-rim-01","tpage_name":"sewg-vis-tfrag"}],[80085014,{"idx":22,"name":"ashelin-redtop","tpage_name":"lashelin-pris2"}],[76349475,{"idx":35,"name":"torn-face-right","tpage_name":"ltornsam-pris2"}],[73859115,{"idx":43,"name":"sewer-scaffold-02","tpage_name":"sewg-vis-tfrag"}],[80085015,{"idx":23,"name":"ashelin-shells","tpage_name":"lashelin-pris2"}],[73859116,{"idx":44,"name":"sewer-flat-pipe-01","tpage_name":"sewg-vis-tfrag"}],[76349476,{"idx":36,"name":"torn-finger","tpage_name":"ltornsam-pris2"}],[80085016,{"idx":24,"name":"ashelin-shield","tpage_name":"lashelin-pris2"}],[73859117,{"idx":45,"name":"sewer-bolt-side-01","tpage_name":"sewg-vis-tfrag"}],[76349477,{"idx":37,"name":"torn-footleather","tpage_name":"ltornsam-pris2"}],[80085017,{"idx":25,"name":"ashelin-shoebottom","tpage_name":"lashelin-pris2"}],[73859118,{"idx":46,"name":"sewer-bolt-side-02","tpage_name":"sewg-vis-tfrag"}],[76349478,{"idx":38,"name":"torn-gunbarrel","tpage_name":"ltornsam-pris2"}],[80085018,{"idx":26,"name":"ashelin-shoemetal","tpage_name":"lashelin-pris2"}],[76349479,{"idx":39,"name":"torn-gunbarrel-02","tpage_name":"ltornsam-pris2"}],[73859119,{"idx":47,"name":"sewer-brick-roof-05","tpage_name":"sewg-vis-tfrag"}],[80085019,{"idx":27,"name":"ashelin-teeth","tpage_name":"lashelin-pris2"}],[73859120,{"idx":48,"name":"sewer-pipe-01","tpage_name":"sewg-vis-tfrag"}],[76349480,{"idx":40,"name":"torn-hair-01","tpage_name":"ltornsam-pris2"}],[80085020,{"idx":28,"name":"ashelin-whitestrap","tpage_name":"lashelin-pris2"}],[67829804,{"idx":44,"name":"vinroom-tv-text-r","tpage_name":"freehq-sprite"}],[81526784,{"idx":0,"name":"bam-eyelight","tpage_name":"ctypesc-pris"}],[67829805,{"idx":45,"name":"line-scroll","tpage_name":"freehq-sprite"}],[81526785,{"idx":1,"name":"blue-gem","tpage_name":"ctypesc-pris"}],[67829806,{"idx":46,"name":"holo-curve","tpage_name":"freehq-sprite"}],[81526786,{"idx":2,"name":"brown-hose","tpage_name":"ctypesc-pris"}],[67829807,{"idx":47,"name":"line-scroll2","tpage_name":"freehq-sprite"}],[81526787,{"idx":3,"name":"cguard1-backmetal","tpage_name":"ctypesc-pris"}],[67829808,{"idx":48,"name":"rectangle","tpage_name":"freehq-sprite"}],[81526788,{"idx":4,"name":"cguard1-chestplate","tpage_name":"ctypesc-pris"}],[67829810,{"idx":50,"name":"landscape","tpage_name":"freehq-sprite"}],[81526790,{"idx":6,"name":"cguard1-guntube","tpage_name":"ctypesc-pris"}],[67829812,{"idx":52,"name":"twirl","tpage_name":"freehq-sprite"}],[81526792,{"idx":8,"name":"cguard1-lens","tpage_name":"ctypesc-pris"}],[81526794,{"idx":10,"name":"cguardgame-backplate","tpage_name":"ctypesc-pris"}],[81526796,{"idx":12,"name":"cguardgame-metallight-01small","tpage_name":"ctypesc-pris"}],[81526797,{"idx":13,"name":"cguardgame-shoebottom","tpage_name":"ctypesc-pris"}],[81526798,{"idx":14,"name":"environment-oldmetal","tpage_name":"ctypesc-pris"}],[81526799,{"idx":15,"name":"roboguard-die-stamped-metal-blue","tpage_name":"ctypesc-pris"}],[86507522,{"idx":2,"name":"bombot-darkgrey-02","tpage_name":"lbombbot-pris"}],[74055722,{"idx":42,"name":"sew-jump-pad-grate","tpage_name":"sewi-vis-pris"}],[81526802,{"idx":18,"name":"roboguard-shouldershield","tpage_name":"ctypesc-pris"}],[90243093,{"idx":21,"name":"wascitya-redish-metal","tpage_name":"desertb-vis-tfrag"}],[81526833,{"idx":49,"name":"kg-grunt-rim-03","tpage_name":"ctypesc-pris"}],[71630880,{"idx":32,"name":"king-wraps","tpage_name":"ldampksm-pris2"}],[81592320,{"idx":0,"name":"bam-eyelight","tpage_name":"arenacst-pris"}],[94371932,{"idx":92,"name":"turret01","tpage_name":"intpfall-vis-pris"}],[71630881,{"idx":33,"name":"king-wristband","tpage_name":"ldampksm-pris2"}],[81592321,{"idx":1,"name":"bam-hairhilite","tpage_name":"arenacst-pris"}],[94371933,{"idx":93,"name":"wing01","tpage_name":"intpfall-vis-pris"}],[81592322,{"idx":2,"name":"daxter-eyelid","tpage_name":"arenacst-pris"}],[94371934,{"idx":94,"name":"wing02","tpage_name":"intpfall-vis-pris"}],[71630883,{"idx":35,"name":"seem-arm","tpage_name":"ldampksm-pris2"}],[81592323,{"idx":3,"name":"daxter-furhilite","tpage_name":"arenacst-pris"}],[94371935,{"idx":95,"name":"wing02grey01","tpage_name":"intpfall-vis-pris"}],[71630884,{"idx":36,"name":"seem-bootbottom","tpage_name":"ldampksm-pris2"}],[81592324,{"idx":4,"name":"daxter-orange","tpage_name":"arenacst-pris"}],[94371936,{"idx":96,"name":"yellowcard01","tpage_name":"intpfall-vis-pris"}],[71630885,{"idx":37,"name":"seem-bootleg","tpage_name":"ldampksm-pris2"}],[81592325,{"idx":5,"name":"daxterarm","tpage_name":"arenacst-pris"}],[71630886,{"idx":38,"name":"seem-bootlower","tpage_name":"ldampksm-pris2"}],[81592326,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"arenacst-pris"}],[71630887,{"idx":39,"name":"seem-bootmet","tpage_name":"ldampksm-pris2"}],[81592327,{"idx":7,"name":"daxterbolt","tpage_name":"arenacst-pris"}],[71630888,{"idx":40,"name":"seem-boottoe","tpage_name":"ldampksm-pris2"}],[81592328,{"idx":8,"name":"daxterear","tpage_name":"arenacst-pris"}],[71630889,{"idx":41,"name":"seem-ear","tpage_name":"ldampksm-pris2"}],[81592329,{"idx":9,"name":"daxterfinger","tpage_name":"arenacst-pris"}],[71630890,{"idx":42,"name":"seem-eye","tpage_name":"ldampksm-pris2"}],[81592330,{"idx":10,"name":"daxterfoot","tpage_name":"arenacst-pris"}],[71630891,{"idx":43,"name":"seem-eyelid","tpage_name":"ldampksm-pris2"}],[81592331,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"arenacst-pris"}],[71630892,{"idx":44,"name":"seem-face","tpage_name":"ldampksm-pris2"}],[81592332,{"idx":12,"name":"daxtergoggles","tpage_name":"arenacst-pris"}],[71630893,{"idx":45,"name":"seem-finger","tpage_name":"ldampksm-pris2"}],[81592333,{"idx":13,"name":"daxterheadwidenew","tpage_name":"arenacst-pris"}],[71630894,{"idx":46,"name":"seem-hand","tpage_name":"ldampksm-pris2"}],[81592334,{"idx":14,"name":"daxterhelmetplain","tpage_name":"arenacst-pris"}],[85327875,{"idx":3,"name":"hud-neo-spawner","tpage_name":"foresta-minimap"}],[71630895,{"idx":47,"name":"seem-pipeend","tpage_name":"ldampksm-pris2"}],[81592335,{"idx":15,"name":"daxterlense","tpage_name":"arenacst-pris"}],[86573056,{"idx":0,"name":"was-kangalizard-body","tpage_name":"waschase-pris"}],[85327876,{"idx":4,"name":"hud-dark-eco-plant","tpage_name":"foresta-minimap"}],[71630896,{"idx":48,"name":"seem-pipes-01","tpage_name":"ldampksm-pris2"}],[81592336,{"idx":16,"name":"daxternose","tpage_name":"arenacst-pris"}],[86573057,{"idx":1,"name":"was-kangalizard-body-bottom","tpage_name":"waschase-pris"}],[85327877,{"idx":5,"name":"hud-chase-statues-01","tpage_name":"foresta-minimap"}],[71630897,{"idx":49,"name":"seem-precmetal-chestplate-01","tpage_name":"ldampksm-pris2"}],[81592337,{"idx":17,"name":"daxterteeth","tpage_name":"arenacst-pris"}],[86573058,{"idx":2,"name":"was-kangalizard-face","tpage_name":"waschase-pris"}],[85327878,{"idx":6,"name":"wascity-turret-hud-arrow-01","tpage_name":"foresta-minimap"}],[71630898,{"idx":50,"name":"seem-precmetal-edge","tpage_name":"ldampksm-pris2"}],[81592338,{"idx":18,"name":"daxtertuft","tpage_name":"arenacst-pris"}],[86573059,{"idx":3,"name":"was-kangalizard-fin","tpage_name":"waschase-pris"}],[85327879,{"idx":7,"name":"hud-purple-bar-01","tpage_name":"foresta-minimap"}],[71630899,{"idx":51,"name":"seem-precmetal-plain","tpage_name":"ldampksm-pris2"}],[81592339,{"idx":19,"name":"environment-oldmetal","tpage_name":"arenacst-pris"}],[85327880,{"idx":8,"name":"map-forest","tpage_name":"foresta-minimap"}],[71630900,{"idx":52,"name":"seem-straps","tpage_name":"ldampksm-pris2"}],[81592340,{"idx":20,"name":"jackb-lens","tpage_name":"arenacst-pris"}],[71630901,{"idx":53,"name":"seem-uppertorso","tpage_name":"ldampksm-pris2"}],[81592341,{"idx":21,"name":"jak-belt","tpage_name":"arenacst-pris"}],[71630902,{"idx":54,"name":"seem-headgearback","tpage_name":"ldampksm-pris2"}],[81592342,{"idx":22,"name":"jak-gogglemetal","tpage_name":"arenacst-pris"}],[71630903,{"idx":55,"name":"seem-headpiecetop","tpage_name":"ldampksm-pris2"}],[81592343,{"idx":23,"name":"jak-teeth","tpage_name":"arenacst-pris"}],[71630904,{"idx":56,"name":"seem-pipes-02","tpage_name":"ldampksm-pris2"}],[81592344,{"idx":24,"name":"jakb-armor","tpage_name":"arenacst-pris"}],[71630905,{"idx":57,"name":"seem-teeth","tpage_name":"ldampksm-pris2"}],[81592345,{"idx":25,"name":"jakb-blackstrap","tpage_name":"arenacst-pris"}],[91357212,{"idx":28,"name":"klever-skirtlight","tpage_name":"lkleever-pris"}],[100073472,{"idx":0,"name":"bam-eyelight","tpage_name":"ljak-pris"}],[71630906,{"idx":58,"name":"king-skirt-b","tpage_name":"ldampksm-pris2"}],[81592346,{"idx":26,"name":"jakb-brownleather","tpage_name":"arenacst-pris"}],[91357213,{"idx":29,"name":"klever-thighs","tpage_name":"lkleever-pris"}],[100073473,{"idx":1,"name":"bam-hairhilite","tpage_name":"ljak-pris"}],[71630907,{"idx":59,"name":"seem-skirt","tpage_name":"ldampksm-pris2"}],[81592347,{"idx":27,"name":"jakb-clips","tpage_name":"arenacst-pris"}],[91357214,{"idx":30,"name":"klever-undershirt","tpage_name":"lkleever-pris"}],[100073474,{"idx":2,"name":"environment-oldmetal","tpage_name":"ljak-pris"}],[90308608,{"idx":0,"name":"des-shrub-pebbles","tpage_name":"desertb-vis-shrub"}],[71630908,{"idx":60,"name":"seem-skirt-small","tpage_name":"ldampksm-pris2"}],[81592348,{"idx":28,"name":"jakb-eye","tpage_name":"arenacst-pris"}],[91357215,{"idx":31,"name":"klever-widebrownstrap","tpage_name":"lkleever-pris"}],[100073475,{"idx":3,"name":"jackb-lens","tpage_name":"ljak-pris"}],[81592349,{"idx":29,"name":"jakb-eyebrow","tpage_name":"arenacst-pris"}],[91357216,{"idx":32,"name":"klever-fingerbottom","tpage_name":"lkleever-pris"}],[100073476,{"idx":4,"name":"jak-belt","tpage_name":"ljak-pris"}],[81592350,{"idx":30,"name":"jakb-eyelid","tpage_name":"arenacst-pris"}],[91357217,{"idx":33,"name":"klever-fingertop","tpage_name":"lkleever-pris"}],[100073477,{"idx":5,"name":"jak-gogglemetal","tpage_name":"ljak-pris"}],[90308611,{"idx":3,"name":"wascity-stain-wall-01","tpage_name":"desertb-vis-shrub"}],[81592351,{"idx":31,"name":"jakb-facelft","tpage_name":"arenacst-pris"}],[100073478,{"idx":6,"name":"jak-teeth","tpage_name":"ljak-pris"}],[90308612,{"idx":4,"name":"wascity-stain-window-01","tpage_name":"desertb-vis-shrub"}],[81592352,{"idx":32,"name":"jakb-facert","tpage_name":"arenacst-pris"}],[100073479,{"idx":7,"name":"jakb-armor","tpage_name":"ljak-pris"}],[90308613,{"idx":5,"name":"wascity-blotch-withstreaks-01","tpage_name":"desertb-vis-shrub"}],[81592353,{"idx":33,"name":"jakb-glovetop","tpage_name":"arenacst-pris"}],[100073480,{"idx":8,"name":"jakb-blackstrap","tpage_name":"ljak-pris"}],[90308614,{"idx":6,"name":"wascity-overlay-bullethole-a","tpage_name":"desertb-vis-shrub"}],[81592354,{"idx":34,"name":"jakb-hairtrans","tpage_name":"arenacst-pris"}],[100073481,{"idx":9,"name":"jakb-brownleather","tpage_name":"ljak-pris"}],[100073482,{"idx":10,"name":"jakb-clips","tpage_name":"ljak-pris"}],[100073483,{"idx":11,"name":"jakb-eye","tpage_name":"ljak-pris"}],[81592357,{"idx":37,"name":"jakb-jacketsleeve","tpage_name":"arenacst-pris"}],[100073484,{"idx":12,"name":"jakb-eyebrow","tpage_name":"ljak-pris"}],[100073485,{"idx":13,"name":"jakb-eyelid","tpage_name":"ljak-pris"}],[100073486,{"idx":14,"name":"jakb-facelft","tpage_name":"ljak-pris"}],[100073487,{"idx":15,"name":"jakb-facert","tpage_name":"ljak-pris"}],[105054208,{"idx":0,"name":"bam-hairhilite","tpage_name":"desoasis-pris"}],[100073488,{"idx":16,"name":"jakb-glovetop","tpage_name":"ljak-pris"}],[90308622,{"idx":14,"name":"kgtrns-box01","tpage_name":"desertb-vis-shrub"}],[81592362,{"idx":42,"name":"jakb-pants","tpage_name":"arenacst-pris"}],[105054209,{"idx":1,"name":"environment-oldmetal","tpage_name":"desoasis-pris"}],[100073489,{"idx":17,"name":"jakb-hairtrans","tpage_name":"ljak-pris"}],[90308623,{"idx":15,"name":"kgtrns-topjet01","tpage_name":"desertb-vis-shrub"}],[81592363,{"idx":43,"name":"jakb-scarf","tpage_name":"arenacst-pris"}],[105054210,{"idx":2,"name":"ashelin-lo-beltbuckle","tpage_name":"desoasis-pris"}],[100073490,{"idx":18,"name":"jakb-horn","tpage_name":"ljak-pris"}],[81592364,{"idx":44,"name":"jakb-shoebottom","tpage_name":"arenacst-pris"}],[105054211,{"idx":3,"name":"ashelin-lo-bolts","tpage_name":"desoasis-pris"}],[100073491,{"idx":19,"name":"jakb-jacketbody","tpage_name":"ljak-pris"}],[81592365,{"idx":45,"name":"jakb-shoemetal","tpage_name":"arenacst-pris"}],[105054212,{"idx":4,"name":"ashelin-lo-boottop","tpage_name":"desoasis-pris"}],[106299392,{"idx":0,"name":"prebot-shockwave-end","tpage_name":"mined-water"}],[100073492,{"idx":20,"name":"jakb-jacketsleeve","tpage_name":"ljak-pris"}],[81592366,{"idx":46,"name":"jakb-shoeteop","tpage_name":"arenacst-pris"}],[105054213,{"idx":5,"name":"ashelin-lo-brownstrap","tpage_name":"desoasis-pris"}],[106299393,{"idx":1,"name":"prebot-shockwave","tpage_name":"mined-water"}],[100073493,{"idx":21,"name":"jakb-leatherpouch","tpage_name":"ljak-pris"}],[81592367,{"idx":47,"name":"pecker-body-01","tpage_name":"arenacst-pris"}],[105054214,{"idx":6,"name":"ashelin-lo-cglogo","tpage_name":"desoasis-pris"}],[106299394,{"idx":2,"name":"prebot-redgradient","tpage_name":"mined-water"}],[100073494,{"idx":22,"name":"jakb-leatherstrap","tpage_name":"ljak-pris"}],[81592368,{"idx":48,"name":"pecker-eyelid","tpage_name":"arenacst-pris"}],[105054215,{"idx":7,"name":"ashelin-lo-cgrank","tpage_name":"desoasis-pris"}],[106299395,{"idx":3,"name":"ecocreature-teeth","tpage_name":"mined-water"}],[100073495,{"idx":23,"name":"jakb-lightbrownspat","tpage_name":"ljak-pris"}],[81592369,{"idx":49,"name":"pecker-face","tpage_name":"arenacst-pris"}],[105054216,{"idx":8,"name":"ashelin-lo-chest","tpage_name":"desoasis-pris"}],[106299396,{"idx":4,"name":"sword-trail-low","tpage_name":"mined-water"}],[100073496,{"idx":24,"name":"jakb-lightbrownstrap","tpage_name":"ljak-pris"}],[81592370,{"idx":50,"name":"pecker-plume","tpage_name":"arenacst-pris"}],[81592371,{"idx":51,"name":"pecker-tail","tpage_name":"arenacst-pris"}],[81592372,{"idx":52,"name":"pecker-teeth","tpage_name":"arenacst-pris"}],[81592373,{"idx":53,"name":"pecker-wingbottom","tpage_name":"arenacst-pris"}],[81592374,{"idx":54,"name":"pecker-wingtop","tpage_name":"arenacst-pris"}],[81592375,{"idx":55,"name":"pecker-yellowfur","tpage_name":"arenacst-pris"}],[99024896,{"idx":0,"name":"racegate","tpage_name":"hanga-sprite"}],[81592376,{"idx":56,"name":"gun-barrel-alt","tpage_name":"arenacst-pris"}],[81592377,{"idx":57,"name":"gun-laser","tpage_name":"arenacst-pris"}],[99024898,{"idx":2,"name":"glider-ring-dest","tpage_name":"hanga-sprite"}],[81592378,{"idx":58,"name":"gun-main","tpage_name":"arenacst-pris"}],[99024899,{"idx":3,"name":"glider-ring-dest2","tpage_name":"hanga-sprite"}],[81592379,{"idx":59,"name":"gun-tip","tpage_name":"arenacst-pris"}],[81592380,{"idx":60,"name":"bat-amulet-01","tpage_name":"arenacst-pris"}],[81592381,{"idx":61,"name":"bat-amulet-02","tpage_name":"arenacst-pris"}],[81592382,{"idx":62,"name":"bat-amulet-03","tpage_name":"arenacst-pris"}],[81592383,{"idx":63,"name":"prebot-envmap","tpage_name":"arenacst-pris"}],[81592403,{"idx":83,"name":"jakc-armor","tpage_name":"arenacst-pris"}],[81592404,{"idx":84,"name":"jakc-chestplate-straps","tpage_name":"arenacst-pris"}],[81592405,{"idx":85,"name":"jakc-gogglemetal","tpage_name":"arenacst-pris"}],[81592406,{"idx":86,"name":"jakc-lens","tpage_name":"arenacst-pris"}],[81592407,{"idx":87,"name":"jakc-scarf","tpage_name":"arenacst-pris"}],[108986368,{"idx":0,"name":"environment-oldmetal","tpage_name":"wasleapr-pris"}],[81592408,{"idx":88,"name":"jakc-waistband2","tpage_name":"arenacst-pris"}],[108986369,{"idx":1,"name":"metalflut-eye","tpage_name":"wasleapr-pris"}],[81592409,{"idx":89,"name":"jakc-wraps","tpage_name":"arenacst-pris"}],[108986370,{"idx":2,"name":"metalflut-leatherstrap-b-01","tpage_name":"wasleapr-pris"}],[81592410,{"idx":90,"name":"jakc-wristband-a2","tpage_name":"arenacst-pris"}],[108986371,{"idx":3,"name":"metalflut-leatherstrap-c","tpage_name":"wasleapr-pris"}],[81592411,{"idx":91,"name":"jakchires-arm","tpage_name":"arenacst-pris"}],[108986372,{"idx":4,"name":"metalflut-nail","tpage_name":"wasleapr-pris"}],[81592412,{"idx":92,"name":"jakchires-blackstrap","tpage_name":"arenacst-pris"}],[108986374,{"idx":6,"name":"metalflut-rings","tpage_name":"wasleapr-pris"}],[81592414,{"idx":94,"name":"jakchires-brwnleather","tpage_name":"arenacst-pris"}],[108986375,{"idx":7,"name":"metalflut-roll","tpage_name":"wasleapr-pris"}],[81592415,{"idx":95,"name":"jakchires-chestplate","tpage_name":"arenacst-pris"}],[81592422,{"idx":102,"name":"jakchires-glovetop","tpage_name":"arenacst-pris"}],[49283176,{"idx":104,"name":"wire-metal","tpage_name":"sewd-vis-pris"}],[81657856,{"idx":0,"name":"bam-eyelight","tpage_name":"arenacst-pris2"}],[49283177,{"idx":105,"name":"kg-grunt-cable-01","tpage_name":"sewd-vis-pris"}],[81657857,{"idx":1,"name":"environment-oldmetal","tpage_name":"arenacst-pris2"}],[49283178,{"idx":106,"name":"kg-grunt-rim-03","tpage_name":"sewd-vis-pris"}],[81657858,{"idx":2,"name":"king-arm","tpage_name":"arenacst-pris2"}],[49283179,{"idx":107,"name":"squid-drabgun","tpage_name":"sewd-vis-pris"}],[81657859,{"idx":3,"name":"king-blackskirt2","tpage_name":"arenacst-pris2"}],[81657860,{"idx":4,"name":"king-bluemetal","tpage_name":"arenacst-pris2"}],[74186781,{"idx":29,"name":"sew-gun-panel-06","tpage_name":"sewh-vis-pris"}],[81657861,{"idx":5,"name":"king-bolt","tpage_name":"arenacst-pris2"}],[74186782,{"idx":30,"name":"sew-laserturret-1","tpage_name":"sewh-vis-pris"}],[81657862,{"idx":6,"name":"king-chest","tpage_name":"arenacst-pris2"}],[74186783,{"idx":31,"name":"sew-laserturret-2","tpage_name":"sewh-vis-pris"}],[81657863,{"idx":7,"name":"king-clip-02","tpage_name":"arenacst-pris2"}],[74186784,{"idx":32,"name":"sew-laserturret-center","tpage_name":"sewh-vis-pris"}],[81657864,{"idx":8,"name":"king-ear","tpage_name":"arenacst-pris2"}],[74186785,{"idx":33,"name":"sew-laserturret-top","tpage_name":"sewh-vis-pris"}],[81657865,{"idx":9,"name":"king-earing","tpage_name":"arenacst-pris2"}],[74186786,{"idx":34,"name":"sewer-plate-04","tpage_name":"sewh-vis-pris"}],[81657866,{"idx":10,"name":"king-face-01","tpage_name":"arenacst-pris2"}],[81657867,{"idx":11,"name":"king-finger","tpage_name":"arenacst-pris2"}],[74186788,{"idx":36,"name":"cguard1-backmetal","tpage_name":"sewh-vis-pris"}],[81657868,{"idx":12,"name":"king-greenmetal","tpage_name":"arenacst-pris2"}],[74186789,{"idx":37,"name":"cguard1-guntube","tpage_name":"sewh-vis-pris"}],[81657869,{"idx":13,"name":"king-greenmetalplain","tpage_name":"arenacst-pris2"}],[74186790,{"idx":38,"name":"environment-oldmetal","tpage_name":"sewh-vis-pris"}],[81657870,{"idx":14,"name":"king-hair","tpage_name":"arenacst-pris2"}],[74186791,{"idx":39,"name":"kg-grunt-cable-01","tpage_name":"sewh-vis-pris"}],[81657871,{"idx":15,"name":"king-hand","tpage_name":"arenacst-pris2"}],[74186812,{"idx":60,"name":"spydroid-gold","tpage_name":"sewh-vis-pris"}],[81657892,{"idx":36,"name":"sig-eye","tpage_name":"arenacst-pris2"}],[81657904,{"idx":48,"name":"sig-gun-05","tpage_name":"arenacst-pris2"}],[81657906,{"idx":50,"name":"sig-horn","tpage_name":"arenacst-pris2"}],[81657919,{"idx":63,"name":"seem-arm","tpage_name":"arenacst-pris2"}],[89587759,{"idx":47,"name":"jakc-wraps","tpage_name":"lwstdpck-pris"}],[102039559,{"idx":7,"name":"tess-emblem","tpage_name":"gungame-vis-pris2"}],[89587760,{"idx":48,"name":"jakc-wristband-a2","tpage_name":"lwstdpck-pris"}],[102039560,{"idx":8,"name":"tess-eye","tpage_name":"gungame-vis-pris2"}],[89587765,{"idx":53,"name":"jakchires-chestplate","tpage_name":"lwstdpck-pris"}],[102039565,{"idx":13,"name":"tess-hair","tpage_name":"gungame-vis-pris2"}],[89587766,{"idx":54,"name":"jakchires-clips","tpage_name":"lwstdpck-pris"}],[102039566,{"idx":14,"name":"tess-hairband","tpage_name":"gungame-vis-pris2"}],[89587767,{"idx":55,"name":"jakchires-eye","tpage_name":"lwstdpck-pris"}],[102039567,{"idx":15,"name":"tess-jeans","tpage_name":"gungame-vis-pris2"}],[89587769,{"idx":57,"name":"jakchires-eyelid","tpage_name":"lwstdpck-pris"}],[102039569,{"idx":17,"name":"tess-jeanscuff","tpage_name":"gungame-vis-pris2"}],[89587770,{"idx":58,"name":"jakchires-facelft","tpage_name":"lwstdpck-pris"}],[102039570,{"idx":18,"name":"tess-lowerboot","tpage_name":"gungame-vis-pris2"}],[89587776,{"idx":64,"name":"jakchires-leatherpouch","tpage_name":"lwstdpck-pris"}],[102039576,{"idx":24,"name":"tess-sleeve","tpage_name":"gungame-vis-pris2"}],[81723392,{"idx":0,"name":"bam-eyelight","tpage_name":"ljndklev-pris"}],[81723393,{"idx":1,"name":"bam-hairhilite","tpage_name":"ljndklev-pris"}],[81723394,{"idx":2,"name":"daxter-eyelid","tpage_name":"ljndklev-pris"}],[81723395,{"idx":3,"name":"daxter-furhilite","tpage_name":"ljndklev-pris"}],[81723396,{"idx":4,"name":"daxter-orange","tpage_name":"ljndklev-pris"}],[81723397,{"idx":5,"name":"daxterarm","tpage_name":"ljndklev-pris"}],[81723398,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"ljndklev-pris"}],[81723399,{"idx":7,"name":"daxterbolt","tpage_name":"ljndklev-pris"}],[81723400,{"idx":8,"name":"daxterear","tpage_name":"ljndklev-pris"}],[81723401,{"idx":9,"name":"daxterfinger","tpage_name":"ljndklev-pris"}],[81723402,{"idx":10,"name":"daxterfoot","tpage_name":"ljndklev-pris"}],[74252323,{"idx":35,"name":"cguard1-backmetal","tpage_name":"sewg-vis-pris"}],[81723403,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"ljndklev-pris"}],[74252324,{"idx":36,"name":"cguard1-chestplate","tpage_name":"sewg-vis-pris"}],[81723404,{"idx":12,"name":"daxtergoggles","tpage_name":"ljndklev-pris"}],[74252325,{"idx":37,"name":"cguard1-gunmetaldark2","tpage_name":"sewg-vis-pris"}],[81723405,{"idx":13,"name":"daxterheadwidenew","tpage_name":"ljndklev-pris"}],[74252326,{"idx":38,"name":"cguard1-guntube","tpage_name":"sewg-vis-pris"}],[81723406,{"idx":14,"name":"daxterhelmetplain","tpage_name":"ljndklev-pris"}],[81723407,{"idx":15,"name":"daxterlense","tpage_name":"ljndklev-pris"}],[75563028,{"idx":20,"name":"sig-metal-01","tpage_name":"lsig-pris2"}],[81788928,{"idx":0,"name":"sig-flatfangs","tpage_name":"arenacst-water"}],[74514458,{"idx":26,"name":"squid-tubes","tpage_name":"sewj-vis-pris"}],[81985538,{"idx":2,"name":"wstlander-01-gunmetal-02","tpage_name":"wasstadc-pris"}],[81985563,{"idx":27,"name":"marauder-leather-strap","tpage_name":"wasstadc-pris"}],[75759672,{"idx":56,"name":"onin-finger","tpage_name":"onintent-pris"}],[81985572,{"idx":36,"name":"marauder-sword-metal","tpage_name":"wasstadc-pris"}],[75759674,{"idx":58,"name":"onin-hand","tpage_name":"onintent-pris"}],[81985574,{"idx":38,"name":"wstlander-02-armor","tpage_name":"wasstadc-pris"}],[75759683,{"idx":67,"name":"onin-shirt","tpage_name":"onintent-pris"}],[81985583,{"idx":47,"name":"wstlander-02-skirt","tpage_name":"wasstadc-pris"}],[74579992,{"idx":24,"name":"sewer-pipe-02","tpage_name":"sewm-vis-tfrag"}],[60883012,{"idx":68,"name":"mine-red-metal-01","tpage_name":"mineb-vis-pris"}],[82051072,{"idx":0,"name":"wstlander-01-glovetop","tpage_name":"wasstadc-water"}],[60948548,{"idx":68,"name":"fora-stone-05","tpage_name":"minec-vis-tfrag"}],[75890708,{"idx":20,"name":"onin-crate-body","tpage_name":"onintent-tfrag"}],[82116608,{"idx":0,"name":"map-desert","tpage_name":"desert-minimap"}],[57278545,{"idx":81,"name":"wstlander-04-headband","tpage_name":"waswide-vis-pris"}],[48562285,{"idx":109,"name":"cguard1-guntube","tpage_name":"sewa-vis-pris"}],[73465885,{"idx":29,"name":"sewer-pipe-rim-01","tpage_name":"sewk-vis-tfrag"}],[82182145,{"idx":1,"name":"map-wascity","tpage_name":"waswide-minimap"}],[74580004,{"idx":36,"name":"sewer-brick-roof-01","tpage_name":"sewm-vis-tfrag"}],[85786624,{"idx":0,"name":"wstd-arena-token","tpage_name":"wasstadb-water"}],[85196804,{"idx":4,"name":"intcept-base-green01","tpage_name":"desrace1-pris"}],[86441984,{"idx":0,"name":"map-factoryb","tpage_name":"factoryb-minimap"}],[85196805,{"idx":5,"name":"intcept-base-patern01","tpage_name":"desrace1-pris"}],[86441985,{"idx":1,"name":"hud-fac-target-01","tpage_name":"factoryb-minimap"}],[85196806,{"idx":6,"name":"intcept-base-patern02","tpage_name":"desrace1-pris"}],[86441986,{"idx":2,"name":"hud-fac-tower-01","tpage_name":"factoryb-minimap"}],[85196807,{"idx":7,"name":"intcept-gun01","tpage_name":"desrace1-pris"}],[86441987,{"idx":3,"name":"hud-torpedo","tpage_name":"factoryb-minimap"}],[85196808,{"idx":8,"name":"intcept-pipe01","tpage_name":"desrace1-pris"}],[86441988,{"idx":4,"name":"hud-vehicle-health-bar-01","tpage_name":"factoryb-minimap"}],[74055725,{"idx":45,"name":"sewfence-01","tpage_name":"sewi-vis-pris"}],[81526805,{"idx":21,"name":"widow-dull-inards","tpage_name":"ctypesc-pris"}],[86507525,{"idx":5,"name":"bombot-greybarrelside","tpage_name":"lbombbot-pris"}],[74055726,{"idx":46,"name":"sewfence-02","tpage_name":"sewi-vis-pris"}],[81526806,{"idx":22,"name":"widow-pod-gun-metal","tpage_name":"ctypesc-pris"}],[86507526,{"idx":6,"name":"bombot-guards","tpage_name":"lbombbot-pris"}],[74055727,{"idx":47,"name":"sewer-metal-floor-01","tpage_name":"sewi-vis-pris"}],[81526807,{"idx":23,"name":"wire-metal","tpage_name":"ctypesc-pris"}],[86507527,{"idx":7,"name":"bombot-guntop","tpage_name":"lbombbot-pris"}],[74055729,{"idx":49,"name":"sewer-screw-02","tpage_name":"sewi-vis-pris"}],[81526809,{"idx":25,"name":"spydroid-leg-grey","tpage_name":"ctypesc-pris"}],[86507529,{"idx":9,"name":"bombot-joint","tpage_name":"lbombbot-pris"}],[81526810,{"idx":26,"name":"spydroid-leg-grey-end","tpage_name":"ctypesc-pris"}],[86507530,{"idx":10,"name":"bombot-lens","tpage_name":"lbombbot-pris"}],[81526811,{"idx":27,"name":"spydroid-light","tpage_name":"ctypesc-pris"}],[86507531,{"idx":11,"name":"bombot-post01","tpage_name":"lbombbot-pris"}],[81526812,{"idx":28,"name":"spydroid-light-small","tpage_name":"ctypesc-pris"}],[86507532,{"idx":12,"name":"bombot-rail01","tpage_name":"lbombbot-pris"}],[81526813,{"idx":29,"name":"spydroid-light-small-red","tpage_name":"ctypesc-pris"}],[86507533,{"idx":13,"name":"bombot-redplate-01","tpage_name":"lbombbot-pris"}],[81526814,{"idx":30,"name":"spydroid-red","tpage_name":"ctypesc-pris"}],[86507534,{"idx":14,"name":"bombot-rimgrey","tpage_name":"lbombbot-pris"}],[86507535,{"idx":15,"name":"bombot-roundend","tpage_name":"lbombbot-pris"}],[86507536,{"idx":16,"name":"bombot-turret01","tpage_name":"lbombbot-pris"}],[86507539,{"idx":19,"name":"environment-oldmetal","tpage_name":"lbombbot-pris"}],[86507540,{"idx":20,"name":"cguard1-backmetal","tpage_name":"lbombbot-pris"}],[81526826,{"idx":42,"name":"kg-fl-tret-red-plate","tpage_name":"ctypesc-pris"}],[90243086,{"idx":14,"name":"wascity-metal-spike-01","tpage_name":"desertb-vis-tfrag"}],[86507546,{"idx":26,"name":"citwide-crimson-light","tpage_name":"lbombbot-pris"}],[90243087,{"idx":15,"name":"wascity-outerwall-metal-d","tpage_name":"desertb-vis-tfrag"}],[81526827,{"idx":43,"name":"kg-fl-tret-backthing01","tpage_name":"ctypesc-pris"}],[86507547,{"idx":27,"name":"citwide-crimson-red","tpage_name":"lbombbot-pris"}],[90243088,{"idx":16,"name":"wascity-base","tpage_name":"desertb-vis-tfrag"}],[81526828,{"idx":44,"name":"kg-fl-tret-dash01","tpage_name":"ctypesc-pris"}],[86507548,{"idx":28,"name":"citwide-crimson-tube","tpage_name":"lbombbot-pris"}],[90243089,{"idx":17,"name":"wascitya-airlock-metal","tpage_name":"desertb-vis-tfrag"}],[81526829,{"idx":45,"name":"kg-fl-tret-hood01","tpage_name":"ctypesc-pris"}],[86507549,{"idx":29,"name":"citwide-crimson-wall-plain","tpage_name":"lbombbot-pris"}],[81526830,{"idx":46,"name":"kg-fl-tret-jets01","tpage_name":"ctypesc-pris"}],[90243090,{"idx":18,"name":"common-black","tpage_name":"desertb-vis-tfrag"}],[86507550,{"idx":30,"name":"widow-bomb","tpage_name":"lbombbot-pris"}],[81526832,{"idx":48,"name":"kg-grunt-cable-01","tpage_name":"ctypesc-pris"}],[90243092,{"idx":20,"name":"wascity-metal-indent","tpage_name":"desertb-vis-tfrag"}],[86507552,{"idx":32,"name":"widow-bomb-thrust","tpage_name":"lbombbot-pris"}],[74186792,{"idx":40,"name":"kg-grunt-rim-03","tpage_name":"sewh-vis-pris"}],[81657872,{"idx":16,"name":"king-horn","tpage_name":"arenacst-pris2"}],[86638592,{"idx":0,"name":"bam-eyelight","tpage_name":"wasdoors-vis-pris"}],[74186793,{"idx":41,"name":"roboguard-headshield","tpage_name":"sewh-vis-pris"}],[81657873,{"idx":17,"name":"king-iris","tpage_name":"arenacst-pris2"}],[86638593,{"idx":1,"name":"bam-hairhilite","tpage_name":"wasdoors-vis-pris"}],[74186794,{"idx":42,"name":"widow-dull-inards","tpage_name":"sewh-vis-pris"}],[81657874,{"idx":18,"name":"king-leg","tpage_name":"arenacst-pris2"}],[86638594,{"idx":2,"name":"daxter-eyelid","tpage_name":"wasdoors-vis-pris"}],[81657875,{"idx":19,"name":"king-lgblackstrap","tpage_name":"arenacst-pris2"}],[86638595,{"idx":3,"name":"daxter-furhilite","tpage_name":"wasdoors-vis-pris"}],[74186796,{"idx":44,"name":"blue-gem","tpage_name":"sewh-vis-pris"}],[81657876,{"idx":20,"name":"king-precursermetal-decor","tpage_name":"arenacst-pris2"}],[86638596,{"idx":4,"name":"daxter-orange","tpage_name":"wasdoors-vis-pris"}],[129302528,{"idx":0,"name":"airlock-door-bolt","tpage_name":"sewn-vis-pris"}],[99418208,{"idx":96,"name":"monk-mummy-arm","tpage_name":"volcanox-pris"}],[74186797,{"idx":45,"name":"brown-hose","tpage_name":"sewh-vis-pris"}],[81657877,{"idx":21,"name":"king-precursermetal-plain","tpage_name":"arenacst-pris2"}],[86638597,{"idx":5,"name":"daxterarm","tpage_name":"wasdoors-vis-pris"}],[129302529,{"idx":1,"name":"airlock-door-cog","tpage_name":"sewn-vis-pris"}],[99418209,{"idx":97,"name":"monk-mummy-boot","tpage_name":"volcanox-pris"}],[74186798,{"idx":46,"name":"cguard1-chestplate","tpage_name":"sewh-vis-pris"}],[81657878,{"idx":22,"name":"king-precursermetal-trim","tpage_name":"arenacst-pris2"}],[86638598,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"wasdoors-vis-pris"}],[129302530,{"idx":2,"name":"airlock-door-cog1","tpage_name":"sewn-vis-pris"}],[99418210,{"idx":98,"name":"monk-mummy-boottoe","tpage_name":"volcanox-pris"}],[74186799,{"idx":47,"name":"cguard1-gunmetaldark2","tpage_name":"sewh-vis-pris"}],[81657879,{"idx":23,"name":"king-precursermetal-trim2","tpage_name":"arenacst-pris2"}],[86638599,{"idx":7,"name":"daxterbolt","tpage_name":"wasdoors-vis-pris"}],[129302531,{"idx":3,"name":"airlock-door-main","tpage_name":"sewn-vis-pris"}],[99418211,{"idx":99,"name":"monk-mummy-ear","tpage_name":"volcanox-pris"}],[74186800,{"idx":48,"name":"cguard1-lens","tpage_name":"sewh-vis-pris"}],[81657880,{"idx":24,"name":"king-precursermetal-trimbolt","tpage_name":"arenacst-pris2"}],[86638600,{"idx":8,"name":"daxterear","tpage_name":"wasdoors-vis-pris"}],[129302532,{"idx":4,"name":"airlock-door-metal2","tpage_name":"sewn-vis-pris"}],[99418212,{"idx":100,"name":"monk-mummy-headgearback","tpage_name":"volcanox-pris"}],[74186801,{"idx":49,"name":"cguardgame-backplate","tpage_name":"sewh-vis-pris"}],[81657881,{"idx":25,"name":"king-shoebottom","tpage_name":"arenacst-pris2"}],[86638601,{"idx":9,"name":"daxterfinger","tpage_name":"wasdoors-vis-pris"}],[129302533,{"idx":5,"name":"airlockl-door-metalframe","tpage_name":"sewn-vis-pris"}],[99418213,{"idx":101,"name":"monk-mummy-precchest","tpage_name":"volcanox-pris"}],[74186802,{"idx":50,"name":"cguardgame-metaledark-02","tpage_name":"sewh-vis-pris"}],[81657882,{"idx":26,"name":"king-skirt","tpage_name":"arenacst-pris2"}],[86638602,{"idx":10,"name":"daxterfoot","tpage_name":"wasdoors-vis-pris"}],[129302534,{"idx":6,"name":"sew-fan-basetop","tpage_name":"sewn-vis-pris"}],[99418214,{"idx":102,"name":"monk-mummy-precedge","tpage_name":"volcanox-pris"}],[74186803,{"idx":51,"name":"cguardgame-metallight-01small","tpage_name":"sewh-vis-pris"}],[81657883,{"idx":27,"name":"king-teeth","tpage_name":"arenacst-pris2"}],[86638603,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"wasdoors-vis-pris"}],[129302535,{"idx":7,"name":"sew-fan-canopy","tpage_name":"sewn-vis-pris"}],[99418215,{"idx":103,"name":"monk-mummy-precplain","tpage_name":"volcanox-pris"}],[90374144,{"idx":0,"name":"des-beach-01","tpage_name":"desertb-vis-water"}],[81657884,{"idx":28,"name":"king-thinstrap","tpage_name":"arenacst-pris2"}],[74186804,{"idx":52,"name":"cguardgame-shoebottom","tpage_name":"sewh-vis-pris"}],[86638604,{"idx":12,"name":"daxtergoggles","tpage_name":"wasdoors-vis-pris"}],[129302536,{"idx":8,"name":"sew-gun-drum-01","tpage_name":"sewn-vis-pris"}],[99418216,{"idx":104,"name":"monk-mummy-shoebottom","tpage_name":"volcanox-pris"}],[90374145,{"idx":1,"name":"des-cave-floor-01","tpage_name":"desertb-vis-water"}],[81657885,{"idx":29,"name":"king-vest","tpage_name":"arenacst-pris2"}],[74186805,{"idx":53,"name":"roboguard-die-stamped-metal-blue","tpage_name":"sewh-vis-pris"}],[86638605,{"idx":13,"name":"daxterheadwidenew","tpage_name":"wasdoors-vis-pris"}],[129302537,{"idx":9,"name":"sew-gun-rim-04","tpage_name":"sewn-vis-pris"}],[99418217,{"idx":105,"name":"monk-mummy-skirt-01","tpage_name":"volcanox-pris"}],[74186806,{"idx":54,"name":"roboguard-die-stamped-metal-red","tpage_name":"sewh-vis-pris"}],[81657886,{"idx":30,"name":"king-vestback","tpage_name":"arenacst-pris2"}],[86638606,{"idx":14,"name":"daxterhelmetplain","tpage_name":"wasdoors-vis-pris"}],[129302538,{"idx":10,"name":"sew-laserturret-pole","tpage_name":"sewn-vis-pris"}],[99418218,{"idx":106,"name":"monk-mummy-straps","tpage_name":"volcanox-pris"}],[74186807,{"idx":55,"name":"roboguard-shouldershield","tpage_name":"sewh-vis-pris"}],[81657887,{"idx":31,"name":"king-wrap","tpage_name":"arenacst-pris2"}],[86638607,{"idx":15,"name":"daxterlense","tpage_name":"wasdoors-vis-pris"}],[129302539,{"idx":11,"name":"sew-saw-lens","tpage_name":"sewn-vis-pris"}],[99418219,{"idx":107,"name":"monk-mummy-uppertorso","tpage_name":"volcanox-pris"}],[81657888,{"idx":32,"name":"king-wraps","tpage_name":"arenacst-pris2"}],[74186808,{"idx":56,"name":"squid-bulb-sm","tpage_name":"sewh-vis-pris"}],[86638608,{"idx":16,"name":"daxternose","tpage_name":"wasdoors-vis-pris"}],[129302540,{"idx":12,"name":"sew-saw-part2","tpage_name":"sewn-vis-pris"}],[99418220,{"idx":108,"name":"grunt-eye-01","tpage_name":"volcanox-pris"}],[81657889,{"idx":33,"name":"king-wristband","tpage_name":"arenacst-pris2"}],[74186809,{"idx":57,"name":"squid-tubes","tpage_name":"sewh-vis-pris"}],[86638609,{"idx":17,"name":"daxterteeth","tpage_name":"wasdoors-vis-pris"}],[129302541,{"idx":13,"name":"sewer-metal-01","tpage_name":"sewn-vis-pris"}],[99418221,{"idx":109,"name":"grunt-gem-01","tpage_name":"volcanox-pris"}],[81657890,{"idx":34,"name":"charHOLD","tpage_name":"arenacst-pris2"}],[74186810,{"idx":58,"name":"widow-pod-gun-metal","tpage_name":"sewh-vis-pris"}],[86638610,{"idx":18,"name":"daxtertuft","tpage_name":"wasdoors-vis-pris"}],[129302542,{"idx":14,"name":"sewer-metal-block-04","tpage_name":"sewn-vis-pris"}],[99418222,{"idx":110,"name":"grunt-hose","tpage_name":"volcanox-pris"}],[74186811,{"idx":59,"name":"wire-metal","tpage_name":"sewh-vis-pris"}],[81657891,{"idx":35,"name":"sig-belt","tpage_name":"arenacst-pris2"}],[86638611,{"idx":19,"name":"environment-oldmetal","tpage_name":"wasdoors-vis-pris"}],[129302543,{"idx":15,"name":"sewer-metal-floor-02","tpage_name":"sewn-vis-pris"}],[99418223,{"idx":111,"name":"grunt-metal-01","tpage_name":"volcanox-pris"}],[89587768,{"idx":56,"name":"jakchires-eyebrow","tpage_name":"lwstdpck-pris"}],[102039568,{"idx":16,"name":"tess-jeansback","tpage_name":"gungame-vis-pris2"}],[107020288,{"idx":0,"name":"vol-shrub-grass","tpage_name":"volcanoa-vis-shrub"}],[89587771,{"idx":59,"name":"jakchires-facert","tpage_name":"lwstdpck-pris"}],[102039571,{"idx":19,"name":"tess-scarf","tpage_name":"gungame-vis-pris2"}],[107020291,{"idx":3,"name":"vola-grass-floor-01","tpage_name":"volcanoa-vis-shrub"}],[89587772,{"idx":60,"name":"jakchires-glovetop","tpage_name":"lwstdpck-pris"}],[102039572,{"idx":20,"name":"tess-shirt-128","tpage_name":"gungame-vis-pris2"}],[107020292,{"idx":4,"name":"vola-lava-rock-01","tpage_name":"volcanoa-vis-shrub"}],[89587773,{"idx":61,"name":"jakchires-hair","tpage_name":"lwstdpck-pris"}],[102039573,{"idx":21,"name":"tess-shirtstraps","tpage_name":"gungame-vis-pris2"}],[107020293,{"idx":5,"name":"fora-shrub-pebbles","tpage_name":"volcanoa-vis-shrub"}],[89587774,{"idx":62,"name":"jakchires-horn","tpage_name":"lwstdpck-pris"}],[102039574,{"idx":22,"name":"tess-shoebottom","tpage_name":"gungame-vis-pris2"}],[107020294,{"idx":6,"name":"vola-leaf-small-01","tpage_name":"volcanoa-vis-shrub"}],[89587775,{"idx":63,"name":"jakchires-jacket","tpage_name":"lwstdpck-pris"}],[102039575,{"idx":23,"name":"tess-shoetop","tpage_name":"gungame-vis-pris2"}],[107020295,{"idx":7,"name":"for-shrub-moss","tpage_name":"volcanoa-vis-shrub"}],[101580831,{"idx":31,"name":"wstlander-04-shirt-strap","tpage_name":"lwlandm-pris"}],[86638671,{"idx":79,"name":"jakchires-shoemetal","tpage_name":"wasdoors-vis-pris"}],[101580832,{"idx":32,"name":"wstlander-04-skirt","tpage_name":"lwlandm-pris"}],[86638672,{"idx":80,"name":"jakchires-shoeteop","tpage_name":"wasdoors-vis-pris"}],[86638673,{"idx":81,"name":"jakchires-teeth","tpage_name":"wasdoors-vis-pris"}],[86638674,{"idx":82,"name":"intcept-pipe01","tpage_name":"wasdoors-vis-pris"}],[111542275,{"idx":3,"name":"des-burn-eye-off","tpage_name":"desert-vis-shrub"}],[86638675,{"idx":83,"name":"intcept-tread01","tpage_name":"wasdoors-vis-pris"}],[74252328,{"idx":40,"name":"cguard1-lens","tpage_name":"sewg-vis-pris"}],[81723408,{"idx":16,"name":"daxternose","tpage_name":"ljndklev-pris"}],[86704128,{"idx":0,"name":"bam-eyelight","tpage_name":"ldamklev-pris2"}],[81723409,{"idx":17,"name":"daxterteeth","tpage_name":"ljndklev-pris"}],[86704129,{"idx":1,"name":"environment-oldmetal","tpage_name":"ldamklev-pris2"}],[74252330,{"idx":42,"name":"environment-oldmetal","tpage_name":"sewg-vis-pris"}],[81723410,{"idx":18,"name":"daxtertuft","tpage_name":"ljndklev-pris"}],[86704130,{"idx":2,"name":"king-arm","tpage_name":"ldamklev-pris2"}],[74252331,{"idx":43,"name":"roboguard-die-stamped-metal-blue","tpage_name":"sewg-vis-pris"}],[81723411,{"idx":19,"name":"environment-oldmetal","tpage_name":"ljndklev-pris"}],[86704131,{"idx":3,"name":"king-blackskirt2","tpage_name":"ldamklev-pris2"}],[74252332,{"idx":44,"name":"roboguard-die-stamped-metal-red","tpage_name":"sewg-vis-pris"}],[86704132,{"idx":4,"name":"king-bluemetal","tpage_name":"ldamklev-pris2"}],[74252335,{"idx":47,"name":"sew-fan-basetop","tpage_name":"sewg-vis-pris"}],[86704135,{"idx":7,"name":"king-clip-02","tpage_name":"ldamklev-pris2"}],[74252336,{"idx":48,"name":"sew-fan-canopy","tpage_name":"sewg-vis-pris"}],[86704136,{"idx":8,"name":"king-ear","tpage_name":"ldamklev-pris2"}],[74252337,{"idx":49,"name":"sew-gun-rim-04","tpage_name":"sewg-vis-pris"}],[86704137,{"idx":9,"name":"king-earing","tpage_name":"ldamklev-pris2"}],[74252338,{"idx":50,"name":"sew-laserturret-pole","tpage_name":"sewg-vis-pris"}],[86704138,{"idx":10,"name":"king-face-01","tpage_name":"ldamklev-pris2"}],[74252339,{"idx":51,"name":"sew-saw-lens","tpage_name":"sewg-vis-pris"}],[86704139,{"idx":11,"name":"king-finger","tpage_name":"ldamklev-pris2"}],[74252340,{"idx":52,"name":"sew-saw-part2","tpage_name":"sewg-vis-pris"}],[86704140,{"idx":12,"name":"king-greenmetal","tpage_name":"ldamklev-pris2"}],[74252341,{"idx":53,"name":"sewer-plate-04","tpage_name":"sewg-vis-pris"}],[86704141,{"idx":13,"name":"king-greenmetalplain","tpage_name":"ldamklev-pris2"}],[90439682,{"idx":2,"name":"des-palm-top","tpage_name":"deserte-vis-tfrag"}],[86704142,{"idx":14,"name":"king-hair","tpage_name":"ldamklev-pris2"}],[90439683,{"idx":3,"name":"des-palm-root","tpage_name":"deserte-vis-tfrag"}],[86704143,{"idx":15,"name":"king-hand","tpage_name":"ldamklev-pris2"}],[91684864,{"idx":0,"name":"intcept-lorez-spike01","tpage_name":"desrace1-water"}],[90439684,{"idx":4,"name":"des-palmtree-beard","tpage_name":"deserte-vis-tfrag"}],[86704144,{"idx":16,"name":"king-horn","tpage_name":"ldamklev-pris2"}],[90439685,{"idx":5,"name":"des-palmplant-leaf-02","tpage_name":"deserte-vis-tfrag"}],[86704145,{"idx":17,"name":"king-iris","tpage_name":"ldamklev-pris2"}],[86704147,{"idx":19,"name":"king-lgblackstrap","tpage_name":"ldamklev-pris2"}],[74252353,{"idx":65,"name":"sew-gun-rim-03","tpage_name":"sewg-vis-pris"}],[86704153,{"idx":25,"name":"king-shoebottom","tpage_name":"ldamklev-pris2"}],[90439694,{"idx":14,"name":"des-cliff-top-01","tpage_name":"deserte-vis-tfrag"}],[74252354,{"idx":66,"name":"sew-laserbeam-tip","tpage_name":"sewg-vis-pris"}],[86704154,{"idx":26,"name":"king-skirt","tpage_name":"ldamklev-pris2"}],[105185281,{"idx":1,"name":"ashelin-bolts","tpage_name":"desoasis-pris2"}],[74252355,{"idx":67,"name":"sew-metal-floor-01","tpage_name":"sewg-vis-pris"}],[86704155,{"idx":27,"name":"king-teeth","tpage_name":"ldamklev-pris2"}],[74252356,{"idx":68,"name":"sewer-nut","tpage_name":"sewg-vis-pris"}],[86704156,{"idx":28,"name":"king-thinstrap","tpage_name":"ldamklev-pris2"}],[90439697,{"idx":17,"name":"des-palmtree-trunk-02","tpage_name":"deserte-vis-tfrag"}],[74252357,{"idx":69,"name":"sewer-pipe-rim-05","tpage_name":"sewg-vis-pris"}],[86704157,{"idx":29,"name":"king-vest","tpage_name":"ldamklev-pris2"}],[90439698,{"idx":18,"name":"des-palm-leaf-01","tpage_name":"deserte-vis-tfrag"}],[74252358,{"idx":70,"name":"sewer-pipe-rim-05b","tpage_name":"sewg-vis-pris"}],[86704158,{"idx":30,"name":"king-vestback","tpage_name":"ldamklev-pris2"}],[81723439,{"idx":47,"name":"klever-earcup","tpage_name":"ljndklev-pris"}],[90439699,{"idx":19,"name":"des-mount-bottom-01","tpage_name":"deserte-vis-tfrag"}],[74252359,{"idx":71,"name":"sewer-plate-03","tpage_name":"sewg-vis-pris"}],[86704159,{"idx":31,"name":"king-wrap","tpage_name":"ldamklev-pris2"}],[81723440,{"idx":48,"name":"klever-eye","tpage_name":"ljndklev-pris"}],[86704160,{"idx":32,"name":"king-wraps","tpage_name":"ldamklev-pris2"}],[81723441,{"idx":49,"name":"klever-eyelid","tpage_name":"ljndklev-pris"}],[86704161,{"idx":33,"name":"king-wristband","tpage_name":"ldamklev-pris2"}],[81723442,{"idx":50,"name":"klever-face-01","tpage_name":"ljndklev-pris"}],[74252362,{"idx":74,"name":"blue-gem","tpage_name":"sewg-vis-pris"}],[86704162,{"idx":34,"name":"king-skirt-b","tpage_name":"ldamklev-pris2"}],[60620884,{"idx":84,"name":"mine-gray-metal-01","tpage_name":"minea-vis-pris"}],[86769664,{"idx":0,"name":"JakIII","tpage_name":"title-minimap"}],[71434296,{"idx":56,"name":"wstd-platform-floor","tpage_name":"wasstadc-tfrag"}],[88866816,{"idx":0,"name":"hud-kanga-lizard","tpage_name":"waschase-minimap"}],[87621636,{"idx":4,"name":"mhcent-eye","tpage_name":"lnstobb-pris"}],[71434297,{"idx":57,"name":"wstd-platform-wall","tpage_name":"wasstadc-tfrag"}],[87621637,{"idx":5,"name":"mhcent-metal-01","tpage_name":"lnstobb-pris"}],[71434298,{"idx":58,"name":"wstd-scaffold-teeth","tpage_name":"wasstadc-tfrag"}],[87621638,{"idx":6,"name":"mhcent-metal-02","tpage_name":"lnstobb-pris"}],[87621639,{"idx":7,"name":"mhcent-mouth-01","tpage_name":"lnstobb-pris"}],[71434300,{"idx":60,"name":"artifact-dec-01","tpage_name":"wasstadc-tfrag"}],[87621640,{"idx":8,"name":"mhcent-mouth-02","tpage_name":"lnstobb-pris"}],[71434301,{"idx":61,"name":"artifact-blue-glow-01","tpage_name":"wasstadc-tfrag"}],[87621641,{"idx":9,"name":"mhcent-skin-02","tpage_name":"lnstobb-pris"}],[71434302,{"idx":62,"name":"artifact-plain-01","tpage_name":"wasstadc-tfrag"}],[87621642,{"idx":10,"name":"mhcent-skin-03","tpage_name":"lnstobb-pris"}],[71434303,{"idx":63,"name":"artifact-plain-02","tpage_name":"wasstadc-tfrag"}],[87621643,{"idx":11,"name":"nst-egg-spider-body","tpage_name":"lnstobb-pris"}],[71434307,{"idx":67,"name":"wstd-fight-plat-box-end","tpage_name":"wasstadc-tfrag"}],[91357187,{"idx":3,"name":"klever-eye","tpage_name":"lkleever-pris"}],[87621647,{"idx":15,"name":"nst-egg-spider-pipe","tpage_name":"lnstobb-pris"}],[91357191,{"idx":7,"name":"klever-hair","tpage_name":"lkleever-pris"}],[87621651,{"idx":19,"name":"eco-lt-cryst-03","tpage_name":"lnstobb-pris"}],[60620888,{"idx":88,"name":"mine-red-stripe-metal-01","tpage_name":"minea-vis-pris"}],[88014848,{"idx":0,"name":"bam-eyelight","tpage_name":"lwassig-pris"}],[60620897,{"idx":97,"name":"jakc-armor","tpage_name":"minea-vis-pris"}],[88014857,{"idx":9,"name":"sig2-glove","tpage_name":"lwassig-pris"}],[60620899,{"idx":99,"name":"jakc-gogglemetal","tpage_name":"minea-vis-pris"}],[88014859,{"idx":11,"name":"sig2-gun-01","tpage_name":"lwassig-pris"}],[60620900,{"idx":100,"name":"jakc-lens","tpage_name":"minea-vis-pris"}],[88014860,{"idx":12,"name":"sig2-gun-02","tpage_name":"lwassig-pris"}],[60620901,{"idx":101,"name":"jakc-scarf","tpage_name":"minea-vis-pris"}],[88014861,{"idx":13,"name":"sig2-gun-03","tpage_name":"lwassig-pris"}],[60620902,{"idx":102,"name":"jakc-waistband2","tpage_name":"minea-vis-pris"}],[88014862,{"idx":14,"name":"sig2-gun-04","tpage_name":"lwassig-pris"}],[60620904,{"idx":104,"name":"jakc-wristband-a2","tpage_name":"minea-vis-pris"}],[88014864,{"idx":16,"name":"sig2-headgear","tpage_name":"lwassig-pris"}],[60620905,{"idx":105,"name":"jakchires-arm","tpage_name":"minea-vis-pris"}],[88014865,{"idx":17,"name":"sig2-horn","tpage_name":"lwassig-pris"}],[94240768,{"idx":0,"name":"palcab-lowres-background-hills-01","tpage_name":"intpfall-vis-tfrag"}],[60620908,{"idx":108,"name":"jakchires-brwnleather","tpage_name":"minea-vis-pris"}],[88014868,{"idx":20,"name":"sig2-metal-dirty","tpage_name":"lwassig-pris"}],[94240769,{"idx":1,"name":"strip-metal-02-lores","tpage_name":"intpfall-vis-tfrag"}],[60620909,{"idx":109,"name":"jakchires-chestplate","tpage_name":"minea-vis-pris"}],[88014869,{"idx":21,"name":"sig2-sac","tpage_name":"lwassig-pris"}],[94240770,{"idx":2,"name":"palcab-lowres-ctywide-wall-01","tpage_name":"intpfall-vis-tfrag"}],[60620910,{"idx":110,"name":"jakchires-clips","tpage_name":"minea-vis-pris"}],[88014870,{"idx":22,"name":"sig2-shoebottom","tpage_name":"lwassig-pris"}],[94240772,{"idx":4,"name":"palcab-lowres-background-rocksnow2","tpage_name":"intpfall-vis-tfrag"}],[60620912,{"idx":112,"name":"jakchires-eyebrow","tpage_name":"minea-vis-pris"}],[88014872,{"idx":24,"name":"sig2-shoulderarmor","tpage_name":"lwassig-pris"}],[94240773,{"idx":5,"name":"palcab-lowres-background-rocksnow","tpage_name":"intpfall-vis-tfrag"}],[60620913,{"idx":113,"name":"jakchires-eyelid","tpage_name":"minea-vis-pris"}],[88014873,{"idx":25,"name":"sig2-skirts","tpage_name":"lwassig-pris"}],[106496000,{"idx":0,"name":"wstlander-01-glovetop","tpage_name":"desresc-water"}],[94240774,{"idx":6,"name":"palcab-lowres-ctywide-wall-02","tpage_name":"intpfall-vis-tfrag"}],[60620914,{"idx":114,"name":"jakchires-facelft","tpage_name":"minea-vis-pris"}],[88014874,{"idx":26,"name":"sig2-skirts-03","tpage_name":"lwassig-pris"}],[94240775,{"idx":7,"name":"palcab-lowres-ctyslum-ground","tpage_name":"intpfall-vis-tfrag"}],[60620915,{"idx":115,"name":"jakchires-facert","tpage_name":"minea-vis-pris"}],[88014875,{"idx":27,"name":"sig2-undergarments","tpage_name":"lwassig-pris"}],[74055728,{"idx":48,"name":"sewer-pipe-rim-07","tpage_name":"sewi-vis-pris"}],[81526808,{"idx":24,"name":"spydroid-gold","tpage_name":"ctypesc-pris"}],[86507528,{"idx":8,"name":"bombot-insidegun","tpage_name":"lbombbot-pris"}],[88997888,{"idx":0,"name":"racegate","tpage_name":"lforring-sprite"}],[75890732,{"idx":44,"name":"onin-skull","tpage_name":"onintent-tfrag"}],[89587712,{"idx":0,"name":"bam-eyelight","tpage_name":"lwstdpck-pris"}],[79364229,{"idx":133,"name":"monk-femaleleg-01","tpage_name":"wasseem-pris"}],[104267829,{"idx":53,"name":"stdm-grass","tpage_name":"stadium-vis-tfrag"}],[75890733,{"idx":45,"name":"onin-skull-bottom","tpage_name":"onintent-tfrag"}],[89587713,{"idx":1,"name":"pecker-body-01","tpage_name":"lwstdpck-pris"}],[120455170,{"idx":2,"name":"ruins-endblocks","tpage_name":"forestx-vis-tfrag"}],[79364230,{"idx":134,"name":"monk-femaleskirt-bottom","tpage_name":"wasseem-pris"}],[104267830,{"idx":54,"name":"lt-eco-vent-blue-01","tpage_name":"stadium-vis-tfrag"}],[75890734,{"idx":46,"name":"onin-skull-pattern","tpage_name":"onintent-tfrag"}],[89587714,{"idx":2,"name":"pecker-eyelid","tpage_name":"lwstdpck-pris"}],[79364231,{"idx":135,"name":"monk-femaleskirt-top","tpage_name":"wasseem-pris"}],[104267831,{"idx":55,"name":"lt-eco-vent-side-01","tpage_name":"stadium-vis-tfrag"}],[75890741,{"idx":53,"name":"onin-tank-glass","tpage_name":"onintent-tfrag"}],[89587721,{"idx":9,"name":"pecker-yellowfur","tpage_name":"lwstdpck-pris"}],[89587751,{"idx":39,"name":"jakc-armor","tpage_name":"lwstdpck-pris"}],[102039552,{"idx":0,"name":"bam-eyelight","tpage_name":"gungame-vis-pris2"}],[89587752,{"idx":40,"name":"jakc-chestplate-straps","tpage_name":"lwstdpck-pris"}],[102039553,{"idx":1,"name":"bam-hairhilite","tpage_name":"gungame-vis-pris2"}],[89587753,{"idx":41,"name":"jakc-gogglemetal","tpage_name":"lwstdpck-pris"}],[102039554,{"idx":2,"name":"tess-belly","tpage_name":"gungame-vis-pris2"}],[89587754,{"idx":42,"name":"jakc-lens","tpage_name":"lwstdpck-pris"}],[102039555,{"idx":3,"name":"tess-belt","tpage_name":"gungame-vis-pris2"}],[89587755,{"idx":43,"name":"jakc-scarf","tpage_name":"lwstdpck-pris"}],[102039556,{"idx":4,"name":"tess-belt2","tpage_name":"gungame-vis-pris2"}],[89587756,{"idx":44,"name":"jakc-scarfhanging","tpage_name":"lwstdpck-pris"}],[102039557,{"idx":5,"name":"tess-buckle","tpage_name":"gungame-vis-pris2"}],[89587757,{"idx":45,"name":"jakc-skirt","tpage_name":"lwstdpck-pris"}],[102039558,{"idx":6,"name":"tess-chest","tpage_name":"gungame-vis-pris2"}],[89587758,{"idx":46,"name":"jakc-waistband2","tpage_name":"lwstdpck-pris"}],[102039561,{"idx":9,"name":"tess-eyelid","tpage_name":"gungame-vis-pris2"}],[89587761,{"idx":49,"name":"jakchires-arm","tpage_name":"lwstdpck-pris"}],[121110543,{"idx":15,"name":"hip-tbluecup","tpage_name":"hiphog-vis-tfrag"}],[118620183,{"idx":23,"name":"jakchires-facert","tpage_name":"ljkcdmkl-pris"}],[112394283,{"idx":43,"name":"intcept-b-base-green01","tpage_name":"desrescg-pris"}],[106168383,{"idx":63,"name":"mined_redbrake","tpage_name":"mined-tfrag"}],[102039562,{"idx":10,"name":"tess-face","tpage_name":"gungame-vis-pris2"}],[89587762,{"idx":50,"name":"jakchires-blackstrap","tpage_name":"lwstdpck-pris"}],[102039563,{"idx":11,"name":"tess-finger","tpage_name":"gungame-vis-pris2"}],[89587763,{"idx":51,"name":"jakchires-brownstrap","tpage_name":"lwstdpck-pris"}],[121110545,{"idx":17,"name":"hip-tmetbooth01","tpage_name":"hiphog-vis-tfrag"}],[118620185,{"idx":25,"name":"jakchires-hair","tpage_name":"ljkcdmkl-pris"}],[112394285,{"idx":45,"name":"intcept-b-base-patern02","tpage_name":"desrescg-pris"}],[106168385,{"idx":65,"name":"sewer-small-light-01","tpage_name":"mined-tfrag"}],[102039564,{"idx":12,"name":"tess-glove","tpage_name":"gungame-vis-pris2"}],[89587764,{"idx":52,"name":"jakchires-brwnleather","tpage_name":"lwstdpck-pris"}],[121110546,{"idx":18,"name":"hip-tred-check01","tpage_name":"hiphog-vis-tfrag"}],[118620186,{"idx":26,"name":"jakchires-horn","tpage_name":"ljkcdmkl-pris"}],[112394286,{"idx":46,"name":"intcept-b-gun01","tpage_name":"desrescg-pris"}],[106168386,{"idx":66,"name":"sewer-pipe-rim-08","tpage_name":"mined-tfrag"}],[74907697,{"idx":49,"name":"sewer-brick-block-10","tpage_name":"sewl-vis-tfrag"}],[89849857,{"idx":1,"name":"des-beach-01","tpage_name":"desertc-vis-tfrag"}],[89849859,{"idx":3,"name":"des-wasmetal01","tpage_name":"desertc-vis-tfrag"}],[89849860,{"idx":4,"name":"des-wasmetal06","tpage_name":"desertc-vis-tfrag"}],[74907701,{"idx":53,"name":"sewer-brick-roof-03","tpage_name":"sewl-vis-tfrag"}],[89849861,{"idx":5,"name":"des-wasmetal22","tpage_name":"desertc-vis-tfrag"}],[74907702,{"idx":54,"name":"sewer-lip-01","tpage_name":"sewl-vis-tfrag"}],[89849862,{"idx":6,"name":"des-wasmetal12","tpage_name":"desertc-vis-tfrag"}],[74907703,{"idx":55,"name":"sewer-metal-trim-02","tpage_name":"sewl-vis-tfrag"}],[89849863,{"idx":7,"name":"des-wasmetal19","tpage_name":"desertc-vis-tfrag"}],[74907704,{"idx":56,"name":"sewer-round-01","tpage_name":"sewl-vis-tfrag"}],[92340224,{"idx":0,"name":"intcept-lorez-spike01","tpage_name":"desrace2-water"}],[89849864,{"idx":8,"name":"des-plate-05","tpage_name":"desertc-vis-tfrag"}],[74907705,{"idx":57,"name":"sewer-round-03","tpage_name":"sewl-vis-tfrag"}],[89849865,{"idx":9,"name":"des-wasmetal02","tpage_name":"desertc-vis-tfrag"}],[74907706,{"idx":58,"name":"sewer-round-02","tpage_name":"sewl-vis-tfrag"}],[89849866,{"idx":10,"name":"des-wasmetal25","tpage_name":"desertc-vis-tfrag"}],[74907707,{"idx":59,"name":"sewer-plate-03-hitweak","tpage_name":"sewl-vis-tfrag"}],[89849867,{"idx":11,"name":"des-wasmetal04","tpage_name":"desertc-vis-tfrag"}],[74907708,{"idx":60,"name":"sewer-big-brace-trim-01","tpage_name":"sewl-vis-tfrag"}],[89849868,{"idx":12,"name":"des-wasmetal07","tpage_name":"desertc-vis-tfrag"}],[74907709,{"idx":61,"name":"sewer-big-brace-trim-02","tpage_name":"sewl-vis-tfrag"}],[89849869,{"idx":13,"name":"des-pinetree-bark","tpage_name":"desertc-vis-tfrag"}],[74907710,{"idx":62,"name":"sewer-hall-light-01","tpage_name":"sewl-vis-tfrag"}],[89849870,{"idx":14,"name":"des-rock-01","tpage_name":"desertc-vis-tfrag"}],[106430492,{"idx":28,"name":"klever-face-01scars","tpage_name":"desliz-pris"}],[74907711,{"idx":63,"name":"sewer-plate-01","tpage_name":"sewl-vis-tfrag"}],[89849871,{"idx":15,"name":"des-mount-01","tpage_name":"desertc-vis-tfrag"}],[106430493,{"idx":29,"name":"klever-fingerbottom","tpage_name":"desliz-pris"}],[74907712,{"idx":64,"name":"sewer-plate-02","tpage_name":"sewl-vis-tfrag"}],[89849872,{"idx":16,"name":"des-cliff-trans-01","tpage_name":"desertc-vis-tfrag"}],[106430494,{"idx":30,"name":"klever-fingertop","tpage_name":"desliz-pris"}],[74907713,{"idx":65,"name":"sewer-plate-03","tpage_name":"sewl-vis-tfrag"}],[89849873,{"idx":17,"name":"des-cliff-top-01","tpage_name":"desertc-vis-tfrag"}],[106430495,{"idx":31,"name":"klever-gunmetal-01","tpage_name":"desliz-pris"}],[74907714,{"idx":66,"name":"sewer-brick-roof-02","tpage_name":"sewl-vis-tfrag"}],[89849874,{"idx":18,"name":"des-cliff-01","tpage_name":"desertc-vis-tfrag"}],[106430496,{"idx":32,"name":"klever-gunmetal-02","tpage_name":"desliz-pris"}],[74907715,{"idx":67,"name":"sewer-brick-roof-04","tpage_name":"sewl-vis-tfrag"}],[89849875,{"idx":19,"name":"des-mount-02","tpage_name":"desertc-vis-tfrag"}],[106430497,{"idx":33,"name":"klever-gunmetal-03","tpage_name":"desliz-pris"}],[96075776,{"idx":0,"name":"bam-eyelight","tpage_name":"ljakc-pris"}],[74907716,{"idx":68,"name":"sewer-big-brace-01","tpage_name":"sewl-vis-tfrag"}],[89849876,{"idx":20,"name":"des-cliff-top-02","tpage_name":"desertc-vis-tfrag"}],[106430498,{"idx":34,"name":"klever-gunmetal-04","tpage_name":"desliz-pris"}],[96075777,{"idx":1,"name":"bam-hairhilite","tpage_name":"ljakc-pris"}],[74907717,{"idx":69,"name":"sewer-big-brace-02","tpage_name":"sewl-vis-tfrag"}],[89849877,{"idx":21,"name":"des-cliff-top-04","tpage_name":"desertc-vis-tfrag"}],[106430499,{"idx":35,"name":"klever-gunmetal-05","tpage_name":"desliz-pris"}],[96075778,{"idx":2,"name":"environment-oldmetal","tpage_name":"ljakc-pris"}],[74907718,{"idx":70,"name":"sewer-block-02","tpage_name":"sewl-vis-tfrag"}],[89849878,{"idx":22,"name":"des-cliff-top-03","tpage_name":"desertc-vis-tfrag"}],[96075779,{"idx":3,"name":"jakc-armor","tpage_name":"ljakc-pris"}],[74907719,{"idx":71,"name":"sewer-grate-01","tpage_name":"sewl-vis-tfrag"}],[89849879,{"idx":23,"name":"des-mount-bottom-01","tpage_name":"desertc-vis-tfrag"}],[35127475,{"idx":179,"name":"errolcyber-insidemouth","tpage_name":"factorya-pris"}],[73728055,{"idx":55,"name":"sewer-pipe-rim-09","tpage_name":"sewh-vis-tfrag"}],[89915395,{"idx":3,"name":"des-pinetree-bark","tpage_name":"deserta-vis-tfrag"}],[89980938,{"idx":10,"name":"des-corral-metal-03","tpage_name":"desertg-vis-tfrag"}],[94961693,{"idx":29,"name":"jakchires-precarmor-01","tpage_name":"lsigjakc-pris"}],[89980973,{"idx":45,"name":"des-ruins-wall-01","tpage_name":"desertg-vis-tfrag"}],[73859124,{"idx":52,"name":"sewer-pipe-02-edge-01","tpage_name":"sewg-vis-tfrag"}],[76349484,{"idx":44,"name":"torn-metal2","tpage_name":"ltornsam-pris2"}],[90046464,{"idx":0,"name":"des-shrub-pebbles","tpage_name":"desertg-vis-shrub"}],[73859127,{"idx":55,"name":"sewer-brick-block-01","tpage_name":"sewg-vis-tfrag"}],[76349487,{"idx":47,"name":"torn-scarf","tpage_name":"ltornsam-pris2"}],[90046467,{"idx":3,"name":"des-stain-wall-01","tpage_name":"desertg-vis-shrub"}],[106364934,{"idx":6,"name":"veger-bootbolt","tpage_name":"mined-pris2"}],[76480614,{"idx":102,"name":"jakchires-shoemetal","tpage_name":"freehq-pris"}],[90177594,{"idx":58,"name":"des-egg-pipe","tpage_name":"desertg-vis-pris"}],[86507537,{"idx":17,"name":"bombot-wheel","tpage_name":"lbombbot-pris"}],[90243077,{"idx":5,"name":"des-rope-01","tpage_name":"desertb-vis-tfrag"}],[90243078,{"idx":6,"name":"des-plainrope","tpage_name":"desertb-vis-tfrag"}],[74055741,{"idx":61,"name":"sew-jump-pad-grate-hitweak","tpage_name":"sewi-vis-pris"}],[86507541,{"idx":21,"name":"cguard1-guntube","tpage_name":"lbombbot-pris"}],[90243081,{"idx":9,"name":"des-palmtree-beard","tpage_name":"desertb-vis-tfrag"}],[81526822,{"idx":38,"name":"kg-fl-tret-backend","tpage_name":"ctypesc-pris"}],[86507542,{"idx":22,"name":"kg-grunt-cable-01","tpage_name":"lbombbot-pris"}],[90243082,{"idx":10,"name":"des-palmplant-leaf-02","tpage_name":"desertb-vis-tfrag"}],[81526823,{"idx":39,"name":"kg-fl-tret-black-plate","tpage_name":"ctypesc-pris"}],[86507543,{"idx":23,"name":"kg-grunt-rim-03","tpage_name":"lbombbot-pris"}],[90243083,{"idx":11,"name":"wascity-outerwall-metal-c","tpage_name":"desertb-vis-tfrag"}],[81526824,{"idx":40,"name":"kg-fl-tret-guntrack","tpage_name":"ctypesc-pris"}],[86507544,{"idx":24,"name":"roboguard-headshield","tpage_name":"lbombbot-pris"}],[90243084,{"idx":12,"name":"wascity-outerwall-metal-b","tpage_name":"desertb-vis-tfrag"}],[81526825,{"idx":41,"name":"kg-fl-tret-motor","tpage_name":"ctypesc-pris"}],[86507545,{"idx":25,"name":"citwide-crimson-gold","tpage_name":"lbombbot-pris"}],[90243085,{"idx":13,"name":"wascity-greenmetal-tube","tpage_name":"desertb-vis-tfrag"}],[81526831,{"idx":47,"name":"kg-fl-tret-post01","tpage_name":"ctypesc-pris"}],[86507551,{"idx":31,"name":"widow-bomb-glow","tpage_name":"lbombbot-pris"}],[90243091,{"idx":19,"name":"wascity-metal-door-01","tpage_name":"desertb-vis-tfrag"}],[90243096,{"idx":24,"name":"wascity-ground-01","tpage_name":"desertb-vis-tfrag"}],[90243099,{"idx":27,"name":"wascitya-airlock-door","tpage_name":"desertb-vis-tfrag"}],[90243119,{"idx":47,"name":"des-cliff-top-03","tpage_name":"desertb-vis-tfrag"}],[105185280,{"idx":0,"name":"ashelin-beltbuckle","tpage_name":"desoasis-pris2"}],[90243120,{"idx":48,"name":"des-cliff-top-04","tpage_name":"desertb-vis-tfrag"}],[105185282,{"idx":2,"name":"ashelin-boottop","tpage_name":"desoasis-pris2"}],[90243122,{"idx":50,"name":"des-palm-top","tpage_name":"desertb-vis-tfrag"}],[105185283,{"idx":3,"name":"ashelin-brownstrap","tpage_name":"desoasis-pris2"}],[90243123,{"idx":51,"name":"des-palm-root","tpage_name":"desertb-vis-tfrag"}],[81592355,{"idx":35,"name":"jakb-horn","tpage_name":"arenacst-pris"}],[90308615,{"idx":7,"name":"wascity-overlay-bullethole-b","tpage_name":"desertb-vis-shrub"}],[81592356,{"idx":36,"name":"jakb-jacketbody","tpage_name":"arenacst-pris"}],[90308616,{"idx":8,"name":"wascity-overlay-bullethole-c","tpage_name":"desertb-vis-shrub"}],[81592358,{"idx":38,"name":"jakb-leatherpouch","tpage_name":"arenacst-pris"}],[90308618,{"idx":10,"name":"des-sand-grass-01","tpage_name":"desertb-vis-shrub"}],[81592359,{"idx":39,"name":"jakb-leatherstrap","tpage_name":"arenacst-pris"}],[90308619,{"idx":11,"name":"des-rock-shrub-01","tpage_name":"desertb-vis-shrub"}],[81592360,{"idx":40,"name":"jakb-lightbrownspat","tpage_name":"arenacst-pris"}],[90308620,{"idx":12,"name":"kgtrns-side01","tpage_name":"desertb-vis-shrub"}],[81592361,{"idx":41,"name":"jakb-lightbrownstrap","tpage_name":"arenacst-pris"}],[90308621,{"idx":13,"name":"kgtrns-wing01","tpage_name":"desertb-vis-shrub"}],[86704146,{"idx":18,"name":"king-leg","tpage_name":"ldamklev-pris2"}],[90439686,{"idx":6,"name":"des-branch-01","tpage_name":"deserte-vis-tfrag"}],[60620896,{"idx":96,"name":"mine-slate-metal-01","tpage_name":"minea-vis-pris"}],[88014856,{"idx":8,"name":"sig2-gem-01","tpage_name":"lwassig-pris"}],[90505216,{"idx":0,"name":"des-waterfall","tpage_name":"desertd-vis-water"}],[60620898,{"idx":98,"name":"jakc-chestplate-straps","tpage_name":"minea-vis-pris"}],[88014858,{"idx":10,"name":"sig2-glovetop","tpage_name":"lwassig-pris"}],[90505218,{"idx":2,"name":"des-waterfall-dest","tpage_name":"desertd-vis-water"}],[74383414,{"idx":54,"name":"sewer-lip-01","tpage_name":"sewj-vis-tfrag"}],[90570754,{"idx":2,"name":"des-bark-crooked-01","tpage_name":"desertd-vis-tfrag"}],[107151376,{"idx":16,"name":"grunt-eye-01","tpage_name":"volcanoa-vis-pris"}],[74383415,{"idx":55,"name":"sewer-metal-trim-02","tpage_name":"sewj-vis-tfrag"}],[90570755,{"idx":3,"name":"des-wasmetal01","tpage_name":"desertd-vis-tfrag"}],[107151377,{"idx":17,"name":"grunt-hose","tpage_name":"volcanoa-vis-pris"}],[91815936,{"idx":0,"name":"airlock-door-bolt","tpage_name":"ctyinda-vis-pris"}],[74383416,{"idx":56,"name":"sewer-round-01","tpage_name":"sewj-vis-tfrag"}],[90570756,{"idx":4,"name":"des-wasmetal06","tpage_name":"desertd-vis-tfrag"}],[127008788,{"idx":20,"name":"warpgate-circuitpattern2","tpage_name":"volcanox-tfrag"}],[103350368,{"idx":96,"name":"rail-light-red","tpage_name":"comba-pris"}],[107151378,{"idx":18,"name":"grunt-metal-01","tpage_name":"volcanoa-vis-pris"}],[90636289,{"idx":1,"name":"des-shrub-pebbles","tpage_name":"desertd-vis-shrub"}],[90636293,{"idx":5,"name":"des-shrub-cattail","tpage_name":"desertd-vis-shrub"}],[90636295,{"idx":7,"name":"des-sand-grass-01","tpage_name":"desertd-vis-shrub"}],[90636296,{"idx":8,"name":"des-rock-shrub-01","tpage_name":"desertd-vis-shrub"}],[75759664,{"idx":48,"name":"onin-arm","tpage_name":"onintent-pris"}],[81985564,{"idx":28,"name":"marauder-metal-plate","tpage_name":"wasstadc-pris"}],[90701824,{"idx":0,"name":"des-beach-01","tpage_name":"desertf-vis-tfrag"}],[75759665,{"idx":49,"name":"onin-bowlhead","tpage_name":"onintent-pris"}],[81985565,{"idx":29,"name":"marauder-shoe-bottom","tpage_name":"wasstadc-pris"}],[90701825,{"idx":1,"name":"des-mount-01","tpage_name":"desertf-vis-tfrag"}],[75759666,{"idx":50,"name":"onin-braclet","tpage_name":"onintent-pris"}],[81985566,{"idx":30,"name":"marauder-skin","tpage_name":"wasstadc-pris"}],[90701826,{"idx":2,"name":"des-mount-02","tpage_name":"desertf-vis-tfrag"}],[75759668,{"idx":52,"name":"onin-chain","tpage_name":"onintent-pris"}],[81985568,{"idx":32,"name":"marauder-skirt-01","tpage_name":"wasstadc-pris"}],[57081968,{"idx":112,"name":"flatgerydark01","tpage_name":"waspala-pris"}],[90701828,{"idx":4,"name":"des-temple-brick-01","tpage_name":"desertf-vis-tfrag"}],[75759670,{"idx":54,"name":"onin-eyelid","tpage_name":"onintent-pris"}],[57081970,{"idx":114,"name":"yellowcard01","tpage_name":"waspala-pris"}],[81985570,{"idx":34,"name":"marauder-spike","tpage_name":"wasstadc-pris"}],[90701830,{"idx":6,"name":"des-mount-bottom-01","tpage_name":"desertf-vis-tfrag"}],[75759671,{"idx":55,"name":"onin-face","tpage_name":"onintent-pris"}],[81985571,{"idx":35,"name":"marauder-sword-edge","tpage_name":"wasstadc-pris"}],[90701831,{"idx":7,"name":"des-cliff-01","tpage_name":"desertf-vis-tfrag"}],[75759673,{"idx":57,"name":"onin-hair","tpage_name":"onintent-pris"}],[81985573,{"idx":37,"name":"wstlander-02-arm","tpage_name":"wasstadc-pris"}],[90701833,{"idx":9,"name":"des-pole-brace","tpage_name":"desertf-vis-tfrag"}],[75759675,{"idx":59,"name":"onin-handpalm","tpage_name":"onintent-pris"}],[81985575,{"idx":39,"name":"wstlander-02-belt","tpage_name":"wasstadc-pris"}],[90701835,{"idx":11,"name":"des-corral-metal-01","tpage_name":"desertf-vis-tfrag"}],[75759688,{"idx":72,"name":"pecker-eyelid","tpage_name":"onintent-pris"}],[96927748,{"idx":4,"name":"torn-armor","tpage_name":"ltornjnx-pris2"}],[81985588,{"idx":52,"name":"wstlander-04-headband","tpage_name":"wasstadc-pris"}],[90701848,{"idx":24,"name":"des-corral-plate-02","tpage_name":"desertf-vis-tfrag"}],[75759690,{"idx":74,"name":"pecker-plume","tpage_name":"onintent-pris"}],[96927750,{"idx":6,"name":"torn-belt2","tpage_name":"ltornjnx-pris2"}],[81985590,{"idx":54,"name":"wstlander-04-shirt-strap","tpage_name":"wasstadc-pris"}],[90701850,{"idx":26,"name":"des-wasmetal07","tpage_name":"desertf-vis-tfrag"}],[75759691,{"idx":75,"name":"pecker-tail","tpage_name":"onintent-pris"}],[96927751,{"idx":7,"name":"torn-blademetal","tpage_name":"ltornjnx-pris2"}],[81985591,{"idx":55,"name":"wstlander-04-skirt","tpage_name":"wasstadc-pris"}],[90701851,{"idx":27,"name":"des-ruins-bottom-02","tpage_name":"desertf-vis-tfrag"}],[94240818,{"idx":50,"name":"city-lowres-ctygen-build-03","tpage_name":"intpfall-vis-tfrag"}],[109182978,{"idx":2,"name":"stadiumb-hud-lap-01","tpage_name":"destrack-minimap"}],[94240819,{"idx":51,"name":"city-lowres-ctygen-build-04","tpage_name":"intpfall-vis-tfrag"}],[109182979,{"idx":3,"name":"stadiumb-hud-lap-02","tpage_name":"destrack-minimap"}],[94240820,{"idx":52,"name":"city-lowres-ctygen-build-05","tpage_name":"intpfall-vis-tfrag"}],[109182980,{"idx":4,"name":"stadiumb-hud-lap-03","tpage_name":"destrack-minimap"}],[94240821,{"idx":53,"name":"citywide-consite-steel","tpage_name":"intpfall-vis-tfrag"}],[109182981,{"idx":5,"name":"stadiumb-hud-nmbr-01","tpage_name":"destrack-minimap"}],[94240822,{"idx":54,"name":"citywide-consite-wall","tpage_name":"intpfall-vis-tfrag"}],[109182982,{"idx":6,"name":"stadiumb-hud-nmbr-02","tpage_name":"destrack-minimap"}],[94240823,{"idx":55,"name":"citywide-consite-orange","tpage_name":"intpfall-vis-tfrag"}],[109182983,{"idx":7,"name":"stadiumb-hud-nmbr-03","tpage_name":"destrack-minimap"}],[94240825,{"idx":57,"name":"t-citywide-met-strp01","tpage_name":"intpfall-vis-tfrag"}],[109182985,{"idx":9,"name":"stadiumb-hud-nmbr-05","tpage_name":"destrack-minimap"}],[94240827,{"idx":59,"name":"t-palshaft-panl-01","tpage_name":"intpfall-vis-tfrag"}],[109182987,{"idx":11,"name":"stadiumb-hud-nmbr-07","tpage_name":"destrack-minimap"}],[94240828,{"idx":60,"name":"t-palshaft-pil-01","tpage_name":"intpfall-vis-tfrag"}],[109182988,{"idx":12,"name":"stadiumb-hud-nmbr-08","tpage_name":"destrack-minimap"}],[94240829,{"idx":61,"name":"t-palshaft-dirt-blue-01","tpage_name":"intpfall-vis-tfrag"}],[109182989,{"idx":13,"name":"stadiumb-hud-ord-e","tpage_name":"destrack-minimap"}],[94240831,{"idx":63,"name":"t-citywide-met-wall-02","tpage_name":"intpfall-vis-tfrag"}],[109182991,{"idx":15,"name":"stadiumb-hud-ord-korean","tpage_name":"destrack-minimap"}],[94240832,{"idx":64,"name":"t-citypal-met-strp01","tpage_name":"intpfall-vis-tfrag"}],[109182992,{"idx":16,"name":"stadiumb-hud-ord-nd","tpage_name":"destrack-minimap"}],[94240833,{"idx":65,"name":"t-palshaft-plate01","tpage_name":"intpfall-vis-tfrag"}],[109182993,{"idx":17,"name":"stadiumb-hud-ord-o","tpage_name":"destrack-minimap"}],[94240835,{"idx":67,"name":"city-bigpipe-ring-02","tpage_name":"intpfall-vis-tfrag"}],[109182995,{"idx":19,"name":"stadiumb-hud-ord-st","tpage_name":"destrack-minimap"}],[94240836,{"idx":68,"name":"city-bigpipe-main-02","tpage_name":"intpfall-vis-tfrag"}],[109182996,{"idx":20,"name":"stadiumb-hud-ord-th","tpage_name":"destrack-minimap"}],[94240839,{"idx":71,"name":"palcab-lowres-background-mount-build-03","tpage_name":"intpfall-vis-tfrag"}],[109182999,{"idx":23,"name":"map-desert-race","tpage_name":"destrack-minimap"}],[74580020,{"idx":52,"name":"sewer-hall-light-01","tpage_name":"sewm-vis-tfrag"}],[90767360,{"idx":0,"name":"des-beach-01","tpage_name":"deserth-vis-tfrag"}],[74580024,{"idx":56,"name":"sewer-rebar","tpage_name":"sewm-vis-tfrag"}],[90767364,{"idx":4,"name":"des-mount-01","tpage_name":"deserth-vis-tfrag"}],[90767365,{"idx":5,"name":"des-mount-02","tpage_name":"deserth-vis-tfrag"}],[74580027,{"idx":59,"name":"sewer-pipe-rim-10","tpage_name":"sewm-vis-tfrag"}],[90767367,{"idx":7,"name":"des-mount-bottom-01","tpage_name":"deserth-vis-tfrag"}],[74580028,{"idx":60,"name":"sewer-metal-floor-01","tpage_name":"sewm-vis-tfrag"}],[90767368,{"idx":8,"name":"des-cliff-top-02","tpage_name":"deserth-vis-tfrag"}],[90767369,{"idx":9,"name":"des-cliff-01","tpage_name":"deserth-vis-tfrag"}],[74580030,{"idx":62,"name":"sewer-metal-edge-01","tpage_name":"sewm-vis-tfrag"}],[90767370,{"idx":10,"name":"des-cliff-top-04","tpage_name":"deserth-vis-tfrag"}],[74580031,{"idx":63,"name":"sewer-pool-rim-02","tpage_name":"sewm-vis-tfrag"}],[90767371,{"idx":11,"name":"des-rock-01","tpage_name":"deserth-vis-tfrag"}],[74580032,{"idx":64,"name":"sewer-small-light-01","tpage_name":"sewm-vis-tfrag"}],[90767372,{"idx":12,"name":"des-palmtree-trunk-02","tpage_name":"deserth-vis-tfrag"}],[92274691,{"idx":3,"name":"intcept-gun01","tpage_name":"desrace2-pris"}],[73596991,{"idx":63,"name":"sewer-nut","tpage_name":"sewi-vis-tfrag"}],[38731951,{"idx":175,"name":"femcher2_10","tpage_name":"wasstada-sprite"}],[91029511,{"idx":7,"name":"gen-02","tpage_name":"gungame-sprite"}],[92274701,{"idx":13,"name":"vehicle-metal-plate-01","tpage_name":"desrace2-pris"}],[73597001,{"idx":73,"name":"sewer-lip-01-hitweak","tpage_name":"sewi-vis-tfrag"}],[38731961,{"idx":185,"name":"femcher2_20","tpage_name":"wasstada-sprite"}],[91029521,{"idx":17,"name":"gun-cita-bit-01","tpage_name":"gungame-sprite"}],[92274702,{"idx":14,"name":"vehicle-toad-exhaust-01","tpage_name":"desrace2-pris"}],[73597002,{"idx":74,"name":"strip-black","tpage_name":"sewi-vis-tfrag"}],[38731962,{"idx":186,"name":"male1_00","tpage_name":"wasstada-sprite"}],[91029522,{"idx":18,"name":"gun-cita-bit-02","tpage_name":"gungame-sprite"}],[92274704,{"idx":16,"name":"vehicle-wheel-01","tpage_name":"desrace2-pris"}],[97255424,{"idx":0,"name":"wstd-gate-pass-03","tpage_name":"arenacst-tfrag"}],[38731964,{"idx":188,"name":"male1_02","tpage_name":"wasstada-sprite"}],[91029524,{"idx":20,"name":"gun-cita-bit-04","tpage_name":"gungame-sprite"}],[35127476,{"idx":180,"name":"errolcyber-insidewires","tpage_name":"factorya-pris"}],[73728056,{"idx":56,"name":"sewer-metal-03","tpage_name":"sewh-vis-tfrag"}],[89915396,{"idx":4,"name":"des-rock-01","tpage_name":"deserta-vis-tfrag"}],[91160576,{"idx":0,"name":"bam-eyelight","tpage_name":"gungame-vis-pris"}],[35127477,{"idx":181,"name":"errolcyber-jointpipe","tpage_name":"factorya-pris"}],[73728057,{"idx":57,"name":"sewer-plate-02","tpage_name":"sewh-vis-tfrag"}],[89915397,{"idx":5,"name":"des-mount-01","tpage_name":"deserta-vis-tfrag"}],[91160577,{"idx":1,"name":"bam-hairhilite","tpage_name":"gungame-vis-pris"}],[35127478,{"idx":182,"name":"errolcyber-metalgold","tpage_name":"factorya-pris"}],[73728058,{"idx":58,"name":"sewer-plate-03","tpage_name":"sewh-vis-tfrag"}],[89915398,{"idx":6,"name":"des-cliff-trans-01","tpage_name":"deserta-vis-tfrag"}],[91160578,{"idx":2,"name":"daxter-eyelid","tpage_name":"gungame-vis-pris"}],[35127479,{"idx":183,"name":"errolcyber-pipes-01","tpage_name":"factorya-pris"}],[73728059,{"idx":59,"name":"sewer-pipe-rim-05","tpage_name":"sewh-vis-tfrag"}],[89915399,{"idx":7,"name":"des-cliff-top-01","tpage_name":"deserta-vis-tfrag"}],[91160579,{"idx":3,"name":"daxter-furhilite","tpage_name":"gungame-vis-pris"}],[35127480,{"idx":184,"name":"errolcyber-pipes-02","tpage_name":"factorya-pris"}],[73728060,{"idx":60,"name":"sewer-hall-light-01","tpage_name":"sewh-vis-tfrag"}],[89915400,{"idx":8,"name":"des-cliff-01","tpage_name":"deserta-vis-tfrag"}],[91160580,{"idx":4,"name":"daxter-orange","tpage_name":"gungame-vis-pris"}],[35127481,{"idx":185,"name":"errolcyber-pipes-03","tpage_name":"factorya-pris"}],[73728061,{"idx":61,"name":"sewer-metal-floor-01","tpage_name":"sewh-vis-tfrag"}],[89915401,{"idx":9,"name":"des-mount-02","tpage_name":"deserta-vis-tfrag"}],[91160581,{"idx":5,"name":"daxterarm","tpage_name":"gungame-vis-pris"}],[35127482,{"idx":186,"name":"errolcyber-redmetal-01","tpage_name":"factorya-pris"}],[73728062,{"idx":62,"name":"sewer-grate-01","tpage_name":"sewh-vis-tfrag"}],[89915402,{"idx":10,"name":"des-cliff-top-03","tpage_name":"deserta-vis-tfrag"}],[91160582,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"gungame-vis-pris"}],[35127483,{"idx":187,"name":"errolcyber-redmetal-02","tpage_name":"factorya-pris"}],[73728063,{"idx":63,"name":"sewer-nut","tpage_name":"sewh-vis-tfrag"}],[89915403,{"idx":11,"name":"des-cliff-top-02","tpage_name":"deserta-vis-tfrag"}],[91160583,{"idx":7,"name":"daxterbolt","tpage_name":"gungame-vis-pris"}],[35127484,{"idx":188,"name":"errolcyber-redmetal-03","tpage_name":"factorya-pris"}],[73728064,{"idx":64,"name":"sewer-nut-rim","tpage_name":"sewh-vis-tfrag"}],[89915404,{"idx":12,"name":"des-cliff-top-04","tpage_name":"deserta-vis-tfrag"}],[91160584,{"idx":8,"name":"daxterear","tpage_name":"gungame-vis-pris"}],[35127485,{"idx":189,"name":"errolcyber-rubberpipe","tpage_name":"factorya-pris"}],[73728065,{"idx":65,"name":"sewer-metal-floor-allslime","tpage_name":"sewh-vis-tfrag"}],[89915405,{"idx":13,"name":"des-mount-bottom-01","tpage_name":"deserta-vis-tfrag"}],[91160585,{"idx":9,"name":"daxterfinger","tpage_name":"gungame-vis-pris"}],[35127486,{"idx":190,"name":"errolcyber-rubberpipe-light","tpage_name":"factorya-pris"}],[73728066,{"idx":66,"name":"sewer-metal-floor-02-slime","tpage_name":"sewh-vis-tfrag"}],[91160586,{"idx":10,"name":"daxterfoot","tpage_name":"gungame-vis-pris"}],[73728067,{"idx":67,"name":"strip-black","tpage_name":"sewh-vis-tfrag"}],[35127487,{"idx":191,"name":"errolcyber-spine","tpage_name":"factorya-pris"}],[91160587,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"gungame-vis-pris"}],[73728068,{"idx":68,"name":"sewer-grill-02","tpage_name":"sewh-vis-tfrag"}],[35127488,{"idx":192,"name":"errolcyber-teeth","tpage_name":"factorya-pris"}],[91160588,{"idx":12,"name":"daxtergoggles","tpage_name":"gungame-vis-pris"}],[73728069,{"idx":69,"name":"sewer-metal-block-04-hitweak","tpage_name":"sewh-vis-tfrag"}],[35127489,{"idx":193,"name":"errocyber-eye","tpage_name":"factorya-pris"}],[91160589,{"idx":13,"name":"daxterheadwidenew","tpage_name":"gungame-vis-pris"}],[122290177,{"idx":1,"name":"fac-tower-08","tpage_name":"factoryb-vis-pris"}],[112328737,{"idx":33,"name":"jakchires-blackstrap","tpage_name":"wascast-pris"}],[91160677,{"idx":101,"name":"jakchires-lightbrownspat","tpage_name":"gungame-vis-pris"}],[122290179,{"idx":3,"name":"fac-tower-door-04","tpage_name":"factoryb-vis-pris"}],[112328739,{"idx":35,"name":"jakchires-brwnleather","tpage_name":"wascast-pris"}],[91160679,{"idx":103,"name":"jakchires-precarmor-01","tpage_name":"gungame-vis-pris"}],[100991016,{"idx":40,"name":"klever-eyelid","tpage_name":"ljakklev-pris"}],[38732016,{"idx":240,"name":"male3_12","tpage_name":"wasstada-sprite"}],[112197636,{"idx":4,"name":"intcept-pipe01","tpage_name":"desinter-pris"}],[113442816,{"idx":0,"name":"sat-shield","tpage_name":"desresc-warp"}],[71303232,{"idx":64,"name":"king-skirt-b","tpage_name":"ldamsig-pris2"}],[89980932,{"idx":4,"name":"des-corral-metal-02","tpage_name":"desertg-vis-tfrag"}],[91226112,{"idx":0,"name":"gun-bulletholes-01","tpage_name":"gungame-vis-shrub"}],[89980933,{"idx":5,"name":"des-corral-metal-04","tpage_name":"desertg-vis-tfrag"}],[91226113,{"idx":1,"name":"gun-bulletholes-02","tpage_name":"gungame-vis-shrub"}],[89980934,{"idx":6,"name":"des-corral-plate-02","tpage_name":"desertg-vis-tfrag"}],[91226114,{"idx":2,"name":"gun-bulletholes-03","tpage_name":"gungame-vis-shrub"}],[73859128,{"idx":56,"name":"sewer-brick-block-06","tpage_name":"sewg-vis-tfrag"}],[76349488,{"idx":48,"name":"torn-shoe","tpage_name":"ltornsam-pris2"}],[90046468,{"idx":4,"name":"des-sand-grass-01","tpage_name":"desertg-vis-shrub"}],[91291648,{"idx":0,"name":"city-bluelight","tpage_name":"gungame-vis-tfrag"}],[76349489,{"idx":49,"name":"torn-shoe-02","tpage_name":"ltornsam-pris2"}],[90046469,{"idx":5,"name":"des-rock-shrub-01","tpage_name":"desertg-vis-shrub"}],[91291649,{"idx":1,"name":"city-metal-doorframe2","tpage_name":"gungame-vis-tfrag"}],[73859130,{"idx":58,"name":"sewer-stone-arch-02","tpage_name":"sewg-vis-tfrag"}],[76349490,{"idx":50,"name":"torn-teeth-01","tpage_name":"ltornsam-pris2"}],[91291650,{"idx":2,"name":"city-port-barge-deck","tpage_name":"gungame-vis-tfrag"}],[73859131,{"idx":59,"name":"sewer-concrete-block-02","tpage_name":"sewg-vis-tfrag"}],[76349491,{"idx":51,"name":"torn-vest","tpage_name":"ltornsam-pris2"}],[91291651,{"idx":3,"name":"city-port-barge-plain-metal","tpage_name":"gungame-vis-tfrag"}],[73859132,{"idx":60,"name":"sewer-plate-06","tpage_name":"sewg-vis-tfrag"}],[91291652,{"idx":4,"name":"city-port-door01","tpage_name":"gungame-vis-tfrag"}],[73859134,{"idx":62,"name":"sewer-big-brace-trim-01","tpage_name":"sewg-vis-tfrag"}],[91291654,{"idx":6,"name":"citywide-metal-wall","tpage_name":"gungame-vis-tfrag"}],[73859135,{"idx":63,"name":"sewer-big-brace-trim-02","tpage_name":"sewg-vis-tfrag"}],[91291655,{"idx":7,"name":"common-black","tpage_name":"gungame-vis-tfrag"}],[73859138,{"idx":66,"name":"sewer-track-01","tpage_name":"sewg-vis-tfrag"}],[91291658,{"idx":10,"name":"gun-barrel-alt","tpage_name":"gungame-vis-tfrag"}],[73859139,{"idx":67,"name":"sewer-metal-floor-01","tpage_name":"sewg-vis-tfrag"}],[91291659,{"idx":11,"name":"gun-bigpipe-ring-side","tpage_name":"gungame-vis-tfrag"}],[73859140,{"idx":68,"name":"sewer-metal-floor-02","tpage_name":"sewg-vis-tfrag"}],[95027200,{"idx":0,"name":"bam-eyelight","tpage_name":"lsigjakc-pris2"}],[91291660,{"idx":12,"name":"gun-bigpipe-siding","tpage_name":"gungame-vis-tfrag"}],[73859145,{"idx":73,"name":"sewer-lip-01-hitweak","tpage_name":"sewg-vis-tfrag"}],[95027205,{"idx":5,"name":"sig-eyelid","tpage_name":"lsigjakc-pris2"}],[91291665,{"idx":17,"name":"gun-building-chimney","tpage_name":"gungame-vis-tfrag"}],[95027218,{"idx":18,"name":"sig-horn","tpage_name":"lsigjakc-pris2"}],[91291678,{"idx":30,"name":"gun-building-window-01","tpage_name":"gungame-vis-tfrag"}],[95027227,{"idx":27,"name":"sig-skirts-02","tpage_name":"lsigjakc-pris2"}],[91291687,{"idx":39,"name":"gun-guncase-door-01","tpage_name":"gungame-vis-tfrag"}],[95027228,{"idx":28,"name":"sig-skirts-03","tpage_name":"lsigjakc-pris2"}],[91291688,{"idx":40,"name":"gun-guncase-rim-01","tpage_name":"gungame-vis-tfrag"}],[91291691,{"idx":43,"name":"gun-guncase-round-02","tpage_name":"gungame-vis-tfrag"}],[91291693,{"idx":45,"name":"gun-guncase-top-01","tpage_name":"gungame-vis-tfrag"}],[91291694,{"idx":46,"name":"gun-gunrack-01","tpage_name":"gungame-vis-tfrag"}],[91291695,{"idx":47,"name":"gun-gunrack-02","tpage_name":"gungame-vis-tfrag"}],[71434304,{"idx":64,"name":"artifact-dec-02","tpage_name":"wasstadc-tfrag"}],[87621644,{"idx":12,"name":"nst-egg-spider-egg","tpage_name":"lnstobb-pris"}],[91357184,{"idx":0,"name":"bam-eyelight","tpage_name":"lkleever-pris"}],[71434305,{"idx":65,"name":"wstd-fight-plat-box-top","tpage_name":"wasstadc-tfrag"}],[87621645,{"idx":13,"name":"nst-egg-spider-eye","tpage_name":"lnstobb-pris"}],[91357185,{"idx":1,"name":"bam-hairhilite","tpage_name":"lkleever-pris"}],[71434306,{"idx":66,"name":"wstd-fight-plat-box-side","tpage_name":"wasstadc-tfrag"}],[87621646,{"idx":14,"name":"nst-egg-spider-metal","tpage_name":"lnstobb-pris"}],[91357186,{"idx":2,"name":"klever-earcup","tpage_name":"lkleever-pris"}],[71434309,{"idx":69,"name":"wstd-fight-plat-door","tpage_name":"wasstadc-tfrag"}],[87621649,{"idx":17,"name":"eco-lt-cryst-02","tpage_name":"lnstobb-pris"}],[91357189,{"idx":5,"name":"klever-face-01","tpage_name":"lkleever-pris"}],[71434312,{"idx":72,"name":"wstd-fight-plat-girder","tpage_name":"wasstadc-tfrag"}],[91357192,{"idx":8,"name":"klever-mustache","tpage_name":"lkleever-pris"}],[71434317,{"idx":77,"name":"wstd-fight-plat-wall-02","tpage_name":"wasstadc-tfrag"}],[91357197,{"idx":13,"name":"klever-handwrap","tpage_name":"lkleever-pris"}],[91357203,{"idx":19,"name":"klever-gunmetal-02","tpage_name":"lkleever-pris"}],[71434325,{"idx":85,"name":"wstd-fight-plat-lrg-floor-04","tpage_name":"wasstadc-tfrag"}],[91357205,{"idx":21,"name":"klever-gunmetal-04","tpage_name":"lkleever-pris"}],[71434326,{"idx":86,"name":"wstd-fight-plat-lrg-floor-03","tpage_name":"wasstadc-tfrag"}],[91357206,{"idx":22,"name":"klever-gunmetal-05","tpage_name":"lkleever-pris"}],[71434327,{"idx":87,"name":"wstd-fight-plat-hole","tpage_name":"wasstadc-tfrag"}],[91357207,{"idx":23,"name":"klever-hand","tpage_name":"lkleever-pris"}],[91357208,{"idx":24,"name":"klever-horn","tpage_name":"lkleever-pris"}],[90570762,{"idx":10,"name":"des-wasmetal25","tpage_name":"desertd-vis-tfrag"}],[74383422,{"idx":62,"name":"sewer-hall-light-01","tpage_name":"sewj-vis-tfrag"}],[91815942,{"idx":6,"name":"citwide-crimson-light","tpage_name":"ctyinda-vis-pris"}],[90570763,{"idx":11,"name":"des-wasmetal04","tpage_name":"desertd-vis-tfrag"}],[91815943,{"idx":7,"name":"citwide-crimson-red","tpage_name":"ctyinda-vis-pris"}],[100925441,{"idx":1,"name":"environment-oldmetal","tpage_name":"ljkdmpk-pris2"}],[95944721,{"idx":17,"name":"torn-hair-01","tpage_name":"freehq-pris2"}],[92209181,{"idx":29,"name":"klever-skirtdark","tpage_name":"ldamklev-pris"}],[73596990,{"idx":62,"name":"sewer-metal-floor-02","tpage_name":"sewi-vis-tfrag"}],[38731950,{"idx":174,"name":"femcher2_09","tpage_name":"wasstada-sprite"}],[91029510,{"idx":6,"name":"gen-01","tpage_name":"gungame-sprite"}],[92274690,{"idx":2,"name":"intcept-base-patern02","tpage_name":"desrace2-pris"}],[112525382,{"idx":70,"name":"jakchires-leatherpouch","tpage_name":"desrescc-pris"}],[105054302,{"idx":94,"name":"marauder-shoe-bottom","tpage_name":"desoasis-pris"}],[73596992,{"idx":64,"name":"sewer-nut-rim","tpage_name":"sewi-vis-tfrag"}],[38731952,{"idx":176,"name":"femcher2_11","tpage_name":"wasstada-sprite"}],[91029512,{"idx":8,"name":"gen-03","tpage_name":"gungame-sprite"}],[92274692,{"idx":4,"name":"intcept-pipe01","tpage_name":"desrace2-pris"}],[112525384,{"idx":72,"name":"jakchires-pants","tpage_name":"desrescc-pris"}],[105054304,{"idx":96,"name":"marauder-skin-nipple","tpage_name":"desoasis-pris"}],[38731953,{"idx":177,"name":"femcher2_12","tpage_name":"wasstada-sprite"}],[92274693,{"idx":5,"name":"intcept-teeth01","tpage_name":"desrace2-pris"}],[112525385,{"idx":73,"name":"jakchires-precarmor-01","tpage_name":"desrescc-pris"}],[105054305,{"idx":97,"name":"marauder-skirt-01","tpage_name":"desoasis-pris"}],[97255425,{"idx":1,"name":"wstd-gate-pass-02","tpage_name":"arenacst-tfrag"}],[38731965,{"idx":189,"name":"male1_03","tpage_name":"wasstada-sprite"}],[91029525,{"idx":21,"name":"kg-targ-bit-01","tpage_name":"gungame-sprite"}],[92274705,{"idx":17,"name":"vehicle-wheel-blur-01","tpage_name":"desrace2-pris"}],[134938637,{"idx":13,"name":"rub-wall-small-grill","tpage_name":"rubbleb-vis-shrub"}],[105054317,{"idx":109,"name":"vehicle-body-panel-01","tpage_name":"desoasis-pris"}],[98500608,{"idx":0,"name":"wang_black","tpage_name":"hanga-hfrag"}],[38731968,{"idx":192,"name":"male1_06","tpage_name":"wasstada-sprite"}],[91029528,{"idx":24,"name":"kg-targ-bit-04","tpage_name":"gungame-sprite"}],[92274708,{"idx":20,"name":"intcept-b-base-green01","tpage_name":"desrace2-pris"}],[134938640,{"idx":16,"name":"rub-ground-01-small","tpage_name":"rubbleb-vis-shrub"}],[105054320,{"idx":112,"name":"vehicle-chrome-pipe-01","tpage_name":"desoasis-pris"}],[98500609,{"idx":1,"name":"wang_mip","tpage_name":"hanga-hfrag"}],[38731969,{"idx":193,"name":"male1_07","tpage_name":"wasstada-sprite"}],[91029529,{"idx":25,"name":"kg-bonus-bit-01","tpage_name":"gungame-sprite"}],[92274709,{"idx":21,"name":"intcept-b-base-patern01","tpage_name":"desrace2-pris"}],[105054321,{"idx":113,"name":"vehicle-gas-tank-01","tpage_name":"desoasis-pris"}],[98500610,{"idx":2,"name":"wang_0","tpage_name":"hanga-hfrag"}],[38731970,{"idx":194,"name":"male1_08","tpage_name":"wasstada-sprite"}],[91029530,{"idx":26,"name":"kg-bonus-bit-02","tpage_name":"gungame-sprite"}],[92274710,{"idx":22,"name":"intcept-b-base-patern02","tpage_name":"desrace2-pris"}],[105054322,{"idx":114,"name":"vehicle-gun-box-01","tpage_name":"desoasis-pris"}],[98500611,{"idx":3,"name":"wang_1","tpage_name":"hanga-hfrag"}],[91029531,{"idx":27,"name":"kg-bonus-bit-03","tpage_name":"gungame-sprite"}],[38731971,{"idx":195,"name":"male1_09","tpage_name":"wasstada-sprite"}],[92274711,{"idx":23,"name":"intcept-b-gun01","tpage_name":"desrace2-pris"}],[105054323,{"idx":115,"name":"vehicle-metal-plate-01","tpage_name":"desoasis-pris"}],[141164544,{"idx":0,"name":"holo-curve","tpage_name":"lctysnpr-sprite"}],[105054324,{"idx":116,"name":"vehicle-toad-exhaust-01","tpage_name":"desoasis-pris"}],[105054325,{"idx":117,"name":"vehicle-tread-blur-02","tpage_name":"desoasis-pris"}],[86704148,{"idx":20,"name":"king-precursermetal-decor","tpage_name":"ldamklev-pris2"}],[90439688,{"idx":8,"name":"des-mount-01","tpage_name":"deserte-vis-tfrag"}],[92930048,{"idx":0,"name":"artifact-dec-01","tpage_name":"desrace1-tfrag"}],[74252349,{"idx":61,"name":"sew-gun-barrel-01","tpage_name":"sewg-vis-pris"}],[86704149,{"idx":21,"name":"king-precursermetal-plain","tpage_name":"ldamklev-pris2"}],[90439689,{"idx":9,"name":"des-rock-01","tpage_name":"deserte-vis-tfrag"}],[92930049,{"idx":1,"name":"artifact-blue-glow-01","tpage_name":"desrace1-tfrag"}],[74252350,{"idx":62,"name":"sew-gun-body-01","tpage_name":"sewg-vis-pris"}],[86704150,{"idx":22,"name":"king-precursermetal-trim","tpage_name":"ldamklev-pris2"}],[90439690,{"idx":10,"name":"des-mount-02","tpage_name":"deserte-vis-tfrag"}],[92930050,{"idx":2,"name":"artifact-plain-01","tpage_name":"desrace1-tfrag"}],[74252351,{"idx":63,"name":"sew-gun-panel-02","tpage_name":"sewg-vis-pris"}],[86704151,{"idx":23,"name":"king-precursermetal-trim2","tpage_name":"ldamklev-pris2"}],[90439691,{"idx":11,"name":"des-cliff-trans-01","tpage_name":"deserte-vis-tfrag"}],[92930051,{"idx":3,"name":"artifact-plain-02","tpage_name":"desrace1-tfrag"}],[74252352,{"idx":64,"name":"sew-gun-panel-05","tpage_name":"sewg-vis-pris"}],[86704152,{"idx":24,"name":"king-precursermetal-trimbolt","tpage_name":"ldamklev-pris2"}],[90439692,{"idx":12,"name":"des-cliff-top-03","tpage_name":"deserte-vis-tfrag"}],[92930052,{"idx":4,"name":"artifact-dec-02","tpage_name":"desrace1-tfrag"}],[38731982,{"idx":206,"name":"male1_20","tpage_name":"wasstada-sprite"}],[100990982,{"idx":6,"name":"jak-teeth","tpage_name":"ljakklev-pris"}],[93519902,{"idx":30,"name":"hud-rhino-turbometer","tpage_name":"wasall-minimap"}],[109182984,{"idx":8,"name":"stadiumb-hud-nmbr-04","tpage_name":"destrack-minimap"}],[94240824,{"idx":56,"name":"t-citywide-met-bm-red-strp01","tpage_name":"intpfall-vis-tfrag"}],[130351105,{"idx":1,"name":"des-beast-eye","tpage_name":"deshover-pris2"}],[129105925,{"idx":5,"name":"sewer-waterfall-02-n-dest","tpage_name":"sewn-vis-water"}],[94240885,{"idx":117,"name":"palcab-wall","tpage_name":"intpfall-vis-tfrag"}],[91815944,{"idx":8,"name":"citwide-crimson-tube","tpage_name":"ctyinda-vis-pris"}],[90570764,{"idx":12,"name":"des-wasmetal07","tpage_name":"desertd-vis-tfrag"}],[74383424,{"idx":64,"name":"sewer-plate-02","tpage_name":"sewj-vis-tfrag"}],[94306304,{"idx":0,"name":"palcab-lowres-background-shoreline-02","tpage_name":"intpfall-vis-alpha"}],[121438221,{"idx":13,"name":"vehicle-brace-pipe-01","tpage_name":"desbattl-pris"}],[108986421,{"idx":53,"name":"monk-redjewel","tpage_name":"wasleapr-pris"}],[91815945,{"idx":9,"name":"citwide-crimson-wall-plain","tpage_name":"ctyinda-vis-pris"}],[90570765,{"idx":13,"name":"des-palmtree-beard","tpage_name":"desertd-vis-tfrag"}],[74383425,{"idx":65,"name":"sewer-plate-03","tpage_name":"sewj-vis-tfrag"}],[94306305,{"idx":1,"name":"palcab-lowres-background-crater-rim","tpage_name":"intpfall-vis-alpha"}],[121438222,{"idx":14,"name":"vehicle-cap-pin-01","tpage_name":"desbattl-pris"}],[108986422,{"idx":54,"name":"monk-rope","tpage_name":"wasleapr-pris"}],[91815946,{"idx":10,"name":"vin-door-large-01","tpage_name":"ctyinda-vis-pris"}],[74383426,{"idx":66,"name":"sewer-brick-roof-02","tpage_name":"sewj-vis-tfrag"}],[90570766,{"idx":14,"name":"des-palmplant-leaf-01","tpage_name":"desertd-vis-tfrag"}],[94306306,{"idx":2,"name":"palcab-lowres-background-trees-edge","tpage_name":"intpfall-vis-alpha"}],[121438223,{"idx":15,"name":"vehicle-gun-box-01","tpage_name":"desbattl-pris"}],[108986423,{"idx":55,"name":"monk-scarob","tpage_name":"wasleapr-pris"}],[91815947,{"idx":11,"name":"vin-support-base-02","tpage_name":"ctyinda-vis-pris"}],[74383427,{"idx":67,"name":"sewer-brick-roof-04","tpage_name":"sewj-vis-tfrag"}],[90570767,{"idx":15,"name":"des-cactus-02","tpage_name":"desertd-vis-tfrag"}],[94306307,{"idx":3,"name":"palcab-lowres-background-trees2","tpage_name":"intpfall-vis-alpha"}],[121438224,{"idx":16,"name":"vehicle-metal-01","tpage_name":"desbattl-pris"}],[108986424,{"idx":56,"name":"monk-staffa-wood","tpage_name":"wasleapr-pris"}],[74383428,{"idx":68,"name":"sewer-big-brace-01","tpage_name":"sewj-vis-tfrag"}],[90570768,{"idx":16,"name":"des-cactus-01","tpage_name":"desertd-vis-tfrag"}],[94306308,{"idx":4,"name":"palcab-lowres-ctyslum-wall-03","tpage_name":"intpfall-vis-alpha"}],[121438225,{"idx":17,"name":"vehicle-metal-plate-01","tpage_name":"desbattl-pris"}],[108986425,{"idx":57,"name":"monk-strap","tpage_name":"wasleapr-pris"}],[94371884,{"idx":44,"name":"palace-break-glass04","tpage_name":"intpfall-vis-pris"}],[94371885,{"idx":45,"name":"palace-break-glass05","tpage_name":"intpfall-vis-pris"}],[94371892,{"idx":52,"name":"palace-break-pillwall06","tpage_name":"intpfall-vis-pris"}],[94371895,{"idx":55,"name":"palace-break-plainwall","tpage_name":"intpfall-vis-pris"}],[94371897,{"idx":57,"name":"palace-break-roof01","tpage_name":"intpfall-vis-pris"}],[94371918,{"idx":78,"name":"palace-break-wall08","tpage_name":"intpfall-vis-pris"}],[94371919,{"idx":79,"name":"palace-break-wall09","tpage_name":"intpfall-vis-pris"}],[94371920,{"idx":80,"name":"palace-break-walltile","tpage_name":"intpfall-vis-pris"}],[94371921,{"idx":81,"name":"palace-break-walltile-02","tpage_name":"intpfall-vis-pris"}],[120520709,{"idx":5,"name":"airlockl-door-metalframe","tpage_name":"forestx-vis-pris"}],[94371929,{"idx":89,"name":"tpal-beam01","tpage_name":"intpfall-vis-pris"}],[75759676,{"idx":60,"name":"onin-idol","tpage_name":"onintent-pris"}],[81985576,{"idx":40,"name":"wstlander-02-bootheel","tpage_name":"wasstadc-pris"}],[90701836,{"idx":12,"name":"des-pole-01","tpage_name":"desertf-vis-tfrag"}],[94437376,{"idx":0,"name":"windshield01","tpage_name":"intpfall-vis-water"}],[75759677,{"idx":61,"name":"onin-idoleye","tpage_name":"onintent-pris"}],[81985577,{"idx":41,"name":"wstlander-02-eye","tpage_name":"wasstadc-pris"}],[90701837,{"idx":13,"name":"des-corral-metal-03","tpage_name":"desertf-vis-tfrag"}],[94437377,{"idx":1,"name":"hidelight-lightfade","tpage_name":"intpfall-vis-water"}],[75759678,{"idx":62,"name":"onin-mat","tpage_name":"onintent-pris"}],[81985578,{"idx":42,"name":"wstlander-02-glove","tpage_name":"wasstadc-pris"}],[90701838,{"idx":14,"name":"des-corral-metal-04","tpage_name":"desertf-vis-tfrag"}],[94437378,{"idx":2,"name":"searchlight-envmap","tpage_name":"intpfall-vis-water"}],[97517568,{"idx":0,"name":"sig2-flatfangs","tpage_name":"lwassig-water"}],[91291668,{"idx":20,"name":"gun-building-roof","tpage_name":"gungame-vis-tfrag"}],[95027208,{"idx":8,"name":"sig-flask","tpage_name":"lsigjakc-pris2"}],[91291669,{"idx":21,"name":"gun-building-roof-tile-02","tpage_name":"gungame-vis-tfrag"}],[95027209,{"idx":9,"name":"sig-gem-01","tpage_name":"lsigjakc-pris2"}],[91291670,{"idx":22,"name":"gun-building-roof-tile-sides-02","tpage_name":"gungame-vis-tfrag"}],[95027210,{"idx":10,"name":"sig-glove","tpage_name":"lsigjakc-pris2"}],[91291671,{"idx":23,"name":"gun-building-wall-blue-01","tpage_name":"gungame-vis-tfrag"}],[95027211,{"idx":11,"name":"sig-glovetop","tpage_name":"lsigjakc-pris2"}],[91291672,{"idx":24,"name":"gun-building-wall-brown-01","tpage_name":"gungame-vis-tfrag"}],[95027212,{"idx":12,"name":"sig-gun-01","tpage_name":"lsigjakc-pris2"}],[91291674,{"idx":26,"name":"gun-building-wall-green-01","tpage_name":"gungame-vis-tfrag"}],[95027214,{"idx":14,"name":"sig-gun-03","tpage_name":"lsigjakc-pris2"}],[91291675,{"idx":27,"name":"gun-building-wall-purple-01","tpage_name":"gungame-vis-tfrag"}],[95027215,{"idx":15,"name":"sig-gun-04","tpage_name":"lsigjakc-pris2"}],[91291676,{"idx":28,"name":"gun-building-wall-red-01","tpage_name":"gungame-vis-tfrag"}],[95027216,{"idx":16,"name":"sig-gun-05","tpage_name":"lsigjakc-pris2"}],[91291677,{"idx":29,"name":"gun-building-wall-yellow-01","tpage_name":"gungame-vis-tfrag"}],[95027217,{"idx":17,"name":"sig-headgear","tpage_name":"lsigjakc-pris2"}],[91291681,{"idx":33,"name":"gun-dark-mag","tpage_name":"gungame-vis-tfrag"}],[95027221,{"idx":21,"name":"sig-metal-dirty","tpage_name":"lsigjakc-pris2"}],[91291682,{"idx":34,"name":"gun-darkgray","tpage_name":"gungame-vis-tfrag"}],[95027222,{"idx":22,"name":"sig-sac","tpage_name":"lsigjakc-pris2"}],[91291683,{"idx":35,"name":"gun-green-marble","tpage_name":"gungame-vis-tfrag"}],[95027223,{"idx":23,"name":"sig-shoebottom","tpage_name":"lsigjakc-pris2"}],[91291684,{"idx":36,"name":"gun-gun-barrel-01","tpage_name":"gungame-vis-tfrag"}],[95027224,{"idx":24,"name":"sig-shoetop","tpage_name":"lsigjakc-pris2"}],[91291685,{"idx":37,"name":"gun-gun-gray-01","tpage_name":"gungame-vis-tfrag"}],[95027225,{"idx":25,"name":"sig-shoulderarmor","tpage_name":"lsigjakc-pris2"}],[91291686,{"idx":38,"name":"gun-gun-gray-02","tpage_name":"gungame-vis-tfrag"}],[95027226,{"idx":26,"name":"sig-skirts","tpage_name":"lsigjakc-pris2"}],[91291689,{"idx":41,"name":"gun-guncase-rim-02","tpage_name":"gungame-vis-tfrag"}],[95027229,{"idx":29,"name":"sig-undergarments","tpage_name":"lsigjakc-pris2"}],[91291690,{"idx":42,"name":"gun-guncase-round-01","tpage_name":"gungame-vis-tfrag"}],[95027230,{"idx":30,"name":"vin-teeth-01","tpage_name":"lsigjakc-pris2"}],[71434316,{"idx":76,"name":"wstd-fight-plat-wall-03","tpage_name":"wasstadc-tfrag"}],[91357196,{"idx":12,"name":"klever-clips","tpage_name":"lkleever-pris"}],[95092736,{"idx":0,"name":"sig-flatfangs","tpage_name":"lsigjakc-water"}],[92209167,{"idx":15,"name":"klever-chest","tpage_name":"ldamklev-pris"}],[95944707,{"idx":3,"name":"torn-armlft","tpage_name":"freehq-pris2"}],[117506049,{"idx":1,"name":"freehq-monitor06","tpage_name":"freehq-shrub"}],[112525329,{"idx":17,"name":"daxterteeth","tpage_name":"desrescc-pris"}],[92209168,{"idx":16,"name":"klever-clips","tpage_name":"ldamklev-pris"}],[95944708,{"idx":4,"name":"torn-armor","tpage_name":"freehq-pris2"}],[117506050,{"idx":2,"name":"freehq-gray-metal-disc01","tpage_name":"freehq-shrub"}],[112525330,{"idx":18,"name":"daxtertuft","tpage_name":"desrescc-pris"}],[92209169,{"idx":17,"name":"klever-fingerbottom","tpage_name":"ldamklev-pris"}],[95944709,{"idx":5,"name":"torn-belt","tpage_name":"freehq-pris2"}],[117506051,{"idx":3,"name":"freehq-wal-plate03","tpage_name":"freehq-shrub"}],[112525331,{"idx":19,"name":"environment-oldmetal","tpage_name":"desrescc-pris"}],[92209171,{"idx":19,"name":"klever-gunmetal-01","tpage_name":"ldamklev-pris"}],[95944711,{"idx":7,"name":"torn-blademetal","tpage_name":"freehq-pris2"}],[92209172,{"idx":20,"name":"klever-gunmetal-02","tpage_name":"ldamklev-pris"}],[95944712,{"idx":8,"name":"torn-ear","tpage_name":"freehq-pris2"}],[92209173,{"idx":21,"name":"klever-gunmetal-03","tpage_name":"ldamklev-pris"}],[95944713,{"idx":9,"name":"torn-eye","tpage_name":"freehq-pris2"}],[92209174,{"idx":22,"name":"klever-gunmetal-04","tpage_name":"ldamklev-pris"}],[95944714,{"idx":10,"name":"torn-eyelid","tpage_name":"freehq-pris2"}],[92209175,{"idx":23,"name":"klever-gunmetal-05","tpage_name":"ldamklev-pris"}],[95944715,{"idx":11,"name":"torn-face","tpage_name":"freehq-pris2"}],[94961668,{"idx":4,"name":"jakc-chestplate-straps","tpage_name":"lsigjakc-pris"}],[89980948,{"idx":20,"name":"des-mount-02","tpage_name":"desertg-vis-tfrag"}],[96206848,{"idx":0,"name":"bam-eyelight","tpage_name":"wasseem-pris2"}],[94961669,{"idx":5,"name":"jakc-gogglemetal","tpage_name":"lsigjakc-pris"}],[89980949,{"idx":21,"name":"des-cave-wall-01","tpage_name":"desertg-vis-tfrag"}],[96206849,{"idx":1,"name":"environment-oldmetal","tpage_name":"wasseem-pris2"}],[94961670,{"idx":6,"name":"jakc-lens","tpage_name":"lsigjakc-pris"}],[96206850,{"idx":2,"name":"seem-arm","tpage_name":"wasseem-pris2"}],[94961671,{"idx":7,"name":"jakc-scarf","tpage_name":"lsigjakc-pris"}],[96206851,{"idx":3,"name":"seem-bootbottom","tpage_name":"wasseem-pris2"}],[94961672,{"idx":8,"name":"jakc-waistband2","tpage_name":"lsigjakc-pris"}],[96206852,{"idx":4,"name":"seem-bootleg","tpage_name":"wasseem-pris2"}],[94961673,{"idx":9,"name":"jakc-wraps","tpage_name":"lsigjakc-pris"}],[89980953,{"idx":25,"name":"des-pole-01","tpage_name":"desertg-vis-tfrag"}],[96206853,{"idx":5,"name":"seem-bootlower","tpage_name":"wasseem-pris2"}],[94961674,{"idx":10,"name":"jakc-wristband-a2","tpage_name":"lsigjakc-pris"}],[89980954,{"idx":26,"name":"des-cave-rock","tpage_name":"desertg-vis-tfrag"}],[96206854,{"idx":6,"name":"seem-bootmet","tpage_name":"wasseem-pris2"}],[94961675,{"idx":11,"name":"jakchires-arm","tpage_name":"lsigjakc-pris"}],[89980955,{"idx":27,"name":"des-bridge-brace-01","tpage_name":"desertg-vis-tfrag"}],[96206855,{"idx":7,"name":"seem-boottoe","tpage_name":"wasseem-pris2"}],[94961676,{"idx":12,"name":"jakchires-blackstrap","tpage_name":"lsigjakc-pris"}],[89980956,{"idx":28,"name":"des-bridge-plank","tpage_name":"desertg-vis-tfrag"}],[96206856,{"idx":8,"name":"seem-ear","tpage_name":"wasseem-pris2"}],[94961677,{"idx":13,"name":"jakchires-brownstrap","tpage_name":"lsigjakc-pris"}],[89980957,{"idx":29,"name":"des-cliff-trans-01","tpage_name":"desertg-vis-tfrag"}],[96206857,{"idx":9,"name":"seem-eye","tpage_name":"wasseem-pris2"}],[94961678,{"idx":14,"name":"jakchires-brwnleather","tpage_name":"lsigjakc-pris"}],[89980958,{"idx":30,"name":"des-cliff-top-03","tpage_name":"desertg-vis-tfrag"}],[96206858,{"idx":10,"name":"seem-eyelid","tpage_name":"wasseem-pris2"}],[94961679,{"idx":15,"name":"jakchires-chestplate","tpage_name":"lsigjakc-pris"}],[89980959,{"idx":31,"name":"des-cliff-01","tpage_name":"desertg-vis-tfrag"}],[96206859,{"idx":11,"name":"seem-face","tpage_name":"wasseem-pris2"}],[94961680,{"idx":16,"name":"jakchires-clips","tpage_name":"lsigjakc-pris"}],[89980960,{"idx":32,"name":"des-cliff-top-01","tpage_name":"desertg-vis-tfrag"}],[96206860,{"idx":12,"name":"seem-finger","tpage_name":"wasseem-pris2"}],[89980961,{"idx":33,"name":"des-cliff-top-02","tpage_name":"desertg-vis-tfrag"}],[94961681,{"idx":17,"name":"jakchires-eye","tpage_name":"lsigjakc-pris"}],[96206861,{"idx":13,"name":"seem-hand","tpage_name":"wasseem-pris2"}],[94961682,{"idx":18,"name":"jakchires-eyebrow","tpage_name":"lsigjakc-pris"}],[96206862,{"idx":14,"name":"seem-pipeend","tpage_name":"wasseem-pris2"}],[94961684,{"idx":20,"name":"jakchires-facelft","tpage_name":"lsigjakc-pris"}],[96206864,{"idx":16,"name":"seem-precmetal-chestplate-01","tpage_name":"wasseem-pris2"}],[89980965,{"idx":37,"name":"des-cliff-top-05","tpage_name":"desertg-vis-tfrag"}],[94961685,{"idx":21,"name":"jakchires-facert","tpage_name":"lsigjakc-pris"}],[96206865,{"idx":17,"name":"seem-precmetal-edge","tpage_name":"wasseem-pris2"}],[94961686,{"idx":22,"name":"jakchires-glovetop","tpage_name":"lsigjakc-pris"}],[89980966,{"idx":38,"name":"des-mount-bottom-01","tpage_name":"desertg-vis-tfrag"}],[96206866,{"idx":18,"name":"seem-precmetal-plain","tpage_name":"wasseem-pris2"}],[89980967,{"idx":39,"name":"des-ruins-bottom-01","tpage_name":"desertg-vis-tfrag"}],[94961687,{"idx":23,"name":"jakchires-hair","tpage_name":"lsigjakc-pris"}],[96206867,{"idx":19,"name":"seem-straps","tpage_name":"wasseem-pris2"}],[89980968,{"idx":40,"name":"des-ruins-top-01","tpage_name":"desertg-vis-tfrag"}],[94961688,{"idx":24,"name":"jakchires-horn","tpage_name":"lsigjakc-pris"}],[96206868,{"idx":20,"name":"seem-uppertorso","tpage_name":"wasseem-pris2"}],[89980969,{"idx":41,"name":"des-ruins-bottom-02","tpage_name":"desertg-vis-tfrag"}],[94961689,{"idx":25,"name":"jakchires-jacket","tpage_name":"lsigjakc-pris"}],[96206869,{"idx":21,"name":"seem-headgearback","tpage_name":"wasseem-pris2"}],[94961690,{"idx":26,"name":"jakchires-leatherpouch","tpage_name":"lsigjakc-pris"}],[89980970,{"idx":42,"name":"des-ruins-top-02","tpage_name":"desertg-vis-tfrag"}],[96206870,{"idx":22,"name":"seem-headpiecetop","tpage_name":"wasseem-pris2"}],[94961691,{"idx":27,"name":"jakchires-lightbrownspat","tpage_name":"lsigjakc-pris"}],[89980971,{"idx":43,"name":"des-ruins-roof-01","tpage_name":"desertg-vis-tfrag"}],[96206871,{"idx":23,"name":"seem-pipes-02","tpage_name":"wasseem-pris2"}],[94961692,{"idx":28,"name":"jakchires-pants","tpage_name":"lsigjakc-pris"}],[89980972,{"idx":44,"name":"des-ruins-top-03","tpage_name":"desertg-vis-tfrag"}],[96206872,{"idx":24,"name":"seem-teeth","tpage_name":"wasseem-pris2"}],[94961694,{"idx":30,"name":"jakchires-shoebottom","tpage_name":"lsigjakc-pris"}],[89980974,{"idx":46,"name":"des-egg-bulbtop-02","tpage_name":"desertg-vis-tfrag"}],[96206874,{"idx":26,"name":"seem-skirt","tpage_name":"wasseem-pris2"}],[89980975,{"idx":47,"name":"des-egg-bulb-01","tpage_name":"desertg-vis-tfrag"}],[94961695,{"idx":31,"name":"jakchires-shoemetal","tpage_name":"lsigjakc-pris"}],[96206875,{"idx":27,"name":"seem-skirt-small","tpage_name":"wasseem-pris2"}],[75759684,{"idx":68,"name":"onin-skirt","tpage_name":"onintent-pris"}],[81985584,{"idx":48,"name":"wstlander-03-eye","tpage_name":"wasstadc-pris"}],[90701844,{"idx":20,"name":"des-temple-stone-01","tpage_name":"desertf-vis-tfrag"}],[96927744,{"idx":0,"name":"bam-eyelight","tpage_name":"ltornjnx-pris2"}],[75759685,{"idx":69,"name":"onin-teeth","tpage_name":"onintent-pris"}],[81985585,{"idx":49,"name":"wstlander-03-flesh","tpage_name":"wasstadc-pris"}],[96927745,{"idx":1,"name":"bam-hairhilite","tpage_name":"ltornjnx-pris2"}],[75759686,{"idx":70,"name":"onin-toe","tpage_name":"onintent-pris"}],[81985586,{"idx":50,"name":"wstlander-04-dark-blue","tpage_name":"wasstadc-pris"}],[90701846,{"idx":22,"name":"des-ruins-top-01","tpage_name":"desertf-vis-tfrag"}],[96927746,{"idx":2,"name":"charHOLD","tpage_name":"ltornjnx-pris2"}],[75759689,{"idx":73,"name":"pecker-face","tpage_name":"onintent-pris"}],[81985589,{"idx":53,"name":"wstlander-04-shirt","tpage_name":"wasstadc-pris"}],[90701849,{"idx":25,"name":"des-ruins-top-03","tpage_name":"desertf-vis-tfrag"}],[96927749,{"idx":5,"name":"torn-belt","tpage_name":"ltornjnx-pris2"}],[38731966,{"idx":190,"name":"male1_04","tpage_name":"wasstada-sprite"}],[91029526,{"idx":22,"name":"kg-targ-bit-02","tpage_name":"gungame-sprite"}],[97255426,{"idx":2,"name":"wstd-gate-pass-01","tpage_name":"arenacst-tfrag"}],[154796048,{"idx":16,"name":"daxternose","tpage_name":"ljakndax-pris"}],[151060508,{"idx":28,"name":"fac-switch-rim-02","tpage_name":"factoryc-vis-pris"}],[144834608,{"idx":48,"name":"rail-base-dark-01","tpage_name":"combn-tfrag"}],[106234028,{"idx":172,"name":"roboboss-shinyorange-02","tpage_name":"mined-pris"}],[38731967,{"idx":191,"name":"male1_05","tpage_name":"wasstada-sprite"}],[91029527,{"idx":23,"name":"kg-targ-bit-03","tpage_name":"gungame-sprite"}],[97255427,{"idx":3,"name":"wstd-gate-pass-04","tpage_name":"arenacst-tfrag"}],[154796049,{"idx":17,"name":"daxterteeth","tpage_name":"ljakndax-pris"}],[151060509,{"idx":29,"name":"fac-switch-shaft","tpage_name":"factoryc-vis-pris"}],[144834609,{"idx":49,"name":"rail-light-blue-small","tpage_name":"combn-tfrag"}],[106234029,{"idx":173,"name":"roboboss-shinyorange-03","tpage_name":"mined-pris"}],[73728080,{"idx":80,"name":"sewer-metal-floor-02-hitweak","tpage_name":"sewh-vis-tfrag"}],[98631680,{"idx":0,"name":"ctyslumc-water","tpage_name":"ctyslumc-vis-water"}],[108986402,{"idx":34,"name":"monk-femaleskirt-top","tpage_name":"wasleapr-pris"}],[115212302,{"idx":14,"name":"cty-grunt-skin-03","tpage_name":"ctypesb-pris"}],[98631681,{"idx":1,"name":"ctyslumc-water-dest","tpage_name":"ctyslumc-vis-water"}],[98631682,{"idx":2,"name":"ctyslumc-fountain-fall","tpage_name":"ctyslumc-vis-water"}],[98631683,{"idx":3,"name":"ctyslumc-fountain-fall-dest","tpage_name":"ctyslumc-vis-water"}],[75759692,{"idx":76,"name":"pecker-teeth","tpage_name":"onintent-pris"}],[81985592,{"idx":56,"name":"marauder-metal-mask","tpage_name":"wasstadc-pris"}],[90701852,{"idx":28,"name":"des-ruins-bottom-01","tpage_name":"desertf-vis-tfrag"}],[96927752,{"idx":8,"name":"torn-ear","tpage_name":"ltornjnx-pris2"}],[99418112,{"idx":0,"name":"bam-eyelight","tpage_name":"volcanox-pris"}],[75759693,{"idx":77,"name":"pecker-wingbottom","tpage_name":"onintent-pris"}],[90701853,{"idx":29,"name":"des-ruins-top-02","tpage_name":"desertf-vis-tfrag"}],[96927753,{"idx":9,"name":"torn-eye","tpage_name":"ltornjnx-pris2"}],[99418113,{"idx":1,"name":"bam-hairhilite","tpage_name":"volcanox-pris"}],[75759694,{"idx":78,"name":"pecker-wingtop","tpage_name":"onintent-pris"}],[90701854,{"idx":30,"name":"des-wasmetal20","tpage_name":"desertf-vis-tfrag"}],[96927754,{"idx":10,"name":"torn-eyelid","tpage_name":"ltornjnx-pris2"}],[99418114,{"idx":2,"name":"daxter-eyelid","tpage_name":"volcanox-pris"}],[75759695,{"idx":79,"name":"pecker-yellowfur","tpage_name":"onintent-pris"}],[90701855,{"idx":31,"name":"des-wasmetal01","tpage_name":"desertf-vis-tfrag"}],[96927755,{"idx":11,"name":"torn-face","tpage_name":"ltornjnx-pris2"}],[99418115,{"idx":3,"name":"daxter-furhilite","tpage_name":"volcanox-pris"}],[100663301,{"idx":5,"name":"jak-gogglemetal","tpage_name":"ljaksig-pris"}],[96927761,{"idx":17,"name":"torn-hair-01","tpage_name":"ltornjnx-pris2"}],[75759701,{"idx":85,"name":"jakc-lens","tpage_name":"onintent-pris"}],[90701861,{"idx":37,"name":"des-corral-bar-01","tpage_name":"desertf-vis-tfrag"}],[99418121,{"idx":9,"name":"daxterfinger","tpage_name":"volcanox-pris"}],[100663303,{"idx":7,"name":"jakb-armor","tpage_name":"ljaksig-pris"}],[101908483,{"idx":3,"name":"hud-target-reticle","tpage_name":"lformach-minimap"}],[75759703,{"idx":87,"name":"jakc-waistband2","tpage_name":"onintent-pris"}],[96927763,{"idx":19,"name":"torn-handle-01","tpage_name":"ltornjnx-pris2"}],[99418123,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"volcanox-pris"}],[100663304,{"idx":8,"name":"jakb-blackstrap","tpage_name":"ljaksig-pris"}],[101908484,{"idx":4,"name":"dm-turret-hud-arrow-01","tpage_name":"lformach-minimap"}],[75759704,{"idx":88,"name":"jakc-wraps","tpage_name":"onintent-pris"}],[90701864,{"idx":40,"name":"des-rock-01","tpage_name":"desertf-vis-tfrag"}],[96927764,{"idx":20,"name":"torn-legshield","tpage_name":"ltornjnx-pris2"}],[99418124,{"idx":12,"name":"daxtergoggles","tpage_name":"volcanox-pris"}],[100663305,{"idx":9,"name":"jakb-brownleather","tpage_name":"ljaksig-pris"}],[101908485,{"idx":5,"name":"dm-turret-hud-gun-arrow-01","tpage_name":"lformach-minimap"}],[75759705,{"idx":89,"name":"jakc-wristband-a2","tpage_name":"onintent-pris"}],[90701865,{"idx":41,"name":"des-corral-plate-01","tpage_name":"desertf-vis-tfrag"}],[96927765,{"idx":21,"name":"torn-metal2","tpage_name":"ltornjnx-pris2"}],[99418125,{"idx":13,"name":"daxterheadwidenew","tpage_name":"volcanox-pris"}],[100663306,{"idx":10,"name":"jakb-clips","tpage_name":"ljaksig-pris"}],[101908486,{"idx":6,"name":"dm-turret-hud-health-02","tpage_name":"lformach-minimap"}],[75759706,{"idx":90,"name":"jakchires-arm","tpage_name":"onintent-pris"}],[90701866,{"idx":42,"name":"des-totem-stone-trim","tpage_name":"desertf-vis-tfrag"}],[96927766,{"idx":22,"name":"torn-mouth","tpage_name":"ltornjnx-pris2"}],[99418126,{"idx":14,"name":"daxterhelmetplain","tpage_name":"volcanox-pris"}],[100663307,{"idx":11,"name":"jakb-eye","tpage_name":"ljaksig-pris"}],[101908487,{"idx":7,"name":"dm-turret-hud-health-03","tpage_name":"lformach-minimap"}],[96927767,{"idx":23,"name":"torn-pipe","tpage_name":"ltornjnx-pris2"}],[75759707,{"idx":91,"name":"jakchires-blackstrap","tpage_name":"onintent-pris"}],[99418127,{"idx":15,"name":"daxterlense","tpage_name":"volcanox-pris"}],[100663308,{"idx":12,"name":"jakb-eyebrow","tpage_name":"ljaksig-pris"}],[101908488,{"idx":8,"name":"dm-turret-hud-heat-ring-01","tpage_name":"lformach-minimap"}],[96927768,{"idx":24,"name":"torn-scarf","tpage_name":"ltornjnx-pris2"}],[75759708,{"idx":92,"name":"jakchires-brownstrap","tpage_name":"onintent-pris"}],[90701868,{"idx":44,"name":"des-corral-plate-03","tpage_name":"desertf-vis-tfrag"}],[99418128,{"idx":16,"name":"daxternose","tpage_name":"volcanox-pris"}],[100663310,{"idx":14,"name":"jakb-facelft","tpage_name":"ljaksig-pris"}],[101908490,{"idx":10,"name":"dm-turret-hud-heat-ring-04","tpage_name":"lformach-minimap"}],[96927770,{"idx":26,"name":"torn-shoe-02","tpage_name":"ltornjnx-pris2"}],[75759710,{"idx":94,"name":"jakchires-chestplate","tpage_name":"onintent-pris"}],[90701870,{"idx":46,"name":"des-marauder-bridge-floor","tpage_name":"desertf-vis-tfrag"}],[99418130,{"idx":18,"name":"daxtertuft","tpage_name":"volcanox-pris"}],[100663311,{"idx":15,"name":"jakb-facert","tpage_name":"ljaksig-pris"}],[101908491,{"idx":11,"name":"dm-turret-hud-health-01","tpage_name":"lformach-minimap"}],[96927771,{"idx":27,"name":"torn-teeth-01","tpage_name":"ltornjnx-pris2"}],[75759711,{"idx":95,"name":"jakchires-clips","tpage_name":"onintent-pris"}],[90701871,{"idx":47,"name":"des-ruins-wall-01","tpage_name":"desertf-vis-tfrag"}],[99418131,{"idx":19,"name":"environment-oldmetal","tpage_name":"volcanox-pris"}],[100663312,{"idx":16,"name":"jakb-glovetop","tpage_name":"ljaksig-pris"}],[101908492,{"idx":12,"name":"dm-turret-hud-health-04","tpage_name":"lformach-minimap"}],[105644032,{"idx":0,"name":"hud-caveboss-01","tpage_name":"mined-minimap"}],[75759712,{"idx":96,"name":"jakchires-eye","tpage_name":"onintent-pris"}],[90701872,{"idx":48,"name":"des-corral-metal-02","tpage_name":"desertf-vis-tfrag"}],[96927772,{"idx":28,"name":"torn-vest","tpage_name":"ltornjnx-pris2"}],[99418132,{"idx":20,"name":"jakc-armor","tpage_name":"volcanox-pris"}],[100663313,{"idx":17,"name":"jakb-hairtrans","tpage_name":"ljaksig-pris"}],[101908493,{"idx":13,"name":"dm-turret-hud-heat-ring-02","tpage_name":"lformach-minimap"}],[105644033,{"idx":1,"name":"hud-caveboss-health-01","tpage_name":"mined-minimap"}],[75759713,{"idx":97,"name":"jakchires-eyebrow","tpage_name":"onintent-pris"}],[90701873,{"idx":49,"name":"des-marauder-bridge-wood-cap","tpage_name":"desertf-vis-tfrag"}],[96927773,{"idx":29,"name":"environment-oldmetal","tpage_name":"ltornjnx-pris2"}],[99418133,{"idx":21,"name":"jakc-chestplate-straps","tpage_name":"volcanox-pris"}],[100663314,{"idx":18,"name":"jakb-horn","tpage_name":"ljaksig-pris"}],[105644034,{"idx":2,"name":"hud-small-frame-01","tpage_name":"mined-minimap"}],[75759714,{"idx":98,"name":"jakchires-eyelid","tpage_name":"onintent-pris"}],[90701874,{"idx":50,"name":"des-cliff-trans-01","tpage_name":"desertf-vis-tfrag"}],[96927774,{"idx":30,"name":"jinx-arm","tpage_name":"ltornjnx-pris2"}],[99418134,{"idx":22,"name":"jakc-gogglemetal","tpage_name":"volcanox-pris"}],[100663316,{"idx":20,"name":"jakb-jacketsleeve","tpage_name":"ljaksig-pris"}],[96927776,{"idx":32,"name":"jinx-blademetal","tpage_name":"ltornjnx-pris2"}],[75759716,{"idx":100,"name":"jakchires-facert","tpage_name":"onintent-pris"}],[90701876,{"idx":52,"name":"des-corral-bar-03","tpage_name":"desertf-vis-tfrag"}],[99418136,{"idx":24,"name":"jakc-scarf","tpage_name":"volcanox-pris"}],[100663317,{"idx":21,"name":"jakb-leatherpouch","tpage_name":"ljaksig-pris"}],[96927777,{"idx":33,"name":"jinx-boottoe","tpage_name":"ltornjnx-pris2"}],[75759717,{"idx":101,"name":"jakchires-glovetop","tpage_name":"onintent-pris"}],[99418137,{"idx":25,"name":"jakc-waistband2","tpage_name":"volcanox-pris"}],[100663319,{"idx":23,"name":"jakb-lightbrownspat","tpage_name":"ljaksig-pris"}],[96927779,{"idx":35,"name":"jinx-brownstrap","tpage_name":"ltornjnx-pris2"}],[75759719,{"idx":103,"name":"jakchires-horn","tpage_name":"onintent-pris"}],[99418139,{"idx":27,"name":"jakc-wristband-a2","tpage_name":"volcanox-pris"}],[100663320,{"idx":24,"name":"jakb-lightbrownstrap","tpage_name":"ljaksig-pris"}],[96927780,{"idx":36,"name":"jinx-brownstrapbolts","tpage_name":"ltornjnx-pris2"}],[75759720,{"idx":104,"name":"jakchires-jacket","tpage_name":"onintent-pris"}],[99418140,{"idx":28,"name":"jakchires-arm","tpage_name":"volcanox-pris"}],[100663321,{"idx":25,"name":"jakb-pants","tpage_name":"ljaksig-pris"}],[75759721,{"idx":105,"name":"jakchires-leatherpouch","tpage_name":"onintent-pris"}],[96927781,{"idx":37,"name":"jinx-buckles","tpage_name":"ltornjnx-pris2"}],[99418141,{"idx":29,"name":"jakchires-blackstrap","tpage_name":"volcanox-pris"}],[100663322,{"idx":26,"name":"jakb-scarf","tpage_name":"ljaksig-pris"}],[75759722,{"idx":106,"name":"jakchires-lightbrownspat","tpage_name":"onintent-pris"}],[96927782,{"idx":38,"name":"jinx-cigar","tpage_name":"ltornjnx-pris2"}],[99418142,{"idx":30,"name":"jakchires-brownstrap","tpage_name":"volcanox-pris"}],[100663323,{"idx":27,"name":"jakb-shoebottom","tpage_name":"ljaksig-pris"}],[96927783,{"idx":39,"name":"jinx-cigarflame","tpage_name":"ltornjnx-pris2"}],[75759723,{"idx":107,"name":"jakchires-pants","tpage_name":"onintent-pris"}],[99418143,{"idx":31,"name":"jakchires-brwnleather","tpage_name":"volcanox-pris"}],[75759726,{"idx":110,"name":"jakchires-shoemetal","tpage_name":"onintent-pris"}],[96927786,{"idx":42,"name":"jinx-finger","tpage_name":"ltornjnx-pris2"}],[99418146,{"idx":34,"name":"jakchires-eye","tpage_name":"volcanox-pris"}],[96927787,{"idx":43,"name":"jinx-glove","tpage_name":"ltornjnx-pris2"}],[75759727,{"idx":111,"name":"jakchires-shoeteop","tpage_name":"onintent-pris"}],[99418147,{"idx":35,"name":"jakchires-eyebrow","tpage_name":"volcanox-pris"}],[96927788,{"idx":44,"name":"jinx-glovepalm","tpage_name":"ltornjnx-pris2"}],[75759728,{"idx":112,"name":"jakchires-teeth","tpage_name":"onintent-pris"}],[99418148,{"idx":36,"name":"jakchires-eyelid","tpage_name":"volcanox-pris"}],[75759729,{"idx":113,"name":"jakc-skirt","tpage_name":"onintent-pris"}],[96927789,{"idx":45,"name":"jinx-hair","tpage_name":"ltornjnx-pris2"}],[99418149,{"idx":37,"name":"jakchires-facelft","tpage_name":"volcanox-pris"}],[75759730,{"idx":114,"name":"jakc-scarfhanging","tpage_name":"onintent-pris"}],[96927790,{"idx":46,"name":"jinx-hairtye","tpage_name":"ltornjnx-pris2"}],[99418150,{"idx":38,"name":"jakchires-facert","tpage_name":"volcanox-pris"}],[96927791,{"idx":47,"name":"jinx-handle","tpage_name":"ltornjnx-pris2"}],[99418151,{"idx":39,"name":"jakchires-glovetop","tpage_name":"volcanox-pris"}],[111869952,{"idx":0,"name":"stadiumb-hud-booster-off-01","tpage_name":"wasleapr-minimap"}],[96927792,{"idx":48,"name":"jinx-iris","tpage_name":"ltornjnx-pris2"}],[99418152,{"idx":40,"name":"jakchires-hair","tpage_name":"volcanox-pris"}],[111869953,{"idx":1,"name":"stadiumb-hud-booster-on-01","tpage_name":"wasleapr-minimap"}],[96927793,{"idx":49,"name":"jinx-kneepad","tpage_name":"ltornjnx-pris2"}],[99418153,{"idx":41,"name":"jakchires-horn","tpage_name":"volcanox-pris"}],[96927797,{"idx":53,"name":"jinx-shirt","tpage_name":"ltornjnx-pris2"}],[111869957,{"idx":5,"name":"stadiumb-hud-nmbr-01","tpage_name":"wasleapr-minimap"}],[99418157,{"idx":45,"name":"jakchires-pants","tpage_name":"volcanox-pris"}],[111869958,{"idx":6,"name":"stadiumb-hud-nmbr-02","tpage_name":"wasleapr-minimap"}],[96927798,{"idx":54,"name":"jinx-shoebottom2","tpage_name":"ltornjnx-pris2"}],[99418158,{"idx":46,"name":"jakchires-precarmor-01","tpage_name":"volcanox-pris"}],[96927799,{"idx":55,"name":"jinx-singlerope","tpage_name":"ltornjnx-pris2"}],[111869959,{"idx":7,"name":"stadiumb-hud-nmbr-03","tpage_name":"wasleapr-minimap"}],[99418159,{"idx":47,"name":"jakchires-shoebottom","tpage_name":"volcanox-pris"}],[96927800,{"idx":56,"name":"jinx-teeth","tpage_name":"ltornjnx-pris2"}],[111869960,{"idx":8,"name":"stadiumb-hud-nmbr-04","tpage_name":"wasleapr-minimap"}],[99418160,{"idx":48,"name":"jakchires-shoemetal","tpage_name":"volcanox-pris"}],[96927801,{"idx":57,"name":"jinx-wraps","tpage_name":"ltornjnx-pris2"}],[111869961,{"idx":9,"name":"stadiumb-hud-nmbr-05","tpage_name":"wasleapr-minimap"}],[99418161,{"idx":49,"name":"jakchires-shoeteop","tpage_name":"volcanox-pris"}],[111869962,{"idx":10,"name":"stadiumb-hud-nmbr-06","tpage_name":"wasleapr-minimap"}],[99418162,{"idx":50,"name":"jakchires-teeth","tpage_name":"volcanox-pris"}],[111869963,{"idx":11,"name":"stadiumb-hud-nmbr-07","tpage_name":"wasleapr-minimap"}],[99418163,{"idx":51,"name":"jakc-skirt","tpage_name":"volcanox-pris"}],[111869964,{"idx":12,"name":"stadiumb-hud-nmbr-08","tpage_name":"wasleapr-minimap"}],[99418164,{"idx":52,"name":"jakc-scarfhanging","tpage_name":"volcanox-pris"}],[111869971,{"idx":19,"name":"stadiumb-hud-ord-st","tpage_name":"wasleapr-minimap"}],[99418171,{"idx":59,"name":"tpl-glider-precursor01","tpage_name":"volcanox-pris"}],[111869972,{"idx":20,"name":"stadiumb-hud-ord-th","tpage_name":"wasleapr-minimap"}],[99418172,{"idx":60,"name":"tpl-glider-wood03","tpage_name":"volcanox-pris"}],[111869973,{"idx":21,"name":"stadiumb-hud-time-01","tpage_name":"wasleapr-minimap"}],[99418173,{"idx":61,"name":"tpl-rut01","tpage_name":"volcanox-pris"}],[111869974,{"idx":22,"name":"stadiumb-hud-time-02","tpage_name":"wasleapr-minimap"}],[99418174,{"idx":62,"name":"tpl-wing01","tpage_name":"volcanox-pris"}],[99418175,{"idx":63,"name":"tpl-wing03","tpage_name":"volcanox-pris"}],[99418190,{"idx":78,"name":"dk-maker-idol-collar-01","tpage_name":"volcanox-pris"}],[99418191,{"idx":79,"name":"dk-maker-idol-collar-02","tpage_name":"volcanox-pris"}],[99418192,{"idx":80,"name":"dk-maker-idol-eye-01","tpage_name":"volcanox-pris"}],[99418193,{"idx":81,"name":"dk-maker-idol-eye-dk-01","tpage_name":"volcanox-pris"}],[99418194,{"idx":82,"name":"dk-maker-idol-globes-01","tpage_name":"volcanox-pris"}],[99418195,{"idx":83,"name":"dk-maker-idol-globes-dk-01","tpage_name":"volcanox-pris"}],[99418196,{"idx":84,"name":"dk-maker-idol-head-01","tpage_name":"volcanox-pris"}],[99418197,{"idx":85,"name":"dk-maker-idol-metal-01","tpage_name":"volcanox-pris"}],[99418198,{"idx":86,"name":"dk-maker-idol-tubes-01","tpage_name":"volcanox-pris"}],[126812160,{"idx":0,"name":"holograph-env-noise","tpage_name":"deshover-warp"}],[99418200,{"idx":88,"name":"dm-spines-dk-hose-01","tpage_name":"volcanox-pris"}],[126812161,{"idx":1,"name":"holograph-env-rim","tpage_name":"deshover-warp"}],[99418201,{"idx":89,"name":"dm-spines-dk-plate-01","tpage_name":"volcanox-pris"}],[126812162,{"idx":2,"name":"holograph-env-scan","tpage_name":"deshover-warp"}],[99418202,{"idx":90,"name":"dm-spines-dk-ribs-01","tpage_name":"volcanox-pris"}],[99418203,{"idx":91,"name":"environment-darkprec","tpage_name":"volcanox-pris"}],[134283264,{"idx":0,"name":"gun-main","tpage_name":"ltnjxhip-pris"}],[129302544,{"idx":16,"name":"sewer-pipe-rim-07","tpage_name":"sewn-vis-pris"}],[99418224,{"idx":112,"name":"grunt-skin-01","tpage_name":"volcanox-pris"}],[134283265,{"idx":1,"name":"environment-oldmetal","tpage_name":"ltnjxhip-pris"}],[129302545,{"idx":17,"name":"sewer-plate-04","tpage_name":"sewn-vis-pris"}],[99418225,{"idx":113,"name":"grunt-skin-02","tpage_name":"volcanox-pris"}],[134283266,{"idx":2,"name":"sig2-gem-01","tpage_name":"ltnjxhip-pris"}],[129302546,{"idx":18,"name":"sewer-plate-05","tpage_name":"sewn-vis-pris"}],[99418226,{"idx":114,"name":"grunt-skin-03","tpage_name":"volcanox-pris"}],[134283267,{"idx":3,"name":"sig2-gun-01","tpage_name":"ltnjxhip-pris"}],[129302547,{"idx":19,"name":"sewer-screw-02","tpage_name":"sewn-vis-pris"}],[99418227,{"idx":115,"name":"monk-mummy-face","tpage_name":"volcanox-pris"}],[99549184,{"idx":0,"name":"for-egg-membrane-01","tpage_name":"lformach-vis-water"}],[95879180,{"idx":12,"name":"torn-face-right","tpage_name":"ltorn-pris2"}],[99614720,{"idx":0,"name":"mhbat-eye-01","tpage_name":"lnstoba-vis-pris"}],[95879181,{"idx":13,"name":"torn-finger","tpage_name":"ltorn-pris2"}],[99614721,{"idx":1,"name":"mhbat-hose","tpage_name":"lnstoba-vis-pris"}],[95879182,{"idx":14,"name":"torn-footleather","tpage_name":"ltorn-pris2"}],[99614722,{"idx":2,"name":"mhbat-metal-01","tpage_name":"lnstoba-vis-pris"}],[95879183,{"idx":15,"name":"torn-gunbarrel","tpage_name":"ltorn-pris2"}],[99614723,{"idx":3,"name":"mhbat-skin-01","tpage_name":"lnstoba-vis-pris"}],[95879187,{"idx":19,"name":"torn-handle-01","tpage_name":"ltorn-pris2"}],[99614727,{"idx":7,"name":"nsta-wall","tpage_name":"lnstoba-vis-pris"}],[95879188,{"idx":20,"name":"torn-legshield","tpage_name":"ltorn-pris2"}],[99614728,{"idx":8,"name":"nestb-basekor","tpage_name":"lnstoba-vis-pris"}],[95879189,{"idx":21,"name":"torn-metal2","tpage_name":"ltorn-pris2"}],[99614729,{"idx":9,"name":"nestb-eggskin","tpage_name":"lnstoba-vis-pris"}],[95879190,{"idx":22,"name":"torn-mouth","tpage_name":"ltorn-pris2"}],[99614730,{"idx":10,"name":"nestb-membrane","tpage_name":"lnstoba-vis-pris"}],[95879191,{"idx":23,"name":"torn-pipe","tpage_name":"ltorn-pris2"}],[99614731,{"idx":11,"name":"nsta-finger-pipe","tpage_name":"lnstoba-vis-pris"}],[95879192,{"idx":24,"name":"torn-scarf","tpage_name":"ltorn-pris2"}],[99614732,{"idx":12,"name":"nst-egg-bottom","tpage_name":"lnstoba-vis-pris"}],[95879193,{"idx":25,"name":"torn-shoe","tpage_name":"ltorn-pris2"}],[99614733,{"idx":13,"name":"nst-egg-bulb-01","tpage_name":"lnstoba-vis-pris"}],[95879194,{"idx":26,"name":"torn-shoe-02","tpage_name":"ltorn-pris2"}],[99614734,{"idx":14,"name":"nst-egg-bulbtop-01","tpage_name":"lnstoba-vis-pris"}],[95879195,{"idx":27,"name":"torn-teeth-01","tpage_name":"ltorn-pris2"}],[99614735,{"idx":15,"name":"nst-egg-gem-01","tpage_name":"lnstoba-vis-pris"}],[95879196,{"idx":28,"name":"torn-vest","tpage_name":"ltorn-pris2"}],[99614736,{"idx":16,"name":"nst-egg-rim-01","tpage_name":"lnstoba-vis-pris"}],[99614737,{"idx":17,"name":"nst-egg-bulbtop-02","tpage_name":"lnstoba-vis-pris"}],[99614738,{"idx":18,"name":"nst-hose","tpage_name":"lnstoba-vis-pris"}],[95944716,{"idx":12,"name":"torn-face-right","tpage_name":"freehq-pris2"}],[92209176,{"idx":24,"name":"klever-hand","tpage_name":"ldamklev-pris"}],[99680256,{"idx":0,"name":"nest-pups","tpage_name":"lnstoba-vis-alpha"}],[98500612,{"idx":4,"name":"wang_2","tpage_name":"hanga-hfrag"}],[38731972,{"idx":196,"name":"male1_10","tpage_name":"wasstada-sprite"}],[92274712,{"idx":24,"name":"intcept-b-pipe01","tpage_name":"desrace2-pris"}],[99745792,{"idx":0,"name":"nest-pups","tpage_name":"lnstoba-vis-water"}],[98500613,{"idx":5,"name":"wang_3","tpage_name":"hanga-hfrag"}],[38731973,{"idx":197,"name":"male1_11","tpage_name":"wasstada-sprite"}],[92274713,{"idx":25,"name":"intcept-b-teeth01","tpage_name":"desrace2-pris"}],[99745793,{"idx":1,"name":"nst-egg-membrane-01","tpage_name":"lnstoba-vis-water"}],[96075788,{"idx":12,"name":"jakchires-blackstrap","tpage_name":"ljakc-pris"}],[74907728,{"idx":80,"name":"sewer-metal-block-04-hitweak","tpage_name":"sewl-vis-tfrag"}],[99811328,{"idx":0,"name":"ctyport-mine-body","tpage_name":"lctypatk-tfrag"}],[96075789,{"idx":13,"name":"jakchires-brownstrap","tpage_name":"ljakc-pris"}],[74907729,{"idx":81,"name":"sewer-metal-block-01-hitweak","tpage_name":"sewl-vis-tfrag"}],[99811329,{"idx":1,"name":"ctyport-mine-rim-01","tpage_name":"lctypatk-tfrag"}],[96075790,{"idx":14,"name":"jakchires-brwnleather","tpage_name":"ljakc-pris"}],[99811330,{"idx":2,"name":"ctyport-mine-tip","tpage_name":"lctypatk-tfrag"}],[96075791,{"idx":15,"name":"jakchires-chestplate","tpage_name":"ljakc-pris"}],[74907731,{"idx":83,"name":"sewer-metal-edge-01","tpage_name":"sewl-vis-tfrag"}],[99811331,{"idx":3,"name":"ctyport-mine-top","tpage_name":"lctypatk-tfrag"}],[96075795,{"idx":19,"name":"jakchires-eyelid","tpage_name":"ljakc-pris"}],[101056515,{"idx":3,"name":"jakc-armor","tpage_name":"ljakcklv-pris"}],[99811335,{"idx":7,"name":"dax-missile-body-02","tpage_name":"lctypatk-tfrag"}],[102301696,{"idx":0,"name":"onin-game-circle","tpage_name":"waspgame-sprite"}],[101056516,{"idx":4,"name":"jakc-chestplate-straps","tpage_name":"ljakcklv-pris"}],[96075796,{"idx":20,"name":"jakchires-facelft","tpage_name":"ljakc-pris"}],[99811336,{"idx":8,"name":"dax-missile-engine-glow","tpage_name":"lctypatk-tfrag"}],[102301701,{"idx":5,"name":"onin-game-triangle","tpage_name":"waspgame-sprite"}],[101056521,{"idx":9,"name":"jakc-wraps","tpage_name":"ljakcklv-pris"}],[96075801,{"idx":25,"name":"jakchires-jacket","tpage_name":"ljakc-pris"}],[99811341,{"idx":13,"name":"prt-min-metal-03","tpage_name":"lctypatk-tfrag"}],[102301702,{"idx":6,"name":"onin-game-triangle-darkener","tpage_name":"waspgame-sprite"}],[101056522,{"idx":10,"name":"jakc-wristband-a2","tpage_name":"ljakcklv-pris"}],[96075802,{"idx":26,"name":"jakchires-leatherpouch","tpage_name":"ljakc-pris"}],[99811342,{"idx":14,"name":"prt-min-metal-02","tpage_name":"lctypatk-tfrag"}],[102301703,{"idx":7,"name":"onin-game-x","tpage_name":"waspgame-sprite"}],[101056523,{"idx":11,"name":"jakchires-arm","tpage_name":"ljakcklv-pris"}],[96075803,{"idx":27,"name":"jakchires-lightbrownspat","tpage_name":"ljakc-pris"}],[99811343,{"idx":15,"name":"prt-min-metal-01","tpage_name":"lctypatk-tfrag"}],[102301704,{"idx":8,"name":"onin-game-x-darkener","tpage_name":"waspgame-sprite"}],[101056524,{"idx":12,"name":"jakchires-blackstrap","tpage_name":"ljakcklv-pris"}],[96075804,{"idx":28,"name":"jakchires-pants","tpage_name":"ljakc-pris"}],[99811344,{"idx":16,"name":"prt-min-metal-04","tpage_name":"lctypatk-tfrag"}],[90701856,{"idx":32,"name":"des-totem-stone-01","tpage_name":"desertf-vis-tfrag"}],[96927756,{"idx":12,"name":"torn-face-right","tpage_name":"ltornjnx-pris2"}],[99418116,{"idx":4,"name":"daxter-orange","tpage_name":"volcanox-pris"}],[100663296,{"idx":0,"name":"bam-eyelight","tpage_name":"ljaksig-pris"}],[90701857,{"idx":33,"name":"des-marauder-house-01","tpage_name":"desertf-vis-tfrag"}],[96927757,{"idx":13,"name":"torn-finger","tpage_name":"ltornjnx-pris2"}],[99418117,{"idx":5,"name":"daxterarm","tpage_name":"volcanox-pris"}],[100663297,{"idx":1,"name":"bam-hairhilite","tpage_name":"ljaksig-pris"}],[75759698,{"idx":82,"name":"jakc-armor","tpage_name":"onintent-pris"}],[90701858,{"idx":34,"name":"des-bridge-brace-01","tpage_name":"desertf-vis-tfrag"}],[96927758,{"idx":14,"name":"torn-footleather","tpage_name":"ltornjnx-pris2"}],[99418118,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"volcanox-pris"}],[100663298,{"idx":2,"name":"environment-oldmetal","tpage_name":"ljaksig-pris"}],[75759699,{"idx":83,"name":"jakc-chestplate-straps","tpage_name":"onintent-pris"}],[96927759,{"idx":15,"name":"torn-gunbarrel","tpage_name":"ltornjnx-pris2"}],[99418119,{"idx":7,"name":"daxterbolt","tpage_name":"volcanox-pris"}],[100663299,{"idx":3,"name":"jackb-lens","tpage_name":"ljaksig-pris"}],[96927760,{"idx":16,"name":"torn-gunbarrel-02","tpage_name":"ltornjnx-pris2"}],[75759700,{"idx":84,"name":"jakc-gogglemetal","tpage_name":"onintent-pris"}],[90701860,{"idx":36,"name":"des-ruins-roof-01","tpage_name":"desertf-vis-tfrag"}],[99418120,{"idx":8,"name":"daxterear","tpage_name":"volcanox-pris"}],[100663300,{"idx":4,"name":"jak-belt","tpage_name":"ljaksig-pris"}],[96927762,{"idx":18,"name":"torn-hair-02","tpage_name":"ltornjnx-pris2"}],[75759702,{"idx":86,"name":"jakc-scarf","tpage_name":"onintent-pris"}],[90701862,{"idx":38,"name":"des-corral-metal-05","tpage_name":"desertf-vis-tfrag"}],[99418122,{"idx":10,"name":"daxterfoot","tpage_name":"volcanox-pris"}],[100663302,{"idx":6,"name":"jak-teeth","tpage_name":"ljaksig-pris"}],[101908489,{"idx":9,"name":"dm-turret-hud-heat-ring-03","tpage_name":"lformach-minimap"}],[96927769,{"idx":25,"name":"torn-shoe","tpage_name":"ltornjnx-pris2"}],[75759709,{"idx":93,"name":"jakchires-brwnleather","tpage_name":"onintent-pris"}],[90701869,{"idx":45,"name":"des-wasmetal26","tpage_name":"desertf-vis-tfrag"}],[99418129,{"idx":17,"name":"daxterteeth","tpage_name":"volcanox-pris"}],[100663309,{"idx":13,"name":"jakb-eyelid","tpage_name":"ljaksig-pris"}],[96927778,{"idx":34,"name":"jinx-boottop","tpage_name":"ltornjnx-pris2"}],[75759718,{"idx":102,"name":"jakchires-hair","tpage_name":"onintent-pris"}],[99418138,{"idx":26,"name":"jakc-wraps","tpage_name":"volcanox-pris"}],[100663318,{"idx":22,"name":"jakb-leatherstrap","tpage_name":"ljaksig-pris"}],[75759724,{"idx":108,"name":"jakchires-precarmor-01","tpage_name":"onintent-pris"}],[96927784,{"idx":40,"name":"jinx-eyelid","tpage_name":"ltornjnx-pris2"}],[99418144,{"idx":32,"name":"jakchires-chestplate","tpage_name":"volcanox-pris"}],[100663324,{"idx":28,"name":"jakb-shoemetal","tpage_name":"ljaksig-pris"}],[75759725,{"idx":109,"name":"jakchires-shoebottom","tpage_name":"onintent-pris"}],[96927785,{"idx":41,"name":"jinx-face","tpage_name":"ltornjnx-pris2"}],[99418145,{"idx":33,"name":"jakchires-clips","tpage_name":"volcanox-pris"}],[100663325,{"idx":29,"name":"jakb-shoeteop","tpage_name":"ljaksig-pris"}],[88277032,{"idx":40,"name":"cguard-air-train-inside-pipel","tpage_name":"introcst-tfrag"}],[74580052,{"idx":84,"name":"sewer-grate-01","tpage_name":"sewm-vis-tfrag"}],[99483652,{"idx":4,"name":"for-egg-rim-01","tpage_name":"lformach-vis-pris"}],[90767392,{"idx":32,"name":"des-temple-brick-01","tpage_name":"deserth-vis-tfrag"}],[100728832,{"idx":0,"name":"bam-eyelight","tpage_name":"ljaksig-pris2"}],[88277033,{"idx":41,"name":"cguard-air-train-sidepack","tpage_name":"introcst-tfrag"}],[90767393,{"idx":33,"name":"des-mount-sand-trans","tpage_name":"deserth-vis-tfrag"}],[74580053,{"idx":85,"name":"sewer-brick-roof-06","tpage_name":"sewm-vis-tfrag"}],[100728833,{"idx":1,"name":"charHOLD","tpage_name":"ljaksig-pris2"}],[88277034,{"idx":42,"name":"cguard-air-train-side3","tpage_name":"introcst-tfrag"}],[100728834,{"idx":2,"name":"environment-oldmetal","tpage_name":"ljaksig-pris2"}],[99483669,{"idx":21,"name":"for-hose","tpage_name":"lformach-vis-pris"}],[100728849,{"idx":17,"name":"sig-headgear","tpage_name":"ljaksig-pris2"}],[99483671,{"idx":23,"name":"neo-wasp-base","tpage_name":"lformach-vis-pris"}],[100728851,{"idx":19,"name":"sig-lens","tpage_name":"ljaksig-pris2"}],[106954755,{"idx":3,"name":"vol-bark","tpage_name":"volcanoa-vis-tfrag"}],[99483675,{"idx":27,"name":"neo-wasp-eye","tpage_name":"lformach-vis-pris"}],[100728855,{"idx":23,"name":"sig-shoebottom","tpage_name":"ljaksig-pris2"}],[106954756,{"idx":4,"name":"vola-lava-02","tpage_name":"volcanoa-vis-tfrag"}],[99483676,{"idx":28,"name":"spawner-base","tpage_name":"lformach-vis-pris"}],[100728856,{"idx":24,"name":"sig-shoetop","tpage_name":"ljaksig-pris2"}],[106954757,{"idx":5,"name":"vola-cracked-rock-top","tpage_name":"volcanoa-vis-tfrag"}],[99483677,{"idx":29,"name":"spawner-base-main","tpage_name":"lformach-vis-pris"}],[100728857,{"idx":25,"name":"sig-shoulderarmor","tpage_name":"ljaksig-pris2"}],[106954758,{"idx":6,"name":"vola-drip-rock","tpage_name":"volcanoa-vis-tfrag"}],[99483678,{"idx":30,"name":"spawner-leaf-02","tpage_name":"lformach-vis-pris"}],[100728858,{"idx":26,"name":"sig-skirts","tpage_name":"ljaksig-pris2"}],[106954759,{"idx":7,"name":"vola-grass-blob","tpage_name":"volcanoa-vis-tfrag"}],[99483679,{"idx":31,"name":"spawner-leaf-03","tpage_name":"lformach-vis-pris"}],[100728859,{"idx":27,"name":"sig-skirts-02","tpage_name":"ljaksig-pris2"}],[100794368,{"idx":0,"name":"sig-flatfangs","tpage_name":"ljaksig-water"}],[95879184,{"idx":16,"name":"torn-gunbarrel-02","tpage_name":"ltorn-pris2"}],[99614724,{"idx":4,"name":"mhbat-teeth","tpage_name":"lnstoba-vis-pris"}],[100859904,{"idx":0,"name":"bam-eyelight","tpage_name":"ljkdmpk-pris"}],[95879185,{"idx":17,"name":"torn-hair-01","tpage_name":"ltorn-pris2"}],[99614725,{"idx":5,"name":"mhbat-wings","tpage_name":"lnstoba-vis-pris"}],[100859905,{"idx":1,"name":"bam-hairhilite","tpage_name":"ljkdmpk-pris"}],[95879186,{"idx":18,"name":"torn-hair-02","tpage_name":"ltorn-pris2"}],[99614726,{"idx":6,"name":"nsta-cave-floor-01","tpage_name":"lnstoba-vis-pris"}],[100859906,{"idx":2,"name":"environment-oldmetal","tpage_name":"ljkdmpk-pris"}],[95944726,{"idx":22,"name":"torn-mouth","tpage_name":"freehq-pris2"}],[100925446,{"idx":6,"name":"king-chest","tpage_name":"ljkdmpk-pris2"}],[104660993,{"idx":1,"name":"des-shrub-pebbles","tpage_name":"deserte-vis-shrub"}],[100925453,{"idx":13,"name":"king-greenmetalplain","tpage_name":"ljkdmpk-pris2"}],[100925454,{"idx":14,"name":"king-hair","tpage_name":"ljkdmpk-pris2"}],[100925455,{"idx":15,"name":"king-hand","tpage_name":"ljkdmpk-pris2"}],[104660996,{"idx":4,"name":"des-sand-grass-01","tpage_name":"deserte-vis-shrub"}],[100925456,{"idx":16,"name":"king-horn","tpage_name":"ljkdmpk-pris2"}],[38731976,{"idx":200,"name":"male1_14","tpage_name":"wasstada-sprite"}],[100990976,{"idx":0,"name":"bam-eyelight","tpage_name":"ljakklev-pris"}],[38731977,{"idx":201,"name":"male1_15","tpage_name":"wasstada-sprite"}],[100990977,{"idx":1,"name":"bam-hairhilite","tpage_name":"ljakklev-pris"}],[38731978,{"idx":202,"name":"male1_16","tpage_name":"wasstada-sprite"}],[100990978,{"idx":2,"name":"environment-oldmetal","tpage_name":"ljakklev-pris"}],[104726535,{"idx":7,"name":"daxterbolt","tpage_name":"deshover-pris"}],[38731995,{"idx":219,"name":"male2_12","tpage_name":"wasstada-sprite"}],[100990995,{"idx":19,"name":"jakb-jacketbody","tpage_name":"ljakklev-pris"}],[104726541,{"idx":13,"name":"daxterheadwidenew","tpage_name":"deshover-pris"}],[38732001,{"idx":225,"name":"male2_18","tpage_name":"wasstada-sprite"}],[100991001,{"idx":25,"name":"jakb-pants","tpage_name":"ljakklev-pris"}],[104726543,{"idx":15,"name":"daxterlense","tpage_name":"deshover-pris"}],[38732003,{"idx":227,"name":"male2_20","tpage_name":"wasstada-sprite"}],[100991003,{"idx":27,"name":"jakb-shoebottom","tpage_name":"ljakklev-pris"}],[96075792,{"idx":16,"name":"jakchires-clips","tpage_name":"ljakc-pris"}],[99811332,{"idx":4,"name":"dax-missile-fin-02","tpage_name":"lctypatk-tfrag"}],[101056512,{"idx":0,"name":"bam-eyelight","tpage_name":"ljakcklv-pris"}],[96075793,{"idx":17,"name":"jakchires-eye","tpage_name":"ljakc-pris"}],[99811333,{"idx":5,"name":"dax-missile-tip-01","tpage_name":"lctypatk-tfrag"}],[101056513,{"idx":1,"name":"bam-hairhilite","tpage_name":"ljakcklv-pris"}],[96075794,{"idx":18,"name":"jakchires-eyebrow","tpage_name":"ljakc-pris"}],[99811334,{"idx":6,"name":"dax-missile-body-01","tpage_name":"lctypatk-tfrag"}],[101056514,{"idx":2,"name":"environment-oldmetal","tpage_name":"ljakcklv-pris"}],[103546893,{"idx":13,"name":"missle-launcher-panel-02","tpage_name":"lctyhijk-tfrag"}],[96075813,{"idx":37,"name":"gun-red-glow","tpage_name":"ljakc-pris"}],[101056533,{"idx":21,"name":"jakchires-facert","tpage_name":"ljakcklv-pris"}],[96075814,{"idx":38,"name":"gun-red-mag","tpage_name":"ljakc-pris"}],[103546894,{"idx":14,"name":"missle-launcher-panel-03","tpage_name":"lctyhijk-tfrag"}],[101056534,{"idx":22,"name":"jakchires-glovetop","tpage_name":"ljakcklv-pris"}],[103546895,{"idx":15,"name":"missle-launcher-metal-01","tpage_name":"lctyhijk-tfrag"}],[101056535,{"idx":23,"name":"jakchires-hair","tpage_name":"ljakcklv-pris"}],[103546896,{"idx":16,"name":"missle-launcher-panel-01","tpage_name":"lctyhijk-tfrag"}],[101056536,{"idx":24,"name":"jakchires-horn","tpage_name":"ljakcklv-pris"}],[103546897,{"idx":17,"name":"missle-launcher-top-02","tpage_name":"lctyhijk-tfrag"}],[101056537,{"idx":25,"name":"jakchires-jacket","tpage_name":"ljakcklv-pris"}],[103546898,{"idx":18,"name":"missle-launcher-top-01","tpage_name":"lctyhijk-tfrag"}],[101056538,{"idx":26,"name":"jakchires-leatherpouch","tpage_name":"ljakcklv-pris"}],[103546899,{"idx":19,"name":"missle-launcher-tube","tpage_name":"lctyhijk-tfrag"}],[101056539,{"idx":27,"name":"jakchires-lightbrownspat","tpage_name":"ljakcklv-pris"}],[103546900,{"idx":20,"name":"missle-launcher-tube-end-02","tpage_name":"lctyhijk-tfrag"}],[101056540,{"idx":28,"name":"jakchires-pants","tpage_name":"ljakcklv-pris"}],[101056542,{"idx":30,"name":"jakchires-shoebottom","tpage_name":"ljakcklv-pris"}],[101056543,{"idx":31,"name":"jakchires-shoemetal","tpage_name":"ljakcklv-pris"}],[101056544,{"idx":32,"name":"jakchires-shoeteop","tpage_name":"ljakcklv-pris"}],[101056546,{"idx":34,"name":"klever-arm","tpage_name":"ljakcklv-pris"}],[101056547,{"idx":35,"name":"klever-armor-01","tpage_name":"ljakcklv-pris"}],[101056549,{"idx":37,"name":"klever-blackstrap","tpage_name":"ljakcklv-pris"}],[101056550,{"idx":38,"name":"klever-bolt","tpage_name":"ljakcklv-pris"}],[101056551,{"idx":39,"name":"klever-brownstrap","tpage_name":"ljakcklv-pris"}],[101056552,{"idx":40,"name":"klever-chest","tpage_name":"ljakcklv-pris"}],[101056553,{"idx":41,"name":"klever-clips","tpage_name":"ljakcklv-pris"}],[101056554,{"idx":42,"name":"klever-earcup","tpage_name":"ljakcklv-pris"}],[101056556,{"idx":44,"name":"klever-eyelid","tpage_name":"ljakcklv-pris"}],[101056558,{"idx":46,"name":"klever-face-01scars","tpage_name":"ljakcklv-pris"}],[101056559,{"idx":47,"name":"klever-fingerbottom","tpage_name":"ljakcklv-pris"}],[101056560,{"idx":48,"name":"klever-fingertop","tpage_name":"ljakcklv-pris"}],[101056562,{"idx":50,"name":"klever-gunmetal-02","tpage_name":"ljakcklv-pris"}],[101056563,{"idx":51,"name":"klever-gunmetal-03","tpage_name":"ljakcklv-pris"}],[117637185,{"idx":65,"name":"daxterbodyshort-eix","tpage_name":"destrack-pris"}],[101056564,{"idx":52,"name":"klever-gunmetal-04","tpage_name":"ljakcklv-pris"}],[117637186,{"idx":66,"name":"daxterbolt","tpage_name":"destrack-pris"}],[101056565,{"idx":53,"name":"klever-gunmetal-05","tpage_name":"ljakcklv-pris"}],[117637187,{"idx":67,"name":"daxterear","tpage_name":"destrack-pris"}],[101056566,{"idx":54,"name":"klever-hair","tpage_name":"ljakcklv-pris"}],[117637188,{"idx":68,"name":"daxterfinger","tpage_name":"destrack-pris"}],[101056567,{"idx":55,"name":"klever-hand","tpage_name":"ljakcklv-pris"}],[117637189,{"idx":69,"name":"daxterfoot","tpage_name":"destrack-pris"}],[118489088,{"idx":0,"name":"bam-eyelight","tpage_name":"deshunt-pris2"}],[101056568,{"idx":56,"name":"klever-handwrap","tpage_name":"ljakcklv-pris"}],[117637190,{"idx":70,"name":"daxterfoot-bottom","tpage_name":"destrack-pris"}],[118489090,{"idx":2,"name":"environment-oldmetal","tpage_name":"deshunt-pris2"}],[101056570,{"idx":58,"name":"klever-mustache","tpage_name":"ljakcklv-pris"}],[117637192,{"idx":72,"name":"daxterheadwidenew","tpage_name":"destrack-pris"}],[118489091,{"idx":3,"name":"sig-belt","tpage_name":"deshunt-pris2"}],[104792111,{"idx":47,"name":"wstlander-01-eye","tpage_name":"desresc-pris"}],[101056571,{"idx":59,"name":"klever-shoe","tpage_name":"ljakcklv-pris"}],[117637193,{"idx":73,"name":"daxterhelmetplain","tpage_name":"destrack-pris"}],[118489092,{"idx":4,"name":"sig-eye","tpage_name":"deshunt-pris2"}],[104792112,{"idx":48,"name":"wstlander-01-gunmetal-01","tpage_name":"desresc-pris"}],[101056572,{"idx":60,"name":"klever-shoebottom","tpage_name":"ljakcklv-pris"}],[117637194,{"idx":74,"name":"daxterlense","tpage_name":"destrack-pris"}],[118489093,{"idx":5,"name":"sig-eyelid","tpage_name":"deshunt-pris2"}],[104792113,{"idx":49,"name":"wstlander-01-gunmetal-02","tpage_name":"desresc-pris"}],[101056573,{"idx":61,"name":"klever-skirtdark","tpage_name":"ljakcklv-pris"}],[117637195,{"idx":75,"name":"daxternose","tpage_name":"destrack-pris"}],[118489094,{"idx":6,"name":"sig-faceleft","tpage_name":"deshunt-pris2"}],[104792114,{"idx":50,"name":"wstlander-01-gunmetal-03","tpage_name":"desresc-pris"}],[101056574,{"idx":62,"name":"klever-skirtlight","tpage_name":"ljakcklv-pris"}],[117637196,{"idx":76,"name":"daxterteeth","tpage_name":"destrack-pris"}],[118489095,{"idx":7,"name":"sig-facert","tpage_name":"deshunt-pris2"}],[104792115,{"idx":51,"name":"wstlander-01-gunmetal-04","tpage_name":"desresc-pris"}],[101056575,{"idx":63,"name":"klever-thighs","tpage_name":"ljakcklv-pris"}],[117637197,{"idx":77,"name":"daxtertuft","tpage_name":"destrack-pris"}],[118489096,{"idx":8,"name":"sig-flask","tpage_name":"deshunt-pris2"}],[104792116,{"idx":52,"name":"wstlander-01-head","tpage_name":"desresc-pris"}],[101056576,{"idx":64,"name":"klever-undershirt","tpage_name":"ljakcklv-pris"}],[117637198,{"idx":78,"name":"environment-oldmetal","tpage_name":"destrack-pris"}],[118489097,{"idx":9,"name":"sig-gem-01","tpage_name":"deshunt-pris2"}],[104792117,{"idx":53,"name":"wstlander-01-leatherstrap","tpage_name":"desresc-pris"}],[101056577,{"idx":65,"name":"klever-widebrownstrap","tpage_name":"ljakcklv-pris"}],[117637199,{"idx":79,"name":"jakc-armor","tpage_name":"destrack-pris"}],[118489098,{"idx":10,"name":"sig-glove","tpage_name":"deshunt-pris2"}],[104792118,{"idx":54,"name":"wstlander-01-mustache","tpage_name":"desresc-pris"}],[101056578,{"idx":66,"name":"jakc-skirt","tpage_name":"ljakcklv-pris"}],[117637200,{"idx":80,"name":"jakc-chestplate-straps","tpage_name":"destrack-pris"}],[118489099,{"idx":11,"name":"sig-glovetop","tpage_name":"deshunt-pris2"}],[104792119,{"idx":55,"name":"wstlander-01-pants","tpage_name":"desresc-pris"}],[101056579,{"idx":67,"name":"jakc-scarfhanging","tpage_name":"ljakcklv-pris"}],[117637201,{"idx":81,"name":"jakc-gogglemetal","tpage_name":"destrack-pris"}],[81657920,{"idx":64,"name":"seem-bootbottom","tpage_name":"arenacst-pris2"}],[86638640,{"idx":48,"name":"vehicle-wheel-01","tpage_name":"wasdoors-vis-pris"}],[101580800,{"idx":0,"name":"wstlander-01-eye","tpage_name":"lwlandm-pris"}],[81657921,{"idx":65,"name":"seem-bootleg","tpage_name":"arenacst-pris2"}],[86638641,{"idx":49,"name":"jakc-armor","tpage_name":"wasdoors-vis-pris"}],[101580801,{"idx":1,"name":"wstlander-01-gunmetal-01","tpage_name":"lwlandm-pris"}],[81657922,{"idx":66,"name":"seem-bootlower","tpage_name":"arenacst-pris2"}],[86638642,{"idx":50,"name":"jakc-chestplate-straps","tpage_name":"wasdoors-vis-pris"}],[101580802,{"idx":2,"name":"wstlander-01-gunmetal-02","tpage_name":"lwlandm-pris"}],[81657923,{"idx":67,"name":"seem-bootmet","tpage_name":"arenacst-pris2"}],[86638643,{"idx":51,"name":"jakc-gogglemetal","tpage_name":"wasdoors-vis-pris"}],[101580803,{"idx":3,"name":"wstlander-01-gunmetal-03","tpage_name":"lwlandm-pris"}],[81657924,{"idx":68,"name":"seem-boottoe","tpage_name":"arenacst-pris2"}],[86638644,{"idx":52,"name":"jakc-lens","tpage_name":"wasdoors-vis-pris"}],[101580804,{"idx":4,"name":"wstlander-01-gunmetal-04","tpage_name":"lwlandm-pris"}],[81657925,{"idx":69,"name":"seem-ear","tpage_name":"arenacst-pris2"}],[86638645,{"idx":53,"name":"jakc-scarf","tpage_name":"wasdoors-vis-pris"}],[101580805,{"idx":5,"name":"wstlander-01-head","tpage_name":"lwlandm-pris"}],[81657926,{"idx":70,"name":"seem-eye","tpage_name":"arenacst-pris2"}],[86638646,{"idx":54,"name":"jakc-scarfhanging","tpage_name":"wasdoors-vis-pris"}],[101580806,{"idx":6,"name":"wstlander-01-leatherstrap","tpage_name":"lwlandm-pris"}],[81657927,{"idx":71,"name":"seem-eyelid","tpage_name":"arenacst-pris2"}],[86638647,{"idx":55,"name":"jakc-skirt","tpage_name":"wasdoors-vis-pris"}],[101580807,{"idx":7,"name":"wstlander-01-mustache","tpage_name":"lwlandm-pris"}],[81657928,{"idx":72,"name":"seem-face","tpage_name":"arenacst-pris2"}],[86638648,{"idx":56,"name":"jakc-waistband2","tpage_name":"wasdoors-vis-pris"}],[101580808,{"idx":8,"name":"wstlander-01-pants","tpage_name":"lwlandm-pris"}],[81657929,{"idx":73,"name":"seem-finger","tpage_name":"arenacst-pris2"}],[86638649,{"idx":57,"name":"jakc-wraps","tpage_name":"wasdoors-vis-pris"}],[101580809,{"idx":9,"name":"wstlander-01-shoebottom","tpage_name":"lwlandm-pris"}],[81657930,{"idx":74,"name":"seem-hand","tpage_name":"arenacst-pris2"}],[86638650,{"idx":58,"name":"jakc-wristband-a2","tpage_name":"wasdoors-vis-pris"}],[101580810,{"idx":10,"name":"wstlander-01-shoetop","tpage_name":"lwlandm-pris"}],[81657931,{"idx":75,"name":"seem-pipeend","tpage_name":"arenacst-pris2"}],[86638651,{"idx":59,"name":"jakchires-arm","tpage_name":"wasdoors-vis-pris"}],[101580811,{"idx":11,"name":"wstlander-01-shoulderarmor","tpage_name":"lwlandm-pris"}],[81657932,{"idx":76,"name":"seem-pipes-01","tpage_name":"arenacst-pris2"}],[86638652,{"idx":60,"name":"jakchires-blackstrap","tpage_name":"wasdoors-vis-pris"}],[101580812,{"idx":12,"name":"wstlander-01-skirt","tpage_name":"lwlandm-pris"}],[81657933,{"idx":77,"name":"seem-precmetal-chestplate-01","tpage_name":"arenacst-pris2"}],[86638653,{"idx":61,"name":"jakchires-brownstrap","tpage_name":"wasdoors-vis-pris"}],[101580813,{"idx":13,"name":"wstlander-01-wrap","tpage_name":"lwlandm-pris"}],[81657934,{"idx":78,"name":"seem-precmetal-edge","tpage_name":"arenacst-pris2"}],[86638654,{"idx":62,"name":"jakchires-brwnleather","tpage_name":"wasdoors-vis-pris"}],[101580814,{"idx":14,"name":"wstlander-02-arm","tpage_name":"lwlandm-pris"}],[81657935,{"idx":79,"name":"seem-precmetal-plain","tpage_name":"arenacst-pris2"}],[86638655,{"idx":63,"name":"jakchires-chestplate","tpage_name":"wasdoors-vis-pris"}],[101580815,{"idx":15,"name":"wstlander-02-armor","tpage_name":"lwlandm-pris"}],[81657936,{"idx":80,"name":"seem-straps","tpage_name":"arenacst-pris2"}],[86638656,{"idx":64,"name":"jakchires-clips","tpage_name":"wasdoors-vis-pris"}],[101580816,{"idx":16,"name":"wstlander-02-belt","tpage_name":"lwlandm-pris"}],[81657937,{"idx":81,"name":"seem-uppertorso","tpage_name":"arenacst-pris2"}],[86638657,{"idx":65,"name":"jakchires-eye","tpage_name":"wasdoors-vis-pris"}],[101580817,{"idx":17,"name":"wstlander-02-bootheel","tpage_name":"lwlandm-pris"}],[81657938,{"idx":82,"name":"seem-headgearback","tpage_name":"arenacst-pris2"}],[86638658,{"idx":66,"name":"jakchires-eyebrow","tpage_name":"wasdoors-vis-pris"}],[101580818,{"idx":18,"name":"wstlander-02-eye","tpage_name":"lwlandm-pris"}],[81657939,{"idx":83,"name":"seem-headpiecetop","tpage_name":"arenacst-pris2"}],[86638659,{"idx":67,"name":"jakchires-eyelid","tpage_name":"wasdoors-vis-pris"}],[101580819,{"idx":19,"name":"wstlander-02-glove","tpage_name":"lwlandm-pris"}],[81657940,{"idx":84,"name":"seem-pipes-02","tpage_name":"arenacst-pris2"}],[86638660,{"idx":68,"name":"jakchires-facelft","tpage_name":"wasdoors-vis-pris"}],[101580820,{"idx":20,"name":"wstlander-02-head","tpage_name":"lwlandm-pris"}],[81657941,{"idx":85,"name":"seem-teeth","tpage_name":"arenacst-pris2"}],[86638661,{"idx":69,"name":"jakchires-facert","tpage_name":"wasdoors-vis-pris"}],[101580821,{"idx":21,"name":"wstlander-02-ponytail","tpage_name":"lwlandm-pris"}],[81657942,{"idx":86,"name":"king-skirt-b","tpage_name":"arenacst-pris2"}],[86638662,{"idx":70,"name":"jakchires-glovetop","tpage_name":"wasdoors-vis-pris"}],[101580822,{"idx":22,"name":"wstlander-02-scarf","tpage_name":"lwlandm-pris"}],[81657943,{"idx":87,"name":"seem-skirt","tpage_name":"arenacst-pris2"}],[86638663,{"idx":71,"name":"jakchires-hair","tpage_name":"wasdoors-vis-pris"}],[101580823,{"idx":23,"name":"wstlander-02-shirt","tpage_name":"lwlandm-pris"}],[81657944,{"idx":88,"name":"seem-skirt-small","tpage_name":"arenacst-pris2"}],[86638664,{"idx":72,"name":"jakchires-horn","tpage_name":"wasdoors-vis-pris"}],[101580824,{"idx":24,"name":"wstlander-02-skirt","tpage_name":"lwlandm-pris"}],[86638665,{"idx":73,"name":"jakchires-jacket","tpage_name":"wasdoors-vis-pris"}],[101580825,{"idx":25,"name":"wstlander-03-eye","tpage_name":"lwlandm-pris"}],[86638666,{"idx":74,"name":"jakchires-leatherpouch","tpage_name":"wasdoors-vis-pris"}],[101580826,{"idx":26,"name":"wstlander-03-flesh","tpage_name":"lwlandm-pris"}],[86638667,{"idx":75,"name":"jakchires-lightbrownspat","tpage_name":"wasdoors-vis-pris"}],[101580827,{"idx":27,"name":"wstlander-04-dark-blue","tpage_name":"lwlandm-pris"}],[86638668,{"idx":76,"name":"jakchires-pants","tpage_name":"wasdoors-vis-pris"}],[101580828,{"idx":28,"name":"wstlander-04-gun","tpage_name":"lwlandm-pris"}],[86638669,{"idx":77,"name":"jakchires-precarmor-01","tpage_name":"wasdoors-vis-pris"}],[101580829,{"idx":29,"name":"wstlander-04-headband","tpage_name":"lwlandm-pris"}],[86638670,{"idx":78,"name":"jakchires-shoebottom","tpage_name":"wasdoors-vis-pris"}],[101580830,{"idx":30,"name":"wstlander-04-shirt","tpage_name":"lwlandm-pris"}],[89587777,{"idx":65,"name":"jakchires-lightbrownspat","tpage_name":"lwstdpck-pris"}],[107020297,{"idx":9,"name":"vol-shrub-plant","tpage_name":"volcanoa-vis-shrub"}],[102039577,{"idx":25,"name":"tess-teeth","tpage_name":"gungame-vis-pris2"}],[89587778,{"idx":66,"name":"jakchires-pants","tpage_name":"lwstdpck-pris"}],[107020298,{"idx":10,"name":"vol-tree-fruit-01","tpage_name":"volcanoa-vis-shrub"}],[102039578,{"idx":26,"name":"tess-underwear","tpage_name":"gungame-vis-pris2"}],[89587779,{"idx":67,"name":"jakchires-precarmor-01","tpage_name":"lwstdpck-pris"}],[107020299,{"idx":11,"name":"vol-tree-fruit-02","tpage_name":"volcanoa-vis-shrub"}],[102039579,{"idx":27,"name":"tess-upperboot","tpage_name":"gungame-vis-pris2"}],[89587780,{"idx":68,"name":"jakchires-shoebottom","tpage_name":"lwstdpck-pris"}],[102039580,{"idx":28,"name":"environment-oldmetal","tpage_name":"gungame-vis-pris2"}],[89587781,{"idx":69,"name":"jakchires-shoemetal","tpage_name":"lwstdpck-pris"}],[102039581,{"idx":29,"name":"environment-title","tpage_name":"gungame-vis-pris2"}],[89587782,{"idx":70,"name":"jakchires-shoeteop","tpage_name":"lwstdpck-pris"}],[107020302,{"idx":14,"name":"for-shrub-asian-grass","tpage_name":"volcanoa-vis-shrub"}],[102039582,{"idx":30,"name":"gun-backslit","tpage_name":"gungame-vis-pris2"}],[89587783,{"idx":71,"name":"jakchires-teeth","tpage_name":"lwstdpck-pris"}],[107020303,{"idx":15,"name":"vol-metal-01","tpage_name":"volcanoa-vis-shrub"}],[102039583,{"idx":31,"name":"gun-barrel-alt","tpage_name":"gungame-vis-pris2"}],[107020304,{"idx":16,"name":"vola-lava-02","tpage_name":"volcanoa-vis-shrub"}],[102039584,{"idx":32,"name":"gun-blue-glow","tpage_name":"gungame-vis-pris2"}],[102039585,{"idx":33,"name":"gun-blue-mag","tpage_name":"gungame-vis-pris2"}],[107020306,{"idx":18,"name":"vola-rock-side-wall","tpage_name":"volcanoa-vis-shrub"}],[102039586,{"idx":34,"name":"gun-cover","tpage_name":"gungame-vis-pris2"}],[107020307,{"idx":19,"name":"vola-shrub-leaf","tpage_name":"volcanoa-vis-shrub"}],[102039587,{"idx":35,"name":"gun-dark-mag","tpage_name":"gungame-vis-pris2"}],[107020308,{"idx":20,"name":"vol-balance-plat-end","tpage_name":"volcanoa-vis-shrub"}],[102039588,{"idx":36,"name":"gun-eye","tpage_name":"gungame-vis-pris2"}],[107020310,{"idx":22,"name":"vol-balance-plat-pole","tpage_name":"volcanoa-vis-shrub"}],[102039590,{"idx":38,"name":"gun-leather","tpage_name":"gungame-vis-pris2"}],[107020311,{"idx":23,"name":"vola-lava-ball","tpage_name":"volcanoa-vis-shrub"}],[102039591,{"idx":39,"name":"gun-magport","tpage_name":"gungame-vis-pris2"}],[107020312,{"idx":24,"name":"vol-plat-top","tpage_name":"volcanoa-vis-shrub"}],[102039592,{"idx":40,"name":"gun-main","tpage_name":"gungame-vis-pris2"}],[107020313,{"idx":25,"name":"vola-rising-step-base","tpage_name":"volcanoa-vis-shrub"}],[102039593,{"idx":41,"name":"gun-pump","tpage_name":"gungame-vis-pris2"}],[107020314,{"idx":26,"name":"minc-bolt","tpage_name":"volcanoa-vis-shrub"}],[102039594,{"idx":42,"name":"gun-purple-glow","tpage_name":"gungame-vis-pris2"}],[38731980,{"idx":204,"name":"male1_18","tpage_name":"wasstada-sprite"}],[100990980,{"idx":4,"name":"jak-belt","tpage_name":"ljakklev-pris"}],[102236160,{"idx":0,"name":"thrust-glob","tpage_name":"introcst-sprite"}],[94371868,{"idx":28,"name":"palace-break-bigwall02","tpage_name":"intpfall-vis-pris"}],[103088128,{"idx":0,"name":"des-pinetree-bark","tpage_name":"desertc-vis-shrub"}],[100859935,{"idx":31,"name":"pecker-eyelid","tpage_name":"ljkdmpk-pris"}],[103350295,{"idx":23,"name":"daxter-orange","tpage_name":"comba-pris"}],[100859936,{"idx":32,"name":"pecker-face","tpage_name":"ljkdmpk-pris"}],[110821376,{"idx":0,"name":"minc-streek","tpage_name":"mined-alpha"}],[103350296,{"idx":24,"name":"daxterarm","tpage_name":"comba-pris"}],[100859942,{"idx":38,"name":"pecker-yellowfur","tpage_name":"ljkdmpk-pris"}],[103350302,{"idx":30,"name":"daxterfoot-bottom","tpage_name":"comba-pris"}],[100859943,{"idx":39,"name":"jakc-armor","tpage_name":"ljkdmpk-pris"}],[103350303,{"idx":31,"name":"daxtergoggles","tpage_name":"comba-pris"}],[100859944,{"idx":40,"name":"jakc-chestplate-straps","tpage_name":"ljkdmpk-pris"}],[103350304,{"idx":32,"name":"daxterheadwidenew","tpage_name":"comba-pris"}],[100859945,{"idx":41,"name":"jakc-gogglemetal","tpage_name":"ljkdmpk-pris"}],[103350305,{"idx":33,"name":"daxterhelmetplain","tpage_name":"comba-pris"}],[100859946,{"idx":42,"name":"jakc-lens","tpage_name":"ljkdmpk-pris"}],[103350306,{"idx":34,"name":"daxterlense","tpage_name":"comba-pris"}],[100859947,{"idx":43,"name":"jakc-scarf","tpage_name":"ljkdmpk-pris"}],[103350307,{"idx":35,"name":"daxternose","tpage_name":"comba-pris"}],[100859948,{"idx":44,"name":"jakc-scarfhanging","tpage_name":"ljkdmpk-pris"}],[103350308,{"idx":36,"name":"daxterteeth","tpage_name":"comba-pris"}],[100859949,{"idx":45,"name":"jakc-skirt","tpage_name":"ljkdmpk-pris"}],[103350309,{"idx":37,"name":"daxtertuft","tpage_name":"comba-pris"}],[100859950,{"idx":46,"name":"jakc-waistband2","tpage_name":"ljkdmpk-pris"}],[103350310,{"idx":38,"name":"environment-oldmetal","tpage_name":"comba-pris"}],[100859951,{"idx":47,"name":"jakc-wraps","tpage_name":"ljkdmpk-pris"}],[103350311,{"idx":39,"name":"jakc-armor","tpage_name":"comba-pris"}],[115802112,{"idx":0,"name":"bam-eyelight","tpage_name":"lnstcst-pris2"}],[100859952,{"idx":48,"name":"jakc-wristband-a2","tpage_name":"ljkdmpk-pris"}],[103350312,{"idx":40,"name":"jakc-chestplate-straps","tpage_name":"comba-pris"}],[115802113,{"idx":1,"name":"charHOLD","tpage_name":"lnstcst-pris2"}],[100859953,{"idx":49,"name":"jakchires-arm","tpage_name":"ljkdmpk-pris"}],[103350313,{"idx":41,"name":"jakc-gogglemetal","tpage_name":"comba-pris"}],[115802114,{"idx":2,"name":"environment-oldmetal","tpage_name":"lnstcst-pris2"}],[100859954,{"idx":50,"name":"jakchires-blackstrap","tpage_name":"ljkdmpk-pris"}],[103350314,{"idx":42,"name":"jakc-lens","tpage_name":"comba-pris"}],[115802115,{"idx":3,"name":"sig-belt","tpage_name":"lnstcst-pris2"}],[100859955,{"idx":51,"name":"jakchires-brownstrap","tpage_name":"ljkdmpk-pris"}],[103350315,{"idx":43,"name":"jakc-scarf","tpage_name":"comba-pris"}],[115802116,{"idx":4,"name":"sig-eye","tpage_name":"lnstcst-pris2"}],[100859956,{"idx":52,"name":"jakchires-brwnleather","tpage_name":"ljkdmpk-pris"}],[103350316,{"idx":44,"name":"jakc-scarfhanging","tpage_name":"comba-pris"}],[115802117,{"idx":5,"name":"sig-eyelid","tpage_name":"lnstcst-pris2"}],[100859957,{"idx":53,"name":"jakchires-chestplate","tpage_name":"ljkdmpk-pris"}],[103350317,{"idx":45,"name":"jakc-skirt","tpage_name":"comba-pris"}],[115802119,{"idx":7,"name":"sig-facert","tpage_name":"lnstcst-pris2"}],[100859959,{"idx":55,"name":"jakchires-eye","tpage_name":"ljkdmpk-pris"}],[103350319,{"idx":47,"name":"jakc-wraps","tpage_name":"comba-pris"}],[115802120,{"idx":8,"name":"sig-flask","tpage_name":"lnstcst-pris2"}],[100859960,{"idx":56,"name":"jakchires-eyebrow","tpage_name":"ljkdmpk-pris"}],[103350320,{"idx":48,"name":"jakc-wristband-a2","tpage_name":"comba-pris"}],[127008778,{"idx":10,"name":"vola-vine","tpage_name":"volcanox-tfrag"}],[103350358,{"idx":86,"name":"rail-base-mid-01","tpage_name":"comba-pris"}],[100925468,{"idx":28,"name":"king-thinstrap","tpage_name":"ljkdmpk-pris2"}],[107151368,{"idx":8,"name":"metalflut-rings","tpage_name":"volcanoa-vis-pris"}],[103350362,{"idx":90,"name":"rail-env-wall-01","tpage_name":"comba-pris"}],[100925472,{"idx":32,"name":"king-wraps","tpage_name":"ljkdmpk-pris2"}],[107151372,{"idx":12,"name":"metalflut-saddleseat","tpage_name":"volcanoa-vis-pris"}],[81723465,{"idx":73,"name":"klever-skirtlight","tpage_name":"ljndklev-pris"}],[104136705,{"idx":1,"name":"racegate","tpage_name":"wasleapr-sprite"}],[50725044,{"idx":180,"name":"dm-ship-cockpit-01","tpage_name":"foresta-vis-pris"}],[79364184,{"idx":88,"name":"jakchires-eyebrow","tpage_name":"wasseem-pris"}],[104267784,{"idx":8,"name":"stdm-wall-04","tpage_name":"stadium-vis-tfrag"}],[50725045,{"idx":181,"name":"dm-ship-hull-01","tpage_name":"foresta-vis-pris"}],[79364185,{"idx":89,"name":"jakchires-eyelid","tpage_name":"wasseem-pris"}],[104267785,{"idx":9,"name":"rub-cement-a","tpage_name":"stadium-vis-tfrag"}],[50725046,{"idx":182,"name":"dm-ship-hull-02","tpage_name":"foresta-vis-pris"}],[79364186,{"idx":90,"name":"jakchires-facelft","tpage_name":"wasseem-pris"}],[104267786,{"idx":10,"name":"stdm-cobble-floor-01","tpage_name":"stadium-vis-tfrag"}],[50725047,{"idx":183,"name":"dm-ship-nose-01","tpage_name":"foresta-vis-pris"}],[79364187,{"idx":91,"name":"jakchires-facert","tpage_name":"wasseem-pris"}],[104267787,{"idx":11,"name":"stdm-trim-02","tpage_name":"stadium-vis-tfrag"}],[50725048,{"idx":184,"name":"dm-ship-nose-02","tpage_name":"foresta-vis-pris"}],[79364188,{"idx":92,"name":"jakchires-glovetop","tpage_name":"wasseem-pris"}],[104267788,{"idx":12,"name":"stdm-stone-trim-01","tpage_name":"stadium-vis-tfrag"}],[50725049,{"idx":185,"name":"dm-ship-plate-01","tpage_name":"foresta-vis-pris"}],[79364189,{"idx":93,"name":"jakchires-hair","tpage_name":"wasseem-pris"}],[104267789,{"idx":13,"name":"stdm-stairs-01","tpage_name":"stadium-vis-tfrag"}],[50725050,{"idx":186,"name":"environment-darkprec","tpage_name":"foresta-vis-pris"}],[79364190,{"idx":94,"name":"jakchires-horn","tpage_name":"wasseem-pris"}],[104267790,{"idx":14,"name":"stdm-base-01","tpage_name":"stadium-vis-tfrag"}],[50725051,{"idx":187,"name":"timemap-ball-precmetal","tpage_name":"foresta-vis-pris"}],[79364191,{"idx":95,"name":"jakchires-jacket","tpage_name":"wasseem-pris"}],[104267791,{"idx":15,"name":"rub-blastdoors","tpage_name":"stadium-vis-tfrag"}],[50725052,{"idx":188,"name":"timemap-centerball","tpage_name":"foresta-vis-pris"}],[79364192,{"idx":96,"name":"jakchires-leatherpouch","tpage_name":"wasseem-pris"}],[104267792,{"idx":16,"name":"rub-wall-gen-01","tpage_name":"stadium-vis-tfrag"}],[50725053,{"idx":189,"name":"timemap-notchborder","tpage_name":"foresta-vis-pris"}],[79364193,{"idx":97,"name":"jakchires-lightbrownspat","tpage_name":"wasseem-pris"}],[104267793,{"idx":17,"name":"rub-beam-gen","tpage_name":"stadium-vis-tfrag"}],[50725054,{"idx":190,"name":"timemap-precmetal-feet","tpage_name":"foresta-vis-pris"}],[79364194,{"idx":98,"name":"jakchires-pants","tpage_name":"wasseem-pris"}],[104267794,{"idx":18,"name":"rub-city-wall-inside-damaged","tpage_name":"stadium-vis-tfrag"}],[50725055,{"idx":191,"name":"timemap-precmetal-plain-large","tpage_name":"foresta-vis-pris"}],[79364195,{"idx":99,"name":"jakchires-precarmor-01","tpage_name":"wasseem-pris"}],[104267795,{"idx":19,"name":"rub-cement-broken-end","tpage_name":"stadium-vis-tfrag"}],[50725056,{"idx":192,"name":"timemap-precmetal-teeth","tpage_name":"foresta-vis-pris"}],[79364196,{"idx":100,"name":"jakchires-shoebottom","tpage_name":"wasseem-pris"}],[104267796,{"idx":20,"name":"stdmb-broken-light","tpage_name":"stadium-vis-tfrag"}],[50725057,{"idx":193,"name":"timemap-smallball-01","tpage_name":"foresta-vis-pris"}],[79364197,{"idx":101,"name":"jakchires-shoemetal","tpage_name":"wasseem-pris"}],[104267797,{"idx":21,"name":"stdm-wall-03","tpage_name":"stadium-vis-tfrag"}],[50725058,{"idx":194,"name":"timemap-smallball-02","tpage_name":"foresta-vis-pris"}],[79364198,{"idx":102,"name":"jakchires-shoeteop","tpage_name":"wasseem-pris"}],[104267798,{"idx":22,"name":"stdm-trim-03","tpage_name":"stadium-vis-tfrag"}],[50725059,{"idx":195,"name":"timemap-wordborder","tpage_name":"foresta-vis-pris"}],[79364199,{"idx":103,"name":"jakchires-teeth","tpage_name":"wasseem-pris"}],[104267799,{"idx":23,"name":"rub-pal-metal","tpage_name":"stadium-vis-tfrag"}],[50725060,{"idx":196,"name":"dm-ship-tentacle-01","tpage_name":"foresta-vis-pris"}],[79364200,{"idx":104,"name":"dk-sat-cable-01","tpage_name":"wasseem-pris"}],[104267800,{"idx":24,"name":"stdm-metal-01","tpage_name":"stadium-vis-tfrag"}],[79364201,{"idx":105,"name":"dk-sat-cable-02","tpage_name":"wasseem-pris"}],[104267801,{"idx":25,"name":"stdm-gar-girder-02","tpage_name":"stadium-vis-tfrag"}],[50725062,{"idx":198,"name":"precur-planet-water-01","tpage_name":"foresta-vis-pris"}],[79364202,{"idx":106,"name":"dk-sat-cable-03","tpage_name":"wasseem-pris"}],[104267802,{"idx":26,"name":"stdm-flowerbed-flowers-a","tpage_name":"stadium-vis-tfrag"}],[79364203,{"idx":107,"name":"dk-sat-claw-01","tpage_name":"wasseem-pris"}],[104267803,{"idx":27,"name":"stdm-flowerbed-small","tpage_name":"stadium-vis-tfrag"}],[79364204,{"idx":108,"name":"dk-sat-panel-01","tpage_name":"wasseem-pris"}],[104267804,{"idx":28,"name":"stdmb-lightpost-base","tpage_name":"stadium-vis-tfrag"}],[79364206,{"idx":110,"name":"dk-sat-rim-02","tpage_name":"wasseem-pris"}],[104267806,{"idx":30,"name":"stdmb-lightpost-base-02","tpage_name":"stadium-vis-tfrag"}],[79364207,{"idx":111,"name":"dk-sat-rim-03","tpage_name":"wasseem-pris"}],[104267807,{"idx":31,"name":"rub-stad-brick-pieces","tpage_name":"stadium-vis-tfrag"}],[79364217,{"idx":121,"name":"monk-eye-d","tpage_name":"wasseem-pris"}],[104267817,{"idx":41,"name":"rub-wall-gen-03","tpage_name":"stadium-vis-tfrag"}],[79364218,{"idx":122,"name":"monk-eye-f","tpage_name":"wasseem-pris"}],[104267818,{"idx":42,"name":"rub-city-wall-frame","tpage_name":"stadium-vis-tfrag"}],[79364222,{"idx":126,"name":"monk-face-04","tpage_name":"wasseem-pris"}],[104267822,{"idx":46,"name":"rub-cement-pillars","tpage_name":"stadium-vis-tfrag"}],[79364223,{"idx":127,"name":"monk-face-05","tpage_name":"wasseem-pris"}],[104267823,{"idx":47,"name":"rub-palace-tower-side","tpage_name":"stadium-vis-tfrag"}],[94371887,{"idx":47,"name":"palace-break-pillwall01","tpage_name":"intpfall-vis-pris"}],[104333327,{"idx":15,"name":"rub-met-strp-close","tpage_name":"stadium-vis-shrub"}],[94371888,{"idx":48,"name":"palace-break-pillwall02","tpage_name":"intpfall-vis-pris"}],[104333328,{"idx":16,"name":"rub-greyblue-plain-lowres","tpage_name":"stadium-vis-shrub"}],[94371889,{"idx":49,"name":"palace-break-pillwall03","tpage_name":"intpfall-vis-pris"}],[104333329,{"idx":17,"name":"rub-beam-gen","tpage_name":"stadium-vis-shrub"}],[94371890,{"idx":50,"name":"palace-break-pillwall04","tpage_name":"intpfall-vis-pris"}],[104333330,{"idx":18,"name":"rub-wall-small-grill","tpage_name":"stadium-vis-shrub"}],[94371891,{"idx":51,"name":"palace-break-pillwall05","tpage_name":"intpfall-vis-pris"}],[104333331,{"idx":19,"name":"rub-scorch","tpage_name":"stadium-vis-shrub"}],[94371893,{"idx":53,"name":"palace-break-pillwall07","tpage_name":"intpfall-vis-pris"}],[104333333,{"idx":21,"name":"rub-ground-01-small","tpage_name":"stadium-vis-shrub"}],[94371894,{"idx":54,"name":"palace-break-pillwall08","tpage_name":"intpfall-vis-pris"}],[104333334,{"idx":22,"name":"rub-crater-shards-01","tpage_name":"stadium-vis-shrub"}],[100990988,{"idx":12,"name":"jakb-eyebrow","tpage_name":"ljakklev-pris"}],[103481348,{"idx":4,"name":"des-rock-shrub-01","tpage_name":"deserta-vis-shrub"}],[38731988,{"idx":212,"name":"male2_05","tpage_name":"wasstada-sprite"}],[104726528,{"idx":0,"name":"bam-eyelight","tpage_name":"deshover-pris"}],[100990989,{"idx":13,"name":"jakb-eyelid","tpage_name":"ljakklev-pris"}],[38731989,{"idx":213,"name":"male2_06","tpage_name":"wasstada-sprite"}],[104726529,{"idx":1,"name":"bam-hairhilite","tpage_name":"deshover-pris"}],[100990990,{"idx":14,"name":"jakb-facelft","tpage_name":"ljakklev-pris"}],[38731990,{"idx":214,"name":"male2_07","tpage_name":"wasstada-sprite"}],[104726530,{"idx":2,"name":"daxter-eyelid","tpage_name":"deshover-pris"}],[100990992,{"idx":16,"name":"jakb-glovetop","tpage_name":"ljakklev-pris"}],[103481352,{"idx":8,"name":"des-pinetree-leaf-02","tpage_name":"deserta-vis-shrub"}],[38731992,{"idx":216,"name":"male2_09","tpage_name":"wasstada-sprite"}],[104726532,{"idx":4,"name":"daxter-orange","tpage_name":"deshover-pris"}],[38731994,{"idx":218,"name":"male2_11","tpage_name":"wasstada-sprite"}],[100990994,{"idx":18,"name":"jakb-horn","tpage_name":"ljakklev-pris"}],[104726534,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"deshover-pris"}],[38731996,{"idx":220,"name":"male2_13","tpage_name":"wasstada-sprite"}],[100990996,{"idx":20,"name":"jakb-jacketsleeve","tpage_name":"ljakklev-pris"}],[104726536,{"idx":8,"name":"daxterear","tpage_name":"deshover-pris"}],[38731997,{"idx":221,"name":"male2_14","tpage_name":"wasstada-sprite"}],[100990997,{"idx":21,"name":"jakb-leatherpouch","tpage_name":"ljakklev-pris"}],[104726537,{"idx":9,"name":"daxterfinger","tpage_name":"deshover-pris"}],[38731998,{"idx":222,"name":"male2_15","tpage_name":"wasstada-sprite"}],[100990998,{"idx":22,"name":"jakb-leatherstrap","tpage_name":"ljakklev-pris"}],[104726538,{"idx":10,"name":"daxterfoot","tpage_name":"deshover-pris"}],[38731999,{"idx":223,"name":"male2_16","tpage_name":"wasstada-sprite"}],[100990999,{"idx":23,"name":"jakb-lightbrownspat","tpage_name":"ljakklev-pris"}],[104726539,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"deshover-pris"}],[38732000,{"idx":224,"name":"male2_17","tpage_name":"wasstada-sprite"}],[100991000,{"idx":24,"name":"jakb-lightbrownstrap","tpage_name":"ljakklev-pris"}],[104726540,{"idx":12,"name":"daxtergoggles","tpage_name":"deshover-pris"}],[122159109,{"idx":5,"name":"facb-big-metal-panl04","tpage_name":"factoryb-vis-tfrag"}],[119668749,{"idx":13,"name":"citn-alllcotton","tpage_name":"ljinx-pris"}],[38732049,{"idx":273,"name":"male5_03","tpage_name":"wasstada-sprite"}],[104726589,{"idx":61,"name":"grunt-eye-01","tpage_name":"deshover-pris"}],[122159110,{"idx":6,"name":"facb_blue-metal-02","tpage_name":"factoryb-vis-tfrag"}],[38732050,{"idx":274,"name":"male5_04","tpage_name":"wasstada-sprite"}],[104726590,{"idx":62,"name":"grunt-gem-01","tpage_name":"deshover-pris"}],[122159111,{"idx":7,"name":"facb_redmetal-d-03","tpage_name":"factoryb-vis-tfrag"}],[119668751,{"idx":15,"name":"citn-allleather","tpage_name":"ljinx-pris"}],[38732051,{"idx":275,"name":"male5_05","tpage_name":"wasstada-sprite"}],[104726591,{"idx":63,"name":"grunt-hose","tpage_name":"deshover-pris"}],[122159112,{"idx":8,"name":"fac-tower-base-03","tpage_name":"factoryb-vis-tfrag"}],[38732052,{"idx":276,"name":"male5_06","tpage_name":"wasstada-sprite"}],[104726592,{"idx":64,"name":"grunt-metal-01","tpage_name":"deshover-pris"}],[122159113,{"idx":9,"name":"facb_redmetal-d-01b","tpage_name":"factoryb-vis-tfrag"}],[119668753,{"idx":17,"name":"citn-allleatherstrap","tpage_name":"ljinx-pris"}],[38732053,{"idx":277,"name":"male5_07","tpage_name":"wasstada-sprite"}],[104726593,{"idx":65,"name":"grunt-skin-02","tpage_name":"deshover-pris"}],[122159114,{"idx":10,"name":"fac-tower-06","tpage_name":"factoryb-vis-tfrag"}],[119668754,{"idx":18,"name":"citn-allleatherwrinkled","tpage_name":"ljinx-pris"}],[38732054,{"idx":278,"name":"male5_08","tpage_name":"wasstada-sprite"}],[104726594,{"idx":66,"name":"grunt-skin-03","tpage_name":"deshover-pris"}],[118489106,{"idx":18,"name":"sig-horn","tpage_name":"deshunt-pris2"}],[104792126,{"idx":62,"name":"wstlander-02-armor","tpage_name":"desresc-pris"}],[130940933,{"idx":5,"name":"holostatic-04","tpage_name":"deshover-sprite"}],[104792153,{"idx":89,"name":"dk-sat-rim-01","tpage_name":"desresc-pris"}],[104792154,{"idx":90,"name":"dk-sat-rim-02","tpage_name":"desresc-pris"}],[104792155,{"idx":91,"name":"dk-sat-rim-03","tpage_name":"desresc-pris"}],[104792156,{"idx":92,"name":"dk-sat-rim-bright-01","tpage_name":"desresc-pris"}],[104792157,{"idx":93,"name":"dk-sat-shell-01","tpage_name":"desresc-pris"}],[104857612,{"idx":12,"name":"daxtergoggles","tpage_name":"oasiscst-pris"}],[148766724,{"idx":4,"name":"jakc-chestplate-straps","tpage_name":"warpcast-pris"}],[117637224,{"idx":104,"name":"jakchires-leatherpouch","tpage_name":"destrack-pris"}],[104857613,{"idx":13,"name":"daxterheadwidenew","tpage_name":"oasiscst-pris"}],[148766725,{"idx":5,"name":"jakc-gogglemetal","tpage_name":"warpcast-pris"}],[117637225,{"idx":105,"name":"jakchires-lightbrownspat","tpage_name":"destrack-pris"}],[104857614,{"idx":14,"name":"daxterhelmetplain","tpage_name":"oasiscst-pris"}],[148766726,{"idx":6,"name":"jakc-lens","tpage_name":"warpcast-pris"}],[117637226,{"idx":106,"name":"jakchires-pants","tpage_name":"destrack-pris"}],[104857615,{"idx":15,"name":"daxterlense","tpage_name":"oasiscst-pris"}],[148766727,{"idx":7,"name":"jakc-scarf","tpage_name":"warpcast-pris"}],[117637227,{"idx":107,"name":"jakchires-precarmor-01","tpage_name":"destrack-pris"}],[109838336,{"idx":0,"name":"hud-vehicle-health-bar-01","tpage_name":"hanga-minimap"}],[104857616,{"idx":16,"name":"daxternose","tpage_name":"oasiscst-pris"}],[148766728,{"idx":8,"name":"jakc-scarfhanging","tpage_name":"warpcast-pris"}],[117637228,{"idx":108,"name":"jakchires-shoebottom","tpage_name":"destrack-pris"}],[109838337,{"idx":1,"name":"hud-glider-speed-01","tpage_name":"hanga-minimap"}],[104857617,{"idx":17,"name":"daxterteeth","tpage_name":"oasiscst-pris"}],[148766729,{"idx":9,"name":"jakc-skirt","tpage_name":"warpcast-pris"}],[117637229,{"idx":109,"name":"jakchires-shoemetal","tpage_name":"destrack-pris"}],[109838338,{"idx":2,"name":"hud-glider-speed-marker-01","tpage_name":"hanga-minimap"}],[104857618,{"idx":18,"name":"daxtertuft","tpage_name":"oasiscst-pris"}],[148766730,{"idx":10,"name":"jakc-waistband2","tpage_name":"warpcast-pris"}],[117637230,{"idx":110,"name":"jakchires-shoeteop","tpage_name":"destrack-pris"}],[104857619,{"idx":19,"name":"environment-oldmetal","tpage_name":"oasiscst-pris"}],[148766731,{"idx":11,"name":"jakc-wraps","tpage_name":"warpcast-pris"}],[117637231,{"idx":111,"name":"jakchires-teeth","tpage_name":"destrack-pris"}],[104857620,{"idx":20,"name":"jakc-armor","tpage_name":"oasiscst-pris"}],[104857621,{"idx":21,"name":"jakc-chestplate-straps","tpage_name":"oasiscst-pris"}],[104857622,{"idx":22,"name":"jakc-gogglemetal","tpage_name":"oasiscst-pris"}],[104857623,{"idx":23,"name":"jakc-lens","tpage_name":"oasiscst-pris"}],[112328707,{"idx":3,"name":"daxter-furhilite","tpage_name":"wascast-pris"}],[104857627,{"idx":27,"name":"jakc-wristband-a2","tpage_name":"oasiscst-pris"}],[112328708,{"idx":4,"name":"daxter-orange","tpage_name":"wascast-pris"}],[104857628,{"idx":28,"name":"jakchires-arm","tpage_name":"oasiscst-pris"}],[112328709,{"idx":5,"name":"daxterarm","tpage_name":"wascast-pris"}],[104857629,{"idx":29,"name":"jakchires-blackstrap","tpage_name":"oasiscst-pris"}],[112328710,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"wascast-pris"}],[104857630,{"idx":30,"name":"jakchires-brownstrap","tpage_name":"oasiscst-pris"}],[112328711,{"idx":7,"name":"daxterbolt","tpage_name":"wascast-pris"}],[104857631,{"idx":31,"name":"jakchires-brwnleather","tpage_name":"oasiscst-pris"}],[112328712,{"idx":8,"name":"daxterear","tpage_name":"wascast-pris"}],[104857632,{"idx":32,"name":"jakchires-chestplate","tpage_name":"oasiscst-pris"}],[112328713,{"idx":9,"name":"daxterfinger","tpage_name":"wascast-pris"}],[91160653,{"idx":77,"name":"jakc-armor","tpage_name":"gungame-vis-pris"}],[104857633,{"idx":33,"name":"jakchires-clips","tpage_name":"oasiscst-pris"}],[152502286,{"idx":14,"name":"temple_metal01","tpage_name":"templex-vis-tfrag"}],[148766746,{"idx":26,"name":"jakchires-horn","tpage_name":"warpcast-pris"}],[117637246,{"idx":126,"name":"wstlander-01-eye","tpage_name":"destrack-pris"}],[112328715,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"wascast-pris"}],[91160655,{"idx":79,"name":"jakc-gogglemetal","tpage_name":"gungame-vis-pris"}],[104857635,{"idx":35,"name":"jakchires-eyebrow","tpage_name":"oasiscst-pris"}],[152502287,{"idx":15,"name":"temple_sandstone_steptop01","tpage_name":"templex-vis-tfrag"}],[148766747,{"idx":27,"name":"jakchires-jacket","tpage_name":"warpcast-pris"}],[117637247,{"idx":127,"name":"wstlander-01-gunmetal-01","tpage_name":"destrack-pris"}],[112328716,{"idx":12,"name":"daxtergoggles","tpage_name":"wascast-pris"}],[91160656,{"idx":80,"name":"jakc-lens","tpage_name":"gungame-vis-pris"}],[104857636,{"idx":36,"name":"jakchires-eyelid","tpage_name":"oasiscst-pris"}],[152502288,{"idx":16,"name":"temple_sandstone_spikehole01","tpage_name":"templex-vis-tfrag"}],[148766748,{"idx":28,"name":"jakchires-leatherpouch","tpage_name":"warpcast-pris"}],[117637248,{"idx":128,"name":"wstlander-01-gunmetal-02","tpage_name":"destrack-pris"}],[112328717,{"idx":13,"name":"daxterheadwidenew","tpage_name":"wascast-pris"}],[91160657,{"idx":81,"name":"jakc-scarf","tpage_name":"gungame-vis-pris"}],[104857637,{"idx":37,"name":"jakchires-facelft","tpage_name":"oasiscst-pris"}],[152502289,{"idx":17,"name":"temple_sandstone_dirt01","tpage_name":"templex-vis-tfrag"}],[148766749,{"idx":29,"name":"jakchires-lightbrownspat","tpage_name":"warpcast-pris"}],[117637249,{"idx":129,"name":"wstlander-01-gunmetal-03","tpage_name":"destrack-pris"}],[91160658,{"idx":82,"name":"jakc-waistband2","tpage_name":"gungame-vis-pris"}],[112328718,{"idx":14,"name":"daxterhelmetplain","tpage_name":"wascast-pris"}],[104857638,{"idx":38,"name":"jakchires-facert","tpage_name":"oasiscst-pris"}],[152502290,{"idx":18,"name":"temple_sandstone_ground02","tpage_name":"templex-vis-tfrag"}],[148766750,{"idx":30,"name":"jakchires-pants","tpage_name":"warpcast-pris"}],[117637250,{"idx":130,"name":"wstlander-01-gunmetal-04","tpage_name":"destrack-pris"}],[112328719,{"idx":15,"name":"daxterlense","tpage_name":"wascast-pris"}],[91160659,{"idx":83,"name":"jakc-wraps","tpage_name":"gungame-vis-pris"}],[104857639,{"idx":39,"name":"jakchires-glovetop","tpage_name":"oasiscst-pris"}],[148766751,{"idx":31,"name":"jakchires-precarmor-01","tpage_name":"warpcast-pris"}],[117637251,{"idx":131,"name":"wstlander-01-head","tpage_name":"destrack-pris"}],[112328720,{"idx":16,"name":"daxternose","tpage_name":"wascast-pris"}],[91160660,{"idx":84,"name":"jakc-wristband-a2","tpage_name":"gungame-vis-pris"}],[104857640,{"idx":40,"name":"jakchires-hair","tpage_name":"oasiscst-pris"}],[152502292,{"idx":20,"name":"temple_sandstone_plat01","tpage_name":"templex-vis-tfrag"}],[148766752,{"idx":32,"name":"jakchires-shoebottom","tpage_name":"warpcast-pris"}],[117637252,{"idx":132,"name":"wstlander-01-leatherstrap","tpage_name":"destrack-pris"}],[112328721,{"idx":17,"name":"daxterteeth","tpage_name":"wascast-pris"}],[91160661,{"idx":85,"name":"jakchires-arm","tpage_name":"gungame-vis-pris"}],[104857641,{"idx":41,"name":"jakchires-horn","tpage_name":"oasiscst-pris"}],[152502293,{"idx":21,"name":"rail-env-wall-01","tpage_name":"templex-vis-tfrag"}],[148766753,{"idx":33,"name":"jakchires-shoemetal","tpage_name":"warpcast-pris"}],[117637253,{"idx":133,"name":"wstlander-01-mustache","tpage_name":"destrack-pris"}],[112328725,{"idx":21,"name":"environment-oldmetal","tpage_name":"wascast-pris"}],[91160665,{"idx":89,"name":"jakchires-chestplate","tpage_name":"gungame-vis-pris"}],[104857645,{"idx":45,"name":"jakchires-pants","tpage_name":"oasiscst-pris"}],[94961696,{"idx":32,"name":"jakchires-shoeteop","tpage_name":"lsigjakc-pris"}],[89980976,{"idx":48,"name":"des-egg-rim-01","tpage_name":"desertg-vis-tfrag"}],[104923136,{"idx":0,"name":"ashelin-beltbuckle","tpage_name":"oasiscst-pris2"}],[94961697,{"idx":33,"name":"jakchires-teeth","tpage_name":"lsigjakc-pris"}],[89980977,{"idx":49,"name":"des-egg-bottom","tpage_name":"desertg-vis-tfrag"}],[104923137,{"idx":1,"name":"ashelin-bolts","tpage_name":"oasiscst-pris2"}],[94961698,{"idx":34,"name":"jakc-skirt","tpage_name":"lsigjakc-pris"}],[89980978,{"idx":50,"name":"des-egg-gem-01","tpage_name":"desertg-vis-tfrag"}],[104923138,{"idx":2,"name":"ashelin-boottop","tpage_name":"oasiscst-pris2"}],[94961699,{"idx":35,"name":"jakc-scarfhanging","tpage_name":"lsigjakc-pris"}],[89980979,{"idx":51,"name":"des-cave-floor-01","tpage_name":"desertg-vis-tfrag"}],[104923139,{"idx":3,"name":"ashelin-brownstrap","tpage_name":"oasiscst-pris2"}],[104923140,{"idx":4,"name":"ashelin-cglogo","tpage_name":"oasiscst-pris2"}],[104923141,{"idx":5,"name":"ashelin-cgrank","tpage_name":"oasiscst-pris2"}],[104923142,{"idx":6,"name":"ashelin-chest","tpage_name":"oasiscst-pris2"}],[104923143,{"idx":7,"name":"ashelin-eye","tpage_name":"oasiscst-pris2"}],[104923144,{"idx":8,"name":"ashelin-eyebrow","tpage_name":"oasiscst-pris2"}],[104923145,{"idx":9,"name":"ashelin-eyelid","tpage_name":"oasiscst-pris2"}],[104923146,{"idx":10,"name":"ashelin-face","tpage_name":"oasiscst-pris2"}],[104923147,{"idx":11,"name":"ashelin-glove","tpage_name":"oasiscst-pris2"}],[106168328,{"idx":8,"name":"common-black","tpage_name":"mined-tfrag"}],[104923148,{"idx":12,"name":"ashelin-gunbarrel-01","tpage_name":"oasiscst-pris2"}],[104923149,{"idx":13,"name":"ashelin-gunbarrel-02","tpage_name":"oasiscst-pris2"}],[106168330,{"idx":10,"name":"minc-blue-paint-rust04","tpage_name":"mined-tfrag"}],[104923150,{"idx":14,"name":"ashelin-gunbarrel-03","tpage_name":"oasiscst-pris2"}],[104923151,{"idx":15,"name":"ashelin-gunholster","tpage_name":"oasiscst-pris2"}],[104923152,{"idx":16,"name":"ashelin-hair","tpage_name":"oasiscst-pris2"}],[104923153,{"idx":17,"name":"ashelin-handle-01","tpage_name":"oasiscst-pris2"}],[104923154,{"idx":18,"name":"ashelin-jacketbody","tpage_name":"oasiscst-pris2"}],[106168335,{"idx":15,"name":"minc-door-metal-01","tpage_name":"mined-tfrag"}],[104923155,{"idx":19,"name":"ashelin-jacketsleeve","tpage_name":"oasiscst-pris2"}],[111149056,{"idx":0,"name":"map-wasdoors","tpage_name":"wasdoors-minimap"}],[104923156,{"idx":20,"name":"ashelin-jacketstraps","tpage_name":"oasiscst-pris2"}],[104923157,{"idx":21,"name":"ashelin-pantstop","tpage_name":"oasiscst-pris2"}],[104923158,{"idx":22,"name":"ashelin-redtop","tpage_name":"oasiscst-pris2"}],[104923159,{"idx":23,"name":"ashelin-shells","tpage_name":"oasiscst-pris2"}],[106168342,{"idx":22,"name":"minc-safe-plate-01","tpage_name":"mined-tfrag"}],[112394242,{"idx":2,"name":"des-transport-can","tpage_name":"desrescg-pris"}],[104923162,{"idx":26,"name":"ashelin-shoemetal","tpage_name":"oasiscst-pris2"}],[112394243,{"idx":3,"name":"des-transport-cowcatch","tpage_name":"desrescg-pris"}],[106168343,{"idx":23,"name":"minc-metal-patch-01","tpage_name":"mined-tfrag"}],[104923163,{"idx":27,"name":"ashelin-teeth","tpage_name":"oasiscst-pris2"}],[100073497,{"idx":25,"name":"jakb-pants","tpage_name":"ljak-pris"}],[105054217,{"idx":9,"name":"ashelin-lo-eye","tpage_name":"desoasis-pris"}],[100073498,{"idx":26,"name":"jakb-scarf","tpage_name":"ljak-pris"}],[105054218,{"idx":10,"name":"ashelin-lo-eyebrow","tpage_name":"desoasis-pris"}],[100073499,{"idx":27,"name":"jakb-shoebottom","tpage_name":"ljak-pris"}],[105054219,{"idx":11,"name":"ashelin-lo-face","tpage_name":"desoasis-pris"}],[100073500,{"idx":28,"name":"jakb-shoemetal","tpage_name":"ljak-pris"}],[105054220,{"idx":12,"name":"ashelin-lo-glove","tpage_name":"desoasis-pris"}],[100073501,{"idx":29,"name":"jakb-shoeteop","tpage_name":"ljak-pris"}],[105054221,{"idx":13,"name":"ashelin-lo-gunbarrel-01","tpage_name":"desoasis-pris"}],[105054222,{"idx":14,"name":"ashelin-lo-gunbarrel-02","tpage_name":"desoasis-pris"}],[105054223,{"idx":15,"name":"ashelin-lo-gunbarrel-03","tpage_name":"desoasis-pris"}],[105054224,{"idx":16,"name":"ashelin-lo-gunholster","tpage_name":"desoasis-pris"}],[105054225,{"idx":17,"name":"ashelin-lo-hair","tpage_name":"desoasis-pris"}],[105054226,{"idx":18,"name":"ashelin-lo-handle-01","tpage_name":"desoasis-pris"}],[105054227,{"idx":19,"name":"ashelin-lo-jacketbody","tpage_name":"desoasis-pris"}],[105054228,{"idx":20,"name":"ashelin-lo-jacketsleeve","tpage_name":"desoasis-pris"}],[111280129,{"idx":1,"name":"ceiling-dust","tpage_name":"lwassig-sprite"}],[105054229,{"idx":21,"name":"ashelin-lo-jacketstraps","tpage_name":"desoasis-pris"}],[105054230,{"idx":22,"name":"ashelin-lo-pantstop","tpage_name":"desoasis-pris"}],[105054231,{"idx":23,"name":"ashelin-lo-redtop","tpage_name":"desoasis-pris"}],[112525312,{"idx":0,"name":"bam-eyelight","tpage_name":"desrescc-pris"}],[105054232,{"idx":24,"name":"ashelin-lo-shells","tpage_name":"desoasis-pris"}],[112525313,{"idx":1,"name":"bam-hairhilite","tpage_name":"desrescc-pris"}],[105054233,{"idx":25,"name":"ashelin-lo-shield","tpage_name":"desoasis-pris"}],[112525314,{"idx":2,"name":"daxter-eyelid","tpage_name":"desrescc-pris"}],[105054234,{"idx":26,"name":"ashelin-lo-shoebottom","tpage_name":"desoasis-pris"}],[112525315,{"idx":3,"name":"daxter-furhilite","tpage_name":"desrescc-pris"}],[105054235,{"idx":27,"name":"ashelin-lo-shoemetal","tpage_name":"desoasis-pris"}],[112525316,{"idx":4,"name":"daxter-orange","tpage_name":"desrescc-pris"}],[105054236,{"idx":28,"name":"ashelin-lo-whitestrap","tpage_name":"desoasis-pris"}],[134938638,{"idx":14,"name":"ctyn-stain-wall-01","tpage_name":"rubbleb-vis-shrub"}],[105054318,{"idx":110,"name":"vehicle-brace-pipe-01","tpage_name":"desoasis-pris"}],[134938639,{"idx":15,"name":"rub-crater-shards-01","tpage_name":"rubbleb-vis-shrub"}],[105054319,{"idx":111,"name":"vehicle-cap-pin-01","tpage_name":"desoasis-pris"}],[134938646,{"idx":22,"name":"rub-stain-01","tpage_name":"rubbleb-vis-shrub"}],[105054326,{"idx":118,"name":"vehicle-wheel-01","tpage_name":"desoasis-pris"}],[134938647,{"idx":23,"name":"rub-blotch-withstreaks-01","tpage_name":"rubbleb-vis-shrub"}],[105054327,{"idx":119,"name":"vehicle-wheel-blur-01","tpage_name":"desoasis-pris"}],[142409728,{"idx":0,"name":"des-beast-brown-tube","tpage_name":"desbattl-pris2"}],[105054328,{"idx":120,"name":"backThing01","tpage_name":"desoasis-pris"}],[142409729,{"idx":1,"name":"des-beast-eye","tpage_name":"desbattl-pris2"}],[105054329,{"idx":121,"name":"dash01","tpage_name":"desoasis-pris"}],[142409730,{"idx":2,"name":"des-beast-feet","tpage_name":"desbattl-pris2"}],[105054330,{"idx":122,"name":"gauge01","tpage_name":"desoasis-pris"}],[142409731,{"idx":3,"name":"des-beast-gunend","tpage_name":"desbattl-pris2"}],[105054331,{"idx":123,"name":"grillRim01","tpage_name":"desoasis-pris"}],[142409732,{"idx":4,"name":"des-beast-leg","tpage_name":"desbattl-pris2"}],[105054332,{"idx":124,"name":"gunBoxBack01","tpage_name":"desoasis-pris"}],[142409733,{"idx":5,"name":"des-beast-metal-01","tpage_name":"desbattl-pris2"}],[105054333,{"idx":125,"name":"gunBoxFront01","tpage_name":"desoasis-pris"}],[142409734,{"idx":6,"name":"des-beast-metal-02","tpage_name":"desbattl-pris2"}],[105054334,{"idx":126,"name":"gunbox01","tpage_name":"desoasis-pris"}],[142409735,{"idx":7,"name":"des-beast-metal-cap","tpage_name":"desbattl-pris2"}],[105054335,{"idx":127,"name":"gunbox02","tpage_name":"desoasis-pris"}],[144900096,{"idx":0,"name":"minc-pre-12","tpage_name":"combn-water"}],[142409736,{"idx":8,"name":"des-beast-metal-riveting","tpage_name":"desbattl-pris2"}],[105054336,{"idx":128,"name":"hood01","tpage_name":"desoasis-pris"}],[142409737,{"idx":9,"name":"des-beast-metal-teeth","tpage_name":"desbattl-pris2"}],[105054337,{"idx":129,"name":"jetTop01","tpage_name":"desoasis-pris"}],[142409738,{"idx":10,"name":"des-beast-mouth","tpage_name":"desbattl-pris2"}],[105054338,{"idx":130,"name":"jets01","tpage_name":"desoasis-pris"}],[142409739,{"idx":11,"name":"des-beast-nails","tpage_name":"desbattl-pris2"}],[105054339,{"idx":131,"name":"kcfrontend01","tpage_name":"desoasis-pris"}],[142409740,{"idx":12,"name":"des-beast-skin","tpage_name":"desbattl-pris2"}],[105054340,{"idx":132,"name":"light01","tpage_name":"desoasis-pris"}],[105054341,{"idx":133,"name":"lightCase01","tpage_name":"desoasis-pris"}],[105054342,{"idx":134,"name":"post01","tpage_name":"desoasis-pris"}],[105054343,{"idx":135,"name":"rail01","tpage_name":"desoasis-pris"}],[147390464,{"idx":0,"name":"bam-eyelight","tpage_name":"powergd-pris"}],[105054344,{"idx":136,"name":"seat01","tpage_name":"desoasis-pris"}],[147390465,{"idx":1,"name":"cguard1-backmetal","tpage_name":"powergd-pris"}],[105054345,{"idx":137,"name":"stripe03","tpage_name":"desoasis-pris"}],[147390466,{"idx":2,"name":"cguard1-chestplate","tpage_name":"powergd-pris"}],[105054346,{"idx":138,"name":"turret01","tpage_name":"desoasis-pris"}],[147390467,{"idx":3,"name":"cguard1-gunmetaldark2","tpage_name":"powergd-pris"}],[105054347,{"idx":139,"name":"wing01","tpage_name":"desoasis-pris"}],[147390468,{"idx":4,"name":"cguard1-guntube","tpage_name":"powergd-pris"}],[105054348,{"idx":140,"name":"wing02","tpage_name":"desoasis-pris"}],[147390469,{"idx":5,"name":"cguard1-lens","tpage_name":"powergd-pris"}],[105054349,{"idx":141,"name":"wing02grey01","tpage_name":"desoasis-pris"}],[147390470,{"idx":6,"name":"cguardgame-metaledark-02","tpage_name":"powergd-pris"}],[105054350,{"idx":142,"name":"intcept-b-base-green01","tpage_name":"desoasis-pris"}],[147390471,{"idx":7,"name":"cguardgame-metallight-01small","tpage_name":"powergd-pris"}],[105054351,{"idx":143,"name":"intcept-b-base-patern01","tpage_name":"desoasis-pris"}],[147390472,{"idx":8,"name":"environment-oldmetal","tpage_name":"powergd-pris"}],[105054352,{"idx":144,"name":"intcept-b-base-patern02","tpage_name":"desoasis-pris"}],[147390473,{"idx":9,"name":"grunt-eye-01","tpage_name":"powergd-pris"}],[105054353,{"idx":145,"name":"intcept-b-gun01","tpage_name":"desoasis-pris"}],[147390474,{"idx":10,"name":"grunt-gem-01","tpage_name":"powergd-pris"}],[105054354,{"idx":146,"name":"intcept-b-pipe01","tpage_name":"desoasis-pris"}],[147390475,{"idx":11,"name":"grunt-hose","tpage_name":"powergd-pris"}],[105054355,{"idx":147,"name":"intcept-b-teeth01","tpage_name":"desoasis-pris"}],[108920839,{"idx":7,"name":"dk-sat-rim-03","tpage_name":"waspgame-pris"}],[106430479,{"idx":15,"name":"bam-hairhilite","tpage_name":"desliz-pris"}],[105185299,{"idx":19,"name":"ashelin-jacketsleeve","tpage_name":"desoasis-pris2"}],[108920841,{"idx":9,"name":"dk-sat-screen-01","tpage_name":"waspgame-pris"}],[106430481,{"idx":17,"name":"klever-armor-01","tpage_name":"desliz-pris"}],[105185301,{"idx":21,"name":"ashelin-pantstop","tpage_name":"desoasis-pris2"}],[108920842,{"idx":10,"name":"dk-sat-screen-rim-01","tpage_name":"waspgame-pris"}],[106430482,{"idx":18,"name":"klever-armor-02","tpage_name":"desliz-pris"}],[105185302,{"idx":22,"name":"ashelin-redtop","tpage_name":"desoasis-pris2"}],[108920843,{"idx":11,"name":"dk-sat-shell-01","tpage_name":"waspgame-pris"}],[106430483,{"idx":19,"name":"klever-blackstrap","tpage_name":"desliz-pris"}],[105185303,{"idx":23,"name":"ashelin-shells","tpage_name":"desoasis-pris2"}],[108920844,{"idx":12,"name":"dk-sat-heart-01","tpage_name":"waspgame-pris"}],[106430484,{"idx":20,"name":"klever-bolt","tpage_name":"desliz-pris"}],[105185304,{"idx":24,"name":"ashelin-shield","tpage_name":"desoasis-pris2"}],[108920845,{"idx":13,"name":"dk-sat-ring-01","tpage_name":"waspgame-pris"}],[106430485,{"idx":21,"name":"klever-brownstrap","tpage_name":"desliz-pris"}],[105185305,{"idx":25,"name":"ashelin-shoebottom","tpage_name":"desoasis-pris2"}],[108920846,{"idx":14,"name":"dk-sat-heart-vein-01","tpage_name":"waspgame-pris"}],[106430486,{"idx":22,"name":"klever-chest","tpage_name":"desliz-pris"}],[105185306,{"idx":26,"name":"ashelin-shoemetal","tpage_name":"desoasis-pris2"}],[108920847,{"idx":15,"name":"dk-sat-game-circle-01","tpage_name":"waspgame-pris"}],[106430487,{"idx":23,"name":"klever-clips","tpage_name":"desliz-pris"}],[105185307,{"idx":27,"name":"ashelin-teeth","tpage_name":"desoasis-pris2"}],[108920848,{"idx":16,"name":"dk-sat-game-ex-01","tpage_name":"waspgame-pris"}],[106430488,{"idx":24,"name":"klever-earcup","tpage_name":"desliz-pris"}],[105185308,{"idx":28,"name":"ashelin-whitestrap","tpage_name":"desoasis-pris2"}],[108920849,{"idx":17,"name":"dk-sat-game-square-01","tpage_name":"waspgame-pris"}],[106430489,{"idx":25,"name":"klever-eye","tpage_name":"desliz-pris"}],[105185309,{"idx":29,"name":"bam-eyelight","tpage_name":"desoasis-pris2"}],[108920850,{"idx":18,"name":"dk-sat-game-tri-01","tpage_name":"waspgame-pris"}],[106430490,{"idx":26,"name":"klever-eyelid","tpage_name":"desliz-pris"}],[105185310,{"idx":30,"name":"bam-hairhilite","tpage_name":"desoasis-pris2"}],[108920851,{"idx":19,"name":"environment-darkprec","tpage_name":"waspgame-pris"}],[106430491,{"idx":27,"name":"klever-face-01","tpage_name":"desliz-pris"}],[105185311,{"idx":31,"name":"environment-oldmetal","tpage_name":"desoasis-pris2"}],[100663315,{"idx":19,"name":"jakb-jacketbody","tpage_name":"ljaksig-pris"}],[75759715,{"idx":99,"name":"jakchires-facelft","tpage_name":"onintent-pris"}],[90701875,{"idx":51,"name":"des-cliff-top-03","tpage_name":"desertf-vis-tfrag"}],[96927775,{"idx":31,"name":"jinx-belt","tpage_name":"ltornjnx-pris2"}],[99418135,{"idx":23,"name":"jakc-lens","tpage_name":"volcanox-pris"}],[105644035,{"idx":3,"name":"hud-small-frame-02","tpage_name":"mined-minimap"}],[118620161,{"idx":1,"name":"bam-hairhilite","tpage_name":"ljkcdmkl-pris"}],[112394261,{"idx":21,"name":"des-transport-window","tpage_name":"desrescg-pris"}],[106168361,{"idx":41,"name":"mined_rostone-01","tpage_name":"mined-tfrag"}],[118620166,{"idx":6,"name":"jakc-lens","tpage_name":"ljkcdmkl-pris"}],[112394266,{"idx":26,"name":"intcept-pipe01","tpage_name":"desrescg-pris"}],[106168366,{"idx":46,"name":"minc-ox-pipe-01","tpage_name":"mined-tfrag"}],[121110528,{"idx":0,"name":"hip-tmetfloor11","tpage_name":"hiphog-vis-tfrag"}],[118620168,{"idx":8,"name":"jakc-scarfhanging","tpage_name":"ljkcdmkl-pris"}],[112394268,{"idx":28,"name":"intcept-tread01","tpage_name":"desrescg-pris"}],[106168368,{"idx":48,"name":"mined-pillar-molten","tpage_name":"mined-tfrag"}],[91291696,{"idx":48,"name":"gun-lamp-metal-01","tpage_name":"gungame-vis-tfrag"}],[106233856,{"idx":0,"name":"prebot-envmap","tpage_name":"mined-pris"}],[91291697,{"idx":49,"name":"gun-lamp-metal-02","tpage_name":"gungame-vis-tfrag"}],[106233857,{"idx":1,"name":"prebot-eye","tpage_name":"mined-pris"}],[91291698,{"idx":50,"name":"gun-leather","tpage_name":"gungame-vis-tfrag"}],[106233858,{"idx":2,"name":"prebot-eye-reflection","tpage_name":"mined-pris"}],[91291699,{"idx":51,"name":"gun-light-01","tpage_name":"gungame-vis-tfrag"}],[106233859,{"idx":3,"name":"prebot-innermetal","tpage_name":"mined-pris"}],[91291700,{"idx":52,"name":"gun-lightwall-01","tpage_name":"gungame-vis-tfrag"}],[106233860,{"idx":4,"name":"prebot-orange","tpage_name":"mined-pris"}],[91291701,{"idx":53,"name":"gun-magport","tpage_name":"gungame-vis-tfrag"}],[106233861,{"idx":5,"name":"prebot-tentacles","tpage_name":"mined-pris"}],[91291702,{"idx":54,"name":"gun-main","tpage_name":"gungame-vis-tfrag"}],[106233862,{"idx":6,"name":"bam-eyelight","tpage_name":"mined-pris"}],[91291703,{"idx":55,"name":"gun-metal-01","tpage_name":"gungame-vis-tfrag"}],[106233863,{"idx":7,"name":"bam-hairhilite","tpage_name":"mined-pris"}],[91291704,{"idx":56,"name":"gun-metal-02","tpage_name":"gungame-vis-tfrag"}],[106233864,{"idx":8,"name":"daxter-eyelid","tpage_name":"mined-pris"}],[91291705,{"idx":57,"name":"gun-metal-03","tpage_name":"gungame-vis-tfrag"}],[106233865,{"idx":9,"name":"daxter-furhilite","tpage_name":"mined-pris"}],[91291706,{"idx":58,"name":"gun-metal-03b","tpage_name":"gungame-vis-tfrag"}],[106233866,{"idx":10,"name":"daxter-orange","tpage_name":"mined-pris"}],[91291707,{"idx":59,"name":"gun-metal-block-04","tpage_name":"gungame-vis-tfrag"}],[106233867,{"idx":11,"name":"daxterarm","tpage_name":"mined-pris"}],[91291708,{"idx":60,"name":"gun-metal-darker-01","tpage_name":"gungame-vis-tfrag"}],[106233868,{"idx":12,"name":"daxterbodyshort-eix","tpage_name":"mined-pris"}],[91291709,{"idx":61,"name":"gun-metal-darker-02","tpage_name":"gungame-vis-tfrag"}],[106233869,{"idx":13,"name":"daxterbolt","tpage_name":"mined-pris"}],[91291710,{"idx":62,"name":"gun-metal-rim-01","tpage_name":"gungame-vis-tfrag"}],[106233870,{"idx":14,"name":"daxterear","tpage_name":"mined-pris"}],[91291711,{"idx":63,"name":"gun-pavement-01","tpage_name":"gungame-vis-tfrag"}],[106233871,{"idx":15,"name":"daxterfinger","tpage_name":"mined-pris"}],[91291712,{"idx":64,"name":"gun-pump","tpage_name":"gungame-vis-tfrag"}],[106233872,{"idx":16,"name":"daxterfoot","tpage_name":"mined-pris"}],[91291713,{"idx":65,"name":"gun-roof-01","tpage_name":"gungame-vis-tfrag"}],[106233873,{"idx":17,"name":"daxterfoot-bottom","tpage_name":"mined-pris"}],[91291714,{"idx":66,"name":"gun-rubber-01","tpage_name":"gungame-vis-tfrag"}],[106233874,{"idx":18,"name":"daxtergoggles","tpage_name":"mined-pris"}],[91291715,{"idx":67,"name":"gun-track-01","tpage_name":"gungame-vis-tfrag"}],[106233875,{"idx":19,"name":"daxterheadwidenew","tpage_name":"mined-pris"}],[91291717,{"idx":69,"name":"gun-vent-01","tpage_name":"gungame-vis-tfrag"}],[106233877,{"idx":21,"name":"daxterlense","tpage_name":"mined-pris"}],[91291718,{"idx":70,"name":"hip-tmetfloor04","tpage_name":"gungame-vis-tfrag"}],[106233878,{"idx":22,"name":"daxternose","tpage_name":"mined-pris"}],[91291719,{"idx":71,"name":"hip-tmetring02","tpage_name":"gungame-vis-tfrag"}],[106233879,{"idx":23,"name":"daxterteeth","tpage_name":"mined-pris"}],[91291720,{"idx":72,"name":"hip-twood01","tpage_name":"gungame-vis-tfrag"}],[106233880,{"idx":24,"name":"daxtertuft","tpage_name":"mined-pris"}],[91291721,{"idx":73,"name":"sewer-rubber-rim-01","tpage_name":"gungame-vis-tfrag"}],[106233881,{"idx":25,"name":"mine-blue-metal-01","tpage_name":"mined-pris"}],[106233882,{"idx":26,"name":"mine-can-metal-01","tpage_name":"mined-pris"}],[106233883,{"idx":27,"name":"mine-caution-metal-01","tpage_name":"mined-pris"}],[106233884,{"idx":28,"name":"mine-decal-metal-01","tpage_name":"mined-pris"}],[106233885,{"idx":29,"name":"mine-gray-metal-01","tpage_name":"mined-pris"}],[106233886,{"idx":30,"name":"mine-metal-wheel-01","tpage_name":"mined-pris"}],[106233887,{"idx":31,"name":"mine-pipe-metal-01","tpage_name":"mined-pris"}],[106233888,{"idx":32,"name":"mine-red-big-metal-01","tpage_name":"mined-pris"}],[106233889,{"idx":33,"name":"mine-red-metal-01","tpage_name":"mined-pris"}],[106233890,{"idx":34,"name":"mine-red-paint-rust05","tpage_name":"mined-pris"}],[106233891,{"idx":35,"name":"mine-red-stripe-metal-01","tpage_name":"mined-pris"}],[106233892,{"idx":36,"name":"mine-red-white-metal-01","tpage_name":"mined-pris"}],[106233893,{"idx":37,"name":"mine-rust-01","tpage_name":"mined-pris"}],[106233894,{"idx":38,"name":"mine-slate-metal-01","tpage_name":"mined-pris"}],[106233895,{"idx":39,"name":"mine-under-metal-01","tpage_name":"mined-pris"}],[118685696,{"idx":0,"name":"bam-eyelight","tpage_name":"ljkcdmkl-pris2"}],[106233896,{"idx":40,"name":"mine-white-stripe-metal-01","tpage_name":"mined-pris"}],[118685697,{"idx":1,"name":"environment-oldmetal","tpage_name":"ljkcdmkl-pris2"}],[106233897,{"idx":41,"name":"environment-oldmetal","tpage_name":"mined-pris"}],[118685698,{"idx":2,"name":"king-arm","tpage_name":"ljkcdmkl-pris2"}],[106233898,{"idx":42,"name":"jakc-armor","tpage_name":"mined-pris"}],[118685699,{"idx":3,"name":"king-blackskirt2","tpage_name":"ljkcdmkl-pris2"}],[106233899,{"idx":43,"name":"jakc-chestplate-straps","tpage_name":"mined-pris"}],[119930880,{"idx":0,"name":"logo-circuit","tpage_name":"title-pris"}],[118685700,{"idx":4,"name":"king-bluemetal","tpage_name":"ljkcdmkl-pris2"}],[106233900,{"idx":44,"name":"jakc-gogglemetal","tpage_name":"mined-pris"}],[119930881,{"idx":1,"name":"logo-jak","tpage_name":"title-pris"}],[118685701,{"idx":5,"name":"king-bolt","tpage_name":"ljkcdmkl-pris2"}],[106233901,{"idx":45,"name":"jakc-lens","tpage_name":"mined-pris"}],[118685702,{"idx":6,"name":"king-chest","tpage_name":"ljkcdmkl-pris2"}],[106233902,{"idx":46,"name":"jakc-scarf","tpage_name":"mined-pris"}],[119930883,{"idx":3,"name":"logo-black","tpage_name":"title-pris"}],[118685703,{"idx":7,"name":"king-clip-02","tpage_name":"ljkcdmkl-pris2"}],[106233903,{"idx":47,"name":"jakc-waistband2","tpage_name":"mined-pris"}],[121176064,{"idx":0,"name":"bam-eyelight","tpage_name":"hiphog-vis-pris"}],[118685704,{"idx":8,"name":"king-ear","tpage_name":"ljkcdmkl-pris2"}],[106233904,{"idx":48,"name":"jakc-wraps","tpage_name":"mined-pris"}],[121176065,{"idx":1,"name":"bam-hairhilite","tpage_name":"hiphog-vis-pris"}],[118685705,{"idx":9,"name":"king-earing","tpage_name":"ljkcdmkl-pris2"}],[106233905,{"idx":49,"name":"jakc-wristband-a2","tpage_name":"mined-pris"}],[121176066,{"idx":2,"name":"daxter-eyelid","tpage_name":"hiphog-vis-pris"}],[118685706,{"idx":10,"name":"king-face-01","tpage_name":"ljkcdmkl-pris2"}],[106233906,{"idx":50,"name":"jakchires-arm","tpage_name":"mined-pris"}],[121176067,{"idx":3,"name":"daxter-furhilite","tpage_name":"hiphog-vis-pris"}],[118685707,{"idx":11,"name":"king-finger","tpage_name":"ljkcdmkl-pris2"}],[106233907,{"idx":51,"name":"jakchires-blackstrap","tpage_name":"mined-pris"}],[121176068,{"idx":4,"name":"daxter-orange","tpage_name":"hiphog-vis-pris"}],[118685708,{"idx":12,"name":"king-greenmetal","tpage_name":"ljkcdmkl-pris2"}],[106233908,{"idx":52,"name":"jakchires-brownstrap","tpage_name":"mined-pris"}],[121176069,{"idx":5,"name":"daxterarm","tpage_name":"hiphog-vis-pris"}],[118685709,{"idx":13,"name":"king-greenmetalplain","tpage_name":"ljkcdmkl-pris2"}],[106233909,{"idx":53,"name":"jakchires-brwnleather","tpage_name":"mined-pris"}],[121176070,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"hiphog-vis-pris"}],[118685710,{"idx":14,"name":"king-hair","tpage_name":"ljkcdmkl-pris2"}],[106233910,{"idx":54,"name":"jakchires-chestplate","tpage_name":"mined-pris"}],[121176071,{"idx":7,"name":"daxterbolt","tpage_name":"hiphog-vis-pris"}],[118685711,{"idx":15,"name":"king-hand","tpage_name":"ljkcdmkl-pris2"}],[106233911,{"idx":55,"name":"jakchires-clips","tpage_name":"mined-pris"}],[121176072,{"idx":8,"name":"daxterear","tpage_name":"hiphog-vis-pris"}],[118685712,{"idx":16,"name":"king-horn","tpage_name":"ljkcdmkl-pris2"}],[106233912,{"idx":56,"name":"jakchires-eye","tpage_name":"mined-pris"}],[121176073,{"idx":9,"name":"daxterfinger","tpage_name":"hiphog-vis-pris"}],[118685713,{"idx":17,"name":"king-iris","tpage_name":"ljkcdmkl-pris2"}],[106233913,{"idx":57,"name":"jakchires-eyebrow","tpage_name":"mined-pris"}],[121176075,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"hiphog-vis-pris"}],[118685715,{"idx":19,"name":"king-lgblackstrap","tpage_name":"ljkcdmkl-pris2"}],[106233915,{"idx":59,"name":"jakchires-facelft","tpage_name":"mined-pris"}],[121176077,{"idx":13,"name":"daxterheadwidenew","tpage_name":"hiphog-vis-pris"}],[118685717,{"idx":21,"name":"king-precursermetal-plain","tpage_name":"ljkcdmkl-pris2"}],[106233917,{"idx":61,"name":"jakchires-glovetop","tpage_name":"mined-pris"}],[121176078,{"idx":14,"name":"daxterhelmetplain","tpage_name":"hiphog-vis-pris"}],[118685718,{"idx":22,"name":"king-precursermetal-trim","tpage_name":"ljkcdmkl-pris2"}],[106233918,{"idx":62,"name":"jakchires-hair","tpage_name":"mined-pris"}],[121176079,{"idx":15,"name":"daxterlense","tpage_name":"hiphog-vis-pris"}],[118685719,{"idx":23,"name":"king-precursermetal-trim2","tpage_name":"ljkcdmkl-pris2"}],[106233919,{"idx":63,"name":"jakchires-horn","tpage_name":"mined-pris"}],[126156800,{"idx":0,"name":"sewer-metal-block-06","tpage_name":"sewo-vis-tfrag"}],[121176080,{"idx":16,"name":"daxternose","tpage_name":"hiphog-vis-pris"}],[118685720,{"idx":24,"name":"king-precursermetal-trimbolt","tpage_name":"ljkcdmkl-pris2"}],[106233920,{"idx":64,"name":"jakchires-jacket","tpage_name":"mined-pris"}],[126156801,{"idx":1,"name":"sewer-metal-block-04","tpage_name":"sewo-vis-tfrag"}],[121176081,{"idx":17,"name":"daxterteeth","tpage_name":"hiphog-vis-pris"}],[118685721,{"idx":25,"name":"king-shoebottom","tpage_name":"ljkcdmkl-pris2"}],[106233921,{"idx":65,"name":"jakchires-leatherpouch","tpage_name":"mined-pris"}],[126156802,{"idx":2,"name":"sewer-pipe-rim-05","tpage_name":"sewo-vis-tfrag"}],[121176082,{"idx":18,"name":"daxtertuft","tpage_name":"hiphog-vis-pris"}],[118685722,{"idx":26,"name":"king-skirt","tpage_name":"ljkcdmkl-pris2"}],[106233922,{"idx":66,"name":"jakchires-lightbrownspat","tpage_name":"mined-pris"}],[126156809,{"idx":9,"name":"sewer-lip-01","tpage_name":"sewo-vis-tfrag"}],[121176089,{"idx":25,"name":"jakc-scarfhanging","tpage_name":"hiphog-vis-pris"}],[118685729,{"idx":33,"name":"king-wraps","tpage_name":"ljkcdmkl-pris2"}],[106233929,{"idx":73,"name":"minc-blue-paint-rust01","tpage_name":"mined-pris"}],[126156810,{"idx":10,"name":"sewer-block-01","tpage_name":"sewo-vis-tfrag"}],[121176090,{"idx":26,"name":"jakc-skirt","tpage_name":"hiphog-vis-pris"}],[118685730,{"idx":34,"name":"king-wristband","tpage_name":"ljkcdmkl-pris2"}],[106233930,{"idx":74,"name":"minc-blue-paint-rust05","tpage_name":"mined-pris"}],[126156811,{"idx":11,"name":"sewer-pipe-rim-10","tpage_name":"sewo-vis-tfrag"}],[121176091,{"idx":27,"name":"jakc-waistband2","tpage_name":"hiphog-vis-pris"}],[106233931,{"idx":75,"name":"minc-rust-01","tpage_name":"mined-pris"}],[126156815,{"idx":15,"name":"sewer-pipe-rim-07-hitweak","tpage_name":"sewo-vis-tfrag"}],[121176095,{"idx":31,"name":"jakchires-blackstrap","tpage_name":"hiphog-vis-pris"}],[106233935,{"idx":79,"name":"minc-blue-paint-01","tpage_name":"mined-pris"}],[126156816,{"idx":16,"name":"common-black","tpage_name":"sewo-vis-tfrag"}],[121176096,{"idx":32,"name":"jakchires-brownstrap","tpage_name":"hiphog-vis-pris"}],[106233936,{"idx":80,"name":"minc-crate-02","tpage_name":"mined-pris"}],[126156817,{"idx":17,"name":"sewer-pipe-02","tpage_name":"sewo-vis-tfrag"}],[121176097,{"idx":33,"name":"jakchires-brwnleather","tpage_name":"hiphog-vis-pris"}],[106233937,{"idx":81,"name":"minc-crm-paint-wall-01","tpage_name":"mined-pris"}],[126156818,{"idx":18,"name":"sewer-brick-block-11","tpage_name":"sewo-vis-tfrag"}],[121176098,{"idx":34,"name":"jakchires-chestplate","tpage_name":"hiphog-vis-pris"}],[106233938,{"idx":82,"name":"minc-door-metal-05","tpage_name":"mined-pris"}],[126156819,{"idx":19,"name":"sewer-brick-block-10","tpage_name":"sewo-vis-tfrag"}],[121176099,{"idx":35,"name":"jakchires-clips","tpage_name":"hiphog-vis-pris"}],[106233939,{"idx":83,"name":"minc-door-metal-06","tpage_name":"mined-pris"}],[131137542,{"idx":6,"name":"mhcity-floor-brace-02","tpage_name":"lctydest-pris"}],[126156822,{"idx":22,"name":"sewer-metal-trim-01","tpage_name":"sewo-vis-tfrag"}],[121176102,{"idx":38,"name":"jakchires-eyelid","tpage_name":"hiphog-vis-pris"}],[106233942,{"idx":86,"name":"minc-light-red","tpage_name":"mined-pris"}],[131137543,{"idx":7,"name":"mhcity-puffer-mid-01","tpage_name":"lctydest-pris"}],[126156823,{"idx":23,"name":"sewer-scaffold-03","tpage_name":"sewo-vis-tfrag"}],[121176103,{"idx":39,"name":"jakchires-facelft","tpage_name":"hiphog-vis-pris"}],[106233943,{"idx":87,"name":"minc-reflector","tpage_name":"mined-pris"}],[131137544,{"idx":8,"name":"mhcity-puffer-top-01","tpage_name":"lctydest-pris"}],[126156824,{"idx":24,"name":"sewer-metal-block-07","tpage_name":"sewo-vis-tfrag"}],[121176104,{"idx":40,"name":"jakchires-facert","tpage_name":"hiphog-vis-pris"}],[106233944,{"idx":88,"name":"minc-safe-plate-02","tpage_name":"mined-pris"}],[126156825,{"idx":25,"name":"sewer-pipe-rim-06","tpage_name":"sewo-vis-tfrag"}],[121176105,{"idx":41,"name":"jakchires-glovetop","tpage_name":"hiphog-vis-pris"}],[106233945,{"idx":89,"name":"minc-screw-02","tpage_name":"mined-pris"}],[126156826,{"idx":26,"name":"sewer-pipe-01","tpage_name":"sewo-vis-tfrag"}],[121176106,{"idx":42,"name":"jakchires-hair","tpage_name":"hiphog-vis-pris"}],[106233946,{"idx":90,"name":"minc-yel-paint-rust01","tpage_name":"mined-pris"}],[126156827,{"idx":27,"name":"sewer-pipe-02-edge-01","tpage_name":"sewo-vis-tfrag"}],[121176107,{"idx":43,"name":"jakchires-horn","tpage_name":"hiphog-vis-pris"}],[106233947,{"idx":91,"name":"minc-yel-safe-paint-rust01","tpage_name":"mined-pris"}],[134873088,{"idx":0,"name":"rub-metal-01","tpage_name":"rubbleb-vis-tfrag"}],[126156828,{"idx":28,"name":"sewer-pipe-rim-01","tpage_name":"sewo-vis-tfrag"}],[121176108,{"idx":44,"name":"jakchires-jacket","tpage_name":"hiphog-vis-pris"}],[106233948,{"idx":92,"name":"mined_redbrake","tpage_name":"mined-pris"}],[126156856,{"idx":56,"name":"sewer-pipe-rim-09","tpage_name":"sewo-vis-tfrag"}],[106233976,{"idx":120,"name":"ecocreature-claws","tpage_name":"mined-pris"}],[143589377,{"idx":1,"name":"comb-temp-dark","tpage_name":"combc-tfrag"}],[126156857,{"idx":57,"name":"sewer-red-light-01","tpage_name":"sewo-vis-tfrag"}],[106233977,{"idx":121,"name":"ecocreature-eye","tpage_name":"mined-pris"}],[143589378,{"idx":2,"name":"comb-temp-glass","tpage_name":"combc-tfrag"}],[126156858,{"idx":58,"name":"sewer-red-light-02","tpage_name":"sewo-vis-tfrag"}],[106233978,{"idx":122,"name":"ecocreature-flesh","tpage_name":"mined-pris"}],[126156859,{"idx":59,"name":"sewer-brick-roof-02","tpage_name":"sewo-vis-tfrag"}],[106233979,{"idx":123,"name":"ecocreature-insidemouth","tpage_name":"mined-pris"}],[144834560,{"idx":0,"name":"minb-stone26","tpage_name":"combn-tfrag"}],[126156860,{"idx":60,"name":"sewer-brick-roof-01","tpage_name":"sewo-vis-tfrag"}],[106233980,{"idx":124,"name":"ecocreature-joint","tpage_name":"mined-pris"}],[144834561,{"idx":1,"name":"minb-stone12","tpage_name":"combn-tfrag"}],[143589381,{"idx":5,"name":"comb-yell-light","tpage_name":"combc-tfrag"}],[126156861,{"idx":61,"name":"sewer-brick-roof-03","tpage_name":"sewo-vis-tfrag"}],[106233981,{"idx":125,"name":"ecocreature-palm","tpage_name":"mined-pris"}],[144834576,{"idx":16,"name":"comb-temp-dark","tpage_name":"combn-tfrag"}],[143589396,{"idx":20,"name":"rail-light-yellow","tpage_name":"combc-tfrag"}],[106233996,{"idx":140,"name":"jakc-skirt","tpage_name":"mined-pris"}],[144834577,{"idx":17,"name":"comb-temp-glass","tpage_name":"combn-tfrag"}],[143589397,{"idx":21,"name":"rail-pipe-05","tpage_name":"combc-tfrag"}],[106233997,{"idx":141,"name":"jakc-scarfhanging","tpage_name":"mined-pris"}],[144834578,{"idx":18,"name":"comb-temp-light","tpage_name":"combn-tfrag"}],[143589398,{"idx":22,"name":"rail-gray-metal-01","tpage_name":"combc-tfrag"}],[106233998,{"idx":142,"name":"minc-blue-paint-rust04","tpage_name":"mined-pris"}],[144834581,{"idx":21,"name":"comb-crct-small","tpage_name":"combn-tfrag"}],[143589401,{"idx":25,"name":"rail-env-wall-01","tpage_name":"combc-tfrag"}],[106234001,{"idx":145,"name":"minc-door-metal-center","tpage_name":"mined-pris"}],[151060483,{"idx":3,"name":"cguard1-backmetal","tpage_name":"factoryc-vis-pris"}],[144834583,{"idx":23,"name":"comb-tarn-fade-wall-01","tpage_name":"combn-tfrag"}],[143589403,{"idx":27,"name":"rail-light-red","tpage_name":"combc-tfrag"}],[106234003,{"idx":147,"name":"minc-rust-bars-01","tpage_name":"mined-pris"}],[151060486,{"idx":6,"name":"cguard1-guntube","tpage_name":"factoryc-vis-pris"}],[144834586,{"idx":26,"name":"comb-env2","tpage_name":"combn-tfrag"}],[106234006,{"idx":150,"name":"minc-door-metal-03","tpage_name":"mined-pris"}],[144834587,{"idx":27,"name":"comb-env","tpage_name":"combn-tfrag"}],[106234007,{"idx":151,"name":"mine-blue-paint-rustdoor","tpage_name":"mined-pris"}],[153550848,{"idx":0,"name":"mhcity-grunt-egg-rim-01","tpage_name":"mhcitya-vis-shrub"}],[144834588,{"idx":28,"name":"comb-plate-02","tpage_name":"combn-tfrag"}],[106234008,{"idx":152,"name":"mined_rostone-01","tpage_name":"mined-pris"}],[153550849,{"idx":1,"name":"mhcity-eggskin","tpage_name":"mhcitya-vis-shrub"}],[144834589,{"idx":29,"name":"comb-ring","tpage_name":"combn-tfrag"}],[106234009,{"idx":153,"name":"cav-metdoor-01","tpage_name":"mined-pris"}],[153550850,{"idx":2,"name":"mhcity-grunt-egg-horns-01","tpage_name":"mhcitya-vis-shrub"}],[144834590,{"idx":30,"name":"comb-pipe2","tpage_name":"combn-tfrag"}],[106234010,{"idx":154,"name":"cav-metdoor-02","tpage_name":"mined-pris"}],[153550851,{"idx":3,"name":"city-wire","tpage_name":"mhcitya-vis-shrub"}],[144834591,{"idx":31,"name":"comb-yell-light","tpage_name":"combn-tfrag"}],[106234011,{"idx":155,"name":"airlock-door-bolt","tpage_name":"mined-pris"}],[154796032,{"idx":0,"name":"bam-eyelight","tpage_name":"ljakndax-pris"}],[153550852,{"idx":4,"name":"mhcity-plant-01","tpage_name":"mhcitya-vis-shrub"}],[144834592,{"idx":32,"name":"comb-pipe1","tpage_name":"combn-tfrag"}],[106234012,{"idx":156,"name":"airlock-door-cog","tpage_name":"mined-pris"}],[154796033,{"idx":1,"name":"bam-hairhilite","tpage_name":"ljakndax-pris"}],[153550853,{"idx":5,"name":"mhcity-plant-light-01","tpage_name":"mhcitya-vis-shrub"}],[144834593,{"idx":33,"name":"comb-pipe3","tpage_name":"combn-tfrag"}],[106234013,{"idx":157,"name":"airlock-door-cog1","tpage_name":"mined-pris"}],[154796034,{"idx":2,"name":"daxter-eyelid","tpage_name":"ljakndax-pris"}],[153550854,{"idx":6,"name":"city-farm-cattail-grass","tpage_name":"mhcitya-vis-shrub"}],[144834594,{"idx":34,"name":"comb-pipe","tpage_name":"combn-tfrag"}],[106234014,{"idx":158,"name":"airlock-door-main","tpage_name":"mined-pris"}],[154796050,{"idx":18,"name":"daxtertuft","tpage_name":"ljakndax-pris"}],[144834610,{"idx":50,"name":"rail-detail-01","tpage_name":"combn-tfrag"}],[106234030,{"idx":174,"name":"roboboss-shinyorange-04","tpage_name":"mined-pris"}],[154796051,{"idx":19,"name":"environment-oldmetal","tpage_name":"ljakndax-pris"}],[144834611,{"idx":51,"name":"rail-cord-01","tpage_name":"combn-tfrag"}],[134873171,{"idx":83,"name":"rub-statue-stone-01","tpage_name":"rubbleb-vis-tfrag"}],[106234031,{"idx":175,"name":"roboboss-shinyorange-05","tpage_name":"mined-pris"}],[154796052,{"idx":20,"name":"jakc-armor","tpage_name":"ljakndax-pris"}],[144834612,{"idx":52,"name":"rail-pipe-01","tpage_name":"combn-tfrag"}],[106234032,{"idx":176,"name":"roboboss-shinyorange-06","tpage_name":"mined-pris"}],[154796053,{"idx":21,"name":"jakc-chestplate-straps","tpage_name":"ljakndax-pris"}],[144834613,{"idx":53,"name":"rail-pipe-03","tpage_name":"combn-tfrag"}],[134873173,{"idx":85,"name":"rub-copper-metal-01","tpage_name":"rubbleb-vis-tfrag"}],[106234033,{"idx":177,"name":"roboboss-shinyorange-07","tpage_name":"mined-pris"}],[154796054,{"idx":22,"name":"jakc-gogglemetal","tpage_name":"ljakndax-pris"}],[144834614,{"idx":54,"name":"rail-gray-metal-01","tpage_name":"combn-tfrag"}],[106234034,{"idx":178,"name":"roboboss-shinyorange-08","tpage_name":"mined-pris"}],[154796055,{"idx":23,"name":"jakc-lens","tpage_name":"ljakndax-pris"}],[106234035,{"idx":179,"name":"gun-main","tpage_name":"mined-pris"}],[105185284,{"idx":4,"name":"ashelin-cglogo","tpage_name":"desoasis-pris2"}],[90243124,{"idx":52,"name":"des-palmtree-trunk-02","tpage_name":"desertb-vis-tfrag"}],[106430464,{"idx":0,"name":"environment-oldmetal","tpage_name":"desliz-pris"}],[90243125,{"idx":53,"name":"des-palm-leaf-01","tpage_name":"desertb-vis-tfrag"}],[105185285,{"idx":5,"name":"ashelin-cgrank","tpage_name":"desoasis-pris2"}],[106430465,{"idx":1,"name":"metalflut-eye","tpage_name":"desliz-pris"}],[90243126,{"idx":54,"name":"des-mount-bottom-01","tpage_name":"desertb-vis-tfrag"}],[105185286,{"idx":6,"name":"ashelin-chest","tpage_name":"desoasis-pris2"}],[106430466,{"idx":2,"name":"metalflut-leatherstrap-b-01","tpage_name":"desliz-pris"}],[90243127,{"idx":55,"name":"des-mud","tpage_name":"desertb-vis-tfrag"}],[105185287,{"idx":7,"name":"ashelin-eye","tpage_name":"desoasis-pris2"}],[106430467,{"idx":3,"name":"metalflut-leatherstrap-c","tpage_name":"desliz-pris"}],[105185288,{"idx":8,"name":"ashelin-eyebrow","tpage_name":"desoasis-pris2"}],[106430468,{"idx":4,"name":"metalflut-nail","tpage_name":"desliz-pris"}],[90243129,{"idx":57,"name":"des-totem-stone-trim","tpage_name":"desertb-vis-tfrag"}],[105185289,{"idx":9,"name":"ashelin-eyelid","tpage_name":"desoasis-pris2"}],[106430469,{"idx":5,"name":"metalflut-plates-02","tpage_name":"desliz-pris"}],[90243130,{"idx":58,"name":"des-totem-stone-01","tpage_name":"desertb-vis-tfrag"}],[105185290,{"idx":10,"name":"ashelin-face","tpage_name":"desoasis-pris2"}],[106430470,{"idx":6,"name":"metalflut-rings","tpage_name":"desliz-pris"}],[90243131,{"idx":59,"name":"des-cave-floor-01","tpage_name":"desertb-vis-tfrag"}],[105185291,{"idx":11,"name":"ashelin-glove","tpage_name":"desoasis-pris2"}],[106430471,{"idx":7,"name":"metalflut-roll","tpage_name":"desliz-pris"}],[108920832,{"idx":0,"name":"dk-sat-cable-01","tpage_name":"waspgame-pris"}],[105185292,{"idx":12,"name":"ashelin-gunbarrel-01","tpage_name":"desoasis-pris2"}],[106430472,{"idx":8,"name":"metalflut-saddle","tpage_name":"desliz-pris"}],[108920833,{"idx":1,"name":"dk-sat-cable-02","tpage_name":"waspgame-pris"}],[105185293,{"idx":13,"name":"ashelin-gunbarrel-02","tpage_name":"desoasis-pris2"}],[106430473,{"idx":9,"name":"metalflut-saddlehang","tpage_name":"desliz-pris"}],[108920834,{"idx":2,"name":"dk-sat-cable-03","tpage_name":"waspgame-pris"}],[105185294,{"idx":14,"name":"ashelin-gunbarrel-03","tpage_name":"desoasis-pris2"}],[106430474,{"idx":10,"name":"metalflut-saddleseat","tpage_name":"desliz-pris"}],[108920835,{"idx":3,"name":"dk-sat-claw-01","tpage_name":"waspgame-pris"}],[105185295,{"idx":15,"name":"ashelin-gunholster","tpage_name":"desoasis-pris2"}],[106430475,{"idx":11,"name":"metalflut-skin-01","tpage_name":"desliz-pris"}],[108920836,{"idx":4,"name":"dk-sat-panel-01","tpage_name":"waspgame-pris"}],[105185296,{"idx":16,"name":"ashelin-hair","tpage_name":"desoasis-pris2"}],[106430476,{"idx":12,"name":"metalflut-skin-02","tpage_name":"desliz-pris"}],[108920837,{"idx":5,"name":"dk-sat-rim-01","tpage_name":"waspgame-pris"}],[105185297,{"idx":17,"name":"ashelin-handle-01","tpage_name":"desoasis-pris2"}],[106430477,{"idx":13,"name":"metalflut-wrap","tpage_name":"desliz-pris"}],[108920838,{"idx":6,"name":"dk-sat-rim-02","tpage_name":"waspgame-pris"}],[105185298,{"idx":18,"name":"ashelin-jacketbody","tpage_name":"desoasis-pris2"}],[106430478,{"idx":14,"name":"bam-eyelight","tpage_name":"desliz-pris"}],[108920840,{"idx":8,"name":"dk-sat-rim-bright-01","tpage_name":"waspgame-pris"}],[105185300,{"idx":20,"name":"ashelin-jacketstraps","tpage_name":"desoasis-pris2"}],[106430480,{"idx":16,"name":"klever-arm","tpage_name":"desliz-pris"}],[117637123,{"idx":3,"name":"intcept-gun01","tpage_name":"destrack-pris"}],[106430503,{"idx":39,"name":"klever-horn","tpage_name":"desliz-pris"}],[117637124,{"idx":4,"name":"intcept-pipe01","tpage_name":"destrack-pris"}],[106430504,{"idx":40,"name":"klever-mustache","tpage_name":"desliz-pris"}],[117637125,{"idx":5,"name":"intcept-teeth01","tpage_name":"destrack-pris"}],[106430505,{"idx":41,"name":"klever-shoe","tpage_name":"desliz-pris"}],[117637126,{"idx":6,"name":"intcept-tread01","tpage_name":"destrack-pris"}],[106430506,{"idx":42,"name":"klever-shoebottom","tpage_name":"desliz-pris"}],[103350291,{"idx":19,"name":"bam-eyelight","tpage_name":"comba-pris"}],[108331011,{"idx":3,"name":"dust-devil-01","tpage_name":"desert-sprite"}],[103350292,{"idx":20,"name":"bam-hairhilite","tpage_name":"comba-pris"}],[108331012,{"idx":4,"name":"dust-devil-02","tpage_name":"desert-sprite"}],[103350293,{"idx":21,"name":"daxter-eyelid","tpage_name":"comba-pris"}],[108331013,{"idx":5,"name":"dust-devil-03","tpage_name":"desert-sprite"}],[100859934,{"idx":30,"name":"pecker-body-01","tpage_name":"ljkdmpk-pris"}],[103350294,{"idx":22,"name":"daxter-furhilite","tpage_name":"comba-pris"}],[108331014,{"idx":6,"name":"dust-cloud","tpage_name":"desert-sprite"}],[100859937,{"idx":33,"name":"pecker-plume","tpage_name":"ljkdmpk-pris"}],[110821377,{"idx":1,"name":"cav-stain-01","tpage_name":"mined-alpha"}],[103350297,{"idx":25,"name":"daxterbodyshort-eix","tpage_name":"comba-pris"}],[108331017,{"idx":9,"name":"dust-sparkle","tpage_name":"desert-sprite"}],[100859938,{"idx":34,"name":"pecker-tail","tpage_name":"ljkdmpk-pris"}],[103350298,{"idx":26,"name":"daxterbolt","tpage_name":"comba-pris"}],[108331018,{"idx":10,"name":"kleever-fist-logo","tpage_name":"desert-sprite"}],[117637134,{"idx":14,"name":"vehicle-toad-exhaust-01","tpage_name":"destrack-pris"}],[106430514,{"idx":50,"name":"daxter-orange","tpage_name":"desliz-pris"}],[100859939,{"idx":35,"name":"pecker-teeth","tpage_name":"ljkdmpk-pris"}],[103350299,{"idx":27,"name":"daxterear","tpage_name":"comba-pris"}],[108331019,{"idx":11,"name":"burning-bush-off","tpage_name":"desert-sprite"}],[117637135,{"idx":15,"name":"vehicle-tread-blur-02","tpage_name":"destrack-pris"}],[106430515,{"idx":51,"name":"daxterarm","tpage_name":"desliz-pris"}],[100859940,{"idx":36,"name":"pecker-wingbottom","tpage_name":"ljkdmpk-pris"}],[103350300,{"idx":28,"name":"daxterfinger","tpage_name":"comba-pris"}],[108331020,{"idx":12,"name":"crack01","tpage_name":"desert-sprite"}],[117637136,{"idx":16,"name":"vehicle-wheel-01","tpage_name":"destrack-pris"}],[106430516,{"idx":52,"name":"daxterbodyshort-eix","tpage_name":"desliz-pris"}],[100859941,{"idx":37,"name":"pecker-wingtop","tpage_name":"ljkdmpk-pris"}],[103350301,{"idx":29,"name":"daxterfoot","tpage_name":"comba-pris"}],[108331021,{"idx":13,"name":"ceiling-dust","tpage_name":"desert-sprite"}],[117637137,{"idx":17,"name":"vehicle-wheel-blur-01","tpage_name":"destrack-pris"}],[106430517,{"idx":53,"name":"daxterbolt","tpage_name":"desliz-pris"}],[106430518,{"idx":54,"name":"daxterear","tpage_name":"desliz-pris"}],[106430519,{"idx":55,"name":"daxterfinger","tpage_name":"desliz-pris"}],[117637140,{"idx":20,"name":"bam-eyelight","tpage_name":"destrack-pris"}],[106430520,{"idx":56,"name":"daxterfoot","tpage_name":"desliz-pris"}],[117637141,{"idx":21,"name":"bam-hairhilite","tpage_name":"destrack-pris"}],[106430521,{"idx":57,"name":"daxterfoot-bottom","tpage_name":"desliz-pris"}],[117637142,{"idx":22,"name":"klever-arm","tpage_name":"destrack-pris"}],[106430522,{"idx":58,"name":"daxtergoggles","tpage_name":"desliz-pris"}],[117637143,{"idx":23,"name":"klever-armor-01","tpage_name":"destrack-pris"}],[106430523,{"idx":59,"name":"daxterheadwidenew","tpage_name":"desliz-pris"}],[117637144,{"idx":24,"name":"klever-armor-02","tpage_name":"destrack-pris"}],[106430524,{"idx":60,"name":"daxterhelmetplain","tpage_name":"desliz-pris"}],[117637145,{"idx":25,"name":"klever-blackstrap","tpage_name":"destrack-pris"}],[106430525,{"idx":61,"name":"daxterlense","tpage_name":"desliz-pris"}],[117637146,{"idx":26,"name":"klever-bolt","tpage_name":"destrack-pris"}],[106430526,{"idx":62,"name":"daxternose","tpage_name":"desliz-pris"}],[117637147,{"idx":27,"name":"klever-brownstrap","tpage_name":"destrack-pris"}],[106430527,{"idx":63,"name":"daxterteeth","tpage_name":"desliz-pris"}],[117637148,{"idx":28,"name":"klever-chest","tpage_name":"destrack-pris"}],[106430528,{"idx":64,"name":"daxtertuft","tpage_name":"desliz-pris"}],[117637149,{"idx":29,"name":"klever-clips","tpage_name":"destrack-pris"}],[106430529,{"idx":65,"name":"jakc-armor","tpage_name":"desliz-pris"}],[117637150,{"idx":30,"name":"klever-earcup","tpage_name":"destrack-pris"}],[106430530,{"idx":66,"name":"jakc-chestplate-straps","tpage_name":"desliz-pris"}],[117637151,{"idx":31,"name":"klever-face-01","tpage_name":"destrack-pris"}],[106430531,{"idx":67,"name":"jakc-gogglemetal","tpage_name":"desliz-pris"}],[117637152,{"idx":32,"name":"klever-face-01scars","tpage_name":"destrack-pris"}],[106430532,{"idx":68,"name":"jakc-lens","tpage_name":"desliz-pris"}],[117637153,{"idx":33,"name":"klever-fingerbottom","tpage_name":"destrack-pris"}],[106430533,{"idx":69,"name":"jakc-scarf","tpage_name":"desliz-pris"}],[117637154,{"idx":34,"name":"klever-fingertop","tpage_name":"destrack-pris"}],[106430534,{"idx":70,"name":"jakc-scarfhanging","tpage_name":"desliz-pris"}],[117637155,{"idx":35,"name":"klever-gunmetal-01","tpage_name":"destrack-pris"}],[106430535,{"idx":71,"name":"jakc-skirt","tpage_name":"desliz-pris"}],[117637156,{"idx":36,"name":"klever-gunmetal-02","tpage_name":"destrack-pris"}],[106430536,{"idx":72,"name":"jakc-waistband2","tpage_name":"desliz-pris"}],[117637157,{"idx":37,"name":"klever-gunmetal-03","tpage_name":"destrack-pris"}],[106430537,{"idx":73,"name":"jakc-wraps","tpage_name":"desliz-pris"}],[117637158,{"idx":38,"name":"klever-gunmetal-04","tpage_name":"destrack-pris"}],[106430538,{"idx":74,"name":"jakc-wristband-a2","tpage_name":"desliz-pris"}],[117637159,{"idx":39,"name":"klever-gunmetal-05","tpage_name":"destrack-pris"}],[106430539,{"idx":75,"name":"jakchires-arm","tpage_name":"desliz-pris"}],[117637160,{"idx":40,"name":"klever-hair","tpage_name":"destrack-pris"}],[106430540,{"idx":76,"name":"jakchires-blackstrap","tpage_name":"desliz-pris"}],[117637161,{"idx":41,"name":"klever-hand","tpage_name":"destrack-pris"}],[106430541,{"idx":77,"name":"jakchires-brownstrap","tpage_name":"desliz-pris"}],[117637162,{"idx":42,"name":"klever-handwrap","tpage_name":"destrack-pris"}],[106430542,{"idx":78,"name":"jakchires-brwnleather","tpage_name":"desliz-pris"}],[117637163,{"idx":43,"name":"klever-horn","tpage_name":"destrack-pris"}],[106430543,{"idx":79,"name":"jakchires-chestplate","tpage_name":"desliz-pris"}],[117637164,{"idx":44,"name":"klever-mustache","tpage_name":"destrack-pris"}],[106430544,{"idx":80,"name":"jakchires-clips","tpage_name":"desliz-pris"}],[117637165,{"idx":45,"name":"klever-shoe","tpage_name":"destrack-pris"}],[106430545,{"idx":81,"name":"jakchires-eye","tpage_name":"desliz-pris"}],[117637166,{"idx":46,"name":"klever-shoebottom","tpage_name":"destrack-pris"}],[106430546,{"idx":82,"name":"jakchires-eyebrow","tpage_name":"desliz-pris"}],[117637167,{"idx":47,"name":"klever-skirtdark","tpage_name":"destrack-pris"}],[106430547,{"idx":83,"name":"jakchires-eyelid","tpage_name":"desliz-pris"}],[117637168,{"idx":48,"name":"klever-skirtlight","tpage_name":"destrack-pris"}],[106430548,{"idx":84,"name":"jakchires-facelft","tpage_name":"desliz-pris"}],[117637169,{"idx":49,"name":"klever-thighs","tpage_name":"destrack-pris"}],[106430549,{"idx":85,"name":"jakchires-facert","tpage_name":"desliz-pris"}],[117637170,{"idx":50,"name":"klever-undershirt","tpage_name":"destrack-pris"}],[106430550,{"idx":86,"name":"jakchires-glovetop","tpage_name":"desliz-pris"}],[117637171,{"idx":51,"name":"klever-widebrownstrap","tpage_name":"destrack-pris"}],[106430551,{"idx":87,"name":"jakchires-hair","tpage_name":"desliz-pris"}],[117637172,{"idx":52,"name":"des-corral-metal-01","tpage_name":"destrack-pris"}],[106430552,{"idx":88,"name":"jakchires-horn","tpage_name":"desliz-pris"}],[117637173,{"idx":53,"name":"des-corral-plate-03","tpage_name":"destrack-pris"}],[106430553,{"idx":89,"name":"jakchires-jacket","tpage_name":"desliz-pris"}],[117637174,{"idx":54,"name":"des-pole-01","tpage_name":"destrack-pris"}],[106430554,{"idx":90,"name":"jakchires-leatherpouch","tpage_name":"desliz-pris"}],[117637175,{"idx":55,"name":"des-pole-brace","tpage_name":"destrack-pris"}],[106430555,{"idx":91,"name":"jakchires-lightbrownspat","tpage_name":"desliz-pris"}],[117637176,{"idx":56,"name":"des-train-barrier-screw","tpage_name":"destrack-pris"}],[106430556,{"idx":92,"name":"jakchires-pants","tpage_name":"desliz-pris"}],[117637177,{"idx":57,"name":"des-train-bollard-cap","tpage_name":"destrack-pris"}],[106430557,{"idx":93,"name":"jakchires-precarmor-01","tpage_name":"desliz-pris"}],[117637178,{"idx":58,"name":"des-train-bollard-pole-01","tpage_name":"destrack-pris"}],[106430558,{"idx":94,"name":"jakchires-shoebottom","tpage_name":"desliz-pris"}],[117637179,{"idx":59,"name":"des-shrub-pebbles","tpage_name":"destrack-pris"}],[106430559,{"idx":95,"name":"jakchires-shoemetal","tpage_name":"desliz-pris"}],[117637180,{"idx":60,"name":"des-train-barrier-stone-red","tpage_name":"destrack-pris"}],[106430560,{"idx":96,"name":"jakchires-shoeteop","tpage_name":"desliz-pris"}],[117637181,{"idx":61,"name":"daxter-eyelid","tpage_name":"destrack-pris"}],[106430561,{"idx":97,"name":"jakchires-teeth","tpage_name":"desliz-pris"}],[117637182,{"idx":62,"name":"daxter-furhilite","tpage_name":"destrack-pris"}],[106430562,{"idx":98,"name":"vehicle-snake-tread-01","tpage_name":"desliz-pris"}],[117637183,{"idx":63,"name":"daxter-orange","tpage_name":"destrack-pris"}],[106430563,{"idx":99,"name":"vehicle-snake-tread-02","tpage_name":"desliz-pris"}],[117637184,{"idx":64,"name":"daxterarm","tpage_name":"destrack-pris"}],[106430564,{"idx":100,"name":"vehicle-wheel-01","tpage_name":"desliz-pris"}],[99483672,{"idx":24,"name":"neo-wasp-body","tpage_name":"lformach-vis-pris"}],[100728852,{"idx":20,"name":"sig-metal-01","tpage_name":"ljaksig-pris2"}],[106954752,{"idx":0,"name":"vola-lava-rock-01","tpage_name":"volcanoa-vis-tfrag"}],[99483673,{"idx":25,"name":"neo-wasp-brown","tpage_name":"lformach-vis-pris"}],[100728853,{"idx":21,"name":"sig-metal-dirty","tpage_name":"ljaksig-pris2"}],[106954753,{"idx":1,"name":"vola-stalk-01","tpage_name":"volcanoa-vis-tfrag"}],[99483674,{"idx":26,"name":"neo-wasp-dark-brown","tpage_name":"lformach-vis-pris"}],[100728854,{"idx":22,"name":"sig-sac","tpage_name":"ljaksig-pris2"}],[106954754,{"idx":2,"name":"vola-leaf-02","tpage_name":"volcanoa-vis-tfrag"}],[102039589,{"idx":37,"name":"gun-laser","tpage_name":"gungame-vis-pris2"}],[107020309,{"idx":21,"name":"vol-balance-plat","tpage_name":"volcanoa-vis-shrub"}],[102039595,{"idx":43,"name":"gun-red-glow","tpage_name":"gungame-vis-pris2"}],[107020315,{"idx":27,"name":"vola-shrub-rope-01","tpage_name":"volcanoa-vis-shrub"}],[107085825,{"idx":1,"name":"vola-grass-fringe-02","tpage_name":"volcanoa-vis-alpha"}],[107085827,{"idx":3,"name":"vola-lava-fall","tpage_name":"volcanoa-vis-alpha"}],[107085828,{"idx":4,"name":"vola-lava-01-dest","tpage_name":"volcanoa-vis-alpha"}],[107085829,{"idx":5,"name":"vola-lava-fall-dest","tpage_name":"volcanoa-vis-alpha"}],[107085830,{"idx":6,"name":"flamer-wing","tpage_name":"volcanoa-vis-alpha"}],[100925466,{"idx":26,"name":"king-skirt","tpage_name":"ljkdmpk-pris2"}],[107151366,{"idx":6,"name":"metalflut-nail","tpage_name":"volcanoa-vis-pris"}],[100925467,{"idx":27,"name":"king-teeth","tpage_name":"ljkdmpk-pris2"}],[107151367,{"idx":7,"name":"metalflut-plates-02","tpage_name":"volcanoa-vis-pris"}],[100925469,{"idx":29,"name":"king-vest","tpage_name":"ljkdmpk-pris2"}],[107151369,{"idx":9,"name":"metalflut-roll","tpage_name":"volcanoa-vis-pris"}],[100925470,{"idx":30,"name":"king-vestback","tpage_name":"ljkdmpk-pris2"}],[107151370,{"idx":10,"name":"metalflut-saddle","tpage_name":"volcanoa-vis-pris"}],[100925471,{"idx":31,"name":"king-wrap","tpage_name":"ljkdmpk-pris2"}],[107151371,{"idx":11,"name":"metalflut-saddlehang","tpage_name":"volcanoa-vis-pris"}],[100925473,{"idx":33,"name":"king-wristband","tpage_name":"ljkdmpk-pris2"}],[107151373,{"idx":13,"name":"metalflut-skin-01","tpage_name":"volcanoa-vis-pris"}],[100925474,{"idx":34,"name":"king-skirt-b","tpage_name":"ljkdmpk-pris2"}],[107151374,{"idx":14,"name":"metalflut-skin-02","tpage_name":"volcanoa-vis-pris"}],[107151375,{"idx":15,"name":"metalflut-wrap","tpage_name":"volcanoa-vis-pris"}],[99483680,{"idx":32,"name":"spawner-spike-01","tpage_name":"lformach-vis-pris"}],[100728860,{"idx":28,"name":"sig-skirts-03","tpage_name":"ljaksig-pris2"}],[108199940,{"idx":4,"name":"cav-stain-bolt-01","tpage_name":"mined-shrub"}],[99483681,{"idx":33,"name":"spawner-spike-02","tpage_name":"lformach-vis-pris"}],[100728861,{"idx":29,"name":"sig-undergarments","tpage_name":"ljaksig-pris2"}],[108199941,{"idx":5,"name":"mined_redbrake","tpage_name":"mined-shrub"}],[106954762,{"idx":10,"name":"vola-grass-fringe-05","tpage_name":"volcanoa-vis-tfrag"}],[100728862,{"idx":30,"name":"vin-teeth-01","tpage_name":"ljaksig-pris2"}],[108199942,{"idx":6,"name":"sewer-pipe-small-01","tpage_name":"mined-shrub"}],[100925464,{"idx":24,"name":"king-precursermetal-trimbolt","tpage_name":"ljkdmpk-pris2"}],[107151364,{"idx":4,"name":"metalflut-leatherstrap-b-01","tpage_name":"volcanoa-vis-pris"}],[108396544,{"idx":0,"name":"hud-desert-lizard","tpage_name":"desliz-minimap"}],[81592413,{"idx":93,"name":"jakchires-brownstrap","tpage_name":"arenacst-pris"}],[108986373,{"idx":5,"name":"metalflut-plates-02","tpage_name":"wasleapr-pris"}],[81592416,{"idx":96,"name":"jakchires-clips","tpage_name":"arenacst-pris"}],[108986376,{"idx":8,"name":"metalflut-saddle","tpage_name":"wasleapr-pris"}],[81592417,{"idx":97,"name":"jakchires-eye","tpage_name":"arenacst-pris"}],[108986377,{"idx":9,"name":"metalflut-saddlehang","tpage_name":"wasleapr-pris"}],[81592418,{"idx":98,"name":"jakchires-eyebrow","tpage_name":"arenacst-pris"}],[108986378,{"idx":10,"name":"metalflut-saddleseat","tpage_name":"wasleapr-pris"}],[81592419,{"idx":99,"name":"jakchires-eyelid","tpage_name":"arenacst-pris"}],[108986379,{"idx":11,"name":"metalflut-skin-01","tpage_name":"wasleapr-pris"}],[81592420,{"idx":100,"name":"jakchires-facelft","tpage_name":"arenacst-pris"}],[108986380,{"idx":12,"name":"metalflut-skin-02","tpage_name":"wasleapr-pris"}],[81592421,{"idx":101,"name":"jakchires-facert","tpage_name":"arenacst-pris"}],[108986381,{"idx":13,"name":"metalflut-wrap","tpage_name":"wasleapr-pris"}],[81592423,{"idx":103,"name":"jakchires-hair","tpage_name":"arenacst-pris"}],[108986383,{"idx":15,"name":"monk-arm","tpage_name":"wasleapr-pris"}],[81592424,{"idx":104,"name":"jakchires-horn","tpage_name":"arenacst-pris"}],[108986384,{"idx":16,"name":"monk-bootbottom","tpage_name":"wasleapr-pris"}],[81592425,{"idx":105,"name":"jakchires-jacket","tpage_name":"arenacst-pris"}],[108986385,{"idx":17,"name":"monk-cheststraps","tpage_name":"wasleapr-pris"}],[81592426,{"idx":106,"name":"jakchires-leatherpouch","tpage_name":"arenacst-pris"}],[108986386,{"idx":18,"name":"monk-ear-01","tpage_name":"wasleapr-pris"}],[81592427,{"idx":107,"name":"jakchires-lightbrownspat","tpage_name":"arenacst-pris"}],[108986387,{"idx":19,"name":"monk-eye-c","tpage_name":"wasleapr-pris"}],[81592428,{"idx":108,"name":"jakchires-pants","tpage_name":"arenacst-pris"}],[108986388,{"idx":20,"name":"monk-eye-d","tpage_name":"wasleapr-pris"}],[81592429,{"idx":109,"name":"jakchires-precarmor-01","tpage_name":"arenacst-pris"}],[108986389,{"idx":21,"name":"monk-eye-f","tpage_name":"wasleapr-pris"}],[81592430,{"idx":110,"name":"jakchires-shoebottom","tpage_name":"arenacst-pris"}],[108986390,{"idx":22,"name":"monk-face-01","tpage_name":"wasleapr-pris"}],[81592431,{"idx":111,"name":"jakchires-shoemetal","tpage_name":"arenacst-pris"}],[108986391,{"idx":23,"name":"monk-face-02","tpage_name":"wasleapr-pris"}],[81592432,{"idx":112,"name":"jakchires-shoeteop","tpage_name":"arenacst-pris"}],[108986392,{"idx":24,"name":"monk-face-03","tpage_name":"wasleapr-pris"}],[81592433,{"idx":113,"name":"jakchires-teeth","tpage_name":"arenacst-pris"}],[108986393,{"idx":25,"name":"monk-face-04","tpage_name":"wasleapr-pris"}],[108986394,{"idx":26,"name":"monk-face-05","tpage_name":"wasleapr-pris"}],[108986395,{"idx":27,"name":"monk-face-06","tpage_name":"wasleapr-pris"}],[108986412,{"idx":44,"name":"monk-lens","tpage_name":"wasleapr-pris"}],[108986413,{"idx":45,"name":"monk-malearm","tpage_name":"wasleapr-pris"}],[108986414,{"idx":46,"name":"monk-malefoot2","tpage_name":"wasleapr-pris"}],[108986415,{"idx":47,"name":"monk-maleleg","tpage_name":"wasleapr-pris"}],[108986416,{"idx":48,"name":"monk-maleshoebottom","tpage_name":"wasleapr-pris"}],[108986417,{"idx":49,"name":"monk-maletorso","tpage_name":"wasleapr-pris"}],[108986418,{"idx":50,"name":"monk-neckcover","tpage_name":"wasleapr-pris"}],[108986419,{"idx":51,"name":"monk-pipe-01","tpage_name":"wasleapr-pris"}],[108986420,{"idx":52,"name":"monk-pipeend","tpage_name":"wasleapr-pris"}],[121438226,{"idx":18,"name":"vehicle-rims-01","tpage_name":"desbattl-pris"}],[108986426,{"idx":58,"name":"monk-trim","tpage_name":"wasleapr-pris"}],[121438227,{"idx":19,"name":"common-black","tpage_name":"desbattl-pris"}],[108986427,{"idx":59,"name":"monk-uppertorso-01","tpage_name":"wasleapr-pris"}],[121438228,{"idx":20,"name":"mh-flyer-eye-01","tpage_name":"desbattl-pris"}],[108986428,{"idx":60,"name":"monk-waistwrap","tpage_name":"wasleapr-pris"}],[121438229,{"idx":21,"name":"mh-flyer-hose","tpage_name":"desbattl-pris"}],[108986429,{"idx":61,"name":"monk-wristwrap","tpage_name":"wasleapr-pris"}],[121438230,{"idx":22,"name":"mh-flyer-leatherstrap-01","tpage_name":"desbattl-pris"}],[108986430,{"idx":62,"name":"seem-precmetal-edge","tpage_name":"wasleapr-pris"}],[94240826,{"idx":58,"name":"t-citywide-red-met-01","tpage_name":"intpfall-vis-tfrag"}],[109182986,{"idx":10,"name":"stadiumb-hud-nmbr-06","tpage_name":"destrack-minimap"}],[94240830,{"idx":62,"name":"t-citywide-met-pill-01","tpage_name":"intpfall-vis-tfrag"}],[109182990,{"idx":14,"name":"stadiumb-hud-ord-er","tpage_name":"destrack-minimap"}],[94240834,{"idx":66,"name":"t-citypal-tree-01","tpage_name":"intpfall-vis-tfrag"}],[109182994,{"idx":18,"name":"stadiumb-hud-ord-rd","tpage_name":"destrack-minimap"}],[101056545,{"idx":33,"name":"jakchires-teeth","tpage_name":"ljakcklv-pris"}],[111017985,{"idx":1,"name":"monk-malepants","tpage_name":"wasleapr-water"}],[100991012,{"idx":36,"name":"klever-chest","tpage_name":"ljakklev-pris"}],[38732012,{"idx":236,"name":"male3_08","tpage_name":"wasstada-sprite"}],[112197632,{"idx":0,"name":"intcept-base-green01","tpage_name":"desinter-pris"}],[100991013,{"idx":37,"name":"klever-clips","tpage_name":"ljakklev-pris"}],[38732013,{"idx":237,"name":"male3_09","tpage_name":"wasstada-sprite"}],[112197633,{"idx":1,"name":"intcept-base-patern01","tpage_name":"desinter-pris"}],[100991014,{"idx":38,"name":"klever-earcup","tpage_name":"ljakklev-pris"}],[38732014,{"idx":238,"name":"male3_10","tpage_name":"wasstada-sprite"}],[112197634,{"idx":2,"name":"intcept-base-patern02","tpage_name":"desinter-pris"}],[100991015,{"idx":39,"name":"klever-eye","tpage_name":"ljakklev-pris"}],[38732015,{"idx":239,"name":"male3_11","tpage_name":"wasstada-sprite"}],[112197635,{"idx":3,"name":"intcept-gun01","tpage_name":"desinter-pris"}],[101056548,{"idx":36,"name":"klever-armor-02","tpage_name":"ljakcklv-pris"}],[112263168,{"idx":0,"name":"intcept-lorez-spike01","tpage_name":"desinter-water"}],[104857624,{"idx":24,"name":"jakc-scarf","tpage_name":"oasiscst-pris"}],[112328704,{"idx":0,"name":"bam-eyelight","tpage_name":"wascast-pris"}],[104857625,{"idx":25,"name":"jakc-waistband2","tpage_name":"oasiscst-pris"}],[112328705,{"idx":1,"name":"bam-hairhilite","tpage_name":"wascast-pris"}],[104857626,{"idx":26,"name":"jakc-wraps","tpage_name":"oasiscst-pris"}],[112328706,{"idx":2,"name":"daxter-eyelid","tpage_name":"wascast-pris"}],[91160654,{"idx":78,"name":"jakc-chestplate-straps","tpage_name":"gungame-vis-pris"}],[104857634,{"idx":34,"name":"jakchires-eye","tpage_name":"oasiscst-pris"}],[112328714,{"idx":10,"name":"daxterfoot","tpage_name":"wascast-pris"}],[122290178,{"idx":2,"name":"fac-tower-door-01","tpage_name":"factoryb-vis-pris"}],[91160678,{"idx":102,"name":"jakchires-pants","tpage_name":"gungame-vis-pris"}],[112328738,{"idx":34,"name":"jakchires-brownstrap","tpage_name":"wascast-pris"}],[112328745,{"idx":41,"name":"jakchires-facelft","tpage_name":"wascast-pris"}],[104267810,{"idx":34,"name":"rub-wall-side-beam-02","tpage_name":"stadium-vis-tfrag"}],[79364210,{"idx":114,"name":"dk-sat-screen-rim-01","tpage_name":"wasseem-pris"}],[114229250,{"idx":2,"name":"ctyslumb-water-dest","tpage_name":"ctyslumb-vis-water"}],[112328758,{"idx":54,"name":"jakchires-teeth","tpage_name":"wascast-pris"}],[112328766,{"idx":62,"name":"prebot-envmap","tpage_name":"wascast-pris"}],[112328768,{"idx":64,"name":"eco-lt-cryst-03","tpage_name":"wascast-pris"}],[106168340,{"idx":20,"name":"minc-door-metal-04","tpage_name":"mined-tfrag"}],[104923160,{"idx":24,"name":"ashelin-shield","tpage_name":"oasiscst-pris2"}],[112394240,{"idx":0,"name":"des-transport-backdoor","tpage_name":"desrescg-pris"}],[106168341,{"idx":21,"name":"minc-door-metal-06","tpage_name":"mined-tfrag"}],[104923161,{"idx":25,"name":"ashelin-shoebottom","tpage_name":"oasiscst-pris2"}],[112394241,{"idx":1,"name":"des-transport-cab","tpage_name":"desrescg-pris"}],[106168344,{"idx":24,"name":"minc-door-metal-03","tpage_name":"mined-tfrag"}],[104923164,{"idx":28,"name":"ashelin-whitestrap","tpage_name":"oasiscst-pris2"}],[112394244,{"idx":4,"name":"des-transport-door","tpage_name":"desrescg-pris"}],[106168345,{"idx":25,"name":"minc-door-metal-02","tpage_name":"mined-tfrag"}],[104923165,{"idx":29,"name":"bam-eyelight","tpage_name":"oasiscst-pris2"}],[112394245,{"idx":5,"name":"des-transport-frame-01","tpage_name":"desrescg-pris"}],[106168346,{"idx":26,"name":"minc-door-metal-05","tpage_name":"mined-tfrag"}],[104923166,{"idx":30,"name":"bam-hairhilite","tpage_name":"oasiscst-pris2"}],[112394246,{"idx":6,"name":"des-transport-frame-02","tpage_name":"desrescg-pris"}],[104923167,{"idx":31,"name":"environment-oldmetal","tpage_name":"oasiscst-pris2"}],[112394247,{"idx":7,"name":"des-transport-frame-03","tpage_name":"desrescg-pris"}],[106168348,{"idx":28,"name":"minc-blue-paint-rust05","tpage_name":"mined-tfrag"}],[112394248,{"idx":8,"name":"des-transport-front","tpage_name":"desrescg-pris"}],[106168349,{"idx":29,"name":"minc-rust-01","tpage_name":"mined-tfrag"}],[112394249,{"idx":9,"name":"des-transport-pipe","tpage_name":"desrescg-pris"}],[112394250,{"idx":10,"name":"des-transport-pipecap","tpage_name":"desrescg-pris"}],[112394251,{"idx":11,"name":"des-transport-plate-01","tpage_name":"desrescg-pris"}],[121110529,{"idx":1,"name":"hip-tbluelit01","tpage_name":"hiphog-vis-tfrag"}],[118620169,{"idx":9,"name":"jakc-skirt","tpage_name":"ljkcdmkl-pris"}],[106168369,{"idx":49,"name":"mined-pillar-side-cold","tpage_name":"mined-tfrag"}],[112394269,{"idx":29,"name":"vehicle-body-panel-01","tpage_name":"desrescg-pris"}],[121110530,{"idx":2,"name":"hip-twood02","tpage_name":"hiphog-vis-tfrag"}],[118620170,{"idx":10,"name":"jakc-waistband2","tpage_name":"ljkcdmkl-pris"}],[106168370,{"idx":50,"name":"mined-pillar-side-cooling","tpage_name":"mined-tfrag"}],[112394270,{"idx":30,"name":"vehicle-brace-pipe-01","tpage_name":"desrescg-pris"}],[121110531,{"idx":3,"name":"hip-tredstool01","tpage_name":"hiphog-vis-tfrag"}],[118620171,{"idx":11,"name":"jakc-wraps","tpage_name":"ljkcdmkl-pris"}],[106168371,{"idx":51,"name":"mined-pillar-side-hot","tpage_name":"mined-tfrag"}],[112394271,{"idx":31,"name":"vehicle-cap-pin-01","tpage_name":"desrescg-pris"}],[122355712,{"idx":0,"name":"hud-mhcentipede-01","tpage_name":"lnstobb-minimap"}],[121110532,{"idx":4,"name":"hip-tredstool02","tpage_name":"hiphog-vis-tfrag"}],[118620172,{"idx":12,"name":"jakc-wristband-a2","tpage_name":"ljkcdmkl-pris"}],[106168372,{"idx":52,"name":"mined-pillar-top-cold","tpage_name":"mined-tfrag"}],[112394272,{"idx":32,"name":"vehicle-chrome-pipe-01","tpage_name":"desrescg-pris"}],[122355713,{"idx":1,"name":"hud-mhcentipede-meter-01","tpage_name":"lnstobb-minimap"}],[121110533,{"idx":5,"name":"hip-tmetring02","tpage_name":"hiphog-vis-tfrag"}],[118620173,{"idx":13,"name":"jakchires-arm","tpage_name":"ljkcdmkl-pris"}],[106168373,{"idx":53,"name":"mined-pillar-top-cooling","tpage_name":"mined-tfrag"}],[112394273,{"idx":33,"name":"vehicle-gas-tank-01","tpage_name":"desrescg-pris"}],[122355714,{"idx":2,"name":"hud-small-frame-01","tpage_name":"lnstobb-minimap"}],[121110534,{"idx":6,"name":"hip-tmetring01","tpage_name":"hiphog-vis-tfrag"}],[118620174,{"idx":14,"name":"jakchires-blackstrap","tpage_name":"ljkcdmkl-pris"}],[106168374,{"idx":54,"name":"mined-pillar-top-hot","tpage_name":"mined-tfrag"}],[112394274,{"idx":34,"name":"vehicle-gun-box-01","tpage_name":"desrescg-pris"}],[122355715,{"idx":3,"name":"hud-small-frame-02","tpage_name":"lnstobb-minimap"}],[121110535,{"idx":7,"name":"hip-tbotyel01","tpage_name":"hiphog-vis-tfrag"}],[118620175,{"idx":15,"name":"jakchires-brownstrap","tpage_name":"ljkcdmkl-pris"}],[106168375,{"idx":55,"name":"mined-pillar-top2side-cold","tpage_name":"mined-tfrag"}],[112394275,{"idx":35,"name":"vehicle-metal-plate-01","tpage_name":"desrescg-pris"}],[121110536,{"idx":8,"name":"hip-tgreendark01","tpage_name":"hiphog-vis-tfrag"}],[118620176,{"idx":16,"name":"jakchires-brwnleather","tpage_name":"ljkcdmkl-pris"}],[106168376,{"idx":56,"name":"mined-pillar-top2side-cooling","tpage_name":"mined-tfrag"}],[112394276,{"idx":36,"name":"vehicle-toad-exhaust-01","tpage_name":"desrescg-pris"}],[121110537,{"idx":9,"name":"hip-tbotblue02","tpage_name":"hiphog-vis-tfrag"}],[118620177,{"idx":17,"name":"jakchires-chestplate","tpage_name":"ljkcdmkl-pris"}],[106168377,{"idx":57,"name":"mined-pillar-top2side-hot","tpage_name":"mined-tfrag"}],[112394277,{"idx":37,"name":"vehicle-tread-blur-02","tpage_name":"desrescg-pris"}],[121110538,{"idx":10,"name":"hip-tredmetal01","tpage_name":"hiphog-vis-tfrag"}],[118620178,{"idx":18,"name":"jakchires-clips","tpage_name":"ljkcdmkl-pris"}],[106168378,{"idx":58,"name":"mined-pillar-env","tpage_name":"mined-tfrag"}],[112394278,{"idx":38,"name":"vehicle-wheel-01","tpage_name":"desrescg-pris"}],[121110539,{"idx":11,"name":"hip-tgoldring01","tpage_name":"hiphog-vis-tfrag"}],[118620179,{"idx":19,"name":"jakchires-eye","tpage_name":"ljkcdmkl-pris"}],[106168379,{"idx":59,"name":"mined-pillar-top2side-dest","tpage_name":"mined-tfrag"}],[112394279,{"idx":39,"name":"vehicle-wheel-blur-01","tpage_name":"desrescg-pris"}],[121110540,{"idx":12,"name":"hip-tmetcan01","tpage_name":"hiphog-vis-tfrag"}],[118620180,{"idx":20,"name":"jakchires-eyebrow","tpage_name":"ljkcdmkl-pris"}],[106168380,{"idx":60,"name":"mined-pillar-side-dest","tpage_name":"mined-tfrag"}],[112394280,{"idx":40,"name":"tread-marks","tpage_name":"desrescg-pris"}],[91291716,{"idx":68,"name":"gun-track-02","tpage_name":"gungame-vis-tfrag"}],[106233876,{"idx":20,"name":"daxterhelmetplain","tpage_name":"mined-pris"}],[112459776,{"idx":0,"name":"intcept-lorez-spike01","tpage_name":"desrescg-water"}],[106954772,{"idx":20,"name":"vol-bark-burnt","tpage_name":"volcanoa-vis-tfrag"}],[113180672,{"idx":0,"name":"minc-pre-12","tpage_name":"minea-vis-water"}],[94371906,{"idx":66,"name":"palace-break-spanel-3","tpage_name":"intpfall-vis-pris"}],[114294786,{"idx":2,"name":"des-cave-floor-01","tpage_name":"desert-vis-water"}],[117702656,{"idx":0,"name":"intcept-lorez-spike01","tpage_name":"destrack-water"}],[108986396,{"idx":28,"name":"monk-femalebelt","tpage_name":"wasleapr-pris"}],[115212296,{"idx":8,"name":"cty-grunt-eye-01","tpage_name":"ctypesb-pris"}],[117702657,{"idx":1,"name":"wstlander-01-glovetop","tpage_name":"destrack-water"}],[108986397,{"idx":29,"name":"monk-femalebootlower","tpage_name":"wasleapr-pris"}],[115212297,{"idx":9,"name":"cty-grunt-gem-01","tpage_name":"ctypesb-pris"}],[108986398,{"idx":30,"name":"monk-femalebootmet","tpage_name":"wasleapr-pris"}],[115212298,{"idx":10,"name":"cty-grunt-hose","tpage_name":"ctypesb-pris"}],[108986399,{"idx":31,"name":"monk-femalebootoe","tpage_name":"wasleapr-pris"}],[115212299,{"idx":11,"name":"cty-grunt-metal-01","tpage_name":"ctypesb-pris"}],[108986400,{"idx":32,"name":"monk-femaleleg-01","tpage_name":"wasleapr-pris"}],[115212300,{"idx":12,"name":"cty-grunt-skin-01","tpage_name":"ctypesb-pris"}],[108986401,{"idx":33,"name":"monk-femaleskirt-bottom","tpage_name":"wasleapr-pris"}],[115212301,{"idx":13,"name":"cty-grunt-skin-02","tpage_name":"ctypesb-pris"}],[107020316,{"idx":28,"name":"vol-bark-burnt","tpage_name":"volcanoa-vis-shrub"}],[102039596,{"idx":44,"name":"gun-red-mag","tpage_name":"gungame-vis-pris2"}],[115736576,{"idx":0,"name":"bam-eyelight","tpage_name":"lnstcst-pris"}],[102039597,{"idx":45,"name":"gun-teeth","tpage_name":"gungame-vis-pris2"}],[107020317,{"idx":29,"name":"vol-feeler","tpage_name":"volcanoa-vis-shrub"}],[115736577,{"idx":1,"name":"bam-hairhilite","tpage_name":"lnstcst-pris"}],[102039598,{"idx":46,"name":"gun-tip","tpage_name":"gungame-vis-pris2"}],[107020318,{"idx":30,"name":"vola-small-rock-sides","tpage_name":"volcanoa-vis-shrub"}],[115736578,{"idx":2,"name":"daxter-eyelid","tpage_name":"lnstcst-pris"}],[102039599,{"idx":47,"name":"gun-yellow-glow","tpage_name":"gungame-vis-pris2"}],[107020319,{"idx":31,"name":"vola-rock-top","tpage_name":"volcanoa-vis-shrub"}],[115736579,{"idx":3,"name":"daxter-furhilite","tpage_name":"lnstcst-pris"}],[102039600,{"idx":48,"name":"gun-yellow-mag","tpage_name":"gungame-vis-pris2"}],[115736580,{"idx":4,"name":"daxter-orange","tpage_name":"lnstcst-pris"}],[102039601,{"idx":49,"name":"gun-yellow-mag-end","tpage_name":"gungame-vis-pris2"}],[115736581,{"idx":5,"name":"daxterarm","tpage_name":"lnstcst-pris"}],[102039602,{"idx":50,"name":"gun-yellowgreen","tpage_name":"gungame-vis-pris2"}],[107020322,{"idx":34,"name":"vola-flutprint-01","tpage_name":"volcanoa-vis-shrub"}],[115736582,{"idx":6,"name":"daxterbodyshort-eix","tpage_name":"lnstcst-pris"}],[102039603,{"idx":51,"name":"jakc-armor","tpage_name":"gungame-vis-pris2"}],[115736583,{"idx":7,"name":"daxterbolt","tpage_name":"lnstcst-pris"}],[102039604,{"idx":52,"name":"talkbox-light-02","tpage_name":"gungame-vis-pris2"}],[115736584,{"idx":8,"name":"daxterear","tpage_name":"lnstcst-pris"}],[115736585,{"idx":9,"name":"daxterfinger","tpage_name":"lnstcst-pris"}],[115736586,{"idx":10,"name":"daxterfoot","tpage_name":"lnstcst-pris"}],[115736587,{"idx":11,"name":"daxterfoot-bottom","tpage_name":"lnstcst-pris"}],[115736588,{"idx":12,"name":"daxtergoggles","tpage_name":"lnstcst-pris"}],[115736589,{"idx":13,"name":"daxterheadwidenew","tpage_name":"lnstcst-pris"}],[115736590,{"idx":14,"name":"daxterhelmetplain","tpage_name":"lnstcst-pris"}],[115736591,{"idx":15,"name":"daxterlense","tpage_name":"lnstcst-pris"}],[115736592,{"idx":16,"name":"daxternose","tpage_name":"lnstcst-pris"}],[115736593,{"idx":17,"name":"daxterteeth","tpage_name":"lnstcst-pris"}],[115736594,{"idx":18,"name":"daxtertuft","tpage_name":"lnstcst-pris"}],[115736595,{"idx":19,"name":"environment-oldmetal","tpage_name":"lnstcst-pris"}],[115736596,{"idx":20,"name":"jakc-armor","tpage_name":"lnstcst-pris"}],[115736597,{"idx":21,"name":"jakc-chestplate-straps","tpage_name":"lnstcst-pris"}],[115736598,{"idx":22,"name":"jakc-gogglemetal","tpage_name":"lnstcst-pris"}],[115736599,{"idx":23,"name":"jakc-lens","tpage_name":"lnstcst-pris"}],[115736600,{"idx":24,"name":"jakc-scarf","tpage_name":"lnstcst-pris"}],[115736601,{"idx":25,"name":"jakc-waistband2","tpage_name":"lnstcst-pris"}],[115736602,{"idx":26,"name":"jakc-wraps","tpage_name":"lnstcst-pris"}],[115736603,{"idx":27,"name":"jakc-wristband-a2","tpage_name":"lnstcst-pris"}],[124452864,{"idx":0,"name":"citwide-crimson-gold","tpage_name":"lctypatk-pris"}],[115736604,{"idx":28,"name":"jakchires-arm","tpage_name":"lnstcst-pris"}],[124452865,{"idx":1,"name":"citwide-crimson-light","tpage_name":"lctypatk-pris"}],[115736605,{"idx":29,"name":"jakchires-blackstrap","tpage_name":"lnstcst-pris"}],[124452866,{"idx":2,"name":"citwide-crimson-red","tpage_name":"lctypatk-pris"}],[115736606,{"idx":30,"name":"jakchires-brownstrap","tpage_name":"lnstcst-pris"}],[124452867,{"idx":3,"name":"citwide-crimson-tube","tpage_name":"lctypatk-pris"}],[115736607,{"idx":31,"name":"jakchires-brwnleather","tpage_name":"lnstcst-pris"}],[124452868,{"idx":4,"name":"citwide-crimson-wall-plain","tpage_name":"lctypatk-pris"}],[115736608,{"idx":32,"name":"jakchires-chestplate","tpage_name":"lnstcst-pris"}],[115736609,{"idx":33,"name":"jakchires-clips","tpage_name":"lnstcst-pris"}],[115736610,{"idx":34,"name":"jakchires-eye","tpage_name":"lnstcst-pris"}],[115736611,{"idx":35,"name":"jakchires-eyebrow","tpage_name":"lnstcst-pris"}],[115736612,{"idx":36,"name":"jakchires-eyelid","tpage_name":"lnstcst-pris"}],[115736613,{"idx":37,"name":"jakchires-facelft","tpage_name":"lnstcst-pris"}],[115736614,{"idx":38,"name":"jakchires-facert","tpage_name":"lnstcst-pris"}],[115736615,{"idx":39,"name":"jakchires-glovetop","tpage_name":"lnstcst-pris"}],[106430500,{"idx":36,"name":"klever-hair","tpage_name":"desliz-pris"}],[117637120,{"idx":0,"name":"intcept-base-green01","tpage_name":"destrack-pris"}],[115736616,{"idx":40,"name":"jakchires-hair","tpage_name":"lnstcst-pris"}],[106430501,{"idx":37,"name":"klever-hand","tpage_name":"desliz-pris"}],[117637121,{"idx":1,"name":"intcept-base-patern01","tpage_name":"destrack-pris"}],[115736617,{"idx":41,"name":"jakchires-horn","tpage_name":"lnstcst-pris"}],[106430502,{"idx":38,"name":"klever-handwrap","tpage_name":"desliz-pris"}],[117637122,{"idx":2,"name":"intcept-base-patern02","tpage_name":"destrack-pris"}],[129433602,{"idx":2,"name":"dp-text-03","tpage_name":"wasseem-sprite"}],[115736622,{"idx":46,"name":"jakchires-precarmor-01","tpage_name":"lnstcst-pris"}],[106430507,{"idx":43,"name":"klever-skirtdark","tpage_name":"desliz-pris"}],[117637127,{"idx":7,"name":"vehicle-body-panel-01","tpage_name":"destrack-pris"}],[129433603,{"idx":3,"name":"dp-text-04","tpage_name":"wasseem-sprite"}],[115736623,{"idx":47,"name":"jakchires-shoebottom","tpage_name":"lnstcst-pris"}],[106430508,{"idx":44,"name":"klever-skirtlight","tpage_name":"desliz-pris"}],[117637128,{"idx":8,"name":"vehicle-brace-pipe-01","tpage_name":"destrack-pris"}],[129433604,{"idx":4,"name":"dp-text-05","tpage_name":"wasseem-sprite"}],[128188424,{"idx":8,"name":"wascity-awning","tpage_name":"waswide-vis-shrub"}],[115736624,{"idx":48,"name":"jakchires-shoemetal","tpage_name":"lnstcst-pris"}],[106430509,{"idx":45,"name":"klever-thighs","tpage_name":"desliz-pris"}],[117637129,{"idx":9,"name":"vehicle-cap-pin-01","tpage_name":"destrack-pris"}],[129433605,{"idx":5,"name":"dp-text-06","tpage_name":"wasseem-sprite"}],[128188425,{"idx":9,"name":"wascity-cactus-tall","tpage_name":"waswide-vis-shrub"}],[115736625,{"idx":49,"name":"jakchires-shoeteop","tpage_name":"lnstcst-pris"}],[106430510,{"idx":46,"name":"klever-undershirt","tpage_name":"desliz-pris"}],[117637130,{"idx":10,"name":"vehicle-chrome-pipe-01","tpage_name":"destrack-pris"}],[129433606,{"idx":6,"name":"dp-text-07","tpage_name":"wasseem-sprite"}],[128188426,{"idx":10,"name":"wascity-cactus-flower","tpage_name":"waswide-vis-shrub"}],[115736626,{"idx":50,"name":"jakchires-teeth","tpage_name":"lnstcst-pris"}],[106430511,{"idx":47,"name":"klever-widebrownstrap","tpage_name":"desliz-pris"}],[117637131,{"idx":11,"name":"vehicle-gas-tank-01","tpage_name":"destrack-pris"}],[129433607,{"idx":7,"name":"dp-text-08","tpage_name":"wasseem-sprite"}],[128188427,{"idx":11,"name":"wascity-cactus-tall-base","tpage_name":"waswide-vis-shrub"}],[115736627,{"idx":51,"name":"jakc-skirt","tpage_name":"lnstcst-pris"}],[106430512,{"idx":48,"name":"daxter-eyelid","tpage_name":"desliz-pris"}],[117637132,{"idx":12,"name":"vehicle-gun-box-01","tpage_name":"destrack-pris"}],[129433608,{"idx":8,"name":"dp-text-09","tpage_name":"wasseem-sprite"}],[128188428,{"idx":12,"name":"des-burn-eye-off","tpage_name":"waswide-vis-shrub"}],[115736628,{"idx":52,"name":"jakc-scarfhanging","tpage_name":"lnstcst-pris"}],[106430513,{"idx":49,"name":"daxter-furhilite","tpage_name":"desliz-pris"}],[117637133,{"idx":13,"name":"vehicle-metal-plate-01","tpage_name":"destrack-pris"}],[100859958,{"idx":54,"name":"jakchires-clips","tpage_name":"ljkdmpk-pris"}],[103350318,{"idx":46,"name":"jakc-waistband2","tpage_name":"comba-pris"}],[115802118,{"idx":6,"name":"sig-faceleft","tpage_name":"lnstcst-pris2"}],[100859961,{"idx":57,"name":"jakchires-eyelid","tpage_name":"ljkdmpk-pris"}],[103350321,{"idx":49,"name":"jakchires-arm","tpage_name":"comba-pris"}],[115802121,{"idx":9,"name":"sig-gem-01","tpage_name":"lnstcst-pris2"}],[100859962,{"idx":58,"name":"jakchires-facelft","tpage_name":"ljkdmpk-pris"}],[103350322,{"idx":50,"name":"jakchires-blackstrap","tpage_name":"comba-pris"}],[115802122,{"idx":10,"name":"sig-glove","tpage_name":"lnstcst-pris2"}],[100859963,{"idx":59,"name":"jakchires-facert","tpage_name":"ljkdmpk-pris"}],[103350323,{"idx":51,"name":"jakchires-brownstrap","tpage_name":"comba-pris"}],[115802123,{"idx":11,"name":"sig-glovetop","tpage_name":"lnstcst-pris2"}],[100859964,{"idx":60,"name":"jakchires-glovetop","tpage_name":"ljkdmpk-pris"}],[103350324,{"idx":52,"name":"jakchires-brwnleather","tpage_name":"comba-pris"}],[115802124,{"idx":12,"name":"sig-gun-01","tpage_name":"lnstcst-pris2"}],[100859965,{"idx":61,"name":"jakchires-hair","tpage_name":"ljkdmpk-pris"}],[103350325,{"idx":53,"name":"jakchires-chestplate","tpage_name":"comba-pris"}],[115802125,{"idx":13,"name":"sig-gun-02","tpage_name":"lnstcst-pris2"}],[100859966,{"idx":62,"name":"jakchires-horn","tpage_name":"ljkdmpk-pris"}],[103350326,{"idx":54,"name":"jakchires-clips","tpage_name":"comba-pris"}],[115802126,{"idx":14,"name":"sig-gun-03","tpage_name":"lnstcst-pris2"}],[100859967,{"idx":63,"name":"jakchires-jacket","tpage_name":"ljkdmpk-pris"}],[103350327,{"idx":55,"name":"jakchires-eye","tpage_name":"comba-pris"}],[115802127,{"idx":15,"name":"sig-gun-04","tpage_name":"lnstcst-pris2"}],[120782848,{"idx":0,"name":"map-nst-lower","tpage_name":"lwassig-minimap"}],[100859968,{"idx":64,"name":"jakchires-leatherpouch","tpage_name":"ljkdmpk-pris"}],[103350328,{"idx":56,"name":"jakchires-eyebrow","tpage_name":"comba-pris"}],[115802128,{"idx":16,"name":"sig-gun-05","tpage_name":"lnstcst-pris2"}],[100859969,{"idx":65,"name":"jakchires-lightbrownspat","tpage_name":"ljkdmpk-pris"}],[103350329,{"idx":57,"name":"jakchires-eyelid","tpage_name":"comba-pris"}],[115802129,{"idx":17,"name":"sig-headgear","tpage_name":"lnstcst-pris2"}],[100859970,{"idx":66,"name":"jakchires-pants","tpage_name":"ljkdmpk-pris"}],[103350330,{"idx":58,"name":"jakchires-facelft","tpage_name":"comba-pris"}],[115802130,{"idx":18,"name":"sig-horn","tpage_name":"lnstcst-pris2"}],[100859971,{"idx":67,"name":"jakchires-precarmor-01","tpage_name":"ljkdmpk-pris"}],[103350331,{"idx":59,"name":"jakchires-facert","tpage_name":"comba-pris"}],[115802131,{"idx":19,"name":"sig-lens","tpage_name":"lnstcst-pris2"}],[100859972,{"idx":68,"name":"jakchires-shoebottom","tpage_name":"ljkdmpk-pris"}],[103350332,{"idx":60,"name":"jakchires-glovetop","tpage_name":"comba-pris"}],[115802132,{"idx":20,"name":"sig-metal-01","tpage_name":"lnstcst-pris2"}],[100859973,{"idx":69,"name":"jakchires-shoemetal","tpage_name":"ljkdmpk-pris"}],[103350333,{"idx":61,"name":"jakchires-hair","tpage_name":"comba-pris"}],[115802133,{"idx":21,"name":"sig-metal-dirty","tpage_name":"lnstcst-pris2"}],[100859974,{"idx":70,"name":"jakchires-shoeteop","tpage_name":"ljkdmpk-pris"}],[103350334,{"idx":62,"name":"jakchires-horn","tpage_name":"comba-pris"}],[115802134,{"idx":22,"name":"sig-sac","tpage_name":"lnstcst-pris2"}],[100859975,{"idx":71,"name":"jakchires-teeth","tpage_name":"ljkdmpk-pris"}],[103350335,{"idx":63,"name":"jakchires-jacket","tpage_name":"comba-pris"}],[115802135,{"idx":23,"name":"sig-shoebottom","tpage_name":"lnstcst-pris2"}],[103350336,{"idx":64,"name":"jakchires-leatherpouch","tpage_name":"comba-pris"}],[115802136,{"idx":24,"name":"sig-shoetop","tpage_name":"lnstcst-pris2"}],[103350337,{"idx":65,"name":"jakchires-lightbrownspat","tpage_name":"comba-pris"}],[115802137,{"idx":25,"name":"sig-shoulderarmor","tpage_name":"lnstcst-pris2"}],[103350338,{"idx":66,"name":"jakchires-pants","tpage_name":"comba-pris"}],[115802138,{"idx":26,"name":"sig-skirts","tpage_name":"lnstcst-pris2"}],[103350339,{"idx":67,"name":"jakchires-precarmor-01","tpage_name":"comba-pris"}],[115802139,{"idx":27,"name":"sig-skirts-02","tpage_name":"lnstcst-pris2"}],[103350340,{"idx":68,"name":"jakchires-shoebottom","tpage_name":"comba-pris"}],[115802140,{"idx":28,"name":"sig-skirts-03","tpage_name":"lnstcst-pris2"}],[103350341,{"idx":69,"name":"jakchires-shoemetal","tpage_name":"comba-pris"}],[115802141,{"idx":29,"name":"sig-undergarments","tpage_name":"lnstcst-pris2"}],[103350342,{"idx":70,"name":"jakchires-shoeteop","tpage_name":"comba-pris"}],[115802142,{"idx":30,"name":"vin-teeth-01","tpage_name":"lnstcst-pris2"}],[115867648,{"idx":0,"name":"sig-flatfangs","tpage_name":"lnstcst-water"}],[115867649,{"idx":1,"name":"desert-nest-egg-piping","tpage_name":"lnstcst-water"}],[115867650,{"idx":2,"name":"nst-spiderweb","tpage_name":"lnstcst-water"}],[111869968,{"idx":16,"name":"stadiumb-hud-ord-nd","tpage_name":"wasleapr-minimap"}],[99418168,{"idx":56,"name":"tpl-glider-grip01","tpage_name":"volcanox-pris"}],[116850688,{"idx":0,"name":"sewer-pipe-small-01","tpage_name":"sewk-vis-shrub"}],[111869969,{"idx":17,"name":"stadiumb-hud-ord-o","tpage_name":"wasleapr-minimap"}],[99418169,{"idx":57,"name":"tpl-glider-metal01","tpage_name":"volcanox-pris"}],[116850689,{"idx":1,"name":"sewer-nut","tpage_name":"sewk-vis-shrub"}],[111869970,{"idx":18,"name":"stadiumb-hud-ord-rd","tpage_name":"wasleapr-minimap"}],[99418170,{"idx":58,"name":"tpl-glider-metal02","tpage_name":"volcanox-pris"}],[116850690,{"idx":2,"name":"sewer-shrub-pitting-01","tpage_name":"sewk-vis-shrub"}],[106954784,{"idx":32,"name":"vol-metal-01","tpage_name":"volcanoa-vis-tfrag"}],[99483704,{"idx":56,"name":"dp-bipedal-dk-hose-01","tpage_name":"lformach-vis-pris"}],[116916224,{"idx":0,"name":"airlock-door-bolt","tpage_name":"sewk-vis-pris"}],[99483705,{"idx":57,"name":"dp-bipedal-dk-plate-01","tpage_name":"lformach-vis-pris"}],[116916225,{"idx":1,"name":"airlock-door-cog","tpage_name":"sewk-vis-pris"}],[106954786,{"idx":34,"name":"vola-rock-side-wall","tpage_name":"volcanoa-vis-tfrag"}],[99483706,{"idx":58,"name":"dp-bipedal-dk-plate-02","tpage_name":"lformach-vis-pris"}],[116916226,{"idx":2,"name":"airlock-door-main","tpage_name":"sewk-vis-pris"}],[99483707,{"idx":59,"name":"dp-bipedal-dk-plate-03","tpage_name":"lformach-vis-pris"}],[116916227,{"idx":3,"name":"airlock-door-metal2","tpage_name":"sewk-vis-pris"}],[99483708,{"idx":60,"name":"dp-bipedal-dk-plate-04","tpage_name":"lformach-vis-pris"}],[116916228,{"idx":4,"name":"airlockl-door-metalframe","tpage_name":"sewk-vis-pris"}],[106954790,{"idx":38,"name":"vola-grass-fringe-05-HI","tpage_name":"volcanoa-vis-tfrag"}],[99483710,{"idx":62,"name":"dp-bipedal-dk-stomach-plate-01","tpage_name":"lformach-vis-pris"}],[116916230,{"idx":6,"name":"airlock-door-cog1","tpage_name":"sewk-vis-pris"}],[99483711,{"idx":63,"name":"dp-bipedal-eye-01","tpage_name":"lformach-vis-pris"}],[116916231,{"idx":7,"name":"sewcurved-door-01","tpage_name":"sewk-vis-pris"}],[106954792,{"idx":40,"name":"vola-slide-metal","tpage_name":"volcanoa-vis-tfrag"}],[99483712,{"idx":64,"name":"dp-bipedal-finger-plate-01","tpage_name":"lformach-vis-pris"}],[116916232,{"idx":8,"name":"sewcurved-door-04","tpage_name":"sewk-vis-pris"}],[106954793,{"idx":41,"name":"vola-cable","tpage_name":"volcanoa-vis-tfrag"}],[99483713,{"idx":65,"name":"dp-bipedal-nose-01","tpage_name":"lformach-vis-pris"}],[116916233,{"idx":9,"name":"sewcurved-door-05","tpage_name":"sewk-vis-pris"}],[106954794,{"idx":42,"name":"vola-rising-step-base","tpage_name":"volcanoa-vis-tfrag"}],[99483714,{"idx":66,"name":"dp-bipedal-power-hose","tpage_name":"lformach-vis-pris"}],[116916234,{"idx":10,"name":"sewcurved-door-06","tpage_name":"sewk-vis-pris"}]] diff --git a/decompiler/config/jak3/ntsc_v1/type_casts.jsonc b/decompiler/config/jak3/ntsc_v1/type_casts.jsonc index e994ee728a..91e4fd92cb 100644 --- a/decompiler/config/jak3/ntsc_v1/type_casts.jsonc +++ b/decompiler/config/jak3/ntsc_v1/type_casts.jsonc @@ -711,7 +711,7 @@ [ 617, "s0", - "(function symbol symbol continue-point game-save resetter-spec none :behavior process)" + "(function cpu-thread function symbol symbol continue-point game-save resetter-spec none)" ] ], "(method 9 lod-set)": [["_stack_", 16, "res-tag"]], @@ -1054,10 +1054,14 @@ [146, "v1", "region-prim-area"], [129, "a1", "region-prim-area"], [103, "v1", "region-prim-area"], - [[19, 29], "v1", "region-prim-area"] + [[19, 29], "v1", "region-prim-area"], + [39, "a0", "region-prim-area"], + [45, "a0", "region-prim-area"], + [51, "a0", "region-prim-area"], + [32, "a0", "region-prim-area"] ], "(method 16 drawable-inline-array-region-prim)": [ - [1, "v1", "drawable-region-prim"] + [[1, 7], "v1", "drawable-region-prim"] ], "clone-anim-once": [ [22, "gp", "process-drawable"], @@ -1234,7 +1238,10 @@ [45, "v1", "process-drawable"], [54, "v1", "process-drawable"] ], - "local-space-proc-joint": [[12, "a2", "process-drawable"]], + "local-space-proc-joint": [ + [12, "a2", "process-drawable"], + [14, "a1", "int"] + ], "part-tracker-init": [ [65, "s4", "particle-local-space-info"], [68, "s4", "particle-local-space-info"], @@ -1311,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"], @@ -1365,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"], @@ -1379,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"], @@ -1392,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"], @@ -1678,7 +1662,10 @@ [439, "a0", "(pointer uint128)"], [[472, 487], "a0", "dma-packet"], [[559, 576], "a0", "dma-packet"], - [[597, 602], "a0", "dma-packet"] + [[597, 602], "a0", "dma-packet"], + [436, "a1", "(pointer uint128)"], + [437, "a0", "(pointer uint128)"], + [[470, 472], "a0", "dma-packet"] ], "lightning-trail-fractal-gen": [ [52, "v1", "float"], @@ -1729,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"], @@ -1841,50 +1822,26 @@ [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"]], "target-gun-joint-points": [[858, "a0", "int"]], - "(method 11 light-trail)": [ - [19, "a0", "pointer"], - [50, "v1", "pointer"], - [96, "v1", "pointer"] - ], "(method 12 light-trail)": [ - [18, "v1", "pointer"], - [23, "a0", "pointer"], - [176, "v1", "pointer"], - [542, "v1", "pointer"], ["_stack_", 88, "float"], ["_stack_", 92, "float"], ["_stack_", 96, "float"], @@ -1892,10 +1849,10 @@ ["_stack_", 144, "float"], ["_stack_", 148, "float"], ["_stack_", 152, "float"], - ["_stack_", 156, "float"] + ["_stack_", 156, "float"], + [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"] @@ -1937,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)": [ @@ -2495,5 +2455,6245 @@ [[340, 364], "v1", "(pointer uint8)"], [364, "v1", "(pointer uint8)"], [[365, 372], "v1", "(pointer uint8)"] - ] + ], + "generic-work-init": [ + [4, "a0", "generic-work"], + [[9, 19], "a0", "generic-work"], + [23, "a1", "generic-work"] + ], + "generic-initialize-without-sync": [ + [8, "a0", "generic-work"], + [21, "a0", "generic-work"] + ], + "generic-initialize": [ + [8, "a0", "generic-work"], + [21, "a0", "generic-work"] + ], + "generic-wrapup": [ + [1, "v1", "generic-work"], + [4, "v1", "generic-work"] + ], + "generic-warp-source": [[2, "at", "generic-work"]], + "(method 9 font-work)": [ + [16, "t0", "(pointer uint32)"], + [47, "a2", "(pointer uint32)"], + [49, "a2", "(pointer uint32)"], + [51, "a2", "(pointer uint32)"], + [53, "a2", "(pointer uint32)"] + ], + "unpack-comp-rle": [[[10, 26], "a0", "(pointer int8)"]], + "unpack-comp-huf": [[[21, 23], "t3", "(pointer uint16)"]], + "(method 16 level)": [ + [222, "v1", "(pointer uint128)"], + [223, "a1", "(pointer uint128)"], + [225, "a0", "(pointer uint128)"], + [[71, 168], "s1", "(pointer int8)"], + [72, "v1", "(pointer int8)"], + [[74, 169], "s0", "(pointer int8)"], + [[170, 193], "s1", "(pointer uint8)"], + [[171, 193], "s2", "(pointer uint8)"], + [227, "v1", "(pointer uint8)"] + ], + "upload-vis-bits": [ + [14, "a1", "(pointer uint128)"], + [[8, 35], "a2", "(pointer uint128)"] + ], + "finish-background": [ + [900, "t4", "(pointer int32)"], + [963, "t4", "(pointer int32)"], + [1026, "t4", "(pointer int32)"], + [1089, "t3", "(pointer int32)"] + ], + "(method 16 drawable-inline-array-node)": [[[1, 7], "v1", "draw-node"]], + "(method 9 shrubbery)": [ + [23, "a2", "(pointer int32)"], + [28, "a3", "(pointer int32)"] + ], + "shrub-upload-view-data": [[[3, 17], "a0", "dma-packet"]], + "shrub-do-init-frame": [ + [[12, 21], "a0", "dma-packet"], + [[26, 29], "a0", "dma-packet"], + [33, "v1", "(pointer vif-tag)"], + [[35, 41], "v1", "(pointer uint32)"], + [42, "v1", "(pointer vif-tag)"], + [[44, 51], "v1", "(pointer uint32)"], + [52, "v1", "(pointer vif-tag)"], + [54, "v1", "(pointer uint32)"] + ], + "shrub-init-frame": [ + [[8, 12], "a0", "dma-packet"], + [[18, 21], "a0", "gs-gif-tag"], + [24, "v1", "(pointer gs-test)"], + [26, "v1", "(pointer gs-reg64)"] + ], + "shrub-upload-model": [ + [[17, 26], "a3", "dma-packet"], + [[33, 41], "a0", "dma-packet"], + [[47, 55], "a0", "dma-packet"] + ], + "draw-prototype-inline-array-shrub": [ + [387, "a0", "prototype-shrubbery"], + [481, "v1", "prototype-shrubbery"], + [[637, 646], "a1", "prototype-bucket-shrub"], + [[301, 392], "s1", "prototype-bucket-shrub"], + [[470, 515], "s1", "prototype-bucket-shrub"], + [[470, 658], "gp", "prototype-bucket-shrub"], + [[13, 56], "v1", "prototype-bucket-shrub"] + // [[102, 114], "a0", "shrub-near-packet"], + // [[114, 117], "v1", "vector4w-3"], + // [118, "a1", "vector4w"], + // [123, "v1", "dma-packet"], + // [[124, 126], "v1", "vector4w"], + // [[334, 364], "s1", "prototype-bucket-shrub"], + // [416, "a0", "drawable-group"], + // [420, "s1", "prototype-bucket-shrub"], + // [525, "v1", "drawable-group"], + // [[518, 535], "s1", "prototype-bucket-shrub"], + // [558, "s1", "prototype-bucket-shrub"], + // [[677, 718], "gp", "prototype-bucket-shrub"], + // [[696, 706], "a1", "prototype-bucket-shrub"] + ], + "(method 8 drawable-tree-instance-shrub)": [[51, "v1", "drawable-group"]], + "(method 13 drawable-tree-instance-shrub)": [ + [[12, 151], "gp", "prototype-bucket-shrub"], + [19, "a1", "drawable-group"], + [45, "v1", "drawable-group"], + [67, "s3", "shrubbery"], + [93, "v1", "drawable-group"], + [115, "s3", "shrubbery"], + [161, "gp", "(inline-array prototype-bucket-shrub)"] + ], + "draw-drawable-tree-instance-shrub": [[86, "a0", "drawable-group"]], + "(method 9 tfragment)": [ + [27, "a3", "(pointer int32)"], + [32, "t0", "texture"] + ], + "add-tfrag-mtx-0": [[[3, 17], "a0", "dma-packet"]], + "add-tfrag-mtx-1": [[[3, 17], "a0", "dma-packet"]], + "add-tfrag-data": [ + [[3, 17], "a0", "dma-packet"], + [[24, 31], "v1", "dma-packet"] + ], + "tfrag-init-buffer": [[[73, 81], "v1", "dma-packet"]], + "tfrag-end-buffer": [ + [[21, 28], "a2", "dma-packet"], + [[31, 38], "a0", "(pointer vif-tag)"], + [[38, 42], "a0", "(pointer int32)"], + [[43, 49], "a0", "(pointer vif-tag)"] + ], + "tfrag-vu1-init-buf": [ + [[47, 55], "v1", "dma-packet"], + [[81, 86], "v1", "dma-packet"], + [89, "v1", "(pointer int32)"] + ], + "draw-drawable-tree-tfrag-water": [ + [18, "v1", "drawable-inline-array-node"], + [20, "a0", "drawable-inline-array-node"] + ], + "draw-drawable-tree-tfrag-trans": [ + [18, "v1", "drawable-inline-array-node"], + [20, "a0", "drawable-inline-array-node"] + ], + "draw-drawable-tree-tfrag": [ + [17, "v1", "drawable-inline-array-node"], + [19, "a0", "drawable-inline-array-node"] + ], + "(method 9 tie-fragment)": [ + [21, "a2", "(pointer int32)"], + [26, "a3", "(pointer int32)"], + [[1, 70], "s5", "adgif-shader"] + ], + "tie-init-engine": [ + [[37, 51], "a0", "dma-packet"], + [[63, 71], "a0", "dma-packet"], + [[73, 80], "a0", "dma-packet"], + [[81, 90], "v1", "vector"], + [[91, 98], "v1", "(pointer vif-tag)"] + ], + "tie-end-buffer": [ + [[47, 54], "a1", "dma-packet"], + [[58, 69], "a0", "(pointer vif-tag)"] + ], + "tie-ints": [ + [17, "v1", "(pointer uint32)"], + [21, "v1", "(pointer uint32)"] + ], + "tie-floats": [[[3, 73], "gp", "(pointer uint32)"]], + "instance-tie-patch-buckets": [ + [39, "a0", "(pointer uint64)"], + [137, "a0", "(pointer uint64)"], + [235, "a0", "(pointer uint64)"], + [333, "a0", "(pointer uint64)"], + [431, "a0", "(pointer uint64)"], + [530, "a0", "(pointer uint64)"], + [629, "a0", "(pointer uint64)"], + [728, "a0", "(pointer uint64)"], + [827, "a0", "(pointer uint64)"], + [926, "a0", "(pointer uint64)"], + [1025, "a0", "(pointer uint64)"], + [1124, "a0", "(pointer uint64)"], + [1223, "a0", "(pointer uint64)"] + ], + "draw-drawable-tree-instance-tie": [ + [[23, 37], "v1", "drawable-inline-array-node"], + [25, "a0", "drawable-inline-array-node"], + [120, "s2", "drawable-inline-array-instance-tie"], + [132, "v1", "int"], + [132, "a0", "int"] + ], + "tie-init-buf": [ + [[44, 51], "a0", "dma-packet"], + [[53, 60], "a0", "gs-gif-tag"], + [64, "a0", "(pointer gs-zbuf)"], + [66, "a0", "(pointer gs-reg64)"], + [[71, 79], "v1", "dma-packet"], + [[104, 110], "v1", "dma-packet"], + [112, "v1", "(pointer uint32)"] + ], + "(method 13 drawable-tree-instance-tie)": [ + [[51, 70], "t1", "tie-fragment"], + [[102, 120], "a3", "tie-fragment"], + [[160, 178], "t1", "tie-fragment"], + [[211, 229], "a3", "tie-fragment"], + [[266, 286], "t1", "tie-fragment"], + [[320, 340], "a1", "tie-fragment"], + [[381, 400], "t1", "tie-fragment"], + [[432, 450], "a3", "tie-fragment"], + [[487, 507], "t1", "tie-fragment"], + [[541, 561], "a1", "tie-fragment"], + [[598, 616], "t1", "tie-fragment"], + [[649, 667], "a3", "tie-fragment"], + [[703, 723], "t1", "tie-fragment"], + [[756, 776], "a1", "tie-fragment"] + ], + "(method 9 prim-strip)": [ + [224, "t2", "int"], + [224, "t0", "int"], + [226, "t1", "int"], + [226, "a3", "int"], + [[190, 231], "a1", "(inline-array prim-vertex)"] + ], + "prim-engine-execute": [ + [[15, 21], "v1", "connection"], + [[21, 25], "a0", "prim-strip"] + ], + "(event tracking light-trail-tracker)": [[55, "v1", "float"]], + "(method 21 light-trail)": [[50, "v1", "light-trail-breadcrumb"]], + "(method 14 light-trail)": [[47, "a0", "uint"]], + "debug-menu-item-var-update-display-str": [ + [48, "v1", "int"], + [63, "v1", "int"], + [68, "v1", "int"], + [46, "v1", "int"], + [45, "v1", "int"], + [65, "v1", "int"], + [66, "v1", "int"] + ], + "debug-menu-rebuild": [[7, "a0", "debug-menu-item"]], + "debug-menu-func-decode": [[18, "a0", "symbol"]], + "debug-menu-find-from-template": [ + [9, "s5", "string"], + [10, "s4", "debug-menu-item"], + [18, "s4", "debug-menu-item-submenu"], + [3, "s5", "debug-menu"] + ], + "debug-menu-render": [[[118, 121], "v1", "dma-packet"]], + "debug-menu-send-msg": [ + [17, "s2", "debug-menu-item-submenu"], + [12, "s2", "debug-menu-item"] + ], + "debug-menu-item-var-joypad-handler": [ + [206, "a1", "int"], + [207, "v1", "int"] + ], + "debug-menu-item-get-max-width": [ + [5, "a0", "debug-menu-item-submenu"], + [20, "a0", "debug-menu-item-var"] + ], + "debug-menu-item-var-make-float": [[32, "f0", "int"]], + "ragdoll-joint-callback": [[92, "t9", "(function cspace transformq none)"]], + "(method 15 ragdoll)": [ + [78, "s4", "ragdoll-edit-info"], + [92, "s4", "ragdoll-edit-info"], + [202, "s4", "ragdoll-edit-info"], + [216, "s4", "ragdoll-edit-info"], + [221, "s4", "ragdoll-edit-info"], + [362, "s4", "ragdoll-edit-info"], + [110, "s4", "ragdoll-edit-info"], + [115, "s4", "ragdoll-edit-info"] + ], + "(trans tracking weapon-trail-tracker)": [ + [36, "gp", "process-drawable"], + [45, "gp", "process-drawable"] + ], + "(trans tracking tread-trail-tracker)": [ + [27, "gp", "process-drawable"], + [30, "gp", "process-drawable"] + ], + "(method 23 weapon-trail)": [ + [62, "v1", "light-trail-breadcrumb"], + [65, "v1", "light-trail-breadcrumb"] + ], + "(method 22 weapon-trail)": [[32, "v0", "light-trail-breadcrumb"]], + "(method 22 tread-trail)": [[19, "v0", "light-trail-breadcrumb"]], + "(method 23 tread-trail)": [ + [51, "v1", "light-trail-breadcrumb"], + [67, "v0", "light-trail-breadcrumb"] + ], + "(trans idle fma-sphere)": [[39, "a2", "process-drawable"]], + "part-water-splash-callback": [[3, "v1", "float"]], + "(method 15 water-control)": [[48, "v1", "float"]], + "(method 13 water-control)": [[158, "v1", "process-drawable"]], + "find-water-2": [ + [8, "v1", "region-prim-area"], + [15, "a1", "region-prim-area"] + ], + "find-water-1": [ + [62, "a0", "region-prim-area"], + [40, "a1", "region-prim-area"], + [6, "v1", "region-prim-area"], + [8, "v1", "region-prim-area"], + [11, "a1", "region-prim-area"] + ], + "water-info<-region": [ + [62, "v1", "pair"], + [71, "v1", "pair"], + [72, "v1", "pair"], + [210, "v1", "pair"], + [211, "v1", "pair"], + [212, "v1", "pair"], + [213, "s1", "pair"], + [280, "s1", "pair"], + [281, "s1", "pair"], + [271, "a0", "process-focusable"], + [111, "v1", "pair"], + [112, "v1", "pair"], + [144, "s0", "process-drawable"], + [156, "v1", "pair"], + [157, "v1", "pair"], + [61, "s1", "pair"], + [70, "s1", "pair"], + [209, "s1", "pair"], + [110, "s1", "pair"], + [155, "s1", "pair"], + [290, "a0", "region-prim-area"] + ], + "(method 10 flow-control)": [["_stack_", 48, "flow-section"]], + "(method 12 flow-control)": [ + [23, "a0", "connection"], + [24, "a0", "collide-shape"], + [71, "a0", "connection"], + [72, "a0", "collide-shape"], + [148, "a1", "process-focusable"] + ], + "(event idle water-flow)": [[15, "a0", "process-focusable"]], + "(method 9 menu-select-start-option)": [ + [393, "s3", "pair"], + [394, "v1", "pair"] + ], + "(method 24 progress)": [ + [64, "v1", "menu-missions-option"], + [69, "v1", "menu-missions-option"] + ], + "(method 31 progress)": [ + [64, "v1", "menu-missions-option"], + [69, "v1", "menu-missions-option"] + ], + "(method 9 menu-slider-option)": [[10, "v1", "(pointer float)"]], + "(method 33 progress)": [ + [18, "v1", "vector"], + [17, "gp", "vector"] + ], + "(method 32 progress)": [ + [46, "v1", "paged-menu-option"], + [50, "v1", "paged-menu-option"], + [310, "v1", "menu-select-start-option"], + [315, "v1", "menu-select-start-option"], + [319, "v1", "menu-select-start-option"], + [330, "v1", "menu-select-scene-option"], + [335, "v1", "menu-select-scene-option"], + [339, "v1", "menu-select-scene-option"], + [405, "v1", "menu-missions-option"], + [410, "v1", "menu-missions-option"] + ], + "(method 10 menu-memcard-slot-option)": [ + [215, "v1", "vector"], + [[273, 276], "v1", "dma-packet"] + ], + "(method 10 menu-picture-slider-option)": [[36, "v1", "pointer"]], + "(method 10 menu-sound-slider-option)": [[29, "v1", "pointer"]], + "(method 10 menu-center-screen-graphic-option)": [["_stack_", 16, "float"]], + "(method 52 progress)": [ + [[284, 287], "v1", "dma-packet"], + [80, "v1", "texture"], + [132, "v1", "texture"] + ], + "(method 9 progress-icon-array)": [[[108, 111], "v1", "dma-packet"]], + "hide-hud": [ + [11, "v1", "connection"], + [23, "v1", "connection"] + ], + "enable-hud": [[17, "v1", "connection"]], + "(method 13 hud-box)": [ + [[84, 89], "t3", "(inline-array vector4w)"], + [[116, 121], "t7", "(inline-array vector4w)"], + [[122, 126], "t7", "(inline-array vector4w)"], + [[126, 131], "t5", "(inline-array vector4w)"], + [[131, 136], "t4", "(inline-array vector4w)"], + [137, "t4", "(inline-array vector4w)"], + [[177, 200], "t2", "(inline-array vector4w)"], + [[116, 132], "t4", "(inline-array vector4w)"] + ], + "(method 9 hud-sprite)": [ + [34, "s3", "texture"], + [63, "s3", "texture"], + [78, "s3", "texture"], + [96, "s3", "texture"], + [85, "s3", "texture"], + [[39, 42], "s2", "(inline-array vector4w)"], + [51, "a0", "(pointer uint64)"], + [58, "a0", "(pointer uint64)"], + [[185, 196], "v1", "(inline-array vector4w)"], + [[211, 218], "t5", "(inline-array vector)"], + [[222, 229], "t5", "(inline-array vector)"], + [[230, 240], "t5", "(inline-array vector)"], + [[244, 254], "t5", "(inline-array vector)"], + [[256, 262], "t5", "(inline-array vector4w)"], + [[264, 270], "a2", "(inline-array vector4w)"], + [[280, 286], "v1", "(inline-array vector4w)"], + [[272, 278], "a2", "(inline-array vector4w)"] + ], + "(method 10 hud-box)": [[[31, 77], "v1", "(inline-array vector4w)"]], + "(method 11 hud-box)": [[[31, 77], "v1", "(inline-array vector4w)"]], + "(method 12 hud-box)": [[[31, 77], "v1", "(inline-array vector4w)"]], + "hud-create-icon": [ + [33, "a0", "process-drawable"], + [38, "a0", "manipy"] + ], + "hud-hidden?": [ + [9, "v1", "connection"], + [10, "a0", "hud"], + [12, "a0", "hud"] + ], + "ready-hud": [ + [23, "v1", "connection"], + [37, "v1", "connection"] + ], + "show-hud": [ + [22, "v1", "connection"], + [34, "v1", "connection"] + ], + "hide-hud-quick": [ + [11, "v1", "connection"], + [23, "v1", "connection"] + ], + "(method 9 hud-box)": [[[53, 84], "v1", "(inline-array vector4w)"]], + "(method 10 hud-sprite)": [ + [32, "s0", "texture"], + [242, "s0", "texture"], + [243, "s0", "texture"], + [[39, 45], "v1", "(inline-array vector4w)"], + [[230, 242], "v1", "(inline-array vector4w)"], + [[275, 332], "v1", "(inline-array vector)"], + [45, "s0", "texture"] + ], + "(method 50 progress)": [ + ["_stack_", 96, "float"], + ["_stack_", 176, "float"] + ], + "find-mission-text-at-index": [[157, "v1", "symbol"]], + "(method 11 controls-page-info)": [["_stack_", 64, "float"]], + "(method 16 hud)": [ + [127, "v1", "int"], + [147, "v1", "int"] + ], + "lookup-level-info": [ + [11, "v1", "basic"], + [21, "a1", "symbol"], + [[22, 34], "a1", "level-load-info"] + ], + "(method 29 level-group)": [[[2, 53], "v1", "pair"]], + "level-find-borrow-slot": [[[204, 211], "a2", "level"]], + "(method 19 level)": [ + [[40, 118], "a3", "symbol"], + [[52, 56], "a0", "texture-anim-array"] + ], + "level-update-after-load": [ + [[25, 58], "s1", "drawable-tree-tfrag"], + [142, "v1", "drawable-inline-array-tfrag"], + [147, "v1", "drawable-inline-array-tfrag"], + [152, "a0", "drawable-inline-array-tfrag"], + [175, "v1", "drawable-tree-instance-tie"], + [178, "v1", "drawable-tree-instance-tie"], + [393, "a1", "(pointer int32)"], + [398, "a2", "(pointer int32)"] + ], + "(method 25 level)": [ + [97, "s1", "(function object object)"], + [171, "s0", "(function object object object)"] + ], + "(method 9 level)": [ + [51, "s5", "(function object object)"], + [[143, 166], "v1", "task-mask"] + ], + "(method 10 level)": [ + [[214, 217], "v1", "symbol"], + [[216, 220], "a0", "texture-anim-array"], + [137, "s5", "(function level object)"], + [[349, 358], "a1", "type"] + ], + "(method 30 level-group)": [[87, "v0", "level"]], + "(method 10 load-state)": [ + [461, "v1", "level"], + [468, "v1", "level"] + ], + "update-sound-banks": [[131, "a0", "pair"]], + "borrow-city-expansion": [ + [23, "a0", "basic"], + [52, "s5", "basic"] + ], + "find-instance-by-name-level": [ + [11, "v1", "drawable-tree-instance-shrub"], + [38, "v1", "drawable-tree-instance-tie"] + ], + "dma-add-process-drawable": [ + [42, "a0", "foreground-work"], + [45, "a0", "foreground-work"], + [78, "a0", "foreground-work"], + [198, "t0", "(pointer int128)"] + ], + "calc-shadow-masks": [[10, "v0", "(array float)"]], + "dma-add-process-drawable-hud": [ + [[43, 59], "v1", "level"], + [11, "a0", "foreground-work"] + ], + "default-init-buffer": [[[116, 126], "a1", "dma-packet"]], + "default-end-buffer": [ + [[117, 123], "a1", "dma-packet"], + [125, "a1", "(pointer uint32)"] + ], + "display-frame-start": [ + [4, "v1", "vif-bank"], + [9, "a0", "vif-bank"] + ], + "display-frame-finish": [ + [[504, 513], "a0", "dma-packet"], + [542, "a0", "(pointer uint64)"] + ], + "(method 15 drawable-tree)": [ + [[1, 4], "v1", "drawable-inline-array-node"], + [[29, 34], "t0", "drawable-inline-array-node"], + [[28, 32], "t2", "drawable-inline-array-node"], + [[42, 46], "t2", "(pointer int8)"] + ], + "get-shadow-by-name": [[7, "v1", "process-drawable"]], + "set-shadow-by-name": [[7, "v1", "process-drawable"]], + "find-instance-by-index": [ + [26, "t1", "drawable-tree-instance-shrub"], + [40, "t1", "drawable-tree-instance-tie"] + ], + "print-prototype-list": [ + [25, "v1", "drawable-tree-instance-shrub"], + [104, "v1", "drawable-tree-instance-tie"] + ], + "draw-instance-info": [ + [[188, 203], "s5", "prototype-bucket-shrub"], + [[192, 303], "s1", "prototype-shrubbery"], + [[359, 400], "v1", "prototype-tie"], + [[44, 64], "s1", "drawable-inline-array-instance-tie"], + [[331, 450], "s5", "prototype-bucket-tie"], + [[35, 41], "v1", "drawable-tree-instance-tie"] + ], + "set-graphics-mode": [[[0, 100], "gp", "gs-bank"]], + "(method 9 screen-filter)": [[[118, 128], "t1", "rgba"]], + "display-loop-main": [[231, "t9", "(function none)"]], + "effect-param->sound-spec": [[178, "v1", "collide-shape-moving"]], + "(method 10 effect-control)": [ + [149, "v1", "collide-shape-moving"], + [427, "s3", "death-info"], + [433, "s3", "death-info"], + [435, "s3", "death-info"], + [470, "s3", "death-info"], + [476, "s3", "death-info"], + [478, "s3", "death-info"], + [483, "s3", "death-info"], + [487, "s3", "death-info"], + [507, "s3", "death-info"], + [25, "v0", "string"], + [48, "v0", "pair"] + ], + "(method 12 effect-control)": [ + [99, "gp", "(pointer int8)"], + ["_stack_", 112, "res-tag"] + ], + "process-drawable-draw-subtitles": [[26, "v0", "(array subtitle-range)"]], + "(method 25 scene-player)": [ + [102, "s1", "process-drawable"], + [163, "s1", "process-drawable"], + [166, "s1", "process-drawable"], + [169, "s1", "process-drawable"], + [172, "s1", "process-drawable"] + ], + "(method 9 scene-actor)": [ + [179, "s3", "skeleton-group"], + [286, "a0", "process-drawable"], + [290, "v1", "process-drawable"], + [294, "a0", "process-drawable"], + [370, "a0", "process-drawable"], + [549, "v1", "manipy"], + [557, "v1", "manipy"], + [563, "v1", "manipy"], + [578, "v1", "manipy"], + [584, "v1", "manipy"], + [528, "a0", "process-drawable"], + [536, "v1", "process-drawable"], + [543, "a0", "process-drawable"], + [751, "a0", "process-drawable"], + [755, "v1", "process-drawable"], + [759, "a0", "process-drawable"] + ], + "(post play-anim scene-player)": [ + [210, "s4", "process-drawable"], + [261, "s4", "process-drawable"], + [324, "s5", "process-drawable"], + [707, "v0", "sound-rpc-set-param"], + [586, "v0", "sound-rpc-set-param"] + ], + "(trans play-anim scene-player)": [ + [71, "v1", "process-drawable"], + [78, "v1", "process-drawable"] + ], + "(event play-anim scene-player)": [ + [11, "t9", "(function scene-player none)"] + ], + "(code othercam-running)": [ + [14, "s2", "process-drawable"], + [18, "s2", "process-drawable"], + [24, "s2", "process-drawable"], + [38, "s2", "process-drawable"], + [47, "s2", "process-drawable"], + [64, "s2", "process-drawable"] + ], + "(enter othercam-running)": [ + [56, "gp", "process-drawable"], + [59, "gp", "process-drawable"] + ], + "(event othercam-running)": [ + [17, "v1", "process-drawable"], + [24, "v0", "joint"], + [41, "a0", "process"] + ], + "(anon-function 7 pov-camera)": [ + [9, "v1", "float"], + [16, "v1", "float"] + ], + "target-powerup-process": [[358, "v0", "sound-rpc-set-param"]], + "cloud-track": [ + [[19, 83], "s1", "handle"], + [[29, 116], "s2", "handle"] + ], + "(method 22 com-airlock)": [ + ["_stack_", 16, "res-tag"], + ["_stack_", 32, "res-tag"], + [104, "v0", "(pointer float)"], + [143, "v0", "(pointer float)"], + [46, "v0", "airlock-options"], + [193, "v0", "pair"] + ], + "airlock-command-lookup": [ + [5, "s4", "pair"], + [15, "s4", "pair"], + [16, "v1", "pair"], + [21, "s5", "pair"], + [20, "s5", "pair"] + ], + "(anon-function 7 airlock)": [[14, "v0", "pair"]], + "(code open com-airlock)": [ + [123, "v0", "sound-rpc-set-param"], + [232, "v0", "sound-rpc-set-param"], + [442, "v0", "sound-rpc-set-param"], + [462, "v0", "sound-rpc-set-param"] + ], + "(anon-function 12 airlock)": [[14, "v0", "pair"]], + "(method 25 com-airlock)": [[90, "v0", "pair"]], + "(method 27 com-airlock)": [[108, "v0", "sound-rpc-set-param"]], + "(exit close com-airlock)": [ + [10, "v0", "sound-rpc-set-param"], + [30, "v0", "sound-rpc-set-param"] + ], + "(trans close com-airlock)": [[58, "v0", "sound-rpc-set-param"]], + "(code close com-airlock)": [ + [196, "v0", "sound-rpc-set-param"], + [303, "v0", "sound-rpc-set-param"], + [394, "v0", "sound-rpc-set-param"] + ], + "(method 26 water-anim)": [ + [52, "v0", "(pointer float)"], + ["_stack_", 16, "res-tag"] + ], + "(method 28 water-anim)": [ + [27, "v0", "vector"], + ["_stack_", 16, "res-tag"] + ], + "water-anim-event-handler": [ + [50, "s5", "water-info"], + [96, "gp", "process-focusable"], + [146, "gp", "process-focusable"], + [200, "s5", "water-info"], + [23, "v1", "float"] + ], + "(event idle blocking-plane)": [[113, "gp", "process-drawable"]], + "(method 15 proc-focusable-spawner)": [[26, "a0", "process-focusable"]], + "(method 10 idle-control)": [ + [35, "v1", "pair"], + [79, "v1", "art-joint-anim"] + ], + "(method 55 enemy)": [ + [27, "a0", "process-focusable"], + [30, "a0", "process-focusable"] + ], + "(method 59 enemy)": [ + [57, "a0", "process-focusable"], + [60, "a0", "process-focusable"] + ], + "(method 62 enemy)": [ + [2, "v1", "attack-info"], + [5, "v1", "attack-info"] + ], + "enemy-setup-gem": [[46, "v1", "float"]], + "(method 119 enemy)": [ + ["_stack_", 16, "res-tag"], + [135, "v0", "(pointer actor-group)"] + ], + "(method 113 enemy)": [[17, "v0", "process-focusable"]], + "(method 106 enemy)": [ + [16, "v1", "connection"], + [17, "v1", "collide-shape"], + [21, "v1", "collide-shape"], + [33, "a1", "process-focusable"], + [65, "v1", "connection"], + [66, "v1", "collide-shape"], + [70, "v1", "collide-shape"], + [82, "a1", "process-focusable"], + [112, "v1", "connection"], + [113, "v1", "collide-shape"], + [117, "v1", "collide-shape"], + [129, "a1", "process-focusable"], + [44, "a1", "process-focusable"], + [93, "a1", "process-focusable"], + [140, "a1", "process-focusable"] + ], + "(method 140 enemy)": [[18, "a1", "process-focusable"]], + "get-penetrate-using-from-attack-event": [ + [2, "v1", "attack-info"], + [5, "v1", "attack-info"], + [25, "v1", "collide-shape"] + ], + "(method 83 enemy)": [ + [21, "s3", "process-focusable"], + [67, "s3", "process-drawable"], + [68, "a1", "collide-shape"] + ], + "(method 82 enemy)": [ + [80, "v1", "process-drawable"], + [122, "v1", "attack-info"], + [170, "s2", "attack-info"], + [266, "s2", "attack-info"], + [286, "s4", "rigid-body-impact"], + [373, "s4", "rigid-body-impact"], + [787, "a0", "vector"], + [349, "s4", "rigid-body-impact"] + ], + "(method 147 enemy)": [[34, "a1", "process-focusable"]], + "(method 98 enemy)": [[28, "a1", "art-joint-anim"]], + "(method 96 enemy)": [[52, "s5", "art-joint-anim"]], + "(method 97 enemy)": [[28, "a1", "art-joint-anim"]], + "(method 85 enemy)": [[17, "a1", "art-joint-anim"]], + "(method 86 enemy)": [[11, "v1", "art-joint-anim"]], + "(method 124 enemy)": [ + [13, "s5", "ragdoll-proc"], + [21, "s5", "ragdoll-proc"], + [24, "s5", "ragdoll-proc"] + ], + "(method 125 enemy)": [ + [14, "s5", "ragdoll-proc"], + [42, "s5", "ragdoll-proc"], + [60, "s5", "ragdoll-proc"] + ], + "(method 126 enemy)": [ + [100, "s2", "ragdoll-proc"], + [102, "s2", "ragdoll-proc"], + [105, "s2", "ragdoll-proc"], + [115, "s2", "ragdoll-proc"], + [133, "s2", "ragdoll-proc"], + [152, "s2", "ragdoll-proc"], + [124, "s2", "ragdoll-proc"] + ], + "(method 105 enemy)": [ + [16, "a0", "process-focusable"], + [19, "a0", "process-focusable"] + ], + "(method 11 enemy)": [[12, "v0", "symbol"]], + "(code notice enemy)": [[31, "v1", "art-joint-anim"]], + "(code stare enemy)": [[23, "gp", "art-joint-anim"]], + "(code victory enemy)": [[30, "v1", "art-joint-anim"]], + "(code die enemy)": [[71, "v1", "art-joint-anim"]], + "(code die-falling enemy)": [[78, "gp", "art-joint-anim"]], + "(code view-anims enemy)": [[20, "s4", "art-joint-anim"]], + "(event gun-dark-2-stretch enemy)": [ + [8, "s5", "attack-info"], + [32, "s5", "attack-info"], + [71, "s5", "attack-info"] + ], + "(code knocked-recover enemy)": [ + [34, "v1", "art-joint-anim"], + [67, "v1", "ragdoll-proc"] + ], + "(method 114 enemy)": [ + [39, "s4", "touching-shapes-entry"], + [29, "s4", "touching-shapes-entry"], + [15, "s4", "touching-shapes-entry"], + [22, "s4", "touching-shapes-entry"], + [50, "s4", "touching-shapes-entry"], + [4, "s4", "touching-shapes-entry"], + [3, "s4", "touching-shapes-entry"] + ], + "gun-dark-2-ragdoll-start": [ + [72, "s4", "ragdoll-proc"], + [74, "s4", "ragdoll-proc"], + [77, "s4", "ragdoll-proc"], + [87, "s4", "ragdoll-proc"], + [104, "s4", "ragdoll-proc"], + [96, "s4", "ragdoll-proc"] + ], + "gun-dark-2-anim-code": [ + [127, "gp", "art-joint-anim"], + [30, "v1", "float"], + [53, "v1", "float"], + [154, "v1", "float"] + ], + "(trans gun-dark-2-stretch enemy)": [ + [136, "v1", "collide-shape-prim-sphere"], + [147, "a0", "process-focusable"], + [153, "v1", "process-focusable"], + [27, "v1", "float"] + ], + "(code hit enemy)": [[30, "v1", "art-joint-anim"]], + "(code flee enemy)": [[22, "v1", "art-joint-anim"]], + "(method 143 enemy)": [[81, "s5", "gem"]], + "(method 141 enemy)": [[44, "t1", "int"]], + "(method 56 enemy)": [ + [269, "v1", "float"], + [268, "v0", "float"] + ], + "(code debug-control nav-enemy)": [[28, "v1", "art-joint-anim"]], + "(event idle drop-plat)": [ + [23, "a0", "process-focusable"], + [55, "a0", "process-focusable"], + [58, "a0", "process-focusable"] + ], + "(event idle bouncer)": [ + [110, "v1", "attack-info"], + [116, "v1", "attack-info"] + ], + "(method 11 elevator)": [ + [35, "v1", "collide-shape-prim-group"], + ["_stack_", 32, "float"] + ], + "(method 48 elevator)": [["_stack_", 16, "float"]], + "teleport-check": [["_stack_", 16, "float"]], + "elevator-event": [ + [23, "v1", "focus"], + [361, "v1", "float"], + [133, "v1", "float"], + [89, "v1", "float"] + ], + "(method 51 elevator)": [[10, "v1", "collide-shape-prim-group"]], + "(method 63 collide-shape-moving)": [ + [298, "a0", "process-focusable"], + [300, "a0", "process-focusable"] + ], + "(method 14 rigid-body-control)": [[18, "v1", "vector"]], + "transform-rigid-body-prims": [[4, "v1", "collide-shape-prim-group"]], + "(method 67 collide-shape-moving)": [ + [8, "v1", "collide-shape-prim-group"], + [[30, 56], "s1", "collide-cache-prim"] + ], + "(method 49 rigid-body-object)": [ + [45, "s4", "process-focusable"], + [82, "s4", "process-drawable"], + [87, "s3", "attack-info"], + [89, "s3", "attack-info"], + [96, "s3", "attack-info"], + [115, "s4", "process-focusable"], + [129, "s5", "attack-info"], + [148, "v1", "focus"], + [172, "a0", "process-focusable"], + [183, "a0", "process-focusable"], + [191, "a0", "process-focusable"], + [193, "a0", "process-focusable"], + [230, "s4", "process-focusable"], + [237, "v1", "float"], + [241, "s4", "process-focusable"], + [243, "s4", "process-focusable"] + ], + "(method 47 rigid-body-object)": [ + [18, "v1", "float"], + [52, "v1", "float"], + [26, "v1", "float"] + ], + "(method 10 rigid-body-queue)": [ + [134, "a0", "process-focusable"], + [146, "a0", "rigid-body-object"], + [148, "a0", "rigid-body-object"], + [51, "s3", "process-focusable"], + [72, "s3", "rigid-body-object"], + [20, "a0", "process-focusable"] + ], + "scene-player-init": [ + [[37, 44], "s5", "(array scene)"], + [83, "v0", "(array scene)"] + ], + "(method 34 process-taskable)": [ + [58, "v0", "joint"], + [68, "v1", "collide-shape-prim-group"] + ], + "(code active process-taskable)": [ + [37, "gp", "handle"], + [72, "gp", "handle"] + ], + "(code target-warp-in)": [ + [340, "v1", "art-joint-anim"], + [13, "v0", "string"], + [128, "gp", "process"] + ], + "(post idle air-train)": [[4, "t9", "(function none)"]], + "(method 28 metalhead-shot)": [ + [29, "s5", "process-drawable"], + [32, "s5", "process-drawable"], + [10, "v0", "sound-rpc-set-param"] + ], + "(event impact metalhead-grenade-shot)": [[11, "s4", "process-focusable"]], + "(method 9 los-control)": [ + [85, "s1", "process-focusable"], + [96, "s2", "process-focusable"], + [109, "s1", "process-focusable"] + ], + "(method 0 joint-exploder-tuning)": [ + [[7, 82], "v0", "joint-exploder-tuning"] + ], + "joint-exploder-joint-callback": [ + [3, "s4", "joint-exploder"], + [24, "s4", "joint-exploder"] + ], + "(method 28 joint-exploder)": [[222, "s4", "joint-exploder-list"]], + "(enter freefall ragdoll-test)": [ + [15, "a0", "ragdoll-proc"], + [20, "a0", "ragdoll-proc"] + ], + "(trans freefall-reform ragdoll-test)": [ + [23, "gp", "ragdoll-proc"], + [29, "gp", "ragdoll-proc"] + ], + "(trans idle ragdoll-test)": [ + [55, "v1", "ragdoll-proc"], + [57, "v1", "ragdoll-proc"] + ], + "(trans freefall ragdoll-test)": [ + [32, "a0", "ragdoll-proc"], + [35, "a0", "ragdoll-proc"] + ], + "(exit freefall ragdoll-test)": [ + [12, "a0", "ragdoll-proc"], + [15, "a0", "ragdoll-proc"] + ], + "(exit tweak ragdoll-test)": [ + [12, "a0", "ragdoll-proc"], + [15, "a0", "ragdoll-proc"] + ], + "(enter tweak ragdoll-test)": [ + [15, "a0", "ragdoll-proc"], + [20, "a0", "ragdoll-proc"] + ], + "(trans reform ragdoll-test)": [ + [25, "gp", "ragdoll-proc"], + [31, "gp", "ragdoll-proc"], + [37, "gp", "ragdoll-proc"] + ], + "(trans tweak ragdoll-test)": [ + [34, "gp", "ragdoll-proc"], + [48, "gp", "ragdoll-proc"], + [40, "gp", "ragdoll-proc"], + [43, "gp", "ragdoll-proc"], + [46, "gp", "ragdoll-proc"], + [51, "gp", "ragdoll-proc"] + ], + "(method 0 debris-tuning)": [[[7, 84], "v0", "debris-tuning"]], + "(method 38 shield-sphere)": [[71, "v1", "rigid-body-impact"]], + "(code distort shield-sphere-distort)": [[14, "v1", "art-joint-anim"]], + "(trans distort shield-sphere-distort)": [ + [14, "v1", "process-drawable"], + [21, "v1", "process-drawable"] + ], + "(method 39 shield-sphere)": [ + [2, "v1", "attack-info"], + [5, "v1", "attack-info"] + ], + "(method 41 shield-sphere)": [ + [16, "v1", "attack-info"], + [27, "v1", "attack-info"] + ], + "(method 33 shield-sphere)": [ + [44, "s5", "process-focusable"], + [51, "s5", "process-focusable"] + ], + "(event time-of-day-tick)": [ + [9, "v1", "float"], + [203, "v1", "float"] + ], + "load-game-text-info": [ + [34, "v1", "game-text-info"], + [41, "v1", "game-text-info"] + ], + "gun-yellow-deflect-reaction": [ + [33, "a0", "collide-shape-prim"], + [46, "v1", "collide-shape-prim"], + [52, "v1", "collide-shape-prim"], + [62, "s2", "gun-yellow-shot-2"], + [58, "v1", "gun-yellow-shot-2"], + [68, "s2", "gun-yellow-shot-2"], + [[9, 66], "s3", "handle"] + ], + "gun-yellow-shot-do-deflect": [ + [134, "s1", "process-focusable"], + [178, "s1", "process-focusable"], + ["_stack_", 136, "handle"], + ["_stack_", 1716, "float"], + ["_stack_", 1748, "float"] + ], + "gun-fire-yellow-1": [[33, "v0", "process"]], + "gun-fire-yellow-2": [[33, "v0", "process"]], + "gun-fire-yellow-3": [[140, "v0", "process"]], + "(method 35 gun-yellow-3-saucer)": [ + [[17, 22], "v1", "gun-yellow-3-event-msg"] + ], + "(code impact-explode gun-yellow-3-saucer)": [[34, "a0", "process"]], + "(method 36 gun-yellow-shot-2)": [[66, "s4", "touching-shapes-entry"]], + "(method 52 gun-yellow-3-saucer)": [ + [471, "a0", "process-focusable"], + [474, "a0", "process-focusable"], + [122, "s3", "process-focusable"], + [146, "s3", "process-focusable"], + ["_stack_", 1088, "float"], + ["_stack_", 3808, "float"] + ], + "(method 53 gun-yellow-3-saucer)": [[88, "v0", "process"]], + "red-2-ring-event-handler": [ + [6, "v1", "vector"], + [12, "v1", "float"] + ], + "(code active red-3-sphere)": [ + [14, "v1", "art-joint-anim"], + [66, "v1", "art-joint-anim"] + ], + "(code impact-tiny gun-red-3-grenade)": [[32, "a0", "process"]], + "(method 45 gun-red-3-grenade)": [ + [59, "a0", "process-focusable"], + [63, "a0", "process-focusable"], + [82, "a0", "process-focusable"], + [85, "a0", "process-focusable"], + ["_stack_", 1688, "float"], + ["_stack_", 1692, "float"], + ["_stack_", 1752, "float"], + ["_stack_", 1756, "float"] + ], + "(method 47 gun-red-3-grenade)": [ + [53, "s1", "process-focusable"], + [63, "s1", "process-focusable"], + [76, "s1", "process-focusable"] + ], + "(method 17 gun-red-2-shockwave)": [ + [43, "s3", "process-focusable"], + [93, "s3", "process-focusable"], + [122, "s3", "process-focusable"], + ["_stack_", 32, "bounding-box"] + ], + "gun-fire-red-3": [ + [216, "s1", "process-focusable"], + [246, "s1", "process-focusable"], + [436, "gp", "process-focusable"], + [440, "a0", "process-focusable"], + ["_stack_", 28, "float"], + [168, "gp", "process-focusable"], + [314, "s1", "process-focusable"] + ], + "gun-fire-red-1": [ + [147, "v1", "manipy"], + [191, "v1", "manipy"], + [194, "v1", "manipy"], + [197, "v1", "manipy"] + ], + "(method 23 gun-red-shot)": [[10, "s4", "process-focusable"]], + "(method 26 gun-red-shot)": [ + [43, "a0", "connection"], + [44, "a0", "collide-shape"], + [92, "a0", "connection"], + [93, "a0", "collide-shape"] + ], + "(trans charging gun-red-2-shockwave)": [[6, "a1", "process-drawable"]], + "gun-fire-dark-1": [[38, "v0", "process"]], + "(event active gun-dark-3-sphere)": [ + [[3, 35], "v1", "gun-dark-3-sphere-init-params"] + ], + "gun-fire-dark-3": [[64, "v0", "process"]], + "(exit startup gun-dark-shot)": [[20, "v0", "sound-rpc-set-param"]], + "(code startup gun-dark-shot)": [[88, "a1", "process-focusable"]], + "(enter moving gun-dark-shot)": [[22, "a1", "process-focusable"]], + "(trans moving gun-dark-shot)": [ + [27, "s2", "process-focusable"], + [39, "a0", "process-focusable"], + [42, "a0", "process-focusable"] + ], + "(enter impact gun-dark-shot)": [ + [245, "s1", "process-focusable"], + [256, "s1", "process-focusable"], + [262, "s1", "process-focusable"], + [201, "v0", "(array float)"] + ], + "(method 20 gravity-spinner)": [ + [19, "s5", "process-focusable"], + [63, "s5", "process-focusable"] + ], + "(method 21 gravity-spinner)": [ + [19, "s5", "process-focusable"], + [26, "s5", "process-focusable"] + ], + "(anon-function 34 gun-dark-shot)": [ + [134, "s5", "process-focusable"], + [137, "s5", "process-focusable"], + [141, "s5", "process-focusable"], + [144, "s5", "process-focusable"], + [162, "s5", "process-focusable"], + [167, "s5", "process-focusable"], + [170, "s5", "process-focusable"] + ], + "gravity-spinner-init-by-other": [ + [33, "gp", "process-focusable"], + [39, "gp", "process-focusable"], + [47, "gp", "process-focusable"], + [54, "gp", "process-focusable"], + [69, "gp", "process-focusable"], + [73, "gp", "process-focusable"], + [77, "gp", "process-focusable"], + [94, "gp", "process-focusable"], + [100, "gp", "process-focusable"], + [113, "gp", "process-focusable"], + [144, "v1", "float"], + [182, "v1", "float"] + ], + "(code zero-g gravity-spinner)": [ + [71, "gp", "process-focusable"], + [100, "gp", "process-focusable"], + [104, "gp", "process-focusable"], + [137, "gp", "process-focusable"], + [144, "gp", "process-focusable"], + [165, "gp", "process-focusable"], + [174, "v1", "collide-shape-moving"], + [262, "gp", "process-focusable"], + [270, "gp", "process-focusable"], + [285, "gp", "process-focusable"], + [176, "v1", "collide-shape-moving"] + ], + "(enter zero-g gravity-spinner)": [[17, "v1", "float"]], + "(event zero-g gravity-spinner)": [ + [105, "a0", "attack-info"], + [109, "v1", "attack-info"], + [168, "s4", "process-drawable"], + [170, "s4", "process-drawable"], + [182, "s4", "process-drawable"], + [184, "s4", "process-drawable"], + [177, "s4", "process-drawable"], + ["_stack_", 36, "float"] + ], + "zero-g-wait-for-land": [ + [22, "s5", "process-focusable"], + [26, "s5", "process-focusable"], + [33, "s5", "process-focusable"], + [42, "s5", "process-focusable"], + [52, "s5", "process-focusable"], + [53, "a0", "collide-shape-moving"], + [61, "s5", "process-focusable"], + [72, "s5", "process-focusable"], + [84, "s5", "process-focusable"], + [99, "s5", "process-focusable"], + [108, "s5", "process-focusable"] + ], + "(enter zero-g-vehicle gravity-spinner)": [[17, "v1", "float"]], + "(enter launch-0 gun-dark-3-nuke)": [[15, "t9", "(function none)"]], + "(enter launch-1 gun-dark-3-nuke)": [[12, "t9", "(function none)"]], + "(enter launch-2 gun-dark-3-nuke)": [[18, "t9", "(function none)"]], + "(code impact-dud gun-dark-3-nuke)": [[39, "a0", "process"]], + "(method 54 gun-dark-3-nuke)": [[47, "s1", "process-focusable"]], + "(method 22 gravity-spinner)": [ + [18, "s3", "process-focusable"], + [24, "s3", "process-focusable"], + [29, "s3", "process-focusable"] + ], + "(method 23 gravity-spinner)": [ + [25, "gp", "process-focusable"], + [29, "gp", "process-focusable"], + [35, "gp", "process-focusable"], + [44, "gp", "process-focusable"] + ], + "(method 19 gravity-spinner)": [ + [40, "s5", "process-focusable"], + [68, "s5", "process-focusable"], + [377, "s5", "process-focusable"], + [435, "s5", "process-focusable"], + [113, "a0", "process-focusable"], + [124, "a0", "process-focusable"], + [131, "a0", "process-focusable"], + [134, "a0", "process-focusable"], + [200, "s5", "process-focusable"], + ["_stack_", 148, "process"], + ["_stack_", 156, "float"], + ["_stack_", 160, "float"], + ["_stack_", 172, "float"], + ["_stack_", 1736, "float"], + ["_stack_", 2312, "float"] + ], + "(method 16 gravity-spinner)": [ + [22, "s4", "process-focusable"], + [43, "s4", "process-focusable"] + ], + "(method 17 gravity-spinner)": [ + [101, "s4", "process-focusable"], + [127, "s4", "process-focusable"], + [149, "s4", "process-focusable"] + ], + "(method 24 gravity-spinner)": [ + [19, "s5", "process-focusable"], + [26, "s5", "process-focusable"], + [42, "s5", "process-focusable"], + [47, "s5", "process-focusable"], + [52, "s5", "process-focusable"], + [55, "s5", "process-focusable"], + [66, "s5", "process-focusable"], + [59, "s5", "process-focusable"], + [61, "s5", "process-focusable"] + ], + "(trans expand gun-gravity)": [ + [116, "v1", "float"], + [149, "v1", "float"] + ], + "(method 22 gun-gravity)": [ + [14, "v0", "process"], + [35, "v1", "gravity-ring"], + [36, "v1", "gravity-ring"], + [[51, 53], "v1", "gravity-ring"], + [101, "s1", "process-focusable"], + [113, "s1", "process-focusable"] + ], + "process-drawable-shock-effect-bullseye": [[85, "a0", "lightning-tracker"]], + "(method 14 level-group)": [ + [62, "a0", "entity-actor"], + [66, "a0", "entity-actor"] + ], + "(method 23 level-group)": [[28, "v0", "(inline-array vector)"]], + "expand-bounding-box-from-nav-meshes": [["_stack_", 16, "res-tag"]], + "expand-vis-box-with-point": [[10, "v0", "(inline-array vector)"]], + "(method 25 level-group)": [ + [24, "s3", "entity-actor"], + [112, "s3", "entity-actor"], + [120, "s3", "entity-actor"], + [143, "v0", "string"], + [56, "v0", "string"], + [99, "v0", "(inline-array vector)"] + ], + "process-drawable-scale-from-entity!": [[11, "v0", "vector"]], + "reset-actors": [ + [174, "t9", "(function level none)"], + [162, "v0", "(function level none)"] + ], + "process-status-bits": [[8, "s5", "process-drawable"]], + "(method 24 level-group)": [ + [127, "v0", "(pointer actor-group)"], + [28, "v0", "(inline-array vector)"], + ["_stack_", 28, "float"], + ["_stack_", 32, "float"], + ["_stack_", 48, "res-tag"] + ], + "(method 15 level-group)": [ + [262, "s0", "process-drawable"], + [268, "s0", "process-drawable"], + [275, "s0", "process-drawable"], + [277, "s0", "process-drawable"], + [308, "s4", "process-drawable"], + [663, "a0", "drawable-region-prim"], + [666, "a0", "drawable-region-prim"], + [726, "a0", "drawable-region-prim"], + [729, "a0", "drawable-region-prim"] + ], + "check-for-rougue-process": [ + [133, "gp", "part-tracker"], + [157, "gp", "part-spawner"], + [184, "v1", "process-drawable"], + [187, "v1", "process-drawable"], + [192, "v1", "process-drawable"], + [199, "v1", "process-drawable"], + [209, "v1", "process-drawable"], + [212, "v1", "process-drawable"], + [217, "v1", "process-drawable"], + [224, "v1", "process-drawable"] + ], + "draw-actor-marks": [ + [20, "gp", "process-drawable"], + [29, "gp", "process-drawable"], + [33, "gp", "process-drawable"], + [40, "gp", "process-drawable"], + [45, "gp", "process-drawable"], + [47, "gp", "process-drawable"], + [52, "gp", "process-drawable"], + [54, "gp", "process-drawable"], + [59, "gp", "process-drawable"], + [67, "gp", "process-drawable"], + [69, "gp", "process-drawable"], + [78, "gp", "process-drawable"], + [106, "gp", "process-drawable"], + [105, "v0", "string"], + [131, "v0", "(pointer int32)"], + [155, "gp", "process-drawable"], + [174, "v0", "string"], + [187, "gp", "process-drawable"], + [271, "gp", "process-drawable"], + [250, "gp", "process-drawable"], + [208, "v0", "(inline-array vector)"], + [120, "a2", "string"] + ], + "(anon-function 57 entity)": [ + [6, "gp", "process-drawable"], + [8, "gp", "process-drawable"], + [13, "gp", "process-drawable"], + [15, "gp", "process-drawable"] + ], + "draw-subtitle-image": [ + [[163, 194], "v1", "(pointer uint128)"], + [[195, 199], "t0", "vector4w"], + [[199, 206], "t0", "vector4w"], + [[206, 213], "a2", "vector4w"], + [[214, 220], "v1", "vector4w"], + [[223, 254], "v1", "(pointer uint128)"], + [[255, 266], "t0", "vector4w"], + [[266, 273], "a1", "vector4w"], + [[274, 280], "v1", "vector4w"] + ], + "darkjak-ball-move": [ + [52, "v1", "collide-shape-prim-group"], + [56, "a0", "collide-shape-prim-group"] + ], + "(code target-darkjak-get-on)": [[280, "v1", "art-joint-anim"]], + "(code target-darkjak-bomb0)": [ + ["_stack_", 16, "float"], + ["_stack_", 20, "float"], + [37, "v1", "art-joint-anim"], + [133, "v1", "art-joint-anim"], + [213, "v1", "art-joint-anim"], + [692, "v1", "process-drawable"], + [793, "v1", "manipy"] + ], + "darkjak-ball-slide-reaction": [[23, "v1", "darkjak-ball"]], + "(code target-darkjak-smack-charge)": [[95, "v1", "art-joint-anim"]], + "(exit target-darkjak-smack-charge)": [[61, "v0", "sound-rpc-set-param"]], + "(anon-function 21 target-darkjak)": [[62, "gp", "art-joint-anim"]], + "(code target-darkjak-running-attack)": [ + [258, "gp", "process-focusable"], + ["_stack_", 16, "float"], + ["_stack_", 20, "float"], + ["_stack_", 48, "float"], + ["_stack_", 56, "handle"], + [577, "v1", "art-joint-anim"], + [605, "v1", "art-joint-anim"], + [633, "v1", "art-joint-anim"], + [673, "v1", "art-joint-anim"], + [701, "v1", "art-joint-anim"], + [897, "v1", "art-joint-anim"] + ], + "(code target-darkjak-get-off)": [ + [174, "v1", "art-joint-anim"], + [332, "v1", "art-joint-anim"], + [424, "v1", "art-joint-anim"] + ], + "(anon-function 20 target-darkjak)": [ + [120, "v1", "art-joint-anim"], + [151, "v1", "art-joint-anim"] + ], + "(code target-darkjak-bomb1)": [ + [419, "v1", "art-joint-anim"], + ["_stack_", 160, "float"], + ["_stack_", 164, "float"] + ], + "target-bomb1-fire-shot": [[21, "s5", "process-focusable"]], + "(code target-darkjak-smack)": [ + [70, "gp", "art-joint-anim"], + [314, "v1", "art-joint-anim"], + [173, "f28", "float"], + [206, "f28", "float"], + [211, "f28", "float"], + [285, "f0", "float"] + ], + "(method 37 darkjak-ball)": [ + [72, "s0", "process-focusable"], + [81, "s0", "process-focusable"] + ], + "(method 9 lightning-bolt)": [[132, "v1", "float"]], + "(method 9 darkjak-info)": [[71, "v0", "sound-rpc-set-param"]], + "(event target-darkjak-bomb0)": [[51, "v1", "process"]], + "sparticle-track-hadouken": [[[1, 8], "a3", "darkjak-ball"]], + "gun-fire-blue-1": [[76, "v0", "process"]], + "(event inactive gun-blue-2-lightning-tracker)": [ + [4, "v1", "gun-blue-lightning-command"] + ], + "(event active gun-blue-2-lightning-tracker)": [ + [15, "v1", "gun-blue-lightning-command"] + ], + "cshape-reaction-blue-shot": [[15, "v1", "gun-blue-shot"]], + "(method 24 gun-blue-shot)": [[26, "v0", "vector"]], + "gun-fire-blue-2-old": [ + [182, "s3", "process-focusable"], + [261, "s5", "process-focusable"], + [265, "a0", "process-focusable"], + [419, "v0", "process"], + [264, "s5", "process-focusable"] + ], + "find-gun-blue-2-target-old": [[54, "s1", "process-focusable"]], + "find-gun-blue-2-target": [[49, "s2", "process-focusable"]], + "is-valid-blue-2-target": [ + [17, "v0", "process"], + [22, "s5", "process-focusable"] + ], + "(method 31 gun-blue-shot-3)": [[51, "v1", "float"]], + "gun-blue-shot-3-move": [ + [43, "a0", "process-focusable"], + [46, "a0", "process-focusable"] + ], + "gun-fire-blue-3": [ + [570, "a0", "process-focusable"], + [573, "a0", "process-focusable"], + [696, "s5", "process"], + [722, "v0", "process"], + [80, "s4", "process-focusable"], + [112, "s4", "process-focusable"], + [143, "s4", "process-focusable"], + [194, "s4", "process-focusable"], + ["_stack_", 1296, "float"], + [444, "v1", "float"], + [499, "v1", "float"], + [519, "v1", "float"], + [539, "v1", "float"], + [633, "v1", "float"], + [657, "v1", "float"] + ], + "(method 25 gun-blue-2-lightning-tracker)": [ + [183, "s2", "process-focusable"], + [358, "v0", "process"] + ], + "(method 26 gun-blue-2-lightning-tracker)": [[101, "v0", "process"]], + "(method 9 rope-constraint)": [["_stack_", 64, "vector"]], + "(top-level-login target-darkjak)": [ + [255, "a0", "(function none :behavior target)"], + [254, "a0", "(state target)"] + ], + "collide-list-fill-bg-using-line-sphere": [ + [261, "a0", "collide-hash-scratch"], + [[279, 285], "v1", "collide-hash-scratch"], + [[246, 251], "v1", "collide-hash-scratch"], + [293, "a0", "collide-hash-scratch"], + [102, "v1", "float"] + ], + "collide-list-fill-bg-using-box": [ + [223, "a0", "collide-hash-scratch"], + [255, "a0", "collide-hash-scratch"], + [208, "v1", "collide-hash-scratch"], + [210, "v1", "collide-hash-scratch"], + [212, "v1", "collide-hash-scratch"], + [241, "v1", "collide-hash-scratch"], + [243, "v1", "collide-hash-scratch"], + [246, "v1", "collide-hash-scratch"] + ], + "(method 8 collide-hash)": [ + [47, "a2", "collide-hash-scratch"], + [59, "a2", "collide-hash-scratch"], + [31, "a1", "collide-hash-scratch"], + [70, "a1", "collide-hash-scratch"], + [63, "a0", "int"], + [51, "a3", "int"] + ], + "(method 9 collide-mesh)": [ + [17, "s5", "collide-mesh-tri"], + [22, "s5", "collide-mesh-tri"], + [27, "s5", "collide-mesh-tri"], + [32, "s5", "collide-mesh-tri"], + [62, "s5", "collide-mesh-tri"] + ], + "(method 10 collide-mesh)": [[[13, 51], "s4", "collide-mesh-cache-tri"]], + "(method 13 collide-mesh)": [ + [21, "a3", "(inline-array vector)"], + [[22, 61], "a3", "vector"], + [[20, 61], "t0", "(inline-array vector)"], + [[76, 123], "v1", "collide-mesh-tri"] + ], + "(method 13 touching-list)": [[[0, 77], "v0", "touching-shapes-entry"]], + "(method 11 touching-list)": [ + [8, "s5", "touching-shapes-entry"], + [11, "s5", "touching-shapes-entry"], + [13, "s5", "touching-shapes-entry"], + [48, "s5", "touching-shapes-entry"], + [52, "s5", "touching-shapes-entry"], + [10, "s5", "touching-shapes-entry"], + [33, "s5", "touching-shapes-entry"], + [50, "s5", "touching-shapes-entry"] + ], + "(method 10 touching-list)": [[[5, 11], "s5", "touching-shapes-entry"]], + "(method 12 touching-list)": [ + [4, "gp", "touching-shapes-entry"], + [6, "gp", "touching-shapes-entry"], + [17, "gp", "touching-shapes-entry"], + [32, "gp", "touching-shapes-entry"], + [103, "gp", "touching-shapes-entry"] + ], + "(method 9 collide-edge-work)": [ + [[5, 47], "s4", "collide-edge-hold-item"], + [[6, 49], "s3", "collide-edge-edge"] + ], + "(method 9 collide-edge-edge)": [[20, "a0", "collide-shape-moving"]], + "(method 13 collide-edge-work)": [[[8, 119], "s1", "collide-edge-edge"]], + "(method 20 collide-edge-work)": [ + [100, "a0", "collide-shape-moving"], + [179, "v1", "int"], + [179, "a1", "int"] + ], + "collide-shape-draw-debug-marks": [ + [24, "v1", "connection"], + [[24, 41], "a0", "collide-shape"], + [56, "v1", "connection"], + [[56, 70], "a0", "collide-shape"], + [88, "v1", "connection"], + [[88, 104], "a0", "collide-shape"], + [71, "a0", "collide-shape"] + ], + "(method 50 collide-shape)": [ + [30, "gp", "process-drawable"], + [32, "a1", "collide-shape"], + [66, "gp", "process-focusable"], + [70, "gp", "process-focusable"], + [78, "gp", "process-focusable"], + [82, "gp", "process-focusable"], + [99, "gp", "process-focusable"] + ], + "(method 36 collide-shape)": [[[1, 40], "v1", "collide-shape-prim"]], + "(method 38 collide-shape)": [ + [[42, 80], "s5", "collide-shape-prim-mesh"], + [34, "v0", "(array collide-mesh)"] + ], + "(method 40 collide-shape)": [ + [30, "a0", "connection"], + [31, "a0", "collide-shape"], + [79, "a0", "connection"], + [80, "a0", "collide-shape-moving"], + [156, "s4", "(pointer uint64)"] + ], + "(method 45 collide-shape)": [ + [28, "a0", "connection"], + [29, "a0", "collide-shape"], + [79, "a0", "connection"], + [80, "a0", "collide-shape-moving"], + [[224, 235], "s1", "collide-shape-moving"] + ], + "(method 12 collide-shape-prim-sphere)": [ + [17, "gp", "collide-shape-prim-mesh"] + ], + "(method 13 collide-shape-prim)": [[[12, 43], "s4", "collide-shape-prim"]], + "(method 12 collide-shape-prim-group)": [ + [[12, 43], "s4", "collide-shape-prim"] + ], + "cshape-reaction-update-state": [["_stack_", 56, "collide-status"]], + "(method 17 collide-shape-prim-mesh)": [ + [[6, 11], "s2", "collide-shape-prim-group"] + ], + "(method 19 collide-shape-prim)": [[[3, 32], "s4", "collide-shape-prim"]], + "(method 18 collide-shape-prim-sphere)": [ + [79, "s4", "collide-shape-prim-mesh"] + ], + "(method 66 collide-shape-moving)": [[[29, 58], "s0", "collide-cache-prim"]], + "(method 56 collide-shape-moving)": [ + [73, "a0", "process-focusable"], + [176, "a0", "process-focusable"] + ], + "(method 18 collide-shape-prim-group)": [ + [[3, 32], "s4", "collide-shape-prim"] + ], + "(method 35 collide-shape)": [ + [27, "a0", "connection"], + [28, "a0", "collide-shape"], + [76, "a0", "connection"], + [77, "a0", "collide-shape"] + ], + "(method 44 collide-shape)": [[25, "a0", "process-drawable"]], + "(method 11 grid-hash)": [ + [[141, 147], "t6", "pointer"], + [128, "t1", "pointer"], + [149, "t4", "pointer"], + [152, "t1", "pointer"] + ], + "(method 9 actor-hash-buckets)": [ + [20, "a0", "connection"], + [22, "a0", "collide-shape"], + [121, "v1", "connection"], + [124, "s4", "collide-shape"], + [[16, 160], "s4", "collide-shape"], + [89, "a0", "collide-shape"] + ], + "(method 10 grid-hash)": [[12, "a0", "(pointer uint128)"]], + "(method 27 sphere-hash)": [[44, "s2", "(pointer int8)"]], + "(method 24 grid-hash)": [ + [78, "a0", "(pointer uint128)"], + [191, "a3", "(pointer int8)"], + [195, "a1", "(pointer uint8)"], + [237, "v1", "(pointer uint128)"] + ], + "(method 16 collide-cache)": [ + [47, "a0", "collide-shape-prim-sphere"], + [17, "s4", "collide-cache-prim"], + [23, "s4", "collide-cache-prim"], + [27, "s4", "collide-cache-prim"], + [46, "s4", "collide-cache-prim"], + [65, "s4", "(inline-array collide-cache-prim)"] + ], + "(method 20 collide-cache)": [ + [50, "v1", "connection"], + [51, "s1", "collide-shape"], + [114, "v1", "connection"], + [115, "s1", "collide-shape"] + ], + "(method 19 collide-cache)": [ + [26, "a0", "connection"], + [27, "a0", "collide-shape"], + [105, "a0", "connection"], + [106, "a0", "collide-shape"] + ], + "(method 12 collide-cache)": [ + [114, "v1", "process-drawable"], + [74, "a0", "hfragment"], + [78, "a0", "hfragment"] + ], + "(method 21 collide-cache)": [ + [[81, 105], "a3", "(inline-array collide-cache-tri)"] + ], + "(method 13 collide-cache)": [ + [305, "a0", "hfragment"], + [341, "v1", "process-drawable"], + [309, "a0", "hfragment"] + ], + "col-rend-draw": [ + [[161, 217], "s5", "collide-cache-prim"], + [164, "v1", "collide-shape-prim-sphere"], + [[14, 152], "s3", "collide-cache-tri"], + [68, "a3", "int"], + [191, "a3", "int"] + ], + "(method 9 collide-cache)": [ + //[[28, 56], "gp", "collide-shape-prim"], + [33, "gp", "collide-cache-prim"], + [35, "gp", "collide-shape-prim"], + [[50, 56], "gp", "collide-cache-prim"], + [36, "v1", "collide-shape-prim-sphere"], + [[4, 26], "gp", "collide-cache-tri"] + ], + "(method 9 collide-mesh-cache)": [ + [[10, 83], "s4", "collide-mesh-cache-entry"], + [58, "a1", "int"] + ], + "command-get-float": [[20, "gp", "bfloat"]], + "command-get-int": [[17, "gp", "bfloat"]], + "(anon-function 2 memory-usage)": [[211, "v1", "collide-shape-moving"]], + "(method 8 process-tree)": [ + [33, "v1", "symbol"] + // [6, "a3", "symbol"] + ], + "(method 11 memory-usage-block)": [[112, "v1", "int"]], + "(method 14 draw-control)": [ + [38, "t9", "(function object object object none)"] + ], + "build-instance-list": [ + [33, "v1", "drawable-tree-instance-shrub"], + [85, "v1", "drawable-tree-instance-tie"] + ], + "debug-menu-make-continue-sub-menu": [ + [5, "v1", "symbol"], + [10, "v1", "level-load-info"], + [13, "v1", "level-load-info"], + [21, "v1", "continue-point"], + [47, "v1", "continue-point"], + [56, "v1", "continue-point"] + ], + "(anon-function 218 default-menu)": [ + [[2, 13], "v1", "texture-id"], + [[18, 29], "a1", "adgif-shader"], + [34, "v1", "texture-id"], + [[42, 44], "v1", "adgif-shader"] + ], + "(anon-function 219 default-menu)": [ + [[2, 13], "v1", "texture-id"], + [[18, 29], "a1", "adgif-shader"], + [34, "v1", "texture-id"], + [[42, 44], "v1", "adgif-shader"] + ], + "(anon-function 220 default-menu)": [ + [[3, 13], "v1", "texture-id"], + [[20, 28], "a1", "adgif-shader"], + [33, "v1", "texture-id"], + [41, "v1", "adgif-shader"] + ], + "(anon-function 221 default-menu)": [ + [[3, 13], "v1", "texture-id"], + [[20, 28], "a1", "adgif-shader"], + [33, "v1", "texture-id"], + [41, "v1", "adgif-shader"] + ], + "(anon-function 222 default-menu)": [ + [[3, 13], "v1", "texture-id"], + [[20, 28], "a1", "adgif-shader"], + [33, "v1", "texture-id"], + [41, "v1", "adgif-shader"] + ], + "(anon-function 223 default-menu)": [ + [[3, 13], "v1", "texture-id"], + [[20, 28], "a1", "adgif-shader"], + [33, "v1", "texture-id"], + [41, "v1", "adgif-shader"] + ], + "(anon-function 224 default-menu)": [ + [[3, 13], "v1", "texture-id"], + [[20, 28], "a1", "adgif-shader"], + [33, "v1", "texture-id"], + [41, "v1", "adgif-shader"] + ], + "(anon-function 225 default-menu)": [ + [[2, 13], "v1", "texture-id"], + [[18, 29], "a1", "adgif-shader"], + [34, "v1", "texture-id"], + [[42, 44], "v1", "adgif-shader"] + ], + "(anon-function 226 default-menu)": [ + [[3, 13], "v1", "texture-id"], + [[20, 28], "a1", "adgif-shader"], + [33, "v1", "texture-id"], + [41, "v1", "adgif-shader"] + ], + "(anon-function 227 default-menu)": [ + [[3, 13], "v1", "texture-id"], + [[20, 28], "a1", "adgif-shader"], + [33, "v1", "texture-id"], + [41, "v1", "adgif-shader"] + ], + "(anon-function 228 default-menu)": [ + [[3, 13], "v1", "texture-id"], + [[20, 28], "a1", "adgif-shader"], + [33, "v1", "texture-id"], + [41, "v1", "adgif-shader"] + ], + "(anon-function 229 default-menu)": [ + [[2, 13], "v1", "texture-id"], + [[18, 29], "a1", "adgif-shader"], + [34, "v1", "texture-id"], + [[42, 44], "v1", "adgif-shader"] + ], + "(anon-function 230 default-menu)": [ + [[3, 13], "v1", "texture-id"], + [[20, 28], "a1", "adgif-shader"], + [33, "v1", "texture-id"], + [41, "v1", "adgif-shader"] + ], + "(anon-function 231 default-menu)": [ + [[3, 13], "v1", "texture-id"], + [[20, 28], "a1", "adgif-shader"], + [33, "v1", "texture-id"], + [41, "v1", "adgif-shader"] + ], + "(anon-function 232 default-menu)": [ + [[3, 13], "v1", "texture-id"], + [[20, 28], "a1", "adgif-shader"], + [33, "v1", "texture-id"], + [41, "v1", "adgif-shader"] + ], + "(anon-function 233 default-menu)": [ + [[2, 13], "v1", "texture-id"], + [[18, 29], "a1", "adgif-shader"], + [34, "v1", "texture-id"], + [[42, 44], "v1", "adgif-shader"] + ], + "(anon-function 234 default-menu)": [ + [[3, 13], "v1", "texture-id"], + [[20, 28], "a1", "adgif-shader"], + [33, "v1", "texture-id"], + [41, "v1", "adgif-shader"] + ], + "(anon-function 237 default-menu)": [ + [[30, 37], "s5", "adgif-shader"], + [[5, 25], "s4", "texture-id"] + ], + "dm-float-field-tie-vanish-far-func": [ + [25, "s2", "prototype-bucket-tie"], + [31, "s2", "prototype-bucket-tie"], + [28, "s2", "prototype-bucket-tie"], + [54, "s2", "prototype-bucket-tie"], + [55, "s2", "prototype-bucket-tie"] + ], + "dm-float-field-tie-rvanish-func": [[[25, 56], "s2", "prototype-bucket-tie"]], + "all-texture-tweak-adjust": [[[35, 44], "s0", "adgif-shader"]], + "dm-debug-actor-lod-dist": [ + [7, "v1", "process-drawable"], + [13, "v1", "process-drawable"], + [40, "v1", "process-drawable"], + [50, "v0", "(pointer float)"], + ["_stack_", 16, "res-tag"] + ], + "debug-create-cam-restore": [ + [232, "a0", "level"], + [235, "a0", "level"] + ], + "(anon-function 107 default-menu)": [[7, "v1", "target-flags"]], + "glst-length-of-longest-name": [[5, "s5", "glst-named-node"]], + "glst-find-node-by-name": [[6, "s5", "glst-named-node"]], + "(code target-gun-stance)": [ + [870, "v1", "art-joint-anim"], + [184, "v1", "art-joint-anim"], + [280, "v1", "art-joint-anim"], + [377, "v1", "art-joint-anim"], + [485, "v1", "art-joint-anim"], + [573, "v1", "art-joint-anim"], + [633, "v1", "art-joint-anim"], + [693, "v1", "art-joint-anim"] + ], + "execute-part-engine": [ + [11, "v1", "connection"], + [12, "a0", "process-drawable"], + [13, "v1", "connection"], + [[19, 53], "s0", "vector"], + [23, "v1", "connection"], + [28, "v1", "connection"], + [29, "v1", "int"], + [137, "a3", "vector"], + [35, "a0", "process-drawable"] + ], + "sparticle-track-root-prim": [[3, "v1", "collide-shape"]], + "sparticle-mode-animate": [ + [5, "v1", "(array symbol)"], + [[7, 16], "a1", "(array uint32)"], + [18, "a1", "vector4w"], + [21, "a1", "(pointer int32)"], + [26, "a1", "(array int32)"], + [28, "v1", "(array int32)"], + [32, "a0", "(pointer int64)"], + // [33, "a0", "(pointer int64)"], + [44, "v1", "(pointer int32)"], + [46, "v1", "(pointer int32)"] + ], + "birth-func-texture-group": [[[2, 12], "s5", "(array int32)"]], + "(method 10 sparticle-launcher)": [[[28, 72], "gp", "(array int32)"]], + "sparticle-texture-animate": [[[0, 48], "v1", "(array int32)"]], + "sparticle-respawn-timer": [[[4, 35], "gp", "(array int32)"]], + "sparticle-respawn-heights": [[[2, 59], "gp", "(array int32)"]], + "sparticle-texture-day-night": [[[2, 78], "s2", "(array int32)"]], + "execute-particle-local-space-engine": [ + [6, "v1", "connection"], + [9, "v1", "connection"], + [10, "v1", "connection"], + [11, "t9", "(function object)"], + [15, "s5", "connection"], + [[29, 34], "a1", "particle-local-space-info"] + ], + "birth-func-flip-based-on-scale": [ + [4, "v1", "int"], + [16, "v1", "int"] + ], + "forall-particles-runner": [ + [[19, 28], "s4", "sparticle-cpuinfo"], + [34, "s4", "pointer"], + [35, "s3", "pointer"] + ], + "(method 2 sparticle-cpuinfo)": [[14, "f0", "float"]], + "sp-orbiter": [[[78, 89], "v1", "sprite-vec-data-2d"]], + "forall-particles-with-key-runner": [ + [32, "s3", "(inline-array sparticle-cpuinfo)"], + [42, "s3", "(inline-array sparticle-cpuinfo)"] + ], + "sp-process-particle-system": [[14, "a1", "vector"]], + "(method 3 sparticle-launch-control)": [[40, "f0", "float"]], + "sp-kill-particle": [ + [7, "a1", "uint"], + [7, "v1", "uint"] + ], + "sp-relaunch-setup-fields": [ + ["_stack_", 80, "(inline-array sp-field-init-spec)"] + ], + "eco-track-root-prim-fadeout": [[3, "a0", "collide-shape"]], + "process-drawable-burn-effect": [ + [28, "a0", "process-drawable"], + [108, "v1", "process-drawable"], + [49, "a0", "process-drawable"], + [64, "a0", "process-drawable"] + ], + "birth-func-vector-orient": [[[6, 23], "s3", "sprite-vec-data-2d"]], + "process-drawable-shock-skel-effect": [ + [87, "v0", "(array cspace)"], + [248, "v1", "lightning-tracker"], + [250, "v1", "lightning-tracker"] + ], + "process-drawable2-shock-effect": [[94, "a0", "lightning-tracker"]], + "process-drawable-shock-effect": [ + [211, "a0", "lightning-tracker"], + [200, "v1", "lightning-tracker"] + ], + "process-drawable-shock-effect-replace": [ + [208, "a0", "lightning-tracker"], + [197, "v1", "lightning-tracker"] + ], + "board-zap-track": [[14, "v1", "process-drawable"]], + "(event active ladder)": [ + [21, "v1", "float"], + [43, "v1", "vector"] + ], + "(event idle ladder)": [ + [32, "s2", "process-focusable"], + [14, "a0", "process-focusable"], + [35, "s2", "process-focusable"] + ], + "(code target-ladder-stance)": [ + [180, "v1", "art-joint-anim"], + [80, "v1", "art-joint-anim"] + ], + "(code target-ladder-walk-down)": [ + [88, "v0", "float"], + [89, "v1", "float"] + ], + "(code target-ladder-switch)": [[16, "v1", "art-joint-anim"]], + "(code target-ladder-jump-off)": [[17, "v1", "art-joint-anim"]], + "(code target-ladder-slide-down)": [[73, "v1", "art-joint-anim"]], + "(exit target-ladder-slide-down)": [[2, "v0", "sound-rpc-set-param"]], + "(code target-ladder-walk-up)": [ + [123, "v0", "float"], + [124, "v1", "float"] + ], + "(trans target-ladder-walk-up)": [ + [45, "v0", "float"], + [119, "v0", "float"], + [[46, 56], "v1", "float"] + ], + "(post target-ladder-start)": [[28, "t9", "(function none)"]], + "(code target-ladder-start)": [ + [20, "v1", "art-joint-anim"], + [77, "v1", "art-joint-anim"] + ], + "(post target-ladder-slide-down)": [ + [65, "t9", "(function none)"], + [3, "f0", "float"], + [34, "f0", "float"], + [51, "v0", "float"], + [52, "v1", "float"] + ], + "(trans target-ladder-walk-down)": [ + [45, "v0", "float"], + [[45, 56], "v1", "float"], + [118, "v0", "float"], + [119, "v1", "float"] + ], + "(post target-ladder)": [[41, "v0", "matrix"]], + "(trans target-ladder)": [[100, "v0", "float"]], + "region-prim-lookup-by-id": [[45, "t6", "drawable-region-prim"]], + "(method 18 drawable-tree-region-prim)": [ + [[22, 49], "s2", "drawable-region-prim"], + [5, "a0", "region-prim-area"] + ], + "(method 9 region)": [ + [[55, 60], "a0", "drawable-region-prim"], + [58, "v1", "region-prim-area"], + [4, "a0", "region-prim-area"], + [50, "v1", "drawable-region-prim"] + ], + "(method 17 drawable-tree-region-prim)": [ + [[23, 28], "a0", "drawable-region-prim"], + [4, "a0", "region-prim-area"] + ], + "command-get-trans": [ + [40, "v1", "process-drawable"], + [43, "v1", "process-drawable"], + [63, "s4", "process-drawable"], + [67, "s4", "process-drawable"], + [70, "s4", "process-drawable"], + [76, "v0", "joint"], + [78, "s4", "process-drawable"] + ], + "command-get-entity": [[10, "gp", "process"]], + "command-get-param": [[122, "gp", "bfloat"]], + "command-get-time": [[119, "gp", "bfloat"]], + "(anon-function 0 script)": [ + [48, "s0", "process-drawable"], + [53, "s0", "process-drawable"], + [55, "s0", "process-drawable"], + [61, "v0", "joint"], + [69, "s2", "process-drawable"], + [74, "s2", "process-drawable"], + [76, "s2", "process-drawable"], + [82, "v0", "joint"] + ], + "(anon-function 29 script)": [ + [12, "v1", "symbol"], + [10, "s4", "game-task-node-info"] + ], + "(anon-function 38 script)": [ + [16, "a0", "entity-actor"], + [20, "a0", "entity-actor"] + ], + "(anon-function 42 script)": [[5, "v1", "symbol"]], + "(anon-function 47 script)": [ + [44, "s4", "process-drawable"], + [48, "s4", "process-drawable"], + [53, "s4", "process-drawable"], + [59, "v0", "joint"], + [65, "s4", "process-drawable"], + [79, "s4", "process-drawable"], + [81, "s4", "process-drawable"], + [84, "s4", "process-drawable"], + [86, "s4", "process-drawable"], + [94, "gp", "(function process-drawable cspace none)"] + ], + "(anon-function 48 script)": [ + [94, "gp", "process-drawable"], + [101, "v0", "joint"], + [109, "gp", "process-drawable"], + [134, "s4", "process-drawable"], + [141, "v0", "joint"], + [149, "s4", "process-drawable"], + [169, "s4", "process-drawable"], + [163, "s4", "process-drawable"], + [123, "gp", "process-drawable"], + [129, "gp", "process-drawable"] + ], + "(anon-function 49 script)": [ + [131, "a0", "process-drawable"], + [137, "v1", "process-drawable"], + [140, "v1", "process-drawable"], + [146, "v0", "joint"], + [155, "a0", "process-drawable"], + [183, "a0", "process-drawable"], + [191, "a0", "process-drawable"], + [91, "s3", "drawable-region-prim"] + ], + "(anon-function 62 script)": [[24, "v0", "float"]], + "(anon-function 65 script)": [ + [10, "s4", "pair"], + [16, "s5", "entity-actor"], + [42, "s4", "pair"], + [43, "s4", "pair"] + ], + "(anon-function 66 script)": [ + [10, "gp", "pair"], + [55, "gp", "pair"], + [56, "gp", "pair"] + ], + "(anon-function 69 script)": [ + [14, "s5", "pair"], + [11, "s4", "process-focusable"], + [180, "s5", "pair"], + [181, "s5", "pair"] + ], + "(anon-function 70 script)": [[49, "v1", "process"]], + "(anon-function 71 script)": [[66, "v1", "process"]], + "(anon-function 15 script)": [ + [17, "v1", "pair"], + [30, "v1", "pair"], + [31, "v1", "pair"] + ], + "(anon-function 9 script)": [ + [35, "s5", "pair"], + [37, "a2", "symbol"], + [78, "v1", "process-drawable"], + [83, "a0", "process-drawable"], + [89, "v1", "process-drawable"], + [95, "v0", "joint"], + [67, "s5", "pair"], + [68, "s5", "pair"] + ], + "(anon-function 84 script)": [[21, "v1", "bfloat"]], + "(method 9 script-context)": [[138, "a0", "symbol"]], + "(anon-function 101 script)": [ + [3, "s5", "pair"], + [9, "s5", "pair"], + [10, "s5", "pair"] + ], + "(anon-function 97 script)": [ + [3, "s5", "pair"], + [13, "s5", "pair"], + [14, "s5", "pair"] + ], + "(anon-function 96 script)": [ + [3, "s5", "pair"], + [14, "s5", "pair"], + [15, "s5", "pair"] + ], + "(anon-function 95 script)": [ + [5, "s5", "pair"], + [11, "s5", "pair"], + [12, "s5", "pair"] + ], + "(anon-function 94 script)": [ + [5, "s5", "pair"], + [11, "s5", "pair"], + [12, "s5", "pair"] + ], + "(anon-function 93 script)": [ + [3, "s4", "pair"], + [6, "s3", "pair"], + [17, "s3", "pair"], + [18, "s4", "pair"], + [25, "s4", "pair"], + [26, "s4", "pair"], + [35, "s4", "pair"], + [36, "s4", "pair"] + ], + "(anon-function 92 script)": [ + [4, "s3", "pair"], + [7, "s2", "pair"], + [25, "s2", "pair"], + [26, "s4", "pair"], + [33, "s4", "pair"], + [34, "s4", "pair"], + [43, "s3", "pair"], + [44, "s3", "pair"] + ], + "(anon-function 89 script)": [[3, "t9", "(function none)"]], + "(anon-function 91 script)": [[4, "v1", "symbol"]], + "(method 10 script-context)": [[22, "s3", "symbol"]], + "command-get-process": [ + [37, "gp", "entity-actor"], + [83, "v1", "connection"], + [84, "a2", "game-task-node-info"], + [86, "v1", "connection"], + [104, "v1", "connection"], + [197, "s4", "process-drawable"], + [200, "s4", "process-drawable"], + [206, "s4", "process-drawable"], + [213, "s4", "process-drawable"], + [218, "s4", "process-drawable"] + ], + "(anon-function 7 relocate)": [ + [3, "a0", "int"], + [8, "a0", "int"] + ], + "(method 7 process)": [ + [[47, 88], "v1", "connection"], + [[120, 124], "a0", "basic"], + [[127, 130], "a0", "basic"] + ], + "(method 9 mood-control)": [[695, "v0", "sound-rpc-set-param"]], + "update-mood-pulse": [[[5, 45], "gp", "pulse-state"]], + "update-mood-electricity": [[[3, 19], "gp", "electricity-state"]], + "update-mood-florescent": [[[1, 48], "gp", "florescent-state"]], + "update-mood-flicker": [[[1, 58], "gp", "flicker-state"]], + "update-mood-light": [[[7, 175], "gp", "light-state"]], + "update-mood-flames": [[[5, 102], "gp", "flames-state"]], + "(method 23 mood-control)": [ + [121, "a1", "vector"], + [125, "a1", "vector"], + [129, "a1", "vector"], + [133, "a1", "vector"], + [137, "v1", "vector"], + [122, "a0", "vector"], + [126, "a0", "vector"], + [130, "a0", "vector"], + [134, "a0", "vector"], + [138, "a0", "vector"] + ], + "copy-mood-exterior": [ + [[16, 20], "a1", "mood-context"], + [30, "a0", "(inline-array vector)"], + [33, "a0", "(inline-array vector)"], + [31, "v1", "(inline-array vector)"], + [32, "v1", "(inline-array vector)"], + [[17, 19], "v1", "(inline-array vector)"] + ], + "copy-mood-exterior-ambi": [ + [[12, 17], "a2", "mood-context"], + [[13, 16], "v1", "mood-context"] + ], + "overide-mood-color": [ + [40, "a2", "(inline-array vector)"], + [44, "a0", "(inline-array vector)"], + [107, "a0", "mood-context"], + [[91, 107], "s3", "mood-context"] + ], + "(method 11 sky-work)": [[[7, 63], "s3", "mood-context"]], + "sky-make-sun-data": [[[7, 58], "s3", "sky-sun-data"]], + "update-mood-ctysluma": [[[23, 72], "s5", "ctysluma-states"]], + "sparticle-track-sun": [[148, "s4", "vector"]], + "foreground-draw-hud": [ + [26, "t2", "foreground-work"], + [36, "a1", "foreground-work"], + [79, "t2", "foreground-work"], + [[85, 102], "t2", "(pointer uint128)"], + [166, "a1", "int"], + [172, "a0", "foreground-work"], + [12, "t0", "foreground-work"], + [31, "t1", "foreground-work"], + [103, "t1", "vu-lights"], + [164, "a0", "(pointer uint128)"], + [90, "t1", "vu-lights"], + [[93, 99], "t1", "(pointer uint128)"], + [101, "t1", "(pointer uint128)"], + [[42, 49], "t6", "bone-calculation"], + [[0, 200], "at", "foreground-work"] + ], + "free-eye-index": [[30, "a2", "eye-control"]], + "update-eyes": [ + [23, "v1", "process-drawable"], + [29, "v1", "process-drawable"] + ], + "render-eyes-64": [ + [[77, 82], "v1", "dma-gif-packet"], + [[88, 93], "s0", "adgif-shader"], + [[132, 164], "v1", "(inline-array vector4w)"], + [[244, 274], "a1", "(inline-array vector4w)"], + [[284, 292], "v1", "dma-gif-packet"], + [[298, 303], "s0", "adgif-shader"], + [[376, 406], "a1", "(inline-array vector4w)"], + [[442, 450], "v1", "dma-gif-packet"], + [[456, 461], "s0", "adgif-shader"], + [[535, 562], "a1", "(inline-array vector4w)"], + [[575, 580], "v1", "dma-gif-packet"], + [[586, 591], "s0", "adgif-shader"], + [[664, 694], "a1", "(inline-array vector4w)"], + [[733, 738], "v1", "dma-gif-packet"], + [[744, 749], "s0", "adgif-shader"], + [[845, 874], "a1", "(inline-array vector4w)"], + [[887, 892], "v1", "dma-gif-packet"], + [[898, 903], "s0", "adgif-shader"], + [[1003, 1029], "a1", "(inline-array vector4w)"], + [180, "a0", "int"], + [188, "a1", "int"], + [310, "a0", "int"], + [318, "a1", "int"], + [468, "a0", "int"], + [476, "a1", "int"], + [598, "a0", "int"], + [606, "a1", "int"], + [756, "a0", "int"], + [764, "a1", "int"], + [910, "a0", "int"], + [918, "a1", "int"] + ], + "render-eyes-32": [ + [[77, 82], "v1", "dma-gif-packet"], + [[88, 93], "s0", "adgif-shader"], + [[132, 164], "v1", "(inline-array vector4w)"], + [[244, 274], "a1", "(inline-array vector4w)"], + [[287, 292], "v1", "dma-gif-packet"], + [[298, 303], "s0", "adgif-shader"], + [[376, 406], "a1", "(inline-array vector4w)"], + [[445, 450], "v1", "dma-gif-packet"], + [[456, 461], "s0", "adgif-shader"], + [[532, 562], "a1", "(inline-array vector4w)"], + [[575, 580], "v1", "dma-gif-packet"], + [[586, 591], "s0", "adgif-shader"], + [[664, 694], "a1", "(inline-array vector4w)"], + [[733, 738], "v1", "dma-gif-packet"], + [[744, 749], "s0", "adgif-shader"], + [[845, 874], "a1", "(inline-array vector4w)"], + [[887, 892], "v1", "dma-gif-packet"], + [[898, 903], "s0", "adgif-shader"], + [[1000, 1029], "a1", "(inline-array vector4w)"], + [180, "a0", "int"], + [188, "a1", "int"], + [910, "a0", "int"], + [918, "a1", "int"], + [310, "a0", "int"], + [318, "a1", "int"], + [468, "a0", "int"], + [476, "a1", "int"], + [598, "a0", "int"], + [606, "a1", "int"], + [756, "a0", "int"], + [764, "a1", "int"] + ], + "(method 28 path-control)": [["_stack_", 124, "float"]], + "collision-edit-get-prim": [[11, "v1", "collide-shape"]], + "collision-edit-get-max-prim": [[11, "v1", "collide-shape"]], + "print-actual-collision": [ + [12, "v1", "collide-shape"], + [182, "v1", "collide-shape"], + [83, "v1", "collide-shape-prim-mesh"], + [87, "v1", "(array string)"] + ], + "print-default-collision": [ + [23, "v1", "process-drawable"], + [27, "v1", "process-drawable"], + [55, "v1", "process-drawable"], + [66, "v1", "process-drawable"], + [76, "v0", "(array collide-mesh)"], + [138, "v1", "process-drawable"], + [157, "v1", "process-drawable"], + [267, "a1", "process-drawable"], + [277, "v1", "process-drawable"], + [375, "v1", "process-drawable"], + [[190, 250], "a0", "(inline-array collide-cache-tri)"] + ], + "(method 10 collision-edit-info)": [[[495, 538], "s4", "collide-cache-tri"]], + "(event slide-control-ride slide-control)": [ + [21, "gp", "process-drawable"], + [32, "v1", "vector"], + [36, "v1", "vector"], + [28, "v1", "vector"] + ], + "(code target-tube-walk)": [ + [44, "v1", "art-joint-anim"], + [129, "v1", "art-joint-anim"] + ], + "(code target-tube-start)": [[163, "v1", "float"]], + "(trans active simple-nav-sphere)": [ + [10, "v1", "process-drawable"], + [14, "a0", "collide-shape"], + [17, "a0", "collide-shape"] + ], + "simple-nav-sphere-event-handler": [ + [11, "a0", "collide-shape"], + [14, "a0", "collide-shape"], + [24, "a0", "collide-shape"], + [26, "a0", "collide-shape"], + [28, "a0", "collide-shape"], + [21, "v1", "float"] + ], + "target-mech-handler": [ + [94, "a0", "process"], + [[198, 380], "s3", "attack-info"] + ], + "mech-update-ik": [ + [3, "v1", "process-drawable"], + [36, "s5", "collide-shape"], + [41, "s5", "collide-shape"], + [85, "s5", "collide-shape-moving"] + ], + "target-mech-collision": [[108, "v0", "carry-info"]], + "(anon-function 8 target-mech)": [ + [4, "gp", "target"], + [10, "gp", "target"], + [14, "gp", "target"] + ], + "(anon-function 9 target-mech)": [ + [6, "v1", "target"], + [10, "v1", "target"], + [16, "v1", "target"], + [20, "v1", "target"], + [24, "v1", "target"], + [28, "v1", "target"], + [32, "v1", "target"] + ], + "(event target-mech-grab)": [[27, "a0", "process"]], + "(code target-mech-get-off)": [[67, "v1", "art-joint-anim"]], + "(code target-mech-get-up)": [ + [74, "v1", "process-drawable"], + [80, "v1", "process-drawable"], + [115, "v1", "art-joint-anim"] + ], + "(code target-mech-get-on)": [ + [74, "v1", "process-drawable"], + [80, "v1", "process-drawable"], + [115, "v1", "art-joint-anim"] + ], + "(code target-mech-carry-throw)": [ + [51, "v0", "carry-info"], + [112, "v0", "carry-info"] + ], + "(enter target-mech-carry-hit-ground)": [[3, "v0", "sound-rpc-set-param"]], + "(exit target-mech-carry-drag)": [ + [28, "v0", "sound-rpc-set-param"], + [11, "v0", "sound-rpc-set-param"] + ], + "(code target-mech-carry-walk)": [[80, "f0", "float"]], + "(code target-mech-carry-drop)": [ + [42, "v0", "carry-info"], + [110, "v1", "art-joint-anim"], + [176, "v0", "carry-info"], + [283, "v0", "sound-rpc-set-param"], + [316, "v0", "sound-rpc-set-param"] + ], + "(code target-mech-carry-pickup)": [ + [137, "v0", "carry-info"], + [377, "v1", "art-joint-anim"], + [541, "v0", "carry-info"], + [574, "f0", "float"] + ], + "(code target-mech-death)": [ + [410, "gp", "art-joint-anim"], + [731, "v1", "art-joint-anim"] + ], + "(code target-mech-walk)": [[91, "f0", "float"]], + "(code target-mech-punch)": [ + [107, "v1", "art-joint-anim"], + [135, "v1", "art-joint-anim"], + [163, "v1", "art-joint-anim"], + [191, "v1", "art-joint-anim"], + [231, "v1", "art-joint-anim"], + [259, "v1", "art-joint-anim"], + [287, "v1", "art-joint-anim"], + [315, "v1", "art-joint-anim"] + ], + "(event target-mech-punch)": [ + [45, "gp", "collide-query"], + [53, "s4", "collide-shape-prim"], + [68, "s5", "process-focusable"], + [104, "gp", "collide-query"], + [109, "s4", "collide-shape-prim"], + [137, "s5", "process-focusable"], + [166, "gp", "collide-query"], + [213, "gp", "collide-query"] + ], + "target-mech-punch-pick": [ + [227, "s5", "art-joint-anim"], + [246, "s5", "art-joint-anim"] + ], + "(code target-mech-jump)": [[26, "t9", "(function none)"]], + "(enter target-mech-hit-ground)": [[3, "v0", "sound-rpc-set-param"]], + "(method 33 flut)": [[8, "v0", "(array collide-shape)"]], + "(event target-flut-grab)": [[35, "a0", "process"]], + "(post target-flut-kanga-catch)": [[21, "s5", "process-focusable"]], + "(code target-flut-kanga-catch)": [ + [62, "s5", "art-joint-anim"], + [127, "s5", "process-focusable"], + [137, "s5", "process-focusable"], + [187, "s5", "process-focusable"] + ], + "target-flut-standard-event-handler": [[305, "a0", "process"]], + "target-flut-hit-ground-anim": [ + [137, "v1", "art-joint-anim"], + [212, "v1", "art-joint-anim"] + ], + "(code target-flut-run-wild)": [[72, "v1", "art-joint-anim"]], + "(code target-flut-double-jump)": [[14, "v1", "art-joint-anim"]], + "(code target-flut-stance)": [ + [87, "v1", "art-joint-anim"], + [153, "v1", "art-joint-anim"], + [219, "v1", "art-joint-anim"] + ], + "(trans target-flut-walk)": [ + [144, "f0", "float"], + [149, "f1", "float"] + ], + "(code target-flut-walk)": [[65, "v1", "art-joint-anim"]], + "(event target-flut-running-attack)": [ + [40, "v1", "process-drawable"], + [46, "s5", "collide-shape"] + ], + "(code target-flut-air-attack-hit-ground)": [[81, "v1", "art-joint-anim"]], + "(code target-flut-air-attack)": [[78, "v1", "art-joint-anim"]], + "flut-update-ik": [ + [3, "v1", "process-drawable"], + [36, "s5", "collide-shape"], + [41, "s5", "collide-shape"], + [96, "s5", "collide-shape-moving"] + ], + "(anon-function 74 target-flut)": [ + [6, "gp", "target"], + [10, "gp", "target"], + [16, "gp", "target"], + [24, "gp", "target"], + [33, "gp", "target"], + [42, "a0", "target"], + [49, "gp", "target"], + [56, "gp", "target"] + ], + "(anon-function 21 target-flut)": [[58, "v1", "art-joint-anim"]], + "(code target-flut-death)": [ + [609, "a1", "art-joint-anim"], + [698, "a1", "art-joint-anim"] + ], + "(code target-flut-get-on)": [ + [75, "s3", "process-drawable"], + [72, "s2", "process-drawable"], + [204, "v1", "process-drawable"], + [201, "s3", "process-drawable"] + ], + "(code target-flut-running-attack)": [ + [129, "a0", "uint"], + [298, "v1", "art-joint-anim"] + ], + "(trans target-flut-running-attack)": [[87, "v1", "int"]], + "(anon-function 20 target-flut)": [ + [119, "v1", "art-joint-anim"], + [284, "v1", "art-joint-anim"] + ], + "(method 14 minimap)": [ + [84, "v1", "process-drawable"], + [99, "v1", "entity-actor"], + [108, "v1", "process-drawable"], + [112, "s2", "entity-actor"], + [93, "s2", "basic"] + ], + "(method 12 minimap)": [[18, "v0", "connection-minimap"]], + "(method 15 minimap)": [ + [48, "s2", "(pointer uint128)"], + [[85, 90], "s1", "(pointer uint128)"], + [[282, 287], "s3", "(pointer uint128)"], + [[290, 293], "s3", "(pointer uint128)"], + [[294, 301], "v1", "(inline-array vector4w)"], + [[302, 307], "v1", "(inline-array vector4w)"], + [[313, 322], "v1", "(inline-array vector4w)"], + [[324, 329], "v1", "(inline-array vector4w)"], + [[335, 344], "v1", "(inline-array vector4w)"], + [[345, 351], "v1", "(inline-array vector4w)"], + [[357, 366], "v1", "(inline-array vector4w)"], + [[368, 374], "v1", "(inline-array vector4w)"], + [[380, 389], "v1", "(inline-array vector4w)"] + ], + "(method 19 minimap)": [ + [[114, 144], "s3", "(inline-array vector4w)"], + [[151, 155], "v1", "(inline-array vector4w)"], + [[157, 161], "a0", "(inline-array vector4w)"], + [[163, 168], "v1", "(inline-array vector4w)"], + [[170, 174], "v1", "(inline-array vector4w)"] + ], + "(method 18 level)": [[[13, 961], "s5", "level-memory-mode"]], + "(method 24 minimap)": [ + [[16, 21], "v1", "adgif-shader"], + [[90, 98], "v1", "(inline-array vector)"], + [[107, 116], "v1", "(inline-array vector)"], + [[125, 133], "v1", "(inline-array vector)"], + [[142, 151], "v1", "(inline-array vector)"], + [77, "s3", "(pointer uint128)"], + [79, "s3", "(pointer uint128)"], + [[100, 104], "a0", "(inline-array vector4w)"], + [[118, 122], "v1", "(inline-array vector4w)"], + [[135, 139], "a0", "(inline-array vector4w)"], + [[153, 157], "v1", "(inline-array vector4w)"], + [[172, 175], "s2", "adgif-shader"] + ], + "(method 23 minimap)": [ + [28, "a0", "process-drawable"], + [62, "v1", "process-drawable"], + [81, "a0", "process-drawable"], + [319, "a1", "(pointer uint128)"], + [321, "a0", "(inline-array vector4w)"], + [[336, 344], "v1", "(inline-array vector)"], + [[351, 361], "v1", "(inline-array vector4w)"], + [[365, 373], "v1", "(inline-array vector)"], + [[380, 390], "v1", "(inline-array vector4w)"], + [[393, 402], "v1", "(inline-array vector)"], + [[409, 419], "v1", "(inline-array vector4w)"], + [[423, 432], "v1", "(inline-array vector)"], + [[439, 449], "v1", "(inline-array vector4w)"] + ], + "(method 26 minimap)": [ + [34, "a0", "process-drawable"], + [49, "v1", "process-drawable"], + [64, "a0", "process-drawable"], + [305, "a1", "(pointer uint128)"], + [[310, 319], "a0", "(inline-array vector4w)"], + [[322, 330], "v1", "(inline-array vector)"], + [[337, 347], "v1", "(inline-array vector4w)"], + [[351, 359], "v1", "(inline-array vector)"], + [[366, 376], "v1", "(inline-array vector4w)"], + [[379, 388], "v1", "(inline-array vector)"], + [[395, 405], "v1", "(inline-array vector4w)"], + [[409, 418], "v1", "(inline-array vector)"], + [[425, 435], "v1", "(inline-array vector4w)"] + ], + "(method 17 minimap)": [ + [28, "a0", "process-drawable"], + [68, "v1", "process-drawable"], + [87, "a0", "process-drawable"], + [[353, 360], "a0", "(pointer uint128)"], + [364, "a0", "(pointer uint128)"], + [367, "a0", "(pointer uint128)"], + [[372, 381], "v1", "(inline-array vector4w)"], + [[384, 392], "v1", "(inline-array vector)"], + [[399, 408], "v1", "(inline-array vector4w)"], + [[412, 420], "v1", "(inline-array vector)"], + [[427, 436], "v1", "(inline-array vector4w)"], + [[439, 448], "v1", "(inline-array vector)"], + [[455, 464], "v1", "(inline-array vector4w)"], + [[468, 477], "v1", "(inline-array vector)"], + [[484, 493], "v1", "(inline-array vector4w)"] + ], + "(method 18 minimap)": [ + [28, "a0", "process-drawable"], + [68, "v1", "process-drawable"], + [87, "a0", "process-drawable"], + [360, "t1", "(pointer uint128)"], + [363, "t1", "(pointer uint128)"], + [365, "t0", "(pointer uint128)"], + [[368, 377], "t0", "(inline-array vector4w)"], + [[379, 383], "a3", "(inline-array vector4w)"], + [[390, 399], "a3", "(inline-array vector4w)"], + [[401, 405], "a3", "(inline-array vector4w)"], + [[412, 421], "a2", "(inline-array vector4w)"], + [[423, 427], "a2", "(inline-array vector4w)"], + [[434, 443], "a1", "(inline-array vector4w)"], + [[445, 449], "a1", "(inline-array vector4w)"], + [[456, 465], "v1", "(inline-array vector4w)"] + ], + "(method 21 minimap)": [ + [[14, 17], "s3", "(pointer uint128)"], + [71, "s3", "(pointer uint128)"], + [73, "s3", "(pointer uint128)"], + [[217, 224], "v1", "(inline-array vector4w)"], + [[226, 235], "v1", "(inline-array vector)"], + [[236, 241], "v1", "(inline-array vector4w)"], + [[243, 252], "v1", "(inline-array vector)"], + [[254, 259], "v1", "(inline-array vector4w)"], + [[261, 270], "v1", "(inline-array vector)"], + [[271, 277], "v1", "(inline-array vector4w)"], + [[279, 288], "v1", "(inline-array vector)"], + [[290, 296], "v1", "(inline-array vector4w)"], + [[380, 385], "s2", "(pointer uint128)"], + [[425, 430], "s3", "(pointer uint128)"], + [[498, 503], "s3", "(pointer uint128)"], + [[511, 514], "s3", "(pointer uint128)"], + [[516, 523], "v1", "(inline-array vector4w)"], + [[524, 528], "v1", "(inline-array vector4w)"], + [[529, 534], "v1", "(inline-array vector4w)"], + [[536, 541], "v1", "(inline-array vector4w)"], + [[543, 549], "v1", "(inline-array vector4w)"] + ], + "(method 16 minimap)": [ + [30, "v1", "process-drawable"], + [34, "v1", "process-drawable"], + [56, "v1", "entity-actor"], + [66, "a0", "process-drawable"], + [77, "a0", "entity-actor"], + [50, "v1", "entity-actor"], + [[542, 545], "v1", "(pointer uint128)"], + [[548, 557], "t1", "(inline-array vector4w)"], + [[558, 562], "a0", "(inline-array vector4w)"], + [[568, 578], "a0", "(inline-array vector4w)"], + [[579, 583], "a0", "(inline-array vector4w)"], + [[589, 599], "v1", "(inline-array vector4w)"] + ], + "(method 10 engine-minimap)": [[6, "s5", "connection-minimap"]], + "(method 14 engine-minimap)": [ + [159, "a0", "entity-actor"], + [152, "v1", "entity-actor"] + ], + "(method 12 lightning-bolt)": [ + ["_stack_", 56, "float"], + ["_stack_", 236, "float"] + ], + "(method 15 lightning-bolt)": [ + [47, "v1", "float"], + [64, "v1", "float"] + ], + "(method 21 lightning-bolt)": [ + [49, "v1", "float"], + [77, "v1", "float"], + ["_stack_", 32, "float"] + ], + "(method 20 lightning-bolt)": [ + [15, "v1", "float"], + [32, "v1", "float"] + ], + "(method 17 lightning-bolt)": [[36, "v1", "float"]], + "(method 11 lightning-bolt)": [ + ["_stack_", 24, "float"], + ["_stack_", 40, "float"], + ["_stack_", 68, "float"], + ["_stack_", 72, "float"] + ], + "(method 16 lightning-bolt)": [["_stack_", 176, "rgba"]], + "(method 28 nav-mesh)": [[[22, 78], "s4", "nav-engine"]], + "(method 12 nav-engine)": [ + [[22, 28], "v1", "connection"], + [[29, 31], "a0", "process-focusable"], + [[34, 86], "s2", "collide-shape"], + [90, "v1", "collide-shape-prim-group"], + [110, "s2", "collide-shape-prim-sphere"] + ], + "(method 13 nav-engine)": [ + [[53, 65], "s4", "nav-mesh"], + [[38, 50], "s3", "nav-mesh"] + ], + "nav-control-validate": [ + [29, "s5", "int"], + [29, "v1", "int"] + ], + "connection-list-validate": [[5, "gp", "connection"]], + "(method 25 nav-mesh)": [ + [16, "v0", "(inline-array sphere)"], + ["_stack_", 16, "res-tag"] + ], + "(method 46 nav-mesh)": [["_stack_", 28, "float"]], + "(method 48 nav-mesh)": [ + [15, "v1", "entity-nav-mesh"], + [[34, 43], "v1", "nav-mesh-link"] + ], + "compute-dir-parm": [ + [18, "f0", "float"], + [8, "a2", "uint"], + [10, "v1", "float"] + ], + "(method 18 nav-control)": [ + [252, "a2", "float"], + [250, "a3", "uint"], + [250, "t0", "uint"] + ], + "(code hit nav-enemy)": [[30, "v1", "art-joint-anim"]], + "(code active nav-enemy)": [ + [30, "v1", "art-joint-anim"], + [127, "v1", "art-joint-anim"], + [189, "v1", "art-joint-anim"], + [298, "v1", "art-joint-anim"] + ], + "(code notice nav-enemy)": [[31, "v1", "art-joint-anim"]], + "(enter notice nav-enemy)": [ + [21, "a0", "process-focusable"], + [24, "a0", "process-focusable"] + ], + "(code taunt nav-enemy)": [[84, "v1", "art-joint-anim"]], + "(code pacing nav-enemy)": [[34, "gp", "art-joint-anim"]], + "(trans pacing nav-enemy)": [ + [14, "a0", "process-focusable"], + [17, "a0", "process-focusable"] + ], + "(enter circling nav-enemy)": [ + [69, "gp", "process-focusable"], + [73, "a0", "process-focusable"], + [72, "gp", "process-focusable"] + ], + "(code circling nav-enemy)": [[34, "gp", "art-joint-anim"]], + "(trans circling nav-enemy)": [ + [14, "a0", "process-focusable"], + [17, "a0", "process-focusable"] + ], + "(enter pacing nav-enemy)": [ + [103, "gp", "process-focusable"], + [107, "a0", "process-focusable"], + [106, "gp", "process-focusable"] + ], + "(enter taunt nav-enemy)": [ + [37, "gp", "process-focusable"], + [41, "a0", "process-focusable"], + [40, "gp", "process-focusable"] + ], + "(code stare nav-enemy)": [[23, "gp", "art-joint-anim"]], + "nav-enemy-stare-post": [ + [24, "a0", "process-focusable"], + [27, "a0", "process-focusable"] + ], + "nav-enemy-face-focus-post": [ + [24, "a0", "process-focusable"], + [27, "a0", "process-focusable"] + ], + "nav-enemy-flee-post": [ + [18, "a0", "process-focusable"], + [21, "a0", "process-focusable"] + ], + "nav-enemy-chase-post": [ + [15, "a0", "process-focusable"], + [18, "a0", "process-focusable"] + ], + "(method 119 nav-enemy)": [ + [78, "s5", "nav-enemy-info"], + ["_stack_", 16, "res-tag"] + ], + "(method 118 nav-enemy)": [[3, "a1", "nav-enemy-info"]], + "(method 59 nav-enemy)": [ + [57, "a0", "process-focusable"], + [60, "a0", "process-focusable"] + ], + "(method 167 nav-enemy)": [ + [17, "v1", "process-focusable"], + [21, "a0", "process-focusable"], + [20, "v1", "process-focusable"] + ], + "(method 171 nav-enemy)": [ + [18, "s5", "process-focusable"], + [35, "s5", "process-focusable"], + [39, "a0", "process-focusable"], + [38, "s5", "process-focusable"] + ], + "(method 172 nav-enemy)": [ + [22, "v1", "process-focusable"], + [26, "a0", "process-focusable"], + [25, "v1", "process-focusable"] + ], + "(method 16 nav-mesh)": [ + [27, "v1", "int"], + [22, "v1", "int"], + [24, "a0", "int"], + [26, "a0", "int"] + ], + "(method 15 nav-mesh)": [ + [18, "v1", "int"], + [20, "a2", "int"], + [22, "a2", "int"] + ], + "(code active monster-frog)": [ + [27, "v1", "art-joint-anim"], + [80, "v1", "art-joint-anim"], + [172, "v1", "art-joint-anim"], + [234, "v1", "art-joint-anim"], + [343, "v1", "art-joint-anim"] + ], + "(code attack-recover monster-frog)": [ + [10, "v1", "art-joint-anim"], + [87, "v1", "art-joint-anim"], + [158, "v1", "art-joint-anim"] + ], + "(code attack monster-frog)": [[19, "v1", "art-joint-anim"]], + "(method 85 monster-frog)": [ + [19, "v1", "art-joint-anim"], + [54, "v1", "art-joint-anim"], + [89, "v1", "art-joint-anim"], + [121, "v1", "art-joint-anim"] + ], + "(method 86 monster-frog)": [ + [19, "v1", "art-joint-anim"], + [54, "v1", "art-joint-anim"], + [89, "v1", "art-joint-anim"], + [121, "v1", "art-joint-anim"] + ], + "(post turn monster-frog)": [ + [24, "a0", "process-focusable"], + [27, "a0", "process-focusable"] + ], + "(code turn monster-frog)": [ + [21, "v1", "art-joint-anim"], + [79, "v1", "art-joint-anim"] + ], + "(code hostile monster-frog)": [ + [16, "gp", "process-focusable"], + [117, "v1", "art-joint-anim"], + [202, "v1", "art-joint-anim"] + ], + "(code notice monster-frog)": [ + [23, "v1", "art-joint-anim"], + [71, "v1", "art-joint-anim"], + [103, "a0", "process-focusable"], + [106, "a0", "process-focusable"], + [149, "v1", "art-joint-anim"] + ], + "(code ambush monster-frog)": [ + [21, "a0", "process-focusable"], + [24, "a0", "process-focusable"], + [68, "v1", "art-joint-anim"] + ], + "monster-frog-hop-fast-code": [ + [15, "v1", "art-joint-anim"], + [72, "v1", "art-joint-anim"] + ], + "monster-frog-hop-slow-code": [ + [231, "v1", "art-joint-anim"], + [288, "v1", "art-joint-anim"], + [46, "v1", "art-joint-anim"], + [117, "v1", "art-joint-anim"] + ], + "update-mood-mineb": [ + [41, "f0", "float"], + [45, "f0", "float"] + ], + "(code extended min-bridge)": [[10, "v1", "art-joint-anim"]], + "(code extend min-bridge)": [[49, "v1", "art-joint-anim"]], + "(code extended min-folding-plat)": [[15, "v1", "art-joint-anim"]], + "(code extend min-folding-plat)": [[44, "v1", "art-joint-anim"]], + "(method 11 min-falling-step)": [["_stack_", 16, "res-tag"]], + "(method 11 rat-spawner)": [["_stack_", 16, "res-tag"]], + "(method 0 flow-control)": [["_stack_", 16, "res-tag"]], + "(code lowered min-falling-step)": [[18, "v1", "art-joint-anim"]], + "(code lowering min-falling-step)": [[65, "v1", "art-joint-anim"]], + "(code idle min-falling-step)": [[28, "v1", "art-joint-anim"]], + "(code resetting min-falling-elevator)": [[25, "v1", "art-joint-anim"]], + "(code falling min-falling-elevator)": [[10, "v1", "art-joint-anim"]], + "(code unstable min-falling-elevator)": [ + [36, "v1", "art-joint-anim"], + [88, "v1", "art-joint-anim"] + ], + "(trans active min-moving-plat-spooler)": [[12, "v0", "sound-rpc-set-param"]], + "min-ramp-callback": [[6, "v1", "min-ramp"]], + "(post arrived min-falling-elevator)": [[4, "t9", "(function none)"]], + "(post running min-falling-elevator)": [[4, "t9", "(function none)"]], + "min-falling-elevator-callback": [[[3, 31], "v1", "min-falling-elevator"]], + "(post running min-boss-elev)": [[50, "t9", "(function none)"]], + "(code open min-elev-doors)": [[25, "v1", "art-joint-anim"]], + "(post waiting min-bomb-elevator)": [[4, "t9", "(function none)"]], + "(post running min-bomb-elevator)": [ + [4, "t9", "(function none)"], + [15, "v1", "process-drawable"] + ], + "(code lowering min-target-sign)": [[15, "v1", "art-joint-anim"]], + "(code running min-rat-engine)": [ + [10, "v1", "art-joint-anim"], + [139, "v1", "art-joint-anim"], + [114, "a0", "entity-actor"], + [118, "a0", "entity-actor"] + ], + "(code shutdown min-rat-engine)": [[14, "v1", "art-joint-anim"]], + "(enter shutdown min-rat-engine)": [[2, "v1", "collide-shape-prim-group"]], + "(event idle min-target-sign)": [[[6, 42], "gp", "touching-shapes-entry"]], + "(method 11 min-target-sign)": [ + [62, "v1", "collide-shape-prim-group"], + [[65, 71], "v1", "collide-shape-prim-group"] + ], + "(method 11 min-rat-engine)": [["_stack_", 16, "res-tag"]], + "(method 21 min-target-sign)": [[[21, 25], "gp", "collide-shape-prim-group"]], + "min-bomb-elevator-callback": [[[3, 31], "v1", "min-bomb-elevator"]], + "(enter running min-rat-engine)": [[68, "v1", "collide-shape-prim-group"]], + "mineb-activate": [ + ["_stack_", 16, "res-tag"], + [17, "v0", "(pointer actor-group)"], + [41, "a0", "entity-actor"], + [45, "a0", "entity-actor"] + ], + "(event up-idle basebutton)": [ + [4, "v1", "attack-info"], + [32, "v1", "attack-info"], + [37, "v1", "attack-info"] + ], + "(method 34 basebutton)": [[35, "v1", "art-joint-anim"]], + "(method 34 min-crane-switch)": [[35, "v1", "art-joint-anim"]], + "joint-mod-rat-engine-callback": [[6, "v1", "min-rat-engine"]], + "(method 27 min-rat-engine)": [[14, "a2", "process-focusable"]], + "(method 11 rat-light-manager)": [["_stack_", 16, "res-tag"]], + "(code idle manta)": [ + [100, "v1", "art-joint-anim"], + [46, "v1", "art-joint-anim"] + ], + "manta-fly-code": [ + [168, "v1", "art-joint-anim"], + [196, "v1", "art-joint-anim"] + ], + "(code ambush manta)": [ + [30, "v1", "art-joint-anim"], + [82, "v1", "art-joint-anim"] + ], + "(code notice-to-fly manta)": [ + [14, "v1", "art-joint-anim"], + [95, "v1", "art-joint-anim"] + ], + "(code attack manta)": [ + [17, "v1", "art-joint-anim"], + [113, "v1", "art-joint-anim"], + [173, "v1", "art-joint-anim"], + [225, "v1", "art-joint-anim"] + ], + "(code knocked-recover manta)": [[16, "v1", "art-joint-anim"]], + "(exit attack-end manta)": [[2, "v1", "collide-shape-prim-group"]], + "(code attack-end manta)": [[16, "v1", "art-joint-anim"]], + "(enter attack-end manta)": [[3, "a0", "collide-shape-prim-group"]], + "(code land manta)": [ + [105, "v1", "art-joint-anim"], + [161, "v1", "art-joint-anim"], + [41, "v1", "art-joint-anim"] + ], + "(method 50 manta)": [ + [10, "v1", "collide-shape-prim-group"], + [34, "v1", "collide-shape-prim-group"] + ], + "(method 87 manta)": [[43, "v1", "art-joint-anim"]], + "(method 85 manta)": [ + [22, "v1", "art-joint-anim"], + [58, "v1", "art-joint-anim"], + [91, "v1", "art-joint-anim"] + ], + "(method 86 manta)": [[19, "v1", "art-joint-anim"]], + "(method 200 manta)": [ + [34, "a0", "connection"], + [35, "a0", "collide-shape"], + [83, "a0", "connection"], + [84, "a0", "collide-shape"] + ], + "(method 205 manta)": [ + [15, "a0", "process-focusable"], + [18, "a0", "process-focusable"] + ], + "(method 121 manta)": [["_stack_", 16, "res-tag"]], + "(code wheel-die rat)": [[14, "v1", "art-joint-anim"]], + "rat-joint-mod-roll": [[9, "gp", "rat"]], + "(code running-in-wheel rat)": [ + [14, "v1", "art-joint-anim"], + [72, "v1", "art-joint-anim"] + ], + "(enter running-in-wheel rat)": [ + [47, "v1", "collide-shape-prim-group"], + [53, "v1", "collide-shape-prim-group"] + ], + "(code knocked-recover rat)": [ + [38, "v1", "art-joint-anim"], + [59, "v1", "ragdoll-proc"], + [137, "v1", "art-joint-anim"], + [233, "v1", "art-joint-anim"] + ], + "(code stare rat)": [[91, "v1", "art-joint-anim"]], + "(code flee-stare rat)": [[91, "v1", "art-joint-anim"]], + "(code attack rat)": [[14, "v1", "art-joint-anim"]], + "(code wait-by-wheel-wait rat)": [[91, "v1", "art-joint-anim"]], + "(code notice rat)": [ + [22, "v1", "art-joint-anim"], + [80, "v1", "art-joint-anim"], + [203, "v1", "art-joint-anim"], + [140, "v1", "art-joint-anim"] + ], + "(code active-turn rat)": [ + [30, "v1", "art-joint-anim"], + [83, "v1", "art-joint-anim"] + ], + "(code active rat)": [[29, "v1", "art-joint-anim"]], + "rat-run-code": [[14, "v1", "art-joint-anim"]], + "(code ambush rat)": [ + [14, "v1", "art-joint-anim"], + [86, "v1", "art-joint-anim"], + [189, "v1", "art-joint-anim"] + ], + "(post idle rat-spawner)": [[103, "v0", "vector"]], + "(method 59 rat)": [ + [15, "a0", "process-focusable"], + [18, "a0", "process-focusable"] + ], + "(method 50 rat)": [ + [5, "v1", "collide-shape-prim-group"], + [20, "v1", "collide-shape-prim-group"] + ], + "(method 82 rat)": [[93, "v0", "vector"]], + "min-bomb-train-callback": [[[3, 31], "v1", "min-bomb-train"]], + "(code active min-bomb-train)": [ + [18, "gp", "task-manager"], + [21, "gp", "task-manager"], + [16, "s5", "task-manager"] + ], + "(event active min-bomb-train)": [ + [18, "v1", "collide-shape-prim-group"], + [[10, 29], "s4", "touching-shapes-entry"], + [37, "gp", "process-focusable"], + [49, "s3", "attack-info"], + [68, "v1", "touching-shapes-entry"], + [163, "v1", "task-manager"] + ], + "(trans wait min-bomb-train)": [ + [11, "v0", "string"], + [13, "a0", "string"] + ], + "(method 38 min-bomb-train)": [ + [105, "v1", "task-manager"], + [118, "v1", "task-manager"], + [121, "v1", "task-manager"], + [132, "v1", "task-manager"], + [211, "v1", "task-manager"], + [234, "v1", "task-manager"] + ], + "(code resolution task-manager)": [[40, "gp", "handle"]], + "(method 31 task-manager)": [[[15, 259], "v0", "resetter-spec"]], + "(anon-function 67 task-control)": [ + [3, "s4", "pair"], + [4, "s4", "pair"], + [5, "a0", "pair"], + [6, "s4", "pair"], + [7, "a0", "pair"], + [8, "a0", "pair"], + [9, "s4", "pair"], + [10, "a0", "pair"], + [11, "a0", "pair"], + [12, "a0", "pair"], + [13, "v1", "symbol"], + [20, "s4", "pair"], + [21, "a0", "pair"], + [24, "v1", "level-load-info"], + [29, "a0", "pair"], + [33, "v1", "level-load-info"], + [38, "v1", "level-load-info"], + [43, "gp", "pair"], + [42, "gp", "pair"] + ], + "play-task": [[89, "v1", "pair"]], + "fail-mission": [ + [149, "s4", "game-task-node-info"], + [152, "s4", "game-task-node-info"], + [158, "s4", "game-task-node-info"], + [198, "s4", "game-task-node-info"], + [196, "s4", "game-task-node-info"], + [197, "s4", "game-task-node-info"], + [13, "v1", "connection"], + [17, "a0", "task-manager"], + [20, "a0", "task-manager"] + ], + "restart-mission": [ + [144, "s5", "game-task-node-info"], + [150, "s5", "game-task-node-info"], + [153, "s5", "game-task-node-info"], + [159, "s5", "game-task-node-info"], + [13, "v1", "connection"], + [17, "a0", "task-manager"], + [20, "a0", "task-manager"] + ], + "(method 11 min-bomb-train)": [["_stack_", 16, "res-tag"]], + "(code hostile-wall gekko)": [ + [20, "v1", "art-joint-anim"], + [70, "v1", "art-joint-anim"] + ], + "(code active-wall gekko)": [[14, "v1", "art-joint-anim"]], + "(code attack-wall gekko)": [ + [126, "v1", "art-joint-anim"], + [191, "v1", "art-joint-anim"] + ], + "(code jump-off-wall-falling gekko)": [[14, "v1", "art-joint-anim"]], + "gekko-stare-code": [[76, "v1", "art-joint-anim"]], + "(code flee gekko)": [ + [24, "v1", "art-joint-anim"], + [72, "v1", "art-joint-anim"] + ], + "(code attack gekko)": [ + [14, "v1", "art-joint-anim"], + [106, "v1", "art-joint-anim"], + [180, "v1", "art-joint-anim"] + ], + "(exit attack gekko)": [[31, "v1", "collide-shape-prim-group"]], + "(code turn gekko)": [ + [34, "v1", "art-joint-anim"], + [83, "v1", "art-joint-anim"] + ], + "(code turn-quick gekko)": [ + [14, "v1", "art-joint-anim"], + [82, "v1", "art-joint-anim"] + ], + "(enter knocked gekko)": [[42, "v1", "ragdoll-proc"]], + "(post knocked gekko)": [[4, "t9", "(function none)"]], + "(post knocked-recover gekko)": [[4, "t9", "(function none)"]], + "gekko-postbind": [ + [[3, 476], "gp", "gekko"], + ["_stack_", 560, "float"], + ["_stack_", 980, "gekko-foot-info"] + ], + "gekko-foot-rot-handler": [[2, "v1", "gekko"]], + "(code knocked-recover gekko)": [ + [19, "v1", "art-joint-anim"], + [48, "v1", "ragdoll-proc"] + ], + "(enter attack gekko)": [[30, "v1", "collide-shape-prim-group"]], + "(code hostile gekko)": [ + [22, "v1", "art-joint-anim"], + [75, "v1", "art-joint-anim"] + ], + "(code active gekko)": [ + [328, "v1", "art-joint-anim"], + [382, "v1", "art-joint-anim"], + [77, "v1", "art-joint-anim"] + ], + "(code jump-off-wall gekko)": [[14, "v1", "art-joint-anim"]], + "(post knocked-wall gekko)": [[3, "t9", "(function none)"]], + "(code turn-wall gekko)": [[46, "v1", "art-joint-anim"]], + "(code jump-off-wall-recover gekko)": [ + [13, "v1", "art-joint-anim"], + [71, "v1", "art-joint-anim"] + ], + "(method 50 gekko)": [ + [8, "v1", "collide-shape-prim-group"], + [12, "a0", "collide-shape-prim-group"], + [24, "v1", "collide-shape-prim-group"], + [35, "v1", "collide-shape-prim-group"], + [39, "a0", "collide-shape-prim-group"] + ], + "(method 59 gekko)": [ + [15, "a0", "process-focusable"], + [18, "a0", "process-focusable"] + ], + "(method 125 gekko)": [ + [15, "a0", "ragdoll-proc"], + [17, "a0", "ragdoll-proc"], + [28, "s5", "ragdoll-proc"], + [50, "s5", "ragdoll-proc"], + [11, "s5", "ragdoll-proc"], + [14, "s5", "ragdoll-proc"] + ], + "(method 86 gekko)": [ + [23, "a2", "art-joint-anim"], + [55, "a2", "art-joint-anim"], + [84, "a2", "art-joint-anim"] + ], + "(method 85 gekko)": [ + [19, "v1", "art-joint-anim"], + [47, "v1", "art-joint-anim"] + ], + "(method 108 gekko)": [[19, "v1", "process-focusable"]], + "(method 11 basebutton)": [["_stack_", 16, "res-tag"]], + "clmf-cam-string": [["_stack_", 16, "res-tag"]], + "(code knocked-recover grunt)": [ + [15, "v1", "ragdoll-proc"], + [40, "v1", "art-joint-anim"], + [69, "v1", "art-joint-anim"], + [130, "a0", "ragdoll-proc"], + [132, "a0", "ragdoll-proc"] + ], + "(trans wait-for-focus grunt)": [ + [13, "s5", "process-focusable"], + [40, "s5", "process-focusable"] + ], + "(code stop-chase grunt)": [[77, "gp", "art-joint-anim"]], + "(code pacing grunt)": [[145, "gp", "art-joint-anim"]], + "(code circling grunt)": [ + [260, "v1", "art-joint-anim"], + [308, "v1", "art-joint-anim"], + [153, "gp", "art-joint-anim"] + ], + "(code spin-attack grunt)": [ + [45, "gp", "art-joint-anim"], + [73, "a0", "process-focusable"], + [76, "a0", "process-focusable"] + ], + "(enter spin-attack grunt)": [ + [43, "gp", "process-focusable"], + [47, "a0", "process-focusable"], + [46, "gp", "process-focusable"] + ], + "(code attack grunt)": [ + [55, "gp", "art-joint-anim"], + [155, "a0", "grunt-global-info"] + ], + "(code hostile grunt)": [[122, "gp", "art-joint-anim"]], + "(code active grunt)": [ + [143, "gp", "art-joint-anim"], + [227, "gp", "art-joint-anim"], + [271, "gp", "art-joint-anim"], + [354, "v1", "art-joint-anim"], + [414, "v1", "art-joint-anim"] + ], + "(code falling-ambush grunt)": [[53, "v1", "art-joint-anim"]], + "setup-blerc-chains": [ + [43, "v1", "int"], + [80, "s0", "int"], + [83, "a0", "int"], + [[30, 40], "s1", "merc-fragment-control"], + [41, "v1", "merc-fragment"], + [46, "v1", "(pointer uint8)"], + [59, "a0", "merc-blend-ctrl"], + [[64, 76], "s1", "merc-fragment-control"], + [77, "a1", "merc-blend-ctrl"], + [106, "v1", "(pointer uint32)"], + [108, "v1", "(pointer uint32)"] + ], + "(method 26 battle)": [ + [35, "a0", "connection"], + [36, "a0", "collide-shape"], + [84, "a0", "connection"], + [85, "a0", "collide-shape"] + ], + "(method 30 battle)": [ + [7, "s5", "nav-enemy"], + [32, "a2", "nav-enemy"] + ], + "(method 51 battle)": [ + [38, "s4", "nav-enemy"], + [53, "s4", "nav-enemy"] + ], + "(method 28 battle)": [ + [21, "v0", "(pointer actor-group)"], + ["_stack_", 16, "res-tag"] + ], + "(method 29 battle)": [ + ["_stack_", 16, "res-tag"], + ["_stack_", 32, "res-tag"] + ], + "part-wascityb-bird1-path": [ + [13, "v1", "int"], + [90, "a0", "part-spawner"] + ], + "part-wascityb-bird2-path": [ + [13, "v1", "int"], + [86, "a0", "part-spawner"] + ], + "part-wascityb-bird3-path": [ + [13, "v1", "int"], + [90, "a0", "part-spawner"] + ], + "part-wascityb-bird4-path": [ + [13, "v1", "int"], + [90, "a0", "part-spawner"] + ], + "part-wascityb-bird5-path": [ + [13, "v1", "int"], + [86, "a0", "part-spawner"] + ], + "part-wascityb-bird6-path": [ + [13, "v1", "int"], + [90, "a0", "part-spawner"] + ], + "part-wascityb-bird7-path": [ + [13, "v1", "int"], + [86, "a0", "part-spawner"] + ], + "part-wascityb-bird8-path": [ + [13, "v1", "int"], + [90, "a0", "part-spawner"] + ], + "part-wascityb-bird9-path": [ + [13, "v1", "int"], + [90, "a0", "part-spawner"] + ], + "part-wascityb-bird10-path": [ + [13, "v1", "int"], + [86, "a0", "part-spawner"] + ], + "part-wascitya-fly1-path": [ + [13, "v1", "int"], + [90, "a0", "part-spawner"] + ], + "part-wascitya-fly2-path": [ + [13, "v1", "int"], + [86, "a0", "part-spawner"] + ], + "part-wascitya-fly3-path": [ + [13, "v1", "int"], + [90, "a0", "part-spawner"] + ], + "(event idle market-object)": [ + [[6, 10], "a1", "attack-info"], + [16, "a1", "attack-info"] + ], + "fruit-stand-event-handler": [ + [4, "gp", "attack-info"], + [32, "gp", "attack-info"] + ], + "fruit-check-ground-bounce": [ + [5, "v1", "fruit-stand"], + [[9, 40], "v1", "fruit-stand"], + [8, "a0", "fruit-stand"] + ], + "(event idle wascity-cactus)": [[[7, 17], "a1", "attack-info"]], + "wascity-cactus-callback": [ + [[9, 39], "s4", "wascity-cactus"], + [10, "s3", "int"], + [12, "s3", "int"], + [25, "s3", "int"], + [30, "s3", "int"], + [37, "s3", "int"] + ], + "(method 35 monk-npc)": [ + [23, "v1", "int"], + [23, "a0", "int"], + [27, "a0", "int"] + ], + "(method 37 monk-npc)": [ + [6, "v1", "int"], + [6, "a1", "int"], + [10, "a1", "int"] + ], + "(enter die market-object)": [ + [118, "v0", "(state symbol int market-object)"] + ], + "(method 50 dogat)": [ + [5, "v1", "collide-shape-prim-group"], + [18, "v1", "collide-shape-prim-group"] + ], + "(code active dogat)": [[14, "v1", "art-joint-anim"]], + "(code sit-idle dogat)": [ + [155, "v1", "art-joint-anim"], + [88, "v1", "art-joint-anim"], + [21, "v1", "art-joint-anim"] + ], + "(method 62 vehicle)": [[8, "v1", "collide-shape-prim-group"]], + "(method 115 vehicle)": [ + [19, "s4", "process-focusable"], + [26, "s4", "process-focusable"], + [31, "s4", "process-focusable"], + [44, "s4", "process-focusable"] + ], + "(trans fly-to-dest prebot-large-eco-creature)": [[300, "v1", "float"]], + "(event fly-to-dest prebot-large-eco-creature)": [ + [5, "v1", "attack-info"], + [10, "v1", "attack-info"], + [128, "s5", "vector"], + [129, "gp", "vector"], + [131, "gp", "vector"], + [132, "s5", "vector"], + [125, "v1", "float"], + [127, "v1", "float"], + [156, "gp", "vector"], + [157, "s5", "vector"], + [201, "s5", "vector"], + [205, "s5", "vector"], + [209, "s5", "vector"], + [214, "gp", "vector"] + ], + "(code victory prebot-large-eco-creature)": [[42, "v1", "art-joint-anim"]], + "(trans hostile prebot-large-eco-creature)": [ + [27, "a0", "process-focusable"], + [30, "a0", "process-focusable"] + ], + "(method 82 prebot-large-eco-creature)": [ + [10, "s4", "attack-info"], + [15, "s4", "attack-info"], + [63, "s4", "attack-info"], + [67, "s4", "attack-info"], + [71, "s4", "attack-info"] + ], + "large-eco-creature-split": [ + [83, "a0", "prebot-large-eco-creature"], + [86, "a0", "prebot-medium-eco-creature"], + [95, "a0", "prebot-medium-eco-creature"], + [97, "a0", "prebot-medium-eco-creature"], + [90, "a1", "prebot-medium-eco-creature"], + [93, "a0", "prebot-medium-eco-creature"], + [142, "a0", "prebot-medium-eco-creature"], + [145, "a0", "prebot-medium-eco-creature"], + [154, "a0", "prebot-medium-eco-creature"], + [156, "a0", "prebot-medium-eco-creature"], + [149, "a1", "prebot-medium-eco-creature"], + [152, "a0", "prebot-medium-eco-creature"], + [[77, 95], "v1", "(pointer prebot-medium-eco-creature)"], + [64, "v1", "(pointer prebot-medium-eco-creature)"], + [[123, 154], "v1", "(pointer prebot-medium-eco-creature)"] + ], + "prebot-eco-creature-joint-callback": [ + [1, "v1", "float"], + [[17, 27], "a2", "float"] + ], + "(code knocked-recover prebot-medium-eco-creature)": [ + [34, "gp", "art-joint-anim"], + [61, "v1", "ragdoll-proc"], + [102, "gp", "art-joint-anim"], + [166, "t9", "(function none)"] + ], + "prebot-tentacle-init-by-other": [[121, "a0", "prebot"]], + "prebot-gun-init-by-other": [[120, "a0", "prebot"]], + "prebot-sword-init-by-other": [ + [103, "a0", "prebot"], + [202, "s5", "weapon-trail-tracker"], + [205, "s5", "weapon-trail-tracker"] + ], + "prebot-eco-pillar-init-by-other": [[346, "v1", "float"]], + "(code impact prebot-gun-shot)": [[39, "a0", "process"]], + "(trans idle prebot-sword)": [[94, "a1", "prebot"]], + "(event idle prebot-sword)": [ + [67, "gp", "process-drawable"], + [76, "v1", "float"], + [88, "v1", "float"] + ], + "(method 11 cav-railblocker)": [ + [97, "v0", "(pointer actor-group)"], + ["_stack_", 16, "res-tag"] + ], + "(enter fall cav-railblocker)": [[74, "a0", "process"]], + "(event idle cav-railblocker)": [ + [29, "v1", "attack-info"], + [34, "v1", "attack-info"], + [43, "v1", "attack-info"], + [46, "v1", "attack-info"], + [49, "v1", "attack-info"], + [52, "v1", "attack-info"] + ], + "(method 30 cav-railblocker)": [[21, "v1", "float"]], + "prebot-spawn-shockwave": [[42, "v1", "process-drawable"]], + "prebot-handler": [[202, "a1", "vector"]], + "prebot-go-next-stage": [ + [27, "v0", "(pointer actor-group)"], + ["_stack_", 16, "res-tag"] + ], + "(trans play-hit-movie prebot)": [[86, "v0", "entity-actor"]], + "(trans destroy-pillars prebot)": [[241, "gp", "process-drawable"]], + "prebot-setup-shot-offsets": [ + [13, "v1", "float"], + [33, "v1", "float"], + [49, "v1", "float"] + ], + "prebot-fire-tentacle": [[21, "v1", "prebot-tentacle"]], + "(trans watch-critters prebot)": [[47, "a0", "process-drawable"]], + "prebot-launch-critter": [ + [27, "s3", "process-drawable"], + [67, "s3", "process-drawable"], + [112, "s3", "process-drawable"] + ], + "set-mined-filter!": [[12, "v1", "mined-states"]], + "update-mood-mined": [[[15, 45], "s5", "mined-states"]], + "(code attacking-0 tentacle)": [[14, "v1", "art-joint-anim"]], + "(code kill-player tentacle)": [[14, "v1", "art-joint-anim"]], + "(code stop-chase kg-grunt)": [[77, "gp", "art-joint-anim"]], + "(code pacing kg-grunt)": [[145, "gp", "art-joint-anim"]], + "(method 86 kg-grunt)": [[22, "v1", "art-joint-anim"]], + "(trans wait-for-focus kg-grunt)": [ + [13, "s5", "process-focusable"], + [40, "s5", "process-focusable"] + ], + "(method 85 kg-grunt)": [ + [87, "s4", "art-joint-anim"], + [233, "a1", "art-joint-anim"], + [323, "s4", "art-joint-anim"] + ], + "(code circling kg-grunt)": [ + [260, "v1", "art-joint-anim"], + [308, "v1", "art-joint-anim"], + [153, "gp", "art-joint-anim"] + ], + "(code spin-attack kg-grunt)": [ + [45, "gp", "art-joint-anim"], + [73, "a0", "process-focusable"], + [76, "a0", "process-focusable"] + ], + "(enter spin-attack kg-grunt)": [ + [43, "gp", "process-focusable"], + [46, "gp", "process-focusable"] + ], + "(code attack kg-grunt)": [ + [55, "gp", "art-joint-anim"], + [[150, 156], "a0", "kg-grunt-anim-info"] + ], + "(code hostile kg-grunt)": [[122, "gp", "art-joint-anim"]], + "(code active kg-grunt)": [ + [227, "gp", "art-joint-anim"], + [271, "gp", "art-joint-anim"], + [354, "v1", "art-joint-anim"], + [414, "v1", "art-joint-anim"], + [143, "gp", "art-joint-anim"] + ], + "(method 82 kg-grunt)": [[144, "v1", "rigid-body-impact"]], + "(code falling-ambush kg-grunt)": [[53, "v1", "art-joint-anim"]], + "(method 38 sew-laser-shot)": [ + [33, "a0", "process-focusable"], + [36, "a0", "process-focusable"] + ], + "(code idle sew-gas-step)": [[14, "v1", "art-joint-anim"]], + "(event idle jump-pad)": [[[18, 25], "v1", "attack-info"]], + "jump-pad-joint-fan": [[[4, 15], "gp", "jump-pad"]], + "(post fire jump-pad)": [[28, "t9", "(function none)"]], + "(code going-down sew-floor-switch)": [ + [26, "v1", "art-joint-anim"], + [83, "v0", "pair"] + ], + "(event idle-up sew-floor-switch)": [[4, "v1", "attack-info"]], + "sew-fan-joint-floor": [[[7, 12], "s1", "sew-fan"]], + "sew-fan-joint-fan": [[[3, 20], "v1", "sew-fan"]], + "(method 82 sew-fan)": [[[46, 63], "v1", "attack-info"]], + "(method 11 sew-wall-switch)": [["_stack_", 16, "res-tag"]], + "(method 11 sew-pipe)": [["_stack_", 16, "res-tag"]], + "(enter down sew-pipe)": [[13, "v1", "art-joint-anim"]], + "(code lower sew-pipe)": [[83, "v1", "art-joint-anim"]], + "(enter raised sew-m-gate)": [[13, "v1", "art-joint-anim"]], + "(code open sew-m-gate)": [[80, "v1", "art-joint-anim"]], + "(code open sew-gate)": [[15, "v1", "art-joint-anim"]], + "(event idle sew-wall-switch)": [[4, "v1", "attack-info"]], + "(code open sew-wall-switch)": [[10, "v1", "art-joint-anim"]], + "(code closing sew-fence-gate)": [[19, "v1", "art-joint-anim"]], + "(code opening sew-fence-gate)": [[18, "v1", "art-joint-anim"]], + "(code open sew-fence-gate)": [[10, "v1", "art-joint-anim"]], + "(code active sew-move-turret)": [[109, "v1", "art-joint-anim"]], + "(method 162 sew-laser-turret)": [ + [41, "v1", "process-focusable"], + [45, "v1", "process-focusable"], + [49, "v1", "process-focusable"] + ], + "(trans alert sew-laser-turret)": [ + [181, "a2", "process-focusable"], + [185, "a2", "process-focusable"], + [189, "a2", "process-focusable"] + ], + "check-enemy": [ + [19, "a0", "collide-shape-moving"], + [17, "a0", "collide-shape-moving"] + ], + "(code saberfish-sitting-on-land saberfish)": [[10, "v1", "art-joint-anim"]], + "(code saberfish-crawl-out-of-tube saberfish)": [ + [37, "v1", "art-joint-anim"] + ], + "(code stare-idle saberfish)": [[22, "v1", "art-joint-anim"]], + "(code attack saberfish)": [ + [17, "v1", "art-joint-anim"], + [190, "v1", "art-joint-anim"], + [130, "v1", "art-joint-anim"] + ], + "(code water-land saberfish)": [[16, "v1", "art-joint-anim"]], + "(code active saberfish)": [[40, "v1", "art-joint-anim"]], + "(code water-impact saberfish)": [[16, "v1", "art-joint-anim"]], + "(enter water-impact saberfish)": [[5, "t9", "(function none)"]], + "(code knocked-recover saberfish)": [ + [23, "v1", "ragdoll-proc"], + [43, "v1", "art-joint-anim"], + [83, "v1", "art-joint-anim"] + ], + "(code knocked-recover-water saberfish)": [ + [23, "v1", "ragdoll-proc"], + [49, "v1", "art-joint-anim"] + ], + "(method 50 saberfish)": [ + [5, "v1", "collide-shape-prim-group"], + [20, "v1", "collide-shape-prim-group"] + ], + "(code diving-into-water saberfish)": [ + [15, "gp", "art-joint-anim"], + [30, "gp", "art-joint-anim"] + ], + "(code transition-terrain-jump-from-water)": [[14, "v1", "art-joint-anim"]], + "(code transition-terrain-jump-from-land)": [[43, "v1", "art-joint-anim"]], + "saberfish-chase-post": [ + [13, "a0", "process-focusable"], + [16, "a0", "process-focusable"] + ], + "(trans hostile saberfish)": [ + [14, "a0", "process-focusable"], + [17, "a0", "process-focusable"] + ], + "(enter swimming-hostile saberfish)": [ + [8, "t9", "(function none)"], + [24, "a0", "process-focusable"], + [27, "a0", "process-focusable"] + ], + "turbo-swim": [[14, "v1", "art-joint-anim"]], + "(code transition-terrain-move-towards-initial-jump saberfish)": [ + [14, "t9", "(function none)"] + ], + "(method 241 saberfish)": [[11, "v1", "ragdoll-proc"]], + "(method 240 saberfish)": [ + [13, "s5", "ragdoll-proc"], + [19, "s5", "ragdoll-proc"], + [22, "s5", "ragdoll-proc"] + ], + "(method 125 saberfish)": [ + [14, "s5", "ragdoll-proc"], + [35, "s5", "ragdoll-proc"], + [57, "s5", "ragdoll-proc"] + ], + "(method 242 saberfish)": [[43, "a2", "ragdoll-proc"]], + "(trans swimming-hostile saberfish)": [ + [20, "s5", "process-focusable"], + [118, "a0", "process-focusable"], + [144, "v1", "float"] + ], + "(method 231 saberfish)": [ + ["_stack_", 72, "float"], + ["_stack_", 76, "float"], + ["_stack_", 84, "float"] + ], + "(method 97 saberfish)": [[20, "a1", "art-joint-anim"]], + "(method 96 saberfish)": [[16, "a1", "art-joint-anim"]], + "(method 98 saberfish)": [[22, "a1", "art-joint-anim"]], + "(method 237 saberfish)": [[21, "v0", "saberfish-spawner-query-msg"]], + "(method 238 saberfish)": [ + ["_stack_", 196, "float"], + ["_stack_", 252, "float"], + ["_stack_", 256, "float"], + ["_stack_", 528, "float"], + ["_stack_", 532, "float"] + ], + "(method 82 saberfish)": [[[8, 29], "s5", "saberfish-spawner-query-msg"]], + "(method 225 saberfish)": [[6, "v1", "vector"]], + "(method 220 saberfish)": [ + [17, "s4", "process-focusable"], + [21, "s4", "process-focusable"], + [26, "s4", "process-focusable"], + [45, "s4", "process-focusable"], + [48, "s4", "process-focusable"] + ], + "(method 216 saberfish)": [[154, "v1", "process-focusable"]], + "(method 214 saberfish)": [[18, "v1", "collide-shape-prim-group"]], + "(method 215 saberfish)": [ + [14, "a0", "process-focusable"], + [17, "a0", "process-focusable"] + ], + "(method 24 saberfish-spawner)": [["_stack_", 48, "float"]], + "(method 11 saberfish-spawner)": [ + [194, "v0", "vector"], + ["_stack_", 16, "res-tag"] + ], + "(method 11 saberfish-spawn-manager-base)": [["_stack_", 16, "res-tag"]], + "(method 26 saberfish-spawner)": [ + [[9, 49], "gp", "saberfish-spawner-query-msg"], + [[77, 85], "v1", "saberfish-spawner-command"], + [161, "v1", "saberfish-spawn-query"], + [[111, 164], "v1", "saberfish-spawn-query"], + [[105, 108], "v1", "saberfish-spawn-query"], + [[139, 149], "a2", "saberfish"] + ], + "saberfish-mgr-event-handler": [ + [[19, 28], "gp", "saberfish-spawner-query-msg"] + ], + "(method 97 kg-hopper)": [[16, "a1", "art-joint-anim"]], + "(method 96 kg-hopper)": [[16, "a1", "art-joint-anim"]], + "(method 98 kg-hopper)": [[16, "a1", "art-joint-anim"]], + "(method 85 kg-hopper)": [ + [33, "a1", "art-joint-anim"], + [86, "a1", "art-joint-anim"] + ], + "(method 86 kg-hopper)": [[27, "v1", "art-joint-anim"]], + "(trans hostile kg-hopper)": [ + [24, "gp", "process-focusable"], + [153, "gp", "process-focusable"], + [156, "gp", "process-focusable"] + ], + "set-sewg-electricity-scale!": [[[10, 14], "v1", "sewg-states"]], + "set-sewh-electricity-scale!": [[[12, 15], "v1", "sewh-states"]], + "update-mood-sewc": [[[17, 86], "gp", "sewc-states"]], + "update-mood-sewd": [[[17, 86], "gp", "sewd-states"]], + "update-mood-sewg": [[[17, 79], "gp", "sewg-states"]], + "update-mood-sewj": [[[17, 71], "gp", "sewj-states"]], + "update-mood-sewh": [[[17, 64], "gp", "sewh-states"]], + "(method 18 hfragment)": [["_stack_", 76, "float"]], + "(method 19 hfragment)": [[14, "a1", "hfrag-vertex"]], + "(code attack neo-juicer)": [ + [14, "v1", "art-joint-anim"], + [87, "v1", "art-joint-anim"], + [123, "s3", "process-focusable"], + [281, "a0", "process-focusable"], + [284, "a0", "process-focusable"] + ], + "(code victory neo-juicer)": [[31, "gp", "art-joint-anim"]], + "(code notice neo-juicer)": [ + [24, "a0", "process-focusable"], + [27, "a0", "process-focusable"], + [83, "a1", "art-joint-anim"] + ], + "(code active neo-juicer)": [ + [118, "gp", "art-joint-anim"], + [201, "a1", "art-joint-anim"] + ], + "(method 194 neo-juicer)": [ + [21, "s3", "process-focusable"], + [24, "s3", "process-focusable"] + ], + "neo-juicer-proj-move": [[15, "s5", "process-focusable"]], + "(method 38 neo-juicer-shot)": [ + [33, "a0", "process-focusable"], + [36, "a0", "process-focusable"] + ], + "(method 35 neo-juicer-shot)": [ + [7, "v1", "(inline-array vector)"], + [11, "v1", "(inline-array vector)"], + [16, "v1", "(inline-array vector)"], + [20, "v1", "(inline-array vector)"] + ], + "(post hostile neo-juicer)": [ + [13, "a0", "process-focusable"], + [16, "a0", "process-focusable"] + ], + "neo-juicer-face-player-post": [ + [29, "gp", "process-focusable"], + [66, "gp", "process-focusable"], + [69, "gp", "process-focusable"] + ], + "(code circling neo-juicer)": [ + [205, "gp", "art-joint-anim"], + [113, "gp", "art-joint-anim"] + ], + "(code hit neo-juicer)": [[30, "v1", "art-joint-anim"]], + "(code taunt neo-juicer)": [[84, "v1", "art-joint-anim"]], + "(code stare neo-juicer)": [[23, "gp", "art-joint-anim"]], + "(method 196 neo-juicer)": [[4, "v1", "collide-shape-prim-group"]], + "(method 85 neo-juicer)": [ + [37, "a1", "art-joint-anim"], + [113, "s5", "art-joint-anim"], + [153, "s4", "art-joint-anim"] + ], + "(method 86 neo-juicer)": [ + [18, "s4", "art-joint-anim"], + [66, "s4", "art-joint-anim"] + ], + "(code victory neo-grenadier)": [ + [27, "v1", "art-joint-anim"], + [76, "v1", "art-joint-anim"] + ], + "(code hit neo-grenadier)": [ + [87, "gp", "art-joint-anim"], + [208, "a0", "process-focusable"] + ], + "(post attack neo-grenadier)": [ + [22, "a0", "process-focusable"], + [25, "a0", "process-focusable"] + ], + "(method 78 neo-grenadier)": [[41, "a0", "process-focusable"]], + "(code attack neo-grenadier)": [ + [74, "v1", "art-joint-anim"], + [159, "v1", "art-joint-anim"], + [287, "a0", "process-focusable"], + [290, "a0", "process-focusable"], + [309, "v1", "art-joint-anim"], + [358, "v1", "art-joint-anim"] + ], + "(event attack neo-grenadier)": [ + [23, "s4", "process-focusable"], + [26, "s4", "process-focusable"], + [129, "v1", "metalhead-grenade-shot"] + ], + "(exit spin-kick neo-grenadier)": [[2, "v1", "collide-shape-prim-group"]], + "(post spin-kick neo-grenadier)": [ + [22, "a0", "process-focusable"], + [25, "a0", "process-focusable"] + ], + "(method 86 neo-grenadier)": [ + [18, "s4", "art-joint-anim"], + [64, "a1", "art-joint-anim"], + [94, "v1", "art-joint-anim"] + ], + "(method 85 neo-grenadier)": [ + [76, "s4", "art-joint-anim"], + [160, "s5", "art-joint-anim"] + ], + "(code spin-kick neo-grenadier)": [[14, "v1", "art-joint-anim"]], + "(enter spin-kick neo-grenadier)": [[23, "v1", "collide-shape-prim-group"]], + "(code backup neo-grenadier)": [[10, "v1", "art-joint-anim"]], + "(code hostile neo-grenadier)": [[45, "gp", "art-joint-anim"]], + "(trans hostile neo-grenadier)": [ + [19, "a0", "process-focusable"], + [22, "a0", "process-focusable"], + [156, "a0", "process-focusable"] + ], + "(code active neo-grenadier)": [ + [136, "v1", "art-joint-anim"], + [198, "v1", "art-joint-anim"], + [51, "v1", "art-joint-anim"], + [291, "v1", "art-joint-anim"] + ], + "(method 193 neo-grenadier)": [ + [20, "s5", "process-focusable"], + [78, "s5", "process-focusable"] + ], + "sewer-frog-turn-to-face": [ + [62, "v1", "art-joint-anim"], + [123, "v1", "art-joint-anim"], + [199, "v1", "art-joint-anim"], + [264, "v1", "art-joint-anim"] + ], + "sewer-frog-hop": [ + [63, "v1", "art-joint-anim"], + [153, "v1", "art-joint-anim"] + ], + "(code attack sewer-frog)": [ + [20, "v1", "art-joint-anim"], + [77, "a0", "collide-shape-prim-group"], + [101, "v1", "art-joint-anim"], + [160, "v1", "collide-shape-prim-group"], + [196, "v1", "art-joint-anim"] + ], + "(post knocked sewer-frog)": [ + [16, "v1", "ragdoll-proc"], + [19, "v1", "ragdoll-proc"], + [23, "v1", "ragdoll-proc"], + [31, "t9", "(function none)"] + ], + "(method 167 sewer-frog)": [ + [20, "a0", "process-focusable"], + [23, "a0", "process-focusable"] + ], + "(method 59 sewer-frog)": [ + [18, "a0", "process-focusable"], + [21, "a0", "process-focusable"] + ], + "(method 108 sewer-frog)": [[19, "v1", "process-focusable"]], + "(method 125 sewer-frog)": [ + [14, "a0", "ragdoll-proc"], + [16, "a0", "ragdoll-proc"] + ], + "(trans hostile spydroid-orig)": [ + [29, "a0", "process-focusable"], + [32, "a0", "process-focusable"] + ], + "(method 82 spydroid-orig)": [ + [65, "s0", "process-drawable"], + [90, "s0", "process-drawable"], + [113, "s0", "process-drawable"], + [208, "v1", "attack-info"], + [214, "v1", "attack-info"], + [239, "v1", "vector"], + [308, "v1", "rigid-body-impact"], + [34, "v0", "vector"] + ], + "(code close-attack roboguard)": [ + [30, "v1", "art-joint-anim"], + [58, "v1", "art-joint-anim"], + [144, "a0", "collide-shape-prim-group"], + [168, "v1", "art-joint-anim"], + [196, "v1", "art-joint-anim"], + [271, "v1", "art-joint-anim"], + [299, "v1", "art-joint-anim"], + [355, "v1", "collide-shape-prim-group"] + ], + "(post knocked roboguard)": [[30, "t9", "(function none)"]], + "(post knocked-recover roboguard)": [[30, "t9", "(function none)"]], + "(post die roboguard)": [[30, "t9", "(function none)"]], + "(code notice roboguard)": [ + [23, "v1", "art-joint-anim"], + [87, "v1", "art-joint-anim"] + ], + "roboguard-turret-code": [ + [75, "a1", "art-joint-anim"], + [168, "a1", "art-joint-anim"] + ], + "(method 86 roboguard)": [ + [24, "a2", "art-joint-anim"], + [53, "a2", "art-joint-anim"] + ], + "(method 82 roboguard)": [[109, "v1", "rigid-body-impact"]], + "(method 59 roboguard)": [[41, "s5", "process-focusable"]], + "(method 85 roboguard)": [ + [30, "v1", "art-joint-anim"], + [58, "v1", "art-joint-anim"] + ], + "(anon-function 1 roboguard)": [ + [[10, 16], "s3", "roboguard"], + [11, "s2", "int"], + [14, "s2", "int"] + ], + "(anon-function 2 roboguard)": [[[2, 79], "s3", "roboguard"]], + "(method 33 vehicle)": [[1, "a1", "rigid-body-vehicle-constants"]], + "(method 49 vehicle)": [ + [67, "s3", "attack-info"], + [86, "s3", "attack-info"], + [249, "v1", "float"], + [275, "v1", "float"] + ], + "(method 33 squad-control)": [[34, "s2", "process-focusable"]], + "(method 32 squad-control)": [ + [21, "a0", "process-focusable"], + [24, "a0", "process-focusable"] + ], + "(method 26 squad-control)": [ + [20, "s5", "process-focusable"], + [29, "s5", "process-focusable"], + [31, "s5", "process-focusable"] + ], + "(method 24 squad-control)": [ + [36, "s4", "process-focusable"], + [45, "s4", "process-focusable"], + [47, "s4", "process-focusable"] + ], + "(method 50 vehicle)": [ + [31, "s1", "process-focusable"], + [35, "a0", "process-focusable"], + [34, "s1", "process-focusable"] + ], + "(method 13 was-squad-control)": [ + [42, "v1", "process-focusable"], + [47, "v1", "process-focusable"], + [127, "s3", "process-focusable"], + [133, "s3", "process-focusable"], + [138, "s3", "process-focusable"], + [142, "s3", "process-focusable"], + [69, "v1", "process-focusable"], + [265, "a1", "process-focusable"], + [233, "v1", "process-focusable"] + ], + "(method 35 was-squad-control)": [ + [37, "s4", "process-focusable"], + [62, "s4", "process-focusable"], + [93, "s4", "process-focusable"], + [121, "s4", "process-drawable"], + [112, "s4", "process-drawable"] + ], + "(method 34 vehicle-wheel)": [[1, "a1", "vehicle-wheel-init-params"]], + "(method 38 wvehicle)": [ + [635, "v1", "vector"], + [637, "v1", "vector"], + [638, "v1", "vector"], + [540, "v1", "vector"], + [[542, 547], "v1", "vector"], + [452, "v1", "vector"], + [[454, 459], "v1", "vector"], + [[418, 426], "a2", "vector"], + [[394, 402], "a2", "vector"] + ], + "(method 33 wvehicle)": [[1, "a1", "rigid-body-vehicle-constants"]], + "(enter explode wvehicle)": [ + [233, "a0", "process"], + [328, "v1", "process-drawable"] + ], + "(enter explode-into-nothing wvehicle)": [[48, "a0", "process"]], + "(post sink wvehicle)": [[40, "a1", "process-drawable"]], + "(method 49 wvehicle)": [ + [34, "a1", "process-drawable"], + [173, "v1", "race-decision-point"], + [175, "v1", "race-decision-point"], + [203, "v1", "race-decision-point"], + [217, "v1", "race-decision-point"], + [493, "a0", "process"], + [513, "v1", "vector"], + [[525, 529], "v1", "wvehicle-ai-drop-off-params"], + [21, "v1", "float"], + [477, "v1", "float"] + ], + "(method 77 wvehicle)": [ + [179, "s4", "process-focusable"], + [186, "s4", "process-focusable"], + [194, "s4", "process-focusable"] + ], + "(method 165 wvehicle)": [ + [102, "s2", "process-focusable"], + [126, "s2", "process-focusable"], + [150, "s2", "process-focusable"], + [164, "s2", "process-focusable"] + ], + "(trans idle kill-player-process)": [ + [24, "gp", "process-focusable"], + [33, "gp", "process-focusable"] + ], + "cshape-reaction-scorp-shot": [[15, "v1", "v-scorp-shot"]], + "(method 78 wvehicle)": [ + [262, "s1", "process-focusable"], + [271, "s1", "process-focusable"], + [287, "s1", "process-focusable"], + [309, "s1", "process-focusable"], + [322, "s1", "process-focusable"], + [358, "v1", "collide-shape-prim-group"] + ], + "(method 97 wvehicle)": [ + [[509, 528], "s4", "wvehicle-physics-work"], + [[133, 139], "s0", "wvehicle-physics-work"], + [[157, 169], "s0", "wvehicle-physics-work"], + [18, "v1", "wvehicle-physics-work"], + [[160, 174], "s4", "wvehicle-physics-work"] + ], + "(method 162 wvehicle)": [[268, "a0", "uint"]], + "(method 96 vehicle)": [[14, "v1", "collide-shape-prim-group"]], + "(method 93 wvehicle)": [ + [297, "a0", "uint"], + [304, "a0", "uint"], + [440, "a0", "uint"], + [447, "a0", "uint"], + [479, "a0", "uint"] + ], + "(method 62 wcar-snake-base)": [ + [4, "s5", "collide-shape-prim-group"], + [10, "s5", "collide-shape-prim-group"], + [16, "s5", "collide-shape-prim-group"], + [[22, 48], "s5", "collide-shape-prim-group"] + ], + "(method 62 v-turtle)": [ + [4, "s5", "collide-shape-prim-group"], + [[10, 35], "s5", "collide-shape-prim-group"] + ], + "(method 14 squad-control)": [ + [6, "a2", "int"], + [13, "a2", "int"], + [20, "v1", "int"] + ], + "target-pilot-init": [ + [73, "s4", "vehicle"], + [80, "s4", "vehicle"], + [[84, 99], "s4", "vehicle"], + [117, "s4", "vehicle"], + [[122, 266], "s4", "vehicle"] + ], + "target-pilot-exit": [ + [85, "s5", "vehicle"], + [92, "s5", "vehicle"] + ], + "target-pilot-post": [ + [96, "s5", "vehicle"], + [106, "s5", "vehicle"], + [113, "s5", "vehicle"], + [290, "s5", "vehicle"], + [298, "s5", "vehicle"], + [303, "s5", "vehicle"] + ], + "target-pilot-handler": [ + [31, "a0", "vehicle"], + [35, "a0", "vehicle"], + [94, "a0", "process"], + [182, "a0", "process"] + ], + "(enter target-pilot-edge-grab)": [ + [42, "a0", "process-focusable"], + [45, "a0", "process-focusable"] + ], + "(code target-pilot-impact)": [ + [102, "v1", "art-joint-anim"], + [157, "v1", "art-joint-anim"], + [220, "v1", "art-joint-anim"], + [275, "v1", "art-joint-anim"], + [329, "v1", "art-joint-anim"], + [389, "v1", "art-joint-anim"], + [447, "v1", "art-joint-anim"], + [517, "v1", "art-joint-anim"], + [572, "v1", "art-joint-anim"], + [626, "v1", "art-joint-anim"], + [686, "v1", "art-joint-anim"], + [744, "v1", "art-joint-anim"] + ], + "(code target-pilot-daxter-perch)": [ + [16, "v1", "art-joint-anim"], + [130, "v1", "art-joint-anim"], + [69, "v1", "art-joint-anim"] + ], + "(code target-pilot-get-on)": [ + [79, "gp", "art-joint-anim"], + [187, "a1", "vehicle"] + ], + "(trans target-pilot-get-on)": [ + [28, "gp", "process-focusable"], + [36, "gp", "vehicle"], + [47, "gp", "vehicle"] + ], + "(event target-pilot-grab)": [[33, "a0", "process"]], + "target-pilot-signal-ready": [ + [20, "gp", "vehicle"], + [35, "gp", "vehicle"] + ], + "target-daxter-pilot-car-anim-loop": [[70, "v1", "art-joint-anim"]], + "target-pilot-trans": [[14, "a0", "vehicle"]], + "(method 14 race-mesh)": [ + [21, "v1", "race-mesh-slice"], + [26, "v1", "race-mesh-slice"] + ], + "(method 11 race-mesh)": [ + [5, "v1", "race-mesh-slice"], + [9, "v1", "race-mesh-slice"] + ], + "(method 12 race-mesh)": [[13, "v1", "race-mesh-slice"]], + "(method 15 race-mesh)": [[10, "v1", "race-mesh-slice"]], + "(method 17 race-mesh)": [[35, "s3", "race-mesh-hash-cell"]], + "(method 19 race-mesh)": [[12, "v1", "race-mesh-slice"]], + "(method 18 race-mesh)": [ + [15, "a2", "race-mesh-hash-search"], + [31, "v1", "race-mesh-hash-cell"], + [45, "a2", "int"] + ], + "(trans tracking tire-trail-tracker)": [ + [15, "v1", "process-drawable"], + [22, "v1", "process-drawable"] + ], + "(method 19 tire-trail)": [], + "vehicle-spawn": [[93, "gp", "vehicle"]], + "vehicle-spawn-hack": [[41, "gp", "vehicle"]], + "(method 11 w-parking-spot)": [[42, "v0", "vector"]], + "(method 21 w-parking-spot)": [ + [20, "s5", "vehicle"], + [22, "s5", "vehicle"] + ], + "(method 25 w-parking-spot)": [ + [13, "v1", "vehicle"], + [18, "v1", "vehicle"], + [27, "v1", "vehicle"] + ], + "(method 26 w-parking-spot)": [[15, "v1", "int"]], + "(method 62 v-snake)": [[[4, 48], "s5", "collide-shape-prim-group"]], + "(method 62 v-scorpion)": [[[4, 41], "s5", "collide-shape-prim-group"]], + "(method 62 v-toad)": [[[4, 41], "s5", "collide-shape-prim-group"]], + "(method 62 v-fox)": [[[4, 48], "s5", "collide-shape-prim-group"]], + "(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 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"]] } diff --git a/decompiler/config/jak3/ntsc_v1/var_names.jsonc b/decompiler/config/jak3/ntsc_v1/var_names.jsonc index 8394f6fe83..d967549873 100644 --- a/decompiler/config/jak3/ntsc_v1/var_names.jsonc +++ b/decompiler/config/jak3/ntsc_v1/var_names.jsonc @@ -1851,5 +1851,210 @@ "v1-161": "fade-enable", "f0-11": "dist-until-gone" } + }, + "fma-sphere-init-by-other": { + "args": ["fma-parms"] + }, + "(method 9 progress-list-level)": { + "vars": { + "s3-0": ["act", "game-task-node-flag"] + } + }, + "(method 4 progress-list-level)": { + "vars": { + "s4-0": ["act", "game-task-node-flag"] + } + }, + "level-find-borrow-slot": { + "args": ["borrower-level", "mode"], + "vars": { + "v1-0": "host-level-borrow-slot", + "a2-0": "host-level-candidate-idx", + "a3-3": "host-level-candidate", + "t0-7": "mode2", + "t0-10": "found-slot", + "t0-8": "host-level-slot-idx" + } + }, + "(method 24 com-airlock)": { + "args": ["this", "level-status"] + }, + "(method 29 com-airlock)": { + "args": ["this", "side"] + }, + "(method 23 com-airlock)": { + "vars": { + "s3-0": "tpos", + "f26-0": "target-dist", + "s4-0": "cmd" + } + }, + "(method 26 com-airlock)": { + "args": ["this", "arg1", "side"] + }, + "(method 9 proc-focusable-spawner)": { + "args": ["this", "count", "allocation"] + }, + "(method 15 proc-focusable-spawner)": { + "vars": { + "s5-0": "i", + "s4-0": "proc", + "a0-6": "pfoc", + "v1-8": "ii" + } + }, + "(method 119 enemy)": { + "vars": { + "a1-5": ["cspec", "collide-spec"] + } + }, + "(method 64 enemy)": { + "vars": { + "s3-2": ["aware", "enemy-aware"] + } + }, + "(method 146 enemy)": { + "vars": { + "gp-0": ["name", "sound-name"] + } + }, + "(method 82 enemy)": { + "args": ["this", "proc", "argc", "msg", "block"] + }, + "(method 11 process-taskable)": { + "args": ["this", "entity"] + }, + "debris-group-init-by-other": { + "args": ["tuning", "params", "pdraw"], + "vars": { + "s3-0": "i", + "s1-0": "debris", + "s2-0": "skel", + "v0-18": "draw", + "sv-48": "tuning-scale", + "s0-0": "joint-transform", + "sv-64": "debris-scale" + } + }, + "(method 15 debris-group)": { + "args": ["this", "idx"], + "vars": { + "s3-0": "cquery", + "v1-3": "debris-box", + "s5-0": "box-num", + "s4-0": "box-start", + "a0-1": "bbox", + "sv-96": "name", + "a1-13": "id", + "v1-7": "debris-start" + } + }, + "(trans idle debris-group)": { + "vars": { + "gp-0": "i", + "s5-0": "debris", + "s4-0": "draw-ctrl", + "gp-1": "ii", + "s5-1": "debris-box", + "s3-0": "box-num", + "s4-1": "box-start", + "s1-0": "bbox" + } + }, + "(method 16 debris-group)": { + "args": ["this", "idx"], + "vars": { + "s5-0": "debris-box", + "s4-0": "i", + "v1-7": "debris" + } + }, + "(enter burnt-husk gun-yellow-3-saucer)": { + "vars": { + "s5-0": ["name", "sound-name"] + } + }, + "reset-actors": { + "vars": { + "s5-0": ["perm", "entity-perm-status"] + } + }, + "(method 24 level-group)": { + "vars": { + "a0-9": ["enemy-option", "enemy-option"] + } + }, + "(code target-darkjak-running-attack)": { + "vars": { + "t1-2": ["name", "sound-name"] + } + }, + "(method 18 level)": { + "vars": { + "s5-0": "mem-mode", + "a0-31": "lev", + "sv-32": "mask", + "sv-20": "memory-unused?" + } + }, + "(method 119 nav-enemy)": { + "vars": { + "a1-13": ["cspec", "collide-spec"] + } + }, + "(method 216 saberfish)": { + "vars": { + "s4-1": ["s4-1", "saberfish-command"] + } + }, + "find-behavior<-in-water?": { + "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"] + } } } diff --git a/decompiler/data/StrFileReader.cpp b/decompiler/data/StrFileReader.cpp index e573be4c6b..016e809a34 100644 --- a/decompiler/data/StrFileReader.cpp +++ b/decompiler/data/StrFileReader.cpp @@ -188,6 +188,21 @@ FullName extract_name(const std::string& file_info_name) { } // namespace +std::string StrFileReader::get_chunk_art_name(int idx) const { + const auto& file_info_string = get_art_group_file_info_string(); + const auto& chunk = m_chunks.at(idx); + int offset; + if (find_string_in_data(chunk.data(), int(chunk.size()), file_info_string, &offset)) { + offset += file_info_string.length(); + } else { + ASSERT_MSG(false, fmt::format("did not find string '{}'", file_info_string)); + } + + // extract the name info as a "name" + "chunk id" + "-ag.go" format. + return extract_name(get_string_of_max_length((const char*)(chunk.data() + offset), 128)).name + + "-ag"; +} + /*! * Look inside the chunks to determine the source file name. * Does a lot of checking, might not work in future versions without some updating. diff --git a/decompiler/data/StrFileReader.h b/decompiler/data/StrFileReader.h index 496501748d..a3120828b8 100644 --- a/decompiler/data/StrFileReader.h +++ b/decompiler/data/StrFileReader.h @@ -19,6 +19,8 @@ class StrFileReader { explicit StrFileReader(const fs::path& file_path, GameVersion version); int chunk_count() const; const std::vector& get_chunk(int idx) const; + std::string get_chunk_art_name(int idx) const; + std::string get_full_name(const std::string& short_name) const; std::string get_texture_name() const; diff --git a/decompiler/data/TextureDB.h b/decompiler/data/TextureDB.h index 27ff9eaf25..05fe53b0c7 100644 --- a/decompiler/data/TextureDB.h +++ b/decompiler/data/TextureDB.h @@ -60,4 +60,11 @@ struct TextureDB { std::string generate_texture_dest_adjustment_table() const; }; + +// used by decompiler for texture macros +struct TexInfo { + std::string name; + std::string tpage_name; + u32 idx; +}; } // namespace decompiler diff --git a/decompiler/data/streamed_audio.cpp b/decompiler/data/streamed_audio.cpp index 2b640325b6..81294cb560 100644 --- a/decompiler/data/streamed_audio.cpp +++ b/decompiler/data/streamed_audio.cpp @@ -38,9 +38,9 @@ struct AudioDir { int entry_count() const { return entries.size(); } void debug_print() const { - for (auto& e : entries) { - // lg::debug("\"{}\" 0x{:07x} - 0x{:07x}", e.name, e.start_byte, e.end_byte); - } + // for (auto& e : entries) { + // lg::debug("\"{}\" 0x{:07x} - 0x{:07x}", e.name, e.start_byte, e.end_byte); + // } } }; diff --git a/decompiler/extractor/main.cpp b/decompiler/extractor/main.cpp index 18186b7240..cbb31c45b0 100644 --- a/decompiler/extractor/main.cpp +++ b/decompiler/extractor/main.cpp @@ -113,7 +113,7 @@ void decompile(const fs::path& iso_data_path, const std::string& data_subfolder) fmt::format("{}_config.jsonc", version_info.game_name), version_info.decomp_config_version); - std::vector dgos, objs, tex_strs; + std::vector dgos, objs, tex_strs, art_strs; // grab all DGOS we need (level + common) // TODO - Jak 2 - jak 1 specific code? @@ -141,8 +141,13 @@ void decompile(const fs::path& iso_data_path, const std::string& data_subfolder) tex_strs.push_back(iso_data_path / str_name); } + for (const auto& str_name : config.str_art_file_names) { + art_strs.push_back(iso_data_path / str_name); + } + // set up objects - ObjectFileDB db(dgos, fs::path(config.obj_file_name_map_file), objs, {}, tex_strs, config); + ObjectFileDB db(dgos, fs::path(config.obj_file_name_map_file), objs, {}, tex_strs, art_strs, + config); // save object files auto out_folder = file_util::get_jak_project_dir() / "decompiler_out" / data_subfolder; @@ -169,9 +174,10 @@ void decompile(const fs::path& iso_data_path, const std::string& data_subfolder) // textures decompiler::TextureDB tex_db; auto textures_out = out_folder / "textures"; + auto dump_out = out_folder / "import"; file_util::create_dir_if_needed(textures_out); file_util::write_text_file(textures_out / "tpage-dir.txt", - db.process_tpages(tex_db, textures_out, config)); + db.process_tpages(tex_db, textures_out, config, dump_out)); // texture merges // TODO - put all this stuff in somewhere common diff --git a/decompiler/level_extractor/extract_level.cpp b/decompiler/level_extractor/extract_level.cpp index 191f1a2d3f..f9a50ea247 100644 --- a/decompiler/level_extractor/extract_level.cpp +++ b/decompiler/level_extractor/extract_level.cpp @@ -92,7 +92,6 @@ tfrag3::Texture make_texture(u32 id, void add_all_textures_from_level(tfrag3::Level& lev, const std::string& level_name, const TextureDB& tex_db) { - ASSERT(lev.textures.empty()); const auto& level_it = tex_db.texture_ids_per_level.find(level_name); if (level_it != tex_db.texture_ids_per_level.end()) { for (auto id : level_it->second) { @@ -125,12 +124,14 @@ void extract_art_groups_from_level(const ObjectFileDB& db, const std::string& dgo_name, tfrag3::Level& level_data, std::map& art_group_data) { - const auto& files = db.obj_files_by_dgo.at(dgo_name); - for (const auto& file : files) { - if (file.name.length() > 3 && !file.name.compare(file.name.length() - 3, 3, "-ag")) { - const auto& ag_file = db.lookup_record(file); - extract_merc(ag_file, tex_db, db.dts, tex_remap, level_data, false, db.version()); - extract_joint_group(ag_file, db.dts, db.version(), art_group_data); + if (db.obj_files_by_dgo.count(dgo_name)) { + const auto& files = db.obj_files_by_dgo.at(dgo_name); + for (const auto& file : files) { + if (file.name.length() > 3 && !file.name.compare(file.name.length() - 3, 3, "-ag")) { + const auto& ag_file = db.lookup_record(file); + extract_merc(ag_file, tex_db, db.dts, tex_remap, level_data, false, db.version()); + extract_joint_group(ag_file, db.dts, db.version(), art_group_data); + } } } } @@ -281,6 +282,9 @@ void extract_common(const ObjectFileDB& db, add_all_textures_from_level(tfrag_level, dgo_name, tex_db); extract_art_groups_from_level(db, tex_db, {}, dgo_name, tfrag_level, art_group_data); + add_all_textures_from_level(tfrag_level, "ARTSPOOL", tex_db); + extract_art_groups_from_level(db, tex_db, {}, "ARTSPOOL", tfrag_level, art_group_data); + std::set textures_we_have; // put _all_ index textures in common. diff --git a/decompiler/level_extractor/extract_merc.cpp b/decompiler/level_extractor/extract_merc.cpp index aa15397284..37115056ca 100644 --- a/decompiler/level_extractor/extract_merc.cpp +++ b/decompiler/level_extractor/extract_merc.cpp @@ -228,8 +228,14 @@ void update_mode_from_alpha1(GsAlpha reg, DrawMode& mode) { reg.c_mode() == GsAlpha::BlendMode::ZERO_OR_FIXED && reg.d_mode() == GsAlpha::BlendMode::DEST) { // Cv = (Cs - Cd) * FIX + Cd - ASSERT(reg.fix() == 64); - mode.set_alpha_blend(DrawMode::AlphaBlend::SRC_DST_FIX_DST); + if (reg.fix() == 64) { + mode.set_alpha_blend(DrawMode::AlphaBlend::SRC_DST_FIX_DST); + } else if (reg.fix() == 128) { + // Cv = (Cs - Cd) + Cd = Cs... no blend. + mode.set_alpha_blend(DrawMode::AlphaBlend::SRC_SRC_SRC_SRC); + } else { + ASSERT_NOT_REACHED(); + } } else if (reg.a_mode() == GsAlpha::BlendMode::DEST && reg.b_mode() == GsAlpha::BlendMode::SOURCE && reg.c_mode() == GsAlpha::BlendMode::ZERO_OR_FIXED && @@ -760,9 +766,9 @@ s32 find_or_add_texture_to_level(tfrag3::Level& out, } // check eyes - u32 eye_tpage = version == GameVersion::Jak2 ? 0x70c : 0x1cf; - u32 left_id = version == GameVersion::Jak2 ? 7 : 0x6f; - u32 right_id = version == GameVersion::Jak2 ? 8 : 0x70; + u32 eye_tpage = PerGameVersion(0x1cf, 0x70c, 0x3)[version]; + u32 left_id = PerGameVersion(0x6f, 0x7, 0x2)[version]; + u32 right_id = PerGameVersion(0x70, 0x8, 0x3)[version]; if (eye_out && (pc_combo_tex_id >> 16) == eye_tpage) { auto tex_it = tex_db.textures.find(pc_combo_tex_id); diff --git a/decompiler/main.cpp b/decompiler/main.cpp index e056a68429..f0e4d7bfcd 100644 --- a/decompiler/main.cpp +++ b/decompiler/main.cpp @@ -132,7 +132,7 @@ int main(int argc, char** argv) { mem_log("After init: {} MB\n", get_peak_rss() / (1024 * 1024)); - std::vector dgos, objs, strs, tex_strs; + std::vector dgos, objs, strs, tex_strs, art_strs; for (const auto& dgo_name : config.dgo_names) { dgos.push_back(in_folder / dgo_name); } @@ -149,11 +149,16 @@ int main(int argc, char** argv) { tex_strs.push_back(in_folder / str_name); } + for (const auto& str_name : config.str_art_file_names) { + art_strs.push_back(in_folder / str_name); + } + mem_log("After config read: {} MB", get_peak_rss() / (1024 * 1024)); // build file database lg::info("Setting up object file DB..."); - ObjectFileDB db(dgos, fs::path(config.obj_file_name_map_file), objs, strs, tex_strs, config); + ObjectFileDB db(dgos, fs::path(config.obj_file_name_map_file), objs, strs, tex_strs, art_strs, + config); // Explicitly fail if a file in the 'allowed_objects' list wasn't found in the DB // as this is another silent error that can be confusing @@ -235,6 +240,10 @@ int main(int argc, char** argv) { return 1; } + if (config.process_tpages && !config.texture_info_dump.empty()) { + db.dts.textures = config.texture_info_dump; + } + // main decompile. if (config.decompile_code) { db.analyze_functions_ir2(out_folder, config, {}, {}, {}); @@ -284,16 +293,24 @@ int main(int argc, char** argv) { mem_log("After spool handling: {} MB", get_peak_rss() / (1024 * 1024)); - decompiler::TextureDB tex_db; + TextureDB tex_db; if (config.process_tpages || config.levels_extract) { auto textures_out = out_folder / "textures"; + auto dump_out = out_folder / "import"; file_util::create_dir_if_needed(textures_out); - auto result = db.process_tpages(tex_db, textures_out, config); + auto result = db.process_tpages(tex_db, textures_out, config, dump_out); if (!result.empty() && config.process_tpages) { file_util::write_text_file(textures_out / "tpage-dir.txt", result); file_util::write_text_file(textures_out / "tex-remap.txt", tex_db.generate_texture_dest_adjustment_table()); } + if (config.dump_tex_info) { + auto texture_file_name = out_folder / "dump" / "tex-info.min.json"; + nlohmann::json texture_json = db.dts.textures; + file_util::create_dir_if_needed_for_file(texture_file_name); + file_util::write_text_file(texture_file_name, texture_json.dump(-1)); + lg::info("[DUMP] Dumped texture info to {}", texture_file_name.string()); + } } mem_log("After textures: {} MB", get_peak_rss() / (1024 * 1024)); diff --git a/decompiler/util/DecompilerTypeSystem.cpp b/decompiler/util/DecompilerTypeSystem.cpp index 990a714542..0b9a701199 100644 --- a/decompiler/util/DecompilerTypeSystem.cpp +++ b/decompiler/util/DecompilerTypeSystem.cpp @@ -7,6 +7,7 @@ #include "common/type_system/defenum.h" #include "common/type_system/deftype.h" #include "common/util/string_util.h" +#include #include "decompiler/Disasm/Register.h" @@ -70,6 +71,26 @@ void DecompilerTypeSystem::parse_type_defs(const std::vector& file_ } symbol_metadata.definition_info = m_reader.db.get_short_info_for(o); add_symbol(sym_name.as_symbol().name_ptr, parse_typespec(&ts, sym_type), symbol_metadata); + } else if (car(o).as_symbol() == "def-event-handler") { + auto symbol_metadata = DefinitionMetadata(); + auto* rest = &cdr(o); + auto sym_name = car(*rest); + rest = &cdr(*rest); + // check for docstring + if (rest->is_pair() && car(*rest).is_string()) { + symbol_metadata.docstring = str_util::trim_newline_indents(car(*rest).as_string()->data); + rest = &cdr(*rest); + } + if (!cdr(*rest).is_empty_list()) { + throw std::runtime_error("malformed def-event-handler"); + } + auto behavior_tag = std::string(car(*rest).as_symbol().name_ptr); + std::vector signature = { + "function", "process", "int", "symbol", "event-message-block", + "object", ":behavior", behavior_tag}; + auto sym_type = pretty_print::build_list(signature); + symbol_metadata.definition_info = m_reader.db.get_short_info_for(o); + add_symbol(sym_name.as_symbol().name_ptr, parse_typespec(&ts, sym_type), symbol_metadata); } else if (car(o).as_symbol() == "deftype") { auto dtr = parse_deftype(cdr(o), &ts); dtr.type_info->m_metadata.definition_info = m_reader.db.get_short_info_for(o); diff --git a/decompiler/util/DecompilerTypeSystem.h b/decompiler/util/DecompilerTypeSystem.h index 60fd82f4f3..b57a5dbdd8 100644 --- a/decompiler/util/DecompilerTypeSystem.h +++ b/decompiler/util/DecompilerTypeSystem.h @@ -5,6 +5,7 @@ #include "common/type_system/TypeSystem.h" #include "decompiler/Disasm/Register.h" +#include "decompiler/data/TextureDB.h" namespace decompiler { class TP_Type; @@ -38,6 +39,7 @@ class DecompilerTypeSystem { format_ops_with_dynamic_string_by_func_name; std::unordered_map> art_group_info; std::unordered_map> jg_info; + std::unordered_map textures; void add_symbol(const std::string& name) { if (symbols.find(name) == symbols.end()) { diff --git a/decompiler/util/data_decompile.cpp b/decompiler/util/data_decompile.cpp index 54bab139b4..a44d719392 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,20 +976,50 @@ 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", {{"launcher", ArrayFieldDecompMeta(TypeSpec("sparticle-group-item"), 32)}}}, {"simple-sprite-system", {{"data", ArrayFieldDecompMeta(TypeSpec("sprite-glow-data"), 64)}}}, + {"actor-hash-bucket", + {{"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)}}}, + {"nav-enemy-info", + {{"idle-anim-script", ArrayFieldDecompMeta(TypeSpec("idle-control-frame"), 32)}}}, + {"vehicle-rider-info", + {{"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)}}}, }}}; goos::Object decompile_structure(const TypeSpec& type, @@ -1466,7 +1496,7 @@ goos::Object decompile_structure(const TypeSpec& type, } else if (word.kind() == LinkedWord::EMPTY_PTR) { field_defs_out.emplace_back(field.name(), pretty_print::to_symbol("'()")); } else if (word.kind() == LinkedWord::TYPE_PTR) { - if (field.type() != TypeSpec("type")) { + if (!ts.tc(field.type(), TypeSpec("type"))) { throw std::runtime_error( fmt::format("Field {} in type {} offset {} had a reference to type {}, but the " "type of the field is not type.", @@ -1530,6 +1560,11 @@ goos::Object bitfield_defs_print(const TypeSpec& type, result.push_back(pretty_print::to_symbol(fmt::format( ":{} {}", def.field_name, bitfield_defs_print(def.nested_field->field_type, def.nested_field->fields).print()))); + } else if (def.is_float) { + float f; + memcpy(&f, &def.value, 4); + result.push_back( + pretty_print::to_symbol(fmt::format(":{} {}", def.field_name, float_to_string(f, true)))); } else { result.push_back( pretty_print::to_symbol(fmt::format(":{} #x{:x}", def.field_name, def.value))); @@ -2073,9 +2108,10 @@ std::vector decompile_bitfield_from_int(const TypeSpec& typ return *try_decompile_bitfield_from_int(type, ts, value, true, {}); } -std::vector decompile_bitfield_enum_from_int(const TypeSpec& type, - const TypeSystem& ts, - u64 value) { +std::optional> try_decompile_bitfield_enum_from_int(const TypeSpec& type, + const TypeSystem& ts, + u64 value, + bool require_success) { u64 reconstructed = 0; std::vector result; auto type_info = ts.try_enum_lookup(type.base_type()); @@ -2111,10 +2147,14 @@ std::vector decompile_bitfield_enum_from_int(const TypeSpec& type, } if (reconstructed != value) { - throw std::runtime_error(fmt::format( - "Failed to decompile bitfield enum {}. Original value is 0x{:x} but we could only " - "make 0x{:x} using the available fields.", - type.print(), value, reconstructed)); + if (require_success) { + throw std::runtime_error(fmt::format( + "Failed to decompile bitfield enum {}. Original value is 0x{:x} but we could only " + "make 0x{:x} using the available fields.", + type.print(), value, reconstructed)); + } else { + return std::nullopt; + } } if (bit_count == (int)result.size()) { @@ -2132,6 +2172,14 @@ std::vector decompile_bitfield_enum_from_int(const TypeSpec& type, return result; } +std::vector decompile_bitfield_enum_from_int(const TypeSpec& type, + const TypeSystem& ts, + u64 value) { + auto ret = try_decompile_bitfield_enum_from_int(type, ts, value, true); + ASSERT(ret.has_value()); + return *ret; +} + std::string decompile_int_enum_from_int(const TypeSpec& type, const TypeSystem& ts, u64 value) { auto type_info = ts.try_enum_lookup(type.base_type()); ASSERT(type_info); diff --git a/decompiler/util/data_decompile.h b/decompiler/util/data_decompile.h index 8799ded631..6dd5eae820 100644 --- a/decompiler/util/data_decompile.h +++ b/decompiler/util/data_decompile.h @@ -107,7 +107,10 @@ T extract_bitfield(T input, int start_bit, int size) { std::vector decompile_bitfield_from_int(const TypeSpec& type, const TypeSystem& ts, u64 value); - +std::optional> try_decompile_bitfield_enum_from_int(const TypeSpec& type, + const TypeSystem& ts, + u64 value, + bool require_success); std::optional> try_decompile_bitfield_from_int( const TypeSpec& type, const TypeSystem& ts, diff --git a/decompiler/util/sparticle_decompile.cpp b/decompiler/util/sparticle_decompile.cpp index 0b31b2aae7..d70cc7515b 100644 --- a/decompiler/util/sparticle_decompile.cpp +++ b/decompiler/util/sparticle_decompile.cpp @@ -401,9 +401,22 @@ void assert_spec_flag_float(const std::vector& words, const std::str std::string decompile_sparticle_texture(const std::vector& words, const TypeSystem& ts, - const std::string& flag_name) { + const std::string& flag_name, + const Env& env) { assert_spec_flag_int_single_field(words, flag_name); + // try to use texture constants + auto textures = env.dts->textures; + auto combo_id = words.at(1).data; + u16 tpage = (combo_id & 0xfff00000) >> 20; + u16 idx = (combo_id & 0x000fff00) >> 8; + auto fixed_id = tpage << 16 | idx; + if (!textures.empty() && textures.find(fixed_id) != textures.end()) { + auto tex = textures.at(fixed_id); + return pretty_print::build_list(tex.name, tex.tpage_name).print(); + } + + // default to texture id if it fails const auto tex_id_type = TypeSpec("texture-id"); auto tex_id_str = bitfield_defs_print( tex_id_type, decompile_bitfield_from_int(tex_id_type, ts, words.at(1).data)); @@ -660,7 +673,8 @@ goos::Object decompile_sparticle_field_init(const std::vector +#include +#include + +namespace { +const std::unordered_map>> data = { + {2, {{1, 1}}}, + {4, {{66, 1}, {18, 2}, {177, 2}, {21, 1}, {88, 1}, {89, 2}, {172, 5}, {173, 6}, + {174, 7}, {168, 7}, {169, 8}, {170, 9}, {164, 9}, {165, 10}, {166, 11}, {140, 11}, + {161, 12}, {162, 13}, {131, 13}, {181, 1}, {182, 2}, {85, 1}, {185, 2}, {22, 1}, + {59, 1}, {63, 2}, {64, 3}, {25, 1}, {24, 1}, {61, 2}, {100, 1}, {134, 2}, + {130, 1}, {150, 1}, {148, 1}, {183, 2}, {184, 3}, {113, 1}, {154, 2}}}, + {5, {{4, 1}, {24, 1}, {30, 1}, {13, 1}, {14, 2}, {17, 1}, {2, 1}, {19, 2}}}, + {7, {{55, 1}, {25, 1}, {31, 2}, {129, 1}, {130, 2}, {127, 1}, {128, 2}, {90, 1}, {115, 2}, + {106, 1}, {123, 1}, {124, 2}, {98, 1}, {103, 2}, {105, 3}, {107, 4}, {110, 5}, {112, 6}, + {117, 7}, {92, 1}, {111, 2}, {119, 3}, {104, 1}, {108, 2}, {116, 3}, {109, 1}, {125, 1}, + {126, 2}, {97, 1}, {113, 2}, {118, 3}, {121, 1}, {122, 2}}}, + {10, {{4, 1}, {5, 2}, {9, 3}}}, + {11, + {{22, 1}, + {23, 2}, + {5, 1}, + {16, 2}, + {7, 1}, + {19, 2}, + {10, 1}, + {11, 2}, + {12, 3}, + {14, 1}, + {15, 2}, + {17, 3}, + {4, 1}}}, + {13, {{21, 1}, {23, 2}, {24, 3}, {46, 1}, {47, 2}, {39, 1}, {40, 2}}}, + {125, {{17, 1}, {18, 2}, {19, 3}, {23, 1}}}, + {127, + {{36, 1}, + {51, 1}, + {53, 2}, + {44, 1}, + {72, 1}, + {73, 3}, + {74, 4}, + {79, 3}, + {139, 1}, + {140, 2}, + {132, 1}, + {133, 2}, + {92, 1}}}, + {133, {{77, 1}, {74, 1}, {75, 2}, {55, 1}, {56, 2}, {57, 3}, {51, 1}}}, + {135, {{9, 1}, {11, 2}, {19, 1}, {13, 1}, {14, 2}, {20, 1}, {10, 1}, {4, 1}}}, + {136, + {{9, 1}, + {46, 1}, + {47, 2}, + {54, 3}, + {4, 1}, + {6, 2}, + {32, 1}, + {45, 1}, + {15, 1}, + {16, 1}, + {26, 2}, + {49, 1}, + {35, 1}, + {23, 1}, + {25, 2}, + {27, 3}}}, + {162, {{6, 1}}}, + {166, {{105, 1}, {103, 1}}}, + {170, {{9, 1}}}, + {174, {{103, 1}}}, + {179, {{3, 1}}}, + {180, {{52, 1}, {31, 1}, {7, 1}, {34, 1}, {36, 1}, {59, 1}, {48, 1}, {40, 1}, + {10, 1}, {45, 1}, {30, 1}, {3, 1}, {49, 1}, {12, 1}, {37, 1}, {58, 1}, + {54, 1}, {51, 1}, {41, 1}, {25, 1}, {21, 1}, {39, 1}}}, + {187, {{5, 1}}}, + {188, {{56, 1}, {47, 1}, {37, 1}, {15, 1}, {38, 1}, {78, 1}, {49, 1}, {34, 1}, + {40, 1}, {54, 1}, {29, 1}, {36, 1}, {50, 1}, {43, 1}, {39, 1}, {58, 1}, + {23, 1}, {55, 1}, {31, 1}, {27, 1}, {30, 1}, {24, 1}}}, + {224, + {{1, 1}, + {3, 2}, + {4, 3}, + {24, 1}, + {43, 1}, + {36, 1}, + {38, 2}, + {39, 1}, + {40, 2}, + {42, 3}, + {25, 1}, + {37, 2}, + {16, 1}, + {18, 1}, + {20, 1}, + {53, 1}}}, + {226, + {{30, 1}, + {77, 1}, + {78, 2}, + {18, 1}, + {43, 1}, + {53, 1}, + {62, 2}, + {63, 3}, + {1, 1}, + {3, 2}, + {9, 1}, + {7, 1}, + {45, 1}, + {41, 1}}}, + {244, {{1, 1}, {3, 2}, {4, 3}, {8, 1}}}, + {272, {{5, 1}, {7, 2}, {8, 3}}}, + {273, {{28, 1}, {29, 2}}}, + {274, {{27, 1}, {42, 2}, {44, 1}, {12, 1}, {20, 2}, {46, 3}, {60, 1}, {65, 1}, {15, 1}, + {97, 2}, {29, 1}, {40, 2}, {55, 3}, {21, 1}, {52, 1}, {13, 1}, {50, 1}, {39, 1}, + {48, 1}, {53, 1}, {30, 1}, {16, 1}, {37, 1}, {58, 1}, {62, 1}}}, + {318, + {{29, 1}, + {48, 1}, + {41, 1}, + {43, 2}, + {44, 1}, + {45, 2}, + {47, 3}, + {30, 1}, + {42, 2}, + {19, 1}, + {23, 1}, + {25, 1}}}, + {319, {{89, 1}, {93, 2}, {96, 1}, {97, 2}, {85, 1}, {84, 1}}}, + {325, + {{60, 1}, {117, 1}, {47, 1}, {14, 1}, {21, 2}, {57, 3}, {22, 1}, {37, 2}, {45, 3}, {20, 1}, + {40, 2}, {78, 3}, {82, 1}, {87, 2}, {46, 1}, {51, 2}, {55, 3}, {42, 1}, {56, 1}, {58, 2}, + {35, 1}, {52, 1}, {53, 2}, {23, 1}, {31, 2}, {32, 3}, {48, 1}, {49, 2}, {17, 1}, {18, 2}, + {43, 3}, {113, 1}, {38, 1}, {61, 2}, {12, 1}, {30, 2}, {84, 1}, {85, 2}, {86, 3}}}, + {405, + {{130, 1}, + {120, 1}, + {126, 2}, + {107, 1}, + {68, 1}, + {121, 1}, + {124, 1}, + {73, 1}, + {114, 1}, + {85, 1}, + {90, 2}, + {93, 3}, + {94, 4}, + {66, 1}, + {82, 1}, + {104, 1}, + {71, 1}}}, + {428, {{21, 1}, {28, 1}, {14, 1}, {26, 2}, {32, 1}, {35, 1}}}, + {446, {{3, 1}, {4, 2}, {5, 3}, {6, 5}, {7, 6}}}, + {536, + {{113, 1}, {171, 1}, {174, 2}, {188, 3}, {92, 1}, {89, 1}, {90, 2}, {91, 3}, {85, 1}, + {86, 2}, {93, 3}, {156, 1}, {132, 1}, {125, 1}, {127, 2}, {128, 1}, {129, 2}, {131, 3}, + {114, 1}, {126, 2}, {186, 1}, {187, 2}, {195, 3}, {183, 1}, {184, 2}, {185, 3}, {177, 1}, + {178, 2}, {191, 3}, {181, 1}, {189, 2}, {190, 3}, {167, 1}, {173, 2}, {168, 1}, {182, 2}, + {175, 1}, {180, 2}, {193, 1}, {194, 2}, {95, 1}, {96, 2}, {151, 1}, {145, 1}, {103, 1}, + {107, 1}, {51, 1}, {62, 1}, {61, 1}, {66, 1}, {55, 1}, {109, 1}, {52, 1}, {46, 1}}}, + {540, + {{41, 1}, {219, 1}, {210, 1}, {38, 1}, {39, 2}, {40, 3}, {34, 1}, {35, 2}, {42, 3}, + {86, 1}, {87, 2}, {82, 1}, {209, 1}, {211, 2}, {213, 3}, {212, 1}, {216, 2}, {217, 3}, + {205, 1}, {206, 2}, {208, 3}, {173, 1}, {174, 2}, {170, 1}, {171, 2}, {175, 3}, {215, 1}, + {203, 1}, {201, 1}, {202, 1}, {214, 2}, {68, 1}, {69, 2}, {70, 3}, {62, 1}, {65, 2}, + {66, 3}, {73, 1}, {74, 2}, {152, 3}, {44, 1}, {45, 2}, {25, 1}, {27, 2}, {29, 3}, + {15, 1}, {18, 2}, {21, 3}, {13, 1}, {19, 2}, {23, 3}, {11, 1}, {16, 2}, {17, 3}, + {8, 1}, {9, 2}, {12, 3}, {4, 1}, {20, 2}, {26, 3}, {10, 1}, {22, 2}, {28, 3}}}, + {544, {{81, 1}, {82, 2}, {96, 1}, {106, 2}, {119, 3}, {95, 1}, {100, 2}, {110, 3}, {99, 1}, + {109, 2}, {113, 3}, {117, 1}, {118, 2}, {120, 1}, {121, 2}, {34, 1}, {38, 2}, {36, 1}, + {39, 2}, {42, 3}, {107, 1}, {108, 2}, {112, 3}, {105, 1}, {115, 2}, {94, 1}, {102, 2}, + {93, 1}, {111, 2}, {75, 1}, {76, 2}, {71, 1}, {80, 2}, {65, 1}, {73, 2}, {74, 3}, + {69, 1}, {59, 1}, {84, 1}, {85, 2}, {86, 3}, {58, 1}, {60, 2}, {63, 3}, {67, 1}, + {70, 2}, {79, 3}, {25, 1}, {27, 2}, {28, 3}, {24, 1}, {26, 2}, {13, 1}, {14, 2}, + {17, 3}, {15, 1}, {16, 2}, {20, 3}, {21, 1}, {6, 1}, {9, 2}, {11, 1}, {18, 2}, + {19, 3}, {1, 1}, {4, 2}, {5, 3}}}, + {591, {{287, 1}, {288, 2}, {289, 3}, {290, 4}, {283, 1}, {284, 2}, {285, 3}, {279, 1}, {280, 2}, + {281, 3}, {275, 1}, {276, 2}, {277, 3}, {271, 1}, {272, 2}, {273, 3}, {266, 1}, {267, 2}, + {268, 3}, {269, 4}, {262, 1}, {263, 2}, {264, 3}, {258, 1}, {259, 2}, {260, 3}, {254, 1}, + {255, 2}, {256, 3}, {250, 1}, {251, 2}, {252, 3}, {245, 1}, {246, 2}, {247, 3}, {248, 4}, + {241, 1}, {242, 2}, {243, 3}, {237, 1}, {238, 2}, {239, 3}, {233, 1}, {234, 2}, {235, 3}, + {229, 1}, {230, 2}, {231, 3}, {224, 1}, {225, 2}, {226, 3}, {227, 4}, {220, 1}, {221, 2}, + {222, 3}, {216, 1}, {217, 2}, {218, 3}, {212, 1}, {213, 2}, {214, 3}, {208, 1}, {209, 2}, + {210, 3}, {204, 1}, {205, 2}, {206, 3}, {199, 1}, {200, 2}, {201, 3}, {202, 4}, {195, 1}, + {196, 2}, {197, 3}, {191, 1}, {192, 2}, {193, 3}, {187, 1}, {188, 2}, {189, 3}, {141, 1}, + {142, 2}, {143, 3}, {137, 1}, {138, 2}, {139, 3}, {133, 1}, {134, 2}, {135, 3}, {17, 1}, + {130, 2}, {131, 3}, {182, 1}, {183, 2}, {184, 3}, {185, 4}, {177, 1}, {178, 2}, {179, 3}, + {180, 4}, {170, 1}, {171, 2}, {172, 3}, {174, 4}, {175, 5}, {176, 6}, {166, 1}, {167, 2}, + {168, 3}, {161, 1}, {162, 2}, {163, 3}, {164, 4}, {157, 1}, {158, 2}, {159, 3}, {153, 1}, + {154, 2}, {155, 3}, {149, 1}, {150, 2}, {151, 3}, {145, 1}, {146, 2}, {147, 3}}}, + {593, {{29, 1}, {14, 1}, {24, 2}, {15, 1}, {23, 2}, {21, 1}}}, + {605, {{30, 1}, {19, 1}, {28, 2}, {17, 1}, {26, 2}, {25, 1}}}, + {632, {{82, 1}, {84, 2}, {28, 1}, {44, 1}, {68, 1}, {73, 1}, {76, 2}, + {79, 3}, {35, 1}, {42, 1}, {22, 1}, {29, 1}, {24, 1}, {37, 1}, + {55, 2}, {17, 1}, {18, 2}, {20, 3}, {63, 1}, {65, 1}, {43, 1}}}, + {633, {{5, 1}, {6, 2}, {19, 1}}}, + {646, {{4, 1}, {5, 2}, {6, 3}, {7, 5}, {8, 6}}}, + {647, {{28, 1}, {17, 1}, {30, 1}, {38, 1}, {9, 1}, {37, 2}, {21, 1}, {22, 2}, {27, 3}}}, + {736, {{17, 1}, {24, 1}, {21, 1}, {22, 2}, {30, 3}}}, + {740, {{13, 1}, {14, 1}, {29, 1}, {18, 1}, {28, 1}, {24, 1}}}, + {741, + {{3, 1}, {1, 1}, {4, 2}, {5, 3}, {18, 1}, {64, 1}, {15, 1}, {16, 2}, {17, 3}, {11, 1}, + {12, 2}, {19, 3}, {118, 1}, {83, 1}, {76, 1}, {78, 2}, {79, 1}, {80, 2}, {82, 3}, {65, 1}, + {77, 2}, {21, 1}, {22, 2}, {113, 1}, {107, 1}, {56, 1}, {58, 1}, {60, 1}}}, + {742, + {{67, 1}, + {54, 1}, + {27, 1}, + {77, 1}, + {79, 1}, + {34, 1}, + {22, 1}, + {25, 2}, + {41, 1}, + {40, 1}, + {60, 2}, + {39, 1}, + {47, 1}, + {46, 1}, + {83, 2}, + {36, 1}, + {82, 1}, + {42, 1}}}, + {744, {{27, 1}, {34, 1}, {68, 1}, {31, 1}, {8, 1}, {28, 2}, {33, 1}, + {38, 2}, {71, 1}, {64, 1}, {36, 1}, {51, 2}, {10, 1}, {20, 2}, + {37, 1}, {26, 1}, {67, 2}, {24, 1}, {69, 1}, {23, 1}, {63, 2}}}, + {746, {{13, 1}, {60, 1}, {35, 1}, {43, 1}, {28, 1}, {31, 2}, {33, 1}, + {46, 2}, {42, 1}, {7, 1}, {12, 2}, {49, 1}, {11, 1}, {75, 2}, + {27, 1}, {78, 1}, {76, 1}, {68, 1}, {70, 1}, {19, 1}, {80, 2}}}, + {747, {{13, 1}}}, + {748, + {{66, 1}, + {81, 1}, + {35, 1}, + {24, 1}, + {77, 1}, + {30, 1}, + {33, 2}, + {49, 1}, + {41, 1}, + {60, 1}, + {8, 1}, + {40, 2}, + {44, 1}, + {48, 1}, + {80, 2}, + {32, 1}, + {62, 1}, + {15, 1}, + {67, 2}}}, + {752, {{99, 1}, {80, 1}, {91, 1}}}, + {753, {{53, 1}, {43, 1}, {1, 1}, {3, 2}, {4, 3}, {5, 1}, {34, 1}, {14, 1}}}, + {754, {{76, 1}, {67, 1}, {1, 1}, {3, 2}, {4, 3}, {42, 1}}}, + {756, {{2, 1}, {4, 2}, {5, 3}, {44, 1}, {32, 1}, {38, 1}}}, + {757, + {{66, 1}, {54, 1}, {29, 1}, {40, 1}, {33, 1}, {48, 1}, {44, 1}, {20, 1}, {83, 1}, {81, 1}}}, + {759, {{1, 1}, {3, 2}, {4, 3}, {6, 1}}}, + {773, {{34, 1}, {29, 1}, {30, 2}, {35, 1}, {40, 1}}}, + {774, {{1, 1}, {3, 2}, {4, 3}}}, + {798, {{42, 1}, {35, 1}, {37, 2}, {34, 1}, {36, 2}, {32, 1}, {39, 2}, + {52, 1}, {15, 1}, {16, 2}, {21, 3}, {51, 1}, {53, 2}, {38, 1}, + {54, 2}, {48, 1}, {49, 2}, {50, 3}, {55, 1}, {47, 1}, {45, 1}}}, + {820, + {{14, 1}, {18, 2}, {33, 1}, {34, 2}, {22, 1}, {17, 1}, {19, 2}, {23, 3}, {9, 1}, {11, 1}, + {12, 2}, {8, 1}, {4, 1}, {7, 2}, {10, 1}, {20, 2}, {21, 3}, {26, 1}, {27, 2}, {28, 3}}}, + {841, + {{27, 1}, + {48, 1}, + {73, 1}, + {46, 1}, + {19, 1}, + {29, 1}, + {1, 1}, + {87, 1}, + {38, 1}, + {30, 1}, + {34, 1}, + {35, 2}, + {36, 3}, + {51, 1}, + {52, 2}, + {63, 1}}}, + {843, {{2, 1}, {3, 2}}}, + {844, {{5, 1}}}, + {869, {{100, 1}, {102, 2}, {103, 3}}}, + {871, {{9, 1}, {10, 2}, {11, 3}, {12, 1}, {5, 1}, {6, 2}, {13, 3}, {15, 1}, {16, 2}}}, + {872, + {{31, 1}, {33, 2}, {25, 1}, {26, 2}, {19, 1}, {30, 2}, {13, 1}, {23, 2}, {24, 3}, {17, 1}, + {7, 1}, {20, 1}, {22, 2}, {32, 3}, {6, 1}, {8, 2}, {11, 3}, {15, 1}, {18, 2}, {29, 3}}}, + {873, {{22, 1}, {19, 1}}}, + {874, {{73, 1}, {78, 1}, {72, 1}, {47, 1}, {48, 2}, {49, 3}, {45, 1}, {50, 2}, {51, 3}, {40, 1}, + {41, 2}, {42, 3}, {59, 1}, {63, 2}, {86, 1}, {99, 2}, {92, 1}, {93, 2}, {98, 3}, {95, 1}, + {96, 2}, {97, 3}, {89, 1}, {94, 2}, {69, 1}, {74, 2}, {71, 1}, {75, 2}, {76, 3}, {61, 1}, + {65, 2}, {60, 1}, {62, 2}, {64, 3}, {54, 1}, {55, 2}, {56, 3}}}, + {895, {{89, 4}, {90, 5}, {91, 6}, {85, 6}, {86, 7}, {87, 8}, {81, 8}, {82, 9}, + {83, 11}, {77, 11}, {78, 12}, {79, 13}, {94, 5}, {95, 6}, {96, 7}, {98, 1}, + {99, 2}, {100, 3}, {75, 3}, {71, 3}, {72, 4}, {73, 5}, {9, 1}, {11, 2}}}, + {924, {{9, 1}, {10, 2}, {13, 3}, {37, 4}, {41, 1}, {44, 2}, {34, 1}, + {14, 1}, {15, 1}, {38, 2}, {24, 1}, {26, 2}, {25, 1}, {27, 2}, + {28, 3}, {30, 4}, {40, 1}, {42, 2}, {2, 1}, {45, 2}, {46, 3}}}, + {925, {{87, 1}, {89, 2}, {94, 3}, {88, 1}, {95, 2}, {96, 3}, {91, 1}, {93, 2}, {83, 1}, + {86, 2}, {92, 3}, {35, 1}, {108, 1}, {32, 1}, {33, 2}, {34, 3}, {28, 1}, {29, 2}, + {36, 3}, {140, 1}, {141, 2}, {136, 1}, {127, 1}, {120, 1}, {122, 2}, {123, 1}, {124, 2}, + {126, 3}, {109, 1}, {121, 2}, {38, 1}, {39, 2}, {100, 1}, {102, 1}, {104, 1}}}, + {926, {{21, 1}, {32, 2}, {27, 1}, {28, 2}, {29, 3}, {40, 4}, {48, 5}, {30, 1}, {42, 2}, {39, 1}, + {50, 1}, {45, 1}, {56, 2}, {35, 1}, {37, 1}, {41, 2}, {46, 3}, {6, 1}, {47, 2}, {17, 1}, + {18, 2}, {22, 3}, {4, 1}, {14, 2}, {15, 3}, {20, 4}, {44, 5}, {19, 1}, {26, 2}}}, + {928, + {{18, 1}, + {14, 1}, + {20, 2}, + {21, 3}, + {22, 4}, + {27, 5}, + {23, 1}, + {44, 2}, + {46, 1}, + {17, 1}, + {34, 2}, + {13, 1}, + {19, 2}}}, + {929, + {{68, 1}, + {70, 2}, + {75, 3}, + {69, 1}, + {76, 2}, + {77, 3}, + {72, 1}, + {74, 2}, + {64, 1}, + {67, 2}, + {73, 3}, + {46, 1}, + {47, 2}, + {48, 1}, + {54, 1}, + {23, 1}, + {49, 2}, + {45, 1}}}, + {930, {{37, 1}, {6, 1}, {8, 2}, {14, 3}, {18, 4}, {46, 5}, {19, 1}, {22, 2}, {45, 1}, + {31, 1}, {48, 2}, {53, 3}, {32, 1}, {39, 1}, {49, 1}, {83, 2}, {11, 1}, {17, 2}, + {27, 3}, {12, 1}, {13, 2}, {26, 3}, {36, 1}, {38, 2}, {77, 3}, {16, 1}, {59, 2}, + {61, 3}, {80, 4}, {23, 1}, {29, 2}, {30, 3}, {68, 1}, {65, 1}, {66, 2}, {69, 1}}}, + {931, + {{23, 1}, + {10, 1}, + {12, 2}, + {16, 3}, + {21, 4}, + {24, 5}, + {11, 1}, + {29, 1}, + {15, 1}, + {17, 2}, + {19, 1}, + {20, 2}, + {22, 3}}}, + {932, {{74, 1}, {67, 1}, {62, 1}, {14, 1}, {30, 1}, {85, 1}, {86, 2}, {81, 1}}}, + {947, + {{41, 1}, + {42, 2}, + {43, 3}, + {37, 1}, + {38, 2}, + {39, 3}, + {33, 1}, + {34, 2}, + {35, 3}, + {29, 1}, + {30, 2}, + {31, 3}}}, + {948, {{15, 1}, {16, 2}, {17, 3}, {3, 1}}}, + {949, {{7, 1}, {8, 2}, {5, 1}}}, + {950, {{7, 1}, {22, 1}, {21, 1}, {26, 1}, {11, 1}, {8, 1}, {2, 1}}}, + {956, {{25, 1}, {26, 2}, {18, 1}, {19, 2}, {21, 3}, {22, 1}, {23, 2}, {24, 3}, {30, 1}, + {36, 1}, {37, 2}, {38, 3}, {8, 1}, {42, 1}, {43, 2}, {14, 1}, {31, 2}, {11, 3}, + {29, 4}, {40, 4}, {32, 5}, {33, 6}, {34, 7}, {27, 4}, {3, 1}}}, + {957, + {{14, 1}, + {18, 2}, + {22, 1}, + {17, 1}, + {19, 2}, + {23, 3}, + {9, 1}, + {11, 1}, + {12, 2}, + {8, 1}, + {4, 1}, + {7, 2}, + {10, 1}, + {20, 2}, + {21, 3}, + {26, 1}, + {27, 2}, + {28, 3}}}, + {958, {{5, 1}}}, + {976, {{1, 1}, {2, 2}, {3, 3}, {4, 4}}}, + {989, {{4, 1}, {11, 2}, {15, 1}, {16, 1}, {7, 1}}}, + {1023, + {{33, 1}, {34, 3}, {35, 4}, {29, 3}, {30, 4}, {31, 5}, {19, 1}, {20, 2}, {21, 3}, {14, 4}, + {15, 5}, {16, 6}, {10, 6}, {11, 7}, {12, 8}, {6, 8}, {7, 9}, {8, 10}, {2, 10}, {3, 11}, + {4, 12}, {23, 1}, {24, 2}, {25, 3}, {44, 3}, {40, 3}, {41, 4}, {42, 5}, {37, 5}, {38, 6}}}, + {1026, {{43, 1}, {10, 1}, {35, 1}, {33, 1}, {23, 1}, {24, 2}, {21, 1}, {14, 1}, {12, 1}}}, + {1035, + {{34, 1}, {35, 3}, {36, 4}, {30, 3}, {31, 4}, {32, 5}, {20, 1}, {21, 2}, {22, 3}, {16, 5}, + {17, 6}, {18, 7}, {12, 7}, {13, 8}, {14, 9}, {8, 9}, {9, 10}, {10, 11}, {4, 11}, {5, 12}, + {6, 13}, {24, 1}, {25, 2}, {26, 3}, {44, 3}, {40, 3}, {41, 4}, {42, 5}, {38, 5}}}, + {1037, {{3, 1}, {4, 2}, {5, 3}, {6, 4}}}, + {1085, {{47, 1}, {48, 2}, {50, 3}, {30, 1}, {55, 2}, {33, 1}, {43, 1}, {49, 2}, {51, 3}}}, + {1086, {{7, 1}, {8, 2}, {3, 1}}}, + {1087, + {{31, 1}, {33, 2}, {25, 1}, {26, 2}, {19, 1}, {30, 2}, {13, 1}, {23, 2}, {24, 3}, {17, 1}, + {7, 1}, {20, 1}, {22, 2}, {32, 3}, {6, 1}, {8, 2}, {11, 3}, {15, 1}, {18, 2}, {29, 3}}}, + {1088, + {{60, 1}, {62, 2}, {14, 1}, {23, 1}, {24, 2}, {20, 1}, {21, 2}, {25, 3}, {15, 1}, {16, 2}, + {26, 1}, {27, 2}, {28, 3}, {7, 1}, {29, 2}, {5, 1}, {18, 2}, {10, 1}, {11, 2}, {54, 1}, + {55, 2}, {48, 1}, {59, 2}, {42, 1}, {52, 2}, {53, 3}, {46, 1}, {36, 1}, {49, 1}, {51, 2}, + {61, 3}, {35, 1}, {37, 2}, {40, 3}, {44, 1}, {47, 2}, {58, 3}}}, + {1090, {{73, 1}, {80, 2}, {76, 1}}}, + {1092, {{7, 1}, {8, 2}, {3, 1}}}, + {1093, {{45, 1}, {46, 2}, {54, 3}, {48, 1}, {31, 1}, {33, 2}, {50, 1}, {51, 2}, {53, 3}, + {55, 1}, {56, 2}, {43, 1}, {47, 1}, {37, 1}, {38, 2}, {40, 3}, {25, 1}, {26, 2}, + {19, 1}, {30, 2}, {13, 1}, {23, 2}, {24, 3}, {17, 1}, {7, 1}, {20, 1}, {22, 2}, + {32, 3}, {6, 1}, {8, 2}, {11, 3}, {15, 1}, {18, 2}, {29, 3}}}, + {1121, + {{53, 1}, + {44, 1}, + {67, 1}, + {41, 1}, + {56, 1}, + {45, 1}, + {64, 1}, + {18, 1}, + {8, 1}, + {27, 1}, + {20, 1}, + {39, 1}}}, + {1123, + {{13, 1}, {42, 1}, {67, 2}, {75, 1}, {71, 1}, {48, 1}, {50, 1}, {15, 1}, {60, 2}, {59, 1}, + {58, 1}, {68, 1}, {35, 1}, {73, 1}, {66, 1}, {2, 1}, {70, 2}, {6, 1}, {24, 2}, {72, 3}}}, + {1124, {{11, 1}}}, + {1125, {{39, 1}, {53, 1}, {48, 1}, {71, 1}, {74, 2}, {26, 1}, {59, 1}, {28, 1}, {49, 2}, + {77, 3}, {78, 4}, {44, 1}, {79, 1}, {58, 1}, {75, 1}, {25, 1}, {57, 2}, {66, 1}, + {61, 1}, {69, 1}, {33, 1}, {76, 2}, {70, 1}, {1, 1}, {11, 1}, {21, 2}, {72, 3}}}, + {1127, {{36, 1}, {42, 1}, {74, 1}, {31, 1}, {41, 1}, {18, 1}, {53, 2}, {25, 1}, {40, 2}, + {23, 1}, {61, 2}, {58, 1}, {19, 1}, {26, 2}, {67, 1}, {70, 1}, {48, 1}, {12, 1}, + {73, 1}, {71, 1}, {59, 1}, {34, 1}, {28, 1}, {39, 2}, {75, 3}}}, + {1130, {{3, 1}, {5, 2}, {6, 3}, {61, 1}, {1, 1}}}, + {1132, {{55, 1}, {46, 1}, {51, 1}}}, + {1133, {{16, 1}, {14, 1}, {17, 2}, {18, 3}, {77, 1}, {2, 1}, {36, 1}}}, + {1135, + {{53, 1}, + {45, 1}, + {47, 1}, + {41, 1}, + {27, 1}, + {59, 1}, + {65, 2}, + {64, 1}, + {74, 1}, + {34, 1}, + {54, 1}, + {50, 1}, + {52, 1}, + {70, 2}}}, + {1137, {{1, 1}, {3, 2}, {4, 3}, {5, 1}, {24, 1}, {16, 1}, {10, 1}}}, + {1138, {{21, 1}, {78, 1}, {59, 1}, {69, 1}, {50, 1}, {30, 1}, {46, 2}, {7, 1}, {23, 2}, + {76, 3}, {75, 1}, {33, 1}, {74, 1}, {5, 1}, {20, 2}, {60, 1}, {19, 1}, {77, 2}, + {44, 1}, {72, 2}, {70, 1}, {71, 1}, {51, 1}, {39, 1}, {4, 1}, {58, 2}, {79, 3}}}, + {1141, {{1, 1}, {3, 2}, {4, 3}}}, + {1143, {{53, 1}, {45, 1}, {47, 1}, {41, 1}, {37, 1}, {42, 2}, {27, 1}, {63, 2}, + {79, 3}, {78, 1}, {59, 1}, {65, 2}, {77, 1}, {64, 1}, {73, 1}, {75, 1}, + {80, 2}, {34, 1}, {81, 2}, {54, 1}, {50, 1}, {70, 1}}}, + {1145, {{1, 1}, {3, 2}, {4, 3}, {5, 1}}}, + {1153, + {{14, 1}, + {23, 1}, + {24, 2}, + {20, 1}, + {21, 2}, + {25, 3}, + {15, 1}, + {16, 2}, + {26, 1}, + {27, 2}, + {28, 3}, + {7, 1}, + {29, 2}, + {5, 1}, + {18, 2}, + {10, 1}, + {11, 2}}}, + {1156, {{9, 1}, {10, 2}, {11, 3}, {12, 1}, {5, 1}, {6, 2}, {13, 3}, {15, 1}, {16, 2}, + {50, 1}, {70, 1}, {58, 1}, {59, 2}, {63, 3}, {67, 1}, {68, 2}, {57, 1}, {60, 2}, + {61, 1}, {64, 3}, {65, 4}, {93, 1}, {77, 1}, {78, 2}, {73, 1}, {112, 1}, {105, 1}, + {107, 2}, {108, 1}, {109, 2}, {111, 3}, {94, 1}, {106, 2}, {85, 1}, {87, 1}, {89, 1}}}, + {1158, + {{5, 1}, + {62, 1}, + {59, 1}, + {52, 1}, + {48, 1}, + {46, 1}, + {43, 1}, + {34, 1}, + {32, 1}, + {23, 1}, + {18, 1}, + {19, 2}, + {13, 1}, + {1, 1}}}, + {1163, {{4, 1}, {8, 2}, {6, 1}, {9, 2}, {12, 3}}}, + {1165, + {{50, 2}, {4, 1}, {8, 2}, {6, 1}, {9, 2}, {12, 3}, {43, 1}, {47, 2}, {51, 3}, {40, 1}, + {41, 2}, {48, 3}, {35, 1}, {33, 1}, {38, 1}, {39, 2}, {44, 3}, {29, 1}, {45, 2}, {49, 3}}}, + {1167, {{12, 1}, {85, 1}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, {6, 2}, + {13, 3}, {104, 1}, {97, 1}, {99, 2}, {100, 1}, {101, 2}, {103, 3}, + {86, 1}, {98, 2}, {15, 1}, {16, 2}, {77, 1}, {79, 1}, {81, 1}}}, + {1211, {{131, 1}, {140, 2}, {154, 3}, {152, 1}, {158, 2}, {157, 1}, {159, 2}, {161, 3}, + {126, 1}, {127, 2}, {128, 3}, {124, 1}, {147, 2}, {150, 3}, {141, 1}, {142, 2}, + {156, 3}, {144, 1}, {145, 2}, {153, 3}, {133, 1}, {134, 2}, {162, 3}, {121, 1}, + {122, 2}, {143, 3}, {136, 1}, {148, 2}, {155, 3}, {135, 1}, {138, 2}, {151, 3}, + {132, 1}, {149, 2}, {160, 3}, {12, 1}, {84, 1}, {9, 1}, {10, 2}, {11, 3}, + {5, 1}, {6, 2}, {13, 3}, {103, 1}, {96, 1}, {98, 2}, {99, 1}, {100, 2}, + {102, 3}, {85, 1}, {97, 2}, {15, 1}, {16, 2}, {74, 1}, {78, 1}, {80, 1}}}, + {1213, {{16, 1}, {18, 1}, {20, 1}, {23, 1}, {25, 2}}}, + {1222, + {{25, 1}, {27, 2}, {28, 3}, {24, 1}, {26, 2}, {13, 1}, {14, 2}, {17, 3}, {15, 1}, {16, 2}, + {20, 3}, {21, 1}, {6, 1}, {9, 2}, {11, 1}, {18, 2}, {19, 3}, {1, 1}, {4, 2}, {5, 3}}}, + {1244, {{18, 1}, {4, 1}}}, + {1245, {{9, 1}, {10, 2}, {11, 3}, {12, 1}, {94, 1}, {5, 1}, {6, 2}, {13, 3}, {53, 1}, + {54, 2}, {49, 1}, {113, 1}, {106, 1}, {108, 2}, {109, 1}, {110, 2}, {112, 3}, {95, 1}, + {107, 2}, {39, 1}, {40, 2}, {41, 3}, {33, 1}, {36, 2}, {37, 3}, {24, 1}, {44, 2}, + {45, 3}, {58, 1}, {59, 2}, {15, 1}, {16, 2}, {86, 1}, {88, 1}, {90, 1}}}, + {1246, {{73, 1}, {74, 2}, {82, 3}, {76, 1}, {31, 1}, {33, 2}, {46, 1}, {55, 1}, {56, 2}, + {52, 1}, {53, 2}, {57, 3}, {47, 1}, {48, 2}, {58, 1}, {59, 2}, {60, 3}, {39, 1}, + {61, 2}, {37, 1}, {50, 2}, {42, 1}, {43, 2}, {78, 1}, {79, 2}, {81, 3}, {83, 1}, + {84, 2}, {71, 1}, {75, 1}, {65, 1}, {66, 2}, {68, 3}, {25, 1}, {26, 2}, {19, 1}, + {30, 2}, {13, 1}, {23, 2}, {24, 3}, {17, 1}, {7, 1}, {20, 1}, {22, 2}, {32, 3}, + {6, 1}, {8, 2}, {11, 3}, {15, 1}, {18, 2}, {29, 3}}}, + {1247, {{69, 1}, {78, 1}, {68, 1}, {70, 2}, {72, 3}, {71, 1}, {75, 2}, {76, 3}, {64, 1}, + {65, 2}, {67, 3}, {51, 1}, {52, 2}, {48, 1}, {49, 2}, {53, 3}, {74, 1}, {62, 1}, + {60, 1}, {61, 1}, {73, 2}, {12, 1}, {92, 1}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, + {6, 2}, {13, 3}, {111, 1}, {104, 1}, {106, 2}, {107, 1}, {108, 2}, {110, 3}, {93, 1}, + {105, 2}, {15, 1}, {16, 2}, {82, 1}, {86, 1}, {88, 1}}}, + {1251, + {{44, 2}, + {49, 1}, + {43, 1}, + {7, 1}, + {11, 2}, + {40, 1}, + {45, 2}, + {42, 1}, + {46, 2}, + {47, 3}, + {9, 1}, + {13, 2}, + {8, 1}, + {10, 2}, + {12, 3}, + {2, 1}, + {3, 2}, + {4, 3}}}, + {1300, {{21, 1}, {16, 1}, {14, 1}}}, + {1320, {{12, 1}, {13, 1}, {5, 1}, {9, 2}, {17, 3}}}, + {1322, {{12, 1}, {62, 1}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, {6, 2}, + {13, 3}, {81, 1}, {74, 1}, {76, 2}, {77, 1}, {78, 2}, {80, 3}, + {63, 1}, {75, 2}, {15, 1}, {16, 2}, {52, 1}, {56, 1}, {58, 1}}}, + {1323, + {{31, 1}, {33, 2}, {25, 1}, {26, 2}, {19, 1}, {30, 2}, {13, 1}, {23, 2}, {24, 3}, {17, 1}, + {7, 1}, {20, 1}, {22, 2}, {32, 3}, {6, 1}, {8, 2}, {11, 3}, {15, 1}, {18, 2}, {29, 3}}}, + {1343, {{8, 1}, {18, 2}, {26, 1}, {27, 2}, {23, 1}, {24, 1}, {7, 1}}}, + {1347, {{44, 1}, {49, 1}, {37, 1}, {41, 2}}}, + {1367, + {{52, 1}, + {7, 1}, + {8, 2}, + {3, 1}, + {71, 1}, + {64, 1}, + {66, 2}, + {67, 1}, + {68, 2}, + {70, 3}, + {53, 1}, + {65, 2}, + {42, 1}, + {46, 1}, + {48, 1}}}, + {1371, {{19, 1}, {23, 1}, {20, 1}, {21, 2}, {22, 3}, {14, 1}}}, + {1372, {{9, 1}, {13, 1}, {10, 1}, {11, 2}, {12, 3}}}, + {1373, + {{12, 1}, + {7, 1}, + {9, 2}, + {42, 1}, + {44, 2}, + {41, 1}, + {45, 2}, + {20, 1}, + {5, 1}, + {10, 2}, + {13, 1}, + {38, 1}, + {32, 1}, + {33, 2}, + {37, 3}}}, + {1377, {{45, 1}, {23, 1}, {58, 1}, {46, 1}, {54, 1}, {47, 1}, {48, 2}}}, + {1378, {{14, 1}, {15, 2}, {7, 1}, {8, 2}}}, + {1380, {{10, 1}, {19, 1}, {14, 1}}}, + {1382, {{16, 1}, {19, 1}, {26, 1}, {24, 1}}}, + {1384, + {{41, 1}, + {44, 2}, + {45, 1}, + {42, 1}, + {25, 1}, + {29, 2}, + {28, 1}, + {47, 2}, + {2, 1}, + {49, 1}, + {14, 1}, + {48, 2}, + {38, 1}, + {50, 1}, + {33, 1}, + {40, 2}}}, + {1385, {{28, 1}, {5, 1}, {7, 1}, {6, 1}, {8, 2}, {10, 3}, {11, 1}}}, + {1391, {{12, 1}, {88, 1}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, {6, 2}, + {13, 3}, {107, 1}, {100, 1}, {102, 2}, {103, 1}, {104, 2}, {106, 3}, + {89, 1}, {101, 2}, {15, 1}, {16, 2}, {80, 1}, {82, 1}, {84, 1}}}, + {1393, {{54, 1}, {61, 1}, {68, 1}, {41, 1}, {45, 1}, {44, 1}, {27, 1}, {28, 1}, {25, 1}}}, + {1394, {{24, 1}, {33, 1}, {23, 1}, {25, 2}, {27, 3}, {26, 1}, {30, 2}, + {31, 3}, {19, 1}, {20, 2}, {22, 3}, {6, 1}, {7, 2}, {3, 1}, + {4, 2}, {8, 3}, {29, 1}, {17, 1}, {15, 1}, {16, 1}, {28, 2}}}, + {1401, {{1, 1}, {3, 2}, {4, 3}}}, + {1407, {{26, 1}, {18, 1}, {25, 1}, {27, 2}, {29, 3}, {28, 1}, {32, 2}, + {33, 3}, {20, 1}, {21, 2}, {23, 3}, {6, 1}, {7, 2}, {3, 1}, + {4, 2}, {8, 3}, {31, 1}, {16, 1}, {11, 1}, {12, 1}, {30, 2}}}, + {1408, {{17, 1}, {12, 1}, {10, 1}}}, + {1438, {{30, 3}, {31, 6}, {14, 6}, {74, 8}, {89, 9}, {102, 11}, {29, 5}, {32, 6}, + {39, 4}, {40, 5}, {57, 1}, {60, 1}, {95, 1}, {85, 1}, {96, 1}, {36, 1}, + {6, 2}, {13, 4}, {81, 6}, {11, 9}, {12, 12}, {5, 11}, {7, 12}, {73, 13}, + {99, 12}, {100, 13}, {101, 14}, {91, 11}, {94, 12}, {97, 13}, {92, 11}, {98, 13}, + {34, 2}, {69, 6}, {70, 7}, {22, 7}, {23, 8}, {77, 1}, {109, 1}, {114, 1}}}, + {1439, {{2, 4}}}, + {1440, {{1, 1}, {40, 1}, {43, 1}, {54, 1}, {83, 1}, {78, 1}, {79, 1}, {74, 1}, {80, 1}, + {63, 2}, {59, 1}, {81, 1}, {51, 1}, {53, 1}, {38, 1}, {34, 1}, {47, 1}, {30, 1}, + {28, 1}, {16, 1}, {87, 1}, {86, 1}, {95, 1}, {20, 1}, {17, 1}, {10, 1}}}, + {1449, + {{14, 1}, + {33, 1}, + {26, 1}, + {28, 2}, + {29, 1}, + {30, 2}, + {32, 3}, + {15, 1}, + {27, 2}, + {6, 1}, + {8, 1}, + {10, 1}}}, + {1450, + {{14, 1}, + {23, 1}, + {24, 2}, + {20, 1}, + {21, 2}, + {25, 3}, + {15, 1}, + {16, 2}, + {26, 1}, + {27, 2}, + {28, 3}, + {7, 1}, + {29, 2}, + {5, 1}, + {18, 2}, + {10, 1}, + {11, 2}}}, + {1463, + {{27, 1}, + {20, 1}, + {24, 2}, + {28, 3}, + {17, 1}, + {18, 2}, + {25, 3}, + {12, 1}, + {10, 1}, + {15, 1}, + {16, 2}, + {21, 3}, + {6, 1}, + {22, 2}, + {26, 3}}}, + {1464, + {{27, 1}, + {20, 1}, + {24, 2}, + {28, 3}, + {17, 1}, + {18, 2}, + {25, 3}, + {12, 1}, + {10, 1}, + {15, 1}, + {16, 2}, + {21, 3}, + {6, 1}, + {22, 2}, + {26, 3}}}, + {1466, + {{14, 1}, + {33, 1}, + {26, 1}, + {28, 2}, + {29, 1}, + {30, 2}, + {32, 3}, + {15, 1}, + {27, 2}, + {6, 1}, + {8, 1}, + {10, 1}}}, + {1468, + {{12, 1}, + {13, 2}, + {21, 3}, + {15, 1}, + {17, 1}, + {18, 2}, + {20, 3}, + {22, 1}, + {23, 2}, + {10, 1}, + {14, 1}, + {4, 1}, + {5, 2}, + {7, 3}}}, + {1479, {{40, 1}, {45, 2}, {48, 3}, {27, 1}, {37, 1}, {51, 2}, {57, 3}, {20, 1}, {24, 2}, + {28, 3}, {17, 1}, {18, 2}, {25, 3}, {12, 1}, {10, 1}, {15, 1}, {16, 2}, {21, 3}, + {6, 1}, {22, 2}, {26, 3}, {44, 1}, {50, 2}, {53, 3}, {39, 1}, {46, 2}, {35, 1}, + {36, 2}, {54, 3}, {47, 1}, {49, 2}, {55, 3}, {42, 1}, {52, 2}}}, + {1484, {{2, 1}, {3, 2}}}, + {1503, {{3, 1}, {4, 2}, {5, 3}, {6, 4}}}, + {1517, {{113, 1}, {97, 1}, {105, 2}, {102, 1}, {103, 2}, {107, 1}, {115, 2}, {100, 1}, + {104, 2}, {106, 3}, {12, 1}, {31, 1}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, + {6, 2}, {13, 3}, {50, 1}, {43, 1}, {45, 2}, {46, 1}, {47, 2}, {49, 3}, + {32, 1}, {44, 2}, {15, 1}, {16, 2}, {23, 1}, {25, 1}, {27, 1}}}, + {1518, {{18, 1}, {16, 1}, {66, 1}, {70, 1}}}, + {1523, {{14, 1}, {15, 2}}}, + {1527, {{22, 1}, {23, 2}, {24, 3}, {16, 1}, {19, 2}, {20, 3}, {7, 1}, {27, 2}, {28, 3}}}, + {1536, {{22, 1}, {23, 2}, {24, 3}, {16, 1}, {19, 2}, {20, 3}, {7, 1}, {27, 2}, {28, 3}}}, + {1537, + {{14, 1}, + {23, 1}, + {24, 2}, + {20, 1}, + {21, 2}, + {25, 3}, + {15, 1}, + {16, 2}, + {26, 1}, + {27, 2}, + {28, 3}, + {7, 1}, + {29, 2}, + {5, 1}, + {18, 2}, + {10, 1}, + {11, 2}}}, + {1539, + {{52, 1}, + {36, 1}, + {37, 2}, + {32, 1}, + {71, 1}, + {64, 1}, + {66, 2}, + {67, 1}, + {68, 2}, + {70, 3}, + {53, 1}, + {65, 2}, + {42, 1}, + {46, 1}, + {48, 1}}}, + {1540, + {{31, 1}, {33, 2}, {25, 1}, {26, 2}, {19, 1}, {30, 2}, {13, 1}, {23, 2}, {24, 3}, {17, 1}, + {7, 1}, {20, 1}, {22, 2}, {32, 3}, {6, 1}, {8, 2}, {11, 3}, {15, 1}, {18, 2}, {29, 3}}}, + {1541, + {{44, 1}, {53, 1}, {52, 1}, {55, 2}, {57, 3}, {56, 1}, {60, 2}, {61, 3}, {46, 1}, {47, 2}, + {49, 3}, {42, 1}, {50, 2}, {39, 1}, {40, 2}, {54, 3}, {59, 1}, {37, 1}, {32, 1}, {33, 1}, + {58, 2}, {22, 1}, {23, 2}, {24, 3}, {16, 1}, {19, 2}, {20, 3}, {7, 1}, {27, 2}, {28, 3}}}, + {1542, {{48, 1}, {57, 1}, {14, 1}, {56, 1}, {59, 2}, {61, 3}, {60, 1}, {64, 2}, {65, 3}, + {50, 1}, {51, 2}, {53, 3}, {46, 1}, {54, 2}, {43, 1}, {44, 2}, {58, 3}, {63, 1}, + {41, 1}, {36, 1}, {37, 1}, {62, 2}, {33, 1}, {26, 1}, {28, 2}, {29, 1}, {30, 2}, + {32, 3}, {15, 1}, {27, 2}, {6, 1}, {8, 1}, {10, 1}}}, + {1550, + {{21, 1}, + {26, 1}, + {20, 1}, + {7, 1}, + {11, 2}, + {17, 1}, + {22, 2}, + {19, 1}, + {23, 2}, + {24, 3}, + {9, 1}, + {13, 2}, + {8, 1}, + {10, 2}, + {12, 3}, + {2, 1}, + {3, 2}, + {4, 3}}}, + {1557, + {{23, 1}, + {27, 1}, + {13, 1}, + {22, 1}, + {7, 1}, + {4, 1}, + {18, 2}, + {21, 3}, + {6, 1}, + {11, 2}, + {40, 1}, + {46, 2}}}, + {1577, {{31, 1}, {52, 1}, {28, 1}, {29, 2}, {30, 3}, {24, 1}, {25, 2}, {32, 3}, {78, 1}, + {79, 2}, {74, 1}, {71, 1}, {64, 1}, {66, 2}, {67, 1}, {68, 2}, {70, 3}, {53, 1}, + {65, 2}, {34, 1}, {35, 2}, {42, 1}, {46, 1}, {106, 1}, {105, 1}, {99, 1}, {48, 1}}}, + {1591, + {{24, 1}, + {35, 1}, + {21, 1}, + {22, 2}, + {27, 1}, + {39, 1}, + {41, 2}, + {37, 1}, + {49, 2}, + {34, 1}, + {9, 1}}}, + {1592, {{21, 1}, {22, 2}}}, + {1598, {{12, 1}, {80, 1}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, {6, 2}, + {13, 3}, {99, 1}, {92, 1}, {94, 2}, {95, 1}, {96, 2}, {98, 3}, + {81, 1}, {93, 2}, {15, 1}, {16, 2}, {70, 1}, {74, 1}, {76, 1}}}, + {1599, + {{68, 1}, + {73, 1}, + {67, 1}, + {54, 1}, + {58, 2}, + {64, 1}, + {69, 2}, + {66, 1}, + {70, 2}, + {71, 3}, + {56, 1}, + {60, 2}, + {55, 1}, + {57, 2}, + {59, 3}, + {49, 1}, + {50, 2}, + {51, 3}}}, + {1600, {{12, 1}, {31, 1}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, {6, 2}, + {13, 3}, {50, 1}, {43, 1}, {45, 2}, {46, 1}, {47, 2}, {49, 3}, + {32, 1}, {44, 2}, {15, 1}, {16, 2}, {23, 1}, {25, 1}, {27, 1}}}, + {1601, + {{25, 1}, {27, 2}, {28, 3}, {24, 1}, {26, 2}, {13, 1}, {14, 2}, {17, 3}, {15, 1}, {16, 2}, + {20, 3}, {21, 1}, {6, 1}, {9, 2}, {11, 1}, {18, 2}, {19, 3}, {1, 1}, {4, 2}, {5, 3}}}, + {1603, + {{119, 1}, + {114, 1}, + {112, 1}, + {126, 1}, + {137, 1}, + {136, 1}, + {141, 1}, + {130, 1}, + {127, 1}, + {121, 1}}}, + {1605, + {{25, 1}, {27, 2}, {28, 3}, {24, 1}, {26, 2}, {13, 1}, {14, 2}, {17, 3}, {15, 1}, {16, 2}, + {20, 3}, {21, 1}, {6, 1}, {9, 2}, {11, 1}, {18, 2}, {19, 3}, {1, 1}, {4, 2}, {5, 3}}}, + {1620, + {{56, 1}, + {57, 2}, + {53, 1}, + {54, 2}, + {50, 1}, + {51, 2}, + {20, 1}, + {77, 2}, + {29, 1}, + {43, 2}, + {25, 1}, + {40, 2}, + {63, 1}, + {23, 1}, + {42, 2}, + {79, 3}, + {26, 1}, + {41, 2}, + {39, 1}}}, + {1621, {{82, 1}, {150, 2}, {152, 3}, {151, 1}, {74, 1}, {75, 2}, {79, 3}, {90, 4}, {91, 5}, + {31, 1}, {40, 2}, {89, 3}, {158, 1}, {156, 1}, {159, 2}, {160, 3}, {18, 1}, {53, 1}, + {15, 1}, {16, 2}, {17, 3}, {11, 1}, {12, 2}, {19, 3}, {72, 1}, {65, 1}, {67, 2}, + {68, 1}, {69, 2}, {71, 3}, {54, 1}, {66, 2}, {21, 1}, {22, 2}, {45, 1}, {47, 1}, + {33, 1}, {34, 2}, {36, 3}, {35, 1}, {37, 2}, {38, 3}, {26, 1}, {28, 2}, {32, 3}, + {49, 1}, {166, 1}, {170, 2}, {173, 1}, {174, 2}, {169, 1}, {171, 1}, {172, 2}, {2, 1}, + {165, 2}, {168, 3}, {125, 1}, {121, 1}, {123, 2}}}, + {1623, {{12, 1}, {24, 2}, {37, 3}, {11, 1}, {17, 2}, {28, 3}, {16, 1}, {27, 2}, + {31, 3}, {35, 1}, {36, 2}, {18, 1}, {20, 2}, {25, 1}, {26, 2}, {30, 3}, + {23, 1}, {33, 2}, {10, 1}, {19, 2}, {9, 1}, {29, 2}}}, + {1624, {{58, 1}, {78, 1}, {55, 1}, {56, 2}, {57, 3}, {51, 1}, {52, 2}, {59, 3}, {9, 1}, + {10, 2}, {11, 3}, {7, 1}, {12, 2}, {13, 3}, {2, 1}, {3, 2}, {4, 3}, {97, 1}, + {90, 1}, {92, 2}, {93, 1}, {94, 2}, {96, 3}, {79, 1}, {91, 2}, {61, 1}, {62, 2}, + {68, 1}, {72, 1}, {74, 1}, {39, 1}, {30, 1}, {38, 1}, {41, 2}, {43, 3}, {42, 1}, + {46, 2}, {47, 3}, {32, 1}, {33, 2}, {35, 3}, {28, 1}, {36, 2}, {25, 1}, {26, 2}, + {40, 3}, {45, 1}, {23, 1}, {18, 1}, {19, 1}, {44, 2}}}, + {1632, {{38, 1}, {34, 1}, {6, 1}, {43, 1}, {11, 1}, {25, 2}}}, + {1633, {{18, 1}}}, + {1635, {{11, 1}, {12, 2}, {13, 3}, {9, 1}, {14, 2}, {15, 3}, {4, 1}, {5, 2}, {6, 3}, {20, 1}}}, + {1653, {{4, 1}, {5, 2}}}, + {1663, {{9, 1}, {10, 2}, {11, 3}, {7, 1}, {12, 2}, {13, 3}, {2, 1}, {3, 2}, {4, 3}, + {30, 1}, {39, 2}, {53, 3}, {51, 1}, {57, 2}, {56, 1}, {58, 2}, {60, 3}, {25, 1}, + {26, 2}, {27, 3}, {23, 1}, {46, 2}, {49, 3}, {40, 1}, {41, 2}, {55, 3}, {43, 1}, + {44, 2}, {52, 3}, {32, 1}, {33, 2}, {61, 3}, {20, 1}, {21, 2}, {42, 3}, {35, 1}, + {47, 2}, {54, 3}, {34, 1}, {37, 2}, {50, 3}, {31, 1}, {48, 2}, {59, 3}}}, + {1707, {{1, 1}}}, + {1712, {{17, 1}, {12, 1}, {10, 1}}}, + {1714, {{12, 1}, {35, 1}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, {6, 2}, + {13, 3}, {54, 1}, {47, 1}, {49, 2}, {50, 1}, {51, 2}, {53, 3}, + {36, 1}, {48, 2}, {15, 1}, {16, 2}, {25, 1}, {29, 1}, {31, 1}}}, + {1715, {{39, 1}, {34, 1}, {32, 1}}}, + {1717, {{12, 1}, {58, 1}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, {6, 2}, + {13, 3}, {77, 1}, {70, 1}, {72, 2}, {73, 1}, {74, 2}, {76, 3}, + {59, 1}, {71, 2}, {15, 1}, {16, 2}, {50, 1}, {52, 1}, {54, 1}}}, + {1756, + {{47, 1}, {68, 1}, {44, 1}, {45, 2}, {46, 3}, {40, 1}, {41, 2}, {48, 3}, {87, 1}, {80, 1}, + {82, 2}, {83, 1}, {84, 2}, {86, 3}, {69, 1}, {81, 2}, {50, 1}, {51, 2}, {58, 1}, {62, 1}, + {14, 1}, {15, 2}, {34, 3}, {24, 1}, {30, 2}, {31, 3}, {20, 1}, {21, 2}, {25, 3}, {23, 1}, + {16, 1}, {17, 2}, {19, 3}, {27, 1}, {28, 2}, {29, 3}, {64, 1}}}, + {1758, {{13, 1}}}, + {1766, {{12, 1}, {31, 1}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, {6, 2}, + {13, 3}, {50, 1}, {43, 1}, {45, 2}, {46, 1}, {47, 2}, {49, 3}, + {32, 1}, {44, 2}, {15, 1}, {16, 2}, {23, 1}, {25, 1}, {27, 1}}}, + {1767, + {{14, 1}, + {23, 1}, + {24, 2}, + {20, 1}, + {21, 2}, + {25, 3}, + {15, 1}, + {16, 2}, + {26, 1}, + {27, 2}, + {28, 3}, + {7, 1}, + {29, 2}, + {5, 1}, + {18, 2}, + {10, 1}, + {11, 2}}}, + {1784, {{1, 1}, {3, 2}, {4, 3}, {6, 1}}}, + {1795, + {{92, 1}, {147, 2}, {71, 2}, {34, 1}, {44, 1}, {43, 1}, {68, 1}, {69, 2}, {70, 3}, + {64, 1}, {65, 2}, {72, 3}, {152, 1}, {146, 1}, {42, 1}, {45, 2}, {47, 3}, {46, 1}, + {50, 2}, {51, 3}, {36, 1}, {37, 2}, {39, 3}, {32, 1}, {40, 2}, {49, 1}, {29, 1}, + {24, 1}, {25, 1}, {48, 2}, {111, 1}, {104, 1}, {106, 2}, {107, 1}, {108, 2}, {110, 3}, + {93, 1}, {105, 2}, {74, 1}, {75, 2}, {133, 1}, {137, 2}, {82, 1}, {86, 1}, {143, 1}, + {148, 2}, {145, 1}, {149, 2}, {150, 3}, {135, 1}, {139, 2}, {134, 1}, {136, 2}, {138, 3}, + {128, 1}, {129, 2}, {130, 3}, {17, 1}, {12, 1}, {10, 1}, {88, 1}}}, + {1808, + {{14, 1}, + {23, 1}, + {24, 2}, + {20, 1}, + {21, 2}, + {25, 3}, + {15, 1}, + {16, 2}, + {26, 1}, + {27, 2}, + {28, 3}, + {7, 1}, + {29, 2}, + {5, 1}, + {18, 2}, + {10, 1}, + {11, 2}}}, + {1810, {{50, 1}, {59, 1}, {16, 1}, {58, 1}, {61, 2}, {63, 3}, {62, 1}, {66, 2}, {67, 3}, + {52, 1}, {53, 2}, {55, 3}, {48, 1}, {56, 2}, {45, 1}, {46, 2}, {60, 3}, {65, 1}, + {43, 1}, {38, 1}, {39, 1}, {64, 2}, {35, 1}, {28, 1}, {30, 2}, {31, 1}, {32, 2}, + {34, 3}, {17, 1}, {29, 2}, {6, 1}, {10, 1}, {12, 1}}}, + {1811, + {{32, 1}, {34, 2}, {25, 1}, {26, 2}, {19, 1}, {31, 2}, {13, 1}, {23, 2}, {24, 3}, {17, 1}, + {7, 1}, {20, 1}, {22, 2}, {33, 3}, {6, 1}, {8, 2}, {11, 3}, {15, 1}, {18, 2}, {30, 3}}}, + {1812, + {{13, 1}, + {14, 2}, + {15, 3}, + {18, 1}, + {21, 1}, + {22, 2}, + {25, 3}, + {19, 1}, + {23, 2}, + {11, 1}, + {17, 1}, + {5, 1}, + {6, 2}, + {8, 3}}}, + {1826, {{30, 1}, {17, 1}}}, + {1835, {{20, 1}, {23, 2}, {21, 1}, {26, 1}, {19, 1}, {22, 2}}}, + {1838, {{2, 1}}}, + {1839, {{3, 1}, {1, 1}, {4, 2}, {5, 3}}}, + {1848, {{37, 1}, {31, 1}, {6, 1}, {17, 2}, {84, 3}, {89, 4}, {26, 1}, {30, 2}, {25, 1}, + {28, 2}, {53, 1}, {54, 2}, {59, 3}, {29, 1}, {66, 1}, {91, 2}, {68, 1}, {77, 2}, + {83, 3}, {20, 1}, {69, 2}, {81, 3}, {78, 1}, {79, 2}, {82, 3}, {61, 1}, {62, 2}, + {63, 3}, {67, 4}, {80, 1}, {88, 2}, {90, 3}, {12, 1}, {75, 2}, {76, 3}, {21, 1}, + {27, 2}, {64, 3}, {93, 1}, {94, 2}, {9, 1}, {13, 2}, {14, 3}}}, + {1849, {{12, 1}, {33, 1}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, {6, 2}, + {13, 3}, {52, 1}, {45, 1}, {47, 2}, {48, 1}, {49, 2}, {51, 3}, + {34, 1}, {46, 2}, {15, 1}, {16, 2}, {23, 1}, {27, 1}, {29, 1}}}, + {1864, + {{13, 1}, + {16, 2}, + {70, 1}, + {68, 1}, + {71, 1}, + {9, 1}, + {14, 2}, + {32, 1}, + {67, 1}, + {22, 1}, + {36, 1}, + {52, 1}, + {69, 1}}}, + {1866, {{121, 1}, {142, 1}, {118, 1}, {119, 2}, {120, 3}, {114, 1}, {115, 2}, {122, 3}, + {161, 1}, {154, 1}, {156, 2}, {157, 1}, {158, 2}, {160, 3}, {143, 1}, {155, 2}, + {124, 1}, {125, 2}, {132, 1}, {136, 1}, {90, 1}, {138, 1}}}, + {1925, + {{61, 1}, + {39, 1}, + {34, 1}, + {35, 1}, + {42, 1}, + {28, 1}, + {49, 2}, + {46, 1}, + {54, 1}, + {56, 2}, + {53, 1}, + {65, 1}, + {51, 1}, + {69, 2}, + {52, 1}, + {19, 1}, + {67, 1}}}, + {1927, {{1, 1}, {3, 2}, {4, 3}, {5, 1}}}, + {1938, {{24, 1}, {26, 2}, {7, 1}}}, + {1950, {{27, 6}, {28, 7}, {9, 4}, {90, 5}, {114, 6}, {123, 7}, {26, 1}, {29, 3}, + {103, 1}, {66, 1}, {108, 1}, {34, 1}, {35, 3}, {65, 2}, {67, 3}, {68, 4}, + {105, 4}, {76, 1}, {113, 1}, {75, 1}, {6, 2}, {14, 4}, {99, 6}, {11, 9}, + {13, 12}, {5, 12}, {7, 13}, {91, 14}, {119, 13}, {120, 14}, {125, 15}, {116, 12}, + {121, 14}, {122, 15}, {117, 13}, {118, 14}, {31, 5}, {58, 6}, {59, 7}, {20, 7}}}, + {1951, {{2, 4}}}, + {1956, {{11, 1}}}, + {1967, + {{7, 3}, {13, 3}, {29, 3}, {48, 1}, {11, 1}, {19, 2}, {23, 1}, {36, 1}, {37, 2}, {41, 3}, + {45, 1}, {46, 2}, {55, 1}, {56, 2}, {51, 1}, {35, 1}, {38, 2}, {39, 1}, {42, 3}, {43, 4}, + {14, 1}, {17, 2}, {24, 3}, {12, 1}, {21, 2}, {15, 1}, {16, 2}, {62, 1}}}, + {1968, + {{35, 1}, {47, 2}, {60, 3}, {34, 1}, {40, 2}, {51, 3}, {39, 1}, {50, 2}, {54, 3}, {58, 1}, + {59, 2}, {41, 1}, {43, 2}, {5, 1}, {9, 2}, {7, 1}, {10, 2}, {13, 3}, {48, 1}, {49, 2}, + {53, 3}, {46, 1}, {56, 2}, {33, 1}, {42, 2}, {32, 1}, {52, 2}, {86, 1}, {88, 2}, {89, 3}, + {85, 1}, {87, 2}, {74, 1}, {75, 2}, {78, 3}, {76, 1}, {77, 2}, {81, 3}, {82, 1}, {67, 1}, + {70, 2}, {72, 1}, {79, 2}, {80, 3}, {62, 1}, {65, 2}, {66, 3}}}, + {1971, + {{24, 1}, + {13, 1}, + {16, 1}, + {27, 1}, + {40, 2}, + {46, 1}, + {47, 1}, + {3, 1}, + {9, 2}, + {10, 3}, + {7, 1}, + {15, 2}}}, + {1973, {{32, 1}, {3, 1}, {1, 1}, {4, 2}, {5, 3}}}, + {1974, {{18, 1}, {19, 2}}}, + {1987, {{9, 1}, {10, 2}, {11, 3}, {12, 1}, {5, 1}, {6, 2}, {13, 3}, {15, 1}, {16, 2}}}, + {2001, {{8, 1}}}, + {2048, {{13, 1}, {18, 2}, {21, 3}, {56, 1}, {10, 1}, {24, 2}, {30, 3}, {49, 1}, {53, 2}, + {57, 3}, {46, 1}, {47, 2}, {54, 3}, {41, 1}, {39, 1}, {44, 1}, {45, 2}, {50, 3}, + {35, 1}, {51, 2}, {55, 3}, {17, 1}, {23, 2}, {26, 3}, {12, 1}, {19, 2}, {8, 1}, + {9, 2}, {27, 3}, {20, 1}, {22, 2}, {28, 3}, {15, 1}, {25, 2}}}, + {2055, + {{149, 1}, + {131, 1}, + {106, 1}, + {80, 1}, + {84, 1}, + {92, 2}, + {86, 1}, + {87, 2}, + {72, 1}, + {73, 2}, + {114, 1}, + {63, 1}, + {100, 2}, + {109, 1}, + {143, 1}, + {110, 1}, + {93, 1}, + {104, 1}}}, + {2056, {{14, 1}, {15, 2}}}, + {2058, + {{170, 1}, + {112, 1}, + {104, 1}, + {110, 2}, + {111, 1}, + {114, 2}, + {97, 1}, + {98, 2}, + {133, 1}, + {96, 1}, + {157, 2}, + {155, 1}, + {125, 1}, + {143, 1}, + {127, 1}, + {119, 1}}}, + {2059, {{15, 1}, {16, 2}}}, + {2065, + {{102, 1}, + {92, 1}, + {98, 2}, + {96, 1}, + {99, 2}, + {84, 1}, + {85, 2}, + {87, 1}, + {83, 1}, + {100, 2}, + {107, 1}, + {110, 1}, + {115, 1}, + {104, 1}, + {112, 1}, + {109, 1}}}, + {2066, {{14, 1}, {15, 2}}}, + {2067, + {{57, 1}, + {58, 2}, + {59, 3}, + {60, 1}, + {53, 1}, + {54, 2}, + {61, 3}, + {46, 1}, + {47, 2}, + {42, 1}, + {63, 1}, + {64, 2}}}, + {2071, + {{12, 1}, + {13, 2}, + {14, 3}, + {17, 1}, + {20, 1}, + {21, 2}, + {26, 3}, + {18, 1}, + {24, 2}, + {10, 1}, + {16, 1}, + {4, 1}, + {5, 2}, + {7, 3}}}, + {2091, {{13, 1}}}, + {2094, {{12, 1}, {33, 1}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, {6, 2}, + {13, 3}, {52, 1}, {45, 1}, {47, 2}, {48, 1}, {49, 2}, {51, 3}, + {34, 1}, {46, 2}, {15, 1}, {16, 2}, {23, 1}, {27, 1}, {29, 1}}}, + {2095, + {{27, 1}, + {20, 1}, + {24, 2}, + {28, 3}, + {17, 1}, + {18, 2}, + {25, 3}, + {12, 1}, + {10, 1}, + {15, 1}, + {16, 2}, + {21, 3}, + {6, 1}, + {22, 2}, + {26, 3}}}, + {2130, {{9, 1}, {10, 2}, {11, 3}, {12, 1}, {5, 1}, {6, 2}, {13, 3}, {15, 1}, {16, 2}}}, + {2131, + {{6, 3}, + {12, 3}, + {10, 3}, + {18, 4}, + {22, 1}, + {13, 1}, + {16, 2}, + {23, 3}, + {11, 1}, + {20, 2}, + {14, 1}, + {15, 2}}}, + {2133, {{4, 1}, {8, 2}, {6, 1}, {9, 2}, {12, 3}}}, + {2140, {{23, 1}, {17, 1}, {29, 1}, {19, 1}, {28, 1}, {1, 1}}}, + {2142, {{3, 1}, {1, 1}, {4, 2}, {5, 3}, {18, 1}, {39, 1}, {15, 1}, {16, 2}, {17, 3}, + {11, 1}, {12, 2}, {19, 3}, {58, 1}, {51, 1}, {53, 2}, {54, 1}, {55, 2}, {57, 3}, + {40, 1}, {52, 2}, {21, 1}, {22, 2}, {29, 1}, {33, 1}, {35, 1}}}, + {2167, {{17, 1}, {24, 1}, {23, 1}, {10, 1}, {15, 2}}}, + {2189, {{14, 1}, {25, 1}, {13, 1}, {18, 1}, {12, 1}, {16, 2}}}, + {2191, + {{19, 1}, {25, 2}, {5, 1}, {15, 1}, {14, 1}, {20, 2}, {18, 1}, {23, 2}, {13, 1}, {16, 2}}}, + {2199, + {{13, 1}, {26, 2}, {15, 1}, {14, 1}, {19, 2}, {18, 1}, {22, 2}, {10, 1}, {16, 2}, {25, 3}}}, + {2210, + {{21, 1}, {28, 1}, {29, 1}, {31, 2}, {50, 1}, {53, 1}, {48, 1}, {51, 2}, {5, 1}, {6, 2}, + {1, 1}, {2, 2}, {3, 3}, {33, 1}, {34, 2}, {26, 1}, {20, 1}, {23, 2}, {30, 3}, {36, 1}}}, + {2220, {{11, 1}, {4, 1}, {5, 2}, {6, 1}, {7, 2}, {8, 3}, {3, 1}}}, + {2233, {{24, 1}, {98, 1}, {48, 1}, {38, 1}, {27, 1}, {43, 2}, {100, 1}, + {44, 1}, {103, 1}, {3, 1}, {50, 1}, {17, 1}, {22, 2}, {102, 1}, + {66, 1}, {106, 1}, {96, 1}, {104, 1}, {105, 1}, {54, 1}}}, + {2235, {{2, 1}, {5, 2}, {21, 1}, {30, 1}, {29, 1}, {22, 1}}}, + {2237, {{24, 1}, {45, 1}, {21, 1}, {22, 2}, {23, 3}, {17, 1}, {18, 2}, + {25, 3}, {63, 1}, {57, 1}, {59, 2}, {53, 1}, {60, 2}, {62, 3}, + {46, 1}, {58, 2}, {27, 1}, {28, 2}, {35, 1}, {39, 1}, {41, 1}}}, + {2249, {{22, 1}, {7, 1}, {2, 1}, {14, 1}}}, + {2270, {{46, 1}, {16, 1}, {43, 1}, {44, 2}, {45, 3}, {39, 1}, {40, 2}, + {47, 3}, {35, 1}, {28, 1}, {30, 2}, {31, 1}, {32, 2}, {34, 3}, + {17, 1}, {29, 2}, {49, 1}, {50, 2}, {6, 1}, {10, 1}, {12, 1}}}, + {2274, {{2, 1}, {3, 2}}}, + {2292, {{25, 1}, {16, 1}, {24, 1}, {27, 2}, {29, 3}, {28, 1}, {32, 2}, + {33, 3}, {18, 1}, {19, 2}, {21, 3}, {14, 1}, {22, 2}, {11, 1}, + {12, 2}, {26, 3}, {31, 1}, {9, 1}, {4, 1}, {5, 1}, {30, 2}}}, + {2293, + {{14, 1}, + {23, 1}, + {24, 2}, + {20, 1}, + {21, 2}, + {25, 3}, + {15, 1}, + {16, 2}, + {26, 1}, + {27, 2}, + {28, 3}, + {7, 1}, + {29, 2}, + {5, 1}, + {18, 2}, + {10, 1}, + {11, 2}}}, + {2302, {{9, 1}, {10, 2}, {11, 3}, {12, 1}, {5, 1}, {6, 2}, {13, 3}, {15, 1}, {16, 2}}}, + {2306, {{12, 1}, {33, 1}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, {6, 2}, {13, 3}, + {52, 1}, {45, 1}, {47, 2}, {48, 1}, {49, 2}, {51, 3}, {34, 1}, {46, 2}, + {15, 1}, {16, 2}, {23, 1}, {27, 1}, {29, 1}, {62, 1}, {63, 2}, {58, 1}}}, + {2311, + {{27, 1}, + {20, 1}, + {24, 2}, + {28, 3}, + {17, 1}, + {18, 2}, + {25, 3}, + {12, 1}, + {10, 1}, + {15, 1}, + {16, 2}, + {21, 3}, + {6, 1}, + {22, 2}, + {26, 3}}}, + {2323, {{12, 1}, {13, 2}, {14, 3}, {17, 1}, {57, 1}, {59, 2}, {20, 1}, {21, 2}, {26, 3}, + {18, 1}, {24, 2}, {10, 1}, {16, 1}, {4, 1}, {5, 2}, {7, 3}, {50, 1}, {51, 2}, + {44, 1}, {56, 2}, {38, 1}, {48, 2}, {49, 3}, {42, 1}, {32, 1}, {45, 1}, {47, 2}, + {58, 3}, {31, 1}, {33, 2}, {36, 3}, {40, 1}, {43, 2}, {55, 3}}}, + {2327, + {{14, 1}, + {9, 1}, + {10, 2}, + {15, 3}, + {20, 1}, + {17, 1}, + {5, 1}, + {7, 2}, + {11, 3}, + {12, 4}, + {13, 1}}}, + {2328, {{1, 1}}}, + {2333, {{8, 1}, {10, 2}}}, + {2336, + {{24, 1}, {27, 2}, {38, 3}, {23, 1}, {16, 1}, {14, 1}, {15, 2}, {26, 3}, {33, 1}, {35, 2}, + {31, 1}, {32, 2}, {34, 3}, {17, 1}, {25, 2}, {36, 3}, {22, 1}, {9, 1}, {11, 2}, {28, 3}}}, + {2340, {{1, 1}, {24, 1}, {3, 1}, {6, 2}, {29, 1}, {26, 1}, {22, 1}, {27, 1}}}, + {2342, + {{14, 1}, {12, 1}, {15, 2}, {29, 1}, {31, 1}, {13, 1}, {4, 1}, {32, 1}, {33, 2}, {25, 1}}}, + {2343, {{11, 1}}}, + {2345, {{7, 1}, {6, 1}, {9, 2}, {25, 1}, {11, 1}, {4, 1}, {40, 1}, {26, 1}}}, + {2346, {{8, 1}}}, + {2347, + {{1, 1}, {4, 2}, {10, 1}, {23, 1}, {22, 1}, {20, 1}, {21, 2}, {17, 1}, {11, 1}, {13, 1}}}, + {2348, {{10, 1}, {11, 2}, {6, 1}}}, + {2349, + {{32, 1}, {34, 2}, {25, 1}, {26, 2}, {19, 1}, {31, 2}, {13, 1}, {23, 2}, {24, 3}, {17, 1}, + {7, 1}, {20, 1}, {22, 2}, {33, 3}, {6, 1}, {8, 2}, {11, 3}, {15, 1}, {18, 2}, {30, 3}}}, + {2362, {{12, 1}, {33, 1}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, {6, 2}, + {13, 3}, {52, 1}, {45, 1}, {47, 2}, {48, 1}, {49, 2}, {51, 3}, + {34, 1}, {46, 2}, {15, 1}, {16, 2}, {23, 1}, {27, 1}, {29, 1}}}, + {2367, {{12, 1}, {33, 1}, {71, 1}, {72, 2}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, {6, 2}, + {13, 3}, {52, 1}, {45, 1}, {47, 2}, {48, 1}, {49, 2}, {51, 3}, {69, 1}, {70, 2}, + {67, 1}, {68, 2}, {65, 1}, {66, 2}, {63, 1}, {64, 2}, {61, 1}, {62, 2}, {34, 1}, + {46, 2}, {59, 1}, {60, 2}, {15, 1}, {16, 2}, {23, 1}, {27, 1}, {29, 1}}}, + {2428, {{10, 1}}}, + {2431, + {{6, 1}, + {21, 1}, + {15, 1}, + {26, 2}, + {28, 1}, + {33, 2}, + {29, 1}, + {14, 1}, + {17, 2}, + {23, 3}, + {25, 1}, + {5, 1}, + {8, 2}, + {22, 3}, + {20, 1}, + {24, 2}}}, + {2432, {{12, 2}, {63, 3}, {57, 2}, {61, 1}, {69, 2}, {33, 1}, {9, 1}, {10, 2}, {11, 3}, + {5, 1}, {6, 2}, {13, 3}, {73, 1}, {64, 1}, {67, 2}, {74, 3}, {62, 1}, {71, 2}, + {65, 1}, {66, 2}, {52, 1}, {45, 1}, {47, 2}, {48, 1}, {49, 2}, {51, 3}, {34, 1}, + {46, 2}, {15, 1}, {16, 2}, {23, 1}, {27, 1}, {29, 1}}}, + {2483, + {{18, 1}, + {23, 2}, + {17, 1}, + {24, 1}, + {6, 1}, + {10, 1}, + {19, 2}, + {5, 1}, + {7, 2}, + {22, 3}, + {25, 1}}}, + {2484, + {{20, 1}, + {22, 2}, + {28, 1}, + {14, 1}, + {18, 1}, + {24, 2}, + {17, 1}, + {27, 2}, + {11, 1}, + {15, 2}, + {29, 3}}}, + {2485, + {{15, 1}, + {23, 2}, + {25, 1}, + {4, 1}, + {17, 1}, + {26, 2}, + {7, 1}, + {22, 2}, + {5, 1}, + {10, 2}, + {20, 3}}}, + {2486, + {{24, 1}, + {30, 2}, + {27, 1}, + {12, 1}, + {16, 1}, + {21, 2}, + {15, 1}, + {25, 2}, + {9, 1}, + {13, 2}, + {26, 3}}}, + {2487, + {{18, 1}, + {27, 2}, + {24, 1}, + {12, 1}, + {19, 1}, + {20, 2}, + {15, 1}, + {23, 2}, + {9, 1}, + {13, 2}, + {26, 1}}}, + {2501, {{34, 1}, {33, 1}, {31, 1}}}, + {2508, + {{60, 1}, + {47, 1}, + {40, 1}, + {11, 1}, + {12, 2}, + {42, 1}, + {17, 1}, + {29, 2}, + {10, 1}, + {20, 2}, + {39, 1}, + {19, 1}, + {26, 2}, + {25, 1}, + {44, 1}}}, + {2509, {{5, 1}, {6, 2}}}, + {2512, + {{9, 1}, {10, 2}, {11, 3}, {12, 1}, {34, 1}, {131, 1}, {132, 2}, {133, 3}, {5, 1}, {6, 2}, + {13, 3}, {71, 1}, {72, 2}, {84, 3}, {85, 1}, {93, 2}, {108, 1}, {82, 1}, {83, 2}, {76, 1}, + {77, 2}, {78, 1}, {79, 2}, {81, 3}, {92, 1}, {89, 1}, {91, 2}, {94, 3}, {87, 1}, {88, 2}, + {56, 1}, {57, 2}, {58, 3}, {53, 1}, {46, 1}, {48, 2}, {49, 1}, {50, 2}, {52, 3}, {35, 1}, + {47, 2}, {15, 1}, {16, 2}, {24, 1}, {28, 1}, {30, 1}}}, + {2513, {{12, 1}, {24, 2}, {37, 3}, {11, 1}, {17, 2}, {28, 3}, {16, 1}, {27, 2}, + {31, 3}, {35, 1}, {36, 2}, {18, 1}, {20, 2}, {50, 1}, {25, 1}, {26, 2}, + {30, 3}, {23, 1}, {33, 2}, {10, 1}, {19, 2}, {9, 1}, {29, 2}, {51, 1}, + {54, 2}, {55, 1}, {44, 1}, {45, 2}, {53, 3}, {46, 1}, {49, 2}, {52, 3}}}, + {2530, {{26, 5}, {27, 6}, {9, 4}, {87, 5}, {109, 6}, {120, 7}, {25, 1}, {28, 3}, + {101, 1}, {63, 1}, {102, 1}, {33, 1}, {34, 3}, {62, 2}, {64, 3}, {65, 4}, + {104, 4}, {73, 1}, {107, 1}, {72, 1}, {6, 2}, {14, 4}, {99, 6}, {11, 9}, + {13, 12}, {5, 12}, {7, 13}, {88, 14}, {119, 13}, {124, 14}, {125, 15}, {111, 12}, + {112, 14}, {114, 15}, {121, 13}, {122, 14}, {30, 5}, {55, 6}, {56, 7}, {20, 7}}}, + {2531, {{2, 4}}}, + {2553, {{16, 1}, {17, 2}, {18, 3}, {19, 1}, {12, 1}, {13, 2}, {20, 3}, {22, 1}, {23, 2}}}, + {2596, {{72, 1}, {81, 1}, {38, 1}, {118, 1}, {119, 2}, {114, 1}, {80, 1}, {83, 2}, {85, 3}, + {84, 1}, {88, 2}, {89, 3}, {74, 1}, {75, 2}, {77, 3}, {70, 1}, {78, 2}, {67, 1}, + {68, 2}, {82, 3}, {87, 1}, {65, 1}, {60, 1}, {61, 1}, {86, 2}, {57, 1}, {50, 1}, + {52, 2}, {53, 1}, {54, 2}, {56, 3}, {39, 1}, {51, 2}, {28, 1}, {32, 1}, {34, 1}}}, + {2597, + {{101, 1}, {65, 1}, {66, 2}, {67, 3}, {70, 2}, {105, 1}, {91, 1}, {34, 1}, {38, 2}, {36, 1}, + {39, 2}, {42, 3}, {100, 1}, {85, 1}, {82, 1}, {96, 2}, {99, 3}, {84, 1}, {89, 2}, {73, 1}, + {74, 2}, {79, 3}, {71, 1}, {77, 2}, {63, 1}, {69, 1}, {57, 1}, {58, 2}, {60, 3}, {25, 1}, + {27, 2}, {28, 3}, {24, 1}, {26, 2}, {13, 1}, {14, 2}, {17, 3}, {15, 1}, {16, 2}, {20, 3}, + {21, 1}, {6, 1}, {9, 2}, {11, 1}, {18, 2}, {19, 3}, {1, 1}, {4, 2}, {5, 3}}}, + {2599, + {{23, 1}, + {30, 2}, + {8, 1}, + {20, 1}, + {19, 1}, + {24, 2}, + {22, 1}, + {27, 2}, + {4, 1}, + {17, 2}, + {29, 3}, + {13, 1}}}, + {2601, {{12, 1}, {37, 1}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, {6, 2}, + {13, 3}, {56, 1}, {49, 1}, {51, 2}, {52, 1}, {53, 2}, {55, 3}, + {38, 1}, {50, 2}, {15, 1}, {16, 2}, {27, 1}, {31, 1}, {33, 1}}}, + {2605, {{29, 6}, {86, 3}, {113, 4}, {24, 1}, {30, 2}, {63, 1}, {104, 1}, {33, 1}, + {34, 3}, {62, 2}, {64, 3}, {65, 4}, {98, 4}, {73, 1}, {110, 1}, {72, 1}, + {5, 2}, {4, 1}, {6, 3}, {87, 8}, {115, 9}, {116, 11}, {121, 12}, {56, 10}, + {106, 9}, {120, 10}, {122, 11}, {118, 9}, {119, 11}, {20, 4}}}, + {2606, {{2, 4}}}, + {2615, {{5, 1}}}, + {2616, {{29, 1}, {31, 2}, {32, 3}, {45, 1}, {48, 1}, {56, 1}, {21, 1}, + {22, 2}, {26, 3}, {16, 1}, {46, 1}, {53, 2}, {54, 3}, {11, 1}, + {14, 2}, {15, 3}, {25, 4}, {42, 1}, {41, 1}, {47, 2}, {24, 1}}}, + {2617, + {{55, 1}, + {57, 2}, + {58, 3}, + {49, 1}, + {47, 1}, + {50, 2}, + {37, 1}, + {38, 2}, + {39, 3}, + {42, 1}, + {53, 2}, + {59, 3}, + {8, 1}, + {12, 2}, + {19, 3}, + {51, 4}, + {43, 1}, + {44, 2}, + {40, 1}}}, + {2619, {{55, 1}, {57, 2}, {58, 3}, {37, 1}, {53, 1}, {64, 1}, {44, 1}, + {45, 2}, {46, 3}, {29, 1}, {51, 1}, {59, 2}, {63, 1}, {25, 1}, + {26, 2}, {48, 3}, {68, 4}, {50, 1}, {65, 1}, {1, 1}, {3, 2}}}, + {2620, + {{44, 1}, + {46, 2}, + {47, 3}, + {34, 1}, + {38, 1}, + {15, 1}, + {23, 2}, + {24, 3}, + {4, 1}, + {28, 1}, + {33, 2}, + {41, 1}, + {10, 1}, + {11, 2}, + {16, 3}, + {39, 4}, + {26, 1}, + {27, 2}, + {36, 1}}}, + {2621, + {{22, 1}, {43, 1}, {19, 1}, {20, 2}, {21, 3}, {15, 1}, {16, 2}, {23, 3}, {62, 1}, {55, 1}, + {57, 2}, {58, 1}, {59, 2}, {61, 3}, {44, 1}, {56, 2}, {25, 1}, {26, 2}, {33, 1}, {108, 1}, + {37, 1}, {71, 1}, {39, 1}, {113, 1}, {76, 1}, {80, 1}, {81, 2}, {82, 3}}}, + {2624, {{69, 1}}}, + {2627, {{4, 1}, {5, 2}, {6, 3}}}, + {2628, {{29, 1}, {38, 1}, {24, 1}, {42, 1}}}, + {2632, {{50, 1}, {62, 1}, {22, 1}, {24, 1}, {38, 1}, {49, 1}, {34, 1}, + {20, 1}, {17, 1}, {19, 2}, {32, 1}, {13, 1}, {5, 1}, {23, 1}, + {54, 1}, {67, 1}, {31, 1}, {27, 1}, {59, 2}, {61, 1}, {56, 1}}}, + {2633, + {{39, 1}, + {16, 1}, + {35, 1}, + {53, 1}, + {49, 1}, + {23, 1}, + {12, 1}, + {4, 1}, + {37, 2}, + {24, 1}, + {15, 1}, + {33, 1}, + {17, 1}, + {48, 1}, + {61, 1}, + {31, 1}, + {28, 1}, + {52, 2}, + {56, 1}}}, + {2637, + {{33, 1}, + {14, 1}, + {50, 1}, + {26, 1}, + {18, 1}, + {6, 1}, + {25, 2}, + {23, 1}, + {13, 1}, + {17, 1}, + {28, 1}, + {62, 1}, + {51, 1}, + {36, 1}}}, + {2638, {{32, 1}, {37, 1}}}, + {2639, + {{12, 1}, {72, 1}, {99, 1}, {102, 2}, {109, 3}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, + {6, 2}, {13, 3}, {91, 1}, {84, 1}, {86, 2}, {87, 1}, {88, 2}, {90, 3}, {73, 1}, + {85, 2}, {107, 1}, {108, 2}, {128, 3}, {35, 1}, {36, 2}, {100, 3}, {32, 1}, {98, 2}, + {112, 3}, {105, 1}, {110, 2}, {111, 3}, {96, 1}, {101, 2}, {97, 1}, {106, 2}, {103, 1}, + {104, 2}, {126, 1}, {127, 2}, {15, 1}, {16, 2}, {62, 1}, {66, 1}, {56, 1}, {57, 2}, + {58, 3}, {50, 1}, {51, 2}, {52, 3}, {55, 1}, {45, 1}, {47, 2}, {48, 3}, {39, 1}, + {40, 2}, {41, 3}, {68, 1}}}, + {2640, + {{54, 1}, + {23, 1}, + {26, 1}, + {57, 1}, + {55, 1}, + {39, 1}, + {11, 1}, + {12, 1}, + {35, 2}, + {16, 1}, + {31, 1}, + {6, 1}, + {37, 1}, + {24, 1}, + {64, 1}, + {33, 1}, + {36, 1}, + {56, 2}}}, + {2644, {{27, 1}, {18, 1}}}, + {2647, {{22, 1}, {14, 1}}}, + {2650, {{21, 1}, {15, 1}}}, + {2653, {{75, 1}, {78, 2}, {85, 3}, {36, 1}, {55, 1}, {48, 1}, {50, 2}, {51, 1}, {52, 2}, + {54, 3}, {37, 1}, {49, 2}, {83, 1}, {84, 2}, {91, 3}, {13, 1}, {14, 2}, {76, 3}, + {10, 1}, {74, 2}, {88, 3}, {81, 1}, {86, 2}, {87, 3}, {72, 1}, {77, 2}, {73, 1}, + {82, 2}, {79, 1}, {80, 2}, {89, 1}, {90, 2}, {26, 1}, {30, 1}, {20, 1}, {64, 1}, + {63, 1}, {68, 1}, {57, 1}, {32, 1}, {21, 1}, {3, 1}}}, + {2654, + {{14, 1}, + {23, 1}, + {24, 2}, + {20, 1}, + {21, 2}, + {25, 3}, + {15, 1}, + {16, 2}, + {26, 1}, + {27, 2}, + {28, 3}, + {7, 1}, + {29, 2}, + {5, 1}, + {18, 2}, + {10, 1}, + {11, 2}}}, + {2657, + {{70, 1}, {71, 1}, {74, 2}, {75, 1}, {64, 1}, {65, 2}, {73, 3}, {66, 1}, {69, 2}, {72, 3}}}, + {2658, {{18, 1}, {19, 1}, {30, 1}, {31, 2}, {32, 1}, {6, 1}, {10, 1}, {12, 1}, {14, 1}}}, + {2660, {{12, 1}, {33, 1}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, {6, 2}, + {13, 3}, {52, 1}, {45, 1}, {47, 2}, {48, 1}, {49, 2}, {51, 3}, + {34, 1}, {46, 2}, {15, 1}, {16, 2}, {23, 1}, {27, 1}, {29, 1}}}, + {2661, + {{14, 1}, + {23, 1}, + {24, 2}, + {20, 1}, + {21, 2}, + {25, 3}, + {15, 1}, + {16, 2}, + {26, 1}, + {27, 2}, + {28, 3}, + {7, 1}, + {29, 2}, + {5, 1}, + {18, 2}, + {10, 1}, + {11, 2}}}, + {2677, + {{32, 1}, {34, 2}, {25, 1}, {26, 2}, {19, 1}, {31, 2}, {13, 1}, {23, 2}, {24, 3}, {17, 1}, + {7, 1}, {20, 1}, {22, 2}, {33, 3}, {6, 1}, {8, 2}, {11, 3}, {15, 1}, {18, 2}, {30, 3}}}, + {2682, + {{6, 1}, {7, 2}, {8, 3}, {61, 1}, {3, 1}, {4, 2}, {9, 3}, {17, 1}, {64, 2}, {67, 3}, + {66, 1}, {76, 2}, {27, 1}, {28, 2}, {21, 1}, {22, 2}, {23, 1}, {24, 2}, {26, 3}, {75, 1}, + {74, 1}, {77, 2}, {78, 3}, {70, 1}, {71, 2}, {14, 1}, {65, 2}, {69, 3}, {60, 1}, {62, 2}}}, + {2698, {{27, 1}, {23, 1}, {25, 2}, {13, 1}, {18, 1}}}, + {2708, + {{16, 1}, {25, 2}, {20, 1}, {10, 1}, {15, 1}, {21, 2}, {13, 1}, {17, 2}, {7, 1}, {11, 2}}}, + {2712, {{4, 1}}}, + {2746, + {{41, 1}, + {50, 1}, + {51, 2}, + {47, 1}, + {48, 2}, + {52, 3}, + {42, 1}, + {43, 2}, + {53, 1}, + {54, 2}, + {55, 3}, + {34, 1}, + {56, 2}, + {32, 1}, + {45, 2}, + {37, 1}, + {38, 2}}}, + {2762, {{69, 1}, {72, 2}, {87, 3}, {12, 1}, {33, 1}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, + {6, 2}, {13, 3}, {52, 1}, {45, 1}, {47, 2}, {48, 1}, {49, 2}, {51, 3}, {34, 1}, + {46, 2}, {80, 1}, {85, 2}, {86, 3}, {82, 1}, {83, 2}, {84, 3}, {75, 1}, {76, 2}, + {91, 3}, {79, 1}, {89, 2}, {90, 3}, {65, 1}, {71, 2}, {66, 1}, {81, 2}, {73, 1}, + {78, 2}, {59, 1}, {77, 2}, {15, 1}, {16, 2}, {23, 1}, {27, 1}, {29, 1}}}, + {2763, + {{44, 1}, {53, 1}, {54, 2}, {50, 1}, {51, 2}, {55, 3}, {45, 1}, {46, 2}, {56, 1}, {57, 2}, + {58, 3}, {37, 1}, {59, 2}, {35, 1}, {48, 2}, {40, 1}, {41, 2}, {25, 1}, {27, 2}, {28, 3}, + {24, 1}, {26, 2}, {13, 1}, {14, 2}, {17, 3}, {15, 1}, {16, 2}, {20, 3}, {21, 1}, {6, 1}, + {9, 2}, {11, 1}, {18, 2}, {19, 3}, {1, 1}, {4, 2}, {5, 3}}}, + {2768, {{39, 1}, {17, 1}, {12, 1}, {10, 1}, {38, 1}}}, + {2814, + {{5, 1}, + {7, 1}, + {58, 1}, + {69, 1}, + {59, 1}, + {61, 1}, + {24, 1}, + {42, 2}, + {56, 1}, + {68, 2}, + {60, 1}, + {47, 1}, + {48, 2}, + {27, 1}, + {34, 1}}}, + {2844, {{10, 1}}}, + {2846, + {{17, 1}, + {20, 2}, + {18, 1}, + {23, 1}, + {16, 1}, + {19, 2}, + {6, 1}, + {29, 1}, + {28, 1}, + {33, 1}, + {10, 1}, + {7, 1}, + {1, 1}}}, + {2855, {{17, 1}, {14, 1}}}, + {2856, + {{47, 1}, + {43, 1}, + {45, 2}, + {37, 1}, + {48, 1}, + {49, 2}, + {31, 1}, + {32, 2}, + {36, 1}, + {25, 1}, + {27, 2}, + {28, 3}, + {13, 1}, + {14, 2}}}, + {2867, {{2, 1}}}, + {2869, {{12, 1}, {33, 1}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, {6, 2}, + {13, 3}, {52, 1}, {45, 1}, {47, 2}, {48, 1}, {49, 2}, {51, 3}, + {34, 1}, {46, 2}, {15, 1}, {16, 2}, {23, 1}, {27, 1}, {29, 1}}}, + {2881, + {{13, 1}, + {9, 1}, + {5, 1}, + {58, 1}, + {29, 1}, + {38, 1}, + {59, 1}, + {60, 1}, + {2, 1}, + {14, 2}, + {34, 1}, + {61, 1}, + {43, 1}}}, + {2884, + {{12, 1}, {15, 2}, {29, 3}, {81, 1}, {27, 1}, {28, 2}, {143, 3}, {24, 1}, {25, 2}, {26, 3}, + {18, 1}, {19, 2}, {32, 3}, {22, 1}, {30, 2}, {31, 3}, {8, 1}, {14, 2}, {9, 1}, {23, 2}, + {16, 1}, {21, 2}, {141, 1}, {142, 2}, {69, 1}, {54, 1}, {124, 1}, {129, 1}}}, + {2889, {{13, 1}, {18, 2}, {26, 1}, {23, 1}, {27, 1}, {17, 1}, {19, 1}, {15, 1}}}, + {2892, {{44, 1}, {49, 1}, {43, 1}, {30, 1}, {34, 2}, {40, 1}, {45, 2}, + {42, 1}, {46, 2}, {47, 3}, {32, 1}, {36, 2}, {31, 1}, {33, 2}, + {35, 3}, {25, 1}, {26, 2}, {27, 3}, {17, 1}, {12, 1}, {10, 1}}}, + {2901, {{13, 1}, {18, 1}}}, + {2905, {{13, 1}, {18, 2}, {26, 1}, {23, 1}, {27, 1}, {17, 1}, {19, 1}, {15, 1}}}, + {2909, {{48, 1}, {49, 2}, {50, 3}, {16, 1}, {27, 2}, {31, 3}, {11, 1}, {17, 2}, {28, 3}, + {12, 1}, {24, 2}, {37, 3}, {53, 1}, {35, 1}, {36, 2}, {18, 1}, {20, 2}, {25, 1}, + {26, 2}, {30, 3}, {23, 1}, {33, 2}, {10, 1}, {19, 2}, {9, 1}, {29, 2}, {56, 1}, + {57, 2}, {62, 3}, {54, 1}, {60, 2}, {46, 1}, {52, 1}, {40, 1}, {41, 2}, {43, 3}}}, + {2912, {{14, 1}}}, + {2944, {{40, 1}}}, + {2953, {{71, 1}, {74, 2}, {89, 3}, {12, 1}, {33, 1}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, + {6, 2}, {13, 3}, {52, 1}, {45, 1}, {47, 2}, {48, 1}, {49, 2}, {51, 3}, {34, 1}, + {46, 2}, {82, 1}, {87, 2}, {88, 3}, {84, 1}, {85, 2}, {86, 3}, {77, 1}, {78, 2}, + {93, 3}, {81, 1}, {91, 2}, {92, 3}, {67, 1}, {73, 2}, {68, 1}, {83, 2}, {75, 1}, + {80, 2}, {61, 1}, {79, 2}, {15, 1}, {16, 2}, {23, 1}, {27, 1}, {29, 1}}}, + {2960, + {{12, 1}, + {13, 2}, + {14, 3}, + {17, 1}, + {20, 1}, + {21, 2}, + {26, 3}, + {18, 1}, + {24, 2}, + {10, 1}, + {16, 1}, + {4, 1}, + {5, 2}, + {7, 3}}}, + {2961, {{59, 1}, {41, 1}, {36, 1}, {34, 1}, {58, 1}}}, + {2967, {{46, 1}, {16, 1}, {43, 1}, {44, 2}, {45, 3}, {39, 1}, {40, 2}, {47, 3}, + {35, 1}, {28, 1}, {30, 2}, {31, 1}, {32, 2}, {34, 3}, {17, 1}, {29, 2}, + {49, 1}, {50, 2}, {6, 1}, {10, 1}, {12, 1}, {62, 1}}}, + {2968, + {{13, 1}, + {18, 2}, + {21, 3}, + {10, 1}, + {24, 2}, + {30, 3}, + {17, 1}, + {23, 2}, + {26, 3}, + {12, 1}, + {19, 2}, + {8, 1}, + {9, 2}, + {27, 3}, + {20, 1}, + {22, 2}, + {28, 3}, + {15, 1}, + {25, 2}}}, + {2977, {{55, 1}, {56, 1}, {48, 1}, {52, 2}, {60, 3}}}, + {2978, {{28, 1}, {19, 1}, {12, 1}}}, + {2983, {{33, 1}, {12, 1}, {71, 1}, {74, 2}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, {6, 2}, + {13, 3}, {72, 1}, {77, 1}, {70, 1}, {73, 2}, {52, 1}, {45, 1}, {47, 2}, {48, 1}, + {49, 2}, {51, 3}, {34, 1}, {46, 2}, {15, 1}, {16, 2}, {23, 1}, {27, 1}, {60, 1}, + {89, 1}, {88, 1}, {93, 1}, {64, 1}, {29, 1}, {61, 1}, {55, 1}}}, + {2984, {{14, 1}, {19, 2}, {22, 3}, {83, 1}, {11, 1}, {25, 2}, {31, 3}, {43, 1}, {76, 1}, + {80, 2}, {84, 3}, {73, 1}, {74, 2}, {81, 3}, {68, 1}, {66, 1}, {71, 1}, {72, 2}, + {77, 3}, {62, 1}, {78, 2}, {82, 3}, {52, 1}, {53, 2}, {49, 1}, {50, 2}, {54, 3}, + {44, 1}, {45, 2}, {55, 1}, {56, 2}, {57, 3}, {36, 1}, {58, 2}, {34, 1}, {47, 2}, + {39, 1}, {40, 2}, {18, 1}, {24, 2}, {27, 3}, {13, 1}, {20, 2}, {9, 1}, {10, 2}, + {28, 3}, {21, 1}, {23, 2}, {29, 3}, {16, 1}, {26, 2}}}, + {3017, {{20, 1}, {10, 1}, {4, 1}}}, + {3028, {{2, 1}}}, + {3030, {{1, 1}, {39, 1}, {38, 1}}}, + {3032, + {{22, 2}, + {32, 3}, + {59, 1}, + {62, 2}, + {65, 3}, + {55, 1}, + {60, 2}, + {56, 1}, + {57, 2}, + {63, 3}, + {51, 1}, + {47, 1}, + {64, 2}, + {40, 1}, + {41, 2}, + {37, 1}, + {38, 1}, + {21, 1}, + {9, 1}}}, + {3036, {{2, 1}}}, + {3053, {{7, 1}}}, + {3069, {{9, 1}, {15, 2}, {19, 3}, {13, 1}, {42, 1}, {22, 1}, {23, 2}, {24, 3}, + {5, 1}, {6, 2}, {7, 3}, {3, 1}, {31, 2}, {35, 3}, {12, 1}, {18, 2}, + {20, 3}, {16, 1}, {17, 2}, {46, 3}, {28, 1}, {26, 1}, {37, 1}, {38, 2}}}, + {3091, {{4, 1}, {8, 2}, {5, 1}}}, + {3099, + {{12, 1}, {13, 1}, {5, 1}, {9, 2}, {17, 3}, {33, 1}, {34, 2}, {35, 3}, {39, 1}, {31, 1}}}, + {3139, {{15, 1}, {16, 1}, {3, 1}, {1, 1}}}, + {3158, {{6, 1}}}, + {3172, {{1, 1}}}, + {3175, + {{15, 1}, + {16, 2}, + {17, 1}, + {18, 2}, + {8, 1}, + {9, 2}, + {10, 3}, + {14, 1}, + {3, 1}, + {5, 2}, + {6, 3}, + {1, 1}}}, + {3176, + {{15, 1}, + {16, 2}, + {17, 1}, + {18, 2}, + {8, 1}, + {9, 2}, + {10, 3}, + {14, 1}, + {3, 1}, + {5, 2}, + {6, 3}, + {1, 1}}}, + {3179, {{14, 1}, {17, 2}, {32, 3}, {25, 1}, {30, 2}, {31, 3}, {27, 1}, {28, 2}, + {29, 3}, {20, 1}, {21, 2}, {36, 3}, {24, 1}, {34, 2}, {35, 3}, {10, 1}, + {16, 2}, {11, 1}, {26, 2}, {18, 1}, {23, 2}, {4, 1}, {22, 2}}}, + {3188, + {{15, 1}, + {16, 2}, + {17, 1}, + {18, 2}, + {8, 1}, + {9, 2}, + {10, 3}, + {14, 1}, + {3, 1}, + {5, 2}, + {6, 3}, + {1, 1}}}, + {3235, {{2, 1}}}, + {3263, + {{15, 1}, {65, 1}, {68, 2}, {54, 1}, {59, 2}, {67, 1}, {56, 1}, {57, 2}, {58, 3}, {20, 1}}}, + {3271, + {{5, 1}, + {24, 1}, + {12, 1}, + {13, 2}, + {17, 3}, + {21, 1}, + {22, 2}, + {11, 1}, + {14, 2}, + {15, 1}, + {18, 3}, + {19, 4}}}, + {3273, + {{5, 1}, + {24, 1}, + {12, 1}, + {13, 2}, + {17, 3}, + {21, 1}, + {22, 2}, + {11, 1}, + {14, 2}, + {15, 1}, + {18, 3}, + {19, 4}}}, + {3279, {{12, 1}}}, + {3287, {{13, 1}, {30, 2}, {21, 1}}}, + {3296, + {{43, 1}, {98, 1}, {106, 2}, {137, 1}, {128, 1}, {94, 2}, {170, 2}, {100, 2}, {151, 1}, + {110, 1}, {158, 1}, {159, 2}, {163, 3}, {167, 1}, {168, 2}, {69, 1}, {70, 2}, {65, 1}, + {157, 1}, {160, 2}, {161, 1}, {164, 3}, {165, 4}, {136, 3}, {139, 4}, {141, 5}, {140, 1}, + {144, 2}, {145, 3}, {130, 1}, {131, 2}, {133, 3}, {126, 1}, {134, 2}, {123, 1}, {124, 2}, + {138, 3}, {143, 1}, {121, 1}, {116, 1}, {117, 1}, {142, 2}, {101, 1}, {104, 2}, {111, 3}, + {99, 1}, {108, 2}, {102, 1}, {103, 2}, {62, 1}, {55, 1}, {57, 2}, {58, 1}, {59, 2}, + {61, 3}, {44, 1}, {56, 2}, {33, 1}, {37, 1}, {39, 1}}}, + {3297, {{80, 1}, {118, 1}, {119, 2}, {120, 3}, {123, 1}, {57, 1}, {84, 1}, {70, 1}, + {87, 1}, {91, 2}, {89, 1}, {92, 2}, {95, 3}, {79, 1}, {50, 1}, {54, 2}, + {58, 3}, {47, 1}, {48, 2}, {55, 3}, {42, 1}, {40, 1}, {45, 1}, {46, 2}, + {51, 3}, {36, 1}, {52, 2}, {56, 3}, {64, 1}, {61, 1}, {75, 2}, {78, 3}, + {63, 1}, {68, 2}, {126, 1}, {127, 2}, {132, 3}, {124, 1}, {130, 2}, {116, 1}, + {122, 1}, {110, 1}, {111, 2}, {113, 3}, {25, 1}, {27, 2}, {28, 3}, {24, 1}, + {26, 2}, {13, 1}, {14, 2}, {17, 3}, {15, 1}, {16, 2}, {20, 3}, {21, 1}, + {6, 1}, {9, 2}, {11, 1}, {18, 2}, {19, 3}, {1, 1}, {4, 2}, {5, 3}}}, + {3306, {{51, 1}, {13, 2}, {7, 2}, {11, 1}, {19, 2}, {23, 1}, {44, 1}, {48, 2}, {52, 3}, + {41, 1}, {42, 2}, {49, 3}, {36, 1}, {34, 1}, {39, 1}, {40, 2}, {45, 3}, {30, 1}, + {46, 2}, {50, 3}, {14, 1}, {17, 2}, {24, 3}, {12, 1}, {21, 2}, {15, 1}, {16, 2}}}, + {3311, + {{93, 1}, {106, 1}, {86, 1}, {96, 2}, {100, 3}, {25, 1}, {28, 2}, {43, 3}, {50, 1}, {51, 2}, + {52, 3}, {7, 1}, {8, 2}, {9, 3}, {4, 1}, {5, 2}, {10, 3}, {54, 1}, {56, 2}, {60, 3}, + {59, 1}, {73, 2}, {92, 1}, {99, 2}, {101, 3}, {95, 1}, {97, 2}, {98, 3}, {82, 1}, {83, 2}, + {76, 1}, {77, 2}, {78, 1}, {79, 2}, {81, 3}, {72, 1}, {71, 1}, {74, 2}, {84, 3}, {65, 1}, + {67, 2}, {61, 1}, {63, 2}, {64, 3}, {36, 1}, {41, 2}, {42, 3}, {38, 1}, {39, 2}, {40, 3}, + {31, 1}, {32, 2}, {47, 3}, {35, 1}, {45, 2}, {46, 3}, {21, 1}, {27, 2}, {22, 1}, {37, 2}, + {29, 1}, {34, 2}, {15, 1}, {33, 2}, {105, 1}, {108, 2}}}, + {3312, + {{13, 1}, {27, 2}, {33, 3}, {64, 1}, {66, 2}, {16, 1}, {21, 2}, {24, 3}, {126, 1}, + {135, 2}, {139, 3}, {117, 1}, {127, 2}, {136, 3}, {122, 1}, {133, 2}, {145, 3}, {143, 1}, + {144, 2}, {123, 1}, {129, 2}, {76, 1}, {97, 1}, {131, 1}, {134, 2}, {138, 3}, {132, 1}, + {141, 2}, {121, 1}, {128, 2}, {120, 1}, {137, 2}, {106, 1}, {107, 2}, {103, 1}, {104, 2}, + {108, 3}, {98, 1}, {99, 2}, {109, 1}, {110, 2}, {111, 3}, {90, 1}, {112, 2}, {88, 1}, + {101, 2}, {93, 1}, {94, 2}, {77, 1}, {80, 2}, {81, 1}, {70, 1}, {71, 2}, {79, 3}, + {72, 1}, {75, 2}, {78, 3}, {57, 1}, {58, 2}, {51, 1}, {63, 2}, {45, 1}, {55, 2}, + {56, 3}, {49, 1}, {39, 1}, {52, 1}, {54, 2}, {65, 3}, {38, 1}, {40, 2}, {43, 3}, + {47, 1}, {50, 2}, {62, 3}, {20, 1}, {26, 2}, {29, 3}, {15, 1}, {22, 2}, {11, 1}, + {12, 2}, {30, 3}, {23, 1}, {25, 2}, {31, 3}, {18, 1}, {28, 2}}}, + {3360, + {{153, 1}, {161, 2}, {230, 1}, {110, 2}, {155, 4}, {149, 3}, {233, 1}, {234, 2}, {107, 1}, + {108, 2}, {109, 3}, {241, 1}, {242, 2}, {264, 1}, {103, 1}, {104, 2}, {111, 3}, {165, 1}, + {227, 1}, {170, 1}, {171, 2}, {189, 1}, {187, 1}, {235, 1}, {236, 2}, {220, 1}, {218, 1}, + {207, 1}, {208, 2}, {156, 1}, {159, 2}, {166, 3}, {154, 1}, {163, 2}, {157, 1}, {158, 2}, + {137, 1}, {138, 2}, {139, 3}, {131, 1}, {134, 2}, {135, 3}, {122, 1}, {142, 2}, {143, 3}, + {113, 1}, {114, 2}, {253, 1}, {263, 2}}}, + {3361, {{45, 1}, {49, 2}, {47, 1}, {50, 2}, {53, 3}}}, + {3365, {{196, 1}, {298, 2}, {319, 1}, {251, 1}, {225, 1}, {226, 2}, {290, 1}, {296, 2}, + {338, 1}, {341, 2}, {277, 1}, {202, 1}, {203, 2}, {192, 1}, {204, 2}, {269, 3}, + {327, 1}, {329, 2}, {322, 2}, {318, 1}, {187, 6}, {300, 7}, {145, 2}, {138, 1}, + {141, 3}, {104, 3}, {78, 1}, {40, 2}, {355, 1}, {360, 1}}}, + {3386, {{51, 1}}}, + {3390, {{9, 1}, {29, 1}, {30, 3}, {35, 1}, {37, 2}, {2, 1}, {6, 2}, {4, 1}, {36, 1}}}, + {3401, {{26, 6}, {27, 7}, {9, 4}, {87, 5}, {109, 6}, {120, 7}, {25, 1}, {28, 3}, + {101, 1}, {63, 1}, {102, 1}, {33, 1}, {34, 3}, {62, 2}, {64, 3}, {65, 4}, + {104, 4}, {73, 1}, {107, 1}, {72, 1}, {6, 2}, {14, 4}, {99, 6}, {11, 9}, + {13, 12}, {5, 12}, {7, 13}, {88, 14}, {119, 13}, {124, 14}, {125, 15}, {111, 12}, + {112, 14}, {114, 15}, {121, 13}, {122, 14}, {30, 5}, {55, 6}, {56, 7}, {20, 7}}}, + {3402, {{2, 4}}}, + {3403, + {{32, 1}, + {42, 2}, + {30, 1}, + {31, 1}, + {33, 1}, + {13, 1}, + {29, 1}, + {3, 1}, + {9, 1}, + {35, 1}, + {36, 2}, + {23, 1}, + {34, 2}}}, + {3404, {{1, 1}, {4, 2}}}, + {3405, {{12, 1}, {36, 1}, {56, 1}, {57, 2}, {9, 1}, {10, 2}, {11, 3}, {5, 1}, {6, 2}, + {13, 3}, {80, 1}, {79, 1}, {81, 2}, {71, 1}, {76, 2}, {78, 3}, {74, 1}, {75, 2}, + {67, 1}, {60, 1}, {62, 2}, {63, 1}, {64, 2}, {66, 3}, {52, 1}, {53, 2}, {49, 1}, + {50, 2}, {46, 1}, {47, 2}, {43, 1}, {44, 2}, {40, 1}, {41, 2}, {37, 1}, {61, 2}, + {32, 1}, {33, 2}, {15, 1}, {16, 2}, {24, 1}, {28, 1}, {30, 1}}}, + {3406, {{33, 1}, {35, 2}, {45, 1}, {57, 2}, {70, 3}, {44, 1}, {50, 2}, {61, 3}, {49, 1}, + {60, 2}, {64, 3}, {68, 1}, {69, 2}, {51, 1}, {53, 2}, {58, 1}, {59, 2}, {63, 3}, + {56, 1}, {66, 2}, {43, 1}, {52, 2}, {42, 1}, {62, 2}, {26, 1}, {27, 2}, {20, 1}, + {32, 2}, {14, 1}, {24, 2}, {25, 3}, {18, 1}, {8, 1}, {21, 1}, {23, 2}, {34, 3}, + {7, 1}, {9, 2}, {12, 3}, {16, 1}, {19, 2}, {31, 3}}}, + {3415, + {{111, 1}, {116, 2}, {128, 3}, {32, 1}, {71, 1}, {39, 1}, {40, 2}, {87, 1}, {124, 1}, + {118, 1}, {120, 1}, {126, 2}, {129, 3}, {122, 1}, {109, 1}, {119, 2}, {127, 3}, {105, 1}, + {106, 2}, {125, 3}, {114, 1}, {115, 2}, {121, 3}, {61, 1}, {50, 1}, {58, 1}, {86, 1}, + {88, 2}, {78, 1}, {83, 2}, {85, 3}, {81, 1}, {82, 2}, {35, 1}, {23, 1}, {102, 1}, + {98, 1}, {99, 2}, {101, 3}, {94, 1}, {96, 2}}}, + {3416, {{44, 1}, {46, 2}, {48, 1}, {28, 1}}}, + {3417, {{3, 1}, {4, 2}, {5, 3}, {6, 4}}}, +}; + +}; + +int lookup_jak3_texture_dest_offset(int tpage, int texture_idx) { + auto it = data.find(tpage); + if (it == data.end()) { + return 0; + } + for (auto& p : it->second) { + if (p.first == texture_idx) { + return p.second; + } + } + return 0; +} \ No newline at end of file diff --git a/game/graphics/jak3_texture_remap.h b/game/graphics/jak3_texture_remap.h new file mode 100644 index 0000000000..2d7f2c8bdf --- /dev/null +++ b/game/graphics/jak3_texture_remap.h @@ -0,0 +1,3 @@ +#pragma once + +int lookup_jak3_texture_dest_offset(int tpage, int texture_idx); \ No newline at end of file diff --git a/game/graphics/opengl_renderer/BlitDisplays.cpp b/game/graphics/opengl_renderer/BlitDisplays.cpp index 9f4d72c4e5..059e9bb7a4 100644 --- a/game/graphics/opengl_renderer/BlitDisplays.cpp +++ b/game/graphics/opengl_renderer/BlitDisplays.cpp @@ -13,6 +13,9 @@ void BlitDisplays::init_textures(TexturePool& texture_pool, GameVersion version) case GameVersion::Jak2: tbp = 0x3300; break; + case GameVersion::Jak3: + tbp = 0x3300; // assuming this for now... + break; default: ASSERT_NOT_REACHED(); } diff --git a/game/graphics/opengl_renderer/CollideMeshRenderer.cpp b/game/graphics/opengl_renderer/CollideMeshRenderer.cpp index ba60a1b6aa..c96387cd47 100644 --- a/game/graphics/opengl_renderer/CollideMeshRenderer.cpp +++ b/game/graphics/opengl_renderer/CollideMeshRenderer.cpp @@ -148,6 +148,7 @@ void CollideMeshRenderer::init_pat_colors(GameVersion version) { mode_colors = &mode_colors_jak1; break; case GameVersion::Jak2: + case GameVersion::Jak3: material_colors = &material_colors_jak2; event_colors = &event_colors_jak2; mode_colors = &mode_colors_jak2; diff --git a/game/graphics/opengl_renderer/DirectRenderer.cpp b/game/graphics/opengl_renderer/DirectRenderer.cpp index bcf7585150..e8e4ae290f 100644 --- a/game/graphics/opengl_renderer/DirectRenderer.cpp +++ b/game/graphics/opengl_renderer/DirectRenderer.cpp @@ -818,7 +818,7 @@ void DirectRenderer::handle_ad(const u8* data, handle_scissor(value); break; case GsRegisterAddress::XYOFFSET_1: - ASSERT(render_state->version == GameVersion::Jak2); // hardcoded jak 2 scissor vals in handle + ASSERT(render_state->version >= GameVersion::Jak2); // hardcoded jak 2 scissor vals in handle handle_xyoffset(value); break; case GsRegisterAddress::COLCLAMP: diff --git a/game/graphics/opengl_renderer/EyeRenderer.cpp b/game/graphics/opengl_renderer/EyeRenderer.cpp index 678486a1a2..10d74cd9ab 100644 --- a/game/graphics/opengl_renderer/EyeRenderer.cpp +++ b/game/graphics/opengl_renderer/EyeRenderer.cpp @@ -24,8 +24,13 @@ void EyeRenderer::init_textures(TexturePool& texture_pool, GameVersion version) break; case GameVersion::Jak2: // NOTE: using jak 1's address because jak 2's breaks some ocean stuff. + // this is a little suspicious, I think we're possibly just getting lucky here. tbp += EYE_BASE_BLOCK_JAK1; break; + case GameVersion::Jak3: + // for jak 3, go back to using the right TBP. + tbp += EYE_BASE_BLOCK_JAK3; + break; default: ASSERT_NOT_REACHED(); } diff --git a/game/graphics/opengl_renderer/EyeRenderer.h b/game/graphics/opengl_renderer/EyeRenderer.h index 67d070df81..b9c24c504d 100644 --- a/game/graphics/opengl_renderer/EyeRenderer.h +++ b/game/graphics/opengl_renderer/EyeRenderer.h @@ -8,6 +8,7 @@ constexpr int EYE_BASE_BLOCK_JAK1 = 8160; constexpr int EYE_BASE_BLOCK_JAK2 = 3968; +constexpr int EYE_BASE_BLOCK_JAK3 = 504; constexpr int NUM_EYE_PAIRS = 20; constexpr int SINGLE_EYE_SIZE = 32; diff --git a/game/graphics/opengl_renderer/OpenGLRenderer.cpp b/game/graphics/opengl_renderer/OpenGLRenderer.cpp index 44231af314..527500cfcd 100644 --- a/game/graphics/opengl_renderer/OpenGLRenderer.cpp +++ b/game/graphics/opengl_renderer/OpenGLRenderer.cpp @@ -98,6 +98,9 @@ OpenGLRenderer::OpenGLRenderer(std::shared_ptr texture_pool, case GameVersion::Jak2: m_texture_animator = std::make_shared(m_render_state.shaders, common_level); break; + case GameVersion::Jak3: + // for now, no texture animation for jak3... + break; default: ASSERT(false); } @@ -114,11 +117,221 @@ OpenGLRenderer::OpenGLRenderer(std::shared_ptr texture_pool, case GameVersion::Jak2: init_bucket_renderers_jak2(); break; + case GameVersion::Jak3: + init_bucket_renderers_jak3(); + break; default: ASSERT(false); } } +void OpenGLRenderer::init_bucket_renderers_jak3() { + using namespace jak3; + m_bucket_renderers.resize((int)BucketId::MAX_BUCKETS); + m_bucket_categories.resize((int)BucketId::MAX_BUCKETS, BucketCategory::OTHER); + std::shared_ptr texture_animator = nullptr; // todo tex anim + { + auto p = scoped_prof("render-inits"); + + m_blit_displays = + init_bucket_renderer("blit", BucketCategory::OTHER, BucketId::BLIT_START); + init_bucket_renderer("vis", BucketCategory::OTHER, BucketId::BUCKET_2); + + // 4 + 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)) + // 10 + init_bucket_renderer( + fmt::format("tex-l{}-tfrag", i), BucketCategory::TEX, + GET_BUCKET_ID_FOR_LIST(BucketId::TEX_L0_TFRAG, BucketId::TEX_L1_TFRAG, i), + texture_animator); + // 11 + init_bucket_renderer( + fmt::format("tfrag-l{}-tfrag", i), BucketCategory::TFRAG, + GET_BUCKET_ID_FOR_LIST(BucketId::TFRAG_L0_TFRAG, BucketId::TFRAG_L1_TFRAG, i), + std::vector{tfrag3::TFragmentTreeKind::NORMAL}, false, i, anim_slot_array()); + Tie3* tie = init_bucket_renderer( + fmt::format("tie-l{}-tfrag", i), BucketCategory::TIE, + GET_BUCKET_ID_FOR_LIST(BucketId::TIE_L0_TFRAG, BucketId::TIE_L1_TFRAG, i), i); + init_bucket_renderer( + fmt::format("etie-l{}-tfrag", i), BucketCategory::TIE, + GET_BUCKET_ID_FOR_LIST(BucketId::ETIE_L0_TFRAG, BucketId::ETIE_L1_TFRAG, i), tie, + tfrag3::TieCategory::NORMAL_ENVMAP); + + // 17 + 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("tex-l{}-shrub", i), BucketCategory::TEX, + GET_BUCKET_ID_FOR_LIST(BucketId::TEX_L0_SHRUB, BucketId::TEX_L1_SHRUB, i), + m_texture_animator); + init_bucket_renderer( + fmt::format("shrub-l{}-shrub", i), BucketCategory::SHRUB, + GET_BUCKET_ID_FOR_LIST(BucketId::SHRUB_L0_SHRUB, BucketId::SHRUB_L1_SHRUB, i)); + 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); + + // 230 + init_bucket_renderer( + fmt::format("tex-l{}-alpha", i), BucketCategory::TEX, + GET_BUCKET_ID_FOR_LIST(BucketId::TEX_L0_ALPHA, BucketId::TEX_L1_ALPHA, i), + m_texture_animator); + init_bucket_renderer( + fmt::format("tfrag-t-l{}-alpha", i), BucketCategory::TFRAG, + GET_BUCKET_ID_FOR_LIST(BucketId::TFRAG_L0_ALPHA, BucketId::TFRAG_L1_ALPHA, i), + std::vector{tfrag3::TFragmentTreeKind::TRANS}, false, i, anim_slot_array()); + init_bucket_renderer( + fmt::format("tie-t-l{}-alpha", i), BucketCategory::TIE, + GET_BUCKET_ID_FOR_LIST(BucketId::TIE_L0_ALPHA, BucketId::TIE_L1_ALPHA, i), tie, + tfrag3::TieCategory::TRANS); + init_bucket_renderer( + fmt::format("etie-l{}-alpha", i), BucketCategory::TIE, + GET_BUCKET_ID_FOR_LIST(BucketId::ETIE_L0_ALPHA, BucketId::ETIE_L1_ALPHA, i), tie, + tfrag3::TieCategory::TRANS_ENVMAP); + 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("tie-w-l{}-water", i), BucketCategory::TIE, + GET_BUCKET_ID_FOR_LIST(BucketId::TIE_L0_WATER, BucketId::TIE_L1_WATER, i), tie, + tfrag3::TieCategory::WATER); + init_bucket_renderer( + fmt::format("etie-l{}-water", i), BucketCategory::TIE, + GET_BUCKET_ID_FOR_LIST(BucketId::ETIE_L0_WATER, BucketId::ETIE_L1_WATER, i), tie, + tfrag3::TieCategory::WATER_ENVMAP); + } + + // 340 + init_bucket_renderer("tex-lcom-tfrag", BucketCategory::TEX, + BucketId::TEX_LCOM_TFRAG, texture_animator); + init_bucket_renderer("merc-lcom-tfrag", BucketCategory::MERC, + BucketId::MERC_LCOM_TFRAG, m_merc2); + // 345 + init_bucket_renderer("tex-lcom-shrub", BucketCategory::TEX, + BucketId::TEX_LCOM_SHRUB, texture_animator); + init_bucket_renderer("merc-lcom-shrub", BucketCategory::MERC, + BucketId::MERC_LCOM_SHRUB, m_merc2); + // 351 + for (int i = 0; i < LEVEL_MAX; i++) { +#define GET_BUCKET_ID_FOR_LIST(bkt1, bkt2, idx) ((int)(bkt1) + ((int)(bkt2) - (int)(bkt1)) * (idx)) + init_bucket_renderer( + fmt::format("tex-l{}-pris", i), BucketCategory::TEX, + GET_BUCKET_ID_FOR_LIST(BucketId::TEX_L0_PRIS, BucketId::TEX_L1_PRIS, i), + texture_animator); + init_bucket_renderer( + fmt::format("tex-l{}-pris2", i), BucketCategory::TEX, + GET_BUCKET_ID_FOR_LIST(BucketId::TEX_L0_PRIS2, BucketId::TEX_L1_PRIS2, i), + texture_animator); + + 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("merc-l{}-pris2", i), BucketCategory::MERC, + GET_BUCKET_ID_FOR_LIST(BucketId::MERC_L0_PRIS2, BucketId::MERC_L1_PRIS2, i), m_merc2); + } + + // 401 + init_bucket_renderer("tex-lcom-pris", BucketCategory::TEX, + BucketId::TEX_LCOM_PRIS, texture_animator); + init_bucket_renderer("merc-lcom-pris", BucketCategory::MERC, + BucketId::MERC_LCOM_PRIS, m_merc2); + + // 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++) { +#define GET_BUCKET_ID_FOR_LIST(bkt1, bkt2, idx) ((int)(bkt1) + ((int)(bkt2) - (int)(bkt1)) * (idx)) + // 463 + init_bucket_renderer( + fmt::format("tex-l{}-water", i), BucketCategory::TEX, + GET_BUCKET_ID_FOR_LIST(BucketId::TEX_L0_WATER, BucketId::TEX_L1_WATER, i), + texture_animator); + 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); + // 466 + init_bucket_renderer( + fmt::format("tfrag-l{}-water", i), BucketCategory::TFRAG, + GET_BUCKET_ID_FOR_LIST(BucketId::TFRAG_L0_WATER, BucketId::TFRAG_L1_WATER, i), + std::vector{tfrag3::TFragmentTreeKind::WATER}, false, i, anim_slot_array()); + } + + // 563 + init_bucket_renderer("tex-lcom-water", BucketCategory::TEX, + BucketId::TEX_LCOM_WATER, texture_animator); + init_bucket_renderer("merc-lcom-water", BucketCategory::MERC, + BucketId::MERC_LCOM_WATER, m_merc2); + + // 568 + init_bucket_renderer("tex-sprite", BucketCategory::TEX, + BucketId::TEX_SPRITE, texture_animator); + init_bucket_renderer("particles", BucketCategory::SPRITE, BucketId::PARTICLES); + init_bucket_renderer("generic-sprite-3", BucketCategory::OTHER, + BucketId::GENERIC_SPRITE_3, m_generic2, + Generic2::Mode::LIGHTNING); + // 575 + init_bucket_renderer("tex-warp", BucketCategory::TEX, BucketId::TEX_WARP, + texture_animator); + + init_bucket_renderer("debug-no-zbuf1", BucketCategory::OTHER, + BucketId::DEBUG_NO_ZBUF1, m_texture_animator, true); + // 578 + init_bucket_renderer("tex-hud-hud-alpha", BucketCategory::TEX, + BucketId::TEX_HUD_HUD_ALPHA, texture_animator); + + init_bucket_renderer("tex-hud-hud-alpha", BucketCategory::TEX, + BucketId::TEX_HUD_HUD_ALPHA, texture_animator); + init_bucket_renderer("hud-draw-hud-alpha", BucketCategory::OTHER, + BucketId::HUD_DRAW_HUD_ALPHA, 0x8000); + init_bucket_renderer("tex-hud-pris2", BucketCategory::TEX, + BucketId::TEX_HUD_PRIS2, texture_animator); + init_bucket_renderer("hud-draw-pris2", BucketCategory::TEX, + BucketId::HUD_DRAW_PRIS2, texture_animator); + init_bucket_renderer("progress", BucketCategory::OTHER, BucketId::BUCKET582, + 0x8000); + + // 583 + init_bucket_renderer("debug", BucketCategory::OTHER, BucketId::DEBUG, 0x8000); + // 584 + init_bucket_renderer("debug-no-zbuf2", BucketCategory::OTHER, + BucketId::DEBUG_NO_ZBUF2, 0x8000); + init_bucket_renderer("debug-menu", BucketCategory::OTHER, BucketId::DEBUG_MENU, + 0x8000); + + auto eye_renderer = std::make_unique("eyes", 0); + m_render_state.eye_renderer = eye_renderer.get(); + m_jak3_eye_renderer = std::move(eye_renderer); + + // for any unset renderers, just set them to an EmptyBucketRenderer. + for (size_t i = 0; i < m_bucket_renderers.size(); i++) { + if (!m_bucket_renderers[i]) { + init_bucket_renderer(fmt::format("bucket-{}", i), + BucketCategory::OTHER, i); + } + + m_bucket_renderers[i]->init_shaders(m_render_state.shaders); + m_bucket_renderers[i]->init_textures(*m_render_state.texture_pool, GameVersion::Jak3); + } + m_jak3_eye_renderer->init_shaders(m_render_state.shaders); + m_jak3_eye_renderer->init_textures(*m_render_state.texture_pool, GameVersion::Jak3); + } +} + void OpenGLRenderer::init_bucket_renderers_jak2() { using namespace jak2; m_bucket_renderers.resize((int)BucketId::MAX_BUCKETS); @@ -266,6 +479,9 @@ void OpenGLRenderer::init_bucket_renderers_jak2() { BucketId::TEX_LCOM_PRIS, m_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); init_bucket_renderer("tex-lcom-water", BucketCategory::TEX, BucketId::TEX_LCOM_WATER, m_texture_animator); init_bucket_renderer("merc-lcom-water", BucketCategory::MERC, @@ -842,6 +1058,12 @@ void OpenGLRenderer::draw_renderer_selection_window() { ImGui::TreePop(); } } + if (m_jak3_eye_renderer) { + if (ImGui::TreeNode("Eyes")) { + m_jak3_eye_renderer->draw_debug_window(); + ImGui::TreePop(); + } + } ImGui::End(); } @@ -1054,6 +1276,48 @@ void OpenGLRenderer::dispatch_buckets_jak2(DmaFollower dma, // TODO ending data. } +void OpenGLRenderer::dispatch_buckets_jak3(DmaFollower dma, + ScopedProfilerNode& prof, + bool sync_after_buckets) { + // The first thing the DMA chain should be a call to a common default-registers chain. + // this chain resets the state of the GS. After this is buckets + m_category_times.fill(0); + + m_render_state.buckets_base = dma.current_tag_offset(); // starts at 0 in jak 2 + m_render_state.next_bucket = m_render_state.buckets_base + 16; + m_render_state.bucket_for_vis_copy = (int)jak3::BucketId::BUCKET_2; + m_render_state.num_vis_to_copy = jak3::LEVEL_MAX; + + for (size_t bucket_id = 0; bucket_id < m_bucket_renderers.size(); bucket_id++) { + auto& renderer = m_bucket_renderers[bucket_id]; + auto bucket_prof = prof.make_scoped_child(renderer->name_and_id()); + g_current_renderer = renderer->name_and_id(); + // lg::info("Render: {} start", g_current_renderer); + renderer->render(dma, &m_render_state, bucket_prof); + if (sync_after_buckets) { + auto pp = scoped_prof("finish"); + glFinish(); + } + + // lg::info("Render: {} end", g_current_renderer); + // should have ended at the start of the next chain + ASSERT(dma.current_tag_offset() == m_render_state.next_bucket); + m_render_state.next_bucket += 16; + vif_interrupt_callback(bucket_id + 1); + m_category_times[(int)m_bucket_categories[bucket_id]] += bucket_prof.get_elapsed_time(); + + // hack to draw the collision mesh in the middle the drawing + if (bucket_id + 1 == (int)jak3::BucketId::TEX_L0_ALPHA && + Gfx::g_global_settings.collision_enable) { + auto p = prof.make_scoped_child("collision-draw"); + m_collide_renderer.render(&m_render_state, p); + } + } + vif_interrupt_callback(m_bucket_renderers.size()); + + // TODO ending data. +} + /*! * This function finds buckets and dispatches them to the appropriate part. */ @@ -1071,6 +1335,9 @@ void OpenGLRenderer::dispatch_buckets(DmaFollower dma, case GameVersion::Jak2: dispatch_buckets_jak2(dma, prof, sync_after_buckets); break; + case GameVersion::Jak3: + dispatch_buckets_jak3(dma, prof, sync_after_buckets); + break; default: ASSERT(false); } diff --git a/game/graphics/opengl_renderer/OpenGLRenderer.h b/game/graphics/opengl_renderer/OpenGLRenderer.h index caabb961d4..bf2e165db4 100644 --- a/game/graphics/opengl_renderer/OpenGLRenderer.h +++ b/game/graphics/opengl_renderer/OpenGLRenderer.h @@ -46,7 +46,7 @@ struct RenderOptions { bool internal_res_screenshot = false; std::string screenshot_path; - float pmode_alp_register = 0.f; + float pmode_alp_register = 1.f; // when enabled, does a `glFinish()` after each major rendering pass. This blocks until the GPU // is done working, making it easier to profile GPU utilization. @@ -75,11 +75,13 @@ class OpenGLRenderer { void dispatch_buckets(DmaFollower dma, ScopedProfilerNode& prof, bool sync_after_buckets); void dispatch_buckets_jak1(DmaFollower dma, ScopedProfilerNode& prof, bool sync_after_buckets); void dispatch_buckets_jak2(DmaFollower dma, ScopedProfilerNode& prof, bool sync_after_buckets); + void dispatch_buckets_jak3(DmaFollower dma, ScopedProfilerNode& prof, bool sync_after_buckets); void do_pcrtc_effects(float alp, SharedRenderState* render_state, ScopedProfilerNode& prof); void blit_display(); void init_bucket_renderers_jak1(); void init_bucket_renderers_jak2(); + void init_bucket_renderers_jak3(); void draw_renderer_selection_window(); void finish_screenshot(const std::string& output_name, int px, @@ -133,5 +135,6 @@ class OpenGLRenderer { } m_fbo_state; std::unique_ptr m_jak2_eye_renderer; + std::unique_ptr m_jak3_eye_renderer; GameVersion m_version; }; diff --git a/game/graphics/opengl_renderer/ProgressRenderer.cpp b/game/graphics/opengl_renderer/ProgressRenderer.cpp index 1db82092f0..bdc27979d8 100644 --- a/game/graphics/opengl_renderer/ProgressRenderer.cpp +++ b/game/graphics/opengl_renderer/ProgressRenderer.cpp @@ -42,6 +42,9 @@ void ProgressRenderer::handle_frame(u64 val, break; case kMinimapFbp: // 126 m_fb_ctxt.emplace(m_minimap_fb); + // replace any other texture that the game loaded to this slot with our PC with the GPU + // one that we assume will get written to now. + render_state->texture_pool->move_existing_to_vram(m_minimap_gpu_tex, kMinimapVramAddr); m_offscreen_mode = true; break; default: diff --git a/game/graphics/opengl_renderer/background/Shrub.cpp b/game/graphics/opengl_renderer/background/Shrub.cpp index 623d5bb4f0..6747719347 100644 --- a/game/graphics/opengl_renderer/background/Shrub.cpp +++ b/game/graphics/opengl_renderer/background/Shrub.cpp @@ -45,7 +45,7 @@ void Shrub::render(DmaFollower& dma, SharedRenderState* render_state, ScopedProf memcpy(&m_pc_port_data, pc_port_data.data, sizeof(TfragPcPortData)); m_pc_port_data.level_name[11] = '\0'; - if (render_state->version == GameVersion::Jak2) { + if (render_state->version >= GameVersion::Jak2) { // jak 2 proto visibility auto proto_mask_data = dma.read_and_advance(); m_proto_vis_data = proto_mask_data.data; diff --git a/game/graphics/opengl_renderer/background/TFragment.cpp b/game/graphics/opengl_renderer/background/TFragment.cpp index a4efc78286..73260e0d65 100644 --- a/game/graphics/opengl_renderer/background/TFragment.cpp +++ b/game/graphics/opengl_renderer/background/TFragment.cpp @@ -99,7 +99,6 @@ void TFragment::render(DmaFollower& dma, if (m_my_id == render_state->bucket_for_vis_copy && dma.current_tag_vifcode1().kind == VifCode::Kind::PC_PORT) { DmaTransfer transfers[20]; - for (int i = 0; i < render_state->num_vis_to_copy; i++) { transfers[i] = dma.read_and_advance(); auto next0 = dma.read_and_advance(); diff --git a/game/graphics/opengl_renderer/background/Tie3.cpp b/game/graphics/opengl_renderer/background/Tie3.cpp index 51dc589451..4baea30232 100644 --- a/game/graphics/opengl_renderer/background/Tie3.cpp +++ b/game/graphics/opengl_renderer/background/Tie3.cpp @@ -319,7 +319,7 @@ bool Tie3::set_up_common_data_from_dma(DmaFollower& dma, SharedRenderState* rend memcpy(&m_wind_data, wind_data.data, sizeof(WindWork)); } - if (render_state->version == GameVersion::Jak2) { + if (render_state->version >= GameVersion::Jak2) { // jak 2 proto visibility auto proto_mask_data = dma.read_and_advance(); m_common_data.proto_vis_data = proto_mask_data.data; diff --git a/game/graphics/opengl_renderer/buckets.h b/game/graphics/opengl_renderer/buckets.h index 5601dab09e..9d174e3dc1 100644 --- a/game/graphics/opengl_renderer/buckets.h +++ b/game/graphics/opengl_renderer/buckets.h @@ -412,6 +412,664 @@ enum class BucketId { }; } +namespace jak3 { +enum class BucketId { + BUCKET_2 = 2, + BLIT_START = 3, + TEX_LCOM_SKY_PRE = 4, + OCEAN_MID_FAR = 6, + + TEX_L0_TFRAG = 10, + TFRAG_L0_TFRAG = 11, + TIE_L0_TFRAG = 12, + ETIE_L0_TFRAG = 13, + TFRAG_SCISSOR_L0_TFRAG = 14, + TIE_SCISSOR_L0_TFRAG = 15, + ETIE_SCISSOR_L0_TFRAG = 16, + MERC_L0_TFRAG = 17, + EMERC_L0_TFRAG = 18, + GMERC_L0_TFRAG = 19, + TIE_VANISH_L0_TFRAG = 20, + GMERC2_L0_TFRAG = 21, + + TEX_L1_TFRAG = 22, + TFRAG_L1_TFRAG = 23, + TIE_L1_TFRAG = 24, + ETIE_L1_TFRAG = 25, + TFRAG_SCISSOR_L1_TFRAG = 26, + TIE_SCISSOR_L1_TFRAG = 27, + ETIE_SCISSOR_L1_TFRAG = 28, + MERC_L1_TFRAG = 29, + EMERC_L1_TFRAG = 30, + GMERC_L1_TFRAG = 31, + TIE_VANISH_L1_TFRAG = 32, + GMERC2_L1_TFRAG = 33, + + TEX_L2_TFRAG = 34, + TFRAG_L2_TFRAG = 35, + TIE_L2_TFRAG = 36, + ETIE_L2_TFRAG = 37, + TFRAG_SCISSOR_L2_TFRAG = 38, + TIE_SCISSOR_L2_TFRAG = 39, + ETIE_SCISSOR_L2_TFRAG = 40, + MERC_L2_TFRAG = 41, + EMERC_L2_TFRAG = 42, + GMERC_L2_TFRAG = 43, + TIE_VANISH_L2_TFRAG = 44, + GMERC2_L2_TFRAG = 45, + + TEX_L3_TFRAG = 46, + TFRAG_L3_TFRAG = 47, + TIE_L3_TFRAG = 48, + ETIE_L3_TFRAG = 49, + TFRAG_SCISSOR_L3_TFRAG = 50, + TIE_SCISSOR_L3_TFRAG = 51, + ETIE_SCISSOR_L3_TFRAG = 52, + MERC_L3_TFRAG = 53, + EMERC_L3_TFRAG = 54, + GMERC_L3_TFRAG = 55, + TIE_VANISH_L3_TFRAG = 56, + GMERC2_L3_TFRAG = 57, + + TEX_L4_TFRAG = 58, + TFRAG_L4_TFRAG = 59, + TIE_L4_TFRAG = 60, + ETIE_L4_TFRAG = 61, + TFRAG_SCISSOR_L4_TFRAG = 62, + TIE_SCISSOR_L4_TFRAG = 63, + ETIE_SCISSOR_L4_TFRAG = 64, + MERC_L4_TFRAG = 65, + EMERC_L4_TFRAG = 66, + GMERC_L4_TFRAG = 67, + TIE_VANISH_L4_TFRAG = 68, + GMERC2_L4_TFRAG = 69, + + TEX_L5_TFRAG = 70, + TFRAG_L5_TFRAG = 71, + TIE_L5_TFRAG = 72, + ETIE_L5_TFRAG = 73, + TFRAG_SCISSOR_L5_TFRAG = 74, + TIE_SCISSOR_L5_TFRAG = 75, + ETIE_SCISSOR_L5_TFRAG = 76, + MERC_L5_TFRAG = 77, + EMERC_L5_TFRAG = 78, + GMERC_L5_TFRAG = 79, + TIE_VANISH_L5_TFRAG = 80, + GMERC2_L5_TFRAG = 81, + + TEX_L6_TFRAG = 82, + TFRAG_L6_TFRAG = 83, + TIE_L6_TFRAG = 84, + ETIE_L6_TFRAG = 85, + TFRAG_SCISSOR_L6_TFRAG = 86, + TIE_SCISSOR_L6_TFRAG = 87, + ETIE_SCISSOR_L6_TFRAG = 88, + MERC_L6_TFRAG = 89, + EMERC_L6_TFRAG = 90, + GMERC_L6_TFRAG = 91, + TIE_VANISH_L6_TFRAG = 92, + GMERC2_L6_TFRAG = 93, + + TEX_L7_TFRAG = 94, + TFRAG_L7_TFRAG = 95, + TIE_L7_TFRAG = 96, + ETIE_L7_TFRAG = 97, + TFRAG_SCISSOR_L7_TFRAG = 98, + TIE_SCISSOR_L7_TFRAG = 99, + ETIE_SCISSOR_L7_TFRAG = 100, + MERC_L7_TFRAG = 101, + EMERC_L7_TFRAG = 102, + GMERC_L7_TFRAG = 103, + TIE_VANISH_L7_TFRAG = 104, + GMERC2_L7_TFRAG = 105, + + TEX_L8_TFRAG = 106, + TFRAG_L8_TFRAG = 107, + TIE_L8_TFRAG = 108, + ETIE_L8_TFRAG = 109, + TFRAG_SCISSOR_L8_TFRAG = 110, + TIE_SCISSOR_L8_TFRAG = 111, + ETIE_SCISSOR_L8_TFRAG = 112, + MERC_L8_TFRAG = 113, + EMERC_L8_TFRAG = 114, + GMERC_L8_TFRAG = 115, + TIE_VANISH_L8_TFRAG = 116, + GMERC2_L8_TFRAG = 117, + + TEX_L9_TFRAG = 118, + TFRAG_L9_TFRAG = 119, + TIE_L9_TFRAG = 120, + ETIE_L9_TFRAG = 121, + TFRAG_SCISSOR_L9_TFRAG = 122, + TIE_SCISSOR_L9_TFRAG = 123, + ETIE_SCISSOR_L9_TFRAG = 124, + MERC_L9_TFRAG = 125, + EMERC_L9_TFRAG = 126, + GMERC_L9_TFRAG = 127, + TIE_VANISH_L9_TFRAG = 128, + GMERC2_L9_TFRAG = 129, + + TEX_L0_SHRUB = 130, + SHRUB_L0_SHRUB = 131, + SHRUB_NEAR_L0_SHRUB = 132, + BILLBOARD_L0_SHRUB = 133, + SHRUB_VANISH_L0_SHRUB = 134, + SHRUB_NEAR_TRANS_L0_SHRUB = 135, + MERC_L0_SHRUB = 136, + EMERC_L0_SHRUB = 137, + GMERC_L0_SHRUB = 138, + GMERC2_L0_SHRUB = 139, + + TEX_L1_SHRUB = 140, + SHRUB_L1_SHRUB = 141, + SHRUB_NEAR_L1_SHRUB = 142, + BILLBOARD_L1_SHRUB = 143, + SHRUB_VANISH_L1_SHRUB = 144, + SHRUB_NEAR_TRANS_L1_SHRUB = 145, + MERC_L1_SHRUB = 146, + EMERC_L1_SHRUB = 147, + GMERC_L1_SHRUB = 148, + GMERC2_L1_SHRUB = 149, + + TEX_L2_SHRUB = 150, + SHRUB_L2_SHRUB = 151, + SHRUB_NEAR_L2_SHRUB = 152, + BILLBOARD_L2_SHRUB = 153, + SHRUB_VANISH_L2_SHRUB = 154, + SHRUB_NEAR_TRANS_L2_SHRUB = 155, + MERC_L2_SHRUB = 156, + EMERC_L2_SHRUB = 157, + GMERC_L2_SHRUB = 158, + GMERC2_L2_SHRUB = 159, + + TEX_L3_SHRUB = 160, + SHRUB_L3_SHRUB = 161, + SHRUB_NEAR_L3_SHRUB = 162, + BILLBOARD_L3_SHRUB = 163, + SHRUB_VANISH_L3_SHRUB = 164, + SHRUB_NEAR_TRANS_L3_SHRUB = 165, + MERC_L3_SHRUB = 166, + EMERC_L3_SHRUB = 167, + GMERC_L3_SHRUB = 168, + GMERC2_L3_SHRUB = 169, + + TEX_L4_SHRUB = 170, + SHRUB_L4_SHRUB = 171, + SHRUB_NEAR_L4_SHRUB = 172, + BILLBOARD_L4_SHRUB = 173, + SHRUB_VANISH_L4_SHRUB = 174, + SHRUB_NEAR_TRANS_L4_SHRUB = 175, + MERC_L4_SHRUB = 176, + EMERC_L4_SHRUB = 177, + GMERC_L4_SHRUB = 178, + GMERC2_L4_SHRUB = 179, + + TEX_L5_SHRUB = 180, + SHRUB_L5_SHRUB = 181, + SHRUB_NEAR_L5_SHRUB = 182, + BILLBOARD_L5_SHRUB = 183, + SHRUB_VANISH_L5_SHRUB = 184, + SHRUB_NEAR_TRANS_L5_SHRUB = 185, + MERC_L5_SHRUB = 186, + EMERC_L5_SHRUB = 187, + GMERC_L5_SHRUB = 188, + GMERC2_L5_SHRUB = 189, + + TEX_L6_SHRUB = 190, + SHRUB_L6_SHRUB = 191, + SHRUB_NEAR_L6_SHRUB = 192, + BILLBOARD_L6_SHRUB = 193, + SHRUB_VANISH_L6_SHRUB = 194, + SHRUB_NEAR_TRANS_L6_SHRUB = 195, + MERC_L6_SHRUB = 196, + EMERC_L6_SHRUB = 197, + GMERC_L6_SHRUB = 198, + GMERC2_L6_SHRUB = 199, + + TEX_L7_SHRUB = 200, + SHRUB_L7_SHRUB = 201, + SHRUB_NEAR_L7_SHRUB = 202, + BILLBOARD_L7_SHRUB = 203, + SHRUB_VANISH_L7_SHRUB = 204, + SHRUB_NEAR_TRANS_L7_SHRUB = 205, + MERC_L7_SHRUB = 206, + EMERC_L7_SHRUB = 207, + GMERC_L7_SHRUB = 208, + GMERC2_L7_SHRUB = 209, + + TEX_L8_SHRUB = 210, + SHRUB_L8_SHRUB = 211, + SHRUB_NEAR_L8_SHRUB = 212, + BILLBOARD_L8_SHRUB = 213, + SHRUB_VANISH_L8_SHRUB = 214, + SHRUB_NEAR_TRANS_L8_SHRUB = 215, + MERC_L8_SHRUB = 216, + EMERC_L8_SHRUB = 217, + GMERC_L8_SHRUB = 218, + GMERC2_L8_SHRUB = 219, + + TEX_L9_SHRUB = 220, + SHRUB_L9_SHRUB = 221, + SHRUB_NEAR_L9_SHRUB = 222, + BILLBOARD_L9_SHRUB = 223, + SHRUB_VANISH_L9_SHRUB = 224, + SHRUB_NEAR_TRANS_L9_SHRUB = 225, + MERC_L9_SHRUB = 226, + EMERC_L9_SHRUB = 227, + GMERC_L9_SHRUB = 228, + GMERC2_L9_SHRUB = 229, + + TEX_L0_ALPHA = 230, + TFRAG_L0_ALPHA = 231, + TIE_L0_ALPHA = 232, + ETIE_L0_ALPHA = 233, + MERC_L0_ALPHA = 234, + EMERC_L0_ALPHA = 235, + GMERC_L0_ALPHA = 236, + TFRAG_SCISSOR_L0_ALPHA = 237, + TIE_SCISSOR_L0_ALPHA = 238, + ETIE_SCISSOR_L0_ALPHA = 239, + GMERC2_L0_ALPHA = 240, + + TEX_L1_ALPHA = 241, + TFRAG_L1_ALPHA = 242, + TIE_L1_ALPHA = 243, + ETIE_L1_ALPHA = 244, + MERC_L1_ALPHA = 245, + EMERC_L1_ALPHA = 246, + GMERC_L1_ALPHA = 247, + TFRAG_SCISSOR_L1_ALPHA = 248, + TIE_SCISSOR_L1_ALPHA = 249, + ETIE_SCISSOR_L1_ALPHA = 250, + GMERC2_L1_ALPHA = 251, + + TEX_L2_ALPHA = 252, + TFRAG_L2_ALPHA = 253, + TIE_L2_ALPHA = 254, + ETIE_L2_ALPHA = 255, + MERC_L2_ALPHA = 256, + EMERC_L2_ALPHA = 257, + GMERC_L2_ALPHA = 258, + TFRAG_SCISSOR_L2_ALPHA = 259, + TIE_SCISSOR_L2_ALPHA = 260, + ETIE_SCISSOR_L2_ALPHA = 261, + GMERC2_L2_ALPHA = 262, + + TEX_L3_ALPHA = 263, + TFRAG_L3_ALPHA = 264, + TIE_L3_ALPHA = 265, + ETIE_L3_ALPHA = 266, + MERC_L3_ALPHA = 267, + EMERC_L3_ALPHA = 268, + GMERC_L3_ALPHA = 269, + TFRAG_SCISSOR_L3_ALPHA = 270, + TIE_SCISSOR_L3_ALPHA = 271, + ETIE_SCISSOR_L3_ALPHA = 272, + GMERC2_L3_ALPHA = 273, + + TEX_L4_ALPHA = 274, + TFRAG_L4_ALPHA = 275, + TIE_L4_ALPHA = 276, + ETIE_L4_ALPHA = 277, + MERC_L4_ALPHA = 278, + EMERC_L4_ALPHA = 279, + GMERC_L4_ALPHA = 280, + TFRAG_SCISSOR_L4_ALPHA = 281, + TIE_SCISSOR_L4_ALPHA = 282, + ETIE_SCISSOR_L4_ALPHA = 283, + GMERC2_L4_ALPHA = 284, + + TEX_L5_ALPHA = 285, + TFRAG_L5_ALPHA = 286, + TIE_L5_ALPHA = 287, + ETIE_L5_ALPHA = 288, + MERC_L5_ALPHA = 289, + EMERC_L5_ALPHA = 290, + GMERC_L5_ALPHA = 291, + TFRAG_SCISSOR_L5_ALPHA = 292, + TIE_SCISSOR_L5_ALPHA = 293, + ETIE_SCISSOR_L5_ALPHA = 294, + GMERC2_L5_ALPHA = 295, + + TEX_L6_ALPHA = 296, + TFRAG_L6_ALPHA = 297, + TIE_L6_ALPHA = 298, + ETIE_L6_ALPHA = 299, + MERC_L6_ALPHA = 300, + EMERC_L6_ALPHA = 301, + GMERC_L6_ALPHA = 302, + TFRAG_SCISSOR_L6_ALPHA = 303, + TIE_SCISSOR_L6_ALPHA = 304, + ETIE_SCISSOR_L6_ALPHA = 305, + GMERC2_L6_ALPHA = 306, + + TEX_L7_ALPHA = 307, + TFRAG_L7_ALPHA = 308, + TIE_L7_ALPHA = 309, + ETIE_L7_ALPHA = 310, + MERC_L7_ALPHA = 311, + EMERC_L7_ALPHA = 312, + GMERC_L7_ALPHA = 313, + TFRAG_SCISSOR_L7_ALPHA = 314, + TIE_SCISSOR_L7_ALPHA = 315, + ETIE_SCISSOR_L7_ALPHA = 316, + GMERC2_L7_ALPHA = 317, + + TEX_L8_ALPHA = 318, + TFRAG_L8_ALPHA = 319, + TIE_L8_ALPHA = 320, + ETIE_L8_ALPHA = 321, + MERC_L8_ALPHA = 322, + EMERC_L8_ALPHA = 323, + GMERC_L8_ALPHA = 324, + TFRAG_SCISSOR_L8_ALPHA = 325, + TIE_SCISSOR_L8_ALPHA = 326, + ETIE_SCISSOR_L8_ALPHA = 327, + GMERC2_L8_ALPHA = 328, + + TEX_L9_ALPHA = 329, + TFRAG_L9_ALPHA = 330, + TIE_L9_ALPHA = 331, + ETIE_L9_ALPHA = 332, + MERC_L9_ALPHA = 333, + EMERC_L9_ALPHA = 334, + GMERC_L9_ALPHA = 335, + TFRAG_SCISSOR_L9_ALPHA = 336, + TIE_SCISSOR_L9_ALPHA = 337, + ETIE_SCISSOR_L9_ALPHA = 338, + GMERC2_L9_ALPHA = 339, + + TEX_LCOM_TFRAG = 340, + MERC_LCOM_TFRAG = 341, + EMERC_LCOM_TFRAG = 342, + GMERC_LCOM_TFRAG = 343, + GMERC2_LCOM_TFRAG = 344, + + TEX_LCOM_SHRUB = 345, + MERC_LCOM_SHRUB = 346, + EMERC_LCOM_SHRUB = 347, + GMERC_LCOM_SHRUB = 348, + GMERC2_LCOM_SHRUB = 349, + + SHADOW = 350, + + TEX_L0_PRIS = 351, + MERC_L0_PRIS = 352, + EMERC_L0_PRIS = 353, + GMERC_L0_PRIS = 354, + GMERC2_L0_PRIS = 355, + + TEX_L1_PRIS = 356, + MERC_L1_PRIS = 357, + EMERC_L1_PRIS = 358, + GMERC_L1_PRIS = 359, + GMERC2_L1_PRIS = 360, + + TEX_L2_PRIS = 361, + MERC_L2_PRIS = 362, + EMERC_L2_PRIS = 363, + GMERC_L2_PRIS = 364, + GMERC2_L2_PRIS = 365, + + TEX_L3_PRIS = 366, + MERC_L3_PRIS = 367, + EMERC_L3_PRIS = 368, + GMERC_L3_PRIS = 369, + GMERC2_L3_PRIS = 370, + + TEX_L4_PRIS = 371, + MERC_L4_PRIS = 372, + EMERC_L4_PRIS = 373, + GMERC_L4_PRIS = 374, + GMERC2_L4_PRIS = 375, + + TEX_L5_PRIS = 376, + MERC_L5_PRIS = 377, + EMERC_L5_PRIS = 378, + GMERC_L5_PRIS = 379, + GMERC2_L5_PRIS = 380, + + TEX_L6_PRIS = 381, + MERC_L6_PRIS = 382, + EMERC_L6_PRIS = 383, + GMERC_L6_PRIS = 384, + GMERC2_L6_PRIS = 385, + + TEX_L7_PRIS = 386, + MERC_L7_PRIS = 387, + EMERC_L7_PRIS = 388, + GMERC_L7_PRIS = 389, + GMERC2_L7_PRIS = 390, + + TEX_L8_PRIS = 391, + MERC_L8_PRIS = 392, + EMERC_L8_PRIS = 393, + GMERC_L8_PRIS = 394, + GMERC2_L8_PRIS = 395, + + TEX_L9_PRIS = 396, + MERC_L9_PRIS = 397, + EMERC_L9_PRIS = 398, + GMERC_L9_PRIS = 399, + GMERC2_L9_PRIS = 400, + + TEX_LCOM_PRIS = 401, + MERC_LCOM_PRIS = 402, + EMERC_LCOM_PRIS = 403, + GMERC_LCOM_PRIS = 404, + GMERC2_LCOM_PRIS = 405, + + TEX_L0_PRIS2 = 406, + MERC_L0_PRIS2 = 407, + EMERC_L0_PRIS2 = 408, + GMERC_L0_PRIS2 = 409, + GMERC2_L0_PRIS2 = 410, + + TEX_L1_PRIS2 = 411, + MERC_L1_PRIS2 = 412, + EMERC_L1_PRIS2 = 413, + GMERC_L1_PRIS2 = 414, + GMERC2_L1_PRIS2 = 415, + + TEX_L2_PRIS2 = 416, + MERC_L2_PRIS2 = 417, + EMERC_L2_PRIS2 = 418, + GMERC_L2_PRIS2 = 419, + GMERC2_L2_PRIS2 = 420, + + TEX_L3_PRIS2 = 421, + MERC_L3_PRIS2 = 422, + EMERC_L3_PRIS2 = 423, + GMERC_L3_PRIS2 = 424, + GMERC2_L3_PRIS2 = 425, + + TEX_L4_PRIS2 = 426, + MERC_L4_PRIS2 = 427, + EMERC_L4_PRIS2 = 428, + GMERC_L4_PRIS2 = 429, + GMERC2_L4_PRIS2 = 430, + + TEX_L5_PRIS2 = 431, + MERC_L5_PRIS2 = 432, + EMERC_L5_PRIS2 = 433, + GMERC_L5_PRIS2 = 434, + GMERC2_L5_PRIS2 = 435, + + TEX_L6_PRIS2 = 436, + MERC_L6_PRIS2 = 437, + EMERC_L6_PRIS2 = 438, + GMERC_L6_PRIS2 = 439, + GMERC2_L6_PRIS2 = 440, + + TEX_L7_PRIS2 = 441, + MERC_L7_PRIS2 = 442, + EMERC_L7_PRIS2 = 443, + GMERC_L7_PRIS2 = 444, + GMERC2_L7_PRIS2 = 445, + + TEX_L8_PRIS2 = 446, + MERC_L8_PRIS2 = 447, + EMERC_L8_PRIS2 = 448, + GMERC_L8_PRIS2 = 449, + GMERC2_L8_PRIS2 = 450, + + TEX_L9_PRIS2 = 451, + MERC_L9_PRIS2 = 452, + EMERC_L9_PRIS2 = 453, + GMERC_L9_PRIS2 = 454, + GMERC2_L9_PRIS2 = 455, + + TEX_LCOM_PRIS2 = 456, + MERC_LCOM_PRIS2 = 457, + EMERC_LCOM_PRIS2 = 458, + GMERC_LCOM_PRIS2 = 459, + GMERC2_LCOM_PRIS2 = 460, + + TEX_LCOM_SKY_POST = 461, + OCEAN_NEAR = 462, + + TEX_L0_WATER = 463, + MERC_L0_WATER = 464, + GMERC_L0_WATER = 465, + TFRAG_L0_WATER = 466, + TIE_L0_WATER = 467, + ETIE_L0_WATER = 468, + TIE_SCISSOR_L0_WATER = 469, + TFRAG_SCISSOR_L0_WATER = 470, + ETIE_SCISSOR_L0_WATER = 471, + GMERC2_L0_WATER = 472, + + TEX_L1_WATER = 473, + MERC_L1_WATER = 474, + GMERC_L1_WATER = 475, + TFRAG_L1_WATER = 476, + TIE_L1_WATER = 477, + ETIE_L1_WATER = 478, + TIE_SCISSOR_L1_WATER = 479, + TFRAG_SCISSOR_L1_WATER = 480, + ETIE_SCISSOR_L1_WATER = 481, + GMERC2_L1_WATER = 482, + + TEX_L2_WATER = 483, + MERC_L2_WATER = 484, + GMERC_L2_WATER = 485, + TFRAG_L2_WATER = 486, + TIE_L2_WATER = 487, + ETIE_L2_WATER = 488, + TIE_SCISSOR_L2_WATER = 489, + TFRAG_SCISSOR_L2_WATER = 490, + ETIE_SCISSOR_L2_WATER = 491, + GMERC2_L2_WATER = 492, + + TEX_L3_WATER = 493, + MERC_L3_WATER = 494, + GMERC_L3_WATER = 495, + TFRAG_L3_WATER = 496, + TIE_L3_WATER = 497, + ETIE_L3_WATER = 498, + TIE_SCISSOR_L3_WATER = 499, + TFRAG_SCISSOR_L3_WATER = 500, + ETIE_SCISSOR_L3_WATER = 501, + GMERC2_L3_WATER = 502, + + TEX_L4_WATER = 503, + MERC_L4_WATER = 504, + GMERC_L4_WATER = 505, + TFRAG_L4_WATER = 506, + TIE_L4_WATER = 507, + ETIE_L4_WATER = 508, + TIE_SCISSOR_L4_WATER = 509, + TFRAG_SCISSOR_L4_WATER = 510, + ETIE_SCISSOR_L4_WATER = 511, + GMERC2_L4_WATER = 512, + + TEX_L5_WATER = 513, + MERC_L5_WATER = 514, + GMERC_L5_WATER = 515, + TFRAG_L5_WATER = 516, + TIE_L5_WATER = 517, + ETIE_L5_WATER = 518, + TIE_SCISSOR_L5_WATER = 519, + TFRAG_SCISSOR_L5_WATER = 520, + ETIE_SCISSOR_L5_WATER = 521, + GMERC2_L5_WATER = 522, + + TEX_L6_WATER = 523, + MERC_L6_WATER = 524, + GMERC_L6_WATER = 525, + TFRAG_L6_WATER = 526, + TIE_L6_WATER = 527, + ETIE_L6_WATER = 528, + TIE_SCISSOR_L6_WATER = 529, + TFRAG_SCISSOR_L6_WATER = 530, + ETIE_SCISSOR_L6_WATER = 531, + GMERC2_L6_WATER = 532, + + TEX_L7_WATER = 533, + MERC_L7_WATER = 534, + GMERC_L7_WATER = 535, + TFRAG_L7_WATER = 536, + TIE_L7_WATER = 537, + ETIE_L7_WATER = 538, + TIE_SCISSOR_L7_WATER = 539, + TFRAG_SCISSOR_L7_WATER = 540, + ETIE_SCISSOR_L7_WATER = 541, + GMERC2_L7_WATER = 542, + + TEX_L8_WATER = 543, + MERC_L8_WATER = 544, + GMERC_L8_WATER = 545, + TFRAG_L8_WATER = 546, + TIE_L8_WATER = 547, + ETIE_L8_WATER = 548, + TIE_SCISSOR_L8_WATER = 549, + TFRAG_SCISSOR_L8_WATER = 550, + ETIE_SCISSOR_L8_WATER = 551, + GMERC2_L8_WATER = 552, + + TEX_L9_WATER = 553, + MERC_L9_WATER = 554, + GMERC_L9_WATER = 555, + TFRAG_L9_WATER = 556, + TIE_L9_WATER = 557, + ETIE_L9_WATER = 558, + TIE_SCISSOR_L9_WATER = 559, + TFRAG_SCISSOR_L9_WATER = 560, + ETIE_SCISSOR_L9_WATER = 561, + GMERC2_L9_WATER = 562, + + TEX_LCOM_WATER = 563, + MERC_LCOM_WATER = 564, + GMERC_LCOM_WATER = 565, + GMERC2_LCOM_WATER = 566, + BUCKET567 = 567, + + TEX_SPRITE = 568, + GENERIC_SPRITE_1 = 569, + PARTICLES = 570, + GENERIC_SPRITE_2 = 571, + SHADOW2 = 572, + SHADOW3 = 573, + GENERIC_SPRITE_3 = 574, + + TEX_WARP = 575, + GENERIC_WARP = 576, + + DEBUG_NO_ZBUF1 = 577, + TEX_HUD_HUD_ALPHA = 578, + HUD_DRAW_HUD_ALPHA = 579, + TEX_HUD_PRIS2 = 580, + HUD_DRAW_PRIS2 = 581, + BUCKET582 = 582, + DEBUG = 583, + DEBUG_NO_ZBUF2 = 584, + DEBUG_MENU = 585, + BUCKET586 = 586, + + MAX_BUCKETS = 587, +}; +} + enum class BucketCategory { TFRAG, TIE, diff --git a/game/graphics/opengl_renderer/debug_gui.cpp b/game/graphics/opengl_renderer/debug_gui.cpp index 6a03170a44..8b3a3be5d7 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 f8f0d0b1ae..52c1cc2e63 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/Merc2.cpp b/game/graphics/opengl_renderer/foreground/Merc2.cpp index 9c7c3032c2..15c12d15dc 100644 --- a/game/graphics/opengl_renderer/foreground/Merc2.cpp +++ b/game/graphics/opengl_renderer/foreground/Merc2.cpp @@ -949,7 +949,7 @@ void Merc2::handle_merc_chain(DmaFollower& dma, auto init = dma.read_and_advance(); int skip_count = 2; - if (render_state->version == GameVersion::Jak2) { + if (render_state->version >= GameVersion::Jak2) { skip_count = 1; } diff --git a/game/graphics/opengl_renderer/ocean/OceanMidAndFar.cpp b/game/graphics/opengl_renderer/ocean/OceanMidAndFar.cpp index 8bc266e2ec..a3f62d9d93 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 36629ad817..583a93e0d8 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 da601a7151..a9a95feb90 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/opengl_renderer/shaders/collision.vert b/game/graphics/opengl_renderer/shaders/collision.vert index a1a3251a2a..b25eb19f81 100644 --- a/game/graphics/opengl_renderer/shaders/collision.vert +++ b/game/graphics/opengl_renderer/shaders/collision.vert @@ -33,10 +33,10 @@ const int MODE_MODE = 1; const int MODE_EVENT = 2; const int MODE_MATERIAL = 3; -uint pat_get_mode(uint p) { return version == 2 ? (p >> 7) & 0x7u : (p >> 3) & 0x7u; } -uint pat_get_material(uint p) { return version == 2 ? (p >> 10) & 0x3fu : (p >> 6) & 0x3fu; } -uint pat_get_event(uint p) { return version == 2 ? (p >> 18) & 0x3fu : (p >> 14) & 0x3fu; } -uint pat_get_skip(uint p) { return version == 2 ? p & 0x1f03007fu : p & 0x3007u; } +uint pat_get_mode(uint p) { return version == 2 || version == 3 ? (p >> 7) & 0x7u : (p >> 3) & 0x7u; } +uint pat_get_material(uint p) { return version == 2 || version == 3 ? (p >> 10) & 0x3fu : (p >> 6) & 0x3fu; } +uint pat_get_event(uint p) { return version == 2 || version == 3 ? (p >> 18) & 0x3fu : (p >> 14) & 0x3fu; } +uint pat_get_skip(uint p) { return version == 2 || version == 3 ? p & 0x1f03007fu : p & 0x3007u; } bool logtest(uint a, uint b) { return (a & b) != 0; } bool logtesta(uint a, uint b) { return (a & b) == b; } diff --git a/game/graphics/opengl_renderer/sprite/Sprite3.cpp b/game/graphics/opengl_renderer/sprite/Sprite3.cpp index 173b6abe78..26dcd206eb 100644 --- a/game/graphics/opengl_renderer/sprite/Sprite3.cpp +++ b/game/graphics/opengl_renderer/sprite/Sprite3.cpp @@ -170,7 +170,8 @@ void Sprite3::handle_sprite_frame_setup(DmaFollower& dma, memcpy(&jak1_data, frame_data.data, sizeof(SpriteFrameDataJak1)); m_frame_data.from_jak1(jak1_data); } break; - case GameVersion::Jak2: { + case GameVersion::Jak2: + case GameVersion::Jak3: { render_state->shaders[ShaderId::SPRITE3].activate(); auto frame_data = dma.read_and_advance(); ASSERT(frame_data.size_bytes == (int)sizeof(SpriteFrameData)); // very cool @@ -392,6 +393,7 @@ void Sprite3::render(DmaFollower& dma, SharedRenderState* render_state, ScopedPr render_jak1(dma, render_state, prof); break; case GameVersion::Jak2: + case GameVersion::Jak3: render_jak2(dma, render_state, prof); break; default: @@ -835,7 +837,7 @@ void Sprite3::do_block_common(SpriteMode mode, if ((flag & 0x10) || (flag & 0x20)) { // these flags mean we need to swap vertex order around - not yet implemented since it's too // hard to get right without this code running. - ASSERT_NOT_REACHED(); + // ASSERT_NOT_REACHED(); } } diff --git a/game/graphics/opengl_renderer/sprite/Sprite3_Distort.cpp b/game/graphics/opengl_renderer/sprite/Sprite3_Distort.cpp index 0769282e99..ec8c839393 100644 --- a/game/graphics/opengl_renderer/sprite/Sprite3_Distort.cpp +++ b/game/graphics/opengl_renderer/sprite/Sprite3_Distort.cpp @@ -212,6 +212,7 @@ void Sprite3::distort_dma(GameVersion version, DmaFollower& dma, ScopedProfilerN expect_th = 8; break; case GameVersion::Jak2: + case GameVersion::Jak3: expect_zbp = 0x130; expect_th = 9; break; @@ -424,7 +425,7 @@ void Sprite3::distort_setup_instanced(ScopedProfilerNode& /*prof*/) { for (int res = 3; res < 12; res++) { int entry_index = m_sprite_distorter_sine_tables.ientry[res - 3].x() - 352; - ASSERT_MSG(entry_index >= 0, "weird sprite_distort startup crash happened again!"); + // ASSERT_MSG(entry_index >= 0, "weird sprite_distort startup crash happened again!"); for (int i = 0; i < res; i++) { math::Vector3f vf06 = m_sprite_distorter_sine_tables.entry[entry_index++].xyz(); diff --git a/game/graphics/opengl_renderer/sprite/Sprite3_Glow.cpp b/game/graphics/opengl_renderer/sprite/Sprite3_Glow.cpp index 5c36f7b619..3149af971c 100644 --- a/game/graphics/opengl_renderer/sprite/Sprite3_Glow.cpp +++ b/game/graphics/opengl_renderer/sprite/Sprite3_Glow.cpp @@ -183,7 +183,6 @@ void Sprite3::glow_dma_and_draw(DmaFollower& dma, ScopedProfilerNode& prof) { auto maybe_consts_setup = dma.read_and_advance(); if (maybe_consts_setup.size_bytes != sizeof(SpriteGlowConsts)) { - fmt::print("no consts...\n"); return; } SpriteGlowConsts consts; diff --git a/game/graphics/pipelines/opengl.cpp b/game/graphics/pipelines/opengl.cpp index 1c85c93807..ec54f40405 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" @@ -73,7 +74,7 @@ struct GraphicsData { FrameLimiter frame_limiter; Timer engine_timer; double last_engine_time = 1. / 60.; - float pmode_alp = 0.f; + float pmode_alp = 1.f; std::string imgui_log_filename, imgui_filename; GameVersion version; @@ -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 0000000000..3835ac7ff4 --- /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 0000000000..a0f5ff3653 --- /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/graphics/texture/TexturePool.cpp b/game/graphics/texture/TexturePool.cpp index 1f46ef43e7..d848bf0d57 100644 --- a/game/graphics/texture/TexturePool.cpp +++ b/game/graphics/texture/TexturePool.cpp @@ -10,6 +10,7 @@ #include "game/graphics/pipelines/opengl.h" #include "game/graphics/texture/jak1_tpage_dir.h" #include "game/graphics/texture/jak2_tpage_dir.h" +#include "game/graphics/texture/jak3_tpage_dir.h" #include "fmt/core.h" #include "third-party/imgui/imgui.h" @@ -312,6 +313,8 @@ const std::vector& get_tpage_dir(GameVersion version) { return get_jak1_tpage_dir(); case GameVersion::Jak2: return get_jak2_tpage_dir(); + case GameVersion::Jak3: + return get_jak3_tpage_dir(); default: ASSERT(false); } @@ -397,6 +400,8 @@ PcTextureId TexturePool::allocate_pc_port_texture(GameVersion version) { return PcTextureId(get_jak1_tpage_dir().size() - 1, m_next_pc_texture_to_allocate++); case GameVersion::Jak2: return PcTextureId(get_jak2_tpage_dir().size() - 1, m_next_pc_texture_to_allocate++); + case GameVersion::Jak3: + return PcTextureId(get_jak3_tpage_dir().size() - 1, m_next_pc_texture_to_allocate++); default: ASSERT_NOT_REACHED(); } @@ -407,6 +412,15 @@ std::string TexturePool::get_debug_texture_name(PcTextureId id) { if (it) { return *it; } else { - return "???"; + return "??? (missing PC id to name mapping)"; + } +} + +std::string TexturePool::get_debug_texture_name_from_tbp(u32 tbp) { + auto info = lookup_gpu_texture(tbp); + if (!info) { + return "??? (bad tbp)"; + } else { + return get_debug_texture_name(info->tex_id); } } diff --git a/game/graphics/texture/TexturePool.h b/game/graphics/texture/TexturePool.h index f8abd357c5..3b656fa8a0 100644 --- a/game/graphics/texture/TexturePool.h +++ b/game/graphics/texture/TexturePool.h @@ -348,6 +348,7 @@ class TexturePool { PcTextureId allocate_pc_port_texture(GameVersion version); std::string get_debug_texture_name(PcTextureId id); + std::string get_debug_texture_name_from_tbp(u32 tbp); private: void refresh_links(GpuTexture& texture); diff --git a/game/graphics/texture/jak2_tpage_dir.cpp b/game/graphics/texture/jak2_tpage_dir.cpp index 74fdb3aeda..af53b7f612 100644 --- a/game/graphics/texture/jak2_tpage_dir.cpp +++ b/game/graphics/texture/jak2_tpage_dir.cpp @@ -4,7 +4,7 @@ #include "common/common_types.h" -#include "jak1_tpage_dir.h" +#include "game/graphics/texture/jak1_tpage_dir.h" // clang-format off namespace { diff --git a/game/graphics/texture/jak2_tpage_dir.h b/game/graphics/texture/jak2_tpage_dir.h index 97947c9f5d..bffec3a6fd 100644 --- a/game/graphics/texture/jak2_tpage_dir.h +++ b/game/graphics/texture/jak2_tpage_dir.h @@ -1,6 +1,5 @@ #pragma once -#include #include #include "common/common_types.h" diff --git a/game/graphics/texture/jak3_tpage_dir.cpp b/game/graphics/texture/jak3_tpage_dir.cpp new file mode 100644 index 0000000000..7e2fa82d6c --- /dev/null +++ b/game/graphics/texture/jak3_tpage_dir.cpp @@ -0,0 +1,1721 @@ +#include "jak3_tpage_dir.h" + +#include "game/graphics/texture/jak1_tpage_dir.h" + +namespace { +std::vector tpage_dir = {0x0, 0x7, + 0x3, 0x5, + 0xba, 0x29, + 0x1b, 0x84, + 0x5, 0x5e, + 0x6, 0x19, + 0x6, 0x36, + 0x0, 0x26, + 0x0, 0x8c, + 0x1e, 0x0, + 0x17, 0x0, + 0x1, 0x4, + 0xe, 0x6, + 0x7, 0x7, + 0x6, 0x5, + 0x1e, 0x13, + 0x7, 0x7, + 0x2, 0x4, + 0x3, 0x3, + 0x0, 0x3, + 0xd, 0x10, + 0xa, 0x5, + 0x5, 0x3, + 0x3, 0x3, + 0x3, 0x5, + 0x5, 0x2, + 0x7, 0x7, + 0x5, 0x9, + 0x9, 0x6, + 0x1e, 0x12, + 0x2, 0x2, + 0x1, 0x1, + 0x1, 0x1, + 0x2, 0x2, + 0x2, 0x2, + 0x8, 0x8, + 0x5, 0xb, + 0xc, 0x9, + 0x16, 0x1, + 0x14, 0x1, + 0x10, 0x1, + 0x1, 0x1, + 0x1, 0x3, + 0x1f, 0x13, + 0x13, 0x12, + 0x17, 0x1e, + 0x1a, 0x17, + 0x11, 0xf, + 0x14, 0xe, + 0x10, 0x16, + 0x1c, 0x16, + 0x19, 0x13, + 0x13, 0x2, + 0x7, 0x8, + 0x2, 0x3, + 0x14, 0x14, + 0xb, 0xb, + 0x10, 0x10, + 0x2, 0x2, + 0x9, 0x2, + 0x0, 0x23, + 0x0, 0x20, + 0xaf, 0x1b, + 0x0, 0x90, + 0x6, 0x6, + 0x4, 0x1, + 0x23, 0x51, + 0x44, 0x23, + 0x42, 0x0, + 0x0, 0x7f, + 0x1, 0x58, + 0x6, 0x6, + 0x4, 0x1, + 0x6, 0x6, + 0x5, 0x2f, + 0xd, 0x1, + 0x26, 0x14, + 0x1, 0x10, + 0x1, 0x4, + 0x1, 0x1, + 0x0, 0x25, + 0xd, 0x80, + 0x0, 0x20, + 0x7d, 0x1, + 0x0, 0x23, + 0xe, 0x7a, + 0x0, 0x23, + 0x79, 0x1, + 0xc, 0x3, + 0x4d, 0xc, + 0x4c, 0x1, + 0xa, 0x11, + 0x4, 0x52, + 0xa, 0x11, + 0x52, 0x3, + 0x2, 0x8, + 0xb, 0x16, + 0x2e, 0x3, + 0x8, 0xb, + 0x2e, 0x1, + 0x2, 0x3, + 0x1, 0x8, + 0xc, 0x16, + 0x35, 0x3, + 0x8, 0xc, + 0x35, 0x2, + 0x2, 0x1, + 0xd, 0x19, + 0x45, 0xd, + 0x46, 0x1, + 0x4f, 0x14, + 0x5, 0x67, + 0x37, 0x14, + 0x58, 0x3, + 0x3, 0x2, + 0xc, 0x8, + 0x44, 0xc, + 0x44, 0x6, + 0x1d, 0x5, + 0x1, 0x16, + 0xb, 0x6, + 0x2e, 0x5, + 0x16, 0xb, + 0x2e, 0x1, + 0x1, 0x5, + 0x1, 0x19, + 0xb, 0x6, + 0x2a, 0x5, + 0x19, 0xb, + 0x2a, 0x1, + 0x1, 0x5, + 0x5, 0x5, + 0x4, 0x6, + 0x1d, 0x1f, + 0x10, 0x6, + 0x6, 0x65, + 0x14, 0x1e, + 0x63, 0x2, + 0x3, 0x4, + 0x5, 0x5, + 0x4, 0x4, + 0x2, 0x6, + 0x5, 0x48, + 0x6, 0x5, + 0x48, 0x0, + 0x4, 0x0, + 0x0, 0x2, + 0x2, 0x1, + 0x3, 0x3, + 0x3, 0x3, + 0x4, 0x4, + 0x4, 0x2, + 0x4, 0x4, + 0xd1, 0x17, + 0x3, 0x3, + 0x3, 0x9, + 0x1, 0x1, + 0x0, 0x37, + 0xc4, 0x1, + 0x31, 0x73, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x78, + 0xe, 0x2d, + 0x2, 0x0, + 0x0, 0x0, + 0x11, 0x11, + 0x1c, 0x0, + 0x1, 0x15, + 0x7, 0x1, + 0x2, 0x0, + 0x9, 0x2, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x2a, + 0x4, 0x27, + 0x58, 0x4, + 0x2d, 0x47, + 0x2, 0x27, + 0x1, 0x6, + 0x1, 0x26, + 0x0, 0x0, + 0x0, 0x2, + 0x20, 0x2, + 0x1, 0x2, + 0x1, 0x0, + 0x7, 0x0, + 0x0, 0x0, + 0xd, 0x3b, + 0x7, 0x1, + 0x0, 0x0, + 0x1, 0x0, + 0x0, 0x0, + 0x2, 0x0, + 0x35, 0x0, + 0x95, 0x7, + 0x7, 0x6, + 0x1, 0xd7, + 0x0, 0x0, + 0xe, 0x0, + 0x6, 0x0, + 0x6, 0xf, + 0xa, 0x85, + 0x1c, 0x0, + 0x79, 0x1a, + 0x34, 0x3, + 0x5d, 0x5f, + 0x5, 0x3, + 0x1f, 0x16, + 0x4, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x25, 0x1, + 0x0, 0x4, + 0x24, 0x4, + 0x1, 0x0, + 0x9, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x7, + 0x5, 0x1, + 0x5, 0x1, + 0xb, 0xb, + 0x0, 0x0, + 0x14, 0x2, + 0x2, 0x12, + 0x6, 0x0, + 0x1, 0x0, + 0x1, 0x1, + 0x2c, 0x82, + 0x3, 0x2, + 0x2, 0x0, + 0x0, 0x4, + 0x0, 0x6, + 0x6, 0x56, + 0x0, 0x0, + 0x0, 0x2, + 0x24, 0x5d, + 0x4, 0x46, + 0x7, 0xe, + 0x55, 0x15, + 0x5e, 0x57, + 0x16, 0x3b, + 0x5a, 0x2, + 0x12, 0x3, + 0x2, 0x3, + 0x3, 0x1, + 0x18, 0x2, + 0x0, 0x2, + 0x2, 0x0, + 0x1, 0x7, + 0x2, 0x2, + 0x2, 0x2, + 0x0, 0x0, + 0x1, 0x5, + 0x28, 0x5, + 0x31, 0x1, + 0xa3, 0x0, + 0x3, 0x0, + 0x37, 0x0, + 0x19, 0x3, + 0x3, 0x0, + 0x3, 0x3, + 0x2, 0x2, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x4, + 0xc8, 0x72, + 0xe, 0x21, + 0xdc, 0x9, + 0x20, 0x1a, + 0x7d, 0xa, + 0x10, 0xd8, + 0x19, 0x7, + 0x2d, 0x19, + 0x2c, 0x21, + 0x27, 0x64, + 0x12, 0x7, + 0x0, 0x2, + 0xc, 0x7, + 0x15, 0x13, + 0x45, 0x68, + 0x5, 0x2, + 0x0, 0x19, + 0x0, 0x6a, + 0x4, 0x5, + 0x1, 0x7, + 0x0, 0x4, + 0x0, 0x1e, + 0x10, 0xf, + 0xe, 0x0, + 0x1, 0x0, + 0x22, 0x2f, + 0x22, 0x70, + 0x82, 0x123, + 0x1c, 0x1e, + 0xf, 0x43, + 0x1c, 0x1f, + 0x16, 0x35, + 0x36, 0x47, + 0x1d, 0x1a, + 0x2, 0x20, + 0xe, 0x12, + 0x7, 0x5, + 0x2, 0x0, + 0x0, 0x0, + 0x5, 0x29, + 0x7, 0x0, + 0x13, 0x13, + 0x16, 0x16, + 0x0, 0x0, + 0x7, 0x25, + 0x3, 0x0, + 0x8, 0x8, + 0xd, 0x2, + 0x5d, 0x19, + 0x3, 0x34, + 0x50, 0x2c, + 0x10, 0x1, + 0x0, 0x82, + 0x8, 0x7, + 0x1, 0x0, + 0xd, 0x27, + 0x7, 0x2, + 0x2, 0x2, + 0x2, 0x2, + 0x2, 0x2, + 0x2, 0x2, + 0x7, 0x6, + 0xd, 0xe, + 0xd, 0xd, + 0x3, 0x1f, + 0x2c, 0x0, + 0x1, 0x40, + 0x0, 0x0, + 0x18, 0x3, + 0x3, 0x4, + 0x1, 0x0, + 0x0, 0x1, + 0x2, 0x2, + 0x1, 0x1, + 0x3, 0x3, + 0x96, 0x3a, + 0x4, 0xcc, + 0x1, 0x7, + 0x0, 0xa, + 0x0, 0x7, + 0x6, 0x0, + 0x5, 0x5, + 0x15, 0x13, + 0x32, 0x2d, + 0x2, 0xe, + 0x2, 0x23, + 0x0, 0x0, + 0x0, 0x7, + 0x7f, 0x0, + 0xd, 0x7, + 0x0, 0x0, + 0x1, 0x0, + 0xc, 0x6, + 0x1, 0xd, + 0x5, 0x5, + 0x5, 0xe, + 0x5, 0x5, + 0x5, 0xe, + 0x0, 0x0, + 0xe, 0x10, + 0x29, 0x18, + 0x18, 0x19, + 0x23, 0x7f, + 0x54, 0x3, + 0x48, 0x6, + 0x51, 0xe, + 0x52, 0xe, + 0x12, 0xe, + 0x6c, 0x40, + 0x57, 0x16, + 0x37, 0x54, + 0x3, 0x17, + 0x0, 0x0, + 0x7, 0x7, + 0xd, 0x5d, + 0x6c, 0x0, + 0x8, 0x6, + 0x5, 0x10, + 0x1, 0x34, + 0xc7, 0xe, + 0x0, 0x0, + 0x0, 0x9, + 0x12, 0xe, + 0x3, 0x6, + 0x84, 0x5, + 0x6d, 0x3, + 0x8, 0x16, + 0x1, 0x14, + 0x1, 0x10, + 0x1, 0x15, + 0x0, 0x0, + 0x82, 0x8, + 0x1, 0x2, + 0x30, 0x0, + 0x1, 0x5e, + 0x5b, 0x0, + 0x3b, 0x3, + 0x1, 0x2, + 0x44, 0x21, + 0x21, 0xe, + 0xa, 0x9, + 0xb, 0x16, + 0x23, 0xe, + 0x3, 0xe, + 0x5, 0x21, + 0x1, 0x2, + 0x93, 0x5, + 0x19, 0x1, + 0x82, 0x2, + 0x2, 0x1, + 0xd, 0x67, + 0x1, 0x0, + 0x0, 0x5a, + 0x3, 0x12, + 0x33, 0x0, + 0x1, 0x1, + 0x1, 0x5, + 0x1, 0x3, + 0x1, 0x3, + 0x1, 0x3, + 0x1, 0x8, + 0x3, 0x1, + 0x3, 0x1, + 0x8, 0x6, + 0x6, 0x8, + 0x3, 0x3, + 0x36, 0x68, + 0x1, 0x73, + 0x41, 0x1c, + 0x65, 0x3, + 0x2, 0x2, + 0x0, 0x15, + 0x13, 0x8, + 0x0, 0xa, + 0x2, 0x0, + 0x0, 0x3, + 0x1, 0x0, + 0x0, 0xd, + 0x0, 0xb3, + 0x50, 0x68, + 0xaa, 0x0, + 0x1d, 0xc, + 0xb, 0xc, + 0xc, 0xd, + 0xd, 0x8, + 0xa, 0x42, + 0xb, 0x0, + 0x3b, 0x9c, + 0x3b, 0x0, + 0x32, 0x5c, + 0x2a, 0x56, + 0x1f, 0x69, + 0x12, 0x5, + 0x3, 0x7, + 0x3a, 0x8f, + 0x3b, 0x0, + 0x30, 0x4f, + 0x56, 0x1f, + 0x59, 0x1, + 0x1, 0x4, + 0x0, 0x0, + 0x26, 0x25, + 0x13, 0x13, + 0xd, 0xd, + 0x5e, 0x6, + 0x1f, 0x31, + 0x12, 0xd, + 0x1b, 0x1, + 0xb, 0x9, + 0x0, 0x0, + 0x2c, 0x1e, + 0x7, 0x0, + 0xb, 0x4, + 0x3d, 0xa, + 0x4, 0x4, + 0x0, 0x4, + 0x7, 0x5, + 0x5, 0x4, + 0x0, 0x6, + 0x6, 0x3, + 0x7, 0x0, + 0xd, 0x8, + 0x6, 0x11, + 0x47, 0x3, + 0x17, 0x62, + 0x6, 0x7, + 0x14, 0x11, + 0xc, 0x2, + 0x7, 0x4, + 0x5e, 0x12, + 0x1f, 0x7, + 0x7, 0x0, + 0x3, 0x4, + 0x3, 0x3, + 0x3, 0x4, + 0x4, 0x4, + 0x0, 0x0, + 0x3, 0x0, + 0x0, 0x0, + 0x4d, 0xc, + 0x0, 0xc, + 0x4, 0x7, + 0x31, 0x66, + 0x0, 0x2d, + 0x66, 0x0, + 0x31, 0x2, + 0x0, 0xb, + 0x5, 0x5, + 0x4, 0xc, + 0x5, 0x36, + 0x4, 0x7, + 0x11, 0x3, + 0x2, 0x12, + 0x1, 0x22, + 0x0, 0xc, + 0x38, 0x0, + 0x0, 0x0, + 0x11, 0x1f, + 0x1, 0x0, + 0x0, 0x0, + 0x32, 0x0, + 0x0, 0x9, + 0x0, 0xe, + 0xd, 0x6, + 0x9, 0x9, + 0x6, 0x1, + 0x0, 0x0, + 0x21, 0x1, + 0x4, 0x3, + 0x1, 0x1, + 0x0, 0x0, + 0x1, 0x0, + 0xb, 0xb, + 0x1, 0x1, + 0x1, 0x3b, + 0xa, 0x24, + 0x41, 0x1, + 0x58, 0x0, + 0xa, 0x3d, + 0x1, 0x0, + 0x7, 0xa, + 0x4b, 0x2, + 0x1d, 0x1, + 0x1, 0x1, + 0x1, 0xf, + 0xd, 0x9, + 0xf, 0xe, + 0x5, 0x9, + 0x0, 0x4, + 0x2, 0x3, + 0x9, 0x1, + 0x5, 0x4, + 0x14, 0x44, + 0x8, 0x4c, + 0xd, 0x51, + 0x9, 0x4c, + 0x10, 0x9, + 0x3e, 0xa, + 0x44, 0x55, + 0x4, 0x54, + 0x6, 0x1f, + 0x56, 0xc, + 0xf, 0x1f, + 0x6, 0x54, + 0x6, 0x14, + 0x1f, 0x1, + 0x5, 0x5, + 0x3, 0x1, + 0x8, 0x1f, + 0x1, 0x0, + 0x73, 0x10, + 0x40, 0x1, + 0x19, 0xc, + 0x8, 0x19, + 0x0, 0x34, + 0x69, 0x6b, + 0x4, 0x8, + 0x0, 0x0, + 0x1, 0xc, + 0x1, 0x0, + 0x0, 0x3, + 0x1, 0x1, + 0x1, 0x1, + 0x1, 0x1, + 0x1, 0x0, + 0x0, 0x7, + 0x2, 0xc, + 0xb, 0x3, + 0x8, 0x8, + 0x0, 0x7, + 0x0, 0x14, + 0x13, 0x6, + 0x6, 0x3, + 0x4, 0xb, + 0xa, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x1, 0xa8, + 0x0, 0x23, + 0x6, 0x2, + 0x7, 0x0, + 0x4, 0x4, + 0x3, 0x6, + 0x20, 0x6, + 0x1a, 0x19, + 0x15, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x10, 0x11, + 0xc, 0xb, + 0x3, 0x3, + 0x7, 0x7, + 0x1, 0x7, + 0x9, 0xc, + 0x32, 0x84, + 0x59, 0x70, + 0x1, 0x0, + 0x0, 0x39, + 0x1, 0x1, + 0x2, 0x9, + 0x9, 0x9, + 0x9, 0x2, + 0x23, 0x6, + 0x5, 0x2, + 0xe, 0xe, + 0x5, 0x7, + 0x7, 0x5, + 0x8, 0x7, + 0x3, 0x6, + 0x6, 0x3, + 0xa, 0x2, + 0x5, 0x2, + 0x5, 0x2, + 0xe, 0x2, + 0x8, 0x2, + 0x6, 0x2, + 0xa, 0x2, + 0x5, 0x2, + 0x5, 0x2, + 0x0, 0x10, + 0x0, 0x1, + 0x0, 0x4, + 0x21, 0x6, + 0x9, 0x4, + 0x4, 0x0, + 0x1, 0x8, + 0x8, 0x1, + 0x16, 0x0, + 0xe, 0xa, + 0x7, 0xe, + 0x3, 0x0, + 0x0, 0x5, + 0x21, 0x4, + 0x54, 0x23, + 0x1, 0x3, + 0xc, 0x7, + 0x42, 0x2, + 0x0, 0x13, + 0xa, 0x7, + 0x9, 0x1, + 0x14, 0x14, + 0x0, 0x1, + 0x11, 0x17, + 0x1c, 0x1c, + 0x1c, 0x0, + 0x1, 0x34, + 0x1, 0x2, + 0x1, 0x2, + 0x5, 0x2, + 0x50, 0xf, + 0x1, 0xa, + 0x1, 0x4, + 0x9, 0x4, + 0x17, 0x2, + 0x3, 0xa, + 0xe, 0x48, + 0x18, 0x4, + 0x3, 0x18, + 0xe, 0x34, + 0x6, 0x0, + 0x42, 0x3c, + 0x10, 0x2, + 0x14, 0x3, + 0x1b, 0x9, + 0x35, 0x22, + 0x22, 0x7f, + 0x5, 0x1c, + 0x4a, 0x7a, + 0x5, 0x4a, + 0x22, 0xe, + 0x3, 0x2, + 0x1, 0x1, + 0x3, 0xc, + 0x6, 0x4, + 0x1, 0x3, + 0x3, 0x22, + 0x1a, 0x1, + 0x2, 0x9, + 0x8, 0x6, + 0x3, 0x3, + 0x2, 0x3, + 0x5, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x23, + 0x0, 0x12, + 0x3, 0x5, + 0x22, 0x0, + 0x3, 0x3, + 0x2, 0x2, + 0x76, 0x5, + 0x61, 0x3, + 0x0, 0x0, + 0x0, 0x6, + 0x1, 0x5, + 0x3d, 0x24, + 0x1f, 0x1, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x1d, 0x1d, + 0x1d, 0x7, + 0x27, 0x1b, + 0x1c, 0x3, + 0x3, 0x3, + 0x2, 0x3, + 0x3, 0x2, + 0x3, 0x8, + 0x0, 0x3a, + 0x26, 0x22, + 0x1, 0x4, + 0x4, 0x1, + 0x1, 0x3, + 0x1, 0x1, + 0x1, 0x1, + 0x3, 0x1, + 0x0, 0x0, + 0x0, 0x0, + 0x1, 0x26, + 0x2, 0x26, + 0x4, 0x7, + 0x42, 0x4, + 0x1, 0x0, + 0x4d, 0x1, + 0x0, 0x4, + 0x8, 0x1, + 0x1, 0x1, + 0x1, 0x74, + 0x4d, 0x1, + 0x13, 0x1, + 0x2, 0x11, + 0x0, 0x0, + 0x5, 0x1e, + 0x0, 0x18, + 0x0, 0x0, + 0x0, 0x2, + 0x0, 0x0, + 0x1e, 0x1f, + 0x1, 0x48, + 0x23, 0x3e, + 0x44, 0x25, + 0x2, 0x0, + 0x1c, 0x35, + 0x0, 0x10, + 0x21, 0x1, + 0xd, 0xc, + 0xa, 0xe, + 0x0, 0x35, + 0x0, 0x0, + 0x1, 0x9, + 0x2, 0x1, + 0x7, 0x2, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0xa, + 0x0, 0x3, + 0x1f, 0x6c, + 0xa, 0xa, + 0x16, 0x2, + 0x2, 0x2, + 0x2, 0x2, + 0x2, 0x2, + 0x2, 0x2, + 0xe, 0x38, + 0x17, 0x6, + 0x0, 0x0, + 0x0, 0x6, + 0x6c, 0x8f, + 0x39, 0x20, + 0x1d, 0x94, + 0x2, 0x20, + 0x4, 0x7, + 0x4, 0x0, + 0x0, 0x0, + 0x4, 0x0, + 0x1, 0x1, + 0x1, 0x1, + 0x1, 0x1, + 0x51, 0xb4, + 0x5, 0x26, + 0x65, 0x1, + 0xa, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x34, 0x23, + 0x7, 0x31, + 0x5, 0x0, + 0x4, 0x2, + 0x2, 0x7, + 0x6, 0x2, + 0x2, 0x2, + 0x2, 0x2, + 0x2, 0x2, + 0x2, 0x7, + 0x0, 0xe, + 0x1, 0x3, + 0xd, 0xc, + 0x0, 0x21, + 0x1, 0x10, + 0x14, 0x3f, + 0x0, 0x0, + 0x18, 0x5, + 0x1, 0xb, + 0x2, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x3, 0x3, + 0x1, 0x2, + 0x3, 0x4, + 0x4, 0x5, + 0x5, 0x5, + 0x5, 0x0, + 0x0, 0x10, + 0x10, 0x2, + 0x0, 0x0, + 0x2, 0x2, + 0x1, 0x0, + 0x2, 0x3, + 0x1, 0x6, + 0x9, 0x1, + 0x0, 0xe, + 0x16, 0x17, + 0x4, 0x4, + 0x6, 0x1, + 0x1a, 0x1, + 0x41, 0x31, + 0x1, 0x50, + 0x0, 0x0, + 0x0, 0x0, + 0x1, 0x0, + 0x6, 0x1, + 0x1, 0x1, + 0xc, 0x0, + 0x3, 0x3, + 0x1, 0x0, + 0x0, 0x0, + 0xd8, 0x2, + 0x2, 0x7, + 0x5, 0x2d, + 0x18, 0x5, + 0x3, 0xa, + 0x1, 0x0, + 0x1, 0x0, + 0x0, 0x2, + 0x2, 0x3, + 0x3, 0x20, + 0x5b, 0x0, + 0xf, 0x1, + 0x7, 0x6, + 0x7, 0x2, + 0x0, 0x88, + 0x3e, 0x1f, + 0x3, 0x1, + 0x5, 0x4, + 0x7, 0x6, + 0x7, 0x6, + 0x7, 0x7, + 0x5, 0x1, + 0x2, 0x3, + 0x4, 0x3, + 0xb, 0x7, + 0x68, 0x4, + 0x0, 0x20, + 0x2, 0x5, + 0x0, 0x5, + 0x6, 0xa5, + 0x2, 0x2, + 0x4, 0x7, + 0x5, 0x7, + 0xe, 0x4, + 0xe, 0xc, + 0x0, 0x3, + 0x1f, 0x1, + 0x44, 0x23, + 0x1c, 0x0, + 0x1, 0xe, + 0x2, 0x0, + 0x5, 0x47, + 0x0, 0x0, + 0x20, 0x0, + 0x0, 0x0, + 0x29, 0x5, + 0x3, 0xb, + 0x4, 0x1, + 0x1, 0x1f, + 0x1, 0x1b, + 0x2, 0x0, + 0xc, 0x6, + 0x0, 0x19, + 0x0, 0x1, + 0x3, 0x6, + 0x4, 0x6, + 0x81, 0x35, + 0x0, 0x3, + 0x4, 0x0, + 0x1, 0x2, + 0x2, 0xb, + 0x2, 0xb, + 0x0, 0x31, + 0x3, 0x5, + 0x4a, 0x2, + 0xa6, 0x4, + 0x0, 0x0, + 0x0, 0x0, + 0x9, 0x5, + 0x5, 0x4, + 0xe, 0xd, + 0x8d, 0x5, + 0x1e, 0x3, + 0x6, 0xb, + 0x4, 0x4, + 0x4, 0x4, + 0x3, 0x2, + 0x2, 0x2, + 0x7, 0x2, + 0x2, 0x6f, + 0x1, 0x1, + 0x5, 0x5, + 0x1, 0x2, + 0x1, 0x1, + 0x16, 0x1, + 0x14, 0x1, + 0x10, 0x1, + 0xf, 0xb, + 0x10, 0xc, + 0x11, 0x18, + 0x14, 0x13, + 0x1, 0x2, + 0x6, 0x0, + 0x0, 0x0, + 0x0, 0x47, + 0x2, 0x14, + 0x1, 0x1, + 0x1, 0x1, + 0x1, 0x1, + 0x4, 0x5, + 0x4f, 0x0, + 0x1d, 0x1, + 0x0, 0x1, + 0x0, 0x1, + 0x0, 0x0, + 0x1, 0x3, + 0xd, 0xd, + 0x84, 0x5, + 0x0, 0x8, + 0x7, 0x12, + 0x12, 0x1, + 0x1, 0x1, + 0x1, 0x83, + 0x5, 0x0, + 0x1b, 0x1, + 0x5, 0x43, + 0x5a, 0x1, + 0xa, 0x5a, + 0x1, 0x23, + 0x14, 0x10, + 0x15, 0x1, + 0x13, 0xf, + 0x2, 0x2, + 0x18, 0x21, + 0x1, 0x2, + 0x2, 0x13, + 0xd, 0xd, + 0xb, 0x1f, + 0x3, 0x2, + 0x68, 0x4, + 0x4, 0x6, + 0x6, 0x44, + 0x1, 0x18, + 0x4, 0x4, + 0x4, 0x8, + 0x4, 0x4, + 0x4, 0x8, + 0x4, 0x4, + 0x4, 0x8, + 0x4, 0x4, + 0x4, 0x8, + 0x4, 0x4, + 0x4, 0x8, + 0x4, 0x4, + 0x4, 0x8, + 0x22, 0x6, + 0x0, 0x8, + 0x1, 0x3, + 0x0, 0x0, + 0x32, 0x1, + 0x9, 0xa, + 0x13, 0x8, + 0x2, 0xd9, + 0x1a, 0x6, + 0x0, 0xad, + 0x18, 0x5, + 0x3a, 0x9, + 0xa, 0x6, + 0x2, 0x0, + 0x0, 0x9c, + 0x16, 0x5, + 0xb1, 0x18, + 0x6, 0x0, + 0x0, 0x0, + 0x6, 0x8d, + 0x10, 0x88, + 0x32, 0x1, + 0x6, 0x1b, + 0xe, 0x0, + 0x5, 0x1, + 0x0, 0x0, + 0x6, 0x2, + 0x1, 0x1, + 0x2, 0x2, + 0x2, 0x2, + 0xa, 0x0, + 0x0, 0x0, + 0x0, 0xf, + 0x3, 0x5, + 0x39, 0x1d, + 0xb, 0x4, + 0x5, 0x5, + 0x5, 0x0, + 0x0, 0x59, + 0x17, 0x0, + 0x2b, 0x0, + 0x3, 0x5, + 0x2, 0x3, + 0x0, 0x0, + 0x2, 0x6, + 0x3, 0x6, + 0x6, 0x5, + 0x6, 0x6, + 0x4, 0x3, + 0x6, 0x33, + 0xa, 0x9, + 0xa, 0x0, + 0x13, 0x1a, + 0x1, 0x19, + 0x7c, 0x1, + 0x1, 0x1, + 0x2, 0x0, + 0x20, 0x1, + 0x3b, 0x3, + 0x0, 0x0, + 0x0, 0x0, + 0x74, 0x3, + 0x3, 0x1, + 0x9, 0x61, + 0x1, 0x0, + 0x5, 0x5, + 0x5, 0x5, + 0x0, 0x9, + 0x5, 0xa, + 0x4, 0x6, + 0x0, 0x2a, + 0x2, 0x2, + 0x0, 0x1, + 0xc, 0x0, + 0x8, 0x6, + 0x0, 0x1, + 0xc, 0x0, + 0x0, 0x0, + 0x0, 0x3, + 0x3, 0x3, + 0x7, 0x10, + 0x1, 0x1b, + 0x0, 0x1c, + 0x7, 0x5f, + 0x3, 0x0, + 0x17, 0x3, + 0x3, 0x1d, + 0x8, 0x8, + 0x5, 0xb, + 0xb, 0xc, + 0x1a, 0x8, + 0x74, 0x1b, + 0x37, 0x1, + 0xb, 0x2, + 0x4, 0x3, + 0x1, 0x2, + 0x3, 0x9, + 0x11, 0x0, + 0x25, 0x0, + 0x1, 0x1, + 0x0, 0x9, + 0x3, 0x4c, + 0x3, 0xb, + 0x0, 0x6c, + 0x7, 0x25, + 0x2a, 0x40, + 0x29, 0x0, + 0x0, 0x0, + 0x4, 0x4, + 0x2c, 0x7, + 0x42, 0x2, + 0x0, 0x38, + 0x0, 0x3, + 0xb, 0xe, + 0xb, 0x3, + 0x3, 0x2, + 0x3, 0x1e, + 0x3, 0x7, + 0x91, 0x0, + 0x1d, 0x23, + 0x3, 0x7, + 0x0, 0x2, + 0x35, 0x2e, + 0x20, 0x4, + 0x4, 0x3, + 0x5, 0x0, + 0x4b, 0x2, + 0x1, 0x1c, + 0x8, 0x5, + 0x1, 0x0, + 0xa, 0x0, + 0x6, 0x7, + 0xd, 0x7, + 0x22, 0x1f, + 0x1, 0x3, + 0x8, 0x21, + 0x9, 0x7f, + 0x0, 0x0, + 0x13, 0x0, + 0x6, 0x3c, + 0x42, 0x5b, + 0x47, 0x9, + 0x0, 0x1d, + 0x4, 0x4f, + 0x3, 0x1, + 0x3, 0x0, + 0x0, 0x0, + 0x5, 0x2, + 0xe, 0x3c, + 0x0, 0x53, + 0x3, 0x1f, + 0x7, 0x0, + 0x4, 0x5, + 0x5, 0xf, + 0x1, 0x4, + 0x2c, 0x2, + 0x1f, 0x4, + 0x29, 0x0, + 0x2c, 0xd, + 0x0, 0x2d, + 0xa, 0x20, + 0xd, 0x23, + 0x0, 0x0, + 0x5, 0x0, + 0x0, 0x5, + 0x3, 0x1, + 0x0, 0x3, + 0x11, 0x6, + 0x35, 0x1, + 0x0, 0x0, + 0x0, 0x4a, + 0x4, 0x6, + 0x0, 0x1, + 0x6, 0x6, + 0x0, 0x0, + 0x6, 0x22, + 0x1, 0x1, + 0x10, 0x4, + 0xd, 0x0, + 0x1, 0x0, + 0x1, 0x0, + 0x0, 0x3, + 0x2, 0x2, + 0x5, 0x1, + 0x5, 0x6, + 0x1, 0x0, + 0x0, 0x0, + 0x1, 0x4, + 0x2, 0x1, + 0x8, 0x5, + 0x3, 0x0, + 0x2, 0x0, + 0x0, 0x4, + 0x3, 0x6, + 0x0, 0x4, + 0x4, 0x0, + 0x0, 0x1, + 0x1, 0x2, + 0x3, 0x7, + 0x5, 0xc, + 0x0, 0x0, + 0x33, 0x9, + 0x3, 0x23, + 0x4d, 0xa, + 0x6, 0x6, + 0x7, 0x7, + 0x6, 0x7, + 0x44, 0xf, + 0x7, 0x24, + 0x22, 0x0, + 0x0, 0x12, + 0x1, 0x2, + 0x1, 0x0, + 0xd, 0x3, + 0x3, 0x3, + 0x3, 0x2, + 0x2, 0x8, + 0x10, 0x3, + 0x3, 0x5, + 0x3, 0x3, + 0x6, 0x6, + 0x6, 0x6, + 0x0, 0x1, + 0x3, 0x3, + 0x6, 0x6, + 0x6, 0x6, + 0x4, 0x4, + 0x7, 0x12, + 0x7, 0x1b, + 0x1e, 0x1b, + 0x1f, 0x1d, + 0x4, 0x4, + 0x4, 0x4, + 0x4, 0x7, + 0x7, 0x2, + 0x4, 0x26, + 0x2c, 0x2b, + 0x2, 0x24, + 0x1, 0x9, + 0x9, 0x1f, + 0x3, 0x5, + 0x43, 0xe, + 0x6, 0x3, + 0x8f, 0x38, + 0x1, 0x4, + 0x12, 0x0, + 0x0, 0x0, + 0x1, 0x1, + 0x1, 0x0, + 0x1, 0xc, + 0x0, 0x16, + 0x4, 0x0, + 0x7f, 0x5, + 0x0, 0x66, + 0x1f, 0x3, + 0x0, 0x6, + 0x1a, 0x5, + 0x5, 0x5, + 0x2, 0x2, + 0x4, 0xa3, + 0x3, 0x8, + 0x5, 0x1, + 0x5, 0x3, + 0x1, 0x1a, + 0x3, 0x0, + 0x5, 0x0, + 0x0, 0x3, + 0x1, 0x4, + 0x3, 0x0, + 0x5, 0x6, + 0xb, 0x4, + 0x4, 0x4, + 0x3, 0x3, + 0x1c, 0x1f, + 0x9, 0x0, + 0x0, 0x0, + 0x6, 0x8, + 0x7, 0xa, + 0x43, 0x17, + 0x14, 0x0, + 0x0, 0x5, + 0x3, 0x0, + 0x8, 0x8, + 0x22, 0x0, + 0x0, 0x1, + 0x79, 0x6a, + 0x3, 0x21, + 0x0, 0x39, + 0x4, 0x12, + 0x4, 0x7c, + 0x5, 0x0, + 0x5, 0xb, + 0x3, 0x0, + 0x0, 0x3, + 0x3, 0x6, + 0x3c, 0x42, + 0x4, 0x48, + 0x30, 0x7f, + 0x17, 0x1, + 0x4f, 0x2, + 0x1, 0x7, + 0x43, 0x0, + 0x22, 0x0, + 0x44, 0x3e, + 0x3, 0x2, + 0x3, 0x40, + 0x39, 0x88, + 0x42, 0x0, + 0x4, 0x1, + 0x1d, 0x7, + 0x3, 0x1c, + 0x4, 0x3, + 0x1b, 0x3, + 0x7, 0x62, + 0x1f, 0x3, + 0x0, 0x4f, + 0x22, 0xd, + 0x35, 0x1f, + 0x1, 0x0, + 0x5, 0xd, + 0xa, 0x2, + 0x0, 0x1, + 0x12, 0x4, + 0x23, 0xb, + 0x4, 0x3, + 0x3, 0x23, + 0x4, 0x0, + 0x0, 0x0, + 0x6f, 0x2, + 0x7, 0x6, + 0x1, 0x4, + 0x4, 0x0, + 0x3, 0x2, + 0x4, 0x0, + 0x0, 0x0, + 0x6, 0x2, + 0x28, 0x2, + 0x1, 0x2, + 0x4c, 0x5, + 0x0, 0x0, + 0x2, 0x3, + 0x1a, 0x0, + 0x3, 0x26, + 0x7, 0xf, + 0x2, 0x2, + 0x2, 0x2, + 0x7, 0x0, + 0x4, 0x7f, + 0x5, 0x0, + 0xd, 0xd, + 0x1, 0x1, + 0x4, 0x1, + 0x1d, 0x8, + 0x0, 0x0, + 0x0, 0x0, + 0x6, 0x5, + 0x1, 0x5, + 0x5, 0x6, + 0x1a, 0x0, + 0x0, 0x1, + 0x3a, 0x0, + 0x0, 0x8, + 0x23, 0x1, + 0x8, 0x7, + 0x8, 0x1, + 0x29, 0x0, + 0x9, 0x8, + 0x8, 0x8, + 0x65, 0x3d, + 0x2, 0x0, + 0x7, 0x1, + 0x29, 0x1, + 0x0, 0x1, + 0x11, 0x5, + 0x4, 0xb, + 0x4, 0x1, + 0x0, 0xa, + 0x9, 0x4, + 0x4, 0x0, + 0x6, 0x9, + 0x3, 0x3, + 0x3, 0x3, + 0x3, 0x4, + 0x3, 0x3, + 0x3, 0x3, + 0x3, 0x2, + 0x3, 0x3, + 0x3, 0x3, + 0x3, 0x3, + 0x3, 0x3, + 0x3, 0x33, + 0x1, 0x1, + 0x27, 0x1, + 0x11, 0x0, + 0x4b, 0x1, + 0x1, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x4, + 0xc, 0x5, + 0xc, 0x0, + 0x22, 0x1, + 0x17, 0x4, + 0x5, 0xa, + 0x2, 0x2, + 0x2, 0x26, + 0x33, 0x1, + 0x1, 0x1, + 0x11, 0x4, + 0x4, 0xa, + 0x2, 0x6, + 0x5, 0x7, + 0x3, 0x3b, + 0x4, 0x3, + 0x1f, 0x4, + 0x8, 0x6, + 0x5, 0x5, + 0x5, 0x0, + 0x0, 0x40, + 0x3, 0xc, + 0x91, 0x1, + 0x0, 0x13, + 0xb, 0x1e, + 0x4, 0x19, + 0x3e, 0x2, + 0x1, 0x0, + 0x0, 0x6, + 0x1, 0x0, + 0x3, 0x16, + 0x4, 0x2, + 0xb, 0x1e, + 0x1, 0x6, + 0x6, 0x3f, + 0x6, 0x7, + 0xf, 0x3, + 0x18, 0x14, + 0x0, 0x0, + 0x4, 0x3, + 0x3, 0x3, + 0x3, 0x3, + 0x3, 0x3, + 0x3, 0x3, + 0x3, 0x2, + 0x3, 0x3, + 0x3, 0x3, + 0x3, 0x3, + 0x3, 0x3, + 0x3, 0x9, + 0x1, 0x2f, + 0x0, 0x0, + 0x2f, 0x0, + 0x0, 0x1, + 0x23, 0x4, + 0x0, 0x0, + 0x6, 0x77, + 0x1, 0xd, + 0xd, 0x0, + 0x1b, 0xf, + 0x1b, 0x44, + 0x1, 0x0, + 0x6, 0x4, + 0x5, 0x43, + 0x1f, 0x6, + 0x8, 0x8, + 0x0, 0x0, + 0x3, 0x5, + 0x13, 0x3f, + 0x1f, 0x1, + 0x5, 0x2, + 0x1e, 0x61, + 0x56, 0x2, + 0x16, 0x1, + 0xd, 0x0, + 0xb, 0xb, + 0xb, 0x3, + 0x4, 0x3, + 0x0, 0x7, + 0xe, 0x7, + 0x10, 0x0, + 0x0, 0x2, + 0x10, 0xe, + 0x4, 0x1, + 0x6, 0xf, + 0x5, 0x5, + 0x2, 0x0, + 0x6, 0x3, + 0x9, 0x1b, + 0x14, 0x0, + 0x3c, 0x0, + 0x0, 0x0, + 0x0, 0x1b, + 0x8, 0x5, + 0x34, 0x3, + 0x3c, 0x13, + 0x42, 0x1, + 0xa, 0x0, + 0x3, 0x11, + 0x18, 0x1c, + 0x1, 0x1, + 0x2, 0x3, + 0x7, 0x6, + 0x7, 0x7, + 0x7, 0x7, + 0x6, 0x9, + 0x1, 0x9, + 0xb, 0x1, + 0x2, 0x1, + 0xe, 0x0, + 0x4, 0x3, + 0x1, 0x2, + 0x0, 0x0, + 0x0, 0x0, + 0x9, 0x31, + 0x1, 0x0, + 0x4, 0x4, + 0x4, 0x4, + 0x10, 0xf, + 0x7, 0x7, + 0x2, 0x1, + 0x1, 0x1, + 0x1, 0x3, + 0x4, 0x2, + 0x0, 0x0, + 0xd, 0xa, + 0x6, 0x1, + 0x8, 0x0, + 0x18, 0x0, + 0x18, 0x2b, + 0x4, 0x2, + 0x2, 0x3, + 0x1, 0x4, + 0x5, 0x1, + 0x1, 0x1, + 0x1, 0x0, + 0x0, 0x0, + 0x0, 0x37, + 0x1, 0x0, + 0x3, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x0, 0x0, + 0x8, 0x6, + 0x2, 0x3, + 0x3, 0x0, + 0x0, 0x0, + 0x0, 0x11, + 0x0, 0x2, + 0x2, 0xf, + 0x8, 0x1, + 0x8, 0x9, + 0x10, 0x2, + 0x2, 0x2, + 0x2, 0x9, + 0x7, 0x3, + 0x0, 0x75, + 0xd, 0x0, + 0x0, 0x0, + 0x0, 0x7, + 0x8, 0x4, + 0xa, 0x6, + 0x4, 0x1, + 0x2, 0x8, + 0x2, 0x0, + 0x15, 0x15, + 0x15, 0x0, + 0x0, 0x26, + 0x1, 0xb, + 0x15, 0x5, + 0x2, 0x2, + 0x2, 0x1, + 0x15, 0x2, + 0x2, 0x2, + 0x2, 0x2, + 0x2, 0x19, + 0x0, 0x1, + 0x21, 0x1, + 0x2, 0x1, + 0x1, 0x3, + 0x1, 0x0, + 0x0, 0x4, + 0x4, 0x0, + 0x14, 0x1, + 0x1, 0x1, + 0x1, 0x2, + 0x2, 0x2, + 0x1, 0x1, + 0x5, 0x3, + 0x1, 0x12, + 0x3, 0x3, + 0xd, 0x0, + 0x11, 0x2, + 0x3, 0x3, + 0x5, 0x5, + 0x5, 0x7, + 0x2, 0x2, + 0x3, 0x2, + 0x2, 0x2, + 0x2, 0x2, + 0x2, 0x2, + 0x2, 0x2, + 0x1, 0x1, + 0x1, 0x1, + 0x4, 0x4, + 0x4, 0x2, + 0x4, 0x4, + 0x2, 0x1, + 0x4, 0x1, + 0x1, 0x67, + 0x1, 0x3, + 0x2, 0x1, + 0x1, 0x1, + 0x19, 0x19, + 0x1, 0x19, + 0x1, 0x7, + 0x1, 0x0, + 0x2, 0x10, + 0x7, 0x7, + 0x3, 0x3, + 0x1d, 0x1, + 0x1, 0x27, + 0x2, 0x3, + 0x5, 0x2, + 0x2, 0xa, + 0x0, 0x0, + 0xab, 0x85, + 0x1, 0x1, + 0x8, 0x1d, + 0x35, 0x1, + 0x1a, 0x1, + 0x35, 0x1, + 0x1, 0x1, + 0x1, 0x6f, + 0x92, 0x2, + 0x2, 0x2, + 0x2, 0x1, + 0x2, 0x1, + 0x1, 0x3, + 0xb, 0x0, + 0x0, 0x3, + 0x3, 0x3, + 0x3, 0x3, + 0x3, 0x4, + 0xc, 0x0, + 0x0, 0x1a, + 0x0, 0xf, + 0x19, 0xf, + 0x0, 0x13, + 0x13, 0x27, + 0x0, 0x14, + 0x13, 0x15, + 0x0, 0x45, + 0x11, 0x1d, + 0x1b, 0xb, + 0xb, 0x3, + 0x2, 0x1, + 0x3c, 0x3, + 0x10a, 0x42, + 0x1, 0x12, + 0x20, 0x1de, + 0x1, 0x0, + 0x3, 0x0, + 0x12, 0x18, + 0x18, 0x1c, + 0x1a, 0x0, + 0x20, 0x1e, + 0x1, 0x1, + 0x1, 0x1, + 0x1, 0x1, + 0x2, 0x4, + 0x61, 0x7, + 0x0, 0x10, + 0x35, 0x0, + 0x0, 0x0, + 0x10, 0x1f, + 0x0, 0x17, + 0x25, 0x26, + 0x1c, 0x7e, + 0x5, 0x2b, + 0x10, 0x56, + 0x47, 0x6, + 0x6, 0x1, + 0x1b, 0x0, + 0x0, 0x0, + 0x2b, 0x85, + 0x3c, 0xb, + 0x4, 0x4, + 0x6, EXTRA_PC_PORT_TEXTURE_COUNT}; +} + +const std::vector& get_jak3_tpage_dir() { + return tpage_dir; +} \ No newline at end of file diff --git a/game/graphics/texture/jak3_tpage_dir.h b/game/graphics/texture/jak3_tpage_dir.h new file mode 100644 index 0000000000..b68096098b --- /dev/null +++ b/game/graphics/texture/jak3_tpage_dir.h @@ -0,0 +1,7 @@ +#pragma once + +#include + +#include "common/common_types.h" + +const std::vector& get_jak3_tpage_dir(); \ No newline at end of file diff --git a/game/kernel/common/klink.h b/game/kernel/common/klink.h index 00beb5a722..b97ed1603a 100644 --- a/game/kernel/common/klink.h +++ b/game/kernel/common/klink.h @@ -32,6 +32,13 @@ struct ObjectFileHeader { uint32_t link_block_length; }; +struct SegmentInfoV5 { + uint32_t relocs; // offset of relocation table + uint32_t data; // offset of segment data + uint32_t size; // segment data size (0 if segment doesn't exist) + uint32_t magic; // always 0 +}; + void klink_init_globals(); /*! * Stores the state of the linker. Used for multi-threaded linking, so it can be suspended. @@ -65,6 +72,8 @@ struct link_control { bool m_on_global_heap = false; LinkHeaderV5Core* m_link_hdr = nullptr; bool m_moved_link_block = false; + int m_n_segments = 0; + SegmentInfoV5* m_link_segments_table = nullptr; void jak1_jak2_begin(Ptr object_file, const char* name, @@ -89,6 +98,7 @@ struct link_control { uint32_t jak2_work_v3(); uint32_t jak2_work_v2(); + uint32_t jak3_work_v2_v4(); uint32_t jak3_work_v5(); uint32_t jak3_work_opengoal(); diff --git a/game/kernel/common/kmachine.cpp b/game/kernel/common/kmachine.cpp index 64caecba35..bcbd9cad54 100644 --- a/game/kernel/common/kmachine.cpp +++ b/game/kernel/common/kmachine.cpp @@ -20,6 +20,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" @@ -1066,6 +1067,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) @@ -1181,4 +1190,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/common/kmemcard.cpp b/game/kernel/common/kmemcard.cpp index e39b48193a..99a7d04e23 100644 --- a/game/kernel/common/kmemcard.cpp +++ b/game/kernel/common/kmemcard.cpp @@ -173,6 +173,10 @@ bool file_is_present(int id, int bank = 0) { */ void pc_update_card() { // int highest_save_count = 0; + // TODO handle jak 3 + if (g_game_version == GameVersion::Jak3) { + return; + } mc_last_file = -1; for (s32 file = 0; file < 4; file++) { auto bankname = mc_get_filename(g_game_version, 4 + file * 2); diff --git a/game/kernel/jak2/kmachine_extras.cpp b/game/kernel/jak2/kmachine_extras.cpp index 186c2a38bb..0163a1b117 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/kernel/jak3/fileio.cpp b/game/kernel/jak3/fileio.cpp index 4d4445b721..f62172228b 100644 --- a/game/kernel/jak3/fileio.cpp +++ b/game/kernel/jak3/fileio.cpp @@ -105,12 +105,14 @@ char* MakeFileName(int type, const char* name, int new_string) { // plain GOAL data object file case DATA_FILE_TYPE: // 0x20 - sprintf(buf, "%sfinal/%s.go", prefix, name); + // sprintf(buf, "%sfinal/%s.go", prefix, name); + sprintf(buf, "%sout/jak3/obj/%s.go", prefix, name); break; // texture page case TX_PAGE_FILE_TYPE: // 0x21 - sprintf(buf, "%sdata/texture-page%d/%s.go", prefix, TX_PAGE_VERSION, name); + // sprintf(buf, "%sdata/texture-page%d/%s.go", prefix, TX_PAGE_VERSION, name); + sprintf(buf, "%sout/jak3/obj/%s.go", prefix, name); break; // joint animation @@ -145,7 +147,8 @@ char* MakeFileName(int type, const char* name, int new_string) { // Everybody's favorite "art group" file. Container of different art. case ART_GROUP_FILE_TYPE: // 0x30 - sprintf(buf, "%sfinal/art-group%d/%s-ag.go", prefix, ART_FILE_VERSION, name); + // sprintf(buf, "%sfinal/art-group%d/%s-ag.go", prefix, ART_FILE_VERSION, name); + sprintf(buf, "%sout/jak3/obj/%s.go", prefix, name); break; // GOAL data object file containing visibility data. This likely contained the visibility data diff --git a/game/kernel/jak3/klink.cpp b/game/kernel/jak3/klink.cpp index fe7440ef27..928422b13a 100644 --- a/game/kernel/jak3/klink.cpp +++ b/game/kernel/jak3/klink.cpp @@ -7,6 +7,7 @@ #include "game/kernel/common/fileio.h" #include "game/kernel/common/klink.h" #include "game/kernel/common/kprint.h" +#include "game/kernel/common/memory_layout.h" #include "game/kernel/jak3/kmalloc.h" #include "game/kernel/jak3/kscheme.h" #include "game/mips2c/mips2c_table.h" @@ -145,19 +146,27 @@ void link_control::jak3_begin(Ptr object_file, LinkHeaderV5* l_hdr = (LinkHeaderV5*)m_object_data.c(); m_flags = flags; u16 version = l_hdr->core.version; - ASSERT(version == 5); // I think, since there's only a work v5. + + if (version == 4 || version == 2) { + // it's a v4 produced by opengoal... lets just try using jak2's linker + m_version = version; + printf("got version 4, falling back to jak1/jak2\n"); + jak1_jak2_begin(object_file, name, size, heap, flags); + return; + } + ASSERT(version == 5); m_heap_top = heap->top; // this->unk_init1 = 1; TODO m_busy = true; m_heap = heap; - // this->m_unk_init0_0 = 0; TODO + m_entry.offset = 0; m_keep_debug = false; m_link_hdr = &l_hdr->core; // m_hdr_ptr m_code_size = 0; // this->m_ptr_2 = l_hdr; just used for cache flush, so skip it! not really the right thing?? - // this->m_unk_init0_3 = 0; TODO - // this->m_unk_init0_4 = 0; TODO - // this->m_unk_init0_5 = 0; TODO + m_state = 0; + m_segment_process = 0; + m_moved_link_block = 0; if (version == 4) { ASSERT_NOT_REACHED(); } else { @@ -183,7 +192,17 @@ void link_control::jak3_begin(Ptr object_file, m_heap->current = m_object_data; } } else { + // the link block is in the heap. This is problematic because we don't want to hang + // on to this long term, but executing the top-level may allocate on this heap, causing + // stuff to get added after the hole left by the link data. + // So, we make a temporary allocation on the top and move it there. + m_moved_link_block = true; + Ptr new_link_block_mem; + u8* link_block_move_dst; + u8* old_link_block; + u32 link_block_move_size; + if (m_link_hdr->version == 5) { // the link block is inside our heap, but we'd like to avoid this. // we'll copy the link block, and the header to the temporary part of our heap: @@ -191,9 +210,9 @@ void link_control::jak3_begin(Ptr object_file, // where we loaded the link data: auto offset_to_link_data = m_link_hdr->length_to_get_to_link; - // allocate memory for link data, and header - auto new_link_block_mem = kmalloc(m_heap, m_link_hdr->link_length + sizeof(LinkHeaderV5), - KMALLOC_TOP, "link-block"); + // allocate memory for link data, and header (pvVar5) + new_link_block_mem = kmalloc(m_heap, m_link_hdr->link_length + sizeof(LinkHeaderV5), + KMALLOC_TOP, "link-block"); // we'll place the header and link block back to back in the newly alloated block, // so patch up the offset for this new layout before copying @@ -202,30 +221,38 @@ void link_control::jak3_begin(Ptr object_file, // move header! memmove(new_link_block_mem.c(), object_file.c(), sizeof(LinkHeaderV5)); - // move link data! - auto old_link_block = object_file.c() + offset_to_link_data; - memmove(new_link_block_mem.c() + sizeof(LinkHeaderV5), old_link_block, - m_link_hdr->link_length); + // dst: pvVar6 + link_block_move_dst = new_link_block_mem.c() + sizeof(LinkHeaderV5); - // update our pointer to the link header core. - m_link_hdr = &((LinkHeaderV5*)new_link_block_mem.c())->core; + // move link data! (pcVar8) + old_link_block = object_file.c() + offset_to_link_data; - // scary: update the heap to kick out all the link data (and likely the actual data too). - // we'll be relying on the linking process to copy the data as needed.l - if (old_link_block < m_heap->current.c()) { - if (link_debug_printfs) { - printf("Kick out old link block\n"); - } - m_heap->current.offset = old_link_block - g_ee_main_mem; - } + link_block_move_size = m_link_hdr->link_length; } else { + // hm, maybe only possible with version 2 or 3?? ASSERT_NOT_REACHED(); } + + memmove(link_block_move_dst, old_link_block, link_block_move_size); + + // update our pointer to the link header core. + m_link_hdr = &((LinkHeaderV5*)new_link_block_mem.c())->core; + + // scary: update the heap to kick out all the link data (and likely the actual data too). + // we'll be relying on the linking process to copy the data as needed.l + if (old_link_block < m_heap->current.c()) { + if (link_debug_printfs) { + printf("Kick out old link block\n"); + } + m_heap->current.offset = old_link_block - g_ee_main_mem; + } } } if ((m_flags & LINK_FLAG_FORCE_DEBUG) && MasterDebug && !DiskBoot) { m_keep_debug = true; } + // hack: + m_version = m_link_hdr->version; } } @@ -248,6 +275,11 @@ uint32_t link_control::jak3_work() { ASSERT(!m_opengoal); *(u32*)(((u8*)m_link_hdr) - 4) = *((s7 + jak3_symbols::FIX_SYM_LINK_BLOCK - 1).cast()); rv = jak3_work_v5(); + } else if (m_version == 4 || m_version == 2) { + // Note: this is a bit of a hack. Jak 3 doesn't support v2/v4. But, OpenGOAL generates data + // objects in this format. We will just try reusing the jak 2 v2/v4 linker here and see if it + // works. See corresponding call to jak1_jak2_begin in begin. + rv = jak3_work_v2_v4(); } else { ASSERT_MSG(false, fmt::format("UNHANDLED OBJECT FILE VERSION {} IN WORK!", m_version)); return 0; @@ -257,9 +289,175 @@ uint32_t link_control::jak3_work() { return rv; } +namespace jak3 { +void ultimate_memcpy(void* dst, void* src, uint32_t size); +} + uint32_t link_control::jak3_work_v5() { - ASSERT_NOT_REACHED(); // save this for another day... - // TODO: there are some missing vars in begin. I just commented them out for now. + if (m_state == 0) { + // here, we change length_to_get_to_link to an actual pointer to the link table. + // since we need 32-bits, we'll store offset from g_ee_mem. + u8* link_data = ((u8*)m_link_hdr) - 4 + m_link_hdr->length_to_get_to_link; + m_link_hdr->length_to_get_to_link = link_data - g_ee_main_mem; + + m_n_segments = m_link_hdr->n_segments; + + // the link segments table is just at the start of the link data: + m_link_segments_table = (SegmentInfoV5*)link_data; + /* + for (int i = 0; i < m_n_segments; i++) { + printf(" %d: reloc %d, data %d, size %d, magic %d\n", i, m_link_segments_table[i].relocs, + m_link_segments_table[i].data, m_link_segments_table[i].size, + m_link_segments_table[i].magic); + } + */ + // for now, only supporting 1 segment + ASSERT(m_n_segments == 1); + + // fixup the relocs/data offsets into addresses (again, offsets from g_ee_main_mem) + // relocs is relative to this link data + m_link_segments_table[0].relocs += (link_data - g_ee_main_mem); + // data is relative to usual object_data + m_link_segments_table[0].data += m_object_data.offset; + ASSERT(m_link_segments_table[0].magic == 1); + + // see if there's even data + if (m_link_segments_table[0].size == 0) { + // no data. + m_link_segments_table[0].data = 0; + } else { + // check if we need to move the main segment. + if (!m_moved_link_block || + ((m_link_hdr->link_length + 0x50) <= m_link_hdr->length_to_get_to_code)) { + // printf(" v5 linker allocating for main segment... (%d)\n", m_moved_link_block); + auto old_data_offset = m_link_segments_table[0].data; // 25 + auto new_data = kmalloc(m_heap, m_link_segments_table[0].size, 0, "main-segment"); + m_link_segments_table[0].data = new_data.offset; + if (!new_data.offset) { + MsgErr("dkernel: unable to malloc %d bytes for main-segment\n", + m_link_segments_table[0].size); + return 1; + } + jak3::ultimate_memcpy(new_data.c(), old_data_offset + g_ee_main_mem, + m_link_segments_table[0].size); + } else { + m_heap->current = m_object_data + m_code_size; + if (m_heap->top.offset <= m_heap->current.offset) { + MsgErr("dkernel: heap overflow\n"); + return 1; + } + } + } + + m_segment_process = 0; + m_state = 1; + m_object_data.offset = m_link_segments_table[0].data; + + Ptr base_ptr(m_link_segments_table[0].data); + Ptr data_ptr = base_ptr - 4; + Ptr link_ptr(m_link_segments_table[0].relocs); + + bool fixing = false; + if (*link_ptr) { + // we have pointers + while (true) { + while (true) { + if (!fixing) { + // seeking + data_ptr.offset += 4 * (*link_ptr); + } else { + // fixing. + for (uint32_t i = 0; i < *link_ptr; i++) { + // uint32_t old_code = *(const uint32_t*)(&data.at(data_ptr)); + u32 old_code = *data_ptr.cast(); + if ((old_code >> 24) == 0) { + // printf("modifying pointer at 0x%x (old 0x%x) : now ", data_ptr.offset, + // *data_ptr.cast()); + *data_ptr.cast() += base_ptr.offset; + // printf("0x%x\n", *data_ptr.cast()); + } else { + ASSERT_NOT_REACHED(); + /* + f.stats.v3_split_pointers++; + auto dest_seg = (old_code >> 8) & 0xf; + auto lo_hi_offset = (old_code >> 12) & 0xf; + ASSERT(lo_hi_offset); + ASSERT(dest_seg < 3); + auto offset_upper = old_code & 0xff; + uint32_t low_code = *(const uint32_t*)(&data.at(data_ptr + 4 * lo_hi_offset)); + uint32_t offset = low_code & 0xffff; + if (offset_upper) { + offset += (offset_upper << 16); + } + f.pointer_link_split_word(seg_id, data_ptr - base_ptr, + data_ptr + 4 * lo_hi_offset - base_ptr, dest_seg, offset); + */ + } + data_ptr.offset += 4; + } + } + + if (*link_ptr != 0xff) + break; + link_ptr.offset++; + if (*link_ptr == 0) { + link_ptr.offset++; + fixing = !fixing; + } + } + + link_ptr.offset++; + fixing = !fixing; + if (*link_ptr == 0) + break; + } + } + link_ptr.offset++; + + // symbol linking. + if (*link_ptr) { + auto sub_link_ptr = link_ptr; + + while (true) { + auto reloc = *sub_link_ptr; + auto next_link_ptr = sub_link_ptr + 1; + link_ptr = next_link_ptr; + + if ((reloc & 0x80) == 0) { + link_ptr = sub_link_ptr + 3; // + const char* sname = link_ptr.cast().c(); + link_ptr.offset += strlen(sname) + 1; + // printf("linking symbol %s\n", sname); + auto goalObj = jak3::intern_from_c(-1, 0, sname); + link_ptr = c_symlink2(m_object_data, goalObj.cast(), link_ptr); + + } else if ((reloc & 0x3f) == 0x3f) { + ASSERT(false); // todo, does this ever get hit? + } else { + int n_methods_base = reloc & 0x3f; + int n_methods = n_methods_base * 4; + if (n_methods_base) { + n_methods += 3; + } + link_ptr.offset += + 2; // ghidra misses some aliasing here and would have you think this is +1! + const char* sname = link_ptr.cast().c(); + // printf("linking type %s\n", sname); + link_ptr.offset += strlen(sname) + 1; + auto goalObj = jak3::intern_type_from_c(-1, 0, sname, n_methods); + link_ptr = c_symlink2(m_object_data, goalObj.cast(), link_ptr); + } + + sub_link_ptr = link_ptr; + if (!*sub_link_ptr) + break; + } + } + m_entry = m_object_data + 4; + return 1; + } else { + ASSERT_NOT_REACHED(); + } } namespace { @@ -543,6 +741,7 @@ void link_control::jak3_finish(bool jump_from_c_to_goal) { *EnableMethodSet = *EnableMethodSet + m_keep_debug; + // printf("finish %s\n", m_object_name); if (m_opengoal) { // setup mips2c functions const auto& it = Mips2C::gMips2CLinkCallbacks[GameVersion::Jak3].find(m_object_name); @@ -567,7 +766,17 @@ void link_control::jak3_finish(bool jump_from_c_to_goal) { output_segment_load(m_object_name, m_link_block_ptr, m_flags); } } else { - ASSERT_NOT_REACHED(); + if (m_flags & LINK_FLAG_EXECUTE) { + auto entry = m_entry; + auto name = basename_goal(m_object_name); + strcpy(Ptr(LINK_CONTROL_NAME_ADDR).c(), name); + // printf(" about to call... (0x%x)\n", entry.offset); + Ptr type(*((entry - 4).cast())); + // printf(" type is %s\n", jak3::sym_to_cstring(type->symbol)); + jak3::call_method_of_type_arg2(entry.offset, type, GOAL_RELOC_METHOD, m_heap.offset, + Ptr(LINK_CONTROL_NAME_ADDR).offset); + // printf(" done with call!\n"); + } } *EnableMethodSet = *EnableMethodSet - this->m_keep_debug; @@ -616,11 +825,24 @@ u32 link_busy() { void link_reset() { saved_link_control.m_busy = 0; } -uint64_t link_begin(u64* /*args*/) { - ASSERT_NOT_REACHED(); +uint64_t link_begin(u64* args) { + saved_link_control.jak3_begin(Ptr(args[0]), Ptr(args[1]).c(), args[2], + Ptr(args[3]), args[4]); + auto work_result = saved_link_control.jak3_work(); + // if we managed to finish in one shot, take care of calling finish + if (work_result) { + // called from goal + saved_link_control.jak3_finish(false); + } + return work_result != 0; } uint64_t link_resume() { - ASSERT_NOT_REACHED(); + auto work_result = saved_link_control.jak3_work(); + if (work_result) { + // called from goal + saved_link_control.jak3_finish(false); + } + return work_result != 0; } // Note: update_goal_fns changed to skip the hashtable lookup since symlink2/symlink3 are now fixed @@ -654,3 +876,214 @@ void ultimate_memcpy(void* dst, void* src, uint32_t size) { } } // namespace jak3 + +#define LINK_V2_STATE_INIT_COPY 0 +#define LINK_V2_STATE_OFFSETS 1 +#define LINK_V2_STATE_SYMBOL_TABLE 2 +#define OBJ_V2_CLOSE_ENOUGH 0x90 +#define OBJ_V2_MAX_TRANSFER 0x80000 + +uint32_t link_control::jak3_work_v2_v4() { + // u32 startCycle = kernel.read_clock(); todo + + if (m_state == LINK_V2_STATE_INIT_COPY) { // initialization and copying to heap + // we move the data segment to eliminate gaps + // very small gaps can be tolerated, as it is not worth the time penalty to move large objects + // many bytes. if this requires copying a large amount of data, we will do it in smaller chunks, + // allowing the copy to be spread over multiple game frames + + // state initialization + if (m_segment_process == 0) { + m_heap_gap = + m_object_data - m_heap->current; // distance between end of heap and start of object + } + + if (m_heap_gap < + OBJ_V2_CLOSE_ENOUGH) { // close enough, don't relocate the object, just expand the heap + if (link_debug_printfs) { + printf("[work_v2] close enough, not moving\n"); + } + m_heap->current = m_object_data + m_code_size; + if (m_heap->top.offset <= m_heap->current.offset) { + MsgErr("dkernel: heap overflow\n"); // game has ~% instead of \n :P + return 1; + } + + // added in jak 2, move the link block to the top of the heap so we can allocate on + // the level heap during linking without overwriting link data. this is used for level types + u32 link_block_size = *m_link_block_ptr.cast(); + auto new_link_block = kmalloc(m_heap, link_block_size, KMALLOC_TOP, "link-block"); + memmove(new_link_block.c(), m_link_block_ptr.c() - 4, link_block_size); + m_link_block_ptr = Ptr(new_link_block.offset + 4); // basic offset + + } else { // not close enough, need to move the object + // on the first run of this state... + if (m_segment_process == 0) { + m_original_object_location = m_object_data; + // allocate on heap, will have no gap + m_object_data = kmalloc(m_heap, m_code_size, 0, "data-segment"); + if (link_debug_printfs) { + printf("[work_v2] moving from 0x%x to 0x%x\n", m_original_object_location.offset, + m_object_data.offset); + } + if (!m_object_data.offset) { + MsgErr("dkernel: unable to malloc %d bytes for data-segment\n", m_code_size); + return 1; + } + } + + // the actual copy + Ptr source = m_original_object_location + m_segment_process; + u32 size = m_code_size - m_segment_process; + + if (size > OBJ_V2_MAX_TRANSFER) { // around .5 MB + jak3::ultimate_memcpy((m_object_data + m_segment_process).c(), source.c(), + OBJ_V2_MAX_TRANSFER); + m_segment_process += OBJ_V2_MAX_TRANSFER; + return 0; // return, don't want to take too long. + } + + // if we have bytes to copy, but they are less than the max transfer, do it in one shot! + if (size) { + jak3::ultimate_memcpy((m_object_data + m_segment_process).c(), source.c(), size); + if (m_segment_process > 0) { // if we did a previous copy, we return now.... + m_state = LINK_V2_STATE_OFFSETS; + m_segment_process = 0; + return 0; + } + } + } + + // otherwise go straight into the next state. + m_state = LINK_V2_STATE_OFFSETS; + m_segment_process = 0; + } + + // init offset phase + if (m_state == LINK_V2_STATE_OFFSETS && m_segment_process == 0) { + m_reloc_ptr = m_link_block_ptr + 8; // seek to link table + if (*m_reloc_ptr == 0) { // do we have pointer links to do? + m_reloc_ptr.offset++; // if not, seek past the \0, and go to next state + m_state = LINK_V2_STATE_SYMBOL_TABLE; + m_segment_process = 0; + } else { + m_base_ptr = m_object_data; // base address for offsetting. + m_loc_ptr = m_object_data; // pointer which seeks thru the code + m_table_toggle = 0; // are we seeking or fixing? + m_segment_process = 1; // we've done first time setup + } + } + + if (m_state == LINK_V2_STATE_OFFSETS) { // pointer fixup + // this state reads through a table. Values alternate between "seek amount" and "number of + // consecutive 4-byte + // words to fix up". The counts are encoded using a variable length encoding scheme. They use + // a very stupid + // method of encoding values which requires O(n) bytes to store the value n. + + // to avoid dropping a frame, we check every 0x400 relocations to see if 0.5 milliseconds have + // elapsed. + u32 relocCounter = 0x400; + while (true) { // loop over entire table + while (true) { // loop over current mode + + // read and seek table + u8 count = *m_reloc_ptr; + m_reloc_ptr.offset++; + + if (!m_table_toggle) { // seek mode + m_loc_ptr.offset += + 4 * + count; // perform seek (MIPS instructions are 4 bytes, so we >> 2 the seek amount) + } else { // offset mode + for (u32 i = 0; i < count; i++) { + if (m_loc_ptr.offset % 4) { + ASSERT(false); + } + u32 code = *(m_loc_ptr.cast()); + code += m_base_ptr.offset; + *(m_loc_ptr.cast()) = code; + m_loc_ptr.offset += 4; + } + } + + if (count != 0xff) { + break; + } + + if (*m_reloc_ptr == 0) { + m_reloc_ptr.offset++; + m_table_toggle = m_table_toggle ^ 1; + } + } + + // reached the end of the tableToggle mode + m_table_toggle = m_table_toggle ^ 1; + if (*m_reloc_ptr == 0) { + break; // end of the state + } + relocCounter--; + if (relocCounter == 0) { + // u32 clock_value = kernel.read_clock(); + // if(clock_value - startCycle > 150000) { // 0.5 milliseconds + // return 0; + // } + relocCounter = 0x400; + } + } + m_reloc_ptr.offset++; + m_state = 2; + m_segment_process = 0; + } + + if (m_state == 2) { // GOAL object fixup + if (*m_reloc_ptr == 0) { + m_state = 3; + m_segment_process = 0; + } else { + while (true) { + u32 relocation = *m_reloc_ptr; + m_reloc_ptr.offset++; + Ptr goalObj; + char* name; + if ((relocation & 0x80) == 0) { + // symbol! + if (relocation > 9) { + m_reloc_ptr.offset--; // no idea what this is. + } + name = m_reloc_ptr.cast().c(); + if (link_debug_printfs) { + printf("[work_v2] symlink: %s\n", name); + } + goalObj = jak3::intern_from_c(-1, 0, name).cast(); + } else { + // type! + u8 nMethods = relocation & 0x7f; + if (nMethods == 0) { + nMethods = 1; + } + name = m_reloc_ptr.cast().c(); + if (link_debug_printfs) { + printf("[work_v2] symlink -type: %s\n", name); + } + goalObj = jak3::intern_type_from_c(-1, 0, name, nMethods).cast(); + } + m_reloc_ptr.offset += strlen(name) + 1; + // DECOMPILER->hookStartSymlinkV3(_state - 1, _objectData, std::string(name)); + m_reloc_ptr = c_symlink2(m_object_data, goalObj, m_reloc_ptr); + // DECOMPILER->hookFinishSymlinkV3(); + if (*m_reloc_ptr == 0) { + break; // done + } + // u32 currentCycle = kernel.read_clock(); + // if(currentCycle - startCycle > 150000) { + // return 0; + // } + } + m_state = 3; + m_segment_process = 0; + } + } + m_entry = m_object_data + 4; + return 1; +} diff --git a/game/kernel/jak3/kmachine.cpp b/game/kernel/jak3/kmachine.cpp index 58a133ab78..2c1b97a4c0 100644 --- a/game/kernel/jak3/kmachine.cpp +++ b/game/kernel/jak3/kmachine.cpp @@ -5,6 +5,7 @@ #include "common/symbols.h" #include "game/graphics/gfx.h" +#include "game/graphics/jak3_texture_remap.h" #include "game/graphics/sceGraphicsInterface.h" #include "game/kernel/common/fileio.h" #include "game/kernel/common/kdgo.h" @@ -20,6 +21,7 @@ #include "game/kernel/jak3/kboot.h" #include "game/kernel/jak3/kdgo.h" #include "game/kernel/jak3/klisten.h" +#include "game/kernel/jak3/kmachine_extras.h" #include "game/kernel/jak3/kmalloc.h" #include "game/kernel/jak3/kscheme.h" #include "game/kernel/jak3/ksound.h" @@ -303,11 +305,13 @@ int ShutdownMachine() { } u32 KeybdGetData(u32 /*_mouse*/) { - ASSERT_NOT_REACHED(); + return 0; + // ASSERT_NOT_REACHED(); } u32 MouseGetData(u32 /*_mouse*/) { - ASSERT_NOT_REACHED(); + // ASSERT_NOT_REACHED(); + return 0; } /*! @@ -348,38 +352,6 @@ void PutDisplayEnv(u32 alp) { void aybabtu() {} -void pc_set_levels(u32 lev_list) { - if (!Gfx::GetCurrentRenderer()) { - return; - } - std::vector levels; - for (int i = 0; i < LEVEL_MAX; i++) { - u32 lev = *Ptr(lev_list + i * 4); - std::string ls = Ptr(lev).c()->data(); - if (ls != "none" && ls != "#f" && ls != "") { - levels.push_back(ls); - } - } - - Gfx::GetCurrentRenderer()->set_levels(levels); -} - -void pc_set_active_levels(u32 lev_list) { - if (!Gfx::GetCurrentRenderer()) { - return; - } - std::vector levels; - for (int i = 0; i < LEVEL_MAX; i++) { - u32 lev = *Ptr(lev_list + i * 4); - std::string ls = Ptr(lev).c()->data(); - if (ls != "none" && ls != "#f" && ls != "") { - levels.push_back(ls); - } - } - - Gfx::GetCurrentRenderer()->set_active_levels(levels); -} - //// PC Stuff void InitMachine_PCPort() { // PC Port added functions @@ -393,11 +365,12 @@ void InitMachine_PCPort() { }, make_string_from_c); - make_function_symbol_from_c("__pc-set-levels", (void*)pc_set_levels); - make_function_symbol_from_c("__pc-set-active-levels", (void*)pc_set_active_levels); - // make_function_symbol_from_c("__pc-get-tex-remap", (void*)lookup_jak2_texture_dest_offset); + make_function_symbol_from_c("__pc-set-levels", (void*)kmachine_extras::pc_set_levels); + make_function_symbol_from_c("__pc-set-active-levels", + (void*)kmachine_extras::pc_set_active_levels); + make_function_symbol_from_c("__pc-get-tex-remap", (void*)lookup_jak3_texture_dest_offset); // make_function_symbol_from_c("pc-init-autosplitter-struct", (void*)init_autosplit_struct); - // make_function_symbol_from_c("pc-encode-utf8-string", (void*)encode_utf8_string); + make_function_symbol_from_c("pc-encode-utf8-string", (void*)kmachine_extras::encode_utf8_string); // discord rich presence // make_function_symbol_from_c("pc-discord-rpc-update", (void*)update_discord_rpc); diff --git a/game/kernel/jak3/kmachine_extras.cpp b/game/kernel/jak3/kmachine_extras.cpp new file mode 100644 index 0000000000..a28aae42be --- /dev/null +++ b/game/kernel/jak3/kmachine_extras.cpp @@ -0,0 +1,65 @@ +#include "kmachine_extras.h" + +#include +#include + +#include "kscheme.h" + +#include "common/symbols.h" +#include "common/util/FontUtils.h" + +#include "game/kernel/common/Symbol4.h" +#include "game/kernel/common/kmachine.h" +#include "game/kernel/common/kscheme.h" + +namespace kmachine_extras { +using namespace jak3; + +void pc_set_levels(u32 lev_list) { + if (!Gfx::GetCurrentRenderer()) { + return; + } + std::vector levels; + for (int i = 0; i < LEVEL_MAX; i++) { + u32 lev = *Ptr(lev_list + i * 4); + std::string ls = Ptr(lev).c()->data(); + if (ls != "none" && ls != "#f" && ls != "") { + levels.push_back(ls); + } + } + + Gfx::GetCurrentRenderer()->set_levels(levels); +} + +void pc_set_active_levels(u32 lev_list) { + if (!Gfx::GetCurrentRenderer()) { + return; + } + std::vector levels; + for (int i = 0; i < LEVEL_MAX; i++) { + u32 lev = *Ptr(lev_list + i * 4); + std::string ls = Ptr(lev).c()->data(); + if (ls != "none" && ls != "#f" && ls != "") { + levels.push_back(ls); + } + } + + Gfx::GetCurrentRenderer()->set_active_levels(levels); +} + +inline u64 bool_to_symbol(const bool val) { + return val ? static_cast(s7.offset) + true_symbol_offset(g_game_version) : s7.offset; +} + +inline bool symbol_to_bool(const u32 symptr) { + return symptr != s7.offset; +} + +// TODO - move to common +void encode_utf8_string(u32 src_str_ptr, u32 str_dest_ptr) { + auto str = std::string(Ptr(src_str_ptr).c()->data()); + std::string converted = get_font_bank(GameTextVersion::JAK3)->convert_utf8_to_game(str); + strcpy(Ptr(str_dest_ptr).c()->data(), converted.c_str()); +} + +} // namespace kmachine_extras diff --git a/game/kernel/jak3/kmachine_extras.h b/game/kernel/jak3/kmachine_extras.h new file mode 100644 index 0000000000..77e22a3e0b --- /dev/null +++ b/game/kernel/jak3/kmachine_extras.h @@ -0,0 +1,16 @@ +#pragma once +#include +#include + +#include "common/common_types.h" +#include "common/util/json_util.h" + +namespace kmachine_extras { +void pc_set_levels(u32 lev_list); +void pc_set_active_levels(u32 lev_list); +u32 alloc_vagdir_names(u32 heap_sym); +inline u64 bool_to_symbol(const bool val); +// TODO - move to common +void encode_utf8_string(u32 src_str_ptr, u32 str_dest_ptr); + +} // namespace kmachine_extras diff --git a/game/kernel/jak3/kscheme.cpp b/game/kernel/jak3/kscheme.cpp index 724026fd7a..634d617ffb 100644 --- a/game/kernel/jak3/kscheme.cpp +++ b/game/kernel/jak3/kscheme.cpp @@ -54,11 +54,11 @@ void kscheme_init_globals() { #endif } -namespace { u32 u32_in_fixed_sym(u32 offset) { return Ptr>(s7.offset + offset)->value(); } +namespace { void fixed_sym_set(u32 offset, u32 value) { Ptr>(s7.offset + offset)->value() = value; } @@ -664,6 +664,9 @@ Ptr> intern_from_c_ht(const char* name) { */ Ptr> find_symbol_from_c(uint16_t sym_id, const char* name) { #ifdef JAK3_HASH_TABLE + if (!strcmp(name, "_empty_")) { + return (s7 + S7_OFF_FIX_SYM_EMPTY_PAIR).cast>(); + } return find_symbol_from_c_ht(name); #endif // sign extend @@ -733,6 +736,9 @@ Ptr> find_symbol_from_c(uint16_t sym_id, const char* name) { */ Ptr> intern_from_c(int sym_id, int flags, const char* name) { #ifdef JAK3_HASH_TABLE + if (!strcmp(name, "_empty_")) { + return (s7 + S7_OFF_FIX_SYM_EMPTY_PAIR).cast>(); + } return intern_from_c_ht(name); #endif // first, look up the symbol. diff --git a/game/kernel/jak3/kscheme.h b/game/kernel/jak3/kscheme.h index 9dc847290a..ef76389c4d 100644 --- a/game/kernel/jak3/kscheme.h +++ b/game/kernel/jak3/kscheme.h @@ -40,6 +40,7 @@ struct Type { }; s64 load_and_link(const char* filename, char* decode_name, kheapinfo* heap, u32 flags); +u32 u32_in_fixed_sym(u32 offset); Ptr> intern_from_c(int sym_id, int flags, const char* name); u64 load(u32 /*file_name_in*/, u32 /*heap_in*/); u64 loadb(u32 /*file_name_in*/, u32 /*heap_in*/, u32 /*param3*/); @@ -56,7 +57,9 @@ u64 call_method_of_type(u32 arg, Ptr type, u32 method_id); u64 new_pair(u32 heap, u32 type, u32 car, u32 cdr); u64 call_goal_function_by_name(const char* name); Ptr intern_type_from_c(int a, int b, const char* name, u64 methods); +u64 alloc_heap_object(u32 heap, u32 type, u32 size, u32 pp); int InitHeapAndSymbol(); +u64 call_method_of_type_arg2(u32 arg, Ptr type, u32 method_id, u32 a1, u32 a2); template Ptr> sym_to_string_ptr(Ptr> in) { return Ptr>(SymbolString.offset + in.offset - s7.offset); diff --git a/game/kernel/jak3/ksound.cpp b/game/kernel/jak3/ksound.cpp index ada5493fe7..8dae6bd511 100644 --- a/game/kernel/jak3/ksound.cpp +++ b/game/kernel/jak3/ksound.cpp @@ -1,6 +1,7 @@ #include "ksound.h" #include "game/kernel/common/kdgo.h" +#include "game/kernel/common/ksound.h" #include "game/kernel/jak3/kscheme.h" namespace jak3 { @@ -11,5 +12,9 @@ void InitSoundScheme() { make_function_symbol_from_c("rpc-busy?", (void*)RpcBusy); make_function_symbol_from_c("test-load-dgo-c", (void*)LoadDGOTest); make_stack_arg_function_symbol_from_c("rpc-call", (void*)RpcCall_wrapper); + + // PC port interns + make_function_symbol_from_c("pc-sound-set-flava-hack", (void*)set_flava_hack); + make_function_symbol_from_c("pc-sound-set-fade-hack", (void*)set_fade_hack); } } // namespace jak3 \ No newline at end of file diff --git a/game/mips2c/jak3_functions/collide_cache.cpp b/game/mips2c/jak3_functions/collide_cache.cpp new file mode 100644 index 0000000000..f0f5da2a41 --- /dev/null +++ b/game/mips2c/jak3_functions/collide_cache.cpp @@ -0,0 +1,1891 @@ +// cppcheck-suppress-file unusedLabels +//--------------------------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_10_collide_shape_prim_mesh { +struct Cache { + void* cheat_mode; // *cheat-mode* + void* display_capture_mode; // *display-capture-mode* + void* fake_scratchpad_data; // *fake-scratchpad-data* + void* debug; // debug + void* format; // format + void* print_exceeded_max_cache_tris; // print-exceeded-max-cache-tris +} 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->sd(fp, 8, sp); // sd fp, 8(sp) + c->mov64(fp, t9); // or fp, t9, r0 + 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(s5, a0); // or s5, a0, r0 + c->mov64(gp, a1); // or gp, a1, r0 + // nop // sll r0, r0, 0 + c->lwu(s3, 60, s5); // lwu s3, 60(s5) + c->daddiu(v1, gp, 108); // daddiu v1, gp, 108 + c->lwu(a0, 4, gp); // lwu a0, 4(gp) + bc = c->sgpr64(s3) == c->sgpr64(s7); // beq s3, s7, L92 + // nop // sll r0, r0, 0 + if (bc) {goto block_18;} // branch non-likely + + c->addiu(a1, r0, 100); // addiu a1, r0, 100 + c->dsll(a2, a0, 1); // dsll a2, a0, 1 + bc = c->sgpr64(a0) == c->sgpr64(a1); // beq a0, a1, L89 + c->daddu(a0, a2, a0); // daddu a0, a2, a0 + if (bc) {goto block_11;} // branch non-likely + + c->dsll(a0, a0, 4); // dsll a0, a0, 4 + c->daddu(s4, v1, a0); // daddu s4, v1, a0 + c->mov64(a0, s3); // or a0, s3, r0 + c->lwu(v1, -4, a0); // lwu v1, -4(a0) + c->lwu(t9, 72, v1); // lwu t9, 72(v1) + c->lwu(v1, 0, s5); // lwu v1, 0(s5) + c->lwu(v1, 136, v1); // lwu v1, 136(v1) + c->lwu(v1, 128, v1); // lwu v1, 128(v1) + c->lb(a1, 8, s5); // lb a1, 8(s5) + c->dsll(a1, a1, 5); // dsll a1, a1, 5 + c->daddu(v1, v1, a1); // daddu v1, v1, a1 + c->lwu(v1, 28, v1); // lwu v1, 28(v1) + c->daddu(a1, r0, v1); // daddu a1, r0, v1 + get_fake_spad_addr2(a2, cache.fake_scratchpad_data, 0, c);// lui a2, 28672 + 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 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->lwu(a1, 4, gp); // lwu a1, 4(gp) + c->addiu(a2, r0, 460); // addiu a2, r0, 460 + c->lwu(v1, 0, gp); // lwu v1, 0(gp) + c->dsll32(a0, a1, 0); // dsll32 a0, a1, 0 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf1, a0); // qmtc2.i vf1, a0 + // nop // sll r0, r0, 0 + c->dsubu(a0, a2, v1); // dsubu a0, a2, v1 + c->dsll(t2, v1, 6); // dsll t2, v1, 6 + bc = ((s64)c->sgpr64(a0)) < 0; // bltz a0, L90 + c->daddiu(a3, s3, 28); // daddiu a3, s3, 28 + if (bc) {goto block_12;} // branch non-likely + + c->mov64(a0, v1); // or a0, v1, r0 + c->lwu(t0, 4, s3); // lwu t0, 4(s3) + c->daddiu(t3, gp, 4908); // daddiu t3, gp, 4908 + c->lq(t1, 60, gp); // lq t1, 60(gp) + c->daddu(t2, t3, t2); // daddu t2, t3, t2 + c->lq(t3, 76, gp); // lq t3, 76(gp) + get_fake_spad_addr2(t4, cache.fake_scratchpad_data, 0, c);// lui t4, 28672 + c->lwu(t5, 8, gp); // lwu t5, 8(gp) + c->vsub(DEST::zw, vf1, vf0, vf0); // vsub.zw vf1, vf0, vf0 + // nop // sll r0, r0, 0 + +block_4: + bc = c->sgpr64(t0) == 0; // beq t0, r0, L88 + c->lbu(t6, 0, a3); // lbu t6, 0(a3) + if (bc) {goto block_9;} // branch non-likely + + c->daddiu(t0, t0, -1); // daddiu t0, t0, -1 + c->lbu(t7, 1, a3); // lbu t7, 1(a3) + c->dsll(t9, t6, 5); // dsll t9, t6, 5 + c->lbu(t6, 2, a3); // lbu t6, 2(a3) + c->dsll(t8, t7, 5); // dsll t8, t7, 5 + c->daddu(t7, t9, t4); // daddu t7, t9, t4 + c->dsll(t6, t6, 5); // dsll t6, t6, 5 + // nop // sll r0, r0, 0 + c->daddu(t8, t8, t4); // daddu t8, t8, t4 + c->lq(ra, 16, t7); // lq ra, 16(t7) + c->daddu(t6, t6, t4); // daddu t6, t6, t4 + c->lq(s2, 16, t8); // lq s2, 16(t8) + c->pminw(s3, ra, s2); // pminw s3, ra, s2 + c->lq(t9, 16, t6); // lq t9, 16(t6) + c->pmaxw(ra, ra, s2); // pmaxw ra, ra, s2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pminw(s3, s3, t9); // pminw s3, s3, t9 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pmaxw(t9, ra, t9); // pmaxw t9, ra, t9 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcgtw(ra, s3, t3); // pcgtw ra, s3, t3 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcgtw(s3, t1, t9); // pcgtw s3, t1, t9 + c->lwu(t9, 4, a3); // lwu t9, 4(a3) + c->por(ra, ra, s3); // por ra, ra, s3 + c->lq(t7, 0, t7); // lq t7, 0(t7) + c->ppach(ra, r0, ra); // ppach ra, r0, ra + c->lq(t8, 0, t8); // lq t8, 0(t8) + c->dsll(ra, ra, 16); // dsll ra, ra, 16 + c->lq(t6, 0, t6); // lq t6, 0(t6) + bc = c->sgpr64(ra) != 0; // bne ra, r0, L87 + c->daddiu(a3, a3, 8); // daddiu a3, a3, 8 + if (bc) {goto block_4;} // branch non-likely + + bc = c->sgpr64(v1) == c->sgpr64(a2); // beq v1, a2, L90 + c->sqc2(vf1, 48, t2); // sqc2 vf1, 48(t2) + if (bc) {goto block_12;} // branch non-likely + + c->and_(ra, t9, t5); // and ra, t9, t5 + c->sw(t9, 48, t2); // sw t9, 48(t2) + c->sw(s5, 52, t2); // sw s5, 52(t2) + c->sh(a1, 56, t2); // sh a1, 56(t2) + bc = c->sgpr64(ra) != 0; // bne ra, r0, L87 + c->sq(t7, 0, t2); // sq t7, 0(t2) + if (bc) {goto block_4;} // branch non-likely + + // nop // sll r0, r0, 0 + c->sq(t8, 16, t2); // sq t8, 16(t2) + c->daddiu(v1, v1, 1); // daddiu v1, v1, 1 + c->sq(t6, 32, t2); // sq t6, 32(t2) + //beq r0, r0, L87 // beq r0, r0, L87 + c->daddiu(t2, t2, 64); // daddiu t2, t2, 64 + goto block_4; // branch always + + +block_9: + c->dsubu(a3, v1, a0); // dsubu a3, v1, a0 + c->lwu(t0, 4, gp); // lwu t0, 4(gp) + bc = c->sgpr64(a3) == 0; // beq a3, r0, L92 + c->lq(a1, 12, s5); // lq a1, 12(s5) + if (bc) {goto block_18;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lq(a2, 28, s5); // lq a2, 28(s5) + // nop // sll r0, r0, 0 + c->sq(r0, 32, s4); // sq r0, 32(s4) + // nop // sll r0, r0, 0 + c->sh(a3, 42, s4); // sh a3, 42(s4) + // nop // sll r0, r0, 0 + c->sw(gp, 32, s4); // sw gp, 32(s4) + // nop // sll r0, r0, 0 + c->sw(s5, 36, s4); // sw s5, 36(s4) + // nop // sll r0, r0, 0 + c->sh(a0, 40, s4); // sh a0, 40(s4) + c->daddiu(a0, t0, 1); // daddiu a0, t0, 1 + c->sq(a1, 0, s4); // sq a1, 0(s4) + // nop // sll r0, r0, 0 + c->sq(a2, 16, s4); // sq a2, 16(s4) + // nop // sll r0, r0, 0 + c->sw(a0, 4, gp); // sw a0, 4(gp) + //beq r0, r0, L92 // beq r0, r0, L92 + c->sw(v1, 0, gp); // sw v1, 0(gp) + goto block_18; // branch always + + +block_11: + c->load_symbol2(t9, cache.format); // lw t9, format(s7) + c->addiu(a0, r0, 0); // addiu a0, r0, 0 + // daddiu a1, fp, L185 // daddiu a1, fp, L185 + 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 + printf("ERROR: Exceeded max number of collide-cache prims!\n"); + //beq r0, r0, L92 // beq r0, r0, L92 + // nop // sll r0, r0, 0 + goto block_18; // branch always + + +block_12: + c->load_symbol2(v1, cache.cheat_mode); // lw v1, *cheat-mode*(s7) + c->load_symbol_addr(a0, cache.debug); // daddiu a0, s7, debug + c->dsubu(v1, v1, a0); // dsubu v1, v1, a0 + c->daddiu(a0, s7, 4); // daddiu a0, s7, 4 + c->movn(a0, s7, v1); // movn a0, s7, v1 + if (((s64)c->sgpr64(s7)) == ((s64)c->sgpr64(a0))) {// beql s7, a0, L91 + c->mov64(v1, a0); // or v1, a0, r0 + goto block_16; + } + +// block_14: + c->load_symbol2(v1, cache.display_capture_mode); // lw v1, *display-capture-mode*(s7) + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L91 + c->daddiu(v1, s7, 4); // daddiu v1, s7, 4 + if (bc) {goto block_16;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + +block_16: + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L92 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_18;} // branch non-likely + + c->load_symbol2(t9, cache.print_exceeded_max_cache_tris);// lw t9, print-exceeded-max-cache-tris(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->mov64(v1, v0); // or v1, v0, r0 + +block_18: + 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, 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.cheat_mode = intern_from_c(-1, 0, "*cheat-mode*").c(); + cache.display_capture_mode = intern_from_c(-1, 0, "*display-capture-mode*").c(); + cache.fake_scratchpad_data = intern_from_c(-1, 0, "*fake-scratchpad-data*").c(); + cache.debug = intern_from_c(-1, 0, "debug").c(); + cache.format = intern_from_c(-1, 0, "format").c(); + cache.print_exceeded_max_cache_tris = intern_from_c(-1, 0, "print-exceeded-max-cache-tris").c(); + gLinkedFunctionTable.reg("(method 10 collide-shape-prim-mesh)", execute, 256); +} + +} // namespace method_10_collide_shape_prim_mesh +} // 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_10_collide_shape_prim_sphere { +struct Cache { + void* format; // format +} 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->sd(fp, 8, sp); // sd fp, 8(sp) + c->mov64(fp, t9); // or fp, t9, r0 + // nop // sll r0, r0, 0 + c->daddiu(t0, a1, 108); // daddiu t0, a1, 108 + c->lwu(a3, 4, a1); // lwu a3, 4(a1) + c->addiu(t1, r0, 100); // addiu t1, r0, 100 + c->lq(v1, 12, a0); // lq v1, 12(a0) + c->dsll(t2, a3, 1); // dsll t2, a3, 1 + c->lq(a2, 28, a0); // lq a2, 28(a0) + bc = c->sgpr64(a3) == c->sgpr64(t1); // beq a3, t1, L84 + c->daddu(t1, t2, a3); // daddu t1, t2, a3 + if (bc) {goto block_2;} // branch non-likely + + c->dsll(t1, t1, 4); // dsll t1, t1, 4 + c->daddu(t0, t0, t1); // daddu t0, t0, t1 + c->daddiu(a3, a3, 1); // daddiu a3, a3, 1 + c->sq(r0, 32, t0); // sq r0, 32(t0) + // nop // sll r0, r0, 0 + c->sw(a0, 36, t0); // sw a0, 36(t0) + // nop // sll r0, r0, 0 + c->sq(v1, 0, t0); // sq v1, 0(t0) + // nop // sll r0, r0, 0 + c->sq(a2, 16, t0); // sq a2, 16(t0) + // nop // sll r0, r0, 0 + c->sw(a3, 4, a1); // sw a3, 4(a1) + // nop // sll r0, r0, 0 + c->sw(a1, 32, t0); // sw a1, 32(t0) + c->mov64(v0, s7); // or v0, s7, r0 + //beq r0, r0, L85 // beq r0, r0, L85 + // nop // sll r0, r0, 0 + goto block_3; // branch always + + +block_2: + c->load_symbol2(t9, cache.format); // lw t9, format(s7) + c->addiu(a0, r0, 0); // addiu a0, r0, 0 + // daddiu a1, fp, L185 // daddiu a1, fp, L185 + 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 + printf("ERROR: Exceeded max number of collide-cache prims!\n"); + +block_3: + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->ld(fp, 8, sp); // ld fp, 8(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.format = intern_from_c(-1, 0, "format").c(); + gLinkedFunctionTable.reg("(method 10 collide-shape-prim-sphere)", execute, 128); +} + +} // namespace method_10_collide_shape_prim_sphere +} // 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_10_collide_shape_prim_group { +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->daddiu(sp, sp, -112); // daddiu sp, sp, -112 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s1, 16, sp); // sq s1, 16(sp) + c->sq(s2, 32, sp); // sq s2, 32(sp) + c->sq(s3, 48, sp); // sq s3, 48(sp) + c->sq(s4, 64, sp); // sq s4, 64(sp) + c->sq(s5, 80, sp); // sq s5, 80(sp) + c->sq(gp, 96, sp); // sq gp, 96(sp) + c->mov64(gp, a1); // or gp, a1, r0 + c->mov64(s5, a0); // or s5, a0, r0 + c->lbu(s4, 60, a0); // lbu s4, 60(a0) + // nop // sll r0, r0, 0 + c->lq(s3, 60, gp); // lq s3, 60(gp) + // nop // sll r0, r0, 0 + c->lq(s2, 76, gp); // lq s2, 76(gp) + // nop // sll r0, r0, 0 + c->lwu(s1, 92, gp); // lwu s1, 92(gp) + +block_1: + bc = c->sgpr64(s4) == 0; // beq s4, r0, L82 + c->daddiu(s5, s5, 80); // daddiu s5, s5, 80 + if (bc) {goto block_5;} // branch non-likely + + +block_2: + c->daddiu(s4, s4, -1); // daddiu s4, s4, -1 + c->lqc2(vf1, 12, s5); // lqc2 vf1, 12(s5) + // nop // sll r0, r0, 0 + c->lwu(v1, 28, s5); // lwu v1, 28(s5) + c->vsub_bc(DEST::xyzw, BC::w, vf2, vf1, vf1); // vsubw.xyzw vf2, vf1, vf1 + c->and_(v1, s1, v1); // and v1, s1, v1 + c->vadd_bc(DEST::xyzw, BC::w, vf3, vf1, vf1); // vaddw.xyzw vf3, vf1, vf1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L80 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + c->vftoi0(DEST::xyzw, vf4, vf2); // vftoi0.xyzw vf4, vf2 + c->vftoi0(DEST::xyzw, vf5, vf3); // vftoi0.xyzw vf5, vf3 + c->mov128_gpr_vf(a0, vf4); // qmfc2.i a0, vf4 + c->mov128_gpr_vf(v1, vf5); // qmfc2.i v1, vf5 + c->pcgtw(a0, a0, s2); // pcgtw a0, a0, s2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcgtw(v1, s3, v1); // pcgtw v1, s3, v1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->por(v1, a0, v1); // por v1, a0, v1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->ppach(v1, r0, v1); // ppach v1, r0, v1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->dsll(v1, v1, 16); // dsll v1, v1, 16 + // nop // sll r0, r0, 0 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L80 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + c->mov64(a0, s5); // or a0, s5, r0 + c->lwu(v1, -4, a0); // lwu v1, -4(a0) + c->lwu(t9, 56, v1); // lwu t9, 56(v1) + c->mov64(a1, gp); // or a1, gp, 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 + bc = c->sgpr64(s4) != 0; // bne s4, r0, L81 + c->daddiu(s5, s5, 80); // daddiu s5, s5, 80 + if (bc) {goto block_2;} // branch non-likely + + +block_5: + 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 + // nop // sll r0, r0, 0 +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + gLinkedFunctionTable.reg("(method 10 collide-shape-prim-group)", execute, 128); +} + +} // namespace method_10_collide_shape_prim_group +} // 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_11_collide_shape_prim_mesh { +struct Cache { + void* cheat_mode; // *cheat-mode* + void* fake_scratchpad_data; // *fake-scratchpad-data* + void* debug; // debug + void* format; // format + void* print_exceeded_max_cache_tris; // print-exceeded-max-cache-tris +} 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->sd(fp, 8, sp); // sd fp, 8(sp) + c->mov64(fp, t9); // or fp, t9, r0 + 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(s5, a0); // or s5, a0, r0 + c->mov64(gp, a1); // or gp, a1, r0 + c->mov64(s3, a2); // or s3, a2, r0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->lwu(s2, 60, s5); // lwu s2, 60(s5) + c->daddiu(v1, gp, 108); // daddiu v1, gp, 108 + c->lwu(a0, 4, gp); // lwu a0, 4(gp) + bc = c->sgpr64(s2) == c->sgpr64(s7); // beq s2, s7, L62 + // nop // sll r0, r0, 0 + if (bc) {goto block_14;} // branch non-likely + + c->addiu(a1, r0, 100); // addiu a1, r0, 100 + c->dsll(a2, a0, 1); // dsll a2, a0, 1 + bc = c->sgpr64(a0) == c->sgpr64(a1); // beq a0, a1, L60 + c->daddu(a0, a2, a0); // daddu a0, a2, a0 + if (bc) {goto block_11;} // branch non-likely + + c->dsll(a0, a0, 4); // dsll a0, a0, 4 + c->daddu(s4, v1, a0); // daddu s4, v1, a0 + c->mov64(a0, s2); // or a0, s2, r0 + c->lwu(v1, -4, a0); // lwu v1, -4(a0) + c->lwu(t9, 76, v1); // lwu t9, 76(v1) + c->lwu(v1, 0, s5); // lwu v1, 0(s5) + c->lwu(v1, 136, v1); // lwu v1, 136(v1) + c->lwu(v1, 128, v1); // lwu v1, 128(v1) + c->lb(a1, 8, s5); // lb a1, 8(s5) + c->dsll(a1, a1, 5); // dsll a1, a1, 5 + c->daddu(v1, v1, a1); // daddu v1, v1, a1 + c->lwu(v1, 28, v1); // lwu v1, 28(v1) + c->daddu(a1, r0, v1); // daddu a1, r0, v1 + c->daddiu(a2, s3, 288); // daddiu a2, s3, 288 + get_fake_spad_addr2(a3, cache.fake_scratchpad_data, 0, c);// lui a3, 28672 + 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 + // nop // sll r0, r0, 0 + c->lwu(a0, 4, gp); // lwu a0, 4(gp) + c->addiu(a1, r0, 460); // addiu a1, r0, 460 + c->lwu(v1, 0, gp); // lwu v1, 0(gp) + c->dsll32(a0, a0, 0); // dsll32 a0, a0, 0 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf1, a0); // qmtc2.i vf1, a0 + // nop // sll r0, r0, 0 + c->dsubu(a0, a1, v1); // dsubu a0, a1, v1 + c->dsll(t1, v1, 6); // dsll t1, v1, 6 + bc = ((s64)c->sgpr64(a0)) < 0; // bltz a0, L61 + c->daddiu(a2, s2, 28); // daddiu a2, s2, 28 + if (bc) {goto block_12;} // branch non-likely + + c->mov64(a0, v1); // or a0, v1, r0 + c->lwu(a3, 4, s2); // lwu a3, 4(s2) + c->daddiu(t2, gp, 4908); // daddiu t2, gp, 4908 + c->lq(t0, 368, s3); // lq t0, 368(s3) + c->daddu(t1, t2, t1); // daddu t1, t2, t1 + c->lq(t2, 384, s3); // lq t2, 384(s3) + get_fake_spad_addr2(t3, cache.fake_scratchpad_data, 0, c);// lui t3, 28672 + c->lwu(t4, 8, gp); // lwu t4, 8(gp) + c->vsub(DEST::zw, vf1, vf0, vf0); // vsub.zw vf1, vf0, vf0 + // nop // sll r0, r0, 0 + +block_4: + bc = c->sgpr64(a3) == 0; // beq a3, r0, L59 + c->lbu(t5, 0, a2); // lbu t5, 0(a2) + if (bc) {goto block_9;} // branch non-likely + + c->daddiu(a3, a3, -1); // daddiu a3, a3, -1 + c->lbu(t6, 1, a2); // lbu t6, 1(a2) + c->dsll(t8, t5, 5); // dsll t8, t5, 5 + c->lbu(t5, 2, a2); // lbu t5, 2(a2) + c->dsll(t7, t6, 5); // dsll t7, t6, 5 + c->daddu(t6, t8, t3); // daddu t6, t8, t3 + c->dsll(t5, t5, 5); // dsll t5, t5, 5 + // nop // sll r0, r0, 0 + c->daddu(t7, t7, t3); // daddu t7, t7, t3 + c->lq(t9, 16, t6); // lq t9, 16(t6) + c->daddu(t5, t5, t3); // daddu t5, t5, t3 + c->lq(s3, 16, t7); // lq s3, 16(t7) + // nop // sll r0, r0, 0 + c->lq(t8, 16, t5); // lq t8, 16(t5) + c->pminw(ra, t9, s3); // pminw ra, t9, s3 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pmaxw(t9, t9, s3); // pmaxw t9, t9, s3 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pminw(ra, ra, t8); // pminw ra, ra, t8 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pmaxw(t8, t9, t8); // pmaxw t8, t9, t8 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcgtw(t9, ra, t2); // pcgtw t9, ra, t2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcgtw(ra, t0, t8); // pcgtw ra, t0, t8 + c->lwu(t8, 4, a2); // lwu t8, 4(a2) + c->por(t9, t9, ra); // por t9, t9, ra + c->lq(t6, 0, t6); // lq t6, 0(t6) + c->ppach(t9, r0, t9); // ppach t9, r0, t9 + c->lq(t7, 0, t7); // lq t7, 0(t7) + c->dsll(t9, t9, 16); // dsll t9, t9, 16 + c->lq(t5, 0, t5); // lq t5, 0(t5) + bc = c->sgpr64(t9) != 0; // bne t9, r0, L58 + c->daddiu(a2, a2, 8); // daddiu a2, a2, 8 + if (bc) {goto block_4;} // branch non-likely + + bc = c->sgpr64(v1) == c->sgpr64(a1); // beq v1, a1, L61 + c->sqc2(vf1, 48, t1); // sqc2 vf1, 48(t1) + if (bc) {goto block_12;} // branch non-likely + + c->and_(t9, t8, t4); // and t9, t8, t4 + c->sw(t8, 48, t1); // sw t8, 48(t1) + // nop // sll r0, r0, 0 + c->sw(s5, 52, t1); // sw s5, 52(t1) + bc = c->sgpr64(t9) != 0; // bne t9, r0, L58 + c->sq(t6, 0, t1); // sq t6, 0(t1) + if (bc) {goto block_4;} // branch non-likely + + c->daddiu(v1, v1, 1); // daddiu v1, v1, 1 + c->sq(t7, 16, t1); // sq t7, 16(t1) + // nop // sll r0, r0, 0 + c->sq(t5, 32, t1); // sq t5, 32(t1) + //beq r0, r0, L58 // beq r0, r0, L58 + c->daddiu(t1, t1, 64); // daddiu t1, t1, 64 + goto block_4; // branch always + + +block_9: + c->dsubu(a3, v1, a0); // dsubu a3, v1, a0 + c->lwu(t0, 4, gp); // lwu t0, 4(gp) + bc = c->sgpr64(a3) == 0; // beq a3, r0, L62 + c->lq(a1, 12, s5); // lq a1, 12(s5) + if (bc) {goto block_14;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lq(a2, 28, s5); // lq a2, 28(s5) + // nop // sll r0, r0, 0 + c->sq(r0, 32, s4); // sq r0, 32(s4) + // nop // sll r0, r0, 0 + c->sh(a3, 42, s4); // sh a3, 42(s4) + // nop // sll r0, r0, 0 + c->sw(gp, 32, s4); // sw gp, 32(s4) + // nop // sll r0, r0, 0 + c->sw(s5, 36, s4); // sw s5, 36(s4) + // nop // sll r0, r0, 0 + c->sh(a0, 40, s4); // sh a0, 40(s4) + c->daddiu(a0, t0, 1); // daddiu a0, t0, 1 + c->sq(a1, 0, s4); // sq a1, 0(s4) + // nop // sll r0, r0, 0 + c->sq(a2, 16, s4); // sq a2, 16(s4) + // nop // sll r0, r0, 0 + c->sw(a0, 4, gp); // sw a0, 4(gp) + //beq r0, r0, L62 // beq r0, r0, L62 + c->sw(v1, 0, gp); // sw v1, 0(gp) + goto block_14; // branch always + + +block_11: + c->load_symbol2(t9, cache.format); // lw t9, format(s7) + c->addiu(a0, r0, 0); // addiu a0, r0, 0 + // daddiu a1, fp, L185 // daddiu a1, fp, L185 + 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 + printf("ERROR: Exceeded max number of collide-cache prims!\n"); + //beq r0, r0, L62 // beq r0, r0, L62 + // nop // sll r0, r0, 0 + goto block_14; // branch always + + +block_12: + c->load_symbol_addr(v1, cache.debug); // daddiu v1, s7, debug + c->load_symbol2(a0, cache.cheat_mode); // lw a0, *cheat-mode*(s7) + bc = c->sgpr64(a0) != c->sgpr64(v1); // bne a0, v1, L62 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_14;} // branch non-likely + + c->load_symbol2(t9, cache.print_exceeded_max_cache_tris);// lw t9, print-exceeded-max-cache-tris(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->mov64(v1, v0); // or v1, v0, r0 + +block_14: + 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, 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 + // nop // sll r0, r0, 0 +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + cache.cheat_mode = intern_from_c(-1, 0, "*cheat-mode*").c(); + cache.fake_scratchpad_data = intern_from_c(-1, 0, "*fake-scratchpad-data*").c(); + cache.debug = intern_from_c(-1, 0, "debug").c(); + cache.format = intern_from_c(-1, 0, "format").c(); + cache.print_exceeded_max_cache_tris = intern_from_c(-1, 0, "print-exceeded-max-cache-tris").c(); + gLinkedFunctionTable.reg("(method 11 collide-shape-prim-mesh)", execute, 128); +} + +} // namespace method_11_collide_shape_prim_mesh +} // 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_11_collide_shape_prim_sphere { +struct Cache { + void* format; // format +} 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->sd(fp, 8, sp); // sd fp, 8(sp) + c->mov64(fp, t9); // or fp, t9, r0 + // nop // sll r0, r0, 0 + c->daddiu(t0, a1, 108); // daddiu t0, a1, 108 + c->lwu(a3, 4, a1); // lwu a3, 4(a1) + c->addiu(t1, r0, 100); // addiu t1, r0, 100 + c->lq(v1, 12, a0); // lq v1, 12(a0) + c->dsll(t2, a3, 1); // dsll t2, a3, 1 + c->lq(a2, 28, a0); // lq a2, 28(a0) + bc = c->sgpr64(a3) == c->sgpr64(t1); // beq a3, t1, L55 + c->daddu(t1, t2, a3); // daddu t1, t2, a3 + if (bc) {goto block_2;} // branch non-likely + + c->dsll(t1, t1, 4); // dsll t1, t1, 4 + c->daddu(t0, t0, t1); // daddu t0, t0, t1 + c->daddiu(a3, a3, 1); // daddiu a3, a3, 1 + c->sq(r0, 32, t0); // sq r0, 32(t0) + // nop // sll r0, r0, 0 + c->sw(a0, 36, t0); // sw a0, 36(t0) + // nop // sll r0, r0, 0 + c->sq(v1, 0, t0); // sq v1, 0(t0) + // nop // sll r0, r0, 0 + c->sq(a2, 16, t0); // sq a2, 16(t0) + // nop // sll r0, r0, 0 + c->sw(a3, 4, a1); // sw a3, 4(a1) + // nop // sll r0, r0, 0 + c->sw(a1, 32, t0); // sw a1, 32(t0) + c->mov64(v0, s7); // or v0, s7, r0 + //beq r0, r0, L56 // beq r0, r0, L56 + // nop // sll r0, r0, 0 + goto block_3; // branch always + + +block_2: + c->load_symbol2(t9, cache.format); // lw t9, format(s7) + c->addiu(a0, r0, 0); // addiu a0, r0, 0 + // daddiu a1, fp, L185 // daddiu a1, fp, L185 + 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 + printf("ERROR: Exceeded max number of collide-cache prims!\n"); + +block_3: + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->ld(fp, 8, sp); // ld fp, 8(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.format = intern_from_c(-1, 0, "format").c(); + gLinkedFunctionTable.reg("(method 11 collide-shape-prim-sphere)", execute, 128); +} + +} // namespace method_11_collide_shape_prim_sphere +} // 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_11_collide_shape_prim_group { +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->daddiu(sp, sp, -128); // daddiu sp, sp, -128 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s0, 16, sp); // sq s0, 16(sp) + c->sq(s1, 32, sp); // sq s1, 32(sp) + c->sq(s2, 48, sp); // sq s2, 48(sp) + c->sq(s3, 64, sp); // sq s3, 64(sp) + c->sq(s4, 80, sp); // sq s4, 80(sp) + c->sq(s5, 96, sp); // sq s5, 96(sp) + c->sq(gp, 112, sp); // sq gp, 112(sp) + c->mov64(gp, a1); // or gp, a1, r0 + c->mov64(s5, a2); // or s5, a2, r0 + c->mov64(s4, a0); // or s4, a0, r0 + c->lbu(s3, 60, a0); // lbu s3, 60(a0) + // nop // sll r0, r0, 0 + c->lq(s2, 368, s5); // lq s2, 368(s5) + // nop // sll r0, r0, 0 + c->lq(s1, 384, s5); // lq s1, 384(s5) + // nop // sll r0, r0, 0 + c->lwu(s0, 92, gp); // lwu s0, 92(gp) + // nop // sll r0, r0, 0 + c->lqc2(vf28, 288, s5); // lqc2 vf28, 288(s5) + // nop // sll r0, r0, 0 + c->lqc2(vf29, 304, s5); // lqc2 vf29, 304(s5) + // nop // sll r0, r0, 0 + c->lqc2(vf30, 320, s5); // lqc2 vf30, 320(s5) + // nop // sll r0, r0, 0 + c->lqc2(vf31, 336, s5); // lqc2 vf31, 336(s5) + +block_1: + bc = c->sgpr64(s3) == 0; // beq s3, r0, L53 + c->daddiu(s4, s4, 80); // daddiu s4, s4, 80 + if (bc) {goto block_5;} // branch non-likely + + +block_2: + c->daddiu(s3, s3, -1); // daddiu s3, s3, -1 + c->lqc2(vf1, 12, s4); // lqc2 vf1, 12(s4) + // nop // sll r0, r0, 0 + c->lwu(v1, 28, s4); // lwu v1, 28(s4) + c->vmula_bc(DEST::xyzw, BC::w, vf31, vf0); // vmulaw.xyzw acc, vf31, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf28, vf1); // vmaddax.xyzw acc, vf28, vf1 + c->and_(v1, s0, v1); // and v1, s0, v1 + c->vmadda_bc(DEST::xyzw, BC::y, vf29, vf1); // vmadday.xyzw acc, vf29, vf1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L51 + c->vmadd_bc(DEST::xyzw, BC::z, vf10, vf30, vf1); // vmaddz.xyzw vf10, vf30, vf1 + if (bc) {goto block_1;} // branch non-likely + + c->vsub_bc(DEST::xyz, BC::w, vf2, vf10, vf1); // vsubw.xyz vf2, vf10, vf1 + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::xyz, BC::w, vf3, vf10, vf1); // vaddw.xyz vf3, vf10, vf1 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf4, vf2); // vftoi0.xyzw vf4, vf2 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf5, vf3); // vftoi0.xyzw vf5, vf3 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(a0, vf4); // qmfc2.i a0, vf4 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(v1, vf5); // qmfc2.i v1, vf5 + // nop // sll r0, r0, 0 + c->pcgtw(a0, a0, s1); // pcgtw a0, a0, s1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcgtw(v1, s2, v1); // pcgtw v1, s2, v1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->por(v1, a0, v1); // por v1, a0, v1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->ppach(v1, r0, v1); // ppach v1, r0, v1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->dsll(v1, v1, 16); // dsll v1, v1, 16 + // nop // sll r0, r0, 0 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L51 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + c->mov64(a0, s4); // or a0, s4, r0 + c->lwu(v1, -4, a0); // lwu v1, -4(a0) + c->lwu(t9, 60, v1); // lwu t9, 60(v1) + c->mov64(a1, gp); // or a1, gp, r0 + c->mov64(a2, s5); // or a2, s5, r0 + call_addr = c->gprs[t9].du32[0]; // function call: + c->sll(v0, ra, 0); // sll v0, ra, 0 + c->jalr(call_addr); // jalr ra, t9 + c->mov64(v1, v0); // or v1, v0, r0 + bc = c->sgpr64(s3) != 0; // bne s3, r0, L52 + c->daddiu(s4, s4, 80); // daddiu s4, s4, 80 + if (bc) {goto block_2;} // branch non-likely + + +block_5: + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 112, sp); // lq gp, 112(sp) + c->lq(s5, 96, sp); // lq s5, 96(sp) + c->lq(s4, 80, sp); // lq s4, 80(sp) + c->lq(s3, 64, sp); // lq s3, 64(sp) + c->lq(s2, 48, sp); // lq s2, 48(sp) + c->lq(s1, 32, sp); // lq s1, 32(sp) + c->lq(s0, 16, sp); // lq s0, 16(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 128); // daddiu sp, sp, 128 + 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 11 collide-shape-prim-group)", execute, 256); +} + +} // namespace method_11_collide_shape_prim_group +} // 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_9_collide_cache_prim { +struct Cache { + void* moving_sphere_triangle_intersect; // moving-sphere-triangle-intersect +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + bool cop1_bc = false; + c->daddiu(sp, sp, -672); // daddiu sp, sp, -672 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s1, 576, sp); // sq s1, 576(sp) + c->sq(s2, 592, sp); // sq s2, 592(sp) + c->sq(s3, 608, sp); // sq s3, 608(sp) + c->sq(s4, 624, sp); // sq s4, 624(sp) + c->sq(s5, 640, sp); // sq s5, 640(sp) + c->sq(gp, 656, sp); // sq gp, 656(sp) + c->mov64(gp, a1); // or gp, a1, r0 + c->mov64(s5, a2); // or s5, a2, r0 + c->mov64(s4, a3); // or s4, a3, r0 + c->daddiu(s3, sp, 16); // daddiu s3, sp, 16 + // nop // sll r0, r0, 0 + c->mtc1(f0, r0); // mtc1 f0, r0 + c->sw(t1, 8, s3); // sw t1, 8(s3) + c->mtc1(f1, t0); // mtc1 f1, t0 + c->lhu(v1, 40, a0); // lhu v1, 40(a0) + // nop // sll r0, r0, 0 + c->lwu(a1, 32, a0); // lwu a1, 32(a0) + cop1_bc = c->fprs[f0] <= c->fprs[f1]; // c.le.s f0, f1 + c->dsll(v1, v1, 6); // dsll v1, v1, 6 + bc = cop1_bc; // bc1t L37 + c->daddiu(a1, a1, 4908); // daddiu a1, a1, 4908 + if (bc) {goto block_2;} // branch non-likely + + c->lui(a2, 16384); // lui a2, 16384 + c->mtc1(f1, a2); // mtc1 f1, a2 + +block_2: + c->daddu(s2, a1, v1); // daddu s2, a1, v1 + c->swc1(f1, 0, s3); // swc1 f1, 0(s3) + // nop // sll r0, r0, 0 + c->lhu(s1, 42, a0); // lhu s1, 42(a0) + // nop // sll r0, r0, 0 + c->swc1(f1, 4, s3); // swc1 f1, 4(s3) + +block_3: + bc = c->sgpr64(s1) == 0; // beq s1, r0, L40 + c->daddiu(s1, s1, -1); // daddiu s1, s1, -1 + if (bc) {goto block_14;} // branch non-likely + + c->load_symbol2(t9, cache.moving_sphere_triangle_intersect);// lw t9, moving-sphere-triangle-intersect(s7) + c->mov64(a0, s5); // or a0, s5, r0 + c->mov64(a1, s4); // or a1, s4, r0 + c->lwc1(f0, 12, s5); // lwc1 f0, 12(s5) + c->mfc1(a2, f0); // mfc1 a2, f0 + c->daddu(a3, r0, s2); // daddu a3, r0, s2 + c->daddiu(t0, s3, 64); // daddiu t0, s3, 64 + c->daddiu(t1, s3, 80); // daddiu t1, s3, 80 + 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 + // nop // sll r0, r0, 0 + c->mtc1(f0, r0); // mtc1 f0, r0 + c->lqc2(vf1, 0, s4); // lqc2 vf1, 0(s4) + c->mtc1(f2, v1); // mtc1 f2, v1 + c->lwc1(f1, 0, s3); // lwc1 f1, 0(s3) + cop1_bc = c->fprs[f2] < c->fprs[f0]; // c.lt.s f2, f0 + c->lqc2(vf2, 80, s3); // lqc2 vf2, 80(s3) + if (cop1_bc) { // bc1tl L38 + c->daddiu(s2, s2, 64); // daddiu s2, s2, 64 + goto block_3; + } + +// block_6: + cop1_bc = c->fprs[f1] <= c->fprs[f2]; // c.le.s f1, f2 + c->lqc2(vf3, 64, s3); // lqc2 vf3, 64(s3) + if (cop1_bc) { // bc1tl L38 + c->daddiu(s2, s2, 64); // daddiu s2, s2, 64 + goto block_3; + } + +// block_8: + c->vmul(DEST::xyzw, vf5, vf1, vf2); // vmul.xyzw vf5, vf1, vf2 + c->lqc2(vf4, 0, s5); // lqc2 vf4, 0(s5) + // nop // sll r0, r0, 0 + c->lwu(v1, 8, s3); // lwu v1, 8(s3) + c->vsub(DEST::xyzw, vf7, vf4, vf3); // vsub.xyzw vf7, vf4, vf3 + c->andi(v1, v1, 1); // andi v1, v1, 1 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L39 + c->vadd_bc(DEST::x, BC::y, vf5, vf5, vf5); // vaddy.x vf5, vf5, vf5 + if (bc) {goto block_13;} // branch non-likely + + c->vmul(DEST::xyzw, vf6, vf7, vf2); // vmul.xyzw vf6, vf7, vf2 + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::x, BC::z, vf5, vf5, vf5); // vaddz.x vf5, vf5, vf5 + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::x, BC::y, vf6, vf6, vf6); // vaddy.x vf6, vf6, vf6 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(v1, vf5); // qmfc2.i v1, vf5 + // nop // sll r0, r0, 0 + c->mtc1(f3, v1); // mtc1 f3, v1 + // nop // sll r0, r0, 0 + cop1_bc = c->fprs[f0] <= c->fprs[f3]; // c.le.s f0, f3 + // nop // sll r0, r0, 0 + if (cop1_bc) { // bc1tl L38 + c->daddiu(s2, s2, 64); // daddiu s2, s2, 64 + goto block_3; + } + +// block_11: + c->vadd_bc(DEST::x, BC::z, vf6, vf6, vf6); // vaddz.x vf6, vf6, vf6 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(v1, vf6); // qmfc2.i v1, vf6 + // nop // sll r0, r0, 0 + c->mtc1(f4, v1); // mtc1 f4, v1 + // nop // sll r0, r0, 0 + cop1_bc = c->fprs[f4] < c->fprs[f0]; // c.lt.s f4, f0 + // nop // sll r0, r0, 0 + if (cop1_bc) { // bc1tl L38 + c->daddiu(s2, s2, 64); // daddiu s2, s2, 64 + goto block_3; + } + +block_13: + c->lqc2(vf8, 0, s2); // lqc2 vf8, 0(s2) + c->lqc2(vf9, 16, s2); // lqc2 vf9, 16(s2) + c->lqc2(vf10, 32, s2); // lqc2 vf10, 32(s2) + c->lwu(v1, 48, s2); // lwu v1, 48(s2) + c->lw(a0, 52, s2); // lw a0, 52(s2) + c->swc1(f2, 0, s3); // swc1 f2, 0(s3) + c->sqc2(vf3, 48, gp); // sqc2 vf3, 48(gp) + c->sqc2(vf2, 64, gp); // sqc2 vf2, 64(gp) + c->sqc2(vf8, 0, gp); // sqc2 vf8, 0(gp) + c->sqc2(vf9, 16, gp); // sqc2 vf9, 16(gp) + c->sqc2(vf10, 32, gp); // sqc2 vf10, 32(gp) + c->sw(v1, 80, gp); // sw v1, 80(gp) + c->sw(a0, 84, gp); // sw a0, 84(gp) + //beq r0, r0, L38 // beq r0, r0, L38 + c->daddiu(s2, s2, 64); // daddiu s2, s2, 64 + goto block_3; // branch always + + +block_14: + c->lwc1(f1, 0, s3); // lwc1 f1, 0(s3) + c->lwc1(f5, 4, s3); // lwc1 f5, 4(s3) + cop1_bc = c->fprs[f1] == c->fprs[f5]; // c.eq.s f1, f5 + if (!cop1_bc) { // bc1fl L41 + c->mfc1(v0, f1); // mfc1 v0, f1 + goto block_17; + } + +// block_16: + c->lui(v0, -13122); // lui v0, -13122 + c->ori(v0, v0, 48160); // ori v0, v0, 48160 + +block_17: + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 656, sp); // lq gp, 656(sp) + c->lq(s5, 640, sp); // lq s5, 640(sp) + c->lq(s4, 624, sp); // lq s4, 624(sp) + c->lq(s3, 608, sp); // lq s3, 608(sp) + c->lq(s2, 592, sp); // lq s2, 592(sp) + c->lq(s1, 576, sp); // lq s1, 576(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 672); // daddiu sp, sp, 672 + 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.moving_sphere_triangle_intersect = intern_from_c(-1, 0, "moving-sphere-triangle-intersect").c(); + gLinkedFunctionTable.reg("(method 9 collide-cache-prim)", execute, 1024); +} + +} // namespace method_9_collide_cache_prim +} // 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_10_collide_cache_prim { +struct Cache { + void* moving_sphere_sphere_intersect; // moving-sphere-sphere-intersect +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + bool cop1_bc = false; + c->daddiu(sp, sp, -128); // daddiu sp, sp, -128 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sd(fp, 8, sp); // sd fp, 8(sp) + c->mov64(fp, t9); // or fp, t9, r0 + c->sq(s1, 32, sp); // sq s1, 32(sp) + c->sq(s2, 48, sp); // sq s2, 48(sp) + c->sq(s3, 64, sp); // sq s3, 64(sp) + c->sq(s4, 80, sp); // sq s4, 80(sp) + c->sq(s5, 96, sp); // sq s5, 96(sp) + c->sq(gp, 112, sp); // sq gp, 112(sp) + c->mov64(s3, a0); // or s3, a0, r0 + c->mov64(gp, a1); // or gp, a1, r0 + c->mov64(s5, a3); // or s5, a3, r0 + c->mov64(s2, t0); // or s2, t0, r0 + c->mov64(s4, t1); // or s4, t1, r0 + c->daddiu(s1, sp, 16); // daddiu s1, sp, 16 + c->load_symbol2(t9, cache.moving_sphere_sphere_intersect);// lw t9, moving-sphere-sphere-intersect(s7) + c->mov64(a0, a2); // or a0, a2, r0 + c->mov64(a1, s5); // or a1, s5, r0 + c->daddu(a2, r0, s3); // daddu a2, r0, s3 + c->mov64(a3, s1); // or a3, 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->mtc1(f3, v0); // mtc1 f3, v0 + c->lui(v1, -13122); // lui v1, -13122 + c->ori(v1, v1, 48160); // ori v1, v1, 48160 + c->mtc1(f4, v1); // mtc1 f4, v1 + c->mtc1(f0, r0); // mtc1 f0, r0 + c->lqc2(vf4, 0, s1); // lqc2 vf4, 0(s1) + c->movs(f1, f3); // mov.s f1, f3 + c->lqc2(vf5, 0, s3); // lqc2 vf5, 0(s3) + cop1_bc = c->fprs[f1] < c->fprs[f0]; // c.lt.s f1, f0 + c->vmove(DEST::xyzw, vf1, vf0); // vmove.xyzw vf1, vf0 + bc = cop1_bc; // bc1t L35 + c->mtc1(f2, s2); // mtc1 f2, s2 + if (bc) {goto block_11;} // branch non-likely + + cop1_bc = c->fprs[f2] < c->fprs[f0]; // c.lt.s f2, f0 + c->vsub(DEST::xyz, vf1, vf4, vf5); // vsub.xyz vf1, vf4, vf5 + bc = cop1_bc; // bc1t L32 + c->lwu(v1, 36, s3); // lwu v1, 36(s3) + if (bc) {goto block_4;} // branch non-likely + + cop1_bc = c->fprs[f2] <= c->fprs[f1]; // c.le.s f2, f1 + // nop // sll r0, r0, 0 + if (cop1_bc) { // bc1tl L35 + c->movs(f3, f4); // mov.s f3, f4 + goto block_11; + } + +block_4: + c->andi(a0, s4, 1); // andi a0, s4, 1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(a0) == 0; // beq a0, r0, L33 + c->lqc2(vf15, 0, s5); // lqc2 vf15, 0(s5) + if (bc) {goto block_7;} // branch non-likely + + c->vmul(DEST::xyzw, vf16, vf15, vf1); // vmul.xyzw vf16, vf15, vf1 + c->vadd_bc(DEST::y, BC::x, vf16, vf16, vf16); // vaddx.y vf16, vf16, vf16 + c->vadd_bc(DEST::y, BC::z, vf16, vf16, vf16); // vaddz.y vf16, vf16, vf16 + c->mov128_gpr_vf(a0, vf16); // qmfc2.i a0, vf16 + if (((s64)c->sgpr64(a0)) >= 0) { // bgezl a0, L35 + c->movs(f3, f4); // mov.s f3, f4 + goto block_11; + } + +block_7: + // daddiu a0, fp, L181 // daddiu a0, fp, L181 + // .word 0x0 + // .word 0x45800000 + // .word 0x0 + // .word 0x3f800000 + // .word 0x0 + // .word 0xc5800000 + // .word 0x45800000 + // .word 0x3f800000 + // .word 0x0 + // .word 0xc5800000 + // .word 0xc5800000 + // .word 0x3f800000 + // nop // sll r0, r0, 0 + c->vmul(DEST::xyzw, vf12, vf1, vf1); // vmul.xyzw vf12, vf1, vf1 + c->sqc2(vf4, 48, gp); // sqc2 vf4, 48(gp) + c->vmula_bc(DEST::w, BC::x, vf0, vf12); // vmulax.w acc, vf0, vf12 + // c->lqc2(vf9, 0, a0); // lqc2 vf9, 0(a0) + c->vfs[9].vf.set_u32s(0, 0x45800000, 0, 0x3f800000); + c->vmadda_bc(DEST::w, BC::y, vf0, vf12); // vmadday.w acc, vf0, vf12 + // c->lqc2(vf10, 16, a0); // lqc2 vf10, 16(a0) + c->vfs[10].vf.set_u32s(0, 0xc5800000, 0x45800000, 0x3f800000); + c->vmadd_bc(DEST::w, BC::z, vf12, vf0, vf12); // vmaddz.w vf12, vf0, vf12 + // c->lqc2(vf11, 32, a0); // lqc2 vf11, 32(a0) + c->vfs[11].vf.set_u32s(0, 0xc5800000, 0xc5800000, 0x3f800000); + c->vrsqrt(vf0, BC::w, vf12, BC::w); // vrsqrt Q, vf0.w, vf12.w + // nop // sll r0, r0, 0 + c->vwaitq(); // vwaitq + c->lwu(a0, 60, v1); // lwu a0, 60(v1) + c->vmulq(DEST::xyz, vf1, vf1); // vmulq.xyz vf1, vf1, Q + // nop // sll r0, r0, 0 + c->vmul(DEST::xyzw, vf14, vf1, vf1); // vmul.xyzw vf14, vf1, vf1 + c->sqc2(vf1, 64, gp); // sqc2 vf1, 64(gp) + c->vabs(DEST::xyzw, vf13, vf1); // vabs.xyzw vf13, vf1 + c->sw(a0, 80, gp); // sw a0, 80(gp) + c->vmove(DEST::xyzw, vf2, vf0); // vmove.xyzw vf2, vf0 + c->sw(v1, 84, gp); // sw v1, 84(gp) + c->vadd_bc(DEST::x, BC::y, vf14, vf14, vf14); // vaddy.x vf14, vf14, vf14 + c->mov128_gpr_vf(v1, vf13); // qmfc2.i v1, vf13 + if (((s64)c->sgpr64(v1)) == ((s64)0)) { // beql v1, r0, L34 + c->vadd_bc(DEST::x, BC::z, vf2, vf0, vf1); // vaddz.x vf2, vf0, vf1 + goto block_10; + } + +// block_9: + c->vsub_bc(DEST::x, BC::y, vf2, vf0, vf1); // vsuby.x vf2, vf0, vf1 + // nop // sll r0, r0, 0 + c->vrsqrt(vf0, BC::w, vf14, BC::x); // vrsqrt Q, vf0.w, vf14.x + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::y, BC::x, vf2, vf0, vf1); // vaddx.y vf2, vf0, vf1 + // nop // sll r0, r0, 0 + c->vwaitq(); // vwaitq + // nop // sll r0, r0, 0 + c->vmulq(DEST::xy, vf2, vf2); // vmulq.xy vf2, vf2, Q + // nop // sll r0, r0, 0 + +block_10: + c->vopmula(vf1, vf2); // vopmula.xyz acc, vf1, vf2 + // nop // sll r0, r0, 0 + c->vopmsub(vf3, vf2, vf1); // vopmsub.xyz vf3, vf2, vf1 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf9); // vmaddax.xyzw acc, vf1, vf9 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf9); // vmadday.xyzw acc, vf2, vf9 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyz, BC::z, vf9, vf3, vf9); // vmaddz.xyz vf9, vf3, vf9 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf10); // vmaddax.xyzw acc, vf1, vf10 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf10); // vmadday.xyzw acc, vf2, vf10 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyz, BC::z, vf10, vf3, vf10); // vmaddz.xyz vf10, vf3, vf10 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf11); // vmaddax.xyzw acc, vf1, vf11 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf11); // vmadday.xyzw acc, vf2, vf11 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyz, BC::z, vf11, vf3, vf11); // vmaddz.xyz vf11, vf3, vf11 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->sqc2(vf9, 0, gp); // sqc2 vf9, 0(gp) + // nop // sll r0, r0, 0 + c->sqc2(vf10, 16, gp); // sqc2 vf10, 16(gp) + // nop // sll r0, r0, 0 + c->sqc2(vf11, 32, gp); // sqc2 vf11, 32(gp) + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + +block_11: + c->mfc1(v0, f3); // mfc1 v0, f3 + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->ld(fp, 8, sp); // ld fp, 8(sp) + c->lq(gp, 112, sp); // lq gp, 112(sp) + c->lq(s5, 96, sp); // lq s5, 96(sp) + c->lq(s4, 80, sp); // lq s4, 80(sp) + c->lq(s3, 64, sp); // lq s3, 64(sp) + c->lq(s2, 48, sp); // lq s2, 48(sp) + c->lq(s1, 32, sp); // lq s1, 32(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 128); // daddiu sp, sp, 128 + 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.moving_sphere_sphere_intersect = intern_from_c(-1, 0, "moving-sphere-sphere-intersect").c(); + gLinkedFunctionTable.reg("(method 10 collide-cache-prim)", execute, 256); +} + +} // namespace method_10_collide_cache_prim +} // 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_17_collide_cache { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* + void* collide_puss_work; // collide-puss-work + void* format; // format +} 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->sd(fp, 8, sp); // sd fp, 8(sp) + c->mov64(fp, t9); // or fp, t9, r0 + 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(gp, a1); // or gp, a1, r0 + get_fake_spad_addr2(s5, cache.fake_scratchpad_data, 0, c);// lui s5, 28672 + c->addiu(a3, r0, 64); // addiu a3, r0, 64 + c->lwu(a2, 116, gp); // lwu a2, 116(gp) + c->daddiu(v1, s5, 96); // daddiu v1, s5, 96 + c->lwu(a1, 112, gp); // lwu a1, 112(gp) + c->dsubu(a3, a2, a3); // dsubu a3, a2, a3 + // nop // sll r0, r0, 0 + bc = ((s64)c->sgpr64(a3)) > 0; // bgtz a3, L26 + // nop // sll r0, r0, 0 + if (bc) {goto block_20;} // branch non-likely + + bc = c->sgpr64(a2) == 0; // beq a2, r0, L19 + c->lqc2(vf1, 0, a1); // lqc2 vf1, 0(a1) + if (bc) {goto block_5;} // branch non-likely + + c->daddiu(a2, a2, -1); // daddiu a2, a2, -1 + c->daddiu(a1, a1, 16); // daddiu a1, a1, 16 + c->vsub_bc(DEST::xyz, BC::w, vf2, vf1, vf1); // vsubw.xyz vf2, vf1, vf1 + c->sqc2(vf1, 0, v1); // sqc2 vf1, 0(v1) + c->vadd_bc(DEST::xyz, BC::w, vf3, vf1, vf1); // vaddw.xyz vf3, vf1, vf1 + c->daddiu(v1, v1, 48); // daddiu v1, v1, 48 + c->vftoi0(DEST::xyzw, vf4, vf2); // vftoi0.xyzw vf4, vf2 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf5, vf3); // vftoi0.xyzw vf5, vf3 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->sqc2(vf4, -32, v1); // sqc2 vf4, -32(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf5, -16, v1); // sqc2 vf5, -16(v1) + +block_3: + bc = c->sgpr64(a2) == 0; // beq a2, r0, L19 + c->lqc2(vf1, 0, a1); // lqc2 vf1, 0(a1) + if (bc) {goto block_5;} // branch non-likely + + c->daddiu(a2, a2, -1); // daddiu a2, a2, -1 + c->daddiu(a1, a1, 16); // daddiu a1, a1, 16 + c->vsub_bc(DEST::xyz, BC::w, vf4, vf1, vf1); // vsubw.xyz vf4, vf1, vf1 + c->sqc2(vf1, 0, v1); // sqc2 vf1, 0(v1) + c->vadd_bc(DEST::xyz, BC::w, vf5, vf1, vf1); // vaddw.xyz vf5, vf1, vf1 + // nop // sll r0, r0, 0 + c->vmini(DEST::xyz, vf2, vf2, vf4); // vmini.xyz vf2, vf2, vf4 + // nop // sll r0, r0, 0 + c->vmax(DEST::xyz, vf3, vf3, vf5); // vmax.xyz vf3, vf3, vf5 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf4, vf4); // vftoi0.xyzw vf4, vf4 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf5, vf5); // vftoi0.xyzw vf5, vf5 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->sqc2(vf4, 16, v1); // sqc2 vf4, 16(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf5, 32, v1); // sqc2 vf5, 32(v1) + //beq r0, r0, L18 // beq r0, r0, L18 + c->daddiu(v1, v1, 48); // daddiu v1, v1, 48 + goto block_3; // branch always + + +block_5: + c->vftoi0(DEST::xyzw, vf2, vf2); // vftoi0.xyzw vf2, vf2 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf3, vf3); // vftoi0.xyzw vf3, vf3 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->sqc2(vf2, 64, s5); // sqc2 vf2, 64(s5) + // nop // sll r0, r0, 0 + c->sqc2(vf3, 80, s5); // sqc2 vf3, 80(s5) + c->daddiu(s4, a0, 108); // daddiu s4, a0, 108 + c->lwu(s3, 100, gp); // lwu s3, 100(gp) + c->lw(s2, 4, a0); // lw s2, 4(a0) + //beq r0, r0, L25 // beq r0, r0, L25 + // nop // sll r0, r0, 0 + goto block_18; // branch always + + +block_6: + c->daddiu(s2, s2, -1); // daddiu s2, s2, -1 + c->lwu(v1, 16, s4); // lwu v1, 16(s4) + c->and_(v1, s3, v1); // and v1, s3, v1 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L24 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_17;} // branch non-likely + + c->lwu(v1, 120, gp); // lwu v1, 120(gp) + if (((s64)c->sgpr64(s7)) == ((s64)c->sgpr64(v1))) {// beql s7, v1, L21 + c->daddiu(v1, s7, 4); // daddiu v1, s7, 4 + goto block_10; + } + +// block_9: + c->daddiu(v1, s7, 4); // daddiu v1, s7, 4 + c->lwu(a0, 24, s4); // lwu a0, 24(s4) + c->andi(a0, a0, 1); // andi a0, a0, 1 + c->movz(v1, s7, a0); // movz v1, s7, a0 + +block_10: + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L24 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_17;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + c->lb(v1, 28, s4); // lb v1, 28(s4) + c->slt(v1, v1, r0); // slt v1, v1, r0 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L22 + // nop // sll r0, r0, 0 + if (bc) {goto block_13;} // branch non-likely + + c->mov64(a0, s5); // or a0, s5, r0 + c->load_symbol2(v1, cache.collide_puss_work); // lw v1, collide-puss-work(s7) + c->lwu(t9, 52, v1); // lwu t9, 52(v1) + c->mov64(a1, s4); // or a1, s4, r0 + c->mov64(a2, gp); // or a2, gp, 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 + c->mov64(a0, v1); // or a0, v1, r0 + //beq r0, r0, L23 // beq r0, r0, L23 + // nop // sll r0, r0, 0 + goto block_14; // branch always + + +block_13: + c->mov64(a0, s5); // or a0, s5, r0 + c->load_symbol2(v1, cache.collide_puss_work); // lw v1, collide-puss-work(s7) + c->lwu(t9, 56, v1); // lwu t9, 56(v1) + c->mov64(a1, s4); // or a1, s4, r0 + c->mov64(a2, gp); // or a2, gp, 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 + c->mov64(a0, v1); // or a0, v1, r0 + +block_14: + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L24 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_17;} // branch non-likely + + c->daddiu(v1, s7, 4); // daddiu v1, s7, #t + c->mov64(v0, v1); // or v0, v1, r0 + //beq r0, r0, L28 // beq r0, r0, L28 + // nop // sll r0, r0, 0 + goto block_22; // branch always + + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + +block_17: + c->daddiu(s4, s4, 48); // daddiu s4, s4, 48 + +block_18: + bc = c->sgpr64(s2) != 0; // bne s2, r0, L20 + // nop // sll r0, r0, 0 + if (bc) {goto block_6;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + c->mov64(v1, s7); // or v1, s7, r0 + //beq r0, r0, L27 // beq r0, r0, L27 + // nop // sll r0, r0, 0 + goto block_21; // branch always + + +block_20: + c->load_symbol2(t9, cache.format); // lw t9, format(s7) + c->addiu(a0, r0, 0); // addiu a0, r0, 0 + // daddiu a1, fp, L180 // daddiu a1, fp, L180 + 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 + printf("ERROR: Exceeded max # of spheres in collide-cache::probe-using-spheres!\n"); + +block_21: + c->mov64(v0, s7); // or v0, s7, r0 + +block_22: + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->ld(fp, 8, sp); // ld fp, 8(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 + // 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.collide_puss_work = intern_from_c(-1, 0, "collide-puss-work").c(); + cache.format = intern_from_c(-1, 0, "format").c(); + gLinkedFunctionTable.reg("(method 17 collide-cache)", execute, 128); +} + +} // namespace method_17_collide_cache +} // 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_9_collide_puss_work { +struct Cache { + void* closest_pt_in_triangle; // closest-pt-in-triangle +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->daddiu(sp, sp, -128); // daddiu sp, sp, -128 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s0, 16, sp); // sq s0, 16(sp) + c->sq(s1, 32, sp); // sq s1, 32(sp) + c->sq(s2, 48, sp); // sq s2, 48(sp) + c->sq(s3, 64, sp); // sq s3, 64(sp) + c->sq(s4, 80, sp); // sq s4, 80(sp) + c->sq(s5, 96, sp); // sq s5, 96(sp) + c->sq(gp, 112, sp); // sq gp, 112(sp) + c->mov64(gp, a0); // or gp, a0, r0 + c->mov64(s5, a2); // or s5, a2, r0 + // nop // sll r0, r0, 0 + c->lwu(a0, 32, a1); // lwu a0, 32(a1) + // nop // sll r0, r0, 0 + c->lhu(v1, 40, a1); // lhu v1, 40(a1) + c->daddiu(a0, a0, 4908); // daddiu a0, a0, 4908 + c->lhu(s4, 42, a1); // lhu s4, 42(a1) + c->dsll(v1, v1, 6); // dsll v1, v1, 6 + // nop // sll r0, r0, 0 + c->daddu(s3, a0, v1); // daddu s3, a0, v1 + // nop // sll r0, r0, 0 + +block_1: + bc = c->sgpr64(s4) == 0; // beq s4, r0, L15 + c->lqc2(vf1, 0, s3); // lqc2 vf1, 0(s3) + if (bc) {goto block_12;} // branch non-likely + + c->daddiu(s4, s4, -1); // daddiu s4, s4, -1 + c->lqc2(vf2, 16, s3); // lqc2 vf2, 16(s3) + // nop // sll r0, r0, 0 + c->lqc2(vf3, 32, s3); // lqc2 vf3, 32(s3) + c->vsub(DEST::xyzw, vf4, vf2, vf1); // vsub.xyzw vf4, vf2, vf1 + c->lq(a1, 64, gp); // lq a1, 64(gp) + c->vsub(DEST::xyzw, vf5, vf3, vf1); // vsub.xyzw vf5, vf3, vf1 + c->lq(v1, 80, gp); // lq v1, 80(gp) + c->vmini(DEST::xyzw, vf6, vf1, vf2); // vmini.xyzw vf6, vf1, vf2 + // nop // sll r0, r0, 0 + c->vmax(DEST::xyzw, vf7, vf1, vf2); // vmax.xyzw vf7, vf1, vf2 + // nop // sll r0, r0, 0 + c->vopmula(vf4, vf5); // vopmula.xyz acc, vf4, vf5 + // nop // sll r0, r0, 0 + c->vmove(DEST::xyzw, vf8, vf0); // vmove.xyzw vf8, vf0 + // nop // sll r0, r0, 0 + c->vmini(DEST::xyzw, vf6, vf6, vf3); // vmini.xyzw vf6, vf6, vf3 + // nop // sll r0, r0, 0 + c->vmax(DEST::xyzw, vf7, vf7, vf3); // vmax.xyzw vf7, vf7, vf3 + // nop // sll r0, r0, 0 + c->vopmsub(vf8, vf5, vf4); // vopmsub.xyz vf8, vf5, vf4 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf6, vf6); // vftoi0.xyzw vf6, vf6 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf7, vf7); // vftoi0.xyzw vf7, vf7 + // nop // sll r0, r0, 0 + c->vmul(DEST::xyzw, vf9, vf8, vf8); // vmul.xyzw vf9, vf8, vf8 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(a0, vf6); // qmfc2.i a0, vf6 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(a2, vf7); // qmfc2.i a2, vf7 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::w, BC::x, vf0, vf9); // vmulax.w acc, vf0, vf9 + c->sqc2(vf6, 32, gp); // sqc2 vf6, 32(gp) + c->vmadda_bc(DEST::w, BC::y, vf0, vf9); // vmadday.w acc, vf0, vf9 + c->sqc2(vf7, 48, gp); // sqc2 vf7, 48(gp) + c->vmadd_bc(DEST::w, BC::z, vf9, vf0, vf9); // vmaddz.w vf9, vf0, vf9 + // nop // sll r0, r0, 0 + c->pcgtw(a1, a1, a2); // pcgtw a1, a1, a2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcgtw(v1, a0, v1); // pcgtw v1, a0, v1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->por(v1, a1, v1); // por v1, a1, v1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->vrsqrt(vf0, BC::w, vf9, BC::w); // vrsqrt Q, vf0.w, vf9.w + // nop // sll r0, r0, 0 + c->ppach(v1, r0, v1); // ppach v1, r0, v1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->dsll(v1, v1, 16); // dsll v1, v1, 16 + // nop // sll r0, r0, 0 + if (((s64)c->sgpr64(v1)) != ((s64)0)) { // bnel v1, r0, L13 + c->daddiu(s3, s3, 64); // daddiu s3, s3, 64 + goto block_1; + } + +// block_4: + c->vwaitq(); // vwaitq + // nop // sll r0, r0, 0 + c->vmulq(DEST::xyz, vf8, vf8); // vmulq.xyz vf8, vf8, Q + c->daddiu(s2, gp, 96); // daddiu s2, gp, 96 + // nop // sll r0, r0, 0 + c->lwu(s1, 116, s5); // lwu s1, 116(s5) + c->gprs[s0].du64[0] = 0; // or s0, r0, r0 + c->sqc2(vf8, 16, gp); // sqc2 vf8, 16(gp) + +block_5: + if (((s64)c->sgpr64(s0)) == ((s64)c->sgpr64(s1))) {// beql s0, s1, L13 + c->daddiu(s3, s3, 64); // daddiu s3, s3, 64 + goto block_1; + } + +// block_7: + c->daddiu(s0, s0, 1); // daddiu s0, s0, 1 + c->lq(a1, 16, s2); // lq a1, 16(s2) + // nop // sll r0, r0, 0 + c->lq(a2, 48, gp); // lq a2, 48(gp) + // nop // sll r0, r0, 0 + c->lq(v1, 32, s2); // lq v1, 32(s2) + // nop // sll r0, r0, 0 + c->lq(a0, 32, gp); // lq a0, 32(gp) + c->pcgtw(a1, a1, a2); // pcgtw a1, a1, a2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcgtw(v1, a0, v1); // pcgtw v1, a0, v1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->por(v1, a1, v1); // por v1, a1, v1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->ppach(v1, r0, v1); // ppach v1, r0, v1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->dsll(v1, v1, 16); // dsll v1, v1, 16 + // nop // sll r0, r0, 0 + if (((s64)c->sgpr64(v1)) != ((s64)0)) { // bnel v1, r0, L14 + c->daddiu(s2, s2, 48); // daddiu s2, s2, 48 + goto block_5; + } + +// block_9: + c->load_symbol2(t9, cache.closest_pt_in_triangle);// lw t9, closest-pt-in-triangle(s7) + c->daddu(a0, r0, gp); // daddu a0, r0, gp + c->daddu(a1, r0, s2); // daddu a1, r0, s2 + c->daddu(a2, r0, s3); // daddu a2, r0, s3 + c->daddiu(a3, gp, 16); // daddiu a3, gp, 16 + 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->lqc2(vf10, 0, gp); // lqc2 vf10, 0(gp) + c->lqc2(vf11, 0, s2); // lqc2 vf11, 0(s2) + c->daddiu(s2, s2, 48); // daddiu s2, s2, 48 + c->vsub(DEST::xyz, vf9, vf10, vf11); // vsub.xyz vf9, vf10, vf11 + c->vmul(DEST::w, vf11, vf11, vf11); // vmul.w vf11, vf11, vf11 + c->vmul(DEST::xyzw, vf9, vf9, vf9); // vmul.xyzw vf9, vf9, vf9 + c->vmula_bc(DEST::w, BC::x, vf0, vf9); // vmulax.w acc, vf0, vf9 + c->vmadda_bc(DEST::w, BC::y, vf0, vf9); // vmadday.w acc, vf0, vf9 + c->vmadd_bc(DEST::w, BC::z, vf9, vf0, vf9); // vmaddz.w vf9, vf0, vf9 + c->vsub(DEST::w, vf9, vf9, vf11); // vsub.w vf9, vf9, vf11 + c->mov128_gpr_vf(v1, vf9); // qmfc2.i v1, vf9 + c->pcpyud(v1, v1, v1); // pcpyud v1, v1, v1 + if (((s64)c->sgpr64(v1)) > 0) { // bgtzl v1, L14 + // nop // sll r0, r0, 0 + goto block_5; + } + +// block_11: + c->daddiu(v1, s7, 4); // daddiu v1, s7, #t + c->mov64(v0, v1); // or v0, v1, r0 + //beq r0, r0, L16 // beq r0, r0, L16 + // nop // sll r0, r0, 0 + goto block_14; // branch always + + +block_12: + c->mov64(v0, s7); // or v0, s7, r0 + //beq r0, r0, L16 // beq r0, r0, L16 + // nop // sll r0, r0, 0 + goto block_14; // branch always + + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + +block_14: + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 112, sp); // lq gp, 112(sp) + c->lq(s5, 96, sp); // lq s5, 96(sp) + c->lq(s4, 80, sp); // lq s4, 80(sp) + c->lq(s3, 64, sp); // lq s3, 64(sp) + c->lq(s2, 48, sp); // lq s2, 48(sp) + c->lq(s1, 32, sp); // lq s1, 32(sp) + c->lq(s0, 16, sp); // lq s0, 16(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 128); // daddiu sp, sp, 128 + 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.closest_pt_in_triangle = intern_from_c(-1, 0, "closest-pt-in-triangle").c(); + gLinkedFunctionTable.reg("(method 9 collide-puss-work)", execute, 256); +} + +} // namespace method_9_collide_puss_work +} // 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_10_collide_puss_work { +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->lwu(v1, 116, a2); // lwu v1, 116(a2) + c->daddiu(a2, a0, 96); // daddiu a2, a0, 96 + c->lqc2(vf1, 0, a1); // lqc2 vf1, 0(a1) + bc = c->sgpr64(v1) == 0; // beq v1, r0, L10 + c->lq(a1, 64, a0); // lq a1, 64(a0) + if (bc) {goto block_12;} // branch non-likely + + c->vmax_bc(DEST::xyzw, BC::w, vf4, vf0, vf0); // vmaxw.xyzw vf4, vf0, vf0 + c->lq(a3, 80, a0); // lq a3, 80(a0) + c->vsub_bc(DEST::xyz, BC::w, vf2, vf1, vf1); // vsubw.xyz vf2, vf1, vf1 + c->gprs[a0].du64[0] = 0; // or a0, r0, r0 + c->vadd_bc(DEST::xyz, BC::w, vf3, vf1, vf1); // vaddw.xyz vf3, vf1, vf1 + c->lqc2(vf5, 0, a2); // lqc2 vf5, 0(a2) + c->vftoi0(DEST::xyzw, vf2, vf2); // vftoi0.xyzw vf2, vf2 + c->lqc2(vf6, 48, a2); // lqc2 vf6, 48(a2) + c->vftoi0(DEST::xyzw, vf3, vf3); // vftoi0.xyzw vf3, vf3 + c->lqc2(vf7, 96, a2); // lqc2 vf7, 96(a2) + // nop // sll r0, r0, 0 + c->vsub_bc(DEST::w, BC::w, vf1, vf0, vf1); // vsubw.w vf1, vf0, vf1 + c->mov128_gpr_vf(t0, vf2); // qmfc2.i t0, vf2 + c->lqc2(vf8, 144, a2); // lqc2 vf8, 144(a2) + c->mov128_gpr_vf(t1, vf3); // qmfc2.i t1, vf3 + // nop // sll r0, r0, 0 + c->pcgtw(a1, a1, t1); // pcgtw a1, a1, t1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcgtw(a3, t0, a3); // pcgtw a3, t0, a3 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->por(a1, a1, a3); // por a1, a1, a3 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->ppach(a1, r0, a1); // ppach a1, r0, a1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->dsll(a1, a1, 16); // dsll a1, a1, 16 + // nop // sll r0, r0, 0 + bc = c->sgpr64(a1) != 0; // bne a1, r0, L10 + // nop // sll r0, r0, 0 + if (bc) {goto block_12;} // branch non-likely + + +block_2: + c->vsub(DEST::xyzw, vf9, vf5, vf1); // vsub.xyzw vf9, vf5, vf1 + c->daddiu(a2, a2, 192); // daddiu a2, a2, 192 + c->vsub(DEST::xyzw, vf10, vf6, vf1); // vsub.xyzw vf10, vf6, vf1 + c->lqc2(vf5, 0, a2); // lqc2 vf5, 0(a2) + c->vsub(DEST::xyzw, vf11, vf7, vf1); // vsub.xyzw vf11, vf7, vf1 + c->lqc2(vf6, 48, a2); // lqc2 vf6, 48(a2) + c->vsub(DEST::xyzw, vf12, vf8, vf1); // vsub.xyzw vf12, vf8, vf1 + c->lqc2(vf7, 96, a2); // lqc2 vf7, 96(a2) + c->vmul(DEST::xyzw, vf9, vf9, vf9); // vmul.xyzw vf9, vf9, vf9 + c->lqc2(vf8, 144, a2); // lqc2 vf8, 144(a2) + c->vmul(DEST::xyzw, vf10, vf10, vf10); // vmul.xyzw vf10, vf10, vf10 + // nop // sll r0, r0, 0 + c->vmul(DEST::xyzw, vf11, vf11, vf11); // vmul.xyzw vf11, vf11, vf11 + // nop // sll r0, r0, 0 + c->vmul(DEST::xyzw, vf12, vf12, vf12); // vmul.xyzw vf12, vf12, vf12 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::x, vf4, vf9); // vmulax.xyzw acc, vf4, vf9 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf4, vf9); // vmadday.xyzw acc, vf4, vf9 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::z, vf4, vf9); // vmaddaz.xyzw acc, vf4, vf9 + // nop // sll r0, r0, 0 + c->vmsub_bc(DEST::xyzw, BC::w, vf9, vf4, vf9); // vmsubw.xyzw vf9, vf4, vf9 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::x, vf4, vf10); // vmulax.xyzw acc, vf4, vf10 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf4, vf10); // vmadday.xyzw acc, vf4, vf10 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::z, vf4, vf10); // vmaddaz.xyzw acc, vf4, vf10 + // nop // sll r0, r0, 0 + c->vmsub_bc(DEST::xyzw, BC::w, vf10, vf4, vf10); // vmsubw.xyzw vf10, vf4, vf10 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(a1, vf9); // qmfc2.i a1, vf9 + c->daddiu(a0, a0, 1); // daddiu a0, a0, 1 + bc = ((s64)c->sgpr64(a1)) <= 0; // blez a1, L9 + c->vmula_bc(DEST::xyzw, BC::x, vf4, vf11); // vmulax.xyzw acc, vf4, vf11 + if (bc) {goto block_11;} // branch non-likely + + bc = c->sgpr64(a0) == c->sgpr64(v1); // beq a0, v1, L10 + c->vmadda_bc(DEST::xyzw, BC::y, vf4, vf11); // vmadday.xyzw acc, vf4, vf11 + if (bc) {goto block_12;} // branch non-likely + + c->vmadda_bc(DEST::xyzw, BC::z, vf4, vf11); // vmaddaz.xyzw acc, vf4, vf11 + // nop // sll r0, r0, 0 + c->vmsub_bc(DEST::xyzw, BC::w, vf11, vf4, vf11); // vmsubw.xyzw vf11, vf4, vf11 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(a1, vf10); // qmfc2.i a1, vf10 + c->daddiu(a0, a0, 1); // daddiu a0, a0, 1 + bc = ((s64)c->sgpr64(a1)) <= 0; // blez a1, L9 + c->vmula_bc(DEST::xyzw, BC::x, vf4, vf12); // vmulax.xyzw acc, vf4, vf12 + if (bc) {goto block_11;} // branch non-likely + + bc = c->sgpr64(a0) == c->sgpr64(v1); // beq a0, v1, L10 + c->vmadda_bc(DEST::xyzw, BC::y, vf4, vf12); // vmadday.xyzw acc, vf4, vf12 + if (bc) {goto block_12;} // branch non-likely + + c->vmadda_bc(DEST::xyzw, BC::z, vf4, vf12); // vmaddaz.xyzw acc, vf4, vf12 + // nop // sll r0, r0, 0 + c->vmsub_bc(DEST::xyzw, BC::w, vf12, vf4, vf12); // vmsubw.xyzw vf12, vf4, vf12 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(a1, vf11); // qmfc2.i a1, vf11 + c->daddiu(a0, a0, 1); // daddiu a0, a0, 1 + bc = ((s64)c->sgpr64(a1)) <= 0; // blez a1, L9 + // nop // sll r0, r0, 0 + if (bc) {goto block_11;} // branch non-likely + + bc = c->sgpr64(a0) == c->sgpr64(v1); // beq a0, v1, L10 + // nop // sll r0, r0, 0 + if (bc) {goto block_12;} // branch non-likely + + c->mov128_gpr_vf(a1, vf12); // qmfc2.i a1, vf12 + c->daddiu(a0, a0, 1); // daddiu a0, a0, 1 + bc = ((s64)c->sgpr64(a1)) <= 0; // blez a1, L9 + // nop // sll r0, r0, 0 + if (bc) {goto block_11;} // branch non-likely + + bc = c->sgpr64(a0) != c->sgpr64(v1); // bne a0, v1, L8 + // nop // sll r0, r0, 0 + if (bc) {goto block_2;} // branch non-likely + + //beq r0, r0, L10 // beq r0, r0, L10 + // nop // sll r0, r0, 0 + goto block_12; // branch always + + +block_11: + c->daddiu(v1, s7, 4); // daddiu v1, s7, #t + c->mov64(v0, v1); // or v0, v1, r0 + //beq r0, r0, L11 // beq r0, r0, L11 + // nop // sll r0, r0, 0 + goto block_14; // branch always + + +block_12: + c->mov64(v0, s7); // or v0, s7, r0 + //beq r0, r0, L11 // beq r0, r0, L11 + // nop // sll r0, r0, 0 + goto block_14; // branch always + + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + +block_14: + //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() { + gLinkedFunctionTable.reg("(method 10 collide-puss-work)", execute, 256); +} + +} // namespace method_10_collide_puss_work +} // namespace Mips2C \ No newline at end of file diff --git a/game/mips2c/jak3_functions/collide_edge_grab.cpp b/game/mips2c/jak3_functions/collide_edge_grab.cpp new file mode 100644 index 0000000000..815b5d0e67 --- /dev/null +++ b/game/mips2c/jak3_functions/collide_edge_grab.cpp @@ -0,0 +1,1691 @@ +// cppcheck-suppress-file unusedLabels +//--------------------------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_10_collide_edge_hold_list { +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + // bool bc = false; + u32 call_addr = 0; + bool cop1_bc = false; + // nop // sll r0, r0, 0 + c->daddiu(a2, a0, 1552); // daddiu a2, a0, 1552 + c->lwu(t0, 4, a0); // lwu t0, 4(a0) + // nop // sll r0, r0, 0 + c->lqc2(vf1, 16, a1); // lqc2 vf1, 16(a1) + c->dsll(a3, t0, 4); // dsll a3, t0, 4 + c->lwu(v1, 8, a0); // lwu v1, 8(a0) + c->daddiu(t0, t0, 1); // daddiu t0, t0, 1 + c->lwc1(f0, 4, a1); // lwc1 f0, 4(a1) + c->daddu(a2, a2, a3); // daddu a2, a2, a3 + c->sw(t0, 4, a0); // sw t0, 4(a0) + c->sqc2(vf1, 0, a2); // sqc2 vf1, 0(a2) + if (((s64)c->sgpr64(v1)) == ((s64)c->sgpr64(s7))) {// beql v1, s7, L96 + c->sw(a1, 8, a0); // sw a1, 8(a0) + goto block_10; + } + +// block_2: + c->lwc1(f1, 4, v1); // lwc1 f1, 4(v1) + cop1_bc = c->fprs[f0] < c->fprs[f1]; // c.lt.s f0, f1 + if (cop1_bc) { // bc1tl L97 + c->sw(a1, 8, a0); // sw a1, 8(a0) + goto block_11; + } + +// block_4: + c->mov64(a0, v1); // or a0, v1, r0 + +block_5: + c->lwu(v1, 0, v1); // lwu v1, 0(v1) + if (((s64)c->sgpr64(v1)) == ((s64)c->sgpr64(s7))) {// beql v1, s7, L98 + c->sw(a1, 0, a0); // sw a1, 0(a0) + goto block_12; + } + +// block_7: + c->lwc1(f1, 4, v1); // lwc1 f1, 4(v1) + cop1_bc = c->fprs[f0] < c->fprs[f1]; // c.lt.s f0, f1 + if (!cop1_bc) { // bc1fl L95 + c->mov64(a0, v1); // or a0, v1, r0 + goto block_5; + } + +// block_9: + c->sw(a1, 0, a0); // sw a1, 0(a0) + //beq r0, r0, L99 // beq r0, r0, L99 + c->sw(v1, 0, a1); // sw v1, 0(a1) + goto block_13; // branch always + + +block_10: + //beq r0, r0, L99 // beq r0, r0, L99 + c->sw(s7, 0, a1); // sw s7, 0(a1) + goto block_13; // branch always + + +block_11: + //beq r0, r0, L99 // beq r0, r0, L99 + c->sw(v1, 0, a1); // sw v1, 0(a1) + goto block_13; // branch always + + +block_12: + c->sw(s7, 0, a1); // sw s7, 0(a1) + +block_13: + 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: + return c->gprs[v0].du64[0]; +} + +void link() { + gLinkedFunctionTable.reg("(method 10 collide-edge-hold-list)", execute, 256); +} + +} // namespace method_10_collide_edge_hold_list +} // 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_19_collide_edge_work { +struct Cache { + void* collide_edge_hold_list; // collide-edge-hold-list + void* collide_edge_work; // collide-edge-work +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->daddiu(sp, sp, -176); // daddiu sp, sp, -176 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s0, 64, sp); // sq s0, 64(sp) + c->sq(s1, 80, sp); // sq s1, 80(sp) + c->sq(s2, 96, sp); // sq s2, 96(sp) + c->sq(s3, 112, sp); // sq s3, 112(sp) + c->sq(s4, 128, sp); // sq s4, 128(sp) + c->sq(s5, 144, sp); // sq s5, 144(sp) + c->sq(gp, 160, sp); // sq gp, 160(sp) + c->mov64(gp, a0); // or gp, a0, r0 + c->mov64(s5, a1); // or s5, a1, r0 + c->mov64(s4, a2); // or s4, a2, r0 + c->daddiu(s3, sp, 16); // daddiu s3, sp, 16 + c->sd(r0, 256, s4); // sd r0, 256(s4) + c->addiu(s2, r0, 16); // addiu s2, r0, 16 + +block_1: + bc = c->sgpr64(s2) == 0; // beq s2, r0, L92 + c->daddiu(s2, s2, -1); // daddiu s2, s2, -1 + if (bc) {goto block_25;} // branch non-likely + + c->lwu(s1, 8, s5); // lwu s1, 8(s5) + bc = c->sgpr64(s1) == c->sgpr64(s7); // beq s1, s7, L92 + // nop // sll r0, r0, 0 + if (bc) {goto block_25;} // branch non-likely + + c->mov64(a0, gp); // or a0, gp, r0 + c->load_symbol2(v1, cache.collide_edge_work); // lw v1, collide-edge-work(s7) + c->lwu(t9, 96, v1); // lwu t9, 96(v1) + c->mov64(a1, s1); // or a1, s1, r0 + 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 + bc = c->sgpr64(v1) == c->sgpr64(s7); // beq v1, s7, L87 + c->lwu(v1, 0, s1); // lwu v1, 0(s1) + if (bc) {goto block_5;} // branch non-likely + + c->daddiu(v1, s7, 4); // daddiu v1, s7, #t + c->mov64(v0, v1); // or v0, v1, r0 + //beq r0, r0, L93 // beq r0, r0, L93 + // nop // sll r0, r0, 0 + goto block_26; // branch always + + +block_5: + c->lb(s0, 8, s1); // lb s0, 8(s1) + c->sw(v1, 8, s5); // sw v1, 8(s5) + bc = ((s64)c->sgpr64(s0)) > 0; // bgtz s0, L90 + c->addiu(v1, r0, 2); // addiu v1, r0, 2 + if (bc) {goto block_17;} // branch non-likely + + if (((s64)c->sgpr64(s0)) < 0) { // bltzl s0, L91 + c->dsubu(s0, r0, s0); // dsubu s0, r0, s0 + goto block_21; + } + +// block_8: + c->dsll(v1, s0, 2); // dsll v1, s0, 2 + c->daddiu(a0, gp, 352); // daddiu a0, gp, 352 + c->daddu(v1, a0, v1); // daddu v1, a0, v1 + c->lw(v1, 0, v1); // lw v1, 0(v1) + c->mov128_vf_gpr(vf1, v1); // qmtc2.i vf1, v1 + c->lwu(a2, 12, s1); // lwu a2, 12(s1) + c->vmove(DEST::xyzw, vf5, vf0); // vmove.xyzw vf5, vf0 + c->lqc2(vf3, 16, s1); // lqc2 vf3, 16(s1) + c->vmove(DEST::xyzw, vf6, vf0); // vmove.xyzw vf6, vf0 + c->lqc2(vf4, 32, a2); // lqc2 vf4, 32(a2) + c->lwu(v1, 12, a2); // lwu v1, 12(a2) + c->vmul_bc(DEST::xyz, BC::x, vf2, vf4, vf1); // vmulx.xyz vf2, vf4, vf1 + c->vadd(DEST::xyz, vf5, vf3, vf2); // vadd.xyz vf5, vf3, vf2 + c->vsub(DEST::xyz, vf6, vf3, vf2); // vsub.xyz vf6, vf3, vf2 + c->lqc2(vf8, 0, v1); // lqc2 vf8, 0(v1) + c->sqc2(vf6, 16, s3); // sqc2 vf6, 16(s3) + c->sqc2(vf2, 32, s3); // sqc2 vf2, 32(s3) + c->sw(a2, 0, s3); // sw a2, 0(s3) + c->sw(s7, 4, s3); // sw s7, 4(s3) + c->vsub(DEST::xyz, vf9, vf8, vf5); // vsub.xyz vf9, vf8, vf5 + c->vmul(DEST::xyz, vf9, vf9, vf2); // vmul.xyz vf9, vf9, vf2 + c->vadd_bc(DEST::x, BC::y, vf9, vf9, vf9); // vaddy.x vf9, vf9, vf9 + c->vadd_bc(DEST::x, BC::z, vf9, vf9, vf9); // vaddz.x vf9, vf9, vf9 + c->mov128_gpr_vf(v1, vf9); // qmfc2.i v1, vf9 + bc = ((s64)c->sgpr64(v1)) < 0; // bltz v1, L88 + // nop // sll r0, r0, 0 + if (bc) {goto block_12;} // branch non-likely + + c->sqc2(vf5, 16, s1); // sqc2 vf5, 16(s1) + c->mov64(a0, gp); // or a0, gp, r0 + c->load_symbol2(v1, cache.collide_edge_work); // lw v1, collide-edge-work(s7) + c->lwu(t9, 88, v1); // lwu t9, 88(v1) + c->mov64(a1, s1); // or a1, 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 + bc = c->sgpr64(v1) == c->sgpr64(s7); // beq v1, s7, L88 + // nop // sll r0, r0, 0 + if (bc) {goto block_12;} // branch non-likely + + c->mov64(a0, s5); // or a0, s5, r0 + c->load_symbol2(v1, cache.collide_edge_hold_list);// lw v1, collide-edge-hold-list(s7) + c->lwu(t9, 56, v1); // lwu t9, 56(v1) + c->mov64(a1, s1); // or a1, 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 + c->addiu(v1, r0, 1); // addiu v1, r0, 1 + c->sb(v1, 8, s1); // sb v1, 8(s1) + c->addiu(v1, r0, 32); // addiu v1, r0, 32 + c->lwu(a0, 0, s5); // lwu a0, 0(s5) + c->addiu(a1, r0, 48); // addiu a1, r0, 48 + bc = c->sgpr64(a0) == c->sgpr64(v1); // beq a0, v1, L86 + c->mult3(v1, a0, a1); // mult3 v1, a0, a1 + if (bc) {goto block_1;} // branch non-likely + + c->daddu(v1, v1, s5); // daddu v1, v1, s5 + c->sw(r0, 4, s3); // sw r0, 4(s3) + c->daddiu(s1, v1, 16); // daddiu s1, v1, 16 + +block_12: + c->lwu(a2, 0, s3); // lwu a2, 0(s3) + c->lqc2(vf6, 16, s3); // lqc2 vf6, 16(s3) + c->lqc2(vf2, 32, s3); // lqc2 vf2, 32(s3) + c->lwu(v1, 8, a2); // lwu v1, 8(a2) + c->lqc2(vf7, 0, v1); // lqc2 vf7, 0(v1) + c->vsub(DEST::xyz, vf9, vf6, vf7); // vsub.xyz vf9, vf6, vf7 + c->vmul(DEST::xyz, vf9, vf9, vf2); // vmul.xyz vf9, vf9, vf2 + c->vadd_bc(DEST::x, BC::y, vf9, vf9, vf9); // vaddy.x vf9, vf9, vf9 + c->vadd_bc(DEST::x, BC::z, vf9, vf9, vf9); // vaddz.x vf9, vf9, vf9 + c->mov128_gpr_vf(v1, vf9); // qmfc2.i v1, vf9 + bc = ((s64)c->sgpr64(v1)) < 0; // bltz v1, L86 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + c->sqc2(vf6, 16, s1); // sqc2 vf6, 16(s1) + c->mov64(a0, gp); // or a0, gp, r0 + c->load_symbol2(v1, cache.collide_edge_work); // lw v1, collide-edge-work(s7) + c->lwu(t9, 88, v1); // lwu t9, 88(v1) + c->mov64(a1, s1); // or a1, 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 + bc = c->sgpr64(v1) == c->sgpr64(s7); // beq v1, s7, L86 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + c->mov64(a0, s5); // or a0, s5, r0 + c->load_symbol2(v1, cache.collide_edge_hold_list);// lw v1, collide-edge-hold-list(s7) + c->lwu(t9, 56, v1); // lwu t9, 56(v1) + c->mov64(a1, s1); // or a1, 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 + c->lwu(v1, 4, s3); // lwu v1, 4(s3) + bc = c->sgpr64(v1) == c->sgpr64(s7); // beq v1, s7, L89 + c->lwu(v1, 0, s5); // lwu v1, 0(s5) + if (bc) {goto block_16;} // branch non-likely + + c->daddiu(v1, v1, 1); // daddiu v1, v1, 1 + c->sw(v1, 0, s5); // sw v1, 0(s5) + +block_16: + c->addiu(v1, r0, -1); // addiu v1, r0, -1 + //beq r0, r0, L86 // beq r0, r0, L86 + c->sb(v1, 8, s1); // sb v1, 8(s1) + goto block_1; // branch always + + +block_17: + bc = c->sgpr64(s0) == c->sgpr64(v1); // beq s0, v1, L86 + c->lwu(a2, 12, s1); // lwu a2, 12(s1) + if (bc) {goto block_1;} // branch non-likely + + c->dsll(v1, s0, 2); // dsll v1, s0, 2 + c->daddiu(a0, gp, 352); // daddiu a0, gp, 352 + c->daddu(v1, a0, v1); // daddu v1, a0, v1 + c->lw(v1, 0, v1); // lw v1, 0(v1) + c->mov128_vf_gpr(vf1, v1); // qmtc2.i vf1, v1 + c->lqc2(vf3, 16, s1); // lqc2 vf3, 16(s1) + c->vmove(DEST::xyzw, vf5, vf0); // vmove.xyzw vf5, vf0 + c->lqc2(vf4, 32, a2); // lqc2 vf4, 32(a2) + c->lwu(v1, 12, a2); // lwu v1, 12(a2) + c->vmul_bc(DEST::xyz, BC::x, vf2, vf4, vf1); // vmulx.xyz vf2, vf4, vf1 + c->vadd(DEST::xyz, vf5, vf3, vf2); // vadd.xyz vf5, vf3, vf2 + c->lqc2(vf8, 0, v1); // lqc2 vf8, 0(v1) + c->vsub(DEST::xyz, vf9, vf8, vf5); // vsub.xyz vf9, vf8, vf5 + c->vmul(DEST::xyz, vf9, vf9, vf2); // vmul.xyz vf9, vf9, vf2 + c->vadd_bc(DEST::x, BC::y, vf9, vf9, vf9); // vaddy.x vf9, vf9, vf9 + c->vadd_bc(DEST::x, BC::z, vf9, vf9, vf9); // vaddz.x vf9, vf9, vf9 + c->mov128_gpr_vf(v1, vf9); // qmfc2.i v1, vf9 + bc = ((s64)c->sgpr64(v1)) < 0; // bltz v1, L86 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + c->sqc2(vf5, 16, s1); // sqc2 vf5, 16(s1) + c->mov64(a0, gp); // or a0, gp, r0 + c->load_symbol2(v1, cache.collide_edge_work); // lw v1, collide-edge-work(s7) + c->lwu(t9, 88, v1); // lwu t9, 88(v1) + c->mov64(a1, s1); // or a1, 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 + bc = c->sgpr64(v1) == c->sgpr64(s7); // beq v1, s7, L86 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + c->mov64(a0, s5); // or a0, s5, r0 + c->load_symbol2(v1, cache.collide_edge_hold_list);// lw v1, collide-edge-hold-list(s7) + c->lwu(t9, 56, v1); // lwu t9, 56(v1) + c->mov64(a1, s1); // or a1, 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 + c->daddiu(v1, s0, 1); // daddiu v1, s0, 1 + //beq r0, r0, L86 // beq r0, r0, L86 + c->sb(v1, 8, s1); // sb v1, 8(s1) + goto block_1; // branch always + + +block_21: + bc = c->sgpr64(s0) == c->sgpr64(v1); // beq s0, v1, L86 + c->lwu(a2, 12, s1); // lwu a2, 12(s1) + if (bc) {goto block_1;} // branch non-likely + + c->dsll(v1, s0, 2); // dsll v1, s0, 2 + c->daddiu(a0, gp, 352); // daddiu a0, gp, 352 + c->daddu(v1, a0, v1); // daddu v1, a0, v1 + c->lw(v1, 0, v1); // lw v1, 0(v1) + c->mov128_vf_gpr(vf1, v1); // qmtc2.i vf1, v1 + c->lqc2(vf3, 16, s1); // lqc2 vf3, 16(s1) + c->vmove(DEST::xyzw, vf6, vf0); // vmove.xyzw vf6, vf0 + c->lqc2(vf4, 32, a2); // lqc2 vf4, 32(a2) + c->lwu(v1, 8, a2); // lwu v1, 8(a2) + c->vmul_bc(DEST::xyz, BC::x, vf2, vf4, vf1); // vmulx.xyz vf2, vf4, vf1 + c->vsub(DEST::xyz, vf6, vf3, vf2); // vsub.xyz vf6, vf3, vf2 + c->lqc2(vf7, 0, v1); // lqc2 vf7, 0(v1) + c->vsub(DEST::xyz, vf9, vf6, vf7); // vsub.xyz vf9, vf6, vf7 + c->vmul(DEST::xyz, vf9, vf9, vf2); // vmul.xyz vf9, vf9, vf2 + c->vadd_bc(DEST::x, BC::y, vf9, vf9, vf9); // vaddy.x vf9, vf9, vf9 + c->vadd_bc(DEST::x, BC::z, vf9, vf9, vf9); // vaddz.x vf9, vf9, vf9 + c->mov128_gpr_vf(v1, vf9); // qmfc2.i v1, vf9 + bc = ((s64)c->sgpr64(v1)) < 0; // bltz v1, L86 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + c->sqc2(vf6, 16, s1); // sqc2 vf6, 16(s1) + c->mov64(a0, gp); // or a0, gp, r0 + c->load_symbol2(v1, cache.collide_edge_work); // lw v1, collide-edge-work(s7) + c->lwu(t9, 88, v1); // lwu t9, 88(v1) + c->mov64(a1, s1); // or a1, 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 + bc = c->sgpr64(v1) == c->sgpr64(s7); // beq v1, s7, L86 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + c->mov64(a0, s5); // or a0, s5, r0 + c->load_symbol2(v1, cache.collide_edge_hold_list);// lw v1, collide-edge-hold-list(s7) + c->lwu(t9, 56, v1); // lwu t9, 56(v1) + c->mov64(a1, s1); // or a1, 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 + c->daddiu(v1, s0, 1); // daddiu v1, s0, 1 + c->dsubu(v1, r0, v1); // dsubu v1, r0, v1 + //beq r0, r0, L86 // beq r0, r0, L86 + c->sb(v1, 8, s1); // sb v1, 8(s1) + goto block_1; // branch always + + +block_25: + c->mov64(v0, s7); // or v0, s7, r0 + +block_26: + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 160, sp); // lq gp, 160(sp) + c->lq(s5, 144, sp); // lq s5, 144(sp) + c->lq(s4, 128, sp); // lq s4, 128(sp) + c->lq(s3, 112, sp); // lq s3, 112(sp) + c->lq(s2, 96, sp); // lq s2, 96(sp) + c->lq(s1, 80, sp); // lq s1, 80(sp) + c->lq(s0, 64, sp); // lq s0, 64(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 176); // daddiu sp, sp, 176 + 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.collide_edge_hold_list = intern_from_c(-1, 0, "collide-edge-hold-list").c(); + cache.collide_edge_work = intern_from_c(-1, 0, "collide-edge-work").c(); + gLinkedFunctionTable.reg("(method 19 collide-edge-work)", execute, 256); +} + +} // namespace method_19_collide_edge_work +} // 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_9_edge_grab_info { +struct Cache { + void* collide_cache; // *collide-cache* + void* collide_edge_work; // *collide-edge-work* + void* target; // *target* + void* edge_grabbed; // edge-grabbed + void* matrix; // matrix + void* send_event_function; // send-event-function + void* target_edge_grab_jump; // target-edge-grab-jump + void* vector_matrix; // vector-matrix*! + void* vector_normalize; // vector-normalize! +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + bool cop1_bc = false; + c->daddiu(sp, sp, -704); // daddiu sp, sp, -704 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s3, 640, sp); // sq s3, 640(sp) + c->sq(s4, 656, sp); // sq s4, 656(sp) + c->sq(s5, 672, sp); // sq s5, 672(sp) + c->sq(gp, 688, sp); // sq gp, 688(sp) + c->mov64(gp, a0); // or gp, a0, r0 + c->mov64(s5, s7); // or s5, s7, r0 + c->daddiu(v1, gp, 384); // daddiu v1, gp, 384 + c->daddiu(a0, gp, 32); // daddiu a0, gp, 32 + c->lq(a0, 0, a0); // lq a0, 0(a0) + c->sq(a0, 0, v1); // sq a0, 0(v1) + c->lw(v1, 264, gp); // lw v1, 264(gp) + bc = c->sgpr64(v1) == 0; // beq v1, r0, L46 + c->mov64(a0, s7); // or a0, s7, r0 + if (bc) {goto block_18;} // branch non-likely + + c->ld(a0, 272, gp); // ld a0, 272(gp) + c->subu(a1, a0, s7); // subu a1, a0, s7 + if (((s64)c->sgpr64(a1)) == ((s64)0)) { // beql a1, r0, L40 + c->mov64(a0, s7); // or a0, s7, r0 + goto block_6; + } + +// block_3: + c->sllv(a1, a0, r0); // sllv a1, a0, r0 + c->lwu(a1, 0, a1); // lwu a1, 0(a1) + c->lw(a2, 40, a1); // lw a2, 40(a1) + c->dsra32(a0, a0, 0); // dsra32 a0, a0, 0 + bc = c->sgpr64(a0) != c->sgpr64(a2); // bne a0, a2, L39 + c->mov64(a0, s7); // or a0, s7, r0 + if (bc) {goto block_5;} // branch non-likely + + c->mov64(a0, a1); // or a0, a1, r0 + +block_5: + c->mov64(a1, a0); // or a1, a0, r0 + +block_6: + bc = c->sgpr64(s7) != c->sgpr64(a0); // bne s7, a0, L41 + c->mov64(a1, s7); // or a1, s7, r0 + if (bc) {goto block_9;} // branch non-likely + + c->mov64(v0, s7); // or v0, s7, r0 + //beq r0, r0, L54 // beq r0, r0, L54 + // nop // sll r0, r0, 0 + goto block_34; // branch always + + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + +block_9: + c->daddu(s5, a0, v1); // daddu s5, a0, v1 + c->lwu(v1, 28, s5); // lwu v1, 28(s5) + bc = c->sgpr64(v1) != 0; // bne v1, r0, L42 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_12;} // branch non-likely + + c->mov64(v0, s7); // or v0, s7, r0 + //beq r0, r0, L54 // beq r0, r0, L54 + // nop // sll r0, r0, 0 + goto block_34; // branch always + + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + +block_12: + c->lwu(v1, 128, a0); // lwu v1, 128(a0) + c->lb(a0, 8, s5); // lb a0, 8(s5) + c->dsll(a0, a0, 5); // dsll a0, a0, 5 + c->daddu(v1, v1, a0); // daddu v1, v1, a0 + c->lwu(v1, 28, v1); // lwu v1, 28(v1) + c->daddu(s4, r0, v1); // daddu s4, r0, v1 + c->addiu(s3, r0, 0); // addiu s3, r0, 0 + //beq r0, r0, L44 // beq r0, r0, L44 + // nop // sll r0, r0, 0 + goto block_14; // branch always + + +block_13: + c->load_symbol2(t9, cache.vector_matrix); // lw t9, vector-matrix*!(s7) + c->dsll(v1, s3, 4); // dsll v1, s3, 4 + c->daddu(v1, r0, v1); // daddu v1, r0, v1 + c->daddu(a0, v1, gp); // daddu a0, v1, gp + c->dsll(v1, s3, 4); // dsll v1, s3, 4 + c->daddiu(v1, v1, 128); // daddiu v1, v1, 128 + c->daddu(a1, v1, gp); // daddu a1, v1, 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->daddiu(s3, s3, 1); // daddiu s3, s3, 1 + +block_14: + c->slti(v1, s3, 8); // slti v1, s3, 8 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L43 + // nop // sll r0, r0, 0 + if (bc) {goto block_13;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + c->mov64(v1, s7); // or v1, s7, r0 + c->lqc2(vf1, 48, gp); // lqc2 vf1, 48(gp) + c->lqc2(vf2, 64, gp); // lqc2 vf2, 64(gp) + c->lqc2(vf3, 80, gp); // lqc2 vf3, 80(gp) + c->vsub(DEST::xyzw, vf4, vf2, vf1); // vsub.xyzw vf4, vf2, vf1 + c->vsub(DEST::xyzw, vf5, vf3, vf1); // vsub.xyzw vf5, vf3, vf1 + c->vopmula(vf4, vf5); // vopmula.xyz acc, vf4, vf5 + c->vopmsub(vf6, vf5, vf4); // vopmsub.xyz vf6, vf5, vf4 + c->vmul(DEST::xyzw, vf7, vf6, vf6); // vmul.xyzw vf7, vf6, vf6 + c->vmula_bc(DEST::w, BC::x, vf0, vf7); // vmulax.w acc, vf0, vf7 + c->vmadda_bc(DEST::w, BC::y, vf0, vf7); // vmadday.w acc, vf0, vf7 + c->vmadd_bc(DEST::w, BC::z, vf7, vf0, vf7); // vmaddz.w vf7, vf0, vf7 + c->vrsqrt(vf0, BC::w, vf7, BC::w); // vrsqrt Q, vf0.w, vf7.w + c->lui(v1, 16180); // lui v1, 16180 + c->ori(v1, v1, 65012); // ori v1, v1, 65012 + c->mtc1(f1, v1); // mtc1 f1, v1 + c->vwaitq(); // vwaitq + // nop // sll r0, r0, 0 + c->vmulq(DEST::xyz, vf6, vf6); // vmulq.xyz vf6, vf6, Q + c->mov128_gpr_vf(v1, vf6); // qmfc2.i v1, vf6 + c->dsra32(v1, v1, 0); // dsra32 v1, v1, 0 + c->mtc1(f2, v1); // mtc1 f2, v1 + cop1_bc = c->fprs[f2] < c->fprs[f1]; // c.lt.s f2, f1 + bc = !cop1_bc; // bc1f L45 + // nop // sll r0, r0, 0 + if (bc) {goto block_17;} // branch non-likely + + c->mov64(v0, s7); // or v0, s7, r0 + //beq r0, r0, L54 // beq r0, r0, L54 + // nop // sll r0, r0, 0 + goto block_34; // branch always + + +block_17: + c->daddiu(v1, gp, 304); // daddiu v1, gp, 304 + c->load_symbol2(a0, cache.target); // lw a0, *target*(s7) + c->lwu(a0, 124, a0); // lwu a0, 124(a0) + c->lwu(a0, 464, a0); // lwu a0, 464(a0) + c->daddiu(a0, a0, 28); // daddiu a0, a0, 28 + c->lq(a0, 0, a0); // lq a0, 0(a0) + c->sq(a0, 0, v1); // sq a0, 0(v1) + c->load_symbol2(t9, cache.vector_normalize); // lw t9, vector-normalize!(s7) + c->daddiu(a0, gp, 320); // daddiu a0, gp, 320 + c->daddiu(v1, gp, 16); // daddiu v1, gp, 16 + c->daddu(a1, r0, gp); // daddu a1, r0, gp + c->lqc2(vf4, 0, v1); // lqc2 vf4, 0(v1) + c->lqc2(vf5, 0, a1); // lqc2 vf5, 0(a1) + c->vmove(DEST::w, vf6, vf0); // vmove.w vf6, vf0 + c->vsub(DEST::xyz, vf6, vf4, vf5); // vsub.xyz vf6, vf4, vf5 + c->sqc2(vf6, 0, a0); // sqc2 vf6, 0(a0) + c->lui(a1, 16256); // lui a1, 16256 + 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_normalize); // lw t9, vector-normalize!(s7) + c->daddiu(a0, gp, 288); // daddiu a0, gp, 288 + c->daddiu(v1, gp, 320); // daddiu v1, gp, 320 + c->daddiu(a1, gp, 304); // daddiu a1, gp, 304 + c->lqc2(vf1, 0, v1); // lqc2 vf1, 0(v1) + c->lqc2(vf2, 0, a1); // lqc2 vf2, 0(a1) + c->vopmula(vf1, vf2); // vopmula.xyz acc, vf1, vf2 + c->vopmsub(vf3, vf2, vf1); // vopmsub.xyz vf3, vf2, vf1 + c->sqc2(vf3, 0, a0); // sqc2 vf3, 0(a0) + c->lui(a1, 16256); // lui a1, 16256 + 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(a1, gp, 320); // daddiu a1, gp, 320 + c->daddiu(v1, gp, 288); // daddiu v1, gp, 288 + c->daddiu(a0, gp, 304); // daddiu a0, gp, 304 + c->lqc2(vf1, 0, v1); // lqc2 vf1, 0(v1) + c->lqc2(vf2, 0, a0); // lqc2 vf2, 0(a0) + c->vopmula(vf1, vf2); // vopmula.xyz acc, vf1, vf2 + c->vopmsub(vf3, vf2, vf1); // vopmsub.xyz vf3, vf2, vf1 + c->sqc2(vf3, 0, a1); // sqc2 vf3, 0(a1) + c->daddiu(v1, gp, 336); // daddiu v1, gp, 336 + c->daddiu(a0, gp, 32); // daddiu a0, gp, 32 + c->lq(a0, 0, a0); // lq a0, 0(a0) + c->sq(a0, 0, v1); // sq a0, 0(v1) + c->load_symbol2(v1, cache.collide_edge_work); // lw v1, *collide-edge-work*(s7) + c->daddiu(a0, gp, 288); // daddiu a0, gp, 288 + c->load_symbol2(a1, cache.matrix); // lw a1, matrix(s7) + c->lwu(t9, 52, a1); // lwu t9, 52(a1) + c->daddiu(a1, v1, 160); // daddiu a1, v1, 160 + c->daddiu(a2, v1, 480); // daddiu a2, v1, 480 + c->addiu(a3, r0, 12); // addiu a3, r0, 12 + 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(a0, v0); // or a0, v0, r0 + +block_18: + c->load_symbol2(v1, cache.collide_edge_work); // lw v1, *collide-edge-work*(s7) + c->daddiu(a1, sp, 16); // daddiu a1, sp, 16 + c->lui(a0, 4); // lui a0, 4 + c->load_symbol2(a2, cache.target); // lw a2, *target*(s7) + c->ld(a2, 196, a2); // ld a2, 196(a2) + c->and_(a0, a0, a2); // and a0, a0, a2 + bc = c->sgpr64(a0) == 0; // beq a0, r0, L47 + // nop // sll r0, r0, 0 + if (bc) {goto block_20;} // branch non-likely + + c->mov64(a0, a1); // or a0, a1, r0 + c->daddiu(a2, v1, 160); // daddiu a2, v1, 160 + c->sw(a2, 112, a0); // sw a2, 112(a0) + c->addiu(a2, r0, 6); // addiu a2, r0, 6 + c->sw(a2, 116, a0); // sw a2, 116(a0) + c->lwu(v1, 4, v1); // lwu v1, 4(v1) + c->lwu(v1, 156, v1); // lwu v1, 156(v1) + c->lwu(v1, 32, v1); // lwu v1, 32(v1) + c->sw(v1, 100, a0); // sw v1, 100(a0) + c->sw(s7, 88, a0); // sw s7, 88(a0) + c->sw(s7, 92, a0); // sw s7, 92(a0) + c->lui(v1, 2304); // lui v1, 2304 + c->ori(v1, v1, 17); // ori v1, v1, 17 + c->sw(v1, 96, a0); // sw v1, 96(a0) + c->daddiu(v1, s7, 4); // daddiu v1, s7, #t + c->sw(v1, 120, a0); // sw v1, 120(a0) + c->addiu(v1, r0, 1); // addiu v1, r0, 1 + c->sw(v1, 352, a0); // sw v1, 352(a0) + //beq r0, r0, L50 // beq r0, r0, L50 + // nop // sll r0, r0, 0 + goto block_26; // branch always + + +block_20: + c->load_symbol2(a0, cache.target); // lw a0, *target*(s7) + c->lwu(a0, 68, a0); // lwu a0, 68(a0) + if (((s64)c->sgpr64(s7)) == ((s64)c->sgpr64(a0))) {// beql s7, a0, L48 + c->mov64(a0, a0); // or a0, a0, r0 + goto block_23; + } + +// block_22: + c->load_symbol2(a0, cache.target); // lw a0, *target*(s7) + c->lwu(a0, 68, a0); // lwu a0, 68(a0) + c->lwu(a0, 0, a0); // lwu a0, 0(a0) + c->load_symbol_addr(a2, cache.target_edge_grab_jump);// daddiu a2, s7, target-edge-grab-jump + c->dsubu(a2, a0, a2); // dsubu a2, a0, a2 + c->daddiu(a0, s7, 4); // daddiu a0, s7, 4 + c->movn(a0, s7, a2); // movn a0, s7, a2 + +block_23: + bc = c->sgpr64(s7) == c->sgpr64(a0); // beq s7, a0, L49 + // nop // sll r0, r0, 0 + if (bc) {goto block_25;} // branch non-likely + + c->mov64(a0, a1); // or a0, a1, r0 + c->daddiu(a2, v1, 256); // daddiu a2, v1, 256 + c->sw(a2, 112, a0); // sw a2, 112(a0) + c->addiu(a2, r0, 6); // addiu a2, r0, 6 + c->sw(a2, 116, a0); // sw a2, 116(a0) + c->lwu(v1, 4, v1); // lwu v1, 4(v1) + c->lwu(v1, 156, v1); // lwu v1, 156(v1) + c->lwu(v1, 32, v1); // lwu v1, 32(v1) + c->sw(v1, 100, a0); // sw v1, 100(a0) + c->sw(s7, 88, a0); // sw s7, 88(a0) + c->sw(s7, 92, a0); // sw s7, 92(a0) + c->lui(v1, 2304); // lui v1, 2304 + c->ori(v1, v1, 17); // ori v1, v1, 17 + c->sw(v1, 96, a0); // sw v1, 96(a0) + c->daddiu(v1, s7, 4); // daddiu v1, s7, #t + c->sw(v1, 120, a0); // sw v1, 120(a0) + c->addiu(v1, r0, 1); // addiu v1, r0, 1 + c->sw(v1, 352, a0); // sw v1, 352(a0) + //beq r0, r0, L50 // beq r0, r0, L50 + // nop // sll r0, r0, 0 + goto block_26; // branch always + + +block_25: + c->mov64(a0, a1); // or a0, a1, r0 + c->daddiu(a2, v1, 160); // daddiu a2, v1, 160 + c->sw(a2, 112, a0); // sw a2, 112(a0) + c->addiu(a2, r0, 6); // addiu a2, r0, 6 + c->sw(a2, 116, a0); // sw a2, 116(a0) + c->lwu(v1, 4, v1); // lwu v1, 4(v1) + c->lwu(v1, 156, v1); // lwu v1, 156(v1) + c->lwu(v1, 32, v1); // lwu v1, 32(v1) + c->sw(v1, 100, a0); // sw v1, 100(a0) + c->sw(s7, 88, a0); // sw s7, 88(a0) + c->sw(s7, 92, a0); // sw s7, 92(a0) + c->lui(v1, 2304); // lui v1, 2304 + c->ori(v1, v1, 17); // ori v1, v1, 17 + c->sw(v1, 96, a0); // sw v1, 96(a0) + c->daddiu(v1, s7, 4); // daddiu v1, s7, #t + c->sw(v1, 120, a0); // sw v1, 120(a0) + c->addiu(v1, r0, 1); // addiu v1, r0, 1 + c->sw(v1, 352, a0); // sw v1, 352(a0) + +block_26: + c->load_symbol2(a0, cache.collide_cache); // lw a0, *collide-cache*(s7) + c->lwu(v1, -4, a0); // lwu v1, -4(a0) + c->lwu(t9, 60, v1); // lwu t9, 60(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 + c->mov64(v1, v0); // or v1, v0, r0 + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L51 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_29;} // branch non-likely + + c->mov64(v0, s7); // or v0, s7, r0 + //beq r0, r0, L54 // beq r0, r0, L54 + // nop // sll r0, r0, 0 + goto block_34; // branch always + + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + +block_29: + bc = c->sgpr64(s7) == c->sgpr64(s5); // beq s7, s5, L53 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_33;} // branch non-likely + + c->lwu(v1, 0, s5); // lwu v1, 0(s5) + c->daddiu(a1, sp, 560); // daddiu a1, sp, 560 + c->mov64(a0, s6); // or a0, s6, r0 + bc = c->sgpr64(s7) == c->sgpr64(a0); // beq s7, a0, L52 + c->mov64(a2, s7); // or a2, s7, r0 + if (bc) {goto block_32;} // branch non-likely + + c->lwu(a2, 24, a0); // lwu a2, 24(a0) + +block_32: + c->sw(a2, 8, a1); // sw a2, 8(a1) + c->addiu(a0, r0, 1); // addiu a0, r0, 1 + c->sw(a0, 68, a1); // sw a0, 68(a1) + c->load_symbol_addr(a0, cache.edge_grabbed); // daddiu a0, s7, edge-grabbed + c->sw(a0, 64, a1); // sw a0, 64(a1) + c->sd(gp, 16, a1); // sd gp, 16(a1) + c->load_symbol2(t9, cache.send_event_function); // lw t9, send-event-function(s7) + c->lwu(a0, 136, v1); // lwu a0, 136(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 + c->mov64(v1, v0); // or v1, v0, r0 + +block_33: + c->daddiu(v0, s7, 4); // daddiu v0, s7, #t + +block_34: + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 688, sp); // lq gp, 688(sp) + c->lq(s5, 672, sp); // lq s5, 672(sp) + c->lq(s4, 656, sp); // lq s4, 656(sp) + c->lq(s3, 640, sp); // lq s3, 640(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 704); // daddiu sp, sp, 704 + 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.collide_cache = intern_from_c(-1, 0, "*collide-cache*").c(); + cache.collide_edge_work = intern_from_c(-1, 0, "*collide-edge-work*").c(); + cache.target = intern_from_c(-1, 0, "*target*").c(); + cache.edge_grabbed = intern_from_c(-1, 0, "edge-grabbed").c(); + cache.matrix = intern_from_c(-1, 0, "matrix").c(); + cache.send_event_function = intern_from_c(-1, 0, "send-event-function").c(); + cache.target_edge_grab_jump = intern_from_c(-1, 0, "target-edge-grab-jump").c(); + cache.vector_matrix = intern_from_c(-1, 0, "vector-matrix*!").c(); + cache.vector_normalize = intern_from_c(-1, 0, "vector-normalize!").c(); + gLinkedFunctionTable.reg("(method 9 edge-grab-info)", execute, 1024); +} + +} // namespace method_9_edge_grab_info +} // 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_17_collide_edge_work { +struct Cache { + void* format; // format +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + bool cop1_bc = false; + c->daddiu(sp, sp, -32); // daddiu sp, sp, -32 + 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(gp, 16, sp); // sq gp, 16(sp) + c->mov64(gp, a0); // or gp, a0, r0 + c->lui(v1, 16180); // lui v1, 16180 + c->ori(v1, v1, 65012); // ori v1, v1, 65012 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->lwu(v1, 392, gp); // lwu v1, 392(gp) + // nop // sll r0, r0, 0 + c->addiu(a0, r0, 896); // addiu a0, r0, 896 + c->lwu(t3, 0, gp); // lwu t3, 0(gp) + c->addiu(a1, r0, 0); // addiu a1, r0, 0 + c->daddiu(a2, gp, 6320); // daddiu a2, gp, 6320 + c->addiu(a3, r0, 256); // addiu a3, r0, 256 + c->lwu(t0, 0, t3); // lwu t0, 0(t3) + c->gprs[t1].du64[0] = 0; // or t1, r0, r0 + c->lq(t2, 96, gp); // lq t2, 96(gp) + c->daddiu(t3, t3, 4908); // daddiu t3, t3, 4908 + c->lq(t4, 112, gp); // lq t4, 112(gp) + +block_1: + bc = c->sgpr64(t0) == 0; // beq t0, r0, L35 + c->lwu(t5, 48, t3); // lwu t5, 48(t3) + if (bc) {goto block_14;} // branch non-likely + + c->daddiu(t0, t0, -1); // daddiu t0, t0, -1 + c->lqc2(vf1, 0, t3); // lqc2 vf1, 0(t3) + c->and_(t6, t5, a0); // and t6, t5, a0 + c->lqc2(vf2, 16, t3); // lqc2 vf2, 16(t3) + bc = c->sgpr64(t6) == c->sgpr64(a1); // beq t6, a1, L34 + c->lqc2(vf3, 32, t3); // lqc2 vf3, 32(t3) + if (bc) {goto block_5;} // branch non-likely + + if (((s64)c->sgpr64(t6)) != ((s64)c->sgpr64(a3))) {// bnel t6, a3, L33 + c->daddiu(t3, t3, 64); // daddiu t3, t3, 64 + goto block_1; + } + +block_5: + c->and_(t6, t5, v1); // and t6, t5, v1 + c->vmini(DEST::xyzw, vf7, vf1, vf2); // vmini.xyzw vf7, vf1, vf2 + bc = c->sgpr64(t6) != 0; // bne t6, r0, L33 + c->vmax(DEST::xyzw, vf8, vf1, vf2); // vmax.xyzw vf8, vf1, vf2 + if (bc) {goto block_1;} // branch non-likely + + c->vsub(DEST::xyz, vf4, vf2, vf1); // vsub.xyz vf4, vf2, vf1 + // nop // sll r0, r0, 0 + c->vsub(DEST::xyz, vf5, vf3, vf1); // vsub.xyz vf5, vf3, vf1 + // nop // sll r0, r0, 0 + c->vmini(DEST::xyzw, vf7, vf7, vf3); // vmini.xyzw vf7, vf7, vf3 + // nop // sll r0, r0, 0 + c->vmax(DEST::xyzw, vf8, vf8, vf3); // vmax.xyzw vf8, vf8, vf3 + // nop // sll r0, r0, 0 + c->vopmula(vf4, vf5); // vopmula.xyz acc, vf4, vf5 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf7, vf7); // vftoi0.xyzw vf7, vf7 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf8, vf8); // vftoi0.xyzw vf8, vf8 + // nop // sll r0, r0, 0 + c->vopmsub(vf6, vf5, vf4); // vopmsub.xyz vf6, vf5, vf4 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t7, vf7); // qmfc2.i t7, vf7 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t6, vf8); // qmfc2.i t6, vf8 + // nop // sll r0, r0, 0 + c->pcgtw(t7, t7, t4); // pcgtw t7, t7, t4 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->vmul(DEST::xyzw, vf9, vf6, vf6); // vmul.xyzw vf9, vf6, vf6 + // nop // sll r0, r0, 0 + c->pcgtw(t6, t2, t6); // pcgtw t6, t2, t6 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->por(t6, t7, t6); // por t6, t7, t6 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->ppach(t6, r0, t6); // ppach t6, r0, t6 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->dsll(t6, t6, 16); // dsll t6, t6, 16 + // nop // sll r0, r0, 0 + if (((s64)c->sgpr64(t6)) != ((s64)0)) { // bnel t6, r0, L33 + c->daddiu(t3, t3, 64); // daddiu t3, t3, 64 + goto block_1; + } + +// block_8: + c->vmula_bc(DEST::w, BC::x, vf0, vf9); // vmulax.w acc, vf0, vf9 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::w, BC::y, vf0, vf9); // vmadday.w acc, vf0, vf9 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::w, BC::z, vf9, vf0, vf9); // vmaddz.w vf9, vf0, vf9 + // nop // sll r0, r0, 0 + c->vrsqrt(vf0, BC::w, vf9, BC::w); // vrsqrt Q, vf0.w, vf9.w + // nop // sll r0, r0, 0 + c->dsll32(t5, t5, 8); // dsll32 t5, t5, 8 + c->dsrl32(t5, t5, 26); // dsrl32 t5, t5, 26 + c->addiu(t6, r0, 2); // addiu t6, r0, 2 + // nop // sll r0, r0, 0 + c->vwaitq(); // vwaitq + // nop // sll r0, r0, 0 + c->vmulq(DEST::xyz, vf6, vf6); // vmulq.xyz vf6, vf6, Q + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t7, vf6); // qmfc2.i t7, vf6 + // nop // sll r0, r0, 0 + c->dsra32(t7, t7, 0); // dsra32 t7, t7, 0 + // nop // sll r0, r0, 0 + c->mtc1(f1, t7); // mtc1 f1, t7 + // nop // sll r0, r0, 0 + cop1_bc = c->fprs[f1] < c->fprs[f0]; // c.lt.s f1, f0 + c->addiu(t7, r0, 48); // addiu t7, r0, 48 + if (cop1_bc) { // bc1tl L33 + c->daddiu(t3, t3, 64); // daddiu t3, t3, 64 + goto block_1; + } + +// block_10: + if (((s64)c->sgpr64(t5)) == ((s64)c->sgpr64(t6))) {// beql t5, t6, L33 + c->daddiu(t3, t3, 64); // daddiu t3, t3, 64 + goto block_1; + } + +// block_12: + bc = c->sgpr64(t1) == c->sgpr64(t7); // beq t1, t7, L36 + // nop // sll r0, r0, 0 + if (bc) {goto block_15;} // branch non-likely + + c->daddiu(t1, t1, 1); // daddiu t1, t1, 1 + c->sw(t3, 0, a2); // sw t3, 0(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf6, 16, a2); // sqc2 vf6, 16(a2) + c->daddiu(a2, a2, 32); // daddiu a2, a2, 32 + // nop // sll r0, r0, 0 + //beq r0, r0, L33 // beq r0, r0, L33 + c->daddiu(t3, t3, 64); // daddiu t3, t3, 64 + goto block_1; // branch always + + +block_14: + //beq r0, r0, L37 // beq r0, r0, L37 + c->sw(t1, 16, gp); // sw t1, 16(gp) + goto block_16; // branch always + + +block_15: + c->load_symbol2(t9, cache.format); // lw t9, format(s7) + c->addiu(a0, r0, 0); // addiu a0, r0, 0 + // daddiu a1, fp, L119 // daddiu a1, fp, L119 + 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 + printf("ERROR: Exceeded max # of grabbable tris!\n"); + c->addiu(v1, r0, 48); // addiu v1, r0, 48 + c->sw(v1, 16, gp); // sw v1, 16(gp) + +block_16: + 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, 16, sp); // lq gp, 16(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 32); // daddiu sp, sp, 32 + 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.format = intern_from_c(-1, 0, "format").c(); + gLinkedFunctionTable.reg("(method 17 collide-edge-work)", execute, 512); +} + +} // namespace method_17_collide_edge_work +} // 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_collide_edge_work { +struct Cache { + void* format; // format +} cache; + +void sub_l20_b15(ExecutionContext* c) { + bool bc = false; + bool cop1_bc = false; +// block_15: + c->mov64(t4, t1); // or t4, t1, r0 + c->lwu(t3, 12, a0); // lwu t3, 12(a0) + c->dsll32(t4, t4, 0); // dsll32 t4, t4, 0 + c->gprs[t5].du64[0] = 0; // or t5, r0, r0 + c->or_(t6, t4, t2); // or t6, t4, t2 + c->daddiu(t4, a0, 1712); // daddiu t4, a0, 1712 + +block_16: + bc = c->sgpr64(t5) == c->sgpr64(t3); // beq t5, t3, L22 + c->ld(t7, 8, t4); // ld t7, 8(t4) + if (bc) {goto block_20;} // branch non-likely + + c->daddiu(t5, t5, 1); // daddiu t5, t5, 1 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + if (((s64)c->sgpr64(t6)) != ((s64)c->sgpr64(t7))) {// bnel t6, t7, L21 + c->daddiu(t4, t4, 48); // daddiu t4, t4, 48 + goto block_16; + } + +// block_19: + //beq r0, r0, L24 // beq r0, r0, L24 + c->sw(r0, 0, t4); // sw r0, 0(t4) + goto block_26; // branch always + + +block_20: + c->addiu(t5, r0, 96); // addiu t5, r0, 96 + // nop // sll r0, r0, 0 + if (((s64)c->sgpr64(t3)) == ((s64)c->sgpr64(t5))) {// beql t3, t5, L24 + c->mov64(t4, s7); // or t4, s7, r0 + goto block_26; + } + +// block_22: + c->daddiu(t3, t3, 1); // daddiu t3, t3, 1 + c->sw(s7, 0, t4); // sw s7, 0(t4) + // nop // sll r0, r0, 0 + c->sw(t1, 8, t4); // sw t1, 8(t4) + // nop // sll r0, r0, 0 + c->sw(t2, 12, t4); // sw t2, 12(t4) + // nop // sll r0, r0, 0 + c->sw(a1, 4, t4); // sw a1, 4(t4) + // nop // sll r0, r0, 0 + c->sw(t3, 12, a0); // sw t3, 12(a0) + c->vmove(DEST::xyzw, vf13, vf0); // vmove.xyzw vf13, vf0 + c->lqc2(vf16, 0, t1); // lqc2 vf16, 0(t1) + // nop // sll r0, r0, 0 + c->lqc2(vf17, 0, t2); // lqc2 vf17, 0(t2) + c->vsub(DEST::xyzw, vf18, vf17, vf16); // vsub.xyzw vf18, vf17, vf16 + // nop // sll r0, r0, 0 + c->vsub(DEST::xyzw, vf19, vf1, vf16); // vsub.xyzw vf19, vf1, vf16 + // nop // sll r0, r0, 0 + c->vmul(DEST::xyzw, vf20, vf18, vf18); // vmul.xyzw vf20, vf18, vf18 + // nop // sll r0, r0, 0 + c->vsub_bc(DEST::x, BC::z, vf13, vf0, vf18); // vsubz.x vf13, vf0, vf18 + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::x, BC::y, vf20, vf20, vf20); // vaddy.x vf20, vf20, vf20 + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::z, BC::x, vf13, vf0, vf18); // vaddx.z vf13, vf0, vf18 + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::x, BC::z, vf20, vf20, vf20); // vaddz.x vf20, vf20, vf20 + // nop // sll r0, r0, 0 + c->vmul(DEST::xyzw, vf15, vf13, vf19); // vmul.xyzw vf15, vf13, vf19 + // nop // sll r0, r0, 0 + c->vmul(DEST::xyzw, vf14, vf13, vf13); // vmul.xyzw vf14, vf13, vf13 + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::x, BC::z, vf15, vf15, vf15); // vaddz.x vf15, vf15, vf15 + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::x, BC::z, vf14, vf14, vf14); // vaddz.x vf14, vf14, vf14 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t2, vf15); // qmfc2.i t2, vf15 + // nop // sll r0, r0, 0 + c->vrsqrt(vf0, BC::w, vf14, BC::x); // vrsqrt Q, vf0.w, vf14.x + // nop // sll r0, r0, 0 + c->mtc1(f3, t2); // mtc1 f3, t2 + // nop // sll r0, r0, 0 + cop1_bc = c->fprs[f4] < c->fprs[f2]; // c.lt.s f4, f2 + // nop // sll r0, r0, 0 + bc = cop1_bc; // bc1t L23 + // nop // sll r0, r0, 0 + if (bc) {goto block_25;} // branch non-likely + + cop1_bc = c->fprs[f3] < c->fprs[f4]; // c.lt.s f3, f4 + // nop // sll r0, r0, 0 + if (cop1_bc) { // bc1tl L24 + c->sw(r0, 0, t4); // sw r0, 0(t4) + goto block_26; + } + +block_25: + c->vwaitq(); // vwaitq + // nop // sll r0, r0, 0 + c->vmulq(DEST::xyz, vf13, vf13); // vmulq.xyz vf13, vf13, Q + // nop // sll r0, r0, 0 + // nop // vnop + // nop // sll r0, r0, 0 + // nop // vnop + // nop // sll r0, r0, 0 + c->vrsqrt(vf0, BC::w, vf20, BC::x); // vrsqrt Q, vf0.w, vf20.x + // nop // sll r0, r0, 0 + c->vmul_bc(DEST::w, BC::w, vf18, vf0, vf0); // vmulw.w vf18, vf0, vf0 + c->sqc2(vf13, 16, t4); // sqc2 vf13, 16(t4) + c->vwaitq(); // vwaitq + // nop // sll r0, r0, 0 + c->vmulq(DEST::xyz, vf18, vf18); // vmulq.xyz vf18, vf18, Q + // nop // sll r0, r0, 0 + // nop // vnop + // nop // sll r0, r0, 0 + // nop // vnop + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->sqc2(vf18, 32, t4); // sqc2 vf18, 32(t4) + +block_26: + ; + //jr ra // jr ra + // nop // sll r0, r0, 0 + // goto end_of_function; // return +} + +void sub_l25_b27(ExecutionContext* c) { + bool bc = false; + bool cop1_bc = false; + c->gprs[t2].du64[0] = 0; // or t2, r0, r0 + c->lwu(t1, 8, a0); // lwu t1, 8(a0) + c->daddiu(t0, a0, 688); // daddiu t0, a0, 688 + // nop // sll r0, r0, 0 + +block_28: + bc = c->sgpr64(t2) == c->sgpr64(t1); // beq t2, t1, L27 + c->lqc2(vf9, 0, t0); // lqc2 vf9, 0(t0) + if (bc) {goto block_37;} // branch non-likely + + c->daddiu(t2, t2, 1); // daddiu t2, t2, 1 + c->lqc2(vf10, 16, t0); // lqc2 vf10, 16(t0) + c->vsub(DEST::xyzw, vf9, vf9, vf8); // vsub.xyzw vf9, vf9, vf8 + c->lqc2(vf11, 32, t0); // lqc2 vf11, 32(t0) + c->vsub(DEST::xyzw, vf10, vf10, vf8); // vsub.xyzw vf10, vf10, vf8 + c->lqc2(vf12, 48, t0); // lqc2 vf12, 48(t0) + c->vsub(DEST::xyzw, vf11, vf11, vf8); // vsub.xyzw vf11, vf11, vf8 + // nop // sll r0, r0, 0 + c->vsub(DEST::xyzw, vf12, vf12, vf8); // vsub.xyzw vf12, vf12, vf8 + // nop // sll r0, r0, 0 + c->vmul(DEST::xyzw, vf9, vf9, vf9); // vmul.xyzw vf9, vf9, vf9 + // nop // sll r0, r0, 0 + c->vmul(DEST::xyzw, vf10, vf10, vf10); // vmul.xyzw vf10, vf10, vf10 + // nop // sll r0, r0, 0 + c->vmul(DEST::xyzw, vf11, vf11, vf11); // vmul.xyzw vf11, vf11, vf11 + // nop // sll r0, r0, 0 + c->vmul(DEST::xyzw, vf12, vf12, vf12); // vmul.xyzw vf12, vf12, vf12 + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::x, BC::y, vf9, vf9, vf9); // vaddy.x vf9, vf9, vf9 + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::x, BC::y, vf10, vf10, vf10); // vaddy.x vf10, vf10, vf10 + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::x, BC::y, vf11, vf11, vf11); // vaddy.x vf11, vf11, vf11 + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::x, BC::y, vf12, vf12, vf12); // vaddy.x vf12, vf12, vf12 + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::x, BC::z, vf9, vf9, vf9); // vaddz.x vf9, vf9, vf9 + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::x, BC::z, vf10, vf10, vf10); // vaddz.x vf10, vf10, vf10 + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::x, BC::z, vf11, vf11, vf11); // vaddz.x vf11, vf11, vf11 + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::x, BC::z, vf12, vf12, vf12); // vaddz.x vf12, vf12, vf12 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t3, vf9); // qmfc2.i t3, vf9 + // nop // sll r0, r0, 0 + c->mtc1(f1, t3); // mtc1 f1, t3 + // nop // sll r0, r0, 0 + cop1_bc = c->fprs[f1] <= c->fprs[f0]; // c.le.s f1, f0 + // nop // sll r0, r0, 0 + bc = cop1_bc; // bc1t L28 + // nop // sll r0, r0, 0 + if (bc) {goto block_40;} // branch non-likely + + bc = c->sgpr64(t2) == c->sgpr64(t1); // beq t2, t1, L27 + c->daddiu(t0, t0, 16); // daddiu t0, t0, 16 + if (bc) {goto block_37;} // branch non-likely + + c->mov128_gpr_vf(t3, vf10); // qmfc2.i t3, vf10 + c->daddiu(t2, t2, 1); // daddiu t2, t2, 1 + c->mtc1(f1, t3); // mtc1 f1, t3 + // nop // sll r0, r0, 0 + cop1_bc = c->fprs[f1] <= c->fprs[f0]; // c.le.s f1, f0 + // nop // sll r0, r0, 0 + bc = cop1_bc; // bc1t L28 + // nop // sll r0, r0, 0 + if (bc) {goto block_40;} // branch non-likely + + bc = c->sgpr64(t2) == c->sgpr64(t1); // beq t2, t1, L27 + c->daddiu(t0, t0, 16); // daddiu t0, t0, 16 + if (bc) {goto block_37;} // branch non-likely + + c->mov128_gpr_vf(t3, vf11); // qmfc2.i t3, vf11 + c->daddiu(t2, t2, 1); // daddiu t2, t2, 1 + c->mtc1(f1, t3); // mtc1 f1, t3 + // nop // sll r0, r0, 0 + cop1_bc = c->fprs[f1] <= c->fprs[f0]; // c.le.s f1, f0 + // nop // sll r0, r0, 0 + bc = cop1_bc; // bc1t L28 + // nop // sll r0, r0, 0 + if (bc) {goto block_40;} // branch non-likely + + bc = c->sgpr64(t2) == c->sgpr64(t1); // beq t2, t1, L27 + c->daddiu(t0, t0, 16); // daddiu t0, t0, 16 + if (bc) {goto block_37;} // branch non-likely + + c->mov128_gpr_vf(t3, vf12); // qmfc2.i t3, vf12 + c->daddiu(t2, t2, 1); // daddiu t2, t2, 1 + c->mtc1(f1, t3); // mtc1 f1, t3 + // nop // sll r0, r0, 0 + cop1_bc = c->fprs[f1] <= c->fprs[f0]; // c.le.s f1, f0 + // nop // sll r0, r0, 0 + bc = cop1_bc; // bc1t L28 + // nop // sll r0, r0, 0 + if (bc) {goto block_40;} // branch non-likely + + //beq r0, r0, L26 // beq r0, r0, L26 + c->daddiu(t0, t0, 16); // daddiu t0, t0, 16 + goto block_28; // branch always + + +block_37: + c->addiu(t2, r0, 64); // addiu t2, r0, 64 + // nop // sll r0, r0, 0 + if (((s64)c->sgpr64(t2)) == ((s64)c->sgpr64(t1))) {// beql t2, t1, L28 + c->mov64(t0, s7); // or t0, s7, r0 + goto block_40; + } + +// block_39: + c->daddiu(t1, t1, 1); // daddiu t1, t1, 1 + c->sqc2(vf8, 0, t0); // sqc2 vf8, 0(t0) + // nop // sll r0, r0, 0 + c->sw(t1, 8, a0); // sw t1, 8(a0) + +block_40: + ; + //jr ra // jr ra + // nop // sll r0, r0, 0 + // goto end_of_function; // return +} + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + // bool cop1_bc = false; + c->daddiu(sp, sp, -16); // daddiu sp, sp, -16 + 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->lui(v1, 17617); // lui v1, 17617 + c->ori(v1, v1, 46871); // ori v1, v1, 46871 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->lwc1(f4, 404, a0); // lwc1 f4, 404(a0) + // nop // sll r0, r0, 0 + c->mtc1(f2, r0); // mtc1 f2, r0 + c->lwu(a1, 4, a0); // lwu a1, 4(a0) + // nop // sll r0, r0, 0 + c->lwu(v1, 16, a0); // lwu v1, 16(a0) + // nop // sll r0, r0, 0 + c->lqc2(vf1, 12, a1); // lqc2 vf1, 12(a1) + c->daddiu(a1, a0, 6320); // daddiu a1, a0, 6320 + c->lqc2(vf6, 64, a0); // lqc2 vf6, 64(a0) + // nop // sll r0, r0, 0 + c->lqc2(vf7, 80, a0); // lqc2 vf7, 80(a0) + c->vmove(DEST::xyzw, vf2, vf1); // vmove.xyzw vf2, vf1 + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::y, BC::y, vf1, vf0, vf6); // vaddy.y vf1, vf0, vf6 + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::y, BC::y, vf2, vf0, vf7); // vaddy.y vf2, vf0, vf7 + // nop // sll r0, r0, 0 + +block_1: + bc = c->sgpr64(v1) == 0; // beq v1, r0, L31 + c->lwu(t0, 0, a1); // lwu t0, 0(a1) + if (bc) {goto block_43;} // branch non-likely + + c->daddiu(v1, v1, -1); // daddiu v1, v1, -1 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->lqc2(vf3, 0, t0); // lqc2 vf3, 0(t0) + // nop // sll r0, r0, 0 + c->lqc2(vf4, 16, t0); // lqc2 vf4, 16(t0) + // nop // sll r0, r0, 0 + c->lqc2(vf5, 32, t0); // lqc2 vf5, 32(t0) + // Unknown instr: bgezal r0, L25 + c->vmove(DEST::xyzw, vf8, vf3); // vmove.xyzw vf8, vf3 + // if (bc) {goto block_27;} // branch non-likely + sub_l25_b27(c); + + bc = c->sgpr64(t0) == c->sgpr64(s7); // beq t0, s7, L29 + c->mov64(a2, t0); // or a2, t0, r0 + if (bc) {goto block_41;} // branch non-likely + + // Unknown instr: bgezal r0, L25 + c->vmove(DEST::xyzw, vf8, vf4); // vmove.xyzw vf8, vf4 + // if (bc) {goto block_27;} // branch non-likely + sub_l25_b27(c); + + bc = c->sgpr64(t0) == c->sgpr64(s7); // beq t0, s7, L29 + c->mov64(a3, t0); // or a3, t0, r0 + if (bc) {goto block_41;} // branch non-likely + + // Unknown instr: bgezal r0, L25 + c->vmove(DEST::xyzw, vf8, vf5); // vmove.xyzw vf8, vf5 + // if (bc) {goto block_27;} // branch non-likely + sub_l25_b27(c); + + bc = c->sgpr64(t0) == c->sgpr64(s7); // beq t0, s7, L29 + c->mov64(t0, t0); // or t0, t0, r0 + if (bc) {goto block_41;} // branch non-likely + + c->mov64(t1, a2); // or t1, a2, r0 + // nop // sll r0, r0, 0 + // Unknown instr: bgezal r0, L20 + c->mov64(t2, a3); // or t2, a3, r0 + // if (bc) {goto block_15;} // branch non-likely + sub_l20_b15(c); + + bc = c->sgpr64(t4) == c->sgpr64(s7); // beq t4, s7, L30 + c->mov64(t1, a3); // or t1, a3, r0 + if (bc) {goto block_42;} // branch non-likely + + // Unknown instr: bgezal r0, L20 + c->mov64(t2, t0); // or t2, t0, r0 + // if (bc) {goto block_15;} // branch non-likely + sub_l20_b15(c); + + bc = c->sgpr64(t4) == c->sgpr64(s7); // beq t4, s7, L30 + c->mov64(t1, t0); // or t1, t0, r0 + if (bc) {goto block_42;} // branch non-likely + + // Unknown instr: bgezal r0, L20 + c->mov64(t2, a2); // or t2, a2, r0 + // if (bc) {goto block_15;} // branch non-likely + sub_l20_b15(c); + + bc = c->sgpr64(t1) == c->sgpr64(s7); // beq t1, s7, L30 + // nop // sll r0, r0, 0 + if (bc) {goto block_42;} // branch non-likely + + //beq r0, r0, L19 // beq r0, r0, L19 + c->daddiu(a1, a1, 32); // daddiu a1, a1, 32 + goto block_1; // branch always + +block_41: + c->load_symbol2(t9, cache.format); // lw t9, format(s7) + c->addiu(a0, r0, 0); // addiu a0, r0, 0 + // daddiu a1, fp, L118 // daddiu a1, fp, L118 + 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 + printf("ERROR: Too many edge verts found in edge grab!\n"); + //beq r0, r0, L31 // beq r0, r0, L31 + // nop // sll r0, r0, 0 + goto block_43; // branch always + + +block_42: + c->load_symbol2(t9, cache.format); // lw t9, format(s7) + c->addiu(a0, r0, 0); // addiu a0, r0, 0 + // daddiu a1, fp, L117 // daddiu a1, fp, L117 + 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 + printf("ERROR: Too many edges found in edge grab!\n"); + +block_43: + 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) + //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 + // nop // sll r0, r0, 0 +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + cache.format = intern_from_c(-1, 0, "format").c(); + gLinkedFunctionTable.reg("(method 16 collide-edge-work)", execute, 512); +} + +} // namespace method_16_collide_edge_work +} // 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_18_collide_edge_work { +struct Cache { + void* vector_vector_distance; // vector-vector-distance +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + bool cop1_bc = false; + float acc; + c->daddiu(sp, sp, -96); // daddiu sp, sp, -96 + 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->swc1(f30, 80, sp); // swc1 f30, 80(sp) + c->mov64(gp, a0); // or gp, a0, r0 + c->mov64(s5, a1); // or s5, a1, r0 + // nop // sll r0, r0, 0 + c->lqc2(vf1, 16, s5); // lqc2 vf1, 16(s5) + // nop // sll r0, r0, 0 + c->lq(a0, 96, gp); // lq a0, 96(gp) + // nop // sll r0, r0, 0 + c->lq(a3, 112, gp); // lq a3, 112(gp) + c->vftoi0(DEST::xyzw, vf2, vf1); // vftoi0.xyzw vf2, vf1 + c->lwu(v1, 4, gp); // lwu v1, 4(gp) + c->mov128_gpr_vf(a1, vf2); // qmfc2.i a1, vf2 + c->lqc2(vf3, 16, a2); // lqc2 vf3, 16(a2) + c->pcgtw(a3, a1, a3); // pcgtw a3, a1, a3 + c->lqc2(vf4, 368, gp); // lqc2 vf4, 368(gp) + c->pcgtw(a0, a0, a1); // pcgtw a0, a0, a1 + c->lqc2(vf5, 12, v1); // lqc2 vf5, 12(v1) + c->por(v1, a3, a0); // por v1, a3, a0 + c->lwc1(f0, 396, gp); // lwc1 f0, 396(gp) + c->ppach(v1, r0, v1); // ppach v1, r0, v1 + c->lwc1(f1, 400, gp); // lwc1 f1, 400(gp) + c->dsll(v1, v1, 16); // dsll v1, v1, 16 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L10 + c->lqc2(vf6, 144, gp); // lqc2 vf6, 144(gp) + if (bc) {goto block_24;} // branch non-likely + + c->vmul_bc(DEST::xyzw, BC::x, vf10, vf3, vf4); // vmulx.xyzw vf10, vf3, vf4 + c->lqc2(vf11, 128, gp); // lqc2 vf11, 128(gp) + c->vadd(DEST::xyzw, vf10, vf10, vf1); // vadd.xyzw vf10, vf10, vf1 + c->vsub(DEST::xyzw, vf7, vf5, vf10); // vsub.xyzw vf7, vf5, vf10 + c->vmul(DEST::xyzw, vf7, vf7, vf7); // vmul.xyzw vf7, vf7, vf7 + c->vadd_bc(DEST::x, BC::z, vf7, vf7, vf7); // vaddz.x vf7, vf7, vf7 + c->mov128_gpr_vf(v1, vf7); // qmfc2.i v1, vf7 + c->mtc1(f2, v1); // mtc1 f2, v1 + cop1_bc = c->fprs[f0] < c->fprs[f2]; // c.lt.s f0, f2 + bc = cop1_bc; // bc1t L10 + // nop // sll r0, r0, 0 + if (bc) {goto block_24;} // branch non-likely + + c->vsub(DEST::xyzw, vf8, vf1, vf5); // vsub.xyzw vf8, vf1, vf5 + c->vmul(DEST::xyzw, vf7, vf8, vf8); // vmul.xyzw vf7, vf8, vf8 + c->vadd_bc(DEST::x, BC::z, vf7, vf7, vf7); // vaddz.x vf7, vf7, vf7 + c->vrsqrt(vf0, BC::w, vf7, BC::x); // vrsqrt Q, vf0.w, vf7.x + // nop // sll r0, r0, 0 + c->vwaitq(); // vwaitq + // nop // sll r0, r0, 0 + c->vmulq(DEST::xz, vf8, vf8); // vmulq.xz vf8, vf8, Q + c->vmul(DEST::xyzw, vf9, vf8, vf6); // vmul.xyzw vf9, vf8, vf6 + c->vadd_bc(DEST::x, BC::z, vf9, vf9, vf9); // vaddz.x vf9, vf9, vf9 + c->mov128_gpr_vf(v1, vf9); // qmfc2.i v1, vf9 + c->mtc1(f3, v1); // mtc1 f3, v1 + cop1_bc = c->fprs[f3] < c->fprs[f1]; // c.lt.s f3, f1 + bc = cop1_bc; // bc1t L10 + // nop // sll r0, r0, 0 + if (bc) {goto block_24;} // branch non-likely + + c->vsub(DEST::xyzw, vf7, vf11, vf1); // vsub.xyzw vf7, vf11, vf1 + c->sqc2(vf1, 16, s5); // sqc2 vf1, 16(s5) + c->vmul(DEST::xyzw, vf7, vf7, vf7); // vmul.xyzw vf7, vf7, vf7 + c->sb(r0, 8, s5); // sb r0, 8(s5) + c->sqc2(vf10, 32, s5); // sqc2 vf10, 32(s5) + c->vadd_bc(DEST::x, BC::z, vf7, vf7, vf7); // vaddz.x vf7, vf7, vf7 + c->sw(a2, 12, s5); // sw a2, 12(s5) + c->mov128_gpr_vf(v1, vf7); // qmfc2.i v1, vf7 + c->sw(v1, 4, s5); // sw v1, 4(s5) + c->ld(v1, 384, gp); // ld v1, 384(gp) + c->andi(v1, v1, 2); // andi v1, v1, 2 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L8 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_20;} // branch non-likely + + c->lwu(s3, 12, s5); // lwu s3, 12(s5) + c->lwu(s4, 408, gp); // lwu s4, 408(gp) + c->lui(v1, 16256); // lui v1, 16256 + c->mtc1(f30, v1); // mtc1 f30, v1 + c->load_symbol2(t9, cache.vector_vector_distance);// lw t9, vector-vector-distance(s7) + c->lwu(v1, 8, s3); // lwu v1, 8(s3) + c->daddu(a0, r0, v1); // daddu a0, r0, v1 + c->daddu(a1, r0, s4); // daddu a1, r0, s4 + 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 + cop1_bc = c->fprs[f0] < c->fprs[f30]; // c.lt.s f0, f30 + bc = cop1_bc; // bc1t L4 + c->daddiu(v1, s7, 4); // daddiu v1, s7, 4 + if (bc) {goto block_6;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + +block_6: + if (((s64)c->sgpr64(s7)) != ((s64)c->sgpr64(v1))) {// bnel s7, v1, L7 + c->mov64(v1, v1); // or v1, v1, r0 + goto block_18; + } + +// block_8: + c->load_symbol2(t9, cache.vector_vector_distance);// lw t9, vector-vector-distance(s7) + c->lwu(v1, 12, s3); // lwu v1, 12(s3) + c->daddu(a0, r0, v1); // daddu a0, r0, v1 + c->daddu(a1, r0, s4); // daddu a1, r0, s4 + 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 + cop1_bc = c->fprs[f0] < c->fprs[f30]; // c.lt.s f0, f30 + bc = cop1_bc; // bc1t L5 + c->daddiu(v1, s7, 4); // daddiu v1, s7, 4 + if (bc) {goto block_10;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + +block_10: + if (((s64)c->sgpr64(s7)) != ((s64)c->sgpr64(v1))) {// bnel s7, v1, L7 + c->mov64(v1, v1); // or v1, v1, r0 + goto block_18; + } + +// block_12: + c->load_symbol2(t9, cache.vector_vector_distance);// lw t9, vector-vector-distance(s7) + c->lwu(v1, 8, s3); // lwu v1, 8(s3) + c->daddu(a0, r0, v1); // daddu a0, r0, v1 + c->daddiu(a1, s4, 16); // daddiu a1, s4, 16 + 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 + cop1_bc = c->fprs[f0] < c->fprs[f30]; // c.lt.s f0, f30 + bc = cop1_bc; // bc1t L6 + c->daddiu(v1, s7, 4); // daddiu v1, s7, 4 + if (bc) {goto block_14;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + +block_14: + if (((s64)c->sgpr64(s7)) != ((s64)c->sgpr64(v1))) {// bnel s7, v1, L7 + c->mov64(v1, v1); // or v1, v1, r0 + goto block_18; + } + +// block_16: + c->load_symbol2(t9, cache.vector_vector_distance);// lw t9, vector-vector-distance(s7) + c->lwu(v1, 12, s3); // lwu v1, 12(s3) + c->daddu(a0, r0, v1); // daddu a0, r0, v1 + c->daddiu(a1, s4, 16); // daddiu a1, s4, 16 + 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 + cop1_bc = c->fprs[f0] < c->fprs[f30]; // c.lt.s f0, f30 + bc = cop1_bc; // bc1t L7 + c->daddiu(v1, s7, 4); // daddiu v1, s7, 4 + if (bc) {goto block_18;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + +block_18: + bc = c->sgpr64(s7) != c->sgpr64(v1); // bne s7, v1, L8 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_20;} // branch non-likely + + //beq r0, r0, L10 // beq r0, r0, L10 + // nop // sll r0, r0, 0 + goto block_24; // branch always + + +block_20: + c->ld(v1, 384, gp); // ld v1, 384(gp) + c->andi(v1, v1, 4); // andi v1, v1, 4 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L9 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_23;} // branch non-likely + + c->lwu(v1, 12, s5); // lwu v1, 12(s5) + c->daddiu(a0, v1, 16); // daddiu a0, v1, 16 + c->daddiu(v1, gp, 144); // daddiu v1, gp, 144 + c->lwc1(f0, 0, a0); // lwc1 f0, 0(a0) + c->lwc1(f1, 4, a0); // lwc1 f1, 4(a0) + c->lwc1(f2, 8, a0); // lwc1 f2, 8(a0) + c->lwc1(f3, 0, v1); // lwc1 f3, 0(v1) + c->lwc1(f4, 4, v1); // lwc1 f4, 4(v1) + c->lwc1(f5, 8, v1); // lwc1 f5, 8(v1) + // Unknown instr: mula.s f0, f3 + acc = c->fprs[f0] * c->fprs[f3]; + // Unknown instr: madda.s f1, f4 + acc += c->fprs[f1] * c->fprs[f4]; + // Unknown instr: madd.s f0, f2, f5 + c->fprs[f0] = acc + c->fprs[f2] * c->fprs[f5]; + c->mfc1(v1, f0); // mfc1 v1, f0 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->abss(f0, f0); // abs.s f0, f0 + c->lui(v1, 16179); // lui v1, 16179 + c->ori(v1, v1, 13107); // ori v1, v1, 13107 + c->mtc1(f1, v1); // mtc1 f1, v1 + cop1_bc = c->fprs[f1] < c->fprs[f0]; // c.lt.s f1, f0 + bc = !cop1_bc; // bc1f L9 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_23;} // branch non-likely + + //beq r0, r0, L10 // beq r0, r0, L10 + // nop // sll r0, r0, 0 + goto block_24; // branch always + + +block_23: + c->daddiu(v1, s7, 4); // daddiu v1, s7, #t + c->mov64(v0, v1); // or v0, v1, r0 + //beq r0, r0, L11 // beq r0, r0, L11 + // nop // sll r0, r0, 0 + goto block_26; // branch always + + +block_24: + c->mov64(v0, s7); // or v0, s7, r0 + //beq r0, r0, L11 // beq r0, r0, L11 + // nop // sll r0, r0, 0 + goto block_26; // branch always + + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + +block_26: + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lwc1(f30, 80, sp); // lwc1 f30, 80(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, 96); // daddiu sp, sp, 96 + 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.vector_vector_distance = intern_from_c(-1, 0, "vector-vector-distance").c(); + gLinkedFunctionTable.reg("(method 18 collide-edge-work)", execute, 256); +} + +} // namespace method_18_collide_edge_work +} // namespace Mips2C \ No newline at end of file diff --git a/game/mips2c/jak3_functions/collide_func.cpp b/game/mips2c/jak3_functions/collide_func.cpp index 11f94fa0a6..e8a3075997 100644 --- a/game/mips2c/jak3_functions/collide_func.cpp +++ b/game/mips2c/jak3_functions/collide_func.cpp @@ -241,7 +241,6 @@ void link() { } // namespace Mips2C // add moving_sphere_triangle_intersect::link to the link callback table for the object file. // FWD DEC: -namespace moving_sphere_triangle_intersect { extern void link(); } //--------------------------MIPS2C--------------------- // clang-format off @@ -503,4 +502,3 @@ void link() { } // namespace Mips2C // add collide_do_primitives::link to the link callback table for the object file. // FWD DEC: -namespace collide_do_primitives { extern void link(); } \ No newline at end of file diff --git a/game/mips2c/jak3_functions/collide_hash.cpp b/game/mips2c/jak3_functions/collide_hash.cpp new file mode 100644 index 0000000000..f2cbdde9a9 --- /dev/null +++ b/game/mips2c/jak3_functions/collide_hash.cpp @@ -0,0 +1,1541 @@ +//--------------------------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_11_collide_hash { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* +} 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->addiu(v1, r0, 0); // addiu v1, r0, 0 + //beq r0, r0, L91 // beq r0, r0, L91 + // nop // sll r0, r0, 0 + goto block_2; // branch always + + +block_1: + c->dsll(a1, v1, 4); // dsll a1, v1, 4 + get_fake_spad_addr2(t0, cache.fake_scratchpad_data, 0, c);// lui t0, 28672 + c->daddu(a1, a1, t0); // daddu a1, a1, t0 + c->sq(r0, 0, a1); // sq r0, 0(a1) + c->daddiu(v1, v1, 1); // daddiu v1, v1, 1 + +block_2: + c->lwu(a1, 8, a0); // lwu a1, 8(a0) + c->slt(a1, v1, a1); // slt a1, v1, a1 + bc = c->sgpr64(a1) != 0; // bne a1, r0, L90 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + c->mov64(v1, s7); // or v1, s7, r0 + // nop // sll r0, r0, 0 + c->lw(v1, 72, a0); // lw v1, 72(a0) + // nop // sll r0, r0, 0 + c->lqc2(vf1, 28, a0); // lqc2 vf1, 28(a0) + c->lui(a1, 1); // lui a1, 1 + c->lqc2(vf2, 128, a3); // lqc2 vf2, 128(a3) + c->ori(a1, a1, 257); // ori a1, a1, 257 + c->lqc2(vf3, 144, a3); // lqc2 vf3, 144(a3) + c->dsubu(v1, v1, a1); // dsubu v1, v1, a1 + c->lqc2(vf4, 44, a0); // lqc2 vf4, 44(a0) + c->vsub(DEST::xyzw, vf2, vf2, vf1); // vsub.xyzw vf2, vf2, vf1 + c->lq(a1, 160, a3); // lq a1, 160(a3) + c->vsub(DEST::xyzw, vf3, vf3, vf1); // vsub.xyzw vf3, vf3, vf1 + c->lq(t0, 176, a3); // lq t0, 176(a3) + c->pextlb(v1, r0, v1); // pextlb v1, r0, v1 + c->lq(t1, 60, a0); // lq t1, 60(a0) + c->pextlh(v1, r0, v1); // pextlh v1, r0, v1 + c->lq(t2, 76, a0); // lq t2, 76(a0) + c->pcgtw(t0, t1, t0); // pcgtw t0, t1, t0 + c->vmul(DEST::xyzw, vf2, vf2, vf4); // vmul.xyzw vf2, vf2, vf4 + c->pcgtw(a1, a1, t2); // pcgtw a1, a1, t2 + c->vmul(DEST::xyzw, vf3, vf3, vf4); // vmul.xyzw vf3, vf3, vf4 + c->por(a1, t0, a1); // por a1, t0, a1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->ppach(a1, r0, a1); // ppach a1, r0, a1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->dsll(a1, a1, 16); // dsll a1, a1, 16 + c->vftoi0(DEST::xyzw, vf2, vf2); // vftoi0.xyzw vf2, vf2 + bc = c->sgpr64(a1) != 0; // bne a1, r0, L98 + c->vftoi0(DEST::xyzw, vf3, vf3); // vftoi0.xyzw vf3, vf3 + if (bc) {goto block_16;} // branch non-likely + + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t0, vf2); // qmfc2.i t0, vf2 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(a1, vf3); // qmfc2.i a1, vf3 + c->pmaxw(t0, t0, r0); // pmaxw t0, t0, r0 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pmaxw(a1, a1, r0); // pmaxw a1, a1, r0 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pminw(t0, t0, v1); // pminw t0, t0, v1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pminw(v1, a1, v1); // pminw v1, a1, v1 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->sq(t0, 400, a3); // sq t0, 400(a3) + // nop // sll r0, r0, 0 + c->sq(v1, 416, a3); // sq v1, 416(a3) + c->addiu(v1, r0, 4); // addiu v1, r0, 4 + c->lbu(a1, 72, a0); // lbu a1, 72(a0) + c->multu3(a1, a1, v1); // multu3 a1, a1, v1 + c->lbu(t0, 74, a0); // lbu t0, 74(a0) + c->multu3(t0, t0, a1); // multu3 t0, t0, a1 + c->addiu(t1, r0, 1); // addiu t1, r0, 1 + c->lw(t2, 400, a3); // lw t2, 400(a3) + c->dsubu(t1, t1, t2); // dsubu t1, t1, t2 + c->lw(t2, 416, a3); // lw t2, 416(a3) + c->daddu(t1, t1, t2); // daddu t1, t1, t2 + c->addiu(t2, r0, 1); // addiu t2, r0, 1 + c->lw(t3, 404, a3); // lw t3, 404(a3) + c->dsubu(t2, t2, t3); // dsubu t2, t2, t3 + c->lw(t3, 420, a3); // lw t3, 420(a3) + c->daddu(t4, t2, t3); // daddu t4, t2, t3 + c->addiu(t2, r0, 1); // addiu t2, r0, 1 + c->lw(t3, 408, a3); // lw t3, 408(a3) + c->dsubu(t2, t2, t3); // dsubu t2, t2, t3 + c->lw(t3, 424, a3); // lw t3, 424(a3) + c->daddu(t2, t2, t3); // daddu t2, t2, t3 + c->lwu(t3, 40, a0); // lwu t3, 40(a0) + c->lw(t5, 400, a3); // lw t5, 400(a3) + c->mult3(t5, t5, v1); // mult3 t5, t5, v1 + c->lw(t6, 404, a3); // lw t6, 404(a3) + c->mult3(t6, t6, t0); // mult3 t6, t6, t0 + c->daddu(t5, t5, t6); // daddu t5, t5, t6 + c->lw(t6, 408, a3); // lw t6, 408(a3) + c->mult3(t6, t6, a1); // mult3 t6, t6, a1 + c->daddu(t5, t5, t6); // daddu t5, t5, t6 + c->daddu(t3, t3, t5); // daddu t3, t3, t5 + c->mov64(t4, t4); // or t4, t4, r0 + // nop // sll r0, r0, 0 + +block_5: + c->mov64(t5, t2); // or t5, t2, r0 + c->mov64(t6, t3); // or t6, t3, r0 + +block_6: + c->mov64(t7, t1); // or t7, t1, r0 + c->mov64(t8, t6); // or t8, t6, r0 + +block_7: + // nop // sll r0, r0, 0 + c->lhu(t9, 0, t8); // lhu t9, 0(t8) + // nop // sll r0, r0, 0 + c->lw(ra, 56, a0); // lw ra, 56(a0) + c->sll(gp, t9, 3); // sll gp, t9, 3 + c->lhu(t9, 2, t8); // lhu t9, 2(t8) + bc = c->sgpr64(t9) == 0; // beq t9, r0, L97 + c->daddu(ra, gp, ra); // daddu ra, gp, ra + if (bc) {goto block_13;} // branch non-likely + + +block_8: + get_fake_spad_addr2(s5, cache.fake_scratchpad_data, 0, c);// lui s5, 28672 + c->lw(s2, 0, ra); // lw s2, 0(ra) + c->addiu(s4, r0, 1); // addiu s4, r0, 1 + c->lw(gp, 4, ra); // lw gp, 4(ra) + c->andi(s3, s2, 7); // andi s3, s2, 7 + c->sra(s2, s2, 3); // sra s2, s2, 3 + c->daddu(s5, s2, s5); // daddu s5, s2, s5 + c->lqc2(vf8, 12, gp); // lqc2 vf8, 12(gp) + c->sllv(s4, s4, s3); // sllv s4, s4, s3 + c->lb(s3, 0, s5); // lb s3, 0(s5) + c->and_(s2, s3, s4); // and s2, s3, s4 + c->daddiu(t9, t9, -1); // daddiu t9, t9, -1 + bc = c->sgpr64(s2) != 0; // bne s2, r0, L96 + c->or_(s4, s3, s4); // or s4, s3, s4 + if (bc) {goto block_12;} // branch non-likely + + c->vsub_bc(DEST::xyzw, BC::w, vf2, vf8, vf8); // vsubw.xyzw vf2, vf8, vf8 + c->sb(s4, 0, s5); // sb s4, 0(s5) + c->vadd_bc(DEST::xyzw, BC::w, vf3, vf8, vf8); // vaddw.xyzw vf3, vf8, vf8 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf2, vf2); // vftoi0.xyzw vf2, vf2 + c->lq(s5, 160, a3); // lq s5, 160(a3) + c->vftoi0(DEST::xyzw, vf3, vf3); // vftoi0.xyzw vf3, vf3 + c->lq(s3, 176, a3); // lq s3, 176(a3) + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(s2, vf2); // qmfc2.i s2, vf2 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(s4, vf3); // qmfc2.i s4, vf3 + c->pcgtw(s3, s2, s3); // pcgtw s3, s2, s3 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcgtw(s5, s5, s4); // pcgtw s5, s5, s4 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->por(s5, s3, s5); // por s5, s3, s5 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->ppach(s5, r0, s5); // ppach s5, r0, s5 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->dsll(s5, s5, 16); // dsll s5, s5, 16 + // nop // sll r0, r0, 0 + bc = c->sgpr64(s5) != 0; // bne s5, r0, L96 + // nop // sll r0, r0, 0 + if (bc) {goto block_12;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lw(s4, 0, a2); // lw s4, 0(a2) + c->daddiu(s3, s4, -256); // daddiu s3, s4, -256 + c->sll(s5, s4, 3); // sll s5, s4, 3 + bc = ((s64)c->sgpr64(s3)) >= 0; // bgez s3, L98 + c->daddiu(s4, s4, 1); // daddiu s4, s4, 1 + if (bc) {goto block_16;} // branch non-likely + + c->daddu(s5, s5, a2); // daddu s5, s5, a2 + c->sw(s4, 0, a2); // sw s4, 0(a2) + // nop // sll r0, r0, 0 + c->sw(s7, 20, s5); // sw s7, 20(s5) + // nop // sll r0, r0, 0 + c->sw(gp, 16, s5); // sw gp, 16(s5) + +block_12: + bc = ((s64)c->sgpr64(t9)) > 0; // bgtz t9, L95 + c->daddiu(ra, ra, 8); // daddiu ra, ra, 8 + if (bc) {goto block_8;} // branch non-likely + + +block_13: + c->daddiu(t7, t7, -1); // daddiu t7, t7, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t7) != 0; // bne t7, r0, L94 + c->daddu(t8, t8, v1); // daddu t8, t8, v1 + if (bc) {goto block_7;} // branch non-likely + + c->daddiu(t5, t5, -1); // daddiu t5, t5, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t5) != 0; // bne t5, r0, L93 + c->daddu(t6, t6, a1); // daddu t6, t6, a1 + if (bc) {goto block_6;} // branch non-likely + + c->daddiu(t4, t4, -1); // daddiu t4, t4, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t4) != 0; // bne t4, r0, L92 + c->daddu(t3, t3, t0); // daddu t3, t3, t0 + if (bc) {goto block_5;} // branch non-likely + + +block_16: + 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 + // 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("(method 11 collide-hash)", execute, 256); +} + +} // namespace method_11_collide_hash +} // 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_12_collide_hash { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->daddiu(sp, sp, -112); // daddiu sp, sp, -112 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s1, 16, sp); // sq s1, 16(sp) + c->sq(s2, 32, sp); // sq s2, 32(sp) + c->sq(s3, 48, sp); // sq s3, 48(sp) + c->sq(s4, 64, sp); // sq s4, 64(sp) + c->sq(s5, 80, sp); // sq s5, 80(sp) + c->sq(gp, 96, sp); // sq gp, 96(sp) + c->addiu(v1, r0, 0); // addiu v1, r0, 0 + //beq r0, r0, L81 // beq r0, r0, L81 + // nop // sll r0, r0, 0 + goto block_2; // branch always + + +block_1: + c->dsll(a1, v1, 4); // dsll a1, v1, 4 + get_fake_spad_addr2(t0, cache.fake_scratchpad_data, 0, c);// lui t0, 28672 + c->daddu(a1, a1, t0); // daddu a1, a1, t0 + c->sq(r0, 0, a1); // sq r0, 0(a1) + c->daddiu(v1, v1, 1); // daddiu v1, v1, 1 + +block_2: + c->lwu(a1, 8, a0); // lwu a1, 8(a0) + c->slt(a1, v1, a1); // slt a1, v1, a1 + bc = c->sgpr64(a1) != 0; // bne a1, r0, L80 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + c->mov64(v1, s7); // or v1, s7, r0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->lw(v1, 72, a0); // lw v1, 72(a0) + // nop // sll r0, r0, 0 + c->lqc2(vf2, 28, a0); // lqc2 vf2, 28(a0) + c->lui(a1, 1); // lui a1, 1 + c->lqc2(vf3, 128, a3); // lqc2 vf3, 128(a3) + c->ori(a1, a1, 257); // ori a1, a1, 257 + c->lqc2(vf4, 144, a3); // lqc2 vf4, 144(a3) + c->dsubu(v1, v1, a1); // dsubu v1, v1, a1 + c->lqc2(vf5, 44, a0); // lqc2 vf5, 44(a0) + c->vsub(DEST::xyzw, vf3, vf3, vf2); // vsub.xyzw vf3, vf3, vf2 + c->lq(a1, 160, a3); // lq a1, 160(a3) + c->vsub(DEST::xyzw, vf4, vf4, vf2); // vsub.xyzw vf4, vf4, vf2 + c->lq(t0, 176, a3); // lq t0, 176(a3) + c->pextlb(v1, r0, v1); // pextlb v1, r0, v1 + c->lq(t1, 60, a0); // lq t1, 60(a0) + c->pextlh(v1, r0, v1); // pextlh v1, r0, v1 + c->lq(t2, 76, a0); // lq t2, 76(a0) + c->pcgtw(t0, t1, t0); // pcgtw t0, t1, t0 + c->vmul(DEST::xyzw, vf3, vf3, vf5); // vmul.xyzw vf3, vf3, vf5 + c->pcgtw(a1, a1, t2); // pcgtw a1, a1, t2 + c->vmul(DEST::xyzw, vf4, vf4, vf5); // vmul.xyzw vf4, vf4, vf5 + c->por(a1, t0, a1); // por a1, t0, a1 + c->lqc2(vf10, 256, a3); // lqc2 vf10, 256(a3) + c->ppach(a1, r0, a1); // ppach a1, r0, a1 + c->lqc2(vf11, 272, a3); // lqc2 vf11, 272(a3) + c->dsll(a1, a1, 16); // dsll a1, a1, 16 + c->vftoi0(DEST::xyzw, vf3, vf3); // vftoi0.xyzw vf3, vf3 + bc = c->sgpr64(a1) != 0; // bne a1, r0, L88 + c->vftoi0(DEST::xyzw, vf4, vf4); // vftoi0.xyzw vf4, vf4 + if (bc) {goto block_19;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lqc2(vf8, 208, a3); // lqc2 vf8, 208(a3) + // nop // sll r0, r0, 0 + c->lqc2(vf9, 224, a3); // lqc2 vf9, 224(a3) + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t0, vf3); // qmfc2.i t0, vf3 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(a1, vf4); // qmfc2.i a1, vf4 + c->pmaxw(t0, t0, r0); // pmaxw t0, t0, r0 + c->lqc2(vf6, 12, a0); // lqc2 vf6, 12(a0) + c->pmaxw(a1, a1, r0); // pmaxw a1, a1, r0 + c->lqc2(vf7, 240, a3); // lqc2 vf7, 240(a3) + c->pminw(t0, t0, v1); // pminw t0, t0, v1 + c->vmax_bc(DEST::xyzw, BC::w, vf1, vf0, vf0); // vmaxw.xyzw vf1, vf0, vf0 + c->pminw(v1, a1, v1); // pminw v1, a1, v1 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->sq(t0, 400, a3); // sq t0, 400(a3) + // nop // sll r0, r0, 0 + c->sq(v1, 416, a3); // sq v1, 416(a3) + c->addiu(v1, r0, 4); // addiu v1, r0, 4 + c->lbu(a1, 72, a0); // lbu a1, 72(a0) + c->multu3(a1, a1, v1); // multu3 a1, a1, v1 + c->lbu(t0, 74, a0); // lbu t0, 74(a0) + c->multu3(t0, t0, a1); // multu3 t0, t0, a1 + c->addiu(t1, r0, 1); // addiu t1, r0, 1 + c->lw(t2, 400, a3); // lw t2, 400(a3) + c->dsubu(t1, t1, t2); // dsubu t1, t1, t2 + c->lw(t2, 416, a3); // lw t2, 416(a3) + c->daddu(t1, t1, t2); // daddu t1, t1, t2 + c->addiu(t2, r0, 1); // addiu t2, r0, 1 + c->lw(t3, 404, a3); // lw t3, 404(a3) + c->dsubu(t2, t2, t3); // dsubu t2, t2, t3 + c->lw(t3, 420, a3); // lw t3, 420(a3) + c->daddu(t2, t2, t3); // daddu t2, t2, t3 + c->addiu(t3, r0, 1); // addiu t3, r0, 1 + c->lw(t4, 408, a3); // lw t4, 408(a3) + c->dsubu(t3, t3, t4); // dsubu t3, t3, t4 + c->lw(t4, 424, a3); // lw t4, 424(a3) + c->daddu(t3, t3, t4); // daddu t3, t3, t4 + c->lwu(t4, 40, a0); // lwu t4, 40(a0) + c->lw(t5, 400, a3); // lw t5, 400(a3) + c->mult3(t5, t5, v1); // mult3 t5, t5, v1 + c->lw(t6, 404, a3); // lw t6, 404(a3) + c->mult3(t6, t6, t0); // mult3 t6, t6, t0 + c->daddu(t5, t5, t6); // daddu t5, t5, t6 + c->lw(t6, 408, a3); // lw t6, 408(a3) + c->mult3(t6, t6, a1); // mult3 t6, t6, a1 + c->daddu(t5, t5, t6); // daddu t5, t5, t6 + c->daddu(t4, t4, t5); // daddu t4, t4, t5 + c->mov64(t5, t2); // or t5, t2, r0 + // nop // sll r0, r0, 0 + +block_5: + c->mov64(t6, t3); // or t6, t3, r0 + c->mov64(t7, t4); // or t7, t4, r0 + +block_6: + c->mov64(t8, t1); // or t8, t1, r0 + c->mov64(t9, t7); // or t9, t7, r0 + +block_7: + c->dsubu(s3, t1, t8); // dsubu s3, t1, t8 + c->lw(s2, 400, a3); // lw s2, 400(a3) + c->dsubu(s5, t2, t5); // dsubu s5, t2, t5 + c->lw(s4, 404, a3); // lw s4, 404(a3) + c->dsubu(ra, t3, t6); // dsubu ra, t3, t6 + c->lw(gp, 408, a3); // lw gp, 408(a3) + c->daddu(s3, s3, s2); // daddu s3, s3, s2 + c->sw(r0, 444, a3); // sw r0, 444(a3) + c->daddu(s5, s5, s4); // daddu s5, s5, s4 + c->sw(s3, 432, a3); // sw s3, 432(a3) + c->daddu(ra, ra, gp); // daddu ra, ra, gp + c->sw(s5, 436, a3); // sw s5, 436(a3) + // nop // sll r0, r0, 0 + c->sw(ra, 440, a3); // sw ra, 440(a3) + // nop // sll r0, r0, 0 + c->lqc2(vf3, 432, a3); // lqc2 vf3, 432(a3) + c->vitof0(DEST::xyzw, vf3, vf3); // vitof0.xyzw vf3, vf3 + // nop // sll r0, r0, 0 + c->vmula(DEST::xyzw, vf3, vf6); // vmula.xyzw acc, vf3, vf6 + // nop // sll r0, r0, 0 + c->vmadda(DEST::xyzw, vf1, vf2); // vmadda.xyzw acc, vf1, vf2 + // nop // sll r0, r0, 0 + c->vmsub_bc(DEST::xyzw, BC::w, vf3, vf1, vf10); // vmsubw.xyzw vf3, vf1, vf10 + // nop // sll r0, r0, 0 + c->vmadda(DEST::xyzw, vf1, vf6); // vmadda.xyzw acc, vf1, vf6 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::w, vf4, vf1, vf10); // vmaddw.xyzw vf4, vf1, vf10 + // nop // sll r0, r0, 0 + c->vmula(DEST::xyzw, vf7, vf3); // vmula.xyzw acc, vf7, vf3 + // nop // sll r0, r0, 0 + c->vmsuba(DEST::xyzw, vf7, vf8); // vmsuba.xyzw acc, vf7, vf8 + // nop // sll r0, r0, 0 + c->vmsub(DEST::xyzw, vf13, vf1, vf10); // vmsub.xyzw vf13, vf1, vf10 + // nop // sll r0, r0, 0 + c->vmadd(DEST::xyzw, vf15, vf1, vf11); // vmadd.xyzw vf15, vf1, vf11 + // nop // sll r0, r0, 0 + c->vmula(DEST::xyzw, vf7, vf4); // vmula.xyzw acc, vf7, vf4 + // nop // sll r0, r0, 0 + c->vmsuba(DEST::xyzw, vf7, vf8); // vmsuba.xyzw acc, vf7, vf8 + // nop // sll r0, r0, 0 + c->vmsub(DEST::xyzw, vf14, vf1, vf11); // vmsub.xyzw vf14, vf1, vf11 + // nop // sll r0, r0, 0 + c->vmadd(DEST::xyzw, vf16, vf1, vf10); // vmadd.xyzw vf16, vf1, vf10 + // nop // sll r0, r0, 0 + c->vmax(DEST::xyzw, vf13, vf13, vf14); // vmax.xyzw vf13, vf13, vf14 + // nop // sll r0, r0, 0 + c->vmini(DEST::xyzw, vf15, vf15, vf16); // vmini.xyzw vf15, vf15, vf16 + // nop // sll r0, r0, 0 + c->vmax_bc(DEST::xyzw, BC::y, vf13, vf13, vf13); // vmaxy.xyzw vf13, vf13, vf13 + // nop // sll r0, r0, 0 + c->vmini_bc(DEST::xyzw, BC::y, vf15, vf15, vf15); // vminiy.xyzw vf15, vf15, vf15 + // nop // sll r0, r0, 0 + c->vmax_bc(DEST::xyzw, BC::z, vf13, vf13, vf13); // vmaxz.xyzw vf13, vf13, vf13 + // nop // sll r0, r0, 0 + c->vmini_bc(DEST::xyzw, BC::z, vf15, vf15, vf15); // vminiz.xyzw vf15, vf15, vf15 + // nop // sll r0, r0, 0 + c->vftoi4(DEST::xyzw, vf13, vf13); // vftoi4.xyzw vf13, vf13 + // nop // sll r0, r0, 0 + c->vftoi4(DEST::xyzw, vf15, vf15); // vftoi4.xyzw vf15, vf15 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(s5, vf13); // qmfc2.i s5, vf13 + c->addiu(s4, r0, 4096); // addiu s4, r0, 4096 + c->mov128_gpr_vf(ra, vf15); // qmfc2.i ra, vf15 + c->subu(gp, ra, s5); // subu gp, ra, s5 + c->subu(s5, s4, s5); // subu s5, s4, s5 + bc = ((s64)c->sgpr64(gp)) < 0; // bltz gp, L87 + // nop // sll r0, r0, 0 + if (bc) {goto block_16;} // branch non-likely + + bc = ((s64)c->sgpr64(s5)) < 0; // bltz s5, L87 + // nop // sll r0, r0, 0 + if (bc) {goto block_16;} // branch non-likely + + bc = ((s64)c->sgpr64(ra)) < 0; // bltz ra, L87 + // nop // sll r0, r0, 0 + if (bc) {goto block_16;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lhu(ra, 0, t9); // lhu ra, 0(t9) + // nop // sll r0, r0, 0 + c->lw(gp, 56, a0); // lw gp, 56(a0) + c->sll(s5, ra, 3); // sll s5, ra, 3 + c->lhu(ra, 2, t9); // lhu ra, 2(t9) + bc = c->sgpr64(ra) == 0; // beq ra, r0, L87 + c->daddu(gp, s5, gp); // daddu gp, s5, gp + if (bc) {goto block_16;} // branch non-likely + + +block_11: + get_fake_spad_addr2(s4, cache.fake_scratchpad_data, 0, c);// lui s4, 28672 + c->lw(s1, 0, gp); // lw s1, 0(gp) + c->addiu(s3, r0, 1); // addiu s3, r0, 1 + c->lw(s5, 4, gp); // lw s5, 4(gp) + c->andi(s2, s1, 7); // andi s2, s1, 7 + c->sra(s1, s1, 3); // sra s1, s1, 3 + c->daddu(s4, s1, s4); // daddu s4, s1, s4 + c->lqc2(vf12, 12, s5); // lqc2 vf12, 12(s5) + c->sllv(s3, s3, s2); // sllv s3, s3, s2 + c->lb(s2, 0, s4); // lb s2, 0(s4) + c->and_(s1, s2, s3); // and s1, s2, s3 + c->daddiu(ra, ra, -1); // daddiu ra, ra, -1 + bc = c->sgpr64(s1) != 0; // bne s1, r0, L86 + c->or_(s3, s2, s3); // or s3, s2, s3 + if (bc) {goto block_15;} // branch non-likely + + c->vmula(DEST::xyzw, vf9, vf12); // vmula.xyzw acc, vf9, vf12 + c->sb(s3, 0, s4); // sb s3, 0(s4) + c->vmsub(DEST::xyzw, vf13, vf9, vf8); // vmsub.xyzw vf13, vf9, vf8 + // nop // sll r0, r0, 0 + c->vmul_bc(DEST::xyzw, BC::w, vf14, vf1, vf7); // vmulw.xyzw vf14, vf1, vf7 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf1, vf12); // vmulaw.xyzw acc, vf1, vf12 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::w, vf15, vf1, vf10); // vmaddw.xyzw vf15, vf1, vf10 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf13, vf7); // vmulaw.xyzw acc, vf13, vf7 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf14, vf13); // vmadday.xyzw acc, vf14, vf13 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf13, vf14, vf13); // vmaddz.xyzw vf13, vf14, vf13 + // nop // sll r0, r0, 0 + c->vmini_bc(DEST::xyzw, BC::w, vf13, vf13, vf0); // vminiw.xyzw vf13, vf13, vf0 + // nop // sll r0, r0, 0 + c->vmax_bc(DEST::xyzw, BC::x, vf13, vf13, vf0); // vmaxx.xyzw vf13, vf13, vf0 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::x, vf9, vf13); // vmulax.xyzw acc, vf9, vf13 + // nop // sll r0, r0, 0 + c->vmadda(DEST::xyzw, vf1, vf8); // vmadda.xyzw acc, vf1, vf8 + // nop // sll r0, r0, 0 + c->vmsub(DEST::xyzw, vf13, vf1, vf12); // vmsub.xyzw vf13, vf1, vf12 + // nop // sll r0, r0, 0 + c->vmul(DEST::xyzw, vf13, vf13, vf13); // vmul.xyzw vf13, vf13, vf13 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::x, vf0, vf0); // vmulax.xyzw acc, vf0, vf0 + // nop // sll r0, r0, 0 + c->vmsuba(DEST::xyzw, vf15, vf15); // vmsuba.xyzw acc, vf15, vf15 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf13); // vmaddax.xyzw acc, vf1, vf13 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf1, vf13); // vmadday.xyzw acc, vf1, vf13 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf13, vf1, vf13); // vmaddz.xyzw vf13, vf1, vf13 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(s4, vf13); // qmfc2.i s4, vf13 + bc = ((s64)c->sgpr64(s4)) > 0; // bgtz s4, L86 + // nop // sll r0, r0, 0 + if (bc) {goto block_15;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lw(s3, 0, a2); // lw s3, 0(a2) + c->daddiu(s2, s3, -256); // daddiu s2, s3, -256 + c->sll(s4, s3, 3); // sll s4, s3, 3 + bc = ((s64)c->sgpr64(s2)) >= 0; // bgez s2, L88 + c->daddiu(s3, s3, 1); // daddiu s3, s3, 1 + if (bc) {goto block_19;} // branch non-likely + + c->daddu(s4, s4, a2); // daddu s4, s4, a2 + c->sw(s3, 0, a2); // sw s3, 0(a2) + // nop // sll r0, r0, 0 + c->sw(s7, 20, s4); // sw s7, 20(s4) + // nop // sll r0, r0, 0 + c->sw(s5, 16, s4); // sw s5, 16(s4) + +block_15: + bc = ((s64)c->sgpr64(ra)) > 0; // bgtz ra, L85 + c->daddiu(gp, gp, 8); // daddiu gp, gp, 8 + if (bc) {goto block_11;} // branch non-likely + + +block_16: + c->daddiu(t8, t8, -1); // daddiu t8, t8, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t8) != 0; // bne t8, r0, L84 + c->daddu(t9, t9, v1); // daddu t9, t9, v1 + if (bc) {goto block_7;} // branch non-likely + + c->daddiu(t6, t6, -1); // daddiu t6, t6, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t6) != 0; // bne t6, r0, L83 + c->daddu(t7, t7, a1); // daddu t7, t7, a1 + if (bc) {goto block_6;} // branch non-likely + + c->daddiu(t5, t5, -1); // daddiu t5, t5, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t5) != 0; // bne t5, r0, L82 + c->daddu(t4, t4, t0); // daddu t4, t4, t0 + if (bc) {goto block_5;} // branch non-likely + + +block_19: + 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(); + gLinkedFunctionTable.reg("(method 12 collide-hash)", execute, 256); +} + +} // namespace method_12_collide_hash +} // 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 fill_bg_using_box_new { +struct Cache { + void* cheat_mode; // *cheat-mode* + void* collide_stats; // *collide-stats* + void* fake_scratchpad_data; // *fake-scratchpad-data* + void* debug; // debug + void* print_exceeded_max_cache_tris; // print-exceeded-max-cache-tris +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->daddiu(sp, sp, -128); // daddiu sp, sp, -128 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s0, 16, sp); // sq s0, 16(sp) + c->sq(s1, 32, sp); // sq s1, 32(sp) + c->sq(s2, 48, sp); // sq s2, 48(sp) + c->sq(s3, 64, sp); // sq s3, 64(sp) + c->sq(s4, 80, sp); // sq s4, 80(sp) + c->sq(s5, 96, sp); // sq s5, 96(sp) + c->sq(gp, 112, sp); // sq gp, 112(sp) + // nop // sll r0, r0, 0 + c->lw(v1, 40, a1); // lw v1, 40(a1) + // nop // sll r0, r0, 0 + c->lqc2(vf1, 44, a1); // lqc2 vf1, 44(a1) + c->lui(a3, 1); // lui a3, 1 + c->lqc2(vf2, 128, a2); // lqc2 vf2, 128(a2) + c->ori(a3, a3, 257); // ori a3, a3, 257 + c->lqc2(vf3, 144, a2); // lqc2 vf3, 144(a2) + c->dsubu(v1, v1, a3); // dsubu v1, v1, a3 + c->lqc2(vf6, 60, a1); // lqc2 vf6, 60(a1) + c->vsub(DEST::xyzw, vf2, vf2, vf1); // vsub.xyzw vf2, vf2, vf1 + c->lq(a3, 160, a2); // lq a3, 160(a2) + c->vsub(DEST::xyzw, vf3, vf3, vf1); // vsub.xyzw vf3, vf3, vf1 + c->lq(t0, 176, a2); // lq t0, 176(a2) + c->pextlb(v1, r0, v1); // pextlb v1, r0, v1 + c->lq(t1, 76, a1); // lq t1, 76(a1) + c->pextlh(v1, r0, v1); // pextlh v1, r0, v1 + c->lq(t2, 92, a1); // lq t2, 92(a1) + c->pcgtw(t0, t1, t0); // pcgtw t0, t1, t0 + c->vftoi0(DEST::xyzw, vf4, vf2); // vftoi0.xyzw vf4, vf2 + c->pcgtw(a3, a3, t2); // pcgtw a3, a3, t2 + c->vftoi0(DEST::xyzw, vf5, vf3); // vftoi0.xyzw vf5, vf3 + c->por(a3, t0, a3); // por a3, t0, a3 + c->vmul(DEST::xyzw, vf2, vf2, vf6); // vmul.xyzw vf2, vf2, vf6 + c->ppach(a3, r0, a3); // ppach a3, r0, a3 + c->vmul(DEST::xyzw, vf3, vf3, vf6); // vmul.xyzw vf3, vf3, vf6 + c->dsll(t0, a3, 16); // dsll t0, a3, 16 + c->mov128_gpr_vf(a3, vf4); // qmfc2.i a3, vf4 + bc = c->sgpr64(t0) != 0; // bne t0, r0, L75 + c->mov128_gpr_vf(t0, vf5); // qmfc2.i t0, vf5 + if (bc) {goto block_17;} // branch non-likely + + c->vftoi0(DEST::xyzw, vf2, vf2); // vftoi0.xyzw vf2, vf2 + c->psraw(a3, a3, 4); // psraw a3, a3, 4 + c->vftoi0(DEST::xyzw, vf3, vf3); // vftoi0.xyzw vf3, vf3 + c->psraw(t0, t0, 4); // psraw t0, t0, 4 + // nop // sll r0, r0, 0 + c->sq(a3, 368, a2); // sq a3, 368(a2) + // nop // sll r0, r0, 0 + c->sq(t0, 384, a2); // sq t0, 384(a2) + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t0, vf2); // qmfc2.i t0, vf2 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(a3, vf3); // qmfc2.i a3, vf3 + c->pmaxw(t0, t0, r0); // pmaxw t0, t0, r0 + c->lqc2(vf10, 448, a2); // lqc2 vf10, 448(a2) + c->pmaxw(a3, a3, r0); // pmaxw a3, a3, r0 + c->lqc2(vf11, 464, a2); // lqc2 vf11, 464(a2) + c->pminw(t0, t0, v1); // pminw t0, t0, v1 + c->lqc2(vf12, 480, a2); // lqc2 vf12, 480(a2) + c->pminw(v1, a3, v1); // pminw v1, a3, v1 + c->lqc2(vf13, 496, a2); // lqc2 vf13, 496(a2) + // nop // sll r0, r0, 0 + c->sq(t0, 400, a2); // sq t0, 400(a2) + // nop // sll r0, r0, 0 + c->sq(v1, 416, a2); // sq v1, 416(a2) + c->addiu(v1, r0, 4); // addiu v1, r0, 4 + c->lbu(a3, 40, a1); // lbu a3, 40(a1) + c->multu3(t8, a3, v1); // multu3 t8, a3, v1 + c->lbu(a3, 42, a1); // lbu a3, 42(a1) + c->multu3(t6, a3, t8); // multu3 t6, a3, t8 + c->addiu(a3, r0, 1); // addiu a3, r0, 1 + c->lw(t0, 400, a2); // lw t0, 400(a2) + c->dsubu(a3, a3, t0); // dsubu a3, a3, t0 + c->lw(t0, 416, a2); // lw t0, 416(a2) + c->daddu(a3, a3, t0); // daddu a3, a3, t0 + c->addiu(t0, r0, 1); // addiu t0, r0, 1 + c->lw(t1, 404, a2); // lw t1, 404(a2) + c->dsubu(t0, t0, t1); // dsubu t0, t0, t1 + c->lw(t1, 420, a2); // lw t1, 420(a2) + c->daddu(t1, t0, t1); // daddu t1, t0, t1 + c->addiu(t0, r0, 1); // addiu t0, r0, 1 + c->lw(t2, 408, a2); // lw t2, 408(a2) + c->dsubu(t0, t0, t2); // dsubu t0, t0, t2 + c->lw(t2, 424, a2); // lw t2, 424(a2) + c->daddu(t0, t0, t2); // daddu t0, t0, t2 + c->lwu(t2, 8, a1); // lwu t2, 8(a1) + c->lw(t3, 400, a2); // lw t3, 400(a2) + c->mult3(t3, t3, v1); // mult3 t3, t3, v1 + c->lw(t4, 404, a2); // lw t4, 404(a2) + c->mult3(t4, t4, t6); // mult3 t4, t4, t6 + c->daddu(t3, t3, t4); // daddu t3, t3, t4 + c->lw(t4, 408, a2); // lw t4, 408(a2) + c->mult3(t4, t4, t8); // mult3 t4, t4, t8 + c->daddu(t3, t3, t4); // daddu t3, t3, t4 + c->daddu(t7, t2, t3); // daddu t7, t2, t3 + c->mov64(t1, t1); // or t1, t1, r0 + // nop // sll r0, r0, 0 + +block_2: + c->mov64(t5, t0); // or t5, t0, r0 + c->mov64(t9, t7); // or t9, t7, r0 + // nop // sll r0, r0, 0 + c->sw(t7, 524, a2); // sw t7, 524(a2) + // nop // sll r0, r0, 0 + c->sw(t6, 528, a2); // sw t6, 528(a2) + +block_3: + c->mov64(t6, a3); // or t6, a3, r0 + c->mov64(t7, t9); // or t7, t9, r0 + // nop // sll r0, r0, 0 + c->sw(t9, 532, a2); // sw t9, 532(a2) + // nop // sll r0, r0, 0 + c->sw(t8, 536, a2); // sw t8, 536(a2) + +block_4: + // nop // sll r0, r0, 0 + c->lhu(ra, 0, t7); // lhu ra, 0(t7) + // nop // sll r0, r0, 0 + c->lw(gp, 104, a1); // lw gp, 104(a1) + // nop // sll r0, r0, 0 + c->lhu(t8, 2, t7); // lhu t8, 2(t7) + // nop // sll r0, r0, 0 + c->lw(t9, 72, a1); // lw t9, 72(a1) + bc = c->sgpr64(t8) == 0; // beq t8, r0, L74 + c->daddu(ra, ra, gp); // daddu ra, ra, gp + if (bc) {goto block_13;} // branch non-likely + + +block_5: + get_fake_spad_addr2(gp, cache.fake_scratchpad_data, 0, c);// lui gp, 28672 + c->lbu(s4, 0, ra); // lbu s4, 0(ra) + c->addiu(s3, r0, 1); // addiu s3, r0, 1 + c->andi(s2, s4, 7); // andi s2, s4, 7 + c->sra(s5, s4, 3); // sra s5, s4, 3 + c->sll(s4, s4, 2); // sll s4, s4, 2 + c->daddu(s5, s5, gp); // daddu s5, s5, gp + c->daddu(s4, s4, t9); // daddu s4, s4, t9 + c->sllv(s3, s3, s2); // sllv s3, s3, s2 + c->lb(s2, 0, s5); // lb s2, 0(s5) + // nop // sll r0, r0, 0 + c->lbu(s0, 3, s4); // lbu s0, 3(s4) + c->and_(s1, s2, s3); // and s1, s2, s3 + c->daddiu(t8, t8, -1); // daddiu t8, t8, -1 + bc = c->sgpr64(s1) != 0; // bne s1, r0, L73 + c->lw(s1, 4, a1); // lw s1, 4(a1) + if (bc) {goto block_12;} // branch non-likely + + c->dsll(s0, s0, 2); // dsll s0, s0, 2 + c->or_(s3, s2, s3); // or s3, s2, s3 + c->daddu(s2, s0, s1); // daddu s2, s0, s1 + c->sb(s3, 0, s5); // sb s3, 0(s5) + // nop // sll r0, r0, 0 + c->lwu(s5, 0, s2); // lwu s5, 0(s2) + // nop // sll r0, r0, 0 + c->lwu(s2, 96, a2); // lwu s2, 96(a2) + // nop // sll r0, r0, 0 + c->lw(s3, 88, a1); // lw s3, 88(a1) + c->and_(s2, s2, s5); // and s2, s2, s5 + c->lbu(s1, 0, s4); // lbu s1, 0(s4) + bc = c->sgpr64(s2) != 0; // bne s2, r0, L73 + c->lbu(s2, 1, s4); // lbu s2, 1(s4) + if (bc) {goto block_12;} // branch non-likely + + c->sll(s1, s1, 1); // sll s1, s1, 1 + c->lbu(s4, 2, s4); // lbu s4, 2(s4) + c->sll(s0, s1, 1); // sll s0, s1, 1 + c->sll(s2, s2, 1); // sll s2, s2, 1 + c->daddu(s1, s1, s0); // daddu s1, s1, s0 + c->sll(s0, s2, 1); // sll s0, s2, 1 + c->sll(s4, s4, 1); // sll s4, s4, 1 + c->daddu(s0, s2, s0); // daddu s0, s2, s0 + c->sll(v0, s4, 1); // sll v0, s4, 1 + c->daddu(s2, s1, s3); // daddu s2, s1, s3 + c->daddu(s4, s4, v0); // daddu s4, s4, v0 + c->daddu(s1, s0, s3); // daddu s1, s0, s3 + c->daddu(s4, s4, s3); // daddu s4, s4, s3 + c->ldr(t2, 0, s2); // ldr t2, 0(s2) + // nop // sll r0, r0, 0 + c->ldl(t2, 7, s2); // ldl t2, 7(s2) + // nop // sll r0, r0, 0 + c->ldr(t3, 0, s1); // ldr t3, 0(s1) + // nop // sll r0, r0, 0 + c->ldl(t3, 7, s1); // ldl t3, 7(s1) + // nop // sll r0, r0, 0 + c->ldr(t4, 0, s4); // ldr t4, 0(s4) + c->pextlh(t2, r0, t2); // pextlh t2, r0, t2 + c->ldl(t4, 7, s4); // ldl t4, 7(s4) + c->pextlh(t3, r0, t3); // pextlh t3, r0, t3 + c->lq(s4, 368, a2); // lq s4, 368(a2) + c->pextlh(t4, r0, t4); // pextlh t4, r0, t4 + c->lq(s3, 384, a2); // lq s3, 384(a2) + c->pminw(s1, t2, t3); // pminw s1, t2, t3 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pmaxw(s2, t2, t3); // pmaxw s2, t2, t3 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pminw(s1, s1, t4); // pminw s1, s1, t4 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pmaxw(s2, s2, t4); // pmaxw s2, s2, t4 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcgtw(s3, s1, s3); // pcgtw s3, s1, s3 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcgtw(s4, s4, s2); // pcgtw s4, s4, s2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->por(s4, s3, s4); // por s4, s3, s4 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->ppach(s4, r0, s4); // ppach s4, r0, s4 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->dsll(s4, s4, 16); // dsll s4, s4, 16 + // nop // sll r0, r0, 0 + bc = c->sgpr64(s4) != 0; // bne s4, r0, L73 + // nop // sll r0, r0, 0 + if (bc) {goto block_12;} // branch non-likely + + c->psllw(t2, t2, 4); // psllw t2, t2, 4 + c->lw(s4, 2048, gp); // lw s4, 2048(gp) + c->psllw(t3, t3, 4); // psllw t3, t3, 4 + c->mov128_vf_gpr(vf7, t2); // qmtc2.i vf7, t2 + c->psllw(t4, t4, 4); // psllw t4, t4, 4 + c->mov128_vf_gpr(vf8, t3); // qmtc2.i vf8, t3 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf9, t4); // qmtc2.i vf9, t4 + c->vitof0(DEST::xyzw, vf7, vf7); // vitof0.xyzw vf7, vf7 + c->daddiu(s4, s4, 1); // daddiu s4, s4, 1 + c->vitof0(DEST::xyzw, vf8, vf8); // vitof0.xyzw vf8, vf8 + c->sw(s4, 2048, gp); // sw s4, 2048(gp) + c->vitof0(DEST::xyzw, vf9, vf9); // vitof0.xyzw vf9, vf9 + // nop // sll r0, r0, 0 + c->vadd(DEST::xyzw, vf7, vf7, vf1); // vadd.xyzw vf7, vf7, vf1 + // nop // sll r0, r0, 0 + c->vadd(DEST::xyzw, vf8, vf8, vf1); // vadd.xyzw vf8, vf8, vf1 + c->lwu(gp, 512, a2); // lwu gp, 512(a2) + c->vadd(DEST::xyzw, vf9, vf9, vf1); // vadd.xyzw vf9, vf9, vf1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(gp) == c->sgpr64(s7); // beq gp, s7, L72 + // nop // sll r0, r0, 0 + if (bc) {goto block_10;} // branch non-likely + + c->vmula_bc(DEST::xyzw, BC::x, vf10, vf7); // vmulax.xyzw acc, vf10, vf7 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf11, vf7); // vmadday.xyzw acc, vf11, vf7 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::z, vf12, vf7); // vmaddaz.xyzw acc, vf12, vf7 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::w, vf7, vf13, vf0); // vmaddw.xyzw vf7, vf13, vf0 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::x, vf10, vf8); // vmulax.xyzw acc, vf10, vf8 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf11, vf8); // vmadday.xyzw acc, vf11, vf8 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::z, vf12, vf8); // vmaddaz.xyzw acc, vf12, vf8 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::w, vf8, vf13, vf0); // vmaddw.xyzw vf8, vf13, vf0 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::x, vf10, vf9); // vmulax.xyzw acc, vf10, vf9 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf11, vf9); // vmadday.xyzw acc, vf11, vf9 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::z, vf12, vf9); // vmaddaz.xyzw acc, vf12, vf9 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::w, vf9, vf13, vf0); // vmaddw.xyzw vf9, vf13, vf0 + // nop // sll r0, r0, 0 + +block_10: + c->pextlw(gp, gp, s5); // pextlw gp, gp, s5 + c->lw(s4, 0, a0); // lw s4, 0(a0) + // nop // sll r0, r0, 0 + c->daddiu(s5, a0, 4908); // daddiu s5, a0, 4908 + c->daddiu(s3, s4, -460); // daddiu s3, s4, -460 + // nop // sll r0, r0, 0 + bc = ((s64)c->sgpr64(s3)) >= 0; // bgez s3, L76 + c->dsll(s3, s4, 6); // dsll s3, s4, 6 + if (bc) {goto block_18;} // branch non-likely + + c->daddiu(s4, s4, 1); // daddiu s4, s4, 1 + c->daddu(s5, s5, s3); // daddu s5, s5, s3 + // nop // sll r0, r0, 0 + c->sw(s4, 0, a0); // sw s4, 0(a0) + // nop // sll r0, r0, 0 + c->sq(gp, 48, s5); // sq gp, 48(s5) + // nop // sll r0, r0, 0 + c->sqc2(vf7, 0, s5); // sqc2 vf7, 0(s5) + // nop // sll r0, r0, 0 + c->sqc2(vf8, 16, s5); // sqc2 vf8, 16(s5) + // nop // sll r0, r0, 0 + c->sqc2(vf9, 32, s5); // sqc2 vf9, 32(s5) + +block_12: + bc = ((s64)c->sgpr64(t8)) > 0; // bgtz t8, L71 + c->daddiu(ra, ra, 1); // daddiu ra, ra, 1 + if (bc) {goto block_5;} // branch non-likely + + +block_13: + c->daddiu(t6, t6, -1); // daddiu t6, t6, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t6) != 0; // bne t6, r0, L70 + c->daddu(t7, t7, v1); // daddu t7, t7, v1 + if (bc) {goto block_4;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lw(t6, 532, a2); // lw t6, 532(a2) + // nop // sll r0, r0, 0 + c->lw(t8, 536, a2); // lw t8, 536(a2) + c->daddiu(t5, t5, -1); // daddiu t5, t5, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t5) != 0; // bne t5, r0, L69 + c->daddu(t9, t6, t8); // daddu t9, t6, t8 + if (bc) {goto block_3;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lw(t5, 524, a2); // lw t5, 524(a2) + // nop // sll r0, r0, 0 + c->lw(t6, 528, a2); // lw t6, 528(a2) + c->daddiu(t1, t1, -1); // daddiu t1, t1, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t1) != 0; // bne t1, r0, L68 + c->daddu(t7, t5, t6); // daddu t7, t5, t6 + if (bc) {goto block_2;} // branch non-likely + + c->load_symbol2(v1, cache.collide_stats); // lw v1, *collide-stats*(s7) + c->lwu(v1, 12, v1); // lwu v1, 12(v1) + c->daddiu(v1, v1, 1); // daddiu v1, v1, 1 + c->load_symbol2(a0, cache.collide_stats); // lw a0, *collide-stats*(s7) + c->sw(v1, 12, a0); // sw v1, 12(a0) + +block_17: + c->mov64(v0, s7); // or v0, s7, r0 + //beq r0, r0, L78 // beq r0, r0, L78 + // nop // sll r0, r0, 0 + goto block_21; // branch always + + +block_18: + c->load_symbol_addr(v1, cache.debug); // daddiu v1, s7, debug + c->load_symbol2(a0, cache.cheat_mode); // lw a0, *cheat-mode*(s7) + bc = c->sgpr64(a0) != c->sgpr64(v1); // bne a0, v1, L77 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_20;} // branch non-likely + + c->load_symbol2(t9, cache.print_exceeded_max_cache_tris);// lw t9, print-exceeded-max-cache-tris(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->mov64(v1, v0); // or v1, v0, r0 + +block_20: + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + +block_21: + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 112, sp); // lq gp, 112(sp) + c->lq(s5, 96, sp); // lq s5, 96(sp) + c->lq(s4, 80, sp); // lq s4, 80(sp) + c->lq(s3, 64, sp); // lq s3, 64(sp) + c->lq(s2, 48, sp); // lq s2, 48(sp) + c->lq(s1, 32, sp); // lq s1, 32(sp) + c->lq(s0, 16, sp); // lq s0, 16(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 128); // daddiu sp, sp, 128 + 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.cheat_mode = intern_from_c(-1, 0, "*cheat-mode*").c(); + cache.collide_stats = intern_from_c(-1, 0, "*collide-stats*").c(); + cache.fake_scratchpad_data = intern_from_c(-1, 0, "*fake-scratchpad-data*").c(); + cache.debug = intern_from_c(-1, 0, "debug").c(); + cache.print_exceeded_max_cache_tris = intern_from_c(-1, 0, "print-exceeded-max-cache-tris").c(); + gLinkedFunctionTable.reg("fill-bg-using-box-new", execute, 256); +} + +} // namespace fill_bg_using_box_new +} // 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 fill_bg_using_line_sphere_new { +struct Cache { + void* cheat_mode; // *cheat-mode* + void* collide_stats; // *collide-stats* + void* fake_scratchpad_data; // *fake-scratchpad-data* + void* debug; // debug + void* print_exceeded_max_cache_tris; // print-exceeded-max-cache-tris +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->daddiu(sp, sp, -128); // daddiu sp, sp, -128 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s0, 16, sp); // sq s0, 16(sp) + c->sq(s1, 32, sp); // sq s1, 32(sp) + c->sq(s2, 48, sp); // sq s2, 48(sp) + c->sq(s3, 64, sp); // sq s3, 64(sp) + c->sq(s4, 80, sp); // sq s4, 80(sp) + c->sq(s5, 96, sp); // sq s5, 96(sp) + c->sq(gp, 112, sp); // sq gp, 112(sp) + // nop // sll r0, r0, 0 + c->lw(v1, 40, a1); // lw v1, 40(a1) + // nop // sll r0, r0, 0 + c->lqc2(vf2, 44, a1); // lqc2 vf2, 44(a1) + c->lui(a3, 1); // lui a3, 1 + c->lqc2(vf3, 128, a2); // lqc2 vf3, 128(a2) + c->ori(a3, a3, 257); // ori a3, a3, 257 + c->lqc2(vf4, 144, a2); // lqc2 vf4, 144(a2) + c->dsubu(v1, v1, a3); // dsubu v1, v1, a3 + c->lqc2(vf5, 60, a1); // lqc2 vf5, 60(a1) + c->vsub(DEST::xyzw, vf3, vf3, vf2); // vsub.xyzw vf3, vf3, vf2 + c->lq(a3, 160, a2); // lq a3, 160(a2) + c->vsub(DEST::xyzw, vf4, vf4, vf2); // vsub.xyzw vf4, vf4, vf2 + c->lq(t0, 176, a2); // lq t0, 176(a2) + c->pextlb(v1, r0, v1); // pextlb v1, r0, v1 + c->lq(t1, 76, a1); // lq t1, 76(a1) + c->pextlh(v1, r0, v1); // pextlh v1, r0, v1 + c->lq(t2, 92, a1); // lq t2, 92(a1) + c->pcgtw(t0, t1, t0); // pcgtw t0, t1, t0 + c->vmul(DEST::xyzw, vf3, vf3, vf5); // vmul.xyzw vf3, vf3, vf5 + c->pcgtw(a3, a3, t2); // pcgtw a3, a3, t2 + c->vmul(DEST::xyzw, vf4, vf4, vf5); // vmul.xyzw vf4, vf4, vf5 + c->por(a3, t0, a3); // por a3, t0, a3 + c->lqc2(vf10, 256, a2); // lqc2 vf10, 256(a2) + c->ppach(a3, r0, a3); // ppach a3, r0, a3 + c->lqc2(vf11, 272, a2); // lqc2 vf11, 272(a2) + c->dsll(a3, a3, 16); // dsll a3, a3, 16 + c->vftoi0(DEST::xyzw, vf3, vf3); // vftoi0.xyzw vf3, vf3 + bc = c->sgpr64(a3) != 0; // bne a3, r0, L63 + c->vftoi0(DEST::xyzw, vf4, vf4); // vftoi0.xyzw vf4, vf4 + if (bc) {goto block_22;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lqc2(vf8, 208, a2); // lqc2 vf8, 208(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf9, 224, a2); // lqc2 vf9, 224(a2) + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t0, vf3); // qmfc2.i t0, vf3 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(a3, vf4); // qmfc2.i a3, vf4 + c->pmaxw(t0, t0, r0); // pmaxw t0, t0, r0 + c->lqc2(vf6, 28, a1); // lqc2 vf6, 28(a1) + c->pmaxw(a3, a3, r0); // pmaxw a3, a3, r0 + c->lqc2(vf7, 240, a2); // lqc2 vf7, 240(a2) + c->pminw(t0, t0, v1); // pminw t0, t0, v1 + c->vmax_bc(DEST::xyzw, BC::w, vf1, vf0, vf0); // vmaxw.xyzw vf1, vf0, vf0 + c->pminw(v1, a3, v1); // pminw v1, a3, v1 + c->lqc2(vf23, 448, a2); // lqc2 vf23, 448(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf24, 464, a2); // lqc2 vf24, 464(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf25, 480, a2); // lqc2 vf25, 480(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf26, 496, a2); // lqc2 vf26, 496(a2) + // nop // sll r0, r0, 0 + c->sq(t0, 400, a2); // sq t0, 400(a2) + // nop // sll r0, r0, 0 + c->sq(v1, 416, a2); // sq v1, 416(a2) + c->vsub(DEST::xyzw, vf8, vf8, vf2); // vsub.xyzw vf8, vf8, vf2 + // nop // sll r0, r0, 0 + c->addiu(t8, r0, 4); // addiu t8, r0, 4 + c->lbu(v1, 40, a1); // lbu v1, 40(a1) + c->multu3(t9, v1, t8); // multu3 t9, v1, t8 + c->lbu(v1, 42, a1); // lbu v1, 42(a1) + c->multu3(t6, v1, t9); // multu3 t6, v1, t9 + c->addiu(v1, r0, 1); // addiu v1, r0, 1 + c->lw(a3, 400, a2); // lw a3, 400(a2) + c->dsubu(v1, v1, a3); // dsubu v1, v1, a3 + c->lw(a3, 416, a2); // lw a3, 416(a2) + c->daddu(v1, v1, a3); // daddu v1, v1, a3 + c->addiu(a3, r0, 1); // addiu a3, r0, 1 + c->lw(t0, 404, a2); // lw t0, 404(a2) + c->dsubu(a3, a3, t0); // dsubu a3, a3, t0 + c->lw(t0, 420, a2); // lw t0, 420(a2) + c->daddu(a3, a3, t0); // daddu a3, a3, t0 + c->addiu(t0, r0, 1); // addiu t0, r0, 1 + c->lw(t1, 408, a2); // lw t1, 408(a2) + c->dsubu(t0, t0, t1); // dsubu t0, t0, t1 + c->lw(t1, 424, a2); // lw t1, 424(a2) + c->daddu(t0, t0, t1); // daddu t0, t0, t1 + c->lwu(t1, 8, a1); // lwu t1, 8(a1) + c->lw(t2, 400, a2); // lw t2, 400(a2) + c->mult3(t2, t2, t8); // mult3 t2, t2, t8 + c->lw(t3, 404, a2); // lw t3, 404(a2) + c->mult3(t3, t3, t6); // mult3 t3, t3, t6 + c->daddu(t2, t2, t3); // daddu t2, t2, t3 + c->lw(t3, 408, a2); // lw t3, 408(a2) + c->mult3(t3, t3, t9); // mult3 t3, t3, t9 + c->daddu(t2, t2, t3); // daddu t2, t2, t3 + c->daddu(t7, t1, t2); // daddu t7, t1, t2 + c->mov64(t1, a3); // or t1, a3, r0 + // nop // sll r0, r0, 0 + +block_2: + c->mov64(t2, t0); // or t2, t0, r0 + c->mov64(ra, t7); // or ra, t7, r0 + // nop // sll r0, r0, 0 + c->sw(t7, 524, a2); // sw t7, 524(a2) + // nop // sll r0, r0, 0 + c->sw(t6, 528, a2); // sw t6, 528(a2) + +block_3: + c->mov64(t6, v1); // or t6, v1, r0 + c->mov64(t7, ra); // or t7, ra, r0 + // nop // sll r0, r0, 0 + c->sw(ra, 532, a2); // sw ra, 532(a2) + // nop // sll r0, r0, 0 + c->sw(t9, 536, a2); // sw t9, 536(a2) + +block_4: + // nop // sll r0, r0, 0 + c->sw(t8, 520, a2); // sw t8, 520(a2) + c->dsubu(s5, v1, t6); // dsubu s5, v1, t6 + c->lw(s4, 400, a2); // lw s4, 400(a2) + c->dsubu(ra, a3, t1); // dsubu ra, a3, t1 + c->lw(gp, 404, a2); // lw gp, 404(a2) + c->dsubu(t8, t0, t2); // dsubu t8, t0, t2 + c->lw(t9, 408, a2); // lw t9, 408(a2) + c->daddu(s5, s5, s4); // daddu s5, s5, s4 + c->sw(r0, 444, a2); // sw r0, 444(a2) + c->daddu(ra, ra, gp); // daddu ra, ra, gp + c->sw(s5, 432, a2); // sw s5, 432(a2) + c->daddu(t8, t8, t9); // daddu t8, t8, t9 + c->sw(ra, 436, a2); // sw ra, 436(a2) + // nop // sll r0, r0, 0 + c->sw(t8, 440, a2); // sw t8, 440(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf3, 432, a2); // lqc2 vf3, 432(a2) + c->vitof0(DEST::xyzw, vf3, vf3); // vitof0.xyzw vf3, vf3 + // nop // sll r0, r0, 0 + c->vmula(DEST::xyzw, vf3, vf6); // vmula.xyzw acc, vf3, vf6 + // nop // sll r0, r0, 0 + c->vmsub_bc(DEST::xyzw, BC::w, vf3, vf1, vf10); // vmsubw.xyzw vf3, vf1, vf10 + // nop // sll r0, r0, 0 + c->vmadda(DEST::xyzw, vf1, vf6); // vmadda.xyzw acc, vf1, vf6 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::w, vf4, vf1, vf10); // vmaddw.xyzw vf4, vf1, vf10 + // nop // sll r0, r0, 0 + c->vmula(DEST::xyzw, vf7, vf3); // vmula.xyzw acc, vf7, vf3 + // nop // sll r0, r0, 0 + c->vmsuba(DEST::xyzw, vf7, vf8); // vmsuba.xyzw acc, vf7, vf8 + // nop // sll r0, r0, 0 + c->vmsub(DEST::xyzw, vf13, vf1, vf10); // vmsub.xyzw vf13, vf1, vf10 + // nop // sll r0, r0, 0 + c->vmadd(DEST::xyzw, vf15, vf1, vf11); // vmadd.xyzw vf15, vf1, vf11 + // nop // sll r0, r0, 0 + c->vmula(DEST::xyzw, vf7, vf4); // vmula.xyzw acc, vf7, vf4 + // nop // sll r0, r0, 0 + c->vmsuba(DEST::xyzw, vf7, vf8); // vmsuba.xyzw acc, vf7, vf8 + // nop // sll r0, r0, 0 + c->vmsub(DEST::xyzw, vf14, vf1, vf11); // vmsub.xyzw vf14, vf1, vf11 + // nop // sll r0, r0, 0 + c->vmadd(DEST::xyzw, vf16, vf1, vf10); // vmadd.xyzw vf16, vf1, vf10 + // nop // sll r0, r0, 0 + c->vmax(DEST::xyzw, vf13, vf13, vf14); // vmax.xyzw vf13, vf13, vf14 + // nop // sll r0, r0, 0 + c->vmini(DEST::xyzw, vf15, vf15, vf16); // vmini.xyzw vf15, vf15, vf16 + // nop // sll r0, r0, 0 + c->vmax_bc(DEST::xyzw, BC::y, vf13, vf13, vf13); // vmaxy.xyzw vf13, vf13, vf13 + // nop // sll r0, r0, 0 + c->vmini_bc(DEST::xyzw, BC::y, vf15, vf15, vf15); // vminiy.xyzw vf15, vf15, vf15 + // nop // sll r0, r0, 0 + c->vmax_bc(DEST::xyzw, BC::z, vf13, vf13, vf13); // vmaxz.xyzw vf13, vf13, vf13 + // nop // sll r0, r0, 0 + c->vmini_bc(DEST::xyzw, BC::z, vf15, vf15, vf15); // vminiz.xyzw vf15, vf15, vf15 + // nop // sll r0, r0, 0 + c->vftoi12(DEST::xyzw, vf13, vf13); // vftoi12.xyzw vf13, vf13 + // nop // sll r0, r0, 0 + c->vftoi12(DEST::xyzw, vf15, vf15); // vftoi12.xyzw vf15, vf15 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(ra, vf13); // qmfc2.i ra, vf13 + c->addiu(gp, r0, 4096); // addiu gp, r0, 4096 + c->mov128_gpr_vf(t8, vf15); // qmfc2.i t8, vf15 + c->subu(t9, t8, ra); // subu t9, t8, ra + c->subu(ra, gp, ra); // subu ra, gp, ra + bc = ((s64)c->sgpr64(t9)) < 0; // bltz t9, L62 + // nop // sll r0, r0, 0 + if (bc) {goto block_18;} // branch non-likely + + bc = ((s64)c->sgpr64(ra)) < 0; // bltz ra, L62 + // nop // sll r0, r0, 0 + if (bc) {goto block_18;} // branch non-likely + + bc = ((s64)c->sgpr64(t8)) < 0; // bltz t8, L62 + // nop // sll r0, r0, 0 + if (bc) {goto block_18;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lhu(ra, 0, t7); // lhu ra, 0(t7) + // nop // sll r0, r0, 0 + c->lw(gp, 104, a1); // lw gp, 104(a1) + // nop // sll r0, r0, 0 + c->lhu(t8, 2, t7); // lhu t8, 2(t7) + // nop // sll r0, r0, 0 + c->lw(t9, 72, a1); // lw t9, 72(a1) + bc = c->sgpr64(t8) == 0; // beq t8, r0, L62 + c->daddu(ra, ra, gp); // daddu ra, ra, gp + if (bc) {goto block_18;} // branch non-likely + + +block_8: + get_fake_spad_addr2(gp, cache.fake_scratchpad_data, 0, c);// lui gp, 28672 + c->lbu(s4, 0, ra); // lbu s4, 0(ra) + c->addiu(s3, r0, 1); // addiu s3, r0, 1 + c->andi(s2, s4, 7); // andi s2, s4, 7 + c->sra(s5, s4, 3); // sra s5, s4, 3 + c->sll(s4, s4, 2); // sll s4, s4, 2 + c->daddu(s5, s5, gp); // daddu s5, s5, gp + c->daddu(s4, s4, t9); // daddu s4, s4, t9 + c->sllv(s3, s3, s2); // sllv s3, s3, s2 + c->lb(s2, 0, s5); // lb s2, 0(s5) + // nop // sll r0, r0, 0 + c->lbu(s0, 3, s4); // lbu s0, 3(s4) + c->and_(s1, s2, s3); // and s1, s2, s3 + c->daddiu(t8, t8, -1); // daddiu t8, t8, -1 + bc = c->sgpr64(s1) != 0; // bne s1, r0, L61 + c->lw(s1, 4, a1); // lw s1, 4(a1) + if (bc) {goto block_17;} // branch non-likely + + c->dsll(s0, s0, 2); // dsll s0, s0, 2 + c->or_(s3, s2, s3); // or s3, s2, s3 + c->daddu(s2, s0, s1); // daddu s2, s0, s1 + c->sb(s3, 0, s5); // sb s3, 0(s5) + // nop // sll r0, r0, 0 + c->lwu(s5, 0, s2); // lwu s5, 0(s2) + // nop // sll r0, r0, 0 + c->lwu(s2, 96, a2); // lwu s2, 96(a2) + // nop // sll r0, r0, 0 + c->lw(s3, 88, a1); // lw s3, 88(a1) + c->and_(s2, s2, s5); // and s2, s2, s5 + c->lbu(s1, 0, s4); // lbu s1, 0(s4) + bc = c->sgpr64(s2) != 0; // bne s2, r0, L61 + c->lbu(s2, 1, s4); // lbu s2, 1(s4) + if (bc) {goto block_17;} // branch non-likely + + c->sll(s1, s1, 1); // sll s1, s1, 1 + c->lbu(s4, 2, s4); // lbu s4, 2(s4) + c->sll(s0, s1, 1); // sll s0, s1, 1 + c->sll(s2, s2, 1); // sll s2, s2, 1 + c->daddu(s1, s1, s0); // daddu s1, s1, s0 + c->sll(s0, s2, 1); // sll s0, s2, 1 + c->sll(s4, s4, 1); // sll s4, s4, 1 + c->daddu(s0, s2, s0); // daddu s0, s2, s0 + c->sll(v0, s4, 1); // sll v0, s4, 1 + c->daddu(s2, s1, s3); // daddu s2, s1, s3 + c->daddu(s1, s4, v0); // daddu s1, s4, v0 + c->daddu(s4, s0, s3); // daddu s4, s0, s3 + c->daddu(s3, s1, s3); // daddu s3, s1, s3 + c->ldr(t3, 0, s2); // ldr t3, 0(s2) + // nop // sll r0, r0, 0 + c->ldl(t3, 7, s2); // ldl t3, 7(s2) + // nop // sll r0, r0, 0 + c->ldr(t4, 0, s4); // ldr t4, 0(s4) + c->pextlh(t3, r0, t3); // pextlh t3, r0, t3 + c->ldl(t4, 7, s4); // ldl t4, 7(s4) + c->psllw(t3, t3, 4); // psllw t3, t3, 4 + c->ldr(t5, 0, s3); // ldr t5, 0(s3) + c->pextlh(t4, r0, t4); // pextlh t4, r0, t4 + c->ldl(t5, 7, s3); // ldl t5, 7(s3) + c->psllw(t4, t4, 4); // psllw t4, t4, 4 + c->mov128_vf_gpr(vf17, t3); // qmtc2.i vf17, t3 + c->pextlh(t5, r0, t5); // pextlh t5, r0, t5 + c->mov128_vf_gpr(vf18, t4); // qmtc2.i vf18, t4 + c->psllw(t5, t5, 4); // psllw t5, t5, 4 + c->lw(s4, 2048, gp); // lw s4, 2048(gp) + c->mov128_vf_gpr(vf19, t5); // qmtc2.i vf19, t5 + // nop // sll r0, r0, 0 + c->vitof0(DEST::xyzw, vf17, vf17); // vitof0.xyzw vf17, vf17 + c->daddiu(s4, s4, 1); // daddiu s4, s4, 1 + c->vitof0(DEST::xyzw, vf18, vf18); // vitof0.xyzw vf18, vf18 + c->sw(s4, 2048, gp); // sw s4, 2048(gp) + c->vitof0(DEST::xyzw, vf19, vf19); // vitof0.xyzw vf19, vf19 + // nop // sll r0, r0, 0 + c->vmini(DEST::xyzw, vf3, vf17, vf18); // vmini.xyzw vf3, vf17, vf18 + // nop // sll r0, r0, 0 + c->vmax(DEST::xyzw, vf4, vf17, vf18); // vmax.xyzw vf4, vf17, vf18 + // nop // sll r0, r0, 0 + c->vadd(DEST::xyzw, vf17, vf17, vf2); // vadd.xyzw vf17, vf17, vf2 + // nop // sll r0, r0, 0 + c->vadd(DEST::xyzw, vf18, vf18, vf2); // vadd.xyzw vf18, vf18, vf2 + // nop // sll r0, r0, 0 + c->vmini(DEST::xyzw, vf3, vf3, vf19); // vmini.xyzw vf3, vf3, vf19 + // nop // sll r0, r0, 0 + c->vmax(DEST::xyzw, vf4, vf4, vf19); // vmax.xyzw vf4, vf4, vf19 + // nop // sll r0, r0, 0 + c->vadd(DEST::xyzw, vf19, vf19, vf2); // vadd.xyzw vf19, vf19, vf2 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->vsub_bc(DEST::xyzw, BC::w, vf3, vf3, vf10); // vsubw.xyzw vf3, vf3, vf10 + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::xyzw, BC::w, vf4, vf4, vf10); // vaddw.xyzw vf4, vf4, vf10 + // nop // sll r0, r0, 0 + c->vmula(DEST::xyzw, vf7, vf3); // vmula.xyzw acc, vf7, vf3 + // nop // sll r0, r0, 0 + c->vmsuba(DEST::xyzw, vf7, vf8); // vmsuba.xyzw acc, vf7, vf8 + // nop // sll r0, r0, 0 + c->vmsub(DEST::xyzw, vf13, vf1, vf10); // vmsub.xyzw vf13, vf1, vf10 + // nop // sll r0, r0, 0 + c->vmadd(DEST::xyzw, vf15, vf1, vf11); // vmadd.xyzw vf15, vf1, vf11 + // nop // sll r0, r0, 0 + c->vmula(DEST::xyzw, vf7, vf4); // vmula.xyzw acc, vf7, vf4 + // nop // sll r0, r0, 0 + c->vmsuba(DEST::xyzw, vf7, vf8); // vmsuba.xyzw acc, vf7, vf8 + // nop // sll r0, r0, 0 + c->vmsub(DEST::xyzw, vf14, vf1, vf11); // vmsub.xyzw vf14, vf1, vf11 + // nop // sll r0, r0, 0 + c->vmadd(DEST::xyzw, vf16, vf1, vf10); // vmadd.xyzw vf16, vf1, vf10 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::x, vf23, vf17); // vmulax.xyzw acc, vf23, vf17 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf24, vf17); // vmadday.xyzw acc, vf24, vf17 + // nop // sll r0, r0, 0 + c->vmax(DEST::xyzw, vf13, vf13, vf14); // vmax.xyzw vf13, vf13, vf14 + // nop // sll r0, r0, 0 + c->vmini(DEST::xyzw, vf15, vf15, vf16); // vmini.xyzw vf15, vf15, vf16 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::z, vf25, vf17); // vmaddaz.xyzw acc, vf25, vf17 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::w, vf20, vf26, vf0); // vmaddw.xyzw vf20, vf26, vf0 + // nop // sll r0, r0, 0 + c->vmax_bc(DEST::xyzw, BC::y, vf13, vf13, vf13); // vmaxy.xyzw vf13, vf13, vf13 + // nop // sll r0, r0, 0 + c->vmini_bc(DEST::xyzw, BC::y, vf15, vf15, vf15); // vminiy.xyzw vf15, vf15, vf15 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::x, vf23, vf18); // vmulax.xyzw acc, vf23, vf18 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf24, vf18); // vmadday.xyzw acc, vf24, vf18 + // nop // sll r0, r0, 0 + c->vmax_bc(DEST::xyzw, BC::z, vf13, vf13, vf13); // vmaxz.xyzw vf13, vf13, vf13 + // nop // sll r0, r0, 0 + c->vmini_bc(DEST::xyzw, BC::z, vf15, vf15, vf15); // vminiz.xyzw vf15, vf15, vf15 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::z, vf25, vf18); // vmaddaz.xyzw acc, vf25, vf18 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::w, vf21, vf26, vf0); // vmaddw.xyzw vf21, vf26, vf0 + // nop // sll r0, r0, 0 + c->vftoi12(DEST::xyzw, vf13, vf13); // vftoi12.xyzw vf13, vf13 + // nop // sll r0, r0, 0 + c->vftoi12(DEST::xyzw, vf15, vf15); // vftoi12.xyzw vf15, vf15 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::x, vf23, vf19); // vmulax.xyzw acc, vf23, vf19 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf24, vf19); // vmadday.xyzw acc, vf24, vf19 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(s3, vf13); // qmfc2.i s3, vf13 + c->addiu(s2, r0, 4096); // addiu s2, r0, 4096 + c->mov128_gpr_vf(s4, vf15); // qmfc2.i s4, vf15 + c->subu(gp, s4, s3); // subu gp, s4, s3 + c->subu(s3, s2, s3); // subu s3, s2, s3 + bc = ((s64)c->sgpr64(gp)) < 0; // bltz gp, L61 + c->lwu(gp, 512, a2); // lwu gp, 512(a2) + if (bc) {goto block_17;} // branch non-likely + + bc = ((s64)c->sgpr64(s3)) < 0; // bltz s3, L61 + // nop // sll r0, r0, 0 + if (bc) {goto block_17;} // branch non-likely + + bc = ((s64)c->sgpr64(s4)) < 0; // bltz s4, L61 + // nop // sll r0, r0, 0 + if (bc) {goto block_17;} // branch non-likely + + c->pextlw(s5, gp, s5); // pextlw s5, gp, s5 + c->lw(s3, 0, a0); // lw s3, 0(a0) + // nop // sll r0, r0, 0 + c->daddiu(s4, a0, 4908); // daddiu s4, a0, 4908 + c->daddiu(s2, s3, -460); // daddiu s2, s3, -460 + // nop // sll r0, r0, 0 + bc = ((s64)c->sgpr64(s2)) >= 0; // bgez s2, L64 + c->dsll(s2, s3, 6); // dsll s2, s3, 6 + if (bc) {goto block_23;} // branch non-likely + + c->daddiu(s3, s3, 1); // daddiu s3, s3, 1 + c->daddu(s4, s4, s2); // daddu s4, s4, s2 + bc = c->sgpr64(gp) == c->sgpr64(s7); // beq gp, s7, L60 + c->sw(s3, 0, a0); // sw s3, 0(a0) + if (bc) {goto block_16;} // branch non-likely + + c->vmadda_bc(DEST::xyzw, BC::z, vf25, vf19); // vmaddaz.xyzw acc, vf25, vf19 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::w, vf22, vf26, vf0); // vmaddw.xyzw vf22, vf26, vf0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->sq(s5, 48, s4); // sq s5, 48(s4) + // nop // sll r0, r0, 0 + c->sqc2(vf20, 0, s4); // sqc2 vf20, 0(s4) + // nop // sll r0, r0, 0 + c->sqc2(vf21, 16, s4); // sqc2 vf21, 16(s4) + //beq r0, r0, L61 // beq r0, r0, L61 + c->sqc2(vf22, 32, s4); // sqc2 vf22, 32(s4) + goto block_17; // branch always + + +block_16: + // nop // sll r0, r0, 0 + c->sq(s5, 48, s4); // sq s5, 48(s4) + // nop // sll r0, r0, 0 + c->sqc2(vf17, 0, s4); // sqc2 vf17, 0(s4) + // nop // sll r0, r0, 0 + c->sqc2(vf18, 16, s4); // sqc2 vf18, 16(s4) + // nop // sll r0, r0, 0 + c->sqc2(vf19, 32, s4); // sqc2 vf19, 32(s4) + +block_17: + bc = ((s64)c->sgpr64(t8)) > 0; // bgtz t8, L59 + c->daddiu(ra, ra, 1); // daddiu ra, ra, 1 + if (bc) {goto block_8;} // branch non-likely + + +block_18: + // nop // sll r0, r0, 0 + c->lw(t8, 520, a2); // lw t8, 520(a2) + c->daddiu(t6, t6, -1); // daddiu t6, t6, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t6) != 0; // bne t6, r0, L58 + c->daddu(t7, t7, t8); // daddu t7, t7, t8 + if (bc) {goto block_4;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lw(t6, 532, a2); // lw t6, 532(a2) + // nop // sll r0, r0, 0 + c->lw(t9, 536, a2); // lw t9, 536(a2) + c->daddiu(t2, t2, -1); // daddiu t2, t2, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t2) != 0; // bne t2, r0, L57 + c->daddu(ra, t6, t9); // daddu ra, t6, t9 + if (bc) {goto block_3;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lw(t2, 524, a2); // lw t2, 524(a2) + // nop // sll r0, r0, 0 + c->lw(t6, 528, a2); // lw t6, 528(a2) + c->daddiu(t1, t1, -1); // daddiu t1, t1, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t1) != 0; // bne t1, r0, L56 + c->daddu(t7, t2, t6); // daddu t7, t2, t6 + if (bc) {goto block_2;} // branch non-likely + + c->load_symbol2(v1, cache.collide_stats); // lw v1, *collide-stats*(s7) + c->lwu(v1, 12, v1); // lwu v1, 12(v1) + c->daddiu(v1, v1, 1); // daddiu v1, v1, 1 + c->load_symbol2(a0, cache.collide_stats); // lw a0, *collide-stats*(s7) + c->sw(v1, 12, a0); // sw v1, 12(a0) + +block_22: + c->mov64(v0, s7); // or v0, s7, r0 + //beq r0, r0, L66 // beq r0, r0, L66 + // nop // sll r0, r0, 0 + goto block_26; // branch always + + +block_23: + c->load_symbol_addr(v1, cache.debug); // daddiu v1, s7, debug + c->load_symbol2(a0, cache.cheat_mode); // lw a0, *cheat-mode*(s7) + bc = c->sgpr64(a0) != c->sgpr64(v1); // bne a0, v1, L65 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_25;} // branch non-likely + + c->load_symbol2(t9, cache.print_exceeded_max_cache_tris);// lw t9, print-exceeded-max-cache-tris(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->mov64(v1, v0); // or v1, v0, r0 + +block_25: + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + +block_26: + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 112, sp); // lq gp, 112(sp) + c->lq(s5, 96, sp); // lq s5, 96(sp) + c->lq(s4, 80, sp); // lq s4, 80(sp) + c->lq(s3, 64, sp); // lq s3, 64(sp) + c->lq(s2, 48, sp); // lq s2, 48(sp) + c->lq(s1, 32, sp); // lq s1, 32(sp) + c->lq(s0, 16, sp); // lq s0, 16(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 128); // daddiu sp, sp, 128 + 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.cheat_mode = intern_from_c(-1, 0, "*cheat-mode*").c(); + cache.collide_stats = intern_from_c(-1, 0, "*collide-stats*").c(); + cache.fake_scratchpad_data = intern_from_c(-1, 0, "*fake-scratchpad-data*").c(); + cache.debug = intern_from_c(-1, 0, "debug").c(); + cache.print_exceeded_max_cache_tris = intern_from_c(-1, 0, "print-exceeded-max-cache-tris").c(); + gLinkedFunctionTable.reg("fill-bg-using-line-sphere-new", execute, 256); +} + +} // namespace fill_bg_using_line_sphere_new +} // namespace Mips2C \ No newline at end of file diff --git a/game/mips2c/jak3_functions/collide_mesh.cpp b/game/mips2c/jak3_functions/collide_mesh.cpp new file mode 100644 index 0000000000..001bbf796e --- /dev/null +++ b/game/mips2c/jak3_functions/collide_mesh.cpp @@ -0,0 +1,719 @@ +//--------------------------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_12_collide_mesh { +struct Cache { + void* closest_pt_in_triangle; // closest-pt-in-triangle +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + bool cop1_bc = false; + c->daddiu(sp, sp, -160); // daddiu sp, sp, -160 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s1, 64, sp); // sq s1, 64(sp) + c->sq(s2, 80, sp); // sq s2, 80(sp) + c->sq(s3, 96, sp); // sq s3, 96(sp) + c->sq(s4, 112, sp); // sq s4, 112(sp) + c->sq(s5, 128, sp); // sq s5, 128(sp) + c->sq(gp, 144, sp); // sq gp, 144(sp) + c->mov64(gp, a2); // or gp, a2, r0 + c->mov64(s5, a3); // or s5, a3, r0 + c->mov64(s3, t0); // or s3, t0, r0 + c->daddiu(s4, sp, 16); // daddiu s4, sp, 16 + c->lui(v1, 17141); // lui v1, 17141 + c->ori(v1, v1, 49807); // ori v1, v1, 49807 + // nop // sll r0, r0, 0 + c->mov64(s2, a1); // or s2, a1, r0 + c->lqc2(vf3, 0, s5); // lqc2 vf3, 0(s5) + c->mov128_vf_gpr(vf14, v1); // qmtc2.i vf14, v1 + c->lwu(s1, 4, a0); // lwu s1, 4(a0) + c->vadd_bc(DEST::w, BC::x, vf3, vf3, vf14); // vaddx.w vf3, vf3, vf14 + // nop // sll r0, r0, 0 + c->vsub_bc(DEST::xyzw, BC::w, vf12, vf3, vf3); // vsubw.xyzw vf12, vf3, vf3 + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::xyzw, BC::w, vf13, vf3, vf3); // vaddw.xyzw vf13, vf3, vf3 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf12, vf12); // vftoi0.xyzw vf12, vf12 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf13, vf13); // vftoi0.xyzw vf13, vf13 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(v1, vf12); // qmfc2.i v1, vf12 + c->sqc2(vf12, 16, s4); // sqc2 vf12, 16(s4) + c->mov128_gpr_vf(a0, vf13); // qmfc2.i a0, vf13 + c->sqc2(vf13, 32, s4); // sqc2 vf13, 32(s4) + +block_1: + bc = c->sgpr64(s1) == 0; // beq s1, r0, L34 + c->lwu(a2, 60, s2); // lwu a2, 60(s2) + if (bc) {goto block_14;} // branch non-likely + + c->addiu(a3, r0, 896); // addiu a3, r0, 896 + c->addiu(a1, r0, 0); // addiu a1, r0, 0 + c->and_(a2, a2, a3); // and a2, a2, a3 + c->addiu(a3, r0, 256); // addiu a3, r0, 256 + bc = c->sgpr64(a2) == c->sgpr64(a1); // beq a2, a1, L32 + c->daddiu(s1, s1, -1); // daddiu s1, s1, -1 + if (bc) {goto block_5;} // branch non-likely + + if (((s64)c->sgpr64(a2)) != ((s64)c->sgpr64(a3))) {// bnel a2, a3, L31 + c->daddiu(s2, s2, 96); // daddiu s2, s2, 96 + goto block_1; + } + +block_5: + // nop // sll r0, r0, 0 + c->lq(a2, 64, s2); // lq a2, 64(s2) + // nop // sll r0, r0, 0 + c->lq(a1, 80, s2); // lq a1, 80(s2) + c->pcgtw(a2, a2, a0); // pcgtw a2, a2, a0 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcgtw(a1, v1, a1); // pcgtw a1, v1, a1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->por(a1, a2, a1); // por a1, a2, a1 + // nop // sll r0, r0, 0 + c->ppach(a1, r0, a1); // ppach a1, r0, a1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->dsll(a1, a1, 16); // dsll a1, a1, 16 + // nop // sll r0, r0, 0 + if (((s64)c->sgpr64(a1)) != ((s64)0)) { // bnel a1, r0, L31 + c->daddiu(s2, s2, 96); // daddiu s2, s2, 96 + goto block_1; + } + +// block_7: + c->load_symbol2(t9, cache.closest_pt_in_triangle);// lw t9, closest-pt-in-triangle(s7) + c->daddu(a0, r0, s4); // daddu a0, r0, s4 + c->mov64(a1, s5); // or a1, s5, r0 + c->daddu(a2, r0, s2); // daddu a2, r0, s2 + c->daddiu(a3, s2, 48); // daddiu a3, s2, 48 + 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->lqc2(vf2, 0, s4); // lqc2 vf2, 0(s4) + c->lqc2(vf3, 0, s5); // lqc2 vf3, 0(s5) + c->lqc2(vf1, 48, s2); // lqc2 vf1, 48(s2) + c->lq(v1, 16, s4); // lq v1, 16(s4) + c->lq(a0, 32, s4); // lq a0, 32(s4) + c->vsub(DEST::xyzw, vf4, vf3, vf2); // vsub.xyzw vf4, vf3, vf2 + c->lwu(a1, 60, s2); // lwu a1, 60(s2) + c->vmul(DEST::xyzw, vf5, vf4, vf1); // vmul.xyzw vf5, vf4, vf1 + c->lqc2(vf7, 0, s2); // lqc2 vf7, 0(s2) + c->vmul(DEST::xyzw, vf6, vf4, vf4); // vmul.xyzw vf6, vf4, vf4 + c->lqc2(vf8, 16, s2); // lqc2 vf8, 16(s2) + c->vmove(DEST::w, vf1, vf0); // vmove.w vf1, vf0 + c->lqc2(vf9, 32, s2); // lqc2 vf9, 32(s2) + c->vadd_bc(DEST::y, BC::x, vf5, vf5, vf5); // vaddx.y vf5, vf5, vf5 + c->daddiu(s2, s2, 96); // daddiu s2, s2, 96 + c->vadd_bc(DEST::x, BC::y, vf6, vf6, vf6); // vaddy.x vf6, vf6, vf6 + c->mtc1(f5, s3); // mtc1 f5, s3 + c->vadd_bc(DEST::y, BC::z, vf5, vf5, vf5); // vaddz.y vf5, vf5, vf5 + c->lui(a2, 17141); // lui a2, 17141 + c->ori(a2, a2, 49807); // ori a2, a2, 49807 + c->mtc1(f3, a2); // mtc1 f3, a2 + c->vadd_bc(DEST::x, BC::z, vf6, vf6, vf6); // vaddz.x vf6, vf6, vf6 + c->lui(a2, -15232); // lui a2, -15232 + c->mtc1(f4, a2); // mtc1 f4, a2 + c->vsqrt(vf6, BC::x); // vsqrt Q, vf6.x + c->mov128_gpr_vf(a2, vf5); // qmfc2.i a2, vf5 + c->vwaitq(); // vwaitq + c->lwc1(f1, 12, s5); // lwc1 f1, 12(s5) + c->vaddq(DEST::x, vf6, vf0); // vaddq.x vf6, vf0, Q + c->vmove(DEST::xyzw, vf10, vf6); // vmove.xyzw vf10, vf6 + if (((s64)c->sgpr64(a2)) < 0) { // bltzl a2, L33 + c->vsub(DEST::xyzw, vf10, vf0, vf10); // vsub.xyzw vf10, vf0, vf10 + goto block_9; + } + +block_9: + c->mov128_gpr_vf(a2, vf10); // qmfc2.i a2, vf10 + c->mtc1(f2, a2); // mtc1 f2, a2 + c->subs(f2, f2, f1); // sub.s f2, f2, f1 + cop1_bc = c->fprs[f5] < c->fprs[f2]; // c.lt.s f5, f2 + bc = cop1_bc; // bc1t L31 + c->vdiv(vf0, BC::w, vf6, BC::x); // vdiv Q, vf0.w, vf6.x + if (bc) {goto block_1;} // branch non-likely + + cop1_bc = c->fprs[f3] <= c->fprs[f2]; // c.le.s f3, f2 + bc = cop1_bc; // bc1t L31 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + cop1_bc = c->fprs[f2] <= c->fprs[f4]; // c.le.s f2, f4 + bc = cop1_bc; // bc1t L31 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + c->vwaitq(); // vwaitq + // nop // sll r0, r0, 0 + c->vmulq(DEST::xyzw, vf11, vf4); // vmulq.xyzw vf11, vf4, Q + c->lui(a2, 16180); // lui a2, 16180 + c->ori(a2, a2, 65012); // ori a2, a2, 65012 + c->mtc1(f6, a2); // mtc1 f6, a2 + c->vmul(DEST::xyzw, vf5, vf11, vf1); // vmul.xyzw vf5, vf11, vf1 + c->vadd_bc(DEST::x, BC::y, vf5, vf5, vf5); // vaddy.x vf5, vf5, vf5 + c->vadd_bc(DEST::x, BC::z, vf5, vf5, vf5); // vaddz.x vf5, vf5, vf5 + c->mov128_gpr_vf(a2, vf5); // qmfc2.i a2, vf5 + c->mtc1(f7, a2); // mtc1 f7, a2 + cop1_bc = c->fprs[f7] < c->fprs[f6]; // c.lt.s f7, f6 + bc = cop1_bc; // bc1t L31 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + c->mfc1(s3, f2); // mfc1 s3, f2 + c->sqc2(vf7, 0, gp); // sqc2 vf7, 0(gp) + c->sqc2(vf8, 16, gp); // sqc2 vf8, 16(gp) + c->sqc2(vf9, 32, gp); // sqc2 vf9, 32(gp) + c->sqc2(vf2, 48, gp); // sqc2 vf2, 48(gp) + c->sqc2(vf1, 64, gp); // sqc2 vf1, 64(gp) + //beq r0, r0, L31 // beq r0, r0, L31 + c->sw(a1, 80, gp); // sw a1, 80(gp) + goto block_1; // branch always + + +block_14: + c->mov64(v0, s3); // or v0, s3, r0 + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 144, sp); // lq gp, 144(sp) + c->lq(s5, 128, sp); // lq s5, 128(sp) + c->lq(s4, 112, sp); // lq s4, 112(sp) + c->lq(s3, 96, sp); // lq s3, 96(sp) + c->lq(s2, 80, sp); // lq s2, 80(sp) + c->lq(s1, 64, sp); // lq s1, 64(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 160); // daddiu sp, sp, 160 + 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.closest_pt_in_triangle = intern_from_c(-1, 0, "closest-pt-in-triangle").c(); + gLinkedFunctionTable.reg("(method 12 collide-mesh)", execute, 256); +} + +} // namespace method_12_collide_mesh +} // 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_14_collide_mesh { +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->lwu(v1, 12, a0); // lwu v1, 12(a0) + // nop // sll r0, r0, 0 + c->lwu(a0, 8, a0); // lwu a0, 8(a0) + // nop // sll r0, r0, 0 + c->lqc2(vf1, 0, a1); // lqc2 vf1, 0(a1) + // nop // sll r0, r0, 0 + c->lqc2(vf2, 16, a1); // lqc2 vf2, 16(a1) + // nop // sll r0, r0, 0 + c->lqc2(vf3, 32, a1); // lqc2 vf3, 32(a1) + // nop // sll r0, r0, 0 + c->lqc2(vf4, 48, a1); // lqc2 vf4, 48(a1) + // nop // sll r0, r0, 0 + c->lqc2(vf5, 0, v1); // lqc2 vf5, 0(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf6, 16, v1); // lqc2 vf6, 16(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf7, 32, v1); // lqc2 vf7, 32(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf8, 48, v1); // lqc2 vf8, 48(v1) + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + c->lqc2(vf9, 64, v1); // lqc2 vf9, 64(v1) + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf5); // vmaddax.xyzw acc, vf1, vf5 + c->lqc2(vf10, 80, v1); // lqc2 vf10, 80(v1) + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf5); // vmadday.xyzw acc, vf2, vf5 + c->lqc2(vf11, 96, v1); // lqc2 vf11, 96(v1) + c->vmadd_bc(DEST::xyzw, BC::z, vf5, vf3, vf5); // vmaddz.xyzw vf5, vf3, vf5 + c->lqc2(vf12, 112, v1); // lqc2 vf12, 112(v1) + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf6); // vmaddax.xyzw acc, vf1, vf6 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf6); // vmadday.xyzw acc, vf2, vf6 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf6, vf3, vf6); // vmaddz.xyzw vf6, vf3, vf6 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf7); // vmaddax.xyzw acc, vf1, vf7 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf7); // vmadday.xyzw acc, vf2, vf7 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf7, vf3, vf7); // vmaddz.xyzw vf7, vf3, vf7 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf8); // vmaddax.xyzw acc, vf1, vf8 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf8); // vmadday.xyzw acc, vf2, vf8 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf8, vf3, vf8); // vmaddz.xyzw vf8, vf3, vf8 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf13, vf5); // vftoi0.xyzw vf13, vf5 + c->sqc2(vf5, 0, a2); // sqc2 vf5, 0(a2) + c->vftoi0(DEST::xyzw, vf14, vf6); // vftoi0.xyzw vf14, vf6 + c->sqc2(vf6, 32, a2); // sqc2 vf6, 32(a2) + c->vftoi0(DEST::xyzw, vf15, vf7); // vftoi0.xyzw vf15, vf7 + c->sqc2(vf7, 64, a2); // sqc2 vf7, 64(a2) + c->vftoi0(DEST::xyzw, vf16, vf8); // vftoi0.xyzw vf16, vf8 + c->sqc2(vf8, 96, a2); // sqc2 vf8, 96(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf13, 16, a2); // sqc2 vf13, 16(a2) + c->daddiu(a0, a0, -4); // daddiu a0, a0, -4 + c->sqc2(vf14, 48, a2); // sqc2 vf14, 48(a2) + c->daddiu(v1, v1, 128); // daddiu v1, v1, 128 + c->sqc2(vf15, 80, a2); // sqc2 vf15, 80(a2) + bc = ((s64)c->sgpr64(a0)) <= 0; // blez a0, L25 + c->sqc2(vf16, 112, a2); // sqc2 vf16, 112(a2) + if (bc) {goto block_3;} // branch non-likely + + +block_1: + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + c->lqc2(vf5, 0, v1); // lqc2 vf5, 0(v1) + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf9); // vmaddax.xyzw acc, vf1, vf9 + c->lqc2(vf6, 16, v1); // lqc2 vf6, 16(v1) + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf9); // vmadday.xyzw acc, vf2, vf9 + c->lqc2(vf7, 32, v1); // lqc2 vf7, 32(v1) + c->vmadd_bc(DEST::xyzw, BC::z, vf9, vf3, vf9); // vmaddz.xyzw vf9, vf3, vf9 + c->lqc2(vf8, 48, v1); // lqc2 vf8, 48(v1) + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf10); // vmaddax.xyzw acc, vf1, vf10 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf10); // vmadday.xyzw acc, vf2, vf10 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf10, vf3, vf10); // vmaddz.xyzw vf10, vf3, vf10 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf11); // vmaddax.xyzw acc, vf1, vf11 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf11); // vmadday.xyzw acc, vf2, vf11 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf11, vf3, vf11); // vmaddz.xyzw vf11, vf3, vf11 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf12); // vmaddax.xyzw acc, vf1, vf12 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf12); // vmadday.xyzw acc, vf2, vf12 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf12, vf3, vf12); // vmaddz.xyzw vf12, vf3, vf12 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf17, vf9); // vftoi0.xyzw vf17, vf9 + c->sqc2(vf9, 128, a2); // sqc2 vf9, 128(a2) + c->vftoi0(DEST::xyzw, vf18, vf10); // vftoi0.xyzw vf18, vf10 + c->sqc2(vf10, 160, a2); // sqc2 vf10, 160(a2) + c->vftoi0(DEST::xyzw, vf19, vf11); // vftoi0.xyzw vf19, vf11 + c->sqc2(vf11, 192, a2); // sqc2 vf11, 192(a2) + c->vftoi0(DEST::xyzw, vf20, vf12); // vftoi0.xyzw vf20, vf12 + c->sqc2(vf12, 224, a2); // sqc2 vf12, 224(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf17, 144, a2); // sqc2 vf17, 144(a2) + c->daddiu(a0, a0, -4); // daddiu a0, a0, -4 + c->sqc2(vf18, 176, a2); // sqc2 vf18, 176(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf19, 208, a2); // sqc2 vf19, 208(a2) + bc = ((s64)c->sgpr64(a0)) <= 0; // blez a0, L25 + c->sqc2(vf20, 240, a2); // sqc2 vf20, 240(a2) + if (bc) {goto block_3;} // branch non-likely + + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + c->lqc2(vf9, 64, v1); // lqc2 vf9, 64(v1) + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf5); // vmaddax.xyzw acc, vf1, vf5 + c->lqc2(vf10, 80, v1); // lqc2 vf10, 80(v1) + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf5); // vmadday.xyzw acc, vf2, vf5 + c->lqc2(vf11, 96, v1); // lqc2 vf11, 96(v1) + c->vmadd_bc(DEST::xyzw, BC::z, vf5, vf3, vf5); // vmaddz.xyzw vf5, vf3, vf5 + c->lqc2(vf12, 112, v1); // lqc2 vf12, 112(v1) + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + c->daddiu(a2, a2, 256); // daddiu a2, a2, 256 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf6); // vmaddax.xyzw acc, vf1, vf6 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf6); // vmadday.xyzw acc, vf2, vf6 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf6, vf3, vf6); // vmaddz.xyzw vf6, vf3, vf6 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf7); // vmaddax.xyzw acc, vf1, vf7 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf7); // vmadday.xyzw acc, vf2, vf7 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf7, vf3, vf7); // vmaddz.xyzw vf7, vf3, vf7 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf8); // vmaddax.xyzw acc, vf1, vf8 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf8); // vmadday.xyzw acc, vf2, vf8 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf8, vf3, vf8); // vmaddz.xyzw vf8, vf3, vf8 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf13, vf5); // vftoi0.xyzw vf13, vf5 + c->sqc2(vf5, 0, a2); // sqc2 vf5, 0(a2) + c->vftoi0(DEST::xyzw, vf14, vf6); // vftoi0.xyzw vf14, vf6 + c->sqc2(vf6, 32, a2); // sqc2 vf6, 32(a2) + c->vftoi0(DEST::xyzw, vf15, vf7); // vftoi0.xyzw vf15, vf7 + c->sqc2(vf7, 64, a2); // sqc2 vf7, 64(a2) + c->vftoi0(DEST::xyzw, vf16, vf8); // vftoi0.xyzw vf16, vf8 + c->sqc2(vf8, 96, a2); // sqc2 vf8, 96(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf13, 16, a2); // sqc2 vf13, 16(a2) + c->daddiu(a0, a0, -4); // daddiu a0, a0, -4 + c->sqc2(vf14, 48, a2); // sqc2 vf14, 48(a2) + c->daddiu(v1, v1, 128); // daddiu v1, v1, 128 + c->sqc2(vf15, 80, a2); // sqc2 vf15, 80(a2) + bc = ((s64)c->sgpr64(a0)) > 0; // bgtz a0, L24 + c->sqc2(vf16, 112, a2); // sqc2 vf16, 112(a2) + if (bc) {goto block_1;} // branch non-likely + + +block_3: + 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 14 collide-mesh)", execute, 256); +} + +} // namespace method_14_collide_mesh +} // 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_collide_mesh { +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->lwu(v1, 12, a0); // lwu v1, 12(a0) + // nop // sll r0, r0, 0 + c->lwu(a0, 8, a0); // lwu a0, 8(a0) + // nop // sll r0, r0, 0 + c->lqc2(vf1, 0, a1); // lqc2 vf1, 0(a1) + // nop // sll r0, r0, 0 + c->lqc2(vf2, 16, a1); // lqc2 vf2, 16(a1) + // nop // sll r0, r0, 0 + c->lqc2(vf3, 32, a1); // lqc2 vf3, 32(a1) + // nop // sll r0, r0, 0 + c->lqc2(vf4, 48, a1); // lqc2 vf4, 48(a1) + // nop // sll r0, r0, 0 + c->lqc2(vf13, 0, a2); // lqc2 vf13, 0(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 16, a2); // lqc2 vf14, 16(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf15, 32, a2); // lqc2 vf15, 32(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf16, 48, a2); // lqc2 vf16, 48(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf5, 0, v1); // lqc2 vf5, 0(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf6, 16, v1); // lqc2 vf6, 16(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf7, 32, v1); // lqc2 vf7, 32(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf8, 48, v1); // lqc2 vf8, 48(v1) + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + c->lqc2(vf9, 64, v1); // lqc2 vf9, 64(v1) + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf5); // vmaddax.xyzw acc, vf1, vf5 + c->lqc2(vf10, 80, v1); // lqc2 vf10, 80(v1) + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf5); // vmadday.xyzw acc, vf2, vf5 + c->lqc2(vf11, 96, v1); // lqc2 vf11, 96(v1) + c->vmadd_bc(DEST::xyzw, BC::z, vf5, vf3, vf5); // vmaddz.xyzw vf5, vf3, vf5 + c->lqc2(vf12, 112, v1); // lqc2 vf12, 112(v1) + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf6); // vmaddax.xyzw acc, vf1, vf6 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf6); // vmadday.xyzw acc, vf2, vf6 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf6, vf3, vf6); // vmaddz.xyzw vf6, vf3, vf6 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf7); // vmaddax.xyzw acc, vf1, vf7 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf7); // vmadday.xyzw acc, vf2, vf7 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf7, vf3, vf7); // vmaddz.xyzw vf7, vf3, vf7 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf8); // vmaddax.xyzw acc, vf1, vf8 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf8); // vmadday.xyzw acc, vf2, vf8 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf8, vf3, vf8); // vmaddz.xyzw vf8, vf3, vf8 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf16, vf0); // vmulaw.xyzw acc, vf16, vf0 + c->sqc2(vf5, 0, a3); // sqc2 vf5, 0(a3) + c->vmadda_bc(DEST::xyzw, BC::x, vf13, vf5); // vmaddax.xyzw acc, vf13, vf5 + c->sqc2(vf6, 32, a3); // sqc2 vf6, 32(a3) + c->vmadda_bc(DEST::xyzw, BC::y, vf14, vf5); // vmadday.xyzw acc, vf14, vf5 + c->sqc2(vf7, 64, a3); // sqc2 vf7, 64(a3) + c->vmadd_bc(DEST::xyzw, BC::z, vf5, vf15, vf5); // vmaddz.xyzw vf5, vf15, vf5 + c->sqc2(vf8, 96, a3); // sqc2 vf8, 96(a3) + c->vmula_bc(DEST::xyzw, BC::w, vf16, vf0); // vmulaw.xyzw acc, vf16, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf13, vf6); // vmaddax.xyzw acc, vf13, vf6 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf14, vf6); // vmadday.xyzw acc, vf14, vf6 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf6, vf15, vf6); // vmaddz.xyzw vf6, vf15, vf6 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf16, vf0); // vmulaw.xyzw acc, vf16, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf13, vf7); // vmaddax.xyzw acc, vf13, vf7 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf14, vf7); // vmadday.xyzw acc, vf14, vf7 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf7, vf15, vf7); // vmaddz.xyzw vf7, vf15, vf7 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf16, vf0); // vmulaw.xyzw acc, vf16, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf13, vf8); // vmaddax.xyzw acc, vf13, vf8 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf14, vf8); // vmadday.xyzw acc, vf14, vf8 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf8, vf15, vf8); // vmaddz.xyzw vf8, vf15, vf8 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf5, vf5); // vftoi0.xyzw vf5, vf5 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf6, vf6); // vftoi0.xyzw vf6, vf6 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf7, vf7); // vftoi0.xyzw vf7, vf7 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf8, vf8); // vftoi0.xyzw vf8, vf8 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->sqc2(vf5, 16, a3); // sqc2 vf5, 16(a3) + c->daddiu(a0, a0, -4); // daddiu a0, a0, -4 + c->sqc2(vf6, 48, a3); // sqc2 vf6, 48(a3) + c->daddiu(v1, v1, 128); // daddiu v1, v1, 128 + c->sqc2(vf7, 80, a3); // sqc2 vf7, 80(a3) + bc = ((s64)c->sgpr64(a0)) <= 0; // blez a0, L22 + c->sqc2(vf8, 112, a3); // sqc2 vf8, 112(a3) + if (bc) {goto block_3;} // branch non-likely + + +block_1: + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + c->lqc2(vf5, 0, v1); // lqc2 vf5, 0(v1) + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf9); // vmaddax.xyzw acc, vf1, vf9 + c->lqc2(vf6, 16, v1); // lqc2 vf6, 16(v1) + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf9); // vmadday.xyzw acc, vf2, vf9 + c->lqc2(vf7, 32, v1); // lqc2 vf7, 32(v1) + c->vmadd_bc(DEST::xyzw, BC::z, vf9, vf3, vf9); // vmaddz.xyzw vf9, vf3, vf9 + c->lqc2(vf8, 48, v1); // lqc2 vf8, 48(v1) + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf10); // vmaddax.xyzw acc, vf1, vf10 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf10); // vmadday.xyzw acc, vf2, vf10 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf10, vf3, vf10); // vmaddz.xyzw vf10, vf3, vf10 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf11); // vmaddax.xyzw acc, vf1, vf11 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf11); // vmadday.xyzw acc, vf2, vf11 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf11, vf3, vf11); // vmaddz.xyzw vf11, vf3, vf11 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf12); // vmaddax.xyzw acc, vf1, vf12 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf12); // vmadday.xyzw acc, vf2, vf12 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf12, vf3, vf12); // vmaddz.xyzw vf12, vf3, vf12 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf16, vf0); // vmulaw.xyzw acc, vf16, vf0 + c->sqc2(vf9, 128, a3); // sqc2 vf9, 128(a3) + c->vmadda_bc(DEST::xyzw, BC::x, vf13, vf9); // vmaddax.xyzw acc, vf13, vf9 + c->sqc2(vf10, 160, a3); // sqc2 vf10, 160(a3) + c->vmadda_bc(DEST::xyzw, BC::y, vf14, vf9); // vmadday.xyzw acc, vf14, vf9 + c->sqc2(vf11, 192, a3); // sqc2 vf11, 192(a3) + c->vmadd_bc(DEST::xyzw, BC::z, vf9, vf15, vf9); // vmaddz.xyzw vf9, vf15, vf9 + c->sqc2(vf12, 224, a3); // sqc2 vf12, 224(a3) + c->vmula_bc(DEST::xyzw, BC::w, vf16, vf0); // vmulaw.xyzw acc, vf16, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf13, vf10); // vmaddax.xyzw acc, vf13, vf10 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf14, vf10); // vmadday.xyzw acc, vf14, vf10 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf10, vf15, vf10); // vmaddz.xyzw vf10, vf15, vf10 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf16, vf0); // vmulaw.xyzw acc, vf16, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf13, vf11); // vmaddax.xyzw acc, vf13, vf11 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf14, vf11); // vmadday.xyzw acc, vf14, vf11 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf11, vf15, vf11); // vmaddz.xyzw vf11, vf15, vf11 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf16, vf0); // vmulaw.xyzw acc, vf16, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf13, vf12); // vmaddax.xyzw acc, vf13, vf12 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf14, vf12); // vmadday.xyzw acc, vf14, vf12 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf12, vf15, vf12); // vmaddz.xyzw vf12, vf15, vf12 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf9, vf9); // vftoi0.xyzw vf9, vf9 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf10, vf10); // vftoi0.xyzw vf10, vf10 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf11, vf11); // vftoi0.xyzw vf11, vf11 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf12, vf12); // vftoi0.xyzw vf12, vf12 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->sqc2(vf9, 144, a3); // sqc2 vf9, 144(a3) + c->daddiu(a0, a0, -4); // daddiu a0, a0, -4 + c->sqc2(vf10, 176, a3); // sqc2 vf10, 176(a3) + // nop // sll r0, r0, 0 + c->sqc2(vf11, 208, a3); // sqc2 vf11, 208(a3) + bc = ((s64)c->sgpr64(a0)) <= 0; // blez a0, L22 + c->sqc2(vf12, 240, a3); // sqc2 vf12, 240(a3) + if (bc) {goto block_3;} // branch non-likely + + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + c->lqc2(vf9, 64, v1); // lqc2 vf9, 64(v1) + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf5); // vmaddax.xyzw acc, vf1, vf5 + c->lqc2(vf10, 80, v1); // lqc2 vf10, 80(v1) + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf5); // vmadday.xyzw acc, vf2, vf5 + c->lqc2(vf11, 96, v1); // lqc2 vf11, 96(v1) + c->vmadd_bc(DEST::xyzw, BC::z, vf5, vf3, vf5); // vmaddz.xyzw vf5, vf3, vf5 + c->lqc2(vf12, 112, v1); // lqc2 vf12, 112(v1) + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + c->daddiu(a3, a3, 256); // daddiu a3, a3, 256 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf6); // vmaddax.xyzw acc, vf1, vf6 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf6); // vmadday.xyzw acc, vf2, vf6 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf6, vf3, vf6); // vmaddz.xyzw vf6, vf3, vf6 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf7); // vmaddax.xyzw acc, vf1, vf7 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf7); // vmadday.xyzw acc, vf2, vf7 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf7, vf3, vf7); // vmaddz.xyzw vf7, vf3, vf7 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf8); // vmaddax.xyzw acc, vf1, vf8 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf8); // vmadday.xyzw acc, vf2, vf8 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf8, vf3, vf8); // vmaddz.xyzw vf8, vf3, vf8 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf16, vf0); // vmulaw.xyzw acc, vf16, vf0 + c->sqc2(vf5, 0, a3); // sqc2 vf5, 0(a3) + c->vmadda_bc(DEST::xyzw, BC::x, vf13, vf5); // vmaddax.xyzw acc, vf13, vf5 + c->sqc2(vf6, 32, a3); // sqc2 vf6, 32(a3) + c->vmadda_bc(DEST::xyzw, BC::y, vf14, vf5); // vmadday.xyzw acc, vf14, vf5 + c->sqc2(vf7, 64, a3); // sqc2 vf7, 64(a3) + c->vmadd_bc(DEST::xyzw, BC::z, vf5, vf15, vf5); // vmaddz.xyzw vf5, vf15, vf5 + c->sqc2(vf8, 96, a3); // sqc2 vf8, 96(a3) + c->vmula_bc(DEST::xyzw, BC::w, vf16, vf0); // vmulaw.xyzw acc, vf16, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf13, vf6); // vmaddax.xyzw acc, vf13, vf6 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf14, vf6); // vmadday.xyzw acc, vf14, vf6 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf6, vf15, vf6); // vmaddz.xyzw vf6, vf15, vf6 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf16, vf0); // vmulaw.xyzw acc, vf16, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf13, vf7); // vmaddax.xyzw acc, vf13, vf7 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf14, vf7); // vmadday.xyzw acc, vf14, vf7 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf7, vf15, vf7); // vmaddz.xyzw vf7, vf15, vf7 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf16, vf0); // vmulaw.xyzw acc, vf16, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf13, vf8); // vmaddax.xyzw acc, vf13, vf8 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf14, vf8); // vmadday.xyzw acc, vf14, vf8 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf8, vf15, vf8); // vmaddz.xyzw vf8, vf15, vf8 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf5, vf5); // vftoi0.xyzw vf5, vf5 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf6, vf6); // vftoi0.xyzw vf6, vf6 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf7, vf7); // vftoi0.xyzw vf7, vf7 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf8, vf8); // vftoi0.xyzw vf8, vf8 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->sqc2(vf5, 16, a3); // sqc2 vf5, 16(a3) + c->daddiu(a0, a0, -4); // daddiu a0, a0, -4 + c->sqc2(vf6, 48, a3); // sqc2 vf6, 48(a3) + c->daddiu(v1, v1, 128); // daddiu v1, v1, 128 + c->sqc2(vf7, 80, a3); // sqc2 vf7, 80(a3) + bc = ((s64)c->sgpr64(a0)) > 0; // bgtz a0, L21 + c->sqc2(vf8, 112, a3); // sqc2 vf8, 112(a3) + if (bc) {goto block_1;} // branch non-likely + + +block_3: + 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 collide-mesh)", execute, 256); +} + +} // namespace method_15_collide_mesh +} // namespace Mips2C \ No newline at end of file diff --git a/game/mips2c/jak3_functions/debug.cpp b/game/mips2c/jak3_functions/debug.cpp index e1ffc1266e..7d1afca2ba 100644 --- a/game/mips2c/jak3_functions/debug.cpp +++ b/game/mips2c/jak3_functions/debug.cpp @@ -149,8 +149,6 @@ struct Cache { u64 execute(void* ctxt) { auto* c = (ExecutionContext*)ctxt; - bool bc = false; - u32 call_addr = 0; 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 @@ -215,7 +213,7 @@ struct Cache { u64 execute(void* ctxt) { auto* c = (ExecutionContext*)ctxt; bool bc = false; - u32 call_addr = 0; + // u32 call_addr = 0; // nop // sll r0, r0, 0 c->daddiu(sp, sp, -8); // daddiu sp, sp, -8 // nop // sll r0, r0, 0 @@ -223,7 +221,7 @@ u64 execute(void* ctxt) { 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: + // 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); @@ -233,7 +231,7 @@ u64 execute(void* ctxt) { 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: + // 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); @@ -243,7 +241,7 @@ u64 execute(void* ctxt) { 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: + // 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); @@ -253,7 +251,7 @@ u64 execute(void* ctxt) { 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: + // 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); @@ -355,7 +353,6 @@ u64 execute(void* ctxt) { auto* c = (ExecutionContext*)ctxt; c->copy_vfs_from_other(&sky_regs_vfs); bool bc = false; - u32 call_addr = 0; c->mov64(v1, a0); // or v1, a0, r0 c->load_symbol2(v1, cache.math_camera); // lw v1, *math-camera*(s7) c->lqc2(vf14, 780, v1); // lqc2 vf14, 780(v1) @@ -493,7 +490,6 @@ u64 execute(void* ctxt) { auto* c = (ExecutionContext*)ctxt; c->copy_vfs_from_other(&sky_regs_vfs); bool bc = false; - u32 call_addr = 0; 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 @@ -564,6 +560,8 @@ u64 execute(void* ctxt) { if (bc) {goto block_2;} // branch non-likely // Unknown instr: jr t9 + draw_boundary_polygon::execute(ctxt); + goto end_of_function; // nop // sll r0, r0, 0 block_2: @@ -576,6 +574,7 @@ u64 execute(void* ctxt) { c->sqc2(vf6, 176, a3); // sqc2 vf6, 176(a3) // nop // sll r0, r0, 0 // Unknown instr: jr t9 + draw_boundary_polygon::execute(ctxt); // nop // sll r0, r0, 0 //jr ra // jr ra c->daddu(sp, sp, r0); // daddu sp, sp, r0 diff --git a/game/mips2c/jak3_functions/font.cpp b/game/mips2c/jak3_functions/font.cpp new file mode 100644 index 0000000000..c4a3e4506f --- /dev/null +++ b/game/mips2c/jak3_functions/font.cpp @@ -0,0 +1,2770 @@ + +//--------------------------MIPS2C--------------------- +// clang-format off +#include "game/mips2c/mips2c_private.h" +#include "game/kernel/jak3/kscheme.h" +using ::jak3::intern_from_c; +namespace Mips2C::jak3 { +namespace method_9_font_work { +struct Cache { + void* font_work; // *font-work* +} 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(fp, 8, sp); // sd fp, 8(sp) + c->mov64(fp, t9); // or fp, t9, r0 + c->lui(v1, 17152); // lui v1, 17152 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->lwc1(f1, 76, a1); // lwc1 f1, 76(a1) + c->muls(f0, f0, f1); // mul.s f0, f0, f1 + c->cvtws(f0, f0); // cvt.w.s f0, f0 + c->mfc1(v1, f0); // mfc1 v1, f0 + c->lq(a2, 12, a1); // lq a2, 12(a1) + c->addiu(a2, r0, 0); // addiu a2, r0, 0 + //beq r0, r0, L122 // beq r0, r0, L122 + // nop // sll r0, r0, 0 + goto block_5; // branch always + + +block_1: + c->addiu(a3, r0, 0); // addiu a3, r0, 0 + //beq r0, r0, L121 // beq r0, r0, L121 + // nop // sll r0, r0, 0 + goto block_3; // branch always + + +block_2: + c->dsll(t0, a3, 2); // dsll t0, a3, 2 + c->dsll(t1, a2, 4); // dsll t1, a2, 4 + c->daddu(t0, t0, t1); // daddu t0, t0, t1 + c->load_symbol2(t1, cache.font_work); // lw t1, *font-work*(s7) + c->daddu(t0, t0, t1); // daddu t0, t0, t1 + c->lwu(t0, 2224, t0); // lwu t0, 2224(t0) + // Unknown instr: ld t1, L124(fp) +/* +L124: +.word 0xffffff +.word 0xffffffff + */ + c->gprs[t1].du32[0] = 0xffffff; + c->gprs[t1].du32[1] = 0xffffffff; + + c->and_(t0, t0, t1); // and t0, t0, t1 + c->dsll32(t1, v1, 24); // dsll32 t1, v1, 24 + c->dsrl32(t1, t1, 0); // dsrl32 t1, t1, 0 + c->or_(t0, t0, t1); // or t0, t0, t1 + c->dsll(t1, a3, 2); // dsll t1, a3, 2 + c->dsll(t2, a2, 4); // dsll t2, a2, 4 + c->daddu(t1, t1, t2); // daddu t1, t1, t2 + c->load_symbol2(t2, cache.font_work); // lw t2, *font-work*(s7) + c->daddu(t1, t1, t2); // daddu t1, t1, t2 + c->sw(t0, 2224, t1); // sw t0, 2224(t1) + c->daddiu(a3, a3, 1); // daddiu a3, a3, 1 + +block_3: + c->slti(t0, a3, 4); // slti t0, a3, 4 + bc = c->sgpr64(t0) != 0; // bne t0, r0, L120 + // nop // sll r0, r0, 0 + if (bc) {goto block_2;} // branch non-likely + + c->mov64(a3, s7); // or a3, s7, r0 + c->mov64(a3, s7); // or a3, s7, r0 + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + +block_5: + c->slti(a3, a2, 45); // slti a3, a2, 45 + bc = c->sgpr64(a3) != 0; // bne a3, r0, L119 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + c->mov64(a2, s7); // or a2, s7, r0 + c->mov64(a2, s7); // or a2, s7, r0 + c->load_symbol2(a2, cache.font_work); // lw a2, *font-work*(s7) + c->sw(v1, 2220, a2); // sw v1, 2220(a2) + c->lw(v1, 60, a1); // lw v1, 60(a1) + // nop // sll r0, r0, 0 + c->sw(v1, 3008, a0); // sw v1, 3008(a0) + // nop // sll r0, r0, 0 + c->sll(v1, v1, 4); // sll v1, v1, 4 + // nop // sll r0, r0, 0 + c->daddu(a2, v1, a0); // daddu a2, v1, a0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->lwu(v1, 2224, a2); // lwu v1, 2224(a2) + // nop // sll r0, r0, 0 + c->lwu(a3, 2228, a2); // lwu a3, 2228(a2) + c->pextlb(v1, r0, v1); // pextlb v1, r0, v1 + c->lwu(a1, 2232, a2); // lwu a1, 2232(a2) + c->pextlh(v1, r0, v1); // pextlh v1, r0, v1 + c->lwu(a2, 2236, a2); // lwu a2, 2236(a2) + c->pextlb(a3, r0, a3); // pextlb a3, r0, a3 + c->sq(v1, 672, a0); // sq v1, 672(a0) + c->pextlh(a3, r0, a3); // pextlh a3, r0, a3 + c->sq(v1, 1056, a0); // sq v1, 1056(a0) + c->pextlb(a1, r0, a1); // pextlb a1, r0, a1 + c->sq(a3, 688, a0); // sq a3, 688(a0) + c->pextlh(a1, r0, a1); // pextlh a1, r0, a1 + c->sq(a3, 1072, a0); // sq a3, 1072(a0) + c->pextlb(a2, r0, a2); // pextlb a2, r0, a2 + c->sq(a1, 704, a0); // sq a1, 704(a0) + c->pextlh(a2, r0, a2); // pextlh a2, r0, a2 + c->sq(a1, 1088, a0); // sq a1, 1088(a0) + // nop // sll r0, r0, 0 + c->sq(a2, 720, a0); // sq a2, 720(a0) + // nop // sll r0, r0, 0 + c->sq(a2, 1104, a0); // sq a2, 1104(a0) + // nop // sll r0, r0, 0 + c->sq(v1, 480, a0); // sq v1, 480(a0) + // nop // sll r0, r0, 0 + c->sq(v1, 544, a0); // sq v1, 544(a0) + // nop // sll r0, r0, 0 + c->sq(a3, 496, a0); // sq a3, 496(a0) + // nop // sll r0, r0, 0 + c->sq(a3, 560, a0); // sq a3, 560(a0) + // nop // sll r0, r0, 0 + c->sq(a1, 512, a0); // sq a1, 512(a0) + // nop // sll r0, r0, 0 + c->sq(a1, 576, a0); // sq a1, 576(a0) + // nop // sll r0, r0, 0 + c->sq(a2, 528, a0); // sq a2, 528(a0) + // nop // sll r0, r0, 0 + c->sq(a2, 592, a0); // sq a2, 592(a0) + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + c->ld(fp, 8, sp); // ld fp, 8(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.font_work = intern_from_c(-1, 0, "*font-work*").c(); + gLinkedFunctionTable.reg("(method 9 font-work)", execute, 128); +} + +} // namespace method_9_font_work +} // namespace Mips2C +// add method_9_font_work::link to the link callback table for the object file. +// FWD DEC: + +//--------------------------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 draw_string_asm { +struct Cache { + void* font_work; // *font-work* + void* font12_table; // *font12-table* + void* font24_table; // *font24-table* + void* math_camera; // *math-camera* + void* video_params; // *video-params* +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + // u32 call_addr = 0; + 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 + 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) + c->lqc2(vf24, 12, a2); // lqc2 vf24, 12(a2) + c->lqc2(vf28, 0, v1); // lqc2 vf28, 0(v1) + c->lqc2(vf29, 16, v1); // lqc2 vf29, 16(v1) + c->lqc2(vf30, 32, v1); // lqc2 vf30, 32(v1) + 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 + 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 + 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 + c->vmulq(DEST::xy, vf24, vf24); // vmulq.xy vf24, vf24, Q + c->vadd(DEST::xy, vf25, vf25, vf24); // vadd.xy vf25, vf25, vf24 + c->vmul_bc(DEST::x, BC::w, vf28, vf28, vf25); // vmulw.x vf28, vf28, vf25 + c->vmul_bc(DEST::y, BC::w, vf29, vf29, vf25); // vmulw.y vf29, vf29, vf25 + c->vmul(DEST::x, vf28, vf28, vf2); // vmul.x vf28, vf28, vf2 + c->load_symbol2(v1, cache.font_work); // lw v1, *font-work*(s7) + c->mov64(v1, v1); // or v1, v1, r0 + c->sw(a1, 3020, v1); // sw a1, 3020(v1) + c->lw(a1, 4, a1); // lw a1, 4(a1) + c->sw(a0, 3024, v1); // sw a0, 3024(v1) + c->lw(t0, 64, a2); // lw t0, 64(a2) + c->vmove(DEST::xyzw, vf1, vf0); // vmove.xyzw vf1, vf0 + c->vmove(DEST::xyzw, vf2, vf0); // vmove.xyzw vf2, vf0 + c->vmove(DEST::xyzw, vf3, vf0); // vmove.xyzw vf3, vf0 + c->vmove(DEST::xyzw, vf4, vf0); // vmove.xyzw vf4, vf0 + c->sw(t0, 3028, v1); // sw t0, 3028(v1) + c->lqc2(vf16, 416, v1); // lqc2 vf16, 416(v1) + c->lqc2(vf17, 432, v1); // lqc2 vf17, 432(v1) + c->lqc2(vf18, 448, v1); // lqc2 vf18, 448(v1) + c->load_symbol2(a3, cache.video_params); // lw a3, *video-params*(s7) + c->mov64(a3, a3); // or a3, a3, r0 + c->lqc2(vf1, 16, a3); // lqc2 vf1, 16(a3) + c->andi(a3, t0, 32); // andi a3, t0, 32 + // nop // sll r0, r0, 0 + bc = c->sgpr64(a3) != 0; // bne a3, r0, L35 + c->load_symbol2(a3, cache.font12_table); // lw a3, *font12-table*(s7) + if (bc) {goto block_2;} // branch non-likely + + c->mov64(a3, a3); // or a3, a3, r0 + // nop // sll r0, r0, 0 + c->lq(t1, 80, v1); // lq t1, 80(v1) + // nop // sll r0, r0, 0 + c->lq(t2, 96, v1); // lq t2, 96(v1) + // nop // sll r0, r0, 0 + c->lq(t3, 112, v1); // lq t3, 112(v1) + // nop // sll r0, r0, 0 + c->lq(t4, 128, v1); // lq t4, 128(v1) + // nop // sll r0, r0, 0 + c->sq(t1, 2944, v1); // sq t1, 2944(v1) + // nop // sll r0, r0, 0 + c->sq(t2, 2960, v1); // sq t2, 2960(v1) + // nop // sll r0, r0, 0 + c->sq(t3, 2976, v1); // sq t3, 2976(v1) + // nop // sll r0, r0, 0 + c->sq(t4, 2992, v1); // sq t4, 2992(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf13, 208, v1); // lqc2 vf13, 208(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 224, v1); // lqc2 vf14, 224(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf15, 240, v1); // lqc2 vf15, 240(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 352, v1); // sqc2 vf14, 352(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 368, v1); // sqc2 vf14, 368(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 384, v1); // sqc2 vf14, 384(v1) + //beq r0, r0, L36 // beq r0, r0, L36 + c->sqc2(vf14, 400, v1); // sqc2 vf14, 400(v1) + goto block_3; // branch always + + +block_2: + // nop // sll r0, r0, 0 + c->load_symbol2(a3, cache.font24_table); // lw a3, *font24-table*(s7) + c->mov64(a3, a3); // or a3, a3, r0 + // nop // sll r0, r0, 0 + c->lq(t1, 144, v1); // lq t1, 144(v1) + // nop // sll r0, r0, 0 + c->lq(t2, 160, v1); // lq t2, 160(v1) + // nop // sll r0, r0, 0 + c->lq(t3, 176, v1); // lq t3, 176(v1) + // nop // sll r0, r0, 0 + c->lq(t4, 192, v1); // lq t4, 192(v1) + // nop // sll r0, r0, 0 + c->sq(t1, 2944, v1); // sq t1, 2944(v1) + // nop // sll r0, r0, 0 + c->sq(t2, 2960, v1); // sq t2, 2960(v1) + // nop // sll r0, r0, 0 + c->sq(t3, 2976, v1); // sq t3, 2976(v1) + // nop // sll r0, r0, 0 + c->sq(t4, 2992, v1); // sq t4, 2992(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf13, 256, v1); // lqc2 vf13, 256(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf15, 336, v1); // lqc2 vf15, 336(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 272, v1); // lqc2 vf14, 272(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 352, v1); // sqc2 vf14, 352(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 288, v1); // lqc2 vf14, 288(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 368, v1); // sqc2 vf14, 368(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 304, v1); // lqc2 vf14, 304(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 384, v1); // sqc2 vf14, 384(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 320, v1); // lqc2 vf14, 320(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 400, v1); // sqc2 vf14, 400(v1) + // nop // sll r0, r0, 0 + +block_3: + c->lw(t1, 3008, v1); // lw t1, 3008(v1) + // nop // sll r0, r0, 0 + c->sll(t1, t1, 4); // sll t1, t1, 4 + // nop // sll r0, r0, 0 + c->daddu(t2, t1, v1); // daddu t2, t1, v1 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->lwu(t1, 2224, t2); // lwu t1, 2224(t2) + // nop // sll r0, r0, 0 + c->lwu(t3, 2228, t2); // lwu t3, 2228(t2) + c->pextlb(t4, r0, t1); // pextlb t4, r0, t1 + c->lwu(t1, 2232, t2); // lwu t1, 2232(t2) + c->pextlh(t4, r0, t4); // pextlh t4, r0, t4 + c->lwu(t2, 2236, t2); // lwu t2, 2236(t2) + c->pextlb(t3, r0, t3); // pextlb t3, r0, t3 + c->sq(t4, 672, v1); // sq t4, 672(v1) + c->pextlh(t3, r0, t3); // pextlh t3, r0, t3 + c->sq(t4, 1056, v1); // sq t4, 1056(v1) + c->pextlb(t1, r0, t1); // pextlb t1, r0, t1 + c->sq(t3, 688, v1); // sq t3, 688(v1) + c->pextlh(t1, r0, t1); // pextlh t1, r0, t1 + c->sq(t3, 1072, v1); // sq t3, 1072(v1) + c->pextlb(t2, r0, t2); // pextlb t2, r0, t2 + c->sq(t1, 704, v1); // sq t1, 704(v1) + c->pextlh(t2, r0, t2); // pextlh t2, r0, t2 + c->sq(t1, 1088, v1); // sq t1, 1088(v1) + // nop // sll r0, r0, 0 + c->sq(t2, 720, v1); // sq t2, 720(v1) + // nop // sll r0, r0, 0 + c->sq(t2, 1104, v1); // sq t2, 1104(v1) + c->mov64(t1, v1); // or t1, v1, r0 + // nop // sll r0, r0, 0 + +block_4: + c->lbu(t2, 4, a0); // lbu t2, 4(a0) + c->daddiu(a0, a0, 1); // daddiu a0, a0, 1 + c->lqc2(vf20, 2944, v1); // lqc2 vf20, 2944(v1) + // nop // sll r0, r0, 0 + bc = c->sgpr64(t2) == 0; // beq t2, r0, L63 + c->daddiu(t3, t2, -3); // daddiu t3, t2, -3 + if (bc) {goto block_78;} // branch non-likely + + bc = ((s64)c->sgpr64(t3)) <= 0; // blez t3, L52 + c->daddiu(t3, t2, -126); // daddiu t3, t2, -126 + if (bc) {goto block_59;} // branch non-likely + + bc = c->sgpr64(t3) != 0; // bne t3, r0, L56 + // nop // sll r0, r0, 0 + if (bc) {goto block_65;} // branch non-likely + + c->lbu(t2, 4, a0); // lbu t2, 4(a0) + c->daddiu(a0, a0, 1); // daddiu a0, a0, 1 + c->addiu(t3, r0, 0); // addiu t3, r0, 0 + c->addiu(t4, r0, 0); // addiu t4, r0, 0 + bc = c->sgpr64(t2) == 0; // beq t2, r0, L63 + c->daddiu(t5, t2, -43); // daddiu t5, t2, -43 + if (bc) {goto block_78;} // branch non-likely + + c->movz(t3, t2, t5); // movz t3, t2, t5 + c->daddiu(t5, t2, -45); // daddiu t5, t2, -45 + c->movz(t3, t2, t5); // movz t3, t2, t5 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t3) != 0; // bne t3, r0, L38 + c->daddiu(t5, t2, -91); // daddiu t5, t2, -91 + if (bc) {goto block_18;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L37 + c->daddiu(t4, t2, -93); // daddiu t4, t2, -93 + if (bc) {goto block_4;} // branch non-likely + + bc = c->sgpr64(t4) == 0; // beq t4, r0, L37 + c->daddiu(t4, t2, -121); // daddiu t4, t2, -121 + if (bc) {goto block_4;} // branch non-likely + + bc = c->sgpr64(t4) == 0; // beq t4, r0, L50 + c->daddiu(t4, t2, -89); // daddiu t4, t2, -89 + if (bc) {goto block_57;} // branch non-likely + + bc = c->sgpr64(t4) == 0; // beq t4, r0, L50 + c->daddiu(t4, t2, -122); // daddiu t4, t2, -122 + if (bc) {goto block_57;} // branch non-likely + + bc = c->sgpr64(t4) == 0; // beq t4, r0, L51 + c->daddiu(t4, t2, -90); // daddiu t4, t2, -90 + if (bc) {goto block_58;} // branch non-likely + + bc = c->sgpr64(t4) == 0; // beq t4, r0, L51 + c->daddiu(t4, t2, -48); // daddiu t4, t2, -48 + if (bc) {goto block_58;} // branch non-likely + + bc = ((s64)c->sgpr64(t4)) < 0; // bltz t4, L56 + c->daddiu(t4, t2, -57); // daddiu t4, t2, -57 + if (bc) {goto block_65;} // branch non-likely + + bc = ((s64)c->sgpr64(t4)) > 0; // bgtz t4, L56 + c->daddiu(t4, t2, -126); // daddiu t4, t2, -126 + if (bc) {goto block_65;} // branch non-likely + + bc = c->sgpr64(t4) == 0; // beq t4, r0, L56 + c->daddiu(t4, t2, -48); // daddiu t4, t2, -48 + if (bc) {goto block_65;} // branch non-likely + + +block_18: + c->lbu(t2, 4, a0); // lbu t2, 4(a0) + c->daddiu(a0, a0, 1); // daddiu a0, a0, 1 + bc = c->sgpr64(t2) == 0; // beq t2, r0, L63 + c->daddiu(t5, t2, -110); // daddiu t5, t2, -110 + if (bc) {goto block_78;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L39 + c->daddiu(t5, t2, -78); // daddiu t5, t2, -78 + if (bc) {goto block_38;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L39 + c->daddiu(t5, t2, -108); // daddiu t5, t2, -108 + if (bc) {goto block_38;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L37 + c->daddiu(t5, t2, -76); // daddiu t5, t2, -76 + if (bc) {goto block_4;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L37 + c->daddiu(t5, t2, -119); // daddiu t5, t2, -119 + if (bc) {goto block_4;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L37 + c->daddiu(t5, t2, -87); // daddiu t5, t2, -87 + if (bc) {goto block_4;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L37 + c->daddiu(t5, t2, -107); // daddiu t5, t2, -107 + if (bc) {goto block_4;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L41 + c->daddiu(t5, t2, -75); // daddiu t5, t2, -75 + if (bc) {goto block_41;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L41 + c->daddiu(t5, t2, -106); // daddiu t5, t2, -106 + if (bc) {goto block_41;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L42 + c->daddiu(t5, t2, -74); // daddiu t5, t2, -74 + if (bc) {goto block_43;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L42 + c->daddiu(t5, t2, -104); // daddiu t5, t2, -104 + if (bc) {goto block_43;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L44 + c->daddiu(t5, t2, -72); // daddiu t5, t2, -72 + if (bc) {goto block_47;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L44 + c->daddiu(t5, t2, -118); // daddiu t5, t2, -118 + if (bc) {goto block_47;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L47 + c->daddiu(t5, t2, -86); // daddiu t5, t2, -86 + if (bc) {goto block_52;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L47 + c->daddiu(t5, t2, -117); // daddiu t5, t2, -117 + if (bc) {goto block_52;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L37 + c->daddiu(t5, t2, -85); // daddiu t5, t2, -85 + if (bc) {goto block_4;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L37 + c->daddiu(t5, t2, -48); // daddiu t5, t2, -48 + if (bc) {goto block_4;} // branch non-likely + + bc = ((s64)c->sgpr64(t5)) < 0; // bltz t5, L56 + c->daddiu(t6, t2, -57); // daddiu t6, t2, -57 + if (bc) {goto block_65;} // branch non-likely + + bc = ((s64)c->sgpr64(t6)) > 0; // bgtz t6, L56 + c->sll(t6, t4, 2); // sll t6, t4, 2 + if (bc) {goto block_65;} // branch non-likely + + c->daddu(t2, t4, t6); // daddu t2, t4, t6 + // nop // sll r0, r0, 0 + c->sll(t2, t2, 1); // sll t2, t2, 1 + // nop // sll r0, r0, 0 + //beq r0, r0, L38 // beq r0, r0, L38 + c->daddu(t4, t2, t5); // daddu t4, t2, t5 + goto block_18; // branch always + + +block_38: + bc = c->sgpr64(t4) != 0; // bne t4, r0, L40 + c->addiu(t2, r0, -33); // addiu t2, r0, -33 + if (bc) {goto block_40;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lq(a3, 80, v1); // lq a3, 80(v1) + // nop // sll r0, r0, 0 + c->lq(t3, 96, v1); // lq t3, 96(v1) + // nop // sll r0, r0, 0 + c->lq(t4, 112, v1); // lq t4, 112(v1) + // nop // sll r0, r0, 0 + c->lq(t5, 128, v1); // lq t5, 128(v1) + // nop // sll r0, r0, 0 + c->sq(a3, 2944, v1); // sq a3, 2944(v1) + // nop // sll r0, r0, 0 + c->sq(t3, 2960, v1); // sq t3, 2960(v1) + // nop // sll r0, r0, 0 + c->sq(t4, 2976, v1); // sq t4, 2976(v1) + // nop // sll r0, r0, 0 + c->sq(t5, 2992, v1); // sq t5, 2992(v1) + // nop // sll r0, r0, 0 + c->load_symbol2(a3, cache.font12_table); // lw a3, *font12-table*(s7) + c->mov64(a3, a3); // or a3, a3, r0 + // nop // sll r0, r0, 0 + c->lqc2(vf13, 208, v1); // lqc2 vf13, 208(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 224, v1); // lqc2 vf14, 224(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf15, 240, v1); // lqc2 vf15, 240(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 352, v1); // sqc2 vf14, 352(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 368, v1); // sqc2 vf14, 368(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 384, v1); // sqc2 vf14, 384(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 400, v1); // sqc2 vf14, 400(v1) + //beq r0, r0, L37 // beq r0, r0, L37 + c->and_(t0, t0, t2); // and t0, t0, t2 + goto block_4; // branch always + + +block_40: + // nop // sll r0, r0, 0 + c->lq(a3, 144, v1); // lq a3, 144(v1) + // nop // sll r0, r0, 0 + c->lq(t2, 160, v1); // lq t2, 160(v1) + // nop // sll r0, r0, 0 + c->lq(t3, 176, v1); // lq t3, 176(v1) + // nop // sll r0, r0, 0 + c->lq(t4, 192, v1); // lq t4, 192(v1) + // nop // sll r0, r0, 0 + c->sq(a3, 2944, v1); // sq a3, 2944(v1) + // nop // sll r0, r0, 0 + c->sq(t2, 2960, v1); // sq t2, 2960(v1) + // nop // sll r0, r0, 0 + c->sq(t3, 2976, v1); // sq t3, 2976(v1) + // nop // sll r0, r0, 0 + c->sq(t4, 2992, v1); // sq t4, 2992(v1) + // nop // sll r0, r0, 0 + c->load_symbol2(a3, cache.font24_table); // lw a3, *font24-table*(s7) + c->mov64(a3, a3); // or a3, a3, r0 + // nop // sll r0, r0, 0 + c->lqc2(vf13, 256, v1); // lqc2 vf13, 256(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf15, 336, v1); // lqc2 vf15, 336(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 272, v1); // lqc2 vf14, 272(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 352, v1); // sqc2 vf14, 352(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 288, v1); // lqc2 vf14, 288(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 368, v1); // sqc2 vf14, 368(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 304, v1); // lqc2 vf14, 304(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 384, v1); // sqc2 vf14, 384(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 320, v1); // lqc2 vf14, 320(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 400, v1); // sqc2 vf14, 400(v1) + //beq r0, r0, L37 // beq r0, r0, L37 + c->ori(t0, t0, 32); // ori t0, t0, 32 + goto block_4; // branch always + + +block_41: + c->addiu(t2, r0, -3); // addiu t2, r0, -3 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t4) == 0; // beq t4, r0, L37 + c->and_(t0, t0, t2); // and t0, t0, t2 + if (bc) {goto block_4;} // branch non-likely + + //beq r0, r0, L37 // beq r0, r0, L37 + c->ori(t0, t0, 2); // ori t0, t0, 2 + goto block_4; // branch always + + +block_43: + c->addiu(t2, r0, -21); // addiu t2, r0, -21 + c->daddiu(t3, t4, -2); // daddiu t3, t4, -2 + bc = c->sgpr64(t4) == 0; // beq t4, r0, L37 + c->and_(t0, t0, t2); // and t0, t0, t2 + if (bc) {goto block_4;} // branch non-likely + + bc = c->sgpr64(t3) == 0; // beq t3, r0, L43 + // nop // sll r0, r0, 0 + if (bc) {goto block_46;} // branch non-likely + + //beq r0, r0, L37 // beq r0, r0, L37 + c->ori(t0, t0, 16); // ori t0, t0, 16 + goto block_4; // branch always + + +block_46: + //beq r0, r0, L37 // beq r0, r0, L37 + c->ori(t0, t0, 4); // ori t0, t0, 4 + goto block_4; // branch always + + +block_47: + c->mov128_vf_gpr(vf1, t4); // qmtc2.i vf1, t4 + c->daddiu(t2, t3, -45); // daddiu t2, t3, -45 + bc = c->sgpr64(t3) == 0; // beq t3, r0, L46 + c->vitof0(DEST::xyzw, vf1, vf1); // vitof0.xyzw vf1, vf1 + if (bc) {goto block_51;} // branch non-likely + + bc = c->sgpr64(t2) == 0; // beq t2, r0, L45 + // nop // sll r0, r0, 0 + if (bc) {goto block_50;} // branch non-likely + + //beq r0, r0, L37 // beq r0, r0, L37 + c->vadd_bc(DEST::x, BC::x, vf23, vf23, vf1); // vaddx.x vf23, vf23, vf1 + goto block_4; // branch always + + +block_50: + //beq r0, r0, L37 // beq r0, r0, L37 + c->vsub_bc(DEST::x, BC::x, vf23, vf23, vf1); // vsubx.x vf23, vf23, vf1 + goto block_4; // branch always + + +block_51: + //beq r0, r0, L37 // beq r0, r0, L37 + c->vadd_bc(DEST::x, BC::x, vf23, vf0, vf1); // vaddx.x vf23, vf0, vf1 + goto block_4; // branch always + + +block_52: + c->mov128_vf_gpr(vf1, t4); // qmtc2.i vf1, t4 + c->daddiu(t2, t3, -45); // daddiu t2, t3, -45 + bc = c->sgpr64(t3) == 0; // beq t3, r0, L49 + c->vitof0(DEST::xyzw, vf1, vf1); // vitof0.xyzw vf1, vf1 + if (bc) {goto block_56;} // branch non-likely + + bc = c->sgpr64(t2) == 0; // beq t2, r0, L48 + // nop // sll r0, r0, 0 + if (bc) {goto block_55;} // branch non-likely + + //beq r0, r0, L37 // beq r0, r0, L37 + c->vadd_bc(DEST::y, BC::x, vf23, vf23, vf1); // vaddx.y vf23, vf23, vf1 + goto block_4; // branch always + + +block_55: + //beq r0, r0, L37 // beq r0, r0, L37 + c->vsub_bc(DEST::y, BC::x, vf23, vf23, vf1); // vsubx.y vf23, vf23, vf1 + goto block_4; // branch always + + +block_56: + //beq r0, r0, L37 // beq r0, r0, L37 + c->vadd_bc(DEST::y, BC::x, vf23, vf0, vf1); // vaddx.y vf23, vf0, vf1 + goto block_4; // branch always + + +block_57: + //beq r0, r0, L37 // beq r0, r0, L37 + c->sqc2(vf23, 464, v1); // sqc2 vf23, 464(v1) + goto block_4; // branch always + + +block_58: + //beq r0, r0, L37 // beq r0, r0, L37 + c->lqc2(vf23, 464, v1); // lqc2 vf23, 464(v1) + goto block_4; // branch always + + +block_59: + c->daddiu(t3, t2, -3); // daddiu t3, t2, -3 + c->ori(t0, t0, 64); // ori t0, t0, 64 + bc = c->sgpr64(t3) == 0; // beq t3, r0, L54 + c->daddiu(t2, t2, -2); // daddiu t2, t2, -2 + if (bc) {goto block_63;} // branch non-likely + + bc = c->sgpr64(t2) == 0; // beq t2, r0, L53 + c->lqc2(vf14, 384, v1); // lqc2 vf14, 384(v1) + if (bc) {goto block_62;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lqc2(vf14, 368, v1); // lqc2 vf14, 368(v1) + //beq r0, r0, L55 // beq r0, r0, L55 + c->lqc2(vf20, 2960, v1); // lqc2 vf20, 2960(v1) + goto block_64; // branch always + + +block_62: + //beq r0, r0, L55 // beq r0, r0, L55 + c->lqc2(vf20, 2976, v1); // lqc2 vf20, 2976(v1) + goto block_64; // branch always + + +block_63: + // nop // sll r0, r0, 0 + c->lqc2(vf14, 400, v1); // lqc2 vf14, 400(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf20, 2992, v1); // lqc2 vf20, 2992(v1) + +block_64: + c->lbu(t2, 4, a0); // lbu t2, 4(a0) + c->daddiu(a0, a0, 1); // daddiu a0, a0, 1 + c->vadd(DEST::xyz, vf4, vf23, vf15); // vadd.xyz vf4, vf23, vf15 + c->sll(t3, t2, 4); // sll t3, t2, 4 + //beq r0, r0, L60 // beq r0, r0, L60 + c->vsub(DEST::xyzw, vf1, vf25, vf23); // vsub.xyzw vf1, vf25, vf23 + goto block_72; // branch always + + +block_65: + // nop // sll r0, r0, 0 + c->addiu(t3, r0, -65); // addiu t3, r0, -65 + c->and_(t0, t0, t3); // and t0, t0, t3 + c->lqc2(vf14, 352, v1); // lqc2 vf14, 352(v1) + c->vadd(DEST::xyz, vf4, vf23, vf15); // vadd.xyz vf4, vf23, vf15 + c->sll(t3, t2, 4); // sll t3, t2, 4 + c->vsub(DEST::xyzw, vf1, vf25, vf23); // vsub.xyzw vf1, vf25, vf23 + c->daddiu(t4, t2, -10); // daddiu t4, t2, -10 + bc = c->sgpr64(t4) == 0; // beq t4, r0, L57 + c->daddiu(t2, t2, -13); // daddiu t2, t2, -13 + if (bc) {goto block_67;} // branch non-likely + + bc = c->sgpr64(t2) != 0; // bne t2, r0, L60 + // nop // sll r0, r0, 0 + if (bc) {goto block_72;} // branch non-likely + + +block_67: + c->vsub(DEST::xyzw, vf1, vf23, vf24); // vsub.xyzw vf1, vf23, vf24 + c->andi(t2, t0, 16); // andi t2, t0, 16 + bc = c->sgpr64(t2) != 0; // bne t2, r0, L58 + c->andi(t2, t0, 4); // andi t2, t0, 4 + if (bc) {goto block_70;} // branch non-likely + + bc = c->sgpr64(t2) != 0; // bne t2, r0, L59 + // nop // sll r0, r0, 0 + if (bc) {goto block_71;} // branch non-likely + + c->vadd_bc(DEST::x, BC::x, vf23, vf0, vf24); // vaddx.x vf23, vf0, vf24 + // nop // sll r0, r0, 0 + c->sqc2(vf23, 1184, t1); // sqc2 vf23, 1184(t1) + c->vadd_bc(DEST::y, BC::w, vf23, vf23, vf15); // vaddw.y vf23, vf23, vf15 + //beq r0, r0, L37 // beq r0, r0, L37 + c->daddiu(t1, t1, 16); // daddiu t1, t1, 16 + goto block_4; // branch always + + +block_70: + c->vsub(DEST::x, vf23, vf24, vf1); // vsub.x vf23, vf24, vf1 + c->sqc2(vf23, 1184, t1); // sqc2 vf23, 1184(t1) + c->vadd_bc(DEST::x, BC::x, vf23, vf0, vf24); // vaddx.x vf23, vf0, vf24 + c->vadd_bc(DEST::y, BC::w, vf23, vf23, vf15); // vaddw.y vf23, vf23, vf15 + //beq r0, r0, L37 // beq r0, r0, L37 + c->daddiu(t1, t1, 16); // daddiu t1, t1, 16 + goto block_4; // branch always + + +block_71: + c->vmul_bc(DEST::x, BC::w, vf1, vf1, vf16); // vmulw.x vf1, vf1, vf16 + // nop // sll r0, r0, 0 + c->vsub(DEST::x, vf23, vf24, vf1); // vsub.x vf23, vf24, vf1 + c->sqc2(vf23, 1184, t1); // sqc2 vf23, 1184(t1) + c->vadd_bc(DEST::x, BC::x, vf23, vf0, vf24); // vaddx.x vf23, vf0, vf24 + c->vadd_bc(DEST::y, BC::w, vf23, vf23, vf15); // vaddw.y vf23, vf23, vf15 + //beq r0, r0, L37 // beq r0, r0, L37 + c->daddiu(t1, t1, 16); // daddiu t1, t1, 16 + goto block_4; // branch always + + +block_72: + c->addu(t2, t3, a3); // addu t2, t3, a3 + // nop // sll r0, r0, 0 + c->lqc2(vf5, -96, t2); // lqc2 vf5, -96(t2) + c->mov128_gpr_vf(t2, vf1); // qmfc2.i t2, vf1 + bc = ((s64)c->sgpr64(t2)) < 0; // bltz t2, L63 + c->sra(t2, t2, 31); // sra t2, t2, 31 + if (bc) {goto block_78;} // branch non-likely + + c->vmul(DEST::xyzw, vf19, vf5, vf13); // vmul.xyzw vf19, vf5, vf13 + c->andi(t2, t0, 2); // andi t2, t0, 2 + bc = c->sgpr64(t2) == 0; // beq t2, r0, L61 + c->andi(t2, t0, 64); // andi t2, t0, 64 + if (bc) {goto block_76;} // branch non-likely + + bc = c->sgpr64(t2) != 0; // bne t2, r0, L61 + // nop // sll r0, r0, 0 + if (bc) {goto block_76;} // branch non-likely + + //beq r0, r0, L62 // beq r0, r0, L62 + c->vadd_bc(DEST::x, BC::w, vf23, vf23, vf19); // vaddw.x vf23, vf23, vf19 + goto block_77; // branch always + + +block_76: + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::x, BC::w, vf23, vf23, vf14); // vaddw.x vf23, vf23, vf14 + +block_77: + //beq r0, r0, L37 // beq r0, r0, L37 + // nop // sll r0, r0, 0 + goto block_4; // branch always + + +block_78: + c->vsub(DEST::xyzw, vf1, vf23, vf24); // vsub.xyzw vf1, vf23, vf24 + c->andi(a0, t0, 16); // andi a0, t0, 16 + bc = c->sgpr64(a0) != 0; // bne a0, r0, L64 + c->andi(a0, t0, 4); // andi a0, t0, 4 + if (bc) {goto block_81;} // branch non-likely + + bc = c->sgpr64(a0) != 0; // bne a0, r0, L65 + // nop // sll r0, r0, 0 + if (bc) {goto block_82;} // branch non-likely + + c->vadd_bc(DEST::x, BC::x, vf23, vf0, vf24); // vaddx.x vf23, vf0, vf24 + // nop // sll r0, r0, 0 + //beq r0, r0, L66 // beq r0, r0, L66 + c->sqc2(vf23, 1184, t1); // sqc2 vf23, 1184(t1) + goto block_83; // branch always + + +block_81: + c->vsub(DEST::x, vf23, vf24, vf1); // vsub.x vf23, vf24, vf1 + // nop // sll r0, r0, 0 + //beq r0, r0, L66 // beq r0, r0, L66 + c->sqc2(vf23, 1184, t1); // sqc2 vf23, 1184(t1) + goto block_83; // branch always + + +block_82: + c->vmul_bc(DEST::x, BC::w, vf1, vf1, vf16); // vmulw.x vf1, vf1, vf16 + // nop // sll r0, r0, 0 + c->vsub(DEST::x, vf23, vf24, vf1); // vsub.x vf23, vf24, vf1 + c->sqc2(vf23, 1184, t1); // sqc2 vf23, 1184(t1) + +block_83: + c->lw(a0, 3028, v1); // lw a0, 3028(v1) + c->mov64(t0, v1); // or t0, v1, r0 + c->lw(t1, 3024, v1); // lw t1, 3024(v1) + c->lqc2(vf23, 1184, t0); // lqc2 vf23, 1184(t0) + +block_84: + c->lbu(t2, 4, t1); // lbu t2, 4(t1) + c->daddiu(t1, t1, 1); // daddiu t1, t1, 1 + c->lqc2(vf20, 2944, v1); // lqc2 vf20, 2944(v1) + // nop // sll r0, r0, 0 + bc = c->sgpr64(t2) == 0; // beq t2, r0, L90 + c->daddiu(t3, t2, -3); // daddiu t3, t2, -3 + if (bc) {goto block_158;} // branch non-likely + + bc = ((s64)c->sgpr64(t3)) <= 0; // blez t3, L81 + c->daddiu(t3, t2, -126); // daddiu t3, t2, -126 + if (bc) {goto block_137;} // branch non-likely + + bc = c->sgpr64(t3) != 0; // bne t3, r0, L85 + // nop // sll r0, r0, 0 + if (bc) {goto block_143;} // branch non-likely + + c->lbu(t2, 4, t1); // lbu t2, 4(t1) + c->daddiu(t1, t1, 1); // daddiu t1, t1, 1 + c->addiu(t3, r0, 0); // addiu t3, r0, 0 + c->addiu(t4, r0, 0); // addiu t4, r0, 0 + bc = c->sgpr64(t2) == 0; // beq t2, r0, L90 + c->daddiu(t5, t2, -43); // daddiu t5, t2, -43 + if (bc) {goto block_158;} // branch non-likely + + c->movz(t3, t2, t5); // movz t3, t2, t5 + c->daddiu(t5, t2, -45); // daddiu t5, t2, -45 + c->movz(t3, t2, t5); // movz t3, t2, t5 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t3) != 0; // bne t3, r0, L68 + c->daddiu(t5, t2, -91); // daddiu t5, t2, -91 + if (bc) {goto block_98;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L67 + c->daddiu(t4, t2, -93); // daddiu t4, t2, -93 + if (bc) {goto block_84;} // branch non-likely + + bc = c->sgpr64(t4) == 0; // beq t4, r0, L67 + c->daddiu(t4, t2, -121); // daddiu t4, t2, -121 + if (bc) {goto block_84;} // branch non-likely + + bc = c->sgpr64(t4) == 0; // beq t4, r0, L79 + c->daddiu(t4, t2, -89); // daddiu t4, t2, -89 + if (bc) {goto block_135;} // branch non-likely + + bc = c->sgpr64(t4) == 0; // beq t4, r0, L79 + c->daddiu(t4, t2, -122); // daddiu t4, t2, -122 + if (bc) {goto block_135;} // branch non-likely + + bc = c->sgpr64(t4) == 0; // beq t4, r0, L80 + c->daddiu(t4, t2, -90); // daddiu t4, t2, -90 + if (bc) {goto block_136;} // branch non-likely + + bc = c->sgpr64(t4) == 0; // beq t4, r0, L80 + c->daddiu(t4, t2, -48); // daddiu t4, t2, -48 + if (bc) {goto block_136;} // branch non-likely + + bc = ((s64)c->sgpr64(t4)) < 0; // bltz t4, L85 + c->daddiu(t4, t2, -57); // daddiu t4, t2, -57 + if (bc) {goto block_143;} // branch non-likely + + bc = ((s64)c->sgpr64(t4)) > 0; // bgtz t4, L85 + c->daddiu(t4, t2, -126); // daddiu t4, t2, -126 + if (bc) {goto block_143;} // branch non-likely + + bc = c->sgpr64(t4) == 0; // beq t4, r0, L85 + c->daddiu(t4, t2, -48); // daddiu t4, t2, -48 + if (bc) {goto block_143;} // branch non-likely + + +block_98: + c->lbu(t2, 4, t1); // lbu t2, 4(t1) + c->daddiu(t1, t1, 1); // daddiu t1, t1, 1 + bc = c->sgpr64(t2) == 0; // beq t2, r0, L90 + c->daddiu(t5, t2, -110); // daddiu t5, t2, -110 + if (bc) {goto block_158;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L69 + c->daddiu(t5, t2, -78); // daddiu t5, t2, -78 + if (bc) {goto block_118;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L69 + c->daddiu(t5, t2, -108); // daddiu t5, t2, -108 + if (bc) {goto block_118;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L67 + c->daddiu(t5, t2, -76); // daddiu t5, t2, -76 + if (bc) {goto block_84;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L67 + c->daddiu(t5, t2, -119); // daddiu t5, t2, -119 + if (bc) {goto block_84;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L71 + c->daddiu(t5, t2, -87); // daddiu t5, t2, -87 + if (bc) {goto block_121;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L71 + c->daddiu(t5, t2, -107); // daddiu t5, t2, -107 + if (bc) {goto block_121;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L72 + c->daddiu(t5, t2, -75); // daddiu t5, t2, -75 + if (bc) {goto block_123;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L72 + c->daddiu(t5, t2, -106); // daddiu t5, t2, -106 + if (bc) {goto block_123;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L67 + c->daddiu(t5, t2, -74); // daddiu t5, t2, -74 + if (bc) {goto block_84;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L67 + c->daddiu(t5, t2, -104); // daddiu t5, t2, -104 + if (bc) {goto block_84;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L73 + c->daddiu(t5, t2, -72); // daddiu t5, t2, -72 + if (bc) {goto block_125;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L73 + c->daddiu(t5, t2, -118); // daddiu t5, t2, -118 + if (bc) {goto block_125;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L76 + c->daddiu(t5, t2, -86); // daddiu t5, t2, -86 + if (bc) {goto block_130;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L76 + c->daddiu(t5, t2, -117); // daddiu t5, t2, -117 + if (bc) {goto block_130;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L67 + c->daddiu(t5, t2, -85); // daddiu t5, t2, -85 + if (bc) {goto block_84;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L67 + c->daddiu(t5, t2, -48); // daddiu t5, t2, -48 + if (bc) {goto block_84;} // branch non-likely + + bc = ((s64)c->sgpr64(t5)) < 0; // bltz t5, L85 + c->daddiu(t6, t2, -57); // daddiu t6, t2, -57 + if (bc) {goto block_143;} // branch non-likely + + bc = ((s64)c->sgpr64(t6)) > 0; // bgtz t6, L85 + c->sll(t6, t4, 2); // sll t6, t4, 2 + if (bc) {goto block_143;} // branch non-likely + + c->daddu(t2, t4, t6); // daddu t2, t4, t6 + // nop // sll r0, r0, 0 + c->sll(t2, t2, 1); // sll t2, t2, 1 + // nop // sll r0, r0, 0 + //beq r0, r0, L68 // beq r0, r0, L68 + c->daddu(t4, t2, t5); // daddu t4, t2, t5 + goto block_98; // branch always + + +block_118: + bc = c->sgpr64(t4) != 0; // bne t4, r0, L70 + c->addiu(t2, r0, -33); // addiu t2, r0, -33 + if (bc) {goto block_120;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lq(a3, 80, v1); // lq a3, 80(v1) + // nop // sll r0, r0, 0 + c->lq(t3, 96, v1); // lq t3, 96(v1) + // nop // sll r0, r0, 0 + c->lq(t4, 112, v1); // lq t4, 112(v1) + // nop // sll r0, r0, 0 + c->lq(t5, 128, v1); // lq t5, 128(v1) + // nop // sll r0, r0, 0 + c->sq(a3, 2944, v1); // sq a3, 2944(v1) + // nop // sll r0, r0, 0 + c->sq(t3, 2960, v1); // sq t3, 2960(v1) + // nop // sll r0, r0, 0 + c->sq(t4, 2976, v1); // sq t4, 2976(v1) + // nop // sll r0, r0, 0 + c->sq(t5, 2992, v1); // sq t5, 2992(v1) + // nop // sll r0, r0, 0 + c->load_symbol2(a3, cache.font12_table); // lw a3, *font12-table*(s7) + c->mov64(a3, a3); // or a3, a3, r0 + // nop // sll r0, r0, 0 + c->lqc2(vf13, 208, v1); // lqc2 vf13, 208(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 224, v1); // lqc2 vf14, 224(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf15, 240, v1); // lqc2 vf15, 240(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 352, v1); // sqc2 vf14, 352(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 368, v1); // sqc2 vf14, 368(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 384, v1); // sqc2 vf14, 384(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 400, v1); // sqc2 vf14, 400(v1) + //beq r0, r0, L67 // beq r0, r0, L67 + c->and_(a0, a0, t2); // and a0, a0, t2 + goto block_84; // branch always + + +block_120: + // nop // sll r0, r0, 0 + c->lq(a3, 144, v1); // lq a3, 144(v1) + // nop // sll r0, r0, 0 + c->lq(t2, 160, v1); // lq t2, 160(v1) + // nop // sll r0, r0, 0 + c->lq(t3, 176, v1); // lq t3, 176(v1) + // nop // sll r0, r0, 0 + c->lq(t4, 192, v1); // lq t4, 192(v1) + // nop // sll r0, r0, 0 + c->sq(a3, 2944, v1); // sq a3, 2944(v1) + // nop // sll r0, r0, 0 + c->sq(t2, 2960, v1); // sq t2, 2960(v1) + // nop // sll r0, r0, 0 + c->sq(t3, 2976, v1); // sq t3, 2976(v1) + // nop // sll r0, r0, 0 + c->sq(t4, 2992, v1); // sq t4, 2992(v1) + // nop // sll r0, r0, 0 + c->load_symbol2(a3, cache.font24_table); // lw a3, *font24-table*(s7) + c->mov64(a3, a3); // or a3, a3, r0 + // nop // sll r0, r0, 0 + c->lqc2(vf13, 256, v1); // lqc2 vf13, 256(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf15, 336, v1); // lqc2 vf15, 336(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 272, v1); // lqc2 vf14, 272(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 352, v1); // sqc2 vf14, 352(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 288, v1); // lqc2 vf14, 288(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 368, v1); // sqc2 vf14, 368(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 304, v1); // lqc2 vf14, 304(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 384, v1); // sqc2 vf14, 384(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 320, v1); // lqc2 vf14, 320(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 400, v1); // sqc2 vf14, 400(v1) + //beq r0, r0, L67 // beq r0, r0, L67 + c->ori(a0, a0, 32); // ori a0, a0, 32 + goto block_84; // branch always + + +block_121: + c->addiu(t2, r0, -2); // addiu t2, r0, -2 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t4) == 0; // beq t4, r0, L67 + c->and_(a0, a0, t2); // and a0, a0, t2 + if (bc) {goto block_84;} // branch non-likely + + //beq r0, r0, L67 // beq r0, r0, L67 + c->ori(a0, a0, 1); // ori a0, a0, 1 + goto block_84; // branch always + + +block_123: + c->addiu(t2, r0, -3); // addiu t2, r0, -3 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t4) == 0; // beq t4, r0, L67 + c->and_(a0, a0, t2); // and a0, a0, t2 + if (bc) {goto block_84;} // branch non-likely + + //beq r0, r0, L67 // beq r0, r0, L67 + c->ori(a0, a0, 2); // ori a0, a0, 2 + goto block_84; // branch always + + +block_125: + c->mov128_vf_gpr(vf1, t4); // qmtc2.i vf1, t4 + c->daddiu(t2, t3, -45); // daddiu t2, t3, -45 + bc = c->sgpr64(t3) == 0; // beq t3, r0, L75 + c->vitof0(DEST::xyzw, vf1, vf1); // vitof0.xyzw vf1, vf1 + if (bc) {goto block_129;} // branch non-likely + + bc = c->sgpr64(t2) == 0; // beq t2, r0, L74 + // nop // sll r0, r0, 0 + if (bc) {goto block_128;} // branch non-likely + + //beq r0, r0, L67 // beq r0, r0, L67 + c->vadd_bc(DEST::x, BC::x, vf23, vf23, vf1); // vaddx.x vf23, vf23, vf1 + goto block_84; // branch always + + +block_128: + //beq r0, r0, L67 // beq r0, r0, L67 + c->vsub_bc(DEST::x, BC::x, vf23, vf23, vf1); // vsubx.x vf23, vf23, vf1 + goto block_84; // branch always + + +block_129: + //beq r0, r0, L67 // beq r0, r0, L67 + c->vadd_bc(DEST::x, BC::x, vf23, vf0, vf1); // vaddx.x vf23, vf0, vf1 + goto block_84; // branch always + + +block_130: + c->mov128_vf_gpr(vf1, t4); // qmtc2.i vf1, t4 + c->daddiu(t2, t3, -45); // daddiu t2, t3, -45 + bc = c->sgpr64(t3) == 0; // beq t3, r0, L78 + c->vitof0(DEST::xyzw, vf1, vf1); // vitof0.xyzw vf1, vf1 + if (bc) {goto block_134;} // branch non-likely + + bc = c->sgpr64(t2) == 0; // beq t2, r0, L77 + // nop // sll r0, r0, 0 + if (bc) {goto block_133;} // branch non-likely + + //beq r0, r0, L67 // beq r0, r0, L67 + c->vadd_bc(DEST::y, BC::x, vf23, vf23, vf1); // vaddx.y vf23, vf23, vf1 + goto block_84; // branch always + + +block_133: + //beq r0, r0, L67 // beq r0, r0, L67 + c->vsub_bc(DEST::y, BC::x, vf23, vf23, vf1); // vsubx.y vf23, vf23, vf1 + goto block_84; // branch always + + +block_134: + //beq r0, r0, L67 // beq r0, r0, L67 + c->vadd_bc(DEST::y, BC::x, vf23, vf0, vf1); // vaddx.y vf23, vf0, vf1 + goto block_84; // branch always + + +block_135: + //beq r0, r0, L67 // beq r0, r0, L67 + c->sqc2(vf23, 464, v1); // sqc2 vf23, 464(v1) + goto block_84; // branch always + + +block_136: + //beq r0, r0, L67 // beq r0, r0, L67 + c->lqc2(vf23, 464, v1); // lqc2 vf23, 464(v1) + goto block_84; // branch always + + +block_137: + c->daddiu(t3, t2, -3); // daddiu t3, t2, -3 + c->ori(a0, a0, 64); // ori a0, a0, 64 + bc = c->sgpr64(t3) == 0; // beq t3, r0, L83 + c->daddiu(t2, t2, -2); // daddiu t2, t2, -2 + if (bc) {goto block_141;} // branch non-likely + + bc = c->sgpr64(t2) == 0; // beq t2, r0, L82 + c->lqc2(vf14, 384, v1); // lqc2 vf14, 384(v1) + if (bc) {goto block_140;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lqc2(vf14, 368, v1); // lqc2 vf14, 368(v1) + //beq r0, r0, L84 // beq r0, r0, L84 + c->lqc2(vf20, 2960, v1); // lqc2 vf20, 2960(v1) + goto block_142; // branch always + + +block_140: + //beq r0, r0, L84 // beq r0, r0, L84 + c->lqc2(vf20, 2976, v1); // lqc2 vf20, 2976(v1) + goto block_142; // branch always + + +block_141: + // nop // sll r0, r0, 0 + c->lqc2(vf14, 400, v1); // lqc2 vf14, 400(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf20, 2992, v1); // lqc2 vf20, 2992(v1) + +block_142: + c->lbu(t2, 4, t1); // lbu t2, 4(t1) + c->daddiu(t1, t1, 1); // daddiu t1, t1, 1 + c->vadd(DEST::xyz, vf4, vf23, vf15); // vadd.xyz vf4, vf23, vf15 + c->sll(t3, t2, 4); // sll t3, t2, 4 + //beq r0, r0, L87 // beq r0, r0, L87 + c->vsub(DEST::xyzw, vf1, vf25, vf23); // vsub.xyzw vf1, vf25, vf23 + goto block_146; // branch always + + +block_143: + // nop // sll r0, r0, 0 + c->addiu(t3, r0, -65); // addiu t3, r0, -65 + c->and_(a0, a0, t3); // and a0, a0, t3 + c->lqc2(vf14, 352, v1); // lqc2 vf14, 352(v1) + c->vadd(DEST::xyz, vf4, vf23, vf15); // vadd.xyz vf4, vf23, vf15 + c->sll(t3, t2, 4); // sll t3, t2, 4 + c->vsub(DEST::xyzw, vf1, vf25, vf23); // vsub.xyzw vf1, vf25, vf23 + c->daddiu(t4, t2, -10); // daddiu t4, t2, -10 + bc = c->sgpr64(t4) == 0; // beq t4, r0, L86 + c->daddiu(t2, t2, -13); // daddiu t2, t2, -13 + if (bc) {goto block_145;} // branch non-likely + + bc = c->sgpr64(t2) != 0; // bne t2, r0, L87 + // nop // sll r0, r0, 0 + if (bc) {goto block_146;} // branch non-likely + + +block_145: + // nop // sll r0, r0, 0 + c->daddiu(t0, t0, 16); // daddiu t0, t0, 16 + //beq r0, r0, L67 // beq r0, r0, L67 + c->lqc2(vf23, 1184, t0); // lqc2 vf23, 1184(t0) + goto block_84; // branch always + + +block_146: + // nop // sll r0, r0, 0 + c->addu(t2, t3, a3); // addu t2, t3, a3 + c->lqc2(vf5, -96, t2); // lqc2 vf5, -96(t2) + c->mov128_gpr_vf(t2, vf1); // qmfc2.i t2, vf1 + bc = ((s64)c->sgpr64(t2)) < 0; // bltz t2, L90 + c->vadd(DEST::xyz, vf6, vf5, vf16); // vadd.xyz vf6, vf5, vf16 + if (bc) {goto block_158;} // branch non-likely + + c->sra(t2, t2, 31); // sra t2, t2, 31 + c->vadd(DEST::xyz, vf7, vf5, vf17); // vadd.xyz vf7, vf5, vf17 + bc = ((s64)c->sgpr64(t2)) < 0; // bltz t2, L67 + c->vadd(DEST::xyz, vf8, vf5, vf18); // vadd.xyz vf8, vf5, vf18 + if (bc) {goto block_84;} // branch non-likely + + c->vadd(DEST::xyz, vf1, vf23, vf0); // vadd.xyz vf1, vf23, vf0 + c->andi(t2, a0, 1); // andi t2, a0, 1 + c->vadd(DEST::xyz, vf2, vf23, vf13); // vadd.xyz vf2, vf23, vf13 + c->sqc2(vf5, 736, v1); // sqc2 vf5, 736(v1) + c->vadd(DEST::xyz, vf3, vf23, vf14); // vadd.xyz vf3, vf23, vf14 + c->sqc2(vf6, 752, v1); // sqc2 vf6, 752(v1) + c->vmul(DEST::xyzw, vf19, vf5, vf13); // vmul.xyzw vf19, vf5, vf13 + c->sqc2(vf7, 768, v1); // sqc2 vf7, 768(v1) + bc = c->sgpr64(t2) == 0; // beq t2, r0, L67 + c->sqc2(vf8, 784, v1); // sqc2 vf8, 784(v1) + if (bc) {goto block_84;} // branch non-likely + + // nop // sll r0, r0, 0 + c->sqc2(vf1, 608, v1); // sqc2 vf1, 608(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf2, 624, v1); // sqc2 vf2, 624(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf3, 640, v1); // sqc2 vf3, 640(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf4, 656, v1); // sqc2 vf4, 656(v1) + c->lqc2(vf1, 608, v1); // lqc2 vf1, 608(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf2, 624, v1); // lqc2 vf2, 624(v1) + c->vmula_bc(DEST::xyzw, BC::w, vf31, vf0); // vmulaw.xyzw acc, vf31, vf0 + c->lqc2(vf3, 640, v1); // lqc2 vf3, 640(v1) + c->vmadda_bc(DEST::xyzw, BC::x, vf28, vf1); // vmaddax.xyzw acc, vf28, vf1 + c->lqc2(vf4, 656, v1); // lqc2 vf4, 656(v1) + c->vmadda_bc(DEST::xyzw, BC::y, vf29, vf1); // vmadday.xyzw acc, vf29, vf1 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf1, vf30, vf1); // vmaddz.xyzw vf1, vf30, vf1 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf31, vf0); // vmulaw.xyzw acc, vf31, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf28, vf2); // vmaddax.xyzw acc, vf28, vf2 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf29, vf2); // vmadday.xyzw acc, vf29, vf2 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf2, vf30, vf2); // vmaddz.xyzw vf2, vf30, vf2 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf31, vf0); // vmulaw.xyzw acc, vf31, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf28, vf3); // vmaddax.xyzw acc, vf28, vf3 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf29, vf3); // vmadday.xyzw acc, vf29, vf3 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf3, vf30, vf3); // vmaddz.xyzw vf3, vf30, vf3 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf31, vf0); // vmulaw.xyzw acc, vf31, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf28, vf4); // vmaddax.xyzw acc, vf28, vf4 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf29, vf4); // vmadday.xyzw acc, vf29, vf4 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf4, vf30, vf4); // vmaddz.xyzw vf4, vf30, vf4 + c->vdiv(vf25, BC::z, vf1, BC::w); // vdiv Q, vf25.z, vf1.w + c->lq(t2, 32, v1); // lq t2, 32(v1) + // nop // sll r0, r0, 0 + c->lq(t3, 48, v1); // lq t3, 48(v1) + // nop // sll r0, r0, 0 + c->sq(t2, 0, a1); // sq t2, 0(a1) + // nop // sll r0, r0, 0 + c->sq(t3, 16, a1); // sq t3, 16(a1) + c->lqc2(vf5, 736, v1); // lqc2 vf5, 736(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf6, 752, v1); // lqc2 vf6, 752(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf7, 768, v1); // lqc2 vf7, 768(v1) + // nop // sll r0, r0, 0 + c->vmulq(DEST::xyz, vf1, vf1); // vmulq.xyz vf1, vf1, Q + c->sqc2(vf20, 32, a1); // sqc2 vf20, 32(a1) + c->vmulq(DEST::xyz, vf5, vf5); // vmulq.xyz vf5, vf5, Q + // nop // sll r0, r0, 0 + // nop // vnop + // nop // sll r0, r0, 0 + // nop // vnop + // nop // sll r0, r0, 0 + c->vdiv(vf25, BC::z, vf2, BC::w); // vdiv Q, vf25.z, vf2.w + // nop // sll r0, r0, 0 + c->lqc2(vf8, 784, v1); // lqc2 vf8, 784(v1) + // nop // sll r0, r0, 0 + c->vadd(DEST::xyzw, vf1, vf1, vf26); // vadd.xyzw vf1, vf1, vf26 + // nop // sll r0, r0, 0 + c->lqc2(vf9, 2208, v1); // lqc2 vf9, 2208(v1) + // 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->vftoi4_sat(DEST::xyzw, vf1, vf1); // vftoi4.xyzw vf1, vf1 + // nop // sll r0, r0, 0 + c->vmulq(DEST::xyz, vf2, vf2); // vmulq.xyz vf2, vf2, Q + // nop // sll r0, r0, 0 + c->vmulq(DEST::xyz, vf6, vf6); // vmulq.xyz vf6, vf6, Q + c->sqc2(vf5, 48, a1); // sqc2 vf5, 48(a1) + // nop // vnop + // nop // sll r0, r0, 0 + // nop // vnop + // nop // sll r0, r0, 0 + c->vdiv(vf25, BC::z, vf3, BC::w); // vdiv Q, vf25.z, vf3.w + c->sqc2(vf9, 64, a1); // sqc2 vf9, 64(a1) + // nop // sll r0, r0, 0 + c->sqc2(vf1, 80, a1); // sqc2 vf1, 80(a1) + c->vadd(DEST::xyzw, vf2, vf2, vf26); // vadd.xyzw vf2, vf2, vf26 + // 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->vftoi4_sat(DEST::xyzw, vf2, vf2); // vftoi4.xyzw vf2, vf2 + // nop // sll r0, r0, 0 + c->vmulq(DEST::xyz, vf3, vf3); // vmulq.xyz vf3, vf3, Q + // nop // sll r0, r0, 0 + c->vmulq(DEST::xyz, vf7, vf7); // vmulq.xyz vf7, vf7, Q + c->sqc2(vf6, 96, a1); // sqc2 vf6, 96(a1) + // nop // vnop + // nop // sll r0, r0, 0 + // nop // vnop + // nop // sll r0, r0, 0 + c->vdiv(vf25, BC::z, vf4, BC::w); // vdiv Q, vf25.z, vf4.w + c->sqc2(vf9, 112, a1); // sqc2 vf9, 112(a1) + // nop // sll r0, r0, 0 + c->sqc2(vf2, 128, a1); // sqc2 vf2, 128(a1) + c->vadd(DEST::xyzw, vf3, vf3, vf26); // vadd.xyzw vf3, vf3, vf26 + // 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->vftoi4_sat(DEST::xyzw, vf3, vf3); // vftoi4.xyzw vf3, vf3 + // nop // sll r0, r0, 0 + c->vmulq(DEST::xyz, vf4, vf4); // vmulq.xyz vf4, vf4, Q + // nop // sll r0, r0, 0 + c->vmulq(DEST::xyz, vf8, vf8); // vmulq.xyz vf8, vf8, Q + c->sqc2(vf7, 144, a1); // sqc2 vf7, 144(a1) + // nop // sll r0, r0, 0 + c->sqc2(vf9, 160, a1); // sqc2 vf9, 160(a1) + c->vadd(DEST::xyzw, vf4, vf4, vf26); // vadd.xyzw vf4, vf4, vf26 + c->sqc2(vf3, 176, a1); // sqc2 vf3, 176(a1) + c->andi(t2, a0, 2); // andi t2, a0, 2 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t2) == 0; // beq t2, r0, L88 + c->andi(t2, a0, 64); // andi t2, a0, 64 + if (bc) {goto block_152;} // branch non-likely + + bc = c->sgpr64(t2) != 0; // bne t2, r0, L88 + // nop // sll r0, r0, 0 + if (bc) {goto block_152;} // branch non-likely + + //beq r0, r0, L89 // beq r0, r0, L89 + c->vadd_bc(DEST::x, BC::w, vf23, vf23, vf19); // vaddw.x vf23, vf23, vf19 + goto block_153; // branch always + + +block_152: + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::x, BC::w, vf23, vf23, vf14); // vaddw.x vf23, vf23, vf14 + +block_153: + c->vftoi4_sat(DEST::xyzw, vf4, vf4); // vftoi4.xyzw vf4, vf4 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->sqc2(vf8, 192, a1); // sqc2 vf8, 192(a1) + // nop // sll r0, r0, 0 + c->sqc2(vf9, 208, a1); // sqc2 vf9, 208(a1) + // nop // sll r0, r0, 0 + c->sqc2(vf4, 224, a1); // sqc2 vf4, 224(a1) + // nop // sll r0, r0, 0 + c->lw(t3, 80, a1); // lw t3, 80(a1) + // nop // sll r0, r0, 0 + c->lw(t2, 84, a1); // lw t2, 84(a1) + c->ori(t4, r0, 36864); // ori t4, r0, 36864 + c->dsubu(t3, t3, t4); // dsubu t3, t3, t4 + c->lw(t4, 224, a1); // lw t4, 224(a1) + c->ori(t5, r0, 36096); // ori t5, r0, 36096 + c->dsubu(t2, t2, t5); // dsubu t2, t2, t5 + c->lw(t5, 228, a1); // lw t5, 228(a1) + bc = ((s64)c->sgpr64(t3)) > 0; // bgtz t3, L67 + c->daddiu(t3, t4, -28672); // daddiu t3, t4, -28672 + if (bc) {goto block_84;} // branch non-likely + + bc = ((s64)c->sgpr64(t2)) > 0; // bgtz t2, L67 + c->daddiu(t2, t5, -29440); // daddiu t2, t5, -29440 + if (bc) {goto block_84;} // branch non-likely + + bc = ((s64)c->sgpr64(t3)) < 0; // bltz t3, L67 + // nop // sll r0, r0, 0 + if (bc) {goto block_84;} // branch non-likely + + bc = ((s64)c->sgpr64(t2)) < 0; // bltz t2, L67 + // nop // sll r0, r0, 0 + if (bc) {goto block_84;} // branch non-likely + + //beq r0, r0, L67 // beq r0, r0, L67 + c->daddiu(a1, a1, 240); // daddiu a1, a1, 240 + goto block_84; // branch always + + +block_158: + c->lw(a0, 3028, v1); // lw a0, 3028(v1) + c->mov64(t0, v1); // or t0, v1, r0 + c->lw(t1, 3024, v1); // lw t1, 3024(v1) + c->lqc2(vf23, 1184, t0); // lqc2 vf23, 1184(t0) + +block_159: + c->lbu(t2, 4, t1); // lbu t2, 4(t1) + c->daddiu(t1, t1, 1); // daddiu t1, t1, 1 + c->lqc2(vf20, 2944, v1); // lqc2 vf20, 2944(v1) + // nop // sll r0, r0, 0 + bc = c->sgpr64(t2) == 0; // beq t2, r0, L117 + c->daddiu(t3, t2, -3); // daddiu t3, t2, -3 + if (bc) {goto block_236;} // branch non-likely + + bc = ((s64)c->sgpr64(t3)) <= 0; // blez t3, L108 + c->daddiu(t3, t2, -126); // daddiu t3, t2, -126 + if (bc) {goto block_216;} // branch non-likely + + bc = c->sgpr64(t3) != 0; // bne t3, r0, L112 + // nop // sll r0, r0, 0 + if (bc) {goto block_222;} // branch non-likely + + c->lbu(t2, 4, t1); // lbu t2, 4(t1) + c->daddiu(t1, t1, 1); // daddiu t1, t1, 1 + c->addiu(t3, r0, 0); // addiu t3, r0, 0 + c->addiu(t4, r0, 0); // addiu t4, r0, 0 + bc = c->sgpr64(t2) == 0; // beq t2, r0, L117 + c->daddiu(t5, t2, -43); // daddiu t5, t2, -43 + if (bc) {goto block_236;} // branch non-likely + + c->movz(t3, t2, t5); // movz t3, t2, t5 + c->daddiu(t5, t2, -45); // daddiu t5, t2, -45 + c->movz(t3, t2, t5); // movz t3, t2, t5 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t3) != 0; // bne t3, r0, L92 + c->daddiu(t5, t2, -91); // daddiu t5, t2, -91 + if (bc) {goto block_173;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L104 + c->daddiu(t4, t2, -93); // daddiu t4, t2, -93 + if (bc) {goto block_212;} // branch non-likely + + bc = c->sgpr64(t4) == 0; // beq t4, r0, L105 + c->daddiu(t4, t2, -121); // daddiu t4, t2, -121 + if (bc) {goto block_213;} // branch non-likely + + bc = c->sgpr64(t4) == 0; // beq t4, r0, L106 + c->daddiu(t4, t2, -89); // daddiu t4, t2, -89 + if (bc) {goto block_214;} // branch non-likely + + bc = c->sgpr64(t4) == 0; // beq t4, r0, L106 + c->daddiu(t4, t2, -122); // daddiu t4, t2, -122 + if (bc) {goto block_214;} // branch non-likely + + bc = c->sgpr64(t4) == 0; // beq t4, r0, L107 + c->daddiu(t4, t2, -90); // daddiu t4, t2, -90 + if (bc) {goto block_215;} // branch non-likely + + bc = c->sgpr64(t4) == 0; // beq t4, r0, L107 + c->daddiu(t4, t2, -48); // daddiu t4, t2, -48 + if (bc) {goto block_215;} // branch non-likely + + bc = ((s64)c->sgpr64(t4)) < 0; // bltz t4, L112 + c->daddiu(t4, t2, -57); // daddiu t4, t2, -57 + if (bc) {goto block_222;} // branch non-likely + + bc = ((s64)c->sgpr64(t4)) > 0; // bgtz t4, L112 + c->daddiu(t4, t2, -126); // daddiu t4, t2, -126 + if (bc) {goto block_222;} // branch non-likely + + bc = c->sgpr64(t4) == 0; // beq t4, r0, L112 + c->daddiu(t4, t2, -48); // daddiu t4, t2, -48 + if (bc) {goto block_222;} // branch non-likely + + +block_173: + c->lbu(t2, 4, t1); // lbu t2, 4(t1) + c->daddiu(t1, t1, 1); // daddiu t1, t1, 1 + bc = c->sgpr64(t2) == 0; // beq t2, r0, L117 + c->daddiu(t5, t2, -110); // daddiu t5, t2, -110 + if (bc) {goto block_236;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L93 + c->daddiu(t5, t2, -78); // daddiu t5, t2, -78 + if (bc) {goto block_193;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L93 + c->daddiu(t5, t2, -108); // daddiu t5, t2, -108 + if (bc) {goto block_193;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L95 + c->daddiu(t5, t2, -76); // daddiu t5, t2, -76 + if (bc) {goto block_196;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L95 + c->daddiu(t5, t2, -119); // daddiu t5, t2, -119 + if (bc) {goto block_196;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L91 + c->daddiu(t5, t2, -87); // daddiu t5, t2, -87 + if (bc) {goto block_159;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L91 + c->daddiu(t5, t2, -107); // daddiu t5, t2, -107 + if (bc) {goto block_159;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L97 + c->daddiu(t5, t2, -75); // daddiu t5, t2, -75 + if (bc) {goto block_200;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L97 + c->daddiu(t5, t2, -106); // daddiu t5, t2, -106 + if (bc) {goto block_200;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L91 + c->daddiu(t5, t2, -74); // daddiu t5, t2, -74 + if (bc) {goto block_159;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L91 + c->daddiu(t5, t2, -104); // daddiu t5, t2, -104 + if (bc) {goto block_159;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L98 + c->daddiu(t5, t2, -72); // daddiu t5, t2, -72 + if (bc) {goto block_202;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L98 + c->daddiu(t5, t2, -118); // daddiu t5, t2, -118 + if (bc) {goto block_202;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L101 + c->daddiu(t5, t2, -86); // daddiu t5, t2, -86 + if (bc) {goto block_207;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L101 + c->daddiu(t5, t2, -117); // daddiu t5, t2, -117 + if (bc) {goto block_207;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L96 + c->daddiu(t5, t2, -85); // daddiu t5, t2, -85 + if (bc) {goto block_198;} // branch non-likely + + bc = c->sgpr64(t5) == 0; // beq t5, r0, L96 + c->daddiu(t5, t2, -48); // daddiu t5, t2, -48 + if (bc) {goto block_198;} // branch non-likely + + bc = ((s64)c->sgpr64(t5)) < 0; // bltz t5, L112 + c->daddiu(t6, t2, -57); // daddiu t6, t2, -57 + if (bc) {goto block_222;} // branch non-likely + + bc = ((s64)c->sgpr64(t6)) > 0; // bgtz t6, L112 + c->sll(t6, t4, 2); // sll t6, t4, 2 + if (bc) {goto block_222;} // branch non-likely + + c->daddu(t2, t4, t6); // daddu t2, t4, t6 + // nop // sll r0, r0, 0 + c->sll(t2, t2, 1); // sll t2, t2, 1 + // nop // sll r0, r0, 0 + //beq r0, r0, L92 // beq r0, r0, L92 + c->daddu(t4, t2, t5); // daddu t4, t2, t5 + goto block_173; // branch always + + +block_193: + bc = c->sgpr64(t4) != 0; // bne t4, r0, L94 + c->addiu(t2, r0, -33); // addiu t2, r0, -33 + if (bc) {goto block_195;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lq(a3, 80, v1); // lq a3, 80(v1) + // nop // sll r0, r0, 0 + c->lq(t3, 96, v1); // lq t3, 96(v1) + // nop // sll r0, r0, 0 + c->lq(t4, 112, v1); // lq t4, 112(v1) + // nop // sll r0, r0, 0 + c->lq(t5, 128, v1); // lq t5, 128(v1) + // nop // sll r0, r0, 0 + c->sq(a3, 2944, v1); // sq a3, 2944(v1) + // nop // sll r0, r0, 0 + c->sq(t3, 2960, v1); // sq t3, 2960(v1) + // nop // sll r0, r0, 0 + c->sq(t4, 2976, v1); // sq t4, 2976(v1) + // nop // sll r0, r0, 0 + c->sq(t5, 2992, v1); // sq t5, 2992(v1) + // nop // sll r0, r0, 0 + c->load_symbol2(a3, cache.font12_table); // lw a3, *font12-table*(s7) + c->mov64(a3, a3); // or a3, a3, r0 + // nop // sll r0, r0, 0 + c->lqc2(vf13, 208, v1); // lqc2 vf13, 208(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 224, v1); // lqc2 vf14, 224(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf15, 240, v1); // lqc2 vf15, 240(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 352, v1); // sqc2 vf14, 352(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 368, v1); // sqc2 vf14, 368(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 384, v1); // sqc2 vf14, 384(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 400, v1); // sqc2 vf14, 400(v1) + //beq r0, r0, L91 // beq r0, r0, L91 + c->and_(a0, a0, t2); // and a0, a0, t2 + goto block_159; // branch always + + +block_195: + // nop // sll r0, r0, 0 + c->lq(a3, 144, v1); // lq a3, 144(v1) + // nop // sll r0, r0, 0 + c->lq(t2, 160, v1); // lq t2, 160(v1) + // nop // sll r0, r0, 0 + c->lq(t3, 176, v1); // lq t3, 176(v1) + // nop // sll r0, r0, 0 + c->lq(t4, 192, v1); // lq t4, 192(v1) + // nop // sll r0, r0, 0 + c->sq(a3, 2944, v1); // sq a3, 2944(v1) + // nop // sll r0, r0, 0 + c->sq(t2, 2960, v1); // sq t2, 2960(v1) + // nop // sll r0, r0, 0 + c->sq(t3, 2976, v1); // sq t3, 2976(v1) + // nop // sll r0, r0, 0 + c->sq(t4, 2992, v1); // sq t4, 2992(v1) + // nop // sll r0, r0, 0 + c->load_symbol2(a3, cache.font24_table); // lw a3, *font24-table*(s7) + c->mov64(a3, a3); // or a3, a3, r0 + // nop // sll r0, r0, 0 + c->lqc2(vf13, 256, v1); // lqc2 vf13, 256(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf15, 336, v1); // lqc2 vf15, 336(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 272, v1); // lqc2 vf14, 272(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 352, v1); // sqc2 vf14, 352(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 288, v1); // lqc2 vf14, 288(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 368, v1); // sqc2 vf14, 368(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 304, v1); // lqc2 vf14, 304(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 384, v1); // sqc2 vf14, 384(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 320, v1); // lqc2 vf14, 320(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 400, v1); // sqc2 vf14, 400(v1) + //beq r0, r0, L91 // beq r0, r0, L91 + c->ori(a0, a0, 32); // ori a0, a0, 32 + goto block_159; // branch always + + +block_196: + c->andi(t2, a0, 128); // andi t2, a0, 128 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t2) != 0; // bne t2, r0, L91 + // nop // sll r0, r0, 0 + if (bc) {goto block_159;} // branch non-likely + + // nop // sll r0, r0, 0 + c->sw(t4, 3008, v1); // sw t4, 3008(v1) + c->sll(t2, t4, 4); // sll t2, t4, 4 + c->lq(t3, 672, v1); // lq t3, 672(v1) + c->daddu(t2, t2, v1); // daddu t2, t2, v1 + c->lq(t4, 688, v1); // lq t4, 688(v1) + // nop // sll r0, r0, 0 + c->sq(t3, 864, v1); // sq t3, 864(v1) + // nop // sll r0, r0, 0 + c->sq(t4, 880, v1); // sq t4, 880(v1) + // nop // sll r0, r0, 0 + c->lq(t3, 704, v1); // lq t3, 704(v1) + // nop // sll r0, r0, 0 + c->lq(t4, 720, v1); // lq t4, 720(v1) + // nop // sll r0, r0, 0 + c->sq(t3, 896, v1); // sq t3, 896(v1) + // nop // sll r0, r0, 0 + c->sq(t4, 912, v1); // sq t4, 912(v1) + // nop // sll r0, r0, 0 + c->lwu(t4, 2224, t2); // lwu t4, 2224(t2) + // nop // sll r0, r0, 0 + c->lwu(t3, 2228, t2); // lwu t3, 2228(t2) + c->pextlb(t4, r0, t4); // pextlb t4, r0, t4 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextlh(t4, r0, t4); // pextlh t4, r0, t4 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextlb(t3, r0, t3); // pextlb t3, r0, t3 + c->sq(t4, 672, v1); // sq t4, 672(v1) + c->pextlh(t3, r0, t3); // pextlh t3, r0, t3 + c->sq(t4, 1056, v1); // sq t4, 1056(v1) + // nop // sll r0, r0, 0 + c->sq(t3, 688, v1); // sq t3, 688(v1) + // nop // sll r0, r0, 0 + c->sq(t3, 1072, v1); // sq t3, 1072(v1) + // nop // sll r0, r0, 0 + c->lwu(t3, 2232, t2); // lwu t3, 2232(t2) + // nop // sll r0, r0, 0 + c->lwu(t2, 2236, t2); // lwu t2, 2236(t2) + c->pextlb(t3, r0, t3); // pextlb t3, r0, t3 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextlh(t3, r0, t3); // pextlh t3, r0, t3 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextlb(t2, r0, t2); // pextlb t2, r0, t2 + c->sq(t3, 704, v1); // sq t3, 704(v1) + c->pextlh(t2, r0, t2); // pextlh t2, r0, t2 + c->sq(t3, 1088, v1); // sq t3, 1088(v1) + // nop // sll r0, r0, 0 + c->sq(t2, 720, v1); // sq t2, 720(v1) + //beq r0, r0, L91 // beq r0, r0, L91 + c->sq(t2, 1104, v1); // sq t2, 1104(v1) + goto block_159; // branch always + + +block_198: + c->andi(t2, a0, 128); // andi t2, a0, 128 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t2) != 0; // bne t2, r0, L91 + // nop // sll r0, r0, 0 + if (bc) {goto block_159;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lq(t2, 672, v1); // lq t2, 672(v1) + // nop // sll r0, r0, 0 + c->lq(t3, 688, v1); // lq t3, 688(v1) + // nop // sll r0, r0, 0 + c->sq(t2, 864, v1); // sq t2, 864(v1) + // nop // sll r0, r0, 0 + c->sq(t3, 880, v1); // sq t3, 880(v1) + // nop // sll r0, r0, 0 + c->lq(t2, 704, v1); // lq t2, 704(v1) + // nop // sll r0, r0, 0 + c->lq(t3, 720, v1); // lq t3, 720(v1) + // nop // sll r0, r0, 0 + c->sq(t2, 896, v1); // sq t2, 896(v1) + // nop // sll r0, r0, 0 + c->sq(t3, 912, v1); // sq t3, 912(v1) + c->pextlb(t2, r0, t4); // pextlb t2, r0, t4 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextlh(t2, r0, t2); // pextlh t2, r0, t2 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->sq(t2, 672, v1); // sq t2, 672(v1) + // nop // sll r0, r0, 0 + c->sq(t2, 1056, v1); // sq t2, 1056(v1) + // nop // sll r0, r0, 0 + c->sq(t2, 688, v1); // sq t2, 688(v1) + // nop // sll r0, r0, 0 + c->sq(t2, 1072, v1); // sq t2, 1072(v1) + // nop // sll r0, r0, 0 + c->sq(t2, 704, v1); // sq t2, 704(v1) + // nop // sll r0, r0, 0 + c->sq(t2, 1088, v1); // sq t2, 1088(v1) + // nop // sll r0, r0, 0 + c->sq(t2, 720, v1); // sq t2, 720(v1) + //beq r0, r0, L91 // beq r0, r0, L91 + c->sq(t2, 1104, v1); // sq t2, 1104(v1) + goto block_159; // branch always + + +block_200: + c->addiu(t2, r0, -3); // addiu t2, r0, -3 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t4) == 0; // beq t4, r0, L91 + c->and_(a0, a0, t2); // and a0, a0, t2 + if (bc) {goto block_159;} // branch non-likely + + //beq r0, r0, L91 // beq r0, r0, L91 + c->ori(a0, a0, 2); // ori a0, a0, 2 + goto block_159; // branch always + + +block_202: + c->mov128_vf_gpr(vf1, t4); // qmtc2.i vf1, t4 + c->daddiu(t2, t3, -45); // daddiu t2, t3, -45 + bc = c->sgpr64(t3) == 0; // beq t3, r0, L100 + c->vitof0(DEST::xyzw, vf1, vf1); // vitof0.xyzw vf1, vf1 + if (bc) {goto block_206;} // branch non-likely + + bc = c->sgpr64(t2) == 0; // beq t2, r0, L99 + // nop // sll r0, r0, 0 + if (bc) {goto block_205;} // branch non-likely + + //beq r0, r0, L91 // beq r0, r0, L91 + c->vadd_bc(DEST::x, BC::x, vf23, vf23, vf1); // vaddx.x vf23, vf23, vf1 + goto block_159; // branch always + + +block_205: + //beq r0, r0, L91 // beq r0, r0, L91 + c->vsub_bc(DEST::x, BC::x, vf23, vf23, vf1); // vsubx.x vf23, vf23, vf1 + goto block_159; // branch always + + +block_206: + //beq r0, r0, L91 // beq r0, r0, L91 + c->vadd_bc(DEST::x, BC::x, vf23, vf0, vf1); // vaddx.x vf23, vf0, vf1 + goto block_159; // branch always + + +block_207: + c->mov128_vf_gpr(vf1, t4); // qmtc2.i vf1, t4 + c->daddiu(t2, t3, -45); // daddiu t2, t3, -45 + bc = c->sgpr64(t3) == 0; // beq t3, r0, L103 + c->vitof0(DEST::xyzw, vf1, vf1); // vitof0.xyzw vf1, vf1 + if (bc) {goto block_211;} // branch non-likely + + bc = c->sgpr64(t2) == 0; // beq t2, r0, L102 + // nop // sll r0, r0, 0 + if (bc) {goto block_210;} // branch non-likely + + //beq r0, r0, L91 // beq r0, r0, L91 + c->vadd_bc(DEST::y, BC::x, vf23, vf23, vf1); // vaddx.y vf23, vf23, vf1 + goto block_159; // branch always + + +block_210: + //beq r0, r0, L91 // beq r0, r0, L91 + c->vsub_bc(DEST::y, BC::x, vf23, vf23, vf1); // vsubx.y vf23, vf23, vf1 + goto block_159; // branch always + + +block_211: + //beq r0, r0, L91 // beq r0, r0, L91 + c->vadd_bc(DEST::y, BC::x, vf23, vf0, vf1); // vaddx.y vf23, vf0, vf1 + goto block_159; // branch always + + +block_212: + // nop // sll r0, r0, 0 + c->lw(t2, 3008, v1); // lw t2, 3008(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf9, 672, v1); // lqc2 vf9, 672(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf10, 688, v1); // lqc2 vf10, 688(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf11, 704, v1); // lqc2 vf11, 704(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf12, 720, v1); // lqc2 vf12, 720(v1) + // nop // sll r0, r0, 0 + c->sw(t2, 3012, v1); // sw t2, 3012(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf9, 480, v1); // sqc2 vf9, 480(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf10, 496, v1); // sqc2 vf10, 496(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf11, 512, v1); // sqc2 vf11, 512(v1) + //beq r0, r0, L91 // beq r0, r0, L91 + c->sqc2(vf12, 528, v1); // sqc2 vf12, 528(v1) + goto block_159; // branch always + + +block_213: + // nop // sll r0, r0, 0 + c->lw(t2, 3012, v1); // lw t2, 3012(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf9, 480, v1); // lqc2 vf9, 480(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf10, 496, v1); // lqc2 vf10, 496(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf11, 512, v1); // lqc2 vf11, 512(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf12, 528, v1); // lqc2 vf12, 528(v1) + // nop // sll r0, r0, 0 + c->sw(t2, 3008, v1); // sw t2, 3008(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf9, 672, v1); // sqc2 vf9, 672(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf9, 1056, v1); // sqc2 vf9, 1056(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf10, 688, v1); // sqc2 vf10, 688(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf10, 1072, v1); // sqc2 vf10, 1072(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf11, 704, v1); // sqc2 vf11, 704(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf11, 1088, v1); // sqc2 vf11, 1088(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf12, 720, v1); // sqc2 vf12, 720(v1) + //beq r0, r0, L91 // beq r0, r0, L91 + c->sqc2(vf12, 1104, v1); // sqc2 vf12, 1104(v1) + goto block_159; // branch always + + +block_214: + // nop // sll r0, r0, 0 + c->lw(t2, 3008, v1); // lw t2, 3008(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf9, 672, v1); // lqc2 vf9, 672(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf10, 688, v1); // lqc2 vf10, 688(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf11, 704, v1); // lqc2 vf11, 704(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf12, 720, v1); // lqc2 vf12, 720(v1) + // nop // sll r0, r0, 0 + c->sw(t2, 3016, v1); // sw t2, 3016(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf9, 544, v1); // sqc2 vf9, 544(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf10, 560, v1); // sqc2 vf10, 560(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf11, 576, v1); // sqc2 vf11, 576(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf12, 592, v1); // sqc2 vf12, 592(v1) + //beq r0, r0, L91 // beq r0, r0, L91 + c->sqc2(vf23, 464, v1); // sqc2 vf23, 464(v1) + goto block_159; // branch always + + +block_215: + // nop // sll r0, r0, 0 + c->lw(t2, 3016, v1); // lw t2, 3016(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf9, 544, v1); // lqc2 vf9, 544(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf10, 560, v1); // lqc2 vf10, 560(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf11, 576, v1); // lqc2 vf11, 576(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf12, 592, v1); // lqc2 vf12, 592(v1) + // nop // sll r0, r0, 0 + c->sw(t2, 3008, v1); // sw t2, 3008(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf9, 672, v1); // sqc2 vf9, 672(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf9, 1056, v1); // sqc2 vf9, 1056(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf10, 688, v1); // sqc2 vf10, 688(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf10, 1072, v1); // sqc2 vf10, 1072(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf11, 704, v1); // sqc2 vf11, 704(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf11, 1088, v1); // sqc2 vf11, 1088(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf12, 720, v1); // sqc2 vf12, 720(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf12, 1104, v1); // sqc2 vf12, 1104(v1) + //beq r0, r0, L91 // beq r0, r0, L91 + c->lqc2(vf23, 464, v1); // lqc2 vf23, 464(v1) + goto block_159; // branch always + + +block_216: + c->daddiu(t3, t2, -3); // daddiu t3, t2, -3 + c->ori(a0, a0, 64); // ori a0, a0, 64 + bc = c->sgpr64(t3) == 0; // beq t3, r0, L110 + c->daddiu(t2, t2, -2); // daddiu t2, t2, -2 + if (bc) {goto block_220;} // branch non-likely + + bc = c->sgpr64(t2) == 0; // beq t2, r0, L109 + c->lqc2(vf14, 384, v1); // lqc2 vf14, 384(v1) + if (bc) {goto block_219;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lqc2(vf14, 368, v1); // lqc2 vf14, 368(v1) + //beq r0, r0, L111 // beq r0, r0, L111 + c->lqc2(vf20, 2960, v1); // lqc2 vf20, 2960(v1) + goto block_221; // branch always + + +block_219: + //beq r0, r0, L111 // beq r0, r0, L111 + c->lqc2(vf20, 2976, v1); // lqc2 vf20, 2976(v1) + goto block_221; // branch always + + +block_220: + // nop // sll r0, r0, 0 + c->lqc2(vf14, 400, v1); // lqc2 vf14, 400(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf20, 2992, v1); // lqc2 vf20, 2992(v1) + +block_221: + c->lbu(t2, 4, t1); // lbu t2, 4(t1) + c->daddiu(t1, t1, 1); // daddiu t1, t1, 1 + c->vadd(DEST::xyz, vf4, vf23, vf15); // vadd.xyz vf4, vf23, vf15 + c->sll(t3, t2, 4); // sll t3, t2, 4 + //beq r0, r0, L114 // beq r0, r0, L114 + c->vsub(DEST::xyzw, vf1, vf25, vf23); // vsub.xyzw vf1, vf25, vf23 + goto block_225; // branch always + + +block_222: + // nop // sll r0, r0, 0 + c->addiu(t3, r0, -65); // addiu t3, r0, -65 + c->and_(a0, a0, t3); // and a0, a0, t3 + c->lqc2(vf14, 352, v1); // lqc2 vf14, 352(v1) + c->vadd(DEST::xyz, vf4, vf23, vf15); // vadd.xyz vf4, vf23, vf15 + c->sll(t3, t2, 4); // sll t3, t2, 4 + c->vsub(DEST::xyzw, vf1, vf25, vf23); // vsub.xyzw vf1, vf25, vf23 + c->daddiu(t4, t2, -10); // daddiu t4, t2, -10 + bc = c->sgpr64(t4) == 0; // beq t4, r0, L113 + c->daddiu(t2, t2, -13); // daddiu t2, t2, -13 + if (bc) {goto block_224;} // branch non-likely + + bc = c->sgpr64(t2) != 0; // bne t2, r0, L114 + // nop // sll r0, r0, 0 + if (bc) {goto block_225;} // branch non-likely + + +block_224: + c->daddiu(t0, t0, 16); // daddiu t0, t0, 16 + // nop // sll r0, r0, 0 + //beq r0, r0, L91 // beq r0, r0, L91 + c->lqc2(vf23, 1184, t0); // lqc2 vf23, 1184(t0) + goto block_159; // branch always + + +block_225: + c->addu(t2, t3, a3); // addu t2, t3, a3 + // nop // sll r0, r0, 0 + c->lqc2(vf5, -96, t2); // lqc2 vf5, -96(t2) + c->mov128_gpr_vf(t2, vf1); // qmfc2.i t2, vf1 + bc = ((s64)c->sgpr64(t2)) < 0; // bltz t2, L117 + c->vadd(DEST::xyz, vf6, vf5, vf16); // vadd.xyz vf6, vf5, vf16 + if (bc) {goto block_236;} // branch non-likely + + c->sra(t2, t2, 31); // sra t2, t2, 31 + c->vadd(DEST::xyz, vf7, vf5, vf17); // vadd.xyz vf7, vf5, vf17 + bc = ((s64)c->sgpr64(t2)) < 0; // bltz t2, L91 + c->vadd(DEST::xyz, vf8, vf5, vf18); // vadd.xyz vf8, vf5, vf18 + if (bc) {goto block_159;} // branch non-likely + + c->vadd(DEST::xyz, vf1, vf23, vf0); // vadd.xyz vf1, vf23, vf0 + // nop // sll r0, r0, 0 + c->vadd(DEST::xyz, vf2, vf23, vf13); // vadd.xyz vf2, vf23, vf13 + // nop // sll r0, r0, 0 + c->vadd(DEST::xyz, vf3, vf23, vf14); // vadd.xyz vf3, vf23, vf14 + c->sqc2(vf5, 736, v1); // sqc2 vf5, 736(v1) + c->vadd(DEST::xyz, vf4, vf23, vf15); // vadd.xyz vf4, vf23, vf15 + c->sqc2(vf6, 752, v1); // sqc2 vf6, 752(v1) + c->vmul(DEST::xyzw, vf19, vf5, vf13); // vmul.xyzw vf19, vf5, vf13 + c->sqc2(vf7, 768, v1); // sqc2 vf7, 768(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf8, 784, v1); // sqc2 vf8, 784(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf1, 608, v1); // sqc2 vf1, 608(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf2, 624, v1); // sqc2 vf2, 624(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf3, 640, v1); // sqc2 vf3, 640(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf4, 656, v1); // sqc2 vf4, 656(v1) + c->lqc2(vf1, 608, v1); // lqc2 vf1, 608(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf2, 624, v1); // lqc2 vf2, 624(v1) + c->vmula_bc(DEST::xyzw, BC::w, vf31, vf0); // vmulaw.xyzw acc, vf31, vf0 + c->lqc2(vf3, 640, v1); // lqc2 vf3, 640(v1) + c->vmadda_bc(DEST::xyzw, BC::x, vf28, vf1); // vmaddax.xyzw acc, vf28, vf1 + c->lqc2(vf4, 656, v1); // lqc2 vf4, 656(v1) + c->vmadda_bc(DEST::xyzw, BC::y, vf29, vf1); // vmadday.xyzw acc, vf29, vf1 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf1, vf30, vf1); // vmaddz.xyzw vf1, vf30, vf1 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf31, vf0); // vmulaw.xyzw acc, vf31, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf28, vf2); // vmaddax.xyzw acc, vf28, vf2 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf29, vf2); // vmadday.xyzw acc, vf29, vf2 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf2, vf30, vf2); // vmaddz.xyzw vf2, vf30, vf2 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf31, vf0); // vmulaw.xyzw acc, vf31, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf28, vf3); // vmaddax.xyzw acc, vf28, vf3 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf29, vf3); // vmadday.xyzw acc, vf29, vf3 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf3, vf30, vf3); // vmaddz.xyzw vf3, vf30, vf3 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf31, vf0); // vmulaw.xyzw acc, vf31, vf0 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::x, vf28, vf4); // vmaddax.xyzw acc, vf28, vf4 + // nop // sll r0, r0, 0 + c->vmadda_bc(DEST::xyzw, BC::y, vf29, vf4); // vmadday.xyzw acc, vf29, vf4 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::z, vf4, vf30, vf4); // vmaddz.xyzw vf4, vf30, vf4 + c->vdiv(vf25, BC::z, vf1, BC::w); // vdiv Q, vf25.z, vf1.w + c->lq(t2, 32, v1); // lq t2, 32(v1) + // nop // sll r0, r0, 0 + c->lq(t3, 48, v1); // lq t3, 48(v1) + // nop // sll r0, r0, 0 + c->sq(t2, 0, a1); // sq t2, 0(a1) + // nop // sll r0, r0, 0 + c->sq(t3, 16, a1); // sq t3, 16(a1) + c->lqc2(vf5, 736, v1); // lqc2 vf5, 736(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf6, 752, v1); // lqc2 vf6, 752(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf7, 768, v1); // lqc2 vf7, 768(v1) + // nop // sll r0, r0, 0 + c->vmulq(DEST::xyz, vf1, vf1); // vmulq.xyz vf1, vf1, Q + c->sqc2(vf20, 32, a1); // sqc2 vf20, 32(a1) + c->vmulq(DEST::xyz, vf5, vf5); // vmulq.xyz vf5, vf5, Q + // nop // sll r0, r0, 0 + // nop // vnop + // nop // sll r0, r0, 0 + // nop // vnop + // nop // sll r0, r0, 0 + c->vdiv(vf25, BC::z, vf2, BC::w); // vdiv Q, vf25.z, vf2.w + // nop // sll r0, r0, 0 + c->lqc2(vf8, 784, v1); // lqc2 vf8, 784(v1) + // nop // sll r0, r0, 0 + c->vadd(DEST::xyzw, vf1, vf1, vf27); // vadd.xyzw vf1, vf1, vf27 + // nop // sll r0, r0, 0 + c->lqc2(vf9, 672, v1); // lqc2 vf9, 672(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf10, 688, v1); // lqc2 vf10, 688(v1) + // nop // sll r0, r0, 0 + c->lqc2(vf11, 704, v1); // lqc2 vf11, 704(v1) + // nop // sll r0, r0, 0 + c->vftoi4_sat(DEST::xyzw, vf1, vf1); // vftoi4.xyzw vf1, vf1 + // nop // sll r0, r0, 0 + c->vmulq(DEST::xyz, vf2, vf2); // vmulq.xyz vf2, vf2, Q + // nop // sll r0, r0, 0 + c->vmulq(DEST::xyz, vf6, vf6); // vmulq.xyz vf6, vf6, Q + c->sqc2(vf5, 48, a1); // sqc2 vf5, 48(a1) + // nop // vnop + // nop // sll r0, r0, 0 + // nop // vnop + // nop // sll r0, r0, 0 + c->vdiv(vf25, BC::z, vf3, BC::w); // vdiv Q, vf25.z, vf3.w + c->sqc2(vf9, 64, a1); // sqc2 vf9, 64(a1) + c->lqc2(vf12, 720, v1); // lqc2 vf12, 720(v1) + c->sqc2(vf1, 80, a1); // sqc2 vf1, 80(a1) + c->vadd(DEST::xyzw, vf2, vf2, vf27); // vadd.xyzw vf2, vf2, vf27 + // 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->vftoi4_sat(DEST::xyzw, vf2, vf2); // vftoi4.xyzw vf2, vf2 + // nop // sll r0, r0, 0 + c->vmulq(DEST::xyz, vf3, vf3); // vmulq.xyz vf3, vf3, Q + // nop // sll r0, r0, 0 + c->vmulq(DEST::xyz, vf7, vf7); // vmulq.xyz vf7, vf7, Q + c->sqc2(vf6, 96, a1); // sqc2 vf6, 96(a1) + // nop // vnop + // nop // sll r0, r0, 0 + // nop // vnop + // nop // sll r0, r0, 0 + c->vdiv(vf25, BC::z, vf4, BC::w); // vdiv Q, vf25.z, vf4.w + c->sqc2(vf10, 112, a1); // sqc2 vf10, 112(a1) + // nop // sll r0, r0, 0 + c->sqc2(vf2, 128, a1); // sqc2 vf2, 128(a1) + c->vadd(DEST::xyzw, vf3, vf3, vf27); // vadd.xyzw vf3, vf3, vf27 + // 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->vftoi4_sat(DEST::xyzw, vf3, vf3); // vftoi4.xyzw vf3, vf3 + // nop // sll r0, r0, 0 + c->vmulq(DEST::xyz, vf4, vf4); // vmulq.xyz vf4, vf4, Q + // nop // sll r0, r0, 0 + c->vmulq(DEST::xyz, vf8, vf8); // vmulq.xyz vf8, vf8, Q + c->sqc2(vf7, 144, a1); // sqc2 vf7, 144(a1) + // nop // sll r0, r0, 0 + c->sqc2(vf11, 160, a1); // sqc2 vf11, 160(a1) + c->vadd(DEST::xyzw, vf4, vf4, vf27); // vadd.xyzw vf4, vf4, vf27 + c->sqc2(vf3, 176, a1); // sqc2 vf3, 176(a1) + c->andi(t2, a0, 2); // andi t2, a0, 2 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t2) == 0; // beq t2, r0, L115 + c->andi(t2, a0, 64); // andi t2, a0, 64 + if (bc) {goto block_230;} // branch non-likely + + bc = c->sgpr64(t2) != 0; // bne t2, r0, L115 + // nop // sll r0, r0, 0 + if (bc) {goto block_230;} // branch non-likely + + //beq r0, r0, L116 // beq r0, r0, L116 + c->vadd_bc(DEST::x, BC::w, vf23, vf23, vf19); // vaddw.x vf23, vf23, vf19 + goto block_231; // branch always + + +block_230: + // nop // sll r0, r0, 0 + c->vadd_bc(DEST::x, BC::w, vf23, vf23, vf14); // vaddw.x vf23, vf23, vf14 + +block_231: + c->vftoi4_sat(DEST::xyzw, vf4, vf4); // vftoi4.xyzw vf4, vf4 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->sqc2(vf8, 192, a1); // sqc2 vf8, 192(a1) + // nop // sll r0, r0, 0 + c->sqc2(vf12, 208, a1); // sqc2 vf12, 208(a1) + // nop // sll r0, r0, 0 + c->sqc2(vf4, 224, a1); // sqc2 vf4, 224(a1) + // nop // sll r0, r0, 0 + c->lw(t3, 80, a1); // lw t3, 80(a1) + // nop // sll r0, r0, 0 + c->lw(t2, 84, a1); // lw t2, 84(a1) + c->ori(t4, r0, 36864); // ori t4, r0, 36864 + c->dsubu(t3, t3, t4); // dsubu t3, t3, t4 + c->lw(t4, 224, a1); // lw t4, 224(a1) + c->ori(t5, r0, 36096); // ori t5, r0, 36096 + c->dsubu(t2, t2, t5); // dsubu t2, t2, t5 + c->lw(t5, 228, a1); // lw t5, 228(a1) + bc = ((s64)c->sgpr64(t3)) > 0; // bgtz t3, L91 + c->daddiu(t3, t4, -28672); // daddiu t3, t4, -28672 + if (bc) {goto block_159;} // branch non-likely + + bc = ((s64)c->sgpr64(t2)) > 0; // bgtz t2, L91 + c->daddiu(t2, t5, -29440); // daddiu t2, t5, -29440 + if (bc) {goto block_159;} // branch non-likely + + bc = ((s64)c->sgpr64(t3)) < 0; // bltz t3, L91 + // nop // sll r0, r0, 0 + if (bc) {goto block_159;} // branch non-likely + + bc = ((s64)c->sgpr64(t2)) < 0; // bltz t2, L91 + // nop // sll r0, r0, 0 + if (bc) {goto block_159;} // branch non-likely + + //beq r0, r0, L91 // beq r0, r0, L91 + c->daddiu(a1, a1, 240); // daddiu a1, a1, 240 + goto block_159; // branch always + + +block_236: + c->lw(v1, 3020, v1); // lw v1, 3020(v1) + c->sw(a1, 4, v1); // sw a1, 4(v1) + c->lqc2(vf24, 12, a2); // lqc2 vf24, 12(a2) + c->vsub(DEST::xyzw, vf23, vf23, vf24); // vsub.xyzw vf23, vf23, vf24 + c->mov128_gpr_vf(v0, vf23); // qmfc2.i v0, vf23 + //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.font_work = intern_from_c(-1, 0, "*font-work*").c(); + cache.font12_table = intern_from_c(-1, 0, "*font12-table*").c(); + cache.font24_table = intern_from_c(-1, 0, "*font24-table*").c(); + cache.math_camera = intern_from_c(-1, 0, "*math-camera*").c(); + cache.video_params = intern_from_c(-1, 0, "*video-params*").c(); + gLinkedFunctionTable.reg("draw-string-asm", execute, 512); +} + +} // namespace draw_string_asm +} // namespace Mips2C +// add draw_string_asm::link to the link callback table for the object file. +// FWD DEC: + +//--------------------------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 get_string_length { +struct Cache { + void* font_work; // *font-work* + void* font12_table; // *font12-table* + void* font24_table; // *font24-table* + void* video_params; // *video-params* +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + // u32 call_addr = 0; + c->lqc2(vf23, 12, a1); // lqc2 vf23, 12(a1) + c->lqc2(vf24, 12, a1); // lqc2 vf24, 12(a1) + c->lw(v1, 64, a1); // lw v1, 64(a1) + c->load_symbol2(a2, cache.font_work); // lw a2, *font-work*(s7) + c->mov64(a2, a2); // or a2, a2, r0 + c->sw(a0, 3024, a2); // sw a0, 3024(a2) + c->sw(v1, 3028, a2); // sw v1, 3028(a2) + c->vmove(DEST::xyzw, vf1, vf0); // vmove.xyzw vf1, vf0 + // nop // sll r0, r0, 0 + c->andi(a3, v1, 32); // andi a3, v1, 32 + // nop // sll r0, r0, 0 + bc = c->sgpr64(a3) != 0; // bne a3, r0, L4 + c->load_symbol2(a3, cache.font12_table); // lw a3, *font12-table*(s7) + if (bc) {goto block_2;} // branch non-likely + + c->mov64(a3, a3); // or a3, a3, r0 + // nop // sll r0, r0, 0 + c->lqc2(vf13, 208, a2); // lqc2 vf13, 208(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 224, a2); // lqc2 vf14, 224(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 352, a2); // sqc2 vf14, 352(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 368, a2); // sqc2 vf14, 368(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 384, a2); // sqc2 vf14, 384(a2) + //beq r0, r0, L5 // beq r0, r0, L5 + c->sqc2(vf14, 400, a2); // sqc2 vf14, 400(a2) + goto block_3; // branch always + + +block_2: + // nop // sll r0, r0, 0 + c->load_symbol2(a3, cache.font24_table); // lw a3, *font24-table*(s7) + c->mov64(a3, a3); // or a3, a3, r0 + // nop // sll r0, r0, 0 + c->lqc2(vf13, 256, a2); // lqc2 vf13, 256(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 272, a2); // lqc2 vf14, 272(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 352, a2); // sqc2 vf14, 352(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 288, a2); // lqc2 vf14, 288(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 368, a2); // sqc2 vf14, 368(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 304, a2); // lqc2 vf14, 304(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 384, a2); // sqc2 vf14, 384(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 320, a2); // lqc2 vf14, 320(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 400, a2); // sqc2 vf14, 400(a2) + +block_3: + c->lbu(t0, 4, a0); // lbu t0, 4(a0) + c->daddiu(a0, a0, 1); // daddiu a0, a0, 1 + bc = c->sgpr64(t0) == 0; // beq t0, r0, L22 + c->daddiu(t1, t0, -3); // daddiu t1, t0, -3 + if (bc) {goto block_60;} // branch non-likely + + bc = ((s64)c->sgpr64(t1)) <= 0; // blez t1, L15 + c->daddiu(t1, t0, -126); // daddiu t1, t0, -126 + if (bc) {goto block_48;} // branch non-likely + + bc = c->sgpr64(t1) != 0; // bne t1, r0, L18 + // nop // sll r0, r0, 0 + if (bc) {goto block_53;} // branch non-likely + + c->lbu(t0, 4, a0); // lbu t0, 4(a0) + c->daddiu(a0, a0, 1); // daddiu a0, a0, 1 + c->addiu(t1, r0, 0); // addiu t1, r0, 0 + c->addiu(t2, r0, 0); // addiu t2, r0, 0 + bc = c->sgpr64(t0) == 0; // beq t0, r0, L22 + c->daddiu(t3, t0, -43); // daddiu t3, t0, -43 + if (bc) {goto block_60;} // branch non-likely + + c->movz(t1, t0, t3); // movz t1, t0, t3 + c->daddiu(t3, t0, -45); // daddiu t3, t0, -45 + c->movz(t1, t0, t3); // movz t1, t0, t3 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t1) != 0; // bne t1, r0, L6 + c->daddiu(t3, t0, -121); // daddiu t3, t0, -121 + if (bc) {goto block_15;} // branch non-likely + + bc = c->sgpr64(t3) == 0; // beq t3, r0, L13 + c->daddiu(t2, t0, -89); // daddiu t2, t0, -89 + if (bc) {goto block_46;} // branch non-likely + + bc = c->sgpr64(t2) == 0; // beq t2, r0, L13 + c->daddiu(t2, t0, -122); // daddiu t2, t0, -122 + if (bc) {goto block_46;} // branch non-likely + + bc = c->sgpr64(t2) == 0; // beq t2, r0, L14 + c->daddiu(t2, t0, -90); // daddiu t2, t0, -90 + if (bc) {goto block_47;} // branch non-likely + + bc = c->sgpr64(t2) == 0; // beq t2, r0, L14 + c->daddiu(t2, t0, -48); // daddiu t2, t0, -48 + if (bc) {goto block_47;} // branch non-likely + + bc = ((s64)c->sgpr64(t2)) < 0; // bltz t2, L18 + c->daddiu(t2, t0, -57); // daddiu t2, t0, -57 + if (bc) {goto block_53;} // branch non-likely + + bc = ((s64)c->sgpr64(t2)) > 0; // bgtz t2, L18 + c->daddiu(t2, t0, -126); // daddiu t2, t0, -126 + if (bc) {goto block_53;} // branch non-likely + + bc = c->sgpr64(t2) == 0; // beq t2, r0, L18 + c->daddiu(t2, t0, -48); // daddiu t2, t0, -48 + if (bc) {goto block_53;} // branch non-likely + + +block_15: + c->lbu(t0, 4, a0); // lbu t0, 4(a0) + c->daddiu(a0, a0, 1); // daddiu a0, a0, 1 + bc = c->sgpr64(t0) == 0; // beq t0, r0, L22 + c->daddiu(t3, t0, -110); // daddiu t3, t0, -110 + if (bc) {goto block_60;} // branch non-likely + + bc = c->sgpr64(t3) == 0; // beq t3, r0, L7 + c->daddiu(t3, t0, -78); // daddiu t3, t0, -78 + if (bc) {goto block_36;} // branch non-likely + + bc = c->sgpr64(t3) == 0; // beq t3, r0, L7 + c->daddiu(t3, t0, -108); // daddiu t3, t0, -108 + if (bc) {goto block_36;} // branch non-likely + + bc = c->sgpr64(t3) == 0; // beq t3, r0, L5 + c->daddiu(t3, t0, -76); // daddiu t3, t0, -76 + if (bc) {goto block_3;} // branch non-likely + + bc = c->sgpr64(t3) == 0; // beq t3, r0, L5 + c->daddiu(t3, t0, -119); // daddiu t3, t0, -119 + if (bc) {goto block_3;} // branch non-likely + + bc = c->sgpr64(t3) == 0; // beq t3, r0, L5 + c->daddiu(t3, t0, -87); // daddiu t3, t0, -87 + if (bc) {goto block_3;} // branch non-likely + + bc = c->sgpr64(t3) == 0; // beq t3, r0, L5 + c->daddiu(t3, t0, -107); // daddiu t3, t0, -107 + if (bc) {goto block_3;} // branch non-likely + + bc = c->sgpr64(t3) == 0; // beq t3, r0, L9 + c->daddiu(t3, t0, -75); // daddiu t3, t0, -75 + if (bc) {goto block_39;} // branch non-likely + + bc = c->sgpr64(t3) == 0; // beq t3, r0, L9 + c->daddiu(t3, t0, -106); // daddiu t3, t0, -106 + if (bc) {goto block_39;} // branch non-likely + + bc = c->sgpr64(t3) == 0; // beq t3, r0, L5 + c->daddiu(t3, t0, -74); // daddiu t3, t0, -74 + if (bc) {goto block_3;} // branch non-likely + + bc = c->sgpr64(t3) == 0; // beq t3, r0, L5 + c->daddiu(t3, t0, -104); // daddiu t3, t0, -104 + if (bc) {goto block_3;} // branch non-likely + + bc = c->sgpr64(t3) == 0; // beq t3, r0, L10 + c->daddiu(t3, t0, -72); // daddiu t3, t0, -72 + if (bc) {goto block_41;} // branch non-likely + + bc = c->sgpr64(t3) == 0; // beq t3, r0, L10 + c->daddiu(t3, t0, -118); // daddiu t3, t0, -118 + if (bc) {goto block_41;} // branch non-likely + + bc = c->sgpr64(t3) == 0; // beq t3, r0, L5 + c->daddiu(t3, t0, -86); // daddiu t3, t0, -86 + if (bc) {goto block_3;} // branch non-likely + + bc = c->sgpr64(t3) == 0; // beq t3, r0, L5 + c->daddiu(t3, t0, -117); // daddiu t3, t0, -117 + if (bc) {goto block_3;} // branch non-likely + + bc = c->sgpr64(t3) == 0; // beq t3, r0, L5 + c->daddiu(t3, t0, -85); // daddiu t3, t0, -85 + if (bc) {goto block_3;} // branch non-likely + + bc = c->sgpr64(t3) == 0; // beq t3, r0, L5 + c->daddiu(t3, t0, -48); // daddiu t3, t0, -48 + if (bc) {goto block_3;} // branch non-likely + + bc = c->sgpr64(t3) == 0; // beq t3, r0, L5 + c->daddiu(t3, t0, -48); // daddiu t3, t0, -48 + if (bc) {goto block_3;} // branch non-likely + + bc = ((s64)c->sgpr64(t3)) < 0; // bltz t3, L18 + c->daddiu(t4, t0, -57); // daddiu t4, t0, -57 + if (bc) {goto block_53;} // branch non-likely + + bc = ((s64)c->sgpr64(t4)) > 0; // bgtz t4, L18 + c->sll(t4, t2, 2); // sll t4, t2, 2 + if (bc) {goto block_53;} // branch non-likely + + c->daddu(t0, t2, t4); // daddu t0, t2, t4 + // nop // sll r0, r0, 0 + c->sll(t0, t0, 1); // sll t0, t0, 1 + // nop // sll r0, r0, 0 + //beq r0, r0, L6 // beq r0, r0, L6 + c->daddu(t2, t0, t3); // daddu t2, t0, t3 + goto block_15; // branch always + + +block_36: + bc = c->sgpr64(t2) != 0; // bne t2, r0, L8 + c->load_symbol2(a3, cache.font12_table); // lw a3, *font12-table*(s7) + if (bc) {goto block_38;} // branch non-likely + + c->mov64(a3, a3); // or a3, a3, r0 + c->addiu(t0, r0, -33); // addiu t0, r0, -33 + c->lqc2(vf13, 208, a2); // lqc2 vf13, 208(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 224, a2); // lqc2 vf14, 224(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 352, a2); // sqc2 vf14, 352(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 368, a2); // sqc2 vf14, 368(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 384, a2); // sqc2 vf14, 384(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 400, a2); // sqc2 vf14, 400(a2) + //beq r0, r0, L5 // beq r0, r0, L5 + c->and_(v1, v1, t0); // and v1, v1, t0 + goto block_3; // branch always + + +block_38: + // nop // sll r0, r0, 0 + c->load_symbol2(a3, cache.font24_table); // lw a3, *font24-table*(s7) + c->mov64(a3, a3); // or a3, a3, r0 + // nop // sll r0, r0, 0 + c->lqc2(vf13, 256, a2); // lqc2 vf13, 256(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 272, a2); // lqc2 vf14, 272(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 352, a2); // sqc2 vf14, 352(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 288, a2); // lqc2 vf14, 288(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 368, a2); // sqc2 vf14, 368(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 304, a2); // lqc2 vf14, 304(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 384, a2); // sqc2 vf14, 384(a2) + // nop // sll r0, r0, 0 + c->lqc2(vf14, 320, a2); // lqc2 vf14, 320(a2) + // nop // sll r0, r0, 0 + c->sqc2(vf14, 400, a2); // sqc2 vf14, 400(a2) + //beq r0, r0, L5 // beq r0, r0, L5 + c->ori(v1, v1, 32); // ori v1, v1, 32 + goto block_3; // branch always + + +block_39: + c->addiu(t0, r0, -3); // addiu t0, r0, -3 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t2) == 0; // beq t2, r0, L5 + c->and_(v1, v1, t0); // and v1, v1, t0 + if (bc) {goto block_3;} // branch non-likely + + //beq r0, r0, L5 // beq r0, r0, L5 + c->ori(v1, v1, 2); // ori v1, v1, 2 + goto block_3; // branch always + + +block_41: + c->mov128_vf_gpr(vf1, t2); // qmtc2.i vf1, t2 + c->daddiu(t0, t1, -45); // daddiu t0, t1, -45 + bc = c->sgpr64(t1) == 0; // beq t1, r0, L12 + c->vitof0(DEST::xyzw, vf1, vf1); // vitof0.xyzw vf1, vf1 + if (bc) {goto block_45;} // branch non-likely + + bc = c->sgpr64(t0) == 0; // beq t0, r0, L11 + // nop // sll r0, r0, 0 + if (bc) {goto block_44;} // branch non-likely + + //beq r0, r0, L5 // beq r0, r0, L5 + c->vadd_bc(DEST::x, BC::x, vf23, vf23, vf1); // vaddx.x vf23, vf23, vf1 + goto block_3; // branch always + + +block_44: + //beq r0, r0, L5 // beq r0, r0, L5 + c->vsub_bc(DEST::x, BC::x, vf23, vf23, vf1); // vsubx.x vf23, vf23, vf1 + goto block_3; // branch always + + +block_45: + //beq r0, r0, L5 // beq r0, r0, L5 + c->vadd_bc(DEST::x, BC::x, vf23, vf0, vf1); // vaddx.x vf23, vf0, vf1 + goto block_3; // branch always + + +block_46: + //beq r0, r0, L5 // beq r0, r0, L5 + c->sqc2(vf23, 464, a2); // sqc2 vf23, 464(a2) + goto block_3; // branch always + + +block_47: + //beq r0, r0, L5 // beq r0, r0, L5 + c->lqc2(vf23, 464, a2); // lqc2 vf23, 464(a2) + goto block_3; // branch always + + +block_48: + c->daddiu(t1, t0, -3); // daddiu t1, t0, -3 + c->ori(v1, v1, 64); // ori v1, v1, 64 + bc = c->sgpr64(t1) == 0; // beq t1, r0, L16 + c->daddiu(t0, t0, -2); // daddiu t0, t0, -2 + if (bc) {goto block_51;} // branch non-likely + + bc = c->sgpr64(t0) == 0; // beq t0, r0, L17 + c->lqc2(vf14, 384, a2); // lqc2 vf14, 384(a2) + if (bc) {goto block_52;} // branch non-likely + + //beq r0, r0, L17 // beq r0, r0, L17 + c->lqc2(vf14, 368, a2); // lqc2 vf14, 368(a2) + goto block_52; // branch always + + +block_51: + // nop // sll r0, r0, 0 + c->lqc2(vf14, 400, a2); // lqc2 vf14, 400(a2) + +block_52: + c->lbu(t0, 4, a0); // lbu t0, 4(a0) + c->daddiu(a0, a0, 1); // daddiu a0, a0, 1 + //beq r0, r0, L20 // beq r0, r0, L20 + c->sll(t1, t0, 4); // sll t1, t0, 4 + goto block_56; // branch always + + +block_53: + // nop // sll r0, r0, 0 + c->addiu(t1, r0, -65); // addiu t1, r0, -65 + c->and_(v1, v1, t1); // and v1, v1, t1 + c->lqc2(vf14, 352, a2); // lqc2 vf14, 352(a2) + // nop // sll r0, r0, 0 + c->sll(t1, t0, 4); // sll t1, t0, 4 + // nop // sll r0, r0, 0 + c->daddiu(t2, t0, -10); // daddiu t2, t0, -10 + bc = c->sgpr64(t2) == 0; // beq t2, r0, L19 + c->daddiu(t0, t0, -13); // daddiu t0, t0, -13 + if (bc) {goto block_55;} // branch non-likely + + bc = c->sgpr64(t0) != 0; // bne t0, r0, L20 + // nop // sll r0, r0, 0 + if (bc) {goto block_56;} // branch non-likely + + +block_55: + //beq r0, r0, L5 // beq r0, r0, L5 + c->vadd_bc(DEST::x, BC::x, vf23, vf0, vf24); // vaddx.x vf23, vf0, vf24 + goto block_3; // branch always + + +block_56: + c->addu(t0, t1, a3); // addu t0, t1, a3 + // nop // sll r0, r0, 0 + c->lqc2(vf5, -96, t0); // lqc2 vf5, -96(t0) + // nop // sll r0, r0, 0 + c->vmul(DEST::xyzw, vf19, vf5, vf13); // vmul.xyzw vf19, vf5, vf13 + c->andi(t0, v1, 2); // andi t0, v1, 2 + bc = c->sgpr64(t0) == 0; // beq t0, r0, L21 + c->andi(t0, v1, 64); // andi t0, v1, 64 + if (bc) {goto block_59;} // branch non-likely + + bc = c->sgpr64(t0) != 0; // bne t0, r0, L21 + // nop // sll r0, r0, 0 + if (bc) {goto block_59;} // branch non-likely + + //beq r0, r0, L5 // beq r0, r0, L5 + c->vadd_bc(DEST::x, BC::w, vf23, vf23, vf19); // vaddw.x vf23, vf23, vf19 + goto block_3; // branch always + + +block_59: + //beq r0, r0, L5 // beq r0, r0, L5 + c->vadd_bc(DEST::x, BC::w, vf23, vf23, vf14); // vaddw.x vf23, vf23, vf14 + goto block_3; // branch always + + +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 + 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 + //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.font_work = intern_from_c(-1, 0, "*font-work*").c(); + 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); +} + +} // namespace get_string_length +} // namespace Mips2C +// add get_string_length::link to the link callback table for the object file. +// FWD DEC: diff --git a/game/mips2c/jak3_functions/foreground.cpp b/game/mips2c/jak3_functions/foreground.cpp new file mode 100644 index 0000000000..8053ef7679 --- /dev/null +++ b/game/mips2c/jak3_functions/foreground.cpp @@ -0,0 +1,1664 @@ +//--------------------------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 foreground_check_longest_edge_asm { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* + void* math_camera; // *math-camera* +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + bool cop1_bc = false; + float acc; + get_fake_spad_addr2(at, cache.fake_scratchpad_data, 0, c);// lui at, 28672 + c->mov64(v0, s7); // or v0, s7, r0 + c->load_symbol2(v1, cache.math_camera); // lw v1, *math-camera*(s7) + c->lwc1(f0, 84, a0); // lwc1 f0, 84(a0) + c->lwc1(f7, 3936, at); // lwc1 f7, 3936(at) + c->lwc1(f3, 3940, at); // lwc1 f3, 3940(at) + c->lwc1(f6, 3944, at); // lwc1 f6, 3944(at) + c->lwc1(f4, 152, a0); // lwc1 f4, 152(a0) + c->lwc1(f12, 0, v1); // lwc1 f12, 0(v1) + c->lwc1(f11, 64, v1); // lwc1 f11, 64(v1) + c->mtc1(f1, a1); // mtc1 f1, a1 + c->mtc1(f9, r0); // mtc1 f9, r0 + c->mtc1(f10, r0); // mtc1 f10, r0 + c->mtc1(f2, r0); // mtc1 f2, r0 + c->mtc1(f2, r0); // mtc1 f2, r0 + c->mtc1(f5, r0); // mtc1 f5, r0 + c->mtc1(f8, r0); // mtc1 f8, r0 + c->lui(a0, 16256); // lui a0, 16256 + c->mtc1(f5, a0); // mtc1 f5, a0 + cop1_bc = c->fprs[f1] < c->fprs[f11]; // c.lt.s f1, f11 + bc = cop1_bc; // bc1t L101 + // nop // sll r0, r0, 0 + if (bc) {goto block_37;} // branch non-likely + + c->lwc1(f11, 12, v1); // lwc1 f11, 12(v1) + c->lwc1(f13, 16, v1); // lwc1 f13, 16(v1) + c->muls(f11, f11, f12); // mul.s f11, f11, f12 + c->muls(f13, f13, f12); // mul.s f13, f13, f12 + c->subs(f14, f6, f4); // sub.s f14, f6, f4 + cop1_bc = c->fprs[f12] < c->fprs[f14]; // c.lt.s f12, f14 + bc = !cop1_bc; // bc1f L85 + c->lwc1(f12, 60, v1); // lwc1 f12, 60(v1) + if (bc) {goto block_3;} // branch non-likely + + c->muls(f12, f14, f12); // mul.s f12, f14, f12 + cop1_bc = c->fprs[f0] < c->fprs[f12]; // c.lt.s f0, f12 + bc = cop1_bc; // bc1t L100 + // nop // sll r0, r0, 0 + if (bc) {goto block_36;} // branch non-likely + + +block_3: + c->subs(f14, f3, f4); // sub.s f14, f3, f4 + cop1_bc = c->fprs[f13] < c->fprs[f14]; // c.lt.s f13, f14 + bc = !cop1_bc; // bc1f L86 + c->lwc1(f12, 56, v1); // lwc1 f12, 56(v1) + if (bc) {goto block_5;} // branch non-likely + + //beq r0, r0, L87 // beq r0, r0, L87 + c->muls(f10, f14, f12); // mul.s f10, f14, f12 + goto block_7; // branch always + + +block_5: + c->adds(f14, f3, f4); // add.s f14, f3, f4 + c->negs(f13, f13); // neg.s f13, f13 + cop1_bc = c->fprs[f14] < c->fprs[f13]; // c.lt.s f14, f13 + bc = !cop1_bc; // bc1f L87 + c->negs(f13, f14); // neg.s f13, f14 + if (bc) {goto block_7;} // branch non-likely + + c->muls(f10, f13, f12); // mul.s f10, f13, f12 + +block_7: + cop1_bc = c->fprs[f0] < c->fprs[f10]; // c.lt.s f0, f10 + bc = cop1_bc; // bc1t L100 + // nop // sll r0, r0, 0 + if (bc) {goto block_36;} // branch non-likely + + c->subs(f12, f7, f4); // sub.s f12, f7, f4 + cop1_bc = c->fprs[f11] < c->fprs[f12]; // c.lt.s f11, f12 + bc = !cop1_bc; // bc1f L88 + c->lwc1(f10, 52, v1); // lwc1 f10, 52(v1) + if (bc) {goto block_10;} // branch non-likely + + //beq r0, r0, L89 // beq r0, r0, L89 + c->muls(f9, f12, f10); // mul.s f9, f12, f10 + goto block_12; // branch always + + +block_10: + c->adds(f12, f7, f4); // add.s f12, f7, f4 + c->negs(f11, f11); // neg.s f11, f11 + cop1_bc = c->fprs[f12] < c->fprs[f11]; // c.lt.s f12, f11 + bc = !cop1_bc; // bc1f L89 + c->negs(f11, f12); // neg.s f11, f12 + if (bc) {goto block_12;} // branch non-likely + + c->muls(f9, f11, f10); // mul.s f9, f11, f10 + +block_12: + cop1_bc = c->fprs[f0] < c->fprs[f9]; // c.lt.s f0, f9 + bc = cop1_bc; // bc1t L100 + // nop // sll r0, r0, 0 + if (bc) {goto block_36;} // branch non-likely + + c->abss(f14, f7); // abs.s f14, f7 + c->movs(f12, f6); // mov.s f12, f6 + acc = c->fprs[f14] * c->fprs[f14]; // Unknown instr: mula.s f14, f14 + c->fprs[f15] = acc + c->fprs[f12] * c->fprs[f12]; // Unknown instr: madd.s f15, f12, f12 + c->lwc1(f9, 76, v1); // lwc1 f9, 76(v1) + c->lwc1(f13, 80, v1); // lwc1 f13, 80(v1) + c->lwc1(f10, 84, v1); // lwc1 f10, 84(v1) + c->lwc1(f11, 88, v1); // lwc1 f11, 88(v1) + c->fprs[f16] = c->fprs[f5] / (std::sqrt(std::abs(c->fprs[f15]))); // Unknown instr: rsqrt.s f16, f5, f15 + c->muls(f15, f14, f16); // mul.s f15, f14, f16 + c->muls(f16, f12, f16); // mul.s f16, f12, f16 + acc = c->fprs[f9] * c->fprs[f16]; // Unknown instr: mula.s f9, f16 + c->fprs[f12] = acc - c->fprs[f13] * c->fprs[f15]; // Unknown instr: msub.s f12, f13, f15 + acc = c->fprs[f10] * c->fprs[f16]; // Unknown instr: mula.s f10, f16 + c->fprs[f14] = acc - c->fprs[f11] * c->fprs[f15];// Unknown instr: msub.s f14, f11, f15 + acc = c->fprs[f9] * c->fprs[f15];// Unknown instr: mula.s f9, f15 + c->fprs[f9] = acc + c->fprs[f13] * c->fprs[f16];// Unknown instr: madd.s f9, f13, f16 + acc = c->fprs[f10] * c->fprs[f15];// Unknown instr: mula.s f10, f15 + c->fprs[f10] = acc + c->fprs[f11] * c->fprs[f16];// Unknown instr: madd.s f10, f11, f16 + cop1_bc = c->fprs[f8] < c->fprs[f12]; // c.lt.s f8, f12 + bc = cop1_bc; // bc1t L90 + // nop // sll r0, r0, 0 + if (bc) {goto block_17;} // branch non-likely + + cop1_bc = c->fprs[f8] < c->fprs[f14]; // c.lt.s f8, f14 + bc = cop1_bc; // bc1t L91 + // nop // sll r0, r0, 0 + if (bc) {goto block_18;} // branch non-likely + + cop1_bc = c->fprs[f8] < c->fprs[f9]; // c.lt.s f8, f9 + bc = cop1_bc; // bc1t L92 + // nop // sll r0, r0, 0 + if (bc) {goto block_19;} // branch non-likely + + //beq r0, r0, L94 // beq r0, r0, L94 + // nop // sll r0, r0, 0 + goto block_23; // branch always + + +block_17: + //beq r0, r0, L94 // beq r0, r0, L94 + c->divs(f2, f1, f10); // div.s f2, f1, f10 + goto block_23; // branch always + + +block_18: + c->negs(f2, f12); // neg.s f2, f12 + c->divs(f2, f2, f9); // div.s f2, f2, f9 + c->divs(f7, f14, f10); // div.s f7, f14, f10 + c->adds(f2, f7, f2); // add.s f2, f7, f2 + //beq r0, r0, L94 // beq r0, r0, L94 + c->muls(f2, f2, f1); // mul.s f2, f2, f1 + goto block_23; // branch always + + +block_19: + c->subs(f8, f7, f4); // sub.s f8, f7, f4 + c->adds(f10, f7, f4); // add.s f10, f7, f4 + c->negs(f11, f7); // neg.s f11, f7 + cop1_bc = c->fprs[f7] < c->fprs[f8]; // c.lt.s f7, f8 + bc = cop1_bc; // bc1t L93 + // nop // sll r0, r0, 0 + if (bc) {goto block_22;} // branch non-likely + + cop1_bc = c->fprs[f10] < c->fprs[f11]; // c.lt.s f10, f11 + bc = cop1_bc; // bc1t L93 + // nop // sll r0, r0, 0 + if (bc) {goto block_22;} // branch non-likely + + //beq r0, r0, L94 // beq r0, r0, L94 + // nop // sll r0, r0, 0 + goto block_23; // branch always + + +block_22: + c->negs(f2, f12); // neg.s f2, f12 + c->muls(f2, f1, f2); // mul.s f2, f1, f2 + c->divs(f2, f2, f9); // div.s f2, f2, f9 + +block_23: + cop1_bc = c->fprs[f0] < c->fprs[f2]; // c.lt.s f0, f2 + bc = cop1_bc; // bc1t L100 + // nop // sll r0, r0, 0 + if (bc) {goto block_36;} // branch non-likely + + c->abss(f10, f3); // abs.s f10, f3 + c->movs(f12, f6); // mov.s f12, f6 + acc = c->fprs[10] * c->fprs[10]; // Unknown instr: mula.s f10, f10 + c->fprs[9] = acc + c->fprs[12] * c->fprs[12]; // Unknown instr: madd.s f9, f12, f12 + c->lwc1(f7, 96, v1); // lwc1 f7, 96(v1) + c->lwc1(f8, 100, v1); // lwc1 f8, 100(v1) + c->lwc1(f6, 104, v1); // lwc1 f6, 104(v1) + c->fprs[f5] = c->fprs[f5] / (std::sqrt(std::abs(c->fprs[f9]))); // Unknown instr: rsqrt.s f5, f5, f9 + c->lwc1(f11, 108, v1); // lwc1 f11, 108(v1) + c->mtc1(f9, r0); // mtc1 f9, r0 + c->muls(f13, f10, f5); // mul.s f13, f10, f5 + c->muls(f14, f12, f5); // mul.s f14, f12, f5 + acc = c->fprs[f7] * c->fprs[f14];// Unknown instr: mula.s f7, f14 + c->fprs[f10] = acc - c->fprs[f8] * c->fprs[f13];// Unknown instr: msub.s f10, f8, f13 + acc = c->fprs[f6] * c->fprs[f14];// Unknown instr: mula.s f6, f14 + c->fprs[f12] = acc - c->fprs[f11] * c->fprs[f13];// Unknown instr: msub.s f12, f11, f13 + acc = c->fprs[f7] * c->fprs[f13];// Unknown instr: mula.s f7, f13 + c->fprs[f5] = acc + c->fprs[f8] * c->fprs[f14];// Unknown instr: madd.s f5, f8, f14 + acc = c->fprs[f6] * c->fprs[f13];// Unknown instr: mula.s f6, f13 + c->fprs[f6] = acc + c->fprs[f11] * c->fprs[f14];// Unknown instr: madd.s f6, f11, f14 + cop1_bc = c->fprs[f9] < c->fprs[f10]; // c.lt.s f9, f10 + bc = cop1_bc; // bc1t L95 + // nop // sll r0, r0, 0 + if (bc) {goto block_28;} // branch non-likely + + cop1_bc = c->fprs[f9] < c->fprs[f12]; // c.lt.s f9, f12 + bc = cop1_bc; // bc1t L96 + // nop // sll r0, r0, 0 + if (bc) {goto block_29;} // branch non-likely + + cop1_bc = c->fprs[f9] < c->fprs[f5]; // c.lt.s f9, f5 + bc = cop1_bc; // bc1t L97 + // nop // sll r0, r0, 0 + if (bc) {goto block_30;} // branch non-likely + + //beq r0, r0, L99 // beq r0, r0, L99 + // nop // sll r0, r0, 0 + goto block_34; // branch always + + +block_28: + //beq r0, r0, L99 // beq r0, r0, L99 + c->divs(f1, f1, f6); // div.s f1, f1, f6 + goto block_34; // branch always + + +block_29: + c->negs(f3, f10); // neg.s f3, f10 + c->divs(f3, f3, f5); // div.s f3, f3, f5 + c->divs(f4, f12, f6); // div.s f4, f12, f6 + c->adds(f3, f4, f3); // add.s f3, f4, f3 + //beq r0, r0, L99 // beq r0, r0, L99 + c->muls(f1, f3, f1); // mul.s f1, f3, f1 + goto block_34; // branch always + + +block_30: + c->subs(f6, f3, f4); // sub.s f6, f3, f4 + c->adds(f4, f3, f4); // add.s f4, f3, f4 + c->negs(f7, f3); // neg.s f7, f3 + cop1_bc = c->fprs[f3] < c->fprs[f6]; // c.lt.s f3, f6 + bc = cop1_bc; // bc1t L98 + // nop // sll r0, r0, 0 + if (bc) {goto block_33;} // branch non-likely + + cop1_bc = c->fprs[f4] < c->fprs[f7]; // c.lt.s f4, f7 + bc = cop1_bc; // bc1t L98 + // nop // sll r0, r0, 0 + if (bc) {goto block_33;} // branch non-likely + + //beq r0, r0, L99 // beq r0, r0, L99 + // nop // sll r0, r0, 0 + goto block_34; // branch always + + +block_33: + c->negs(f3, f10); // neg.s f3, f10 + c->muls(f1, f1, f3); // mul.s f1, f1, f3 + c->divs(f1, f1, f5); // div.s f1, f1, f5 + +block_34: + cop1_bc = c->fprs[f0] < c->fprs[f2]; // c.lt.s f0, f2 + bc = cop1_bc; // bc1t L100 + // nop // sll r0, r0, 0 + if (bc) {goto block_36;} // branch non-likely + + //beq r0, r0, L101 // beq r0, r0, L101 + // nop // sll r0, r0, 0 + goto block_37; // branch always + + +block_36: + c->daddiu(v0, s7, 4); // daddiu v0, s7, #t + +block_37: + //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(); + cache.math_camera = intern_from_c(-1, 0, "*math-camera*").c(); + gLinkedFunctionTable.reg("foreground-check-longest-edge-asm", execute, 128); +} + +} // namespace foreground_check_longest_edge_asm +} // namespace Mips2C +// add foreground_check_longest_edge_asm::link to the link callback table for the object file. +// FWD DEC: + +//--------------------------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 foreground_merc { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* + void* foreground; // *foreground* + void* merc_global_stats; // *merc-global-stats* +} cache; + +struct MercEffectBucketInfo { + u8 color_fade[4]; + u8 merc_path; + u8 ignore_alpha; + u8 disable_draw; + u8 disable_envmap; +}; + +struct MercBucketInfo { + u8 lights[0x70]; + u32 needs_clip; + u32 mercprime; + u32 mercneric; + MercEffectBucketInfo effects[64]; +}; +static_assert(sizeof(MercBucketInfo) == 0x27c); + +// TODO: hack this up for pc merc rendering. +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->daddiu(sp, sp, -128); // daddiu sp, sp, -128 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s0, 16, sp); // sq s0, 16(sp) + c->sq(s1, 32, sp); // sq s1, 32(sp) + c->sq(s2, 48, sp); // sq s2, 48(sp) + c->sq(s3, 64, sp); // sq s3, 64(sp) + c->sq(s4, 80, sp); // sq s4, 80(sp) + c->sq(s5, 96, sp); // sq s5, 96(sp) + c->sq(gp, 112, sp); // sq gp, 112(sp) + const MercBucketInfo* mbi = (const MercBucketInfo*)(g_ee_main_mem + c->sgpr64(t1)); + c->mov64(t7, a3); // or t7, a3, r0 + c->mov64(v1, t0); // or v1, t0, r0 + c->lui(t0, 4096); // lui t0, 4096 + c->lui(t1, 18304); // lui t1, 18304 + c->daddiu(t0, t0, 1); // daddiu t0, t0, 1 + c->dsll32(t1, t1, 0); // dsll32 t1, t1, 0 + c->lui(a3, 12288); // lui a3, 12288 + c->lui(t8, 19201); // lui t8, 19201 + c->pcpyld(t0, a3, t0); // pcpyld t0, a3, t0 + c->lbu(a3, 78, a0); // lbu a3, 78(a0) + c->pcpyld(t1, t8, t1); // pcpyld t1, t8, t1 + c->lui(t2, 28160); // lui t2, 28160 + c->addiu(t8, r0, 8); // addiu t8, r0, 8 + c->multu3(a3, a3, t8); // multu3 a3, a3, t8 + c->lui(t3, 1280); // lui t3, 1280 + c->lui(t4, 27648); // lui t4, 27648 + c->dsll32(t2, t2, 0); // dsll32 t2, t2, 0 + c->dsll32(t4, t4, 0); // dsll32 t4, t4, 0 + c->daddu(t4, t4, t3); // daddu t4, t4, t3 + c->daddu(t3, t2, t3); // daddu t3, t2, t3 + c->daddiu(t3, t3, 1); // daddiu t3, t3, 1 + c->daddu(a0, a3, a0); // daddu a0, a3, a0 + c->pcpyld(t2, t2, r0); // pcpyld t2, t2, r0 + c->lw(a0, 28, a0); // lw a0, 28(a0) + c->pcpyld(t3, t3, r0); // pcpyld t3, t3, r0 + c->pcpyld(t4, t4, r0); // pcpyld t4, t4, r0 + c->lui(t5, 12288); // lui t5, 12288 + c->lui(t6, 4096); // lui t6, 4096 + c->daddiu(t5, t5, 7); // daddiu t5, t5, 7 + c->lui(t8, 5120); // lui t8, 5120 + c->lui(a3, 27655); // lui a3, 27655 + c->daddu(t7, t8, t7); // daddu t7, t8, t7 + c->dsll32(a3, a3, 0); // dsll32 a3, a3, 0 + c->dsll32(t8, t7, 0); // dsll32 t8, t7, 0 + c->pcpyld(t5, a3, t5); // pcpyld t5, a3, t5 + c->lwu(t7, 68, a0); // lwu t7, 68(a0) + c->pcpyld(t6, t8, t6); // pcpyld t6, t8, t6 + c->daddiu(t8, a0, 172); // daddiu t8, a0, 172 + bc = c->sgpr64(t7) == 0; // beq t7, r0, L118 + c->load_symbol2(a3, cache.foreground); // lw a3, *foreground*(s7) + if (bc) {goto block_16;} // branch non-likely + + c->daddiu(t9, a3, 3852); // daddiu t9, a3, 3852 + +block_2: + c->mov64(ra, a2); // or ra, a2, r0 + c->lbu(a3, 6, t9); // lbu a3, 6(t9) + c->lbu(gp, 4, t9); // lbu gp, 4(t9) + bc = c->sgpr64(a3) != 0; // bne a3, r0, L118 + c->load_symbol2(a3, cache.merc_global_stats); // lw a3, *merc-global-stats*(s7) + if (bc) {goto block_16;} // branch non-likely + + c->daddu(a3, r0, a3); // daddu a3, r0, a3 + bc = c->sgpr64(gp) != 0; // bne gp, r0, L118 + c->lhu(s4, 2, a3); // lhu s4, 2(a3) + if (bc) {goto block_16;} // branch non-likely + + c->lhu(s3, 18, t8); // lhu s3, 18(t8) + c->lwu(gp, 4, a3); // lwu gp, 4(a3) + c->lhu(s5, 22, t8); // lhu s5, 22(t8) + c->daddu(s4, s4, s3); // daddu s4, s4, s3 + c->lwu(s3, 8, a3); // lwu s3, 8(a3) + c->lhu(s2, 24, t8); // lhu s2, 24(t8) + c->daddu(gp, gp, s5); // daddu gp, gp, s5 + c->sh(s4, 2, a3); // sh s4, 2(a3) + c->sw(gp, 4, a3); // sw gp, 4(a3) + c->daddu(s5, s3, s2); // daddu s5, s3, s2 + c->lwu(t2, 0, t8); // lwu t2, 0(t8) + c->lwu(gp, 4, t8); // lwu gp, 4(t8) + c->lui(s4, 12288); // lui s4, 12288 + c->dsll32(t2, t2, 0); // dsll32 t2, t2, 0 + c->sw(s5, 8, a3); // sw s5, 8(a3) + c->or_(t2, t2, s4); // or t2, t2, s4 + c->lhu(s5, 18, t8); // lhu s5, 18(t8) + c->addiu(s4, r0, 0); // addiu s4, r0, 0 + bc = c->sgpr64(s5) == 0; // beq s5, r0, L118 + // nop // sll r0, r0, 0 + if (bc) {goto block_16;} // branch non-likely + + // nop // sll r0, r0, 0 + +block_6: + c->lbu(s0, 0, gp); // lbu s0, 0(gp) + // nop // sll r0, r0, 0 + c->lbu(s2, 1, gp); // lbu s2, 1(gp) + c->xori(s1, r0, 49292); // xori s1, r0, 49292 + c->lbu(s3, 2, gp); // lbu s3, 2(gp) + c->daddiu(v0, s0, 3); // daddiu v0, s0, 3 + c->lw(a3, 60, a0); // lw a3, 60(a0) + c->srl(v0, v0, 2); // srl v0, v0, 2 + c->sq(t0, 0, a2); // sq t0, 0(a2) + c->xor_(t2, t2, v0); // xor t2, t2, v0 + c->sq(t2, 32, a2); // sq t2, 32(a2) + c->xor_(t2, t2, v0); // xor t2, t2, v0 + c->sh(s1, 44, a2); // sh s1, 44(a2) + c->daddu(s1, s1, s0); // daddu s1, s1, s0 + c->sb(s0, 46, a2); // sb s0, 46(a2) + c->dsll32(s0, v0, 4); // dsll32 s0, v0, 4 + c->daddu(t3, t2, s0); // daddu t3, t2, s0 + c->daddiu(s0, s2, 3); // daddiu s0, s2, 3 + c->sw(a3, 12, a2); // sw a3, 12(a2) + c->srl(s0, s0, 2); // srl s0, s0, 2 + c->sq(t1, 16, a2); // sq t1, 16(a2) + + // pc hack + { + u16 use_pc_merc_bits = 0; + u16 ignore_alpha_bits = 0; + for (int i = 0; i < 16; i++) { + if (!mbi->effects[i].disable_draw) { + use_pc_merc_bits |= (1 << i); + } + if (mbi->effects[i].ignore_alpha) { + ignore_alpha_bits |= (1 << i); + } + } + memcpy(g_ee_main_mem + c->sgpr64(a2) + 28, &use_pc_merc_bits, 2); + memcpy(g_ee_main_mem + c->sgpr64(a2) + 30, &ignore_alpha_bits, 2); + } + + c->xor_(t3, t3, s0); // xor t3, t3, s0 + c->sq(t3, 48, a2); // sq t3, 48(a2) + c->xor_(t3, t3, s0); // xor t3, t3, s0 + c->sh(s1, 60, a2); // sh s1, 60(a2) + c->daddu(s1, s1, s2); // daddu s1, s1, s2 + c->sb(s2, 62, a2); // sb s2, 62(a2) + c->dsll32(s2, s0, 4); // dsll32 s2, s0, 4 + c->sw(a3, 16, a2); // sw a3, 16(a2) + c->daddu(t4, t3, s2); // daddu t4, t3, s2 + c->xor_(t4, t4, s3); // xor t4, t4, s3 + c->xori(a3, s1, 16384); // xori a3, s1, 16384 + c->sq(t4, 64, a2); // sq t4, 64(a2) + c->xor_(t4, t4, s3); // xor t4, t4, s3 + c->sb(s3, 78, a2); // sb s3, 78(a2) + c->dsll32(s3, s3, 4); // dsll32 s3, s3, 4 + c->sh(a3, 76, a2); // sh a3, 76(a2) + c->daddu(t2, t4, s3); // daddu t2, t4, s3 + c->lbu(s3, 3, gp); // lbu s3, 3(gp) + c->daddiu(gp, gp, 4); // daddiu gp, gp, 4 + bc = c->sgpr64(s4) != 0; // bne s4, r0, L114 + c->daddiu(a2, a2, 80); // daddiu a2, a2, 80 + if (bc) {goto block_8;} // branch non-likely + + c->sd(t6, 0, a2); // sd t6, 0(a2) + c->addiu(s2, r0, 8); // addiu s2, r0, 8 + c->sd(t6, 8, a2); // sd t6, 8(a2) + c->lui(a3, 27656); // lui a3, 27656 + c->sb(s2, 0, a2); // sb s2, 0(a2) + c->daddiu(a3, a3, 132); // daddiu a3, a3, 132 + c->load_symbol2(s2, cache.foreground); // lw s2, *foreground*(s7) + c->daddiu(s1, s2, 3728); // daddiu s1, s2, 3728 + c->sw(a3, 12, a2); // sw a3, 12(a2) + c->lq(a3, 0, s1); // lq a3, 0(s1) + c->lq(s2, 16, s1); // lq s2, 16(s1) + c->lq(s0, 32, s1); // lq s0, 32(s1) + c->lq(v0, 48, s1); // lq v0, 48(s1) + c->sq(a3, 16, a2); // sq a3, 16(a2) + c->sq(s2, 32, a2); // sq s2, 32(a2) + c->sq(s0, 48, a2); // sq s0, 48(a2) + c->sq(v0, 64, a2); // sq v0, 64(a2) + c->lq(a3, 64, s1); // lq a3, 64(s1) + c->lq(s2, 80, s1); // lq s2, 80(s1) + c->lq(s1, 96, s1); // lq s1, 96(s1) + c->lui(s0, 16261); // lui s0, 16261 + c->daddiu(v0, s0, 4715); // daddiu v0, s0, 4715 + c->daddiu(v0, s0, 619); // daddiu v0, s0, 619 + c->lq(s0, 44, a0); // lq s0, 44(a0) + c->sq(a3, 80, a2); // sq a3, 80(a2) + c->lbu(a3, 5, t9); // lbu a3, 5(t9) + c->sq(s2, 96, a2); // sq s2, 96(a2) + c->sq(s1, 112, a2); // sq s1, 112(a2) + c->dsubu(a3, v0, a3); // dsubu a3, v0, a3 + c->sq(s0, 128, a2); // sq s0, 128(a2) + c->sw(a3, 28, a2); // sw a3, 28(a2) + c->daddiu(a2, a2, 144); // daddiu a2, a2, 144 + + // PC ADD BONUS DATA (bonus!) + { + // 10 qw test + u64 dmatag = 5 | (1 << 28); + memcpy(g_ee_main_mem + c->sgpr64(a2), &dmatag, 8); + u32 vif = (0b1001 << 24); + memcpy(g_ee_main_mem + c->sgpr64(a2) + 8, &vif, 4); + + for (int i = 0; i < 16; i++) { + memcpy(g_ee_main_mem + c->sgpr64(a2) + 16 + i * 4, mbi->effects[i].color_fade, 4); + } + + c->gprs[a2].du32[0] += 6 * 16; + } + +block_8: + bc = c->sgpr64(s3) == 0; // beq s3, r0, L116 + c->addiu(s2, r0, 128); // addiu s2, r0, 128 + if (bc) {goto block_11;} // branch non-likely + + c->lbu(a3, 0, gp); // lbu a3, 0(gp) + // nop // sll r0, r0, 0 + +block_10: + c->multu3(s1, a3, s2); // multu3 s1, a3, s2 + c->sq(t5, 0, a2); // sq t5, 0(a2) + c->lbu(s0, 1, gp); // lbu s0, 1(gp) + c->daddiu(gp, gp, 2); // daddiu gp, gp, 2 + + // HACK for PC PORT: stash the source matrix number in the unused bits of nop viftag. + c->sb(a3, 8, a2); + + c->lbu(a3, 0, gp); // lbu a3, 0(gp) + c->daddiu(s3, s3, -1); // daddiu s3, s3, -1 + c->sb(s0, 12, a2); // sb s0, 12(a2) + c->daddiu(a2, a2, 16); // daddiu a2, a2, 16 + c->daddu(s1, s1, a1); // daddu s1, s1, a1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(s3) != 0; // bne s3, r0, L115 + c->sw(s1, -12, a2); // sw s1, -12(a2) + if (bc) {goto block_10;} // branch non-likely + + +block_11: + c->sq(t6, 0, a2); // sq t6, 0(a2) + c->daddiu(a2, a2, 16); // daddiu a2, a2, 16 + bc = c->sgpr64(s4) != 0; // bne s4, r0, L117 + c->daddiu(s4, s4, 1); // daddiu s4, s4, 1 + if (bc) {goto block_13;} // branch non-likely + + c->mov64(a3, v1); // or a3, v1, r0 + c->sb(a3, -4, a2); // sb a3, -4(a2) + +block_13: + bc = c->sgpr64(s4) != c->sgpr64(s5); // bne s4, s5, L113 + // nop // sll r0, r0, 0 + if (bc) {goto block_6;} // branch non-likely + + get_fake_spad_addr2(s5, cache.fake_scratchpad_data, 0, c);// lui s5, 28672 + c->lbu(a3, 26, t8); // lbu a3, 26(t8) + c->addiu(gp, r0, 48); // addiu gp, r0, 48 + c->lw(s5, 52, s5); // lw s5, 52(s5) + c->mult3(a3, a3, gp); // mult3 a3, a3, gp + // nop // sll r0, r0, 0 + c->daddu(a3, s5, a3); // daddu a3, s5, a3 + // nop // sll r0, r0, 0 + c->lw(s4, 0, a3); // lw s4, 0(a3) + // nop // sll r0, r0, 0 + c->lw(gp, 4, a3); // lw gp, 4(a3) + c->movz(s4, ra, s4); // movz s4, ra, s4 + c->sq(r0, 0, a2); // sq r0, 0(a2) + c->lui(s5, 8192); // lui s5, 8192 + c->sw(s4, 0, a3); // sw s4, 0(a3) + c->mov64(s4, a2); // or s4, a2, r0 + c->sw(s5, 0, a2); // sw s5, 0(a2) + c->daddiu(a2, a2, 16); // daddiu a2, a2, 16 + bc = c->sgpr64(gp) == 0; // beq gp, r0, L118 + c->sw(s4, 4, a3); // sw s4, 4(a3) + if (bc) {goto block_16;} // branch non-likely + + // nop // sll r0, r0, 0 + c->sw(ra, 4, gp); // sw ra, 4(gp) + +block_16: + c->daddiu(t8, t8, 32); // daddiu t8, t8, 32 + c->daddiu(t9, t9, 8); // daddiu t9, t9, 8 + c->daddiu(t7, t7, -1); // daddiu t7, t7, -1 + bc = c->sgpr64(t7) != 0; // bne t7, r0, L112 + // nop // sll r0, r0, 0 + if (bc) {goto block_2;} // branch non-likely + + c->mov64(v0, a2); // or v0, a2, r0 + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 112, sp); // lq gp, 112(sp) + c->lq(s5, 96, sp); // lq s5, 96(sp) + c->lq(s4, 80, sp); // lq s4, 80(sp) + c->lq(s3, 64, sp); // lq s3, 64(sp) + c->lq(s2, 48, sp); // lq s2, 48(sp) + c->lq(s1, 32, sp); // lq s1, 32(sp) + c->lq(s0, 16, sp); // lq s0, 16(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 128); // daddiu sp, sp, 128 + 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.foreground = intern_from_c(-1, 0, "*foreground*").c(); + cache.merc_global_stats = intern_from_c(-1, 0, "*merc-global-stats*").c(); + gLinkedFunctionTable.reg("foreground-merc", execute, 256); +} + +} // namespace foreground_merc +} // namespace Mips2C +// add foreground_merc::link to the link callback table for the object file. +// FWD DEC: + +//--------------------------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 foreground_generic_merc { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* + void* foreground; // *foreground* + void* merc_global_stats; // *merc-global-stats* + void* foreground_generic_merc_add_fragments; // foreground-generic-merc-add-fragments + void* foreground_generic_merc_death; // foreground-generic-merc-death +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->daddiu(sp, sp, -112); // daddiu sp, sp, -112 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s1, 16, sp); // sq s1, 16(sp) + c->sq(s2, 32, sp); // sq s2, 32(sp) + c->sq(s3, 48, sp); // sq s3, 48(sp) + c->sq(s4, 64, sp); // sq s4, 64(sp) + c->sq(s5, 80, sp); // sq s5, 80(sp) + c->sq(gp, 96, sp); // sq gp, 96(sp) + c->mov64(gp, a0); // or gp, a0, r0 + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->daddu(v1, r0, v1); // daddu v1, r0, v1 + c->sw(a2, 16, v1); // sw a2, 16(v1) + c->sw(a1, 20, v1); // sw a1, 20(v1) + c->lb(v1, 78, gp); // lb v1, 78(gp) + c->dsll(v1, v1, 3); // dsll v1, v1, 3 + c->daddu(v1, gp, v1); // daddu v1, gp, v1 + c->lwu(s5, 28, v1); // lwu s5, 28(v1) + c->daddiu(s3, a1, 16); // daddiu s3, a1, 16 + c->addiu(s4, r0, 0); // addiu s4, r0, 0 + //beq r0, r0, L156 // beq r0, r0, L156 + // nop // sll r0, r0, 0 + goto block_82; // branch always + + +block_1: + c->load_symbol2(v1, cache.foreground); // lw v1, *foreground*(s7) + c->daddiu(v1, v1, 3728); // daddiu v1, v1, 3728 + c->dsll(a0, s4, 3); // dsll a0, s4, 3 + c->daddu(a0, v1, a0); // daddu a0, v1, a0 + c->lbu(a0, 130, a0); // lbu a0, 130(a0) + c->daddiu(a0, a0, -1); // daddiu a0, a0, -1 + c->daddiu(a1, s7, 4); // daddiu a1, s7, 4 + c->movz(a1, s7, a0); // movz a1, s7, a0 + if (((s64)c->sgpr64(s7)) == ((s64)c->sgpr64(a1))) {// beql s7, a1, L121 + c->mov64(v1, a1); // or v1, a1, r0 + goto block_4; + } + +block_3: + c->dsll(a0, s4, 3); // dsll a0, s4, 3 + c->daddu(v1, v1, a0); // daddu v1, v1, a0 + c->lbu(v1, 128, v1); // lbu v1, 128(v1) + c->daddiu(a0, v1, -2); // daddiu a0, v1, -2 + c->daddiu(v1, s7, 4); // daddiu v1, s7, 4 + c->movn(v1, s7, a0); // movn v1, s7, a0 + +block_4: + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L155 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_81;} // branch non-likely + + c->mov64(s1, s3); // or s1, s3, r0 + c->dsll(v1, s4, 5); // dsll v1, s4, 5 + c->daddiu(v1, v1, 172); // daddiu v1, v1, 172 + c->daddu(s2, v1, s5); // daddu s2, v1, s5 + c->load_symbol2(v1, cache.merc_global_stats); // lw v1, *merc-global-stats*(s7) + c->daddiu(v1, v1, 32); // daddiu v1, v1, 32 + c->lhu(a0, 2, v1); // lhu a0, 2(v1) + c->lhu(a1, 18, s2); // lhu a1, 18(s2) + c->daddu(a0, a0, a1); // daddu a0, a0, a1 + c->sh(a0, 2, v1); // sh a0, 2(v1) + c->lwu(a0, 4, v1); // lwu a0, 4(v1) + c->lhu(a1, 22, s2); // lhu a1, 22(s2) + c->daddu(a0, a0, a1); // daddu a0, a0, a1 + c->sw(a0, 4, v1); // sw a0, 4(v1) + c->lwu(a0, 8, v1); // lwu a0, 8(v1) + c->lhu(a1, 24, s2); // lhu a1, 24(s2) + c->daddu(a0, a0, a1); // daddu a0, a0, a1 + c->sw(a0, 8, v1); // sw a0, 8(v1) + c->load_symbol2(v1, cache.foreground); // lw v1, *foreground*(s7) + c->daddiu(v1, v1, 3728); // daddiu v1, v1, 3728 + c->daddiu(a1, s1, 16); // daddiu a1, s1, 16 + c->daddu(a2, r0, v1); // daddu a2, r0, v1 + c->addiu(a0, r0, 7); // addiu a0, r0, 7 + // 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, L123 + c->mov64(a2, a2); // or a2, a2, r0 + if (bc) {goto block_7;} // branch non-likely + + +block_6: + // 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, L122 + c->sq(t1, -16, a1); // sq t1, -16(a1) + if (bc) {goto block_6;} // branch non-likely + + +block_7: + bc = c->sgpr64(a0) == 0; // beq a0, r0, L124 + c->lq(a3, 0, a2); // lq a3, 0(a2) + if (bc) {goto block_12;} // 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, L124 + c->lq(a3, 0, a2); // lq a3, 0(a2) + if (bc) {goto block_12;} // 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, L124 + c->lq(a3, 0, a2); // lq a3, 0(a2) + if (bc) {goto block_12;} // 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, L124 + c->lq(a3, 0, a2); // lq a3, 0(a2) + if (bc) {goto block_12;} // 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_12: + c->gprs[a0].du64[0] = 0; // or a0, r0, r0 + c->daddiu(a1, s1, 128); // daddiu a1, s1, 128 + c->daddiu(a2, s5, 44); // daddiu a2, s5, 44 + c->addiu(a0, r0, 8); // addiu a0, r0, 8 + 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, L126 + c->mov64(a2, a2); // or a2, a2, r0 + if (bc) {goto block_14;} // branch non-likely + + +block_13: + // 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, L125 + c->sq(t1, -16, a1); // sq t1, -16(a1) + if (bc) {goto block_13;} // branch non-likely + + +block_14: + bc = c->sgpr64(a0) == 0; // beq a0, r0, L127 + c->lq(a3, 0, a2); // lq a3, 0(a2) + if (bc) {goto block_19;} // 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, L127 + c->lq(a3, 0, a2); // lq a3, 0(a2) + if (bc) {goto block_19;} // 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, L127 + c->lq(a3, 0, a2); // lq a3, 0(a2) + if (bc) {goto block_19;} // 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, L127 + c->lq(a3, 0, a2); // lq a3, 0(a2) + if (bc) {goto block_19;} // 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_19: + c->gprs[a0].du64[0] = 0; // or a0, r0, r0 + c->lbu(a0, 17, s2); // lbu a0, 17(s2) + c->andi(a1, a0, 32); // andi a1, a0, 32 + bc = c->sgpr64(a1) == 0; // beq a1, r0, L128 + // nop // sll r0, r0, 0 + if (bc) {goto block_21;} // branch non-likely + + c->addiu(a0, r0, 1); // addiu a0, r0, 1 + c->sb(a0, 182, s1); // sb a0, 182(s1) + //beq r0, r0, L130 // beq r0, r0, L130 + // nop // sll r0, r0, 0 + goto block_24; // branch always + + +block_21: + c->andi(a0, a0, 64); // andi a0, a0, 64 + bc = c->sgpr64(a0) == 0; // beq a0, r0, L129 + // nop // sll r0, r0, 0 + if (bc) {goto block_23;} // branch non-likely + + c->addiu(a0, r0, 2); // addiu a0, r0, 2 + c->sb(a0, 182, s1); // sb a0, 182(s1) + //beq r0, r0, L130 // beq r0, r0, L130 + // nop // sll r0, r0, 0 + goto block_24; // branch always + + +block_23: + c->sb(r0, 182, s1); // sb r0, 182(s1) + c->gprs[a0].du64[0] = 0; // or a0, r0, r0 + +block_24: + c->lbu(a0, 26, s2); // lbu a0, 26(s2) + c->lbu(a1, 182, s1); // lbu a1, 182(s1) + bc = c->sgpr64(a1) == 0; // beq a1, r0, L131 + // nop // sll r0, r0, 0 + if (bc) {goto block_26;} // branch non-likely + + c->addiu(a0, r0, 3776); // addiu a0, r0, 3776 + 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, L132 // beq r0, r0, L132 + // nop // sll r0, r0, 0 + goto block_27; // branch always + + +block_26: + get_fake_spad_addr2(a1, cache.fake_scratchpad_data, 0, c);// lui a1, 28672 + c->lwu(a1, 52, a1); // lwu a1, 52(a1) + c->daddiu(a1, a1, 24); // daddiu a1, a1, 24 + c->addiu(a2, r0, 48); // addiu a2, r0, 48 + c->multu3(a0, a2, a0); // multu3 a0, a2, a0 + c->daddu(a0, a1, a0); // daddu a0, a1, a0 + +block_27: + get_fake_spad_addr2(a1, cache.fake_scratchpad_data, 0, c);// lui a1, 28672 + c->sw(a0, 48, a1); // sw a0, 48(a1) + c->lwu(a1, 4, a0); // lwu a1, 4(a0) + bc = c->sgpr64(a1) == 0; // beq a1, r0, L133 + c->mov64(a2, s7); // or a2, s7, r0 + if (bc) {goto block_29;} // branch non-likely + + c->sw(s1, 0, a1); // sw s1, 0(a1) + c->mov64(a1, s1); // or a1, s1, r0 + +block_29: + c->lwu(a1, 0, a0); // lwu a1, 0(a0) + bc = c->sgpr64(a1) != 0; // bne a1, r0, L134 + c->mov64(a1, s7); // or a1, s7, r0 + if (bc) {goto block_31;} // branch non-likely + + c->sw(s1, 0, a0); // sw s1, 0(a0) + c->mov64(a1, s1); // or a1, s1, r0 + +block_31: + c->daddiu(a1, s1, 12); // daddiu a1, s1, 12 + c->sw(a1, 4, a0); // sw a1, 4(a0) + c->dsll(a0, s4, 3); // dsll a0, s4, 3 + c->daddiu(a0, a0, 124); // daddiu a0, a0, 124 + c->daddu(a0, a0, v1); // daddu a0, a0, v1 + c->lwu(a1, 0, a0); // lwu a1, 0(a0) + c->sw(a1, 160, s1); // sw a1, 160(s1) + c->lbu(a1, 5, a0); // lbu a1, 5(a0) + c->sb(a1, 183, s1); // sb a1, 183(s1) + c->lbu(a0, 7, a0); // lbu a0, 7(a0) + c->sb(a0, 186, s1); // sb a0, 186(s1) + c->lw(v1, 112, v1); // lw v1, 112(v1) + c->sb(v1, 168, s1); // sb v1, 168(s1) + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lwu(v1, 16, v1); // lwu v1, 16(v1) + c->sb(v1, 169, s1); // sb v1, 169(s1) + bc = c->sgpr64(v1) == 0; // beq v1, r0, L135 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_33;} // branch non-likely + + c->sb(r0, 168, s1); // sb r0, 168(s1) + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + +block_33: + c->sb(r0, 170, s1); // sb r0, 170(s1) + c->addiu(v1, r0, 1); // addiu v1, r0, 1 + c->sb(v1, 171, s1); // sb v1, 171(s1) + c->sh(r0, 172, s1); // sh r0, 172(s1) + c->addiu(v1, r0, 255); // addiu v1, r0, 255 + c->sb(v1, 184, s1); // sb v1, 184(s1) + c->addiu(v1, r0, 0); // addiu v1, r0, 0 + c->lbu(a0, 17, s2); // lbu a0, 17(s2) + c->andi(a0, a0, 2); // andi a0, a0, 2 + bc = c->sgpr64(a0) == 0; // beq a0, r0, L136 + c->mov64(a0, s7); // or a0, s7, r0 + if (bc) {goto block_35;} // branch non-likely + + c->addiu(v1, r0, 1); // addiu v1, r0, 1 + c->mov64(a0, v1); // or a0, v1, r0 + +block_35: + c->lhu(a0, 4, gp); // lhu a0, 4(gp) + c->andi(a0, a0, 1024); // andi a0, a0, 1024 + if (((s64)c->sgpr64(a0)) != ((s64)0)) { // bnel a0, r0, L137 + c->daddiu(a0, s7, 4); // daddiu a0, s7, 4 + goto block_40; + } + +block_37: + c->lhu(a0, 4, gp); // lhu a0, 4(gp) + c->andi(a0, a0, 2048); // andi a0, a0, 2048 + if (((s64)c->sgpr64(a0)) == ((s64)0)) { // beql a0, r0, L137 + c->mov64(a0, s7); // or a0, s7, r0 + goto block_40; + } + +block_39: + c->daddiu(a0, s7, 4); // daddiu a0, s7, 4 + c->lbu(a1, 17, s2); // lbu a1, 17(s2) + c->andi(a1, a1, 64); // andi a1, a1, 64 + c->movz(a0, s7, a1); // movz a0, s7, a1 + +block_40: + bc = c->sgpr64(s7) == c->sgpr64(a0); // beq s7, a0, L138 + c->mov64(a0, s7); // or a0, s7, r0 + if (bc) {goto block_42;} // branch non-likely + + c->lbu(v1, 206, gp); // lbu v1, 206(gp) + c->sb(v1, 184, s1); // sb v1, 184(s1) + c->addiu(v1, r0, 1); // addiu v1, r0, 1 + c->mov64(a0, v1); // or a0, v1, r0 + +block_42: + c->lbu(a0, 7, gp); // lbu a0, 7(gp) + c->andi(a0, a0, 128); // andi a0, a0, 128 + if (((s64)c->sgpr64(a0)) == ((s64)0)) { // beql a0, r0, L139 + c->mov64(a0, s7); // or a0, s7, r0 + goto block_45; + } + +block_44: + c->daddiu(a0, s7, 4); // daddiu a0, s7, 4 + c->dsll(a1, s4, 5); // dsll a1, s4, 5 + c->daddu(a1, s5, a1); // daddu a1, s5, a1 + c->lbu(a1, 199, a1); // lbu a1, 199(a1) + c->andi(a1, a1, 8); // andi a1, a1, 8 + c->movn(a0, s7, a1); // movn a0, s7, a1 + +block_45: + bc = c->sgpr64(s7) == c->sgpr64(a0); // beq s7, a0, L140 + c->mov64(a0, s7); // or a0, s7, r0 + if (bc) {goto block_47;} // branch non-likely + + c->ori(v1, v1, 2); // ori v1, v1, 2 + c->mov64(a0, v1); // or a0, v1, r0 + +block_47: + c->sb(v1, 180, s1); // sb v1, 180(s1) + c->lbu(v1, 17, s2); // lbu v1, 17(s2) + c->andi(v1, v1, 64); // andi v1, v1, 64 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L141 + // nop // sll r0, r0, 0 + if (bc) {goto block_49;} // branch non-likely + + c->addiu(v1, r0, 4); // addiu v1, r0, 4 + c->sb(v1, 185, s1); // sb v1, 185(s1) + //beq r0, r0, L143 // beq r0, r0, L143 + // nop // sll r0, r0, 0 + goto block_52; // branch always + + +block_49: + c->lhu(v1, 4, gp); // lhu v1, 4(gp) + c->andi(v1, v1, 8192); // andi v1, v1, 8192 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L142 + // nop // sll r0, r0, 0 + if (bc) {goto block_51;} // branch non-likely + + c->addiu(v1, r0, 4); // addiu v1, r0, 4 + c->sb(v1, 185, s1); // sb v1, 185(s1) + //beq r0, r0, L143 // beq r0, r0, L143 + // nop // sll r0, r0, 0 + goto block_52; // branch always + + +block_51: + c->sb(r0, 185, s1); // sb r0, 185(s1) + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + +block_52: + c->lbu(v1, 92, gp); // lbu v1, 92(gp) + bc = c->sgpr64(v1) == 0; // beq v1, r0, L144 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_54;} // branch non-likely + + c->load_symbol2(t9, cache.foreground_generic_merc_death);// lw t9, foreground-generic-merc-death(s7) + c->mov64(a0, gp); // or a0, gp, r0 + c->mov64(a1, s1); // or a1, 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: + c->sw(r0, 164, s1); // sw r0, 164(s1) + c->lbu(v1, 17, s2); // lbu v1, 17(s2) + c->andi(v1, v1, 4); // andi v1, v1, 4 + if (((s64)c->sgpr64(v1)) == ((s64)0)) { // beql v1, r0, L145 + c->mov64(v1, s7); // or v1, s7, r0 + goto block_59; + } + +block_56: + c->lwu(v1, 80, gp); // lwu v1, 80(gp) + if (((s64)c->sgpr64(s7)) == ((s64)c->sgpr64(v1))) {// beql s7, v1, L145 + c->mov64(v1, v1); // or v1, v1, r0 + goto block_59; + } + +block_58: + c->lwu(v1, 80, gp); // lwu v1, 80(gp) + c->lwu(v1, 28, v1); // lwu v1, 28(v1) + +block_59: + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L146 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_61;} // branch non-likely + + c->lwu(v1, 80, gp); // lwu v1, 80(gp) + c->lwu(v1, 32, v1); // lwu v1, 32(v1) + c->sw(v1, 164, s1); // sw v1, 164(s1) + +block_61: + c->daddiu(a0, s1, 256); // daddiu a0, s1, 256 + c->mov64(a1, s2); // or a1, s2, r0 + c->addiu(v1, r0, 2); // addiu v1, r0, 2 + c->daddiu(a2, v1, -4); // daddiu a2, v1, -4 + c->mov64(a0, a0); // or a0, a0, r0 + bc = ((s64)c->sgpr64(a2)) < 0; // bltz a2, L148 + c->mov64(a1, a1); // or a1, a1, r0 + if (bc) {goto block_63;} // branch non-likely + + +block_62: + // nop // sll r0, r0, 0 + c->lq(t1, 0, a1); // lq t1, 0(a1) + // nop // sll r0, r0, 0 + c->lq(a2, 16, a1); // lq a2, 16(a1) + c->daddiu(v1, v1, -4); // daddiu v1, v1, -4 + c->lq(a3, 32, a1); // lq a3, 32(a1) + c->daddiu(a0, a0, 64); // daddiu a0, a0, 64 + c->lq(t0, 48, a1); // lq t0, 48(a1) + c->daddiu(a1, a1, 64); // daddiu a1, a1, 64 + c->sq(t1, -64, a0); // sq t1, -64(a0) + c->daddiu(t1, v1, -4); // daddiu t1, v1, -4 + c->sq(a2, -48, a0); // sq a2, -48(a0) + // nop // sll r0, r0, 0 + c->sq(a3, -32, a0); // sq a3, -32(a0) + bc = ((s64)c->sgpr64(t1)) >= 0; // bgez t1, L147 + c->sq(t0, -16, a0); // sq t0, -16(a0) + if (bc) {goto block_62;} // branch non-likely + + +block_63: + bc = c->sgpr64(v1) == 0; // beq v1, r0, L149 + c->lq(a2, 0, a1); // lq a2, 0(a1) + if (bc) {goto block_68;} // branch non-likely + + c->daddiu(a1, a1, 16); // daddiu a1, a1, 16 + c->daddiu(a0, a0, 16); // daddiu a0, a0, 16 + c->daddiu(v1, v1, -1); // daddiu v1, v1, -1 + c->sq(a2, -16, a0); // sq a2, -16(a0) + bc = c->sgpr64(v1) == 0; // beq v1, r0, L149 + c->lq(a2, 0, a1); // lq a2, 0(a1) + if (bc) {goto block_68;} // branch non-likely + + c->daddiu(a1, a1, 16); // daddiu a1, a1, 16 + c->daddiu(a0, a0, 16); // daddiu a0, a0, 16 + c->daddiu(v1, v1, -1); // daddiu v1, v1, -1 + c->sq(a2, -16, a0); // sq a2, -16(a0) + bc = c->sgpr64(v1) == 0; // beq v1, r0, L149 + c->lq(a2, 0, a1); // lq a2, 0(a1) + if (bc) {goto block_68;} // branch non-likely + + c->daddiu(a1, a1, 16); // daddiu a1, a1, 16 + c->daddiu(a0, a0, 16); // daddiu a0, a0, 16 + c->daddiu(v1, v1, -1); // daddiu v1, v1, -1 + c->sq(a2, -16, a0); // sq a2, -16(a0) + bc = c->sgpr64(v1) == 0; // beq v1, r0, L149 + c->lq(a2, 0, a1); // lq a2, 0(a1) + if (bc) {goto block_68;} // branch non-likely + + c->daddiu(a1, a1, 16); // daddiu a1, a1, 16 + c->daddiu(a0, a0, 16); // daddiu a0, a0, 16 + c->daddiu(v1, v1, -1); // daddiu v1, v1, -1 + c->sq(a2, -16, a0); // sq a2, -16(a0) + +block_68: + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + c->addiu(v1, r0, 18); // addiu v1, r0, 18 + c->lwu(a0, 28, s2); // lwu a0, 28(s2) + if (((s64)c->sgpr64(a0)) == ((s64)0)) { // beql a0, r0, L150 + c->mov64(a0, s7); // or a0, s7, r0 + goto block_71; + } + +block_70: + c->daddiu(a0, s7, 4); // daddiu a0, s7, 4 + c->lwu(a1, 28, s2); // lwu a1, 28(s2) + c->lbu(a1, 1, a1); // lbu a1, 1(a1) + c->movz(a0, s7, a1); // movz a0, s7, a1 + +block_71: + bc = c->sgpr64(s7) == c->sgpr64(a0); // beq s7, a0, L154 + c->mov64(a0, s7); // or a0, s7, r0 + if (bc) {goto block_80;} // branch non-likely + + c->addiu(a0, r0, 1); // addiu a0, r0, 1 + c->sb(a0, 170, s1); // sb a0, 170(s1) + c->daddiu(a1, s1, 288); // daddiu a1, s1, 288 + c->lwu(a0, 28, s2); // lwu a0, 28(s2) + c->lwu(a2, 28, s2); // lwu a2, 28(s2) + c->lbu(a2, 1, a2); // lbu a2, 1(a2) + c->dsll(a2, a2, 4); // dsll a2, a2, 4 + c->daddu(a2, a0, a2); // daddu a2, a0, a2 + c->addiu(a0, r0, 5); // addiu a0, r0, 5 + 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, L152 + c->mov64(a2, a2); // or a2, a2, r0 + if (bc) {goto block_74;} // branch non-likely + + +block_73: + // 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, L151 + c->sq(t1, -16, a1); // sq t1, -16(a1) + if (bc) {goto block_73;} // branch non-likely + + +block_74: + bc = c->sgpr64(a0) == 0; // beq a0, r0, L153 + c->lq(a3, 0, a2); // lq a3, 0(a2) + if (bc) {goto block_79;} // 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, L153 + c->lq(a3, 0, a2); // lq a3, 0(a2) + if (bc) {goto block_79;} // 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, L153 + c->lq(a3, 0, a2); // lq a3, 0(a2) + if (bc) {goto block_79;} // 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, L153 + c->lq(a3, 0, a2); // lq a3, 0(a2) + if (bc) {goto block_79;} // 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_79: + c->gprs[a0].du64[0] = 0; // or a0, r0, r0 + c->daddiu(v1, v1, 5); // daddiu v1, v1, 5 + c->mov64(a0, v1); // or a0, v1, r0 + +block_80: + c->lui(a0, 4096); // lui a0, 4096 + c->daddiu(a1, v1, -1); // daddiu a1, v1, -1 + c->dsll32(a1, a1, 16); // dsll32 a1, a1, 16 + c->dsrl32(a1, a1, 16); // dsrl32 a1, a1, 16 + c->or_(a0, a0, a1); // or a0, a0, a1 + c->sd(a0, 0, s1); // sd a0, 0(s1) + c->sw(v1, 8, s1); // sw v1, 8(s1) + c->sw(r0, 12, s1); // sw r0, 12(s1) + c->dsll(v1, v1, 4); // dsll v1, v1, 4 + c->daddu(a1, s3, v1); // daddu a1, s3, v1 + c->mov64(v1, a1); // or v1, a1, r0 + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->lwu(a2, 48, v1); // lwu a2, 48(v1) + c->load_symbol2(t9, cache.foreground_generic_merc_add_fragments);// lw t9, foreground-generic-merc-add-fragments(s7) + c->mov64(a0, s2); // or a0, s2, 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(s3, v0); // or s3, v0, r0 + c->mov64(v1, s3); // or v1, s3, r0 + +block_81: + c->daddiu(s4, s4, 1); // daddiu s4, s4, 1 + +block_82: + c->lwu(v1, 68, s5); // lwu v1, 68(s5) + c->slt(v1, s4, v1); // slt v1, s4, v1 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L120 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + c->mov64(v1, s7); // or v1, s7, r0 + c->mov64(v0, s3); // or v0, s3, 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 + // 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.foreground = intern_from_c(-1, 0, "*foreground*").c(); + cache.merc_global_stats = intern_from_c(-1, 0, "*merc-global-stats*").c(); + cache.foreground_generic_merc_add_fragments = intern_from_c(-1, 0, "foreground-generic-merc-add-fragments").c(); + cache.foreground_generic_merc_death = intern_from_c(-1, 0, "foreground-generic-merc-death").c(); + gLinkedFunctionTable.reg("foreground-generic-merc", execute, 256); +} + +} // namespace foreground_generic_merc +} // namespace Mips2C +// add foreground_generic_merc::link to the link callback table for the object file. +// FWD DEC: +//--------------------------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 foreground_draw_hud { +struct Cache { + void* bone_calculation_list; // *bone-calculation-list* + void* display; // *display* + void* fake_scratchpad_data; // *fake-scratchpad-data* + void* foreground; // *foreground* + void* foreground_generic_merc; // foreground-generic-merc +} 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->sd(fp, 8, sp); // sd fp, 8(sp) + c->mov64(fp, t9); // or fp, t9, r0 + get_fake_spad_addr2(at, cache.fake_scratchpad_data, 0, c);// lui at, 28672 + c->lwu(a2, 4, a1); // lwu a2, 4(a1) + c->daddiu(v1, a2, 64); // daddiu v1, a2, 64 + c->andi(a3, v1, 48); // andi a3, v1, 48 + bc = c->sgpr64(a3) == 0; // beq a3, r0, L2 + // nop // sll r0, r0, 0 + if (bc) {goto block_2;} // branch non-likely + + c->daddiu(v1, v1, 64); // daddiu v1, v1, 64 + c->dsubu(v1, v1, a3); // dsubu v1, v1, a3 + +block_2: + c->lwu(a3, 16, a0); // lwu a3, 16(a0) + c->lw(a3, 8, a3); // lw a3, 8(a3) + c->daddiu(t1, a3, 3); // daddiu t1, a3, 3 + c->dsll(a3, t1, 7); // dsll a3, t1, 7 + get_fake_spad_addr2(t0, cache.fake_scratchpad_data, 0, c);// lui t0, 28672 + c->daddu(t0, r0, t0); // daddu t0, r0, t0 + c->lwu(t2, 12, a0); // lwu t2, 12(a0) + c->lwu(t2, 44, t2); // lwu t2, 44(t2) + c->sw(t2, 24, t0); // sw t2, 24(t0) + c->lwu(t2, 24, a0); // lwu t2, 24(a0) + c->daddiu(t2, t2, 12); // daddiu t2, t2, 12 + c->sw(t2, 28, t0); // sw t2, 28(t0) + c->sw(t1, 32, t0); // sw t1, 32(t0) + c->mtc1(f0, r0); // mtc1 f0, r0 + c->swc1(f0, 0, t0); // swc1 f0, 0(t0) + c->sw(a1, 40, t0); // sw a1, 40(t0) + c->addiu(a1, r0, 336); // addiu a1, r0, 336 + c->lbu(t1, 90, a0); // lbu t1, 90(a0) + get_fake_spad_addr2(t2, cache.fake_scratchpad_data, 0, c);// lui t2, 28672 + c->daddu(t1, t1, t2); // daddu t1, t1, t2 + c->lbu(t1, 64, t1); // lbu t1, 64(t1) + c->multu3(a1, a1, t1); // multu3 a1, a1, t1 + c->daddiu(a1, a1, 80); // daddiu a1, a1, 80 + get_fake_spad_addr2(t1, cache.fake_scratchpad_data, 0, c);// lui t1, 28672 + c->daddu(a1, a1, t1); // daddu a1, a1, t1 + c->sw(a1, 52, t0); // sw a1, 52(t0) + c->mov64(t1, v1); // or t1, v1, r0 + c->addiu(t2, r0, 2); // addiu t2, r0, 2 + get_fake_spad_addr2(a1, cache.fake_scratchpad_data, 0, c);// lui a1, 28672 + c->daddu(t5, r0, a1); // daddu t5, r0, a1 + c->load_symbol2(a1, cache.bone_calculation_list); // lw a1, *bone-calculation-list*(s7) + c->mov64(t0, a2); // or t0, a2, r0 + c->lwu(t3, 24, t5); // lwu t3, 24(t5) + c->lwu(t4, 28, t5); // lwu t4, 28(t5) + c->lwu(t5, 32, t5); // lwu t5, 32(t5) + c->mov64(t6, t0); // or t6, t0, r0 + c->sh(t2, 0, t6); // sh t2, 0(t6) + c->sh(t5, 2, t6); // sh t5, 2(t6) + c->sw(t1, 4, t6); // sw t1, 4(t6) + c->sw(t3, 8, t6); // sw t3, 8(t6) + c->sw(t4, 12, t6); // sw t4, 12(t6) + c->sw(r0, 32, t6); // sw r0, 32(t6) + c->lwu(t1, 4, a1); // lwu t1, 4(a1) + bc = c->sgpr64(t1) == 0; // beq t1, r0, L3 + c->mov64(t1, s7); // or t1, s7, r0 + if (bc) {goto block_4;} // branch non-likely + + c->lwu(t1, 4, a1); // lwu t1, 4(a1) + c->sw(t0, 32, t1); // sw t0, 32(t1) + c->mov64(t1, t0); // or t1, t0, r0 + +block_4: + c->lwu(t1, 0, a1); // lwu t1, 0(a1) + bc = c->sgpr64(t1) != 0; // bne t1, r0, L4 + c->mov64(t1, s7); // or t1, s7, r0 + if (bc) {goto block_6;} // branch non-likely + + c->sw(t0, 0, a1); // sw t0, 0(a1) + c->mov64(t1, t0); // or t1, t0, r0 + +block_6: + c->sw(t0, 4, a1); // sw t0, 4(a1) + c->daddiu(a1, a2, 48); // daddiu a1, a2, 48 + c->daddu(a1, v1, a3); // daddu a1, v1, a3 + c->sw(v1, 36, at); // sw v1, 36(at) + c->load_symbol2(v1, cache.foreground); // lw v1, *foreground*(s7) + c->daddiu(v1, v1, 3728); // daddiu v1, v1, 3728 + c->addiu(a2, r0, 1); // addiu a2, r0, 1 + c->lbu(a3, 6, a0); // lbu a3, 6(a0) + bc = c->sgpr64(a3) != c->sgpr64(a2); // bne a3, a2, L14 + c->mov64(a2, s7); // or a2, s7, r0 + if (bc) {goto block_25;} // branch non-likely + + c->lwu(a2, 28, a0); // lwu a2, 28(a0) + c->addiu(a3, r0, 0); // addiu a3, r0, 0 + //beq r0, r0, L13 // beq r0, r0, L13 + // nop // sll r0, r0, 0 + goto block_22; // branch always + + +block_8: + c->dsll(t0, a3, 5); // dsll t0, a3, 5 + c->daddiu(t0, t0, 172); // daddiu t0, t0, 172 + c->daddu(t0, t0, a2); // daddu t0, t0, a2 + c->lbu(t0, 27, t0); // lbu t0, 27(t0) + c->andi(t0, t0, 1); // andi t0, t0, 1 + bc = c->sgpr64(t0) == 0; // beq t0, r0, L9 + // nop // sll r0, r0, 0 + if (bc) {goto block_17;} // branch non-likely + + c->daddu(t1, r0, v1); // daddu t1, r0, v1 + c->addiu(t0, r0, 3824); // addiu t0, r0, 3824 + get_fake_spad_addr2(t2, cache.fake_scratchpad_data, 0, c);// lui t2, 28672 + c->daddu(t2, t0, t2); // daddu t2, t0, t2 + c->addiu(t0, r0, 7); // addiu t0, r0, 7 + c->daddiu(t3, t0, -4); // daddiu t3, t0, -4 + c->mov64(t1, t1); // or t1, t1, r0 + bc = ((s64)c->sgpr64(t3)) < 0; // bltz t3, L7 + c->mov64(t2, t2); // or t2, t2, r0 + if (bc) {goto block_11;} // branch non-likely + + +block_10: + // nop // sll r0, r0, 0 + c->lq(t6, 0, t2); // lq t6, 0(t2) + // nop // sll r0, r0, 0 + c->lq(t3, 16, t2); // lq t3, 16(t2) + c->daddiu(t0, t0, -4); // daddiu t0, t0, -4 + c->lq(t4, 32, t2); // lq t4, 32(t2) + c->daddiu(t1, t1, 64); // daddiu t1, t1, 64 + c->lq(t5, 48, t2); // lq t5, 48(t2) + c->daddiu(t2, t2, 64); // daddiu t2, t2, 64 + c->sq(t6, -64, t1); // sq t6, -64(t1) + c->daddiu(t6, t0, -4); // daddiu t6, t0, -4 + c->sq(t3, -48, t1); // sq t3, -48(t1) + // nop // sll r0, r0, 0 + c->sq(t4, -32, t1); // sq t4, -32(t1) + bc = ((s64)c->sgpr64(t6)) >= 0; // bgez t6, L6 + c->sq(t5, -16, t1); // sq t5, -16(t1) + if (bc) {goto block_10;} // branch non-likely + + +block_11: + bc = c->sgpr64(t0) == 0; // beq t0, r0, L8 + c->lq(t3, 0, t2); // lq t3, 0(t2) + if (bc) {goto block_16;} // branch non-likely + + c->daddiu(t2, t2, 16); // daddiu t2, t2, 16 + c->daddiu(t1, t1, 16); // daddiu t1, t1, 16 + c->daddiu(t0, t0, -1); // daddiu t0, t0, -1 + c->sq(t3, -16, t1); // sq t3, -16(t1) + bc = c->sgpr64(t0) == 0; // beq t0, r0, L8 + c->lq(t3, 0, t2); // lq t3, 0(t2) + if (bc) {goto block_16;} // branch non-likely + + c->daddiu(t2, t2, 16); // daddiu t2, t2, 16 + c->daddiu(t1, t1, 16); // daddiu t1, t1, 16 + c->daddiu(t0, t0, -1); // daddiu t0, t0, -1 + c->sq(t3, -16, t1); // sq t3, -16(t1) + bc = c->sgpr64(t0) == 0; // beq t0, r0, L8 + c->lq(t3, 0, t2); // lq t3, 0(t2) + if (bc) {goto block_16;} // branch non-likely + + c->daddiu(t2, t2, 16); // daddiu t2, t2, 16 + c->daddiu(t1, t1, 16); // daddiu t1, t1, 16 + c->daddiu(t0, t0, -1); // daddiu t0, t0, -1 + c->sq(t3, -16, t1); // sq t3, -16(t1) + bc = c->sgpr64(t0) == 0; // beq t0, r0, L8 + c->lq(t3, 0, t2); // lq t3, 0(t2) + if (bc) {goto block_16;} // branch non-likely + + c->daddiu(t2, t2, 16); // daddiu t2, t2, 16 + c->daddiu(t1, t1, 16); // daddiu t1, t1, 16 + c->daddiu(t0, t0, -1); // daddiu t0, t0, -1 + c->sq(t3, -16, t1); // sq t3, -16(t1) + +block_16: + c->gprs[t0].du64[0] = 0; // or t0, r0, r0 + // Unknown instr: ld t0, L217(fp) + c->dsll(t1, a3, 3); // dsll t1, a3, 3 + c->daddu(t1, v1, t1); // daddu t1, v1, t1 + c->sw(t0, 124, t1); // sw t0, 124(t1) + c->addiu(t0, r0, 2); // addiu t0, r0, 2 + c->dsll(t1, a3, 3); // dsll t1, a3, 3 + c->daddu(t1, v1, t1); // daddu t1, v1, t1 + c->sb(t0, 128, t1); // sb t0, 128(t1) + //beq r0, r0, L10 // beq r0, r0, L10 + // nop // sll r0, r0, 0 + goto block_18; // branch always + + +block_17: + c->addiu(t0, r0, 2); // addiu t0, r0, 2 + c->dsll(t1, a3, 3); // dsll t1, a3, 3 + c->daddu(t1, v1, t1); // daddu t1, v1, t1 + c->sb(t0, 128, t1); // sb t0, 128(t1) + +block_18: + c->dsll(t0, a3, 3); // dsll t0, a3, 3 + c->daddu(t0, v1, t0); // daddu t0, v1, t0 + c->sb(r0, 130, t0); // sb r0, 130(t0) + c->dsll(t0, a3, 5); // dsll t0, a3, 5 + c->daddu(t0, a2, t0); // daddu t0, a2, t0 + c->lbu(t0, 189, t0); // lbu t0, 189(t0) + c->andi(t0, t0, 128); // andi t0, t0, 128 + bc = c->sgpr64(t0) == 0; // beq t0, r0, L11 + // nop // sll r0, r0, 0 + if (bc) {goto block_20;} // branch non-likely + + c->addiu(t0, r0, 1); // addiu t0, r0, 1 + //beq r0, r0, L12 // beq r0, r0, L12 + // nop // sll r0, r0, 0 + goto block_21; // branch always + + +block_20: + c->addiu(t0, r0, 0); // addiu t0, r0, 0 + +block_21: + c->dsll(t1, a3, 3); // dsll t1, a3, 3 + c->daddu(t1, v1, t1); // daddu t1, v1, t1 + c->sb(t0, 129, t1); // sb t0, 129(t1) + c->daddiu(a3, a3, 1); // daddiu a3, a3, 1 + +block_22: + c->lwu(t0, 68, a2); // lwu t0, 68(a2) + c->slt(t0, a3, t0); // slt t0, a3, t0 + bc = c->sgpr64(t0) != 0; // bne t0, r0, L5 + // nop // sll r0, r0, 0 + if (bc) {goto block_8;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + c->mov64(v1, s7); // or v1, s7, r0 + c->load_symbol2(v1, cache.display); // lw v1, *display*(s7) + c->ld(v1, 164, v1); // ld v1, 164(v1) + c->andi(v1, v1, 16384); // andi v1, v1, 16384 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L14 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_25;} // branch non-likely + + c->load_symbol2(t9, cache.foreground_generic_merc);// lw t9, foreground-generic-merc(s7) + c->addiu(a2, r0, 1); // addiu a2, r0, 1 + call_addr = c->gprs[t9].du32[0]; // function call: + c->sll(v0, ra, 0); // sll v0, ra, 0 + c->jalr(call_addr); // jalr ra, t9 + c->mov64(a1, v0); // or a1, v0, r0 + c->mov64(v1, a1); // or v1, a1, r0 + +block_25: + c->andi(v1, a1, 48); // andi v1, a1, 48 + c->mov128_gpr_gpr(a0, r0); // por a0, r0, r0 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L15 + c->lui(a0, 8192); // lui a0, 8192 + if (bc) {goto block_27;} // branch non-likely + + c->sq(a0, 0, a1); // sq a0, 0(a1) + c->mov64(a0, a1); // or a0, a1, r0 + c->dsubu(v1, a1, v1); // dsubu v1, a1, v1 + c->daddiu(a1, v1, 64); // daddiu a1, v1, 64 + c->sw(a1, 4, a0); // sw a1, 4(a0) + +block_27: + c->lui(v1, 4095); // lui v1, 4095 + c->ori(v1, v1, 65535); // ori v1, v1, 65535 + c->and_(v1, a1, v1); // and v1, a1, v1 + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->lwu(a0, 40, a0); // lwu a0, 40(a0) + c->sw(v1, 4, a0); // sw v1, 4(a0) + 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) + //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 + // nop // sll r0, r0, 0 +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + cache.bone_calculation_list = intern_from_c(-1, 0, "*bone-calculation-list*").c(); + cache.display = intern_from_c(-1, 0, "*display*").c(); + cache.fake_scratchpad_data = intern_from_c(-1, 0, "*fake-scratchpad-data*").c(); + cache.foreground = intern_from_c(-1, 0, "*foreground*").c(); + cache.foreground_generic_merc = intern_from_c(-1, 0, "foreground-generic-merc").c(); + gLinkedFunctionTable.reg("foreground-draw-hud", execute, 256); +} + +} // namespace foreground_draw_hud +} // namespace Mips2C +// add foreground_draw_hud::link to the link callback table for the object file. +// FWD DEC: diff --git a/game/mips2c/jak3_functions/generic_effect.cpp b/game/mips2c/jak3_functions/generic_effect.cpp new file mode 100644 index 0000000000..cdf3737d4d --- /dev/null +++ b/game/mips2c/jak3_functions/generic_effect.cpp @@ -0,0 +1,2646 @@ + +//--------------------------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_light_proc { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* +} cache; + +void vcallms0(ExecutionContext* c) { + // move.xyzw vf21, vf17 | mulax.xyzw ACC, vf10, vf01 + c->acc.vf.mula(Mask::xyzw, c->vf_src(vf10).vf, c->vf_src(vf01).vf.x()); c->vfs[vf21].vf.move(Mask::xyzw, c->vf_src(vf17).vf); + // move.xyzw vf22, vf18 | madday.xyzw ACC, vf11, vf01 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf11].vf, c->vfs[vf01].vf.y()); c->vfs[vf22].vf.move(Mask::xyzw, c->vf_src(vf18).vf); + // move.xyzw vf23, vf19 | maddz.xyzw vf01, vf12, vf01 + c->acc.vf.madd(Mask::xyzw, c->vfs[vf01].vf, c->vf_src(vf12).vf, c->vf_src(vf01).vf.z()); c->vfs[vf23].vf.move(Mask::xyzw, c->vf_src(vf19).vf); + // move.xyzw vf24, vf20 | mulax.xyzw ACC, vf10, vf02 + c->acc.vf.mula(Mask::xyzw, c->vf_src(vf10).vf, c->vf_src(vf02).vf.x()); c->vfs[vf24].vf.move(Mask::xyzw, c->vf_src(vf20).vf); + // nop | itof0.xyzw vf17, vf05 + c->vfs[vf17].vf.itof0(Mask::xyzw, c->vf_src(vf05).vf); + // nop | itof0.xyzw vf18, vf06 + c->vfs[vf18].vf.itof0(Mask::xyzw, c->vf_src(vf06).vf); + // nop | itof0.xyzw vf19, vf07 + c->vfs[vf19].vf.itof0(Mask::xyzw, c->vf_src(vf07).vf); + // nop | itof0.xyzw vf20, vf08 + c->vfs[vf20].vf.itof0(Mask::xyzw, c->vf_src(vf08).vf); + + // nop | madday.xyzw ACC, vf11, vf02 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf11].vf, c->vfs[vf02].vf.y()); + // nop | maddz.xyzw vf02, vf12, vf02 + c->acc.vf.madd(Mask::xyzw, c->vfs[vf02].vf, c->vf_src(vf12).vf, c->vf_src(vf02).vf.z()); + // nop | mulax.xyzw ACC, vf10, vf03 + c->acc.vf.mula(Mask::xyzw, c->vf_src(vf10).vf, c->vf_src(vf03).vf.x()); + // nop | madday.xyzw ACC, vf11, vf03 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf11].vf, c->vfs[vf03].vf.y()); + // nop | maddz.xyzw vf03, vf12, vf03 + c->acc.vf.madd(Mask::xyzw, c->vfs[vf03].vf, c->vf_src(vf12).vf, c->vf_src(vf03).vf.z()); + // nop | mulax.xyzw ACC, vf10, vf04 + c->acc.vf.mula(Mask::xyzw, c->vf_src(vf10).vf, c->vf_src(vf04).vf.x()); + // nop | madday.xyzw ACC, vf11, vf04 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf11].vf, c->vfs[vf04].vf.y()); + // nop | maddz.xyzw vf04, vf12, vf04 + c->acc.vf.madd(Mask::xyzw, c->vfs[vf04].vf, c->vf_src(vf12).vf, c->vf_src(vf04).vf.z()); + // nop | maxx.xyzw vf01, vf01, vf00 + c->vfs[vf01].vf.max(Mask::xyzw, c->vf_src(vf01).vf, c->vf_src(vf00).vf.x()); + // nop | maxx.xyzw vf02, vf02, vf00 + c->vfs[vf02].vf.max(Mask::xyzw, c->vf_src(vf02).vf, c->vf_src(vf00).vf.x()); + // nop | maxx.xyzw vf03, vf03, vf00 + c->vfs[vf03].vf.max(Mask::xyzw, c->vf_src(vf03).vf, c->vf_src(vf00).vf.x()); + // nop | maxx.xyzw vf04, vf04, vf00 + c->vfs[vf04].vf.max(Mask::xyzw, c->vf_src(vf04).vf, c->vf_src(vf00).vf.x()); + // nop | mulaw.xyzw ACC, vf13, vf00 + c->acc.vf.mula(Mask::xyzw, c->vf_src(vf13).vf, c->vf_src(vf00).vf.w()); + // nop | maddax.xyzw ACC, vf14, vf01 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf14].vf, c->vfs[vf01].vf.x()); + // nop | madday.xyzw ACC, vf15, vf01 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf15].vf, c->vfs[vf01].vf.y()); + // nop | maddz.xyzw vf01, vf16, vf01 + c->acc.vf.madd(Mask::xyzw, c->vfs[vf01].vf, c->vf_src(vf16).vf, c->vf_src(vf01).vf.z()); + // nop | mulaw.xyzw ACC, vf13, vf00 + c->acc.vf.mula(Mask::xyzw, c->vf_src(vf13).vf, c->vf_src(vf00).vf.w()); + // nop | maddax.xyzw ACC, vf14, vf02 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf14].vf, c->vfs[vf02].vf.x()); + // nop | madday.xyzw ACC, vf15, vf02 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf15].vf, c->vfs[vf02].vf.y()); + // nop | maddz.xyzw vf02, vf16, vf02 + c->acc.vf.madd(Mask::xyzw, c->vfs[vf02].vf, c->vf_src(vf16).vf, c->vf_src(vf02).vf.z()); + // nop | mulaw.xyzw ACC, vf13, vf00 + c->acc.vf.mula(Mask::xyzw, c->vf_src(vf13).vf, c->vf_src(vf00).vf.w()); + // nop | maddax.xyzw ACC, vf14, vf03 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf14].vf, c->vfs[vf03].vf.x()); + // nop | madday.xyzw ACC, vf15, vf03 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf15].vf, c->vfs[vf03].vf.y()); + // nop | maddz.xyzw vf03, vf16, vf03 + c->acc.vf.madd(Mask::xyzw, c->vfs[vf03].vf, c->vf_src(vf16).vf, c->vf_src(vf03).vf.z()); + // nop | mulaw.xyzw ACC, vf13, vf00 + c->acc.vf.mula(Mask::xyzw, c->vf_src(vf13).vf, c->vf_src(vf00).vf.w()); + // nop | maddax.xyzw ACC, vf14, vf04 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf14].vf, c->vfs[vf04].vf.x()); + // nop | madday.xyzw ACC, vf15, vf04 + c->acc.vf.madda(Mask::xyzw, c->vfs[vf15].vf, c->vfs[vf04].vf.y()); + // nop | maddz.xyzw vf04, vf16, vf04 + c->acc.vf.madd(Mask::xyzw, c->vfs[vf04].vf, c->vf_src(vf16).vf, c->vf_src(vf04).vf.z()); + // nop | mul.xyzw vf17, vf17, vf01 + c->vfs[vf17].vf.mul(Mask::xyzw, c->vf_src(vf17).vf, c->vf_src(vf01).vf); + // nop | mul.xyzw vf18, vf18, vf02 + c->vfs[vf18].vf.mul(Mask::xyzw, c->vf_src(vf18).vf, c->vf_src(vf02).vf); + // nop | mul.xyzw vf19, vf19, vf03 + c->vfs[vf19].vf.mul(Mask::xyzw, c->vf_src(vf19).vf, c->vf_src(vf03).vf); + // nop | mul.xyzw vf20, vf20, vf04 + c->vfs[vf20].vf.mul(Mask::xyzw, c->vf_src(vf20).vf, c->vf_src(vf04).vf); + // nop | minix.xyzw vf17, vf17, vf09 + c->vfs[vf17].vf.mini(Mask::xyzw, c->vf_src(vf17).vf, c->vf_src(vf09).vf.x()); + // nop | minix.xyzw vf18, vf18, vf09 + c->vfs[vf18].vf.mini(Mask::xyzw, c->vf_src(vf18).vf, c->vf_src(vf09).vf.x()); + // nop | minix.xyzw vf19, vf19, vf09 + c->vfs[vf19].vf.mini(Mask::xyzw, c->vf_src(vf19).vf, c->vf_src(vf09).vf.x()); + // nop | minix.xyzw vf20, vf20, vf09 + c->vfs[vf20].vf.mini(Mask::xyzw, c->vf_src(vf20).vf, c->vf_src(vf09).vf.x()); + //fmt::print("light:\n {}\n {}\n {}\n {}\n\n", c->vf_src(vf17).vf.print(), c->vf_src(vf18).vf.print(), c->vf_src(vf19).vf.print(), c->vf_src(vf20).vf.print()); + + + + // nop | ftoi0.xyzw vf17, vf17 + c->vfs[vf17].vf.ftoi0(Mask::xyzw, c->vf_src(vf17).vf); + // nop | ftoi0.xyzw vf18, vf18 + c->vfs[vf18].vf.ftoi0(Mask::xyzw, c->vf_src(vf18).vf); + // nop | ftoi0.xyzw vf19, vf19 :e + c->vfs[vf19].vf.ftoi0(Mask::xyzw, c->vf_src(vf19).vf); + // nop | ftoi0.xyzw vf20, vf20 + c->vfs[vf20].vf.ftoi0(Mask::xyzw, c->vf_src(vf20).vf); +} + + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + c->daddiu(sp, sp, -96); // daddiu sp, sp, -96 + c->sd(ra, 12432, at); // sd ra, 12432(at) + c->sq(s2, 12448, at); // sq s2, 12448(at) + c->sq(s3, 12464, at); // sq s3, 12464(at) + c->sq(s4, 12480, at); // sq s4, 12480(at) + c->sq(s5, 12496, at); // sq s5, 12496(at) + c->sq(gp, 12512, at); // sq gp, 12512(at) + get_fake_spad_addr2(at, cache.fake_scratchpad_data, 0, c);// lui at, 28672 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->lw(v1, 44, at); // lw v1, 44(at) + // nop // sll r0, r0, 0 + c->lw(a1, 36, at); // lw a1, 36(at) + // nop // sll r0, r0, 0 + c->lw(a0, 4, v1); // lw a0, 4(v1) + // nop // sll r0, r0, 0 + c->lw(t0, 0, v1); // lw t0, 0(v1) + // nop // sll r0, r0, 0 + c->lw(t3, 4, at); // lw t3, 4(at) + // nop // sll r0, r0, 0 + c->lw(v1, 8, at); // lw v1, 8(at) + c->addiu(a3, r0, 255); // addiu a3, r0, 255 + c->lw(t2, 12, at); // lw t2, 12(at) + c->addiu(a2, r0, 256); // addiu a2, r0, 256 + c->lui(t1, -2); // lui t1, -2 + c->mov64(t4, a1); // or t4, a1, r0 + c->lqc2(vf10, 12688, at); // lqc2 vf10, 12688(at) + c->ori(a1, t1, 65534); // ori a1, t1, 65534 + c->lqc2(vf11, 12704, at); // lqc2 vf11, 12704(at) + c->pextlw(a1, a1, a1); // pextlw a1, a1, a1 + c->lqc2(vf12, 12720, at); // lqc2 vf12, 12720(at) + c->pextlw(t1, a0, a0); // pextlw t1, a0, a0 + c->lqc2(vf15, 12752, at); // lqc2 vf15, 12752(at) + c->pextlw(a0, a1, a1); // pextlw a0, a1, a1 + c->lqc2(vf14, 12736, at); // lqc2 vf14, 12736(at) + c->pextlw(a1, t1, t1); // pextlw a1, t1, t1 + c->lqc2(vf16, 12768, at); // lqc2 vf16, 12768(at) + c->pcpyh(a3, a3); // pcpyh a3, a3 + c->lqc2(vf13, 12784, at); // lqc2 vf13, 12784(at) + c->pcpyh(t1, a2); // pcpyh t1, a2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcpyld(a2, a3, a3); // pcpyld a2, a3, a3 + c->lqc2(vf9, 12144, at); // lqc2 vf9, 12144(at) + c->pcpyld(a3, t1, t1); // pcpyld a3, t1, t1 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->ldr(t1, 0, t0); // ldr t1, 0(t0) + // nop // sll r0, r0, 0 + c->ldl(t1, 7, t0); // ldl t1, 7(t0) + // nop // sll r0, r0, 0 + c->daddiu(t0, t0, 8); // daddiu t0, t0, 8 + c->pextlh(t1, r0, t1); // pextlh t1, r0, t1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pand(t5, t1, a2); // pand t5, t1, a2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->psllw(t5, t5, 5); // psllw t5, t5, 5 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->paddw(s5, t5, a1); // paddw s5, t5, a1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->dsrl32(t9, s5, 0); // dsrl32 t9, s5, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcpyud(s4, s5, r0); // pcpyud s4, s5, r0 + c->lq(t6, 0, s5); // lq t6, 0(s5) + c->dsrl32(ra, s4, 0); // dsrl32 ra, s4, 0 + c->lq(t7, 0, t9); // lq t7, 0(t9) + c->pand(t8, t1, a3); // pand t8, t1, a3 + c->lq(t5, 0, s4); // lq t5, 0(s4) + c->psraw(gp, t8, 8); // psraw gp, t8, 8 + c->lq(t8, 0, ra); // lq t8, 0(ra) + c->pextuw(s3, t7, t6); // pextuw s3, t7, t6 + c->lq(s5, 16, s5); // lq s5, 16(s5) + c->pextuw(s2, t8, t5); // pextuw s2, t8, t5 + c->lq(t9, 16, t9); // lq t9, 16(t9) + c->pcpyud(s3, s3, s2); // pcpyud s3, s3, s2 + c->lq(s4, 16, s4); // lq s4, 16(s4) + c->pand(s3, s3, a0); // pand s3, s3, a0 + c->lq(ra, 16, ra); // lq ra, 16(ra) + c->por(s3, s3, gp); // por s3, s3, gp + c->mov128_vf_gpr(vf1, s5); // qmtc2.ni vf1, s5 + c->pextub(gp, r0, s5); // pextub gp, r0, s5 + c->sq(s3, 0, t2); // sq s3, 0(t2) + c->pextub(s5, r0, t9); // pextub s5, r0, t9 + c->mov128_vf_gpr(vf2, t9); // qmtc2.ni vf2, t9 + c->pextub(t9, r0, s4); // pextub t9, r0, s4 + c->mov128_vf_gpr(vf3, s4); // qmtc2.ni vf3, s4 + c->pextub(s4, r0, ra); // pextub s4, r0, ra + c->mov128_vf_gpr(vf4, ra); // qmtc2.ni vf4, ra + c->pextuh(ra, r0, gp); // pextuh ra, r0, gp + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextuh(gp, r0, s5); // pextuh gp, r0, s5 + c->mov128_vf_gpr(vf5, ra); // qmtc2.ni vf5, ra + c->pextuh(t9, r0, t9); // pextuh t9, r0, t9 + c->mov128_vf_gpr(vf6, gp); // qmtc2.ni vf6, gp + c->pextuh(ra, r0, s4); // pextuh ra, r0, s4 + c->mov128_vf_gpr(vf7, t9); // qmtc2.ni vf7, t9 + c->prot3w(t8, t8); // prot3w t8, t8 + c->mov128_vf_gpr(vf8, ra); // qmtc2.ni vf8, ra + c->prot3w(t7, t7); // prot3w t7, t7 + // Unknown instr: vcallms 0 + vcallms0(c); + c->pextuw(t9, t7, t6); // pextuw t9, t7, t6 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcpyld(t7, t5, t7); // pcpyld t7, t5, t7 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcpyld(t6, t9, t6); // pcpyld t6, t9, t6 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->daddiu(t2, t2, 16); // daddiu t2, t2, 16 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextuw(t5, t8, t5); // pextuw t5, t8, t5 + c->sq(t7, 16, t3); // sq t7, 16(t3) + c->pcpyld(t5, t8, t5); // pcpyld t5, t8, t5 + c->sq(t6, 0, t3); // sq t6, 0(t3) + // nop // sll r0, r0, 0 + c->sq(t5, 32, t3); // sq t5, 32(t3) + c->daddiu(t3, t3, 48); // daddiu t3, t3, 48 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->daddiu(t4, t4, -4); // daddiu t4, t4, -4 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + bc = ((s64)c->sgpr64(t4)) <= 0; // blez t4, L91 + c->mfc1(r0, f31); // mfc1 r0, f31 + if (bc) {goto block_2;} // branch non-likely + + + block_1: + // nop // sll r0, r0, 0 + c->ldr(t1, 0, t0); // ldr t1, 0(t0) + // nop // sll r0, r0, 0 + c->ldl(t1, 7, t0); // ldl t1, 7(t0) + // nop // sll r0, r0, 0 + c->daddiu(t0, t0, 8); // daddiu t0, t0, 8 + c->pextlh(t1, r0, t1); // pextlh t1, r0, t1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pand(t5, t1, a2); // pand t5, t1, a2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->psllw(t5, t5, 5); // psllw t5, t5, 5 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->paddw(s5, t5, a1); // paddw s5, t5, a1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->dsrl32(t9, s5, 0); // dsrl32 t9, s5, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcpyud(s4, s5, r0); // pcpyud s4, s5, r0 + c->lq(t6, 0, s5); // lq t6, 0(s5) + c->dsrl32(ra, s4, 0); // dsrl32 ra, s4, 0 + c->lq(t7, 0, t9); // lq t7, 0(t9) + c->pand(t8, t1, a3); // pand t8, t1, a3 + c->lq(t5, 0, s4); // lq t5, 0(s4) + c->psraw(gp, t8, 8); // psraw gp, t8, 8 + c->lq(t8, 0, ra); // lq t8, 0(ra) + c->pextuw(s3, t7, t6); // pextuw s3, t7, t6 + c->lq(s5, 16, s5); // lq s5, 16(s5) + c->pextuw(s2, t8, t5); // pextuw s2, t8, t5 + c->lq(t9, 16, t9); // lq t9, 16(t9) + c->pcpyud(s3, s3, s2); // pcpyud s3, s3, s2 + c->lq(s4, 16, s4); // lq s4, 16(s4) + c->pand(s3, s3, a0); // pand s3, s3, a0 + c->lq(ra, 16, ra); // lq ra, 16(ra) + c->por(s3, s3, gp); // por s3, s3, gp + c->mov128_vf_gpr(vf1, s5); // qmtc2.ni vf1, s5 + c->pextub(gp, r0, s5); // pextub gp, r0, s5 + c->sq(s3, 0, t2); // sq s3, 0(t2) + c->pextub(s5, r0, t9); // pextub s5, r0, t9 + c->mov128_vf_gpr(vf2, t9); // qmtc2.ni vf2, t9 + c->pextub(t9, r0, s4); // pextub t9, r0, s4 + c->mov128_vf_gpr(vf3, s4); // qmtc2.ni vf3, s4 + c->pextub(s4, r0, ra); // pextub s4, r0, ra + c->mov128_vf_gpr(vf4, ra); // qmtc2.ni vf4, ra + c->pextuh(ra, r0, gp); // pextuh ra, r0, gp + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextuh(gp, r0, s5); // pextuh gp, r0, s5 + c->mov128_vf_gpr(vf5, ra); // qmtc2.ni vf5, ra + c->pextuh(t9, r0, t9); // pextuh t9, r0, t9 + c->mov128_vf_gpr(vf6, gp); // qmtc2.ni vf6, gp + c->pextuh(ra, r0, s4); // pextuh ra, r0, s4 + c->mov128_vf_gpr(vf7, t9); // qmtc2.ni vf7, t9 + c->prot3w(t8, t8); // prot3w t8, t8 + c->mov128_vf_gpr(vf8, ra); // qmtc2.ni vf8, ra + c->prot3w(t7, t7); // prot3w t7, t7 + // Unknown instr: vcallms 0 + vcallms0(c); + c->pextuw(t9, t7, t6); // pextuw t9, t7, t6 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcpyld(t7, t5, t7); // pcpyld t7, t5, t7 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcpyld(t6, t9, t6); // pcpyld t6, t9, t6 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextuw(t5, t8, t5); // pextuw t5, t8, t5 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcpyld(t5, t8, t5); // pcpyld t5, t8, t5 + c->sq(t6, 0, t3); // sq t6, 0(t3) + // nop // sll r0, r0, 0 + c->sq(t7, 16, t3); // sq t7, 16(t3) + // nop // sll r0, r0, 0 + c->sq(t5, 32, t3); // sq t5, 32(t3) + c->daddiu(t2, t2, 16); // daddiu t2, t2, 16 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->daddiu(t3, t3, 48); // daddiu t3, t3, 48 + c->mov128_gpr_vf(t7, vf21); // qmfc2.ni t7, vf21 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t8, vf22); // qmfc2.ni t8, vf22 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t5, vf23); // qmfc2.ni t5, vf23 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t6, vf24); // qmfc2.ni t6, vf24 + c->ppach(t7, t8, t7); // ppach t7, t8, t7 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->ppach(t5, t6, t5); // ppach t5, t6, t5 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->ppacb(t5, t5, t7); // ppacb t5, t5, t7 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->sq(t5, 0, v1); // sq t5, 0(v1) + c->daddiu(t4, t4, -4); // daddiu t4, t4, -4 + c->daddiu(v1, v1, 16); // daddiu v1, v1, 16 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + bc = ((s64)c->sgpr64(t4)) > 0; // bgtz t4, L90 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + + block_2: + // nop // sll r0, r0, 0 + // nop // vnop + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(a2, vf17); // qmfc2.ni a2, vf17 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(a3, vf18); // qmfc2.ni a3, vf18 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(a0, vf19); // qmfc2.ni a0, vf19 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(a1, vf20); // qmfc2.ni a1, vf20 + c->ppach(a2, a3, a2); // ppach a2, a3, a2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->ppach(a0, a1, a0); // ppach a0, a1, a0 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->ppacb(a0, a0, a2); // ppacb a0, a0, a2 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->sq(a0, 0, v1); // sq a0, 0(v1) + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + c->ld(ra, 12432, at); // ld ra, 12432(at) + c->lq(gp, 12512, at); // lq gp, 12512(at) + c->lq(s5, 12496, at); // lq s5, 12496(at) + c->lq(s4, 12480, at); // lq s4, 12480(at) + c->lq(s3, 12464, at); // lq s3, 12464(at) + c->lq(s2, 12448, at); // lq s2, 12448(at) + //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 + // 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-light-proc", execute, 128); +} + +} // namespace generic_light_proc +} // namespace Mips2C +// add generic_light_proc::link to the link callback table for the object file. +// FWD DEC: + +//--------------------------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_envmap_proc { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* +} cache; + + +void vcallms48(ExecutionContext* c) { + // nop | mulx.xyzw vf13, vf09, vf31 + c->vfs[vf13].vf.mul(Mask::xyzw, c->vf_src(vf09).vf, c->vf_src(vf31).vf.x()); + // nop | subw.z vf21, vf21, vf00 + c->vfs[vf21].vf.sub(Mask::z, c->vf_src(vf21).vf, c->vf_src(vf00).vf.w()); + // nop | addy.x vf29, vf29, vf29 + c->vfs[vf29].vf.add(Mask::x, c->vf_src(vf29).vf, c->vf_src(vf29).vf.y()); + // nop | mulx.xyz vf08, vf08, vf30 + c->vfs[vf08].vf.mul(Mask::xyz, c->vf_src(vf08).vf, c->vf_src(vf30).vf.x()); + // nop | addw.xy vf05, vf05, vf31 + c->vfs[vf05].vf.add(Mask::xy, c->vf_src(vf05).vf, c->vf_src(vf31).vf.w()); + // nop | mul.xyz vf30, vf21, vf13 + c->vfs[vf30].vf.mul(Mask::xyz, c->vf_src(vf21).vf, c->vf_src(vf13).vf); + // nop | addz.x vf29, vf29, vf29 + c->vfs[vf29].vf.add(Mask::x, c->vf_src(vf29).vf, c->vf_src(vf29).vf.z()); + // nop | add.xyz vf08, vf08, vf16 + c->vfs[vf08].vf.add(Mask::xyz, c->vf_src(vf08).vf, c->vf_src(vf16).vf); + // move.xyzw vf28, vf27 | ftoi12.xy vf17, vf05 + c->vfs[vf17].vf.ftoi12(Mask::xy, c->vf_src(vf05).vf); c->vfs[vf28].vf.move(Mask::xyzw, c->vf_src(vf27).vf); + // move.xyzw vf02, vf22 | addy.x vf30, vf30, vf30 + c->vfs[vf30].vf.add(Mask::x, c->vf_src(vf30).vf, c->vf_src(vf30).vf.y()); c->vfs[vf02].vf.move(Mask::xyzw, c->vf_src(vf22).vf); + // rsqrt Q, vf31.z, vf29.x | mul.xyz vf06, vf06, Q + c->vfs[vf06].vf.mul(Mask::xyz, c->vf_src(vf06).vf, c->Q); c->Q = c->vf_src(vf31).vf.z() / std::sqrt(c->vf_src(vf29).vf.x()); + // nop | mul.xyz vf29, vf08, vf08 + c->vfs[vf29].vf.mul(Mask::xyz, c->vf_src(vf08).vf, c->vf_src(vf08).vf); + // nop | mulx.xyz vf01, vf21, vf28 + c->vfs[vf01].vf.mul(Mask::xyz, c->vf_src(vf21).vf, c->vf_src(vf28).vf.x()); + // nop | addz.x vf30, vf30, vf30 + c->vfs[vf30].vf.add(Mask::x, c->vf_src(vf30).vf, c->vf_src(vf30).vf.z()); + // nop | mulx.xyzw vf14, vf10, vf31 + c->vfs[vf14].vf.mul(Mask::xyzw, c->vf_src(vf10).vf, c->vf_src(vf31).vf.x()); + // nop | subw.z vf02, vf02, vf00 + c->vfs[vf02].vf.sub(Mask::z, c->vf_src(vf02).vf, c->vf_src(vf00).vf.w()); + // nop | addy.x vf29, vf29, vf29 + c->vfs[vf29].vf.add(Mask::x, c->vf_src(vf29).vf, c->vf_src(vf29).vf.y()); + // nop | mulx.xyz vf01, vf01, vf30 + c->vfs[vf01].vf.mul(Mask::xyz, c->vf_src(vf01).vf, c->vf_src(vf30).vf.x()); + // nop | addw.xy vf06, vf06, vf31 + c->vfs[vf06].vf.add(Mask::xy, c->vf_src(vf06).vf, c->vf_src(vf31).vf.w()); + // nop | mul.xyz vf30, vf02, vf14 + c->vfs[vf30].vf.mul(Mask::xyz, c->vf_src(vf02).vf, c->vf_src(vf14).vf); + // nop | addz.x vf29, vf29, vf29 + c->vfs[vf29].vf.add(Mask::x, c->vf_src(vf29).vf, c->vf_src(vf29).vf.z()); + // nop | add.xyz vf01, vf01, vf13 + c->vfs[vf01].vf.add(Mask::xyz, c->vf_src(vf01).vf, c->vf_src(vf13).vf); + // nop | ftoi12.xy vf18, vf06 + c->vfs[vf18].vf.ftoi12(Mask::xy, c->vf_src(vf06).vf); + // nop | addy.x vf30, vf30, vf30 + c->vfs[vf30].vf.add(Mask::x, c->vf_src(vf30).vf, c->vf_src(vf30).vf.y()); + // rsqrt Q, vf31.z, vf29.x | mul.xyz vf07, vf07, Q + c->vfs[vf07].vf.mul(Mask::xyz, c->vf_src(vf07).vf, c->Q); c->Q = c->vf_src(vf31).vf.z() / std::sqrt(c->vf_src(vf29).vf.x()); + // move.xyzw vf03, vf23 | mul.xyz vf29, vf01, vf01 + c->vfs[vf29].vf.mul(Mask::xyz, c->vf_src(vf01).vf, c->vf_src(vf01).vf); c->vfs[vf03].vf.move(Mask::xyzw, c->vf_src(vf23).vf); + // nop | muly.xyz vf02, vf02, vf28 + c->vfs[vf02].vf.mul(Mask::xyz, c->vf_src(vf02).vf, c->vf_src(vf28).vf.y()); + // nop | addz.x vf30, vf30, vf30 + c->vfs[vf30].vf.add(Mask::x, c->vf_src(vf30).vf, c->vf_src(vf30).vf.z()); + // nop | mulx.xyzw vf15, vf11, vf31 + c->vfs[vf15].vf.mul(Mask::xyzw, c->vf_src(vf11).vf, c->vf_src(vf31).vf.x()); + // nop | subw.z vf03, vf03, vf00 + c->vfs[vf03].vf.sub(Mask::z, c->vf_src(vf03).vf, c->vf_src(vf00).vf.w()); + // nop | addy.x vf29, vf29, vf29 + c->vfs[vf29].vf.add(Mask::x, c->vf_src(vf29).vf, c->vf_src(vf29).vf.y()); + // nop | mulx.xyz vf02, vf02, vf30 + c->vfs[vf02].vf.mul(Mask::xyz, c->vf_src(vf02).vf, c->vf_src(vf30).vf.x()); + // nop | addw.xy vf07, vf07, vf31 + c->vfs[vf07].vf.add(Mask::xy, c->vf_src(vf07).vf, c->vf_src(vf31).vf.w()); + // nop | mul.xyz vf30, vf03, vf15 + c->vfs[vf30].vf.mul(Mask::xyz, c->vf_src(vf03).vf, c->vf_src(vf15).vf); + // nop | addz.x vf29, vf29, vf29 + c->vfs[vf29].vf.add(Mask::x, c->vf_src(vf29).vf, c->vf_src(vf29).vf.z()); + // nop | add.xyz vf02, vf02, vf14 + c->vfs[vf02].vf.add(Mask::xyz, c->vf_src(vf02).vf, c->vf_src(vf14).vf); + // nop | ftoi12.xy vf19, vf07 + c->vfs[vf19].vf.ftoi12(Mask::xy, c->vf_src(vf07).vf); + // nop | addy.x vf30, vf30, vf30 + c->vfs[vf30].vf.add(Mask::x, c->vf_src(vf30).vf, c->vf_src(vf30).vf.y()); + // rsqrt Q, vf31.z, vf29.x | mul.xyz vf08, vf08, Q + c->vfs[vf08].vf.mul(Mask::xyz, c->vf_src(vf08).vf, c->Q); c->Q = c->vf_src(vf31).vf.z() / std::sqrt(c->vf_src(vf29).vf.x()); + // move.xyzw vf04, vf24 | mul.xyz vf29, vf02, vf02 + c->vfs[vf29].vf.mul(Mask::xyz, c->vf_src(vf02).vf, c->vf_src(vf02).vf); c->vfs[vf04].vf.move(Mask::xyzw, c->vf_src(vf24).vf); + // nop | mulz.xyz vf03, vf03, vf28 + c->vfs[vf03].vf.mul(Mask::xyz, c->vf_src(vf03).vf, c->vf_src(vf28).vf.z()); + // nop | addz.x vf30, vf30, vf30 + c->vfs[vf30].vf.add(Mask::x, c->vf_src(vf30).vf, c->vf_src(vf30).vf.z()); + // nop | mulx.xyzw vf16, vf12, vf31 + c->vfs[vf16].vf.mul(Mask::xyzw, c->vf_src(vf12).vf, c->vf_src(vf31).vf.x()); + // nop | subw.z vf04, vf04, vf00 + c->vfs[vf04].vf.sub(Mask::z, c->vf_src(vf04).vf, c->vf_src(vf00).vf.w()); + // nop | addy.x vf29, vf29, vf29 + c->vfs[vf29].vf.add(Mask::x, c->vf_src(vf29).vf, c->vf_src(vf29).vf.y()); + // nop | mulx.xyz vf03, vf03, vf30 + c->vfs[vf03].vf.mul(Mask::xyz, c->vf_src(vf03).vf, c->vf_src(vf30).vf.x()); + // nop | addw.xy vf08, vf08, vf31 + c->vfs[vf08].vf.add(Mask::xy, c->vf_src(vf08).vf, c->vf_src(vf31).vf.w()); + // nop | mul.xyz vf30, vf04, vf16 + c->vfs[vf30].vf.mul(Mask::xyz, c->vf_src(vf04).vf, c->vf_src(vf16).vf); + // nop | addz.x vf29, vf29, vf29 + c->vfs[vf29].vf.add(Mask::x, c->vf_src(vf29).vf, c->vf_src(vf29).vf.z()); + // nop | add.xyz vf03, vf03, vf15 + c->vfs[vf03].vf.add(Mask::xyz, c->vf_src(vf03).vf, c->vf_src(vf15).vf); + // nop | ftoi12.xy vf20, vf08 + c->vfs[vf20].vf.ftoi12(Mask::xy, c->vf_src(vf08).vf); + // nop | addy.x vf30, vf30, vf30 + c->vfs[vf30].vf.add(Mask::x, c->vf_src(vf30).vf, c->vf_src(vf30).vf.y()); + // rsqrt Q, vf31.z, vf29.x | mul.xyz vf05, vf01, Q + c->vfs[vf05].vf.mul(Mask::xyz, c->vf_src(vf01).vf, c->Q); c->Q = c->vf_src(vf31).vf.z() / std::sqrt(c->vf_src(vf29).vf.x()); + // move.xyzw vf06, vf02 | mul.xyz vf29, vf03, vf03 + c->vfs[vf29].vf.mul(Mask::xyz, c->vf_src(vf03).vf, c->vf_src(vf03).vf); c->vfs[vf06].vf.move(Mask::xyzw, c->vf_src(vf02).vf); + // move.xyzw vf07, vf03 | mulw.xyz vf08, vf04, vf28 :e + c->vfs[vf08].vf.mul(Mask::xyz, c->vf_src(vf04).vf, c->vf_src(vf28).vf.w()); c->vfs[vf07].vf.move(Mask::xyzw, c->vf_src(vf03).vf); + // nop | addz.x vf30, vf30, vf30 + c->vfs[vf30].vf.add(Mask::x, c->vf_src(vf30).vf, c->vf_src(vf30).vf.z()); + +} + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + c->daddiu(sp, sp, -128); // daddiu sp, sp, -128 + c->sd(ra, 12432, at); // sd ra, 12432(at) + c->sq(s0, 12448, at); // sq s0, 12448(at) + c->sq(s1, 12464, at); // sq s1, 12464(at) + c->sq(s2, 12480, at); // sq s2, 12480(at) + c->sq(s3, 12496, at); // sq s3, 12496(at) + c->sq(s4, 12512, at); // sq s4, 12512(at) + c->sq(s5, 12528, at); // sq s5, 12528(at) + c->sq(gp, 12544, at); // sq gp, 12544(at) + get_fake_spad_addr2(at, cache.fake_scratchpad_data, 0, c);// lui at, 28672 + // nop // sll r0, r0, 0 + c->lw(v1, 44, at); // lw v1, 44(at) + // nop // sll r0, r0, 0 + c->lw(a0, 36, at); // lw a0, 36(at) + // nop // sll r0, r0, 0 + c->lw(t0, 0, v1); // lw t0, 0(v1) + // nop // sll r0, r0, 0 + c->lw(a2, 4, v1); // lw a2, 4(v1) + // nop // sll r0, r0, 0 + c->lw(t3, 16, at); // lw t3, 16(at) + // nop // sll r0, r0, 0 + c->lw(v1, 20, at); // lw v1, 20(at) + // nop // sll r0, r0, 0 + c->addiu(t1, r0, 255); // addiu t1, r0, 255 + c->addiu(a3, r0, 256); // addiu a3, r0, 256 + c->lui(a1, -2); // lui a1, -2 + c->lui(t2, 16256); // lui t2, 16256 + c->ori(a1, a1, 65534); // ori a1, a1, 65534 + c->mtc1(f0, t2); // mtc1 f0, t2 + c->daddiu(t2, a0, 3); // daddiu t2, a0, 3 + c->sra(t5, t2, 2); // sra t5, t2, 2 + c->lq(t2, 12048, at); // lq t2, 12048(at) + c->sra(t4, t5, 2); // sra t4, t5, 2 + c->andi(t5, t5, 3); // andi t5, t5, 3 + bc = c->sgpr64(t4) == 0; // beq t4, r0, L85 + // nop // sll r0, r0, 0 + if (bc) {goto block_2;} // branch non-likely + + + block_1: + c->daddiu(t3, t3, 64); // daddiu t3, t3, 64 + c->sq(t2, -64, t3); // sq t2, -64(t3) + // nop // sll r0, r0, 0 + c->sq(t2, -48, t3); // sq t2, -48(t3) + c->daddiu(t4, t4, -1); // daddiu t4, t4, -1 + c->sq(t2, -32, t3); // sq t2, -32(t3) + bc = ((s64)c->sgpr64(t4)) > 0; // bgtz t4, L84 + c->sq(t2, -16, t3); // sq t2, -16(t3) + if (bc) {goto block_1;} // branch non-likely + + + block_2: + bc = c->sgpr64(t5) == 0; // beq t5, r0, L86 + c->daddiu(t4, t5, -1); // daddiu t4, t5, -1 + if (bc) {goto block_6;} // branch non-likely + + bc = c->sgpr64(t4) == 0; // beq t4, r0, L86 + c->sq(t2, 0, t3); // sq t2, 0(t3) + if (bc) {goto block_6;} // branch non-likely + + c->daddiu(t3, t3, 16); // daddiu t3, t3, 16 + c->daddiu(t4, t4, -1); // daddiu t4, t4, -1 + bc = c->sgpr64(t4) == 0; // beq t4, r0, L86 + c->sq(t2, 0, t3); // sq t2, 0(t3) + if (bc) {goto block_6;} // branch non-likely + + c->daddiu(t3, t3, 16); // daddiu t3, t3, 16 + c->daddiu(t4, t4, -1); // daddiu t4, t4, -1 + // nop // sll r0, r0, 0 + c->sq(t2, 0, t3); // sq t2, 0(t3) + + block_6: + c->daddiu(a0, a0, -4); // daddiu a0, a0, -4 + c->lqc2(vf31, 12016, at); // lqc2 vf31, 12016(at) + c->pextlw(a1, a1, a1); // pextlw a1, a1, a1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextlw(a1, a1, a1); // pextlw a1, a1, a1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextlw(a2, a2, a2); // pextlw a2, a2, a2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextlw(a2, a2, a2); // pextlw a2, a2, a2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcpyh(t2, t1); // pcpyh t2, t1 + c->ld(t1, 0, t0); // ld t1, 0(t0) + c->pcpyld(t2, t2, t2); // pcpyld t2, t2, t2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcpyh(a3, a3); // pcpyh a3, a3 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcpyld(a3, a3, a3); // pcpyld a3, a3, a3 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->daddiu(t0, t0, 8); // daddiu t0, t0, 8 + c->sq(t2, 96, at); // sq t2, 96(at) + c->pextlh(t1, r0, t1); // pextlh t1, r0, t1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pand(t2, t1, t2); // pand t2, t1, t2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->psllw(t2, t2, 5); // psllw t2, t2, 5 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->paddw(t5, t2, a2); // paddw t5, t2, a2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->dsrl32(t6, t5, 0); // dsrl32 t6, t5, 0 + c->lwc1(f4, 24, t5); // lwc1 f4, 24(t5) + c->pcpyud(t7, t5, r0); // pcpyud t7, t5, r0 + c->lwc1(f3, 24, t6); // lwc1 f3, 24(t6) + c->dsrl32(t8, t7, 0); // dsrl32 t8, t7, 0 + c->lwc1(f2, 24, t7); // lwc1 f2, 24(t7) + c->pand(t1, t1, a3); // pand t1, t1, a3 + c->lwc1(f1, 24, t8); // lwc1 f1, 24(t8) + c->psraw(t2, t1, 8); // psraw t2, t1, 8 + c->lq(t1, 16, t5); // lq t1, 16(t5) + c->mov128_gpr_gpr(s0, t2); // por s0, t2, r0 + c->subs(f4, f4, f0); // sub.s f4, f4, f0 + c->divs(f4, f0, f4); // div.s f4, f0, f4 + c->lq(t2, 16, t6); // lq t2, 16(t6) + // nop // sll r0, r0, 0 + c->lq(t3, 16, t7); // lq t3, 16(t7) + // nop // sll r0, r0, 0 + c->lq(t4, 16, t8); // lq t4, 16(t8) + // nop // sll r0, r0, 0 + c->lq(t5, 0, t5); // lq t5, 0(t5) + // nop // sll r0, r0, 0 + c->lq(t6, 0, t6); // lq t6, 0(t6) + // nop // sll r0, r0, 0 + c->lq(t7, 0, t7); // lq t7, 0(t7) + // nop // sll r0, r0, 0 + c->lq(t8, 0, t8); // lq t8, 0(t8) + c->muls(f4, f4, f0); // mul.s f4, f4, f0 + // nop // sll r0, r0, 0 + c->subs(f3, f3, f0); // sub.s f3, f3, f0 + // nop // sll r0, r0, 0 + c->divs(f3, f0, f3); // div.s f3, f0, f3 + // 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->mfc1(t9, f4); // mfc1 t9, f4 + // 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->muls(f3, f3, f0); // mul.s f3, f3, f0 + // nop // sll r0, r0, 0 + c->subs(f2, f2, f0); // sub.s f2, f2, f0 + // nop // sll r0, r0, 0 + c->divs(f2, f0, f2); // div.s f2, f0, f2 + // 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->mfc1(ra, f3); // mfc1 ra, f3 + // 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->muls(f2, f2, f0); // mul.s f2, f2, f0 + // nop // sll r0, r0, 0 + c->subs(f1, f1, f0); // sub.s f1, f1, f0 + // nop // sll r0, r0, 0 + c->divs(f1, f0, f1); // div.s f1, f0, f1 + // nop // sll r0, r0, 0 + c->pextlw(t9, ra, t9); // pextlw t9, ra, t9 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->mfc1(ra, f2); // mfc1 ra, f2 + // 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->mfc1(gp, f1); // mfc1 gp, f1 + // 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->pextlw(ra, gp, ra); // pextlw ra, gp, ra + // nop // sll r0, r0, 0 + c->pcpyld(t9, ra, t9); // pcpyld t9, ra, t9 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf21, t1); // qmtc2.ni vf21, t1 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf22, t2); // qmtc2.ni vf22, t2 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf23, t3); // qmtc2.ni vf23, t3 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf24, t4); // qmtc2.ni vf24, t4 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf9, t5); // qmtc2.ni vf9, t5 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf10, t6); // qmtc2.ni vf10, t6 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf11, t7); // qmtc2.ni vf11, t7 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf12, t8); // qmtc2.ni vf12, t8 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf27, t9); // qmtc2.ni vf27, t9 + c->lq(t2, 96, at); // lq t2, 96(at) + // Unknown instr: vcallms 48 + vcallms48(c); + // nop // sll r0, r0, 0 + c->ld(t1, 0, t0); // ld t1, 0(t0) + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->daddiu(t0, t0, 8); // daddiu t0, t0, 8 + c->pextlh(t1, r0, t1); // pextlh t1, r0, t1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pand(t2, t1, t2); // pand t2, t1, t2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->psllw(t2, t2, 5); // psllw t2, t2, 5 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->paddw(t5, t2, a2); // paddw t5, t2, a2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->dsrl32(t6, t5, 0); // dsrl32 t6, t5, 0 + c->lwc1(f3, 24, t5); // lwc1 f3, 24(t5) + c->pcpyud(t7, t5, r0); // pcpyud t7, t5, r0 + c->lwc1(f2, 24, t6); // lwc1 f2, 24(t6) + c->dsrl32(t8, t7, 0); // dsrl32 t8, t7, 0 + c->lwc1(f1, 24, t7); // lwc1 f1, 24(t7) + c->pand(t1, t1, a3); // pand t1, t1, a3 + c->lwc1(f4, 24, t8); // lwc1 f4, 24(t8) + c->psraw(t2, t1, 8); // psraw t2, t1, 8 + c->lq(t1, 16, t5); // lq t1, 16(t5) + c->mov128_gpr_gpr(s1, t2); // por s1, t2, r0 + c->subs(f5, f3, f0); // sub.s f5, f3, f0 + c->subs(f3, f2, f0); // sub.s f3, f2, f0 + // nop // sll r0, r0, 0 + c->subs(f2, f1, f0); // sub.s f2, f1, f0 + // nop // sll r0, r0, 0 + c->subs(f1, f4, f0); // sub.s f1, f4, f0 + // nop // sll r0, r0, 0 + c->divs(f4, f0, f5); // div.s f4, f0, f5 + c->lq(t2, 16, t6); // lq t2, 16(t6) + // nop // sll r0, r0, 0 + c->lq(t3, 16, t7); // lq t3, 16(t7) + // nop // sll r0, r0, 0 + c->lq(t4, 16, t8); // lq t4, 16(t8) + // nop // sll r0, r0, 0 + c->lq(t5, 0, t5); // lq t5, 0(t5) + // nop // sll r0, r0, 0 + c->lq(t6, 0, t6); // lq t6, 0(t6) + // nop // sll r0, r0, 0 + c->lq(t7, 0, t7); // lq t7, 0(t7) + // nop // sll r0, r0, 0 + c->lq(t8, 0, t8); // lq t8, 0(t8) + c->muls(f4, f4, f0); // mul.s f4, f4, f0 + // nop // sll r0, r0, 0 + c->divs(f3, f0, f3); // div.s f3, f0, f3 + // 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->mfc1(t9, f4); // mfc1 t9, f4 + // 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->muls(f3, f3, f0); // mul.s f3, f3, f0 + // nop // sll r0, r0, 0 + c->divs(f2, f0, f2); // div.s f2, f0, f2 + // 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->mfc1(ra, f3); // mfc1 ra, f3 + // 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->muls(f2, f2, f0); // mul.s f2, f2, f0 + // nop // sll r0, r0, 0 + c->divs(f1, f0, f1); // div.s f1, f0, f1 + // nop // sll r0, r0, 0 + c->pextlw(t9, ra, t9); // pextlw t9, ra, t9 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->mfc1(ra, f2); // mfc1 ra, f2 + // 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->mfc1(gp, f1); // mfc1 gp, f1 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf21, t1); // qmtc2.ni vf21, t1 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf9, t5); // qmtc2.ni vf9, t5 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf10, t6); // qmtc2.ni vf10, t6 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf11, t7); // qmtc2.ni vf11, t7 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf12, t8); // qmtc2.ni vf12, t8 + c->pextlw(t1, gp, ra); // pextlw t1, gp, ra + // nop // sll r0, r0, 0 + c->pcpyld(t1, t1, t9); // pcpyld t1, t1, t9 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf22, t2); // qmtc2.ni vf22, t2 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf23, t3); // qmtc2.ni vf23, t3 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf24, t4); // qmtc2.ni vf24, t4 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf27, t1); // qmtc2.ni vf27, t1 + c->lq(t2, 96, at); // lq t2, 96(at) + // Unknown instr: vcallms 48 + vcallms48(c); + // nop // sll r0, r0, 0 + c->ld(t1, 0, t0); // ld t1, 0(t0) + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->daddiu(t0, t0, 8); // daddiu t0, t0, 8 + c->pextlh(t1, r0, t1); // pextlh t1, r0, t1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pand(t2, t1, t2); // pand t2, t1, t2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->psllw(t2, t2, 5); // psllw t2, t2, 5 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->paddw(t2, t2, a2); // paddw t2, t2, a2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->dsrl32(t3, t2, 0); // dsrl32 t3, t2, 0 + c->lwc1(f3, 24, t2); // lwc1 f3, 24(t2) + c->pcpyud(t7, t2, r0); // pcpyud t7, t2, r0 + c->lwc1(f2, 24, t3); // lwc1 f2, 24(t3) + c->dsrl32(t8, t7, 0); // dsrl32 t8, t7, 0 + c->lwc1(f1, 24, t7); // lwc1 f1, 24(t7) + c->pand(t1, t1, a3); // pand t1, t1, a3 + c->lwc1(f4, 24, t8); // lwc1 f4, 24(t8) + c->psraw(t4, t1, 8); // psraw t4, t1, 8 + c->lq(t1, 16, t2); // lq t1, 16(t2) + c->mov128_gpr_gpr(s2, t4); // por s2, t4, r0 + c->subs(f5, f3, f0); // sub.s f5, f3, f0 + c->subs(f3, f2, f0); // sub.s f3, f2, f0 + // nop // sll r0, r0, 0 + c->subs(f2, f1, f0); // sub.s f2, f1, f0 + // nop // sll r0, r0, 0 + c->subs(f1, f4, f0); // sub.s f1, f4, f0 + // nop // sll r0, r0, 0 + c->divs(f4, f0, f5); // div.s f4, f0, f5 + c->lq(t4, 16, t3); // lq t4, 16(t3) + // nop // sll r0, r0, 0 + c->lq(t5, 16, t7); // lq t5, 16(t7) + // nop // sll r0, r0, 0 + c->lq(t6, 16, t8); // lq t6, 16(t8) + // nop // sll r0, r0, 0 + c->lq(t2, 0, t2); // lq t2, 0(t2) + // nop // sll r0, r0, 0 + c->lq(t3, 0, t3); // lq t3, 0(t3) + // nop // sll r0, r0, 0 + c->lq(t7, 0, t7); // lq t7, 0(t7) + // nop // sll r0, r0, 0 + c->lq(t8, 0, t8); // lq t8, 0(t8) + c->muls(f4, f4, f0); // mul.s f4, f4, f0 + // nop // sll r0, r0, 0 + c->divs(f3, f0, f3); // div.s f3, f0, f3 + // 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->mfc1(t9, f4); // mfc1 t9, f4 + // 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->muls(f3, f3, f0); // mul.s f3, f3, f0 + // nop // sll r0, r0, 0 + c->divs(f2, f0, f2); // div.s f2, f0, f2 + // 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->mfc1(ra, f3); // mfc1 ra, f3 + // 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->muls(f2, f2, f0); // mul.s f2, f2, f0 + // nop // sll r0, r0, 0 + c->divs(f1, f0, f1); // div.s f1, f0, f1 + // nop // sll r0, r0, 0 + c->pextlw(t9, ra, t9); // pextlw t9, ra, t9 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->mfc1(ra, f2); // mfc1 ra, f2 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf21, t1); // qmtc2.ni vf21, t1 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf22, t4); // qmtc2.ni vf22, t4 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf23, t5); // qmtc2.ni vf23, t5 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf24, t6); // qmtc2.ni vf24, t6 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->mfc1(t1, f1); // mfc1 t1, f1 + c->pextlw(t1, t1, ra); // pextlw t1, t1, ra + // nop // sll r0, r0, 0 + c->pcpyld(t1, t1, t9); // pcpyld t1, t1, t9 + c->mov128_vf_gpr(vf9, t2); // qmtc2.ni vf9, t2 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf10, t3); // qmtc2.ni vf10, t3 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf11, t7); // qmtc2.ni vf11, t7 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf12, t8); // qmtc2.ni vf12, t8 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf27, t1); // qmtc2.ni vf27, t1 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t4, vf17); // qmfc2.ni t4, vf17 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t5, vf18); // qmfc2.ni t5, vf18 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t6, vf19); // qmfc2.ni t6, vf19 + bc = ((s64)c->sgpr64(a0)) <= 0; // blez a0, L88 + c->mov128_gpr_vf(t7, vf20); // qmfc2.ni t7, vf20 + if (bc) {goto block_8;} // branch non-likely + + + block_7: + c->lq(t2, 96, at); // lq t2, 96(at) + // Unknown instr: vcallms 48 + vcallms48(c); + c->daddiu(a0, a0, -4); // daddiu a0, a0, -4 + c->ld(t1, 0, t0); // ld t1, 0(t0) + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->daddiu(v1, v1, 16); // daddiu v1, v1, 16 + c->daddiu(t0, t0, 8); // daddiu t0, t0, 8 + c->pextlh(t1, r0, t1); // pextlh t1, r0, t1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pand(t2, t1, t2); // pand t2, t1, t2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->psllw(t2, t2, 5); // psllw t2, t2, 5 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->paddw(t9, t2, a2); // paddw t9, t2, a2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->dsrl32(ra, t9, 0); // dsrl32 ra, t9, 0 + c->lwc1(f1, 24, t9); // lwc1 f1, 24(t9) + c->pcpyud(s4, t9, r0); // pcpyud s4, t9, r0 + c->lwc1(f4, 24, ra); // lwc1 f4, 24(ra) + c->subs(f3, f1, f0); // sub.s f3, f1, f0 + // nop // sll r0, r0, 0 + c->dsrl32(s3, s4, 0); // dsrl32 s3, s4, 0 + c->lwc1(f1, 24, s4); // lwc1 f1, 24(s4) + c->pand(t1, t1, a3); // pand t1, t1, a3 + c->lwc1(f2, 24, s3); // lwc1 f2, 24(s3) + c->psraw(s5, t1, 8); // psraw s5, t1, 8 + c->lq(t1, 16, t9); // lq t1, 16(t9) + c->divs(f3, f0, f3); // div.s f3, f0, f3 + c->lq(t2, 16, ra); // lq t2, 16(ra) + c->mov128_gpr_gpr(gp, s0); // por gp, s0, r0 + c->subs(f4, f4, f0); // sub.s f4, f4, f0 + c->ppach(t4, r0, t4); // ppach t4, r0, t4 + c->lq(t3, 16, s4); // lq t3, 16(s4) + c->ppach(t5, r0, t5); // ppach t5, r0, t5 + c->lq(t8, 16, s3); // lq t8, 16(s3) + c->ppach(t6, r0, t6); // ppach t6, r0, t6 + c->lq(t9, 0, t9); // lq t9, 0(t9) + c->ppach(t7, r0, t7); // ppach t7, r0, t7 + c->lq(ra, 0, ra); // lq ra, 0(ra) + c->pextlw(t4, t5, t4); // pextlw t4, t5, t4 + c->lq(t5, 0, s4); // lq t5, 0(s4) + c->pextlw(t6, t7, t6); // pextlw t6, t7, t6 + c->lq(t7, 0, s3); // lq t7, 0(s3) + c->mov128_gpr_gpr(s0, s1); // por s0, s1, r0 + c->muls(f5, f3, f0); // mul.s f5, f3, f0 + c->mov128_gpr_gpr(s1, s2); // por s1, s2, r0 + c->divs(f3, f0, f4); // div.s f3, f0, f4 + c->pcpyld(t4, t6, t4); // pcpyld t4, t6, t4 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pand(t4, t4, a1); // pand t4, t4, a1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->mov128_gpr_gpr(s2, s5); // por s2, s5, r0 + c->mfc1(t6, f5); // mfc1 t6, f5 + c->subs(f4, f1, f0); // sub.s f4, f1, f0 + // nop // sll r0, r0, 0 + c->por(t4, t4, gp); // por t4, t4, gp + // nop // sll r0, r0, 0 + c->subs(f1, f2, f0); // sub.s f1, f2, f0 + // nop // sll r0, r0, 0 + c->muls(f2, f3, f0); // mul.s f2, f3, f0 + c->sq(t4, -16, v1); // sq t4, -16(v1) + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->divs(f3, f0, f4); // div.s f3, f0, f4 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->mfc1(t4, f2); // mfc1 t4, f2 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->muls(f2, f3, f0); // mul.s f2, f3, f0 + // nop // sll r0, r0, 0 + c->pextlw(t4, t4, t6); // pextlw t4, t4, t6 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->divs(f1, f0, f1); // div.s f1, f0, f1 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->mfc1(t6, f2); // mfc1 t6, f2 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf21, t1); // qmtc2.ni vf21, t1 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf22, t2); // qmtc2.ni vf22, t2 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf23, t3); // qmtc2.ni vf23, t3 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf24, t8); // qmtc2.ni vf24, t8 + // 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->mfc1(t1, f1); // mfc1 t1, f1 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf9, t9); // qmtc2.ni vf9, t9 + c->pextlw(t1, t1, t6); // pextlw t1, t1, t6 + c->mov128_vf_gpr(vf10, ra); // qmtc2.ni vf10, ra + c->pcpyld(t1, t1, t4); // pcpyld t1, t1, t4 + c->mov128_vf_gpr(vf11, t5); // qmtc2.ni vf11, t5 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf12, t7); // qmtc2.ni vf12, t7 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf27, t1); // qmtc2.ni vf27, t1 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t4, vf17); // qmfc2.ni t4, vf17 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t5, vf18); // qmfc2.ni t5, vf18 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t6, vf19); // qmfc2.ni t6, vf19 + bc = ((s64)c->sgpr64(a0)) > 0; // bgtz a0, L87 + c->mov128_gpr_vf(t7, vf20); // qmfc2.ni t7, vf20 + if (bc) {goto block_7;} // branch non-likely + + + block_8: + c->daddiu(v1, v1, 16); // daddiu v1, v1, 16 + // nop // sll r0, r0, 0 + c->ppach(t4, r0, t4); // ppach t4, r0, t4 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->ppach(t5, r0, t5); // ppach t5, r0, t5 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->ppach(t6, r0, t6); // ppach t6, r0, t6 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->ppach(t7, r0, t7); // ppach t7, r0, t7 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextlw(t4, t5, t4); // pextlw t4, t5, t4 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextlw(t6, t7, t6); // pextlw t6, t7, t6 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcpyld(t4, t6, t4); // pcpyld t4, t6, t4 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pand(t4, t4, a1); // pand t4, t4, a1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->por(t4, t4, s0); // por t4, t4, s0 + c->mfc1(r0, f31); // mfc1 r0, f31 + // nop // sll r0, r0, 0 + c->sq(t4, -16, v1); // sq t4, -16(v1) + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + c->ld(ra, 12432, at); // ld ra, 12432(at) + c->lq(gp, 12544, at); // lq gp, 12544(at) + c->lq(s5, 12528, at); // lq s5, 12528(at) + c->lq(s4, 12512, at); // lq s4, 12512(at) + c->lq(s3, 12496, at); // lq s3, 12496(at) + c->lq(s2, 12480, at); // lq s2, 12480(at) + c->lq(s1, 12464, at); // lq s1, 12464(at) + c->lq(s0, 12448, at); // lq s0, 12448(at) + //jr ra // jr ra + c->daddiu(sp, sp, 128); // daddiu sp, sp, 128 + goto end_of_function; // return + + // nop // sll r0, r0, 0 + // 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("generic-envmap-proc", execute, 256); +} + +} // namespace generic_envmap_proc +} // namespace Mips2C +// add generic_envmap_proc::link to the link callback table for the object file. +// FWD DEC: + +//--------------------------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_prepare_dma_double { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + c->daddiu(sp, sp, -128); // daddiu sp, sp, -128 + c->sd(ra, 12432, at); // sd ra, 12432(at) + c->sq(s0, 12448, at); // sq s0, 12448(at) + c->sq(s1, 12464, at); // sq s1, 12464(at) + c->sq(s2, 12480, at); // sq s2, 12480(at) + c->sq(s3, 12496, at); // sq s3, 12496(at) + c->sq(s4, 12512, at); // sq s4, 12512(at) + c->sq(s5, 12528, at); // sq s5, 12528(at) + c->sq(gp, 12544, at); // sq gp, 12544(at) + get_fake_spad_addr2(at, cache.fake_scratchpad_data, 0, c);// lui at, 28672 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->lw(a3, 44, at); // lw a3, 44(at) + // nop // sll r0, r0, 0 + c->lbu(v1, 16, a3); // lbu v1, 16(a3) + // nop // sll r0, r0, 0 + c->lh(a0, 18, a3); // lh a0, 18(a3) + // nop // sll r0, r0, 0 + c->lw(t7, 24, at); // lw t7, 24(at) + c->sll(a2, v1, 2); // sll a2, v1, 2 + c->daddiu(a1, a0, 3); // daddiu a1, a0, 3 + c->daddu(a2, a2, v1); // daddu a2, a2, v1 + c->addiu(t0, r0, -4); // addiu t0, r0, -4 + c->and_(t6, a1, t0); // and t6, a1, t0 + c->sll(a1, a2, 4); // sll a1, a2, 4 + c->daddu(a2, t6, t6); // daddu a2, t6, t6 + c->daddiu(a1, a1, 112); // daddiu a1, a1, 112 + c->daddu(a2, a2, t6); // daddu a2, a2, t6 + c->dsll(t0, t6, 2); // dsll t0, t6, 2 + // nop // sll r0, r0, 0 + c->daddiu(t0, t0, 15); // daddiu t0, t0, 15 + c->dsll(a2, a2, 2); // dsll a2, a2, 2 + c->dsra(t0, t0, 4); // dsra t0, t0, 4 + c->daddiu(a2, a2, 15); // daddiu a2, a2, 15 + c->dsll(t4, t0, 4); // dsll t4, t0, 4 + c->dsra(t9, a2, 4); // dsra t9, a2, 4 + c->dsll(t1, t9, 4); // dsll t1, t9, 4 + c->mov64(a2, t7); // or a2, t7, r0 + c->dsra(t8, a1, 4); // dsra t8, a1, 4 + c->lq(t0, 11744, at); // lq t0, 11744(at) + c->daddu(t2, a2, a1); // daddu t2, a2, a1 + c->lq(t5, 11760, at); // lq t5, 11760(at) + c->daddu(t1, t2, t1); // daddu t1, t2, t1 + c->sq(t0, 0, a2); // sq t0, 0(a2) + c->daddiu(t0, t2, 32); // daddiu t0, t2, 32 + c->lq(ra, 11776, at); // lq ra, 11776(at) + c->daddu(t2, t1, t4); // daddu t2, t1, t4 + c->sq(r0, -16, t0); // sq r0, -16(t0) + c->daddiu(t1, t1, 64); // daddiu t1, t1, 64 + c->lq(gp, 11792, at); // lq gp, 11792(at) + c->daddu(t3, t2, t4); // daddu t3, t2, t4 + c->sq(r0, -32, t1); // sq r0, -32(t1) + c->daddiu(t2, t2, 80); // daddiu t2, t2, 80 + c->sq(r0, -16, t1); // sq r0, -16(t1) + c->daddu(s5, t3, a1); // daddu s5, t3, a1 + c->sq(r0, -32, t2); // sq r0, -32(t2) + c->daddiu(a1, t3, 80); // daddiu a1, t3, 80 + c->sq(r0, -16, t2); // sq r0, -16(t2) + c->daddu(s4, s5, t4); // daddu s4, s5, t4 + c->sq(r0, -16, a1); // sq r0, -16(a1) + c->daddiu(t3, s5, 112); // daddiu t3, s5, 112 + c->lw(s5, 11984, at); // lw s5, 11984(at) + c->daddu(s3, s4, t4); // daddu s3, s4, t4 + c->sq(r0, -16, t3); // sq r0, -16(t3) + c->daddiu(t4, s4, 128); // daddiu t4, s4, 128 + c->sq(t5, 0, a1); // sq t5, 0(a1) + c->daddiu(t5, s3, 128); // daddiu t5, s3, 128 + c->sq(r0, -32, t4); // sq r0, -32(t4) + c->subu(s4, t5, t7); // subu s4, t5, t7 + c->sq(r0, -16, t4); // sq r0, -16(t4) + c->sra(s4, s4, 4); // sra s4, s4, 4 + c->sq(r0, -16, t5); // sq r0, -16(t5) + c->daddiu(s4, s4, -1); // daddiu s4, s4, -1 + c->sq(ra, 0, t5); // sq ra, 0(t5) + c->sh(t9, 0, t5); // sh t9, 0(t5) + c->sq(gp, 16, t5); // sq gp, 16(t5) + c->sw(s5, 24, t5); // sw s5, 24(t5) + c->sh(s4, 0, t7); // sh s4, 0(t7) + c->daddiu(t7, s4, 3); // daddiu t7, s4, 3 + c->sw(t7, 40, at); // sw t7, 40(at) + c->lw(t7, 60, at); // lw t7, 60(at) + c->dsubu(t9, t0, a2); // dsubu t9, t0, a2 + c->daddu(t7, t7, t9); // daddu t7, t7, t9 + c->lw(t9, 12, a2); // lw t9, 12(a2) + c->sll(ra, t8, 16); // sll ra, t8, 16 + c->lw(t8, 68, at); // lw t8, 68(at) + // nop // sll r0, r0, 0 + c->lw(gp, 12, a1); // lw gp, 12(a1) + c->or_(s4, t9, t8); // or s4, t9, t8 + c->lw(t9, 72, at); // lw t9, 72(at) + c->xori(s5, t8, 38); // xori s5, t8, 38 + // nop // sll r0, r0, 0 + c->or_(s4, s4, ra); // or s4, s4, ra + c->lw(t8, 11968, at); // lw t8, 11968(at) + // nop // sll r0, r0, 0 + c->lw(s3, 11988, at); // lw s3, 11988(at) + c->or_(gp, gp, s5); // or gp, gp, s5 + c->sw(s4, 12, a2); // sw s4, 12(a2) + c->or_(s5, gp, ra); // or s5, gp, ra + c->lw(ra, 11972, at); // lw ra, 11972(at) + c->daddiu(gp, t9, 1); // daddiu gp, t9, 1 + c->sw(s5, 12, a1); // sw s5, 12(a1) + c->daddiu(s4, t9, 2); // daddiu s4, t9, 2 + c->lw(s3, 11976, at); // lw s3, 11976(at) + c->dsll(t6, t6, 16); // dsll t6, t6, 16 + c->lw(s5, 11980, at); // lw s5, 11980(at) + c->or_(s4, ra, s4); // or s4, ra, s4 + c->lw(ra, 11984, at); // lw ra, 11984(at) + c->or_(s3, s3, gp); // or s3, s3, gp + c->lw(gp, 11992, at); // lw gp, 11992(at) + c->mov64(s2, t9); // or s2, t9, r0 + c->sw(t8, -8, t0); // sw t8, -8(t0) + c->or_(s5, s5, s2); // or s5, s5, s2 + c->sw(gp, 4, a1); // sw gp, 4(a1) + c->or_(s4, s4, t6); // or s4, s4, t6 + c->sw(ra, 0, a1); // sw ra, 0(a1) + c->or_(s3, s3, t6); // or s3, s3, t6 + c->sw(s4, -4, t0); // sw s4, -4(t0) + c->or_(s5, s5, t6); // or s5, s5, t6 + c->sw(s3, -4, t1); // sw s3, -4(t1) + c->addiu(s4, r0, 567); // addiu s4, r0, 567 + c->sw(s5, -4, t2); // sw s5, -4(t2) + bc = c->sgpr64(t9) != c->sgpr64(s4); // bne t9, s4, L74 + c->daddiu(t9, t9, 279); // daddiu t9, t9, 279 + if (bc) {goto block_2;} // branch non-likely + + // nop // sll r0, r0, 0 + c->addiu(t9, r0, 9); // addiu t9, r0, 9 + + block_2: + c->daddiu(s1, t9, 1); // daddiu s1, t9, 1 + c->lw(s0, 11976, at); // lw s0, 11976(at) + c->mov64(s3, t9); // or s3, t9, r0 + c->lw(s2, 11980, at); // lw s2, 11980(at) + c->daddiu(s5, t9, 2); // daddiu s5, t9, 2 + c->lw(s4, 11972, at); // lw s4, 11972(at) + c->or_(s1, s0, s1); // or s1, s0, s1 + c->sw(t8, -8, t3); // sw t8, -8(t3) + c->or_(t8, s2, s3); // or t8, s2, s3 + c->sw(gp, 24, t5); // sw gp, 24(t5) + c->or_(gp, s4, s5); // or gp, s4, s5 + // nop // sll r0, r0, 0 + c->or_(s5, s1, t6); // or s5, s1, t6 + c->sw(ra, 28, t5); // sw ra, 28(t5) + c->or_(t8, t8, t6); // or t8, t8, t6 + c->sw(s5, -4, t3); // sw s5, -4(t3) + c->or_(ra, gp, t6); // or ra, gp, t6 + c->sw(t8, -4, t4); // sw t8, -4(t4) + c->addiu(t6, r0, 567); // addiu t6, r0, 567 + c->sw(t7, 4, t5); // sw t7, 4(t5) + // nop // sll r0, r0, 0 + c->sw(ra, 12, t5); // sw ra, 12(t5) + bc = c->sgpr64(t9) != c->sgpr64(t6); // bne t9, t6, L75 + c->daddiu(t5, t9, 279); // daddiu t5, t9, 279 + if (bc) {goto block_4;} // branch non-likely + + // nop // sll r0, r0, 0 + c->addiu(t5, r0, 9); // addiu t5, r0, 9 + + block_4: + // nop // sll r0, r0, 0 + c->sw(t5, 72, at); // sw t5, 72(at) + // nop // sll r0, r0, 0 + c->sw(t0, 4, at); // sw t0, 4(at) + // nop // sll r0, r0, 0 + c->sw(t1, 8, at); // sw t1, 8(at) + // nop // sll r0, r0, 0 + c->sw(t2, 12, at); // sw t2, 12(at) + // nop // sll r0, r0, 0 + c->sw(t3, 16, at); // sw t3, 16(at) + // nop // sll r0, r0, 0 + c->sw(t4, 20, at); // sw t4, 20(at) + // nop // sll r0, r0, 0 + c->lw(t0, 48, at); // lw t0, 48(at) + // nop // sll r0, r0, 0 + c->lq(t1, 11808, at); // lq t1, 11808(at) + bc = c->sgpr64(t0) == 0; // beq t0, r0, L80 + c->lq(t2, 11824, at); // lq t2, 11824(at) + if (bc) {goto block_13;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lq(t3, 11840, at); // lq t3, 11840(at) + // nop // sll r0, r0, 0 + c->lq(t4, 11856, at); // lq t4, 11856(at) + // nop // sll r0, r0, 0 + c->lh(t5, 58, at); // lh t5, 58(at) + // nop // sll r0, r0, 0 + c->sq(t1, 16, a2); // sq t1, 16(a2) + // nop // sll r0, r0, 0 + c->sq(t2, 32, a2); // sq t2, 32(a2) + // nop // sll r0, r0, 0 + c->sq(t3, 48, a2); // sq t3, 48(a2) + // nop // sll r0, r0, 0 + c->sq(t4, 64, a2); // sq t4, 64(a2) + // nop // sll r0, r0, 0 + c->sq(t1, 16, a1); // sq t1, 16(a1) + // nop // sll r0, r0, 0 + c->sq(t2, 32, a1); // sq t2, 32(a1) + // nop // sll r0, r0, 0 + c->sq(t3, 48, a1); // sq t3, 48(a1) + // nop // sll r0, r0, 0 + c->sq(t4, 64, a1); // sq t4, 64(a1) + bc = c->sgpr64(t5) == 0; // beq t5, r0, L76 + c->lq(t1, 11872, at); // lq t1, 11872(at) + if (bc) {goto block_7;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lq(t2, 11904, at); // lq t2, 11904(at) + // nop // sll r0, r0, 0 + c->lq(t3, 11936, at); // lq t3, 11936(at) + //beq r0, r0, L77 // beq r0, r0, L77 + c->lq(t4, 12032, at); // lq t4, 12032(at) + goto block_8; // branch always + + + block_7: + // nop // sll r0, r0, 0 + c->lq(t2, 11888, at); // lq t2, 11888(at) + // nop // sll r0, r0, 0 + c->lq(t3, 11936, at); // lq t3, 11936(at) + // nop // sll r0, r0, 0 + c->lq(t4, 12032, at); // lq t4, 12032(at) + + block_8: + // nop // sll r0, r0, 0 + c->sq(t1, 80, a2); // sq t1, 80(a2) + // nop // sll r0, r0, 0 + c->sq(t2, 96, a2); // sq t2, 96(a2) + // nop // sll r0, r0, 0 + c->sq(t3, 112, a2); // sq t3, 112(a2) + // nop // sll r0, r0, 0 + c->sq(t4, 80, a1); // sq t4, 80(a1) + // nop // sll r0, r0, 0 + c->sq(t3, 96, a1); // sq t3, 96(a1) + // nop // sll r0, r0, 0 + c->sq(t3, 112, a1); // sq t3, 112(a1) + c->daddiu(t2, a3, 22); // daddiu t2, a3, 22 + c->addiu(t3, r0, 0); // addiu t3, r0, 0 + c->mov64(t4, v1); // or t4, v1, r0 + c->addiu(t6, r0, 128); // addiu t6, r0, 128 + c->mov64(t1, a2); // or t1, a2, r0 + + block_9: + c->daddu(t1, t1, t6); // daddu t1, t1, t6 + c->lq(t6, 0, t0); // lq t6, 0(t0) + c->daddiu(t4, t4, -1); // daddiu t4, t4, -1 + c->lbu(t5, 0, t2); // lbu t5, 0(t2) + // nop // sll r0, r0, 0 + c->lq(t7, 16, t0); // lq t7, 16(t0) + c->daddu(t9, t5, t5); // daddu t9, t5, t5 + c->lq(t8, 32, t0); // lq t8, 32(t0) + c->daddu(ra, t9, t5); // daddu ra, t9, t5 + c->lq(t9, 48, t0); // lq t9, 48(t0) + c->daddiu(gp, ra, 9); // daddiu gp, ra, 9 + c->lq(ra, 64, t0); // lq ra, 64(t0) + c->daddiu(t0, t0, 80); // daddiu t0, t0, 80 + c->sq(t6, 0, t1); // sq t6, 0(t1) + // nop // sll r0, r0, 0 + c->sw(t3, 12, t1); // sw t3, 12(t1) + c->daddiu(t2, t2, 1); // daddiu t2, t2, 1 + c->sq(t7, 16, t1); // sq t7, 16(t1) + c->daddu(t3, t3, gp); // daddu t3, t3, gp + c->sw(t5, 28, t1); // sw t5, 28(t1) + // nop // sll r0, r0, 0 + c->sq(t8, 32, t1); // sq t8, 32(t1) + c->addiu(t6, r0, 80); // addiu t6, r0, 80 + c->sq(t9, 48, t1); // sq t9, 48(t1) + bc = ((s64)c->sgpr64(t4)) > 0; // bgtz t4, L78 + c->sq(ra, 64, t1); // sq ra, 64(t1) + if (bc) {goto block_9;} // branch non-likely + + c->ori(t0, t5, 32768); // ori t0, t5, 32768 + c->sw(a0, 36, at); // sw a0, 36(at) + // nop // sll r0, r0, 0 + c->sw(t0, 28, t1); // sw t0, 28(t1) + // nop // sll r0, r0, 0 + c->sw(v1, 92, a2); // sw v1, 92(a2) + // nop // sll r0, r0, 0 + c->sw(a0, 108, a2); // sw a0, 108(a2) + // nop // sll r0, r0, 0 + c->sw(r0, 124, a2); // sw r0, 124(a2) + c->daddiu(a3, a3, 22); // daddiu a3, a3, 22 + c->addiu(t0, r0, 0); // addiu t0, r0, 0 + c->mov64(t1, v1); // or t1, v1, r0 + c->lw(t6, 52, at); // lw t6, 52(at) + c->mov64(a2, a1); // or a2, a1, r0 + c->addiu(t8, r0, 128); // addiu t8, r0, 128 + // nop // sll r0, r0, 0 + c->lq(t2, 0, t6); // lq t2, 0(t6) + // nop // sll r0, r0, 0 + c->lq(t3, 16, t6); // lq t3, 16(t6) + // nop // sll r0, r0, 0 + c->lq(t4, 32, t6); // lq t4, 32(t6) + // nop // sll r0, r0, 0 + c->lq(t5, 48, t6); // lq t5, 48(t6) + // nop // sll r0, r0, 0 + c->lq(t6, 64, t6); // lq t6, 64(t6) + + block_11: + c->daddu(a2, a2, t8); // daddu a2, a2, t8 + c->lbu(t7, 0, a3); // lbu t7, 0(a3) + c->daddiu(t1, t1, -1); // daddiu t1, t1, -1 + c->sq(t2, 0, a2); // sq t2, 0(a2) + c->daddu(t8, t7, t7); // daddu t8, t7, t7 + c->sw(t0, 12, a2); // sw t0, 12(a2) + c->daddu(t8, t8, t7); // daddu t8, t8, t7 + c->sq(t3, 16, a2); // sq t3, 16(a2) + c->daddiu(t8, t8, 9); // daddiu t8, t8, 9 + c->sw(t7, 28, a2); // sw t7, 28(a2) + c->daddiu(a3, a3, 1); // daddiu a3, a3, 1 + // nop // sll r0, r0, 0 + c->daddu(t0, t0, t8); // daddu t0, t0, t8 + c->sq(t4, 32, a2); // sq t4, 32(a2) + c->addiu(t8, r0, 80); // addiu t8, r0, 80 + c->sq(t5, 48, a2); // sq t5, 48(a2) + bc = ((s64)c->sgpr64(t1)) > 0; // bgtz t1, L79 + c->sq(t6, 64, a2); // sq t6, 64(a2) + if (bc) {goto block_11;} // branch non-likely + + c->ori(a3, t7, 32768); // ori a3, t7, 32768 + c->sw(a0, 36, at); // sw a0, 36(at) + // nop // sll r0, r0, 0 + c->sw(a3, 28, a2); // sw a3, 28(a2) + // nop // sll r0, r0, 0 + c->sw(v1, 92, a1); // sw v1, 92(a1) + // nop // sll r0, r0, 0 + c->sw(a0, 108, a1); // sw a0, 108(a1) + //beq r0, r0, L82 // beq r0, r0, L82 + c->sw(r0, 124, a1); // sw r0, 124(a1) + goto block_16; // branch always + + + block_13: + // nop // sll r0, r0, 0 + c->lq(a3, 16, a2); // lq a3, 16(a2) + // nop // sll r0, r0, 0 + c->lq(t0, 32, a2); // lq t0, 32(a2) + // nop // sll r0, r0, 0 + c->lq(t1, 48, a2); // lq t1, 48(a2) + // nop // sll r0, r0, 0 + c->lq(t2, 64, a2); // lq t2, 64(a2) + // nop // sll r0, r0, 0 + c->sq(a3, 16, a1); // sq a3, 16(a1) + // nop // sll r0, r0, 0 + c->sq(t0, 32, a1); // sq t0, 32(a1) + // nop // sll r0, r0, 0 + c->sq(t1, 48, a1); // sq t1, 48(a1) + // nop // sll r0, r0, 0 + c->sq(t2, 64, a1); // sq t2, 64(a1) + // nop // sll r0, r0, 0 + c->lq(a3, 12032, at); // lq a3, 12032(at) + // nop // sll r0, r0, 0 + c->lq(t0, 11936, at); // lq t0, 11936(at) + // nop // sll r0, r0, 0 + c->sq(a3, 80, a1); // sq a3, 80(a1) + // nop // sll r0, r0, 0 + c->sq(t0, 96, a1); // sq t0, 96(a1) + // nop // sll r0, r0, 0 + c->sq(t0, 112, a1); // sq t0, 112(a1) + c->mov64(a3, v1); // or a3, v1, r0 + c->lw(t5, 52, at); // lw t5, 52(at) + c->mov64(t0, a1); // or t0, a1, r0 + c->addiu(t7, r0, 128); // addiu t7, r0, 128 + // nop // sll r0, r0, 0 + c->lq(t1, 0, t5); // lq t1, 0(t5) + // nop // sll r0, r0, 0 + c->lq(t2, 16, t5); // lq t2, 16(t5) + // nop // sll r0, r0, 0 + c->lq(t3, 32, t5); // lq t3, 32(t5) + // nop // sll r0, r0, 0 + c->lq(t4, 48, t5); // lq t4, 48(t5) + // nop // sll r0, r0, 0 + c->lq(t5, 64, t5); // lq t5, 64(t5) + c->daddu(a2, a2, t7); // daddu a2, a2, t7 + // nop // sll r0, r0, 0 + + block_14: + c->daddu(t0, t0, t7); // daddu t0, t0, t7 + c->lwu(t8, 12, a2); // lwu t8, 12(a2) + c->daddiu(a3, a3, -1); // daddiu a3, a3, -1 + c->lwu(t7, 28, a2); // lwu t7, 28(a2) + c->daddiu(a2, a2, 80); // daddiu a2, a2, 80 + c->sq(t1, 0, t0); // sq t1, 0(t0) + // nop // sll r0, r0, 0 + c->sw(t8, 12, t0); // sw t8, 12(t0) + // nop // sll r0, r0, 0 + c->sq(t2, 16, t0); // sq t2, 16(t0) + c->daddu(t8, t8, t6); // daddu t8, t8, t6 + c->sw(t7, 28, t0); // sw t7, 28(t0) + // nop // sll r0, r0, 0 + c->sq(t3, 32, t0); // sq t3, 32(t0) + c->addiu(t7, r0, 80); // addiu t7, r0, 80 + c->sq(t4, 48, t0); // sq t4, 48(t0) + bc = ((s64)c->sgpr64(a3)) > 0; // bgtz a3, L81 + c->sq(t5, 64, t0); // sq t5, 64(t0) + if (bc) {goto block_14;} // branch non-likely + + // nop // sll r0, r0, 0 + c->sw(a0, 36, at); // sw a0, 36(at) + // nop // sll r0, r0, 0 + c->sw(v1, 92, a1); // sw v1, 92(a1) + // nop // sll r0, r0, 0 + c->sw(a0, 108, a1); // sw a0, 108(a1) + // nop // sll r0, r0, 0 + c->sw(r0, 124, a1); // sw r0, 124(a1) + + block_16: + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + c->ld(ra, 12432, at); // ld ra, 12432(at) + c->lq(gp, 12544, at); // lq gp, 12544(at) + c->lq(s5, 12528, at); // lq s5, 12528(at) + c->lq(s4, 12512, at); // lq s4, 12512(at) + c->lq(s3, 12496, at); // lq s3, 12496(at) + c->lq(s2, 12480, at); // lq s2, 12480(at) + c->lq(s1, 12464, at); // lq s1, 12464(at) + c->lq(s0, 12448, at); // lq s0, 12448(at) + //jr ra // jr ra + c->daddiu(sp, sp, 128); // daddiu sp, sp, 128 + goto end_of_function; // return + + // 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 + 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-prepare-dma-double", execute, 256); +} + +} // namespace generic_prepare_dma_double +} // 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_prepare_dma_single { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* +} cache; + +u64 execute(void*) { + ASSERT(false); + return 0; +} + +u64 execute_real(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + c->daddiu(sp, sp, -32); // daddiu sp, sp, -32 + // get_fake_spad_addr2(at, cache.fake_scratchpad_data, 0, c); // another guess + c->sq(gp, 12448, at); // sq gp, 12448(at) + get_fake_spad_addr2(at, cache.fake_scratchpad_data, 0, c);// lui at, 28672 + // nop // sll r0, r0, 0 + c->lw(t1, 44, at); // lw t1, 44(at) + // nop // sll r0, r0, 0 + c->lw(t8, 48, at); // lw t8, 48(at) + // nop // sll r0, r0, 0 + c->lw(v1, 24, at); // lw v1, 24(at) + // nop // sll r0, r0, 0 + c->lh(t3, 56, at); // lh t3, 56(at) + // nop // sll r0, r0, 0 + c->lh(a1, 18, t1); // lh a1, 18(t1) + c->mov64(a0, v1); // or a0, v1, r0 + c->lbu(a2, 16, t1); // lbu a2, 16(t1) + bc = c->sgpr64(t8) == 0; // beq t8, r0, L70 + c->lq(t4, 11744, at); // lq t4, 11744(at) + if (bc) {goto block_10;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lq(t9, 11808, at); // lq t9, 11808(at) + // nop // sll r0, r0, 0 + c->lq(gp, 11824, at); // lq gp, 11824(at) + c->mov64(a3, a2); // or a3, a2, r0 + c->lq(t7, 11840, at); // lq t7, 11840(at) + bc = c->sgpr64(t3) != 0; // bne t3, r0, L64 + c->lq(t2, 11856, at); // lq t2, 11856(at) + if (bc) {goto block_3;} // branch non-likely + + // nop // sll r0, r0, 0 + c->lq(t0, 11872, at); // lq t0, 11872(at) + // nop // sll r0, r0, 0 + c->lq(t5, 11888, at); // lq t5, 11888(at) + //beq r0, r0, L65 // beq r0, r0, L65 + c->lq(t6, 11936, at); // lq t6, 11936(at) + goto block_4; // branch always + + + block_3: + // nop // sll r0, r0, 0 + c->lq(t0, 12032, at); // lq t0, 12032(at) + // nop // sll r0, r0, 0 + c->lq(t5, 11936, at); // lq t5, 11936(at) + // nop // sll r0, r0, 0 + c->lq(t6, 11936, at); // lq t6, 11936(at) + + block_4: + // nop // sll r0, r0, 0 + c->sq(t4, 0, a0); // sq t4, 0(a0) + // nop // sll r0, r0, 0 + c->sq(t9, 16, a0); // sq t9, 16(a0) + // nop // sll r0, r0, 0 + c->sq(gp, 32, a0); // sq gp, 32(a0) + c->mov64(t4, t8); // or t4, t8, r0 + c->sq(t7, 48, a0); // sq t7, 48(a0) + c->daddiu(t1, t1, 22); // daddiu t1, t1, 22 + c->sq(t2, 64, a0); // sq t2, 64(a0) + c->addiu(t2, r0, 0); // addiu t2, r0, 0 + c->sq(t0, 80, a0); // sq t0, 80(a0) + c->addiu(t0, r0, 128); // addiu t0, r0, 128 + c->sq(t5, 96, a0); // sq t5, 96(a0) + bc = c->sgpr64(t3) != 0; // bne t3, r0, L67 + c->sq(t6, 112, a0); // sq t6, 112(a0) + if (bc) {goto block_7;} // branch non-likely + + + block_5: + c->daddu(a0, a0, t0); // daddu a0, a0, t0 + c->lq(t0, 0, t4); // lq t0, 0(t4) + c->daddiu(a3, a3, -1); // daddiu a3, a3, -1 + c->lbu(t3, 0, t1); // lbu t3, 0(t1) + // nop // sll r0, r0, 0 + c->lq(t5, 16, t4); // lq t5, 16(t4) + c->daddu(t7, t3, t3); // daddu t7, t3, t3 + c->lq(t6, 32, t4); // lq t6, 32(t4) + c->daddu(t8, t7, t3); // daddu t8, t7, t3 + c->lq(t7, 48, t4); // lq t7, 48(t4) + c->daddiu(t9, t8, 9); // daddiu t9, t8, 9 + c->lq(t8, 64, t4); // lq t8, 64(t4) + c->daddiu(t4, t4, 80); // daddiu t4, t4, 80 + c->sq(t0, 0, a0); // sq t0, 0(a0) + // nop // sll r0, r0, 0 + c->sw(t2, 12, a0); // sw t2, 12(a0) + c->daddiu(t1, t1, 1); // daddiu t1, t1, 1 + c->sq(t5, 16, a0); // sq t5, 16(a0) + c->daddu(t2, t2, t9); // daddu t2, t2, t9 + c->sw(t3, 28, a0); // sw t3, 28(a0) + // nop // sll r0, r0, 0 + c->sq(t6, 32, a0); // sq t6, 32(a0) + c->addiu(t0, r0, 80); // addiu t0, r0, 80 + c->sq(t7, 48, a0); // sq t7, 48(a0) + bc = ((s64)c->sgpr64(a3)) > 0; // bgtz a3, L66 + c->sq(t8, 64, a0); // sq t8, 64(a0) + if (bc) {goto block_5;} // branch non-likely + + //beq r0, r0, L69 // beq r0, r0, L69 + // nop // sll r0, r0, 0 + goto block_9; // branch always + + + block_7: + // nop // sll r0, r0, 0 + c->lw(t3, 52, at); // lw t3, 52(at) + // nop // sll r0, r0, 0 + c->lq(t4, 0, t3); // lq t4, 0(t3) + // nop // sll r0, r0, 0 + c->lq(t5, 16, t3); // lq t5, 16(t3) + // nop // sll r0, r0, 0 + c->lq(t6, 32, t3); // lq t6, 32(t3) + // nop // sll r0, r0, 0 + c->lq(t7, 48, t3); // lq t7, 48(t3) + // nop // sll r0, r0, 0 + c->lq(t8, 64, t3); // lq t8, 64(t3) + + block_8: + c->daddu(a0, a0, t0); // daddu a0, a0, t0 + c->lbu(t3, 0, t1); // lbu t3, 0(t1) + c->daddiu(a3, a3, -1); // daddiu a3, a3, -1 + c->sq(t4, 0, a0); // sq t4, 0(a0) + c->daddu(t0, t3, t3); // daddu t0, t3, t3 + c->sw(t2, 12, a0); // sw t2, 12(a0) + c->daddu(t0, t0, t3); // daddu t0, t0, t3 + c->sq(t5, 16, a0); // sq t5, 16(a0) + c->daddiu(t0, t0, 9); // daddiu t0, t0, 9 + c->sw(t3, 28, a0); // sw t3, 28(a0) + c->daddiu(t1, t1, 1); // daddiu t1, t1, 1 + // nop // sll r0, r0, 0 + c->daddu(t2, t2, t0); // daddu t2, t2, t0 + c->sq(t6, 32, a0); // sq t6, 32(a0) + c->addiu(t0, r0, 80); // addiu t0, r0, 80 + c->sq(t7, 48, a0); // sq t7, 48(a0) + bc = ((s64)c->sgpr64(a3)) > 0; // bgtz a3, L68 + c->sq(t8, 64, a0); // sq t8, 64(a0) + if (bc) {goto block_8;} // branch non-likely + + + block_9: + c->ori(a3, t3, 32768); // ori a3, t3, 32768 + c->sw(a1, 36, at); // sw a1, 36(at) + // nop // sll r0, r0, 0 + c->sw(a3, 28, a0); // sw a3, 28(a0) + // nop // sll r0, r0, 0 + c->sw(a2, 92, a0); // sw a2, 92(a0) + // nop // sll r0, r0, 0 + c->sw(a1, 108, v1); // sw a1, 108(v1) + //beq r0, r0, L71 // beq r0, r0, L71 + c->sw(r0, 124, v1); // sw r0, 124(v1) + goto block_11; // branch always + + + block_10: + c->dsll(a3, a2, 2); // dsll a3, a2, 2 + c->sq(t4, 0, a0); // sq t4, 0(a0) + c->daddu(a3, a3, a2); // daddu a3, a3, a2 + c->sw(a1, 108, v1); // sw a1, 108(v1) + c->dsll(a3, a3, 4); // dsll a3, a3, 4 + // nop // sll r0, r0, 0 + c->daddiu(t0, a3, 128); // daddiu t0, a3, 128 + c->sw(a1, 36, at); // sw a1, 36(at) + + block_11: + c->dsll(t1, a2, 2); // dsll t1, a2, 2 + c->lw(a3, 12, v1); // lw a3, 12(v1) + c->daddu(a2, t1, a2); // daddu a2, t1, a2 + c->lw(t1, 68, at); // lw t1, 68(at) + c->daddiu(a2, a2, 7); // daddiu a2, a2, 7 + // nop // sll r0, r0, 0 + c->or_(t2, a3, t1); // or t2, a3, t1 + // nop // sll r0, r0, 0 + c->sll(t3, a2, 16); // sll t3, a2, 16 + c->xori(a3, t1, 38); // xori a3, t1, 38 + c->or_(t1, t2, t3); // or t1, t2, t3 + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + // nop // sll r0, r0, 0 + c->sw(t1, 12, v1); // sw t1, 12(v1) + // nop // sll r0, r0, 0 + c->sw(a3, 68, at); // sw a3, 68(at) + c->daddiu(a1, a1, 3); // daddiu a1, a1, 3 + c->daddu(a0, a0, t0); // daddu a0, a0, t0 + c->dsra(a1, a1, 2); // dsra a1, a1, 2 + c->daddiu(a2, a0, 32); // daddiu a2, a0, 32 + c->dsll(t0, a1, 2); // dsll t0, a1, 2 + // nop // sll r0, r0, 0 + c->daddu(a3, t0, t0); // daddu a3, t0, t0 + c->dsll(a1, t0, 2); // dsll a1, t0, 2 + c->daddu(a3, a3, t0); // daddu a3, a3, t0 + c->daddiu(a1, a1, 15); // daddiu a1, a1, 15 + c->dsll(a3, a3, 2); // dsll a3, a3, 2 + c->dsra(a1, a1, 4); // dsra a1, a1, 4 + c->daddiu(a3, a3, 15); // daddiu a3, a3, 15 + c->dsll(t1, a1, 4); // dsll t1, a1, 4 + c->dsra(a3, a3, 4); // dsra a3, a3, 4 + c->lw(a1, 72, at); // lw a1, 72(at) + c->dsll(a3, a3, 4); // dsll a3, a3, 4 + // nop // sll r0, r0, 0 + c->daddu(a3, a2, a3); // daddu a3, a2, a3 + c->lw(t2, 11968, at); // lw t2, 11968(at) + c->daddu(a2, a3, t1); // daddu a2, a3, t1 + c->sq(r0, 0, a3); // sq r0, 0(a3) + c->daddiu(a2, a2, 16); // daddiu a2, a2, 16 + c->sq(r0, -16, a3); // sq r0, -16(a3) + c->daddu(t1, a2, t1); // daddu t1, a2, t1 + c->sq(r0, -32, a3); // sq r0, -32(a3) + c->daddiu(t1, t1, 16); // daddiu t1, t1, 16 + c->sq(r0, 0, a2); // sq r0, 0(a2) + c->subu(t3, t1, v1); // subu t3, t1, v1 + c->sq(r0, -16, a2); // sq r0, -16(a2) + c->sra(t3, t3, 4); // sra t3, t3, 4 + c->sq(r0, 0, a0); // sq r0, 0(a0) + // nop // sll r0, r0, 0 + c->sh(t3, 0, v1); // sh t3, 0(v1) + c->daddiu(v1, t3, 1); // daddiu v1, t3, 1 + c->sq(r0, 0, t1); // sq r0, 0(t1) + // nop // sll r0, r0, 0 + c->sq(r0, -16, t1); // sq r0, -16(t1) + // nop // sll r0, r0, 0 + c->daddiu(t5, a1, 1); // daddiu t5, a1, 1 + c->daddiu(t4, a1, 2); // daddiu t4, a1, 2 + c->lw(t3, 11988, at); // lw t3, 11988(at) + // nop // sll r0, r0, 0 + c->lw(t7, 11972, at); // lw t7, 11972(at) + c->dsll(t0, t0, 16); // dsll t0, t0, 16 + c->lw(t6, 11976, at); // lw t6, 11976(at) + c->or_(t4, t7, t4); // or t4, t7, t4 + c->lw(t7, 11980, at); // lw t7, 11980(at) + c->or_(t5, t6, t5); // or t5, t6, t5 + c->lw(t6, 11984, at); // lw t6, 11984(at) + // nop // sll r0, r0, 0 + c->lw(t8, 11992, at); // lw t8, 11992(at) + c->mov64(t9, a1); // or t9, a1, r0 + c->sw(t2, 8, a0); // sw t2, 8(a0) + c->or_(t2, t7, t9); // or t2, t7, t9 + c->sw(t8, 0, t1); // sw t8, 0(t1) + c->daddiu(a0, a0, 16); // daddiu a0, a0, 16 + c->sw(r0, 4, t1); // sw r0, 4(t1) + c->or_(t4, t4, t0); // or t4, t4, t0 + c->sw(t6, 8, t1); // sw t6, 8(t1) + c->daddiu(a3, a3, 16); // daddiu a3, a3, 16 + c->sw(t3, 12, t1); // sw t3, 12(t1) + c->or_(t1, t5, t0); // or t1, t5, t0 + c->sw(t4, -4, a0); // sw t4, -4(a0) + c->or_(t0, t2, t0); // or t0, t2, t0 + c->sw(t1, -4, a3); // sw t1, -4(a3) + c->daddiu(a2, a2, 16); // daddiu a2, a2, 16 + c->sw(t0, -4, a2); // sw t0, -4(a2) + c->addiu(t0, r0, 567); // addiu t0, r0, 567 + c->sw(v1, 40, at); // sw v1, 40(at) + bc = c->sgpr64(a1) != c->sgpr64(t0); // bne a1, t0, L72 + c->daddiu(v1, a1, 279); // daddiu v1, a1, 279 + if (bc) {goto block_13;} // branch non-likely + + // nop // sll r0, r0, 0 + c->addiu(v1, r0, 9); // addiu v1, r0, 9 + + block_13: + // nop // sll r0, r0, 0 + c->sw(v1, 72, at); // sw v1, 72(at) + // nop // sll r0, r0, 0 + c->sw(a0, 4, at); // sw a0, 4(at) + // nop // sll r0, r0, 0 + c->sw(a3, 8, at); // sw a3, 8(at) + // nop // sll r0, r0, 0 + c->sw(a2, 12, at); // sw a2, 12(at) + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + c->lq(gp, 12448, at); // lq gp, 12448(at) + //jr ra // jr ra + c->daddiu(sp, sp, 32); // daddiu sp, sp, 32 + 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-prepare-dma-single", execute, 128); +} + +} // namespace generic_prepare_dma_single +} // namespace Mips2C +// add generic_prepare_dma_single::link to the link callback table for the object file. +// FWD DEC: + +//--------------------------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_warp_source_proc { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* + void* math_camera; // *math-camera* +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + c->daddiu(sp, sp, -16); // daddiu sp, sp, -16 +// annoyingly, a aguess... + get_fake_spad_addr2(at, cache.fake_scratchpad_data, 0, c); + c->sd(fp, 12440, at); // sd fp, 12440(at) + c->mov64(fp, t9); // or fp, t9, r0 + get_fake_spad_addr2(at, cache.fake_scratchpad_data, 0, c);// lui at, 28672 + c->lw(a1, 44, at); // lw a1, 44(at) + c->lw(v1, 8, a1); // lw v1, 8(a1) + c->lw(a0, 4, a1); // lw a0, 4(a1) + c->lh(a1, 20, a1); // lh a1, 20(a1) + c->load_symbol2(t0, cache.math_camera); // lw t0, *math-camera*(s7) + c->lhu(a3, 6820, at); // lhu a3, 6820(at) + c->lhu(a2, 6822, at); // lhu a2, 6822(at) + c->dsll(t1, a3, 16); // dsll t1, a3, 16 + c->or_(a3, a3, t1); // or a3, a3, t1 + c->lqc2(vf5, 7520, at); // lqc2 vf5, 7520(at) + c->lqc2(vf1, 7136, at); // lqc2 vf1, 7136(at) + c->lqc2(vf2, 7152, at); // lqc2 vf2, 7152(at) + c->lqc2(vf3, 7168, at); // lqc2 vf3, 7168(at) + c->lqc2(vf4, 7184, at); // lqc2 vf4, 7184(at) + c->lui(t1, -16966); // lui t1, -16966 + c->ori(t1, t1, 24117); // ori t1, t1, 24117 + c->lwc1(f0, 0, t0); // lwc1 f0, 0(t0) + c->mfc1(t0, f0); // mfc1 t0, f0 + c->dsll32(t1, t1, 0); // dsll32 t1, t1, 0 + c->or_(t0, t1, t0); // or t0, t1, t0 + c->mov128_vf_gpr(vf6, t0); // qmtc2.i vf6, t0 + // Unknown instr: ld t0, L111(fp) + c->gprs[t0].du64[0] = 0xffff'ffff; + // nop // sll r0, r0, 0 + + block_1: + c->lqc2(vf9, 0, a0); // lqc2 vf9, 0(a0) + c->lwu(t1, 12, a0); // lwu t1, 12(a0) + c->vmax_bc(DEST::z, BC::x, vf9, vf9, vf6); // vmaxx.z vf9, vf9, vf6 + // nop // vnop + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + c->vmadda_bc(DEST::xyzw, BC::x, vf1, vf9); // vmaddax.xyzw acc, vf1, vf9 + c->vmadda_bc(DEST::xyzw, BC::y, vf2, vf9); // vmadday.xyzw acc, vf2, vf9 + c->vmadd_bc(DEST::xyzw, BC::z, vf9, vf3, vf9); // vmaddz.xyzw vf9, vf3, vf9 + // nop // vnop + c->vdiv(vf5, BC::w, vf9, BC::w); // vdiv Q, vf5.w, vf9.w + // nop // vnop + c->vwaitq(); // vwaitq + c->vmulq(DEST::xyz, vf9, vf9); // vmulq.xyz vf9, vf9, Q + c->vmul(DEST::xy, vf9, vf9, vf5); // vmul.xy vf9, vf9, vf5 + c->vadd_bc(DEST::xy, BC::z, vf9, vf9, vf5); // vaddz.xy vf9, vf9, vf5 + c->vadd_bc(DEST::y, BC::y, vf9, vf9, vf6); // vaddy.y vf9, vf9, vf6 + c->vftoi12(DEST::xyzw, vf10, vf9); // vftoi12.xyzw vf10, vf9 + c->psubh(t1, t1, a3); + c->dsrav(t1, t1, a2); // dsrav t1, t1, a2 + c->ppacb(t1, r0, t1); // ppacb t1, r0, t1 + c->and_(t1, t1, t0); // and t1, t1, t0 + bc = ((s64)c->sgpr64(t1)) < 0; // bltz t1, L20 + c->daddiu(t2, t1, -394); // daddiu t2, t1, -394 + if (bc) {goto block_3;} // branch non-likely + + bc = ((s64)c->sgpr64(t2)) < 0; // bltz t2, L21 + // nop // sll r0, r0, 0 + if (bc) {goto block_4;} // branch non-likely + + + block_3: + // nop // sll r0, r0, 0 + + block_4: + c->sll(t1, t1, 2); // sll t1, t1, 2 + c->daddu(t1, v1, t1); // daddu t1, v1, t1 + c->mov128_gpr_vf(t2, vf10); // qmfc2.i t2, vf10 + c->ppach(t2, r0, t2); // ppach t2, r0, t2 + c->daddiu(a1, a1, -1); // daddiu a1, a1, -1 + c->sw(t2, 0, t1); // sw t2, 0(t1) + bc = ((s64)c->sgpr64(a1)) > 0; // bgtz a1, L19 + c->daddiu(a0, a0, 32); // daddiu a0, a0, 32 + if (bc) {goto block_1;} // branch non-likely + + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + c->ld(fp, 12440, at); // ld fp, 12440(at) + //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(); + cache.math_camera = intern_from_c(-1, 0, "*math-camera*").c(); + gLinkedFunctionTable.reg("generic-warp-source-proc", execute, 128); +} + +} // namespace generic_warp_source_proc +} // namespace Mips2C +// add generic_warp_source_proc::link to the link callback table for the object file. +// FWD DEC: + +//--------------------------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_warp_dest_proc { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + c->daddiu(sp, sp, -16); // daddiu sp, sp, -16 + c->sd(fp, 12440, at); // sd fp, 12440(at) + c->mov64(fp, t9); // or fp, t9, r0 + get_fake_spad_addr2(at, cache.fake_scratchpad_data, 0, c);// lui at, 28672 + c->lw(a1, 44, at); // lw a1, 44(at) + c->lw(v1, 8, a1); // lw v1, 8(a1) + c->lw(a0, 4, a1); // lw a0, 4(a1) + c->lbu(a1, 17, a1); // lbu a1, 17(a1) + c->lhu(a3, 6820, at); // lhu a3, 6820(at) + c->lhu(a2, 6822, at); // lhu a2, 6822(at) + c->dsll(t0, a3, 16); // dsll t0, a3, 16 + c->or_(a3, a3, t0); // or a3, a3, t0 + // Unknown instr: ld t0, L111(fp) + c->gprs[t0].du64[0] = 0xffff'ffff; + + block_1: + c->lwu(t1, 12, a0); // lwu t1, 12(a0) + // Unknown instr: psubh t1, t1, a3 + c->psubh(t1, t1, a3); + c->dsrav(t1, t1, a2); // dsrav t1, t1, a2 + c->ppacb(t1, r0, t1); // ppacb t1, r0, t1 + c->and_(t1, t1, t0); // and t1, t1, t0 + c->sll(t1, t1, 2); // sll t1, t1, 2 + c->daddu(t1, v1, t1); // daddu t1, v1, t1 + c->lw(t1, 0, t1); // lw t1, 0(t1) + c->sw(t1, 12, a0); // sw t1, 12(a0) + c->daddiu(a1, a1, -1); // daddiu a1, a1, -1 + bc = ((s64)c->sgpr64(a1)) > 0; // bgtz a1, L16 + c->daddiu(a0, a0, 32); // daddiu a0, a0, 32 + if (bc) {goto block_1;} // branch non-likely + + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + c->ld(fp, 12440, at); // ld fp, 12440(at) + //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-warp-dest-proc", execute, 128); +} + +} // namespace generic_warp_dest_proc +} // namespace Mips2C +// add generic_warp_dest_proc::link to the link callback table for the object file. +// FWD DEC: + +//--------------------------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_no_light_proc { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* +} 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, 12432, at); // sd ra, 12432(at) + c->sq(s2, 12448, at); // sq s2, 12448(at) + c->sq(s3, 12464, at); // sq s3, 12464(at) + c->sq(s4, 12480, at); // sq s4, 12480(at) + c->sq(s5, 12496, at); // sq s5, 12496(at) + c->sq(gp, 12512, at); // sq gp, 12512(at) + get_fake_spad_addr2(at, cache.fake_scratchpad_data, 0, c);// lui at, 28672 + // nop // sll r0, r0, 0 + c->addiu(t1, r0, 256); // addiu t1, r0, 256 + c->lw(v1, 36, at); // lw v1, 36(at) + c->lui(a0, -2); // lui a0, -2 + c->lw(a1, 44, at); // lw a1, 44(at) + c->daddiu(v1, v1, 3); // daddiu v1, v1, 3 + c->addiu(a3, r0, 255); // addiu a3, r0, 255 + c->dsra(a2, v1, 2); // dsra a2, v1, 2 + c->lw(v1, 0, a1); // lw v1, 0(a1) + c->dsll(t0, a2, 3); // dsll t0, a2, 3 + c->lw(a2, 4, a1); // lw a2, 4(a1) + c->ori(a1, a0, 65534); // ori a1, a0, 65534 + c->daddu(a0, v1, t0); // daddu a0, v1, t0 + c->pextlw(a1, a1, a1); // pextlw a1, a1, a1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextlw(a1, a1, a1); // pextlw a1, a1, a1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextlw(a2, a2, a2); // pextlw a2, a2, a2 + c->lw(t2, 4, at); // lw t2, 4(at) + c->pextlw(a2, a2, a2); // pextlw a2, a2, a2 + c->lw(t3, 8, at); // lw t3, 8(at) + c->pcpyh(a3, a3); // pcpyh a3, a3 + c->lw(t4, 12, at); // lw t4, 12(at) + c->pcpyld(a3, a3, a3); // pcpyld a3, a3, a3 + c->lq(t0, 12160, at); // lq t0, 12160(at) + c->pcpyh(t1, t1); // pcpyh t1, t1 + c->ld(t5, 0, v1); // ld t5, 0(v1) + c->pcpyld(t1, t1, t1); // pcpyld t1, t1, t1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextlh(t6, r0, t5); // pextlh t6, r0, t5 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pand(t5, t6, a3); // pand t5, t6, a3 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->psllw(t5, t5, 5); // psllw t5, t5, 5 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->daddiu(t2, t2, -48); // daddiu t2, t2, -48 + c->daddiu(t3, t3, -16); // daddiu t3, t3, -16 + //beq r0, r0, L55 // beq r0, r0, L55 + c->daddiu(t4, t4, -16); // daddiu t4, t4, -16 + goto block_2; // branch always + + + block_1: + c->pextlh(t6, r0, ra); // pextlh t6, r0, ra + c->sq(t5, 0, t2); // sq t5, 0(t2) + c->pand(t5, t6, a3); // pand t5, t6, a3 + c->sq(t7, 16, t2); // sq t7, 16(t2) + c->psllw(t5, t5, 5); // psllw t5, t5, 5 + c->sq(t8, 32, t2); // sq t8, 32(t2) + + block_2: + c->paddw(gp, t5, a2); // paddw gp, t5, a2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->dsrl32(s4, gp, 0); // dsrl32 s4, gp, 0 + c->daddiu(t2, t2, 48); // daddiu t2, t2, 48 + c->pcpyud(s5, gp, r0); // pcpyud s5, gp, r0 + c->lq(t5, 0, gp); // lq t5, 0(gp) + c->dsrl32(t8, s5, 0); // dsrl32 t8, s5, 0 + c->daddiu(t3, t3, 16); // daddiu t3, t3, 16 + c->pand(t6, t6, t1); // pand t6, t6, t1 + c->lq(t7, 0, s4); // lq t7, 0(s4) + c->psraw(ra, t6, 8); // psraw ra, t6, 8 + c->lq(t6, 0, s5); // lq t6, 0(s5) + c->pextuw(s3, t7, t5); // pextuw s3, t7, t5 + c->lq(t9, 0, t8); // lq t9, 0(t8) + c->daddiu(t4, t4, 16); // daddiu t4, t4, 16 + c->daddiu(v1, v1, 8); // daddiu v1, v1, 8 + c->pextuw(s2, t9, t6); // pextuw s2, t9, t6 + c->lw(gp, 28, gp); // lw gp, 28(gp) + c->pcpyud(s3, s3, s2); // pcpyud s3, s3, s2 + c->lw(s4, 28, s4); // lw s4, 28(s4) + c->paddh(s3, s3, t0); // paddh s3, s3, t0 + c->lw(s5, 28, s5); // lw s5, 28(s5) + c->pand(s3, s3, a1); // pand s3, s3, a1 + c->lw(t8, 28, t8); // lw t8, 28(t8) + c->por(ra, s3, ra); // por ra, s3, ra + c->sw(gp, 0, t3); // sw gp, 0(t3) + c->prot3w(t9, t9); // prot3w t9, t9 + c->sq(ra, 0, t4); // sq ra, 0(t4) + c->prot3w(t7, t7); // prot3w t7, t7 + c->sw(s4, 4, t3); // sw s4, 4(t3) + c->pextuw(gp, t7, t5); // pextuw gp, t7, t5 + c->sw(s5, 8, t3); // sw s5, 8(t3) + c->pcpyld(t7, t6, t7); // pcpyld t7, t6, t7 + c->ld(ra, 0, v1); // ld ra, 0(v1) + c->pcpyld(t5, gp, t5); // pcpyld t5, gp, t5 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextuw(t6, t9, t6); // pextuw t6, t9, t6 + c->sw(t8, 12, t3); // sw t8, 12(t3) + bc = c->sgpr64(v1) != c->sgpr64(a0); // bne v1, a0, L54 + c->pcpyld(t8, t9, t6); // pcpyld t8, t9, t6 + if (bc) {goto block_1;} // branch non-likely + + // nop // sll r0, r0, 0 + c->sq(t5, 0, t2); // sq t5, 0(t2) + // nop // sll r0, r0, 0 + c->sq(t7, 16, t2); // sq t7, 16(t2) + // nop // sll r0, r0, 0 + c->sq(t8, 32, t2); // sq t8, 32(t2) + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + c->ld(ra, 12432, at); // ld ra, 12432(at) + c->lq(gp, 12512, at); // lq gp, 12512(at) + c->lq(s5, 12496, at); // lq s5, 12496(at) + c->lq(s4, 12480, at); // lq s4, 12480(at) + c->lq(s3, 12464, at); // lq s3, 12464(at) + c->lq(s2, 12448, at); // lq s2, 12448(at) + //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 + // 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-no-light-proc", execute, 128); +} + +} // namespace generic_no_light_proc +} // namespace Mips2C +// add generic_no_light_proc::link to the link callback table for the object file. +// FWD DEC: + +//--------------------------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_warp_dest { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* + void* warp_shader; // *warp-shader* + void* generic_no_light_proc; // generic-no-light-proc + void* generic_warp_dest_proc; // generic-warp-dest-proc +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 madr, sadr, qwc; + [[maybe_unused]] u32 call_addr = 0; + c->daddiu(sp, sp, -32); // daddiu sp, sp, -32 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(gp, 16, sp); // sq gp, 16(sp) + c->daddiu(v1, s7, 4); // daddiu v1, s7, #t + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L14 + c->mov64(v0, s7); // or v0, s7, r0 + if (bc) {goto block_8;} // branch non-likely + + get_fake_spad_addr2(at, cache.fake_scratchpad_data, 0, c);// lui at, 28672 + c->mov64(v1, a0); // or v1, a0, r0 + c->load_symbol2(gp, cache.warp_shader); // lw gp, *warp-shader*(s7) + c->addiu(a0, r0, 14); // addiu a0, r0, 14 + c->sh(a0, 11984, at); // sh a0, 11984(at) + 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) + c->daddiu(v1, at, 12064); // daddiu v1, at, 12064 + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->lbu(a0, 6842, a0); // lbu a0, 6842(a0) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L11 + c->mov64(a0, s7); // or a0, s7, r0 + if (bc) {goto block_3;} // branch non-likely + + c->addiu(v1, r0, 6960); // addiu v1, r0, 6960 + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->daddu(v1, v1, a0); // daddu v1, v1, a0 + c->mov64(v1, v1); // or v1, v1, r0 + c->mov64(a0, v1); // or a0, v1, r0 + + block_3: + c->sw(v1, 52, at); // sw v1, 52(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); + c->ld(v1, 0, gp); // ld v1, 0(gp) + c->ld(a0, 16, gp); // ld a0, 16(gp) + c->ld(a1, 32, gp); // ld a1, 32(gp) + c->ld(a2, 48, gp); // ld a2, 48(gp) + c->ld(a3, 64, gp); // ld a3, 64(gp) + c->ld(t0, 11936, at); // ld t0, 11936(at) + c->lw(t1, 24, at); // lw t1, 24(at) + c->sd(v1, 128, t1); // sd v1, 128(t1) + c->sd(a0, 144, t1); // sd a0, 144(t1) + c->sd(a1, 160, t1); // sd a1, 160(t1) + c->sd(a2, 176, t1); // sd a2, 176(t1) + c->sd(a3, 192, t1); // sd a3, 192(t1) + c->sd(t0, 96, t1); // sd t0, 96(t1) + c->load_symbol2(t9, cache.generic_warp_dest_proc);// lw t9, generic-warp-dest-proc(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 + generic_warp_dest_proc::execute(c); + c->load_symbol2(t9, cache.generic_no_light_proc); // lw t9, generic-no-light-proc(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 + generic_no_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 +// bc = c->sgpr64(t1) == 0; // beq t1, r0, L13 +// // 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, L12 +// 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(v0, v1, 4608); // xori v0, v1, 4608 + c->sw(v0, 24, at); // sw v0, 24(at) + + block_8: + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 16, sp); // lq gp, 16(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 32); // daddiu sp, sp, 32 + goto end_of_function; // return + + // 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 + 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.warp_shader = intern_from_c(-1, 0, "*warp-shader*").c(); + cache.generic_no_light_proc = intern_from_c(-1, 0, "generic-no-light-proc").c(); + cache.generic_warp_dest_proc = intern_from_c(-1, 0, "generic-warp-dest-proc").c(); + gLinkedFunctionTable.reg("generic-warp-dest", execute, 128); +} + +} // namespace generic_warp_dest +} // namespace Mips2C +// add generic_warp_dest::link to the link callback table for the object file. +// FWD DEC: + +//--------------------------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_warp_envmap_dest { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* + void* warp_shader; // *warp-shader* + void* generic_envmap_proc; // generic-envmap-proc + void* generic_no_light_proc; // generic-no-light-proc + void* generic_warp_dest_proc; // generic-warp-dest-proc +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + [[maybe_unused]] u32 call_addr = 0; + u32 qwc = 0; + u32 madr = 0; + u32 sadr = 0; + c->daddiu(sp, sp, -32); // daddiu sp, sp, -32 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(gp, 16, sp); // sq gp, 16(sp) + c->daddiu(v1, s7, 4); // daddiu v1, s7, #t + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L9 + c->mov64(v0, s7); // or v0, s7, r0 + if (bc) {goto block_11;} // branch non-likely + + get_fake_spad_addr2(at, cache.fake_scratchpad_data, 0, c);// lui at, 28672 + c->mov64(v1, a0); // or v1, a0, r0 + c->load_symbol2(gp, cache.warp_shader); // lw gp, *warp-shader*(s7) + c->addiu(a0, r0, 14); // addiu a0, r0, 14 + c->sh(a0, 11984, at); // sh a0, 11984(at) + c->sw(r0, 48, at); // sw r0, 48(at) + c->sw(v1, 44, at); // sw v1, 44(at) + c->addiu(v1, r0, 1); // addiu v1, r0, 1 + c->sh(v1, 56, at); // sh v1, 56(at) + c->daddiu(v1, at, 12064); // daddiu v1, at, 12064 + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->lbu(a0, 6842, a0); // lbu a0, 6842(a0) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L4 + c->mov64(a0, s7); // or a0, s7, r0 + if (bc) {goto block_3;} // branch non-likely + + c->addiu(v1, r0, 6960); // addiu v1, r0, 6960 + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->daddu(v1, v1, a0); // daddu v1, v1, a0 + c->mov64(v1, v1); // or v1, v1, r0 + c->mov64(a0, v1); // or a0, v1, r0 + + block_3: + c->sw(v1, 52, at); // sw v1, 52(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); + c->ld(v1, 0, gp); // ld v1, 0(gp) + c->ld(a0, 16, gp); // ld a0, 16(gp) + c->ld(a1, 32, gp); // ld a1, 32(gp) + c->ld(a2, 48, gp); // ld a2, 48(gp) + c->ld(t0, 64, gp); // ld t0, 64(gp) + c->ld(a3, 11936, at); // ld a3, 11936(at) + get_fake_spad_addr2(t1, cache.fake_scratchpad_data, 0, c);// lui t1, 28672 + c->lbu(t1, 6856, t1); // lbu t1, 6856(t1) + c->addiu(t2, r0, 128); // addiu t2, r0, 128 + c->sltu(t2, t2, t1); // sltu t2, t2, t1 + bc = c->sgpr64(t2) != 0; // bne t2, r0, L5 + // nop // sll r0, r0, 0 + if (bc) {goto block_5;} // branch non-likely + + c->addiu(t2, r0, 128); // addiu t2, r0, 128 + c->dsubu(t1, t2, t1); // dsubu t1, t2, t1 + c->dsll32(t1, t1, 24); // dsll32 t1, t1, 24 + c->dsrl(t1, t1, 24); // dsrl t1, t1, 24 + c->ori(t1, t1, 100); // ori t1, t1, 100 + c->mov64(t1, t1); // or t1, t1, r0 + c->mov64(t2, t1); // or t2, t1, r0 + //beq r0, r0, L6 // beq r0, r0, L6 + // nop // sll r0, r0, 0 + goto block_6; // branch always + + + block_5: + c->ld(t1, 11904, at); // ld t1, 11904(at) + c->mov64(t2, t1); // or t2, t1, r0 + + block_6: + c->lw(t2, 24, at); // lw t2, 24(at) + c->sd(v1, 128, t2); // sd v1, 128(t2) + c->sd(a0, 144, t2); // sd a0, 144(t2) + c->sd(a1, 160, t2); // sd a1, 160(t2) + c->sd(a2, 176, t2); // sd a2, 176(t2) + c->sd(t0, 192, t2); // sd t0, 192(t2) + c->addiu(v1, r0, 71); // addiu v1, r0, 71 + c->sd(a3, 96, t2); // sd a3, 96(t2) + c->addiu(a0, r0, 66); // addiu a0, r0, 66 + c->sd(t1, 112, t2); // sd t1, 112(t2) + c->sw(v1, 104, t2); // sw v1, 104(t2) + c->sw(a0, 120, t2); // sw a0, 120(t2) + c->load_symbol2(t9, cache.generic_warp_dest_proc);// lw t9, generic-warp-dest-proc(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 + generic_warp_dest_proc::execute(c); + c->load_symbol2(t9, cache.generic_no_light_proc); // lw t9, generic-no-light-proc(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 + generic_no_light_proc::execute(c); + c->load_symbol2(t9, cache.generic_envmap_proc); // lw t9, generic-envmap-proc(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 + 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 +// bc = c->sgpr64(t1) == 0; // beq t1, r0, L8 +// // nop // sll r0, r0, 0 +// if (bc) {goto block_10;} // branch non-likely +// +// c->mov64(t1, a2); // or t1, a2, r0 +// // nop // sll r0, r0, 0 +// +// block_8: +// 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, L7 +// c->sw(t2, 0, t0); // sw t2, 0(t0) +// if (bc) {goto block_8;} // branch non-likely + + // c->gprs[t0].du64[0] = 0; // or t0, r0, r0 + + // block_10: + 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(v0, v1, 4608); // xori v0, v1, 4608 + c->sw(v0, 24, at); // sw v0, 24(at) + + block_11: + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 16, sp); // lq gp, 16(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 32); // daddiu sp, sp, 32 + 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.warp_shader = intern_from_c(-1, 0, "*warp-shader*").c(); + cache.generic_envmap_proc = intern_from_c(-1, 0, "generic-envmap-proc").c(); + cache.generic_no_light_proc = intern_from_c(-1, 0, "generic-no-light-proc").c(); + cache.generic_warp_dest_proc = intern_from_c(-1, 0, "generic-warp-dest-proc").c(); + gLinkedFunctionTable.reg("generic-warp-envmap-dest", execute, 128); +} + +} // namespace generic_warp_envmap_dest +} // namespace Mips2C +// add generic_warp_envmap_dest::link to the link callback table for the object file. +// FWD DEC: diff --git a/game/mips2c/jak3_functions/joint.cpp b/game/mips2c/jak3_functions/joint.cpp new file mode 100644 index 0000000000..d5a7140701 --- /dev/null +++ b/game/mips2c/jak3_functions/joint.cpp @@ -0,0 +1,162 @@ + +//--------------------------MIPS2C--------------------- +#include "game/mips2c/mips2c_private.h" + +namespace Mips2C::jak3 { +// main function for (parent bone, transformq) -> child bone +// this is used to compute world-space bones, used for collision and similar. +// This includes the weird w divisor thing +// This does not take into account the bind pose for mesh drawing. +// (that's handled in bones.gc, which combines this with the bind pose to get the merc/pris matrix) +namespace cspace_parented_transformq_joint { +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + // nop // sll r0, r0, 0 + c->lw(a3, 0, a0); // lw a3, 0(a0) + c->lui(v1, 16256); // lui v1, 16256 + c->lqc2(vf5, 16, a1); // lqc2 vf5, 16(a1) + c->mtc1(f0, v1); // mtc1 f0, v1 + c->lw(t0, 16, a3); // lw t0, 16(a3) + // nop // sll r0, r0, 0 + c->lw(a2, 16, a0); // lw a2, 16(a0) + c->vadd(DEST::xyzw, vf6, vf5, vf5); // vadd.xyzw vf6, vf5, vf5 + c->lwc1(f1, 64, t0); // lwc1 f1, 64(t0) + c->vadd_bc(DEST::x, BC::w, vf2, vf0, vf5); // vaddw.x vf2, vf0, vf5 + c->lqc2(vf15, 0, a1); // lqc2 vf15, 0(a1) + c->vadd_bc(DEST::y, BC::z, vf2, vf0, vf5); // vaddz.y vf2, vf0, vf5 + c->lqc2(vf1, 32, a1); // lqc2 vf1, 32(a1) + c->divs_accurate(f4, f0, f1); // div.s f4, f0, f1 + c->lqc2(vf7, 0, t0); // lqc2 vf7, 0(t0) + c->vsub_bc(DEST::z, BC::y, vf2, vf0, vf5); // vsuby.z vf2, vf0, vf5 + c->lqc2(vf8, 16, t0); // lqc2 vf8, 16(t0) + // sets vf2.w to 0 + c->vsub_bc(DEST::w, BC::w, vf2, vf0, vf0); // vsubw.w vf2, vf0, vf0 + c->lqc2(vf9, 32, t0); // lqc2 vf9, 32(t0) + c->vsub_bc(DEST::x, BC::z, vf3, vf0, vf5); // vsubz.x vf3, vf0, vf5 + c->lqc2(vf10, 48, t0); // lqc2 vf10, 48(t0) + c->vadd_bc(DEST::y, BC::w, vf3, vf0, vf5); // vaddw.y vf3, vf0, vf5 + c->lwc1(f2, 68, t0); // lwc1 f2, 68(t0) + c->vadd_bc(DEST::z, BC::x, vf3, vf0, vf5); // vaddx.z vf3, vf0, vf5 + c->sqc2(vf1, 64, a2); // sqc2 vf1, 64(a2) + c->vsub_bc(DEST::w, BC::w, vf3, vf0, vf0); // vsubw.w vf3, vf0, vf0 + c->lwc1(f3, 72, t0); // lwc1 f3, 72(t0) + c->vadd_bc(DEST::x, BC::y, vf4, vf0, vf5); // vaddy.x vf4, vf0, vf5 + c->lw(v1, 76, t0); // lw v1, 76(t0) + c->vsub_bc(DEST::y, BC::x, vf4, vf0, vf5); // vsubx.y vf4, vf0, vf5 + c->mfc1(t1, f4); // mfc1 t1, f4 + c->vadd_bc(DEST::z, BC::w, vf4, vf0, vf5); // vaddw.z vf4, vf0, vf5 + c->divs_accurate(f4, f0, f2); // div.s f4, f0, f2 + c->vsub_bc(DEST::w, BC::w, vf4, vf0, vf0); // vsubw.w vf4, vf0, vf0 + c->vopmula(vf6, vf2); // vopmula.xyz acc, vf6, vf2 + c->vopmsub(vf2, vf2, vf6); // vopmsub.xyz vf2, vf2, vf6 + c->vopmula(vf6, vf3); // vopmula.xyz acc, vf6, vf3 + c->vopmsub(vf3, vf3, vf6); // vopmsub.xyz vf3, vf3, vf6 + c->vopmula(vf6, vf4); // vopmula.xyz acc, vf6, vf4 + c->vopmsub(vf4, vf4, vf6); // vopmsub.xyz vf4, vf4, vf6 + c->vadd_bc(DEST::x, BC::w, vf2, vf2, vf0); // vaddw.x vf2, vf2, vf0 + c->vadd_bc(DEST::y, BC::w, vf3, vf3, vf0); // vaddw.y vf3, vf3, vf0 + c->vadd_bc(DEST::z, BC::w, vf4, vf4, vf0); // vaddw.z vf4, vf4, vf0 + c->mfc1(t2, f4); // mfc1 t2, f4 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L50 + c->divs_accurate(f4, f0, f3); // div.s f4, f0, f3 + if (bc) { + goto block_2; + } // branch non-likely + + c->vmul_bc(DEST::xyzw, BC::x, vf2, vf2, vf1); // vmulx.xyzw vf2, vf2, vf1 + c->vmul_bc(DEST::xyzw, BC::y, vf3, vf3, vf1); // vmuly.xyzw vf3, vf3, vf1 + c->vmul_bc(DEST::xyzw, BC::z, vf4, vf4, vf1); // vmulz.xyzw vf4, vf4, vf1 + c->vmula_bc(DEST::xyzw, BC::x, vf7, vf2); // vmulax.xyzw acc, vf7, vf2 + c->vmadda_bc(DEST::xyzw, BC::y, vf8, vf2); // vmadday.xyzw acc, vf8, vf2 + c->vmadda_bc(DEST::xyzw, BC::z, vf9, vf2); // vmaddaz.xyzw acc, vf9, vf2 + c->vmadd_bc(DEST::xyzw, BC::w, vf11, vf10, vf2); // vmaddw.xyzw vf11, vf10, vf2 + c->vmula_bc(DEST::xyzw, BC::x, vf7, vf3); // vmulax.xyzw acc, vf7, vf3 + c->vmadda_bc(DEST::xyzw, BC::y, vf8, vf3); // vmadday.xyzw acc, vf8, vf3 + c->vmadda_bc(DEST::xyzw, BC::z, vf9, vf3); // vmaddaz.xyzw acc, vf9, vf3 + c->vmadd_bc(DEST::xyzw, BC::w, vf12, vf10, vf3); // vmaddw.xyzw vf12, vf10, vf3 + c->vmula_bc(DEST::xyzw, BC::x, vf7, vf4); // vmulax.xyzw acc, vf7, vf4 + c->vmadda_bc(DEST::xyzw, BC::y, vf8, vf4); // vmadday.xyzw acc, vf8, vf4 + c->vmadda_bc(DEST::xyzw, BC::z, vf9, vf4); // vmaddaz.xyzw acc, vf9, vf4 + c->vmadd_bc(DEST::xyzw, BC::w, vf13, vf10, vf4); // vmaddw.xyzw vf13, vf10, vf4 + c->vmula_bc(DEST::xyzw, BC::x, vf7, vf15); // vmulax.xyzw acc, vf7, vf15 + c->vmadda_bc(DEST::xyzw, BC::y, vf8, vf15); // vmadday.xyzw acc, vf8, vf15 + c->vmadda_bc(DEST::xyzw, BC::z, vf9, vf15); // vmaddaz.xyzw acc, vf9, vf15 + c->vmadd_bc(DEST::xyzw, BC::w, vf14, vf10, vf0); // vmaddw.xyzw vf14, vf10, vf0 + c->sqc2(vf11, 0, a2); // sqc2 vf11, 0(a2) + c->sqc2(vf12, 16, a2); // sqc2 vf12, 16(a2) + c->sqc2(vf13, 32, a2); // sqc2 vf13, 32(a2) + c->sqc2(vf14, 48, a2); // sqc2 vf14, 48(a2) + // jr ra // jr ra + // nop // sll r0, r0, 0 + goto end_of_function; // return + +block_2: + c->pextlw(t1, t2, t1); // pextlw t1, t2, t1 + c->vmul_bc(DEST::xyzw, BC::x, vf2, vf2, vf1); // vmulx.xyzw vf2, vf2, vf1 + c->vmul_bc(DEST::xyzw, BC::y, vf3, vf3, vf1); // vmuly.xyzw vf3, vf3, vf1 + c->vmul_bc(DEST::xyzw, BC::z, vf4, vf4, vf1); // vmulz.xyzw vf4, vf4, vf1 + // here, f4 is 1/scale. Sometimes the scale out of the joint compression code is slightly negative + // this leads to mfc1 sign extending 1's into the upper 32 bits of t3 (this is weirdly how the ps2 + // does it). + c->mfc1(t3, f4); // mfc1 t3, f4 + // and this brings those ones into bits 96-128 + c->pcpyld(t1, t3, t1); // pcpyld t1, t3, t1 + // so here, vf16.w is usually 0, except for when the scale is negative, then it's 0xffff'ffff + // (NaN on x86, -BIG on PS2) + c->mov128_vf_gpr(vf16, t1); // qmtc2.i vf16, t1 + // here, vf2/3/4's w's are all 0. On PS2, this always keeps them as 0. + // but on x86, this propagates NaNs: 0 * NaN = NaN. + // so: + c->vfs[vf16].vf.w() = 0; // PATCH to clear invalid float that will be multiplied by 0 below + // (this might seem weird because the multiplication sequence could have 3 instructions removed + // because we know that vf2/3/4.w are all 0. But maybe this is just copy-pasted, or it didn't + // really matter because it would have stalled in place of that 1 cycle instruction because + // multiplication latency is 4). + + c->vmul(DEST::xyzw, vf2, vf2, vf16); // vmul.xyzw vf2, vf2, vf16 + c->vmul(DEST::xyzw, vf3, vf3, vf16); // vmul.xyzw vf3, vf3, vf16 + c->vmul(DEST::xyzw, vf4, vf4, vf16); // vmul.xyzw vf4, vf4, vf16 + c->vmula_bc(DEST::xyzw, BC::x, vf7, vf2); // vmulax.xyzw acc, vf7, vf2 + c->vmadda_bc(DEST::xyzw, BC::y, vf8, vf2); // vmadday.xyzw acc, vf8, vf2 + c->vmadda_bc(DEST::xyzw, BC::z, vf9, vf2); // vmaddaz.xyzw acc, vf9, vf2 + c->vmadd_bc(DEST::xyzw, BC::w, vf11, vf10, vf2); // vmaddw.xyzw vf11, vf10, vf2 + c->vmula_bc(DEST::xyzw, BC::x, vf7, vf3); // vmulax.xyzw acc, vf7, vf3 + c->vmadda_bc(DEST::xyzw, BC::y, vf8, vf3); // vmadday.xyzw acc, vf8, vf3 + c->vmadda_bc(DEST::xyzw, BC::z, vf9, vf3); // vmaddaz.xyzw acc, vf9, vf3 + c->vmadd_bc(DEST::xyzw, BC::w, vf12, vf10, vf3); // vmaddw.xyzw vf12, vf10, vf3 + c->vmula_bc(DEST::xyzw, BC::x, vf7, vf4); // vmulax.xyzw acc, vf7, vf4 + c->vmadda_bc(DEST::xyzw, BC::y, vf8, vf4); // vmadday.xyzw acc, vf8, vf4 + c->vmadda_bc(DEST::xyzw, BC::z, vf9, vf4); // vmaddaz.xyzw acc, vf9, vf4 + c->vmadd_bc(DEST::xyzw, BC::w, vf13, vf10, vf4); // vmaddw.xyzw vf13, vf10, vf4 + c->vmula_bc(DEST::xyzw, BC::x, vf7, vf15); // vmulax.xyzw acc, vf7, vf15 + c->vmadda_bc(DEST::xyzw, BC::y, vf8, vf15); // vmadday.xyzw acc, vf8, vf15 + c->vmadda_bc(DEST::xyzw, BC::z, vf9, vf15); // vmaddaz.xyzw acc, vf9, vf15 + c->vmadd_bc(DEST::xyzw, BC::w, vf14, vf10, vf0); // vmaddw.xyzw vf14, vf10, vf0 + c->sqc2(vf11, 0, a2); // sqc2 vf11, 0(a2) + c->sqc2(vf12, 16, a2); // sqc2 vf12, 16(a2) + c->sqc2(vf13, 32, a2); // sqc2 vf13, 32(a2) + c->sqc2(vf14, 48, a2); // sqc2 vf14, 48(a2) + // 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() { + gLinkedFunctionTable.reg("cspace<-parented-transformq-joint!", execute, 128); +} + +} // namespace cspace_parented_transformq_joint +} // namespace Mips2C::jak3 + // add cspace<_parented_transformq_joint::link to the link callback table for the object file. + // FWD DEC: \ No newline at end of file diff --git a/game/mips2c/jak3_functions/lights.cpp b/game/mips2c/jak3_functions/lights.cpp index 8b45194523..2eb02c3296 100644 --- a/game/mips2c/jak3_functions/lights.cpp +++ b/game/mips2c/jak3_functions/lights.cpp @@ -12,7 +12,6 @@ struct Cache { u64 execute(void* ctxt) { auto* c = (ExecutionContext*)ctxt; bool bc = false; - u32 call_addr = 0; c->daddiu(sp, sp, -48); // daddiu sp, sp, -48 c->sd(ra, 0, sp); // sd ra, 0(sp) c->daddiu(t0, sp, 16); // daddiu t0, sp, 16 @@ -158,7 +157,6 @@ struct Cache { u64 execute(void* ctxt) { auto* c = (ExecutionContext*)ctxt; bool bc = false; - u32 call_addr = 0; c->daddiu(sp, sp, -48); // daddiu sp, sp, -48 c->daddiu(v1, sp, 16); // daddiu v1, sp, 16 // nop // sll r0, r0, 0 @@ -294,7 +292,6 @@ namespace add_light_sphere_to_light_group { u64 execute(void* ctxt) { auto* c = (ExecutionContext*)ctxt; bool bc = false; - u32 call_addr = 0; bool cop1_bc = false; // nop // sll r0, r0, 0 // nop // sll r0, r0, 0 @@ -700,7 +697,6 @@ namespace light_hash_get_bucket_index { u64 execute(void* ctxt) { auto* c = (ExecutionContext*)ctxt; bool bc = false; - u32 call_addr = 0; c->daddiu(sp, sp, -32); // daddiu sp, sp, -32 c->daddiu(v1, sp, 16); // daddiu v1, sp, 16 // nop // sll r0, r0, 0 diff --git a/game/mips2c/jak3_functions/merc_blend_shape.cpp b/game/mips2c/jak3_functions/merc_blend_shape.cpp new file mode 100644 index 0000000000..2e1f8cf8de --- /dev/null +++ b/game/mips2c/jak3_functions/merc_blend_shape.cpp @@ -0,0 +1,598 @@ +//--------------------------MIPS2C--------------------- + +#include + +#include "common/global_profiler/GlobalProfiler.h" + +#include "game/kernel/jak3/kscheme.h" +#include "game/mips2c/mips2c_private.h" + +// clang-format off + +extern std::mutex g_merc_data_mutex; + +#include "game/mips2c/mips2c_private.h" +#include "game/kernel/jak3/kscheme.h" +using ::jak3::intern_from_c; +namespace Mips2C::jak3 { +namespace blerc_execute { +struct Cache { + void* blerc_globals; // *blerc-globals* + void* fake_scratchpad_data; // *fake-scratchpad-data* + void* gsf_buffer; // *gsf-buffer* + void* stats_blerc; // *stats-blerc* + void* flush_cache; // flush-cache +} cache; + +u64 execute(void* ctxt) { + [[maybe_unused]] bool hit18 = false; + [[maybe_unused]] bool hit19 = false; + auto pp = scoped_prof("blerc-exec"); + std::unique_lock lk(g_merc_data_mutex); + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + u32 madr, sadr, qwc, tadr; + 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->load_symbol2(v1, cache.blerc_globals); // lw v1, *blerc-globals*(s7) + c->lwu(s5, 0, v1); // lwu s5, 0(v1) + bc = c->sgpr64(s5) == 0; // beq s5, r0, L55 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_33;} // branch non-likely + + c->addiu(v1, r0, 0); // addiu v1, r0, 0 + c->addiu(gp, r0, 0); // addiu gp, r0, 0 + c->addiu(v1, r0, 0); // addiu v1, r0, 0 + c->load_symbol2(v1, cache.gsf_buffer); // lw v1, *gsf-buffer*(s7) + c->load_symbol2(t9, cache.flush_cache); // lw t9, flush-cache(s7) + c->addiu(a0, r0, 0); // addiu a0, r0, 0 + 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->addiu(v1, r0, 848); // addiu v1, r0, 848 + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->daddu(a1, v1, a0); // daddu a1, v1, a0 + c->load_symbol2(v1, cache.blerc_globals); // lw v1, *blerc-globals*(s7) + c->daddu(v1, r0, v1); // daddu v1, r0, v1 + // nop // sll r0, r0, 0 + c->lui(a0, 4096); // lui a0, 4096 + // nop // sll r0, r0, 0 + c->ori(a0, a0, 54272); // ori a0, a0, 54272 + c->andi(a1, a1, 16383); // andi a1, a1, 16383 + +// block_2: +// c->lw(a2, 0, a0); // lw a2, 0(a0) +// // nop // sll r0, r0, 0 +// // nop // sll r0, r0, 0 +// // nop // sll r0, r0, 0 +// c->andi(a2, a2, 256); // andi a2, a2, 256 +// // nop // sll r0, r0, 0 +// bc = c->sgpr64(a2) != 0; // bne a2, r0, L37 +// c->lw(a2, 0, v1); // lw a2, 0(v1) +// if (bc) {goto block_2;} // branch non-likely + c->lw(a2, 0, v1); + + bc = c->sgpr64(a2) == 0; // beq a2, r0, L38 + // c->sw(a1, 128, a0); // sw a1, 128(a0) + sadr = c->sgpr64(a1); + if (bc) {goto block_5;} // branch non-likely + + c->addiu(v1, r0, 324); // addiu v1, r0, 324 + // c->sw(a2, 48, a0); // sw a2, 48(a0) + tadr = c->sgpr64(a2); + // c->sw(r0, 32, a0); // sw r0, 32(a0) + // Unknown instr: sync.l + // c->sw(v1, 0, a0); // sw v1, 0(a0) + spad_to_dma_blerc_chain(cache.fake_scratchpad_data, sadr, tadr); + // Unknown instr: sync.l + +block_5: + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + //beq r0, r0, L54 // beq r0, r0, L54 + // nop // sll r0, r0, 0 + goto block_31; // branch always + + +block_6: + bc = c->sgpr64(gp) != 0; // bne gp, r0, L40 + // nop // sll r0, r0, 0 + if (bc) {goto block_8;} // branch non-likely + + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->daddu(a0, r0, v1); // daddu a0, r0, v1 + //beq r0, r0, L41 // beq r0, r0, L41 + // nop // sll r0, r0, 0 + goto block_9; // branch always + + +block_8: + c->addiu(v1, r0, 8192); // addiu v1, r0, 8192 + get_fake_spad_addr2(a0, cache.fake_scratchpad_data, 0, c);// lui a0, 28672 + c->daddu(a0, v1, a0); // daddu a0, v1, a0 + +block_9: + bc = c->sgpr64(gp) != 0; // bne gp, r0, L42 + // nop // sll r0, r0, 0 + if (bc) {goto block_11;} // branch non-likely + + c->addiu(v1, r0, 8192); // addiu v1, r0, 8192 + get_fake_spad_addr2(a1, cache.fake_scratchpad_data, 0, c);// lui a1, 28672 + c->daddu(a1, v1, a1); // daddu a1, v1, a1 + //beq r0, r0, L43 // beq r0, r0, L43 + // nop // sll r0, r0, 0 + goto block_12; // branch always + + +block_11: + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->daddu(a1, r0, v1); // daddu a1, r0, v1 + +block_12: + c->daddiu(v1, a0, 848); // daddiu v1, a0, 848 + c->daddu(a2, r0, a0); // daddu a2, r0, a0 + c->daddiu(a3, a1, 848); // daddiu a3, a1, 848 + c->daddiu(a1, v1, 12); // daddiu a1, v1, 12 + // nop // sll r0, r0, 0 + c->lui(a2, 4096); // lui a2, 4096 + // nop // sll r0, r0, 0 + c->ori(a2, a2, 54272); // ori a2, a2, 54272 + c->andi(a3, a3, 16383); // andi a3, a3, 16383 + +// block_13: +// c->lw(t0, 0, a2); // lw t0, 0(a2) +// // nop // sll r0, r0, 0 +// // nop // sll r0, r0, 0 +// // nop // sll r0, r0, 0 +// c->andi(t0, t0, 256); // andi t0, t0, 256 +// // nop // sll r0, r0, 0 +// bc = c->sgpr64(t0) != 0; // bne t0, r0, L44 +// c->lw(t0, 0, a1); // lw t0, 0(a1) +// if (bc) {goto block_13;} // branch non-likely + + c->lw(t0, 0, a1); + + bc = c->sgpr64(t0) == 0; // beq t0, r0, L45 + // c->sw(a3, 128, a2); // sw a3, 128(a2) + sadr = c->sgpr64(a3); + if (bc) {goto block_16;} // branch non-likely + + c->addiu(a1, r0, 324); // addiu a1, r0, 324 + // c->sw(t0, 48, a2); // sw t0, 48(a2) + tadr = c->sgpr64(t0); + // c->sw(r0, 32, a2); // sw r0, 32(a2) + // Unknown instr: sync.l + // c->sw(a1, 0, a2); // sw a1, 0(a2) + // Unknown instr: sync.l + // tadr here is bogus, it's reading something uploaded by the other transfer. + spad_to_dma_blerc_chain(cache.fake_scratchpad_data, sadr, tadr); + +block_16: + c->gprs[a1].du64[0] = 0; // or a1, r0, r0 + c->mov64(a2, a0); // or a2, a0, r0 + c->load_symbol2(a3, cache.gsf_buffer); // lw a3, *gsf-buffer*(s7) + + // blerc_c(g_ee_main_mem + c->sgpr64(a2), g_ee_main_mem + c->sgpr64(a3)); + + + c->daddiu(t2, a2, 880); // daddiu t2, a2, 880 + c->lb(t1, 0, t2); // lb t1, 0(t2) + // nop // sll r0, r0, 0 + c->mov64(t0, a2); // or t0, a2, r0 + c->lw(a1, 868, a2); // lw a1, 868(a2) + c->daddiu(t3, t1, 1); // daddiu t3, t1, 1 + c->mov64(t1, a3); // or t1, a3, r0 + c->sll(t8, t3, 4); // sll t8, t3, 4 + c->sll(t3, a1, 4); // sll t3, a1, 4 + c->daddu(t9, t3, a3); // daddu t9, t3, a3 + c->daddu(t3, t2, t8); // daddu t3, t2, t8 + bc = c->sgpr64(a1) == 0; // beq a1, r0, L48 + c->daddiu(ra, t2, 16); // daddiu ra, t2, 16 + if (bc) {goto block_21;} // branch non-likely + + c->lh(t5, 12, t3); // lh t5, 12(t3) + c->daddu(t2, t3, t8); // daddu t2, t3, t8 + //beq r0, r0, L47 // beq r0, r0, L47 + // nop // sll r0, r0, 0 + goto block_19; // branch always + + +block_18: +hit18 = true; + c->lh(t5, 12, t2); // lh t5, 12(t2) + c->daddu(t2, t2, t8); // daddu t2, t2, t8 + c->sq(t6, 0, t1); // sq t6, 0(t1) + c->daddiu(t1, t1, 16); // daddiu t1, t1, 16 + +block_19: +hit19 = true; + c->pcpyh(t5, t5); // pcpyh t5, t5 + c->mfc1(r0, f31); // mfc1 r0, f31 + bc = c->sgpr64(t1) != c->sgpr64(t9); // bne t1, t9, L46 + c->pcpyld(t6, t5, t5); // pcpyld t6, t5, t5 + if (bc) {goto block_18;} // branch non-likely + + c->dsubu(t3, t2, t8); // dsubu t3, t2, t8 + // nop // sll r0, r0, 0 + +block_21: + c->addiu(t1, r0, 255); // addiu t1, r0, 255 + c->addiu(t2, r0, 8192); // addiu t2, r0, 8192 + c->lb(s5, 0, t3); // lb s5, 0(t3) + c->daddiu(s4, t3, 16); // daddiu s4, t3, 16 + c->pcpyh(t1, t1); // pcpyh t1, t1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcpyld(t1, t1, t1); // pcpyld t1, t1, t1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcpyh(t2, t2); // pcpyh t2, t2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pcpyld(t2, t2, t2); // pcpyld t2, t2, t2 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->mov128_gpr_gpr(t3, t1); // por t3, t1, r0 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->mov128_gpr_gpr(t4, r0); // por t4, r0, r0 + c->mfc1(r0, f31); // mfc1 r0, f31 + +block_22: + c->ld(t6, 0, ra); // ld t6, 0(ra) + c->daddu(s2, ra, t8); // daddu s2, ra, t8 + c->daddiu(ra, ra, 8); // daddiu ra, ra, 8 + c->mov64(s3, a3); // or s3, a3, r0 + c->pextlb(t6, r0, t6); // pextlb t6, r0, t6 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pmulth(t7, t6, t2); // pmulth t7, t6, t2 + c->ld(t5, 0, s2); // ld t5, 0(s2) + c->daddiu(s5, s5, -1); // daddiu s5, s5, -1 + // nop // sll r0, r0, 0 + //beq r0, r0, L51 // beq r0, r0, L51 + c->daddu(s2, s2, t8); // daddu s2, s2, t8 + goto block_24; // branch always + + +block_23: + c->pmaddh(t7, t5, t6); // pmaddh t7, t5, t6 + c->ld(t5, 0, s2); // ld t5, 0(s2) + c->daddu(s2, s2, t8); // daddu s2, s2, t8 + c->daddiu(s3, s3, 16); // daddiu s3, s3, 16 + +block_24: + c->lq(t6, 0, s3); // lq t6, 0(s3) + c->pextlb(t5, t5, r0); // pextlb t5, t5, r0 + bc = c->sgpr64(s3) != c->sgpr64(t9); // bne s3, t9, L50 + c->psrah(t5, t5, 8); // psrah t5, t5, 8 + if (bc) {goto block_23;} // branch non-likely + + // Unknown instr: pmfhl.uw t5 + c->gprs[t5].du32[0] = c->lo.du32[1]; + c->gprs[t5].du32[1] = c->hi.du32[1]; + c->gprs[t5].du32[2] = c->lo.du32[3]; + c->gprs[t5].du32[3] = c->hi.du32[3]; + c->mfc1(r0, f31); // mfc1 r0, f31 + c->psraw(t7, t7, 13); // psraw t7, t7, 13 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->psraw(t5, t5, 13); // psraw t5, t5, 13 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pinteh(t5, t5, t7); // pinteh t5, t5, t7 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pminh(t3, t3, t5); // pminh t3, t3, t5 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pmaxh(t4, t4, t5); // pmaxh t4, t4, t5 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pminh(t5, t5, t1); // pminh t5, t5, t1 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pmaxh(t5, t5, r0); // pmaxh t5, t5, r0 + c->lq(t7, 0, s4); // lq t7, 0(s4) + c->ppacb(t5, r0, t5); // ppacb t5, r0, t5 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->ppach(t7, r0, t7); // ppach t7, r0, t7 + c->mfc1(r0, f31); // mfc1 r0, f31 + c->pextlh(t5, t5, t7); // pextlh t5, t5, t7 + c->mfc1(r0, f31); // mfc1 r0, f31 + // store modified vertex + c->sq(t5, 0, t0); // sq t5, 0(t0) + c->daddiu(t0, t0, 16); // daddiu t0, t0, 16 + bc = c->sgpr64(s5) != 0; // bne s5, r0, L49 + c->daddiu(s4, s4, 16); // daddiu s4, s4, 16 + if (bc) {goto block_22;} // branch non-likely + // end of blerc_c stuff + + c->load_symbol2(a3, cache.stats_blerc); // lw a3, *stats-blerc*(s7) + bc = c->sgpr64(a3) == c->sgpr64(s7); // beq a3, s7, L52 + c->load_symbol2(a3, cache.blerc_globals); // lw a3, *blerc-globals*(s7) + if (bc) {goto block_28;} // branch non-likely + + c->lw(t2, 12, a3); // lw t2, 12(a3) + c->lw(t1, 16, a3); // lw t1, 16(a3) + c->lw(t0, 20, a3); // lw t0, 20(a3) + c->lw(a2, 864, a2); // lw a2, 864(a2) + c->multu3(a1, a1, a2); // multu3 a1, a1, a2 + c->daddiu(t2, t2, 1); // daddiu t2, t2, 1 + c->daddu(a2, t1, a2); // daddu a2, t1, a2 + c->daddu(a1, t0, a1); // daddu a1, t0, a1 + c->sw(t2, 12, a3); // sw t2, 12(a3) + c->sw(a2, 16, a3); // sw a2, 16(a3) + c->sw(a1, 20, a3); // sw a1, 20(a3) + c->pcpyud(a1, t3, r0); // pcpyud a1, t3, r0 + c->pminh(t3, t3, a1); // pminh t3, t3, a1 + c->dsrl32(a1, t3, 0); // dsrl32 a1, t3, 0 + c->pminh(t3, t3, a1); // pminh t3, t3, a1 + c->dsrl(t3, t3, 16); // dsrl t3, t3, 16 + c->lh(a1, 8, a3); // lh a1, 8(a3) + c->pminh(t3, t3, a1); // pminh t3, t3, a1 + c->sh(t3, 8, a3); // sh t3, 8(a3) + c->pcpyud(a1, t4, r0); // pcpyud a1, t4, r0 + c->pmaxh(t4, t4, a1); // pmaxh t4, t4, a1 + c->dsrl32(a1, t4, 0); // dsrl32 a1, t4, 0 + c->pmaxh(t4, t4, a1); // pmaxh t4, t4, a1 + c->dsrl(t4, t4, 16); // dsrl t4, t4, 16 + c->lh(a1, 10, a3); // lh a1, 10(a3) + c->pmaxh(t4, t4, a1); // pmaxh t4, t4, a1 + c->sh(t4, 10, a3); // sh t4, 10(a3) + +block_28: + c->gprs[a1].du64[0] = 0; // or a1, r0, r0 + c->lwu(a1, 872, a0); // lwu a1, 872(a0) + c->mov64(a3, a0); // or a3, a0, r0 + c->lwu(a0, 876, a0); // lwu a0, 876(a0) + c->lui(a2, 4096); // lui a2, 4096 + // nop // sll r0, r0, 0 + c->ori(a2, a2, 53248); // ori a2, a2, 53248 + c->andi(a3, a3, 16383); // andi a3, a3, 16383 + +// block_29: +// c->lw(t0, 0, a2); // lw t0, 0(a2) +// // nop // sll r0, r0, 0 +// // nop // sll r0, r0, 0 +// // nop // sll r0, r0, 0 +// c->andi(t0, t0, 256); // andi t0, t0, 256 +// // nop // sll r0, r0, 0 +// bc = c->sgpr64(t0) != 0; // bne t0, r0, L53 +// // nop // sll r0, r0, 0 +// if (bc) {goto block_29;} // branch non-likely + + // c->sw(a3, 128, a2); // sw a3, 128(a2) + sadr = c->sgpr64(a3); + c->addiu(a3, r0, 256); // addiu a3, r0, 256 + // c->sw(a1, 16, a2); // sw a1, 16(a2) + madr = c->sgpr64(a1); + // nop // sll r0, r0, 0 + // c->sw(a0, 32, a2); // sw a0, 32(a2) + qwc = c->sgpr64(a0); + // Unknown instr: sync.l + // c->sw(a3, 0, a2); // sw a3, 0(a2) + // fmt::print("blerc download 0x{:x} <- 0x{:x} ({} qwc)\n", madr, sadr, qwc); + { + spad_from_dma_no_sadr_off(cache.fake_scratchpad_data, madr, sadr, qwc); + } + // Unknown instr: sync.l + c->gprs[a0].du64[0] = 0; // or a0, r0, r0 + c->addiu(a0, r0, 1); // addiu a0, r0, 1 + c->dsubu(gp, a0, gp); // dsubu gp, a0, gp + c->lwu(s5, 12, v1); // lwu s5, 12(v1) + c->mov64(v1, s5); // or v1, s5, r0 + +block_31: + bc = c->sgpr64(s5) != 0; // bne s5, r0, L39 + // nop // sll r0, r0, 0 + if (bc) {goto block_6;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + +block_33: + 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 + // nop // sll r0, r0, 0 +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + cache.blerc_globals = intern_from_c(-1, 0, "*blerc-globals*").c(); + 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.stats_blerc = intern_from_c(-1, 0, "*stats-blerc*").c(); + cache.flush_cache = intern_from_c(-1, 0, "flush-cache").c(); + gLinkedFunctionTable.reg("blerc-execute", execute, 256); +} + +} // namespace blerc_execute +} // 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 setup_blerc_chains_for_one_fragment { +struct Cache { + void* blerc_globals; // *blerc-globals* + void* fake_scratchpad_data; // *fake-scratchpad-data* +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + c->daddiu(sp, sp, -128); // daddiu sp, sp, -128 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s0, 16, sp); // sq s0, 16(sp) + c->sq(s1, 32, sp); // sq s1, 32(sp) + c->sq(s2, 48, sp); // sq s2, 48(sp) + c->sq(s3, 64, sp); // sq s3, 64(sp) + c->sq(s4, 80, sp); // sq s4, 80(sp) + c->sq(s5, 96, sp); // sq s5, 96(sp) + c->sq(gp, 112, sp); // sq gp, 112(sp) + c->lb(v1, 0, t0); // lb v1, 0(t0) + c->addiu(t2, r0, 0); // addiu t2, r0, 0 + c->mov128_gpr_gpr(t7, r0); // por t7, r0, r0 + c->load_symbol2(t3, cache.blerc_globals); // lw t3, *blerc-globals*(s7) + c->lw(t3, 4, t3); // lw t3, 4(t3) + c->mov64(t4, v1); // or t4, v1, r0 + +block_1: + c->lui(t7, 4096); // lui t7, 4096 + // nop // sll r0, r0, 0 + c->daddiu(t7, t7, 1); // daddiu t7, t7, 1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t3) == 0; // beq t3, r0, L11 + c->sq(t7, 0, a2); // sq t7, 0(a2) + if (bc) {goto block_3;} // branch non-likely + + c->sw(a2, 12, t3); // sw a2, 12(t3) + // nop // sll r0, r0, 0 + +block_3: + c->mov64(t3, a2); // or t3, a2, r0 + c->daddu(t6, t4, t4); // daddu t6, t4, t4 + c->daddu(t5, v1, v1); // daddu t5, v1, v1 + c->daddu(t6, t6, t4); // daddu t6, t6, t4 + c->daddu(t7, t5, v1); // daddu t7, t5, v1 + c->daddu(t5, t6, t6); // daddu t5, t6, t6 + c->daddu(t6, t7, t7); // daddu t6, t7, t7 + c->daddu(t7, t5, t5); // daddu t7, t5, t5 + c->daddiu(t6, t6, 15); // daddiu t6, t6, 15 + c->daddiu(t5, t5, 15); // daddiu t5, t5, 15 + c->andi(t6, t6, 65520); // andi t6, t6, 65520 + c->dsrl(t5, t5, 4); // dsrl t5, t5, 4 + c->daddu(t8, t2, t2); // daddu t8, t2, t2 + c->daddiu(t7, t7, 15); // daddiu t7, t7, 15 + c->daddu(t9, t8, t2); // daddu t9, t8, t2 + c->dsrl(t8, t7, 4); // dsrl t8, t7, 4 + c->daddu(ra, t9, t9); // daddu ra, t9, t9 + c->addiu(t9, r0, 0); // addiu t9, r0, 0 + c->daddu(t7, ra, ra); // daddu t7, ra, ra + c->daddiu(s3, a2, 32); // daddiu s3, a2, 32 + c->daddu(s2, ra, a3); // daddu s2, ra, a3 + c->daddu(ra, t7, t1); // daddu ra, t7, t1 + c->lui(t7, 12288); // lui t7, 12288 + c->daddiu(gp, a0, -1); // daddiu gp, a0, -1 + c->daddu(t7, t7, t5); // daddu t7, t7, t5 + c->mov64(s5, a1); // or s5, a1, r0 + c->sq(t7, 0, s3); // sq t7, 0(s3) + c->daddiu(s4, t0, 2); // daddiu s4, t0, 2 + c->sw(s2, 4, s3); // sw s2, 4(s3) + c->daddu(s2, s2, t6); // daddu s2, s2, t6 + c->daddiu(s3, s3, 16); // daddiu s3, s3, 16 + // nop // sll r0, r0, 0 + +block_4: + c->lb(s1, 0, s4); // lb s1, 0(s4) + c->daddiu(s4, s4, 1); // daddiu s4, s4, 1 + c->lh(s0, 0, s5); // lh s0, 0(s5) + c->daddiu(s5, s5, 2); // daddiu s5, s5, 2 + bc = c->sgpr64(s1) == 0; // beq s1, r0, L13 + c->sq(t7, 0, s3); // sq t7, 0(s3) + if (bc) {goto block_7;} // branch non-likely + + c->sw(s2, 4, s3); // sw s2, 4(s3) + c->daddu(s2, s2, t6); // daddu s2, s2, t6 + bc = c->sgpr64(s0) == 0; // beq s0, r0, L13 + c->sw(s0, 12, s3); // sw s0, 12(s3) + if (bc) {goto block_7;} // branch non-likely + + c->daddiu(s3, s3, 16); // daddiu s3, s3, 16 + c->daddiu(t9, t9, 1); // daddiu t9, t9, 1 + +block_7: + bc = c->sgpr64(gp) != 0; // bne gp, r0, L12 + c->daddiu(gp, gp, -1); // daddiu gp, gp, -1 + if (bc) {goto block_4;} // branch non-likely + + c->sq(t7, 0, s3); // sq t7, 0(s3) + c->mov128_gpr_gpr(t6, r0); // por t6, r0, r0 + c->sw(ra, 4, s3); // sw ra, 4(s3) + get_fake_spad_addr2(t6, cache.fake_scratchpad_data, 0, c);// lui t6, 28672 + c->sb(t8, 0, s3); // sb t8, 0(s3) + // nop // sll r0, r0, 0 + c->sq(t6, 16, s3); // sq t6, 16(s3) + c->daddiu(t6, s3, 32); // daddiu t6, s3, 32 + c->sw(t9, 20, a2); // sw t9, 20(a2) + // nop // sll r0, r0, 0 + c->sw(t4, 16, a2); // sw t4, 16(a2) + // nop // sll r0, r0, 0 + c->sw(ra, 24, a2); // sw ra, 24(a2) + // nop // sll r0, r0, 0 + c->sw(t8, 28, a2); // sw t8, 28(a2) + // nop // sll r0, r0, 0 + bc = c->sgpr64(t4) != c->sgpr64(v1); // bne t4, v1, L14 + c->daddiu(t5, t5, 1); // daddiu t5, t5, 1 + if (bc) {goto block_11;} // branch non-likely + + c->daddiu(t7, t9, 3); // daddiu t7, t9, 3 + c->multu3(t5, t5, t7); // multu3 t5, t5, t7 + c->daddiu(t5, t5, -457); // daddiu t5, t5, -457 + // nop // sll r0, r0, 0 + bc = ((s64)c->sgpr64(t5)) <= 0; // blez t5, L14 + // nop // sll r0, r0, 0 + if (bc) {goto block_11;} // branch non-likely + + //beq r0, r0, L10 // beq r0, r0, L10 + c->addiu(t4, r0, 24); // addiu t4, r0, 24 + goto block_1; // branch always + + +block_11: + c->mov64(a2, t6); // or a2, t6, r0 + c->daddu(t2, t2, t4); // daddu t2, t2, t4 + bc = c->sgpr64(t2) == c->sgpr64(v1); // beq t2, v1, L15 + c->daddu(t5, t2, t4); // daddu t5, t2, t4 + if (bc) {goto block_14;} // branch non-likely + + c->dsubu(t5, t5, v1); // dsubu t5, t5, v1 + // nop // sll r0, r0, 0 + bc = ((s64)c->sgpr64(t5)) <= 0; // blez t5, L10 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + //beq r0, r0, L10 // beq r0, r0, L10 + c->dsubu(t4, v1, t2); // dsubu t4, v1, t2 + goto block_1; // branch always + + +block_14: + c->load_symbol2(v1, cache.blerc_globals); // lw v1, *blerc-globals*(s7) + c->sw(t3, 4, v1); // sw t3, 4(v1) + c->mov64(v0, a2); // or v0, a2, r0 + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 112, sp); // lq gp, 112(sp) + c->lq(s5, 96, sp); // lq s5, 96(sp) + c->lq(s4, 80, sp); // lq s4, 80(sp) + c->lq(s3, 64, sp); // lq s3, 64(sp) + c->lq(s2, 48, sp); // lq s2, 48(sp) + c->lq(s1, 32, sp); // lq s1, 32(sp) + c->lq(s0, 16, sp); // lq s0, 16(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 128); // daddiu sp, sp, 128 + 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.blerc_globals = intern_from_c(-1, 0, "*blerc-globals*").c(); + cache.fake_scratchpad_data = intern_from_c(-1, 0, "*fake-scratchpad-data*").c(); + gLinkedFunctionTable.reg("setup-blerc-chains-for-one-fragment", execute, 256); +} + +} // namespace setup_blerc_chains_for_one_fragment +} // namespace Mips2C \ No newline at end of file diff --git a/game/mips2c/jak3_functions/nav_control.cpp b/game/mips2c/jak3_functions/nav_control.cpp new file mode 100644 index 0000000000..e2a8e300f5 --- /dev/null +++ b/game/mips2c/jak3_functions/nav_control.cpp @@ -0,0 +1,274 @@ +//--------------------------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_39_nav_state { +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + bool cop1_bc = false; + float acc; + c->daddiu(sp, sp, -96); // daddiu sp, sp, -96 + c->swc1(f20, 80, sp); // swc1 f20, 80(sp) + c->swc1(f22, 84, sp); // swc1 f22, 84(sp) + c->lwc1(f0, 32, a0); // lwc1 f0, 32(a0) + c->lwu(v1, 4, a0); // lwu v1, 4(a0) + c->lwc1(f1, 28, v1); // lwc1 f1, 28(v1) + c->muls(f1, f0, f1); // mul.s f1, f0, f1 + c->daddiu(v1, a0, 48); // daddiu v1, a0, 48 + c->lwc1(f0, 0, v1); // lwc1 f0, 0(v1) + c->lwc1(f2, 0, v1); // lwc1 f2, 0(v1) + c->muls(f0, f0, f2); // mul.s f0, f0, f2 + c->lwc1(f2, 8, v1); // lwc1 f2, 8(v1) + c->lwc1(f3, 8, v1); // lwc1 f3, 8(v1) + c->muls(f2, f2, f3); // mul.s f2, f2, f3 + c->adds(f0, f0, f2); // add.s f0, f0, f2 + c->sqrts(f0, f0); // sqrt.s f0, f0 + c->mfc1(v1, f0); // mfc1 v1, f0 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->daddiu(v1, sp, 16); // daddiu v1, sp, 16 + c->daddiu(a1, sp, 32); // daddiu a1, sp, 32 + c->lwu(a2, 12, a0); // lwu a2, 12(a0) + c->lwu(a3, 0, a2); // lwu a3, 0(a2) + c->lwu(a2, 12, a0); // lwu a2, 12(a0) + c->lwu(a2, 0, a2); // lwu a2, 0(a2) + c->lwc1(f2, 28, a2); // lwc1 f2, 28(a2) + cop1_bc = c->fprs[f2] < c->fprs[f0]; // c.lt.s f2, f0 + bc = !cop1_bc; // bc1f L192 + c->mov64(v0, s7); // or v0, s7, r0 + if (bc) {goto block_6;} // branch non-likely + + c->mov64(a2, v1); // or a2, v1, r0 + c->daddiu(t0, a0, 48); // daddiu t0, a0, 48 + c->lui(t1, 16256); // lui t1, 16256 + c->mtc1(f2, t1); // mtc1 f2, t1 + c->divs(f2, f2, f0); // div.s f2, f2, f0 + c->lqc2(vf1, 0, t0); // lqc2 vf1, 0(t0) + c->mfc1(t0, f2); // mfc1 t0, f2 + c->mov128_vf_gpr(vf2, t0); // qmtc2.i vf2, t0 + 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, a2); // sqc2 vf1, 0(a2) + c->mtc1(f2, r0); // mtc1 f2, r0 + c->swc1(f2, 4, v1); // swc1 f2, 4(v1) + c->mov64(a2, a1); // or a2, a1, r0 + c->lwc1(f2, 16, a3); // lwc1 f2, 16(a3) + c->cvtws(f1, f1); // cvt.w.s f1, f1 + c->mfc1(a3, f1); // mfc1 a3, f1 + c->dsll32(a3, a3, 16); // dsll32 a3, a3, 16 + c->dsra32(a3, a3, 16); // dsra32 a3, a3, 16 + c->mtc1(f1, a3); // mtc1 f1, a3 + c->cvtsw(f1, f1); // cvt.s.w f1, f1 + c->muls(f1, f2, f1); // mul.s f1, f2, f1 + c->lui(a3, 16255); // lui a3, 16255 + c->lui(t0, -16854); // lui t0, -16854 + c->ori(a3, a3, 65502); // ori a3, a3, 65502 + c->ori(t0, t0, 43253); // ori t0, t0, 43253 + c->subs(f22, f22, f22); // sub.s f22, f22, f22 + c->lui(t1, 15368); // lui t1, 15368 + c->mtc1(f10, a3); // mtc1 f10, a3 + c->ori(a3, t1, 27638); // ori a3, t1, 27638 + c->mtc1(f11, t0); // mtc1 f11, t0 + c->lui(t0, -18099); // lui t0, -18099 + c->muls(f2, f1, f1); // mul.s f2, f1, f1 + c->ori(t0, t0, 8306); // ori t0, t0, 8306 + c->mtc1(f12, a3); // mtc1 f12, a3 + c->lui(a3, 13850); // lui a3, 13850 + c->mtc1(f14, t0); // mtc1 f14, t0 + c->ori(t0, a3, 41599); // ori t0, a3, 41599 + // Unknown instr: mula.s f1, f10 + acc = c->fprs[f1] * c->fprs[f10]; + c->lui(a3, 16256); // lui a3, 16256 + c->muls(f3, f2, f1); // mul.s f3, f2, f1 + c->mov64(a3, a3); // or a3, a3, r0 + c->muls(f4, f2, f2); // mul.s f4, f2, f2 + c->lui(t1, -16641); // lui t1, -16641 + c->mtc1(f15, t0); // mtc1 f15, t0 + c->lui(t0, -16641); // lui t0, -16641 + c->or_(t0, t1, t0); // or t0, t1, t0 + c->mtc1(f16, a3); // mtc1 f16, a3 + // nop // sll r0, r0, 0 + c->mtc1(f17, t0); // mtc1 f17, t0 + // nop // sll r0, r0, 0 + c->muls(f5, f3, f2); // mul.s f5, f3, f2 + // nop // sll r0, r0, 0 + c->muls(f6, f3, f3); // mul.s f6, f3, f3 + // nop // sll r0, r0, 0 + c->muls(f7, f4, f3); // mul.s f7, f4, f3 + // nop // sll r0, r0, 0 + c->muls(f8, f4, f4); // mul.s f8, f4, f4 + // nop // sll r0, r0, 0 + c->muls(f9, f5, f4); // mul.s f9, f5, f4 + c->lui(a3, 15658); // lui a3, 15658 + // Unknown instr: madda.s f3, f11 + acc += c->fprs[f3] * c->fprs[f11]; + c->ori(a3, a3, 31272); // ori a3, a3, 31272 + // Unknown instr: madda.s f5, f12 + acc += c->fprs[f5] * c->fprs[f12]; + c->lui(t0, -17742); // lui t0, -17742 + // Unknown instr: madda.s f7, f14 + acc += c->fprs[f7] * c->fprs[f14]; + c->ori(t0, t0, 48177); // ori t0, t0, 48177 + // Unknown instr: madd.s f21, f9, f15 + c->fprs[f21] = acc + (c->fprs[f9] * c->fprs[f15]); + c->lui(t1, 14249); // lui t1, 14249 + c->mtc1(f18, a3); // mtc1 f18, a3 + c->ori(a3, t1, 13291); // ori a3, t1, 13291 + c->mtc1(f19, t0); // mtc1 f19, t0 + // nop // sll r0, r0, 0 + c->mtc1(f20, a3); // mtc1 f20, a3 + // nop // sll r0, r0, 0 + // Unknown instr: mula.s f16, f16 + acc = c->fprs[f16] * c->fprs[f16]; + // nop // sll r0, r0, 0 + // Unknown instr: madda.s f2, f17 + acc += c->fprs[f2] * c->fprs[f17]; + // nop // sll r0, r0, 0 + // Unknown instr: madda.s f4, f18 + acc += c->fprs[f4] * c->fprs[f18]; + // nop // sll r0, r0, 0 + // Unknown instr: madda.s f6, f19 + acc += c->fprs[f6] * c->fprs[f19]; + // nop // sll r0, r0, 0 + // Unknown instr: madd.s f22, f8, f20 + c->fprs[f22] = acc + (c->fprs[f8] * c->fprs[f20]); + // nop // sll r0, r0, 0 + c->swc1(f21, 0, a2); // swc1 f21, 0(a2) + // nop // sll r0, r0, 0 + c->swc1(f22, 4, a2); // swc1 f22, 4(a2) + c->gprs[a2].du64[0] = 0; // or a2, r0, r0 + c->mov64(a3, v1); // or a3, v1, r0 + c->daddiu(a2, a0, 144); // daddiu a2, a0, 144 + c->lwc1(f1, 0, a3); // lwc1 f1, 0(a3) + c->lwc1(f2, 4, a3); // lwc1 f2, 4(a3) + c->lwc1(f3, 8, a3); // lwc1 f3, 8(a3) + c->lwc1(f4, 0, a2); // lwc1 f4, 0(a2) + c->lwc1(f5, 4, a2); // lwc1 f5, 4(a2) + c->lwc1(f6, 8, a2); // lwc1 f6, 8(a2) + // Unknown instr: mula.s f1, f4 + // Unknown instr: madda.s f2, f5 + // Unknown instr: madd.s f1, f3, f6 + c->fprs[f1] = (c->fprs[f3] * c->fprs[f6]) + (c->fprs[f2] * c->fprs[f5]) + (c->fprs[f1] * c->fprs[f4]); + c->mfc1(a2, f1); // mfc1 a2, f1 + c->mtc1(f1, a2); // mtc1 f1, a2 + c->lwc1(f2, 4, a1); // lwc1 f2, 4(a1) + cop1_bc = c->fprs[f1] < c->fprs[f2]; // c.lt.s f1, f2 + bc = !cop1_bc; // bc1f L192 + c->mov64(v0, s7); // or v0, s7, r0 + if (bc) {goto block_6;} // branch non-likely + + c->daddiu(a2, sp, 48); // daddiu a2, sp, 48 + c->daddiu(a3, sp, 64); // daddiu a3, sp, 64 + c->mov64(t0, a2); // or t0, a2, r0 + c->daddiu(t1, a0, 144); // daddiu t1, a0, 144 + c->lwc1(f1, 0, a1); // lwc1 f1, 0(a1) + c->lwc1(f3, 4, a1); // lwc1 f3, 4(a1) + c->lwc1(f2, 0, t1); // lwc1 f2, 0(t1) + c->lwc1(f4, 8, t1); // lwc1 f4, 8(t1) + c->muls(f5, f3, f2); // mul.s f5, f3, f2 + c->muls(f6, f1, f4); // mul.s f6, f1, f4 + c->adds(f5, f5, f6); // add.s f5, f5, f6 + c->swc1(f5, 0, t0); // swc1 f5, 0(t0) + c->lwc1(f5, 4, t1); // lwc1 f5, 4(t1) + c->swc1(f5, 4, t0); // swc1 f5, 4(t0) + c->muls(f3, f3, f4); // mul.s f3, f3, f4 + c->muls(f1, f1, f2); // mul.s f1, f1, f2 + c->subs(f1, f3, f1); // sub.s f1, f3, f1 + c->swc1(f1, 8, t0); // swc1 f1, 8(t0) + c->mfc1(t0, f1); // mfc1 t0, f1 + c->mov64(t0, a3); // or t0, a3, r0 + c->daddiu(t1, a0, 144); // daddiu t1, a0, 144 + c->lwc1(f1, 0, a1); // lwc1 f1, 0(a1) + c->negs(f1, f1); // neg.s f1, f1 + c->lwc1(f3, 4, a1); // lwc1 f3, 4(a1) + c->lwc1(f2, 0, t1); // lwc1 f2, 0(t1) + c->lwc1(f4, 8, t1); // lwc1 f4, 8(t1) + c->muls(f5, f3, f2); // mul.s f5, f3, f2 + c->muls(f6, f1, f4); // mul.s f6, f1, f4 + c->adds(f5, f5, f6); // add.s f5, f5, f6 + c->swc1(f5, 0, t0); // swc1 f5, 0(t0) + c->lwc1(f5, 4, t1); // lwc1 f5, 4(t1) + c->swc1(f5, 4, t0); // swc1 f5, 4(t0) + c->muls(f3, f3, f4); // mul.s f3, f3, f4 + c->muls(f1, f1, f2); // mul.s f1, f1, f2 + c->subs(f1, f3, f1); // sub.s f1, f3, f1 + c->swc1(f1, 8, t0); // swc1 f1, 8(t0) + c->mfc1(a1, f1); // mfc1 a1, f1 + c->mov64(t0, a2); // or t0, a2, r0 + c->mov64(a1, v1); // or a1, v1, r0 + c->lwc1(f1, 0, t0); // lwc1 f1, 0(t0) + c->lwc1(f2, 4, t0); // lwc1 f2, 4(t0) + c->lwc1(f3, 8, t0); // lwc1 f3, 8(t0) + c->lwc1(f4, 0, a1); // lwc1 f4, 0(a1) + c->lwc1(f5, 4, a1); // lwc1 f5, 4(a1) + c->lwc1(f6, 8, a1); // lwc1 f6, 8(a1) + // Unknown instr: mula.s f1, f4 + // Unknown instr: madda.s f2, f5 + // Unknown instr: madd.s f1, f3, f6 + c->fprs[f1] = (c->fprs[f3] * c->fprs[f6]) + (c->fprs[f2] * c->fprs[f5]) + (c->fprs[f1] * c->fprs[f4]); + c->mfc1(a1, f1); // mfc1 a1, f1 + c->mtc1(f1, a1); // mtc1 f1, a1 + c->mov64(t0, a3); // or t0, a3, r0 + c->mov64(a1, v1); // or a1, v1, r0 + c->lwc1(f2, 0, t0); // lwc1 f2, 0(t0) + c->lwc1(f3, 4, t0); // lwc1 f3, 4(t0) + c->lwc1(f4, 8, t0); // lwc1 f4, 8(t0) + c->lwc1(f5, 0, a1); // lwc1 f5, 0(a1) + c->lwc1(f6, 4, a1); // lwc1 f6, 4(a1) + c->lwc1(f7, 8, a1); // lwc1 f7, 8(a1) + // Unknown instr: mula.s f2, f5 + // Unknown instr: madda.s f3, f6 + // Unknown instr: madd.s f2, f4, f7 + c->fprs[f2] = (c->fprs[f4] * c->fprs[f7]) + (c->fprs[f3] * c->fprs[f6]) + (c->fprs[f2] * c->fprs[f5]); + c->mfc1(a1, f2); // mfc1 a1, f2 + c->mtc1(f2, a1); // mtc1 f2, a1 + cop1_bc = c->fprs[f2] < c->fprs[f1]; // c.lt.s f2, f1 + bc = !cop1_bc; // bc1f L190 + // nop // sll r0, r0, 0 + if (bc) {goto block_4;} // branch non-likely + + c->mov64(a1, v1); // or a1, v1, r0 + c->lq(a2, 0, a2); // lq a2, 0(a2) + c->sq(a2, 0, a1); // sq a2, 0(a1) + //beq r0, r0, L191 // beq r0, r0, L191 + // nop // sll r0, r0, 0 + goto block_5; // branch always + + +block_4: + c->mov64(a1, v1); // or a1, v1, r0 + c->lq(a2, 0, a3); // lq a2, 0(a3) + c->sq(a2, 0, a1); // sq a2, 0(a1) + +block_5: + c->daddiu(a0, a0, 48); // daddiu a0, a0, 48 + 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) + c->daddiu(v0, s7, 4); // daddiu v0, s7, #t + +block_6: + c->lwc1(f22, 84, sp); // lwc1 f22, 84(sp) + c->lwc1(f20, 80, sp); // lwc1 f20, 80(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 + // nop // sll r0, r0, 0 +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + gLinkedFunctionTable.reg("(method 39 nav-state)", execute, 96); +} + +} // namespace method_39_nav_state +} // namespace Mips2C \ No newline at end of file diff --git a/game/mips2c/jak3_functions/nav_engine.cpp b/game/mips2c/jak3_functions/nav_engine.cpp new file mode 100644 index 0000000000..6c085e8c30 --- /dev/null +++ b/game/mips2c/jak3_functions/nav_engine.cpp @@ -0,0 +1,539 @@ +//--------------------------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_21_nav_engine { +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + c->lwu(v1, 80, a0); // lwu v1, 80(a0) + c->lwu(v1, 4, v1); // lwu v1, 4(v1) + c->lwu(a2, 8, a0); // lwu a2, 8(a0) + c->lwu(a2, 4, a2); // lwu a2, 4(a2) + c->dsubu(v1, v1, a2); // dsubu v1, v1, a2 + c->addiu(a2, r0, 0); // addiu a2, r0, 0 + //beq r0, r0, L30 // beq r0, r0, L30 + // nop // sll r0, r0, 0 + goto block_4; // branch always + + +block_1: + c->lwu(a3, 4, a1); // lwu a3, 4(a1) + c->addiu(t0, r0, 288); // addiu t0, r0, 288 + c->mult3(t0, t0, a2); // mult3 t0, t0, a2 + c->daddu(a3, a3, t0); // daddu a3, a3, t0 + c->daddiu(t0, a3, 112); // daddiu t0, a3, 112 + c->lwu(t1, 8, a3); // lwu t1, 8(a3) + bc = c->sgpr64(s7) == c->sgpr64(t1); // beq s7, t1, L29 + c->mov64(t1, s7); // or t1, s7, r0 + if (bc) {goto block_3;} // branch non-likely + + c->lwu(t1, 76, a0); // lwu t1, 76(a0) + c->daddiu(t1, t1, 32); // daddiu t1, t1, 32 + c->sw(t1, 56, a3); // sw t1, 56(a3) + c->lwu(t1, 80, a0); // lwu t1, 80(a0) + c->sw(t1, 124, a3); // sw t1, 124(a3) + c->lwu(t1, 0, a1); // lwu t1, 0(a1) + c->addiu(t2, r0, 288); // addiu t2, r0, 288 + c->mult3(t2, t2, a2); // mult3 t2, t2, a2 + c->daddu(t1, t1, t2); // daddu t1, t1, t2 + c->sw(t1, 4, t0); // sw t1, 4(t0) + c->mov64(t1, v1); // or t1, v1, r0 + c->lw(t2, 16, t0); // lw t2, 16(t0) + c->daddu(t3, t2, t1); // daddu t3, t2, t1 + c->xor_(t4, t2, s7); // xor t4, t2, s7 + c->sltiu(t4, t4, 1); // sltiu t4, t4, 1 + c->movz(t2, t3, t4); // movz t2, t3, t4 + c->sw(t2, 16, t0); // sw t2, 16(t0) + c->lw(t2, 28, t0); // lw t2, 28(t0) + c->daddu(t3, t2, t1); // daddu t3, t2, t1 + c->xor_(t4, t2, s7); // xor t4, t2, s7 + c->sltiu(t4, t4, 1); // sltiu t4, t4, 1 + c->movz(t2, t3, t4); // movz t2, t3, t4 + c->sw(t2, 28, t0); // sw t2, 28(t0) + c->lw(t2, 24, t0); // lw t2, 24(t0) + c->daddu(t3, t2, t1); // daddu t3, t2, t1 + c->xor_(t4, t2, s7); // xor t4, t2, s7 + c->sltiu(t4, t4, 1); // sltiu t4, t4, 1 + c->movz(t2, t3, t4); // movz t2, t3, t4 + c->sw(t2, 24, t0); // sw t2, 24(t0) + c->lw(t2, 20, t0); // lw t2, 20(t0) + c->daddu(t1, t2, t1); // daddu t1, t2, t1 + c->xor_(t3, t2, s7); // xor t3, t2, s7 + c->sltiu(t3, t3, 1); // sltiu t3, t3, 1 + c->movz(t2, t1, t3); // movz t2, t1, t3 + c->sw(t2, 20, t0); // sw t2, 20(t0) + c->gprs[t0].du64[0] = 0; // or t0, r0, r0 + c->lwu(t0, 0, a1); // lwu t0, 0(a1) + c->addiu(t1, r0, 288); // addiu t1, r0, 288 + c->mult3(t1, t1, a2); // mult3 t1, t1, a2 + c->daddu(t1, t0, t1); // daddu t1, t0, t1 + c->lwu(a3, 8, a3); // lwu a3, 8(a3) + c->sw(t1, 140, a3); // sw t1, 140(a3) + +block_3: + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + +block_4: + c->lb(a3, 14, a1); // lb a3, 14(a1) + c->slt(a3, a2, a3); // slt a3, a2, a3 + bc = c->sgpr64(a3) != 0; // bne a3, r0, L28 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + c->mov64(v1, s7); // or v1, s7, 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 + + // 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 21 nav-engine)", execute, 0); +} + +} // namespace method_21_nav_engine +} // 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_20_nav_engine { +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + c->lwu(v1, 8, a0); // lwu v1, 8(a0) + c->lwu(v1, 4, v1); // lwu v1, 4(v1) + c->lwu(a2, 80, a0); // lwu a2, 80(a0) + c->lwu(a2, 4, a2); // lwu a2, 4(a2) + c->dsubu(v1, v1, a2); // dsubu v1, v1, a2 + c->addiu(a2, r0, 0); // addiu a2, r0, 0 + //beq r0, r0, L35 // beq r0, r0, L35 + // nop // sll r0, r0, 0 + goto block_6; // branch always + + +block_1: + c->lwu(a3, 4, a1); // lwu a3, 4(a1) + c->addiu(t0, r0, 288); // addiu t0, r0, 288 + c->mult3(t0, t0, a2); // mult3 t0, t0, a2 + c->daddu(a3, a3, t0); // daddu a3, a3, t0 + c->daddiu(t0, a3, 112); // daddiu t0, a3, 112 + c->lwu(t1, 8, a3); // lwu t1, 8(a3) + bc = c->sgpr64(s7) == c->sgpr64(t1); // beq s7, t1, L34 + c->mov64(t1, s7); // or t1, s7, r0 + if (bc) {goto block_5;} // branch non-likely + + c->addiu(t1, r0, -257); // addiu t1, r0, -257 + c->lwu(t2, 0, a3); // lwu t2, 0(a3) + c->and_(t1, t1, t2); // and t1, t1, t2 + c->sw(t1, 0, a3); // sw t1, 0(a3) + c->lwu(t1, 8, a3); // lwu t1, 8(a3) + c->lwu(t1, 4, t1); // lwu t1, 4(t1) + c->andi(t1, t1, 2048); // andi t1, t1, 2048 + bc = c->sgpr64(t1) == 0; // beq t1, r0, L33 + c->mov64(t1, s7); // or t1, s7, r0 + if (bc) {goto block_4;} // branch non-likely + + c->lwu(t1, 0, a3); // lwu t1, 0(a3) + c->ori(t1, t1, 256); // ori t1, t1, 256 + c->sw(t1, 0, a3); // sw t1, 0(a3) + +block_4: + c->lwu(t1, 4, a0); // lwu t1, 4(a0) + c->daddiu(t1, t1, 32); // daddiu t1, t1, 32 + c->sw(t1, 56, a3); // sw t1, 56(a3) + c->lwu(t1, 8, a0); // lwu t1, 8(a0) + c->sw(t1, 124, a3); // sw t1, 124(a3) + c->mov64(t1, v1); // or t1, v1, r0 + c->lw(t2, 16, t0); // lw t2, 16(t0) + c->daddu(t3, t2, t1); // daddu t3, t2, t1 + c->xor_(t4, t2, s7); // xor t4, t2, s7 + c->slti(t4, t4, 1); // sltiu t4, t4, 1 + c->movz(t2, t3, t4); // movz t2, t3, t4 + c->sw(t2, 16, t0); // sw t2, 16(t0) + c->lw(t2, 28, t0); // lw t2, 28(t0) + c->daddu(t3, t2, t1); // daddu t3, t2, t1 + c->xor_(t4, t2, s7); // xor t4, t2, s7 + c->slti(t4, t4, 1); // sltiu t4, t4, 1 + c->movz(t2, t3, t4); // movz t2, t3, t4 + c->sw(t2, 28, t0); // sw t2, 28(t0) + c->lw(t2, 24, t0); // lw t2, 24(t0) + c->daddu(t3, t2, t1); // daddu t3, t2, t1 + c->xor_(t4, t2, s7); // xor t4, t2, s7 + c->slti(t4, t4, 1); // sltiu t4, t4, 1 + c->movz(t2, t3, t4); // movz t2, t3, t4 + c->sw(t2, 24, t0); // sw t2, 24(t0) + c->lw(t2, 20, t0); // lw t2, 20(t0) + c->daddu(t1, t2, t1); // daddu t1, t2, t1 + c->xor_(t3, t2, s7); // xor t3, t2, s7 + c->slti(t3, t3, 1); // sltiu t3, t3, 1 + c->movz(t2, t1, t3); // movz t2, t1, t3 + c->sw(t2, 20, t0); // sw t2, 20(t0) + c->gprs[t0].du64[0] = 0; // or t0, r0, r0 + c->lwu(a3, 8, a3); // lwu a3, 8(a3) + c->sw(s7, 140, a3); // sw s7, 140(a3) + c->mov64(t1, s7); // or t1, s7, r0 + +block_5: + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + +block_6: + c->lb(a3, 14, a1); // lb a3, 14(a1) + c->slt(a3, a2, a3); // slt a3, a2, a3 + bc = c->sgpr64(a3) != 0; // bne a3, r0, L32 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + c->mov64(v1, s7); // or v1, s7, 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 + + // 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 20 nav-engine)", execute, 0); +} + +} // namespace method_20_nav_engine +} // 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_18_nav_engine { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* +} cache; +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + c->lwu(a2, 0, a1); // lwu a2, 0(a1) + c->lwu(v1, 4, a1); // lwu v1, 4(a1) + c->lwu(a0, 8, a1); // lwu a0, 8(a1) + c->lui(a1, 4096); // lui a1, 4096 + c->ori(a1, a1, 53248); // ori a1, a1, 53248 + c->addiu(a3, r0, 0); // addiu a3, r0, 0 + +// block_1: +// c->lw(a3, 0, a1); // lw a3, 0(a1) +// c->andi(a3, a3, 256); // andi a3, a3, 256 +// // nop // sll r0, r0, 0 +// // nop // sll r0, r0, 0 +// // nop // sll r0, r0, 0 +// // nop // sll r0, r0, 0 +// bc = c->sgpr64(a3) != 0; // bne a3, r0, L43 +// // nop // sll r0, r0, 0 +// if (bc) {goto block_1;} // branch non-likely + + // Unknown instr: sync.l + c->lui(a3, 4095); // lui a3, 4095 + c->ori(a3, a3, 65535); // ori a3, a3, 65535 + c->and_(a2, a3, a2); // and a2, a3, a2 + // c->sw(a2, 16, a1); // sw a2, 16(a1) + u32 madr = c->sgpr64(a2); + c->lui(a2, 4095); // lui a2, 4095 + c->ori(a2, a2, 65535); // ori a2, a2, 65535 + c->and_(v1, a2, v1); // and v1, a2, v1 + // c->sw(v1, 128, a1); // sw v1, 128(a1) + u32 sadr = c->sgpr64(v1); + // c->sw(a0, 32, a1); // sw a0, 32(a1) + u32 qwc = c->sgpr64(a0); + // Unknown instr: sync.l + c->addiu(v1, r0, 256); // addiu v1, r0, 256 + // c->sw(v1, 0, a1); // sw v1, 0(a1) + spad_from_dma(cache.fake_scratchpad_data, madr, sadr, qwc); + // Unknown instr: sync.l + 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 + + // 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 18 nav-engine)", execute, 0); + cache.fake_scratchpad_data = intern_from_c(-1, 0, "*fake-scratchpad-data*").c(); +} + +} // namespace method_18_nav_engine +} // 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_17_nav_engine { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* +} cache; +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + c->lwu(v1, 4, a1); // lwu v1, 4(a1) + c->lwu(a2, 0, a1); // lwu a2, 0(a1) + c->lwu(a0, 8, a1); // lwu a0, 8(a1) + c->lui(a1, 4096); // lui a1, 4096 + c->ori(a1, a1, 54272); // ori a1, a1, 54272 + c->addiu(a3, r0, 0); // addiu a3, r0, 0 + +// block_1: +// c->lw(a3, 0, a1); // lw a3, 0(a1) +// c->andi(a3, a3, 256); // andi a3, a3, 256 +// // nop // sll r0, r0, 0 +// // nop // sll r0, r0, 0 +// // nop // sll r0, r0, 0 +// // nop // sll r0, r0, 0 +// bc = c->sgpr64(a3) != 0; // bne a3, r0, L45 +// // nop // sll r0, r0, 0 +// if (bc) {goto block_1;} // branch non-likely + + // Unknown instr: sync.l + c->lui(a3, 4095); // lui a3, 4095 + c->ori(a3, a3, 65535); // ori a3, a3, 65535 + c->and_(a2, a3, a2); // and a2, a3, a2 + // c->sw(a2, 16, a1); // sw a2, 16(a1) + u32 madr = c->sgpr64(a2); + c->lui(a2, 4095); // lui a2, 4095 + c->ori(a2, a2, 65535); // ori a2, a2, 65535 + c->and_(v1, a2, v1); // and v1, a2, v1 + // c->sw(v1, 128, a1); // sw v1, 128(a1) + u32 sadr = c->sgpr64(v1); + // c->sw(a0, 32, a1); // sw a0, 32(a1) + u32 qwc = c->sgpr64(a0); + // Unknown instr: sync.l + c->addiu(v1, r0, 256); // addiu v1, r0, 256 + // c->sw(v1, 0, a1); // sw v1, 0(a1) + spad_to_dma(cache.fake_scratchpad_data, madr, sadr, qwc); + // Unknown instr: sync.l + 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 + + // 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 17 nav-engine)", execute, 0); + cache.fake_scratchpad_data = intern_from_c(-1, 0, "*fake-scratchpad-data*").c(); +} + +} // namespace method_17_nav_engine +} // 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 nav_state_patch_pointers { +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + c->lw(v1, 16, a0); // lw v1, 16(a0) + c->daddu(a2, v1, a1); // daddu a2, v1, a1 + c->xor_(a3, v1, s7); // xor a3, v1, s7 + c->sltiu(a3, a3, 1); // sltiu a3, a3, 1 + c->movz(v1, a2, a3); // movz v1, a2, a3 + c->sw(v1, 16, a0); // sw v1, 16(a0) + c->lw(v1, 28, a0); // lw v1, 28(a0) + c->daddu(a2, v1, a1); // daddu a2, v1, a1 + c->xor_(a3, v1, s7); // xor a3, v1, s7 + c->sltiu(a3, a3, 1); // sltiu a3, a3, 1 + c->movz(v1, a2, a3); // movz v1, a2, a3 + c->sw(v1, 28, a0); // sw v1, 28(a0) + c->lw(v1, 24, a0); // lw v1, 24(a0) + c->daddu(a2, v1, a1); // daddu a2, v1, a1 + c->xor_(a3, v1, s7); // xor a3, v1, s7 + c->sltiu(a3, a3, 1); // sltiu a3, a3, 1 + c->movz(v1, a2, a3); // movz v1, a2, a3 + c->sw(v1, 24, a0); // sw v1, 24(a0) + c->lw(v1, 20, a0); // lw v1, 20(a0) + c->daddu(a1, v1, a1); // daddu a1, v1, a1 + c->xor_(a2, v1, s7); // xor a2, v1, s7 + c->sltiu(a2, a2, 1); // sltiu a2, a2, 1 + c->movz(v1, a1, a2); // movz v1, a1, a2 + c->sw(v1, 20, a0); // sw v1, 20(a0) + 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: + return c->gprs[v0].du64[0]; +} + +void link() { + gLinkedFunctionTable.reg("nav-state-patch-pointers", execute, 0); +} + +} // namespace nav_state_patch_pointers +} // 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 nav_dma_send_from_spr_no_flush { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* +} cache; +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + c->lui(v1, 4096); // lui v1, 4096 + c->ori(v1, v1, 53248); // ori v1, v1, 53248 + c->addiu(a3, r0, 0); // addiu a3, r0, 0 + +// block_1: +// c->lw(a3, 0, v1); // lw a3, 0(v1) +// c->andi(a3, a3, 256); // andi a3, a3, 256 +// // nop // sll r0, r0, 0 +// // nop // sll r0, r0, 0 +// // nop // sll r0, r0, 0 +// // nop // sll r0, r0, 0 +// bc = c->sgpr64(a3) != 0; // bne a3, r0, L49 +// // nop // sll r0, r0, 0 +// if (bc) {goto block_1;} // branch non-likely + + // Unknown instr: sync.l + c->lui(a3, 4095); // lui a3, 4095 + c->ori(a3, a3, 65535); // ori a3, a3, 65535 + c->and_(a0, a3, a0); // and a0, a3, a0 + // c->sw(a0, 16, v1); // sw a0, 16(v1) + u32 madr = c->sgpr64(a0); + c->lui(a0, 4095); // lui a0, 4095 + c->ori(a0, a0, 65535); // ori a0, a0, 65535 + c->and_(a0, a0, a1); // and a0, a0, a1 + // c->sw(a0, 128, v1); // sw a0, 128(v1) + u32 sadr = c->sgpr64(a0); + // c->sw(a2, 32, v1); // sw a2, 32(v1) + u32 qwc = c->sgpr64(a2); + // Unknown instr: sync.l + c->addiu(a0, r0, 256); // addiu a0, r0, 256 + // c->sw(a0, 0, v1); // sw a0, 0(v1) + spad_from_dma(cache.fake_scratchpad_data, madr, sadr, qwc); + // Unknown instr: sync.l + 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.fake_scratchpad_data = intern_from_c(-1, 0, "*fake-scratchpad-data*").c(); + gLinkedFunctionTable.reg("nav-dma-send-from-spr-no-flush", execute, 0); +} + +} // namespace nav_dma_send_from_spr_no_flush +} // 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 nav_dma_send_to_spr_no_flush { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* +} cache; +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + c->lui(v1, 4096); // lui v1, 4096 + c->ori(v1, v1, 54272); // ori v1, v1, 54272 + c->addiu(a3, r0, 0); // addiu a3, r0, 0 + +// block_1: +// c->lw(a3, 0, v1); // lw a3, 0(v1) +// c->andi(a3, a3, 256); // andi a3, a3, 256 +// // nop // sll r0, r0, 0 +// // nop // sll r0, r0, 0 +// // nop // sll r0, r0, 0 +// // nop // sll r0, r0, 0 +// bc = c->sgpr64(a3) != 0; // bne a3, r0, L51 +// // nop // sll r0, r0, 0 +// if (bc) {goto block_1;} // branch non-likely + + // Unknown instr: sync.l + c->lui(a3, 4095); // lui a3, 4095 + c->ori(a3, a3, 65535); // ori a3, a3, 65535 + c->and_(a1, a3, a1); // and a1, a3, a1 + // c->sw(a1, 16, v1); // sw a1, 16(v1) + u32 madr = c->sgpr64(a1); + c->lui(a1, 4095); // lui a1, 4095 + c->ori(a1, a1, 65535); // ori a1, a1, 65535 + c->and_(a0, a1, a0); // and a0, a1, a0 + // c->sw(a0, 128, v1); // sw a0, 128(v1) + u32 sadr = c->sgpr64(a0); + // c->sw(a2, 32, v1); // sw a2, 32(v1) + u32 qwc = c->sgpr64(a2); + // Unknown instr: sync.l + c->addiu(a0, r0, 256); // addiu a0, r0, 256 + // c->sw(a0, 0, v1); // sw a0, 0(v1) + spad_to_dma(cache.fake_scratchpad_data, madr, sadr, qwc); + // Unknown instr: sync.l + 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.fake_scratchpad_data = intern_from_c(-1, 0, "*fake-scratchpad-data*").c(); + gLinkedFunctionTable.reg("nav-dma-send-to-spr-no-flush", execute, 0); +} + +} // namespace nav_dma_send_to_spr_no_flush +} // namespace Mips2C \ No newline at end of file diff --git a/game/mips2c/jak3_functions/ocean.cpp b/game/mips2c/jak3_functions/ocean.cpp new file mode 100644 index 0000000000..19d7066e95 --- /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 0000000000..c76df04ffd --- /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/particle_curves.cpp b/game/mips2c/jak3_functions/particle_curves.cpp new file mode 100644 index 0000000000..e5fd908e66 --- /dev/null +++ b/game/mips2c/jak3_functions/particle_curves.cpp @@ -0,0 +1,960 @@ +//--------------------------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 live_func_curve { +struct Cache { + void* random_generator; // *random-generator* +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->daddiu(sp, sp, -336); // daddiu sp, sp, -336 + c->mov64(t0, a1); // or t0, a1, r0 + c->lwu(a3, 108, t0); // lwu a3, 108(t0) + c->lw(v1, 12, t0); // lw v1, 12(t0) + c->load_symbol2(a0, cache.random_generator); // lw a0, *random-generator*(s7) + c->lwu(a0, 0, a0); // lwu a0, 0(a0) + c->addiu(a1, r0, 0); // addiu a1, r0, 0 + c->addiu(a1, r0, 0); // addiu a1, r0, 0 + c->mtc1(f0, r0); // mtc1 f0, r0 + c->load_symbol2(a1, cache.random_generator); // lw a1, *random-generator*(s7) + c->sw(v1, 0, a1); // sw v1, 0(a1) + c->ld(t1, 40, a3); // ld t1, 40(a3) + c->ld(v1, 48, a3); // ld v1, 48(a3) + c->slt(v1, r0, v1); // slt v1, r0, v1 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L5 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_2;} // branch non-likely + + c->load_symbol2(t2, cache.random_generator); // lw t2, *random-generator*(s7) + c->lwu(a1, 0, t2); // lwu a1, 0(t2) + c->addiu(v1, r0, 16807); // addiu v1, r0, 16807 + c->mult3(v0, v1, a1); // mult3 v0, v1, a1 + c->mfhi(v1); // mfhi v1 + c->daddu(v1, v1, v1); // daddu v1, v1, v1 + c->srl(a1, v0, 31); // srl a1, v0, 31 + c->or_(v1, v1, a1); // or v1, v1, a1 + c->daddu(v0, v0, v1); // daddu v0, v0, v1 + c->sll(v0, v0, 1); // sll v0, v0, 1 + c->srl(v0, v0, 1); // srl v0, v0, 1 + c->sw(v0, 0, t2); // sw v0, 0(t2) + c->ld(v1, 48, a3); // ld v1, 48(a3) + c->div(v0, v1); // div v0, v1 + c->mfhi(v1); // mfhi v1 + c->daddu(t1, t1, v1); // daddu t1, t1, v1 + c->mov64(v1, t1); // or v1, t1, r0 + +block_2: + c->lw(v1, 100, t0); // lw v1, 100(t0) + c->dsubu(v1, t1, v1); // dsubu v1, t1, v1 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->cvtsw(f0, f0); // cvt.s.w f0, f0 + c->mtc1(f1, t1); // mtc1 f1, t1 + c->cvtsw(f1, f1); // cvt.s.w f1, f1 + c->divs(f0, f0, f1); // div.s f0, f0, f1 + c->lwu(v1, 0, a3); // lwu v1, 0(a3) + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L14 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_24;} // branch non-likely + + c->load_symbol2(t0, cache.random_generator); // lw t0, *random-generator*(s7) + c->lwu(a1, 0, t0); // lwu a1, 0(t0) + c->addiu(v1, r0, 16807); // addiu v1, r0, 16807 + c->mult3(v0, v1, a1); // mult3 v0, v1, a1 + c->mfhi(v1); // mfhi v1 + c->daddu(v1, v1, v1); // daddu v1, v1, v1 + c->srl(a1, v0, 31); // srl a1, v0, 31 + c->or_(v1, v1, a1); // or v1, v1, a1 + c->daddu(v0, v0, v1); // daddu v0, v0, v1 + c->sll(v0, v0, 1); // sll v0, v0, 1 + c->srl(v0, v0, 1); // srl v0, v0, 1 + c->sw(v0, 0, t0); // sw v0, 0(t0) + c->mov64(v1, v0); // or v1, v0, r0 + c->dsra(v1, v1, 8); // dsra v1, v1, 8 + c->lui(a1, 16256); // lui a1, 16256 + c->or_(v1, a1, v1); // or v1, a1, v1 + c->lui(a1, -16512); // lui a1, -16512 + c->mtc1(f1, a1); // mtc1 f1, a1 + c->mtc1(f2, v1); // mtc1 f2, v1 + c->adds(f1, f1, f2); // add.s f1, f1, f2 + c->mfc1(v1, f1); // mfc1 v1, f1 + c->mtc1(f1, v1); // mtc1 f1, v1 + c->daddiu(v1, sp, 16); // daddiu v1, sp, 16 + c->ld(a1, 56, a3); // ld a1, 56(a3) + c->andi(a1, a1, 2); // andi a1, a1, 2 + bc = c->sgpr64(a1) == 0; // beq a1, r0, L14 + c->mov64(a1, s7); // or a1, s7, r0 + if (bc) {goto block_24;} // branch non-likely + + c->lwu(a1, 0, a3); // lwu a1, 0(a3) + c->mov64(t0, v1); // or t0, v1, r0 + c->daddiu(t1, sp, 32); // daddiu t1, sp, 32 + c->mfc1(t2, f1); // mfc1 t2, f1 + c->mov128_vf_gpr(vf26, t2); // qmtc2.i vf26, t2 + c->lqc2(vf23, 12, a1); // lqc2 vf23, 12(a1) + c->lqc2(vf25, 92, a1); // lqc2 vf25, 92(a1) + c->vmax_bc(DEST::xyzw, BC::w, vf3, vf0, vf0); // vmaxw.xyzw vf3, vf0, vf0 + c->vmula(DEST::xyzw, vf25, vf23); // vmula.xyzw acc, vf25, vf23 + c->vmadd_bc(DEST::xyzw, BC::x, vf28, vf25, vf26); // vmaddx.xyzw vf28, vf25, vf26 + c->sqc2(vf28, 0, t1); // sqc2 vf28, 0(t1) + c->lw(t2, 8, t1); // lw t2, 8(t1) + c->lw(t1, 4, t1); // lw t1, 4(t1) + bc = ((s64)c->sgpr64(t2)) >= 0; // bgez t2, L7 + // nop // sll r0, r0, 0 + if (bc) {goto block_8;} // branch non-likely + + bc = ((s64)c->sgpr64(t1)) >= 0; // bgez t1, L6 + // nop // sll r0, r0, 0 + if (bc) {goto block_7;} // branch non-likely + + c->lqc2(vf1, 28, a1); // lqc2 vf1, 28(a1) + c->lqc2(vf2, 44, a1); // lqc2 vf2, 44(a1) + c->vsub_bc(DEST::xyzw, BC::x, vf4, vf3, vf28); // vsubx.xyzw vf4, vf3, vf28 + c->vmula_bc(DEST::xyzw, BC::x, vf2, vf28); // vmulax.xyzw acc, vf2, vf28 + c->vmadd_bc(DEST::xyzw, BC::x, vf5, vf1, vf4); // vmaddx.xyzw vf5, vf1, vf4 + //beq r0, r0, L8 // beq r0, r0, L8 + c->sqc2(vf5, 0, t0); // sqc2 vf5, 0(t0) + goto block_9; // branch always + + +block_7: + c->lqc2(vf1, 44, a1); // lqc2 vf1, 44(a1) + c->lqc2(vf2, 60, a1); // lqc2 vf2, 60(a1) + c->vsub_bc(DEST::xyzw, BC::y, vf4, vf3, vf28); // vsuby.xyzw vf4, vf3, vf28 + c->vmula_bc(DEST::xyzw, BC::y, vf2, vf28); // vmulay.xyzw acc, vf2, vf28 + c->vmadd_bc(DEST::xyzw, BC::y, vf5, vf1, vf4); // vmaddy.xyzw vf5, vf1, vf4 + //beq r0, r0, L8 // beq r0, r0, L8 + c->sqc2(vf5, 0, t0); // sqc2 vf5, 0(t0) + goto block_9; // branch always + + +block_8: + c->lqc2(vf1, 60, a1); // lqc2 vf1, 60(a1) + c->lqc2(vf2, 76, a1); // lqc2 vf2, 76(a1) + c->vsub_bc(DEST::xyzw, BC::z, vf4, vf3, vf28); // vsubz.xyzw vf4, vf3, vf28 + c->vmula_bc(DEST::xyzw, BC::z, vf2, vf28); // vmulaz.xyzw acc, vf2, vf28 + c->vmadd_bc(DEST::xyzw, BC::z, vf5, vf1, vf4); // vmaddz.xyzw vf5, vf1, vf4 + c->sqc2(vf5, 0, t0); // sqc2 vf5, 0(t0) + +block_9: + c->lwu(a1, 16, a3); // lwu a1, 16(a3) + bc = c->sgpr64(s7) == c->sgpr64(a1); // beq s7, a1, L10 + c->mov64(a1, s7); // or a1, s7, r0 + if (bc) {goto block_14;} // branch non-likely + + c->lwc1(f1, 0, v1); // lwc1 f1, 0(v1) + c->lwu(t1, 16, a3); // lwu t1, 16(a3) + c->movs(f2, f0); // mov.s f2, f0 + c->daddiu(t0, sp, 48); // daddiu t0, sp, 48 + c->daddiu(a1, sp, 64); // daddiu a1, sp, 64 + c->mfc1(t2, f2); // mfc1 t2, f2 + c->mov128_vf_gpr(vf27, t2); // qmtc2.i vf27, t2 + c->lqc2(vf24, 12, t1); // lqc2 vf24, 12(t1) + c->lqc2(vf25, 28, t1); // lqc2 vf25, 28(t1) + c->lqc2(vf26, 44, t1); // lqc2 vf26, 44(t1) + c->vmini_bc(DEST::xyzw, BC::w, vf27, vf27, vf0); // vminiw.xyzw vf27, vf27, vf0 + c->vmax_bc(DEST::xyzw, BC::x, vf27, vf27, vf0); // vmaxx.xyzw vf27, vf27, vf0 + c->vadd_bc(DEST::xyzw, BC::x, vf28, vf24, vf27); // vaddx.xyzw vf28, vf24, vf27 + c->vmula_bc(DEST::xyzw, BC::w, vf25, vf0); // vmulaw.xyzw acc, vf25, vf0 + c->vmadd(DEST::xyzw, vf29, vf28, vf26); // vmadd.xyzw vf29, vf28, vf26 + c->sqc2(vf28, 0, t0); // sqc2 vf28, 0(t0) + c->sqc2(vf29, 0, a1); // sqc2 vf29, 0(a1) + c->lw(t1, 8, t0); // lw t1, 8(t0) + c->lw(t0, 4, t0); // lw t0, 4(t0) + bc = ((s64)c->sgpr64(t1)) >= 0; // bgez t1, L9 + c->lw(v0, 8, a1); // lw v0, 8(a1) + if (bc) {goto block_13;} // branch non-likely + + bc = ((s64)c->sgpr64(t0)) >= 0; // bgez t0, L9 + c->lw(v0, 4, a1); // lw v0, 4(a1) + if (bc) {goto block_13;} // branch non-likely + + c->lw(v0, 0, a1); // lw v0, 0(a1) + +block_13: + c->mov64(a1, v0); // or a1, v0, r0 + c->mtc1(f2, a1); // mtc1 f2, a1 + c->muls(f1, f1, f2); // mul.s f1, f1, f2 + c->swc1(f1, 32, a2); // swc1 f1, 32(a2) + c->mfc1(a1, f1); // mfc1 a1, f1 + +block_14: + c->lwu(a1, 20, a3); // lwu a1, 20(a3) + bc = c->sgpr64(s7) == c->sgpr64(a1); // beq s7, a1, L12 + c->mov64(a1, s7); // or a1, s7, r0 + if (bc) {goto block_19;} // branch non-likely + + c->lwc1(f1, 4, v1); // lwc1 f1, 4(v1) + c->lwu(t1, 20, a3); // lwu t1, 20(a3) + c->movs(f2, f0); // mov.s f2, f0 + c->daddiu(t0, sp, 80); // daddiu t0, sp, 80 + c->daddiu(a1, sp, 96); // daddiu a1, sp, 96 + c->mfc1(t2, f2); // mfc1 t2, f2 + c->mov128_vf_gpr(vf27, t2); // qmtc2.i vf27, t2 + c->lqc2(vf24, 12, t1); // lqc2 vf24, 12(t1) + c->lqc2(vf25, 28, t1); // lqc2 vf25, 28(t1) + c->lqc2(vf26, 44, t1); // lqc2 vf26, 44(t1) + c->vmini_bc(DEST::xyzw, BC::w, vf27, vf27, vf0); // vminiw.xyzw vf27, vf27, vf0 + c->vmax_bc(DEST::xyzw, BC::x, vf27, vf27, vf0); // vmaxx.xyzw vf27, vf27, vf0 + c->vadd_bc(DEST::xyzw, BC::x, vf28, vf24, vf27); // vaddx.xyzw vf28, vf24, vf27 + c->vmula_bc(DEST::xyzw, BC::w, vf25, vf0); // vmulaw.xyzw acc, vf25, vf0 + c->vmadd(DEST::xyzw, vf29, vf28, vf26); // vmadd.xyzw vf29, vf28, vf26 + c->sqc2(vf28, 0, t0); // sqc2 vf28, 0(t0) + c->sqc2(vf29, 0, a1); // sqc2 vf29, 0(a1) + c->lw(t1, 8, t0); // lw t1, 8(t0) + c->lw(t0, 4, t0); // lw t0, 4(t0) + bc = ((s64)c->sgpr64(t1)) >= 0; // bgez t1, L11 + c->lw(v0, 8, a1); // lw v0, 8(a1) + if (bc) {goto block_18;} // branch non-likely + + bc = ((s64)c->sgpr64(t0)) >= 0; // bgez t0, L11 + c->lw(v0, 4, a1); // lw v0, 4(a1) + if (bc) {goto block_18;} // branch non-likely + + c->lw(v0, 0, a1); // lw v0, 0(a1) + +block_18: + c->mov64(a1, v0); // or a1, v0, r0 + c->mtc1(f2, a1); // mtc1 f2, a1 + c->muls(f1, f1, f2); // mul.s f1, f1, f2 + c->swc1(f1, 36, a2); // swc1 f1, 36(a2) + c->mfc1(a1, f1); // mfc1 a1, f1 + +block_19: + c->lwu(a1, 24, a3); // lwu a1, 24(a3) + bc = c->sgpr64(s7) == c->sgpr64(a1); // beq s7, a1, L14 + c->mov64(a1, s7); // or a1, s7, r0 + if (bc) {goto block_24;} // branch non-likely + + c->lwc1(f1, 8, v1); // lwc1 f1, 8(v1) + c->lwu(t0, 24, a3); // lwu t0, 24(a3) + c->movs(f2, f0); // mov.s f2, f0 + c->daddiu(a1, sp, 112); // daddiu a1, sp, 112 + c->daddiu(v1, sp, 128); // daddiu v1, sp, 128 + c->mfc1(t1, f2); // mfc1 t1, f2 + c->mov128_vf_gpr(vf27, t1); // qmtc2.i vf27, t1 + c->lqc2(vf24, 12, t0); // lqc2 vf24, 12(t0) + c->lqc2(vf25, 28, t0); // lqc2 vf25, 28(t0) + c->lqc2(vf26, 44, t0); // lqc2 vf26, 44(t0) + c->vmini_bc(DEST::xyzw, BC::w, vf27, vf27, vf0); // vminiw.xyzw vf27, vf27, vf0 + c->vmax_bc(DEST::xyzw, BC::x, vf27, vf27, vf0); // vmaxx.xyzw vf27, vf27, vf0 + c->vadd_bc(DEST::xyzw, BC::x, vf28, vf24, vf27); // vaddx.xyzw vf28, vf24, vf27 + c->vmula_bc(DEST::xyzw, BC::w, vf25, vf0); // vmulaw.xyzw acc, vf25, vf0 + c->vmadd(DEST::xyzw, vf29, vf28, vf26); // vmadd.xyzw vf29, vf28, vf26 + c->sqc2(vf28, 0, a1); // sqc2 vf28, 0(a1) + c->sqc2(vf29, 0, v1); // sqc2 vf29, 0(v1) + c->lw(t0, 8, a1); // lw t0, 8(a1) + c->lw(a1, 4, a1); // lw a1, 4(a1) + bc = ((s64)c->sgpr64(t0)) >= 0; // bgez t0, L13 + c->lw(v0, 8, v1); // lw v0, 8(v1) + if (bc) {goto block_23;} // branch non-likely + + bc = ((s64)c->sgpr64(a1)) >= 0; // bgez a1, L13 + c->lw(v0, 4, v1); // lw v0, 4(v1) + if (bc) {goto block_23;} // branch non-likely + + c->lw(v0, 0, v1); // lw v0, 0(v1) + +block_23: + c->mov64(v1, v0); // or v1, v0, r0 + c->mtc1(f2, v1); // mtc1 f2, v1 + c->muls(f1, f1, f2); // mul.s f1, f1, f2 + c->swc1(f1, 40, a2); // swc1 f1, 40(a2) + c->mfc1(a1, f1); // mfc1 a1, f1 + +block_24: + c->lwu(v1, 4, a3); // lwu v1, 4(a3) + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L17 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_33;} // branch non-likely + + c->load_symbol2(t0, cache.random_generator); // lw t0, *random-generator*(s7) + c->lwu(a1, 0, t0); // lwu a1, 0(t0) + c->addiu(v1, r0, 16807); // addiu v1, r0, 16807 + c->mult3(v0, v1, a1); // mult3 v0, v1, a1 + c->mfhi(v1); // mfhi v1 + c->daddu(v1, v1, v1); // daddu v1, v1, v1 + c->srl(a1, v0, 31); // srl a1, v0, 31 + c->or_(v1, v1, a1); // or v1, v1, a1 + c->daddu(v0, v0, v1); // daddu v0, v0, v1 + c->sll(v0, v0, 1); // sll v0, v0, 1 + c->srl(v0, v0, 1); // srl v0, v0, 1 + c->sw(v0, 0, t0); // sw v0, 0(t0) + c->mov64(v1, v0); // or v1, v0, r0 + c->dsra(v1, v1, 8); // dsra v1, v1, 8 + c->lui(a1, 16256); // lui a1, 16256 + c->or_(v1, a1, v1); // or v1, a1, v1 + c->lui(a1, -16512); // lui a1, -16512 + c->mtc1(f1, a1); // mtc1 f1, a1 + c->mtc1(f2, v1); // mtc1 f2, v1 + c->adds(f1, f1, f2); // add.s f1, f1, f2 + c->mfc1(v1, f1); // mfc1 v1, f1 + c->mtc1(f1, v1); // mtc1 f1, v1 + c->lwu(v1, 28, a3); // lwu v1, 28(a3) + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L17 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_33;} // branch non-likely + + c->lwu(t0, 4, a3); // lwu t0, 4(a3) + c->daddiu(a1, sp, 144); // daddiu a1, sp, 144 + c->daddiu(v1, sp, 160); // daddiu v1, sp, 160 + c->mfc1(t1, f1); // mfc1 t1, f1 + c->mov128_vf_gpr(vf27, t1); // qmtc2.i vf27, t1 + c->lqc2(vf24, 12, t0); // lqc2 vf24, 12(t0) + c->lqc2(vf25, 28, t0); // lqc2 vf25, 28(t0) + c->lqc2(vf26, 44, t0); // lqc2 vf26, 44(t0) + c->vmini_bc(DEST::xyzw, BC::w, vf27, vf27, vf0); // vminiw.xyzw vf27, vf27, vf0 + c->vmax_bc(DEST::xyzw, BC::x, vf27, vf27, vf0); // vmaxx.xyzw vf27, vf27, vf0 + c->vadd_bc(DEST::xyzw, BC::x, vf28, vf24, vf27); // vaddx.xyzw vf28, vf24, vf27 + c->vmula_bc(DEST::xyzw, BC::w, vf25, vf0); // vmulaw.xyzw acc, vf25, vf0 + c->vmadd(DEST::xyzw, vf29, vf28, vf26); // vmadd.xyzw vf29, vf28, vf26 + c->sqc2(vf28, 0, a1); // sqc2 vf28, 0(a1) + c->sqc2(vf29, 0, v1); // sqc2 vf29, 0(v1) + c->lw(t0, 8, a1); // lw t0, 8(a1) + c->lw(a1, 4, a1); // lw a1, 4(a1) + // nop // sll r0, r0, 0 + bc = ((s64)c->sgpr64(t0)) >= 0; // bgez t0, L15 + c->lw(v0, 8, v1); // lw v0, 8(v1) + if (bc) {goto block_29;} // branch non-likely + + bc = ((s64)c->sgpr64(a1)) >= 0; // bgez a1, L15 + c->lw(v0, 4, v1); // lw v0, 4(v1) + if (bc) {goto block_29;} // branch non-likely + + c->lw(v0, 0, v1); // lw v0, 0(v1) + +block_29: + c->mov64(v1, v0); // or v1, v0, r0 + c->mtc1(f1, v1); // mtc1 f1, v1 + c->lwu(t0, 28, a3); // lwu t0, 28(a3) + c->movs(f2, f0); // mov.s f2, f0 + c->daddiu(a1, sp, 176); // daddiu a1, sp, 176 + c->daddiu(v1, sp, 192); // daddiu v1, sp, 192 + c->mfc1(t1, f2); // mfc1 t1, f2 + c->mov128_vf_gpr(vf27, t1); // qmtc2.i vf27, t1 + c->lqc2(vf24, 12, t0); // lqc2 vf24, 12(t0) + c->lqc2(vf25, 28, t0); // lqc2 vf25, 28(t0) + c->lqc2(vf26, 44, t0); // lqc2 vf26, 44(t0) + c->vmini_bc(DEST::xyzw, BC::w, vf27, vf27, vf0); // vminiw.xyzw vf27, vf27, vf0 + c->vmax_bc(DEST::xyzw, BC::x, vf27, vf27, vf0); // vmaxx.xyzw vf27, vf27, vf0 + c->vadd_bc(DEST::xyzw, BC::x, vf28, vf24, vf27); // vaddx.xyzw vf28, vf24, vf27 + c->vmula_bc(DEST::xyzw, BC::w, vf25, vf0); // vmulaw.xyzw acc, vf25, vf0 + c->vmadd(DEST::xyzw, vf29, vf28, vf26); // vmadd.xyzw vf29, vf28, vf26 + c->sqc2(vf28, 0, a1); // sqc2 vf28, 0(a1) + c->sqc2(vf29, 0, v1); // sqc2 vf29, 0(v1) + c->lw(t0, 8, a1); // lw t0, 8(a1) + c->lw(a1, 4, a1); // lw a1, 4(a1) + // nop // sll r0, r0, 0 + bc = ((s64)c->sgpr64(t0)) >= 0; // bgez t0, L16 + c->lw(v0, 8, v1); // lw v0, 8(v1) + if (bc) {goto block_32;} // branch non-likely + + bc = ((s64)c->sgpr64(a1)) >= 0; // bgez a1, L16 + c->lw(v0, 4, v1); // lw v0, 4(v1) + if (bc) {goto block_32;} // branch non-likely + + c->lw(v0, 0, v1); // lw v0, 0(v1) + +block_32: + c->mov64(v1, v0); // or v1, v0, r0 + c->mtc1(f2, v1); // mtc1 f2, v1 + c->muls(f1, f1, f2); // mul.s f1, f1, f2 + c->swc1(f1, 44, a2); // swc1 f1, 44(a2) + c->mfc1(v1, f1); // mfc1 v1, f1 + +block_33: + c->mtc1(f1, r0); // mtc1 f1, r0 + c->lwu(v1, 8, a3); // lwu v1, 8(a3) + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L20 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_42;} // branch non-likely + + c->load_symbol2(t0, cache.random_generator); // lw t0, *random-generator*(s7) + c->lwu(a1, 0, t0); // lwu a1, 0(t0) + c->addiu(v1, r0, 16807); // addiu v1, r0, 16807 + c->mult3(v0, v1, a1); // mult3 v0, v1, a1 + c->mfhi(v1); // mfhi v1 + c->daddu(v1, v1, v1); // daddu v1, v1, v1 + c->srl(a1, v0, 31); // srl a1, v0, 31 + c->or_(v1, v1, a1); // or v1, v1, a1 + c->daddu(v0, v0, v1); // daddu v0, v0, v1 + c->sll(v0, v0, 1); // sll v0, v0, 1 + c->srl(v0, v0, 1); // srl v0, v0, 1 + c->sw(v0, 0, t0); // sw v0, 0(t0) + c->mov64(v1, v0); // or v1, v0, r0 + c->dsra(v1, v1, 8); // dsra v1, v1, 8 + c->lui(a1, 16256); // lui a1, 16256 + c->or_(v1, a1, v1); // or v1, a1, v1 + c->lui(a1, -16512); // lui a1, -16512 + c->mtc1(f1, a1); // mtc1 f1, a1 + c->mtc1(f2, v1); // mtc1 f2, v1 + c->adds(f1, f1, f2); // add.s f1, f1, f2 + c->mfc1(v1, f1); // mfc1 v1, f1 + c->mtc1(f2, v1); // mtc1 f2, v1 + c->lwu(v1, 32, a3); // lwu v1, 32(a3) + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L20 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_42;} // branch non-likely + + c->lui(v1, 17792); // lui v1, 17792 + c->mtc1(f1, v1); // mtc1 f1, v1 + c->lwu(t0, 8, a3); // lwu t0, 8(a3) + c->daddiu(a1, sp, 208); // daddiu a1, sp, 208 + c->daddiu(v1, sp, 224); // daddiu v1, sp, 224 + c->mfc1(t1, f2); // mfc1 t1, f2 + c->mov128_vf_gpr(vf27, t1); // qmtc2.i vf27, t1 + c->lqc2(vf24, 12, t0); // lqc2 vf24, 12(t0) + c->lqc2(vf25, 28, t0); // lqc2 vf25, 28(t0) + c->lqc2(vf26, 44, t0); // lqc2 vf26, 44(t0) + c->vmini_bc(DEST::xyzw, BC::w, vf27, vf27, vf0); // vminiw.xyzw vf27, vf27, vf0 + c->vmax_bc(DEST::xyzw, BC::x, vf27, vf27, vf0); // vmaxx.xyzw vf27, vf27, vf0 + c->vadd_bc(DEST::xyzw, BC::x, vf28, vf24, vf27); // vaddx.xyzw vf28, vf24, vf27 + c->vmula_bc(DEST::xyzw, BC::w, vf25, vf0); // vmulaw.xyzw acc, vf25, vf0 + c->vmadd(DEST::xyzw, vf29, vf28, vf26); // vmadd.xyzw vf29, vf28, vf26 + c->sqc2(vf28, 0, a1); // sqc2 vf28, 0(a1) + c->sqc2(vf29, 0, v1); // sqc2 vf29, 0(v1) + c->lw(t0, 8, a1); // lw t0, 8(a1) + c->lw(a1, 4, a1); // lw a1, 4(a1) + bc = ((s64)c->sgpr64(t0)) >= 0; // bgez t0, L18 + c->lw(v0, 8, v1); // lw v0, 8(v1) + if (bc) {goto block_38;} // branch non-likely + + bc = ((s64)c->sgpr64(a1)) >= 0; // bgez a1, L18 + c->lw(v0, 4, v1); // lw v0, 4(v1) + if (bc) {goto block_38;} // branch non-likely + + c->lw(v0, 0, v1); // lw v0, 0(v1) + +block_38: + c->mov64(v1, v0); // or v1, v0, r0 + c->mtc1(f2, v1); // mtc1 f2, v1 + c->muls(f1, f1, f2); // mul.s f1, f1, f2 + c->lwu(t0, 32, a3); // lwu t0, 32(a3) + c->movs(f2, f0); // mov.s f2, f0 + c->daddiu(a1, sp, 240); // daddiu a1, sp, 240 + c->daddiu(v1, sp, 256); // daddiu v1, sp, 256 + c->mfc1(t1, f2); // mfc1 t1, f2 + c->mov128_vf_gpr(vf27, t1); // qmtc2.i vf27, t1 + c->lqc2(vf24, 12, t0); // lqc2 vf24, 12(t0) + c->lqc2(vf25, 28, t0); // lqc2 vf25, 28(t0) + c->lqc2(vf26, 44, t0); // lqc2 vf26, 44(t0) + c->vmini_bc(DEST::xyzw, BC::w, vf27, vf27, vf0); // vminiw.xyzw vf27, vf27, vf0 + c->vmax_bc(DEST::xyzw, BC::x, vf27, vf27, vf0); // vmaxx.xyzw vf27, vf27, vf0 + c->vadd_bc(DEST::xyzw, BC::x, vf28, vf24, vf27); // vaddx.xyzw vf28, vf24, vf27 + c->vmula_bc(DEST::xyzw, BC::w, vf25, vf0); // vmulaw.xyzw acc, vf25, vf0 + c->vmadd(DEST::xyzw, vf29, vf28, vf26); // vmadd.xyzw vf29, vf28, vf26 + c->sqc2(vf28, 0, a1); // sqc2 vf28, 0(a1) + c->sqc2(vf29, 0, v1); // sqc2 vf29, 0(v1) + c->lw(t0, 8, a1); // lw t0, 8(a1) + c->lw(a1, 4, a1); // lw a1, 4(a1) + bc = ((s64)c->sgpr64(t0)) >= 0; // bgez t0, L19 + c->lw(v0, 8, v1); // lw v0, 8(v1) + if (bc) {goto block_41;} // branch non-likely + + bc = ((s64)c->sgpr64(a1)) >= 0; // bgez a1, L19 + c->lw(v0, 4, v1); // lw v0, 4(v1) + if (bc) {goto block_41;} // branch non-likely + + c->lw(v0, 0, v1); // lw v0, 0(v1) + +block_41: + c->mov64(v1, v0); // or v1, v0, r0 + c->mtc1(f2, v1); // mtc1 f2, v1 + c->muls(f1, f1, f2); // mul.s f1, f1, f2 + c->abss(f1, f1); // abs.s f1, f1 + c->swc1(f1, 12, a2); // swc1 f1, 12(a2) + c->mfc1(v1, f1); // mfc1 v1, f1 + +block_42: + c->ld(v1, 56, a3); // ld v1, 56(a3) + c->andi(v1, v1, 1); // andi v1, v1, 1 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L21 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_44;} // branch non-likely + + c->lwc1(f0, 12, a2); // lwc1 f0, 12(a2) + c->swc1(f0, 28, a2); // swc1 f0, 28(a2) + c->mfc1(v1, f0); // mfc1 v1, f0 + //beq r0, r0, L24 // beq r0, r0, L24 + // nop // sll r0, r0, 0 + goto block_53; // branch always + + +block_44: + c->lwu(v1, 12, a3); // lwu v1, 12(a3) + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L24 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_53;} // branch non-likely + + c->load_symbol2(t0, cache.random_generator); // lw t0, *random-generator*(s7) + c->lwu(a1, 0, t0); // lwu a1, 0(t0) + c->addiu(v1, r0, 16807); // addiu v1, r0, 16807 + c->mult3(v0, v1, a1); // mult3 v0, v1, a1 + c->mfhi(v1); // mfhi v1 + c->daddu(v1, v1, v1); // daddu v1, v1, v1 + c->srl(a1, v0, 31); // srl a1, v0, 31 + c->or_(v1, v1, a1); // or v1, v1, a1 + c->daddu(v0, v0, v1); // daddu v0, v0, v1 + c->sll(v0, v0, 1); // sll v0, v0, 1 + c->srl(v0, v0, 1); // srl v0, v0, 1 + c->sw(v0, 0, t0); // sw v0, 0(t0) + c->mov64(v1, v0); // or v1, v0, r0 + c->dsra(v1, v1, 8); // dsra v1, v1, 8 + c->lui(a1, 16256); // lui a1, 16256 + c->or_(v1, a1, v1); // or v1, a1, v1 + c->lui(a1, -16512); // lui a1, -16512 + c->mtc1(f1, a1); // mtc1 f1, a1 + c->mtc1(f2, v1); // mtc1 f2, v1 + c->adds(f1, f1, f2); // add.s f1, f1, f2 + c->mfc1(v1, f1); // mfc1 v1, f1 + c->mtc1(f2, v1); // mtc1 f2, v1 + c->lwu(v1, 36, a3); // lwu v1, 36(a3) + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L24 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_53;} // branch non-likely + + c->lui(v1, 17792); // lui v1, 17792 + c->mtc1(f1, v1); // mtc1 f1, v1 + c->lwu(t0, 12, a3); // lwu t0, 12(a3) + c->daddiu(a1, sp, 272); // daddiu a1, sp, 272 + c->daddiu(v1, sp, 288); // daddiu v1, sp, 288 + c->mfc1(t1, f2); // mfc1 t1, f2 + c->mov128_vf_gpr(vf27, t1); // qmtc2.i vf27, t1 + c->lqc2(vf24, 12, t0); // lqc2 vf24, 12(t0) + c->lqc2(vf25, 28, t0); // lqc2 vf25, 28(t0) + c->lqc2(vf26, 44, t0); // lqc2 vf26, 44(t0) + c->vmini_bc(DEST::xyzw, BC::w, vf27, vf27, vf0); // vminiw.xyzw vf27, vf27, vf0 + c->vmax_bc(DEST::xyzw, BC::x, vf27, vf27, vf0); // vmaxx.xyzw vf27, vf27, vf0 + c->vadd_bc(DEST::xyzw, BC::x, vf28, vf24, vf27); // vaddx.xyzw vf28, vf24, vf27 + c->vmula_bc(DEST::xyzw, BC::w, vf25, vf0); // vmulaw.xyzw acc, vf25, vf0 + c->vmadd(DEST::xyzw, vf29, vf28, vf26); // vmadd.xyzw vf29, vf28, vf26 + c->sqc2(vf28, 0, a1); // sqc2 vf28, 0(a1) + c->sqc2(vf29, 0, v1); // sqc2 vf29, 0(v1) + c->lw(t0, 8, a1); // lw t0, 8(a1) + c->lw(a1, 4, a1); // lw a1, 4(a1) + // nop // sll r0, r0, 0 + bc = ((s64)c->sgpr64(t0)) >= 0; // bgez t0, L22 + c->lw(v0, 8, v1); // lw v0, 8(v1) + if (bc) {goto block_49;} // branch non-likely + + bc = ((s64)c->sgpr64(a1)) >= 0; // bgez a1, L22 + c->lw(v0, 4, v1); // lw v0, 4(v1) + if (bc) {goto block_49;} // branch non-likely + + c->lw(v0, 0, v1); // lw v0, 0(v1) + +block_49: + c->mov64(v1, v0); // or v1, v0, r0 + c->mtc1(f2, v1); // mtc1 f2, v1 + c->muls(f1, f1, f2); // mul.s f1, f1, f2 + c->lwu(a3, 36, a3); // lwu a3, 36(a3) + c->daddiu(a1, sp, 304); // daddiu a1, sp, 304 + c->daddiu(v1, sp, 320); // daddiu v1, sp, 320 + c->mfc1(t0, f0); // mfc1 t0, f0 + c->mov128_vf_gpr(vf27, t0); // qmtc2.i vf27, t0 + c->lqc2(vf24, 12, a3); // lqc2 vf24, 12(a3) + c->lqc2(vf25, 28, a3); // lqc2 vf25, 28(a3) + c->lqc2(vf26, 44, a3); // lqc2 vf26, 44(a3) + c->vmini_bc(DEST::xyzw, BC::w, vf27, vf27, vf0); // vminiw.xyzw vf27, vf27, vf0 + c->vmax_bc(DEST::xyzw, BC::x, vf27, vf27, vf0); // vmaxx.xyzw vf27, vf27, vf0 + c->vadd_bc(DEST::xyzw, BC::x, vf28, vf24, vf27); // vaddx.xyzw vf28, vf24, vf27 + c->vmula_bc(DEST::xyzw, BC::w, vf25, vf0); // vmulaw.xyzw acc, vf25, vf0 + c->vmadd(DEST::xyzw, vf29, vf28, vf26); // vmadd.xyzw vf29, vf28, vf26 + c->sqc2(vf28, 0, a1); // sqc2 vf28, 0(a1) + c->sqc2(vf29, 0, v1); // sqc2 vf29, 0(v1) + c->lw(a3, 8, a1); // lw a3, 8(a1) + c->lw(a1, 4, a1); // lw a1, 4(a1) + // nop // sll r0, r0, 0 + bc = ((s64)c->sgpr64(a3)) >= 0; // bgez a3, L23 + c->lw(v0, 8, v1); // lw v0, 8(v1) + if (bc) {goto block_52;} // branch non-likely + + bc = ((s64)c->sgpr64(a1)) >= 0; // bgez a1, L23 + c->lw(v0, 4, v1); // lw v0, 4(v1) + if (bc) {goto block_52;} // branch non-likely + + c->lw(v0, 0, v1); // lw v0, 0(v1) + +block_52: + c->mov64(v1, v0); // or v1, v0, r0 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->muls(f0, f1, f0); // mul.s f0, f1, f0 + c->abss(f0, f0); // abs.s f0, f0 + c->swc1(f0, 28, a2); // swc1 f0, 28(a2) + c->mfc1(v1, f0); // mfc1 v1, f0 + +block_53: + c->load_symbol2(v1, cache.random_generator); // lw v1, *random-generator*(s7) + c->sw(a0, 0, v1); // sw a0, 0(v1) + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + //jr ra // jr ra + c->daddiu(sp, sp, 336); // daddiu sp, sp, 336 + 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.random_generator = intern_from_c(-1, 0, "*random-generator*").c(); + gLinkedFunctionTable.reg("live-func-curve", execute, 512); +} + +} // namespace live_func_curve +} // 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 birth_func_curve { +struct Cache { + void* random_generator; // *random-generator* +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->daddiu(sp, sp, -112); // daddiu sp, sp, -112 + c->mov64(t1, a1); // or t1, a1, r0 + c->lwu(a0, 108, t1); // lwu a0, 108(t1) + c->addiu(v1, r0, 0); // addiu v1, r0, 0 + c->load_symbol2(v1, cache.random_generator); // lw v1, *random-generator*(s7) + c->lwu(v1, 0, v1); // lwu v1, 0(v1) + c->sw(v1, 12, t1); // sw v1, 12(t1) + c->ld(a3, 40, a0); // ld a3, 40(a0) + c->ld(v1, 48, a0); // ld v1, 48(a0) + c->slt(v1, r0, v1); // slt v1, r0, v1 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L26 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_2;} // branch non-likely + + c->load_symbol2(t0, cache.random_generator); // lw t0, *random-generator*(s7) + c->lwu(a1, 0, t0); // lwu a1, 0(t0) + c->addiu(v1, r0, 16807); // addiu v1, r0, 16807 + c->mult3(v0, v1, a1); // mult3 v0, v1, a1 + c->mfhi(v1); // mfhi v1 + c->daddu(v1, v1, v1); // daddu v1, v1, v1 + c->srl(a1, v0, 31); // srl a1, v0, 31 + c->or_(v1, v1, a1); // or v1, v1, a1 + c->daddu(v0, v0, v1); // daddu v0, v0, v1 + c->sll(v0, v0, 1); // sll v0, v0, 1 + c->srl(v0, v0, 1); // srl v0, v0, 1 + c->sw(v0, 0, t0); // sw v0, 0(t0) + c->ld(v1, 48, a0); // ld v1, 48(a0) + c->div(v0, v1); // div v0, v1 + c->mfhi(v1); // mfhi v1 + c->daddu(a3, a3, v1); // daddu a3, a3, v1 + c->mov64(v1, a3); // or v1, a3, r0 + +block_2: + c->sw(a3, 100, t1); // sw a3, 100(t1) + c->mtc1(f0, r0); // mtc1 f0, r0 + c->swc1(f0, 44, a2); // swc1 f0, 44(a2) + c->lwu(v1, 0, a0); // lwu v1, 0(a0) + if (((s64)c->sgpr64(s7)) == ((s64)c->sgpr64(v1))) {// beql s7, v1, L27 + c->mov64(v1, v1); // or v1, v1, r0 + goto block_7; + } + +// block_4: + c->ld(v1, 56, a0); // ld v1, 56(a0) + c->andi(v1, v1, 4); // andi v1, v1, 4 + if (((s64)c->sgpr64(v1)) != ((s64)0)) { // bnel v1, r0, L27 + c->daddiu(v1, s7, 4); // daddiu v1, s7, 4 + goto block_7; + } + +//block_6: + c->daddiu(v1, s7, 4); // daddiu v1, s7, 4 + c->ld(a1, 56, a0); // ld a1, 56(a0) + c->andi(a1, a1, 2); // andi a1, a1, 2 + c->movn(v1, s7, a1); // movn v1, s7, a1 + +block_7: + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L31 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_14;} // branch non-likely + + c->lwu(a3, 0, a0); // lwu a3, 0(a0) + c->load_symbol2(t0, cache.random_generator); // lw t0, *random-generator*(s7) + c->lwu(a1, 0, t0); // lwu a1, 0(t0) + c->addiu(v1, r0, 16807); // addiu v1, r0, 16807 + c->mult3(v0, v1, a1); // mult3 v0, v1, a1 + c->mfhi(v1); // mfhi v1 + c->daddu(v1, v1, v1); // daddu v1, v1, v1 + c->srl(a1, v0, 31); // srl a1, v0, 31 + c->or_(v1, v1, a1); // or v1, v1, a1 + c->daddu(v0, v0, v1); // daddu v0, v0, v1 + c->sll(v0, v0, 1); // sll v0, v0, 1 + c->srl(v0, v0, 1); // srl v0, v0, 1 + c->sw(v0, 0, t0); // sw v0, 0(t0) + c->mov64(v1, v0); // or v1, v0, r0 + c->dsra(v1, v1, 8); // dsra v1, v1, 8 + c->lui(a1, 16256); // lui a1, 16256 + c->or_(v1, a1, v1); // or v1, a1, v1 + c->lui(a1, -16512); // lui a1, -16512 + c->mtc1(f0, a1); // mtc1 f0, a1 + c->mtc1(f1, v1); // mtc1 f1, v1 + c->adds(f0, f0, f1); // add.s f0, f0, f1 + c->mfc1(v1, f0); // mfc1 v1, f0 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->daddiu(v1, sp, 16); // daddiu v1, sp, 16 + c->daddiu(a1, sp, 32); // daddiu a1, sp, 32 + c->mfc1(t0, f0); // mfc1 t0, f0 + c->mov128_vf_gpr(vf26, t0); // qmtc2.i vf26, t0 + c->lqc2(vf23, 12, a3); // lqc2 vf23, 12(a3) + c->lqc2(vf25, 92, a3); // lqc2 vf25, 92(a3) + c->vmax_bc(DEST::xyzw, BC::w, vf3, vf0, vf0); // vmaxw.xyzw vf3, vf0, vf0 + c->vmula(DEST::xyzw, vf25, vf23); // vmula.xyzw acc, vf25, vf23 + c->vmadd_bc(DEST::xyzw, BC::x, vf28, vf25, vf26); // vmaddx.xyzw vf28, vf25, vf26 + c->sqc2(vf28, 0, a1); // sqc2 vf28, 0(a1) + c->lw(t0, 8, a1); // lw t0, 8(a1) + c->lw(a1, 4, a1); // lw a1, 4(a1) + // nop // sll r0, r0, 0 + bc = ((s64)c->sgpr64(t0)) >= 0; // bgez t0, L29 + // nop // sll r0, r0, 0 + if (bc) {goto block_12;} // branch non-likely + + bc = ((s64)c->sgpr64(a1)) >= 0; // bgez a1, L28 + // nop // sll r0, r0, 0 + if (bc) {goto block_11;} // branch non-likely + + c->lqc2(vf1, 28, a3); // lqc2 vf1, 28(a3) + c->lqc2(vf2, 44, a3); // lqc2 vf2, 44(a3) + c->vsub_bc(DEST::xyzw, BC::x, vf4, vf3, vf28); // vsubx.xyzw vf4, vf3, vf28 + c->vmula_bc(DEST::xyzw, BC::x, vf2, vf28); // vmulax.xyzw acc, vf2, vf28 + c->vmadd_bc(DEST::xyzw, BC::x, vf5, vf1, vf4); // vmaddx.xyzw vf5, vf1, vf4 + //beq r0, r0, L30 // beq r0, r0, L30 + c->sqc2(vf5, 0, v1); // sqc2 vf5, 0(v1) + goto block_13; // branch always + + +block_11: + c->lqc2(vf1, 44, a3); // lqc2 vf1, 44(a3) + c->lqc2(vf2, 60, a3); // lqc2 vf2, 60(a3) + c->vsub_bc(DEST::xyzw, BC::y, vf4, vf3, vf28); // vsuby.xyzw vf4, vf3, vf28 + c->vmula_bc(DEST::xyzw, BC::y, vf2, vf28); // vmulay.xyzw acc, vf2, vf28 + c->vmadd_bc(DEST::xyzw, BC::y, vf5, vf1, vf4); // vmaddy.xyzw vf5, vf1, vf4 + //beq r0, r0, L30 // beq r0, r0, L30 + c->sqc2(vf5, 0, v1); // sqc2 vf5, 0(v1) + goto block_13; // branch always + + +block_12: + c->lqc2(vf1, 60, a3); // lqc2 vf1, 60(a3) + c->lqc2(vf2, 76, a3); // lqc2 vf2, 76(a3) + c->vsub_bc(DEST::xyzw, BC::z, vf4, vf3, vf28); // vsubz.xyzw vf4, vf3, vf28 + c->vmula_bc(DEST::xyzw, BC::z, vf2, vf28); // vmulaz.xyzw acc, vf2, vf28 + c->vmadd_bc(DEST::xyzw, BC::z, vf5, vf1, vf4); // vmaddz.xyzw vf5, vf1, vf4 + c->sqc2(vf5, 0, v1); // sqc2 vf5, 0(v1) + +block_13: + c->lwc1(f0, 0, v1); // lwc1 f0, 0(v1) + c->swc1(f0, 32, a2); // swc1 f0, 32(a2) + c->lwc1(f0, 4, v1); // lwc1 f0, 4(v1) + c->swc1(f0, 36, a2); // swc1 f0, 36(a2) + c->lwc1(f0, 8, v1); // lwc1 f0, 8(v1) + c->swc1(f0, 40, a2); // swc1 f0, 40(a2) + c->mfc1(v1, f0); // mfc1 v1, f0 + +block_14: + c->ld(v1, 56, a0); // ld v1, 56(a0) + c->andi(v1, v1, 4); // andi v1, v1, 4 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L36 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_27;} // branch non-likely + + c->mtc1(f0, r0); // mtc1 f0, r0 + c->lwu(v1, 8, a0); // lwu v1, 8(a0) + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L33 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_20;} // branch non-likely + + c->load_symbol2(a3, cache.random_generator); // lw a3, *random-generator*(s7) + c->lwu(a1, 0, a3); // lwu a1, 0(a3) + c->addiu(v1, r0, 16807); // addiu v1, r0, 16807 + c->mult3(v0, v1, a1); // mult3 v0, v1, a1 + c->mfhi(v1); // mfhi v1 + c->daddu(v1, v1, v1); // daddu v1, v1, v1 + c->srl(a1, v0, 31); // srl a1, v0, 31 + c->or_(v1, v1, a1); // or v1, v1, a1 + c->daddu(v0, v0, v1); // daddu v0, v0, v1 + c->sll(v0, v0, 1); // sll v0, v0, 1 + c->srl(v0, v0, 1); // srl v0, v0, 1 + c->sw(v0, 0, a3); // sw v0, 0(a3) + c->mov64(v1, v0); // or v1, v0, r0 + c->dsra(v1, v1, 8); // dsra v1, v1, 8 + c->lui(a1, 16256); // lui a1, 16256 + c->or_(v1, a1, v1); // or v1, a1, v1 + c->lui(a1, -16512); // lui a1, -16512 + c->mtc1(f0, a1); // mtc1 f0, a1 + c->mtc1(f1, v1); // mtc1 f1, v1 + c->adds(f0, f0, f1); // add.s f0, f0, f1 + c->mfc1(v1, f0); // mfc1 v1, f0 + c->mtc1(f1, v1); // mtc1 f1, v1 + c->lui(v1, 17792); // lui v1, 17792 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->lwu(a3, 8, a0); // lwu a3, 8(a0) + c->daddiu(a1, sp, 48); // daddiu a1, sp, 48 + c->daddiu(v1, sp, 64); // daddiu v1, sp, 64 + c->mfc1(t0, f1); // mfc1 t0, f1 + c->mov128_vf_gpr(vf27, t0); // qmtc2.i vf27, t0 + c->lqc2(vf24, 12, a3); // lqc2 vf24, 12(a3) + c->lqc2(vf25, 28, a3); // lqc2 vf25, 28(a3) + c->lqc2(vf26, 44, a3); // lqc2 vf26, 44(a3) + c->vmini_bc(DEST::xyzw, BC::w, vf27, vf27, vf0); // vminiw.xyzw vf27, vf27, vf0 + c->vmax_bc(DEST::xyzw, BC::x, vf27, vf27, vf0); // vmaxx.xyzw vf27, vf27, vf0 + c->vadd_bc(DEST::xyzw, BC::x, vf28, vf24, vf27); // vaddx.xyzw vf28, vf24, vf27 + c->vmula_bc(DEST::xyzw, BC::w, vf25, vf0); // vmulaw.xyzw acc, vf25, vf0 + c->vmadd(DEST::xyzw, vf29, vf28, vf26); // vmadd.xyzw vf29, vf28, vf26 + c->sqc2(vf28, 0, a1); // sqc2 vf28, 0(a1) + c->sqc2(vf29, 0, v1); // sqc2 vf29, 0(v1) + c->lw(a3, 8, a1); // lw a3, 8(a1) + c->lw(a1, 4, a1); // lw a1, 4(a1) + bc = ((s64)c->sgpr64(a3)) >= 0; // bgez a3, L32 + c->lw(v0, 8, v1); // lw v0, 8(v1) + if (bc) {goto block_19;} // branch non-likely + + bc = ((s64)c->sgpr64(a1)) >= 0; // bgez a1, L32 + c->lw(v0, 4, v1); // lw v0, 4(v1) + if (bc) {goto block_19;} // branch non-likely + + c->lw(v0, 0, v1); // lw v0, 0(v1) + +block_19: + c->mov64(v1, v0); // or v1, v0, r0 + c->mtc1(f1, v1); // mtc1 f1, v1 + c->muls(f0, f0, f1); // mul.s f0, f0, f1 + c->swc1(f0, 12, a2); // swc1 f0, 12(a2) + c->mfc1(v1, f0); // mfc1 v1, f0 + +block_20: + c->ld(v1, 56, a0); // ld v1, 56(a0) + c->andi(v1, v1, 1); // andi v1, v1, 1 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L34 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_22;} // branch non-likely + + c->lwc1(f0, 12, a2); // lwc1 f0, 12(a2) + c->swc1(f0, 28, a2); // swc1 f0, 28(a2) + c->mfc1(v1, f0); // mfc1 v1, f0 + //beq r0, r0, L36 // beq r0, r0, L36 + // nop // sll r0, r0, 0 + goto block_27; // branch always + + +block_22: + c->lwu(v1, 12, a0); // lwu v1, 12(a0) + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L36 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_27;} // branch non-likely + + c->load_symbol2(a3, cache.random_generator); // lw a3, *random-generator*(s7) + c->lwu(a1, 0, a3); // lwu a1, 0(a3) + c->addiu(v1, r0, 16807); // addiu v1, r0, 16807 + c->mult3(v0, v1, a1); // mult3 v0, v1, a1 + c->mfhi(v1); // mfhi v1 + c->daddu(v1, v1, v1); // daddu v1, v1, v1 + c->srl(a1, v0, 31); // srl a1, v0, 31 + c->or_(v1, v1, a1); // or v1, v1, a1 + c->daddu(v0, v0, v1); // daddu v0, v0, v1 + c->sll(v0, v0, 1); // sll v0, v0, 1 + c->srl(v0, v0, 1); // srl v0, v0, 1 + c->sw(v0, 0, a3); // sw v0, 0(a3) + c->mov64(v1, v0); // or v1, v0, r0 + c->dsra(v1, v1, 8); // dsra v1, v1, 8 + c->lui(a1, 16256); // lui a1, 16256 + c->or_(v1, a1, v1); // or v1, a1, v1 + c->lui(a1, -16512); // lui a1, -16512 + c->mtc1(f0, a1); // mtc1 f0, a1 + c->mtc1(f1, v1); // mtc1 f1, v1 + c->adds(f0, f0, f1); // add.s f0, f0, f1 + c->mfc1(v1, f0); // mfc1 v1, f0 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->lui(v1, 17792); // lui v1, 17792 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->lwu(a0, 12, a0); // lwu a0, 12(a0) + c->load_symbol2(a3, cache.random_generator); // lw a3, *random-generator*(s7) + c->lwu(a1, 0, a3); // lwu a1, 0(a3) + c->addiu(v1, r0, 16807); // addiu v1, r0, 16807 + c->mult3(v0, v1, a1); // mult3 v0, v1, a1 + c->mfhi(v1); // mfhi v1 + c->daddu(v1, v1, v1); // daddu v1, v1, v1 + c->srl(a1, v0, 31); // srl a1, v0, 31 + c->or_(v1, v1, a1); // or v1, v1, a1 + c->daddu(v0, v0, v1); // daddu v0, v0, v1 + c->sll(v0, v0, 1); // sll v0, v0, 1 + c->srl(v0, v0, 1); // srl v0, v0, 1 + c->sw(v0, 0, a3); // sw v0, 0(a3) + c->mov64(v1, v0); // or v1, v0, r0 + c->dsra(v1, v1, 8); // dsra v1, v1, 8 + c->lui(a1, 16256); // lui a1, 16256 + c->or_(v1, a1, v1); // or v1, a1, v1 + c->lui(a1, -16512); // lui a1, -16512 + c->mtc1(f1, a1); // mtc1 f1, a1 + c->mtc1(f2, v1); // mtc1 f2, v1 + c->adds(f1, f1, f2); // add.s f1, f1, f2 + c->mfc1(v1, f1); // mfc1 v1, f1 + c->mtc1(f1, v1); // mtc1 f1, v1 + c->daddiu(a1, sp, 80); // daddiu a1, sp, 80 + c->daddiu(v1, sp, 96); // daddiu v1, sp, 96 + c->mfc1(a3, f1); // mfc1 a3, f1 + c->mov128_vf_gpr(vf27, a3); // qmtc2.i vf27, a3 + c->lqc2(vf24, 12, a0); // lqc2 vf24, 12(a0) + c->lqc2(vf25, 28, a0); // lqc2 vf25, 28(a0) + c->lqc2(vf26, 44, a0); // lqc2 vf26, 44(a0) + c->vmini_bc(DEST::xyzw, BC::w, vf27, vf27, vf0); // vminiw.xyzw vf27, vf27, vf0 + c->vmax_bc(DEST::xyzw, BC::x, vf27, vf27, vf0); // vmaxx.xyzw vf27, vf27, vf0 + c->vadd_bc(DEST::xyzw, BC::x, vf28, vf24, vf27); // vaddx.xyzw vf28, vf24, vf27 + c->vmula_bc(DEST::xyzw, BC::w, vf25, vf0); // vmulaw.xyzw acc, vf25, vf0 + c->vmadd(DEST::xyzw, vf29, vf28, vf26); // vmadd.xyzw vf29, vf28, vf26 + c->sqc2(vf28, 0, a1); // sqc2 vf28, 0(a1) + c->sqc2(vf29, 0, v1); // sqc2 vf29, 0(v1) + c->lw(a0, 8, a1); // lw a0, 8(a1) + c->lw(a1, 4, a1); // lw a1, 4(a1) + // nop // sll r0, r0, 0 + bc = ((s64)c->sgpr64(a0)) >= 0; // bgez a0, L35 + c->lw(v0, 8, v1); // lw v0, 8(v1) + if (bc) {goto block_26;} // branch non-likely + + bc = ((s64)c->sgpr64(a1)) >= 0; // bgez a1, L35 + c->lw(v0, 4, v1); // lw v0, 4(v1) + if (bc) {goto block_26;} // branch non-likely + + c->lw(v0, 0, v1); // lw v0, 0(v1) + +block_26: + c->mov64(v1, v0); // or v1, v0, r0 + c->mtc1(f1, v1); // mtc1 f1, v1 + c->muls(f0, f0, f1); // mul.s f0, f0, f1 + c->swc1(f0, 28, a2); // swc1 f0, 28(a2) + c->mfc1(v1, f0); // mfc1 v1, f0 + +block_27: + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + //jr ra // jr ra + c->daddiu(sp, sp, 112); // daddiu sp, sp, 112 + goto end_of_function; // return + +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + cache.random_generator = intern_from_c(-1, 0, "*random-generator*").c(); + gLinkedFunctionTable.reg("birth-func-curve", execute, 128); +} + +} // namespace birth_func_curve +} // namespace Mips2C \ No newline at end of file diff --git a/game/mips2c/jak3_functions/prim.cpp b/game/mips2c/jak3_functions/prim.cpp new file mode 100644 index 0000000000..75de3d877f --- /dev/null +++ b/game/mips2c/jak3_functions/prim.cpp @@ -0,0 +1,479 @@ +//--------------------------MIPS2C--------------------- +// clang-format off +#include "game/mips2c/mips2c_private.h" +#include "game/kernel/jak3/kscheme.h" +using ::jak3::intern_from_c; +namespace Mips2C::jak3 { +namespace method_9_prim_strip { +struct Cache { + void* display; // *display* + void* prim_work; // *prim-work* + void* stdcon; // *stdcon* + void* adgif_shader_texture_simple; // adgif-shader<-texture-simple! + void* dma_bucket_insert_tag; // dma-bucket-insert-tag + void* format; // format + void* lookup_texture_by_id; // lookup-texture-by-id + void* paused; // paused? +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->daddiu(sp, sp, -112); // daddiu sp, sp, -112 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sd(fp, 8, sp); // sd fp, 8(sp) + c->mov64(fp, t9); // or fp, t9, r0 + c->sq(s1, 16, sp); // sq s1, 16(sp) + c->sq(s2, 32, sp); // sq s2, 32(sp) + c->sq(s3, 48, sp); // sq s3, 48(sp) + c->sq(s4, 64, sp); // sq s4, 64(sp) + c->sq(s5, 80, sp); // sq s5, 80(sp) + c->sq(gp, 96, sp); // sq gp, 96(sp) + c->mov64(gp, a0); // or gp, a0, r0 + c->mov64(s1, a1); // or s1, a1, r0 + c->load_symbol2(v1, cache.display); // lw v1, *display*(s7) + c->lw(v1, 0, v1); // lw v1, 0(v1) + c->dsll(v1, v1, 2); // dsll v1, v1, 2 + c->load_symbol2(a0, cache.display); // lw a0, *display*(s7) + c->daddu(v1, v1, a0); // daddu v1, v1, a0 + c->lwu(v1, 8, v1); // lwu v1, 8(v1) + c->lwu(v1, 36, v1); // lwu v1, 36(v1) + c->lhu(a0, 8, gp); // lhu a0, 8(gp) + c->daddiu(a0, a0, 79); // daddiu a0, a0, 79 + c->addiu(a1, r0, 80); // addiu a1, r0, 80 + // Unknown instr: divu a0, a1 + // Unknown instr: mflo a0 + c->gprs[a0].du64[0] = c->gprs[a0].du32[0] / c->gprs[a1].du32[0]; + c->addiu(a1, r0, 144); // addiu a1, r0, 144 + c->lhu(a2, 8, gp); // lhu a2, 8(gp) + c->multu3(a1, a1, a2); // multu3 a1, a1, a2 + c->dsll(a0, a0, 7); // dsll a0, a0, 7 + c->daddu(a0, a1, a0); // daddu a0, a1, a0 + c->lwu(a1, 8, v1); // lwu a1, 8(v1) + c->lwu(v1, 4, v1); // lwu v1, 4(v1) + c->dsubu(v1, a1, v1); // dsubu v1, a1, v1 + c->sltu(v1, a0, v1); // sltu v1, a0, v1 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L23 + // nop // sll r0, r0, 0 + if (bc) {goto block_28;} // branch non-likely + + c->load_symbol2(t9, cache.lookup_texture_by_id); // lw t9, lookup-texture-by-id(s7) + c->lwu(a0, 12, gp); // lwu a0, 12(gp) + call_addr = c->gprs[t9].du32[0]; // function call: + c->sll(v0, ra, 0); // sll v0, ra, 0 + c->jalr(call_addr); // jalr ra, t9 + c->mov64(a1, v0); // or a1, v0, r0 + c->load_symbol2(s3, cache.prim_work); // lw s3, *prim-work*(s7) + c->lwu(v1, 80, gp); // lwu v1, 80(gp) + c->dsll(v1, v1, 4); // dsll v1, v1, 4 + c->daddiu(v1, v1, 236); // daddiu v1, v1, 236 + c->daddu(s2, v1, s3); // daddu s2, v1, s3 + c->load_symbol2(v1, cache.display); // lw v1, *display*(s7) + c->lw(v1, 0, v1); // lw v1, 0(v1) + c->dsll(v1, v1, 2); // dsll v1, v1, 2 + c->load_symbol2(a0, cache.display); // lw a0, *display*(s7) + c->daddu(v1, v1, a0); // daddu v1, v1, a0 + c->lwu(v1, 8, v1); // lwu v1, 8(v1) + c->lwu(s4, 36, v1); // lwu s4, 36(v1) + c->lwu(s5, 4, s4); // lwu s5, 4(s4) + c->lhu(v1, 8, gp); // lhu v1, 8(gp) + c->sw(v1, 224, s3); // sw v1, 224(s3) + c->daddiu(v1, gp, 92); // daddiu v1, gp, 92 + c->sw(v1, 232, s3); // sw v1, 232(s3) + c->lwu(v1, 0, gp); // lwu v1, 0(gp) + c->andi(v1, v1, 1); // andi v1, v1, 1 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L8 + // nop // sll r0, r0, 0 + if (bc) {goto block_3;} // branch non-likely + + c->addiu(v1, r0, 1); // addiu v1, r0, 1 + //beq r0, r0, L9 // beq r0, r0, L9 + // nop // sll r0, r0, 0 + goto block_4; // branch always + + +block_3: + c->addiu(v1, r0, 0); // addiu v1, r0, 0 + +block_4: + c->lwu(a0, 0, gp); // lwu a0, 0(gp) + c->andi(a0, a0, 2); // andi a0, a0, 2 + bc = c->sgpr64(a0) == 0; // beq a0, r0, L10 + // nop // sll r0, r0, 0 + if (bc) {goto block_6;} // branch non-likely + + c->addiu(a0, r0, 1); // addiu a0, r0, 1 + //beq r0, r0, L11 // beq r0, r0, L11 + // nop // sll r0, r0, 0 + goto block_7; // branch always + + +block_6: + c->addiu(a0, r0, 0); // addiu a0, r0, 0 + +block_7: + c->lwu(a2, 0, gp); // lwu a2, 0(gp) + c->andi(a2, a2, 4); // andi a2, a2, 4 + bc = c->sgpr64(a2) == 0; // beq a2, r0, L12 + // nop // sll r0, r0, 0 + if (bc) {goto block_9;} // branch non-likely + + c->addiu(a2, r0, 1); // addiu a2, r0, 1 + //beq r0, r0, L13 // beq r0, r0, L13 + // nop // sll r0, r0, 0 + goto block_10; // branch always + + +block_9: + c->addiu(a2, r0, 0); // addiu a2, r0, 0 + +block_10: + c->lui(a3, 12288); // lui a3, 12288 + c->ori(a3, a3, 16384); // ori a3, a3, 16384 + c->dsll32(t0, a2, 31); // dsll32 t0, a2, 31 + c->dsrl32(t0, t0, 26); // dsrl32 t0, t0, 26 + c->ori(t0, t0, 13); // ori t0, t0, 13 + c->dsll32(t1, a0, 31); // dsll32 t1, a0, 31 + c->dsrl32(t1, t1, 27); // dsrl32 t1, t1, 27 + c->or_(t0, t0, t1); // or t0, t0, t1 + c->dsll32(t1, v1, 31); // dsll32 t1, v1, 31 + c->dsrl32(t1, t1, 25); // dsrl32 t1, t1, 25 + c->or_(t0, t0, t1); // or t0, t0, t1 + c->dsll32(t0, t0, 21); // dsll32 t0, t0, 21 + c->dsrl32(t0, t0, 6); // dsrl32 t0, t0, 6 + c->or_(a3, a3, t0); // or a3, a3, t0 + c->sw(a3, 80, s3); // sw a3, 80(s3) + c->lui(a3, 12288); // lui a3, 12288 + c->ori(a3, a3, 16384); // ori a3, a3, 16384 + c->dsll32(a2, a2, 31); // dsll32 a2, a2, 31 + c->dsrl32(a2, a2, 26); // dsrl32 a2, a2, 26 + c->ori(a2, a2, 12); // ori a2, a2, 12 + c->dsll32(a0, a0, 31); // dsll32 a0, a0, 31 + c->dsrl32(a0, a0, 27); // dsrl32 a0, a0, 27 + c->or_(a0, a2, a0); // or a0, a2, a0 + c->dsll32(v1, v1, 31); // dsll32 v1, v1, 31 + c->dsrl32(v1, v1, 25); // dsrl32 v1, v1, 25 + c->or_(v1, a0, v1); // or v1, a0, v1 + c->dsll32(v1, v1, 21); // dsll32 v1, v1, 21 + c->dsrl32(v1, v1, 6); // dsrl32 v1, v1, 6 + c->or_(v1, a3, v1); // or v1, a3, v1 + c->sw(v1, 84, s3); // sw v1, 84(s3) + bc = c->sgpr64(s7) == c->sgpr64(a1); // beq s7, a1, L19 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_20;} // branch non-likely + + c->lwu(v1, 84, gp); // lwu v1, 84(gp) + c->lwu(a0, 88, gp); // lwu a0, 88(gp) + c->lwu(a0, 88, gp); // lwu a0, 88(gp) + c->daddiu(a0, a0, 12); // daddiu a0, a0, 12 + c->addiu(a2, r0, 0); // addiu a2, r0, 0 + //beq r0, r0, L15 // beq r0, r0, L15 + // nop // sll r0, r0, 0 + goto block_13; // branch always + + +block_12: + c->dsll(a3, a0, 4); // dsll a3, a0, 4 + c->daddu(a3, v1, a3); // daddu a3, v1, a3 + c->lq(a3, 4828, a3); // lq a3, 4828(a3) + c->dsll(t0, a2, 4); // dsll t0, a2, 4 + c->daddu(t0, a1, t0); // daddu t0, a1, t0 + c->lq(t0, 60, t0); // lq t0, 60(t0) + c->por(a3, a3, t0); // por a3, a3, t0 + c->dsll(t0, a0, 4); // dsll t0, a0, 4 + c->daddu(t0, v1, t0); // daddu t0, v1, t0 + c->sq(a3, 4828, t0); // sq a3, 4828(t0) + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + +block_13: + c->slti(a3, a2, 3); // slti a3, a2, 3 + bc = c->sgpr64(a3) != 0; // bne a3, r0, L14 + // nop // sll r0, r0, 0 + if (bc) {goto block_12;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + c->mov64(v1, s7); // or v1, s7, r0 + c->load_symbol2(t9, cache.adgif_shader_texture_simple);// lw t9, adgif-shader<-texture-simple!(s7) + c->daddiu(a0, s3, 128); // daddiu a0, s3, 128 + call_addr = c->gprs[t9].du32[0]; // function call: + c->sll(v0, ra, 0); // sll v0, ra, 0 + c->jalr(call_addr); // jalr ra, t9 + c->ld(v1, 60, gp); // ld v1, 60(gp) + c->sd(v1, 176, s3); // sd v1, 176(s3) + c->addiu(v1, r0, 8); // addiu v1, r0, 8 + c->sd(v1, 184, s3); // sd v1, 184(s3) + c->ld(v1, 68, gp); // ld v1, 68(gp) + c->sd(v1, 192, s3); // sd v1, 192(s3) + c->addiu(v1, r0, 66); // addiu v1, r0, 66 + c->sb(v1, 200, s3); // sb v1, 200(s3) + c->lqc2(vf1, 0, s1); // lqc2 vf1, 0(s1) + c->lqc2(vf2, 16, s1); // lqc2 vf2, 16(s1) + c->lqc2(vf3, 32, s1); // lqc2 vf3, 32(s1) + c->lqc2(vf4, 48, s1); // lqc2 vf4, 48(s1) + c->lqc2(vf5, 128, s3); // lqc2 vf5, 128(s3) + c->lqc2(vf6, 144, s3); // lqc2 vf6, 144(s3) + c->lqc2(vf7, 160, s3); // lqc2 vf7, 160(s3) + c->lqc2(vf8, 176, s3); // lqc2 vf8, 176(s3) + c->lqc2(vf9, 192, s3); // lqc2 vf9, 192(s3) + c->lqc2(vf10, 80, s3); // lqc2 vf10, 80(s3) + c->lqc2(vf11, 28, gp); // lqc2 vf11, 28(gp) + c->lqc2(vf12, 44, gp); // lqc2 vf12, 44(gp) + //beq r0, r0, L18 // beq r0, r0, L18 + // nop // sll r0, r0, 0 + goto block_18; // branch always + + +block_15: + c->addiu(v1, r0, 80); // addiu v1, r0, 80 + c->lw(a0, 224, s3); // lw a0, 224(s3) + c->slt(a1, v1, a0); // slt a1, v1, a0 + c->movz(v1, a0, a1); // movz v1, a0, a1 + c->sw(v1, 228, s3); // sw v1, 228(s3) + c->lbu(v1, 1, s2); // lbu v1, 1(s2) + c->andi(v1, v1, 1); // andi v1, v1, 1 + c->dsll(v1, v1, 4); // dsll v1, v1, 4 + c->daddiu(v1, v1, 48); // daddiu v1, v1, 48 + c->daddu(a0, v1, s3); // daddu a0, v1, s3 + c->lw(v1, 4, s4); // lw v1, 4(s4) + c->lq(a0, 0, a0); // lq a0, 0(a0) + c->daddiu(a1, v1, 16); // daddiu a1, v1, 16 + c->lw(v1, 228, s3); // lw v1, 228(s3) + c->sq(a0, -16, a1); // sq a0, -16(a1) + c->sqc2(vf1, 0, a1); // sqc2 vf1, 0(a1) + c->sqc2(vf2, 16, a1); // sqc2 vf2, 16(a1) + c->sqc2(vf3, 32, a1); // sqc2 vf3, 32(a1) + c->sqc2(vf4, 48, a1); // sqc2 vf4, 48(a1) + c->sqc2(vf10, 64, a1); // sqc2 vf10, 64(a1) + c->sqc2(vf11, 80, a1); // sqc2 vf11, 80(a1) + c->sqc2(vf12, 96, a1); // sqc2 vf12, 96(a1) + c->sw(v1, 92, a1); // sw v1, 92(a1) + c->sqc2(vf5, 112, a1); // sqc2 vf5, 112(a1) + c->sqc2(vf6, 128, a1); // sqc2 vf6, 128(a1) + c->sqc2(vf7, 144, a1); // sqc2 vf7, 144(a1) + c->sqc2(vf8, 160, a1); // sqc2 vf8, 160(a1) + c->sqc2(vf9, 176, a1); // sqc2 vf9, 176(a1) + c->ori(a0, v1, 32768); // ori a0, v1, 32768 + c->sw(a0, 140, a1); // sw a0, 140(a1) + c->daddiu(a0, a1, 192); // daddiu a0, a1, 192 + c->sw(a0, 4, s4); // sw a0, 4(s4) + c->lbu(a0, 0, s2); // lbu a0, 0(s2) + c->addiu(a1, r0, 3); // addiu a1, r0, 3 + // Unknown instr: divu a0, a1 + // Unknown instr: mfhi a0 + c->gprs[a0].du64[0] = c->gprs[a0].du32[0] % c->gprs[a1].du32[0]; + c->dsll(a0, a0, 4); // dsll a0, a0, 4 + c->daddu(a0, r0, a0); // daddu a0, r0, a0 + c->daddu(a0, a0, s3); // daddu a0, a0, s3 + c->addiu(a1, r0, 3); // addiu a1, r0, 3 + c->mult3(a1, a1, v1); // mult3 a1, a1, v1 + c->ld(a2, 0, a0); // ld a2, 0(a0) + c->lui(a3, -1); // lui a3, -1 + c->and_(a2, a2, a3); // and a2, a2, a3 + c->dsll32(a3, a1, 16); // dsll32 a3, a1, 16 + c->dsrl32(a3, a3, 16); // dsrl32 a3, a3, 16 + c->or_(a2, a2, a3); // or a2, a2, a3 + c->sd(a2, 0, a0); // sd a2, 0(a0) + c->lwu(a2, 12, a0); // lwu a2, 12(a0) + c->lui(a3, -256); // lui a3, -256 + c->ori(a3, a3, 65535); // ori a3, a3, 65535 + c->and_(a2, a2, a3); // and a2, a2, a3 + c->dsll32(a1, a1, 24); // dsll32 a1, a1, 24 + c->dsrl32(a1, a1, 8); // dsrl32 a1, a1, 8 + c->or_(a1, a2, a1); // or a1, a2, a1 + c->sw(a1, 12, a0); // sw a1, 12(a0) + c->lw(a2, 4, s4); // lw a2, 4(s4) + c->lq(a3, 0, a0); // lq a3, 0(a0) + c->lq(a0, 208, s3); // lq a0, 208(s3) + c->lw(a1, 232, s3); // lw a1, 232(s3) + // nop // sll r0, r0, 0 + c->sq(a3, 0, a2); // sq a3, 0(a2) + c->daddiu(a2, a2, 16); // daddiu a2, a2, 16 + c->sw(a2, 4, s4); // sw a2, 4(s4) + // nop // sll r0, r0, 0 + +block_16: + // nop // sll r0, r0, 0 + c->lw(t0, 12, a1); // lw t0, 12(a1) + // nop // sll r0, r0, 0 + c->lw(a3, 44, a1); // lw a3, 44(a1) + c->pextlb(t0, r0, t0); // pextlb t0, r0, t0 + c->lqc2(vf15, 0, a1); // lqc2 vf15, 0(a1) + c->pextlh(t0, r0, t0); // pextlh t0, r0, t0 + c->lqc2(vf16, 32, a1); // lqc2 vf16, 32(a1) + c->pextlb(a3, r0, a3); // pextlb a3, r0, a3 + c->lqc2(vf13, 16, a1); // lqc2 vf13, 16(a1) + c->pextlh(a3, r0, a3); // pextlh a3, r0, a3 + c->lqc2(vf14, 48, a1); // lqc2 vf14, 48(a1) + c->vftoi12(DEST::xyzw, vf15, vf15); // vftoi12.xyzw vf15, vf15 + c->sq(t0, 16, a2); // sq t0, 16(a2) + c->vftoi12(DEST::xyzw, vf16, vf16); // vftoi12.xyzw vf16, vf16 + c->sq(a3, 64, a2); // sq a3, 64(a2) + // nop // sll r0, r0, 0 + c->lw(t0, 8, a1); // lw t0, 8(a1) + // nop // sll r0, r0, 0 + c->lw(a3, 40, a1); // lw a3, 40(a1) + c->daddiu(a1, a1, 64); // daddiu a1, a1, 64 + c->mov128_gpr_vf(t2, vf15); // qmfc2.i t2, vf15 + c->daddiu(v1, v1, -2); // daddiu v1, v1, -2 + c->mov128_gpr_vf(t1, vf16); // qmfc2.i t1, vf16 + c->pand(t2, t2, a0); // pand t2, t2, a0 + c->sqc2(vf13, 32, a2); // sqc2 vf13, 32(a2) + c->pand(t1, t1, a0); // pand t1, t1, a0 + c->sqc2(vf14, 80, a2); // sqc2 vf14, 80(a2) + c->or_(t0, t2, t0); // or t0, t2, t0 + // nop // sll r0, r0, 0 + c->or_(a3, t1, a3); // or a3, t1, a3 + // nop // sll r0, r0, 0 + c->sq(t0, 0, a2); // sq t0, 0(a2) + c->daddiu(a2, a2, 96); // daddiu a2, a2, 96 + bc = ((s64)c->sgpr64(v1)) > 0; // bgtz v1, L17 + c->sq(a3, -48, a2); // sq a3, -48(a2) + if (bc) {goto block_16;} // branch non-likely + + c->lwu(v1, 4, s4); // lwu v1, 4(s4) + c->addiu(a0, r0, 48); // addiu a0, r0, 48 + c->lw(a1, 228, s3); // lw a1, 228(s3) + c->mult3(a0, a0, a1); // mult3 a0, a0, a1 + c->daddu(v1, v1, a0); // daddu v1, v1, a0 + c->sw(v1, 4, s4); // sw v1, 4(s4) + c->lwu(v1, 4, s4); // lwu v1, 4(s4) + c->lq(a0, 96, s3); // lq a0, 96(s3) + c->sq(a0, 0, v1); // sq a0, 0(v1) + c->lwu(v1, 4, s4); // lwu v1, 4(s4) + c->daddiu(v1, v1, 16); // daddiu v1, v1, 16 + c->sw(v1, 4, s4); // sw v1, 4(s4) + c->lw(v1, 224, s3); // lw v1, 224(s3) + c->daddiu(v1, v1, -78); // daddiu v1, v1, -78 + c->sw(v1, 224, s3); // sw v1, 224(s3) + c->lwu(v1, 232, s3); // lwu v1, 232(s3) + c->daddiu(v1, v1, 2496); // daddiu v1, v1, 2496 + c->sw(v1, 232, s3); // sw v1, 232(s3) + c->lbu(v1, 0, s2); // lbu v1, 0(s2) + c->daddiu(v1, v1, 1); // daddiu v1, v1, 1 + c->sb(v1, 0, s2); // sb v1, 0(s2) + c->lbu(v1, 1, s2); // lbu v1, 1(s2) + c->daddiu(v1, v1, 1); // daddiu v1, v1, 1 + c->sb(v1, 1, s2); // sb v1, 1(s2) + +block_18: + c->addiu(v1, r0, 2); // addiu v1, r0, 2 + c->lw(a0, 224, s3); // lw a0, 224(s3) + c->slt(v1, v1, a0); // slt v1, v1, a0 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L16 + // nop // sll r0, r0, 0 + if (bc) {goto block_15;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + +block_20: + c->load_symbol2(t9, cache.paused); // lw t9, paused?(s7) + call_addr = c->gprs[t9].du32[0]; // function call: + c->sll(v0, ra, 0); // sll v0, ra, 0 + c->jalr(call_addr); // jalr ra, t9 + bc = c->sgpr64(s7) != c->sgpr64(v0); // bne s7, v0, L21 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_25;} // branch non-likely + + c->lwu(v1, 0, gp); // lwu v1, 0(gp) + c->andi(v1, v1, 8); // andi v1, v1, 8 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L21 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_25;} // branch non-likely + + c->lwu(v1, 0, gp); // lwu v1, 0(gp) + c->andi(v1, v1, 16); // andi v1, v1, 16 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L20 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_24;} // branch non-likely + + c->sh(r0, 8, gp); // sh r0, 8(gp) + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + +block_24: + c->addiu(v1, r0, -17); // addiu v1, r0, -17 + c->lwu(a0, 0, gp); // lwu a0, 0(gp) + c->and_(v1, v1, a0); // and v1, v1, a0 + c->sw(v1, 0, gp); // sw v1, 0(gp) + +block_25: + c->lwu(a3, 4, s4); // lwu a3, 4(s4) + bc = c->sgpr64(s5) == c->sgpr64(a3); // beq s5, a3, L22 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_27;} // branch non-likely + + c->lwu(v1, 4, s4); // lwu v1, 4(s4) + c->lui(a0, 8192); // lui a0, 8192 + c->sd(a0, 0, v1); // sd a0, 0(v1) + c->sw(r0, 8, v1); // sw r0, 8(v1) + c->sw(r0, 12, v1); // sw r0, 12(v1) + c->daddiu(v1, v1, 16); // daddiu v1, v1, 16 + c->sw(v1, 4, s4); // sw v1, 4(s4) + c->load_symbol2(t9, cache.dma_bucket_insert_tag); // lw t9, dma-bucket-insert-tag(s7) + c->load_symbol2(v1, cache.display); // lw v1, *display*(s7) + c->lw(v1, 0, v1); // lw v1, 0(v1) + c->dsll(v1, v1, 2); // dsll v1, v1, 2 + c->load_symbol2(a0, cache.display); // lw a0, *display*(s7) + c->daddu(v1, v1, a0); // daddu v1, v1, a0 + c->lwu(v1, 8, v1); // lwu v1, 8(v1) + c->lwu(a0, 40, v1); // lwu a0, 40(v1) + c->lw(a1, 76, gp); // lw a1, 76(gp) + c->mov64(a2, s5); // or a2, s5, r0 + call_addr = c->gprs[t9].du32[0]; // function call: + c->sll(v0, ra, 0); // sll v0, ra, 0 + c->jalr(call_addr); // jalr ra, t9 + c->mov64(v1, v0); // or v1, v0, r0 + +block_27: + //beq r0, r0, L24 // beq r0, r0, L24 + // nop // sll r0, r0, 0 + goto block_29; // branch always + + +block_28: + c->load_symbol2(t9, cache.format); // lw t9, format(s7) + c->load_symbol2(a0, cache.stdcon); // lw a0, *stdcon*(s7) + // daddiu a1, fp, L29 // daddiu a1, fp, L29 + ASSERT_NOT_REACHED(); // ran out of memory error print. + call_addr = c->gprs[t9].du32[0]; // function call: + c->sll(v0, ra, 0); // sll v0, ra, 0 + c->jalr(call_addr); // jalr ra, t9 + c->mov64(v1, v0); // or v1, v0, r0 + +block_29: + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->ld(fp, 8, sp); // ld fp, 8(sp) + c->lq(gp, 96, sp); // lq gp, 96(sp) + c->lq(s5, 80, sp); // lq s5, 80(sp) + c->lq(s4, 64, sp); // lq s4, 64(sp) + c->lq(s3, 48, sp); // lq s3, 48(sp) + c->lq(s2, 32, sp); // lq s2, 32(sp) + c->lq(s1, 16, sp); // lq s1, 16(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 112); // daddiu sp, sp, 112 + goto end_of_function; // return + + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + cache.display = intern_from_c(-1, 0, "*display*").c(); + cache.prim_work = intern_from_c(-1, 0, "*prim-work*").c(); + cache.stdcon = intern_from_c(-1, 0, "*stdcon*").c(); + cache.adgif_shader_texture_simple = intern_from_c(-1, 0, "adgif-shader<-texture-simple!").c(); + cache.dma_bucket_insert_tag = intern_from_c(-1, 0, "dma-bucket-insert-tag").c(); + cache.format = intern_from_c(-1, 0, "format").c(); + cache.lookup_texture_by_id = intern_from_c(-1, 0, "lookup-texture-by-id").c(); + cache.paused = intern_from_c(-1, 0, "paused?").c(); + gLinkedFunctionTable.reg("(method 9 prim-strip)", execute, 256); +} + +} // namespace method_9_prim_strip +} // namespace Mips2C +// add method_9_prim_strip::link to the link callback table for the object file. +// FWD DEC: diff --git a/game/mips2c/jak3_functions/ripple.cpp b/game/mips2c/jak3_functions/ripple.cpp new file mode 100644 index 0000000000..665a27a15b --- /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/jak3_functions/sky.cpp b/game/mips2c/jak3_functions/sky.cpp index b32f32d3bb..e807d114b2 100644 --- a/game/mips2c/jak3_functions/sky.cpp +++ b/game/mips2c/jak3_functions/sky.cpp @@ -23,32 +23,588 @@ void link() { } // namespace set_sky_vf27 } // namespace Mips2C::jak3 +//--------------------------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 set_sky_vf23_value { +namespace clip_polygon_against_positive_hyperplane { u64 execute(void* ctxt) { auto* c = (ExecutionContext*)ctxt; - // sky_regs_vfs.vfs[27] - u64 value = c->sgpr64(a0); - memcpy(&sky_regs_vfs.vfs[23].f[0], &value, 8); - return 0; + bool bc = false; + u32 call_addr = 0; + bool cop1_bc = false; + // nop // sll r0, r0, 0 + c->mov64(t1, t0); // or t1, t0, r0 + c->addiu(t0, r0, 0); // addiu t0, r0, 0 + c->lwc1(f1, 0, t2); // lwc1 f1, 0(t2) + c->daddiu(t2, t2, 48); // daddiu t2, t2, 48 + c->lwc1(f0, 12, a2); // lwc1 f0, 12(a2) + c->mov64(t3, a3); // or t3, a3, r0 + c->lqc2(vf1, 0, a2); // lqc2 vf1, 0(a2) + c->daddiu(a2, a2, 48); // daddiu a2, a2, 48 + cop1_bc = c->fprs[f0] < c->fprs[f1]; // c.lt.s f0, f1 + c->lqc2(vf2, -32, a2); // lqc2 vf2, -32(a2) + bc = !cop1_bc; // bc1f L119 + c->lqc2(vf3, -16, a2); // lqc2 vf3, -16(a2) + if (bc) {goto block_9;} // branch non-likely + + +block_1: + c->lwc1(f3, 0, t2); // lwc1 f3, 0(t2) + c->daddiu(t2, t2, 48); // daddiu t2, t2, 48 + c->lwc1(f2, 12, a2); // lwc1 f2, 12(a2) + c->daddiu(t1, t1, -1); // daddiu t1, t1, -1 + c->lqc2(vf4, 0, a2); // lqc2 vf4, 0(a2) + c->daddiu(a2, a2, 48); // daddiu a2, a2, 48 + cop1_bc = c->fprs[f2] < c->fprs[f3]; // c.lt.s f2, f3 + c->lqc2(vf5, -32, a2); // lqc2 vf5, -32(a2) + bc = !cop1_bc; // bc1f L117 + c->lqc2(vf6, -16, a2); // lqc2 vf6, -16(a2) + if (bc) {goto block_6;} // branch non-likely + + bc = c->sgpr64(t1) == 0; // beq t1, r0, L123 + // nop // sll r0, r0, 0 + if (bc) {goto block_17;} // branch non-likely + + +block_3: + c->lwc1(f1, 0, t2); // lwc1 f1, 0(t2) + c->daddiu(t2, t2, 48); // daddiu t2, t2, 48 + c->lwc1(f0, 12, a2); // lwc1 f0, 12(a2) + c->daddiu(t1, t1, -1); // daddiu t1, t1, -1 + c->lqc2(vf1, 0, a2); // lqc2 vf1, 0(a2) + c->daddiu(a2, a2, 48); // daddiu a2, a2, 48 + cop1_bc = c->fprs[f0] < c->fprs[f1]; // c.lt.s f0, f1 + c->lqc2(vf2, -32, a2); // lqc2 vf2, -32(a2) + bc = !cop1_bc; // bc1f L118 + c->lqc2(vf3, -16, a2); // lqc2 vf3, -16(a2) + if (bc) {goto block_8;} // branch non-likely + + bc = c->sgpr64(t1) != 0; // bne t1, r0, L115 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + //beq r0, r0, L123 // beq r0, r0, L123 + // nop // sll r0, r0, 0 + goto block_17; // branch always + + +block_6: + c->subs(f7, f0, f1); // sub.s f7, f0, f1 + c->vsub(DEST::xyzw, vf7, vf4, vf1); // vsub.xyzw vf7, vf4, vf1 + c->subs(f8, f2, f3); // sub.s f8, f2, f3 + c->vsub(DEST::xyzw, vf8, vf5, vf2); // vsub.xyzw vf8, vf5, vf2 + c->subs(f5, f7, f8); // sub.s f5, f7, f8 + c->vsub(DEST::xyzw, vf9, vf6, vf3); // vsub.xyzw vf9, vf6, vf3 + c->divs(f6, f7, f5); // div.s f6, f7, f5 + c->daddiu(a3, a3, 48); // daddiu a3, a3, 48 + c->mfc1(v1, f6); // mfc1 v1, f6 + c->mov128_vf_gpr(vf10, v1); // qmtc2.i vf10, v1 + c->daddiu(t0, t0, 1); // daddiu t0, t0, 1 + c->vmula_bc(DEST::xyzw, BC::w, vf1, vf0); // vmulaw.xyzw acc, vf1, vf0 + c->daddiu(t6, s7, 4); // daddiu t6, s7, 4 + c->vmadd_bc(DEST::xyzw, BC::x, vf7, vf7, vf10); // vmaddx.xyzw vf7, vf7, vf10 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf2, vf0); // vmulaw.xyzw acc, vf2, vf0 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::x, vf8, vf8, vf10); // vmaddx.xyzw vf8, vf8, vf10 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf3, vf0); // vmulaw.xyzw acc, vf3, vf0 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::x, vf9, vf9, vf10); // vmaddx.xyzw vf9, vf9, vf10 + // nop // sll r0, r0, 0 + c->sqc2(vf7, -48, a3); // sqc2 vf7, -48(a3) + // nop // sll r0, r0, 0 + c->sqc2(vf8, -32, a3); // sqc2 vf8, -32(a3) + // nop // sll r0, r0, 0 + bc = c->sgpr64(t1) != 0; // bne t1, r0, L120 + c->sqc2(vf9, -16, a3); // sqc2 vf9, -16(a3) + if (bc) {goto block_11;} // branch non-likely + + //beq r0, r0, L123 // beq r0, r0, L123 + // nop // sll r0, r0, 0 + goto block_17; // branch always + + +block_8: + c->subs(f7, f0, f1); // sub.s f7, f0, f1 + c->vsub(DEST::xyzw, vf7, vf1, vf4); // vsub.xyzw vf7, vf1, vf4 + c->subs(f8, f2, f3); // sub.s f8, f2, f3 + c->vsub(DEST::xyzw, vf8, vf2, vf5); // vsub.xyzw vf8, vf2, vf5 + c->subs(f5, f8, f7); // sub.s f5, f8, f7 + c->vsub(DEST::xyzw, vf9, vf3, vf6); // vsub.xyzw vf9, vf3, vf6 + c->divs(f6, f8, f5); // div.s f6, f8, f5 + c->daddiu(a3, a3, 48); // daddiu a3, a3, 48 + c->mfc1(v1, f6); // mfc1 v1, f6 + c->mov128_vf_gpr(vf10, v1); // qmtc2.i vf10, v1 + c->daddiu(t0, t0, 1); // daddiu t0, t0, 1 + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + c->daddiu(t6, s7, 4); // daddiu t6, s7, 4 + c->vmadd_bc(DEST::xyzw, BC::x, vf7, vf7, vf10); // vmaddx.xyzw vf7, vf7, vf10 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf5, vf0); // vmulaw.xyzw acc, vf5, vf0 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::x, vf8, vf8, vf10); // vmaddx.xyzw vf8, vf8, vf10 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf6, vf0); // vmulaw.xyzw acc, vf6, vf0 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::x, vf9, vf9, vf10); // vmaddx.xyzw vf9, vf9, vf10 + // nop // sll r0, r0, 0 + c->sqc2(vf7, -48, a3); // sqc2 vf7, -48(a3) + // nop // sll r0, r0, 0 + c->sqc2(vf8, -32, a3); // sqc2 vf8, -32(a3) + // nop // sll r0, r0, 0 + bc = c->sgpr64(t1) == 0; // beq t1, r0, L123 + c->sqc2(vf9, -16, a3); // sqc2 vf9, -16(a3) + if (bc) {goto block_17;} // branch non-likely + + +block_9: + c->lwc1(f3, 0, t2); // lwc1 f3, 0(t2) + c->daddiu(t2, t2, 48); // daddiu t2, t2, 48 + c->lwc1(f2, 12, a2); // lwc1 f2, 12(a2) + c->daddiu(t1, t1, -1); // daddiu t1, t1, -1 + c->lqc2(vf4, 0, a2); // lqc2 vf4, 0(a2) + c->daddiu(a2, a2, 48); // daddiu a2, a2, 48 + cop1_bc = c->fprs[f2] < c->fprs[f3]; // c.lt.s f2, f3 + c->lqc2(vf5, -32, a2); // lqc2 vf5, -32(a2) + bc = cop1_bc; // bc1t L121 + c->lqc2(vf6, -16, a2); // lqc2 vf6, -16(a2) + if (bc) {goto block_14;} // branch non-likely + + c->sqc2(vf1, 0, a3); // sqc2 vf1, 0(a3) + c->daddiu(a3, a3, 48); // daddiu a3, a3, 48 + c->sqc2(vf2, -32, a3); // sqc2 vf2, -32(a3) + c->daddiu(t0, t0, 1); // daddiu t0, t0, 1 + bc = c->sgpr64(t1) == 0; // beq t1, r0, L123 + c->sqc2(vf3, -16, a3); // sqc2 vf3, -16(a3) + if (bc) {goto block_17;} // branch non-likely + + +block_11: + c->lwc1(f1, 0, t2); // lwc1 f1, 0(t2) + c->daddiu(t2, t2, 48); // daddiu t2, t2, 48 + c->lwc1(f0, 12, a2); // lwc1 f0, 12(a2) + c->daddiu(t1, t1, -1); // daddiu t1, t1, -1 + c->lqc2(vf1, 0, a2); // lqc2 vf1, 0(a2) + c->daddiu(a2, a2, 48); // daddiu a2, a2, 48 + cop1_bc = c->fprs[f0] < c->fprs[f1]; // c.lt.s f0, f1 + c->lqc2(vf2, -32, a2); // lqc2 vf2, -32(a2) + bc = cop1_bc; // bc1t L122 + c->lqc2(vf3, -16, a2); // lqc2 vf3, -16(a2) + if (bc) {goto block_16;} // branch non-likely + + c->sqc2(vf4, 0, a3); // sqc2 vf4, 0(a3) + c->daddiu(a3, a3, 48); // daddiu a3, a3, 48 + c->sqc2(vf5, -32, a3); // sqc2 vf5, -32(a3) + c->daddiu(t0, t0, 1); // daddiu t0, t0, 1 + bc = c->sgpr64(t1) != 0; // bne t1, r0, L119 + c->sqc2(vf6, -16, a3); // sqc2 vf6, -16(a3) + if (bc) {goto block_9;} // branch non-likely + + //beq r0, r0, L123 // beq r0, r0, L123 + // nop // sll r0, r0, 0 + goto block_17; // branch always + + +block_14: + c->subs(f7, f0, f1); // sub.s f7, f0, f1 + c->vsub(DEST::xyzw, vf7, vf1, vf4); // vsub.xyzw vf7, vf1, vf4 + c->subs(f8, f2, f3); // sub.s f8, f2, f3 + c->vsub(DEST::xyzw, vf8, vf2, vf5); // vsub.xyzw vf8, vf2, vf5 + c->subs(f5, f8, f7); // sub.s f5, f8, f7 + c->vsub(DEST::xyzw, vf9, vf3, vf6); // vsub.xyzw vf9, vf3, vf6 + c->divs(f6, f8, f5); // div.s f6, f8, f5 + c->daddiu(a3, a3, 96); // daddiu a3, a3, 96 + c->mfc1(v1, f6); // mfc1 v1, f6 + c->mov128_vf_gpr(vf10, v1); // qmtc2.i vf10, v1 + c->sqc2(vf1, -96, a3); // sqc2 vf1, -96(a3) + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + c->sqc2(vf2, -80, a3); // sqc2 vf2, -80(a3) + c->vmadd_bc(DEST::xyzw, BC::x, vf7, vf7, vf10); // vmaddx.xyzw vf7, vf7, vf10 + c->sqc2(vf3, -64, a3); // sqc2 vf3, -64(a3) + c->vmula_bc(DEST::xyzw, BC::w, vf5, vf0); // vmulaw.xyzw acc, vf5, vf0 + c->daddiu(t0, t0, 2); // daddiu t0, t0, 2 + c->vmadd_bc(DEST::xyzw, BC::x, vf8, vf8, vf10); // vmaddx.xyzw vf8, vf8, vf10 + c->daddiu(t6, s7, 4); // daddiu t6, s7, 4 + c->vmula_bc(DEST::xyzw, BC::w, vf6, vf0); // vmulaw.xyzw acc, vf6, vf0 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::x, vf9, vf9, vf10); // vmaddx.xyzw vf9, vf9, vf10 + // nop // sll r0, r0, 0 + c->sqc2(vf7, -48, a3); // sqc2 vf7, -48(a3) + // nop // sll r0, r0, 0 + c->sqc2(vf8, -32, a3); // sqc2 vf8, -32(a3) + // nop // sll r0, r0, 0 + bc = c->sgpr64(t1) != 0; // bne t1, r0, L116 + c->sqc2(vf9, -16, a3); // sqc2 vf9, -16(a3) + if (bc) {goto block_3;} // branch non-likely + + //beq r0, r0, L123 // beq r0, r0, L123 + // nop // sll r0, r0, 0 + goto block_17; // branch always + + +block_16: + c->subs(f7, f0, f1); // sub.s f7, f0, f1 + c->vsub(DEST::xyzw, vf7, vf4, vf1); // vsub.xyzw vf7, vf4, vf1 + c->subs(f8, f2, f3); // sub.s f8, f2, f3 + c->vsub(DEST::xyzw, vf8, vf5, vf2); // vsub.xyzw vf8, vf5, vf2 + c->subs(f5, f7, f8); // sub.s f5, f7, f8 + c->vsub(DEST::xyzw, vf9, vf6, vf3); // vsub.xyzw vf9, vf6, vf3 + c->divs(f6, f7, f5); // div.s f6, f7, f5 + c->daddiu(a3, a3, 96); // daddiu a3, a3, 96 + c->mfc1(v1, f6); // mfc1 v1, f6 + c->mov128_vf_gpr(vf10, v1); // qmtc2.i vf10, v1 + c->sqc2(vf4, -96, a3); // sqc2 vf4, -96(a3) + c->vmula_bc(DEST::xyzw, BC::w, vf1, vf0); // vmulaw.xyzw acc, vf1, vf0 + c->sqc2(vf5, -80, a3); // sqc2 vf5, -80(a3) + c->vmadd_bc(DEST::xyzw, BC::x, vf7, vf7, vf10); // vmaddx.xyzw vf7, vf7, vf10 + c->sqc2(vf6, -64, a3); // sqc2 vf6, -64(a3) + c->vmula_bc(DEST::xyzw, BC::w, vf2, vf0); // vmulaw.xyzw acc, vf2, vf0 + c->daddiu(t0, t0, 2); // daddiu t0, t0, 2 + c->vmadd_bc(DEST::xyzw, BC::x, vf8, vf8, vf10); // vmaddx.xyzw vf8, vf8, vf10 + c->daddiu(t6, s7, 4); // daddiu t6, s7, 4 + c->vmula_bc(DEST::xyzw, BC::w, vf3, vf0); // vmulaw.xyzw acc, vf3, vf0 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::x, vf9, vf9, vf10); // vmaddx.xyzw vf9, vf9, vf10 + // nop // sll r0, r0, 0 + c->sqc2(vf7, -48, a3); // sqc2 vf7, -48(a3) + // nop // sll r0, r0, 0 + c->sqc2(vf8, -32, a3); // sqc2 vf8, -32(a3) + // nop // sll r0, r0, 0 + bc = c->sgpr64(t1) != 0; // bne t1, r0, L115 + c->sqc2(vf9, -16, a3); // sqc2 vf9, -16(a3) + if (bc) {goto block_1;} // branch non-likely + + +block_17: + c->lqc2(vf1, 0, t3); // lqc2 vf1, 0(t3) + // nop // sll r0, r0, 0 + c->lqc2(vf2, 16, t3); // lqc2 vf2, 16(t3) + // nop // sll r0, r0, 0 + c->lqc2(vf3, 32, t3); // lqc2 vf3, 32(t3) + // nop // sll r0, r0, 0 + c->sqc2(vf1, 0, a3); // sqc2 vf1, 0(a3) + // nop // sll r0, r0, 0 + c->sqc2(vf2, 16, a3); // sqc2 vf2, 16(a3) + // nop // sll r0, r0, 0 + //jr ra // jr ra + c->sqc2(vf3, 32, a3); // sqc2 vf3, 32(a3) + 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() { - gLinkedFunctionTable.reg("set-sky-vf23-value", execute, 64); + gLinkedFunctionTable.reg("clip-polygon-against-positive-hyperplane", execute, 128); } -} // namespace set_sky_vf23_value -} // namespace Mips2C::jak3 +} // namespace clip_polygon_against_positive_hyperplane +} // 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 clip_polygon_against_positive_hyperplane { -u64 execute(void*) { - ASSERT_NOT_REACHED(); -} -} // namespace clip_polygon_against_positive_hyperplane namespace clip_polygon_against_negative_hyperplane { -u64 execute(void*) { - ASSERT_NOT_REACHED(); +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + bool cop1_bc = false; + // nop // sll r0, r0, 0 + c->mov64(t1, t0); // or t1, t0, r0 + c->addiu(t0, r0, 0); // addiu t0, r0, 0 + c->lwc1(f0, 12, a2); // lwc1 f0, 12(a2) + c->mov64(t3, a3); // or t3, a3, r0 + c->lwc1(f1, 0, t2); // lwc1 f1, 0(t2) + c->daddiu(t2, t2, 48); // daddiu t2, t2, 48 + c->lqc2(vf1, 0, a2); // lqc2 vf1, 0(a2) + c->negs(f0, f0); // neg.s f0, f0 + // nop // sll r0, r0, 0 + c->lqc2(vf2, 16, a2); // lqc2 vf2, 16(a2) + cop1_bc = c->fprs[f1] < c->fprs[f0]; // c.lt.s f1, f0 + c->daddiu(a2, a2, 48); // daddiu a2, a2, 48 + bc = !cop1_bc; // bc1f L109 + c->lqc2(vf3, -16, a2); // lqc2 vf3, -16(a2) + if (bc) {goto block_9;} // branch non-likely + + +block_1: + c->lwc1(f2, 12, a2); // lwc1 f2, 12(a2) + c->daddiu(t1, t1, -1); // daddiu t1, t1, -1 + c->lwc1(f3, 0, t2); // lwc1 f3, 0(t2) + c->daddiu(t2, t2, 48); // daddiu t2, t2, 48 + c->lqc2(vf4, 0, a2); // lqc2 vf4, 0(a2) + c->negs(f2, f2); // neg.s f2, f2 + // nop // sll r0, r0, 0 + c->lqc2(vf5, 16, a2); // lqc2 vf5, 16(a2) + cop1_bc = c->fprs[f3] < c->fprs[f2]; // c.lt.s f3, f2 + c->daddiu(a2, a2, 48); // daddiu a2, a2, 48 + bc = !cop1_bc; // bc1f L107 + c->lqc2(vf6, -16, a2); // lqc2 vf6, -16(a2) + if (bc) {goto block_6;} // branch non-likely + + bc = c->sgpr64(t1) == 0; // beq t1, r0, L113 + // nop // sll r0, r0, 0 + if (bc) {goto block_17;} // branch non-likely + + +block_3: + c->lwc1(f0, 12, a2); // lwc1 f0, 12(a2) + c->daddiu(t1, t1, -1); // daddiu t1, t1, -1 + c->lwc1(f1, 0, t2); // lwc1 f1, 0(t2) + c->daddiu(t2, t2, 48); // daddiu t2, t2, 48 + c->lqc2(vf1, 0, a2); // lqc2 vf1, 0(a2) + c->negs(f0, f0); // neg.s f0, f0 + // nop // sll r0, r0, 0 + c->lqc2(vf2, 16, a2); // lqc2 vf2, 16(a2) + cop1_bc = c->fprs[f1] < c->fprs[f0]; // c.lt.s f1, f0 + c->daddiu(a2, a2, 48); // daddiu a2, a2, 48 + bc = !cop1_bc; // bc1f L108 + c->lqc2(vf3, -16, a2); // lqc2 vf3, -16(a2) + if (bc) {goto block_8;} // branch non-likely + + bc = c->sgpr64(t1) != 0; // bne t1, r0, L105 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + //beq r0, r0, L113 // beq r0, r0, L113 + // nop // sll r0, r0, 0 + goto block_17; // branch always + + +block_6: + c->subs(f7, f0, f1); // sub.s f7, f0, f1 + c->vsub(DEST::xyzw, vf7, vf4, vf1); // vsub.xyzw vf7, vf4, vf1 + c->subs(f8, f2, f3); // sub.s f8, f2, f3 + c->vsub(DEST::xyzw, vf8, vf5, vf2); // vsub.xyzw vf8, vf5, vf2 + c->subs(f5, f7, f8); // sub.s f5, f7, f8 + c->vsub(DEST::xyzw, vf9, vf6, vf3); // vsub.xyzw vf9, vf6, vf3 + c->divs(f6, f7, f5); // div.s f6, f7, f5 + c->daddiu(a3, a3, 48); // daddiu a3, a3, 48 + c->mfc1(v1, f6); // mfc1 v1, f6 + c->mov128_vf_gpr(vf10, v1); // qmtc2.i vf10, v1 + c->daddiu(t0, t0, 1); // daddiu t0, t0, 1 + c->vmula_bc(DEST::xyzw, BC::w, vf1, vf0); // vmulaw.xyzw acc, vf1, vf0 + c->daddiu(t6, s7, 4); // daddiu t6, s7, 4 + c->vmadd_bc(DEST::xyzw, BC::x, vf7, vf7, vf10); // vmaddx.xyzw vf7, vf7, vf10 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf2, vf0); // vmulaw.xyzw acc, vf2, vf0 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::x, vf8, vf8, vf10); // vmaddx.xyzw vf8, vf8, vf10 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf3, vf0); // vmulaw.xyzw acc, vf3, vf0 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::x, vf9, vf9, vf10); // vmaddx.xyzw vf9, vf9, vf10 + // nop // sll r0, r0, 0 + c->sqc2(vf7, -48, a3); // sqc2 vf7, -48(a3) + // nop // sll r0, r0, 0 + c->sqc2(vf8, -32, a3); // sqc2 vf8, -32(a3) + // nop // sll r0, r0, 0 + bc = c->sgpr64(t1) != 0; // bne t1, r0, L110 + c->sqc2(vf9, -16, a3); // sqc2 vf9, -16(a3) + if (bc) {goto block_11;} // branch non-likely + + //beq r0, r0, L113 // beq r0, r0, L113 + // nop // sll r0, r0, 0 + goto block_17; // branch always + + +block_8: + c->subs(f7, f0, f1); // sub.s f7, f0, f1 + c->vsub(DEST::xyzw, vf7, vf1, vf4); // vsub.xyzw vf7, vf1, vf4 + c->subs(f8, f2, f3); // sub.s f8, f2, f3 + c->vsub(DEST::xyzw, vf8, vf2, vf5); // vsub.xyzw vf8, vf2, vf5 + c->subs(f5, f8, f7); // sub.s f5, f8, f7 + c->vsub(DEST::xyzw, vf9, vf3, vf6); // vsub.xyzw vf9, vf3, vf6 + c->divs(f6, f8, f5); // div.s f6, f8, f5 + c->daddiu(a3, a3, 48); // daddiu a3, a3, 48 + c->mfc1(v1, f6); // mfc1 v1, f6 + c->mov128_vf_gpr(vf10, v1); // qmtc2.i vf10, v1 + c->daddiu(t0, t0, 1); // daddiu t0, t0, 1 + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + c->daddiu(t6, s7, 4); // daddiu t6, s7, 4 + c->vmadd_bc(DEST::xyzw, BC::x, vf7, vf7, vf10); // vmaddx.xyzw vf7, vf7, vf10 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf5, vf0); // vmulaw.xyzw acc, vf5, vf0 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::x, vf8, vf8, vf10); // vmaddx.xyzw vf8, vf8, vf10 + // nop // sll r0, r0, 0 + c->vmula_bc(DEST::xyzw, BC::w, vf6, vf0); // vmulaw.xyzw acc, vf6, vf0 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::x, vf9, vf9, vf10); // vmaddx.xyzw vf9, vf9, vf10 + // nop // sll r0, r0, 0 + c->sqc2(vf7, -48, a3); // sqc2 vf7, -48(a3) + // nop // sll r0, r0, 0 + c->sqc2(vf8, -32, a3); // sqc2 vf8, -32(a3) + // nop // sll r0, r0, 0 + bc = c->sgpr64(t1) == 0; // beq t1, r0, L113 + c->sqc2(vf9, -16, a3); // sqc2 vf9, -16(a3) + if (bc) {goto block_17;} // branch non-likely + + +block_9: + c->lwc1(f2, 12, a2); // lwc1 f2, 12(a2) + c->daddiu(t1, t1, -1); // daddiu t1, t1, -1 + c->lwc1(f3, 0, t2); // lwc1 f3, 0(t2) + c->daddiu(t2, t2, 48); // daddiu t2, t2, 48 + c->lqc2(vf4, 0, a2); // lqc2 vf4, 0(a2) + c->negs(f2, f2); // neg.s f2, f2 + // nop // sll r0, r0, 0 + c->lqc2(vf5, 16, a2); // lqc2 vf5, 16(a2) + cop1_bc = c->fprs[f3] < c->fprs[f2]; // c.lt.s f3, f2 + c->daddiu(a2, a2, 48); // daddiu a2, a2, 48 + bc = cop1_bc; // bc1t L111 + c->lqc2(vf6, -16, a2); // lqc2 vf6, -16(a2) + if (bc) {goto block_14;} // branch non-likely + + c->sqc2(vf1, 0, a3); // sqc2 vf1, 0(a3) + c->daddiu(a3, a3, 48); // daddiu a3, a3, 48 + c->sqc2(vf2, -32, a3); // sqc2 vf2, -32(a3) + c->daddiu(t0, t0, 1); // daddiu t0, t0, 1 + bc = c->sgpr64(t1) == 0; // beq t1, r0, L113 + c->sqc2(vf3, -16, a3); // sqc2 vf3, -16(a3) + if (bc) {goto block_17;} // branch non-likely + + +block_11: + c->lwc1(f0, 12, a2); // lwc1 f0, 12(a2) + c->daddiu(t1, t1, -1); // daddiu t1, t1, -1 + c->lwc1(f1, 0, t2); // lwc1 f1, 0(t2) + c->daddiu(t2, t2, 48); // daddiu t2, t2, 48 + c->lqc2(vf1, 0, a2); // lqc2 vf1, 0(a2) + c->negs(f0, f0); // neg.s f0, f0 + // nop // sll r0, r0, 0 + c->lqc2(vf2, 16, a2); // lqc2 vf2, 16(a2) + cop1_bc = c->fprs[f1] < c->fprs[f0]; // c.lt.s f1, f0 + c->daddiu(a2, a2, 48); // daddiu a2, a2, 48 + bc = cop1_bc; // bc1t L112 + c->lqc2(vf3, -16, a2); // lqc2 vf3, -16(a2) + if (bc) {goto block_16;} // branch non-likely + + c->sqc2(vf4, 0, a3); // sqc2 vf4, 0(a3) + c->daddiu(a3, a3, 48); // daddiu a3, a3, 48 + c->sqc2(vf5, -32, a3); // sqc2 vf5, -32(a3) + c->daddiu(t0, t0, 1); // daddiu t0, t0, 1 + bc = c->sgpr64(t1) != 0; // bne t1, r0, L109 + c->sqc2(vf6, -16, a3); // sqc2 vf6, -16(a3) + if (bc) {goto block_9;} // branch non-likely + + //beq r0, r0, L113 // beq r0, r0, L113 + // nop // sll r0, r0, 0 + goto block_17; // branch always + + +block_14: + c->subs(f7, f0, f1); // sub.s f7, f0, f1 + c->vsub(DEST::xyzw, vf7, vf1, vf4); // vsub.xyzw vf7, vf1, vf4 + c->subs(f8, f2, f3); // sub.s f8, f2, f3 + c->vsub(DEST::xyzw, vf8, vf2, vf5); // vsub.xyzw vf8, vf2, vf5 + c->subs(f5, f8, f7); // sub.s f5, f8, f7 + c->vsub(DEST::xyzw, vf9, vf3, vf6); // vsub.xyzw vf9, vf3, vf6 + c->divs(f6, f8, f5); // div.s f6, f8, f5 + c->daddiu(a3, a3, 96); // daddiu a3, a3, 96 + c->mfc1(v1, f6); // mfc1 v1, f6 + c->mov128_vf_gpr(vf10, v1); // qmtc2.i vf10, v1 + c->sqc2(vf1, -96, a3); // sqc2 vf1, -96(a3) + c->vmula_bc(DEST::xyzw, BC::w, vf4, vf0); // vmulaw.xyzw acc, vf4, vf0 + c->sqc2(vf2, -80, a3); // sqc2 vf2, -80(a3) + c->vmadd_bc(DEST::xyzw, BC::x, vf7, vf7, vf10); // vmaddx.xyzw vf7, vf7, vf10 + c->sqc2(vf3, -64, a3); // sqc2 vf3, -64(a3) + c->vmula_bc(DEST::xyzw, BC::w, vf5, vf0); // vmulaw.xyzw acc, vf5, vf0 + c->daddiu(t0, t0, 2); // daddiu t0, t0, 2 + c->vmadd_bc(DEST::xyzw, BC::x, vf8, vf8, vf10); // vmaddx.xyzw vf8, vf8, vf10 + c->daddiu(t6, s7, 4); // daddiu t6, s7, 4 + c->vmula_bc(DEST::xyzw, BC::w, vf6, vf0); // vmulaw.xyzw acc, vf6, vf0 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::x, vf9, vf9, vf10); // vmaddx.xyzw vf9, vf9, vf10 + // nop // sll r0, r0, 0 + c->sqc2(vf7, -48, a3); // sqc2 vf7, -48(a3) + // nop // sll r0, r0, 0 + c->sqc2(vf8, -32, a3); // sqc2 vf8, -32(a3) + // nop // sll r0, r0, 0 + bc = c->sgpr64(t1) != 0; // bne t1, r0, L106 + c->sqc2(vf9, -16, a3); // sqc2 vf9, -16(a3) + if (bc) {goto block_3;} // branch non-likely + + //beq r0, r0, L113 // beq r0, r0, L113 + // nop // sll r0, r0, 0 + goto block_17; // branch always + + +block_16: + c->subs(f7, f0, f1); // sub.s f7, f0, f1 + c->vsub(DEST::xyzw, vf7, vf4, vf1); // vsub.xyzw vf7, vf4, vf1 + c->subs(f8, f2, f3); // sub.s f8, f2, f3 + c->vsub(DEST::xyzw, vf8, vf5, vf2); // vsub.xyzw vf8, vf5, vf2 + c->subs(f5, f7, f8); // sub.s f5, f7, f8 + c->vsub(DEST::xyzw, vf9, vf6, vf3); // vsub.xyzw vf9, vf6, vf3 + c->divs(f6, f7, f5); // div.s f6, f7, f5 + c->daddiu(a3, a3, 96); // daddiu a3, a3, 96 + c->mfc1(v1, f6); // mfc1 v1, f6 + c->mov128_vf_gpr(vf10, v1); // qmtc2.i vf10, v1 + c->sqc2(vf4, -96, a3); // sqc2 vf4, -96(a3) + c->vmula_bc(DEST::xyzw, BC::w, vf1, vf0); // vmulaw.xyzw acc, vf1, vf0 + c->sqc2(vf5, -80, a3); // sqc2 vf5, -80(a3) + c->vmadd_bc(DEST::xyzw, BC::x, vf7, vf7, vf10); // vmaddx.xyzw vf7, vf7, vf10 + c->sqc2(vf6, -64, a3); // sqc2 vf6, -64(a3) + c->vmula_bc(DEST::xyzw, BC::w, vf2, vf0); // vmulaw.xyzw acc, vf2, vf0 + c->daddiu(t0, t0, 2); // daddiu t0, t0, 2 + c->vmadd_bc(DEST::xyzw, BC::x, vf8, vf8, vf10); // vmaddx.xyzw vf8, vf8, vf10 + c->daddiu(t6, s7, 4); // daddiu t6, s7, 4 + c->vmula_bc(DEST::xyzw, BC::w, vf3, vf0); // vmulaw.xyzw acc, vf3, vf0 + // nop // sll r0, r0, 0 + c->vmadd_bc(DEST::xyzw, BC::x, vf9, vf9, vf10); // vmaddx.xyzw vf9, vf9, vf10 + // nop // sll r0, r0, 0 + c->sqc2(vf7, -48, a3); // sqc2 vf7, -48(a3) + // nop // sll r0, r0, 0 + c->sqc2(vf8, -32, a3); // sqc2 vf8, -32(a3) + // nop // sll r0, r0, 0 + bc = c->sgpr64(t1) != 0; // bne t1, r0, L105 + c->sqc2(vf9, -16, a3); // sqc2 vf9, -16(a3) + if (bc) {goto block_1;} // branch non-likely + + +block_17: + c->lqc2(vf1, 0, t3); // lqc2 vf1, 0(t3) + // nop // sll r0, r0, 0 + c->lqc2(vf2, 16, t3); // lqc2 vf2, 16(t3) + // nop // sll r0, r0, 0 + c->lqc2(vf3, 32, t3); // lqc2 vf3, 32(t3) + // nop // sll r0, r0, 0 + c->sqc2(vf1, 0, a3); // sqc2 vf1, 0(a3) + // nop // sll r0, r0, 0 + c->sqc2(vf2, 16, a3); // sqc2 vf2, 16(a3) + // nop // sll r0, r0, 0 + //jr ra // jr ra + c->sqc2(vf3, 32, a3); // sqc2 vf3, 32(a3) + 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() { + gLinkedFunctionTable.reg("clip-polygon-against-negative-hyperplane", execute, 128); } -} // namespace clip_polygon_against_negative_hyperplane -} // namespace Mips2C::jak3 \ No newline at end of file + +} // namespace clip_polygon_against_negative_hyperplane +} // namespace Mips2C \ No newline at end of file diff --git a/game/mips2c/jak3_functions/sparticle.cpp b/game/mips2c/jak3_functions/sparticle.cpp new file mode 100644 index 0000000000..33bbd8857b --- /dev/null +++ b/game/mips2c/jak3_functions/sparticle.cpp @@ -0,0 +1,712 @@ +//--------------------------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 sp_process_block_2d { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* + void* add_to_sprite_aux_list; // add-to-sprite-aux-list + void* sp_free_particle; // sp-free-particle + void* sp_orbiter; // sp-orbiter + void* sp_relaunch_particle_2d; // sp-relaunch-particle-2d +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->daddiu(sp, sp, -128); // daddiu sp, sp, -128 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s0, 16, sp); // sq s0, 16(sp) + c->sq(s1, 32, sp); // sq s1, 32(sp) + c->sq(s2, 48, sp); // sq s2, 48(sp) + c->sq(s3, 64, sp); // sq s3, 64(sp) + c->sq(s4, 80, sp); // sq s4, 80(sp) + c->sq(s5, 96, sp); // sq s5, 96(sp) + c->sq(gp, 112, sp); // sq gp, 112(sp) + c->mov64(gp, a0); // or gp, a0, r0 + c->mov64(s5, a1); // or s5, a1, r0 + c->mov64(s4, a2); // or s4, a2, r0 + c->mov64(s1, a3); // or s1, a3, r0 + c->mov64(s3, t0); // or s3, t0, r0 + c->mov64(s2, t1); // or s2, t1, r0 + +block_1: + c->lb(v1, 128, s5); // lb v1, 128(s5) + bc = c->sgpr64(v1) == 0; // beq v1, r0, L97 + // nop // sll r0, r0, 0 + if (bc) {goto block_32;} // branch non-likely + + c->lb(a0, 129, s5); // lb a0, 129(s5) + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->dsll(a0, a0, 4); // dsll a0, a0, 4 + c->daddu(v1, v1, a0); // daddu v1, v1, a0 + c->lqc2(vf9, 0, v1); // lqc2 vf9, 0(v1) + c->mov128_gpr_vf(v1, vf9); // qmfc2.i v1, vf9 + c->andi(s0, v1, 255); // andi s0, v1, 255 + bc = c->sgpr64(s0) != 0; // bne s0, r0, L87 + // nop // sll r0, r0, 0 + if (bc) {goto block_9;} // branch non-likely + + c->lw(v1, 104, s5); // lw v1, 104(s5) + // nop // sll r0, r0, 0 + c->andi(v1, v1, 32896); // andi v1, v1, 32896 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L85 + // nop // sll r0, r0, 0 + if (bc) {goto block_5;} // branch non-likely + + c->load_symbol2(t9, cache.add_to_sprite_aux_list);// lw t9, add-to-sprite-aux-list(s7) + c->mov64(a0, gp); // or a0, gp, r0 + c->mov64(a1, s5); // or a1, s5, r0 + c->mov64(a2, s4); // or a2, s4, r0 + c->mov64(a3, s1); // or a3, 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 + +block_5: + c->lw(v1, 100, s5); // lw v1, 100(s5) + c->addiu(a0, r0, -1); // addiu a0, r0, -1 + bc = c->sgpr64(v1) == c->sgpr64(a0); // beq v1, a0, L86 + // nop // sll r0, r0, 0 + if (bc) {goto block_7;} // branch non-likely + + bc = c->sgpr64(v1) == 0; // beq v1, r0, L96 + // nop // sll r0, r0, 0 + if (bc) {goto block_31;} // branch non-likely + + +block_7: + c->lw(a0, 104, s5); // lw a0, 104(s5) + c->andi(v1, a0, 32); // andi v1, a0, 32 + c->xor_(a0, a0, v1); // xor a0, a0, v1 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L97 + c->sw(a0, 104, s5); // sw a0, 104(s5) + if (bc) {goto block_32;} // branch non-likely + + c->lw(v1, 124, s5); // lw v1, 124(s5) + //beq r0, r0, L97 // beq r0, r0, L97 + c->sw(v1, 44, s4); // sw v1, 44(s4) + goto block_32; // branch always + + +block_9: + c->lw(v1, 100, s5); // lw v1, 100(s5) + c->addiu(a0, r0, -1); // addiu a0, r0, -1 + bc = c->sgpr64(v1) == c->sgpr64(a0); // beq v1, a0, L88 + c->dsubu(a0, v1, s0); // dsubu a0, v1, s0 + if (bc) {goto block_12;} // branch non-likely + + bc = c->sgpr64(v1) == 0; // beq v1, r0, L96 + c->pmaxw(v1, a0, r0); // pmaxw v1, a0, r0 + if (bc) {goto block_31;} // branch non-likely + + c->sw(v1, 100, s5); // sw v1, 100(s5) + +block_12: + c->lw(v1, 104, s5); // lw v1, 104(s5) + c->andi(a0, v1, 32); // andi a0, v1, 32 + c->xor_(v1, v1, a0); // xor v1, v1, a0 + bc = c->sgpr64(a0) == 0; // beq a0, r0, L89 + c->sw(v1, 104, s5); // sw v1, 104(s5) + if (bc) {goto block_14;} // branch non-likely + + c->lw(a0, 124, s5); // lw a0, 124(s5) + c->sw(a0, 44, s4); // sw a0, 44(s4) + +block_14: + c->lw(t9, 112, s5); // lw t9, 112(s5) + c->andi(v1, v1, 32896); // andi v1, v1, 32896 + c->load_symbol2(a0, cache.add_to_sprite_aux_list);// lw a0, add-to-sprite-aux-list(s7) + c->movn(t9, a0, v1); // movn t9, a0, v1 + bc = c->sgpr64(t9) == 0; // beq t9, r0, L90 + // nop // sll r0, r0, 0 + if (bc) {goto block_16;} // branch non-likely + + c->daddiu(sp, sp, -80); // daddiu sp, sp, -80 + c->sq(gp, 0, sp); // sq gp, 0(sp) + c->sq(s5, 16, sp); // sq s5, 16(sp) + c->sq(s4, 32, sp); // sq s4, 32(sp) + c->sq(s1, 48, sp); // sq s1, 48(sp) + c->mov64(a0, gp); // or a0, gp, r0 + c->mov64(a1, s5); // or a1, s5, r0 + c->mov64(a2, s4); // or a2, s4, r0 + c->mov64(a3, s1); // or a3, s1, r0 + call_addr = c->gprs[t9].du32[0]; // function call: + c->sq(s3, 64, sp); // sq s3, 64(sp) + c->jalr(call_addr); // jalr ra, t9 + c->lq(gp, 0, sp); // lq gp, 0(sp) + c->lq(s5, 16, sp); // lq s5, 16(sp) + c->lq(s4, 32, sp); // lq s4, 32(sp) + c->lq(s1, 48, sp); // lq s1, 48(sp) + c->lq(s3, 64, sp); // lq s3, 64(sp) + c->daddiu(sp, sp, 80); // daddiu sp, sp, 80 + +block_16: + c->lw(a1, 120, s5); // lw a1, 120(s5) + c->lw(v1, 116, s5); // lw v1, 116(s5) + bc = c->sgpr64(a1) == 0; // beq a1, r0, L91 + c->dsubu(a0, v1, s0); // dsubu a0, v1, s0 + if (bc) {goto block_19;} // branch non-likely + + c->daddiu(v1, a0, -1); // daddiu v1, a0, -1 + bc = ((s64)c->sgpr64(v1)) >= 0; // bgez v1, L91 + c->sw(a0, 116, s5); // sw a0, 116(s5) + if (bc) {goto block_19;} // branch non-likely + + c->daddiu(sp, sp, -96); // daddiu sp, sp, -96 + c->sq(gp, 0, sp); // sq gp, 0(sp) + c->sq(s5, 16, sp); // sq s5, 16(sp) + c->sq(s4, 32, sp); // sq s4, 32(sp) + c->sq(s1, 48, sp); // sq s1, 48(sp) + c->sq(s3, 64, sp); // sq s3, 64(sp) + c->sq(s2, 80, sp); // sq s2, 80(sp) + c->mov64(a0, gp); // or a0, gp, r0 + c->mov64(a3, s4); // or a3, s4, r0 + c->mov64(a2, s5); // or a2, s5, r0 + c->load_symbol2(t9, cache.sp_relaunch_particle_2d);// lw t9, sp-relaunch-particle-2d(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->lq(gp, 0, sp); // lq gp, 0(sp) + c->lq(s5, 16, sp); // lq s5, 16(sp) + c->lq(s4, 32, sp); // lq s4, 32(sp) + c->lq(s1, 48, sp); // lq s1, 48(sp) + c->lq(s3, 64, sp); // lq s3, 64(sp) + c->lq(s2, 80, sp); // lq s2, 80(sp) + c->daddiu(sp, sp, 96); // daddiu sp, sp, 96 + +block_19: + c->lqc2(vf1, 0, s4); // lqc2 vf1, 0(s4) + c->lqc2(vf2, 16, s4); // lqc2 vf2, 16(s4) + c->lqc2(vf3, 32, s4); // lqc2 vf3, 32(s4) + c->lqc2(vf4, 16, s5); // lqc2 vf4, 16(s5) + c->lqc2(vf5, 32, s5); // lqc2 vf5, 32(s5) + c->lqc2(vf6, 48, s5); // lqc2 vf6, 48(s5) + c->lqc2(vf7, 64, s5); // lqc2 vf7, 64(s5) + c->lwc1(f0, 96, s5); // lwc1 f0, 96(s5) + c->mfc1(v1, f0); // mfc1 v1, f0 + c->vmul_bc(DEST::xyzw, BC::z, vf7, vf7, vf9); // vmulz.xyzw vf7, vf7, vf9 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L92 + c->vadd(DEST::xyz, vf4, vf4, vf7); // vadd.xyz vf4, vf4, vf7 + if (bc) {goto block_21;} // branch non-likely + + c->mov128_vf_gpr(vf8, v1); // qmtc2.i vf8, v1 + c->vsub_bc(DEST::w, BC::x, vf8, vf0, vf8); // vsubx.w vf8, vf0, vf8 + c->vmul_bc(DEST::xyzw, BC::w, vf8, vf8, vf9); // vmulw.xyzw vf8, vf8, vf9 + c->vsub_bc(DEST::w, BC::w, vf8, vf0, vf8); // vsubw.w vf8, vf0, vf8 + c->vmul_bc(DEST::xyz, BC::w, vf4, vf4, vf8); // vmulw.xyz vf4, vf4, vf8 + +block_21: + c->vmul_bc(DEST::xyzw, BC::y, vf10, vf4, vf9); // vmuly.xyzw vf10, vf4, vf9 + c->vmul_bc(DEST::xyzw, BC::y, vf11, vf5, vf9); // vmuly.xyzw vf11, vf5, vf9 + c->vmul_bc(DEST::xyzw, BC::y, vf12, vf6, vf9); // vmuly.xyzw vf12, vf6, vf9 + c->vadd(DEST::xyzw, vf1, vf1, vf10); // vadd.xyzw vf1, vf1, vf10 + c->vadd(DEST::zw, vf2, vf2, vf11); // vadd.zw vf2, vf2, vf11 + c->vadd(DEST::xyzw, vf3, vf3, vf12); // vadd.xyzw vf3, vf3, vf12 + c->vmax_bc(DEST::xyzw, BC::x, vf3, vf3, vf0); // vmaxx.xyzw vf3, vf3, vf0 + c->sqc2(vf4, 16, s5); // sqc2 vf4, 16(s5) + c->sqc2(vf1, 0, s4); // sqc2 vf1, 0(s4) + c->sqc2(vf2, 16, s4); // sqc2 vf2, 16(s4) + c->sqc2(vf3, 32, s4); // sqc2 vf3, 32(s4) + c->lwc1(f0, 24, s4); // lwc1 f0, 24(s4) + c->cvtws(f0, f0); // cvt.w.s f0, f0 + c->mfc1(v1, f0); // mfc1 v1, f0 + c->dsll32(v1, v1, 16); // dsll32 v1, v1, 16 + c->dsra32(v1, v1, 16); // dsra32 v1, v1, 16 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->cvtsw(f0, f0); // cvt.s.w f0, f0 + c->swc1(f0, 24, s4); // swc1 f0, 24(s4) + c->lw(v1, 104, s5); // lw v1, 104(s5) + c->andi(v1, v1, 64); // andi v1, v1, 64 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L93 + c->load_symbol2(t9, cache.sp_orbiter); // lw t9, sp-orbiter(s7) + if (bc) {goto block_23;} // branch non-likely + + c->daddiu(sp, sp, -96); // daddiu sp, sp, -96 + c->sq(gp, 0, sp); // sq gp, 0(sp) + c->sq(s5, 16, sp); // sq s5, 16(sp) + c->sq(s4, 32, sp); // sq s4, 32(sp) + c->sq(s1, 48, sp); // sq s1, 48(sp) + c->sq(s3, 64, sp); // sq s3, 64(sp) + c->mov64(a0, gp); // or a0, gp, r0 + c->mov64(a1, s5); // or a1, s5, r0 + c->mov64(a2, s4); // or a2, s4, r0 + call_addr = c->gprs[t9].du32[0]; // function call: + c->sq(s2, 80, sp); // sq s2, 80(sp) + c->jalr(call_addr); // jalr ra, t9 + c->lq(gp, 0, sp); // lq gp, 0(sp) + c->lq(s5, 16, sp); // lq s5, 16(sp) + c->lq(s4, 32, sp); // lq s4, 32(sp) + c->lq(s1, 48, sp); // lq s1, 48(sp) + c->lq(s3, 64, sp); // lq s3, 64(sp) + c->lq(s2, 80, sp); // lq s2, 80(sp) + c->daddiu(sp, sp, 96); // daddiu sp, sp, 96 + +block_23: + c->lq(v1, 32, s4); // lq v1, 32(s4) + c->lw(a0, 104, s5); // lw a0, 104(s5) + c->andi(a1, a0, 2); // andi a1, a0, 2 + bc = c->sgpr64(a1) == 0; // beq a1, r0, L94 + c->andi(a1, a0, 4); // andi a1, a0, 4 + if (bc) {goto block_26;} // branch non-likely + + bc = c->sgpr64(v1) != 0; // bne v1, r0, L94 + c->pextuw(t4, v1, r0); // pextuw t4, v1, r0 + if (bc) {goto block_26;} // branch non-likely + + bc = c->sgpr64(t4) == 0; // beq t4, r0, L96 + // nop // sll r0, r0, 0 + if (bc) {goto block_31;} // branch non-likely + + +block_26: + bc = c->sgpr64(a1) == 0; // beq a1, r0, L95 + c->andi(a0, a0, 1); // andi a0, a0, 1 + if (bc) {goto block_28;} // branch non-likely + + c->pcpyud(t4, v1, r0); // pcpyud t4, v1, r0 + c->pexew(t4, t4); // pexew t4, t4 + bc = ((s64)c->sgpr64(t4)) <= 0; // blez t4, L96 + // nop // sll r0, r0, 0 + if (bc) {goto block_31;} // branch non-likely + + +block_28: + bc = c->sgpr64(a0) == 0; // beq a0, r0, L97 + // nop // sll r0, r0, 0 + if (bc) {goto block_32;} // branch non-likely + + c->mov128_gpr_vf(v1, vf1); // qmfc2.i v1, vf1 + c->pcpyud(v1, v1, r0); // pcpyud v1, v1, r0 + c->pexew(v1, v1); // pexew v1, v1 + bc = ((s64)c->sgpr64(v1)) < 0; // bltz v1, L96 + c->mov128_gpr_vf(v1, vf2); // qmfc2.i v1, vf2 + if (bc) {goto block_31;} // branch non-likely + + c->pcpyud(v1, v1, r0); // pcpyud v1, v1, r0 + c->pexew(v1, v1); // pexew v1, v1 + bc = ((s64)c->sgpr64(v1)) >= 0; // bgez v1, L97 + // nop // sll r0, r0, 0 + if (bc) {goto block_32;} // branch non-likely + + +block_31: + c->load_symbol2(t9, cache.sp_free_particle); // lw t9, sp-free-particle(s7) + c->mov64(a0, gp); // or a0, gp, r0 + c->mov64(a1, s1); // or a1, s1, r0 + c->mov64(a2, s5); // or a2, s5, r0 + c->mov64(a3, s4); // or a3, 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 + +block_32: + c->daddiu(s3, s3, -1); // daddiu s3, s3, -1 + c->daddiu(s5, s5, 144); // daddiu s5, s5, 144 + c->daddiu(s4, s4, 48); // daddiu s4, s4, 48 + bc = c->sgpr64(s3) != 0; // bne s3, r0, L84 + c->daddiu(s1, s1, 1); // daddiu s1, s1, 1 + if (bc) {goto block_1;} // branch non-likely + + c->mov64(v0, s1); // or v0, s1, r0 + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 112, sp); // lq gp, 112(sp) + c->lq(s5, 96, sp); // lq s5, 96(sp) + c->lq(s4, 80, sp); // lq s4, 80(sp) + c->lq(s3, 64, sp); // lq s3, 64(sp) + c->lq(s2, 48, sp); // lq s2, 48(sp) + c->lq(s1, 32, sp); // lq s1, 32(sp) + c->lq(s0, 16, sp); // lq s0, 16(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 128); // daddiu sp, sp, 128 + 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.add_to_sprite_aux_list = intern_from_c(-1, 0, "add-to-sprite-aux-list").c(); + cache.sp_free_particle = intern_from_c(-1, 0, "sp-free-particle").c(); + cache.sp_orbiter = intern_from_c(-1, 0, "sp-orbiter").c(); + cache.sp_relaunch_particle_2d = intern_from_c(-1, 0, "sp-relaunch-particle-2d").c(); + gLinkedFunctionTable.reg("sp-process-block-2d", execute, 256); +} + +} // namespace sp_process_block_2d +} // 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 sp_process_block_3d { +struct Cache { + void* fake_scratchpad_data; // *fake-scratchpad-data* + void* quaternion; // quaternion*! + void* quaternion_normalize; // quaternion-normalize! + void* sp_free_particle; // sp-free-particle + void* sp_relaunch_particle_3d; // sp-relaunch-particle-3d +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + bool cop1_bc = false; + c->daddiu(sp, sp, -176); // daddiu sp, sp, -176 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s0, 64, sp); // sq s0, 64(sp) + c->sq(s1, 80, sp); // sq s1, 80(sp) + c->sq(s2, 96, sp); // sq s2, 96(sp) + c->sq(s3, 112, sp); // sq s3, 112(sp) + c->sq(s4, 128, sp); // sq s4, 128(sp) + c->sq(s5, 144, sp); // sq s5, 144(sp) + c->sq(gp, 160, sp); // sq gp, 160(sp) + c->mov64(gp, a0); // or gp, a0, r0 + c->mov64(s5, a1); // or s5, a1, r0 + c->mov64(s4, a2); // or s4, a2, r0 + c->mov64(s0, a3); // or s0, a3, r0 + c->mov64(s3, t0); // or s3, t0, r0 + c->mov64(s2, t1); // or s2, t1, r0 + c->daddiu(s1, sp, 16); // daddiu s1, sp, 16 + c->sq(r0, 0, s1); // sq r0, 0(s1) + +block_1: + c->lb(v1, 128, s5); // lb v1, 128(s5) + bc = c->sgpr64(v1) == 0; // beq v1, r0, L82 + // nop // sll r0, r0, 0 + if (bc) {goto block_33;} // branch non-likely + + c->lb(a0, 129, s5); // lb a0, 129(s5) + get_fake_spad_addr2(v1, cache.fake_scratchpad_data, 0, c);// lui v1, 28672 + c->dsll(a0, a0, 4); // dsll a0, a0, 4 + c->daddu(v1, v1, a0); // daddu v1, v1, a0 + c->lqc2(vf16, 0, v1); // lqc2 vf16, 0(v1) + c->mov128_gpr_vf(v1, vf16); // qmfc2.i v1, vf16 + c->andi(v1, v1, 255); // andi v1, v1, 255 + c->sq(v1, 32, sp); // sq v1, 32(sp) + c->lq(v1, 32, sp); // lq v1, 32(sp) + bc = c->sgpr64(v1) != 0; // bne v1, r0, L70 + // nop // sll r0, r0, 0 + if (bc) {goto block_7;} // branch non-likely + + c->lw(v1, 100, s5); // lw v1, 100(s5) + c->addiu(a0, r0, -1); // addiu a0, r0, -1 + bc = c->sgpr64(v1) == c->sgpr64(a0); // beq v1, a0, L69 + // nop // sll r0, r0, 0 + if (bc) {goto block_5;} // branch non-likely + + bc = c->sgpr64(v1) == 0; // beq v1, r0, L81 + // nop // sll r0, r0, 0 + if (bc) {goto block_32;} // branch non-likely + + +block_5: + c->lw(a0, 104, s5); // lw a0, 104(s5) + c->andi(v1, a0, 32); // andi v1, a0, 32 + c->xor_(a0, a0, v1); // xor a0, a0, v1 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L82 + c->sw(a0, 104, s5); // sw a0, 104(s5) + if (bc) {goto block_33;} // branch non-likely + + c->lw(v1, 124, s5); // lw v1, 124(s5) + //beq r0, r0, L82 // beq r0, r0, L82 + c->sw(v1, 44, s4); // sw v1, 44(s4) + goto block_33; // branch always + + +block_7: + c->lw(v1, 100, s5); // lw v1, 100(s5) + c->addiu(a0, r0, -1); // addiu a0, r0, -1 + bc = c->sgpr64(v1) == c->sgpr64(a0); // beq v1, a0, L71 + c->lq(a0, 32, sp); // lq a0, 32(sp) + if (bc) {goto block_10;} // branch non-likely + + c->dsubu(a0, v1, a0); // dsubu a0, v1, a0 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L81 + c->pmaxw(v1, a0, r0); // pmaxw v1, a0, r0 + if (bc) {goto block_32;} // branch non-likely + + c->sw(v1, 100, s5); // sw v1, 100(s5) + +block_10: + c->lw(a0, 104, s5); // lw a0, 104(s5) + c->andi(v1, a0, 32); // andi v1, a0, 32 + c->xor_(a0, a0, v1); // xor a0, a0, v1 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L72 + c->sw(a0, 104, s5); // sw a0, 104(s5) + if (bc) {goto block_12;} // branch non-likely + + c->lw(v1, 124, s5); // lw v1, 124(s5) + c->sw(v1, 44, s4); // sw v1, 44(s4) + +block_12: + c->lw(t9, 112, s5); // lw t9, 112(s5) + bc = c->sgpr64(t9) == 0; // beq t9, r0, L73 + // nop // sll r0, r0, 0 + if (bc) {goto block_14;} // branch non-likely + + c->daddiu(sp, sp, -96); // daddiu sp, sp, -96 + c->sq(gp, 0, sp); // sq gp, 0(sp) + c->sq(s5, 16, sp); // sq s5, 16(sp) + c->sq(s4, 32, sp); // sq s4, 32(sp) + c->sq(s0, 48, sp); // sq s0, 48(sp) + c->sq(s3, 64, sp); // sq s3, 64(sp) + c->mov64(a0, gp); // or a0, gp, r0 + c->mov64(a1, s5); // or a1, s5, r0 + c->mov64(a2, s4); // or a2, s4, r0 + call_addr = c->gprs[t9].du32[0]; // function call: + c->sq(s2, 80, sp); // sq s2, 80(sp) + c->jalr(call_addr); // jalr ra, t9 + c->lq(gp, 0, sp); // lq gp, 0(sp) + c->lq(s5, 16, sp); // lq s5, 16(sp) + c->lq(s4, 32, sp); // lq s4, 32(sp) + c->lq(s0, 48, sp); // lq s0, 48(sp) + c->lq(s3, 64, sp); // lq s3, 64(sp) + c->lq(s2, 80, sp); // lq s2, 80(sp) + c->daddiu(sp, sp, 96); // daddiu sp, sp, 96 + +block_14: + c->lw(a1, 120, s5); // lw a1, 120(s5) + c->lw(v1, 116, s5); // lw v1, 116(s5) + bc = c->sgpr64(a1) == 0; // beq a1, r0, L74 + c->lq(a0, 32, sp); // lq a0, 32(sp) + if (bc) {goto block_17;} // branch non-likely + + c->dsubu(v1, v1, a0); // dsubu v1, v1, a0 + bc = ((s64)c->sgpr64(v1)) >= 0; // bgez v1, L74 + c->sw(v1, 116, s5); // sw v1, 116(s5) + if (bc) {goto block_17;} // branch non-likely + + c->daddiu(sp, sp, -96); // daddiu sp, sp, -96 + c->sq(gp, 0, sp); // sq gp, 0(sp) + c->sq(s5, 16, sp); // sq s5, 16(sp) + c->sq(s4, 32, sp); // sq s4, 32(sp) + c->sq(s0, 48, sp); // sq s0, 48(sp) + c->sq(s3, 64, sp); // sq s3, 64(sp) + c->sq(s2, 80, sp); // sq s2, 80(sp) + c->mov64(a0, gp); // or a0, gp, r0 + c->mov64(a3, s4); // or a3, s4, r0 + c->mov64(a2, s5); // or a2, s5, r0 + c->load_symbol2(t9, cache.sp_relaunch_particle_3d);// lw t9, sp-relaunch-particle-3d(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->lq(gp, 0, sp); // lq gp, 0(sp) + c->lq(s5, 16, sp); // lq s5, 16(sp) + c->lq(s4, 32, sp); // lq s4, 32(sp) + c->lq(s0, 48, sp); // lq s0, 48(sp) + c->lq(s3, 64, sp); // lq s3, 64(sp) + c->lq(s2, 80, sp); // lq s2, 80(sp) + c->daddiu(sp, sp, 96); // daddiu sp, sp, 96 + +block_17: + c->lqc2(vf8, 0, s4); // lqc2 vf8, 0(s4) + c->lqc2(vf9, 16, s4); // lqc2 vf9, 16(s4) + c->lqc2(vf10, 32, s4); // lqc2 vf10, 32(s4) + c->lqc2(vf11, 16, s5); // lqc2 vf11, 16(s5) + c->lqc2(vf12, 32, s5); // lqc2 vf12, 32(s5) + c->lqc2(vf13, 48, s5); // lqc2 vf13, 48(s5) + c->lqc2(vf14, 64, s5); // lqc2 vf14, 64(s5) + c->lwc1(f0, 96, s5); // lwc1 f0, 96(s5) + c->mfc1(v1, f0); // mfc1 v1, f0 + c->vmul_bc(DEST::xyzw, BC::z, vf14, vf14, vf16); // vmulz.xyzw vf14, vf14, vf16 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L75 + c->vadd(DEST::xyz, vf11, vf11, vf14); // vadd.xyz vf11, vf11, vf14 + if (bc) {goto block_19;} // branch non-likely + + c->mov128_vf_gpr(vf15, v1); // qmtc2.i vf15, v1 + c->vsub_bc(DEST::w, BC::x, vf15, vf0, vf15); // vsubx.w vf15, vf0, vf15 + c->vmul_bc(DEST::xyzw, BC::w, vf15, vf15, vf16); // vmulw.xyzw vf15, vf15, vf16 + c->vsub_bc(DEST::w, BC::w, vf15, vf0, vf15); // vsubw.w vf15, vf0, vf15 + c->vmul_bc(DEST::xyz, BC::w, vf11, vf11, vf15); // vmulw.xyz vf11, vf11, vf15 + +block_19: + c->vmul_bc(DEST::xyzw, BC::y, vf17, vf11, vf16); // vmuly.xyzw vf17, vf11, vf16 + c->vmul_bc(DEST::xyzw, BC::y, vf18, vf12, vf16); // vmuly.xyzw vf18, vf12, vf16 + c->vmul_bc(DEST::xyzw, BC::y, vf19, vf13, vf16); // vmuly.xyzw vf19, vf13, vf16 + c->vadd(DEST::xyzw, vf8, vf8, vf17); // vadd.xyzw vf8, vf8, vf17 + c->vadd_bc(DEST::w, BC::w, vf9, vf9, vf18); // vaddw.w vf9, vf9, vf18 + c->vadd(DEST::xyzw, vf10, vf10, vf19); // vadd.xyzw vf10, vf10, vf19 + c->vmax_bc(DEST::xyzw, BC::x, vf10, vf10, vf0); // vmaxx.xyzw vf10, vf10, vf0 + c->sqc2(vf11, 16, s5); // sqc2 vf11, 16(s5) + c->sqc2(vf8, 0, s4); // sqc2 vf8, 0(s4) + c->sqc2(vf9, 16, s4); // sqc2 vf9, 16(s4) + c->sqc2(vf10, 32, s4); // sqc2 vf10, 32(s4) + c->mov64(v1, s1); // or v1, s1, r0 + c->mov64(a0, s4); // or a0, s4, r0 + c->lwc1(f0, 16, a0); // lwc1 f0, 16(a0) + c->lwc1(f1, 20, a0); // lwc1 f1, 20(a0) + c->lwc1(f2, 24, a0); // lwc1 f2, 24(a0) + c->swc1(f0, 0, v1); // swc1 f0, 0(v1) + c->swc1(f1, 4, v1); // swc1 f1, 4(v1) + c->swc1(f2, 8, v1); // swc1 f2, 8(v1) + c->lui(a0, 16256); // lui a0, 16256 + c->mtc1(f3, a0); // mtc1 f3, a0 + c->muls(f2, f2, f2); // mul.s f2, f2, f2 + c->subs(f2, f3, f2); // sub.s f2, f3, f2 + c->muls(f1, f1, f1); // mul.s f1, f1, f1 + c->subs(f1, f2, f1); // sub.s f1, f2, f1 + c->muls(f0, f0, f0); // mul.s f0, f0, f0 + c->subs(f0, f1, f0); // sub.s f0, f1, f0 + c->sqrts(f0, f0); // sqrt.s f0, f0 + c->swc1(f0, 12, v1); // swc1 f0, 12(v1) + c->mfc1(a0, f0); // mfc1 a0, f0 + c->lq(v1, 32, sp); // lq v1, 32(sp) + c->mov64(v1, v1); // or v1, v1, r0 + c->sq(v1, 48, sp); // sq v1, 48(sp) + +block_20: + c->load_symbol2(t9, cache.quaternion); // lw t9, quaternion*!(s7) + c->mov64(a0, s1); // or a0, s1, r0 + c->mov64(a1, s1); // or a1, s1, r0 + c->daddiu(a2, s5, 80); // daddiu a2, s5, 80 + 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->lq(v1, 48, sp); // lq v1, 48(sp) + c->daddiu(v1, v1, -10); // daddiu v1, v1, -10 + c->sq(v1, 48, sp); // sq v1, 48(sp) + // nop // sll r0, r0, 0 + c->lq(v1, 48, sp); // lq v1, 48(sp) + bc = ((s64)c->sgpr64(v1)) > 0; // bgtz v1, L76 + // nop // sll r0, r0, 0 + if (bc) {goto block_20;} // branch non-likely + + c->load_symbol2(t9, cache.quaternion_normalize); // lw t9, quaternion-normalize!(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(a0, s4); // or a0, s4, r0 + c->mov64(v1, s1); // or v1, s1, r0 + c->lwc1(f0, 12, v1); // lwc1 f0, 12(v1) + c->mtc1(f1, r0); // mtc1 f1, r0 + cop1_bc = c->fprs[f0] < c->fprs[f1]; // c.lt.s f0, f1 + bc = !cop1_bc; // bc1f L77 + // nop // sll r0, r0, 0 + if (bc) {goto block_23;} // branch non-likely + + c->lqc2(vf1, 16, a0); // lqc2 vf1, 16(a0) + c->lqc2(vf2, 0, v1); // lqc2 vf2, 0(v1) + c->vsub(DEST::xyz, vf1, vf0, vf2); // vsub.xyz vf1, vf0, vf2 + c->sqc2(vf1, 16, a0); // sqc2 vf1, 16(a0) + c->mov128_gpr_vf(a0, vf1); // qmfc2.i a0, vf1 + //beq r0, r0, L78 // beq r0, r0, L78 + // nop // sll r0, r0, 0 + goto block_24; // branch always + + +block_23: + c->lqc2(vf1, 16, a0); // lqc2 vf1, 16(a0) + c->lqc2(vf2, 0, v1); // lqc2 vf2, 0(v1) + c->vadd(DEST::xyz, vf1, vf0, vf2); // vadd.xyz vf1, vf0, vf2 + c->sqc2(vf1, 16, a0); // sqc2 vf1, 16(a0) + c->mov128_gpr_vf(a0, vf1); // qmfc2.i a0, vf1 + +block_24: + c->mov128_gpr_vf(v1, vf10); // qmfc2.i v1, vf10 + c->lw(a0, 104, s5); // lw a0, 104(s5) + c->andi(a1, a0, 2); // andi a1, a0, 2 + bc = c->sgpr64(a1) == 0; // beq a1, r0, L79 + c->andi(a1, a0, 4); // andi a1, a0, 4 + if (bc) {goto block_27;} // branch non-likely + + bc = c->sgpr64(v1) != 0; // bne v1, r0, L79 + c->pextuw(a2, v1, r0); // pextuw a2, v1, r0 + if (bc) {goto block_27;} // branch non-likely + + bc = c->sgpr64(a2) == 0; // beq a2, r0, L81 + // nop // sll r0, r0, 0 + if (bc) {goto block_32;} // branch non-likely + + +block_27: + bc = c->sgpr64(a1) == 0; // beq a1, r0, L80 + c->andi(a0, a0, 1); // andi a0, a0, 1 + if (bc) {goto block_29;} // branch non-likely + + c->pcpyud(v1, v1, r0); // pcpyud v1, v1, r0 + c->pexew(v1, v1); // pexew v1, v1 + bc = ((s64)c->sgpr64(v1)) <= 0; // blez v1, L81 + // nop // sll r0, r0, 0 + if (bc) {goto block_32;} // branch non-likely + + +block_29: + bc = c->sgpr64(a0) == 0; // beq a0, r0, L82 + // nop // sll r0, r0, 0 + if (bc) {goto block_33;} // branch non-likely + + c->mov128_gpr_vf(v1, vf8); // qmfc2.i v1, vf8 + c->pcpyud(v1, v1, r0); // pcpyud v1, v1, r0 + c->pexew(v1, v1); // pexew v1, v1 + bc = ((s64)c->sgpr64(v1)) < 0; // bltz v1, L81 + c->mov128_gpr_vf(v1, vf9); // qmfc2.i v1, vf9 + if (bc) {goto block_32;} // branch non-likely + + c->pcpyud(v1, v1, r0); // pcpyud v1, v1, r0 + c->pexew(v1, v1); // pexew v1, v1 + bc = ((s64)c->sgpr64(v1)) >= 0; // bgez v1, L82 + // nop // sll r0, r0, 0 + if (bc) {goto block_33;} // branch non-likely + + +block_32: + c->load_symbol2(t9, cache.sp_free_particle); // lw t9, sp-free-particle(s7) + c->mov64(a0, gp); // or a0, gp, r0 + c->mov64(a1, s0); // or a1, s0, r0 + c->mov64(a2, s5); // or a2, s5, r0 + c->mov64(a3, s4); // or a3, 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 + +block_33: + c->daddiu(s3, s3, -1); // daddiu s3, s3, -1 + c->daddiu(s5, s5, 144); // daddiu s5, s5, 144 + c->daddiu(s4, s4, 48); // daddiu s4, s4, 48 + bc = c->sgpr64(s3) != 0; // bne s3, r0, L68 + c->daddiu(s0, s0, 1); // daddiu s0, s0, 1 + if (bc) {goto block_1;} // branch non-likely + + c->mov64(v0, s0); // or v0, s0, r0 + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 160, sp); // lq gp, 160(sp) + c->lq(s5, 144, sp); // lq s5, 144(sp) + c->lq(s4, 128, sp); // lq s4, 128(sp) + c->lq(s3, 112, sp); // lq s3, 112(sp) + c->lq(s2, 96, sp); // lq s2, 96(sp) + c->lq(s1, 80, sp); // lq s1, 80(sp) + c->lq(s0, 64, sp); // lq s0, 64(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 176); // daddiu sp, sp, 176 + 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.quaternion = intern_from_c(-1, 0, "quaternion*!").c(); + cache.quaternion_normalize = intern_from_c(-1, 0, "quaternion-normalize!").c(); + cache.sp_free_particle = intern_from_c(-1, 0, "sp-free-particle").c(); + cache.sp_relaunch_particle_3d = intern_from_c(-1, 0, "sp-relaunch-particle-3d").c(); + gLinkedFunctionTable.reg("sp-process-block-3d", execute, 512); +} + +} // namespace sp_process_block_3d +} // namespace Mips2C \ No newline at end of file diff --git a/game/mips2c/jak3_functions/sparticle_launcher.cpp b/game/mips2c/jak3_functions/sparticle_launcher.cpp new file mode 100644 index 0000000000..a35200d0d0 --- /dev/null +++ b/game/mips2c/jak3_functions/sparticle_launcher.cpp @@ -0,0 +1,1560 @@ +//--------------------------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 sp_init_fields { +struct Cache { + void* part_id_table; // *part-id-table* + void* sp_temp; // *sp-temp* +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->mov64(v1, a0); // or v1, a0, r0 + c->mov64(v1, a2); // or v1, a2, r0 + c->mov64(v1, a3); // or v1, a3, r0 + c->mov64(v1, t0); // or v1, t0, r0 + // nop // sll r0, r0, 0 + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + c->mov64(v0, a1); // or v0, a1, r0 + +block_1: + c->lh(a1, 0, v0); // lh a1, 0(v0) + // nop // sll r0, r0, 0 + c->dsubu(a1, a1, a2); // dsubu a1, a1, a2 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + if (((s64)c->sgpr64(a1)) < 0) { // bltzl a1, L350 + c->daddiu(v0, v0, 16); // daddiu v0, v0, 16 + goto block_1; + } + +// block_3: + c->dsubu(a1, a2, a3); // dsubu a1, a2, a3 + // nop // sll r0, r0, 0 + bc = ((s64)c->sgpr64(a1)) >= 0; // bgez a1, L366 + // nop // sll r0, r0, 0 + if (bc) {goto block_47;} // branch non-likely + + +block_4: + c->lh(a1, 0, v0); // lh a1, 0(v0) + // nop // sll r0, r0, 0 + bc = c->sgpr64(a1) != c->sgpr64(a2); // bne a1, a2, L364 + c->vrget(DEST::xyzw, vf1); // vrget.xyzw vf1 + if (bc) {goto block_44;} // branch non-likely + + c->vsqrt(vf1, BC::x); // vsqrt Q, vf1.x + c->lh(a1, 2, v0); // lh a1, 2(v0) + c->vaddq(DEST::x, vf2, vf0); // vaddq.x vf2, vf0, Q + c->lw(t2, 8, v0); // lw t2, 8(v0) + c->addiu(v1, r0, 7); // addiu v1, r0, 7 + bc = c->sgpr64(a2) == c->sgpr64(v1); // beq a2, v1, L353 + c->addiu(t1, r0, 1); // addiu t1, r0, 1 + if (bc) {goto block_19;} // branch non-likely + + bc = c->sgpr64(a1) == c->sgpr64(t1); // beq a1, t1, L354 + c->addiu(t1, r0, 2); // addiu t1, r0, 2 + if (bc) {goto block_21;} // branch non-likely + + bc = c->sgpr64(a1) == c->sgpr64(t1); // beq a1, t1, L358 + c->addiu(t1, r0, 7); // addiu t1, r0, 7 + if (bc) {goto block_31;} // branch non-likely + + bc = c->sgpr64(a1) == c->sgpr64(t1); // beq a1, t1, L356 + c->addiu(t1, r0, 3); // addiu t1, r0, 3 + if (bc) {goto block_26;} // branch non-likely + + bc = c->sgpr64(a1) == c->sgpr64(t1); // beq a1, t1, L359 + c->addiu(t1, r0, 5); // addiu t1, r0, 5 + if (bc) {goto block_34;} // branch non-likely + + bc = c->sgpr64(a1) == c->sgpr64(t1); // beq a1, t1, L361 + c->addiu(t1, r0, 6); // addiu t1, r0, 6 + if (bc) {goto block_38;} // branch non-likely + + bc = c->sgpr64(a1) == c->sgpr64(t1); // beq a1, t1, L362 + c->addiu(t1, r0, 4); // addiu t1, r0, 4 + if (bc) {goto block_40;} // branch non-likely + + bc = c->sgpr64(a1) == c->sgpr64(t1); // beq a1, t1, L363 + c->addiu(t1, r0, 8); // addiu t1, r0, 8 + if (bc) {goto block_42;} // branch non-likely + + bc = c->sgpr64(a1) == c->sgpr64(t1); // beq a1, t1, L360 + // nop // sll r0, r0, 0 + if (bc) {goto block_36;} // branch non-likely + + bc = c->sgpr64(t2) == 0; // beq t2, r0, L352 + // nop // sll r0, r0, 0 + if (bc) {goto block_17;} // branch non-likely + + c->vrxor(vf2, BC::w); // vrxorw vf2 + c->lw(t1, 12, v0); // lw t1, 12(v0) + c->vrnext(DEST::xyzw, vf1); // vrnext.xyzw vf1 + c->lw(t3, 4, v0); // lw t3, 4(v0) + c->vsub_bc(DEST::xyzw, BC::w, vf1, vf1, vf0); // vsubw.xyzw vf1, vf1, vf0 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf2, t2); // qmtc2.i vf2, t2 + // nop // sll r0, r0, 0 + c->vitof0(DEST::xyzw, vf2, vf2); // vitof0.xyzw vf2, vf2 + // nop // sll r0, r0, 0 + c->vmul(DEST::xyzw, vf1, vf1, vf2); // vmul.xyzw vf1, vf1, vf2 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf1, vf1); // vftoi0.xyzw vf1, vf1 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t2, vf1); // qmfc2.i t2, vf1 + // nop // sll r0, r0, 0 + c->mult3(t2, t2, t1); // mult3 t2, t2, t1 + // nop // sll r0, r0, 0 + c->daddu(t2, t2, t3); // daddu t2, t2, t3 + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + c->sw(t2, 0, a0); // sw t2, 0(a0) + c->daddiu(a0, a0, 4); // daddiu a0, a0, 4 + bc = c->sgpr64(a2) != c->sgpr64(a3); // bne a2, a3, L351 + c->daddiu(v0, v0, 16); // daddiu v0, v0, 16 + if (bc) {goto block_4;} // branch non-likely + + //jr ra // jr ra + // nop // sll r0, r0, 0 + goto end_of_function; // return + + +block_17: + c->lw(t3, 4, v0); // lw t3, 4(v0) + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + c->sw(t3, 0, a0); // sw t3, 0(a0) + c->daddiu(a0, a0, 4); // daddiu a0, a0, 4 + bc = c->sgpr64(a2) != c->sgpr64(a3); // bne a2, a3, L351 + c->daddiu(v0, v0, 16); // daddiu v0, v0, 16 + if (bc) {goto block_4;} // branch non-likely + + //jr ra // jr ra + // nop // sll r0, r0, 0 + goto end_of_function; // return + + +block_19: + c->lw(t3, 4, v0); // lw t3, 4(v0) + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + c->sw(t3, 0, a0); // sw t3, 0(a0) + c->daddiu(a0, a0, 4); // daddiu a0, a0, 4 + bc = c->sgpr64(a2) != c->sgpr64(a3); // bne a2, a3, L351 + c->daddiu(v0, v0, 16); // daddiu v0, v0, 16 + if (bc) {goto block_4;} // branch non-likely + + //jr ra // jr ra + // nop // sll r0, r0, 0 + goto end_of_function; // return + + +block_21: + bc = c->sgpr64(t2) == 0; // beq t2, r0, L355 + c->vrxor(vf2, BC::w); // vrxorw vf2 + if (bc) {goto block_24;} // branch non-likely + + c->vrnext(DEST::xyzw, vf1); // vrnext.xyzw vf1 + c->lw(t1, 12, v0); // lw t1, 12(v0) + c->vsub_bc(DEST::xyzw, BC::w, vf1, vf1, vf0); // vsubw.xyzw vf1, vf1, vf0 + c->lw(t3, 4, v0); // lw t3, 4(v0) + c->mov128_vf_gpr(vf2, t2); // qmtc2.i vf2, t2 + // nop // sll r0, r0, 0 + c->vmul(DEST::xyzw, vf1, vf1, vf2); // vmul.xyzw vf1, vf1, vf2 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf2, t1); // qmtc2.i vf2, t1 + // nop // sll r0, r0, 0 + c->vmul(DEST::xyzw, vf1, vf1, vf2); // vmul.xyzw vf1, vf1, vf2 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf2, t3); // qmtc2.i vf2, t3 + // nop // sll r0, r0, 0 + c->vadd(DEST::xyzw, vf1, vf1, vf2); // vadd.xyzw vf1, vf1, vf2 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t2, vf1); // qmfc2.i t2, vf1 + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + c->sw(t2, 0, a0); // sw t2, 0(a0) + c->daddiu(a0, a0, 4); // daddiu a0, a0, 4 + bc = c->sgpr64(a2) != c->sgpr64(a3); // bne a2, a3, L351 + c->daddiu(v0, v0, 16); // daddiu v0, v0, 16 + if (bc) {goto block_4;} // branch non-likely + + //jr ra // jr ra + // nop // sll r0, r0, 0 + goto end_of_function; // return + + +block_24: + c->lw(t3, 4, v0); // lw t3, 4(v0) + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + c->sw(t3, 0, a0); // sw t3, 0(a0) + c->daddiu(a0, a0, 4); // daddiu a0, a0, 4 + bc = c->sgpr64(a2) != c->sgpr64(a3); // bne a2, a3, L351 + c->daddiu(v0, v0, 16); // daddiu v0, v0, 16 + if (bc) {goto block_4;} // branch non-likely + + //jr ra // jr ra + // nop // sll r0, r0, 0 + goto end_of_function; // return + + +block_26: + bc = c->sgpr64(t2) == 0; // beq t2, r0, L357 + c->vrxor(vf2, BC::w); // vrxorw vf2 + if (bc) {goto block_29;} // branch non-likely + + c->vrnext(DEST::xyzw, vf1); // vrnext.xyzw vf1 + c->lw(t1, 12, v0); // lw t1, 12(v0) + c->vsub_bc(DEST::xyzw, BC::w, vf1, vf1, vf0); // vsubw.xyzw vf1, vf1, vf0 + c->lw(t3, 4, v0); // lw t3, 4(v0) + c->mov128_vf_gpr(vf2, t2); // qmtc2.i vf2, t2 + // nop // sll r0, r0, 0 + c->vmul(DEST::xyzw, vf1, vf1, vf2); // vmul.xyzw vf1, vf1, vf2 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf2, t1); // qmtc2.i vf2, t1 + // nop // sll r0, r0, 0 + c->vmul(DEST::xyzw, vf1, vf1, vf2); // vmul.xyzw vf1, vf1, vf2 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf2, t3); // qmtc2.i vf2, t3 + // nop // sll r0, r0, 0 + c->vadd(DEST::xyzw, vf1, vf1, vf2); // vadd.xyzw vf1, vf1, vf2 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t2, vf1); // qmfc2.i t2, vf1 + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + c->sw(t2, 0, a0); // sw t2, 0(a0) + c->daddiu(a0, a0, 4); // daddiu a0, a0, 4 + c->store_symbol2(t2, cache.sp_temp); // sw t2, *sp-temp*(s7) + // nop // sll r0, r0, 0 + bc = c->sgpr64(a2) != c->sgpr64(a3); // bne a2, a3, L351 + c->daddiu(v0, v0, 16); // daddiu v0, v0, 16 + if (bc) {goto block_4;} // branch non-likely + + //jr ra // jr ra + // nop // sll r0, r0, 0 + goto end_of_function; // return + + +block_29: + c->lw(t3, 4, v0); // lw t3, 4(v0) + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + c->sw(t3, 0, a0); // sw t3, 0(a0) + c->daddiu(a0, a0, 4); // daddiu a0, a0, 4 + c->store_symbol2(t3, cache.sp_temp); // sw t3, *sp-temp*(s7) + // nop // sll r0, r0, 0 + bc = c->sgpr64(a2) != c->sgpr64(a3); // bne a2, a3, L351 + c->daddiu(v0, v0, 16); // daddiu v0, v0, 16 + if (bc) {goto block_4;} // branch non-likely + + //jr ra // jr ra + // nop // sll r0, r0, 0 + goto end_of_function; // return + + +block_31: + bc = c->sgpr64(t2) == 0; // beq t2, r0, L355 + c->vrxor(vf2, BC::w); // vrxorw vf2 + if (bc) {goto block_24;} // branch non-likely + + c->vrnext(DEST::xyzw, vf1); // vrnext.xyzw vf1 + c->lw(t1, 12, v0); // lw t1, 12(v0) + c->vsub_bc(DEST::xyzw, BC::w, vf1, vf1, vf0); // vsubw.xyzw vf1, vf1, vf0 + c->daddiu(t2, t2, 1); // daddiu t2, t2, 1 + c->mov128_vf_gpr(vf2, t2); // qmtc2.i vf2, t2 + c->lw(t3, 4, v0); // lw t3, 4(v0) + c->vitof0(DEST::xyzw, vf2, vf2); // vitof0.xyzw vf2, vf2 + // nop // sll r0, r0, 0 + c->vmul(DEST::xyzw, vf1, vf1, vf2); // vmul.xyzw vf1, vf1, vf2 + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf1, vf1); // vftoi0.xyzw vf1, vf1 + // nop // sll r0, r0, 0 + c->vitof0(DEST::xyzw, vf1, vf1); // vitof0.xyzw vf1, vf1 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf2, t1); // qmtc2.i vf2, t1 + // nop // sll r0, r0, 0 + c->vmul(DEST::xyzw, vf1, vf1, vf2); // vmul.xyzw vf1, vf1, vf2 + // nop // sll r0, r0, 0 + c->mov128_vf_gpr(vf2, t3); // qmtc2.i vf2, t3 + // nop // sll r0, r0, 0 + c->vadd(DEST::xyzw, vf1, vf1, vf2); // vadd.xyzw vf1, vf1, vf2 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(t2, vf1); // qmfc2.i t2, vf1 + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + c->sw(t2, 0, a0); // sw t2, 0(a0) + c->daddiu(a0, a0, 4); // daddiu a0, a0, 4 + bc = c->sgpr64(a2) != c->sgpr64(a3); // bne a2, a3, L351 + c->daddiu(v0, v0, 16); // daddiu v0, v0, 16 + if (bc) {goto block_4;} // branch non-likely + + //jr ra // jr ra + // nop // sll r0, r0, 0 + goto end_of_function; // return + + +block_34: + c->lw(t1, 4, v0); // lw t1, 4(v0) + // nop // sll r0, r0, 0 + c->dsll(t1, t1, 2); // dsll t1, t1, 2 + // nop // sll r0, r0, 0 + c->daddu(t1, t1, a0); // daddu t1, t1, a0 + // nop // sll r0, r0, 0 + c->lw(t3, 0, t1); // lw t3, 0(t1) + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + c->sw(t3, 0, a0); // sw t3, 0(a0) + c->daddiu(a0, a0, 4); // daddiu a0, a0, 4 + bc = c->sgpr64(a2) != c->sgpr64(a3); // bne a2, a3, L351 + c->daddiu(v0, v0, 16); // daddiu v0, v0, 16 + if (bc) {goto block_4;} // branch non-likely + + //jr ra // jr ra + // nop // sll r0, r0, 0 + goto end_of_function; // return + + +block_36: + // nop // sll r0, r0, 0 + c->lw(t1, 4, v0); // lw t1, 4(v0) + c->dsll(t1, t1, 2); // dsll t1, t1, 2 + // nop // sll r0, r0, 0 + c->daddu(t1, t1, a0); // daddu t1, t1, a0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->lwc1(f2, 0, t1); // lwc1 f2, 0(t1) + // nop // sll r0, r0, 0 + c->lwc1(f1, 12, v0); // lwc1 f1, 12(v0) + c->cvtsw(f2, f2); // cvt.s.w f2, f2 + // nop // sll r0, r0, 0 + c->muls(f1, f1, f2); // mul.s f1, f1, f2 + // nop // sll r0, r0, 0 + c->cvtws(f1, f1); // cvt.w.s f1, f1 + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + c->swc1(f1, 0, a0); // swc1 f1, 0(a0) + c->daddiu(a0, a0, 4); // daddiu a0, a0, 4 + bc = c->sgpr64(a2) != c->sgpr64(a3); // bne a2, a3, L351 + c->daddiu(v0, v0, 16); // daddiu v0, v0, 16 + if (bc) {goto block_4;} // branch non-likely + + //jr ra // jr ra + // nop // sll r0, r0, 0 + goto end_of_function; // return + + +block_38: + c->lw(t1, 4, v0); // lw t1, 4(v0) + // nop // sll r0, r0, 0 + c->lw(t3, -1, t1); // lw t3, -1(t1) + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + c->sw(t3, 0, a0); // sw t3, 0(a0) + c->daddiu(a0, a0, 4); // daddiu a0, a0, 4 + bc = c->sgpr64(a2) != c->sgpr64(a3); // bne a2, a3, L351 + c->daddiu(v0, v0, 16); // daddiu v0, v0, 16 + if (bc) {goto block_4;} // branch non-likely + + //jr ra // jr ra + // nop // sll r0, r0, 0 + goto end_of_function; // return + + +block_40: + c->load_symbol2(t1, cache.part_id_table); // lw t1, *part-id-table*(s7) + // nop // sll r0, r0, 0 + c->lw(t3, 4, v0); // lw t3, 4(v0) + // nop // sll r0, r0, 0 + c->dsll(t3, t3, 2); // dsll t3, t3, 2 + c->daddiu(t1, t1, 12); // daddiu t1, t1, 12 + c->daddu(t3, t3, t1); // daddu t3, t3, t1 + // nop // sll r0, r0, 0 + c->lw(t2, 0, t3); // lw t2, 0(t3) + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + c->sw(t2, 0, a0); // sw t2, 0(a0) + c->daddiu(a0, a0, 4); // daddiu a0, a0, 4 + bc = c->sgpr64(a2) != c->sgpr64(a3); // bne a2, a3, L351 + c->daddiu(v0, v0, 16); // daddiu v0, v0, 16 + if (bc) {goto block_4;} // branch non-likely + + //jr ra // jr ra + // nop // sll r0, r0, 0 + goto end_of_function; // return + + +block_42: + c->lw(t3, 4, v0); // lw t3, 4(v0) + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + c->sw(t3, 0, a0); // sw t3, 0(a0) + c->daddiu(a0, a0, 4); // daddiu a0, a0, 4 + bc = c->sgpr64(a2) != c->sgpr64(a3); // bne a2, a3, L351 + c->daddiu(v0, v0, 16); // daddiu v0, v0, 16 + if (bc) {goto block_4;} // branch non-likely + + //jr ra // jr ra + // nop // sll r0, r0, 0 + goto end_of_function; // return + + +block_44: + if (((s64)c->sgpr64(t0)) != ((s64)c->sgpr64(s7))) {// bnel t0, s7, L365 + c->sw(r0, 0, a0); // sw r0, 0(a0) + goto block_46; + } + +block_46: + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + c->daddiu(a0, a0, 4); // daddiu a0, a0, 4 + bc = c->sgpr64(a2) != c->sgpr64(a3); // bne a2, a3, L351 + // nop // sll r0, r0, 0 + if (bc) {goto block_4;} // branch non-likely + + +block_47: + //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.part_id_table = intern_from_c(-1, 0, "*part-id-table*").c(); + cache.sp_temp = intern_from_c(-1, 0, "*sp-temp*").c(); + gLinkedFunctionTable.reg("sp-init-fields!", execute, 256); +} + +} // namespace sp_init_fields +} // 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 particle_adgif { +struct Cache { + void* particle_adgif_cache; // *particle-adgif-cache* + void* particle_setup_adgif; // particle-setup-adgif +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + // nop // sll r0, r0, 0 + c->dsra(a3, a1, 20); // dsra a3, a1, 20 + c->load_symbol2(t1, cache.particle_adgif_cache); // lw t1, *particle-adgif-cache*(s7) + c->dsra(t0, a1, 8); // dsra t0, a1, 8 + c->lw(t2, 0, t1); // lw t2, 0(t1) + c->xor_(a3, a3, t0); // xor a3, a3, t0 + c->lhu(v1, 4, t1); // lhu v1, 4(t1) + c->andi(a3, a3, 65535); // andi a3, a3, 65535 + c->lw(t4, 8, t1); // lw t4, 8(t1) + bc = c->sgpr64(v1) == c->sgpr64(a3); // beq v1, a3, L343 + c->daddiu(t3, t1, 12); // daddiu t3, t1, 12 + if (bc) {goto block_7;} // branch non-likely + + bc = c->sgpr64(t2) == 0; // beq t2, r0, L342 + c->daddiu(t4, t1, 172); // daddiu t4, t1, 172 + if (bc) {goto block_4;} // branch non-likely + + +block_2: + c->lhu(v1, 0, t3); // lhu v1, 0(t3) + c->daddiu(t3, t3, 2); // daddiu t3, t3, 2 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + bc = c->sgpr64(v1) == c->sgpr64(a3); // beq v1, a3, L343 + c->daddiu(t2, t2, -1); // daddiu t2, t2, -1 + if (bc) {goto block_7;} // branch non-likely + + bc = c->sgpr64(t2) != 0; // bne t2, r0, L341 + c->daddiu(t4, t4, 80); // daddiu t4, t4, 80 + if (bc) {goto block_2;} // branch non-likely + + +block_4: + c->daddiu(sp, sp, -16); // daddiu sp, sp, -16 + c->lw(v1, 0, t1); // lw v1, 0(t1) + c->daddiu(v1, v1, -80); // daddiu v1, v1, -80 + c->sw(a0, 0, sp); // sw a0, 0(sp) + bc = c->sgpr64(v1) == 0; // beq v1, r0, L344 + c->daddiu(v1, v1, 81); // daddiu v1, v1, 81 + if (bc) {goto block_8;} // branch non-likely + + c->sh(a3, 0, t3); // sh a3, 0(t3) + // nop // sll r0, r0, 0 + c->sw(t4, 4, sp); // sw t4, 4(sp) + c->mov64(a0, t4); // or a0, t4, r0 + c->load_symbol2(t9, cache.particle_setup_adgif); // lw t9, particle-setup-adgif(s7) + // nop // sll r0, r0, 0 + c->sw(ra, 8, sp); // sw ra, 8(sp) + // nop // sll r0, r0, 0 + call_addr = c->gprs[t9].du32[0]; // function call: + c->sw(v1, 0, t1); // sw v1, 0(t1) + c->jalr(call_addr); // jalr ra, t9 + // nop // sll r0, r0, 0 + c->lw(v1, 8, t4); // lw v1, 8(t4) + c->lw(a0, 0, sp); // lw a0, 0(sp) + // nop // sll r0, r0, 0 + c->lw(t4, 4, sp); // lw t4, 4(sp) + c->andi(v1, v1, 1024); // andi v1, v1, 1024 + c->lw(ra, 8, sp); // lw ra, 8(sp) + c->daddiu(sp, sp, 16); // daddiu sp, sp, 16 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L343 + c->lw(v1, 0, t1); // lw v1, 0(t1) + if (bc) {goto block_7;} // branch non-likely + + c->daddiu(v1, v1, -1); // daddiu v1, v1, -1 + c->sw(v1, 0, t1); // sw v1, 0(t1) + +block_7: + c->lqc2(vf16, 0, t4); // lqc2 vf16, 0(t4) + c->lqc2(vf17, 16, t4); // lqc2 vf17, 16(t4) + c->lqc2(vf18, 32, t4); // lqc2 vf18, 32(t4) + c->lqc2(vf19, 48, t4); // lqc2 vf19, 48(t4) + c->lqc2(vf20, 64, t4); // lqc2 vf20, 64(t4) + c->sqc2(vf16, 0, a0); // sqc2 vf16, 0(a0) + c->sqc2(vf17, 16, a0); // sqc2 vf17, 16(a0) + c->sqc2(vf18, 32, a0); // sqc2 vf18, 32(a0) + c->sqc2(vf19, 48, a0); // sqc2 vf19, 48(a0) + c->sqc2(vf20, 64, a0); // sqc2 vf20, 64(a0) + c->sw(t4, 8, t1); // sw t4, 8(t1) + c->sh(a3, 4, t1); // sh a3, 4(t1) + //jr ra // jr ra + // nop // sll r0, r0, 0 + goto end_of_function; // return + + +block_8: + c->sw(t4, 4, sp); // sw t4, 4(sp) + // nop // sll r0, r0, 0 + c->load_symbol2(t9, cache.particle_setup_adgif); // lw t9, particle-setup-adgif(s7) + // nop // sll r0, r0, 0 + c->sw(ra, 8, sp); // sw ra, 8(sp) + // nop // sll r0, r0, 0 + call_addr = c->gprs[t9].du32[0]; // function call: + // nop // sll r0, r0, 0 + c->jalr(call_addr); // jalr ra, t9 + c->lw(t4, 4, sp); // lw t4, 4(sp) + // nop // sll r0, r0, 0 + c->lw(ra, 8, sp); // lw ra, 8(sp) + c->daddiu(sp, sp, 16); // daddiu sp, sp, 16 + //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 +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + cache.particle_adgif_cache = intern_from_c(-1, 0, "*particle-adgif-cache*").c(); + cache.particle_setup_adgif = intern_from_c(-1, 0, "particle-setup-adgif").c(); + gLinkedFunctionTable.reg("particle-adgif", execute, 128); +} + +} // namespace particle_adgif +} // 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 sp_launch_particles_var { +struct Cache { + void* level; // *level* + void* sp_launcher_enable; // *sp-launcher-enable* + void* sp_launcher_lock; // *sp-launcher-lock* + void* time_of_day_context; // *time-of-day-context* + void* active; // active + void* add_to_sprite_aux_list; // add-to-sprite-aux-list + void* cos; // cos + void* new_sound_id; // new-sound-id + void* particle_adgif; // particle-adgif + void* quaternion_axis_angle; // quaternion-axis-angle! + void* sin; // sin + void* sound_play_by_spec; // sound-play-by-spec + void* sp_adjust_launch; // sp-adjust-launch + void* sp_euler_convert; // sp-euler-convert + void* sp_get_particle; // sp-get-particle + void* sp_init_fields; // sp-init-fields! + void* sp_queue_launch; // sp-queue-launch + void* sp_rotate_system; // sp-rotate-system +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + u16 vis[16]; + c->mov64(v1, a0); // or v1, a0, r0 + c->mov64(v1, a1); // or v1, a1, r0 + c->mov64(v1, a2); // or v1, a2, r0 + c->mov64(v1, a3); // or v1, a3, r0 + c->mov64(v1, t0); // or v1, t0, r0 + c->mov64(v1, t1); // or v1, t1, r0 + // nop // sll r0, r0, 0 + c->daddiu(sp, sp, -304); // daddiu sp, sp, -304 + // nop // sll r0, r0, 0 + c->load_symbol2(v1, cache.sp_launcher_enable); // lw v1, *sp-launcher-enable*(s7) + c->sw(ra, 0, sp); // sw ra, 0(sp) + bc = c->sgpr64(v1) == c->sgpr64(s7); // beq v1, s7, L292 + c->sq(s0, 16, sp); // sq s0, 16(sp) + if (bc) {goto block_6;} // branch non-likely + + c->load_symbol2(v1, cache.sp_launcher_lock); // lw v1, *sp-launcher-lock*(s7) + c->sq(s1, 32, sp); // sq s1, 32(sp) + bc = c->sgpr64(v1) == c->sgpr64(s7); // beq v1, s7, L294 + c->sq(s2, 48, sp); // sq s2, 48(sp) + if (bc) {goto block_8;} // branch non-likely + + bc = c->sgpr64(a3) != c->sgpr64(s7); // bne a3, s7, L293 + c->lui(v1, 16256); // lui v1, 16256 + if (bc) {goto block_7;} // branch non-likely + + bc = c->sgpr64(t0) != c->sgpr64(s7); // bne t0, s7, L293 + // nop // sll r0, r0, 0 + if (bc) {goto block_7;} // branch non-likely + + bc = c->sgpr64(t1) != c->sgpr64(v1); // bne t1, v1, L293 + // nop // sll r0, r0, 0 + if (bc) {goto block_7;} // branch non-likely + + c->load_symbol2(t9, cache.sp_queue_launch); // lw t9, sp-queue-launch(s7) + // nop // sll r0, r0, 0 + call_addr = c->gprs[t9].du32[0]; // function call: + // nop // sll r0, r0, 0 + c->jalr(call_addr); // jalr ra, t9 + c->lw(ra, 0, sp); // lw ra, 0(sp) + // nop // sll r0, r0, 0 + +block_6: + //jr ra // jr ra + c->daddiu(sp, sp, 304); // daddiu sp, sp, 304 + goto end_of_function; // return + + +block_7: + c->sd(r0, 2, r0); // sd r0, 2(r0) + // nop // sll r0, r0, 0 + +block_8: + c->sq(s3, 240, sp); // sq s3, 240(sp) + // nop // sll r0, r0, 0 + c->sq(s4, 256, sp); // sq s4, 256(sp) + // nop // sll r0, r0, 0 + c->sq(s5, 272, sp); // sq s5, 272(sp) + // nop // sll r0, r0, 0 + c->sq(s6, 288, sp); // sq s6, 288(sp) + c->sqc2(vf0, 128, sp); // sqc2 vf0, 128(sp) + c->lwu(v1, 8, s6); // lwu v1, 8(s6) + c->lh(v1, 0, v1); // lh v1, 0(v1) + vis[14] = c->gpr_src(v1).du16[0]; // ctc2.i vi14, v1 + // nop // sll r0, r0, 0 + c->lqc2(vf30, 0, a2); // lqc2 vf30, 0(a2) + c->sqc2(vf30, 80, sp); // sqc2 vf30, 80(sp) + c->lqc2(vf30, 16, a2); // lqc2 vf30, 16(a2) + c->sqc2(vf30, 96, sp); // sqc2 vf30, 96(sp) + c->lqc2(vf30, 32, a2); // lqc2 vf30, 32(a2) + c->sqc2(vf30, 112, sp); // sqc2 vf30, 112(sp) + c->lqc2(vf30, 48, a2); // lqc2 vf30, 48(a2) + c->mtc1(f1, t1); // mtc1 f1, t1 + c->sqc2(vf30, 64, sp); // sqc2 vf30, 64(sp) + c->lui(v1, 17279); // lui v1, 17279 + c->mov64(s3, a0); // or s3, a0, r0 + c->mov128_vf_gpr(vf31, v1); // qmtc2.i vf31, v1 + c->mov64(s4, a1); // or s4, a1, r0 + c->lw(s6, 24, s3); // lw s6, 24(s3) + c->mov64(s0, a3); // or s0, a3, r0 + c->mov64(s1, t0); // or s1, t0, r0 + c->lw(a1, 8, a1); // lw a1, 8(a1) + c->daddiu(a0, sp, 160); // daddiu a0, sp, 160 + c->addiu(a2, r0, 0); // addiu a2, r0, 0 + c->addiu(a3, r0, 8); // addiu a3, r0, 8 + c->load_symbol2(t9, cache.sp_init_fields); // lw t9, sp-init-fields!(s7) + c->daddiu(t0, s7, 4); // daddiu t0, s7, 4 + call_addr = c->gprs[t9].du32[0]; // function call: + // nop // sll r0, r0, 0 + c->jalr(call_addr); // jalr ra, t9 + c->sw(v0, 12, sp); // sw v0, 12(sp) + // nop // sll r0, r0, 0 + c->lwc1(f2, 180, sp); // lwc1 f2, 180(sp) + // nop // sll r0, r0, 0 + bc = c->sgpr64(s0) == c->sgpr64(s7); // beq s0, s7, L295 + c->muls(f1, f2, f1); // mul.s f1, f2, f1 + if (bc) {goto block_11;} // branch non-likely + + c->lwc1(f2, 24, s0); // lwc1 f2, 24(s0) + // nop // sll r0, r0, 0 + c->adds(f2, f2, f1); // add.s f2, f2, f1 + // nop // sll r0, r0, 0 + c->swc1(f2, 24, s0); // swc1 f2, 24(s0) + // nop // sll r0, r0, 0 + c->cvtws(f2, f2); // cvt.w.s f2, f2 + // nop // sll r0, r0, 0 + c->sw(s1, 32, s0); // sw s1, 32(s0) + // nop // sll r0, r0, 0 + c->mfc1(v1, f2); // mfc1 v1, f2 + // nop // sll r0, r0, 0 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L323 + // nop // sll r0, r0, 0 + if (bc) {goto block_76;} // branch non-likely + + //beq r0, r0, L296 // beq r0, r0, L296 + // nop // sll r0, r0, 0 + goto block_12; // branch always + + +block_11: + // nop // sll r0, r0, 0 + c->lwc1(f2, 0, s4); // lwc1 f2, 0(s4) + // nop // sll r0, r0, 0 + c->adds(f2, f2, f1); // add.s f2, f2, f1 + // nop // sll r0, r0, 0 + c->swc1(f2, 0, s4); // swc1 f2, 0(s4) + // nop // sll r0, r0, 0 + c->cvtws(f2, f2); // cvt.w.s f2, f2 + // nop // sll r0, r0, 0 + c->mfc1(v1, f2); // mfc1 v1, f2 + // nop // sll r0, r0, 0 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L323 + // nop // sll r0, r0, 0 + if (bc) {goto block_76;} // branch non-likely + + +block_12: + c->addiu(a1, r0, 0); // addiu a1, r0, 0 + c->mov64(a2, s7); // or a2, s7, r0 + bc = c->sgpr64(s1) == c->sgpr64(s7); // beq s1, s7, L297 + // nop // sll r0, r0, 0 + if (bc) {goto block_15;} // branch non-likely + + c->lw(v1, 12, s1); // lw v1, 12(s1) + bc = c->sgpr64(v1) == c->sgpr64(s7); // beq v1, s7, L297 + // nop // sll r0, r0, 0 + if (bc) {goto block_15;} // branch non-likely + + c->lh(v1, 6, v1); // lh v1, 6(v1) + c->andi(a0, v1, 4); // andi a0, v1, 4 + c->addiu(a3, r0, 1); // addiu a3, r0, 1 + c->movn(a1, a3, a0); // movn a1, a3, a0 + c->andi(a0, v1, 8); // andi a0, v1, 8 + c->movn(a2, s0, a0); // movn a2, s0, a0 + // nop // sll r0, r0, 0 + +block_15: + c->load_symbol2(t9, cache.sp_get_particle); // lw t9, sp-get-particle(s7) + c->mov64(a0, s3); // or a0, s3, r0 + call_addr = c->gprs[t9].du32[0]; // function call: + // nop // sll r0, r0, 0 + c->jalr(call_addr); // jalr ra, t9 + bc = c->sgpr64(v0) == c->sgpr64(s7); // beq v0, s7, L323 + c->mov64(s2, v0); // or s2, v0, r0 + if (bc) {goto block_76;} // branch non-likely + + c->daddiu(a0, sp, 192); // daddiu a0, sp, 192 + c->lw(a1, 12, sp); // lw a1, 12(sp) + c->addiu(a2, r0, 9); // addiu a2, r0, 9 + c->addiu(a3, r0, 22); // addiu a3, r0, 22 + c->load_symbol2(t9, cache.sp_init_fields); // lw t9, sp-init-fields!(s7) + c->daddiu(t0, s7, 4); // daddiu t0, s7, 4 + call_addr = c->gprs[t9].du32[0]; // function call: + // nop // sll r0, r0, 0 + c->jalr(call_addr); // jalr ra, t9 + c->daddiu(a0, s2, 12); // daddiu a0, s2, 12 + c->mov64(a1, v0); // or a1, v0, r0 + c->addiu(a2, r0, 23); // addiu a2, r0, 23 + c->addiu(a3, r0, 52); // addiu a3, r0, 52 + call_addr = c->gprs[t9].du32[0]; // function call: + c->daddiu(t0, s7, 4); // daddiu t0, s7, 4 + c->jalr(call_addr); // jalr ra, t9 + c->sw(v0, 144, sp); // sw v0, 144(sp) + // nop // sll r0, r0, 0 + c->lw(s5, 104, s2); // lw s5, 104(s2) + // nop // sll r0, r0, 0 + c->andi(v1, s5, 8); // andi v1, s5, 8 + // nop // sll r0, r0, 0 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L298 + // nop // sll r0, r0, 0 + if (bc) {goto block_18;} // branch non-likely + + c->ori(s5, s5, 16384); // ori s5, s5, 16384 + // nop // sll r0, r0, 0 + c->sw(s5, 104, s2); // sw s5, 104(s2) + // nop // sll r0, r0, 0 + +block_18: + bc = c->sgpr64(s6) != c->sgpr64(s7); // bne s6, s7, L301 + // nop // sll r0, r0, 0 + if (bc) {goto block_26;} // branch non-likely + + bc = c->sgpr64(s1) == c->sgpr64(s7); // beq s1, s7, L299 + // nop // sll r0, r0, 0 + if (bc) {goto block_24;} // branch non-likely + + c->lw(v1, 12, s1); // lw v1, 12(s1) + bc = c->sgpr64(v1) == c->sgpr64(s7); // beq v1, s7, L299 + // nop // sll r0, r0, 0 + if (bc) {goto block_24;} // branch non-likely + + c->lh(v1, 6, v1); // lh v1, 6(v1) + c->andi(v1, v1, 4); // andi v1, v1, 4 + c->mov64(a0, s5); // or a0, s5, r0 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L299 + c->lb(v1, 28, s1); // lb v1, 28(s1) + if (bc) {goto block_24;} // branch non-likely + + c->andi(a1, a0, 32768); // andi a1, a0, 32768 + // nop // sll r0, r0, 0 + bc = c->sgpr64(a1) != 0; // bne a1, r0, L300 + // nop // sll r0, r0, 0 + if (bc) {goto block_25;} // branch non-likely + + c->andi(a0, a0, 128); // andi a0, a0, 128 + c->addiu(a1, r0, 1); // addiu a1, r0, 1 + c->movn(v1, a1, a0); // movn v1, a1, a0 + // nop // sll r0, r0, 0 + //beq r0, r0, L300 // beq r0, r0, L300 + c->sw(v1, 212, sp); // sw v1, 212(sp) + goto block_25; // branch always + + +block_24: + c->andi(v1, s5, 16384); // andi v1, s5, 16384 + // nop // sll r0, r0, 0 + c->dsra(v1, v1, 14); // dsra v1, v1, 14 + // nop // sll r0, r0, 0 + c->sw(v1, 212, sp); // sw v1, 212(sp) + // nop // sll r0, r0, 0 + +block_25: + c->lwc1(f2, 216, sp); // lwc1 f2, 216(sp) + // nop // sll r0, r0, 0 + c->cvtws(f2, f2); // cvt.w.s f2, f2 + // nop // sll r0, r0, 0 + c->mfc1(v1, f2); // mfc1 v1, f2 + // nop // sll r0, r0, 0 + c->dsll32(v1, v1, 16); // dsll32 v1, v1, 16 + // nop // sll r0, r0, 0 + c->dsra32(v1, v1, 16); // dsra32 v1, v1, 16 + // nop // sll r0, r0, 0 + c->mtc1(f2, v1); // mtc1 f2, v1 + // nop // sll r0, r0, 0 + c->cvtsw(f2, f2); // cvt.s.w f2, f2 + // nop // sll r0, r0, 0 + c->swc1(f2, 216, sp); // swc1 f2, 216(sp) + // nop // sll r0, r0, 0 + +block_26: + c->andi(v1, s5, 128); // andi v1, s5, 128 + c->lqc2(vf4, 224, sp); // lqc2 vf4, 224(sp) + bc = c->sgpr64(v1) != 0; // bne v1, r0, L302 + c->vmini_bc(DEST::xyz, BC::x, vf4, vf4, vf31); // vminix.xyz vf4, vf4, vf31 + if (bc) {goto block_28;} // branch non-likely + + // nop // sll r0, r0, 0 + c->vftoi0(DEST::xyzw, vf4, vf4); // vftoi0.xyzw vf4, vf4 + // nop // sll r0, r0, 0 + c->vitof0(DEST::xyzw, vf4, vf4); // vitof0.xyzw vf4, vf4 + c->addiu(v1, r0, -2); // addiu v1, r0, -2 + c->mov128_gpr_vf(a0, vf4); // qmfc2.i a0, vf4 + c->and_(a0, a0, v1); // and a0, a0, v1 + c->andi(v1, s5, 16384); // andi v1, s5, 16384 + c->sra(v1, v1, 14); // sra v1, v1, 14 + // nop // sll r0, r0, 0 + c->or_(a0, a0, v1); // or a0, a0, v1 + // nop // sll r0, r0, 0 + c->sq(a0, 224, sp); // sq a0, 224(sp) + // nop // sll r0, r0, 0 + +block_28: + c->gprs[v1].du64[0] = vis[14]; // cfc2.i v1, vi14 + c->sb(v1, 129, s2); // sb v1, 129(s2) + bc = c->sgpr64(s1) == c->sgpr64(s7); // beq s1, s7, L303 + c->andi(v1, s5, 64); // andi v1, s5, 64 + if (bc) {goto block_31;} // branch non-likely + + c->lwu(a0, 16, s1); // lwu a0, 16(s1) + c->lwu(a0, 8, a0); // lwu a0, 8(a0) + c->lh(a0, 0, a0); // lh a0, 0(a0) + c->sb(a0, 129, s2); // sb a0, 129(s2) + bc = c->sgpr64(v1) == 0; // beq v1, r0, L303 + c->lw(a0, 192, sp); // lw a0, 192(sp) + if (bc) {goto block_31;} // branch non-likely + + c->load_symbol2(t9, cache.cos); // lw t9, cos(s7) + // nop // sll r0, r0, 0 + call_addr = c->gprs[t9].du32[0]; // function call: + // nop // sll r0, r0, 0 + c->jalr(call_addr); // jalr ra, t9 + c->mov64(a1, v0); // or a1, v0, r0 + c->lw(a0, 192, sp); // lw a0, 192(sp) + c->load_symbol2(t9, cache.sin); // lw t9, sin(s7) + // nop // sll r0, r0, 0 + call_addr = c->gprs[t9].du32[0]; // function call: + // nop // sll r0, r0, 0 + c->jalr(call_addr); // jalr ra, t9 + c->ori(v1, r0, 32768); // ori v1, r0, 32768 + c->dsll(v1, v1, 16); // dsll v1, v1, 16 + c->lw(a0, 200, sp); // lw a0, 200(sp) + c->xor_(a3, v0, v1); // xor a3, v0, v1 + c->sw(a0, 8, s2); // sw a0, 8(s2) + c->gprs[a2].du64[0] = 0; // or a2, r0, r0 + c->lw(t0, 196, sp); // lw t0, 196(sp) + c->load_symbol2(t9, cache.quaternion_axis_angle); // lw t9, quaternion-axis-angle!(s7) + c->daddiu(a0, s2, 80); // daddiu a0, s2, 80 + call_addr = c->gprs[t9].du32[0]; // function call: + // nop // sll r0, r0, 0 + c->jalr(call_addr); // jalr ra, t9 + c->lw(v1, 16, s0); // lw v1, 16(s0) + // nop // sll r0, r0, 0 + c->lw(v1, 0, v1); // lw v1, 0(v1) + // nop // sll r0, r0, 0 + c->sw(v1, 108, s2); // sw v1, 108(s2) + // nop // sll r0, r0, 0 + +block_31: + c->sw(s7, 136, s2); // sw s7, 136(s2) + // nop // sll r0, r0, 0 + bc = c->sgpr64(s0) == c->sgpr64(s7); // beq s0, s7, L307 + // nop // sll r0, r0, 0 + if (bc) {goto block_40;} // branch non-likely + + c->lw(a0, 0, s0); // lw a0, 0(s0) + // nop // sll r0, r0, 0 + c->lw(a1, 24, a0); // lw a1, 24(a0) + // nop // sll r0, r0, 0 + bc = c->sgpr64(a1) == 0; // beq a1, r0, L307 + // nop // sll r0, r0, 0 + if (bc) {goto block_40;} // branch non-likely + + c->lw(a2, 0, s1); // lw a2, 0(s1) + c->daddiu(a3, s1, 108); // daddiu a3, s1, 108 + +block_34: + c->lw(v1, 0, a3); // lw v1, 0(a3) + c->daddiu(a2, a2, -1); // daddiu a2, a2, -1 + c->lw(v1, 0, v1); // lw v1, 0(v1) + // nop // sll r0, r0, 0 + bc = c->sgpr64(v1) != c->sgpr64(a1); // bne v1, a1, L306 + c->lh(v1, 4, a3); // lh v1, 4(a3) + if (bc) {goto block_39;} // branch non-likely + + c->andi(a0, v1, 1); // andi a0, v1, 1 + c->ori(v1, v1, 1); // ori v1, v1, 1 + bc = c->sgpr64(a0) != 0; // bne a0, r0, L306 + // nop // sll r0, r0, 0 + if (bc) {goto block_39;} // branch non-likely + + c->sh(v1, 4, a3); // sh v1, 4(a3) + // nop // sll r0, r0, 0 + c->lw(v1, 0, s2); // lw v1, 0(s2) + // nop // sll r0, r0, 0 + c->sw(v1, 8, a3); // sw v1, 8(a3) + c->mov64(a0, s7); // or a0, s7, r0 + if (((s64)c->sgpr64(s6)) != ((s64)c->sgpr64(s7))) {// bnel s6, s7, L305 + c->lw(a0, 0, s2); // lw a0, 0(s2) + goto block_38; + } + +block_38: + c->sw(a0, 12, a3); // sw a0, 12(a3) + // nop // sll r0, r0, 0 + c->sw(s2, 16, a3); // sw s2, 16(a3) + // nop // sll r0, r0, 0 + c->sw(a3, 136, s2); // sw a3, 136(s2) + // nop // sll r0, r0, 0 + //beq r0, r0, L307 // beq r0, r0, L307 + // nop // sll r0, r0, 0 + goto block_40; // branch always + + +block_39: + bc = c->sgpr64(a2) != 0; // bne a2, r0, L304 + c->daddiu(a3, a3, 48); // daddiu a3, a3, 48 + if (bc) {goto block_34;} // branch non-likely + + +block_40: + c->lw(a2, 144, sp); // lw a2, 144(sp) + c->daddiu(a0, sp, 192); // daddiu a0, sp, 192 + c->lh(v1, 0, a2); // lh v1, 0(a2) + c->mov64(a1, s2); // or a1, s2, r0 + c->load_symbol2(t9, cache.sp_adjust_launch); // lw t9, sp-adjust-launch(s7) + c->daddiu(v1, v1, -64); // daddiu v1, v1, -64 + bc = ((s64)c->sgpr64(v1)) >= 0; // bgez v1, L308 + c->daddiu(a3, sp, 80); // daddiu a3, sp, 80 + if (bc) {goto block_42;} // branch non-likely + + call_addr = c->gprs[t9].du32[0]; // function call: + c->mov64(t0, s6); // or t0, s6, r0 + c->jalr(call_addr); // jalr ra, t9 + +block_42: + bc = c->sgpr64(s6) == c->sgpr64(s7); // beq s6, s7, L309 + // nop // sll r0, r0, 0 + if (bc) {goto block_44;} // branch non-likely + + c->load_symbol2(t9, cache.sp_euler_convert); // lw t9, sp-euler-convert(s7) + c->daddiu(a0, sp, 192); // daddiu a0, sp, 192 + call_addr = c->gprs[t9].du32[0]; // function call: + c->mov64(a1, s2); // or a1, s2, r0 + c->jalr(call_addr); // jalr ra, t9 + +block_44: + bc = c->sgpr64(s0) == c->sgpr64(s7); // beq s0, s7, L310 + // nop // sll r0, r0, 0 + if (bc) {goto block_48;} // branch non-likely + + c->lw(a2, 12, s0); // lw a2, 12(s0) + // nop // sll r0, r0, 0 + bc = c->sgpr64(a2) == c->sgpr64(s7); // beq a2, s7, L310 + c->daddiu(a0, sp, 192); // daddiu a0, sp, 192 + if (bc) {goto block_48;} // branch non-likely + + bc = c->sgpr64(a2) == 0; // beq a2, r0, L310 + c->mov64(a1, s2); // or a1, s2, r0 + if (bc) {goto block_48;} // branch non-likely + + c->load_symbol2(t9, cache.sp_rotate_system); // lw t9, sp-rotate-system(s7) + // nop // sll r0, r0, 0 + call_addr = c->gprs[t9].du32[0]; // function call: + // nop // sll r0, r0, 0 + c->jalr(call_addr); // jalr ra, t9 + +block_48: + c->lqc2(vf4, 192, sp); // lqc2 vf4, 192(sp) + // nop // sll r0, r0, 0 + c->vadd(DEST::xyz, vf4, vf4, vf30); // vadd.xyz vf4, vf4, vf30 + c->lw(a0, 4, s2); // lw a0, 4(s2) + c->lw(a1, 160, sp); // lw a1, 160(sp) + // nop // sll r0, r0, 0 + c->load_symbol2(t9, cache.particle_adgif); // lw t9, particle-adgif(s7) + // nop // sll r0, r0, 0 + c->sqc2(vf4, 192, sp); // sqc2 vf4, 192(sp) + // nop // sll r0, r0, 0 + call_addr = c->gprs[t9].du32[0]; // function call: + // nop // sll r0, r0, 0 + c->jalr(call_addr); // jalr ra, t9 + c->lw(a2, 4, s2); // lw a2, 4(s2) + c->lui(a3, 256); // lui a3, 256 + c->lw(v1, 64, a2); // lw v1, 64(a2) + c->andi(a0, s5, 16); // andi a0, s5, 16 + c->addiu(a1, r0, 66); // addiu a1, r0, 66 + // nop // sll r0, r0, 0 + c->movn(v1, a1, a0); // movn v1, a1, a0 + c->andi(a0, s5, 8); // andi a0, s5, 8 + c->addiu(a1, r0, 72); // addiu a1, r0, 72 + // nop // sll r0, r0, 0 + c->movn(v1, a1, a0); // movn v1, a1, a0 + c->andi(a0, s5, 256); // andi a0, s5, 256 + c->sw(v1, 64, a2); // sw v1, 64(a2) + c->ori(a1, a3, 304); // ori a1, a3, 304 + if (((s64)c->sgpr64(a0)) != ((s64)0)) { // bnel a0, r0, L311 + c->sd(a1, 48, a2); // sd a1, 48(a2) + goto block_50; + } + +block_50: + c->lw(t9, 172, sp); // lw t9, 172(sp) + c->mov64(a1, s2); // or a1, s2, r0 + c->mov64(a0, s3); // or a0, s3, r0 + c->mov64(t0, s0); // or t0, s0, r0 + bc = c->sgpr64(t9) == 0; // beq t9, r0, L312 + c->daddiu(a2, sp, 192); // daddiu a2, sp, 192 + if (bc) {goto block_52;} // branch non-likely + + call_addr = c->gprs[t9].du32[0]; // function call: + c->mov64(a3, s4); // or a3, s4, r0 + c->jalr(call_addr); // jalr ra, t9 + +block_52: + c->lw(a0, 184, sp); // lw a0, 184(sp) + // nop // sll r0, r0, 0 + c->lwc1(f2, 4, s4); // lwc1 f2, 4(s4) + c->lui(a1, 16256); // lui a1, 16256 + bc = c->sgpr64(a0) == 0; // beq a0, r0, L313 + // nop // sll r0, r0, 0 + if (bc) {goto block_55;} // branch non-likely + + c->lwc1(f3, 4, a0); // lwc1 f3, 4(a0) + // nop // sll r0, r0, 0 + c->adds(f2, f2, f3); // add.s f2, f2, f3 + // nop // sll r0, r0, 0 + c->swc1(f2, 4, s4); // swc1 f2, 4(s4) + c->mtc1(f3, a1); // mtc1 f3, a1 + c->subs(f2, f2, f3); // sub.s f2, f2, f3 + // nop // sll r0, r0, 0 + c->mfc1(a1, f2); // mfc1 a1, f2 + // nop // sll r0, r0, 0 + bc = ((s64)c->sgpr64(a1)) < 0; // bltz a1, L313 + c->load_symbol2(t9, cache.new_sound_id); // lw t9, new-sound-id(s7) + if (bc) {goto block_55;} // branch non-likely + + c->sw(a1, 4, s4); // sw a1, 4(s4) + // nop // sll r0, r0, 0 + call_addr = c->gprs[t9].du32[0]; // function call: + // nop // sll r0, r0, 0 + c->jalr(call_addr); // jalr ra, t9 + c->lw(a0, 184, sp); // lw a0, 184(sp) + c->mov64(a1, v0); // or a1, v0, r0 + c->load_symbol2(t9, cache.sound_play_by_spec); // lw t9, sound-play-by-spec(s7) + c->daddiu(a2, sp, 64); // daddiu a2, sp, 64 + call_addr = c->gprs[t9].du32[0]; // function call: + // nop // sll r0, r0, 0 + c->jalr(call_addr); // jalr ra, t9 + +block_55: + c->addiu(a0, r0, 4); // addiu a0, r0, 4 + c->andi(v1, s5, 128); // andi v1, s5, 128 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L314 + c->dsubu(a0, r0, a0); // dsubu a0, r0, a0 + if (bc) {goto block_57;} // branch non-likely + + c->load_symbol2(v1, cache.add_to_sprite_aux_list);// lw v1, add-to-sprite-aux-list(s7) + c->daddiu(a0, a0, -1); // daddiu a0, a0, -1 + // nop // sll r0, r0, 0 + c->and_(s5, s5, a0); // and s5, s5, a0 + c->sw(r0, 236, sp); // sw r0, 236(sp) + // nop // sll r0, r0, 0 + c->sw(r0, 60, s2); // sw r0, 60(s2) + // nop // sll r0, r0, 0 + c->lw(v1, 208, sp); // lw v1, 208(sp) + c->addiu(a0, r0, 3); // addiu a0, r0, 3 + c->pmaxw(v1, v1, a0); // pmaxw v1, v1, a0 + c->addiu(a0, r0, 11); // addiu a0, r0, 11 + c->pminw(v1, v1, a0); // pminw v1, v1, a0 + // nop // sll r0, r0, 0 + c->sw(v1, 208, sp); // sw v1, 208(sp) + // nop // sll r0, r0, 0 + +block_57: + c->addiu(v1, r0, 10); // addiu v1, r0, 10 + c->addiu(a0, r0, 0); // addiu a0, r0, 0 + //beq r0, r0, L318 // beq r0, r0, L318 + // nop // sll r0, r0, 0 + goto block_66; // branch always + + +block_58: + c->addiu(a1, r0, 5424); // addiu a1, r0, 5424 + c->mult3(a1, a1, a0); // mult3 a1, a1, a0 + c->daddiu(a1, a1, 320); // daddiu a1, a1, 320 + c->load_symbol2(a2, cache.level); // lw a2, *level*(s7) + c->daddu(a1, a1, a2); // daddu a1, a1, a2 + c->load_symbol_addr(a2, cache.active); // daddiu a2, s7, active + c->lwu(a3, 16, a1); // lwu a3, 16(a1) + bc = c->sgpr64(a3) != c->sgpr64(a2); // bne a3, a2, L317 + c->mov64(a2, s7); // or a2, s7, r0 + if (bc) {goto block_65;} // branch non-likely + + c->lwu(a2, 44, a1); // lwu a2, 44(a1) + c->slt(a2, s4, a2); // slt a2, s4, a2 + c->daddiu(a3, s7, 4); // daddiu a3, s7, 4 + c->movn(a3, s7, a2); // movn a3, s7, a2 + if (((s64)c->sgpr64(s7)) == ((s64)c->sgpr64(a3))) {// beql s7, a3, L316 + c->mov64(a2, a3); // or a2, a3, r0 + goto block_62; + } + +// block_61: + c->lwu(a2, 48, a1); // lwu a2, 48(a1) + c->slt(a3, s4, a2); // slt a3, s4, a2 + c->daddiu(a2, s7, 4); // daddiu a2, s7, 4 + c->movz(a2, s7, a3); // movz a2, s7, a3 + +block_62: + bc = c->sgpr64(s7) == c->sgpr64(a2); // beq s7, a2, L317 + c->mov64(a2, s7); // or a2, s7, r0 + if (bc) {goto block_65;} // branch non-likely + + c->lw(v1, 12, a1); // lw v1, 12(a1) + c->mov64(s7, s7); // or s7, s7, r0 + //beq r0, r0, L319 // beq r0, r0, L319 + // nop // sll r0, r0, 0 + goto block_68; // branch always + + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + +block_65: + c->daddiu(a0, a0, 1); // daddiu a0, a0, 1 + +block_66: + c->load_symbol2(a1, cache.level); // lw a1, *level*(s7) + c->lw(a1, 0, a1); // lw a1, 0(a1) + c->slt(a1, a0, a1); // slt a1, a0, a1 + bc = c->sgpr64(a1) != 0; // bne a1, r0, L315 + // nop // sll r0, r0, 0 + if (bc) {goto block_58;} // branch non-likely + + c->mov64(a0, s7); // or a0, s7, r0 + +block_68: + c->dsll(v1, v1, 9); // dsll v1, v1, 9 + c->or_(s5, s5, v1); // or s5, s5, v1 + // nop // sll r0, r0, 0 + c->andi(v1, s5, 8320); // andi v1, s5, 8320 + c->addiu(a0, r0, 8192); // addiu a0, r0, 8192 + bc = c->sgpr64(v1) != c->sgpr64(a0); // bne v1, a0, L320 + c->load_symbol2(a0, cache.time_of_day_context); // lw a0, *time-of-day-context*(s7) + if (bc) {goto block_70;} // branch non-likely + + c->lqc2(vf4, 124, a0); // lqc2 vf4, 124(a0) + // nop // sll r0, r0, 0 + c->lqc2(vf5, 224, sp); // lqc2 vf5, 224(sp) + // nop // sll r0, r0, 0 + c->lqc2(vf6, 48, s2); // lqc2 vf6, 48(s2) + // nop // sll r0, r0, 0 + c->vmul(DEST::xyz, vf5, vf5, vf4); // vmul.xyz vf5, vf5, vf4 + // nop // sll r0, r0, 0 + c->vmul(DEST::xyz, vf6, vf6, vf4); // vmul.xyz vf6, vf6, vf4 + // nop // sll r0, r0, 0 + c->sqc2(vf5, 224, sp); // sqc2 vf5, 224(sp) + // nop // sll r0, r0, 0 + //beq r0, r0, L321 // beq r0, r0, L321 + c->sqc2(vf6, 48, s2); // sqc2 vf6, 48(s2) + goto block_72; // branch always + + +block_70: + // nop // sll r0, r0, 0 + c->andi(v1, s5, 128); // andi v1, s5, 128 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L321 + c->lqc2(vf5, 224, sp); // lqc2 vf5, 224(sp) + if (bc) {goto block_72;} // branch non-likely + + c->lqc2(vf6, 48, s2); // lqc2 vf6, 48(s2) + // nop // sll r0, r0, 0 + c->sqc2(vf5, 224, sp); // sqc2 vf5, 224(sp) + // nop // sll r0, r0, 0 + c->sqc2(vf6, 48, s2); // sqc2 vf6, 48(s2) + // nop // sll r0, r0, 0 + +block_72: + c->mov64(v1, s1); // or v1, s1, r0 + c->dsubu(a0, s1, s7); // dsubu a0, s1, s7 + c->movz(v1, r0, a0); // movz v1, r0, a0 + // nop // sll r0, r0, 0 + c->sw(v1, 132, s2); // sw v1, 132(s2) + // nop // sll r0, r0, 0 + c->lw(v1, 0, s2); // lw v1, 0(s2) + // nop // sll r0, r0, 0 + c->lqc2(vf4, 192, sp); // lqc2 vf4, 192(sp) + // nop // sll r0, r0, 0 + c->lqc2(vf5, 208, sp); // lqc2 vf5, 208(sp) + // nop // sll r0, r0, 0 + c->lqc2(vf6, 224, sp); // lqc2 vf6, 224(sp) + // nop // sll r0, r0, 0 + c->sqc2(vf4, 0, v1); // sqc2 vf4, 0(v1) + // nop // sll r0, r0, 0 + c->sqc2(vf5, 16, v1); // sqc2 vf5, 16(v1) + // nop // sll r0, r0, 0 + c->vsub_bc(DEST::w, BC::w, vf6, vf0, vf0); // vsubw.w vf6, vf0, vf0 + // nop // sll r0, r0, 0 + c->sqc2(vf6, 32, v1); // sqc2 vf6, 32(v1) + // nop // sll r0, r0, 0 + c->ori(s5, s5, 32); // ori s5, s5, 32 + c->lw(a0, 236, sp); // lw a0, 236(sp) + c->sw(s5, 104, s2); // sw s5, 104(s2) + // nop // sll r0, r0, 0 + c->sw(a0, 124, s2); // sw a0, 124(s2) + // nop // sll r0, r0, 0 + bc = c->sgpr64(s0) == c->sgpr64(s7); // beq s0, s7, L322 + c->lui(v1, 16256); // lui v1, 16256 + if (bc) {goto block_75;} // branch non-likely + + c->lwc1(f2, 24, s0); // lwc1 f2, 24(s0) + c->mtc1(f3, v1); // mtc1 f3, v1 + c->subs(f2, f2, f3); // sub.s f2, f2, f3 + // nop // sll r0, r0, 0 + c->swc1(f2, 24, s0); // swc1 f2, 24(s0) + c->cvtws(f2, f2); // cvt.w.s f2, f2 + c->mfc1(v1, f2); // mfc1 v1, f2 + // nop // sll r0, r0, 0 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L296 + // nop // sll r0, r0, 0 + if (bc) {goto block_12;} // branch non-likely + + //beq r0, r0, L323 // beq r0, r0, L323 + // nop // sll r0, r0, 0 + goto block_76; // branch always + + +block_75: + c->lwc1(f2, 0, s4); // lwc1 f2, 0(s4) + c->mtc1(f3, v1); // mtc1 f3, v1 + c->subs(f2, f2, f3); // sub.s f2, f2, f3 + // nop // sll r0, r0, 0 + c->swc1(f2, 0, s4); // swc1 f2, 0(s4) + c->cvtws(f2, f2); // cvt.w.s f2, f2 + c->mfc1(v1, f2); // mfc1 v1, f2 + // nop // sll r0, r0, 0 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L296 + // nop // sll r0, r0, 0 + if (bc) {goto block_12;} // branch non-likely + + +block_76: + c->lw(ra, 0, sp); // lw ra, 0(sp) + // nop // sll r0, r0, 0 + c->lq(s0, 16, sp); // lq s0, 16(sp) + // nop // sll r0, r0, 0 + c->lq(s1, 32, sp); // lq s1, 32(sp) + // nop // sll r0, r0, 0 + c->lq(s2, 48, sp); // lq s2, 48(sp) + // nop // sll r0, r0, 0 + c->lq(s3, 240, sp); // lq s3, 240(sp) + // nop // sll r0, r0, 0 + c->lq(s4, 256, sp); // lq s4, 256(sp) + // nop // sll r0, r0, 0 + c->lq(s5, 272, sp); // lq s5, 272(sp) + // nop // sll r0, r0, 0 + c->lq(s6, 288, sp); // lq s6, 288(sp) + // nop // sll r0, r0, 0 + //jr ra // jr ra + c->daddiu(sp, sp, 304); // daddiu sp, sp, 304 + 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.level = intern_from_c(-1, 0, "*level*").c(); + cache.sp_launcher_enable = intern_from_c(-1, 0, "*sp-launcher-enable*").c(); + cache.sp_launcher_lock = intern_from_c(-1, 0, "*sp-launcher-lock*").c(); + cache.time_of_day_context = intern_from_c(-1, 0, "*time-of-day-context*").c(); + cache.active = intern_from_c(-1, 0, "active").c(); + cache.add_to_sprite_aux_list = intern_from_c(-1, 0, "add-to-sprite-aux-list").c(); + cache.cos = intern_from_c(-1, 0, "cos").c(); + cache.new_sound_id = intern_from_c(-1, 0, "new-sound-id").c(); + cache.particle_adgif = intern_from_c(-1, 0, "particle-adgif").c(); + cache.quaternion_axis_angle = intern_from_c(-1, 0, "quaternion-axis-angle!").c(); + cache.sin = intern_from_c(-1, 0, "sin").c(); + cache.sound_play_by_spec = intern_from_c(-1, 0, "sound-play-by-spec").c(); + cache.sp_adjust_launch = intern_from_c(-1, 0, "sp-adjust-launch").c(); + cache.sp_euler_convert = intern_from_c(-1, 0, "sp-euler-convert").c(); + cache.sp_get_particle = intern_from_c(-1, 0, "sp-get-particle").c(); + cache.sp_init_fields = intern_from_c(-1, 0, "sp-init-fields!").c(); + cache.sp_queue_launch = intern_from_c(-1, 0, "sp-queue-launch").c(); + cache.sp_rotate_system = intern_from_c(-1, 0, "sp-rotate-system").c(); + gLinkedFunctionTable.reg("sp-launch-particles-var", execute, 512); +} + +} // namespace sp_launch_particles_var +} // 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 sparticle_motion_blur { +struct Cache { + void* math_camera; // *math-camera* + void* atan; // atan +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + bool cop1_bc = false; + uint32_t Clipping = 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(s3, a1); // or s3, a1, r0 + c->mov64(gp, a2); // or gp, a2, r0 + c->ori(a0, r0, 65535); // ori a0, r0, 65535 + c->load_symbol2(v1, cache.math_camera); // lw v1, *math-camera*(s7) + c->dsll32(a1, a0, 16); // dsll32 a1, a0, 16 + c->lq(a0, 16, s3); // lq a0, 16(s3) + c->lqc2(vf1, 0, gp); // lqc2 vf1, 0(gp) + c->pceqw(a2, a0, r0); // pceqw a2, a0, r0 + c->lqc2(vf24, 572, v1); // lqc2 vf24, 572(v1) + c->ppach(a2, r0, a2); // ppach a2, r0, a2 + c->lqc2(vf25, 588, v1); // lqc2 vf25, 588(v1) + c->or_(a1, a2, a1); // or a1, a2, a1 + c->lqc2(vf26, 604, v1); // lqc2 vf26, 604(v1) + c->daddiu(a1, a1, 1); // daddiu a1, a1, 1 + c->lqc2(vf27, 620, v1); // lqc2 vf27, 620(v1) + bc = c->sgpr64(a1) == 0; // beq a1, r0, L72 + c->mov128_vf_gpr(vf4, a0); // qmtc2.i vf4, a0 + if (bc) {goto block_5;} // branch non-likely + + c->lui(a0, 16896); // lui a0, 16896 + c->lqc2(vf30, 812, v1); // lqc2 vf30, 812(v1) + c->lqc2(vf29, 780, v1); // lqc2 vf29, 780(v1) + c->vmula_bc(DEST::xyzw, BC::x, vf24, vf1); // vmulax.xyzw acc, vf24, vf1 + c->vmadda_bc(DEST::xyzw, BC::y, vf25, vf1); // vmadday.xyzw acc, vf25, vf1 + c->vmadda_bc(DEST::xyzw, BC::z, vf26, vf1); // vmaddaz.xyzw acc, vf26, vf1 + c->vmadd_bc(DEST::xyzw, BC::w, vf10, vf27, vf0); // vmaddw.xyzw vf10, vf27, vf0 + c->mov128_vf_gpr(vf5, a0); // qmtc2.i vf5, a0 + c->vmul(DEST::xyzw, vf12, vf10, vf29); // vmul.xyzw vf12, vf10, vf29 + c->vmula_bc(DEST::xyzw, BC::w, vf1, vf0); // vmulaw.xyzw acc, vf1, vf0 + c->vmadd_bc(DEST::xyzw, BC::x, vf1, vf4, vf5); // vmaddx.xyzw vf1, vf4, vf5 + c->vdiv(vf0, BC::w, vf12, BC::w); // vdiv Q, vf0.w, vf12.w + Clipping = c->clip(vf12, vf12, Clipping); // Unknown instr: vclip.xyz vf12, vf12 + c->vmula_bc(DEST::xyzw, BC::x, vf24, vf1); // vmulax.xyzw acc, vf24, vf1 + c->vmadda_bc(DEST::xyzw, BC::y, vf25, vf1); // vmadday.xyzw acc, vf25, vf1 + c->vmadda_bc(DEST::xyzw, BC::z, vf26, vf1); // vmaddaz.xyzw acc, vf26, vf1 + c->vmadd_bc(DEST::xyzw, BC::w, vf11, vf27, vf0); // vmaddw.xyzw vf11, vf27, vf0 + c->vwaitq(); // vwaitq + c->gprs[v1].du64[0] = Clipping; // cfc2.i v1, Clipping + c->vmulq(DEST::xyz, vf10, vf10); // vmulq.xyz vf10, vf10, Q + c->vmul(DEST::xyzw, vf13, vf11, vf29); // vmul.xyzw vf13, vf11, vf29 + c->andi(v1, v1, 63); // andi v1, v1, 63 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L72 + c->vadd(DEST::xyzw, vf10, vf10, vf30); // vadd.xyzw vf10, vf10, vf30 + if (bc) {goto block_5;} // branch non-likely + + c->vdiv(vf0, BC::w, vf13, BC::w); // vdiv Q, vf0.w, vf13.w + Clipping = c->clip(vf13, vf13, Clipping); // Unknown instr: vclip.xyz vf13, vf13 + c->vmax_bc(DEST::w, BC::x, vf10, vf10, vf0); // vmaxx.w vf10, vf10, vf0 + c->vftoi4(DEST::xyzw, vf2, vf10); // vftoi4.xyzw vf2, vf10 + c->vwaitq(); // vwaitq + c->vmulq(DEST::xyz, vf11, vf11); // vmulq.xyz vf11, vf11, Q + c->gprs[v1].du64[0] = Clipping; // cfc2.i v1, Clipping + c->vitof0(DEST::xyzw, vf6, vf2); // vitof0.xyzw vf6, vf2 + c->vadd(DEST::xyzw, vf11, vf11, vf30); // vadd.xyzw vf11, vf11, vf30 + c->andi(v1, v1, 63); // andi v1, v1, 63 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L72 + c->vdiv(vf0, BC::w, vf6, BC::z); // vdiv Q, vf0.w, vf6.z + if (bc) {goto block_5;} // branch non-likely + + c->vmax_bc(DEST::w, BC::x, vf11, vf11, vf0); // vmaxx.w vf11, vf11, vf0 + c->vadd_bc(DEST::x, BC::w, vf9, vf0, vf0); // vaddw.x vf9, vf0, vf0 + c->vftoi4(DEST::xyzw, vf3, vf11); // vftoi4.xyzw vf3, vf11 + c->vitof0(DEST::xyzw, vf7, vf3); // vitof0.xyzw vf7, vf3 + c->vsub(DEST::xy, vf8, vf7, vf6); // vsub.xy vf8, vf7, vf6 + c->mov128_gpr_vf(s4, vf8); // qmfc2.i s4, vf8 + c->dsra32(s5, s4, 0); // dsra32 s5, s4, 0 + c->vmulq(DEST::x, vf9, vf9); // vmulq.x vf9, vf9, Q + c->load_symbol2(t9, cache.atan); // lw t9, atan(s7) + c->mov64(a0, s4); // or a0, s4, r0 + c->mov64(a1, s5); // or a1, s5, r0 + call_addr = c->gprs[t9].du32[0]; // function call: + c->sll(v0, ra, 0); // sll v0, ra, 0 + c->jalr(call_addr); // jalr ra, t9 + c->mov64(a0, v0); // or a0, v0, r0 + c->lw(v1, 12, s3); // lw v1, 12(s3) + c->lui(a1, -14720); // lui a1, -14720 + c->mtc1(f0, a1); // mtc1 f0, a1 + c->mtc1(f1, a0); // mtc1 f1, a0 + c->adds(f0, f0, f1); // add.s f0, f0, f1 + c->swc1(f0, 24, gp); // swc1 f0, 24(gp) + bc = c->sgpr64(v1) == 0; // beq v1, r0, L73 + c->mov128_gpr_vf(a0, vf9); // qmfc2.i a0, vf9 + if (bc) {goto block_7;} // branch non-likely + + c->mtc1(f2, a0); // mtc1 f2, a0 + c->lui(a0, 16256); // lui a0, 16256 + c->mtc1(f1, r0); // mtc1 f1, r0 + c->lui(a1, 13702); // lui a1, 13702 + c->ori(a1, a1, 14269); // ori a1, a1, 14269 + c->lui(a2, 13337); // lui a2, 13337 + c->ori(a2, a2, 25670); // ori a2, a2, 25670 + c->mtc1(f0, a0); // mtc1 f0, a0 + c->mtc1(f3, a1); // mtc1 f3, a1 + c->mtc1(f4, a2); // mtc1 f4, a2 + c->subs(f2, f2, f3); // sub.s f2, f2, f3 + c->subs(f3, f4, f3); // sub.s f3, f4, f3 + c->divs(f2, f2, f3); // div.s f2, f2, f3 + c->mtc1(f3, s4); // mtc1 f3, s4 + c->mtc1(f4, s5); // mtc1 f4, s5 + // Unknown instr: mula.s f3, f3 + // Unknown instr: madd.s f3, f4, f4 + { + float f3 = c->fprs[3]; + float f4 = c->fprs[4]; + c->fprs[3] = (f3 * f3) + (f4 * f4); + } + c->maxs(f2, f2, f1); // max.s f2, f2, f1 + c->sqrts(f1, f3); // sqrt.s f1, f3 + c->mins(f2, f2, f0); // min.s f2, f2, f0 + c->lui(a0, 16448); // lui a0, 16448 + c->subs(f0, f0, f2); // sub.s f0, f0, f2 + c->lui(a1, 16000); // lui a1, 16000 + c->mtc1(f3, a0); // mtc1 f3, a0 + c->mtc1(f5, a1); // mtc1 f5, a1 + c->mtc1(f4, v1); // mtc1 f4, v1 + // Unknown instr: mula.s f0, f3 + // Unknown instr: madd.s f0, f2, f5 + { + float f0 = c->fprs[0]; + float f2 = c->fprs[2]; + float f3 = c->fprs[3]; + float f5 = c->fprs[5]; + c->fprs[0] = (f0 * f3) + (f2 * f5); + } + c->muls(f0, f0, f1); // mul.s f0, f0, f1 + c->muls(f0, f0, f4); // mul.s f0, f0, f4 + //beq r0, r0, L73 // beq r0, r0, L73 + c->swc1(f0, 12, gp); // swc1 f0, 12(gp) + goto block_7; // branch always + + +block_5: + c->lwc1(f0, 12, s3); // lwc1 f0, 12(s3) + c->mtc1(f1, r0); // mtc1 f1, r0 + cop1_bc = c->fprs[f0] == c->fprs[f1]; // c.eq.s f0, f1 + bc = cop1_bc; // bc1t L73 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_7;} // branch non-likely + + c->mtc1(f0, r0); // mtc1 f0, r0 + c->swc1(f0, 12, gp); // swc1 f0, 12(gp) + c->mfc1(v1, f0); // mfc1 v1, f0 + +block_7: + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + 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.math_camera = intern_from_c(-1, 0, "*math-camera*").c(); + cache.atan = intern_from_c(-1, 0, "atan").c(); + gLinkedFunctionTable.reg("sparticle-motion-blur", execute, 128); +} + +} // namespace sparticle_motion_blur +} // namespace Mips2C \ No newline at end of file diff --git a/game/mips2c/jak3_functions/spatial_hash.cpp b/game/mips2c/jak3_functions/spatial_hash.cpp new file mode 100644 index 0000000000..0010e2b156 --- /dev/null +++ b/game/mips2c/jak3_functions/spatial_hash.cpp @@ -0,0 +1,2566 @@ +// cppcheck-suppress-file unusedLabels +//--------------------------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_18_grid_hash { +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->lh(v1, 10, a0); // lh v1, 10(a0) + c->lb(a3, 24, a0); // lb a3, 24(a0) + c->mult3(a3, a3, v1); // mult3 a3, a3, v1 + c->lb(t0, 26, a0); // lb t0, 26(a0) + c->mult3(t0, t0, a3); // mult3 t0, t0, a3 + c->addiu(t1, r0, 1); // addiu t1, r0, 1 + c->lb(t2, 0, a1); // lb t2, 0(a1) + c->dsubu(t1, t1, t2); // dsubu t1, t1, t2 + c->lb(t2, 3, a1); // lb t2, 3(a1) + c->daddu(t1, t1, t2); // daddu t1, t1, t2 + c->addiu(t2, r0, 1); // addiu t2, r0, 1 + c->lb(t3, 2, a1); // lb t3, 2(a1) + c->dsubu(t2, t2, t3); // dsubu t2, t2, t3 + c->lb(t3, 5, a1); // lb t3, 5(a1) + c->daddu(t2, t2, t3); // daddu t2, t2, t3 + c->addiu(t3, r0, 1); // addiu t3, r0, 1 + c->lb(t4, 1, a1); // lb t4, 1(a1) + c->dsubu(t3, t3, t4); // dsubu t3, t3, t4 + c->lb(t4, 4, a1); // lb t4, 4(a1) + c->daddu(t3, t3, t4); // daddu t3, t3, t4 + c->lb(t4, 0, a1); // lb t4, 0(a1) + c->mult3(t4, t4, v1); // mult3 t4, t4, v1 + c->lb(t5, 1, a1); // lb t5, 1(a1) + c->mult3(t5, t5, t0); // mult3 t5, t5, t0 + c->daddu(t4, t4, t5); // daddu t4, t4, t5 + c->lb(a1, 2, a1); // lb a1, 2(a1) + c->mult3(a1, a1, a3); // mult3 a1, a1, a3 + c->daddu(a1, t4, a1); // daddu a1, t4, a1 + c->dsra(t4, a2, 3); // dsra t4, a2, 3 + c->daddu(a1, a1, t4); // daddu a1, a1, t4 + c->daddu(a1, r0, a1); // daddu a1, r0, a1 + c->lwu(a0, 28, a0); // lwu a0, 28(a0) + c->daddu(a0, a1, a0); // daddu a0, a1, a0 + c->addiu(a1, r0, 1); // addiu a1, r0, 1 + c->andi(a2, a2, 7); // andi a2, a2, 7 + if (((s64)c->sgpr64(a2)) >= 0) { // bgezl a2, L191 + c->dsllv(a1, a1, a2); // dsllv a1, a1, a2 + goto block_3; + } + +// block_2: + c->dsubu(a2, r0, a2); // dsubu a2, r0, a2 + c->dsrav(a1, a1, a2); // dsrav a1, a1, a2 + +block_3: + c->mov64(a2, t3); // or a2, t3, r0 + // nop // sll r0, r0, 0 + +block_4: + c->mov64(t3, t2); // or t3, t2, r0 + c->mov64(t4, a0); // or t4, a0, r0 + +block_5: + c->mov64(t5, t1); // or t5, t1, r0 + c->mov64(t6, t4); // or t6, t4, r0 + +block_6: + // nop // sll r0, r0, 0 + c->lbu(t7, 0, t6); // lbu t7, 0(t6) + // nop // sll r0, r0, 0 + c->or_(t7, t7, a1); // or t7, t7, a1 + c->daddiu(t5, t5, -1); // daddiu t5, t5, -1 + c->sb(t7, 0, t6); // sb t7, 0(t6) + bc = c->sgpr64(t5) != 0; // bne t5, r0, L194 + c->daddu(t6, t6, v1); // daddu t6, t6, v1 + if (bc) {goto block_6;} // branch non-likely + + c->daddiu(t3, t3, -1); // daddiu t3, t3, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t3) != 0; // bne t3, r0, L193 + c->daddu(t4, t4, a3); // daddu t4, t4, a3 + if (bc) {goto block_5;} // branch non-likely + + c->daddiu(a2, a2, -1); // daddiu a2, a2, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(a2) != 0; // bne a2, r0, L192 + c->daddu(a0, a0, t0); // daddu a0, a0, t0 + if (bc) {goto block_4;} // 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 18 grid-hash)", execute, 128); +} + +} // namespace method_18_grid_hash +} // 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_19_grid_hash { +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->lh(v1, 10, a0); // lh v1, 10(a0) + c->lb(a3, 24, a0); // lb a3, 24(a0) + c->mult3(a3, a3, v1); // mult3 a3, a3, v1 + c->lb(t0, 26, a0); // lb t0, 26(a0) + c->mult3(t0, t0, a3); // mult3 t0, t0, a3 + c->addiu(t1, r0, 1); // addiu t1, r0, 1 + c->lb(t2, 0, a1); // lb t2, 0(a1) + c->dsubu(t1, t1, t2); // dsubu t1, t1, t2 + c->lb(t2, 3, a1); // lb t2, 3(a1) + c->daddu(t1, t1, t2); // daddu t1, t1, t2 + c->addiu(t2, r0, 1); // addiu t2, r0, 1 + c->lb(t3, 2, a1); // lb t3, 2(a1) + c->dsubu(t2, t2, t3); // dsubu t2, t2, t3 + c->lb(t3, 5, a1); // lb t3, 5(a1) + c->daddu(t2, t2, t3); // daddu t2, t2, t3 + c->addiu(t3, r0, 1); // addiu t3, r0, 1 + c->lb(t4, 1, a1); // lb t4, 1(a1) + c->dsubu(t3, t3, t4); // dsubu t3, t3, t4 + c->lb(t4, 4, a1); // lb t4, 4(a1) + c->daddu(t3, t3, t4); // daddu t3, t3, t4 + c->lb(t4, 0, a1); // lb t4, 0(a1) + c->mult3(t4, t4, v1); // mult3 t4, t4, v1 + c->lb(t5, 1, a1); // lb t5, 1(a1) + c->mult3(t5, t5, t0); // mult3 t5, t5, t0 + c->daddu(t4, t4, t5); // daddu t4, t4, t5 + c->lb(a1, 2, a1); // lb a1, 2(a1) + c->mult3(a1, a1, a3); // mult3 a1, a1, a3 + c->daddu(a1, t4, a1); // daddu a1, t4, a1 + c->dsra(t4, a2, 3); // dsra t4, a2, 3 + c->daddu(a1, a1, t4); // daddu a1, a1, t4 + c->daddu(a1, r0, a1); // daddu a1, r0, a1 + c->lwu(a0, 28, a0); // lwu a0, 28(a0) + c->daddu(a0, a1, a0); // daddu a0, a1, a0 + c->addiu(a1, r0, 1); // addiu a1, r0, 1 + c->andi(a2, a2, 7); // andi a2, a2, 7 + if (((s64)c->sgpr64(a2)) >= 0) { // bgezl a2, L186 + c->dsllv(a1, a1, a2); // dsllv a1, a1, a2 + goto block_3; + } + +// block_2: + c->dsubu(a2, r0, a2); // dsubu a2, r0, a2 + c->dsrav(a1, a1, a2); // dsrav a1, a1, a2 + +block_3: + c->nor(a1, a1, r0); // nor a1, a1, r0 + c->mov64(a2, t3); // or a2, t3, r0 + +block_4: + c->mov64(t3, t2); // or t3, t2, r0 + c->mov64(t4, a0); // or t4, a0, r0 + +block_5: + c->mov64(t5, t1); // or t5, t1, r0 + c->mov64(t6, t4); // or t6, t4, r0 + +block_6: + // nop // sll r0, r0, 0 + c->lbu(t7, 0, t6); // lbu t7, 0(t6) + // nop // sll r0, r0, 0 + c->and_(t7, t7, a1); // and t7, t7, a1 + c->daddiu(t5, t5, -1); // daddiu t5, t5, -1 + c->sb(t7, 0, t6); // sb t7, 0(t6) + bc = c->sgpr64(t5) != 0; // bne t5, r0, L189 + c->daddu(t6, t6, v1); // daddu t6, t6, v1 + if (bc) {goto block_6;} // branch non-likely + + c->daddiu(t3, t3, -1); // daddiu t3, t3, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t3) != 0; // bne t3, r0, L188 + c->daddu(t4, t4, a3); // daddu t4, t4, a3 + if (bc) {goto block_5;} // branch non-likely + + c->daddiu(a2, a2, -1); // daddiu a2, a2, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(a2) != 0; // bne a2, r0, L187 + c->daddu(a0, a0, t0); // daddu a0, a0, t0 + if (bc) {goto block_4;} // 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 19 grid-hash)", execute, 128); +} + +} // namespace method_19_grid_hash +} // 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_20_grid_hash { +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->daddiu(sp, sp, -48); // daddiu sp, sp, -48 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s5, 16, sp); // sq s5, 16(sp) + c->sq(gp, 32, sp); // sq gp, 32(sp) + c->lh(v1, 10, a0); // lh v1, 10(a0) + c->lb(a3, 24, a0); // lb a3, 24(a0) + c->mult3(a3, v1, a3); // mult3 a3, v1, a3 + c->lb(t0, 26, a0); // lb t0, 26(a0) + c->mult3(t0, a3, t0); // mult3 t0, a3, t0 + c->lb(t1, 3, a1); // lb t1, 3(a1) + c->lb(t2, 0, a1); // lb t2, 0(a1) + c->dsubu(t1, t1, t2); // dsubu t1, t1, t2 + c->lb(t2, 5, a1); // lb t2, 5(a1) + c->lb(t3, 2, a1); // lb t3, 2(a1) + c->dsubu(t2, t2, t3); // dsubu t2, t2, t3 + c->lb(t3, 4, a1); // lb t3, 4(a1) + c->lb(t4, 1, a1); // lb t4, 1(a1) + c->dsubu(t3, t3, t4); // dsubu t3, t3, t4 + c->lb(t4, 0, a1); // lb t4, 0(a1) + c->mult3(t4, t4, v1); // mult3 t4, t4, v1 + c->lb(t5, 1, a1); // lb t5, 1(a1) + c->mult3(t5, t5, t0); // mult3 t5, t5, t0 + c->daddu(t4, t4, t5); // daddu t4, t4, t5 + c->lb(a1, 2, a1); // lb a1, 2(a1) + c->mult3(a1, a1, a3); // mult3 a1, a1, a3 + c->daddu(a1, t4, a1); // daddu a1, t4, a1 + c->daddu(a1, r0, a1); // daddu a1, r0, a1 + c->lwu(a0, 28, a0); // lwu a0, 28(a0) + c->daddu(a0, a1, a0); // daddu a0, a1, a0 + c->sq(r0, 0, a2); // sq r0, 0(a2) + c->sq(r0, 16, a2); // sq r0, 16(a2) + c->mov64(a1, t3); // or a1, t3, r0 + // nop // sll r0, r0, 0 + +block_1: + c->mov64(t3, t2); // or t3, t2, r0 + c->mov64(t4, a0); // or t4, a0, r0 + +block_2: + c->mov64(t5, t1); // or t5, t1, r0 + c->mov64(t6, t4); // or t6, t4, r0 + +block_3: + c->slti(t8, v1, 9); // slti t8, v1, 9 + c->mov64(t7, v1); // or t7, v1, r0 + bc = c->sgpr64(t8) != 0; // bne t8, r0, L183 + c->mov64(t8, a2); // or t8, a2, r0 + if (bc) {goto block_6;} // branch non-likely + + +block_4: + c->mov64(ra, t8); // or ra, t8, r0 + c->ldr(t9, 0, t6); // ldr t9, 0(t6) + c->daddiu(t8, t8, 8); // daddiu t8, t8, 8 + c->ldl(t9, 7, t6); // ldl t9, 7(t6) + c->daddiu(t7, t7, -8); // daddiu t7, t7, -8 + c->ld(s5, 0, ra); // ld s5, 0(ra) + c->slti(gp, t7, 8); // slti gp, t7, 8 + c->or_(t9, s5, t9); // or t9, s5, t9 + c->daddiu(t6, t6, 8); // daddiu t6, t6, 8 + c->sd(t9, 0, ra); // sd t9, 0(ra) + bc = c->sgpr64(gp) == 0; // beq gp, r0, L182 + c->gprs[t9].du64[0] = 0; // or t9, r0, r0 + if (bc) {goto block_4;} // branch non-likely + + bc = c->sgpr64(t7) == 0; // beq t7, r0, L184 + // nop // sll r0, r0, 0 + if (bc) {goto block_7;} // branch non-likely + + +block_6: + // nop // sll r0, r0, 0 + c->ld(ra, 0, t8); // ld ra, 0(t8) + // nop // sll r0, r0, 0 + c->ldr(t9, 0, t6); // ldr t9, 0(t6) + // nop // sll r0, r0, 0 + c->ldl(t9, 7, t6); // ldl t9, 7(t6) + c->daddu(t6, t6, t7); // daddu t6, t6, t7 + c->or_(t7, ra, t9); // or t7, ra, t9 + // nop // sll r0, r0, 0 + c->sd(t7, 0, t8); // sd t7, 0(t8) + +block_7: + bc = ((s64)c->sgpr64(t5)) > 0; // bgtz t5, L181 + c->daddiu(t5, t5, -1); // daddiu t5, t5, -1 + if (bc) {goto block_3;} // branch non-likely + + c->daddu(t4, t4, a3); // daddu t4, t4, a3 + // nop // sll r0, r0, 0 + bc = ((s64)c->sgpr64(t3)) > 0; // bgtz t3, L180 + c->daddiu(t3, t3, -1); // daddiu t3, t3, -1 + if (bc) {goto block_2;} // branch non-likely + + c->daddu(a0, a0, t0); // daddu a0, a0, t0 + // nop // sll r0, r0, 0 + bc = ((s64)c->sgpr64(a1)) > 0; // bgtz a1, L179 + c->daddiu(a1, a1, -1); // daddiu a1, a1, -1 + if (bc) {goto block_1;} // branch non-likely + + c->mov64(v0, a2); // or v0, a2, r0 + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 32, sp); // lq gp, 32(sp) + c->lq(s5, 16, sp); // lq s5, 16(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 48); // daddiu sp, sp, 48 + 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() { + gLinkedFunctionTable.reg("(method 20 grid-hash)", execute, 128); +} + +} // namespace method_20_grid_hash +} // 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_22_grid_hash { +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + // bool bc = false; + u32 call_addr = 0; + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + c->lq(v1, 0, a2); // lq v1, 0(a2) + c->mov128_vf_gpr(vf1, v1); // qmtc2.i vf1, v1 + c->lq(v1, 12, a0); // lq v1, 12(a0) + c->mov128_vf_gpr(vf5, v1); // qmtc2.i vf5, v1 + c->vsub_bc(DEST::xyzw, BC::w, vf3, vf1, vf1); // vsubw.xyzw vf3, vf1, vf1 + c->vadd_bc(DEST::xyzw, BC::w, vf2, vf1, vf1); // vaddw.xyzw vf2, vf1, vf1 + c->lq(v1, 28, a0); // lq v1, 28(a0) + c->mov128_vf_gpr(vf4, v1); // qmtc2.i vf4, v1 + c->vmr32(DEST::xyzw, vf4, vf4); // vmr32.xyzw vf4, vf4 + c->vsub(DEST::xyzw, vf6, vf3, vf4); // vsub.xyzw vf6, vf3, vf4 + c->vsub(DEST::xyzw, vf7, vf2, vf4); // vsub.xyzw vf7, vf2, vf4 + c->vmul(DEST::xyzw, vf6, vf6, vf5); // vmul.xyzw vf6, vf6, vf5 + c->vmul(DEST::xyzw, vf7, vf7, vf5); // vmul.xyzw vf7, vf7, vf5 + c->vftoi0(DEST::xyz, vf6, vf6); // vftoi0.xyz vf6, vf6 + c->vftoi0(DEST::xyz, vf7, vf7); // vftoi0.xyz vf7, vf7 + c->nor(v1, r0, r0); // nor v1, r0, r0 + c->lw(a0, 24, a0); // lw a0, 24(a0) + c->sll(a2, a0, 8); // sll a2, a0, 8 + c->lui(a0, 1); // lui a0, 1 + c->srl(a2, a2, 8); // srl a2, a2, 8 + c->ori(a0, a0, 257); // ori a0, a0, 257 + c->dsubu(a0, a2, a0); // dsubu a0, a2, a0 + // nop // sll r0, r0, 0 + c->pextlb(a0, r0, a0); // pextlb a0, r0, a0 + // nop // sll r0, r0, 0 + c->pextlh(a0, r0, a0); // pextlh a0, r0, a0 + // nop // sll r0, r0, 0 + c->mov128_gpr_vf(a3, vf6); // qmfc2.i a3, vf6 + c->mov128_gpr_vf(a2, vf7); // qmfc2.i a2, vf7 + c->pmaxw(a3, a3, r0); // pmaxw a3, a3, r0 + c->pmaxw(a2, a2, r0); // pmaxw a2, a2, r0 + c->pminw(a3, a3, a0); // pminw a3, a3, a0 + c->pminw(a0, a2, a0); // pminw a0, a2, a0 + c->ppach(a2, r0, a3); // ppach a2, r0, a3 + c->ppach(a3, r0, a0); // ppach a3, r0, a0 + c->ppacb(a0, r0, a2); // ppacb a0, r0, a2 + c->ppacb(a2, r0, a3); // ppacb a2, r0, a3 + c->dsll(a2, a2, 24); // dsll a2, a2, 24 + c->or_(a0, a0, a2); // or a0, a0, a2 + c->dsll32(v1, v1, 16); // dsll32 v1, v1, 16 + c->ld(a2, 0, a1); // ld a2, 0(a1) + c->and_(v1, a2, v1); // and v1, a2, v1 + c->or_(v1, v1, a0); // or v1, v1, a0 + c->sd(v1, 0, a1); // sd v1, 0(a1) + 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: + return c->gprs[v0].du64[0]; +} + +void link() { + gLinkedFunctionTable.reg("(method 22 grid-hash)", execute, 128); +} + +} // namespace method_22_grid_hash +} // 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_28_sphere_hash { +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->daddiu(sp, sp, -48); // daddiu sp, sp, -48 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s5, 16, sp); // sq s5, 16(sp) + c->sq(gp, 32, sp); // sq gp, 32(sp) + c->mov64(gp, a0); // or gp, a0, r0 + c->mov64(a0, gp); // or a0, gp, r0 + c->lwu(v1, -4, a0); // lwu v1, -4(a0) + c->lwu(t9, 112, v1); // lwu t9, 112(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 + c->mov64(v1, v0); // or v1, v0, r0 + c->addiu(s5, r0, 0); // addiu s5, r0, 0 + //beq r0, r0, L110 // beq r0, r0, L110 + // nop // sll r0, r0, 0 + goto block_11; // branch always + + +block_1: + c->lwu(v1, 84, gp); // lwu v1, 84(gp) + c->dsll(a0, s5, 4); // dsll a0, s5, 4 + c->daddu(a2, v1, a0); // daddu a2, v1, a0 + c->mov64(a0, gp); // or a0, gp, r0 + c->lwu(v1, -4, a0); // lwu v1, -4(a0) + c->lwu(t9, 104, v1); // lwu t9, 104(v1) + c->daddiu(a1, gp, 4); // daddiu a1, gp, 4 + 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 + c->mov64(t1, gp); // or t1, gp, r0 + c->daddiu(t2, gp, 4); // daddiu t2, gp, 4 + c->mov64(a3, s5); // or a3, s5, r0 + c->lh(v1, 10, t1); // lh v1, 10(t1) + c->lb(a0, 24, t1); // lb a0, 24(t1) + c->mult3(a0, a0, v1); // mult3 a0, a0, v1 + c->lb(a1, 26, t1); // lb a1, 26(t1) + c->mult3(a1, a1, a0); // mult3 a1, a1, a0 + c->addiu(a2, r0, 1); // addiu a2, r0, 1 + c->lb(t0, 0, t2); // lb t0, 0(t2) + c->dsubu(a2, a2, t0); // dsubu a2, a2, t0 + c->lb(t0, 3, t2); // lb t0, 3(t2) + c->daddu(a2, a2, t0); // daddu a2, a2, t0 + c->addiu(t0, r0, 1); // addiu t0, r0, 1 + c->lb(t3, 2, t2); // lb t3, 2(t2) + c->dsubu(t0, t0, t3); // dsubu t0, t0, t3 + c->lb(t3, 5, t2); // lb t3, 5(t2) + c->daddu(t0, t0, t3); // daddu t0, t0, t3 + c->addiu(t3, r0, 1); // addiu t3, r0, 1 + c->lb(t4, 1, t2); // lb t4, 1(t2) + c->dsubu(t3, t3, t4); // dsubu t3, t3, t4 + c->lb(t4, 4, t2); // lb t4, 4(t2) + c->daddu(t3, t3, t4); // daddu t3, t3, t4 + c->lb(t4, 0, t2); // lb t4, 0(t2) + c->mult3(t4, t4, v1); // mult3 t4, t4, v1 + c->lb(t5, 1, t2); // lb t5, 1(t2) + c->mult3(t5, t5, a1); // mult3 t5, t5, a1 + c->daddu(t4, t4, t5); // daddu t4, t4, t5 + c->lb(t2, 2, t2); // lb t2, 2(t2) + c->mult3(t2, t2, a0); // mult3 t2, t2, a0 + c->daddu(t2, t4, t2); // daddu t2, t4, t2 + c->dsra(t4, a3, 3); // dsra t4, a3, 3 + c->daddu(t2, t2, t4); // daddu t2, t2, t4 + c->daddu(t2, r0, t2); // daddu t2, r0, t2 + c->lwu(t1, 28, t1); // lwu t1, 28(t1) + c->daddu(t1, t2, t1); // daddu t1, t2, t1 + c->addiu(t2, r0, 1); // addiu t2, r0, 1 + c->andi(a3, a3, 7); // andi a3, a3, 7 + if (((s64)c->sgpr64(a3)) >= 0) { // bgezl a3, L106 + c->dsllv(a3, t2, a3); // dsllv a3, t2, a3 + goto block_4; + } + +// block_3: + c->dsubu(a3, r0, a3); // dsubu a3, r0, a3 + c->dsrav(a3, t2, a3); // dsrav a3, t2, a3 + +block_4: + c->mov64(t2, t3); // or t2, t3, r0 + +block_5: + c->mov64(t3, t0); // or t3, t0, r0 + c->mov64(t4, t1); // or t4, t1, r0 + +block_6: + c->mov64(t5, a2); // or t5, a2, r0 + c->mov64(t6, t4); // or t6, t4, r0 + +block_7: + // nop // sll r0, r0, 0 + c->lbu(t7, 0, t6); // lbu t7, 0(t6) + // nop // sll r0, r0, 0 + c->or_(t7, t7, a3); // or t7, t7, a3 + c->daddiu(t5, t5, -1); // daddiu t5, t5, -1 + c->sb(t7, 0, t6); // sb t7, 0(t6) + bc = c->sgpr64(t5) != 0; // bne t5, r0, L109 + c->daddu(t6, t6, v1); // daddu t6, t6, v1 + if (bc) {goto block_7;} // branch non-likely + + c->daddiu(t3, t3, -1); // daddiu t3, t3, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t3) != 0; // bne t3, r0, L108 + c->daddu(t4, t4, a0); // daddu t4, t4, a0 + if (bc) {goto block_6;} // branch non-likely + + c->daddiu(t2, t2, -1); // daddiu t2, t2, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t2) != 0; // bne t2, r0, L107 + c->daddu(t1, t1, a1); // daddu t1, t1, a1 + if (bc) {goto block_5;} // branch non-likely + + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + c->daddiu(s5, s5, 1); // daddiu s5, s5, 1 + +block_11: + c->lh(v1, 56, gp); // lh v1, 56(gp) + c->slt(v1, s5, v1); // slt v1, s5, v1 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L105 + // nop // sll r0, r0, 0 + if (bc) {goto block_1;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + c->mov64(v1, s7); // or v1, s7, r0 + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 32, sp); // lq gp, 32(sp) + c->lq(s5, 16, sp); // lq s5, 16(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 48); // daddiu sp, sp, 48 + 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() { + gLinkedFunctionTable.reg("(method 28 sphere-hash)", execute, 128); +} + +} // namespace method_28_sphere_hash +} // 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_32_sphere_hash { +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->daddiu(sp, sp, -48); // daddiu sp, sp, -48 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s5, 16, sp); // sq s5, 16(sp) + c->sq(gp, 32, sp); // sq gp, 32(sp) + c->mov64(s5, a0); // or s5, a0, r0 + c->mov64(gp, a2); // or gp, a2, r0 + c->mov64(a0, s5); // or a0, s5, r0 + c->lwu(v1, -4, a0); // lwu v1, -4(a0) + c->lwu(t9, 104, v1); // lwu t9, 104(v1) + c->daddiu(v1, s5, 4); // daddiu v1, s5, 4 + c->mov64(a2, a1); // or a2, a1, r0 + c->mov64(a1, v1); // or a1, v1, 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 + c->mov64(t0, s5); // or t0, s5, r0 + c->daddiu(t1, s5, 4); // daddiu t1, s5, 4 + c->lh(v1, 10, t0); // lh v1, 10(t0) + c->lb(a0, 24, t0); // lb a0, 24(t0) + c->mult3(a0, a0, v1); // mult3 a0, a0, v1 + c->lb(a1, 26, t0); // lb a1, 26(t0) + c->mult3(a1, a1, a0); // mult3 a1, a1, a0 + c->addiu(a2, r0, 1); // addiu a2, r0, 1 + c->lb(a3, 0, t1); // lb a3, 0(t1) + c->dsubu(a2, a2, a3); // dsubu a2, a2, a3 + c->lb(a3, 3, t1); // lb a3, 3(t1) + c->daddu(a2, a2, a3); // daddu a2, a2, a3 + c->addiu(a3, r0, 1); // addiu a3, r0, 1 + c->lb(t2, 2, t1); // lb t2, 2(t1) + c->dsubu(a3, a3, t2); // dsubu a3, a3, t2 + c->lb(t2, 5, t1); // lb t2, 5(t1) + c->daddu(a3, a3, t2); // daddu a3, a3, t2 + c->addiu(t2, r0, 1); // addiu t2, r0, 1 + c->lb(t3, 1, t1); // lb t3, 1(t1) + c->dsubu(t2, t2, t3); // dsubu t2, t2, t3 + c->lb(t3, 4, t1); // lb t3, 4(t1) + c->daddu(t2, t2, t3); // daddu t2, t2, t3 + c->lb(t3, 0, t1); // lb t3, 0(t1) + c->mult3(t3, t3, v1); // mult3 t3, t3, v1 + c->lb(t4, 1, t1); // lb t4, 1(t1) + c->mult3(t4, t4, a1); // mult3 t4, t4, a1 + c->daddu(t3, t3, t4); // daddu t3, t3, t4 + c->lb(t1, 2, t1); // lb t1, 2(t1) + c->mult3(t1, t1, a0); // mult3 t1, t1, a0 + c->daddu(t1, t3, t1); // daddu t1, t3, t1 + c->dsra(t3, gp, 3); // dsra t3, gp, 3 + c->daddu(t1, t1, t3); // daddu t1, t1, t3 + c->daddu(t1, r0, t1); // daddu t1, r0, t1 + c->lwu(t0, 28, t0); // lwu t0, 28(t0) + c->daddu(t0, t1, t0); // daddu t0, t1, t0 + c->addiu(t1, r0, 1); // addiu t1, r0, 1 + c->andi(t3, gp, 7); // andi t3, gp, 7 + if (((s64)c->sgpr64(t3)) >= 0) { // bgezl t3, L90 + c->dsllv(t1, t1, t3); // dsllv t1, t1, t3 + goto block_3; + } + +// block_2: + c->dsubu(t3, r0, t3); // dsubu t3, r0, t3 + c->dsrav(t1, t1, t3); // dsrav t1, t1, t3 + +block_3: + c->nor(t1, t1, r0); // nor t1, t1, r0 + c->mov64(t2, t2); // or t2, t2, r0 + // nop // sll r0, r0, 0 + +block_4: + c->mov64(t3, a3); // or t3, a3, r0 + c->mov64(t4, t0); // or t4, t0, r0 + +block_5: + c->mov64(t5, a2); // or t5, a2, r0 + c->mov64(t6, t4); // or t6, t4, r0 + +block_6: + // nop // sll r0, r0, 0 + c->lbu(t7, 0, t6); // lbu t7, 0(t6) + // nop // sll r0, r0, 0 + c->and_(t7, t7, t1); // and t7, t7, t1 + c->daddiu(t5, t5, -1); // daddiu t5, t5, -1 + c->sb(t7, 0, t6); // sb t7, 0(t6) + bc = c->sgpr64(t5) != 0; // bne t5, r0, L93 + c->daddu(t6, t6, v1); // daddu t6, t6, v1 + if (bc) {goto block_6;} // branch non-likely + + c->daddiu(t3, t3, -1); // daddiu t3, t3, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t3) != 0; // bne t3, r0, L92 + c->daddu(t4, t4, a0); // daddu t4, t4, a0 + if (bc) {goto block_5;} // branch non-likely + + c->daddiu(t2, t2, -1); // daddiu t2, t2, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t2) != 0; // bne t2, r0, L91 + c->daddu(t0, t0, a1); // daddu t0, t0, a1 + if (bc) {goto block_4;} // 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) + c->lq(gp, 32, sp); // lq gp, 32(sp) + c->lq(s5, 16, sp); // lq s5, 16(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 48); // daddiu sp, sp, 48 + 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 32 sphere-hash)", execute, 128); +} + +} // namespace method_32_sphere_hash +} // 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_29_sphere_hash { +struct Cache { + void* perf_stats; // *perf-stats* +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + bool cop1_bc = false; + c->daddiu(sp, sp, -64); // daddiu sp, sp, -64 + 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->mov64(s5, a0); // or s5, a0, r0 + c->mov64(gp, a1); // or gp, a1, r0 + c->load_symbol2(v1, cache.perf_stats); // lw v1, *perf-stats*(s7) + c->daddiu(v1, v1, 116); // daddiu v1, v1, 116 + c->lwu(a0, 28, v1); // lwu a0, 28(v1) + c->lwu(a1, 4, v1); // lwu a1, 4(v1) + c->daddiu(a1, a1, 1); // daddiu a1, a1, 1 + c->sw(a1, 4, v1); // sw a1, 4(v1) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L82 + // nop // sll r0, r0, 0 + if (bc) {goto block_2;} // branch non-likely + + // Unknown instr: mtc0 Perf, r0 + // Unknown instr: sync.l + // Unknown instr: sync.p + // Unknown instr: mtpc pcr0, r0 + // Unknown instr: mtpc pcr1, r0 + // Unknown instr: sync.l + // Unknown instr: sync.p + // Unknown instr: mtc0 Perf, a0 + // Unknown instr: sync.l + // Unknown instr: sync.p + +block_2: + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + c->mov64(a0, s5); // or a0, s5, r0 + c->lwu(v1, -4, a0); // lwu v1, -4(a0) + c->lwu(t9, 104, v1); // lwu t9, 104(v1) + c->daddiu(a1, s5, 4); // daddiu a1, s5, 4 + c->daddu(a2, r0, gp); // daddu a2, r0, gp + call_addr = c->gprs[t9].du32[0]; // function call: + c->sll(v0, ra, 0); // sll v0, ra, 0 + c->jalr(call_addr); // jalr ra, t9 + c->mov64(v1, v0); // or v1, v0, r0 + c->lwu(v1, 0, s5); // lwu v1, 0(s5) + c->daddiu(s4, v1, 12); // daddiu s4, v1, 12 + c->mov64(a0, s5); // or a0, s5, r0 + c->lwu(v1, -4, a0); // lwu v1, -4(a0) + c->lwu(t9, 96, v1); // lwu t9, 96(v1) + c->daddiu(a1, s5, 4); // daddiu a1, s5, 4 + 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 + c->sh(r0, 20, gp); // sh r0, 20(gp) + c->lh(v1, 10, s5); // lh v1, 10(s5) + c->gprs[a0].du64[0] = 0; // or a0, r0, r0 + +block_3: + c->dsll(a1, a0, 3); // dsll a1, a0, 3 + c->lbu(a2, 0, s4); // lbu a2, 0(s4) + bc = c->sgpr64(a2) == 0; // beq a2, r0, L87 + // nop // sll r0, r0, 0 + if (bc) {goto block_13;} // branch non-likely + + +block_4: + c->andi(a3, a2, 1); // andi a3, a2, 1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(a3) == 0; // beq a3, r0, L86 + // nop // sll r0, r0, 0 + if (bc) {goto block_12;} // branch non-likely + + c->lwu(a3, 84, s5); // lwu a3, 84(s5) + c->dsll(t0, a1, 4); // dsll t0, a1, 4 + c->daddu(a3, a3, t0); // daddu a3, a3, t0 + c->lbu(t0, 24, gp); // lbu t0, 24(gp) + c->lwc1(f0, 12, a3); // lwc1 f0, 12(a3) + c->mfc1(t1, f0); // mfc1 t1, f0 + c->and_(t0, t0, t1); // and t0, t0, t1 + bc = c->sgpr64(t0) == 0; // beq t0, r0, L85 + // nop // sll r0, r0, 0 + if (bc) {goto block_11;} // branch non-likely + + c->mov64(t0, s7); // or t0, s7, r0 + c->lwc1(f3, 0, gp); // lwc1 f3, 0(gp) + c->lwc1(f1, 8, gp); // lwc1 f1, 8(gp) + c->lwc1(f4, 0, a3); // lwc1 f4, 0(a3) + c->lwc1(f2, 8, a3); // lwc1 f2, 8(a3) + c->lwc1(f0, 12, gp); // lwc1 f0, 12(gp) + c->subs(f3, f4, f3); // sub.s f3, f4, f3 + c->subs(f1, f2, f1); // sub.s f1, f2, f1 + c->mtc1(f2, r0); // mtc1 f2, r0 + // Unknown instr: mula.s f3, f3 + // Unknown instr: madd.s f1, f1, f1 + c->fprs[f1] = (c->fprs[f3] * c->fprs[f3]) + (c->fprs[f1] * c->fprs[f1]); + cop1_bc = c->fprs[f2] < c->fprs[f1]; // c.lt.s f2, f1 + bc = !cop1_bc; // bc1f L85 + // nop // sll r0, r0, 0 + if (bc) {goto block_11;} // branch non-likely + + c->lwc1(f2, 4, gp); // lwc1 f2, 4(gp) + c->lwc1(f3, 4, a3); // lwc1 f3, 4(a3) + c->subs(f3, f3, f2); // sub.s f3, f3, f2 + c->lwc1(f2, 16, gp); // lwc1 f2, 16(gp) + c->abss(f3, f3); // abs.s f3, f3 + cop1_bc = c->fprs[f3] < c->fprs[f2]; // c.lt.s f3, f2 + bc = !cop1_bc; // bc1f L85 + // nop // sll r0, r0, 0 + if (bc) {goto block_11;} // branch non-likely + + c->lwc1(f2, 12, a3); // lwc1 f2, 12(a3) + c->adds(f0, f2, f0); // add.s f0, f2, f0 + c->muls(f0, f0, f0); // mul.s f0, f0, f0 + cop1_bc = c->fprs[f1] < c->fprs[f0]; // c.lt.s f1, f0 + bc = !cop1_bc; // bc1f L85 + // nop // sll r0, r0, 0 + if (bc) {goto block_11;} // branch non-likely + + c->lh(a3, 20, gp); // lh a3, 20(gp) + c->lh(t0, 22, gp); // lh t0, 22(gp) + c->slt(a3, a3, t0); // slt a3, a3, t0 + bc = c->sgpr64(a3) == 0; // beq a3, r0, L85 + // nop // sll r0, r0, 0 + if (bc) {goto block_11;} // branch non-likely + + c->mov64(a3, s7); // or a3, s7, r0 + c->lwu(a3, 28, gp); // lwu a3, 28(gp) + c->lh(t0, 20, gp); // lh t0, 20(gp) + c->daddu(a3, a3, t0); // daddu a3, a3, t0 + c->sb(a1, 0, a3); // sb a1, 0(a3) + c->lh(a3, 20, gp); // lh a3, 20(gp) + c->daddiu(a3, a3, 1); // daddiu a3, a3, 1 + c->sh(a3, 20, gp); // sh a3, 20(gp) + +block_11: + c->gprs[a3].du64[0] = 0; // or a3, r0, r0 + // nop // sll r0, r0, 0 + +block_12: + c->dsra(a2, a2, 1); // dsra a2, a2, 1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(a2) != 0; // bne a2, r0, L84 + c->daddiu(a1, a1, 1); // daddiu a1, a1, 1 + if (bc) {goto block_4;} // branch non-likely + + +block_13: + c->daddiu(a0, a0, 1); // daddiu a0, a0, 1 + c->daddiu(s4, s4, 1); // daddiu s4, s4, 1 + c->slt(a1, a0, v1); // slt a1, a0, v1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(a1) != 0; // bne a1, r0, L83 + // nop // sll r0, r0, 0 + if (bc) {goto block_3;} // branch non-likely + + c->load_symbol2(v1, cache.perf_stats); // lw v1, *perf-stats*(s7) + c->daddiu(v1, v1, 116); // daddiu v1, v1, 116 + c->lwu(a0, 28, v1); // lwu a0, 28(v1) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L88 + // nop // sll r0, r0, 0 + if (bc) {goto block_16;} // branch non-likely + + // Unknown instr: mtc0 Perf, r0 + // Unknown instr: sync.l + // Unknown instr: sync.p + // Unknown instr: mfpc a0, pcr0 + c->lwu(a1, 32, v1); // lwu a1, 32(v1) + c->daddu(a0, a1, a0); // daddu a0, a1, a0 + c->sw(a0, 32, v1); // sw a0, 32(v1) + // Unknown instr: mfpc a0, pcr1 + c->lwu(a1, 36, v1); // lwu a1, 36(v1) + c->daddu(a0, a1, a0); // daddu a0, a1, a0 + c->sw(a0, 36, v1); // sw a0, 36(v1) + +block_16: + 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) + 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, 64); // daddiu sp, sp, 64 + 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.perf_stats = intern_from_c(-1, 0, "*perf-stats*").c(); + gLinkedFunctionTable.reg("(method 29 sphere-hash)", execute, 128); +} + +} // namespace method_29_sphere_hash +} // 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_30_sphere_hash { +struct Cache { + void* perf_stats; // *perf-stats* +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + bool cop1_bc = false; + c->daddiu(sp, sp, -96); // daddiu sp, sp, -96 + c->sd(ra, 0, sp); // sd ra, 0(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 + c->mov64(gp, a1); // or gp, a1, r0 + c->mov64(s5, a2); // or s5, a2, r0 + c->mov64(s3, a3); // or s3, a3, r0 + c->load_symbol2(v1, cache.perf_stats); // lw v1, *perf-stats*(s7) + c->daddiu(v1, v1, 116); // daddiu v1, v1, 116 + c->lwu(a0, 28, v1); // lwu a0, 28(v1) + c->lwu(a1, 4, v1); // lwu a1, 4(v1) + c->daddiu(a1, a1, 1); // daddiu a1, a1, 1 + c->sw(a1, 4, v1); // sw a1, 4(v1) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L70 + // nop // sll r0, r0, 0 + if (bc) {goto block_2;} // branch non-likely + + // Unknown instr: mtc0 Perf, r0 + // Unknown instr: sync.l + // Unknown instr: sync.p + // Unknown instr: mtpc pcr0, r0 + // Unknown instr: mtpc pcr1, r0 + // Unknown instr: sync.l + // Unknown instr: sync.p + // Unknown instr: mtc0 Perf, a0 + // Unknown instr: sync.l + // Unknown instr: sync.p + +block_2: + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + c->mov64(a0, s4); // or a0, s4, r0 + c->lwu(v1, -4, a0); // lwu v1, -4(a0) + c->lwu(t9, 104, v1); // lwu t9, 104(v1) + c->daddiu(a1, s4, 4); // daddiu a1, s4, 4 + c->mov64(a2, gp); // or a2, gp, 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 + c->lwu(v1, 0, s4); // lwu v1, 0(s4) + c->daddiu(v1, v1, 12); // daddiu v1, v1, 12 + c->sw(v1, 16, sp); // sw v1, 16(sp) + c->mov64(a0, s4); // or a0, s4, r0 + c->lwu(v1, -4, a0); // lwu v1, -4(a0) + c->lwu(t9, 96, v1); // lwu t9, 96(v1) + c->daddiu(a1, s4, 4); // daddiu a1, s4, 4 + c->lwu(a2, 16, sp); // lwu a2, 16(sp) + 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 + c->addiu(v1, r0, -1); // addiu v1, r0, -1 + bc = c->sgpr64(s3) == c->sgpr64(v1); // beq s3, v1, L72 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_7;} // branch non-likely + + c->dsra(v1, s3, 3); // dsra v1, s3, 3 + c->andi(a1, s3, 7); // andi a1, s3, 7 + c->addiu(a0, r0, 1); // addiu a0, r0, 1 + if (((s64)c->sgpr64(a1)) >= 0) { // bgezl a1, L71 + c->dsllv(a0, a0, a1); // dsllv a0, a0, a1 + goto block_6; + } + +// block_5: + c->dsubu(a1, r0, a1); // dsubu a1, r0, a1 + c->dsrav(a0, a0, a1); // dsrav a0, a0, a1 + +block_6: + c->nor(a0, a0, r0); // nor a0, a0, r0 + c->lwu(a1, 16, sp); // lwu a1, 16(sp) + c->daddu(a1, a1, v1); // daddu a1, a1, v1 + c->lbu(a1, 0, a1); // lbu a1, 0(a1) + c->and_(a0, a1, a0); // and a0, a1, a0 + c->lwu(a1, 16, sp); // lwu a1, 16(sp) + c->daddu(v1, a1, v1); // daddu v1, a1, v1 + c->sb(a0, 0, v1); // sb a0, 0(v1) + +block_7: + c->daddiu(v1, s7, 4); // daddiu v1, s7, #t + c->sw(v1, 20, sp); // sw v1, 20(sp) + c->sw(s4, 24, sp); // sw s4, 24(sp) + c->lwu(v1, 24, sp); // lwu v1, 24(sp) + c->lh(v1, 10, v1); // lh v1, 10(v1) + c->lwu(a0, 16, sp); // lwu a0, 16(sp) + c->gprs[a1].du64[0] = 0; // or a1, r0, r0 + +block_8: + c->dsll(a2, a1, 3); // dsll a2, a1, 3 + c->lbu(a3, 0, a0); // lbu a3, 0(a0) + bc = c->sgpr64(a3) == 0; // beq a3, r0, L78 + // nop // sll r0, r0, 0 + if (bc) {goto block_15;} // branch non-likely + + +block_9: + c->andi(t0, a3, 1); // andi t0, a3, 1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t0) == 0; // beq t0, r0, L77 + // nop // sll r0, r0, 0 + if (bc) {goto block_14;} // branch non-likely + + c->lwu(t0, 24, sp); // lwu t0, 24(sp) + c->lwu(t0, 84, t0); // lwu t0, 84(t0) + c->dsll(t1, a2, 4); // dsll t1, a2, 4 + c->daddu(t0, t0, t1); // daddu t0, t0, t1 + c->sw(t0, 28, sp); // sw t0, 28(sp) + c->lwu(t0, 28, sp); // lwu t0, 28(sp) + c->lwc1(f0, 12, t0); // lwc1 f0, 12(t0) + c->mfc1(t0, f0); // mfc1 t0, f0 + c->and_(t0, s5, t0); // and t0, s5, t0 + bc = c->sgpr64(t0) != 0; // bne t0, r0, L75 + c->mov64(t0, s7); // or t0, s7, r0 + if (bc) {goto block_12;} // branch non-likely + + //beq r0, r0, L76 // beq r0, r0, L76 + // nop // sll r0, r0, 0 + goto block_13; // branch always + + +block_12: + c->lwc1(f0, 0, gp); // lwc1 f0, 0(gp) + c->lwu(t0, 28, sp); // lwu t0, 28(sp) + c->lwc1(f1, 0, t0); // lwc1 f1, 0(t0) + c->lwc1(f2, 4, gp); // lwc1 f2, 4(gp) + c->lwu(t0, 28, sp); // lwu t0, 28(sp) + c->lwc1(f2, 4, t0); // lwc1 f2, 4(t0) + c->lwc1(f2, 8, gp); // lwc1 f2, 8(gp) + c->lwu(t0, 28, sp); // lwu t0, 28(sp) + c->lwc1(f3, 8, t0); // lwc1 f3, 8(t0) + c->subs(f0, f1, f0); // sub.s f0, f1, f0 + c->subs(f1, f3, f2); // sub.s f1, f3, f2 + c->subs(f2, f3, f2); // sub.s f2, f3, f2 + // Unknown instr: mula.s f0, f0 + // Unknown instr: madda.s f1, f1 + // Unknown instr: madd.s f0, f2, f2 + c->fprs[f0] = (c->fprs[f2] * c->fprs[f2]) + (c->fprs[f1] * c->fprs[f1]) + (c->fprs[f0] * c->fprs[f0]); + c->lwu(t0, 28, sp); // lwu t0, 28(sp) + c->lwc1(f1, 12, t0); // lwc1 f1, 12(t0) + c->lwc1(f2, 12, gp); // lwc1 f2, 12(gp) + c->adds(f1, f1, f2); // add.s f1, f1, f2 + c->muls(f1, f1, f1); // mul.s f1, f1, f1 + cop1_bc = c->fprs[f0] < c->fprs[f1]; // c.lt.s f0, f1 + bc = cop1_bc; // bc1t L79 + // nop // sll r0, r0, 0 + if (bc) {goto block_17;} // branch non-likely + + +block_13: + c->gprs[t0].du64[0] = 0; // or t0, r0, r0 + // nop // sll r0, r0, 0 + +block_14: + c->dsra(a3, a3, 1); // dsra a3, a3, 1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(a3) != 0; // bne a3, r0, L74 + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + if (bc) {goto block_9;} // branch non-likely + + +block_15: + c->daddiu(a1, a1, 1); // daddiu a1, a1, 1 + c->daddiu(a0, a0, 1); // daddiu a0, a0, 1 + c->slt(a2, a1, v1); // slt a2, a1, v1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(a2) != 0; // bne a2, r0, L73 + // nop // sll r0, r0, 0 + if (bc) {goto block_8;} // branch non-likely + + c->sw(s7, 20, sp); // sw s7, 20(sp) + +block_17: + c->load_symbol2(v1, cache.perf_stats); // lw v1, *perf-stats*(s7) + c->daddiu(v1, v1, 116); // daddiu v1, v1, 116 + c->lwu(a0, 28, v1); // lwu a0, 28(v1) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L80 + // nop // sll r0, r0, 0 + if (bc) {goto block_19;} // branch non-likely + + // Unknown instr: mtc0 Perf, r0 + // Unknown instr: sync.l + // Unknown instr: sync.p + // Unknown instr: mfpc a0, pcr0 + c->lwu(a1, 32, v1); // lwu a1, 32(v1) + c->daddu(a0, a1, a0); // daddu a0, a1, a0 + c->sw(a0, 32, v1); // sw a0, 32(v1) + // Unknown instr: mfpc a0, pcr1 + c->lwu(a1, 36, v1); // lwu a1, 36(v1) + c->daddu(a0, a1, a0); // daddu a0, a1, a0 + c->sw(a0, 36, v1); // sw a0, 36(v1) + +block_19: + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + c->lwu(v0, 20, sp); // lwu v0, 20(sp) + 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) + //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.perf_stats = intern_from_c(-1, 0, "*perf-stats*").c(); + gLinkedFunctionTable.reg("(method 30 sphere-hash)", execute, 128); +} + +} // namespace method_30_sphere_hash +} // 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_31_sphere_hash { +struct Cache { + void* perf_stats; // *perf-stats* + void* vector_vector_distance_squared; // vector-vector-distance-squared +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + bool cop1_bc = false; + c->daddiu(sp, sp, -192); // daddiu sp, sp, -192 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s0, 80, sp); // sq s0, 80(sp) + c->sq(s1, 96, sp); // sq s1, 96(sp) + c->sq(s2, 112, sp); // sq s2, 112(sp) + c->sq(s3, 128, sp); // sq s3, 128(sp) + c->sq(s4, 144, sp); // sq s4, 144(sp) + c->sq(s5, 160, sp); // sq s5, 160(sp) + c->sq(gp, 176, sp); // sq gp, 176(sp) + c->mov64(gp, a0); // or gp, a0, r0 + c->mov64(s5, t0); // or s5, t0, r0 + c->load_symbol2(v1, cache.perf_stats); // lw v1, *perf-stats*(s7) + c->daddiu(v1, v1, 116); // daddiu v1, v1, 116 + c->lwu(a0, 28, v1); // lwu a0, 28(v1) + c->lwu(t0, 4, v1); // lwu t0, 4(v1) + c->daddiu(t0, t0, 1); // daddiu t0, t0, 1 + c->sw(t0, 4, v1); // sw t0, 4(v1) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L59 + // nop // sll r0, r0, 0 + if (bc) {goto block_2;} // branch non-likely + + // Unknown instr: mtc0 Perf, r0 + // Unknown instr: sync.l + // Unknown instr: sync.p + // Unknown instr: mtpc pcr0, r0 + // Unknown instr: mtpc pcr1, r0 + // Unknown instr: sync.l + // Unknown instr: sync.p + // Unknown instr: mtc0 Perf, a0 + // Unknown instr: sync.l + // Unknown instr: sync.p + +block_2: + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + c->sw(a1, 16, sp); // sw a1, 16(sp) + c->sw(a2, 20, sp); // sw a2, 20(sp) + c->mtc1(f0, a3); // mtc1 f0, a3 + c->swc1(f0, 24, sp); // swc1 f0, 24(sp) + c->mov64(a0, gp); // or a0, gp, r0 + c->lwu(v1, -4, a0); // lwu v1, -4(a0) + c->lwu(t9, 108, v1); // lwu t9, 108(v1) + c->daddiu(a1, gp, 4); // daddiu a1, gp, 4 + c->lwu(a2, 16, sp); // lwu a2, 16(sp) + c->lwu(a3, 20, sp); // lwu a3, 20(sp) + c->lwc1(f0, 24, sp); // lwc1 f0, 24(sp) + c->mfc1(t0, f0); // mfc1 t0, 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->mov64(v1, v0); // or v1, v0, r0 + c->lwu(v1, 0, gp); // lwu v1, 0(gp) + c->daddiu(v1, v1, 12); // daddiu v1, v1, 12 + c->sw(v1, 28, sp); // sw v1, 28(sp) + c->mov64(a0, gp); // or a0, gp, r0 + c->lwu(v1, -4, a0); // lwu v1, -4(a0) + c->lwu(t9, 96, v1); // lwu t9, 96(v1) + c->daddiu(a1, gp, 4); // daddiu a1, gp, 4 + c->lwu(a2, 28, sp); // lwu a2, 28(sp) + 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 + c->addiu(v1, r0, -1); // addiu v1, r0, -1 + bc = c->sgpr64(s5) == c->sgpr64(v1); // beq s5, v1, L61 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_7;} // branch non-likely + + c->dsra(v1, s5, 3); // dsra v1, s5, 3 + c->andi(a1, s5, 7); // andi a1, s5, 7 + c->addiu(a0, r0, 1); // addiu a0, r0, 1 + if (((s64)c->sgpr64(a1)) >= 0) { // bgezl a1, L60 + c->dsllv(a0, a0, a1); // dsllv a0, a0, a1 + goto block_6; + } + +// block_5: + c->dsubu(a1, r0, a1); // dsubu a1, r0, a1 + c->dsrav(a0, a0, a1); // dsrav a0, a0, a1 + +block_6: + c->nor(a0, a0, r0); // nor a0, a0, r0 + c->lwu(a1, 28, sp); // lwu a1, 28(sp) + c->daddu(a1, a1, v1); // daddu a1, a1, v1 + c->lbu(a1, 0, a1); // lbu a1, 0(a1) + c->and_(a0, a1, a0); // and a0, a1, a0 + c->lwu(a1, 28, sp); // lwu a1, 28(sp) + c->daddu(v1, a1, v1); // daddu v1, a1, v1 + c->sb(a0, 0, v1); // sb a0, 0(v1) + +block_7: + c->daddiu(v1, s7, 4); // daddiu v1, s7, #t + c->sw(v1, 48, sp); // sw v1, 48(sp) + c->daddiu(v1, sp, 32); // daddiu v1, sp, 32 + c->sw(v1, 52, sp); // sw v1, 52(sp) + c->mtc1(f0, r0); // mtc1 f0, r0 + c->swc1(f0, 56, sp); // swc1 f0, 56(sp) + c->lwu(v1, 20, sp); // lwu v1, 20(sp) + c->lqc2(vf1, 0, v1); // lqc2 vf1, 0(v1) + c->vadd_bc(DEST::x, BC::w, vf2, vf0, vf0); // vaddw.x vf2, vf0, vf0 + c->vmul(DEST::xyzw, vf1, vf1, vf1); // vmul.xyzw vf1, vf1, vf1 + c->vmula_bc(DEST::x, BC::x, vf2, vf1); // vmulax.x acc, vf2, vf1 + c->vmadda_bc(DEST::x, BC::y, vf2, vf1); // vmadday.x acc, vf2, vf1 + c->vmadd_bc(DEST::x, BC::z, vf1, vf2, vf1); // vmaddz.x vf1, vf2, vf1 + c->mov128_gpr_vf(v1, vf1); // qmfc2.i v1, vf1 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->mtc1(f1, r0); // mtc1 f1, r0 + cop1_bc = c->fprs[f1] < c->fprs[f0]; // c.lt.s f1, f0 + bc = !cop1_bc; // bc1f L62 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_9;} // branch non-likely + + c->lui(v1, 16256); // lui v1, 16256 + c->mtc1(f1, v1); // mtc1 f1, v1 + c->divs(f0, f1, f0); // div.s f0, f1, f0 + c->mfc1(v1, f0); // mfc1 v1, f0 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->swc1(f0, 56, sp); // swc1 f0, 56(sp) + c->mfc1(v1, f0); // mfc1 v1, f0 + +block_9: + c->lh(s5, 10, gp); // lh s5, 10(gp) + c->lwu(s4, 28, sp); // lwu s4, 28(sp) + c->gprs[s3].du64[0] = 0; // or s3, r0, r0 + +block_10: + c->dsll(s2, s3, 3); // dsll s2, s3, 3 + c->lbu(s1, 0, s4); // lbu s1, 0(s4) + bc = c->sgpr64(s1) == 0; // beq s1, r0, L66 + // nop // sll r0, r0, 0 + if (bc) {goto block_16;} // branch non-likely + + +block_11: + c->andi(v1, s1, 1); // andi v1, s1, 1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L65 + // nop // sll r0, r0, 0 + if (bc) {goto block_15;} // branch non-likely + + c->lwu(v1, 84, gp); // lwu v1, 84(gp) + c->dsll(a0, s2, 4); // dsll a0, s2, 4 + c->daddu(s0, v1, a0); // daddu s0, v1, a0 + c->daddiu(v1, sp, 64); // daddiu v1, sp, 64 + c->mov64(a2, v1); // or a2, v1, r0 + c->mov64(a0, s0); // or a0, s0, r0 + c->lwu(a1, 16, sp); // lwu a1, 16(sp) + c->lqc2(vf4, 0, a0); // lqc2 vf4, 0(a0) + c->lqc2(vf5, 0, a1); // lqc2 vf5, 0(a1) + c->vmove(DEST::w, vf6, vf0); // vmove.w vf6, vf0 + c->vsub(DEST::xyz, vf6, vf4, vf5); // vsub.xyz vf6, vf4, vf5 + c->sqc2(vf6, 0, a2); // sqc2 vf6, 0(a2) + c->lwu(a0, 20, sp); // lwu a0, 20(sp) + c->lwc1(f0, 0, a0); // lwc1 f0, 0(a0) + c->lwc1(f1, 4, a0); // lwc1 f1, 4(a0) + c->lwc1(f2, 8, a0); // lwc1 f2, 8(a0) + c->lwc1(f3, 0, v1); // lwc1 f3, 0(v1) + c->lwc1(f4, 4, v1); // lwc1 f4, 4(v1) + c->lwc1(f5, 8, v1); // lwc1 f5, 8(v1) + // Unknown instr: mula.s f0, f3 + // Unknown instr: madda.s f1, f4 + // Unknown instr: madd.s f0, f2, f5 + c->fprs[f0] = (c->fprs[f2] * c->fprs[f5]) + (c->fprs[f1] * c->fprs[f4]) + (c->fprs[f0] * c->fprs[f3]); + c->mfc1(v1, f0); // mfc1 v1, f0 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->lwc1(f1, 56, sp); // lwc1 f1, 56(sp) + c->muls(f1, f0, f1); // mul.s f1, f0, f1 + c->mtc1(f0, r0); // mtc1 f0, r0 + c->lui(v1, 16256); // lui v1, 16256 + c->mtc1(f2, v1); // mtc1 f2, v1 + c->mins(f1, f2, f1); // min.s f1, f2, f1 + c->maxs(f0, f0, f1); // max.s f0, f0, f1 + c->lwu(v1, 52, sp); // lwu v1, 52(sp) + c->lwu(a0, 16, sp); // lwu a0, 16(sp) + c->lwu(a1, 20, sp); // lwu a1, 20(sp) + c->lqc2(vf2, 0, a1); // lqc2 vf2, 0(a1) + c->lqc2(vf1, 0, a0); // lqc2 vf1, 0(a0) + c->mfc1(a0, f0); // mfc1 a0, f0 + c->mov128_vf_gpr(vf3, a0); // qmtc2.i vf3, a0 + c->vadd_bc(DEST::w, BC::x, vf4, vf0, vf0); // vaddx.w vf4, vf0, vf0 + c->vmula_bc(DEST::xyzw, BC::x, vf2, vf3); // vmulax.xyzw acc, vf2, vf3 + c->vmadd_bc(DEST::xyz, BC::w, vf4, vf1, vf0); // vmaddw.xyz vf4, vf1, vf0 + c->sqc2(vf4, 0, v1); // sqc2 vf4, 0(v1) + c->load_symbol2(t9, cache.vector_vector_distance_squared);// lw t9, vector-vector-distance-squared(s7) + c->lwu(a0, 52, sp); // lwu a0, 52(sp) + c->mov64(a1, s0); // or a1, s0, 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->mtc1(f0, v0); // mtc1 f0, v0 + c->lwc1(f1, 24, sp); // lwc1 f1, 24(sp) + c->lwc1(f2, 12, s0); // lwc1 f2, 12(s0) + c->adds(f1, f1, f2); // add.s f1, f1, f2 + c->muls(f1, f1, f1); // mul.s f1, f1, f1 + c->mfc1(v1, f1); // mfc1 v1, f1 + c->mtc1(f1, v1); // mtc1 f1, v1 + cop1_bc = c->fprs[f0] < c->fprs[f1]; // c.lt.s f0, f1 + bc = !cop1_bc; // bc1f L65 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_15;} // branch non-likely + + //beq r0, r0, L67 // beq r0, r0, L67 + // nop // sll r0, r0, 0 + goto block_18; // branch always + + // nop // sll r0, r0, 0 + +block_15: + c->dsra(s1, s1, 1); // dsra s1, s1, 1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(s1) != 0; // bne s1, r0, L64 + c->daddiu(s2, s2, 1); // daddiu s2, s2, 1 + if (bc) {goto block_11;} // branch non-likely + + +block_16: + c->daddiu(s3, s3, 1); // daddiu s3, s3, 1 + c->daddiu(s4, s4, 1); // daddiu s4, s4, 1 + c->slt(v1, s3, s5); // slt v1, s3, s5 + // nop // sll r0, r0, 0 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L63 + // nop // sll r0, r0, 0 + if (bc) {goto block_10;} // branch non-likely + + c->sw(s7, 48, sp); // sw s7, 48(sp) + +block_18: + c->load_symbol2(v1, cache.perf_stats); // lw v1, *perf-stats*(s7) + c->daddiu(v1, v1, 116); // daddiu v1, v1, 116 + c->lwu(a0, 28, v1); // lwu a0, 28(v1) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L68 + // nop // sll r0, r0, 0 + if (bc) {goto block_20;} // branch non-likely + + // Unknown instr: mtc0 Perf, r0 + // Unknown instr: sync.l + // Unknown instr: sync.p + // Unknown instr: mfpc a0, pcr0 + c->lwu(a1, 32, v1); // lwu a1, 32(v1) + c->daddu(a0, a1, a0); // daddu a0, a1, a0 + c->sw(a0, 32, v1); // sw a0, 32(v1) + // Unknown instr: mfpc a0, pcr1 + c->lwu(a1, 36, v1); // lwu a1, 36(v1) + c->daddu(a0, a1, a0); // daddu a0, a1, a0 + c->sw(a0, 36, v1); // sw a0, 36(v1) + +block_20: + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + c->lwu(v0, 48, sp); // lwu v0, 48(sp) + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 176, sp); // lq gp, 176(sp) + c->lq(s5, 160, sp); // lq s5, 160(sp) + c->lq(s4, 144, sp); // lq s4, 144(sp) + c->lq(s3, 128, sp); // lq s3, 128(sp) + c->lq(s2, 112, sp); // lq s2, 112(sp) + c->lq(s1, 96, sp); // lq s1, 96(sp) + c->lq(s0, 80, sp); // lq s0, 80(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 192); // daddiu sp, sp, 192 + 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.perf_stats = intern_from_c(-1, 0, "*perf-stats*").c(); + cache.vector_vector_distance_squared = intern_from_c(-1, 0, "vector-vector-distance-squared").c(); + gLinkedFunctionTable.reg("(method 31 sphere-hash)", execute, 256); +} + +} // namespace method_31_sphere_hash +} // 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_32_spatial_hash { +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + c->daddiu(sp, sp, -48); // daddiu sp, sp, -48 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s5, 16, sp); // sq s5, 16(sp) + c->sq(gp, 32, sp); // sq gp, 32(sp) + c->mov64(gp, a0); // or gp, a0, r0 + c->mov64(s5, a2); // or s5, a2, r0 + c->mov64(a0, gp); // or a0, gp, r0 + c->lwu(v1, -4, a0); // lwu v1, -4(a0) + c->lwu(t9, 104, v1); // lwu t9, 104(v1) + c->daddiu(v1, gp, 4); // daddiu v1, gp, 4 + c->mov64(a2, a1); // or a2, a1, r0 + c->mov64(a1, v1); // or a1, v1, 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 + c->mov64(t1, gp); // or t1, gp, r0 + c->daddiu(t2, gp, 4); // daddiu t2, gp, 4 + c->mov64(t0, s5); // or t0, s5, r0 + c->lh(v1, 10, t1); // lh v1, 10(t1) + c->lb(a0, 24, t1); // lb a0, 24(t1) + c->mult3(a0, a0, v1); // mult3 a0, a0, v1 + c->lb(a1, 26, t1); // lb a1, 26(t1) + c->mult3(a1, a1, a0); // mult3 a1, a1, a0 + c->addiu(a2, r0, 1); // addiu a2, r0, 1 + c->lb(a3, 0, t2); // lb a3, 0(t2) + c->dsubu(a2, a2, a3); // dsubu a2, a2, a3 + c->lb(a3, 3, t2); // lb a3, 3(t2) + c->daddu(a2, a2, a3); // daddu a2, a2, a3 + c->addiu(a3, r0, 1); // addiu a3, r0, 1 + c->lb(t3, 2, t2); // lb t3, 2(t2) + c->dsubu(a3, a3, t3); // dsubu a3, a3, t3 + c->lb(t3, 5, t2); // lb t3, 5(t2) + c->daddu(a3, a3, t3); // daddu a3, a3, t3 + c->addiu(t3, r0, 1); // addiu t3, r0, 1 + c->lb(t4, 1, t2); // lb t4, 1(t2) + c->dsubu(t3, t3, t4); // dsubu t3, t3, t4 + c->lb(t4, 4, t2); // lb t4, 4(t2) + c->daddu(t3, t3, t4); // daddu t3, t3, t4 + c->lb(t4, 0, t2); // lb t4, 0(t2) + c->mult3(t4, t4, v1); // mult3 t4, t4, v1 + c->lb(t5, 1, t2); // lb t5, 1(t2) + c->mult3(t5, t5, a1); // mult3 t5, t5, a1 + c->daddu(t4, t4, t5); // daddu t4, t4, t5 + c->lb(t2, 2, t2); // lb t2, 2(t2) + c->mult3(t2, t2, a0); // mult3 t2, t2, a0 + c->daddu(t2, t4, t2); // daddu t2, t4, t2 + c->dsra(t4, t0, 3); // dsra t4, t0, 3 + c->daddu(t2, t2, t4); // daddu t2, t2, t4 + c->daddu(t2, r0, t2); // daddu t2, r0, t2 + c->lwu(t1, 28, t1); // lwu t1, 28(t1) + c->daddu(t1, t2, t1); // daddu t1, t2, t1 + c->addiu(t2, r0, 1); // addiu t2, r0, 1 + c->andi(t0, t0, 7); // andi t0, t0, 7 + if (((s64)c->sgpr64(t0)) >= 0) { // bgezl t0, L45 + c->dsllv(t0, t2, t0); // dsllv t0, t2, t0 + goto block_3; + } + +// block_2: + c->dsubu(t0, r0, t0); // dsubu t0, r0, t0 + c->dsrav(t0, t2, t0); // dsrav t0, t2, t0 + +block_3: + c->nor(t0, t0, r0); // nor t0, t0, r0 + c->mov64(t2, t3); // or t2, t3, r0 + +block_4: + c->mov64(t3, a3); // or t3, a3, r0 + c->mov64(t4, t1); // or t4, t1, r0 + +block_5: + c->mov64(t5, a2); // or t5, a2, r0 + c->mov64(t6, t4); // or t6, t4, r0 + +block_6: + // nop // sll r0, r0, 0 + c->lbu(t7, 0, t6); // lbu t7, 0(t6) + // nop // sll r0, r0, 0 + c->and_(t7, t7, t0); // and t7, t7, t0 + c->daddiu(t5, t5, -1); // daddiu t5, t5, -1 + c->sb(t7, 0, t6); // sb t7, 0(t6) + bc = c->sgpr64(t5) != 0; // bne t5, r0, L48 + c->daddu(t6, t6, v1); // daddu t6, t6, v1 + if (bc) {goto block_6;} // branch non-likely + + c->daddiu(t3, t3, -1); // daddiu t3, t3, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t3) != 0; // bne t3, r0, L47 + c->daddu(t4, t4, a0); // daddu t4, t4, a0 + if (bc) {goto block_5;} // branch non-likely + + c->daddiu(t2, t2, -1); // daddiu t2, t2, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t2) != 0; // bne t2, r0, L46 + c->daddu(t1, t1, a1); // daddu t1, t1, a1 + if (bc) {goto block_4;} // branch non-likely + + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + c->dsll(v1, s5, 4); // dsll v1, s5, 4 + c->lwu(a0, 100, gp); // lwu a0, 100(gp) + c->daddu(v1, v1, a0); // daddu v1, v1, a0 + c->sw(s7, 0, v1); // sw s7, 0(v1) + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 32, sp); // lq gp, 32(sp) + c->lq(s5, 16, sp); // lq s5, 16(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 48); // daddiu sp, sp, 48 + 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 32 spatial-hash)", execute, 128); +} + +} // namespace method_32_spatial_hash +} // 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_38_spatial_hash { +struct Cache { + void* mem_copy; // mem-copy! +} 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(s5, a0); // or s5, a0, r0 + c->mov64(s4, a2); // or s4, a2, r0 + c->lh(gp, 56, s5); // lh gp, 56(s5) + c->lh(v1, 88, s5); // lh v1, 88(s5) + c->slt(v1, gp, v1); // slt v1, gp, v1 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L37 + // nop // sll r0, r0, 0 + if (bc) {goto block_11;} // branch non-likely + + c->lwu(v1, 84, s5); // lwu v1, 84(s5) + c->dsll(a0, gp, 4); // dsll a0, gp, 4 + c->daddu(s3, v1, a0); // daddu s3, v1, a0 + c->lwu(v1, 100, s5); // lwu v1, 100(s5) + c->dsll(a0, gp, 4); // dsll a0, gp, 4 + c->daddu(s2, v1, a0); // daddu s2, v1, a0 + c->load_symbol2(t9, cache.mem_copy); // lw t9, mem-copy!(s7) + c->mov64(a0, s3); // or a0, s3, r0 + c->addiu(a2, r0, 16); // addiu a2, r0, 16 + 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->sw(s4, 0, s2); // sw s4, 0(s2) + c->mov64(a0, s5); // or a0, s5, r0 + c->lwu(v1, -4, a0); // lwu v1, -4(a0) + c->lwu(t9, 104, v1); // lwu t9, 104(v1) + c->daddiu(a1, s5, 4); // daddiu a1, s5, 4 + c->mov64(a2, s3); // or a2, s3, 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 + c->mov64(t1, s5); // or t1, s5, r0 + c->daddiu(t2, s5, 4); // daddiu t2, s5, 4 + c->mov64(a3, gp); // or a3, gp, r0 + c->lh(v1, 10, t1); // lh v1, 10(t1) + c->lb(a0, 24, t1); // lb a0, 24(t1) + c->mult3(a0, a0, v1); // mult3 a0, a0, v1 + c->lb(a1, 26, t1); // lb a1, 26(t1) + c->mult3(a1, a1, a0); // mult3 a1, a1, a0 + c->addiu(a2, r0, 1); // addiu a2, r0, 1 + c->lb(t0, 0, t2); // lb t0, 0(t2) + c->dsubu(a2, a2, t0); // dsubu a2, a2, t0 + c->lb(t0, 3, t2); // lb t0, 3(t2) + c->daddu(a2, a2, t0); // daddu a2, a2, t0 + c->addiu(t0, r0, 1); // addiu t0, r0, 1 + c->lb(t3, 2, t2); // lb t3, 2(t2) + c->dsubu(t0, t0, t3); // dsubu t0, t0, t3 + c->lb(t3, 5, t2); // lb t3, 5(t2) + c->daddu(t0, t0, t3); // daddu t0, t0, t3 + c->addiu(t3, r0, 1); // addiu t3, r0, 1 + c->lb(t4, 1, t2); // lb t4, 1(t2) + c->dsubu(t3, t3, t4); // dsubu t3, t3, t4 + c->lb(t4, 4, t2); // lb t4, 4(t2) + c->daddu(t3, t3, t4); // daddu t3, t3, t4 + c->lb(t4, 0, t2); // lb t4, 0(t2) + c->mult3(t4, t4, v1); // mult3 t4, t4, v1 + c->lb(t5, 1, t2); // lb t5, 1(t2) + c->mult3(t5, t5, a1); // mult3 t5, t5, a1 + c->daddu(t4, t4, t5); // daddu t4, t4, t5 + c->lb(t2, 2, t2); // lb t2, 2(t2) + c->mult3(t2, t2, a0); // mult3 t2, t2, a0 + c->daddu(t2, t4, t2); // daddu t2, t4, t2 + c->dsra(t4, a3, 3); // dsra t4, a3, 3 + c->daddu(t2, t2, t4); // daddu t2, t2, t4 + c->daddu(t2, r0, t2); // daddu t2, r0, t2 + c->lwu(t1, 28, t1); // lwu t1, 28(t1) + c->daddu(t1, t2, t1); // daddu t1, t2, t1 + c->addiu(t2, r0, 1); // addiu t2, r0, 1 + c->andi(a3, a3, 7); // andi a3, a3, 7 + if (((s64)c->sgpr64(a3)) >= 0) { // bgezl a3, L33 + c->dsllv(a3, t2, a3); // dsllv a3, t2, a3 + goto block_4; + } + +// block_3: + c->dsubu(a3, r0, a3); // dsubu a3, r0, a3 + c->dsrav(a3, t2, a3); // dsrav a3, t2, a3 + +block_4: + c->mov64(t2, t3); // or t2, t3, r0 + +block_5: + c->mov64(t3, t0); // or t3, t0, r0 + c->mov64(t4, t1); // or t4, t1, r0 + +block_6: + c->mov64(t5, a2); // or t5, a2, r0 + c->mov64(t6, t4); // or t6, t4, r0 + +block_7: + // nop // sll r0, r0, 0 + c->lbu(t7, 0, t6); // lbu t7, 0(t6) + // nop // sll r0, r0, 0 + c->or_(t7, t7, a3); // or t7, t7, a3 + c->daddiu(t5, t5, -1); // daddiu t5, t5, -1 + c->sb(t7, 0, t6); // sb t7, 0(t6) + bc = c->sgpr64(t5) != 0; // bne t5, r0, L36 + c->daddu(t6, t6, v1); // daddu t6, t6, v1 + if (bc) {goto block_7;} // branch non-likely + + c->daddiu(t3, t3, -1); // daddiu t3, t3, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t3) != 0; // bne t3, r0, L35 + c->daddu(t4, t4, a0); // daddu t4, t4, a0 + if (bc) {goto block_6;} // branch non-likely + + c->daddiu(t2, t2, -1); // daddiu t2, t2, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t2) != 0; // bne t2, r0, L34 + c->daddu(t1, t1, a1); // daddu t1, t1, a1 + if (bc) {goto block_5;} // branch non-likely + + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + c->lh(v1, 56, s5); // lh v1, 56(s5) + c->daddiu(v1, v1, 1); // daddiu v1, v1, 1 + c->sh(v1, 56, s5); // sh v1, 56(s5) + //beq r0, r0, L38 // beq r0, r0, L38 + // nop // sll r0, r0, 0 + goto block_12; // branch always + + +block_11: + c->addiu(gp, r0, -1); // addiu gp, r0, -1 + c->mov64(v1, gp); // or v1, gp, r0 + +block_12: + c->mov64(v0, gp); // or v0, gp, 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 + // nop // sll r0, r0, 0 +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + cache.mem_copy = intern_from_c(-1, 0, "mem-copy!").c(); + gLinkedFunctionTable.reg("(method 38 spatial-hash)", execute, 128); +} + +} // namespace method_38_spatial_hash +} // 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_35_spatial_hash { +struct Cache { + void* perf_stats; // *perf-stats* +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + bool cop1_bc = false; + c->daddiu(sp, sp, -112); // daddiu sp, sp, -112 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s3, 48, sp); // sq s3, 48(sp) + c->sq(s4, 64, sp); // sq s4, 64(sp) + c->sq(s5, 80, sp); // sq s5, 80(sp) + c->sq(gp, 96, sp); // sq gp, 96(sp) + c->mov64(s5, a0); // or s5, a0, r0 + c->mov64(gp, a1); // or gp, a1, r0 + c->mov64(s4, a2); // or s4, a2, r0 + c->mov64(s3, a3); // or s3, a3, r0 + c->load_symbol2(v1, cache.perf_stats); // lw v1, *perf-stats*(s7) + c->daddiu(v1, v1, 116); // daddiu v1, v1, 116 + c->lwu(a0, 28, v1); // lwu a0, 28(v1) + c->lwu(a1, 4, v1); // lwu a1, 4(v1) + c->daddiu(a1, a1, 1); // daddiu a1, a1, 1 + c->sw(a1, 4, v1); // sw a1, 4(v1) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L26 + // nop // sll r0, r0, 0 + if (bc) {goto block_2;} // branch non-likely + + // Unknown instr: mtc0 Perf, r0 + // Unknown instr: sync.l + // Unknown instr: sync.p + // Unknown instr: mtpc pcr0, r0 + // Unknown instr: mtpc pcr1, r0 + // Unknown instr: sync.l + // Unknown instr: sync.p + // Unknown instr: mtc0 Perf, a0 + // Unknown instr: sync.l + // Unknown instr: sync.p + +block_2: + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + c->mov64(a0, s5); // or a0, s5, r0 + c->lwu(v1, -4, a0); // lwu v1, -4(a0) + c->lwu(t9, 104, v1); // lwu t9, 104(v1) + c->daddiu(a1, s5, 4); // daddiu a1, s5, 4 + c->mov64(a2, gp); // or a2, gp, 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 + c->lwu(v1, 0, s5); // lwu v1, 0(s5) + c->daddiu(v1, v1, 12); // daddiu v1, v1, 12 + c->sw(v1, 16, sp); // sw v1, 16(sp) + c->mov64(a0, s5); // or a0, s5, r0 + c->lwu(v1, -4, a0); // lwu v1, -4(a0) + c->lwu(t9, 96, v1); // lwu t9, 96(v1) + c->daddiu(a1, s5, 4); // daddiu a1, s5, 4 + c->lwu(a2, 16, sp); // lwu a2, 16(sp) + 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 + c->sd(r0, 24, sp); // sd r0, 24(sp) + c->sw(s5, 32, sp); // sw s5, 32(sp) + c->sw(s4, 36, sp); // sw s4, 36(sp) + c->sd(s3, 40, sp); // sd s3, 40(sp) + c->lwu(v1, 32, sp); // lwu v1, 32(sp) + c->lh(v1, 10, v1); // lh v1, 10(v1) + c->lwu(a0, 16, sp); // lwu a0, 16(sp) + c->gprs[a1].du64[0] = 0; // or a1, r0, r0 + // nop // sll r0, r0, 0 + +block_3: + c->dsll(a2, a1, 3); // dsll a2, a1, 3 + c->lbu(a3, 0, a0); // lbu a3, 0(a0) + bc = c->sgpr64(a3) == 0; // beq a3, r0, L30 + // nop // sll r0, r0, 0 + if (bc) {goto block_9;} // branch non-likely + + +block_4: + c->andi(t0, a3, 1); // andi t0, a3, 1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t0) == 0; // beq t0, r0, L29 + // nop // sll r0, r0, 0 + if (bc) {goto block_8;} // branch non-likely + + c->lwu(t0, 32, sp); // lwu t0, 32(sp) + c->lwu(t0, 84, t0); // lwu t0, 84(t0) + c->dsll(t1, a2, 4); // dsll t1, a2, 4 + c->daddu(t0, t0, t1); // daddu t0, t0, t1 + c->mov64(t1, gp); // or t1, gp, r0 + c->mov64(t2, t0); // or t2, t0, r0 + c->lqc2(vf2, 0, t1); // lqc2 vf2, 0(t1) + c->lqc2(vf3, 0, t2); // lqc2 vf3, 0(t2) + c->vsub(DEST::xyzw, vf1, vf3, vf2); // vsub.xyzw vf1, vf3, vf2 + c->vmul(DEST::xyzw, vf1, vf1, vf1); // vmul.xyzw vf1, vf1, vf1 + c->vadd_bc(DEST::x, BC::y, vf1, vf1, vf1); // vaddy.x vf1, vf1, vf1 + c->vadd_bc(DEST::x, BC::z, vf1, vf1, vf1); // vaddz.x vf1, vf1, vf1 + c->mov128_gpr_vf(t1, vf1); // qmfc2.i t1, vf1 + c->mtc1(f0, t1); // mtc1 f0, t1 + c->lwc1(f1, 12, gp); // lwc1 f1, 12(gp) + c->lwc1(f2, 12, t0); // lwc1 f2, 12(t0) + c->adds(f1, f1, f2); // add.s f1, f1, f2 + c->muls(f1, f1, f1); // mul.s f1, f1, f1 + c->mfc1(t0, f1); // mfc1 t0, f1 + c->mtc1(f1, t0); // mtc1 f1, t0 + cop1_bc = c->fprs[f0] < c->fprs[f1]; // c.lt.s f0, f1 + bc = !cop1_bc; // bc1f L29 + c->mov64(t0, s7); // or t0, s7, r0 + if (bc) {goto block_8;} // branch non-likely + + c->ld(t0, 24, sp); // ld t0, 24(sp) + c->ld(t1, 40, sp); // ld t1, 40(sp) + c->slt(t0, t0, t1); // slt t0, t0, t1 + bc = c->sgpr64(t0) == 0; // beq t0, r0, L29 + c->mov64(t0, s7); // or t0, s7, r0 + if (bc) {goto block_8;} // branch non-likely + + c->dsll(t0, a2, 4); // dsll t0, a2, 4 + c->lwu(t1, 32, sp); // lwu t1, 32(sp) + c->lwu(t1, 100, t1); // lwu t1, 100(t1) + c->daddu(t0, t0, t1); // daddu t0, t0, t1 + c->lwu(t0, 0, t0); // lwu t0, 0(t0) + c->lwu(t1, 36, sp); // lwu t1, 36(sp) + c->ld(t2, 24, sp); // ld t2, 24(sp) + c->dsll(t2, t2, 2); // dsll t2, t2, 2 + c->daddu(t1, t1, t2); // daddu t1, t1, t2 + c->sw(t0, 0, t1); // sw t0, 0(t1) + c->ld(t0, 24, sp); // ld t0, 24(sp) + c->daddiu(t0, t0, 1); // daddiu t0, t0, 1 + c->sd(t0, 24, sp); // sd t0, 24(sp) + // nop // sll r0, r0, 0 + +block_8: + c->dsra(a3, a3, 1); // dsra a3, a3, 1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(a3) != 0; // bne a3, r0, L28 + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + if (bc) {goto block_4;} // branch non-likely + + +block_9: + c->daddiu(a1, a1, 1); // daddiu a1, a1, 1 + c->daddiu(a0, a0, 1); // daddiu a0, a0, 1 + c->slt(a2, a1, v1); // slt a2, a1, v1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(a2) != 0; // bne a2, r0, L27 + // nop // sll r0, r0, 0 + if (bc) {goto block_3;} // branch non-likely + + c->load_symbol2(v1, cache.perf_stats); // lw v1, *perf-stats*(s7) + c->daddiu(v1, v1, 116); // daddiu v1, v1, 116 + c->lwu(a0, 28, v1); // lwu a0, 28(v1) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L31 + // nop // sll r0, r0, 0 + if (bc) {goto block_12;} // branch non-likely + + // Unknown instr: mtc0 Perf, r0 + // Unknown instr: sync.l + // Unknown instr: sync.p + // Unknown instr: mfpc a0, pcr0 + c->lwu(a1, 32, v1); // lwu a1, 32(v1) + c->daddu(a0, a1, a0); // daddu a0, a1, a0 + c->sw(a0, 32, v1); // sw a0, 32(v1) + // Unknown instr: mfpc a0, pcr1 + c->lwu(a1, 36, v1); // lwu a1, 36(v1) + c->daddu(a0, a1, a0); // daddu a0, a1, a0 + c->sw(a0, 36, v1); // sw a0, 36(v1) + +block_12: + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + c->ld(v0, 24, sp); // ld v0, 24(sp) + 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) + //jr ra // jr ra + c->daddiu(sp, sp, 112); // daddiu sp, sp, 112 + goto end_of_function; // return + + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 + // nop // sll r0, r0, 0 +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + cache.perf_stats = intern_from_c(-1, 0, "*perf-stats*").c(); + gLinkedFunctionTable.reg("(method 35 spatial-hash)", execute, 256); +} + +} // namespace method_35_spatial_hash +} // 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_36_spatial_hash { +struct Cache { + void* vector_vector_distance_squared; // vector-vector-distance-squared +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + bool cop1_bc = false; + c->daddiu(sp, sp, -208); // daddiu sp, sp, -208 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s1, 112, sp); // sq s1, 112(sp) + c->sq(s2, 128, sp); // sq s2, 128(sp) + c->sq(s3, 144, sp); // sq s3, 144(sp) + c->sq(s4, 160, sp); // sq s4, 160(sp) + c->sq(s5, 176, sp); // sq s5, 176(sp) + c->sq(gp, 192, sp); // sq gp, 192(sp) + c->mov64(gp, a0); // or gp, a0, r0 + c->mov64(s5, t2); // or s5, t2, r0 + c->sw(a1, 16, sp); // sw a1, 16(sp) + c->sw(a2, 20, sp); // sw a2, 20(sp) + c->mtc1(f0, a3); // mtc1 f0, a3 + c->swc1(f0, 24, sp); // swc1 f0, 24(sp) + c->sw(t0, 28, sp); // sw t0, 28(sp) + c->sd(t1, 32, sp); // sd t1, 32(sp) + c->mov64(a0, gp); // or a0, gp, r0 + c->lwu(v1, -4, a0); // lwu v1, -4(a0) + c->lwu(t9, 108, v1); // lwu t9, 108(v1) + c->daddiu(a1, gp, 4); // daddiu a1, gp, 4 + c->lwu(a2, 16, sp); // lwu a2, 16(sp) + c->lwu(a3, 20, sp); // lwu a3, 20(sp) + c->lwc1(f0, 24, sp); // lwc1 f0, 24(sp) + c->mfc1(t0, f0); // mfc1 t0, 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->mov64(v1, v0); // or v1, v0, r0 + c->lwu(v1, 0, gp); // lwu v1, 0(gp) + c->daddiu(v1, v1, 12); // daddiu v1, v1, 12 + c->sw(v1, 40, sp); // sw v1, 40(sp) + c->mov64(a0, gp); // or a0, gp, r0 + c->lwu(v1, -4, a0); // lwu v1, -4(a0) + c->lwu(t9, 96, v1); // lwu t9, 96(v1) + c->daddiu(a1, gp, 4); // daddiu a1, gp, 4 + c->lwu(a2, 40, sp); // lwu a2, 40(sp) + 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 + c->addiu(v1, r0, -1); // addiu v1, r0, -1 + bc = c->sgpr64(s5) == c->sgpr64(v1); // beq s5, v1, L19 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_5;} // branch non-likely + + c->dsra(v1, s5, 3); // dsra v1, s5, 3 + c->andi(a1, s5, 7); // andi a1, s5, 7 + c->addiu(a0, r0, 1); // addiu a0, r0, 1 + if (((s64)c->sgpr64(a1)) >= 0) { // bgezl a1, L18 + c->dsllv(a0, a0, a1); // dsllv a0, a0, a1 + goto block_4; + } + +// block_3: + c->dsubu(a1, r0, a1); // dsubu a1, r0, a1 + c->dsrav(a0, a0, a1); // dsrav a0, a0, a1 + +block_4: + c->nor(a0, a0, r0); // nor a0, a0, r0 + c->lwu(a1, 40, sp); // lwu a1, 40(sp) + c->daddu(a1, a1, v1); // daddu a1, a1, v1 + c->lbu(a1, 0, a1); // lbu a1, 0(a1) + c->and_(a0, a1, a0); // and a0, a1, a0 + c->lwu(a1, 40, sp); // lwu a1, 40(sp) + c->daddu(v1, a1, v1); // daddu v1, a1, v1 + c->sb(a0, 0, v1); // sb a0, 0(v1) + +block_5: + c->sd(r0, 64, sp); // sd r0, 64(sp) + c->daddiu(v1, sp, 48); // daddiu v1, sp, 48 + c->sw(v1, 72, sp); // sw v1, 72(sp) + c->mtc1(f0, r0); // mtc1 f0, r0 + c->swc1(f0, 76, sp); // swc1 f0, 76(sp) + c->lwu(v1, 20, sp); // lwu v1, 20(sp) + c->lqc2(vf1, 0, v1); // lqc2 vf1, 0(v1) + c->vadd_bc(DEST::x, BC::w, vf2, vf0, vf0); // vaddw.x vf2, vf0, vf0 + c->vmul(DEST::xyzw, vf1, vf1, vf1); // vmul.xyzw vf1, vf1, vf1 + c->vmula_bc(DEST::x, BC::x, vf2, vf1); // vmulax.x acc, vf2, vf1 + c->vmadda_bc(DEST::x, BC::y, vf2, vf1); // vmadday.x acc, vf2, vf1 + c->vmadd_bc(DEST::x, BC::z, vf1, vf2, vf1); // vmaddz.x vf1, vf2, vf1 + c->mov128_gpr_vf(v1, vf1); // qmfc2.i v1, vf1 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->mtc1(f1, r0); // mtc1 f1, r0 + cop1_bc = c->fprs[f1] < c->fprs[f0]; // c.lt.s f1, f0 + bc = !cop1_bc; // bc1f L20 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_7;} // branch non-likely + + c->lui(v1, 16256); // lui v1, 16256 + c->mtc1(f1, v1); // mtc1 f1, v1 + c->divs(f0, f1, f0); // div.s f0, f1, f0 + c->mfc1(v1, f0); // mfc1 v1, f0 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->swc1(f0, 76, sp); // swc1 f0, 76(sp) + c->mfc1(v1, f0); // mfc1 v1, f0 + +block_7: + c->lh(s5, 10, gp); // lh s5, 10(gp) + c->lwu(s4, 40, sp); // lwu s4, 40(sp) + c->gprs[s3].du64[0] = 0; // or s3, r0, r0 + // nop // sll r0, r0, 0 + +block_8: + c->dsll(s2, s3, 3); // dsll s2, s3, 3 + c->lbu(s1, 0, s4); // lbu s1, 0(s4) + bc = c->sgpr64(s1) == 0; // beq s1, r0, L24 + // nop // sll r0, r0, 0 + if (bc) {goto block_14;} // branch non-likely + + +block_9: + c->andi(v1, s1, 1); // andi v1, s1, 1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L23 + // nop // sll r0, r0, 0 + if (bc) {goto block_13;} // branch non-likely + + c->lwu(v1, 84, gp); // lwu v1, 84(gp) + c->dsll(a0, s2, 4); // dsll a0, s2, 4 + c->daddu(v1, v1, a0); // daddu v1, v1, a0 + c->sw(v1, 80, sp); // sw v1, 80(sp) + c->daddiu(v1, sp, 96); // daddiu v1, sp, 96 + c->mov64(a2, v1); // or a2, v1, r0 + c->lwu(a0, 80, sp); // lwu a0, 80(sp) + c->lwu(a1, 16, sp); // lwu a1, 16(sp) + c->lqc2(vf4, 0, a0); // lqc2 vf4, 0(a0) + c->lqc2(vf5, 0, a1); // lqc2 vf5, 0(a1) + c->vmove(DEST::w, vf6, vf0); // vmove.w vf6, vf0 + c->vsub(DEST::xyz, vf6, vf4, vf5); // vsub.xyz vf6, vf4, vf5 + c->sqc2(vf6, 0, a2); // sqc2 vf6, 0(a2) + c->lwu(a0, 20, sp); // lwu a0, 20(sp) + c->lwc1(f0, 0, a0); // lwc1 f0, 0(a0) + c->lwc1(f1, 4, a0); // lwc1 f1, 4(a0) + c->lwc1(f2, 8, a0); // lwc1 f2, 8(a0) + c->lwc1(f3, 0, v1); // lwc1 f3, 0(v1) + c->lwc1(f4, 4, v1); // lwc1 f4, 4(v1) + c->lwc1(f5, 8, v1); // lwc1 f5, 8(v1) + // Unknown instr: mula.s f0, f3 + // Unknown instr: madda.s f1, f4 + // Unknown instr: madd.s f0, f2, f5 + c->fprs[f0] = (c->fprs[f0] * c->fprs[f3]) + (c->fprs[f1] * c->fprs[f4]) + (c->fprs[f2] * c->fprs[f5]); + c->mfc1(v1, f0); // mfc1 v1, f0 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->lwc1(f1, 76, sp); // lwc1 f1, 76(sp) + c->muls(f1, f0, f1); // mul.s f1, f0, f1 + c->mtc1(f0, r0); // mtc1 f0, r0 + c->lui(v1, 16256); // lui v1, 16256 + c->mtc1(f2, v1); // mtc1 f2, v1 + c->mins(f1, f2, f1); // min.s f1, f2, f1 + c->maxs(f0, f0, f1); // max.s f0, f0, f1 + c->lwu(v1, 72, sp); // lwu v1, 72(sp) + c->lwu(a0, 16, sp); // lwu a0, 16(sp) + c->lwu(a1, 20, sp); // lwu a1, 20(sp) + c->lqc2(vf2, 0, a1); // lqc2 vf2, 0(a1) + c->lqc2(vf1, 0, a0); // lqc2 vf1, 0(a0) + c->mfc1(a0, f0); // mfc1 a0, f0 + c->mov128_vf_gpr(vf3, a0); // qmtc2.i vf3, a0 + c->vadd_bc(DEST::w, BC::x, vf4, vf0, vf0); // vaddx.w vf4, vf0, vf0 + c->vmula_bc(DEST::xyzw, BC::x, vf2, vf3); // vmulax.xyzw acc, vf2, vf3 + c->vmadd_bc(DEST::xyz, BC::w, vf4, vf1, vf0); // vmaddw.xyz vf4, vf1, vf0 + c->sqc2(vf4, 0, v1); // sqc2 vf4, 0(v1) + c->load_symbol2(t9, cache.vector_vector_distance_squared);// lw t9, vector-vector-distance-squared(s7) + c->lwu(a0, 72, sp); // lwu a0, 72(sp) + c->lwu(a1, 80, sp); // lwu a1, 80(sp) + 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->lwc1(f1, 24, sp); // lwc1 f1, 24(sp) + c->lwu(v1, 80, sp); // lwu v1, 80(sp) + c->lwc1(f2, 12, v1); // lwc1 f2, 12(v1) + c->adds(f1, f1, f2); // add.s f1, f1, f2 + c->muls(f1, f1, f1); // mul.s f1, f1, f1 + c->mfc1(v1, f1); // mfc1 v1, f1 + c->mtc1(f1, v1); // mtc1 f1, v1 + cop1_bc = c->fprs[f0] < c->fprs[f1]; // c.lt.s f0, f1 + bc = !cop1_bc; // bc1f L23 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_13;} // branch non-likely + + c->ld(v1, 64, sp); // ld v1, 64(sp) + c->ld(a0, 32, sp); // ld a0, 32(sp) + c->slt(v1, v1, a0); // slt v1, v1, a0 + bc = c->sgpr64(v1) == 0; // beq v1, r0, L23 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_13;} // branch non-likely + + c->dsll(v1, s2, 4); // dsll v1, s2, 4 + c->lwu(a0, 100, gp); // lwu a0, 100(gp) + c->daddu(v1, v1, a0); // daddu v1, v1, a0 + c->lwu(v1, 0, v1); // lwu v1, 0(v1) + c->lwu(a0, 28, sp); // lwu a0, 28(sp) + c->ld(a1, 64, sp); // ld a1, 64(sp) + c->dsll(a1, a1, 2); // dsll a1, a1, 2 + c->daddu(a0, a0, a1); // daddu a0, a0, a1 + c->sw(v1, 0, a0); // sw v1, 0(a0) + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + c->ld(v1, 64, sp); // ld v1, 64(sp) + c->daddiu(v1, v1, 1); // daddiu v1, v1, 1 + c->sd(v1, 64, sp); // sd v1, 64(sp) + // nop // sll r0, r0, 0 + +block_13: + c->dsra(s1, s1, 1); // dsra s1, s1, 1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(s1) != 0; // bne s1, r0, L22 + c->daddiu(s2, s2, 1); // daddiu s2, s2, 1 + if (bc) {goto block_9;} // branch non-likely + + +block_14: + c->daddiu(s3, s3, 1); // daddiu s3, s3, 1 + c->daddiu(s4, s4, 1); // daddiu s4, s4, 1 + c->slt(v1, s3, s5); // slt v1, s3, s5 + // nop // sll r0, r0, 0 + bc = c->sgpr64(v1) != 0; // bne v1, r0, L21 + // nop // sll r0, r0, 0 + if (bc) {goto block_8;} // branch non-likely + + c->ld(v0, 64, sp); // ld v0, 64(sp) + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 192, sp); // lq gp, 192(sp) + c->lq(s5, 176, sp); // lq s5, 176(sp) + c->lq(s4, 160, sp); // lq s4, 160(sp) + c->lq(s3, 144, sp); // lq s3, 144(sp) + c->lq(s2, 128, sp); // lq s2, 128(sp) + c->lq(s1, 112, sp); // lq s1, 112(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 208); // daddiu sp, sp, 208 + 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.vector_vector_distance_squared = intern_from_c(-1, 0, "vector-vector-distance-squared").c(); + gLinkedFunctionTable.reg("(method 36 spatial-hash)", execute, 256); +} + +} // namespace method_36_spatial_hash +} // 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_34_spatial_hash { +struct Cache { + void* perf_stats; // *perf-stats* +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + bool cop1_bc = false; + c->daddiu(sp, sp, -64); // daddiu sp, sp, -64 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(gp, 48, sp); // sq gp, 48(sp) + c->mov64(gp, a1); // or gp, a1, r0 + c->load_symbol2(v1, cache.perf_stats); // lw v1, *perf-stats*(s7) + c->daddiu(v1, v1, 116); // daddiu v1, v1, 116 + c->lwu(a1, 28, v1); // lwu a1, 28(v1) + c->lwu(t0, 4, v1); // lwu t0, 4(v1) + c->daddiu(t0, t0, 1); // daddiu t0, t0, 1 + c->sw(t0, 4, v1); // sw t0, 4(v1) + bc = c->sgpr64(a1) == 0; // beq a1, r0, L3 + // nop // sll r0, r0, 0 + if (bc) {goto block_2;} // branch non-likely + + // Unknown instr: mtc0 Perf, r0 + // Unknown instr: sync.l + // Unknown instr: sync.p + // Unknown instr: mtpc pcr0, r0 + // Unknown instr: mtpc pcr1, r0 + // Unknown instr: sync.l + // Unknown instr: sync.p + // Unknown instr: mtc0 Perf, a1 + // Unknown instr: sync.l + // Unknown instr: sync.p + +block_2: + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + c->mov64(v1, a0); // or v1, a0, r0 + c->daddiu(a1, a0, 4); // daddiu a1, a0, 4 + c->daddu(t0, r0, gp); // daddu t0, r0, gp + c->daddiu(t1, gp, 16); // daddiu t1, gp, 16 + c->addiu(t2, r0, 0); // addiu t2, r0, 0 + //beq r0, r0, L5 // beq r0, r0, L5 + // nop // sll r0, r0, 0 + goto block_4; // branch always + + +block_3: + c->mtc1(f0, r0); // mtc1 f0, r0 + c->dsll(t3, t2, 2); // dsll t3, t2, 2 + c->daddu(t3, t3, t0); // daddu t3, t3, t0 + c->lwc1(f1, 0, t3); // lwc1 f1, 0(t3) + c->dsll(t3, t2, 2); // dsll t3, t2, 2 + c->daddu(t3, t3, v1); // daddu t3, t3, v1 + c->lwc1(f2, 32, t3); // lwc1 f2, 32(t3) + c->subs(f1, f1, f2); // sub.s f1, f1, f2 + c->dsll(t3, t2, 2); // dsll t3, t2, 2 + c->daddu(t3, t3, v1); // daddu t3, t3, v1 + c->lwc1(f2, 12, t3); // lwc1 f2, 12(t3) + c->muls(f1, f1, f2); // mul.s f1, f1, f2 + c->daddu(t3, t2, v1); // daddu t3, t2, v1 + c->lb(t3, 24, t3); // lb t3, 24(t3) + c->daddiu(t3, t3, -1); // daddiu t3, t3, -1 + c->mtc1(f2, t3); // mtc1 f2, t3 + c->cvtsw(f2, f2); // cvt.s.w f2, f2 + c->mins(f1, f1, f2); // min.s f1, f1, f2 + c->maxs(f0, f0, f1); // max.s f0, f0, f1 + c->cvtws(f0, f0); // cvt.w.s f0, f0 + c->mfc1(t3, f0); // mfc1 t3, f0 + c->daddu(t4, t2, a1); // daddu t4, t2, a1 + c->sb(t3, 0, t4); // sb t3, 0(t4) + c->mtc1(f0, r0); // mtc1 f0, r0 + c->dsll(t3, t2, 2); // dsll t3, t2, 2 + c->daddu(t3, t3, t1); // daddu t3, t3, t1 + c->lwc1(f1, 0, t3); // lwc1 f1, 0(t3) + c->dsll(t3, t2, 2); // dsll t3, t2, 2 + c->daddu(t3, t3, v1); // daddu t3, t3, v1 + c->lwc1(f2, 32, t3); // lwc1 f2, 32(t3) + c->subs(f1, f1, f2); // sub.s f1, f1, f2 + c->dsll(t3, t2, 2); // dsll t3, t2, 2 + c->daddu(t3, t3, v1); // daddu t3, t3, v1 + c->lwc1(f2, 12, t3); // lwc1 f2, 12(t3) + c->muls(f1, f1, f2); // mul.s f1, f1, f2 + c->daddu(t3, t2, v1); // daddu t3, t2, v1 + c->lb(t3, 24, t3); // lb t3, 24(t3) + c->daddiu(t3, t3, -1); // daddiu t3, t3, -1 + c->mtc1(f2, t3); // mtc1 f2, t3 + c->cvtsw(f2, f2); // cvt.s.w f2, f2 + c->mins(f1, f1, f2); // min.s f1, f1, f2 + c->maxs(f0, f0, f1); // max.s f0, f0, f1 + c->cvtws(f0, f0); // cvt.w.s f0, f0 + c->mfc1(t3, f0); // mfc1 t3, f0 + c->daddu(t4, t2, a1); // daddu t4, t2, a1 + c->sb(t3, 3, t4); // sb t3, 3(t4) + c->daddiu(t2, t2, 1); // daddiu t2, t2, 1 + +block_4: + c->slti(t3, t2, 3); // slti t3, t2, 3 + bc = c->sgpr64(t3) != 0; // bne t3, r0, L4 + // nop // sll r0, r0, 0 + if (bc) {goto block_3;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + c->mov64(v1, s7); // or v1, s7, r0 + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + c->lwu(v1, 0, a0); // lwu v1, 0(a0) + c->daddiu(v1, v1, 12); // daddiu v1, v1, 12 + c->sw(v1, 16, sp); // sw v1, 16(sp) + c->sw(a0, 20, sp); // sw a0, 20(sp) + c->sw(a2, 24, sp); // sw a2, 24(sp) + c->sd(a3, 32, sp); // sd a3, 32(sp) + c->lwu(a0, 20, sp); // lwu a0, 20(sp) + c->lwu(v1, -4, a0); // lwu v1, -4(a0) + c->lwu(t9, 96, v1); // lwu t9, 96(v1) + c->lwu(v1, 20, sp); // lwu v1, 20(sp) + c->daddiu(a1, v1, 4); // daddiu a1, v1, 4 + c->lwu(a2, 16, sp); // lwu a2, 16(sp) + 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 + c->sd(r0, 40, sp); // sd r0, 40(sp) + c->lwu(v1, 20, sp); // lwu v1, 20(sp) + c->lh(v1, 10, v1); // lh v1, 10(v1) + c->lwu(a0, 16, sp); // lwu a0, 16(sp) + c->gprs[a1].du64[0] = 0; // or a1, r0, r0 + +block_6: + c->dsll(a2, a1, 3); // dsll a2, a1, 3 + c->lbu(a3, 0, a0); // lbu a3, 0(a0) + bc = c->sgpr64(a3) == 0; // beq a3, r0, L15 + // nop // sll r0, r0, 0 + if (bc) {goto block_34;} // branch non-likely + + +block_7: + c->andi(t0, a3, 1); // andi t0, a3, 1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t0) == 0; // beq t0, r0, L14 + // nop // sll r0, r0, 0 + if (bc) {goto block_33;} // branch non-likely + + c->lwu(t0, 20, sp); // lwu t0, 20(sp) + c->lwu(t0, 84, t0); // lwu t0, 84(t0) + c->dsll(t1, a2, 4); // dsll t1, a2, 4 + c->daddu(t0, t0, t1); // daddu t0, t0, t1 + c->lwc1(f0, 0, t0); // lwc1 f0, 0(t0) + c->lwc1(f1, 12, t0); // lwc1 f1, 12(t0) + c->adds(f0, f0, f1); // add.s f0, f0, f1 + c->lwc1(f1, 0, gp); // lwc1 f1, 0(gp) + cop1_bc = c->fprs[f0] < c->fprs[f1]; // c.lt.s f0, f1 + bc = !cop1_bc; // bc1f L8 + c->daddiu(t1, s7, 4); // daddiu t1, s7, 4 + if (bc) {goto block_10;} // branch non-likely + + c->mov64(t1, s7); // or t1, s7, r0 + +block_10: + if (((s64)c->sgpr64(s7)) == ((s64)c->sgpr64(t1))) {// beql s7, t1, L13 + c->mov64(t0, t1); // or t0, t1, r0 + goto block_30; + } + +// block_12: + c->lwc1(f0, 16, gp); // lwc1 f0, 16(gp) + c->lwc1(f1, 0, t0); // lwc1 f1, 0(t0) + c->lwc1(f2, 12, t0); // lwc1 f2, 12(t0) + c->subs(f1, f1, f2); // sub.s f1, f1, f2 + cop1_bc = c->fprs[f0] < c->fprs[f1]; // c.lt.s f0, f1 + bc = !cop1_bc; // bc1f L9 + c->daddiu(t1, s7, 4); // daddiu t1, s7, 4 + if (bc) {goto block_14;} // branch non-likely + + c->mov64(t1, s7); // or t1, s7, r0 + +block_14: + if (((s64)c->sgpr64(s7)) == ((s64)c->sgpr64(t1))) {// beql s7, t1, L13 + c->mov64(t0, t1); // or t0, t1, r0 + goto block_30; + } + +// block_16: + c->lwc1(f0, 4, t0); // lwc1 f0, 4(t0) + c->lwc1(f1, 12, t0); // lwc1 f1, 12(t0) + c->adds(f0, f0, f1); // add.s f0, f0, f1 + c->lwc1(f1, 4, gp); // lwc1 f1, 4(gp) + cop1_bc = c->fprs[f0] < c->fprs[f1]; // c.lt.s f0, f1 + bc = !cop1_bc; // bc1f L10 + c->daddiu(t1, s7, 4); // daddiu t1, s7, 4 + if (bc) {goto block_18;} // branch non-likely + + c->mov64(t1, s7); // or t1, s7, r0 + +block_18: + if (((s64)c->sgpr64(s7)) == ((s64)c->sgpr64(t1))) {// beql s7, t1, L13 + c->mov64(t0, t1); // or t0, t1, r0 + goto block_30; + } + +// block_20: + c->lwc1(f0, 20, gp); // lwc1 f0, 20(gp) + c->lwc1(f1, 4, t0); // lwc1 f1, 4(t0) + c->lwc1(f2, 12, t0); // lwc1 f2, 12(t0) + c->subs(f1, f1, f2); // sub.s f1, f1, f2 + cop1_bc = c->fprs[f0] < c->fprs[f1]; // c.lt.s f0, f1 + bc = !cop1_bc; // bc1f L11 + c->daddiu(t1, s7, 4); // daddiu t1, s7, 4 + if (bc) {goto block_22;} // branch non-likely + + c->mov64(t1, s7); // or t1, s7, r0 + +block_22: + if (((s64)c->sgpr64(s7)) == ((s64)c->sgpr64(t1))) {// beql s7, t1, L13 + c->mov64(t0, t1); // or t0, t1, r0 + goto block_30; + } + +// block_24: + c->lwc1(f0, 8, t0); // lwc1 f0, 8(t0) + c->lwc1(f1, 12, t0); // lwc1 f1, 12(t0) + c->adds(f0, f0, f1); // add.s f0, f0, f1 + c->lwc1(f1, 8, gp); // lwc1 f1, 8(gp) + cop1_bc = c->fprs[f0] < c->fprs[f1]; // c.lt.s f0, f1 + bc = !cop1_bc; // bc1f L12 + c->daddiu(t1, s7, 4); // daddiu t1, s7, 4 + if (bc) {goto block_26;} // branch non-likely + + c->mov64(t1, s7); // or t1, s7, r0 + +block_26: + if (((s64)c->sgpr64(s7)) == ((s64)c->sgpr64(t1))) {// beql s7, t1, L13 + c->mov64(t0, t1); // or t0, t1, r0 + goto block_30; + } + +// block_28: + c->lwc1(f0, 24, gp); // lwc1 f0, 24(gp) + c->lwc1(f1, 8, t0); // lwc1 f1, 8(t0) + c->lwc1(f2, 12, t0); // lwc1 f2, 12(t0) + c->subs(f1, f1, f2); // sub.s f1, f1, f2 + cop1_bc = c->fprs[f0] < c->fprs[f1]; // c.lt.s f0, f1 + bc = !cop1_bc; // bc1f L13 + c->daddiu(t0, s7, 4); // daddiu t0, s7, 4 + if (bc) {goto block_30;} // branch non-likely + + c->mov64(t0, s7); // or t0, s7, r0 + +block_30: + bc = c->sgpr64(s7) == c->sgpr64(t0); // beq s7, t0, L14 + c->mov64(t0, s7); // or t0, s7, r0 + if (bc) {goto block_33;} // branch non-likely + + c->ld(t0, 40, sp); // ld t0, 40(sp) + c->ld(t1, 32, sp); // ld t1, 32(sp) + c->slt(t0, t0, t1); // slt t0, t0, t1 + bc = c->sgpr64(t0) == 0; // beq t0, r0, L14 + c->mov64(t0, s7); // or t0, s7, r0 + if (bc) {goto block_33;} // branch non-likely + + c->dsll(t0, a2, 4); // dsll t0, a2, 4 + c->lwu(t1, 20, sp); // lwu t1, 20(sp) + c->lwu(t1, 100, t1); // lwu t1, 100(t1) + c->daddu(t0, t0, t1); // daddu t0, t0, t1 + c->lwu(t0, 0, t0); // lwu t0, 0(t0) + c->lwu(t1, 24, sp); // lwu t1, 24(sp) + c->ld(t2, 40, sp); // ld t2, 40(sp) + c->dsll(t2, t2, 2); // dsll t2, t2, 2 + c->daddu(t1, t1, t2); // daddu t1, t1, t2 + c->sw(t0, 0, t1); // sw t0, 0(t1) + c->ld(t0, 40, sp); // ld t0, 40(sp) + c->daddiu(t0, t0, 1); // daddiu t0, t0, 1 + c->sd(t0, 40, sp); // sd t0, 40(sp) + +block_33: + c->dsra(a3, a3, 1); // dsra a3, a3, 1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(a3) != 0; // bne a3, r0, L7 + c->daddiu(a2, a2, 1); // daddiu a2, a2, 1 + if (bc) {goto block_7;} // branch non-likely + + +block_34: + c->daddiu(a1, a1, 1); // daddiu a1, a1, 1 + c->daddiu(a0, a0, 1); // daddiu a0, a0, 1 + c->slt(a2, a1, v1); // slt a2, a1, v1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(a2) != 0; // bne a2, r0, L6 + // nop // sll r0, r0, 0 + if (bc) {goto block_6;} // branch non-likely + + c->load_symbol2(v1, cache.perf_stats); // lw v1, *perf-stats*(s7) + c->daddiu(v1, v1, 116); // daddiu v1, v1, 116 + c->lwu(a0, 28, v1); // lwu a0, 28(v1) + bc = c->sgpr64(a0) == 0; // beq a0, r0, L16 + // nop // sll r0, r0, 0 + if (bc) {goto block_37;} // branch non-likely + + // Unknown instr: mtc0 Perf, r0 + // Unknown instr: sync.l + // Unknown instr: sync.p + // Unknown instr: mfpc a0, pcr0 + c->lwu(a1, 32, v1); // lwu a1, 32(v1) + c->daddu(a0, a1, a0); // daddu a0, a1, a0 + c->sw(a0, 32, v1); // sw a0, 32(v1) + // Unknown instr: mfpc a0, pcr1 + c->lwu(a1, 36, v1); // lwu a1, 36(v1) + c->daddu(a0, a1, a0); // daddu a0, a1, a0 + c->sw(a0, 36, v1); // sw a0, 36(v1) + +block_37: + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + c->ld(v0, 40, sp); // ld v0, 40(sp) + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lq(gp, 48, sp); // lq gp, 48(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 64); // daddiu sp, sp, 64 + 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.perf_stats = intern_from_c(-1, 0, "*perf-stats*").c(); + gLinkedFunctionTable.reg("(method 34 spatial-hash)", execute, 128); +} + +} // namespace method_34_spatial_hash +} // namespace Mips2C \ No newline at end of file diff --git a/game/mips2c/jak3_functions/texture.cpp b/game/mips2c/jak3_functions/texture.cpp new file mode 100644 index 0000000000..7fe6f0278e --- /dev/null +++ b/game/mips2c/jak3_functions/texture.cpp @@ -0,0 +1,188 @@ +//--------------------------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 adgif_shader_texture_with_update { +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + c->ld(a2, 16, a0); // ld a2, 16(a0) + c->addiu(v1, r0, 256); // addiu v1, r0, 256 + c->andi(a2, a2, 513); // andi a2, a2, 513 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->cvtsw(f0, f0); // cvt.s.w f0, f0 + c->lbu(v1, 4, a1); // lbu v1, 4(a1) + c->lwc1(f1, 44, a1); // lwc1 f1, 44(a1) + c->daddiu(v1, v1, -1); // daddiu v1, v1, -1 + c->divs(f0, f0, f1); // div.s f0, f0, f1 + c->dsll(v1, v1, 2); // dsll v1, v1, 2 + c->or_(a2, a2, v1); // or a2, a2, v1 + c->lbu(v1, 7, a1); // lbu v1, 7(a1) + c->dsll(v1, v1, 19); // dsll v1, v1, 19 + c->lbu(a3, 5, a1); // lbu a3, 5(a1) + c->or_(a2, a2, v1); // or a2, a2, v1 + c->dsll(a3, a3, 5); // dsll a3, a3, 5 + c->or_(a2, a2, a3); // or a2, a2, a3 + c->ld(t1, 0, a0); // ld t1, 0(a0) + c->dsll(t1, t1, 27); // dsll t1, t1, 27 + c->lbu(v1, 6, a1); // lbu v1, 6(a1) + c->dsra32(t1, t1, 30); // dsra32 t1, t1, 30 + c->dsll(v1, v1, 20); // dsll v1, v1, 20 + c->dsll32(t1, t1, 3); // dsll32 t1, t1, 3 + c->lhu(a3, 10, a1); // lhu a3, 10(a1) + c->or_(t1, t1, v1); // or t1, t1, v1 + c->lbu(v1, 26, a1); // lbu v1, 26(a1) + c->or_(t1, t1, a3); // or t1, t1, a3 + c->dsll(v1, v1, 14); // dsll v1, v1, 14 + c->or_(t1, t1, v1); // or t1, t1, v1 + c->lhu(v1, 0, a1); // lhu v1, 0(a1) + c->plzcw(v1, v1); // plzcw v1, v1 + c->addiu(t0, r0, 30); // addiu t0, r0, 30 + c->subu(v1, t0, v1); // subu v1, t0, v1 + c->lhu(a3, 2, a1); // lhu a3, 2(a1) + c->dsll(v1, v1, 26); // dsll v1, v1, 26 + c->plzcw(a3, a3); // plzcw a3, a3 + c->or_(t1, t1, v1); // or t1, t1, v1 + c->subu(a3, t0, a3); // subu a3, t0, a3 + c->dsll(a3, a3, 30); // dsll a3, a3, 30 + c->addiu(v1, r0, 1); // addiu v1, r0, 1 + c->or_(t1, t1, a3); // or t1, t1, a3 + c->dsll32(v1, v1, 2); // dsll32 v1, v1, 2 + c->or_(t1, t1, v1); // or t1, t1, v1 + c->lhu(v1, 24, a1); // lhu v1, 24(a1) + c->dsll32(v1, v1, 5); // dsll32 v1, v1, 5 + c->lhu(a3, 8, a1); // lhu a3, 8(a1) + c->dsll32(a3, a3, 19); // dsll32 a3, a3, 19 + c->or_(t1, t1, v1); // or t1, t1, v1 + c->or_(t1, t1, a3); // or t1, t1, a3 + c->addiu(v1, r0, 1); // addiu v1, r0, 1 + c->dsll32(v1, v1, 29); // dsll32 v1, v1, 29 + c->cvtws(f0, f0); // cvt.w.s f0, f0 + c->or_(t1, t1, v1); // or t1, t1, v1 + c->mfc1(v1, f0); // mfc1 v1, f0 + c->sd(t1, 0, a0); // sd t1, 0(a0) + c->plzcw(a3, v1); // plzcw a3, v1 + c->subu(a3, t0, a3); // subu a3, t0, a3 + c->lbu(t0, 7, a1); // lbu t0, 7(a1) + c->daddiu(t0, t0, -1); // daddiu t0, t0, -1 + // nop // sll r0, r0, 0 + bc = c->sgpr64(t0) == 0; // beq t0, r0, L43 + // nop // sll r0, r0, 0 + if (bc) {goto block_5;} // branch non-likely + + c->daddiu(t0, a3, -4); // daddiu t0, a3, -4 + c->dsll(a3, a3, 4); // dsll a3, a3, 4 + bc = ((s64)c->sgpr64(t0)) < 0; // bltz t0, L41 + c->daddiu(a3, a3, -175); // daddiu a3, a3, -175 + if (bc) {goto block_3;} // branch non-likely + + //beq r0, r0, L42 // beq r0, r0, L42 + c->dsrav(t0, v1, t0); // dsrav t0, v1, t0 + goto block_4; // branch always + + +block_3: + c->dsubu(t0, r0, t0); // dsubu t0, r0, t0 + c->dsllv(t0, v1, t0); // dsllv t0, v1, t0 + +block_4: + c->andi(t0, t0, 15); // andi t0, t0, 15 + // nop // sll r0, r0, 0 + //beq r0, r0, L46 // beq r0, r0, L46 + c->daddu(a3, a3, t0); // daddu a3, a3, t0 + goto block_9; // branch always + + +block_5: + c->daddiu(t0, a3, -5); // daddiu t0, a3, -5 + c->dsll(a3, a3, 5); // dsll a3, a3, 5 + bc = ((s64)c->sgpr64(t0)) < 0; // bltz t0, L44 + c->daddiu(a3, a3, -350); // daddiu a3, a3, -350 + if (bc) {goto block_7;} // branch non-likely + + //beq r0, r0, L45 // beq r0, r0, L45 + c->dsrav(t0, v1, t0); // dsrav t0, v1, t0 + goto block_8; // branch always + + +block_7: + c->dsubu(t0, r0, t0); // dsubu t0, r0, t0 + c->dsllv(t0, v1, t0); // dsllv t0, v1, t0 + +block_8: + c->andi(t0, t0, 31); // andi t0, t0, 31 + // nop // sll r0, r0, 0 + c->daddu(a3, a3, t0); // daddu a3, a3, t0 + // nop // sll r0, r0, 0 + +block_9: + c->andi(a3, a3, 4095); // andi a3, a3, 4095 + c->lhu(t1, 12, a1); // lhu t1, 12(a1) + c->dsll32(a3, a3, 0); // dsll32 a3, a3, 0 + c->lbu(v1, 27, a1); // lbu v1, 27(a1) + c->or_(a2, a2, a3); // or a2, a2, a3 + c->dsll(v1, v1, 14); // dsll v1, v1, 14 + c->sd(a2, 16, a0); // sd a2, 16(a0) + c->or_(a2, t1, v1); // or a2, t1, v1 + c->lhu(v1, 14, a1); // lhu v1, 14(a1) + // nop // sll r0, r0, 0 + c->lbu(a3, 28, a1); // lbu a3, 28(a1) + c->dsll(v1, v1, 20); // dsll v1, v1, 20 + c->or_(a2, a2, v1); // or a2, a2, v1 + c->dsll32(a3, a3, 2); // dsll32 a3, a3, 2 + c->or_(a2, a2, a3); // or a2, a2, a3 + c->lhu(v1, 16, a1); // lhu v1, 16(a1) + c->lbu(a3, 29, a1); // lbu a3, 29(a1) + c->dsll32(v1, v1, 8); // dsll32 v1, v1, 8 + c->or_(a2, a2, v1); // or a2, a2, v1 + c->dsll32(a3, a3, 22); // dsll32 a3, a3, 22 + c->or_(a2, a2, a3); // or a2, a2, a3 + c->lbu(t0, 4, a1); // lbu t0, 4(a1) + c->daddiu(t0, t0, -5); // daddiu t0, t0, -5 + c->sd(a2, 32, a0); // sd a2, 32(a0) + bc = ((s64)c->sgpr64(t0)) < 0; // bltz t0, L47 + c->lbu(a3, 30, a1); // lbu a3, 30(a1) + if (bc) {goto block_11;} // branch non-likely + + c->lhu(a2, 18, a1); // lhu a2, 18(a1) + c->dsll(a3, a3, 14); // dsll a3, a3, 14 + c->or_(a2, a2, a3); // or a2, a2, a3 + c->lhu(v1, 20, a1); // lhu v1, 20(a1) + c->dsll(v1, v1, 20); // dsll v1, v1, 20 + c->lbu(a3, 31, a1); // lbu a3, 31(a1) + c->or_(a2, a2, v1); // or a2, a2, v1 + c->dsll32(a3, a3, 2); // dsll32 a3, a3, 2 + c->or_(a2, a2, a3); // or a2, a2, a3 + c->lhu(v1, 22, a1); // lhu v1, 22(a1) + c->dsll32(v1, v1, 8); // dsll32 v1, v1, 8 + c->lbu(a3, 32, a1); // lbu a3, 32(a1) + c->or_(a2, a2, v1); // or a2, a2, v1 + c->dsll32(a3, a3, 22); // dsll32 a3, a3, 22 + c->or_(a2, a2, a3); // or a2, a2, a3 + c->addiu(v1, r0, 54); // addiu v1, r0, 54 + c->sd(a2, 64, a0); // sd a2, 64(a0) + // nop // sll r0, r0, 0 + c->sw(v1, 72, a0); // sw v1, 72(a0) + // nop // sll r0, r0, 0 + +block_11: + c->mov64(v0, a0); // or v0, a0, 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() { + gLinkedFunctionTable.reg("adgif-shader<-texture-with-update!", execute, 128); +} + +} // namespace adgif_shader<_texture_with_update +} // namespace Mips2C + diff --git a/game/mips2c/jak3_functions/wvehicle_part.cpp b/game/mips2c/jak3_functions/wvehicle_part.cpp new file mode 100644 index 0000000000..a1fe589ef0 --- /dev/null +++ b/game/mips2c/jak3_functions/wvehicle_part.cpp @@ -0,0 +1,252 @@ +//--------------------------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 sparticle_motion_blur_dirt { +struct Cache { + void* target; // *target* + void* atan; // atan + void* transform_point_qword; // transform-point-qword! +} cache; + +u64 execute(void* ctxt) { + auto* c = (ExecutionContext*)ctxt; + bool bc = false; + u32 call_addr = 0; + bool cop1_bc = false; + c->daddiu(sp, sp, -144); // daddiu sp, sp, -144 + c->sd(ra, 0, sp); // sd ra, 0(sp) + c->sq(s4, 80, sp); // sq s4, 80(sp) + c->sq(s5, 96, sp); // sq s5, 96(sp) + c->sq(gp, 112, sp); // sq gp, 112(sp) + c->swc1(f26, 128, sp); // swc1 f26, 128(sp) + c->swc1(f28, 132, sp); // swc1 f28, 132(sp) + c->swc1(f30, 136, sp); // swc1 f30, 136(sp) + c->mov64(s4, a1); // or s4, a1, r0 + c->mov64(gp, a2); // or gp, a2, r0 + c->daddiu(s5, sp, 16); // daddiu s5, sp, 16 + c->lwc1(f0, 0, gp); // lwc1 f0, 0(gp) + c->swc1(f0, 0, s5); // swc1 f0, 0(s5) + c->lwc1(f0, 4, gp); // lwc1 f0, 4(gp) + c->swc1(f0, 4, s5); // swc1 f0, 4(s5) + c->lwc1(f0, 8, gp); // lwc1 f0, 8(gp) + c->swc1(f0, 8, s5); // swc1 f0, 8(s5) + c->lui(v1, 16256); // lui v1, 16256 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->swc1(f0, 12, s5); // swc1 f0, 12(s5) + c->lwc1(f0, 16, s4); // lwc1 f0, 16(s4) + c->mtc1(f1, r0); // mtc1 f1, r0 + cop1_bc = c->fprs[f0] == c->fprs[f1]; // c.eq.s f0, f1 + bc = !cop1_bc; // bc1f L13 + c->daddiu(v1, s7, 4); // daddiu v1, s7, 4 + if (bc) {goto block_2;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + +block_2: + if (((s64)c->sgpr64(s7)) != ((s64)c->sgpr64(v1))) {// bnel s7, v1, L15 + c->mov64(v1, v1); // or v1, v1, r0 + goto block_10; + } + +block_4: + c->lwc1(f0, 20, s4); // lwc1 f0, 20(s4) + c->mtc1(f1, r0); // mtc1 f1, r0 + cop1_bc = c->fprs[f0] == c->fprs[f1]; // c.eq.s f0, f1 + bc = !cop1_bc; // bc1f L14 + c->daddiu(v1, s7, 4); // daddiu v1, s7, 4 + if (bc) {goto block_6;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + +block_6: + if (((s64)c->sgpr64(s7)) != ((s64)c->sgpr64(v1))) {// bnel s7, v1, L15 + c->mov64(v1, v1); // or v1, v1, r0 + goto block_10; + } + +block_8: + c->lwc1(f0, 24, s4); // lwc1 f0, 24(s4) + c->mtc1(f1, r0); // mtc1 f1, r0 + cop1_bc = c->fprs[f0] == c->fprs[f1]; // c.eq.s f0, f1 + bc = !cop1_bc; // bc1f L15 + c->daddiu(v1, s7, 4); // daddiu v1, s7, 4 + if (bc) {goto block_10;} // branch non-likely + + c->mov64(v1, s7); // or v1, s7, r0 + +block_10: + if (((s64)c->sgpr64(s7)) == ((s64)c->sgpr64(v1))) {// beql s7, v1, L16 + c->mov64(v1, v1); // or v1, v1, r0 + goto block_13; + } + +block_12: + c->load_symbol2(t9, cache.transform_point_qword); // lw t9, transform-point-qword!(s7) + c->daddiu(a0, s5, 32); // daddiu a0, s5, 32 + c->daddu(a1, r0, s5); // daddu a1, r0, s5 + 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_13: + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L19 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_21;} // branch non-likely + + c->daddiu(v1, s5, 16); // daddiu v1, s5, 16 + c->daddiu(a0, s4, 16); // daddiu a0, s4, 16 + c->lq(a0, 0, a0); // lq a0, 0(a0) + c->sq(a0, 0, v1); // sq a0, 0(v1) + c->load_symbol2(v1, cache.target); // lw v1, *target*(s7) + bc = c->sgpr64(s7) == c->sgpr64(v1); // beq s7, v1, L17 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_16;} // branch non-likely + + c->daddiu(v1, s5, 16); // daddiu v1, s5, 16 + c->daddiu(a0, s5, 16); // daddiu a0, s5, 16 + c->load_symbol2(a1, cache.target); // lw a1, *target*(s7) + c->lwu(a1, 124, a1); // lwu a1, 124(a1) + c->daddiu(a1, a1, 60); // daddiu a1, a1, 60 + c->lui(a2, 15194); // lui a2, 15194 + c->ori(a2, a2, 29710); // ori a2, a2, 29710 + c->mtc1(f0, a2); // mtc1 f0, a2 + c->lqc2(vf2, 0, a1); // lqc2 vf2, 0(a1) + c->lqc2(vf1, 0, a0); // lqc2 vf1, 0(a0) + c->mfc1(a0, f0); // mfc1 a0, f0 + c->mov128_vf_gpr(vf3, a0); // qmtc2.i vf3, a0 + c->vadd_bc(DEST::w, BC::x, vf4, vf0, vf0); // vaddx.w vf4, vf0, vf0 + c->vmula_bc(DEST::xyzw, BC::x, vf2, vf3); // vmulax.xyzw acc, vf2, vf3 + c->vmadd_bc(DEST::xyz, BC::w, vf4, vf1, vf0); // vmaddw.xyz vf4, vf1, vf0 + c->sqc2(vf4, 0, v1); // sqc2 vf4, 0(v1) + +block_16: + c->daddu(v1, r0, s5); // daddu v1, r0, s5 + c->daddu(a0, r0, s5); // daddu a0, r0, s5 + c->daddiu(a1, s5, 16); // daddiu a1, s5, 16 + c->lui(a2, 16896); // lui a2, 16896 + c->mtc1(f0, a2); // mtc1 f0, a2 + c->lqc2(vf2, 0, a1); // lqc2 vf2, 0(a1) + c->lqc2(vf1, 0, a0); // lqc2 vf1, 0(a0) + c->mfc1(a0, f0); // mfc1 a0, f0 + c->mov128_vf_gpr(vf3, a0); // qmtc2.i vf3, a0 + c->vadd_bc(DEST::w, BC::x, vf4, vf0, vf0); // vaddx.w vf4, vf0, vf0 + c->vmula_bc(DEST::xyzw, BC::x, vf2, vf3); // vmulax.xyzw acc, vf2, vf3 + c->vmadd_bc(DEST::xyz, BC::w, vf4, vf1, vf0); // vmaddw.xyz vf4, vf1, vf0 + c->sqc2(vf4, 0, v1); // sqc2 vf4, 0(v1) + c->load_symbol2(t9, cache.transform_point_qword); // lw t9, transform-point-qword!(s7) + c->daddiu(a0, s5, 48); // daddiu a0, s5, 48 + c->daddu(a1, r0, s5); // daddu a1, r0, s5 + call_addr = c->gprs[t9].du32[0]; // function call: + c->sll(v0, ra, 0); // sll v0, ra, 0 + c->jalr(call_addr); // jalr ra, t9 + bc = c->sgpr64(s7) == c->sgpr64(v0); // beq s7, v0, L19 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_21;} // branch non-likely + + c->lw(v1, 32, s5); // lw v1, 32(s5) + c->daddiu(v1, v1, -28672); // daddiu v1, v1, -28672 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->cvtsw(f0, f0); // cvt.s.w f0, f0 + c->lw(v1, 36, s5); // lw v1, 36(s5) + c->daddiu(v1, v1, -29440); // daddiu v1, v1, -29440 + c->mtc1(f1, v1); // mtc1 f1, v1 + c->cvtsw(f1, f1); // cvt.s.w f1, f1 + c->lw(v1, 48, s5); // lw v1, 48(s5) + c->daddiu(v1, v1, -28672); // daddiu v1, v1, -28672 + c->mtc1(f2, v1); // mtc1 f2, v1 + c->cvtsw(f2, f2); // cvt.s.w f2, f2 + c->lw(v1, 52, s5); // lw v1, 52(s5) + c->daddiu(v1, v1, -29440); // daddiu v1, v1, -29440 + c->mtc1(f3, v1); // mtc1 f3, v1 + c->cvtsw(f3, f3); // cvt.s.w f3, f3 + c->subs(f30, f2, f0); // sub.s f30, f2, f0 + c->subs(f28, f3, f1); // sub.s f28, f3, f1 + c->lui(v1, -14720); // lui v1, -14720 + c->mtc1(f26, v1); // mtc1 f26, v1 + c->load_symbol2(t9, cache.atan); // lw t9, atan(s7) + c->mfc1(a0, f30); // mfc1 a0, f30 + c->mfc1(a1, f28); // mfc1 a1, 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->adds(f0, f26, f0); // add.s f0, f26, f0 + c->swc1(f0, 24, gp); // swc1 f0, 24(gp) + c->lwc1(f0, 12, s4); // lwc1 f0, 12(s4) + c->mtc1(f1, r0); // mtc1 f1, r0 + cop1_bc = c->fprs[f0] == c->fprs[f1]; // c.eq.s f0, f1 + bc = cop1_bc; // bc1t L18 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_19;} // branch non-likely + + c->lui(v1, 16580); // lui v1, 16580 + c->ori(v1, v1, 39846); // ori v1, v1, 39846 + c->mtc1(f0, v1); // mtc1 f0, v1 + c->lui(v1, 18804); // lui v1, 18804 + c->ori(v1, v1, 9216); // ori v1, v1, 9216 + c->mtc1(f1, v1); // mtc1 f1, v1 + c->lw(v1, 40, s5); // lw v1, 40(s5) + c->mtc1(f2, v1); // mtc1 f2, v1 + c->cvtsw(f2, f2); // cvt.s.w f2, f2 + c->divs(f1, f1, f2); // div.s f1, f1, f2 + c->muls(f0, f0, f1); // mul.s f0, f0, f1 + c->muls(f1, f30, f30); // mul.s f1, f30, f30 + c->muls(f2, f28, f28); // mul.s f2, f28, f28 + c->adds(f1, f1, f2); // add.s f1, f1, f2 + c->sqrts(f1, f1); // sqrt.s f1, f1 + c->muls(f0, f0, f1); // mul.s f0, f0, f1 + c->swc1(f0, 12, gp); // swc1 f0, 12(gp) + c->mfc1(v1, f0); // mfc1 v1, f0 + +block_19: + c->mov64(v0, s7); // or v0, s7, r0 + //beq r0, r0, L21 // beq r0, r0, L21 + // nop // sll r0, r0, 0 + goto block_24; // branch always + + c->gprs[v1].du64[0] = 0; // or v1, r0, r0 + +block_21: + c->lwc1(f0, 12, s4); // lwc1 f0, 12(s4) + c->mtc1(f1, r0); // mtc1 f1, r0 + cop1_bc = c->fprs[f0] == c->fprs[f1]; // c.eq.s f0, f1 + bc = cop1_bc; // bc1t L20 + c->mov64(v1, s7); // or v1, s7, r0 + if (bc) {goto block_23;} // branch non-likely + + c->mtc1(f0, r0); // mtc1 f0, r0 + c->swc1(f0, 12, gp); // swc1 f0, 12(gp) + c->mfc1(v1, f0); // mfc1 v1, f0 + +block_23: + c->gprs[v0].du64[0] = 0; // or v0, r0, r0 + +block_24: + c->ld(ra, 0, sp); // ld ra, 0(sp) + c->lwc1(f30, 136, sp); // lwc1 f30, 136(sp) + c->lwc1(f28, 132, sp); // lwc1 f28, 132(sp) + c->lwc1(f26, 128, sp); // lwc1 f26, 128(sp) + c->lq(gp, 112, sp); // lq gp, 112(sp) + c->lq(s5, 96, sp); // lq s5, 96(sp) + c->lq(s4, 80, sp); // lq s4, 80(sp) + //jr ra // jr ra + c->daddiu(sp, sp, 144); // daddiu sp, sp, 144 + goto end_of_function; // return + +end_of_function: + return c->gprs[v0].du64[0]; +} + +void link() { + cache.target = intern_from_c(-1, 0, "*target*").c(); + cache.atan = intern_from_c(-1, 0, "atan").c(); + cache.transform_point_qword = intern_from_c(-1, 0, "transform-point-qword!").c(); + gLinkedFunctionTable.reg("sparticle-motion-blur-dirt", execute, 256); +} + +} // namespace sparticle_motion_blur_dirt +} // namespace Mips2C \ No newline at end of file diff --git a/game/mips2c/mips2c_private.h b/game/mips2c/mips2c_private.h index fa71f698af..4c9f1e6471 100644 --- a/game/mips2c/mips2c_private.h +++ b/game/mips2c/mips2c_private.h @@ -382,8 +382,8 @@ struct ExecutionContext { void sq(int src, int offset, int addr) { auto s = gpr_src(src); - ASSERT((offset & 15) == 0); - memcpy(g_ee_main_mem + gpr_addr(addr) + offset, &s.du32[0], 16); + // ASSERT((offset & 15) == 0); + memcpy(g_ee_main_mem + ((gpr_addr(addr) + offset) & (~15)), &s.du32[0], 16); } void sqc2(int src, int offset, int addr) { @@ -1165,16 +1165,48 @@ struct ExecutionContext { } } + void mfhi(int dst) { gprs[dst].du64[0] = hi.du64[0]; } + void mflo(int dst) { gprs[dst].du64[0] = lo.du64[0]; } + void mult3(int dst, int src0, int src1) { - u32 result = gpr_src(src0).ds32[0] * gpr_src(src1).ds32[0]; - s32 sresult = result; - gprs[dst].ds64[0] = sresult; + s64 result = (s64)gpr_src(src0).ds32[0] * gpr_src(src1).ds32[0]; + + lo.ds64[0] = (s32)(result & 0xffffffff); + hi.ds64[0] = (s32)(result >> 32); + + gprs[dst].du64[0] = lo.du64[0]; } void multu3(int dst, int src0, int src1) { - u32 result = gpr_src(src0).du32[0] * gpr_src(src1).du32[0]; - s32 sresult = result; - gprs[dst].ds64[0] = sresult; + u64 result = (u64)gpr_src(src0).du32[0] * gpr_src(src1).du32[0]; + + lo.ds64[0] = (s32)(result & 0xffffffff); + hi.ds64[0] = (s32)(result >> 32); + + gprs[dst].du64[0] = lo.du64[0]; + } + + void div(int dst, int src) { + if (gprs[dst].du32[0] == 0x80000000 && gprs[src].du32[0] == 0xffffffff) { + lo.ds64[0] = (s32)0x80000000; + lo.ds64[0] = (s32)0x0; + } else if (gprs[src].ds32[0] != 0) { + lo.ds64[0] = gprs[dst].ds32[0] / gprs[src].ds32[0]; + hi.ds64[0] = gprs[dst].ds32[0] % gprs[src].ds32[0]; + } else { + lo.ds64[0] = gprs[dst].ds32[0] < 0 ? 1 : -1; + hi.ds64[0] = gprs[dst].ds32[0]; + } + } + + void divu(int dst, int src) { + if (gprs[dst].du32[0] != 0) { + lo.ds64[0] = (s32)(gprs[dst].du32[0] / gprs[src].du32[0]); + hi.ds64[0] = (s32)(gprs[dst].du32[0] % gprs[src].du32[0]); + } else { + lo.ds64[0] = -1; + hi.ds64[0] = gprs[dst].ds32[0]; + } } void xori(int dest, int src, u64 imm) { gprs[dest].du64[0] = gpr_src(src).du64[0] ^ imm; } diff --git a/game/mips2c/mips2c_table.cpp b/game/mips2c/mips2c_table.cpp index 1f6dd9002f..eac8aed3cb 100644 --- a/game/mips2c/mips2c_table.cpp +++ b/game/mips2c/mips2c_table.cpp @@ -7,6 +7,7 @@ #include "game/kernel/common/kscheme.h" #include "game/kernel/jak1/kscheme.h" #include "game/kernel/jak2/kscheme.h" +#include "game/kernel/jak3/kscheme.h" #include "game/runtime.h" extern "C" { @@ -258,16 +259,105 @@ namespace shadow_calc_dual_verts { extern void link(); } namespace shadow_xform_verts { extern void link(); } } namespace jak3 { - namespace light_hash_get_bucket_index { extern void link(); } - namespace add_light_sphere_to_light_group { extern void link(); } - namespace light_hash_count_items { extern void link(); } - namespace light_hash_add_items { extern void link(); } - namespace debug_line_clip { extern void link(); } - namespace init_boundary_regs { extern void link(); } - namespace draw_boundary_polygon { extern void link(); } - namespace render_boundary_quad { extern void link(); } - namespace render_boundary_tri { extern void link(); } - namespace set_sky_vf27 { extern void link(); } +namespace light_hash_get_bucket_index { extern void link(); } +namespace add_light_sphere_to_light_group { extern void link(); } +namespace light_hash_count_items { extern void link(); } +namespace light_hash_add_items { extern void link(); } +namespace debug_line_clip { extern void link(); } +namespace init_boundary_regs { extern void link(); } +namespace draw_boundary_polygon { extern void link(); } +namespace render_boundary_quad { extern void link(); } +namespace render_boundary_tri { extern void link(); } +namespace set_sky_vf27 { extern void link(); } +namespace generic_light_proc { extern void link(); } +namespace generic_envmap_proc { extern void link(); } +namespace generic_prepare_dma_double { extern void link(); } +namespace generic_prepare_dma_single { extern void link(); } +namespace generic_warp_source_proc { extern void link(); } +namespace generic_warp_dest_proc { extern void link(); } +namespace generic_warp_dest { extern void link(); } +namespace generic_warp_envmap_dest { extern void link(); } +namespace generic_no_light_proc { extern void link(); } +namespace method_9_font_work { extern void link(); } +namespace draw_string_asm { extern void link(); } +namespace get_string_length { extern void link(); } +namespace method_9_prim_strip { extern void link(); } +namespace adgif_shader_texture_with_update { extern void link(); } +namespace moving_sphere_triangle_intersect { extern void link(); } +namespace collide_do_primitives { extern void link(); } +namespace cspace_parented_transformq_joint { extern void link(); } +namespace foreground_check_longest_edge_asm { extern void link(); } +namespace foreground_merc { extern void link(); } +namespace foreground_generic_merc { extern void link(); } +namespace live_func_curve { extern void link(); } +namespace birth_func_curve { extern void link(); } +namespace method_11_collide_hash { extern void link(); } +namespace method_12_collide_hash { extern void link(); } +namespace fill_bg_using_box_new { extern void link(); } +namespace fill_bg_using_line_sphere_new { extern void link(); } +namespace method_12_collide_mesh { extern void link(); } +namespace method_14_collide_mesh { extern void link(); } +namespace method_15_collide_mesh { extern void link(); } +namespace method_10_collide_shape_prim_mesh { extern void link(); } +namespace method_10_collide_shape_prim_sphere { extern void link(); } +namespace method_10_collide_shape_prim_group { extern void link(); } +namespace method_11_collide_shape_prim_mesh { extern void link(); } +namespace method_11_collide_shape_prim_sphere { extern void link(); } +namespace method_11_collide_shape_prim_group { extern void link(); } +namespace method_9_collide_cache_prim { extern void link(); } +namespace method_10_collide_cache_prim { extern void link(); } +namespace method_17_collide_cache { extern void link(); } +namespace method_9_collide_puss_work { extern void link(); } +namespace method_10_collide_puss_work { extern void link(); } +namespace method_10_collide_edge_hold_list { extern void link(); } +namespace method_19_collide_edge_work { extern void link(); } +namespace method_9_edge_grab_info { extern void link(); } +namespace method_17_collide_edge_work { extern void link(); } +namespace method_16_collide_edge_work { extern void link(); } +namespace method_18_collide_edge_work { extern void link(); } +namespace method_18_grid_hash { extern void link(); } +namespace method_19_grid_hash { extern void link(); } +namespace method_20_grid_hash { extern void link(); } +namespace method_22_grid_hash { extern void link(); } +namespace method_28_sphere_hash { extern void link(); } +namespace method_32_sphere_hash { extern void link(); } +namespace method_29_sphere_hash { extern void link(); } +namespace method_30_sphere_hash { extern void link(); } +namespace method_31_sphere_hash { extern void link(); } +namespace method_32_spatial_hash { extern void link(); } +namespace method_38_spatial_hash { extern void link(); } +namespace method_35_spatial_hash { extern void link(); } +namespace method_36_spatial_hash { extern void link(); } +namespace method_34_spatial_hash { extern void link(); } +namespace sparticle_motion_blur { extern void link(); } +namespace sp_launch_particles_var { extern void link(); } +namespace particle_adgif { extern void link(); } +namespace sp_init_fields { extern void link(); } +namespace sp_process_block_2d { extern void link(); } +namespace sp_process_block_3d { extern void link(); } +namespace method_39_nav_state { extern void link(); } +namespace method_21_nav_engine { extern void link(); } +namespace method_20_nav_engine { extern void link(); } +namespace method_18_nav_engine { extern void link(); } +namespace method_17_nav_engine { extern void link(); } +namespace nav_state_patch_pointers { extern void link(); } +namespace nav_dma_send_from_spr_no_flush { extern void link(); } +namespace nav_dma_send_to_spr_no_flush { extern void link(); } +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(); } + } // clang-format on @@ -437,13 +527,81 @@ PerGameVersion>> gMips2C jak2::shadow_scissor_top::link, jak2::shadow_scissor_edges::link, jak2::shadow_calc_dual_verts::link, jak2::shadow_xform_verts::link}}}, /////////// JAK 3 - {{"lights", - {jak3::light_hash_get_bucket_index::link, jak3::add_light_sphere_to_light_group::link, - jak3::light_hash_count_items::link, jak3::light_hash_add_items::link}}, - {"debug", - {jak3::debug_line_clip::link, jak3::init_boundary_regs::link, - jak3::draw_boundary_polygon::link, jak3::render_boundary_quad::link, - jak3::render_boundary_tri::link, jak3::set_sky_vf27::link}}}}; + { + {"lights", + {jak3::light_hash_get_bucket_index::link, jak3::add_light_sphere_to_light_group::link, + jak3::light_hash_count_items::link, jak3::light_hash_add_items::link}}, + {"debug", + {jak3::debug_line_clip::link, jak3::init_boundary_regs::link, + jak3::draw_boundary_polygon::link, jak3::render_boundary_quad::link, + jak3::render_boundary_tri::link, jak3::set_sky_vf27::link}}, + {"generic-effect", + {jak3::generic_light_proc::link, jak3::generic_envmap_proc::link, + jak3::generic_prepare_dma_double::link, jak3::generic_prepare_dma_single::link, + jak3::generic_warp_source_proc::link, jak3::generic_warp_dest_proc::link, + jak3::generic_warp_dest::link, jak3::generic_warp_envmap_dest::link, + jak3::generic_no_light_proc::link}}, + {"font", + {jak3::method_9_font_work::link, jak3::draw_string_asm::link, + jak3::get_string_length::link}}, + {"texture", {jak3::adgif_shader_texture_with_update::link}}, + {"collide-func", + {jak3::moving_sphere_triangle_intersect::link, jak3::collide_do_primitives::link}}, + {"prim", {jak3::method_9_prim_strip::link}}, + {"joint", {jak3::cspace_parented_transformq_joint::link}}, + {"foreground", + {jak3::foreground_check_longest_edge_asm::link, jak3::foreground_generic_merc::link, + jak3::foreground_merc::link, jak3::foreground_draw_hud::link}}, + {"particle-curves", {jak3::live_func_curve::link, jak3::birth_func_curve::link}}, + {"collide-hash", + {jak3::method_11_collide_hash::link, jak3::method_12_collide_hash::link, + jak3::fill_bg_using_box_new::link, jak3::fill_bg_using_line_sphere_new::link}}, + {"collide-mesh", + {jak3::method_12_collide_mesh::link, jak3::method_14_collide_mesh::link, + jak3::method_15_collide_mesh::link, jak3::method_10_collide_shape_prim_mesh::link}}, + {"collide-cache", + {jak3::method_10_collide_shape_prim_mesh::link, + jak3::method_10_collide_shape_prim_sphere::link, + jak3::method_10_collide_shape_prim_group::link, + jak3::method_11_collide_shape_prim_mesh::link, + jak3::method_11_collide_shape_prim_sphere::link, + jak3::method_11_collide_shape_prim_group::link, jak3::method_9_collide_cache_prim::link, + jak3::method_10_collide_cache_prim::link, jak3::method_17_collide_cache::link, + jak3::method_9_collide_puss_work::link, jak3::method_10_collide_puss_work::link}}, + {"collide-edge-grab", + {jak3::method_10_collide_edge_hold_list::link, jak3::method_19_collide_edge_work::link, + jak3::method_9_edge_grab_info::link, jak3::method_17_collide_edge_work::link, + jak3::method_16_collide_edge_work::link, jak3::method_18_collide_edge_work::link}}, + {"spatial-hash", + {jak3::method_18_grid_hash::link, jak3::method_19_grid_hash::link, + jak3::method_20_grid_hash::link, jak3::method_22_grid_hash::link, + jak3::method_28_sphere_hash::link, jak3::method_32_sphere_hash::link, + jak3::method_29_sphere_hash::link, jak3::method_30_sphere_hash::link, + jak3::method_31_sphere_hash::link, jak3::method_32_spatial_hash::link, + jak3::method_38_spatial_hash::link, jak3::method_35_spatial_hash::link, + jak3::method_36_spatial_hash::link, jak3::method_34_spatial_hash::link}}, + {"sparticle-launcher", + {jak3::sparticle_motion_blur::link, jak3::sp_launch_particles_var::link, + jak3::particle_adgif::link, jak3::sp_init_fields::link}}, + {"sparticle", {jak3::sp_process_block_2d::link, jak3::sp_process_block_3d::link}}, + {"nav-engine", + {jak3::method_21_nav_engine::link, jak3::method_20_nav_engine::link, + jak3::method_18_nav_engine::link, jak3::method_17_nav_engine::link, + jak3::nav_state_patch_pointers::link, jak3::nav_dma_send_from_spr_no_flush::link, + jak3::nav_dma_send_to_spr_no_flush::link}}, + {"nav-control", {jak3::method_39_nav_state::link}}, + {"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}}, + }}; void LinkedFunctionTable::reg(const std::string& name, u64 (*exec)(void*), u32 stack_size) { const auto& it = m_executes.insert({name, {exec, Ptr()}}); @@ -465,6 +623,11 @@ void LinkedFunctionTable::reg(const std::string& name, u64 (*exec)(void*), u32 s s7.offset + jak2_symbols::FIX_SYM_GLOBAL_HEAP, ::jak2::u32_in_fixed_sym(jak2_symbols::FIX_SYM_FUNCTION_TYPE), 0x40, UNKNOWN_PP)); break; + case GameVersion::Jak3: + jump_to_asm = Ptr(::jak3::alloc_heap_object( + s7.offset + jak3_symbols::FIX_SYM_GLOBAL_HEAP, + ::jak3::u32_in_fixed_sym(jak3_symbols::FIX_SYM_FUNCTION_TYPE), 0x40, UNKNOWN_PP)); + break; default: ASSERT(false); } diff --git a/game/overlord/jak1/iso.cpp b/game/overlord/jak1/iso.cpp index 38a7ed82cd..aa706e63b5 100644 --- a/game/overlord/jak1/iso.cpp +++ b/game/overlord/jak1/iso.cpp @@ -73,6 +73,7 @@ s32 iso_thread; s32 dgo_thread; s32 str_thread; s32 play_thread; +constexpr int kRpcBuffSize = sizeof(RPC_Dgo_Cmd); static RPC_Dgo_Cmd sRPCBuff[1]; DgoCommand sLoadDGO; // renamed from scmd to sLoadDGO in Jak 2 @@ -281,7 +282,8 @@ u32 DGOThread() { CpuDisableIntr(); sceSifInitRpc(0); sceSifSetRpcQueue(&dq, GetThreadId()); - sceSifRegisterRpc(&serve, DGO_RPC_ID[g_game_version], RPC_DGO, sRPCBuff, nullptr, nullptr, &dq); + sceSifRegisterRpc(&serve, DGO_RPC_ID[g_game_version], RPC_DGO, sRPCBuff, kRpcBuffSize, nullptr, + nullptr, &dq); CpuEnableIntr(); sceSifRpcLoop(&dq); return 0; diff --git a/game/overlord/jak1/ramdisk.cpp b/game/overlord/jak1/ramdisk.cpp index b98cdcbb21..f29805840b 100644 --- a/game/overlord/jak1/ramdisk.cpp +++ b/game/overlord/jak1/ramdisk.cpp @@ -34,7 +34,8 @@ u32 gMemSize; // Total memory of RAMDISK u32 gMemFreeAtStart; // Memory free after allocation of RAMDISK uint8_t* gMem; // Allocation for RAMDISK uint8_t* gRamdiskRAM; // Also allocation for RAMDISK -uint8_t gRPCBuf[40]; // Buffer for RAMDISK RPC handler +constexpr int kRamdiskBufferSize = 40; +uint8_t gRPCBuf[kRamdiskBufferSize]; // Buffer for RAMDISK RPC handler // Each file stored in the ramdisk has a file record: struct RamdiskFileRecord { @@ -100,8 +101,8 @@ u32 Thread_Server() { CpuDisableIntr(); sceSifInitRpc(0); sceSifSetRpcQueue(&dq, GetThreadId()); - sceSifRegisterRpc(&serve, RAMDISK_RPC_ID[g_game_version], RPC_Ramdisk, gRPCBuf, nullptr, nullptr, - &dq); + sceSifRegisterRpc(&serve, RAMDISK_RPC_ID[g_game_version], RPC_Ramdisk, gRPCBuf, + kRamdiskBufferSize, nullptr, nullptr, &dq); CpuEnableIntr(); sceSifRpcLoop(&dq); return 0; diff --git a/game/overlord/jak1/srpc.cpp b/game/overlord/jak1/srpc.cpp index 407c71b80f..a52bc63cc7 100644 --- a/game/overlord/jak1/srpc.cpp +++ b/game/overlord/jak1/srpc.cpp @@ -31,8 +31,9 @@ using namespace iop; namespace jak1 { constexpr int SRPC_MESSAGE_SIZE = 0x50; +constexpr int SRPC_MESSAGE_COUNT = 128; static uint8_t gLoaderBuf[SRPC_MESSAGE_SIZE]; -static uint8_t gPlayerBuf[SRPC_MESSAGE_SIZE * 128]; +static uint8_t gPlayerBuf[SRPC_MESSAGE_SIZE * SRPC_MESSAGE_COUNT]; static u32 gInfoEE = 0; // EE address where we should send info on each frame. s16 gFlava; u32 gFreeMem = 0; @@ -62,8 +63,8 @@ u32 Thread_Player() { CpuDisableIntr(); sceSifInitRpc(0); sceSifSetRpcQueue(&dq, GetThreadId()); - sceSifRegisterRpc(&serve, PLAYER_RPC_ID[g_game_version], RPC_Player, gPlayerBuf, nullptr, nullptr, - &dq); + sceSifRegisterRpc(&serve, PLAYER_RPC_ID[g_game_version], RPC_Player, gPlayerBuf, + SRPC_MESSAGE_SIZE * SRPC_MESSAGE_COUNT, nullptr, nullptr, &dq); CpuEnableIntr(); sceSifRpcLoop(&dq); return 0; @@ -79,8 +80,8 @@ u32 Thread_Loader() { CpuDisableIntr(); sceSifInitRpc(0); sceSifSetRpcQueue(&dq, GetThreadId()); - sceSifRegisterRpc(&serve, LOADER_RPC_ID[g_game_version], RPC_Loader, gLoaderBuf, nullptr, nullptr, - &dq); + sceSifRegisterRpc(&serve, LOADER_RPC_ID[g_game_version], RPC_Loader, gLoaderBuf, + SRPC_MESSAGE_SIZE, nullptr, nullptr, &dq); CpuEnableIntr(); sceSifRpcLoop(&dq); return 0; diff --git a/game/overlord/jak1/stream.cpp b/game/overlord/jak1/stream.cpp index 11f45b7bef..3a47c0957c 100644 --- a/game/overlord/jak1/stream.cpp +++ b/game/overlord/jak1/stream.cpp @@ -24,7 +24,9 @@ using namespace iop; namespace jak1 { +constexpr int kStrBufSize = sizeof(RPC_Str_Cmd_Jak1); static RPC_Str_Cmd_Jak1 sSTRBuf; +constexpr int kPlayBufSize = 2 * sizeof(RPC_Play_Cmd_Jak1); static RPC_Play_Cmd_Jak1 sPLAYBuf[2]; void* RPC_STR(unsigned int fno, void* _cmd, int y); @@ -66,7 +68,8 @@ u32 STRThread() { CpuDisableIntr(); sceSifInitRpc(0); sceSifSetRpcQueue(&dq, GetThreadId()); - sceSifRegisterRpc(&serve, STR_RPC_ID[g_game_version], RPC_STR, &sSTRBuf, nullptr, nullptr, &dq); + sceSifRegisterRpc(&serve, STR_RPC_ID[g_game_version], RPC_STR, &sSTRBuf, kStrBufSize, nullptr, + nullptr, &dq); CpuEnableIntr(); sceSifRpcLoop(&dq); return 0; @@ -79,7 +82,8 @@ u32 PLAYThread() { CpuDisableIntr(); sceSifInitRpc(0); sceSifSetRpcQueue(&dq, GetThreadId()); - sceSifRegisterRpc(&serve, PLAY_RPC_ID[g_game_version], RPC_PLAY, sPLAYBuf, nullptr, nullptr, &dq); + sceSifRegisterRpc(&serve, PLAY_RPC_ID[g_game_version], RPC_PLAY, sPLAYBuf, kPlayBufSize, nullptr, + nullptr, &dq); CpuEnableIntr(); sceSifRpcLoop(&dq); return 0; diff --git a/game/overlord/jak2/iso.cpp b/game/overlord/jak2/iso.cpp index 56b74f495c..32c0eba4f3 100644 --- a/game/overlord/jak2/iso.cpp +++ b/game/overlord/jak2/iso.cpp @@ -49,6 +49,7 @@ int ext_resume = 0; CmdDgo sLoadDgo; // renamed from scmd to sLoadDGO in Jak 2 static RPC_Dgo_Cmd sRPCBuff[1]; +constexpr int kRpcBuffSize = sizeof(RPC_Dgo_Cmd); VagDir gVagDir; /// The main buffer used for reading data and doing blzo decompression. @@ -676,7 +677,11 @@ u32 ISOThread() { pLVar14 = (VagStrListNode*)NewStreamsList.next; do { if (pLVar14->id != 0) { - QueueVAGStream(pLVar14); + if (g_game_version != GameVersion::Jak3) { + // doesn't work. + printf("jak3 skipping vag stream\n"); + QueueVAGStream(pLVar14); + } } pLVar14 = (VagStrListNode*)pLVar14->list.next; iVar4 = iVar4 + 1; @@ -1097,7 +1102,8 @@ u32 DGOThread() { CpuDisableIntr(); sceSifInitRpc(0); sceSifSetRpcQueue(&dq, GetThreadId()); - sceSifRegisterRpc(&serve, DGO_RPC_ID[g_game_version], RPC_DGO, sRPCBuff, nullptr, nullptr, &dq); + sceSifRegisterRpc(&serve, DGO_RPC_ID[g_game_version], RPC_DGO, sRPCBuff, kRpcBuffSize, nullptr, + nullptr, &dq); CpuEnableIntr(); sceSifRpcLoop(&dq); return 0; diff --git a/game/overlord/jak2/srpc.cpp b/game/overlord/jak2/srpc.cpp index 188b1a9948..1dd4b180a5 100644 --- a/game/overlord/jak2/srpc.cpp +++ b/game/overlord/jak2/srpc.cpp @@ -24,8 +24,10 @@ static const char* languages[] = {"ENG", "FRE", "GER", "SPA", "ITA", "JAP", "KOR static u32 gInfoEE = 0; static u32 IopTicks = 0; static SoundIopInfo info; -static uint8_t gPlayerBuf[0x50 * 128]; -static uint8_t gLoaderBuf[0x50]; +constexpr int kPlayerBufSize = 0x50 * 128; +static uint8_t gPlayerBuf[kPlayerBufSize]; +constexpr int kLoaderBufSize = 0x50; +static uint8_t gLoaderBuf[kLoaderBufSize]; void srpc_init_globals() {} @@ -575,8 +577,8 @@ u32 Thread_Player() { CpuDisableIntr(); sceSifInitRpc(0); sceSifSetRpcQueue(&dq, GetThreadId()); - sceSifRegisterRpc(&serve, PLAYER_RPC_ID[g_game_version], RPC_Player, gPlayerBuf, nullptr, nullptr, - &dq); + sceSifRegisterRpc(&serve, PLAYER_RPC_ID[g_game_version], RPC_Player, gPlayerBuf, kPlayerBufSize, + nullptr, nullptr, &dq); CpuEnableIntr(); sceSifRpcLoop(&dq); return 0; @@ -590,8 +592,8 @@ u32 Thread_Loader() { CpuDisableIntr(); sceSifInitRpc(0); sceSifSetRpcQueue(&dq, GetThreadId()); - sceSifRegisterRpc(&serve, LOADER_RPC_ID[g_game_version], RPC_Loader, gLoaderBuf, nullptr, nullptr, - &dq); + sceSifRegisterRpc(&serve, LOADER_RPC_ID[g_game_version], RPC_Loader, gLoaderBuf, kLoaderBufSize, + nullptr, nullptr, &dq); CpuEnableIntr(); sceSifRpcLoop(&dq); return 0; diff --git a/game/overlord/jak2/stream.cpp b/game/overlord/jak2/stream.cpp index e2c48453be..e702263cf0 100644 --- a/game/overlord/jak2/stream.cpp +++ b/game/overlord/jak2/stream.cpp @@ -19,8 +19,12 @@ using namespace iop; namespace jak2 { +constexpr int kStrBufSize = sizeof(RPC_Str_Cmd_Jak2); static RPC_Str_Cmd_Jak2 sSTRBuf; -static RPC_Play_Cmd_Jak2 sPLAYBuf[2]; // called sRPCBuf2 +// the size has been increased to 4 to fit jak3. This is a total hack, since the structures +// are probably just completely different. +constexpr int kPlayBufSize = 4 * sizeof(RPC_Play_Cmd_Jak2); +static RPC_Play_Cmd_Jak2 sPLAYBuf[4]; // called sRPCBuf2 struct CacheEntry { FileRecord* fr = nullptr; @@ -337,7 +341,8 @@ u32 STRThread() { CpuDisableIntr(); sceSifInitRpc(0); sceSifSetRpcQueue(&dq, GetThreadId()); - sceSifRegisterRpc(&serve, STR_RPC_ID[g_game_version], RPC_STR, &sSTRBuf, nullptr, nullptr, &dq); + sceSifRegisterRpc(&serve, STR_RPC_ID[g_game_version], RPC_STR, &sSTRBuf, kStrBufSize, nullptr, + nullptr, &dq); CpuEnableIntr(); sceSifRpcLoop(&dq); @@ -351,7 +356,8 @@ u32 PLAYThread() { CpuDisableIntr(); sceSifInitRpc(0); sceSifSetRpcQueue(&dq, GetThreadId()); - sceSifRegisterRpc(&serve, PLAY_RPC_ID[g_game_version], RPC_PLAY, sPLAYBuf, nullptr, nullptr, &dq); + sceSifRegisterRpc(&serve, PLAY_RPC_ID[g_game_version], RPC_PLAY, sPLAYBuf, kPlayBufSize, nullptr, + nullptr, &dq); CpuEnableIntr(); sceSifRpcLoop(&dq); return 0; diff --git a/game/sce/iop.cpp b/game/sce/iop.cpp index fff38a8f14..2784c9fa42 100644 --- a/game/sce/iop.cpp +++ b/game/sce/iop.cpp @@ -133,12 +133,14 @@ void sceSifRegisterRpc(sceSifServeData* serve, unsigned int request, sceSifRpcFunc func, void* buff, + int buff_size, sceSifRpcFunc cfunc, void* cbuff, sceSifQueueData* qd) { serve->command = request; serve->func = func; serve->buff = buff; + serve->buff_size = buff_size; (void)cfunc; (void)cbuff; ASSERT(!cfunc); diff --git a/game/sce/iop.h b/game/sce/iop.h index 165e8f7074..50a06088c1 100644 --- a/game/sce/iop.h +++ b/game/sce/iop.h @@ -39,6 +39,8 @@ struct sceSifServeData { unsigned int command; // the RPC ID sceSifRpcFunc func; void* buff; + // added + int buff_size = 0; }; struct sceSifQueueData { @@ -116,6 +118,7 @@ void sceSifRegisterRpc(sceSifServeData* serve, unsigned int request, sceSifRpcFunc func, void* buff, + int buff_size, sceSifRpcFunc cfunc, void* cbuff, sceSifQueueData* qd); diff --git a/game/system/IOP_Kernel.cpp b/game/system/IOP_Kernel.cpp index 171956af25..10ce6e88fa 100644 --- a/game/system/IOP_Kernel.cpp +++ b/game/system/IOP_Kernel.cpp @@ -2,6 +2,7 @@ #include +#include "common/log/log.h" #include "common/util/Assert.h" #include "common/util/FileUtil.h" @@ -337,6 +338,11 @@ void IOP_Kernel::sif_rpc(s32 rpcChannel, ASSERT(rec->cmd.finished && rec->cmd.started); // step 3 - memcpy! + if (rec->qd->serve_data->buff_size < sendSize) { + lg::die( + "Buffer overflow in EE -> IOP RPC. channel {}, fno {}, requested size {}, buffer size {}\n", + rpcChannel, fno, sendSize, rec->qd->serve_data->buff_size); + } memcpy(rec->qd->serve_data->buff, sendBuff, sendSize); // step 4 - setup command diff --git a/goal_src/goal-lib.gc b/goal_src/goal-lib.gc index 161ec8456c..59374ed8b8 100644 --- a/goal_src/goal-lib.gc +++ b/goal_src/goal-lib.gc @@ -273,6 +273,10 @@ `(define-extern ,function-name (function ,@type-info)) ) +(defmacro def-event-handler (name type) + `(define-extern ,name (function process int symbol event-message-block object :behavior ,type)) + ) + (defmacro defun-debug (name bindings &rest body) "Define a function which is only present in debug mode. Otherwise the function becomes nothing" `(if *debug-segment* @@ -1208,6 +1212,38 @@ `(empty) ) +(defmacro def-tex (tex-name tpage idx) + "define a new texture for a tpage. adds it to a global map stored in goos." + ;; grab data about the texture + (let* ((tpage-string (symbol->string tpage)) + (tex-name-string tex-name) + (tpage-info-lookup (hash-table-try-ref *tpage-info* tpage)) + (tpage-info-exists (car tpage-info-lookup)) + (tpage-info (cdr tpage-info-lookup)) + ) + ;; no tpage was found, make a new one and add it. + (when (not tpage-info-exists) + (set! tpage-info (make-string-hash-table)) + (hash-table-set! *tpage-info* tpage-string tpage-info) + ) + ;; lookup name in our tpage + (let* ((tex-name-lookup (hash-table-try-ref tpage-info tex-name-string)) + (tex-name-exists (car tex-name-lookup)) + (tex-new (list tex-name idx))) ;; this is the format of the individual entries + ;; found, check if valid + (if (and tex-name-exists (not (eq? (cdr tex-name-lookup) tex-new))) + (fmt #t "error redefining texture. data mismatch: {}\n" tex-new) + #f) + ;; not found. add to the tpage. + (when (not tex-name-exists) + (hash-table-set! tpage-info tex-name-string tex-new) + ) + ) + ) + `(defconstant ,(string->symbol-format "{}-{}" tex-name tpage) + (new 'static 'texture-id :page ,tpage :index ,idx)) + ) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; built-in type stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/goal_src/goos-lib.gs b/goal_src/goos-lib.gs index b799c464a5..8624807ba5 100644 --- a/goal_src/goos-lib.gs +++ b/goal_src/goos-lib.gs @@ -496,6 +496,8 @@ ;; a map for joint node names used by art loading code. (define *jg-info* (make-string-hash-table)) +;; a map for tpages used by texture macros. +(define *tpage-info* (make-string-hash-table)) ;;;;;;;;;;;;;;;;;;;;;;;; ;; build system ;; diff --git a/goal_src/jak1/engine/entity/entity.gc b/goal_src/jak1/engine/entity/entity.gc index bf2c540b0d..4dde7a86b7 100644 --- a/goal_src/jak1/engine/entity/entity.gc +++ b/goal_src/jak1/engine/entity/entity.gc @@ -338,6 +338,23 @@ ;; entity inspection ;;;;;;;;;;;;;;;;;;;;;; +(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 "~Tnav-mesh: ~A~%" (-> this nav-mesh)) + (format #t "~Tetype: ~A~%" (-> this etype)) + (format #t "~Ttask: ~d~%" (-> this task)) + (format #t "~Tvis-id: ~d~%" (-> this vis-id-signed)) + (format #t "~Tquat: ~`vector`P~%" (-> this quat)) + this + ) + (defun-debug process-status-bits ((arg0 process) (arg1 symbol)) "Print to arg1 three characters representing the status of a process The first is an r, if we should run. diff --git a/goal_src/jak1/engine/game/main.gc b/goal_src/jak1/engine/game/main.gc index 54c5f3dffc..cb04963e69 100644 --- a/goal_src/jak1/engine/game/main.gc +++ b/goal_src/jak1/engine/game/main.gc @@ -125,16 +125,14 @@ ;; allow the menu to run. (logclear! (-> *setting-control* default process-mask) (process-mask menu)) + ;; ?? + (set! *pause-lock* #f) + (sound-group-pause (sound-group sfx music dialog sog3 ambient sog5 sog6 sog7)) ;; modified for PC port - show hidden speedrun progress menu if L1+R1+X are held (if (and PC_PORT (-> *pc-settings* speedrunner-mode?) (cpad-hold? 0 l1) (cpad-hold? 0 r1) (cpad-hold? 0 x)) - (activate-progress *dproc* (progress-screen speedrun-options)) - (begin - ;; ?? - (set! *pause-lock* #f) - (sound-group-pause (sound-group sfx music dialog sog3 ambient sog5 sog6 sog7)) + (activate-progress *dproc* (progress-screen speedrun-options)) (hide-progress-screen) ) - ) ) (('menu) ;; I believe these masks are just to make the progress go away work. diff --git a/goal_src/jak1/kernel-defs.gc b/goal_src/jak1/kernel-defs.gc index 63e2e07e0a..e1c2455be0 100644 --- a/goal_src/jak1/kernel-defs.gc +++ b/goal_src/jak1/kernel-defs.gc @@ -405,6 +405,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) @@ -419,7 +422,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/debug/pc-debug-common.gc b/goal_src/jak1/pc/debug/pc-debug-common.gc index ef89acaea5..cbfe90de13 100644 --- a/goal_src/jak1/pc/debug/pc-debug-common.gc +++ b/goal_src/jak1/pc/debug/pc-debug-common.gc @@ -29,17 +29,19 @@ (remain (the float ,remain)) (bar-width (the int (/ (the float MEM_BAR_WIDTH) (-> *pc-settings* aspect-ratio-scale)))) (bar-x (- MEM_BAR_RIGHT bar-width MEM_BAR_HORZ_PAD)) ;; x coord for left side of the bar list - (used-p (if (zero? total) 0.5 (/ (- total remain) total))) + (used-p (if (zero? total) 0.0 (/ (- total remain) total))) (used-x (the int (* used-p bar-width))) (used-y (+ MEM_BAR_Y (* ,idx MEM_BAR_HEIGHT))) ) (draw-sprite2d-xy ,buf bar-x used-y used-x MEM_BAR_HEIGHT ,color) (draw-sprite2d-xy ,buf (+ bar-x used-x) used-y (- bar-width used-x) MEM_BAR_HEIGHT MEM_BAR_BG_COL) + (if (zero? total) (set! used-x (the int (* 0.5 bar-width)))) (draw-string-xy ,name ,buf (- bar-x MEM_BAR_HORZ_PAD) used-y (font-color red) (font-flags shadow kerning right)) (draw-string-xy (if (zero? total) "NO HEAP" (string-format "~,,2f%" (* used-p 100))) ,buf (+ bar-x used-x) used-y (font-color default) (font-flags shadow kerning middle)) (draw-string-xy (string-format "~,,1fM" (/ total (* 1024 1024))) ,buf (+ bar-x bar-width MEM_BAR_HORZ_PAD) used-y (font-color red) (font-flags shadow kerning middle-vert)) ) ) + (defmacro draw-memory-bar-kheap (buf heap &key (name #f) &key idx &key color) "draw a memory usage bar for a kheap" `(let ((heap ,heap)) diff --git a/goal_src/jak1/pc/pckernel-common.gc b/goal_src/jak1/pc/pckernel-common.gc index c480097a8f..3efcefb394 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?))) @@ -387,7 +382,7 @@ "return the debug font scale factor to be used." (declare (inline)) (if (-> this debug-font-scale-auto?) - (/ (-> this debug-font-scale) (max 1.0 (/ (the float (get-current-game-height this)) PC_BASE_HEIGHT))) + (/ (-> this debug-font-scale) (fmax 1.0 (/ (the float (get-current-game-height this)) PC_BASE_HEIGHT))) (-> this debug-font-scale))) diff --git a/goal_src/jak1/pc/pckernel-h.gc b/goal_src/jak1/pc/pckernel-h.gc index 65172e1bb9..df2d93a2e5 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/jak1/pc/progress-pc.gc b/goal_src/jak1/pc/progress-pc.gc index 7c0d330c76..c6ca6ba44a 100644 --- a/goal_src/jak1/pc/progress-pc.gc +++ b/goal_src/jak1/pc/progress-pc.gc @@ -153,18 +153,8 @@ (new 'static 'game-option :option-type (game-option-type on-off) :name (text-id vsync) :scale #t) (new 'static 'game-option :option-type (game-option-type menu) :name (text-id aspect-ratio) :scale #t :param3 (game-option-menu aspect-ratio)) (new 'static 'game-option :option-type (game-option-type msaa) :name (text-id msaa) :scale #t) - (new 'static 'game-option :option-type (game-option-type frame-rate) :name (text-id frame-rate) :scale #t) - (new 'static 'game-option :option-type (game-option-type menu) :name (text-id ps2-options) :scale #t :param3 (game-option-menu gfx-ps2-options)) - (new 'static 'game-option :option-type (game-option-type button) :name (text-id back) :scale #t) - ) - ) - -(define *graphic-options-no-frame-rate-pc* (new 'static 'boxed-array :type game-option - (new 'static 'game-option :option-type (game-option-type menu) :name (text-id game-resolution) :scale #t :param3 (game-option-menu resolution)) - (new 'static 'game-option :option-type (game-option-type display-mode) :name (text-id display-mode) :scale #t) - (new 'static 'game-option :option-type (game-option-type on-off) :name (text-id vsync) :scale #t) - (new 'static 'game-option :option-type (game-option-type menu) :name (text-id aspect-ratio) :scale #t :param3 (game-option-menu aspect-ratio)) - (new 'static 'game-option :option-type (game-option-type msaa) :name (text-id msaa) :scale #t) + (new 'static 'game-option :option-type (game-option-type frame-rate) :name (text-id frame-rate) :scale #t + :option-disabled-func (lambda () (or (-> *pc-settings* speedrunner-mode?) (<= (pc-get-active-display-refresh-rate) 60)))) (new 'static 'game-option :option-type (game-option-type menu) :name (text-id ps2-options) :scale #t :param3 (game-option-menu gfx-ps2-options)) (new 'static 'game-option :option-type (game-option-type button) :name (text-id back) :scale #t) ) @@ -874,20 +864,15 @@ *main-options-secrets* *main-options-pc*)) (set! (-> *options-remap* (progress-screen game-settings)) *game-options-pc*) + (set! (-> *options-remap* (progress-screen graphic-settings)) *graphic-options-pc*) (let ((max-refresh-rate (pc-get-active-display-refresh-rate))) (cond ((> max-refresh-rate 100) - (set! (-> *options-remap* (progress-screen graphic-settings)) *graphic-options-pc*) (set! *carousell-frame-rate* *carousell-frame-rate-150fps*) ) ((> max-refresh-rate 60) - (set! (-> *options-remap* (progress-screen graphic-settings)) *graphic-options-pc*) (set! *carousell-frame-rate* *carousell-frame-rate-100fps*) - ) - (else - (set! (-> *options-remap* (progress-screen graphic-settings)) *graphic-options-no-frame-rate-pc*) - ) - )) + ))) (set! (-> *options-remap* (progress-screen sound-settings)) *sound-options-pc*) (set! (-> *options-remap* (progress-screen memcard-no-space)) *ok-options*) @@ -975,13 +960,6 @@ (set! (-> *graphic-options-pc* 3 value-to-modify) (&-> *pc-settings* vsync?)) (set! (-> *graphic-options-pc* 5 value-to-modify) (&-> *progress-carousell* int-backup)) (set! (-> *graphic-options-pc* 6 value-to-modify) (&-> *progress-carousell* int-backup)) - ;; disable changes to frame-rate while in speedrunner mode - ;; todo move this to the creation - (set! (-> *graphic-options-pc* 6 option-disabled-func) (lambda () (-> *pc-settings* speedrunner-mode?))) - - (set! (-> *graphic-options-no-frame-rate-pc* 1 value-to-modify) (&-> *progress-carousell* int-backup)) - (set! (-> *graphic-options-no-frame-rate-pc* 2 value-to-modify) (&-> *pc-settings* vsync?)) - (set! (-> *graphic-options-no-frame-rate-pc* 4 value-to-modify) (&-> *progress-carousell* int-backup)) (set! (-> *misc-options* 0 value-to-modify) (&-> *pc-settings* money-starburst?)) (set! (-> *misc-options* 1 value-to-modify) (&-> *pc-settings* discord-rpc?)) @@ -2442,7 +2420,7 @@ ) ) (else - ;; this option is not selected :-( + ;; this option is not selected (case (-> options index option-type) (((game-option-type slider) (game-option-type aspect-ratio) diff --git a/goal_src/jak2/dgos/game.gd b/goal_src/jak2/dgos/game.gd index 43037c5f42..8025b1f52e 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 44f907f591..b2964d22f3 100644 --- a/goal_src/jak2/engine/draw/drawable.gc +++ b/goal_src/jak2/engine/draw/drawable.gc @@ -1769,18 +1769,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* @@ -2037,12 +2036,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 c684760033..49751acfd8 100644 --- a/goal_src/jak2/engine/entity/entity.gc +++ b/goal_src/jak2/engine/entity/entity.gc @@ -498,6 +498,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)) @@ -2251,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 fa89ce5cde..fad8d7ae60 100644 --- a/goal_src/jak2/engine/game/main.gc +++ b/goal_src/jak2/engine/game/main.gc @@ -946,11 +946,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)) @@ -1123,7 +1118,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 a76ed4b167..55eedd7b2f 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/process-drawable/process-drawable-h.gc b/goal_src/jak2/engine/process-drawable/process-drawable-h.gc index dd2b7ec403..4b5de92d99 100644 --- a/goal_src/jak2/engine/process-drawable/process-drawable-h.gc +++ b/goal_src/jak2/engine/process-drawable/process-drawable-h.gc @@ -242,9 +242,11 @@ &key (num! #f) &key (param0 #f) &key (param1 #f) + &key (param2 #f) &key (num-func #f) &key (frame-num #f) - &key (frame-interp #f) + &key (frame-interp0 #f) + &key (frame-interp1 #f) &key (dist #f) &key (eval? #t) ) @@ -257,8 +259,10 @@ num-func = sets the num-func field for the channel. this lets you change the function with eval'ing. param0 = 1st parameter for the playback function. ONLY USE THESE WITH num-func !! param1 = 2nd parameter for the playback function. ONLY USE THESE WITH num-func !! + param2 = 3rd parameter for the playback function. ONLY USE THESE WITH num-func !! frame-num = set the frame-num field. - frame-interp = set the frame-interp field. + frame-interp0 = set the first value of the frame-interp array. + frame-interp1 = set the second value of the frame-interp array. dist = set the dist field. available num! functions: - (+!) = advance anim. @@ -314,6 +318,10 @@ (cond ((eq? num! 'seek!) (if (or (null? num-args) (null? (cdr num-args))) 1.0 (cadr num-args))) ))) + (p2 (if param2 param2 + (cond + ((eq? num! 'seek!) (if (or (null? num-args) (null? (cdr num-args))) 1.0 (cadr num-args))) + ))) (frame-num (cond ((eq? 'max frame-num) (if group! `(the float (1- (-> (the art-joint-anim ,group!) frames num-frames))) @@ -324,11 +332,13 @@ (frame-group (if (or p0 p1 frame-num (not nf)) group! #f)) ) `(let ((ja-ch (-> self skel root-channel ,chan))) - ,(if frame-interp `(set! (-> ja-ch frame-interp) ,frame-interp) `(none)) + ,(if frame-interp0 `(set! (-> ja-ch frame-interp 0) ,frame-interp0) `(none)) + ,(if frame-interp1 `(set! (-> ja-ch frame-interp 1) ,frame-interp1) `(none)) ,(if dist `(set! (-> ja-ch dist) ,dist) `(none)) ,(if frame-group `(set! (-> ja-ch frame-group) (the art-joint-anim ,frame-group)) `(none)) ,(if p0 `(set! (-> ja-ch param 0) ,p0) `(none)) ,(if p1 `(set! (-> ja-ch param 1) ,p1) `(none)) + ,(if p2 `(set! (-> ja-ch param 2) ,p2) `(none)) ,(if num-func `(set! (-> ja-ch num-func) ,num-func) `(none)) ,(if frame-num `(set! (-> ja-ch frame-num) ,frame-num) `(none)) ,(if nf @@ -341,7 +351,7 @@ `(set! (-> ja-ch frame-num) (the float (1- (-> (the art-joint-anim ,group!) frames num-frames)))) `(set! (-> ja-ch frame-num) (the float (1- (-> ja-ch frame-group frames num-frames)))) )) - ((eq? num! 'identity) `(set! (-> ja-ch frame-num) ,(car num-args))) + ((and (eq? num! 'identity) (not (null? num-args))) `(set! (-> ja-ch frame-num) ,(car num-args))) (#t `(none)) ) )) @@ -352,10 +362,12 @@ &key (num! #f) &key (param0 #f) &key (param1 #f) + &key (param2 #f) &key (num-func #f) &key (frame-num #f) - &key (frame-interp #f) + &key (frame-interp0 #f) + &key (frame-interp1 #f) &key (dist #f) ) - `(ja :eval? #f :chan ,chan :group! ,group! :num! ,num! :param0 ,param0 :param1 ,param1 :num-func ,num-func :frame-num ,frame-num :frame-interp ,frame-interp :dist ,dist) + `(ja :eval? #f :chan ,chan :group! ,group! :num! ,num! :param0 ,param0 :param1 ,param1 :param2 ,param2 :num-func ,num-func :frame-num ,frame-num :frame-interp0 ,frame-interp0 :frame-interp1 ,frame-interp1 :dist ,dist) ) diff --git a/goal_src/jak2/engine/target/mech/mech-states.gc b/goal_src/jak2/engine/target/mech/mech-states.gc index b9ed546a42..64eb964c73 100644 --- a/goal_src/jak2/engine/target/mech/mech-states.gc +++ b/goal_src/jak2/engine/target/mech/mech-states.gc @@ -153,12 +153,7 @@ ) 0 (ja :num! (loop! (/ f26-1 (current-cycle-distance (-> self skel))))) - (let ((a0-41 (-> self skel root-channel 1))) - (set! (-> a0-41 frame-interp 1) f30-0) - (set! (-> a0-41 frame-interp 0) f30-0) - (set! (-> a0-41 param 0) 0.0) - (joint-control-channel-group-eval! a0-41 (the-as art-joint-anim #f) num-func-chan) - ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) (ja-no-eval :chan 1 :num! (loop! (/ f26-1 (current-cycle-distance (-> self skel))))) ) ) @@ -312,18 +307,8 @@ 0 (ja :num! (loop! f26-1)) ) - (let ((a0-24 (-> self skel root-channel 1))) - (set! (-> a0-24 frame-interp 1) f30-0) - (set! (-> a0-24 frame-interp 0) f30-0) - (set! (-> a0-24 param 0) 0.0) - (joint-control-channel-group-eval! a0-24 (the-as art-joint-anim #f) num-func-chan) - ) - (let ((a0-25 (-> self skel root-channel 2))) - (set! (-> a0-25 frame-interp 1) f28-0) - (set! (-> a0-25 frame-interp 0) f28-0) - (set! (-> a0-25 param 0) 0.0) - (joint-control-channel-group-eval! a0-25 (the-as art-joint-anim #f) num-func-chan) - ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + (ja :chan 2 :num! (chan 0) :frame-interp0 f28-0 :frame-interp1 f28-0) ) ) #f @@ -1452,13 +1437,7 @@ ) (ja-channel-push! 2 1) (ja :group! jakb-mech-carry-pickup-high-ja :num! min) - (let ((a0-2 (-> self skel root-channel 1))) - (set! (-> a0-2 frame-interp 1) f30-0) - (set! (-> a0-2 frame-interp 0) f30-0) - (set! (-> a0-2 frame-group) (the-as art-joint-anim jakb-mech-carry-pickup-low-ja)) - (set! (-> a0-2 param 0) 0.0) - (joint-control-channel-group-eval! a0-2 (the-as art-joint-anim jakb-mech-carry-pickup-low-ja) num-func-chan) - ) + (ja :chan 1 :group! jakb-mech-carry-pickup-low-ja :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) (suspend) (ja :num! (seek!)) (ja :chan 1 :num! (chan 0)) @@ -1546,10 +1525,7 @@ (ja-no-eval :num! (seek! (ja-aframe 8.0 0))) (while (not (ja-done? 0)) (set! f30-0 (seek f30-0 f28-0 (* 5.0 (seconds-per-frame)))) - (let ((v1-120 (-> self skel root-channel 1))) - (set! (-> v1-120 frame-interp 1) f30-0) - (set! (-> v1-120 frame-interp 0) f30-0) - ) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) (suspend) (ja-eval) ) @@ -1587,10 +1563,7 @@ (ja-no-eval :num! (seek!)) (while (not (ja-done? 0)) (set! f30-0 (seek f30-0 f28-0 (* 5.0 (seconds-per-frame)))) - (let ((v1-174 (-> self skel root-channel 1))) - (set! (-> v1-174 frame-interp 1) f30-0) - (set! (-> v1-174 frame-interp 0) f30-0) - ) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) (suspend) (ja-eval) ) @@ -1608,20 +1581,14 @@ (else (ja-no-eval :num! (seek! (ja-aframe 11.0 0))) (while (not (ja-done? 0)) - (let ((v1-190 (-> self skel root-channel 1))) - (set! (-> v1-190 frame-interp 1) f30-0) - (set! (-> v1-190 frame-interp 0) f30-0) - ) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) (suspend) (ja-eval) ) (suspend) (ja-no-eval :num! (seek! 0.0)) (while (not (ja-done? 0)) - (let ((v1-199 (-> self skel root-channel 1))) - (set! (-> v1-199 frame-interp 1) f30-0) - (set! (-> v1-199 frame-interp 0) f30-0) - ) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) (suspend) (ja-eval) ) @@ -1690,13 +1657,7 @@ ) (ja-channel-push! 2 (seconds 0.1)) (ja :group! jakb-mech-carry-pickup-high-ja :num! max) - (let ((a0-19 (-> self skel root-channel 1))) - (set! (-> a0-19 frame-interp 1) f30-0) - (set! (-> a0-19 frame-interp 0) f30-0) - (set! (-> a0-19 frame-group) (the-as art-joint-anim jakb-mech-carry-pickup-low-ja)) - (set! (-> a0-19 param 0) 0.0) - (joint-control-channel-group-eval! a0-19 (the-as art-joint-anim jakb-mech-carry-pickup-low-ja) num-func-chan) - ) + (ja :chan 1 :group! jakb-mech-carry-pickup-low-ja :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) (suspend) (ja-no-eval :num! (seek! (ja-aframe 8.0 0))) (while (not (ja-done? 0)) @@ -1988,12 +1949,7 @@ ) (ja :num! (loop! f28-1)) ) - (let ((a0-16 (-> self skel root-channel 1))) - (set! (-> a0-16 frame-interp 1) f30-0) - (set! (-> a0-16 frame-interp 0) f30-0) - (set! (-> a0-16 param 0) 0.0) - (joint-control-channel-group-eval! a0-16 (the-as art-joint-anim #f) num-func-chan) - ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) ) ) #f diff --git a/goal_src/jak2/engine/target/target-anim.gc b/goal_src/jak2/engine/target/target-anim.gc index 387f792021..dc37275a28 100644 --- a/goal_src/jak2/engine/target/target-anim.gc +++ b/goal_src/jak2/engine/target/target-anim.gc @@ -1105,10 +1105,7 @@ ) ) ) - (let ((v1-252 (-> self skel root-channel 6))) - (set! (-> v1-252 frame-interp 1) f26-0) - (set! (-> v1-252 frame-interp 0) f26-0) - ) + (ja :chan 6 :frame-interp0 f26-0 :frame-interp1 f26-0) (let* ((f1-14 (* (current-cycle-distance (-> self skel)) (-> self control scale x))) (f0-70 (/ (-> self control ctrl-xz-vel) (* 60.0 (/ f1-14 (-> *TARGET-bank* run-cycle-length))))) ) diff --git a/goal_src/jak2/engine/target/target-carry.gc b/goal_src/jak2/engine/target/target-carry.gc index 4d95bce04f..a018cd561e 100644 --- a/goal_src/jak2/engine/target/target-carry.gc +++ b/goal_src/jak2/engine/target/target-carry.gc @@ -186,17 +186,12 @@ (ja-channel-push! 2 (seconds 0.1)) (target-danger-set! 'carry? #f) (ja :group! (-> self draw art-group data 319) :num! min) - (let ((a0-3 (-> self skel root-channel 1))) - (set! (-> a0-3 frame-interp 1) f30-0) - (set! (-> a0-3 frame-interp 0) f30-0) - (set! (-> a0-3 frame-group) (the-as art-joint-anim (-> self draw art-group data 318))) - (set! (-> a0-3 param 0) 0.0) - (joint-control-channel-group-eval! - a0-3 - (the-as art-joint-anim (-> self draw art-group data 318)) - num-func-chan + (ja :chan 1 + :group! (-> self draw art-group data 318) + :num! (chan 0) + :frame-interp0 f30-0 + :frame-interp1 f30-0 ) - ) (suspend) (format #t "carry picked ~A~%" (handle->process (-> self carry other))) (let ((a1-5 (new 'stack-no-clear 'event-message-block))) @@ -234,10 +229,7 @@ (ja-no-eval :num! (seek! (ja-aframe 5.0 0))) (while (not (ja-done? 0)) (set! f30-0 (seek f30-0 f28-0 (* 5.0 (seconds-per-frame)))) - (let ((v1-45 (-> self skel root-channel 1))) - (set! (-> v1-45 frame-interp 1) f30-0) - (set! (-> v1-45 frame-interp 0) f30-0) - ) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) (suspend) (ja-eval) ) @@ -246,10 +238,7 @@ (ja-no-eval :num! (seek!)) (while (not (ja-done? 0)) (set! f30-0 (seek f30-0 f28-0 (* 5.0 (seconds-per-frame)))) - (let ((v1-70 (-> self skel root-channel 1))) - (set! (-> v1-70 frame-interp 1) f30-0) - (set! (-> v1-70 frame-interp 0) f30-0) - ) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) (when (< 22.0 (ja-aframe-num 0)) (let ((a1-22 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-22 from) (process->ppointer self)) @@ -270,10 +259,7 @@ ) (ja-no-eval :num! (seek! 0.0)) (while (not (ja-done? 0)) - (let ((v1-93 (-> self skel root-channel 1))) - (set! (-> v1-93 frame-interp 1) f30-0) - (set! (-> v1-93 frame-interp 0) f30-0) - ) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) (suspend) (ja-eval) ) @@ -327,17 +313,12 @@ ) (ja-channel-push! 2 (seconds 0.1)) (ja :group! (-> self draw art-group data 319) :num! max) - (let ((a0-16 (-> self skel root-channel 1))) - (set! (-> a0-16 frame-interp 1) f30-0) - (set! (-> a0-16 frame-interp 0) f30-0) - (set! (-> a0-16 frame-group) (the-as art-joint-anim (-> self draw art-group data 318))) - (set! (-> a0-16 param 0) 0.0) - (joint-control-channel-group-eval! - a0-16 - (the-as art-joint-anim (-> self draw art-group data 318)) - num-func-chan + (ja :chan 1 + :group! (-> self draw art-group data 318) + :num! (chan 0) + :frame-interp0 f30-0 + :frame-interp1 f30-0 ) - ) ) (suspend) (ja-no-eval :num! (seek! (ja-aframe 5.0 0))) diff --git a/goal_src/jak2/engine/target/target-swim.gc b/goal_src/jak2/engine/target/target-swim.gc index ae023dedf2..71eb0014ad 100644 --- a/goal_src/jak2/engine/target/target-swim.gc +++ b/goal_src/jak2/engine/target/target-swim.gc @@ -254,10 +254,7 @@ (set! f30-1 (seek f30-1 (lerp-scale 1.0 0.0 (-> self control ctrl-xz-vel) 16384.0 32768.0) (* 4.0 (seconds-per-frame))) ) - (let ((v1-107 (-> self skel root-channel 1))) - (set! (-> v1-107 frame-interp 1) f24-1) - (set! (-> v1-107 frame-interp 0) f24-1) - ) + (ja :chan 1 :frame-interp0 f24-1 :frame-interp1 f24-1) (ja :num! (loop! (/ (-> self control ctrl-xz-vel) (* 60.0 diff --git a/goal_src/jak2/engine/ui/hud.gc b/goal_src/jak2/engine/ui/hud.gc index 3d95fed394..e181ad4d90 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 811fa7a0ea..cfb2406eef 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 1bf47e4210..af8503cb16 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 ce2da2eb27..045c883d94 100644 --- a/goal_src/jak2/kernel-defs.gc +++ b/goal_src/jak2/kernel-defs.gc @@ -244,6 +244,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/kernel/gstring.gc b/goal_src/jak2/kernel/gstring.gc index 33dd6f600b..4b41e4ae7a 100644 --- a/goal_src/jak2/kernel/gstring.gc +++ b/goal_src/jak2/kernel/gstring.gc @@ -456,6 +456,7 @@ (cat-string<-string_to_charp arg0 arg1 s4-0) ) ) + (defmacro is-whitespace-char? (c) ;; 32 = space ;; 9 = \t diff --git a/goal_src/jak2/levels/castle/roboguard-level.gc b/goal_src/jak2/levels/castle/roboguard-level.gc index e9cdabe6fd..7f6fb9959b 100644 --- a/goal_src/jak2/levels/castle/roboguard-level.gc +++ b/goal_src/jak2/levels/castle/roboguard-level.gc @@ -376,11 +376,7 @@ 0 ) :code (behavior () - (let ((a0-0 (-> self skel root-channel 0))) - (set! (-> a0-0 frame-group) (the-as art-joint-anim roboguard-idle-to-ball-ja)) - (set! (-> a0-0 frame-num) 3.0) - (joint-control-channel-group! a0-0 (the-as art-joint-anim roboguard-idle-to-ball-ja) num-func-identity) - ) + (ja-no-eval :group! roboguard-idle-to-ball-ja :num! (identity 3.0)) (until (logtest? (-> self root status) (collide-status on-surface)) (nav-enemy-falling-post) (suspend) @@ -1172,13 +1168,14 @@ ) (defmethod deactivate ((this roboguard-level)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." (sound-stop (-> this roll-sound)) (call-parent-method this) (none) ) -(defmethod relocate ((this roboguard-level) (arg0 int)) - (call-parent-method this arg0) +(defmethod relocate ((this roboguard-level) (offset int)) + (call-parent-method this offset) ) (defmethod init-enemy-collision! ((this roboguard-level)) diff --git a/goal_src/jak2/levels/city/common/pilot-states.gc b/goal_src/jak2/levels/city/common/pilot-states.gc index b517d804fb..d1e5237c02 100644 --- a/goal_src/jak2/levels/city/common/pilot-states.gc +++ b/goal_src/jak2/levels/city/common/pilot-states.gc @@ -35,13 +35,13 @@ (let ((gp-0 (-> self pilot))) (let ((f30-0 (* 5.0 (- 1.0 (-> gp-0 left-right-interp))))) (ja :num-func num-func-identity :frame-num (ja-aframe f30-0 0)) - (let ((f0-3 (fmax 0.0 (fmin 1.0 (* 0.5 (+ 1.0 (* 1.42 (+ -0.3 (-> gp-0 front-back-interp)))))))) - (s5-1 (-> self skel root-channel 1)) + (let ((f0-3 (fmax 0.0 (fmin 1.0 (* 0.5 (+ 1.0 (* 1.42 (+ -0.3 (-> gp-0 front-back-interp))))))))) + (ja :chan 1 + :frame-interp0 f0-3 + :frame-interp1 f0-3 + :num-func num-func-identity + :frame-num (ja-aframe f30-0 1) ) - (set! (-> s5-1 frame-interp 1) f0-3) - (set! (-> s5-1 frame-interp 0) f0-3) - (set! (-> s5-1 num-func) num-func-identity) - (set! (-> s5-1 frame-num) (ja-aframe f30-0 1)) ) ) (let ((f0-6 (* 5.0 (- 1.0 (-> gp-0 up-down-interp)))) diff --git a/goal_src/jak2/levels/city/kiddogescort/kidesc-states.gc b/goal_src/jak2/levels/city/kiddogescort/kidesc-states.gc index 0db2d64094..28654b128a 100644 --- a/goal_src/jak2/levels/city/kiddogescort/kidesc-states.gc +++ b/goal_src/jak2/levels/city/kiddogescort/kidesc-states.gc @@ -507,12 +507,12 @@ ) ) (ja :num-func num-func-identity :frame-num (ja-aframe f30-0 0)) - (let ((gp-2 (-> self skel root-channel 1))) - (set! (-> gp-2 frame-interp 1) f26-0) - (set! (-> gp-2 frame-interp 0) f26-0) - (set! (-> gp-2 num-func) num-func-identity) - (set! (-> gp-2 frame-num) (ja-aframe f28-0 0)) - ) + (ja :chan 1 + :frame-interp0 f26-0 + :frame-interp1 f26-0 + :num-func num-func-identity + :frame-num (ja-aframe f28-0 0) + ) (suspend) ) ) diff --git a/goal_src/jak2/levels/city/traffic/citizen/metalhead-flitter.gc b/goal_src/jak2/levels/city/traffic/citizen/metalhead-flitter.gc index c85c90c0d0..4a85053059 100644 --- a/goal_src/jak2/levels/city/traffic/citizen/metalhead-flitter.gc +++ b/goal_src/jak2/levels/city/traffic/citizen/metalhead-flitter.gc @@ -819,24 +819,18 @@ (ja-channel-push! 2 (seconds 0.1)) (let ((f30-0 (metalhead-flitter-method-209 self))) (ja-no-eval :group! flitter-attack-ja :num! (seek! max 0.8) :frame-num 0.0) - (let ((a0-3 (-> self skel root-channel 1))) - (set! (-> a0-3 frame-interp 1) f30-0) - (set! (-> a0-3 frame-interp 0) f30-0) - (set! (-> a0-3 frame-group) (the-as art-joint-anim flitter-attack-high-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 flitter-attack-high-ja) num-func-chan) - ) + (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 (metalhead-flitter-method-209 self) (* 0.2 (seconds-per-frame)))) (ja :num! (seek! max 0.8)) - (let ((a0-7 (-> self skel root-channel 1))) - (set! (-> a0-7 frame-interp 1) f30-0) - (set! (-> a0-7 frame-interp 0) f30-0) - (set! (-> a0-7 param 0) 0.0) - (joint-control-channel-group-eval! a0-7 (the-as art-joint-anim #f) num-func-chan) - ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) ) ) (let ((v1-40 self)) diff --git a/goal_src/jak2/levels/common/enemy/flitter.gc b/goal_src/jak2/levels/common/enemy/flitter.gc index 96c1059bea..cddbf21b14 100644 --- a/goal_src/jak2/levels/common/enemy/flitter.gc +++ b/goal_src/jak2/levels/common/enemy/flitter.gc @@ -1190,24 +1190,18 @@ (ja-channel-push! 2 (seconds 0.1)) (let ((f30-0 (flitter-method-183 self))) (ja-no-eval :group! flitter-attack-ja :num! (seek! max 0.8) :frame-num 0.0) - (let ((a0-3 (-> self skel root-channel 1))) - (set! (-> a0-3 frame-interp 1) f30-0) - (set! (-> a0-3 frame-interp 0) f30-0) - (set! (-> a0-3 frame-group) (the-as art-joint-anim flitter-attack-high-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 flitter-attack-high-ja) num-func-chan) - ) + (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 (flitter-method-183 self) (* 0.2 (seconds-per-frame)))) (ja :num! (seek! max 0.8)) - (let ((a0-7 (-> self skel root-channel 1))) - (set! (-> a0-7 frame-interp 1) f30-0) - (set! (-> a0-7 frame-interp 0) f30-0) - (set! (-> a0-7 param 0) 0.0) - (joint-control-channel-group-eval! a0-7 (the-as art-joint-anim #f) num-func-chan) - ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) ) ) (let ((v1-40 self)) diff --git a/goal_src/jak2/levels/common/enemy/spyder.gc b/goal_src/jak2/levels/common/enemy/spyder.gc index 16d92ea176..290b978b7b 100644 --- a/goal_src/jak2/levels/common/enemy/spyder.gc +++ b/goal_src/jak2/levels/common/enemy/spyder.gc @@ -1041,14 +1041,13 @@ (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) - (let ((a0-12 (-> self skel root-channel 1))) - (set! (-> a0-12 frame-interp 1) f30-0) - (set! (-> a0-12 frame-interp 0) f30-0) - (set! (-> a0-12 frame-group) (the-as art-joint-anim spyder-shoot-high-ja)) - (set! (-> a0-12 param 0) 0.0) - (set! (-> a0-12 frame-num) 0.0) - (joint-control-channel-group! a0-12 (the-as art-joint-anim spyder-shoot-high-ja) num-func-chan) - ) + (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))) @@ -1072,12 +1071,7 @@ (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!)) - (let ((a0-27 (-> self skel root-channel 1))) - (set! (-> a0-27 frame-interp 1) f30-0) - (set! (-> a0-27 frame-interp 0) f30-0) - (set! (-> a0-27 param 0) 0.0) - (joint-control-channel-group-eval! a0-27 (the-as art-joint-anim #f) num-func-chan) - ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) (suspend) ) ) @@ -1297,16 +1291,16 @@ (none) ) -(defmethod relocate ((this spyder) (arg0 int)) +(defmethod relocate ((this spyder) (offset int)) (if (nonzero? (-> this joint)) - (&+! (-> this joint) arg0) + (&+! (-> this joint) offset) ) (dotimes (v1-4 4) (if (nonzero? (-> this joint-ik v1-4)) - (&+! (-> this joint-ik v1-4) arg0) + (&+! (-> this joint-ik v1-4) offset) ) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) (defmethod init-enemy! ((this spyder)) diff --git a/goal_src/jak2/levels/drill/drill-obs.gc b/goal_src/jak2/levels/drill/drill-obs.gc index d1befd0343..dc82db3f8f 100644 --- a/goal_src/jak2/levels/drill/drill-obs.gc +++ b/goal_src/jak2/levels/drill/drill-obs.gc @@ -342,11 +342,8 @@ This commonly includes things such as: (until #f (let ((f30-0 (- (-> self extent 1 y) (-> self extent 0 y)))) (when (!= f30-0 (-> self length)) - (let ((f0-3 (* 0.000010172526 f30-0)) - (a0-0 (-> self skel root-channel 0)) - ) - (set! (-> a0-0 frame-num) f0-3) - (joint-control-channel-group-eval! a0-0 (the-as art-joint-anim #f) num-func-identity) + (let ((f0-3 (* 0.000010172526 f30-0))) + (ja :num! (identity f0-3)) ) (transform-post) (set! (-> self length) f30-0) @@ -449,6 +446,7 @@ This commonly includes things such as: ) (defmethod deactivate ((this drill-elevator)) + "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) @@ -586,6 +584,7 @@ do so. ) (defmethod deactivate ((this drill-mech-elevator)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." (if (nonzero? (-> this running-sound-id)) (sound-stop (-> this running-sound-id)) ) @@ -793,14 +792,15 @@ For example for an elevator pre-compute the distance between the first and last (none) ) -(defmethod relocate ((this fire-floor) (arg0 int)) +(defmethod relocate ((this fire-floor) (offset int)) (if (nonzero? (-> this part-off)) - (&+! (-> this part-off) arg0) + (&+! (-> this part-off) offset) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) (defmethod deactivate ((this fire-floor)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." (sound-stop (-> this sound-id)) (if (nonzero? (-> this part-off)) (kill-and-free-particles (-> this part-off)) @@ -990,14 +990,15 @@ This commonly includes things such as: ) ;; WARN: Return type mismatch basebutton vs drill-switch. -(defmethod relocate ((this drill-switch) (arg0 int)) +(defmethod relocate ((this drill-switch) (offset int)) (if (nonzero? (-> this green-part)) - (&+! (-> this green-part) arg0) + (&+! (-> this green-part) offset) ) - (the-as drill-switch ((method-of-type basebutton relocate) this arg0)) + (the-as drill-switch ((method-of-type basebutton relocate) this offset)) ) (defmethod deactivate ((this drill-switch)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." (if (nonzero? (-> this green-part)) (kill-and-free-particles (-> this green-part)) ) @@ -1348,6 +1349,7 @@ This commonly includes things such as: (defmethod deactivate ((this drill-laser)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." (sound-stop (-> this hit-sound-id)) ((method-of-type process-drawable deactivate) this) (none) diff --git a/goal_src/jak2/levels/forest/wren.gc b/goal_src/jak2/levels/forest/wren.gc index 24d287ac0c..72a5a000b6 100644 --- a/goal_src/jak2/levels/forest/wren.gc +++ b/goal_src/jak2/levels/forest/wren.gc @@ -324,11 +324,7 @@ If so, it transitions from [[wren::peck]] to [[wren::hunt]]" ) (set! (-> v1-59 frame-group) (the-as art-joint-anim wren-glide-ja)) ) - (let ((v1-62 (-> self skel root-channel 1))) - (set! (-> v1-62 frame-interp 1) f30-1) - (set! (-> v1-62 frame-interp 0) f30-1) - (set! (-> v1-62 frame-group) (the-as art-joint-anim wren-fly-ja)) - ) + (ja :chan 1 :group! wren-fly-ja :frame-interp0 f30-1 :frame-interp1 f30-1) (let ((f30-2 (lerp 0.6 2.4 f30-1))) (ja :num! (loop! f30-2)) (ja :chan 1 :num! (loop! f30-2)) @@ -427,15 +423,15 @@ If so, it transitions from [[wren::peck]] to [[wren::hunt]]" ) ) -(defmethod relocate ((this wren) (arg0 int)) +(defmethod relocate ((this wren) (offset int)) (dotimes (v1-0 2) (when (-> this fly-curve v1-0) (if (nonzero? (-> this fly-curve v1-0)) - (&+! (-> this fly-curve v1-0) arg0) + (&+! (-> this fly-curve v1-0) offset) ) ) ) - (call-parent-method this arg0) + (call-parent-method this offset) ) ;; WARN: Return type mismatch object vs none. diff --git a/goal_src/jak2/levels/nest/boss/metalkor-states.gc b/goal_src/jak2/levels/nest/boss/metalkor-states.gc index a0dfb8616e..062658fc74 100644 --- a/goal_src/jak2/levels/nest/boss/metalkor-states.gc +++ b/goal_src/jak2/levels/nest/boss/metalkor-states.gc @@ -295,6 +295,7 @@ ) (defmethod deactivate ((this metalkor)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." (if (-> this wing-sound-playing) (sound-stop (-> this wing-sound)) ) @@ -303,14 +304,14 @@ ) ;; WARN: Return type mismatch process-focusable vs metalkor. -(defmethod relocate ((this metalkor) (arg0 int)) +(defmethod relocate ((this metalkor) (offset int)) (if (nonzero? (-> this shot-anticipate)) - (&+! (-> this shot-anticipate) arg0) + (&+! (-> this shot-anticipate) offset) ) (if (nonzero? (-> this neck)) - (&+! (-> this neck) arg0) + (&+! (-> this neck) offset) ) - (the-as metalkor ((method-of-type process-focusable relocate) this arg0)) + (the-as metalkor ((method-of-type process-focusable relocate) this offset)) ) (defmethod get-trans ((this metalkor) (arg0 int)) @@ -514,10 +515,7 @@ ) ) ) - (let ((v1-24 (-> self skel root-channel 1))) - (set! (-> v1-24 frame-interp 1) f30-2) - (set! (-> v1-24 frame-interp 0) f30-2) - ) + (ja :chan 1 :frame-interp0 f30-2 :frame-interp1 f30-2) ) ) (none) diff --git a/goal_src/jak2/levels/stadium/stadium-obs.gc b/goal_src/jak2/levels/stadium/stadium-obs.gc index 1b315e171a..cb706754c3 100644 --- a/goal_src/jak2/levels/stadium/stadium-obs.gc +++ b/goal_src/jak2/levels/stadium/stadium-obs.gc @@ -992,6 +992,7 @@ This commonly includes things such as: ) (defmethod deactivate ((this rift-rider)) + "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) @@ -1935,6 +1936,7 @@ This commonly includes things such as: ) (defmethod deactivate ((this stad-samos)) + "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) ) @@ -2115,12 +2117,7 @@ This commonly includes things such as: ) ) ) - (let ((a0-10 (-> self skel root-channel 0))) - (set! (-> a0-10 frame-interp 1) f28-0) - (set! (-> a0-10 frame-interp 0) f28-0) - (set! (-> a0-10 param 0) f30-0) - (joint-control-channel-group-eval! a0-10 (the-as art-joint-anim #f) num-func-loop!) - ) + (ja :num! (loop! f30-0) :frame-interp0 f28-0 :frame-interp1 f28-0) (let ((a0-11 (-> self skel root-channel 1))) (let ((f0-9 (- 1.0 f28-0))) (set! (-> a0-11 frame-interp 1) f0-9) @@ -2522,6 +2519,7 @@ This commonly includes things such as: ) (defmethod run-logic? ((this stad-force-field)) + "Should this process be run? Checked by execute-process-tree." #t ) diff --git a/goal_src/jak2/levels/tomb/monster-frog.gc b/goal_src/jak2/levels/tomb/monster-frog.gc index 06f88b1d66..265bea2915 100644 --- a/goal_src/jak2/levels/tomb/monster-frog.gc +++ b/goal_src/jak2/levels/tomb/monster-frog.gc @@ -533,43 +533,31 @@ 0 (ja-channel-push! 2 (seconds 0.01)) (ja-no-eval :group! monster-frog-hop-small-start-ja :num! (seek! max f28-1) :frame-num 0.0) - (let ((a0-15 (-> self skel root-channel 1))) - (set! (-> a0-15 frame-interp 1) f30-1) - (set! (-> a0-15 frame-interp 0) f30-1) - (set! (-> a0-15 frame-group) (the-as art-joint-anim monster-frog-hop-slow-start-ja)) - (set! (-> a0-15 param 0) 0.0) - (set! (-> a0-15 frame-num) 0.0) - (joint-control-channel-group! a0-15 (the-as art-joint-anim monster-frog-hop-slow-start-ja) num-func-chan) - ) + (ja-no-eval :chan 1 + :group! monster-frog-hop-slow-start-ja + :num! (chan 0) + :frame-interp0 f30-1 + :frame-interp1 f30-1 + :frame-num 0.0 + ) (until (ja-done? 0) (suspend) (ja :num! (seek! max f28-1)) - (let ((a0-17 (-> self skel root-channel 1))) - (set! (-> a0-17 frame-interp 1) f30-1) - (set! (-> a0-17 frame-interp 0) f30-1) - (set! (-> a0-17 param 0) 0.0) - (joint-control-channel-group-eval! a0-17 (the-as art-joint-anim #f) num-func-chan) - ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-1 :frame-interp1 f30-1) ) (nav-enemy-method-167 self) (ja-no-eval :group! monster-frog-hop-small-end-ja :num! (seek! max f28-1) :frame-num 0.0) - (let ((a0-21 (-> self skel root-channel 1))) - (set! (-> a0-21 frame-interp 1) f30-1) - (set! (-> a0-21 frame-interp 0) f30-1) - (set! (-> a0-21 frame-group) (the-as art-joint-anim monster-frog-hop-slow-end-ja)) - (set! (-> a0-21 param 0) 0.0) - (set! (-> a0-21 frame-num) 0.0) - (joint-control-channel-group! a0-21 (the-as art-joint-anim monster-frog-hop-slow-end-ja) num-func-chan) - ) + (ja-no-eval :chan 1 + :group! monster-frog-hop-slow-end-ja + :num! (chan 0) + :frame-interp0 f30-1 + :frame-interp1 f30-1 + :frame-num 0.0 + ) (until (ja-done? 0) (suspend) (ja :num! (seek! max f28-1)) - (let ((a0-23 (-> self skel root-channel 1))) - (set! (-> a0-23 frame-interp 1) f30-1) - (set! (-> a0-23 frame-interp 0) f30-1) - (set! (-> a0-23 param 0) 0.0) - (joint-control-channel-group-eval! a0-23 (the-as art-joint-anim #f) num-func-chan) - ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-1 :frame-interp1 f30-1) ) ) ) diff --git a/goal_src/jak2/levels/tomb/target-indax.gc b/goal_src/jak2/levels/tomb/target-indax.gc index 38ab5d7cdf..2ca4d0d2d2 100644 --- a/goal_src/jak2/levels/tomb/target-indax.gc +++ b/goal_src/jak2/levels/tomb/target-indax.gc @@ -680,10 +680,7 @@ ) (set! f30-0 (seek f30-0 f26-1 (* 4.0 (seconds-per-frame)))) ) - (let ((v1-94 (-> self skel root-channel 1))) - (set! (-> v1-94 frame-interp 1) f28-0) - (set! (-> v1-94 frame-interp 0) f28-0) - ) + (ja :chan 1 :frame-interp0 f28-0 :frame-interp1 f28-0) (let ((v1-98 (-> self skel root-channel 2)) (f0-23 (- 1.0 f30-0)) ) 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 0000000000..c04ea6c0ca --- /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 3b09a7818c..09a8b54734 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 f489bc8462..c3ade59e37 100644 --- a/goal_src/jak2/pc/pckernel-impl.gc +++ b/goal_src/jak2/pc/pckernel-impl.gc @@ -68,7 +68,7 @@ (icelandic 17) (russian 18) (polish 19) - (lithuanian 19) + (lithuanian 20) (custom 999) ;; temp ) @@ -89,6 +89,7 @@ (fast-airlock? symbol) (fast-elevator? symbol) (fast-progress? symbol) + (minimap-force-north symbol) (stats statistics) @@ -111,6 +112,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 @@ -142,6 +144,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 ebbfe0e6ed..4465b16a31 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/arenacst.gd b/goal_src/jak3/dgos/arenacst.gd index 378a7a260b..c43b3b8818 100644 --- a/goal_src/jak3/dgos/arenacst.gd +++ b/goal_src/jak3/dgos/arenacst.gd @@ -1,5 +1,5 @@ ("ARENACST.DGO" - ("tpage-1484.o" + ("tpage-1484.go" "tpage-1245.go" "tpage-1248.go" "tpage-1246.go" @@ -14,5 +14,5 @@ "blue-gun-mod-one-ag.go" "wstd-gate-pass-ag.go" "yellow-barrel-ag.go" - "arenacst.o" + "arenacst.go" )) diff --git a/goal_src/jak3/dgos/cfa.gd b/goal_src/jak3/dgos/cfa.gd index 0e8b94aaac..d3bb3e4773 100644 --- a/goal_src/jak3/dgos/cfa.gd +++ b/goal_src/jak3/dgos/cfa.gd @@ -17,5 +17,5 @@ "farm-beetree-ag.go" "farm-small-cabbage-ag.go" "farm-sprinkler-barrels-ag.go" - "ctyfarma-vis.o" + "ctyfarma-vis.go" )) diff --git a/goal_src/jak3/dgos/cfb.gd b/goal_src/jak3/dgos/cfb.gd index 6e78b96ccb..281b70bde4 100644 --- a/goal_src/jak3/dgos/cfb.gd +++ b/goal_src/jak3/dgos/cfb.gd @@ -16,5 +16,5 @@ "farm-beetree-ag.go" "farm-small-cabbage-ag.go" "farm-sprinkler-barrels-ag.go" - "ctyfarmb-vis.o" + "ctyfarmb-vis.go" )) diff --git a/goal_src/jak3/dgos/cgb.gd b/goal_src/jak3/dgos/cgb.gd index f7e305663b..896516f5c7 100644 --- a/goal_src/jak3/dgos/cgb.gd +++ b/goal_src/jak3/dgos/cgb.gd @@ -10,5 +10,5 @@ "city-flitter-ag.go" "com-airlock-outer-ag.go" "battle-amulet-ag.go" - "ctygenb-vis.o" + "ctygenb-vis.go" )) diff --git a/goal_src/jak3/dgos/cia.gd b/goal_src/jak3/dgos/cia.gd index f3609aeed2..d3bb64fcc5 100644 --- a/goal_src/jak3/dgos/cia.gd +++ b/goal_src/jak3/dgos/cia.gd @@ -11,5 +11,5 @@ "com-airlock-outer-ag.go" "ctyinda-evil-streetlamp-ag.go" "vin-door-ctyinda-ag.go" - "ctyinda-vis.o" + "ctyinda-vis.go" )) diff --git a/goal_src/jak3/dgos/cib.gd b/goal_src/jak3/dgos/cib.gd index 164e9f7cb7..009a145feb 100644 --- a/goal_src/jak3/dgos/cib.gd +++ b/goal_src/jak3/dgos/cib.gd @@ -7,5 +7,5 @@ "tpage-184.go" "tpage-181.go" "krimson-wall-ag.go" - "ctyindb-vis.o" + "ctyindb-vis.go" )) diff --git a/goal_src/jak3/dgos/citycast.gd b/goal_src/jak3/dgos/citycast.gd index 4f74df1680..dece3548ce 100644 --- a/goal_src/jak3/dgos/citycast.gd +++ b/goal_src/jak3/dgos/citycast.gd @@ -1,10 +1,10 @@ ("CITYCAST.DGO" - ("tpage-2094.o" + ("tpage-2094.go" "tpage-2095.go" "daxter-highres-ag.go" "jakc-highres-ag.go" "torn-highres-ag.go" "palmpilot-b-ag.go" "particleman-ag.go" - "citycast.o" + "citycast.go" )) diff --git a/goal_src/jak3/dgos/comba.gd b/goal_src/jak3/dgos/comba.gd index 782a11a9f5..45563db6c4 100644 --- a/goal_src/jak3/dgos/comba.gd +++ b/goal_src/jak3/dgos/comba.gd @@ -46,5 +46,5 @@ "kidmedallion-ag.go" "particleman-ag.go" "security-wall-ag.go" - "comba.o" + "comba.go" )) diff --git a/goal_src/jak3/dgos/combb.gd b/goal_src/jak3/dgos/combb.gd index 0d6b9f781b..a70197c685 100644 --- a/goal_src/jak3/dgos/combb.gd +++ b/goal_src/jak3/dgos/combb.gd @@ -1,4 +1,4 @@ ("COMBB.DGO" - ("tpage-2189.o" - "combb.o" + ("tpage-2189.go" + "combb.go" )) diff --git a/goal_src/jak3/dgos/combc.gd b/goal_src/jak3/dgos/combc.gd index e953bda6a9..205f559c69 100644 --- a/goal_src/jak3/dgos/combc.gd +++ b/goal_src/jak3/dgos/combc.gd @@ -1,4 +1,4 @@ ("COMBC.DGO" - ("tpage-2191.o" - "combc.o" + ("tpage-2191.go" + "combc.go" )) diff --git a/goal_src/jak3/dgos/combd.gd b/goal_src/jak3/dgos/combd.gd index 3d9ad1965a..830dc7958b 100644 --- a/goal_src/jak3/dgos/combd.gd +++ b/goal_src/jak3/dgos/combd.gd @@ -1,4 +1,4 @@ ("COMBD.DGO" - ("tpage-2199.o" - "combd.o" + ("tpage-2199.go" + "combd.go" )) diff --git a/goal_src/jak3/dgos/combe.gd b/goal_src/jak3/dgos/combe.gd index 9ad20b7a74..45951a7e4f 100644 --- a/goal_src/jak3/dgos/combe.gd +++ b/goal_src/jak3/dgos/combe.gd @@ -1,4 +1,4 @@ ("COMBE.DGO" - ("tpage-2599.o" - "combe.o" + ("tpage-2599.go" + "combe.go" )) diff --git a/goal_src/jak3/dgos/combn.gd b/goal_src/jak3/dgos/combn.gd index df14680119..1223cce53f 100644 --- a/goal_src/jak3/dgos/combn.gd +++ b/goal_src/jak3/dgos/combn.gd @@ -1,7 +1,7 @@ ("COMBN.DGO" - ("tpage-2210.o" + ("tpage-2210.go" "tpage-2595.go" "tpage-2211.go" "min-elevator-ag.go" - "combn.o" + "combn.go" )) diff --git a/goal_src/jak3/dgos/combx.gd b/goal_src/jak3/dgos/combx.gd index 1f70ade938..31fe1f5f9f 100644 --- a/goal_src/jak3/dgos/combx.gd +++ b/goal_src/jak3/dgos/combx.gd @@ -9,5 +9,5 @@ "pecker-ingame-ag.go" "jakc-highres-ag.go" "tpl-elevator-ag.go" - "combx.o" + "combx.go" )) diff --git a/goal_src/jak3/dgos/cpo.gd b/goal_src/jak3/dgos/cpo.gd index 347a21b27c..806c725746 100644 --- a/goal_src/jak3/dgos/cpo.gd +++ b/goal_src/jak3/dgos/cpo.gd @@ -12,5 +12,5 @@ "mecha-daxter-ag.go" "air-train-ag.go" "hip-door-a-ag.go" - "ctyport-vis.o" + "ctyport-vis.go" )) diff --git a/goal_src/jak3/dgos/cta.gd b/goal_src/jak3/dgos/cta.gd index 46b6727a5a..73fce5d419 100644 --- a/goal_src/jak3/dgos/cta.gd +++ b/goal_src/jak3/dgos/cta.gd @@ -7,5 +7,5 @@ "tpage-133.go" "tpage-131.go" "des-burning-bush-ag.go" - "ctysluma-vis.o" + "ctysluma-vis.go" )) diff --git a/goal_src/jak3/dgos/ctb.gd b/goal_src/jak3/dgos/ctb.gd index b8c0026f2d..647c09d6b2 100644 --- a/goal_src/jak3/dgos/ctb.gd +++ b/goal_src/jak3/dgos/ctb.gd @@ -6,5 +6,5 @@ "tpage-162.go" "tpage-159.go" "cty-door-ag.go" - "ctyslumb-vis.o" + "ctyslumb-vis.go" )) diff --git a/goal_src/jak3/dgos/ctc.gd b/goal_src/jak3/dgos/ctc.gd index 90abcd95fa..ded5951b26 100644 --- a/goal_src/jak3/dgos/ctc.gd +++ b/goal_src/jak3/dgos/ctc.gd @@ -9,5 +9,5 @@ "cty-door-ag.go" "cty-elevator-ag.go" "ctyslumc-flag-ag.go" - "ctyslumc-vis.o" + "ctyslumc-vis.go" )) diff --git a/goal_src/jak3/dgos/ctycara.gd b/goal_src/jak3/dgos/ctycara.gd index 7772a39e3f..333ed566c9 100644 --- a/goal_src/jak3/dgos/ctycara.gd +++ b/goal_src/jak3/dgos/ctycara.gd @@ -1,7 +1,7 @@ ("CTYCARA.DGO" - ("tpage-948.o" + ("tpage-948.go" "carc-ag.go" "cara-ag.go" "carb-ag.go" - "ctycara.o" + "ctycara.go" )) diff --git a/goal_src/jak3/dgos/ctycarb.gd b/goal_src/jak3/dgos/ctycarb.gd index fc0632bc7d..3a6875a006 100644 --- a/goal_src/jak3/dgos/ctycarb.gd +++ b/goal_src/jak3/dgos/ctycarb.gd @@ -1,7 +1,7 @@ ("CTYCARB.DGO" - ("tpage-949.o" + ("tpage-949.go" "bikec-ag.go" "bikeb-ag.go" "bikea-ag.go" - "ctycarb.o" + "ctycarb.go" )) diff --git a/goal_src/jak3/dgos/ctycarc.gd b/goal_src/jak3/dgos/ctycarc.gd index b5756cd5bc..6f0a0bd78c 100644 --- a/goal_src/jak3/dgos/ctycarc.gd +++ b/goal_src/jak3/dgos/ctycarc.gd @@ -1,6 +1,6 @@ ("CTYCARC.DGO" - ("tpage-950.o" + ("tpage-950.go" "tpage-951.go" "hellcat-ag.go" - "ctycarc.o" + "ctycarc.go" )) diff --git a/goal_src/jak3/dgos/ctycarkg.gd b/goal_src/jak3/dgos/ctycarkg.gd index 2517f79724..be2215e69d 100644 --- a/goal_src/jak3/dgos/ctycarkg.gd +++ b/goal_src/jak3/dgos/ctycarkg.gd @@ -1,3 +1,3 @@ ("CTYCARKG.DGO" - ("ctycarkg.o" + ("ctycarkg.go" )) diff --git a/goal_src/jak3/dgos/ctypepa.gd b/goal_src/jak3/dgos/ctypepa.gd index f5225a9784..813b473134 100644 --- a/goal_src/jak3/dgos/ctypepa.gd +++ b/goal_src/jak3/dgos/ctypepa.gd @@ -1,7 +1,7 @@ ("CTYPEPA.DGO" - ("tpage-956.o" + ("tpage-956.go" "citizen-fat-ag.go" "citizen-norm-ag.go" "citizen-chick-ag.go" - "ctypepa.o" + "ctypepa.go" )) diff --git a/goal_src/jak3/dgos/ctypepb.gd b/goal_src/jak3/dgos/ctypepb.gd index 95f037e451..31c988b01f 100644 --- a/goal_src/jak3/dgos/ctypepb.gd +++ b/goal_src/jak3/dgos/ctypepb.gd @@ -1,5 +1,5 @@ ("CTYPEPB.DGO" - ("tpage-958.o" + ("tpage-958.go" "predator-ag.go" - "ctypepb.o" + "ctypepb.go" )) diff --git a/goal_src/jak3/dgos/ctypepc.gd b/goal_src/jak3/dgos/ctypepc.gd index cdf86f6cad..a1576a14e8 100644 --- a/goal_src/jak3/dgos/ctypepc.gd +++ b/goal_src/jak3/dgos/ctypepc.gd @@ -1,3 +1,3 @@ ("CTYPEPC.DGO" - ("ctypepc.o" + ("ctypepc.go" )) diff --git a/goal_src/jak3/dgos/ctypesa.gd b/goal_src/jak3/dgos/ctypesa.gd index 16c50131ee..bab2deb105 100644 --- a/goal_src/jak3/dgos/ctypesa.gd +++ b/goal_src/jak3/dgos/ctypesa.gd @@ -1,8 +1,8 @@ ("CTYPESA.DGO" - ("tpage-957.o" + ("tpage-957.go" "crimson-guard-ag.go" "shield-sphere-explode-ag.go" "shield-sphere-distort-ag.go" "shield-sphere-ag.go" - "ctypesa.o" + "ctypesa.go" )) diff --git a/goal_src/jak3/dgos/ctypesb.gd b/goal_src/jak3/dgos/ctypesb.gd index 71c1cf2782..bc3de4373a 100644 --- a/goal_src/jak3/dgos/ctypesb.gd +++ b/goal_src/jak3/dgos/ctypesb.gd @@ -4,5 +4,5 @@ "tpage-1758.go" "city-grunt-ag.go" "city-flitter-ag.go" - "ctypesb.o" + "ctypesb.go" )) diff --git a/goal_src/jak3/dgos/ctypesc.gd b/goal_src/jak3/dgos/ctypesc.gd index 702a9d4e56..73fc49e536 100644 --- a/goal_src/jak3/dgos/ctypesc.gd +++ b/goal_src/jak3/dgos/ctypesc.gd @@ -7,5 +7,5 @@ "spydroid-ag.go" "kg-flying-turret-ag.go" "kg-debris-ag.go" - "ctypesc.o" + "ctypesc.go" )) diff --git a/goal_src/jak3/dgos/cwi.gd b/goal_src/jak3/dgos/cwi.gd index e62cb7d361..10c97fd124 100644 --- a/goal_src/jak3/dgos/cwi.gd +++ b/goal_src/jak3/dgos/cwi.gd @@ -101,5 +101,5 @@ "searchlight-ag.go" "burning-bush-ag.go" "security-wall-ag.go" - "ctywide-vis.o" + "ctywide-vis.go" )) diff --git a/goal_src/jak3/dgos/desa.gd b/goal_src/jak3/dgos/desa.gd index 5f2730878c..71c6ae43f0 100644 --- a/goal_src/jak3/dgos/desa.gd +++ b/goal_src/jak3/dgos/desa.gd @@ -1,7 +1,7 @@ ("DESA.DGO" - ("tpage-1372.o" + ("tpage-1372.go" "tpage-3309.go" "tpage-1579.go" "jakc-scarf-ag.go" - "deserta-vis.o" + "deserta-vis.go" )) diff --git a/goal_src/jak3/dgos/desb.gd b/goal_src/jak3/dgos/desb.gd index 3d1208a929..75e7fd4e66 100644 --- a/goal_src/jak3/dgos/desb.gd +++ b/goal_src/jak3/dgos/desb.gd @@ -1,8 +1,8 @@ ("DESB.DGO" - ("tpage-1377.o" + ("tpage-1377.go" "tpage-1378.go" "tpage-1379.go" "wascity-airlock-ag.go" "air-train-ag.go" - "desertb-vis.o" + "desertb-vis.go" )) diff --git a/goal_src/jak3/dgos/desbattl.gd b/goal_src/jak3/dgos/desbattl.gd index 4124c194d4..328073feaa 100644 --- a/goal_src/jak3/dgos/desbattl.gd +++ b/goal_src/jak3/dgos/desbattl.gd @@ -17,5 +17,5 @@ "scorpion-gun-ag.go" "quantum-reflector-ag.go" "mh-flyer-missile-ag.go" - "desbattl.o" + "desbattl.go" )) diff --git a/goal_src/jak3/dgos/desbcst.gd b/goal_src/jak3/dgos/desbcst.gd index ce4fd8ee43..4ac1e05229 100644 --- a/goal_src/jak3/dgos/desbcst.gd +++ b/goal_src/jak3/dgos/desbcst.gd @@ -1,5 +1,5 @@ ("DESBCST.DGO" - ("tpage-2762.o" + ("tpage-2762.go" "tpage-2764.go" "tpage-2763.go" "daxter-highres-ag.go" @@ -11,5 +11,5 @@ "snake-wheel-fma-ag.go" "particleman-ag.go" "jakc-scarf-ag.go" - "desbcst.o" + "desbcst.go" )) diff --git a/goal_src/jak3/dgos/desboss1.gd b/goal_src/jak3/dgos/desboss1.gd index 293820cf90..e8ad341b23 100644 --- a/goal_src/jak3/dgos/desboss1.gd +++ b/goal_src/jak3/dgos/desboss1.gd @@ -19,5 +19,5 @@ "terraformer-mine-ag.go" "particleman-ag.go" "terraformer-target-ag.go" - "desboss1.o" + "desboss1.go" )) diff --git a/goal_src/jak3/dgos/desboss2.gd b/goal_src/jak3/dgos/desboss2.gd index ef4ddf0bf8..97d505bec0 100644 --- a/goal_src/jak3/dgos/desboss2.gd +++ b/goal_src/jak3/dgos/desboss2.gd @@ -13,5 +13,5 @@ "particleman-ag.go" "terraformer-laser-end-ag.go" "terraformer-laser-ag.go" - "desboss2.o" + "desboss2.go" )) diff --git a/goal_src/jak3/dgos/desc.gd b/goal_src/jak3/dgos/desc.gd index b3a699332d..b8d6802d41 100644 --- a/goal_src/jak3/dgos/desc.gd +++ b/goal_src/jak3/dgos/desc.gd @@ -1,5 +1,5 @@ ("DESC.DGO" - ("tpage-1371.o" + ("tpage-1371.go" "tpage-1573.go" - "desertc-vis.o" + "desertc-vis.go" )) diff --git a/goal_src/jak3/dgos/deschase.gd b/goal_src/jak3/dgos/deschase.gd index 2dccbd966d..d3273d4f7f 100644 --- a/goal_src/jak3/dgos/deschase.gd +++ b/goal_src/jak3/dgos/deschase.gd @@ -17,5 +17,5 @@ "interceptor-b-ag.go" "pre-artifact-a-ag.go" "catapult-target-ag.go" - "deschase.o" + "deschase.go" )) diff --git a/goal_src/jak3/dgos/desd.gd b/goal_src/jak3/dgos/desd.gd index 0f9a7ac015..e884dc3637 100644 --- a/goal_src/jak3/dgos/desd.gd +++ b/goal_src/jak3/dgos/desd.gd @@ -8,5 +8,5 @@ "tpage-3384.go" "des-cactus-b-ag.go" "des-cactus-a-ag.go" - "desertd-vis.o" + "desertd-vis.go" )) diff --git a/goal_src/jak3/dgos/dese.gd b/goal_src/jak3/dgos/dese.gd index e3eb963463..103485b59b 100644 --- a/goal_src/jak3/dgos/dese.gd +++ b/goal_src/jak3/dgos/dese.gd @@ -1,5 +1,5 @@ ("DESE.DGO" - ("tpage-1380.o" + ("tpage-1380.go" "tpage-1597.go" - "deserte-vis.o" + "deserte-vis.go" )) diff --git a/goal_src/jak3/dgos/deserrol.gd b/goal_src/jak3/dgos/deserrol.gd index 11e69b4232..5ff579da62 100644 --- a/goal_src/jak3/dgos/deserrol.gd +++ b/goal_src/jak3/dgos/deserrol.gd @@ -1,6 +1,6 @@ ("DESERROL.DGO" - ("tpage-3179.o" + ("tpage-3179.go" "tpage-3180.go" "errol-ag.go" - "deserrol.o" + "deserrol.go" )) diff --git a/goal_src/jak3/dgos/desf.gd b/goal_src/jak3/dgos/desf.gd index a4b5876f36..c839dfb449 100644 --- a/goal_src/jak3/dgos/desf.gd +++ b/goal_src/jak3/dgos/desf.gd @@ -6,5 +6,5 @@ "des-draw-bridge-ag.go" "des-jump-bridge-ag.go" "des-garage-door-ag.go" - "desertf-vis.o" + "desertf-vis.go" )) diff --git a/goal_src/jak3/dgos/desg.gd b/goal_src/jak3/dgos/desg.gd index 48a229d238..1301d2fec7 100644 --- a/goal_src/jak3/dgos/desg.gd +++ b/goal_src/jak3/dgos/desg.gd @@ -8,5 +8,5 @@ "desert-eggwall-ag.go" "des-cactus-obstacle-ag.go" "particleman-ag.go" - "desertg-vis.o" + "desertg-vis.go" )) diff --git a/goal_src/jak3/dgos/desh.gd b/goal_src/jak3/dgos/desh.gd index 292228b108..f545278e73 100644 --- a/goal_src/jak3/dgos/desh.gd +++ b/goal_src/jak3/dgos/desh.gd @@ -1,5 +1,5 @@ ("DESH.DGO" - ("tpage-1385.o" + ("tpage-1385.go" "tpage-1995.go" - "deserth-vis.o" + "deserth-vis.go" )) diff --git a/goal_src/jak3/dgos/deshover.gd b/goal_src/jak3/dgos/deshover.gd index fbf7f50a5f..eb35df4e55 100644 --- a/goal_src/jak3/dgos/deshover.gd +++ b/goal_src/jak3/dgos/deshover.gd @@ -19,5 +19,5 @@ "snake-wheel-fma-ag.go" "eco-crystal-dark-ag.go" "particleman-ag.go" - "deshover.o" + "deshover.go" )) diff --git a/goal_src/jak3/dgos/deshunt.gd b/goal_src/jak3/dgos/deshunt.gd index 5919211319..1ddccb109f 100644 --- a/goal_src/jak3/dgos/deshunt.gd +++ b/goal_src/jak3/dgos/deshunt.gd @@ -1,6 +1,6 @@ ("DESHUNT.DGO" - ("tpage-1809.o" + ("tpage-1809.go" "tpage-1808.go" "sig-highres-ag.go" - "deshunt.o" + "deshunt.go" )) diff --git a/goal_src/jak3/dgos/desinter.gd b/goal_src/jak3/dgos/desinter.gd index 876c7eb85f..1d041d160c 100644 --- a/goal_src/jak3/dgos/desinter.gd +++ b/goal_src/jak3/dgos/desinter.gd @@ -1,7 +1,7 @@ ("DESINTER.DGO" - ("tpage-1712.o" + ("tpage-1712.go" "tpage-1713.go" "interceptor-ag.go" "interceptor-b-ag.go" - "desinter.o" + "desinter.go" )) diff --git a/goal_src/jak3/dgos/desjump.gd b/goal_src/jak3/dgos/desjump.gd index 4a5a1ef0ce..4466854edc 100644 --- a/goal_src/jak3/dgos/desjump.gd +++ b/goal_src/jak3/dgos/desjump.gd @@ -9,5 +9,5 @@ "interceptor-ag.go" "wascity-airlock-debris-ag.go" "beam-generator-ag.go" - "desjump.o" + "desjump.go" )) diff --git a/goal_src/jak3/dgos/desliz.gd b/goal_src/jak3/dgos/desliz.gd index 49cc5bebf0..7ee2368881 100644 --- a/goal_src/jak3/dgos/desliz.gd +++ b/goal_src/jak3/dgos/desliz.gd @@ -14,5 +14,5 @@ "flut-saddle-ag.go" "snake-wheel-fma-ag.go" "particleman-ag.go" - "desliz.o" + "desliz.go" )) diff --git a/goal_src/jak3/dgos/desoasis.gd b/goal_src/jak3/dgos/desoasis.gd index 3901c5886d..7eb4ace940 100644 --- a/goal_src/jak3/dgos/desoasis.gd +++ b/goal_src/jak3/dgos/desoasis.gd @@ -22,5 +22,5 @@ "hellcat-ag.go" "interceptor-ag.go" "interceptor-b-ag.go" - "desoasis.o" + "desoasis.go" )) diff --git a/goal_src/jak3/dgos/desrace1.gd b/goal_src/jak3/dgos/desrace1.gd index b40d3e3039..a7d2b0a183 100644 --- a/goal_src/jak3/dgos/desrace1.gd +++ b/goal_src/jak3/dgos/desrace1.gd @@ -11,5 +11,5 @@ "pre-artifact-b-ag.go" "pre-artifact-c-ag.go" "was-artifact-ag.go" - "desrace1.o" + "desrace1.go" )) diff --git a/goal_src/jak3/dgos/desrace2.gd b/goal_src/jak3/dgos/desrace2.gd index d9e35c5947..a90ac66153 100644 --- a/goal_src/jak3/dgos/desrace2.gd +++ b/goal_src/jak3/dgos/desrace2.gd @@ -4,5 +4,5 @@ "tpage-1409.go" "interceptor-ag.go" "interceptor-b-ag.go" - "desrace2.o" + "desrace2.go" )) diff --git a/goal_src/jak3/dgos/desrally.gd b/goal_src/jak3/dgos/desrally.gd index 035a816e8a..d8d2bc9f18 100644 --- a/goal_src/jak3/dgos/desrally.gd +++ b/goal_src/jak3/dgos/desrally.gd @@ -16,5 +16,5 @@ "interceptor-ag.go" "interceptor-b-ag.go" "des-rally-bollard-ag.go" - "desrally.o" + "desrally.go" )) diff --git a/goal_src/jak3/dgos/desresc.gd b/goal_src/jak3/dgos/desresc.gd index ea9212ff3e..e78852e23a 100644 --- a/goal_src/jak3/dgos/desresc.gd +++ b/goal_src/jak3/dgos/desresc.gd @@ -47,5 +47,5 @@ "neo-satellite-b-ag.go" "eco-crystal-dark-ag.go" "neo-satellite-shield-ag.go" - "desresc.o" + "desresc.go" )) diff --git a/goal_src/jak3/dgos/desrescc.gd b/goal_src/jak3/dgos/desrescc.gd index 2e0ca43e73..4db37e5341 100644 --- a/goal_src/jak3/dgos/desrescc.gd +++ b/goal_src/jak3/dgos/desrescc.gd @@ -1,6 +1,6 @@ ("DESRESCC.DGO" - ("tpage-1717.o" + ("tpage-1717.go" "daxter-highres-ag.go" "jakc-highres-ag.go" - "desrescc.o" + "desrescc.go" )) diff --git a/goal_src/jak3/dgos/desrescg.gd b/goal_src/jak3/dgos/desrescg.gd index 25ee51e4e9..f8c95f6501 100644 --- a/goal_src/jak3/dgos/desrescg.gd +++ b/goal_src/jak3/dgos/desrescg.gd @@ -1,8 +1,8 @@ ("DESRESCG.DGO" - ("tpage-1715.o" + ("tpage-1715.go" "tpage-1716.go" "interceptor-ag.go" "desert-transport-ag.go" "interceptor-b-ag.go" - "desrescg.o" + "desrescg.go" )) diff --git a/goal_src/jak3/dgos/destrack.gd b/goal_src/jak3/dgos/destrack.gd index 638c9a2efa..5dffdd70d9 100644 --- a/goal_src/jak3/dgos/destrack.gd +++ b/goal_src/jak3/dgos/destrack.gd @@ -22,5 +22,5 @@ "des-train-barrier-ag.go" "des-train-stones-ag.go" "des-train-bollard-ag.go" - "destrack.o" + "destrack.go" )) diff --git a/goal_src/jak3/dgos/desw.gd b/goal_src/jak3/dgos/desw.gd index 5aa6760fe0..3d3dc78185 100644 --- a/goal_src/jak3/dgos/desw.gd +++ b/goal_src/jak3/dgos/desw.gd @@ -16,5 +16,5 @@ "light-eco-vent-ag.go" "terraformer-mine-ag.go" "desw-snake-stump-ag.go" - "deswalk-vis.o" + "deswalk-vis.go" )) diff --git a/goal_src/jak3/dgos/dst.gd b/goal_src/jak3/dgos/dst.gd index 15e4370554..e038b26e69 100644 --- a/goal_src/jak3/dgos/dst.gd +++ b/goal_src/jak3/dgos/dst.gd @@ -20,5 +20,5 @@ "tentacle-ag.go" "des-burning-bush-ag.go" "wascity-burning-bush-ag.go" - "desert-vis.o" + "desert-vis.go" )) diff --git a/goal_src/jak3/dgos/facb.gd b/goal_src/jak3/dgos/facb.gd index d8cface7a6..dd9c812145 100644 --- a/goal_src/jak3/dgos/facb.gd +++ b/goal_src/jak3/dgos/facb.gd @@ -17,5 +17,5 @@ "fac-gun-tower-turret-ag.go" "particleman-ag.go" "hemisplosion-ag.go" - "factoryb-vis.o" + "factoryb-vis.go" )) diff --git a/goal_src/jak3/dgos/facc.gd b/goal_src/jak3/dgos/facc.gd index fa1ecb7b97..aa42608fab 100644 --- a/goal_src/jak3/dgos/facc.gd +++ b/goal_src/jak3/dgos/facc.gd @@ -36,5 +36,5 @@ "fac-move-plat-a-ag.go" "fac-move-plat-b-ag.go" "fac-fire-torch-ag.go" - "factoryc-vis.o" + "factoryc-vis.go" )) diff --git a/goal_src/jak3/dgos/facd.gd b/goal_src/jak3/dgos/facd.gd index eba14a9eb1..ea14591e10 100644 --- a/goal_src/jak3/dgos/facd.gd +++ b/goal_src/jak3/dgos/facd.gd @@ -44,5 +44,5 @@ "shield-sphere-distort-ag.go" "fac-drop-plat-ag.go" "shield-sphere-ag.go" - "factoryd-vis.o" + "factoryd-vis.go" )) diff --git a/goal_src/jak3/dgos/factorya.gd b/goal_src/jak3/dgos/factorya.gd index 301f05f3b3..ea8fca1614 100644 --- a/goal_src/jak3/dgos/factorya.gd +++ b/goal_src/jak3/dgos/factorya.gd @@ -19,5 +19,5 @@ "fac-fma-breaking-bits-ag.go" "lfac-hanger-door-ag.go" "particleman-ag.go" - "factorya.o" + "factorya.go" )) diff --git a/goal_src/jak3/dgos/freecast.gd b/goal_src/jak3/dgos/freecast.gd index 8cbd91ea93..23ba154188 100644 --- a/goal_src/jak3/dgos/freecast.gd +++ b/goal_src/jak3/dgos/freecast.gd @@ -1,5 +1,5 @@ ("FREECAST.DGO" - ("tpage-1967.o" + ("tpage-1967.go" "tpage-1969.go" "tpage-1968.go" "pecker-highres-ag.go" @@ -9,5 +9,5 @@ "ashelin-highres-ag.go" "onin-highres-ag.go" "purple-two-ag.go" - "freecast.o" + "freecast.go" )) diff --git a/goal_src/jak3/dgos/freehq.gd b/goal_src/jak3/dgos/freehq.gd index 227f906c7e..033f084aca 100644 --- a/goal_src/jak3/dgos/freehq.gd +++ b/goal_src/jak3/dgos/freehq.gd @@ -11,5 +11,5 @@ "jakc-highres-ag.go" "torn-highres-ag.go" "freehq-sml-door-ag.go" - "freehq.o" + "freehq.go" )) diff --git a/goal_src/jak3/dgos/frsta.gd b/goal_src/jak3/dgos/frsta.gd index 34a8a568a7..7f847f5aee 100644 --- a/goal_src/jak3/dgos/frsta.gd +++ b/goal_src/jak3/dgos/frsta.gd @@ -34,5 +34,5 @@ "warp-telescope-ag.go" "for-pillar-ag.go" "particleman-ag.go" - "foresta-vis.o" + "foresta-vis.go" )) diff --git a/goal_src/jak3/dgos/frstb.gd b/goal_src/jak3/dgos/frstb.gd index 97a8b21c95..22cdad708a 100644 --- a/goal_src/jak3/dgos/frstb.gd +++ b/goal_src/jak3/dgos/frstb.gd @@ -1,10 +1,10 @@ ("FRSTB.DGO" - ("tpage-819.o" + ("tpage-819.go" "tpage-820.go" "tpage-1116.go" "tpage-1117.go" "tpage-821.go" "crimson-guard-ag.go" "transport-ag.go" - "forestb-vis.o" + "forestb-vis.go" )) diff --git a/goal_src/jak3/dgos/frstx.gd b/goal_src/jak3/dgos/frstx.gd index 49bb6f76b2..def183bae4 100644 --- a/goal_src/jak3/dgos/frstx.gd +++ b/goal_src/jak3/dgos/frstx.gd @@ -1,8 +1,8 @@ ("FRSTX.DGO" - ("tpage-1838.o" + ("tpage-1838.go" "tpage-1839.go" "tpage-3316.go" "tpage-3317.go" "com-airlock-inner-ag.go" - "forestx-vis.o" + "forestx-vis.go" )) diff --git a/goal_src/jak3/dgos/game.gd b/goal_src/jak3/dgos/game.gd index 671927ebba..c590b9117e 100644 --- a/goal_src/jak3/dgos/game.gd +++ b/goal_src/jak3/dgos/game.gd @@ -30,6 +30,9 @@ "dma-buffer.o" "dma-bucket.o" "dma-disasm.o" + "pckernel-h.o" ;; added + "pckernel-impl.o" ;; added + "pc-debug-common.o" ;; added "pad.o" "gs.o" "display-h.o" @@ -246,6 +249,7 @@ "sky-data.o" "sky-tng.o" "load-state.o" + "pc-debug-methods.o" ;; added "level-info.o" "level.o" "text.o" @@ -344,6 +348,9 @@ "prototype.o" "main-collide.o" "video.o" + "capture-pc.o" ;; added + "pckernel-common.o" ;; added + "pckernel.o" ;; added "main.o" "collide-cache.o" "collide-debug.o" @@ -402,6 +409,7 @@ "visvol-edit.o" "collision-editor.o" "speech-manager.o" + "default-menu-pc.o" ;; added "dir-tpages.go" "tpage-1.go" "tpage-2.go" diff --git a/goal_src/jak3/dgos/gga.gd b/goal_src/jak3/dgos/gga.gd index 68de8e5f03..2f56d93603 100644 --- a/goal_src/jak3/dgos/gga.gd +++ b/goal_src/jak3/dgos/gga.gd @@ -20,5 +20,5 @@ "fort-entry-gate-ag.go" "hip-door-a-ag.go" "particleman-ag.go" - "gungame-vis.o" + "gungame-vis.go" )) diff --git a/goal_src/jak3/dgos/gridcst.gd b/goal_src/jak3/dgos/gridcst.gd index 8742b04343..76ed45791b 100644 --- a/goal_src/jak3/dgos/gridcst.gd +++ b/goal_src/jak3/dgos/gridcst.gd @@ -1,5 +1,5 @@ ("GRIDCST.DGO" - ("tpage-2967.o" + ("tpage-2967.go" "tpage-2968.go" "daxter-highres-ag.go" "jakc-highres-ag.go" @@ -8,5 +8,5 @@ "cara-ag.go" "blue-gun-mod-three-ag.go" "particleman-ag.go" - "gridcst.o" + "gridcst.go" )) diff --git a/goal_src/jak3/dgos/gungame1.gd b/goal_src/jak3/dgos/gungame1.gd index 386f7399c8..fe8282b27c 100644 --- a/goal_src/jak3/dgos/gungame1.gd +++ b/goal_src/jak3/dgos/gungame1.gd @@ -1,5 +1,5 @@ ("GUNGAME1.DGO" - ("tpage-2274.o" + ("tpage-2274.go" "yellow-barrel-ag.go" - "gungame1.o" + "gungame1.go" )) diff --git a/goal_src/jak3/dgos/gungame2.gd b/goal_src/jak3/dgos/gungame2.gd index 8982cfde2b..bbb8da93f0 100644 --- a/goal_src/jak3/dgos/gungame2.gd +++ b/goal_src/jak3/dgos/gungame2.gd @@ -1,5 +1,5 @@ ("GUNGAME2.DGO" - ("tpage-2275.o" + ("tpage-2275.go" "red-gun-mod-three-ag.go" - "gungame2.o" + "gungame2.go" )) diff --git a/goal_src/jak3/dgos/halfpipe.gd b/goal_src/jak3/dgos/halfpipe.gd index 2b4cef874d..c0c276ea19 100644 --- a/goal_src/jak3/dgos/halfpipe.gd +++ b/goal_src/jak3/dgos/halfpipe.gd @@ -18,5 +18,5 @@ "urn-b-ag.go" "urn-c-ag.go" "urn-a-ag.go" - "halfpipe.o" + "halfpipe.go" )) diff --git a/goal_src/jak3/dgos/hga.gd b/goal_src/jak3/dgos/hga.gd index 962938427d..5bc8ea0c78 100644 --- a/goal_src/jak3/dgos/hga.gd +++ b/goal_src/jak3/dgos/hga.gd @@ -56,5 +56,5 @@ "des-glider-ring-ag.go" "tpl-glider-ag.go" "tpl-glider-broken-ag.go" - "hanga-vis.o" + "hanga-vis.go" )) diff --git a/goal_src/jak3/dgos/hgb.gd b/goal_src/jak3/dgos/hgb.gd index 915d76dd1f..30a239d5ed 100644 --- a/goal_src/jak3/dgos/hgb.gd +++ b/goal_src/jak3/dgos/hgb.gd @@ -1,4 +1,4 @@ ("HGB.DGO" - ("tpage-3028.o" - "hangb-vis.o" + ("tpage-3028.go" + "hangb-vis.go" )) diff --git a/goal_src/jak3/dgos/hhg.gd b/goal_src/jak3/dgos/hhg.gd index 291d21369e..2ed3825f76 100644 --- a/goal_src/jak3/dgos/hhg.gd +++ b/goal_src/jak3/dgos/hhg.gd @@ -10,5 +10,5 @@ "jakc-highres-ag.go" "hip-door-a-ag.go" "particleman-ag.go" - "hiphog-vis.o" + "hiphog-vis.go" )) diff --git a/goal_src/jak3/dgos/intpalrf.gd b/goal_src/jak3/dgos/intpalrf.gd index bc7946cc6e..89e4df5eed 100644 --- a/goal_src/jak3/dgos/intpalrf.gd +++ b/goal_src/jak3/dgos/intpalrf.gd @@ -1,6 +1,6 @@ ("INTPALRF.DGO" - ("tpage-428.o" + ("tpage-428.go" "tpage-429.go" "tpage-430.go" - "intpalrf.o" + "intpalrf.go" )) diff --git a/goal_src/jak3/dgos/introcst.gd b/goal_src/jak3/dgos/introcst.gd index e767bd9d33..4abc6874b6 100644 --- a/goal_src/jak3/dgos/introcst.gd +++ b/goal_src/jak3/dgos/introcst.gd @@ -18,5 +18,5 @@ "handcuffs-ag.go" "beacon-ag.go" "particleman-ag.go" - "introcst.o" + "introcst.go" )) diff --git a/goal_src/jak3/dgos/inttitle.gd b/goal_src/jak3/dgos/inttitle.gd index 6dc4477ab7..efb4270e63 100644 --- a/goal_src/jak3/dgos/inttitle.gd +++ b/goal_src/jak3/dgos/inttitle.gd @@ -1,4 +1,4 @@ ("INTTITLE.DGO" - ("tpage-1073.o" - "inttitle.o" + ("tpage-1073.go" + "inttitle.go" )) diff --git a/goal_src/jak3/dgos/ipf.gd b/goal_src/jak3/dgos/ipf.gd index 29c6ba357f..100a6ad648 100644 --- a/goal_src/jak3/dgos/ipf.gd +++ b/goal_src/jak3/dgos/ipf.gd @@ -18,5 +18,5 @@ "hellcat-lowres-fma-ag.go" "ctypal-cable-break-ag.go" "searchlight-ag.go" - "intpfall-vis.o" + "intpfall-vis.go" )) diff --git a/goal_src/jak3/dgos/lashelin.gd b/goal_src/jak3/dgos/lashelin.gd index 74812a7ce4..abfe61e418 100644 --- a/goal_src/jak3/dgos/lashelin.gd +++ b/goal_src/jak3/dgos/lashelin.gd @@ -1,5 +1,5 @@ ("LASHELIN.DGO" - ("tpage-1222.o" + ("tpage-1222.go" "ashelin-highres-ag.go" - "lashelin.o" + "lashelin.go" )) diff --git a/goal_src/jak3/dgos/lbbring1.gd b/goal_src/jak3/dgos/lbbring1.gd index 0918d63ed3..76f4276b50 100644 --- a/goal_src/jak3/dgos/lbbring1.gd +++ b/goal_src/jak3/dgos/lbbring1.gd @@ -2,5 +2,5 @@ ("des-bush-part.o" "des-bush.o" "tpage-2767.go" - "lbbring1.o" + "lbbring1.go" )) diff --git a/goal_src/jak3/dgos/lbbring2.gd b/goal_src/jak3/dgos/lbbring2.gd index 330b329718..ffbad9c8fa 100644 --- a/goal_src/jak3/dgos/lbbring2.gd +++ b/goal_src/jak3/dgos/lbbring2.gd @@ -2,5 +2,5 @@ ("des-bush-part.o" "des-bush.o" "tpage-2858.go" - "lbbring2.o" + "lbbring2.go" )) diff --git a/goal_src/jak3/dgos/lbbring3.gd b/goal_src/jak3/dgos/lbbring3.gd index b9457934c4..ff0b793c7e 100644 --- a/goal_src/jak3/dgos/lbbring3.gd +++ b/goal_src/jak3/dgos/lbbring3.gd @@ -2,5 +2,5 @@ ("des-bush-part.o" "des-bush.o" "tpage-2859.go" - "lbbring3.o" + "lbbring3.go" )) diff --git a/goal_src/jak3/dgos/lbbring4.gd b/goal_src/jak3/dgos/lbbring4.gd index 8e89e4aad1..50f085c0d8 100644 --- a/goal_src/jak3/dgos/lbbring4.gd +++ b/goal_src/jak3/dgos/lbbring4.gd @@ -2,5 +2,5 @@ ("des-bush-part.o" "des-bush.o" "tpage-2906.go" - "lbbring4.o" + "lbbring4.go" )) diff --git a/goal_src/jak3/dgos/lbbring5.gd b/goal_src/jak3/dgos/lbbring5.gd index 7b96535a93..38e53839be 100644 --- a/goal_src/jak3/dgos/lbbring5.gd +++ b/goal_src/jak3/dgos/lbbring5.gd @@ -2,5 +2,5 @@ ("des-bush-part.o" "des-bush.o" "tpage-2940.go" - "lbbring5.o" + "lbbring5.go" )) diff --git a/goal_src/jak3/dgos/lbbring6.gd b/goal_src/jak3/dgos/lbbring6.gd index 35f8f47fff..c53cbb0b82 100644 --- a/goal_src/jak3/dgos/lbbring6.gd +++ b/goal_src/jak3/dgos/lbbring6.gd @@ -2,5 +2,5 @@ ("des-bush-part.o" "des-bush.o" "tpage-2954.go" - "lbbring6.o" + "lbbring6.go" )) diff --git a/goal_src/jak3/dgos/lbbsdrp1.gd b/goal_src/jak3/dgos/lbbsdrp1.gd index 2f7dcc710e..8c380e7d1b 100644 --- a/goal_src/jak3/dgos/lbbsdrp1.gd +++ b/goal_src/jak3/dgos/lbbsdrp1.gd @@ -2,5 +2,5 @@ ("des-bush-part.o" "des-bush.o" "tpage-3328.go" - "lbbsdrp1.o" + "lbbsdrp1.go" )) diff --git a/goal_src/jak3/dgos/lbbsdrp2.gd b/goal_src/jak3/dgos/lbbsdrp2.gd index ff58e0791c..3a69a3620b 100644 --- a/goal_src/jak3/dgos/lbbsdrp2.gd +++ b/goal_src/jak3/dgos/lbbsdrp2.gd @@ -2,5 +2,5 @@ ("des-bush-part.o" "des-bush.o" "tpage-3329.go" - "lbbsdrp2.o" + "lbbsdrp2.go" )) diff --git a/goal_src/jak3/dgos/lbbsdrp3.gd b/goal_src/jak3/dgos/lbbsdrp3.gd index 9f870662a9..cde69e48ba 100644 --- a/goal_src/jak3/dgos/lbbsdrp3.gd +++ b/goal_src/jak3/dgos/lbbsdrp3.gd @@ -2,5 +2,5 @@ ("des-bush-part.o" "des-bush.o" "tpage-3330.go" - "lbbsdrp3.o" + "lbbsdrp3.go" )) diff --git a/goal_src/jak3/dgos/lbbspid.gd b/goal_src/jak3/dgos/lbbspid.gd index acdc9c7144..72d07c3661 100644 --- a/goal_src/jak3/dgos/lbbspid.gd +++ b/goal_src/jak3/dgos/lbbspid.gd @@ -4,5 +4,5 @@ "egg-spider.o" "tpage-2664.go" "egg-spider-ag.go" - "lbbspid.o" + "lbbspid.go" )) diff --git a/goal_src/jak3/dgos/lbbspirt.gd b/goal_src/jak3/dgos/lbbspirt.gd index 5a27a90a98..225f31394d 100644 --- a/goal_src/jak3/dgos/lbbspirt.gd +++ b/goal_src/jak3/dgos/lbbspirt.gd @@ -1,5 +1,5 @@ ("LBBSPIRT.DGO" ("des-bush-part.o" "des-bush.o" - "lbbspirt.o" + "lbbspirt.go" )) diff --git a/goal_src/jak3/dgos/lbbsprt2.gd b/goal_src/jak3/dgos/lbbsprt2.gd index eb7e582ee2..575ee39ec9 100644 --- a/goal_src/jak3/dgos/lbbsprt2.gd +++ b/goal_src/jak3/dgos/lbbsprt2.gd @@ -1,5 +1,5 @@ ("LBBSPRT2.DGO" ("des-bush-part.o" "des-bush.o" - "lbbsprt2.o" + "lbbsprt2.go" )) diff --git a/goal_src/jak3/dgos/lbbsprt3.gd b/goal_src/jak3/dgos/lbbsprt3.gd index 8d71a993c3..3ee3f8d17f 100644 --- a/goal_src/jak3/dgos/lbbsprt3.gd +++ b/goal_src/jak3/dgos/lbbsprt3.gd @@ -1,5 +1,5 @@ ("LBBSPRT3.DGO" ("des-bush-part.o" "des-bush.o" - "lbbsprt3.o" + "lbbsprt3.go" )) diff --git a/goal_src/jak3/dgos/lbbtcha1.gd b/goal_src/jak3/dgos/lbbtcha1.gd index cff9a5fb11..4000277cb6 100644 --- a/goal_src/jak3/dgos/lbbtcha1.gd +++ b/goal_src/jak3/dgos/lbbtcha1.gd @@ -3,5 +3,5 @@ "des-bush-time-chase.o" "tpage-3378.go" "tpage-3325.go" - "lbbtcha1.o" + "lbbtcha1.go" )) diff --git a/goal_src/jak3/dgos/lbbtcha2.gd b/goal_src/jak3/dgos/lbbtcha2.gd index 584189db3b..6ebd71ecf5 100644 --- a/goal_src/jak3/dgos/lbbtcha2.gd +++ b/goal_src/jak3/dgos/lbbtcha2.gd @@ -3,5 +3,5 @@ "des-bush-time-chase.o" "tpage-3379.go" "tpage-3326.go" - "lbbtcha2.o" + "lbbtcha2.go" )) diff --git a/goal_src/jak3/dgos/lbbtcha3.gd b/goal_src/jak3/dgos/lbbtcha3.gd index 1e4dffb2f9..482b472d28 100644 --- a/goal_src/jak3/dgos/lbbtcha3.gd +++ b/goal_src/jak3/dgos/lbbtcha3.gd @@ -3,5 +3,5 @@ "des-bush-time-chase.o" "tpage-3380.go" "tpage-3327.go" - "lbbtcha3.o" + "lbbtcha3.go" )) diff --git a/goal_src/jak3/dgos/lbiped.gd b/goal_src/jak3/dgos/lbiped.gd index c44291b45f..2acb37c60e 100644 --- a/goal_src/jak3/dgos/lbiped.gd +++ b/goal_src/jak3/dgos/lbiped.gd @@ -8,5 +8,5 @@ "shield-sphere-explode-ag.go" "shield-sphere-distort-ag.go" "shield-sphere-ag.go" - "lbiped.o" + "lbiped.go" )) diff --git a/goal_src/jak3/dgos/lblowcst.gd b/goal_src/jak3/dgos/lblowcst.gd index 2c2d192969..5acf5d2f8a 100644 --- a/goal_src/jak3/dgos/lblowcst.gd +++ b/goal_src/jak3/dgos/lblowcst.gd @@ -11,5 +11,5 @@ "bt-sig-ag.go" "bt-jinx-ag.go" "cty-explode-barrel-ag.go" - "lblowcst.o" + "lblowcst.go" )) diff --git a/goal_src/jak3/dgos/lblowtkg.gd b/goal_src/jak3/dgos/lblowtkg.gd index 4d77dcb2db..030f088cf9 100644 --- a/goal_src/jak3/dgos/lblowtkg.gd +++ b/goal_src/jak3/dgos/lblowtkg.gd @@ -1,9 +1,9 @@ ("LBLOWTKG.DGO" - ("tpage-2977.o" + ("tpage-2977.go" "bt-wasp-ag.go" "bombbot-ag.go" "kg-flying-turret-ag.go" "cty-homing-missile-ag.go" "kg-debris-ag.go" - "lblowtkg.o" + "lblowtkg.go" )) diff --git a/goal_src/jak3/dgos/lblowtmh.gd b/goal_src/jak3/dgos/lblowtmh.gd index 5ebe6631c2..2fd67e78e0 100644 --- a/goal_src/jak3/dgos/lblowtmh.gd +++ b/goal_src/jak3/dgos/lblowtmh.gd @@ -1,6 +1,6 @@ ("LBLOWTMH.DGO" - ("tpage-2978.o" + ("tpage-2978.go" "bt-grunt-ag.go" "bt-roboguard-ag.go" - "lblowtmh.o" + "lblowtmh.go" )) diff --git a/goal_src/jak3/dgos/lbombbot.gd b/goal_src/jak3/dgos/lbombbot.gd index a41a129cc5..a9d0641903 100644 --- a/goal_src/jak3/dgos/lbombbot.gd +++ b/goal_src/jak3/dgos/lbombbot.gd @@ -8,5 +8,5 @@ "krimson-wall-break-ag.go" "bombbot-bomb-ag.go" "kg-debris-ag.go" - "lbombbot.o" + "lbombbot.go" )) diff --git a/goal_src/jak3/dgos/lcitysml.gd b/goal_src/jak3/dgos/lcitysml.gd index 897126b5b0..c50da2b24c 100644 --- a/goal_src/jak3/dgos/lcitysml.gd +++ b/goal_src/jak3/dgos/lcitysml.gd @@ -1,5 +1,5 @@ ("LCITYSML.DGO" - ("tpage-2605.o" + ("tpage-2605.go" "tpage-2606.go" - "lcitysml.o" + "lcitysml.go" )) diff --git a/goal_src/jak3/dgos/lctyass.gd b/goal_src/jak3/dgos/lctyass.gd index b524154e61..4fbd04fb65 100644 --- a/goal_src/jak3/dgos/lctyass.gd +++ b/goal_src/jak3/dgos/lctyass.gd @@ -7,5 +7,5 @@ "bombbot-ag.go" "bombbot-bomb-ag.go" "kg-debris-ag.go" - "lctyass.o" + "lctyass.go" )) diff --git a/goal_src/jak3/dgos/lctyblow.gd b/goal_src/jak3/dgos/lctyblow.gd index 955c17cbad..4b2e65e835 100644 --- a/goal_src/jak3/dgos/lctyblow.gd +++ b/goal_src/jak3/dgos/lctyblow.gd @@ -14,5 +14,5 @@ "tpage-2847.go" "hellcat-tower-ag.go" "kg-pickup-ag.go" - "lctyblow.o" + "lctyblow.go" )) diff --git a/goal_src/jak3/dgos/lctydest.gd b/goal_src/jak3/dgos/lctydest.gd index 376d13218d..f1e5877dc5 100644 --- a/goal_src/jak3/dgos/lctydest.gd +++ b/goal_src/jak3/dgos/lctydest.gd @@ -8,5 +8,5 @@ "mhcity-de-tower-egg-ag.go" "mhcity-puffer-large-ag.go" "mhcity-puffer-ag.go" - "lctydest.o" + "lctydest.go" )) diff --git a/goal_src/jak3/dgos/lctyhijk.gd b/goal_src/jak3/dgos/lctyhijk.gd index d54afa9267..3a8347c448 100644 --- a/goal_src/jak3/dgos/lctyhijk.gd +++ b/goal_src/jak3/dgos/lctyhijk.gd @@ -12,5 +12,5 @@ "cty-missile-launcher-ag.go" "kg-pickup-ag.go" "cty-homing-missile-ag.go" - "lctyhijk.o" + "lctyhijk.go" )) diff --git a/goal_src/jak3/dgos/lctypalt.gd b/goal_src/jak3/dgos/lctypalt.gd index 3e15115ff5..9ea03fa0bb 100644 --- a/goal_src/jak3/dgos/lctypalt.gd +++ b/goal_src/jak3/dgos/lctypalt.gd @@ -10,5 +10,5 @@ "assault-script.o" "assault-task.o" "tpage-3093.go" - "lctypalt.o" + "lctypalt.go" )) diff --git a/goal_src/jak3/dgos/lctypatk.gd b/goal_src/jak3/dgos/lctypatk.gd index b7e76a6368..29eba50a89 100644 --- a/goal_src/jak3/dgos/lctypatk.gd +++ b/goal_src/jak3/dgos/lctypatk.gd @@ -9,5 +9,5 @@ "cty-port-mine-ag.go" "ctyport-mine-ag.go" "cty-dax-missile-ag.go" - "lctypatk.o" + "lctypatk.go" )) diff --git a/goal_src/jak3/dgos/lctyprot.gd b/goal_src/jak3/dgos/lctyprot.gd index 84f37d651b..8456789e6a 100644 --- a/goal_src/jak3/dgos/lctyprot.gd +++ b/goal_src/jak3/dgos/lctyprot.gd @@ -10,5 +10,5 @@ "kg-robot-transport-ag.go" "cty-homing-missile-ag.go" "kg-robot-transport-bomb-ag.go" - "lctyprot.o" + "lctyprot.go" )) diff --git a/goal_src/jak3/dgos/lctysnpr.gd b/goal_src/jak3/dgos/lctysnpr.gd index ffa9a9c6c4..33fa8e52a2 100644 --- a/goal_src/jak3/dgos/lctysnpr.gd +++ b/goal_src/jak3/dgos/lctysnpr.gd @@ -13,5 +13,5 @@ "sew-floor-switch-ag.go" "cty-sniper-turret-reticle-ag.go" "cty-sniper-button-top-ag.go" - "lctysnpr.o" + "lctysnpr.go" )) diff --git a/goal_src/jak3/dgos/ldamklev.gd b/goal_src/jak3/dgos/ldamklev.gd index db999b353b..d27497b61b 100644 --- a/goal_src/jak3/dgos/ldamklev.gd +++ b/goal_src/jak3/dgos/ldamklev.gd @@ -1,7 +1,7 @@ ("LDAMKLEV.DGO" - ("tpage-1407.o" + ("tpage-1407.go" "tpage-1323.go" "kleever-highres-ag.go" "king-highres-ag.go" - "ldamklev.o" + "ldamklev.go" )) diff --git a/goal_src/jak3/dgos/ldampeck.gd b/goal_src/jak3/dgos/ldampeck.gd index 533b5f18b7..ebaac70675 100644 --- a/goal_src/jak3/dgos/ldampeck.gd +++ b/goal_src/jak3/dgos/ldampeck.gd @@ -1,7 +1,7 @@ ("LDAMPECK.DGO" - ("tpage-1086.o" + ("tpage-1086.go" "tpage-1087.go" "pecker-highres-ag.go" "king-highres-ag.go" - "ldampeck.o" + "ldampeck.go" )) diff --git a/goal_src/jak3/dgos/ldampksm.gd b/goal_src/jak3/dgos/ldampksm.gd index c68c449c35..6f68c74b05 100644 --- a/goal_src/jak3/dgos/ldampksm.gd +++ b/goal_src/jak3/dgos/ldampksm.gd @@ -1,8 +1,8 @@ ("LDAMPKSM.DGO" - ("tpage-1092.o" + ("tpage-1092.go" "tpage-1093.go" "pecker-highres-ag.go" "king-highres-ag.go" "seem-highres-ag.go" - "ldampksm.o" + "ldampksm.go" )) diff --git a/goal_src/jak3/dgos/ldamsig.gd b/goal_src/jak3/dgos/ldamsig.gd index dac4a88a7a..40386dd46c 100644 --- a/goal_src/jak3/dgos/ldamsig.gd +++ b/goal_src/jak3/dgos/ldamsig.gd @@ -1,7 +1,7 @@ ("LDAMSIG.DGO" - ("tpage-1089.o" + ("tpage-1089.go" "tpage-1088.go" "sig-highres-ag.go" "king-highres-ag.go" - "ldamsig.o" + "ldamsig.go" )) diff --git a/goal_src/jak3/dgos/ldax.gd b/goal_src/jak3/dgos/ldax.gd index 60d4f609b7..0fb0605d45 100644 --- a/goal_src/jak3/dgos/ldax.gd +++ b/goal_src/jak3/dgos/ldax.gd @@ -1,5 +1,5 @@ ("LDAX.DGO" - ("tpage-2130.o" + ("tpage-2130.go" "daxter-highres-ag.go" - "ldax.o" + "ldax.go" )) diff --git a/goal_src/jak3/dgos/ldesgcst.gd b/goal_src/jak3/dgos/ldesgcst.gd index 65308267a0..32ebfd9ef0 100644 --- a/goal_src/jak3/dgos/ldesgcst.gd +++ b/goal_src/jak3/dgos/ldesgcst.gd @@ -1,9 +1,9 @@ ("LDESGCST.DGO" - ("tpage-2660.o" + ("tpage-2660.go" "tpage-2662.go" "tpage-2661.go" "daxter-highres-ag.go" "jakc-highres-ag.go" "sig-highres-ag.go" - "ldesgcst.o" + "ldesgcst.go" )) diff --git a/goal_src/jak3/dgos/ldmpckgn.gd b/goal_src/jak3/dgos/ldmpckgn.gd index 5ba0c8e7cf..f2b219a126 100644 --- a/goal_src/jak3/dgos/ldmpckgn.gd +++ b/goal_src/jak3/dgos/ldmpckgn.gd @@ -1,8 +1,8 @@ ("LDMPCKGN.DGO" - ("tpage-2348.o" + ("tpage-2348.go" "tpage-2349.go" "pecker-highres-ag.go" "king-highres-ag.go" "gauntlets-ag.go" - "ldmpckgn.o" + "ldmpckgn.go" )) diff --git a/goal_src/jak3/dgos/lerrol.gd b/goal_src/jak3/dgos/lerrol.gd index a7947a342d..d70d1dbc19 100644 --- a/goal_src/jak3/dgos/lerrol.gd +++ b/goal_src/jak3/dgos/lerrol.gd @@ -1,3 +1,3 @@ ("LERROL.DGO" - ("lerrol.o" + ("lerrol.go" )) diff --git a/goal_src/jak3/dgos/lfacb.gd b/goal_src/jak3/dgos/lfacb.gd index 8d08c5a966..d807affae8 100644 --- a/goal_src/jak3/dgos/lfacb.gd +++ b/goal_src/jak3/dgos/lfacb.gd @@ -2,5 +2,5 @@ ("lfaccity-mood.o" "tpage-3401.go" "tpage-3402.go" - "lfacctyb-vis.o" + "lfacctyb-vis.go" )) diff --git a/goal_src/jak3/dgos/lfaccar.gd b/goal_src/jak3/dgos/lfaccar.gd index 5fbddde608..cfa636fe19 100644 --- a/goal_src/jak3/dgos/lfaccar.gd +++ b/goal_src/jak3/dgos/lfaccar.gd @@ -46,5 +46,5 @@ "tpage-2867.go" "faccar-ag.go" "vehicle-explosion-ag.go" - "lfaccar.o" + "lfaccar.go" )) diff --git a/goal_src/jak3/dgos/lfaccity.gd b/goal_src/jak3/dgos/lfaccity.gd index da1cdb1517..e3c1c7a67e 100644 --- a/goal_src/jak3/dgos/lfaccity.gd +++ b/goal_src/jak3/dgos/lfaccity.gd @@ -2,5 +2,5 @@ ("lfaccity-mood.o" "tpage-1950.go" "tpage-1951.go" - "lfaccity.o" + "lfaccity.go" )) diff --git a/goal_src/jak3/dgos/lfaco.gd b/goal_src/jak3/dgos/lfaco.gd index 1261bac5f9..4038f4a84d 100644 --- a/goal_src/jak3/dgos/lfaco.gd +++ b/goal_src/jak3/dgos/lfaco.gd @@ -1,5 +1,5 @@ ("LFACO.DGO" - ("tpage-3287.o" + ("tpage-3287.go" "tpage-3288.go" - "lfacout-vis.o" + "lfacout-vis.go" )) diff --git a/goal_src/jak3/dgos/lfacrm1.gd b/goal_src/jak3/dgos/lfacrm1.gd index 360e374990..459f82d79c 100644 --- a/goal_src/jak3/dgos/lfacrm1.gd +++ b/goal_src/jak3/dgos/lfacrm1.gd @@ -4,5 +4,5 @@ "tpage-2070.go" "lfac-hanger-door-ag.go" "cty-door-ag.go" - "lfacrm1.o" + "lfacrm1.go" )) diff --git a/goal_src/jak3/dgos/lfacrm2.gd b/goal_src/jak3/dgos/lfacrm2.gd index 32937b4e0b..ceee0ff071 100644 --- a/goal_src/jak3/dgos/lfacrm2.gd +++ b/goal_src/jak3/dgos/lfacrm2.gd @@ -9,5 +9,5 @@ "robo-hover-ag.go" "fac-elevator-a-ag.go" "kg-debris-ag.go" - "lfacrm2.o" + "lfacrm2.go" )) diff --git a/goal_src/jak3/dgos/lfactory.gd b/goal_src/jak3/dgos/lfactory.gd index 785378b3fd..9be1fb3ab1 100644 --- a/goal_src/jak3/dgos/lfactory.gd +++ b/goal_src/jak3/dgos/lfactory.gd @@ -44,5 +44,5 @@ "factorya-init.o" "jak-pilot+0-ag.go" "jak-pilot-hcar+0-ag.go" - "lfactory.o" + "lfactory.go" )) diff --git a/goal_src/jak3/dgos/lform.gd b/goal_src/jak3/dgos/lform.gd index 4b38812941..674c9a7aed 100644 --- a/goal_src/jak3/dgos/lform.gd +++ b/goal_src/jak3/dgos/lform.gd @@ -35,5 +35,5 @@ "neo-debris-ag.go" "shield-sphere-distort-ag.go" "shield-sphere-ag.go" - "lformach-vis.o" + "lformach-vis.go" )) diff --git a/goal_src/jak3/dgos/lforp.gd b/goal_src/jak3/dgos/lforp.gd index 028c2cd200..6f6564e291 100644 --- a/goal_src/jak3/dgos/lforp.gd +++ b/goal_src/jak3/dgos/lforp.gd @@ -8,5 +8,5 @@ "mh-plant-ag.go" "egg-spider-ag.go" "shoulder-plates-ag.go" - "lforplnt-vis.o" + "lforplnt-vis.go" )) diff --git a/goal_src/jak3/dgos/lforring.gd b/goal_src/jak3/dgos/lforring.gd index 47c6ed9419..81c317628e 100644 --- a/goal_src/jak3/dgos/lforring.gd +++ b/goal_src/jak3/dgos/lforring.gd @@ -1,4 +1,4 @@ ("LFORRING.DGO" - ("tpage-1358.o" - "lforring.o" + ("tpage-1358.go" + "lforring.go" )) diff --git a/goal_src/jak3/dgos/lfreeout.gd b/goal_src/jak3/dgos/lfreeout.gd index 400e3670d9..06c56b5b13 100644 --- a/goal_src/jak3/dgos/lfreeout.gd +++ b/goal_src/jak3/dgos/lfreeout.gd @@ -1,4 +1,4 @@ ("LFREEOUT.DGO" - ("tpage-3158.o" - "lfreeout.o" + ("tpage-3158.go" + "lfreeout.go" )) diff --git a/goal_src/jak3/dgos/lgunnorm.gd b/goal_src/jak3/dgos/lgunnorm.gd index 987a72808f..7a07aa9c4f 100644 --- a/goal_src/jak3/dgos/lgunnorm.gd +++ b/goal_src/jak3/dgos/lgunnorm.gd @@ -1,5 +1,5 @@ ("LGUNNORM.DGO" - ("tpage-3139.o" + ("tpage-3139.go" "tpage-3170.go" "gun-kg-target-ag.go" "gun-kg-target-bonus-ag.go" @@ -11,5 +11,5 @@ "gun-kg-target-b-ag.go" "gun-cit-b-ag.go" "gun-cit-c-ag.go" - "lgunnorm.o" + "lgunnorm.go" )) diff --git a/goal_src/jak3/dgos/lgunrnc.gd b/goal_src/jak3/dgos/lgunrnc.gd index 2cd59eb644..62d92270f0 100644 --- a/goal_src/jak3/dgos/lgunrnc.gd +++ b/goal_src/jak3/dgos/lgunrnc.gd @@ -1,5 +1,5 @@ ("LGUNRNC.DGO" - ("tpage-3171.o" + ("tpage-3171.go" "gun-rc-four-eyes-ag.go" "gun-rc-three-eyes-ag.go" "gun-rc-three-eyes-bonus-ag.go" @@ -7,5 +7,5 @@ "gun-rc-two-eyes-ag.go" "gun-rc-one-eye-ag.go" "gun-rachet-ag.go" - "lgunrnc.o" + "lgunrnc.go" )) diff --git a/goal_src/jak3/dgos/ljak.gd b/goal_src/jak3/dgos/ljak.gd index 2af11e2d3d..c3db6b274d 100644 --- a/goal_src/jak3/dgos/ljak.gd +++ b/goal_src/jak3/dgos/ljak.gd @@ -1,5 +1,5 @@ ("LJAK.DGO" - ("tpage-1527.o" + ("tpage-1527.go" "jak-highres-ag.go" - "ljak.o" + "ljak.go" )) diff --git a/goal_src/jak3/dgos/ljakc.gd b/goal_src/jak3/dgos/ljakc.gd index 938c019ebc..434593a646 100644 --- a/goal_src/jak3/dgos/ljakc.gd +++ b/goal_src/jak3/dgos/ljakc.gd @@ -1,6 +1,6 @@ ("LJAKC.DGO" - ("tpage-1466.o" + ("tpage-1466.go" "jakc-highres-ag.go" "red-gun-mod-two-ag.go" - "ljakc.o" + "ljakc.go" )) diff --git a/goal_src/jak3/dgos/ljakcklv.gd b/goal_src/jak3/dgos/ljakcklv.gd index 0cd786c0df..d21a4ad937 100644 --- a/goal_src/jak3/dgos/ljakcklv.gd +++ b/goal_src/jak3/dgos/ljakcklv.gd @@ -1,6 +1,6 @@ ("LJAKCKLV.DGO" - ("tpage-1542.o" + ("tpage-1542.go" "kleever-highres-ag.go" "jakc-highres-ag.go" - "ljakcklv.o" + "ljakcklv.go" )) diff --git a/goal_src/jak3/dgos/ljakklev.gd b/goal_src/jak3/dgos/ljakklev.gd index bf43749dd0..48a4ace725 100644 --- a/goal_src/jak3/dgos/ljakklev.gd +++ b/goal_src/jak3/dgos/ljakklev.gd @@ -1,6 +1,6 @@ ("LJAKKLEV.DGO" - ("tpage-1541.o" + ("tpage-1541.go" "kleever-highres-ag.go" "jak-highres-ag.go" - "ljakklev.o" + "ljakklev.go" )) diff --git a/goal_src/jak3/dgos/ljakndax.gd b/goal_src/jak3/dgos/ljakndax.gd index ad7a38c4e4..77e13677df 100644 --- a/goal_src/jak3/dgos/ljakndax.gd +++ b/goal_src/jak3/dgos/ljakndax.gd @@ -1,6 +1,6 @@ ("LJAKNDAX.DGO" - ("tpage-2362.o" + ("tpage-2362.go" "daxter-highres-ag.go" "jakc-highres-ag.go" - "ljakndax.o" + "ljakndax.go" )) diff --git a/goal_src/jak3/dgos/ljaksig.gd b/goal_src/jak3/dgos/ljaksig.gd index a36c53e96f..8b22d4503c 100644 --- a/goal_src/jak3/dgos/ljaksig.gd +++ b/goal_src/jak3/dgos/ljaksig.gd @@ -1,8 +1,8 @@ ("LJAKSIG.DGO" - ("tpage-1536.o" + ("tpage-1536.go" "tpage-1538.go" "tpage-1537.go" "sig-highres-ag.go" "jak-highres-ag.go" - "ljaksig.o" + "ljaksig.go" )) diff --git a/goal_src/jak3/dgos/ljinx.gd b/goal_src/jak3/dgos/ljinx.gd index 0dec3136d0..73036501d0 100644 --- a/goal_src/jak3/dgos/ljinx.gd +++ b/goal_src/jak3/dgos/ljinx.gd @@ -5,5 +5,5 @@ "jinx-ag.go" "krimson-wall-break-ag.go" "com-power-box-ag.go" - "ljinx.o" + "ljinx.go" )) diff --git a/goal_src/jak3/dgos/ljkcdmkl.gd b/goal_src/jak3/dgos/ljkcdmkl.gd index ef464f47d5..07073e621f 100644 --- a/goal_src/jak3/dgos/ljkcdmkl.gd +++ b/goal_src/jak3/dgos/ljkcdmkl.gd @@ -1,8 +1,8 @@ ("LJKCDMKL.DGO" - ("tpage-1810.o" + ("tpage-1810.go" "tpage-1811.go" "kleever-highres-ag.go" "jakc-highres-ag.go" "king-highres-ag.go" - "ljkcdmkl.o" + "ljkcdmkl.go" )) diff --git a/goal_src/jak3/dgos/ljkdmpk.gd b/goal_src/jak3/dgos/ljkdmpk.gd index b95ebacf33..2a9c82afe7 100644 --- a/goal_src/jak3/dgos/ljkdmpk.gd +++ b/goal_src/jak3/dgos/ljkdmpk.gd @@ -1,8 +1,8 @@ ("LJKDMPK.DGO" - ("tpage-1539.o" + ("tpage-1539.go" "tpage-1540.go" "pecker-highres-ag.go" "jakc-highres-ag.go" "king-highres-ag.go" - "ljkdmpk.o" + "ljkdmpk.go" )) diff --git a/goal_src/jak3/dgos/ljkdxvin.gd b/goal_src/jak3/dgos/ljkdxvin.gd index 482f553115..bf7a27a66d 100644 --- a/goal_src/jak3/dgos/ljkdxvin.gd +++ b/goal_src/jak3/dgos/ljkdxvin.gd @@ -1,9 +1,9 @@ ("LJKDXVIN.DGO" - ("tpage-2601.o" + ("tpage-2601.go" "tpage-2602.go" "daxter-highres-ag.go" "jakc-highres-ag.go" "vin-effect-ag.go" "particleman-ag.go" - "ljkdxvin.o" + "ljkdxvin.go" )) diff --git a/goal_src/jak3/dgos/ljkfeet.gd b/goal_src/jak3/dgos/ljkfeet.gd index f6ee9eb17a..2d03a83a98 100644 --- a/goal_src/jak3/dgos/ljkfeet.gd +++ b/goal_src/jak3/dgos/ljkfeet.gd @@ -1,5 +1,5 @@ ("LJKFEET.DGO" - ("tpage-2658.o" + ("tpage-2658.go" "jakc-feet-ag.go" - "ljkfeet.o" + "ljkfeet.go" )) diff --git a/goal_src/jak3/dgos/ljndklev.gd b/goal_src/jak3/dgos/ljndklev.gd index c0426ea941..bdc2acc5f3 100644 --- a/goal_src/jak3/dgos/ljndklev.gd +++ b/goal_src/jak3/dgos/ljndklev.gd @@ -1,7 +1,7 @@ ("LJNDKLEV.DGO" - ("tpage-1247.o" + ("tpage-1247.go" "daxter-highres-ag.go" "kleever-highres-ag.go" "jakc-highres-ag.go" - "ljndklev.o" + "ljndklev.go" )) diff --git a/goal_src/jak3/dgos/lkeira.gd b/goal_src/jak3/dgos/lkeira.gd index c99b664d37..a3beef4210 100644 --- a/goal_src/jak3/dgos/lkeira.gd +++ b/goal_src/jak3/dgos/lkeira.gd @@ -1,6 +1,6 @@ ("LKEIRA.DGO" - ("tpage-2131.o" + ("tpage-2131.go" "tpage-2132.go" "keira-highres-ag.go" - "lkeira.o" + "lkeira.go" )) diff --git a/goal_src/jak3/dgos/lkleever.gd b/goal_src/jak3/dgos/lkleever.gd index ea30108522..3eeb13e2e1 100644 --- a/goal_src/jak3/dgos/lkleever.gd +++ b/goal_src/jak3/dgos/lkleever.gd @@ -1,5 +1,5 @@ ("LKLEEVER.DGO" - ("tpage-1394.o" + ("tpage-1394.go" "kleever-highres-ag.go" - "lkleever.o" + "lkleever.go" )) diff --git a/goal_src/jak3/dgos/lmech.gd b/goal_src/jak3/dgos/lmech.gd index dea3493941..b02703c0cd 100644 --- a/goal_src/jak3/dgos/lmech.gd +++ b/goal_src/jak3/dgos/lmech.gd @@ -1,10 +1,10 @@ ("LMECH.DGO" - ("jak-mech+0-ag.o" + ("jak-mech+0-ag.go" "mech-part.o" "mech.o" "target-mech.o" "mech-states.o" "tpage-2955.go" "mech-ag.go" - "lmech.o" + "lmech.go" )) diff --git a/goal_src/jak3/dgos/lmhca.gd b/goal_src/jak3/dgos/lmhca.gd index cce6a23830..c03da1367d 100644 --- a/goal_src/jak3/dgos/lmhca.gd +++ b/goal_src/jak3/dgos/lmhca.gd @@ -1,4 +1,4 @@ ("LMHCA.DGO" - ("tpage-3142.o" - "lmhcitya-vis.o" + ("tpage-3142.go" + "lmhcitya-vis.go" )) diff --git a/goal_src/jak3/dgos/lmhcb.gd b/goal_src/jak3/dgos/lmhcb.gd index 32db84cd05..448c2eac61 100644 --- a/goal_src/jak3/dgos/lmhcb.gd +++ b/goal_src/jak3/dgos/lmhcb.gd @@ -1,4 +1,4 @@ ("LMHCB.DGO" - ("tpage-3141.o" - "lmhcityb-vis.o" + ("tpage-3141.go" + "lmhcityb-vis.go" )) diff --git a/goal_src/jak3/dgos/lnstcst.gd b/goal_src/jak3/dgos/lnstcst.gd index baf18a1b7e..6c2c117156 100644 --- a/goal_src/jak3/dgos/lnstcst.gd +++ b/goal_src/jak3/dgos/lnstcst.gd @@ -1,5 +1,5 @@ ("LNSTCST.DGO" - ("tpage-1766.o" + ("tpage-1766.go" "tpage-1768.go" "tpage-1767.go" "daxter-highres-ag.go" @@ -7,5 +7,5 @@ "sig-highres-ag.go" "desert-eggwall-break-ag.go" "scorpion-wheel-fma-ag.go" - "lnstcst.o" + "lnstcst.go" )) diff --git a/goal_src/jak3/dgos/lnstoa.gd b/goal_src/jak3/dgos/lnstoa.gd index 1d4c4507d1..a724882e16 100644 --- a/goal_src/jak3/dgos/lnstoa.gd +++ b/goal_src/jak3/dgos/lnstoa.gd @@ -1,5 +1,5 @@ ("LNSTOA.DGO" - ("tpage-1520.o" + ("tpage-1520.go" "tpage-1521.go" "tpage-1522.go" "nst-collapsing-stone-bridge-ag.go" @@ -8,5 +8,5 @@ "nst-metalhead-eggs-a-ag.go" "nst-metalhead-eggs-c-ag.go" "nst-metalhead-eggs-b-ag.go" - "lnstoba-vis.o" + "lnstoba-vis.go" )) diff --git a/goal_src/jak3/dgos/lnstobb.gd b/goal_src/jak3/dgos/lnstobb.gd index 922016a4a3..607c52948c 100644 --- a/goal_src/jak3/dgos/lnstobb.gd +++ b/goal_src/jak3/dgos/lnstobb.gd @@ -6,5 +6,5 @@ "mh-centipede-ag.go" "egg-spider-ag.go" "eco-crystal-light-ag.go" - "lnstobb.o" + "lnstobb.go" )) diff --git a/goal_src/jak3/dgos/lnstobc.gd b/goal_src/jak3/dgos/lnstobc.gd index 2747bdad44..774a47f4ad 100644 --- a/goal_src/jak3/dgos/lnstobc.gd +++ b/goal_src/jak3/dgos/lnstobc.gd @@ -1,3 +1,3 @@ ("LNSTOBC.DGO" - ("lnstobc.o" + ("lnstobc.go" )) diff --git a/goal_src/jak3/dgos/loninsim.gd b/goal_src/jak3/dgos/loninsim.gd index 76c61572a9..131af6b98d 100644 --- a/goal_src/jak3/dgos/loninsim.gd +++ b/goal_src/jak3/dgos/loninsim.gd @@ -1,5 +1,5 @@ ("LONINSIM.DGO" - ("tpage-3271.o" + ("tpage-3271.go" "onin-simple-ag.go" - "loninsim.o" + "loninsim.go" )) diff --git a/goal_src/jak3/dgos/loutro.gd b/goal_src/jak3/dgos/loutro.gd index a8e8d6d0e7..eb7873c5e0 100644 --- a/goal_src/jak3/dgos/loutro.gd +++ b/goal_src/jak3/dgos/loutro.gd @@ -1,5 +1,5 @@ ("LOUTRO.DGO" - ("tpage-2682.o" + ("tpage-2682.go" "tpage-2812.go" "tpage-2657.go" "daxter-highres-ag.go" @@ -7,5 +7,5 @@ "ottsel-veger-ag.go" "ottsel-leader-ag.go" "precursor-ship-ag.go" - "loutro.o" + "loutro.go" )) diff --git a/goal_src/jak3/dgos/loutro2.gd b/goal_src/jak3/dgos/loutro2.gd index 7ec58bdb6c..6b48cff585 100644 --- a/goal_src/jak3/dgos/loutro2.gd +++ b/goal_src/jak3/dgos/loutro2.gd @@ -1,10 +1,10 @@ ("LOUTRO2.DGO" - ("tpage-3069.o" + ("tpage-3069.go" "tpage-3070.go" "tpage-2746.go" "ottsel-daxpants-ag.go" "sig-highres-ag.go" "ottsel-dummy-ag.go" "ottsel-tess-ag.go" - "loutro2.o" + "loutro2.go" )) diff --git a/goal_src/jak3/dgos/loutro3.gd b/goal_src/jak3/dgos/loutro3.gd index 5ed79138f5..fd3284be25 100644 --- a/goal_src/jak3/dgos/loutro3.gd +++ b/goal_src/jak3/dgos/loutro3.gd @@ -1,7 +1,7 @@ ("LOUTRO3.DGO" - ("tpage-3273.o" + ("tpage-3273.go" "tpage-3274.go" "onin-simple-ag.go" "precursor-ship-door-ag.go" - "loutro3.o" + "loutro3.go" )) diff --git a/goal_src/jak3/dgos/lpatk.gd b/goal_src/jak3/dgos/lpatk.gd index c7aed77434..d0e05a5c3a 100644 --- a/goal_src/jak3/dgos/lpatk.gd +++ b/goal_src/jak3/dgos/lpatk.gd @@ -69,5 +69,5 @@ "neo-debris-ag.go" "shield-sphere-distort-ag.go" "shield-sphere-ag.go" - "lpattack-vis.o" + "lpattack-vis.go" )) diff --git a/goal_src/jak3/dgos/lpatkcs.gd b/goal_src/jak3/dgos/lpatkcs.gd index b542de4fce..db6f6a223e 100644 --- a/goal_src/jak3/dgos/lpatkcs.gd +++ b/goal_src/jak3/dgos/lpatkcs.gd @@ -1,9 +1,9 @@ ("LPATKCS.DGO" - ("tpage-2205.o" + ("tpage-2205.go" "tpage-1987.go" "tpage-2359.go" "daxter-highres-ag.go" "cty-dax-missile-launcher-ag.go" "particleman-ag.go" - "lpatkcs.o" + "lpatkcs.go" )) diff --git a/goal_src/jak3/dgos/lprecc.gd b/goal_src/jak3/dgos/lprecc.gd index 28d5b3e933..79d8b7559d 100644 --- a/goal_src/jak3/dgos/lprecc.gd +++ b/goal_src/jak3/dgos/lprecc.gd @@ -1,10 +1,10 @@ ("LPRECC.DGO" - ("tpage-2944.o" + ("tpage-2944.go" "tpage-2964.go" "tpage-3251.go" "precur-door-c-ag.go" "light-eco-vent-ag.go" "precur-door-a-ag.go" "precur-swingpole-pop-ag.go" - "lprecurc-vis.o" + "lprecurc-vis.go" )) diff --git a/goal_src/jak3/dgos/lprenme.gd b/goal_src/jak3/dgos/lprenme.gd index a8b04d9826..a1fac51e83 100644 --- a/goal_src/jak3/dgos/lprenme.gd +++ b/goal_src/jak3/dgos/lprenme.gd @@ -1,9 +1,9 @@ ("LPRENME.DGO" - ("tpage-2956.o" + ("tpage-2956.go" "neo-wasp-b-ag.go" "dm-ship-break-ag.go" "dm-ship-tent-brk-ag.go" "neo-debris-ag.go" "particleman-ag.go" - "lprenme.o" + "lprenme.go" )) diff --git a/goal_src/jak3/dgos/lptrl.gd b/goal_src/jak3/dgos/lptrl.gd index 4d0ebdcfa2..4b851b7719 100644 --- a/goal_src/jak3/dgos/lptrl.gd +++ b/goal_src/jak3/dgos/lptrl.gd @@ -1,5 +1,5 @@ ("LPTRL.DGO" - ("tpage-3280.o" + ("tpage-3280.go" "tpage-3279.go" "mantis-ag.go" "spyder-ag.go" @@ -8,5 +8,5 @@ "dark-eco-vent-ag.go" "light-eco-vent-ag.go" "dm-mine-spider-spawner-ag.go" - "lppatrol-vis.o" + "lppatrol-vis.go" )) diff --git a/goal_src/jak3/dgos/lsamos.gd b/goal_src/jak3/dgos/lsamos.gd index 66c74aef84..20545d817f 100644 --- a/goal_src/jak3/dgos/lsamos.gd +++ b/goal_src/jak3/dgos/lsamos.gd @@ -1,5 +1,5 @@ ("LSAMOS.DGO" - ("tpage-2133.o" + ("tpage-2133.go" "samos-highres-ag.go" - "lsamos.o" + "lsamos.go" )) diff --git a/goal_src/jak3/dgos/lseemwca.gd b/goal_src/jak3/dgos/lseemwca.gd index 5b1763f224..041fbb0160 100644 --- a/goal_src/jak3/dgos/lseemwca.gd +++ b/goal_src/jak3/dgos/lseemwca.gd @@ -1,5 +1,5 @@ ("LSEEMWCA.DGO" - ("tpage-2071.o" + ("tpage-2071.go" "seem-highres-ag.go" - "lseemwca.o" + "lseemwca.go" )) diff --git a/goal_src/jak3/dgos/lsig.gd b/goal_src/jak3/dgos/lsig.gd index 3812fdbaa1..fec4c79f18 100644 --- a/goal_src/jak3/dgos/lsig.gd +++ b/goal_src/jak3/dgos/lsig.gd @@ -1,6 +1,6 @@ ("LSIG.DGO" - ("tpage-1154.o" + ("tpage-1154.go" "tpage-1153.go" "sig-highres-ag.go" - "lsig.o" + "lsig.go" )) diff --git a/goal_src/jak3/dgos/lsigjakc.gd b/goal_src/jak3/dgos/lsigjakc.gd index 97d4971e0a..a4ade1482c 100644 --- a/goal_src/jak3/dgos/lsigjakc.gd +++ b/goal_src/jak3/dgos/lsigjakc.gd @@ -1,8 +1,8 @@ ("LSIGJAKC.DGO" - ("tpage-1449.o" + ("tpage-1449.go" "tpage-1451.go" "tpage-1450.go" "jakc-highres-ag.go" "sig-highres-ag.go" - "lsigjakc.o" + "lsigjakc.go" )) diff --git a/goal_src/jak3/dgos/lsigklv.gd b/goal_src/jak3/dgos/lsigklv.gd index ac2eb64df9..553d06c220 100644 --- a/goal_src/jak3/dgos/lsigklv.gd +++ b/goal_src/jak3/dgos/lsigklv.gd @@ -1,8 +1,8 @@ ("LSIGKLV.DGO" - ("tpage-2292.o" + ("tpage-2292.go" "tpage-2294.go" "tpage-2293.go" "kleever-highres-ag.go" "sig-highres-ag.go" - "lsigklv.o" + "lsigklv.go" )) diff --git a/goal_src/jak3/dgos/lsnkwhls.gd b/goal_src/jak3/dgos/lsnkwhls.gd index bd612f1f3a..110968eb4e 100644 --- a/goal_src/jak3/dgos/lsnkwhls.gd +++ b/goal_src/jak3/dgos/lsnkwhls.gd @@ -1,5 +1,5 @@ ("LSNKWHLS.DGO" - ("tpage-2588.o" + ("tpage-2588.go" "snake-wheel-fma-ag.go" - "lsnkwhls.o" + "lsnkwhls.go" )) diff --git a/goal_src/jak3/dgos/ltnfxhip.gd b/goal_src/jak3/dgos/ltnfxhip.gd index 849dde9d80..05252fa412 100644 --- a/goal_src/jak3/dgos/ltnfxhip.gd +++ b/goal_src/jak3/dgos/ltnfxhip.gd @@ -1,10 +1,10 @@ ("LTNFXHIP.DGO" - ("tpage-2312.o" + ("tpage-2312.go" "tpage-2311.go" "torn-highres-ag.go" "errol-effect-ag.go" "samos-effect-ag.go" "ashelin-effect-ag.go" "bomb-bot-movie-ag.go" - "ltnfxhip.o" + "ltnfxhip.go" )) diff --git a/goal_src/jak3/dgos/ltnjxhip.gd b/goal_src/jak3/dgos/ltnjxhip.gd index 4158b2ffa6..9b739b7212 100644 --- a/goal_src/jak3/dgos/ltnjxhip.gd +++ b/goal_src/jak3/dgos/ltnjxhip.gd @@ -1,5 +1,5 @@ ("LTNJXHIP.DGO" - ("tpage-2355.o" + ("tpage-2355.go" "tpage-2049.go" "tpage-2048.go" "torn-highres-ag.go" @@ -7,5 +7,5 @@ "purple-one-ag.go" "blue-gun-mod-three-ag.go" "cty-remote-ag.go" - "ltnjxhip.o" + "ltnjxhip.go" )) diff --git a/goal_src/jak3/dgos/ltorn.gd b/goal_src/jak3/dgos/ltorn.gd index 8c48cf4449..e0ea291bcb 100644 --- a/goal_src/jak3/dgos/ltorn.gd +++ b/goal_src/jak3/dgos/ltorn.gd @@ -1,5 +1,5 @@ ("LTORN.DGO" - ("tpage-1463.o" + ("tpage-1463.go" "torn-highres-ag.go" - "ltorn.o" + "ltorn.go" )) diff --git a/goal_src/jak3/dgos/ltornjnx.gd b/goal_src/jak3/dgos/ltornjnx.gd index 9ab91490e9..4f4a3034f6 100644 --- a/goal_src/jak3/dgos/ltornjnx.gd +++ b/goal_src/jak3/dgos/ltornjnx.gd @@ -1,6 +1,6 @@ ("LTORNJNX.DGO" - ("tpage-1479.o" + ("tpage-1479.go" "torn-highres-ag.go" "jinx-highres-ag.go" - "ltornjnx.o" + "ltornjnx.go" )) diff --git a/goal_src/jak3/dgos/ltornsam.gd b/goal_src/jak3/dgos/ltornsam.gd index 4dcbc64340..287dc29803 100644 --- a/goal_src/jak3/dgos/ltornsam.gd +++ b/goal_src/jak3/dgos/ltornsam.gd @@ -1,6 +1,6 @@ ("LTORNSAM.DGO" - ("tpage-1165.o" + ("tpage-1165.go" "samos-highres-ag.go" "torn-highres-ag.go" - "ltornsam.o" + "ltornsam.go" )) diff --git a/goal_src/jak3/dgos/ltowa.gd b/goal_src/jak3/dgos/ltowa.gd index 0cf9f620aa..9aefcfa5ca 100644 --- a/goal_src/jak3/dgos/ltowa.gd +++ b/goal_src/jak3/dgos/ltowa.gd @@ -1,5 +1,5 @@ ("LTOWA.DGO" - ("tpage-2644.o" + ("tpage-2644.go" "tpage-2910.go" "tpage-2645.go" "tpage-2646.go" @@ -8,5 +8,5 @@ "tow-large-plat-ag.go" "tow-spawner-ag.go" "tow-tentacle-ag.go" - "ltowera-vis.o" + "ltowera-vis.go" )) diff --git a/goal_src/jak3/dgos/ltowb.gd b/goal_src/jak3/dgos/ltowb.gd index b672741f5f..3b6e2de489 100644 --- a/goal_src/jak3/dgos/ltowb.gd +++ b/goal_src/jak3/dgos/ltowb.gd @@ -1,5 +1,5 @@ ("LTOWB.DGO" - ("tpage-2647.o" + ("tpage-2647.go" "tpage-2653.go" "tpage-2648.go" "tpage-2649.go" @@ -14,5 +14,5 @@ "tow-warp-effect-ag.go" "eco-crystal-dark-ag.go" "particleman-ag.go" - "ltowerb-vis.o" + "ltowerb-vis.go" )) diff --git a/goal_src/jak3/dgos/ltowcity.gd b/goal_src/jak3/dgos/ltowcity.gd index fa6318f4a9..a0082fdfd6 100644 --- a/goal_src/jak3/dgos/ltowcity.gd +++ b/goal_src/jak3/dgos/ltowcity.gd @@ -1,5 +1,5 @@ ("LTOWCITY.DGO" - ("tpage-2530.o" + ("tpage-2530.go" "tpage-2531.go" - "ltowcity.o" + "ltowcity.go" )) diff --git a/goal_src/jak3/dgos/ltrtwhls.gd b/goal_src/jak3/dgos/ltrtwhls.gd index ef216c4941..e5ba21bb41 100644 --- a/goal_src/jak3/dgos/ltrtwhls.gd +++ b/goal_src/jak3/dgos/ltrtwhls.gd @@ -1,5 +1,5 @@ ("LTRTWHLS.DGO" - ("tpage-2356.o" + ("tpage-2356.go" "turtle-wheel-fma-ag.go" - "ltrtwhls.o" + "ltrtwhls.go" )) diff --git a/goal_src/jak3/dgos/lvincst.gd b/goal_src/jak3/dgos/lvincst.gd index 8970af1876..b9c2cf4e14 100644 --- a/goal_src/jak3/dgos/lvincst.gd +++ b/goal_src/jak3/dgos/lvincst.gd @@ -1,5 +1,5 @@ ("LVINCST.DGO" - ("tpage-2869.o" + ("tpage-2869.go" "tpage-2870.go" "daxter-highres-ag.go" "jakc-highres-ag.go" @@ -8,5 +8,5 @@ "precursor-ag.go" "cipher-ag.go" "particleman-ag.go" - "lvincst.o" + "lvincst.go" )) diff --git a/goal_src/jak3/dgos/lwasbbv.gd b/goal_src/jak3/dgos/lwasbbv.gd index 1d20befbe8..ba9fa52c9d 100644 --- a/goal_src/jak3/dgos/lwasbbv.gd +++ b/goal_src/jak3/dgos/lwasbbv.gd @@ -1,4 +1,4 @@ ("LWASBBV.DGO" ("des-bbush-tasks.o" - "lwasbbv.o" + "lwasbbv.go" )) diff --git a/goal_src/jak3/dgos/lwassig.gd b/goal_src/jak3/dgos/lwassig.gd index 62e8471168..7d51574d5e 100644 --- a/goal_src/jak3/dgos/lwassig.gd +++ b/goal_src/jak3/dgos/lwassig.gd @@ -8,5 +8,5 @@ "tpage-1698.go" "tpage-1843.go" "sig-rider-ag.go" - "lwassig.o" + "lwassig.go" )) diff --git a/goal_src/jak3/dgos/lwlandm.gd b/goal_src/jak3/dgos/lwlandm.gd index 45a7d00517..834f3989ee 100644 --- a/goal_src/jak3/dgos/lwlandm.gd +++ b/goal_src/jak3/dgos/lwlandm.gd @@ -1,6 +1,6 @@ ("LWLANDM.DGO" - ("tpage-1550.o" + ("tpage-1550.go" "tpage-1551.go" "wlander-male-ag.go" - "lwlandm.o" + "lwlandm.go" )) diff --git a/goal_src/jak3/dgos/lwstdpck.gd b/goal_src/jak3/dgos/lwstdpck.gd index ae79d747bb..ce7b26e6c3 100644 --- a/goal_src/jak3/dgos/lwstdpck.gd +++ b/goal_src/jak3/dgos/lwstdpck.gd @@ -1,6 +1,6 @@ ("LWSTDPCK.DGO" - ("tpage-1367.o" + ("tpage-1367.go" "pecker-highres-ag.go" "jakc-highres-ag.go" - "lwstdpck.o" + "lwstdpck.go" )) diff --git a/goal_src/jak3/dgos/mhca.gd b/goal_src/jak3/dgos/mhca.gd index 0593186203..212e0347e1 100644 --- a/goal_src/jak3/dgos/mhca.gd +++ b/goal_src/jak3/dgos/mhca.gd @@ -19,5 +19,5 @@ "mhcity-vine-wriggler-big-ag.go" "mhcity-claw-finger-small-ag.go" "mhcity-twitch-blade-ag.go" - "mhcitya-vis.o" + "mhcitya-vis.go" )) diff --git a/goal_src/jak3/dgos/mhcb.gd b/goal_src/jak3/dgos/mhcb.gd index ec4301fa2e..87627e1fdf 100644 --- a/goal_src/jak3/dgos/mhcb.gd +++ b/goal_src/jak3/dgos/mhcb.gd @@ -17,5 +17,5 @@ "mhcity-vine-wriggler-big-ag.go" "mhcity-claw-finger-small-ag.go" "mhcity-twitch-blade-ag.go" - "mhcityb-vis.o" + "mhcityb-vis.go" )) diff --git a/goal_src/jak3/dgos/mhctycst.gd b/goal_src/jak3/dgos/mhctycst.gd index 6aea07953e..3fdc0772d0 100644 --- a/goal_src/jak3/dgos/mhctycst.gd +++ b/goal_src/jak3/dgos/mhctycst.gd @@ -1,9 +1,9 @@ ("MHCTYCST.DGO" - ("tpage-2367.o" + ("tpage-2367.go" "tpage-2379.go" "daxter-highres-ag.go" "darkjak-highres-ag.go" "mhcity-de-tower-egg-ag.go" "particleman-ag.go" - "mhctycst.o" + "mhctycst.go" )) diff --git a/goal_src/jak3/dgos/mia.gd b/goal_src/jak3/dgos/mia.gd index 473b63f4bb..058667867c 100644 --- a/goal_src/jak3/dgos/mia.gd +++ b/goal_src/jak3/dgos/mia.gd @@ -29,5 +29,5 @@ "min-elevator-ag.go" "min-boss-elev-ag.go" "min-bomb-train-debris-ag.go" - "minea-vis.o" + "minea-vis.go" )) diff --git a/goal_src/jak3/dgos/mib.gd b/goal_src/jak3/dgos/mib.gd index 60e46bd411..551d3c466b 100644 --- a/goal_src/jak3/dgos/mib.gd +++ b/goal_src/jak3/dgos/mib.gd @@ -1,5 +1,5 @@ ("MIB.DGO" - ("tpage-926.o" + ("tpage-926.go" "tpage-929.go" "tpage-928.go" "tpage-1856.go" @@ -18,5 +18,5 @@ "light-eco-vent-ag.go" "leggings-ag.go" "min-crane-switch-ag.go" - "mineb-vis.o" + "mineb-vis.go" )) diff --git a/goal_src/jak3/dgos/mic.gd b/goal_src/jak3/dgos/mic.gd index 6247ca3032..5986a49b7e 100644 --- a/goal_src/jak3/dgos/mic.gd +++ b/goal_src/jak3/dgos/mic.gd @@ -15,5 +15,5 @@ "min-falling-step-ag.go" "min-door-ag.go" "light-eco-vent-ag.go" - "minec-vis.o" + "minec-vis.go" )) diff --git a/goal_src/jak3/dgos/mined.gd b/goal_src/jak3/dgos/mined.gd index 4f598cf3e3..efeb2776fe 100644 --- a/goal_src/jak3/dgos/mined.gd +++ b/goal_src/jak3/dgos/mined.gd @@ -34,5 +34,5 @@ "particleman-ag.go" "cav-minecar-ag.go" "blue-two-upgrade-ag.go" - "mined.o" + "mined.go" )) diff --git a/goal_src/jak3/dgos/minee.gd b/goal_src/jak3/dgos/minee.gd index d1fdea08e7..07b4f49bc5 100644 --- a/goal_src/jak3/dgos/minee.gd +++ b/goal_src/jak3/dgos/minee.gd @@ -7,5 +7,5 @@ "jakc-highres-ag.go" "com-airlock-inner-ag.go" "sew-elevator-ag.go" - "minee.o" + "minee.go" )) diff --git a/goal_src/jak3/dgos/museum.gd b/goal_src/jak3/dgos/museum.gd index 65877abdc1..5ea263fa30 100644 --- a/goal_src/jak3/dgos/museum.gd +++ b/goal_src/jak3/dgos/museum.gd @@ -1,5 +1,5 @@ ("MUSEUM.DGO" - ("museum-anims+0-ag.o" + ("museum-anims+0-ag.go" "tpage-3296.go" "tpage-3310.go" "tpage-3297.go" @@ -13,5 +13,5 @@ "torn-highres-ag.go" "ashelin-highres-ag.go" "onin-highres-ag.go" - "museum.o" + "museum.go" )) diff --git a/goal_src/jak3/dgos/museum2.gd b/goal_src/jak3/dgos/museum2.gd index 3f1bc014aa..2467d551da 100644 --- a/goal_src/jak3/dgos/museum2.gd +++ b/goal_src/jak3/dgos/museum2.gd @@ -1,5 +1,5 @@ ("MUSEUM2.DGO" - ("museum-2-anims+0-ag.o" + ("museum-2-anims+0-ag.go" "tpage-3311.go" "tpage-3313.go" "tpage-3312.go" @@ -14,5 +14,5 @@ "ottsel-leader-ag.go" "ottsel-tess-ag.go" "jinx-highres-ag.go" - "museum2.o" + "museum2.go" )) diff --git a/goal_src/jak3/dgos/museum3.gd b/goal_src/jak3/dgos/museum3.gd index 46351e0fe1..bba5e6a191 100644 --- a/goal_src/jak3/dgos/museum3.gd +++ b/goal_src/jak3/dgos/museum3.gd @@ -1,5 +1,5 @@ ("MUSEUM3.DGO" - ("museum-3-anims+0-ag.o" + ("museum-3-anims+0-ag.go" "tpage-3360.go" "tpage-3362.go" "tpage-3361.go" @@ -10,5 +10,5 @@ "samos-highres-ag.go" "red-crimson-guard-highres-ag.go" "youngsamos-highres-ag.go" - "museum3.o" + "museum3.go" )) diff --git a/goal_src/jak3/dgos/museum3b.gd b/goal_src/jak3/dgos/museum3b.gd index 14f6177de7..b8d571330c 100644 --- a/goal_src/jak3/dgos/museum3b.gd +++ b/goal_src/jak3/dgos/museum3b.gd @@ -1,5 +1,5 @@ ("MUSEUM3B.DGO" - ("tpage-3415.o" + ("tpage-3415.go" "tpage-3416.go" "brutter-highres-ag.go" "krew-ag.go" @@ -8,5 +8,5 @@ "baron-highres-ag.go" "errol-highres-ag.go" "kid-highres-ag.go" - "museum3b.o" + "museum3b.go" )) diff --git a/goal_src/jak3/dgos/museum4.gd b/goal_src/jak3/dgos/museum4.gd index 7af91b28d9..dccd6db450 100644 --- a/goal_src/jak3/dgos/museum4.gd +++ b/goal_src/jak3/dgos/museum4.gd @@ -1,5 +1,5 @@ ("MUSEUM4.DGO" - ("tpage-3390.o" + ("tpage-3390.go" "tpage-3365.go" "tpage-3419.go" "tpage-3386.go" @@ -24,5 +24,5 @@ "warrior-ag.go" "minershort-ag.go" "flutflut-ag.go" - "museum4.o" + "museum4.go" )) diff --git a/goal_src/jak3/dgos/museum4b.gd b/goal_src/jak3/dgos/museum4b.gd index 6684e405bf..c905309d54 100644 --- a/goal_src/jak3/dgos/museum4b.gd +++ b/goal_src/jak3/dgos/museum4b.gd @@ -1,5 +1,5 @@ ("MUSEUM4B.DGO" - ("tpage-3417.o" + ("tpage-3417.go" "babak-ag.go" - "museum4b.o" + "museum4b.go" )) diff --git a/goal_src/jak3/dgos/nsa.gd b/goal_src/jak3/dgos/nsa.gd index 375eedf701..02401b5630 100644 --- a/goal_src/jak3/dgos/nsa.gd +++ b/goal_src/jak3/dgos/nsa.gd @@ -12,5 +12,5 @@ "tpage-446.go" "tpage-1072.go" "egg-spider-ag.go" - "nsta-vis.o" + "nsta-vis.go" )) diff --git a/goal_src/jak3/dgos/nsb.gd b/goal_src/jak3/dgos/nsb.gd index 1f72634768..6c64e653b7 100644 --- a/goal_src/jak3/dgos/nsb.gd +++ b/goal_src/jak3/dgos/nsb.gd @@ -1,5 +1,5 @@ ("NSB.DGO" - ("tpage-605.o" + ("tpage-605.go" "tpage-607.go" "tpage-606.go" "tpage-604.go" @@ -9,5 +9,5 @@ "nst-cocoon-b-ag.go" "nst-falling-stone-bridge-ag.go" "nst-falling-stone-bridge-goo-ag.go" - "nstb-vis.o" + "nstb-vis.go" )) diff --git a/goal_src/jak3/dgos/oasiscst.gd b/goal_src/jak3/dgos/oasiscst.gd index e46fc451be..1eed727570 100644 --- a/goal_src/jak3/dgos/oasiscst.gd +++ b/goal_src/jak3/dgos/oasiscst.gd @@ -1,5 +1,5 @@ ("OASISCST.DGO" - ("tpage-1600.o" + ("tpage-1600.go" "tpage-1601.go" "daxter-highres-ag.go" "jakc-highres-ag.go" @@ -7,5 +7,5 @@ "interceptor-wheel-fma-ag.go" "kidmedallion-ag.go" "particleman-ag.go" - "oasiscst.o" + "oasiscst.go" )) diff --git a/goal_src/jak3/dgos/onintent.gd b/goal_src/jak3/dgos/onintent.gd index 4130bf62f7..c264be6559 100644 --- a/goal_src/jak3/dgos/onintent.gd +++ b/goal_src/jak3/dgos/onintent.gd @@ -11,5 +11,5 @@ "jakc-highres-ag.go" "samos-highres-ag.go" "onin-highres-ag.go" - "onintent.o" + "onintent.go" )) diff --git a/goal_src/jak3/dgos/outcast3.gd b/goal_src/jak3/dgos/outcast3.gd index 1f415fbd76..081501dbd0 100644 --- a/goal_src/jak3/dgos/outcast3.gd +++ b/goal_src/jak3/dgos/outcast3.gd @@ -1,7 +1,7 @@ ("OUTCAST3.DGO" - ("tpage-3306.o" + ("tpage-3306.go" "tpage-3307.go" "torn-simple-ag.go" "keira-simple-ag.go" - "outcast3.o" + "outcast3.go" )) diff --git a/goal_src/jak3/dgos/outrocst.gd b/goal_src/jak3/dgos/outrocst.gd index 930b447017..05b86f3dbe 100644 --- a/goal_src/jak3/dgos/outrocst.gd +++ b/goal_src/jak3/dgos/outrocst.gd @@ -1,5 +1,5 @@ ("OUTROCST.DGO" - ("tpage-2596.o" + ("tpage-2596.go" "tpage-2597.go" "kleever-highres-ag.go" "pecker-highres-ag.go" @@ -9,5 +9,5 @@ "tess-highres-ag.go" "ashelin-highres-ag.go" "particleman-ag.go" - "outrocst.o" + "outrocst.go" )) diff --git a/goal_src/jak3/dgos/powergd.gd b/goal_src/jak3/dgos/powergd.gd index 0506597972..1f20a2e160 100644 --- a/goal_src/jak3/dgos/powergd.gd +++ b/goal_src/jak3/dgos/powergd.gd @@ -1,5 +1,5 @@ ("POWERGD.DGO" - ("tpage-2187.o" + ("tpage-2187.go" "tpage-2249.go" "tpage-3164.go" "tpage-3181.go" @@ -11,5 +11,5 @@ "pow-rings-ag.go" "switcher-ag.go" "grunt-head-ag.go" - "powergd.o" + "powergd.go" )) diff --git a/goal_src/jak3/dgos/preca.gd b/goal_src/jak3/dgos/preca.gd index 587c92b088..dd84cb717c 100644 --- a/goal_src/jak3/dgos/preca.gd +++ b/goal_src/jak3/dgos/preca.gd @@ -39,5 +39,5 @@ "shield-sphere-distort-ag.go" "precur-generator-d-gem-ag.go" "shield-sphere-ag.go" - "precura-vis.o" + "precura-vis.go" )) diff --git a/goal_src/jak3/dgos/precb.gd b/goal_src/jak3/dgos/precb.gd index 64390d9f41..bf618b72d0 100644 --- a/goal_src/jak3/dgos/precb.gd +++ b/goal_src/jak3/dgos/precb.gd @@ -1,5 +1,5 @@ ("PRECB.DGO" - ("tpage-2633.o" + ("tpage-2633.go" "tpage-2636.go" "precur-generator-b-ag.go" "precur-generator-c-ag.go" @@ -11,5 +11,5 @@ "shield-sphere-explode-ag.go" "shield-sphere-distort-ag.go" "shield-sphere-ag.go" - "precurb-vis.o" + "precurb-vis.go" )) diff --git a/goal_src/jak3/dgos/precc.gd b/goal_src/jak3/dgos/precc.gd index 149f2dbc81..281001db70 100644 --- a/goal_src/jak3/dgos/precc.gd +++ b/goal_src/jak3/dgos/precc.gd @@ -1,5 +1,5 @@ ("PRECC.DGO" - ("jak-pole+0-ag.o" + ("jak-pole+0-ag.go" "target-tube.o" "jak-tube+0-ag.go" "precurc-part.o" @@ -11,5 +11,5 @@ "precur-elevator-ag.go" "precur-door-a-ag.go" "precur-swingpole-pop-ag.go" - "precurc-vis.o" + "precurc-vis.go" )) diff --git a/goal_src/jak3/dgos/precd.gd b/goal_src/jak3/dgos/precd.gd index 8232f57cd0..ee9ebe78cc 100644 --- a/goal_src/jak3/dgos/precd.gd +++ b/goal_src/jak3/dgos/precd.gd @@ -49,5 +49,5 @@ "precur-planet-ag.go" "precur-bridge-g-blocks-break-ag.go" "particleman-ag.go" - "precurd-vis.o" + "precurd-vis.go" )) diff --git a/goal_src/jak3/dgos/raila.gd b/goal_src/jak3/dgos/raila.gd index b2f19e2b7d..f18cf89741 100644 --- a/goal_src/jak3/dgos/raila.gd +++ b/goal_src/jak3/dgos/raila.gd @@ -38,5 +38,5 @@ "comb-rail-rider-ag.go" "comb-energy-ring-ag.go" "vehicle-explosion-ag.go" - "raila.o" + "raila.go" )) diff --git a/goal_src/jak3/dgos/railb.gd b/goal_src/jak3/dgos/railb.gd index 29af864695..c7ad14df34 100644 --- a/goal_src/jak3/dgos/railb.gd +++ b/goal_src/jak3/dgos/railb.gd @@ -1,4 +1,4 @@ ("RAILB.DGO" - ("tpage-2487.o" - "railb.o" + ("tpage-2487.go" + "railb.go" )) diff --git a/goal_src/jak3/dgos/railb2.gd b/goal_src/jak3/dgos/railb2.gd index b0980c8512..7a8e8bfc66 100644 --- a/goal_src/jak3/dgos/railb2.gd +++ b/goal_src/jak3/dgos/railb2.gd @@ -1,4 +1,4 @@ ("RAILB2.DGO" - ("tpage-2708.o" - "railb2.o" + ("tpage-2708.go" + "railb2.go" )) diff --git a/goal_src/jak3/dgos/railc.gd b/goal_src/jak3/dgos/railc.gd index 0368e34b95..87099d6570 100644 --- a/goal_src/jak3/dgos/railc.gd +++ b/goal_src/jak3/dgos/railc.gd @@ -1,4 +1,4 @@ ("RAILC.DGO" - ("tpage-2484.o" - "railc.o" + ("tpage-2484.go" + "railc.go" )) diff --git a/goal_src/jak3/dgos/railcst.gd b/goal_src/jak3/dgos/railcst.gd index 6bd37be054..633cbbb030 100644 --- a/goal_src/jak3/dgos/railcst.gd +++ b/goal_src/jak3/dgos/railcst.gd @@ -1,5 +1,5 @@ ("RAILCST.DGO" - ("tpage-2711.o" + ("tpage-2711.go" "tpage-2512.go" "tpage-2904.go" "tpage-2513.go" @@ -20,5 +20,5 @@ "fma-gun-ag.go" "plat-fma-ag.go" "particleman-ag.go" - "railcst.o" + "railcst.go" )) diff --git a/goal_src/jak3/dgos/raild.gd b/goal_src/jak3/dgos/raild.gd index 60dc0e19bb..7cee89e477 100644 --- a/goal_src/jak3/dgos/raild.gd +++ b/goal_src/jak3/dgos/raild.gd @@ -1,6 +1,6 @@ ("RAILD.DGO" - ("tpage-2486.o" + ("tpage-2486.go" "blocking-plane-ag.go" "spotlight-ag.go" - "raild.o" + "raild.go" )) diff --git a/goal_src/jak3/dgos/raile.gd b/goal_src/jak3/dgos/raile.gd index e59f4b8531..f35f203a24 100644 --- a/goal_src/jak3/dgos/raile.gd +++ b/goal_src/jak3/dgos/raile.gd @@ -1,8 +1,8 @@ ("RAILE.DGO" - ("tpage-2485.o" + ("tpage-2485.go" "dummy1-ag.go" "dummy2-ag.go" "dummy3-ag.go" "dummy4-ag.go" - "raile.o" + "raile.go" )) diff --git a/goal_src/jak3/dgos/railf.gd b/goal_src/jak3/dgos/railf.gd index 6165fae85c..b7f3054486 100644 --- a/goal_src/jak3/dgos/railf.gd +++ b/goal_src/jak3/dgos/railf.gd @@ -1,4 +1,4 @@ ("RAILF.DGO" - ("tpage-2483.o" - "railf.o" + ("tpage-2483.go" + "railf.go" )) diff --git a/goal_src/jak3/dgos/railx.gd b/goal_src/jak3/dgos/railx.gd index a606525e3b..ec60b79b3b 100644 --- a/goal_src/jak3/dgos/railx.gd +++ b/goal_src/jak3/dgos/railx.gd @@ -7,5 +7,5 @@ "rail-gun-dark-ag.go" "rail-oracle-door-ag.go" "rail-oracle-eyes-ag.go" - "railx.o" + "railx.go" )) diff --git a/goal_src/jak3/dgos/rbct.gd b/goal_src/jak3/dgos/rbct.gd index 1ec703a7d8..d157a52f83 100644 --- a/goal_src/jak3/dgos/rbct.gd +++ b/goal_src/jak3/dgos/rbct.gd @@ -13,5 +13,5 @@ "rhino-wheel-fma-ag.go" "kidmedallion-ag.go" "particleman-ag.go" - "rublcst-vis.o" + "rublcst-vis.go" )) diff --git a/goal_src/jak3/dgos/ruba.gd b/goal_src/jak3/dgos/ruba.gd index 39ba392aa3..7aaa7d5cb6 100644 --- a/goal_src/jak3/dgos/ruba.gd +++ b/goal_src/jak3/dgos/ruba.gd @@ -1,5 +1,5 @@ ("RUBA.DGO" - ("tpage-2065.o" + ("tpage-2065.go" "tpage-2067.go" "tpage-2066.go" "tpage-2416.go" @@ -13,5 +13,5 @@ "rhino-wheel-fma-ag.go" "particleman-ag.go" "blocking-plane-ag.go" - "rubblea-vis.o" + "rubblea-vis.go" )) diff --git a/goal_src/jak3/dgos/ruba2.gd b/goal_src/jak3/dgos/ruba2.gd index 32e9ad1a2f..9ed2df7ff6 100644 --- a/goal_src/jak3/dgos/ruba2.gd +++ b/goal_src/jak3/dgos/ruba2.gd @@ -1,9 +1,9 @@ ("RUBA2.DGO" - ("tpage-2508.o" + ("tpage-2508.go" "tpage-2509.go" "tpage-2510.go" "rub-tower-ag.go" "rub-electric-gate-panel-b-ag.go" "rub-electric-gate-panel-a-ag.go" - "rubblea2-vis.o" + "rubblea2-vis.go" )) diff --git a/goal_src/jak3/dgos/rubb.gd b/goal_src/jak3/dgos/rubb.gd index 88dc04fc70..b5823ab682 100644 --- a/goal_src/jak3/dgos/rubb.gd +++ b/goal_src/jak3/dgos/rubb.gd @@ -1,5 +1,5 @@ ("RUBB.DGO" - ("tpage-2058.o" + ("tpage-2058.go" "tpage-2059.go" "tpage-2060.go" "rub-rhino-door-ag.go" @@ -7,5 +7,5 @@ "rub-electric-gate-panel-a-ag.go" "security-wall-ag.go" "spotlight-ag.go" - "rubbleb-vis.o" + "rubbleb-vis.go" )) diff --git a/goal_src/jak3/dgos/rubc.gd b/goal_src/jak3/dgos/rubc.gd index aa24827dda..fd857e39f6 100644 --- a/goal_src/jak3/dgos/rubc.gd +++ b/goal_src/jak3/dgos/rubc.gd @@ -1,10 +1,10 @@ ("RUBC.DGO" - ("tpage-2055.o" + ("tpage-2055.go" "tpage-2056.go" "tpage-2057.go" "rub-rhino-door-ag.go" "rub-tower-ag.go" "rub-electric-gate-panel-d-ag.go" "rub-electric-gate-panel-c-ag.go" - "rubblec-vis.o" + "rubblec-vis.go" )) diff --git a/goal_src/jak3/dgos/sea.gd b/goal_src/jak3/dgos/sea.gd index b8affe22d0..d96a46f712 100644 --- a/goal_src/jak3/dgos/sea.gd +++ b/goal_src/jak3/dgos/sea.gd @@ -52,5 +52,5 @@ "sew-elevator-ag.go" "kg-debris-ag.go" "particleman-ag.go" - "sewa-vis.o" + "sewa-vis.go" )) diff --git a/goal_src/jak3/dgos/seb.gd b/goal_src/jak3/dgos/seb.gd index f790ca1bb2..55193cf361 100644 --- a/goal_src/jak3/dgos/seb.gd +++ b/goal_src/jak3/dgos/seb.gd @@ -1,5 +1,5 @@ ("SEB.DGO" - ("tpage-742.o" + ("tpage-742.go" "tpage-753.go" "tpage-743.go" "kg-grunt-ag.go" @@ -9,5 +9,5 @@ "sew-float-plat-ag.go" "sew-floor-switch-ag.go" "kg-debris-ag.go" - "sewb-vis.o" + "sewb-vis.go" )) diff --git a/goal_src/jak3/dgos/sec.gd b/goal_src/jak3/dgos/sec.gd index 2806fb9f5e..2e45a9d9e5 100644 --- a/goal_src/jak3/dgos/sec.gd +++ b/goal_src/jak3/dgos/sec.gd @@ -1,5 +1,5 @@ ("SEC.DGO" - ("tpage-744.o" + ("tpage-744.go" "tpage-754.go" "tpage-745.go" "tpage-751.go" @@ -9,5 +9,5 @@ "com-airlock-outer-ag.go" "sew-laser-guard-ag.go" "kg-debris-ag.go" - "sewc-vis.o" + "sewc-vis.go" )) diff --git a/goal_src/jak3/dgos/sed.gd b/goal_src/jak3/dgos/sed.gd index 322771723c..e6d604bc5d 100644 --- a/goal_src/jak3/dgos/sed.gd +++ b/goal_src/jak3/dgos/sed.gd @@ -15,5 +15,5 @@ "sew-wall-switch-ag.go" "kg-debris-ag.go" "sew-slide-step-ag.go" - "sewd-vis.o" + "sewd-vis.go" )) diff --git a/goal_src/jak3/dgos/see.gd b/goal_src/jak3/dgos/see.gd index 1ce01db714..dea885aa16 100644 --- a/goal_src/jak3/dgos/see.gd +++ b/goal_src/jak3/dgos/see.gd @@ -1,5 +1,5 @@ ("SEE.DGO" - ("tpage-748.o" + ("tpage-748.go" "tpage-756.go" "tpage-749.go" "tpage-755.go" @@ -9,5 +9,5 @@ "kg-debris-ag.go" "sew-power-switch-ag.go" "sew-moving-step-b-ag.go" - "sewe-vis.o" + "sewe-vis.go" )) diff --git a/goal_src/jak3/dgos/sef.gd b/goal_src/jak3/dgos/sef.gd index 59a96a76a1..08b788576c 100644 --- a/goal_src/jak3/dgos/sef.gd +++ b/goal_src/jak3/dgos/sef.gd @@ -1,5 +1,5 @@ ("SEF.DGO" - ("tpage-757.o" + ("tpage-757.go" "tpage-759.go" "tpage-758.go" "com-airlock-outer-ag.go" @@ -7,5 +7,5 @@ "sew-poison-switch-ag.go" "sew-gas-step-ag.go" "sew-curved-door-ag.go" - "sewf-vis.o" + "sewf-vis.go" )) diff --git a/goal_src/jak3/dgos/seg.gd b/goal_src/jak3/dgos/seg.gd index 561bfdf175..40a2bb15c2 100644 --- a/goal_src/jak3/dgos/seg.gd +++ b/goal_src/jak3/dgos/seg.gd @@ -1,5 +1,5 @@ ("SEG.DGO" - ("tpage-1127.o" + ("tpage-1127.go" "tpage-1133.go" "tpage-1128.go" "tpage-1126.go" @@ -10,5 +10,5 @@ "sew-jump-pad-ag.go" "sew-move-plat-ag.go" "kg-debris-ag.go" - "sewg-vis.o" + "sewg-vis.go" )) diff --git a/goal_src/jak3/dgos/seh.gd b/goal_src/jak3/dgos/seh.gd index fec288a790..4873ab2ede 100644 --- a/goal_src/jak3/dgos/seh.gd +++ b/goal_src/jak3/dgos/seh.gd @@ -13,5 +13,5 @@ "sew-grate-plat-ag.go" "sew-move-plat-ag.go" "kg-debris-ag.go" - "sewh-vis.o" + "sewh-vis.go" )) diff --git a/goal_src/jak3/dgos/sei.gd b/goal_src/jak3/dgos/sei.gd index f9b0df0916..92d2564783 100644 --- a/goal_src/jak3/dgos/sei.gd +++ b/goal_src/jak3/dgos/sei.gd @@ -1,5 +1,5 @@ ("SEI.DGO" - ("tpage-1123.o" + ("tpage-1123.go" "tpage-1130.go" "tpage-1124.go" "tpage-1122.go" @@ -8,5 +8,5 @@ "sew-fence-gate-ag.go" "sew-floor-switch-ag.go" "sew-rove-plat-ag.go" - "sewi-vis.o" + "sewi-vis.go" )) diff --git a/goal_src/jak3/dgos/sej.gd b/goal_src/jak3/dgos/sej.gd index 32c900cd0a..46c9c426f3 100644 --- a/goal_src/jak3/dgos/sej.gd +++ b/goal_src/jak3/dgos/sej.gd @@ -1,5 +1,5 @@ ("SEJ.DGO" - ("tpage-1135.o" + ("tpage-1135.go" "tpage-1137.go" "tpage-1136.go" "tpage-1134.go" @@ -7,5 +7,5 @@ "com-airlock-outer-ag.go" "com-airlock-inner-ag.go" "kg-debris-ag.go" - "sewj-vis.o" + "sewj-vis.go" )) diff --git a/goal_src/jak3/dgos/sek.gd b/goal_src/jak3/dgos/sek.gd index 224094f6aa..4c62879ca6 100644 --- a/goal_src/jak3/dgos/sek.gd +++ b/goal_src/jak3/dgos/sek.gd @@ -1,9 +1,9 @@ ("SEK.DGO" - ("tpage-1121.o" + ("tpage-1121.go" "tpage-1784.go" "tpage-1783.go" "com-airlock-outer-ag.go" "com-airlock-inner-ag.go" "sew-curved-door-ag.go" - "sewk-vis.o" + "sewk-vis.go" )) diff --git a/goal_src/jak3/dgos/sel.gd b/goal_src/jak3/dgos/sel.gd index f3dc9610f1..cba5907e09 100644 --- a/goal_src/jak3/dgos/sel.gd +++ b/goal_src/jak3/dgos/sel.gd @@ -1,10 +1,10 @@ ("SEL.DGO" - ("tpage-1143.o" + ("tpage-1143.go" "tpage-1145.go" "tpage-1144.go" "tpage-1142.go" "neo-wasp-ag.go" "com-airlock-outer-ag.go" "com-airlock-inner-ag.go" - "sewl-vis.o" + "sewl-vis.go" )) diff --git a/goal_src/jak3/dgos/sem.gd b/goal_src/jak3/dgos/sem.gd index 171ad7aad5..d94d08efe3 100644 --- a/goal_src/jak3/dgos/sem.gd +++ b/goal_src/jak3/dgos/sem.gd @@ -1,5 +1,5 @@ ("SEM.DGO" - ("tpage-1138.o" + ("tpage-1138.go" "tpage-1141.go" "tpage-1139.go" "tpage-1140.go" @@ -8,5 +8,5 @@ "sew-fan-ag.go" "sew-jump-pad-ag.go" "sew-m-gate-ag.go" - "sewm-vis.o" + "sewm-vis.go" )) diff --git a/goal_src/jak3/dgos/sen.gd b/goal_src/jak3/dgos/sen.gd index bee1f697c2..736e22853e 100644 --- a/goal_src/jak3/dgos/sen.gd +++ b/goal_src/jak3/dgos/sen.gd @@ -1,5 +1,5 @@ ("SEN.DGO" - ("tpage-1971.o" + ("tpage-1971.go" "tpage-1973.go" "tpage-1972.go" "tpage-1970.go" @@ -8,5 +8,5 @@ "com-airlock-inner-ag.go" "sew-fan-ag.go" "sew-pipe-ag.go" - "sewn-vis.o" + "sewn-vis.go" )) diff --git a/goal_src/jak3/dgos/seo.gd b/goal_src/jak3/dgos/seo.gd index 97161d948b..b2ff8d4d05 100644 --- a/goal_src/jak3/dgos/seo.gd +++ b/goal_src/jak3/dgos/seo.gd @@ -1,9 +1,9 @@ ("SEO.DGO" - ("tpage-1925.o" + ("tpage-1925.go" "tpage-1927.go" "tpage-1926.go" "neo-wasp-ag.go" "com-airlock-outer-ag.go" "com-airlock-inner-ag.go" - "sewo-vis.o" + "sewo-vis.go" )) diff --git a/goal_src/jak3/dgos/slumbset.gd b/goal_src/jak3/dgos/slumbset.gd index 3dcc7b32c8..ff705b47aa 100644 --- a/goal_src/jak3/dgos/slumbset.gd +++ b/goal_src/jak3/dgos/slumbset.gd @@ -7,5 +7,5 @@ "daxter-highres-ag.go" "keira-highres-ag.go" "jakc-highres-ag.go" - "slumbset.o" + "slumbset.go" )) diff --git a/goal_src/jak3/dgos/sta.gd b/goal_src/jak3/dgos/sta.gd index 65fe3cb1be..e99950b524 100644 --- a/goal_src/jak3/dgos/sta.gd +++ b/goal_src/jak3/dgos/sta.gd @@ -7,5 +7,5 @@ "tpage-2514.go" "daxter-highres-ag.go" "light-eco-vent-ag.go" - "stadium-vis.o" + "stadium-vis.go" )) diff --git a/goal_src/jak3/dgos/staa.gd b/goal_src/jak3/dgos/staa.gd index 5ccd70adfc..51cd13c4ca 100644 --- a/goal_src/jak3/dgos/staa.gd +++ b/goal_src/jak3/dgos/staa.gd @@ -20,5 +20,5 @@ "tpage-2450.go" "stadium-sails-left-ag.go" "stadium-sails-right-ag.go" - "stadiuma-vis.o" + "stadiuma-vis.go" )) diff --git a/goal_src/jak3/dgos/stb.gd b/goal_src/jak3/dgos/stb.gd index 57f16e17d8..d222b71f9f 100644 --- a/goal_src/jak3/dgos/stb.gd +++ b/goal_src/jak3/dgos/stb.gd @@ -1,9 +1,9 @@ ("STB.DGO" - ("tpage-319.o" + ("tpage-319.go" "tpage-318.go" "tpage-1974.go" "tpage-317.go" "jakc-highres-ag.go" "rub-falling-step-ag.go" - "stadiumb-vis.o" + "stadiumb-vis.go" )) diff --git a/goal_src/jak3/dgos/tema.gd b/goal_src/jak3/dgos/tema.gd index 5a7357b8af..d5cbe3e57b 100644 --- a/goal_src/jak3/dgos/tema.gd +++ b/goal_src/jak3/dgos/tema.gd @@ -1,5 +1,5 @@ ("TEMA.DGO" - ("jak-pole+0-ag.o" + ("jak-pole+0-ag.go" "battle.o" "hover-formation-h.o" "hover-nav-control-h.o" @@ -57,5 +57,5 @@ "shield-sphere-distort-ag.go" "tpl-oracle-eye-ag.go" "shield-sphere-ag.go" - "templea-vis.o" + "templea-vis.go" )) diff --git a/goal_src/jak3/dgos/temb.gd b/goal_src/jak3/dgos/temb.gd index e779224584..89b81242d3 100644 --- a/goal_src/jak3/dgos/temb.gd +++ b/goal_src/jak3/dgos/temb.gd @@ -1,5 +1,5 @@ ("TEMB.DGO" - ("tpage-2617.o" + ("tpage-2617.go" "tpage-2628.go" "tpage-2625.go" "tpl-break-alcove-ag.go" @@ -13,5 +13,5 @@ "tpl-spindle-ag.go" "tpl-elec-swing-pole-ag.go" "tpl-oracle-eye-ag.go" - "templeb-vis.o" + "templeb-vis.go" )) diff --git a/goal_src/jak3/dgos/temc.gd b/goal_src/jak3/dgos/temc.gd index de32e08837..7810d65116 100644 --- a/goal_src/jak3/dgos/temc.gd +++ b/goal_src/jak3/dgos/temc.gd @@ -1,5 +1,5 @@ ("TEMC.DGO" - ("tpage-2620.o" + ("tpage-2620.go" "tpage-2706.go" "tpage-2626.go" "tpage-2627.go" @@ -7,5 +7,5 @@ "tpage-3041.go" "tpl-symbol-ag.go" "tpl-banner-b-ag.go" - "templec-vis.o" + "templec-vis.go" )) diff --git a/goal_src/jak3/dgos/temd.gd b/goal_src/jak3/dgos/temd.gd index ab06dc398f..3061a807ce 100644 --- a/goal_src/jak3/dgos/temd.gd +++ b/goal_src/jak3/dgos/temd.gd @@ -12,5 +12,5 @@ "light-eco-vent-ag.go" "tpl-elevator-ag.go" "tpl-bridge-debris-ag.go" - "templed-vis.o" + "templed-vis.go" )) diff --git a/goal_src/jak3/dgos/temp.gd b/goal_src/jak3/dgos/temp.gd index 829c376c2a..ceffeec6aa 100644 --- a/goal_src/jak3/dgos/temp.gd +++ b/goal_src/jak3/dgos/temp.gd @@ -1,5 +1,5 @@ ("TEMP.DGO" - ("tpage-3228.o" + ("tpage-3228.go" "precursor-ship-ag.go" - "temp.o" + "temp.go" )) diff --git a/goal_src/jak3/dgos/templee.gd b/goal_src/jak3/dgos/templee.gd index 81a56fff31..e26d9ff072 100644 --- a/goal_src/jak3/dgos/templee.gd +++ b/goal_src/jak3/dgos/templee.gd @@ -1,6 +1,6 @@ ("TEMPLEE.DGO" - ("tpage-2909.o" + ("tpage-2909.go" "veger-highres-ag.go" "seem-highres-ag.go" - "templee.o" + "templee.go" )) diff --git a/goal_src/jak3/dgos/temx.gd b/goal_src/jak3/dgos/temx.gd index 744a47909a..2ea19af5ff 100644 --- a/goal_src/jak3/dgos/temx.gd +++ b/goal_src/jak3/dgos/temx.gd @@ -11,5 +11,5 @@ "tpage-2169.go" "tpl-stone-break-ag.go" "tpl-inner-airlock-door-ag.go" - "templex-vis.o" + "templex-vis.go" )) diff --git a/goal_src/jak3/dgos/title.gd b/goal_src/jak3/dgos/title.gd index b89dd7c4bb..268287ddd6 100644 --- a/goal_src/jak3/dgos/title.gd +++ b/goal_src/jak3/dgos/title.gd @@ -1,16 +1,16 @@ ("TITLE.DGO" ("desert-dust-storm.o" - "0credits-tx.o" - "1credits-tx.o" - "2credits-tx.o" - "3credits-tx.o" - "4credits-tx.o" - "5credits-tx.o" - "6credits-tx.o" - "7credits-tx.o" - "8credits-tx.o" - "9credits-tx.o" - "10credits-tx.o" + "0credits-tx.go" + "1credits-tx.go" + "2credits-tx.go" + "3credits-tx.go" + "4credits-tx.go" + "5credits-tx.go" + "6credits-tx.go" + "7credits-tx.go" + "8credits-tx.go" + "9credits-tx.go" + "10credits-tx.go" "credits-h.o" "credits.o" "title-obs.o" @@ -18,5 +18,5 @@ "tpage-1854.go" "tpage-1324.go" "jakthreelogo-ag.go" - "title.o" + "title.go" )) diff --git a/goal_src/jak3/dgos/towb.gd b/goal_src/jak3/dgos/towb.gd index f8d697f58e..ffcbea7fb0 100644 --- a/goal_src/jak3/dgos/towb.gd +++ b/goal_src/jak3/dgos/towb.gd @@ -1,5 +1,5 @@ ("TOWB.DGO" - ("tpage-2650.o" + ("tpage-2650.go" "tpage-2948.go" "tpage-2652.go" "tpage-2651.go" @@ -10,5 +10,5 @@ "tow-energy-bridge-ag.go" "tow-tentacle-ag.go" "neo-debris-ag.go" - "towerb-vis.o" + "towerb-vis.go" )) diff --git a/goal_src/jak3/dgos/towera.gd b/goal_src/jak3/dgos/towera.gd index 20fbcf1c2e..a8f36ed11f 100644 --- a/goal_src/jak3/dgos/towera.gd +++ b/goal_src/jak3/dgos/towera.gd @@ -27,5 +27,5 @@ "neo-debris-ag.go" "shield-sphere-distort-ag.go" "shield-sphere-ag.go" - "towera.o" + "towera.go" )) diff --git a/goal_src/jak3/dgos/towerc.gd b/goal_src/jak3/dgos/towerc.gd index d05f1166b4..1bfecd467d 100644 --- a/goal_src/jak3/dgos/towerc.gd +++ b/goal_src/jak3/dgos/towerc.gd @@ -1,7 +1,7 @@ ("TOWERC.DGO" - ("tpage-2299.o" + ("tpage-2299.go" "tpage-2302.go" "daxter-highres-ag.go" "tow-break-ag.go" - "towerc.o" + "towerc.go" )) diff --git a/goal_src/jak3/dgos/towercst.gd b/goal_src/jak3/dgos/towercst.gd index 62bb7ce9e6..45c113efdf 100644 --- a/goal_src/jak3/dgos/towercst.gd +++ b/goal_src/jak3/dgos/towercst.gd @@ -1,5 +1,5 @@ ("TOWERCST.DGO" - ("tpage-3223.o" + ("tpage-3223.go" "tpage-2983.go" "tpage-3224.go" "tpage-3225.go" @@ -16,5 +16,5 @@ "tow-spawner-ag.go" "particleman-ag.go" "purple-three-ag.go" - "towercst.o" + "towercst.go" )) diff --git a/goal_src/jak3/dgos/vin.gd b/goal_src/jak3/dgos/vin.gd index 709700c235..5e145bc940 100644 --- a/goal_src/jak3/dgos/vin.gd +++ b/goal_src/jak3/dgos/vin.gd @@ -10,5 +10,5 @@ "warp-gate-ag.go" "vin-turbine-ag.go" "vin-door-ctyinda-ag.go" - "vinroom-vis.o" + "vinroom-vis.go" )) diff --git a/goal_src/jak3/dgos/voca.gd b/goal_src/jak3/dgos/voca.gd index d76754d2fb..dfd000b9c3 100644 --- a/goal_src/jak3/dgos/voca.gd +++ b/goal_src/jak3/dgos/voca.gd @@ -52,5 +52,5 @@ "vol-rising-step-c-ag.go" "vol-bouncer-ag.go" "vol-stone-lid-ag.go" - "volcanoa-vis.o" + "volcanoa-vis.go" )) diff --git a/goal_src/jak3/dgos/vocx.gd b/goal_src/jak3/dgos/vocx.gd index 4689808f82..35b85c93eb 100644 --- a/goal_src/jak3/dgos/vocx.gd +++ b/goal_src/jak3/dgos/vocx.gd @@ -26,5 +26,5 @@ "urn-c-ag.go" "urn-a-ag.go" "particleman-ag.go" - "volcanox.o" + "volcanox.go" )) diff --git a/goal_src/jak3/dgos/warpcast.gd b/goal_src/jak3/dgos/warpcast.gd index 15c9060f93..53135f9293 100644 --- a/goal_src/jak3/dgos/warpcast.gd +++ b/goal_src/jak3/dgos/warpcast.gd @@ -1,7 +1,7 @@ ("WARPCAST.DGO" - ("tpage-2270.o" + ("tpage-2270.go" "daxter-highres-ag.go" "jakc-highres-ag.go" "particleman-ag.go" - "warpcast.o" + "warpcast.go" )) diff --git a/goal_src/jak3/dgos/wasall.gd b/goal_src/jak3/dgos/wasall.gd index 4069e1114f..7b659b6326 100644 --- a/goal_src/jak3/dgos/wasall.gd +++ b/goal_src/jak3/dgos/wasall.gd @@ -58,5 +58,5 @@ "toad-ag.go" "rhino-ag.go" "vehicle-explosion-ag.go" - "wasall.o" + "wasall.go" )) diff --git a/goal_src/jak3/dgos/wascast.gd b/goal_src/jak3/dgos/wascast.gd index 02358e74e6..451b39c9cc 100644 --- a/goal_src/jak3/dgos/wascast.gd +++ b/goal_src/jak3/dgos/wascast.gd @@ -1,5 +1,5 @@ ("WASCAST.DGO" - ("tpage-1714.o" + ("tpage-1714.go" "tpage-2323.go" "daxter-highres-ag.go" "jakc-highres-ag.go" @@ -9,5 +9,5 @@ "eco-crystal-light-ag.go" "battle-amulet-ag.go" "particleman-ag.go" - "wascast.o" + "wascast.go" )) diff --git a/goal_src/jak3/dgos/waschase.gd b/goal_src/jak3/dgos/waschase.gd index d1dd00b355..77f72d9d4b 100644 --- a/goal_src/jak3/dgos/waschase.gd +++ b/goal_src/jak3/dgos/waschase.gd @@ -1,8 +1,8 @@ ("WASCHASE.DGO" - ("jak-kanga+0-ag.o" + ("jak-kanga+0-ag.go" "kanga-lizard.o" "tpage-1321.go" "tpage-1356.go" "kanga-lizard-ag.go" - "waschase.o" + "waschase.go" )) diff --git a/goal_src/jak3/dgos/wasdefen.gd b/goal_src/jak3/dgos/wasdefen.gd index a45091865f..02e5f52b85 100644 --- a/goal_src/jak3/dgos/wasdefen.gd +++ b/goal_src/jak3/dgos/wasdefen.gd @@ -1,8 +1,8 @@ ("WASDEFEN.DGO" - ("tpage-2527.o" + ("tpage-2527.go" "tpage-2224.go" "dm-robot-ag.go" "dm-missile-ag.go" "dm-debris-ag.go" - "wasdefen.o" + "wasdefen.go" )) diff --git a/goal_src/jak3/dgos/wasleapr.gd b/goal_src/jak3/dgos/wasleapr.gd index 4b37359be2..cc497f4920 100644 --- a/goal_src/jak3/dgos/wasleapr.gd +++ b/goal_src/jak3/dgos/wasleapr.gd @@ -15,5 +15,5 @@ "tpage-1707.go" "monk-ag.go" "flut-wild-ag.go" - "wasleapr.o" + "wasleapr.go" )) diff --git a/goal_src/jak3/dgos/waspala.gd b/goal_src/jak3/dgos/waspala.gd index 994cc4489b..647c6e6d9d 100644 --- a/goal_src/jak3/dgos/waspala.gd +++ b/goal_src/jak3/dgos/waspala.gd @@ -22,5 +22,5 @@ "urn-a-ag.go" "particleman-ag.go" "waspala-blocker-ag.go" - "waspala.o" + "waspala.go" )) diff --git a/goal_src/jak3/dgos/waspgame.gd b/goal_src/jak3/dgos/waspgame.gd index daeff40bc9..8d9298e3f5 100644 --- a/goal_src/jak3/dgos/waspgame.gd +++ b/goal_src/jak3/dgos/waspgame.gd @@ -6,5 +6,5 @@ "neo-satellite-fma-ag.go" "neo-satellite-game-ring-ag.go" "neo-satellite-ps-symbols-ag.go" - "waspgame.o" + "waspgame.go" )) diff --git a/goal_src/jak3/dgos/wasseem.gd b/goal_src/jak3/dgos/wasseem.gd index 83d2407e1e..bd1bcfc99c 100644 --- a/goal_src/jak3/dgos/wasseem.gd +++ b/goal_src/jak3/dgos/wasseem.gd @@ -1,5 +1,5 @@ ("WASSEEM.DGO" - ("tpage-1211.o" + ("tpage-1211.go" "tpage-1533.go" "tpage-1468.go" "tpage-1975.go" @@ -10,5 +10,5 @@ "neo-satellite-break-ag.go" "eco-crystal-dark-ag.go" "particleman-ag.go" - "wasseem.o" + "wasseem.go" )) diff --git a/goal_src/jak3/dgos/wasstada.gd b/goal_src/jak3/dgos/wasstada.gd index 5b51c04f89..a7e0d82534 100644 --- a/goal_src/jak3/dgos/wasstada.gd +++ b/goal_src/jak3/dgos/wasstada.gd @@ -17,5 +17,5 @@ "wstd-blocker-ag.go" "wstd-square-plat-b-ag.go" "wstd-square-plat-c-ag.go" - "wasstada.o" + "wasstada.go" )) diff --git a/goal_src/jak3/dgos/wasstadb.gd b/goal_src/jak3/dgos/wasstadb.gd index d1fc241cd6..bf47c14fd6 100644 --- a/goal_src/jak3/dgos/wasstadb.gd +++ b/goal_src/jak3/dgos/wasstadb.gd @@ -10,5 +10,5 @@ "wstd-trapdoor-ag.go" "wstd-flag-ag.go" "arena-token-ag.go" - "wasstadb.o" + "wasstadb.go" )) diff --git a/goal_src/jak3/dgos/wasstadc.gd b/goal_src/jak3/dgos/wasstadc.gd index 2bdce63b30..303b58ace7 100644 --- a/goal_src/jak3/dgos/wasstadc.gd +++ b/goal_src/jak3/dgos/wasstadc.gd @@ -18,5 +18,5 @@ "wstd-fight-plat-box-ag.go" "pre-artifact-b-ag.go" "pre-artifact-c-ag.go" - "wasstadc.o" + "wasstadc.go" )) diff --git a/goal_src/jak3/dgos/wca.gd b/goal_src/jak3/dgos/wca.gd index de4a8f5d47..dbffeeee89 100644 --- a/goal_src/jak3/dgos/wca.gd +++ b/goal_src/jak3/dgos/wca.gd @@ -22,5 +22,5 @@ "wascity-stad-door-ag.go" "market-basket-b-ag.go" "market-basket-a-ag.go" - "wascitya-vis.o" + "wascitya-vis.go" )) diff --git a/goal_src/jak3/dgos/wcaseem.gd b/goal_src/jak3/dgos/wcaseem.gd index ca8eebdb35..231b792f60 100644 --- a/goal_src/jak3/dgos/wcaseem.gd +++ b/goal_src/jak3/dgos/wcaseem.gd @@ -1,5 +1,5 @@ ("WCASEEM.DGO" - ("tpage-1812.o" + ("tpage-1812.go" "seem-highres-ag.go" - "wcaseem.o" + "wcaseem.go" )) diff --git a/goal_src/jak3/dgos/wcb.gd b/goal_src/jak3/dgos/wcb.gd index 2e42fdd66e..7aa7147fa9 100644 --- a/goal_src/jak3/dgos/wcb.gd +++ b/goal_src/jak3/dgos/wcb.gd @@ -36,5 +36,5 @@ "market-basket-a-ag.go" "wascity-awning-b-ag.go" "cty-fruit-stand-ag.go" - "wascityb-vis.o" + "wascityb-vis.go" )) diff --git a/goal_src/jak3/dgos/win.gd b/goal_src/jak3/dgos/win.gd index 4906e7a38c..f48d6d60ee 100644 --- a/goal_src/jak3/dgos/win.gd +++ b/goal_src/jak3/dgos/win.gd @@ -18,5 +18,5 @@ "tpage-1037.go" "des-cactus-b-ag.go" "des-cactus-a-ag.go" - "wasintro-vis.o" + "wasintro-vis.go" )) diff --git a/goal_src/jak3/dgos/wsd.gd b/goal_src/jak3/dgos/wsd.gd index 26927e803c..4464215e19 100644 --- a/goal_src/jak3/dgos/wsd.gd +++ b/goal_src/jak3/dgos/wsd.gd @@ -11,5 +11,5 @@ "interceptor-wheel-fma-ag.go" "wascity-airlock-small-ag.go" "particleman-ag.go" - "wasdoors-vis.o" + "wasdoors-vis.go" )) diff --git a/goal_src/jak3/dgos/wwd.gd b/goal_src/jak3/dgos/wwd.gd index 8b8949d92e..e23cec22d8 100644 --- a/goal_src/jak3/dgos/wwd.gd +++ b/goal_src/jak3/dgos/wwd.gd @@ -64,5 +64,5 @@ "wascity-flag-c-ag.go" "wascity-flag-a-ag.go" "wascity-wind-fan-ag.go" - "waswide-vis.o" + "waswide-vis.go" )) diff --git a/goal_src/jak3/engine/ai/enemy-h.gc b/goal_src/jak3/engine/ai/enemy-h.gc index bb711d1ac3..75881f6c25 100644 --- a/goal_src/jak3/engine/ai/enemy-h.gc +++ b/goal_src/jak3/engine/ai/enemy-h.gc @@ -5,5 +5,464 @@ ;; name in dgo: enemy-h ;; dgos: GAME +;; +++enemy-aware +(defenum enemy-aware + :type uint64 + (ea0 0) + (ea1 1) + (ea2 2) + (ea3 3) + (ea4 4) + ) +;; ---enemy-aware + + +;; +++enemy-flag +(defenum enemy-flag + :type uint64 + :bitfield #t + (look-at-focus 0) + (look-at-move-dest 1) + (vulnerable 2) + (vulnerable-backup 3) + (dangerous-backup 4) + (notice 5) + (alert 6) + (auto-reset-penetrate 7) + (victory 8) + (cam-attack-mode 9) + (use-notice-distance 10) + (attackable 11) + (attackable-backup 12) + (actor-pause-backup 13) + (enable-on-notice 14) + (enable-on-active 15) + (enable-on-hostile 16) + (dislike-combo 17) + (directed 18) + (directed-ready 19) + (chase-startup 20) + (lock-focus 21) + (multi-focus 22) + (use-trigger 23) + (trackable 24) + (trackable-backup 25) + (spawn-gem 26) + (check-water 27) + (check-water-backup 28) + (checking-water 29) + (drawn-mirrored 30) + (called-dying 31) + (no-initial-move-to-ground 32) + (jump-check-blocked 33) + (death-start 34) + (auto-death-phase-out 35) + (has-gem 36) + (ef37 37) + (ef38 38) + (ef39 39) + (ef40 40) + (ef41 41) + (ef42 42) + (ef43 43) + (ef44 44) + ) +;; ---enemy-flag + + +;; +++enemy-jump-flags +(defenum enemy-jump-flags + :bitfield #t + :type uint8 + (ejf0 0) + (ejf1 1) + (ejf2 2) + (ejf3 3) + (ejf4 4) + (ejf5 5) + (ejf6 6) + (ejf7 7) + ) +;; ---enemy-jump-flags + + +(declare-type enemy process-focusable) +(define-extern *shockwave-knock-scalar* curve2d-fast) + ;; DECOMP BEGINS +(deftype enemy-focus (focus) + ((aware enemy-aware) + (flags enemy-flag) + ) + (:methods + (try-update-focus (_type_ process-focusable enemy) symbol :replace) + (enemy-focus-method-13 (_type_ process-focusable enemy-aware) symbol) + ) + ) + + +(deftype enemy-info (basic) + ((fact-defaults fact-info-enemy-defaults) + (use-die-falling symbol) + (use-victory symbol) + (use-jump-blocked symbol) + (debug-draw-neck symbol) + (jump-debug-draw symbol) + (move-to-ground symbol) + (hover-if-no-ground symbol) + (idle-anim-script (inline-array idle-control-frame)) + (idle-anim int32) + (notice-anim int32) + (hostile-anim int32) + (hit-anim int32) + (knocked-anim int32) + (knocked-land-anim int32) + (die-anim int32) + (die-falling-anim int32) + (victory-anim int32) + (jump-wind-up-anim int32) + (jump-in-air-anim int32) + (jump-land-anim int32) + (neck-joint int32) + (look-at-joint int32) + (bullseye-joint int32) + (sound-hit sound-name) + (sound-die sound-name) + (notice-distance meters) + (notice-distance-delta meters) + (proximity-notice-distance meters) + (default-hit-points float) + (gnd-collide-with collide-spec) + (overlaps-others-collide-with-filter collide-spec) + (penetrate-flinch penetrate) + (penetrate-knocked penetrate) + (movement-gravity meters) + (friction float) + (slip-factor float) + (attack-shove-back meters) + (attack-shove-up meters) + (attack-mode symbol) + (attack-damage int32) + (recover-gnd-collide-with collide-spec) + (knocked-can-land-timeout time-frame) + (knocked-recover-timeout time-frame) + (ragdoll-blend-out-time time-frame) + (ragdoll-rotate-velocity-mult float) + (jump-height-min meters) + (jump-height-factor float) + (knocked-seek-ry-clamp float) + (knocked-soft-vxz-lo float) + (knocked-soft-vxz-hi float) + (knocked-soft-vy-lo float) + (knocked-soft-vy-hi float) + (knocked-medium-vxz-lo float) + (knocked-medium-vxz-hi float) + (knocked-medium-vy-lo float) + (knocked-medium-vy-hi float) + (knocked-hard-vxz-lo float) + (knocked-hard-vxz-hi float) + (knocked-hard-vy-lo float) + (knocked-hard-vy-hi float) + (knocked-huge-vxz-lo float) + (knocked-huge-vxz-hi float) + (knocked-huge-vy-lo float) + (knocked-huge-vy-hi float) + (knocked-yellow-vxz-lo float) + (knocked-yellow-vxz-hi float) + (knocked-yellow-vy-lo float) + (knocked-yellow-vy-hi float) + (knocked-red-vxz-lo float) + (knocked-red-vxz-hi float) + (knocked-red-vy-lo float) + (knocked-red-vy-hi float) + (knocked-blue-vxz-lo float) + (knocked-blue-vxz-hi float) + (knocked-blue-vy-lo float) + (knocked-blue-vy-hi float) + (ragdoll-info ragdoll-setup) + (shadow-size meters) + (shadow-max-y meters) + (shadow-min-y meters) + (shadow-locus-dist meters) + (gem-joint int32) + (gem-seg uint32) + (gem-no-seg uint32) + (gem-offset sphere :inline) + (knocked-off symbol) + ) + (:methods + (copy-enemy-info! (_type_ _type_) none) + ) + ) + + +(deftype enemy-knocked-info (structure) + ((anim-speed float) + (on-surface-count int32) + (move-count int32) + (land-can-land-time time-frame) + ) + ) + + +(deftype enemy-jump-info (structure) + ((flags enemy-jump-flags) + (anim-speed float) + (hang-time time-frame) + (start-pos vector :inline) + (dest-pos vector :inline) + (traj trajectory :inline) + ) + ) + + +(deftype enemy-init-by-other-params (structure) + ((trans vector :inline) + (quat quaternion :inline) + (entity entity) + (directed? symbol) + (no-initial-move-to-ground? symbol) + (art-level symbol) + ) + ) + + +(deftype enemy-attack-info (structure) + ((attack-id uint32) + (knocked-type knocked-type) + (blue-juggle-count uint8) + (attacker-handle handle) + (attack-time time-frame) + (penetrate-using penetrate) + (attacker-pos vector :inline) + (attack-direction vector :inline) + (attack-position vector :inline) + (intensity float) + ) + ) + + +(deftype enemy-best-focus (structure) + ((proc process) + (rating float) + (aware enemy-aware) + ) + ) + + +(deftype enemy (process-focusable) + ((fact fact-info-enemy :override) + (root collide-shape-moving :override) + (enemy-flags enemy-flag) + (enemy-info enemy-info) + (hit-points float) + (gnd-collide-with collide-spec) + (attack-id uint32) + (persistent-attack-id uint32) + (water-max-height float) + (water-surface-height float) + (desired-angle degrees) + (jump-why uint64) + (penetrated-by-all penetrate) + (penetrate-flinch penetrate) + (penetrate-knocked penetrate) + (ragdoll-proc handle) + (reaction-time time-frame) + (notice-time time-frame) + (state-timeout time-frame) + (auto-reset-penetrate-time time-frame) + (hit-focus-time time-frame) + (last-draw-time time-frame) + (starting-time time-frame) + (fated-time time-frame) + (focus-pos vector :inline) + (event-param-point vector :inline) + (jump-dest vector :inline :overlay-at event-param-point) + (focus enemy-focus :inline) + (incoming enemy-attack-info :inline) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (neck joint-mod) + (on-notice pair) + (on-active pair) + (on-hostile pair) + (on-death pair) + (idle-anim-player idle-control :inline) + (rand-gen symbol) + ) + (:state-methods + dormant + dormant-aware + hit + knocked + knocked-recover + idle + active + notice + flee + stare + hostile + victory + die + die-falling + die-fast + directed + jump + jump-blocked + ambush-delay + ambush + view-anims + gun-dark-2-stretch + ) + (:methods + (enemy-method-50 (_type_ int) none) + (accelerate-fall! (_type_ vector) float) + (damage-enemy! (_type_ object event-message-block) float) + (reset-penetrate! (_type_) none) + (get-knockback-dir! (_type_ vector) vector) + (get-knockback-angle (_type_) degrees) + (knocked-handler (_type_ vector) object) + (can-collide-with-focus? (_type_ process-focusable) object) + (check-water (_type_) object) + (enemy-common-post (_type_) none) + (lerp-damage (_type_ float) float) + (scale-impact-vel-y! (_type_ vector vector float) vector) + (get-damage-from-attack (_type_ object event-message-block) float) + (enemy-method-63 (_type_ float) float) + (update-awareness! (_type_ process-focusable enemy-best-focus) enemy-aware) + (penetrate->next-state (_type_) symbol) + (get-penetrated-by (_type_) penetrate) + (coin-flip? (_type_) symbol) + (get-enemy-aware (_type_ enemy-aware) enemy-aware) + (enemy-method-69 (_type_) none) + (enemy-method-70 (_type_ process-focusable enemy-aware) none) + (go-dormant (_type_) object) + (go-dormant-aware (_type_) object) + (go-idle (_type_) object) + (go-ambush-delay (_type_) object) + (go-stare (_type_) object) + (go-stare2 (_type_) object) + (go-directed (_type_) object) + (go-hostile (_type_) object) + (go-flee (_type_) object) + (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) 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) + (enemy-method-88 (_type_ enemy-knocked-info) symbol) + (within-gspot-range? (_type_) symbol) + (enemy-method-90 (_type_ ragdoll-proc) none) + (enemy-method-91 (_type_ enemy-jump-info) object) + (init-jump-info! (_type_ enemy-jump-info) none) + (setup-jump! (_type_ enemy-jump-info) none) + (move-to-gspot! (_type_) float) + (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) + (jump-anim-handler (_type_ int enemy-jump-info) symbol) + (in-jump-handler (_type_ int enemy-jump-info) none) + (enemy-method-101 (_type_ int enemy-jump-info) none) + (go-directed2 (_type_) object) + (enemy-method-103 (_type_ vector float) symbol) + (enemy-method-104 (_type_ vector float) symbol) + (enemy-method-105 (_type_ float symbol) symbol) + (find-best-focus (_type_) process) + (is-pfoc-in-mesh? (_type_ process-focusable vector) symbol) + (enemy-method-108 (_type_ process-focusable) symbol) + (enemy-method-109 (_type_) symbol) + (send-attack (_type_ process touching-shapes-entry uint) symbol) + (on-attack (_type_ process-focusable) none) + (get-incoming-attack! (_type_ process-drawable event-message-block penetrate attack-info touching-shapes-entry) none) + (get-focus! (_type_) process-focusable) + (send-attack-to-all-tshapes (_type_ process-focusable event-message-block) int) + (set-look-at-mode! (_type_ int) none) + (stop-look-at! (_type_) none) + (apply-friction (_type_) none) + (init-enemy-info! (_type_ enemy-info) none) + (init-enemy-defaults! (_type_ enemy-info) none) + (init-enemy-collision! (_type_) none) + (init-enemy! (_type_) none) + (go-idle2 (_type_) object) + (enemy-method-123 (_type_) symbol) + (disable-ragdoll (_type_) none) + (ragdoll-settled? (_type_) object) + (ragdoll-spawn! (_type_ symbol symbol) vector) + (deactivate-ragdoll! (_type_) none) + (rnd-float (_type_) float) + (rnd-float-range (_type_ float float) float) + (rnd-int (_type_ int) int) + (enemy-method-131 (_type_ int int) int) + (set-reaction-time! (_type_ time-frame time-frame) time-frame) + (rnd-chance? (_type_ float) symbol) + (enemy-method-134 (_type_ float) symbol) + (enemy-method-135 (_type_) none) + (set-ground-pat! (_type_ collide-query collide-spec float float float process) pat-surface) + (enemy-above-ground? (_type_ collide-query vector collide-spec float float float) symbol) + (try-locate-ground (_type_ meters meters symbol collide-spec) symbol) + (move-above-ground! (_type_ vector move-above-ground-params) none) + (update-focus (_type_) process) + (enemy-method-141 (_type_ float) symbol) + (penetrate->knocked-type (_type_ penetrate) knocked-type) + (on-dying (_type_) none) + (falling? (_type_) symbol) + (find-offending-pfoc (_type_ process attack-info) process-focusable) + (play-damage-sound (_type_ int) sound-id) + (check-victory (_type_) none) + (go-gun-dark-2-stretch (_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) + (get-gem-pool-idx (_type_) int) + (mark-as-dead (_type_) none) + ) + ) + + +(deftype anim-info (structure) + ((anim-index int32) + (travel-speed meters) + ) + ) + + +(defmethod try-update-focus ((this enemy-focus) (arg0 process-focusable) (arg1 enemy)) + (let* ((t9-0 (method-of-type focus try-update-focus)) + (s3-0 (t9-0 this arg0)) + ) + (when (not s3-0) + (logclear! (-> this flags) (enemy-flag look-at-focus)) + (set! (-> this aware) (get-enemy-aware arg1 (update-awareness! arg1 arg0 (the-as enemy-best-focus #f)))) + ) + s3-0 + ) + ) + +(defmethod enemy-focus-method-13 ((this enemy-focus) (arg0 process-focusable) (arg1 enemy-aware)) + (let* ((t9-0 (method-of-type focus try-update-focus)) + (v0-0 (t9-0 this arg0)) + ) + (set! (-> this aware) arg1) + (if (not v0-0) + (logclear! (-> this flags) (enemy-flag look-at-focus)) + ) + v0-0 + ) + ) + +;; WARN: Return type mismatch enemy-flag vs none. +(defmethod clear-focused ((this enemy-focus)) + "Reset the focus' handle." + (let ((t9-0 (method-of-type focus clear-focused))) + (t9-0 this) + ) + (set! (-> this aware) (enemy-aware ea0)) + (logclear! (-> this flags) (enemy-flag look-at-focus)) + (none) + ) diff --git a/goal_src/jak3/engine/ai/enemy.gc b/goal_src/jak3/engine/ai/enemy.gc index 17de2eebbc..2878e6f721 100644 --- a/goal_src/jak3/engine/ai/enemy.gc +++ b/goal_src/jak3/engine/ai/enemy.gc @@ -7,3 +7,2967 @@ ;; DECOMP BEGINS +(defmethod copy-enemy-info! ((this enemy-info) (arg0 enemy-info)) + (mem-copy! (&-> this type) (&-> arg0 type) 420) + 0 + (none) + ) + +(define *enemy-dummy-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 4096.0) + :top-plane (new 'static 'plane :y 1.0 :w -4096.0) + ) + ) + ) + +(defmethod relocate ((this enemy) (offset int)) + (if (nonzero? (-> this neck)) + (&+! (-> this neck) offset) + ) + (call-parent-method this offset) + ) + +(defmethod rnd-float ((this enemy)) + (rand-vu) + ) + +(defmethod rnd-float-range ((this enemy) (arg0 float) (arg1 float)) + (+ arg0 (* (rand-vu) (- arg1 arg0))) + ) + +(defmethod rnd-int ((this enemy) (arg0 int)) + (the int (* (rand-vu) (the float arg0))) + ) + +(defmethod set-reaction-time! ((this enemy) (arg0 time-frame) (arg1 time-frame)) + (+ arg0 (the int (* (rand-vu) (the float (+ (- 1 arg0) arg1))))) + ) + +(defmethod rnd-chance? ((this enemy) (arg0 float)) + (>= arg0 (rand-vu)) + ) + +;; WARN: new jak 2 until loop case, check carefully +(defmethod enemy-method-131 ((this enemy) (arg0 int) (arg1 int)) + (let ((v1-0 0) + (s5-0 0) + ) + (let ((a2-1 1)) + (while (nonzero? arg0) + (+! arg0 -1) + (if (not (logtest? arg1 a2-1)) + (+! v1-0 1) + ) + (set! a2-1 (* a2-1 2)) + ) + ) + (when (> v1-0 0) + (let ((v1-1 (rnd-int this v1-0)) + (a0-1 1) + ) + (until #f + (while (logtest? arg1 a0-1) + (nop!) + (nop!) + (+! s5-0 1) + (set! a0-1 (* a0-1 2)) + ) + (if (zero? v1-1) + (goto cfg-14) + ) + (+! v1-1 -1) + (+! s5-0 1) + (set! a0-1 (* a0-1 2)) + ) + ) + #f + ) + (label cfg-14) + s5-0 + ) + ) + +(defmethod enemy-method-134 ((this enemy) (arg0 float)) + (let* ((v1-5 (-> *display* frames (-> *display* last-screen) run-time)) + (f1-2 (fmax 0.0 (fmin 1.0 (* 0.001 (+ -7000.0 (the float v1-5)))))) + ) + (>= (+ arg0 (* f1-2 (- 1.0 arg0))) (rand-vu)) + ) + ) + +(defmethod coin-flip? ((this enemy)) + (zero? (rnd-int this 2)) + ) + +;; WARN: disable def twice: 40. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod run-logic? ((this enemy)) + "Should this process be run? Checked by execute-process-tree." + (cond + ((logtest? (-> this mask) (process-mask actor-pause)) + (let ((gp-0 (-> this draw))) + (or (and (nonzero? gp-0) + (>= (+ (-> *ACTOR-bank* pause-dist) (-> this root pause-adjust-distance)) + (vector-vector-distance (-> this root trans) (camera-pos)) + ) + (or (logtest? (-> gp-0 status) (draw-control-status on-screen)) + (not (and (-> this next-state) (= (-> this next-state name) 'idle))) + ) + ) + (and (nonzero? (-> this skel)) (!= (-> this skel root-channel 0) (-> this skel channel))) + (and (nonzero? gp-0) (logtest? (-> gp-0 status) (draw-control-status uninited))) + ) + ) + ) + (else + #t + ) + ) + ) + +(defmethod can-collide-with-focus? ((this enemy) (arg0 process-focusable)) + (and arg0 (!= this arg0) (collide-spec-match? (-> this focus) arg0)) + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this enemy)) + (let ((v1-0 (-> this enemy-flags)) + (v0-0 0) + ) + (when (and (!= (-> this hit-points) 0.0) + (logtest? (-> this enemy-flags) (enemy-flag vulnerable)) + (logtest? (enemy-flag trackable) (-> this enemy-flags)) + ) + (if (logtest? (process-mask enemy) (-> this mask)) + (set! v0-0 (logior v0-0 16)) + ) + (if (logtest? v1-0 (enemy-flag attackable)) + (set! v0-0 (logior v0-0 8)) + ) + ) + (the-as search-info-flag v0-0) + ) + ) + +(defmethod get-trans ((this enemy) (arg0 int)) + "Get the `trans` for this process." + (let ((s4-0 (-> this root))) + (cond + ((zero? arg0) + (-> s4-0 trans) + ) + ((and (= arg0 1) (type? s4-0 collide-shape-moving)) + (-> s4-0 gspot-pos) + ) + ((= arg0 2) + (vector<-cspace! (new 'static 'vector) (-> this node-list data (-> this enemy-info look-at-joint))) + ) + ((= arg0 3) + (let ((v0-0 (vector<-cspace! (new 'static 'vector) (-> this node-list data (-> this enemy-info bullseye-joint))))) + (set! (-> v0-0 w) (-> this root root-prim prim-core world-sphere w)) + v0-0 + ) + ) + (else + ((method-of-type process-focusable get-trans) this arg0) + ) + ) + ) + ) + +(defmethod get-penetrated-by ((this enemy)) + (penetrated-by-all&hit-points->penetrated-by (-> this penetrated-by-all) (the int (-> this hit-points))) + ) + +;; WARN: Return type mismatch float vs meters. +(defmethod get-water-height ((this enemy)) + (the-as meters (-> this water-surface-height)) + ) + +;; WARN: Return type mismatch enemy-flag vs object. +(defmethod check-water ((this enemy)) + (let ((s4-0 (-> this root))) + (when (>= (-> this water-max-height) (-> s4-0 trans y)) + (let ((s5-0 (new 'stack-no-clear 'water-info))) + (water-info-init! s4-0 s5-0 (collide-action solid semi-solid)) + (let ((s3-0 (-> s5-0 flags))) + (when (logtest? (water-flag touch-water) s3-0) + (set! (-> this water-surface-height) (-> s5-0 trans y)) + (when (not (focus-test? this touch-water under-water)) + (let ((v1-9 (new 'stack-no-clear 'vector))) + (set! (-> v1-9 quad) (-> this root trans quad)) + (set! (-> v1-9 y) (+ 409.6 (-> s5-0 trans y))) + (cond + ((logtest? (-> *part-group-id-table* 192 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-9 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 192)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-9 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 192)) + ) + ) + ) + (cond + ((logtest? s3-0 (water-flag dark-eco)) + (sound-play "eco-splash") + (send-event this 'instant-death) + ) + (else + (play-damage-sound this 2) + ) + ) + ) + (logior! (-> this focus-status) (focus-status touch-water)) + (let* ((v1-46 (-> s4-0 root-prim prim-core)) + (f0-6 (+ (-> v1-46 world-sphere y) (-> v1-46 world-sphere w))) + ) + (if (focus-test? this under-water) + (set! f0-6 (+ -819.2 f0-6)) + ) + (if (< f0-6 (-> s5-0 trans y)) + (logior! (-> this focus-status) (focus-status under-water)) + (logclear! (-> this focus-status) (focus-status under-water)) + ) + ) + (return (the-as object #f)) + ) + ) + ) + ) + ) + (logclear! (-> this focus-status) (focus-status touch-water under-water)) + (let ((v0-11 (logclear (-> this enemy-flags) (enemy-flag checking-water)))) + (set! (-> this enemy-flags) v0-11) + v0-11 + ) + ) + +(defmethod enemy-common-post ((this enemy)) + (if (and (nonzero? (-> this draw)) (logtest? (-> this draw status) (draw-control-status on-screen))) + (set-time! (-> this last-draw-time)) + ) + (update-focus this) + (when *target* + (if *target* + (look-at! + (-> *target* neck) + (the-as vector (-> this root root-prim prim-core)) + (if (logtest? (-> this enemy-flags) (enemy-flag cam-attack-mode)) + 'attacking + ) + this + ) + ) + ) + (when (nonzero? (-> this neck)) + (when (logtest? (-> this enemy-flags) (enemy-flag look-at-focus)) + (let ((a0-7 (handle->process (-> this focus handle)))) + (if a0-7 + (target-set! (-> this neck) (get-trans (the-as process-focusable a0-7) 2)) + ) + ) + ) + ) + (when (and (logtest? (-> this enemy-flags) (enemy-flag auto-reset-penetrate)) + (time-elapsed? (-> this auto-reset-penetrate-time) (seconds 0.1)) + ) + (logclear! (-> this enemy-flags) (enemy-flag auto-reset-penetrate)) + (set! (-> this root penetrated-by) (get-penetrated-by this)) + (let ((v1-43 0)) + (if (logtest? (penetrate knocked) (-> this root penetrate-using)) + (set! v1-43 (logior (shl 2 32) v1-43)) + ) + (set! (-> this root penetrate-using) (the-as penetrate v1-43)) + ) + ) + (if (logtest? (-> this enemy-flags) (enemy-flag victory)) + (check-victory this) + ) + (if (logtest? (enemy-flag check-water checking-water) (-> this enemy-flags)) + (check-water this) + ) + (if (and *debug-segment* (-> this enemy-info debug-draw-neck) (nonzero? (-> this neck))) + (joint-mod-debug-draw (-> this neck)) + ) + (ja-post) + 0 + (none) + ) + +;; WARN: Return type mismatch enemy-flag vs none. +(defmethod check-victory ((this enemy)) + (if (or (time-elapsed? (-> this hit-focus-time) (seconds 2)) + (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) + ) + +;; WARN: Return type mismatch int vs penetrate. +(defun get-penetrate-using-from-attack-event ((arg0 process-drawable) (arg1 event-message-block)) + (let ((v1-0 (the-as object (-> arg1 param 1)))) + (if (logtest? (attack-mask penetrate-using) (-> (the-as attack-info v1-0) mask)) + (return (the-as penetrate (-> (the-as attack-info v1-0) penetrate-using))) + ) + ) + (let* ((gp-0 arg0) + (v1-3 (if (type? gp-0 process-drawable) + gp-0 + ) + ) + ) + (when v1-3 + (let* ((gp-1 (-> v1-3 root)) + (v1-4 (if (type? gp-1 collide-shape) + gp-1 + ) + ) + ) + (if v1-4 + (return + (the-as penetrate (logior (-> (the-as collide-shape v1-4) penetrate-using) (penetrate generic-attack))) + ) + ) + ) + ) + ) + (the-as penetrate 2) + ) + +;; WARN: Return type mismatch process vs process-focusable. +(defmethod get-focus! ((this enemy)) + (let ((v0-0 (handle->process (-> this focus handle)))) + (if (and v0-0 + (not (and v0-0 + (not (logtest? (-> (the-as process-focusable v0-0) focus-status) (focus-status disable dead ignore grabbed))) + ) + ) + ) + (set! v0-0 (the-as process #f)) + ) + (the-as process-focusable v0-0) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod enemy-method-70 ((this enemy) (arg0 process-focusable) (arg1 enemy-aware)) + (if arg1 + (enemy-focus-method-13 (-> this focus) arg0 arg1) + (try-update-focus (-> this focus) arg0 this) + ) + (none) + ) + +(defmethod enemy-method-69 ((this enemy)) + (when (not (logtest? (enemy-flag lock-focus) (-> this enemy-flags))) + (let* ((s4-0 (handle->process (-> this incoming attacker-handle))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when (can-collide-with-focus? this (the-as process-focusable s5-0)) + (enemy-method-70 this (the-as process-focusable s5-0) (the-as enemy-aware #f)) + (logior! (-> this focus flags) (enemy-flag look-at-focus)) + ) + ) + ) + 0 + (none) + ) + +(defmethod send-attack-to-all-tshapes ((this enemy) (arg0 process-focusable) (arg1 event-message-block)) + (let ((s4-0 (the-as touching-shapes-entry (-> arg1 param 0)))) + (when (and s4-0 + (and (logtest? (-> this incoming penetrate-using) (penetrate board)) + (not (logtest? (-> this incoming penetrate-using) (penetrate spin))) + ) + (begin + (let ((s3-0 (-> s4-0 head))) + (while s3-0 + (let ((s2-0 (get-touched-prim s3-0 (-> arg0 root) s4-0))) + (get-touched-prim s3-0 (-> this root) s4-0) + (when (logtest? (-> s2-0 prim-core action) (collide-action solid semi-solid deadly)) + (let* ((a0-5 this) + (t9-2 (method-of-object a0-5 send-attack)) + (a1-3 arg0) + (a2-3 s4-0) + (v1-13 *game-info*) + (a3-1 (+ (-> v1-13 attack-id) 1)) + ) + (set! (-> v1-13 attack-id) a3-1) + (if (t9-2 a0-5 a1-3 a2-3 a3-1) + (return 0) + ) + ) + ) + ) + (set! s3-0 (-> s3-0 next)) + ) + ) + #f + ) + ) + ) + ) + 0 + ) + +(defmethod go-dormant ((this enemy)) + (let ((v1-1 (-> this root root-prim))) + (set! (-> v1-1 prim-core collide-as) (collide-spec)) + (set! (-> v1-1 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> this draw status) (draw-control-status no-draw)) + (logior! (-> this focus-status) (focus-status disable)) + (go (method-of-object this dormant)) + ) + +(defmethod go-dormant-aware ((this enemy)) + (let ((v1-1 (-> this root root-prim))) + (set! (-> v1-1 prim-core collide-as) (collide-spec)) + (set! (-> v1-1 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> this draw status) (draw-control-status no-draw)) + (logior! (-> this focus-status) (focus-status disable)) + (go (method-of-object this dormant-aware)) + ) + +(defmethod go-idle ((this enemy)) + (go (method-of-object this idle)) + ) + +(defmethod go-stare ((this enemy)) + (go (method-of-object this stare)) + ) + +(defmethod go-stare2 ((this enemy)) + (go (method-of-object this stare)) + ) + +(defmethod go-hostile ((this enemy)) + (go (method-of-object this hostile)) + ) + +(defmethod have-more-than-10-joints? ((this enemy)) + (and (nonzero? (-> this node-list)) (-> this node-list) (< 10 (-> this node-list length))) + ) + +(defmethod enemy-method-150 ((this enemy)) + #t + ) + +(defmethod go-gun-dark-2-stretch ((this enemy)) + (if (not (and (-> this next-state) (= (-> this next-state name) 'gun-dark-2-stretch))) + (go (method-of-object this gun-dark-2-stretch)) + ) + ) + +(defmethod go-ambush-delay ((this enemy)) + (if (< 0.0 (res-lump-float (-> this entity) 'ambush-delay)) + (go (method-of-object this ambush-delay)) + (go (method-of-object this ambush)) + ) + ) + +(defmethod go-flee ((this enemy)) + (go (method-of-object this flee)) + ) + +(defmethod go-directed ((this enemy)) + (go (method-of-object this directed)) + ) + +(defmethod go-best-state ((this enemy)) + (let ((s5-0 (-> this focus aware))) + (cond + ((and (= s5-0 (enemy-aware ea3)) (get-focus! this)) + (go-hostile this) + ) + ((<= (the-as int s5-0) 0) + (go-idle this) + ) + ((>= 1 (the-as int s5-0)) + (go (method-of-object this active)) + ) + ((= s5-0 (enemy-aware ea4)) + (go-flee this) + ) + (else + (go-stare this) + ) + ) + ) + ) + +(defmethod go-directed2 ((this enemy)) + (if (logtest? (enemy-flag directed) (-> this enemy-flags)) + (go-directed this) + (go-best-state this) + ) + ) + +(defmethod go-die ((this enemy)) + (if (-> this enemy-info use-die-falling) + (go (method-of-object this die-falling)) + (go (method-of-object this die)) + ) + ) + +(defmethod play-damage-sound ((this enemy) (arg0 int)) + (let ((name (static-sound-name ""))) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (set! name (-> this enemy-info sound-hit)) + ) + ((= v1-0 1) + (set! name (-> this enemy-info sound-die)) + ) + ((= v1-0 2) + (sound-play "splash") + ) + ) + ) + (if (nonzero? (the-as uint name)) + (sound-play-by-name (the-as sound-name name) (new-sound-id) 1024 0 0 (sound-group) #t) + ) + ) + ) + +(defmethod enemy-method-103 ((this enemy) (arg0 vector) (arg1 float)) + (let ((s4-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root 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)) + ) + ) + +(defmethod enemy-method-104 ((this enemy) (arg0 vector) (arg1 float)) + (let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg0 (-> this root trans)))) + (enemy-method-103 this v1-1 arg1) + ) + ) + +(defmethod enemy-method-105 ((this enemy) (arg0 float) (arg1 symbol)) + (let ((a0-2 (handle->process (-> this focus handle)))) + (cond + (a0-2 + (let ((s4-1 + (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable a0-2) 0) (-> this root trans)) + ) + ) + (enemy-method-103 this s4-1 arg0) + ) + ) + (else + arg1 + ) + ) + ) + ) + +(defmethod send-attack ((this enemy) (arg0 process) (arg1 touching-shapes-entry) (arg2 uint)) + (let ((a0-1 (-> this enemy-info attack-damage))) + (if (and (logtest? (-> *game-info* secrets) (game-secrets hero-mode)) (= a0-1 1)) + (set! a0-1 2) + ) + (when (send-event + arg0 + 'attack + arg1 + (static-attack-info :mask (vehicle-impulse-factor) ((id arg2) + (damage (the float a0-1)) + (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)) + (knock (if (-> this enemy-info knocked-off) + (knocked-type knocked-off) + (knocked-type none) + ) + ) + ) + ) + ) + (on-attack this (the-as process-focusable arg0)) + #t + ) + ) + ) + +;; WARN: Return type mismatch enemy-flag vs none. +(defmethod on-attack ((this enemy) (arg0 process-focusable)) + (when (logtest? (process-mask target bot) (-> arg0 mask)) + (set! (-> this root penetrated-by) (the-as penetrate -1)) + (reset-penetrate! this) + ) + (let ((s5-0 (if (type? arg0 process-focusable) + arg0 + ) + ) + ) + (when (can-collide-with-focus? this s5-0) + (let ((v1-10 (handle->process (-> this focus handle)))) + (when (or (= s5-0 v1-10) (and (not (logtest? (enemy-flag lock-focus) (-> this enemy-flags))) + (or (not v1-10) (not (logtest? (-> this focus flags) (enemy-flag look-at-focus)))) + ) + ) + (enemy-method-70 this s5-0 (the-as enemy-aware #f)) + (set-time! (-> this hit-focus-time)) + (logior! (-> this enemy-flags) (enemy-flag victory)) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch time-frame vs none. +(defmethod reset-penetrate! ((this enemy)) + (logior! (-> this enemy-flags) (enemy-flag auto-reset-penetrate)) + (set-time! (-> this auto-reset-penetrate-time)) + (none) + ) + +(defmethod get-knockback-dir! ((this enemy) (arg0 vector)) + (set! (-> arg0 quad) (-> this incoming attack-direction quad)) + (let ((v1-1 arg0)) + (when (= (+ (* (-> v1-1 x) (-> v1-1 x)) (* (-> v1-1 z) (-> v1-1 z))) 0.0) + (vector-z-quaternion! arg0 (-> this root quat)) + (vector-negate-in-place! arg0) + ) + ) + (set! (-> arg0 y) 0.0) + (vector-xz-normalize! arg0 1.0) + ) + +;; WARN: Return type mismatch int vs knocked-type. +(defmethod penetrate->knocked-type ((this enemy) (arg0 penetrate)) + (the-as knocked-type (cond + ((logtest? arg0 (penetrate vehicle)) + 7 + ) + ((logtest? (penetrate jak-blue-shot) arg0) + 6 + ) + ((logtest? (penetrate jak-yellow-shot enemy-yellow-shot) arg0) + 4 + ) + ((logtest? (penetrate jak-red-shot) arg0) + 5 + ) + ((logtest? (penetrate dark-bomb dark-smack) arg0) + 3 + ) + ((logtest? (penetrate explode jak-dark-shot enemy-dark-shot) arg0) + 2 + ) + ((logtest? arg0 (penetrate mech-punch)) + 1 + ) + (else + 0 + ) + ) + ) + ) + +(defmethod get-incoming-attack! ((this enemy) + (arg0 process-drawable) + (arg1 event-message-block) + (arg2 penetrate) + (arg3 attack-info) + (arg4 touching-shapes-entry) + ) + (set! (-> this incoming penetrate-using) arg2) + (set! (-> this incoming attack-id) (-> arg3 id)) + (let ((v1-3 (if (logtest? (attack-mask knock) (-> arg3 mask)) + (-> arg3 knock) + (penetrate->knocked-type this arg2) + ) + ) + ) + (set! (-> this incoming knocked-type) v1-3) + (let ((a0-4 (current-time))) + (cond + ((!= v1-3 (knocked-type blue-shot)) + (set! (-> this incoming blue-juggle-count) (the-as uint 0)) + 0 + ) + ((time-elapsed? (-> this incoming attack-time) (seconds 1)) + (set! (-> this incoming blue-juggle-count) (the-as uint 1)) + ) + (else + (+! (-> this incoming blue-juggle-count) 1) + ) + ) + (set! (-> this incoming attack-time) a0-4) + ) + (cond + ((= v1-3 (knocked-type vehicle)) + (set! (-> this incoming attack-direction quad) (-> arg3 vector quad)) + ) + (else + (let ((s2-0 (new 'stack-no-clear 'attack-info))) + (attack-info-method-9 arg3 s2-0 arg0 this) + (set! (-> this incoming attacker-pos quad) (-> s2-0 intersection quad)) + (set! (-> this incoming attack-direction quad) (-> s2-0 attacker-velocity quad)) + ) + ) + ) + ) + (set! (-> this incoming intensity) (-> arg3 control)) + (set! (-> this incoming attacker-handle) (process->handle (find-offending-pfoc this arg0 arg3))) + (cond + (arg4 + (let ((a1-12 (-> arg4 head))) + (get-intersect-point (-> this incoming attack-position) a1-12 (-> this root) arg4) + ) + ) + (else + (vector-! (-> this incoming attack-position) (-> this root trans) (-> this incoming attack-direction)) + ) + ) + 0 + (none) + ) + +(defmethod set-look-at-mode! ((this enemy) (arg0 int)) + (case arg0 + ((1) + (logclear! (-> this enemy-flags) (enemy-flag look-at-move-dest)) + (logior! (-> this enemy-flags) (enemy-flag look-at-focus)) + ) + ((2) + (logclear! (-> this enemy-flags) (enemy-flag look-at-focus)) + (logior! (-> this enemy-flags) (enemy-flag look-at-move-dest)) + ) + ) + (if (nonzero? (-> this neck)) + (mode-set! (-> this neck) (joint-mod-mode look-at)) + ) + 0 + (none) + ) + +(defmethod stop-look-at! ((this enemy)) + (when (nonzero? (-> this neck)) + (logclear! (-> this enemy-flags) (enemy-flag look-at-focus look-at-move-dest)) + (shut-down (-> this neck)) + ) + 0 + (none) + ) + +(defmethod set-ground-pat! ((this enemy) (arg0 collide-query) (arg1 collide-spec) (arg2 float) (arg3 float) (arg4 float) (arg5 process)) + (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 + ) + ) + ) + +(defmethod enemy-above-ground? ((this enemy) (arg0 collide-query) (arg1 vector) (arg2 collide-spec) (arg3 float) (arg4 float) (arg5 float)) + (above-ground? (-> this root) arg0 arg1 arg2 arg3 arg4 arg5) + ) + +(defmethod try-locate-ground ((this enemy) (arg0 meters) (arg1 meters) (arg2 symbol) (arg3 collide-spec)) + (let ((s4-0 (new 'stack-no-clear 'collide-query))) + (cond + ((set-ground-pat! this s4-0 arg3 arg0 arg1 1024.0 (the-as process #f)) + (let ((s5-1 (-> this root))) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> this root trans quad)) + (set! (-> s3-0 y) (-> s4-0 best-other-tri intersect y)) + (move-to-point! s5-1 s3-0) + (let ((a0-3 (-> s4-0 best-other-tri normal)) + (v1-8 (-> s4-0 best-other-tri pat)) + ) + (set! (-> s5-1 ground-touch-point quad) (-> s3-0 quad)) + (set! (-> s5-1 poly-normal quad) (-> a0-3 quad)) + (set! (-> s5-1 surface-normal quad) (-> a0-3 quad)) + (set! (-> s5-1 local-normal quad) (-> a0-3 quad)) + (set! (-> s5-1 ground-poly-normal quad) (-> a0-3 quad)) + (set! (-> s5-1 poly-pat) v1-8) + (set! (-> s5-1 cur-pat) v1-8) + (set! (-> s5-1 ground-pat) v1-8) + ) + ) + (logior! (-> s5-1 status) (collide-status on-surface on-ground touch-surface)) + ) + #t + ) + (else + (let ((v1-11 (-> this root))) + (logclear! (-> v1-11 status) (collide-status + on-surface + on-ground + touch-surface + touch-wall + touch-ceiling + touch-actor + on-special-surface + touch-edge + blocked + on-water + impact-surface + touch-background + stuck + glance + ) + ) + (when (not (logtest? (-> v1-11 root-prim prim-core action) (collide-action no-normal-reset))) + (let ((a0-12 (-> v1-11 dynam gravity-normal))) + (set! (-> v1-11 local-normal quad) (-> a0-12 quad)) + (set! (-> v1-11 surface-normal quad) (-> a0-12 quad)) + (set! (-> v1-11 poly-normal quad) (-> a0-12 quad)) + ) + (set! (-> v1-11 coverage) 0.0) + (set! (-> v1-11 touch-angle) 0.0) + ) + ) + (if arg2 + (format 0 "WARNING: enemy::move-to-ground: failed to locate ground for ~S!~%" (-> this name)) + ) + #f + ) + ) + ) + ) + +(defmethod move-above-ground! ((this enemy) (arg0 vector) (arg1 move-above-ground-params)) + (let ((gp-0 (-> this root))) + (set! (-> arg1 on-ground?) #f) + (set! (-> arg1 do-move?) #t) + (set! (-> arg1 old-gspot-pos quad) (-> gp-0 gspot-pos quad)) + (set! (-> arg1 old-gspot-normal quad) (-> gp-0 gspot-normal quad)) + (set! (-> gp-0 trans-old-old-old quad) (-> gp-0 trans-old-old quad)) + (set! (-> gp-0 trans-old-old quad) (-> gp-0 trans-old quad)) + (set! (-> gp-0 trans-old quad) (-> gp-0 trans quad)) + (set! (-> gp-0 prev-status) (-> gp-0 status)) + (vector-v+! (-> gp-0 trans) (-> gp-0 trans) arg0) + (set! (-> arg1 new-pos quad) (-> gp-0 trans quad)) + (let ((s2-0 (new 'stack-no-clear 'collide-query))) + (cond + ((set-ground-pat! this s2-0 (-> arg1 gnd-collide-with) (-> arg1 popup) 81920.0 1024.0 (the-as process #f)) + (when (>= (-> gp-0 gspot-pos y) (-> arg1 new-pos y)) + (set! (-> arg1 on-ground?) #t) + (set! (-> arg1 pat) (-> s2-0 best-other-tri pat)) + (set! (-> arg1 new-pos y) (-> s2-0 best-other-tri intersect y)) + (set! (-> gp-0 ground-impact-vel) (- (vector-dot arg0 (-> gp-0 dynam gravity-normal)))) + (set! (-> arg0 y) 0.0) + ) + ) + (else + (if (-> arg1 hover-if-no-ground?) + (set! (-> arg1 new-pos y) (-> gp-0 trans-old y)) + ) + ) + ) + ) + (set! (-> gp-0 trans quad) (-> gp-0 trans-old quad)) + (move-to-point! gp-0 (-> arg1 new-pos)) + (when (logtest? (logand (-> arg1 overlaps-params collide-with-filter) + (collide-spec hit-by-player-list hit-by-others-list player-list) + ) + (-> gp-0 root-prim prim-core collide-with) + ) + (when (find-overlapping-shapes gp-0 (-> arg1 overlaps-params)) + (when (-> arg1 dont-move-if-overlaps?) + (set! (-> arg1 do-move?) #f) + (move-to-point! gp-0 (-> gp-0 trans-old)) + (set! (-> gp-0 gspot-pos quad) (-> arg1 old-gspot-pos quad)) + (set! (-> gp-0 gspot-normal quad) (-> arg1 old-gspot-normal quad)) + ) + ) + ) + (when (-> arg1 do-move?) + (cond + ((-> arg1 on-ground?) + (let ((a1-6 (-> gp-0 gspot-pos)) + (a0-21 (-> gp-0 gspot-normal)) + (v1-39 (-> arg1 pat)) + ) + (set! (-> gp-0 ground-touch-point quad) (-> a1-6 quad)) + (set! (-> gp-0 poly-normal quad) (-> a0-21 quad)) + (set! (-> gp-0 surface-normal quad) (-> a0-21 quad)) + (set! (-> gp-0 local-normal quad) (-> a0-21 quad)) + (set! (-> gp-0 ground-poly-normal quad) (-> a0-21 quad)) + (set! (-> gp-0 poly-pat) v1-39) + (set! (-> gp-0 cur-pat) v1-39) + (set! (-> gp-0 ground-pat) v1-39) + ) + (logior! (-> gp-0 status) (collide-status on-surface on-ground touch-surface)) + ) + (else + (logclear! (-> gp-0 status) (collide-status + on-surface + on-ground + touch-surface + touch-wall + touch-ceiling + touch-actor + on-special-surface + touch-edge + blocked + on-water + impact-surface + touch-background + stuck + glance + ) + ) + (when (not (logtest? (-> gp-0 root-prim prim-core action) (collide-action no-normal-reset))) + (let ((v1-49 (-> gp-0 dynam gravity-normal))) + (set! (-> gp-0 local-normal quad) (-> v1-49 quad)) + (set! (-> gp-0 surface-normal quad) (-> v1-49 quad)) + (set! (-> gp-0 poly-normal quad) (-> v1-49 quad)) + ) + (set! (-> gp-0 coverage) 0.0) + (set! (-> gp-0 touch-angle) 0.0) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod apply-friction ((this enemy)) + (let ((v1-0 (-> this root))) + (when (logtest? (-> v1-0 status) (collide-status touch-surface)) + (let ((f0-1 (fmax 0.0 (+ 1.0 (* 60.0 (seconds-per-frame) (+ -1.0 (-> this enemy-info friction))))))) + (vector-float*! (-> v1-0 transv) (-> v1-0 transv) f0-1) + ) + 0 + ) + ) + 0 + (none) + ) + +(defmethod init-enemy-collision! ((this enemy)) + 0 + (none) + ) + +(defmethod init-enemy! ((this enemy)) + 0 + (none) + ) + +(defmethod go-idle2 ((this enemy)) + (go (method-of-object this idle)) + ) + +(defmethod init-enemy-info! ((this enemy) (arg0 enemy-info)) + (set! (-> this enemy-info) arg0) + (when (and (!= (-> this enemy-info neck-joint) -1) (zero? (-> this neck))) + (set! (-> this neck) + (new 'process 'joint-mod (joint-mod-mode flex-blend) this (-> this enemy-info neck-joint)) + ) + (set-vector! (-> this neck twist-max) 8192.0 8192.0 0.0 1.0) + (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 neck max-dist) 102400.0) + (set! (-> this neck ignore-angle) 16384.0) + ) + 0 + (none) + ) + +(defmethod init-enemy-defaults! ((this enemy) (arg0 enemy-info)) + (local-vars (sv-16 res-tag)) + (when (coin-flip? this) + (let ((a0-2 (-> this node-list data 2))) + (set! (-> a0-2 param0) (the-as (function cspace transformq none) cspace<-parented-matrix-joint-flip-z!)) + (set! (-> a0-2 param1) #f) + (set! (-> a0-2 param2) #f) + ) + (logior! (-> this enemy-flags) (enemy-flag drawn-mirrored)) + ) + (logior! (-> this mask) (process-mask enemy)) + (logior! (-> this mask) (process-mask actor-pause)) + (logior! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (init-enemy-info! this arg0) + (set! (-> this ragdoll-proc) (the-as handle #f)) + (let ((a1-2 (-> this enemy-info idle-anim-script))) + (if a1-2 + (init! (-> this idle-anim-player) a1-2) + ) + ) + (if (-> this draw shadow) + (set! (-> this draw shadow-ctrl) (new + 'process + 'shadow-control + (-> this enemy-info shadow-min-y) + (-> this enemy-info shadow-max-y) + (-> this enemy-info shadow-locus-dist) + (the-as vector #f) + (shadow-flags shdf00 shdf04) + 245760.0 + ) + ) + (set! (-> this draw shadow-ctrl) *enemy-dummy-shadow-control*) + ) + (set! (-> this water-max-height) 8192.0) + (if (logtest? (-> *game-info* secrets) (game-secrets hero-mode)) + (set! (-> this hit-points) (* 2.0 (-> this enemy-info default-hit-points))) + (set! (-> this hit-points) (-> this enemy-info default-hit-points)) + ) + (let* ((v1-37 *game-info*) + (a0-10 (+ (-> v1-37 attack-id) 1)) + ) + (set! (-> v1-37 attack-id) a0-10) + (set! (-> this attack-id) a0-10) + ) + (let* ((v1-38 *game-info*) + (a0-12 (+ (-> v1-38 attack-id) 1)) + ) + (set! (-> v1-38 attack-id) a0-12) + (set! (-> this persistent-attack-id) a0-12) + ) + (set! (-> this incoming attacker-handle) (the-as handle #f)) + (set! (-> this gnd-collide-with) (-> this enemy-info gnd-collide-with)) + (set! (-> this fact) (new 'process 'fact-info-enemy this (the-as (pointer float) (-> arg0 fact-defaults)))) + (let ((cspec (if (logtest? (enemy-option multi-focus) (-> this fact enemy-options)) + (the-as collide-spec (collide-spec jak bot player-list jak-vehicle)) + (the-as collide-spec (collide-spec jak player-list jak-vehicle)) + ) + ) + ) + (reset-to-collide-spec (-> this focus) (the-as collide-spec cspec)) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-47 (res-lump-data (-> this entity) 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))) + (cond + ((and v1-47 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) v1-47) + (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 on-notice) (res-lump-struct (-> this entity) 'on-notice pair)) + (set! (-> this on-active) (res-lump-struct (-> this entity) 'on-active pair)) + (set! (-> this on-hostile) (res-lump-struct (-> this entity) 'on-hostile pair)) + (set! (-> this on-death) (res-lump-struct (-> this entity) 'on-death pair)) + (if (-> this on-notice) + (logior! (-> this enemy-flags) (enemy-flag enable-on-notice)) + ) + (if (-> this on-active) + (logior! (-> this enemy-flags) (enemy-flag enable-on-active)) + ) + (if (-> this on-hostile) + (logior! (-> this enemy-flags) (enemy-flag enable-on-hostile)) + ) + (let ((s4-0 (-> this root))) + (set! (-> this penetrated-by-all) (-> s4-0 penetrated-by)) + (set! (-> s4-0 penetrated-by) (get-penetrated-by this)) + (set! (-> s4-0 event-self) 'touched) + ) + (set! (-> this penetrate-flinch) (-> arg0 penetrate-flinch)) + (set! (-> this penetrate-knocked) (-> arg0 penetrate-knocked)) + (set! (-> this reaction-time) (set-reaction-time! this (seconds 0.1) (seconds 0.6))) + (let* ((v1-77 (-> this enemy-flags)) + (a0-28 (-> this fact enemy-options)) + (v1-78 + (logior (enemy-flag vulnerable vulnerable-backup use-notice-distance attackable-backup trackable trackable-backup) + v1-77 + ) + ) + ) + (if (logtest? (enemy-option multi-focus) a0-28) + (set! v1-78 (logior (enemy-flag multi-focus) v1-78)) + ) + (if (logtest? (enemy-option has-trigger) a0-28) + (set! v1-78 (logior (enemy-flag use-trigger) v1-78)) + ) + (set! (-> this enemy-flags) v1-78) + ) + (if (and (should-move-to-ground? this) + (not (logtest? (enemy-flag no-initial-move-to-ground) (-> this enemy-flags))) + (not (logtest? (enemy-option ambush) (-> this fact enemy-options))) + ) + (try-locate-ground this (meters 10) (meters 10) #t (-> this gnd-collide-with)) + ) + (if (zero? (-> this draw light-index)) + (set! (-> this draw light-index) (the-as uint 10)) + ) + 0 + (none) + ) + +(defmethod enemy-method-152 ((this enemy)) + 1.0 + ) + +(defmethod get-gem-pool-idx ((this enemy)) + (-> *setting-control* user-current gem-pool-index) + ) + +(defbehavior enemy-setup-gem enemy () + (set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag has-gem)))) + (when (> (-> self enemy-info gem-joint) 0) + (let ((gp-0 (get-gem-pool-idx self))) + (when (gems-available? gp-0) + (if (or (and (zero? gp-0) + (-> self entity) + (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status save)))) + ) + (and (nonzero? gp-0) (let* ((v1-14 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-15 (the-as number (logior #x3f800000 v1-14))) + ) + (< (+ -1.0 (the-as float v1-15)) (enemy-method-152 self)) + ) + ) + ) + (set! (-> self enemy-flags) (the-as enemy-flag (logior (enemy-flag has-gem) (-> self enemy-flags)))) + ) + ) + ) + (cond + ((logtest? (enemy-flag has-gem) (-> self enemy-flags)) + (setup-masks + (-> self draw) + (the-as int (-> self enemy-info gem-seg)) + (the-as int (-> self enemy-info gem-no-seg)) + ) + (add-connection *part-engine* self (-> self enemy-info gem-joint) self 464 (-> self enemy-info gem-offset)) + ) + (else + (setup-masks + (-> self draw) + (the-as int (-> self enemy-info gem-seg)) + (the-as int (-> self enemy-info gem-no-seg)) + ) + ) + ) + ) + ) + +(defbehavior enemy-init-by-other enemy ((arg0 process-drawable) (arg1 enemy-init-by-other-params)) + (let ((a1-1 (-> arg1 entity))) + (if a1-1 + (process-entity-set! self a1-1) + ) + ) + (when (-> arg1 art-level) + (let ((v1-5 (level-get *level* (-> arg1 art-level)))) + (if v1-5 + (set! (-> self level) v1-5) + ) + ) + ) + (if (-> arg1 directed?) + (logior! (-> self enemy-flags) (enemy-flag directed)) + ) + (if (-> arg1 no-initial-move-to-ground?) + (set! (-> self enemy-flags) + (the-as enemy-flag (logior (enemy-flag no-initial-move-to-ground) (-> self enemy-flags))) + ) + ) + (init-enemy-collision! self) + (set! (-> self root trans quad) (-> arg1 trans quad)) + (quaternion-copy! (-> self root quat) (-> arg1 quat)) + (vector-identity! (-> self root scale)) + (init-enemy! self) + (enemy-setup-gem) + (process-entity-status! self (entity-perm-status subtask-complete) #f) + (let ((v1-24 (-> self fact enemy-options))) + (cond + (*debug-view-anims* + (go-virtual view-anims) + ) + ((logtest? (enemy-option dormant) v1-24) + (go-dormant self) + ) + ((logtest? (enemy-flag directed) (-> self enemy-flags)) + (go-directed self) + ) + ((logtest? (enemy-option dormant-aware) v1-24) + (go-dormant-aware self) + ) + ((logtest? (enemy-option ambush) (-> self fact enemy-options)) + (go-ambush-delay self) + ) + (else + (go-idle2 self) + ) + ) + ) + ) + +(defmethod init-from-entity! ((this enemy) (arg0 entity-actor)) + (let ((a1-2 (res-lump-struct arg0 'art-level symbol))) + (when a1-2 + (let ((a0-3 (level-get *level* a1-2))) + (if a0-3 + (set! (-> this level) a0-3) + ) + ) + ) + ) + (init-enemy-collision! this) + (process-drawable-from-entity! this arg0) + (init-enemy! this) + (enemy-setup-gem) + (let ((v1-10 (-> this fact enemy-options))) + (cond + ((logtest? (enemy-option spawner) v1-10) + (process-entity-status! this (entity-perm-status dead) #t) + (go (method-of-object this die-fast)) + ) + (*debug-view-anims* + (go (method-of-object this view-anims)) + ) + ((logtest? (enemy-option dormant) v1-10) + (go-dormant this) + ) + ((logtest? (enemy-option dormant-aware) v1-10) + (go-dormant-aware this) + ) + (else + (go-idle2 this) + ) + ) + ) + ) + +(defmethod is-pfoc-in-mesh? ((this enemy) (arg0 process-focusable) (arg1 vector)) + #t + ) + +(defmethod enemy-method-108 ((this enemy) (arg0 process-focusable)) + #f + ) + +(defmethod reset-to-collide-spec ((this enemy-focus) (arg0 collide-spec)) + "Reset this focus with the given [[collide-spec]]." + (let ((t9-0 (method-of-type focus reset-to-collide-spec))) + (t9-0 this arg0) + ) + (set! (-> this aware) (enemy-aware ea0)) + 0 + (none) + ) + +(defmethod update-focus ((this enemy)) + (let ((gp-0 (-> this focus))) + (let ((a1-0 (handle->process (-> gp-0 handle)))) + (when a1-0 + (let ((v1-4 (-> this enemy-flags))) + (cond + ((and a1-0 (not (logtest? (-> (the-as process-focusable a1-0) focus-status) (focus-status disable dead)))) + (when (and (logtest? (enemy-flag multi-focus) v1-4) + (not (logtest? (enemy-flag lock-focus) v1-4)) + (not (logtest? (-> gp-0 flags) (enemy-flag look-at-focus))) + ) + (find-best-focus this) + (return (the-as process #f)) + ) + (let ((v1-14 + (get-enemy-aware this (update-awareness! this (the-as process-focusable a1-0) (the-as enemy-best-focus #f))) + ) + ) + (set! (-> gp-0 aware) v1-14) + (if (>= 1 (the-as int v1-14)) + (logclear! (-> gp-0 flags) (enemy-flag look-at-focus)) + ) + ) + (return (the-as process #f)) + ) + (else + (clear-focused gp-0) + ) + ) + ) + ) + ) + (if (!= (-> gp-0 handle) #f) + (clear-focused gp-0) + ) + ) + (if (not (logtest? (enemy-flag lock-focus) (-> this enemy-flags))) + (find-best-focus this) + ) + ) + +(defmethod find-best-focus ((this enemy)) + (let ((s4-0 (-> this focus collide-with)) + (gp-0 (new 'stack-no-clear 'enemy-best-focus)) + ) + (set! (-> gp-0 proc) #f) + (set! (-> gp-0 rating) 409600000.0) + (set! (-> gp-0 aware) (enemy-aware ea0)) + (when (logtest? s4-0 (collide-spec player-list)) + (let ((v1-4 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((s3-0 (-> v1-4 next0))) + (while (!= v1-4 (-> *collide-player-list* alive-list-end)) + (let ((v1-5 (the-as collide-shape (-> (the-as connection v1-4) param1)))) + (when (logtest? s4-0 (-> v1-5 root-prim prim-core collide-as)) + (let* ((s2-0 (-> v1-5 process)) + (a1-1 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (if (and a1-1 + (and a1-1 (not (logtest? (-> (the-as process-focusable a1-1) focus-status) (focus-status disable dead)))) + (!= this a1-1) + ) + (update-awareness! this (the-as process-focusable a1-1) gp-0) + ) + ) + ) + ) + (set! v1-4 s3-0) + *collide-player-list* + (set! s3-0 (-> s3-0 next0)) + ) + ) + ) + ) + (when (logtest? s4-0 (collide-spec hit-by-player-list hit-by-others-list)) + (when (logtest? s4-0 (collide-spec hit-by-player-list)) + (let ((v1-19 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((s3-1 (-> v1-19 next0))) + (while (!= v1-19 (-> *collide-hit-by-player-list* alive-list-end)) + (let ((v1-20 (the-as collide-shape (-> (the-as connection v1-19) param1)))) + (when (logtest? s4-0 (-> v1-20 root-prim prim-core collide-as)) + (let* ((s2-1 (-> v1-20 process)) + (a1-3 (if (type? s2-1 process-focusable) + s2-1 + ) + ) + ) + (if (and a1-3 + (and a1-3 (not (logtest? (-> (the-as process-focusable a1-3) focus-status) (focus-status disable dead)))) + (!= this a1-3) + ) + (update-awareness! this (the-as process-focusable a1-3) gp-0) + ) + ) + ) + ) + (set! v1-19 s3-1) + *collide-hit-by-player-list* + (set! s3-1 (-> s3-1 next0)) + ) + ) + ) + ) + (when (logtest? s4-0 (collide-spec hit-by-others-list)) + (let ((v1-32 (-> *collide-hit-by-others-list* alive-list next0))) + *collide-hit-by-others-list* + (let ((s3-2 (-> v1-32 next0))) + (while (!= v1-32 (-> *collide-hit-by-others-list* alive-list-end)) + (let ((v1-33 (the-as collide-shape (-> (the-as connection v1-32) param1)))) + (when (logtest? s4-0 (-> v1-33 root-prim prim-core collide-as)) + (let* ((s2-2 (-> v1-33 process)) + (a1-5 (if (type? s2-2 process-focusable) + s2-2 + ) + ) + ) + (if (and a1-5 + (and a1-5 (not (logtest? (-> (the-as process-focusable a1-5) focus-status) (focus-status disable dead)))) + (!= this a1-5) + ) + (update-awareness! this (the-as process-focusable a1-5) gp-0) + ) + ) + ) + ) + (set! v1-32 s3-2) + *collide-hit-by-others-list* + (set! s3-2 (-> s3-2 next0)) + ) + ) + ) + ) + ) + (let ((s4-1 (-> gp-0 proc))) + (when s4-1 + (enemy-method-70 this (the-as process-focusable s4-1) (get-enemy-aware this (-> gp-0 aware))) + s4-1 + ) + ) + ) + ) + +;; WARN: Return type mismatch int vs enemy-aware. +(defmethod update-awareness! ((this enemy) (arg0 process-focusable) (arg1 enemy-best-focus)) + (let ((f30-0 (vector-vector-distance (get-trans arg0 0) (-> this root trans))) + (s3-1 #f) + (s2-0 #f) + ) + (cond + ((< f30-0 (-> this enemy-info proximity-notice-distance)) + (set! s3-1 #t) + (set! s2-0 (is-pfoc-in-mesh? this arg0 (the-as vector #f))) + ) + (else + (let ((f0-1 (the-as float (-> this enemy-info notice-distance)))) + (if (< 1 (the-as int (-> this focus aware))) + (set! f0-1 (+ (the-as meters f0-1) (-> this enemy-info notice-distance-delta))) + ) + (when (or (< f30-0 f0-1) (not (logtest? (-> this enemy-flags) (enemy-flag use-notice-distance)))) + (set! s2-0 (is-pfoc-in-mesh? this arg0 (the-as vector #f))) + (if s2-0 + (set! s3-1 #t) + ) + ) + ) + ) + ) + (let ((aware (cond + (s3-1 + (cond + ((enemy-method-108 this arg0) + (the-as enemy-aware (enemy-aware ea4)) + ) + (s2-0 + (the-as enemy-aware (enemy-aware ea3)) + ) + (else + (the-as enemy-aware (enemy-aware ea2)) + ) + ) + ) + ((< f30-0 (-> this fact idle-distance)) + (the-as enemy-aware (enemy-aware ea1)) + ) + (else + (the-as enemy-aware (enemy-aware ea0)) + ) + ) + ) + ) + (when (and (> (the-as int aware) 0) (logtest? (enemy-flag use-trigger) (-> this enemy-flags))) + (cond + ((logtest? (enemy-option idle-til-trigger) (-> this fact enemy-options)) + (if (not (enemy-method-141 this f30-0)) + (set! aware (enemy-aware ea0)) + ) + ) + (else + (if (and (< 1 (the-as int aware)) (not (enemy-method-141 this f30-0))) + (set! aware (enemy-aware ea1)) + ) + ) + ) + ) + (when arg1 + (when (and (>= (the-as int aware) (the-as int (-> arg1 aware))) (< f30-0 (-> arg1 rating))) + (set! (-> arg1 aware) (the-as enemy-aware aware)) + (set! (-> arg1 rating) f30-0) + (set! (-> arg1 proc) arg0) + ) + ) + (the-as enemy-aware aware) + ) + ) + ) + +(defmethod enemy-method-141 ((this enemy) (arg0 float)) + (let* ((v1-0 (-> this fact)) + (a2-0 (-> v1-0 trig-mask-count)) + (a3-0 (-> v1-0 trig-mask)) + ) + (dotimes (t0-0 a2-0) + (let ((t1-1 (the-as int (-> a3-0 t0-0)))) + (if (and (logtest? (the-as uint t1-1) 1) (>= (-> v1-0 trig-dist) arg0)) + (set! t1-1 (the-as int (logand -2 (the-as uint t1-1)))) + ) + (when (logtest? (the-as uint t1-1) 2) + (let ((t2-8 (-> v1-0 trig-actor-group 0))) + (countdown (t3-0 (-> t2-8 length)) + (let ((t5-0 (-> t2-8 data t3-0 actor))) + (when (and t5-0 (logtest? (-> t5-0 extra perm status) (entity-perm-status subtask-complete))) + (set! t1-1 (the-as int (logand -3 (the-as uint t1-1)))) + (goto cfg-17) + ) + ) + ) + ) + ) + (label cfg-17) + (when (zero? t1-1) + (logclear! (-> this enemy-flags) (enemy-flag use-trigger)) + (return #t) + ) + ) + ) + ) + #f + ) + +;; WARN: Return type mismatch int vs enemy-aware. +(defmethod get-enemy-aware ((this enemy) (arg0 enemy-aware)) + (let ((v1-1 (< 1 (the-as int arg0)))) + (cond + (v1-1 + (when (not (logtest? (-> this enemy-flags) (enemy-flag notice))) + (logior! (-> this enemy-flags) (enemy-flag notice)) + (set-time! (-> this notice-time)) + ) + (if (and (not (logtest? (-> this enemy-flags) (enemy-flag alert))) + (not (time-elapsed? (-> this notice-time) (-> this reaction-time))) + ) + (set! v1-1 #f) + ) + ) + (else + (logclear! (-> this enemy-flags) (enemy-flag notice)) + ) + ) + (the-as enemy-aware (cond + (v1-1 + (the-as int arg0) + ) + ((or (= arg0 (enemy-aware ea0)) (time-elapsed? (-> this last-draw-time) (seconds 2))) + 0 + ) + (else + 1 + ) + ) + ) + ) + ) + +(defmethod event-handler ((this enemy) (proc process) (argc int) (msg symbol) (block event-message-block)) + (local-vars (s5-6 rgbaf) (sv-640 event-message-block) (sv-656 process) (sv-672 event-message-block)) + (cond + ((= msg 'go-gun-dark-2-stretch) + (go-gun-dark-2-stretch this) + ) + ((= msg 'go-gun-dark-3-nuke) + (on-dying this) + (send-event (ppointer->process (-> this parent)) 'child-die) + (mark-as-dead this) + (cleanup-for-death this) + (go (method-of-object this die-fast)) + ) + ((= msg 'combo) + (and (not (logtest? (enemy-flag dislike-combo) (-> this enemy-flags))) (!= (-> this hit-points) 0.0)) + ) + ((= msg 'touch) + (enemy-touch-handler this proc block) + ) + ((= msg 'touched) + (when (logtest? (-> this enemy-flags) (enemy-flag auto-reset-penetrate)) + (let* ((s3-1 proc) + (v1-27 (if (type? s3-1 process-drawable) + s3-1 + ) + ) + ) + (when v1-27 + (let* ((s3-2 (-> (the-as process-drawable v1-27) root)) + (a1-5 (if (type? s3-2 collide-shape) + s3-2 + ) + ) + (s3-3 (-> block param 0)) + ) + (if (and a1-5 + s3-3 + ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s3-3) + (the-as collide-shape a1-5) + (collide-action solid) + (collide-action) + ) + ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s3-3) + (-> this root) + (collide-action solid) + (collide-action) + ) + ) + (set-time! (-> this auto-reset-penetrate-time)) + ) + ) + ) + ) + ) + (send-attack-on-jump-or-knocked this proc block) + ) + ((= msg 'attack-invinc) + (case (-> (the-as attack-info (-> block param 1)) mode) + (('endlessfall) + (let ((v1-39 (-> this root root-prim))) + (set! (-> v1-39 prim-core collide-as) (collide-spec)) + (set! (-> v1-39 prim-core collide-with) (collide-spec)) + ) + 0 + (go-die this) + ) + ) + ) + ((= msg 'attack-no-avoid) + (let* ((s2-0 (-> block param 1)) + (s3-4 this) + (s1-0 (method-of-object s3-4 get-incoming-attack!)) + (s0-0 proc) + ) + (set! sv-640 block) + (let ((a3-3 (get-penetrate-using-from-attack-event (the-as process-drawable proc) block)) + (t1-0 (-> block param 0)) + ) + (s1-0 + s3-4 + (the-as process-drawable s0-0) + sv-640 + a3-3 + (the-as attack-info s2-0) + (the-as touching-shapes-entry t1-0) + ) + ) + ) + (damage-enemy! this proc block) + ) + ((= msg 'attack) + (let ((s2-1 (the-as object (-> block param 1)))) + (when (!= (-> (the-as attack-info s2-1) id) (-> this incoming attack-id)) + (cond + ((and (logtest? (-> this enemy-flags) (enemy-flag vulnerable)) + (not (logtest? (-> this focus-status) (focus-status grabbed))) + ) + (let* ((s1-1 this) + (s0-1 (method-of-object s1-1 get-incoming-attack!)) + ) + (set! sv-656 proc) + (set! sv-672 block) + (let ((a3-4 (get-penetrate-using-from-attack-event (the-as process-drawable proc) block)) + (t1-1 (-> block param 0)) + ) + (s0-1 + s1-1 + (the-as process-drawable sv-656) + sv-672 + a3-4 + (the-as attack-info s2-1) + (the-as touching-shapes-entry t1-1) + ) + ) + ) + (send-event (ppointer->process (-> this parent)) 'child-hit) + (let ((f0-1 (the-as number 0.0))) + (if (not *debug-unkillable*) + (set! f0-1 (damage-enemy! this proc block)) + ) + ) + (let ((s2-2 (penetrate->next-state this))) + (when s2-2 + (logclear! (-> this enemy-flags) (enemy-flag use-trigger)) + (send-attack-to-all-tshapes this (the-as process-focusable proc) block) + (let ((a1-17 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-17 from) (process->ppointer proc)) + (set! (-> a1-17 num-params) argc) + (set! (-> a1-17 message) s2-2) + (set! (-> a1-17 param 0) (-> block param 0)) + (set! (-> a1-17 param 1) (-> block param 1)) + (set! (-> a1-17 param 2) (-> block param 2)) + (set! (-> a1-17 param 3) (-> block param 3)) + (set! (-> a1-17 param 4) (-> block param 4)) + (set! (-> a1-17 param 5) (-> block param 5)) + (send-event-function this a1-17) + ) + #t + ) + ) + ) + (else + (set! (-> this incoming attack-id) (-> (the-as attack-info s2-1) id)) + (enemy-touch-handler this proc block) + ) + ) + ) + ) + ) + ((= msg 'impact-impulse) + (let* ((s4-1 (the-as object (-> block param 0))) + (s3-5 (if (type? proc process-focusable) + proc + ) + ) + (f30-1 (* (-> (the-as rigid-body-impact s4-1) impulse) (get-inv-mass this))) + ) + (when (and s3-5 (< 20480.0 f30-1)) + (let ((s5-1 (new 'stack-no-clear 'attack-info))) + (let ((v1-85 (process->handle s3-5))) + (let ((a0-41 s5-1)) + (set! (-> a0-41 mode) 'impact) + (set! (-> a0-41 penetrate-using) (penetrate vehicle)) + (set! (-> a0-41 mask) (attack-mask mode penetrate-using)) + ) + (cond + ((and (= v1-85 (-> this incoming attacker-handle)) + (not (time-elapsed? (-> this incoming attack-time) (seconds 0.1))) + ) + (set! (-> s5-1 id) (-> this incoming attack-id)) + ) + (else + (let* ((a0-48 *game-info*) + (a1-26 (+ (-> a0-48 attack-id) 1)) + ) + (set! (-> a0-48 attack-id) a1-26) + (set! (-> s5-1 id) a1-26) + ) + ) + ) + (logior! (-> s5-1 mask) (attack-mask id)) + (set! (-> s5-1 attacker) (the-as handle v1-85)) + ) + (logior! (-> s5-1 mask) (attack-mask attacker)) + (let ((v1-89 (scale-impact-vel-y! + this + (new 'stack-no-clear 'vector) + (vector-negate! (new 'stack-no-clear 'vector) (-> (the-as rigid-body-impact s4-1) velocity)) + f30-1 + ) + ) + ) + (set! (-> s5-1 attacker-velocity quad) (-> v1-89 quad)) + (set! (-> s5-1 vector quad) (-> v1-89 quad)) + ) + (logior! (-> s5-1 mask) (attack-mask attacker-velocity)) + (logior! (-> s5-1 mask) (attack-mask vector)) + (set! (-> s5-1 intersection quad) (-> (the-as rigid-body-impact s4-1) point quad)) + (logior! (-> s5-1 mask) (attack-mask intersection)) + (set! (-> s5-1 damage) (lerp-damage this f30-1)) + (logior! (-> s5-1 mask) (attack-mask damage)) + (when (< 0.0 (-> s5-1 damage)) + (format + 0 + "Sending impact-impulse attack with ~f damage (~m impulse, ~m attacker-velocity)~%" + (-> s5-1 damage) + f30-1 + (vector-length (-> s5-1 attacker-velocity)) + ) + (send-event this 'attack #f s5-1) + (when (= (-> this hit-points) 0.0) + (logior! (-> this root penetrated-by) (penetrate vehicle)) + #t + ) + ) + ) + ) + ) + ) + ((= msg 'hit-flinch) + (when (= (-> this hit-points) 0.0) + (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 proc) + (send-event proc 'get-attack-count 1) + (freeze-hit-begin) + (go-die this) + ) + #t + ) + ((= msg '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 proc) + (send-event proc '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)) + ) + ((= msg 'hit) + (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 proc) + (send-event proc 'get-attack-count 1) + (freeze-hit-begin) + (if (= (-> this hit-points) 0.0) + (go-die this) + (go (method-of-object this hit)) + ) + ) + ((= msg 'cue-chase) + (when (and (< 0.0 (-> this hit-points)) + (zero? (-> this fated-time)) + (not (logtest? (-> this focus-status) (focus-status grabbed))) + ) + (let ((v1-202 (logtest? (enemy-flag directed) (-> this enemy-flags)))) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance directed directed-ready use-trigger)) + (logior! (-> this enemy-flags) (enemy-flag chase-startup)) + (logclear! (-> this mask) (process-mask actor-pause)) + (cond + (v1-202 + (if (logtest? (enemy-option ambush) (-> this fact enemy-options)) + (go-ambush-delay this) + (go-hostile this) + ) + ) + ((and (-> this next-state) (let ((v1-213 (-> this next-state name))) + (or (= v1-213 'dormant) (= v1-213 'dormant-aware)) + ) + ) + (if (logtest? (enemy-option ambush) (-> this fact enemy-options)) + (go-ambush-delay this) + (go (method-of-object this notice)) + ) + ) + ) + ) + #t + ) + ) + ((= msg 'cue-wake) + (when (and (< 0.0 (-> this hit-points)) + (zero? (-> this fated-time)) + (not (logtest? (-> this focus-status) (focus-status grabbed))) + ) + (logclear! (-> this enemy-flags) (enemy-flag directed directed-ready use-trigger)) + (if (logtest? (enemy-option ambush) (-> this fact enemy-options)) + (go-ambush-delay this) + (go-best-state this) + ) + #t + ) + ) + ((= msg 'jump) + (when (and (< 0.0 (-> this hit-points)) + (zero? (-> this fated-time)) + (not (logtest? (-> this focus-status) (focus-status grabbed))) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this jump-why) (-> block param 0)) + (set! (-> this event-param-point quad) (-> (the-as vector (-> block param 1)) quad)) + (go (method-of-object this jump)) + ) + ) + ((= msg 'birth-pickup) + (if (not (-> *setting-control* user-current gun-special-mode)) + (drop-pickup (-> this fact) #t *entity-pool* (-> this fact) 0 #f) + ) + ) + ((= msg 'death-start) + (set! (-> this enemy-flags) (the-as enemy-flag (logior (enemy-flag death-start) (-> this enemy-flags)))) + (send-event (ppointer->process (-> this parent)) 'child-die) + (when (< (-> *event-queue* length) (-> *event-queue* allocated-length)) + (let ((v1-269 (-> *event-queue* data (-> *event-queue* length)))) + (+! (-> *event-queue* length) 1) + (set! (-> v1-269 from-handle) (process->handle self)) + (set! (-> v1-269 to-handle) (process->handle this)) + (set! (-> v1-269 num-params) 0) + (set! (-> v1-269 message) 'birth-pickup) + ) + ) + (let ((s5-2 (-> this on-death))) + (if s5-2 + (script-eval s5-2 :vector (-> this root trans)) + ) + ) + ) + ((= msg 'death-end) + (if (-> this skel effect) + (logior! (-> this skel effect flags) (effect-control-flag ecf2)) + ) + (logior! (-> this draw status) (draw-control-status no-draw)) + (logclear! (-> this enemy-flags) (enemy-flag vulnerable vulnerable-backup)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (set! (-> this enemy-flags) (logclear (-> this enemy-flags) (enemy-flag dangerous-backup))) + ) + ((= msg 'instant-death) + (when (and (< 0.0 (-> this hit-points)) (zero? (-> this fated-time))) + (set! (-> this hit-points) 0.0) + (set! (-> this root penetrated-by) (get-penetrated-by this)) + (let ((s5-3 (get-knockback-dir! this (new 'stack-no-clear 'vector)))) + (vector-z-quaternion! s5-3 (-> this root quat)) + (vector-float*! s5-3 s5-3 -1.0) + (vector-normalize! s5-3 1.0) + ) + (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)) + (go-die this) + ) + ) + ((= msg 'die-fast) + (logior! (-> this draw status) (draw-control-status no-draw)) + (on-dying this) + (send-event (ppointer->process (-> this parent)) 'child-die) + (let ((s5-4 (-> this on-death))) + (if s5-4 + (script-eval s5-4 :vector (-> this root trans)) + ) + ) + (cleanup-for-death this) + (go (method-of-object this die-fast)) + ) + ((= msg 'victory) + (if (and (-> this enemy-info use-victory) + (not (and (-> this next-state) (= (-> this next-state name) 'victory))) + (and (< 0.0 (-> this hit-points)) + (zero? (-> this fated-time)) + (not (logtest? (-> this focus-status) (focus-status grabbed))) + ) + ) + (go (method-of-object this victory)) + ) + ) + ((= msg 'nav-control) + (if (nonzero? (-> this nav)) + (-> this nav) + ) + ) + ((= msg 'push-trans) + (move-by-vector! (-> this root) (the-as vector (-> block param 0))) + ) + ((= msg 'move-trans) + (move-to-point! (-> this root) (the-as vector (-> block param 0))) + ) + ((= msg 'shadow) + (cond + ((-> block param 0) + (let ((v1-371 (-> this draw shadow-ctrl))) + (logclear! (-> v1-371 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + (else + (let ((v1-374 (-> this draw shadow-ctrl))) + (logior! (-> v1-374 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + ) + ((= msg 'color-effect) + (case (-> block param 0) + (('dark) + (let ((f30-2 (rand-vu-float-range 0.2 1.0))) + (set-vector! (-> this draw color-mult) (lerp 1.0 1.0 f30-2) (lerp 1.0 0.0 f30-2) (lerp 1.0 1.0 f30-2) 1.0) + (set! s5-6 (-> this draw color-emissive)) + (set! (-> s5-6 x) (lerp 0.0 0.3 f30-2)) + (set! (-> s5-6 y) (lerp 0.0 0.0 f30-2)) + (set! (-> s5-6 z) (lerp 0.0 0.3 f30-2)) + ) + (set! (-> s5-6 w) 1.0) + s5-6 + ) + ((#f) + (set-vector! (-> this draw color-mult) 1.0 1.0 1.0 1.0) + (set! s5-6 (-> this draw color-emissive)) + (set! (-> s5-6 quad) (the-as uint128 0)) + s5-6 + ) + ) + ) + ((= msg 'enable-envmap) + (cond + ((-> block param 0) + (logclear! (-> this draw global-effect) (draw-control-global-effect disable-envmap)) + #t + ) + (else + (logior! (-> this draw global-effect) (draw-control-global-effect disable-envmap)) + #t + ) + ) + ) + ) + ) + +(defmethod lerp-damage ((this enemy) (arg0 float)) + (lerp-scale 0.0 (-> this enemy-info default-hit-points) arg0 20480.0 122880.0) + ) + +(defmethod scale-impact-vel-y! ((this enemy) (arg0 vector) (arg1 vector) (arg2 float)) + (set! (-> arg0 quad) (-> arg1 quad)) + (vector-normalize! arg0 arg2) + (set! (-> arg0 y) (lerp-scale + (-> this enemy-info knocked-hard-vy-lo) + (-> this enemy-info knocked-hard-vy-hi) + arg2 + 20480.0 + 204800.0 + ) + ) + (vector-normalize! arg0 arg2) + arg0 + ) + +(defmethod get-damage-from-attack ((this enemy) (arg0 object) (arg1 event-message-block)) + (let ((v1-0 (the-as object (-> arg1 param 1)))) + (if (logtest? (attack-mask damage) (-> (the-as attack-info v1-0) mask)) + (-> (the-as attack-info v1-0) damage) + (penetrate-using->damage (-> this incoming penetrate-using)) + ) + ) + ) + +(defmethod enemy-method-63 ((this enemy) (arg0 float)) + (let ((f0-1 (fmax 0.0 (fmin arg0 (-> this hit-points))))) + (cond + ((and (= (-> this incoming knocked-type) (knocked-type blue-shot)) (= f0-1 (-> this hit-points)) (< 0.0 f0-1)) + (cond + ((zero? (-> this fated-time)) + (set-time! (-> this fated-time)) + (+ -1.0 f0-1) + ) + ((not (time-elapsed? (-> this fated-time) (seconds 1))) + (+ -1.0 f0-1) + ) + (else + f0-1 + ) + ) + ) + (else + f0-1 + ) + ) + ) + ) + +(defmethod penetrate->next-state ((this enemy)) + (let ((gp-0 (-> this incoming penetrate-using))) + (cond + ((and (logtest? (penetrate jak-dark-blackhole) gp-0) #t) + 'go-gun-dark-2-stretch + ) + ((and (logtest? (penetrate jak-dark-nuke) (-> this incoming penetrate-using)) (enemy-method-150 this)) + 'go-gun-dark-3-nuke + ) + ((logtest? gp-0 (-> this penetrate-flinch)) + 'hit-flinch + ) + ((logtest? gp-0 (-> this penetrate-knocked)) + 'hit-knocked + ) + (else + 'hit + ) + ) + ) + ) + +(defmethod damage-enemy! ((this enemy) (arg0 object) (arg1 event-message-block)) + (let* ((f0-0 (get-damage-from-attack this arg0 arg1)) + (f30-0 (enemy-method-63 this f0-0)) + ) + (set! (-> this hit-points) (- (-> this hit-points) f30-0)) + (if (not (logtest? (-> this enemy-flags) (enemy-flag auto-reset-penetrate))) + (set! (-> this root penetrated-by) (get-penetrated-by this)) + ) + f30-0 + ) + ) + +(defmethod find-offending-pfoc ((this enemy) (arg0 process) (arg1 attack-info)) + (find-offending-process-focusable arg0 arg1) + ) + +(defmethod enemy-touch-handler ((this enemy) (arg0 process) (arg1 event-message-block)) + (let* ((s4-0 (-> arg1 param 0)) + (s2-0 arg0) + (s3-0 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (when (and s4-0 s3-0) + (cond + ((and (focus-test? this dangerous) + (and s3-0 + (not (logtest? (-> (the-as process-focusable s3-0) focus-status) (focus-status disable dead ignore grabbed))) + ) + ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s4-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 s4-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 s4-0) a3-2) + ) + ) + ((and ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s4-0) + (-> this root) + (collide-action no-standon) + (collide-action) + ) + (not (logtest? (-> this root penetrated-by) + (-> (the-as collide-shape (-> (the-as process-drawable s3-0) root)) penetrate-using) + ) + ) + ) + (if (send-shoves (-> this root) arg0 (the-as touching-shapes-entry s4-0) 0.7 6144.0 16384.0) + (send-event this 'bouncing-off arg0) + ) + ) + ) + ) + ) + ) + +;; 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 + (when (or (and (and (-> this next-state) (= (-> this next-state name) 'knocked)) + (logtest? (process-mask crate) (-> arg0 mask)) + ) + (and (and (-> this next-state) (= (-> this next-state name) 'jump)) + (logtest? (process-mask target sidekick crate bot) (-> arg0 mask)) + ) + ) + (when ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s4-0) + (-> this root) + (collide-action solid semi-solid deadly) + (collide-action) + ) + (let ((a3-2 (if ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s4-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 s4-0) a3-2) + ) + ) + ) + ) + ) + ) + +(defbehavior enemy-event-handler enemy ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (event-handler self arg0 arg1 arg2 arg3) + ) + +(defbehavior enemy-simple-post enemy () + (enemy-common-post self) + (update-transforms (-> self root)) + 0 + (none) + ) + +(defbehavior enemy-falling-post enemy () + (let ((gp-0 (-> self root))) + (cond + ((focus-test? self under-water) + (accelerate-fall! self (-> gp-0 transv)) + ) + (else + (let ((a1-1 (new-stack-vector0))) + (vector-v++! (-> gp-0 transv) (compute-acc-due-to-gravity gp-0 a1-1 (-> self enemy-info slip-factor))) + ) + ) + ) + (let ((a2-1 (new 'stack-no-clear 'collide-query))) + (set! (-> a2-1 collide-with) (-> gp-0 root-prim prim-core collide-with)) + (set! (-> a2-1 ignore-process0) self) + (set! (-> a2-1 ignore-process1) #f) + (set! (-> a2-1 ignore-pat) (logior (new 'static 'pat-surface :noendlessfall #x1) (-> gp-0 pat-ignore-mask))) + (set! (-> a2-1 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide gp-0 (-> gp-0 transv) a2-1 (meters 0)) + ) + ) + (apply-friction self) + (enemy-common-post self) + (none) + ) + +(defmethod accelerate-fall! ((this enemy) (arg0 vector)) + (let* ((f2-0 0.8) + (f0-1 (fmax 0.0 (+ 1.0 (* 60.0 (seconds-per-frame) (+ -1.0 f2-0))))) + ) + (vector-float*! arg0 arg0 f0-1) + ) + (set! (-> arg0 y) (+ (-> arg0 y) (* -204800.0 (seconds-per-frame)))) + ) + +(defbehavior enemy-die-falling-post enemy () + (let ((gp-0 (-> self root))) + (if (focus-test? self under-water) + (accelerate-fall! self (-> gp-0 transv)) + (vector-v++! (-> gp-0 transv) (compute-acc-due-to-gravity gp-0 (new-stack-vector0) 0.0)) + ) + (let ((s4-1 (new 'stack-no-clear 'collide-query)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> gp-0 trans quad)) + (vector-v++! s5-1 (-> gp-0 transv)) + (when (find-ground + gp-0 + s4-1 + (-> self enemy-info recover-gnd-collide-with) + 8192.0 + 81920.0 + 1024.0 + (the-as process #f) + ) + (when (>= (-> gp-0 gspot-pos y) (-> s5-1 y)) + (set! (-> s5-1 y) (-> gp-0 gspot-pos y)) + (vector-reset! (-> gp-0 transv)) + ) + ) + (move-to-point! gp-0 s5-1) + ) + ) + (enemy-common-post self) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs object. +(defmethod enemy-method-91 ((this enemy) (arg0 enemy-jump-info)) + #f + ) + +(defmethod init-jump-info! ((this enemy) (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) 8192.0 81920.0 1024.0) + (set! (-> arg0 dest-pos y) (-> s4-0 best-other-tri intersect y)) + ) + ) + (setup-jump! this arg0) + (none) + ) + +(defmethod setup-jump! ((this enemy) (arg0 enemy-jump-info)) + (let* ((f0-0 (vector-vector-xz-distance (-> arg0 start-pos) (-> arg0 dest-pos))) + (f0-2 (fmax (-> this enemy-info jump-height-min) (* (-> this enemy-info jump-height-factor) f0-0))) + ) + (setup-from-to-height! (-> arg0 traj) (-> arg0 start-pos) (-> arg0 dest-pos) f0-2 -4.551111) + ) + (none) + ) + +(defmethod on-ground? ((this enemy) (arg0 enemy-jump-info)) + (let ((gp-0 (-> this root))) + (when (< (-> gp-0 transv y) 0.0) + (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)) + ) + ) + ) + +(defmethod move-to-gspot! ((this enemy)) + (let* ((v1-0 (-> this root)) + (f0-0 (-> v1-0 gspot-pos y)) + ) + (if (< (-> v1-0 trans y) f0-0) + (set! (-> v1-0 trans y) f0-0) + ) + ) + (set! (-> this root transv y) 0.0) + ) + +(defmethod enemy-method-101 ((this enemy) (arg0 int) (arg1 enemy-jump-info)) + 0 + (none) + ) + +(defmethod in-jump-handler ((this enemy) (arg0 int) (arg1 enemy-jump-info)) + (case arg0 + ((2 3) + (let ((f30-0 (the float (-> arg1 hang-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) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod jump-wind-up-anim ((this enemy) (arg0 enemy-jump-info)) + (let ((a0-1 (-> this skel root-channel 0))) + (set! (-> a0-1 param 0) 1.0) + (joint-control-channel-group! a0-1 (the-as art-joint-anim #f) num-func-loop!) + ) + (ja-channel-push! 1 (seconds 0.1)) + (let ((a1-3 (-> this draw art-group data (-> this enemy-info jump-wind-up-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 jump-in-air-anim ((this enemy) (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 + ) + +(defmethod jump-land-anim ((this enemy) (arg0 enemy-jump-info)) + (let ((a0-1 (-> this skel root-channel 0))) + (set! (-> a0-1 param 0) 1.0) + (joint-control-channel-group! a0-1 (the-as art-joint-anim #f) num-func-loop!) + ) + (ja-channel-push! 1 (seconds 0.075)) + (let ((a1-3 (-> this draw art-group data (-> this enemy-info jump-land-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 jump-anim-handler ((this enemy) (arg0 int) (arg1 enemy-jump-info)) + (local-vars (s5-0 symbol)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (not (jump-wind-up-anim this arg1)) + ) + ((= v1-0 1) + (set! s5-0 (ja-done? 0)) + (let ((a0-4 (-> this skel root-channel 0))) + (set! (-> a0-4 param 0) (the float (+ (-> a0-4 frame-group frames num-frames) -1))) + (set! (-> a0-4 param 1) (-> arg1 anim-speed)) + (joint-control-channel-group-eval! a0-4 (the-as art-joint-anim #f) num-func-seek!) + ) + (ja-blend-eval) + s5-0 + ) + ((= v1-0 2) + (jump-in-air-anim this arg1) + #f + ) + ((= v1-0 3) + (set! s5-0 (ja-done? 0)) + (let ((a0-9 (-> this skel root-channel 0))) + (set! (-> a0-9 param 0) (the float (+ (-> a0-9 frame-group frames num-frames) -1))) + (set! (-> a0-9 param 1) (-> arg1 anim-speed)) + (joint-control-channel-group-eval! a0-9 (the-as art-joint-anim #f) num-func-seek!) + ) + (ja-blend-eval) + s5-0 + ) + ((= v1-0 4) + (not (jump-land-anim this arg1)) + ) + ((= v1-0 5) + (set! s5-0 (ja-done? 0)) + (let ((a0-14 (-> this skel root-channel 0))) + (set! (-> a0-14 param 0) (the float (+ (-> a0-14 frame-group frames num-frames) -1))) + (set! (-> a0-14 param 1) (-> arg1 anim-speed)) + (joint-control-channel-group-eval! a0-14 (the-as art-joint-anim #f) num-func-seek!) + ) + (ja-blend-eval) + s5-0 + ) + (else + #t + ) + ) + ) + ) + +(defmethod enemy-method-109 ((this enemy)) + #f + ) + +(defmethod enemy-method-50 ((this enemy) (arg0 int)) + 0 + (none) + ) + +(if #t + (set! *shockwave-knock-scalar* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 0.5 :y 1.0 :z 1.5 :w 2.5) + :one-over-x-deltas (new 'static 'vector :x 1.6666666 :y 0.71428573 :z 1.0 :w 1.0) + ) + ) + ) + +(defmethod knocked-handler ((this enemy) (arg0 vector)) + (local-vars (v0-22 number)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf24 :class vf) + (vf25 :class vf) + (vf26 :class vf) + (vf27 :class vf) + (vf28 :class vf) + (vf29 :class vf) + ) + (init-vf0-vector) + (get-knockback-dir! this arg0) + (let ((s5-0 (-> this enemy-info))) + (case (-> this incoming knocked-type) + (((knocked-type explode-or-darkjak)) + (let ((f30-0 (rnd-float-range this 0.0 1.0))) + (vector-float*! arg0 arg0 (lerp (-> s5-0 knocked-hard-vxz-lo) (-> s5-0 knocked-hard-vxz-hi) f30-0)) + (set! (-> arg0 y) (lerp (-> s5-0 knocked-hard-vy-lo) (-> s5-0 knocked-hard-vy-hi) f30-0)) + ) + ) + (((knocked-type mech-punch)) + (let ((f30-1 (rnd-float-range this 0.0 1.0))) + (vector-float*! arg0 arg0 (lerp (-> s5-0 knocked-medium-vxz-lo) (-> s5-0 knocked-medium-vxz-hi) f30-1)) + (set! (-> arg0 y) (lerp (-> s5-0 knocked-medium-vy-lo) (-> s5-0 knocked-medium-vy-hi) f30-1)) + ) + ) + (((knocked-type dark-shot)) + (let ((f30-2 (rnd-float-range this 0.0 1.0))) + (vector-float*! arg0 arg0 (lerp (-> s5-0 knocked-huge-vxz-lo) (-> s5-0 knocked-huge-vxz-hi) f30-2)) + (set! (-> arg0 y) (lerp (-> s5-0 knocked-huge-vy-lo) (-> s5-0 knocked-huge-vy-hi) f30-2)) + ) + ) + (((knocked-type yellow-shot)) + (vector-rotate90-around-y! arg0 arg0) + (let ((v1-9 (new 'stack-no-clear 'vector))) + (vector-! v1-9 (-> this incoming attacker-pos) (-> this root trans)) + (set! (-> v1-9 y) 0.0) + (if (< 0.0 (vector-dot v1-9 arg0)) + (vector-negate! arg0 arg0) + ) + ) + (let ((f30-3 (rnd-float-range this 0.0 1.0))) + (vector-float*! arg0 arg0 (lerp (-> s5-0 knocked-yellow-vxz-lo) (-> s5-0 knocked-yellow-vxz-hi) f30-3)) + (set! (-> arg0 y) (lerp (-> s5-0 knocked-yellow-vy-lo) (-> s5-0 knocked-yellow-vy-hi) f30-3)) + ) + ) + (((knocked-type red-shot)) + (let ((f30-4 0.0)) + (cond + ((logtest? (penetrate jak-red-shockwave) (-> this incoming penetrate-using)) + (format 0 "Intensity ~f (handle ~d)~%" f30-4 (process->handle this)) + ) + (else + (let* ((f1-2 (vector-vector-xz-distance-squared (target-pos 0) (-> this root trans))) + (f0-26 1.0) + (f2-0 61440.0) + (f1-3 (fmin f1-2 (* f2-0 f2-0))) + (f2-3 61440.0) + ) + (set! f30-4 (* (- f0-26 (/ f1-3 (* f2-3 f2-3))) (rnd-float-range this 0.8 1.0))) + ) + ) + ) + (vector-float*! arg0 arg0 (lerp (-> s5-0 knocked-red-vxz-lo) (-> s5-0 knocked-red-vxz-hi) f30-4)) + (set! (-> arg0 y) (lerp (-> s5-0 knocked-red-vy-lo) (-> s5-0 knocked-red-vy-hi) f30-4)) + ) + (when (logtest? (penetrate jak-red-shockwave) (-> this incoming penetrate-using)) + (let ((a0-31 *shockwave-knock-scalar*) + (f0-34 (-> this incoming intensity)) + (a1-23 (new 'stack-no-clear 'vector)) + (v1-33 (new 'stack-no-clear 'vector)) + ) + (let ((a2-18 f0-34)) + (.mov vf27 a2-18) + ) + (.lvf vf24 (&-> a0-31 xs quad)) + (.lvf vf25 (&-> a0-31 ys quad)) + (.lvf vf26 (&-> a0-31 one-over-x-deltas quad)) + (.min.w.vf vf27 vf27 vf0) + (.max.x.vf vf27 vf27 vf0) + (.add.x.vf vf28 vf24 vf27) + (.mul.w.vf acc vf25 vf0) + (.add.mul.vf vf29 vf28 vf26 acc) + (.svf (&-> a1-23 quad) vf28) + (.svf (&-> v1-33 quad) vf29) + (let ((a0-32 (-> a1-23 z)) + (a1-24 (-> a1-23 y)) + ) + (b! (>= (the-as int a0-32) 0) cfg-23 :delay (set! v0-22 (-> v1-33 z))) + (b! (>= (the-as int a1-24) 0) cfg-23 :delay (set! v0-22 (-> v1-33 y))) + ) + (set! v0-22 (-> v1-33 x)) + ) + (label cfg-23) + (let ((f0-35 (the-as float v0-22))) + (vector-float*! arg0 arg0 f0-35) + ) + ) + ) + (((knocked-type blue-shot)) + (let* ((f1-5 (vector-vector-xz-distance-squared (target-pos 0) (-> this root trans))) + (f0-36 1.0) + (f2-6 122880.0) + (f1-6 (fmin f1-5 (* f2-6 f2-6))) + (f2-9 122880.0) + (f30-7 (* (- f0-36 (/ f1-6 (* f2-9 f2-9))) (rnd-float-range this 0.8 1.0))) + ) + (vector-float*! arg0 arg0 (lerp (-> s5-0 knocked-blue-vxz-lo) (-> s5-0 knocked-blue-vxz-hi) f30-7)) + (cond + ((or (>= (the-as uint 4) (-> this incoming blue-juggle-count)) (handle->process (-> this ragdoll-proc))) + (set! (-> arg0 y) (lerp (-> s5-0 knocked-blue-vy-lo) (-> s5-0 knocked-blue-vy-hi) f30-7)) + ) + (else + (if (zero? (rnd-int this 3)) + (set! (-> arg0 y) 40960.0) + ) + ) + ) + ) + ) + (((knocked-type vehicle)) + (let ((v0-4 (the-as object arg0))) + (set! (-> (the-as vector v0-4) quad) (-> this incoming attack-direction quad)) + v0-4 + ) + ) + (else + (let ((f30-8 (rnd-float-range this 0.0 1.0))) + (vector-float*! arg0 arg0 (lerp (-> s5-0 knocked-soft-vxz-lo) (-> s5-0 knocked-soft-vxz-hi) f30-8)) + (set! (-> arg0 y) (lerp (-> s5-0 knocked-soft-vy-lo) (-> s5-0 knocked-soft-vy-hi) f30-8)) + ) + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch float vs degrees. +(defmethod get-knockback-angle ((this enemy)) + (let ((f30-0 (quaternion-y-angle (-> this root quat)))) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot) (knocked-type blue-shot)) + (let ((a0-5 (handle->process (-> this focus handle)))) + (when a0-5 + (let ((v1-9 (get-trans (the-as process-focusable a0-5) 0))) + (set! f30-0 (atan (- (-> v1-9 x) (-> this root trans x)) (- (-> v1-9 z) (-> this root trans z)))) + ) + ) + ) + ) + (else + (let* ((v1-13 (-> this root transv)) + (f28-0 (atan (-> v1-13 x) (-> v1-13 z))) + (f1-2 (deg- f30-0 f28-0)) + (f2-0 (fabs f1-2)) + (f0-6 (-> this enemy-info knocked-seek-ry-clamp)) + ) + (when (and (< f0-6 f2-0) (< f2-0 (- 32768.0 f0-6))) + (set! f30-0 (+ (cond + ((< f2-0 16384.0) + (if (>= f1-2 0.0) + f0-6 + (- f0-6) + ) + ) + ((>= f1-2 0.0) + (- 32768.0 f0-6) + ) + (else + (+ -32768.0 f0-6) + ) + ) + f28-0 + ) + ) + (if (< f30-0 0.0) + (set! f30-0 (+ 65536.0 f30-0)) + ) + ) + ) + ) + ) + (the-as degrees f30-0) + ) + ) + +(defmethod knocked-anim ((this enemy) (arg0 enemy-knocked-info)) + (ja-channel-push! 1 0) + (let ((a1-2 (-> this draw art-group data (-> this enemy-info knocked-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 knocked-land-anim ((this enemy) (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 enemy) (arg0 enemy-knocked-info)) + (let ((gp-0 (-> this root))) + (or (>= (-> arg0 on-surface-count) 3) + (and (logtest? (-> gp-0 status) (collide-status on-ground)) (>= 16384.0 (-> gp-0 transv y))) + (and (>= (-> arg0 move-count) 3) + (let ((f0-1 40.96)) + (>= (* f0-1 f0-1) (vector-vector-distance-squared (-> gp-0 trans-old) (-> gp-0 trans-old-old))) + ) + (let ((f0-4 40.96)) + (>= (* f0-4 f0-4) (vector-vector-distance-squared (-> gp-0 trans-old-old) (-> gp-0 trans-old-old-old))) + ) + ) + ) + ) + ) + +(defmethod within-gspot-range? ((this enemy)) + (let ((gp-0 (-> this root)) + (a1-0 (new 'stack-no-clear 'collide-query)) + ) + (if (or (< 0.0 (-> this root transv y)) (begin + (find-ground + gp-0 + a1-0 + (-> this enemy-info recover-gnd-collide-with) + 8192.0 + 81920.0 + 1024.0 + (the-as process #f) + ) + (let ((f0-2 (- (-> gp-0 trans y) (-> gp-0 gspot-pos y)))) + (and (>= f0-2 -1228.8) (>= 6144.0 f0-2)) + ) + ) + ) + #f + #t + ) + ) + ) + +(defmethod enemy-method-90 ((this enemy) (arg0 ragdoll-proc)) + (let* ((s4-0 (-> arg0 ragdoll)) + (s2-0 (-> s4-0 ragdoll-joints)) + (s1-0 + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) (-> s4-0 orient-tform) (-> s4-0 orient-tform w)) + ) + (s3-0 (new 'stack-no-clear 'matrix)) + (s5-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> this root quat))) + ) + (quaternion-normalize! (quaternion*! s1-0 (the-as quaternion (-> s2-0 0)) s1-0)) + (quaternion->matrix s3-0 s1-0) + (if (logtest? (-> s4-0 ragdoll-flags) (ragdoll-flag mirror)) + (matrix*! s3-0 s3-0 (-> s4-0 mirror)) + ) + (vector-flatten! (-> s5-0 fvec) (-> s3-0 uvec) (-> s5-0 uvec)) + (vector-normalize! (-> s5-0 fvec) 1.0) + (vector-cross! (-> s5-0 rvec) (-> s5-0 uvec) (-> s5-0 fvec)) + (matrix->quaternion (-> this root quat) s5-0) + ) + 0 + (none) + ) + +(defmethod knocked-anim-handler ((this enemy) (arg0 int) (arg1 enemy-knocked-info)) + (local-vars (s5-0 symbol)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (knocked-anim this arg1) + (set! s5-0 #f) + ) + ((= v1-0 1) + (set! s5-0 (ja-done? 0)) + (let ((a0-4 (-> this skel root-channel 0))) + (set! (-> a0-4 param 0) (the float (+ (-> a0-4 frame-group frames num-frames) -1))) + (set! (-> a0-4 param 1) (-> arg1 anim-speed)) + (joint-control-channel-group-eval! a0-4 (the-as art-joint-anim #f) num-func-seek!) + ) + ) + ((= v1-0 2) + (freeze-hit-end) + (set! s5-0 (not (knocked-land-anim this arg1))) + (set! (-> this incoming blue-juggle-count) (the-as uint 0)) + ) + ((= v1-0 3) + (set! s5-0 (ja-done? 0)) + (let ((a0-9 (-> this skel root-channel 0))) + (set! (-> a0-9 param 0) (the float (+ (-> a0-9 frame-group frames num-frames) -1))) + (set! (-> a0-9 param 1) (-> arg1 anim-speed)) + (joint-control-channel-group-eval! a0-9 (the-as art-joint-anim #f) num-func-seek!) + ) + ) + ((= v1-0 4) + (vector-reset! (-> this root transv)) + (set! s5-0 #t) + ) + (else + (set! s5-0 #t) + ) + ) + ) + s5-0 + ) + +(defbehavior ja-group-index? enemy ((arg0 int)) + (ja-group? (-> self draw art-group data arg0)) + ) + +(defmethod enemy-method-123 ((this enemy)) + #t + ) + +(defmethod ragdoll-spawn! ((this enemy) (arg0 symbol) (arg1 symbol)) + (local-vars (s2-0 process)) + (with-pp + (when (and (enemy-method-123 this) (-> this enemy-info ragdoll-info)) + (let ((s3-0 (handle->process (-> this ragdoll-proc)))) + (cond + (s3-0 + (set! s2-0 s3-0) + ) + (else + (set! (-> this ragdoll-proc) + (ppointer->handle + (process-spawn + ragdoll-proc + (-> this enemy-info ragdoll-info) + :name "ragdoll-proc" + :to this + :stack-size #x5000 + ) + ) + ) + (set! s2-0 (handle->process (-> this ragdoll-proc))) + (when (not s2-0) + (format 0 "deactivated ~A because a ragdoll allocate failed~%" (-> this name)) + (deactivate this) + ) + (set! (-> this enemy-flags) + (the-as enemy-flag (logior (enemy-flag auto-death-phase-out) (-> this enemy-flags))) + ) + ) + ) + (when (and (-> this draw) (-> this draw shadow-ctrl)) + (let ((v1-29 (-> this draw shadow-ctrl))) + (logior! (-> v1-29 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + (if (-> (the-as ragdoll-proc s2-0) ragdoll) + (logior! (-> (the-as ragdoll-proc s2-0) ragdoll ragdoll-flags) (ragdoll-flag rf3 rf4)) + ) + (let ((s1-0 (new 'stack-no-clear 'vector))) + (vector-float*! s1-0 (-> this root transv) (seconds-per-frame)) + (if s3-0 + (ragdoll-proc-method-15 (the-as ragdoll-proc s2-0) arg1 (the-as vector #f) #f) + (ragdoll-proc-method-15 (the-as ragdoll-proc s2-0) arg1 (the-as vector #f) #t) + ) + (if arg0 + (ragdoll-method-23 + (-> (the-as ragdoll-proc s2-0) ragdoll) + (-> this incoming attack-position) + s1-0 + (-> this enemy-info ragdoll-rotate-velocity-mult) + #t + ) + ) + (vector-float*! s1-0 s1-0 (/ 1.0 (-> pp clock time-adjust-ratio))) + (let ((v0-1 (-> (the-as ragdoll-proc s2-0) ragdoll ragdoll-joints 0 velocity))) + (set! (-> v0-1 quad) (-> s1-0 quad)) + v0-1 + ) + ) + ) + ) + ) + ) + +(defmethod deactivate-ragdoll! ((this enemy)) + (when (and (enemy-method-123 this) (-> this enemy-info ragdoll-info)) + (let ((a0-3 (handle->process (-> this ragdoll-proc)))) + (when a0-3 + (when (and (-> this draw) (-> this draw shadow-ctrl)) + (let ((v1-14 (-> this draw shadow-ctrl))) + (logclear! (-> v1-14 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + (deactivate a0-3) + ) + ) + ) + 0 + (none) + ) + +(defmethod ragdoll-settled? ((this enemy)) + (let ((s5-0 (handle->process (-> this ragdoll-proc)))) + (or (not s5-0) + (or (ragdoll-proc-method-19 (the-as ragdoll-proc s5-0)) + (and (time-elapsed? (-> this state-time) (seconds 0.1)) + (let ((f0-1 (if (= (-> this hit-points) 0.0) + 4096.0 + 49152.0 + ) + ) + (f1-2 (if (= (-> this hit-points) 0.0) + 364.0889 + 16384.0 + ) + ) + ) + (and (and (< (vector-length (-> (the-as ragdoll-proc s5-0) ragdoll ragdoll-joints 0 velocity)) + (* f0-1 (seconds-per-frame)) + ) + (< (cos (* f1-2 (seconds-per-frame))) (-> (the-as ragdoll-proc s5-0) ragdoll rotate-vel w)) + ) + (and (not (enemy-method-109 this)) (not (within-gspot-range? this))) + ) + ) + ) + ) + ) + ) + ) + +(defmethod disable-ragdoll ((this enemy)) + (let ((s5-0 (handle->process (-> this ragdoll-proc)))) + (when s5-0 + (disable-for-duration (the-as ragdoll-proc s5-0) (-> this enemy-info ragdoll-blend-out-time)) + (logclear! (-> (the-as ragdoll-proc s5-0) ragdoll ragdoll-flags) (ragdoll-flag rf9)) + (enemy-method-90 this (the-as ragdoll-proc s5-0)) + ) + ) + 0 + (none) + ) + +(defmethod should-move-to-ground? ((this enemy)) + (-> this enemy-info move-to-ground) + ) diff --git a/goal_src/jak3/engine/ai/traffic-h.gc b/goal_src/jak3/engine/ai/traffic-h.gc index 4f30b5d649..58b79c95f4 100644 --- a/goal_src/jak3/engine/ai/traffic-h.gc +++ b/goal_src/jak3/engine/ai/traffic-h.gc @@ -37,20 +37,78 @@ ;; +++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 +(define-extern traffic-start (function none)) +(define-extern traffic-kill (function none)) +(define-extern ctywide-entity-hack (function none)) + +;; +++vehicle-type +(defenum vehicle-type + :type int32 + (h-bike-a 0) + (h-bike-b 1) + (h-bike-c 2) + (h-car-a 3) + (h-car-b 4) + (h-car-c 5) + (h-bike-d 6) + (h-hellcat 7) + (h-warf 8) + (h-glider 9) + (h-sled 10) + (h-kg-pickup 11) + (v-turtle 12) + (v-snake 13) + (v-scorpion 14) + (v-toad 15) + (v-fox 16) + (v-rhino 17) + (v-mirage 18) + (v-x-ride 19) + (v-marauder 20) + (v-faccar 21) + (v-catapult 22) + (v-marauder-b 23) + (test-car 25) + (wbike-test 26) + (vt27 27) + (evan-test-bike 29) + ) +;; ---vehicle-type + + ;; DECOMP BEGINS (define *traffic-manager* (the-as traffic-manager #f)) @@ -109,13 +167,13 @@ (deftype traffic-info (structure) - ((ctywide-level basic) - (vehicle-level basic) - (race-vehicle-level basic) - (traffic-object-levels level 29) - (vehicle-levels level 44) + ((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)) ) ) @@ -136,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/aligner-h.gc b/goal_src/jak3/engine/anim/aligner-h.gc index 3c0d8a3235..605bfdc09b 100644 --- a/goal_src/jak3/engine/anim/aligner-h.gc +++ b/goal_src/jak3/engine/anim/aligner-h.gc @@ -68,9 +68,9 @@ (new (symbol type process) _type_) (compute-alignment! (_type_) transformq) (align! (_type_ align-opts float float float) trsqv) - (align-control-method-11 () none) - (align-control-method-12 () none) - (align-control-method-13 () none) + (align-vel-and-quat-only! (_type_ align-opts vector int float float) trsqv) + (first-transform (_type_) transform) + (second-transform (_type_) transform) ) ) diff --git a/goal_src/jak3/engine/anim/aligner.gc b/goal_src/jak3/engine/anim/aligner.gc index 5afca9863c..82d3155633 100644 --- a/goal_src/jak3/engine/anim/aligner.gc +++ b/goal_src/jak3/engine/anim/aligner.gc @@ -7,3 +7,208 @@ ;; DECOMP BEGINS +;; ERROR: Unsupported inline assembly instruction kind - [lw ra, return-from-thread(s7)] +;; ERROR: Unsupported inline assembly instruction kind - [jr ra] +(defmethod compute-alignment! ((this align-control)) + (local-vars (a0-10 symbol) (s7-0 none) (ra-0 int)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (update-anim-data (-> this process skel)) + (let ((s5-0 (-> this process skel active-channels))) + (dotimes (s4-0 (the-as int s5-0)) + (let* ((a0-4 (-> this process skel channel s4-0)) + (v1-7 (-> a0-4 frame-group)) + ) + (case (-> a0-4 command) + (((joint-control-command stack) (joint-control-command stack1)) + ) + (else + (when (!= (-> v1-7 type) art-joint-anim) + (go process-drawable-art-error "align joint-anim") + ;; og:preserve-this + ;; (.lw ra-0 return-from-thread s7-0) + ;; (.jr ra-0) + (abandon-thread) + (nop!) + 0 + ) + ) + ) + ) + ) + ) + (let* ((a0-9 (-> this process skel root-channel 0)) + (v1-18 (-> a0-9 frame-group)) + (f0-0 (-> a0-9 frame-num)) + ) + (= (-> a0-9 num-func) num-func-loop!) + (cond + ((or (not v1-18) (!= (-> this frame-group) v1-18)) + (set! a0-10 #t) + ) + ((= (-> a0-9 num-func) num-func-loop!) + (set! a0-10 (< (* (-> a0-9 param 0) (- f0-0 (-> this frame-num))) 0.0)) + ) + (else + (set! a0-10 (= f0-0 0.0)) + ) + ) + (if a0-10 + (logior! (-> this flags) (align-flags disabled)) + (logclear! (-> this flags) (align-flags disabled)) + ) + (set! (-> this frame-group) v1-18) + (set! (-> this frame-num) f0-0) + ) + (mem-copy! (the-as pointer (-> this transform 1)) (the-as pointer (-> this transform)) 48) + (quaternion-copy! (the-as quaternion (-> this transform 1 rot)) (-> this align quat)) + (set! (-> this transform 1 scale quad) (-> this align scale quad)) + (let* ((a2-5 (-> this matrix 1)) + (a3-0 (-> this matrix)) + (v1-21 (-> a3-0 0 rvec quad)) + (a0-19 (-> a3-0 0 uvec quad)) + (a1-13 (-> a3-0 0 fvec quad)) + (a3-1 (-> a3-0 0 trans quad)) + ) + (set! (-> a2-5 rvec quad) v1-21) + (set! (-> a2-5 uvec quad) a0-19) + (set! (-> a2-5 fvec quad) a1-13) + (set! (-> a2-5 trans quad) a3-1) + ) + (let ((s5-1 (-> this process node-list data 1))) + (cspace<-matrix-no-push-joint! s5-1 (-> this process skel)) + (let* ((v1-25 (-> this matrix)) + (a3-2 (-> s5-1 bone transform)) + (a0-22 (-> a3-2 rvec quad)) + (a1-15 (-> a3-2 uvec quad)) + (a2-6 (-> a3-2 fvec quad)) + (a3-3 (-> a3-2 trans quad)) + ) + (set! (-> v1-25 0 rvec quad) a0-22) + (set! (-> v1-25 0 uvec quad) a1-15) + (set! (-> v1-25 0 fvec quad) a2-6) + (set! (-> v1-25 0 trans quad) a3-3) + ) + (let ((v1-26 (-> this transform))) + (let ((a0-24 (-> s5-1 bone transform trans)) + (a1-18 (-> this process root scale)) + ) + (.lvf vf4 (&-> a0-24 quad)) + (.lvf vf5 (&-> a1-18 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-26 0 trans quad) vf6) + ) + ) + (vector-! + (the-as vector (-> this delta)) + (the-as vector (-> this transform)) + (the-as vector (-> this transform 1)) + ) + (set-vector! + (-> this align scale) + (vector-length (the-as vector (-> this matrix))) + (vector-length (-> this matrix 0 uvec)) + (vector-length (-> this matrix 0 fvec)) + 1.0 + ) + (vector-! (-> this delta scale) (-> this align scale) (-> this transform 1 scale)) + (let ((a2-7 (matrix-inv-scale! (new 'stack-no-clear 'matrix) (-> this align scale)))) + (quaternion-normalize! + (matrix->quaternion (-> this align quat) (matrix*! a2-7 (the-as matrix (-> this matrix)) a2-7)) + ) + ) + (let ((a1-27 (quaternion-inverse! (new 'stack-no-clear 'quaternion) (the-as quaternion (-> this transform 1 rot)))) + ) + (quaternion-normalize! (quaternion*! (-> this delta quat) a1-27 (-> this align quat))) + ) + (-> this delta) + ) + ) + +;; WARN: Return type mismatch (inline-array transform) vs transform. +(defmethod first-transform ((this align-control)) + (the-as transform (-> this transform)) + ) + +(defmethod second-transform ((this align-control)) + (-> this transform 1) + ) + +(defmethod align! ((this align-control) (arg0 align-opts) (arg1 float) (arg2 float) (arg3 float)) + (when (not (logtest? (-> this flags) (align-flags disabled))) + (let* ((a0-1 (-> this process)) + (t9-0 (method-of-object a0-1 apply-alignment)) + (v1-4 (-> this delta)) + (t1-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> t1-0 x) arg1) + (set! (-> t1-0 y) arg2) + (set! (-> t1-0 z) arg3) + (set! (-> t1-0 w) 1.0) + (t9-0 a0-1 arg0 v1-4 t1-0) + ) + ) + (-> this process root) + ) + +(defmethod set-and-limit-velocity ((this trsqv) (arg0 int) (arg1 vector) (arg2 float)) + (with-pp + (let ((a0-1 (-> this transv))) + (when (logtest? arg0 4) + (set! (-> a0-1 x) (-> arg1 x)) + (set! (-> a0-1 z) (-> arg1 z)) + (let* ((v1-2 arg1) + (f0-8 + (fmin + (* (sqrtf (+ (* (-> v1-2 x) (-> v1-2 x)) (* (-> v1-2 z) (-> v1-2 z)))) (-> pp clock frames-per-second)) + arg2 + ) + ) + ) + (vector-xz-normalize! a0-1 f0-8) + ) + ) + ) + this + ) + ) + +(defmethod align-vel-and-quat-only! ((this align-control) (arg0 align-opts) (arg1 vector) (arg2 int) (arg3 float) (arg4 float)) + (with-pp + (when (not (logtest? (-> this flags) (align-flags disabled))) + (let ((s5-0 (-> this delta))) + (let ((a0-1 (-> this process root transv))) + (if (logtest? arg0 (align-opts adjust-y-vel)) + (set! (-> a0-1 y) (* (-> s5-0 trans y) arg3 (-> pp clock frames-per-second))) + ) + (when (logtest? arg0 (align-opts adjust-xz-vel)) + (set! (-> a0-1 x) (-> arg1 x)) + (set! (-> a0-1 z) (-> arg1 z)) + (let* ((v1-11 arg1) + (f0-9 (sqrtf (+ (* (-> v1-11 x) (-> v1-11 x)) (* (-> v1-11 z) (-> v1-11 z))))) + (v1-13 (-> s5-0 trans)) + (f0-11 (* (fmin f0-9 (* (sqrtf (+ (* (-> v1-13 x) (-> v1-13 x)) (* (-> v1-13 z) (-> v1-13 z)))) arg4)) + (-> pp clock frames-per-second) + ) + ) + (t9-0 vector-xz-normalize!) + ) + (set! (-> this last-speed) f0-11) + (t9-0 a0-1 f0-11) + ) + ) + ) + (if (logtest? arg0 (align-opts adjust-quat)) + (quaternion-normalize! (quaternion*! (-> this process root quat) (-> this process root quat) (-> s5-0 quat))) + ) + ) + ) + (-> this process root) + ) + ) diff --git a/goal_src/jak3/engine/anim/fma-sphere.gc b/goal_src/jak3/engine/anim/fma-sphere.gc index 68e41aaa20..833f55e2ae 100644 --- a/goal_src/jak3/engine/anim/fma-sphere.gc +++ b/goal_src/jak3/engine/anim/fma-sphere.gc @@ -5,5 +5,270 @@ ;; name in dgo: fma-sphere ;; dgos: GAME +;; +++fma-sphere-mode +(defenum fma-sphere-mode + :type uint32 + :bitfield #t + (nav 0) + (kill-once 1) + (danger 2) + (deadly-overlap 3) + ) +;; ---fma-sphere-mode + + ;; DECOMP BEGINS +(deftype fma-sphere-params (structure) + ((mode fma-sphere-mode) + (proc process-focusable) + (track-joint int32) + (duration time-frame) + (sphere sphere) + (danger traffic-danger-info) + (nav-mesh-id uint32) + ) + ) + + +(deftype fma-sphere (process-drawable) + ((root collide-shape :override) + (first-time? symbol) + (mode fma-sphere-mode) + (track-handle handle) + (track-joint int32) + (attack-id uint32) + (duration time-frame) + (sphere sphere :inline) + (danger traffic-danger-info :inline) + ) + (:state-methods + idle + ) + ) + + +(defmethod run-logic? ((this fma-sphere)) + "Should this process be run? Checked by execute-process-tree." + (or (logtest? *display-scene-control* (scene-controls display-controls)) + (and *display-nav-marks* (logtest? (-> this mode) (fma-sphere-mode nav))) + (logtest? (-> this mode) (fma-sphere-mode deadly-overlap)) + (>= (-> this track-joint) 0) + (-> this first-time?) + ) + ) + +(defstate idle (fma-sphere) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (let ((v1-1 (-> block param 0))) + (if v1-1 + (send-event + proc + 'attack + v1-1 + (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 'eco-red) + (attacker-velocity (-> self root transv)) + (knock (knocked-type explode-or-darkjak)) + ) + ) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self first-time?) #f) + (if (logtest? (-> self mode) (fma-sphere-mode kill-once)) + (send-event *traffic-manager* 'kill-traffic-sphere (-> self sphere)) + ) + ) + :trans (behavior () + (local-vars (at-0 int)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((v1-0 (-> self duration))) + (if (and (nonzero? v1-0) (time-elapsed? (-> self state-time) v1-0)) + (go empty-state) + ) + ) + (let ((v1-5 (-> self track-joint))) + (when (>= v1-5 0) + (let ((a2-0 (handle->process (-> self track-handle))) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (when a2-0 + (set! (-> gp-0 quad) (-> self sphere quad)) + (set! (-> gp-0 w) 1.0) + (vector-matrix*! gp-0 gp-0 (-> (the-as process-drawable a2-0) node-list data v1-5 bone transform)) + (let ((v1-9 (-> self root))) + (vector-! (-> v1-9 transv) gp-0 (-> v1-9 trans)) + (let ((a0-12 (-> v1-9 transv))) + (.lvf vf1 (&-> (-> v1-9 transv) quad)) + (let ((f0-1 (-> self clock frames-per-second))) + (.mov at-0 f0-1) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> a0-12 quad) vf1) + ) + ) + (move-to-point! (-> self root) gp-0) + (set! (-> self danger sphere x) (-> gp-0 x)) + (set! (-> self danger sphere y) (-> gp-0 y)) + (set! (-> self danger sphere z) (-> gp-0 z)) + ) + ) + ) + ) + (if (logtest? (-> self mode) (fma-sphere-mode danger)) + (send-event *traffic-manager* 'add-danger-sphere (-> self danger)) + ) + (when (logtest? (-> self mode) (fma-sphere-mode deadly-overlap)) + (let ((a1-10 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-10 options) (overlaps-others-options)) + (set! (-> a1-10 collide-with-filter) (the-as collide-spec -1)) + (set! (-> a1-10 tlist) *touching-list*) + (find-overlapping-shapes (-> self root) a1-10) + ) + ) + (if (or (logtest? *display-scene-control* (scene-controls display-controls)) + (and *display-nav-marks* (logtest? (-> self mode) (fma-sphere-mode nav))) + ) + (add-debug-sphere + #t + (bucket-id debug) + (-> self root trans) + (-> self sphere r) + (new 'static 'rgba :r #x80 :g #x40 :a #x80) + ) + ) + ) + ) + :code sleep-code + ) + +(defbehavior fma-sphere-init-by-other fma-sphere ((fma-parms fma-sphere-params)) + (set! (-> self mode) (-> fma-parms mode)) + (set! (-> self first-time?) #t) + (set! (-> self duration) (-> fma-parms duration)) + (cond + ((and (-> fma-parms proc) (>= (-> fma-parms track-joint) 0)) + (set! (-> self track-joint) (-> fma-parms track-joint)) + (set! (-> self track-handle) (process->handle (-> fma-parms proc))) + ) + (else + (set! (-> self track-joint) -1) + (set! (-> self track-handle) (the-as handle #f)) + ) + ) + (cond + ((-> fma-parms danger) + (mem-copy! (the-as pointer (-> self danger)) (the-as pointer (-> fma-parms danger)) 54) + (cond + (sphere + (set! (-> self sphere quad) (-> fma-parms sphere quad)) + (set! (-> self danger sphere quad) (-> fma-parms sphere quad)) + ) + (else + (set! (-> self sphere quad) (-> self danger sphere quad)) + ) + ) + ) + (sphere + (set! (-> self sphere quad) (-> fma-parms sphere quad)) + (when (logtest? (-> self mode) (fma-sphere-mode danger)) + (set! (-> self danger sphere quad) (-> fma-parms sphere quad)) + (set! (-> self danger velocity quad) (the-as uint128 0)) + (set! (-> self danger notify-radius) (+ 40960.0 (-> self sphere r))) + (set! (-> self danger danger-level) 1.0) + (set! (-> self danger decay-rate) 0.0) + (set! (-> self danger flags) (the-as uint 1)) + (set! (-> self danger danger-type) (the-as uint 4)) + ) + ) + (else + (format 0 "ERROR: Initializing an fma-sphere without a sphere or danger info!~%") + (go empty-state) + ) + ) + (let ((s5-0 (new 'process 'collide-shape self (collide-list-enum hit-by-player)))) + (let ((v1-32 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-32 prim-core collide-as) (collide-spec obstacle)) + (set-vector! (-> v1-32 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-32) + ) + (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! (-> self root) s5-0) + ) + (let ((s5-1 (-> self root))) + (set! (-> s5-1 nav-radius) (-> self sphere r)) + (set! (-> s5-1 root-prim local-sphere w) (-> self sphere r)) + (set! (-> s5-1 trans quad) (-> self sphere quad)) + (set! (-> s5-1 trans w) 1.0) + (vector-identity! (-> s5-1 scale)) + (quaternion-identity! (-> s5-1 quat)) + (cond + ((logtest? (-> self mode) (fma-sphere-mode deadly-overlap)) + (set! (-> s5-1 event-self) 'touched) + (let ((v1-43 (-> s5-1 root-prim))) + (set! (-> v1-43 prim-core collide-with) (collide-spec crate civilian enemy hit-by-others-list)) + (logior! (-> v1-43 prim-core action) (collide-action deadly)) + ) + ) + (else + (let ((v1-44 (-> s5-1 root-prim))) + (set! (-> v1-44 prim-core collide-as) (collide-spec)) + (set! (-> v1-44 prim-core collide-with) (collide-spec)) + ) + 0 + ) + ) + (update-transforms s5-1) + ) + (logclear! (-> self mask) (process-mask actor-pause enemy)) + (when (logtest? (-> self mode) (fma-sphere-mode nav)) + (let ((a0-33 (if (zero? (-> fma-parms nav-mesh-id)) + (find-nearest-nav-mesh (-> self root trans) (the-as float #x7f800000)) + (get-nav-mesh (the-as actor-id (-> fma-parms nav-mesh-id))) + ) + ) + ) + (cond + (a0-33 + (add-process-drawable-to-nav-mesh a0-33 self #f) + ) + (else + (format 0 "ERROR: fma-sphere-init-by-other: failed to find nearest nav-mesh!~%") + (go empty-state) + ) + ) + ) + ) + (when (logtest? (-> self mode) (fma-sphere-mode deadly-overlap)) + (let* ((v1-62 *game-info*) + (a0-37 (+ (-> v1-62 attack-id) 1)) + ) + (set! (-> v1-62 attack-id) a0-37) + (set! (-> self attack-id) a0-37) + ) + ) + (go-virtual idle) + ) diff --git a/goal_src/jak3/engine/anim/joint-exploder.gc b/goal_src/jak3/engine/anim/joint-exploder.gc index 9854c30ce8..971ada9082 100644 --- a/goal_src/jak3/engine/anim/joint-exploder.gc +++ b/goal_src/jak3/engine/anim/joint-exploder.gc @@ -7,3 +7,834 @@ ;; DECOMP BEGINS +(deftype joint-exploder-tuning (structure) + ((explosion uint64) + (duration time-frame) + (gravity float) + (rot-speed float) + (bounds-inflate float) + (max-probes uint8) + (max-probe-width float) + (max-probe-height float) + (max-probe-depth float) + (friction float) + (fountain-rand-transv-lo vector :inline) + (fountain-rand-transv-hi vector :inline) + (away-from-focal-pt vector :inline :overlay-at fountain-rand-transv-lo) + (away-from-rand-transv-xz-lo float :overlay-at (-> fountain-rand-transv-hi data 0)) + (away-from-rand-transv-xz-hi float :overlay-at (-> fountain-rand-transv-hi data 1)) + (away-from-rand-transv-y-lo float :overlay-at (-> fountain-rand-transv-hi data 2)) + (away-from-rand-transv-y-hi float :overlay-at (-> fountain-rand-transv-hi data 3)) + (hit-xz-reaction float) + (hit-y-reaction float) + ) + (:methods + (new (symbol type uint) _type_) + ) + ) + + +(deftype joint-exploder-static-joint-params (structure) + ((joint-index int16) + (parent-joint-index int16) + ) + ) + + +(deftype joint-exploder-static-params (basic) + ((joints (array joint-exploder-static-joint-params)) + (collide-spec collide-spec) + (art-level symbol) + (collide-sound sound-name) + (collide-sound-interval time-frame) + ) + ) + + +(deftype joint-exploder-joint (structure) + ((next int16) + (prev int16) + (joint-index int16) + (mat matrix :inline) + (rmat matrix :inline) + (update-rmat matrix :inline) + (transv vector :inline) + (prev-pos vector :inline) + ) + ) + + +(deftype joint-exploder-joints (basic) + ((num-joints int32) + (joint joint-exploder-joint :inline :dynamic) + ) + (:methods + (new (symbol type joint-exploder-static-params) _type_) + ) + ) + + +(deftype joint-exploder-list (structure) + ((head int32) + (pre-moved? symbol) + (bbox-valid? symbol) + (probeless? symbol) + (bbox bounding-box :inline) + ) + ) + + +(deftype joint-exploder-list-array (inline-array-class) + ((data joint-exploder-list :inline :dynamic) + ) + ) + + +(set! (-> joint-exploder-list-array heap-base) (the-as uint 48)) + +(deftype joint-exploder (process-drawable) + ((parent (pointer process-drawable) :override) + (die-if-below-y float) + (die-if-beyond-xz-dist-sqrd float) + (joints joint-exploder-joints) + (static-params joint-exploder-static-params) + (anim art-joint-anim) + (scale-vector vector :inline) + (tuning joint-exploder-tuning :inline) + (lists joint-exploder-list-array) + (last-colsound-time time-frame) + ) + (:methods + (add-joint-to-list (_type_ joint-exploder-list int) int) + (update-bbox-for-joint (_type_ joint-exploder-list joint-exploder-joint) none) + (do-collision-response (_type_ joint-exploder-list) none) + (init-joint-list (_type_) none) + (remove-from-list-and-reset (_type_ joint-exploder-list int) int) + (final-adjust (_type_ joint-exploder-list int) int) + (integrate-and-kill (_type_ joint-exploder-list) none) + (remove-joint-from-list (_type_ joint-exploder-list int) int) + (adjust-bbox-for-limits-along-axis (_type_ joint-exploder-list int) joint-exploder-list) + (adjust-bbox-for-limits (_type_ joint-exploder-list) none) + ) + (:states + joint-exploder-shatter + ) + ) + + +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this joint-exploder-joints)) + (the-as int (+ (-> this type size) (* 240 (-> this num-joints)))) + ) + +(defmethod new joint-exploder-joints ((allocation symbol) (type-to-make type) (arg0 joint-exploder-static-params)) + (let* ((gp-0 (-> arg0 joints length)) + (v0-0 (object-new allocation type-to-make (the-as int (+ (-> type-to-make size) (* 240 gp-0))))) + ) + (set! (-> v0-0 num-joints) gp-0) + v0-0 + ) + ) + +(defun joint-exploder-joint-callback ((arg0 draw-control) (arg1 cspace-array) (arg2 joint-control)) + (let ((s4-0 (the-as joint-exploder (-> arg0 process)))) + (let ((s3-0 (-> s4-0 joints))) + (countdown (s2-0 (-> s3-0 num-joints)) + (let* ((v1-3 (-> s3-0 joint s2-0)) + (a0-5 (-> arg1 data (-> v1-3 joint-index) bone transform)) + ) + (matrix*! a0-5 (-> v1-3 rmat) (-> v1-3 mat)) + ) + ) + ) + (let ((s4-1 (-> s4-0 scale-vector))) + (countdown (s3-1 (-> arg1 length)) + (let ((a2-2 (-> arg1 data s3-1 bone transform))) + (scale-matrix! a2-2 s4-1 a2-2) + ) + ) + ) + ) + (let ((s4-2 (new 'stack-no-clear 'matrix))) + (set! (-> s4-2 rvec quad) (the-as uint128 0)) + (set! (-> s4-2 uvec quad) (the-as uint128 0)) + (set! (-> s4-2 fvec quad) (the-as uint128 0)) + (set! (-> s4-2 trans quad) (the-as uint128 0)) + (let ((f30-0 (-> arg0 bounds w))) + (matrix-4x4-inverse! s4-2 (-> arg1 data 0 bone transform)) + (set! (-> arg0 bounds w) 1.0) + (vector-matrix*! (-> arg0 bounds) (-> arg0 bounds) s4-2) + (set! (-> arg0 bounds w) f30-0) + ) + ) + 0 + (none) + ) + +(defmethod remove-from-list-and-reset ((this joint-exploder) (arg0 joint-exploder-list) (arg1 int)) + (let ((v0-0 (remove-joint-from-list this arg0 arg1))) + (let* ((v1-1 (-> this joints)) + (v1-2 (-> v1-1 joint arg1)) + ) + (set! (-> v1-2 mat rvec quad) (the-as uint128 0)) + (set! (-> v1-2 mat uvec quad) (the-as uint128 0)) + (set! (-> v1-2 mat fvec quad) (the-as uint128 0)) + (set! (-> v1-2 mat trans quad) (-> this root trans quad)) + ) + v0-0 + ) + ) + +(defmethod remove-joint-from-list ((this joint-exploder) (arg0 joint-exploder-list) (arg1 int)) + (let* ((v1-0 (-> this joints)) + (a2-1 (-> v1-0 joint arg1)) + (a0-4 (-> a2-1 prev)) + (v0-0 (-> a2-1 next)) + ) + (cond + ((>= a0-4 0) + (set! (-> v1-0 joint a0-4 next) v0-0) + (if (>= v0-0 0) + (set! (-> v1-0 joint v0-0 prev) a0-4) + ) + ) + (else + (set! (-> arg0 head) v0-0) + (cond + ((>= v0-0 0) + (let ((v1-2 (-> v1-0 joint v0-0))) + (set! (-> v1-2 prev) -1) + ) + ) + (else + (set! (-> arg0 bbox-valid?) #f) + ) + ) + ) + ) + v0-0 + ) + ) + +(defmethod add-joint-to-list ((this joint-exploder) (arg0 joint-exploder-list) (arg1 int)) + (let* ((v1-0 (-> this joints)) + (a3-0 (-> v1-0 joint arg1)) + (a0-4 (-> arg0 head)) + ) + (set! (-> arg0 head) arg1) + (set! (-> a3-0 prev) -1) + (set! (-> a3-0 next) a0-4) + (when (>= a0-4 0) + (set! (-> v1-0 joint a0-4 prev) arg1) + arg1 + ) + ) + ) + +(defmethod update-bbox-for-joint ((this joint-exploder) (arg0 joint-exploder-list) (arg1 joint-exploder-joint)) + (let ((a1-1 (-> arg1 mat trans))) + (cond + ((-> arg0 bbox-valid?) + (add-point! (-> arg0 bbox) a1-1) + ) + (else + (set! (-> arg0 bbox-valid?) #t) + (set! (-> arg0 bbox min quad) (-> a1-1 quad)) + (set! (-> arg0 bbox max quad) (-> a1-1 quad)) + ) + ) + ) + (add-point! (-> arg0 bbox) (-> arg1 prev-pos)) + (none) + ) + +;; WARN: Return type mismatch object vs joint-exploder-list. +(defmethod adjust-bbox-for-limits-along-axis ((this joint-exploder) (arg0 joint-exploder-list) (arg1 int)) + (local-vars + (sv-16 int) + (sv-32 int) + (sv-48 joint-exploder-joint) + (sv-64 int) + (sv-80 joint-exploder-joint) + (sv-96 int) + (sv-112 joint-exploder-joint) + ) + (let ((s4-0 (the-as object #f))) + (let ((v1-0 1)) + (until (= v1-0 (+ (-> this tuning max-probes) 1)) + (let ((a0-4 (-> this lists data v1-0))) + (when (< (-> a0-4 head) 0) + (set! s4-0 a0-4) + (goto cfg-6) + ) + ) + (+! v1-0 1) + ) + ) + (label cfg-6) + (cond + ((the-as joint-exploder-list s4-0) + (set! (-> (the-as joint-exploder-list s4-0) pre-moved?) #t) + (set! (-> (the-as joint-exploder-list s4-0) bbox-valid?) #f) + ) + (else + (set! s4-0 (-> this lists data)) + ) + ) + (set! (-> arg0 bbox-valid?) #f) + (let ((s2-0 (-> this joints))) + (set! sv-32 (-> arg0 head)) + (let ((s1-0 0) + (s0-0 0) + ) + (let ((v1-8 arg1)) + (cond + ((zero? v1-8) + (let ((f30-0 (* 0.5 (+ (-> arg0 bbox min x) (-> arg0 bbox max x))))) + (while (>= sv-32 0) + (set! sv-48 (-> s2-0 joint sv-32)) + (cond + ((>= (-> sv-48 mat trans x) f30-0) + (set! sv-16 (remove-joint-from-list this arg0 sv-32)) + (add-joint-to-list this (the-as joint-exploder-list s4-0) sv-32) + (set! sv-32 sv-16) + (update-bbox-for-joint this (the-as joint-exploder-list s4-0) sv-48) + (+! s0-0 1) + ) + (else + (update-bbox-for-joint this arg0 sv-48) + (set! sv-32 (-> sv-48 next)) + (+! s1-0 1) + ) + ) + ) + ) + ) + ((= v1-8 1) + (let ((f30-1 (* 0.5 (+ (-> arg0 bbox min y) (-> arg0 bbox max y))))) + (while (>= sv-32 0) + (set! sv-80 (-> s2-0 joint sv-32)) + (cond + ((>= (-> sv-80 mat trans y) f30-1) + (set! sv-64 (remove-joint-from-list this arg0 sv-32)) + (add-joint-to-list this (the-as joint-exploder-list s4-0) sv-32) + (set! sv-32 sv-64) + (update-bbox-for-joint this (the-as joint-exploder-list s4-0) sv-80) + (+! s0-0 1) + ) + (else + (update-bbox-for-joint this arg0 sv-80) + (set! sv-32 (-> sv-80 next)) + (+! s1-0 1) + ) + ) + ) + ) + ) + ((= v1-8 2) + (let ((f30-2 (* 0.5 (+ (-> arg0 bbox min z) (-> arg0 bbox max z))))) + (while (>= sv-32 0) + (set! sv-112 (-> s2-0 joint sv-32)) + (cond + ((>= (-> sv-112 mat trans z) f30-2) + (set! sv-96 (remove-joint-from-list this arg0 sv-32)) + (add-joint-to-list this (the-as joint-exploder-list s4-0) sv-32) + (set! sv-32 sv-96) + (update-bbox-for-joint this (the-as joint-exploder-list s4-0) sv-112) + (+! s0-0 1) + ) + (else + (update-bbox-for-joint this arg0 sv-112) + (set! sv-32 (-> sv-112 next)) + (+! s1-0 1) + ) + ) + ) + ) + ) + ) + ) + (cond + ((zero? s0-0) + (final-adjust this arg0 arg1) + ) + ((zero? s1-0) + (if (not (-> (the-as joint-exploder-list s4-0) probeless?)) + (final-adjust this (the-as joint-exploder-list s4-0) arg1) + ) + ) + ) + ) + ) + (the-as joint-exploder-list s4-0) + ) + ) + +;; WARN: Return type mismatch symbol vs int. +(defmethod final-adjust ((this joint-exploder) (arg0 joint-exploder-list) (arg1 int)) + (local-vars (sv-48 int) (sv-64 (inline-array joint-exploder-list)) (sv-80 joint-exploder-joint)) + (set! (-> arg0 bbox-valid?) #f) + (let ((s3-0 (-> this joints)) + (s2-0 (-> arg0 head)) + ) + (while (>= s2-0 0) + (set! sv-80 (-> s3-0 joint s2-0)) + (let ((s1-0 (new 'stack-no-clear 'bounding-box)) + (s0-0 (-> arg0 bbox-valid?)) + ) + (set! (-> s1-0 min quad) (-> arg0 bbox min quad)) + (set! (-> s1-0 max quad) (-> arg0 bbox max quad)) + (update-bbox-for-joint this arg0 sv-80) + (let* ((v1-7 arg1) + (v1-8 (cond + ((zero? v1-7) + (< (-> this tuning max-probe-width) (- (-> arg0 bbox max x) (-> arg0 bbox min x))) + ) + ((= v1-7 1) + (< (-> this tuning max-probe-height) (- (-> arg0 bbox max y) (-> arg0 bbox min y))) + ) + ((= v1-7 2) + (< (-> this tuning max-probe-depth) (- (-> arg0 bbox max z) (-> arg0 bbox min z))) + ) + ) + ) + ) + (set! s2-0 (cond + (v1-8 + (set! sv-48 (remove-joint-from-list this arg0 s2-0)) + (set! sv-64 (-> this lists data)) + (add-joint-to-list this (the-as joint-exploder-list sv-64) s2-0) + (set! s2-0 sv-48) + (update-bbox-for-joint this (the-as joint-exploder-list sv-64) sv-80) + (set! (-> arg0 bbox-valid?) s0-0) + (set! (-> arg0 bbox min quad) (-> s1-0 min quad)) + (set! (-> arg0 bbox max quad) (-> s1-0 max quad)) + s2-0 + ) + (else + (-> sv-80 next) + ) + ) + ) + ) + ) + ) + ) + (the-as int #f) + ) + +(defmethod adjust-bbox-for-limits ((this joint-exploder) (arg0 joint-exploder-list)) + (when (and (-> arg0 bbox-valid?) (>= (-> arg0 head) 0) (not (-> arg0 probeless?))) + (let ((a2-0 -1)) + (cond + ((< (-> this tuning max-probe-width) (- (-> arg0 bbox max x) (-> arg0 bbox min x))) + (set! a2-0 0) + ) + ((< (-> this tuning max-probe-height) (- (-> arg0 bbox max y) (-> arg0 bbox min y))) + (set! a2-0 1) + ) + ((< (-> this tuning max-probe-depth) (- (-> arg0 bbox max z) (-> arg0 bbox min z))) + (set! a2-0 2) + ) + ) + (when (>= a2-0 0) + (let ((a1-2 (adjust-bbox-for-limits-along-axis this arg0 a2-0))) + (if (not (-> a1-2 probeless?)) + (adjust-bbox-for-limits this a1-2) + ) + ) + (adjust-bbox-for-limits this arg0) + ) + ) + ) + 0 + (none) + ) + +(defmethod integrate-and-kill ((this joint-exploder) (arg0 joint-exploder-list)) + (local-vars (v1-8 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set! (-> arg0 bbox-valid?) #f) + (set! (-> arg0 pre-moved?) #t) + (let ((s4-0 (-> this joints)) + (f30-0 (* (-> this tuning gravity) (seconds-per-frame))) + (s3-0 (-> arg0 head)) + ) + (while (>= s3-0 0) + (let* ((s2-0 (-> s4-0 joint s3-0)) + (s1-0 (-> s2-0 mat trans)) + ) + (set! (-> s2-0 prev-pos quad) (-> s1-0 quad)) + (+! (-> s2-0 transv y) f30-0) + (when (< 0.0 (-> this tuning friction)) + (.lvf vf1 (&-> (-> s2-0 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-8 vf1) + (let* ((f0-4 v1-8) + (f1-5 (* 0.00001 (seconds-per-frame) (-> this tuning friction) f0-4)) + (f0-6 (- (sqrtf f0-4) f1-5)) + ) + (if (< f0-6 0.0) + (set! f0-6 0.0) + ) + (vector-normalize! (-> s2-0 transv) f0-6) + ) + ) + (vector-v+! s1-0 s1-0 (-> s2-0 transv)) + (matrix*! (-> s2-0 rmat) (-> s2-0 rmat) (-> s2-0 update-rmat)) + (cond + ((or (< (-> s1-0 y) (-> this die-if-below-y)) + (< (-> this die-if-beyond-xz-dist-sqrd) (vector-vector-xz-distance s1-0 (-> this root trans))) + ) + (set! s3-0 (remove-from-list-and-reset this arg0 s3-0)) + ) + (else + (update-bbox-for-joint this arg0 s2-0) + (set! s3-0 (-> s2-0 next)) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod do-collision-response ((this joint-exploder) (arg0 joint-exploder-list)) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (set! (-> s5-0 collide-with) (-> this static-params collide-spec)) + (set! (-> s5-0 ignore-process0) this) + (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) + ) + (set! (-> s5-0 action-mask) (collide-action solid)) + (mem-copy! (the-as pointer (-> s5-0 bbox)) (the-as pointer (-> arg0 bbox)) 32) + (fill-using-bounding-box *collide-cache* s5-0) + ) + (let ((s5-1 (-> this joints)) + (v1-6 (-> arg0 head)) + ) + (while (>= v1-6 0) + (let ((s4-1 (-> s5-1 joint v1-6))) + (let ((s3-0 (-> s4-1 mat trans)) + (s2-0 (new 'stack-no-clear 'collide-query)) + ) + (vector-! (-> s2-0 move-dist) s3-0 (-> s4-1 prev-pos)) + (set! (-> s2-0 start-pos quad) (-> s4-1 prev-pos quad)) + (let ((v1-11 s2-0)) + (set! (-> v1-11 radius) 40.96) + (set! (-> v1-11 collide-with) (-> this static-params collide-spec)) + (set! (-> v1-11 ignore-process0) #f) + (set! (-> v1-11 ignore-process1) #f) + (set! (-> v1-11 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-11 action-mask) (collide-action solid)) + ) + (when (>= (probe-using-line-sphere *collide-cache* s2-0) 0.0) + (set! (-> s3-0 quad) (-> s2-0 best-other-tri intersect quad)) + (let* ((v1-16 (-> s4-1 transv)) + (f28-0 (sqrtf (+ (* (-> v1-16 x) (-> v1-16 x)) (* (-> v1-16 z) (-> v1-16 z))))) + ) + (vector-reflect! (-> s4-1 transv) (-> s4-1 transv) (-> s2-0 best-other-tri normal)) + (let ((f30-0 (-> s4-1 transv y))) + (set! (-> s4-1 transv y) 0.0) + (vector-normalize! (-> s4-1 transv) (* f28-0 (-> this tuning hit-xz-reaction))) + (set! (-> s4-1 transv y) (* f30-0 (-> this tuning hit-y-reaction))) + ) + ) + (let ((v1-20 (-> this static-params collide-sound))) + (when (and v1-20 + (nonzero? v1-20) + (< (-> this static-params collide-sound-interval) (- (current-time) (-> this last-colsound-time))) + ) + (sound-play-by-name + (-> this static-params collide-sound) + (new-sound-id) + 1024 + 0 + 0 + (sound-group) + (-> s4-1 transv) + ) + (set-time! (-> this last-colsound-time)) + ) + ) + (+! (-> s3-0 y) (* 40.96 (-> s2-0 best-other-tri normal y))) + (set! (-> s3-0 w) 1.0) + (matrix-lerp! (-> s4-1 update-rmat) (-> s4-1 update-rmat) *identity-matrix* 0.5) + ) + ) + (set! v1-6 (-> s4-1 next)) + ) + ) + ) + 0 + (none) + ) + +(defstate joint-exploder-shatter (joint-exploder) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (let* ((f1-0 (the float (- (current-time) (-> self state-time)))) + (f0-2 (- 1.0 (/ f1-0 (the float (-> self tuning duration))))) + (f1-2 (- 1.0 (/ f1-0 (* 0.75 (the float (-> self tuning duration)))))) + (f1-3 (fmax 0.0001 f1-2)) + (f0-3 (fmax 0.0001 f0-2)) + ) + (set-vector! (-> self scale-vector) f0-3 f1-3 f0-3 1.0) + ) + (dotimes (v1-11 (the-as int (+ (-> self tuning max-probes) 1))) + (set! (-> self lists data v1-11 pre-moved?) #f) + ) + (dotimes (gp-0 (the-as int (+ (-> self tuning max-probes) 1))) + (let ((s5-0 (-> self lists data gp-0))) + (when (>= (-> s5-0 head) 0) + (when (not (-> s5-0 pre-moved?)) + (integrate-and-kill self s5-0) + (if (nonzero? gp-0) + (adjust-bbox-for-limits self s5-0) + ) + ) + ) + ) + ) + (let ((gp-1 (new 'stack-no-clear 'bounding-box))) + (let ((v1-31 (-> self root trans))) + (set! (-> gp-1 min quad) (-> v1-31 quad)) + (set! (-> gp-1 max quad) (-> v1-31 quad)) + ) + (dotimes (s5-1 (the-as int (+ (-> self tuning max-probes) 1))) + (let ((s4-0 (-> self lists data s5-1))) + (if (-> s4-0 bbox-valid?) + (add-box! gp-1 (-> s4-0 bbox)) + ) + (if (nonzero? s5-1) + (do-collision-response self s4-0) + ) + ) + ) + (let ((s5-2 (-> self draw bounds))) + (vector-average! s5-2 (-> gp-1 min) (-> gp-1 max)) + (set! (-> s5-2 w) (+ (vector-vector-distance s5-2 (-> gp-1 max)) (-> self tuning bounds-inflate))) + ) + ) + 0 + ) + :code (behavior () + (set-time! (-> self state-time)) + (until (time-elapsed? (-> self state-time) (-> self tuning duration)) + (suspend) + (ja :num! (loop!)) + ) + ) + :post ja-post + ) + +(defmethod init-joint-list ((this joint-exploder)) + (let ((gp-0 (-> this joints))) + (dotimes (s4-0 (-> gp-0 num-joints)) + (let ((v1-2 (-> this static-params joints s4-0)) + (s3-0 (-> gp-0 joint s4-0)) + ) + (let ((a0-6 (-> v1-2 parent-joint-index))) + (set! (-> s3-0 prev) (+ s4-0 -1)) + (set! (-> s3-0 next) (+ s4-0 1)) + (set! (-> s3-0 joint-index) (-> v1-2 joint-index)) + (cond + ((>= a0-6 0) + (if (zero? a0-6) + (set! a0-6 (-> v1-2 joint-index)) + ) + (let* ((a3-0 (-> this parent 0 node-list data a0-6 bone transform)) + (a2-0 (-> s3-0 mat)) + (v1-9 (-> a3-0 rvec quad)) + (a0-8 (-> a3-0 uvec quad)) + (a1-4 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> a2-0 rvec quad) v1-9) + (set! (-> a2-0 uvec quad) a0-8) + (set! (-> a2-0 fvec quad) a1-4) + (set! (-> a2-0 trans quad) a3-1) + ) + (matrix-identity! (-> s3-0 rmat)) + ) + (else + (let* ((a3-2 (-> this node-list data (-> v1-2 joint-index) bone transform)) + (a2-1 (-> s3-0 mat)) + (v1-15 (-> a3-2 rvec quad)) + (a0-11 (-> a3-2 uvec quad)) + (a1-5 (-> a3-2 fvec quad)) + (a3-3 (-> a3-2 trans quad)) + ) + (set! (-> a2-1 rvec quad) v1-15) + (set! (-> a2-1 uvec quad) a0-11) + (set! (-> a2-1 fvec quad) a1-5) + (set! (-> a2-1 trans quad) a3-3) + ) + (matrix-identity! (-> s3-0 rmat)) + ) + ) + ) + (case (-> this tuning explosion) + ((1) + (vector-! (-> s3-0 transv) (-> s3-0 mat trans) (-> this tuning fountain-rand-transv-lo)) + (vector-normalize! + (-> s3-0 transv) + (rand-vu-float-range (-> this tuning fountain-rand-transv-hi x) (-> this tuning fountain-rand-transv-hi y)) + ) + (+! (-> s3-0 transv y) + (rand-vu-float-range (-> this tuning fountain-rand-transv-hi z) (-> this tuning fountain-rand-transv-hi w)) + ) + (set! (-> s3-0 transv w) 1.0) + ) + (else + (let ((s0-0 (-> this tuning fountain-rand-transv-lo)) + (s1-1 (-> this tuning fountain-rand-transv-hi)) + ) + (set-vector! + (-> s3-0 transv) + (rand-vu-float-range (-> s0-0 x) (-> s1-1 x)) + (rand-vu-float-range (-> s0-0 y) (-> s1-1 y)) + (rand-vu-float-range (-> s0-0 z) (-> s1-1 z)) + 1.0 + ) + ) + ) + ) + (let ((s2-3 (new 'stack-no-clear 'vector)) + (s1-2 (new 'stack-no-clear 'quaternion)) + ) + (rand-vu-sphere-point-uniform! s2-3 1.0) + (vector-normalize! s2-3 1.0) + (quaternion-vector-angle! s1-2 s2-3 (* 182.04445 (-> this tuning rot-speed))) + (quaternion->matrix (-> s3-0 update-rmat) s1-2) + ) + ) + ) + (when (nonzero? (-> gp-0 num-joints)) + (let ((v1-31 (-> gp-0 joint (+ (-> gp-0 num-joints) -1)))) + (set! (-> v1-31 next) -1) + ) + (let ((v1-33 (-> this lists data 1))) + (set! (-> v1-33 head) 0) + (let ((s5-1 (-> v1-33 bbox))) + (let ((v1-34 (-> gp-0 joint 0 mat trans))) + (set! (-> s5-1 min quad) (-> v1-34 quad)) + (set! (-> s5-1 max quad) (-> v1-34 quad)) + ) + (dotimes (s4-1 (-> gp-0 num-joints)) + (add-point! s5-1 (the-as vector (+ (the-as uint (-> gp-0 joint 0 mat trans)) (* 240 s4-1)))) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch process-drawable vs joint-exploder. +(defmethod relocate ((this joint-exploder) (offset int)) + (if (nonzero? (-> this joints)) + (&+! (-> this joints) offset) + ) + (if (nonzero? (-> this lists)) + (&+! (-> this lists) offset) + ) + (the-as joint-exploder ((method-of-type process-drawable relocate) this offset)) + ) + +(defbehavior joint-exploder-init-by-other joint-exploder ((arg0 skeleton-group) (arg1 int) (arg2 joint-exploder-tuning) (arg3 joint-exploder-static-params)) + (set! (-> self static-params) arg3) + (set! (-> self die-if-beyond-xz-dist-sqrd) 10485760000.0) + (mem-copy! (the-as pointer (-> self tuning)) (the-as pointer arg2) 88) + (set! (-> self joints) (new 'process 'joint-exploder-joints arg3)) + (set! (-> self lists) + (new 'process 'joint-exploder-list-array (the-as int (+ (-> self tuning max-probes) 1))) + ) + (dotimes (v1-4 (the-as int (+ (-> self tuning max-probes) 1))) + (let ((a0-7 (-> self lists data v1-4))) + (set! (-> a0-7 head) -1) + (set! (-> a0-7 bbox-valid?) #f) + (set! (-> a0-7 pre-moved?) #f) + (set! (-> a0-7 probeless?) #f) + ) + ) + (let ((v1-8 (-> self lists data))) + (set! (-> v1-8 0 probeless?) #t) + ) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> self parent 0 root trans quad)) + (quaternion-copy! (-> self root quat) (-> self parent 0 root quat)) + (set! (-> self root scale quad) (-> self parent 0 root scale quad)) + (when (-> arg3 art-level) + (let ((a1-8 (entity-actor-from-level-name (-> arg3 art-level)))) + (if a1-8 + (process-entity-set! self a1-8) + ) + ) + ) + (initialize-skeleton self arg0 (the-as pair 0)) + (logior! (-> self skel status) (joint-control-status sync-math)) + (set! (-> self anim) (the-as art-joint-anim (-> self draw art-group data arg1))) + (ja-channel-set! 1) + (ja :group! (-> self anim) :num! min) + (ja-post) + (init-joint-list self) + (set! (-> self die-if-below-y) (+ -102400.0 (-> self root trans y))) + (set! (-> self skel postbind-function) joint-exploder-joint-callback) + (set! (-> self last-colsound-time) 0) + (go joint-exploder-shatter) + ) + +;; WARN: Return type mismatch structure vs joint-exploder-tuning. +(defmethod new joint-exploder-tuning ((allocation symbol) (type-to-make type) (arg0 uint)) + (let ((t9-0 (method-of-type structure new)) + (v1-1 type-to-make) + ) + (-> type-to-make size) + (let ((v0-0 (t9-0 allocation v1-1))) + (set! (-> (the-as joint-exploder-tuning v0-0) explosion) arg0) + (set! (-> (the-as joint-exploder-tuning v0-0) duration) (seconds 2)) + (set! (-> (the-as joint-exploder-tuning v0-0) gravity) -286720.0) + (set! (-> (the-as joint-exploder-tuning v0-0) rot-speed) 8.4) + (set! (-> (the-as joint-exploder-tuning v0-0) friction) 0.0) + (set! (-> (the-as joint-exploder-tuning v0-0) bounds-inflate) 16384.0) + (set! (-> (the-as joint-exploder-tuning v0-0) max-probe-width) 20480.0) + (set! (-> (the-as joint-exploder-tuning v0-0) max-probe-height) 24576.0) + (set! (-> (the-as joint-exploder-tuning v0-0) max-probe-depth) 20480.0) + (set! (-> (the-as joint-exploder-tuning v0-0) max-probes) (the-as uint 4)) + (set! (-> (the-as joint-exploder-tuning v0-0) hit-xz-reaction) 0.75) + (set! (-> (the-as joint-exploder-tuning v0-0) hit-y-reaction) 0.7) + (cond + ((zero? arg0) + (set-vector! (-> (the-as joint-exploder-tuning v0-0) fountain-rand-transv-lo) -81920.0 20480.0 -81920.0 1.0) + (set-vector! (-> (the-as joint-exploder-tuning v0-0) fountain-rand-transv-hi) 81920.0 61440.0 81920.0 1.0) + ) + ((= arg0 1) + (vector-reset! (-> (the-as joint-exploder-tuning v0-0) fountain-rand-transv-lo)) + (set! (-> (the-as joint-exploder-tuning v0-0) fountain-rand-transv-hi x) 49152.0) + (set! (-> (the-as joint-exploder-tuning v0-0) fountain-rand-transv-hi y) 163840.0) + (set! (-> (the-as joint-exploder-tuning v0-0) fountain-rand-transv-hi z) 20480.0) + (set! (-> (the-as joint-exploder-tuning v0-0) fountain-rand-transv-hi w) 61440.0) + ) + ) + (the-as joint-exploder-tuning v0-0) + ) + ) + ) diff --git a/goal_src/jak3/engine/anim/joint.gc b/goal_src/jak3/engine/anim/joint.gc index 06b033de76..8621382c1e 100644 --- a/goal_src/jak3/engine/anim/joint.gc +++ b/goal_src/jak3/engine/anim/joint.gc @@ -1354,6 +1354,7 @@ "Remove all animations that are stored on the given heap and return those slots to a safe default." (let ((v1-0 (-> heap base)) (a1-1 (-> heap top-base)) + (v0-0 #f) ) (countdown (a3-1 (+ (-> jc active-channels) (-> jc float-channels))) (let ((t0-3 (-> jc channel a3-1))) @@ -1363,12 +1364,12 @@ (set! (-> t0-3 frame-group) ja) (set! (-> t0-3 frame-num) 0.0) (set! (-> t0-3 num-func) num-func-identity) - #t + (set! v0-0 #t) ) ) ) + v0-0 ) - (none) ) (defbehavior joint-control-channel-eval process ((jcc joint-control-channel)) @@ -2223,7 +2224,7 @@ ;; make-joint-jump-tables: not needed ;; calc-animation-from-spr: not needed -(def-mips2c calc-animation-from-spr (function joint-anim-frame int none)) +;; (def-mips2c calc-animation-from-spr (function joint-anim-frame int none)) (defun create-interpolated-joint-animation-frame ((dst joint-anim-frame) (num-joints int) (jc joint-control)) "Compute the entire joint frame by evaluating the blend tree, decompressing animations, and blending them." @@ -2274,8 +2275,8 @@ (let ((a0-9 (-> jc interp-select 0))) (dotimes (a1-5 2) (when (logtest? a0-9 1) - (let* ((a2-7 (the-as object (-> dst matrices a1-5 rvec))) - (t2-0 (the-as (inline-array vector) (-> v1-9 matrices a1-5 rvec))) + (let* ((a2-7 (the-as object (-> dst matrices a1-5))) + (t2-0 (the-as (inline-array vector) (-> v1-9 matrices a1-5))) (a3-3 (-> t2-0 0 quad)) (t0-0 (-> t2-0 1 quad)) (t1-0 (-> t2-0 2 quad)) diff --git a/goal_src/jak3/engine/camera/cam-debug.gc b/goal_src/jak3/engine/camera/cam-debug.gc index 3e51950026..da31051c08 100644 --- a/goal_src/jak3/engine/camera/cam-debug.gc +++ b/goal_src/jak3/engine/camera/cam-debug.gc @@ -5,5 +5,19 @@ ;; name in dgo: cam-debug ;; dgos: GAME +(define-extern camera-plot-float-func (function float float float float (function float float) vector4w none)) + ;; DECOMP BEGINS +;; TODO stubs +(defun cam-collision-record-save ((arg0 vector) (arg1 vector) (arg2 int) (arg3 symbol) (arg4 camera-slave)) + (none) + ) + +(defun cam-debug-add-los-tri ((arg0 (inline-array collide-cache-tri)) (arg1 vector) (arg2 vector)) + (none) + ) + +(defun cam-debug-reset-coll-tri () + (none) + ) \ No newline at end of file diff --git a/goal_src/jak3/engine/camera/cam-layout.gc b/goal_src/jak3/engine/camera/cam-layout.gc index bd0fc8ca04..ea3c6235ae 100644 --- a/goal_src/jak3/engine/camera/cam-layout.gc +++ b/goal_src/jak3/engine/camera/cam-layout.gc @@ -172,7 +172,7 @@ ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket583) + (bucket-id debug) gp-0 (the-as (pointer dma-tag) a3-2) ) @@ -2279,21 +2279,13 @@ ) (defbehavior clmf-cam-string cam-layout ((arg0 string) (arg1 symbol)) - (local-vars (r0-0 uint128) (v1-5 uint128) (sv-16 int)) + (local-vars (sv-16 res-tag)) (format arg0 ":") - (set! sv-16 0) - (let ((s5-1 (res-lump-data (-> self cam-entity) arg1 pointer :tag-ptr (the-as (pointer res-tag) (& sv-16))))) + (set! sv-16 (new 'static 'res-tag)) + (let ((s5-1 (res-lump-data (-> self cam-entity) arg1 pointer :tag-ptr (& sv-16)))) (when s5-1 - (let ((s4-0 0)) - (while (begin - (let ((v1-4 (the-as uint128 sv-16))) - (.pcpyud v1-5 v1-4 r0-0) - ) - (< s4-0 (shr (* (the-as int v1-5) 2) 49)) - ) - (format arg0 " ~S" (-> (the-as (pointer uint32) (&+ s5-1 (* s4-0 4))))) - (+! s4-0 1) - ) + (dotimes (s4-0 (the-as int (-> sv-16 elt-count))) + (format arg0 " ~S" (-> (the-as (pointer uint32) (&+ s5-1 (* s4-0 4))))) ) ) ) diff --git a/goal_src/jak3/engine/camera/cam-master.gc b/goal_src/jak3/engine/camera/cam-master.gc index 9e4416de39..abdd08ca09 100644 --- a/goal_src/jak3/engine/camera/cam-master.gc +++ b/goal_src/jak3/engine/camera/cam-master.gc @@ -995,7 +995,9 @@ (-> self local-down) (vector-normalize-copy! (-> self local-down) (-> *standard-dynamics* gravity) 1.0) ) - (cam-master-effect) + (when (nonzero? cam-master-effect) ;; og:preserve-this not-yet-implemented check + (cam-master-effect) + ) ) ) :code (behavior () @@ -1057,7 +1059,9 @@ (let ((a1-4 (new-stack-vector0))) (tracking-spline-method-10 (-> self target-spline) a1-4) ) - (set! (-> self water-drip) (create-launch-control group-rain-screend-drop self)) + (when (nonzero? group-rain-screend-drop) ;; og:preserve-this not-yet-implemented check + (set! (-> self water-drip) (create-launch-control group-rain-screend-drop self)) + ) (set! (-> self water-drip-time) (seconds -60)) (go cam-master-active) 0 diff --git a/goal_src/jak3/engine/camera/cam-start.gc b/goal_src/jak3/engine/camera/cam-start.gc index 4ccaa50134..c23077e725 100644 --- a/goal_src/jak3/engine/camera/cam-start.gc +++ b/goal_src/jak3/engine/camera/cam-start.gc @@ -7,3 +7,42 @@ ;; DECOMP BEGINS +(defun cam-stop () + (kill-by-name "camera-master" *active-pool*) + (kill-by-name "camera-slave" *active-pool*) + (kill-by-name "camera-combiner" *active-pool*) + (set! *camera* #f) + (set! *camera-combiner* #f) + #f + ) + +(defun cam-start ((arg0 symbol)) + (cam-stop) + (set! *camera-combiner* (the-as camera-combiner (ppointer->process (process-spawn + camera-combiner + :init cam-combiner-init + :name "camera-combiner" + :from *camera-dead-pool* + :to *camera-pool* + ) + ) + ) + ) + (set! *camera* (the-as camera-master (ppointer->process (process-spawn + camera-master + :init cam-master-init + :name "camera-master" + :from *camera-master-dead-pool* + :to *camera-pool* + ) + ) + ) + ) + (if arg0 + (reset-cameras) + ) + 0 + (none) + ) + +(cam-start #f) diff --git a/goal_src/jak3/engine/camera/cam-update.gc b/goal_src/jak3/engine/camera/cam-update.gc index 32c8eda102..71fe8351ab 100644 --- a/goal_src/jak3/engine/camera/cam-update.gc +++ b/goal_src/jak3/engine/camera/cam-update.gc @@ -212,8 +212,8 @@ ) (when (= a0-45 s3-0) (if (>= v1-95 0) - (add-debug-sphere #t (bucket-id bucket583) (-> s2-0 data s1-0) (meters 1) (new 'static 'rgba :b #xff :a #x80)) - (add-debug-sphere #t (bucket-id bucket583) (-> s2-0 data s1-0) (meters 1) (new 'static 'rgba :r #xff :a #x80)) + (add-debug-sphere #t (bucket-id debug) (-> s2-0 data s1-0) (meters 1) (new 'static 'rgba :b #xff :a #x80)) + (add-debug-sphere #t (bucket-id debug) (-> s2-0 data s1-0) (meters 1) (new 'static 'rgba :r #xff :a #x80)) ) ) ) @@ -245,7 +245,7 @@ (+! (-> a3-6 z) (the float (* (-> v1-109 back-box-max z) (the int (-> s4-1 bsp bsp-scale z))))) ) ) - (add-debug-box #t (bucket-id bucket583) a2-7 a3-6 (new 'static 'rgba :g #xff :b #xff :a #x80)) + (add-debug-box #t (bucket-id debug) a2-7 a3-6 (new 'static 'rgba :g #xff :b #xff :a #x80)) ) ) ) @@ -669,7 +669,7 @@ (defun-debug move-level-by-name ((arg0 symbol) (arg1 float) (arg2 float) (arg3 float)) (let ((v1-1 (level-get *level* arg0))) (when v1-1 - (logior! (-> v1-1 info level-flags) (level-flags lf10)) + (logior! (-> v1-1 info level-flags) (level-flags use-camera-other)) (let ((v0-1 (-> *math-camera* trans-other))) (set! (-> v0-1 x) (* 4096.0 arg1)) (set! (-> v0-1 y) (* 4096.0 arg2)) diff --git a/goal_src/jak3/engine/camera/camera-h.gc b/goal_src/jak3/engine/camera/camera-h.gc index 6c9d28060a..6cde45fbba 100644 --- a/goal_src/jak3/engine/camera/camera-h.gc +++ b/goal_src/jak3/engine/camera/camera-h.gc @@ -96,6 +96,12 @@ (define-extern cam-slave-options->string (function cam-slave-options object string)) (define-extern cam-index-options->string (function cam-index-options object string)) +;; cam-start +(define-extern reset-cameras (function none)) + +;; cam-interface +(define-extern camera-angle (function float)) + ;; DECOMP BEGINS (deftype cam-index (structure) diff --git a/goal_src/jak3/engine/camera/pov-camera-h.gc b/goal_src/jak3/engine/camera/pov-camera-h.gc index 8f6066aa17..b46403126e 100644 --- a/goal_src/jak3/engine/camera/pov-camera-h.gc +++ b/goal_src/jak3/engine/camera/pov-camera-h.gc @@ -17,7 +17,9 @@ ;; ---pov-camera-flag (declare-type pov-camera process-drawable) +(declare-type othercam process) (define-extern pov-camera-init-by-other (function vector skeleton-group string pov-camera-flag process-drawable pair none :behavior pov-camera)) +(define-extern othercam-init-by-other (function pov-camera int symbol symbol none :behavior othercam)) ;; DECOMP BEGINS @@ -39,10 +41,10 @@ pov-camera-startup ) (:methods - (pov-camera-method-25 () none) - (pov-camera-method-26 () none) - (pov-camera-method-27 () none) - (pov-camera-method-28 () none) - (pov-camera-method-29 () none) + (abort? (_type_) symbol) + (target-grabbed? (_type_) symbol) + (set-stack-size! (_type_) none) + (pov-camera-method-28 (_type_) none) + (target-released? (_type_) symbol) ) ) diff --git a/goal_src/jak3/engine/camera/pov-camera.gc b/goal_src/jak3/engine/camera/pov-camera.gc index a418962b51..ddbb008566 100644 --- a/goal_src/jak3/engine/camera/pov-camera.gc +++ b/goal_src/jak3/engine/camera/pov-camera.gc @@ -7,3 +7,405 @@ ;; DECOMP BEGINS +(defmethod abort? ((this pov-camera)) + (when (or (and (time-elapsed? (-> this debounce-start-time) (seconds 0.2)) (cpad-pressed? 0 triangle)) + (logtest? (-> this flags) (pov-camera-flag allow-abort)) + ) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) + (when (logtest? (-> this flags) (pov-camera-flag notify-of-abort)) + (send-event (handle->process (-> this notify-handle)) 'notify 'abort-request) + #t + ) + ) + ) + +(defmethod target-grabbed? ((this pov-camera)) + (or (not *target*) (process-grab? *target* #f)) + ) + +(defmethod target-released? ((this pov-camera)) + (or (not *target*) (process-release? *target*)) + ) + +(defstate pov-camera-startup (pov-camera) + :virtual #t + :code (behavior () + (go-virtual pov-camera-start-playing) + ) + ) + +(defstate pov-camera-start-playing (pov-camera) + :virtual #t + :code (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (when (not (logtest? (-> self flags) (pov-camera-flag pcf3))) + (while (not (target-grabbed? self)) + (suspend) + ) + ) + (let ((gp-0 0)) + (let ((v1-10 (the-as joint (get-art-by-name-method (-> self draw jgeo) "camera" (the-as type #f))))) + (if v1-10 + (set! gp-0 (+ (-> v1-10 number) 1)) + ) + ) + (let ((v1-13 (process-spawn othercam self gp-0 #t #t :name "othercam" :to self))) + (send-event (ppointer->process v1-13) 'mask (-> self mask-to-clear)) + ) + ) + (go-virtual pov-camera-playing) + ) + ) + +(defbehavior pov-camera-play-and-reposition pov-camera ((arg0 art-joint-anim) (arg1 vector) (arg2 float)) + (let ((s4-0 #f)) + (ja-no-eval :group! arg0 :num! (seek! max arg2) :frame-num 0.0) + (until (ja-done? 0) + (let ((v1-4 (and (not s4-0) (< (the float (+ (-> (ja-group) frames num-frames) -4)) (ja-frame-num 0))))) + (when v1-4 + (set! s4-0 #t) + (send-event *camera* 'teleport-to-vector-start-string arg1) + ) + ) + (suspend) + (ja :num! (seek! max arg2)) + ) + ) + 0 + (none) + ) + +(defstate pov-camera-playing (pov-camera) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('abort) + (when (logtest? (-> self flags) (pov-camera-flag notify-of-abort)) + (logior! (-> self flags) (pov-camera-flag allow-abort)) + (if (= (-> self anim-name type) string) + (go-virtual pov-camera-abort) + ) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self debounce-start-time)) + (if (= (-> self anim-name type) string) + (backup-load-state-and-set-cmds *load-state* (-> self command-list)) + ) + ) + :exit (behavior () + (if (= (-> self anim-name type) string) + (restore-load-state-and-cleanup *load-state*) + ) + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) + ) + :code (behavior () + (add-setting! 'music-volume 'rel (-> self music-volume-movie) 0) + (add-setting! 'sfx-volume 'rel (-> self sfx-volume-movie) 0) + (cond + ((= (-> self anim-name type) string) + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (abort? self) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= (-> self anim-name type) spool-anim) + (ja-play-spooled-anim + (the-as spool-anim (-> self anim-name)) + (the-as art-joint-anim #f) + (the-as art-joint-anim #f) + (method-of-object self abort?) + (spooler-flags blackout-on-stall) + ) + ) + ) + (go-virtual pov-camera-done-playing) + ) + :post (behavior () + (if (= (-> self anim-name type) string) + (execute-commands-up-to *load-state* (ja-aframe-num 0)) + ) + (ja-post) + ) + ) + +(defstate pov-camera-abort (pov-camera) + :virtual #t + :enter (behavior () + (logior! (-> self flags) (pov-camera-flag allow-abort)) + ) + :code (behavior () + (set-blackout-frames (seconds 0.035)) + (suspend) + (suspend) + (go-virtual pov-camera-done-playing) + ) + ) + +(defstate pov-camera-done-playing (pov-camera) + :virtual #t + :code (behavior () + (while (not (target-released? self)) + (suspend) + ) + (send-event (handle->process (-> self notify-handle)) 'notify 'die) + (suspend) + (suspend) + (cleanup-for-death self) + (deactivate self) + ) + ) + +(defmethod pov-camera-method-28 ((this pov-camera)) + 0 + (none) + ) + +(defmethod set-stack-size! ((this pov-camera)) + (stack-size-set! (-> this main-thread) 512) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior pov-camera-init-by-other pov-camera ((arg0 vector) (arg1 skeleton-group) (arg2 string) (arg3 pov-camera-flag) (arg4 process-drawable) (arg5 pair)) + (set-stack-size! self) + (set! (-> *game-info* pov-camera-handle) (process->handle self)) + (set! (-> self flags) arg3) + (set! (-> self command-list) arg5) + (set! (-> self music-volume-movie) 100.0) + (set! (-> self sfx-volume-movie) 100.0) + (if arg4 + (set! (-> self notify-handle) (process->handle arg4)) + (set! (-> self notify-handle) (the-as handle #f)) + ) + (set-time! (-> self debounce-start-time)) + (logclear! (-> self mask) (process-mask actor-pause movie enemy platform projectile)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 quad)) + (when (and (logtest? (-> self flags) (pov-camera-flag inherit-orientation)) arg4) + (let ((v1-22 (if (type? arg4 process-drawable) + arg4 + ) + ) + ) + (quaternion-copy! (-> self root quat) (-> v1-22 root quat)) + ) + ) + (initialize-skeleton self arg1 (the-as pair 0)) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (logior! (-> self skel status) (joint-control-status sync-math)) + (set! (-> self anim-name) arg2) + (cond + ((= (-> arg2 type) string) + (logior! (-> self skel status) (joint-control-status valid-spooled-frame)) + (let ((s5-1 (get-art-by-name (-> self draw art-group) arg2 art-joint-anim))) + (if (not s5-1) + (go process-drawable-art-error arg2) + ) + (ja-channel-set! 1) + (set! (-> self skel root-channel 0 frame-group) s5-1) + ) + ) + ((= (-> arg2 type) spool-anim) + ) + ) + (set! (-> self mask-to-clear) (process-mask movie enemy platform projectile)) + (set! (-> self event-hook) (lambda :behavior pov-camera + ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('mask) + (let ((v0-0 (the-as number (-> arg3 param 0)))) + (set! (-> self mask-to-clear) (the-as process-mask v0-0)) + v0-0 + ) + ) + (('music-movie-volume) + (set! (-> self music-volume-movie) (the-as float (-> arg3 param 0))) + ) + (('sfx-movie-volume) + (set! (-> self sfx-volume-movie) (the-as float (-> arg3 param 0))) + ) + ) + ) + ) + (pov-camera-method-28 self) + (go-virtual pov-camera-startup) + (none) + ) + +(defun othercam-calc ((arg0 float)) + (set! (-> *camera-other-fov* data) (* 2.0 (atan (/ 14.941477 (* 20.3 arg0)) 1.0))) + ) + +(defstate othercam-running (othercam) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 object)) + (case message + (('die) + (set! v0-0 #t) + (set! (-> self die?) (the-as symbol v0-0)) + v0-0 + ) + (('joint) + (cond + ((type? (-> block param 0) string) + (let ((v1-7 (the-as joint (get-art-by-name-method + (-> (the-as process-drawable (-> self hand process 0)) draw jgeo) + (the-as string (-> block param 0)) + (the-as type #f) + ) + ) + ) + ) + (when v1-7 + (set! v0-0 (+ (-> v1-7 number) 1)) + (set! (-> self cam-joint-index) (the-as int v0-0)) + v0-0 + ) + ) + ) + ((not (logtest? (-> block param 0) 7)) + (set! v0-0 (/ (the-as int (-> block param 0)) 8)) + (set! (-> self cam-joint-index) (the-as int v0-0)) + v0-0 + ) + ) + ) + (('target) + (set! v0-0 (process->handle (the-as process (-> block param 0)))) + (set! (-> self hand) (the-as handle v0-0)) + v0-0 + ) + (('mask) + (set! v0-0 (-> block param 0)) + (set! (-> self mask-to-clear) (the-as process-mask v0-0)) + v0-0 + ) + ) + ) + :enter (behavior () + (hide-hud-quick #f) + (case (-> self spooling?) + (('logo 'scene-player) + ) + (else + (add-setting! 'process-mask 'set 0.0 (-> self mask-to-clear)) + (add-setting! 'movie (process->ppointer self) 0.0 0) + (if (not (-> self border-value)) + (add-setting! 'border-mode (-> self border-value) 0.0 0) + ) + ) + ) + (set! (-> self had-valid-frame) #f) + (let ((gp-0 (-> self hand process 0))) + (vector<-cspace! + (-> self old-pos) + (-> (the-as process-drawable gp-0) node-list data (-> self cam-joint-index)) + ) + (let ((v1-20 (-> (the-as process-drawable gp-0) node-list data (-> self cam-joint-index) bone transform))) + (vector-normalize-copy! (-> self old-mat-z) (-> v1-20 fvec) -1.0) + ) + ) + (apply-settings *setting-control*) + ) + :exit (behavior () + (remove-setting! 'process-mask) + (apply-settings *setting-control*) + ) + :code (behavior () + (until #f + (let ((s2-0 (-> self hand process 0))) + (when (not s2-0) + (format #t "ERROR: othercam parent invalid~%") + (deactivate self) + ) + (set! (-> *camera-other-root* quad) (-> (the-as process-drawable s2-0) root trans quad)) + (let ((s4-0 (-> (the-as process-drawable s2-0) node-list data (-> self cam-joint-index) bone transform)) + (s3-0 (-> (the-as process-drawable s2-0) node-list data (-> self cam-joint-index) bone scale)) + (gp-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + (s1-0 + (or (!= (-> self spooling?) #t) + (logtest? (-> (the-as process-drawable s2-0) skel status) (joint-control-status valid-spooled-frame)) + ) + ) + ) + (vector<-cspace! s5-0 (-> (the-as process-drawable s2-0) node-list data (-> self cam-joint-index))) + (vector-normalize-copy! gp-0 (-> s4-0 fvec) -1.0) + (cond + ((< (vector-length (-> s4-0 fvec)) 0.1) + (set-blackout-frames (seconds 0.017)) + (if (not (logtest? (-> (the-as process-drawable s2-0) draw status) (draw-control-status no-draw no-draw-temp))) + (format 0 "ERROR: other camera zero matrix!~%") + ) + ) + (s1-0 + (when (not (-> self had-valid-frame)) + (set! (-> self had-valid-frame) #t) + (set! (-> self old-pos quad) (-> s5-0 quad)) + (set! (-> self old-mat-z quad) (-> gp-0 quad)) + ) + (set! (-> *camera-other-trans* quad) (-> s5-0 quad)) + (vector-normalize-copy! (-> *camera-other-matrix* rvec) (-> s4-0 rvec) -1.0) + (set! (-> *camera-other-matrix* rvec w) 0.0) + (vector-normalize-copy! (-> *camera-other-matrix* uvec) (-> s4-0 uvec) 1.0) + (set! (-> *camera-other-matrix* uvec w) 0.0) + (vector-normalize-copy! (-> *camera-other-matrix* fvec) (-> s4-0 fvec) -1.0) + (set! (-> *camera-other-matrix* fvec w) 0.0) + (vector-reset! (-> *camera-other-matrix* trans)) + (set! (-> self fov) (othercam-calc (-> s3-0 x))) + (set! *camera-look-through-other* 2) + (set! (-> self old-pos quad) (-> s5-0 quad)) + (set! (-> self old-mat-z quad) (-> gp-0 quad)) + ) + ) + ) + ) + (suspend) + (let ((a0-27 (-> self hand process 0))) + (when (or (-> self die?) (and (not (-> self survive-anim-end?)) (ja-anim-done? a0-27))) + (let ((gp-1 (current-time))) + (while (and (not (time-elapsed? gp-1 (seconds 60))) + (or (and (-> self entity) (not (is-object-visible? (-> self level) (-> self entity extra vis-id)))) + (< 81920.0 (vector-vector-distance (camera-pos) (-> *math-camera* trans))) + ) + ) + (suspend) + ) + ) + (deactivate self) + ) + ) + ) + #f + ) + ) + +(defbehavior othercam-init-by-other othercam ((arg0 pov-camera) (arg1 int) (arg2 symbol) (arg3 symbol)) + (set! (-> self spooling?) arg3) + (case (-> self spooling?) + (('logo) + ) + (else + (set! (-> *game-info* other-camera-handle) (process->handle self)) + ) + ) + (set! (-> self hand) (process->handle arg0)) + (set! (-> self cam-joint-index) arg1) + (logclear! (-> self mask) (process-mask freeze pause menu actor-pause)) + (set! (-> self border-value) #f) + (set! (-> self die?) #f) + (set! (-> self survive-anim-end?) arg2) + (set! (-> self mask-to-clear) (process-mask movie enemy platform projectile)) + (set! (-> self event-hook) (-> othercam-running event)) + (go othercam-running) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/collide/collide-cache-h.gc b/goal_src/jak3/engine/collide/collide-cache-h.gc index a3616341ac..a6ac7ad902 100644 --- a/goal_src/jak3/engine/collide/collide-cache-h.gc +++ b/goal_src/jak3/engine/collide/collide-cache-h.gc @@ -17,6 +17,7 @@ (declare-type collide-cache-prim structure) (declare-type collide-using-spheres-params structure) (declare-type instance-tie structure) +(declare-type collide-list structure) ;; DECOMP BEGINS @@ -54,6 +55,7 @@ Contains a reference back to the source object (like a collide-shape or water-co (prim-index uint16 :overlay-at (-> extra-quad 8)) (user16 uint16 :overlay-at (-> extra-quad 10)) (user32 uint32 :overlay-at (-> extra-quad 12)) + (clear-flags uint128 :overlay-at (-> extra-quad 0)) ) ) @@ -74,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 - (collide-cache-prim-method-9 () none) - (collide-cache-prim-method-10 () none) + (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) ) ) @@ -88,7 +90,9 @@ To use it, it must first be 'filled' with geometry. Then you can manually inspec The supported queries are 'line-sphere' (raycast) and 'spheres' (check if intersecting anything). It is not useful for ollision queries against a specific foreground object, like 'am I on top of platform X right now?'." ((num-tris int32) + (num-tris-u32 uint32 :overlay-at num-tris) (num-prims int32) + (num-prims-u32 uint32 :overlay-at num-prims) (ignore-mask pat-surface) (ignore-processes process 2) (collide-box bounding-box :inline) @@ -99,19 +103,19 @@ It is not useful for ollision queries against a specific foreground object, like (tris collide-cache-tri 461 :inline) ) (:methods - (collide-cache-method-9 () none) + (debug-draw (_type_) none) (fill-and-probe-using-line-sphere (_type_ collide-query) float) (fill-and-probe-using-spheres (_type_ collide-query) symbol) - (collide-cache-method-12 () none) + (fill-using-bounding-box (_type_ collide-query) none) (fill-using-line-sphere (_type_ collide-query) none) - (collide-cache-method-14 () none) - (collide-cache-method-15 () none) + (fill-using-spheres (_type_ collide-query) none) + (reset (_type_) none) (probe-using-line-sphere (_type_ collide-query) float) - (collide-cache-method-17 () none) - (collide-cache-method-18 () none) - (collide-cache-method-19 () none) - (collide-cache-method-20 () none) - (collide-cache-method-21 () none) + (probe-using-spheres (_type_ collide-query) symbol) + (fill-from-bg (_type_ (function collide-hash int collide-list collide-query int) (function collide-cache collide-list collide-query none) collide-query) none) + (fill-from-fg-boxes (_type_) none) + (fill-from-fg-line-sphere (_type_ collide-query) none) + (fill-from-water (_type_ water-control) none) (collide-cache-method-22 () none) (collide-cache-method-23 () none) (collide-cache-method-24 () none) diff --git a/goal_src/jak3/engine/collide/collide-cache.gc b/goal_src/jak3/engine/collide/collide-cache.gc index be8abab9e6..17a82ecfed 100644 --- a/goal_src/jak3/engine/collide/collide-cache.gc +++ b/goal_src/jak3/engine/collide/collide-cache.gc @@ -7,3 +7,885 @@ ;; DECOMP BEGINS +(defmethod reset ((this collide-cache)) + (set! (-> this num-tris) 0) + (set! (-> this num-prims) 0) + (set! (-> this ignore-processes 0) #f) + (set! (-> this ignore-processes 1) #f) + (set! *already-printed-exeeded-max-cache-tris* #f) + 0 + (none) + ) + +(defmethod fill-from-bg ((this collide-cache) + (arg0 (function collide-hash int collide-list collide-query int)) + (arg1 (function collide-cache collide-list collide-query none)) + (arg2 collide-query) + ) + (set! *already-printed-exeeded-max-cache-tris* #f) + (set! (-> *collide-list* num-items) 0) + (if *collide-list-boxes* + (add-debug-box + #t + (bucket-id debug) + (the-as vector (-> arg2 bbox)) + (-> arg2 bbox max) + (new 'static 'rgba :g #xff :b #xff :a #x80) + ) + ) + (dotimes (s3-0 (-> *level* length)) + (let ((v1-7 (-> *level* level s3-0))) + (if (= (-> v1-7 status) 'active) + (arg0 (-> v1-7 bsp collide-hash) 0 *collide-list* arg2) + ) + ) + ) + (if (> (-> *collide-list* num-items) 0) + (arg1 *collide-cache* *collide-list* arg2) + ) + 0 + (none) + ) + +;; WARN: Function (method 21 collide-cache) has a return type of none, but the expression builder found a return statement. +(defmethod fill-from-water ((this collide-cache) (arg0 water-control)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + ) + (init-vf0-vector) + (if (or (not arg0) (zero? arg0)) + (return #f) + ) + (when (= (-> this num-prims) 100) + (if (and (= *cheat-mode* 'debug) (not *display-capture-mode*)) + (format 0 "ERROR: Exceeded max number of collide-cache prims!~%") + ) + (return #f) + ) + (when (< 460 (+ (-> this num-tris) 2)) + (if (and (= *cheat-mode* 'debug) (not *display-capture-mode*)) + (print-exceeded-max-cache-tris) + ) + (return #f) + ) + (if (not (and (logtest? (-> arg0 flags) (water-flag active)) + (logtest? (-> arg0 flags) (water-flag can-ground)) + (logtest? (-> arg0 flags) (water-flag swim-ground under-water)) + (logtest? (water-flag over-water) (-> arg0 flags)) + (not (logtest? (water-flag jump-out) (-> arg0 flags))) + ) + ) + (return #f) + ) + (let ((v1-31 (-> arg0 collide-height))) + (.lvf vf1 (&-> this collide-box min quad)) + (.lvf vf3 (&-> this collide-box max quad)) + (let ((a2-6 (-> this num-prims-u32)) + (a3-4 (the-as (inline-array collide-cache-tri) (-> this tris (-> this num-tris)))) + ) + (.mov vf5 v1-31) + (.add.x.vf vf1 vf0 vf5 :mask #b10) + (set! (-> a3-4 0 clear-flags) (the-as uint128 0)) + (set! (-> a3-4 0 prim-index) a2-6) + (.add.x.vf vf3 vf0 vf5 :mask #b10) + (set! (-> a3-4 1 clear-flags) (the-as uint128 0)) + (set! (-> a3-4 1 prim-index) a2-6) + (.mov.vf vf2 vf1) + (.mov.vf vf4 vf1) + (.add.z.vf vf2 vf0 vf3 :mask #b100) + (.add.x.vf vf4 vf0 vf3 :mask #b1) + (.svf (&-> a3-4 0 vertex 0 quad) vf1) + (.svf (&-> a3-4 0 vertex 1 quad) vf2) + (.svf (&-> a3-4 0 vertex 2 quad) vf3) + (set! (-> a3-4 0 pat) (new 'static 'pat-surface :material (pat-material waterbottom) :nogrind #x1)) + (set! (-> a3-4 0 collide-ptr) arg0) + (.svf (&-> a3-4 1 vertex 0 quad) vf1) + (.svf (&-> a3-4 1 vertex 1 quad) vf3) + (.svf (&-> a3-4 1 vertex 2 quad) vf4) + (set! (-> a3-4 1 pat) (new 'static 'pat-surface :material (pat-material waterbottom))) + (set! (-> a3-4 1 collide-ptr) arg0) + ) + ) + (let ((v1-34 *collide-shape-prim-water*) + (a1-5 (-> this prims (-> this num-prims))) + ) + (set! (-> a1-5 first-tri) (the-as uint (-> this num-tris))) + (set! (-> a1-5 num-tris) (the-as uint 2)) + (set! (-> a1-5 prim) v1-34) + (set! (-> a1-5 ccache) this) + (set! (-> a1-5 prim-core world-sphere quad) (-> v1-34 prim-core world-sphere quad)) + (set! (-> a1-5 prim-core quad 1) (-> v1-34 prim-core quad 1)) + ) + (+! (-> this num-prims) 1) + (+! (-> this num-tris) 2) + 0 + (none) + ) + ) + +(defmethod fill-using-bounding-box ((this collide-cache) (arg0 collide-query)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (+! (-> *collide-stats* calls) 1) + (new 'static 'vector :x 0.5) + (nop!) + (let ((v1-4 (-> arg0 collide-with-s32))) + (nop!) + (let ((a0-2 (-> arg0 ignore-process0))) + (nop!) + (let ((a1-1 (-> arg0 ignore-process1))) + (nop!) + (let ((a2-0 (-> arg0 ignore-pat-s32))) + (nop!) + (.lvf vf1 (&-> arg0 bbox min quad)) + (nop!) + (.lvf vf2 (&-> arg0 bbox max quad)) + (nop!) + (set! (-> this ignore-processes 0) (the-as process a0-2)) + (nop!) + (set! (-> this ignore-processes 1) (the-as process a1-1)) + (.mov.vf vf1 vf0 :mask #b1000) + (nop!) + (.mov.vf vf2 vf0 :mask #b1000) + (set! (-> this ignore-mask) (the-as pat-surface a2-0)) + ) + ) + ) + (.ftoi.vf vf3 vf1) + (nop!) + (.ftoi.vf vf4 vf2) + (set! (-> this num-tris) 0) + (nop!) + (.svf (&-> this collide-box min quad) vf1) + (nop!) + (.svf (&-> this collide-box max quad) vf2) + (nop!) + (.svf (&-> this collide-box4w min quad) vf3) + (nop!) + (.svf (&-> this collide-box4w max quad) vf4) + (nop!) + (.svf (&-> arg0 bbox4w min quad) vf3) + (nop!) + (.svf (&-> arg0 bbox4w max quad) vf4) + (nop!) + (set! (-> this num-prims) 0) + (nop!) + (set! (-> this collide-with) (the-as collide-spec v1-4)) + ) + 0 + (when (logtest? (-> arg0 collide-with) (collide-spec backgnd)) + (fill-from-bg + this + (the-as + (function collide-hash int collide-list collide-query int) + (method-of-type collide-hash drawable-method-11) + ) + collide-list-fill-bg-using-box + arg0 + ) + (dotimes (s4-0 (-> *level* length)) + (let ((v1-15 (-> *level* level s4-0))) + (when (= (-> v1-15 status) 'active) + (let ((a0-6 (-> v1-15 bsp hfrag-drawable))) + (if (nonzero? a0-6) + (hfragment-method-17 (the-as hfragment a0-6) this arg0) + ) + ) + ) + ) + ) + (let ((a0-7 (-> this num-tris))) + (when (> a0-7 0) + (let ((v1-22 (-> this prims)) + (a1-9 *collide-shape-prim-backgnd*) + ) + (set! (-> v1-22 0 num-tris) (the-as uint a0-7)) + (set! (-> v1-22 0 prim) a1-9) + (set! (-> this num-prims) 1) + (set! (-> v1-22 0 first-tri) (the-as uint 0)) + (set! (-> v1-22 0 ccache) this) + (set! (-> v1-22 0 prim-core world-sphere quad) (-> a1-9 prim-core world-sphere quad)) + (set! (-> v1-22 0 prim-core quad 1) (-> a1-9 prim-core quad 1)) + ) + ) + ) + (+! (-> *collide-stats* output) (-> this num-tris)) + ) + (when (logtest? (-> arg0 collide-with) (collide-spec water)) + (let ((v1-29 (-> arg0 ignore-process0))) + (if v1-29 + (fill-from-water this (-> (the-as process-drawable v1-29) water)) + ) + ) + ) + (if (logtest? (-> arg0 collide-with) (collide-spec hit-by-player-list hit-by-others-list player-list)) + (fill-from-fg-boxes this) + ) + 0 + (none) + ) + ) + +(defmethod fill-using-line-sphere ((this collide-cache) (arg0 collide-query)) + ;; og:preserve-this float -> uint + (local-vars (v1-11 uint) (v1-20 float)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf12 :class vf) + (vf13 :class vf) + (vf14 :class vf) + (vf15 :class vf) + (vf16 :class vf) + (vf17 :class vf) + (vf18 :class vf) + (vf19 :class vf) + (vf2 :class vf) + (vf20 :class vf) + (vf22 :class vf) + (vf23 :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) + (+! (-> *collide-stats* calls) 1) + (let ((v1-3 0)) + (if (< (fabs (-> arg0 move-dist x)) 4096.0) + (+! v1-3 1) + ) + (if (< (fabs (-> arg0 move-dist y)) 4096.0) + (+! v1-3 1) + ) + (if (< (fabs (-> arg0 move-dist z)) 4096.0) + (+! v1-3 1) + ) + (when (< 1 v1-3) + (set-from-point-offset-pad! (-> arg0 bbox) (-> arg0 start-pos) (-> arg0 move-dist) (-> arg0 radius)) + (fill-using-bounding-box this arg0) + (b! #t cfg-55 :delay (nop!)) + (the-as none 0) + ) + ) + (nop!) + (let ((v1-10 (-> arg0 ignore-pat-s32))) + (nop!) + (let ((a0-14 (-> arg0 ignore-process0))) + (nop!) + (let ((a1-3 (-> arg0 ignore-process1))) + (nop!) + (let ((a2-1 (-> arg0 collide-with-s32))) + (nop!) + (.lvf vf9 (&-> arg0 exit-planes 0 quad)) + (nop!) + (.lvf vf3 (&-> arg0 move-dist quad)) + (nop!) + (.mov.vf vf13 vf0) + (nop!) + (.lvf vf1 (&-> arg0 start-pos quad)) + (.mul.vf vf8 vf3 vf3) + (nop!) + (.add.vf vf2 vf1 vf3) + (set! (-> this ignore-mask) (the-as pat-surface v1-10)) + (.add.y.vf vf8 vf8 vf8 :mask #b1) + (set! (-> this num-tris) 0) + (.min.vf vf4 vf1 vf2) + (set! (-> this num-prims) 0) + (.max.vf vf5 vf1 vf2) + (set! (-> this collide-with) (the-as collide-spec a2-1)) + ) + (.sub.w.vf vf10 vf0 vf9 :mask #b111) + (set! (-> this ignore-processes 0) (the-as process a0-14)) + (.add.z.vf vf8 vf8 vf8 :mask #b1) + (set! (-> this ignore-processes 1) (the-as process a1-3)) + ) + ) + ) + (.sub.w.vf vf4 vf4 vf9 :mask #b111) + (nop!) + (.add.w.vf vf5 vf5 vf9 :mask #b111) + (nop!) + (.ftoi.vf vf15 vf10) + (nop!) + (.isqrt.vf Q vf0 vf8 :fsf #b11 :ftf #b0) + (nop!) + (.add.w.vf vf11 vf0 vf9 :mask #b111) + (nop!) + (nop!) + (nop!) + (nop!) + (.svf (&-> arg0 local-box4w min quad) vf15) + (.ftoi.vf vf6 vf4) + (.svf (&-> this collide-box min quad) vf4) + (.ftoi.vf vf7 vf5) + (.svf (&-> this collide-box max quad) vf5) + (nop!) + (.svf (&-> arg0 bbox min quad) vf4) + (nop!) + (.svf (&-> arg0 bbox max quad) vf5) + (nop!) + (.svf (&-> this collide-box4w min quad) vf6) + (nop!) + (.svf (&-> this collide-box4w max quad) vf7) + (nop!) + (.svf (&-> arg0 bbox4w min quad) vf6) + (nop!) + (.svf (&-> arg0 bbox4w max quad) vf7) + (.wait.vf) + (nop!) + (.add.vf vf8 vf0 Q :mask #b1) + (nop!) + (.mul.x.vf vf12 vf3 vf8) + (nop!) + (.nop.vf) + (nop!) + (.div.vf Q vf0 vf8 :fsf #b11 :ftf #b0) + (nop!) + (.mul.vf vf22 vf12 vf12) + (nop!) + (.abs.vf vf23 vf12) + (nop!) + (.add.y.vf vf22 vf22 vf22 :mask #b1) + (.mov v1-11 vf23) + (.wait.vf) + (nop!) + (.add.vf vf8 vf0 Q :mask #b1) + (nop!) + (b! (zero? v1-11) cfg-12 :likely-delay (.add.z.vf vf13 vf0 vf12 :mask #b1)) + (.sub.y.vf vf13 vf0 vf12 :mask #b1) + (nop!) + (.isqrt.vf Q vf0 vf22 :fsf #b11 :ftf #b0) + (nop!) + (.add.x.vf vf13 vf0 vf12 :mask #b10) + (nop!) + (.wait.vf) + (nop!) + (.mul.vf vf13 vf13 Q :mask #b11) + (nop!) + (label cfg-12) + (.outer.product.a.vf acc vf12 vf13) + (nop!) + (.add.x.vf vf11 vf11 vf8 :mask #b1) + (nop!) + (.outer.product.b.vf vf14 vf13 vf12 acc) + (nop!) + (.ftoi.vf vf16 vf11) + (nop!) + (.mov.vf vf17 vf12) + (nop!) + (.mov.vf vf18 vf13) + (nop!) + (.mov.vf vf19 vf14) + (nop!) + (.mov.vf vf17 vf0 :mask #b1110) + (.svf (&-> arg0 local-box4w max quad) vf16) + (.mov.vf vf18 vf0 :mask #b1101) + (nop!) + (.mov.vf vf19 vf0 :mask #b1011) + (nop!) + (.add.x.vf vf17 vf17 vf13 :mask #b10) + (nop!) + (.add.y.vf vf18 vf18 vf12 :mask #b1) + (nop!) + (.add.z.vf vf19 vf19 vf12 :mask #b1) + (nop!) + (.add.x.vf vf17 vf17 vf14 :mask #b100) + (nop!) + (.add.y.vf vf18 vf18 vf14 :mask #b100) + (nop!) + (.add.z.vf vf19 vf19 vf13 :mask #b10) + (nop!) + (.mul.x.vf acc vf17 vf1) + (nop!) + (.add.mul.y.vf acc vf18 vf1 acc) + (.svf (&-> arg0 inv-mat rvec quad) vf17) + (.add.mul.z.vf vf20 vf19 vf1 acc) + (.svf (&-> arg0 inv-mat uvec quad) vf18) + (.sub.vf vf20 vf0 vf20) + (.svf (&-> arg0 inv-mat fvec quad) vf19) + (nop!) + (.svf (&-> arg0 inv-mat trans quad) vf20) + (set! (-> arg0 rlength x) (if (= (-> arg0 move-dist x) 0.0) + 0.0 + (/ 1.0 (-> arg0 move-dist x)) + ) + ) + (set! (-> arg0 rlength y) (if (= (-> arg0 move-dist y) 0.0) + 0.0 + (/ 1.0 (-> arg0 move-dist y)) + ) + ) + (set! (-> arg0 rlength z) (if (= (-> arg0 move-dist z) 0.0) + 0.0 + (/ 1.0 (-> arg0 move-dist z)) + ) + ) + (let ((f0-19 1.0)) + (.lvf vf1 (&-> (-> arg0 move-dist) 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-20 vf1) + (set! (-> arg0 rlength w) (/ f0-19 v1-20)) + ) + (set! (-> arg0 exit-planes 0 x) (if (< 0.0 (-> arg0 move-dist x)) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (set! (-> arg0 exit-planes 0 y) (if (< 0.0 (-> arg0 move-dist y)) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (set! (-> arg0 exit-planes 0 z) (if (< 0.0 (-> arg0 move-dist z)) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (set! (-> arg0 exit-planes 1 x) (if (< (-> arg0 move-dist x) 0.0) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (set! (-> arg0 exit-planes 1 y) (if (< (-> arg0 move-dist y) 0.0) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (set! (-> arg0 exit-planes 1 z) (if (< (-> arg0 move-dist z) 0.0) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (when (logtest? (-> arg0 collide-with) (collide-spec backgnd)) + (fill-from-bg + this + (the-as + (function collide-hash int collide-list collide-query int) + (method-of-type collide-hash drawable-method-12) + ) + collide-list-fill-bg-using-line-sphere + arg0 + ) + (dotimes (s4-0 (-> *level* length)) + (let ((v1-36 (-> *level* level s4-0))) + (when (= (-> v1-36 status) 'active) + (let ((a0-18 (-> v1-36 bsp hfrag-drawable))) + (if (nonzero? a0-18) + (hfragment-method-18 (the-as hfragment a0-18) this arg0) + ) + ) + ) + ) + ) + (let ((a0-19 (-> this num-tris))) + (when (> a0-19 0) + (let ((v1-43 (-> this prims)) + (a1-11 *collide-shape-prim-backgnd*) + ) + (set! (-> v1-43 0 num-tris) (the-as uint a0-19)) + (set! (-> v1-43 0 prim) a1-11) + (set! (-> this num-prims) 1) + (set! (-> v1-43 0 first-tri) (the-as uint 0)) + (set! (-> v1-43 0 ccache) this) + (set! (-> v1-43 0 prim-core world-sphere quad) (-> a1-11 prim-core world-sphere quad)) + (set! (-> v1-43 0 prim-core quad 1) (-> a1-11 prim-core quad 1)) + ) + ) + ) + (+! (-> *collide-stats* output) (-> this num-tris)) + ) + (when (logtest? (-> arg0 collide-with) (collide-spec water)) + (let ((a1-13 (-> (the-as process-drawable (-> arg0 ignore-process0)) water))) + (if (nonzero? a1-13) + (fill-from-water this a1-13) + ) + ) + ) + (if (logtest? (-> arg0 collide-with) (collide-spec hit-by-player-list hit-by-others-list player-list)) + (fill-from-fg-line-sphere this arg0) + ) + 0 + (label cfg-55) + (none) + ) + ) + +(defmethod fill-from-fg-boxes ((this collide-cache)) + (let ((s5-0 (-> this collide-with))) + (set! *actor-list-length* 0) + (if (logtest? s5-0 (collide-spec hit-by-others-list)) + (set! *actor-list-length* (add-an-object *actor-hash* (-> this collide-box) *actor-list* 256)) + ) + (when (logtest? s5-0 (collide-spec player-list)) + (let ((a0-2 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((v1-13 (-> 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? s5-0 (-> a1-1 prim-core collide-as)) + (let ((a1-2 (-> a1-1 prim-core))) + (when (and (>= (+ (-> a1-2 world-sphere x) (-> a1-2 world-sphere w)) (-> this collide-box min x)) + (>= (-> this collide-box max x) (- (-> a1-2 world-sphere x) (-> a1-2 world-sphere w))) + (>= (+ (-> a1-2 world-sphere y) (-> a1-2 world-sphere w)) (-> this collide-box min y)) + (>= (-> this collide-box max y) (- (-> a1-2 world-sphere y) (-> a1-2 world-sphere w))) + (>= (+ (-> a1-2 world-sphere z) (-> a1-2 world-sphere w)) (-> this collide-box min z)) + (>= (-> this collide-box max z) (- (-> a1-2 world-sphere z) (-> a1-2 world-sphere w))) + ) + (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-13) + *collide-player-list* + (set! v1-13 (-> v1-13 next0)) + ) + ) + ) + ) + (when (logtest? s5-0 (collide-spec hit-by-player-list)) + (let ((a0-5 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((v1-21 (-> 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? s5-0 (-> a1-13 prim-core collide-as)) + (let ((a1-14 (-> a1-13 prim-core))) + (when (and (>= (+ (-> a1-14 world-sphere x) (-> a1-14 world-sphere w)) (-> this collide-box min x)) + (>= (-> this collide-box max x) (- (-> a1-14 world-sphere x) (-> a1-14 world-sphere w))) + (>= (+ (-> a1-14 world-sphere y) (-> a1-14 world-sphere w)) (-> this collide-box min y)) + (>= (-> this collide-box max y) (- (-> a1-14 world-sphere y) (-> a1-14 world-sphere w))) + (>= (+ (-> a1-14 world-sphere z) (-> a1-14 world-sphere w)) (-> this collide-box min z)) + (>= (-> this collide-box max z) (- (-> a1-14 world-sphere z) (-> a1-14 world-sphere w))) + ) + (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-21) + *collide-hit-by-player-list* + (set! v1-21 (-> v1-21 next0)) + ) + ) + ) + ) + (dotimes (s4-0 *actor-list-length*) + (let ((v1-26 (-> *actor-list* s4-0))) + (when (logtest? s5-0 (-> v1-26 root-prim prim-core collide-as)) + (let ((a0-13 (-> v1-26 process))) + (if (not (or (= a0-13 (-> this ignore-processes 0)) (= a0-13 (-> this ignore-processes 1)))) + (add-fg-prim-using-box (-> v1-26 root-prim) this) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod add-fg-prim-using-box ((this collide-shape-prim) (arg0 collide-cache)) + (format 0 "ERROR: Illegal collide-shape-prim type passed to collide-shape-prim::add-fg-prim-using-box!~%") + (none) + ) + +(defmethod-mips2c "(method 10 collide-shape-prim-mesh)" 10 collide-shape-prim-mesh) + +(defmethod-mips2c "(method 10 collide-shape-prim-sphere)" 10 collide-shape-prim-sphere) + +(defmethod-mips2c "(method 10 collide-shape-prim-group)" 10 collide-shape-prim-group) + +(defmethod fill-from-fg-line-sphere ((this collide-cache) (arg0 collide-query)) + (local-vars (v1-9 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 (-> arg0 collide-with))) + (set! *actor-list-length* 0) + (if (logtest? s4-0 (collide-spec hit-by-others-list)) + (set! *actor-list-length* (fill-actor-list-for-sphere + *actor-hash* + (-> arg0 start-pos) + (-> arg0 move-dist) + (-> arg0 radius) + *actor-list* + 256 + -1 + ) + ) + ) + (let ((f30-0 0.0) + (s3-0 (new 'stack-no-clear 'matrix)) + ) + (.lvf vf1 (&-> (-> arg0 move-dist) 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-9 vf1) + (let ((f0-1 v1-9)) + (if (< 0.0 f0-1) + (set! f30-0 (/ 1.0 f0-1)) + ) + ) + (when (logtest? s4-0 (collide-spec player-list)) + (let ((v1-17 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((s2-0 (-> v1-17 next0))) + (while (!= v1-17 (-> *collide-player-list* alive-list-end)) + (let* ((s1-0 (-> (the-as connection v1-17) param1)) + (v1-18 (-> (the-as collide-shape s1-0) root-prim)) + ) + (when (logtest? s4-0 (-> v1-18 prim-core collide-as)) + (let ((s0-0 (-> v1-18 prim-core))) + (vector-! (-> s3-0 uvec) (the-as vector s0-0) (-> arg0 start-pos)) + (let* ((f1-2 (* (vector-dot (-> arg0 move-dist) (-> s3-0 uvec)) f30-0)) + (f0-6 (fmax 0.0 (fmin 1.0 f1-2))) + ) + (vector+float*! (-> s3-0 rvec) (-> arg0 start-pos) (-> arg0 move-dist) f0-6) + ) + (let ((f0-7 (vector-vector-distance-squared (-> s3-0 rvec) (the-as vector s0-0))) + (f1-5 (+ (-> arg0 radius) (-> s0-0 world-sphere w))) + ) + (when (< f0-7 (* f1-5 f1-5)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape s1-0)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! v1-17 s2-0) + *collide-player-list* + (set! s2-0 (-> s2-0 next0)) + ) + ) + ) + ) + (when (logtest? s4-0 (collide-spec hit-by-player-list)) + (let ((v1-38 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((s2-1 (-> v1-38 next0))) + (while (!= v1-38 (-> *collide-hit-by-player-list* alive-list-end)) + (let* ((s1-1 (-> (the-as connection v1-38) param1)) + (v1-39 (-> (the-as collide-shape s1-1) root-prim)) + ) + (when (logtest? s4-0 (-> v1-39 prim-core collide-as)) + (let ((s0-1 (-> v1-39 prim-core))) + (vector-! (-> s3-0 uvec) (the-as vector s0-1) (-> arg0 start-pos)) + (let* ((f1-8 (* (vector-dot (-> arg0 move-dist) (-> s3-0 uvec)) f30-0)) + (f0-11 (fmax 0.0 (fmin 1.0 f1-8))) + ) + (vector+float*! (-> s3-0 rvec) (-> arg0 start-pos) (-> arg0 move-dist) f0-11) + ) + (let ((f0-12 (vector-vector-distance-squared (-> s3-0 rvec) (the-as vector s0-1))) + (f1-11 (+ (-> arg0 radius) (-> s0-1 world-sphere w))) + ) + (when (< f0-12 (* f1-11 f1-11)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape s1-1)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! v1-38 s2-1) + *collide-hit-by-player-list* + (set! s2-1 (-> s2-1 next0)) + ) + ) + ) + ) + ) + (dotimes (s3-1 *actor-list-length*) + (let ((v1-58 (-> *actor-list* s3-1))) + (when (logtest? s4-0 (-> v1-58 root-prim prim-core collide-as)) + (let ((a0-37 (-> v1-58 process))) + (if (not (or (= a0-37 (-> this ignore-processes 0)) (= a0-37 (-> this ignore-processes 1)))) + (add-fg-prim-using-line-sphere (-> v1-58 root-prim) this arg0) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod add-fg-prim-using-line-sphere ((this collide-shape-prim) (arg0 collide-cache) (arg1 object)) + (format + 0 + "ERROR: Illegal collide-shape-prim type passed to collide-shape-prim::add-fg-prim-using-line-sphere!~%" + ) + (none) + ) + +(defmethod-mips2c "(method 11 collide-shape-prim-mesh)" 11 collide-shape-prim-mesh) + +(defmethod-mips2c "(method 11 collide-shape-prim-sphere)" 11 collide-shape-prim-sphere) + +(defmethod-mips2c "(method 11 collide-shape-prim-group)" 11 collide-shape-prim-group) + +(defmethod fill-and-probe-using-line-sphere ((this collide-cache) (arg0 collide-query)) + (fill-using-line-sphere this arg0) + (probe-using-line-sphere this arg0) + ) + +(deftype collide-puls-work (structure) + ((ignore-pat pat-surface) + (bsphere sphere :inline) + (move-dist vector :inline) + ) + ) + + +(defmethod probe-using-line-sphere ((this collide-cache) (arg0 collide-query)) + (rlet ((vf0 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'collide-cache-tri))) + (.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))) + (.mul.w.vf vf3 vf0 vf4 :mask #b1000) + (.svf (&-> s5-0 vertex 2 quad) vf2) + (.svf (&-> s5-0 vertex 1 quad) vf3) + (let ((s4-0 (the-as object (-> this prims))) + (f30-0 -100000000.0) + ) + (countdown (s3-0 (-> this num-prims)) + (when (and (logtest? (-> arg0 collide-with) (-> (the-as collide-cache-prim s4-0) prim-core collide-as)) + (logtest? (-> arg0 action-mask) (-> (the-as collide-cache-prim s4-0) prim-core action)) + ) + (cond + ((>= (-> (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) + f30-0 + (collide-action solid) + ) + ) + ) + (if (>= f0-0 0.0) + (set! f30-0 f0-0) + ) + ) + ) + (else + (when (not (logtest? (-> arg0 ignore-pat) + (-> (the-as collide-shape-prim-sphere (-> (the-as collide-cache-prim s4-0) prim)) pat) + ) + ) + (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) + f30-0 + (collide-action solid) + ) + ) + ) + (if (>= f0-1 0.0) + (set! f30-0 f0-1) + ) + ) + ) + ) + ) + ) + (set! s4-0 (-> (the-as (inline-array collide-cache-prim) s4-0) 1)) + ) + f30-0 + ) + ) + ) + ) + +(deftype lsmi-work (structure) + ((best-u float) + (orig-best-u float) + (action uint32) + (cquery collide-query :inline) + ) + ) + + +(defmethod-mips2c "(method 9 collide-cache-prim)" 9 collide-cache-prim) + +(defmethod-mips2c "(method 10 collide-cache-prim)" 10 collide-cache-prim) + +(defmethod fill-and-probe-using-spheres ((this collide-cache) (arg0 collide-query)) + (fill-using-spheres this arg0) + (probe-using-spheres this arg0) + ) + +(defmethod fill-using-spheres ((this collide-cache) (arg0 collide-query)) + (new 'stack-no-clear 'bounding-box) + (set-from-spheres! + (-> arg0 bbox) + (the-as (inline-array sphere) (-> arg0 best-dist)) + (the-as int (-> arg0 best-other-prim)) + ) + (fill-using-bounding-box this arg0) + (none) + ) + +(defmethod-mips2c "(method 17 collide-cache)" 17 collide-cache) + +(defmethod-mips2c "(method 9 collide-puss-work)" 9 collide-puss-work) + +(defmethod-mips2c "(method 10 collide-puss-work)" 10 collide-puss-work) + + diff --git a/goal_src/jak3/engine/collide/collide-debug.gc b/goal_src/jak3/engine/collide/collide-debug.gc index f2dbc74754..51c6bac1d8 100644 --- a/goal_src/jak3/engine/collide/collide-debug.gc +++ b/goal_src/jak3/engine/collide/collide-debug.gc @@ -7,3 +7,288 @@ ;; DECOMP BEGINS +;; this file is debug only +(declare-file (debug)) + +(defmethod debug-draw ((this collide-cache)) + (let ((gp-0 (the-as object (-> this tris)))) + (countdown (s4-0 (-> this num-tris)) + (let ((t1-0 (copy-and-set-field (-> *pat-mode-info* (-> (the-as collide-cache-tri gp-0) pat mode) color) a 64))) + (add-debug-flat-triangle + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> (the-as collide-cache-tri gp-0) vertex)) + (-> (the-as collide-cache-tri gp-0) vertex 1) + (-> (the-as collide-cache-tri gp-0) vertex 2) + t1-0 + ) + ) + (set! gp-0 (&+ (the-as collide-cache-tri gp-0) 64)) + ) + ) + (let ((gp-1 (the-as object (-> this prims)))) + (countdown (s5-1 (-> this num-prims)) + (when (= (-> (the-as collide-cache-prim gp-1) prim-core prim-type) -1) + (let ((t0-1 + (copy-and-set-field + (-> *pat-mode-info* + (-> (the-as collide-shape-prim-sphere (-> (the-as collide-shape-prim gp-1) prim-core action)) pat mode) + color + ) + a + 64 + ) + ) + ) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> (the-as collide-cache-prim gp-1) prim-core)) + (-> (the-as collide-cache-prim gp-1) prim-core world-sphere w) + t0-1 + ) + ) + ) + (set! gp-1 (&+ (the-as collide-cache-prim gp-1) 48)) + ) + ) + (print-collide-cache-tri-count) + 0 + (none) + ) + +(deftype col-rend-filter (structure) + ((show-pat-set pat-surface) + (show-pat-clear pat-surface) + (event-mask uint32) + ) + ) + + +;; WARN: Return type mismatch symbol vs none. +(defun col-rend-draw ((arg0 col-rend) (arg1 col-rend-filter)) + (let ((s4-0 (new 'stack-no-clear 'matrix))) + (set! (-> s4-0 rvec quad) (-> (math-camera-matrix) fvec quad)) + (vector-normalize! (-> s4-0 rvec) 1.0) + (let ((s3-1 (the-as collide-cache-tri (-> *collide-cache* tris)))) + (countdown (s2-0 (-> *collide-cache* num-tris)) + (vector-3pt-cross! (-> s4-0 uvec) (the-as vector (-> s3-1 vertex)) (-> s3-1 vertex 1) (-> s3-1 vertex 2)) + (vector-normalize! (-> s4-0 uvec) 1.0) + (when (or (-> arg0 show-back-faces?) (>= 0.0 (vector-dot (-> s4-0 rvec) (-> s4-0 uvec)))) + (let ((v1-9 (-> s3-1 pat))) + (cond + ((and (or (zero? (-> arg1 show-pat-set)) (logtest? v1-9 (-> arg1 show-pat-set))) + (or (zero? (-> arg1 show-pat-clear)) (not (logtest? v1-9 (-> arg1 show-pat-clear)))) + (or (zero? (-> arg1 event-mask)) (logtest? (-> arg1 event-mask) (ash 1 (the-as int (-> v1-9 event))))) + ) + (let ((t1-0 (copy-and-set-field (-> *pat-mode-info* (-> v1-9 mode) color) a 64))) + (add-debug-flat-triangle + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> s3-1 vertex)) + (-> s3-1 vertex 1) + (-> s3-1 vertex 2) + t1-0 + ) + ) + (if (-> arg0 outline?) + (add-debug-outline-triangle + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> s3-1 vertex)) + (-> s3-1 vertex 1) + (-> s3-1 vertex 2) + (new 'static 'rgba :r #x10 :g #x10 :b #x10 :a #x80) + ) + ) + (when (-> arg0 show-normals?) + (vector+! (-> s4-0 fvec) (the-as vector (-> s3-1 vertex)) (-> s3-1 vertex 1)) + (vector+! (-> s4-0 fvec) (-> s4-0 fvec) (-> s3-1 vertex 2)) + (vector-float/! (-> s4-0 fvec) (-> s4-0 fvec) 3.0) + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + (-> s4-0 fvec) + (-> s4-0 uvec) + (meters 0.75) + (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + ) + ) + ((-> arg0 ghost-hidden?) + (add-debug-flat-triangle + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> s3-1 vertex)) + (-> s3-1 vertex 1) + (-> s3-1 vertex 2) + (new 'static 'rgba :r #x20 :g #x20 :b #x20 :a #x20) + ) + (if (-> arg0 outline?) + (add-debug-outline-triangle + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> s3-1 vertex)) + (-> s3-1 vertex 1) + (-> s3-1 vertex 2) + (new 'static 'rgba :r #x10 :g #x10 :b #x10 :a #x10) + ) + ) + ) + ) + ) + ) + (&+! s3-1 64) + ) + ) + ) + (let ((s5-1 (the-as object (-> *collide-cache* prims)))) + (countdown (s4-1 (-> *collide-cache* num-prims)) + (when (= (-> (the-as collide-cache-prim s5-1) prim-core prim-type) -1) + (let ((v1-37 (-> (the-as collide-shape-prim-sphere (-> (the-as collide-cache-prim s5-1) prim)) pat))) + (when (and (or (zero? (-> arg1 show-pat-set)) (logtest? v1-37 (-> arg1 show-pat-set))) + (or (zero? (-> arg1 show-pat-clear)) (not (logtest? v1-37 (-> arg1 show-pat-clear)))) + (or (zero? (-> arg1 event-mask)) (logtest? (-> arg1 event-mask) (ash 1 (the-as int (-> v1-37 event))))) + ) + (let ((t0-5 (copy-and-set-field (-> *pat-mode-info* (-> v1-37 mode) color) a 64))) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> (the-as collide-cache-prim s5-1) prim-core)) + (-> (the-as collide-cache-prim s5-1) prim-core world-sphere w) + t0-5 + ) + ) + ) + ) + ) + (set! s5-1 (&+ (the-as collide-cache-prim s5-1) 48)) + ) + ) + (none) + ) + +(defmethod draw ((this col-rend)) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (let ((f30-0 (-> this bbox-radius))) + (let ((v1-0 (-> this track))) + (cond + ((zero? v1-0) + (set! (-> this bbox-center quad) (-> (target-pos 0) quad)) + (+! (-> this bbox-center y) (* 0.7 f30-0)) + ) + ((= v1-0 1) + (position-in-front-of-camera! + (-> this bbox-center) + (+ (-> this camera-to-bbox-dist) (-> this bbox-radius)) + 0.0 + ) + ) + ) + ) + (set! (-> s5-0 bbox min quad) (-> this bbox-center quad)) + (set! (-> s5-0 bbox min x) (- (-> s5-0 bbox min x) f30-0)) + (set! (-> s5-0 bbox min y) (- (-> s5-0 bbox min y) f30-0)) + (set! (-> s5-0 bbox min z) (- (-> s5-0 bbox min z) f30-0)) + (set! (-> s5-0 bbox max quad) (-> this bbox-center quad)) + (+! (-> s5-0 bbox max x) f30-0) + (+! (-> s5-0 bbox max y) f30-0) + (+! (-> s5-0 bbox max z) f30-0) + ) + (let ((v1-9 -1)) + (let ((a0-9 (-> this cspec))) + (if (not (logtest? a0-9 (collide-spec crate))) + (set! v1-9 (logxor v1-9 1)) + ) + (if (not (logtest? a0-9 (collide-spec civilian))) + (set! v1-9 (logxor v1-9 64)) + ) + (if (not (logtest? a0-9 (collide-spec enemy))) + (set! v1-9 (logxor #x100000 v1-9)) + ) + (if (not (logtest? a0-9 (collide-spec obstacle))) + (set! v1-9 (logxor v1-9 2)) + ) + (if (not (logtest? a0-9 (collide-spec vehicle-sphere))) + (set! v1-9 (logand #x100743 v1-9)) + ) + ) + (set! (-> s5-0 collide-with) (the-as collide-spec v1-9)) + ) + (set! (-> s5-0 ignore-pat) (new 'static 'pat-surface)) + (set! (-> s5-0 ignore-process0) #f) + (set! (-> s5-0 ignore-process1) #f) + (add-debug-box + #t + (bucket-id debug) + (the-as vector (-> s5-0 bbox)) + (-> s5-0 bbox max) + (if (logtest? (current-time) 128) + (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x20) + (new 'static 'rgba :a #x20) + ) + ) + (fill-using-bounding-box *collide-cache* s5-0) + ) + (let ((s5-1 (-> this show-only)) + (a1-17 (new 'stack 'col-rend-filter)) + ) + (when (nonzero? s5-1) + (cond + ((logtest? s5-1 8) + (set! (-> a1-17 show-pat-clear) (new 'static 'pat-surface :noboard #x1)) + ) + ((logtest? s5-1 16) + (set! (-> a1-17 show-pat-clear) (new 'static 'pat-surface :nogrind #x1)) + ) + ((logtest? s5-1 32) + (set! (-> a1-17 show-pat-clear) (new 'static 'pat-surface :nogrind #x1)) + (set! (-> a1-17 show-pat-set) (new 'static 'pat-surface :nojak #x1 :board #x1)) + ) + (else + (if (logtest? s5-1 8192) + (logior! (-> a1-17 show-pat-set) (new 'static 'pat-surface :nolineofsight #x1)) + ) + (if (logtest? s5-1 1024) + (set! (-> a1-17 show-pat-set noentity) 1) + ) + (if (logtest? s5-1 64) + (set! (-> a1-17 show-pat-set noboard) 1) + ) + (if (logtest? s5-1 2048) + (set! (-> a1-17 show-pat-set nogrind) 1) + ) + (if (logtest? s5-1 128) + (set! (-> a1-17 show-pat-set nocamera) 1) + ) + (if (logtest? s5-1 4096) + (set! (-> a1-17 show-pat-set nojak) 1) + ) + (if (logtest? s5-1 256) + (set! (-> a1-17 show-pat-set noedge) 1) + ) + (if (logtest? s5-1 #x8000) + (set! (-> a1-17 show-pat-set nopilot) 1) + ) + (if (logtest? s5-1 512) + (logior! (-> a1-17 show-pat-set) (new 'static 'pat-surface :noendlessfall #x1)) + ) + (if (logtest? s5-1 #x4000) + (logior! (-> a1-17 show-pat-set) (new 'static 'pat-surface :nomech #x1)) + ) + (if (logtest? #x10000 s5-1) + (logior! (-> a1-17 show-pat-set) (new 'static 'pat-surface :noproj #x1)) + ) + (if (logtest? #x40000 s5-1) + (logior! (-> a1-17 show-pat-set) (new 'static 'pat-surface :probe #x1)) + ) + (if (logtest? #x20000 s5-1) + (logior! (-> a1-17 event-mask) 64) + ) + ) + ) + ) + (col-rend-draw this a1-17) + ) + (none) + ) diff --git a/goal_src/jak3/engine/collide/collide-edge-grab-h.gc b/goal_src/jak3/engine/collide/collide-edge-grab-h.gc index 7837efd301..544b1ceaa6 100644 --- a/goal_src/jak3/engine/collide/collide-edge-grab-h.gc +++ b/goal_src/jak3/engine/collide/collide-edge-grab-h.gc @@ -18,6 +18,8 @@ (declare-type collide-cache-tri structure) +(declare-type collide-edge-work structure) + ;; DECOMP BEGINS (deftype pilot-edge-grab-info (structure) @@ -53,7 +55,7 @@ ) (:methods (edge-grab-info-method-9 (_type_) symbol) - (edge-grab-info-method-10 () none) + (edge-grab-info-method-10 (_type_) none) ) ) @@ -74,7 +76,7 @@ (edge-vec-norm vector :inline) ) (:methods - (collide-edge-edge-method-9 () none) + (no-collision-at-edge (_type_ collide-edge-work edge-grab-info) symbol) ) ) @@ -98,8 +100,8 @@ (attempts qword 32 :inline) ) (:methods - (collide-edge-hold-list-method-9 () none) - (collide-edge-hold-list-method-10 () none) + (debug-draw (_type_) object) + (add-to-list! (_type_ collide-edge-hold-item) none) ) ) @@ -144,18 +146,18 @@ (hold-list collide-edge-hold-list :inline) ) (:methods - (collide-edge-work-method-9 () none) - (collide-edge-work-method-10 () none) - (collide-edge-work-method-11 () none) - (collide-edge-work-method-12 () none) - (collide-edge-work-method-13 () none) - (collide-edge-work-method-14 () none) - (collide-edge-work-method-15 () none) - (collide-edge-work-method-16 () none) - (collide-edge-work-method-17 () none) - (collide-edge-work-method-18 () none) - (collide-edge-work-method-19 () none) - (collide-edge-work-method-20 () none) + (search-for-edges (_type_ collide-edge-hold-list) none) + (debug-draw-edges (_type_) object) + (debug-draw-tris (_type_) none) + (debug-draw-sphere (_type_) none) + (find-adjacent-edge (_type_ collide-edge-hold-item edge-grab-info) none) + (compute-center-point! (_type_ collide-edge-edge vector) float) + (get-best-hand-point (_type_ vector vector int) float) + (find-grabbable-edges (_type_) none) + (find-grabbable-tris (_type_) none) + (should-add-to-list? (_type_ collide-edge-hold-item collide-edge-edge) symbol) + (find-best-grab! (_type_ collide-edge-hold-list edge-grab-info) symbol) + (check-grab-for-collisions (_type_ collide-edge-hold-item edge-grab-info) symbol) ) ) diff --git a/goal_src/jak3/engine/collide/collide-edge-grab.gc b/goal_src/jak3/engine/collide/collide-edge-grab.gc index 9f33a2744a..4aa0b83196 100644 --- a/goal_src/jak3/engine/collide/collide-edge-grab.gc +++ b/goal_src/jak3/engine/collide/collide-edge-grab.gc @@ -5,5 +5,726 @@ ;; name in dgo: collide-edge-grab ;; dgos: GAME +(define-extern *no-walk-surface* surface) + ;; DECOMP BEGINS +;; WARN: Function (method 28 target) has a return type of none, but the expression builder found a return statement. +(defmethod target-method-28 ((this target) (arg0 collide-cache) (arg1 collide-edge-spec)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (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 num-verts) (the-as uint 0)) + (set! (-> s5-0 num-edges) (the-as uint 0)) + (set! (-> s5-0 num-tris) (the-as uint 0)) + (let ((v1-3 (-> this control))) + (set! (-> s5-0 ccache) arg0) + (.lvf vf1 (&-> s5-0 spec local-cache-fill-box min quad)) + (.lvf vf2 (&-> s5-0 spec local-cache-fill-box max quad)) + (set! (-> s5-0 cshape) v1-3) + (.lvf vf3 (&-> v1-3 trans quad)) + ) + (.add.vf vf1 vf1 vf3 :mask #b111) + (.add.vf vf2 vf2 vf3 :mask #b111) + (.svf (&-> s5-0 cache-fill-box min quad) vf1) + (.svf (&-> s5-0 cache-fill-box max quad) vf2) + (.lvf vf4 (&-> s5-0 spec local-within-reach-box min quad)) + (.lvf vf5 (&-> s5-0 spec local-within-reach-box max quad)) + (.add.vf vf4 vf4 vf3 :mask #b111) + (.add.vf vf5 vf5 vf3 :mask #b111) + (.ftoi.vf vf6 vf4) + (.ftoi.vf vf7 vf5) + (.svf (&-> s5-0 within-reach-box min quad) vf4) + (.svf (&-> s5-0 within-reach-box max quad) vf5) + (.svf (&-> s5-0 within-reach-box4w min quad) vf6) + (.svf (&-> s5-0 within-reach-box4w max quad) vf7) + (let ((s3-0 (new 'stack-no-clear 'collide-query))) + (set! (-> s3-0 collide-with) (-> this control root-prim prim-core collide-with)) + (set! (-> s3-0 ignore-process0) this) + (set! (-> s3-0 ignore-process1) #f) + (set! (-> s3-0 ignore-pat) (-> s5-0 spec ignore-pat)) + (set! (-> s3-0 action-mask) (collide-action solid)) + (mem-copy! (the-as pointer (-> s3-0 bbox)) (the-as pointer (-> s5-0 cache-fill-box)) 32) + (fill-using-bounding-box arg0 s3-0) + ) + (find-grabbable-tris s5-0) + (when (nonzero? (-> s5-0 num-tris)) + (find-grabbable-edges s5-0) + (when (nonzero? (-> s5-0 num-edges)) + (set! (-> s5-0 search-pt quad) (-> this control midpoint-of-hands quad)) + (when (!= (-> *cpad-list* cpads (-> this control cpad number) stick0-speed) 0.0) + (set! (-> s5-0 search-dir-vec quad) (-> this control to-target-pt-xz quad)) + (search-for-edges s5-0 (-> s5-0 hold-list)) + (when (find-best-grab! s5-0 (-> s5-0 hold-list) *edge-grab-info*) + (set! (-> *edge-grab-info* found-edge?) #t) + (if (logtest? (-> s5-0 spec flags) (collide-edge-spec-flags send-event)) + (send-event this 'edge-grab) + ) + (return #f) + ) + ) + (vector-z-quaternion! (-> s5-0 search-dir-vec) (-> this control quat-for-control)) + (search-for-edges s5-0 (-> s5-0 hold-list)) + (when (find-best-grab! s5-0 (-> s5-0 hold-list) *edge-grab-info*) + (set! (-> *edge-grab-info* found-edge?) #t) + (if (logtest? (-> s5-0 spec flags) (collide-edge-spec-flags send-event)) + (send-event this 'edge-grab) + ) + ) + 0 + ) + ) + ) + 0 + (none) + ) + ) + +;; WARN: Function (method 9 collide-edge-work) has a return type of none, but the expression builder found a return statement. +(defmethod search-for-edges ((this collide-edge-work) (arg0 collide-edge-hold-list)) + (set! (-> arg0 num-allocs) (the-as uint 0)) + (set! (-> arg0 num-attempts) (the-as uint 0)) + (set! (-> arg0 head) #f) + (let ((s4-0 (the-as collide-edge-hold-item (-> arg0 items))) + (s3-0 (the-as collide-edge-edge (-> this edges))) + ) + (countdown (s2-0 (-> this num-edges)) + (when (not (-> s3-0 ignore)) + (compute-center-point! this s3-0 (-> s4-0 center-pt)) + (when (should-add-to-list? this s4-0 s3-0) + (add-to-list! arg0 s4-0) + (+! (-> arg0 num-allocs) 1) + (when (= (-> arg0 num-allocs) 32) + (format 0 "ERROR: Reached limit of edge grab hold items!~%") + (return #f) + ) + (&+! s4-0 48) + ) + ) + (&+! s3-0 48) + ) + ) + 0 + (none) + ) + +(defmethod-mips2c "(method 10 collide-edge-hold-list)" 10 collide-edge-hold-list) + +(deftype pbhp-stack-vars (structure) + ((edge collide-edge-edge) + (allocated basic) + (neg-hold-pt vector :inline) + (split-vec vector :inline) + ) + ) + + +(defmethod-mips2c "(method 19 collide-edge-work)" 19 collide-edge-work) + +;; WARN: Return type mismatch int vs symbol. +(defmethod check-grab-for-collisions ((this collide-edge-work) (arg0 collide-edge-hold-item) (arg1 edge-grab-info)) + (local-vars (sv-656 vector) (sv-672 vector)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let* ((s2-0 (-> arg0 edge)) + (s1-0 (-> s2-0 etri ctri)) + (s4-0 (-> s1-0 prim-index)) + ) + (let ((s0-0 (new 'stack-no-clear 'vector))) + (let ((a1-1 s0-0)) + (let ((v1-1 (-> arg0 center-pt))) + (let ((a0-1 (-> s2-0 edge-vec-norm))) + (let ((a2-2 1105.92)) + (.mov vf7 a2-2) + ) + (.lvf vf5 (&-> a0-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) + ) + (let ((f0-1 (get-best-hand-point this (-> arg1 right-hand-hold) s0-0 (the-as int s4-0)))) + (if (< 491.52 f0-1) + (return (the-as symbol #f)) + ) + ) + (set! sv-672 s0-0) + (set! sv-656 (-> arg0 center-pt)) + (let ((v0-2 (vector-negate! (new 'stack-no-clear 'vector) (-> s2-0 edge-vec-norm)))) + (let ((v1-8 1105.92)) + (.mov vf7 v1-8) + ) + (.lvf vf5 (&-> v0-2 quad)) + ) + (.lvf vf4 (&-> sv-656 quad)) + (.add.x.vf 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-672 quad) vf6) + (let ((f0-3 (get-best-hand-point this (-> arg1 left-hand-hold) s0-0 (the-as int s4-0)))) + (if (< 491.52 f0-3) + (return (the-as symbol #f)) + ) + ) + ) + (set! (-> arg1 tri-vertex 0 quad) (-> s1-0 vertex 0 quad)) + (set! (-> arg1 world-vertex 4 quad) (-> s1-0 vertex 1 quad)) + (set! (-> arg1 world-vertex 5 quad) (-> s1-0 vertex 2 quad)) + (set! (-> arg1 edge-tri-pat) (-> s1-0 pat)) + (set! (-> arg1 center-hold quad) (-> arg0 center-pt quad)) + (set! (-> arg1 world-vertex 0 quad) (-> s2-0 vertex-ptr 0 0 quad)) + (set! (-> arg1 world-vertex 1 quad) (-> s2-0 vertex-ptr 1 0 quad)) + (set! (-> arg1 hanging-matrix uvec quad) + (-> (the-as collide-shape-moving (-> this process 0 root)) dynam gravity-normal quad) + ) + (vector-normalize! + (vector-! (-> arg1 hanging-matrix fvec) (-> arg1 world-vertex 1) (the-as vector (-> arg1 world-vertex))) + 1.0 + ) + (vector-normalize! + (vector-cross! + (the-as vector (-> arg1 hanging-matrix)) + (-> arg1 hanging-matrix fvec) + (-> arg1 hanging-matrix uvec) + ) + 1.0 + ) + (vector-cross! + (-> arg1 hanging-matrix fvec) + (the-as vector (-> arg1 hanging-matrix)) + (-> arg1 hanging-matrix uvec) + ) + (set! (-> arg1 hanging-matrix trans quad) (-> arg1 center-hold quad)) + (transform-vectors! + (-> arg1 hanging-matrix) + (-> this world-player-spheres) + (-> this spec local-player-spheres) + 12 + ) + (let ((a1-12 (new 'stack-no-clear 'collide-query))) + (let ((v1-28 a1-12)) + (set! (-> v1-28 best-dist) (the-as float (-> this world-player-spheres))) + (set! (-> v1-28 best-other-prim) (the-as collide-shape-prim 12)) + (set! (-> v1-28 collide-with) (-> this cshape root-prim prim-core collide-with)) + (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 best-my-prim) (the-as collide-shape-prim #t)) + (set! (-> v1-28 action-mask) (collide-action solid)) + ) + (if (probe-using-spheres (-> this ccache) a1-12) + (return (the-as symbol #f)) + ) + ) + (set! (-> arg1 status) (the-as uint 0)) + (if (logtest? (-> this spec flags) (collide-edge-spec-flags find-adjacent-edge)) + (find-adjacent-edge this arg0 arg1) + ) + (let* ((v1-41 (the-as object (-> this ccache prims s4-0 prim))) + (a0-44 (-> (the-as collide-shape-prim v1-41) cshape)) + ) + (cond + (a0-44 + (set! (-> arg1 actor-cshape-prim-offset) (- (the-as int v1-41) (the-as uint (the-as int (-> a0-44 process))))) + (set! (-> arg1 actor-handle) (process->handle (-> a0-44 process))) + (let ((a1-19 + (-> a0-44 process node-list data (-> (the-as collide-shape-prim v1-41) transform-index) bone transform) + ) + (s5-1 (new 'stack-no-clear 'matrix)) + ) + (matrix-4x4-inverse! s5-1 a1-19) + (dotimes (s4-1 8) + (vector-matrix*! (-> arg1 local-vertex s4-1) (-> arg1 world-vertex s4-1) s5-1) + ) + ) + ) + (else + (set! (-> arg1 actor-cshape-prim-offset) 0) + (set! (-> arg1 actor-handle) (the-as handle #f)) + ) + ) + ) + ) + (the-as symbol 0) + ) + ) + +(deftype faei-stack-vars (structure) + ((hold-edge-vec-norm vector :inline) + (adj-edge-vec-norm vector :inline) + (found-left? symbol) + (left-dot float) + (found-right? symbol) + (right-dot float) + ) + ) + + +(defmethod no-collision-at-edge ((this collide-edge-edge) (arg0 collide-edge-work) (arg1 edge-grab-info)) + (let ((s4-0 (new 'stack-no-clear 'matrix)) + (s5-0 (new 'stack-no-clear 'inline-array 'sphere 6)) + ) + (dotimes (s2-0 6) + ((method-of-type sphere new) (the-as symbol (-> s5-0 s2-0)) sphere) + ) + (set! (-> s4-0 uvec quad) + (-> (the-as collide-shape-moving (-> arg0 process 0 root)) dynam gravity-normal quad) + ) + (vector-normalize! (vector-! (-> s4-0 fvec) (-> this vertex-ptr 1 0) (-> this vertex-ptr 0 0)) 1.0) + (vector-normalize! (vector-cross! (-> s4-0 rvec) (-> s4-0 fvec) (-> s4-0 uvec)) 1.0) + (vector-cross! (-> s4-0 fvec) (-> s4-0 rvec) (-> s4-0 uvec)) + (vector-average! (-> s4-0 trans) (-> this vertex-ptr 1 0) (-> this vertex-ptr 0 0)) + (transform-vectors! s4-0 s5-0 (-> arg0 spec local-player-spheres) 6) + (let ((a1-11 (new 'stack-no-clear 'collide-query))) + (let ((v1-13 a1-11)) + (set! (-> v1-13 best-dist) (the-as float s5-0)) + (set! (-> v1-13 best-other-prim) (the-as collide-shape-prim 6)) + (set! (-> v1-13 collide-with) (-> arg0 cshape root-prim prim-core collide-with)) + (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 best-my-prim) (the-as collide-shape-prim #t)) + (set! (-> v1-13 action-mask) (collide-action solid)) + ) + (not (probe-using-spheres (-> arg0 ccache) a1-11)) + ) + ) + ) + +(defmethod find-adjacent-edge ((this collide-edge-work) (arg0 collide-edge-hold-item) (arg1 edge-grab-info)) + (let ((s5-0 (new 'stack-no-clear 'faei-stack-vars))) + (let* ((v1-0 (-> arg0 edge)) + (s3-0 (-> v1-0 vertex-ptr 0 0)) + (s2-0 (-> v1-0 vertex-ptr 1 0)) + (s1-0 (the-as collide-edge-edge (-> this edges))) + ) + (set! (-> s5-0 found-left?) #f) + (set! (-> s5-0 found-right?) #f) + (vector-! (-> s5-0 hold-edge-vec-norm) s2-0 s3-0) + (vector-normalize! (-> s5-0 hold-edge-vec-norm) 1.0) + (countdown (s0-0 (-> this num-edges)) + (when (not (-> s1-0 ignore)) + (let ((v1-6 (-> s1-0 vertex-ptr 1 0))) + (when (= v1-6 s3-0) + (vector-! (-> s5-0 adj-edge-vec-norm) v1-6 (-> s1-0 vertex-ptr 0 0)) + (vector-normalize! (-> s5-0 adj-edge-vec-norm) 1.0) + (let ((f30-0 (vector-dot (-> s5-0 adj-edge-vec-norm) (-> s5-0 hold-edge-vec-norm)))) + (when (and (or (not (-> s5-0 found-left?)) (< (-> s5-0 left-dot) f30-0) (< -0.7 f30-0)) + (no-collision-at-edge s1-0 this arg1) + ) + (set! (-> s5-0 left-dot) f30-0) + (set! (-> s5-0 found-left?) #t) + (set! (-> arg1 adjacent-edge-left-vertex quad) (-> s1-0 vertex-ptr 0 0 quad)) + 0 + ) + ) + ) + ) + (let ((v1-18 (-> s1-0 vertex-ptr 0 0))) + (when (= v1-18 s2-0) + (vector-! (-> s5-0 adj-edge-vec-norm) (-> s1-0 vertex-ptr 1 0) v1-18) + (vector-normalize! (-> s5-0 adj-edge-vec-norm) 1.0) + (let ((f30-1 (vector-dot (-> s5-0 adj-edge-vec-norm) (-> s5-0 hold-edge-vec-norm)))) + (when (and (or (not (-> s5-0 found-right?)) (< (-> s5-0 right-dot) f30-1) (< -0.7 f30-1)) + (no-collision-at-edge s1-0 this arg1) + ) + (set! (-> s5-0 right-dot) f30-1) + (set! (-> s5-0 found-right?) #t) + (set! (-> arg1 adjacent-edge-right-vertex quad) (-> s1-0 vertex-ptr 1 0 quad)) + 0 + ) + ) + ) + ) + ) + (&+! s1-0 48) + ) + ) + (let ((v1-31 (-> arg1 status))) + (if (-> s5-0 found-left?) + (set! v1-31 (logior v1-31 1)) + ) + (if (-> s5-0 found-right?) + (set! v1-31 (logior v1-31 2)) + ) + (set! (-> arg1 status) v1-31) + ) + ) + 0 + (none) + ) + +(defmethod-mips2c "(method 9 edge-grab-info)" 9 edge-grab-info) + +(defmethod-mips2c "(method 17 collide-edge-work)" 17 collide-edge-work) + +(defmethod-mips2c "(method 16 collide-edge-work)" 16 collide-edge-work) + +(defmethod get-best-hand-point ((this collide-edge-work) (arg0 vector) (arg1 vector) (arg2 int)) + (let ((f30-0 -1.0)) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (dotimes (s1-0 (the-as int (-> this num-edges))) + (let ((v1-4 (-> this edges s1-0))) + (when (not (-> v1-4 ignore)) + (when (= (-> v1-4 etri ctri prim-index) arg2) + (let ((f0-0 (vector-segment-distance-point! arg1 (-> v1-4 vertex-ptr 0 0) (-> v1-4 vertex-ptr 1 0) s2-0))) + (when (or (< f30-0 0.0) (< f0-0 f30-0)) + (set! f30-0 f0-0) + (set! (-> arg0 quad) (-> s2-0 quad)) + ) + ) + ) + ) + ) + ) + ) + f30-0 + ) + ) + +(defmethod-mips2c "(method 18 collide-edge-work)" 18 collide-edge-work) + +(defmethod compute-center-point! ((this collide-edge-work) (arg0 collide-edge-edge) (arg1 vector)) + (local-vars (v1-1 float) (v1-2 float) (v1-3 float)) + (rlet ((Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf10 :class vf) + (vf11 :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) + (.mov.vf vf7 vf0) + (.lvf vf1 (&-> this search-pt quad)) + (let ((f0-0 0.0)) + (let ((v1-0 (-> arg0 vertex-ptr 0)) + (a0-1 (-> arg0 vertex-ptr 1)) + ) + (.lvf vf2 (&-> v1-0 0 quad)) + (.lvf vf3 (&-> a0-1 0 quad)) + ) + (.sub.vf vf4 vf1 vf2) + (.sub.vf vf5 vf3 vf2) + (.mul.vf vf6 vf5 vf5) + (.add.z.vf vf6 vf6 vf6 :mask #b1) + (.sqrt.vf Q vf6 :ftf #b0) + (nop!) + (.wait.vf) + (nop!) + (.add.vf vf6 vf0 Q :mask #b1) + (.nop.vf) + (.mov v1-1 vf6) + (let ((f1-0 v1-1)) + (.div.vf Q vf0 vf6 :fsf #b11 :ftf #b0) + (.wait.vf) + (nop!) + (.add.vf vf8 vf0 Q :mask #b1) + (.mul.x.vf vf9 vf5 vf8) + (.mov v1-2 vf8) + (.mul.vf vf10 vf9 vf4) + (.add.z.vf vf10 vf10 vf10 :mask #b1) + (let ((f2-0 v1-2)) + (.mov v1-3 vf10) + (let ((f3-0 v1-3)) + (b! (< f3-0 f0-0) cfg-4 :likely-delay (set! f3-0 f0-0)) + (b! (< f1-0 f3-0) cfg-4 :likely-delay (set! f3-0 f1-0)) + (label cfg-4) + (let ((v1-4 (* f3-0 f2-0))) + (.mov vf11 v1-4) + ) + ) + ) + ) + ) + (.mul.x.vf vf7 vf5 vf11 :mask #b111) + (.add.vf vf7 vf7 vf2 :mask #b111) + (.svf (&-> arg1 quad) vf7) + 0.0 + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod edge-grab-info-method-10 ((this edge-grab-info)) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> this world-vertex)) + (-> this world-vertex 1) + (new 'static 'rgba :r #xff :a #x60) + #f + (the-as rgba -1) + ) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> this center-hold) + (meters 0.05) + (new 'static 'rgba :r #xff :g #xff :a #x80) + ) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> this left-hand-hold) + (meters 0.05) + (new 'static 'rgba :r #xff :g #xff :a #x60) + ) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> this right-hand-hold) + (meters 0.05) + (new 'static 'rgba :r #xff :g #xff :a #x60) + ) + (if (logtest? (-> this status) 1) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> this adjacent-edge-left-vertex) + (the-as vector (-> this world-vertex)) + (new 'static 'rgba :r #x80 :a #x60) + #f + (the-as rgba -1) + ) + ) + (if (logtest? (-> this status) 2) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> this world-vertex 1) + (-> this adjacent-edge-right-vertex) + (new 'static 'rgba :r #x80 :a #x60) + #f + (the-as rgba -1) + ) + ) + (add-debug-outline-triangle + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> this tri-vertex)) + (-> this world-vertex 4) + (-> this world-vertex 5) + (new 'static 'rgba :r #xff :a #x30) + ) + (cond + ((nonzero? (-> this actor-cshape-prim-offset)) + (if (handle->process (-> this actor-handle)) + (format *stdcon* "grab: ~A~%" (-> this actor-handle process 0 name)) + (format *stdcon* "grab: invalid handle~%") + ) + ) + (else + (format *stdcon* "grab: ground~%") + ) + ) + (none) + ) + +(defmethod debug-draw-edges ((this collide-edge-work)) + (local-vars (sv-32 (function _varargs_ object))) + (let ((gp-0 0)) + (dotimes (s4-0 (the-as int (-> this num-edges))) + (let* ((v1-3 (-> this edges s4-0)) + (a2-0 (-> v1-3 vertex-ptr 0 0)) + (a3-0 (-> v1-3 vertex-ptr 1 0)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (vector+! s3-0 a2-0 a3-0) + (vector-float*! s3-0 s3-0 0.5) + (cond + ((-> v1-3 ignore) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + a2-0 + a3-0 + (new 'static 'rgba :r #x7f :g #x7f :b #x7f :a #x50) + #f + (the-as rgba -1) + ) + (+! gp-0 1) + gp-0 + ) + (else + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + s3-0 + (-> v1-3 outward) + (meters 0.3) + (new 'static 'rgba :r #xff :a #x80) + ) + (let ((s2-0 add-debug-text-3d) + (s1-0 #t) + (s0-0 577) + ) + (set! sv-32 format) + (let ((a0-10 (clear *temp-string*)) + (a1-4 "~D") + (a2-2 s4-0) + ) + (sv-32 a0-10 a1-4 a2-2) + ) + (s2-0 s1-0 (the-as bucket-id s0-0) *temp-string* s3-0 (font-color white) (the-as vector2h #f)) + ) + ) + ) + ) + ) + (format *stdcon* "found ~D edges (and ~D ignored)~%" (- (-> this num-edges) (the-as uint gp-0)) gp-0) + ) + ) + +(defmethod debug-draw-sphere ((this collide-edge-work)) + (dotimes (s5-0 (the-as int (-> this num-verts))) + (let ((a2-0 (-> this verts s5-0))) + (add-debug-sphere #t (bucket-id debug-no-zbuf1) a2-0 (meters 0.2) (new 'static 'rgba :r #xff :g #xff :a #x80)) + ) + ) + 0 + (none) + ) + +(defmethod debug-draw ((this collide-edge-hold-list)) + (let ((s4-0 (-> this head)) + (s5-0 0) + ) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s2-0 #t) + ) + (set! (-> s3-0 quad) (-> *target* control midpoint-of-hands quad)) + (while s4-0 + (+! s5-0 1) + (set! (-> s3-0 y) (-> s4-0 center-pt y)) + (add-debug-sphere #t (bucket-id debug-no-zbuf1) s3-0 (meters 0.1) (new 'static 'rgba :a #x80)) + (cond + (s2-0 + (set! s2-0 #f) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> s4-0 center-pt) + (meters 0.15) + (new 'static 'rgba :r #xff :g #xff :a #x80) + ) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> s4-0 outward-pt) + (meters 0.1) + (new 'static 'rgba :r #xff :a #x80) + ) + ) + (else + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> s4-0 center-pt) + (meters 0.15) + (new 'static 'rgba :r #x7f :g #x7f :a #x40) + ) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> s4-0 outward-pt) + (meters 0.1) + (new 'static 'rgba :r #x7f :a #x40) + ) + ) + ) + (set! s4-0 (-> s4-0 next)) + ) + ) + (format *stdcon* "hold list has ~D item(s)~%" s5-0) + ) + (dotimes (s5-1 (the-as int (-> this num-attempts))) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> this attempts s5-1)) + (meters 0.1) + (new 'static 'rgba :a #x40) + ) + ) + (format *stdcon* "hold list has ~D attempt(s)~%" (-> this num-attempts)) + ) + +(defmethod debug-draw-tris ((this collide-edge-work)) + (dotimes (s5-0 (the-as int (-> this num-tris))) + (let* ((v1-3 (-> this tris s5-0 ctri)) + (t1-0 (copy-and-set-field (-> *pat-mode-info* (-> v1-3 pat mode) color) a 64)) + ) + (add-debug-outline-triangle + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> v1-3 vertex)) + (-> v1-3 vertex 1) + (-> v1-3 vertex 2) + t1-0 + ) + ) + ) + 0 + (none) + ) + +(let ((v1-2 (new 'static 'surface + :name '*no-walk-surface* + :turnv 0.5 + :turnvf 0.5 + :turnvv 1.0 + :turnvvf 1.0 + :tiltv 1.0 + :tiltvf 1.0 + :tiltvv 1.0 + :tiltvvf 1.0 + :transv-max 0.7 + :target-speed 0.7 + :seek0 24576.0 + :seek90 24576.0 + :seek180 24576.0 + :fric 23756.8 + :nonlin-fric-dist 4091904.0 + :slope-slip-angle 16384.0 + :bend-speed 4.0 + :alignv 0.5 + :slope-up-traction 0.9 + :align-speed 1.0 + :flags (surface-flag no-turn-around turn-to-vel) + ) + ) + ) + (set! *no-walk-surface* v1-2) + (set! (-> v1-2 exit-hook) nothing) + (set! (-> v1-2 mult-hook) (the-as (function surface surface surface int none) nothing)) + (set! (-> v1-2 touch-hook) nothing) + (set! (-> v1-2 active-hook) nothing) + ) diff --git a/goal_src/jak3/engine/collide/collide-frag.gc b/goal_src/jak3/engine/collide/collide-frag.gc index b019d3d7bf..8af3e0a3c3 100644 --- a/goal_src/jak3/engine/collide/collide-frag.gc +++ b/goal_src/jak3/engine/collide/collide-frag.gc @@ -7,3 +7,96 @@ ;; DECOMP BEGINS +(defmethod login ((this drawable-tree-collide-fragment)) + "Initialize the object after it is loaded." + this + ) + +(defmethod draw ((this drawable-tree-collide-fragment)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + (when *display-render-collision* + (dotimes (s5-0 (-> this length)) + (draw (-> this data s5-0)) + ) + ) + 0 + (none) + ) + +(defmethod unpack-vis ((this drawable-tree-collide-fragment) (arg0 (pointer int8)) (arg1 (pointer int8))) + arg1 + ) + +;; WARN: Return type mismatch int vs collide-fragment. +(defmethod mem-usage ((this collide-fragment) (usage memory-usage-block) (flags int)) + (let ((s5-0 (if (logtest? flags 1) + 55 + 51 + ) + ) + (s4-0 (-> this mesh)) + ) + (set! (-> usage data s5-0 name) "collide-fragment") + (+! (-> usage data s5-0 count) 1) + (let ((v1-9 (+ (asize-of this) (asize-of s4-0)))) + (+! (-> usage data s5-0 used) v1-9) + (+! (-> usage data s5-0 total) (logand -16 (+ v1-9 15))) + ) + (set! (-> usage data (+ s5-0 1) name) "collision-poly") + (+! (-> usage data (+ s5-0 1) count) (-> s4-0 poly-count)) + (let ((v1-20 (+ (-> s4-0 strip-data-len) (-> s4-0 poly-count)))) + (+! (-> usage data (+ s5-0 1) used) v1-20) + (+! (-> usage data (+ s5-0 1) total) v1-20) + ) + (set! (-> usage data (+ s5-0 2) name) "collision-vertex") + (+! (-> usage data (+ s5-0 2) count) (-> s4-0 vertex-count)) + (let ((v1-29 (* (-> s4-0 vertex-data-qwc) 16))) + (+! (-> usage data (+ s5-0 2) used) v1-29) + (let ((v0-2 (+ (-> usage data (+ s5-0 2) total) v1-29))) + (set! (-> usage data (+ s5-0 2) total) v0-2) + (the-as collide-fragment v0-2) + ) + ) + ) + ) + +(defmethod login ((this drawable-inline-array-collide-fragment)) + "Initialize the object after it is loaded." + this + ) + +(defmethod draw ((this collide-fragment)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + 0 + (none) + ) + +(defmethod draw ((this drawable-inline-array-collide-fragment)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + (dotimes (s5-0 (-> this length)) + (let ((s4-0 (-> this data s5-0))) + (if (sphere-cull (-> s4-0 bsphere)) + (draw s4-0) + ) + ) + ) + 0 + (none) + ) + +(defmethod mem-usage ((this drawable-inline-array-collide-fragment) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-5 32)) + (+! (-> usage data 0 used) v1-5) + (+! (-> usage data 0 total) (logand -16 (+ v1-5 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this data s3-0) usage flags) + ) + this + ) diff --git a/goal_src/jak3/engine/collide/collide-h.gc b/goal_src/jak3/engine/collide/collide-h.gc index 5302b789ef..94e41d3c16 100644 --- a/goal_src/jak3/engine/collide/collide-h.gc +++ b/goal_src/jak3/engine/collide/collide-h.gc @@ -16,7 +16,9 @@ This has both inputs from the user, and collision results." (ignore-process0 process-tree :overlay-at (-> ignore-processes 0)) (ignore-process1 process-tree :overlay-at (-> ignore-processes 1)) (ignore-pat pat-surface) + (ignore-pat-s32 int32 :overlay-at ignore-pat) (collide-with collide-spec) + (collide-with-s32 int32 :overlay-at collide-with) (overlay-params uint32 3 :offset 112) (bbox bounding-box :inline) (bbox4w bounding-box4w :inline) diff --git a/goal_src/jak3/engine/collide/collide-mesh-h.gc b/goal_src/jak3/engine/collide/collide-mesh-h.gc index 22b0654808..e637b7d7b4 100644 --- a/goal_src/jak3/engine/collide/collide-mesh-h.gc +++ b/goal_src/jak3/engine/collide/collide-mesh-h.gc @@ -5,6 +5,9 @@ ;; name in dgo: collide-mesh-h ;; dgos: GAME +(declare-type collide-mesh-cache-tri structure) +(declare-type collide-shape-prim-mesh basic) + ;; DECOMP BEGINS (deftype collide-tri-result (structure) @@ -38,13 +41,13 @@ bound to the joint specified by `joint-id`." (tris collide-mesh-tri 1 :inline :offset 32) ) (:methods - (collide-mesh-method-9 () none) - (collide-mesh-method-10 () none) - (collide-mesh-method-11 () none) - (collide-mesh-method-12 () none) - (collide-mesh-method-13 () none) - (collide-mesh-method-14 () none) - (collide-mesh-method-15 () none) + (debug-draw-tris (_type_ process-drawable int) none) + (overlap-test (_type_ collide-mesh-cache-tri vector) symbol) + (should-push-away-test (_type_ collide-mesh-cache-tri collide-tri-result vector float) float) + (sphere-on-platform-test (_type_ collide-mesh-cache-tri collide-tri-result vector float) float) + (unpack-mesh-to-cache! (_type_ (inline-array collide-mesh-cache-tri) matrix) none) + (collide-mesh-math-1 (_type_ object object) none) + (collide-mesh-math-2 (_type_ object object object) none) ) ) @@ -62,7 +65,7 @@ bound to the joint specified by `joint-id`." (deftype collide-mesh-cache-entry (structure) "A foreground mesh collide cache entry." ((mat matrix :inline) - (tris collide-mesh-cache-tri :dynamic) + (tris collide-mesh-cache-tri :inline :dynamic) ) ) @@ -75,10 +78,10 @@ bound to the joint specified by `joint-id`." (data uint8 48000) ) (:methods - (collide-mesh-cache-method-9 () none) + (populate-for-prim-mesh (_type_ collide-shape-prim-mesh) collide-mesh-cache-entry) (is-id? (_type_ int) symbol) (next-id! (_type_) uint) - (collide-mesh-cache-method-12 () none) + (allocate! (_type_ int) collide-mesh-cache-entry) ) ) diff --git a/goal_src/jak3/engine/collide/collide-mesh.gc b/goal_src/jak3/engine/collide/collide-mesh.gc index 5a7cb38b2a..3bc37bbe39 100644 --- a/goal_src/jak3/engine/collide/collide-mesh.gc +++ b/goal_src/jak3/engine/collide/collide-mesh.gc @@ -7,3 +7,607 @@ ;; DECOMP BEGINS +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this collide-mesh)) + (the-as int (+ (-> collide-mesh size) (* (+ (-> this num-tris) -1) 8))) + ) + +;; WARN: Return type mismatch int vs collide-mesh. +(defmethod mem-usage ((this collide-mesh) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 83 (-> usage length))) + (set! (-> usage data 82 name) "collide-mesh") + (+! (-> usage data 82 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 82 used) v1-6) + (+! (-> usage data 82 total) (logand -16 (+ v1-6 15))) + ) + (set! (-> usage length) (max 83 (-> usage length))) + (set! (-> usage data 82 name) "collide-mesh") + (+! (-> usage data 82 count) 1) + (let ((v1-16 (* (-> this num-verts) 16))) + (+! (-> usage data 82 used) v1-16) + (+! (-> usage data 82 total) (logand -16 (+ v1-16 15))) + ) + (the-as collide-mesh 0) + ) + +(defmethod debug-draw-tris ((this collide-mesh) (arg0 process-drawable) (arg1 int)) + (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) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (the-as object (-> this tris))) + (s4-0 (-> arg0 node-list data arg1 bone transform)) + ) + (countdown (s3-0 (-> this num-tris)) + (let ((a2-1 (new 'stack-no-clear 'vector)) + (a3-0 (new 'stack-no-clear 'vector)) + (t0-0 (new 'stack-no-clear 'vector)) + ) + (.lvf vf4 (&-> s4-0 rvec quad)) + (.lvf vf5 (&-> s4-0 uvec quad)) + (.lvf vf6 (&-> s4-0 fvec quad)) + (.lvf vf7 (&-> s4-0 trans quad)) + (.lvf vf1 (&-> (-> this vertex-data (-> (the-as collide-mesh-tri s5-0) vertex-index 0)) quad)) + (.lvf vf2 (&-> (-> this vertex-data (-> (the-as collide-mesh-tri s5-0) vertex-index 1)) quad)) + (.lvf vf3 (&-> (-> this vertex-data (-> (the-as collide-mesh-tri s5-0) vertex-index 2)) quad)) + (let ((t1-0 (copy-and-set-field (-> *pat-mode-info* (-> (the-as collide-mesh-tri s5-0) pat mode) color) a 16))) + (.mul.w.vf acc vf7 vf0) + (.add.mul.x.vf acc vf4 vf1 acc) + (.add.mul.y.vf acc vf5 vf1 acc) + (.add.mul.z.vf vf1 vf6 vf1 acc) + (.mul.w.vf acc vf7 vf0) + (.add.mul.x.vf acc vf4 vf2 acc) + (.add.mul.y.vf acc vf5 vf2 acc) + (.add.mul.z.vf vf2 vf6 vf2 acc) + (.mul.w.vf acc vf7 vf0) + (.add.mul.x.vf acc vf4 vf3 acc) + (.add.mul.y.vf acc vf5 vf3 acc) + (.add.mul.z.vf vf3 vf6 vf3 acc) + (.svf (&-> a2-1 quad) vf1) + (.svf (&-> a3-0 quad) vf2) + (.svf (&-> t0-0 quad) vf3) + (add-debug-flat-triangle #t (bucket-id debug-no-zbuf1) a2-1 a3-0 t0-0 t1-0) + ) + ) + (set! s5-0 (&+ (the-as collide-mesh-tri s5-0) 8)) + ) + ) + 0 + (none) + ) + ) + +(deftype sopt-work (structure) + ((intersect vector :inline) + (sphere-bbox4w bounding-box4w :inline) + ) + ) + + +(defmethod-mips2c "(method 12 collide-mesh)" 12 collide-mesh) + +(deftype spat-work (structure) + ((intersect vector :inline) + (sphere-bbox4w bounding-box4w :inline) + ) + ) + + +(defmethod should-push-away-test ((this collide-mesh) (arg0 collide-mesh-cache-tri) (arg1 collide-tri-result) (arg2 vector) (arg3 float)) + (local-vars + (v1-0 uint128) + (a0-1 uint128) + (a1-2 uint128) + (a1-3 uint128) + (a1-4 uint128) + (a1-7 pat-surface) + (a2-1 uint128) + (a2-2 uint128) + (a2-4 int) ;; og:preserve-this float -> int + (a2-5 float) + (a2-7 float) + (f0-0 float) + (f2-1 float) + (f3-0 float) + (f4-0 float) + ) + (rlet ((Q :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 ((s4-0 (new 'stack-no-clear 'spat-work))) + (nop!) + (let ((s3-0 arg0)) + (.lvf vf3 (&-> arg2 quad)) + (nop!) + (let ((s2-0 (-> this num-tris))) + (.sub.w.vf vf12 vf3 vf3) + (nop!) + (.add.w.vf vf13 vf3 vf3) + (nop!) + (.ftoi.vf vf12 vf12) + (nop!) + (.ftoi.vf vf13 vf13) + (nop!) + (.mov v1-0 vf12) + (.svf (&-> s4-0 sphere-bbox4w min quad) vf12) + (.mov a0-1 vf13) + (.svf (&-> s4-0 sphere-bbox4w max quad) vf13) + (until (>= a2-7 f4-0) + (until (> f0-0 f2-1) + (until (>= f3-0 f2-1) + (label cfg-1) + (b! (zero? s2-0) cfg-10 :delay (set! a2-1 (-> s3-0 bbox4w min quad))) + (+! s2-0 -1) + (let ((a1-1 (-> s3-0 bbox4w max quad))) + (.pcgtw a2-2 a2-1 a0-1) + (nop!) + (.pcgtw a1-2 v1-0 a1-1) + ) + (nop!) + (.por a1-3 a2-2 a1-2) + (nop!) + (.ppach a1-4 (the-as uint128 0) a1-3) + (nop!) + (let ((a1-5 (shl (the-as int a1-4) 16))) + (nop!) + ;; og:preserve-this + (b! (nonzero? a1-5) cfg-1 :likely-delay (set! s3-0 (&+ s3-0 96))) + ) + (closest-pt-in-triangle (-> s4-0 intersect) arg2 (the-as matrix (-> s3-0 vertex)) (-> s3-0 normal)) + (.lvf vf2 (&-> s4-0 intersect quad)) + (.lvf vf3 (&-> arg2 quad)) + (.lvf vf1 (&-> s3-0 normal quad)) + (set! v1-0 (-> s4-0 sphere-bbox4w min quad)) + (set! a0-1 (-> s4-0 sphere-bbox4w max quad)) + (.sub.vf vf4 vf3 vf2) + (set! a1-7 (-> s3-0 pat)) + (.mul.vf vf5 vf4 vf1) + (.lvf vf7 (&-> s3-0 vertex 0 quad)) + (.mul.vf vf6 vf4 vf4) + (.lvf vf8 (&-> s3-0 vertex 1 quad)) + (.mov.vf vf1 vf0 :mask #b1000) + (.lvf vf9 (&-> s3-0 vertex 2 quad)) + (.add.x.vf vf5 vf5 vf5 :mask #b10) + (&+! s3-0 96) + (.add.y.vf vf6 vf6 vf6 :mask #b1) + (set! f3-0 arg3) + (.add.z.vf vf5 vf5 vf5 :mask #b10) + (.add.z.vf vf6 vf6 vf6 :mask #b1) + (.sqrt.vf Q vf6 :ftf #b0) + (.mov a2-4 vf5) + (set! f0-0 0.0) + (.wait.vf) + (let ((f1-0 (-> arg2 w))) + (.add.vf vf6 vf0 Q :mask #b1) + (.mov.vf vf10 vf6) + (b! (< (the-as int a2-4) 0) cfg-6 :likely-delay (.sub.vf vf10 vf0 vf10)) + (label cfg-6) + (.mov a2-5 vf10) + (set! f2-1 (- a2-5 f1-0)) + ) + (.div.vf Q vf0 vf6 :fsf #b11 :ftf #b0) + ) + ) + (.wait.vf) + (nop!) + (.mul.vf vf11 vf4 Q) + (set! f4-0 0.707) + (.mul.vf vf5 vf11 vf1) + (.add.y.vf vf5 vf5 vf5 :mask #b1) + (.add.z.vf vf5 vf5 vf5 :mask #b1) + (.mov a2-7 vf5) + ) + ) + ) + ) + (set! arg3 f2-1) + (.svf (&-> arg1 vertex 0 quad) vf7) + (.svf (&-> arg1 vertex 1 quad) vf8) + (.svf (&-> arg1 vertex 2 quad) vf9) + (.svf (&-> arg1 intersect quad) vf2) + (.svf (&-> arg1 normal quad) vf1) + (b! #t cfg-1 :delay (set! (-> arg1 pat) a1-7)) + (label cfg-10) + arg3 + ) + ) + +(defmethod-mips2c "(method 14 collide-mesh)" 14 collide-mesh) + +(defmethod-mips2c "(method 15 collide-mesh)" 15 collide-mesh) + +;; ERROR: Unsupported inline assembly instruction kind - [pxor v1, v1, a0] +;; ERROR: Unsupported inline assembly instruction kind - [pxor a0, a0, a1] +;; ERROR: Unsupported inline assembly instruction kind - [pxor a0, a0, a1] +;; ERROR: Unsupported inline assembly instruction kind - [pxor a0, a0, a1] +(defmethod populate-for-prim-mesh ((this collide-mesh-cache) (arg0 collide-shape-prim-mesh)) + (local-vars + (r0-0 uint128) + (v1-7 uint128) + (v1-8 uint128) + (v1-9 uint128) + (v1-11 uint128) + (a0-6 uint128) + (a0-8 uint128) + (a0-10 uint128) + (a0-11 uint128) + (a0-12 uint128) + ) + (let ((s5-0 (-> arg0 cshape process node-list data (-> arg0 transform-index) bone transform)) + (s4-0 (-> arg0 mesh-cache-entry)) + ) + (cond + ((= (-> arg0 mesh-cache-id) (-> this id)) + (let ((v1-6 (-> s5-0 rvec quad)) + (a0-4 (-> s4-0 mat rvec quad)) + ) + (.pxor v1-7 v1-6 a0-4) + ) + (let ((a0-5 (-> s5-0 uvec quad)) + (a1-1 (-> s4-0 mat uvec quad)) + ) + (.pxor a0-6 a0-5 a1-1) + ) + (.por v1-8 v1-7 a0-6) + (let ((a0-7 (-> s5-0 fvec quad)) + (a1-2 (-> s4-0 mat fvec quad)) + ) + (.pxor a0-8 a0-7 a1-2) + ) + (.por v1-9 v1-8 a0-8) + (let ((a0-9 (-> s5-0 trans quad)) + (a1-3 (-> s4-0 mat trans quad)) + ) + (.pxor a0-10 a0-9 a1-3) + ) + (.por a0-11 v1-9 a0-10) + (let ((v1-10 a0-11)) + (.pcpyud a0-12 a0-11 r0-0) + (.por v1-11 a0-12 v1-10) + ) + (when (nonzero? v1-11) + (set! (-> s4-0 mat rvec quad) (-> s5-0 rvec quad)) + (set! (-> s4-0 mat uvec quad) (-> s5-0 uvec quad)) + (set! (-> s4-0 mat fvec quad) (-> s5-0 fvec quad)) + (set! (-> s4-0 mat trans quad) (-> s5-0 trans quad)) + (unpack-mesh-to-cache! (-> arg0 mesh) (-> s4-0 tris) s5-0) + ) + ) + (else + (let ((v1-19 (-> arg0 mesh))) + (when v1-19 + (set! s4-0 (allocate! this (the-as int (+ (* (the-as uint 96) (-> v1-19 num-tris)) 64)))) + (set! (-> arg0 mesh-cache-entry) s4-0) + (cond + (s4-0 + (set! (-> arg0 mesh-cache-id) (-> this id)) + (set! (-> s4-0 mat rvec quad) (-> s5-0 rvec quad)) + (set! (-> s4-0 mat uvec quad) (-> s5-0 uvec quad)) + (set! (-> s4-0 mat fvec quad) (-> s5-0 fvec quad)) + (set! (-> s4-0 mat trans quad) (-> s5-0 trans quad)) + (unpack-mesh-to-cache! (-> arg0 mesh) (-> s4-0 tris) s5-0) + ) + (else + (set! (-> arg0 mesh-cache-id) (the-as uint 0)) + 0 + ) + ) + ) + ) + ) + ) + s4-0 + ) + ) + +;; WARN: Return type mismatch (pointer uint8) vs collide-mesh-cache-entry. +(defmethod allocate! ((this collide-mesh-cache) (arg0 int)) + (local-vars (a1-2 int) (a2-2 int)) + (let* ((v1-0 (+ arg0 15)) + (a1-1 (-> this used-size)) + (v1-1 (/ v1-0 16)) + (a3-0 (-> this data)) + (a2-0 (-> this max-size)) + (v1-2 (* v1-1 16)) + (a3-1 (&+ a3-0 a1-1)) + ) + (let ((t1-0 (- a2-0 (the-as uint v1-2))) + (t0-0 (-> this id)) + ) + (b! (< (the-as int t1-0) 0) cfg-6 :delay (set! a1-2 (the-as int (+ a1-1 v1-2)))) + (b! (>= (the-as int (- a2-0 (the-as uint a1-2))) 0) cfg-5 :delay (set! a2-2 (the-as int (+ t0-0 1)))) + ) + (b! (zero? (the-as uint a2-2)) cfg-4 :likely-delay (set! a2-2 1)) + (label cfg-4) + (set! a1-2 v1-2) + (set! a3-1 (-> this data)) + (set! (-> this id) (the-as uint a2-2)) + (label cfg-5) + (set! (-> this used-size) (the-as uint a1-2)) + (let ((v0-0 a3-1)) + (b! #t cfg-7 :delay (nop!)) + (label cfg-6) + (format 0 "ERROR: Attempted to allocate something bigger than the entire mesh cache!~%") + (set! v0-0 (the-as (pointer uint8) #f)) + (label cfg-7) + (the-as collide-mesh-cache-entry v0-0) + ) + ) + ) + +;; ERROR: Failed load: (set! vf6 (l.vf (+ (the-as vector a3-0) 16))) at op 37 +(defmethod unpack-mesh-to-cache! ((this collide-mesh) (arg0 (inline-array collide-mesh-cache-tri)) (arg1 matrix)) + (local-vars (t0-2 uint)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :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) + ) + (init-vf0-vector) + (nop!) + (let ((t0-0 (scratchpad-object int)) ;; og:preserve-this + (v1-0 (-> this num-verts)) + ) + (nop!) + (let ((a3-0 (the-as object (-> this vertex-data)))) + (b! (zero? v1-0) cfg-3 :delay (.lvf vf1 (&-> arg1 rvec quad))) + (nop!) + (.lvf vf2 (&-> arg1 uvec quad)) + (let ((t0-1 (+ t0-0 -64))) + (.lvf vf3 (&-> arg1 fvec quad)) + (nop!) + (.lvf vf4 (&-> arg1 trans quad)) + (nop!) + (.lvf vf5 (&-> (the-as (inline-array vector) a3-0) 0 quad)) + (nop!) + (.lvf vf6 (&-> (the-as (inline-array vector) a3-0) 1 quad)) + (nop!) + (.lvf vf7 (&-> (the-as (inline-array vector) a3-0) 2 quad)) + (nop!) + (.lvf vf8 (&-> (the-as (inline-array vector) a3-0) 3 quad)) + (label cfg-2) + (.mul.w.vf acc vf4 vf0) + (set! a3-0 (-> (the-as (inline-array vector) a3-0) 4)) + (.add.mul.x.vf acc vf1 vf5 acc) + (+! t0-1 64) + (.add.mul.y.vf acc vf2 vf5 acc) + (nop!) + (.add.mul.z.vf vf9 vf3 vf5 acc) + (nop!) + (.mul.w.vf acc vf4 vf0) + (.lvf vf5 (&-> (the-as vector a3-0) quad)) + (.add.mul.x.vf acc vf1 vf6 acc) + (nop!) + (.add.mul.y.vf acc vf2 vf6 acc) + (nop!) + (.add.mul.z.vf vf10 vf3 vf6 acc) + (nop!) + (.mul.w.vf acc vf4 vf0) + ;; og:preserve-this + (.lvf vf6 (&+ (the-as vector a3-0) 16)) + (.add.mul.x.vf acc vf1 vf7 acc) + (nop!) + (.add.mul.y.vf acc vf2 vf7 acc) + (nop!) + (.add.mul.z.vf vf11 vf3 vf7 acc) + (nop!) + (.mul.w.vf acc vf4 vf0) + ;; og:preserve-this + (.lvf vf7 (&+ (the-as vector a3-0) 32)) + (.add.mul.x.vf acc vf1 vf8 acc) + (nop!) + (.add.mul.y.vf acc vf2 vf8 acc) + (nop!) + (.add.mul.z.vf vf12 vf3 vf8 acc) + (nop!) + (nop!) + ;; og:preserve-this + (.lvf vf8 (&+ (the-as vector a3-0) 48)) + (+! v1-0 -4) + (.svf (&-> (the-as (inline-array vector) t0-1) 0 quad) vf9) + (nop!) + (.svf (&-> (the-as (inline-array vector) t0-1) 1 quad) vf10) + (nop!) + (.svf (&-> (the-as (inline-array vector) t0-1) 2 quad) vf11) + (b! (> (the-as int v1-0) 0) cfg-2 :delay (.svf (&-> (the-as (inline-array vector) t0-1) 3 quad) vf12)) + ) + ) + ) + (label cfg-3) + (let ((v1-1 (the-as object (-> this tris)))) + (nop!) + (let ((a2-1 (scratchpad-object int)) ;; og:preserve-this + (a0-1 (-> this num-tris)) + ) + (b! (zero? a0-1) cfg-6 :delay (set! t0-2 (-> (the-as (inline-array collide-mesh-tri) v1-1) 0 vertex-index 0))) + (let* ((a1-1 (-> arg0 -1)) + (a3-1 (-> (the-as (inline-array collide-mesh-tri) v1-1) 0 vertex-index 1)) + (t0-3 (* t0-2 16)) + (t2-0 (-> (the-as (inline-array collide-mesh-tri) v1-1) 0 vertex-index 2)) + (t1-0 (* a3-1 16)) + (a3-2 (the-as uint (-> (the-as (inline-array collide-mesh-tri) v1-1) 0 pat))) + ) + (let* ((t2-1 (* t2-0 16)) + (t0-4 (+ t0-3 a2-1)) + (t1-1 (+ t1-0 a2-1)) + (t2-2 (+ t2-1 a2-1)) + ) + (label cfg-5) + (+! a0-1 -1) + (.lvf vf1 t0-4) + (set! v1-1 (&+ (the-as collide-mesh-tri v1-1) 8)) + (.lvf vf2 t1-1) + (&+! a1-1 96) + (.lvf vf3 t2-2) + (.sub.vf vf4 vf2 vf1) + (.svf (&-> a1-1 vertex 0 quad) vf1) + (.min.vf vf8 vf1 vf2) + (.svf (&-> a1-1 vertex 1 quad) vf2) + (.sub.vf vf5 vf3 vf1) + (.svf (&-> a1-1 vertex 2 quad) vf3) + (.max.vf vf9 vf1 vf2) + (let ((t1-2 (-> (the-as collide-mesh-tri v1-1) vertex-index 0))) + (.outer.product.a.vf acc vf4 vf5) + (let ((t2-3 (-> (the-as collide-mesh-tri v1-1) vertex-index 1))) + (.outer.product.b.vf vf6 vf5 vf4 acc) + (let ((t0-5 (-> (the-as collide-mesh-tri v1-1) vertex-index 2))) + (.mul.vf vf7 vf6 vf6) + (nop!) + (.min.vf vf8 vf8 vf3) + (let ((t1-3 (* t1-2 16))) + (.max.vf vf9 vf9 vf3) + (let ((t2-4 (* t2-3 16))) + (.mul.x.vf acc vf0 vf7 :mask #b1000) + (let ((t3-0 (* t0-5 16))) + (.add.mul.y.vf acc vf0 vf7 acc :mask #b1000) + (set! t0-4 (+ t1-3 a2-1)) + (.add.mul.z.vf vf7 vf0 vf7 acc :mask #b1000) + (set! t1-1 (+ t2-4 a2-1)) + (.isqrt.vf Q vf0 vf7 :fsf #b11 :ftf #b11) + (set! t2-2 (+ t3-0 a2-1)) + ) + ) + ) + ) + ) + ) + ) + (.ftoi.vf vf8 vf8) + (nop!) + (.ftoi.vf vf9 vf9) + (nop!) + (nop!) + (.svf (&-> a1-1 bbox4w min quad) vf8) + (.wait.vf) + (.svf (&-> a1-1 bbox4w max quad) vf9) + (.mul.vf vf6 vf6 Q :mask #b111) + (nop!) + (nop!) + (.svf (&-> a1-1 normal quad) vf6) + (nop!) + (set! (-> a1-1 pat) (the-as pat-surface a3-2)) + (b! (nonzero? a0-1) cfg-5 :delay (set! a3-2 (the-as uint (-> (the-as collide-mesh-tri v1-1) pat)))) + ) + ) + ) + (label cfg-6) + 0 + (none) + ) + ) + +(deftype oot-work (structure) + ((intersect vector :inline) + (sphere-bbox4w bounding-box4w :inline) + ) + ) + + +(defmethod overlap-test ((this collide-mesh) (arg0 collide-mesh-cache-tri) (arg1 vector)) + (local-vars + (v1-0 uint128) + (a0-1 uint128) + (a1-2 uint128) + (a1-3 uint128) + (a1-4 uint128) + (a1-7 int) ;; og:preserve-this float -> int + (a2-1 uint128) + (a2-2 uint128) + ) + (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) + (let ((s5-0 (new 'stack-no-clear 'oot-work)) + (s4-0 arg0) + ) + (.lvf vf2 (&-> arg1 quad)) + (let ((s3-0 (-> this num-tris))) + (.sub.w.vf vf5 vf2 vf2) + (.add.w.vf vf6 vf2 vf2) + (.ftoi.vf vf5 vf5) + (.ftoi.vf vf6 vf6) + (.mov v1-0 vf5) + (.svf (&-> s5-0 sphere-bbox4w min quad) vf5) + (.mov a0-1 vf6) + (.svf (&-> s5-0 sphere-bbox4w max quad) vf6) + (label cfg-1) + (b! (zero? s3-0) cfg-7 :delay (set! a2-1 (-> s4-0 bbox4w min quad))) + (+! s3-0 -1) + ) + (let ((a1-1 (-> s4-0 bbox4w max quad))) + (.pcgtw a2-2 a2-1 a0-1) + (nop!) + (.pcgtw a1-2 v1-0 a1-1) + ) + (nop!) + (.por a1-3 a2-2 a1-2) + (nop!) + (.ppach a1-4 (the-as uint128 0) a1-3) + (nop!) + (let ((a1-5 (shl (the-as int a1-4) 16))) + (nop!) + ;; og:preserve-this + (b! (nonzero? a1-5) cfg-1 :likely-delay (set! s4-0 (&+ s4-0 96))) + ) + (closest-pt-in-triangle (-> s5-0 intersect) arg1 (the-as matrix (-> s4-0 vertex)) (-> s4-0 normal)) + (.lvf vf1 (&-> s5-0 intersect quad)) + (.lvf vf2 (&-> arg1 quad)) + (set! v1-0 (-> s5-0 sphere-bbox4w min quad)) + (set! a0-1 (-> s5-0 sphere-bbox4w max quad)) + (.sub.vf vf3 vf2 vf1) + (.mul.w.vf vf4 vf2 vf2 :mask #b1000) + (.mul.vf vf3 vf3 vf3) + (.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) + (.add.w.vf vf3 vf0 vf3 :mask #b10) + (.mov a1-7 vf3) + ;; og:preserve-this + (b! (>= (the-as int a1-7) 0) cfg-1 :delay (set! s4-0 (&+ s4-0 96))) + ) + (return #t) + (label cfg-7) + #f + ) + ) diff --git a/goal_src/jak3/engine/collide/collide-probe.gc b/goal_src/jak3/engine/collide/collide-probe.gc index 5c14550481..653563b74c 100644 --- a/goal_src/jak3/engine/collide/collide-probe.gc +++ b/goal_src/jak3/engine/collide/collide-probe.gc @@ -5,5 +5,196 @@ ;; name in dgo: collide-probe ;; dgos: GAME +(define-extern probe-traverse-draw-node (function draw-node int none)) + ;; DECOMP BEGINS +(defun creates-new-method? ((arg0 type) (arg1 int)) + (let ((v1-1 (-> arg0 parent allocated-length))) + (-> arg0 allocated-length) + (>= arg1 (the-as int v1-1)) + ) + ) + +(defun overrides-parent-method? ((arg0 type) (arg1 int)) + (!= (-> arg0 method-table arg1) (-> arg0 parent method-table arg1)) + ) + +(defun describe-methods ((arg0 type)) + (let ((s5-0 (-> arg0 allocated-length))) + (dotimes (s4-0 (the-as int s5-0)) + (let ((s3-0 arg0)) + (format #t "~3d:~%" s4-0) + (while (!= s3-0 basic) + (cond + ((creates-new-method? s3-0 s4-0) + (format #t " created by ~s.~%" (symbol->string (-> s3-0 symbol))) + (set! s3-0 basic) + ) + ((overrides-parent-method? s3-0 s4-0) + (format #t " overridden by ~s.~%" (symbol->string (-> s3-0 symbol))) + (set! s3-0 (-> s3-0 parent)) + ) + (else + (set! s3-0 (-> s3-0 parent)) + ) + ) + ) + ) + ) + ) + #f + ) + +;; WARN: Return type mismatch symbol vs none. +(defun indent-to ((arg0 int)) + (dotimes (s5-0 arg0) + (format #t " ") + ) + (none) + ) + +(defun probe-traverse-draw-node ((arg0 draw-node) (arg1 int)) + (indent-to arg1) + (format + #t + "[~08x] child-count: ~d, flags: ~d, dist: ~f, child: ~a~%" + arg0 + (-> arg0 child-count) + (-> arg0 flags) + (-> arg0 distance) + (-> arg0 child) + ) + (cond + ((nonzero? (-> arg0 flags)) + (let ((s4-0 (-> arg0 child))) + (dotimes (s3-0 (the-as int (-> arg0 child-count))) + (probe-traverse-draw-node (the-as draw-node (+ (the-as uint s4-0) (* s3-0 32))) (+ arg1 1)) + ) + ) + ) + (else + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun probe-traverse-inline-array-node ((arg0 drawable-inline-array-node) (arg1 int)) + (indent-to arg1) + (format #t "[~08x] drawable-inline-array-node: length = ~d~%" arg0 (-> arg0 length)) + (let ((s4-0 (-> arg0 length))) + (dotimes (s3-0 s4-0) + (indent-to arg1) + (format #t "(~3d) ~a~%" s3-0 (-> arg0 data s3-0)) + (if (= (-> arg0 data s3-0 type) draw-node) + (probe-traverse-draw-node (-> arg0 data s3-0) (+ arg1 1)) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun probe-traverse-collide-fragment ((arg0 drawable-tree-collide-fragment) (arg1 int)) + (indent-to arg1) + (format #t "[~08x] drawable-tree-collide-fragment: length = ~d~%" arg0 (-> arg0 length)) + (let ((s4-0 (-> arg0 length))) + (dotimes (s3-0 (+ s4-0 -1)) + (indent-to arg1) + (if (= (-> arg0 data s3-0 type) drawable-inline-array-node) + (probe-traverse-inline-array-node (the-as drawable-inline-array-node (-> arg0 data s3-0)) (+ arg1 1)) + (format #t "unknown: ~a~%" (-> arg0 data s3-0)) + ) + ) + ) + (none) + ) + +(deftype collide-probe-stack-elem (structure) + ((child uint32) + (count uint32) + ) + ) + + +(deftype collide-probe-stack (structure) + ((data collide-probe-stack-elem 1024 :inline) + ) + ) + + +(define *collide-probe-stack* (the-as collide-probe-stack (+ 4192 #x70000000))) + +(define collide-vu0-block (new 'static 'vu-function :length 90 :qlength 45)) + +(defun print-out ((arg0 int)) + (format *stdcon* "~d~%" arg0) + ) + +(defun collide-probe-instance-tie-collide-frags () + 0 + (none) + ) + +(defun distc ((arg0 vector) (arg1 vector)) + (let* ((f0-1 (- (-> arg0 x) (-> arg1 x))) + (f0-3 (* f0-1 f0-1)) + (f1-2 (- (-> arg0 z) (-> arg1 z))) + ) + (sqrtf (+ f0-3 (* f1-2 f1-2))) + ) + ) + +(defun interpolate ((arg0 float) (arg1 float) (arg2 float) (arg3 float) (arg4 float)) + (let ((f0-1 (- arg3 arg1)) + (f1-2 (- arg4 arg2)) + (f3-1 (- arg0 arg1)) + ) + (+ arg2 (/ (* f3-1 f1-2) f0-1)) + ) + ) + +(defun misty-ambush-height ((arg0 vector)) + (let* ((a1-0 (new 'static 'vector :x -808960.0 :y 111656.96 :z 3924992.0)) + (f0-0 (distc arg0 a1-0)) + ) + (cond + ((< f0-0 52019.2) + 111656.96 + ) + ((>= 58982.4 f0-0) + (interpolate f0-0 52019.2 111656.96 58982.4 116776.96) + ) + ((>= 124436.48 f0-0) + (interpolate f0-0 58982.4 116776.96 124436.48 114688.0) + ) + ((>= 219217.92 f0-0) + (interpolate f0-0 124436.48 114688.0 219217.92 113254.4) + ) + (else + 113254.4 + ) + ) + ) + ) + +(defun misty-ambush-height-probe ((arg0 vector) (arg1 float)) + (let ((f0-0 (misty-ambush-height arg0))) + (cond + ((< f0-0 (-> arg0 y)) + (/ (- (-> arg0 y) f0-0) arg1) + ) + (else + (format 0 "WARNING: ~%height = ~f, pos.y = ~f" (* 0.00024414062 f0-0) (* 0.00024414062 (-> arg0 y))) + -1.0 + ) + ) + ) + ) + +(defun pke-collide-test () + 0 + (none) + ) diff --git a/goal_src/jak3/engine/collide/collide-shape-h.gc b/goal_src/jak3/engine/collide/collide-shape-h.gc index 7dcbba2c9d..80f512e442 100644 --- a/goal_src/jak3/engine/collide/collide-shape-h.gc +++ b/goal_src/jak3/engine/collide/collide-shape-h.gc @@ -78,6 +78,24 @@ ;; ---collide-status +(defmacro normalized-heading-to-quaternion! (quat heading) + "Modified for PC. This does a clever trick, but it doesn't work if the heading is exactly + [0, 0, -1] because this tries to normalize a quaternion that's all 0's. + I think that, on PS2, something prevents the heading from being exactly 0, 0, -1, + but this doesn't happen on PC. A similar thing happened with Jak 1's punch glitch, + where some trig functions were slightly off from returning exactly 0.0 and 1.0 on PS2 + rounding only." + `(begin + (if (and (= (-> ,heading x) 0.0) + (= (+ 1.0 (-> ,heading z)) 0.0) + ) + (quaternion-set! ,quat 0.0 1.0 0.0 0.0) + (quaternion-set! ,quat 0.0 (-> ,heading x) 0.0 (+ 1.0 (-> ,heading z))) + ) + (quaternion-normalize! ,quat) + ) + ) + (declare-type collide-shape trsqv) (declare-type collide-shape-moving collide-shape) (declare-type control-info collide-shape-moving) @@ -91,6 +109,8 @@ (declare-type rigid-body structure) (define-extern cshape-reaction-update-state (function control-info collide-query vector none)) +(define-extern cshape-reaction-just-move (function control-info collide-query vector collide-status)) +(define-extern collide-shape-draw-debug-marks (function none)) ;; +++cshape-reaction-flags (defenum cshape-reaction-flags @@ -132,6 +152,17 @@ ;; ---cshape-reaction-flags +;; +++nav-flags +(defenum nav-flags + :type uint8 + :bitfield #t + (has-root-sphere 0) + (has-extra-sphere 1) + (has-child-spheres 2) + ) +;; ---nav-flags + + ;; DECOMP BEGINS (deftype collide-rider (structure) @@ -150,7 +181,7 @@ (riders collide-rider 20 :inline) ) (:methods - (collide-rider-pool-method-9 () none) + (add-rider (_type_ handle) collide-rider) (prepare (_type_) none) ) ) @@ -240,17 +271,17 @@ ) (:methods (new (symbol type collide-shape uint int) _type_) - (collide-shape-prim-method-9 () none) - (collide-shape-prim-method-10 () none) - (collide-shape-prim-method-11 () none) - (collide-shape-prim-method-12 () none) - (collide-shape-prim-method-13 () none) + (debug-draw (_type_) none) + (add-fg-prim-using-box (_type_ collide-cache) none) + (add-fg-prim-using-line-sphere (_type_ collide-cache object) none) + (overlaps-others-test (_type_ overlaps-others-params collide-shape-prim) symbol) + (overlaps-others-group (_type_ overlaps-others-params collide-shape-prim-group) symbol) (collide-shape-prim-method-14 () none) - (collide-shape-prim-method-15 () none) - (collide-shape-prim-method-16 () none) - (collide-shape-prim-method-17 () none) - (collide-shape-prim-method-18 () none) - (collide-shape-prim-method-19 () none) + (collide-with-collide-cache-prim-mesh (_type_ collide-query collide-cache-prim) none) + (collide-with-collide-cache-prim-sphere (_type_ collide-query collide-cache-prim) none) + (on-platform-test (_type_ collide-shape-prim collide-query float) none) + (should-push-away-test (_type_ collide-shape-prim collide-query) none) + (should-push-away-a-group-test (_type_ collide-shape-prim-group collide-query) none) ) ) @@ -297,7 +328,7 @@ Most [[process-drawable]]s have a [[collide-shape]] that represents their root t ((actor-hash-index int16 :offset 12) (process process-drawable) (max-iteration-count uint8) - (nav-flags uint8) + (nav-flags nav-flags) (total-prims uint8) (num-riders uint8) (pat-ignore-mask pat-surface) @@ -316,31 +347,31 @@ Most [[process-drawable]]s have a [[collide-shape]] that represents their root t (new (symbol type process-drawable collide-list-enum) _type_) (move-by-vector! (_type_ vector) none) (move-to-point! (_type_ vector) none) - (collide-shape-method-30 () none) + (debug-draw (_type_) none) (fill-cache-for-shape (_type_ float collide-query) none) (fill-cache-integrate-and-collide (_type_ vector collide-query meters) none) - (collide-shape-method-33 () none) - (collide-shape-method-34 () none) + (find-prim-by-id (_type_ uint) collide-shape-prim) + (find-prim-by-id-logtest (_type_ uint) collide-shape-prim) (detect-riders! (_type_) symbol) - (collide-shape-method-36 () none) + (build-bounding-box-for-shape (_type_ bounding-box float collide-spec) symbol) (integrate-and-collide! (_type_ vector) none) (find-collision-meshes (_type_) none) - (collide-shape-method-39 () none) + (on-platform (_type_ collide-shape collide-query) symbol) (find-overlapping-shapes (_type_ overlaps-others-params) symbol) - (collide-shape-method-41 () none) - (collide-shape-method-42 () none) - (collide-shape-method-43 () none) + (shove-to-closest-point-on-path (_type_ attack-info float) vector) + (should-push-away (_type_ collide-shape collide-query) symbol) + (pull-rider! (_type_ pull-rider-info) none) (pull-riders! (_type_) symbol) (do-push-aways (_type_) collide-spec) (update-transforms (_type_) none) (set-collide-with! (_type_ collide-spec) none) (set-collide-as! (_type_ collide-spec) none) - (collide-shape-method-49 () none) - (collide-shape-method-50 () none) - (collide-shape-method-51 () none) - (collide-shape-method-52 () none) - (collide-shape-method-53 () none) - (collide-shape-method-54 () none) + (modify-collide-as! (_type_ int collide-spec collide-spec) none) + (send-shoves (_type_ process touching-shapes-entry float float float) symbol) + (above-ground? (_type_ collide-query vector collide-spec float float float) symbol) + (water-info-init! (_type_ water-info collide-action) water-info) + (iterate-prims (_type_ (function collide-shape-prim none)) none) + (pusher-init (_type_) none) ) ) @@ -350,14 +381,16 @@ Most [[process-drawable]]s have a [[collide-shape]] that represents their root t ((rider-time time-frame) (rider-last-move vector :inline) (trans-old vector :inline) - (poly-pat pat-surface :offset 272) + (trans-old-old vector :inline :offset 240) + (trans-old-old-old vector :inline :offset 256) + (poly-pat pat-surface :offset 272) (cur-pat pat-surface) (ground-pat pat-surface) (status collide-status) (old-status collide-status) (prev-status collide-status) (reaction-flag cshape-reaction-flags) - (reaction (function control-info collide-query vector vector collide-status) :offset 316) + (reaction (function control-info collide-query vector vector collide-status) :offset 316) (no-reaction (function collide-shape-moving collide-query vector vector object)) (local-normal vector :inline) (surface-normal vector :inline) @@ -376,19 +409,19 @@ Most [[process-drawable]]s have a [[collide-shape]] that represents their root t ) (:methods (new (symbol type process-drawable collide-list-enum) _type_) - (find-ground (_type_ collide-query collide-spec float float float) symbol) + (find-ground (_type_ collide-query collide-spec float float float process) symbol) (react-to-pat! (_type_ pat-surface) cshape-reaction-flags) - (collide-shape-moving-method-57 () none) - (collide-shape-moving-method-58 () none) - (collide-shape-moving-method-59 () none) - (collide-shape-moving-method-60 () none) - (collide-shape-moving-method-61 () none) + (integrate-no-collide! (_type_ vector) none) + (integrate-for-enemy-no-mtg (_type_ vector overlaps-others-params) symbol) + (move-above-ground (_type_ vector move-above-ground-params) none) + (move-to-ground (_type_ float float symbol collide-spec) none) + (move-to-ground-point (_type_ vector vector vector) none) (compute-acc-due-to-gravity (_type_ vector float) vector) - (collide-shape-moving-method-63 () none) - (collide-shape-moving-method-64 () none) + (rbody-collision (_type_ rigid-body-control float) none) + (try-snap-to-surface (_type_ vector float float float) symbol) (fill-and-try-snap-to-surface (_type_ vector float float float collide-query) symbol) - (collide-shape-moving-method-66 () none) - (collide-shape-moving-method-67 () none) + (step-collision! (_type_ vector vector float int) float) + (collide-with-all-collide-cache-prims (_type_ matrix collide-query) none) ) ) @@ -451,7 +484,7 @@ Most [[process-drawable]]s have a [[collide-shape]] that represents their root t (set! (-> s5-0 actor-hash-index) -1) (set! (-> s5-0 process) arg0) (set! (-> s5-0 max-iteration-count) (the-as uint 1)) - (set! (-> s5-0 nav-flags) (the-as uint 1)) + (set! (-> s5-0 nav-flags) (nav-flags has-root-sphere)) (set! (-> s5-0 event-self) #f) (set! (-> s5-0 event-other) #f) (set! (-> s5-0 riders) (the-as (inline-array collide-rider) #f)) diff --git a/goal_src/jak3/engine/collide/collide-shape-rider.gc b/goal_src/jak3/engine/collide/collide-shape-rider.gc index 68e8b2ce3d..d41a66a21d 100644 --- a/goal_src/jak3/engine/collide/collide-shape-rider.gc +++ b/goal_src/jak3/engine/collide/collide-shape-rider.gc @@ -7,3 +7,429 @@ ;; DECOMP BEGINS +(defmethod on-platform ((this collide-shape) (arg0 collide-shape) (arg1 collide-query)) + (let ((v1-0 arg1)) + (set! (-> v1-0 best-dist) 0.0) + (set! (-> v1-0 best-my-prim) #f) + (set! (-> v1-0 best-other-prim) #f) + ) + (set! (-> arg1 best-dist) 122.88) + (let ((s5-0 (-> this root-prim)) + (s4-0 (-> arg0 root-prim)) + ) + (when (and (logtest? (-> s5-0 prim-core collide-with) (-> s4-0 prim-core collide-as)) + (logtest? (-> s5-0 prim-core action) (collide-action rideable)) + (logtest? (-> s4-0 prim-core action) (collide-action can-ride)) + ) + (let ((f0-4 (- (- (vector-vector-distance (the-as vector (-> s5-0 prim-core)) (the-as vector (-> s4-0 prim-core))) + (-> s5-0 prim-core world-sphere w) + ) + (-> s4-0 prim-core world-sphere w) + ) + ) + ) + (if (< f0-4 122.88) + (on-platform-test s5-0 s4-0 arg1 f0-4) + ) + ) + ) + ) + (< (-> arg1 best-dist) 122.88) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod on-platform-test ((this collide-shape-prim) (arg0 collide-shape-prim) (arg1 collide-query) (arg2 float)) + (format 0 "ERROR: collide-shape-prim::on-platform-test was called illegally!~%") + (none) + ) + +(defmethod on-platform-test ((this collide-shape-prim-group) (arg0 collide-shape-prim) (arg1 collide-query) (arg2 float)) + (let ((s4-0 (-> arg0 prim-core collide-as)) + (s3-0 (-> this child 0)) + ) + (countdown (s2-0 (-> this num-children)) + (when (and (logtest? (-> s3-0 prim-core collide-with) s4-0) + (logtest? (-> s3-0 prim-core action) (collide-action rideable)) + ) + (let ((f0-2 (- (- (vector-vector-distance (the-as vector (-> s3-0 prim-core)) (the-as vector (-> arg0 prim-core))) + (-> s3-0 prim-core world-sphere w) + ) + (-> arg0 prim-core world-sphere w) + ) + ) + ) + (if (< f0-2 122.88) + (on-platform-test s3-0 arg0 arg1 f0-2) + ) + ) + ) + (&+! s3-0 80) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch pat-surface vs none. +(defmethod on-platform-test ((this collide-shape-prim-mesh) (arg0 collide-shape-prim) (arg1 collide-query) (arg2 float)) + (case (-> arg0 type) + ((collide-shape-prim-group) + (let ((s4-0 (-> this prim-core collide-with)) + (s3-0 (-> (the-as collide-shape-prim-group arg0) child 0)) + (s2-1 (the-as object (-> (the-as collide-shape-prim-group arg0) num-children))) + ) + (while (nonzero? (the-as uint s2-1)) + (set! s2-1 (+ (the-as uint s2-1) -1)) + (when (and (logtest? s4-0 (-> s3-0 prim-core collide-as)) + (logtest? (-> s3-0 prim-core action) (collide-action can-ride)) + ) + (let ((f0-2 (- (- (vector-vector-distance (the-as vector (-> this prim-core)) (the-as vector (-> s3-0 prim-core))) + (-> this prim-core world-sphere w) + ) + (-> s3-0 prim-core world-sphere w) + ) + ) + ) + (if (< f0-2 122.88) + (on-platform-test this s3-0 arg1 f0-2) + ) + ) + ) + (&+! s3-0 80) + ) + ) + ) + ((collide-shape-prim-sphere) + (let ((s3-1 (-> this mesh))) + (when s3-1 + (let ((v1-13 (populate-for-prim-mesh *collide-mesh-cache* this))) + (when v1-13 + (let* ((s4-1 (new 'stack-no-clear 'collide-tri-result)) + (f0-4 (sphere-on-platform-test + s3-1 + (the-as collide-mesh-cache-tri (-> v1-13 tris)) + s4-1 + (the-as vector (-> arg0 prim-core)) + (-> arg1 best-dist) + ) + ) + ) + (when (< f0-4 (-> arg1 best-dist)) + (set! (-> arg1 best-dist) f0-4) + (set! (-> arg1 best-my-prim) this) + (set! (-> arg1 best-other-prim) arg0) + (set! (-> arg1 best-other-tri vertex 0 quad) (-> s4-1 vertex 0 quad)) + (set! (-> arg1 best-other-tri vertex 1 quad) (-> s4-1 vertex 1 quad)) + (set! (-> arg1 best-other-tri vertex 2 quad) (-> s4-1 vertex 2 quad)) + (set! (-> arg1 best-other-tri intersect quad) (-> s4-1 intersect quad)) + (set! (-> arg1 best-other-tri normal quad) (-> s4-1 normal quad)) + (set! (-> arg1 best-other-tri pat) (-> s4-1 pat)) + ) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +(defmethod add-rider ((this collide-rider-pool) (arg0 handle)) + (let ((v1-0 (-> this alloc-count))) + (cond + ((< v1-0 20) + (let ((v0-0 (-> this riders v1-0))) + (set! (-> this alloc-count) (+ v1-0 1)) + (set! (-> v0-0 rider-handle) arg0) + (set! (-> v0-0 sticky-prim) #f) + v0-0 + ) + ) + (else + (format 0 "ERROR: *collide-rider-pool*: exceeded max # of riders!~%") + (the-as collide-rider #f) + ) + ) + ) + ) + +;; WARN: Return type mismatch joint-control-status vs symbol. +(defmethod detect-riders! ((this collide-shape)) + (local-vars (v0-7 joint-control-status) (a2-5 float) (a2-12 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (set! (-> this num-riders) (the-as uint 0)) + (set! (-> this riders) (the-as (inline-array collide-rider) #f)) + (let* ((s4-0 (-> this root-prim)) + (s5-0 (-> s4-0 prim-core collide-with)) + ) + (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) + ) + ) + (when (logtest? s5-0 (collide-spec player-list)) + (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? s5-0 (-> a1-1 prim-core collide-as)) + (let ((a1-2 (-> a1-1 prim-core))) + (let ((a2-4 a1-2) + (a3-1 (-> s4-0 prim-core)) + ) + (.lvf vf2 (&-> a2-4 world-sphere quad)) + (.lvf vf3 (&-> a3-1 world-sphere 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) (-> s4-0 prim-core world-sphere w))) + ) + (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 (logtest? s5-0 (collide-spec hit-by-player-list)) + (let ((a0-5 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((v1-19 (-> 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? s5-0 (-> a1-13 prim-core collide-as)) + (let ((a1-14 (-> a1-13 prim-core))) + (let ((a2-11 a1-14) + (a3-2 (-> s4-0 prim-core)) + ) + (.lvf vf2 (&-> a2-11 world-sphere quad)) + (.lvf vf3 (&-> a3-2 world-sphere 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) (-> s4-0 prim-core world-sphere w))) + ) + (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-19) + *collide-hit-by-player-list* + (set! v1-19 (-> v1-19 next0)) + ) + ) + ) + ) + (dotimes (s4-1 *actor-list-length*) + (let* ((s3-0 (-> *actor-list* s4-1)) + (v1-24 (-> s3-0 root-prim)) + ) + (when (logtest? s5-0 (-> v1-24 prim-core collide-as)) + (when (and (logtest? (-> v1-24 prim-core action) (collide-action can-ride)) + (!= (-> this process) (-> s3-0 process)) + ) + (let ((s2-0 (new 'stack-no-clear 'collide-query))) + (when (on-platform this s3-0 s2-0) + (let ((s5-1 (add-rider *collide-rider-pool* (process->handle (-> s3-0 process))))) + (when s5-1 + (+! (-> this num-riders) 1) + (if (not (-> this riders)) + (set! (-> this riders) (the-as (inline-array collide-rider) s5-1)) + ) + (let ((a0-15 (-> s2-0 best-my-prim))) + (set! (-> s5-1 sticky-prim) a0-15) + (let ((s1-0 (-> this process node-list data (-> a0-15 transform-index) bone transform))) + (set! (-> s5-1 prim-ry) (matrix-y-angle s1-0)) + (let ((s2-1 (new 'stack-no-clear 'matrix))) + (matrix-4x4-inverse! s2-1 s1-0) + (set! (-> s3-0 trans w) 1.0) + (vector-matrix*! (-> s5-1 rider-local-pos) (-> s3-0 trans) s2-1) + ) + ) + ) + (send-event (-> this process) 'ridden s5-1) + ) + ) + (set! s5-0 (-> this root-prim prim-core collide-with)) + ) + ) + ) + ) + ) + ) + ) + (let ((v1-58 (-> this process skel))) + (the-as + symbol + (when (nonzero? v1-58) + (cond + ((or (> (-> this num-riders) 0) (logtest? (-> this root-prim prim-core action) (collide-action edge-grabbed))) + (set! v0-7 (logior (-> v1-58 status) (joint-control-status sync-math))) + (set! (-> v1-58 status) v0-7) + ) + (else + (set! v0-7 (logclear (-> v1-58 status) (joint-control-status sync-math))) + (set! (-> v1-58 status) v0-7) + ) + ) + v0-7 + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch int vs symbol. +(defmethod pull-riders! ((this collide-shape)) + (let ((s5-0 (-> this riders))) + (when s5-0 + (let ((s4-0 (new 'stack-no-clear 'pull-rider-info))) + (countdown (s3-0 (-> this num-riders)) + (let* ((v1-2 (-> s5-0 s3-0)) + (a0-1 (-> v1-2 rider-handle)) + ) + (when (handle->process a0-1) + (set! (-> s4-0 rider) v1-2) + (set! (-> s4-0 rider-cshape) + (the-as collide-shape-moving (-> (the-as process-drawable (-> a0-1 process 0)) root)) + ) + (let ((a0-5 (-> v1-2 sticky-prim))) + (when a0-5 + (let ((s2-0 (-> this process node-list data (-> a0-5 transform-index) bone transform))) + (let ((s1-0 (-> s4-0 rider-dest))) + (vector-matrix*! s1-0 (-> v1-2 rider-local-pos) s2-0) + (vector-float*! s1-0 s1-0 (/ 1.0 (-> s1-0 w))) + ) + (set! (-> s4-0 rider-delta-ry) (deg- (matrix-y-angle s2-0) (-> s4-0 rider prim-ry))) + ) + (pull-rider! this s4-0) + ) + ) + ) + ) + ) + ) + ) + ) + (the-as symbol 0) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod pull-rider! ((this collide-shape) (arg0 pull-rider-info)) + (local-vars (at-0 int)) + (with-pp + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (-> arg0 rider-cshape))) + (let ((s2-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 quad) (-> gp-0 trans quad)) + (vector-! s2-0 (-> arg0 rider-dest) s3-0) + (cond + ((logtest? (-> this root-prim prim-core action) (collide-action pull-rider-can-collide)) + (let ((s1-0 (-> this root-prim prim-core collide-as))) + (set! (-> this root-prim prim-core collide-as) (collide-spec)) + (let ((a2-0 (new 'stack-no-clear 'collide-query))) + (set! (-> a2-0 collide-with) (-> gp-0 root-prim prim-core collide-with)) + (set! (-> a2-0 ignore-process0) (-> gp-0 process)) + (set! (-> a2-0 ignore-process1) #f) + (set! (-> a2-0 ignore-pat) (-> gp-0 pat-ignore-mask)) + (set! (-> a2-0 action-mask) (collide-action solid)) + (fill-cache-for-shape gp-0 (+ 8192.0 (vector-length s2-0)) a2-0) + ) + (set! (-> this root-prim prim-core collide-as) s1-0) + ) + (let ((s1-1 (new 'stack-no-clear 'vector))) + (set! (-> s1-1 quad) (-> s2-0 quad)) + (let ((v1-19 s1-1)) + (.lvf vf1 (&-> s1-1 quad)) + (let ((f0-2 (-> pp clock frames-per-second))) + (.mov at-0 f0-2) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> v1-19 quad) vf1) + ) + (cond + ((type? gp-0 collide-shape-moving) + (let ((s2-1 (-> gp-0 status))) + (integrate-and-collide! gp-0 s1-1) + (set! (-> gp-0 status) s2-1) + ) + ) + (else + (integrate-and-collide! gp-0 s1-1) + ) + ) + ) + ) + (else + (move-by-vector! gp-0 s2-0) + ) + ) + (when (type? gp-0 collide-shape-moving) + (let ((v1-26 (new 'stack-no-clear 'vector))) + (vector-! v1-26 (-> gp-0 trans) s3-0) + (vector-float*! + (-> gp-0 rider-last-move) + v1-26 + (* (-> pp clock frames-per-second) (-> this process clock clock-ratio)) + ) + ) + (let ((f0-5 (vector-length (-> gp-0 rider-last-move)))) + (if (< (-> this rider-max-momentum) f0-5) + (vector-normalize! (-> gp-0 rider-last-move) (-> this rider-max-momentum)) + ) + ) + (set! (-> gp-0 rider-time) (-> gp-0 process clock frame-counter)) + ) + ) + (let ((f0-7 (-> arg0 rider-delta-ry))) + (if (!= f0-7 0.0) + (send-event (-> gp-0 process) 'rotate-y-angle f0-7) + ) + ) + ) + (none) + ) + ) + ) diff --git a/goal_src/jak3/engine/collide/collide-shape.gc b/goal_src/jak3/engine/collide/collide-shape.gc index 6656bddb80..0b39d5d785 100644 --- a/goal_src/jak3/engine/collide/collide-shape.gc +++ b/goal_src/jak3/engine/collide/collide-shape.gc @@ -5,5 +5,3040 @@ ;; name in dgo: collide-shape ;; dgos: GAME +(deftype do-push-aways-work (structure) + "Added" + ((cquery collide-query :inline) + (push-vel vector :inline) + (vec33 vector :inline :offset 560) + (cspec collide-spec :offset 576) + ) + ) + ;; DECOMP BEGINS +;; WARN: Return type mismatch collide-shape vs none. +(defmethod pusher-init ((this collide-shape)) + (when (logtest? (collide-spec pusher) (-> this root-prim prim-core collide-as)) + (let ((v1-3 (the-as process-tree (-> this process)))) + (while (not (logtest? (-> v1-3 mask) (process-mask process-tree))) + (set! v1-3 (ppointer->process (-> v1-3 parent))) + ) + (if (!= v1-3 *pusher-pool*) + (change-parent (-> this process) *pusher-pool*) + ) + ) + ) + (none) + ) + +(defmethod should-push-away ((this collide-shape) (arg0 collide-shape) (arg1 collide-query)) + (local-vars (v1-2 uint) (v1-3 float) (a2-2 uint) (a3-2 uint)) + (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) + (let ((v1-0 arg1)) + (set! (-> v1-0 best-dist) 0.0) + (set! (-> v1-0 best-my-prim) #f) + (set! (-> v1-0 best-other-prim) #f) + ) + (let ((a0-1 (-> this root-prim)) + (a1-1 (-> arg0 root-prim)) + ) + (let ((a3-0 (-> a0-1 prim-core collide-with)) + (t0-0 (-> a1-1 prim-core collide-as)) + (v1-1 (-> a0-1 prim-core action)) + ) + (let ((a2-1 (-> a1-1 prim-core action))) + (b! (not (logtest? a3-0 t0-0)) cfg-8 :delay (set! a3-2 (the-as uint (logand a2-1 1)))) + (b! (zero? a3-2) cfg-8 :delay (set! a2-2 (the-as uint (logand a2-1 16)))) + ) + (b! (nonzero? a2-2) cfg-8 :delay (set! v1-2 (the-as uint (logand v1-1 1)))) + ) + (b! (zero? v1-2) cfg-8 :delay (nop!)) + (.lvf vf1 (&-> a0-1 prim-core world-sphere quad)) + (.lvf vf2 (&-> a1-1 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 vf5 vf3 vf4 :mask #b1000) + (let ((f0-1 0.0)) + (.add.w.vf vf5 vf0 vf5 :mask #b1) + (.mov v1-3 vf5) + (b! (<= f0-1 v1-3) cfg-8) + ) + (should-push-away-test a0-1 a1-1 arg1) + ) + (let ((v0-1 (< (-> arg1 best-dist) 0.0))) + (b! #t cfg-9 :delay (nop!)) + (label cfg-8) + (set! v0-1 #f) + (label cfg-9) + v0-1 + ) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod should-push-away-test ((this collide-shape-prim) (arg0 collide-shape-prim) (arg1 collide-query)) + (format 0 "ERROR: collide-shape-prim::should-push-away-test was called illegally!~%") + (none) + ) + +(defmethod should-push-away-test ((this collide-shape-prim-group) (arg0 collide-shape-prim) (arg1 collide-query)) + (local-vars (a0-2 collide-action) (a0-3 float) (f0-0 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (nop!) + (let ((s4-0 (the-as collide-shape-prim this)) + (s3-0 (-> this num-children)) + ) + (nop!) + (let ((v1-0 (-> arg0 prim-core collide-as))) + (nop!) + (.lvf vf1 (&-> arg0 prim-core world-sphere quad)) + (until (> f0-0 a0-3) + (until (nonzero? a0-2) + (label cfg-1) + ;; og:preserve-this + (b! (zero? s3-0) cfg-6 :delay (set! s4-0 (&+ s4-0 80))) + (+! s3-0 -1) + (let ((a1-1 (-> s4-0 prim-core collide-with))) + (nop!) + (let ((a0-1 (-> s4-0 prim-core action)) + (a1-2 (logand a1-1 v1-0)) + ) + (set! a0-2 (logand a0-1 (collide-action solid))) + (b! (zero? a1-2) cfg-1 :delay (.lvf vf2 (&-> s4-0 prim-core world-sphere quad))) + ) + ) + ) + (.sub.vf vf3 vf2 vf1) + (.add.w.vf vf4 vf2 vf1 :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) + (set! f0-0 0.0) + (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.mov a0-3 vf3) + ) + (should-push-away-test s4-0 arg0 arg1) + (set! v1-0 (-> arg0 prim-core collide-as)) + ) + ) + (b! #t cfg-1 :delay (.lvf vf1 (&-> arg0 prim-core world-sphere quad))) + (label cfg-6) + 0 + (none) + ) + ) + +(defmethod should-push-away-a-group-test ((this collide-shape-prim) (arg0 collide-shape-prim-group) (arg1 collide-query)) + (local-vars (a0-2 collide-action) (a0-3 float) (f0-0 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (nop!) + (let ((s4-0 (the-as object arg0)) + (s3-0 (-> arg0 num-children)) + ) + (nop!) + (let ((v1-0 (-> this prim-core collide-with))) + (nop!) + (.lvf vf2 (&-> this prim-core world-sphere quad)) + (until (> f0-0 a0-3) + (until (nonzero? a0-2) + (label cfg-1) + ;; og:preserve-this + (b! (zero? s3-0) cfg-6 :delay (set! s4-0 (&+ (the-as collide-shape-prim s4-0) 80))) + (+! s3-0 -1) + (let ((a1-1 (-> (the-as collide-shape-prim s4-0) prim-core collide-as))) + (nop!) + (let ((a0-1 (-> (the-as collide-shape-prim s4-0) prim-core action)) + (a1-2 (logand v1-0 a1-1)) + ) + (set! a0-2 (logand a0-1 (collide-action solid))) + (b! (zero? a1-2) cfg-1 :delay (.lvf vf1 (&-> (the-as collide-shape-prim s4-0) prim-core world-sphere quad))) + ) + ) + ) + (.sub.vf vf3 vf2 vf1) + (.add.w.vf vf4 vf2 vf1 :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) + (set! f0-0 0.0) + (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.mov a0-3 vf3) + ) + (should-push-away-test this (the-as collide-shape-prim s4-0) arg1) + (set! v1-0 (-> this prim-core collide-with)) + ) + ) + (b! #t cfg-1 :delay (.lvf vf2 (&-> this prim-core world-sphere quad))) + (label cfg-6) + 0 + (none) + ) + ) + +(defmethod should-push-away-test ((this collide-shape-prim-mesh) (arg0 collide-shape-prim) (arg1 collide-query)) + (let ((v1-0 (-> arg0 prim-core prim-type))) + (cond + ((zero? v1-0) + (should-push-away-a-group-test this (the-as collide-shape-prim-group arg0) arg1) + ) + (else + (b! (> v1-0 0) cfg-8 :delay (nop!)) + (let ((s2-0 (-> this mesh))) + (b! (not s2-0) cfg-7 :delay (empty-form)) + (let ((v1-4 (populate-for-prim-mesh *collide-mesh-cache* this))) + (b! (not v1-4) cfg-7 :delay (empty-form)) + (let ((s5-0 (new 'stack-no-clear 'collide-tri-result))) + (let ((f0-1 (should-push-away-test + s2-0 + (the-as collide-mesh-cache-tri (-> v1-4 tris)) + s5-0 + (the-as vector (-> arg0 prim-core)) + (-> arg1 best-dist) + ) + ) + ) + (b! (>= f0-1 (-> arg1 best-dist)) cfg-7 :delay #f) + (set! (-> arg1 best-dist) f0-1) + ) + (set! (-> arg1 best-my-prim) this) + (set! (-> arg1 best-other-prim) arg0) + (set! (-> arg1 best-other-tri vertex 0 quad) (-> s5-0 vertex 0 quad)) + (set! (-> arg1 best-other-tri vertex 1 quad) (-> s5-0 vertex 1 quad)) + (set! (-> arg1 best-other-tri vertex 2 quad) (-> s5-0 vertex 2 quad)) + (set! (-> arg1 best-other-tri intersect quad) (-> s5-0 intersect quad)) + (set! (-> arg1 best-other-tri normal quad) (-> s5-0 normal quad)) + (set! (-> arg1 best-other-tri pat) (-> s5-0 pat)) + ) + ) + ) + (label cfg-7) + (b! #t cfg-9 :delay (nop!)) + (label cfg-8) + (format 0 "ERROR: Attempted unsupported mesh -> mesh test in collide-shape-prim::should-push-away-test!~%") + ) + ) + ) + (label cfg-9) + 0 + (none) + ) + +(defmethod should-push-away-test ((this collide-shape-prim-sphere) (arg0 collide-shape-prim) (arg1 collide-query)) + (local-vars (v1-3 float)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((v1-0 (-> arg0 prim-core prim-type))) + (cond + ((zero? v1-0) + (should-push-away-a-group-test this (the-as collide-shape-prim-group arg0) arg1) + ) + (else + (b! (> v1-0 0) cfg-5 :delay (nop!)) + (.lvf vf1 (&-> this prim-core world-sphere quad)) + (.lvf vf2 (&-> arg0 prim-core world-sphere quad)) + (.sub.vf vf3 vf2 vf1 :mask #b111) + (.add.w.vf vf5 vf1 vf2 :mask #b1000) + (.mul.vf vf4 vf3 vf3 :mask #b111) + (.mul.x.vf acc vf0 vf4 :mask #b1000) + (.add.mul.y.vf acc vf0 vf4 acc :mask #b1000) + (.add.mul.z.vf vf4 vf0 vf4 acc :mask #b1000) + (.sqrt.vf Q vf4 :ftf #b11) + (.mov.vf vf3 vf0 :mask #b1000) + (.add.w.vf vf5 vf0 vf5 :mask #b1) + (let ((f2-0 (-> arg1 best-dist))) + (.wait.vf) + (nop!) + (.add.vf vf4 vf0 Q :mask #b1) + (.sub.x.vf vf6 vf4 vf5 :mask #b1) + (.mul.x.vf vf3 vf3 vf4 :mask #b111) + (.mov v1-3 vf6) + (let ((f1-0 v1-3)) + (b! (<= f2-0 f1-0) cfg-9) + (let ((v1-4 (-> this pat))) + (set! (-> arg1 best-dist) f1-0) + (set! (-> arg1 best-my-prim) this) + (set! (-> arg1 best-other-prim) arg0) + (.svf (&-> arg1 best-other-tri normal quad) vf3) + (set! (-> arg1 best-other-tri pat) v1-4) + ) + ) + ) + (let ((s3-0 (-> arg1 best-other-tri normal)) + (s4-1 (-> arg1 best-other-tri intersect)) + ) + (vector-float*! s4-1 s3-0 (-> this prim-core world-sphere w)) + (vector+! s4-1 s4-1 (the-as vector (-> this prim-core))) + (set! (-> arg1 best-other-tri vertex 0 quad) (-> s4-1 quad)) + (point-in-plane-<-point+normal! (-> arg1 best-other-tri vertex 1) s4-1 s3-0) + (let* ((a0-8 (vector-normalize! + (vector-! + (new 'stack-no-clear 'vector) + (-> arg1 best-other-tri vertex 1) + (the-as vector (-> arg1 best-other-tri)) + ) + 1.0 + ) + ) + (v1-11 (vector-cross! (new 'stack-no-clear 'vector) s3-0 a0-8)) + (a0-9 (-> arg1 best-other-tri vertex 2)) + ) + (let ((a1-7 4096.0)) + (.mov vf7 a1-7) + ) + (.lvf vf5 (&-> v1-11 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 (&-> a0-9 quad) vf6) + ) + ) + (b! #t cfg-9 :delay (nop!)) + (label cfg-5) + (let ((s2-0 (-> (the-as collide-shape-prim-mesh arg0) mesh))) + (when s2-0 + (let ((v1-13 (populate-for-prim-mesh *collide-mesh-cache* (the-as collide-shape-prim-mesh arg0)))) + (when v1-13 + (let* ((s3-1 (new 'stack-no-clear 'collide-tri-result)) + (f0-3 (should-push-away-test + s2-0 + (the-as collide-mesh-cache-tri (-> v1-13 tris)) + s3-1 + (the-as vector (-> this prim-core)) + (-> arg1 best-dist) + ) + ) + ) + (when (< f0-3 (-> arg1 best-dist)) + (set! (-> arg1 best-dist) f0-3) + (set! (-> arg1 best-my-prim) this) + (set! (-> arg1 best-other-prim) arg0) + (let ((s4-2 (-> arg1 best-other-tri normal))) + (vector-! s4-2 (-> s3-1 intersect) (the-as vector (-> this prim-core))) + (vector-normalize! s4-2 1.0) + (let ((s3-2 (-> arg1 best-other-tri intersect))) + (vector-float*! s3-2 s4-2 (-> this prim-core world-sphere w)) + (vector+! s3-2 s3-2 (the-as vector (-> this prim-core))) + (set! (-> arg1 best-other-tri vertex 0 quad) (-> s3-2 quad)) + (point-in-plane-<-point+normal! (-> arg1 best-other-tri vertex 1) s3-2 s4-2) + (let* ((a0-23 (vector-normalize! + (vector-! + (new 'stack-no-clear 'vector) + (-> arg1 best-other-tri vertex 1) + (the-as vector (-> arg1 best-other-tri)) + ) + 1.0 + ) + ) + (v1-23 (vector-cross! (new 'stack-no-clear 'vector) s4-2 a0-23)) + (a0-24 (-> arg1 best-other-tri vertex 2)) + ) + (let ((a1-18 4096.0)) + (.mov vf7 a1-18) + ) + (.lvf vf5 (&-> v1-23 quad)) + (.lvf vf4 (&-> s3-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-24 quad) vf6) + ) + ) + ) + (set! (-> arg1 best-other-tri pat) (-> this pat)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (label cfg-9) + 0 + (none) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod collide-with-collide-cache-prim-mesh ((this collide-shape-prim) (arg0 collide-query) (arg1 collide-cache-prim)) + (format 0 "ERROR: Unsupported prim type in collide-shape-prim::collide-with-collide-cache-prim-mesh!~%") + (none) + ) + +(defmethod collide-with-collide-cache-prim-mesh ((this collide-shape-prim-sphere) (arg0 collide-query) (arg1 collide-cache-prim)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + ) + (let* ((gp-0 (new 'stack-no-clear 'collide-tri-result)) + (f0-1 (resolve-moving-sphere-tri + arg1 + gp-0 + (-> this prim-core) + (-> arg0 move-dist) + (-> arg0 best-dist) + (-> this prim-core action) + ) + ) + ) + (when (>= f0-1 0.0) + (let ((v1-3 (-> arg1 prim-core action)) + (a0-2 (-> this prim-core action)) + (a2-2 (-> arg1 prim)) + ) + (let* ((v1-4 (logand a0-2 v1-3)) + (a0-3 (-> this cshape)) + (a1-2 (logand v1-4 (collide-action solid))) + (v1-5 (-> a2-2 cshape)) + ) + (b! (zero? a1-2) cfg-6 :delay (nop!)) + (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)) + ) + (set! (-> arg0 best-dist) f0-1) + (.svf (&-> arg0 best-other-tri vertex 0 quad) vf3) + (.svf (&-> arg0 best-other-tri vertex 1 quad) vf4) + (.svf (&-> arg0 best-other-tri vertex 2 quad) vf5) + (.svf (&-> arg0 best-other-tri intersect quad) vf1) + (.svf (&-> arg0 best-other-tri normal quad) vf2) + (set! (-> arg0 best-other-tri pat) a0-6) + (set! (-> arg0 best-other-tri collide-ptr) a1-4) + ) + (set! (-> arg0 best-other-prim) a2-2) + (set! (-> arg0 best-my-prim) this) + (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)) + ) + ) + ) + ) + (label cfg-8) + 0 + (none) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod collide-with-collide-cache-prim-mesh ((this collide-shape-prim-mesh) (arg0 collide-query) (arg1 collide-cache-prim)) + (format 0 "ERROR: collide-shape-prim-mesh vs. collide-cache-prim mesh is not currently supported!~%") + (none) + ) + +(defmethod collide-with-collide-cache-prim-mesh ((this collide-shape-prim-group) (arg0 collide-query) (arg1 collide-cache-prim)) + (let ((s4-0 (-> arg1 prim-core collide-as)) + (s3-0 (-> this child 0)) + ) + (countdown (s2-0 (-> this num-children)) + (if (logtest? (-> s3-0 prim-core collide-with) s4-0) + (collide-with-collide-cache-prim-mesh s3-0 arg0 arg1) + ) + (&+! s3-0 80) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod collide-with-collide-cache-prim-sphere ((this collide-shape-prim) (arg0 collide-query) (arg1 collide-cache-prim)) + (format 0 "ERROR: Unsupported prim type in collide-shape-prim::collide-with-collide-cache-prim-sphere!~%") + (none) + ) + +(defmethod collide-with-collide-cache-prim-sphere ((this collide-shape-prim-sphere) (arg0 collide-query) (arg1 collide-cache-prim)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + ) + (let* ((gp-0 (new 'stack-no-clear 'collide-tri-result)) + (f0-1 (resolve-moving-sphere-sphere + arg1 + gp-0 + (-> this prim-core) + (-> arg0 move-dist) + (-> arg0 best-dist) + (-> arg1 prim-core action) + ) + ) + ) + (b! (< f0-1 0.0) cfg-5 :delay #f) + (let ((v1-3 (-> arg1 prim-core action)) + (a0-2 (-> this prim-core action)) + (a2-2 (-> arg1 prim)) + ) + (let* ((a0-3 (logand a0-2 v1-3)) + (v1-4 (-> this cshape)) + (a1-2 (logand a0-3 (collide-action solid))) + (a0-4 (-> a2-2 cshape)) + ) + (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)) + ) + (set! (-> arg0 best-dist) f0-1) + (.svf (&-> arg0 best-other-tri vertex 0 quad) vf3) + (.svf (&-> arg0 best-other-tri vertex 1 quad) vf4) + (.svf (&-> arg0 best-other-tri vertex 2 quad) vf5) + (.svf (&-> arg0 best-other-tri intersect quad) vf1) + (.svf (&-> arg0 best-other-tri normal quad) vf2) + (set! (-> arg0 best-other-tri pat) v1-7) + (set! (-> arg0 best-other-tri collide-ptr) a0-6) + ) + (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)) + ) + ) + ) + (label cfg-5) + 0 + (none) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod collide-with-collide-cache-prim-sphere ((this collide-shape-prim-mesh) (arg0 collide-query) (arg1 collide-cache-prim)) + (format 0 "ERROR: collide-shape-prim-mesh vs. collide-cache-prim sphere is not currently supported!~%") + (none) + ) + +(defmethod collide-with-collide-cache-prim-sphere ((this collide-shape-prim-group) (arg0 collide-query) (arg1 collide-cache-prim)) + (let ((s4-0 (-> arg1 prim-core collide-as)) + (s3-0 (-> this child 0)) + ) + (countdown (s2-0 (-> this num-children)) + (if (logtest? (-> s3-0 prim-core collide-with) s4-0) + (collide-with-collide-cache-prim-sphere s3-0 arg0 arg1) + ) + (&+! s3-0 80) + ) + ) + 0 + (none) + ) + +(defun find-ground-point ((arg0 control-info) (arg1 vector) (arg2 float) (arg3 float)) + (local-vars (sv-560 int)) + (let* ((f0-0 819.2) + (v1-1 (-> arg0 transv)) + (f30-0 (if (< f0-0 (sqrtf (+ (* (-> v1-1 x) (-> v1-1 x)) (* (-> v1-1 z) (-> v1-1 z))))) + (vector-y-angle (-> arg0 transv)) + (y-angle arg0) + ) + ) + (s2-0 (-> arg0 trans)) + (s1-0 (new 'stack-no-clear 'collide-query)) + ) + (set! (-> s1-0 collide-with) (-> arg0 root-prim prim-core collide-with)) + (set! (-> s1-0 ignore-process0) (-> arg0 process)) + (set! (-> s1-0 ignore-process1) #f) + (set! (-> s1-0 ignore-pat) (-> arg0 pat-ignore-mask)) + (set! (-> s1-0 action-mask) (collide-action solid)) + (set! (-> arg1 w) 0.0) + (dotimes (v1-9 3) + (set! (-> s1-0 bbox min data v1-9) (- (-> s2-0 data v1-9) arg3)) + (set! (-> s1-0 bbox max data v1-9) (+ (-> s2-0 data v1-9) arg3)) + ) + (set! (-> s1-0 bbox min y) (+ -40960.0 (-> s2-0 y))) + (set! (-> s1-0 bbox max y) (+ 20480.0 (-> s2-0 y))) + (fill-using-bounding-box *collide-cache* s1-0) + (vector+! (-> s1-0 start-pos) s2-0 (new 'static 'vector :y 20480.0 :w 1.0)) + (let ((v1-16 s1-0)) + (set! (-> v1-16 radius) 2048.0) + (set! (-> v1-16 collide-with) (-> arg0 root-prim prim-core collide-with)) + (set! (-> v1-16 ignore-process0) (-> arg0 process)) + (set! (-> v1-16 ignore-process1) #f) + (set! (-> v1-16 ignore-pat) (-> arg0 pat-ignore-mask)) + (set! (-> v1-16 action-mask) (collide-action solid)) + ) + (dotimes (s0-0 8) + (let ((f28-0 (+ f30-0 (if (not (logtest? s0-0 1)) + (* 8192.0 (the float (/ s0-0 2))) + (* -8192.0 (the float (/ s0-0 2))) + ) + ) + ) + ) + (set! sv-560 0) + (let ((f26-0 arg3)) + (set-vector! (-> s1-0 move-dist) 0.0 0.0 arg3 1.0) + (vector-rotate-y! (-> s1-0 move-dist) (-> s1-0 move-dist) f28-0) + (if (>= (probe-using-line-sphere *collide-cache* s1-0) 0.0) + (set! f26-0 (+ -6144.0 (vector-vector-xz-distance s2-0 (-> s1-0 best-other-tri intersect)))) + ) + (let ((f24-0 arg2)) + (while (>= f26-0 f24-0) + (set-vector! (-> s1-0 start-pos) 0.0 0.0 f24-0 1.0) + (vector-rotate-y! (-> s1-0 start-pos) (-> s1-0 start-pos) f28-0) + (vector+! (-> s1-0 start-pos) s2-0 (-> s1-0 start-pos)) + (set! (-> s1-0 start-pos y) (+ 20480.0 (-> s2-0 y))) + (set-vector! (-> s1-0 move-dist) 0.0 -61440.0 0.0 1.0) + (let ((v1-33 s1-0)) + (set! (-> v1-33 radius) 10240.0) + (set! (-> v1-33 collide-with) (-> arg0 root-prim prim-core collide-with)) + (set! (-> v1-33 ignore-process0) (-> arg0 process)) + (set! (-> v1-33 ignore-process1) #f) + (set! (-> v1-33 ignore-pat) (-> arg0 pat-ignore-mask)) + (set! (-> v1-33 action-mask) (collide-action solid)) + ) + (when (>= (probe-using-line-sphere *collide-cache* s1-0) 0.0) + (cond + ((and (or (= (-> s1-0 best-other-tri pat mode) (pat-mode ground)) + (= (-> s1-0 best-other-tri pat mode) (pat-mode halfpipe)) + ) + (and (= (-> s1-0 best-other-tri pat event) (pat-event none)) (< 0.7 (-> s1-0 best-other-tri normal y))) + ) + (set! (-> arg1 quad) (-> s1-0 best-other-tri intersect quad)) + (set! sv-560 (+ sv-560 1)) + (if (>= sv-560 2) + (return arg1) + ) + ) + ((and (= (-> s1-0 best-other-tri pat mode) (pat-mode wall)) + (< (+ 4096.0 (-> s2-0 y)) (-> s1-0 best-other-tri intersect y)) + ) + (goto cfg-38) + ) + ) + ) + (set! f24-0 (+ 4096.0 f24-0)) + ) + ) + ) + ) + (label cfg-38) + ) + ) + (the-as vector #f) + ) + +;; WARN: Return type mismatch object vs none. +(defun target-attack-up ((arg0 target) (arg1 symbol) (arg2 symbol)) + (when (send-event arg0 arg1 #f (static-attack-info :mask (vehicle-impulse-factor) ((id (the-as uint 2)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode arg2) + (test #t) + ) + ) + ) + (let ((s3-0 (find-ground-point (-> arg0 control) (new 'stack-no-clear 'vector) 8192.0 40960.0))) + (set! s3-0 (cond + (s3-0 + (empty) + s3-0 + ) + (else + (-> arg0 control last-trans-on-ground) + ) + ) + ) + (let* ((s2-1 (vector-! (new 'stack-no-clear 'vector) s3-0 (-> arg0 control trans))) + (f0-3 8192.0) + (f1-0 40960.0) + (v1-8 s2-1) + (f30-0 (fmax f0-3 (fmin f1-0 (sqrtf (+ (* (-> v1-8 x) (-> v1-8 x)) (* (-> v1-8 z) (-> v1-8 z))))))) + ) + (cond + ((< (fabs + (vector-dot + (-> arg0 control dynam gravity-normal) + (vector-! (new 'stack-no-clear 'vector) s3-0 (-> arg0 control trans)) + ) + ) + 40960.0 + ) + (vector-xz-normalize! s2-1 f30-0) + (send-event + arg0 + arg1 + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (the-as uint 2)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode arg2) + (vector s2-1) + (shove-up + (+ (lerp-scale 4096.0 16384.0 f30-0 4096.0 40960.0) (fmax 0.0 (- (-> s3-0 y) (-> arg0 control trans y)))) + ) + (angle 'up) + ) + ) + ) + ) + (else + (send-event + arg0 + arg1 + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (the-as uint 2)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode arg2) + (vector + (-> (new 'static 'attack-info :trans (new 'static 'vector :y 40960.0 :w 1.0) :speed (the-as float #x68a)) + trans + ) + ) + (shove-up (meters 10)) + (angle 'up) + (control 1.0) + ) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch int vs cshape-reaction-flags. +(defmethod react-to-pat! ((this collide-shape-moving) (arg0 pat-surface)) + (let ((s5-0 0)) + (set! (-> this cur-pat) arg0) + (set! (-> this poly-pat) arg0) + (case (-> arg0 material) + (((pat-material ice)) + (set! (-> this surf) *ice-surface*) + ) + (((pat-material gravel)) + (set! (-> this surf) *gravel-surface*) + ) + (((pat-material quicksand)) + (set! (-> this surf) *quicksand-surface*) + ) + (((pat-material mhshroom)) + (set! (-> this surf) *mushroom-surface*) + ) + (((pat-material tube)) + (set! (-> this surf) *no-walk-surface*) + ) + (else + (set! (-> this surf) *standard-ground-surface*) + ) + ) + (when (nonzero? (-> arg0 event)) + (case (-> arg0 event) + (((pat-event slide)) + (set! (-> this surf) *gravel-surface*) + (send-event (-> this process) 'slide) + ) + (((pat-event slippery)) + (set! (-> this surf) *gravel-surface*) + ) + (((pat-event rail)) + (let* ((s4-0 (-> this process)) + (a0-15 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (if (and a0-15 (not (logtest? (focus-status rail) (-> (the-as process-focusable a0-15) focus-status)))) + (set! (-> this surf) *rail-surface*) + ) + ) + ) + (((pat-event deadly)) + (set! s5-0 (logior s5-0 #x4000)) + (send-event + (-> this process) + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (the-as uint 2)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'deadly) + (shove-up (meters 3)) + ) + ) + ) + ) + (((pat-event burn)) + (set! s5-0 (logior s5-0 #x4000)) + (send-event + (-> this process) + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (the-as uint 2)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'burn) + (shove-up (meters 3)) + ) + ) + ) + ) + (((pat-event deadlyup)) + (set! s5-0 (logior s5-0 #x4000)) + (target-attack-up (the-as target (-> this process)) 'attack-or-shove 'deadlyup) + ) + (((pat-event shockup)) + (set! s5-0 (logior s5-0 #x4000)) + (target-attack-up (the-as target (-> this process)) 'attack-or-shove 'shockup) + ) + (((pat-event burnup)) + (when (not (focus-test? (the-as process-focusable (-> this process)) pilot)) + (set! s5-0 (logior s5-0 #x4000)) + (target-attack-up (the-as target (-> this process)) 'attack-or-shove 'burnup) + ) + ) + (((pat-event melt)) + (set! s5-0 (logior s5-0 #x4000)) + (send-event + (-> this process) + 'attack-invinc + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (the-as uint 2)) (damage 2.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'melt)) + ) + ) + ) + (((pat-event fry)) + (set! s5-0 (logior s5-0 #x4000)) + (send-event + (-> this process) + 'attack-invinc + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (the-as uint 2)) (damage 4.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'fry)) + ) + ) + ) + (((pat-event slime)) + (set! s5-0 (logior s5-0 #x4000)) + (send-event + (-> this process) + 'attack-invinc + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (the-as uint 2)) (damage 4.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'slime)) + ) + ) + ) + (((pat-event endlessfall)) + (set! s5-0 (logior s5-0 #x4000)) + (send-event + (-> this process) + 'attack-invinc + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (the-as uint 2)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'endlessfall) + ) + ) + ) + ) + (((pat-event shock)) + (set! s5-0 (logior s5-0 #x4000)) + (send-event + (-> this process) + 'attack-invinc + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (the-as uint 2)) (damage 2.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'shock)) + ) + ) + ) + (((pat-event lip)) + (send-event (-> this process) 'lip 'lip) + ) + (((pat-event lipramp)) + (send-event (-> this process) 'lip 'lipramp) + ) + (((pat-event hang)) + (send-event (-> this process) 'change-mode 'hang #f) + ) + ) + ) + (the-as cshape-reaction-flags s5-0) + ) + ) + +(defun collide-shape-moving-angle-set! ((arg0 collide-shape-moving) (arg1 vector) (arg2 vector)) + (set! (-> arg0 surface-normal quad) (-> arg1 quad)) + (set! (-> arg0 surface-angle) (vector-dot arg1 (-> arg0 dynam gravity-normal))) + (set! (-> arg0 poly-angle) (vector-dot (-> arg0 poly-normal) (-> arg0 dynam gravity-normal))) + (set! (-> arg0 touch-angle) + (fmax + (-> arg0 touch-angle) + (vector-dot arg1 (vector-normalize! (vector-negate! (new-stack-vector0) arg2) 1.0)) + ) + ) + 0 + (none) + ) + +(defun cshape-reaction-update-state ((arg0 control-info) (arg1 collide-query) (arg2 vector)) + (local-vars (sv-48 vector) (sv-52 vector) (sv-56 collide-status) (sv-96 symbol)) + (set! sv-48 (new-stack-vector0)) + (set! sv-52 (new-stack-vector0)) + (set! sv-56 (collide-status)) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (vector-float*! a1-1 (-> arg1 move-dist) (-> arg1 best-dist)) + (move-by-vector! arg0 a1-1) + ) + (react-to-pat! arg0 (-> arg1 best-other-tri pat)) + (vector-! sv-48 (the-as vector (-> arg1 best-my-prim prim-core)) (-> arg1 best-other-tri intersect)) + (cond + ((and (= (-> arg1 best-dist) 0.0) + (< (vector-length sv-48) (+ -40.96 (-> arg1 best-my-prim prim-core world-sphere w))) + ) + (set! (-> sv-48 quad) (-> arg1 best-other-tri normal quad)) + (set! (-> arg0 coverage) 0.0) + ) + (else + (set! (-> sv-48 w) 1.0) + (vector-normalize! sv-48 1.0) + (set! (-> arg0 coverage) (vector-dot sv-48 (-> arg1 best-other-tri normal))) + (when (< (-> arg0 coverage) 0.0) + (set! (-> arg0 coverage) 0.0) + (vector-flatten! sv-48 sv-48 (-> arg1 best-other-tri normal)) + (vector-normalize! sv-48 1.0) + ) + ) + ) + (let ((v1-25 (-> sv-48 quad))) + (set! (-> sv-52 quad) v1-25) + ) + (if (= (-> arg1 best-dist) 0.0) + (move-by-vector! arg0 (vector-normalize-copy! (new-stack-vector0) sv-52 6.0)) + ) + (set! (-> arg0 poly-normal quad) (-> arg1 best-other-tri normal quad)) + (collide-shape-moving-angle-set! arg0 sv-52 arg2) + (if (< (-> arg0 poly-angle) -0.2) + (set! sv-56 (logior sv-56 (collide-status touch-ceiling))) + ) + (set! sv-96 (< (fabs (-> arg0 surface-angle)) (-> *pat-mode-info* (-> arg0 cur-pat mode) wall-angle))) + (set! sv-56 (logior sv-56 (collide-status touch-surface))) + (if (-> arg1 best-other-prim) + (set! sv-56 (logior sv-56 (collide-status touch-actor))) + ) + (cond + (sv-96 + (set! sv-56 (logior sv-56 (collide-status touch-wall))) + (set! (-> arg0 cur-pat mode) 1) + ) + (else + (set! sv-56 (logior sv-56 (collide-status on-surface))) + (set! (-> arg0 local-normal quad) (-> sv-52 quad)) + ) + ) + (when (and (not sv-96) (>= (-> arg0 coverage) 0.9)) + (set! sv-56 (logior sv-56 (collide-status on-ground))) + (set! (-> arg0 ground-poly-normal quad) (-> arg0 poly-normal quad)) + (when (!= (-> arg0 poly-pat mode) (pat-mode wall)) + (set! (-> arg0 ground-pat) (-> arg0 poly-pat)) + (set! (-> arg0 ground-touch-point quad) (-> arg1 best-other-tri intersect quad)) + ) + ) + (when (not (logtest? (-> arg0 prev-status) (collide-status on-surface))) + (set! sv-56 (logior sv-56 (collide-status impact-surface))) + (set! (-> arg0 ground-impact-vel) (- (vector-dot (-> arg0 transv) (-> arg0 dynam gravity-normal)))) + ) + (logior! (-> arg0 status) sv-56) + 0 + (none) + ) + +(defun cshape-reaction-default ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector)) + (cshape-reaction-update-state arg0 arg1 arg3) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (set! (-> a1-1 quad) (-> arg3 quad)) + (when (and (not (logtest? (-> arg0 prev-status) (collide-status on-surface))) + (not (logtest? (-> arg0 status) (collide-status touch-wall))) + ) + (let ((f0-1 (- 1.0 (-> arg0 surf impact-fric)))) + (when (< f0-1 1.0) + (let ((v1-9 (new-stack-vector0)) + (f1-3 (vector-dot (-> arg0 dynam gravity-normal) a1-1)) + ) + 0.0 + (vector-! v1-9 a1-1 (vector-float*! v1-9 (-> arg0 dynam gravity-normal) f1-3)) + (let* ((f2-2 (vector-length v1-9)) + (f3-0 f2-2) + ) + (if (< f1-3 0.0) + (set! f1-3 (* f1-3 f0-1)) + ) + (vector+! + a1-1 + (vector-float*! a1-1 (-> arg0 dynam gravity-normal) f1-3) + (vector-float*! v1-9 v1-9 (/ f2-2 f3-0)) + ) + ) + ) + ) + ) + ) + (vector-reflect-flat! arg2 a1-1 (-> arg0 surface-normal)) + ) + (-> arg0 status) + ) + +(defun cshape-reaction-just-move ((arg0 control-info) (arg1 collide-query) (arg2 vector)) + (vector-reset! arg2) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (vector-float*! a1-1 (-> arg1 move-dist) (-> arg1 best-dist)) + (move-by-vector! arg0 a1-1) + ) + (let ((v1-5 4)) + (if (-> arg1 best-other-prim) + (set! v1-5 (logior v1-5 32)) + ) + (let ((v0-1 (logior (-> arg0 status) v1-5))) + (set! (-> arg0 status) v0-1) + v0-1 + ) + ) + ) + +(defmethod step-collision! ((this collide-shape-moving) (arg0 vector) (arg1 vector) (arg2 float) (arg3 int)) + (local-vars (sv-592 int)) + (let ((s5-0 (new 'stack 'collide-query)) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (vector-float*! s2-0 arg1 (* arg2 (seconds-per-frame))) + (set! (-> s5-0 move-dist quad) (-> s2-0 quad)) + (set! (-> s5-0 best-dist) -100000000.0) + (set! (-> s5-0 best-my-prim) #f) + (set! (-> s5-0 best-other-prim) #f) + (let* ((s1-1 (-> this root-prim)) + (v1-5 *collide-cache*) + (s0-0 (the-as collide-cache-prim (-> v1-5 prims))) + ) + (set! sv-592 (-> v1-5 num-prims)) + (while (nonzero? sv-592) + (set! sv-592 (+ sv-592 -1)) + (when (logtest? (-> s1-1 prim-core collide-with) (-> s0-0 prim-core collide-as)) + (if (>= (-> s0-0 prim-core prim-type) 0) + (collide-with-collide-cache-prim-mesh s1-1 s5-0 s0-0) + (collide-with-collide-cache-prim-sphere s1-1 s5-0 s0-0) + ) + ) + (&+! s0-0 48) + ) + ) + (let ((f30-0 (-> s5-0 best-dist))) + (set! f30-0 (cond + ((>= f30-0 0.0) + (let ((s2-1 (new 'stack-no-clear 'vector))) + (if *display-collision-marks* + (set! (-> s2-1 quad) (-> arg1 quad)) + ) + (set! (-> this prev-status) ((-> this reaction) (the-as control-info this) s5-0 arg0 arg1)) + (when *display-collision-marks* + (let ((t1-0 (-> *pat-mode-info* (-> s5-0 best-other-tri pat mode) hilite-color))) + (add-debug-outline-triangle + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> s5-0 best-other-tri)) + (-> s5-0 best-other-tri vertex 1) + (-> s5-0 best-other-tri vertex 2) + t1-0 + ) + ) + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + (-> s5-0 best-other-tri intersect) + s2-1 + (meters 0.00007324219) + (new 'static 'rgba :r #xff :g #xa0 :a #x80) + ) + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + (-> s5-0 best-other-tri intersect) + arg0 + (meters 0.00007324219) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + ) + (if (= (-> this process type) target) + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + (-> s5-0 best-other-tri intersect) + (-> this surface-normal) + (meters 0.5) + (-> *pat-mode-info* (-> this cur-pat mode) hilite-color) + ) + ) + ) + ) + f30-0 + ) + (else + (set! (-> this reaction-flag) (cshape-reaction-flags)) + ((-> this no-reaction) this s5-0 arg0 arg1) + (set! (-> this prev-status) (collide-status)) + (move-by-vector! this s2-0) + (set! (-> arg0 quad) (-> arg1 quad)) + 1.0 + ) + ) + ) + f30-0 + ) + ) + ) + +(defmethod integrate-and-collide! ((this collide-shape) (arg0 vector)) + (local-vars (at-0 int)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((t9-0 (method-of-object this move-by-vector!)) + (v1-1 (new 'stack-no-clear 'vector)) + ) + (.lvf vf1 (&-> arg0 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 (&-> v1-1 quad) vf1) + (t9-0 this v1-1) + ) + (none) + ) + ) + +(defmethod integrate-and-collide! ((this collide-shape-moving) (arg0 vector)) + (update-transforms this) + (set! (-> this trans-old-old-old quad) (-> this trans-old-old quad)) + (set! (-> this trans-old-old quad) (-> this trans-old quad)) + (set! (-> this trans-old quad) (-> this trans quad)) + (set! (-> this prev-status) (-> this status)) + (logclear! (-> this status) (collide-status + on-surface + on-ground + touch-surface + touch-wall + touch-ceiling + touch-actor + on-special-surface + touch-edge + blocked + on-water + impact-surface + touch-background + stuck + glance + ) + ) + (when (not (logtest? (-> this root-prim prim-core action) (collide-action no-normal-reset))) + (let ((v1-13 (-> this dynam gravity-normal))) + (set! (-> this local-normal quad) (-> v1-13 quad)) + (set! (-> this surface-normal quad) (-> v1-13 quad)) + (set! (-> this poly-normal quad) (-> v1-13 quad)) + ) + (set! (-> this coverage) 0.0) + (set! (-> this touch-angle) 0.0) + ) + (let ((f30-0 1.0) + (s4-0 0) + ) + (while (and (< 0.05 f30-0) (and (< s4-0 (the-as int (-> this max-iteration-count))) + (not (and (= (-> arg0 x) 0.0) (= (-> arg0 y) 0.0) (= (-> arg0 z) 0.0))) + ) + ) + (let ((f28-0 (step-collision! this arg0 arg0 f30-0 s4-0))) + (update-from-step-size *touching-list* f28-0) + (set! f30-0 (- f30-0 (* f28-0 f30-0))) + ) + (+! s4-0 1) + ) + ) + 0 + (none) + ) + +(defmethod integrate-and-collide! ((this control-info) (arg0 vector)) + (stopwatch-start (the-as stopwatch (&-> *collide-stats* junk 1))) + (when (< 1638400.0 (vector-length arg0)) + (format 0 "WARNING: target vel is ~M m/s, reseting to zero.~%" (vector-length arg0)) + (vector-reset! arg0) + ) + (set! (-> this old-anim-collide-offset-world quad) (-> this anim-collide-offset-world quad)) + (vector-matrix*! + (-> this anim-collide-offset-world) + (-> this anim-collide-offset-local) + (-> this ctrl-orientation) + ) + (vector-! + (-> this anim-collide-offset-delta-world) + (-> this anim-collide-offset-world) + (-> this old-anim-collide-offset-world) + ) + (let ((a1-6 (vector-! (new 'stack-no-clear 'vector) (-> this draw-offset) (-> this anim-collide-offset-world)))) + (vector-seek! (-> this cspace-offset) a1-6 (* 16384.0 (seconds-per-frame))) + ) + (let ((a1-8 (vector+float*! + (new-stack-vector0) + (-> this collide-extra-velocity) + (-> this anim-collide-offset-delta-world) + 60.0 + ) + ) + ) + (when (< 0.0 (vector-length a1-8)) + (let ((s2-0 (-> this max-iteration-count)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 quad) (-> arg0 quad)) + (let ((s4-0 (-> this status))) + (let ((t9-4 (method-of-type collide-shape-moving integrate-and-collide!))) + (t9-4 this a1-8) + ) + (set! (-> this max-iteration-count) s2-0) + (set! (-> arg0 quad) (-> s3-0 quad)) + (logior! (-> this status) s4-0) + ) + ) + ) + ) + (let ((s3-1 (new-stack-vector0))) + (set! (-> s3-1 quad) (-> arg0 quad)) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (set! (-> s4-1 quad) (-> arg0 quad)) + (let ((t9-5 (method-of-type collide-shape-moving integrate-and-collide!))) + (t9-5 this s3-1) + ) + (let ((s1-0 (new-stack-vector0))) + (set! (-> s1-0 quad) (-> s4-1 quad)) + (let ((s2-1 (new-stack-vector0))) + (set! (-> s2-1 quad) (-> s3-1 quad)) + (let ((v1-32 (new-stack-vector0))) + (let ((f0-6 (vector-dot (-> this dynam gravity-normal) s1-0))) + 0.0 + (vector-! v1-32 s1-0 (vector-float*! v1-32 (-> this dynam gravity-normal) f0-6)) + ) + (let* ((f0-7 (vector-length v1-32)) + (f1-4 f0-7) + (f2-0 0.0) + ) + (vector+! + s1-0 + (vector-float*! s1-0 (-> this dynam gravity-normal) f2-0) + (vector-float*! v1-32 v1-32 (/ f0-7 f1-4)) + ) + ) + ) + (let ((v1-33 (new-stack-vector0))) + (let ((f0-10 (vector-dot (-> this dynam gravity-normal) s2-1))) + 0.0 + (vector-! v1-33 s2-1 (vector-float*! v1-33 (-> this dynam gravity-normal) f0-10)) + ) + (let* ((f0-11 (vector-length v1-33)) + (f1-6 f0-11) + (f2-1 0.0) + ) + (vector+! + s2-1 + (vector-float*! s2-1 (-> this dynam gravity-normal) f2-1) + (vector-float*! v1-33 v1-33 (/ f0-11 f1-6)) + ) + ) + ) + (vector-normalize! s1-0 1.0) + (vector-normalize! s2-1 1.0) + (let ((f0-14 (vector-dot s1-0 s2-1))) + (cond + ((and (!= (vector-length (-> this target-transv)) 0.0) + (if (logtest? (-> this status) (collide-status touch-wall)) + (< f0-14 0.9999) + (< f0-14 0.95) + ) + ) + (seek! (-> this blocked-factor) 1.0 (* 4.0 (seconds-per-frame))) + (seek! + (-> this blocked-in-air-factor) + (if (= (-> this mod-surface mode) 'air) + 1.0 + 0.0 + ) + (* 4.0 (seconds-per-frame)) + ) + (logior! (-> this status) (collide-status blocked)) + ) + (else + (seek! (-> this blocked-factor) 0.0 (* 2.0 (seconds-per-frame))) + (seek! (-> this blocked-in-air-factor) 0.0 (* 2.0 (seconds-per-frame))) + ) + ) + ) + ) + ) + (set! (-> arg0 quad) (-> s3-1 quad)) + (if (and (logtest? (-> this status) (collide-status on-surface)) + (and (not (logtest? (-> this status) (collide-status touch-wall blocked))) + (< (vector-length (-> this btransv)) (vector-length s4-1)) + ) + ) + (set! (-> this btransv quad) (-> s4-1 quad)) + ) + ) + ) + (let ((v1-67 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this align-xz-vel) 1.0)) + (f0-32 (vector-length (-> this align-xz-vel))) + ) + (set! (-> this zx-vel-frac) (if (= f0-32 0.0) + 0.0 + (fmax 0.0 (/ (vector-dot (-> this transv) v1-67) f0-32)) + ) + ) + ) + (stopwatch-stop (the-as stopwatch (&-> *collide-stats* junk 1))) + 0 + (none) + ) + +(defmethod try-snap-to-surface ((this collide-shape-moving) (arg0 vector) (arg1 float) (arg2 float) (arg3 float)) + (local-vars (at-0 int)) + (with-pp + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> gp-0 quad) (-> this trans quad)) + (vector-normalize-copy! (-> this trans) arg0 arg1) + (vector+! (-> this trans) (-> this trans) gp-0) + (update-transforms this) + (vector-normalize-copy! s2-0 arg0 (- arg2 arg1)) + (let ((v1-4 s2-0)) + (.lvf vf1 (&-> s2-0 quad)) + (let ((f0-2 (-> pp clock frames-per-second))) + (.mov at-0 f0-2) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> v1-4 quad) vf1) + ) + (set! (-> this prev-status) (-> this status)) + (logclear! (-> this status) (collide-status + on-surface + on-ground + touch-surface + touch-wall + touch-ceiling + touch-actor + on-special-surface + touch-edge + blocked + on-water + impact-surface + touch-background + stuck + glance + ) + ) + (when (not (logtest? (-> this root-prim prim-core action) (collide-action no-normal-reset))) + (let ((v1-13 (-> this dynam gravity-normal))) + (set! (-> this local-normal quad) (-> v1-13 quad)) + (set! (-> this surface-normal quad) (-> v1-13 quad)) + (set! (-> this poly-normal quad) (-> v1-13 quad)) + ) + (set! (-> this coverage) 0.0) + (set! (-> this touch-angle) 0.0) + ) + (let ((f30-0 (step-collision! this s2-0 s2-0 1.0 0))) + (update-from-step-size *touching-list* f30-0) + (cond + ((< f30-0 1.0) + (let ((s1-1 (new 'stack-no-clear 'vector)) + (s2-1 (new 'stack-no-clear 'vector)) + ) + (vector-normalize-copy! s1-1 arg0 1.0) + (vector-! s2-1 (-> this trans) gp-0) + (when (< (vector-dot s1-1 s2-1) arg3) + (vector-normalize-copy! s2-1 arg0 arg3) + (vector+! s2-1 s2-1 gp-0) + (move-to-point! this s2-1) + ) + ) + #t + ) + (else + (move-to-point! this gp-0) + #f + ) + ) + ) + ) + ) + ) + ) + +(defmethod fill-and-try-snap-to-surface ((this collide-shape-moving) (arg0 vector) (arg1 float) (arg2 float) (arg3 float) (arg4 collide-query)) + (vector-normalize-copy! (-> arg4 start-pos) arg0 arg1) + (vector+! (-> arg4 start-pos) (-> arg4 start-pos) (-> this trans)) + (vector-normalize-copy! (-> arg4 move-dist) arg0 (- arg2 arg1)) + (fill-using-line-sphere *collide-cache* arg4) + (try-snap-to-surface this arg0 arg1 arg2 arg3) + ) + +(defmethod move-to-ground-point ((this collide-shape-moving) (arg0 vector) (arg1 vector) (arg2 vector)) + (move-to-point! this arg0) + (set! (-> arg1 y) 0.0) + (set! (-> this ground-touch-point quad) (-> arg0 quad)) + (set! (-> this poly-normal quad) (-> arg2 quad)) + (set! (-> this surface-normal quad) (-> arg2 quad)) + (set! (-> this local-normal quad) (-> arg2 quad)) + (set! (-> this ground-poly-normal quad) (-> arg2 quad)) + (logior! (-> this status) (collide-status on-surface on-ground touch-surface)) + (set! (-> this ground-impact-vel) (- (vector-dot arg1 (-> this dynam gravity-normal)))) + 0 + (none) + ) + +(defmethod integrate-no-collide! ((this collide-shape-moving) (arg0 vector)) + (local-vars (at-0 int)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (update-transforms this) + (set! (-> this trans-old-old-old quad) (-> this trans-old-old quad)) + (set! (-> this trans-old-old quad) (-> this trans-old quad)) + (set! (-> this trans-old quad) (-> this trans quad)) + (set! (-> this prev-status) (-> this status)) + (logclear! (-> this status) (collide-status + on-surface + on-ground + touch-surface + touch-wall + touch-ceiling + touch-actor + on-special-surface + touch-edge + blocked + on-water + impact-surface + touch-background + stuck + glance + ) + ) + (when (not (logtest? (-> this root-prim prim-core action) (collide-action no-normal-reset))) + (let ((v1-13 (-> this dynam gravity-normal))) + (set! (-> this local-normal quad) (-> v1-13 quad)) + (set! (-> this surface-normal quad) (-> v1-13 quad)) + (set! (-> this poly-normal quad) (-> v1-13 quad)) + ) + (set! (-> this coverage) 0.0) + (set! (-> this touch-angle) 0.0) + ) + (let ((t9-1 (method-of-object this move-by-vector!)) + (a1-5 (new 'stack-no-clear 'vector)) + ) + (.lvf vf1 (&-> arg0 quad)) + (let ((f0-2 (seconds-per-frame))) + (.mov at-0 f0-2) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> a1-5 quad) vf1) + (t9-1 this a1-5) + ) + 0 + (none) + ) + ) + +(defmethod integrate-for-enemy-no-mtg ((this collide-shape-moving) (arg0 vector) (arg1 overlaps-others-params)) + (integrate-no-collide! this arg0) + (let ((s5-1 (find-overlapping-shapes this arg1))) + (if s5-1 + (move-to-point! this (-> this trans-old)) + ) + s5-1 + ) + ) + +(defmethod find-ground ((this collide-shape-moving) + (arg0 collide-query) + (arg1 collide-spec) + (arg2 float) + (arg3 float) + (arg4 float) + (arg5 process) + ) + (set! (-> this gspot-pos quad) (-> this trans quad)) + (set! (-> arg0 start-pos quad) (-> this trans quad)) + (vector-reset! (-> arg0 move-dist)) + (let ((f0-0 (-> this transv y))) + (if (< f0-0 0.0) + (set! arg2 (- arg2 (fmax -40960.0 (* f0-0 (seconds-per-frame))))) + ) + ) + (+! (-> arg0 start-pos y) arg2) + (set! (-> arg0 move-dist y) (- (+ arg2 arg3))) + (let ((v1-7 arg0)) + (set! (-> v1-7 radius) arg4) + (set! (-> v1-7 collide-with) arg1) + (set! (-> v1-7 ignore-process0) (-> this process)) + (set! (-> v1-7 ignore-process1) arg5) + (set! (-> v1-7 ignore-pat) (logior (new 'static 'pat-surface :noendlessfall #x1) (-> this pat-ignore-mask))) + (set! (-> v1-7 action-mask) (collide-action solid)) + ) + (let ((f0-10 (fill-and-probe-using-line-sphere *collide-cache* arg0))) + (cond + ((>= f0-10 0.0) + (let ((v1-11 (vector+float*! (new 'stack-no-clear 'vector) (-> arg0 start-pos) (-> arg0 move-dist) f0-10))) + (set! (-> this gspot-pos y) (- (-> v1-11 y) arg4)) + (vector-! (-> this gspot-normal) v1-11 (-> arg0 best-other-tri intersect)) + ) + (vector-normalize! (-> this gspot-normal) 1.0) + #t + ) + (else + (set! (-> this gspot-pos y) -40959590.0) + (set! (-> this gspot-normal quad) (-> *y-vector* quad)) + #f + ) + ) + ) + ) + +(defmethod above-ground? ((this collide-shape) + (arg0 collide-query) + (arg1 vector) + (arg2 collide-spec) + (arg3 float) + (arg4 float) + (arg5 float) + ) + (set! (-> arg0 start-pos quad) (-> arg1 quad)) + (+! (-> arg0 start-pos y) arg3) + (vector-reset! (-> arg0 move-dist)) + (set! (-> arg0 move-dist y) (- (+ arg3 arg4))) + (let ((v1-2 arg0)) + (set! (-> v1-2 radius) arg5) + (set! (-> v1-2 collide-with) arg2) + (set! (-> v1-2 ignore-process0) (-> this process)) + (set! (-> v1-2 ignore-process1) #f) + (set! (-> v1-2 ignore-pat) (-> this pat-ignore-mask)) + (set! (-> v1-2 action-mask) (collide-action solid)) + ) + (>= (fill-and-probe-using-line-sphere *collide-cache* arg0) 0.0) + ) + +(defmethod move-above-ground ((this collide-shape-moving) (arg0 vector) (arg1 move-above-ground-params)) + (when *debug-segment* + (let ((s3-0 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-7 'collide) + (s2-0 *profile-collide-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-7) + (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 + ) + (set! (-> arg1 on-ground?) #f) + (set! (-> arg1 do-move?) #t) + (set! (-> arg1 old-gspot-pos quad) (-> this gspot-pos quad)) + (set! (-> arg1 old-gspot-normal quad) (-> this gspot-normal quad)) + (set! (-> this trans-old-old-old quad) (-> this trans-old-old quad)) + (set! (-> this trans-old-old quad) (-> this trans-old quad)) + (set! (-> this trans-old quad) (-> this trans quad)) + (set! (-> this prev-status) (-> this status)) + (vector-v+! (-> this trans) (-> this trans) arg0) + (set! (-> arg1 new-pos quad) (-> this trans quad)) + (let ((s3-1 (new 'stack-no-clear 'collide-query))) + (cond + ((find-ground this s3-1 (-> arg1 gnd-collide-with) (-> arg1 popup) 81920.0 1024.0 (the-as process #f)) + (when (>= (-> this gspot-pos y) (-> arg1 new-pos y)) + (set! (-> arg1 on-ground?) #t) + (set! (-> arg1 pat) (-> s3-1 best-other-tri pat)) + (set! (-> arg1 new-pos y) (-> s3-1 best-other-tri intersect y)) + (set! (-> this ground-impact-vel) (- (vector-dot arg0 (-> this dynam gravity-normal)))) + (set! (-> arg0 y) 0.0) + ) + ) + (else + (if (-> arg1 hover-if-no-ground?) + (set! (-> arg1 new-pos y) (-> this trans-old y)) + ) + ) + ) + ) + (set! (-> this trans quad) (-> this trans-old quad)) + (move-to-point! this (-> arg1 new-pos)) + (when (logtest? (logand (-> arg1 overlaps-params collide-with-filter) + (collide-spec hit-by-player-list hit-by-others-list player-list) + ) + (-> this root-prim prim-core collide-with) + ) + (when (find-overlapping-shapes this (-> arg1 overlaps-params)) + (when (-> arg1 dont-move-if-overlaps?) + (set! (-> arg1 do-move?) #f) + (move-to-point! this (-> this trans-old)) + (set! (-> this gspot-pos quad) (-> arg1 old-gspot-pos quad)) + (set! (-> this gspot-normal quad) (-> arg1 old-gspot-normal quad)) + ) + ) + ) + (when (-> arg1 do-move?) + (cond + ((-> arg1 on-ground?) + (let ((a1-8 (-> this gspot-pos)) + (a0-31 (-> this gspot-normal)) + (v1-59 (-> arg1 pat)) + ) + (set! (-> this ground-touch-point quad) (-> a1-8 quad)) + (set! (-> this poly-normal quad) (-> a0-31 quad)) + (set! (-> this surface-normal quad) (-> a0-31 quad)) + (set! (-> this local-normal quad) (-> a0-31 quad)) + (set! (-> this ground-poly-normal quad) (-> a0-31 quad)) + (set! (-> this poly-pat) v1-59) + (set! (-> this cur-pat) v1-59) + (set! (-> this ground-pat) v1-59) + ) + (logior! (-> this status) (collide-status on-surface on-ground touch-surface)) + ) + (else + (logclear! (-> this status) (collide-status + on-surface + on-ground + touch-surface + touch-wall + touch-ceiling + touch-actor + on-special-surface + touch-edge + blocked + on-water + impact-surface + touch-background + stuck + glance + ) + ) + (when (not (logtest? (-> this root-prim prim-core action) (collide-action no-normal-reset))) + (let ((v1-69 (-> this dynam gravity-normal))) + (set! (-> this local-normal quad) (-> v1-69 quad)) + (set! (-> this surface-normal quad) (-> v1-69 quad)) + (set! (-> this poly-normal quad) (-> v1-69 quad)) + ) + (set! (-> this coverage) 0.0) + (set! (-> this touch-angle) 0.0) + ) + ) + ) + ) + (when *debug-segment* + (let ((gp-1 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-83 (+ (-> gp-1 depth) -1)) + (s5-1 (-> gp-1 segment v1-83)) + (s4-1 (-> gp-1 base-time)) + ) + (when (>= v1-83 0) + (set! (-> s5-1 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-1)))) + (+! (-> gp-1 depth) -1) + ) + ) + ) + ) + 0 + ) + 0 + (none) + ) + +(defmethod move-to-ground ((this collide-shape-moving) (arg0 float) (arg1 float) (arg2 symbol) (arg3 collide-spec)) + (local-vars (sv-576 profile-segment) (sv-592 int)) + (when *debug-segment* + (let ((s1-0 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-7 'collide) + (s0-0 *profile-collide-color*) + ) + (when (and *dproc* *debug-segment*) + (set! sv-576 (-> s1-0 data (-> s1-0 count))) + (set! sv-592 (-> s1-0 base-time)) + (set! (-> sv-576 name) v1-7) + (set! (-> sv-576 start-time) + (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint sv-592))) + ) + (set! (-> sv-576 depth) (the-as uint (-> s1-0 depth))) + (set! (-> sv-576 color) s0-0) + (set! (-> s1-0 segment (-> s1-0 depth)) sv-576) + (set! (-> s1-0 count) (min 1023 (+ (-> s1-0 count) 1))) + (+! (-> s1-0 depth) 1) + (set! (-> s1-0 max-depth) (max (-> s1-0 max-depth) (-> s1-0 depth))) + ) + ) + 0 + ) + (let ((s1-1 (new 'stack-no-clear 'collide-query))) + (cond + ((find-ground this s1-1 arg3 arg0 arg1 1024.0 (the-as process #f)) + (let ((a1-4 (new 'stack-no-clear 'vector))) + (set! (-> a1-4 quad) (-> this trans quad)) + (set! (-> a1-4 y) (-> s1-1 best-other-tri intersect y)) + (move-to-point! this a1-4) + ) + (let ((a1-5 (-> s1-1 best-other-tri intersect)) + (a0-21 (-> s1-1 best-other-tri normal)) + (v1-25 (-> s1-1 best-other-tri pat)) + ) + (set! (-> this ground-touch-point quad) (-> a1-5 quad)) + (set! (-> this poly-normal quad) (-> a0-21 quad)) + (set! (-> this surface-normal quad) (-> a0-21 quad)) + (set! (-> this local-normal quad) (-> a0-21 quad)) + (set! (-> this ground-poly-normal quad) (-> a0-21 quad)) + (set! (-> this poly-pat) v1-25) + (set! (-> this cur-pat) v1-25) + (set! (-> this ground-pat) v1-25) + ) + (logior! (-> this status) (collide-status on-surface on-ground touch-surface)) + #t + ) + (else + (logclear! (-> this status) (collide-status + on-surface + on-ground + touch-surface + touch-wall + touch-ceiling + touch-actor + on-special-surface + touch-edge + blocked + on-water + impact-surface + touch-background + stuck + glance + ) + ) + (when (not (logtest? (-> this root-prim prim-core action) (collide-action no-normal-reset))) + (let ((v1-36 (-> this dynam gravity-normal))) + (set! (-> this local-normal quad) (-> v1-36 quad)) + (set! (-> this surface-normal quad) (-> v1-36 quad)) + (set! (-> this poly-normal quad) (-> v1-36 quad)) + ) + (set! (-> this coverage) 0.0) + (set! (-> this touch-angle) 0.0) + ) + (if arg2 + (format 0 "WARNING: move-to-ground: failed to locate ground for ~S!~%" (-> this process name)) + ) + ) + ) + ) + (when *debug-segment* + (let ((gp-1 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-52 (+ (-> gp-1 depth) -1)) + (s5-1 (-> gp-1 segment v1-52)) + (s4-1 (-> gp-1 base-time)) + ) + (when (>= v1-52 0) + (set! (-> s5-1 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-1)))) + (+! (-> gp-1 depth) -1) + ) + ) + ) + ) + 0 + ) + (none) + ) + +(defmethod compute-acc-due-to-gravity ((this collide-shape-moving) (arg0 vector) (arg1 float)) + (let* ((s4-0 (vector-negate! (new 'stack-no-clear 'vector) (-> this dynam gravity))) + (a2-1 (-> this local-normal)) + (a2-2 (vector-reflect-flat! (new-stack-vector0) s4-0 a2-1)) + ) + (vector--float*! arg0 s4-0 a2-2 (cond + ((logtest? (-> this status) (collide-status on-surface)) + (empty) + arg1 + ) + (else + 0.0 + ) + ) + ) + ) + arg0 + ) + +(defmethod fill-cache-integrate-and-collide ((this collide-shape) (arg0 vector) (arg1 collide-query) (arg2 meters)) + (local-vars (at-0 int)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (let ((a0-1 v1-0)) + (.lvf vf1 (&-> arg0 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-1 quad) vf1) + ) + (fill-cache-for-shape this (+ (vector-length v1-0) arg2) arg1) + ) + (integrate-and-collide! this arg0) + (none) + ) + ) + +(defmethod fill-cache-for-shape ((this collide-shape) (arg0 float) (arg1 collide-query)) + (cond + ((build-bounding-box-for-shape this (-> arg1 bbox) arg0 (-> arg1 collide-with)) + (fill-using-bounding-box *collide-cache* arg1) + (if (and *display-collide-cache* (or (= (-> this process type) target) (= (-> this process) *debug-actor*))) + (debug-draw *collide-cache*) + ) + ) + (else + (reset *collide-cache*) + ) + ) + 0 + (none) + ) + +(defmethod build-bounding-box-for-shape ((this collide-shape) (arg0 bounding-box) (arg1 float) (arg2 collide-spec)) + (rlet ((vf0 :class vf) + (vf24 :class vf) + (vf25 :class vf) + (vf26 :class vf) + (vf27 :class vf) + (vf28 :class vf) + (vf29 :class vf) + (vf30 :class vf) + (vf31 :class vf) + ) + (init-vf0-vector) + (let ((t0-0 (new 'static 'vector :x 4.096)) + (v1-0 (-> this root-prim)) + ) + (.mov vf31 arg1) + (let ((a0-2 (logand (-> v1-0 prim-core collide-with) arg2)) + (a2-1 (-> v1-0 prim-core prim-type)) + ) + (b! (zero? a0-2) cfg-9 :delay (.lvf vf28 (&-> t0-0 quad))) + (.add.x.vf vf31 vf31 vf28 :mask #b1) + (let ((a0-3 (-> v1-0 specific 0))) + (b! (zero? a2-1) cfg-3 :delay (.lvf vf24 (&-> v1-0 prim-core world-sphere quad))) + (.add.w.vf vf25 vf31 vf24 :mask #b1) + (.add.x.vf vf30 vf24 vf25 :mask #b111) + (b! #t cfg-10 :delay (.sub.x.vf vf29 vf24 vf25 :mask #b111)) + (label cfg-3) + ;; og:preserve-this + (b! (zero? a0-3) cfg-9 :delay (set! v1-0 (&+ v1-0 80))) + (+! a0-3 -1) + (let ((a2-3 (logand (-> v1-0 prim-core collide-with) arg2))) + (.lvf vf24 (&-> v1-0 prim-core world-sphere quad)) + (b! (zero? a2-3) cfg-3 :delay (.add.w.vf vf25 vf31 vf24 :mask #b1)) + ) + (.add.x.vf vf30 vf24 vf25 :mask #b111) + (.sub.x.vf vf29 vf24 vf25 :mask #b111) + (label cfg-6) + ;; og:preserve-this + (b! (zero? a0-3) cfg-10 :delay (set! v1-0 (&+ v1-0 80))) + (+! a0-3 -1) + ) + ) + (let ((a2-5 (logand (-> v1-0 prim-core collide-with) arg2))) + (.lvf vf24 (&-> v1-0 prim-core world-sphere quad)) + (b! (zero? a2-5) cfg-6 :delay (.add.w.vf vf25 vf31 vf24 :mask #b1)) + ) + ) + (.add.x.vf vf27 vf24 vf25 :mask #b111) + (.sub.x.vf vf26 vf24 vf25 :mask #b111) + (.min.vf vf29 vf29 vf26) + (.max.vf vf30 vf30 vf27) + (b! #t cfg-6 :delay (nop!)) + (label cfg-9) + (let ((v0-0 #f)) + (b! #t cfg-11 :delay (nop!)) + (label cfg-10) + (.mov.vf vf29 vf0 :mask #b1000) + (.mov.vf vf30 vf0 :mask #b1000) + (.svf (&-> arg0 min quad) vf29) + (.svf (&-> arg0 max quad) vf30) + (set! v0-0 #t) + (label cfg-11) + v0-0 + ) + ) + ) + +(defmethod find-prim-by-id ((this collide-shape) (arg0 uint)) + (let ((v1-0 (-> this root-prim))) + (countdown (a0-1 (-> this total-prims)) + (if (= (-> v1-0 prim-id) arg0) + (return v1-0) + ) + (&+! v1-0 80) + ) + ) + (the-as collide-shape-prim #f) + ) + +(defmethod find-prim-by-id-logtest ((this collide-shape) (arg0 uint)) + (let ((v1-0 (-> this root-prim))) + (countdown (a0-1 (-> this total-prims)) + (if (logtest? (-> v1-0 prim-id) arg0) + (return v1-0) + ) + (&+! v1-0 80) + ) + ) + (the-as collide-shape-prim #f) + ) + +(defun-debug collide-shape-draw-debug-marks () + (add-debug-sphere + (or *display-collision-marks* *display-target-marks*) + (bucket-id debug) + (target-pos 0) + (meters 0.2) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + ) + (when *display-collision-marks* + (let ((v1-4 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((gp-1 (-> v1-4 next0))) + (while (!= v1-4 (-> *collide-player-list* alive-list-end)) + (let ((a0-4 (the-as collide-shape (-> (the-as connection v1-4) param1)))) + (if (or (not *debug-actor*) (= (-> a0-4 process) *target*) (= (-> a0-4 process) *debug-actor*)) + (debug-draw a0-4) + ) + ) + (set! v1-4 gp-1) + *collide-player-list* + (set! gp-1 (-> gp-1 next0)) + ) + ) + ) + (let ((v1-15 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((gp-2 (-> v1-15 next0))) + (while (!= v1-15 (-> *collide-hit-by-player-list* alive-list-end)) + (let ((a0-11 (the-as collide-shape (-> (the-as connection v1-15) param1)))) + (if (or (not *debug-actor*) (= (-> a0-11 process) *target*) (= (-> a0-11 process) *debug-actor*)) + (debug-draw a0-11) + ) + ) + (set! v1-15 gp-2) + *collide-hit-by-player-list* + (set! gp-2 (-> gp-2 next0)) + ) + ) + ) + (let ((v1-26 (-> *collide-hit-by-others-list* alive-list next0))) + *collide-hit-by-others-list* + (let ((gp-3 (-> v1-26 next0))) + (while (!= v1-26 (-> *collide-hit-by-others-list* alive-list-end)) + (let ((a0-18 (the-as collide-shape (-> (the-as connection v1-26) param1)))) + (if (or (not *debug-actor*) (= (-> a0-18 process) *target*) (= (-> a0-18 process) *debug-actor*)) + (debug-draw a0-18) + ) + ) + (set! v1-26 gp-3) + *collide-hit-by-others-list* + (set! gp-3 (-> gp-3 next0)) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod debug-draw ((this collide-shape)) + (if (sphere-in-view-frustum? (the-as sphere (-> this root-prim prim-core))) + (debug-draw (-> this root-prim)) + ) + 0 + (none) + ) + +(define *col-timer* (new 'global 'stopwatch)) + +(define *frame-timer* (new 'global 'stopwatch)) + +(define *col-timer-enable* #t) + +(defun debug-report-col-stats () + (when *col-timer-enable* + (stopwatch-end *frame-timer*) + (format *stdcon* "col stats:~%") + (format *stdcon* " col ~F ms~%" (* 1000.0 (stopwatch-elapsed-seconds *col-timer*))) + (format *stdcon* " frame ~F ms~%" (* 1000.0 (stopwatch-elapsed-seconds *frame-timer*))) + (stopwatch-init *col-timer*) + (stopwatch-init *frame-timer*) + (stopwatch-begin *frame-timer*) + ) + ) + +(defmethod update-transforms ((this collide-shape)) + (local-vars (v1-8 float) (a1-5 float) (a1-7 float)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (-> this root-prim)) + (v1-1 (-> this process node-list)) + ) + (cond + ((nonzero? v1-1) + (countdown (a0-1 (-> this total-prims)) + (let ((a1-0 (-> s5-0 transform-index))) + (cond + ((>= a1-0 0) + (let ((a1-4 (-> v1-1 data a1-0 bone transform))) + (.lvf vf5 (&-> a1-4 trans quad)) + (.lvf vf1 (&-> s5-0 local-sphere quad)) + (.lvf vf2 (&-> a1-4 rvec quad)) + (.mul.w.vf acc vf5 vf0) + (.div.vf Q vf0 vf5 :fsf #b11 :ftf #b11) + (.lvf vf3 (&-> a1-4 uvec quad)) + (.add.mul.x.vf acc vf2 vf1 acc) + (.lvf vf4 (&-> a1-4 fvec quad)) + ) + (.add.mul.y.vf acc vf3 vf1 acc) + (.add.mul.z.vf vf1 vf4 vf1 acc :mask #b111) + (.mul.vf vf1 vf1 Q :mask #b111) + (.svf (&-> s5-0 prim-core world-sphere quad) vf1) + (.mov a1-5 vf1) + ) + (else + (when (= a1-0 -2) + (.lvf vf1 (&-> s5-0 local-sphere quad)) + (.lvf vf2 (&-> this trans quad)) + (.add.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> s5-0 prim-core world-sphere quad) vf1) + (.mov a1-7 vf1) + ) + ) + ) + ) + (&+! s5-0 80) + ) + ) + (else + (countdown (s4-0 (-> this total-prims)) + (case (-> s5-0 transform-index) + ((-3) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (vector-orient-by-quat! s3-0 (-> s5-0 local-sphere) (-> this quat)) + (vector+! (the-as vector (-> s5-0 prim-core)) s3-0 (-> this trans)) + ) + (set! (-> s5-0 prim-core world-sphere w) (-> s5-0 local-sphere w)) + ) + ((-2) + (.lvf vf1 (&-> s5-0 local-sphere quad)) + (.lvf vf2 (&-> this trans quad)) + (.add.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> s5-0 prim-core world-sphere quad) vf1) + (.mov v1-8 vf1) + ) + ) + (&+! s5-0 80) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod move-by-vector! ((this collide-shape) (arg0 vector)) + (vector+! (-> this trans) (-> this trans) arg0) + (let ((v1-1 (-> this root-prim))) + (countdown (a0-1 (-> this total-prims)) + (vector+! (the-as vector (-> v1-1 prim-core)) (the-as vector (-> v1-1 prim-core)) arg0) + (set! (-> v1-1 prim-core world-sphere w) (-> v1-1 local-sphere w)) + (&+! v1-1 80) + ) + ) + 0 + (none) + ) + +(defmethod move-to-point! ((this collide-shape) (arg0 vector)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (vector-! v1-0 arg0 (-> this trans)) + (set! (-> this trans quad) (-> arg0 quad)) + (let ((a1-2 (-> this root-prim))) + (countdown (a0-1 (-> this total-prims)) + (vector+! (the-as vector (-> a1-2 prim-core)) (the-as vector (-> a1-2 prim-core)) v1-0) + (set! (-> a1-2 prim-core world-sphere w) (-> a1-2 local-sphere w)) + (&+! a1-2 80) + ) + ) + ) + 0 + (none) + ) + +(defmethod set-collide-with! ((this collide-shape) (arg0 collide-spec)) + (let ((v1-0 (-> this root-prim))) + (countdown (a0-1 (-> this total-prims)) + (set! (-> v1-0 prim-core collide-with) arg0) + (nop!) + (nop!) + (&+! v1-0 80) + ) + ) + 0 + (none) + ) + +(defmethod set-collide-as! ((this collide-shape) (arg0 collide-spec)) + (let ((v1-0 (-> this root-prim))) + (countdown (a0-1 (-> this total-prims)) + (set! (-> v1-0 prim-core collide-as) arg0) + (nop!) + (nop!) + (&+! v1-0 80) + ) + ) + 0 + (none) + ) + +(defmethod iterate-prims ((this collide-shape) (arg0 (function collide-shape-prim none))) + (let ((s5-0 (-> this root-prim))) + (countdown (s4-0 (-> this total-prims)) + (arg0 s5-0) + (&+! s5-0 80) + ) + ) + 0 + (none) + ) + +(defmethod find-collision-meshes ((this collide-shape)) + (let ((s5-0 (-> this root-prim)) + (s4-0 0) + ) + (let ((v1-0 (-> s5-0 prim-core prim-type))) + (cond + ((= v1-0 1) + (set! s4-0 1) + ) + ((zero? v1-0) + (set! s4-0 (the-as int (-> s5-0 specific 1))) + (&+! s5-0 80) + ) + ) + ) + (when (nonzero? s4-0) + (let ((s3-0 0)) + (let ((v1-7 (-> this process draw)) + (s2-0 (the-as (array collide-mesh) #f)) + ) + (when (and (nonzero? v1-7) (-> v1-7 jgeo)) + (set! s2-0 (res-lump-struct (-> v1-7 jgeo extra) 'collide-mesh-group (array collide-mesh))) + (when s2-0 + (countdown (s1-0 s4-0) + (when (= (-> s5-0 prim-core prim-type) 1) + (let ((s0-0 (-> (the-as collide-shape-prim-mesh s5-0) mesh-id))) + (cond + ((and (>= s0-0 0) (< s0-0 (length s2-0))) + (set! (-> (the-as collide-shape-prim-mesh s5-0) mesh) (-> s2-0 s0-0)) + ) + (else + (set! (-> (the-as collide-shape-prim-mesh s5-0) mesh) #f) + (+! s3-0 1) + ) + ) + ) + ) + (set! s5-0 (&+ (the-as collide-shape-prim-mesh s5-0) 80)) + ) + ) + ) + (when (not s2-0) + (while (nonzero? s4-0) + (+! s4-0 -1) + (when (= (-> (the-as collide-shape-prim-mesh s5-0) prim-core prim-type) 1) + (set! (-> (the-as collide-shape-prim-mesh s5-0) mesh) #f) + (+! s3-0 1) + ) + (set! s5-0 (&+ (the-as collide-shape-prim-mesh s5-0) 80)) + ) + ) + ) + (if (nonzero? s3-0) + (format 0 "ERROR: Failed to find collision meshes for ~D prim(s) in ~A!~%" s3-0 (-> this process name)) + ) + ) + ) + ) + (update-transforms this) + 0 + (none) + ) + +(defmethod debug-draw ((this collide-shape-prim)) + (add-debug-sphere + #t + (bucket-id debug) + (the-as vector (-> this prim-core)) + (-> this local-sphere w) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x40) + ) + 0 + (none) + ) + +(defmethod debug-draw ((this collide-shape-prim-sphere)) + (add-debug-sphere + #t + (bucket-id debug) + (the-as vector (-> this prim-core)) + (-> this local-sphere w) + (cond + ((and (zero? (-> this prim-core collide-as)) (zero? (-> this prim-core collide-with))) + (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x40) + ) + ((logtest? (-> this prim-core action) (collide-action solid)) + (new 'static 'rgba :r #xff :g #xff :a #x40) + ) + (else + (new 'static 'rgba :r #xff :g #x80 :a #x40) + ) + ) + ) + 0 + (none) + ) + +(defmethod debug-draw ((this collide-shape-prim-mesh)) + (add-debug-sphere + #t + (bucket-id debug) + (the-as vector (-> this prim-core)) + (-> this local-sphere w) + (new 'static 'rgba :b #xff :a #x40) + ) + 0 + (none) + ) + +(defmethod debug-draw ((this collide-shape-prim-group)) + (add-debug-sphere + #t + (bucket-id debug) + (the-as vector (-> this prim-core)) + (-> this local-sphere w) + (new 'static 'rgba :g #xff :a #x10) + ) + (countdown (s5-0 (-> this num-children)) + (debug-draw (-> this child s5-0)) + ) + 0 + (none) + ) + +(defmethod do-push-aways ((this collide-shape)) + (local-vars (at-0 int) (v1-55 float) (a2-5 float) (a2-12 float)) + (with-pp + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (new 'stack-no-clear 'do-push-aways-work))) + (set! (-> gp-0 cspec) (collide-spec)) + (let ((s4-0 (-> this root-prim prim-core collide-with))) + (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) + ) + ) + (when (logtest? s4-0 (collide-spec player-list)) + (let ((a0-2 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((v1-13 (-> 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? s4-0 (-> a1-1 prim-core collide-as)) + (let ((a1-2 (-> a1-1 prim-core))) + (let ((a2-4 a1-2) + (a3-2 (-> this root-prim prim-core)) + ) + (.lvf vf2 (&-> a2-4 world-sphere quad)) + (.lvf vf3 (&-> a3-2 world-sphere 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 root-prim prim-core world-sphere w))) + ) + (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-13) + *collide-player-list* + (set! v1-13 (-> v1-13 next0)) + ) + ) + ) + ) + (when (logtest? s4-0 (collide-spec hit-by-player-list)) + (let ((a0-5 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((v1-21 (-> a0-5 next0))) + (while (!= a0-5 (-> *collide-hit-by-player-list* alive-list-end)) + (let* ((a0-6 (-> (the-as connection a0-5) param1)) + (a1-14 (-> (the-as collide-shape-moving a0-6) root-prim)) + ) + (when (logtest? s4-0 (-> a1-14 prim-core collide-as)) + (let ((a1-15 (-> a1-14 prim-core))) + (let ((a2-11 a1-15) + (a3-4 (-> this root-prim prim-core)) + ) + (.lvf vf2 (&-> a2-11 world-sphere quad)) + (.lvf vf3 (&-> a3-4 world-sphere 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-15 world-sphere w) (-> this root-prim prim-core world-sphere w))) + ) + (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-21) + *collide-hit-by-player-list* + (set! v1-21 (-> v1-21 next0)) + ) + ) + ) + ) + (dotimes (s3-0 *actor-list-length*) + (let* ((s1-0 (-> *actor-list* s3-0)) + (s2-0 (-> s1-0 root-prim)) + ) + (when (logtest? s4-0 (-> s2-0 prim-core collide-as)) + (when (!= (-> this process) (-> s1-0 process)) + (when (and (should-push-away this s1-0 (-> gp-0 cquery)) (>= -81.92 (-> gp-0 cquery best-dist))) + (set! (-> gp-0 cquery collide-with) (-> s1-0 root-prim prim-core collide-with)) + (set! (-> gp-0 cquery ignore-process0) (-> s1-0 process)) + (set! (-> gp-0 cquery ignore-process1) #f) + (set! (-> gp-0 cquery ignore-pat) (-> s1-0 pat-ignore-mask)) + (set! (-> gp-0 cquery action-mask) (collide-action solid)) + (-> gp-0 cquery) + (fill-cache-for-shape s1-0 8192.0 (-> gp-0 cquery)) + (let ((s4-1 3)) + (until (or (<= s4-1 0) (not (should-push-away this s1-0 (-> gp-0 cquery)))) + (set! (-> gp-0 vec33 quad) (-> s1-0 trans quad)) + (let* ((f0-4 (+ 2867.2 (-> gp-0 vec33 y))) + (f2-2 (+ 5734.4 f0-4)) + (f1-11 (-> gp-0 cquery best-other-tri intersect y)) + ) + (cond + ((< f1-11 f0-4) + (set! f1-11 f0-4) + ) + ((< f2-2 f1-11) + (set! f1-11 f2-2) + ) + ) + (set! (-> gp-0 vec33 y) f1-11) + ) + (.lvf vf4 (&-> (-> gp-0 vec33) quad)) + (.lvf vf3 (&-> (-> gp-0 cquery) best-other-tri intersect quad)) + (.lvf vf5 (&-> (-> gp-0 cquery) best-other-tri normal quad)) + (.sub.vf vf2 vf4 vf3) + (.mul.vf vf1 vf5 vf2) + (.add.x.vf vf1 vf1 vf1 :mask #b10) + (.add.z.vf vf1 vf1 vf1 :mask #b10) + (.mov v1-55 vf1) + (b! (< (the-as int v1-55) 0) cfg-35 :likely-delay (.sub.vf vf2 vf0 vf2)) + (label cfg-35) + (.svf (&-> (-> gp-0 push-vel) quad) vf2) + (vector-normalize! (-> gp-0 push-vel) 1.0) + (vector-float*! (-> gp-0 push-vel) (-> gp-0 push-vel) (- (-> gp-0 cquery best-dist))) + (let ((v1-59 (-> gp-0 push-vel))) + (.lvf vf1 (&-> (-> gp-0 push-vel) quad)) + (let ((f0-7 (-> pp clock frames-per-second))) + (.mov at-0 f0-7) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> v1-59 quad) vf1) + ) + (let ((s0-0 (-> (the-as collide-shape-moving s1-0) status))) + (integrate-and-collide! (the-as collide-shape-moving s1-0) (-> gp-0 push-vel)) + (set! (-> (the-as collide-shape-moving s1-0) status) s0-0) + ) + (+! s4-1 -1) + ) + (if (zero? s4-1) + (logior! (-> gp-0 cspec) (-> s2-0 prim-core collide-as)) + ) + ) + (set! s4-0 (-> this root-prim prim-core collide-with)) + ) + ) + ) + ) + ) + ) + (-> gp-0 cspec) + ) + ) + ) + ) + +;; WARN: Return type mismatch object vs symbol. +(defmethod find-overlapping-shapes ((this collide-shape) (arg0 overlaps-others-params)) + (local-vars (a0-10 float) (a0-14 uint) (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) + (let ((gp-0 (the-as object #f))) + (let* ((s3-0 (-> this root-prim)) + (s2-0 (the-as uint (logand (-> s3-0 prim-core collide-with) (-> arg0 collide-with-filter)))) + ) + (set! (-> arg0 filtered-root-collide-with) (the-as collide-spec s2-0)) + (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) + ) + (label cfg-2) + (b! (not (logtest? (the-as collide-spec s2-0) 1024)) cfg-11 :delay (empty-form)) + (let ((a0-3 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((v1-12 (-> a0-3 next0))) + (b! #t cfg-9 :delay (nop!)) + (label cfg-4) + (let ((a0-4 (-> (the-as connection a0-3) param1))) + (let ((a1-2 (-> (the-as collide-shape a0-4) root-prim))) + (b! (not (logtest? (the-as collide-spec s2-0) (-> a1-2 prim-core collide-as))) cfg-8 :delay (empty-form)) + (let ((a1-3 (-> a1-2 prim-core))) + (let ((a2-4 a1-3) + (a3-1 (-> s3-0 prim-core)) + ) + (.lvf vf2 (&-> a2-4 world-sphere quad)) + (.lvf vf3 (&-> a3-1 world-sphere 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-3 world-sphere w) (-> s3-0 prim-core world-sphere w))) + ) + (b! (>= f0-0 (* f1-1 f1-1)) cfg-8 :delay #f) + ) + ) + ) + (b! (>= *actor-list-length* 256) cfg-8 :delay #f) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-4)) + ) + (set! *actor-list-length* (+ *actor-list-length* 1)) + (label cfg-8) + (set! a0-3 v1-12) + *collide-player-list* + (set! v1-12 (-> v1-12 next0)) + ) + (label cfg-9) + (b! (!= a0-3 (-> *collide-player-list* alive-list-end)) cfg-4 :delay (nop!)) + ) + (label cfg-11) + (b! (not (logtest? (the-as collide-spec s2-0) 256)) cfg-20 :delay (empty-form)) + (let ((a0-6 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((v1-20 (-> a0-6 next0))) + (b! #t cfg-18 :delay (nop!)) + (label cfg-13) + (let ((a0-7 (-> (the-as connection a0-6) param1))) + (let ((a1-14 (-> (the-as collide-shape-moving a0-7) root-prim))) + (b! (not (logtest? (the-as collide-spec s2-0) (-> a1-14 prim-core collide-as))) cfg-17 :delay (empty-form)) + (let ((a1-15 (-> a1-14 prim-core))) + (let ((a2-11 a1-15) + (a3-2 (-> s3-0 prim-core)) + ) + (.lvf vf2 (&-> a2-11 world-sphere quad)) + (.lvf vf3 (&-> a3-2 world-sphere 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-15 world-sphere w) (-> s3-0 prim-core world-sphere w))) + ) + (b! (>= f0-1 (* f1-5 f1-5)) cfg-17 :delay #f) + ) + ) + ) + (b! (>= *actor-list-length* 256) cfg-17 :delay #f) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-7)) + ) + (set! *actor-list-length* (+ *actor-list-length* 1)) + (label cfg-17) + (set! a0-6 v1-20) + *collide-hit-by-player-list* + (set! v1-20 (-> v1-20 next0)) + ) + (label cfg-18) + (b! (!= a0-6 (-> *collide-hit-by-player-list* alive-list-end)) cfg-13 :delay (nop!)) + ) + (label cfg-20) + (let ((s1-0 0)) + (b! #t cfg-30 :delay (nop!)) + (label cfg-21) + (let ((s0-0 (-> *actor-list* s1-0))) + (let ((a2-15 (-> s0-0 root-prim))) + (b! (not (logtest? (the-as collide-spec s2-0) (-> a2-15 prim-core collide-as))) cfg-29 :delay (empty-form)) + (.lvf vf1 (&-> s3-0 prim-core world-sphere quad)) + (.lvf vf2 (&-> a2-15 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) + (let ((v1-28 (-> this process))) + (.mov a0-10 vf3) + (let ((a1-26 (-> s0-0 process))) + (b! (< f0-2 a0-10) cfg-28) + (b! (= v1-28 a1-26) cfg-28 :delay (nop!)) + ) + ) + ) + (let ((v1-30 (overlaps-others-test s3-0 arg0 a2-15))) + (.lvf vf1 (&-> s3-0 prim-core world-sphere quad)) + (b! (= v1-30 #f) cfg-28 :delay (set! s2-0 (the-as uint (-> arg0 filtered-root-collide-with)))) + ) + ) + (let ((a0-12 (-> (the-as (pointer uint64) arg0) 0)) + (v1-31 (-> this penetrate-using)) + ) + (b! (not (logtest? a0-12 4)) cfg-27 :delay (set! a0-14 (the-as uint (-> arg0 tlist)))) + (b! (logtest? (-> s0-0 penetrated-by) v1-31) cfg-28 :delay (nop!)) + ) + ) + (label cfg-27) + (b! (= a0-14 #f) cfg-32 :delay (set! gp-0 0)) + (label cfg-28) + 0 + (label cfg-29) + (+! s1-0 1) + (label cfg-30) + (b! (< s1-0 *actor-list-length*) cfg-21) + ) + ) + (label cfg-32) + (b! (= (the-as uint gp-0) #f) cfg-34 :delay (nop!)) + (set! gp-0 #t) + (label cfg-34) + (the-as symbol gp-0) + ) + ) + ) + +(defmethod overlaps-others-test ((this collide-shape-prim) (arg0 overlaps-others-params) (arg1 collide-shape-prim)) + (format 0 "ERROR: Unsupported call to collide-shape-prim::overlaps-others-test!~%") + #f + ) + +;; WARN: Return type mismatch object vs symbol. +(defmethod overlaps-others-test ((this collide-shape-prim-group) (arg0 overlaps-others-params) (arg1 collide-shape-prim)) + (local-vars (a0-3 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 (the-as collide-shape-prim this)) + (v1-0 (-> arg1 prim-core collide-as)) + (s2-0 (the-as object #f)) + ) + (let ((a1-1 (-> arg0 collide-with-filter))) + (nop!) + (let ((s3-0 (-> this num-children)) + (v1-1 (logand v1-0 a1-1)) + ) + (.lvf vf1 (&-> arg1 prim-core world-sphere quad)) + (nop!) + (set! (-> arg0 filtered-other-collide-as) v1-1) + (label cfg-1) + ;; og:preserve-this + (b! (zero? s3-0) cfg-6 :delay (set! s4-0 (&+ s4-0 80))) + (+! s3-0 -1) + (let ((a0-2 (logand (-> s4-0 prim-core collide-with) v1-1))) + (.lvf vf2 (&-> s4-0 prim-core world-sphere quad)) + (b! (zero? a0-2) cfg-1 :delay (.sub.vf vf3 vf2 vf1)) + ) + (.add.w.vf vf4 vf2 vf1 :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-0 0.0)) + (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.mov a0-3 vf3) + (b! (< f0-0 a0-3) cfg-1) + ) + (let ((a0-5 (overlaps-others-test s4-0 arg0 arg1))) + (set! v1-1 (-> arg0 filtered-other-collide-as)) + (b! (= a0-5 #f) cfg-1 :delay (.lvf vf1 (&-> arg1 prim-core world-sphere quad))) + ) + ) + ) + (b! (!= (-> arg0 tlist) #f) cfg-1 :delay (set! s2-0 0)) + (label cfg-6) + (b! (= (the-as uint s2-0) #f) cfg-8 :delay (nop!)) + (set! s2-0 #t) + (label cfg-8) + (the-as symbol s2-0) + ) + ) + ) + +;; WARN: Return type mismatch object vs symbol. +(defmethod overlaps-others-group ((this collide-shape-prim) (arg0 overlaps-others-params) (arg1 collide-shape-prim-group)) + (local-vars (a0-4 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 (the-as collide-shape-prim arg1)) + (v1-0 (-> this prim-core collide-with)) + ) + (nop!) + (let ((a0-1 (-> arg0 collide-with-filter))) + (nop!) + (let ((s3-0 (-> arg1 num-children)) + (v1-1 (logand v1-0 a0-1)) + ) + (.lvf vf2 (&-> this prim-core world-sphere quad)) + (let ((s2-0 (the-as object #f))) + (set! (-> arg0 filtered-child-collide-with) v1-1) + (label cfg-1) + ;; og:preserve-this + (b! (zero? s3-0) cfg-6 :delay (set! s4-0 (&+ s4-0 80))) + (+! s3-0 -1) + (let ((a0-3 (logand v1-1 (-> s4-0 prim-core collide-as)))) + (.lvf vf1 (&-> s4-0 prim-core world-sphere quad)) + (b! (zero? a0-3) cfg-1 :delay (.sub.vf vf3 vf2 vf1)) + ) + (.add.w.vf vf4 vf2 vf1 :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-0 0.0)) + (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.mov a0-4 vf3) + (b! (< f0-0 a0-4) cfg-1) + ) + (let ((a0-6 (overlaps-others-test this arg0 s4-0))) + (set! v1-1 (-> arg0 filtered-child-collide-with)) + (b! (= a0-6 #f) cfg-1 :delay (.lvf vf2 (&-> this prim-core world-sphere quad))) + ) + (b! (!= (-> arg0 tlist) #f) cfg-1 :delay (set! s2-0 0)) + (label cfg-6) + (b! (= (the-as uint s2-0) #f) cfg-8 :delay (nop!)) + (set! s2-0 #t) + (label cfg-8) + (the-as symbol s2-0) + ) + ) + ) + ) + ) + ) + +(defmethod overlaps-others-test ((this collide-shape-prim-sphere) (arg0 overlaps-others-params) (arg1 collide-shape-prim)) + (local-vars (v1-11 uint) (s4-0 uint)) + (let ((v1-0 (-> arg1 prim-core prim-type))) + (b! (nonzero? v1-0) cfg-2 :delay (set! s4-0 (the-as uint (-> arg0 options)))) + (let ((v0-1 (overlaps-others-group this arg0 (the-as collide-shape-prim-group arg1)))) + (b! #t cfg-17 :delay (nop!)) + (label cfg-2) + (b! (> v1-0 0) cfg-4 :delay (nop!)) + (b! #t cfg-11 :delay (logand s4-0 2)) + (label cfg-4) + (b! (nonzero? 0) cfg-11 :delay (nop!)) + (let ((s2-0 (-> (the-as collide-shape-prim-mesh arg1) mesh))) + (b! (not s2-0) cfg-10 :delay (empty-form)) + (let ((v1-5 (populate-for-prim-mesh *collide-mesh-cache* (the-as collide-shape-prim-mesh arg1)))) + (when v1-5 + (when (overlap-test s2-0 (the-as collide-mesh-cache-tri (-> v1-5 tris)) (the-as vector (-> this prim-core))) + (b! #t cfg-11 :delay (nop!)) + (the-as none 0) + ) + ) + ) + ) + (label cfg-10) + (set! v0-1 #f) + (b! #t cfg-17 :delay (nop!)) + (label cfg-11) + (let ((a0-8 (-> arg0 tlist))) + (b! (= a0-8 #f) cfg-13 :delay (nop!)) + (add-touching-prims a0-8 this arg1 -1.0 (the-as collide-tri-result #f) (the-as collide-tri-result #f)) + ) + (label cfg-13) + (b! (not (logtest? s4-0 1)) cfg-16 :delay (set! v1-11 (the-as uint (-> this prim-core action)))) + (let ((a0-9 (-> arg1 prim-core action))) + (b! (logtest? (the-as collide-action (logand v1-11 1)) a0-9) cfg-16 :delay (nop!)) + ) + (set! v0-1 #f) + (b! #t cfg-17 :delay (nop!)) + (label cfg-16) + (set! v0-1 #t) + (label cfg-17) + v0-1 + ) + ) + ) + +(defmethod overlaps-others-test ((this collide-shape-prim-mesh) (arg0 overlaps-others-params) (arg1 collide-shape-prim)) + (local-vars (v1-3 uint) (v1-11 uint) (s4-0 uint)) + (let ((v1-0 (-> arg1 prim-core prim-type))) + (b! (nonzero? v1-0) cfg-2 :delay (set! s4-0 (the-as uint (-> arg0 options)))) + (let ((v0-1 (overlaps-others-group this arg0 (the-as collide-shape-prim-group arg1)))) + (b! #t cfg-18 :delay (nop!)) + (label cfg-2) + (b! (> v1-0 0) cfg-10 :delay (set! v1-3 (logand s4-0 2))) + (b! (nonzero? v1-3) cfg-12 :delay (nop!)) + (let ((s2-0 (-> this mesh))) + (b! (not s2-0) cfg-9 :delay (empty-form)) + (let ((v1-5 (populate-for-prim-mesh *collide-mesh-cache* this))) + (b! (not v1-5) cfg-9 :delay (empty-form)) + (b! + (not (overlap-test s2-0 (the-as collide-mesh-cache-tri (-> v1-5 tris)) (the-as vector (-> arg1 prim-core)))) + cfg-9 + :delay (empty-form) + ) + ) + ) + (b! #t cfg-12 :delay (nop!)) + (the-as none 0) + (label cfg-9) + (set! v0-1 #f) + (b! #t cfg-18 :delay (nop!)) + (label cfg-10) + (b! (nonzero? v1-3) cfg-12 :delay (nop!)) + (format + 0 + "ERROR: Unsupported mesh -> mesh test attempted in collide-shape-prim-mesh::overlaps-others-test!~%" + ) + (set! v0-1 #f) + (b! #t cfg-18 :delay (nop!)) + (label cfg-12) + (let ((a0-9 (-> arg0 tlist))) + (b! (= a0-9 #f) cfg-14 :delay (nop!)) + (add-touching-prims a0-9 this arg1 -1.0 (the-as collide-tri-result #f) (the-as collide-tri-result #f)) + ) + (label cfg-14) + (b! (not (logtest? s4-0 1)) cfg-17 :delay (set! v1-11 (the-as uint (-> this prim-core action)))) + (let ((a0-10 (-> arg1 prim-core action))) + (b! (logtest? (the-as collide-action (logand v1-11 1)) a0-10) cfg-17 :delay (nop!)) + ) + (set! v0-1 #f) + (b! #t cfg-18 :delay (nop!)) + (label cfg-17) + (set! v0-1 #t) + (label cfg-18) + v0-1 + ) + ) + ) + +(defmethod modify-collide-as! ((this collide-shape) (arg0 int) (arg1 collide-spec) (arg2 collide-spec)) + (let ((v1-0 (-> this root-prim))) + (countdown (a0-1 (-> this total-prims)) + (if (logtest? (-> v1-0 prim-id) arg0) + (set! (-> v1-0 prim-core collide-as) (logior (logclear (-> v1-0 prim-core collide-as) arg1) arg2)) + ) + (&+! v1-0 80) + ) + ) + 0 + (none) + ) + +(defmethod send-shoves ((this collide-shape) (arg0 process) (arg1 touching-shapes-entry) (arg2 float) (arg3 float) (arg4 float)) + (local-vars (sv-144 process) (sv-160 collide-shape-prim) (sv-176 vector)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (when arg1 + (let ((s0-0 (-> arg1 head))) + (set! sv-144 arg0) + (let ((gp-0 (if (type? sv-144 process-focusable) + sv-144 + ) + ) + ) + (when (and s0-0 gp-0) + (while s0-0 + (set! sv-160 (get-touched-prim s0-0 this arg1)) + (get-touched-prim s0-0 (the-as collide-shape (-> (the-as process-drawable gp-0) root)) arg1) + (when (logtest? (-> sv-160 prim-core action) (collide-action no-standon)) + (let ((v1-12 (touching-prims-entry-method-9 s0-0 (new 'stack-no-clear 'vector)))) + (set! sv-176 (new 'stack-no-clear 'vector)) + (let ((a0-7 (-> sv-160 prim-core))) + (.lvf vf4 (&-> v1-12 quad)) + (.lvf vf5 (&-> a0-7 world-sphere quad)) + ) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-176 quad) vf6) + (vector-normalize! sv-176 1.0) + (when (and (< arg2 (-> sv-176 y)) (and (not (focus-test? (the-as process-focusable gp-0) dead hit board mech)) + (< (-> (the-as process-focusable gp-0) root transv y) 4.096) + ) + ) + (let ((s2-1 (new 'stack-no-clear 'vector))) + (set! (-> s2-1 quad) (-> (the-as process-focusable gp-0) root transv quad)) + (let* ((v1-26 (-> (the-as process-focusable gp-0) root transv)) + (f30-0 (sqrtf (+ (* (-> v1-26 x) (-> v1-26 x)) (* (-> v1-26 z) (-> v1-26 z))))) + ) + (if (= f30-0 0.0) + (set! (-> s2-1 quad) (-> (vector-z-quaternion! s2-1 (-> (the-as process-focusable gp-0) root quat)) quad)) + ) + (vector-xz-normalize! s2-1 (fmax f30-0 arg4)) + ) + (set! (-> s2-1 y) arg3) + (send-event + gp-0 + 'shove + arg1 + (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (vector s2-1) + (angle 'jump) + ) + ) + ) + ) + (return #t) + ) + ) + (set! s0-0 (-> s0-0 next)) + ) + ) + ) + ) + ) + #f + ) + ) + +;; WARN: Return type mismatch int vs vector. +(defmethod shove-to-closest-point-on-path ((this collide-shape) (arg0 attack-info) (arg1 float)) + (set! (-> arg0 shove-up) arg1) + (let* ((s3-0 (-> this process path)) + (s2-0 (-> s3-0 curve num-cverts)) + (s4-0 (target-pos 0)) + (s1-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (let ((f30-0 -1.0)) + (dotimes (s0-0 s2-0) + (get-point-in-path! s3-0 s1-0 (the float s0-0) 'interp) + (let ((f0-3 (vector-vector-distance-squared s4-0 s1-0))) + (when (or (< f30-0 0.0) (< f0-3 f30-0)) + (set! f30-0 f0-3) + (set! (-> s5-0 quad) (-> s1-0 quad)) + ) + ) + ) + ) + (vector-! (-> arg0 vector) s5-0 s4-0) + ) + (the-as vector 0) + ) diff --git a/goal_src/jak3/engine/collide/collide-target-h.gc b/goal_src/jak3/engine/collide/collide-target-h.gc index 46d188c876..d01e7183e5 100644 --- a/goal_src/jak3/engine/collide/collide-target-h.gc +++ b/goal_src/jak3/engine/collide/collide-target-h.gc @@ -228,6 +228,6 @@ (last-nonzero-input-dir-targ quaternion :inline :offset 6384) (time-of-last-wall-hide-first-check-pass time-frame :offset 6400) (time-of-first-wall-hide-first-check-pass time-frame :offset 6408) - (pad uint8 4) + (unknown-float0000 float :offset 6416) ) ) diff --git a/goal_src/jak3/engine/collide/collide-touch-h.gc b/goal_src/jak3/engine/collide/collide-touch-h.gc index 2705cd142b..b2a8d9b39f 100644 --- a/goal_src/jak3/engine/collide/collide-touch-h.gc +++ b/goal_src/jak3/engine/collide/collide-touch-h.gc @@ -27,10 +27,10 @@ Potentially also stores the triangle that is involved." (prim2 touching-prim :inline) ) (:methods - (touching-prims-entry-method-9 () none) - (touching-prims-entry-method-10 () none) - (touching-prims-entry-method-11 () none) - (touching-prims-entry-method-12 () none) + (touching-prims-entry-method-9 (_type_ vector) vector) + (get-middle-of-bsphere-overlap (_type_ vector) vector) + (get-touched-prim (_type_ collide-shape touching-shapes-entry) collide-shape-prim) + (get-touched-tri (_type_ collide-shape touching-shapes-entry) collide-tri-result) ) ) @@ -42,10 +42,10 @@ Potentially also stores the triangle that is involved." ) (:methods (new (symbol type) _type_) - (touching-prims-entry-pool-method-9 () none) - (touching-prims-entry-pool-method-10 () none) + (alloc-node (_type_) touching-prims-entry) + (get-free-node-count (_type_) int) (init-list! (_type_) none) - (touching-prims-entry-pool-method-12 () none) + (free-node (_type_ touching-prims-entry) touching-prims-entry) ) ) @@ -97,10 +97,10 @@ storing a record of the primitives involved." (:methods (get-head (_type_) touching-prims-entry) (get-next (_type_ touching-shapes-entry) touching-prims-entry) - (touching-shapes-entry-method-11 () none) + (get-touched-shape (_type_ collide-shape) collide-shape) (prims-touching? (_type_ collide-shape uint) touching-prims-entry) (prims-touching-action? (_type_ collide-shape collide-action collide-action) basic) - (touching-shapes-entry-method-14 () none) + (free-touching-prims-list (_type_) none) ) ) @@ -113,11 +113,11 @@ storing a record of the primitives involved." ) (:methods (new (symbol type) _type_) - (touching-list-method-9 () none) - (touching-list-method-10 () none) - (touching-list-method-11 () none) - (touching-list-method-12 () none) - (touching-list-method-13 () none) + (add-touching-prims (_type_ collide-shape-prim collide-shape-prim float collide-tri-result collide-tri-result) none) + (free-nodes (_type_) none) + (update-from-step-size (_type_ float) none) + (send-events-for-touching-shapes (_type_) none) + (get-shapes-entry (_type_ collide-shape collide-shape) touching-shapes-entry) ) ) diff --git a/goal_src/jak3/engine/collide/collide-touch.gc b/goal_src/jak3/engine/collide/collide-touch.gc index bdc99a6558..2355329d66 100644 --- a/goal_src/jak3/engine/collide/collide-touch.gc +++ b/goal_src/jak3/engine/collide/collide-touch.gc @@ -7,3 +7,512 @@ ;; DECOMP BEGINS +(defmethod get-free-node-count ((this touching-prims-entry-pool)) + (let ((v0-0 0)) + (let ((v1-0 (-> this head))) + (while v1-0 + (+! v0-0 1) + (set! v1-0 (-> v1-0 next)) + (nop!) + (nop!) + (nop!) + ) + ) + v0-0 + ) + ) + +(defmethod alloc-node ((this touching-prims-entry-pool)) + (let ((gp-0 (-> this head))) + (cond + (gp-0 + (let ((v1-0 (-> gp-0 next))) + (set! (-> this head) v1-0) + (if v1-0 + (set! (-> v1-0 prev) #f) + ) + ) + (set! (-> gp-0 allocated?) #t) + (set! (-> gp-0 next) #f) + (set! (-> gp-0 prev) #f) + ) + (else + (format 0 "ERROR: touching-prims-entry-pool::alloc-node() failed!~%") + ) + ) + gp-0 + ) + ) + +(defmethod free-node ((this touching-prims-entry-pool) (arg0 touching-prims-entry)) + (when (-> arg0 allocated?) + (set! (-> arg0 allocated?) #f) + (let ((v1-1 (-> this head))) + (set! (-> arg0 next) v1-1) + (set! (-> arg0 prev) #f) + (set! (-> this head) arg0) + (when v1-1 + (set! (-> v1-1 prev) arg0) + arg0 + ) + ) + ) + ) + +(defmethod free-touching-prims-list ((this touching-shapes-entry)) + (when (-> this cshape1) + (set! (-> this cshape1) #f) + (let ((gp-0 (-> this head))) + (when gp-0 + (set! (-> this head) #f) + (let ((s5-0 *touching-prims-entry-pool*)) + (while gp-0 + (let ((a1-0 gp-0)) + (set! gp-0 (-> a1-0 next)) + (free-node s5-0 a1-0) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod free-nodes ((this touching-list)) + (let ((s5-0 (the-as object (-> this touching-shapes)))) + (countdown (s4-0 (-> this num-touching-shapes)) + (free-touching-prims-list (the-as touching-shapes-entry s5-0)) + (set! s5-0 (&+ (the-as touching-shapes-entry s5-0) 32)) + ) + ) + (set! (-> this num-touching-shapes) 0) + (set! (-> this resolve-u) 0) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs touching-shapes-entry. +(defmethod get-shapes-entry ((this touching-list) (arg0 collide-shape) (arg1 collide-shape)) + (let ((v0-0 (the-as object (-> this touching-shapes)))) + (let ((v1-0 (the-as touching-shapes-entry #f))) + (countdown (a3-0 (-> this num-touching-shapes)) + (let ((t0-0 (-> (the-as touching-shapes-entry v0-0) cshape1))) + (set! v1-0 (cond + (t0-0 + (if (or (and (= t0-0 arg0) (= (-> (the-as touching-shapes-entry v0-0) cshape2) arg1)) + (and (= t0-0 arg1) (= (-> (the-as touching-shapes-entry v0-0) cshape2) arg0)) + ) + (return (the-as touching-shapes-entry v0-0)) + ) + v1-0 + ) + (else + (the-as touching-shapes-entry v0-0) + ) + ) + ) + ) + (set! v0-0 (&+ (the-as touching-shapes-entry v0-0) 32)) + ) + (cond + (v1-0 + (set! v0-0 v1-0) + ) + (else + (when (>= (-> this num-touching-shapes) 32) + (format 0 "ERROR: touching-list::get-shapes-entry() failed!~%") + (return (the-as touching-shapes-entry #f)) + ) + (+! (-> this num-touching-shapes) 1) + ) + ) + ) + (set! (-> (the-as touching-shapes-entry v0-0) cshape1) arg0) + (set! (-> (the-as touching-shapes-entry v0-0) cshape2) arg1) + (set! (-> (the-as touching-shapes-entry v0-0) head) #f) + (set! (-> (the-as touching-shapes-entry v0-0) resolve-u) 1) + (set! (-> this resolve-u) 1) + (set! (-> (the-as touching-shapes-entry v0-0) handle1) (process->handle (-> arg0 process))) + (set! (-> (the-as touching-shapes-entry v0-0) handle2) (process->handle (-> arg1 process))) + (the-as touching-shapes-entry v0-0) + ) + ) + +(deftype add-prims-touching-work (structure) + ((tri1 collide-tri-result) + (tri2 collide-tri-result) + ) + ) + + +;; WARN: Function (method 9 touching-list) has a return type of none, but the expression builder found a return statement. +(defmethod add-touching-prims ((this touching-list) + (arg0 collide-shape-prim) + (arg1 collide-shape-prim) + (arg2 float) + (arg3 collide-tri-result) + (arg4 collide-tri-result) + ) + (let ((gp-0 (new 'stack-no-clear 'add-prims-touching-work))) + (set! (-> gp-0 tri1) arg3) + (set! (-> gp-0 tri2) arg4) + (let ((s2-0 (get-shapes-entry this (-> arg0 cshape) (-> arg1 cshape)))) + (when s2-0 + (when (= (-> s2-0 cshape1) (-> arg1 cshape)) + (let ((v1-4 arg0)) + (set! arg0 arg1) + (set! arg1 v1-4) + ) + ) + (let ((s0-0 (-> s2-0 head))) + (while s0-0 + (when (and (= (-> s0-0 prim1 cprim) arg0) (= (-> s0-0 prim2 cprim) arg1)) + (when (< arg2 (-> s0-0 u)) + (-> s0-0 u) + (let ((v1-12 (-> s0-0 prim1)) + (a1-2 (-> gp-0 tri1)) + ) + (cond + (a1-2 + (set! (-> v1-12 has-tri?) #t) + (mem-copy! (the-as pointer (-> v1-12 tri)) (the-as pointer a1-2) 88) + ) + (else + (set! (-> v1-12 has-tri?) #f) + ) + ) + ) + (let ((v1-15 (-> s0-0 prim2)) + (a1-3 (-> gp-0 tri2)) + ) + (cond + (a1-3 + (set! (-> v1-15 has-tri?) #t) + (mem-copy! (the-as pointer (-> v1-15 tri)) (the-as pointer a1-3) 88) + ) + (else + (set! (-> v1-15 has-tri?) #f) + ) + ) + ) + ) + (return 0) + ) + (set! s0-0 (-> s0-0 next)) + ) + ) + (let ((s0-1 (alloc-node *touching-prims-entry-pool*))) + (when s0-1 + (let ((v1-22 (-> s2-0 head))) + (set! (-> s0-1 next) v1-22) + (set! (-> s0-1 prev) #f) + (set! (-> s2-0 head) s0-1) + (if v1-22 + (set! (-> v1-22 prev) s0-1) + ) + ) + (set! (-> s0-1 u) arg2) + (when (>= arg2 0.0) + (set! (-> s2-0 resolve-u) 1) + (set! (-> this resolve-u) 1) + ) + (let ((v1-26 (-> s0-1 prim1)) + (a1-4 (-> gp-0 tri1)) + ) + (set! (-> v1-26 cprim) arg0) + (cond + (a1-4 + (set! (-> v1-26 has-tri?) #t) + (mem-copy! (the-as pointer (-> v1-26 tri)) (the-as pointer a1-4) 88) + ) + (else + (set! (-> v1-26 has-tri?) #f) + ) + ) + ) + (let ((v1-29 (-> s0-1 prim2)) + (a1-5 (-> gp-0 tri2)) + ) + (set! (-> v1-29 cprim) arg1) + (cond + (a1-5 + (set! (-> v1-29 has-tri?) #t) + (mem-copy! (the-as pointer (-> v1-29 tri)) (the-as pointer a1-5) 88) + ) + (else + (set! (-> v1-29 has-tri?) #f) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod update-from-step-size ((this touching-list) (arg0 float)) + (when (nonzero? (-> this resolve-u)) + (set! (-> this resolve-u) 0) + (let ((s5-0 (the-as object (-> this touching-shapes)))) + (countdown (s4-0 (-> this num-touching-shapes)) + (when (nonzero? (-> (the-as touching-shapes-entry s5-0) resolve-u)) + (set! (-> (the-as touching-shapes-entry s5-0) resolve-u) 0) + (when (-> (the-as touching-shapes-entry s5-0) cshape1) + (let ((s3-0 (-> (the-as touching-shapes-entry s5-0) head))) + (while s3-0 + (let ((f0-0 (-> s3-0 u))) + (set! s3-0 (cond + ((>= f0-0 0.0) + (cond + ((>= arg0 f0-0) + (set! (-> s3-0 u) -1.0) + (set! s3-0 (-> s3-0 next)) + ) + (else + (let ((a1-1 s3-0)) + (let ((v1-8 (-> s3-0 next))) + (let ((a0-1 (-> s3-0 prev))) + (if a0-1 + (set! (-> a0-1 next) v1-8) + (set! (-> (the-as touching-shapes-entry s5-0) head) v1-8) + ) + (if v1-8 + (set! (-> v1-8 prev) a0-1) + ) + ) + (set! s3-0 v1-8) + ) + (free-node *touching-prims-entry-pool* a1-1) + ) + ) + ) + s3-0 + ) + (else + (-> s3-0 next) + ) + ) + ) + ) + ) + ) + (if (not (-> (the-as touching-shapes-entry s5-0) head)) + (set! (-> (the-as touching-shapes-entry s5-0) cshape1) #f) + ) + ) + ) + (set! s5-0 (&+ (the-as touching-shapes-entry s5-0) 32)) + ) + ) + ) + 0 + (none) + ) + +(defmethod send-events-for-touching-shapes ((this touching-list)) + (let ((gp-0 (the-as object (-> this touching-shapes)))) + (countdown (s5-0 (-> this num-touching-shapes)) + (let ((s3-0 (-> (the-as touching-shapes-entry gp-0) cshape1))) + (when s3-0 + (let ((s4-0 (handle->process (-> (the-as touching-shapes-entry gp-0) handle1))) + (s2-0 (handle->process (-> (the-as touching-shapes-entry gp-0) handle2))) + ) + (when (and s4-0 s2-0) + (let ((s1-0 (-> (the-as touching-shapes-entry gp-0) cshape2))) + (when (< (-> s3-0 event-priority) (-> s1-0 event-priority)) + (let ((v1-9 s3-0)) + (set! s3-0 s1-0) + (set! s1-0 v1-9) + ) + (let ((v1-11 s4-0)) + (set! s4-0 s2-0) + (set! s2-0 v1-11) + ) + ) + (let ((v1-13 (-> s3-0 event-self))) + (if v1-13 + (send-event s4-0 v1-13 :from s2-0 gp-0) + ) + ) + (let ((v1-14 (-> s3-0 event-other))) + (if v1-14 + (send-event s2-0 v1-14 :from s4-0 gp-0) + ) + ) + (let ((v1-15 (-> s1-0 event-self))) + (if v1-15 + (send-event s2-0 v1-15 :from s4-0 gp-0) + ) + ) + (let ((v1-16 (-> s1-0 event-other))) + (if v1-16 + (send-event s4-0 v1-16 :from s2-0 gp-0) + ) + ) + ) + ) + ) + ) + ) + (set! gp-0 (&+ (the-as touching-shapes-entry gp-0) 32)) + ) + ) + 0 + (none) + ) + +(defmethod prims-touching? ((this touching-shapes-entry) (arg0 collide-shape) (arg1 uint)) + (cond + ((= (-> this cshape1) arg0) + (let ((v1-1 (-> this head))) + (while v1-1 + (if (logtest? (-> v1-1 prim1 cprim prim-id) arg1) + (return v1-1) + ) + (set! v1-1 (-> v1-1 next)) + ) + ) + ) + ((= (-> this cshape2) arg0) + (let ((v1-4 (-> this head))) + (while v1-4 + (if (logtest? (-> v1-4 prim2 cprim prim-id) arg1) + (return v1-4) + ) + (set! v1-4 (-> v1-4 next)) + ) + ) + ) + (else + (format 0 "ERROR: touching-shapes-entry::prims-touching? : Bogus cshape value!~%") + ) + ) + (the-as touching-prims-entry #f) + ) + +;; WARN: Return type mismatch touching-prims-entry vs basic. +(defmethod prims-touching-action? ((this touching-shapes-entry) (arg0 collide-shape) (arg1 collide-action) (arg2 collide-action)) + (cond + ((= (-> this cshape1) arg0) + (let ((v1-1 (-> this head))) + (while v1-1 + (let ((a0-1 (-> v1-1 prim1 cprim))) + (if (and (logtest? arg1 (-> a0-1 prim-core action)) (not (logtest? arg2 (-> a0-1 prim-core action)))) + (return (the-as basic v1-1)) + ) + ) + (set! v1-1 (-> v1-1 next)) + ) + ) + ) + ((= (-> this cshape2) arg0) + (let ((v1-4 (-> this head))) + (while v1-4 + (let ((a0-5 (-> v1-4 prim2 cprim))) + (if (and (logtest? arg1 (-> a0-5 prim-core action)) (not (logtest? arg2 (-> a0-5 prim-core action)))) + (return (the-as basic v1-4)) + ) + ) + (set! v1-4 (-> v1-4 next)) + ) + ) + ) + (else + (format 0 "ERROR: touching-shapes-entry::prims-touching-action? : Bogus cshape value!~%") + ) + ) + (the-as basic #f) + ) + +(defmethod get-touched-shape ((this touching-shapes-entry) (arg0 collide-shape)) + (cond + ((= (-> this cshape1) arg0) + (return (-> this cshape2)) + ) + ((= (-> this cshape2) arg0) + (return (-> this cshape1)) + ) + ) + (the-as collide-shape #f) + ) + +(defmethod get-touched-prim ((this touching-prims-entry) (arg0 collide-shape) (arg1 touching-shapes-entry)) + (cond + ((= (-> arg1 cshape1) arg0) + (return (-> this prim1 cprim)) + ) + ((= (-> arg1 cshape2) arg0) + (return (-> this prim2 cprim)) + ) + ) + (the-as collide-shape-prim #f) + ) + +(defmethod get-touched-tri ((this touching-prims-entry) (arg0 collide-shape) (arg1 touching-shapes-entry)) + (let ((v0-0 (the-as collide-tri-result #f))) + (cond + ((not this) + ) + ((= (-> arg1 cshape1) arg0) + (let ((v1-4 (-> this prim1))) + (if (-> v1-4 has-tri?) + (set! v0-0 (-> v1-4 tri)) + ) + ) + ) + ((= (-> arg1 cshape2) arg0) + (let ((v1-7 (-> this prim2))) + (if (-> v1-7 has-tri?) + (set! v0-0 (-> v1-7 tri)) + ) + ) + ) + ) + v0-0 + ) + ) + +(defmethod touching-prims-entry-method-9 ((this touching-prims-entry) (arg0 vector)) + (let* ((s4-0 (-> this prim1 cprim)) + (v1-0 (-> this prim2 cprim)) + (gp-1 (vector-! + (new 'stack-no-clear 'vector) + (the-as vector (-> v1-0 prim-core)) + (the-as vector (-> s4-0 prim-core)) + ) + ) + ) + (let ((f1-2 (- (- (vector-length gp-1) (-> v1-0 prim-core world-sphere w)) (-> s4-0 prim-core world-sphere w)))) + (vector-normalize! gp-1 (+ (-> s4-0 prim-core world-sphere w) (* 0.5 f1-2))) + ) + (vector+! arg0 gp-1 (the-as vector (-> s4-0 prim-core))) + ) + arg0 + ) + +(defmethod get-middle-of-bsphere-overlap ((this touching-prims-entry) (arg0 vector)) + (let ((v1-0 (-> this prim1 cprim)) + (a2-0 (-> this prim2 cprim)) + ) + (vector+! arg0 (the-as vector (-> a2-0 prim-core)) (the-as vector (-> v1-0 prim-core))) + ) + (vector-float*! arg0 arg0 0.5) + arg0 + ) + +(defun get-intersect-point ((arg0 vector) (arg1 touching-prims-entry) (arg2 collide-shape) (arg3 touching-shapes-entry)) + (when arg1 + (let ((a0-2 (get-touched-tri arg1 arg2 arg3))) + (if a0-2 + (set! (-> arg0 quad) (-> a0-2 intersect quad)) + (touching-prims-entry-method-9 arg1 arg0) + ) + ) + ) + arg0 + ) diff --git a/goal_src/jak3/engine/collide/collide.gc b/goal_src/jak3/engine/collide/collide.gc index 0d3cb5ad88..3d734c2e6f 100644 --- a/goal_src/jak3/engine/collide/collide.gc +++ b/goal_src/jak3/engine/collide/collide.gc @@ -7,3 +7,18 @@ ;; DECOMP BEGINS +(define *collide-vif0-init* (new 'static 'boxed-array :type uint32 + #x30000000 + #x4d000000 + #x4d000000 + #x4d000000 + #x3f800000 + #x5000001 + #x20000000 + #x40404040 + #x1000404 + #x0 + #x0 + #x0 + ) + ) diff --git a/goal_src/jak3/engine/collide/los-control-h.gc b/goal_src/jak3/engine/collide/los-control-h.gc index ffa5a40414..f6223eedc4 100644 --- a/goal_src/jak3/engine/collide/los-control-h.gc +++ b/goal_src/jak3/engine/collide/los-control-h.gc @@ -7,3 +7,22 @@ ;; DECOMP BEGINS +(deftype los-control (structure) + ((src-proc handle) + (dst-proc handle) + (last-lost-los time-frame) + (last-gained-los time-frame) + (check-interval time-frame) + (max-check-distance float) + (last-check-time time-frame) + (last-collide-result collide-tri-result :inline) + (collide-with collide-spec :offset 160) + ) + (:methods + (los-control-method-9 (_type_ process-focusable vector float float) none :behavior process-focusable) + (should-check-los? (_type_ time-frame) symbol) + (los-control-method-11 (_type_ time-frame) symbol) + (init-los! (_type_ process-focusable time-frame float collide-spec) none) + (los-control-method-13 (_type_ collide-query vector int float) float) + ) + ) diff --git a/goal_src/jak3/engine/collide/los-control.gc b/goal_src/jak3/engine/collide/los-control.gc index b1fd0c159b..a8ad23ee57 100644 --- a/goal_src/jak3/engine/collide/los-control.gc +++ b/goal_src/jak3/engine/collide/los-control.gc @@ -7,3 +7,151 @@ ;; DECOMP BEGINS +(define *los-time-offset* (the-as time-frame 0)) + +(defmethod los-control-method-13 ((this los-control) (arg0 collide-query) (arg1 vector) (arg2 int) (arg3 float)) + (set! (-> arg0 move-dist quad) (-> arg1 quad)) + (vector-length-max! (-> arg0 move-dist) (-> this max-check-distance)) + (set! (-> arg0 radius) arg3) + (set! (-> arg0 collide-with) (the-as collide-spec (logand (the-as collide-spec arg2) (-> this collide-with)))) + (fill-using-line-sphere *collide-cache* arg0) + (let ((f30-0 (probe-using-line-sphere *collide-cache* arg0)) + (f28-0 (vector-length arg1)) + ) + (cond + ((>= f30-0 0.0) + (quad-copy! (the-as pointer (-> this last-collide-result)) (the-as pointer (-> arg0 best-other-tri)) 6) + (* f30-0 f28-0) + ) + (else + f28-0 + ) + ) + ) + ) + +(defmethod los-control-method-9 ((this los-control) (arg0 process-focusable) (arg1 vector) (arg2 float) (arg3 float)) + (local-vars (a0-22 int) (a0-24 int) (sv-592 vector)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (let* ((v1-1 (-> *perf-stats* data 56)) + (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 + (when (and (time-elapsed? (-> this last-check-time) (-> this check-interval)) + (-> this src-proc) + (or arg0 (-> this dst-proc)) + ) + (let* ((s0-0 (handle->process (-> this src-proc))) + (s1-0 (if (type? s0-0 process-focusable) + s0-0 + ) + ) + ) + (when s1-0 + (when (and (not arg0) (not arg1)) + (let ((s0-1 (handle->process (-> this dst-proc)))) + (set! arg0 (if (type? s0-1 process-focusable) + (the-as process-focusable s0-1) + ) + ) + ) + ) + (when (or (the-as process arg0) arg1) + (set! sv-592 (new 'stack-no-clear 'vector)) + (let ((v1-24 (-> (get-trans (the-as process-focusable s1-0) 10) quad))) + (set! (-> sv-592 quad) v1-24) + ) + (let ((s0-2 (new 'stack-no-clear 'collide-query))) + (if (not arg1) + (set! arg1 (get-trans arg0 3)) + ) + (set! (-> s0-2 start-pos quad) (-> sv-592 quad)) + (set! (-> s0-2 ignore-process0) s1-0) + (set! (-> s0-2 ignore-process1) (the-as process arg0)) + (set! (-> s0-2 ignore-pat) (-> (the-as process-focusable s1-0) root pat-ignore-mask)) + (set! (-> s0-2 action-mask) (collide-action solid semi-solid)) + (let ((s2-1 (new 'stack-no-clear 'vector))) + (.lvf vf4 (&-> arg1 quad)) + (.lvf vf5 (&-> sv-592 quad)) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> s2-1 quad) vf6) + (let ((f30-0 (vector-length s2-1))) + (let ((f0-0 (los-control-method-13 this s0-2 s2-1 -2 arg3))) + (if (< f0-0 f30-0) + (vector-normalize! s2-1 f0-0) + ) + ) + (if (< (los-control-method-13 this s0-2 s2-1 1 arg2) f30-0) + (set-time! (-> this last-lost-los)) + (set-time! (-> this last-gained-los)) + ) + ) + ) + ) + (set-time! (-> this last-check-time)) + ) + ) + ) + ) + (let ((v1-45 (-> *perf-stats* data 56))) + (b! (zero? (-> v1-45 ctrl)) cfg-45 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-22 pcr0) + (+! (-> v1-45 accum0) a0-22) + (.mfpc a0-24 pcr1) + (+! (-> v1-45 accum1) a0-24) + ) + (label cfg-45) + 0 + 0 + (none) + ) + ) + +(defmethod should-check-los? ((this los-control) (arg0 time-frame)) + (and (time-elapsed? (-> this last-lost-los) (+ (-> this check-interval) arg0)) + (not (time-elapsed? (-> this last-gained-los) (-> this check-interval))) + ) + ) + +(defmethod los-control-method-11 ((this los-control) (arg0 time-frame)) + (and (time-elapsed? (-> this last-gained-los) (+ (-> this check-interval) arg0)) + (not (time-elapsed? (-> this last-lost-los) (-> this check-interval))) + ) + ) + +(defmethod init-los! ((this los-control) (arg0 process-focusable) (arg1 time-frame) (arg2 float) (arg3 collide-spec)) + (set! (-> this src-proc) (process->handle arg0)) + (set! (-> this dst-proc) (the-as handle #f)) + (set! (-> this last-lost-los) 0) + (set! (-> this last-gained-los) 0) + (set! (-> this last-check-time) 0) + (set! (-> this check-interval) (+ arg1 *los-time-offset*)) + (set! (-> this max-check-distance) arg2) + (set! (-> this collide-with) arg3) + (set! *los-time-offset* (the-as time-frame (mod (+ *los-time-offset* (seconds 0.045)) 30))) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/collide/main-collide.gc b/goal_src/jak3/engine/collide/main-collide.gc index 863536c85b..ba4c1ba931 100644 --- a/goal_src/jak3/engine/collide/main-collide.gc +++ b/goal_src/jak3/engine/collide/main-collide.gc @@ -7,3 +7,191 @@ ;; DECOMP BEGINS +(defun drawable-sphere-box-intersect? ((arg0 drawable) (arg1 bounding-box4w)) + (local-vars (v1-1 uint128) (v1-2 uint128) (v1-3 uint128) (a0-1 uint128) (a1-2 uint128) (a2-0 uint128)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (nop!) + (nop!) + (.lvf vf1 (&-> arg0 bsphere quad)) + (.add.w.vf vf2 vf1 vf1 :mask #b111) + (let ((v1-0 (-> arg1 min quad))) + (.sub.w.vf vf1 vf1 vf1 :mask #b111) + (let ((a1-1 (-> arg1 max quad))) + (.ftoi.vf vf4 vf2) + (nop!) + (.ftoi.vf vf3 vf1) + (nop!) + (.mov a0-1 vf4) + (nop!) + (.mov a2-0 vf3) + (nop!) + (.pcgtw a1-2 a2-0 a1-1) + ) + (nop!) + (.pcgtw v1-1 v1-0 a0-1) + ) + (nop!) + (.por v1-2 a1-2 v1-1) + (nop!) + (.ppach v1-3 (the-as uint128 0) v1-2) + (nop!) + (let ((v1-4 (shl (the-as int v1-3) 16))) + (nop!) + (zero? v1-4) + ) + ) + ) + +(defun instance-sphere-box-intersect? ((arg0 drawable) (arg1 instance-tie) (arg2 bounding-box4w)) + (local-vars + (v1-3 uint128) + (v1-4 uint128) + (v1-5 uint128) + (a0-2 uint128) + (a1-2 uint128) + (a2-1 uint128) + (a3-1 uint128) + (a3-3 uint128) + (a3-4 uint128) + (t0-1 uint128) + (t0-2 uint128) + (t1-0 uint128) + (t2-1 uint128) + (t2-2 uint128) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf10 :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) + (nop!) + (let ((v1-0 (-> arg1 max-scale))) + (nop!) + (let ((a3-0 (the-as uint128 (-> arg1 origin long 3)))) + (nop!) + (let ((t2-0 (the-as uint128 (-> arg1 origin long 0)))) + (.pextlh a3-1 a3-0 0) + (let ((t0-0 (the-as uint128 (-> arg1 origin long 1)))) + (.pw.sra t1-0 a3-1 10) + (let ((a3-2 (the-as uint128 (-> arg1 origin long 2)))) + (.pextlh t2-1 t2-0 0) + (nop!) + (.pw.sra t2-2 t2-1 16) + (nop!) + (.pextlh t0-1 t0-0 0) + (.mov vf8 t1-0) + (.pw.sra t0-2 t0-1 16) + (.mov vf5 t2-2) + (.pextlh a3-3 a3-2 0) + ) + ) + ) + ) + (.mov vf6 t0-2) + (.pw.sra a3-4 a3-3 16) + (.lvf vf9 (&-> arg1 bsphere quad)) + (nop!) + (.mov vf7 a3-4) + (nop!) + (.mov vf10 v1-0) + ) + (.itof.vf vf8 vf8) + (nop!) + (vitof12.xyzw vf5 vf5) + (nop!) + (vitof12.xyzw vf6 vf6) + (nop!) + (vitof12.xyzw vf7 vf7) + (nop!) + (.add.vf vf8 vf8 vf9 :mask #b111) + (nop!) + (nop!) + (.lvf vf9 (&-> arg0 bsphere quad)) + (vitof12.xyzw vf10 vf10) + (nop!) + (.mul.w.vf vf10 vf10 vf9 :mask #b1) + (nop!) + (.mul.x.vf acc vf5 vf9) + (nop!) + (.add.mul.y.vf acc vf6 vf9 acc) + (let ((v1-2 (-> arg2 min quad))) + (.add.mul.z.vf acc vf7 vf9 acc) + (let ((a1-1 (-> arg2 max quad))) + (.add.mul.w.vf vf1 vf8 vf0 acc) + (nop!) + (.add.x.vf vf2 vf1 vf10 :mask #b111) + (nop!) + (.sub.x.vf vf1 vf1 vf10 :mask #b111) + (nop!) + (.ftoi.vf vf4 vf2) + (nop!) + (.ftoi.vf vf3 vf1) + (nop!) + (.mov a0-2 vf4) + (nop!) + (.mov a2-1 vf3) + (nop!) + (.pcgtw a1-2 a2-1 a1-1) + ) + (nop!) + (.pcgtw v1-3 v1-2 a0-2) + ) + (nop!) + (.por v1-4 a1-2 v1-3) + (nop!) + (.ppach v1-5 (the-as uint128 0) v1-4) + (nop!) + (let ((v1-6 (shl (the-as int v1-5) 16))) + (nop!) + (zero? v1-6) + ) + ) + ) + +(defun instance-tfragment-add-debug-sphere ((arg0 drawable) (arg1 instance-tie)) + (local-vars (v1-1 uint128) (v1-2 uint128) (a3-0 float)) + (rlet ((vf0 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf12 :class vf) + (vf9 :class vf) + ) + (init-vf0-vector) + (nop!) + (let ((v1-0 (the-as uint128 (-> arg1 origin long 3)))) + (.pextlh v1-1 v1-0 0) + ) + (.lvf vf9 (&-> arg0 bsphere quad)) + (.pw.sra v1-2 v1-1 10) + (.lvf vf10 (&-> arg1 bsphere quad)) + (nop!) + (.mov vf12 v1-2) + (.itof.vf vf12 vf12) + (nop!) + (.add.vf vf10 vf10 vf12 :mask #b111) + (nop!) + (.add.vf vf9 vf9 vf10 :mask #b111) + (nop!) + (.add.w.vf vf11 vf0 vf9 :mask #b1) + (nop!) + (.mov a3-0 vf11) + (nop!) + (let ((a2-0 (new-stack-vector0))) + (.svf (&-> a2-0 quad) vf9) + (add-debug-sphere #t (bucket-id debug) a2-0 a3-0 (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80)) + ) + ) + ) diff --git a/goal_src/jak3/engine/common-obs/airlock.gc b/goal_src/jak3/engine/common-obs/airlock.gc index 77e559c2c1..f855e39840 100644 --- a/goal_src/jak3/engine/common-obs/airlock.gc +++ b/goal_src/jak3/engine/common-obs/airlock.gc @@ -5,5 +5,1364 @@ ;; name in dgo: airlock ;; dgos: GAME +;; +++airlock-options +(defenum airlock-options + :type uint32 + :bitfield #t + (ao0 0) + (front 1) + (block-flut 2) + (back 3) + (ao4 4) + ) +;; ---airlock-options + + +(declare-type blocking-plane process-drawable) + +(define-extern blocking-plane-spawn (function curve-control (inline-array vector) float none :behavior process)) +(define-extern blocking-plane-destroy (function none :behavior blocking-plane)) ;; DECOMP BEGINS +(deftype com-airlock (process-drawable) + ((level-name pair) + (open-test pair) + (on-running pair) + (were-behind? symbol) + (inner? symbol) + (sound-behind? symbol) + (visible-move? symbol) + (saw-pilot? handle) + (last-distance meters) + (y-height vector) + (pre-open-speed float) + (open? symbol) + (latch-closed-time time-frame) + (latch-open-time time-frame) + (gear joint-mod) + (gear-rot degrees) + (gear-rotv degrees) + (gear-start-frame float) + (gear-stop-frame float) + (gear-play-time time-frame) + (open-frame float) + (pre-open-frame float) + (lock-frame float) + (close-speed-multiplier float) + (open-distance meters 2) + (active-distance meters 2) + (sound-id sound-id) + (gear-sound-id sound-id) + (sound-gear sound-spec) + (sound-pre-open sound-spec) + (sound-pre-open-stop sound-spec) + (sound-lock-loop sound-spec) + (sound-lock-stop sound-spec) + (sound-open sound-spec) + (sound-open-loop sound-spec) + (sound-open-stop sound-spec) + (sound-close sound-spec) + (sound-close-loop sound-spec) + (sound-close-stop sound-spec) + (sound-post-close sound-spec) + (sound-post-close-stop sound-spec) + (spool-sound-time time-frame) + (start-open-time time-frame) + (door-radius float) + (allow-pilot? symbol) + (allow-flut? symbol) + (blocking-plane? symbol) + ) + (:state-methods + (open symbol) + (close symbol) + ) + (:methods + (init-airlock! (_type_) _type_) + (want-cross-airlock? (_type_) object) + (destination-loaded? (_type_ symbol) symbol) + (check-crossing-distance (_type_ vector symbol) float) + (com-airlock-method-26 (_type_ vector symbol) symbol) + (rotate-gear! (_type_ float) degrees) + (play-city-voice-sound (_type_ symbol) none) + (spawn-blocking-plane (_type_ symbol) none) + ) + ) + + +(defmethod deactivate ((this com-airlock)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (process-entity-status! this (entity-perm-status subtask-complete) #f) + (if (nonzero? (-> this sound-id)) + (sound-stop (-> this sound-id)) + ) + (if (nonzero? (-> this gear-sound-id)) + (sound-stop (-> this gear-sound-id)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; WARN: Return type mismatch process-drawable vs com-airlock. +(defmethod relocate ((this com-airlock) (offset int)) + (if (nonzero? (-> this gear)) + (&+! (-> this gear) offset) + ) + (the-as com-airlock ((method-of-type process-drawable relocate) this offset)) + ) + +(defmethod init-airlock! ((this com-airlock)) + (local-vars (sv-16 res-tag) (sv-32 res-tag)) + (process-entity-status! this (entity-perm-status subtask-complete) #f) + (set! (-> this open?) #f) + (process-drawable-from-entity! this (-> this entity)) + (let ((f0-0 (res-lump-float (-> this entity) 'rotoffset))) + (if (!= f0-0 0.0) + (quaternion-rotate-y! (-> this root quat) (-> this root quat) f0-0) + ) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((s5-0 (res-lump-value (-> this entity) 'options airlock-options :time -1000000000.0))) + (set! (-> this were-behind?) #f) + (set! (-> this inner?) (logtest? s5-0 (airlock-options ao0))) + (set! (-> this on-running) (res-lump-struct (-> this entity) 'on-running pair)) + (set! (-> this sound-behind?) #f) + (set! (-> this saw-pilot?) (the-as handle #f)) + (set! (-> this open-frame) 0.0) + (set! (-> this pre-open-frame) 0.0) + (set! (-> this lock-frame) 0.0) + (set! (-> this pre-open-speed) 2.0) + (set! (-> this allow-pilot?) #f) + (set! (-> this allow-flut?) (not (logtest? s5-0 (airlock-options block-flut)))) + (let ((v1-16 (cond + ((logtest? s5-0 (airlock-options front)) + 'front + ) + ((logtest? s5-0 (airlock-options back)) + 'back + ) + ) + ) + ) + (set! (-> this blocking-plane?) v1-16) + ) + ) + (set! (-> this open-distance 0) 143360.0) + (set! (-> this open-distance 1) 143360.0) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-21 (res-lump-data (-> this entity) 'distance (pointer float) :tag-ptr (& sv-16)))) + (when v1-21 + (if (>= (-> sv-16 elt-count) (the-as uint 1)) + (set! (-> this open-distance 0) (-> v1-21 0)) + ) + (if (>= (-> sv-16 elt-count) (the-as uint 2)) + (set! (-> this open-distance 1) (-> v1-21 1)) + ) + ) + ) + (set! (-> this active-distance 0) (+ 143360.0 (-> this open-distance 0))) + (set! (-> this active-distance 1) (+ 143360.0 (-> this open-distance 1))) + (set! sv-32 (new 'static 'res-tag)) + (let ((v1-25 (res-lump-data (-> this entity) 'idle-distance (pointer float) :tag-ptr (& sv-32)))) + (when v1-25 + (if (>= (-> sv-32 elt-count) (the-as uint 1)) + (set! (-> this active-distance 0) (-> v1-25 0)) + ) + (if (>= (-> sv-32 elt-count) (the-as uint 2)) + (set! (-> this active-distance 1) (-> v1-25 1)) + ) + ) + ) + (set! (-> this y-height) (res-lump-data (-> this entity) 'height vector)) + (set! (-> this level-name) (res-lump-struct (-> this entity) 'on-notice pair)) + (set! (-> this open-test) + (the-as pair ((method-of-type res-lump get-property-struct) + (-> this entity) + 'open-test + 'interp + -1000000000.0 + (the-as structure '(not (or (scene-player?) (focus-test? *target* grabbed)))) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (set! (-> this gear-start-frame) -1.0) + (set! (-> this gear-stop-frame) 10000.0) + (set! (-> this sound-gear) #f) + (set! (-> this sound-pre-open) #f) + (set! (-> this sound-pre-open-stop) #f) + (set! (-> this sound-lock-loop) #f) + (set! (-> this sound-lock-stop) #f) + (set! (-> this sound-post-close) #f) + (set! (-> this sound-post-close-stop) #f) + (set! (-> this sound-open) #f) + (set! (-> this sound-close) #f) + (set! (-> this sound-open-loop) #f) + (set! (-> this sound-close-loop) #f) + (set! (-> this sound-open-stop) #f) + (set! (-> this sound-close-stop) #f) + (set! (-> this door-radius) 20480.0) + (set! (-> this close-speed-multiplier) 2.0) + this + ) + +(defbehavior airlock-stop-part-trackers com-airlock () + (let ((gp-0 (ppointer->process (-> self child)))) + (while gp-0 + (if (type? gp-0 part-tracker) + (send-event gp-0 'draw #f) + ) + (set! gp-0 (ppointer->process (-> gp-0 brother))) + ) + ) + 0 + (none) + ) + +(defun airlock-command-lookup ((arg0 pair)) + (let* ((s5-0 (the-as object (-> *setting-control* user-current airlock-command))) + (s4-0 (-> (the-as pair s5-0) car)) + ) + (while (not (null? s5-0)) + (let ((a0-1 (-> (the-as pair s4-0) car))) + (if (or (= a0-1 'any) (string= (the-as string a0-1) (the-as string arg0))) + (return (-> (the-as pair (-> (the-as pair s4-0) cdr)) car)) + ) + ) + (set! s5-0 (-> (the-as pair s5-0) cdr)) + (set! s4-0 (-> (the-as pair s5-0) car)) + ) + ) + #f + ) + +(defmethod com-airlock-method-26 ((this com-airlock) (arg1 vector) (side symbol)) + (case side + (('front) + (let ((f0-0 (check-crossing-distance this arg1 #f))) + (and (< 0.0 f0-0) (or (< (vector-vector-xz-distance (-> this root trans) arg1) (-> this active-distance 0)) + (< 0.0 (-> this last-distance)) + ) + ) + ) + ) + ) + ) + +(defmethod check-crossing-distance ((this com-airlock) (arg0 vector) (arg1 symbol)) + (let ((s5-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (s4-1 (vector-! (new 'stack-no-clear 'vector) arg0 (-> this root trans))) + ) + (set! (-> s4-1 y) 0.0) + (let ((f30-0 (vector-dot s4-1 s5-0))) + (cond + ((not arg1) + ) + ((or (< (vector-vector-xz-distance (-> this root trans) arg0) 40960.0) + (< 0.7 (fabs (vector-dot s5-0 (vector-normalize! s4-1 1.0)))) + ) + (when (and (< f30-0 0.0) + (< 0.0 (-> this last-distance)) + (and (not (and *target* (focus-test? *target* grabbed teleporting))) + (< (fabs (- f30-0 (-> this last-distance))) 81920.0) + ) + ) + (let ((s5-1 (res-lump-struct (-> this entity) 'on-cross pair))) + (if s5-1 + (script-eval s5-1) + ) + ) + ) + (set! (-> this last-distance) f30-0) + ) + ((< 0.0 (-> this last-distance)) + (set! f30-0 (fmax 4096.0 f30-0)) + ) + ((< (-> this last-distance) 0.0) + (set! f30-0 (fmin -4096.0 f30-0)) + ) + ) + f30-0 + ) + ) + ) + +(defmethod want-cross-airlock? ((this com-airlock)) + (local-vars (a0-22 entity-actor)) + (let* ((tpos (target-pos 0)) + (f30-0 (check-crossing-distance this tpos #t)) + (target-dist (vector-vector-xz-distance (-> this root trans) tpos)) + (s5-0 (< (current-time) (-> this latch-open-time))) + (cmd (airlock-command-lookup (the-as pair (-> this name)))) + ) + (if (= cmd 'open) + (set! s5-0 #t) + ) + (and (or s5-0 (< target-dist (if (>= f30-0 0.0) + (-> this active-distance 0) + (-> this active-distance 1) + ) + ) + ) + (and (or s5-0 (not (-> this y-height)) (and (>= (-> tpos y) (- (-> this root trans y) (-> this y-height y))) + (< (-> tpos y) (+ (-> this root trans y) (-> this y-height x))) + ) + ) + (begin + (if (and (not (-> this were-behind?)) (and (< f30-0 0.0) (-> this inner?))) + (set! (-> this were-behind?) #t) + ) + (< (-> this latch-closed-time) (current-time)) + ) + (or (not (and *target* (or (focus-test? *target* teleporting) + (and (not (-> this allow-pilot?)) (focus-test? *target* pilot)) + (and (not (-> this allow-flut?)) (focus-test? *target* flut)) + ) + ) + ) + (< f30-0 -409.6) + ) + (let ((f28-0 (check-crossing-distance this (camera-pos) #f))) + (if (and *target* + (< target-dist 81920.0) + (or (< (* f30-0 f28-0) 0.0) (and (>= 32768.0 (fabs f30-0)) (if (= (-> this blocking-plane?) 'front) + (< f30-0 0.0) + (< 0.0 f30-0) + ) + ) + ) + (and (or (not (-> this allow-flut?)) (not (-> this allow-pilot?))) + (not (logtest? (focus-status flut pilot) (-> *target* focus-status))) + ) + ) + (persist-with-delay *setting-control* 'pilot (seconds 0.1) 'pilot #f 0.0 0) + ) + (or (and (< f30-0 (-> this open-distance 0)) + (or (not (-> this were-behind?)) (< f30-0 20480.0)) + (and (or (< 409.6 f30-0) + (begin + (let ((a0-21 (-> this entity))) + (set! a0-22 (entity-actor-lookup a0-21 'next-actor 0)) + ) + (not a0-22) + ) + (logtest? (-> a0-22 extra perm status) (entity-perm-status subtask-complete)) + ) + (script-eval (-> this open-test)) + (and (-> *setting-control* user-current airlock) + (!= cmd 'close) + (not (and (-> this blocking-plane?) *target* (or (and (not (-> this allow-pilot?)) (focus-test? *target* pilot)) + (and (not (-> this allow-flut?)) (focus-test? *target* flut)) + ) + ) + ) + ) + ) + ) + s5-0 + (and (or (not *target*) (not (logtest? (-> *target* focus-status) (focus-status in-head)))) + (not (and (and (-> this next-state) (= (-> this next-state name) 'close)) + (= (-> this skel root-channel 0 frame-num) 0.0) + ) + ) + (or (< (* f30-0 f28-0) 0.0) + (and (< (fabs f28-0) 4096.0) + (< (vector-vector-xz-distance (camera-pos) (-> this root trans)) (-> this door-radius)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + +(defmethod destination-loaded? ((this com-airlock) (level-status symbol)) + (let ((s5-1 (script-eval (-> this level-name)))) + (cond + ((not s5-1) + (if level-status + 'unknown + #f + ) + ) + (level-status + (let ((a1-3 (car s5-1))) + (while (not (null? s5-1)) + (let ((v1-4 (status-of-level-and-borrows *level* (the-as symbol a1-3) level-status))) + (case level-status + (('display) + (if (!= v1-4 'active) + (return #f) + ) + ) + (else + (if (not (or (= v1-4 'loaded) (= v1-4 'active))) + (return #f) + ) + ) + ) + ) + (set! s5-1 (cdr s5-1)) + (set! a1-3 (car (the-as pair s5-1))) + ) + ) + #t + ) + (else + (let* ((v1-13 s5-1) + (a0-8 (car v1-13)) + ) + (while (not (null? v1-13)) + (dotimes (a1-6 10) + (if (= a0-8 (-> *load-state* want a1-6 name)) + (goto cfg-32) + ) + ) + #t + (return #f) + (label cfg-32) + (set! v1-13 (cdr v1-13)) + (set! a0-8 (car (the-as pair v1-13))) + ) + ) + #t + ) + ) + ) + ) + +(defmethod rotate-gear! ((this com-airlock) (arg0 float)) + (cond + ((and (>= (ja-aframe-num 0) (-> this gear-start-frame)) (< (ja-aframe-num 0) (-> this gear-stop-frame))) + (if (and (zero? (-> this gear-sound-id)) + (-> this sound-gear) + (and (-> this next-state) (= (-> this next-state name) 'open)) + (>= (check-crossing-distance this (target-pos 0) #f) 0.0) + ) + (set! (-> this gear-sound-id) (sound-play-by-spec (-> this sound-gear) (new-sound-id) (the-as vector #t))) + ) + (set-time! (-> this gear-play-time)) + (when (nonzero? (-> this gear)) + (seek! (-> this gear-rotv) arg0 (* 131072.0 (seconds-per-frame))) + (+! (-> this gear-rot) (* (-> this gear-rotv) (seconds-per-frame))) + (twist-set! (-> this gear) (the-as float #f) (the-as float #f) (-> this gear-rot)) + ) + ) + (else + (when (and (nonzero? (-> this gear-sound-id)) (time-elapsed? (-> this gear-play-time) (seconds 1.5))) + (let ((v1-28 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-28 command) (sound-command set-param)) + (set! (-> v1-28 id) (-> this gear-sound-id)) + (set! (-> v1-28 params volume) -4) + (set! (-> v1-28 auto-time) 120) + (set! (-> v1-28 auto-from) 2) + (set! (-> v1-28 params mask) (the-as uint 17)) + (-> v1-28 id) + ) + (set! (-> this gear-sound-id) (new 'static 'sound-id)) + 0 + ) + ) + ) + (-> this gear-rotv) + ) + +(defmethod play-city-voice-sound ((this com-airlock) (arg0 symbol)) + (let ((gp-0 (the-as (array string) #f))) + (case arg0 + (('enter) + (set! gp-0 (new 'static 'boxed-array :type string "cityv005" "cityv006" "cityv007" "cityv008" "cityv009")) + ) + (('exit) + (set! gp-0 (new 'static 'boxed-array :type string "cityv001" "cityv002" "cityv003" "cityv004")) + ) + ) + (cond + ((and gp-0 (time-elapsed? (-> this spool-sound-time) (seconds 2))) + (set-time! (-> this spool-sound-time)) + (add-process + *gui-control* + this + (gui-channel alert) + (gui-action play) + (-> gp-0 (rand-vu-int-range 0 (+ (-> gp-0 length) -1))) + -99.0 + 0 + ) + ) + (else + 0 + ) + ) + ) + (none) + ) + +(defmethod spawn-blocking-plane ((this com-airlock) (side symbol)) + (case side + (('front) + (let ((s5-0 (new 'static 'inline-array vector 2 (new 'static 'vector) (new 'static 'vector)))) + (vector-matrix*! + (-> s5-0 0) + (new 'static 'vector :x 40960.0 :w 1.0) + (-> this node-list data 0 bone transform) + ) + (vector-matrix*! + (-> s5-0 1) + (new 'static 'vector :x -40960.0 :w 1.0) + (-> this node-list data 0 bone transform) + ) + (blocking-plane-spawn (the-as curve-control #f) s5-0 122880.0) + ) + ) + (('back) + (let ((s5-1 (new 'static 'inline-array vector 2 (new 'static 'vector) (new 'static 'vector)))) + (vector-matrix*! + (-> s5-1 0) + (new 'static 'vector :x -40960.0 :w 1.0) + (-> this node-list data 0 bone transform) + ) + (vector-matrix*! + (-> s5-1 1) + (new 'static 'vector :x 40960.0 :w 1.0) + (-> this node-list data 0 bone transform) + ) + (blocking-plane-spawn (the-as curve-control #f) s5-1 122880.0) + ) + ) + (else + (blocking-plane-destroy) + ) + ) + 0 + (none) + ) + +(defskelgroup skel-com-airlock-outer com-airlock-outer com-airlock-outer-lod0-jg com-airlock-outer-idle-ja + ((com-airlock-outer-lod0-mg (meters 999999))) + :bounds (static-spherem 0 5 0 14) + ) + +(defskelgroup skel-com-airlock-inner com-airlock-inner com-airlock-inner-lod0-jg com-airlock-inner-idle-ja + ((com-airlock-inner-lod0-mg (meters 999999))) + :bounds (static-spherem 0 5 0 14) + ) + +(defstate close (com-airlock) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('close) + (set! (-> self latch-closed-time) (+ (current-time) (if (>= argc 1) + (the-as int (-> block param 0)) + 3000 + ) + ) + ) + (if (and (>= argc 2) (and (= (-> block param 1) #t) (not (want-cross-airlock? self)))) + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! min) + ) + (and (-> self next-state) (= (-> self next-state name) 'open)) + ) + (('open) + (set! (-> self latch-open-time) (+ (current-time) (if (>= argc 1) + (the-as int (-> block param 0)) + 3000 + ) + ) + ) + (if (and (>= argc 2) (and (= (-> block param 1) #t) (want-cross-airlock? self) (destination-loaded? self #f))) + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! max) + ) + (and (-> self next-state) (= (-> self next-state name) 'close)) + ) + (('front) + (let ((f30-0 (check-crossing-distance self (target-pos 0) #f)) + (f0-3 (check-crossing-distance self (camera-pos) #f)) + ) + (and (< 2048.0 f30-0) (>= (* f30-0 f0-3) 0.0)) + ) + ) + (('back) + (let ((f30-1 (check-crossing-distance self (target-pos 0) #f)) + (f0-5 (check-crossing-distance self (camera-pos) #f)) + ) + (and (< f30-1 -2048.0) (>= (* f30-1 f0-5) 0.0)) + ) + ) + (('sound) + (if (>= (check-crossing-distance self (target-pos 0) #f) 0.0) + (play-city-voice-sound self (the-as symbol (-> block param 0))) + ) + ) + (('distance) + (* (the int (check-crossing-distance self (target-pos 0) #f)) 8) + ) + (('open?) + (-> self open?) + ) + ) + ) + :enter (behavior ((arg0 symbol)) + (set-time! (-> self state-time)) + (set! (-> self visible-move?) #f) + ) + :exit (behavior () + (spawn-blocking-plane self #f) + (when (nonzero? (-> self sound-id)) + (let ((v1-4 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-4 command) (sound-command set-param)) + (set! (-> v1-4 id) (-> self sound-id)) + (set! (-> v1-4 params volume) -4) + (set! (-> v1-4 auto-time) 24) + (set! (-> v1-4 auto-from) 2) + (set! (-> v1-4 params mask) (the-as uint 17)) + (-> v1-4 id) + ) + (set! (-> self sound-id) (new 'static 'sound-id)) + 0 + ) + (when (nonzero? (-> self gear-sound-id)) + (let ((v1-9 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-9 command) (sound-command set-param)) + (set! (-> v1-9 id) (-> self gear-sound-id)) + (set! (-> v1-9 params volume) -4) + (set! (-> v1-9 auto-time) 24) + (set! (-> v1-9 auto-from) 2) + (set! (-> v1-9 params mask) (the-as uint 17)) + (-> v1-9 id) + ) + (set! (-> self gear-sound-id) (new 'static 'sound-id)) + 0 + ) + (airlock-stop-part-trackers) + ) + :trans (behavior () + (if (logtest? (-> self draw status) (draw-control-status on-screen)) + (set! (-> self visible-move?) #t) + ) + (when (and (want-cross-airlock? self) + (and (!= (-> self state-time) (current-time)) + (begin + (let ((gp-0 (res-lump-struct (-> self entity) 'on-activate structure))) + (if gp-0 + (script-eval (the-as pair gp-0)) + ) + ) + (destination-loaded? self #f) + ) + ) + ) + (when (nonzero? (-> self sound-id)) + (let ((v1-19 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-19 command) (sound-command set-param)) + (set! (-> v1-19 id) (-> self sound-id)) + (set! (-> v1-19 params volume) -4) + (set! (-> v1-19 auto-time) 24) + (set! (-> v1-19 auto-from) 2) + (set! (-> v1-19 params mask) (the-as uint 17)) + (-> v1-19 id) + ) + (set! (-> self sound-id) (new 'static 'sound-id)) + 0 + ) + (go-virtual open #f) + ) + (let ((gp-1 (-> self on-running))) + (if gp-1 + (script-eval gp-1) + ) + ) + ) + :code (behavior ((arg0 symbol)) + (process-entity-status! self (entity-perm-status subtask-complete) #f) + (when (not arg0) + ((lambda :behavior com-airlock () (when (ja-max? 0) + (let ((gp-0 (res-lump-struct (-> self entity) 'on-start-close pair))) + (if (and gp-0 (not *scene-player*)) + (script-eval gp-0) + ) + ) + ) + ) + ) + (spawn-blocking-plane self #t) + (if (and (-> self sound-close) + (and (or (-> self sound-behind?) (>= (check-crossing-distance self (target-pos 0) #f) 0.0)) + (not arg0) + (-> self visible-move?) + ) + ) + (sound-play-by-spec (-> self sound-close) (new-sound-id) (the-as vector #t)) + ) + (if (and (-> self sound-close-loop) + (and (or (-> self sound-behind?) (>= (check-crossing-distance self (target-pos 0) #f) 0.0)) + (not arg0) + (-> self visible-move?) + ) + ) + (set! (-> self sound-id) (sound-play-by-spec (-> self sound-close-loop) (new-sound-id) (the-as vector #t))) + ) + (while (< (-> self open-frame) (ja-aframe-num 0)) + (rotate-gear! self 65536.0) + (when (and (-> self were-behind?) + (< 0.4 (vector-dot + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (-> (math-camera-matrix) fvec) + ) + ) + (< 0.0 (check-crossing-distance self (target-pos 0) #f)) + ) + (ja :num-func num-func-identity :frame-num (ja-aframe (-> self open-frame) 0)) + (goto cfg-42) + ) + (suspend) + (ja :num! (seek! 0.0 (-> self close-speed-multiplier))) + (transform-post) + ) + (label cfg-42) + (if (com-airlock-method-26 self (target-pos 0) 'front) + ((lambda :behavior com-airlock + () + (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)) + ) + ) + (when (-> self were-behind?) + (let ((gp-1 (res-lump-struct (-> self entity) 'on-inside structure))) + (set! (-> self were-behind?) #f) + (if (and gp-1 (not *scene-player*)) + (script-eval (the-as pair gp-1)) + ) + ) + ) + ) + ) + ) + (when (nonzero? (-> self sound-id)) + (let ((v1-48 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-48 command) (sound-command set-param)) + (set! (-> v1-48 id) (-> self sound-id)) + (set! (-> v1-48 params volume) -4) + (set! (-> v1-48 auto-time) 24) + (set! (-> v1-48 auto-from) 2) + (set! (-> v1-48 params mask) (the-as uint 17)) + (-> v1-48 id) + ) + (set! (-> self sound-id) (new 'static 'sound-id)) + 0 + ) + (if (and (-> self sound-close-stop) (not arg0) (-> self visible-move?)) + (sound-play-by-spec (-> self sound-close-stop) (new-sound-id) (the-as vector #t)) + ) + (while (not (ja-min? 0)) + (if (and (zero? (-> self sound-id)) + (-> self sound-post-close) + (and (or (-> self sound-behind?) (>= (check-crossing-distance self (target-pos 0) #f) 0.0)) + (not arg0) + (-> self visible-move?) + ) + ) + (set! (-> self sound-id) (sound-play-by-spec (-> self sound-post-close) (new-sound-id) (the-as vector #t))) + ) + (rotate-gear! self 65536.0) + (suspend) + (ja :num! (seek! 0.0)) + (transform-post) + ) + (when (nonzero? (-> self sound-id)) + (let ((v1-73 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-73 command) (sound-command set-param)) + (set! (-> v1-73 id) (-> self sound-id)) + (set! (-> v1-73 params volume) -4) + (set! (-> v1-73 auto-time) 24) + (set! (-> v1-73 auto-from) 2) + (set! (-> v1-73 params mask) (the-as uint 17)) + (-> v1-73 id) + ) + (set! (-> self sound-id) (new 'static 'sound-id)) + (if (-> self sound-post-close-stop) + (sound-play-by-spec (-> self sound-post-close-stop) (new-sound-id) (the-as vector #t)) + ) + ) + (set! (-> self open?) #f) + (when (com-airlock-method-26 self (target-pos 0) 'front) + (let ((gp-3 (res-lump-struct (-> self entity) 'on-deactivate structure))) + (if (and gp-3 (not *scene-player*)) + (script-eval (the-as pair gp-3)) + ) + ) + ) + (while (!= (-> self gear-rotv) 0.0) + (rotate-gear! self 0.0) + (suspend) + (transform-post) + ) + (when (nonzero? (-> self gear-sound-id)) + (let ((v1-93 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-93 command) (sound-command set-param)) + (set! (-> v1-93 id) (-> self gear-sound-id)) + (set! (-> v1-93 params volume) -4) + (set! (-> v1-93 auto-time) 24) + (set! (-> v1-93 auto-from) 2) + (set! (-> v1-93 params mask) (the-as uint 17)) + (-> v1-93 id) + ) + (set! (-> self gear-sound-id) (new 'static 'sound-id)) + 0 + ) + (airlock-stop-part-trackers) + ) + (spawn-blocking-plane self #f) + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! min) + (transform-post) + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + 0 + ) + ) + +(defstate open (com-airlock) + :virtual #t + :event (-> (method-of-type com-airlock close) event) + :enter (behavior ((arg0 symbol)) + (set! (-> self visible-move?) #f) + ) + :exit (-> (method-of-type com-airlock close) exit) + :trans (behavior () + (if (logtest? (-> self draw status) (draw-control-status on-screen)) + (set! (-> self visible-move?) #t) + ) + (if (not (want-cross-airlock? self)) + (go-virtual close #f) + ) + (when (logtest? (-> self mask) (process-mask sleep-code)) + (let ((v1-15 (destination-loaded? self 'display))) + (when (or (not v1-15) (= v1-15 'unknown)) + (if (and (not v1-15) (< (-> self open-frame) (ja-aframe-num 0))) + (ja :num-func num-func-identity :frame-num (ja-aframe (-> self open-frame) 0)) + ) + (go-virtual close #f) + ) + ) + ) + (let ((gp-1 (-> self on-running))) + (if gp-1 + (script-eval gp-1) + ) + ) + ) + :code (behavior ((arg0 symbol)) + (when (not arg0) + ((lambda :behavior com-airlock + () + (when (ja-min? 0) + (let ((gp-0 (res-lump-struct (-> self entity) 'on-start-open pair))) + (if (and gp-0 (not *scene-player*) (time-elapsed? (-> self start-open-time) (seconds 0.1))) + (script-eval gp-0) + ) + ) + ) + ) + ) + (set-time! (-> self start-open-time)) + (when (< (check-crossing-distance self (target-pos 0) #f) 0.0) + (if (< (ja-aframe-num 0) (-> self pre-open-frame)) + (ja :num-func num-func-identity :frame-num (ja-aframe (-> self pre-open-frame) 0)) + ) + ) + (while (< (ja-aframe-num 0) (-> self lock-frame)) + (if (and (zero? (-> self sound-id)) + (-> self sound-pre-open) + (and (or (-> self sound-behind?) (>= (check-crossing-distance self (target-pos 0) #f) 0.0)) + (not arg0) + (-> self visible-move?) + ) + ) + (set! (-> self sound-id) (sound-play-by-spec (-> self sound-pre-open) (new-sound-id) (the-as vector #t))) + ) + (rotate-gear! self 65536.0) + (suspend) + (ja :num! (seek! (ja-aframe (-> self lock-frame) 0) (-> self pre-open-speed))) + (transform-post) + ) + (when (nonzero? (-> self sound-id)) + (let ((v1-29 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-29 command) (sound-command set-param)) + (set! (-> v1-29 id) (-> self sound-id)) + (set! (-> v1-29 params volume) -4) + (set! (-> v1-29 auto-time) 24) + (set! (-> v1-29 auto-from) 2) + (set! (-> v1-29 params mask) (the-as uint 17)) + (-> v1-29 id) + ) + (set! (-> self sound-id) (new 'static 'sound-id)) + (if (-> self sound-pre-open-stop) + (sound-play-by-spec (-> self sound-pre-open-stop) (new-sound-id) (the-as vector #t)) + ) + ) + (while (< (ja-aframe-num 0) (-> self open-frame)) + (if (and (zero? (-> self sound-id)) + (-> self sound-lock-loop) + (and (or (-> self sound-behind?) (>= (check-crossing-distance self (target-pos 0) #f) 0.0)) + (not arg0) + (-> self visible-move?) + ) + ) + (set! (-> self sound-id) (sound-play-by-spec (-> self sound-lock-loop) (new-sound-id) (the-as vector #t))) + ) + (rotate-gear! self 65536.0) + (suspend) + (ja :num! (seek! (ja-aframe (-> self open-frame) 0) 2.0)) + (transform-post) + ) + (when (nonzero? (-> self sound-id)) + (let ((v1-52 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-52 command) (sound-command set-param)) + (set! (-> v1-52 id) (-> self sound-id)) + (set! (-> v1-52 params volume) -4) + (set! (-> v1-52 auto-time) 24) + (set! (-> v1-52 auto-from) 2) + (set! (-> v1-52 params mask) (the-as uint 17)) + (-> v1-52 id) + ) + (set! (-> self sound-id) (new 'static 'sound-id)) + (if (-> self sound-lock-stop) + (sound-play-by-spec (-> self sound-lock-stop) (new-sound-id) (the-as vector #t)) + ) + ) + (while (not (destination-loaded? self #t)) + (if (not (destination-loaded? self #f)) + (go-virtual close #f) + ) + (rotate-gear! self 65536.0) + (suspend) + (transform-post) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (set! (-> self open?) #t) + (let ((s5-10 (res-lump-struct (-> self entity) 'on-enter structure))) + (if s5-10 + (script-eval (the-as pair s5-10)) + ) + ) + (if (and (-> self sound-open) + (and (or (-> self sound-behind?) (>= (check-crossing-distance self (target-pos 0) #f) 0.0)) + (not arg0) + (-> self visible-move?) + ) + ) + (sound-play-by-spec (-> self sound-open) (new-sound-id) (the-as vector #t)) + ) + (if (and (-> self sound-open-loop) + (and (or (-> self sound-behind?) (>= (check-crossing-distance self (target-pos 0) #f) 0.0)) + (not arg0) + (-> self visible-move?) + ) + ) + (set! (-> self sound-id) (sound-play-by-spec (-> self sound-open-loop) (new-sound-id) (the-as vector #t))) + ) + (set! (-> *ACTOR-bank* birth-max) 1000) + (while (not (ja-max? 0)) + (rotate-gear! self 65536.0) + (suspend) + (ja :num! (seek!)) + (transform-post) + ) + (when (nonzero? (-> self sound-id)) + (let ((v1-104 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-104 command) (sound-command set-param)) + (set! (-> v1-104 id) (-> self sound-id)) + (set! (-> v1-104 params volume) -4) + (set! (-> v1-104 auto-time) 24) + (set! (-> v1-104 auto-from) 2) + (set! (-> v1-104 params mask) (the-as uint 17)) + (-> v1-104 id) + ) + (set! (-> self sound-id) (new 'static 'sound-id)) + 0 + ) + (when (nonzero? (-> self gear-sound-id)) + (let ((v1-109 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-109 command) (sound-command set-param)) + (set! (-> v1-109 id) (-> self gear-sound-id)) + (set! (-> v1-109 params volume) -4) + (set! (-> v1-109 auto-time) 24) + (set! (-> v1-109 auto-from) 2) + (set! (-> v1-109 params mask) (the-as uint 17)) + (-> v1-109 id) + ) + (set! (-> self gear-sound-id) (new 'static 'sound-id)) + 0 + ) + (airlock-stop-part-trackers) + (if (and (-> self sound-open-stop) (not arg0) (-> self visible-move?)) + (sound-play-by-spec (-> self sound-open-stop) (new-sound-id) (the-as vector #t)) + ) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (set! (-> self open?) #t) + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! max) + (transform-post) + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + 0 + ) + ) + +(deftype com-airlock-outer (com-airlock) + () + ) + + +(defmethod init-from-entity! ((this com-airlock-outer) (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 20480.0 0.0 57344.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) 4) + (set-vector! (-> v1-8 local-sphere) 0.0 20480.0 0.0 32768.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 7) + (set-vector! (-> v1-10 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-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) + ) + (init-airlock! this) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-com-airlock-outer" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (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 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) + ) + +(deftype com-airlock-inner (com-airlock) + () + ) + + +(defmethod init-from-entity! ((this com-airlock-inner) (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 20480.0 0.0 57344.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) 4) + (set-vector! (-> v1-8 local-sphere) 0.0 20480.0 0.0 32768.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 8) + (set-vector! (-> v1-10 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-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-com-airlock-inner" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this lock-frame) 37.0) + (set! (-> this pre-open-frame) 65.0) + (set! (-> this open-frame) 75.0) + (set! (-> this gear) (new 'process 'joint-mod (joint-mod-mode rotate) this 12)) + (set! (-> this inner?) + (logtest? (the-as + int + (res-lump-value (-> this entity) 'options uint128 :default (the-as uint128 1) :time -1000000000.0) + ) + 1 + ) + ) + (set! (-> this pre-open-speed) 0.9) + (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) + ) + +(defskelgroup skel-cty-door cty-door cty-door-lod0-jg cty-door-idle-ja + ((cty-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 5 0 8) + ) + +(deftype cty-door (com-airlock) + () + ) + + +(defmethod init-from-entity! ((this cty-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 20480.0 0.0 32768.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) 4) + (set-vector! (-> v1-8 local-sphere) 0.0 20480.0 0.0 28672.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 5) + (set-vector! (-> v1-10 local-sphere) 0.0 20480.0 0.0 28672.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-cty-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (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) + ) + +(defskelgroup skel-vin-door-ctyinda vin-door-ctyinda vin-door-ctyinda-lod0-jg vin-door-ctyinda-idle-ja + ((vin-door-ctyinda-lod0-mg (meters 999999))) + :bounds (static-spherem 0 3 0 6) + ) + +(deftype vin-door-ctyinda (com-airlock) + () + ) + + +(defmethod init-from-entity! ((this vin-door-ctyinda) (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 12288.0 0.0 24576.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) 4) + (set-vector! (-> v1-8 local-sphere) 8192.0 16384.0 0.0 20480.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 5) + (set-vector! (-> v1-10 local-sphere) -8192.0 16384.0 0.0 20480.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-vin-door-ctyinda" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (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) + ) + +(defskelgroup skel-com-airlock-outer-mhcity com-airlock-outer-mhcity com-airlock-outer-mhcity-lod0-jg com-airlock-outer-mhcity-idle-ja + ((com-airlock-outer-mhcity-lod0-mg (meters 999999))) + :bounds (static-spherem 0 5 0 14) + ) + +(deftype com-airlock-outer-mhcity (com-airlock) + () + ) + + +(defmethod init-from-entity! ((this com-airlock-outer-mhcity) (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 20480.0 0.0 57344.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) 4) + (set-vector! (-> v1-8 local-sphere) 0.0 20480.0 0.0 32768.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 5) + (set-vector! (-> v1-10 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-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) + ) + (init-airlock! this) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-com-airlock-outer-mhcity" (the-as (pointer level) #f)) + ) + (the-as pair 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-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) + ) + +(defskelgroup skel-hip-door-a hip-door-a hip-door-a-lod0-jg hip-door-a-idle-ja + ((hip-door-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 5) + ) + +(deftype hip-door-a (com-airlock) + () + ) + + +(defmethod init-from-entity! ((this hip-door-a) (arg0 entity-actor)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) + (set! (-> s5-0 total-prims) (the-as uint 3)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 8192.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 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 4) + (set-vector! (-> v1-8 local-sphere) 0.0 8192.0 0.0 16384.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 5) + (set-vector! (-> v1-10 local-sphere) 0.0 8192.0 0.0 16384.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-hip-door-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (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/base-plat.gc b/goal_src/jak3/engine/common-obs/base-plat.gc index d7c3f39a48..30a8d75aea 100644 --- a/goal_src/jak3/engine/common-obs/base-plat.gc +++ b/goal_src/jak3/engine/common-obs/base-plat.gc @@ -5,5 +5,368 @@ ;; name in dgo: base-plat ;; dgos: GAME +;; +++eco-door-flags +(defenum eco-door-flags + :type int32 + :bitfield #t + (locked 0) + (unlocked 1) + (auto-close 2) + (one-way 3) + ) +;; ---eco-door-flags + + ;; DECOMP BEGINS +(deftype base-plat (process-focusable) + ((smush smush-control :inline) + (basetrans vector :inline) + (bounce-time time-frame) + (bouncing symbol) + (bounce-scale meters) + ) + (:methods + (update-part-and-sfx! (_type_) none) + (init-bounce-params! (_type_) none) + (start-bounce! (_type_) none :behavior base-plat) + (get-art-group (_type_) art-group) + (init-collision! (_type_) none) + (base-plat-method-33 (_type_) none) + (base-plat-method-34 (_type_) none) + ) + ) + + +(defmethod base-plat-method-34 ((this base-plat)) + 0 + (none) + ) + +(defmethod init-bounce-params! ((this base-plat)) + (set! (-> this basetrans quad) (-> this root trans quad)) + (set! (-> this bouncing) #f) + (set! (-> this bounce-scale) 819.2) + 0 + (none) + ) + +(defmethod start-bounce! ((this base-plat)) + (activate! (-> this smush) -1.0 60 150 1.0 1.0 (-> self clock)) + (set-time! (-> this bounce-time)) + (set! (-> this bouncing) #t) + (sound-play "plat-bounce" :position (-> this root trans)) + (logclear! (-> this mask) (process-mask sleep)) + (logclear! (-> this mask) (process-mask sleep-code)) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior plat-code base-plat () + (transform-post) + (suspend) + (transform-post) + (suspend) + (until #f + (when (not (-> self bouncing)) + (logior! (-> self mask) (process-mask sleep)) + (suspend) + 0 + ) + (while (-> self bouncing) + (suspend) + ) + ) + #f + (none) + ) + +(defbehavior plat-trans base-plat () + (rider-trans) + (cond + ((-> self bouncing) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self basetrans quad)) + (+! (-> gp-0 y) (* (-> self bounce-scale) (update! (-> self smush)))) + (move-to-point! (-> self root) gp-0) + ) + (if (not (!= (-> self smush amp) 0.0)) + (set! (-> self bouncing) #f) + ) + ) + (else + (move-to-point! (-> self root) (-> self basetrans)) + ) + ) + (none) + ) + +(defbehavior plat-post base-plat () + (update-part-and-sfx! self) + (rider-post) + (none) + ) + +(defmethod base-plat-method-33 ((this base-plat)) + 0 + (none) + ) + +(defmethod update-part-and-sfx! ((this base-plat)) + (if (nonzero? (-> this part)) + (spawn (-> this part) (-> this root trans)) + ) + (when (nonzero? (-> this sound)) + (set! (-> this sound trans quad) (-> this root trans quad)) + (update! (-> this sound)) + ) + (none) + ) + +;; WARN: Return type mismatch none vs object. +(defbehavior plat-event base-plat ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('bonk) + (start-bounce! self) + ) + ) + ) + +(deftype eco-door (process-drawable) + ((root collide-shape :override) + (speed float) + (open-distance float) + (close-distance float) + (out-dir vector :inline) + (open-sound sound-name) + (close-sound sound-name) + (state-actor entity-actor) + (flags eco-door-flags) + (locked symbol) + (auto-close symbol) + (one-way symbol) + ) + (:state-methods + door-closed + door-opening + door-open + door-closing + ) + (:methods + (update-lock-status! (_type_) none) + (init-collision! (_type_) none) + (eco-door-method-26 (_type_) none) + ) + ) + + +;; WARN: Return type mismatch symbol vs object. +(defbehavior eco-door-event-handler eco-door ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('trigger) + (set! (-> self locked) (not (-> self locked))) + (cond + ((-> self locked) + (if (and (-> self next-state) (= (-> self next-state name) 'door-closed)) + (sound-play "door-lock") + ) + ) + (else + (sound-play "door-unlock") + ) + ) + #t + ) + ) + ) + +(defstate door-closed (eco-door) + :virtual #t + :code (behavior () + (ja :num-func num-func-identity :frame-num 0.0) + (suspend) + (update-transforms (-> self root)) + (ja-post) + (until #f + (when (and *target* + (and (>= (-> self open-distance) (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (update-lock-status! self) + (if (and (not (-> self locked)) + (or (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + (send-event *target* 'query 'powerup (pickup-type eco-blue)) + (and (-> self one-way) (< (vector4-dot (-> self out-dir) (target-pos 0)) -8192.0)) + ) + ) + (go-virtual door-opening) + ) + ) + (suspend) + ) + #f + ) + ) + +(defstate door-opening (eco-door) + :virtual #t + :code (behavior () + (if (and (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + ) + (send-event *target* 'query 'powerup (pickup-type eco-blue)) + ) + (sound-play "blue-eco-on" :position (-> self root trans)) + ) + (sound-play-by-name (-> self open-sound) (new-sound-id) 1024 0 0 (sound-group) #t) + (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 + (until (ja-done? 0) + (ja :num! (seek! max (-> self speed))) + (suspend) + ) + (go-virtual door-open) + ) + :post transform-post + ) + +(defstate door-open (eco-door) + :virtual #t + :code (behavior () + (set-time! (-> self state-time)) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (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 + (ja :num-func num-func-identity :frame-num max) + (logior! (-> self draw status) (draw-control-status no-draw)) + (suspend) + (update-transforms (-> self root)) + (ja-post) + (until #f + (let ((f30-0 (vector4-dot (-> self out-dir) (target-pos 0))) + (f28-0 (vector4-dot (-> self out-dir) (camera-pos))) + ) + (when (and (-> self auto-close) + (or (not *target*) + (or (< (-> self close-distance) (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (focus-test? *target* teleporting) + ) + ) + ) + (if (and (>= (* f30-0 f28-0) 0.0) (< 16384.0 (fabs f28-0))) + (go-virtual door-closing) + ) + ) + ) + (suspend) + ) + #f + ) + ) + +(defstate door-closing (eco-door) + :virtual #t + :code (behavior () + (let ((v1-1 (-> self root root-prim))) + (set! (-> v1-1 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-1 prim-core collide-with) (-> self root backup-collide-with)) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (let ((gp-0 (new 'stack 'overlaps-others-params))) + (set! (-> gp-0 options) (overlaps-others-options oo0)) + (set! (-> gp-0 tlist) #f) + (while (find-overlapping-shapes (-> self root) gp-0) + (suspend) + ) + ) + (sound-play-by-name (-> self close-sound) (new-sound-id) 1024 0 0 (sound-group) #t) + (until (ja-done? 0) + (ja :num! (seek! 0.0 (-> self speed))) + (suspend) + ) + (if (-> self locked) + (sound-play "door-lock") + ) + (go-virtual door-closed) + ) + :post transform-post + ) + +(defmethod update-lock-status! ((this eco-door)) + (when (-> this state-actor) + (if (logtest? (-> this state-actor extra perm status) (entity-perm-status subtask-complete)) + (set! (-> this locked) (logtest? (-> this flags) (eco-door-flags unlocked))) + (set! (-> this locked) (logtest? (-> this flags) (eco-door-flags locked))) + ) + ) + 0 + (none) + ) + +(defmethod init-collision! ((this eco-door)) + (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 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) 0) + (set-vector! (-> v1-2 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-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 eco-door-method-26 ((this eco-door)) + 0 + (none) + ) + +(defmethod init-from-entity! ((this eco-door) (arg0 entity-actor)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (let ((f0-0 (res-lump-float (-> this entity) 'scale :default 1.0))) + (set-vector! (-> this root scale) f0-0 f0-0 f0-0 1.0) + ) + (set! (-> this open-distance) 32768.0) + (set! (-> this close-distance) 49152.0) + (set! (-> this speed) 1.0) + (set! (-> this state-actor) #f) + (let ((v1-8 (entity-actor-lookup arg0 'state-actor 0))) + (if v1-8 + (set! (-> this state-actor) v1-8) + ) + ) + (set! (-> this locked) #f) + (set! (-> this flags) (res-lump-value arg0 'flags eco-door-flags :time -1000000000.0)) + (update-lock-status! this) + (set! (-> this auto-close) (logtest? (-> this flags) (eco-door-flags auto-close))) + (set! (-> this one-way) (logtest? (-> this flags) (eco-door-flags one-way))) + (vector-z-quaternion! (-> this out-dir) (-> this root quat)) + (set! (-> this out-dir w) (- (vector-dot (-> this out-dir) (-> this root trans)))) + (update-transforms (-> this root)) + (eco-door-method-26 this) + (if (and (not (-> this auto-close)) + (-> this entity) + (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + ) + (go (method-of-object this door-open)) + (go (method-of-object this door-closed)) + ) + ) diff --git a/goal_src/jak3/engine/common-obs/basebutton.gc b/goal_src/jak3/engine/common-obs/basebutton.gc index 09502edc7a..4306b57045 100644 --- a/goal_src/jak3/engine/common-obs/basebutton.gc +++ b/goal_src/jak3/engine/common-obs/basebutton.gc @@ -5,5 +5,447 @@ ;; name in dgo: basebutton ;; dgos: MIA +;; +++button-status +(defenum button-status + :type uint16 + :bitfield #t + (pressed) + (button-status-1) + (button-status-2) + (button-status-3) + (button-status-4) + ) +;; ---button-status + + ;; DECOMP BEGINS +(deftype basebutton (process-focusable) + ((button-status button-status) + (notify-actor entity) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (timeout float) + (button-id int32) + (event-going-down symbol) + (event-down symbol) + (event-going-up symbol) + (event-up symbol) + (anim-speed float) + (move-to-pos vector :inline) + (move-to-quat quaternion :inline) + ) + (:state-methods + down-idle + going-down + going-up + up-idle + ) + (:methods + (init! (_type_) none) + (idle-state-transition (_type_) object) + (init-skel-and-ja! (_type_) none) + (init-collision! (_type_) none) + (prepare-trigger-event! (_type_) none) + (send-event! (_type_ symbol) none) + (move-to! (_type_ vector quaternion) none) + (press! (_type_ symbol) entity-perm-status) + ) + ) + + +(defskelgroup skel-generic-button mtn-dice-button 0 3 ((1 (meters 999999))) :bounds (static-spherem 0 0 0 3)) + +(defmethod move-to! ((this basebutton) (arg0 vector) (arg1 quaternion)) + (logclear! (-> this button-status) (button-status button-status-2)) + (if arg0 + (set! (-> this move-to-pos quad) (-> arg0 quad)) + (set! (-> this move-to-pos quad) (-> this root trans quad)) + ) + (if arg1 + (quaternion-copy! (-> this move-to-quat) arg1) + (quaternion-copy! (-> this move-to-quat) (-> this root quat)) + ) + 0 + (none) + ) + +(defmethod idle-state-transition ((this basebutton)) + (if (logtest? (-> this button-status) (button-status pressed)) + (go (method-of-object this down-idle)) + (go (method-of-object this up-idle)) + ) + ) + +(defstate up-idle (basebutton) + :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)))) + (case (-> v1-1 mode) + (('flop 'spin 'punch 'eco-yellow 'eco-red 'eco-blue 'eco-dark) + (when (or (not (or (= (-> v1-1 mode) 'spin) (= (-> v1-1 mode) 'punch))) + (logtest? (-> self button-status) (button-status button-status-3)) + ) + (send-event! self (-> self event-going-down)) + (go-virtual going-down) + ) + ) + ) + ) + ) + (('trigger) + (sound-play "silo-button") + (go-virtual going-down) + ) + (('touch) + (when (logtest? (-> self button-status) (button-status button-status-4)) + (send-event! self (-> self event-going-down)) + (go-virtual going-down) + ) + ) + (('move-to) + (move-to! self (the-as vector (-> block param 0)) (the-as quaternion (-> block param 1))) + ) + ) + ) + :enter (behavior () + (press! self #f) + ) + :trans (behavior () + (if (logtest? (-> self button-status) (button-status button-status-2)) + (rider-trans) + ) + ) + :code sleep-code + :post (behavior () + (when (logtest? (-> self button-status) (button-status button-status-2)) + (logclear! (-> self button-status) (button-status button-status-2)) + (set! (-> self root trans quad) (-> self move-to-pos quad)) + (quaternion-copy! (-> self root quat) (-> self move-to-quat)) + (rider-post) + ) + ) + ) + +(defstate going-down (basebutton) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('untrigger) + (go-virtual going-up) + ) + (('move-to) + (move-to! self (the-as vector (-> block param 0)) (the-as quaternion (-> block param 1))) + ) + ) + ) + :enter (behavior () + (press! self #t) + ) + :trans rider-trans + :code (behavior () + (ja-no-eval :num! (seek! max (-> self anim-speed))) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (-> self anim-speed))) + ) + (send-event! self (-> self event-down)) + (let ((gp-0 (res-lump-struct (-> self entity) 'on-activate structure))) + (if gp-0 + (script-eval (the-as pair gp-0)) + ) + ) + (go-virtual down-idle) + ) + :post (behavior () + (when (logtest? (-> self button-status) (button-status button-status-2)) + (logclear! (-> self button-status) (button-status button-status-2)) + (set! (-> self root trans quad) (-> self move-to-pos quad)) + (quaternion-copy! (-> self root quat) (-> self move-to-quat)) + ) + (rider-post) + ) + ) + +(defstate down-idle (basebutton) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('untrigger) + (go-virtual going-up) + ) + (('move-to) + (move-to! self (the-as vector (-> block param 0)) (the-as quaternion (-> block param 1))) + ) + ) + ) + :enter (behavior () + (press! self #t) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (logtest? (-> self button-status) (button-status button-status-2)) + (rider-trans) + ) + ) + :code (behavior () + (cond + ((= (-> self timeout) 0.0) + (sleep-code) + ) + (else + (until (time-elapsed? (-> self state-time) (the int (* 300.0 (-> self timeout)))) + (suspend) + ) + (send-event! self (-> self event-going-up)) + (sound-play "silo-button") + (go-virtual going-up) + ) + ) + ) + :post (behavior () + (when (logtest? (-> self button-status) (button-status button-status-2)) + (logclear! (-> self button-status) (button-status button-status-2)) + (set! (-> self root trans quad) (-> self move-to-pos quad)) + (quaternion-copy! (-> self root quat) (-> self move-to-quat)) + (rider-post) + ) + ) + ) + +(defstate going-up (basebutton) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('move-to) + (move-to! self (the-as vector (-> block param 0)) (the-as quaternion (-> block param 1))) + ) + (('trigger) + (go-virtual going-down) + ) + ) + ) + :enter (behavior () + (press! self #f) + ) + :trans rider-trans + :code (behavior () + (ja-no-eval :num! (seek! 0.0 (-> self anim-speed))) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 0.0 (-> self anim-speed))) + ) + (send-event! self (-> self event-up)) + (go-virtual up-idle) + ) + :post (behavior () + (when (logtest? (-> self button-status) (button-status button-status-2)) + (logclear! (-> self button-status) (button-status button-status-2)) + (set! (-> self root trans quad) (-> self move-to-pos quad)) + (quaternion-copy! (-> self root quat) (-> self move-to-quat)) + ) + (rider-post) + ) + ) + +(defmethod press! ((this basebutton) (arg0 symbol)) + (if arg0 + (logior! (-> this button-status) (button-status pressed)) + (logclear! (-> this button-status) (button-status pressed)) + ) + (when (not (logtest? (-> this button-status) (button-status button-status-1))) + (if arg0 + (process-entity-status! this (entity-perm-status subtask-complete) #t) + (process-entity-status! this (entity-perm-status subtask-complete) #f) + ) + ) + ) + +(defmethod send-event! ((this basebutton) (arg0 symbol)) + (with-pp + (when arg0 + (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) arg0) + (let ((t9-0 send-event-function) + (v1-2 (-> this notify-actor)) + ) + (t9-0 + (if v1-2 + (-> v1-2 extra process) + ) + a1-1 + ) + ) + ) + (dotimes (s4-0 (-> this actor-group-count)) + (let ((s3-0 (-> this actor-group s4-0))) + (dotimes (s2-0 (-> s3-0 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) arg0) + (let ((t9-1 send-event-function) + (v1-10 (-> s3-0 data s2-0 actor)) + ) + (t9-1 + (if v1-10 + (-> v1-10 extra process) + ) + a1-2 + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod init! ((this basebutton)) + (set! (-> this button-status) (button-status)) + (set! (-> this notify-actor) #f) + (set! (-> this timeout) 0.0) + (set! (-> this event-going-down) #f) + (set! (-> this event-down) #f) + (set! (-> this event-going-up) #f) + (set! (-> this event-up) #f) + (set! (-> this anim-speed) 1.0) + 0 + (none) + ) + +(defmethod prepare-trigger-event! ((this basebutton)) + (set! (-> this event-going-down) 'trigger) + 0 + (none) + ) + +(defmethod init-skel-and-ja! ((this basebutton)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-generic-button" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (ja-channel-set! 1) + (cond + ((logtest? (-> this button-status) (button-status pressed)) + (let ((s5-1 (-> this skel root-channel 0))) + (joint-control-channel-group-eval! + s5-1 + (the-as art-joint-anim (-> this draw art-group data 3)) + num-func-identity + ) + (set! (-> s5-1 frame-num) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 3)) frames num-frames) -1)) + ) + ) + ) + (else + (let ((s5-2 (-> this skel root-channel 0))) + (joint-control-channel-group-eval! + s5-2 + (the-as art-joint-anim (-> this draw art-group data 3)) + num-func-identity + ) + (set! (-> s5-2 frame-num) 0.0) + ) + ) + ) + (set! (-> this anim-speed) 2.0) + (transform-post) + (none) + ) + +(defmethod init-collision! ((this basebutton)) + (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 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! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 12288.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 basebutton) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (init! this) + (set! (-> this button-id) -1) + (let ((v1-4 (res-lump-value (-> this entity) 'extra-id uint128 :default (the-as uint128 -1) :time -1000000000.0))) + (if (>= (the-as int v1-4) 0) + (set! (-> this button-id) (the-as int v1-4)) + ) + ) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (if (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (logior! (-> this button-status) (button-status pressed)) + (logclear! (-> this button-status) (button-status pressed)) + ) + (set! (-> this notify-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-15 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-15 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-15)) + (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 timeout) (res-lump-float arg0 'timeout)) + (if (not (logtest? (-> this button-status) (button-status button-status-1))) + (nav-mesh-connect-from-ent this) + ) + (prepare-trigger-event! this) + (init-skel-and-ja! this) + (idle-state-transition this) + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior basebutton-init-by-other basebutton ((arg0 entity-actor) (arg1 vector) (arg2 quaternion) (arg3 entity-actor) (arg4 symbol) (arg5 float)) + (init! self) + (logior! (-> self button-status) (button-status button-status-1)) + (set! (-> self button-id) -1) + (if arg4 + (logior! (-> self button-status) (button-status pressed)) + ) + (set! (-> self notify-actor) arg3) + (set! (-> self timeout) arg5) + (if arg0 + (process-entity-set! self arg0) + ) + (set! (-> self actor-group) (the-as (pointer actor-group) #f)) + (set! (-> self actor-group-count) 0) + (init-collision! self) + (set! (-> self root trans quad) (-> arg1 quad)) + (quaternion-copy! (-> self root quat) arg2) + (set-vector! (-> self root scale) 1.0 1.0 1.0 1.0) + (prepare-trigger-event! self) + (init-skel-and-ja! self) + (idle-state-transition self) + (none) + ) diff --git a/goal_src/jak3/engine/common-obs/blocking-plane.gc b/goal_src/jak3/engine/common-obs/blocking-plane.gc index ca8a655c72..7b681e325a 100644 --- a/goal_src/jak3/engine/common-obs/blocking-plane.gc +++ b/goal_src/jak3/engine/common-obs/blocking-plane.gc @@ -7,3 +7,261 @@ ;; DECOMP BEGINS +(deftype blocking-plane (process-drawable) + ((root collide-shape :override) + (current-attack-mode symbol) + ) + (:state-methods + idle + ) + (:methods + (init! (_type_ (inline-array vector) float) none) + ) + ) + + +(defskelgroup skel-blocking-plane blocking-plane blocking-plane-lod0-jg blocking-plane-idle-ja + ((blocking-plane-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 100.1) + :texture-level 10 + ) + +(defstate idle (blocking-plane) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 object)) + (case message + (('on) + (cond + ((nonzero? (-> self root)) + (let ((v1-3 (-> self root root-prim))) + (set! (-> v1-3 prim-core collide-as) (-> self root backup-collide-as)) + (set! v0-0 (-> self root backup-collide-with)) + (set! (-> v1-3 prim-core collide-with) (the-as collide-spec v0-0)) + ) + v0-0 + ) + (else + (let ((gp-1 (-> self child))) + (while gp-1 + (let ((s5-0 (ppointer->process gp-1))) + (set! gp-1 (-> gp-1 0 brother)) + (if (type? s5-0 blocking-plane) + (send-event s5-0 'on) + ) + ) + ) + ) + #f + ) + ) + ) + (('off) + (cond + ((nonzero? (-> self root)) + (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 + ) + (else + (let ((gp-2 (-> self child))) + (while gp-2 + (let ((s5-1 (ppointer->process gp-2))) + (set! gp-2 (-> gp-2 0 brother)) + (if (type? s5-1 blocking-plane) + (send-event s5-1 'off) + ) + ) + ) + ) + #f + ) + ) + ) + (('collide-as) + (set! v0-0 (-> block param 0)) + (set! (-> self root root-prim prim-core collide-as) (the-as collide-spec v0-0)) + v0-0 + ) + (('attack-mode) + (set! v0-0 (-> block param 0)) + (set! (-> self current-attack-mode) (the-as symbol v0-0)) + v0-0 + ) + (('touch 'bonk 'attack) + (when (-> self current-attack-mode) + (let ((v1-25 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (if (< (vector-dot + (vector-! (new 'stack-no-clear 'vector) (-> (the-as process-drawable proc) root trans) (-> self root trans)) + v1-25 + ) + 0.0 + ) + (vector-float*! v1-25 v1-25 -1.0) + ) + (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) + (mode (-> self current-attack-mode)) + (vector v1-25) + (shove-up (meters 2)) + (shove-back (meters 4)) + ) + ) + ) + ) + ) + ) + (('impact-impulse) + (send-event (ppointer->process (-> self parent)) 'blocking-plane-hit (-> block param 0)) + ) + ) + ) + :code sleep-code + ) + +(defmethod init! ((this blocking-plane) (arg0 (inline-array vector)) (arg1 float)) + (let ((s3-0 (-> arg0 0)) + (s4-0 (-> arg0 1)) + ) + 0.0 + (* 0.5 (vector-vector-distance s3-0 s4-0)) + (let ((s2-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-3 (new 'process 'collide-shape-prim-mesh s2-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-3 prim-core collide-as) (collide-spec obstacle blocking-plane)) + (set! (-> v1-3 prim-core collide-with) (collide-spec jak vehicle-sphere hit-by-others-list player-list)) + (set! (-> v1-3 prim-core action) (collide-action solid)) + (set! (-> v1-3 transform-index) 3) + (set! (-> s2-0 total-prims) (the-as uint 1)) + (set! (-> s2-0 root-prim) v1-3) + ) + (set! (-> s2-0 nav-radius) (* 0.75 (-> s2-0 root-prim local-sphere w))) + (let ((v1-6 (-> s2-0 root-prim))) + (set! (-> s2-0 backup-collide-as) (-> v1-6 prim-core collide-as)) + (set! (-> s2-0 backup-collide-with) (-> v1-6 prim-core collide-with)) + ) + (set! (-> this root) s2-0) + ) + (let ((s1-0 (new 'stack-no-clear 'matrix)) + (s2-1 (-> this root)) + ) + (vector+! (-> s2-1 trans) s3-0 s4-0) + (vector-float*! (-> s2-1 trans) (-> s2-1 trans) 0.5) + (+! (-> s2-1 trans y) (* 0.5 arg1)) + (vector-! (-> s1-0 rvec) s4-0 s3-0) + (let ((f30-1 (vector-normalize-ret-len! (-> s1-0 rvec) 1.0))) + (set! (-> s2-1 scale x) (* 0.00024414062 f30-1)) + (set! (-> s2-1 scale y) (* 0.00024414062 arg1)) + (set! (-> s2-1 scale z) 0.0) + (set! (-> s1-0 uvec quad) (-> (new 'static 'vector :y 1.0 :w 1.0) quad)) + (vector-cross! (-> s1-0 fvec) (-> s1-0 rvec) (-> s1-0 uvec)) + (vector-normalize! (-> s1-0 fvec) 1.0) + (matrix->quaternion (-> s2-1 quat) s1-0) + (let ((v1-20 (-> this root root-prim local-sphere))) + (set! (-> v1-20 x) 0.0) + (set! (-> v1-20 y) (* 0.00024414062 (* 0.5 arg1))) + (set! (-> v1-20 z) 0.0) + (let ((f0-17 0.5) + (f1-7 (* f30-1 f30-1)) + (f2-2 arg1) + ) + (set! (-> v1-20 w) (* f0-17 (sqrtf (+ f1-7 (* f2-2 f2-2))))) + ) + ) + ) + ) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-blocking-plane" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logior! (-> this draw status) (draw-control-status no-draw-bounds)) + (transform-post) + (none) + ) + +(defbehavior blocking-plane-init-by-other blocking-plane ((arg0 (inline-array vector)) (arg1 float)) + (if (not arg0) + (deactivate self) + ) + (init! self arg0 arg1) + (set! (-> self current-attack-mode) #f) + (set! (-> self event-hook) (-> (method-of-object self idle) event)) + (go-virtual idle) + ) + +(defmethod init-from-entity! ((this blocking-plane) (arg0 entity-actor)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this current-attack-mode) #f) + (let ((s5-0 (new 'process 'path-control this 'path 0.0 (the-as entity #f) #f)) + (f30-0 (res-lump-float (-> this entity) 'height :default 122880.0)) + ) + (set! (-> this path) s5-0) + (if (or (not s5-0) (< (-> s5-0 curve num-cverts) 2)) + (go process-drawable-art-error "bad path") + ) + (logior! (-> s5-0 flags) (path-control-flag display draw-line draw-point draw-text)) + (let ((s4-0 (+ (-> s5-0 curve num-cverts) -1)) + (s3-0 (new 'stack-no-clear 'inline-array 'vector 2)) + ) + (dotimes (v1-14 2) + (set! (-> s3-0 v1-14 quad) (the-as uint128 0)) + ) + (dotimes (s2-0 s4-0) + (get-point-in-path! s5-0 (-> s3-0 0) (the float s2-0) 'interp) + (get-point-in-path! s5-0 (-> s3-0 1) (the float (+ s2-0 1)) 'interp) + (process-spawn blocking-plane s3-0 f30-0 :name "blocking-plane" :to this) + ) + ) + ) + (go (method-of-object this idle)) + ) + +(defbehavior blocking-plane-spawn process ((arg0 curve-control) (arg1 (inline-array vector)) (arg2 float)) + (cond + ((and arg1 (or (not arg0) (logtest? (-> arg0 flags) (path-control-flag not-found)))) + (process-spawn blocking-plane arg1 arg2 :name "blocking-plane" :to self) + ) + (else + (let ((s4-1 (the int (get-num-segments arg0))) + (s3-0 0) + (s2-0 (new 'stack-no-clear 'inline-array 'vector 2)) + ) + (dotimes (v1-8 2) + (set! (-> s2-0 v1-8 quad) (the-as uint128 0)) + ) + (while (< s3-0 s4-1) + (get-point-in-path! arg0 (-> s2-0 0) (the float s3-0) 'interp) + (get-point-in-path! arg0 (-> s2-0 1) (the float (+ s3-0 1)) 'interp) + (process-spawn blocking-plane s2-0 arg2 :name "blocking-plane" :to self) + (+! s3-0 2) + ) + ) + ) + ) + 0 + (none) + ) + +(defbehavior blocking-plane-destroy blocking-plane () + (let ((gp-0 (-> self child))) + (while gp-0 + (let ((s5-0 (ppointer->process gp-0))) + (set! gp-0 (-> gp-0 0 brother)) + (if (type? s5-0 blocking-plane) + (deactivate s5-0) + ) + ) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/common-obs/bouncer.gc b/goal_src/jak3/engine/common-obs/bouncer.gc index e69e2e1fdb..958bb0b16f 100644 --- a/goal_src/jak3/engine/common-obs/bouncer.gc +++ b/goal_src/jak3/engine/common-obs/bouncer.gc @@ -7,3 +7,243 @@ ;; DECOMP BEGINS +(deftype bouncer (process-drawable) + ((root collide-shape :override) + (spring-height meters) + (smush float) + (mods basic) + (use-alternate-jump? symbol) + ) + (:state-methods + idle + fire + smush + ) + (:methods + (bouncer-method-23 (_type_) none) + (bouncer-method-24 (_type_) none) + (play-sound (_type_) none) + (bouncer-method-26 (_type_) none) + ) + ) + + +(method-set! bouncer 12 (method-of-type process run-logic?)) + +(defstate idle (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)) + (play-sound self) + (go-virtual fire) + ) + ) + ) + (('touch) + (let ((gp-1 (-> block param 0))) + (cond + (((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry gp-1) + (-> self root) + (collide-action solid) + (collide-action) + ) + (when ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry gp-1) + (-> 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-1) + (-> 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-6 0) + ) + (cond + ((= (-> (the-as attack-info v1-29) mode) 'flop) + (set! a2-6 1) + ) + ((= (-> (the-as attack-info v1-29) mode) 'board) + (set! a2-6 9) + ) + ) + (when (and (nonzero? a2-6) + (and ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry a0-16) + (-> self root) + (the-as uint a2-6) + ) + (send-event proc 'jump (-> self spring-height) (-> self spring-height) (-> self mods)) + ) + ) + (play-sound self) + (go-virtual fire) + #f + ) + ) + ) + ) + ) + :code (behavior () + (if (nonzero? (-> self draw)) + (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 smush (bouncer) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch) + (set-time! (-> self state-time)) + #f + ) + (else + ((-> (method-of-object self idle) event) proc argc message block) + ) + ) + ) + :code (behavior () + (set-time! (-> self state-time)) + (set! (-> self smush) 0.0) + (until #f + (if (and (nonzero? (-> self draw)) (time-elapsed? (-> self state-time) (seconds 0.2))) + (ja :num! (seek! 0.0 0.1)) + (ja :num! (seek! + (lerp-scale + (ja-aframe 6.0 0) + (ja-aframe 2.0 0) + (vector-vector-xz-distance (target-pos 0) (-> self root trans)) + 0.0 + 4096.0 + ) + 0.2 + ) + ) + ) + (suspend) + (let ((v1-17 (and (nonzero? (-> self draw)) (ja-min? 0)))) + (if v1-17 + (go-virtual idle) + (go-virtual idle) + ) + ) + ) + #f + ) + :post transform-post + ) + +(defstate fire (bouncer) + :virtual #t + :code (behavior () + (when (or (-> self use-alternate-jump?) (-> *setting-control* user-current use-alternate-bouncer?)) + (persist-with-delay *setting-control* 'slave-options (seconds 2.5) 'slave-options 'clear 0.0 16) + (persist-with-delay *setting-control* 'slave-options2 (seconds 2.5) 'slave-options 'set 0.0 #x2000000) + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 178 (seconds 0.1)) + (bouncer-method-26 self) + (when (nonzero? (-> self draw)) + (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 play-sound ((this bouncer)) + (sound-play "trampoline") + 0 + (none) + ) + +(defmethod bouncer-method-26 ((this bouncer)) + 0 + (none) + ) + +(defmethod bouncer-method-23 ((this bouncer)) + (break!) + 0 + (none) + ) + +(defmethod bouncer-method-24 ((this 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 0)))) + (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) 0) + (set-vector! (-> v1-2 local-sphere) 0.0 3072.0 0.0 6963.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-from-entity! ((this bouncer) (arg0 entity-actor)) + (set! (-> this mods) #f) + (bouncer-method-24 this) + (process-drawable-from-entity! this arg0) + (bouncer-method-23 this) + (nav-mesh-connect-from-ent this) + (set! (-> this spring-height) (res-lump-float arg0 'spring-height :default 45056.0)) + (set! (-> this use-alternate-jump?) (= (res-lump-value arg0 'behavior-type uint128 :time -1000000000.0) 1)) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/engine/common-obs/collectables-part.gc b/goal_src/jak3/engine/common-obs/collectables-part.gc index 35415ed7ee..fc4a76d71a 100644 --- a/goal_src/jak3/engine/common-obs/collectables-part.gc +++ b/goal_src/jak3/engine/common-obs/collectables-part.gc @@ -7,3 +7,2820 @@ ;; DECOMP BEGINS +(defpartgroup group-rod-of-god + :id 123 + :flags (sp0) + :bounds (static-bspherem 0 300 0 640) + :parts ((sp-item 409 :fade-after (meters 80) :falloff-to (meters 160)) + (sp-item 410 :flags (sp6)) + (sp-item 411 :flags (sp6)) + ) + ) + +(defpart 409 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 8.0) + (:x (meters 0) (meters 2.7)) + (:y (meters 0) (meters 32)) + (:scale-x (meters 0.25)) + (:scale-y (meters 0.25) (meters 0.1)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.0016666667) (meters 0.0016666667)) + (:fade-a 0.4) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.267)) + (:next-launcher 412) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 412 + :init-specs ((:fade-a -0.4)) + ) + +(defpart 410 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters -0.25)) + (:scale-x (meters 18)) + (:rot-x (degrees 135)) + (:scale-y (meters 18)) + (:r 128.0) + (:g 128.0) + (:b 0.0 64.0) + (:a 32.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 20480.0) + ) + ) + +(defpart 411 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters -0.25)) + (:scale-x (meters 9)) + (:rot-x (degrees 135)) + (:scale-y (meters 9)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 20480.0) + ) + ) + +(defpartgroup group-eco-green-collect + :id 124 + :duration (seconds 0.5) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 415 :flags (sp3) :binding 413) + (sp-item 413 :flags (sp2 sp3) :binding 414) + (sp-item 413 :flags (sp2 sp3) :binding 414) + (sp-item 413 :flags (sp2 sp3) :binding 414) + (sp-item 413 :flags (sp2 sp3) :binding 414) + (sp-item 413 :flags (sp2 sp3) :binding 414) + (sp-item 416 :fade-after (meters 40) :flags (sp2)) + (sp-item 416 :fade-after (meters 40) :flags (sp2)) + (sp-item 416 :fade-after (meters 40) :flags (sp2)) + (sp-item 416 :fade-after (meters 40) :flags (sp2)) + (sp-item 417 :fade-after (meters 40) :flags (sp2)) + ) + ) + +(defpart 415 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 92.0) + (:g 128.0 128.0) + (:a 64.0) + (:fade-a -3.2) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'part-tracker-track-root) + (:next-time (seconds 0.05)) + (:next-launcher 418) + ) + ) + +(defpart 418 + :init-specs ((:scale-x (meters 0.1)) (:scale-y :copy scale-x) (:a 0.0) (:fade-a 0.0)) + ) + +(defpart 413 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 5.0) + (:y (meters -4) (meters 16)) + (:z (meters 0.08)) + (:scale-x (meters 0.3) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 255.0) + (:a 127.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.017777778) 2.0 (meters 0.035555556)) + (:vel-y (meters 0)) + (:vel-z (meters 0.08)) + (:accel-z (meters -0.0053333333)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +(defpart 416 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters -0.05)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 96.0) + (:scalevel-x (meters -0.00075757573)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.8333333) + (:accel-y (meters -0.000100000005)) + (:timer (seconds 0.1) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.3)) + (:next-launcher 419) + ) + ) + +(defun eco-fadeout ((arg0 sparticle-system) (arg1 sparticle-cpuinfo)) + (if (not (logtest? (-> arg1 key proc state-flags) (state-flags sf0))) + (set! (-> arg1 next-time) + (the-as uint (* (max 1 (the-as int (-> *display* clock (-> arg1 clock-index) sparticle-data x))) 2)) + ) + ) + 0 + (none) + ) + +(defun eco-track-root-prim-fadeout ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((v1-1 (-> arg1 key proc))) + (let ((a0-3 (-> (the-as collide-shape (-> v1-1 root)) root-prim prim-core))) + (set! (-> arg2 x) (-> a0-3 world-sphere x)) + (set! (-> arg2 y) (-> a0-3 world-sphere y)) + (set! (-> arg2 z) (-> a0-3 world-sphere z)) + ) + (if (not (logtest? (-> v1-1 state-flags) (state-flags sf0))) + (set! (-> arg1 next-time) + (the-as uint (* (max 1 (the-as int (-> *display* clock (-> arg1 clock-index) sparticle-data x))) 2)) + ) + ) + ) + 0 + (none) + ) + +(defpartgroup group-eco-green-pill + :id 125 + :bounds (static-bspherem 0 0 0 0.4) + :parts ((sp-item 424 :flags (sp3) :binding 420) + (sp-item 420 :flags (sp2 sp3) :binding 421) + (sp-item 421 :flags (sp2 sp3) :binding 422) + (sp-item 422 :flags (sp2 sp3) :binding 423) + (sp-item 422 :flags (sp2 sp3)) + (sp-item 422 :flags (sp2 sp3)) + (sp-item 422 :flags (sp2 sp3)) + (sp-item 423 :fade-after (meters 40) :flags (sp2)) + ) + ) + +(defpart 424 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:a 0.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'eco-track-root-prim-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 425) + ) + ) + +(defpart 420 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.2) (meters 0.1)) + (:scale-x (meters 0.6) (meters 0.4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 92.0) + (:g 128.0 128.0) + (:a 24.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.026666667) (meters 0.026666667)) + (:vel-y (meters 0.0014814815)) + (:vel-z (meters 0)) + (:rotvel-z (degrees -0.1) 1 (degrees 0.2)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-track-root-prim-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 425) + ) + ) + +(defpart 425 + :init-specs ((:fade-a -0.16) (:timer (seconds 0.5))) + ) + +(defpart 421 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 3.0) + (:y (meters 0) (meters 16)) + (:z (meters 0) (meters 0.2)) + (:scale-x (meters 0.6) (meters 0.4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 92.0) + (:g 128.0 128.0) + (:a 24.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.017777778) (meters 0.017777778)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:rotvel-z (degrees -0.4) 1 (degrees 0.8)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-track-root-prim-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 425) + ) + ) + +(defpart 422 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.08)) + (:scale-x (meters 0.2) (meters 0.05)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 255.0) + (:a 127.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.10666667)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 426) + ) + ) + +(defpart 426 + :init-specs ((:fade-r 0.0) (:fade-a -0.8466667) (:timer (seconds 0.5))) + ) + +(defpart 423 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.25) + (:y (meters -0.05)) + (:scale-x (meters 0.15)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 96.0) + (:scalevel-x (meters -0.00039393938)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.8333333) + (:accel-y (meters -0.000100000005)) + (:timer (seconds 0.1) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.3)) + (:next-launcher 427) + ) + ) + +(defpartgroup group-eco-green-pill-collect + :id 126 + :duration (seconds 0.5) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 415 :flags (sp3) :binding 428) + (sp-item 428 :flags (sp2 sp3) :binding 414) + (sp-item 428 :flags (sp2 sp3) :binding 414) + (sp-item 428 :flags (sp2 sp3) :binding 414) + (sp-item 428 :flags (sp2 sp3) :binding 414) + (sp-item 428 :flags (sp2 sp3) :binding 414) + (sp-item 414 :fade-after (meters 40) :flags (sp2)) + (sp-item 414 :fade-after (meters 40) :flags (sp2)) + (sp-item 414 :fade-after (meters 40) :flags (sp2)) + (sp-item 414 :fade-after (meters 40) :flags (sp2)) + (sp-item 414 :fade-after (meters 40) :flags (sp2)) + ) + ) + +(defpart 428 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters -4) (meters 16)) + (:z (meters 0.08)) + (:scale-x (meters 0.25) (meters 0.05)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 255.0) + (:a 127.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.017777778) (meters 0.017777778)) + (:vel-y (meters 0)) + (:vel-z (meters 0.04)) + (:accel-z (meters -0.0026666666)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +(defpart 414 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters -0.05)) + (:scale-x (meters 0.2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 96.0) + (:scalevel-x (meters -0.0004545455)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.8333333) + (:accel-y (meters -0.000100000005)) + (:timer (seconds 0.1) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.3)) + (:next-launcher 419) + ) + ) + +(defpartgroup group-eco-light-pill + :id 127 + :flags (sp0 sp4 sp7) + :bounds (static-bspherem 0 0 0 4) + :scale (1.0 10.0 1.0) + :parts ((sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017)) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 30) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 60) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 90) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 120) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 150) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 180) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 210) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 240) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 270) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017)) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 30) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 60) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 90) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 120) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 150) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 180) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 210) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 240) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 270) + (sp-item 432 :flags (sp3) :binding 430) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 433) + ) + ) + +(defpart 431 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + ) + ) + +(defpart 429 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 8.0) + (:x (meters 0) (meters 16)) + (:y (meters 0) (meters 16)) + (:z (meters 0)) + (:scale-x (meters 0.4) (meters 0.2)) + (:scale-y (meters 0.4) (meters 0.2)) + (:r 128.0 128.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.053333335) 1 (meters 0.10666667)) + (:vel-y (meters -0.0014814815) (meters 0.002962963)) + (:vel-z (meters 0.0016666667) (meters 0.00066666666)) + (:rotvel-z (degrees -0.4) 1 (degrees 0.8)) + (:fade-a 0.21333334) + (:accel-z (meters -0.00006666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 ready-to-launch)) + (:next-time (seconds 0.5)) + (:next-launcher 434) + ) + ) + +(defpart 434 + :init-specs ((:fade-a -0.21333334)) + ) + +(defpart 432 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.1)) + (:scale-y (meters 0.1)) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + ) + ) + +(defpart 430 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 16)) + (:y (meters 0) (meters 16)) + (:z (meters 0)) + (:scale-x (meters 0.8) (meters 0.2)) + (:scale-y (meters 0.8) (meters 0.2)) + (:r 0.0) + (:g 0.0 128.0) + (:b 128.0) + (:a 8.0 8.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.017777778) 1 (meters 0.035555556)) + (:vel-y (meters -0.00014814814) (meters 0.0002962963)) + (:vel-z (meters 0.0016666667)) + (:rotvel-z (degrees -0.6) 1 (degrees 1.2)) + (:accel-z (meters -0.00005)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 ready-to-launch)) + ) + ) + +(defpart 433 + :init-specs ((:texture (laser-hit2-add level-default-sprite)) + (:num 0.4) + (:scale-x (meters 2) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0 1 20.0) + (:g 0.0 64.0) + (:b 100.0) + (:a 0.0) + (:scalevel-x (meters -0.006666667) (meters 0.015)) + (:scalevel-y :copy scalevel-x) + (:fade-a 2.56) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4.096) + (:func 'sparticle-track-root-prim) + (:next-time (seconds 0.167)) + (:next-launcher 435) + ) + ) + +(defpart 435 + :init-specs ((:fade-a -2.56)) + ) + +(defpart 1 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 8.0) + (:x (meters 0) (meters 0.1)) + (:scale-x (meters 0.3) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 0.0 64.0) + (:g :copy r) + (:b 255.0) + (:a 64.0 64.0) + (:scalevel-x (meters -0.0013333333) (meters -0.0013333333)) + (:scalevel-y (meters 0.0013333333) (meters 0.0013333333)) + (:fade-a -0.21333334) + (:accel-y (meters 0.00066666666)) + (:friction 0.95 0.04) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-eco-dark-pill + :id 128 + :flags (sp7) + :bounds (static-bspherem 0 0 0 4) + :scale (1.0 10.0 1.0) + :parts ((sp-item 438 :period (seconds 0.085) :length (seconds 0.017) :binding 436) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 439 :period (seconds 0.085) :length (seconds 0.017) :binding 437) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 440 :flags (sp6)) + ) + ) + +(defpart 440 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 17)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0) + (:b 255.0) + (:a 16.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + (:func 'sparticle-track-root-prim) + ) + ) + +(defpart 438 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.1)) + (:scale-y (meters 0.1)) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + ) + ) + +(defpart 436 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 16)) + (:y (meters 0) (meters 16)) + (:z (meters 0)) + (:scale-x (meters 1.4) (meters 0.2)) + (:scale-y (meters 1.4) (meters 0.2)) + (:r 0.0 255.0) + (:g 0.0) + (:b 255.0) + (:a 6.0 6.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.053333335) 1 (meters 0.10666667)) + (:vel-y (meters -0.00037037037) (meters 0.00074074074)) + (:vel-z (meters 0.0016666667)) + (:rotvel-z (degrees -1.2) 1 (degrees 2.4)) + (:accel-z (meters -0.000041666666)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch)) + ) + ) + +(defpart 439 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.1)) + (:scale-y (meters 0.1)) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + ) + ) + +(defpart 437 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 16)) + (:y (meters 0) (meters 16)) + (:z (meters 0)) + (:scale-x (meters 0.4) (meters 0.2)) + (:scale-y (meters 0.4) (meters 0.2)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 24.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.053333335) 1 (meters 0.10666667)) + (:vel-y (meters -0.00037037037) (meters 0.00074074074)) + (:vel-z (meters 0.0016666667)) + (:rotvel-z (degrees -0.6) 1 (degrees 1.2)) + (:accel-z (meters -0.000041666666)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-4 ready-to-launch)) + ) + ) + +(defpartgroup group-eco-green + :id 129 + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 444 :flags (sp3) :binding 441) + (sp-item 441 :flags (sp2 sp3) :binding 442) + (sp-item 441 :flags (sp2 sp3) :binding 442) + (sp-item 441 :flags (sp2 sp3) :binding 442) + (sp-item 441 :flags (sp2 sp3) :binding 442) + (sp-item 441 :flags (sp2 sp3) :binding 442) + (sp-item 441 :flags (sp2 sp3) :binding 442) + (sp-item 441 :flags (sp2 sp3) :binding 442) + (sp-item 442 :fade-after (meters 90) :flags (sp2 sp3) :binding 443) + (sp-item 442 :fade-after (meters 90) :flags (sp2 sp3) :binding 443) + (sp-item 442 :fade-after (meters 90) :flags (sp2 sp3) :binding 443) + (sp-item 442 :fade-after (meters 90) :flags (sp2 sp3) :binding 443) + (sp-item 442 :fade-after (meters 90) :flags (sp2 sp3) :binding 443) + (sp-item 443 :fade-after (meters 40) :falloff-to (meters 60) :flags (sp2)) + (sp-item 443 :fade-after (meters 40) :falloff-to (meters 60) :flags (sp2)) + (sp-item 443 :fade-after (meters 40) :falloff-to (meters 60) :flags (sp2)) + (sp-item 443 :fade-after (meters 40) :falloff-to (meters 60) :flags (sp2)) + (sp-item 443 :fade-after (meters 40) :falloff-to (meters 60) :flags (sp2)) + ) + ) + +(defpart 444 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:x (meters 4)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:a 1.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + ) + ) + +(defpart 441 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 6.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.3) (meters 0.25)) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 92.0) + (:g 128.0 128.0) + (:a 24.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.0148148155) (meters 0.0044444446)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:rotvel-z (degrees -0.1) 1 (degrees 0.2)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 445) + ) + ) + +(defpart 445 + :init-specs ((:fade-a -0.16) (:timer (seconds 0.5))) + ) + +(defpart 442 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.3)) + (:scale-x (meters 0.3) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 255.0) + (:a 64.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.053333335) (meters 0.0148148155)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 446) + ) + ) + +(defpart 446 + :init-specs ((:fade-a -0.42666668) (:timer (seconds 0.5))) + ) + +(defpart 443 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.25) + (:y (meters -0.05)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 48.0) + (:scalevel-x (meters -0.00075757573)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.8333333) + (:accel-y (meters -0.00015)) + (:timer (seconds 0.1) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.3)) + (:next-launcher 427) + ) + ) + +(defpart 427 + :init-specs ((:fade-r 0.0)) + ) + +(defpartgroup group-eco-dark-pill-move-collect + :id 130 + :duration (seconds 0.5) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 449 :flags (sp3) :binding 447) + (sp-item 447 :flags (sp2 sp3) :binding 448) + (sp-item 447 :flags (sp2 sp3) :binding 448) + (sp-item 447 :flags (sp2 sp3) :binding 448) + (sp-item 447 :flags (sp2 sp3) :binding 448) + (sp-item 447 :flags (sp2 sp3) :binding 448) + (sp-item 448 :fade-after (meters 40) :flags (sp2)) + (sp-item 448 :fade-after (meters 40) :flags (sp2)) + (sp-item 448 :fade-after (meters 40) :flags (sp2)) + (sp-item 448 :fade-after (meters 40) :flags (sp2)) + (sp-item 448 :fade-after (meters 40) :flags (sp2)) + ) + ) + +(defpart 449 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 92.0) + (:b 128.0 128.0) + (:a 64.0) + (:fade-a -3.2) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'part-tracker-track-root) + (:next-time (seconds 0.05)) + (:next-launcher 450) + ) + ) + +(defpart 450 + :init-specs ((:scale-x (meters 0.1)) (:scale-y :copy scale-x) (:a 0.0) (:fade-a 0.0)) + ) + +(defpart 451 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 5.0) + (:y (meters -4) (meters 16)) + (:z (meters 0.08)) + (:scale-x (meters 0.3) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:b 255.0) + (:a 127.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.017777778) 2.0 (meters 0.035555556)) + (:vel-y (meters 0)) + (:vel-z (meters 0.08)) + (:accel-z (meters -0.0053333333)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +(defpart 447 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters -4) (meters 16)) + (:z (meters 0.08)) + (:scale-x (meters 0.25) (meters 0.05)) + (:scale-y :copy scale-x) + (:r 128.0) + (:b 255.0) + (:a 127.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.017777778) (meters 0.017777778)) + (:vel-y (meters 0)) + (:vel-z (meters 0.04)) + (:accel-z (meters -0.0026666666)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +(defpart 452 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters -0.05)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:b 255.0) + (:a 96.0) + (:scalevel-x (meters -0.00075757573)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.8333333) + (:accel-y (meters -0.000100000005)) + (:timer (seconds 0.1) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.3)) + (:next-launcher 453) + ) + ) + +(defpart 448 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters -0.05)) + (:scale-x (meters 0.2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:b 255.0) + (:a 96.0) + (:scalevel-x (meters -0.0004545455)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.8333333) + (:accel-y (meters -0.000100000005)) + (:timer (seconds 0.1) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.3)) + (:next-launcher 453) + ) + ) + +(defpartgroup group-generic-collect + :id 131 + :duration (seconds 0.017) + :linger-duration (seconds 4) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 454)) + ) + +(defpart 455 + :init-specs ((:fade-a -0.15238096)) + ) + +(defpart 454 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 16.0) + (:scale-x (meters 6) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5) (meters 1)) + (:r 64.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y (meters 0.009765625)) + (:fade-a 2.1333334) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.017) (seconds 0.065)) + (:next-launcher 455) + ) + ) + +(defpart 456 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 6.0) + (:scale-x (meters 8) (meters 2)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5)) + (:r 64.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:fade-a 2.1333334) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.017) (seconds 0.065)) + (:next-launcher 455) + ) + ) + +(defpart 457 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:scalevel-x (meters 0.1)) + (:rotvel-z (degrees -0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.2)) + (:next-launcher 458) + ) + ) + +(defpartgroup group-skill-glow-red + :id 132 + :flags (sp1) + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 459 :fade-after (meters 150) :flags (sp6 sp7))) + ) + +(defpart 459 + :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-skill-glow-yellow + :id 133 + :flags (sp1) + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 460 :fade-after (meters 150) :flags (sp6 sp7))) + ) + +(defpart 460 + :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 192.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-gem-glow + :id 134 + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 461 :flags (sp6 sp7)) (sp-item 462 :flags (sp6 sp7)) (sp-item 463 :flags (sp6 sp7))) + ) + +(defpart 461 + :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 192.0) + (:b 64.0) + (:a 16.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2867.2) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 462 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:z (meters 0.3)) + (:scale-x (meters 1.75)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 192.0) + (:b 64.0) + (:a 12.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 463 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:z (meters -0.3)) + (:scale-x (meters 1.75)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 192.0) + (:b 64.0) + (:a 12.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 464 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.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 1638.4) + ) + ) + +(defpartgroup group-gem-collect + :id 135 + :duration (seconds 0.1) + :linger-duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 465 :period (seconds 0.5) :length (seconds 0.017)) + (sp-item 466 :period (seconds 0.5) :length (seconds 0.067)) + ) + ) + +(defpart 466 + :init-specs ((:texture (suckpart level-default-sprite)) + (:num 3.0 1.0) + (:scale-x (meters 16) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.005) (meters 0.005)) + (:r 255.0) + (:g 128.0 128.0) + (:b 0.0) + (:a 16.0) + (:scalevel-x (meters -0.4)) + (:scalevel-y (meters 0.00125)) + (:fade-a 0.2 0.4) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + (:func 'sparticle-track-root) + ) + ) + +(defpart 465 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 16)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0 128.0) + (:b 0.0) + (:a 0.0) + (:scalevel-x (meters -0.23333333)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.33333334) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + (:func 'sparticle-track-root) + (:next-time (seconds 0.2)) + (:next-launcher 467) + ) + ) + +(defpart 467 + :init-specs ((:a 16.0) (:fade-a -0.8)) + ) + +(defpart 468 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 192.0) + (:b 64.0) + (:a 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +(defpartgroup group-ammo-yellow-collect + :id 136 + :duration (seconds 0.017) + :linger-duration (seconds 4) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 249)) + ) + +(defpartgroup group-ammo-red-collect + :id 137 + :duration (seconds 0.017) + :linger-duration (seconds 4) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 249)) + ) + +(defpartgroup group-ammo-blue-collect + :id 138 + :duration (seconds 0.017) + :linger-duration (seconds 4) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 249)) + ) + +(defpartgroup group-ammo-dark-collect + :id 139 + :duration (seconds 0.017) + :linger-duration (seconds 4) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 249)) + ) + +(defpartgroup group-eco-dark-pill-collect + :id 140 + :duration (seconds 0.1) + :linger-duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 469 :period (seconds 0.5) :length (seconds 0.017)) + (sp-item 470 :period (seconds 0.5) :length (seconds 0.067)) + ) + ) + +(defpart 470 + :init-specs ((:texture (suckpart level-default-sprite)) + (:num 3.0 1.0) + (:scale-x (meters 24) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.005) (meters 0.005)) + (:r 128.0 128.0) + (:g 0.0) + (:b 255.0) + (:a 16.0) + (:scalevel-x (meters -0.6)) + (:scalevel-y (meters 0.00125)) + (:fade-a 0.2 0.4) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + (:func 'sparticle-track-root) + ) + ) + +(defpart 469 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.33333334) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + (:func 'sparticle-track-root) + (:next-time (seconds 0.2)) + (:next-launcher 471) + ) + ) + +(defpart 471 + :init-specs ((:a 16.0) (:fade-a -0.8)) + ) + +(defpartgroup group-green-collect + :id 141 + :duration (seconds 1) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 474 :period (seconds 1.5) :length (seconds 0.017) :offset 100) + (sp-item 475 :period (seconds 1.5) :length (seconds 0.067) :offset 125) + (sp-item 476 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 1.5) :length (seconds 0.067) :binding 472) + (sp-item 472 :fade-after (meters 80) :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + ) + ) + +(defpart 476 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 6.0) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 472 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters 0) (meters 16)) + (:z (meters 8)) + (:scale-x (meters 0.2) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 255.0) + (:b 0.0) + (:a 28.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.008888889) (meters 0.017777778)) + (:vel-z (meters -0.053333335)) + (:fade-r -0.8) + (:fade-a 0.8) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:next-time (seconds 1.5) (seconds 0.497)) + (:next-launcher 477) + ) + ) + +(defpart 477 + :init-specs ((:fade-r 0.0) (:fade-a -0.8466667 -0.8466667) (:timer (seconds 0.5))) + ) + +(defpart 473 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.2) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 96.0) + (:scalevel-x (meters -0.0006060606)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.8333333) + (:accel-y (meters -0.000033333334) (meters -0.00006666667)) + (:timer (seconds 0.1) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.3)) + (:next-launcher 427) + ) + ) + +(defpart 475 + :init-specs ((:texture (suckpart level-default-sprite)) + (:num 3.0 1.0) + (:scale-x (meters 24) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.005) (meters 0.005)) + (:r 0.0) + (:g 128.0 128.0) + (:b 0.0) + (:a 16.0) + (:scalevel-x (meters -0.6)) + (:scalevel-y (meters 0.00125)) + (:fade-a 0.2 0.4) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + (:func 'sparticle-track-root) + ) + ) + +(defpart 474 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0 128.0) + (:b 0.0) + (:a 0.0) + (:scalevel-x (meters -0.21176471)) + (:scalevel-y :copy scalevel-x) + (:fade-r 1.5058824) + (:fade-a 0.28235295) + (:timer (seconds 0.35)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + (:func 'sparticle-track-root) + (:next-time (seconds 0.285)) + (:next-launcher 478) + ) + ) + +(defpart 478 + :init-specs ((:a 16.0) (:fade-r -12.8) (:fade-a -1.0)) + ) + +(defpartgroup group-skate-point + :id 142 + :linger-duration (seconds 1) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 479 :fade-after (meters 90) :falloff-to (meters 90) :flags (is-3d)) + (sp-item 480 :flags (is-3d)) + (sp-item 481 :flags (sp6)) + (sp-item 482 :flags (is-3d sp6)) + (sp-item 483 :fade-after (meters 120) :falloff-to (meters 120)) + ) + ) + +(defpart 483 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 0.1) (meters 0.15)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0 32.0) + (:b 0.0 16.0) + (:a 96.0 32.0) + (:omega (degrees 0.19125001)) + (:vel-y (meters 0.053333335) (meters 0.026666667)) + (:scalevel-x (meters -0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.7066667) + (:friction 0.97) + (:timer (seconds 0.25)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 479 + :init-specs ((:texture (new 'static 'texture-id :page #x17e)) + (:num 0.05) + (:scale-x (meters 0.5)) + (:rot-x (degrees 0) (degrees 3600)) + (:rot-y (degrees 0) (degrees 3600)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0 64.0) + (:b 16.0) + (:a 64.0) + (:scalevel-x (meters 0.0055555557)) + (:rotvel-x (degrees 0.8)) + (:rotvel-y (degrees 0.8)) + (:rotvel-z (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + ) + ) + +(defpart 482 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-camera-orient) + (:num 1.0) + (:scale-x (meters 1.5) (meters 2.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 480 + :init-specs ((:texture (new 'static 'texture-id :page #x17e)) + (:birth-func 'birth-func-camera-orient) + (:num 1.0) + (:scale-x (meters 2.9) (meters 0.3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 96.0) + (:b 16.0) + (:a 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 481 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8) (meters 0.2)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 96.0) + (:b 16.0) + (:a 32.0 8.0) + (:omega (degrees 22509)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-skate-point-explode + :id 143 + :duration (seconds 0.017) + :linger-duration (seconds 1) + :bounds (static-bspherem 0 0 0 32) + :parts ((sp-item 484 :flags (sp6))) + ) + +(defpart 484 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 16)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 96.0) + (:b 16.0) + (:a 128.0) + (:omega (degrees 22509)) + (:scalevel-x (meters -0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.6) + (:fade-a -3.2) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-part-vent-light-active + :id 144 + :bounds (static-bspherem 0 5 0 5) + :parts ((sp-item 485 :flags (is-3d)) + (sp-item 486 :flags (is-3d)) + (sp-item 487 :flags (is-3d)) + (sp-item 488 :flags (is-3d)) + (sp-item 489) + (sp-item 490) + ) + ) + +(defpart 485 + :init-specs ((:texture (light-burst level-default-sprite)) + (:num 0.1 0.1) + (:y (meters -11)) + (:scale-x (meters 40)) + (:rot-z (degrees 90)) + (:scale-y (meters 2.5)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 0.0) + (:fade-a 0.64 0.64) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-3d-rotate-xz-to-camera) + (:next-time (seconds 0.167)) + (:next-launcher 491) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 491 + :init-specs ((:fade-a -0.64 -0.64)) + ) + +(defpart 486 + :init-specs ((:texture (light-burst level-default-sprite)) + (:num 0.1 0.1) + (:y (meters -11)) + (:scale-x (meters 40)) + (:rot-z (degrees 90)) + (:scale-y (meters 2.2)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 0.0) + (:fade-a 0.32 0.64) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-3d-rotate-xz-to-camera) + (:next-time (seconds 0.167)) + (:next-launcher 491) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 487 + :init-specs ((:texture (light-burst level-default-sprite)) + (:num 0.1 0.1) + (:y (meters -11)) + (:scale-x (meters 40)) + (:rot-z (degrees 90)) + (:scale-y (meters 2)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 0.32 0.64) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-3d-rotate-xz-to-camera) + (:next-time (seconds 0.167)) + (:next-launcher 491) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 488 + :init-specs ((:texture (static1 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1) + (:x (meters -0.5) (meters 1)) + (:y (meters -2)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 10)) + (:rot-z (degrees 90)) + (:scale-y (meters 0.25) (meters 0.5)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters 0.01) (meters 0.006666667)) + (:fade-a 0.10666667 0.10666667) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40b000 #x40b100)) + (:func 'sparticle-3d-rotate-xz-to-camera) + (:next-time (seconds 1)) + (:next-launcher 492) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 492 + :init-specs ((:fade-a -0.21333334 -0.21333334)) + ) + +(defpart 489 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 0.5 0.5) + (:x (meters -0.5) (meters 1)) + (:y (meters 0) (meters 5)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 0.05) (meters 0.05)) + (:scale-y :copy scale-x) + (:r 0.0 1 128.0) + (:g 0.0 1 128.0) + (:b 0.0 1 128.0) + (:a 0.0) + (:vel-y (meters 0.00083333335) (meters 0.0016666667)) + (:fade-a 0.85333335) + (:timer (seconds 1) (seconds 1.665)) + (:flags (sp-cpuinfo-flag-3)) + (:next-time (seconds 0.5)) + (:next-launcher 493) + (:conerot-x (degrees -50.000004) (degrees 100.00001)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 493 + :init-specs ((:fade-a -0.85333335)) + ) + +(defpart 490 + :init-specs ((:texture (laser-hit2-add level-default-sprite)) + (:num 0.5) + (:y (meters 0.2)) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) 1 (degrees 180)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 0.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y (meters 0.006666667) (meters 0.016666668)) + (:fade-a 0.10666667 0.10666667) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:next-time (seconds 1)) + (:next-launcher 494) + ) + ) + +(defpart 494 + :init-specs ((:fade-a -0.21333334)) + ) + +(defpartgroup group-part-vent-light-touched + :id 145 + :bounds (static-bspherem 0 5 0 5) + :parts ((sp-item 495 :flags (is-3d)) + (sp-item 496 :flags (is-3d)) + (sp-item 497 :flags (is-3d)) + (sp-item 498 :flags (is-3d)) + (sp-item 499 :flags (is-3d)) + (sp-item 500) + (sp-item 501) + ) + ) + +(defpart 495 + :init-specs ((:texture (light-burst level-default-sprite)) + (:num 0.1 0.1) + (:y (meters -15)) + (:scale-x (meters 60)) + (:rot-z (degrees 90)) + (:scale-y (meters 2.5)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 0.64 0.64) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-3d-rotate-xz-to-camera) + (:next-time (seconds 0.167)) + (:next-launcher 502) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 502 + :init-specs ((:fade-a -0.64 -0.64)) + ) + +(defpart 496 + :init-specs ((:texture (light-burst level-default-sprite)) + (:num 0.1 0.1) + (:y (meters -15)) + (:scale-x (meters 60)) + (:rot-z (degrees 90)) + (:scale-y (meters 2.2)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 0.32 0.64) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-3d-rotate-xz-to-camera) + (:next-time (seconds 0.167)) + (:next-launcher 491) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 497 + :init-specs ((:texture (light-burst level-default-sprite)) + (:num 0.1 0.1) + (:y (meters -15)) + (:scale-x (meters 60)) + (:rot-z (degrees 90)) + (:scale-y (meters 2)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 0.32 0.64) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-3d-rotate-xz-to-camera) + (:next-time (seconds 0.167)) + (:next-launcher 502) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 498 + :init-specs ((:texture (light-burst level-default-sprite)) + (:num 0.1 0.1) + (:y (meters -15)) + (:scale-x (meters 60)) + (:rot-z (degrees 90)) + (:scale-y (meters 2)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:scalevel-y (meters 0.016666668)) + (:fade-a 0.32 0.64) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-3d-rotate-xz-to-camera) + (:next-time (seconds 0.167)) + (:next-launcher 502) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 499 + :init-specs ((:texture (static1 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.15 0.15) + (:x (meters -0.5) (meters 1)) + (:y (meters -1)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 1)) + (:rot-z (degrees 90)) + (:scale-y (meters 0.1) (meters 0.3)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters 0.06666667)) + (:fade-a 0.10666667 0.10666667) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40b000 #x40b100)) + (:func 'sparticle-3d-rotate-xz-to-camera) + (:next-time (seconds 1)) + (:next-launcher 503) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 503 + :init-specs ((:fade-a -0.21333334 -0.21333334)) + ) + +(defpart 500 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 2.0 2.0) + (:x (meters -0.5) (meters 1)) + (:y (meters 0) (meters 10)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 0.0 1 128.0) + (:g 0.0 1 128.0) + (:b 0.0 1 128.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:fade-a 2.56) + (:friction 1.1) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3)) + (:next-time (seconds 0.167)) + (:next-launcher 504) + (:conerot-x (degrees -170) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 504 + :init-specs ((:fade-a -2.56)) + ) + +(defpart 501 + :init-specs ((:texture (laser-hit2-add level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) 1 (degrees 180)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.016666668) (meters 0.013333334)) + (:scalevel-y (meters 0.06666667) (meters 0.033333335)) + (:fade-a 0.16 0.16) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x408600 #x400700)) + (:next-time (seconds 0.335)) + (:next-launcher 505) + ) + ) + +(defpart 505 + :init-specs ((:fade-a -0.32)) + ) + +(defpartgroup group-part-vent-dark-active + :id 146 + :flags (sp0 sp4) + :bounds (static-bspherem 0 5 0 10) + :parts ((sp-item 506 :flags (is-3d sp3)) + (sp-item 507 :flags (is-3d sp3)) + (sp-item 508 :flags (is-3d sp3)) + (sp-item 509) + (sp-item 510) + ) + ) + +(defun sparticle-3d-rotate-xz-to-camera-eco-shaft ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-3d)) + (local-vars (v1-4 float) (v1-5 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (new 'stack-no-clear 'vector) + (-> arg1 key proc) + (let ((a0-1 (math-camera-matrix)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> a0-1 rvec quad)) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + (let ((a1-3 (matrix-fr-compose (new 'stack-no-clear 'matrix) *up-vector* s5-0)) + (s5-1 (new 'stack-no-clear 'quaternion)) + ) + (matrix->quaternion s5-1 a1-3) + (quaternion-rotate-local-z! s5-1 s5-1 -16384.0) + (quaternion-rotate-y! s5-1 s5-1 -16384.0) + (cond + ((< (-> s5-1 w) 0.0) + (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) + (.mov v1-4 vf1) + ) + (else + (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) + (.mov v1-5 vf1) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defun spt-func-part-vent-eco-dark-shaft ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-3d-rotate-xz-to-camera-eco-shaft arg0 arg1 (the-as sprite-vec-data-3d arg2)) + (sparticle-texture-animate arg0 arg1 arg2) + (none) + ) + +(defpart 506 + :init-specs ((:texture (lasersmoke-00 level-default-sprite)) + (:num 1.0) + (:y (meters 4)) + (:scale-x (meters 2.2)) + (:scale-y (meters 10)) + (:r 20.0) + (:g 0.0) + (:b 128.0) + (:a 64.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 20 + 1 + 0 + #x401b00 + #x401c00 + #x401d00 + #x401e00 + #x401f00 + #x402000 + #x402100 + #x402200 + #x402300 + #x402400 + #x402500 + #x402600 + #x402700 + #x402800 + #x402900 + #x402a00 + #x402b00 + #x402c00 + #x402d00 + #x402e00 + #x402f00 + #x403000 + #x403100 + #x403200 + #x403300 + #x403400 + #x403500 + #x403600 + #x403700 + #x403800 + ) + ) + (:func 'spt-func-part-vent-eco-dark-shaft) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 507 + :init-specs ((:texture (lasersmoke-00 level-default-sprite)) + (:num 1.0) + (:y (meters 4)) + (:scale-x (meters 2)) + (:scale-y (meters 12)) + (:r 60.0) + (:g 0.0) + (:b 128.0) + (:a 64.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 25 + 1 + 0 + #x403800 + #x403700 + #x403600 + #x403500 + #x403400 + #x403300 + #x403200 + #x403100 + #x403000 + #x402f00 + #x402e00 + #x402d00 + #x402c00 + #x402b00 + #x402a00 + #x402900 + #x402800 + #x402700 + #x402600 + #x402500 + #x402400 + #x402300 + #x402200 + #x402100 + #x402000 + #x401f00 + #x401e00 + #x401d00 + #x401c00 + #x401b00 + ) + ) + (:func 'spt-func-part-vent-eco-dark-shaft) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 508 + :init-specs ((:texture (lasersmoke-00 level-default-sprite)) + (:num 1.0) + (:y (meters 4)) + (:scale-x (meters 1.8)) + (:scale-y (meters 14)) + (:r 100.0) + (:g 0.0) + (:b 128.0) + (:a 64.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 30 + 1 + 0 + #x401b00 + #x401c00 + #x401d00 + #x401e00 + #x401f00 + #x402000 + #x402100 + #x402200 + #x402300 + #x402400 + #x402500 + #x402600 + #x402700 + #x402800 + #x402900 + #x402a00 + #x402b00 + #x402c00 + #x402d00 + #x402e00 + #x402f00 + #x403000 + #x403100 + #x403200 + #x403300 + #x403400 + #x403500 + #x403600 + #x403700 + #x403800 + ) + ) + (:func 'spt-func-part-vent-eco-dark-shaft) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 511 + :init-specs ((:texture (static1 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1) + (:x (meters -0.5) (meters 1)) + (:y (meters -2)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 20)) + (:rot-z (degrees 90)) + (:scale-y (meters 0.25) (meters 0.5)) + (:r 40.0 40.0) + (:g 0.0) + (:b 128.0 128.0) + (:a 0.0) + (:scalevel-x (meters -0.01) (meters -0.006666667)) + (:fade-a 0.10666667 0.10666667) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40b000 #x40b100)) + (:func 'sparticle-3d-rotate-xz-to-camera) + (:next-time (seconds 1)) + (:next-launcher 512) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 512 + :init-specs ((:fade-a -0.21333334 -0.21333334)) + ) + +(defpart 509 + :init-specs ((:texture (flame01 level-default-sprite)) + (:num 1.0 1.0) + (:x (meters -0.2) (meters 0.4)) + (:y (meters 0) (meters 15)) + (:z (meters -0.2) (meters 0.4)) + (:scale-x (meters 0.3) (meters 1)) + (:rot-z (degrees -10) (degrees 20)) + (:scale-y (meters 1) (meters 1)) + (:r 255.0) + (:g 0.0 128.0) + (:b :copy g) + (:a 0.0) + (:scalevel-x (meters 0.00033333333)) + (:scalevel-y (meters 0.0033333334)) + (:fade-g 0.053333335 0.053333335 :store) + (:fade-b '*sp-temp*) + (:fade-a 0.053333335 0.053333335) + (: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 510 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0 1.0) + (:y (meters 3)) + (:scale-x (meters 1) (meters 1)) + (: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.026666667)) + (: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.00033333333) (meters 0.00066666666)) + (:accel-z (meters -0.00033333333) (meters 0.00066666666)) + (: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 513) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 513 + :init-specs ((:fade-a -0.42666668 -0.42666668)) + ) + +(defpartgroup group-part-vent-dark-touched + :id 147 + :flags (sp0 sp4) + :bounds (static-bspherem 0 5 0 5) + :parts ((sp-item 514 :flags (is-3d) :period (seconds 2) :length (seconds 0.017)) + (sp-item 515 :flags (is-3d) :period (seconds 2) :length (seconds 0.017)) + (sp-item 516 :flags (is-3d) :period (seconds 2) :length (seconds 0.017)) + (sp-item 517 :flags (is-3d)) + (sp-item 518) + (sp-item 519) + (sp-item 520) + ) + ) + +(defpart 514 + :init-specs ((:texture (lasersmoke-00 level-default-sprite)) + (:num 1.0) + (:y (meters 4)) + (:scale-x (meters 2)) + (:scale-y (meters 10)) + (:r 20.0) + (:g 0.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x401b00 + #x401c00 + #x401d00 + #x401e00 + #x401f00 + #x402000 + #x402100 + #x402200 + #x402300 + #x402400 + #x402500 + #x402600 + #x402700 + #x402800 + #x402900 + #x402a00 + #x402b00 + #x402c00 + #x402d00 + #x402e00 + #x402f00 + #x403000 + #x403100 + #x403200 + #x403300 + #x403400 + #x403500 + #x403600 + #x403700 + #x403800 + ) + ) + (:func 'spt-func-part-vent-eco-dark-shaft) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 515 + :init-specs ((:texture (lasersmoke-00 level-default-sprite)) + (:num 1.0) + (:y (meters 4)) + (:scale-x (meters 1.5)) + (:scale-y (meters 12)) + (:r 60.0) + (:g 0.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 15 + 1 + 0 + #x403800 + #x403700 + #x403600 + #x403500 + #x403400 + #x403300 + #x403200 + #x403100 + #x403000 + #x402f00 + #x402e00 + #x402d00 + #x402c00 + #x402b00 + #x402a00 + #x402900 + #x402800 + #x402700 + #x402600 + #x402500 + #x402400 + #x402300 + #x402200 + #x402100 + #x402000 + #x401f00 + #x401e00 + #x401d00 + #x401c00 + #x401b00 + ) + ) + (:func 'spt-func-part-vent-eco-dark-shaft) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 516 + :init-specs ((:texture (lasersmoke-00 level-default-sprite)) + (:num 1.0) + (:y (meters 4)) + (:scale-x (meters 1)) + (:scale-y (meters 14)) + (:r 100.0) + (:g 0.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 20 + 1 + 0 + #x401b00 + #x401c00 + #x401d00 + #x401e00 + #x401f00 + #x402000 + #x402100 + #x402200 + #x402300 + #x402400 + #x402500 + #x402600 + #x402700 + #x402800 + #x402900 + #x402a00 + #x402b00 + #x402c00 + #x402d00 + #x402e00 + #x402f00 + #x403000 + #x403100 + #x403200 + #x403300 + #x403400 + #x403500 + #x403600 + #x403700 + #x403800 + ) + ) + (:func 'spt-func-part-vent-eco-dark-shaft) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 517 + :init-specs ((:texture (light-burst level-default-sprite)) + (:num 0.1 0.1) + (:y (meters -15)) + (:scale-x (meters 60)) + (:rot-z (degrees 90)) + (:scale-y (meters 8)) + (:r 128.0) + (:g 0.0) + (:b 255.0) + (:a 0.0) + (:scalevel-y (meters -0.053333335)) + (:fade-a 0.64 0.64) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-3d-rotate-xz-to-camera) + (:next-time (seconds 0.167)) + (:next-launcher 521) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 522 + :init-specs ((:fade-a 0.0)) + ) + +(defpart 518 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 2.0 2.0) + (:x (meters 8)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 128.0) + (:a 0.0) + (:omega (degrees 0.1125)) + (:fade-a 0.42666668) + (:accel-x (meters -0.0016666667)) + (:friction 0.98 0.01) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'spt-func-part-vent-eco-dark-touched-specs) + (:rotate-x (degrees 0) (degrees 36000)) + (:rotate-y (degrees 0) (degrees 36000)) + (:rotate-z (degrees 0) (degrees 36000)) + ) + ) + +(defun spt-func-part-vent-eco-dark-touched-specs ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (check-drop-group-center arg0 arg1 (the-as sparticle-launchinfo arg2)) + (sparticle-motion-blur arg0 arg1 arg2) + (none) + ) + +(defpart 519 + :init-specs ((:texture (flame01 level-default-sprite)) + (:num 3.0 3.0) + (:x (meters -0.2) (meters 0.4)) + (:y (meters 0) (meters 15)) + (:z (meters -0.2) (meters 0.4)) + (:scale-x (meters 0.3) (meters 1)) + (:rot-z (degrees -10) (degrees 20)) + (:scale-y (meters 1) (meters 1)) + (:r 255.0) + (:g 0.0 128.0) + (:b :copy g) + (:a 0.0) + (:scalevel-x (meters 0.00033333333)) + (:scalevel-y (meters 0.0033333334)) + (:fade-g 0.053333335 0.053333335 :store) + (:fade-b '*sp-temp*) + (:fade-a 0.10666667 0.10666667) + (:accel-y (meters -0.00066666666) (meters -0.00033333333)) + (: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 520 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0 1.0) + (:y (meters 3)) + (:scale-x (meters 1) (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.026666667)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.42666668 -0.42666668) + (:fade-g -0.85 -0.85) + (:fade-a 0.21333334 0.21333334) + (:accel-x (meters -0.001) (meters 0.00066666666)) + (:accel-y (meters -0.00016666666)) + (:accel-z (meters -0.001) (meters 0.00066666666)) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 1)) + (:next-launcher 523) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 523 + :init-specs ((:fade-a -0.42666668 -0.42666668)) + ) + +(defpartgroup group-part-vent-green-active + :id 148 + :flags (sp0 sp4) + :bounds (static-bspherem 0 5 0 10) + :parts ((sp-item 526 :fade-after (meters 100) :period (seconds 0.167) :length (seconds 0.017) :binding 524) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 527 :fade-after (meters 100) :flags (is-3d sp7)) + ) + ) + +(defpart 527 + :init-specs ((:texture (laser-hit-rim level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0) + (:y (meters 1) (meters 0.2)) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0) (degrees 360)) + (:rot-z (degrees -10) (degrees 20)) + (:scale-y :copy scale-x) + (:r 0.0 64.0) + (:g 92.0 32.0) + (:b 0.0) + (:a 255.0) + (:vel-y (meters 0.008333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-y (degrees 0.53333336)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.56666666 -0.56666666) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + ) + ) + +(defpart 528 + :init-specs ((:vel-y (meters -0.0033333334)) + (:scalevel-x (meters 0.016666668) (meters 0.006666667)) + (:rotvel-y (degrees 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:next-time (seconds 0.085)) + (:next-launcher 529) + ) + ) + +(defpart 529 + :init-specs ((:vel-y (meters -0.0016666667)) + (:scalevel-x (meters 0.013333334) (meters 0.0033333334)) + (:rotvel-y (degrees 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.256 -0.256) + (:accel-y (meters 0.0019333332)) + (:next-time (seconds 0.085)) + (:next-launcher 530) + ) + ) + +(defpart 530 + :init-specs ((:vel-y (meters 0)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:rotvel-y (degrees 0.53333336)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters 0.0016666667)) + (:friction 0.9) + ) + ) + +(defpart 531 + :init-specs ((:texture (wave-foam foresta-sprite)) + (:num 0.3) + (:y (meters 1)) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y (meters 0.2) (meters 0.2)) + (:r 8.0) + (:g 64.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters 0.016666668)) + (:fade-a 0.85333335) + (:accel-y (meters 0.00033333333)) + (:friction 0.98) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'spt-func-turn-to-vel-radial) + (:next-time (seconds 0.5)) + (:next-launcher 532) + (:conerot-x (degrees -90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 532 + :init-specs ((:scalevel-y (meters 0.006666667)) + (:fade-a -0.17066666 -0.17066666) + (:accel-y (meters 0.00026666667) (meters 0.00006666667)) + (:friction 0.95) + ) + ) + +(defpart 526 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters 1.5) (meters 0.5)) + (: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 524 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:z (meters 1)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 32.0 64.0) + (:g 255.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)) + (:scalevel-x (meters -0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:friction 0.99) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +(defpart 533 + :init-specs ((:fade-a -0.21333334)) + ) + +(defpart 525 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-inherit-size) + (:num 1.0) + (:scale-x (meters 0.00024414062)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 64.0) + (:g 128.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-placeholder-small + :id 149 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 249)) + ) + +(defpart 534 + :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 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +(defpartgroup group-placeholder-single + :id 150 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 535 :flags (sp7))) + ) + +(defpart 535 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +(defpartgroup group-placeholder-multiple + :id 151 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 536 :flags (sp7))) + ) + +(defpart 536 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.01)) + (:timer (seconds 2)) + (:flags ()) + (:conerot-x (degrees -45) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) diff --git a/goal_src/jak3/engine/common-obs/collectables.gc b/goal_src/jak3/engine/common-obs/collectables.gc index 4c99de329b..f6889ddfc1 100644 --- a/goal_src/jak3/engine/common-obs/collectables.gc +++ b/goal_src/jak3/engine/common-obs/collectables.gc @@ -44,13 +44,13 @@ (defskelgroup skel-gun-yellow-up yellow-barrel yellow-barrel-lod0-jg yellow-barrel-idle-ja ((yellow-barrel-lod0-mg (meters 999999))) :bounds (static-spherem 0 1 0 1.6) - :shadow-joint-index 3 + :origin-joint-index 3 ) (defskelgroup skel-gun-dark-up dark-barrel 0 2 ((1 (meters 999999))) :bounds (static-spherem 0 1 0 1.6) - :shadow-joint-index 3 + :origin-joint-index 3 ) (defskelgroup skel-skill collectables collectables-skill-lod0-jg collectables-skill-idle-ja @@ -61,7 +61,7 @@ :bounds (static-spherem 0 0 0 0.6) :shadow collectables-skill-shadow-mg :texture-level 10 - :origin-joint-index 3 + :shadow-joint-index 3 ) (deftype collectable (process-drawable) @@ -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)) @@ -467,50 +467,16 @@ (cond ((logtest? (-> this collect-effect flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> this root root-prim prim-core world-sphere quad)) - (let ((s4-10 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s4-10 - (let ((t9-23 (method-of-type part-tracker-subsampler activate))) - (t9-23 (the-as part-tracker-subsampler s4-10) s5-1 "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-24 run-function-in-process) - (a0-77 s4-10) - (a1-33 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> this collect-effect)) - (set! (-> *part-tracker-subsampler-params-default* duration) 0) - (set! (-> *part-tracker-subsampler-params-default* callback) part-tracker-track-target) - (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-24) a0-77 a1-33 *part-tracker-subsampler-params-default*) - ) - (-> s4-10 ppointer) - ) + (part-tracker-spawn + part-tracker-subsampler + :to s5-1 + :group (-> this collect-effect) + :callback part-tracker-track-target ) ) (else (set! (-> *launch-matrix* trans quad) (-> this root root-prim prim-core world-sphere quad)) - (let ((s4-11 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s4-11 - (let ((t9-26 (method-of-type part-tracker activate))) - (t9-26 (the-as part-tracker s4-11) s5-1 "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-27 run-function-in-process) - (a0-84 s4-11) - (a1-36 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> this collect-effect)) - (set! (-> *part-tracker-params-default* duration) 0) - (set! (-> *part-tracker-params-default* callback) part-tracker-track-target) - (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-27) a0-84 a1-36 *part-tracker-params-default*) - ) - (-> s4-11 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to s5-1 :group (-> this collect-effect) :callback part-tracker-track-target) ) ) ) @@ -518,99 +484,68 @@ (cond ((logtest? (-> this collect-effect2 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> this root root-prim prim-core world-sphere quad)) - (let ((s5-2 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-2 - (let ((t9-29 (method-of-type part-tracker-subsampler activate))) - (t9-29 (the-as part-tracker-subsampler s5-2) this "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-30 run-function-in-process) - (a0-91 s5-2) - (a1-39 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> this collect-effect2)) - (set! (-> *part-tracker-subsampler-params-default* duration) 0) - (set! (-> *part-tracker-subsampler-params-default* callback) - (lambda ((arg0 part-tracker)) - (let ((v1-1 (handle->process (-> arg0 userdata)))) - (when (the-as process v1-1) - (let* ((s5-0 (handle->process (-> (the-as collectable v1-1) pickup-handle))) - (a0-9 (if (type? s5-0 process-focusable) - s5-0 - ) - ) - (a2-0 (if (not a0-9) - (-> arg0 root trans) - (get-trans (the-as process-focusable a0-9) 3) - ) - ) + (part-tracker-spawn + part-tracker-subsampler + :to this + :group (-> this collect-effect2) + :callback (lambda ((arg0 part-tracker)) + (let ((v1-1 (handle->process (-> arg0 userdata)))) + (when (the-as process v1-1) + (let* ((s5-0 (handle->process (-> (the-as collectable v1-1) pickup-handle))) + (a0-9 (if (type? s5-0 process-focusable) + s5-0 ) - (vector-lerp! - (-> arg0 root trans) - (-> arg0 offset) - a2-0 - (/ (the float (- (current-time) (-> arg0 state-time))) (the float (-> arg0 part group duration))) - ) - ) - ) - ) - ) + ) + (a2-0 (if (not a0-9) + (-> arg0 root trans) + (get-trans (the-as process-focusable a0-9) 3) + ) + ) + ) + (vector-lerp! + (-> arg0 root trans) + (-> arg0 offset) + a2-0 + (/ (the float (- (current-time) (-> arg0 state-time))) (the float (-> arg0 part group duration))) ) - (set! (-> *part-tracker-subsampler-params-default* userdata) (the-as uint (process->handle this))) - (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-30) a0-91 a1-39 *part-tracker-subsampler-params-default*) + ) + ) ) - (-> s5-2 ppointer) ) + :userdata (the-as uint (process->handle this)) ) ) (else (set! (-> *launch-matrix* trans quad) (-> this root root-prim prim-core world-sphere quad)) - (let ((s5-3 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-3 - (let ((t9-32 (method-of-type part-tracker activate))) - (t9-32 (the-as part-tracker s5-3) this "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-33 run-function-in-process) - (a0-98 s5-3) - (a1-42 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> this collect-effect2)) - (set! (-> *part-tracker-params-default* duration) 0) - (set! (-> *part-tracker-params-default* callback) - (lambda ((arg0 part-tracker)) - (let ((v1-1 (handle->process (-> arg0 userdata)))) - (when (the-as process v1-1) - (let* ((s5-0 (handle->process (-> (the-as collectable v1-1) pickup-handle))) - (a0-9 (if (type? s5-0 process-focusable) - s5-0 - ) - ) - (a2-0 (if (not a0-9) - (-> arg0 root trans) - (get-trans (the-as process-focusable a0-9) 3) - ) - ) + (part-tracker-spawn + part-tracker + :to this + :group (-> this collect-effect2) + :callback (lambda ((arg0 part-tracker)) + (let ((v1-1 (handle->process (-> arg0 userdata)))) + (when (the-as process v1-1) + (let* ((s5-0 (handle->process (-> (the-as collectable v1-1) pickup-handle))) + (a0-9 (if (type? s5-0 process-focusable) + s5-0 ) - (vector-lerp! - (-> arg0 root trans) - (-> arg0 offset) - a2-0 - (/ (the float (- (current-time) (-> arg0 state-time))) (the float (-> arg0 part group duration))) - ) - ) - ) - ) - ) + ) + (a2-0 (if (not a0-9) + (-> arg0 root trans) + (get-trans (the-as process-focusable a0-9) 3) + ) + ) + ) + (vector-lerp! + (-> arg0 root trans) + (-> arg0 offset) + a2-0 + (/ (the float (- (current-time) (-> arg0 state-time))) (the float (-> arg0 part group duration))) ) - (set! (-> *part-tracker-params-default* userdata) (the-as uint (process->handle this))) - (set! (-> *part-tracker-params-default* target) #f) - (set! (-> *part-tracker-params-default* mat-joint) *launch-matrix*) - ((the-as (function object object object none) t9-33) a0-98 a1-42 *part-tracker-params-default*) + ) + ) ) - (-> s5-3 ppointer) ) + :userdata (the-as uint (process->handle this)) ) ) ) @@ -976,10 +911,7 @@ ) :trans (behavior () (vector-v++! (-> self root transv) (compute-acc-due-to-gravity (-> self root) (new-stack-vector0) 0.0)) - (let ((t9-2 (method-of-object (-> self root) collide-shape-moving-method-57))) - (-> self root transv) - (t9-2) - ) + (integrate-no-collide! (-> self root) (-> self root transv)) (when (and (>= 0.0 (-> self root transv y)) (>= (-> self base y) (-> self root trans y))) (set! (-> self root trans y) (-> self base y)) (cond @@ -1125,7 +1057,7 @@ ) (else (if (nonzero? (-> self part)) - (set! (-> self part fade) (* 0.0033333334 f0-1)) + (set! (-> self part local-space-binding) (the-as particle-local-space-info (* 0.0033333334 f0-1))) ) (when (nonzero? (-> self draw)) (logior! (-> self draw status) (draw-control-status force-fade)) @@ -1729,7 +1661,7 @@ (a1-3 (-> this draw skeleton bones 3)) ) (if (nonzero? a0-7) - (sparticle-launch-control-method-17 a0-7 (the-as matrix a1-3)) + (spawn-from-mat a0-7 (the-as matrix a1-3)) ) ) 0 @@ -1863,10 +1795,7 @@ ) ) (else - (let ((t9-7 (method-of-object (-> self root) collide-shape-moving-method-57))) - (-> self root transv) - (t9-7) - ) + (integrate-no-collide! (-> self root) (-> self root transv)) ) ) ) @@ -2738,7 +2667,7 @@ (you-suck-stage *game-info* #f 0) (cond ((or (< 20 (-> *game-info* live-eco-pill-count)) - (not (logtest? (game-feature feature58) (-> *game-info* features))) + (not (logtest? (game-feature darkeco) (-> *game-info* features))) ) (return (the-as pickup-type #f)) ) @@ -2761,7 +2690,7 @@ ;; WARN: Return type mismatch number vs pickup-type. (defun pickup-light-set! ((arg0 fact-info) (arg1 (pointer pickup-type)) (arg2 (pointer float)) (arg3 int)) (the-as pickup-type (cond - ((logtest? (game-feature feature57) (-> *game-info* features)) + ((logtest? (game-feature lighteco) (-> *game-info* features)) (set! (-> arg1 0) (pickup-type eco-pill-light)) (set! (-> arg2 0) 20.0) ) diff --git a/goal_src/jak3/engine/common-obs/crates.gc b/goal_src/jak3/engine/common-obs/crates.gc index 9b23494e07..6350aca3db 100644 --- a/goal_src/jak3/engine/common-obs/crates.gc +++ b/goal_src/jak3/engine/common-obs/crates.gc @@ -112,7 +112,7 @@ ) (defpart 810 - :init-specs ((:texture (new 'static 'texture-id :page #x4)) + :init-specs ((:texture (bigpuff level-default-sprite)) (:num 16.0) (:y (meters 0.5) (meters 1)) (:scale-x (meters 1.5) (meters 1.5)) @@ -139,7 +139,7 @@ ) (defpart 812 - :init-specs ((:texture (new 'static 'texture-id :index #x3e :page #x4)) + :init-specs ((:texture (motion-blur-part level-default-sprite)) (:num 4.0) (:y (meters 0.75)) (:scale-x (meters 6)) @@ -167,7 +167,7 @@ ) (defpart 814 - :init-specs ((:texture (new 'static 'texture-id :index #x4b :page #x4)) + :init-specs ((:texture (starflash level-default-sprite)) (:num 1.0) (:y (meters 1)) (:scale-x (meters 8)) @@ -183,7 +183,7 @@ ) (defpart 815 - :init-specs ((:texture (new 'static 'texture-id :index #x6 :page #x4)) + :init-specs ((:texture (crate-wood-01-splinter level-default-sprite)) (:num 5.0) (:x (meters -0.5) (meters 1)) (:y (meters 0.25) (meters 1.5)) @@ -215,7 +215,7 @@ ) (defpart 817 - :init-specs ((:texture (new 'static 'texture-id :index #x5 :page #x4)) + :init-specs ((:texture (crate-metalbolt-splinter level-default-sprite)) (:num 4.5) (:x (meters -0.5) (meters 1)) (:y (meters 0.25) (meters 1.5)) @@ -310,7 +310,7 @@ ) (defpart 147 - :init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4)) + :init-specs ((:texture (hotdot level-default-sprite)) (:num 6.0) (:scale-x (meters 0.2) (meters 0.4)) (:scale-y :copy scale-x) @@ -338,7 +338,7 @@ ) (defpart 819 - :init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4)) + :init-specs ((:texture (hotdot level-default-sprite)) (:num 3.0) (:scale-x (meters 0.2)) (:rot-z (degrees 0) (degrees 180)) @@ -355,7 +355,7 @@ ) (defpart 146 - :init-specs ((:texture (new 'static 'texture-id :index #x4b :page #x4)) + :init-specs ((:texture (starflash level-default-sprite)) (:num 1.0) (:scale-x (meters 16)) (:scale-y :copy scale-x) @@ -370,7 +370,7 @@ ) (defpart 148 - :init-specs ((:texture (new 'static 'texture-id :page #x4)) + :init-specs ((:texture (bigpuff level-default-sprite)) (:num 4.0) (:scale-x (meters 2.5) (meters 1.5)) (:rot-z (degrees 0) (degrees 360)) @@ -394,7 +394,7 @@ ) (defpart 145 - :init-specs ((:texture (new 'static 'texture-id :index #x4b :page #x4)) + :init-specs ((:texture (starflash level-default-sprite)) (:num 16.0) (:y (meters 1)) (:scale-x (meters 0.1)) @@ -411,7 +411,7 @@ ) (defpart 143 - :init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4)) + :init-specs ((:texture (hotdot level-default-sprite)) (:num 1.0) (:y (meters 0) (meters 16)) (:z (meters 0.3) (meters 0.3)) @@ -435,7 +435,7 @@ ) (defpart 144 - :init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4)) + :init-specs ((:texture (hotdot level-default-sprite)) (:num 1.0) (:scale-x (meters 0.3) (meters 0.1)) (:scale-y :copy scale-x) @@ -455,7 +455,7 @@ ) (defpart 818 - :init-specs ((:texture (new 'static 'texture-id :index #x5 :page #x4)) + :init-specs ((:texture (crate-metalbolt-splinter level-default-sprite)) (:num 8.0 16.0) (:x (meters -0.5) (meters 1)) (:y (meters 0.25) (meters 1.5)) @@ -964,50 +964,11 @@ (cond ((logtest? (-> *part-group-id-table* 197 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) - (let ((s5-9 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-9 - (let ((t9-19 (method-of-type part-tracker-subsampler activate))) - (t9-19 (the-as part-tracker-subsampler s5-9) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-20 run-function-in-process) - (a0-41 s5-9) - (a1-20 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 197)) - (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-20) a0-41 a1-20 *part-tracker-subsampler-params-default*) - ) - (-> s5-9 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 197)) ) (else (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) - (let ((s5-10 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-10 - (let ((t9-22 (method-of-type part-tracker activate))) - (t9-22 (the-as part-tracker s5-10) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-23 run-function-in-process) - (a0-47 s5-10) - (a1-23 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 197)) - (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-23) a0-47 a1-23 *part-tracker-params-default*) - ) - (-> s5-10 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 197)) ) ) ) @@ -1015,99 +976,21 @@ (cond ((logtest? (-> *part-group-id-table* 196 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) - (let ((s5-11 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-11 - (let ((t9-25 (method-of-type part-tracker-subsampler activate))) - (t9-25 (the-as part-tracker-subsampler s5-11) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-26 run-function-in-process) - (a0-55 s5-11) - (a1-27 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 196)) - (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-26) a0-55 a1-27 *part-tracker-subsampler-params-default*) - ) - (-> s5-11 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 196)) ) (else (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) - (let ((s5-12 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-12 - (let ((t9-28 (method-of-type part-tracker activate))) - (t9-28 (the-as part-tracker s5-12) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-29 run-function-in-process) - (a0-61 s5-12) - (a1-30 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 196)) - (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-29) a0-61 a1-30 *part-tracker-params-default*) - ) - (-> s5-12 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 196)) ) ) ) ((logtest? (-> *part-group-id-table* 195 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) - (let ((s5-13 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-13 - (let ((t9-31 (method-of-type part-tracker-subsampler activate))) - (t9-31 (the-as part-tracker-subsampler s5-13) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-32 run-function-in-process) - (a0-67 s5-13) - (a1-33 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 195)) - (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-32) a0-67 a1-33 *part-tracker-subsampler-params-default*) - ) - (-> s5-13 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 195)) ) (else (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) - (let ((s5-14 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-14 - (let ((t9-34 (method-of-type part-tracker activate))) - (t9-34 (the-as part-tracker s5-14) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-35 run-function-in-process) - (a0-73 s5-14) - (a1-36 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 195)) - (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-35) a0-73 a1-36 *part-tracker-params-default*) - ) - (-> s5-14 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 195)) ) ) ) diff --git a/goal_src/jak3/engine/common-obs/curves.gc b/goal_src/jak3/engine/common-obs/curves.gc index f1dd334b23..bf11617009 100644 --- a/goal_src/jak3/engine/common-obs/curves.gc +++ b/goal_src/jak3/engine/common-obs/curves.gc @@ -60,7 +60,7 @@ (default-loop-behavior uint64) ) (:methods - (curve2d-piecewise-method-10 (_type_ int symbol uint) none) + (curve2d-piecewise-method-10 (_type_ int symbol int) none) (curve2d-piecewise-method-11 (_type_) none) ) ) @@ -115,7 +115,7 @@ ) -(defmethod curve2d-piecewise-method-10 ((this curve2d-piecewise) (arg0 int) (arg1 symbol) (arg2 uint)) +(defmethod curve2d-piecewise-method-10 ((this curve2d-piecewise) (arg0 int) (arg1 symbol) (arg2 int)) (set! (-> this pts) ((method-of-type float-pair-array new) arg1 float-pair-array arg0)) (set! (-> this default-loop-behavior) (the-as uint (if arg2 0 @@ -456,7 +456,7 @@ (when (or (zero? *curve-linear-up-hold*) (!= loading-level global)) (set! *curve-linear-up-hold* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *curve-linear-up-hold* 2 'loading-level (the-as uint #f)) + (curve2d-piecewise-method-10 *curve-linear-up-hold* 2 'loading-level (the-as int #f)) ) (set! (-> *curve-linear-up-hold* pts data 0 first) 0.0) diff --git a/goal_src/jak3/engine/common-obs/debris.gc b/goal_src/jak3/engine/common-obs/debris.gc index 13e6a418cd..14317b89e0 100644 --- a/goal_src/jak3/engine/common-obs/debris.gc +++ b/goal_src/jak3/engine/common-obs/debris.gc @@ -7,3 +7,593 @@ ;; DECOMP BEGINS +(deftype debris-static-joint-params (structure) + ((parent-joint-index int16) + (group string) + (offset vector) + ) + ) + + +(deftype debris-static-params (basic) + ((joints (array debris-static-joint-params)) + (collide-spec collide-spec) + (sound-hit sound-name) + (art-level symbol) + ) + ) + + +(deftype debris (basic) + ((root transformq :inline) + (node-list cspace-array) + (draw draw-control) + (duration float) + (hit-xz-reaction float) + (hit-y-reaction float) + (prev-pos vector :inline) + (gravity float) + (rot-axis vector :inline) + (rot-angle float) + (transv vector :inline) + (time-fade-out time-frame) + (params debris-static-params) + ) + ) + + +(deftype debris-box (structure) + ((start uint32) + (num uint32) + (bbox bounding-box :inline) + ) + ) + + +(deftype debris-group (process) + ((dead-debris-num int32) + (debris-num int32) + (debris (array debris)) + (max-probe-width float) + (state-time time-frame) + (num-boxes uint32) + (boxes debris-box 16 :inline) + ) + (:state-methods + idle + ) + (:methods + (do-collision (_type_ int) none) + (update-box! (_type_ int) none) + ) + ) + + +(deftype debris-tuning (structure) + ((explosion uint64) + (duration time-frame) + (gravity float) + (rot-speed float) + (bounds-inflate float) + (max-probe-width float) + (max-probe-height float) + (max-probe-depth float) + (fountain-rand-transv-lo vector :inline) + (fountain-rand-transv-hi vector :inline) + (away-from-focal-pt vector :inline :overlay-at fountain-rand-transv-lo) + (away-from-rand-transv-xz-lo float :overlay-at (-> fountain-rand-transv-hi data 0)) + (away-from-rand-transv-xz-hi float :overlay-at (-> fountain-rand-transv-hi data 1)) + (away-from-rand-transv-y-lo float :overlay-at (-> fountain-rand-transv-hi data 2)) + (away-from-rand-transv-y-hi float :overlay-at (-> fountain-rand-transv-hi data 3)) + (hit-xz-reaction float) + (hit-y-reaction float) + (scale-rand-lo float) + (scale-rand-hi float) + ) + (:methods + (new (symbol type uint) _type_) + ) + ) + + +;; WARN: Return type mismatch structure vs debris-tuning. +(defmethod new debris-tuning ((allocation symbol) (type-to-make type) (arg0 uint)) + (let ((t9-0 (method-of-type structure new)) + (v1-1 type-to-make) + ) + (-> type-to-make size) + (let ((v0-0 (t9-0 allocation v1-1))) + (set! (-> (the-as debris-tuning v0-0) explosion) arg0) + (set! (-> (the-as debris-tuning v0-0) duration) (seconds 1)) + (set! (-> (the-as debris-tuning v0-0) gravity) -286720.0) + (set! (-> (the-as debris-tuning v0-0) rot-speed) 180.0) + (set! (-> (the-as debris-tuning v0-0) bounds-inflate) 16384.0) + (set! (-> (the-as debris-tuning v0-0) max-probe-width) 40960.0) + (set! (-> (the-as debris-tuning v0-0) max-probe-height) 24576.0) + (set! (-> (the-as debris-tuning v0-0) max-probe-depth) 20480.0) + (set! (-> (the-as debris-tuning v0-0) hit-xz-reaction) 0.75) + (set! (-> (the-as debris-tuning v0-0) hit-y-reaction) 0.7) + (set! (-> (the-as debris-tuning v0-0) scale-rand-lo) 0.8) + (set! (-> (the-as debris-tuning v0-0) scale-rand-hi) 2.0) + (cond + ((zero? arg0) + (set-vector! (-> (the-as debris-tuning v0-0) fountain-rand-transv-lo) -81920.0 20480.0 -81920.0 1.0) + (set-vector! (-> (the-as debris-tuning v0-0) fountain-rand-transv-hi) 81920.0 61440.0 81920.0 1.0) + ) + ((= arg0 1) + (vector-reset! (-> (the-as debris-tuning v0-0) fountain-rand-transv-lo)) + (set! (-> (the-as debris-tuning v0-0) fountain-rand-transv-hi x) 49152.0) + (set! (-> (the-as debris-tuning v0-0) fountain-rand-transv-hi y) 163840.0) + (set! (-> (the-as debris-tuning v0-0) fountain-rand-transv-hi z) 20480.0) + (set! (-> (the-as debris-tuning v0-0) fountain-rand-transv-hi w) 61440.0) + ) + ) + (the-as debris-tuning v0-0) + ) + ) + ) + +(defmethod update-box! ((this debris-group) (idx int)) + (let ((debris-box (-> this boxes idx))) + (dotimes (i (the-as int (-> debris-box num))) + (let ((debris (-> this debris (+ i (-> debris-box start))))) + (if (zero? i) + (set-to-point! (-> debris-box bbox) (the-as vector (-> debris root))) + (add-point! (-> debris-box bbox) (the-as vector (-> debris root))) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod do-collision ((this debris-group) (idx int)) + (local-vars + (sv-80 (function sound-name sound-id int int int sound-group object sound-id :behavior process-drawable)) + (name sound-name) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let* ((debris-box (-> this boxes idx)) + (box-num (-> debris-box num)) + (box-start (-> debris-box start)) + (bbox (-> debris-box bbox)) + ) + (when (> box-num 0) + (let ((cquery (new 'static 'collide-query))) + (let ((debris-start (-> this debris box-start))) + (let ((a3-0 (-> cquery bbox)) + (a1-2 (-> bbox min)) + (a2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a2-0 x) 4096.0) + (set! (-> a2-0 y) 4096.0) + (set! (-> a2-0 z) 4096.0) + (set! (-> a2-0 w) 1.0) + (vector-! (the-as vector a3-0) a1-2 a2-0) + ) + (let ((a1-3 (-> cquery bbox max)) + (a0-2 (-> bbox max)) + (a2-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a2-1 x) 4096.0) + (set! (-> a2-1 y) 4096.0) + (set! (-> a2-1 z) 4096.0) + (set! (-> a2-1 w) 1.0) + (vector+! a1-3 a0-2 a2-1) + ) + (set! (-> cquery collide-with) (-> debris-start params collide-spec)) + ) + (set! (-> cquery ignore-process0) #f) + (set! (-> cquery ignore-process1) #f) + (set! (-> cquery ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> cquery action-mask) (collide-action solid)) + (fill-using-bounding-box *collide-cache* cquery) + (dotimes (s2-0 (the-as int box-num)) + (let ((s1-0 (-> this debris (+ s2-0 box-start)))) + (when (not (logtest? (-> this debris (+ s2-0 box-start) draw status) (draw-control-status no-draw))) + (let ((f0-9 (* (-> s1-0 gravity) (seconds-per-frame))) + (s0-0 (new 'stack-no-clear 'quaternion)) + ) + (set! (-> s1-0 prev-pos quad) (-> s1-0 root trans quad)) + (+! (-> s1-0 transv y) f0-9) + (vector-v+! (the-as vector (-> s1-0 root)) (the-as vector (-> s1-0 root)) (-> s1-0 transv)) + (quaternion-vector-angle! s0-0 (-> s1-0 rot-axis) (* (-> s1-0 rot-angle) (seconds-per-frame))) + (quaternion*! (-> s1-0 root quat) (-> s1-0 root quat) s0-0) + ) + (quaternion-normalize! (-> s1-0 root quat)) + (set! (-> s1-0 rot-angle) (- (-> s1-0 rot-angle) (* (seconds-per-frame) (-> s1-0 rot-angle)))) + (when (nonzero? (-> s1-0 params collide-spec)) + (let ((s0-1 (new 'stack-no-clear 'vector))) + (vector-! (-> cquery move-dist) (the-as vector (-> s1-0 root)) (-> s1-0 prev-pos)) + (set! (-> cquery start-pos quad) (-> s1-0 prev-pos quad)) + (let ((v1-34 cquery)) + (set! (-> v1-34 radius) 2048.0) + (set! (-> v1-34 collide-with) (-> s1-0 params collide-spec)) + (set! (-> v1-34 ignore-process0) #f) + (set! (-> v1-34 ignore-process1) #f) + (set! (-> v1-34 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-34 action-mask) (collide-action solid)) + ) + (let ((f0-16 (probe-using-line-sphere *collide-cache* cquery))) + (when (>= f0-16 0.0) + (let ((a1-12 s0-1)) + (let ((v1-37 (-> cquery start-pos))) + (let ((a0-21 (-> cquery move-dist))) + (let ((a2-5 f0-16)) + (.mov vf7 a2-5) + ) + (.lvf vf5 (&-> a0-21 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-12 quad) vf6) + ) + (let* ((v1-38 (-> s1-0 transv)) + (f30-0 (sqrtf (+ (* (-> v1-38 x) (-> v1-38 x)) (* (-> v1-38 z) (-> v1-38 z))))) + ) + (let ((f28-0 (vector-length (-> s1-0 transv)))) + (when (< (-> s1-0 transv y) -61440.0) + (set! sv-80 sound-play-by-name) + (set! name (-> s1-0 params sound-hit)) + (let ((id (new-sound-id)) + (a2-6 1024) + (a3-6 0) + (t0-4 0) + (t1-0 0) + (t2-0 (-> s1-0 root)) + ) + (sv-80 name id a2-6 a3-6 t0-4 (the-as sound-group t1-0) t2-0) + ) + ) + (vector-reflect! (-> s1-0 transv) (-> s1-0 transv) (-> cquery best-other-tri normal)) + (vector-reflect! (-> s1-0 rot-axis) (-> s1-0 rot-axis) (-> cquery best-other-tri normal)) + (set! (-> s1-0 rot-angle) f28-0) + ) + (let ((f28-1 (-> s1-0 transv y))) + (vector-xz-normalize! (-> s1-0 transv) (* f30-0 (-> s1-0 hit-xz-reaction))) + (set! (-> s1-0 transv y) (* f28-1 (-> s1-0 hit-y-reaction))) + ) + ) + (+! (-> s0-1 y) (* 40.96 (-> cquery best-other-tri normal y))) + (set! (-> s0-1 w) 1.0) + (set! (-> s1-0 root trans quad) (-> s0-1 quad)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defstate idle (debris-group) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (set! (-> self dead-debris-num) (-> self debris-num)) + (dotimes (i (-> self debris-num)) + (let ((debris (-> self debris i)) + (draw-ctrl (-> self debris i draw)) + ) + (matrix<-transformq+trans! + (the-as matrix (-> draw-ctrl skeleton bones 3)) + (-> debris root) + (-> draw-ctrl skeleton bones 0 transform trans) + ) + (logclear! (-> draw-ctrl status) (draw-control-status no-draw-temp uninited)) + (vector+! (-> draw-ctrl origin) (-> draw-ctrl skeleton bones 3 transform trans) (-> draw-ctrl bounds)) + (set! (-> draw-ctrl origin w) (-> draw-ctrl bounds w)) + (cond + ((zero? (-> debris time-fade-out)) + (if (or (< (vector-length (-> debris transv)) 4096.0) + (time-elapsed? (-> self state-time) (the int (-> debris duration))) + ) + (set-time! (-> debris time-fade-out)) + ) + ) + ((time-elapsed? (-> debris time-fade-out) (seconds 0.5)) + (logior! (-> draw-ctrl status) (draw-control-status no-draw)) + (+! (-> self dead-debris-num) -1) + ) + (else + (logior! (-> draw-ctrl status) (draw-control-status force-fade)) + (set! (-> draw-ctrl force-fade) + (the-as uint (the int (- 128.0 (* 0.85333335 (the float (- (current-time) (-> debris time-fade-out))))))) + ) + ) + ) + ) + ) + (if (zero? (-> self dead-debris-num)) + (deactivate self) + ) + (dotimes (ii (the-as int (-> self num-boxes))) + (let* ((debris-box (-> self boxes ii)) + (box-num (-> debris-box num)) + (box-start (-> debris-box start)) + (bbox (-> debris-box bbox)) + (s2-0 0) + ) + (update-box! self ii) + (if (< (- (-> bbox max data s2-0) (-> bbox min data s2-0)) (- (-> bbox max y) (-> bbox min y))) + (set! s2-0 1) + ) + (if (< (- (-> bbox max data s2-0) (-> bbox min data s2-0)) (- (-> bbox max z) (-> bbox min z))) + (set! s2-0 2) + ) + (when (and (< (-> self max-probe-width) (- (-> debris-box bbox max data s2-0) (-> bbox min data s2-0))) + (< (-> self num-boxes) (the-as uint 15)) + ) + 0.0 + (let ((a1-3 (new 'static 'boxed-array :type debris :length 0 :allocated-length 32)) + (a0-12 0) + (v1-72 0) + (a2-4 (-> self boxes (-> self num-boxes))) + ) + (let ((f0-14 (* 0.5 (+ (-> debris-box bbox min data s2-0) (-> debris-box bbox max data s2-0))))) + (dotimes (a3-6 (the-as int box-num)) + (let ((t0-4 (-> self debris (+ a3-6 (-> debris-box start))))) + (cond + ((< (-> t0-4 root trans data s2-0) f0-14) + (set! (-> self debris (+ a0-12 box-start)) (-> self debris (+ a3-6 box-start))) + (+! a0-12 1) + ) + (else + (set! (-> a1-3 v1-72) (-> self debris (+ a3-6 box-start))) + (+! v1-72 1) + ) + ) + ) + ) + ) + (dotimes (a3-9 v1-72) + (set! (-> self debris (+ a0-12 box-start a3-9)) (-> a1-3 a3-9)) + ) + (set! (-> debris-box num) (the-as uint a0-12)) + (set! (-> a2-4 start) (+ box-start a0-12)) + (set! (-> a2-4 num) (the-as uint v1-72)) + ) + (update-box! self ii) + (update-box! self (the-as int (-> self num-boxes))) + (+! (-> self num-boxes) 1) + ) + ) + ) + (dotimes (gp-2 (the-as int (-> self num-boxes))) + (do-collision self gp-2) + ) + ) + :code sleep-code + ) + +;; WARN: Return type mismatch process vs debris-group. +(defmethod relocate ((this debris-group) (offset int)) + (dotimes (v1-0 (-> this debris length)) + (if (nonzero? (-> this debris v1-0 node-list)) + (&+! (-> this debris v1-0 node-list) offset) + ) + (if (nonzero? (-> this debris v1-0 draw)) + (&+! (-> this debris v1-0 draw) offset) + ) + (if (nonzero? (-> this debris v1-0)) + (&+! (-> this debris v1-0) offset) + ) + ) + (if (nonzero? (-> this debris)) + (&+! (-> this debris) offset) + ) + (the-as debris-group ((method-of-type process relocate) this offset)) + ) + +(defbehavior debris-group-init-by-other debris-group ((tuning debris-tuning) (params debris-static-params) (pdraw process-drawable)) + (local-vars (tuning-scale vector) (debris-scale vector) (sv-80 vector) (sv-96 vector) (sv-112 vector)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (stack-size-set! (-> self main-thread) 512) + (set! (-> self debris-num) (-> params joints length)) + (set! (-> self debris) (new 'process 'boxed-array debris (-> self debris-num))) + (set! (-> self debris length) (-> self debris allocated-length)) + (dotimes (i (-> params joints length)) + (set! (-> self debris i) (new 'process 'debris)) + (let ((skel (art-group-get-by-name *level* (-> params joints i group) (the-as (pointer level) #f))) + (debris (-> self debris i)) + ) + (cond + ((and skel (nonzero? skel)) + (set! (-> debris params) params) + (let ((joint-transform (-> pdraw node-list data (-> params joints i parent-joint-index) bone transform))) + (matrix->quaternion (-> debris root quat) joint-transform) + (matrix->trans joint-transform (the-as vector (-> debris root))) + (set! (-> debris root scale quad) (-> pdraw root scale quad)) + (if (nonzero? (-> params joints i offset)) + (vector-matrix*! (the-as vector (-> debris root)) (-> params joints i offset) joint-transform) + ) + ) + (set! debris-scale (-> debris root scale)) + (let ((s0-1 (-> debris root scale))) + (set! tuning-scale (new 'stack-no-clear 'vector)) + (set! (-> tuning-scale x) (rand-vu-float-range (-> tuning scale-rand-lo) (-> tuning scale-rand-hi))) + (set! (-> tuning-scale y) (rand-vu-float-range (-> tuning scale-rand-lo) (-> tuning scale-rand-hi))) + (set! (-> tuning-scale z) (rand-vu-float-range (-> tuning scale-rand-lo) (-> tuning scale-rand-hi))) + (set! (-> tuning-scale w) 1.0) + (.lvf vf4 (&-> s0-1 quad)) + ) + (.lvf vf5 (&-> tuning-scale quad)) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> debris-scale quad) vf6) + (case (-> tuning explosion) + ((1) + (vector-! (-> debris transv) (the-as vector (-> debris root)) (-> tuning fountain-rand-transv-lo)) + (let ((s0-2 vector-normalize!)) + (set! sv-80 (-> debris transv)) + (let ((a1-17 (rand-vu-float-range (-> tuning fountain-rand-transv-hi x) (-> tuning fountain-rand-transv-hi y)))) + (s0-2 sv-80 a1-17) + ) + ) + (+! (-> debris transv y) + (rand-vu-float-range (-> tuning fountain-rand-transv-hi z) (-> tuning fountain-rand-transv-hi w)) + ) + (set! (-> debris transv w) 1.0) + ) + (else + (set! sv-96 (-> tuning fountain-rand-transv-lo)) + (set! sv-112 (-> tuning fountain-rand-transv-hi)) + (set-vector! + (-> debris transv) + (rand-vu-float-range (-> sv-96 x) (-> sv-112 x)) + (rand-vu-float-range (-> sv-96 y) (-> sv-112 y)) + (rand-vu-float-range (-> sv-96 z) (-> sv-112 z)) + 1.0 + ) + ) + ) + (let ((s0-5 (new 'stack-no-clear 'vector))) + (rand-vu-sphere-point-uniform! s0-5 1.0) + (vector-normalize! s0-5 1.0) + (set! (-> debris rot-axis quad) (-> s0-5 quad)) + ) + (set! (-> debris rot-angle) (* 182.04445 (-> tuning rot-speed))) + (set! (-> debris duration) (the float (-> tuning duration))) + (set! (-> debris hit-xz-reaction) (-> tuning hit-xz-reaction)) + (set! (-> debris hit-y-reaction) (-> tuning hit-y-reaction)) + (set! (-> debris gravity) (-> tuning gravity)) + (set! (-> debris time-fade-out) 0) + (let ((draw (skeleton-group->draw-control + (the-as process-drawable self) + (the-as skeleton-group skel) + (&-> debris node-list) + ) + ) + ) + (set! (-> debris draw) draw) + (set! (-> draw skeleton bones 0 transform trans quad) (-> *null-vector* quad)) + ) + ) + (else + ) + ) + ) + ) + (set! (-> self max-probe-width) (-> tuning max-probe-width)) + (set! (-> self num-boxes) (the-as uint 1)) + (set! (-> self boxes 0 start) (the-as uint 0)) + (set! (-> self boxes 0 num) (the-as uint (-> self debris-num))) + (go-virtual idle) + ) + ) + +;; WARN: Return type mismatch (pointer process) vs (pointer debris-group). +(defun debris-spawn ((arg0 process-drawable) (arg1 debris-tuning) (arg2 debris-static-params) (arg3 process-drawable)) + (if (not arg3) + (set! arg3 arg0) + ) + (process-spawn debris-group arg1 arg2 arg3 :name "debris-group" :to arg0 :stack-size #x8000) + ) + +(defskelgroup skel-kg-debris-a kg-debris kg-debris-a-lod0-jg -1 + ((kg-debris-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-kg-debris-b kg-debris kg-debris-b-lod0-jg -1 + ((kg-debris-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-kg-debris-c kg-debris kg-debris-c-lod0-jg -1 + ((kg-debris-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-kg-debris-d kg-debris kg-debris-d-lod0-jg -1 + ((kg-debris-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-neo-debris-a neo-debris neo-debris-a-lod0-jg -1 + ((neo-debris-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-neo-debris-b neo-debris neo-debris-b-lod0-jg -1 + ((neo-debris-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-neo-debris-c neo-debris neo-debris-c-lod0-jg -1 + ((neo-debris-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-neo-debris-d neo-debris neo-debris-d-lod0-jg -1 + ((neo-debris-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-v-marauder-debris-ring interceptor interceptor-debris-ring-lod0-jg -1 + ((interceptor-debris-ring-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-v-marauder-debris-nut interceptor interceptor-debris-nut-lod0-jg -1 + ((interceptor-debris-nut-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-v-marauder-debris-rod interceptor interceptor-debris-rod-lod0-jg -1 + ((interceptor-debris-rod-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-v-marauder-debris-panel interceptor interceptor-debris-panel-lod0-jg -1 + ((interceptor-debris-panel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-dm-debris-a dm-debris dm-debris-a-lod0-jg -1 + ((dm-debris-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-dm-debris-b dm-debris dm-debris-b-lod0-jg -1 + ((dm-debris-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-dm-debris-c dm-debris dm-debris-c-lod0-jg -1 + ((dm-debris-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-dm-debris-d dm-debris dm-debris-d-lod0-jg -1 + ((dm-debris-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) diff --git a/goal_src/jak3/engine/common-obs/elevator.gc b/goal_src/jak3/engine/common-obs/elevator.gc index 9a4a3787ae..b459f49d83 100644 --- a/goal_src/jak3/engine/common-obs/elevator.gc +++ b/goal_src/jak3/engine/common-obs/elevator.gc @@ -5,5 +5,944 @@ ;; name in dgo: elevator ;; dgos: GAME +;; +++elevator-flags +(defenum elevator-flags + :type uint64 + :bitfield #t + (running 0) + (ef1 1) + (waiting 2) + (ef3 3) + (teleport 4) + (prevent-jump 5) + (arrived 6) + (ef7 7) + (fence 8) + (grab 9) + (dormant 10) + ) +;; ---elevator-flags + + +;; +++elevator-status +(defenum elevator-status + :type uint64 + :bitfield #t + (waiting-to-descend) + (waiting-to-ascend) + (moving) + ) +;; ---elevator-status + + ;; DECOMP BEGINS +(deftype elevator-params (structure) + ((xz-threshold float) + (y-threshold float) + (start-pos float) + (move-rate float) + (flags elevator-flags) + ) + ) + + +(deftype path-step (structure) + ((next-pos float) + (dist float) + ) + ) + + +(deftype path-step-inline-array (inline-array-class) + ((data path-step :inline :dynamic) + ) + ) + + +(set! (-> path-step-inline-array heap-base) (the-as uint 16)) + +(deftype elevator (base-plat) + ((params elevator-params :inline) + (path-seq path-step-inline-array) + (path-dest float) + (bottom-top float 2) + (move-pos float 2) + (move-dist float) + (path-pos float) + (path-eased-pos float) + (ride-timer time-frame) + (sticky-player-last-ride-time time-frame) + (elevator-status elevator-status) + (on-activate pair) + (on-deactivate pair) + (on-up pair) + (on-down pair) + (on-running pair) + (on-notice pair) + (on-wait pair) + (sound-id sound-id) + (sound-running-loop sound-spec) + (sound-arrived sound-spec) + (fence-prim-index uint32) + (speed float) + (sound-start sound-spec) + (activate-test pair) + ) + (:state-methods + dormant + waiting + running + arrived + unknown + die + ) + (:methods + (calc-dist-between-points! (_type_ int int) none) + (go-arrived-or-waiting (_type_) none) + (init-params! (_type_) none) + (init-sound! (_type_) none) + (point-inside-shaft? (_type_ vector float float) symbol) + (elevator-method-46 (_type_) object) + (elevator-method-47 (_type_) symbol) + (elevator-method-48 (_type_) none) + (find-closest-point-in-path! (_type_ vector (pointer float) symbol symbol) symbol) + (elevator-method-50 (_type_) none) + (toggle-fence-collision (_type_ symbol) none) + ) + ) + + +(defmethod point-inside-shaft? ((this elevator) (arg0 vector) (arg1 float) (arg2 float)) + #f + ) + +(defmethod elevator-method-50 ((this elevator)) + (let ((gp-0 *target*)) + (when gp-0 + (let ((s4-0 (-> gp-0 control collision-spheres 0)) + (s5-0 (new 'stack-no-clear 'collide-query)) + ) + (set! (-> s5-0 start-pos quad) (-> s4-0 prim-core world-sphere quad)) + (+! (-> s5-0 start-pos y) 8192.0) + (set! (-> s5-0 start-pos w) 1.0) + (vector-reset! (-> s5-0 move-dist)) + (set! (-> s5-0 move-dist y) -90112.0) + (let ((v1-6 s5-0)) + (set! (-> v1-6 radius) (-> s4-0 local-sphere w)) + (set! (-> v1-6 collide-with) (collide-spec hit-by-others-list pusher)) + (set! (-> v1-6 ignore-process0) gp-0) + (set! (-> v1-6 ignore-process1) #f) + (set! (-> v1-6 ignore-pat) (-> gp-0 control pat-ignore-mask)) + (set! (-> v1-6 action-mask) (collide-action solid)) + ) + (let ((f0-5 (fill-and-probe-using-line-sphere *collide-cache* s5-0))) + (when (< 0.0 f0-5) + (vector-float*! (-> s5-0 move-dist) (-> s5-0 move-dist) f0-5) + (vector+! (-> s5-0 move-dist) (-> s5-0 move-dist) (-> s5-0 start-pos)) + (vector-! (-> s5-0 move-dist) (-> s5-0 move-dist) (the-as vector (-> s4-0 prim-core))) + (move-by-vector! (-> gp-0 control) (-> s5-0 move-dist)) + ) + ) + ) + ) + ) + (none) + ) + +(defmethod toggle-fence-collision ((this elevator) (arg0 symbol)) + (when (and (logtest? (-> this params flags) (elevator-flags fence)) (nonzero? (-> this fence-prim-index))) + (let ((v1-7 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child (-> this fence-prim-index)))) + (cond + (arg0 + (set! (-> v1-7 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> v1-7 prim-core collide-with) (collide-spec jak player-list)) + (set-setting! 'jump #f 0.0 0) + ) + (else + (set! (-> v1-7 prim-core collide-as) (collide-spec)) + (set! (-> v1-7 prim-core collide-with) (collide-spec)) + (remove-setting! 'jump) + ) + ) + ) + ) + (none) + ) + +(defmethod deactivate ((this elevator)) + "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-params! ((this elevator)) + (set! (-> this params xz-threshold) (res-lump-float (-> this entity) 'elevator-xz-threshold :default 81920.0)) + (set! (-> this params y-threshold) (res-lump-float (-> this entity) 'elevator-y-threshold :default 20480.0)) + (set! (-> this params start-pos) (res-lump-float (-> this entity) 'elevator-start-pos)) + (set! (-> this params move-rate) (res-lump-float (-> this entity) 'elevator-move-rate :default 25600.0)) + (set! (-> this params flags) (res-lump-value + (-> this entity) + 'elevator-flags + elevator-flags + :default (the-as uint128 1) + :time -1000000000.0 + ) + ) + 0 + (none) + ) + +(defun ease-value-in-out ((arg0 float) (arg1 float)) + (let* ((f0-0 arg1) + (f4-0 (- 1.0 arg1)) + (f3-0 (/ f0-0 (- 1.0 f4-0))) + (f2-1 (* f0-0 f0-0)) + (f1-6 (+ (* 2.0 f0-0 (- f4-0 f0-0)) f2-1)) + (f1-7 (+ (* (- 1.0 f4-0) (- 1.0 f4-0) f3-0) f1-6)) + ) + (/ (cond + ((< arg0 f0-0) + (* arg0 arg0) + ) + ((< arg0 f4-0) + (+ (* 2.0 f0-0 (- arg0 f0-0)) f2-1) + ) + (else + (let ((f0-7 (- 1.0 arg0))) + (- f1-7 (* f0-7 f0-7 f3-0)) + ) + ) + ) + f1-7 + ) + ) + ) + +;; WARN: disable def twice: 11. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defbehavior elevator-event elevator ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('status?) + (and (= (the float (/ (the-as int (-> arg3 param 0)) 8)) (-> self move-pos 0)) + (= (the float (/ (the-as int (-> arg3 param 1)) 8)) (-> self move-pos 1)) + ) + ) + (('ridden) + (let ((v1-8 (handle->process (-> (the-as focus (-> arg3 param 0)) handle)))) + (if (= (-> v1-8 type) target) + (set-time! (-> self sticky-player-last-ride-time)) + ) + ) + #t + ) + (('use-camera) + (if (-> arg3 param 0) + (set-setting! 'entity-name (-> arg3 param 0) 0.0 0) + (remove-setting! 'entity-name) + ) + ) + (('move-to) + (when (and (-> self next-state) (let ((v1-20 (-> self next-state name))) + (or (= v1-20 'waiting) (= v1-20 'arrived)) + ) + ) + (set! (-> self move-pos 0) (-> self move-pos 1)) + (cond + ((not (logtest? (-> arg3 param 0) 7)) + (let ((gp-0 (-> arg3 param 0))) + (set! (-> self move-pos 1) (the-as float (if (type? gp-0 float) + (the-as float gp-0) + ) + ) + ) + ) + ) + (else + (case (-> arg3 param 0) + (('quote 'bottom) + (set! (-> self move-pos 1) (-> self bottom-top 0)) + ) + (('quote 'top) + (set! (-> self move-pos 1) (-> self bottom-top 1)) + ) + ) + ) + ) + (go-virtual running) + ) + ) + (('jump-to) + (cond + ((not (logtest? (-> arg3 param 0) 7)) + (let ((gp-1 (-> arg3 param 0))) + (set! (-> self move-pos 1) (the-as float (if (type? gp-1 float) + (the-as float gp-1) + ) + ) + ) + ) + ) + (else + (case (-> arg3 param 0) + (('quote 'bottom) + (set! (-> self move-pos 1) (-> self bottom-top 0)) + ) + (('quote 'top) + (set! (-> self move-pos 1) (-> self bottom-top 1)) + ) + ) + ) + ) + (set! (-> self move-pos 0) (-> self move-pos 1)) + (get-point-in-path! (-> self path) (-> self basetrans) (-> self move-pos 0) 'interp) + (go-virtual waiting) + ) + (('trigger) + (when (and (-> self next-state) (let ((v1-48 (-> self next-state name))) + (or (= v1-48 'waiting) (= v1-48 'arrived)) + ) + ) + (set! (-> self move-pos 0) (-> self move-pos 1)) + (cond + ((= (-> self move-pos 0) (-> self bottom-top 0)) + (set! (-> self move-pos 1) (-> self bottom-top 1)) + ) + ((= (-> self move-pos 0) (-> self bottom-top 1)) + (set! (-> self move-pos 1) (-> self bottom-top 0)) + ) + ) + (go-virtual running) + ) + ) + (('query) + (case (-> arg3 param 0) + (('waiting?) + (and (-> self next-state) (= (-> self next-state name) 'waiting)) + ) + (('arrived?) + (and (-> self next-state) (let ((v1-61 (-> self next-state name))) + (or (= v1-61 'arrived) (= v1-61 'waiting)) + ) + ) + ) + (('running?) + (and (-> self next-state) (= (-> self next-state name) 'running)) + ) + (('path-pos?) + (+ (-> self move-pos 0) (* (-> self path-pos) (- (-> self move-pos 1) (-> self move-pos 0)))) + ) + (('player-standing-on?) + (= (-> self sticky-player-last-ride-time) (current-time)) + ) + (('point-inside-shaft?) + (point-inside-shaft? self (the-as vector (-> arg3 param 1)) (-> self bottom-top 1) (-> self bottom-top 0)) + ) + (('going-down?) + (< (-> (get-point-in-path! (-> self path) (new 'stack-no-clear 'vector) (-> self move-pos 1) 'interp) y) + (-> (get-point-in-path! (-> self path) (new 'stack-no-clear 'vector) (-> self move-pos 0) 'interp) y) + ) + ) + (('going-up?) + (< (-> (get-point-in-path! (-> self path) (new 'stack-no-clear 'vector) (-> self move-pos 0) 'interp) y) + (-> (get-point-in-path! (-> self path) (new 'stack-no-clear 'vector) (-> self move-pos 1) 'interp) y) + ) + ) + (('bottom?) + (= (-> self move-pos 1) (-> self bottom-top 0)) + ) + (('top?) + (= (-> self move-pos 1) (-> self bottom-top 1)) + ) + ) + ) + (('reset) + (go-virtual die) + ) + (('go-dormant) + (go-virtual dormant) + ) + (('set-path-pos) + (set! (-> self path-pos) (the-as float (-> arg3 param 0))) + ) + (else + (plat-event arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod find-closest-point-in-path! ((this elevator) (arg0 vector) (arg1 (pointer float)) (arg2 symbol) (arg3 symbol)) + (local-vars (sv-32 vector)) + (let ((s1-0 (-> this params)) + (f28-0 0.0) + (f30-0 -1.0) + ) + (dotimes (s0-0 (-> this path curve num-cverts)) + (set! sv-32 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) (the float s0-0) 'interp)) + (when (and (or (not arg2) (< (vector-vector-xz-distance sv-32 arg0) (-> s1-0 xz-threshold))) + (or (not arg3) + (< (fabs (- (-> sv-32 y) (-> arg0 y))) (-> s1-0 y-threshold)) + (and (= s0-0 (the int (-> this bottom-top 0))) (< (-> arg0 y) (-> sv-32 y))) + (and (= s0-0 (the int (-> this bottom-top 1))) (< (-> sv-32 y) (-> arg0 y))) + ) + ) + (let* ((t9-2 vector-vector-distance) + (a1-3 arg0) + (f0-12 (t9-2 sv-32 a1-3)) + ) + (when (or (= f30-0 -1.0) (< f0-12 f28-0)) + (set! f28-0 f0-12) + (set! f30-0 (the float s0-0)) + ) + ) + ) + ) + (when (!= f30-0 -1.0) + (set! (-> arg1 0) f30-0) + #t + ) + ) + ) + +(defmethod elevator-method-46 ((this elevator)) + (let* ((s5-0 *target*) + (a0-2 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (and a0-2 (point-inside-shaft? this (get-trans a0-2 0) (-> this move-pos 0) (-> this move-pos 1))) + ) + ) + +(defmethod elevator-method-47 ((this elevator)) + #t + ) + +(defmethod elevator-method-48 ((this elevator)) + (local-vars (sv-16 float)) + (let ((a0-1 *target*)) + (when (and a0-1 + (not (logtest? (focus-status dead inactive in-air grabbed edge-grab pole pilot-riding pilot teleporting) + (-> a0-1 focus-status) + ) + ) + ) + (set! sv-16 (the-as float 0.0)) + (when (and (find-closest-point-in-path! this (get-trans a0-1 0) (& sv-16) #t #t) (!= (-> this move-pos 1) sv-16)) + (set! (-> this move-pos 0) (-> this move-pos 1)) + (set! (-> this move-pos 1) sv-16) + (logior! (-> this elevator-status) (elevator-status moving)) + (go (method-of-object this running)) + ) + ) + ) + 0 + (none) + ) + +(defbehavior move-post elevator () + (when (nonzero? (-> self sound)) + (let ((f0-3 (sqrtf (sin-rad (* 3.1415925 (-> self path-pos)))))) + (update-vol! (-> self sound) f0-3) + ) + (update-trans! (-> self sound) (-> self root trans)) + (update! (-> self sound)) + ) + (plat-post) + (none) + ) + +;; WARN: Return type mismatch vector vs none. +(defbehavior teleport-check elevator () + (local-vars (sv-16 float)) + (when (and *target* (logtest? (-> self params flags) (elevator-flags teleport)) (focus-test? *target* teleporting)) + (set! sv-16 (the-as float 0.0)) + (when (find-closest-point-in-path! self (target-pos 0) (& sv-16) #f #t) + (set! (-> self move-pos 0) sv-16) + (set! (-> self move-pos 1) sv-16) + (get-point-in-path! (-> self path) (-> self basetrans) sv-16 'interp) + ) + ) + (none) + ) + +(defstate dormant (elevator) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual waiting) + ) + (('bonk) + #f + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :trans plat-trans + :code sleep-code + :post plat-post + ) + +(defstate waiting (elevator) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (if (elevator-method-47 self) + (logior! (-> self elevator-status) (elevator-status waiting-to-descend)) + ) + (elevator-event proc argc message block) + ) + (else + (elevator-event proc argc message block) + ) + ) + ) + :enter (behavior () + (if (logtest? (-> self params flags) (elevator-flags dormant)) + (go-virtual dormant) + ) + (set-time! (-> self ride-timer)) + (logclear! (-> self elevator-status) (elevator-status waiting-to-descend moving)) + (logior! (-> self mask) (process-mask actor-pause)) + (if (nonzero? (-> self sound)) + (update-vol! (-> self sound) 0.0) + ) + (let ((gp-0 (-> self on-notice))) + (if gp-0 + (script-eval gp-0 :key (* (the int (-> self move-pos 0)) 8) :vector (-> self root trans)) + ) + ) + ) + :trans (behavior () + (teleport-check) + (plat-trans) + (when (not (logtest? (-> self elevator-status) (elevator-status waiting-to-descend))) + (set-time! (-> self ride-timer)) + (-> self params) + (if (and (logtest? (-> self params flags) (elevator-flags running)) + (not (logtest? (-> self params flags) (elevator-flags ef3))) + ) + (elevator-method-48 self) + ) + ) + (when (and (not (logtest? (-> self params flags) (elevator-flags ef3))) + (time-elapsed? (-> self ride-timer) (seconds 1)) + (or (not (-> self activate-test)) + (script-eval (-> self activate-test) :key (* (the int (-> self move-pos 0)) 8) :vector (-> self root trans)) + ) + ) + (set! (-> self move-pos 0) (-> self move-pos 1)) + (set! (-> self move-pos 1) (-> self path-seq data (the int (-> self move-pos 1)) next-pos)) + (go-virtual running) + ) + (let ((gp-0 (-> self on-wait))) + (if gp-0 + (script-eval gp-0 :key (* (the int (-> self move-pos 0)) 8) :vector (-> self root trans)) + ) + ) + ) + :code sleep-code + :post (behavior () + (logclear! (-> self elevator-status) (elevator-status waiting-to-descend)) + (debug-draw (-> self path)) + (plat-post) + ) + ) + +(defstate running (elevator) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('running?) + #t + ) + (('player-ridden?) + (logtest? (-> self elevator-status) (elevator-status waiting-to-descend)) + ) + (else + (elevator-event proc argc message block) + ) + ) + ) + :enter (behavior () + (if (not (logtest? (-> self params flags) (elevator-flags ef7))) + (process-entity-status! self (entity-perm-status no-kill) #t) + ) + (logclear! (-> self elevator-status) (elevator-status waiting-to-ascend)) + (when (logtest? (-> self params flags) (elevator-flags waiting)) + (logclear! (-> self params flags) (elevator-flags waiting)) + (logior! (-> self params flags) (elevator-flags running)) + ) + (set! (-> self move-dist) 0.0) + (let ((v1-13 (the int (-> self move-pos 0))) + (a0-3 (the int (-> self move-pos 1))) + (a1-1 0) + ) + (while (let ((a2-3 (abs (- a0-3 v1-13)))) + (< a1-1 a2-3) + ) + (+! (-> self move-dist) (-> self path-seq data (+ (min v1-13 a0-3) a1-1) dist)) + (+! a1-1 1) + ) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self path-pos) 0.0) + (if (nonzero? (-> self sound)) + (update-vol! (-> self sound) 0.0) + ) + (if (-> self sound-start) + (sound-play-by-spec (-> self sound-start) (new-sound-id) (the-as vector #t)) + ) + (when (logtest? (-> self params flags) (elevator-flags prevent-jump)) + (set-setting! 'jump #f 0.0 0) + (apply-settings *setting-control*) + ) + (when (logtest? (-> self elevator-status) (elevator-status waiting-to-descend)) + (set-setting! 'board #f 0.0 0) + (set-setting! 'lightjak #f 0.0 0) + (toggle-fence-collision self #t) + (if (logtest? (-> self params flags) (elevator-flags grab)) + (process-grab? *target* #f) + ) + ) + (let ((gp-1 (-> self on-activate))) + (if gp-1 + (script-eval gp-1 :key (* (the int (-> self move-pos 0)) 8) :vector (-> self root trans)) + ) + ) + ) + :exit (behavior () + (if (not (logtest? (-> self params flags) (elevator-flags ef7))) + (process-entity-status! self (entity-perm-status no-kill) #f) + ) + (remove-setting! 'board) + (remove-setting! 'jump) + (remove-setting! 'lightjak) + (set! (-> self speed) 0.0) + ) + :trans (behavior () + (teleport-check) + (if (and (not (logtest? (-> self elevator-status) (elevator-status waiting-to-ascend))) + (= (-> self path-pos) 1.0) + ) + (go-virtual arrived) + ) + (if (elevator-method-46 self) + (set! (-> self path-dest) 0.0) + (set! (-> self path-dest) 1.0) + ) + (if (and (logtest? (-> self params flags) (elevator-flags grab)) + (and *target* (not (logtest? (-> *target* focus-status) (focus-status grabbed)))) + ) + (process-grab? *target* #f) + ) + (if (and (logtest? (-> self elevator-status) (elevator-status waiting-to-descend)) *target*) + ;; og:preserve-this not-yet-implemented + ;; (process-drawable-cloth-command *target* '(set-flags local-space-y)) + 0 + ) + (if (>= (+ (current-time) (seconds -1)) (-> self sticky-player-last-ride-time)) + (remove-setting! 'board) + (set-setting! 'board #f 0.0 0) + ) + (if (logtest? (-> self params flags) (elevator-flags prevent-jump)) + (elevator-method-50 self) + ) + (let ((gp-0 (-> self on-running))) + (if gp-0 + (script-eval gp-0 :key (* (the int (-> self move-pos 0)) 8) :vector (-> self root trans)) + ) + ) + (plat-trans) + ) + :code (behavior () + (logior! (-> self elevator-status) (elevator-status waiting-to-ascend)) + (suspend) + (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) 'query) + (set! (-> a1-0 param 0) (the-as uint 'player-standing-on?)) + (cond + ((and (send-event-function self 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) 'query) + (set! (-> a1-1 param 0) (the-as uint 'going-up?)) + (and (send-event-function self a1-1) (logtest? (-> self params flags) (elevator-flags fence))) + ) + ) + (let ((gp-0 (-> self on-up))) + (if gp-0 + (script-eval gp-0 :key (* (the int (-> self move-pos 0)) 8) :vector (-> self root trans)) + ) + ) + ) + ((let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer self)) + (set! (-> a1-4 num-params) 1) + (set! (-> a1-4 message) 'query) + (set! (-> a1-4 param 0) (the-as uint 'player-standing-on?)) + (and (send-event-function self a1-4) + (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) 'query) + (set! (-> a1-5 param 0) (the-as uint 'going-down?)) + (and (send-event-function self a1-5) (logtest? (-> self params flags) (elevator-flags fence))) + ) + ) + ) + (let ((gp-1 (-> self on-down))) + (if gp-1 + (script-eval gp-1 :key (* (the int (-> self move-pos 0)) 8) :vector (-> self root trans)) + ) + ) + ) + ) + ) + (until #f + (suspend) + (if (= (-> self path-pos) 1.0) + (logclear! (-> self elevator-status) (elevator-status waiting-to-ascend)) + ) + ) + #f + ) + :post (behavior () + (when (logtest? (-> self elevator-status) (elevator-status waiting-to-ascend)) + (seek! + (-> self path-pos) + (-> self path-dest) + (* (/ (-> self params move-rate) (-> self move-dist)) (seconds-per-frame)) + ) + (let* ((f30-0 (-> self move-pos 0)) + (f28-0 (-> self move-pos 1)) + (f0-9 (+ f30-0 (* (ease-value-in-out (-> self path-pos) 0.08) (- f28-0 f30-0)))) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> gp-0 quad) (-> self basetrans quad)) + (get-point-in-path! (-> self path) (-> self basetrans) f0-9 'interp) + (set! (-> self speed) (* (- (-> self basetrans y) (-> gp-0 y)) (-> self clock frames-per-second))) + ) + (if (-> self sound-running-loop) + (sound-play-by-spec (-> self sound-running-loop) (-> self sound-id) (-> self root trans)) + ) + ) + (move-post) + ) + ) + +(defstate arrived (elevator) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (set-time! (-> self ride-timer)) + (elevator-event proc argc message block) + ) + (else + (elevator-event proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self ride-timer)) + (if (not (-> *setting-control* user-current jump)) + (remove-setting! 'jump) + ) + (sound-stop (-> self sound-id)) + (if (-> self sound-arrived) + (sound-play-by-spec (-> self sound-arrived) (new-sound-id) (the-as vector #t)) + ) + (when (logtest? (-> self elevator-status) (elevator-status waiting-to-descend)) + (toggle-fence-collision self #f) + (if (and (logtest? (-> self params flags) (elevator-flags grab)) *target* (focus-test? *target* grabbed)) + (process-release? *target*) + ) + ) + (let ((gp-1 (-> self on-deactivate))) + (if gp-1 + (script-eval gp-1 :key (* (the int (-> self move-pos 1)) 8) :vector (-> self root trans)) + ) + ) + ) + :trans (behavior () + (teleport-check) + (if (and (< (- (-> self ride-timer) (-> self sticky-player-last-ride-time)) (seconds 2)) + (begin *target* *target*) + (focus-test? *target* in-air) + ) + (set-time! (-> self ride-timer)) + ) + (if (and (logtest? (-> self params flags) (elevator-flags grab)) *target* (focus-test? *target* grabbed)) + (process-release? *target*) + ) + (when (or (logtest? (-> self elevator-status) (elevator-status moving)) + (time-elapsed? (-> self ride-timer) (seconds 0.5)) + ) + (cond + ((and (logtest? (-> self params flags) (elevator-flags ef1)) + (!= (-> self move-pos 1) (-> self params start-pos)) + ) + (set! (-> self move-pos 0) (-> self move-pos 1)) + (set! (-> self move-pos 1) (-> self params start-pos)) + (go-virtual running) + ) + (else + (go-virtual waiting) + ) + ) + ) + (plat-trans) + ) + :code sleep-code + :post plat-post + ) + +(defstate die (elevator) + :virtual #t + :event (the-as (function process int symbol event-message-block object) eco-door-event-handler) + :code (behavior () + '() + ) + ) + +(defmethod calc-dist-between-points! ((this elevator) (arg0 int) (arg1 int)) + (set! (-> this path-seq data arg0 next-pos) (the float arg1)) + (let ((s3-0 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) (the float arg0) 'interp)) + (a1-3 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) (the float arg1) 'interp)) + ) + (set! (-> this path-seq data arg0 dist) (vector-vector-distance s3-0 a1-3)) + ) + 0 + (none) + ) + +(defmethod init-sound! ((this elevator)) + (set! (-> this sound) (the-as ambient-sound 0)) + (if (-> this sound-running-loop) + (set! (-> this sound-id) (new-sound-id)) + ) + 0 + (none) + ) + +(defmethod base-plat-method-34 ((this elevator)) + 0 + (none) + ) + +(defmethod relocate ((this elevator) (offset int)) + (if (nonzero? (-> this path-seq)) + (&+! (-> this path-seq) offset) + ) + (call-parent-method this offset) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod go-arrived-or-waiting ((this elevator)) + (if (logtest? (-> this params flags) (elevator-flags arrived)) + (go (method-of-object this arrived)) + (go (method-of-object this waiting)) + ) + (none) + ) + +;; WARN: Return type mismatch none vs object. +(defmethod init-from-entity! ((this elevator) (arg0 entity-actor)) + (local-vars (sv-32 float) (sv-36 path-control) (sv-40 target)) + (stack-size-set! (-> this main-thread) 1024) + (set! (-> this sound-running-loop) #f) + (set! (-> this sound-arrived) #f) + (set! (-> this sound-start) #f) + (init-params! this) + (init-collision! this) + (when (type? (-> this root root-prim) collide-shape-prim-group) + (let ((v1-9 (-> this root root-prim))) + (dotimes (a0-5 (the-as int (-> v1-9 specific 0))) + (when (= (-> (the-as collide-shape-prim-group v1-9) child a0-5 prim-id) (shl #xfe00 16)) + (set! (-> this fence-prim-index) (the-as uint a0-5)) + (toggle-fence-collision this #f) + #t + (goto cfg-8) + ) + ) + ) + ) + (label cfg-8) + (process-drawable-from-entity! this arg0) + (initialize-skeleton this (the-as skeleton-group (get-art-group this)) (the-as pair 0)) + (init-bounce-params! this) + (set! (-> this elevator-status) (elevator-status)) + (update-transforms (-> this root)) + (base-plat-method-33 this) + (set! (-> this on-activate) (res-lump-struct (-> this entity) 'on-activate pair)) + (set! (-> this on-deactivate) (res-lump-struct (-> this entity) 'on-deactivate pair)) + (set! (-> this on-up) (res-lump-struct (-> this entity) 'on-up pair)) + (set! (-> this on-down) (res-lump-struct (-> this entity) 'on-down pair)) + (set! (-> this on-running) (res-lump-struct (-> this entity) 'on-running pair)) + (set! (-> this on-notice) (res-lump-struct (-> this entity) 'on-notice pair)) + (set! (-> this on-wait) (res-lump-struct (-> this entity) 'on-wait pair)) + (set! (-> this activate-test) (res-lump-struct (-> this entity) 'activate-test pair)) + (set! (-> this path) (new 'process 'path-control this 'path 0.0 arg0 #f)) + (when (logtest? (-> this path flags) (path-control-flag not-found)) + (if (logtest? (-> this params flags) (elevator-flags dormant)) + (go (method-of-object this dormant)) + ) + (go process-drawable-art-error "error in path") + ) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (let ((s5-1 (-> this path curve num-cverts)) + (s4-1 0) + (f30-0 0.0) + (f28-0 0.0) + ) + (set! (-> this path-seq) (new 'process 'path-step-inline-array s5-1)) + (dotimes (s3-1 s5-1) + (calc-dist-between-points! this s3-1 (mod (+ s3-1 1) s5-1)) + (let ((v1-55 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) (the float s3-1) 'interp))) + (when (or (not (logtest? s4-1 1)) (< (-> v1-55 y) f28-0)) + (set! (-> this bottom-top 0) (the float s3-1)) + (set! f28-0 (-> v1-55 y)) + (set! s4-1 (logior s4-1 1)) + ) + (when (or (not (logtest? s4-1 2)) (< f30-0 (-> v1-55 y))) + (set! (-> this bottom-top 1) (the float s3-1)) + (set! f30-0 (-> v1-55 y)) + (set! s4-1 (logior s4-1 2)) + ) + ) + ) + ) + (set! sv-32 (the-as float 0.0)) + (set! sv-36 (-> this path)) + (let ((s5-2 *target*)) + (set! sv-40 (if (type? s5-2 process-focusable) + s5-2 + ) + ) + ) + (if (not (and sv-40 + (logtest? (-> this params flags) (elevator-flags teleport)) + (find-closest-point-in-path! this (get-trans sv-40 0) (& sv-32) #f #t) + ) + ) + (set! sv-32 (-> this params start-pos)) + ) + (set! (-> this move-pos 0) sv-32) + (set! (-> this move-pos 1) sv-32) + (get-point-in-path! sv-36 (-> this basetrans) sv-32 'interp) + (set! (-> this root pause-adjust-distance) + (+ 122880.0 (-> this params xz-threshold) (total-distance (-> this path))) + ) + (base-plat-method-34 this) + (init-sound! this) + (go-arrived-or-waiting this) + ) diff --git a/goal_src/jak3/engine/common-obs/enemy-part.gc b/goal_src/jak3/engine/common-obs/enemy-part.gc index 03584f162f..0640d49ea9 100644 --- a/goal_src/jak3/engine/common-obs/enemy-part.gc +++ b/goal_src/jak3/engine/common-obs/enemy-part.gc @@ -7,3 +7,381 @@ ;; DECOMP BEGINS +(defpartgroup group-kg-huge-explosion + :id 217 + :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 (4.0 4.0 4.0) + :parts ((sp-item 883 :flags (sp6 sp7) :period (seconds 3) :length (seconds 0.017)) + (sp-item 884 :flags (sp6 sp7) :period (seconds 3) :length (seconds 0.017)) + (sp-item 885 :flags (sp7) :period (seconds 3) :length (seconds 0.05)) + (sp-item 886 :fade-after (meters 60) :flags (sp7) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 887 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 888 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 889 :fade-after (meters 150) :falloff-to (meters 150) :flags (sp7) :period (seconds 3) :length (seconds 0.067) :offset 30) + ) + ) + +(defpartgroup group-kg-big-explosion + :id 218 + :duration (seconds 2) + :linger-duration (seconds 1) + :flags (sp0 sp5 sp6) + :bounds (static-bspherem 0 0 0 15) + :rotate ((degrees 0) (degrees 90) (degrees 0)) + :parts ((sp-item 883 :flags (sp6 sp7) :period (seconds 3) :length (seconds 0.017)) + (sp-item 884 :flags (sp6 sp7) :period (seconds 3) :length (seconds 0.017)) + (sp-item 885 :flags (sp7) :period (seconds 3) :length (seconds 0.05)) + (sp-item 886 :fade-after (meters 60) :flags (sp7) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 887 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 888 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 889 :fade-after (meters 150) :falloff-to (meters 150) :flags (sp7) :period (seconds 3) :length (seconds 0.067) :offset 30) + ) + ) + +(defpartgroup group-kg-explosion + :id 219 + :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 883 :flags (sp6 sp7) :period (seconds 3) :length (seconds 0.017)) + (sp-item 884 :flags (sp6 sp7) :period (seconds 3) :length (seconds 0.017)) + (sp-item 885 :flags (sp7) :period (seconds 3) :length (seconds 0.05)) + (sp-item 886 :fade-after (meters 60) :flags (sp7) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 887 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 888 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 889 :fade-after (meters 150) :falloff-to (meters 150) :flags (sp7) :period (seconds 3) :length (seconds 0.067) :offset 30) + ) + ) + +(defpartgroup group-kg-mid-explosion + :id 220 + :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.5 0.5 0.5) + :parts ((sp-item 883 :flags (sp6 sp7) :period (seconds 3) :length (seconds 0.017)) + (sp-item 884 :flags (sp6 sp7) :period (seconds 3) :length (seconds 0.017)) + (sp-item 885 :flags (sp7) :period (seconds 3) :length (seconds 0.05)) + (sp-item 886 :fade-after (meters 60) :flags (sp7) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 887 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 888 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 889 :fade-after (meters 150) :falloff-to (meters 150) :flags (sp7) :period (seconds 3) :length (seconds 0.067) :offset 30) + ) + ) + +(defpartgroup group-kg-small-explosion + :id 221 + :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 883 :flags (sp6 sp7) :period (seconds 3) :length (seconds 0.017)) + (sp-item 884 :flags (sp6 sp7) :period (seconds 3) :length (seconds 0.017)) + (sp-item 885 :flags (sp7) :period (seconds 3) :length (seconds 0.05)) + (sp-item 886 :fade-after (meters 60) :flags (sp7) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 887 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 888 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 889 :fade-after (meters 150) :falloff-to (meters 150) :flags (sp7) :period (seconds 3) :length (seconds 0.067) :offset 30) + ) + ) + +(defpart 884 + :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 set-conerot)) + (:next-time (seconds 0.25)) + (:next-launcher 890) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 890 + :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) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 889 + :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 set-conerot)) + (:next-time (seconds 0.085)) + (:next-launcher 891) + (:conerot-x '*sp-temp*) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 888 + :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 set-conerot)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400700)) + (:next-time (seconds 0.085)) + (:next-launcher 891) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 891 + :init-specs ((:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:next-time (seconds 0.017) (seconds 0.065)) + (:next-launcher 892) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 892 + :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 893) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 893 + :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 894) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 894 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.1125) (:rotate-y (degrees 0))) + ) + +(defpart 883 + :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 set-conerot)) + (:next-time (seconds 0.1)) + (:next-launcher 895) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 895 + :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) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 887 + :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 set-conerot)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 896) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 896 + :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 897) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 897 + :init-specs ((:fade-r -0.5543478) (:fade-g -0.5543478) (:fade-a -0.13913043) (:rotate-y (degrees 0))) + ) + +(defpart 885 + :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 set-conerot)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 898) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 898 + :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 899) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 899 + :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) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 886 + :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 set-conerot)) + (:rotate-y (degrees 0)) + ) + ) diff --git a/goal_src/jak3/engine/common-obs/enemy-states.gc b/goal_src/jak3/engine/common-obs/enemy-states.gc index 2dd03df9b4..f7045f66c2 100644 --- a/goal_src/jak3/engine/common-obs/enemy-states.gc +++ b/goal_src/jak3/engine/common-obs/enemy-states.gc @@ -7,3 +7,1639 @@ ;; DECOMP BEGINS +(defstate idle (enemy) + :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 0.5)) + (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)) + (sleep-code) + ) + :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) + (ja-post) + ) + ) + +(defstate dormant (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + ((-> (method-of-type enemy idle) enter)) + (set! (-> self root nav-flags) (nav-flags)) + (let ((v1-4 (-> self root root-prim))) + (set! (-> v1-4 prim-core collide-as) (collide-spec)) + (set! (-> v1-4 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + (set! (-> self draw origin quad) (-> self root trans quad)) + (if (logtest? (enemy-flag directed) (-> self enemy-flags)) + (logior! (-> self enemy-flags) (enemy-flag directed-ready)) + ) + (logior! (-> self focus-status) (focus-status disable)) + ) + :exit (behavior () + (logclear! (-> self focus-status) (focus-status disable)) + (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)) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (logclear! (-> self enemy-flags) (enemy-flag directed-ready)) + (logior! (-> self root nav-flags) (nav-flags has-root-sphere)) + ) + :code sleep-code + ) + +(defstate dormant-aware (enemy) + :virtual #t + :event enemy-event-handler + :enter (-> (method-of-type enemy dormant) enter) + :exit (-> (method-of-type enemy dormant) exit) + :trans (behavior () + (when (and (time-elapsed? (-> self state-time) (-> self state-timeout)) (> (the-as int (-> self focus aware)) 0)) + (if (logtest? (enemy-option ambush) (-> self fact enemy-options)) + (go-ambush-delay self) + (go-virtual active) + ) + ) + ) + :code 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) + ) + ) + +(defstate ambush-delay (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self desired-angle) (fmax 0.0 (res-lump-float (-> self entity) 'ambush-delay))) + (logior! (-> self focus-status) (focus-status disable)) + (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)) + (logior! (-> self enemy-flags) (enemy-flag directed-ready)) + (logclear! (-> self root nav-flags) (nav-flags has-root-sphere)) + ) + :exit (behavior () + ((-> (method-of-type enemy dormant) exit)) + (logior! (-> self enemy-flags) (enemy-flag alert)) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (the int (* 300.0 (-> self desired-angle)))) + (go-virtual ambush) + ) + ) + :code sleep-code + ) + +(defstate ambush (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logior! (-> self enemy-flags) (enemy-flag alert)) + ) + :code (behavior () + (go-virtual notice) + ) + ) + +(defstate active (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (logclear! (-> self enemy-flags) (enemy-flag cam-attack-mode)) + (when (logtest? (-> self enemy-flags) (enemy-flag enable-on-active)) + (logclear! (-> self enemy-flags) (enemy-flag enable-on-active)) + (let ((gp-0 (-> self on-active))) + (if gp-0 + (script-eval gp-0 :vector (-> self root trans)) + ) + ) + ) + (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) (seconds 0.1)) + (let ((v1-3 (-> self focus aware))) + (cond + ((< (the-as int v1-3) 1) + (go-idle self) + ) + ((< 1 (the-as int v1-3)) + (go-virtual notice) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (sleep-code) + ) + :post (behavior () + (play-idle-frames! (-> self idle-anim-player) self) + (enemy-simple-post) + ) + ) + +(defstate notice (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-3 (logior (-> self enemy-flags) (enemy-flag cam-attack-mode)))) + (set! (-> self enemy-flags) (logclear v1-3 (enemy-flag use-trigger))) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (set-look-at-mode! self 1) + (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 ((gp-1 (-> self focus aware))) + (when (logtest? (-> self enemy-flags) (enemy-flag alert)) + (cond + ((and (= gp-1 (enemy-aware ea3)) (get-focus! self)) + (go-hostile self) + ) + ((= gp-1 (enemy-aware ea4)) + (go-flee self) + ) + (else + (go-stare self) + ) + ) + ) + ) + (logior! (-> self enemy-flags) (enemy-flag alert)) + ) + :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)) + ) + (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 131072.0 (seconds 0.05)) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (go-best-state self) + ) + :post enemy-simple-post + ) + +(defstate hostile (enemy) + :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)) + ) + ) + ) + ) + :trans (behavior () + (if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory)) + (go-virtual victory) + ) + (let ((gp-0 (-> self focus aware))) + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (cond + ((or (>= 2 (the-as int gp-0)) (not (get-focus! self))) + (go-stare self) + ) + ((= gp-0 (enemy-aware ea4)) + (go-flee self) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! (-> self draw art-group data (-> self enemy-info hostile-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)) + ) + ) + #f + ) + :post enemy-simple-post + ) + +(defstate stare (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (logclear! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self enemy-flags) (enemy-flag chase-startup)) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (let ((gp-0 (-> self focus aware))) + (cond + ((>= 1 (the-as int gp-0)) + (go-virtual active) + ) + ((and (= gp-0 (enemy-aware ea3)) (get-focus! self)) + (go-hostile self) + ) + ((= gp-0 (enemy-aware ea4)) + (go-flee self) + ) + ) + ) + ) + ) + :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) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + #f + ) + :post enemy-simple-post + ) + +(defstate victory (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logclear! (-> self enemy-flags) (enemy-flag victory)) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info victory-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) + ) + :post enemy-simple-post + ) + +(defstate flee (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set-look-at-mode! self 1) + (logclear! (-> self enemy-flags) (enemy-flag chase-startup)) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (if (!= (-> self focus aware) (enemy-aware ea4)) + (go-stare self) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post enemy-simple-post + ) + +(defstate jump (enemy) + :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)) + ) + :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 ((gp-0 (new 'stack-no-clear 'enemy-jump-info))) + (let ((s5-0 0)) + (init-jump-info! self gp-0) + (if (and (-> self enemy-info use-jump-blocked) + (logtest? (enemy-flag jump-check-blocked) (-> self enemy-flags)) + (enemy-method-91 self gp-0) + ) + (go-virtual jump-blocked) + ) + (when (logtest? (-> gp-0 flags) (enemy-jump-flags ejf0)) + (until #f + (if (jump-anim-handler self s5-0 gp-0) + (goto cfg-12) + ) + (in-jump-handler self s5-0 gp-0) + (enemy-method-101 self s5-0 gp-0) + (suspend) + (set! s5-0 1) + ) + #f + ) + ) + (label cfg-12) + (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 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) + (enemy-method-101 self s5-1 gp-0) + (suspend) + (set! s5-1 3) + ) + ) + (logclear! (-> self focus-status) (focus-status in-air)) + (move-to-gspot! self) + (let ((s5-2 4)) + (until #f + (if (jump-anim-handler self s5-2 gp-0) + (goto cfg-19) + ) + (in-jump-handler self s5-2 gp-0) + (enemy-method-101 self s5-2 gp-0) + (suspend) + (set! s5-2 5) + ) + ) + ) + #f + (label cfg-19) + (if (logtest? (enemy-flag directed) (-> self enemy-flags)) + ((lambda :behavior enemy () (send-event (ppointer->process (-> self parent)) 'child-jumped))) + ) + (go-directed2 self) + ) + :post (behavior () + (let ((a1-0 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-0 options) (overlaps-others-options)) + (set! (-> a1-0 collide-with-filter) (-> self enemy-info overlaps-others-collide-with-filter)) + (set! (-> a1-0 tlist) *touching-list*) + (find-overlapping-shapes (-> self root) a1-0) + ) + (enemy-simple-post) + ) + ) + +(defstate jump-blocked (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.5)) + (if (logtest? (enemy-flag directed) (-> self enemy-flags)) + (go-virtual jump) + (go-directed2 self) + ) + ) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (when (not (and v1-2 (= v1-2 (-> self draw art-group data (-> self enemy-info idle-anim))))) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! (-> self draw art-group data (-> self enemy-info idle-anim)) + :num! (identity (rand-vu-float-range 0.0 (the float (+ (-> (ja-group) frames num-frames) -1)))) + ) + ) + ) + (let ((f30-0 (rnd-float-range self 0.75 1.25))) + (until #f + (suspend) + (ja :num! (loop! f30-0)) + ) + ) + #f + ) + :post enemy-simple-post + ) + +(defstate hit (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (stop-look-at! self) + (logclear! (-> self mask) (process-mask actor-pause)) + (play-damage-sound self 0) + ) + :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-hostile self) + ) + :post enemy-simple-post + ) + +(defstate knocked (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (when (>= 0.0 (-> self hit-points)) + (let ((v1-2 (handle->process (-> self incoming attacker-handle)))) + (when (or (not (-> self draw)) + (and (or (not v1-2) (!= (-> v1-2 type) target)) + (or (not (logtest? (-> self draw status) (draw-control-status on-screen))) + (let ((f0-1 450560.0)) + (< (* f0-1 f0-1) (vector-vector-xz-distance-squared (-> self root trans) (math-camera-pos))) + ) + ) + ) + ) + (send-event (ppointer->process (-> self parent)) 'child-die) + (go-virtual die-fast) + ) + ) + ) + (set-time! (-> self state-time)) + (stop-look-at! self) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self mask) (process-mask actor-pause)) + (let* ((v1-30 *game-info*) + (a0-13 (+ (-> v1-30 attack-id) 1)) + ) + (set! (-> v1-30 attack-id) a0-13) + (set! (-> self attack-id) a0-13) + ) + (if (logtest? (enemy-option knocked-into-water) (-> self fact enemy-options)) + (logior! (-> self enemy-flags) (enemy-flag check-water)) + ) + (if (and (enemy-method-123 self) (-> self enemy-info ragdoll-info)) + (set! (-> self root transv y) 0.0) + ) + (let ((v1-43 (-> self root))) + (logclear! (-> v1-43 status) (collide-status + on-surface + on-ground + touch-surface + touch-wall + touch-ceiling + touch-actor + on-special-surface + touch-edge + blocked + on-water + impact-surface + touch-background + stuck + glance + ) + ) + (when (not (logtest? (-> v1-43 root-prim prim-core action) (collide-action no-normal-reset))) + (let ((a0-25 (-> v1-43 dynam gravity-normal))) + (set! (-> v1-43 local-normal quad) (-> a0-25 quad)) + (set! (-> v1-43 surface-normal quad) (-> a0-25 quad)) + (set! (-> v1-43 poly-normal quad) (-> a0-25 quad)) + ) + (set! (-> v1-43 coverage) 0.0) + (set! (-> v1-43 touch-angle) 0.0) + ) + (knocked-handler self (-> v1-43 transv)) + ) + (if (>= (-> self enemy-info knocked-seek-ry-clamp) 0.0) + (set! (-> self desired-angle) (get-knockback-angle self)) + ) + (if (or (= (-> self hit-points) 0.0) (nonzero? (-> self fated-time))) + (on-dying self) + (play-damage-sound self 0) + ) + (logclear! (-> self focus-status) (focus-status dangerous)) + (if (= (-> self incoming knocked-type) (knocked-type yellow-shot)) + (logclear! (-> self enemy-flags) (enemy-flag trackable)) + ) + (set! (-> self root penetrate-using) (penetrate lunge vehicle knocked)) + (reset-penetrate! self) + (enemy-method-50 self 1) + (ragdoll-spawn! self #t #f) + ) + :exit (behavior () + (disable-ragdoll self) + ) + :trans (behavior () + (if (>= (-> self enemy-info knocked-seek-ry-clamp) 0.0) + (seek-toward-yaw-angle! (-> self root) (-> self desired-angle) 138353.78 (seconds 0.1)) + ) + ) + :code (behavior () + (cond + ((handle->process (-> self ragdoll-proc)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.2)) + (suspend) + ) + ) + (until (ragdoll-settled? self) + (if (or (time-elapsed? (-> self state-time) (seconds 4)) (enemy-method-109 self)) + (go-die self) + ) + (suspend) + ) + (if (within-gspot-range? self) + (go-die self) + ) + ) + (else + (let ((gp-1 (new 'stack-no-clear 'enemy-knocked-info))) + (let ((s5-0 0)) + (set! (-> gp-1 anim-speed) (rnd-float-range self 0.9 1.1)) + (set! (-> gp-1 on-surface-count) 0) + (set! (-> gp-1 move-count) 0) + (until (enemy-method-88 self gp-1) + (if (time-elapsed? (-> self state-time) (seconds 2)) + (go-die self) + ) + (if (logtest? (-> self root status) (collide-status on-surface)) + (+! (-> gp-1 on-surface-count) 1) + ) + (knocked-anim-handler self s5-0 gp-1) + (suspend) + (+! (-> gp-1 move-count) 1) + (set! s5-0 1) + ) + ) + (let ((s5-1 2)) + (set-time! (-> gp-1 land-can-land-time)) + (until #f + (if (logtest? (-> self root status) (collide-status on-surface)) + (+! (-> gp-1 on-surface-count) 1) + ) + (if (knocked-anim-handler self s5-1 gp-1) + (goto cfg-33) + ) + (suspend) + (+! (-> gp-1 move-count) 1) + (set! s5-1 3) + (if (enemy-method-88 self gp-1) + (set-time! (-> gp-1 land-can-land-time)) + ) + ) + ) + #f + (label cfg-33) + (if (and (not (logtest? (enemy-flag death-start) (-> self enemy-flags))) + (or (within-gspot-range? self) + (enemy-method-109 self) + (time-elapsed? (-> gp-1 land-can-land-time) (-> self enemy-info knocked-can-land-timeout)) + ) + ) + (go-die self) + ) + (while (not (knocked-anim-handler self 4 gp-1)) + (suspend) + ) + ) + ) + ) + (cond + ((or (= (-> self hit-points) 0.0) (nonzero? (-> self fated-time))) + (cond + ((logtest? (enemy-flag death-start) (-> self enemy-flags)) + (set! (-> self hit-points) 0.0) + (let ((v1-90 (-> self root root-prim))) + (set! (-> v1-90 prim-core collide-as) (collide-spec)) + (set! (-> v1-90 prim-core collide-with) (collide-spec)) + ) + 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) + ) + (cleanup-for-death self) + ) + (else + (when (and (-> self skel effect) (logtest? (enemy-flag auto-death-phase-out) (-> self enemy-flags))) + (do-effect (-> self skel effect) "death-default" 0.0 -1) + (suspend) + 0 + ) + (go-die self) + ) + ) + ) + (else + (go-virtual knocked-recover) + ) + ) + ) + :post enemy-falling-post + ) + +(defstate knocked-recover (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :exit (behavior () + (local-vars (v1-1 enemy-flag) (v1-13 enemy-flag) (v1-15 enemy-flag) (v1-17 enemy-flag)) + (let ((v1-0 (-> self enemy-flags))) + (if (logtest? (enemy-flag check-water-backup) v1-0) + (set! v1-1 (logior (enemy-flag check-water) v1-0)) + (set! v1-1 (logclear v1-0 (enemy-flag check-water))) + ) + ) + (set! (-> self enemy-flags) v1-1) + (when (!= (-> self hit-points) 0.0) + (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-12 (-> self enemy-flags))) + (if (logtest? v1-12 (enemy-flag vulnerable-backup)) + (set! v1-13 (logior v1-12 (enemy-flag vulnerable))) + (set! v1-13 (logclear v1-12 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-13) + (let ((v1-14 (-> self enemy-flags))) + (if (logtest? v1-14 (enemy-flag attackable-backup)) + (set! v1-15 (logior v1-14 (enemy-flag attackable))) + (set! v1-15 (logclear v1-14 (enemy-flag attackable))) + ) + ) + (set! (-> self enemy-flags) v1-15) + (let ((v1-16 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-16) + (set! v1-17 (logior (enemy-flag trackable) v1-16)) + (set! v1-17 (logclear v1-16 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-17) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self focus-status) (focus-status hit)) + ) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (seconds 0.01)) + (and (not (handle->process (-> self ragdoll-proc))) + (or (within-gspot-range? self) + (time-elapsed? (-> self state-time) (-> self enemy-info knocked-recover-timeout)) + ) + ) + ) + (go-die self) + ) + ) + :code (behavior () + (local-vars (v1-58 symbol)) + (cond + ((handle->process (-> self ragdoll-proc)) + (ja-channel-push! 1 0) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) :num! (seek!) :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!)) + ) + ) + (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-58 + (suspend) + (ja :num! (loop!)) + (set! v1-58 (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 () + (when (not (handle->process (-> self ragdoll-proc))) + (let ((gp-0 (-> self root))) + (if (focus-test? self under-water) + (accelerate-fall! self (-> gp-0 transv)) + (vector-v++! + (-> gp-0 transv) + (compute-acc-due-to-gravity gp-0 (new 'stack-no-clear 'vector) (-> self enemy-info slip-factor)) + ) + ) + (let ((a2-1 (new 'stack-no-clear 'collide-query))) + (set! (-> a2-1 collide-with) (-> self enemy-info recover-gnd-collide-with)) + (set! (-> a2-1 ignore-process0) self) + (set! (-> a2-1 ignore-process1) #f) + (set! (-> a2-1 ignore-pat) (logior (new 'static 'pat-surface :noendlessfall #x1) (-> gp-0 pat-ignore-mask))) + (set! (-> a2-1 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide gp-0 (-> gp-0 transv) a2-1 (meters 0)) + ) + ) + (apply-friction self) + ) + (let ((gp-1 (-> self root)) + (a1-5 (new 'stack-no-clear 'collide-query)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> gp-1 gspot-pos quad)) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (set! (-> s4-1 quad) (-> gp-1 gspot-normal quad)) + (when (not (find-ground gp-1 a1-5 (-> self enemy-info gnd-collide-with) 8192.0 81920.0 1024.0 (the-as process #f))) + (set! (-> gp-1 gspot-pos quad) (-> s5-1 quad)) + (set! (-> gp-1 gspot-normal quad) (-> s4-1 quad)) + ) + ) + ) + (enemy-simple-post) + ) + ) + +;; WARN: Return type mismatch entity-perm-status vs none. +(defmethod mark-as-dead ((this enemy)) + (cond + ((logtest? (process-mask enemy) (-> this mask)) + (+! (-> *game-info* enemies-killed) 1.0) + ) + ((logtest? (process-mask guard civilian) (-> this mask)) + (+! (-> *game-info* civilians-killed) 1.0) + ) + ) + (logior! (-> this focus-status) (focus-status dead)) + (process-entity-status! this (entity-perm-status subtask-complete) #t) + (none) + ) + +(defmethod on-dying ((this enemy)) + (when (not (logtest? (enemy-flag called-dying) (-> this enemy-flags))) + (set! (-> this enemy-flags) (the-as enemy-flag (logior (enemy-flag called-dying) (-> this enemy-flags)))) + (play-damage-sound this 1) + (when (and (logtest? (enemy-flag has-gem) (-> this enemy-flags)) + (not (logtest? (enemy-flag spawn-gem) (-> this enemy-flags))) + ) + (logior! (-> this enemy-flags) (enemy-flag spawn-gem)) + (remove-from-process *part-engine* this) + (setup-masks + (-> this draw) + (the-as int (-> this enemy-info gem-no-seg)) + (the-as int (-> this enemy-info gem-seg)) + ) + (let* ((a0-11 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data (-> this enemy-info gem-joint))) + ) + (s4-0 (ppointer->process (birth-pickup-at-point a0-11 (pickup-type gem) 1.0 #t *entity-pool* (-> this fact)))) + (s5-0 (if (type? s4-0 gem) + s4-0 + ) + ) + ) + (if s5-0 + (set! (-> (the-as gem s5-0) gem-pool) (the-as uint (get-gem-pool-idx this))) + ) + ) + ) + (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)) + (mark-as-dead this) + (if (-> this skel effect) + (logior! (-> this skel effect flags) (effect-control-flag ecf1)) + ) + (stop-look-at! this) + ) + (none) + ) + +(defstate die (enemy) + :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-time! (-> self state-time)) + (set! (-> self hit-points) 0.0) + (ragdoll-spawn! self #f #t) + ) + :code (behavior () + (cond + ((handle->process (-> self ragdoll-proc)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.2)) + (suspend) + ) + ) + (if (-> self skel effect) + (do-effect (-> self skel effect) "death-default" 0.0 -1) + ) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 0.8)) + (suspend) + ) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.075)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info die-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-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) + ) + (cleanup-for-death self) + ) + :post enemy-simple-post + ) + +(defmethod falling? ((this enemy)) + (let ((s5-0 (-> this root)) + (a1-0 (new 'stack-no-clear 'collide-query)) + (gp-0 #t) + ) + (when (find-ground + s5-0 + a1-0 + (-> this enemy-info recover-gnd-collide-with) + 8192.0 + 81920.0 + 1024.0 + (the-as process #f) + ) + (if (< (- (-> s5-0 trans y) (-> s5-0 gspot-pos y)) 8192.0) + (set! gp-0 #f) + ) + ) + gp-0 + ) + ) + +(defstate die-falling (enemy) + :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) + (if (logtest? (enemy-option knocked-into-water) (-> self fact enemy-options)) + (logior! (-> self enemy-flags) (enemy-flag check-water)) + ) + (ragdoll-spawn! self #f #t) + ) + :exit (behavior () + (local-vars (v0-0 enemy-flag)) + (let ((v1-0 (-> self enemy-flags))) + (if (logtest? (enemy-flag check-water-backup) v1-0) + (set! v0-0 (logior (enemy-flag check-water) v1-0)) + (set! v0-0 (logclear v1-0 (enemy-flag check-water))) + ) + ) + (set! (-> self enemy-flags) v0-0) + ) + :code (behavior () + (cond + ((handle->process (-> self ragdoll-proc)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (if (-> self skel effect) + (do-effect (-> self skel effect) "death-default" 0.0 -1) + ) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (suspend) + ) + ) + (deactivate-ragdoll! self) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (let ((gp-2 (-> 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-2 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + ) + (send-event self 'death-end) + (let ((gp-3 (-> self child))) + (while gp-3 + (send-event (ppointer->process gp-3) 'notice 'die) + (set! gp-3 (-> gp-3 0 brother)) + ) + ) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + :post enemy-die-falling-post + ) + +(defstate directed (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logior! (-> self enemy-flags) (enemy-flag directed-ready)) + ((-> (method-of-type enemy idle) enter)) + ) + :exit (behavior () + (logclear! (-> self enemy-flags) (enemy-flag directed-ready)) + ) + :code (-> (method-of-type enemy idle) code) + :post (-> (method-of-type enemy idle) post) + ) + +(defstate die-fast (enemy) + :virtual #t + :code nothing + ) + +(defstate view-anims (enemy) + :virtual #t + :enter (behavior () + '() + ) + :trans (behavior () + '() + ) + :code (behavior () + (let ((gp-0 (-> self draw art-group))) + (until #f + (dotimes (s5-0 (-> gp-0 length)) + (let ((s4-0 (-> gp-0 data s5-0))) + (when (and s4-0 (= (-> s4-0 type) art-joint-anim)) + (ja-channel-set! 1) + (ja-no-eval :group! s4-0 :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + ) + ) + #f + ) + :post transform-post + ) + +;; WARN: Return type mismatch symbol vs object. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior gun-dark-2-anim-code enemy () + 0.0 + (let ((f28-0 (the float (ja-num-frames 0)))) + 0.0 + 0.0 + (let ((f30-0 1.0)) + 0.0 + (let* ((f26-0 (/ (ja-frame-num 0) f28-0)) + (f0-12 (cond + ((< 0.5 f26-0) + (let* ((f24-0 0.3) + (v1-4 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-5 (the-as number (logior #x3f800000 v1-4))) + ) + (- f26-0 (+ f24-0 (* (+ -1.0 (the-as float v1-5)) (+ -0.3 f26-0)))) + ) + ) + (else + (let* ((f24-1 0.3) + (v1-11 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-12 (the-as number (logior #x3f800000 v1-11))) + ) + (+ f24-1 (* (+ -1.0 (the-as float v1-12)) (- 0.7 f26-0)) f26-0) + ) + ) + ) + ) + (f26-1 (fmax 0.0 (fmin 1.0 f0-12))) + (f28-1 (* f28-0 f26-1)) + ) + (let* ((f1-8 (* 0.000061035156 (-> self root root-prim local-sphere w))) + (f0-21 (fmax 0.0 (fmin 1.0 f1-8))) + ) + (* f30-0 (lerp 2.0 1.0 f0-21)) + ) + (cond + ((>= (-> self enemy-info idle-anim) 0) + (let ((s5-0 (ja-group)) + (f30-1 (ja-frame-num 0)) + (gp-0 (-> self draw art-group data (-> self enemy-info idle-anim))) + ) + (ja-channel-push! 2 (seconds 1)) + (ja :group! s5-0 :num! (identity f30-1)) + (ja :chan 1 + :group! gp-0 + :num! (identity (* f26-1 (the float (+ (-> (the-as art-joint-anim gp-0) frames num-frames) -1)))) + ) + ) + (let* ((gp-1 (current-time)) + (f30-2 18.0) + (f28-2 6.0) + (v1-45 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-46 (the-as number (logior #x3f800000 v1-45))) + (f30-3 (+ f30-2 (* f28-2 (+ -1.0 (the-as float v1-46))))) + ) + (until #f + (let* ((f0-32 (* 0.0033333334 (the float (- (current-time) gp-1)))) + (f0-34 (/ (- f0-32 (* (the float (the int (/ f0-32 f30-3))) f30-3)) f30-3)) + (f0-36 (cos (* 65536.0 f0-34))) + (f0-37 (+ 1.0 f0-36)) + (f28-3 (* 0.5 f0-37)) + ) + (ja :num! identity :frame-interp0 f28-3 :frame-interp1 f28-3) + (let ((a0-20 (-> self skel root-channel 1))) + (let ((f0-39 (- 1.0 f28-3))) + (set! (-> a0-20 frame-interp 1) f0-39) + (set! (-> a0-20 frame-interp 0) f0-39) + ) + (joint-control-channel-group-eval! a0-20 (the-as art-joint-anim #f) num-func-identity) + ) + ) + (suspend) + 0 + ) + ) + #f + ) + (else + (until (time-elapsed? (-> self state-time) (seconds 2)) + (let* ((f1-22 (* 0.0016666667 (the float (- (current-time) (-> self state-time))))) + (f0-42 (fmax 0.0 (fmin 1.0 f1-22))) + ) + (ja :num! (seek! f28-1 (lerp 0.2 0.01 f0-42))) + ) + (suspend) + 0 + ) + ) + ) + ) + ) + ) + (sleep-code) + ) + +(defun gun-dark-2-ragdoll-start ((arg0 enemy)) + (local-vars (s4-0 process)) + (when (-> arg0 enemy-info ragdoll-info) + (let ((s5-0 (handle->process (-> arg0 ragdoll-proc)))) + (cond + (s5-0 + (set! s4-0 s5-0) + ) + (else + (set! (-> arg0 ragdoll-proc) + (ppointer->handle + (process-spawn + ragdoll-proc + (-> arg0 enemy-info ragdoll-info) + :name "ragdoll-proc" + :to arg0 + :stack-size #x5000 + ) + ) + ) + (set! s4-0 (handle->process (-> arg0 ragdoll-proc))) + (if (not s4-0) + (return 0) + ) + (set! (-> arg0 enemy-flags) + (the-as enemy-flag (logior (enemy-flag auto-death-phase-out) (-> arg0 enemy-flags))) + ) + ) + ) + (if (-> (the-as ragdoll-proc s4-0) ragdoll) + (logior! (-> (the-as ragdoll-proc s4-0) ragdoll ragdoll-flags) (ragdoll-flag rf3 rf4)) + ) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (vector-float*! s3-0 (-> arg0 root transv) (seconds-per-frame)) + (if s5-0 + (ragdoll-proc-method-15 (the-as ragdoll-proc s4-0) #f (the-as vector #f) #f) + (ragdoll-proc-method-15 (the-as ragdoll-proc s4-0) #f (the-as vector #f) #t) + ) + (let ((v0-0 (the-as object (-> (the-as ragdoll-proc s4-0) ragdoll ragdoll-joints 0 velocity)))) + (set! (-> (the-as vector v0-0) quad) (-> s3-0 quad)) + v0-0 + ) + ) + ) + ) + ) + +(defstate gun-dark-2-stretch (enemy) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-4 object) (sv-112 event-message-block) (sv-128 event-message-block)) + (case message + (('attack) + (let* ((s5-0 (the-as object (-> block param 1))) + (s4-0 (new 'stack-no-clear 'vector)) + (v1-1 (-> (the-as attack-info s5-0) mode)) + ) + (set! v0-4 (cond + ((= v1-1 'gravity-end) + (set! (-> self root transv quad) (the-as uint128 0)) + (gun-dark-2-ragdoll-start self) + (let* ((s4-1 self) + (s1-0 (method-of-object s4-1 get-incoming-attack!)) + (s0-0 proc) + ) + (set! sv-112 block) + (let ((a3-1 (get-penetrate-using-from-attack-event (the-as process-drawable proc) block)) + (t1-0 #f) + ) + (s1-0 + s4-1 + (the-as process-drawable s0-0) + sv-112 + a3-1 + (the-as attack-info s5-0) + (the-as touching-shapes-entry t1-0) + ) + ) + ) + (damage-enemy! self proc block) + (set! (-> self incoming penetrate-using) (penetrate vehicle)) + (set! (-> self incoming knocked-type) (knocked-type vehicle)) + (set! (-> self incoming attack-direction quad) (the-as uint128 0)) + (set! (-> self starting-time) 0) + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer proc)) + (set! (-> a1-4 num-params) argc) + (set! (-> a1-4 message) 'hit-knocked) + (set! (-> a1-4 param 0) (-> block param 0)) + (set! (-> a1-4 param 1) (-> block param 1)) + (set! (-> a1-4 param 2) (-> block param 2)) + (set! (-> a1-4 param 3) (-> block param 3)) + (set! (-> a1-4 param 4) (-> block param 4)) + (set! (-> a1-4 param 5) (-> block param 5)) + (send-event-function self a1-4) + ) + ) + (else + (when (!= (-> (the-as attack-info s5-0) id) (-> self incoming attack-id)) + (let* ((s2-1 self) + (s1-1 (method-of-object s2-1 get-incoming-attack!)) + (s0-1 proc) + ) + (set! sv-128 block) + (let ((a3-2 (get-penetrate-using-from-attack-event (the-as process-drawable proc) block)) + (t0-1 (the-as uint s5-0)) + (t1-1 (-> block param 0)) + ) + (s1-1 + s2-1 + (the-as process-drawable s0-1) + sv-128 + a3-2 + (the-as attack-info t0-1) + (the-as touching-shapes-entry t1-1) + ) + ) + ) + (knocked-handler self s4-0) + (let ((gp-1 (-> self child))) + (while gp-1 + (when (send-event (-> gp-1 0) 'is-gravity) + (send-event + (-> gp-1 0) + 'attack-forward + (-> self incoming attack-direction) + (-> self incoming attack-position) + (the-as uint s5-0) + (-> self incoming penetrate-using) + s4-0 + (-> self incoming attack-position) + ) + (set! v0-4 0) + (goto cfg-17) + ) + (set! gp-1 (-> gp-1 0 brother)) + ) + ) + #f + ) + ) + ) + ) + ) + (label cfg-17) + v0-4 + ) + (else + (if (zero? (-> self starting-time)) + (enemy-event-handler proc argc message block) + ) + ) + ) + ) + :enter (behavior () + (local-vars (v1-7 enemy-flag) (v1-9 enemy-flag) (v1-11 enemy-flag) (v1-34 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)) + (vector-float*! (-> self root transv) (-> self root transv) 0.5) + (set! (-> self root penetrated-by) (penetrate)) + (+! (-> self root transv y) 2048.0) + (set-time! (-> self state-time)) + (set! (-> self root penetrated-by) (logior (get-penetrated-by self) (penetrate vehicle))) + (set-time! (-> self starting-time)) + (set! (-> self focus-status) (the-as focus-status (logior (focus-status no-gravity) (-> self focus-status)))) + (let ((v1-33 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-33) + (set! v1-34 (logior (enemy-flag trackable) v1-33)) + (set! v1-34 (logclear v1-33 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-34) + (stop-look-at! self) + (when (and (-> self draw) (-> self draw shadow-ctrl)) + (let ((v1-41 (-> self draw shadow-ctrl))) + (logior! (-> v1-41 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + :exit (behavior () + (set! (-> self focus-status) + (the-as focus-status (logclear (-> self focus-status) (focus-status no-gravity))) + ) + (when (and (-> self draw) (-> self draw shadow-ctrl)) + (let ((v1-6 (-> self draw shadow-ctrl))) + (logclear! (-> v1-6 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + :trans (behavior () + (let ((gp-0 (-> self child))) + (while gp-0 + (when (send-event (-> gp-0 0) 'is-gravity) + (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) 'get-float-speed) + (let ((f0-0 (the-as float (send-event-function (-> gp-0 0) a1-1)))) + (+! (-> self root transv y) (* f0-0 (seconds-per-frame))) + ) + ) + 0 + (goto cfg-11) + ) + (set! gp-0 (-> gp-0 0 brother)) + ) + ) + (label cfg-11) + (vector-float*! (-> self root transv) (-> self root transv) (- 1.0 (* 0.5 (seconds-per-frame)))) + (let ((s3-0 (new 'stack 'collide-query)) + (gp-2 (vector-float*! (new 'stack-no-clear 'vector) (-> self root transv) (seconds-per-frame))) + ) + (set! (-> s3-0 start-pos quad) (-> (get-trans self 3) quad)) + (set! (-> s3-0 move-dist quad) (-> gp-2 quad)) + (let ((v1-26 s3-0)) + (set! (-> v1-26 radius) (* 0.7 (-> self root root-prim prim-core world-sphere w))) + (set! (-> v1-26 collide-with) + (collide-spec backgnd civilian enemy obstacle hit-by-others-list pusher vehicle-mesh) + ) + (set! (-> v1-26 ignore-process0) self) + (set! (-> v1-26 ignore-process1) #f) + (set! (-> v1-26 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-26 action-mask) (collide-action solid)) + ) + (let ((f30-0 (fill-and-probe-using-line-sphere *collide-cache* s3-0))) + (set! f30-0 + (cond + ((>= f30-0 0.0) + (vector-float*! gp-2 gp-2 f30-0) + (let ((s5-1 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (v1-31 (-> s3-0 best-other-tri)) + (f28-0 0.9) + ) + (set! (-> s5-1 quad) (-> v1-31 normal quad)) + (set! (-> s4-0 quad) (-> v1-31 intersect quad)) + (let ((v1-32 (and (-> v1-31 collide-ptr) (let ((s2-0 (-> v1-31 collide-ptr))) + (if (type? s2-0 collide-shape-prim-sphere) + s2-0 + ) + ) + ) + ) + ) + (when v1-32 + (let ((s2-1 (-> (the-as collide-shape-prim-sphere v1-32) cshape process))) + (let ((s1-0 (new 'stack-no-clear 'vector))) + (set! (-> s1-0 quad) (-> self root transv quad)) + (let* ((s0-0 s2-1) + (v1-37 (if (type? s0-0 process-focusable) + s0-0 + ) + ) + ) + (when v1-37 + (when (focus-test? (the-as process-focusable v1-37) no-gravity) + (vector-float*! s1-0 s1-0 0.5) + (set! f28-0 0.5) + ) + ) + ) + ) + (let ((f1-6 (fmax 0.0 (fmin 1.0 (* 0.000008138021 (vector-length (-> self root transv)))))) + (f0-12 0.0) + ) + (if (< 0.1 f1-6) + (set! f0-12 (lerp 3.0 12.0 f1-6)) + ) + (send-event + s2-1 + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self attack-id)) + (damage f0-12) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (penetrate-using (penetrate vehicle)) + (vector (-> self root transv)) + (attacker-velocity (-> self root transv)) + (intersection s4-0) + ) + ) + ) + ) + ) + ) + ) + (let ((s2-3 (vector-! (new 'stack-no-clear 'vector) (-> s3-0 start-pos) s4-0))) + 0.0 + (let* ((f0-16 (vector-normalize-ret-len! s2-3 1.0)) + (f0-18 (* 1.3 (- (* 0.7 (-> self root root-prim prim-core world-sphere w)) f0-16))) + ) + (vector-normalize! s2-3 f0-18) + ) + (vector+! (-> self root trans) (-> self root trans) s2-3) + ) + (let ((f26-0 (vector-dot (-> self root transv) s5-1))) + (vector+float*! (-> self root transv) (-> self root transv) s5-1 (* -2.0 f26-0)) + (vector-float*! (-> self root transv) (-> self root transv) f28-0) + (let ((s3-1 (-> self child))) + (while s3-1 + (when (send-event (-> s3-1 0) 'is-gravity) + (send-event (-> s3-1 0) 'impact s4-0 (vector-float*! (new 'stack-no-clear 'vector) s5-1 (- f26-0))) + 0 + (goto cfg-38) + ) + (set! s3-1 (-> s3-1 0 brother)) + ) + ) + ) + ) + (label cfg-38) + f30-0 + ) + (else + 1.0 + ) + ) + ) + (vector+! (-> self root trans) (-> self root trans) gp-2) + (if (< f30-0 1.0) + (vector+float*! (-> self root trans) (-> self root trans) (-> self root transv) (* f30-0 (seconds-per-frame))) + ) + ) + ) + ) + :code (behavior () + (gun-dark-2-anim-code) + ) + :post (behavior () + (let ((gp-0 (-> self skel status))) + (logior! (-> self skel status) (joint-control-status sync-math)) + (ja-post) + (update-transforms (-> self root)) + (set! (-> self skel status) gp-0) + ) + (let ((gp-1 (-> self child))) + (while gp-1 + (when (send-event (-> gp-1 0) 'is-gravity) + (send-event (-> gp-1 0) 'update-rotation) + (return 0) + ) + (set! gp-1 (-> gp-1 0 brother)) + ) + ) + ) + ) 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 82015b44d6..5eda0097d0 100644 --- a/goal_src/jak3/engine/common-obs/generic-obs-h.gc +++ b/goal_src/jak3/engine/common-obs/generic-obs-h.gc @@ -38,14 +38,23 @@ (declare-type joint-mod basic) (declare-type sparticle-launch-group basic) (declare-type sparticle-subsampler basic) +(declare-type part-tracker process) +(declare-type part-tracker-subsampler part-tracker) +(declare-type part-tracker-init-params structure) +(declare-type part-tracker-subsampler-init-params structure) +(declare-type lightning-tracker process) (define-extern process-grab? (function process symbol symbol :behavior process)) (define-extern process-release? (function process symbol :behavior process)) +(define-extern part-tracker-init (function part-tracker-init-params object :behavior part-tracker)) +(define-extern part-tracker-subsampler-init (function part-tracker-subsampler-init-params object :behavior part-tracker-subsampler)) +(define-extern lightning-tracker-init (function lightning-spec time-frame symbol process-drawable vector vector none :behavior lightning-tracker)) ;; 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 5be6dba67b..2b250597c3 100644 --- a/goal_src/jak3/engine/common-obs/generic-obs.gc +++ b/goal_src/jak3/engine/common-obs/generic-obs.gc @@ -20,6 +20,56 @@ (define-extern process-entity-set! (function process entity entity)) (define-extern cshape-reaction-default (function control-info collide-query vector vector collide-status)) +(defmacro set-part-tracker-params (type group duration callback userdata target mat-joint subsample-num) + `(case ,type + ((part-tracker) + (set! (-> *part-tracker-params-default* group) ,group) + (set! (-> *part-tracker-params-default* duration) ,duration) + (set! (-> *part-tracker-params-default* callback) ,callback) + (set! (-> *part-tracker-params-default* userdata) ,userdata) + (set! (-> *part-tracker-params-default* target) ,target) + (set! (-> *part-tracker-params-default* mat-joint) ,mat-joint) + ) + (else + (set! (-> *part-tracker-subsampler-params-default* group) ,group) + (set! (-> *part-tracker-subsampler-params-default* duration) ,duration) + (set! (-> *part-tracker-subsampler-params-default* callback) ,callback) + (set! (-> *part-tracker-subsampler-params-default* userdata) ,userdata) + (set! (-> *part-tracker-subsampler-params-default* target) ,target) + (set! (-> *part-tracker-subsampler-params-default* mat-joint) ,mat-joint) + (set! (-> *part-tracker-subsampler-params-default* subsample-num) ,subsample-num) + ) + ) + ) + +(defmacro part-tracker-spawn (type &key (group #f) + &key (to #f) + &key (name #f) + &key (stack-size #x4000) + &key (stack *scratch-memory-top*) + &key (unk 0) + &key (duration (seconds 0)) + &key (callback #f) + &key (userdata (the uint #f)) + &key (target #f) + &key (mat-joint *launch-matrix*) + &key (subsample-num 1.0)) + "Specialized `process-spawn` macro for [[part-tracker]]s. + Returns a pointer to the new process, or #f (or is it 0?) if something goes wrong." + (with-gensyms (new-tracker) + `(let ((,new-tracker (the-as ,type (get-process *default-dead-pool* ,type ,stack-size ,unk)))) + (when ,new-tracker + ((method-of-type ,type activate) ,new-tracker ,to ,(if name name `(symbol->string (quote ,type))) ,stack) + (set-part-tracker-params ,type ,group ,duration ,callback ,userdata ,target ,mat-joint ,subsample-num) + (run-now-in-process ,new-tracker + (if (= ,type part-tracker) part-tracker-init part-tracker-subsampler-init) + (if (= ,type part-tracker) *part-tracker-params-default* *part-tracker-subsampler-params-default*)) + (the (pointer ,type) (-> ,new-tracker ppointer)) + ) + ) + ) + ) + ;; DECOMP BEGINS (define *part-tracker-params-default* (new 'static 'part-tracker-init-params)) @@ -29,7 +79,7 @@ (defskelgroup skel-spotlight spotlight spotlight-lod0-jg -1 ((spotlight-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 10) - :shadow-joint-index 5 + :origin-joint-index 5 ) ;; WARN: Return type mismatch object vs (pointer sparticle-launch-group). @@ -498,7 +548,7 @@ ) (('shadow-fade-dist) (if (-> self draw shadow-ctrl) - (set! (-> self draw shadow-ctrl settings fade-vec x) (the-as float (-> block param 0))) + (set! (-> self draw shadow-ctrl settings fade-dist) (the-as float (-> block param 0))) ) ) (('no-fog) @@ -813,7 +863,7 @@ ) (('do-effect) (if (and (nonzero? (-> self skel)) (-> self skel effect)) - (do-effect (-> self skel effect) (the-as symbol (-> block param 0)) (the-as float (-> block param 1)) -1) + (do-effect (-> self skel effect) (the-as string (-> block param 0)) (the-as float (-> block param 1)) -1) ) ) (('no-actor-pause) @@ -1032,7 +1082,7 @@ 0.0 614400.0 (the-as vector #f) - 0.000000000000000000000000000000000000000000084 + (shadow-flags shdf02 shdf03 shdf04 disable-draw) 245760.0 ) ) @@ -1175,17 +1225,14 @@ (nonzero? (-> (the-as process-drawable v1-15) root)) (nonzero? (-> (the-as process-drawable v1-15) node-list)) ) - (sparticle-launch-control-method-18 - (-> self part) - (-> (the-as process-drawable v1-15) node-list data (-> self target-joint)) - ) + (spawn-from-cspace (-> self part) (-> (the-as process-drawable v1-15) node-list data (-> self target-joint))) (set! (-> self root trans quad) (-> self part origin trans quad)) ) (else (let ((a0-11 (-> self root trans))) (set! (-> self mat trans quad) (-> a0-11 quad)) ) - (sparticle-launch-control-method-17 (-> self part) (-> self mat)) + (spawn-from-mat (-> self part) (-> self mat)) ) ) ) @@ -1256,7 +1303,7 @@ (nonzero? (-> (the-as process-drawable v1-15) root)) (nonzero? (-> (the-as process-drawable v1-15) node-list)) ) - (sparticle-subsampler-method-10 + (init-with-mat! (-> self subsampler) (-> (the-as process-drawable v1-15) node-list data (-> self target-joint) bone transform) ) @@ -1266,7 +1313,7 @@ (let ((a0-11 (-> self root trans))) (set! (-> self mat trans quad) (-> a0-11 quad)) ) - (sparticle-subsampler-method-10 (-> self subsampler) (-> self mat)) + (init-with-mat! (-> self subsampler) (-> self mat)) ) ) ) @@ -1353,7 +1400,7 @@ ) (defpart 57 - :init-specs ((:texture (new 'static 'texture-id :index #x3d :page #x4)) + :init-specs ((:texture (middot level-default-sprite)) (:num 1.0) (:scale-x (meters 1)) (:scale-y :copy scale-x) @@ -1403,7 +1450,7 @@ (set! (-> self part) (create-launch-control (-> arg0 group) self)) (when (and (-> arg0 target) (logtest? (-> self part group flags) (sp-group-flag sp12 sp14))) (let* ((gp-0 (-> self part)) - (s5-0 (method-of-object gp-0 sparticle-launch-control-method-20)) + (s5-0 (method-of-object gp-0 set-local-space-info)) (s4-0 (add-connection *part-local-space-engine* self local-space-proc-joint (-> self target-joint) 0 0)) ) (let ((v1-10 (process->handle (-> arg0 target)))) @@ -1420,7 +1467,7 @@ (part-local-space-flags) ) ) - (s5-0 gp-0 (the-as float s4-0)) + (s5-0 gp-0 (the-as particle-local-space-info s4-0)) ) ) (set! (-> self event-hook) (-> (method-of-object self active) event)) @@ -1646,7 +1693,7 @@ ) ) ) - (set! (-> self sound) (sound-play-by-spec (the-as sound-spec gp-1) (new-sound-id) s5-1)) + (set! (-> self sound) (sound-play-by-spec gp-1 (new-sound-id) s5-1)) ) ) ) @@ -2007,7 +2054,7 @@ :trans (behavior () (when (-> self enable) (when (nonzero? (-> self path)) - (path-control-method-9 (-> self path)) + (debug-draw (-> self path)) (get-point-at-percent-along-path! (-> self path) (-> self root trans) (-> self path-pos) 'interp) (displacement-between-points-at-percent-normalized! (-> self path) (-> self last-velocity) (-> self path-pos)) (let ((f0-3 (+ (-> self path-pos) (* (-> self path-speed) (seconds-per-frame))))) @@ -2031,7 +2078,7 @@ (defmethod init-from-entity! ((this part-spawner) (arg0 entity-actor)) (local-vars (sv-16 string)) - (stack-size-set! (-> this main-thread) 16) + (stack-size-set! (-> this main-thread) 64) (logior! (-> this mask) (process-mask ambient)) (+! (-> this clock ref-count) -1) (+! (-> *display* part-clock ref-count) 1) @@ -2167,7 +2214,7 @@ ) (defpart 59 - :init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4)) + :init-specs ((:texture (hotdot level-default-sprite)) (:num 1.0) (:x (meters 0) (meters 1.8)) (:scale-x (meters 0.2)) @@ -2187,7 +2234,7 @@ ) (defpart 60 - :init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4)) + :init-specs ((:texture (hotdot level-default-sprite)) (:num 2.0) (:x (meters 1.8) (meters 1)) (:scale-x (meters 0.2)) @@ -2207,7 +2254,7 @@ ) (defpart 61 - :init-specs ((:texture (new 'static 'texture-id :index #x50 :page #x4)) + :init-specs ((:texture (woodchip level-default-sprite)) (:num 1.5) (:x (meters 2.9) (meters 2.5)) (:y (meters -0.5)) @@ -2231,7 +2278,7 @@ ) (defpart 62 - :init-specs ((:texture (new 'static 'texture-id :page #x4)) + :init-specs ((:texture (bigpuff level-default-sprite)) (:num 0.5) (:x (meters 2.9) (meters 2.5)) (:y (meters -0.5)) @@ -2271,7 +2318,7 @@ ) (defpart 65 - :init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4)) + :init-specs ((:texture (hotdot level-default-sprite)) (:num 1.0) (:x (meters 0) (meters 1.4)) (:scale-x (meters 0.2)) @@ -2291,7 +2338,7 @@ ) (defpart 66 - :init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4)) + :init-specs ((:texture (hotdot level-default-sprite)) (:num 2.0) (:x (meters 1.4) (meters 0.9)) (:scale-x (meters 0.2)) @@ -2311,7 +2358,7 @@ ) (defpart 67 - :init-specs ((:texture (new 'static 'texture-id :page #x4)) + :init-specs ((:texture (bigpuff level-default-sprite)) (:num 0.5) (:x (meters 2.9) (meters 2.5)) (:y (meters -0.5)) @@ -2347,7 +2394,7 @@ ) (defpart 68 - :init-specs ((:texture (new 'static 'texture-id :page #x4)) + :init-specs ((:texture (bigpuff level-default-sprite)) (:num 0.5) (:x (meters 2.9) (meters 2.5)) (:y (meters -0.5)) @@ -3027,12 +3074,12 @@ ) ;; WARN: Return type mismatch process vs none. -(defun explosion-spawn ((arg0 process-drawable) (arg1 type) (arg2 explosion-init-params)) +(defun explosion-spawn ((arg0 explosion-init-params) (arg1 process-drawable)) (let* ((gp-0 (the-as process #f)) (s3-0 (get-process *default-dead-pool* explosion #x4000 1)) (v1-1 (when s3-0 (let ((t9-1 (method-of-type explosion activate))) - (t9-1 (the-as explosion s3-0) (the-as process-tree arg1) "explosion" (the-as pointer #x70004000)) + (t9-1 (the-as explosion s3-0) arg1 "explosion" (the-as pointer #x70004000)) ) (run-now-in-process s3-0 explosion-init-by-other arg0) (-> s3-0 ppointer) @@ -3201,7 +3248,7 @@ ) 0 (while (not (time-elapsed? (-> self start-time) (the-as time-frame (-> self duration)))) - (sparticle-launch-control-method-17 (-> self part) (-> self mat)) + (spawn-from-mat (-> self part) (-> self mat)) (suspend) ) (set-time! (-> self start-time)) @@ -3608,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) ) @@ -3662,56 +3705,18 @@ (cond ((logtest? (-> self particle-launchers (-> self current-part-index) 0 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> gp-1 quad)) - (let ((gp-2 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-2 - (let ((t9-4 (method-of-type part-tracker-subsampler activate))) - (t9-4 - (the-as part-tracker-subsampler gp-2) - *entity-pool* - "part-tracker-subsampler" - (the-as pointer #x70004000) - ) - ) - (let ((t9-5 run-function-in-process) - (a0-18 gp-2) - (a1-3 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) - (-> self particle-launchers (-> self current-part-index) 0) - ) - (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-18 a1-3 *part-tracker-subsampler-params-default*) - ) - (-> gp-2 ppointer) - ) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> self particle-launchers (-> self current-part-index) 0) ) ) (else (set! (-> *launch-matrix* trans quad) (-> gp-1 quad)) - (let ((gp-3 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-3 - (let ((t9-7 (method-of-type part-tracker activate))) - (t9-7 (the-as part-tracker gp-3) *entity-pool* "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-8 run-function-in-process) - (a0-23 gp-3) - (a1-6 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> self particle-launchers (-> self current-part-index) 0)) - (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-8) a0-23 a1-6 *part-tracker-params-default*) - ) - (-> gp-3 ppointer) - ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> self particle-launchers (-> self current-part-index) 0) ) ) ) @@ -4038,7 +4043,7 @@ :virtual #t :trans (behavior () (set! (-> self task-counter) (-> *game-info* task-counter)) - (if *bigmap* + (if (and *bigmap* (nonzero? *bigmap*)) (bigmap-method-16 *bigmap*) ) (let ((gp-0 (res-lump-struct (-> self entity) 'on-running structure))) diff --git a/goal_src/jak3/engine/common-obs/guard-projectile.gc b/goal_src/jak3/engine/common-obs/guard-projectile.gc index 47864d1095..d09cea5f64 100644 --- a/goal_src/jak3/engine/common-obs/guard-projectile.gc +++ b/goal_src/jak3/engine/common-obs/guard-projectile.gc @@ -7,3 +7,611 @@ ;; DECOMP BEGINS +(defpart 849 + :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 850 + :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 851 + :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 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 852 + :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 853 + :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 854 + :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 855 + :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-guard-shot-hit-object + :id 211 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 856 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 857 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 858 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +(defpartgroup group-guard-shot-hit + :id 212 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 856 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 857 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 858 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 859 :period (seconds 2) :length (seconds 0.017)) + ) + ) + +(defpart 858 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 128.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 8192.0) + ) + ) + +(defpart 859 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 8.0 8.0) + (:scale-x (meters 0.75) (meters 0.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 128.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 857 + :init-specs ((:texture (glow level-default-sprite)) + (:num 2.0) + (:scale-x (meters 2)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0 64.0) + (:b 0.0 32.0) + (:a 48.0) + (:scalevel-x (meters 0.125)) + (: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 0.0) + (:next-time (seconds 0.067)) + (:next-launcher 860) + ) + ) + +(defpart 860 + :init-specs ((:scale-x (meters 4.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.05)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.53333336) + (:fade-a -0.8) + ) + ) + +(defpart 856 + :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.1)) + (: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 861) + ) + ) + +(defpart 861 + :init-specs ((:scale-x (meters 3.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.0625)) + (:scalevel-y :copy scalevel-x) + (:fade-b -6.4) + ) + ) + +(defpartgroup group-guard-grenade + :id 213 + :duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 862 :fade-after (meters 200) :falloff-to (meters 200))) + ) + +(defpart 862 + :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)) + ) + ) + +(deftype guard-shot (projectile) + ((hit-actor? symbol) + (tail-pos vector :inline) + ) + ) + + +(defmethod deal-damage! ((this guard-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 guard-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* 855)) + (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 guard-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* 850 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 850 init-specs 4 initial-valuef) (vector-length s5-1)) + (draw-beam (-> *part-id-table* 850) a1-0 s5-1 #f) + (set! (-> *part-id-table* 850 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* 853 init-specs 3 initial-valuef)) + (f28-1 (-> *part-id-table* 853 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* 853 init-specs 3 initial-valuef) (* f26-0 f30-1)) + (set! (-> *part-id-table* 853 init-specs 4 initial-valuef) (* f26-0 f28-1)) + (launch-particles (-> *part-id-table* 853) s4-1 :origin-is-matrix #t) + (set! (-> *part-id-table* 853 init-specs 3 initial-valuef) f30-1) + (set! (-> *part-id-table* 853 init-specs 4 initial-valuef) f28-1) + ) + ) + 0 + (none) + ) + ) + +(defmethod projectile-method-26 ((this guard-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?) + (cond + ((logtest? (-> *part-group-id-table* 211 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-1 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 211)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-1 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) (-> v1-1 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 212)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-1 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 212)) + ) + ) + ) + 0 + (none) + ) + +(defmethod play-impact-sound ((this guard-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "guard-shot-fire") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "guard-shot-hit") + ) + ) + ) + 0 + (none) + ) + +(defun guard-shot-move ((arg0 guard-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 guard-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 guard-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 guard-shot)) + (set! (-> this hit-actor?) #f) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this attack-mode) 'guard-shot) + (set! (-> this max-speed) 819200.0) + (set! (-> this move) guard-shot-move) + (set! (-> this update-velocity) projectile-update-velocity-space-wars) + (set! (-> this timeout) (seconds 0.5)) + (logior! (-> this options) (projectile-options po13)) + (set-gravity-length (-> this root dynam) 573440.0) + (none) + ) + +;; WARN: Return type mismatch (pointer process) vs (pointer guard-shot). +(defun spawn-guard-projectile ((arg0 process-focusable) (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 (pointer guard-shot) (spawn-projectile guard-shot gp-0 arg0 *default-dead-pool*)) + ) + ) diff --git a/goal_src/jak3/engine/common-obs/metalhead-projectile.gc b/goal_src/jak3/engine/common-obs/metalhead-projectile.gc index b0f57821e0..6b4534223d 100644 --- a/goal_src/jak3/engine/common-obs/metalhead-projectile.gc +++ b/goal_src/jak3/engine/common-obs/metalhead-projectile.gc @@ -7,3 +7,878 @@ ;; DECOMP BEGINS +(defpart 863 + :init-specs ((:texture (gun-enemy-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.25)) + (:scale-y (meters 12)) + (: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 864 + :init-specs ((:texture (glow-soft 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 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 865 + :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 866 + :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 867 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (: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-metalhead-shot-hit + :id 214 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 868 :period (seconds 2) :length (seconds 0.017)) + (sp-item 869 :fade-after (meters 100) :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 870 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 871 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 872 :period (seconds 2) :length (seconds 0.017)) + (sp-item 873 :fade-after (meters 50) :falloff-to (meters 50) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +(defpart 871 + :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 872 + :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 873 + :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 874) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 874 + :init-specs ((:fade-a -0.48 -0.48)) + ) + +(defpart 869 + :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 875) + ) + ) + +(defpart 875 + :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 875) + ) + ) + +(defpart 870 + :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 876) + ) + ) + +(defpart 876 + :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 868 + :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 877) + ) + ) + +(defpart 877 + :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-metalhead-shot-die + :id 215 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 249)) + ) + +(defpart 878 + :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) + ) + ) + +(deftype metalhead-shot (projectile) + ((tail-pos vector :inline) + ) + ) + + +(defmethod projectile-method-24 ((this metalhead-shot)) + (draw-beam (-> *part-id-table* 866) (-> 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* 867)) + (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 metalhead-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* 863 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 863 init-specs 4 initial-valuef) (fmin f28-0 (vector-length s5-1))) + (draw-beam (-> *part-id-table* 863) a1-0 s5-1 #f) + (set! (-> *part-id-table* 863 init-specs 4 initial-valuef) f28-0) + ) + (vector-normalize! s5-1 1.0) + (launch-particles (-> *part-id-table* 864) s4-0) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix)) + (f26-0 (* 0.000020345053 f30-0)) + (f30-1 (-> *part-id-table* 865 init-specs 3 initial-valuef)) + (f28-1 (-> *part-id-table* 865 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* 865 init-specs 3 initial-valuef) (* f26-0 f30-1)) + (set! (-> *part-id-table* 865 init-specs 5 initial-valuef) (* f26-0 f28-1)) + (launch-particles (-> *part-id-table* 865) s4-1 :origin-is-matrix #t) + (set! (-> *part-id-table* 865 init-specs 3 initial-valuef) f30-1) + (set! (-> *part-id-table* 865 init-specs 5 initial-valuef) f28-1) + ) + ) + 0 + (none) + ) + ) + +(defmethod projectile-method-26 ((this metalhead-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* 214 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* 214)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-2 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 214)) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this metalhead-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 metalhead-shot-move ((arg0 metalhead-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 (< 49152.0 f0-0) + (vector-normalize! s4-0 49152.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 metalhead-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) + ) + +(defmethod init-proj-settings! ((this metalhead-shot)) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this attack-mode) 'metalhead-shot) + (set! (-> this max-speed) 532480.0) + (set! (-> this move) metalhead-shot-move) + (set! (-> this timeout) (seconds 0.767)) + (set-gravity-length (-> this root dynam) 573440.0) + (none) + ) + +;; WARN: Return type mismatch (pointer process) vs (pointer metalhead-shot). +(defun spawn-metalhead-projectile ((arg0 metalhead-shot) (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 metalhead-shot) (spawn-projectile metalhead-shot gp-0 arg0 *default-dead-pool*)) + ) + ) + +(defpartgroup group-metalhead-grenade-shot + :id 216 + :duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 879) (sp-item 880) (sp-item 881)) + ) + +(defpart 879 + :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 880 + :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 881 + :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 882) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.35)) + ) + ) + +(defpart 882 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.48 -0.48)) + ) + +(deftype metalhead-grenade-shot (projectile) + ((tumble-quat quaternion :inline) + (blast-radius float) + ) + ) + + +(defmethod projectile-method-26 ((this metalhead-grenade-shot)) + (cond + ((logtest? (-> *part-group-id-table* 104 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* 104)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 104)) + ) + ) + 0 + (none) + ) + +(defmethod play-impact-sound ((this metalhead-grenade-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "gren-launch") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "gren-shot-hit") + ) + ((= v1-0 (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 (metalhead-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) + (the-as process-focusable s4-0) + ) + ) + ) + (when v1-1 + (let ((s4-1 (-> 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 (-> 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 () + (let ((t9-0 (-> (method-of-type projectile impact) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-5 (-> self root root-prim))) + (set! (-> v1-5 local-sphere w) (-> self blast-radius)) + (set! (-> v1-5 prim-core world-sphere w) (-> self blast-radius)) + (set! (-> v1-5 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list) + ) + (set! (-> v1-5 prim-core collide-as) (collide-spec enemy)) + ) + (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*) + (find-overlapping-shapes (-> self root) a1-0) + ) + ) + :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) + ) + (deactivate self) + ) + ) + +(defstate dissipate (metalhead-grenade-shot) + :virtual #t + :enter (behavior () + (go-virtual impact) + ) + ) + +(defmethod projectile-method-25 ((this metalhead-grenade-shot)) + (spawn (-> this part) (-> this root trans)) + 0 + (none) + ) + +(defun gren-canister-move ((arg0 metalhead-grenade-shot)) + (quaternion*! (-> arg0 root quat) (-> arg0 root quat) (-> arg0 tumble-quat)) + (projectile-move-fill-all-dirs arg0) + (let ((s5-0 (new 'stack-no-clear 'water-info))) + (water-info-init! (-> arg0 root) s5-0 (collide-action solid semi-solid)) + (if (and (logtest? (-> s5-0 flags) (water-flag active)) (< (-> arg0 root trans y) (-> s5-0 trans y))) + (go (method-of-object arg0 impact)) + ) + ) + (if (logtest? (-> arg0 root status) (collide-status touch-surface)) + (go (method-of-object arg0 impact)) + ) + 0 + (none) + ) + +(defun gren-cshape-reaction-canister ((arg0 collide-shape-moving) (arg1 metalhead-grenade-shot)) + (let ((s5-0 0)) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (vector-float*! a1-1 (the-as vector (&-> arg1 starting-dir y)) (the-as float (-> arg1 connection-list prev0))) + (move-by-vector! arg0 a1-1) + ) + (let ((f30-0 (vector-dot (-> arg0 transv) (the-as vector (&-> arg1 prev-state)))) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (vector-float*! s3-0 (the-as vector (&-> arg1 prev-state)) (* f30-0 (rand-vu-float-range 1.6 2.2))) + (vector-! (-> arg0 transv) (-> arg0 transv) s3-0) + ) + (let ((v0-2 (logior s5-0 7))) + (logior! (-> arg0 status) v0-2) + ) + ) + (vector-float*! (-> arg0 transv) (-> arg0 transv) 0.88) + (none) + ) + +(defmethod setup-collision! ((this metalhead-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)) + (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 backgnd 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 1228.8) + (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) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod init-proj-settings! ((this metalhead-grenade-shot)) + (set! (-> this attack-mode) 'explode) + (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* 216) this)) + (set! (-> this sound-id) (new-sound-id)) + (none) + ) + +;; WARN: Return type mismatch (pointer process) vs (pointer metalhead-grenade-shot). +(defun spawn-metalhead-grenade ((arg0 metalhead-grenade-shot) (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 metalhead-grenade-shot) (spawn-projectile metalhead-shot gp-0 arg0 *default-dead-pool*)) + ) + ) diff --git a/goal_src/jak3/engine/common-obs/particle-curves.gc b/goal_src/jak3/engine/common-obs/particle-curves.gc index a28624b524..9fb1c24b29 100644 --- a/goal_src/jak3/engine/common-obs/particle-curves.gc +++ b/goal_src/jak3/engine/common-obs/particle-curves.gc @@ -5,5 +5,166 @@ ;; name in dgo: particle-curves ;; dgos: GAME +;; +++particle-curve-flags +(defenum particle-curve-flags + :type uint64 + :bitfield #t + (pcf0 0) + (pcf1 1) + ) +;; ---particle-curve-flags + +(define-extern *alpha-fast* curve2d-fast) +(define-extern *unity-fast* curve2d-fast) +(define-extern *ccro* curve-color-fast) +(define-extern *scale-curve* curve2d-fast) +(define-extern *scale-range* curve2d-fast) + ;; DECOMP BEGINS +(deftype particle-curve-settings (structure) + ((color-start basic) + (alpha-start basic) + (scale-x-start basic) + (scale-y-start basic) + (r-scalar basic) + (g-scalar basic) + (b-scalar basic) + (a-scalar basic) + (scale-x-scalar basic) + (scale-y-scalar basic) + (lifetime-base time-frame) + (lifetime-offset time-frame) + (flags particle-curve-flags) + ) + ) + + +(def-mips2c birth-func-curve (function int sparticle-cpuinfo sparticle-launchinfo none)) + +(def-mips2c live-func-curve (function sparticle-system sparticle-cpuinfo vector none)) + +(defpart 69 + :init-specs ((:texture (middot level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.01)) + (:timer (seconds 16.667)) + (:flags ()) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -30) (degrees 60)) + (:conerot-z (degrees -30) (degrees 60)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *alpha-fast* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.25 :z -0.5 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 0.75 :z 0.5) + :one-over-x-deltas (new 'static 'vector :x -1.0 :y -1.0 :z -1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *unity-fast* (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! *ccro* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :x 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :y 128.0 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 2.5 :y 3.3333335 :z 3.3333333 :w 1.0) + ) + ) + ) + +(if #t + (set! *scale-curve* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 0.1 :z 0.1 :w 6.0) + :one-over-x-deltas (new 'static 'vector :x -2.9999998 :z 19.666666 :w 1.0) + ) + ) + ) + +(if #t + (set! *scale-range* (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 0.4 :z 1.4 :w 2.4) + :one-over-x-deltas (new 'static 'vector :x 0.099999994 :y 1.0 :z 1.0000001 :w 1.0) + ) + ) + ) + +(define *part-function-curve-test-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* 69 init-specs 12 initial-valuef) + (the-as float *part-function-curve-test-curve-settings*) + ) + +(set! (-> *part-function-curve-test-curve-settings* color-start) *ccro*) + +(set! (-> *part-function-curve-test-curve-settings* alpha-start) *unity-fast*) + +(set! (-> *part-function-curve-test-curve-settings* scale-x-start) *scale-range*) + +(set! (-> *part-function-curve-test-curve-settings* scale-y-start) #f) + +(set! (-> *part-function-curve-test-curve-settings* r-scalar) #f) + +(set! (-> *part-function-curve-test-curve-settings* g-scalar) #f) + +(set! (-> *part-function-curve-test-curve-settings* b-scalar) #f) + +(set! (-> *part-function-curve-test-curve-settings* a-scalar) *alpha-fast*) + +(set! (-> *part-function-curve-test-curve-settings* scale-x-scalar) *scale-curve*) + +(set! (-> *part-function-curve-test-curve-settings* scale-y-scalar) #f) + +;; WARN: Return type mismatch symbol vs none. +(defun ptest () + (dotimes (gp-0 1000) + (let ((t9-0 sp-launch-particles-var) + (a0-0 *sp-particle-system-2d*) + (a1-0 (-> *part-id-table* 69)) + (a2-0 *launch-matrix*) + ) + (let ((v1-1 (-> a2-0 trans)) + (a3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a3-0 x) 0.0) + (set! (-> a3-0 y) 40960.0) + (set! (-> a3-0 z) 0.0) + (set! (-> a3-0 w) 1.0) + (set! (-> v1-1 quad) (-> a3-0 quad)) + ) + (t9-0 a0-0 a1-0 a2-0 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + (none) + ) diff --git a/goal_src/jak3/engine/common-obs/plat.gc b/goal_src/jak3/engine/common-obs/plat.gc index 32d3a28682..080a65f68e 100644 --- a/goal_src/jak3/engine/common-obs/plat.gc +++ b/goal_src/jak3/engine/common-obs/plat.gc @@ -7,3 +7,310 @@ ;; DECOMP BEGINS +(deftype plat (base-plat) + ((path-pos float) + (sound-id sound-id) + (sync sync-eased :inline) + ) + (:state-methods + plat-idle + plat-path-active + ) + (:methods + (go-initial-state (_type_) object) + ) + ) + + +(defskelgroup skel-plat plat plat-lod0-jg plat-idle-ja + ((plat-lod0-mg (meters 20)) (plat-lod1-mg (meters 40)) (plat-lod2-mg (meters 999999))) + :bounds (static-spherem 0 -0.5 0 3) + ) + +(defmethod get-art-group ((this plat)) + (art-group-get-by-name *level* "skel-plat" (the-as (pointer level) #f)) + ) + +(defmethod init-collision! ((this plat)) + (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) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 13107.2) + (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-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 base-plat-method-34 ((this plat)) + 0 + (none) + ) + +(defmethod base-plat-method-33 ((this plat)) + 0 + (none) + ) + +(defmethod go-initial-state ((this plat)) + (cond + ((logtest? (-> this path flags) (path-control-flag not-found)) + (go (method-of-object this plat-idle)) + ) + ((> (-> this sync period) 0) + (go (method-of-object this plat-path-active)) + ) + (else + (go (method-of-object this plat-idle)) + ) + ) + ) + +(defstate plat-idle (plat) + :virtual #t + :event plat-event + :trans (behavior () + (update-part-and-sfx! self) + ) + :code (behavior () + (plat-trans) + (rider-post) + (suspend) + (until #f + (when (not (-> self bouncing)) + (plat-trans) + (rider-post) + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + 0 + ) + (while (-> self bouncing) + (plat-trans) + (rider-post) + (suspend) + ) + ) + #f + ) + ) + +(defstate plat-path-active (plat) + :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)) 81920.0) + (sound-play "eco-plat-hover" :id (-> self sound-id) :position (-> self root trans)) + ) + (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 + ) + +(defmethod init-from-entity! ((this plat) (arg0 entity-actor)) + (logior! (-> this mask) (process-mask platform)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton this (the-as skeleton-group (get-art-group this)) (the-as pair 0)) + (update-transforms (-> this root)) + (init-bounce-params! this) + (base-plat-method-33 this) + (set! (-> this fact) + (new 'process 'fact-info this (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc)) + ) + (let ((a1-4 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-15 0)) + (if (not (logtest? (-> this fact options) (actor-option loop))) + (set! v1-15 (logior v1-15 1)) + ) + (set! (-> a1-4 sync-type) 'sync-eased) + (set! (-> a1-4 sync-flags) (the-as sync-flags v1-15)) + ) + (set! (-> a1-4 period) (the-as uint 1200)) + (set! (-> a1-4 entity) arg0) + (set! (-> a1-4 percent) 0.0) + (set! (-> a1-4 ease-in) 0.15) + (set! (-> a1-4 ease-out) 0.15) + (set! (-> a1-4 pause-in) 0.0) + (set! (-> a1-4 pause-out) 0.0) + (initialize! (-> this sync) a1-4) + ) + (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 sound-id) (new-sound-id)) + (cond + ((logtest? (-> this path flags) (path-control-flag not-found)) + (set! (-> this path-pos) 0.0) + (base-plat-method-34 this) + (go-initial-state this) + ) + ((> (-> 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) + (base-plat-method-34 this) + (go-initial-state this) + ) + (else + (set! (-> this path-pos) 0.0) + (get-point-at-percent-along-path! (-> this path) (-> this root trans) (-> this path-pos) 'interp) + (base-plat-method-34 this) + (go-initial-state this) + ) + ) + ) + +(deftype drop-plat (base-plat) + ((art-name string) + (anim spool-anim) + (break-anim-name string) + (safe-time time-frame) + (hit-point vector :inline) + ) + (:state-methods + idle + (fall symbol) + ) + ) + + +;; WARN: Return type mismatch base-plat vs drop-plat. +(defmethod relocate ((this drop-plat) (offset int)) + (if (nonzero? (-> this break-anim-name)) + (&+! (-> this break-anim-name) offset) + ) + (let ((v1-5 (-> this anim anim-name))) + (if (and (>= (the-as int v1-5) (-> *kernel-context* relocating-min)) + (< (the-as int v1-5) (-> *kernel-context* relocating-max)) + ) + (&+! (-> this anim anim-name) offset) + ) + ) + (the-as drop-plat ((method-of-type base-plat relocate) this offset)) + ) + +(defstate idle (drop-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch 'attack 'bonk) + (let* ((s5-0 proc) + (a0-5 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (cond + ((and a0-5 (focus-test? (the-as process-focusable a0-5) edge-grab)) + (set! (-> self safe-time) (+ (current-time) (seconds 0.2))) + (return (the-as object #f)) + ) + ((not (time-elapsed? (-> self safe-time) (seconds 0.05))) + (return (the-as object #f)) + ) + ) + ) + (set! (-> self hit-point quad) (-> self root trans quad)) + (let ((a0-13 (if (type? proc process-focusable) + proc + ) + ) + ) + (set! (-> self hit-point quad) (-> (get-trans (the-as process-focusable a0-13) 0) quad)) + ) + (if (zero? (-> self bounce-time)) + (start-bounce! self) + ) + #f + ) + ) + ) + :trans plat-trans + :code (behavior () + (add-process *gui-control* self (gui-channel art-load) (gui-action queue) (-> self anim name) -99.0 0) + (until #f + (when (not (-> self bouncing)) + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + 0 + ) + (while (-> self bouncing) + (suspend) + ) + (go-virtual fall #f) + ) + #f + ) + :post plat-post + ) + +(defstate fall (drop-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('edge-grabbed) + (if (time-elapsed? (-> self state-time) (seconds 0.5)) + (send-event proc 'end-mode 'edge-grab) + ) + ) + (('die) + (go-virtual fall #t) + ) + ) + ) + :enter (behavior ((arg0 symbol)) + (set-time! (-> self state-time)) + ) + :exit (behavior () + (ja-abort-spooled-anim (-> self anim) (the-as art-joint-anim #f) -1) + ) + :trans rider-trans + :code (behavior ((arg0 symbol)) + (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 + (if (not arg0) + (ja-play-spooled-anim + (-> self anim) + (ja-group) + (the-as art-joint-anim #f) + (the-as (function process-drawable symbol) false-func) + (spooler-flags) + ) + ) + (ja-channel-set! 0) + (suspend) + (logior! (-> self mask) (process-mask sleep)) + (suspend) + 0 + ) + :post rider-post + ) diff --git a/goal_src/jak3/engine/common-obs/powerups.gc b/goal_src/jak3/engine/common-obs/powerups.gc index 8c9d818922..5a2b9b7191 100644 --- a/goal_src/jak3/engine/common-obs/powerups.gc +++ b/goal_src/jak3/engine/common-obs/powerups.gc @@ -7,3 +7,1257 @@ ;; DECOMP BEGINS +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior cloud-track process ((arg0 process-tree) + (arg1 process-tree) + (arg2 (function vector none)) + (arg3 time-frame) + (arg4 time-frame) + (arg5 time-frame) + ) + (change-parent self arg0) + (let ((s1-1 (process->handle arg0)) + (s2-1 (process->handle arg1)) + ) + (let ((s0-0 (current-time))) + (until (time-elapsed? s0-0 (+ arg3 arg4)) + (let ((v1-8 (or (not (handle->process s1-1)) (not (handle->process s2-1))))) + (if v1-8 + (deactivate self) + ) + ) + (let* ((f0-1 (fmax 0.0 (fmin 1.0 (/ (- (the float (- (current-time) s0-0)) (the float arg3)) (the float arg4))))) + (a0-18 (process-drawable-pair-random-point! + (the-as process-drawable (-> s1-1 process 0)) + (the-as process-drawable (-> s2-1 process 0)) + (new-stack-vector0) + f0-1 + ) + ) + ) + (arg2 a0-18) + ) + (suspend) + ) + ) + (cond + ((zero? arg5) + (until #f + (suspend) + ) + #f + ) + (else + (let ((s4-1 (current-time))) + (until (time-elapsed? s4-1 arg5) + (let ((a0-21 (process-drawable-random-point! (the-as process-drawable (-> s2-1 process 0)) (new-stack-vector0)))) + (arg2 a0-21) + ) + (suspend) + ) + ) + ) + ) + ) + (none) + ) + +(defpart 784 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1.5) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 192.0) + (:a 64.0) + (:fade-a -1.0666667) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +(defpart 785 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1.5) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 192.0) + (:a 64.0) + (:fade-a -1.0666667) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +(defpart 786 + :init-specs ((:texture (common-white common)) + (:num 1.0 3.0) + (:scale-x (meters 0.5) (meters 1.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 128.0) + (:fade-a -1.6) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.035)) + (:next-launcher 787) + ) + ) + +(defpart 788 + :init-specs ((:texture (common-white common)) + (:num 0.0 3.0) + (:scale-x (meters 1.5) (meters 1.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:fade-a -1.6) + (:timer (seconds 0.305)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.035)) + (:next-launcher 787) + ) + ) + +(defpart 787 + :init-specs ((:r 64.0) (:g 64.0) (:fade-r -1.0) (:fade-g -0.4) (:fade-a -2.0)) + ) + +(defpart 789 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.1) (meters 0.15)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0 64.0) + (:b 192.0 64.0) + (:a 64.0 128.0) + (:scalevel-x (meters -0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.2) + (:accel-y (meters -0.000016666667)) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-blue-hit-ground-effect + :id 194 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 790) (sp-item 791) (sp-item 792 :flags (is-3d)) (sp-item 793) (sp-item 794 :flags (is-3d))) + ) + +(defpart 793 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 32.0) + (:y (meters 0.5)) + (:scale-x (meters 1) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 32.0 32.0) + (:b 192.0 63.0) + (:a 0.0 63 1.0) + (:vel-y (meters 0.093333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3)) + (:next-time (seconds 0.067) (seconds 0.065)) + (:next-launcher 795) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0)) + ) + ) + +(defpart 795 + :init-specs ((:r 0.0) + (:g 32.0 32.0) + (:b 192.0 63.0) + (:a 0.0 63 1.0) + (:next-time (seconds 0.067) (seconds 0.065)) + (:next-launcher 795) + ) + ) + +(defpart 794 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:scale-x (meters 0)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 32.0 32.0) + (:b 192.0 63.0) + (:a 96.0 32.0) + (:scalevel-x (meters 0.21333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.2)) + (:next-launcher 796) + ) + ) + +(defpart 796 + :init-specs ((:fade-a -2.1333334)) + ) + +(defpart 792 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:scale-x (meters 0)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 32.0 32.0) + (:b 192.0 63.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.22666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.7111111) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.15)) + (:next-launcher 797) + ) + ) + +(defpart 797 + :init-specs ((:fade-a -1.4222223)) + ) + +(defpart 790 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 32.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 32.0 32.0) + (:b 192.0 63.0) + (:a 16.0 32.0) + (:vel-y (meters 0.053333335) (meters 0.026666667)) + (: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 791 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 12.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 32.0 32.0) + (:b 192.0 63.0) + (:a 16.0 16.0) + (:vel-y (meters 0.10666667) (meters 0.053333335)) + (: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 798 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1.5) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 92.0 32.0) + (:g 32.0 92.0) + (:b 0.0) + (:a 64.0) + (:fade-a -1.0) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +(defpart 799 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1.5) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 92.0 32.0) + (:g 32.0 92.0) + (:b 0.0) + (:a 64.0) + (:fade-a -1.0) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +(defpart 800 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.5 2.0) + (:y (meters -0.05)) + (:scale-x (meters 0.2) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 100.0 28.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 64.0 64.0) + (:vel-y (meters 0.0023333333) (meters 0.0016666667)) + (:scalevel-x (meters -0.00083333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.4) + (:fade-a -0.024242423) + (:accel-y (meters -0.000100000005) (meters -0.0003)) + (:friction 0.93) + (:timer (seconds 0.1) (seconds 0.697)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.3)) + (:next-launcher 801) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.05)) + ) + ) + +(defpart 801 + :init-specs ((:fade-r 0.0)) + ) + +(defpart 802 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1.5) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 92.0 32.0) + (:g 0.0) + (:b 0.0) + (:a 64.0) + (:fade-a -1.0) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +(defpart 803 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1.5) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 92.0 32.0) + (:g 0.0) + (:b 0.0) + (:a 64.0) + (:fade-a -1.0) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +(defpart 804 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.5 2.0) + (:y (meters -0.05)) + (:scale-x (meters 0.2) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 100.0 28.0) + (:g 0.0) + (:b 0.0) + (:a 64.0 64.0) + (:vel-y (meters 0.0023333333) (meters 0.0016666667)) + (:scalevel-x (meters -0.00083333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.4) + (:fade-a -0.024242423) + (:accel-y (meters -0.000100000005) (meters -0.0003)) + (:friction 0.93) + (:timer (seconds 0.1) (seconds 0.697)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.3)) + (:next-launcher 805) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.05)) + ) + ) + +(defpart 805 + :init-specs ((:fade-r 0.0)) + ) + +(defpart 806 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1.5) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 92.0 32.0) + (:b 0.0) + (:a 64.0) + (:fade-a -1.0) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +(defpart 807 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1.5) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 92.0 32.0) + (:b 0.0) + (:a 64.0) + (:fade-a -1.0) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +(defpart 808 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.5 2.0) + (:y (meters -0.05)) + (:scale-x (meters 0.2) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 100.0 28.0) + (:b 0.0) + (:a 64.0 64.0) + (:vel-y (meters 0.0023333333) (meters 0.0016666667)) + (:scalevel-x (meters -0.00083333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.4) + (:fade-a -0.024242423) + (:accel-y (meters -0.000100000005) (meters -0.0003)) + (:friction 0.93) + (:timer (seconds 0.1) (seconds 0.697)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.3)) + (:next-launcher 809) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.05)) + ) + ) + +(defpart 809 + :init-specs ((:fade-g 0.0)) + ) + +(defun eco-blue-glow ((arg0 vector)) + (launch-particles (-> *part-id-table* 784) arg0) + (if (rand-vu-percent? 0.5) + (launch-particles (-> *part-id-table* 786) arg0) + ) + 0 + (none) + ) + +(defbehavior target-eco-process target () + (when (and (!= (-> self fact eco-level) 0.0) + (>= (- (-> *display* game-clock frame-counter) (-> self fact eco-pickup-time)) + (the-as time-frame (-> self fact eco-timeout)) + ) + ) + (set! (-> self fact eco-level) 0.0) + (set! (-> self fact eco-timeout) 0) + (logclear! (-> self target-flags) (target-flags tf4)) + (send-event self 'reset-collide) + (stop! (-> self sound)) + ) + (if (logtest? (game-secrets endless-dark) (-> self game secrets)) + (set! (-> self game eco-pill-dark) (-> *FACT-bank* eco-pill-dark-max-default)) + ) + (if (logtest? (game-secrets endless-light) (-> self game secrets)) + (set! (-> self game eco-pill-light) (-> *FACT-bank* eco-pill-light-max-default)) + ) + (when (and (< 0.0 (-> self fact eco-level)) + (not (focus-test? self in-head)) + (not (logtest? (-> self draw status) (draw-control-status no-draw no-draw-temp))) + (not (movie?)) + (rand-vu-percent? + (lerp-scale + 0.0 + 1.0 + (the float (- (-> self fact eco-timeout) + (the-as uint (- (-> *display* game-clock frame-counter) (-> self fact eco-pickup-time))) + ) + ) + 0.0 + 900.0 + ) + ) + ) + (case (-> self fact eco-type) + ((1) + (change-sound! (-> self sound) (static-sound-name "yel-eco-jak")) + (let ((s1-0 (rand-vu-int-range 3 (+ (-> self node-list length) -1))) + (gp-1 sp-launch-particles-var) + (s5-0 *sp-particle-system-2d*) + (s4-0 (-> *part-id-table* (if (rand-vu-percent? 0.5) + 798 + 799 + ) + ) + ) + (s2-0 *launch-matrix*) + ) + (set! (-> s2-0 trans quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data s1-0)) quad) + ) + (gp-1 s5-0 s4-0 s2-0 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (dotimes (gp-2 2) + (let ((v1-58 (rand-vu-int-range 3 (+ (-> self node-list length) -1))) + (s5-1 sp-launch-particles-var) + (s4-1 *sp-particle-system-2d*) + (s3-1 (-> *part-id-table* 800)) + (s1-1 *launch-matrix*) + ) + (set! (-> s1-1 trans quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data v1-58)) quad) + ) + (s5-1 s4-1 s3-1 s1-1 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ((2) + (target-danger-set! (-> self control danger-mode) 'eco-red) + (update-transforms (-> self control)) + (let ((a1-13 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-13 options) (overlaps-others-options)) + (set! (-> a1-13 collide-with-filter) (the-as collide-spec -1)) + (set! (-> a1-13 tlist) *touching-list*) + (find-overlapping-shapes (-> self control) a1-13) + ) + (target-danger-set! (-> self control danger-mode) #f) + (update-transforms (-> self control)) + (change-sound! (-> self sound) (static-sound-name "red-eco-jak")) + (let ((s1-2 (rand-vu-int-range 3 (+ (-> self node-list length) -1))) + (gp-3 sp-launch-particles-var) + (s5-2 *sp-particle-system-2d*) + (s4-2 (-> *part-id-table* (if (rand-vu-percent? 0.5) + 802 + 803 + ) + ) + ) + (s2-2 *launch-matrix*) + ) + (set! (-> s2-2 trans quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data s1-2)) quad) + ) + (gp-3 s5-2 s4-2 s2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (dotimes (gp-4 2) + (let ((v1-91 (rand-vu-int-range 3 (+ (-> self node-list length) -1))) + (s5-3 sp-launch-particles-var) + (s4-3 *sp-particle-system-2d*) + (s3-3 (-> *part-id-table* 804)) + (s1-3 *launch-matrix*) + ) + (set! (-> s1-3 trans quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data v1-91)) quad) + ) + (s5-3 s4-3 s3-3 s1-3 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ((3) + (change-sound! (-> self sound) (static-sound-name "blue-eco-jak")) + (let ((v1-104 (rand-vu-int-range 3 (+ (-> self node-list length) -1)))) + (cond + ((and (logtest? (-> self control mod-surface flags) (surface-flag air)) + (not (logtest? (-> self control status) (collide-status on-surface))) + ) + (set! (-> *part-id-table* 788 init-specs 4 initial-valuef) 0.0) + (set! (-> *part-id-table* 788 init-specs 4 random-rangef) 65536.0) + ) + (else + (set! (-> *part-id-table* 788 init-specs 4 initial-valuef) 40960.0) + (set! (-> *part-id-table* 788 init-specs 4 random-rangef) 16384.0) + ) + ) + (launch-particles + (-> *part-id-table* 788) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data v1-104)) + ) + ) + (let ((gp-6 (rand-vu-int-range 3 (+ (-> self node-list length) -1)))) + (launch-particles + (-> *part-id-table* (if (rand-vu-percent? 0.5) + 784 + 785 + ) + ) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data gp-6)) + ) + (if (rand-vu-percent? 0.5) + (launch-particles + (-> *part-id-table* 786) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data gp-6)) + ) + ) + ) + (let ((v1-128 (rand-vu-int-range 3 (+ (-> self node-list length) -1))) + (gp-7 sp-launch-particles-var) + (s5-7 *sp-particle-system-2d*) + (s4-7 (-> *part-id-table* 789)) + (s2-7 *launch-matrix*) + ) + (set! (-> s2-7 trans quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data v1-128)) quad) + ) + (gp-7 s5-7 s4-7 s2-7 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 0 1 (seconds 0.1)) + ) + ((5) + (change-sound! (-> self sound) (static-sound-name "green-eco-jak")) + (let ((s1-6 (rand-vu-int-range 3 (+ (-> self node-list length) -1))) + (gp-8 sp-launch-particles-var) + (s5-8 *sp-particle-system-2d*) + (s4-8 (-> *part-id-table* (if (rand-vu-percent? 0.5) + 806 + 807 + ) + ) + ) + (s2-8 *launch-matrix*) + ) + (set! (-> s2-8 trans quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data s1-6)) quad) + ) + (gp-8 s5-8 s4-8 s2-8 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (dotimes (gp-9 2) + (let ((v1-152 (rand-vu-int-range 3 (+ (-> self node-list length) -1))) + (s5-9 sp-launch-particles-var) + (s4-9 *sp-particle-system-2d*) + (s3-9 (-> *part-id-table* 808)) + (s1-7 *launch-matrix*) + ) + (set! (-> s1-7 trans quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data v1-152)) quad) + ) + (s5-9 s4-9 s3-9 s1-7 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ) + (update-trans! (-> self sound) (-> self control trans)) + (update! (-> self sound)) + ) + 0 + (none) + ) + +(defbehavior target-color-effect-process target () + (when (and (-> self color-effect) (time-elapsed? (-> self color-effect-start-time) (-> self color-effect-duration))) + (set! (-> self color-effect) #f) + (set-vector! (-> self draw color-mult) 1.0 1.0 1.0 1.0) + (set! (-> self draw color-emissive quad) (the-as uint128 0)) + ) + (case (-> self color-effect) + (('shock) + (let ((f0-4 (rand-vu-float-range 0.5 2.0))) + (set-vector! (-> self draw color-mult) f0-4 f0-4 (+ 0.5 f0-4) 1.0) + ) + ) + (('eco-pill-dark) + (let ((f30-0 (lerp-scale + 1.0 + 0.0 + (the float (- (current-time) (-> self color-effect-start-time))) + (* 0.25 (the float (-> self color-effect-duration))) + (the float (-> self color-effect-duration)) + ) + ) + ) + (set-vector! (-> self draw color-mult) (lerp 1.0 1.0 f30-0) (lerp 1.0 0.0 f30-0) (lerp 1.0 1.0 f30-0) 1.0) + (set-vector! (-> self draw color-emissive) (lerp 0.0 0.3 f30-0) (lerp 0.0 0.0 f30-0) (lerp 0.0 0.3 f30-0) 1.0) + ) + ) + (('eco-pill-light) + (let ((f30-1 (lerp-scale + 1.0 + 0.0 + (the float (- (current-time) (-> self color-effect-start-time))) + (* 0.25 (the float (-> self color-effect-duration))) + (the float (-> self color-effect-duration)) + ) + ) + ) + (set-vector! (-> self draw color-mult) (lerp 1.0 5.0 f30-1) (lerp 1.0 5.0 f30-1) (lerp 1.0 5.0 f30-1) 1.0) + (set-vector! (-> self draw color-emissive) (lerp 0.0 2.0 f30-1) (lerp 0.0 2.0 f30-1) (lerp 0.0 2.0 f30-1) 1.0) + ) + ) + (('ammo-yellow) + (let ((f30-2 (lerp-scale + 1.0 + 0.0 + (the float (- (current-time) (-> self color-effect-start-time))) + (* 0.25 (the float (-> self color-effect-duration))) + (the float (-> self color-effect-duration)) + ) + ) + ) + (set-vector! (-> self draw color-mult) (lerp 1.0 1.0 f30-2) (lerp 1.0 1.0 f30-2) (lerp 1.0 0.0 f30-2) 1.0) + (set-vector! (-> self draw color-emissive) (lerp 0.0 0.3 f30-2) (lerp 0.0 0.3 f30-2) (lerp 0.0 0.0 f30-2) 1.0) + ) + ) + (('ammo-red) + (let ((f30-3 (lerp-scale + 1.0 + 0.0 + (the float (- (current-time) (-> self color-effect-start-time))) + (* 0.25 (the float (-> self color-effect-duration))) + (the float (-> self color-effect-duration)) + ) + ) + ) + (set-vector! (-> self draw color-mult) (lerp 1.0 1.0 f30-3) (lerp 1.0 0.6 f30-3) (lerp 1.0 0.6 f30-3) 1.0) + (set-vector! (-> self draw color-emissive) (lerp 0.0 0.3 f30-3) (lerp 0.0 0.0 f30-3) (lerp 0.0 0.0 f30-3) 1.0) + ) + ) + (('ammo-blue) + (let ((f30-4 (lerp-scale + 1.0 + 0.0 + (the float (- (current-time) (-> self color-effect-start-time))) + (* 0.25 (the float (-> self color-effect-duration))) + (the float (-> self color-effect-duration)) + ) + ) + ) + (set-vector! (-> self draw color-mult) (lerp 1.0 0.6 f30-4) (lerp 1.0 0.8 f30-4) (lerp 1.0 1.0 f30-4) 1.0) + (set-vector! (-> self draw color-emissive) (lerp 0.0 0.0 f30-4) (lerp 0.0 0.1 f30-4) (lerp 0.0 0.3 f30-4) 1.0) + ) + ) + (('ammo-dark) + (let ((f30-5 (lerp-scale + 1.0 + 0.0 + (the float (- (current-time) (-> self color-effect-start-time))) + (* 0.25 (the float (-> self color-effect-duration))) + (the float (-> self color-effect-duration)) + ) + ) + ) + (set-vector! (-> self draw color-mult) (lerp 1.0 1.0 f30-5) (lerp 1.0 0.7 f30-5) (lerp 1.0 0.8 f30-5) 1.0) + (set-vector! (-> self draw color-emissive) (lerp 0.0 0.2 f30-5) (lerp 0.0 0.0 f30-5) (lerp 0.0 0.1 f30-5) 1.0) + ) + ) + (('health 'eco-green) + (let ((f30-6 (lerp-scale + 1.0 + 0.0 + (the float (- (current-time) (-> self color-effect-start-time))) + (* 0.25 (the float (-> self color-effect-duration))) + (the float (-> self color-effect-duration)) + ) + ) + ) + (set-vector! (-> self draw color-mult) (lerp 1.0 0.5 f30-6) (lerp 1.0 1.0 f30-6) (lerp 1.0 0.5 f30-6) 1.0) + (set-vector! (-> self draw color-emissive) (lerp 0.0 0.0 f30-6) (lerp 0.0 0.5 f30-6) (lerp 0.0 0.0 f30-6) 1.0) + ) + ) + ) + 0 + (none) + ) + +(defun target-update-segs ((arg0 process-drawable)) + (let ((f30-0 (-> *FACT-bank* health-max-default))) + (let ((s5-0 (-> *game-info* features))) + (when (!= (-> arg0 type) target) + (if (-> *setting-control* user-current beard) + (setup-masks (-> arg0 draw) 4 0) + (setup-masks (-> arg0 draw) 0 4) + ) + (setup-masks (-> arg0 draw) 32 64) + ) + (cond + ((logtest? (game-feature armor0) s5-0) + (set! f30-0 (+ 2.0 f30-0)) + (setup-masks (-> arg0 draw) 2 0) + ) + (else + (setup-masks (-> arg0 draw) 0 2) + ) + ) + (cond + ((logtest? (game-feature armor1) s5-0) + (set! f30-0 (+ 2.0 f30-0)) + (setup-masks (-> arg0 draw) 16 0) + ) + (else + (setup-masks (-> arg0 draw) 0 16) + ) + ) + (cond + ((logtest? (game-feature armor2) s5-0) + (set! f30-0 (+ 2.0 f30-0)) + (setup-masks (-> arg0 draw) 128 0) + ) + (else + (setup-masks (-> arg0 draw) 0 128) + ) + ) + (cond + ((logtest? (game-feature armor3) s5-0) + (set! f30-0 (+ 2.0 f30-0)) + (setup-masks (-> arg0 draw) 512 256) + ) + (else + (setup-masks (-> arg0 draw) 256 512) + ) + ) + ) + (if (not (-> *setting-control* user-current armor)) + (setup-masks (-> arg0 draw) 256 658) + ) + f30-0 + ) + ) + +(defbehavior target-draw-process target () + (let ((gp-0 (the-as uint (-> self game features)))) + (if (not (-> *setting-control* user-current armor)) + (set! gp-0 (logand (the-as uint #xff0fffffffffffff) (the-as game-feature gp-0))) + ) + (when (or (!= (-> self game old-features) gp-0) (not (time-elapsed? (-> self init-time) (seconds 0.5)))) + (let ((f30-0 (-> self fact health-max)) + (f0-0 (target-update-segs self)) + ) + (if (!= f30-0 f0-0) + (pickup-collectable! (-> self fact) (pickup-type health-max) (- f0-0 f30-0) (the-as handle #f)) + ) + ) + (set! (-> self game old-features) (the-as game-feature gp-0)) + ) + ) + (+! (-> self scarf-interp) (* 0.2 (- (-> self scarf-interp-targ) (-> self scarf-interp)))) + (seek! (-> self scarf-interp) (-> self scarf-interp-targ) (seconds-per-frame)) + (+! (-> self goggles-interp) (* 0.2 (- (-> self goggles-interp-targ) (-> self goggles-interp)))) + (seek! (-> self goggles-interp) (-> self goggles-interp-targ) (seconds-per-frame)) + (let ((f30-1 (-> self scarf-interp)) + (f28-0 (-> self goggles-interp)) + (f26-0 (-> self darkjak-interp)) + (f24-0 (-> self lightjak-interp)) + ) + (when (or (!= (-> self scarf-interp-old) f30-1) + (!= (-> self goggles-interp-old) f28-0) + (!= (-> self darkjak-interp-old) f26-0) + (or (!= (-> self lightjak-interp-old) f24-0) (not (time-elapsed? (-> self teleport-time) (seconds 0.6)))) + ) + (if (>= (-> self scarf-interp) 1.0) + (setup-masks (-> self draw) 64 32) + (setup-masks (-> self draw) 32 64) + ) + (cond + ((and (= f30-1 0.0) + (= f28-0 0.0) + (= f26-0 0.0) + (and (= f24-0 0.0) (not (time-elapsed? (-> self teleport-time) (seconds 0.5)))) + ) + (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) + ) + ((and (= f30-1 0.0) (= f28-0 0.0) (= f26-0 0.0) (= f24-0 0.0)) + (set! (-> self skel override 0) 0.0) + (set! (-> self skel override 41) 0.0) + (set! (-> self scarf-interp-old) f30-1) + (set! (-> self goggles-interp-old) f28-0) + (set! (-> self darkjak-interp-old) f26-0) + (set! (-> self lightjak-interp-old) f24-0) + ) + (else + (set! (-> self skel override 0) 1.0) + (set! (-> self skel override 8) f30-1) + (set! (-> self skel override 5) f28-0) + (set! (-> self skel override 2) f26-0) + (set! (-> self skel override 6) f26-0) + (set! (-> self skel override 7) f26-0) + (set! (-> self skel override 4) f26-0) + (cond + ((!= f26-0 0.0) + (set! (-> self skel override 41) 1.0) + (set! (-> self skel override 46) 2.0) + (set! (-> self skel override 52) 2.0) + ) + ((!= f24-0 0.0) + (set! (-> self skel override 41) 1.0) + (set! (-> self skel override 46) 0.0) + (set! (-> self skel override 52) 0.0) + ) + (else + (set! (-> self skel override 41) 0.0) + ) + ) + (set! (-> self scarf-interp-old) f30-1) + (set! (-> self goggles-interp-old) f28-0) + (set! (-> self darkjak-interp-old) f26-0) + (set! (-> self lightjak-interp-old) f24-0) + ) + ) + ) + ) + (when (!= (-> self cloth) (-> *setting-control* user-current cloth)) + (process-drawable-show-all-cloth self (-> *setting-control* user-current cloth)) + (set! (-> self cloth) (-> *setting-control* user-current cloth)) + ) + 0 + (none) + ) + +(defbehavior target-powerup-process target () + (target-draw-process) + (let ((gp-0 (-> self ext-anim-control))) + (when (!= (-> self ext-anim) (-> self pending-ext-anim)) + (when (not (or (= (-> gp-0 status) 'initialize) (= (-> self ext-anim) (target-anim unknown)))) + (when (joint-control-cleanup (-> self skel) (-> gp-0 heap) (the-as art-joint-anim jakb-stance-loop-ja)) + (target-gun-end-mode 'fast-exit) + (set! (-> self skel float-channels) (the-as uint 0)) + (reset (-> self skel top-anim)) + ) + (send-event (ppointer->process (-> self sidekick)) 'cleanup) + (unload-from-heap *anim-manager* (-> gp-0 heap)) + (unlink-shaders-in-heap *texture-page-dir* (-> gp-0 heap)) + ) + (case (-> self pending-ext-anim) + (((target-anim default) (target-anim board) (target-anim dark) (target-anim light)) + (set-pending-file gp-0 "jak-external" (the-as int (-> self pending-ext-anim)) (process->handle self) 0.0) + ) + (else + (set-pending-file gp-0 (the-as string #f) 0 (process->handle self) 0.0) + ) + ) + ) + (if (= (-> gp-0 status) 'active) + (set! (-> self ext-anim) (the-as target-anim (-> gp-0 load-file-part))) + (set! (-> self ext-anim) (target-anim unknown)) + ) + ) + (let ((f30-0 (-> self control collision-spheres 0 prim-core world-sphere w))) + (if (focus-test? self board) + (+! (-> self control collision-spheres 0 prim-core world-sphere w) 4096.0) + ) + (water-control-method-10 (-> self water)) + (set! (-> self control collision-spheres 0 prim-core world-sphere w) f30-0) + ) + (if (and (logtest? (-> self water flags) (water-flag under-water)) + (not (logtest? (-> self water flags) (water-flag swim-ground))) + ) + (set-time! (-> self control unknown-time-frame26)) + (set-time! (-> self control unknown-time-frame27)) + ) + (cond + ((and (= (-> self control ground-pat material) (pat-material ice)) + (and (>= (-> self control ctrl-xz-vel) 204.8) + (not (time-elapsed? (-> self control last-time-on-surface) (seconds 0.05))) + ) + ) + (let ((gp-1 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node jakb-lod0-jg RbigToe)))) + (if (and (< (fabs (vector-dot + (-> self control dynam gravity-normal) + (vector-! (new 'stack-no-clear 'vector) gp-1 (-> self control trans)) + ) + ) + 819.2 + ) + (rand-vu-percent? 0.5) + ) + (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 159) gp-1) + ) + ) + (let ((gp-2 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node jakb-lod0-jg LbigToe)))) + (if (and (< (fabs (vector-dot + (-> self control dynam gravity-normal) + (vector-! (new 'stack-no-clear 'vector) gp-2 (-> self control trans)) + ) + ) + 819.2 + ) + (rand-vu-percent? 0.5) + ) + (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 159) gp-2) + ) + ) + (let ((f0-10 (lerp-scale 0.8 1.0 (-> self control ctrl-xz-vel) 0.0 81920.0))) + (let ((v1-100 (ja-group))) + (if (not (and v1-100 (= v1-100 jakb-ice-stance-ja))) + (set! f0-10 (* 0.8 f0-10)) + ) + ) + (seek! (-> self control unknown-float45) f0-10 (seconds-per-frame)) + ) + (let ((f30-1 (-> self control unknown-float45)) + (f0-14 (lerp-scale -0.3 0.3 (-> self control ctrl-xz-vel) 0.0 81920.0)) + ) + (sound-play-by-name + (static-sound-name "ice-loop") + (-> self control unknown-sound-id04) + (the int (* 1024.0 f30-1)) + (the int (* 1524.0 f0-14)) + 0 + (sound-group) + (-> self control trans) + ) + ) + ) + ((< 0.0 (-> self control unknown-float45)) + (set! (-> self control unknown-float45) 0.0) + (let ((v1-121 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-121 command) (sound-command set-param)) + (set! (-> v1-121 id) (-> self control unknown-sound-id04)) + (set! (-> v1-121 params volume) -4) + (set! (-> v1-121 auto-time) 48) + (set! (-> v1-121 auto-from) 2) + (set! (-> v1-121 params mask) (the-as uint 17)) + (-> v1-121 id) + ) + ) + ) + (target-darkjak-process) + (target-lightjak-process) + (target-invisible-process) + (when (nonzero? (-> self fact trick-point-duration)) + (when (>= (- (-> *display* game-clock frame-counter) (-> self fact trick-point-start-time)) + (-> self fact trick-point-duration) + ) + (format #t "------------> ~,,f total points~%" (-> self fact trick-point)) + (send-event (handle->process (-> self notify)) 'notify 'trick-judge (-> self fact trick-point)) + (reset! (-> self fact) 'trick-judge) + ) + ) + (cond + ((logtest? (-> self game features) (game-feature feature0)) + (cond + ((< (current-time) (-> self fact stop-time-timeout)) + (set-setting! 'bg-a 'abs 0.3 0) + (set-setting! 'bg-r 'abs 1.0 0) + (update-rates! (-> *display* entity-clock) 0.0) + (if (zero? (mod (-> *display* base-clock integral-frame-counter) 60)) + (sound-play "stopwatch") + ) + ) + ((nonzero? (-> self fact stop-time-timeout)) + (remove-setting! 'bg-a) + (remove-setting! 'bg-r) + (update-rates! (-> *display* entity-clock) 1.0) + (set! (-> self fact stop-time-timeout) 0) + 0 + ) + ((cpad-pressed? (-> self control cpad number) r1) + (set! (-> self fact stop-time-timeout) (+ (current-time) (seconds 5))) + ) + ) + ) + ((logtest? (-> self game features) (game-feature feature2)) + (when *time-of-day-fast* + (set! *time-of-day-fast* #f) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 1.0) + ) + (cond + ((cpad-hold? (-> self control cpad number) r1) + (update-rates! + (-> *display* entity-clock) + (seek (-> *display* entity-clock clock-ratio) 60.0 (* 120.0 (seconds-per-frame))) + ) + (update-rates! (-> *display* bg-clock) (-> *display* entity-clock clock-ratio)) + (update-rates! + (-> *display* target-clock) + (seek (-> *display* target-clock clock-ratio) 2.0 (* 120.0 (seconds-per-frame))) + ) + ) + ((or (!= (-> *display* entity-clock clock-ratio) 2.0) (!= (-> *display* target-clock clock-ratio) 1.0)) + (update-rates! + (-> *display* entity-clock) + (seek (-> *display* entity-clock clock-ratio) 2.0 (* 120.0 (seconds-per-frame))) + ) + (update-rates! (-> *display* bg-clock) (-> *display* entity-clock clock-ratio)) + (update-rates! + (-> *display* target-clock) + (seek (-> *display* target-clock clock-ratio) 1.0 (* 120.0 (seconds-per-frame))) + ) + ) + ) + ) + ((logtest? (-> self game features) (game-feature feature4)) + (when *time-of-day-fast* + (set! *time-of-day-fast* #f) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 1.0) + ) + (cond + ((cpad-hold? (-> self control cpad number) r1) + (update-rates! + (-> *display* entity-clock) + (seek (-> *display* entity-clock clock-ratio) 0.3 (* 30.0 (seconds-per-frame))) + ) + (update-rates! (-> *display* bg-clock) (-> *display* entity-clock clock-ratio)) + (update-rates! + (-> *display* target-clock) + (seek (-> *display* target-clock clock-ratio) 0.5 (* 30.0 (seconds-per-frame))) + ) + ) + ((or (!= (-> *display* entity-clock clock-ratio) 1.0) (!= (-> *display* target-clock clock-ratio) 1.0)) + (update-rates! + (-> *display* entity-clock) + (seek (-> *display* entity-clock clock-ratio) 1.0 (* 30.0 (seconds-per-frame))) + ) + (update-rates! (-> *display* bg-clock) (-> *display* entity-clock clock-ratio)) + (update-rates! + (-> *display* target-clock) + (seek (-> *display* target-clock clock-ratio) 1.0 (* 30.0 (seconds-per-frame))) + ) + ) + ) + ) + ) + (target-eco-process) + (target-color-effect-process) + (if (logtest? (-> self 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? (-> self 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)) + ) + (logclear! (-> self focus-status) (focus-status super)) + (if (or (focus-test? self dead hit) + (or (logtest? (target-flags tf2 tinvuln1 tf5 tinvuln2 invisible) (-> self target-flags)) + (-> *setting-control* user-current ignore-target) + ) + ) + (logior! (-> self focus-status) (focus-status ignore)) + (logclear! (-> self focus-status) (focus-status ignore)) + ) + (cond + ((or (and (logtest? (-> self control mod-surface flags) (surface-flag air)) + (not (logtest? (-> self control status) (collide-status on-surface))) + ) + (and (focus-test? self board) (not (time-elapsed? (-> self board last-jump-time) (seconds 0.1)))) + ) + (logior! (-> self focus-status) (focus-status in-air)) + (if (logtest? (surface-flag super) (-> self control current-surface flags)) + (logior! (-> self focus-status) (focus-status super)) + ) + ) + (else + (logclear! (-> self focus-status) (focus-status in-air)) + ) + ) + (if (using-gun? self) + (logior! (-> self focus-status) (focus-status gun)) + (logclear! (-> self focus-status) (focus-status gun)) + ) + (if (or (logtest? (water-flag touch-water) (-> self water flags)) + (logtest? (-> self control status) (collide-status on-water)) + ) + (logior! (-> self focus-status) (focus-status touch-water)) + (logclear! (-> self focus-status) (focus-status touch-water)) + ) + (if (logtest? (-> self control status) (collide-status on-water)) + (logior! (-> self focus-status) (focus-status on-water)) + (logclear! (-> self focus-status) (focus-status on-water)) + ) + (if (and (logtest? (-> self water flags) (water-flag under-water)) + (not (logtest? (-> self water flags) (water-flag swim-ground))) + ) + (logior! (-> self focus-status) (focus-status under-water)) + (logclear! (-> self focus-status) (focus-status under-water)) + ) + (if (not (time-elapsed? (-> self gun fire-time) (seconds 0.1))) + (logior! (-> self focus-status) (focus-status shooting)) + (logclear! (-> self focus-status) (focus-status shooting)) + ) + 0 + (none) + ) + +(defbehavior target-powerup-effect target ((arg0 symbol)) + (case arg0 + (('eco-blue) + (let ((v1-4 (rand-vu-int-range 3 (+ (-> self node-list length) -1)))) + (eco-blue-glow (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data v1-4))) + ) + ) + ) + 0 + (none) + ) + +(defbehavior process-contact-action target ((arg0 process)) + (when (logtest? (-> *game-info* features) (game-feature feature0)) + (cond + (arg0 + (+! (-> self clock ref-count) -1) + (+! (-> arg0 clock ref-count) 1) + (set! (-> self clock) (-> arg0 clock)) + ) + (else + (+! (-> self clock ref-count) -1) + (+! (-> *display* base-clock ref-count) 1) + (set! (-> self clock) (-> *display* base-clock)) + ) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/common-obs/prim-beam-h.gc b/goal_src/jak3/engine/common-obs/prim-beam-h.gc index cb3c42e0de..dd1bdd6d8d 100644 --- a/goal_src/jak3/engine/common-obs/prim-beam-h.gc +++ b/goal_src/jak3/engine/common-obs/prim-beam-h.gc @@ -5,5 +5,40 @@ ;; name in dgo: prim-beam-h ;; dgos: GAME +(declare-type prim-beam process) +(declare-type prim-beam-tracker prim-beam) +(declare-type prim-beam-params structure) +(declare-type prim-beam-tracker-params prim-beam-params) + +(define-extern prim-beam-tracker-init-by-other (function prim-beam-tracker-params object :behavior prim-beam-tracker)) +(define-extern spawn-prim-beam-tracker (function prim-beam-tracker-params symbol process handle)) + + ;; DECOMP BEGINS +(deftype prim-beam-settings (structure) + ((width float) + (color rgba) + (alpha float) + (tex-id uint32) + (num-tiles float) + ) + ) + + +(deftype prim-beam-params (structure) + ((appearance prim-beam-settings) + ) + ) + + +(deftype prim-beam-tracker-params (prim-beam-params) + ((track-obj1 handle) + (track-obj2 handle) + (track-joint1 int32) + (track-joint2 int32) + (pos0 vector) + (pos1 vector) + (duration time-frame) + ) + ) diff --git a/goal_src/jak3/engine/common-obs/prim-h.gc b/goal_src/jak3/engine/common-obs/prim-h.gc index c0f27cd27b..625ec88562 100644 --- a/goal_src/jak3/engine/common-obs/prim-h.gc +++ b/goal_src/jak3/engine/common-obs/prim-h.gc @@ -8,13 +8,14 @@ (defenum prim-flags :type uint32 :bitfield #t - (pf0 0) ;; set by default - (pf1 1) ;; set by default - (pf2 2) - (pf3 3) - (pf4 4) + (alpha-blend-enable 0) ;; set by default + (texture-enable 1) ;; set by default + (fog-enable 2) + (pf3 3) ;; auto-clear vertices? + (pf4 4) ;; has new verts to draw? (no-texture-name 5) ;; only has the ID. ) + (define-extern process-drawable-art-error (state string process-drawable)) (define-extern *prim-engine* engine) @@ -35,7 +36,7 @@ some special effect code, then sent to the prim renderer to be drawn." "Base class for prim-strip." () (:methods - (prim-base-method-9 () none) + (generate-dma! (_type_ matrix) none) ) ) @@ -63,7 +64,7 @@ These are owned by the thing submitting to prim, not the prim renderer itself." ) (:methods (new (symbol type int texture-id string) _type_) - (prim-strip-method-10 (_type_ draw-control) none) + (setup-dma-and-tex (_type_ draw-control) none) ) ) @@ -76,7 +77,7 @@ These are owned by the thing submitting to prim, not the prim renderer itself." (go process-drawable-art-error "prim-strip") ) (add-connection *prim-engine* pp #f pp s5-0 #f) - (set! (-> s5-0 flags) (prim-flags pf0 pf1)) + (set! (-> s5-0 flags) (prim-flags alpha-blend-enable texture-enable)) (set! (-> s5-0 num-verts) (the-as uint num-vertices)) (set! (-> s5-0 allocated-num-verts) (the-as uint num-vertices)) (set! (-> s5-0 data0) (new 'static 'gs-test)) @@ -147,10 +148,10 @@ These are owned by the thing submitting to prim, not the prim renderer itself." (mask vector4w :inline) (in-verts int32) (num-verts int32) - (vert-ptr prim-vertex) + (vert-ptr (inline-array prim-vertex)) (sinks prim-sink 68 :inline) ) (:methods - (prim-work-method-9 () none) + (reset! (_type_) none) ) ) diff --git a/goal_src/jak3/engine/common-obs/prim.gc b/goal_src/jak3/engine/common-obs/prim.gc index 9e06e24806..4cd1d02a76 100644 --- a/goal_src/jak3/engine/common-obs/prim.gc +++ b/goal_src/jak3/engine/common-obs/prim.gc @@ -5,5 +5,124 @@ ;; name in dgo: prim ;; dgos: GAME +;; for now, I made the DMA generation mips2c +;; it's probably possible to rewrite in GOAL, or just totally redo. +;; we'll have to see how much is drawn with this. +;; somewhat annoyingly, it seems to resue generic buckets... + ;; DECOMP BEGINS +(define *prim-work* + (new 'static 'prim-work + :vertex-tmpl (new 'static 'inline-array dma-packet 3 + (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x9 :cmd (vif-cmd unpack-v4-32)) + ) + (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x120 :cmd (vif-cmd unpack-v4-32)) + ) + (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x237 :cmd (vif-cmd unpack-v4-32)) + ) + ) + :control-tmpl (new 'static 'inline-array dma-packet 2 + (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #xc :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x345 :num #xc :cmd (vif-cmd unpack-v4-32)) + ) + (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #xc :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x363 :num #xc :cmd (vif-cmd unpack-v4-32)) + ) + ) + :giftag (new 'static 'generic-gif-tag + :fan-prim (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + :str-prim (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + :regs (new 'static 'gif-tag-regs-32 :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + :num-strips #x1 + ) + :call-scissor (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd mscalf) :msk #x1) + ) + :call-noclip (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :imm #x8 :cmd (vif-cmd mscalf) :msk #x1) + ) + :mask (new 'static 'vector4w :x -2 :y -1 :z -1) + ) + ) + +(defmethod reset! ((this prim-work)) + "Reset all pending vertex/control data." + (dotimes (v1-0 68) + (let ((a1-2 (-> this sinks v1-0))) + (set! (-> a1-2 vertex-count) (the-as uint 0)) + (set! (-> a1-2 control-count) (the-as uint 0)) + ) + 0 + ) + 0 + (none) + ) + +(defmethod-mips2c "(method 9 prim-strip)" 9 prim-strip) + +(defmethod setup-dma-and-tex ((this prim-strip) (arg0 draw-control)) + "Set up the bucket, prim sink, and texture." + (let ((s5-0 (-> *level* level (-> arg0 level-index)))) + (let ((s2-0 (-> s5-0 draw-index)) + (s4-0 (-> arg0 default-texture-page)) + ) + (let ((s3-0 (vu1-bucket-map s2-0 (the-as int s4-0) (merc-mode mercneric2))) + (v1-3 (vu1-bucket-map s2-0 (the-as int s4-0) (merc-mode mm5))) + ) + (set! (-> this bucket) s3-0) + (set! (-> this sink) (the-as uint v1-3)) + ) + (set! (-> this level) s5-0) + (set! (-> this texture-index) s4-0) + ) + (when (not (logtest? (-> this flags) (prim-flags no-texture-name))) + (set! (-> this tex-id) + (lookup-level-texture-id-by-name (the-as string (-> this tex-name)) s5-0 (the-as int (-> this texture-index))) + ) + (logior! (-> this flags) (prim-flags no-texture-name)) + ) + ) + 0 + (none) + ) + +(defun prim-engine-execute () + "Generate all prim DMA." + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask generic)) + (when (not (get-menu-mode *blit-displays-work*)) + (let* ((gp-0 *prim-engine*) + (s5-0 (-> *math-camera* camera-temp)) + (v1-9 (-> gp-0 alive-list next0)) + (s4-0 (-> (the-as connection v1-9) next0)) + ) + (while (!= v1-9 (-> gp-0 alive-list-end)) + (-> (the-as connection v1-9) param1) + (generate-dma! (the-as prim-strip (-> (the-as connection v1-9) param2)) s5-0) + (set! v1-9 s4-0) + (set! s4-0 (-> s4-0 next0)) + ) + ) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/common-obs/proc-focusable-spawner.gc b/goal_src/jak3/engine/common-obs/proc-focusable-spawner.gc index 8b407d3d4d..40aa73a56a 100644 --- a/goal_src/jak3/engine/common-obs/proc-focusable-spawner.gc +++ b/goal_src/jak3/engine/common-obs/proc-focusable-spawner.gc @@ -7,3 +7,162 @@ ;; DECOMP BEGINS +(deftype proc-focusable-spawn-record (structure) + "A record of a [[process-focusable]] that was created by a spawner." + ((proc handle) + (index int16) + (dead-time time-frame) + ) + ) + + +(deftype proc-focusable-spawn-record-array (inline-array-class) + ((data proc-focusable-spawn-record :inline :dynamic) + ) + ) + + +(set! (-> proc-focusable-spawn-record-array heap-base) (the-as uint 32)) + +(deftype proc-focusable-spawner (basic) + "A [[process-focusable]] spawner. Keeps track of spawned processes and cleans up inactive ones." + ((records proc-focusable-spawn-record-array) + (unused-list (array int8)) + ) + (:methods + (alloc-records! (_type_ int symbol) none) + (get-last-unused-handle! (_type_) handle) + (get-last-unused-val! (_type_) int) + (mark-unused! (_type_ handle) int) + (init-records! (_type_) none) + (add-unused! (_type_ int) none) + (check-inactive (_type_) symbol) + (reset-and-kill-all! (_type_) none) + ) + ) + + +(defmethod alloc-records! ((this proc-focusable-spawner) (count int) (allocation symbol)) + "Allocate records and unused list." + (set! (-> this records) + ((method-of-type proc-focusable-spawn-record-array new) allocation proc-focusable-spawn-record-array count) + ) + (set! (-> this unused-list) (the-as (array int8) ((method-of-type array new) allocation array int8 count))) + (init-records! this) + (none) + ) + +(defmethod relocate ((this proc-focusable-spawner) (offset int)) + (if (nonzero? (-> this records)) + (&+! (-> this records) offset) + ) + (if (nonzero? (-> this unused-list)) + (&+! (-> this unused-list) offset) + ) + (call-parent-method this offset) + ) + +(defmethod init-records! ((this proc-focusable-spawner)) + "Initialize the records list." + (dotimes (v1-0 (-> this records allocated-length)) + (set! (-> this unused-list v1-0) v1-0) + (set! (-> this records data v1-0 proc) (the-as handle #f)) + (set! (-> this records data v1-0 index) v1-0) + (set! (-> this records data v1-0 dead-time) 0) + ) + (set! (-> this unused-list length) (-> this unused-list allocated-length)) + (none) + ) + +(defmethod get-last-unused-val! ((this proc-focusable-spawner)) + "Get the last value in the unused list and decrement size." + (cond + ((<= (-> this unused-list length) 0) + -1 + ) + (else + (let ((v0-0 (-> this unused-list (+ (-> this unused-list length) -1)))) + (+! (-> this unused-list length) -1) + v0-0 + ) + ) + ) + ) + +(defmethod get-last-unused-handle! ((this proc-focusable-spawner)) + "Get the handle for the last element in the unused list and decrement the unused list size." + (local-vars (v1-6 int)) + (cond + ((<= (-> this unused-list length) 0) + (the-as handle #f) + ) + ((begin (set! v1-6 (-> this unused-list (+ (-> this unused-list length) -1))) #t) + (+! (-> this unused-list length) -1) + (-> this records data v1-6 proc) + ) + (else + (the-as handle #f) + ) + ) + ) + +(defmethod add-unused! ((this proc-focusable-spawner) (arg0 int)) + "Add the given value to the unused list." + (set! (-> this records data arg0 dead-time) (+ (current-time) (seconds 1))) + (set! (-> this unused-list (-> this unused-list length)) arg0) + (+! (-> this unused-list length) 1) + (none) + ) + +(defmethod mark-unused! ((this proc-focusable-spawner) (arg0 handle)) + "Add this handle to the unused list." + (dotimes (v1-0 (-> this records length)) + (when (= (-> this records data v1-0 proc) arg0) + (add-unused! this v1-0) + (return 0) + ) + ) + (the-as int #f) + ) + +(defmethod check-inactive ((this proc-focusable-spawner)) + "Check for inactive processes and add them to the unused list." + (local-vars (v1-10 symbol)) + (dotimes (i (-> this records length)) + (let* ((proc (handle->process (-> this records data i proc))) + (pfoc (if (type? proc process-focusable) + proc + ) + ) + ) + (when (or (not pfoc) (focus-test? (the-as process-focusable pfoc) inactive)) + (dotimes (ii (-> this unused-list length)) + (when (= (-> this unused-list ii) i) + (set! v1-10 #t) + (goto cfg-19) + ) + ) + (set! v1-10 #f) + (label cfg-19) + (if (not v1-10) + (add-unused! this i) + ) + ) + ) + ) + #f + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod reset-and-kill-all! ((this proc-focusable-spawner)) + "Reset the records list and deactivate all remaining active processes." + (dotimes (s5-0 (-> this records length)) + (let ((a0-3 (handle->process (-> this records data s5-0 proc)))) + (when a0-3 + (deactivate a0-3) + (set! (-> this records data s5-0 proc) (the-as handle #f)) + ) + ) + ) + (none) + ) diff --git a/goal_src/jak3/engine/common-obs/projectile-h.gc b/goal_src/jak3/engine/common-obs/projectile-h.gc index e3ee11c3aa..d2300a8829 100644 --- a/goal_src/jak3/engine/common-obs/projectile-h.gc +++ b/goal_src/jak3/engine/common-obs/projectile-h.gc @@ -84,7 +84,7 @@ (sound-id sound-id) (stop-speed meters) (invinc-time time-frame) - (desired-target uint64) + (desired-target handle) (desired-target-pos vector :inline) ) (:state-methods @@ -101,11 +101,11 @@ (play-impact-sound (_type_ projectile-options) none) (projectile-method-29 (_type_) none) (setup-collision! (_type_) none) - (projectile-method-31 (_type_) none) + (init-proj-settings! (_type_) none) (projectile-method-32 (_type_) none) (go-impact! (_type_) none) (projectile-method-34 (_type_) none) - (event-handler! (_type_ process int symbol event-message-block) object) + (proj-event-handler (_type_ process int symbol event-message-block) object) (handle-proj-hit! (_type_ process event-message-block) object) (deal-damage! (_type_ process event-message-block) symbol) (made-impact? (_type_) symbol) @@ -119,7 +119,7 @@ ((pos vector :inline) (vel vector :inline) (target-pos vector :inline) - (target-handle uint64) + (target-handle handle) (ent entity) (charge float) (attack-id uint32) @@ -137,15 +137,7 @@ (defun spawn-projectile ((proj-type type) (params projectile-init-by-other-params) (parent-proc-tree process-tree) (pool dead-pool)) "Create a new process for a projectile of the given type." - (let ((s4-0 (get-process pool proj-type #x4000 1))) - (when s4-0 - (let ((t9-1 (method-of-type process activate))) - (t9-1 s4-0 parent-proc-tree "projectile" (the-as pointer #x70004000)) - ) - (run-now-in-process s4-0 projectile-init-by-other params) - (-> s4-0 ppointer) - ) - ) + (process-spawn proj-type :runtime #t :name "projectile" :from pool :to parent-proc-tree :init projectile-init-by-other params) ) (deftype projectile-bounce (projectile) diff --git a/goal_src/jak3/engine/common-obs/projectile.gc b/goal_src/jak3/engine/common-obs/projectile.gc index f80ebd1798..a8130f6a12 100644 --- a/goal_src/jak3/engine/common-obs/projectile.gc +++ b/goal_src/jak3/engine/common-obs/projectile.gc @@ -23,7 +23,7 @@ (none) ) -(defmethod event-handler! ((this projectile) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) +(defmethod proj-event-handler ((this projectile) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (case arg2 (('tracked) (let ((v0-0 (the-as object (process->handle (the-as process (-> arg3 param 0)))))) @@ -42,7 +42,7 @@ ;; WARN: Return type mismatch object vs projectile. (defbehavior projectile-event-handler projectile ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) - (the-as projectile (event-handler! self arg0 arg1 arg2 arg3)) + (the-as projectile (proj-event-handler self arg0 arg1 arg2 arg3)) ) ;; WARN: Return type mismatch object vs symbol. @@ -368,7 +368,7 @@ ) ) -(defmethod projectile-method-31 ((this projectile)) +(defmethod init-proj-settings! ((this projectile)) 0 (none) ) @@ -477,7 +477,8 @@ ) (logior! (-> self options) (projectile-options po4)) (setup-collision! self) - (let ((s5-0 (-> self root))) + (let ((s5-0 (-> self root)) + (parent (-> self parent 0))) (when (type? s5-0 collide-shape-moving) (set! (-> self root dynam gravity y) 1228800.0) (set! (-> self root dynam gravity-length) 1228800.0) @@ -487,7 +488,13 @@ (logclear! (-> self mask) (process-mask enemy)) (set! (-> s5-0 trans quad) (-> arg0 pos quad)) (set! (-> self starting-pos quad) (-> arg0 pos quad)) - (quaternion-copy! (-> s5-0 quat) (-> self parent 0 root quat)) + ;; og:preserve-this + ;; some projectiles have their parent set as *rigid-body-queue-manager*, + ;; which is not a process-drawable, so we use its own parent + ;; (usually the vehicle firing the projectile) to set the quat instead. + ;; on original hardware, this would not crash because misaligned qw loads silently mask the lower bits + ;; of the address, loading a junk value instead. + (quaternion-copy! (-> s5-0 quat) (the-as quaternion (align16 (+ -16 (the-as int (-> self parent 0 root quat)))))) (vector-identity! (-> s5-0 scale)) (set! (-> s5-0 transv quad) (-> arg0 vel quad)) (set! (-> self pre-move-transv quad) (-> arg0 vel quad)) @@ -496,7 +503,7 @@ ) (set! (-> self target-pos quad) (-> self base-target-pos quad)) (set! (-> self event-hook) projectile-event-handler) - (projectile-method-31 self) + (init-proj-settings! self) (update-transforms (-> self root)) (projectile-method-24 self) (play-impact-sound self (projectile-options)) @@ -532,20 +539,20 @@ (projectile-bounce-update-velocity self) (set! (-> s5-0 quad) (-> gp-0 trans quad)) (vector-v++! s5-0 (-> gp-0 transv)) - (let* ((a0-4 gp-0) - (t9-2 (method-of-object a0-4 find-ground)) - (a2-0 #x100249) - (a3-0 4096.0) - (t0-0 81920.0) - (t1-0 1024.0) - ) - (when (t9-2 a0-4 s4-0 (the-as collide-spec a2-0) a3-0 t0-0 t1-0) - (let ((f30-0 (+ (-> gp-0 gspot-pos y) (-> self root root-prim local-sphere w)))) - (when (>= f30-0 (-> s5-0 y)) - (projectile-bounce-method-43 self) - (set! (-> s5-0 y) f30-0) - (vector-reset! (-> gp-0 transv)) + (when (find-ground + gp-0 + s4-0 + (collide-spec backgnd crate obstacle hit-by-others-list pusher) + 4096.0 + 81920.0 + 1024.0 + (the-as process #f) ) + (let ((f30-0 (+ (-> gp-0 gspot-pos y) (-> self root root-prim local-sphere w)))) + (when (>= f30-0 (-> s5-0 y)) + (projectile-bounce-method-43 self) + (set! (-> s5-0 y) f30-0) + (vector-reset! (-> gp-0 transv)) ) ) ) @@ -663,7 +670,7 @@ (none) ) -(defmethod projectile-method-31 ((this projectile-bounce)) +(defmethod init-proj-settings! ((this projectile-bounce)) (set! (-> this max-speed) 450560.0) (set! (-> this timeout) (seconds 1.6)) (set! (-> this update-velocity) projectile-bounce-update-velocity) diff --git a/goal_src/jak3/engine/common-obs/ragdoll-test.gc b/goal_src/jak3/engine/common-obs/ragdoll-test.gc index 6700cb5197..e368f85bcb 100644 --- a/goal_src/jak3/engine/common-obs/ragdoll-test.gc +++ b/goal_src/jak3/engine/common-obs/ragdoll-test.gc @@ -7,3 +7,341 @@ ;; DECOMP BEGINS +;; this file is debug only +(declare-file (debug)) + +(defskelgroup skel-ragdoll-test wlander-male wlander-male-lod0-jg wlander-male-ragdoll-ja + ((wlander-male-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(define *ragdoll-test-ragdoll-setup* (new 'static 'ragdoll-setup + :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) + (new 'static 'ragdoll-joint-setup :joint-index 4 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 5 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 6 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 7 :parent-joint 4) + (new 'static 'ragdoll-joint-setup :joint-index 8 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 9 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 10 :parent-joint 4) + (new 'static 'ragdoll-joint-setup :joint-index 11 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 12 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 13 :parent-joint 3) + (new 'static 'ragdoll-joint-setup :joint-index 14 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 15 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 16 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 17 :parent-joint 13) + (new 'static 'ragdoll-joint-setup :joint-index 18 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 19 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 20 :parent-joint 2) + (new 'static 'ragdoll-joint-setup :joint-index 21 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 22 :parent-joint 12) + (new 'static 'ragdoll-joint-setup :joint-index 23 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 24 :parent-joint 12) + (new 'static 'ragdoll-joint-setup :joint-index 25 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 26 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 27 :parent-joint 16) + (new 'static 'ragdoll-joint-setup :joint-index 28 :parent-joint 19) + ) + ) + ) + +(deftype ragdoll-test (process-focusable) + ((ragdoll-proc handle) + ) + (:state-methods + reform + tweak + freefall-reform + freefall + idle + ) + ) + + +(defstate reform (ragdoll-test) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :exit (behavior () + (cond + ((!= *external-cam-mode* 'locked) + ) + (*target* + (set! *external-cam-mode* #f) + ) + (else + (set! *external-cam-mode* 'pad-0) + ) + ) + ) + :trans (behavior () + (ja :num! (loop!)) + (let ((gp-0 (handle->process (-> self ragdoll-proc)))) + (when gp-0 + (if (nonzero? *ragdoll-edit-info*) + (ragdoll-proc-method-18 (the-as ragdoll-proc gp-0) *ragdoll-edit-info*) + ) + (ragdoll-proc-method-17 (the-as ragdoll-proc gp-0) *ragdoll-edit-info*) + (let ((v1-14 (-> (the-as ragdoll-proc gp-0) ragdoll))) + (if (or (zero? v1-14) (= (-> v1-14 flex-blend) 0.0)) + (go-virtual idle) + ) + ) + ) + ) + (format *stdcon* "~%press r2 to advance single-step~%") + ) + :code sleep-code + :post transform-post + ) + +(defstate tweak (ragdoll-test) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((v1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> v1-1 from) (process->ppointer proc)) + (set! (-> v1-1 num-params) argc) + (set! (-> v1-1 message) message) + (set! (-> v1-1 param 0) (-> block param 0)) + (set! (-> v1-1 param 1) (-> block param 1)) + (set! (-> v1-1 param 2) (-> block param 2)) + (set! (-> v1-1 param 3) (-> block param 3)) + (set! (-> v1-1 param 4) (-> block param 4)) + (set! (-> v1-1 param 5) (-> block param 5)) + (send-event-function (handle->process (-> self ragdoll-proc)) v1-1) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (let ((a0-1 (handle->process (-> self ragdoll-proc)))) + (if a0-1 + (ragdoll-proc-method-15 (the-as ragdoll-proc a0-1) #f (the-as vector #f) #t) + ) + ) + (vector-reset! (-> self root transv)) + ) + :exit (behavior () + (let ((a0-1 (handle->process (-> self ragdoll-proc)))) + (if a0-1 + (disable-for-duration (the-as ragdoll-proc a0-1) (seconds 0.25)) + ) + ) + (if (= *external-cam-mode* 'locked) + (set! *external-cam-mode* 'pad-0) + ) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) 1) (cpad-pressed? 0 r3)) + (go-virtual reform) + ) + (let ((gp-0 (handle->process (-> self ragdoll-proc)))) + (when gp-0 + (when (nonzero? *ragdoll-edit-info*) + (ragdoll-proc-method-18 (the-as ragdoll-proc gp-0) *ragdoll-edit-info*) + (if (-> (the-as ragdoll-proc gp-0) ragdoll) + (logclear! (-> (the-as ragdoll-proc gp-0) ragdoll ragdoll-flags) (ragdoll-flag rf2)) + ) + ) + (ragdoll-proc-method-17 (the-as ragdoll-proc gp-0) *ragdoll-edit-info*) + ) + ) + ) + :code sleep-code + :post transform-post + ) + +(defstate freefall-reform (ragdoll-test) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (ja :num! (loop!)) + (let ((gp-0 (handle->process (-> self ragdoll-proc)))) + (when gp-0 + (ragdoll-proc-method-17 (the-as ragdoll-proc gp-0) (the-as ragdoll-edit-info 0)) + (let ((v1-9 (-> (the-as ragdoll-proc gp-0) ragdoll))) + (if (or (zero? v1-9) (= (-> v1-9 flex-blend) 0.0)) + (go-virtual idle) + ) + ) + ) + ) + ) + :code sleep-code + :post transform-post + ) + +(defstate freefall (ragdoll-test) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((v1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> v1-1 from) (process->ppointer proc)) + (set! (-> v1-1 num-params) argc) + (set! (-> v1-1 message) message) + (set! (-> v1-1 param 0) (-> block param 0)) + (set! (-> v1-1 param 1) (-> block param 1)) + (set! (-> v1-1 param 2) (-> block param 2)) + (set! (-> v1-1 param 3) (-> block param 3)) + (set! (-> v1-1 param 4) (-> block param 4)) + (set! (-> v1-1 param 5) (-> block param 5)) + (send-event-function (handle->process (-> self ragdoll-proc)) v1-1) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (let ((a0-1 (handle->process (-> self ragdoll-proc)))) + (if a0-1 + (ragdoll-proc-method-15 (the-as ragdoll-proc a0-1) #f (the-as vector #f) #t) + ) + ) + (vector-reset! (-> self root transv)) + ) + :exit (behavior () + (let ((a0-1 (handle->process (-> self ragdoll-proc)))) + (if a0-1 + (disable-for-duration (the-as ragdoll-proc a0-1) (seconds 0.25)) + ) + ) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) 1) (cpad-pressed? 0 triangle)) + (go-virtual freefall-reform) + ) + (let ((a0-7 (handle->process (-> self ragdoll-proc)))) + (if a0-7 + (ragdoll-proc-method-17 (the-as ragdoll-proc a0-7) (the-as ragdoll-edit-info 0)) + ) + ) + (format *stdcon* "press triangle to edit ragdoll~%") + ) + :code sleep-code + :post transform-post + ) + +(defstate idle (ragdoll-test) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (cond + ((not (time-elapsed? (-> self state-time) 1)) + ) + (else + (format *stdcon* "up: reinit ragdoll~%") + (format *stdcon* "l2: reset position~%") + (format *stdcon* "rpush: edit ragdoll~%") + (format *stdcon* "triangle: run ragdoll~%") + (if (= (-> self node-list data 2 param0) cspace<-parented-matrix-joint-flip-z!) + (format *stdcon* "x: stop mirroring~%") + (format *stdcon* "x: mirror~%") + ) + (when (cpad-pressed? 0 up) + (let ((v1-13 (handle->process (-> self ragdoll-proc)))) + (when v1-13 + (if (nonzero? (-> (the-as ragdoll-proc v1-13) ragdoll)) + (ragdoll-setup! (-> (the-as ragdoll-proc v1-13) ragdoll) self *ragdoll-test-ragdoll-setup*) + ) + ) + ) + ) + (when (cpad-pressed? 0 l2) + (cond + ((-> self entity) + (set! (-> self root trans quad) (-> self entity trans quad)) + ) + (else + (vector-reset! (-> self root trans)) + (set! (-> self root trans y) -163840.0) + ) + ) + (quaternion-identity! (-> self root quat)) + ) + (if (cpad-pressed? 0 r3) + (go-virtual tweak) + ) + (if (cpad-pressed? 0 triangle) + (go-virtual freefall) + ) + (when (cpad-pressed? 0 x) + (cond + ((= (-> self node-list data 2 param0) cspace<-parented-matrix-joint-flip-z!) + (let ((v1-54 (-> self node-list data 2))) + (set! (-> v1-54 param0) (the-as (function cspace transformq none) cspace<-parented-matrix-joint!)) + (set! (-> v1-54 param1) #f) + (set! (-> v1-54 param2) #f) + ) + ) + (else + (let ((v1-56 (-> self node-list data 2))) + (set! (-> v1-56 param0) (the-as (function cspace transformq none) cspace<-parented-matrix-joint-flip-z!)) + (set! (-> v1-56 param1) #f) + (set! (-> v1-56 param2) #f) + ) + ) + ) + ) + (set! (-> (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat)) trans quad) + (-> self root trans quad) + ) + ) + ) + (ja :num! (loop!)) + ) + :code sleep-code + :post transform-post + ) + +(defbehavior ragdoll-test-init-by-other ragdoll-test ((arg0 ragdoll-setup) (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-sphere s5-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 bot hit-by-others-list 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 4096.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 event-self) 'touched) + (set! (-> self root) s5-0) + ) + (set! (-> self root trans quad) (-> arg0 orient-tform quad)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-ragdoll-test" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logior! (-> self mask) (process-mask enemy)) + (set! (-> self ragdoll-proc) + (ppointer->handle + (process-spawn ragdoll-proc *ragdoll-test-ragdoll-setup* :name "ragdoll-proc" :to self :stack-size #x5000) + ) + ) + (go-virtual idle) + ) 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 f5764c380c..12e4b5667c 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/scene-actor.gc b/goal_src/jak3/engine/common-obs/scene-actor.gc index df14361fa9..9a132ef4be 100644 --- a/goal_src/jak3/engine/common-obs/scene-actor.gc +++ b/goal_src/jak3/engine/common-obs/scene-actor.gc @@ -7,3 +7,1641 @@ ;; DECOMP BEGINS +(defskelgroup skel-scenecamera scenecamera scenecamera-lod0-jg -1 + ((scenecamera-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :texture-level 10 + ) + +(defskelgroup skel-particleman particleman particleman-lod0-jg -1 + ((particleman-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :shadow-joint-index 3 + ) + +(defskelgroup skel-darkjak-highres darkjak-highres darkjak-highres-lod0-jg -1 + ((darkjak-highres-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3.2) + :longest-edge (meters 1) + :shadow-joint-index 3 + :light-index 1 + :clothing (((mesh darkjak-highres-jakcfma0-skirt-cg) + (gravity-constant (meters 16)) + (wind-constant 0.5) + (cloth-width 13) + (flags (cloth-flag use-wind double-sided)) + (tex-name "jakc-skirt") + (tex-name2 "jakc-skirt") + (tex-name3 "jakc-skirt") + (cloth-thickness 1.0) + (initial-xform 3) + (drag 0.151) + (ball-collision-radius (meters 0.05)) + (num-iterations 1) + (timestep-frequency 7) + ) + ((mesh darkjak-highres-jakcfma0-sash-cg) + (gravity-constant (meters 32)) + (wind-constant 0.75) + (cloth-width 6) + (flags (cloth-flag use-wind double-sided)) + (tex-name "jakc-skirt") + (tex-name2 "jakc-skirt") + (tex-name3 "jakc-skirt") + (cloth-thickness 1.0) + (initial-xform 3) + (drag 0.251) + (ball-collision-radius (meters 0.05)) + (num-iterations 1) + (timestep-frequency 7) + ) + ((mesh darkjak-highres-jakcfma0-scarf-cg) + (gravity-constant (meters 16)) + (wind-constant 1.25) + (cloth-width 6) + (flags (cloth-flag use-wind double-sided)) + (tex-name "jakc-scarfhanging") + (tex-name2 "jakc-scarfhanging") + (tex-name3 "jakc-scarfhanging") + (cloth-thickness 2.0) + (initial-xform 4) + (drag 0.151) + (ball-collision-radius (meters 0.05)) + (num-iterations 1) + (timestep-frequency 7) + ) + ) + ) + +(defskelgroup skel-pecker-highres pecker-highres pecker-highres-lod0-jg pecker-highres-idle-ja + ((pecker-highres-lod0-mg (meters 200))) + :bounds (static-spherem 0 0 0 5) + :shadow pecker-highres-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +(deftype pecker-npc (process-taskable) + () + ) + + +(defmethod get-art-element ((this pecker-npc)) + (-> this draw art-group data 3) + ) + +(defmethod init-skeleton! ((this pecker-npc)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-pecker-highres" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this draw light-index) (the-as uint 30)) + 0 + (none) + ) + +(defskelgroup skel-veger-highres veger-highres veger-highres-lod0-jg veger-highres-idle-ja + ((veger-highres-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2.5) + :shadow veger-highres-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + :clothing (((mesh veger-highres-veger-coatL-cg) + (gravity-constant (meters 36)) + (wind-constant 1.0) + (cloth-width 10) + (flags (cloth-flag use-wind double-sided)) + (tex-name "veger-coat") + (tex-name2 "veger-coat") + (tex-name3 "veger-coat") + (cloth-thickness 1.0) + (initial-xform 3) + (drag 0.051) + (num-iterations 1) + ) + ((mesh veger-highres-veger-coatR-cg) + (gravity-constant (meters 36)) + (wind-constant 1.0) + (cloth-width 10) + (flags (cloth-flag use-wind double-sided)) + (tex-name "veger-coat") + (tex-name2 "veger-coat") + (tex-name3 "veger-coat") + (cloth-thickness 1.0) + (initial-xform 3) + (drag 0.051) + (num-iterations 1) + ) + ) + ) + +(deftype veger-npc (process-taskable) + () + ) + + +(defmethod init-skeleton! ((this veger-npc)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-veger-highres" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this draw light-index) (the-as uint 30)) + 0 + (none) + ) + +(defmethod get-art-element ((this veger-npc)) + (case (-> this task actor) + (((game-task-actor veger-cave)) + (logior! (-> this draw status) (draw-control-status no-draw-bounds)) + (let ((v1-7 (-> this root root-prim))) + (set! (-> v1-7 prim-core collide-as) (collide-spec)) + (set! (-> v1-7 prim-core collide-with) (collide-spec)) + ) + 0 + ) + ) + (-> this draw art-group data 5) + ) + +(defskelgroup skel-ashelin-highres ashelin-highres ashelin-highres-lod0-jg ashelin-highres-idle-stand-ja + ((ashelin-highres-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + :shadow ashelin-highres-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +(deftype ashelin-npc (process-taskable) + () + ) + + +(defmethod init-skeleton! ((this ashelin-npc)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-ashelin-highres" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this draw light-index) (the-as uint 30)) + 0 + (none) + ) + +(defmethod get-art-element ((this ashelin-npc)) + (case (-> this task actor) + (((game-task-actor ashelin-oasis)) + ) + ) + (-> this draw art-group data 4) + ) + +(defskelgroup skel-damus-highres king-highres king-highres-lod0-jg king-highres-idle-ja + ((king-highres-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2.5) + :shadow king-highres-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + :clothing (((mesh king-highres-king-kingskirt-cg) + (gravity-constant (meters 12)) + (cloth-width 13) + (flags (cloth-flag use-wind double-sided flip-normals)) + (tex-name "king-skirt-b") + (tex-name2 "king-skirt-b") + (tex-name3 "king-skirt-b") + (cloth-thickness 1.3) + (initial-xform 3) + (drag 0.051) + (num-iterations 1) + ) + ) + ) + +(deftype damus-npc (process-taskable) + () + ) + + +(defmethod get-art-element ((this damus-npc)) + (case (-> this task actor) + (((game-task-actor damus-wasdoors)) + (-> this draw art-group data 9) + ) + (else + (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 4))) + (-> this draw art-group data 5) + ) + ((let ((v1-14 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (and v1-14 (= v1-14 (-> this draw art-group data 5))) + ) + (if (= (the int (ja-aframe-num 0)) 14) + (-> this draw art-group data 6) + (-> this draw art-group data 5) + ) + ) + ((let ((v1-25 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (and v1-25 (= v1-25 (-> this draw art-group data 6))) + ) + (if (and (= (the int (ja-aframe-num 0)) 44) (rand-vu-percent? 0.1)) + (-> this draw art-group data 7) + (-> this draw art-group data 6) + ) + ) + ((let ((v1-38 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (and v1-38 (= v1-38 (-> this draw art-group data 7))) + ) + (if (= (the int (ja-aframe-num 0)) 54) + (-> this draw art-group data 8) + (-> this draw art-group data 7) + ) + ) + ((let ((v1-49 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (and v1-49 (= v1-49 (-> this draw art-group data 8))) + ) + (if (and (= (the int (ja-aframe-num 0)) 84) (rand-vu-percent? 0.1)) + (-> this draw art-group data 5) + (-> this draw art-group data 8) + ) + ) + ) + ) + ) + ) + ) + +(defmethod init-skeleton! ((this damus-npc)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-damus-highres" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this draw light-index) (the-as uint 30)) + 0 + (none) + ) + +(defskelgroup skel-crimson-guard-highres crimson-guard-highres crimson-guard-highres-lod0-jg -1 + ((crimson-guard-highres-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3) + :shadow crimson-guard-highres-shadow-mg + :shadow-joint-index 3 + ) + +(defskelgroup skel-torn-highres torn-highres torn-highres-lod0-jg torn-highres-idle-ja + ((torn-highres-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2.5) + :shadow torn-highres-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +(deftype torn-npc (process-taskable) + () + ) + + +(defmethod init-skeleton! ((this torn-npc)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-torn-highres" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this draw light-index) (the-as uint 30)) + 0 + (none) + ) + +(defmethod get-art-element ((this torn-npc)) + (case (-> this task actor) + (((game-task-actor torn-freehq)) + (-> this draw art-group data 4) + ) + (((game-task-actor torn-hiptable)) + (-> this draw art-group data 4) + ) + (((game-task-actor torn-hipbar)) + (-> this draw art-group data 6) + ) + (((game-task-actor torn-hipbooth)) + (-> this draw art-group data 5) + ) + (else + (-> this draw art-group data 3) + ) + ) + ) + +(defmethod get-trans ((this torn-npc) (arg0 int)) + "Get the `trans` for this process." + (let ((v1-0 (-> this root))) + (if (= arg0 2) + (vector<-cspace! (new 'static 'vector) (-> this node-list data 6)) + (-> v1-0 trans) + ) + ) + ) + +(defskelgroup skel-samos-highres samos-highres samos-highres-lod0-jg samos-highres-idle-ja + ((samos-highres-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + :shadow samos-highres-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +(deftype samos-npc (process-taskable) + () + ) + + +(defmethod get-art-element ((this samos-npc)) + (case (-> this task actor) + (((game-task-actor samos-genb)) + (-> this draw art-group data 4) + ) + (((game-task-actor samos-freehq)) + (-> this draw art-group data 4) + ) + (else + (-> this draw art-group data 4) + ) + ) + ) + +(defmethod init-skeleton! ((this samos-npc)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-samos-highres" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this draw light-index) (the-as uint 30)) + 0 + (none) + ) + +(defskelgroup skel-palmpilot palmpilot palmpilot-lod0-jg -1 + ((palmpilot-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.5) + :shadow-joint-index 3 + ) + +(defskelgroup skel-palmpilot-b palmpilot-b palmpilot-b-lod0-jg -1 + ((palmpilot-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.5) + :shadow-joint-index 3 + ) + +(defskelgroup skel-sig-highres sig-highres sig-highres-lod0-jg sig-highres-idle-ja + ((sig-highres-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :shadow sig-highres-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 17 + ) + +(deftype sig-npc (process-taskable) + () + ) + + +(defmethod get-art-element ((this sig-npc)) + (case (-> this task actor) + (((game-task-actor sig-wasdoors)) + (-> this draw art-group data 4) + ) + (else + (-> this draw art-group data 3) + ) + ) + ) + +(defmethod init-skeleton! ((this sig-npc)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-sig-highres" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this draw light-index) (the-as uint 30)) + 0 + (none) + ) + +(defskelgroup skel-kleever-highres kleever-highres kleever-highres-lod0-jg kleever-highres-idle-ja + ((kleever-highres-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3) + :shadow kleever-highres-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + :clothing (((mesh kleever-highres-kleever-L1-cg) + (gravity-constant (meters 24)) + (wind-constant 0.5) + (cloth-width 3) + (flags (cloth-flag use-wind double-sided)) + (tex-name "klever-skirtlight") + (tex-name2 "klever-skirtlight") + (tex-name3 "klever-skirtlight") + (cloth-thickness 1.0) + (initial-xform 3) + (drag 0.151) + (num-iterations 1) + (timestep-frequency 7) + (secret-disable (game-secrets scene-player-1 scene-player-3)) + ) + ((mesh kleever-highres-kleever-R1-cg) + (gravity-constant (meters 24)) + (wind-constant 0.5) + (cloth-width 3) + (flags (cloth-flag use-wind double-sided)) + (tex-name "klever-skirtlight") + (tex-name2 "klever-skirtlight") + (tex-name3 "klever-skirtlight") + (cloth-thickness 1.0) + (initial-xform 3) + (drag 0.151) + (num-iterations 1) + (timestep-frequency 7) + (secret-disable (game-secrets scene-player-1 scene-player-3)) + ) + ((mesh kleever-highres-kleever-Center-cg) + (gravity-constant (meters 24)) + (wind-constant 0.5) + (cloth-width 11) + (flags (cloth-flag use-wind double-sided)) + (tex-name "klever-skirtdark") + (tex-name2 "klever-skirtdark") + (tex-name3 "klever-skirtdark") + (cloth-thickness 1.0) + (initial-xform 3) + (drag 0.151) + (num-iterations 1) + (timestep-frequency 7) + (secret-disable (game-secrets scene-player-1 scene-player-3)) + ) + ((mesh kleever-highres-kleever-L2-cg) + (gravity-constant (meters 12)) + (wind-constant 1.0) + (cloth-width 4) + (flags (cloth-flag use-wind double-sided)) + (tex-name "klever-skirtlight") + (tex-name2 "klever-skirtlight") + (tex-name3 "klever-skirtlight") + (cloth-thickness 1.0) + (initial-xform 3) + (drag 0.151) + (num-iterations 1) + (timestep-frequency 7) + (secret-disable (game-secrets scene-player-1 scene-player-3)) + ) + ((mesh kleever-highres-kleever-R2-cg) + (gravity-constant (meters 12)) + (wind-constant 1.0) + (cloth-width 4) + (flags (cloth-flag use-wind double-sided)) + (tex-name "klever-skirtlight") + (tex-name2 "klever-skirtlight") + (tex-name3 "klever-skirtlight") + (cloth-thickness 1.0) + (initial-xform 3) + (drag 0.151) + (num-iterations 1) + (timestep-frequency 7) + (secret-disable (game-secrets scene-player-1 scene-player-3)) + ) + ) + ) + +(deftype kleever-npc (process-taskable) + ((cloth basic) + ) + ) + + +(defmethod init-collision! ((this kleever-npc)) + (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 6) 0))) + (set! (-> s5-0 total-prims) (the-as uint 7)) + (set! (-> s4-0 prim-core collide-as) (collide-spec civilian)) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set! (-> s4-0 transform-index) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 -1024.0 0.0 9011.2) + (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 civilian)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set! (-> v1-7 transform-index) 0) + (set-vector! (-> v1-7 local-sphere) 0.0 -4096.0 0.0 4096.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 civilian)) + (set! (-> v1-9 prim-core action) (collide-action solid)) + (set! (-> v1-9 transform-index) 0) + (set-vector! (-> v1-9 local-sphere) 0.0 -1024.0 0.0 4096.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 civilian)) + (set! (-> v1-11 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-11 transform-index) 0) + (set-vector! (-> v1-11 local-sphere) 0.0 2048.0 0.0 4096.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 civilian)) + (set! (-> v1-13 prim-core action) (collide-action solid)) + (set! (-> v1-13 transform-index) 0) + (set-vector! (-> v1-13 local-sphere) 6144.0 -4096.0 1638.4 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 civilian)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 0) + (set-vector! (-> v1-15 local-sphere) 6144.0 -1024.0 1638.4 819.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 civilian)) + (set! (-> v1-17 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-17 transform-index) 0) + (set-vector! (-> v1-17 local-sphere) 6144.0 2048.0 1638.4 819.2) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-20 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-20 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-20 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod get-art-element ((this kleever-npc)) + (case (-> this task actor) + (((game-task-actor kleever-arena)) + (-> this draw art-group data 9) + ) + (else + (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 8))) + (-> this draw art-group data 10) + ) + ((let ((v1-14 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (and v1-14 (= v1-14 (-> this draw art-group data 10))) + ) + (if (and (= (the int (ja-aframe-num 0)) 59) (rand-vu-percent? 0.1)) + (-> this draw art-group data 11) + (-> this draw art-group data 10) + ) + ) + ((let ((v1-27 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (and v1-27 (= v1-27 (-> this draw art-group data 11))) + ) + (if (= (the int (ja-aframe-num 0)) 74) + (-> this draw art-group data 12) + (-> this draw art-group data 11) + ) + ) + ((let ((v1-38 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (and v1-38 (= v1-38 (-> this draw art-group data 12))) + ) + (if (and (= (the int (ja-aframe-num 0)) 127) (rand-vu-percent? 0.1)) + (-> this draw art-group data 13) + (-> this draw art-group data 12) + ) + ) + ((let ((v1-51 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (and v1-51 (= v1-51 (-> this draw art-group data 13))) + ) + (if (= (the int (ja-aframe-num 0)) 139) + (-> this draw art-group data 10) + (-> this draw art-group data 13) + ) + ) + ) + ) + ) + ) + ) + +(defmethod init-skeleton! ((this kleever-npc)) + (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) + ) + (set! (-> this draw light-index) (the-as uint 30)) + (set! (-> this cloth) (the-as basic #t)) + 0 + (none) + ) + +(defskelgroup skel-seem-highres seem-highres seem-highres-lod0-jg seem-highres-idle-ja + ((seem-highres-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3) + :shadow seem-highres-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + :clothing (((mesh seem-highres-seem-seemskirt_fr-cg) + (gravity-constant (meters 20)) + (wind-constant 1.0) + (cloth-width 21) + (flags (cloth-flag double-sided wraps autogen-uvs use-old-resets)) + (tex-name "seem-skirt") + (tex-name2 "seem-skirt") + (tex-name3 "seem-skirt") + (initial-xform 3) + (drag 0.301) + (num-iterations 3) + (timestep-frequency 7) + ) + ) + ) + +(deftype seem-npc (process-taskable) + () + ) + + +(defmethod get-art-element ((this seem-npc)) + (case (-> this task actor) + (((game-task-actor seem-wascity)) + (-> this draw art-group data 5) + ) + (((game-task-actor seem-leaper)) + (-> this draw art-group data 7) + ) + (else + (-> this draw art-group data 4) + ) + ) + ) + +(defmethod init-skeleton! ((this seem-npc)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-seem-highres" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this draw light-index) (the-as uint 30)) + 0 + (none) + ) + +(defmethod init-defaults! ((this seem-npc)) + (let ((t9-0 (method-of-type process-taskable init-defaults!))) + (t9-0 this) + ) + (case (-> this task actor) + (((game-task-actor seem-wascity)) + (logior! (-> this flags) (process-taskable-flags ptf6)) + ) + ) + 0 + (none) + ) + +(defskelgroup skel-onin-highres onin-highres onin-highres-lod0-jg onin-highres-idle-ja + ((onin-highres-lod0-mg (meters 200))) + :bounds (static-spherem 0 0 0 3) + :shadow onin-highres-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +(deftype onin-npc (process-taskable) + () + ) + + +(defmethod init-skeleton! ((this onin-npc)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-onin-highres" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this draw light-index) (the-as uint 30)) + 0 + (none) + ) + +(defmethod get-art-element ((this onin-npc)) + (case (-> this task actor) + (((game-task-actor onin-onintent)) + ) + ) + (-> this draw art-group data 4) + ) + +(defskelgroup skel-jinx-highres jinx-highres jinx-highres-lod0-jg jinx-highres-idle-ja + ((jinx-highres-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2.5) + :shadow-joint-index 3 + ) + +(deftype jinx-npc (process-taskable) + () + ) + + +(defmethod init-skeleton! ((this jinx-npc)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-jinx-highres" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this draw light-index) (the-as uint 30)) + 0 + (none) + ) + +(defmethod get-art-element ((this jinx-npc)) + (case (-> this task actor) + (((game-task-actor jinx-hiphog)) + (-> this draw art-group data 3) + ) + (else + (-> this draw art-group data 2) + ) + ) + ) + +(defskelgroup skel-gun-npc gun-npc gun-npc-lod0-jg -1 + ((gun-npc-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.5) + :shadow gun-npc-shadow-mg + :shadow-joint-index 3 + ) + +(deftype gun-npc (process-taskable) + () + ) + + +(defmethod get-art-element ((this gun-npc)) + (case (-> this task actor) + (((game-task-actor gun-gungame)) + (cond + ((task-node-closed? (game-task-node city-port-assault-resolution)) + (-> this draw art-group data 3) + ) + ((task-node-closed? (game-task-node city-gun-course-1-introduction)) + (-> this draw art-group data 4) + ) + (else + (-> this draw art-group data 3) + ) + ) + ) + (else + (-> this draw art-group data 3) + ) + ) + ) + +(defmethod init-skeleton! ((this gun-npc)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-gun-npc" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this draw light-index) (the-as uint 30)) + 0 + (none) + ) + +(defskelgroup skel-tess-highres tess-highres tess-highres-lod0-jg tess-highres-idle-ja + ((tess-highres-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3) + :shadow tess-highres-shadow-mg + :shadow-joint-index 3 + ) + +(deftype tess-npc (process-taskable) + () + ) + + +(defmethod get-art-element ((this tess-npc)) + (case (-> this task actor) + (((game-task-actor tess-gungame)) + (cond + ((task-node-closed? (game-task-node city-gun-course-2-resolution)) + (-> this draw art-group data 7) + ) + ((task-node-closed? (game-task-node city-gun-course-2-introduction)) + (-> this draw art-group data 5) + ) + ((task-node-closed? (game-task-node city-port-assault-resolution)) + (-> this draw art-group data 5) + ) + ((task-node-closed? (game-task-node city-gun-course-1-resolution)) + (-> this draw art-group data 7) + ) + ((task-node-closed? (game-task-node city-gun-course-1-introduction)) + (-> this draw art-group data 6) + ) + (else + (-> this draw art-group data 5) + ) + ) + ) + (else + (-> this draw art-group data 3) + ) + ) + ) + +(defmethod init-skeleton! ((this tess-npc)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-tess-highres" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this draw light-index) (the-as uint 30)) + 0 + (none) + ) + +(defskelgroup skel-wlander-male wlander-male wlander-male-lod0-jg -1 + ((wlander-male-lod0-mg (meters 20)) (wlander-male-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3) + :shadow wlander-male-shadow-mg + :shadow-joint-index 3 + ) + +(deftype vin-npc (process-taskable) + () + ) + + +(defmethod get-art-element ((this vin-npc)) + (-> this draw art-group data 5) + ) + +(defmethod init-skeleton! ((this vin-npc)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-sidekick" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logior! (-> this draw status) (draw-control-status no-draw-bounds2)) + 0 + (none) + ) + +(defskelgroup skel-eco-crystal-dark eco-crystal-dark eco-crystal-dark-lod0-jg eco-crystal-dark-idle-ja + ((eco-crystal-dark-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 0.5) + :shadow-joint-index 3 + ) + +(defskelgroup skel-keira-highres keira-highres keira-highres-lod0-jg keira-highres-idle-ja + ((keira-highres-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3) + :shadow keira-highres-shadow-mg + :origin-joint-index 4 + :shadow-joint-index 3 + ) + +(deftype keira-npc (process-taskable) + () + ) + + +(defmethod get-art-element ((this keira-npc)) + (case (-> this task actor) + (((game-task-actor keira-freehq)) + (-> this draw art-group data 3) + ) + (((game-task-actor keira-genb)) + (-> this draw art-group data 3) + ) + (else + (-> this draw art-group data 3) + ) + ) + ) + +(defmethod init-skeleton! ((this keira-npc)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-keira-highres" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this draw light-index) (the-as uint 30)) + 0 + (none) + ) + +(defskelgroup skel-hellcat-movie hellcat hellcat-lod0-jg hellcat-idle-ja + ((hellcat-lod0-mg (meters 20)) (hellcat-lod0-mg (meters 40)) (hellcat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6.8) + :shadow hellcat-shadow-mg + :shadow-joint-index 3 + ) + +(defskelgroup skel-kidmedallion kidmedallion kidmedallion-lod0-jg kidmedallion-idle-ja + ((kidmedallion-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1) + :shadow-joint-index 3 + ) + +(defun pre-intro-play () + (set! (-> *setting-control* user-default border-mode) #t) + (set! (-> *level* play?) (-> *setting-control* user-default border-mode)) + (process-spawn + scene-player + :init scene-player-init + '("intro-drop" "intro-lost" "intro-ffhq" "intro-tired" "intro-palace" "intro-rescue") + #t + "wasintro-start" + :name "scene-player" + ) + 0 + (none) + ) + +(defun intro-play () + (set! (-> *setting-control* user-default border-mode) #t) + (set! (-> *level* play?) (-> *setting-control* user-default border-mode)) + (process-spawn + scene-player + :init scene-player-init + '("intro-training" "arena-training-1-intro") + #t + "waspala-intro-training" + :name "scene-player" + ) + 0 + (none) + ) + +(defun outro-play () + (set! (-> *setting-control* user-default border-mode) #t) + (set! (-> *level* play?) (-> *setting-control* user-default border-mode)) + (process-spawn scene-player :init scene-player-init "arena-outro" #t "wasstada-outro" :name "scene-player") + 0 + (none) + ) + +;; og:preserve-this +;; for some inexplicable reason, there is a lambda at the top level with skelgroups and a type definition +;; we just get rid of that and move everything to the top level +(defskelgroup skel-flut-wild flut-wild flut-wild-lod0-jg flut-wild-idle-ja + ((flut-wild-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 4) + :shadow flut-wild-shadow-mg + :shadow-joint-index 3 + :light-index 1 + ) + +(deftype flut-npc (process-taskable) + () + ) + +(defmethod inspect ((this flut-npc)) + (when (not this) + (set! this this) + (return this) + ) + ((method-of-type process-taskable inspect) this) + this + ) + +(defmethod get-art-element ((this flut-npc)) + (case (-> this task actor) + (((game-task-actor wascity-leaper)) + (-> this draw art-group data 12) + ) + (else + (-> this draw art-group data 3) + ) + ) + ) + +(defmethod init-skeleton! ((this flut-npc)) + (initialize-skeleton + this + (the skeleton-group (art-group-get-by-name *level* "skel-flut-wild" (the (pointer level) #f))) + (the pair 0) + ) + (set! (-> this draw light-index) (the uint 30)) + (none) + ) + +(defskelgroup skel-mhcity-de-tower-egg 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 10) + :shadow-joint-index 3 + ) +(defskelgroup skel-errol-effect errol-effect errol-effect-lod0-jg errol-effect-idle-ja + ((errol-effect-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + :shadow-joint-index 3 + ) +(defskelgroup skel-errol errol errol-lod0-jg errol-idle-ja + ((errol-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + :shadow-joint-index 6 + ) +(defskelgroup skel-snake-wheel-fma snake-wheel-fma snake-wheel-fma-lod0-jg snake-wheel-fma-idle-ja + ((snake-wheel-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :shadow snake-wheel-fma-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) +(defskelgroup skel-ottsel-veger ottsel-veger ottsel-veger-lod0-jg ottsel-veger-idle-ja + ((ottsel-veger-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2.5) + :shadow ottsel-veger-shadow-mg + :shadow-joint-index 3 + ) +(defskelgroup skel-ottsel-surfer ottsel-surfer ottsel-surfer-lod0-jg ottsel-surfer-idle-ja + ((ottsel-surfer-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2.5) + :shadow ottsel-surfer-shadow-mg + :shadow-joint-index 3 + ) +(defskelgroup skel-ottsel-leader ottsel-leader ottsel-leader-lod0-jg ottsel-leader-idle-ja + ((ottsel-leader-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2.5) + :shadow ottsel-leader-shadow-mg + :shadow-joint-index 3 + :clothing (((mesh ottsel-leader-leader-leaderskirt_fr-cg) + (gravity-constant (meters 12)) + (wind-constant 1.0) + (cloth-width 13) + (flags (cloth-flag use-wind double-sided flip-normals autogen-uvs)) + (tex-name "prec-leader-robe-01") + (tex-name2 "prec-leader-robe-01") + (tex-name3 "prec-leader-robe-01") + (cloth-thickness 1.0) + (initial-xform 3) + (drag 0.151) + (num-iterations 1) + (timestep-frequency 7) + ) + ) + ) +(defskelgroup skel-battle-amulet battle-amulet battle-amulet-lod0-jg battle-amulet-idle-ja + ((battle-amulet-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + :shadow-joint-index 3 + ) +(defskelgroup skel-precursor precursor precursor-lod0-jg precursor-idle-ja + ((precursor-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8.5) + :shadow-joint-index 3 + ) +(defskelgroup skel-comb-rail-rider-fma 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 10.5) + :shadow-joint-index 3 + ) +(defskelgroup skel-monk monk monk-lod0-jg monk-idle-ja + ((monk-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :shadow monk-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) +(defskelgroup skel-terraformer-fma terraformer-fma 0 2 + ((1 (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :shadow-joint-index 3 + ) +(defskelgroup skel-rhino-fma rhino rhino-lod0-jg rhino-idle-ja + ((rhino-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 100) + :shadow-joint-index 3 + ) +(defskelgroup skel-neo-satellite-fma neo-satellite-fma neo-satellite-fma-lod0-jg neo-satellite-fma-idle-ja + ((neo-satellite-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :shadow neo-satellite-fma-shadow-mg + :shadow-joint-index 3 + :global-effects 32 + ) +(defskelgroup skel-neo-satellite-break neo-satellite-break neo-satellite-break-lod0-jg neo-satellite-break-idle-ja + ((neo-satellite-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 500) + :shadow-joint-index 3 + :global-effects 32 + ) +(defskelgroup skel-talk-box talk-box talk-box-lod0-jg talk-box-idle-ja + ((talk-box-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + :shadow-joint-index 3 + ) + +;; og:preserve-this +;; ((lambda () +;; (let ((a0-0 +;; (new 'static 'skeleton-group +;; :name "skel-flut-wild" +;; :extra #f +;; :info #f +;; :art-group-name "flut-wild" +;; :bounds (new 'static 'vector :y 8192.0 :w 16384.0) +;; :version 8 +;; :shadow 2 +;; :origin-joint-index 3 +;; :sort 1 +;; :clothing #f +;; ) +;; ) +;; ) +;; (when #f +;; (set! (-> a0-0 clothing) (new 'static 'boxed-array :type cloth-params)) +;; (set! (-> a0-0 clothing length) (-> a0-0 clothing allocated-length)) +;; ) +;; (set! (-> a0-0 jgeo) 0) +;; (set! (-> a0-0 janim) 3) +;; (set! (-> a0-0 mgeo 0) 1) +;; (set! (-> a0-0 lod-dist 0) 4095996000.0) +;; (add-to-loading-level a0-0) +;; ) +;; (type-new 'flut-npc process-taskable (the-as int (the-as uint #x2800a00118))) +;; (method-set! flut-npc 3 (lambda ((arg0 flut-npc)) +;; (when (not arg0) +;; (set! arg0 arg0) +;; (goto cfg-4) +;; ) +;; (let ((t9-0 (method-of-type process-taskable inspect))) +;; (t9-0 arg0) +;; ) +;; (label cfg-4) +;; arg0 +;; ) +;; ) +;; (method-set! flut-npc 37 (lambda ((arg0 flut-npc)) (case (-> arg0 task actor) +;; (((game-task-actor wascity-leaper)) +;; (-> arg0 draw art-group data 12) +;; ) +;; (else +;; (-> arg0 draw art-group data 3) +;; ) +;; ) +;; ) +;; ) +;; (method-set! +;; flut-npc +;; 35 +;; (lambda ((arg0 flut-npc)) +;; (initialize-skeleton +;; arg0 +;; (the-as skeleton-group (art-group-get-by-name *level* "skel-flut-wild" (the-as (pointer level) #f))) +;; (the-as pair 0) +;; ) +;; (set! (-> arg0 draw light-index) (the-as uint 30)) +;; 0 +;; (none) +;; ) +;; ) +;; (let ((a0-5 (new 'static 'skeleton-group +;; :name "skel-mhcity-de-tower-egg" +;; :extra #f +;; :info #f +;; :art-group-name "mhcity-de-tower-egg" +;; :bounds (new 'static 'vector :w 40960.0) +;; :version 8 +;; :origin-joint-index 3 +;; :clothing #f +;; ) +;; ) +;; ) +;; (when #f +;; (set! (-> a0-5 clothing) (new 'static 'boxed-array :type cloth-params)) +;; (set! (-> a0-5 clothing length) (-> a0-5 clothing allocated-length)) +;; ) +;; (set! (-> a0-5 jgeo) 0) +;; (set! (-> a0-5 janim) 2) +;; (set! (-> a0-5 mgeo 0) 1) +;; (set! (-> a0-5 lod-dist 0) 4095996000.0) +;; (add-to-loading-level a0-5) +;; ) +;; (let ((a0-6 (new 'static 'skeleton-group +;; :name "skel-errol-effect" +;; :extra #f +;; :info #f +;; :art-group-name "errol-effect" +;; :bounds (new 'static 'vector :w 32768.0) +;; :version 8 +;; :origin-joint-index 3 +;; :clothing #f +;; ) +;; ) +;; ) +;; (when #f +;; (set! (-> a0-6 clothing) (new 'static 'boxed-array :type cloth-params)) +;; (set! (-> a0-6 clothing length) (-> a0-6 clothing allocated-length)) +;; ) +;; (set! (-> a0-6 jgeo) 0) +;; (set! (-> a0-6 janim) 2) +;; (set! (-> a0-6 mgeo 0) 1) +;; (set! (-> a0-6 lod-dist 0) 4095996000.0) +;; (add-to-loading-level a0-6) +;; ) +;; (let ((a0-7 (new 'static 'skeleton-group +;; :name "skel-errol" +;; :extra #f +;; :info #f +;; :art-group-name "errol" +;; :bounds (new 'static 'vector :w 32768.0) +;; :version 8 +;; :origin-joint-index 6 +;; :clothing #f +;; ) +;; ) +;; ) +;; (when #f +;; (set! (-> a0-7 clothing) (new 'static 'boxed-array :type cloth-params)) +;; (set! (-> a0-7 clothing length) (-> a0-7 clothing allocated-length)) +;; ) +;; (set! (-> a0-7 jgeo) 0) +;; (set! (-> a0-7 janim) 2) +;; (set! (-> a0-7 mgeo 0) 1) +;; (set! (-> a0-7 lod-dist 0) 4095996000.0) +;; (add-to-loading-level a0-7) +;; ) +;; (let ((a0-8 (new 'static 'skeleton-group +;; :name "skel-snake-wheel-fma" +;; :extra #f +;; :info #f +;; :art-group-name "snake-wheel-fma" +;; :bounds (new 'static 'vector :w 40960.0) +;; :version 8 +;; :shadow 2 +;; :shadow-joint-index 3 +;; :origin-joint-index 3 +;; :clothing #f +;; ) +;; ) +;; ) +;; (when #f +;; (set! (-> a0-8 clothing) (new 'static 'boxed-array :type cloth-params)) +;; (set! (-> a0-8 clothing length) (-> a0-8 clothing allocated-length)) +;; ) +;; (set! (-> a0-8 jgeo) 0) +;; (set! (-> a0-8 janim) 3) +;; (set! (-> a0-8 mgeo 0) 1) +;; (set! (-> a0-8 lod-dist 0) 4095996000.0) +;; (add-to-loading-level a0-8) +;; ) +;; (let ((a0-9 (new 'static 'skeleton-group +;; :name "skel-ottsel-veger" +;; :extra #f +;; :info #f +;; :art-group-name "ottsel-veger" +;; :bounds (new 'static 'vector :w 10240.0) +;; :version 8 +;; :shadow 2 +;; :origin-joint-index 3 +;; :clothing #f +;; ) +;; ) +;; ) +;; (when #f +;; (set! (-> a0-9 clothing) (new 'static 'boxed-array :type cloth-params)) +;; (set! (-> a0-9 clothing length) (-> a0-9 clothing allocated-length)) +;; ) +;; (set! (-> a0-9 jgeo) 0) +;; (set! (-> a0-9 janim) 3) +;; (set! (-> a0-9 mgeo 0) 1) +;; (set! (-> a0-9 lod-dist 0) 4095996000.0) +;; (add-to-loading-level a0-9) +;; ) +;; (let ((a0-10 (new 'static 'skeleton-group +;; :name "skel-ottsel-surfer" +;; :extra #f +;; :info #f +;; :art-group-name "ottsel-surfer" +;; :bounds (new 'static 'vector :w 10240.0) +;; :version 8 +;; :shadow 2 +;; :origin-joint-index 3 +;; :clothing #f +;; ) +;; ) +;; ) +;; (when #f +;; (set! (-> a0-10 clothing) (new 'static 'boxed-array :type cloth-params)) +;; (set! (-> a0-10 clothing length) (-> a0-10 clothing allocated-length)) +;; ) +;; (set! (-> a0-10 jgeo) 0) +;; (set! (-> a0-10 janim) 3) +;; (set! (-> a0-10 mgeo 0) 1) +;; (set! (-> a0-10 lod-dist 0) 4095996000.0) +;; (add-to-loading-level a0-10) +;; ) +;; (let ((a0-11 (new 'static 'skeleton-group +;; :name "skel-ottsel-leader" +;; :extra #f +;; :info #f +;; :art-group-name "ottsel-leader" +;; :bounds (new 'static 'vector :w 10240.0) +;; :version 8 +;; :shadow 2 +;; :origin-joint-index 3 +;; :clothing #f +;; ) +;; ) +;; ) +;; (when #t +;; (set! (-> a0-11 clothing) (new 'static 'boxed-array :type cloth-params :length 0 :allocated-length 1)) +;; (set! (-> a0-11 clothing 0) (new 'static 'cloth-params +;; :mesh 3 +;; :gravity-constant (meters 12) +;; :wind-constant 1.0 +;; :cloth-width #xd +;; :flags (cloth-flag use-wind double-sided flip-normals autogen-uvs) +;; :tex-name "prec-leader-robe-01" +;; :tex-name2 "prec-leader-robe-01" +;; :tex-name3 "prec-leader-robe-01" +;; :alt-tex-name #f +;; :alt-tex-name2 #f +;; :alt-tex-name3 #f +;; :cloth-thickness 1.0 +;; :initial-xform 3 +;; :drag 0.151 +;; :num-iterations 1 +;; :timestep-frequency 7 +;; ) +;; ) +;; (set! (-> a0-11 clothing length) (-> a0-11 clothing allocated-length)) +;; ) +;; (set! (-> a0-11 jgeo) 0) +;; (set! (-> a0-11 janim) 4) +;; (set! (-> a0-11 mgeo 0) 1) +;; (set! (-> a0-11 lod-dist 0) 4095996000.0) +;; (add-to-loading-level a0-11) +;; ) +;; (let ((a0-12 (new 'static 'skeleton-group +;; :name "skel-battle-amulet" +;; :extra #f +;; :info #f +;; :art-group-name "battle-amulet" +;; :bounds (new 'static 'vector :w 8192.0) +;; :version 8 +;; :origin-joint-index 3 +;; :clothing #f +;; ) +;; ) +;; ) +;; (when #f +;; (set! (-> a0-12 clothing) (new 'static 'boxed-array :type cloth-params)) +;; (set! (-> a0-12 clothing length) (-> a0-12 clothing allocated-length)) +;; ) +;; (set! (-> a0-12 jgeo) 0) +;; (set! (-> a0-12 janim) 2) +;; (set! (-> a0-12 mgeo 0) 1) +;; (set! (-> a0-12 lod-dist 0) 4095996000.0) +;; (add-to-loading-level a0-12) +;; ) +;; (let ((a0-13 (new 'static 'skeleton-group +;; :name "skel-precursor" +;; :extra #f +;; :info #f +;; :art-group-name "precursor" +;; :bounds (new 'static 'vector :w 34816.0) +;; :version 8 +;; :origin-joint-index 3 +;; :clothing #f +;; ) +;; ) +;; ) +;; (when #f +;; (set! (-> a0-13 clothing) (new 'static 'boxed-array :type cloth-params)) +;; (set! (-> a0-13 clothing length) (-> a0-13 clothing allocated-length)) +;; ) +;; (set! (-> a0-13 jgeo) 0) +;; (set! (-> a0-13 janim) 2) +;; (set! (-> a0-13 mgeo 0) 1) +;; (set! (-> a0-13 lod-dist 0) 4095996000.0) +;; (add-to-loading-level a0-13) +;; ) +;; (let ((a0-14 (new 'static 'skeleton-group +;; :name "skel-comb-rail-rider-fma" +;; :extra #f +;; :info #f +;; :art-group-name "comb-rail-rider" +;; :bounds (new 'static 'vector :w 43008.0) +;; :version 8 +;; :origin-joint-index 3 +;; :clothing #f +;; ) +;; ) +;; ) +;; (when #f +;; (set! (-> a0-14 clothing) (new 'static 'boxed-array :type cloth-params)) +;; (set! (-> a0-14 clothing length) (-> a0-14 clothing allocated-length)) +;; ) +;; (set! (-> a0-14 jgeo) 0) +;; (set! (-> a0-14 janim) 3) +;; (set! (-> a0-14 mgeo 0) 1) +;; (set! (-> a0-14 lod-dist 0) 4095996000.0) +;; (add-to-loading-level a0-14) +;; ) +;; (let ((a0-15 (new 'static 'skeleton-group +;; :name "skel-monk" +;; :extra #f +;; :info #f +;; :art-group-name "monk" +;; :bounds (new 'static 'vector :w 16384.0) +;; :version 8 +;; :shadow 2 +;; :shadow-joint-index 3 +;; :origin-joint-index 3 +;; :clothing #f +;; ) +;; ) +;; ) +;; (when #f +;; (set! (-> a0-15 clothing) (new 'static 'boxed-array :type cloth-params)) +;; (set! (-> a0-15 clothing length) (-> a0-15 clothing allocated-length)) +;; ) +;; (set! (-> a0-15 jgeo) 0) +;; (set! (-> a0-15 janim) 3) +;; (set! (-> a0-15 mgeo 0) 1) +;; (set! (-> a0-15 lod-dist 0) 4095996000.0) +;; (add-to-loading-level a0-15) +;; ) +;; (let ((a0-16 (new 'static 'skeleton-group +;; :name "skel-terraformer-fma" +;; :extra #f +;; :info #f +;; :art-group-name "terraformer-fma" +;; :bounds (new 'static 'vector :w 16384.0) +;; :version 8 +;; :origin-joint-index 3 +;; :clothing #f +;; ) +;; ) +;; ) +;; (when #f +;; (set! (-> a0-16 clothing) (new 'static 'boxed-array :type cloth-params)) +;; (set! (-> a0-16 clothing length) (-> a0-16 clothing allocated-length)) +;; ) +;; (set! (-> a0-16 jgeo) 0) +;; (set! (-> a0-16 janim) 2) +;; (set! (-> a0-16 mgeo 0) 1) +;; (set! (-> a0-16 lod-dist 0) 4095996000.0) +;; (add-to-loading-level a0-16) +;; ) +;; (let ((a0-17 (new 'static 'skeleton-group +;; :name "skel-rhino-fma" +;; :extra #f +;; :info #f +;; :art-group-name "rhino" +;; :bounds (new 'static 'vector :w 409600.0) +;; :version 8 +;; :origin-joint-index 3 +;; :clothing #f +;; ) +;; ) +;; ) +;; (when #f +;; (set! (-> a0-17 clothing) (new 'static 'boxed-array :type cloth-params)) +;; (set! (-> a0-17 clothing length) (-> a0-17 clothing allocated-length)) +;; ) +;; (set! (-> a0-17 jgeo) 4) +;; (set! (-> a0-17 janim) 7) +;; (set! (-> a0-17 mgeo 0) 5) +;; (set! (-> a0-17 lod-dist 0) 4095996000.0) +;; (add-to-loading-level a0-17) +;; ) +;; (let ((a0-18 (new 'static 'skeleton-group +;; :name "skel-neo-satellite-fma" +;; :extra #f +;; :info #f +;; :art-group-name "neo-satellite-fma" +;; :bounds (new 'static 'vector :w 40960.0) +;; :version 8 +;; :shadow 2 +;; :origin-joint-index 3 +;; :clothing #f +;; :global-effects #x20 +;; ) +;; ) +;; ) +;; (when #f +;; (set! (-> a0-18 clothing) (new 'static 'boxed-array :type cloth-params)) +;; (set! (-> a0-18 clothing length) (-> a0-18 clothing allocated-length)) +;; ) +;; (set! (-> a0-18 jgeo) 0) +;; (set! (-> a0-18 janim) 3) +;; (set! (-> a0-18 mgeo 0) 1) +;; (set! (-> a0-18 lod-dist 0) 4095996000.0) +;; (add-to-loading-level a0-18) +;; ) +;; (let ((a0-19 (new 'static 'skeleton-group +;; :name "skel-neo-satellite-break" +;; :extra #f +;; :info #f +;; :art-group-name "neo-satellite-break" +;; :bounds (new 'static 'vector :w 2048000.0) +;; :version 8 +;; :origin-joint-index 3 +;; :clothing #f +;; :global-effects #x20 +;; ) +;; ) +;; ) +;; (when #f +;; (set! (-> a0-19 clothing) (new 'static 'boxed-array :type cloth-params)) +;; (set! (-> a0-19 clothing length) (-> a0-19 clothing allocated-length)) +;; ) +;; (set! (-> a0-19 jgeo) 0) +;; (set! (-> a0-19 janim) 2) +;; (set! (-> a0-19 mgeo 0) 1) +;; (set! (-> a0-19 lod-dist 0) 4095996000.0) +;; (add-to-loading-level a0-19) +;; ) +;; (let ((a0-20 (new 'static 'skeleton-group +;; :name "skel-talk-box" +;; :extra #f +;; :info #f +;; :art-group-name "talk-box" +;; :bounds (new 'static 'vector :w 8192.0) +;; :version 8 +;; :origin-joint-index 3 +;; :clothing #f +;; ) +;; ) +;; ) +;; (when #f +;; (set! (-> a0-20 clothing) (new 'static 'boxed-array :type cloth-params)) +;; (set! (-> a0-20 clothing length) (-> a0-20 clothing allocated-length)) +;; ) +;; (set! (-> a0-20 jgeo) 0) +;; (set! (-> a0-20 janim) 2) +;; (set! (-> a0-20 mgeo 0) 1) +;; (set! (-> a0-20 lod-dist 0) 4095996000.0) +;; (add-to-loading-level a0-20) +;; ) +;; (none) +;; ) +;; ) + +(defskelgroup skel-ottsel-daxpants ottsel-daxpants ottsel-daxpants-lod0-jg ottsel-daxpants-idle-ja + ((ottsel-daxpants-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2.5) + :shadow-joint-index 3 + ) + +(defskelgroup skel-ottsel-dummy 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-joint-index 3 + ) + +(defskelgroup skel-ottsel-tess ottsel-tess ottsel-tess-lod0-jg ottsel-tess-idle-ja + ((ottsel-tess-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2.5) + :shadow ottsel-tess-shadow-mg + :shadow-joint-index 3 + ) diff --git a/goal_src/jak3/engine/common-obs/shield-sphere.gc b/goal_src/jak3/engine/common-obs/shield-sphere.gc index 15af02a121..25f10c763d 100644 --- a/goal_src/jak3/engine/common-obs/shield-sphere.gc +++ b/goal_src/jak3/engine/common-obs/shield-sphere.gc @@ -5,5 +5,700 @@ ;; name in dgo: shield-sphere ;; dgos: GAME +;; +++shield-type +(defenum shield-type + :type uint8 + (shield-type-0) + (shield-type-1) + ) +;; ---shield-type + + ;; DECOMP BEGINS +(deftype shield-sphere-heat (structure) + ((current-heat-value float) + (damage-scalar float) + (last-heat-time time-frame) + (distort-handle handle) + ) + ) + + +(deftype shield-sphere-toggle (structure) + ((enable-time time-frame) + (disable-time time-frame) + ) + ) + + +(deftype shield-sphere (process-focusable) + ((owner handle) + (sphere-size float) + (offset-vec vector :inline) + (enabled? symbol) + (shield-type shield-type) + (track-joint int32) + (heat-info shield-sphere-heat :inline) + (toggle-info shield-sphere-toggle :inline :overlay-at (-> heat-info current-heat-value)) + (last-attack-time time-frame) + (last-attack-id uint32) + (persistent-attack-id uint32) + ) + (:state-methods + shield-enabled + shield-disabled + explode + die + ) + (:methods + (shield-sphere-method-32 (_type_) quaternion) + (shield-enabled-trans (_type_) none) + (toggle-shield (_type_ symbol) none) + (shield-post (_type_) object) + (init-and-go! (_type_) object) + (init-collision! (_type_) none) + (shield-event-handler (_type_ process int symbol event-message-block) object) + (get-attack-damage (_type_ process-focusable event-message-block) int) + (shield-touch-handler (_type_ process-focusable event-message-block) object) + (shield-attack-handler (_type_ process-focusable event-message-block) symbol) + (send-shield-attack (_type_ process-focusable touching-shapes-entry int) object) + ) + ) + + +(deftype shield-sphere-spawn-params (structure) + ((offset-vec vector :inline) + (owner handle) + (sphere-size float) + (shield-type shield-type) + (track-joint int32) + (enable-time time-frame) + (disable-time time-frame) + (shield-strength int8) + (pad int16) + ) + ) + + +(defskelgroup skel-shield-sphere-distort shield-sphere-distort shield-sphere-distort-lod0-jg shield-sphere-distort-idle-ja + ((shield-sphere-distort-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.5) + ) + +(deftype shield-sphere-distort (process-drawable) + ((owner handle) + (sphere-size float) + ) + (:state-methods + inactive + distort + die + ) + ) + + +(deftype shield-sphere-distort-spawn-params (structure) + ((owner handle) + (sphere-size float) + ) + ) + + +(defbehavior shield-sphere-distort-init-by-other shield-sphere-distort ((arg0 shield-sphere-distort-spawn-params)) + (stack-size-set! (-> self main-thread) 128) + (set! (-> self owner) (-> arg0 owner)) + (set! (-> self root) (new 'process 'trsqv)) + (initialize-skeleton + self + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-shield-sphere-distort" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (set-vector! (-> self root scale) (-> arg0 sphere-size) (-> arg0 sphere-size) (-> arg0 sphere-size) 1.0) + (go-virtual inactive) + ) + +(defskelgroup skel-shield-sphere-explode shield-sphere-explode shield-sphere-explode-lod0-jg shield-sphere-explode-idle-ja + ((shield-sphere-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +(define *shield-sphere-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 1 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 2 :parent-joint-index -1) + (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) + ) + ) + +(defmethod init-and-go! ((this shield-sphere)) + (case (-> this shield-type) + (((shield-type shield-type-0)) + (set! (-> this heat-info current-heat-value) 0.0) + (set-time! (-> this heat-info last-heat-time)) + ) + (((shield-type shield-type-1)) + ) + ) + (let* ((v1-5 *game-info*) + (a0-4 (+ (-> v1-5 attack-id) 1)) + ) + (set! (-> v1-5 attack-id) a0-4) + (set! (-> this last-attack-id) a0-4) + ) + (let* ((v1-6 *game-info*) + (a0-6 (+ (-> v1-6 attack-id) 1)) + ) + (set! (-> v1-6 attack-id) a0-6) + (set! (-> this persistent-attack-id) a0-6) + ) + (set-vector! (-> this draw color-mult) 0.4 0.4 0.4 0.4) + (shield-enabled-trans this) + (go (method-of-object this shield-enabled)) + ) + +(defmethod init-collision! ((this shield-sphere)) + (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 ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec obstacle impenetrable-obj shield)) + (set! (-> v1-7 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-7 prim-core action) (collide-action solid deadly no-standon)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 (* 4096.0 (-> this sphere-size))) + (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) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod shield-enabled-trans ((this shield-sphere)) + (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 + (if (!= (-> this track-joint) -1) + (vector<-cspace! + (-> this root trans) + (-> (the-as process-focusable s5-0) node-list data (-> this track-joint)) + ) + (vector+! (-> this root trans) (get-trans (the-as process-focusable s5-0) 0) (-> this offset-vec)) + ) + (shield-sphere-method-32 this) + (send-event s5-0 'go-invulnerable) + ) + (else + (go (method-of-object this die)) + ) + ) + ) + (none) + ) + +(defmethod toggle-shield ((this shield-sphere) (arg0 symbol)) + (cond + (arg0 + (let ((v1-1 (-> this root root-prim))) + (set! (-> v1-1 prim-core collide-as) (-> this root backup-collide-as)) + (set! (-> v1-1 prim-core collide-with) (-> this root backup-collide-with)) + ) + ) + (else + (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 + ) + ) + (let* ((s4-0 (handle->process (-> this owner))) + (a0-9 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (cond + (arg0 + (logior! (-> this draw status) (draw-control-status no-draw)) + ) + (else + (logclear! (-> this draw status) (draw-control-status no-draw)) + (send-event a0-9 'go-vulnerable) + ) + ) + ) + (set! (-> this enabled?) arg0) + 0 + (none) + ) + +(defstate shield-enabled (shield-sphere) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (shield-event-handler self proc argc message block) + ) + :enter (behavior () + (toggle-shield self #t) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (shield-enabled-trans self) + (if (and (= (-> self shield-type) (shield-type shield-type-1)) + (time-elapsed? (-> self state-time) (-> self toggle-info enable-time)) + ) + (go-virtual shield-disabled) + ) + ) + :code sleep-code + :post (behavior () + (shield-post self) + ) + ) + +(defstate shield-disabled (shield-sphere) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (shield-event-handler self proc argc message block) + ) + :enter (behavior () + (toggle-shield self #f) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (and (= (-> self shield-type) (shield-type shield-type-1)) + (time-elapsed? (-> self state-time) (-> self heat-info last-heat-time)) + ) + (go-virtual shield-enabled) + ) + ) + :code sleep-code + :post (behavior () + (shield-post self) + ) + ) + +(defstate explode (shield-sphere) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (toggle-shield self #f) + (let ((a0-2 (handle->process (-> self heat-info distort-handle)))) + (if a0-2 + (send-event a0-2 'die) + ) + ) + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set! (-> gp-0 rot-speed) 20.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-shield-sphere-explode" (the-as (pointer level) #f)) + 2 + gp-0 + *shield-sphere-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + ) + :code (behavior () + (while (-> self child) + (suspend) + ) + (go-virtual die) + ) + :post (behavior () + (shield-post self) + ) + ) + +(defstate die (shield-sphere) + :virtual #t + :enter (behavior () + '() + ) + :code (behavior () + '() + ) + ) + +;; WARN: Return type mismatch int vs object. +(defmethod shield-post ((this shield-sphere)) + (cond + ((not (-> this enabled?)) + (logior! (-> this draw status) (draw-control-status no-draw)) + (return (the-as object 0)) + ) + (else + (logclear! (-> this draw status) (draw-control-status no-draw)) + ) + ) + (let ((f0-0 (calc-fade-from-fog (-> this root trans)))) + (case (-> this shield-type) + (((shield-type shield-type-0)) + (+ 0.4 (* 0.6 (-> this heat-info current-heat-value))) + (let ((a1-0 (new 'stack-no-clear 'vector))) + (set-vector! a1-0 0.4 0.4 0.4 0.4) + (vector-lerp! (-> this draw color-mult) a1-0 *zero-vector* (-> this heat-info current-heat-value)) + ) + (set-vector! + (-> this draw color-emissive) + (-> this heat-info current-heat-value) + 0.0 + 0.0 + (-> this heat-info current-heat-value) + ) + ) + (((shield-type shield-type-1)) + (set-vector! (-> this draw color-mult) 0.4 0.4 0.4 (* 0.4 f0-0)) + (set-vector! (-> this draw color-emissive) 0.0 0.0 0.0 0.0) + ) + ) + ) + (transform-post) + ) + +(defskelgroup skel-shield-sphere shield-sphere shield-sphere-lod0-jg shield-sphere-idle-ja + ((shield-sphere-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.5) + ) + +(defbehavior shield-sphere-init-by-other shield-sphere ((arg0 shield-sphere-spawn-params)) + (stack-size-set! (-> self main-thread) 128) + (logclear! (-> self mask) (process-mask enemy)) + (set! (-> self sphere-size) (-> arg0 sphere-size)) + (set! (-> self owner) (-> arg0 owner)) + (set! (-> self track-joint) (-> arg0 track-joint)) + (set! (-> self offset-vec quad) (-> arg0 offset-vec quad)) + (init-collision! self) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-shield-sphere" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set-vector! (-> self root scale) (-> self sphere-size) (-> self sphere-size) (-> self sphere-size) 1.0) + (set! (-> self shield-type) (-> arg0 shield-type)) + (case (-> self shield-type) + (((shield-type shield-type-0)) + (set! (-> self heat-info damage-scalar) (/ 1.0 (the float (-> arg0 shield-strength)))) + (let ((gp-1 (new 'stack-no-clear 'shield-sphere-distort-spawn-params))) + (set! (-> gp-1 owner) (process->handle self)) + (set! (-> gp-1 sphere-size) (-> self sphere-size)) + (let ((s5-1 (the-as process #f))) + (let* ((s4-1 (get-process *default-dead-pool* shield-sphere-distort #x4000 1)) + (v1-22 (when s4-1 + (let ((t9-5 (method-of-type process activate))) + (t9-5 s4-1 self "process" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-1 shield-sphere-distort-init-by-other gp-1) + (-> s4-1 ppointer) + ) + ) + ) + (if v1-22 + (set! s5-1 (-> v1-22 0)) + ) + ) + (set! (-> self heat-info distort-handle) (process->handle s5-1)) + ) + ) + ) + (((shield-type shield-type-1)) + (set! (-> self toggle-info enable-time) (-> arg0 enable-time)) + (set! (-> self heat-info last-heat-time) (-> arg0 disable-time)) + ) + ) + (ja-no-eval :group! (ja-group) :num! (loop!) :frame-num 0.0) + (ja-post) + (logior! (-> self draw status) (draw-control-status disable-fog)) + (set! (-> self event-hook) (-> (method-of-type shield-sphere shield-enabled) event)) + (init-and-go! self) + ) + +(defmethod shield-sphere-method-32 ((this shield-sphere)) + (forward-up-nopitch->quaternion + (-> this root quat) + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (camera-pos) (-> this root trans)) 1.0) + *y-vector* + ) + ) + +(defmethod get-inv-mass ((this shield-sphere)) + 2.0 + ) + +(defmethod shield-event-handler ((this shield-sphere) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('shield-detach) + (go (method-of-object this die)) + #t + ) + (('active) + #t + ) + (('heat-ratio) + (-> this heat-info current-heat-value) + ) + (('notice) + (case (-> arg3 param 0) + (('die) + (go (method-of-object this die)) + #t + ) + (else + #f + ) + ) + ) + (('enabled) + (go (method-of-object this shield-enabled)) + ) + (('disabled) + (go (method-of-object this shield-disabled)) + ) + (('touch) + (shield-touch-handler this (the-as process-focusable arg0) arg3) + ) + (('attack) + (shield-attack-handler this (the-as process-focusable arg0) arg3) + ) + (('impact-impulse) + (let ((v1-12 (the-as object (-> arg3 param 0)))) + (when (< 40960.0 (* (-> (the-as rigid-body-impact v1-12) impulse) (get-inv-mass this))) + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (go (method-of-object this explode)) + #t + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch number vs int. +(defmethod get-attack-damage ((this shield-sphere) (arg0 process-focusable) (arg1 event-message-block)) + (let ((v1-0 (the-as object (-> arg1 param 1)))) + (the-as int (cond + ((logtest? (attack-mask damage) (-> (the-as attack-info v1-0) mask)) + (the int (-> (the-as attack-info v1-0) damage)) + ) + (else + (let ((a0-4 (get-penetrate-using-from-attack-event arg0 arg1))) + (if (and (logtest? a0-4 (penetrate board)) (logtest? a0-4 (penetrate spin))) + 10000 + (penetrate-using->damage a0-4) + ) + ) + ) + ) + ) + ) + ) + +(defmethod shield-touch-handler ((this shield-sphere) (arg0 process-focusable) (arg1 event-message-block)) + (let* ((s5-0 (-> arg1 param 0)) + (s2-0 arg0) + (s3-0 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (when (and s5-0 s3-0) + (cond + ((and (and s3-0 (not (logtest? (-> s3-0 focus-status) (focus-status disable dead ignore grabbed)))) + ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s5-0) + (-> this root) + (collide-action deadly) + (collide-action) + ) + ) + (let ((a3-1 (-> this persistent-attack-id))) + (send-shield-attack this arg0 (the-as touching-shapes-entry s5-0) (the-as int a3-1)) + ) + ) + ((and ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s5-0) + (-> this root) + (collide-action no-standon) + (collide-action) + ) + (not (logtest? (-> this root penetrated-by) (-> s3-0 root penetrate-using))) + ) + (send-shoves (-> this root) arg0 (the-as touching-shapes-entry s5-0) 0.0 10240.0 24576.0) + ) + ) + ) + ) + ) + +(defmethod shield-attack-handler ((this shield-sphere) (arg0 process-focusable) (arg1 event-message-block)) + (let ((s5-0 (-> arg1 param 0)) + (v1-0 (the-as object (-> arg1 param 1))) + ) + (cond + ((and (and (-> this next-state) (= (-> this next-state name) 'shield-enabled)) + (and (= (-> this shield-type) (shield-type shield-type-0)) + (or (!= (-> (the-as attack-info v1-0) id) (-> this last-attack-id)) + (time-elapsed? (-> this last-attack-time) (seconds 1)) + ) + ) + ) + (set! (-> this last-attack-id) (-> (the-as attack-info v1-0) id)) + (set-time! (-> this last-attack-time)) + (let* ((v1-5 (get-attack-damage this arg0 arg1)) + (f30-0 (* (-> this heat-info damage-scalar) (the float v1-5))) + ) + (when (> v1-5 0) + (if (< (+ f30-0 (-> this heat-info current-heat-value)) 1.0) + (set! f30-0 (fmin f30-0 (* 0.0027777778 (the float (- (current-time) (-> this heat-info last-heat-time)))))) + ) + (set-time! (-> this heat-info last-heat-time)) + (let ((a0-14 (handle->process (-> this heat-info distort-handle)))) + (if a0-14 + (send-event a0-14 'distort) + ) + ) + (sound-play "dpbiped-shld-df") + (+! (-> this heat-info current-heat-value) f30-0) + (if (< 1.0 (-> this heat-info current-heat-value)) + (go (method-of-object this explode)) + ) + ) + ) + (if (not (send-shield-attack this arg0 (the-as touching-shapes-entry s5-0) (the-as int (-> this persistent-attack-id))) + ) + (send-shoves (-> this root) arg0 (the-as touching-shapes-entry s5-0) 0.0 12288.0 32768.0) + ) + #t + ) + (else + #f + ) + ) + ) + ) + +(defmethod send-shield-attack ((this shield-sphere) (arg0 process-focusable) (arg1 touching-shapes-entry) (arg2 int)) + (let ((t0-0 0)) + (send-event + arg0 + 'attack + arg1 + (static-attack-info :mask (vehicle-impulse-factor) ((id (the-as uint arg2)) + (damage (the float t0-0)) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (shove-back (meters 4)) + (shove-up (meters 3)) + (mode 'generic) + ) + ) + ) + ) + ) + +(defstate die (shield-sphere-distort) + :virtual #t + :code (behavior () + '() + ) + ) + +(defstate distort (shield-sphere-distort) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('die) + (go-virtual die) + ) + (('distort) + (let ((f0-0 (ja-frame-num 0))) + (if (< 5.0 f0-0) + (go-virtual distort) + ) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (logclear! (-> self draw status) (draw-control-status no-draw)) + ) + :trans (behavior () + (let ((v1-1 (handle->process (-> self owner)))) + (when v1-1 + (set! (-> self root trans quad) (-> (the-as process-drawable v1-1) root trans quad)) + (quaternion-copy! (-> self root quat) (-> (the-as process-drawable v1-1) root quat)) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! shield-sphere-distort-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual inactive) + ) + :post (behavior () + (ja-post) + ) + ) + +(defstate inactive (shield-sphere-distort) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('distort) + (go-virtual distort) + ) + (('die) + (go-virtual die) + ) + ) + ) + :enter (behavior () + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + :code sleep-code + ) diff --git a/goal_src/jak3/engine/common-obs/vent.gc b/goal_src/jak3/engine/common-obs/vent.gc index 743cb5ef63..c0d91cebf2 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)) @@ -215,98 +215,35 @@ (cond ((logtest? (-> self collect-effect flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> v1-9 root-prim prim-core world-sphere quad)) - (let ((s5-2 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-2 - (let ((t9-3 (method-of-type part-tracker-subsampler activate))) - (t9-3 (the-as part-tracker-subsampler s5-2) gp-0 "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-4 run-function-in-process) - (a0-13 s5-2) - (a1-10 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> self collect-effect)) - (set! (-> *part-tracker-subsampler-params-default* duration) 0) - (set! (-> *part-tracker-subsampler-params-default* callback) part-tracker-track-target) - (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-4) a0-13 a1-10 *part-tracker-subsampler-params-default*) - ) - (-> s5-2 ppointer) - ) + (part-tracker-spawn + part-tracker-subsampler + :to gp-0 + :group (-> self collect-effect) + :callback part-tracker-track-target ) ) (else (set! (-> *launch-matrix* trans quad) (-> v1-9 root-prim prim-core world-sphere quad)) - (let ((s5-3 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-3 - (let ((t9-6 (method-of-type part-tracker activate))) - (t9-6 (the-as part-tracker s5-3) gp-0 "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-7 run-function-in-process) - (a0-18 s5-3) - (a1-13 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> self collect-effect)) - (set! (-> *part-tracker-params-default* duration) 0) - (set! (-> *part-tracker-params-default* callback) part-tracker-track-target) - (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-7) a0-18 a1-13 *part-tracker-params-default*) - ) - (-> s5-3 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to gp-0 :group (-> self collect-effect) :callback part-tracker-track-target) ) ) (cond ((logtest? (-> self collect-effect2 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self root root-prim prim-core world-sphere quad)) - (let ((gp-1 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-1 - (let ((t9-9 (method-of-type part-tracker-subsampler activate))) - (t9-9 (the-as part-tracker-subsampler gp-1) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-10 run-function-in-process) - (a0-25 gp-1) - (a1-16 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> self collect-effect2)) - (set! (-> *part-tracker-subsampler-params-default* duration) 0) - (set! (-> *part-tracker-subsampler-params-default* callback) part-tracker-move-to-target) - (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-10) a0-25 a1-16 *part-tracker-subsampler-params-default*) - ) - (-> gp-1 ppointer) - ) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> self collect-effect2) + :callback part-tracker-move-to-target ) ) (else (set! (-> *launch-matrix* trans quad) (-> self root root-prim prim-core world-sphere quad)) - (let ((gp-2 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-2 - (let ((t9-12 (method-of-type part-tracker activate))) - (t9-12 (the-as part-tracker gp-2) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-13 run-function-in-process) - (a0-32 gp-2) - (a1-19 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> self collect-effect2)) - (set! (-> *part-tracker-params-default* duration) 0) - (set! (-> *part-tracker-params-default* callback) part-tracker-move-to-target) - (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-13) a0-32 a1-19 *part-tracker-params-default*) - ) - (-> gp-2 ppointer) - ) + (part-tracker-spawn + part-tracker + :to self + :group (-> self collect-effect2) + :callback part-tracker-move-to-target ) ) ) @@ -328,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) @@ -403,7 +340,7 @@ ) ) :trans (behavior () - (if (not (logtest? (the-as game-feature (logand (game-feature feature57) (-> *setting-control* user-current features))) + (if (not (logtest? (the-as game-feature (logand (game-feature lighteco) (-> *setting-control* user-current features))) (-> *game-info* features) ) ) @@ -452,7 +389,7 @@ (defstate close (light-eco-vent) :virtual #t :trans (behavior () - (if (logtest? (the-as game-feature (logand (game-feature feature57) (-> *setting-control* user-current features))) + (if (logtest? (the-as game-feature (logand (game-feature lighteco) (-> *setting-control* user-current features))) (-> *game-info* features) ) (go-virtual open #f) @@ -525,7 +462,7 @@ (set! (-> this sound) (new 'process 'ambient-sound "eco-bg-light" (-> this root trans) 0.0)) (set-falloff-far! (-> this sound) 81920.0) (set-falloff-mode! (-> this sound) 9) - (if (logtest? (the-as game-feature (logand (game-feature feature57) (-> *setting-control* user-current features))) + (if (logtest? (the-as game-feature (logand (game-feature lighteco) (-> *setting-control* user-current features))) (-> *game-info* features) ) (go (method-of-object this open) #t) @@ -605,7 +542,7 @@ ) ) :trans (behavior () - (if (not (logtest? (the-as game-feature (logand (game-feature feature58) (-> *setting-control* user-current features))) + (if (not (logtest? (the-as game-feature (logand (game-feature darkeco) (-> *setting-control* user-current features))) (-> *game-info* features) ) ) @@ -654,7 +591,7 @@ (defstate close (dark-eco-vent) :virtual #t :trans (behavior () - (if (logtest? (the-as game-feature (logand (game-feature feature58) (-> *setting-control* user-current features))) + (if (logtest? (the-as game-feature (logand (game-feature darkeco) (-> *setting-control* user-current features))) (-> *game-info* features) ) (go-virtual open #f) diff --git a/goal_src/jak3/engine/common-obs/voicebox.gc b/goal_src/jak3/engine/common-obs/voicebox.gc index 585d7db901..c91b342eff 100644 --- a/goal_src/jak3/engine/common-obs/voicebox.gc +++ b/goal_src/jak3/engine/common-obs/voicebox.gc @@ -23,7 +23,7 @@ ) (defpart 407 - :init-specs ((:texture (new 'static 'texture-id :index #x7a :page #x4)) + :init-specs ((:texture (shockwave level-default-sprite)) (:birth-func 'birth-func-set-vel) (:num 0.0 0.3) (:y (meters 0.15)) @@ -82,7 +82,7 @@ ((talk-box-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 4) :texture-level 10 - :light-index 1 + :sort 1 ) (defmethod get-track-pt-and-scale ((this remote) (arg0 vector)) @@ -140,7 +140,7 @@ ) (vector-float*! v1-16 a0-9 (/ 1.0 f0-2)) ) - (sparticle-launch-control-method-18 (-> this part) (-> this node-list data 3)) + (spawn-from-cspace (-> this part) (-> this node-list data 3)) ) 0 (none) diff --git a/goal_src/jak3/engine/common-obs/warp-gate.gc b/goal_src/jak3/engine/common-obs/warp-gate.gc index 40ebec7f1b..f90fa4d8d7 100644 --- a/goal_src/jak3/engine/common-obs/warp-gate.gc +++ b/goal_src/jak3/engine/common-obs/warp-gate.gc @@ -5,5 +5,1922 @@ ;; name in dgo: warp-gate ;; dgos: GAME +(define-extern v-marauder type) +(define-extern *range-warp-dust-color* curve-color-fast) +(define-extern *range-warp-dust-alpha* curve2d-fast) +(define-extern *range-warp-dust-scale-x* curve2d-fast) +(define-extern *range-warp-dust-scale-y* curve2d-fast) +(define-extern *curve-warp-dust-alpha* curve2d-fast) +(define-extern *curve-warp-dust-scale-x* curve2d-fast) +(define-extern *curve-warp-dust-scale-y* curve2d-fast) + ;; DECOMP BEGINS +(defpartgroup group-warpgate + :id 202 + :duration (seconds 0.267) + :flags (sp0 sp6) + :bounds (static-bspherem 0 0 0 8) + :rotate ((degrees 90) (degrees 0) (degrees 0)) + :parts ((sp-item 825 :flags (is-3d sp3 sp7)) (sp-item 826 :flags (sp3)) (sp-item 827 :flags (sp7))) + ) + +(defpart 825 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4.75)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 196.0) + (:fade-a -3.1875) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 826 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 14)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 48.0) + (:fade-a -0.8) + (:timer (seconds 0.267)) + (:flags (glow)) + (:userdata 4096.0) + ) + ) + +(defpart 827 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 16.0) + (:x (meters 0) (meters 2)) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:scalevel-x (meters -0.0025)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-airtrain-dust-plume :id 203 :bounds (static-bspherem 0 0 0 15) :parts ((sp-item 828))) + +(defpart 828 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 1.0) + (:x (meters 0) (meters 10)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 1) (meters 1)) + (:r 128.0) + (:g 106.0 16.0) + (:b 64.0 32.0) + (:a 16.0 32.0) + (:vel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-x (meters 0.033333335) (meters 0.006666667)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.04 -0.08) + (:accel-y (meters 0.00033333333)) + (:friction 0.95 0.03) + (:timer (seconds 4.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-airtrain-dust-hover :id 204 :bounds (static-bspherem 0 0 0 15) :parts ((sp-item 829))) + +(defpart 829 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 5)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 1) (meters 1)) + (:r 128.0) + (:g 106.0 16.0) + (:b 64.0 32.0) + (:a 16.0 16.0) + (:vel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-x (meters 0.016666668) (meters 0.006666667)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.04 -0.08) + (:accel-y (meters 0.00033333333)) + (:friction 0.95 0.03) + (:timer (seconds 4.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-airtrain-thruster + :id 205 + :linger-duration (seconds 2) + :flags (sp4 sp6) + :bounds (static-bspherem 0 0 0 12) + :rotate ((degrees 180) (degrees 0) (degrees 0)) + :parts ((sp-item 830 :flags (sp6 sp7)) + (sp-item 831 :flags (sp6 sp7)) + (sp-item 832 :flags (sp7)) + (sp-item 833 :flags (sp7)) + (sp-item 834 :flags (sp7)) + ) + ) + +(defpartgroup group-airtrain-thruster-off + :id 206 + :linger-duration (seconds 2) + :flags (sp4 sp6) + :bounds (static-bspherem 0 0 0 12) + :rotate ((degrees 180) (degrees 0) (degrees 0)) + :parts ((sp-item 834 :fade-after (meters 120) :falloff-to (meters 90) :flags (sp7)) + (sp-item 835 :fade-after (meters 120) :falloff-to (meters 90) :flags (sp7)) + (sp-item 836 :flags (sp6 sp7)) + ) + ) + +(defpart 830 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 0.1)) + (:scale-x (meters 1) (meters 0.4)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0 128.0) + (:b 0.0) + (:a 64.0 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 831 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 0.1)) + (:scale-x (meters 4.8) (meters 0.6)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0 128.0) + (:b 0.0) + (:a 16.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 832 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 2.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 1) (meters 1)) + (:r 196.0) + (:g 128.0 64.0) + (:b :copy g) + (:a 16.0 16.0) + (:vel-x (meters -0.006666667) (meters 0.013333334)) + (:vel-y (meters -0.05) (meters -0.1)) + (:vel-z (meters -0.006666667) (meters 0.013333334)) + (:scalevel-x (meters 0.053333335) (meters 0.053333335)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:fade-a -0.21333334 -0.42666668) + (:accel-y (meters 0.00016666666) (meters 0.0005)) + (:friction 0.94 0.04) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 835 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 2.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 1) (meters 1)) + (:r 196.0) + (:g 128.0 64.0) + (:b :copy g) + (:a 10.0 4.0) + (:vel-x (meters -0.006666667) (meters 0.013333334)) + (:vel-y (meters -0.05) (meters -0.1)) + (:vel-z (meters -0.006666667) (meters 0.013333334)) + (:scalevel-x (meters 0.053333335) (meters 0.053333335)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:fade-a -0.21333334 -0.42666668) + (:accel-y (meters 0.00016666666) (meters 0.0005)) + (:friction 0.94 0.04) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 836 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 0.1)) + (:scale-x (meters 1.4) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 48.0 32.0) + (:b 0.0) + (:a 48.0 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 833 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.0 1.0) + (:x (meters 0) (meters 0.5)) + (:scale-x (meters 0.2) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 192.0 64.0) + (:g 128.0) + (:b 0.0) + (:a 128.0) + (:omega (degrees 0.0675) (degrees 0.0225)) + (:vel-x (meters -0.013333334) (meters 0.026666667)) + (:vel-y (meters -0.1) (meters -0.06666667)) + (:vel-z (meters -0.013333334) (meters 0.026666667)) + (:fade-g -1.0) + (:fade-a -2.56) + (:accel-x (meters 0) (meters 0.0016666667)) + (:friction 0.96 0.02) + (:timer (seconds 0.085) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:func 'sparticle-motion-blur) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 834 + :init-specs ((:num 0.4) + (:rot-x 8) + (:r 1638.4) + (:g 1331.2) + (:b 1433.6) + (:vel-y (meters -0.05) (meters -0.016666668)) + (:fade-r 32.768) + (:fade-g 28.671999) + (:fade-b 26.623999) + (:accel-x (meters 0) (meters 0.0016666667)) + (:friction 0.94) + (:timer (seconds 0.335)) + (:flags (distort)) + (:next-time (seconds 0.167)) + (:next-launcher 837) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 837 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b -4.096)) + ) + +(defpartgroup group-warp-hellcat-thruster + :id 207 + :duration (seconds 3) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 32) + :parts ((sp-item 838 :flags (is-3d sp7)) + (sp-item 839 :flags (is-3d sp7)) + (sp-item 840 :flags (sp7)) + (sp-item 841 :flags (is-3d sp7)) + (sp-item 842 :flags (is-3d sp7)) + (sp-item 843 :flags (sp7)) + ) + ) + +(defpart 838 + :init-specs ((:texture (mech-flame lprecurc-sprite)) + (:num 1.0) + (:x (meters 1.45)) + (:y (meters 1.1)) + (:z (meters -5.15)) + (:scale-x (meters 0.6)) + (:rot-x 4) + (:scale-y (meters 2)) + (:r 128.0 128.0) + (:g 32.0 96.0) + (:b :copy g) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 839 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:num 1.0) + (:x (meters 1.45)) + (:y (meters 1.1)) + (:z (meters -5.15)) + (:scale-x (meters 0.6)) + (:rot-x 4) + (:rot-z (degrees 90)) + (:scale-y (meters 2)) + (:r 128.0 128.0) + (:g 32.0 96.0) + (:b :copy g) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 840 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 1.45)) + (:y (meters 1.1)) + (:z (meters -4.75)) + (:scale-x (meters 1.75)) + (:rot-x (degrees 0.5625)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 16.0 4.0) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 841 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:num 1.0) + (:x (meters -1.45)) + (:y (meters 1.1)) + (:z (meters -5.15)) + (:scale-x (meters 0.6)) + (:rot-x 4) + (:scale-y (meters 2)) + (:r 128.0 128.0) + (:g 32.0 96.0) + (:b :copy g) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 842 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:num 1.0) + (:x (meters -1.45)) + (:y (meters 1.1)) + (:z (meters -5.15)) + (:scale-x (meters 0.6)) + (:rot-x 4) + (:rot-z (degrees 90)) + (:scale-y (meters 2)) + (:r 128.0 128.0) + (:g 32.0 96.0) + (:b :copy g) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 843 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters -1.45)) + (:y (meters 1.1)) + (:z (meters -4.75)) + (:scale-x (meters 1.75)) + (:rot-x (degrees 0.5625)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 16.0 4.0) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defskelgroup skel-warp-gate warp-gate warp-gate-lod0-jg warp-gate-idle-ja + ((warp-gate-lod0-mg (meters 999999))) + :bounds (static-spherem 0 3 0 4) + :origin-joint-index 3 + ) + +(deftype warp-gate (process-drawable) + ((root collide-shape :override) + (level-name symbol) + (on-notice pair) + (on-activate pair) + (on-close pair) + (wait-for pair) + (continue continue-point) + (distance meters) + (anim-speed float) + (test-time time-frame) + (center vector :inline) + ) + (:state-methods + idle + (use continue-point) + hidden + ) + (:methods + (init-skel-and-collide! (_type_) none) + (init-defaults! (_type_) none) + (eval-on-notice (_type_) continue-point) + ) + ) + + +(defmethod eval-on-notice ((this warp-gate)) + (let ((s5-0 (script-eval (-> this on-notice)))) + (cond + ((= s5-0 'hide) + (logior! (-> this draw status) (draw-control-status no-draw)) + (set! (-> this continue) #f) + ) + (s5-0 + (logclear! (-> this draw status) (draw-control-status no-draw)) + (set! (-> this continue) (get-continue-by-name *game-info* (the-as string (car s5-0)))) + (set! (-> this on-activate) (the-as pair (car (cdr s5-0)))) + (set! (-> this wait-for) (the-as pair (car (cdr (cdr s5-0))))) + (set! (-> this on-close) (the-as pair (car (cdr (cdr (cdr s5-0)))))) + ) + (else + (set! (-> this continue) #f) + ) + ) + ) + (-> this continue) + ) + +(defstate hidden (warp-gate) + :virtual #t + :code sleep-code + ) + +(defstate idle (warp-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('hide) + (go-virtual hidden) + ) + (('effect) + (script-eval '(part-tracker "group-warpgate" entity self joint "outerOut")) + ) + ) + ) + :code (behavior () + (remove-setting! 'allow-progress) + (set-time! (-> self state-time)) + (update-transforms (-> self root)) + (until #f + (eval-on-notice self) + (when (and (and *target* + (and (>= (-> self distance) (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (-> self continue) + (-> *setting-control* user-current airlock) + (begin + (persist-with-delay *setting-control* 'lightjak (seconds 0.1) 'lightjak #f 0.0 0) + (persist-with-delay *setting-control* 'darkjak (seconds 0.1) 'darkjak #f 0.0 0) + (persist-with-delay *setting-control* 'board (seconds 0.1) 'board #f 0.0 0) + (not (logtest? (focus-status in-head edge-grab pole flut tube light board pilot mech dark indax) + (-> *target* focus-status) + ) + ) + ) + (not (-> *setting-control* user-current hint)) + (zero? (-> *target* ext-anim)) + ) + (talker-surpress!) + (when (and (can-display-query? self "warp-gate" -99.0) + (cond + ((and (-> *target* next-state) (let ((v1-37 (-> *target* next-state name))) + (or (= v1-37 'target-warp-in) (= v1-37 'target-warp-out)) + ) + ) + (set-time! (-> self state-time)) + #f + ) + (else + #t + ) + ) + (time-elapsed? (-> self state-time) (seconds 0.1)) + ) + (if (and (cpad-pressed? 0 triangle) (process-grab? *target* #f)) + (go-virtual use (-> self continue)) + ) + (script-eval (-> self on-close)) + (let ((gp-0 + (new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-58 gp-0)) + (set! (-> v1-58 width) (the float 340)) + ) + (let ((v1-59 gp-0)) + (set! (-> v1-59 height) (the float 80)) + ) + (let ((v1-60 gp-0) + (a0-25 (-> *setting-control* user-default language)) + ) + (set! (-> v1-60 scale) (if (or (= a0-25 (language-enum korean)) (= a0-25 (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) + ) + ) + ) + ) + (cond + ((-> self continue) + (seek! (-> self anim-speed) 1.0 (* 2.0 (seconds-per-frame))) + (setup-masks (-> self draw) 2 0) + ) + (else + (setup-masks (-> self draw) 0 2) + (seek! (-> self anim-speed) 0.0 (* 2.0 (seconds-per-frame))) + ) + ) + (update! (-> self sound)) + (ja-post) + (suspend) + (ja :num! (loop! (-> self anim-speed))) + ) + #f + ) + ) + +(defstate use (warp-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('effect) + (script-eval '(part-tracker "group-warpgate" entity self joint "outerOut")) + ) + ) + ) + :exit (behavior () + (remove-setting! 'mode-name) + (remove-setting! 'interp-time) + ) + :trans (behavior () + (send-event *camera* 'joystick 0.0 0.0) + ) + :code (behavior ((arg0 continue-point)) + (local-vars (v1-38 symbol)) + (kill-current-talker '() '() 'exit) + (set-setting! 'mode-name 'cam-fixed 0.0 0) + (set-setting! 'interp-time 'abs 0.0 0) + (set-time! (-> self state-time)) + (logclear! (-> self mask) (process-mask actor-pause)) + (when (not arg0) + (process-release? *target*) + (go-virtual idle) + ) + (set-setting! 'allow-progress #f 0.0 0) + (set! (-> *setting-control* user-default border-mode) #t) + (set! (-> *level* play?) #t) + (apply-settings *setting-control*) + (let ((s5-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> s5-0 from) (process->ppointer self)) + (set! (-> s5-0 num-params) 4) + (set! (-> s5-0 message) 'change-state) + (set! (-> s5-0 param 0) (the-as uint target-warp-out)) + (let ((v1-22 (new 'static 'vector))) + (set! (-> v1-22 quad) (-> self center quad)) + (set! (-> s5-0 param 1) (the-as uint v1-22)) + ) + (set! (-> s5-0 param 2) (the-as uint (target-pos 0))) + (set! (-> s5-0 param 3) (the-as uint (process->handle self))) + (send-event-function *target* s5-0) + ) + (script-eval (-> self on-activate)) + (while (begin + (set! v1-38 + (when (-> self wait-for) + (let* ((s5-1 (-> self wait-for)) + (a1-8 (car s5-1)) + ) + (while (not (null? s5-1)) + (when (not (member (status-of-level-and-borrows *level* (the-as symbol a1-8) #f) '(loaded active))) + (set! v1-38 #t) + (goto cfg-21) + ) + (set! s5-1 (cdr s5-1)) + (set! a1-8 (car s5-1)) + ) + ) + #f + ) + ) + (label cfg-21) + (or v1-38 (not (time-elapsed? (-> self state-time) (seconds 2)))) + ) + (update! (-> self sound)) + (suspend) + (ja :num! (loop!)) + (ja-post) + ) + (if (not (logtest? (-> arg0 flags) (continue-flags no-blackout))) + (set-blackout-frames (seconds 0.05)) + ) + (start 'play arg0) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (suspend) + ) + ) + (while (and *target* (and (>= 81920.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (suspend) + (ja :num! (loop!)) + (ja-post) + ) + (logior! (-> self mask) (process-mask actor-pause)) + (go-virtual idle) + ) + ) + +;; WARN: Return type mismatch draw-control vs none. +(defmethod init-skel-and-collide! ((this warp-gate)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate)) + (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 action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 12288.0 0.0 16384.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) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-warp-gate" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod init-defaults! ((this warp-gate)) + (set! (-> this level-name) (-> this level name)) + (set! (-> this on-notice) (res-lump-struct (-> this entity) 'on-notice pair)) + (set! (-> this on-activate) #f) + (set! (-> this wait-for) #f) + (set! (-> this continue) #f) + (set! (-> this on-close) #f) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 202) this)) + (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 0 :fo-max 30) (-> this root trans) 0.0) + ) + (set! (-> this distance) (res-lump-float (-> this entity) 'distance :default 20480.0)) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior warp-gate-init warp-gate ((arg0 entity-actor) (arg1 vector)) + (stack-size-set! (-> self main-thread) 512) + (init-skel-and-collide! self) + (if arg0 + (process-drawable-from-entity! self arg0) + ) + (if arg1 + (set! (-> self root trans quad) (-> arg1 quad)) + ) + (logior! (-> self mask) (process-mask actor-pause)) + (init-defaults! self) + (go-virtual idle) + (none) + ) + +;; WARN: Return type mismatch none vs object. +(defmethod init-from-entity! ((this warp-gate) (arg0 entity-actor)) + (warp-gate-init arg0 (the-as vector #f)) + ) + +(define *warp-jump-mods* (new 'static 'surface + :name 'jump + :turnv 273066.66 + :turnvf 30.0 + :turnvv 1820444.5 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 65536.0 + :target-speed 65536.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 + :mode 'air + :flags (surface-flag turn-to-vel turn-when-centered gun-off) + ) + ) + +(defstate target-warp-out (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('death-end) + (let ((v0-0 (the-as object (logior (-> self draw status) (draw-control-status no-draw))))) + (set! (-> self draw status) (the-as draw-control-status v0-0)) + v0-0 + ) + ) + (('warp-gate) + (if (not (-> self control unknown-spool-anim00)) + 'busy + ) + ) + (else + (target-generic-event-handler proc argc message block) + ) + ) + ) + :enter (behavior ((arg0 vector) (arg1 vector) (arg2 handle)) + (set-time! (-> self state-time)) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (set! (-> self control mod-surface) *warp-jump-mods*) + (set! (-> self control unknown-vector37 quad) (-> arg0 quad)) + (set! (-> self control unknown-vector38 quad) (-> arg1 quad)) + (+! (-> self control unknown-vector37 y) -4096.0) + (set! (-> self control unknown-word04) (the-as uint #f)) + (set! (-> self control unknown-handle02) arg2) + (vector-reset! (-> self control transv)) + (logior! (-> self target-flags) (target-flags tf6)) + (set! (-> self alt-cam-pos quad) (-> arg1 quad)) + (forward-up-nopitch->quaternion + (-> self control dir-targ) + (vector-! (new 'stack-no-clear 'vector) arg1 (-> self control trans)) + (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self control dir-targ)) + ) + ) + :exit (behavior () + (logclear! (-> self target-flags) (target-flags tf6)) + ) + :code (behavior ((arg0 vector) (arg1 vector) (arg2 handle)) + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! jakb-duck-high-jump-ja :num! (seek! (ja-aframe 16.0 0)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 16.0 0))) + ) + (vector-! (-> self control transv) (-> self control unknown-vector37) (-> self control trans)) + (vector-xz-normalize! (-> self control transv) 32768.0) + (let ((v1-18 (new-stack-vector0))) + (let ((f0-6 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-18 (-> self control transv) (vector-float*! v1-18 (-> self control dynam gravity-normal) f0-6)) + ) + (let* ((f0-7 (vector-length v1-18)) + (f1-1 f0-7) + (f2-4 + (- (sqrtf + (* 2.0 + (-> self control dynam gravity-length) + (vector-dot + (-> self control dynam gravity-normal) + (vector-! (new 'stack-no-clear 'vector) (-> self control unknown-vector37) (-> self control trans)) + ) + ) + ) + (* 0.008333334 (- (-> self control dynam gravity-length))) + ) + ) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f2-4) + (vector-float*! v1-18 v1-18 (/ f0-7 f1-1)) + ) + ) + ) + (let ((v1-20 (-> self control root-prim))) + (set! (-> v1-20 prim-core collide-as) (collide-spec)) + (set! (-> v1-20 prim-core collide-with) (collide-spec)) + ) + 0 + (set-time! (-> self state-time)) + (set! (-> self trans-hook) + (lambda :behavior target + () + (let ((v1-0 (new-stack-vector0)) + (f0-1 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + ) + 0.0 + (vector-! v1-0 (-> self control transv) (vector-float*! v1-0 (-> self control dynam gravity-normal) f0-1)) + (let* ((f1-2 (vector-length v1-0)) + (f2-0 f1-2) + ) + (if (< f0-1 0.0) + (set! f0-1 8192.0) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f0-1) + (vector-float*! v1-0 v1-0 (/ f1-2 f2-0)) + ) + ) + ) + (let ((gp-1 (vector-! (new-stack-vector0) (-> self control unknown-vector37) (-> self control trans)))) + (set! (-> gp-1 y) 0.0) + (send-event *target* 'sidekick #f) + (when (and (or (< (vector-dot gp-1 (-> self control transv)) 0.0) (-> self control unknown-spool-anim00)) + (time-elapsed? (-> self state-time) (seconds 0.05)) + ) + (vector-seek! (-> self draw color-mult) (new 'static 'vector) (* 2.0 (seconds-per-frame))) + (set! (-> self control transv x) (* 0.95 (-> self control transv x))) + (set! (-> self control transv z) (* 0.95 (-> self control transv z))) + (when (not (-> self control unknown-spool-anim00)) + (sound-play "warpgate-tele") + (send-event (handle->process (-> self control unknown-handle02)) 'effect) + (send-event self 'draw #f) + (let ((v0-1 #t)) + (set! (-> self control unknown-word04) (the-as uint v0-1)) + v0-1 + ) + ) + ) + ) + ) + ) + (ja-no-eval :group! jakb-duck-high-jump-ja :num! (seek! (ja-aframe 40.0 0)) :frame-num (ja-aframe 16.0 0)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 40.0 0))) + ) + (sleep-code) + ) + :post target-no-stick-post + ) + +(defstate target-warp-in (target) + :event target-generic-event-handler + :enter (behavior ((arg0 vector) (arg1 vector) (arg2 object)) + (set! (-> self control did-move-to-pole-or-max-jump-height) (the-as float arg2)) + ((-> target-warp-out enter) arg0 arg1 (the-as handle arg2)) + ) + :exit (-> target-warp-out exit) + :trans (behavior () + (set! (-> self control transv x) + (* 2.4 (- (-> self control unknown-vector38 x) (-> self control unknown-vector37 x))) + ) + (set! (-> self control transv z) + (* 2.4 (- (-> self control unknown-vector38 z) (-> self control unknown-vector37 z))) + ) + (if (logtest? (-> self control status) (collide-status on-surface)) + (go target-hit-ground #f) + ) + ) + :code (behavior ((arg0 vector) (arg1 vector) (arg2 object)) + (let ((a0-1 (-> self control did-move-to-pole-or-max-jump-height))) + (when a0-1 + (let ((s5-0 (res-lump-struct (the-as res-lump a0-1) 'camera-name string))) + (when s5-0 + (logclear! (-> self target-flags) (target-flags tf6)) + (process-spawn-function + process + (lambda :behavior process + ((arg0 string)) + (local-vars (a1-2 event-message-block)) + (add-setting! 'entity-name arg0 0.0 0) + (until (send-event-function *camera* a1-2) + (suspend) + (set! a1-2 (new 'stack-no-clear 'event-message-block)) + (let ((v1-2 (process->ppointer self))) + (set! (-> a1-2 from) v1-2) + ) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'intro-done?) + ) + #f + ) + s5-0 + :to self + ) + ) + ) + ) + ) + (let ((v1-12 (-> self control root-prim))) + (set! (-> self control backup-collide-as) (-> v1-12 prim-core collide-as)) + (set! (-> self control backup-collide-with) (-> v1-12 prim-core collide-with)) + ) + (let ((v1-15 (-> self control root-prim))) + (set! (-> v1-15 prim-core collide-as) (collide-spec)) + (set! (-> v1-15 prim-core collide-with) (collide-spec)) + ) + 0 + (ja-channel-set! 0) + (vector-reset! (-> self control transv)) + (move-to-point! (-> self control) (-> self control unknown-vector37)) + (let ((s5-1 (current-time))) + (while (or (not (time-elapsed? s5-1 (seconds 1))) + (< 81920.0 (vector-vector-distance (camera-pos) (-> self control trans))) + ) + (suspend) + ) + ) + (set-heading-vec! (-> self control) (-> self control transv)) + (rot->dir-targ! (-> self control)) + (set-time! (-> self state-time)) + (set! (-> self post-hook) target-no-stick-post) + (ja-channel-set! 1) + (send-event + (if arg2 + (-> (the-as process arg2) child 3) + ) + 'effect + ) + (send-event self 'draw #t) + (sound-play "warpgate-tele") + (ja-no-eval :group! jakb-duck-high-jump-ja :num! (seek! (ja-aframe 42.0 0)) :frame-num (ja-aframe 40.0 0)) + (until (ja-done? 0) + (let ((v1-58 (new-stack-vector0))) + (let ((f0-5 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-58 (-> self control transv) (vector-float*! v1-58 (-> self control dynam gravity-normal) f0-5)) + ) + (let* ((f0-6 (vector-length v1-58)) + (f1-1 f0-6) + (f2-3 + (- (sqrtf (* 4096.0 (-> self control dynam gravity-length))) + (* 0.008333334 (- (-> self control dynam gravity-length))) + ) + ) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f2-3) + (vector-float*! v1-58 v1-58 (/ f0-6 f1-1)) + ) + ) + ) + (suspend) + (ja :num! (seek! (ja-aframe 42.0 0))) + ) + (ja-no-eval :group! jakb-duck-high-jump-ja :num! (seek! (ja-aframe 50.0 0)) :frame-num (ja-aframe 42.0 0)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 50.0 0))) + ) + (let ((v1-79 (-> self control root-prim))) + (set! (-> v1-79 prim-core collide-as) (-> self control backup-collide-as)) + (set! (-> v1-79 prim-core collide-with) (-> self control backup-collide-with)) + ) + (ja-no-eval :group! jakb-duck-high-jump-ja :num! (seek!) :frame-num (ja-aframe 50.0 0)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (target-falling-anim -1 (seconds 0.33)) + ) + :post target-no-move-post + ) + +(defskelgroup skel-air-train air-train air-train-lod0-jg air-train-idle-ja + ((air-train-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 -2 12.5) + :origin-joint-index 3 + ) + +(deftype air-train (warp-gate) + ((part-exhaust-left sparticle-launch-control) + (part-exhaust-right sparticle-launch-control) + (part-dust sparticle-launch-control) + (dust-y float) + (hover-sound sound-id) + (base-pos vector :inline) + ) + ) + + +;; WARN: Return type mismatch warp-gate vs air-train. +(defmethod relocate ((this air-train) (offset int)) + (if (nonzero? (-> this part-exhaust-left)) + (&+! (-> this part-exhaust-left) offset) + ) + (if (nonzero? (-> this part-exhaust-right)) + (&+! (-> this part-exhaust-right) offset) + ) + (if (nonzero? (-> this part-dust)) + (&+! (-> this part-dust) offset) + ) + (the-as air-train ((method-of-type warp-gate relocate) this offset)) + ) + +(defmethod deactivate ((this air-train)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this hover-sound)) + (if (nonzero? (-> this part-exhaust-left)) + (kill-particles (-> this part-exhaust-left)) + ) + (if (nonzero? (-> this part-exhaust-right)) + (kill-particles (-> this part-exhaust-right)) + ) + (if (nonzero? (-> this part-dust)) + (kill-particles (-> this part-dust)) + ) + ((method-of-type warp-gate deactivate) this) + (none) + ) + +;; WARN: Return type mismatch draw-control vs none. +(defmethod init-skel-and-collide! ((this air-train)) + (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 player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 69632.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 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! (-> v1-13 transform-index) 6) + (set-vector! (-> v1-13 local-sphere) 0.0 10240.0 0.0 24576.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)) + (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) 3) + (set-vector! (-> v1-15 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-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) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-air-train" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod init-defaults! ((this air-train)) + (let ((t9-0 (method-of-type warp-gate init-defaults!))) + (t9-0 this) + ) + (set! (-> this base-pos quad) (-> this root trans quad)) + (let ((v1-2 (-> this level-name))) + (set! (-> this dust-y) (cond + ((= v1-2 'nest) + -1105.92 + ) + ((= v1-2 'caspad) + 114647.04 + ) + (else + (the-as float #x7f800000) + ) + ) + ) + ) + (set! (-> this part-exhaust-left) (create-launch-control (-> *part-group-id-table* 206) this)) + (set! (-> this part-exhaust-right) (create-launch-control (-> *part-group-id-table* 206) this)) + (set! (-> this part-dust) (create-launch-control (-> *part-group-id-table* 204) this)) + (set! (-> this root pause-adjust-distance) 368640.0) + (set! (-> this hover-sound) (sound-play "air-train")) + (none) + ) + +(defstate idle (air-train) + :virtual #t + :post (behavior () + (let ((t9-0 (-> (method-of-type warp-gate idle) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (set! (-> self root trans y) (+ (-> self base-pos y) + (* 696.32 (cos (* 66.19798 (the float (mod (current-time) 990))))) + (* 450.56 (cos (* 42.25403 (the float (mod (current-time) 1551))))) + ) + ) + (spawn-from-cspace (-> self part-exhaust-left) (joint-node air-train-lod0-jg thruster_l)) + (spawn-from-cspace (-> self part-exhaust-right) (joint-node air-train-lod0-jg thruster_r)) + (let ((f0-9 (-> self dust-y))) + (when (!= f0-9 (the-as float #x7f800000)) + (let ((a1-2 (new 'stack-no-clear 'vector))) + (set! (-> a1-2 quad) (-> self root trans quad)) + (set! (-> a1-2 y) f0-9) + (spawn (-> self part-dust) a1-2) + ) + ) + ) + (sound-play "air-train" :id (-> self hover-sound) :position (-> self root trans)) + ) + ) + +(defstate use (air-train) + :virtual #t + :code (behavior ((arg0 continue-point)) + (kill-current-talker '() '() 'exit) + (set-time! (-> self state-time)) + (logclear! (-> self mask) (process-mask actor-pause)) + (when (not arg0) + (process-release? *target*) + (go-virtual idle) + ) + (set-setting! 'allow-progress #f 0.0 0) + (set! (-> *setting-control* user-default border-mode) #t) + (set! (-> *level* play?) #t) + (apply-settings *setting-control*) + (sound-stop (-> self hover-sound)) + (set! (-> self hover-sound) (new 'static 'sound-id)) + (script-eval (-> self on-activate)) + (sleep-code) + ) + ) + +(load-scene (new 'static 'scene + :name "desert-air-train-in" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "air-train-5" + :art-group "scenecamera" + :anim "desert-air-train-in" + :parts 4 + :command-list '((0 + (kill "air-train-5") + (fadein (frame-time-30 10)) + (apply ,(lambda () (kill-by-type v-marauder *active-pool*))) + ) + (260 + (part-tracker + "group-warp-fma-drop-thrusters" + entity + "air-train" + joint + "thruster_l" + track + #t + duration + (frame-range 260 475) + ) + (part-tracker + "group-warp-fma-drop-thrusters" + entity + "air-train" + joint + "thruster_r" + track + #t + duration + (frame-range 260 475) + ) + ) + (270 (part-tracker + "group-warp-fma-dust-takeoff" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 270 475) + ) + ) + (350 + (part-tracker + "group-warp-thruster-trail" + entity + "air-train" + joint + "thruster_l" + track + #t + duration + (frame-range 350 475) + subsample-num + (new 'static 'bfloat :data 5.0) + ) + (part-tracker + "group-warp-thruster-trail" + entity + "air-train" + joint + "thruster_r" + track + #t + duration + (frame-range 350 475) + subsample-num + (new 'static 'bfloat :data 5.0) + ) + ) + (475 (fadeout (frame-time-30 5))) + ) + :cut-list '(285) + :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 'warpcast + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min 290)) + :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 'warpcast + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min 290)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "particleman" + :level 'warpcast + :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 "air-train" + :level 'desertb + :art-group "skel-air-train" + :prefix "" + :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-warp" + :end-point "ctyport-warp" + :borrow '() + :sfx-volume 0.75 + :ambient-volume -1.0 + :music-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "desert-air-train-out" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "air-train-5" + :art-group "scenecamera" + :anim "desert-air-train-out" + :parts 3 + :command-list '((0 (kill "air-train-5") (fadein (frame-time-30 10))) + (1 + (part-tracker + "group-warp-fma-drop-thrusters" + entity + "air-train" + joint + "thruster_l" + track + #t + duration + (frame-range 1 200) + ) + (part-tracker + "group-warp-fma-drop-thrusters" + entity + "air-train" + joint + "thruster_r" + track + #t + duration + (frame-range 1 200) + ) + ) + (65 (part-tracker + "group-warp-fma-dust-takeoff" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 65 172) + ) + ) + (290 (fadeout (frame-time-30 5))) + ) + :cut-list '(180) + :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 'warpcast + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((180 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 'warpcast + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((180 max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "particleman" + :level 'warpcast + :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 "air-train" + :level 'desertb + :art-group "skel-air-train" + :prefix "" + :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-warp" + :end-point "desert-warp" + :borrow '() + :sfx-volume 0.75 + :ambient-volume -1.0 + :music-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "city-air-train-out" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-87" + :art-group "scenecamera" + :anim "city-air-train-out" + :parts 2 + :command-list '((0 (kill "air-train-1") (fadein (frame-time-30 10))) (235 (fadeout (frame-time-30 5)))) + :cut-list '(98 188) + :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 'citycast + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :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 'citycast + :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 "air-train" + :level 'ctyport + :art-group "skel-air-train" + :prefix "" + :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 "ctyport-air-train" + :end-point "ctyport-warp" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-volume -1.0 + :music-delay 1500.0 + :on-running '(begin + (sound-play-loop "port-amb-mov") + (sound-play-loop "port-water-mov") + (sound-play-loop "port-gulls-mov") + ) + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "city-air-train-in-desert" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-87" + :art-group "scenecamera" + :anim "city-air-train-in-desert" + :parts 3 + :command-list '((0 (kill "air-train-1") (fadein (frame-time-30 10))) (275 (fadeout (frame-time-30 5)))) + :cut-list '(51 102 226) + :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 'citycast + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min 226)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :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 'citycast + :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 "air-train" + :level 'ctyport + :art-group "skel-air-train" + :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 "ctyport-warp" + :end-point "desert-warp" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-volume -1.0 + :music-delay 1500.0 + :on-running '(begin + (sound-play-loop "port-amb-mov") + (sound-play-loop "port-water-mov") + (sound-play-loop "port-gulls-mov") + ) + :on-complete #f + ) + ) + +(defpartgroup group-warp-fma-dust-takeoff + :id 208 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 844 :flags (sp7))) + ) + +(defpart 844 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 5.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-warp-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-warp-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-warp-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 3.0 :y 3.3 :z 4.3 :w 5.3) + :one-over-x-deltas (new 'static 'vector :x 0.29999995 :y 1.0000002 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-warp-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 3.0 :y 3.3 :z 4.3 :w 5.3) + :one-over-x-deltas (new 'static 'vector :x 0.29999995 :y 1.0000002 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-warp-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-warp-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-warp-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-warp-fma-dust-takeoff-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 5) + :lifetime-offset (seconds 2) + :flags (particle-curve-flags pcf0) + ) + ) + +(set! (-> *part-id-table* 844 init-specs 15 initial-valuef) + (the-as float *part-warp-fma-dust-takeoff-curve-settings*) + ) + +(set! (-> *part-warp-fma-dust-takeoff-curve-settings* color-start) *range-warp-dust-color*) + +(set! (-> *part-warp-fma-dust-takeoff-curve-settings* alpha-start) *range-warp-dust-alpha*) + +(set! (-> *part-warp-fma-dust-takeoff-curve-settings* scale-x-start) *range-warp-dust-scale-x*) + +(set! (-> *part-warp-fma-dust-takeoff-curve-settings* scale-y-start) *range-warp-dust-scale-y*) + +(set! (-> *part-warp-fma-dust-takeoff-curve-settings* r-scalar) #f) + +(set! (-> *part-warp-fma-dust-takeoff-curve-settings* g-scalar) #f) + +(set! (-> *part-warp-fma-dust-takeoff-curve-settings* b-scalar) #f) + +(set! (-> *part-warp-fma-dust-takeoff-curve-settings* a-scalar) *curve-warp-dust-alpha*) + +(set! (-> *part-warp-fma-dust-takeoff-curve-settings* scale-x-scalar) *curve-warp-dust-scale-x*) + +(set! (-> *part-warp-fma-dust-takeoff-curve-settings* scale-y-scalar) *curve-warp-dust-scale-y*) + +(defpartgroup group-warp-fma-drop-thrusters + :id 209 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 845 :flags (sp7)) + (sp-item 846 :flags (sp7) :period (seconds 0.017) :length (seconds 0.017)) + (sp-item 847 :flags (sp7) :period (seconds 0.017) :length (seconds 0.017)) + ) + ) + +(defpart 845 + :init-specs ((:num 1.0) + (:x (meters -2) (meters 4)) + (:y (meters -2) (meters 4)) + (:z (meters -2) (meters 4)) + (:rot-x 5) + (:r 20480.0) + (:g 10240.0) + (:b 8192.0 4096.0) + (:timer (seconds 0.5)) + (:flags (distort launch-along-z)) + ) + ) + +(defpart 846 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 4.0) + (:scale-x (meters 2) (meters 2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 200.0) + (:b 128.0) + (:a 40.0 10.0) + (:vel-y (meters 0.1)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 847 + :init-specs ((:texture (glow level-default-sprite)) + (:num 3.0) + (:scale-x (meters 6) (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 100.0 28.0) + (:b 0.0) + (:a 8.0 8.0) + (:vel-y (meters 0.1)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-warp-thruster-trail + :id 210 + :flags (sp0 sp4 sp13) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 848 :flags (sp7))) + ) + +(defpart 848 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 100.0) + (:g :copy r) + (:b :copy r) + (:a 20.0 10.0) + (:vel-y (meters 0.1)) + (:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.05 -0.05) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) diff --git a/goal_src/jak3/engine/common-obs/water-anim.gc b/goal_src/jak3/engine/common-obs/water-anim.gc index 942896a863..49ca43dbb5 100644 --- a/goal_src/jak3/engine/common-obs/water-anim.gc +++ b/goal_src/jak3/engine/common-obs/water-anim.gc @@ -5,5 +5,435 @@ ;; name in dgo: water-anim ;; dgos: GAME +;; +++wanim-look +(defenum wanim-look + :type int32 + (nst-lake 0) + (forb-foresta 1) + (fora-forestb 2) + (fora-forestc 3) + (fora-forestd 4) + (fora-foreste 5) + (fora-forestf 6) + (waspala-thronesec 7) + (waspala-windowwall 8) + (waspala-frontthrone 9) + (waspala-frontwindowwall 10) + ) +;; ---wanim-look + + ;; DECOMP BEGINS +(deftype water-anim (process-drawable) + ((water-height meters) + (wade-height meters) + (swim-height meters) + (bottom-height meters) + (attack-event symbol) + (attack-id uint32) + (flow flow-control) + (target handle) + (flags water-flag) + (look wanim-look) + (play-ambient-sound? symbol) + (visible symbol) + ) + (:state-methods + unknown + idle + ) + (:methods + (move-to-point! (_type_ vector) int) + (get-ripple-height (_type_ vector) float) + (init-water! (_type_) object) + (alloc-root! (_type_) none) + (water-anim-init! (_type_) none) + (stub (_type_) none) + (set-offset-and-look! (_type_) none) + ) + ) + + +(defmethod relocate ((this water-anim) (offset int)) + (if (nonzero? (-> this flow)) + (&+! (-> this flow) offset) + ) + (call-parent-method this offset) + ) + +(defskelgroup skel-water-anim-nst-lake water-anim-nst water-anim-nst-lake-lod0-jg -1 + ((water-anim-nst-lake-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 300) + ) + +(defskelgroup skel-water-anim-forb-foresta water-anim-forb 0 -1 + ((1 (meters 999999))) + :bounds (static-spherem 0 0 0 500) + ) + +(defskelgroup skel-water-anim-fora-forestb water-anim-fora 0 -1 + ((1 (meters 999999))) + :bounds (static-spherem 0 0 0 500) + ) + +(defskelgroup skel-water-anim-fora-forestc water-anim-fora 2 -1 + ((3 (meters 999999))) + :bounds (static-spherem 0 0 0 500) + ) + +(defskelgroup skel-water-anim-fora-forestd water-anim-fora 4 -1 + ((5 (meters 999999))) + :bounds (static-spherem 0 0 0 500) + ) + +(defskelgroup skel-water-anim-fora-foreste water-anim-fora 6 -1 + ((7 (meters 999999))) + :bounds (static-spherem 0 0 0 500) + ) + +(defskelgroup skel-water-anim-fora-forestf water-anim-fora 8 -1 + ((9 (meters 999999))) + :bounds (static-spherem 0 0 0 500) + ) + +(defskelgroup skel-water-anim-waspala-thronesec water-anim-waspala water-anim-waspala-thronesec-lod0-jg -1 + ((water-anim-waspala-thronesec-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 500) + ) + +(defskelgroup skel-water-anim-waspala-windowwall water-anim-waspala water-anim-waspala-windowwall-lod0-jg -1 + ((water-anim-waspala-windowwall-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 500) + ) + +(defskelgroup skel-water-anim-waspala-frontthrone water-anim-waspala water-anim-waspala-frontthrone-lod0-jg -1 + ((water-anim-waspala-frontthrone-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 500) + ) + +(defskelgroup skel-water-anim-waspala-frontwindowwall water-anim-waspala water-anim-waspala-frontwindowwall-lod0-jg -1 + ((water-anim-waspala-frontwindowwall-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 500) + ) + +(deftype water-anim-look (structure) + ((skel-group string) + (anim int32) + (ambient-sound-spec sound-spec) + ) + ) + + +(define *water-anim-look* + (new 'static 'boxed-array :type water-anim-look + (new 'static 'water-anim-look :skel-group "water-anim-nst-lake" :anim 2 :ambient-sound-spec #f) + (new 'static 'water-anim-look :skel-group "water-anim-forb-foresta" :anim 2 :ambient-sound-spec #f) + (new 'static 'water-anim-look :skel-group "water-anim-fora-forestb" :anim 10 :ambient-sound-spec #f) + (new 'static 'water-anim-look :skel-group "water-anim-fora-forestc" :anim 10 :ambient-sound-spec #f) + (new 'static 'water-anim-look :skel-group "water-anim-fora-forestd" :anim 10 :ambient-sound-spec #f) + (new 'static 'water-anim-look :skel-group "water-anim-fora-foreste" :anim 10 :ambient-sound-spec #f) + (new 'static 'water-anim-look :skel-group "water-anim-fora-forestf" :anim 10 :ambient-sound-spec #f) + (new 'static 'water-anim-look :skel-group "water-anim-waspala-thronesec" :anim 8 :ambient-sound-spec #f) + (new 'static 'water-anim-look :skel-group "water-anim-waspala-windowwall" :anim 8 :ambient-sound-spec #f) + (new 'static 'water-anim-look :skel-group "water-anim-waspala-frontthrone" :anim 8 :ambient-sound-spec #f) + (new 'static 'water-anim-look :skel-group "water-anim-waspala-frontwindowwall" :anim 8 :ambient-sound-spec #f) + ) + ) + +(defbehavior water-anim-event-handler water-anim ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-1 object)) + (case arg2 + (('move-to) + (move-to-point! self (the-as vector (-> arg3 param 0))) + (set! v0-1 (logclear (-> self mask) (process-mask sleep-code))) + (set! (-> self mask) (the-as process-mask v0-1)) + v0-1 + ) + (('move-to-y) + (let ((a1-2 (new 'stack-no-clear 'vector))) + (set! (-> a1-2 quad) (-> self root trans quad)) + (set! (-> a1-2 y) (the-as float (-> arg3 param 0))) + (move-to-point! self a1-2) + ) + (set! v0-1 (logclear (-> self mask) (process-mask sleep-code))) + (set! (-> self mask) (the-as process-mask v0-1)) + v0-1 + ) + (('water) + (let* ((s5-0 (the-as object (-> arg3 param 0))) + (s4-0 (-> arg3 param 1)) + (gp-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when (and (logtest? (-> self flags) (water-flag deadly)) + (logtest? (water-flag touch-water) (-> (the-as water-info s5-0) flags)) + (the-as uint gp-0) + ) + (let ((v1-15 (-> self attack-event))) + (case v1-15 + ((#f) + ) + (('heat) + (send-event (the-as process-tree gp-0) 'heat (* 10.0 (seconds-per-frame))) + ) + (('drown-death 'lava 'dark-eco-pool) + (if (and (not (focus-test? (the-as process-focusable gp-0) board)) + (send-event + (the-as process-tree gp-0) + 'attack-invinc + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (-> self attack-id)) (damage 2.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode v1-15)) + ) + ) + ) + (send-event self 'notify 'attack) + ) + ) + (else + (if (and (not (focus-test? (the-as process-focusable gp-0) board)) + (send-event + (the-as process-tree gp-0) + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (-> self attack-id)) (damage 2.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode v1-15)) + ) + ) + ) + (send-event self 'notify 'attack) + ) + ) + ) + ) + ) + (when (and (logtest? (-> self flags) (water-flag flow)) + (logtest? (water-flag touch-water) (-> (the-as water-info s5-0) flags)) + ) + (let ((a0-40 (-> self flow))) + (if (nonzero? a0-40) + (push-process a0-40 (the-as process-focusable gp-0)) + ) + ) + ) + ) + ) + (('visible) + (cond + ((-> arg3 param 0) + (set! (-> self visible) #t) + ) + (else + (set! (-> self visible) #f) + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + ) + (logclear! (-> self mask) (process-mask sleep-code)) + #t + ) + ) + ) + +(defstate idle (water-anim) + :virtual #t + :event water-anim-event-handler + :trans (behavior () + (let ((a0-0 (-> self flow))) + (if (and (nonzero? a0-0) *display-vol-marks*) + (draw-path a0-0) + ) + ) + (cond + ((not (-> self visible)) + ) + ((< (-> (math-camera-pos) y) (+ -8192.0 (-> self root trans y))) + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + (else + (logclear! (-> self draw status) (draw-control-status no-draw)) + ) + ) + (if (and (-> self visible) (and (-> self play-ambient-sound?) (nonzero? (-> self sound)))) + (update! (-> self sound)) + ) + ) + :code (behavior () + (until #f + (ja-post) + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + #f + ) + ) + +(defmethod move-to-point! ((this water-anim) (arg0 vector)) + (set! (-> this root trans quad) (-> arg0 quad)) + (set! (-> this water-height) (-> this root trans y)) + (if (nonzero? (-> this sound)) + (update-trans! (-> this sound) (-> this root trans)) + ) + ) + +(defmethod get-ripple-height ((this water-anim) (arg0 vector)) + (ripple-find-height this 0 arg0) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod stub ((this water-anim)) + (none) + ) + +;; WARN: Return type mismatch quaternion vs none. +(defmethod set-offset-and-look! ((this water-anim)) + (local-vars (sv-16 res-tag)) + (set! (-> this play-ambient-sound?) #t) + (set! (-> this visible) #t) + (set! (-> this look) + (res-lump-value (-> this entity) 'look wanim-look :default (the-as uint128 -1) :time -1000000000.0) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-4 (res-lump-data (-> this entity) 'trans-offset vector :tag-ptr (& sv-16)))) + (when v1-4 + (+! (-> this root trans x) (-> v1-4 x)) + (+! (-> this root trans y) (-> v1-4 y)) + (+! (-> this root trans z) (-> v1-4 z)) + ) + ) + (let ((f0-6 (res-lump-float (-> this entity) 'rotoffset))) + (if (!= f0-6 0.0) + (quaternion-rotate-y! (-> this root quat) (-> this root quat) f0-6) + ) + ) + (none) + ) + +;; WARN: Return type mismatch none vs object. +(defmethod init-water! ((this water-anim)) + (let ((s5-0 (-> this look))) + (if (or (< (the-as int s5-0) 0) (>= (the-as int s5-0) (-> *water-anim-look* length))) + (go process-drawable-art-error "skel group") + ) + (let ((s5-1 (-> *water-anim-look* s5-0))) + (initialize-skeleton-by-name this (-> s5-1 skel-group)) + (ja-channel-set! 1) + (let ((s4-0 (-> this skel root-channel 0))) + (joint-control-channel-group-eval! + s4-0 + (the-as art-joint-anim (-> this draw art-group data (-> s5-1 anim))) + num-func-identity + ) + (set! (-> s4-0 frame-num) 0.0) + ) + (let ((a2-1 (-> s5-1 ambient-sound-spec))) + (when a2-1 + (let ((a3-0 (new 'stack-no-clear 'vector))) + (vector+! a3-0 (-> this root trans) (-> this draw bounds)) + (set! (-> this sound) (new 'process 'ambient-sound a2-1 a3-0 0.0)) + ) + ) + ) + ) + ) + (ja-post) + ) + +;; WARN: Return type mismatch trsqv vs none. +(defmethod alloc-root! ((this water-anim)) + (set! (-> this root) (new 'process 'trsqv)) + (none) + ) + +;; WARN: Return type mismatch water-flag vs none. +(defmethod water-anim-init! ((this water-anim)) + (local-vars (sv-16 res-tag)) + (set! (-> this attack-event) (the-as symbol ((method-of-type res-lump get-property-struct) + (-> this entity) + 'attack-event + 'interp + -1000000000.0 + (the-as structure 'drown) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (process-drawable-from-entity! this (-> this entity)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this vol) (new 'process 'vol-control this)) + (logior! (-> this vol flags) (vol-flags display? vol-flags-1)) + (set! (-> this bottom-height) 32768.0) + (let* ((v1-8 *game-info*) + (a0-7 (+ (-> v1-8 attack-id) 1)) + ) + (set! (-> v1-8 attack-id) a0-7) + (set! (-> this attack-id) a0-7) + ) + (set! (-> this target) (the-as handle #f)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-10 (the-as (pointer float) ((method-of-type res-lump get-property-data) + (-> this entity) + 'water-height + 'exact + -1000000000.0 + (the-as pointer #f) + (& sv-16) + *res-static-buf* + ) + ) + ) + ) + (when v1-10 + (set! (-> this water-height) (-> v1-10 0)) + (set! (-> this wade-height) (-> v1-10 1)) + (set! (-> this swim-height) (-> v1-10 2)) + (if (>= (-> sv-16 elt-count) (the-as uint 4)) + (set! (-> this flags) (the-as water-flag (the int (-> v1-10 3)))) + ) + (if (>= (-> sv-16 elt-count) (the-as uint 5)) + (set! (-> this bottom-height) (-> v1-10 4)) + ) + ) + ) + (logior! (-> this flags) (water-flag part-water)) + (if (logtest? (-> this flags) (water-flag flow)) + (set! (-> this flow) (new 'process 'flow-control this (the-as res-lump #f))) + ) + (cond + ((zero? (-> this flags)) + (if (< 0.0 (-> this wade-height)) + (logior! (-> this flags) (water-flag can-wade)) + ) + (if (< 0.0 (-> this swim-height)) + (logior! (-> this flags) (water-flag can-swim)) + ) + ) + (else + ) + ) + (none) + ) + +(defbehavior water-anim-init-by-other water-anim ((arg0 entity-actor)) + (process-entity-set! self arg0) + (stub self) + (alloc-root! self) + (water-anim-init! self) + (set-offset-and-look! self) + (init-water! self) + (go-virtual idle) + ) + +(defmethod init-from-entity! ((this water-anim) (arg0 entity-actor)) + (stub this) + (alloc-root! this) + (water-anim-init! this) + (set-offset-and-look! this) + (init-water! this) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/engine/common-obs/water-flow.gc b/goal_src/jak3/engine/common-obs/water-flow.gc index a3fb438c00..f4a813745b 100644 --- a/goal_src/jak3/engine/common-obs/water-flow.gc +++ b/goal_src/jak3/engine/common-obs/water-flow.gc @@ -7,3 +7,614 @@ ;; DECOMP BEGINS +(defun ray-plane-equation-intersect ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector)) + (let* ((f0-1 (vector4-dot arg3 arg1)) + (f1-1 (vector-dot arg3 arg2)) + (f30-0 (/ (- f0-1) f1-1)) + ) + (vector-v*float+! arg0 arg1 arg2 f30-0) + f30-0 + ) + ) + +(deftype flow-section (structure) + ((start vector :inline) + (trailing plane :inline) + (pull-dir vector :inline) + (radial-dir vector :inline) + (speed float) + ) + ) + + +(deftype flow-section-array (inline-array-class) + ((data flow-section :inline :dynamic) + ) + ) + + +(set! (-> flow-section-array heap-base) (the-as uint 80)) + +(deftype flow-control (basic) + ((path path-control) + (speed float) + (belt-radius float) + (sections flow-section-array) + (leading plane :inline) + (collide-bounds sphere :inline) + ) + (:methods + (new (symbol type process-drawable res-lump) _type_) + (draw-path (_type_) none) + (setup (_type_ (pointer float) int) none) + (push-process (_type_ process-focusable) none) + (find-and-push-things (_type_) none) + (flow-control-method-13 (_type_ water-info vector) symbol) + ) + ) + + +(defmethod relocate ((this flow-control) (offset int)) + (if (nonzero? (-> this sections)) + (&+! (-> this sections) offset) + ) + (if (nonzero? (-> this path)) + (&+! (-> this path) offset) + ) + (call-parent-method this offset) + ) + +(defmethod draw-path ((this flow-control)) + (let ((a0-1 (-> this path))) + (if (nonzero? a0-1) + (debug-draw a0-1) + ) + ) + 0 + (none) + ) + +(defmethod flow-control-method-13 ((this flow-control) (arg0 water-info) (arg1 vector)) + (local-vars (v0-7 symbol) (sv-192 vector) (sv-208 vector) (sv-224 flow-section)) + (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))) + (set! (-> s5-0 quad) (-> arg1 quad)) + (set! (-> s5-0 w) 1.0) + (when (>= (vector4-dot s5-0 (the-as vector (-> this leading))) 0.0) + (let* ((s1-0 (-> this sections)) + (s2-0 (-> s1-0 length)) + (a3-0 (the-as object (-> this leading))) + ) + (dotimes (s4-0 s2-0) + (let ((s3-0 (-> s1-0 data s4-0))) + (when (< (vector4-dot s5-0 (the-as vector (-> s3-0 trailing))) 0.0) + (let ((v1-10 (new 'stack-no-clear 'vector))) + (vector-! v1-10 s5-0 (-> s3-0 start)) + (when (>= (-> this belt-radius) (fabs (vector-dot v1-10 (-> s3-0 radial-dir)))) + (let* ((f0-7 (vector-dot v1-10 (-> s3-0 pull-dir))) + (f0-9 (- (-> v1-10 y) (* (-> s3-0 pull-dir y) f0-7))) + ) + (when (and (>= f0-9 -41984.0) (>= 41779.2 f0-9)) + (let ((a0-11 (new 'stack-no-clear 'vector))) + (set! sv-192 (new 'stack-no-clear 'vector)) + (let* ((f30-0 (ray-plane-equation-intersect a0-11 s5-0 (-> s3-0 pull-dir) (the-as vector a3-0))) + (t9-1 ray-plane-equation-intersect) + (a1-5 s5-0) + (a2-4 (-> s3-0 pull-dir)) + (a3-1 (-> s3-0 trailing)) + (f0-10 (t9-1 sv-192 a1-5 a2-4 a3-1)) + ) + (let ((a1-6 (new 'stack-no-clear 'vector))) + (let ((v1-16 (-> s3-0 start))) + (let ((a0-13 (-> s3-0 pull-dir))) + (let ((a2-6 12288.0)) + (.mov vf7 a2-6) + ) + (.lvf vf5 (&-> a0-13 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-6 quad) vf6) + ) + 0 + (let ((f0-12 (/ f30-0 (- f30-0 f0-10)))) + (set! sv-208 (new 'stack-no-clear 'vector)) + (displacement-between-two-points-normalized! (-> this path) sv-208 (+ (the float (if (= s4-0 (+ s2-0 -1)) + (+ s4-0 -1) + s4-0 + ) + ) + f0-12 + ) + ) + ) + ) + ) + (let ((v1-22 (new 'stack-no-clear 'vector))) + (let ((a0-15 v1-22) + (f0-15 (* (-> s3-0 speed) (seconds-per-frame))) + ) + (vector-float*! a0-15 sv-208 f0-15) + ) + (let ((a1-10 (new 'stack-no-clear 'vector))) + (let ((a0-17 s5-0)) + (let ((a2-9 2048.0)) + (.mov vf7 a2-9) + ) + (.lvf vf5 (&-> v1-22 quad)) + (.lvf vf4 (&-> a0-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-10 quad) vf6) + ) + ) + 0 + (let ((s0-1 (-> s3-0 start))) + (set! sv-224 (-> s1-0 data (if (= s4-0 (+ s2-0 -1)) + (+ s4-0 -1) + (+ s4-0 1) + ) + ) + ) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (let ((s2-1 (new 'stack-no-clear 'vector)) + (s1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s2-1 quad) (-> s3-0 pull-dir quad)) + (vector-normalize! s2-1 1.0) + (vector-cross! s1-1 s2-1 *y-vector*) + (vector-normalize! s1-1 1.0) + (vector-cross! (-> arg0 normal) s2-1 s1-1) + ) + (let ((t9-5 vector-segment-distance-point!) + (a3-2 s4-1) + ) + (t9-5 s5-0 s0-1 (the-as vector sv-224) a3-2) + ) + (set! (-> arg0 trans y) (-> s4-1 y)) + ) + ) + (if (< (-> arg0 normal y) 0.0) + (vector-negate! (-> arg0 normal) (-> arg0 normal)) + ) + 0 + (return #t) + ) + ) + ) + ) + ) + ) + (set! a3-0 (+ (the-as uint (-> s1-0 data 0 trailing)) (* 80 s4-0))) + ) + ) + ) + ) + (return #f) + v0-7 + ) + ) + +;; WARN: Function (method 11 flow-control) has a return type of none, but the expression builder found a return statement. +(defmethod push-process ((this flow-control) (arg0 process-focusable)) + (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))) + (set! (-> s5-0 quad) (-> (get-trans arg0 0) quad)) + (set! (-> s5-0 w) 1.0) + (when (>= (vector4-dot s5-0 (the-as vector (-> this leading))) 0.0) + (let* ((v1-7 (-> this sections)) + (a0-3 (-> v1-7 length)) + (a3-0 (the-as object (-> this leading))) + ) + (dotimes (s3-1 a0-3) + (let ((s2-0 (-> v1-7 data s3-1))) + (when (< (vector4-dot s5-0 (the-as vector (-> s2-0 trailing))) 0.0) + (let ((v1-8 (new 'stack-no-clear 'vector))) + (vector-! v1-8 s5-0 (-> s2-0 start)) + (when (>= (-> this belt-radius) (fabs (vector-dot v1-8 (-> s2-0 radial-dir)))) + (let* ((f0-7 (vector-dot v1-8 (-> s2-0 pull-dir))) + (f0-9 (- (-> v1-8 y) (* (-> s2-0 pull-dir y) f0-7))) + ) + (when (and (>= f0-9 -41984.0) (>= 41779.2 f0-9)) + (let* ((a0-11 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'vector)) + (f30-0 (ray-plane-equation-intersect a0-11 s5-0 (-> s2-0 pull-dir) (the-as vector a3-0))) + (f0-10 (ray-plane-equation-intersect s1-0 s5-0 (-> s2-0 pull-dir) (-> s2-0 trailing))) + ) + (let ((a1-13 (new 'stack-no-clear 'vector))) + (let ((v1-13 (-> s2-0 start))) + (let ((a0-13 (-> s2-0 pull-dir))) + (let ((a2-6 12288.0)) + (.mov vf7 a2-6) + ) + (.lvf vf5 (&-> a0-13 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-13 quad) vf6) + ) + 0 + (let ((f0-12 (/ f30-0 (- f30-0 f0-10))) + (s1-1 (new 'stack-no-clear 'vector)) + ) + (displacement-between-two-points-normalized! (-> this path) s1-1 (+ (the float s3-1) f0-12)) + (let ((v1-17 (new 'stack-no-clear 'vector))) + (vector-float*! v1-17 s1-1 (* (-> s2-0 speed) (seconds-per-frame))) + (let ((a1-16 (new 'stack-no-clear 'vector))) + (let ((a0-17 v1-17)) + (let ((a2-9 2048.0)) + (.mov vf7 a2-9) + ) + (.lvf vf5 (&-> a0-17 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 (&-> a1-16 quad) vf6) + ) + 0 + (send-event arg0 'push-trans v1-17 (seconds 10)) + ) + ) + ) + ) + ) + ) + ) + (return #f) + ) + ) + (set! a3-0 (+ (the-as uint (-> v1-7 data 0 trailing)) (* 80 s3-1))) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod find-and-push-things ((this flow-control)) + (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* (the-as bounding-box (-> 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))) + (b! #t cfg-9 :delay (nop!)) + (label cfg-4) + (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 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)) + ) + (label cfg-9) + (b! (!= a0-2 (-> *collide-player-list* alive-list-end)) cfg-4 :delay (nop!)) + ) + ) + (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 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 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-30) + (let ((a1-29 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (if (and a1-29 (not (logtest? (focus-status board) (-> (the-as process-focusable a1-29) focus-status)))) + (push-process this (the-as process-focusable a1-29)) + ) + ) + ) + ) + (label cfg-30) + 0 + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod setup ((this flow-control) (arg0 (pointer float)) (arg1 int)) + (local-vars (sv-32 int) (sv-48 flow-section) (sv-64 int) (sv-80 flow-section)) + (let* ((s5-0 (-> this path)) + (s4-0 (-> s5-0 curve num-cverts)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (let ((s0-0 (new 'process 'flow-section-array (+ s4-0 -1)))) + (set! (-> this sections) s0-0) + (set! (-> this collide-bounds quad) (the-as uint128 0)) + (get-point-in-path! s5-0 s3-0 0.0 'interp) + (vector+! (the-as vector (-> this collide-bounds)) (the-as vector (-> this collide-bounds)) s3-0) + (set! sv-32 (+ s4-0 -1)) + (set! sv-48 (the-as flow-section #f)) + (set! sv-64 0) + (while (< sv-64 sv-32) + (set! sv-80 (-> s0-0 data sv-64)) + (let ((f0-0 1.0)) + (if (< sv-64 arg1) + (set! f0-0 (-> arg0 sv-64)) + ) + (if arg0 + (set! (-> sv-80 speed) (* f0-0 (-> this speed))) + (set! (-> sv-80 speed) (-> this speed)) + ) + ) + (set! (-> sv-80 start quad) (-> s3-0 quad)) + (get-point-in-path! s5-0 s3-0 (the float (+ sv-64 1)) 'interp) + (vector+! (the-as vector (-> this collide-bounds)) (the-as vector (-> this collide-bounds)) s3-0) + (vector-! (-> sv-80 pull-dir) s3-0 (-> sv-80 start)) + (vector-normalize! (-> sv-80 pull-dir) 1.0) + (set! (-> sv-80 trailing quad) (-> sv-80 pull-dir quad)) + (set! (-> sv-80 trailing y) 0.0) + (vector-normalize! (-> sv-80 trailing) 1.0) + (set-vector! (-> sv-80 radial-dir) (- (-> sv-80 trailing z)) 0.0 (-> sv-80 trailing x) 1.0) + (set! (-> sv-80 trailing w) (- (vector-dot s3-0 (the-as vector (-> sv-80 trailing))))) + (when sv-48 + (vector+! + (the-as vector (-> sv-48 trailing)) + (the-as vector (-> sv-48 trailing)) + (the-as vector (-> sv-80 trailing)) + ) + (vector-normalize! (-> sv-48 trailing) 1.0) + (set! (-> sv-48 trailing w) (- (vector-dot (-> sv-80 start) (the-as vector (-> sv-48 trailing))))) + ) + (set! sv-48 sv-80) + sv-48 + (set! sv-64 (+ sv-64 1)) + ) + ) + (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-22 (/ 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-22) + (dotimes (s2-2 s4-0) + (get-point-in-path! s5-0 s3-0 (the float s2-2) 'interp) + (let ((f0-25 (vector-vector-distance-squared s3-0 (-> this collide-bounds)))) + (if (< f30-0 f0-25) + (set! f30-0 f0-25) + ) + ) + ) + (set! (-> this collide-bounds r) (+ (sqrtf f30-0) (-> this belt-radius))) + ) + ) + 0 + (none) + ) + +(defmethod new flow-control ((allocation symbol) (type-to-make type) (arg0 process-drawable) (arg1 res-lump)) + (local-vars (sv-16 res-tag)) + (if (not arg1) + (set! arg1 (-> arg0 entity)) + ) + (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (when (nonzero? gp-0) + (let ((v1-6 (new 'process 'curve-control arg0 'flow -1000000000.0))) + (cond + ((nonzero? v1-6) + (set! (-> gp-0 path) v1-6) + (logior! (-> v1-6 flags) (path-control-flag display draw-line draw-point draw-text)) + (if (< (-> v1-6 curve num-cverts) 2) + (go process-drawable-art-error "bad flow path") + ) + (set! (-> gp-0 speed) (res-lump-float arg1 'speed :default 12288.0)) + (set! (-> gp-0 belt-radius) (res-lump-float arg1 'extra-radius :default 16384.0)) + (set! sv-16 (new 'static 'res-tag)) + (let ((a1-6 (res-lump-data arg1 'scale-factor pointer :tag-ptr (& sv-16)))) + (setup gp-0 (the-as (pointer float) a1-6) (the-as int (-> sv-16 elt-count))) + ) + ) + (else + (go process-drawable-art-error "no flow path") + ) + ) + ) + ) + gp-0 + ) + ) + +(deftype water-flow (process) + ((root collide-shape) + (flow flow-control) + ) + (:state-methods + idle + ) + ) + + +;; WARN: Return type mismatch process vs water-flow. +(defmethod relocate ((this water-flow) (offset int)) + (if (nonzero? (-> this flow)) + (&+! (-> this flow) offset) + ) + (the-as water-flow ((method-of-type process relocate) this offset)) + ) + +(defmethod run-logic? ((this water-flow)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +(defstate idle (water-flow) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('water-info) + (let* ((gp-0 (-> block param 0)) + (s5-0 proc) + (a0-2 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (if (and a0-2 (focus-test? (the-as process-focusable a0-2) board)) + #f + (flow-control-method-13 (-> self flow) (the-as water-info gp-0) (the-as vector (+ gp-0 0))) + ) + ) + ) + (('touch-water) + (let* ((gp-1 (-> self flow)) + (s5-1 proc) + (a1-8 (if (type? s5-1 process-focusable) + s5-1 + ) + ) + ) + (if (and (nonzero? gp-1) (and a1-8 (!= (-> a1-8 type) target) (< 0.0 (-> gp-1 speed)))) + (push-process gp-1 (the-as process-focusable a1-8)) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (draw-path (-> self flow)) + (if (and *target* + (focus-test? *target* touch-water) + (not (logtest? (focus-status board) (-> *target* focus-status))) + ) + (push-process (-> self flow) *target*) + ) + ) + ) + +(defmethod init-from-entity! ((this water-flow) (arg0 entity-actor)) + (set! (-> this root) (the-as collide-shape (new 'process 'trsqv))) + (process-drawable-from-entity! (the-as process-drawable this) arg0) + (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/goal_src/jak3/engine/common-obs/water-h.gc b/goal_src/jak3/engine/common-obs/water-h.gc index 04b5e9cca2..82b6bd09ac 100644 --- a/goal_src/jak3/engine/common-obs/water-h.gc +++ b/goal_src/jak3/engine/common-obs/water-h.gc @@ -5,6 +5,8 @@ ;; name in dgo: water-h ;; dgos: GAME +(define-extern find-water-with-spheres (function (inline-array water-sphere) int water-info object)) + ;; DECOMP BEGINS (deftype water-control (basic) @@ -52,15 +54,15 @@ ) (:methods (new (symbol type process int float float float) _type_) - (water-control-method-9 () none) - (water-control-method-10 () none) + (water-control-method-9 (_type_) none) + (water-control-method-10 (_type_) none) (start-bobbing! (_type_ float int int) none) (distance-from-surface (_type_) float) (spawn-ripples (_type_ float vector int vector symbol) none) (display-water-marks? (_type_) symbol) - (water-control-method-15 () none) - (water-control-method-16 () none) - (water-control-method-17 () none) + (enter-water (_type_) none) + (water-control-method-16 (_type_) none) + (water-control-method-17 (_type_) none) ) ) diff --git a/goal_src/jak3/engine/common-obs/water-part.gc b/goal_src/jak3/engine/common-obs/water-part.gc index 6cc41bd32a..cfbcff6733 100644 --- a/goal_src/jak3/engine/common-obs/water-part.gc +++ b/goal_src/jak3/engine/common-obs/water-part.gc @@ -5,5 +5,734 @@ ;; name in dgo: water-part ;; dgos: GAME +(define-extern *range-wsplash-color* curve-color-fast) +(define-extern *range-wsplash-alpha* curve2d-fast) +(define-extern *range-wsplash-scale-x* curve2d-fast) +(define-extern *range-wsplash-scale-y* curve2d-fast) +(define-extern *curve-wsplash-alpha* curve2d-fast) +(define-extern *curve-wsplash-scale-x* curve2d-fast) +(define-extern *curve-wsplash-scale-y* curve2d-fast) +(define-extern *part-water-splash-curve-settings* particle-curve-settings) +(define-extern *range-splash-color* curve-color-fast) +(define-extern *range-splash-alpha* curve2d-fast) +(define-extern *range-splash-scale-x* curve2d-fast) +(define-extern *range-splash-scale-y* curve2d-fast) +(define-extern *curve-splash-alpha* curve2d-fast) +(define-extern *curve-splash-scale-x* curve2d-fast) +(define-extern *curve-splash-scale-y* curve2d-fast) +(define-extern *part-water-splash-center-curve-settings* particle-curve-settings) +(define-extern *curve-wsplash-small-scale-x* curve2d-fast) +(define-extern *curve-wsplash-small-scale-y* curve2d-fast) +(define-extern *part-water-splash-small-curve-settings* particle-curve-settings) + ;; DECOMP BEGINS +(defpart 756 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 0.1) + (:x (meters -0.25) (meters 0.5)) + (:y (meters -0.05) (meters 0.1)) + (:z (meters -0.25) (meters 0.5)) + (:scale-x (meters 0.05) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 16.0) + (:vel-y (meters 0) (meters 0.006666667)) + (:accel-y (meters 0.00016666666) (meters 0.00016666666)) + (:friction 0.96) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'check-water-level-above-and-die) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 757 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 0.1) + (:x (meters -0.25) (meters 0.5)) + (:y (meters 0.15)) + (:z (meters -0.25) (meters 0.5)) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 16.0) + (:vel-y (meters 0) (meters 0.006666667)) + (:accel-y (meters 0.00033333333)) + (:friction 0.96) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'check-water-level-above-and-die) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 758 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.05) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 16.0) + (:scalevel-x (meters 0.005) (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.04 -0.04) + (:timer (seconds 2.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 759 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.06) + (:x (meters 10)) + (:scale-x (meters 0.75) (meters 1.5)) + (:rot-y (degrees 0)) + (:scale-y (meters 0.75) (meters 1.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:vel-x (meters 0.01) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.004333333)) + (:scalevel-y (meters 0.0033333334) (meters 0.004333333)) + (:fade-a 0.000111111105) + (:friction 0.94) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.3)) + (:next-launcher 760) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 760 + :init-specs ((:fade-a 0.0) (:next-time (seconds 0.3) (seconds 0.397)) (:next-launcher 761)) + ) + +(defpart 761 + :init-specs ((:fade-a -0.21333334)) + ) + +(defpart 762 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 0.05 0.4) + (:x (meters -0.75) (meters 1.5)) + (:z (meters -0.75) (meters 1.5)) + (:scale-x (meters 0.2) (meters 0.7)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:scalevel-x (meters 0.0016666667) (meters 0.003)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.5)) + (:next-launcher 763) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 763 + :init-specs ((:fade-a 0.0) (:next-time (seconds 1.2)) (:next-launcher 764)) + ) + +(defpart 764 + :init-specs ((:fade-a -0.7111111)) + ) + +(defpartgroup group-part-water-splash + :id 192 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 -12 0 14) + :parts ((sp-item 765 :flags (sp7) :period (seconds 10) :length (seconds 0.2)) + (sp-item 766 :flags (sp7) :period (seconds 10) :length (seconds 0.067) :offset 125) + (sp-item 767 :flags (is-3d sp7) :period (seconds 10) :length (seconds 0.067)) + (sp-item 768 :flags (is-3d sp7) :period (seconds 10) :length (seconds 0.167) :offset 125) + (sp-item 769 :flags (is-3d sp7) :period (seconds 10) :length (seconds 0.5) :offset 150) + (sp-item 770 :flags (sp7) :period (seconds 10) :length (seconds 0.167) :offset 20) + (sp-item 771 :flags (sp7) :period (seconds 10) :length (seconds 0.167) :offset 125) + ) + ) + +(defpart 765 + :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.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-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-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-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 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-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 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-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-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-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-water-splash-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.95) :lifetime-offset (seconds 0.1)) + ) + +(set! (-> *part-id-table* 765 init-specs 13 initial-valuef) (the-as float *part-water-splash-curve-settings*)) + +(set! (-> *part-water-splash-curve-settings* color-start) *range-wsplash-color*) + +(set! (-> *part-water-splash-curve-settings* alpha-start) *range-wsplash-alpha*) + +(set! (-> *part-water-splash-curve-settings* scale-x-start) *range-wsplash-scale-x*) + +(set! (-> *part-water-splash-curve-settings* scale-y-start) *range-wsplash-scale-y*) + +(set! (-> *part-water-splash-curve-settings* r-scalar) #f) + +(set! (-> *part-water-splash-curve-settings* g-scalar) #f) + +(set! (-> *part-water-splash-curve-settings* b-scalar) #f) + +(set! (-> *part-water-splash-curve-settings* a-scalar) *curve-wsplash-alpha*) + +(set! (-> *part-water-splash-curve-settings* scale-x-scalar) *curve-wsplash-scale-x*) + +(set! (-> *part-water-splash-curve-settings* scale-y-scalar) *curve-wsplash-scale-y*) + +(defpart 766 + :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)) + (:userdata 0.0) + (:func 'live-func-curve) + ) + ) + +(if #t + (set! *range-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-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-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 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 4.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-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 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-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-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-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-water-splash-center-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.8) :lifetime-offset (seconds 0.4)) + ) + +(set! (-> *part-id-table* 766 init-specs 11 initial-valuef) + (the-as float *part-water-splash-center-curve-settings*) + ) + +(set! (-> *part-water-splash-center-curve-settings* color-start) *range-splash-color*) + +(set! (-> *part-water-splash-center-curve-settings* alpha-start) *range-splash-alpha*) + +(set! (-> *part-water-splash-center-curve-settings* scale-x-start) *range-splash-scale-x*) + +(set! (-> *part-water-splash-center-curve-settings* scale-y-start) *range-splash-scale-y*) + +(set! (-> *part-water-splash-center-curve-settings* r-scalar) #f) + +(set! (-> *part-water-splash-center-curve-settings* g-scalar) #f) + +(set! (-> *part-water-splash-center-curve-settings* b-scalar) #f) + +(set! (-> *part-water-splash-center-curve-settings* a-scalar) *curve-splash-alpha*) + +(set! (-> *part-water-splash-center-curve-settings* scale-x-scalar) *curve-splash-scale-x*) + +(set! (-> *part-water-splash-center-curve-settings* scale-y-scalar) *curve-splash-scale-y*) + +(defpart 767 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.4) + (:scale-x (meters 2) (meters 0.5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 2) (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)) + ) + ) + +(defpart 768 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.2) + (:scale-x (meters 0) (meters 0.1)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 0) (meters 0.1)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.00033333333) (meters 0.006666667)) + (:scalevel-y (meters 0.00033333333) (meters 0.006666667)) + (:fade-a -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + ) + ) + +(defpart 770 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 10.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-water-level-drop) + (:conerot-x (degrees -40) (degrees 80)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 769 + :init-specs ((:texture (ripples level-default-sprite)) + (: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)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 771 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 2.0 2.0) + (: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.026666667) (meters 0.026666667)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'check-water-level-drop) + (:conerot-x (degrees -2) (degrees 4)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-part-water-splash-small + :id 193 + :duration (seconds 3) + :flags (sp0) + :bounds (static-bspherem 0 -12 0 14) + :parts ((sp-item 772 :period (seconds 10) :length (seconds 0.2)) + (sp-item 773 :flags (is-3d) :period (seconds 10) :length (seconds 0.067)) + (sp-item 774 :period (seconds 10) :length (seconds 0.167) :offset 20) + ) + ) + +(defpart 773 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.8) + (:scale-x (meters 0.5) (meters 0.2)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 0.5) (meters 0.2)) + (: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.42666668) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + ) + ) + +(defpart 774 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 5.0) + (: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.006666667) (meters 0.016666668)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'check-water-level-drop) + (:conerot-x (degrees -40) (degrees 80)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 772 + :init-specs ((:texture (splash level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 4.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.01)) + (:friction 0.99) + (: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! *curve-wsplash-small-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.3 :y 0.7 :z 1.7 :w 2.7) + :one-over-x-deltas (new 'static 'vector :x 0.39999998 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-wsplash-small-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 0.7 :z 0.2) + :one-over-x-deltas (new 'static 'vector :x 1.75 :y -1.6666667 :z -0.6666666 :w 1.0) + ) + ) + ) + +(define *part-water-splash-small-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.25) :lifetime-offset (seconds 0.1)) + ) + +(set! (-> *part-id-table* 772 init-specs 13 initial-valuef) + (the-as float *part-water-splash-small-curve-settings*) + ) + +(set! (-> *part-water-splash-small-curve-settings* color-start) *range-wsplash-color*) + +(set! (-> *part-water-splash-small-curve-settings* alpha-start) *range-wsplash-alpha*) + +(set! (-> *part-water-splash-small-curve-settings* scale-x-start) *range-wsplash-scale-x*) + +(set! (-> *part-water-splash-small-curve-settings* scale-y-start) *range-wsplash-scale-y*) + +(set! (-> *part-water-splash-small-curve-settings* r-scalar) #f) + +(set! (-> *part-water-splash-small-curve-settings* g-scalar) #f) + +(set! (-> *part-water-splash-small-curve-settings* b-scalar) #f) + +(set! (-> *part-water-splash-small-curve-settings* a-scalar) *curve-wsplash-alpha*) + +(set! (-> *part-water-splash-small-curve-settings* scale-x-scalar) *curve-wsplash-small-scale-x*) + +(set! (-> *part-water-splash-small-curve-settings* scale-y-scalar) *curve-wsplash-small-scale-y*) + +(defpart 775 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 0.1)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g :copy r) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters 0.16)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 10240.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 776 + :init-specs ((:fade-a -0.64)) + ) + +(defpart 777 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 12.0) + (:y (meters 0)) + (:scale-x (meters 0.08) (meters 0.03)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g :copy r) + (:b 64.0 32.0) + (:a 128.0) + (:omega (degrees 0.01575) (degrees 0.009)) + (:vel-y (meters 0.033333335) (meters 0.05)) + (:accel-y (meters -0.005) (meters -0.00066666666)) + (:friction 0.96 0.02) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 set-conerot)) + (:userdata -208896.0) + (:func 'check-water-level-drop-motion) + (:next-time (seconds 0) (seconds 0.58)) + (:next-launcher 41) + (:conerot-x (degrees 15) (degrees 65)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + (:conerot-radius (meters 0) (meters 1)) + ) + ) + +(defpart 41 + :init-specs ((:r 255.0) (:g 255.0) (:b 255.0) (:next-time (seconds 0.017)) (:next-launcher 778)) + ) + +(defpart 778 + :init-specs ((:r 32.0 32.0) (:g 32.0 32.0) (:b 64.0 32.0) (:next-time (seconds 0) (seconds 1.497)) (:next-launcher 779)) + ) + +(defpart 780 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.3) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32 -0.32) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 set-conerot)) + (:userdata :data (new 'static 'boxed-array :type int32 10 0 0 #x401800 #x403d00 #x400700 #x408200)) + (:func 'sparticle-texture-animate) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 781 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 0.0 0.5) + (:scale-x (meters 0.08) (meters 0.03)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g :copy r) + (:b 64.0 32.0) + (:a 0.0) + (:omega (degrees 0.01575) (degrees 0.009)) + (:vel-y (meters 0.026666667) (meters 0.05)) + (:accel-y (meters -0.005) (meters -0.00066666666)) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 set-conerot)) + (:userdata -208896.0) + (:func 'check-water-level-drop-and-die-motion) + (:next-time (seconds 0) (seconds 0.33)) + (:next-launcher 41) + (:conerot-x (degrees 30) (degrees 40)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 782 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.15) (meters 0.05)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g :copy r) + (:b 64.0 32.0) + (:a 0.0) + (:omega (degrees 0.0225) (degrees 0.0225)) + (:vel-x (meters -0.016666668) (meters 0.0016666667)) + (:vel-y (meters 0.016666668)) + (:vel-z (meters -0.016666668) (meters 0.0016666667)) + (:scalevel-x (meters -0.00016666666)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.001) (meters -0.00033333333)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'check-water-level-drop-motion) + (:next-time (seconds 2)) + (:next-launcher 783) + ) + ) diff --git a/goal_src/jak3/engine/common-obs/water.gc b/goal_src/jak3/engine/common-obs/water.gc index 698463e267..afe1d74b21 100644 --- a/goal_src/jak3/engine/common-obs/water.gc +++ b/goal_src/jak3/engine/common-obs/water.gc @@ -5,5 +5,1151 @@ ;; name in dgo: water ;; dgos: GAME +(define-extern *water-simple-alpha-curve-in* curve2d-piecewise) +(define-extern *water-simple-alpha-curve-fade-out* curve2d-piecewise) +(define-extern *growing-curve* curve2d-piecewise) +(define-extern *color-curve-tan-brown* curve-color-piecewise) +(define-extern *water-wake-trail* light-trail-composition) + ;; DECOMP BEGINS +(defun check-water-level-drop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (when (and (< (-> arg2 y) (-> arg1 user-float)) (< (-> 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 user-float) (-> arg2 z) 1.0) + (sound-play "water-drop" :position gp-0) + (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 780) gp-0) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun check-water-level-drop-and-die ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (if (and (< (-> arg2 y) (-> arg1 user-float)) (< (-> arg1 vel-sxvel y) 0.0)) + (sp-kill-particle arg0 arg1) + ) + (none) + ) + +(defun check-water-level-drop-and-die-motion ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (if (and (< (-> arg2 y) (-> arg1 user-float)) (< (-> arg1 vel-sxvel y) 0.0)) + (sp-kill-particle arg0 arg1) + ) + (sparticle-motion-blur arg0 arg1 arg2) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun check-water-level-above-and-die ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (if (or (>= (-> arg2 y) (-> arg1 user-float)) (and *target* (>= (-> arg2 y) (-> *target* water height)))) + (sp-kill-particle arg0 arg1) + ) + (none) + ) + +(defun check-water-level-drop-motion ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (when (and (< (-> arg2 y) (-> arg1 user-float)) (< (-> arg1 vel-sxvel y) 0.0)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (sp-kill-particle arg0 arg1) + (set-vector! s3-0 (-> arg2 x) (-> arg1 user-float) (-> arg2 z) 1.0) + (sound-play "water-drop" :position s3-0) + (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 780) s3-0) + (set! (-> *part-id-table* 781 init-specs 15 initial-valuef) (-> s3-0 y)) + (launch-particles (-> *part-id-table* 781) s3-0) + ) + ) + (sparticle-motion-blur arg0 arg1 arg2) + (none) + ) + +(when (or (zero? *water-simple-alpha-curve-in*) (!= loading-level global)) + (set! *water-simple-alpha-curve-in* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *water-simple-alpha-curve-in* 2 'loading-level (the-as int #f)) + ) + +(set! (-> *water-simple-alpha-curve-in* pts data 0 first) 0.0) + +(set! (-> *water-simple-alpha-curve-in* pts data 0 second) 0.0) + +(set! (-> *water-simple-alpha-curve-in* pts data 1 first) 1.0) + +(set! (-> *water-simple-alpha-curve-in* pts data 1 second) 1.0) + +(when (or (zero? *growing-curve*) (!= loading-level global)) + (set! *growing-curve* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *growing-curve* 2 'loading-level (the-as int #f)) + ) + +(set! (-> *growing-curve* pts data 0 first) 0.0) + +(set! (-> *growing-curve* pts data 0 second) 1.0) + +(set! (-> *growing-curve* pts data 1 first) 1.0) + +(set! (-> *growing-curve* pts data 1 second) 10.0) + +(when (or (zero? *water-simple-alpha-curve-fade-out*) (!= loading-level global)) + (set! *water-simple-alpha-curve-fade-out* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *water-simple-alpha-curve-fade-out* 2 'loading-level (the-as int #f)) + ) + +(set! (-> *water-simple-alpha-curve-fade-out* pts data 0 first) 0.0) + +(set! (-> *water-simple-alpha-curve-fade-out* pts data 0 second) 1.0) + +(set! (-> *water-simple-alpha-curve-fade-out* pts data 1 first) 1.0) + +(set! (-> *water-simple-alpha-curve-fade-out* pts data 1 second) 0.0) + +(when (or (zero? *color-curve-tan-brown*) (!= loading-level global)) + (set! *color-curve-tan-brown* (new 'loading-level 'curve-color-piecewise)) + (curve-color-piecewise-method-10 *color-curve-tan-brown* 2 'loading-level (the-as uint #f)) + ) + +(set! (-> *color-curve-tan-brown* pts data 0 first) 0.0) + +(set! (-> *color-curve-tan-brown* pts data 0 second x) 1.0) + +(set! (-> *color-curve-tan-brown* pts data 0 second y) 1.0) + +(set! (-> *color-curve-tan-brown* pts data 0 second z) 0.78125) + +(set! (-> *color-curve-tan-brown* pts data 0 second w) 1.0) + +(set! (-> *color-curve-tan-brown* pts data 1 first) 1.0) + +(set! (-> *color-curve-tan-brown* pts data 1 second x) 0.78125) + +(set! (-> *color-curve-tan-brown* pts data 1 second y) 0.78125) + +(set! (-> *color-curve-tan-brown* pts data 1 second z) 0.625) + +(set! (-> *color-curve-tan-brown* pts data 1 second w) 1.0) + +(if (or (zero? *water-wake-trail*) (!= loading-level global)) + (set! *water-wake-trail* (new 'loading-level 'light-trail-composition)) + ) + +(set! (-> *water-wake-trail* color-mode) (the-as uint 0)) + +(set! (-> *water-wake-trail* color-repeat-dist) 40960.0) + +(set! (-> *water-wake-trail* alpha-1-mode) (the-as uint 1)) + +(set! (-> *water-wake-trail* alpha-2-mode) (the-as uint 0)) + +(set! (-> *water-wake-trail* base-alpha) 0.6) + +(set! (-> *water-wake-trail* alpha-repeat-dist) 40960.0) + +(set! (-> *water-wake-trail* width-mode) (the-as uint 0)) + +(set! (-> *water-wake-trail* base-width) 4096.0) + +(set! (-> *water-wake-trail* width-repeat-dist) 40960.0) + +(set! (-> *water-wake-trail* uv-mode) (the-as uint 3)) + +(set! (-> *water-wake-trail* uv-repeat-dist) 40960.0) + +(set! (-> *water-wake-trail* lie-mode) (the-as uint 1)) + +(set! (-> *water-wake-trail* max-age) (seconds 3)) + +(if #f + (set! (-> *water-wake-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *water-wake-trail* tex-id) (the-as uint #x500800)) + ) + +(set! (-> *water-wake-trail* width-curve) *growing-curve*) + +(set! (-> *water-wake-trail* color-curve) *color-curve-tan-brown*) + +(set! (-> *water-wake-trail* alpha-curve-1) *water-simple-alpha-curve-in*) + +(set! (-> *water-wake-trail* alpha-curve-2) *water-simple-alpha-curve-fade-out*) + +(set! (-> *water-wake-trail* zbuffer?) #f) + +(set! (-> *water-wake-trail* lie-vector quad) (-> *up-vector* quad)) + +(set! (-> *water-wake-trail* use-tape-mode?) #t) + +(set! (-> *water-wake-trail* blend-mode) (the-as uint 0)) + +(set! (-> *water-wake-trail* frame-stagger) (the-as uint 1)) + +(defmethod water-control-method-17 ((this water-control)) + (when (and (not (handle->process (-> this ripple))) + (>= (+ (current-time) (seconds -0.1)) (-> this enter-water-time)) + ) + (let ((s5-0 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-0 tracked-obj) (process->handle (-> this process))) + (set! (-> s5-0 appearance) *water-wake-trail*) + (set! (-> s5-0 max-num-crumbs) (the int (* 0.25 (the float (-> s5-0 appearance max-age))))) + (let* ((v1-18 + (estimate-light-trail-mem-usage + (the-as uint (-> s5-0 max-num-crumbs)) + (the-as uint (= (-> s5-0 appearance lie-mode) 3)) + ) + ) + (s4-0 (get-process *default-dead-pool* light-trail-tracker-water (+ v1-18 8192) 1)) + ) + (set! (-> this ripple) + (ppointer->handle (when s4-0 + (let ((t9-2 (method-of-type process activate))) + (t9-2 s4-0 (-> this process) "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-0 light-trail-tracker-init-by-other s5-0) + (-> s4-0 ppointer) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod water-control-method-9 ((this water-control)) + 0 + (none) + ) + +(defmethod water-control-method-10 ((this water-control)) + (local-vars (sv-336 (function vector vector vector vector)) (sv-352 vector)) + (with-pp + (let ((s4-0 (-> this flags)) + (s5-0 (new 'stack-no-clear 'water-info)) + ) + (when (logtest? (water-flag find-water) (-> this flags)) + (water-info-init! (-> this process control) s5-0 (collide-action solid semi-solid)) + (set! (-> this flags) + (logior (logclear + (-> this flags) + (water-flag active can-wade can-swim can-ground use-ocean tar mud use-water-anim swamp over-water) + ) + (logclear (-> s5-0 flags) (water-flag touch-water)) + ) + ) + (set! (-> this base-height) (-> s5-0 base-height)) + (set! (-> this normal quad) (-> s5-0 normal quad)) + (set! (-> this base-ocean-offset) (- (-> s5-0 trans y) (-> s5-0 base-height))) + ) + (cond + ((or (not (logtest? (-> this flags) (water-flag active))) + (logtest? (focus-status teleporting) (-> this process focus-status)) + ) + (logclear! + (-> this flags) + (water-flag under-water head-under-water bouncing wading swimming touch-water jump-out break-surface) + ) + ) + ((and (logtest? (-> this flags) (water-flag no-grab-sound)) + (logtest? (-> this process focus-status) (focus-status grabbed)) + ) + (logior! (-> this flags) (water-flag jump-out)) + (logclear! (-> this flags) (water-flag break-surface)) + ) + ((begin + (set! (-> this top 1 quad) (-> this top 0 quad)) + (vector<-cspace! (the-as vector (-> this top)) (-> this process node-list data (-> this joint-index))) + (+! (-> this top 0 y) (-> this top-y-offset)) + (set! (-> this bottom 1 quad) (-> this bottom 0 quad)) + (set! (-> this bottom 0 quad) (-> this process control trans quad)) + (logclear! (-> this flags) (water-flag under-water head-under-water bouncing wading swimming break-surface)) + (set! (-> this bob-offset) (update! (-> this bob))) + (cond + ((logtest? (-> this flags) (water-flag use-ocean use-water-anim)) + (if (not (logtest? (water-flag touch-water) (-> this flags))) + (set! (-> this ocean-offset) (-> this base-ocean-offset)) + (set! (-> this ocean-offset) (lerp (-> this ocean-offset) (-> this base-ocean-offset) 0.2)) + ) + (set! (-> this base-ocean-offset) 0.0) + ) + (else + (set! (-> this base-ocean-offset) 0.0) + (set! (-> this base-ocean-offset) 0.0) + (set! (-> this ocean-offset) 0.0) + ) + ) + (if (logtest? (focus-status board pilot) (-> this process focus-status)) + (set! (-> this bob-offset) 0.0) + ) + (set! (-> this height) + (+ (-> this base-height) (-> this ocean-offset) (-> this bob-offset) (-> this align-offset)) + ) + (set! (-> this surface-height) (+ (-> this base-height) (-> this base-ocean-offset))) + (cond + ((logtest? (focus-status board pilot) (-> this process focus-status)) + (set! (-> this collide-height) (+ -819.2 (-> this base-ocean-offset) (-> this base-height))) + ) + ((logtest? (-> this flags) (water-flag swim-ground)) + (set! (-> this collide-height) (- (-> this height) (-> this swim-height))) + ) + (else + (set! (-> this collide-height) (- (-> this height) (-> this bottom-height))) + ) + ) + (set! (-> this swim-depth) + (fmax 0.0 (- (- (-> this surface-height) (-> this swim-height)) (-> this bottom 0 y))) + ) + (and (>= (-> this height) (-> this bottom 0 y)) (logtest? (water-flag touch-water) (-> s5-0 flags))) + ) + (if (logtest? (-> this process control status) (collide-status on-water)) + (set-time! (-> this on-water-time)) + ) + (when (not (logtest? (-> this flags) (water-flag dark-eco lava))) + (set! (-> this drip-wetness) 1.0) + (set! (-> this drip-height) (fmax (- (-> this surface-height) (-> this bottom 0 y)) (-> this drip-height))) + (set! (-> this drip-speed) 15.0) + ) + (if (and (not (logtest? (water-flag touch-water) (-> this flags))) + (not (logtest? (-> this process focus-status) (focus-status touch-water))) + ) + (enter-water this) + ) + (logior! (-> this flags) (water-flag touch-water)) + (cond + ((>= (-> this top 0 y) (-> this height)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> this bottom 0 quad)) + (let ((v1-82 (-> this process control transv))) + (sqrtf (+ (* (-> v1-82 x) (-> v1-82 x)) (* (-> v1-82 z) (-> v1-82 z)))) + ) + (logior! (-> this flags) (water-flag break-surface)) + (set! (-> s3-0 y) (+ 40.96 (-> this surface-height))) + (water-control-method-17 this) + (when (and (logtest? (-> this process draw status) (draw-control-status on-screen)) + (zero? (-> this process draw cur-lod)) + (logtest? (water-flag part-rings) (-> this flags)) + (logtest? (water-flag part-water) (-> this flags)) + ) + 0.0 + (let* ((v1-102 (-> this process control transv)) + (f30-0 (sqrtf (+ (* (-> v1-102 x) (-> v1-102 x)) (* (-> v1-102 z) (-> v1-102 z))))) + (s2-0 (new 'stack-no-clear 'matrix)) + ) + (let ((s1-0 forward-up->inv-matrix) + (s0-0 s2-0) + ) + (set! sv-336 vector-flatten!) + (set! sv-352 (-> s2-0 fvec)) + (let ((a1-11 (vector-z-quaternion! (-> s2-0 fvec) (-> this process control quat))) + (a2-2 (-> s5-0 normal)) + ) + (s1-0 s0-0 (sv-336 sv-352 a1-11 a2-2) (-> s5-0 normal)) + ) + ) + (set! (-> s2-0 trans quad) (-> s3-0 quad)) + (set! (-> *part-id-table* 762 init-specs 1 initial-valuef) (* 0.000004150391 f30-0)) + (set! (-> *part-id-table* 762 init-specs 16 initial-valuef) 0.0) + (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 762) s2-0 :origin-is-matrix #t) + (when (< f30-0 4096.0) + (set! (-> *part-id-table* 758 init-specs 2 random-rangef) (-> this ripple-size)) + (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 758) s2-0 :origin-is-matrix #t) + ) + ) + ) + (if (< (-> this top 1 y) (-> this height)) + (spawn-ripples this 0.2 s3-0 1 (-> this process control transv) #t) + ) + ) + ) + (else + (logior! (-> this flags) (water-flag head-under-water)) + ) + ) + (when (and (logtest? (water-flag part-splash) (-> this flags)) (logtest? (water-flag part-water) (-> this flags))) + (cond + ((logtest? (-> this flags) (water-flag lava)) + ) + ((logtest? (-> this flags) (water-flag dark-eco)) + ) + ((logtest? (focus-status mech) (-> this process focus-status)) + ) + (else + (let* ((v0-12 (rand-vu-int-range 3 (+ (-> this process node-list length) -1))) + (s3-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data v0-12))) + ) + (when (< (-> s3-1 y) (-> this surface-height)) + (set! (-> *part-id-table* 756 init-specs 16 initial-valuef) (-> this surface-height)) + (let ((f0-59 (lerp-scale 5.0 0.4 (the float (- (current-time) (-> this enter-water-time))) 0.0 600.0)) + (f1-26 0.00012207031) + (v1-158 (-> this process control transv)) + ) + (set! (-> *part-id-table* 756 init-specs 1 initial-valuef) + (+ f0-59 (* f1-26 (sqrtf (+ (* (-> v1-158 x) (-> v1-158 x)) (* (-> v1-158 z) (-> v1-158 z)))))) + ) + ) + (launch-particles (-> *part-id-table* 756) s3-1) + ) + ) + ) + ) + ) + (let ((f30-1 (- (+ (-> this base-height) (-> this ocean-offset) (-> this bob-offset) (-> this align-offset)) + (-> this swim-height) + ) + ) + ) + (let* ((s3-2 (-> this process control)) + (v1-167 (if (type? s3-2 control-info) + s3-2 + ) + ) + (v1-168 (and v1-167 (not (time-elapsed? (-> v1-167 last-time-on-surface) (seconds 0.5))))) + ) + (if (and (logtest? (-> this flags) (water-flag swim-ground)) + (and v1-168 (not (logtest? (-> this process control status) (collide-status on-water)))) + ) + (set! (-> this bob amp) (* 0.8 (-> this bob amp))) + ) + (cond + ((and (logtest? (-> this flags) (water-flag can-swim)) + (or (logtest? (-> this process control status) (collide-status on-water)) + (>= f30-1 (-> this bottom 0 y)) + (and (logtest? (water-flag swimming) s4-0) + (logtest? (-> this process control status) (collide-status touch-surface)) + (not (logtest? (-> this process control status) (collide-status on-surface))) + (>= (+ 204.8 f30-1) (-> this bottom 0 y)) + ) + ) + (or (logtest? (water-flag swimming) s4-0) + (let ((f0-70 12288.0) + (a0-99 (-> this process control transv)) + ) + (< f0-70 (sqrtf (+ (* (-> a0-99 x) (-> a0-99 x)) (* (-> a0-99 z) (-> a0-99 z))))) + ) + (< (+ (current-time) (seconds -0.2)) (-> this enter-water-time)) + (or (>= (+ (- 204.8 (fmin 6144.0 (+ (-> this ocean-offset) (-> this bob-offset) (-> this align-offset)))) f30-1) + (-> this bottom 0 y) + ) + (and (-> this process next-state) (= (-> this process next-state name) 'target-hit-ground)) + ) + ) + ) + (set-time! (-> this swim-time)) + (send-event (-> this process) 'swim) + (logior! (-> this flags) (water-flag swimming)) + (if (not (logtest? (water-flag swimming) s4-0)) + (set-time! (-> this enter-swim-time)) + ) + (cond + ((and (logtest? (-> this flags) (water-flag swim-ground)) + (logtest? (-> this process control status) (collide-status touch-surface)) + (not (logtest? (water-flag jump-out) (-> this flags))) + ) + (let ((v1-191 (new 'stack-no-clear 'vector))) + (set! (-> v1-191 quad) (-> this bottom 0 quad)) + (set! (-> v1-191 y) (- (-> this height) (-> this swim-height))) + (let ((s3-3 (-> this process control))) + (when (and (not (logtest? (-> s3-3 status) (collide-status touch-background))) + (logtest? (water-flag swimming) (-> this flags)) + (not (logtest? (focus-status board pilot) (-> this process focus-status))) + ) + (let ((a1-37 (vector-! (new 'stack-no-clear 'vector) v1-191 (-> s3-3 trans)))) + (vector-float*! a1-37 a1-37 (-> pp clock frames-per-second)) + (integrate-and-collide! s3-3 a1-37) + ) + (logior! (-> s3-3 status) (collide-status on-surface on-ground touch-surface on-water)) + ) + ) + ) + ) + ((and (< (-> this bottom 0 y) f30-1) (not (logtest? (water-flag jump-out) (-> this flags)))) + (logior! (-> this flags) (water-flag under-water)) + ) + ) + ) + ((begin + (set! v1-168 (and (logtest? (-> this flags) (water-flag can-wade)) + (or (not (!= (-> this bob amp) 0.0)) (time-elapsed? (-> this swim-time) (seconds 0.05))) + (and (>= (- (-> this height) (-> this wade-height)) (-> this bottom 0 y)) v1-168) + ) + ) + v1-168 + ) + (set-time! (-> this wade-time)) + (send-event (-> this process) 'wade) + (logior! (-> this flags) (water-flag wading)) + ) + ((and (< (-> this bottom 0 y) f30-1) (not (logtest? (water-flag jump-out) (-> this flags)))) + (logior! (-> this flags) (water-flag under-water)) + ) + ) + ) + (when (and (logtest? (-> this flags) (water-flag can-swim)) + (< (-> this bottom 1 y) f30-1) + (and (< f30-1 (-> this bottom 0 y)) (logtest? s4-0 (water-flag under-water))) + ) + (logior! (-> this flags) (water-flag swimming)) + (let ((a1-42 (new 'stack-no-clear 'vector))) + (set! (-> a1-42 quad) (-> this bottom 0 quad)) + (let ((s4-1 (-> this process control))) + (set! (-> a1-42 y) f30-1) + (when (not (logtest? (focus-status board pilot) (-> this process focus-status))) + (let ((f30-2 (-> s4-1 ground-impact-vel))) + (move-to-ground-point s4-1 a1-42 (-> s4-1 transv) *up-vector*) + (logior! (-> s4-1 status) (collide-status on-water)) + (set! (-> s4-1 ground-impact-vel) f30-2) + ) + ) + ) + ) + ) + ) + (when (= (-> this process type) target) + (cond + ((logtest? (-> this flags) (water-flag tar)) + (when (and (logtest? (-> this process control status) (collide-status on-surface on-water)) + (not (logtest? (focus-status board pilot) (-> this process focus-status))) + ) + (when (< (-> this process control trans y) (+ -1228.8 (-> this base-height))) + (send-event (-> this process) 'no-look-around (seconds 1.5)) + (if (not (logtest? (-> this process focus-status) (focus-status flut))) + (send-event + (-> this process) + 'attack + #f + (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-up (meters 0.5)) + (shove-back (meters 0)) + (mode 'tar) + ) + ) + ) + ) + (let ((v1-261 (-> this process))) + (set! (-> v1-261 control surf) *tar-surface*) + (set! (-> v1-261 control ground-pat material) 4) + ) + ) + (set! (-> this swim-height) (lerp (-> this swim-height) 7372.8 0.05)) + ) + ) + ((logtest? (-> this flags) (water-flag lava)) + (when (logtest? (-> this process control status) (collide-status on-surface on-water)) + (when (< (-> this process control trans y) (+ -204.8 (-> this base-height))) + (send-event (-> this process) 'no-look-around (seconds 1.5)) + (send-event + (-> this process) + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (the-as uint 2)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (shove-up (meters 0.5)) + (shove-back (meters 0)) + (mode 'melt) + (intersection (-> s5-0 trans)) + ) + ) + ) + ) + (set! (-> this swim-height) (lerp (-> this swim-height) 7372.8 0.05)) + ) + ) + ) + ) + ) + (else + (if (logtest? (water-flag touch-water) (-> this flags)) + (water-control-method-16 this) + ) + ) + ) + ) + (when (not (or (not (logtest? (water-flag part-drip) (-> this flags))) + (not (logtest? (water-flag part-water) (-> this flags))) + (= (-> this drip-wetness) 0.0) + ) + ) + (cond + ((logtest? (water-flag spawn-drip) (-> this flags)) + (let ((v0-28 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data (-> this drip-joint-index))) + ) + ) + (set! (-> *part-id-table* 782 init-specs 18 initial-valuef) (-> this surface-height)) + (set! (-> *part-id-table* 782 init-specs 10 initial-valuef) + (* 0.05 (- (-> v0-28 x) (-> this drip-old-pos x))) + ) + (set! (-> *part-id-table* 782 init-specs 11 initial-valuef) + (* 0.05 (- (-> v0-28 y) (-> this drip-old-pos y))) + ) + (set! (-> *part-id-table* 782 init-specs 12 initial-valuef) + (* 0.05 (- (-> v0-28 z) (-> this drip-old-pos z))) + ) + (launch-particles (-> *part-id-table* 782) v0-28) + ) + (set-time! (-> this drip-time)) + (logclear! (-> this flags) (water-flag spawn-drip)) + (seek! (-> this drip-wetness) 0.0 (* 0.001 (-> this drip-speed))) + (set! (-> this drip-speed) (* 1.05 (-> this drip-speed))) + (if (= (-> this drip-wetness) 0.0) + (set! (-> this drip-height) 0.0) + ) + ) + ((time-elapsed? + (the-as time-frame (the int (/ (the float (-> this drip-time)) (-> this drip-mult)))) + (the int (-> this drip-speed)) + ) + (let* ((s5-1 (rand-vu-int-range 3 (+ (-> this process node-list length) -1))) + (v0-32 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data s5-1))) + ) + (when (and (< (- (-> v0-32 y) (-> this process control trans y)) (-> this drip-height)) + (< (-> this height) (-> v0-32 y)) + ) + (set! (-> this drip-joint-index) s5-1) + (set! (-> this drip-old-pos quad) (-> v0-32 quad)) + (logior! (-> this flags) (water-flag spawn-drip)) + ) + ) + ) + ) + ) + (if (and (not (logtest? (water-flag break-surface) (-> this flags))) (handle->process (-> this ripple))) + (send-event (handle->process (-> this ripple)) 'die) + ) + 0 + (none) + ) + ) + +(defmethod start-bobbing! ((this water-control) (arg0 float) (arg1 int) (arg2 int)) + (with-pp + (activate! (-> this bob) (- arg0) arg1 arg2 0.9 1.0 (-> pp clock)) + 0 + (none) + ) + ) + +(defun part-water-splash-callback ((arg0 part-tracker)) + (let ((f1-0 (-> arg0 root trans y)) + (f0-0 (the-as float (-> arg0 userdata))) + ) + (set! (-> *part-id-table* 777 init-specs 16 initial-valuef) f1-0) + (set! (-> *part-id-table* 777 init-specs 1 initial-valuef) (* 12.0 f0-0)) + ) + 0 + (none) + ) + +(defmethod enter-water ((this water-control)) + (with-pp + (logior! (-> this flags) (water-flag touch-water)) + (logclear! (-> this flags) (water-flag jump-out)) + (set-time! (-> this enter-water-time)) + (set-vector! (-> this enter-water-pos) (-> this bottom 0 x) (-> this surface-height) (-> this bottom 0 z) 1.0) + (when (and (logtest? (water-flag part-splash) (-> this flags)) (logtest? (water-flag part-water) (-> this flags))) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer pp)) + (set! (-> a1-1 num-params) 1) + (set! (-> a1-1 message) 'query) + (set! (-> a1-1 param 0) (the-as uint 'ground-height)) + (let* ((f0-4 (the-as float (send-event-function (-> this process) a1-1))) + (f30-0 (lerp-scale 0.3 1.0 f0-4 2048.0 24576.0)) + ) + (when (not (logtest? (-> this flags) (water-flag dark-eco lava))) + (if (nonzero? (-> this process skel effect)) + (sound-play-by-name (-> this enter-water-sound) (new-sound-id) 1024 0 0 (sound-group) #t) + ) + (spawn-ripples this f30-0 (-> this enter-water-pos) 1 (-> this process control transv) #t) + ) + ) + ) + ) + (if (logtest? (-> this flags) (water-flag tar lava)) + (set! (-> this swim-height) 2867.2) + ) + 0 + (none) + ) + ) + +(defmethod water-control-method-16 ((this water-control)) + (logclear! (-> this flags) (water-flag touch-water)) + (set-zero! (-> this bob)) + (if (logtest? (-> this flags) (water-flag tar lava)) + (set! (-> this swim-height) 2867.2) + ) + 0 + (none) + ) + +(defun splash-spawn ((arg0 float) (arg1 vector) (arg2 int)) + (cond + ((logtest? (-> (if (zero? arg2) + (-> *part-group-id-table* 193) + (-> *part-group-id-table* 192) + ) + flags + ) + (sp-group-flag sp13) + ) + (set! (-> *launch-matrix* trans quad) (-> arg1 quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (if (zero? arg2) + (-> *part-group-id-table* 193) + (-> *part-group-id-table* 192) + ) + :callback (the-as (function part-tracker vector) part-water-splash-callback) + :userdata (the-as uint arg0) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> arg1 quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (if (zero? arg2) + (-> *part-group-id-table* 193) + (-> *part-group-id-table* 192) + ) + :callback (the-as (function part-tracker vector) part-water-splash-callback) + :userdata (the-as uint arg0) + ) + ) + ) + 0 + (none) + ) + +(defun rings-water-spawn ((arg0 float) (arg1 vector) (arg2 vector) (arg3 float) (arg4 float)) + (let* ((v1-0 arg2) + (f30-0 (sqrtf (+ (* (-> v1-0 x) (-> v1-0 x)) (* (-> v1-0 z) (-> v1-0 z))))) + ) + (set! (-> *part-id-table* 759 init-specs 4 initial-valuef) (+ 24576.0 arg0)) + (set! (-> *part-id-table* 759 init-specs 19 initial-valuef) (+ 49152.0 arg0)) + (set! (-> *part-id-table* 759 init-specs 1 initial-valuef) (* 0.0000036621095 f30-0)) + (set! (-> *part-id-table* 759 init-specs 2 initial-valuef) (* 0.1 f30-0)) + (set! (-> *part-id-table* 759 init-specs 13 initial-valuef) 0.7111111) + (set! (-> *part-id-table* 759 init-specs 3 initial-valuef) arg3) + (set! (-> *part-id-table* 759 init-specs 5 initial-valuef) arg3) + (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 759) arg1) + (set! (-> *part-id-table* 762 init-specs 1 initial-valuef) (* 0.000004150391 f30-0)) + (set! (-> *part-id-table* 762 init-specs 16 initial-valuef) arg0) + (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 762) arg1) + (when (< f30-0 4096.0) + (set! (-> *part-id-table* 758 init-specs 2 random-rangef) arg4) + (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 758) arg1) + ) + ) + 0 + (none) + ) + +(defmethod spawn-ripples ((this water-control) (arg0 float) (arg1 vector) (arg2 int) (arg3 vector) (arg4 symbol)) + (local-vars (sv-112 vector)) + (when (and (logtest? (water-flag part-splash) (-> this flags)) + (logtest? (water-flag part-water) (-> this flags)) + (cond + ((< 150 (-> *sp-particle-system-3d* num-alloc 0)) + (= (-> this process type) target) + ) + ((< 100 (-> *sp-particle-system-3d* num-alloc 0)) + (let ((s2-0 vector-vector-distance)) + (set! sv-112 arg1) + (let ((a1-1 (camera-pos))) + (< (s2-0 sv-112 a1-1) 81920.0) + ) + ) + ) + (else + #t + ) + ) + ) + (let ((s2-2 (vector+float*! (new 'stack-no-clear 'vector) arg1 arg3 0.05))) + (set! (-> s2-2 y) (+ 40.96 (-> this surface-height))) + (if (time-elapsed? (-> this distort-time) (seconds 0.1)) + (splash-spawn arg0 s2-2 arg2) + ) + (when (and arg4 (time-elapsed? (-> this distort-time) (seconds 0.3))) + (set-time! (-> this distort-time)) + (let ((s4-1 (process-spawn + manipy + :init manipy-init + s2-2 + (-> this process entity) + (art-group-get-by-name *level* "skel-generic-ripples" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to (-> this process) + :stack-size #x20000 + ) + ) + ) + (when s4-1 + (send-event (ppointer->process s4-1) 'anim-mode 'play1) + (send-event (ppointer->process s4-1) 'anim "idle") + (let ((f0-5 (fmax 0.6 (fmin 1.0 (* 2.0 arg0))))) + (set-vector! (-> (the-as process-drawable (-> s4-1 0)) root scale) f0-5 0.5 f0-5 1.0) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defun water-info<-region ((arg0 water-info) + (arg1 drawable-region-prim) + (arg2 (inline-array water-sphere)) + (arg3 collide-action) + (arg4 process-drawable) + ) + (local-vars (sv-256 process)) + (when (and (-> arg0 prim) (= (-> arg0 prim region) (-> arg1 region))) + (set! arg0 arg0) + (goto cfg-96) + ) + (set! (-> arg0 flags) (water-flag)) + (set! (-> arg0 handle) (the-as handle #f)) + (set! (-> arg0 depth) 0.0) + (let ((s1-0 (the-as object (-> arg1 region on-inside)))) + (set! s1-0 (cond + ((= (-> (the-as pair s1-0) car) 'water) + (empty) + s1-0 + ) + (else + (script-eval (the-as pair s1-0)) + ) + ) + ) + (when s1-0 + (set! (-> arg0 trans quad) (-> arg2 (+ arg3 -1) sphere quad)) + (set-vector! (-> arg0 normal) 0.0 1.0 0.0 1.0) + (case (-> (the-as pair (-> (the-as pair s1-0) cdr)) car) + (('height) + (set! (-> arg0 flags) (water-flag active)) + (set! (-> arg0 trans y) + (* 4096.0 (command-get-float (-> (the-as pair (-> (the-as pair (-> (the-as pair s1-0) cdr)) cdr)) car) 0.0)) + ) + (set! (-> arg0 base-height) (-> arg0 trans y)) + ) + (('ocean) + (set! (-> arg0 flags) (water-flag active use-ocean)) + (set! (-> arg0 trans y) (get-height *ocean* (-> arg0 trans) #f)) + (set! (-> arg0 base-height) (get-base-height *ocean-map*)) + (when (= (-> arg0 trans y) 4095996000.0) + (set! (-> arg0 flags) (water-flag)) + 0 + ) + ) + (('water-anim) + (set! sv-256 (command-get-process + (-> (the-as pair (-> (the-as pair (-> (the-as pair s1-0) cdr)) cdr)) car) + (the-as process #f) + ) + ) + (let ((s0-0 (if (type? sv-256 process-drawable) + sv-256 + ) + ) + ) + (cond + (s0-0 + (set! (-> arg0 flags) (water-flag active use-water-anim)) + (set! (-> arg0 trans y) (ripple-find-height (the-as process-drawable s0-0) 0 (-> arg0 trans))) + (set! (-> arg0 handle) (process->handle s0-0)) + (set! (-> arg0 base-height) (-> (the-as process-drawable s0-0) root trans y)) + ) + (else + (set! (-> arg0 flags) (water-flag)) + 0 + ) + ) + ) + ) + (('water-flow) + (let ((s0-1 (command-get-process + (-> (the-as pair (-> (the-as pair (-> (the-as pair s1-0) cdr)) cdr)) car) + (the-as process #f) + ) + ) + ) + (cond + (s0-1 + (set! (-> arg0 flags) (water-flag active use-water-anim)) + (cond + ((send-event s0-1 'water-info arg0) + (set! (-> arg0 handle) (process->handle s0-1)) + (set! (-> arg0 base-height) (-> arg0 trans y)) + ) + (else + (set! (-> arg0 flags) (water-flag)) + 0 + ) + ) + ) + (else + (set! (-> arg0 flags) (water-flag)) + 0 + ) + ) + ) + ) + (('gspot) + (set! (-> arg0 flags) (water-flag)) + 0 + ) + (else + (set! (-> arg0 flags) (water-flag)) + 0 + ) + ) + (when (logtest? (-> arg0 flags) (water-flag active)) + (let* ((s1-1 (-> (the-as pair (-> (the-as pair (-> (the-as pair (-> (the-as pair s1-0) cdr)) cdr)) cdr)) car)) + (v1-56 (-> (the-as pair s1-1) car)) + ) + (while (not (null? s1-1)) + (cond + ((= v1-56 'swim) + (logior! (-> arg0 flags) (water-flag can-swim can-ground)) + ) + ((= v1-56 'wade) + (logior! (-> arg0 flags) (water-flag can-wade can-ground)) + ) + ((= v1-56 'event) + (logior! (-> arg0 flags) (water-flag event)) + ) + ((= v1-56 'tar) + (logior! (-> arg0 flags) (water-flag tar)) + ) + ((= v1-56 'darkeco) + (logior! (-> arg0 flags) (water-flag dark-eco)) + ) + ((= v1-56 'lava) + (logior! (-> arg0 flags) (water-flag lava)) + ) + ((= v1-56 'mud) + (logior! (-> arg0 flags) (water-flag mud)) + ) + ((= v1-56 'mech) + (let* ((s0-2 arg4) + (a0-50 (if (type? s0-2 process-focusable) + s0-2 + ) + ) + ) + (when (and a0-50 (not (logtest? (focus-status mech) (-> (the-as process-focusable a0-50) focus-status)))) + (set! (-> arg0 flags) (water-flag)) + 0 + ) + ) + (logior! (-> arg0 extra-flags) 1) + ) + ) + (set! s1-1 (-> (the-as pair s1-1) cdr)) + (set! v1-56 (-> (the-as pair s1-1) car)) + ) + ) + (dotimes (s1-2 (the-as int (+ arg3 -1))) + ;; og:preserve-this + (set! (-> (scratchpad-object region-prim-area) pos quad) (-> arg2 s1-2 sphere quad)) + (when (and (within-area? arg1 (scratchpad-object region-prim-area)) + (begin + (logior! (-> arg0 flags) (water-flag over-water)) + (>= (-> arg0 trans y) (- (-> arg2 s1-2 sphere y) (-> arg2 s1-2 sphere r))) + ) + ) + (set! (-> arg0 prim) arg1) + (logior! (-> arg0 flags) (water-flag touch-water)) + (logior! (-> arg2 s1-2 flags) (water-flag touch-water)) + ) + ) + (if (and (logtest? (water-flag event) (-> arg0 flags)) (logtest? (water-flag touch-water) (-> arg0 flags))) + (send-event (handle->process (-> arg0 handle)) 'water arg0 arg4) + ) + ) + ) + ) + (label cfg-96) + arg0 + ) + +(defun find-water-1 ((arg0 water-sphere) (arg1 water-info) (arg2 water-info)) + (local-vars (v0-1 symbol)) + (set! (-> arg2 flags) (water-flag)) + (set! (-> arg2 handle) (the-as handle #f)) + (set! (-> arg1 flags) (water-flag)) + (set! (-> arg1 handle) (the-as handle #f)) + (set! (-> arg2 extra-flags) (the-as uint 0)) + ;; og:preserve-this + (set! (-> (scratchpad-object region-prim-area) region-prim-list num-items) 0) + (set! (-> (scratchpad-object region-prim-area) region-inside-count) 0) + (set! (-> (scratchpad-object region-prim-area) pos quad) (-> arg0 sphere quad)) + (dotimes (gp-0 (-> *level* length)) + (let ((v1-7 (-> *level* level gp-0))) + (when (= (-> v1-7 status) 'active) + (let ((s5-0 (-> v1-7 bsp region-trees))) + (when (nonzero? s5-0) + (let* ((s4-0 (-> s5-0 length)) + (s3-0 0) + (a0-6 (-> s5-0 s3-0)) + ) + (while (< s3-0 s4-0) + (if (= (-> a0-6 name) 'water) + (collect-regions + a0-6 + ;; og:preserve-this + (the-as sphere (-> (scratchpad-object region-prim-area) pos)) + 0 + (the-as region-prim-list (scratchpad-object region-prim-area)) + ) + ) + (+! s3-0 1) + (set! a0-6 (-> s5-0 s3-0)) + ) + ) + ) + ) + ) + ) + ) + ;; og:preserve-this + (return (nonzero? (-> (scratchpad-object region-prim-area) region-prim-list num-items))) + v0-1 + ) + +(defun find-water-2 ((arg0 (inline-array water-sphere)) (arg1 int) (arg2 water-info) (arg3 water-info) (arg4 process-drawable)) + (set! (-> arg2 prim) #f) + (set! (-> arg3 prim) #f) + ;; og:preserve-this + (countdown (s1-0 (-> (scratchpad-object region-prim-area) region-prim-list num-items)) + (water-info<-region + arg3 + (-> (scratchpad-object region-prim-area) region-prim-list items s1-0) + arg0 + (the-as collide-action arg1) + arg4 + ) + (when (and (logtest? (-> arg3 flags) (water-flag active)) + (logtest? (water-flag touch-water) (-> arg3 flags)) + (not (logtest? (-> arg3 extra-flags) 1)) + ) + (mem-copy! (the-as pointer arg2) (the-as pointer arg3) 60) + (send-event (handle->process (-> arg2 handle)) 'touch-water) + (return arg2) + ) + (when (and (logtest? (-> arg3 flags) (water-flag active)) + (logtest? (water-flag touch-water over-water) (-> arg3 flags)) + ) + (mem-copy! (the-as pointer arg2) (the-as pointer arg3) 60) + (if (logtest? (water-flag touch-water) (-> arg2 flags)) + (send-event (handle->process (-> arg2 handle)) 'touch-water) + ) + ) + ) + (the-as water-info #f) + ) + +;; ERROR: Unsupported inline assembly instruction kind - [movz v1, v1, a0] +(defmethod water-info-init! ((this collide-shape) (arg0 water-info) (arg1 collide-action)) + (local-vars (v1-4 int) (a0-3 int) (sv-80 int)) + (let ((s4-0 (new 'stack-no-clear 'water-info))) + (when (find-water-1 (the-as water-sphere (-> this root-prim prim-core)) arg0 s4-0) + (let ((s3-0 (new 'static 'inline-array water-sphere 30 + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + ) + ) + (s2-0 0) + ) + (let ((s0-0 (-> this root-prim))) + (set! sv-80 30) + (let ((a0-2 sv-80) + (v1-3 (-> this total-prims)) + ) + (set-on-less-than a0-3 a0-2 v1-3) + (.movz v1-4 v1-3 a0-3 v1-3) + ) + (set! sv-80 v1-4) + (if (and *debug-segment* (< (the-as uint 30) (-> this total-prims))) + (format *stdcon* "find-water exceeded FIND_WATER_MAX_PRIMS ~D/~D~%" (-> this total-prims) 30) + ) + (while (nonzero? sv-80) + (set! sv-80 (+ sv-80 -1)) + (when (and (nonzero? (-> s0-0 prim-core prim-type)) + (logtest? (-> s0-0 prim-core action) arg1) + (nonzero? (-> s0-0 prim-core collide-with)) + ) + (set! (-> s3-0 s2-0 sphere quad) (-> s0-0 prim-core world-sphere quad)) + (set! (-> s3-0 s2-0 flags) (water-flag)) + (+! s2-0 1) + ) + (&+! s0-0 80) + ) + ) + (let ((v1-26 (-> this root-prim))) + (when (zero? (-> v1-26 prim-core prim-type)) + (set! (-> s3-0 s2-0 sphere quad) (-> v1-26 prim-core world-sphere quad)) + (set! (-> s3-0 s2-0 flags) (water-flag)) + (+! s2-0 1) + ) + ) + (find-water-2 s3-0 s2-0 arg0 s4-0 (-> this process)) + ) + ) + ) + arg0 + ) + +;; WARN: Return type mismatch int vs object. +(defun find-water-with-spheres ((arg0 (inline-array water-sphere)) (arg1 int) (arg2 water-info)) + (let ((s3-0 (new 'stack-no-clear 'water-info))) + (if (not arg2) + (set! arg2 (new 'static 'water-info)) + ) + (if (find-water-1 (-> arg0 (+ arg1 -1)) arg2 s3-0) + (find-water-2 arg0 arg1 arg2 s3-0 (the-as process-drawable #f)) + ) + ) + 0 + ) diff --git a/goal_src/jak3/engine/data/art-h.gc b/goal_src/jak3/engine/data/art-h.gc index 3846c5770d..43dc70a879 100644 --- a/goal_src/jak3/engine/data/art-h.gc +++ b/goal_src/jak3/engine/data/art-h.gc @@ -322,6 +322,7 @@ This stores settings like the name of the art-group, shadow/level-of-detail sett ((lod lod-group 6 :inline) (max-lod int8) ) + :allow-misaligned (:methods (setup-lods! (_type_ skeleton-group art-group entity) _type_) ) @@ -486,4 +487,4 @@ Each process-drawable has a draw-control." ) (import "goal_src/jak3/engine/data/art-elts.gc") -;; (import "goal_src/jak3/engine/data/joint-nodes.gc") +(import "goal_src/jak3/engine/data/joint-nodes.gc") diff --git a/goal_src/jak3/engine/data/font-data.gc b/goal_src/jak3/engine/data/font-data.gc index 1b62a9084c..20e8f9acd8 100644 --- a/goal_src/jak3/engine/data/font-data.gc +++ b/goal_src/jak3/engine/data/font-data.gc @@ -7,3 +7,510 @@ ;; DECOMP BEGINS +(define *font12-table* (new 'static 'inline-array vector 250 + (new 'static 'vector :x 0.0039 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.0322 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.0322 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.1914 :y 0.0322 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.2851 :y 0.0322 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.0322 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.4726 :y 0.0322 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.0322 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.6601 :y 0.0322 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.7539 :y 0.0322 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.8476 :y 0.0322 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.0634 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.0634 :z 1.0 :w 22.5) + (new 'static 'vector :x 0.1914 :y 0.0634 :z 1.0 :w 19.5) + (new 'static 'vector :x 0.2851 :y 0.0634 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.3789 :y 0.0634 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.4726 :y 0.0634 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.0634 :z 1.0 :w 10.5) + (new 'static 'vector :x 0.6601 :y 0.0634 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.7539 :y 0.0634 :z 1.0 :w 10.5) + (new 'static 'vector :x 0.8476 :y 0.0634 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.0947 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.0976 :y 0.0947 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.1914 :y 0.0947 :z 1.0 :w 10.5) + (new 'static 'vector :x 0.2851 :y 0.0947 :z 1.0 :w 7.5) + (new 'static 'vector :x 0.3789 :y 0.0947 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.4726 :y 0.0947 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.5664 :y 0.0947 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.6601 :y 0.0947 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.7539 :y 0.0947 :z 1.0 :w 7.5) + (new 'static 'vector :x 0.8476 :y 0.0947 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.0039 :y 0.1259 :z 1.0 :w 7.5) + (new 'static 'vector :x 0.0976 :y 0.1259 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.1914 :y 0.1259 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.2851 :y 0.1259 :z 1.0 :w 11.25) + (new 'static 'vector :x 0.3789 :y 0.1259 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.4726 :y 0.1259 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.5664 :y 0.1259 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.6601 :y 0.1259 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.7539 :y 0.1259 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.8476 :y 0.1259 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.0039 :y 0.1572 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.0976 :y 0.1572 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.1914 :y 0.1572 :z 1.0 :w 7.5) + (new 'static 'vector :x 0.2851 :y 0.1572 :z 1.0 :w 7.5) + (new 'static 'vector :x 0.3789 :y 0.1572 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.4726 :y 0.1572 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.5664 :y 0.1572 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.6601 :y 0.1572 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.7539 :y 0.1572 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.8476 :y 0.1572 :z 1.0 :w 17.25) + (new 'static 'vector :x 0.0039 :y 0.1884 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.1884 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.1914 :y 0.1884 :z 1.0 :w 15.75) + (new 'static 'vector :x 0.2851 :y 0.1884 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.3789 :y 0.1884 :z 1.0 :w 14.25) + (new 'static 'vector :x 0.4726 :y 0.1884 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.1884 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.6601 :y 0.1884 :z 1.0 :w 7.5) + (new 'static 'vector :x 0.7539 :y 0.1884 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.8476 :y 0.1884 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.2197 :z 1.0 :w 15.75) + (new 'static 'vector :x 0.0976 :y 0.2197 :z 1.0 :w 19.5) + (new 'static 'vector :x 0.1914 :y 0.2197 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.2851 :y 0.2197 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.2197 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.4726 :y 0.2197 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.2197 :z 1.0 :w 15.75) + (new 'static 'vector :x 0.6601 :y 0.2197 :z 1.0 :w 12.75) + (new 'static 'vector :x 0.7539 :y 0.2197 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.8476 :y 0.2197 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.2509 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.2509 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.1914 :y 0.2509 :z 1.0 :w 17.25) + (new 'static 'vector :x 0.2851 :y 0.2509 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.3789 :y 0.2509 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.4726 :y 0.2509 :z 1.0 :w 9.0) + (new 'static 'vector :x 0.5664 :y 0.2509 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.6601 :y 0.2509 :z 1.0 :w 10.5) + (new 'static 'vector :x 0.7539 :y 0.2509 :z 1.0 :w 19.5) + (new 'static 'vector :x 0.8476 :y 0.2509 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.0039 :y 0.2822 :z 1.0 :w 6.0) + (new 'static 'vector :x 0.0976 :y 0.2822 :z 1.0 :w 14.25) + (new 'static 'vector :x 0.1914 :y 0.2822 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.2851 :y 0.2822 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.3789 :y 0.2822 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.4726 :y 0.2822 :z 1.0 :w 12.75) + (new 'static 'vector :x 0.5664 :y 0.2822 :z 1.0 :w 12.75) + (new 'static 'vector :x 0.6601 :y 0.2822 :z 1.0 :w 17.25) + (new 'static 'vector :x 0.7539 :y 0.2822 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.8476 :y 0.2822 :z 1.0 :w 9.0) + (new 'static 'vector :x 0.0039 :y 0.3134 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.0976 :y 0.3134 :z 1.0 :w 14.25) + (new 'static 'vector :x 0.1914 :y 0.3134 :z 1.0 :w 9.75) + (new 'static 'vector :x 0.2851 :y 0.3134 :z 1.0 :w 18.5) + (new 'static 'vector :x 0.3789 :y 0.3134 :z 1.0 :w 14.25) + (new 'static 'vector :x 0.4726 :y 0.3134 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.5664 :y 0.3134 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.6601 :y 0.3134 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.7539 :y 0.3134 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.8476 :y 0.3134 :z 1.0 :w 10.5) + (new 'static 'vector :x 0.0039 :y 0.3447 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.0976 :y 0.3447 :z 1.0 :w 12.75) + (new 'static 'vector :x 0.1914 :y 0.3447 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.2851 :y 0.3447 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.3789 :y 0.3447 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.4726 :y 0.3447 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.5664 :y 0.3447 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.6601 :y 0.3447 :z 1.0 :w 10.5) + (new 'static 'vector :x 0.7539 :y 0.3447 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.3447 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.0039 :y 0.3759 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.0976 :y 0.3759 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.1914 :y 0.3759 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.3759 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.3759 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.3759 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.3759 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.3759 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.3759 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.3759 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.4072 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.4072 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.4072 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.4072 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.4072 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.4072 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.4072 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.4072 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.4072 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.4072 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.4384 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.4384 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.4384 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.4384 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.4384 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.4384 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.4384 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.4384 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.4384 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.4384 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.4697 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.4697 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.4697 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.4697 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.4697 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.4697 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.4697 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.4697 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.4697 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.4697 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.5634 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.5634 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.5634 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.5634 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.5634 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.5634 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.5634 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.5634 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.5634 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.5634 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.5947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.5947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.5947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.5947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.5947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.5947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.5947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.5947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.5947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.5947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.6259 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.6259 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.6259 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.6259 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.6259 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.6259 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.6259 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.6259 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.6259 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.6259 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.6884 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.6884 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.6884 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.6884 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.6884 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.6884 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.6884 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.6884 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.6884 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.6884 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.7509 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.7509 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.7509 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.7509 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.7509 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.7509 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.7509 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.7509 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.7509 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.7509 :z 1.0 :w 16.0) + ) + ) + +(define *font24-table* (new 'static 'inline-array vector 250 + (new 'static 'vector :x 0.0039 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.0322 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.0976 :y 0.0322 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.1914 :y 0.0322 :z 1.0 :w 19.5) + (new 'static 'vector :x 0.2851 :y 0.0322 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.0322 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.4726 :y 0.0322 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.5664 :y 0.0322 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.6601 :y 0.0322 :z 1.0 :w 11.0) + (new 'static 'vector :x 0.7539 :y 0.0322 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.8476 :y 0.0322 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.0039 :y 0.0634 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.0634 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.1914 :y 0.0634 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.2851 :y 0.0634 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.0634 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.4726 :y 0.0634 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.0634 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.6601 :y 0.0634 :z 1.0 :w 11.0) + (new 'static 'vector :x 0.7539 :y 0.0634 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.8476 :y 0.0634 :z 1.0 :w 17.5) + (new 'static 'vector :x 0.0039 :y 0.0947 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.0947 :z 1.0 :w 26.0) + (new 'static 'vector :x 0.1914 :y 0.0947 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.0947 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.0947 :z 1.0 :w 14.0) + (new 'static 'vector :x 0.4726 :y 0.0947 :z 1.0 :w 14.0) + (new 'static 'vector :x 0.5664 :y 0.0947 :z 1.0 :w 22.5) + (new 'static 'vector :x 0.6601 :y 0.0947 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.7539 :y 0.0947 :z 1.0 :w 11.0) + (new 'static 'vector :x 0.8476 :y 0.0947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.1259 :z 1.0 :w 11.0) + (new 'static 'vector :x 0.0976 :y 0.1259 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.1914 :y 0.1259 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.1259 :z 1.0 :w 14.0) + (new 'static 'vector :x 0.3789 :y 0.1259 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.4726 :y 0.1259 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.5664 :y 0.1259 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.6601 :y 0.1259 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.7539 :y 0.1259 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.8476 :y 0.1259 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.0039 :y 0.1572 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.0976 :y 0.1572 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.1914 :y 0.1572 :z 1.0 :w 11.0) + (new 'static 'vector :x 0.2851 :y 0.1572 :z 1.0 :w 20.0) + (new 'static 'vector :x 0.3789 :y 0.1572 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.4726 :y 0.1572 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.5664 :y 0.1572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.1572 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.7539 :y 0.1572 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.8476 :y 0.1572 :z 1.0 :w 26.0) + (new 'static 'vector :x 0.0039 :y 0.1884 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.0976 :y 0.1884 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.1914 :y 0.1884 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.2851 :y 0.1884 :z 1.0 :w 19.0) + (new 'static 'vector :x 0.3789 :y 0.1884 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.4726 :y 0.1884 :z 1.0 :w 26.0) + (new 'static 'vector :x 0.5664 :y 0.1884 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.6601 :y 0.1884 :z 1.0 :w 10.0) + (new 'static 'vector :x 0.7539 :y 0.1884 :z 1.0 :w 19.0) + (new 'static 'vector :x 0.8476 :y 0.1884 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.2197 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.0976 :y 0.2197 :z 1.0 :w 26.0) + (new 'static 'vector :x 0.1914 :y 0.2197 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.2851 :y 0.2197 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.3789 :y 0.2197 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.4726 :y 0.2197 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.5664 :y 0.2197 :z 1.0 :w 19.0) + (new 'static 'vector :x 0.6601 :y 0.2197 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.7539 :y 0.2197 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.8476 :y 0.2197 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.0039 :y 0.2509 :z 1.0 :w 26.0) + (new 'static 'vector :x 0.0976 :y 0.2509 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.1914 :y 0.2509 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.2851 :y 0.2509 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.3789 :y 0.2509 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.2509 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.2509 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.2509 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.2509 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.8476 :y 0.2509 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.2822 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.2822 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.1914 :y 0.2822 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.2851 :y 0.2822 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.2822 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.2822 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.5664 :y 0.2822 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.6601 :y 0.2822 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.7539 :y 0.2822 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.8476 :y 0.2822 :z 1.0 :w 10.0) + (new 'static 'vector :x 0.0039 :y 0.3134 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.0976 :y 0.3134 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.1914 :y 0.3134 :z 1.0 :w 10.0) + (new 'static 'vector :x 0.2851 :y 0.3134 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.3789 :y 0.3134 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.4726 :y 0.3134 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.5664 :y 0.3134 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.3134 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.7539 :y 0.3134 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.3134 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.0039 :y 0.3447 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.3447 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.1914 :y 0.3447 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.2851 :y 0.3447 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.3789 :y 0.3447 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.4726 :y 0.3447 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.5664 :y 0.3447 :z 1.0 :w 20.0) + (new 'static 'vector :x 0.6601 :y 0.3447 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.3447 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.8476 :y 0.3447 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.3759 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.3759 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.3759 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.3759 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.3759 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.3759 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.3759 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.3759 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.3759 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.3759 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.4072 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.4072 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.4072 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.4072 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.4072 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.4072 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.4072 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.4072 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.4072 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.4072 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.4384 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.4384 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.4384 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.4384 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.4384 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.4384 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.4384 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.4384 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.4384 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.4384 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.4697 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.4697 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.4697 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.4697 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.4697 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.4697 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.4697 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.4697 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.4697 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.4697 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.5322 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.5322 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.5322 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.5322 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.5322 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.5322 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.5634 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.0976 :y 0.5634 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.1914 :y 0.5634 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.2851 :y 0.5634 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.5634 :z 1.0 :w 19.0) + (new 'static 'vector :x 0.4726 :y 0.5634 :z 1.0 :w 14.0) + (new 'static 'vector :x 0.5664 :y 0.5634 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.6601 :y 0.5634 :z 1.0 :w 14.0) + (new 'static 'vector :x 0.7539 :y 0.5634 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.8476 :y 0.5634 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.5947 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.0976 :y 0.5947 :z 1.0 :w 19.0) + (new 'static 'vector :x 0.1914 :y 0.5947 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.2851 :y 0.5947 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.3789 :y 0.5947 :z 1.0 :w 20.0) + (new 'static 'vector :x 0.4726 :y 0.5947 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.5664 :y 0.5947 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.6601 :y 0.5947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.5947 :z 1.0 :w 19.0) + (new 'static 'vector :x 0.8476 :y 0.5947 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.6259 :z 1.0 :w 19.0) + (new 'static 'vector :x 0.0976 :y 0.6259 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.1914 :y 0.6259 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.2851 :y 0.6259 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.3789 :y 0.6259 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.4726 :y 0.6259 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.5664 :y 0.6259 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.6601 :y 0.6259 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.7539 :y 0.6259 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.8476 :y 0.6259 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.0039 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.6572 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.1914 :y 0.6572 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.2851 :y 0.6572 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.6572 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.6572 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.6601 :y 0.6572 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.7539 :y 0.6572 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.8476 :y 0.6572 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.6884 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.6884 :z 1.0 :w 13.0) + (new 'static 'vector :x 0.1914 :y 0.6884 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.2851 :y 0.6884 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.6884 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.6884 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.5664 :y 0.6884 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.6601 :y 0.6884 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.7539 :y 0.6884 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.8476 :y 0.6884 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.7197 :z 1.0 :w 13.0) + (new 'static 'vector :x 0.1914 :y 0.7197 :z 1.0 :w 14.0) + (new 'static 'vector :x 0.2851 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.7197 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.4726 :y 0.7197 :z 1.0 :w 14.0) + (new 'static 'vector :x 0.5664 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.7197 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.7539 :y 0.7197 :z 1.0 :w 20.0) + (new 'static 'vector :x 0.8476 :y 0.7197 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.0039 :y 0.7509 :z 1.0 :w 20.0) + (new 'static 'vector :x 0.0976 :y 0.7509 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.1914 :y 0.7509 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.7509 :z 1.0 :w 13.0) + (new 'static 'vector :x 0.3789 :y 0.7509 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.4726 :y 0.7509 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.5664 :y 0.7509 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.7509 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.7539 :y 0.7509 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.7509 :z 1.0 :w 24.0) + ) + ) diff --git a/goal_src/jak3/engine/data/textures.gc b/goal_src/jak3/engine/data/textures.gc new file mode 100644 index 0000000000..fb55f58d20 --- /dev/null +++ b/goal_src/jak3/engine/data/textures.gc @@ -0,0 +1,19825 @@ +(def-tex autoeye-iris common 0) +(def-tex autoeye-lid common 1) +(def-tex autoeye-pupil common 2) +(def-tex common-white common 3) +(def-tex lens-highlight common 4) +(def-tex skull-gem-env common 6) +(def-tex environment-ocean environment-generic 0) +(def-tex pal-environment-front environment-generic 1) +(def-tex war-armor-weathered environment-generic 2) +(def-tex checker programmer 0) +(def-tex colorbars13 programmer 1) +(def-tex programmer_eye_left programmer 2) +(def-tex programmer_eye_right programmer 3) +(def-tex skull-gem-dest programmer 4) +(def-tex bigpuff level-default-sprite 0) +(def-tex crate-metalbolt-splinter level-default-sprite 5) +(def-tex crate-wood-01-splinter level-default-sprite 6) +(def-tex explosion-nebula level-default-sprite 7) +(def-tex footprntr level-default-sprite 11) +(def-tex glow level-default-sprite 13) +(def-tex glow-hotdot level-default-sprite 14) +(def-tex glow-soft level-default-sprite 15) +(def-tex gun-blue-beam level-default-sprite 16) +(def-tex gun-blue-hit-spek level-default-sprite 17) +(def-tex gun-blue-puffs level-default-sprite 18) +(def-tex gun-enemy-beam level-default-sprite 19) +(def-tex gun-enemy-muzzleflash level-default-sprite 20) +(def-tex gun-yellow-beam level-default-sprite 21) +(def-tex gun-yellow-muzzleflash level-default-sprite 22) +(def-tex hotdot level-default-sprite 24) +(def-tex lakedrop level-default-sprite 25) +(def-tex lasersmoke-00 level-default-sprite 26) +(def-tex lasersmoke-01 level-default-sprite 27) +(def-tex lasersmoke-02 level-default-sprite 28) +(def-tex lasersmoke-03 level-default-sprite 29) +(def-tex lasersmoke-04 level-default-sprite 30) +(def-tex lasersmoke-05 level-default-sprite 31) +(def-tex lasersmoke-06 level-default-sprite 32) +(def-tex lasersmoke-07 level-default-sprite 33) +(def-tex lasersmoke-08 level-default-sprite 34) +(def-tex lasersmoke-09 level-default-sprite 35) +(def-tex lasersmoke-10 level-default-sprite 36) +(def-tex lasersmoke-11 level-default-sprite 37) +(def-tex lasersmoke-12 level-default-sprite 38) +(def-tex lasersmoke-13 level-default-sprite 39) +(def-tex lasersmoke-14 level-default-sprite 40) +(def-tex lasersmoke-15 level-default-sprite 41) +(def-tex lasersmoke-16 level-default-sprite 42) +(def-tex lasersmoke-17 level-default-sprite 43) +(def-tex lasersmoke-18 level-default-sprite 44) +(def-tex lasersmoke-19 level-default-sprite 45) +(def-tex lasersmoke-20 level-default-sprite 46) +(def-tex lasersmoke-21 level-default-sprite 47) +(def-tex lasersmoke-22 level-default-sprite 48) +(def-tex lasersmoke-23 level-default-sprite 49) +(def-tex lasersmoke-24 level-default-sprite 50) +(def-tex lasersmoke-25 level-default-sprite 51) +(def-tex lasersmoke-26 level-default-sprite 52) +(def-tex lasersmoke-27 level-default-sprite 53) +(def-tex lasersmoke-28 level-default-sprite 54) +(def-tex lasersmoke-29 level-default-sprite 55) +(def-tex lasersmoke-30 level-default-sprite 56) +(def-tex lasersmoke-31 level-default-sprite 57) +(def-tex lightning-darkjak level-default-sprite 58) +(def-tex green-lightning level-default-sprite 59) +(def-tex middot level-default-sprite 61) +(def-tex motion-blur-part level-default-sprite 62) +(def-tex pal-lightning level-default-sprite 63) +(def-tex pal-lightning-red level-default-sprite 64) +(def-tex rod-of-god level-default-sprite 66) +(def-tex specs level-default-sprite 74) +(def-tex starflash level-default-sprite 75) +(def-tex suckpart level-default-sprite 76) +(def-tex woodchip level-default-sprite 80) +(def-tex flame01 level-default-sprite 83) +(def-tex laser-hit level-default-sprite 84) +(def-tex laser-hit-rim level-default-sprite 85) +(def-tex lightning-anim-01 level-default-sprite 87) +(def-tex lightning-anim-02 level-default-sprite 88) +(def-tex lightning-anim-03 level-default-sprite 89) +(def-tex dirtpuff01 level-default-sprite 92) +(def-tex hitspark level-default-sprite 99) +(def-tex laser-hit2 level-default-sprite 100) +(def-tex water-drops level-default-sprite 101) +(def-tex water-radiate level-default-sprite 102) +(def-tex explosion-edge level-default-sprite 103) +(def-tex topglow level-default-sprite 113) +(def-tex shockwave level-default-sprite 122) +(def-tex vol-light level-default-sprite 128) +(def-tex splash level-default-sprite 129) +(def-tex splash-foam level-default-sprite 130) +(def-tex ripples level-default-sprite 131) +(def-tex laser-hit2-add level-default-sprite 134) +(def-tex shell-casing-01 level-default-sprite 135) +(def-tex shell-casing-02 level-default-sprite 136) +(def-tex shell-casing-03 level-default-sprite 137) +(def-tex rockbit01 level-default-sprite 139) +(def-tex rockbit02 level-default-sprite 140) +(def-tex lightning-tile level-default-sprite 143) +(def-tex colorflash level-default-sprite 147) +(def-tex rainbow-halo level-default-sprite 148) +(def-tex diamond-star level-default-sprite 150) +(def-tex redpuff level-default-sprite 154) +(def-tex edge-cloud level-default-sprite 155) +(def-tex ring level-default-sprite 156) +(def-tex tinyspeck level-default-sprite 158) +(def-tex explo-texture level-default-sprite 159) +(def-tex big-cloud level-default-sprite 160) +(def-tex rockbit03 level-default-sprite 161) +(def-tex rockbit04 level-default-sprite 162) +(def-tex rockbit05 level-default-sprite 163) +(def-tex rockbit06 level-default-sprite 164) +(def-tex rockbit07 level-default-sprite 165) +(def-tex rockbit08 level-default-sprite 166) +(def-tex rockbit09 level-default-sprite 167) +(def-tex rockbit10 level-default-sprite 168) +(def-tex rockbit11 level-default-sprite 169) +(def-tex rockbit12 level-default-sprite 170) +(def-tex rockbit13 level-default-sprite 171) +(def-tex rockbit14 level-default-sprite 172) +(def-tex rockbit15 level-default-sprite 173) +(def-tex rockbit16 level-default-sprite 174) +(def-tex light-burst level-default-sprite 175) +(def-tex static1 level-default-sprite 176) +(def-tex static2 level-default-sprite 177) +(def-tex leaf1 level-default-sprite 180) +(def-tex leaf2 level-default-sprite 181) +(def-tex leaf3 level-default-sprite 182) +(def-tex radial-gradient level-default-sprite 183) +(def-tex radial-gradient-yellow level-default-sprite 184) +(def-tex radial-halo level-default-sprite 185) +(def-tex bomb-gradient level-default-water 0) +(def-tex bomb-gradient-flames level-default-water 1) +(def-tex bomb-gradient-rim level-default-water 2) +(def-tex loadsave-frame level-default-water 3) +(def-tex loadsave-screen level-default-water 4) +(def-tex blue-beam-dest level-default-water 7) +(def-tex water-wake level-default-water 8) +(def-tex lightning-beam-01 level-default-water 13) +(def-tex lightning-beam-02 level-default-water 14) +(def-tex blue-needle level-default-water 15) +(def-tex environment-lightjak level-default-water 16) +(def-tex environment-lightjak-wing level-default-water 17) +(def-tex red-bomb-gradient level-default-water 19) +(def-tex lightjak-wings level-default-water 22) +(def-tex lightjak-wings-u-src level-default-water 23) +(def-tex lightjak-wings-v-src level-default-water 24) +(def-tex yellow-laser level-default-water 30) +(def-tex mushroom-dest level-default-water 31) +(def-tex mushroom-src level-default-water 32) +(def-tex com-rod-01 level-default-water 40) +(def-tex charHOLD level-default-tfrag 4) +(def-tex cmn-precursor-metal-plain-01small level-default-tfrag 5) +(def-tex common-black level-default-tfrag 6) +(def-tex common-transparent level-default-tfrag 7) +(def-tex egg-ndimadman level-default-tfrag 8) +(def-tex fuel-cell-endcaps level-default-tfrag 9) +(def-tex fuel-cell-inside level-default-tfrag 10) +(def-tex grunt-gem-01 level-default-tfrag 11) +(def-tex krimsoncrate-01 level-default-tfrag 12) +(def-tex krimsoncrate-02 level-default-tfrag 13) +(def-tex krimsoncrate-04 level-default-tfrag 14) +(def-tex krimsoncrate-05 level-default-tfrag 15) +(def-tex krimsoncrate-lod02 level-default-tfrag 16) +(def-tex krimsoncrate-lod03 level-default-tfrag 17) +(def-tex krimsoncrate-lod04 level-default-tfrag 18) +(def-tex life-crate level-default-tfrag 19) +(def-tex life-crate-alpha-green level-default-tfrag 20) +(def-tex life-crate-bolt level-default-tfrag 21) +(def-tex life-crate-plain level-default-tfrag 22) +(def-tex skull-gem-alpha-00 level-default-tfrag 23) +(def-tex skull-gem-alpha-01 level-default-tfrag 24) +(def-tex skull-gem-alpha-02 level-default-tfrag 25) +(def-tex skull-gem-alpha-03 level-default-tfrag 26) +(def-tex bam-eyelight level-default-pris 0) +(def-tex bam-hairhilite level-default-pris 1) +(def-tex bam-iris-16x16 level-default-pris 2) +(def-tex bam-leather-belt level-default-pris 3) +(def-tex board-blueglow level-default-pris 4) +(def-tex board-edge level-default-pris 5) +(def-tex board-fins level-default-pris 6) +(def-tex board-fins-bottom level-default-pris 7) +(def-tex board-iris level-default-pris 8) +(def-tex board-iris-bottom level-default-pris 9) +(def-tex board-main level-default-pris 10) +(def-tex board-main-bottom level-default-pris 11) +(def-tex environment-oldmetal level-default-pris 13) +(def-tex environment-title level-default-pris 14) +(def-tex gun-backslit level-default-pris 15) +(def-tex gun-barrel-alt level-default-pris 16) +(def-tex gun-blue-glow level-default-pris 17) +(def-tex gun-blue-mag level-default-pris 18) +(def-tex gun-cover level-default-pris 19) +(def-tex gun-dark-mag level-default-pris 20) +(def-tex gun-eye level-default-pris 21) +(def-tex gun-laser level-default-pris 22) +(def-tex gun-leather level-default-pris 23) +(def-tex gun-magport level-default-pris 24) +(def-tex gun-main level-default-pris 25) +(def-tex gun-pump level-default-pris 26) +(def-tex gun-purple-glow level-default-pris 27) +(def-tex gun-red-glow level-default-pris 28) +(def-tex gun-red-mag level-default-pris 29) +(def-tex gun-teeth level-default-pris 30) +(def-tex gun-tip level-default-pris 31) +(def-tex gun-yellow-glow level-default-pris 32) +(def-tex gun-yellow-mag level-default-pris 33) +(def-tex gun-yellow-mag-end level-default-pris 34) +(def-tex gun-yellowgreen level-default-pris 35) +(def-tex jakbsmall-brownleather level-default-pris 38) +(def-tex jakbsmall-jacketbody level-default-pris 54) +(def-tex jakbsmall-jacketsleeve level-default-pris 55) +(def-tex sk-armfur level-default-pris 64) +(def-tex sk-bodyfur level-default-pris 65) +(def-tex sk-ear level-default-pris 66) +(def-tex sk-eye-lid level-default-pris 67) +(def-tex sk-finger level-default-pris 68) +(def-tex sk-orange2yellowfur level-default-pris 69) +(def-tex sk-shinywhite level-default-pris 70) +(def-tex sk-solidorangefur level-default-pris 71) +(def-tex sk-yellowfurnew level-default-pris 72) +(def-tex talkbox-body-01 level-default-pris 73) +(def-tex talkbox-body-02 level-default-pris 74) +(def-tex talkbox-body-03 level-default-pris 75) +(def-tex talkbox-body-04 level-default-pris 76) +(def-tex talkbox-body-05 level-default-pris 77) +(def-tex talkbox-body-06 level-default-pris 78) +(def-tex talkbox-body-07 level-default-pris 79) +(def-tex talkbox-body-08 level-default-pris 80) +(def-tex talkbox-grill-01 level-default-pris 81) +(def-tex talkbox-light-01 level-default-pris 82) +(def-tex talkbox-light-02 level-default-pris 83) +(def-tex talkbox-orange-01 level-default-pris 84) +(def-tex jakc-arm level-default-pris 85) +(def-tex jakc-armor level-default-pris 86) +(def-tex jakc-beltbuckles level-default-pris 87) +(def-tex jakc-blackstrap level-default-pris 89) +(def-tex jakc-brownstrap level-default-pris 90) +(def-tex jakc-chestplate level-default-pris 91) +(def-tex jakc-chestplate-straps level-default-pris 92) +(def-tex jakc-eyebrow level-default-pris 93) +(def-tex jakc-face level-default-pris 94) +(def-tex jakc-finger level-default-pris 95) +(def-tex jakc-flap level-default-pris 96) +(def-tex jakc-forearm-arm level-default-pris 97) +(def-tex jakc-glovetop level-default-pris 98) +(def-tex jakc-gogglemetal level-default-pris 99) +(def-tex jakc-hair level-default-pris 100) +(def-tex jakc-horn level-default-pris 101) +(def-tex jakc-jacketbody level-default-pris 102) +(def-tex jakc-leatherpouch level-default-pris 103) +(def-tex jakc-leatherstrap level-default-pris 104) +(def-tex jakc-leggging level-default-pris 105) +(def-tex jakc-lens level-default-pris 106) +(def-tex jakc-pants level-default-pris 107) +(def-tex jakc-scarf level-default-pris 108) +(def-tex jakc-scarfhanging level-default-pris 109) +(def-tex jakc-shoebottom level-default-pris 110) +(def-tex jakc-shoeplate level-default-pris 111) +(def-tex jakc-shoetop level-default-pris 112) +(def-tex jakc-shoulderarmor-01 level-default-pris 113) +(def-tex jakc-skirt level-default-pris 114) +(def-tex jakc-waistband level-default-pris 115) +(def-tex jakc-waistband2 level-default-pris 116) +(def-tex jakc-wraps level-default-pris 117) +(def-tex jakc-wristband-a2 level-default-pris 118) +(def-tex jakc-wristbands-a level-default-pris 119) +(def-tex jakc-arm-dark level-default-pris 121) +(def-tex jakc-arm-norm level-default-pris 122) +(def-tex jakc-eyebrow-dark level-default-pris 123) +(def-tex jakc-eyebrow-norm level-default-pris 124) +(def-tex jakc-face-dark level-default-pris 125) +(def-tex jakc-face-norm level-default-pris 126) +(def-tex jakc-finger-dark level-default-pris 127) +(def-tex jakc-finger-norm level-default-pris 128) +(def-tex jakc-hair-dark level-default-pris 129) +(def-tex jakc-hair-norm level-default-pris 130) +(def-tex common-gray-dark level-default-pris 131) +(def-tex common-gray sky-textures 0) +(def-tex environment-ocean-alphamod sky-textures 1) +(def-tex full-moon sky-textures 2) +(def-tex sky-glow-soft sky-textures 3) +(def-tex sky-hotdot sky-textures 4) +(def-tex checkpoint level-default-minimap 0) +(def-tex hud-arrow-dkpwr-01 level-default-minimap 1) +(def-tex hud-arrow-down-01 level-default-minimap 2) +(def-tex hud-arrow-left-01 level-default-minimap 3) +(def-tex hud-arrow-right-01 level-default-minimap 4) +(def-tex hud-arrow-top-01 level-default-minimap 5) +(def-tex hud-darkeco-pickup-01 level-default-minimap 10) +(def-tex hud-egg-glow level-default-minimap 15) +(def-tex hud-green-eco-pickup-01 level-default-minimap 16) +(def-tex hud-gun-blue-shell-01 level-default-minimap 19) +(def-tex hud-gun-empty-shell-01 level-default-minimap 20) +(def-tex hud-gun-purple-shell-01 level-default-minimap 22) +(def-tex hud-gun-red-shell-01 level-default-minimap 24) +(def-tex hud-gun-yellow-shell-01 level-default-minimap 26) +(def-tex hud-mapring-01 level-default-minimap 34) +(def-tex hud-mapring-alarm-01 level-default-minimap 35) +(def-tex map-target-marker level-default-minimap 36) +(def-tex hud-npcring-01 level-default-minimap 37) +(def-tex hud-npcring-bar-01 level-default-minimap 38) +(def-tex hud-scoreboard-01 level-default-minimap 41) +(def-tex hud-timerboard-01 level-default-minimap 42) +(def-tex hud-transparent-01 level-default-minimap 43) +(def-tex minimap-mask level-default-minimap 44) +(def-tex mini-map-icons level-default-minimap 45) +(def-tex map-guard-frustum level-default-minimap 46) +(def-tex hud-arrow-down-01-lit level-default-minimap 51) +(def-tex hud-arrow-left-01-lit level-default-minimap 52) +(def-tex hud-arrow-right-01-lit level-default-minimap 53) +(def-tex hud-arrow-top-01-lit level-default-minimap 54) +(def-tex hud-gunblue-01a level-default-minimap 58) +(def-tex hud-gunblue-02a level-default-minimap 59) +(def-tex hud-gunblue-03a level-default-minimap 60) +(def-tex hud-gunblue-common-01 level-default-minimap 61) +(def-tex hud-gunred-01a level-default-minimap 62) +(def-tex hud-gunred-02a level-default-minimap 63) +(def-tex hud-gunred-03a level-default-minimap 64) +(def-tex hud-gunred-common-01 level-default-minimap 65) +(def-tex hud-gunyellow-01a level-default-minimap 66) +(def-tex hud-gunyellow-02a level-default-minimap 67) +(def-tex hud-gunyellow-03a level-default-minimap 68) +(def-tex hud-gunyellow-03b level-default-minimap 69) +(def-tex hud-gunyellow-common-01 level-default-minimap 70) +(def-tex hud-arrow-down-02 level-default-minimap 71) +(def-tex hud-arrow-down-02-lit level-default-minimap 72) +(def-tex hud-arrow-left-02 level-default-minimap 73) +(def-tex hud-arrow-left-02-lit level-default-minimap 74) +(def-tex hud-arrow-right-02 level-default-minimap 75) +(def-tex hud-arrow-right-02-lit level-default-minimap 76) +(def-tex hud-arrow-top-02 level-default-minimap 77) +(def-tex hud-arrow-top-02-lit level-default-minimap 78) +(def-tex hud-gun-reticle level-default-minimap 79) +(def-tex hud-gunpurple-01a level-default-minimap 80) +(def-tex hud-gunpurple-02a level-default-minimap 81) +(def-tex hud-gunpurple-03a level-default-minimap 82) +(def-tex hud-gunpurple-common-01 level-default-minimap 83) +(def-tex hud-newhud-01 level-default-minimap 87) +(def-tex hud-newhud-greendot-01 level-default-minimap 91) +(def-tex hud-newhud-reddot-01 level-default-minimap 92) +(def-tex hud-newhud-shine-01 level-default-minimap 93) +(def-tex environment-ice level-default-warp 0) +(def-tex environment-phong-rim level-default-warp 1) +(def-tex shield-env-rim-dest level-default-warp 2) +(def-tex shield-env-rim-src level-default-warp 3) +(def-tex shield-env-uscroll level-default-warp 4) +(def-tex shield-env-uvscroll level-default-warp 5) +(def-tex sat-shield level-default-warp 6) +(def-tex sat-shield-dest level-default-warp 7) +(def-tex sat-shield-env-uvscroll level-default-warp 9) +(def-tex environment-oldmetal level-default-shrub 0) +(def-tex environment-title level-default-shrub 1) +(def-tex loadsave-01 level-default-shrub 2) +(def-tex loadsave-02 level-default-shrub 3) +(def-tex loadsave-03 level-default-shrub 4) +(def-tex loadsave-04 level-default-shrub 5) +(def-tex loadsave-05 level-default-shrub 6) +(def-tex loadsave-audio-options level-default-shrub 7) +(def-tex loadsave-back level-default-shrub 8) +(def-tex loadsave-game-options level-default-shrub 10) +(def-tex loadsave-graphic-options level-default-shrub 11) +(def-tex loadsave-journal level-default-shrub 12) +(def-tex loadsave-load level-default-shrub 13) +(def-tex loadsave-map level-default-shrub 14) +(def-tex loadsave-mission level-default-shrub 15) +(def-tex loadsave-part-01 level-default-shrub 16) +(def-tex loadsave-save level-default-shrub 17) +(def-tex loadsave-secrets level-default-shrub 19) +(def-tex loadsave-part-02c level-default-shrub 20) +(def-tex loadsave-frametop level-default-shrub 21) +(def-tex loadsave-metalframe level-default-shrub 22) +(def-tex loadsave-post level-default-shrub 23) +(def-tex loadsave-metalframe-02 level-default-shrub 24) +(def-tex font.12hi gamefont 0) +(def-tex font.12lo gamefont 1) +(def-tex font.24hi gamefont 2) +(def-tex font.24hi2 gamefont 3) +(def-tex font.24lo gamefont 4) +(def-tex font.24lo2 gamefont 5) +(def-tex cv-supportpole-end-2x2 halfpipe-tfrag 0) +(def-tex cv-woodpoles halfpipe-tfrag 1) +(def-tex t1-grass halfpipe-tfrag 2) +(def-tex vil-beachrock halfpipe-tfrag 3) +(def-tex halfpipe-grid-01 halfpipe-tfrag 9) +(def-tex lt-eco-vent-blue-01 halfpipe-tfrag 10) +(def-tex lt-eco-vent-side-01 halfpipe-tfrag 11) +(def-tex common_sandstone_ground01 halfpipe-tfrag 20) +(def-tex common_sandstone_taper01 halfpipe-tfrag 21) +(def-tex common_sandstone_trim01 halfpipe-tfrag 22) +(def-tex common_sandstone_pill01 halfpipe-tfrag 23) +(def-tex common_sandstone_base01 halfpipe-tfrag 24) +(def-tex environment-darkprec halfpipe-tfrag 25) +(def-tex dk-eco-vent-glow-01 halfpipe-tfrag 26) +(def-tex dk-eco-vent-side-01 halfpipe-tfrag 27) +(def-tex bluecrate-02 halfpipe-tfrag 35) +(def-tex bluecrate-lod03 halfpipe-tfrag 36) +(def-tex bluecrate-04 halfpipe-tfrag 37) +(def-tex bluecrate-01 halfpipe-tfrag 38) +(def-tex bluecrate-lod02 halfpipe-tfrag 39) +(def-tex bluecrate-lod04 halfpipe-tfrag 40) +(def-tex metalcrate-02 halfpipe-tfrag 41) +(def-tex metalcrate-05 halfpipe-tfrag 42) +(def-tex metalcrate-04 halfpipe-tfrag 43) +(def-tex metalcrate-01 halfpipe-tfrag 44) +(def-tex metalcrate-lod02 halfpipe-tfrag 45) +(def-tex metalcrate-lod03 halfpipe-tfrag 46) +(def-tex metalcrate-lod04 halfpipe-tfrag 47) +(def-tex bluecrate-05 halfpipe-tfrag 53) +(def-tex dk-maker-idol-collar-01 halfpipe-pris 26) +(def-tex dk-maker-idol-collar-02 halfpipe-pris 27) +(def-tex dk-maker-idol-eye-01 halfpipe-pris 28) +(def-tex dk-maker-idol-eye-dk-01 halfpipe-pris 29) +(def-tex dk-maker-idol-globes-01 halfpipe-pris 30) +(def-tex dk-maker-idol-globes-dk-01 halfpipe-pris 31) +(def-tex dk-maker-idol-head-01 halfpipe-pris 32) +(def-tex dk-maker-idol-metal-01 halfpipe-pris 33) +(def-tex dk-maker-idol-tubes-01 halfpipe-pris 34) +(def-tex environment-darkprec halfpipe-pris 37) +(def-tex burning-bush-off ctywide-sprite 2) +(def-tex ticker-a ctywide-sprite 10) +(def-tex ticker-b ctywide-sprite 11) +(def-tex ticker-c ctywide-sprite 12) +(def-tex ticker-d ctywide-sprite 13) +(def-tex ticker-e ctywide-sprite 14) +(def-tex wave-foam ctywide-sprite 15) +(def-tex city-mark-hangsign-01 ctywide-sprite 26) +(def-tex water-splat ctywide-sprite 29) +(def-tex mud-bubble ctywide-sprite 30) +(def-tex baron-propoganda-logo ctywide-sprite 31) +(def-tex citfat-hairflat ctywide-vis-pris 12) +(def-tex citn-allbuckel ctywide-vis-pris 13) +(def-tex citn-allflesh ctywide-vis-pris 14) +(def-tex citn-alllcotton ctywide-vis-pris 15) +(def-tex citn-allleather ctywide-vis-pris 16) +(def-tex citn-allleather-edge ctywide-vis-pris 17) +(def-tex citn-allleather-shoulder ctywide-vis-pris 18) +(def-tex citn-allleatherstrap ctywide-vis-pris 19) +(def-tex citn-allleatherwrinkled ctywide-vis-pris 20) +(def-tex citn-allleye ctywide-vis-pris 21) +(def-tex citn-allshoebottom ctywide-vis-pris 22) +(def-tex citn-allsuede ctywide-vis-pris 23) +(def-tex newbike-01 ctywide-vis-pris 24) +(def-tex newbike-02 ctywide-vis-pris 25) +(def-tex newbike-03 ctywide-vis-pris 26) +(def-tex citywide-metal-wall-1 ctywide-vis-tfrag 0) +(def-tex city-dirtywood ctywide-vis-tfrag 1) +(def-tex citywide-slum-roof ctywide-vis-tfrag 2) +(def-tex city-slum-roof ctywide-vis-tfrag 3) +(def-tex citywide-metal-wall ctywide-vis-tfrag 4) +(def-tex city-bluelight ctywide-vis-tfrag 5) +(def-tex citywide-wall-mainmetal ctywide-vis-tfrag 6) +(def-tex citywide-wall-boltedmetal ctywide-vis-tfrag 7) +(def-tex citywide-wall-frame ctywide-vis-tfrag 8) +(def-tex citywide-wall-orange-plain ctywide-vis-tfrag 9) +(def-tex citywide-wall-greybolts ctywide-vis-tfrag 10) +(def-tex citywide-palace-support-03 ctywide-vis-tfrag 11) +(def-tex citywide-wall-grey ctywide-vis-tfrag 12) +(def-tex citywide-wall-grill ctywide-vis-tfrag 13) +(def-tex citywide-wall-greydrain ctywide-vis-tfrag 14) +(def-tex citywide-wall-brown-strip ctywide-vis-tfrag 15) +(def-tex citywide-stadium-lightbank ctywide-vis-tfrag 21) +(def-tex citywide-redwall ctywide-vis-tfrag 26) +(def-tex citywide-fort-gold ctywide-vis-tfrag 27) +(def-tex citywide-pillar ctywide-vis-tfrag 28) +(def-tex t-citywide-met-bm-red-strp01 ctywide-vis-tfrag 35) +(def-tex t-citywide-met-strp01 ctywide-vis-tfrag 36) +(def-tex t-citywide-wall-tile-01 ctywide-vis-tfrag 42) +(def-tex palcab-lowres-background-rocksnow2 ctywide-vis-tfrag 43) +(def-tex palcab-lowres-background-rocksnow ctywide-vis-tfrag 44) +(def-tex citywide-consite-steel ctywide-vis-tfrag 46) +(def-tex t-palshaft-pil-01 ctywide-vis-tfrag 50) +(def-tex t-palshaft-dirt-blue-01 ctywide-vis-tfrag 51) +(def-tex t-palshaft-roof-01 ctywide-vis-tfrag 53) +(def-tex citywide-window-litwindow ctywide-vis-tfrag 54) +(def-tex t-palshaft-plate01 ctywide-vis-tfrag 63) +(def-tex ctywide-ox-met-01 ctywide-vis-tfrag 64) +(def-tex citywide-exhaust-body ctywide-vis-tfrag 65) +(def-tex palcab-lowres-background-hilltops-01 ctywide-vis-tfrag 70) +(def-tex palcab-lowres-background-peaks-02 ctywide-vis-tfrag 71) +(def-tex palcab-lowres-background-mountains-02 ctywide-vis-tfrag 72) +(def-tex palcab-lowres-background-mountains ctywide-vis-tfrag 73) +(def-tex palcab-lowres-background-peaks-01 ctywide-vis-tfrag 74) +(def-tex palcab-lowres-background-hills-01 ctywide-vis-tfrag 79) +(def-tex can-cap ctywide-vis-tfrag 80) +(def-tex can-knob ctywide-vis-tfrag 81) +(def-tex can-type ctywide-vis-tfrag 82) +(def-tex can-side-long ctywide-vis-tfrag 83) +(def-tex ctyslumc-light-blue ctywide-vis-tfrag 86) +(def-tex city-step ctywide-vis-tfrag 90) +(def-tex cityslumc-purple-column ctywide-vis-tfrag 91) +(def-tex cityslumc-purple-plain ctywide-vis-tfrag 92) +(def-tex ctyslumc-wall-LOW ctywide-vis-tfrag 93) +(def-tex cityslumc-billc-LOW ctywide-vis-tfrag 94) +(def-tex cityslumc-awning-LOW ctywide-vis-tfrag 95) +(def-tex city-tile-LOW ctywide-vis-tfrag 96) +(def-tex ctyslumc-window-panes-LOW ctywide-vis-tfrag 97) +(def-tex city-lowres-mhcity-wall-02 ctywide-vis-tfrag 98) +(def-tex city-lowres-mhcity-wall-06 ctywide-vis-tfrag 99) +(def-tex city-lowres-mhcity-wall-05 ctywide-vis-tfrag 100) +(def-tex common-black ctywide-vis-tfrag 101) +(def-tex city-lowres-mhcity-wall-03 ctywide-vis-tfrag 102) +(def-tex city-lowres-mhcity-tower-01 ctywide-vis-tfrag 103) +(def-tex city-lowres-mhcity-tower-02 ctywide-vis-tfrag 104) +(def-tex fac-lo-red-panel-03 ctywide-vis-tfrag 105) +(def-tex fac-lo-red-panel-02 ctywide-vis-tfrag 106) +(def-tex fac-lo-grey-panel-02 ctywide-vis-tfrag 107) +(def-tex fac-lo-grey-panel-01 ctywide-vis-tfrag 108) +(def-tex fac-lo-hangar-door-01 ctywide-vis-tfrag 109) +(def-tex fac-lo-panel-01 ctywide-vis-tfrag 110) +(def-tex fac-lo-tower-base-01 ctywide-vis-tfrag 111) +(def-tex facb-lo-grey-panel-02 ctywide-vis-tfrag 112) +(def-tex fac-lo-red-panel-01 ctywide-vis-tfrag 113) +(def-tex fac-lo-top-01 ctywide-vis-tfrag 114) +(def-tex fac-lo-bldng-panel-02 ctywide-vis-tfrag 115) +(def-tex fac-lo-bldng-panel-01 ctywide-vis-tfrag 116) +(def-tex fac-lo-grey-panel-03 ctywide-vis-tfrag 117) +(def-tex fac-lo-glass-01 ctywide-vis-tfrag 118) +(def-tex fac-lo-red-panel-04 ctywide-vis-tfrag 119) +(def-tex fac-lo-tower-door-01 ctywide-vis-tfrag 120) +(def-tex bluecrate-02 ctywide-vis-tfrag 128) +(def-tex bluecrate-lod03 ctywide-vis-tfrag 129) +(def-tex bluecrate-04 ctywide-vis-tfrag 130) +(def-tex bluecrate-01 ctywide-vis-tfrag 131) +(def-tex bluecrate-lod02 ctywide-vis-tfrag 132) +(def-tex bluecrate-lod04 ctywide-vis-tfrag 133) +(def-tex metalcrate-02 ctywide-vis-tfrag 134) +(def-tex metalcrate-05 ctywide-vis-tfrag 135) +(def-tex metalcrate-04 ctywide-vis-tfrag 136) +(def-tex metalcrate-01 ctywide-vis-tfrag 137) +(def-tex metalcrate-lod02 ctywide-vis-tfrag 138) +(def-tex metalcrate-lod03 ctywide-vis-tfrag 139) +(def-tex metalcrate-lod04 ctywide-vis-tfrag 140) +(def-tex rub-palace-tower-side ctywide-vis-tfrag 141) +(def-tex bluecrate-05 ctywide-vis-tfrag 143) +(def-tex security-dot-dest ctywide-vis-water 0) +(def-tex security-dot-src ctywide-vis-water 1) +(def-tex security-env-dest ctywide-vis-water 2) +(def-tex security-env-uscroll ctywide-vis-water 3) +(def-tex hidelight-lightfade ctywide-vis-water 4) +(def-tex searchlight-envmap ctywide-vis-water 5) +(def-tex map-ctysluma ctysluma-minimap 0) +(def-tex baron-neon-blue-a ctysluma-sprite 0) +(def-tex baron-neon-blue-a-on ctysluma-sprite 1) +(def-tex baron-neon-blue-b ctysluma-sprite 2) +(def-tex baron-neon-blue-b-on ctysluma-sprite 3) +(def-tex baron-neon-blue-c ctysluma-sprite 4) +(def-tex baron-neon-blue-c-on ctysluma-sprite 5) +(def-tex baron-neon-blue-d ctysluma-sprite 6) +(def-tex baron-neon-blue-d-on ctysluma-sprite 7) +(def-tex baron-neon-blue-e ctysluma-sprite 8) +(def-tex baron-neon-blue-e-on ctysluma-sprite 9) +(def-tex baron-neon-blue-f ctysluma-sprite 10) +(def-tex baron-neon-blue-f-on ctysluma-sprite 11) +(def-tex baron-neon-blue-g ctysluma-sprite 12) +(def-tex baron-neon-blue-g-on ctysluma-sprite 13) +(def-tex baron-neon-blue-h ctysluma-sprite 14) +(def-tex baron-neon-blue-h-on ctysluma-sprite 15) +(def-tex baron-neon-blue-i ctysluma-sprite 16) +(def-tex baron-neon-blue-i-on ctysluma-sprite 17) +(def-tex baron-neon-blue-j ctysluma-sprite 18) +(def-tex baron-neon-blue-j-on ctysluma-sprite 19) +(def-tex baron-neon-blue-k ctysluma-sprite 20) +(def-tex baron-neon-blue-k-on ctysluma-sprite 21) +(def-tex baron-neon-cheek-a ctysluma-sprite 22) +(def-tex baron-neon-cheek-a-on ctysluma-sprite 23) +(def-tex baron-neon-cheek-b ctysluma-sprite 24) +(def-tex baron-neon-cheek-b-on ctysluma-sprite 25) +(def-tex baron-neon-cheek-c ctysluma-sprite 26) +(def-tex baron-neon-cheek-c-on ctysluma-sprite 27) +(def-tex baron-neon-cheek-d ctysluma-sprite 28) +(def-tex baron-neon-cheek-d-on ctysluma-sprite 29) +(def-tex baron-neon-dot-a ctysluma-sprite 30) +(def-tex baron-neon-dot-a-on ctysluma-sprite 31) +(def-tex baron-neon-dot-b ctysluma-sprite 32) +(def-tex baron-neon-dot-b-on ctysluma-sprite 33) +(def-tex baron-neon-dot-c ctysluma-sprite 34) +(def-tex baron-neon-dot-c-on ctysluma-sprite 35) +(def-tex baron-neon-dot-d ctysluma-sprite 36) +(def-tex baron-neon-dot-d-on ctysluma-sprite 37) +(def-tex baron-neon-dot-ring ctysluma-sprite 38) +(def-tex baron-neon-dot-ring-on ctysluma-sprite 39) +(def-tex baron-neon-eye-a ctysluma-sprite 40) +(def-tex baron-neon-eye-a-on ctysluma-sprite 41) +(def-tex baron-neon-eye-b ctysluma-sprite 42) +(def-tex baron-neon-eye-b-on ctysluma-sprite 43) +(def-tex baron-neon-eye-border ctysluma-sprite 44) +(def-tex baron-neon-eye-border-on ctysluma-sprite 45) +(def-tex baron-neon-eye-c ctysluma-sprite 46) +(def-tex baron-neon-eye-c-on ctysluma-sprite 47) +(def-tex baron-neon-ghotee ctysluma-sprite 48) +(def-tex baron-neon-ghotee-on ctysluma-sprite 49) +(def-tex baron-neon-mouth ctysluma-sprite 50) +(def-tex baron-neon-mouth-on ctysluma-sprite 51) +(def-tex baron-neon-nose ctysluma-sprite 52) +(def-tex baron-neon-nose-on ctysluma-sprite 53) +(def-tex baron-neon-skull-circle ctysluma-sprite 54) +(def-tex baron-neon-skull-circle-on ctysluma-sprite 55) +(def-tex baron-neon-skull-main ctysluma-sprite 56) +(def-tex baron-neon-skull-main-on ctysluma-sprite 57) +(def-tex baron-neon-triangle-a ctysluma-sprite 58) +(def-tex baron-neon-triangle-a-on ctysluma-sprite 59) +(def-tex baron-neon-white-a ctysluma-sprite 60) +(def-tex baron-neon-white-a-on ctysluma-sprite 61) +(def-tex baron-neon-white-b ctysluma-sprite 62) +(def-tex baron-neon-white-b-on ctysluma-sprite 63) +(def-tex baron-neon-white-c ctysluma-sprite 64) +(def-tex baron-neon-white-c-on ctysluma-sprite 65) +(def-tex baron-neon-white-d ctysluma-sprite 66) +(def-tex baron-neon-white-d-on ctysluma-sprite 67) +(def-tex baron-neon-white-e ctysluma-sprite 68) +(def-tex baron-neon-white-e-on ctysluma-sprite 69) +(def-tex baron-neon-white-long ctysluma-sprite 70) +(def-tex baron-neon-white-long-on ctysluma-sprite 71) +(def-tex sign-blank ctysluma-sprite 72) +(def-tex sign-crimson ctysluma-sprite 73) +(def-tex sign-doctors ctysluma-sprite 74) +(def-tex sign-hiphog ctysluma-sprite 75) +(def-tex sign-m5 ctysluma-sprite 76) +(def-tex sign-metalhead ctysluma-sprite 77) +(def-tex blue-tracer ctysluma-sprite 79) +(def-tex red-tracer ctysluma-sprite 80) +(def-tex slum-ground-01-small ctysluma-vis-shrub 0) +(def-tex city-slum-blotch-withstreaks-01 ctysluma-vis-shrub 1) +(def-tex city-slum-cattail-grass ctysluma-vis-shrub 2) +(def-tex city-dirtywood-small ctysluma-vis-shrub 3) +(def-tex city-slum-bracketmetal-tiny ctysluma-vis-shrub 4) +(def-tex city-slum-dirt-overlay-dirt ctysluma-vis-shrub 5) +(def-tex city-slum-wire ctysluma-vis-shrub 6) +(def-tex city-slum-bigpipe-02 ctysluma-vis-shrub 7) +(def-tex city-slum-brick-showing-through ctysluma-vis-shrub 8) +(def-tex city-slum-stain-wall-01 ctysluma-vis-shrub 9) +(def-tex city-slum-dirt-overlay ctysluma-vis-shrub 10) +(def-tex city-slum-stain-window-01 ctysluma-vis-shrub 11) +(def-tex city-slum-shrub-overhang ctysluma-vis-shrub 12) +(def-tex city-slum-shrub-overhang-02 ctysluma-vis-shrub 13) +(def-tex city-slum-vine ctysluma-vis-shrub 14) +(def-tex city-slumwall-05 ctysluma-vis-shrub 15) +(def-tex city-slum-clothesline-01 ctysluma-vis-shrub 16) +(def-tex city-slum-decal-02 ctysluma-vis-shrub 17) +(def-tex city-slum-bigpipe-04 ctysluma-vis-shrub 18) +(def-tex city-slumwall-metalsiding-01 ctysluma-vis-shrub 19) +(def-tex city-slum-decal-01 ctysluma-vis-shrub 20) +(def-tex city-fort-decal ctysluma-vis-shrub 21) +(def-tex wascitya-stone-top ctysluma-vis-shrub 22) +(def-tex city-slum-crater-shards-01 ctysluma-vis-shrub 23) +(def-tex city-inda-scorch-big ctysluma-vis-shrub 24) +(def-tex city-inda-scorch-small ctysluma-vis-shrub 25) +(def-tex city-ind-overlay-bullethole-a ctysluma-vis-shrub 26) +(def-tex city-ind-overlay-bullethole-b ctysluma-vis-shrub 27) +(def-tex city-ind-overlay-bullethole-c ctysluma-vis-shrub 28) +(def-tex des-burn-eye-off ctysluma-vis-shrub 29) +(def-tex des-burn-eye-on ctysluma-vis-shrub 30) +(def-tex des-burn-precursor-01 ctysluma-vis-shrub 31) +(def-tex des-burn-precursor-01-bottom ctysluma-vis-shrub 32) +(def-tex des-burn-precursor-head-01 ctysluma-vis-shrub 33) +(def-tex wascity-ground-01 ctysluma-vis-shrub 34) +(def-tex city-slum-medpipe-02 ctysluma-vis-tfrag 1) +(def-tex city-slum-medpipe-01 ctysluma-vis-tfrag 2) +(def-tex city-slum-greenmetal-tube ctysluma-vis-tfrag 3) +(def-tex city-slum-ditch-wall-top-02 ctysluma-vis-tfrag 4) +(def-tex city-slum-ground-2-ditch-03 ctysluma-vis-tfrag 5) +(def-tex city-slum-ditch-wall-top-to-ground ctysluma-vis-tfrag 6) +(def-tex city-slum-hangsign-01 ctysluma-vis-tfrag 7) +(def-tex city-slum-bracketmetal-tiny ctysluma-vis-tfrag 8) +(def-tex city-slum-hangsign-02 ctysluma-vis-tfrag 9) +(def-tex city-slum-hangsign-03 ctysluma-vis-tfrag 10) +(def-tex city-slumbase-wall ctysluma-vis-tfrag 11) +(def-tex city-slumwall-01 ctysluma-vis-tfrag 12) +(def-tex city-slum-bigpipe-04 ctysluma-vis-tfrag 13) +(def-tex city-slum-litwindow ctysluma-vis-tfrag 14) +(def-tex city-slumbase-wall-3 ctysluma-vis-tfrag 15) +(def-tex city-slumbase-wall-broken-to-bricks-2 ctysluma-vis-tfrag 16) +(def-tex city-slumwall-07 ctysluma-vis-tfrag 17) +(def-tex city-slumwall-06 ctysluma-vis-tfrag 18) +(def-tex slum-stone-broken ctysluma-vis-tfrag 19) +(def-tex slum-stone-03 ctysluma-vis-tfrag 20) +(def-tex city-slum-roof ctysluma-vis-tfrag 21) +(def-tex city-slum-roof-side ctysluma-vis-tfrag 22) +(def-tex city-slum-roof-1 ctysluma-vis-tfrag 23) +(def-tex city-slum-door-01 ctysluma-vis-tfrag 24) +(def-tex city-slum-awning-rustedmetal ctysluma-vis-tfrag 25) +(def-tex city-slumbase-wall-broken-to-bricks ctysluma-vis-tfrag 26) +(def-tex city-metal-wall ctysluma-vis-tfrag 27) +(def-tex city-slum-wood-plain ctysluma-vis-tfrag 28) +(def-tex city-bluelight ctysluma-vis-tfrag 29) +(def-tex common-black ctysluma-vis-tfrag 30) +(def-tex city-side-support-tops ctysluma-vis-tfrag 31) +(def-tex city-slumbase-wall-boarded ctysluma-vis-tfrag 32) +(def-tex city-slum-building-frame ctysluma-vis-tfrag 33) +(def-tex city-side-support ctysluma-vis-tfrag 34) +(def-tex city-slum-bigpipe-02 ctysluma-vis-tfrag 35) +(def-tex city-slum-bigpipe-03 ctysluma-vis-tfrag 36) +(def-tex city-wall-plain-1 ctysluma-vis-tfrag 37) +(def-tex city-wall-plain-bottom ctysluma-vis-tfrag 38) +(def-tex slum-stone-bottom ctysluma-vis-tfrag 39) +(def-tex city-slum-lightwall ctysluma-vis-tfrag 40) +(def-tex city-slum-burning-can ctysluma-vis-tfrag 41) +(def-tex city-fort-red ctysluma-vis-tfrag 42) +(def-tex city-fort-yellow ctysluma-vis-tfrag 43) +(def-tex fort-exhaust-body ctysluma-vis-tfrag 44) +(def-tex fort-exhaust ctysluma-vis-tfrag 45) +(def-tex city-fort-column ctysluma-vis-tfrag 46) +(def-tex city-fort-grey-trim ctysluma-vis-tfrag 47) +(def-tex slum-ditch-bottom-01 ctysluma-vis-tfrag 48) +(def-tex slum-ground-01 ctysluma-vis-tfrag 49) +(def-tex city-dirtywood ctysluma-vis-tfrag 51) +(def-tex city-slum-stonewall-bricks ctysluma-vis-tfrag 52) +(def-tex sewer-rubber-rim-01 ctysluma-vis-tfrag 53) +(def-tex fort-door-metal ctysluma-vis-tfrag 54) +(def-tex city-slum-crater-blend-01 ctysluma-vis-tfrag 55) +(def-tex city-slum-crater-blend-02 ctysluma-vis-tfrag 56) +(def-tex slum-ditch-bottom-01-small ctysluma-vis-tfrag 57) +(def-tex city-slum-onintent-skull ctysluma-vis-tfrag 64) +(def-tex city-slum-onintent-siding ctysluma-vis-tfrag 65) +(def-tex map-ctyslumb ctyslumb-minimap 0) +(def-tex sign-baron ctyslumb-sprite 0) +(def-tex sign-blank ctyslumb-sprite 1) +(def-tex sign-crimson ctyslumb-sprite 2) +(def-tex sign-future ctyslumb-sprite 3) +(def-tex sign-gt2 ctyslumb-sprite 4) +(def-tex sign-happy-pirate ctyslumb-sprite 5) +(def-tex sign-hiphog ctyslumb-sprite 6) +(def-tex sign-square-a ctyslumb-sprite 7) +(def-tex sign-square-b ctyslumb-sprite 8) +(def-tex sign-tall-a ctyslumb-sprite 9) +(def-tex sign-tall-b ctyslumb-sprite 10) +(def-tex sign-wide-a ctyslumb-sprite 11) +(def-tex sign-wide-b ctyslumb-sprite 12) +(def-tex cityslumc-grass ctyslumb-vis-shrub 22) +(def-tex cityslumc-grass-yellow ctyslumb-vis-shrub 23) +(def-tex ctyslumc-stain ctyslumb-vis-shrub 24) +(def-tex ctyslumc-decal-02 ctyslumb-vis-shrub 25) +(def-tex ctyslumc-decal-04 ctyslumb-vis-shrub 26) +(def-tex ctyslumc-wall ctyslumb-vis-shrub 27) +(def-tex ctyslumc-light ctyslumb-vis-shrub 28) +(def-tex ctyslumc-wire ctyslumb-vis-shrub 29) +(def-tex cityslumc-gold-trim ctyslumb-vis-shrub 31) +(def-tex city-slum-bigpipe-04 ctyslumb-vis-tfrag 10) +(def-tex city-slum-litwindow ctyslumb-vis-tfrag 11) +(def-tex common-black ctyslumb-vis-tfrag 36) +(def-tex ctyslumc-wall ctyslumb-vis-tfrag 57) +(def-tex ctyslumc-light-amber ctyslumb-vis-tfrag 58) +(def-tex ctyslumc-brown ctyslumb-vis-tfrag 59) +(def-tex ctyslumc-green ctyslumb-vis-tfrag 60) +(def-tex ctyslumc-grass ctyslumb-vis-tfrag 62) +(def-tex stdm-bush-01 ctyslumb-vis-tfrag 63) +(def-tex ctyslumc-bush-01 ctyslumb-vis-tfrag 64) +(def-tex ctyslumc-flowerbed-flowers-a ctyslumb-vis-tfrag 65) +(def-tex ctyslumc-pinetree-big-bark ctyslumb-vis-tfrag 68) +(def-tex ctyslumc-tree-top ctyslumb-vis-tfrag 69) +(def-tex ctyslumc-light-blue ctyslumb-vis-tfrag 71) +(def-tex ctyslumc-window ctyslumb-vis-tfrag 72) +(def-tex ctyslumc-window-panes ctyslumb-vis-tfrag 73) +(def-tex ctyslumc-window-panes2 ctyslumb-vis-tfrag 75) +(def-tex common-gun-panel-03 ctyslumb-vis-tfrag 78) +(def-tex ctyslumc-light ctyslumb-vis-tfrag 79) +(def-tex ctyslumc-billc ctyslumb-vis-tfrag 80) +(def-tex ctyslumc-grate1 ctyslumb-vis-tfrag 81) +(def-tex ctyslumc-vine-hang-a ctyslumb-vis-tfrag 84) +(def-tex ctyslumc-railing-trim ctyslumb-vis-tfrag 86) +(def-tex ctyslumc-floor-base ctyslumb-vis-tfrag 87) +(def-tex ctyslumc-overhang-01 ctyslumb-vis-tfrag 88) +(def-tex ctyslumc-overhang-02 ctyslumb-vis-tfrag 89) +(def-tex cityslumc-grey-side-pillar ctyslumb-vis-tfrag 90) +(def-tex ctyslumc-roof ctyslumb-vis-tfrag 91) +(def-tex cityslumc-wall-surface-01 ctyslumb-vis-tfrag 92) +(def-tex ctyslumc-overhang-03 ctyslumb-vis-tfrag 93) +(def-tex city-tile ctyslumb-vis-tfrag 94) +(def-tex cityslumc-awning ctyslumb-vis-tfrag 95) +(def-tex ctyslumc-wall-sliver ctyslumb-vis-tfrag 96) +(def-tex cityslumc-top-pillar ctyslumb-vis-tfrag 97) +(def-tex cityslumc-little-gold ctyslumb-vis-tfrag 98) +(def-tex cityslumc-pinkish-purple ctyslumb-vis-tfrag 99) +(def-tex cityslumc-gold-trim ctyslumb-vis-tfrag 100) +(def-tex cityslumc-purple-column-2 ctyslumb-vis-tfrag 101) +(def-tex cityslumc-purple-column ctyslumb-vis-tfrag 102) +(def-tex cityslumc-awning-HI ctyslumb-vis-tfrag 103) +(def-tex ctyslumc-wall-trim ctyslumb-vis-tfrag 104) +(def-tex cityslumc-purple-plain ctyslumb-vis-tfrag 105) +(def-tex cityslumc-door-plate ctyslumb-vis-tfrag 106) +(def-tex ctyslumc-wall-colored ctyslumb-vis-tfrag 107) +(def-tex cityslumc-metal-trim ctyslumb-vis-tfrag 108) +(def-tex ctyslumc-wall-colored2 ctyslumb-vis-tfrag 109) +(def-tex cityslumc-lamp-red ctyslumb-vis-tfrag 110) +(def-tex cityslumc-door ctyslumb-vis-tfrag 111) +(def-tex cityslumc-lamp-small ctyslumb-vis-tfrag 113) +(def-tex cityslumc-lamp-gold ctyslumb-vis-tfrag 114) +(def-tex cityslumc-pipe ctyslumb-vis-tfrag 115) +(def-tex cityslumc-awning-LOW ctyslumb-vis-tfrag 116) +(def-tex city-tile-LOW ctyslumb-vis-tfrag 117) +(def-tex ctyslumc-window-panes-LOW ctyslumb-vis-tfrag 118) +(def-tex ctyslumc-wall-trim-LOW ctyslumb-vis-tfrag 119) +(def-tex city-ind-black ctyslumb-vis-tfrag 120) +(def-tex city-ind-buldge-light-self-illuminated-03 ctyslumb-vis-tfrag 121) +(def-tex lfacrm-plate-05 ctyslumb-vis-tfrag 122) +(def-tex lfacrm-rubber-01 ctyslumb-vis-tfrag 123) +(def-tex ctyslumc-bigtext ctyslumb-vis-tfrag 124) +(def-tex map-ctyslumc ctyslumc-minimap 0) +(def-tex sign-square-a ctyslumc-sprite 1) +(def-tex sign-future-slumc ctyslumc-sprite 2) +(def-tex sign-square-b ctyslumc-sprite 3) +(def-tex sign-baron ctyslumc-sprite 4) +(def-tex sign-blank ctyslumc-sprite 5) +(def-tex sign-crimson ctyslumc-sprite 6) +(def-tex sign-gt2 ctyslumc-sprite 7) +(def-tex sign-happy-pirate ctyslumc-sprite 8) +(def-tex sign-hiphog ctyslumc-sprite 9) +(def-tex sign-tall-a ctyslumc-sprite 10) +(def-tex sign-tall-b ctyslumc-sprite 11) +(def-tex sign-wide-a ctyslumc-sprite 12) +(def-tex sign-wide-b ctyslumc-sprite 13) +(def-tex ctyslumc-stain ctyslumc-vis-shrub 25) +(def-tex ctyslumc-decal-04 ctyslumc-vis-shrub 26) +(def-tex ctyslumc-wall ctyslumc-vis-shrub 27) +(def-tex ctyslumc-light ctyslumc-vis-shrub 28) +(def-tex ctyslumc-wire ctyslumc-vis-shrub 29) +(def-tex ctyslumc-decal-02 ctyslumc-vis-shrub 31) +(def-tex cityslumc-grass ctyslumc-vis-shrub 32) +(def-tex cityslumc-grass-yellow ctyslumc-vis-shrub 33) +(def-tex cityslumc-gold-trim ctyslumc-vis-shrub 34) +(def-tex city-slums-nail ctyslumc-vis-tfrag 19) +(def-tex common-black ctyslumc-vis-tfrag 39) +(def-tex ctyslumc-wall ctyslumc-vis-tfrag 54) +(def-tex ctyslumc-light-amber ctyslumc-vis-tfrag 55) +(def-tex stdm-bush-01 ctyslumc-vis-tfrag 56) +(def-tex ctyslumc-flowerbed-flowers-a ctyslumc-vis-tfrag 58) +(def-tex common-gray-dark ctyslumc-vis-tfrag 59) +(def-tex ctyslumc-green ctyslumc-vis-tfrag 60) +(def-tex ctyslumc-tree-top ctyslumc-vis-tfrag 61) +(def-tex ctyslumc-pinetree-big-bark ctyslumc-vis-tfrag 62) +(def-tex ctyslumc-window ctyslumc-vis-tfrag 63) +(def-tex ctyslumc-brown ctyslumc-vis-tfrag 64) +(def-tex ctyslumc-vine-hang-a ctyslumc-vis-tfrag 68) +(def-tex ctyslumc-light ctyslumc-vis-tfrag 69) +(def-tex ctyslumc-billc ctyslumc-vis-tfrag 70) +(def-tex ctyslumc-grass ctyslumc-vis-tfrag 72) +(def-tex ctyslumc-light-blue ctyslumc-vis-tfrag 74) +(def-tex common-gun-panel-03 ctyslumc-vis-tfrag 75) +(def-tex ctyslumc-window-panes ctyslumc-vis-tfrag 76) +(def-tex ctyslumc-window-panes2 ctyslumc-vis-tfrag 78) +(def-tex ctyslumc-tarp-01 ctyslumc-vis-tfrag 79) +(def-tex ctyslumc-grate1 ctyslumc-vis-tfrag 82) +(def-tex ctyslumc-floor-base ctyslumc-vis-tfrag 84) +(def-tex ctyslumc-railing-trim ctyslumc-vis-tfrag 85) +(def-tex ctyslumc-overhang-01 ctyslumc-vis-tfrag 86) +(def-tex cityslumc-wall-surface-01 ctyslumc-vis-tfrag 87) +(def-tex ctyslumc-overhang-02 ctyslumc-vis-tfrag 88) +(def-tex cityslumc-grey-side-pillar ctyslumc-vis-tfrag 89) +(def-tex ctyslumc-roof ctyslumc-vis-tfrag 90) +(def-tex city-tile ctyslumc-vis-tfrag 91) +(def-tex cityslumc-awning ctyslumc-vis-tfrag 92) +(def-tex ctyslumc-wall-sliver ctyslumc-vis-tfrag 93) +(def-tex ctyslumc-overhang-03 ctyslumc-vis-tfrag 94) +(def-tex cityslumc-pinkish-purple ctyslumc-vis-tfrag 95) +(def-tex cityslumc-top-pillar ctyslumc-vis-tfrag 96) +(def-tex cityslumc-little-gold ctyslumc-vis-tfrag 97) +(def-tex cityslumc-gold-trim ctyslumc-vis-tfrag 98) +(def-tex cityslumc-purple-column ctyslumc-vis-tfrag 99) +(def-tex cityslumc-purple-column-2 ctyslumc-vis-tfrag 100) +(def-tex ctyslumc-wall-trim ctyslumc-vis-tfrag 102) +(def-tex cityslumc-purple-plain ctyslumc-vis-tfrag 103) +(def-tex cityslumc-door-plate ctyslumc-vis-tfrag 104) +(def-tex cityslumc-lamp-red ctyslumc-vis-tfrag 105) +(def-tex cityslumc-door ctyslumc-vis-tfrag 106) +(def-tex cityslumc-door-metal ctyslumc-vis-tfrag 107) +(def-tex ctyslumc-wall-colored2 ctyslumc-vis-tfrag 108) +(def-tex cityslumc-metal-trim ctyslumc-vis-tfrag 109) +(def-tex cityslumc-lamp-small ctyslumc-vis-tfrag 110) +(def-tex cityslumc-lamp-gold ctyslumc-vis-tfrag 111) +(def-tex cityslumc-pipe ctyslumc-vis-tfrag 112) +(def-tex ctyslumc-window-panes-LOW ctyslumc-vis-tfrag 113) +(def-tex cityslumc-awning-LOW ctyslumc-vis-tfrag 114) +(def-tex city-tile-LOW ctyslumc-vis-tfrag 115) +(def-tex ctyslumc-wall-trim-LOW ctyslumc-vis-tfrag 116) +(def-tex city-ind-black ctyslumc-vis-tfrag 117) +(def-tex lfacrm-plate-05 ctyslumc-vis-tfrag 118) +(def-tex lfacrm-rubber-01 ctyslumc-vis-tfrag 119) +(def-tex lfacrm-girder-01 ctyslumc-vis-tfrag 120) +(def-tex map-ctyinda ctyinda-minimap 0) +(def-tex sign-fashion2 ctyinda-sprite 0) +(def-tex sign-onin-knows ctyinda-sprite 1) +(def-tex sign-praxis-banner ctyinda-sprite 2) +(def-tex city-ind-blotch-withstreaks-01 ctyinda-vis-shrub 0) +(def-tex city-ind-stain-01 ctyinda-vis-shrub 1) +(def-tex city-ind-decal-01 ctyinda-vis-shrub 2) +(def-tex city-ind-decal-02 ctyinda-vis-shrub 3) +(def-tex city-ind-decal-03 ctyinda-vis-shrub 4) +(def-tex city-ind-stain-02 ctyinda-vis-shrub 5) +(def-tex city-ind-decal-04 ctyinda-vis-shrub 6) +(def-tex city-ind-overlay-bullethole-c ctyinda-vis-shrub 7) +(def-tex city-ind-overlay-bullethole-a ctyinda-vis-shrub 8) +(def-tex city-ind-overlay-bullethole-b ctyinda-vis-shrub 9) +(def-tex city-inda-scorch-small ctyinda-vis-shrub 10) +(def-tex city-inda-scorch-big ctyinda-vis-shrub 11) +(def-tex city-ind-wall-02 ctyinda-vis-tfrag 0) +(def-tex city-ind-band-dark-01 ctyinda-vis-tfrag 1) +(def-tex city-ind-wall-base-01 ctyinda-vis-tfrag 2) +(def-tex city-ind-wall-base-02 ctyinda-vis-tfrag 3) +(def-tex city-ind-wall-base-top-01 ctyinda-vis-tfrag 4) +(def-tex city-ind-wall-01 ctyinda-vis-tfrag 5) +(def-tex city-ind-wall-band-vent-01 ctyinda-vis-tfrag 6) +(def-tex city-ind-wall-band-plain-01 ctyinda-vis-tfrag 7) +(def-tex city-ind-door-large-01 ctyinda-vis-tfrag 8) +(def-tex city-ind-wall-base-03 ctyinda-vis-tfrag 9) +(def-tex city-ind-door-top-01 ctyinda-vis-tfrag 10) +(def-tex city-ind-wall-04 ctyinda-vis-tfrag 11) +(def-tex city-ind-wall-03 ctyinda-vis-tfrag 12) +(def-tex city-ind-wall-thin-04 ctyinda-vis-tfrag 13) +(def-tex city-inda-wallbase ctyinda-vis-tfrag 14) +(def-tex city-ind-metal-02 ctyinda-vis-tfrag 15) +(def-tex city-muck-01 ctyinda-vis-tfrag 16) +(def-tex city-ind-grate-01 ctyinda-vis-tfrag 17) +(def-tex city-bigpipe-ring-02 ctyinda-vis-tfrag 18) +(def-tex city-bigpipe-main-02 ctyinda-vis-tfrag 19) +(def-tex city-ind-bigpipe-siding ctyinda-vis-tfrag 20) +(def-tex city-green-pipe01 ctyinda-vis-tfrag 21) +(def-tex city-ind-wall-noisy-03 ctyinda-vis-tfrag 22) +(def-tex city-ind-wall-noisy-05 ctyinda-vis-tfrag 23) +(def-tex city-ind-metal-green-main-side ctyinda-vis-tfrag 24) +(def-tex city-ind-bigpipe-siding-02 ctyinda-vis-tfrag 25) +(def-tex city-ind-redlight ctyinda-vis-tfrag 26) +(def-tex city-ind-wall-noisy-border-05 ctyinda-vis-tfrag 27) +(def-tex city-ind-wall-noisy-04 ctyinda-vis-tfrag 28) +(def-tex city-ind-wall-noisy-border-02 ctyinda-vis-tfrag 29) +(def-tex city-ind-wall-noisy-01 ctyinda-vis-tfrag 30) +(def-tex city-ind-buldge-light-01 ctyinda-vis-tfrag 31) +(def-tex city-ind-buldge-light-self-illuminated-01 ctyinda-vis-tfrag 32) +(def-tex city-port-metal-green-main-side ctyinda-vis-tfrag 33) +(def-tex city-ind-wall-noisy-border-01 ctyinda-vis-tfrag 34) +(def-tex city-ind-catwalk-coping-01 ctyinda-vis-tfrag 35) +(def-tex city-ind-wall-base-08 ctyinda-vis-tfrag 36) +(def-tex city-ind-wall-07 ctyinda-vis-tfrag 37) +(def-tex city-ind-litwindow-TOP-03 ctyinda-vis-tfrag 38) +(def-tex cty-ind-catwalk-panels ctyinda-vis-tfrag 39) +(def-tex city-ind-catwalk-slope-metal ctyinda-vis-tfrag 40) +(def-tex city-ind-dark-marble ctyinda-vis-tfrag 41) +(def-tex city-ind-litemetal-01 ctyinda-vis-tfrag 42) +(def-tex city-ind-border-stripe-dark-01 ctyinda-vis-tfrag 43) +(def-tex city-ind-wall-base-05 ctyinda-vis-tfrag 44) +(def-tex city-ind-wall-base-top-03 ctyinda-vis-tfrag 45) +(def-tex city-ind-wall-06 ctyinda-vis-tfrag 46) +(def-tex city-ind-buldge-light-self-illuminated-02 ctyinda-vis-tfrag 47) +(def-tex city-ind-wall-base-07 ctyinda-vis-tfrag 48) +(def-tex city-ind-wall-05 ctyinda-vis-tfrag 49) +(def-tex city-ind-metal-04-hitweak ctyinda-vis-tfrag 51) +(def-tex city-ind-litwindow-TOP-04 ctyinda-vis-tfrag 52) +(def-tex city-ind-grnd-cobl-01 ctyinda-vis-tfrag 53) +(def-tex city-ind-grnd-cobl-02 ctyinda-vis-tfrag 54) +(def-tex city-ind-black ctyinda-vis-tfrag 56) +(def-tex city-ind-support-base ctyinda-vis-tfrag 57) +(def-tex city-ind-metal-03 ctyinda-vis-tfrag 58) +(def-tex city-ind-metal-09 ctyinda-vis-tfrag 59) +(def-tex city-ind-wall-band-striped-01 ctyinda-vis-tfrag 60) +(def-tex city-ind-panels-scorched-02 ctyinda-vis-tfrag 61) +(def-tex city-ind-panels-scorched-03 ctyinda-vis-tfrag 62) +(def-tex sewer-metal-block-06 ctyinda-vis-tfrag 64) +(def-tex sewer-metal-block-01 ctyinda-vis-tfrag 65) +(def-tex sewer-metal-floor-02 ctyinda-vis-tfrag 66) +(def-tex city-ind-buldge-light-self-illuminated-03 ctyinda-vis-tfrag 67) +(def-tex cty-ind-ground02 ctyinda-vis-tfrag 68) +(def-tex cty-ind-ground01 ctyinda-vis-tfrag 69) +(def-tex city-ind-palace-cable-section-band ctyinda-vis-tfrag 70) +(def-tex city-ind-palace-cable-section ctyinda-vis-tfrag 71) +(def-tex city-yellow-light-monster ctyinda-vis-tfrag 72) +(def-tex city-red-light-monster ctyinda-vis-tfrag 73) +(def-tex city-ind-ventglow ctyinda-vis-tfrag 74) +(def-tex city-base-vent-01 ctyinda-vis-tfrag 75) +(def-tex map-ctyindb ctyindb-minimap 0) +(def-tex intro-sphere ctyindb-sprite 0) +(def-tex sign-fashion2 ctyindb-sprite 1) +(def-tex sign-onin-knows ctyindb-sprite 2) +(def-tex sign-praxis-banner ctyindb-sprite 3) +(def-tex citwide-crimson-gold ctyindb-vis-pris 5) +(def-tex citwide-crimson-light ctyindb-vis-pris 6) +(def-tex citwide-crimson-red ctyindb-vis-pris 7) +(def-tex citwide-crimson-tube ctyindb-vis-pris 8) +(def-tex citwide-crimson-wall-plain ctyindb-vis-pris 9) +(def-tex city-ind-stain-02 ctyindb-vis-shrub 0) +(def-tex city-ind-blotch-withstreaks-01 ctyindb-vis-shrub 1) +(def-tex city-ind-stain-01 ctyindb-vis-shrub 2) +(def-tex city-ind-decal-02 ctyindb-vis-shrub 3) +(def-tex city-ind-decal-03 ctyindb-vis-shrub 4) +(def-tex city-ind-decal-01 ctyindb-vis-shrub 5) +(def-tex city-ind-wall-noisy-border-05 ctyindb-vis-shrub 7) +(def-tex city-ind-wall-noisy-03 ctyindb-vis-shrub 8) +(def-tex city-ind-wall-noisy-05 ctyindb-vis-shrub 9) +(def-tex city-ind-overlay-bullethole-b ctyindb-vis-shrub 10) +(def-tex city-ind-overlay-bullethole-c ctyindb-vis-shrub 11) +(def-tex city-ind-overlay-bullethole-a ctyindb-vis-shrub 12) +(def-tex city-inda-scorch-big ctyindb-vis-shrub 13) +(def-tex city-inda-scorch-small ctyindb-vis-shrub 14) +(def-tex city-wire ctyindb-vis-shrub 15) +(def-tex city-port-bigpipe-ring-side ctyindb-vis-shrub 16) +(def-tex city-ind-black ctyindb-vis-tfrag 0) +(def-tex city-ind-metal-green-main-side ctyindb-vis-tfrag 1) +(def-tex city-port-metal-green-main-side ctyindb-vis-tfrag 3) +(def-tex city-inda-wallbase ctyindb-vis-tfrag 4) +(def-tex city-ind-wall-noisy-border-05 ctyindb-vis-tfrag 5) +(def-tex city-ind-border-stripe-dark-01 ctyindb-vis-tfrag 6) +(def-tex city-ind-wall-noisy-border-02 ctyindb-vis-tfrag 7) +(def-tex cty-ind-catwalk-panels ctyindb-vis-tfrag 8) +(def-tex city-ind-catwalk-slope-metal ctyindb-vis-tfrag 9) +(def-tex city-ind-catwalk-coping-01 ctyindb-vis-tfrag 10) +(def-tex city-ind-dark-marble ctyindb-vis-tfrag 11) +(def-tex city-ind-wall-base-03 ctyindb-vis-tfrag 12) +(def-tex city-ind-litemetal-01 ctyindb-vis-tfrag 13) +(def-tex city-ind-wall-noisy-05 ctyindb-vis-tfrag 14) +(def-tex city-ind-wall-noisy-border-01 ctyindb-vis-tfrag 15) +(def-tex city-ind-wall-noisy-01 ctyindb-vis-tfrag 16) +(def-tex city-ind-metal-02 ctyindb-vis-tfrag 17) +(def-tex city-ind-bigpipe-siding ctyindb-vis-tfrag 18) +(def-tex city-ind-support-base ctyindb-vis-tfrag 19) +(def-tex city-ind-bigpipe-siding-02 ctyindb-vis-tfrag 20) +(def-tex city-ind-redlight ctyindb-vis-tfrag 21) +(def-tex city-ind-grnd-cobl-01 ctyindb-vis-tfrag 22) +(def-tex city-ind-grnd-cobl-02 ctyindb-vis-tfrag 23) +(def-tex city-bigpipe-main-02 ctyindb-vis-tfrag 24) +(def-tex city-bigpipe-ring-02 ctyindb-vis-tfrag 25) +(def-tex city-muck-01 ctyindb-vis-tfrag 26) +(def-tex city-ind-grate-01 ctyindb-vis-tfrag 27) +(def-tex city-ind-band-dark-01 ctyindb-vis-tfrag 28) +(def-tex city-ind-wall-noisy-03 ctyindb-vis-tfrag 29) +(def-tex city-green-pipe01 ctyindb-vis-tfrag 30) +(def-tex city-ind-wall-02 ctyindb-vis-tfrag 31) +(def-tex city-ind-wall-band-plain-01 ctyindb-vis-tfrag 32) +(def-tex city-ind-wall-01 ctyindb-vis-tfrag 33) +(def-tex city-ind-wall-base-top-01 ctyindb-vis-tfrag 34) +(def-tex city-ind-wall-base-02 ctyindb-vis-tfrag 35) +(def-tex city-ind-wall-base-01 ctyindb-vis-tfrag 36) +(def-tex city-ind-wall-band-vent-01 ctyindb-vis-tfrag 37) +(def-tex city-ind-wall-base-08 ctyindb-vis-tfrag 38) +(def-tex city-ind-wall-07 ctyindb-vis-tfrag 39) +(def-tex city-ind-door-top-01 ctyindb-vis-tfrag 40) +(def-tex city-ind-litwindow-TOP-03 ctyindb-vis-tfrag 41) +(def-tex city-ind-wall-04 ctyindb-vis-tfrag 42) +(def-tex city-ind-wall-03 ctyindb-vis-tfrag 43) +(def-tex city-ind-wall-thin-04 ctyindb-vis-tfrag 44) +(def-tex city-ind-door-large-01 ctyindb-vis-tfrag 45) +(def-tex city-ind-wall-noisy-04 ctyindb-vis-tfrag 46) +(def-tex city-ind-buldge-light-01 ctyindb-vis-tfrag 47) +(def-tex city-ind-buldge-light-self-illuminated-01 ctyindb-vis-tfrag 48) +(def-tex city-ind-wall-base-07 ctyindb-vis-tfrag 49) +(def-tex city-ind-wall-05 ctyindb-vis-tfrag 50) +(def-tex city-ind-wall-base-05 ctyindb-vis-tfrag 51) +(def-tex city-ind-wall-06 ctyindb-vis-tfrag 52) +(def-tex city-ind-wall-base-top-03 ctyindb-vis-tfrag 54) +(def-tex city-ind-metal-04-hitweak ctyindb-vis-tfrag 55) +(def-tex city-ind-litwindow-TOP-04 ctyindb-vis-tfrag 56) +(def-tex city-ind-buldge-light-self-illuminated-02 ctyindb-vis-tfrag 57) +(def-tex city-ind-metal-03 ctyindb-vis-tfrag 58) +(def-tex city-ind-ventglow ctyindb-vis-tfrag 59) +(def-tex city-ind-panels-scorched-02 ctyindb-vis-tfrag 65) +(def-tex city-ind-panels-scorched-03 ctyindb-vis-tfrag 66) +(def-tex city-ind-wall-band-striped-01 ctyindb-vis-tfrag 67) +(def-tex city-ind-panels-scorched ctyindb-vis-tfrag 68) +(def-tex t-citywide-met-bm-red-strp01 ctyindb-vis-tfrag 69) +(def-tex city-port-cable-cylinder-01 ctyindb-vis-tfrag 70) +(def-tex city-port-bigpipe-ring-side ctyindb-vis-tfrag 71) +(def-tex city-port-cable-quare-01 ctyindb-vis-tfrag 75) +(def-tex city-ind-palace-cable-section-band ctyindb-vis-tfrag 76) +(def-tex city-ind-palace-cable-section ctyindb-vis-tfrag 77) +(def-tex city-ind-metal-09 ctyindb-vis-tfrag 78) +(def-tex rub-beam-gen ctyindb-vis-tfrag 79) +(def-tex city-ind-ground-metal ctyindb-vis-tfrag 80) +(def-tex city-base-vent-01 ctyindb-vis-tfrag 81) +(def-tex map-ctygenb ctygenb-minimap 0) +(def-tex ctygenb-ticker-backing ctygenb-sprite 0) +(def-tex ctygenb-ticker-space ctygenb-sprite 1) +(def-tex sign-ctygenb-arrows ctygenb-sprite 2) +(def-tex sign-ctygenb-erol ctygenb-sprite 3) +(def-tex sign-ctygenb-praxis-banner ctygenb-sprite 4) +(def-tex airlock-door-bolt ctygenb-vis-pris 0) +(def-tex airlock-door-cog ctygenb-vis-pris 1) +(def-tex airlock-door-main ctygenb-vis-pris 2) +(def-tex airlock-door-metal2 ctygenb-vis-pris 3) +(def-tex airlockl-door-metalframe ctygenb-vis-pris 4) +(def-tex jakc-scarfhanging ctygenb-vis-pris 8) +(def-tex jakc-skirt ctygenb-vis-pris 9) +(def-tex bam-eyelight ctygenb-vis-pris 10) +(def-tex bam-hairhilite ctygenb-vis-pris 11) +(def-tex environment-oldmetal ctygenb-vis-pris 12) +(def-tex jakc-armor ctygenb-vis-pris 13) +(def-tex jakc-chestplate-straps ctygenb-vis-pris 14) +(def-tex jakc-gogglemetal ctygenb-vis-pris 15) +(def-tex jakc-lens ctygenb-vis-pris 16) +(def-tex jakc-scarf ctygenb-vis-pris 17) +(def-tex jakc-waistband2 ctygenb-vis-pris 18) +(def-tex jakc-wraps ctygenb-vis-pris 19) +(def-tex jakc-wristband-a2 ctygenb-vis-pris 20) +(def-tex jakchires-arm ctygenb-vis-pris 21) +(def-tex jakchires-blackstrap ctygenb-vis-pris 22) +(def-tex jakchires-brownstrap ctygenb-vis-pris 23) +(def-tex jakchires-brwnleather ctygenb-vis-pris 24) +(def-tex jakchires-chestplate ctygenb-vis-pris 25) +(def-tex jakchires-clips ctygenb-vis-pris 26) +(def-tex jakchires-eye ctygenb-vis-pris 27) +(def-tex jakchires-eyebrow ctygenb-vis-pris 28) +(def-tex jakchires-eyelid ctygenb-vis-pris 29) +(def-tex jakchires-facelft ctygenb-vis-pris 30) +(def-tex jakchires-facert ctygenb-vis-pris 31) +(def-tex jakchires-glovetop ctygenb-vis-pris 32) +(def-tex jakchires-hair ctygenb-vis-pris 33) +(def-tex jakchires-horn ctygenb-vis-pris 34) +(def-tex jakchires-jacket ctygenb-vis-pris 35) +(def-tex jakchires-leatherpouch ctygenb-vis-pris 36) +(def-tex jakchires-lightbrownspat ctygenb-vis-pris 37) +(def-tex jakchires-pants ctygenb-vis-pris 38) +(def-tex jakchires-precarmor-01 ctygenb-vis-pris 39) +(def-tex jakchires-shoebottom ctygenb-vis-pris 40) +(def-tex jakchires-shoemetal ctygenb-vis-pris 41) +(def-tex jakchires-shoeteop ctygenb-vis-pris 42) +(def-tex jakchires-teeth ctygenb-vis-pris 43) +(def-tex bat-amulet-01 ctygenb-vis-pris 44) +(def-tex bat-amulet-02 ctygenb-vis-pris 45) +(def-tex bat-amulet-03 ctygenb-vis-pris 46) +(def-tex prebot-envmap ctygenb-vis-pris 47) +(def-tex cty-grunt-eye-01 ctygenb-vis-pris 48) +(def-tex cty-grunt-gem-01 ctygenb-vis-pris 49) +(def-tex cty-grunt-hose ctygenb-vis-pris 50) +(def-tex cty-grunt-metal-01 ctygenb-vis-pris 51) +(def-tex cty-grunt-skin-01 ctygenb-vis-pris 52) +(def-tex cty-grunt-skin-02 ctygenb-vis-pris 53) +(def-tex cty-grunt-skin-03 ctygenb-vis-pris 54) +(def-tex city-blotch-withstreaks-01 ctygenb-vis-shrub 0) +(def-tex city-bluelight ctygenb-vis-shrub 1) +(def-tex city-copper ctygenb-vis-shrub 2) +(def-tex city-dirt-overlay ctygenb-vis-shrub 3) +(def-tex city-dirt-to-wall ctygenb-vis-shrub 4) +(def-tex city-ground-stain-01 ctygenb-vis-shrub 5) +(def-tex city-mark-wire ctygenb-vis-shrub 6) +(def-tex city-metalrim-01 ctygenb-vis-shrub 7) +(def-tex city-railing ctygenb-vis-shrub 8) +(def-tex city-stain-wall-01 ctygenb-vis-shrub 9) +(def-tex city-stain-window-01 ctygenb-vis-shrub 10) +(def-tex city-wall-decal-01 ctygenb-vis-shrub 11) +(def-tex city-wall-decal-02 ctygenb-vis-shrub 12) +(def-tex city-wall-decal-04 ctygenb-vis-shrub 13) +(def-tex city-wall-decal-05 ctygenb-vis-shrub 14) +(def-tex city-windowframe-03 ctygenb-vis-shrub 15) +(def-tex city-wire ctygenb-vis-shrub 16) +(def-tex city-wall-greyblue-plain-lowres ctygenb-vis-shrub 17) +(def-tex city-base-vent-01 ctygenb-vis-shrub 18) +(def-tex city-roofmetal-rim ctygenb-vis-shrub 19) +(def-tex city-canal ctygenb-vis-tfrag 0) +(def-tex city-canal-bottom ctygenb-vis-tfrag 1) +(def-tex city-metal-canal-smalltop ctygenb-vis-tfrag 2) +(def-tex city-metal-canal ctygenb-vis-tfrag 3) +(def-tex city-bridge-ends ctygenb-vis-tfrag 4) +(def-tex city-canal-top2 ctygenb-vis-tfrag 5) +(def-tex city-bridge-walk ctygenb-vis-tfrag 6) +(def-tex city-bridgeseam ctygenb-vis-tfrag 7) +(def-tex city-railing ctygenb-vis-tfrag 8) +(def-tex city-bridgesupports ctygenb-vis-tfrag 9) +(def-tex city-lurkermetal-01 ctygenb-vis-tfrag 10) +(def-tex city-canal-top ctygenb-vis-tfrag 11) +(def-tex city-support-main-01 ctygenb-vis-tfrag 12) +(def-tex city-wall-plain ctygenb-vis-tfrag 13) +(def-tex city-sideframe-plain ctygenb-vis-tfrag 14) +(def-tex city-roofmetal-rim ctygenb-vis-tfrag 15) +(def-tex city-step ctygenb-vis-tfrag 16) +(def-tex city-metal-strip-01 ctygenb-vis-tfrag 17) +(def-tex city-wall ctygenb-vis-tfrag 18) +(def-tex city-wall-01 ctygenb-vis-tfrag 19) +(def-tex city-wall-inset-panel-01 ctygenb-vis-tfrag 20) +(def-tex city-wall-base-rim-02 ctygenb-vis-tfrag 21) +(def-tex city-endblocks ctygenb-vis-tfrag 22) +(def-tex city-wall-base-rim-01 ctygenb-vis-tfrag 23) +(def-tex city-metal-wall-lamp-01 ctygenb-vis-tfrag 24) +(def-tex city-metal-wall-lamp-02 ctygenb-vis-tfrag 25) +(def-tex city-lamp-bluelight ctygenb-vis-tfrag 26) +(def-tex city-bigpipe-ring-02 ctygenb-vis-tfrag 27) +(def-tex city-windowframe1 ctygenb-vis-tfrag 28) +(def-tex city-ind-buldge-light-01 ctygenb-vis-tfrag 29) +(def-tex city-ind-buldge-light-self-illuminated-01 ctygenb-vis-tfrag 30) +(def-tex city-baselight-01 ctygenb-vis-tfrag 31) +(def-tex city-outpostwall ctygenb-vis-tfrag 32) +(def-tex city-hole-edge-01 ctygenb-vis-tfrag 33) +(def-tex city-metal-flatpipe-01 ctygenb-vis-tfrag 35) +(def-tex city-windowframe-03 ctygenb-vis-tfrag 36) +(def-tex common-black ctygenb-vis-tfrag 37) +(def-tex city-bulb-blend ctygenb-vis-tfrag 38) +(def-tex city-bluelight ctygenb-vis-tfrag 39) +(def-tex city-roofmetal ctygenb-vis-tfrag 40) +(def-tex city-roof-tile ctygenb-vis-tfrag 41) +(def-tex city-sidewall-2 ctygenb-vis-tfrag 42) +(def-tex city-trim ctygenb-vis-tfrag 43) +(def-tex city-light-yellow ctygenb-vis-tfrag 44) +(def-tex city-metal-doorframe2 ctygenb-vis-tfrag 45) +(def-tex city-door-03 ctygenb-vis-tfrag 46) +(def-tex city-smallpipe-pipe-01 ctygenb-vis-tfrag 47) +(def-tex city-smallpipe-ring-01 ctygenb-vis-tfrag 48) +(def-tex city-smallpipe-elbow-01 ctygenb-vis-tfrag 49) +(def-tex city-base-vent-01 ctygenb-vis-tfrag 50) +(def-tex city-black ctygenb-vis-tfrag 51) +(def-tex city-metal-windowframe ctygenb-vis-tfrag 52) +(def-tex city-sideframe ctygenb-vis-tfrag 53) +(def-tex city-pipe ctygenb-vis-tfrag 54) +(def-tex city-red ctygenb-vis-tfrag 55) +(def-tex city-wall-bottom ctygenb-vis-tfrag 56) +(def-tex city-door-02 ctygenb-vis-tfrag 57) +(def-tex city-wall-bottom-greyblue ctygenb-vis-tfrag 58) +(def-tex city-wall-greyblue-plain-lowres ctygenb-vis-tfrag 59) +(def-tex city-wall-plain-greyblue ctygenb-vis-tfrag 60) +(def-tex city-dark-grey-plain ctygenb-vis-tfrag 61) +(def-tex city-metal-doorframe1 ctygenb-vis-tfrag 62) +(def-tex city-metal-orange ctygenb-vis-tfrag 63) +(def-tex city-metalsiding-02 ctygenb-vis-tfrag 65) +(def-tex city-stonefloor-singlestone ctygenb-vis-tfrag 66) +(def-tex t-palshaft-dirt-blue-01 ctygenb-vis-tfrag 67) +(def-tex citywide-panels-01 ctygenb-vis-tfrag 68) +(def-tex t-citywide-met-pill-01 ctygenb-vis-tfrag 69) +(def-tex t-citywide-met-strp01 ctygenb-vis-tfrag 70) +(def-tex city-outpostwall-strip ctygenb-vis-tfrag 71) +(def-tex city-ind-metal-green-main-side ctygenb-vis-tfrag 72) +(def-tex tcab-beam01 ctygenb-vis-tfrag 73) +(def-tex tcab-threads-beam-01 ctygenb-vis-tfrag 74) +(def-tex tcab-star-01 ctygenb-vis-tfrag 75) +(def-tex tcab-ring-01 ctygenb-vis-tfrag 76) +(def-tex tcab-i-redstripe-01 ctygenb-vis-tfrag 77) +(def-tex tcab-beam-bolt01 ctygenb-vis-tfrag 78) +(def-tex city-metal-pipeside-01 ctygenb-vis-tfrag 80) +(def-tex citywide-pillar ctygenb-vis-tfrag 81) +(def-tex t-citywide-met-strp-close ctygenb-vis-tfrag 83) +(def-tex city-burning-can ctygenb-vis-tfrag 84) +(def-tex rub-beam-gen ctygenb-vis-tfrag 85) +(def-tex rub-palace-tower-side ctygenb-vis-tfrag 86) +(def-tex rub-panels-01 ctygenb-vis-tfrag 87) +(def-tex city-window-glass-01 ctygenb-vis-water 0) +(def-tex city-door-window-glass-02 ctygenb-vis-water 1) +(def-tex city-window-glass-02 ctygenb-vis-water 2) +(def-tex map-ctyfarma ctyfarma-minimap 0) +(def-tex ctyfarm-cab-body ctyfarma-sprite 0) +(def-tex ctyfarm-chili-leaf ctyfarma-sprite 1) +(def-tex ctyfarm-chili-stem ctyfarma-sprite 2) +(def-tex ctyfarm-eggplant-body ctyfarma-sprite 3) +(def-tex ctyfarm-eggplant-leaf-1 ctyfarma-sprite 4) +(def-tex ctyfarm-eggplant-leaf-2 ctyfarma-sprite 5) +(def-tex city-farm-treetop ctyfarma-vis-alpha 0) +(def-tex city-farm-treetop-02 ctyfarma-vis-alpha 1) +(def-tex city-farm-road-01 ctyfarma-vis-alpha 2) +(def-tex city-farm-road-blend-to-alpha-01 ctyfarma-vis-alpha 3) +(def-tex city-farm-road-end-blend-to-alpha ctyfarma-vis-alpha 4) +(def-tex airlock-door-bolt ctyfarma-vis-pris 0) +(def-tex airlock-door-cog ctyfarma-vis-pris 1) +(def-tex airlock-door-main ctyfarma-vis-pris 2) +(def-tex airlock-door-metal2 ctyfarma-vis-pris 3) +(def-tex airlockl-door-metalframe ctyfarma-vis-pris 4) +(def-tex city-farm-veg-cableaf ctyfarma-vis-pris 5) +(def-tex city-farm-veg-cabseed ctyfarma-vis-pris 6) +(def-tex city-farm-veg-green-1 ctyfarma-vis-pris 7) +(def-tex airlock-door-cog1 ctyfarma-vis-pris 8) +(def-tex city-farm-beettree-blossom ctyfarma-vis-pris 9) +(def-tex city-farm-beettree-bulb ctyfarma-vis-pris 10) +(def-tex city-farm-beettree-trunk ctyfarma-vis-pris 11) +(def-tex city-farm-cabmain ctyfarma-vis-pris 12) +(def-tex city-farm-mar-leaf-02 ctyfarma-vis-pris 13) +(def-tex city-farm-mar-main ctyfarma-vis-pris 14) +(def-tex city-farm-sprinkle-metal ctyfarma-vis-pris 15) +(def-tex city-farm-sprinkle-metal-dirt ctyfarma-vis-pris 16) +(def-tex city-farm-sprinkle-suppport ctyfarma-vis-pris 17) +(def-tex city-farm-veg-cablip ctyfarma-vis-pris 18) +(def-tex city-farm-veg-chilberry-02 ctyfarma-vis-pris 19) +(def-tex city-farm-veg-green-2 ctyfarma-vis-pris 20) +(def-tex city-farm-veg-leaf-1 ctyfarma-vis-pris 21) +(def-tex city-farm-shrub-overhang ctyfarma-vis-shrub 0) +(def-tex city-farm-shrub-overhang-02 ctyfarma-vis-shrub 1) +(def-tex city-farm-stain-01 ctyfarma-vis-shrub 2) +(def-tex city-farm-stain-02 ctyfarma-vis-shrub 3) +(def-tex city-farm-ground-stain-01 ctyfarma-vis-shrub 4) +(def-tex city-farm-wall-vine ctyfarma-vis-shrub 5) +(def-tex city-farm-cattail-grass ctyfarma-vis-shrub 6) +(def-tex city-farm-blotch-withstreaks-01 ctyfarma-vis-shrub 7) +(def-tex city-farm-dirt-small-01 ctyfarma-vis-shrub 8) +(def-tex city-farm-veg-chilberry ctyfarma-vis-shrub 9) +(def-tex city-farm-flowers ctyfarma-vis-shrub 10) +(def-tex city-farm-stonewall-bricks ctyfarma-vis-tfrag 0) +(def-tex city-farm-stone-wall-01 ctyfarma-vis-tfrag 1) +(def-tex city-farm-stonewall-base-01 ctyfarma-vis-tfrag 2) +(def-tex city-farm-wall-top ctyfarma-vis-tfrag 3) +(def-tex city-farm-sprinkle-metalbase ctyfarma-vis-tfrag 4) +(def-tex city-farm-black ctyfarma-vis-tfrag 5) +(def-tex city-farm-stone-border-02 ctyfarma-vis-tfrag 6) +(def-tex city-farm-smalldirt ctyfarma-vis-tfrag 7) +(def-tex city-farm-metal-bracket-02 ctyfarma-vis-tfrag 8) +(def-tex city-farm-bigpipe-01 ctyfarma-vis-tfrag 9) +(def-tex city-farm-aquaduct-glass-02 ctyfarma-vis-tfrag 10) +(def-tex city-farm-tree-bark-01 ctyfarma-vis-tfrag 11) +(def-tex city-farm-metal-panel-01 ctyfarma-vis-tfrag 12) +(def-tex city-farm-metal-panel-02 ctyfarma-vis-tfrag 13) +(def-tex city-farm-metal-bracket-01 ctyfarma-vis-tfrag 14) +(def-tex city-farm-dirtymetal-01 ctyfarma-vis-tfrag 15) +(def-tex city-farm-cart-woodslat-02 ctyfarma-vis-tfrag 16) +(def-tex city-farm-dirt-mound-blend-01 ctyfarma-vis-tfrag 17) +(def-tex city-farm-dirt-small-01 ctyfarma-vis-tfrag 18) +(def-tex city-farm-dirt-mound-01 ctyfarma-vis-tfrag 19) +(def-tex for-foliage ctyfarma-vis-tfrag 20) +(def-tex city-farm-vegtree-bark-01 ctyfarma-vis-tfrag 21) +(def-tex city-farm-sprinkle-metal-dirt ctyfarma-vis-tfrag 22) +(def-tex city-farm-sprinkle-suppport ctyfarma-vis-tfrag 23) +(def-tex city-farm-sprinkle-metal ctyfarma-vis-tfrag 24) +(def-tex city-farm-sprinkle-pipe ctyfarma-vis-tfrag 25) +(def-tex farm-grass-ground-02 ctyfarma-vis-tfrag 26) +(def-tex city-farm-cart-woodslat ctyfarma-vis-tfrag 27) +(def-tex city-farm-lamp ctyfarma-vis-tfrag 28) +(def-tex city-farm-rock-small ctyfarma-vis-tfrag 29) +(def-tex city-farm-rock ctyfarma-vis-tfrag 30) +(def-tex city-ind-metal-02 ctyfarma-vis-tfrag 31) +(def-tex city-ind-bigpipe-siding ctyfarma-vis-tfrag 32) +(def-tex city-farm-cartbase ctyfarma-vis-tfrag 33) +(def-tex city-farm-cartwheeltrim ctyfarma-vis-tfrag 34) +(def-tex city-farm-cartwheeltread ctyfarma-vis-tfrag 35) +(def-tex city-farm-mar-main ctyfarma-vis-tfrag 36) +(def-tex city-farm-road-01 ctyfarma-vis-tfrag 37) +(def-tex city-farm-mark-roof-tiles ctyfarma-vis-tfrag 38) +(def-tex farm-grass-ground-01 ctyfarma-vis-tfrag 39) +(def-tex citywide-wall-greybolts ctyfarma-vis-tfrag 40) +(def-tex citywide-wall-greydrain ctyfarma-vis-tfrag 41) +(def-tex common-black ctyfarma-vis-tfrag 42) +(def-tex t-citywide-met-strp01 ctyfarma-vis-tfrag 43) +(def-tex citywide-wall-frame ctyfarma-vis-tfrag 44) +(def-tex city-farm-road-blend-to-alpha-01 ctyfarma-vis-tfrag 45) +(def-tex city-farm-aquaduct-glass-01 ctyfarma-vis-water 0) +(def-tex map-ctyfarmb ctyfarmb-minimap 0) +(def-tex ctyfarm-cab-body ctyfarmb-sprite 0) +(def-tex ctyfarm-chili-leaf ctyfarmb-sprite 1) +(def-tex ctyfarm-chili-stem ctyfarmb-sprite 2) +(def-tex ctyfarm-eggplant-body ctyfarmb-sprite 3) +(def-tex ctyfarm-eggplant-leaf-1 ctyfarmb-sprite 4) +(def-tex ctyfarm-eggplant-leaf-2 ctyfarmb-sprite 5) +(def-tex city-farm-treetop ctyfarmb-vis-alpha 0) +(def-tex city-farm-treetop-02 ctyfarmb-vis-alpha 1) +(def-tex city-farm-road-01 ctyfarmb-vis-alpha 2) +(def-tex city-farm-road-blend-to-alpha-01 ctyfarmb-vis-alpha 3) +(def-tex city-farm-road-end-blend-to-alpha ctyfarmb-vis-alpha 4) +(def-tex city-farm-veg-cableaf ctyfarmb-vis-pris 0) +(def-tex city-farm-veg-cabseed ctyfarmb-vis-pris 1) +(def-tex city-farm-veg-green-1 ctyfarmb-vis-pris 2) +(def-tex bam-eyelight ctyfarmb-vis-pris 3) +(def-tex yak-eye ctyfarmb-vis-pris 4) +(def-tex yak-horn ctyfarmb-vis-pris 5) +(def-tex yak-lightfur ctyfarmb-vis-pris 6) +(def-tex yak-lightmed-transfur ctyfarmb-vis-pris 7) +(def-tex yak-lips2 ctyfarmb-vis-pris 8) +(def-tex yak-medfur ctyfarmb-vis-pris 9) +(def-tex yak-medfur-end ctyfarmb-vis-pris 10) +(def-tex yak-nose ctyfarmb-vis-pris 11) +(def-tex city-farm-beettree-blossom ctyfarmb-vis-pris 12) +(def-tex city-farm-beettree-bulb ctyfarmb-vis-pris 13) +(def-tex city-farm-beettree-trunk ctyfarmb-vis-pris 14) +(def-tex city-farm-cabmain ctyfarmb-vis-pris 15) +(def-tex city-farm-veg-chilberry-02 ctyfarmb-vis-pris 16) +(def-tex city-farm-veg-green-2 ctyfarmb-vis-pris 17) +(def-tex city-farm-veg-leaf-1 ctyfarmb-vis-pris 18) +(def-tex city-farm-mar-leaf-02 ctyfarmb-vis-pris 19) +(def-tex city-farm-mar-main ctyfarmb-vis-pris 20) +(def-tex city-farm-veg-cablip ctyfarmb-vis-pris 21) +(def-tex city-farm-sprinkle-metal ctyfarmb-vis-pris 22) +(def-tex city-farm-sprinkle-metal-dirt ctyfarmb-vis-pris 23) +(def-tex city-farm-sprinkle-suppport ctyfarmb-vis-pris 24) +(def-tex city-farm-shrub-overhang ctyfarmb-vis-shrub 0) +(def-tex city-farm-shrub-overhang-02 ctyfarmb-vis-shrub 1) +(def-tex city-farm-stain-01 ctyfarmb-vis-shrub 2) +(def-tex city-farm-stain-02 ctyfarmb-vis-shrub 3) +(def-tex city-farm-ground-stain-01 ctyfarmb-vis-shrub 4) +(def-tex city-farm-wall-vine ctyfarmb-vis-shrub 5) +(def-tex city-farm-cattail-grass ctyfarmb-vis-shrub 6) +(def-tex city-farm-blotch-withstreaks-01 ctyfarmb-vis-shrub 7) +(def-tex city-farm-dirt-small-01 ctyfarmb-vis-shrub 8) +(def-tex city-farm-veg-chilberry ctyfarmb-vis-shrub 9) +(def-tex city-farm-flowers ctyfarmb-vis-shrub 10) +(def-tex city-farm-stonewall-bricks ctyfarmb-vis-tfrag 0) +(def-tex city-farm-stone-wall-01 ctyfarmb-vis-tfrag 1) +(def-tex city-farm-stonewall-base-01 ctyfarmb-vis-tfrag 2) +(def-tex city-farm-wall-top ctyfarmb-vis-tfrag 3) +(def-tex city-farm-sprinkle-metalbase ctyfarmb-vis-tfrag 4) +(def-tex city-farm-black ctyfarmb-vis-tfrag 5) +(def-tex city-farm-stone-border-02 ctyfarmb-vis-tfrag 6) +(def-tex city-farm-smalldirt ctyfarmb-vis-tfrag 7) +(def-tex city-farm-metal-panel-01 ctyfarmb-vis-tfrag 8) +(def-tex city-farm-metal-panel-02 ctyfarmb-vis-tfrag 9) +(def-tex city-farm-metal-bracket-02 ctyfarmb-vis-tfrag 10) +(def-tex city-farm-metal-bracket-01 ctyfarmb-vis-tfrag 11) +(def-tex city-farm-bigpipe-01 ctyfarmb-vis-tfrag 12) +(def-tex city-farm-aquaduct-glass-02 ctyfarmb-vis-tfrag 13) +(def-tex city-farm-tree-bark-01 ctyfarmb-vis-tfrag 14) +(def-tex city-farm-cart-woodslat-02 ctyfarmb-vis-tfrag 15) +(def-tex city-farm-dirtymetal-01 ctyfarmb-vis-tfrag 16) +(def-tex city-farm-dirt-mound-blend-01 ctyfarmb-vis-tfrag 17) +(def-tex city-farm-dirt-small-01 ctyfarmb-vis-tfrag 18) +(def-tex farm-grass-ground-02 ctyfarmb-vis-tfrag 19) +(def-tex city-farm-rock ctyfarmb-vis-tfrag 20) +(def-tex city-farm-rock-small ctyfarmb-vis-tfrag 21) +(def-tex city-farm-cart-woodslat ctyfarmb-vis-tfrag 22) +(def-tex for-foliage ctyfarmb-vis-tfrag 23) +(def-tex city-farm-vegtree-bark-01 ctyfarmb-vis-tfrag 24) +(def-tex city-farm-dirt-mound-01 ctyfarmb-vis-tfrag 25) +(def-tex city-farm-sprinkle-metal-dirt ctyfarmb-vis-tfrag 26) +(def-tex city-farm-sprinkle-suppport ctyfarmb-vis-tfrag 27) +(def-tex city-farm-sprinkle-metal ctyfarmb-vis-tfrag 28) +(def-tex city-farm-sprinkle-pipe ctyfarmb-vis-tfrag 29) +(def-tex farm-grass-ground-01 ctyfarmb-vis-tfrag 30) +(def-tex city-farm-lamp ctyfarmb-vis-tfrag 31) +(def-tex city-ind-metal-02 ctyfarmb-vis-tfrag 32) +(def-tex city-ind-bigpipe-siding ctyfarmb-vis-tfrag 33) +(def-tex city-port-metal-block-04 ctyfarmb-vis-tfrag 34) +(def-tex city-port-roofmetal ctyfarmb-vis-tfrag 35) +(def-tex city-farm-mark-roof-tiles ctyfarmb-vis-tfrag 36) +(def-tex common-black ctyfarmb-vis-tfrag 37) +(def-tex t-citywide-met-strp01 ctyfarmb-vis-tfrag 38) +(def-tex citywide-wall-frame ctyfarmb-vis-tfrag 39) +(def-tex citywide-wall-greybolts ctyfarmb-vis-tfrag 40) +(def-tex citywide-wall-greydrain ctyfarmb-vis-tfrag 41) +(def-tex city-farm-aquaduct-glass-01 ctyfarmb-vis-water 0) +(def-tex map-ctyporta ctyport-minimap 0) +(def-tex map-ctyportb ctyport-minimap 1) +(def-tex map-ctyportc ctyport-minimap 2) +(def-tex map-ctyportd ctyport-minimap 3) +(def-tex map-ctyporte ctyport-minimap 4) +(def-tex map-ctyportf ctyport-minimap 5) +(def-tex ctyport-hiphog-halo ctyport-sprite 0) +(def-tex ctyport-muddrop ctyport-sprite 1) +(def-tex hiphog-exterior-blue ctyport-sprite 4) +(def-tex hiphog-exterior-blue-on ctyport-sprite 5) +(def-tex hiphog-exterior-orange ctyport-sprite 8) +(def-tex hiphog-exterior-orange-on ctyport-sprite 9) +(def-tex hiphog-exterior-purple ctyport-sprite 10) +(def-tex hiphog-exterior-purple-on ctyport-sprite 11) +(def-tex hiphog-exterior-yellow ctyport-sprite 12) +(def-tex hiphog-exterior-yellow-on ctyport-sprite 13) +(def-tex sign-arrows ctyport-sprite 14) +(def-tex sign-blank ctyport-sprite 15) +(def-tex airlock-door-bolt ctyport-vis-pris 4) +(def-tex airlock-door-cog ctyport-vis-pris 5) +(def-tex airlock-door-main ctyport-vis-pris 6) +(def-tex airlock-door-metal2 ctyport-vis-pris 7) +(def-tex airlockl-door-metalframe ctyport-vis-pris 8) +(def-tex mechdax-armfur ctyport-vis-pris 9) +(def-tex mechdax-ear ctyport-vis-pris 10) +(def-tex mechdax-eye ctyport-vis-pris 11) +(def-tex mechdax-finger ctyport-vis-pris 12) +(def-tex mechdax-horn ctyport-vis-pris 13) +(def-tex mechdax-leather ctyport-vis-pris 14) +(def-tex mechdax-metallic ctyport-vis-pris 15) +(def-tex mechdax-nose ctyport-vis-pris 16) +(def-tex mechdax-orange2yel-metal ctyport-vis-pris 17) +(def-tex mechdax-solidorangemetal ctyport-vis-pris 18) +(def-tex mechdax-yellowfur ctyport-vis-pris 19) +(def-tex city-port-stain-01 ctyport-vis-shrub 0) +(def-tex city-port-stain-02 ctyport-vis-shrub 1) +(def-tex city-port-blotch-withstreaks-01 ctyport-vis-shrub 2) +(def-tex city-port-canopyarm-swivel-sides ctyport-vis-shrub 3) +(def-tex city-port-bigpipe-ring-side ctyport-vis-shrub 4) +(def-tex city-port-grease-stain-ground ctyport-vis-shrub 5) +(def-tex city-port-decal-03 ctyport-vis-shrub 6) +(def-tex city-port-decal-02 ctyport-vis-shrub 7) +(def-tex city-port-tbolt ctyport-vis-shrub 9) +(def-tex city-port-decal-04 ctyport-vis-shrub 10) +(def-tex city-port-boltl-stain-roundl ctyport-vis-shrub 11) +(def-tex city-port-decal-01 ctyport-vis-shrub 12) +(def-tex city-ind-overlay-bullethole-a ctyport-vis-shrub 13) +(def-tex city-ind-overlay-bullethole-b ctyport-vis-shrub 14) +(def-tex city-ind-overlay-bullethole-c ctyport-vis-shrub 15) +(def-tex city-inda-scorch-big ctyport-vis-shrub 16) +(def-tex city-inda-scorch-small ctyport-vis-shrub 17) +(def-tex city-port-small-metal-highlite ctyport-vis-shrub 23) +(def-tex city-port-wallbase ctyport-vis-shrub 24) +(def-tex city-port-roofmetal-rim ctyport-vis-shrub 25) +(def-tex kgtrns-side01 ctyport-vis-shrub 26) +(def-tex kgtrns-wing01 ctyport-vis-shrub 27) +(def-tex kgtrns-box01 ctyport-vis-shrub 28) +(def-tex kgtrns-topjet01 ctyport-vis-shrub 29) +(def-tex city-port-seawalll-front ctyport-vis-tfrag 0) +(def-tex city-port-seawalll-lip ctyport-vis-tfrag 1) +(def-tex city-port-seam-side-metal-plain ctyport-vis-tfrag 2) +(def-tex city-port-seawalll ctyport-vis-tfrag 3) +(def-tex city-port-grnd-cobl-01 ctyport-vis-tfrag 4) +(def-tex city-port-seam-metal ctyport-vis-tfrag 5) +(def-tex city-port-seam-main-metal ctyport-vis-tfrag 6) +(def-tex city-port-tower-balcony-under ctyport-vis-tfrag 7) +(def-tex city-port-bridge-top ctyport-vis-tfrag 8) +(def-tex city-port-metal-block-02 ctyport-vis-tfrag 9) +(def-tex city-port-metal-rim-01 ctyport-vis-tfrag 10) +(def-tex city-port-bigtop-underside ctyport-vis-tfrag 11) +(def-tex city-port-seam-side-metal ctyport-vis-tfrag 12) +(def-tex city-port-ground-01 ctyport-vis-tfrag 13) +(def-tex city-port-bridge-grid01 ctyport-vis-tfrag 14) +(def-tex city-port-bridge-brace01 ctyport-vis-tfrag 15) +(def-tex city-port-bridge-grate01 ctyport-vis-tfrag 16) +(def-tex city-port-green-marble ctyport-vis-tfrag 17) +(def-tex city-port-metal-block-04 ctyport-vis-tfrag 18) +(def-tex city-port-pushblock-metal ctyport-vis-tfrag 19) +(def-tex city-port-wallbase ctyport-vis-tfrag 20) +(def-tex city-port-metal-green-main ctyport-vis-tfrag 21) +(def-tex city-port-bigpipe-ring-side ctyport-vis-tfrag 22) +(def-tex city-port-bracketmetal-tiny ctyport-vis-tfrag 23) +(def-tex city-bluelight ctyport-vis-tfrag 24) +(def-tex city-port-black ctyport-vis-tfrag 25) +(def-tex city-port-metal-green-main-side ctyport-vis-tfrag 26) +(def-tex city-port-metal ctyport-vis-tfrag 27) +(def-tex city-port-litwindow ctyport-vis-tfrag 28) +(def-tex city-port-wall-metal-01 ctyport-vis-tfrag 29) +(def-tex city-port-garage-door01 ctyport-vis-tfrag 30) +(def-tex city-port-metal-block-01 ctyport-vis-tfrag 31) +(def-tex city-port-bigpipe-siding ctyport-vis-tfrag 32) +(def-tex city-port-canopyarm-swivel-sides ctyport-vis-tfrag 34) +(def-tex city-redlight ctyport-vis-tfrag 36) +(def-tex city-port-dark-marble ctyport-vis-tfrag 37) +(def-tex city-port-small-metal-highlite ctyport-vis-tfrag 38) +(def-tex city-port-copper-lines ctyport-vis-tfrag 39) +(def-tex city-port-roofmetal ctyport-vis-tfrag 40) +(def-tex city-roofmetal-rim ctyport-vis-tfrag 41) +(def-tex city-port-metal-beam ctyport-vis-tfrag 42) +(def-tex city-port-bolt ctyport-vis-tfrag 43) +(def-tex city-port-barrel-body ctyport-vis-tfrag 44) +(def-tex city-port-door01 ctyport-vis-tfrag 45) +(def-tex city-port-ventbase-01 ctyport-vis-tfrag 46) +(def-tex city-port-pavmnt-01 ctyport-vis-tfrag 47) +(def-tex city-port-citywall ctyport-vis-tfrag 48) +(def-tex city-port-bridge-side ctyport-vis-tfrag 49) +(def-tex city-port-plate-05 ctyport-vis-tfrag 50) +(def-tex city-greenlight ctyport-vis-tfrag 51) +(def-tex city-port-piece-metal ctyport-vis-tfrag 52) +(def-tex city-port-bridge-main ctyport-vis-tfrag 53) +(def-tex city-port-control-panel-litup2 ctyport-vis-tfrag 54) +(def-tex city-roofmetal ctyport-vis-tfrag 55) +(def-tex city-port-roofmetal-rim ctyport-vis-tfrag 56) +(def-tex city-greenlight2 ctyport-vis-tfrag 57) +(def-tex city-port-barge-plain-metal ctyport-vis-tfrag 58) +(def-tex city-port-barge-grating ctyport-vis-tfrag 59) +(def-tex city-port-crate-metal-inside ctyport-vis-tfrag 60) +(def-tex city-port-barge-glass ctyport-vis-tfrag 61) +(def-tex city-port-barge-metal-darker ctyport-vis-tfrag 62) +(def-tex city-port-barge-plain-metal-1 ctyport-vis-tfrag 63) +(def-tex city-port-barge-side ctyport-vis-tfrag 64) +(def-tex city-port-barge-side-doors ctyport-vis-tfrag 65) +(def-tex city-port-barge-side-plain ctyport-vis-tfrag 66) +(def-tex environment-oldmetal ctyport-vis-tfrag 67) +(def-tex hip-tmetfloor04 ctyport-vis-tfrag 68) +(def-tex hip-tmetring02 ctyport-vis-tfrag 69) +(def-tex hip-twood01 ctyport-vis-tfrag 70) +(def-tex t-citywide-met-strp-close ctyport-vis-tfrag 72) +(def-tex city-step ctyport-vis-tfrag 73) +(def-tex citywide-palace-tower-side ctyport-vis-tfrag 74) +(def-tex t-citywide-met-strp01 ctyport-vis-tfrag 75) +(def-tex city-metal-pipeside-01 ctyport-vis-tfrag 78) +(def-tex city-railing ctyport-vis-tfrag 79) +(def-tex city-wall-base-rim-02 ctyport-vis-tfrag 80) +(def-tex citywide-pillar ctyport-vis-tfrag 81) +(def-tex city-port-pavmnt--cracked-01 ctyport-vis-tfrag 86) +(def-tex common-black ctyport-vis-tfrag 87) +(def-tex city-port-pavmnt--scorched-01 ctyport-vis-tfrag 88) +(def-tex city-port-cable-cylinder-01 ctyport-vis-tfrag 94) +(def-tex city-port-cable-quare-01 ctyport-vis-tfrag 95) +(def-tex rub-palace-tower-side ctyport-vis-tfrag 96) +(def-tex city-port-seam-metal-HI ctyport-vis-tfrag 97) +(def-tex city-yellowlight ctyport-vis-tfrag 98) +(def-tex stdmb-energy-wall-01 stadiumb-vis-alpha 0) +(def-tex bam-eyelight stadiumb-vis-pris 13) +(def-tex bam-hairhilite stadiumb-vis-pris 14) +(def-tex environment-oldmetal stadiumb-vis-pris 15) +(def-tex jakc-armor stadiumb-vis-pris 16) +(def-tex jakc-chestplate-straps stadiumb-vis-pris 17) +(def-tex jakc-gogglemetal stadiumb-vis-pris 18) +(def-tex jakc-lens stadiumb-vis-pris 19) +(def-tex jakc-scarf stadiumb-vis-pris 20) +(def-tex jakc-scarfhanging stadiumb-vis-pris 21) +(def-tex jakc-skirt stadiumb-vis-pris 22) +(def-tex jakc-waistband2 stadiumb-vis-pris 23) +(def-tex jakc-wraps stadiumb-vis-pris 24) +(def-tex jakc-wristband-a2 stadiumb-vis-pris 25) +(def-tex jakchires-arm stadiumb-vis-pris 26) +(def-tex jakchires-blackstrap stadiumb-vis-pris 27) +(def-tex jakchires-brownstrap stadiumb-vis-pris 28) +(def-tex jakchires-brwnleather stadiumb-vis-pris 29) +(def-tex jakchires-chestplate stadiumb-vis-pris 30) +(def-tex jakchires-clips stadiumb-vis-pris 31) +(def-tex jakchires-eye stadiumb-vis-pris 32) +(def-tex jakchires-eyebrow stadiumb-vis-pris 33) +(def-tex jakchires-eyelid stadiumb-vis-pris 34) +(def-tex jakchires-facelft stadiumb-vis-pris 35) +(def-tex jakchires-facert stadiumb-vis-pris 36) +(def-tex jakchires-glovetop stadiumb-vis-pris 37) +(def-tex jakchires-hair stadiumb-vis-pris 38) +(def-tex jakchires-horn stadiumb-vis-pris 39) +(def-tex jakchires-jacket stadiumb-vis-pris 40) +(def-tex jakchires-leatherpouch stadiumb-vis-pris 41) +(def-tex jakchires-lightbrownspat stadiumb-vis-pris 42) +(def-tex jakchires-pants stadiumb-vis-pris 43) +(def-tex jakchires-precarmor-01 stadiumb-vis-pris 44) +(def-tex jakchires-shoebottom stadiumb-vis-pris 45) +(def-tex jakchires-shoemetal stadiumb-vis-pris 46) +(def-tex jakchires-shoeteop stadiumb-vis-pris 47) +(def-tex jakchires-teeth stadiumb-vis-pris 48) +(def-tex rub-metal-01 stadiumb-vis-tfrag 0) +(def-tex stdm-wallrock-dirt stadiumb-vis-tfrag 8) +(def-tex stdm-glass-01 stadiumb-vis-tfrag 12) +(def-tex rub-rubble-01 stadiumb-vis-tfrag 19) +(def-tex city-slum-burning-can stadiumb-vis-tfrag 23) +(def-tex stdmb-gray-metal-01 stadiumb-vis-tfrag 49) +(def-tex stdmb-panel-01 stadiumb-vis-tfrag 52) +(def-tex stdmb-panel-09 stadiumb-vis-tfrag 56) +(def-tex stdmb-wall-03 stadiumb-vis-tfrag 69) +(def-tex stdmb-marble-floor-01 stadiumb-vis-tfrag 70) +(def-tex stdmb-track-side-01 stadiumb-vis-tfrag 76) +(def-tex rub-marble-floor-01-hitweak stadiumb-vis-tfrag 78) +(def-tex rub-stad-brick stadiumb-vis-tfrag 79) +(def-tex rub-beam-gen stadiumb-vis-tfrag 80) +(def-tex rub-wall-gen-01 stadiumb-vis-tfrag 81) +(def-tex rub-wall-side-beam-02 stadiumb-vis-tfrag 82) +(def-tex rub-city-wall-inside-damaged stadiumb-vis-tfrag 83) +(def-tex rub-cement-a stadiumb-vis-tfrag 84) +(def-tex rub-cement-broken-end stadiumb-vis-tfrag 85) +(def-tex rub-metal-flatpipe-01 stadiumb-vis-tfrag 86) +(def-tex rub-wall-trim stadiumb-vis-tfrag 87) +(def-tex rub-wall-gen-04 stadiumb-vis-tfrag 88) +(def-tex rub-wall-gen-02 stadiumb-vis-tfrag 89) +(def-tex rub-cement-pillars stadiumb-vis-tfrag 90) +(def-tex rub-wall-gen-06 stadiumb-vis-tfrag 91) +(def-tex rub-metal-pipeside-01 stadiumb-vis-tfrag 92) +(def-tex rub-wall-gen-03 stadiumb-vis-tfrag 93) +(def-tex rub-ox-pipe-01 stadiumb-vis-tfrag 94) +(def-tex stdmb-broken-light stadiumb-vis-tfrag 95) +(def-tex rub-palshaft-dirt-blue-01 stadiumb-vis-tfrag 96) +(def-tex rub-panels-01 stadiumb-vis-tfrag 97) +(def-tex rub-palace-tower-side stadiumb-vis-tfrag 98) +(def-tex rub-met-strp-close stadiumb-vis-tfrag 99) +(def-tex rub-copper-metal-02 stadiumb-vis-tfrag 100) +(def-tex stdmb-track-01 stadiumb-vis-tfrag 103) +(def-tex stdmb-lightpost-base-02 stadiumb-vis-tfrag 106) +(def-tex rub-stad-brick-pieces stadiumb-vis-tfrag 107) +(def-tex rub-city-wall-frame stadiumb-vis-tfrag 108) +(def-tex rub-cement-top stadiumb-vis-tfrag 109) +(def-tex rub-rubble-ground stadiumb-vis-tfrag 110) +(def-tex citywide-sail-01 stadiumb-vis-tfrag 114) +(def-tex vehicle-body-panel-01 wasall-pris 8) +(def-tex vehicle-brace-pipe-01 wasall-pris 9) +(def-tex vehicle-cap-pin-01 wasall-pris 10) +(def-tex vehicle-cushion-01 wasall-pris 11) +(def-tex vehicle-dash-01 wasall-pris 12) +(def-tex vehicle-dash-02 wasall-pris 13) +(def-tex vehicle-exhaust-pipe-01 wasall-pris 14) +(def-tex vehicle-gas-tank-01 wasall-pris 16) +(def-tex vehicle-gun-box-01 wasall-pris 17) +(def-tex vehicle-gun-box-top-01 wasall-pris 18) +(def-tex vehicle-metal-plate-01 wasall-pris 19) +(def-tex vehicle-pad-01 wasall-pris 20) +(def-tex vehicle-pipe-01 wasall-pris 21) +(def-tex vehicle-rims-01 wasall-pris 22) +(def-tex vehicle-shocks-01 wasall-pris 23) +(def-tex vehicle-side-panel-01 wasall-pris 24) +(def-tex vehicle-sml-met-01 wasall-pris 25) +(def-tex vehicle-tread-01 wasall-pris 26) +(def-tex vehicle-wheel-01 wasall-pris 27) +(def-tex vehicle-wire-01 wasall-pris 28) +(def-tex common-black wasall-pris 29) +(def-tex vehicle-chrome-pipe-01 wasall-pris 30) +(def-tex vehicle-metal-plate-02 wasall-pris 31) +(def-tex vehicle-safety-plate-01 wasall-pris 32) +(def-tex vehicle-snake-chassis-01 wasall-pris 33) +(def-tex vehicle-snake-drum-01 wasall-pris 34) +(def-tex vehicle-snake-drum-02 wasall-pris 35) +(def-tex vehicle-snake-drum-03 wasall-pris 36) +(def-tex vehicle-snake-tank-01 wasall-pris 37) +(def-tex vehicle-snake-tank-02 wasall-pris 38) +(def-tex vehicle-snake-tread-01 wasall-pris 39) +(def-tex vehicle-snake-tread-02 wasall-pris 40) +(def-tex vehicle-tread-blur-01 wasall-pris 41) +(def-tex vehicle-wheel-blur-01 wasall-pris 42) +(def-tex vehicle-green-dash-01 wasall-pris 43) +(def-tex vehicle-lite-01 wasall-pris 44) +(def-tex vehicle-pad-02 wasall-pris 45) +(def-tex vehicle-shocks-02 wasall-pris 46) +(def-tex vehicle-shocks-03 wasall-pris 47) +(def-tex vehicle-shocks-stretch-01 wasall-pris 48) +(def-tex vehicle-shocks-stretch-02 wasall-pris 49) +(def-tex vehicle-tread-blur-02 wasall-pris 50) +(def-tex vehicle-turtle-dash-01 wasall-pris 51) +(def-tex vehicle-toad-chassis-01 wasall-pris 52) +(def-tex vehicle-toad-chassis-02 wasall-pris 53) +(def-tex vehicle-toad-chassis-03 wasall-pris 54) +(def-tex vehicle-toad-exhaust-01 wasall-pris 55) +(def-tex vehicle-toad-tank-01 wasall-pris 56) +(def-tex vehicle-toad-tank-02 wasall-pris 57) +(def-tex vehicle-toad-tire-01 wasall-pris 58) +(def-tex vehicle-snake-tread-01-blur wasall-pris 59) +(def-tex vehicle-toad-tire-01-blur wasall-pris 60) +(def-tex vehicle-toad-dash-01 wasall-pris 61) +(def-tex vehicle-snake-gun-01 wasall-pris 78) +(def-tex vehicle-snake-gun-02 wasall-pris 79) +(def-tex intcept-tread01 wasall-pris 80) +(def-tex rhino-front-01 wasall-pris 81) +(def-tex rhino-front-02 wasall-pris 82) +(def-tex rhino-horn-01 wasall-pris 83) +(def-tex rhino-horn-02 wasall-pris 84) +(def-tex rhino-metal-01 wasall-pris 85) +(def-tex rhino-rag-01 wasall-pris 86) +(def-tex rhino-scoop-01 wasall-pris 87) +(def-tex rhino-wheel-01 wasall-pris 88) +(def-tex tread-interceptor-rhino wasall-pris 90) +(def-tex tread-scorpion wasall-pris 91) +(def-tex tread-snake wasall-pris 92) +(def-tex tread-toad wasall-pris 93) +(def-tex tread-turtle wasall-pris 94) +(def-tex vehicle-tread-02 wasall-pris 95) +(def-tex vehicle-fox-drum-02 wasall-pris 102) +(def-tex vehicle-fox-gun-02 wasall-pris 105) +(def-tex vehicle-fox-tread-01-blur wasall-pris 109) +(def-tex vehicle-fox-engine wasall-pris 111) +(def-tex vehicle-fox-exhaust-tube wasall-pris 112) +(def-tex vehicle-fox-grill wasall-pris 113) +(def-tex vehicle-fox-pipe-large wasall-pris 114) +(def-tex vehicle-fox-pipe-small wasall-pris 115) +(def-tex vehicle-fox-plate-back wasall-pris 116) +(def-tex vehicle-fox-plate-hood wasall-pris 117) +(def-tex vehicle-fox-yellow-bar wasall-pris 118) +(def-tex vehicle-snake-nu-chassis-01 wasall-pris 119) +(def-tex wstd-rockwall-01 wasstada-tfrag 8) +(def-tex wstd-small-rockwall-01 wasstada-tfrag 9) +(def-tex wstd-torchbowl-02 wasstada-tfrag 43) +(def-tex wstd-torchbowl-coal-01 wasstada-tfrag 44) +(def-tex wstd-torchbowl-01 wasstada-tfrag 45) +(def-tex wstd-spike-01 wasstada-tfrag 46) +(def-tex mtn-environment-front-backup wasstada-tfrag 51) +(def-tex wstd-precursor-metal-plain-01 wasstada-tfrag 52) +(def-tex wstd-stands-seats02 wasstada-tfrag 65) +(def-tex wstd-stands-seats01 wasstada-tfrag 66) +(def-tex wstd-stands-stairs02 wasstada-tfrag 67) +(def-tex wstd-stands-stairs01 wasstada-tfrag 68) +(def-tex wstd-tentacle-plate03 wasstada-tfrag 69) +(def-tex wstd-tentacle-plate01 wasstada-tfrag 70) +(def-tex wstd-tentacle-barrel wasstada-tfrag 71) +(def-tex wstd-floor-panel02 wasstada-tfrag 72) +(def-tex wstd-floor-panel03 wasstada-tfrag 73) +(def-tex wstd-canopy wasstada-tfrag 75) +(def-tex wstd-stands-plate01 wasstada-tfrag 76) +(def-tex wstd-stands-shell wasstada-tfrag 78) +(def-tex wstd-floor-panel01 wasstada-tfrag 79) +(def-tex wstd-stands-shell01 wasstada-tfrag 80) +(def-tex wstd-stands-shell02 wasstada-tfrag 81) +(def-tex wstd-throne-plat03 wasstada-tfrag 82) +(def-tex wstd-throne-plat02 wasstada-tfrag 83) +(def-tex wstd-scaffold-strut wasstada-tfrag 84) +(def-tex wstd-stands-plate02 wasstada-tfrag 85) +(def-tex wstd-stands-lowall01 wasstada-tfrag 86) +(def-tex wstd-throne-arch02 wasstada-tfrag 87) +(def-tex wstd-throne-arch01 wasstada-tfrag 88) +(def-tex wstd-throne-wall01 wasstada-tfrag 89) +(def-tex wstd-stands-plate03 wasstada-tfrag 90) +(def-tex wstd-spear01 wasstada-tfrag 91) +(def-tex wstd-throne-chair01 wasstada-tfrag 92) +(def-tex wstd-stands-plate05 wasstada-tfrag 93) +(def-tex wstd-stands-plate04 wasstada-tfrag 94) +(def-tex wstd-stands-black wasstada-tfrag 95) +(def-tex wstd-stands-rib wasstada-tfrag 96) +(def-tex wstd-interior-rock01 wasstada-tfrag 97) +(def-tex wstd-flag wasstada-tfrag 98) +(def-tex wstd-throne-floor01 wasstada-tfrag 99) +(def-tex wstd-stands-ceiling wasstada-tfrag 100) +(def-tex wstd-stands-ceilingplate wasstada-tfrag 101) +(def-tex wstd-throne-floor02 wasstada-tfrag 104) +(def-tex wstd-throne-wall02 wasstada-tfrag 105) +(def-tex wstd-spear02 wasstada-tfrag 106) +(def-tex wstd-stands-plateedge wasstada-tfrag 107) +(def-tex wstd-mount-post wasstada-tfrag 114) +(def-tex wstd-scaffold-wall-01 wasstada-tfrag 116) +(def-tex wstd-platform-base wasstada-tfrag 117) +(def-tex wstd-platform-floor wasstada-tfrag 118) +(def-tex wstd-platform-wall wasstada-tfrag 119) +(def-tex wstd-scaffold-teeth wasstada-tfrag 120) +(def-tex wstd-scaffold-wall-edge wasstada-tfrag 121) +(def-tex wstd-scaffold-wall-02 wasstada-tfrag 123) +(def-tex wstd-scaffold-plate-01 wasstada-tfrag 124) +(def-tex wstd-scaffold-wall-03 wasstada-tfrag 125) +(def-tex wstd-scaffold-bar wasstada-tfrag 126) +(def-tex common_sandstone_taper01 wasstada-tfrag 129) +(def-tex common_sandstone_ground01 wasstada-tfrag 130) +(def-tex common_sandstone_trim01 wasstada-tfrag 131) +(def-tex wstd-throne-table-big wasstada-tfrag 132) +(def-tex tpal-panl_piller01 intpalrf-tfrag 0) +(def-tex palroof-scalestone-01 intpalrf-tfrag 2) +(def-tex tpal-beam-redstripe01 intpalrf-tfrag 3) +(def-tex tpal-flaps01 intpalrf-tfrag 4) +(def-tex tpal-horiz-trim01 intpalrf-tfrag 5) +(def-tex tpal-piller-caps02 intpalrf-tfrag 6) +(def-tex tpal-beam01 intpalrf-tfrag 7) +(def-tex tpal-beam-red01 intpalrf-tfrag 8) +(def-tex tpal-beam-red-yellow01 intpalrf-tfrag 9) +(def-tex tpal-panl02 intpalrf-tfrag 10) +(def-tex tpal-wind-glass-01 intpalrf-tfrag 11) +(def-tex tpal-wind-fram-01 intpalrf-tfrag 12) +(def-tex tpal-drain01 intpalrf-tfrag 13) +(def-tex tpal-horiz-trim02 intpalrf-tfrag 14) +(def-tex tpal-big-metal-panl01 intpalrf-tfrag 15) +(def-tex troof-sndwch-beam-01 intpalrf-tfrag 16) +(def-tex palroof-metal intpalrf-tfrag 17) +(def-tex tpal-met-pip-01 intpalrf-tfrag 18) +(def-tex thrm-shield-01 intpalrf-tfrag 19) +(def-tex troof-shield-02 intpalrf-tfrag 20) +(def-tex troof-beam01 intpalrf-tfrag 21) +(def-tex intr-horiz-trim02 intpalrf-tfrag 26) +(def-tex intr-panl_piller-no-alpha01 intpalrf-tfrag 27) +(def-tex intr-panl02 intpalrf-tfrag 28) +(def-tex intr-beam-no-alpha01 intpalrf-tfrag 29) +(def-tex intr-scalestone-no-alpha01 intpalrf-tfrag 30) +(def-tex intr-grey-holes intpalrf-tfrag 31) +(def-tex intr-grey intpalrf-tfrag 32) +(def-tex tpal-piller-caps01 intpalrf-tfrag 34) +(def-tex intr-drain01 intpalrf-tfrag 35) +(def-tex troof-beam01 intpalrf-shrub 0) +(def-tex tpal-met-pip-01 intpalrf-shrub 2) +(def-tex tpal-piller-caps01 intpalrf-shrub 3) +(def-tex palroof-stain-wall-01 intpalrf-alpha 0) +(def-tex nest-egg-lens nsta-sprite 0) +(def-tex nest-egg-shell nsta-sprite 1) +(def-tex flying-gull-01 nsta-sprite 2) +(def-tex flying-gull-02 nsta-sprite 3) +(def-tex flying-gull-03 nsta-sprite 4) +(def-tex flying-gull-04 nsta-sprite 5) +(def-tex flying-gull-05 nsta-sprite 6) +(def-tex flying-gull-06 nsta-sprite 7) +(def-tex ceiling-dust nsta-sprite 8) +(def-tex dust-sparkle nsta-sprite 10) +(def-tex ya-water halfpipe-water 0) +(def-tex windshield01 factorya-water 2) +(def-tex errolcyber-lens factorya-water 3) +(def-tex backThing01 factorya-pris 45) +(def-tex dash01 factorya-pris 46) +(def-tex gauge01 factorya-pris 47) +(def-tex grillRim01 factorya-pris 48) +(def-tex gunBoxBack01 factorya-pris 49) +(def-tex gunBoxFront01 factorya-pris 50) +(def-tex gunbox01 factorya-pris 51) +(def-tex gunbox02 factorya-pris 52) +(def-tex hood01 factorya-pris 53) +(def-tex jetTop01 factorya-pris 54) +(def-tex jets01 factorya-pris 55) +(def-tex kcfrontend01 factorya-pris 56) +(def-tex light01 factorya-pris 57) +(def-tex lightCase01 factorya-pris 58) +(def-tex post01 factorya-pris 59) +(def-tex rail01 factorya-pris 60) +(def-tex seat01 factorya-pris 61) +(def-tex stripe03 factorya-pris 62) +(def-tex turret01 factorya-pris 63) +(def-tex wing01 factorya-pris 64) +(def-tex wing02 factorya-pris 65) +(def-tex wing02grey01 factorya-pris 66) +(def-tex bam-eyelight factorya-pris 80) +(def-tex bam-hairhilite factorya-pris 81) +(def-tex daxter-eyelid factorya-pris 82) +(def-tex daxter-furhilite factorya-pris 83) +(def-tex daxter-orange factorya-pris 84) +(def-tex daxterarm factorya-pris 85) +(def-tex daxterbodyshort-eix factorya-pris 86) +(def-tex daxterbolt factorya-pris 87) +(def-tex daxterear factorya-pris 88) +(def-tex daxterfinger factorya-pris 89) +(def-tex daxterfoot factorya-pris 90) +(def-tex daxterfoot-bottom factorya-pris 91) +(def-tex daxtergoggles factorya-pris 92) +(def-tex daxterheadwidenew factorya-pris 93) +(def-tex daxterhelmetplain factorya-pris 94) +(def-tex daxterlense factorya-pris 95) +(def-tex daxternose factorya-pris 96) +(def-tex daxterteeth factorya-pris 97) +(def-tex daxtertuft factorya-pris 98) +(def-tex environment-oldmetal factorya-pris 99) +(def-tex jakc-armor factorya-pris 100) +(def-tex jakc-chestplate-straps factorya-pris 101) +(def-tex jakc-gogglemetal factorya-pris 102) +(def-tex jakc-lens factorya-pris 103) +(def-tex jakc-scarf factorya-pris 104) +(def-tex jakc-scarfhanging factorya-pris 105) +(def-tex jakc-skirt factorya-pris 106) +(def-tex jakc-waistband2 factorya-pris 107) +(def-tex jakc-wraps factorya-pris 108) +(def-tex jakc-wristband-a2 factorya-pris 109) +(def-tex jakchires-arm factorya-pris 110) +(def-tex jakchires-blackstrap factorya-pris 111) +(def-tex jakchires-brownstrap factorya-pris 112) +(def-tex jakchires-brwnleather factorya-pris 113) +(def-tex jakchires-chestplate factorya-pris 114) +(def-tex jakchires-clips factorya-pris 115) +(def-tex jakchires-eye factorya-pris 116) +(def-tex jakchires-eyebrow factorya-pris 117) +(def-tex jakchires-eyelid factorya-pris 118) +(def-tex jakchires-facelft factorya-pris 119) +(def-tex jakchires-facert factorya-pris 120) +(def-tex jakchires-glovetop factorya-pris 121) +(def-tex jakchires-hair factorya-pris 122) +(def-tex jakchires-horn factorya-pris 123) +(def-tex jakchires-jacket factorya-pris 124) +(def-tex jakchires-leatherpouch factorya-pris 125) +(def-tex jakchires-lightbrownspat factorya-pris 126) +(def-tex jakchires-pants factorya-pris 127) +(def-tex jakchires-precarmor-01 factorya-pris 128) +(def-tex jakchires-shoebottom factorya-pris 129) +(def-tex jakchires-shoemetal factorya-pris 130) +(def-tex jakchires-shoeteop factorya-pris 131) +(def-tex jakchires-teeth factorya-pris 132) +(def-tex lfacrm-hangar-edge-01 factorya-pris 133) +(def-tex lfacrm-hangar-panel-01 factorya-pris 134) +(def-tex lfacrm-hangar-panel-02 factorya-pris 135) +(def-tex lfacrm-hangar-panel-rim-01 factorya-pris 136) +(def-tex lfacrm-hangar-tooth-01 factorya-pris 137) +(def-tex blue-gem factorya-pris 142) +(def-tex brown-hose factorya-pris 143) +(def-tex cguard1-backmetal factorya-pris 144) +(def-tex cguard1-chestplate factorya-pris 145) +(def-tex cguard1-gunmetaldark2 factorya-pris 146) +(def-tex cguard1-guntube factorya-pris 147) +(def-tex cguard1-lens factorya-pris 148) +(def-tex cguardgame-backplate factorya-pris 149) +(def-tex cguardgame-metaledark-02 factorya-pris 150) +(def-tex cguardgame-metallight-01small factorya-pris 151) +(def-tex cguardgame-shoebottom factorya-pris 152) +(def-tex roboguard-die-stamped-metal-blue factorya-pris 153) +(def-tex roboguard-headshield factorya-pris 155) +(def-tex roboguard-shouldershield factorya-pris 156) +(def-tex squid-bulb-sm factorya-pris 157) +(def-tex squid-tubes factorya-pris 158) +(def-tex widow-dull-inards factorya-pris 159) +(def-tex widow-pod-gun-metal factorya-pris 160) +(def-tex wire-metal factorya-pris 161) +(def-tex errocyber-faceflesh factorya-pris 162) +(def-tex errolcyber-bighand-01 factorya-pris 163) +(def-tex errolcyber-bigshoulder factorya-pris 164) +(def-tex errolcyber-bluedome factorya-pris 165) +(def-tex errolcyber-bluemetal-01 factorya-pris 166) +(def-tex errolcyber-bluewrap factorya-pris 167) +(def-tex errolcyber-chestplate factorya-pris 168) +(def-tex errolcyber-dirtymetal factorya-pris 169) +(def-tex errolcyber-earcup factorya-pris 170) +(def-tex errolcyber-fingers factorya-pris 171) +(def-tex errolcyber-glovepalm factorya-pris 172) +(def-tex errolcyber-greyknobs factorya-pris 173) +(def-tex errolcyber-greymetal factorya-pris 174) +(def-tex errolcyber-greymetal-02 factorya-pris 175) +(def-tex errolcyber-hair factorya-pris 176) +(def-tex errolcyber-head-01 factorya-pris 177) +(def-tex errolcyber-head-02 factorya-pris 178) +(def-tex errolcyber-insidemouth factorya-pris 179) +(def-tex errolcyber-insidewires factorya-pris 180) +(def-tex errolcyber-jointpipe factorya-pris 181) +(def-tex errolcyber-metalgold factorya-pris 182) +(def-tex errolcyber-pipes-01 factorya-pris 183) +(def-tex errolcyber-pipes-02 factorya-pris 184) +(def-tex errolcyber-pipes-03 factorya-pris 185) +(def-tex errolcyber-redmetal-01 factorya-pris 186) +(def-tex errolcyber-redmetal-02 factorya-pris 187) +(def-tex errolcyber-redmetal-03 factorya-pris 188) +(def-tex errolcyber-rubberpipe factorya-pris 189) +(def-tex errolcyber-rubberpipe-light factorya-pris 190) +(def-tex errolcyber-spine factorya-pris 191) +(def-tex errolcyber-teeth factorya-pris 192) +(def-tex errocyber-eye factorya-pris 193) +(def-tex errocyber-eyelid factorya-pris 194) +(def-tex errolcyber-metaleyelid factorya-pris 195) +(def-tex errolcyber-roboeye factorya-pris 196) +(def-tex squid-drabgun factorya-pris 199) +(def-tex bam-eyelight introcst-pris 0) +(def-tex bam-hairhilite introcst-pris 1) +(def-tex cguard-shoebottom introcst-pris 2) +(def-tex cguard-shoemetal introcst-pris 3) +(def-tex cguard1-armshield introcst-pris 4) +(def-tex cguard1-backmetal introcst-pris 5) +(def-tex cguard1-boottop introcst-pris 6) +(def-tex cguard1-brushedmetal introcst-pris 7) +(def-tex cguard1-chestplate introcst-pris 8) +(def-tex cguard1-eyering introcst-pris 9) +(def-tex cguard1-face introcst-pris 10) +(def-tex cguard1-glove introcst-pris 11) +(def-tex cguard1-greyheadshield introcst-pris 12) +(def-tex cguard1-gunboltlight introcst-pris 13) +(def-tex cguard1-gunhandle introcst-pris 14) +(def-tex cguard1-gunleather introcst-pris 15) +(def-tex cguard1-gunmetaldark introcst-pris 16) +(def-tex cguard1-gunmetaldark2 introcst-pris 17) +(def-tex cguard1-gunstrap introcst-pris 18) +(def-tex cguard1-guntube introcst-pris 19) +(def-tex cguard1-headshield introcst-pris 20) +(def-tex cguard1-jacketstraps introcst-pris 21) +(def-tex cguard1-lens introcst-pris 22) +(def-tex cguard1-metalcollar introcst-pris 23) +(def-tex cguard1-pants introcst-pris 24) +(def-tex cguard1-rubber-01 introcst-pris 25) +(def-tex cguard1-scarf introcst-pris 26) +(def-tex cguard1-shirt introcst-pris 27) +(def-tex cguard1-shouldershield introcst-pris 28) +(def-tex cguard1-sleeve introcst-pris 29) +(def-tex cguard1-teeth introcst-pris 30) +(def-tex daxter-eyelid introcst-pris 31) +(def-tex daxter-furhilite introcst-pris 32) +(def-tex daxter-orange introcst-pris 33) +(def-tex daxterarm introcst-pris 34) +(def-tex daxterbodyshort-eix introcst-pris 35) +(def-tex daxterbolt introcst-pris 36) +(def-tex daxterear introcst-pris 37) +(def-tex daxterfinger introcst-pris 38) +(def-tex daxterfoot introcst-pris 39) +(def-tex daxterfoot-bottom introcst-pris 40) +(def-tex daxtergoggles introcst-pris 41) +(def-tex daxterheadwidenew introcst-pris 42) +(def-tex daxterhelmetplain introcst-pris 43) +(def-tex daxterlense introcst-pris 44) +(def-tex daxternose introcst-pris 45) +(def-tex daxterteeth introcst-pris 46) +(def-tex daxtertuft introcst-pris 47) +(def-tex environment-oldmetal introcst-pris 48) +(def-tex jackb-lens introcst-pris 49) +(def-tex jak-belt introcst-pris 50) +(def-tex jak-gogglemetal introcst-pris 51) +(def-tex jak-teeth introcst-pris 52) +(def-tex beacon-body-01 introcst-pris 53) +(def-tex jakb-blackstrap introcst-pris 54) +(def-tex jakb-brownleather introcst-pris 55) +(def-tex jakb-clips introcst-pris 56) +(def-tex jakb-eye introcst-pris 57) +(def-tex jakb-eyebrow introcst-pris 58) +(def-tex jakb-eyelid introcst-pris 59) +(def-tex jakb-facelft introcst-pris 60) +(def-tex jakb-facert introcst-pris 61) +(def-tex jakb-glovetop introcst-pris 62) +(def-tex jakb-hairtrans introcst-pris 63) +(def-tex jakb-horn introcst-pris 64) +(def-tex jakb-jacketbody introcst-pris 65) +(def-tex jakb-jacketsleeve introcst-pris 66) +(def-tex jakb-leatherpouch introcst-pris 67) +(def-tex jakb-leatherstrap introcst-pris 68) +(def-tex jakb-lightbrownspat introcst-pris 69) +(def-tex jakb-lightbrownstrap introcst-pris 70) +(def-tex jakb-pants introcst-pris 71) +(def-tex jakb-scarf introcst-pris 72) +(def-tex jakb-shoebottom introcst-pris 73) +(def-tex jakb-shoemetal introcst-pris 74) +(def-tex jakb-shoeteop introcst-pris 75) +(def-tex pecker-body-01 introcst-pris 80) +(def-tex pecker-eyelid introcst-pris 81) +(def-tex pecker-face introcst-pris 82) +(def-tex pecker-plume introcst-pris 83) +(def-tex pecker-tail introcst-pris 84) +(def-tex pecker-teeth introcst-pris 85) +(def-tex pecker-wingbottom introcst-pris 86) +(def-tex pecker-wingtop introcst-pris 87) +(def-tex pecker-yellowfur introcst-pris 88) +(def-tex beacon-body-02 introcst-pris 144) +(def-tex beacon-body-03 introcst-pris 145) +(def-tex beacon-lens introcst-pris 146) +(def-tex common-black introcst-pris 147) +(def-tex handcuff-01 introcst-pris 148) +(def-tex handcuff-02 introcst-pris 149) +(def-tex handcuff-03 introcst-pris 150) +(def-tex handcuff-04 introcst-pris 151) +(def-tex jakb-armor introcst-pris 152) +(def-tex prebot-envmap introcst-pris 153) +(def-tex klever-earcup introcst-pris 169) +(def-tex klever-eye introcst-pris 170) +(def-tex klever-eyelid introcst-pris 171) +(def-tex klever-face-01 introcst-pris 172) +(def-tex klever-face-01scars introcst-pris 173) +(def-tex klever-hair introcst-pris 174) +(def-tex klever-mustache introcst-pris 175) +(def-tex klever-arm introcst-pris 195) +(def-tex klever-brownstrap introcst-pris 196) +(def-tex klever-chest introcst-pris 197) +(def-tex klever-clips introcst-pris 198) +(def-tex klever-handwrap introcst-pris 199) +(def-tex klever-armor-01 introcst-pris 200) +(def-tex klever-armor-02 introcst-pris 201) +(def-tex klever-blackstrap introcst-pris 202) +(def-tex klever-bolt introcst-pris 203) +(def-tex klever-gunmetal-01 introcst-pris 204) +(def-tex klever-gunmetal-02 introcst-pris 205) +(def-tex klever-gunmetal-03 introcst-pris 206) +(def-tex klever-gunmetal-04 introcst-pris 207) +(def-tex klever-gunmetal-05 introcst-pris 208) +(def-tex klever-hand introcst-pris 209) +(def-tex klever-horn introcst-pris 210) +(def-tex klever-shoe introcst-pris 211) +(def-tex klever-shoebottom introcst-pris 212) +(def-tex klever-skirtdark introcst-pris 213) +(def-tex klever-skirtlight introcst-pris 214) +(def-tex klever-thighs introcst-pris 215) +(def-tex klever-undershirt introcst-pris 216) +(def-tex klever-widebrownstrap introcst-pris 217) +(def-tex klever-fingerbottom introcst-pris 218) +(def-tex klever-fingertop introcst-pris 219) +(def-tex ashelin-beltbuckle introcst-pris2 0) +(def-tex ashelin-bolts introcst-pris2 1) +(def-tex ashelin-boottop introcst-pris2 2) +(def-tex ashelin-brownstrap introcst-pris2 3) +(def-tex ashelin-cglogo introcst-pris2 4) +(def-tex ashelin-cgrank introcst-pris2 5) +(def-tex ashelin-chest introcst-pris2 6) +(def-tex ashelin-eye introcst-pris2 7) +(def-tex ashelin-eyebrow introcst-pris2 8) +(def-tex ashelin-eyelid introcst-pris2 9) +(def-tex ashelin-face introcst-pris2 10) +(def-tex ashelin-glove introcst-pris2 11) +(def-tex ashelin-gunbarrel-01 introcst-pris2 12) +(def-tex ashelin-gunbarrel-02 introcst-pris2 13) +(def-tex ashelin-gunbarrel-03 introcst-pris2 14) +(def-tex ashelin-gunholster introcst-pris2 15) +(def-tex ashelin-hair introcst-pris2 16) +(def-tex ashelin-handle-01 introcst-pris2 17) +(def-tex ashelin-jacketbody introcst-pris2 18) +(def-tex ashelin-jacketsleeve introcst-pris2 19) +(def-tex ashelin-jacketstraps introcst-pris2 20) +(def-tex ashelin-pantstop introcst-pris2 21) +(def-tex ashelin-redtop introcst-pris2 22) +(def-tex ashelin-shells introcst-pris2 23) +(def-tex ashelin-shield introcst-pris2 24) +(def-tex ashelin-shoebottom introcst-pris2 25) +(def-tex ashelin-shoemetal introcst-pris2 26) +(def-tex ashelin-teeth introcst-pris2 27) +(def-tex ashelin-whitestrap introcst-pris2 28) +(def-tex bam-eyelight introcst-pris2 29) +(def-tex bam-hairhilite introcst-pris2 30) +(def-tex environment-oldmetal introcst-pris2 31) +(def-tex samos-arm introcst-pris2 32) +(def-tex samos-diaper introcst-pris2 33) +(def-tex samos-ear introcst-pris2 34) +(def-tex samos-eye introcst-pris2 35) +(def-tex samos-eyelid introcst-pris2 36) +(def-tex samos-face introcst-pris2 37) +(def-tex samos-finger-01 introcst-pris2 38) +(def-tex samos-hair introcst-pris2 39) +(def-tex samos-helmet introcst-pris2 40) +(def-tex samos-leaf introcst-pris2 41) +(def-tex samos-lens introcst-pris2 42) +(def-tex samos-log-01 introcst-pris2 43) +(def-tex samos-log-02 introcst-pris2 44) +(def-tex samos-log-03 introcst-pris2 45) +(def-tex samos-metal introcst-pris2 46) +(def-tex samos-strap introcst-pris2 47) +(def-tex samos-teeth2 introcst-pris2 48) +(def-tex samos-vest introcst-pris2 49) +(def-tex samosbird-beak introcst-pris2 50) +(def-tex samosbird-body introcst-pris2 51) +(def-tex samosbird-eye introcst-pris2 52) +(def-tex samosbird-plume introcst-pris2 53) +(def-tex samosbird-wing introcst-pris2 54) +(def-tex king-arm introcst-pris2 55) +(def-tex king-blackskirt2 introcst-pris2 56) +(def-tex king-bolt introcst-pris2 57) +(def-tex king-chest introcst-pris2 58) +(def-tex king-clip-02 introcst-pris2 59) +(def-tex king-ear introcst-pris2 60) +(def-tex king-earing introcst-pris2 61) +(def-tex king-face-01 introcst-pris2 62) +(def-tex king-finger introcst-pris2 63) +(def-tex king-greenmetal introcst-pris2 64) +(def-tex king-greenmetalplain introcst-pris2 65) +(def-tex king-hair introcst-pris2 66) +(def-tex king-hand introcst-pris2 67) +(def-tex king-horn introcst-pris2 68) +(def-tex king-iris introcst-pris2 69) +(def-tex king-leg introcst-pris2 70) +(def-tex king-lgblackstrap introcst-pris2 71) +(def-tex king-precursermetal-plain introcst-pris2 72) +(def-tex king-precursermetal-trim2 introcst-pris2 73) +(def-tex king-precursermetal-trimbolt introcst-pris2 74) +(def-tex king-shoebottom introcst-pris2 75) +(def-tex king-skirt introcst-pris2 76) +(def-tex king-teeth introcst-pris2 77) +(def-tex king-thinstrap introcst-pris2 78) +(def-tex king-vest introcst-pris2 79) +(def-tex king-vestback introcst-pris2 80) +(def-tex king-wrap introcst-pris2 81) +(def-tex king-wristband introcst-pris2 82) +(def-tex king-bluemetal introcst-pris2 83) +(def-tex king-precursermetal-decor introcst-pris2 84) +(def-tex king-precursermetal-trim introcst-pris2 85) +(def-tex king-wraps introcst-pris2 86) +(def-tex veger-bookleather introcst-pris2 87) +(def-tex veger-booksides introcst-pris2 88) +(def-tex veger-bookspine introcst-pris2 89) +(def-tex veger-bootbolt introcst-pris2 90) +(def-tex veger-bootfoot introcst-pris2 91) +(def-tex veger-bootstrap introcst-pris2 92) +(def-tex veger-coat introcst-pris2 93) +(def-tex veger-coatbelt introcst-pris2 94) +(def-tex veger-coatclips introcst-pris2 95) +(def-tex veger-endpaper introcst-pris2 96) +(def-tex veger-face introcst-pris2 97) +(def-tex veger-fingerbottom introcst-pris2 98) +(def-tex veger-fingertop introcst-pris2 99) +(def-tex veger-gold introcst-pris2 100) +(def-tex veger-hair introcst-pris2 101) +(def-tex veger-hand introcst-pris2 102) +(def-tex veger-legwraps introcst-pris2 103) +(def-tex veger-pages introcst-pris2 104) +(def-tex veger-pants introcst-pris2 105) +(def-tex veger-parchment introcst-pris2 106) +(def-tex veger-scarf introcst-pris2 107) +(def-tex veger-shoebottom introcst-pris2 108) +(def-tex veger-shoulderplate introcst-pris2 109) +(def-tex veger-shoulderplatemetal introcst-pris2 110) +(def-tex veger-sleeve introcst-pris2 111) +(def-tex veger-sleevelower introcst-pris2 112) +(def-tex veger-stickwrap introcst-pris2 113) +(def-tex veger-teeth introcst-pris2 114) +(def-tex veger-vest introcst-pris2 115) +(def-tex veger-walkingstick-01 introcst-pris2 116) +(def-tex veger-walkingstick-02 introcst-pris2 117) +(def-tex veger-walkingstick-03 introcst-pris2 118) +(def-tex veger-whitecloth introcst-pris2 119) +(def-tex veger-eyelid introcst-pris2 120) +(def-tex veger-iris introcst-pris2 121) +(def-tex king-skirt-b introcst-pris2 124) +(def-tex lava-drop-01 wasstada-sprite 0) +(def-tex lava-drop-02 wasstada-sprite 1) +(def-tex lava-drop-03 wasstada-sprite 2) +(def-tex lava-drop-04 wasstada-sprite 3) +(def-tex flying-bird-01 wasstada-sprite 16) +(def-tex flying-bird-02 wasstada-sprite 17) +(def-tex flying-bird-03 wasstada-sprite 130) +(def-tex flying-bird-04 wasstada-sprite 131) +(def-tex flying-bird-05 wasstada-sprite 132) +(def-tex flying-bird-06 wasstada-sprite 133) +(def-tex flying-bird-07 wasstada-sprite 134) +(def-tex flying-bird-08 wasstada-sprite 135) +(def-tex flying-bird-09 wasstada-sprite 136) +(def-tex flying-bird-10 wasstada-sprite 137) +(def-tex flying-bird-11 wasstada-sprite 138) +(def-tex flying-bird-12 wasstada-sprite 139) +(def-tex flying-bird-13 wasstada-sprite 140) +(def-tex flying-bird-14 wasstada-sprite 141) +(def-tex flying-bird-15 wasstada-sprite 142) +(def-tex flying-bird-16 wasstada-sprite 143) +(def-tex female1_00 wasstada-sprite 144) +(def-tex female1_01 wasstada-sprite 145) +(def-tex female1_02 wasstada-sprite 146) +(def-tex female1_03 wasstada-sprite 147) +(def-tex female1_04 wasstada-sprite 148) +(def-tex female1_05 wasstada-sprite 149) +(def-tex female1_06 wasstada-sprite 150) +(def-tex female1_07 wasstada-sprite 151) +(def-tex female1_08 wasstada-sprite 152) +(def-tex female1_09 wasstada-sprite 153) +(def-tex female1_10 wasstada-sprite 154) +(def-tex female1_11 wasstada-sprite 155) +(def-tex female1_12 wasstada-sprite 156) +(def-tex female1_13 wasstada-sprite 157) +(def-tex female1_14 wasstada-sprite 158) +(def-tex female1_15 wasstada-sprite 159) +(def-tex female1_16 wasstada-sprite 160) +(def-tex female1_17 wasstada-sprite 161) +(def-tex female1_18 wasstada-sprite 162) +(def-tex female1_19 wasstada-sprite 163) +(def-tex female1_20 wasstada-sprite 164) +(def-tex femcher2_00 wasstada-sprite 165) +(def-tex femcher2_01 wasstada-sprite 166) +(def-tex femcher2_02 wasstada-sprite 167) +(def-tex femcher2_03 wasstada-sprite 168) +(def-tex femcher2_04 wasstada-sprite 169) +(def-tex femcher2_05 wasstada-sprite 170) +(def-tex femcher2_06 wasstada-sprite 171) +(def-tex femcher2_07 wasstada-sprite 172) +(def-tex femcher2_08 wasstada-sprite 173) +(def-tex femcher2_09 wasstada-sprite 174) +(def-tex femcher2_10 wasstada-sprite 175) +(def-tex femcher2_11 wasstada-sprite 176) +(def-tex femcher2_12 wasstada-sprite 177) +(def-tex femcher2_13 wasstada-sprite 178) +(def-tex femcher2_14 wasstada-sprite 179) +(def-tex femcher2_15 wasstada-sprite 180) +(def-tex femcher2_16 wasstada-sprite 181) +(def-tex femcher2_17 wasstada-sprite 182) +(def-tex femcher2_18 wasstada-sprite 183) +(def-tex femcher2_19 wasstada-sprite 184) +(def-tex femcher2_20 wasstada-sprite 185) +(def-tex male1_00 wasstada-sprite 186) +(def-tex male1_01 wasstada-sprite 187) +(def-tex male1_02 wasstada-sprite 188) +(def-tex male1_03 wasstada-sprite 189) +(def-tex male1_04 wasstada-sprite 190) +(def-tex male1_05 wasstada-sprite 191) +(def-tex male1_06 wasstada-sprite 192) +(def-tex male1_07 wasstada-sprite 193) +(def-tex male1_08 wasstada-sprite 194) +(def-tex male1_09 wasstada-sprite 195) +(def-tex male1_10 wasstada-sprite 196) +(def-tex male1_11 wasstada-sprite 197) +(def-tex male1_12 wasstada-sprite 198) +(def-tex male1_13 wasstada-sprite 199) +(def-tex male1_14 wasstada-sprite 200) +(def-tex male1_15 wasstada-sprite 201) +(def-tex male1_16 wasstada-sprite 202) +(def-tex male1_17 wasstada-sprite 203) +(def-tex male1_18 wasstada-sprite 204) +(def-tex male1_19 wasstada-sprite 205) +(def-tex male1_20 wasstada-sprite 206) +(def-tex male2_00 wasstada-sprite 207) +(def-tex male2_01 wasstada-sprite 208) +(def-tex male2_02 wasstada-sprite 209) +(def-tex male2_03 wasstada-sprite 210) +(def-tex male2_04 wasstada-sprite 211) +(def-tex male2_05 wasstada-sprite 212) +(def-tex male2_06 wasstada-sprite 213) +(def-tex male2_07 wasstada-sprite 214) +(def-tex male2_08 wasstada-sprite 215) +(def-tex male2_09 wasstada-sprite 216) +(def-tex male2_10 wasstada-sprite 217) +(def-tex male2_11 wasstada-sprite 218) +(def-tex male2_12 wasstada-sprite 219) +(def-tex male2_13 wasstada-sprite 220) +(def-tex male2_14 wasstada-sprite 221) +(def-tex male2_15 wasstada-sprite 222) +(def-tex male2_16 wasstada-sprite 223) +(def-tex male2_17 wasstada-sprite 224) +(def-tex male2_18 wasstada-sprite 225) +(def-tex male2_19 wasstada-sprite 226) +(def-tex male2_20 wasstada-sprite 227) +(def-tex male3_00 wasstada-sprite 228) +(def-tex male3_01 wasstada-sprite 229) +(def-tex male3_02 wasstada-sprite 230) +(def-tex male3_03 wasstada-sprite 231) +(def-tex male3_04 wasstada-sprite 232) +(def-tex male3_05 wasstada-sprite 233) +(def-tex male3_06 wasstada-sprite 234) +(def-tex male3_07 wasstada-sprite 235) +(def-tex male3_08 wasstada-sprite 236) +(def-tex male3_09 wasstada-sprite 237) +(def-tex male3_10 wasstada-sprite 238) +(def-tex male3_11 wasstada-sprite 239) +(def-tex male3_12 wasstada-sprite 240) +(def-tex male3_13 wasstada-sprite 241) +(def-tex male3_14 wasstada-sprite 242) +(def-tex male3_15 wasstada-sprite 243) +(def-tex male3_16 wasstada-sprite 244) +(def-tex male3_17 wasstada-sprite 245) +(def-tex male3_18 wasstada-sprite 246) +(def-tex male3_19 wasstada-sprite 247) +(def-tex male3_20 wasstada-sprite 248) +(def-tex male4_00 wasstada-sprite 249) +(def-tex male4_01 wasstada-sprite 250) +(def-tex male4_02 wasstada-sprite 251) +(def-tex male4_03 wasstada-sprite 252) +(def-tex male4_04 wasstada-sprite 253) +(def-tex male4_05 wasstada-sprite 254) +(def-tex male4_06 wasstada-sprite 255) +(def-tex male4_07 wasstada-sprite 256) +(def-tex male4_08 wasstada-sprite 257) +(def-tex male4_09 wasstada-sprite 258) +(def-tex male4_10 wasstada-sprite 259) +(def-tex male4_11 wasstada-sprite 260) +(def-tex male4_12 wasstada-sprite 261) +(def-tex male4_13 wasstada-sprite 262) +(def-tex male4_14 wasstada-sprite 263) +(def-tex male4_15 wasstada-sprite 264) +(def-tex male4_16 wasstada-sprite 265) +(def-tex male4_17 wasstada-sprite 266) +(def-tex male4_18 wasstada-sprite 267) +(def-tex male4_19 wasstada-sprite 268) +(def-tex male4_20 wasstada-sprite 269) +(def-tex male5_00 wasstada-sprite 270) +(def-tex male5_01 wasstada-sprite 271) +(def-tex male5_02 wasstada-sprite 272) +(def-tex male5_03 wasstada-sprite 273) +(def-tex male5_04 wasstada-sprite 274) +(def-tex male5_05 wasstada-sprite 275) +(def-tex male5_06 wasstada-sprite 276) +(def-tex male5_07 wasstada-sprite 277) +(def-tex male5_08 wasstada-sprite 278) +(def-tex male5_09 wasstada-sprite 279) +(def-tex male5_10 wasstada-sprite 280) +(def-tex male5_11 wasstada-sprite 281) +(def-tex male5_12 wasstada-sprite 282) +(def-tex male5_13 wasstada-sprite 283) +(def-tex male5_14 wasstada-sprite 284) +(def-tex male5_15 wasstada-sprite 285) +(def-tex male5_16 wasstada-sprite 286) +(def-tex male5_17 wasstada-sprite 287) +(def-tex male5_18 wasstada-sprite 288) +(def-tex male5_19 wasstada-sprite 289) +(def-tex male5_20 wasstada-sprite 290) +(def-tex nsta-wall nsta-vis-tfrag 0) +(def-tex nstab-eggskin nsta-vis-tfrag 3) +(def-tex nsta-cave-stalags-04 nsta-vis-tfrag 5) +(def-tex nsta-cave-floor-01 nsta-vis-tfrag 10) +(def-tex nsta-cave-stalags-04-insides nsta-vis-tfrag 12) +(def-tex nsta-cave-plain nsta-vis-tfrag 13) +(def-tex nsta-cave-plain-edging nsta-vis-tfrag 14) +(def-tex nsta-cave-carved-surface-bottom nsta-vis-tfrag 15) +(def-tex nsta-cave-carved-surface nsta-vis-tfrag 16) +(def-tex nsta-finger-pipe nsta-vis-tfrag 17) +(def-tex nestb-basekor nsta-vis-tfrag 18) +(def-tex nstab-basekor nsta-vis-tfrag 19) +(def-tex nsta-fingerback nsta-vis-tfrag 20) +(def-tex nsta-cave-top-platform nsta-vis-tfrag 21) +(def-tex nsta-cave-teeth nsta-vis-tfrag 22) +(def-tex nsta-cave-sides nsta-vis-tfrag 23) +(def-tex nsta-cave-mites nsta-vis-tfrag 24) +(def-tex nsta-cave-trim nsta-vis-tfrag 28) +(def-tex nsta-cave-trim-top nsta-vis-tfrag 29) +(def-tex nstb-quicksand-scroll nstb-vis-alpha 0) +(def-tex nstb-quicksand-dest nstb-vis-alpha 1) +(def-tex nsta-wall nstb-vis-tfrag 2) +(def-tex nsta-cave-stalags-04 nstb-vis-tfrag 5) +(def-tex nsta-finger-pipe nstb-vis-tfrag 6) +(def-tex nstab-eggskin nstb-vis-tfrag 10) +(def-tex nsta-cave-floor-01 nstb-vis-tfrag 12) +(def-tex nsta-cave-plain nstb-vis-tfrag 15) +(def-tex nsta-cave-stalags-04-insides nstb-vis-tfrag 16) +(def-tex nsta-cave-carved-surface-bottom nstb-vis-tfrag 17) +(def-tex nsta-cave-carved-surface nstb-vis-tfrag 18) +(def-tex nsta-cave-plain-edging nstb-vis-tfrag 19) +(def-tex nestb-basekor nstb-vis-tfrag 21) +(def-tex nstab-basekor nstb-vis-tfrag 22) +(def-tex nsta-fingerback nstb-vis-tfrag 23) +(def-tex nsta-cave-teeth nstb-vis-tfrag 24) +(def-tex nsta-cave-top-platform nstb-vis-tfrag 25) +(def-tex nsta-cave-sides nstb-vis-tfrag 26) +(def-tex nsta-cave-mites nstb-vis-tfrag 28) +(def-tex nsta-cave-trim nstb-vis-tfrag 29) +(def-tex nsta-cave-trim-top nstb-vis-tfrag 30) +(def-tex nstab-mekbrain-plain nstb-vis-tfrag 31) +(def-tex nest-fingerback nstb-vis-shrub 0) +(def-tex nestb-eggskin nstb-vis-shrub 1) +(def-tex nsta-rock-shrubs nstb-vis-shrub 3) +(def-tex nsta-transparent nstb-vis-shrub 4) +(def-tex nestb-basekor nstb-vis-shrub 6) +(def-tex nstab-eggskin nstb-vis-shrub 7) +(def-tex nsta-finger-pipe nstb-vis-shrub 8) +(def-tex nst-egg-bulb-01 nstb-vis-shrub 11) +(def-tex nsta-cave-sides-shrub nstb-vis-shrub 12) +(def-tex nsta-cave-top-platform-shrub nstb-vis-shrub 13) +(def-tex nsta-finger-pipe nstb-vis-pris 7) +(def-tex nsta-wall nstb-vis-pris 11) +(def-tex nestb-mektunnel nstb-vis-pris 15) +(def-tex nsta-goo-base nstb-vis-pris 17) +(def-tex environment-nstb-water nstb-vis-water 5) +(def-tex nstb-water nstb-vis-water 6) +(def-tex wstd-lava-base wasstada-alpha 2) +(def-tex wstd-lava-base-dest wasstada-alpha 4) +(def-tex nsta-transparent wasstada-shrub 10) +(def-tex wstd-rock-shrubs wasstada-shrub 11) +(def-tex wstd-shrub-pebbles wasstada-shrub 12) +(def-tex wascitya-stone-bottom wascitya-vis-tfrag 0) +(def-tex wascitya-stone-top wascitya-vis-tfrag 1) +(def-tex wascity-metal-spike-01 wascitya-vis-tfrag 2) +(def-tex wascity-metal-wall-base-plate wascitya-vis-tfrag 3) +(def-tex wascity-metal-segments wascitya-vis-tfrag 4) +(def-tex wascity-greenmetal-tube wascitya-vis-tfrag 5) +(def-tex wascity-metal-piece-02 wascitya-vis-tfrag 6) +(def-tex wascity-metal-dirty wascitya-vis-tfrag 7) +(def-tex common-black wascitya-vis-tfrag 8) +(def-tex wascity-metal-door-01 wascitya-vis-tfrag 9) +(def-tex wascity-wallspike-2-ground-01 wascitya-vis-tfrag 10) +(def-tex wascity-wallspike-01 wascitya-vis-tfrag 11) +(def-tex wascity-stucco-wall-bleached-01 wascitya-vis-tfrag 12) +(def-tex wascity-stucco-wall-bleached-2-bricks-01 wascitya-vis-tfrag 13) +(def-tex wascity-stucco-wall-bleached-edge-01 wascitya-vis-tfrag 14) +(def-tex wascity-ditch-wall-top-to-ground wascitya-vis-tfrag 15) +(def-tex wascity-ground-2-ditch-04 wascitya-vis-tfrag 16) +(def-tex wascity-ground-01 wascitya-vis-tfrag 17) +(def-tex wascity-ground-2-ditch-03 wascitya-vis-tfrag 18) +(def-tex wascity-rock-small wascitya-vis-tfrag 19) +(def-tex wascity-ground-2-ditch-05 wascitya-vis-tfrag 20) +(def-tex wascity-stucco-wall-supports-end wascitya-vis-tfrag 21) +(def-tex wascity-stucco-wall-supports wascitya-vis-tfrag 22) +(def-tex wascity-stone-plain-wall-3 wascitya-vis-tfrag 23) +(def-tex wascity-stone-bricks-2-plain wascitya-vis-tfrag 24) +(def-tex wascity-wall-weathered wascitya-vis-tfrag 25) +(def-tex wascity-stonewall-bricks wascitya-vis-tfrag 26) +(def-tex wascity-metal-pole wascitya-vis-tfrag 27) +(def-tex wascity-stucco-wall-bleached-cut-01 wascitya-vis-tfrag 28) +(def-tex wascity-stonewall-bricks-HI wascitya-vis-tfrag 29) +(def-tex wascity-wall-canister wascitya-vis-tfrag 30) +(def-tex wascity-steel-bar wascitya-vis-tfrag 31) +(def-tex wascity-wood-plain wascitya-vis-tfrag 32) +(def-tex wascity-metal-indent wascitya-vis-tfrag 33) +(def-tex wascity-metal-piece-01 wascitya-vis-tfrag 34) +(def-tex wascitya-stone-top-breakaway wascitya-vis-tfrag 35) +(def-tex wascity-outerwall-metal wascitya-vis-tfrag 36) +(def-tex wascity-outerwall-metal-c wascitya-vis-tfrag 37) +(def-tex wascity-outerwall-metal-b wascitya-vis-tfrag 38) +(def-tex wascity-outerwall-metal-d wascitya-vis-tfrag 39) +(def-tex city-slum-burning-can wascitya-vis-tfrag 40) +(def-tex wascity-steps wascitya-vis-tfrag 41) +(def-tex wascity-torch-tank wascitya-vis-tfrag 42) +(def-tex wascity-cement-road wascitya-vis-tfrag 43) +(def-tex wascity-ditch-wall-top-to-ground-edging wascitya-vis-tfrag 44) +(def-tex wascitya-airlock-metal wascitya-vis-tfrag 45) +(def-tex wascitya-redish-metal wascitya-vis-tfrag 46) +(def-tex wascitya-slum-lightwall wascitya-vis-tfrag 47) +(def-tex wascitya-airlock-door wascitya-vis-tfrag 48) +(def-tex wascity-base wascitya-vis-tfrag 49) +(def-tex wascity-roof-1 wascitya-vis-tfrag 55) +(def-tex wascitya-airlock-groove wascitya-vis-tfrag 56) +(def-tex common-gray-dark wascitya-vis-tfrag 58) +(def-tex wascity-elev-door-snake wascitya-vis-tfrag 62) +(def-tex wascity-elev-door-snake-eye wascitya-vis-tfrag 63) +(def-tex wascity-elev-door-orange wascitya-vis-tfrag 64) +(def-tex wascity-elev-door-orange-2 wascitya-vis-tfrag 65) +(def-tex wascity-elev-door-dark wascitya-vis-tfrag 66) +(def-tex wascity-steps-red wascitya-vis-tfrag 68) +(def-tex wascitya-stone-top-door wascitya-vis-tfrag 69) +(def-tex wascitya-stone-bottom-door wascitya-vis-tfrag 70) +(def-tex waspala-elevator-metal wascitya-vis-tfrag 71) +(def-tex waspala-elevator-bolt wascitya-vis-tfrag 72) +(def-tex waspala-elevator-wood02 wascitya-vis-tfrag 73) +(def-tex waspala-elevator-metal-plate wascitya-vis-tfrag 74) +(def-tex waspala-wheel-edge wascitya-vis-tfrag 75) +(def-tex waspala-elevator-wood01 wascitya-vis-tfrag 76) +(def-tex waspala-corgmetal wascitya-vis-tfrag 77) +(def-tex waspala-elevator-tube wascitya-vis-tfrag 78) +(def-tex waspala-elevator-bolt02 wascitya-vis-tfrag 79) +(def-tex waspala-elevator-cable wascitya-vis-tfrag 80) +(def-tex common_sandstone_ground01 wascitya-vis-tfrag 81) +(def-tex common_sandstone_taper01 wascitya-vis-tfrag 82) +(def-tex common_sandstone_trim01 wascitya-vis-tfrag 83) +(def-tex common_sandstone_base01 wascitya-vis-tfrag 84) +(def-tex city-slum-medpipe-01 wascitya-vis-tfrag 86) +(def-tex city-slum-medpipe-02 wascitya-vis-tfrag 87) +(def-tex wascity-metal-ladder-rung wascitya-vis-tfrag 88) +(def-tex wascity-chimney-hires wascitya-vis-tfrag 89) +(def-tex lt-eco-vent-blue-01 wascitya-vis-tfrag 90) +(def-tex lt-eco-vent-side-01 wascitya-vis-tfrag 91) +(def-tex wascity-palace-elevator-shaft wascitya-vis-tfrag 92) +(def-tex wascity-blotch-withstreaks-01 wascitya-vis-shrub 0) +(def-tex wascity-stain-window-01 wascitya-vis-shrub 1) +(def-tex wascity-steel-bar wascitya-vis-shrub 2) +(def-tex wascity-overlay-tribal-1 wascitya-vis-shrub 3) +(def-tex wascity-overlay-bullethole-b wascitya-vis-shrub 4) +(def-tex wascity-overlay-bullethole-c wascitya-vis-shrub 5) +(def-tex wascity-overlay-bullethole-a wascitya-vis-shrub 6) +(def-tex wascity-stain-wall-01 wascitya-vis-shrub 7) +(def-tex wascity-overlay-crack wascitya-vis-shrub 8) +(def-tex wascity-ditch-wall-top-to-ground wascitya-vis-shrub 9) +(def-tex wascity-shrub-orange-01 wascitya-vis-shrub 10) +(def-tex wascity-ground-stain-01 wascitya-vis-shrub 11) +(def-tex wascity-overlay-damaged wascitya-vis-shrub 13) +(def-tex wascitya-stone-top wascitya-vis-shrub 14) +(def-tex wascity-cactus-green wascitya-vis-shrub 15) +(def-tex wascity-cactus-flower wascitya-vis-shrub 16) +(def-tex wascity-roof-1 wascitya-vis-shrub 17) +(def-tex wascity-outerwall-metal-b wascitya-vis-shrub 18) +(def-tex wascity-outerwall-metal-c wascitya-vis-shrub 19) +(def-tex wascity-metal-dirty wascitya-vis-shrub 20) +(def-tex wascitya-redish-metal wascitya-vis-shrub 21) +(def-tex wascity-base wascitya-vis-shrub 22) +(def-tex wascity-outerwall-metal-d wascitya-vis-shrub 23) +(def-tex common-black wascitya-vis-shrub 24) +(def-tex wascity-window-glass-01 wascitya-vis-water 0) +(def-tex fora-water-dest wascitya-vis-water 2) +(def-tex gekko-body wascitya-vis-pris 6) +(def-tex gekko-eye-01 wascitya-vis-pris 7) +(def-tex gekko-fingers wascitya-vis-pris 8) +(def-tex gekko-hose wascitya-vis-pris 9) +(def-tex gekko-laser wascitya-vis-pris 10) +(def-tex gekko-laserbarrel wascitya-vis-pris 11) +(def-tex gekko-metal-01 wascitya-vis-pris 12) +(def-tex gekko-nails wascitya-vis-pris 13) +(def-tex gekko-tubes wascitya-vis-pris 14) +(def-tex was-tizard-beak wascitya-vis-pris 15) +(def-tex was-tizard-body wascitya-vis-pris 16) +(def-tex was-tizard-face wascitya-vis-pris 17) +(def-tex was-tizard-facefin wascitya-vis-pris 18) +(def-tex was-tizard-fin wascitya-vis-pris 19) +(def-tex was-tizard-hair wascitya-vis-pris 20) +(def-tex was-tizard-nail wascitya-vis-pris 21) +(def-tex was-dogat-body wascitya-vis-pris 32) +(def-tex was-dogat-face wascitya-vis-pris 33) +(def-tex was-dogat-nose wascitya-vis-pris 34) +(def-tex was-dogat-tail wascitya-vis-pris 35) +(def-tex was-kangalizard-body wascitya-vis-pris 36) +(def-tex was-kangalizard-body-bottom wascitya-vis-pris 37) +(def-tex was-kangalizard-face wascitya-vis-pris 38) +(def-tex was-kangalizard-fin wascitya-vis-pris 39) +(def-tex city-mark-clay-pot-01 wascitya-vis-pris 44) +(def-tex city-mark-cotton-32x32 wascitya-vis-pris 45) +(def-tex city-mark-cotton-wrap wascitya-vis-pris 46) +(def-tex city-mark-rope-mesh-01 wascitya-vis-pris 47) +(def-tex city-mark-basket2 wascitya-vis-pris 48) +(def-tex city-mark-rice-01 wascitya-vis-pris 49) +(def-tex city-mark-wood-plain wascitya-vis-pris 50) +(def-tex city-mark-rope-01 wascitya-vis-pris 51) +(def-tex errol-ring-01 nstb-sprite 0) +(def-tex errol-ring-02 nstb-sprite 1) +(def-tex racegate nstb-sprite 2) +(def-tex flying-gull-01 nstb-sprite 3) +(def-tex flying-gull-02 nstb-sprite 4) +(def-tex flying-gull-03 nstb-sprite 5) +(def-tex flying-gull-04 nstb-sprite 6) +(def-tex flying-gull-05 nstb-sprite 7) +(def-tex flying-gull-06 nstb-sprite 8) +(def-tex ceiling-dust nstb-sprite 9) +(def-tex crack01 nstb-sprite 11) +(def-tex dust-sparkle nstb-sprite 12) +(def-tex wascity-outerwall-metal-c wasdoors-vis-tfrag 0) +(def-tex wascity-outerwall-metal-b wasdoors-vis-tfrag 1) +(def-tex wascity-greenmetal-tube wasdoors-vis-tfrag 2) +(def-tex wascity-metal-spike-01 wasdoors-vis-tfrag 3) +(def-tex common-black wasdoors-vis-tfrag 4) +(def-tex wascity-base wasdoors-vis-tfrag 5) +(def-tex wascitya-airlock-metal wasdoors-vis-tfrag 6) +(def-tex wascity-outerwall-metal-d wasdoors-vis-tfrag 7) +(def-tex wascity-metal-door-01 wasdoors-vis-tfrag 8) +(def-tex wascity-outerwall-metal wasdoors-vis-tfrag 9) +(def-tex wascity-metal-wall-base-plate wasdoors-vis-tfrag 10) +(def-tex wascity-metal-dirty wasdoors-vis-tfrag 11) +(def-tex wascity-torch-tank wasdoors-vis-tfrag 12) +(def-tex wascity-steel-bar wasdoors-vis-tfrag 13) +(def-tex wascitya-stone-top wasdoors-vis-tfrag 14) +(def-tex wascitya-stone-bottom wasdoors-vis-tfrag 15) +(def-tex wascity-cement-road wasdoors-vis-tfrag 16) +(def-tex wascitya-stone-top-breakaway wasdoors-vis-tfrag 17) +(def-tex wascity-stonewall-bricks wasdoors-vis-tfrag 18) +(def-tex wascity-ditch-wall-top-to-ground wasdoors-vis-tfrag 19) +(def-tex wascity-ground-2-ditch-04 wasdoors-vis-tfrag 20) +(def-tex wascity-ground-2-ditch-03 wasdoors-vis-tfrag 21) +(def-tex wascity-ground-2-ditch-05 wasdoors-vis-tfrag 22) +(def-tex wascity-rock-small wasdoors-vis-tfrag 23) +(def-tex wascitya-redish-metal wasdoors-vis-tfrag 24) +(def-tex wascity-ground-01 wasdoors-vis-tfrag 27) +(def-tex wascity-ditch-wall-top-to-ground-edging wasdoors-vis-tfrag 28) +(def-tex wascity-stone-plain-wall-3 wasdoors-vis-tfrag 29) +(def-tex wascity-stone-bricks-2-plain wasdoors-vis-tfrag 30) +(def-tex wascitya-airlock-metal-bits wasdoors-vis-tfrag 31) +(def-tex wascitya-airlock-door wasdoors-vis-tfrag 32) +(def-tex wascitya-airlock-groove wasdoors-vis-tfrag 33) +(def-tex wascitya-stone-top-door wasdoors-vis-tfrag 34) +(def-tex wascitya-stone-bottom-door wasdoors-vis-tfrag 35) +(def-tex wascity-red wasdoors-vis-tfrag 36) +(def-tex wascity-roof-1 wasdoors-vis-tfrag 37) +(def-tex wascity-steel-bar-HI wasdoors-vis-tfrag 38) +(def-tex wascity-stain-wall-01 wasdoors-vis-shrub 0) +(def-tex wascity-stain-window-01 wasdoors-vis-shrub 1) +(def-tex wascity-blotch-withstreaks-01 wasdoors-vis-shrub 2) +(def-tex wascity-shrub-orange-01 wasdoors-vis-shrub 6) +(def-tex wood-plain-debris waswide-sprite 19) +(def-tex clay-pot-debris-01 waswide-sprite 20) +(def-tex rope-mesh-debris-01 waswide-sprite 21) +(def-tex basket-debris-01 waswide-sprite 22) +(def-tex straw-bit waswide-sprite 23) +(def-tex straw-ground waswide-sprite 24) +(def-tex cotton-wrap-debris waswide-sprite 25) +(def-tex cherry waswide-sprite 26) +(def-tex market-melon waswide-sprite 29) +(def-tex market-orange waswide-sprite 30) +(def-tex fruit1 waswide-sprite 40) +(def-tex burning-bush-off waswide-sprite 42) +(def-tex baron-propoganda-logo waswide-sprite 43) +(def-tex nsta-transparent nsta-vis-shrub 0) +(def-tex nest-fingerback nsta-vis-shrub 1) +(def-tex nestb-eggskin nsta-vis-shrub 2) +(def-tex nsta-finger-pipe nsta-vis-shrub 6) +(def-tex nestb-basekor nsta-vis-shrub 7) +(def-tex nstab-eggskin nsta-vis-shrub 8) +(def-tex nsta-rock-shrubs nsta-vis-shrub 9) +(def-tex nst-egg-bulb-01 nsta-vis-shrub 11) +(def-tex nsta-cave-sides-shrub nsta-vis-shrub 12) +(def-tex nsta-cave-top-platform-shrub nsta-vis-shrub 13) +(def-tex des-beach-01 desert-vis-tfrag 1) +(def-tex was-burningbush-02 desert-vis-tfrag 2) +(def-tex des-plainrope desert-vis-tfrag 9) +(def-tex des-mount-01 desert-vis-tfrag 10) +(def-tex des-corral-metal-01 desert-vis-tfrag 12) +(def-tex des-corral-plate-02 desert-vis-tfrag 13) +(def-tex des-cliff-trans-01 desert-vis-tfrag 14) +(def-tex des-cliff-top-01 desert-vis-tfrag 15) +(def-tex des-cliff-01 desert-vis-tfrag 16) +(def-tex des-mount-02 desert-vis-tfrag 17) +(def-tex des-cave-floor-01 desert-vis-tfrag 18) +(def-tex des-cave-wall-01 desert-vis-tfrag 19) +(def-tex des-cave-rock desert-vis-tfrag 20) +(def-tex des-cliff-top-03 desert-vis-tfrag 21) +(def-tex des-cliff-top-04 desert-vis-tfrag 22) +(def-tex des-mount-bottom-01 desert-vis-tfrag 24) +(def-tex des-cliff-top-02 desert-vis-tfrag 30) +(def-tex des-wascity-outerwall-rock desert-vis-tfrag 31) +(def-tex des-wascity-outerwall-metal-b desert-vis-tfrag 33) +(def-tex des-wascity-palace-siding-01 desert-vis-tfrag 34) +(def-tex des-wascity-cement-road desert-vis-tfrag 35) +(def-tex des-wascity-outerwall-metal-d desert-vis-tfrag 36) +(def-tex was-burningbush-light-01 desert-vis-tfrag 37) +(def-tex was-burningbush-03 desert-vis-tfrag 38) +(def-tex was-burningbush-01 desert-vis-tfrag 39) +(def-tex was-burningbush-04 desert-vis-tfrag 40) +(def-tex sewer-plate-01 sewa-vis-tfrag 0) +(def-tex sewer-pipe-rim-01 sewa-vis-tfrag 1) +(def-tex sewer-metal-block-01 sewa-vis-tfrag 3) +(def-tex sewer-block-01 sewa-vis-tfrag 4) +(def-tex sewer-brick-block-01 sewa-vis-tfrag 5) +(def-tex sewer-mantel-01 sewa-vis-tfrag 6) +(def-tex sewer-brick-block-06 sewa-vis-tfrag 9) +(def-tex sewer-mantel-02 sewa-vis-tfrag 10) +(def-tex sewer-metal-block-05 sewa-vis-tfrag 11) +(def-tex sewer-pipe-rim-05b sewa-vis-tfrag 12) +(def-tex sewer-concrete-edge-02 sewa-vis-tfrag 13) +(def-tex sewer-metal-block-06 sewa-vis-tfrag 14) +(def-tex sewer-metal-floor-02 sewa-vis-tfrag 15) +(def-tex sewer-metal-floor-01 sewa-vis-tfrag 16) +(def-tex sew-metal-floor-01 sewa-vis-tfrag 17) +(def-tex sewer-metal-block-04 sewa-vis-tfrag 18) +(def-tex sewer-metal-01 sewa-vis-tfrag 19) +(def-tex sewer-pipe-rim-08 sewa-vis-tfrag 21) +(def-tex sewer-brick-block-10 sewa-vis-tfrag 23) +(def-tex sewer-brick-block-11 sewa-vis-tfrag 24) +(def-tex sewer-small-light-01 sewa-vis-tfrag 25) +(def-tex sewer-plate-02 sewa-vis-tfrag 26) +(def-tex sewer-grate-01 sewa-vis-tfrag 27) +(def-tex sewer-pipe-01 sewa-vis-tfrag 28) +(def-tex sewer-plate-05 sewa-vis-tfrag 29) +(def-tex sewer-screw-02 sewa-vis-tfrag 30) +(def-tex sew-elevator-lod0top sewa-vis-tfrag 31) +(def-tex sewer-big-brace-01 sewa-vis-tfrag 32) +(def-tex sewer-concrete-block-02 sewa-vis-tfrag 33) +(def-tex sewer-lip-01-hitweak sewa-vis-tfrag 34) +(def-tex airlock-door-bolt sewa-vis-pris 0) +(def-tex airlock-door-cog sewa-vis-pris 1) +(def-tex airlock-door-cog1 sewa-vis-pris 2) +(def-tex airlock-door-main sewa-vis-pris 3) +(def-tex airlock-door-metal2 sewa-vis-pris 4) +(def-tex airlockl-door-metalframe sewa-vis-pris 5) +(def-tex bam-eyelight sewa-vis-pris 6) +(def-tex bam-hairhilite sewa-vis-pris 7) +(def-tex daxter-eyelid sewa-vis-pris 8) +(def-tex daxter-furhilite sewa-vis-pris 9) +(def-tex daxter-orange sewa-vis-pris 10) +(def-tex daxterarm sewa-vis-pris 11) +(def-tex daxterbodyshort-eix sewa-vis-pris 12) +(def-tex daxterbolt sewa-vis-pris 13) +(def-tex daxterear sewa-vis-pris 14) +(def-tex daxterfinger sewa-vis-pris 15) +(def-tex daxterfoot sewa-vis-pris 16) +(def-tex daxterfoot-bottom sewa-vis-pris 17) +(def-tex daxtergoggles sewa-vis-pris 18) +(def-tex daxterheadwidenew sewa-vis-pris 19) +(def-tex daxterhelmetplain sewa-vis-pris 20) +(def-tex daxterlense sewa-vis-pris 21) +(def-tex daxternose sewa-vis-pris 22) +(def-tex daxterteeth sewa-vis-pris 23) +(def-tex daxtertuft sewa-vis-pris 24) +(def-tex environment-oldmetal sewa-vis-pris 25) +(def-tex jakc-armor sewa-vis-pris 53) +(def-tex jakc-chestplate-straps sewa-vis-pris 54) +(def-tex jakc-gogglemetal sewa-vis-pris 55) +(def-tex jakc-lens sewa-vis-pris 56) +(def-tex jakc-scarf sewa-vis-pris 57) +(def-tex jakc-waistband2 sewa-vis-pris 58) +(def-tex jakc-wraps sewa-vis-pris 59) +(def-tex jakc-wristband-a2 sewa-vis-pris 60) +(def-tex jakchires-arm sewa-vis-pris 61) +(def-tex jakchires-blackstrap sewa-vis-pris 62) +(def-tex jakchires-brownstrap sewa-vis-pris 63) +(def-tex jakchires-brwnleather sewa-vis-pris 64) +(def-tex jakchires-chestplate sewa-vis-pris 65) +(def-tex jakchires-clips sewa-vis-pris 66) +(def-tex jakchires-eye sewa-vis-pris 67) +(def-tex jakchires-eyebrow sewa-vis-pris 68) +(def-tex jakchires-eyelid sewa-vis-pris 69) +(def-tex jakchires-facelft sewa-vis-pris 70) +(def-tex jakchires-facert sewa-vis-pris 71) +(def-tex jakchires-glovetop sewa-vis-pris 72) +(def-tex jakchires-hair sewa-vis-pris 73) +(def-tex jakchires-horn sewa-vis-pris 74) +(def-tex jakchires-jacket sewa-vis-pris 75) +(def-tex jakchires-leatherpouch sewa-vis-pris 76) +(def-tex jakchires-lightbrownspat sewa-vis-pris 77) +(def-tex jakchires-pants sewa-vis-pris 78) +(def-tex jakchires-precarmor-01 sewa-vis-pris 79) +(def-tex jakchires-shoebottom sewa-vis-pris 80) +(def-tex jakchires-shoemetal sewa-vis-pris 81) +(def-tex jakchires-shoeteop sewa-vis-pris 82) +(def-tex jakchires-teeth sewa-vis-pris 83) +(def-tex jakc-scarfhanging sewa-vis-pris 84) +(def-tex jakc-skirt sewa-vis-pris 85) +(def-tex grunt-eye-01 sewa-vis-pris 90) +(def-tex grunt-hose sewa-vis-pris 91) +(def-tex grunt-metal-01 sewa-vis-pris 92) +(def-tex saberfish-nail-01 sewa-vis-pris 93) +(def-tex saberfish-skin-01 sewa-vis-pris 94) +(def-tex saberfish-skin-02 sewa-vis-pris 95) +(def-tex saberfish-skin-03 sewa-vis-pris 96) +(def-tex sew-frog-eye-01 sewa-vis-pris 97) +(def-tex sew-frog-fin-01 sewa-vis-pris 98) +(def-tex sew-frog-fin-02 sewa-vis-pris 99) +(def-tex sew-frog-skin-01 sewa-vis-pris 100) +(def-tex sew-frog-skin-02 sewa-vis-pris 101) +(def-tex sew-frog-skin-03 sewa-vis-pris 102) +(def-tex sew-frog-skin-04 sewa-vis-pris 103) +(def-tex blue-gem sewa-vis-pris 104) +(def-tex brown-hose sewa-vis-pris 105) +(def-tex cguard1-backmetal sewa-vis-pris 106) +(def-tex cguard1-chestplate sewa-vis-pris 107) +(def-tex cguard1-gunmetaldark2 sewa-vis-pris 108) +(def-tex cguard1-guntube sewa-vis-pris 109) +(def-tex cguard1-lens sewa-vis-pris 110) +(def-tex cguardgame-backplate sewa-vis-pris 111) +(def-tex cguardgame-metaledark-02 sewa-vis-pris 112) +(def-tex cguardgame-metallight-01small sewa-vis-pris 113) +(def-tex cguardgame-shoebottom sewa-vis-pris 114) +(def-tex roboguard-die-stamped-metal-blue sewa-vis-pris 115) +(def-tex roboguard-headshield sewa-vis-pris 117) +(def-tex roboguard-shouldershield sewa-vis-pris 118) +(def-tex squid-bulb-sm sewa-vis-pris 119) +(def-tex squid-tubes sewa-vis-pris 120) +(def-tex widow-dull-inards sewa-vis-pris 121) +(def-tex widow-pod-gun-metal sewa-vis-pris 122) +(def-tex wire-metal sewa-vis-pris 123) +(def-tex squid-drabgun sewa-vis-pris 124) +(def-tex kg-grunt-cable-01 sewa-vis-pris 125) +(def-tex kg-grunt-rim-03 sewa-vis-pris 126) +(def-tex sewer-metal-block-06 sewb-vis-tfrag 0) +(def-tex sewer-metal-block-04 sewb-vis-tfrag 1) +(def-tex sewer-pipe-rim-05 sewb-vis-tfrag 2) +(def-tex sewer-plate-05 sewb-vis-tfrag 3) +(def-tex sewer-hall-light-01 sewb-vis-tfrag 4) +(def-tex sewer-concrete-edge-02 sewb-vis-tfrag 6) +(def-tex sewer-block-01 sewb-vis-tfrag 8) +(def-tex sewer-pipe-rim-10 sewb-vis-tfrag 9) +(def-tex common-black sewb-vis-tfrag 13) +(def-tex sewer-pipe-02 sewb-vis-tfrag 14) +(def-tex sewer-concrete-edge-01 sewb-vis-tfrag 17) +(def-tex sewer-metal-block-07 sewb-vis-tfrag 18) +(def-tex sewer-pipe-rim-06 sewb-vis-tfrag 19) +(def-tex sewer-pipe-01 sewb-vis-tfrag 20) +(def-tex sewer-pipe-02-edge-01 sewb-vis-tfrag 21) +(def-tex sewer-pipe-rim-01 sewb-vis-tfrag 22) +(def-tex sewer-stone-arch-01 sewb-vis-tfrag 23) +(def-tex sewer-metal-03 sewb-vis-tfrag 24) +(def-tex sewer-pipe-rim-03 sewb-vis-tfrag 25) +(def-tex sewer-pipe-small-02 sewb-vis-tfrag 27) +(def-tex sewer-pipe-rim-08 sewb-vis-tfrag 28) +(def-tex sewer-flat-pipe-01 sewb-vis-tfrag 29) +(def-tex sewer-pipe-rim-07 sewb-vis-tfrag 30) +(def-tex sewer-pipe-rim-05b sewb-vis-tfrag 31) +(def-tex sewer-plate-06 sewb-vis-tfrag 32) +(def-tex sewer-plate-03 sewb-vis-tfrag 33) +(def-tex sewer-plate-04 sewb-vis-tfrag 34) +(def-tex sewer-metal-block-01 sewb-vis-tfrag 36) +(def-tex sewer-plate-02 sewb-vis-tfrag 39) +(def-tex sewer-pipe-rim-09 sewb-vis-tfrag 40) +(def-tex sewer-plate-01 sewb-vis-tfrag 41) +(def-tex sewer-block-02 sewb-vis-tfrag 42) +(def-tex strip-black sewb-vis-tfrag 43) +(def-tex sewer-grate-01 sewb-vis-tfrag 44) +(def-tex sew-metal-floor-01 sewb-vis-tfrag 45) +(def-tex sewer-metal-block-05 sewb-vis-tfrag 46) +(def-tex sewer-metal-floor-01 sewb-vis-tfrag 47) +(def-tex sewer-lip-01 sewb-vis-tfrag 49) +(def-tex sewer-brick-block-09 sewb-vis-tfrag 50) +(def-tex sewer-scaffold-01 sewb-vis-tfrag 51) +(def-tex sewer-scaffold-02 sewb-vis-tfrag 52) +(def-tex sewer-nut-01 sewb-vis-tfrag 53) +(def-tex sewer-pipe-rim-07-hitweak sewb-vis-tfrag 54) +(def-tex sewer-bolt-side-01 sewb-vis-tfrag 55) +(def-tex sewer-bolt-side-02 sewb-vis-tfrag 56) +(def-tex sewer-round-03 sewb-vis-tfrag 57) +(def-tex sewer-round-02 sewb-vis-tfrag 58) +(def-tex sewer-round-01 sewb-vis-tfrag 59) +(def-tex sewer-plate-03-hitweak sewb-vis-tfrag 60) +(def-tex sewer-big-brace-trim-01 sewb-vis-tfrag 61) +(def-tex sewer-big-brace-trim-02 sewb-vis-tfrag 62) +(def-tex sewer-brick-roof-01 sewb-vis-tfrag 64) +(def-tex sewer-brick-roof-04 sewb-vis-tfrag 65) +(def-tex sewer-brick-roof-02 sewb-vis-tfrag 66) +(def-tex sewer-brick-roof-03 sewb-vis-tfrag 67) +(def-tex sewer-big-brace-01 sewb-vis-tfrag 68) +(def-tex sewer-big-brace-02 sewb-vis-tfrag 69) +(def-tex sewer-metal-trim-02 sewb-vis-tfrag 70) +(def-tex sewer-metal-trim-01 sewb-vis-tfrag 71) +(def-tex sewer-scaffold-03 sewb-vis-tfrag 72) +(def-tex sewer-red-light-01 sewb-vis-tfrag 73) +(def-tex sewer-red-light-02 sewb-vis-tfrag 74) +(def-tex sewer-small-light-01 sewb-vis-tfrag 75) +(def-tex sewer-metal-block-02 sewb-vis-tfrag 76) +(def-tex sewer-rubber-rim-01 sewb-vis-tfrag 77) +(def-tex sewer-grill-02 sewb-vis-tfrag 78) +(def-tex sewer-mantel-02 sewb-vis-tfrag 79) +(def-tex sewer-metal-edge-01 sewb-vis-tfrag 80) +(def-tex sewer-brick-block-11 sewb-vis-tfrag 81) +(def-tex sewer-brick-block-10 sewb-vis-tfrag 82) +(def-tex sewer-metal-block-04-hitweak sewb-vis-tfrag 83) +(def-tex sewer-nut sewb-vis-shrub 0) +(def-tex sewer-pipe-small-01 sewb-vis-shrub 1) +(def-tex sewer-shrub-pitting-01 sewb-vis-shrub 2) +(def-tex sewer-metal-block-06 sewc-vis-tfrag 0) +(def-tex sewer-plate-05 sewc-vis-tfrag 1) +(def-tex sewer-metal-block-04 sewc-vis-tfrag 2) +(def-tex sewer-pipe-rim-05 sewc-vis-tfrag 3) +(def-tex sewer-metal-block-01 sewc-vis-tfrag 4) +(def-tex sewer-plate-04 sewc-vis-tfrag 5) +(def-tex sewer-pipe-rim-05b sewc-vis-tfrag 6) +(def-tex sewer-pipe-rim-07 sewc-vis-tfrag 7) +(def-tex sewer-pipe-rim-03 sewc-vis-tfrag 8) +(def-tex sewer-plate-02 sewc-vis-tfrag 10) +(def-tex sewer-plate-03 sewc-vis-tfrag 11) +(def-tex sewer-metal-03 sewc-vis-tfrag 12) +(def-tex sewer-pipe-rim-08 sewc-vis-tfrag 13) +(def-tex sewer-hall-light-01 sewc-vis-tfrag 14) +(def-tex common-black sewc-vis-tfrag 15) +(def-tex sewer-concrete-edge-01 sewc-vis-tfrag 16) +(def-tex sewer-pipe-small-02 sewc-vis-tfrag 17) +(def-tex sewer-concrete-edge-02 sewc-vis-tfrag 19) +(def-tex sewer-plate-05-hitweak sewc-vis-tfrag 20) +(def-tex sewer-pipe-02 sewc-vis-tfrag 21) +(def-tex sewer-block-02 sewc-vis-tfrag 22) +(def-tex sewer-block-01 sewc-vis-tfrag 23) +(def-tex sewer-pipe-01 sewc-vis-tfrag 24) +(def-tex sewer-flat-pipe-01 sewc-vis-tfrag 25) +(def-tex sewer-metal-block-05 sewc-vis-tfrag 26) +(def-tex sewer-rubber-rim-01 sewc-vis-tfrag 27) +(def-tex sewer-pipe-rim-01 sewc-vis-tfrag 28) +(def-tex sewer-pipe-02-edge-01 sewc-vis-tfrag 29) +(def-tex sewer-pipe-rim-06 sewc-vis-tfrag 31) +(def-tex sewer-metal-block-06-hitweak sewc-vis-tfrag 33) +(def-tex sewer-pipe-rim-10 sewc-vis-tfrag 34) +(def-tex sewer-plate-06 sewc-vis-tfrag 35) +(def-tex sewer-pipe-rim-09 sewc-vis-tfrag 36) +(def-tex sewer-metal-floor-01 sewc-vis-tfrag 37) +(def-tex sewer-plate-01 sewc-vis-tfrag 38) +(def-tex sew-gun-panel-03 sewc-vis-tfrag 40) +(def-tex strip-black sewc-vis-tfrag 41) +(def-tex sewer-grate-01 sewc-vis-tfrag 42) +(def-tex sewer-bolt-side-01 sewc-vis-tfrag 44) +(def-tex sewer-bolt-side-02 sewc-vis-tfrag 45) +(def-tex sewer-round-01 sewc-vis-tfrag 46) +(def-tex sewer-round-03 sewc-vis-tfrag 47) +(def-tex sewer-round-02 sewc-vis-tfrag 48) +(def-tex sewer-lip-01 sewc-vis-tfrag 50) +(def-tex sewer-plate-03-hitweak sewc-vis-tfrag 51) +(def-tex sewer-big-brace-trim-01 sewc-vis-tfrag 52) +(def-tex sewer-big-brace-trim-02 sewc-vis-tfrag 53) +(def-tex sewer-scaffold-01 sewc-vis-tfrag 56) +(def-tex sewer-metal-trim-01 sewc-vis-tfrag 57) +(def-tex sewer-metal-trim-02 sewc-vis-tfrag 58) +(def-tex sewer-red-light-01 sewc-vis-tfrag 59) +(def-tex sewer-red-light-02 sewc-vis-tfrag 60) +(def-tex sewer-brick-roof-05 sewc-vis-tfrag 61) +(def-tex sewer-metal-floor-02 sewc-vis-tfrag 62) +(def-tex sewer-block-02-hitweak sewc-vis-tfrag 63) +(def-tex sewer-pipe-rim-05b-hitweak sewc-vis-tfrag 64) +(def-tex sewer-small-light-01 sewc-vis-tfrag 65) +(def-tex sewer-metal-block-02 sewc-vis-tfrag 66) +(def-tex sewer-metal-block-04-hitweak sewc-vis-tfrag 67) +(def-tex sewer-mantel-02 sewc-vis-tfrag 68) +(def-tex sewer-flat-pipe-01-hitweak sewc-vis-tfrag 69) +(def-tex sewer-metal-edge-01 sewc-vis-tfrag 70) +(def-tex sewer-metal-trim-02-hitweak sewc-vis-tfrag 71) +(def-tex sewer-nut sewc-vis-shrub 0) +(def-tex sewer-pipe-small-01 sewc-vis-shrub 1) +(def-tex sewer-shrub-rust-01 sewc-vis-shrub 2) +(def-tex sewer-moss-01 sewc-vis-shrub 3) +(def-tex sewer-hang-moss-01 sewc-vis-shrub 4) +(def-tex sewer-shrub-pitting-01 sewc-vis-shrub 5) +(def-tex sewer-concrete-edge-02 sewd-vis-tfrag 1) +(def-tex sewer-plate-05-hitweak sewd-vis-tfrag 2) +(def-tex sewer-metal-block-06-hitweak sewd-vis-tfrag 3) +(def-tex sewer-metal-block-01 sewd-vis-tfrag 4) +(def-tex sewer-block-02 sewd-vis-tfrag 5) +(def-tex sewer-pipe-small-02 sewd-vis-tfrag 6) +(def-tex sewer-plate-05 sewd-vis-tfrag 7) +(def-tex sewer-pipe-rim-05b sewd-vis-tfrag 8) +(def-tex sewer-pipe-rim-08 sewd-vis-tfrag 9) +(def-tex sewer-metal-block-04 sewd-vis-tfrag 10) +(def-tex sewer-metal-block-05 sewd-vis-tfrag 11) +(def-tex sewer-plate-02 sewd-vis-tfrag 12) +(def-tex sewer-rubber-rim-01 sewd-vis-tfrag 13) +(def-tex common-black sewd-vis-tfrag 15) +(def-tex sewer-concrete-edge-01 sewd-vis-tfrag 16) +(def-tex sewer-pipe-rim-03 sewd-vis-tfrag 17) +(def-tex sewer-brick-block-03 sewd-vis-tfrag 18) +(def-tex sewer-block-01 sewd-vis-tfrag 19) +(def-tex sewer-brick-block-01 sewd-vis-tfrag 20) +(def-tex sewer-brick-block-02 sewd-vis-tfrag 21) +(def-tex sewer-concrete-block-02 sewd-vis-tfrag 23) +(def-tex sewer-brick-block-06 sewd-vis-tfrag 26) +(def-tex sewer-pipe-01 sewd-vis-tfrag 27) +(def-tex sewer-pipe-rim-01 sewd-vis-tfrag 28) +(def-tex sewer-pipe-02-edge-01 sewd-vis-tfrag 29) +(def-tex sewer-metal-03 sewd-vis-tfrag 30) +(def-tex sewer-pipe-rim-05 sewd-vis-tfrag 31) +(def-tex sewer-flat-pipe-01 sewd-vis-tfrag 32) +(def-tex sewer-metal-block-06 sewd-vis-tfrag 33) +(def-tex sewer-mantel-01 sewd-vis-tfrag 34) +(def-tex sewer-mantel-02 sewd-vis-tfrag 35) +(def-tex sewer-hall-light-01 sewd-vis-tfrag 36) +(def-tex sewer-plate-04 sewd-vis-tfrag 38) +(def-tex sewer-pipe-rim-07 sewd-vis-tfrag 39) +(def-tex sewer-plate-03 sewd-vis-tfrag 40) +(def-tex sewer-pipe-02 sewd-vis-tfrag 41) +(def-tex sewer-pipe-rim-09 sewd-vis-tfrag 42) +(def-tex sewer-pipe-rim-06 sewd-vis-tfrag 43) +(def-tex sewer-plate-01 sewd-vis-tfrag 46) +(def-tex sewer-black sewd-vis-tfrag 47) +(def-tex sewer-metal-floor-01 sewd-vis-tfrag 49) +(def-tex strip-black sewd-vis-tfrag 50) +(def-tex sewer-lip-01 sewd-vis-tfrag 52) +(def-tex sewer-round-03 sewd-vis-tfrag 53) +(def-tex sewer-round-02 sewd-vis-tfrag 54) +(def-tex sewer-bolt-side-01 sewd-vis-tfrag 55) +(def-tex sewer-bolt-side-02 sewd-vis-tfrag 56) +(def-tex sewer-round-01 sewd-vis-tfrag 58) +(def-tex sewer-grate-01 sewd-vis-tfrag 59) +(def-tex sewer-pipe-rim-10 sewd-vis-tfrag 60) +(def-tex sewer-light-flourescent-01 sewd-vis-tfrag 61) +(def-tex sewer-scaffold-01 sewd-vis-tfrag 63) +(def-tex sewer-metal-trim-02 sewd-vis-tfrag 64) +(def-tex sewer-metal-trim-01 sewd-vis-tfrag 66) +(def-tex sewer-brick-roof-05 sewd-vis-tfrag 68) +(def-tex sewer-brick-block-10 sewd-vis-tfrag 69) +(def-tex sewer-brick-block-11 sewd-vis-tfrag 70) +(def-tex sewer-small-light-01 sewd-vis-tfrag 71) +(def-tex sewer-metal-block-02 sewd-vis-tfrag 72) +(def-tex sewer-red-light-01 sewd-vis-tfrag 73) +(def-tex sewer-metal-edge-01 sewd-vis-tfrag 74) +(def-tex sewer-metal-block-04-hitweak sewd-vis-tfrag 75) +(def-tex sewer-flat-pipe-01-hitweak sewd-vis-tfrag 76) +(def-tex sewer-stone-arch-01 sewd-vis-tfrag 77) +(def-tex sewer-lip-01-hitweak sewd-vis-tfrag 78) +(def-tex sewer-brick-block-04-hitweak sewd-vis-tfrag 79) +(def-tex sewer-block-01-hitweak sewd-vis-tfrag 80) +(def-tex sewer-nut sewd-vis-shrub 0) +(def-tex sewer-pipe-small-01 sewd-vis-shrub 1) +(def-tex sewer-moss-01 sewd-vis-shrub 2) +(def-tex sewer-hang-moss-01 sewd-vis-shrub 3) +(def-tex sew-jump-pad-grate sewd-vis-shrub 4) +(def-tex sewer-metal-01 sewd-vis-shrub 5) +(def-tex sewer-plate-05 sewd-vis-shrub 6) +(def-tex sewer-pipe-01 sewd-vis-shrub 7) +(def-tex sewer-pipe-rim-09 sewd-vis-shrub 8) +(def-tex sewer-pipe-rim-02 sewd-vis-shrub 9) +(def-tex sewer-pipe-small-02 sewd-vis-shrub 10) +(def-tex sewer-grate-01 sewd-vis-shrub 11) +(def-tex sewer-pipe-02-edge-01 sewd-vis-shrub 12) +(def-tex sewer-metal-04 sewd-vis-shrub 13) +(def-tex sewer-metal-block-01 sewe-vis-tfrag 2) +(def-tex sewer-metal-block-04 sewe-vis-tfrag 4) +(def-tex sewer-plate-05 sewe-vis-tfrag 5) +(def-tex sewer-pipe-rim-03 sewe-vis-tfrag 6) +(def-tex sewer-pipe-rim-08 sewe-vis-tfrag 7) +(def-tex sewer-plate-05-hitweak sewe-vis-tfrag 8) +(def-tex sewer-block-01 sewe-vis-tfrag 9) +(def-tex sewer-brick-block-03 sewe-vis-tfrag 11) +(def-tex sewer-stone-arch-01 sewe-vis-tfrag 12) +(def-tex sewer-brick-block-01 sewe-vis-tfrag 13) +(def-tex sewer-brick-block-04 sewe-vis-tfrag 14) +(def-tex sewer-block-02 sewe-vis-tfrag 15) +(def-tex sewer-concrete-block-02 sewe-vis-tfrag 16) +(def-tex sewer-mantel-01 sewe-vis-tfrag 17) +(def-tex sewer-mantel-02 sewe-vis-tfrag 18) +(def-tex sewer-pipe-02 sewe-vis-tfrag 20) +(def-tex sewer-pipe-rim-09 sewe-vis-tfrag 21) +(def-tex sewer-pipe-small-02 sewe-vis-tfrag 22) +(def-tex sewer-metal-03 sewe-vis-tfrag 23) +(def-tex sewer-concrete-edge-02 sewe-vis-tfrag 24) +(def-tex sewer-pool-rim-02 sewe-vis-tfrag 27) +(def-tex sewer-brick-block-02 sewe-vis-tfrag 28) +(def-tex sewer-pipe-rim-05 sewe-vis-tfrag 30) +(def-tex sewer-pipe-rim-05b sewe-vis-tfrag 31) +(def-tex sewer-pipe-01 sewe-vis-tfrag 32) +(def-tex sewer-pipe-rim-01 sewe-vis-tfrag 33) +(def-tex sewer-pipe-02-edge-01 sewe-vis-tfrag 34) +(def-tex sewer-pipe-rim-10 sewe-vis-tfrag 35) +(def-tex sewer-pipe-rim-07 sewe-vis-tfrag 36) +(def-tex sewer-plate-04 sewe-vis-tfrag 37) +(def-tex sewer-hall-light-01 sewe-vis-tfrag 38) +(def-tex sewer-metal-block-06 sewe-vis-tfrag 39) +(def-tex sewer-plate-02 sewe-vis-tfrag 40) +(def-tex sewer-plate-03 sewe-vis-tfrag 41) +(def-tex common-black sewe-vis-tfrag 42) +(def-tex sewer-concrete-edge-01 sewe-vis-tfrag 43) +(def-tex sewer-metal-floor-01 sewe-vis-tfrag 44) +(def-tex sewer-grate-01 sewe-vis-tfrag 46) +(def-tex strip-black sewe-vis-tfrag 47) +(def-tex sewer-metal-block-05 sewe-vis-tfrag 48) +(def-tex sewer-plate-01 sewe-vis-tfrag 49) +(def-tex sewer-lip-01 sewe-vis-tfrag 51) +(def-tex sewer-round-01 sewe-vis-tfrag 52) +(def-tex sewer-round-03 sewe-vis-tfrag 53) +(def-tex sewer-round-02 sewe-vis-tfrag 54) +(def-tex sewer-light-flourescent-01 sewe-vis-tfrag 56) +(def-tex sewer-metal-trim-02 sewe-vis-tfrag 57) +(def-tex sewer-plate-06 sewe-vis-tfrag 58) +(def-tex sewer-scaffold-01 sewe-vis-tfrag 59) +(def-tex sewer-stone-arch-02 sewe-vis-tfrag 60) +(def-tex sewer-brick-block-11 sewe-vis-tfrag 61) +(def-tex sewer-brick-block-10 sewe-vis-tfrag 62) +(def-tex sewer-black sewe-vis-tfrag 63) +(def-tex sewer-small-light-01 sewe-vis-tfrag 64) +(def-tex sewer-brick-roof-03 sewe-vis-tfrag 65) +(def-tex sewer-brick-roof-01 sewe-vis-tfrag 66) +(def-tex sewer-block-02-hitweak sewe-vis-tfrag 67) +(def-tex sewer-flat-pipe-01-red sewe-vis-tfrag 68) +(def-tex sewer-grill-02 sewe-vis-tfrag 69) +(def-tex sewer-metal-trim-01 sewe-vis-tfrag 70) +(def-tex sewer-metal-block-02 sewe-vis-tfrag 71) +(def-tex sewer-metal-02 sewe-vis-tfrag 72) +(def-tex sewer-red-light-01 sewe-vis-tfrag 75) +(def-tex sewer-red-light-02 sewe-vis-tfrag 76) +(def-tex sewer-pipe-rim-06 sewe-vis-tfrag 77) +(def-tex sewer-metal-edge-01 sewe-vis-tfrag 78) +(def-tex sewer-stone-newarch-01 sewe-vis-tfrag 79) +(def-tex sewer-metal-block-04-hitweak sewe-vis-tfrag 80) +(def-tex sewer-brick-block-04-hitweak sewe-vis-tfrag 81) +(def-tex sewer-moss-01 sewe-vis-shrub 0) +(def-tex sewer-hang-moss-01 sewe-vis-shrub 1) +(def-tex sewer-nut sewe-vis-shrub 2) +(def-tex sewer-pipe-small-01 sewe-vis-shrub 3) +(def-tex sew-movingstep-grate sewe-vis-shrub 4) +(def-tex sewer-screw-02 sewe-vis-shrub 5) +(def-tex sewer-metal-block-04 sewe-vis-shrub 6) +(def-tex sewer-pipe-rim-07 sewe-vis-shrub 7) +(def-tex sewer-pipe-01 sewe-vis-shrub 8) +(def-tex sew-laserturret-pole sewe-vis-shrub 9) +(def-tex sew-moving-stepb-grate sewe-vis-shrub 10) +(def-tex sewer-plate-05 sewe-vis-shrub 11) +(def-tex sewer-metal-block-06 sewe-vis-shrub 12) +(def-tex sewer-shrub-pitting-01 sewe-vis-shrub 13) +(def-tex sewer-water-01-d-dest sewd-vis-water 1) +(def-tex sewer-waterfall-02-d-dest sewd-vis-water 2) +(def-tex sewer-waterfall-02-d sewd-vis-water 3) +(def-tex sewer-water-01-d sewd-vis-water 4) +(def-tex sewer-water-highlight-01-d-dest sewd-vis-water 5) +(def-tex sewer-water-wave-01-d sewd-vis-water 6) +(def-tex sewer-water-still-01-d sewd-vis-water 7) +(def-tex sewer-water-wave-01-d-dest sewd-vis-water 8) +(def-tex sewer-water-still-01-d-dest sewd-vis-water 9) +(def-tex sewer-water-wave-02-d sewd-vis-water 13) +(def-tex sewer-water-highlight-01-d sewd-vis-water 14) +(def-tex sewer-water-wave-02-d-dest sewd-vis-water 15) +(def-tex sew-wallswitch-green-01 sewd-vis-water 16) +(def-tex sew-wallswitch-red-01 sewd-vis-water 17) +(def-tex sewer-waterfall-02-c-dest sewc-vis-water 3) +(def-tex sewer-water-01-c-dest sewc-vis-water 4) +(def-tex sewer-waterfall-02-c sewc-vis-water 5) +(def-tex sewer-water-01-c sewc-vis-water 6) +(def-tex sewer-water-highlight-01-c-dest sewc-vis-water 7) +(def-tex sewer-waterfall-01-c-dest sewc-vis-water 8) +(def-tex sewer-water-wave-01-c-dest sewc-vis-water 9) +(def-tex sewer-waterfall-01-c sewc-vis-water 11) +(def-tex sewer-water-highlight-01-c sewc-vis-water 12) +(def-tex sewer-water-wave-01-c sewc-vis-water 13) +(def-tex common-black sewd-vis-pris 14) +(def-tex sew-gun-barrel-01 sewd-vis-pris 15) +(def-tex sew-gun-body-01 sewd-vis-pris 16) +(def-tex sew-gun-drum-01 sewd-vis-pris 17) +(def-tex sew-gun-panel-01 sewd-vis-pris 18) +(def-tex sew-gun-panel-02 sewd-vis-pris 19) +(def-tex sew-gun-panel-03 sewd-vis-pris 20) +(def-tex sew-gun-panel-05 sewd-vis-pris 21) +(def-tex sew-gun-panel-06 sewd-vis-pris 22) +(def-tex sew-gun-rim-01 sewd-vis-pris 23) +(def-tex sew-gun-rim-02 sewd-vis-pris 24) +(def-tex sew-gun-rim-03 sewd-vis-pris 25) +(def-tex sew-gun-rim-04 sewd-vis-pris 26) +(def-tex sew-gun-rim-05 sewd-vis-pris 27) +(def-tex sew-gun-round-01 sewd-vis-pris 28) +(def-tex sew-gun-round-02 sewd-vis-pris 29) +(def-tex sew-gun-round-cap-01 sewd-vis-pris 30) +(def-tex sew-laserturret-1 sewd-vis-pris 31) +(def-tex sew-laserturret-2 sewd-vis-pris 32) +(def-tex sew-laserturret-3 sewd-vis-pris 33) +(def-tex sew-laserturret-bot sewd-vis-pris 34) +(def-tex sew-laserturret-bot-lod1 sewd-vis-pris 35) +(def-tex sew-laserturret-center sewd-vis-pris 36) +(def-tex sew-laserturret-pole sewd-vis-pris 37) +(def-tex sew-laserturret-red sewd-vis-pris 38) +(def-tex sew-laserturret-top sewd-vis-pris 39) +(def-tex sewer-grill-01 sewd-vis-pris 57) +(def-tex sonar-wave sewd-vis-pris 59) +(def-tex sewer-brick-block-11 sewd-vis-pris 60) +(def-tex sewer-pipe-rim-05 sewd-vis-pris 61) +(def-tex sewer-pipe-rim-05b-hitweak sewd-vis-pris 62) +(def-tex sewer-pipe-rim-07 sewd-vis-pris 63) +(def-tex sewer-pipe-small-01 sewd-vis-pris 64) +(def-tex sew-wallswitch-metal-01 sewd-vis-pris 65) +(def-tex sew-wallswitch-metal-02 sewd-vis-pris 66) +(def-tex sew-wallswitch-metal-03 sewd-vis-pris 67) +(def-tex sew-wallswitch-metal-04 sewd-vis-pris 68) +(def-tex cguardgame-backplate sewd-vis-pris 69) +(def-tex cguardgame-metaledark-02 sewd-vis-pris 78) +(def-tex cguardgame-metallight-01small sewd-vis-pris 80) +(def-tex cguardgame-shoebottom sewd-vis-pris 82) +(def-tex blue-gem sewd-vis-pris 88) +(def-tex brown-hose sewd-vis-pris 89) +(def-tex cguard1-backmetal sewd-vis-pris 90) +(def-tex cguard1-chestplate sewd-vis-pris 91) +(def-tex cguard1-gunmetaldark2 sewd-vis-pris 92) +(def-tex cguard1-guntube sewd-vis-pris 93) +(def-tex cguard1-lens sewd-vis-pris 94) +(def-tex environment-oldmetal sewd-vis-pris 95) +(def-tex roboguard-die-stamped-metal-blue sewd-vis-pris 96) +(def-tex roboguard-die-stamped-metal-red sewd-vis-pris 97) +(def-tex roboguard-headshield sewd-vis-pris 98) +(def-tex roboguard-shouldershield sewd-vis-pris 99) +(def-tex squid-bulb-sm sewd-vis-pris 100) +(def-tex squid-tubes sewd-vis-pris 101) +(def-tex widow-dull-inards sewd-vis-pris 102) +(def-tex widow-pod-gun-metal sewd-vis-pris 103) +(def-tex wire-metal sewd-vis-pris 104) +(def-tex kg-grunt-cable-01 sewd-vis-pris 105) +(def-tex kg-grunt-rim-03 sewd-vis-pris 106) +(def-tex squid-drabgun sewd-vis-pris 107) +(def-tex airlock-door-bolt sewb-vis-pris 0) +(def-tex airlock-door-cog sewb-vis-pris 1) +(def-tex airlock-door-main sewb-vis-pris 2) +(def-tex airlock-door-metal2 sewb-vis-pris 3) +(def-tex airlockl-door-metalframe sewb-vis-pris 4) +(def-tex airlock-door-cog1 sewb-vis-pris 5) +(def-tex sewer-pipe-rim-07 sewb-vis-pris 6) +(def-tex sewer-plate-05 sewb-vis-pris 7) +(def-tex sewer-screw-02 sewb-vis-pris 8) +(def-tex sew-laserturret-pole sewb-vis-pris 9) +(def-tex sew-movingstep-grate sewb-vis-pris 10) +(def-tex sewer-metal-block-04 sewb-vis-pris 11) +(def-tex sewer-pipe-01 sewb-vis-pris 12) +(def-tex sewer-metal-floor-01 sewb-vis-pris 13) +(def-tex sewer-plate-02 sewb-vis-pris 14) +(def-tex cguardgame-backplate sewb-vis-pris 23) +(def-tex cguardgame-metaledark-02 sewb-vis-pris 32) +(def-tex cguardgame-metallight-01small sewb-vis-pris 34) +(def-tex cguardgame-shoebottom sewb-vis-pris 36) +(def-tex bam-eyelight sewb-vis-pris 41) +(def-tex cguard1-backmetal sewb-vis-pris 42) +(def-tex cguard1-chestplate sewb-vis-pris 43) +(def-tex cguard1-gunmetaldark2 sewb-vis-pris 44) +(def-tex cguard1-guntube sewb-vis-pris 45) +(def-tex cguard1-lens sewb-vis-pris 46) +(def-tex environment-oldmetal sewb-vis-pris 47) +(def-tex kg-grunt-cable-01 sewb-vis-pris 48) +(def-tex kg-grunt-rim-01 sewb-vis-pris 49) +(def-tex kg-grunt-rim-02 sewb-vis-pris 50) +(def-tex kg-grunt-rim-03 sewb-vis-pris 51) +(def-tex roboguard-headshield sewb-vis-pris 52) +(def-tex roboguard-shouldershield sewb-vis-pris 53) +(def-tex squid-bulb-sm sewb-vis-pris 54) +(def-tex widow-dull-inards sewb-vis-pris 55) +(def-tex widow-pod-gun-metal sewb-vis-pris 56) +(def-tex blue-gem sewb-vis-pris 57) +(def-tex brown-hose sewb-vis-pris 58) +(def-tex roboguard-die-stamped-metal-blue sewb-vis-pris 59) +(def-tex roboguard-die-stamped-metal-red sewb-vis-pris 60) +(def-tex squid-tubes sewb-vis-pris 61) +(def-tex wire-metal sewb-vis-pris 62) +(def-tex squid-drabgun sewb-vis-pris 63) +(def-tex airlock-door-bolt sewc-vis-pris 0) +(def-tex airlock-door-cog sewc-vis-pris 1) +(def-tex airlock-door-main sewc-vis-pris 2) +(def-tex airlock-door-metal2 sewc-vis-pris 3) +(def-tex airlockl-door-metalframe sewc-vis-pris 4) +(def-tex sew-gun-barrel-01 sewc-vis-pris 5) +(def-tex sew-gun-body-01 sewc-vis-pris 6) +(def-tex sew-gun-drum-01 sewc-vis-pris 7) +(def-tex sew-gun-panel-02 sewc-vis-pris 8) +(def-tex sew-gun-panel-05 sewc-vis-pris 9) +(def-tex sew-gun-rim-02 sewc-vis-pris 10) +(def-tex sew-gun-round-02 sewc-vis-pris 11) +(def-tex sew-gun-round-cap-01 sewc-vis-pris 12) +(def-tex sew-laser-guard-side sewc-vis-pris 13) +(def-tex sew-laserturret-bot sewc-vis-pris 14) +(def-tex sew-laserturret-center sewc-vis-pris 15) +(def-tex sew-laserturret-pole sewc-vis-pris 16) +(def-tex sewer-pipe-small-01 sewc-vis-pris 17) +(def-tex cguardgame-backplate sewc-vis-pris 26) +(def-tex cguardgame-metaledark-02 sewc-vis-pris 40) +(def-tex cguardgame-metallight-01small sewc-vis-pris 42) +(def-tex cguardgame-shoebottom sewc-vis-pris 46) +(def-tex environment-oldmetal sewc-vis-pris 54) +(def-tex bam-eyelight sewc-vis-pris 65) +(def-tex cguard1-backmetal sewc-vis-pris 66) +(def-tex cguard1-chestplate sewc-vis-pris 67) +(def-tex cguard1-gunmetaldark2 sewc-vis-pris 68) +(def-tex cguard1-guntube sewc-vis-pris 69) +(def-tex cguard1-lens sewc-vis-pris 70) +(def-tex kg-grunt-cable-01 sewc-vis-pris 71) +(def-tex kg-grunt-rim-01 sewc-vis-pris 72) +(def-tex kg-grunt-rim-02 sewc-vis-pris 73) +(def-tex kg-grunt-rim-03 sewc-vis-pris 74) +(def-tex roboguard-headshield sewc-vis-pris 75) +(def-tex roboguard-shouldershield sewc-vis-pris 76) +(def-tex squid-bulb-sm sewc-vis-pris 77) +(def-tex widow-dull-inards sewc-vis-pris 78) +(def-tex widow-pod-gun-metal sewc-vis-pris 79) +(def-tex roboguard-die-stamped-metal-blue sewc-vis-pris 80) +(def-tex blue-gem sewc-vis-pris 81) +(def-tex brown-hose sewc-vis-pris 82) +(def-tex roboguard-die-stamped-metal-red sewc-vis-pris 83) +(def-tex squid-tubes sewc-vis-pris 84) +(def-tex wire-metal sewc-vis-pris 85) +(def-tex squid-drabgun sewc-vis-pris 86) +(def-tex sewer-water-01-e-dest sewe-vis-water 11) +(def-tex sewer-waterfall-01-e-dest sewe-vis-water 12) +(def-tex sewer-waterfall-02-e-dest sewe-vis-water 13) +(def-tex sewer-water-highlight-01-e-dest sewe-vis-water 14) +(def-tex sewer-water-01-e sewe-vis-water 18) +(def-tex sewer-water-highlight-01-e sewe-vis-water 19) +(def-tex sewer-waterfall-01-e sewe-vis-water 20) +(def-tex sewer-waterfall-02-e sewe-vis-water 21) +(def-tex airlock-door-bolt sewe-vis-pris 1) +(def-tex airlock-door-cog sewe-vis-pris 2) +(def-tex airlock-door-main sewe-vis-pris 3) +(def-tex airlock-door-metal2 sewe-vis-pris 4) +(def-tex airlockl-door-metalframe sewe-vis-pris 5) +(def-tex power-switch-01 sewe-vis-pris 22) +(def-tex power-switch-02 sewe-vis-pris 23) +(def-tex power-switch-03 sewe-vis-pris 24) +(def-tex power-switch-04 sewe-vis-pris 25) +(def-tex power-switch-05 sewe-vis-pris 26) +(def-tex power-switch-06 sewe-vis-pris 27) +(def-tex bam-eyelight sewe-vis-pris 28) +(def-tex cguard1-backmetal sewe-vis-pris 31) +(def-tex cguard1-chestplate sewe-vis-pris 32) +(def-tex cguard1-gunmetaldark2 sewe-vis-pris 33) +(def-tex cguard1-guntube sewe-vis-pris 34) +(def-tex cguard1-lens sewe-vis-pris 35) +(def-tex cguardgame-metaledark-02 sewe-vis-pris 37) +(def-tex cguardgame-metallight-01small sewe-vis-pris 38) +(def-tex environment-oldmetal sewe-vis-pris 40) +(def-tex roboguard-headshield sewe-vis-pris 43) +(def-tex roboguard-shouldershield sewe-vis-pris 44) +(def-tex squid-bulb-sm sewe-vis-pris 45) +(def-tex widow-dull-inards sewe-vis-pris 47) +(def-tex widow-pod-gun-metal sewe-vis-pris 48) +(def-tex kg-grunt-cable-01 sewe-vis-pris 50) +(def-tex kg-grunt-rim-01 sewe-vis-pris 51) +(def-tex kg-grunt-rim-02 sewe-vis-pris 52) +(def-tex kg-grunt-rim-03 sewe-vis-pris 53) +(def-tex squid-drabgun sewe-vis-pris 54) +(def-tex sewer-concrete-edge-02 sewf-vis-tfrag 1) +(def-tex sewer-nut sewf-vis-tfrag 2) +(def-tex sewer-metal-block-06 sewf-vis-tfrag 5) +(def-tex common-black sewf-vis-tfrag 6) +(def-tex sewer-pipe-02 sewf-vis-tfrag 7) +(def-tex sewer-metal-block-07 sewf-vis-tfrag 11) +(def-tex sewer-stone-arch-01 sewf-vis-tfrag 12) +(def-tex sewer-pipe-01 sewf-vis-tfrag 13) +(def-tex sewer-pipe-02-edge-01 sewf-vis-tfrag 14) +(def-tex sewer-pipe-rim-01 sewf-vis-tfrag 15) +(def-tex sewer-pipe-rim-06 sewf-vis-tfrag 16) +(def-tex sewer-plate-05 sewf-vis-tfrag 17) +(def-tex sewer-metal-03 sewf-vis-tfrag 18) +(def-tex sewer-metal-block-01 sewf-vis-tfrag 20) +(def-tex sewer-pipe-rim-08 sewf-vis-tfrag 22) +(def-tex sewer-block-01 sewf-vis-tfrag 24) +(def-tex sewer-metal-block-04 sewf-vis-tfrag 25) +(def-tex sewer-pipe-rim-10 sewf-vis-tfrag 28) +(def-tex sewer-rubber-rim-01 sewf-vis-tfrag 29) +(def-tex sew-gun-rim-03 sewf-vis-tfrag 30) +(def-tex sewer-screw-02 sewf-vis-tfrag 31) +(def-tex sewer-pipe-rim-07 sewf-vis-tfrag 32) +(def-tex sewer-plate-01 sewf-vis-tfrag 33) +(def-tex sewer-pipe-rim-05b sewf-vis-tfrag 34) +(def-tex sewer-plate-04 sewf-vis-tfrag 40) +(def-tex sew-metal-floor-01 sewf-vis-tfrag 41) +(def-tex sewer-grate-01 sewf-vis-tfrag 42) +(def-tex sewer-metal-block-05 sewf-vis-tfrag 44) +(def-tex sewer-rusted-metal sewf-vis-tfrag 45) +(def-tex sewer-nut-rim sewf-vis-tfrag 46) +(def-tex sewer-corroded-trim sewf-vis-tfrag 47) +(def-tex sewer-metal-floor-01 sewf-vis-tfrag 48) +(def-tex sewer-brick-block-09 sewf-vis-tfrag 49) +(def-tex sewer-scaffold-01 sewf-vis-tfrag 50) +(def-tex sewer-scaffold-02 sewf-vis-tfrag 51) +(def-tex sewer-nut-01 sewf-vis-tfrag 52) +(def-tex sewer-plate-06 sewf-vis-tfrag 53) +(def-tex sewer-pipe-rim-07-hitweak sewf-vis-tfrag 54) +(def-tex sewer-bolt-side-01 sewf-vis-tfrag 55) +(def-tex sewer-bolt-side-02 sewf-vis-tfrag 56) +(def-tex sewer-round-03 sewf-vis-tfrag 57) +(def-tex sewer-round-02 sewf-vis-tfrag 58) +(def-tex sewer-lip-01 sewf-vis-tfrag 59) +(def-tex sewer-round-01 sewf-vis-tfrag 61) +(def-tex sewer-brick-roof-02 sewf-vis-tfrag 64) +(def-tex sewer-brick-roof-01 sewf-vis-tfrag 65) +(def-tex sewer-brick-roof-03 sewf-vis-tfrag 66) +(def-tex sewer-brick-roof-04 sewf-vis-tfrag 67) +(def-tex sewer-big-brace-01 sewf-vis-tfrag 68) +(def-tex sewer-big-brace-02 sewf-vis-tfrag 69) +(def-tex sewer-big-brace-trim-01 sewf-vis-tfrag 70) +(def-tex sewer-big-brace-trim-02 sewf-vis-tfrag 71) +(def-tex sewer-metal-trim-01 sewf-vis-tfrag 72) +(def-tex sewer-scaffold-03 sewf-vis-tfrag 73) +(def-tex sewer-metal-block-02 sewf-vis-tfrag 74) +(def-tex sewer-small-light-01 sewf-vis-tfrag 75) +(def-tex sewer-metal-trim-02 sewf-vis-tfrag 76) +(def-tex sewer-yellow-light-01 sewf-vis-tfrag 77) +(def-tex sewer-yellow-light-02 sewf-vis-tfrag 78) +(def-tex sewer-red-light-01 sewf-vis-tfrag 79) +(def-tex sewer-red-light-02 sewf-vis-tfrag 80) +(def-tex sewer-block-02-hitweak sewf-vis-tfrag 81) +(def-tex sewer-brick-block-11 sewf-vis-tfrag 82) +(def-tex sewer-brick-block-10 sewf-vis-tfrag 83) +(def-tex sewer-pipe-small-01 sewf-vis-shrub 0) +(def-tex sewer-nut sewf-vis-shrub 1) +(def-tex sewer-shrub-pitting-01 sewf-vis-shrub 2) +(def-tex airlock-door-bolt sewf-vis-pris 0) +(def-tex airlock-door-cog sewf-vis-pris 1) +(def-tex airlock-door-main sewf-vis-pris 2) +(def-tex airlock-door-metal2 sewf-vis-pris 3) +(def-tex airlockl-door-metalframe sewf-vis-pris 4) +(def-tex sewer-pipe-01 sewf-vis-pris 5) +(def-tex airlock-door-cog1 sewf-vis-pris 6) +(def-tex sew-gasstep-rim-lod1 sewf-vis-pris 7) +(def-tex sew-gasstep-tube sewf-vis-pris 8) +(def-tex sew-gasstep-vent sewf-vis-pris 9) +(def-tex sew-movingstep-grate sewf-vis-pris 10) +(def-tex sewer-pipe-rim-07 sewf-vis-pris 11) +(def-tex sewer-screw-02 sewf-vis-pris 12) +(def-tex sew-poison-light sewf-vis-pris 13) +(def-tex sewer-flat-pipe-01 sewf-vis-pris 14) +(def-tex sewer-metal-block-06 sewf-vis-pris 15) +(def-tex sewer-plate-03 sewf-vis-pris 16) +(def-tex sewer-plate-04 sewf-vis-pris 17) +(def-tex sewer-plate-05 sewf-vis-pris 18) +(def-tex sewcurved-door-01 sewf-vis-pris 19) +(def-tex sewcurved-door-04 sewf-vis-pris 20) +(def-tex sewcurved-door-05 sewf-vis-pris 21) +(def-tex sewcurved-door-06 sewf-vis-pris 22) +(def-tex fora-rock foresta-vis-tfrag 0) +(def-tex fora-rock-small foresta-vis-tfrag 1) +(def-tex fora-grass-fringe foresta-vis-tfrag 2) +(def-tex fora-grass foresta-vis-tfrag 3) +(def-tex fora-bark foresta-vis-tfrag 4) +(def-tex fora-stream-rocks foresta-vis-tfrag 9) +(def-tex sewer-metal-block-06 foresta-vis-tfrag 11) +(def-tex sewer-concrete-edge-02 foresta-vis-tfrag 12) +(def-tex sewer-metal-block-05 foresta-vis-tfrag 13) +(def-tex fora-roof-support foresta-vis-tfrag 22) +(def-tex fora-citywall-frame foresta-vis-tfrag 26) +(def-tex fora-citywall foresta-vis-tfrag 27) +(def-tex fora-metal-green-02 foresta-vis-tfrag 28) +(def-tex fora-metal-green-main foresta-vis-tfrag 29) +(def-tex fora-metal-wallgrill foresta-vis-tfrag 30) +(def-tex fora-foliage foresta-vis-tfrag 31) +(def-tex fora-small-bottom foresta-vis-tfrag 32) +(def-tex fora-grass-patch foresta-vis-tfrag 33) +(def-tex fora-stone-05 foresta-vis-tfrag 34) +(def-tex fora-endblocks foresta-vis-tfrag 35) +(def-tex fora-supportmetall foresta-vis-tfrag 36) +(def-tex fora-grass-to-mud foresta-vis-tfrag 37) +(def-tex fora-statue-stone foresta-vis-tfrag 39) +(def-tex fora-butress-metal-01 foresta-vis-tfrag 40) +(def-tex fora-butress-metal-02 foresta-vis-tfrag 41) +(def-tex fora-bark-ends foresta-vis-tfrag 44) +(def-tex fora-statue-stone-sides foresta-vis-tfrag 45) +(def-tex fora-precursor-metal-plain-01dk foresta-vis-tfrag 46) +(def-tex fora-cliff-face-far foresta-vis-tfrag 47) +(def-tex fora-spawn-root foresta-vis-tfrag 48) +(def-tex fora-bridge-green foresta-vis-tfrag 50) +(def-tex fora-green-eco-vent-hole foresta-vis-tfrag 51) +(def-tex airlock-door-bolt foresta-vis-pris 0) +(def-tex airlock-door-cog foresta-vis-pris 1) +(def-tex airlock-door-main foresta-vis-pris 2) +(def-tex airlock-door-metal2 foresta-vis-pris 3) +(def-tex airlockl-door-metalframe foresta-vis-pris 4) +(def-tex fora-precursor-glass-b-02 foresta-vis-pris 12) +(def-tex fora-precursor-light foresta-vis-pris 13) +(def-tex fora-precursor-metal-edge-01 foresta-vis-pris 14) +(def-tex fora-precursor-metal-plain-01 foresta-vis-pris 15) +(def-tex fora-precursor-metal-plain-01dk foresta-vis-pris 16) +(def-tex fora-precursor-small-groove foresta-vis-pris 17) +(def-tex fora-precursor-tube-ring-02 foresta-vis-pris 18) +(def-tex fora-bridge-plank foresta-vis-pris 20) +(def-tex fora-statue-stone foresta-vis-pris 26) +(def-tex fora-statue-stone-sides foresta-vis-pris 27) +(def-tex mtn-environment-front-backup foresta-vis-pris 28) +(def-tex fora-precursor-circuitpattern-01 foresta-vis-pris 36) +(def-tex beamgen-lens foresta-vis-pris 167) +(def-tex beamgen-metal-dec-trim-01 foresta-vis-pris 168) +(def-tex beamgen-metal-edge-01 foresta-vis-pris 169) +(def-tex beamgen-metal-edge-02 foresta-vis-pris 170) +(def-tex holo-cube-face-01 foresta-vis-pris 171) +(def-tex holo-cube-face-02 foresta-vis-pris 172) +(def-tex precprism-lens-03 foresta-vis-pris 173) +(def-tex precprism-lens-05 foresta-vis-pris 174) +(def-tex precprism-lens-06 foresta-vis-pris 175) +(def-tex quantref-01 foresta-vis-pris 176) +(def-tex quantref-02 foresta-vis-pris 177) +(def-tex quantref-03 foresta-vis-pris 178) +(def-tex quantref-04 foresta-vis-pris 179) +(def-tex dm-ship-cockpit-01 foresta-vis-pris 180) +(def-tex dm-ship-hull-01 foresta-vis-pris 181) +(def-tex dm-ship-hull-02 foresta-vis-pris 182) +(def-tex dm-ship-nose-01 foresta-vis-pris 183) +(def-tex dm-ship-nose-02 foresta-vis-pris 184) +(def-tex dm-ship-plate-01 foresta-vis-pris 185) +(def-tex environment-darkprec foresta-vis-pris 186) +(def-tex timemap-ball-precmetal foresta-vis-pris 187) +(def-tex timemap-centerball foresta-vis-pris 188) +(def-tex timemap-notchborder foresta-vis-pris 189) +(def-tex timemap-precmetal-feet foresta-vis-pris 190) +(def-tex timemap-precmetal-plain-large foresta-vis-pris 191) +(def-tex timemap-precmetal-teeth foresta-vis-pris 192) +(def-tex timemap-smallball-01 foresta-vis-pris 193) +(def-tex timemap-smallball-02 foresta-vis-pris 194) +(def-tex timemap-wordborder foresta-vis-pris 195) +(def-tex dm-ship-tentacle-01 foresta-vis-pris 196) +(def-tex precur-planet-water-01 foresta-vis-pris 198) +(def-tex fora-water foresta-vis-water 3) +(def-tex fora-waterfall-01 foresta-vis-water 4) +(def-tex fora-water-dest foresta-vis-water 7) +(def-tex fora-waterfall-01-dest foresta-vis-water 9) +(def-tex fora-water-wave-01 foresta-vis-water 11) +(def-tex fora-water-wave-01-dest foresta-vis-water 12) +(def-tex for-prec-text foresta-vis-water 13) +(def-tex nst-egg-spider-body nsta-vis-pris 16) +(def-tex nst-egg-spider-egg nsta-vis-pris 17) +(def-tex nst-egg-spider-eye nsta-vis-pris 18) +(def-tex nst-egg-spider-metal nsta-vis-pris 19) +(def-tex nst-egg-spider-pipe nsta-vis-pris 20) +(def-tex common-gray freehq-tfrag 1) +(def-tex freehq-corrosive-metal-01 freehq-tfrag 9) +(def-tex freehq-gray-metal-disc01 freehq-tfrag 10) +(def-tex freehq-wal-plate04 freehq-tfrag 12) +(def-tex freehq-gray-metal-disc02 freehq-tfrag 13) +(def-tex freehq-wal-tilem01 freehq-tfrag 14) +(def-tex freehq-gray-metal-disc03 freehq-tfrag 15) +(def-tex freehq-gray-metal-disc04 freehq-tfrag 16) +(def-tex freehq-handle-01 freehq-tfrag 17) +(def-tex freehq-gray-metal-disc05 freehq-tfrag 19) +(def-tex freehq-gray-metal-disc07 freehq-tfrag 21) +(def-tex freehq-blue-light freehq-tfrag 22) +(def-tex freehq-green-light freehq-tfrag 23) +(def-tex freehq-panel-01 freehq-tfrag 24) +(def-tex freehq-monitor01 freehq-tfrag 26) +(def-tex freehq-panel-05 freehq-tfrag 28) +(def-tex freehq-ground-tile-set1-lm freehq-tfrag 29) +(def-tex freehq-ground-tile-set1-rm freehq-tfrag 30) +(def-tex freehq-monitor04 freehq-tfrag 31) +(def-tex freehq-ground-tile-set1-lbc freehq-tfrag 32) +(def-tex freehq-ground-tile-set1-rbc freehq-tfrag 33) +(def-tex freehq-ground-tile-set1-m freehq-tfrag 34) +(def-tex freehq-ground-tile-set1-tm freehq-tfrag 35) +(def-tex freehq-ground-tile-set1-ltc freehq-tfrag 36) +(def-tex freehq-ground-tile-set1-rtc freehq-tfrag 37) +(def-tex freehq-monitor05 freehq-tfrag 38) +(def-tex freehq-ground-tile-set1-bm freehq-tfrag 39) +(def-tex freehq-env freehq-tfrag 41) +(def-tex freehq-panel-06 freehq-tfrag 42) +(def-tex freehg-display01 freehq-tfrag 43) +(def-tex freehq-floor-tile-set01 freehq-tfrag 44) +(def-tex freehq-floor-tile-set02 freehq-tfrag 45) +(def-tex freehq-floor-walk-set01 freehq-tfrag 46) +(def-tex freehq-floor-walk-set02 freehq-tfrag 47) +(def-tex freehq-wal-plate02 freehq-tfrag 48) +(def-tex freehq-wal-plate01 freehq-tfrag 49) +(def-tex freehq-wal-plate03 freehq-tfrag 50) +(def-tex freehq-monitor02 freehq-tfrag 51) +(def-tex freehq-monitor07 freehq-tfrag 52) +(def-tex freehq-monitor03 freehq-tfrag 53) +(def-tex freehq-monitor06 freehq-tfrag 54) +(def-tex freehq-monitor08 freehq-tfrag 55) +(def-tex freehq-projector01 freehq-tfrag 56) +(def-tex freehq-projector02 freehq-tfrag 57) +(def-tex freehq-projector03 freehq-tfrag 58) +(def-tex freehq-projector04 freehq-tfrag 59) +(def-tex freehq-pipe01 freehq-tfrag 60) +(def-tex freehq-pipe02 freehq-tfrag 61) +(def-tex freehq-pipe04 freehq-tfrag 62) +(def-tex freehq-gray-metal-disc08 freehq-tfrag 63) +(def-tex freehq-pipe03 freehq-tfrag 64) +(def-tex freehq-wal-tilem05 freehq-tfrag 65) +(def-tex freehq-wal-tilem06 freehq-tfrag 66) +(def-tex freehq-wal-tilem02 freehq-tfrag 67) +(def-tex freehq-wal-tilem03 freehq-tfrag 68) +(def-tex freehq-wal-tilem04 freehq-tfrag 69) +(def-tex freehq-red-light freehq-tfrag 70) +(def-tex freehq-wal-tilem07 freehq-tfrag 71) +(def-tex ctyslumc-light freehq-tfrag 104) +(def-tex common-black freehq-tfrag 105) +(def-tex ctyslumc-wall-trim freehq-tfrag 111) +(def-tex ctyslumc-overhang-02 freehq-tfrag 118) +(def-tex cityslumc-metal-trim freehq-tfrag 125) +(def-tex cityslumc-door-plate freehq-tfrag 126) +(def-tex cityslumc-pipe freehq-tfrag 127) +(def-tex lfacrm-girder-01 freehq-tfrag 128) +(def-tex lfacrm-plate-05 freehq-tfrag 129) +(def-tex sewer-pipe-small-01 sewa-vis-shrub 0) +(def-tex fora-bark forestb-vis-tfrag 0) +(def-tex fora-rock forestb-vis-tfrag 1) +(def-tex fora-grass forestb-vis-tfrag 2) +(def-tex fora-stream-rocks forestb-vis-tfrag 3) +(def-tex fora-foliage forestb-vis-tfrag 6) +(def-tex fora-rock-small forestb-vis-tfrag 14) +(def-tex fora-grass-fringe forestb-vis-tfrag 16) +(def-tex fora-grass-to-mud forestb-vis-tfrag 17) +(def-tex turret-mh-metal forestb-vis-tfrag 18) +(def-tex turret-hose forestb-vis-tfrag 19) +(def-tex fora-spawn-root forestb-vis-tfrag 20) +(def-tex fora-green-eco-vent-hole forestb-vis-tfrag 21) +(def-tex cguardgame-armshield forestb-vis-pris 0) +(def-tex cguardgame-backplate forestb-vis-pris 1) +(def-tex cguardgame-blackstrap forestb-vis-pris 2) +(def-tex cguardgame-boottop forestb-vis-pris 3) +(def-tex cguardgame-chestplate forestb-vis-pris 4) +(def-tex cguardgame-ear forestb-vis-pris 5) +(def-tex cguardgame-face forestb-vis-pris 6) +(def-tex cguardgame-greyheadshield forestb-vis-pris 7) +(def-tex cguardgame-gunboltlight forestb-vis-pris 8) +(def-tex cguardgame-gunhandle forestb-vis-pris 9) +(def-tex cguardgame-gunleather forestb-vis-pris 10) +(def-tex cguardgame-gunmetaldark forestb-vis-pris 11) +(def-tex cguardgame-gunmetaldark2 forestb-vis-pris 12) +(def-tex cguardgame-guntube forestb-vis-pris 13) +(def-tex cguardgame-jacketstrap forestb-vis-pris 14) +(def-tex cguardgame-metaledark-02 forestb-vis-pris 15) +(def-tex cguardgame-metalered-01 forestb-vis-pris 16) +(def-tex cguardgame-metallight-01small forestb-vis-pris 17) +(def-tex cguardgame-metallight-02 forestb-vis-pris 18) +(def-tex cguardgame-metallight-plain forestb-vis-pris 19) +(def-tex cguardgame-scarf forestb-vis-pris 20) +(def-tex cguardgame-shoebottom forestb-vis-pris 21) +(def-tex cguardgame-shouldershield forestb-vis-pris 22) +(def-tex cguardgame-sleeve forestb-vis-pris 23) +(def-tex darkguard-armshield forestb-vis-pris 25) +(def-tex darkguard-headshield forestb-vis-pris 26) +(def-tex darkguard-scarf forestb-vis-pris 27) +(def-tex darkguard-shouldershield forestb-vis-pris 28) +(def-tex environment-oldmetal forestb-vis-pris 29) +(def-tex kgtrns-box01 forestb-vis-pris 30) +(def-tex kgtrns-hatch01 forestb-vis-pris 31) +(def-tex kgtrns-side01 forestb-vis-pris 32) +(def-tex kgtrns-topjet01 forestb-vis-pris 33) +(def-tex kgtrns-wing01 forestb-vis-pris 34) +(def-tex forb-water forestb-vis-water 5) +(def-tex forb-water-dest forestb-vis-water 6) +(def-tex forb-waterfall-01 forestb-vis-water 8) +(def-tex forb-waterfall-01-dest forestb-vis-water 9) +(def-tex forb-water-wave-01 forestb-vis-water 12) +(def-tex forb-water-wave-01-dest forestb-vis-water 13) +(def-tex wascity-stone-plain-wall-3 wascityb-vis-tfrag 0) +(def-tex wascity-stone-bricks-2-plain wascityb-vis-tfrag 1) +(def-tex wascity-metal-segments wascityb-vis-tfrag 2) +(def-tex wascity-metal-door-01 wascityb-vis-tfrag 4) +(def-tex wascity-metal-dirty wascityb-vis-tfrag 5) +(def-tex wascity-metal-spike-01 wascityb-vis-tfrag 6) +(def-tex wascity-greenmetal-tube wascityb-vis-tfrag 7) +(def-tex wascity-steel-bar wascityb-vis-tfrag 8) +(def-tex wascity-wallspike-2-ground-01 wascityb-vis-tfrag 9) +(def-tex wascity-wallspike-01 wascityb-vis-tfrag 10) +(def-tex wascity-metal-piece-02 wascityb-vis-tfrag 11) +(def-tex wascity-metal-piece-01 wascityb-vis-tfrag 12) +(def-tex wascity-stucco-wall-bleached-01 wascityb-vis-tfrag 13) +(def-tex wascity-stucco-wall-bleached-2-bricks-01 wascityb-vis-tfrag 14) +(def-tex wascity-stucco-wall-bleached-cut-01 wascityb-vis-tfrag 15) +(def-tex wascity-stonewall-bricks wascityb-vis-tfrag 16) +(def-tex wascity-metal-indent wascityb-vis-tfrag 17) +(def-tex wascity-stucco-wall-supports-end wascityb-vis-tfrag 18) +(def-tex wascity-stucco-wall-supports wascityb-vis-tfrag 19) +(def-tex wascity-metal-pole wascityb-vis-tfrag 20) +(def-tex wascity-wall-canister wascityb-vis-tfrag 21) +(def-tex wascitya-stone-top wascityb-vis-tfrag 22) +(def-tex wascitya-stone-bottom wascityb-vis-tfrag 23) +(def-tex wascitya-redish-metal wascityb-vis-tfrag 24) +(def-tex wascity-metal-wall-base-plate wascityb-vis-tfrag 25) +(def-tex wascity-outerwall-metal-c wascityb-vis-tfrag 26) +(def-tex wascity-stucco-wall-bleached-edge-01 wascityb-vis-tfrag 27) +(def-tex wascity-wall-weathered wascityb-vis-tfrag 28) +(def-tex wascity-stonewall-bricks-HI wascityb-vis-tfrag 29) +(def-tex wascity-metal-piece-03 wascityb-vis-tfrag 30) +(def-tex wascity-stucco-wall-bleached-2-broken wascityb-vis-tfrag 31) +(def-tex wascity-ditch-wall-top-to-ground wascityb-vis-tfrag 32) +(def-tex wascity-ground-2-ditch-04 wascityb-vis-tfrag 33) +(def-tex wascity-ground-01 wascityb-vis-tfrag 34) +(def-tex wascity-ground-2-ditch-03 wascityb-vis-tfrag 35) +(def-tex wascity-ground-2-ditch-05 wascityb-vis-tfrag 36) +(def-tex wascity-rock-small wascityb-vis-tfrag 37) +(def-tex wascity-ocean-shore-rocks wascityb-vis-tfrag 38) +(def-tex wascity-ground2ocean-shore-rocks wascityb-vis-tfrag 39) +(def-tex wascity-palm-trunk wascityb-vis-tfrag 40) +(def-tex wascity-palm-leaf-worn wascityb-vis-tfrag 41) +(def-tex wascity-palm-beard wascityb-vis-tfrag 42) +(def-tex wascity-wood-plain wascityb-vis-tfrag 43) +(def-tex city-port-bigpipe-ring-side wascityb-vis-tfrag 44) +(def-tex wascity-cement-road wascityb-vis-tfrag 45) +(def-tex wascity-torch-tank wascityb-vis-tfrag 46) +(def-tex wascity-outerwall-metal-b wascityb-vis-tfrag 47) +(def-tex wascity-ditch-wall-top-to-ground-edging wascityb-vis-tfrag 48) +(def-tex wascity-ditch-wall-top-to-beach wascityb-vis-tfrag 49) +(def-tex wascity-beach-01 wascityb-vis-tfrag 50) +(def-tex wascity-beach-wet-02 wascityb-vis-tfrag 51) +(def-tex wascity-beach-wet-01 wascityb-vis-tfrag 52) +(def-tex common-gray-dark wascityb-vis-tfrag 62) +(def-tex city-slum-burning-can wascityb-vis-tfrag 63) +(def-tex city-slum-wood-plain wascityb-vis-tfrag 68) +(def-tex environment-oldmetal wascityb-vis-tfrag 70) +(def-tex wascityskeet-center wascityb-vis-tfrag 71) +(def-tex wascityskeet-clay wascityb-vis-tfrag 72) +(def-tex wascityskeet-blade wascityb-vis-tfrag 73) +(def-tex wascity-metal-ladder-rung wascityb-vis-tfrag 74) +(def-tex wascity-satellite-piece-01 wascityb-vis-tfrag 75) +(def-tex wascityskeet-clay-silver wascityb-vis-tfrag 76) +(def-tex wascityskeet-clay-gold wascityb-vis-tfrag 77) +(def-tex wascityskeet-center-blue wascityb-vis-tfrag 78) +(def-tex wascityskeet-center-green wascityb-vis-tfrag 79) +(def-tex city-slum-medpipe-02 wascityb-vis-tfrag 85) +(def-tex city-slum-medpipe-01 wascityb-vis-tfrag 86) +(def-tex wascity-roof-1 wascityb-vis-tfrag 87) +(def-tex wascity-chimney-hires wascityb-vis-tfrag 88) +(def-tex wascity-steps wascityb-vis-tfrag 89) +(def-tex wascity-window-glass-01 wascityb-vis-water 0) +(def-tex common-water-canal wascityb-vis-water 2) +(def-tex wascity-stain-window-01 wascityb-vis-shrub 0) +(def-tex wascity-overlay-bullethole-a wascityb-vis-shrub 1) +(def-tex wascity-overlay-bullethole-b wascityb-vis-shrub 2) +(def-tex wascity-overlay-bullethole-c wascityb-vis-shrub 3) +(def-tex wascity-blotch-withstreaks-01 wascityb-vis-shrub 4) +(def-tex wascity-steel-bar wascityb-vis-shrub 5) +(def-tex wascity-stain-wall-01 wascityb-vis-shrub 6) +(def-tex wascity-ditch-wall-top-to-ground wascityb-vis-shrub 7) +(def-tex wascity-shrub-orange-01 wascityb-vis-shrub 8) +(def-tex wascity-ground-stain-01 wascityb-vis-shrub 9) +(def-tex wascity-overlay-tribal-1 wascityb-vis-shrub 10) +(def-tex wascity-overlay-tribal-3 wascityb-vis-shrub 11) +(def-tex wascity-overlay-crack wascityb-vis-shrub 12) +(def-tex wascitya-stone-top wascityb-vis-shrub 13) +(def-tex wascity-cactus-green wascityb-vis-shrub 14) +(def-tex wascity-cactus-flower wascityb-vis-shrub 15) +(def-tex wascity-ground-stain-satellite-01 wascityb-vis-shrub 16) +(def-tex wascity-awning-b wascityb-vis-shrub 17) +(def-tex wascity-outerwall-metal-c wascityb-vis-pris 0) +(def-tex common-black wascityb-vis-pris 1) +(def-tex drill-turret-control-02 wascityb-vis-pris 2) +(def-tex wascity-metal-door-01 wascityb-vis-pris 3) +(def-tex wascity-metal-indent wascityb-vis-pris 4) +(def-tex wascity-outerwall-metal wascityb-vis-pris 5) +(def-tex wascity-outerwall-metal-b wascityb-vis-pris 6) +(def-tex wascity-steel-bar wascityb-vis-pris 7) +(def-tex wascity-wall-canister wascityb-vis-pris 8) +(def-tex wascitya-redish-metal wascityb-vis-pris 9) +(def-tex wst-plain-metal wascityb-vis-pris 10) +(def-tex wst-turret-barrel wascityb-vis-pris 11) +(def-tex wst-turret-side wascityb-vis-pris 12) +(def-tex gekko-body wascityb-vis-pris 13) +(def-tex gekko-eye-01 wascityb-vis-pris 14) +(def-tex gekko-fingers wascityb-vis-pris 15) +(def-tex gekko-hose wascityb-vis-pris 16) +(def-tex gekko-laser wascityb-vis-pris 17) +(def-tex gekko-laserbarrel wascityb-vis-pris 18) +(def-tex gekko-metal-01 wascityb-vis-pris 19) +(def-tex gekko-nails wascityb-vis-pris 20) +(def-tex gekko-tubes wascityb-vis-pris 21) +(def-tex city-mark-clay-pot-01 wascityb-vis-pris 22) +(def-tex city-mark-cotton-32x32 wascityb-vis-pris 23) +(def-tex city-mark-cotton-wrap wascityb-vis-pris 24) +(def-tex city-mark-rope-mesh-01 wascityb-vis-pris 25) +(def-tex city-mark-basket2 wascityb-vis-pris 26) +(def-tex city-mark-rice-01 wascityb-vis-pris 27) +(def-tex city-mark-wood-plain wascityb-vis-pris 28) +(def-tex city-mark-rope-01 wascityb-vis-pris 29) +(def-tex was-tizard-beak wascityb-vis-pris 30) +(def-tex was-tizard-body wascityb-vis-pris 31) +(def-tex was-tizard-face wascityb-vis-pris 32) +(def-tex was-tizard-facefin wascityb-vis-pris 33) +(def-tex was-tizard-fin wascityb-vis-pris 34) +(def-tex was-tizard-hair wascityb-vis-pris 35) +(def-tex was-tizard-nail wascityb-vis-pris 36) +(def-tex was-dogat-body wascityb-vis-pris 37) +(def-tex was-dogat-face wascityb-vis-pris 38) +(def-tex was-dogat-nose wascityb-vis-pris 39) +(def-tex was-dogat-tail wascityb-vis-pris 40) +(def-tex was-kangalizard-body wascityb-vis-pris 41) +(def-tex was-kangalizard-body-bottom wascityb-vis-pris 42) +(def-tex was-kangalizard-face wascityb-vis-pris 43) +(def-tex was-kangalizard-fin wascityb-vis-pris 44) +(def-tex tentacle-01 wascityb-vis-pris 49) +(def-tex tentacle-02 wascityb-vis-pris 50) +(def-tex waspala-corgmetal waspala-tfrag 4) +(def-tex waspala-blue-01 waspala-tfrag 16) +(def-tex waspala-red-01 waspala-tfrag 17) +(def-tex waspala-yellow-01 waspala-tfrag 18) +(def-tex common-black waspala-tfrag 23) +(def-tex waspala-metal-plate01 waspala-tfrag 25) +(def-tex waspala-metal-plate02 waspala-tfrag 26) +(def-tex waspala-metal-bar waspala-tfrag 27) +(def-tex waspala-fire-holder01 waspala-tfrag 28) +(def-tex waspala-fire-holder02 waspala-tfrag 29) +(def-tex waspala-column-plate waspala-tfrag 30) +(def-tex waspala-fountain-bar waspala-tfrag 31) +(def-tex waspala-column-01 waspala-tfrag 32) +(def-tex waspala-column-02 waspala-tfrag 33) +(def-tex waspala-fire-holder03 waspala-tfrag 34) +(def-tex waspala-cliff-rock-top waspala-tfrag 35) +(def-tex waspala-cliff-rock-02 waspala-tfrag 36) +(def-tex waspala-cliff-rock-01 waspala-tfrag 37) +(def-tex waspala-column-base waspala-tfrag 38) +(def-tex waspala-fire-holder04 waspala-tfrag 39) +(def-tex waspala-column-piece waspala-tfrag 40) +(def-tex waspala-window-frame waspala-tfrag 41) +(def-tex waspala-elevator-metal waspala-tfrag 42) +(def-tex waspala-elevator-metal-plate waspala-tfrag 43) +(def-tex waspala-elevator-tube waspala-tfrag 44) +(def-tex waspala-elevator-cable waspala-tfrag 45) +(def-tex waspala-pool-floor waspala-tfrag 46) +(def-tex waspala-elevator-shaft waspala-tfrag 47) +(def-tex waspala-chain-anchor waspala-tfrag 48) +(def-tex waspala-fountain-base01 waspala-tfrag 49) +(def-tex waspala-step-02 waspala-tfrag 51) +(def-tex waspala-step-top waspala-tfrag 52) +(def-tex waspala-fountain-base02 waspala-tfrag 54) +(def-tex waspala-stage-tile waspala-tfrag 55) +(def-tex waspala-stage-step waspala-tfrag 56) +(def-tex waspala-metal-plate03 waspala-tfrag 57) +(def-tex waspala-step-01 waspala-tfrag 58) +(def-tex waspala-throne-base waspala-tfrag 59) +(def-tex waspala-throne-bolt waspala-tfrag 60) +(def-tex waspala-stage-end waspala-tfrag 61) +(def-tex waspala-throne-cap waspala-tfrag 62) +(def-tex waspala-throne-cushion waspala-tfrag 63) +(def-tex waspala-fountain-base03 waspala-tfrag 64) +(def-tex waspala-elevator-bolt02 waspala-tfrag 65) +(def-tex waspala-ceiling-frame waspala-tfrag 67) +(def-tex waspala-fire-coal waspala-tfrag 68) +(def-tex waspala-column-03 waspala-tfrag 77) +(def-tex waspala-metal-plate04 waspala-tfrag 78) +(def-tex waspala-palmtree-trunk-01 waspala-tfrag 87) +(def-tex waspala-palmtree-beard waspala-tfrag 88) +(def-tex waspala-branch-01 waspala-tfrag 89) +(def-tex waspala-palmplant-leaf-02 waspala-tfrag 90) +(def-tex waspala-throne-back-03 waspala-tfrag 91) +(def-tex waspala-throne-back-01 waspala-tfrag 92) +(def-tex waspala-throne-back-02 waspala-tfrag 93) +(def-tex waspala-palm-dirt waspala-tfrag 94) +(def-tex waspala-window-side waspala-tfrag 95) +(def-tex waspala-throne-floor waspala-tfrag 96) +(def-tex wascity-outerwall-rock waspala-tfrag 97) +(def-tex waspala-lowres-desert-mount-01 waspala-tfrag 98) +(def-tex common_sandstone_taper01 waspala-tfrag 99) +(def-tex common_sandstone_ground01 waspala-tfrag 100) +(def-tex common_sandstone_trim01 waspala-tfrag 101) +(def-tex common_sandstone_pill01 waspala-tfrag 102) +(def-tex common_sandstone_base01 waspala-tfrag 103) +(def-tex bam-eyelight waspala-pris 0) +(def-tex bam-hairhilite waspala-pris 1) +(def-tex daxter-eyelid waspala-pris 2) +(def-tex daxter-furhilite waspala-pris 3) +(def-tex daxter-orange waspala-pris 4) +(def-tex daxterarm waspala-pris 5) +(def-tex daxterbodyshort-eix waspala-pris 6) +(def-tex daxterbolt waspala-pris 7) +(def-tex daxterear waspala-pris 8) +(def-tex daxterfinger waspala-pris 9) +(def-tex daxterfoot waspala-pris 10) +(def-tex daxterfoot-bottom waspala-pris 11) +(def-tex daxtergoggles waspala-pris 12) +(def-tex daxterheadwidenew waspala-pris 13) +(def-tex daxterhelmetplain waspala-pris 14) +(def-tex daxterlense waspala-pris 15) +(def-tex daxternose waspala-pris 16) +(def-tex daxterteeth waspala-pris 17) +(def-tex daxtertuft waspala-pris 18) +(def-tex waspala-elevator-tube waspala-pris 60) +(def-tex waspala-wheel-edge waspala-pris 61) +(def-tex waspala-wheel-face-01 waspala-pris 62) +(def-tex waspala-wheel-face-02 waspala-pris 63) +(def-tex waspala-wheel-interior waspala-pris 64) +(def-tex waspala-wheel-paddle waspala-pris 65) +(def-tex waspala-wheel-pipe waspala-pris 66) +(def-tex waspala-chain-anchor waspala-pris 76) +(def-tex flatgerydark01 waspala-pris 112) +(def-tex palm-speaker waspala-pris 113) +(def-tex yellowcard01 waspala-pris 114) +(def-tex bam-eyelight waspala-pris2 0) +(def-tex environment-oldmetal waspala-pris2 1) +(def-tex king-arm waspala-pris2 2) +(def-tex king-blackskirt2 waspala-pris2 3) +(def-tex king-bluemetal waspala-pris2 4) +(def-tex king-bolt waspala-pris2 5) +(def-tex king-chest waspala-pris2 6) +(def-tex king-clip-02 waspala-pris2 7) +(def-tex king-ear waspala-pris2 8) +(def-tex king-earing waspala-pris2 9) +(def-tex king-face-01 waspala-pris2 10) +(def-tex king-finger waspala-pris2 11) +(def-tex king-greenmetal waspala-pris2 12) +(def-tex king-greenmetalplain waspala-pris2 13) +(def-tex king-hair waspala-pris2 14) +(def-tex king-hand waspala-pris2 15) +(def-tex king-horn waspala-pris2 16) +(def-tex king-iris waspala-pris2 17) +(def-tex king-leg waspala-pris2 18) +(def-tex king-lgblackstrap waspala-pris2 19) +(def-tex king-precursermetal-decor waspala-pris2 20) +(def-tex king-precursermetal-plain waspala-pris2 21) +(def-tex king-precursermetal-trim waspala-pris2 22) +(def-tex king-precursermetal-trim2 waspala-pris2 23) +(def-tex king-precursermetal-trimbolt waspala-pris2 24) +(def-tex king-shoebottom waspala-pris2 25) +(def-tex king-skirt waspala-pris2 26) +(def-tex king-teeth waspala-pris2 27) +(def-tex king-thinstrap waspala-pris2 28) +(def-tex king-vest waspala-pris2 29) +(def-tex king-vestback waspala-pris2 30) +(def-tex king-wrap waspala-pris2 31) +(def-tex king-wraps waspala-pris2 32) +(def-tex king-wristband waspala-pris2 33) +(def-tex king-skirt-b waspala-pris2 64) +(def-tex wascity-outerwall-rock waswide-vis-tfrag 0) +(def-tex wascity-steel-bar waswide-vis-tfrag 5) +(def-tex wascitya-flag-a waswide-vis-tfrag 6) +(def-tex wascitya-flag-b waswide-vis-tfrag 7) +(def-tex wascity-metal-piece-02 waswide-vis-tfrag 8) +(def-tex wascitya-flag-c waswide-vis-tfrag 9) +(def-tex wascitya-flag-d waswide-vis-tfrag 10) +(def-tex wascity-outerwall-metal-b waswide-vis-tfrag 12) +(def-tex wascity-metal-dirty waswide-vis-tfrag 14) +(def-tex wascity-outerwall-metal-d waswide-vis-tfrag 17) +(def-tex wascity-metal-indent waswide-vis-tfrag 18) +(def-tex wascity-metal-fan waswide-vis-tfrag 19) +(def-tex wascity-metal-door-01 waswide-vis-tfrag 20) +(def-tex wascity-cement-road waswide-vis-tfrag 21) +(def-tex wascity-palace-siding-01 waswide-vis-tfrag 22) +(def-tex was-burningbush-02 waswide-vis-tfrag 23) +(def-tex was-burningbush-light-01 waswide-vis-tfrag 24) +(def-tex was-burningbush-03 waswide-vis-tfrag 25) +(def-tex was-burningbush-01 waswide-vis-tfrag 26) +(def-tex was-burningbush-04 waswide-vis-tfrag 27) +(def-tex citn-allleatherstrap waswide-vis-pris 34) +(def-tex environment-oldmetal waswide-vis-pris 38) +(def-tex metalflut-eye waswide-vis-pris 39) +(def-tex metalflut-leatherstrap-b-01 waswide-vis-pris 40) +(def-tex metalflut-leatherstrap-c waswide-vis-pris 41) +(def-tex metalflut-nail waswide-vis-pris 42) +(def-tex metalflut-plates-02 waswide-vis-pris 43) +(def-tex metalflut-rings waswide-vis-pris 44) +(def-tex metalflut-roll waswide-vis-pris 45) +(def-tex metalflut-saddle waswide-vis-pris 46) +(def-tex metalflut-saddlehang waswide-vis-pris 47) +(def-tex metalflut-saddleseat waswide-vis-pris 48) +(def-tex metalflut-skin-01 waswide-vis-pris 49) +(def-tex metalflut-skin-02 waswide-vis-pris 50) +(def-tex metalflut-wrap waswide-vis-pris 51) +(def-tex wstlander-01-eye waswide-vis-pris 52) +(def-tex wstlander-01-gunmetal-01 waswide-vis-pris 53) +(def-tex wstlander-01-gunmetal-02 waswide-vis-pris 54) +(def-tex wstlander-01-gunmetal-03 waswide-vis-pris 55) +(def-tex wstlander-01-gunmetal-04 waswide-vis-pris 56) +(def-tex wstlander-01-head waswide-vis-pris 57) +(def-tex wstlander-01-leatherstrap waswide-vis-pris 58) +(def-tex wstlander-01-mustache waswide-vis-pris 59) +(def-tex wstlander-01-pants waswide-vis-pris 60) +(def-tex wstlander-01-shoebottom waswide-vis-pris 61) +(def-tex wstlander-01-shoetop waswide-vis-pris 62) +(def-tex wstlander-01-shoulderarmor waswide-vis-pris 63) +(def-tex wstlander-01-skirt waswide-vis-pris 64) +(def-tex wstlander-01-wrap waswide-vis-pris 65) +(def-tex wstlander-02-arm waswide-vis-pris 66) +(def-tex wstlander-02-armor waswide-vis-pris 67) +(def-tex wstlander-02-belt waswide-vis-pris 68) +(def-tex wstlander-02-bootheel waswide-vis-pris 69) +(def-tex wstlander-02-eye waswide-vis-pris 70) +(def-tex wstlander-02-glove waswide-vis-pris 71) +(def-tex wstlander-02-head waswide-vis-pris 72) +(def-tex wstlander-02-ponytail waswide-vis-pris 73) +(def-tex wstlander-02-scarf waswide-vis-pris 74) +(def-tex wstlander-02-shirt waswide-vis-pris 75) +(def-tex wstlander-02-skirt waswide-vis-pris 76) +(def-tex wstlander-03-eye waswide-vis-pris 77) +(def-tex wstlander-03-flesh waswide-vis-pris 78) +(def-tex wstlander-04-dark-blue waswide-vis-pris 79) +(def-tex wstlander-04-gun waswide-vis-pris 80) +(def-tex wstlander-04-headband waswide-vis-pris 81) +(def-tex wstlander-04-shirt waswide-vis-pris 82) +(def-tex wstlander-04-shirt-strap waswide-vis-pris 83) +(def-tex wstlander-04-skirt waswide-vis-pris 84) +(def-tex wstlanderchic-blackstrap waswide-vis-pris 85) +(def-tex wstlanderchic-blackstrapplain waswide-vis-pris 86) +(def-tex wstlanderchic-bootarmor waswide-vis-pris 87) +(def-tex wstlanderchic-bootleg waswide-vis-pris 88) +(def-tex wstlanderchic-corset waswide-vis-pris 89) +(def-tex wstlanderchic-eye waswide-vis-pris 90) +(def-tex wstlanderchic-flesh waswide-vis-pris 91) +(def-tex wstlanderchic-hair waswide-vis-pris 92) +(def-tex wstlanderchic-hairtop waswide-vis-pris 93) +(def-tex wstlanderchic-legwrap2 waswide-vis-pris 94) +(def-tex wstlanderchic-pants waswide-vis-pris 95) +(def-tex wstlanderchic-shirt waswide-vis-pris 96) +(def-tex wstlanderchic-shirtb waswide-vis-pris 97) +(def-tex wstlanderchic-shoetop waswide-vis-pris 98) +(def-tex wstlanderchic-shoetopb waswide-vis-pris 99) +(def-tex wstlanderchic-skirt waswide-vis-pris 100) +(def-tex hiphog-daxter-neon-off hiphog-sprite 0) +(def-tex hiphog-daxter-neon-on hiphog-sprite 1) +(def-tex hiphog-mirror hiphog-sprite 2) +(def-tex hiphog-neon-clock-hand hiphog-sprite 6) +(def-tex hiphog-neon-clock-hand-small hiphog-sprite 7) +(def-tex hiphog-neon-clock-moon hiphog-sprite 8) +(def-tex hiphog-neon-clock-moon-small hiphog-sprite 9) +(def-tex hiphog-neon-clock-sun hiphog-sprite 10) +(def-tex hiphog-neon-clock-sun-small hiphog-sprite 11) +(def-tex vinroom-tv-circle hiphog-sprite 66) +(def-tex holo-line hiphog-sprite 67) +(def-tex dust-sparkle hiphog-sprite 69) +(def-tex vinroom-tv-text-a hiphog-sprite 70) +(def-tex vinroom-tv-text-g hiphog-sprite 71) +(def-tex vinroom-tv-text-m hiphog-sprite 72) +(def-tex vinroom-tv-text-n hiphog-sprite 73) +(def-tex vinroom-tv-text-o hiphog-sprite 74) +(def-tex vinroom-tv-text-r hiphog-sprite 75) +(def-tex screen-00 hiphog-sprite 76) +(def-tex screen-01 hiphog-sprite 77) +(def-tex screen-02 hiphog-sprite 78) +(def-tex screen-03 hiphog-sprite 79) +(def-tex screen-04 hiphog-sprite 80) +(def-tex screen-05 hiphog-sprite 81) +(def-tex screen-06 hiphog-sprite 82) +(def-tex screen-07 hiphog-sprite 83) +(def-tex screen-08 hiphog-sprite 84) +(def-tex screen-09 hiphog-sprite 85) +(def-tex screen-10 hiphog-sprite 86) +(def-tex screen-11 hiphog-sprite 87) +(def-tex screen-12 hiphog-sprite 88) +(def-tex screen-13 hiphog-sprite 89) +(def-tex screen-14 hiphog-sprite 90) +(def-tex screen-15 hiphog-sprite 91) +(def-tex vinroom-tv-radar hiphog-sprite 92) +(def-tex vinroom-small-monitor-01 hiphog-sprite 93) +(def-tex vinroom-small-monitor-02 hiphog-sprite 94) +(def-tex vinroom-small-monitor-03 hiphog-sprite 95) +(def-tex vinroom-small-monitor-04 hiphog-sprite 96) +(def-tex vinroom-small-monitor-05 hiphog-sprite 97) +(def-tex vinroom-small-monitor-06 hiphog-sprite 98) +(def-tex vinroom-small-monitor-07 hiphog-sprite 99) +(def-tex vinroom-small-monitor-08 hiphog-sprite 100) +(def-tex twirl hiphog-sprite 102) +(def-tex blue-panel hiphog-sprite 103) +(def-tex mina-idol-01-noalpha minea-vis-tfrag 1) +(def-tex mina-idol-02-noalpha minea-vis-tfrag 2) +(def-tex mina-idol-02 minea-vis-tfrag 3) +(def-tex min-env-mar-01 minea-vis-tfrag 5) +(def-tex minb-rock01 minea-vis-tfrag 6) +(def-tex minc-crate-02 minea-vis-tfrag 7) +(def-tex minc-blue-paint-rust01 minea-vis-tfrag 8) +(def-tex minc-blue-paint-01 minea-vis-tfrag 9) +(def-tex minc-yel-paint-rust01 minea-vis-tfrag 10) +(def-tex minc-blue-paint-rust02 minea-vis-tfrag 11) +(def-tex minc-rust-bars-01 minea-vis-tfrag 12) +(def-tex minc-rust-01 minea-vis-tfrag 13) +(def-tex minc-grill-01 minea-vis-tfrag 14) +(def-tex minc-blue-paint-rust04 minea-vis-tfrag 15) +(def-tex minc-safe-plate-01 minea-vis-tfrag 16) +(def-tex minb-rock-floor01 minea-vis-tfrag 19) +(def-tex minb-brok-floor minea-vis-tfrag 21) +(def-tex minb-brok-edge-02 minea-vis-tfrag 22) +(def-tex minb-stone23 minea-vis-tfrag 23) +(def-tex minb-stone22 minea-vis-tfrag 24) +(def-tex minb-stone26 minea-vis-tfrag 25) +(def-tex minb-stone15 minea-vis-tfrag 26) +(def-tex minb-stone11 minea-vis-tfrag 27) +(def-tex minb-stone20 minea-vis-tfrag 28) +(def-tex minb-stone-edge minea-vis-tfrag 29) +(def-tex minb-stone12 minea-vis-tfrag 30) +(def-tex minb-stone21 minea-vis-tfrag 31) +(def-tex minc-base-metal-platfrom-01 minea-vis-tfrag 33) +(def-tex minc-metal-patch-01 minea-vis-tfrag 34) +(def-tex minc-door-metal-01 minea-vis-tfrag 35) +(def-tex minc-train-pipe-cap-02 minea-vis-tfrag 36) +(def-tex minc-blue-paint-rust05 minea-vis-tfrag 37) +(def-tex minc-blue-paint-rust03 minea-vis-tfrag 38) +(def-tex minc-light minea-vis-tfrag 39) +(def-tex minc-train-pipe-01 minea-vis-tfrag 40) +(def-tex minc-rust-pipe-04 minea-vis-tfrag 41) +(def-tex minc-rust-pipe-03 minea-vis-tfrag 42) +(def-tex minb-stone14 minea-vis-tfrag 43) +(def-tex minc-strut-01 minea-vis-tfrag 44) +(def-tex minc-chain-metal-01 minea-vis-tfrag 45) +(def-tex minc-red-paint-02 minea-vis-tfrag 46) +(def-tex minc-ox-pipe-01 minea-vis-tfrag 47) +(def-tex minc-01 minea-vis-tfrag 50) +(def-tex minc-pre-10 minea-vis-tfrag 51) +(def-tex minc-pre-04 minea-vis-tfrag 52) +(def-tex minc-pre-11 minea-vis-tfrag 53) +(def-tex minc-door-metal-03 minea-vis-tfrag 54) +(def-tex minc-door-metal-07 minea-vis-tfrag 55) +(def-tex minc-slab-03 minea-vis-tfrag 56) +(def-tex minb-stone25 minea-vis-tfrag 57) +(def-tex minc-door-metal-01 minea-vis-pris 7) +(def-tex minc-rust-01 minea-vis-pris 8) +(def-tex minc-safe-plate-01 minea-vis-pris 12) +(def-tex bam-eyelight minea-vis-pris 14) +(def-tex bam-hairhilite minea-vis-pris 24) +(def-tex daxter-eyelid minea-vis-pris 25) +(def-tex daxter-furhilite minea-vis-pris 26) +(def-tex daxter-orange minea-vis-pris 27) +(def-tex daxterarm minea-vis-pris 28) +(def-tex daxterbodyshort-eix minea-vis-pris 29) +(def-tex daxterbolt minea-vis-pris 30) +(def-tex daxterear minea-vis-pris 31) +(def-tex daxterfinger minea-vis-pris 32) +(def-tex daxterfoot minea-vis-pris 33) +(def-tex daxterfoot-bottom minea-vis-pris 34) +(def-tex daxtergoggles minea-vis-pris 35) +(def-tex daxterheadwidenew minea-vis-pris 36) +(def-tex daxterhelmetplain minea-vis-pris 37) +(def-tex daxterlense minea-vis-pris 38) +(def-tex daxternose minea-vis-pris 39) +(def-tex daxterteeth minea-vis-pris 40) +(def-tex daxtertuft minea-vis-pris 41) +(def-tex environment-oldmetal minea-vis-pris 42) +(def-tex minc-rust-pipe-06 minea-vis-pris 71) +(def-tex mine-can-metal-01 minea-vis-pris 81) +(def-tex mine-caution-metal-01 minea-vis-pris 82) +(def-tex mine-decal-metal-01 minea-vis-pris 83) +(def-tex mine-gray-metal-01 minea-vis-pris 84) +(def-tex mine-pipe-metal-01 minea-vis-pris 85) +(def-tex mine-red-big-metal-01 minea-vis-pris 86) +(def-tex mine-red-metal-01 minea-vis-pris 87) +(def-tex mine-red-stripe-metal-01 minea-vis-pris 88) +(def-tex mine-red-white-metal-01 minea-vis-pris 89) +(def-tex mine-under-metal-01 minea-vis-pris 90) +(def-tex mine-white-stripe-metal-01 minea-vis-pris 91) +(def-tex mine-blue-metal-01 minea-vis-pris 92) +(def-tex mine-metal-wheel-01 minea-vis-pris 93) +(def-tex mine-red-paint-rust05 minea-vis-pris 94) +(def-tex mine-rust-01 minea-vis-pris 95) +(def-tex mine-slate-metal-01 minea-vis-pris 96) +(def-tex jakc-armor minea-vis-pris 97) +(def-tex jakc-chestplate-straps minea-vis-pris 98) +(def-tex jakc-gogglemetal minea-vis-pris 99) +(def-tex jakc-lens minea-vis-pris 100) +(def-tex jakc-scarf minea-vis-pris 101) +(def-tex jakc-waistband2 minea-vis-pris 102) +(def-tex jakc-wraps minea-vis-pris 103) +(def-tex jakc-wristband-a2 minea-vis-pris 104) +(def-tex jakchires-arm minea-vis-pris 105) +(def-tex jakchires-blackstrap minea-vis-pris 106) +(def-tex jakchires-brownstrap minea-vis-pris 107) +(def-tex jakchires-brwnleather minea-vis-pris 108) +(def-tex jakchires-chestplate minea-vis-pris 109) +(def-tex jakchires-clips minea-vis-pris 110) +(def-tex jakchires-eye minea-vis-pris 111) +(def-tex jakchires-eyebrow minea-vis-pris 112) +(def-tex jakchires-eyelid minea-vis-pris 113) +(def-tex jakchires-facelft minea-vis-pris 114) +(def-tex jakchires-facert minea-vis-pris 115) +(def-tex jakchires-glovetop minea-vis-pris 116) +(def-tex jakchires-hair minea-vis-pris 117) +(def-tex jakchires-horn minea-vis-pris 118) +(def-tex jakchires-jacket minea-vis-pris 119) +(def-tex jakchires-leatherpouch minea-vis-pris 120) +(def-tex jakchires-lightbrownspat minea-vis-pris 121) +(def-tex jakchires-pants minea-vis-pris 122) +(def-tex jakchires-precarmor-01 minea-vis-pris 123) +(def-tex jakchires-shoebottom minea-vis-pris 124) +(def-tex jakchires-shoemetal minea-vis-pris 125) +(def-tex jakchires-shoeteop minea-vis-pris 126) +(def-tex jakchires-teeth minea-vis-pris 127) +(def-tex jakc-scarfhanging minea-vis-pris 128) +(def-tex jakc-skirt minea-vis-pris 129) +(def-tex minc-base-metal-platfrom-01 minea-vis-pris 130) +(def-tex minc-bolt minea-vis-pris 131) +(def-tex minc-rust-02 minea-vis-pris 132) +(def-tex minc-rust-03 minea-vis-pris 133) +(def-tex pecker-body-01 minea-vis-pris 134) +(def-tex pecker-eyelid minea-vis-pris 135) +(def-tex pecker-face minea-vis-pris 136) +(def-tex pecker-plume minea-vis-pris 137) +(def-tex pecker-tail minea-vis-pris 138) +(def-tex pecker-teeth minea-vis-pris 139) +(def-tex pecker-wingbottom minea-vis-pris 140) +(def-tex pecker-wingtop minea-vis-pris 141) +(def-tex pecker-yellowfur minea-vis-pris 142) +(def-tex minb-rock01 mineb-vis-tfrag 0) +(def-tex minc-cliff-face-01 mineb-vis-tfrag 1) +(def-tex minb-stone-brick mineb-vis-tfrag 2) +(def-tex minb-stone12 mineb-vis-tfrag 3) +(def-tex minb-stone11 mineb-vis-tfrag 4) +(def-tex minb-stone17 mineb-vis-tfrag 5) +(def-tex minb-stone09 mineb-vis-tfrag 6) +(def-tex minc-rust-pipe-04 mineb-vis-tfrag 8) +(def-tex minc-rust-pipe-03 mineb-vis-tfrag 9) +(def-tex minc-blue-paint-rust01 mineb-vis-tfrag 10) +(def-tex minc-blue-paint-rust02 mineb-vis-tfrag 11) +(def-tex minb-hang-strut-metl-01 mineb-vis-tfrag 12) +(def-tex minb-hang-strut-metl-02 mineb-vis-tfrag 13) +(def-tex minb-stone26 mineb-vis-tfrag 14) +(def-tex minb-stone20 mineb-vis-tfrag 15) +(def-tex minb-stone15 mineb-vis-tfrag 16) +(def-tex minb-stone22 mineb-vis-tfrag 17) +(def-tex minb-stone23 mineb-vis-tfrag 18) +(def-tex minb-idol-02 mineb-vis-tfrag 19) +(def-tex minb-stone19 mineb-vis-tfrag 20) +(def-tex minb-stone-edge mineb-vis-tfrag 21) +(def-tex minb-stone00 mineb-vis-tfrag 22) +(def-tex minb-brok-edge-02 mineb-vis-tfrag 23) +(def-tex minb-brok-floor mineb-vis-tfrag 24) +(def-tex minc-light mineb-vis-tfrag 25) +(def-tex minc-platfrom-metal-01 mineb-vis-tfrag 26) +(def-tex minc-rust-01 mineb-vis-tfrag 27) +(def-tex minc-blue-paint-01 mineb-vis-tfrag 28) +(def-tex minc-yel-paint-rust01 mineb-vis-tfrag 29) +(def-tex minc-rust-bars-01 mineb-vis-tfrag 30) +(def-tex minb-stone-tile mineb-vis-tfrag 32) +(def-tex minc-ox-pipe-01 mineb-vis-tfrag 33) +(def-tex minc-chain-metal-01 mineb-vis-tfrag 34) +(def-tex minc-red-paint-02 mineb-vis-tfrag 35) +(def-tex minc-grill-01 mineb-vis-tfrag 36) +(def-tex minc-blue-paint-rust04 mineb-vis-tfrag 37) +(def-tex minc-rust-pipe-05 mineb-vis-tfrag 39) +(def-tex minc-yel-safe-paint-rust01 mineb-vis-tfrag 40) +(def-tex minc-rust-02 mineb-vis-tfrag 41) +(def-tex minc-strut-01 mineb-vis-tfrag 42) +(def-tex minc-safe-plate-01 mineb-vis-tfrag 43) +(def-tex minb-rock-floor01 mineb-vis-tfrag 44) +(def-tex minc-safe-plate-02 mineb-vis-tfrag 45) +(def-tex minc-blue-paint-rust03 mineb-vis-tfrag 46) +(def-tex minb-stone21 mineb-vis-tfrag 47) +(def-tex minc-blue-paint-rust05 mineb-vis-tfrag 48) +(def-tex min-env-mar-01 mineb-vis-tfrag 49) +(def-tex minc-red-paint-01 mineb-vis-tfrag 50) +(def-tex minc-door-metal-03 mineb-vis-tfrag 54) +(def-tex minc-door-metal-01 mineb-vis-tfrag 55) +(def-tex minc-green-paint-02 mineb-vis-tfrag 56) +(def-tex lt-eco-vent-blue-01 mineb-vis-tfrag 57) +(def-tex lt-eco-vent-side-01 mineb-vis-tfrag 58) +(def-tex minc-rust-01 mineb-vis-shrub 0) +(def-tex minc-bolt mineb-vis-shrub 1) +(def-tex minc-light mineb-vis-shrub 2) +(def-tex minc-plate-01 mineb-vis-shrub 3) +(def-tex minb-stone26 mineb-vis-shrub 4) +(def-tex minc-rocky-ground-01 mineb-vis-shrub 5) +(def-tex minb-brok-floor mineb-vis-shrub 6) +(def-tex mine-track-metal1 mineb-vis-shrub 7) +(def-tex minc-metal-wheel-01 mineb-vis-shrub 8) +(def-tex minc-screw-01 mineb-vis-shrub 9) +(def-tex minc-rust-pipe-03 mineb-vis-shrub 10) +(def-tex minc-rust-bars-01 mineb-vis-shrub 11) +(def-tex minc-blue-paint-rust04 mineb-vis-shrub 12) +(def-tex minc-rust-02 mineb-vis-shrub 13) +(def-tex minc-blue-paint-rust01 mineb-vis-shrub 14) +(def-tex minc-safe-plate-01 mineb-vis-shrub 15) +(def-tex minc-blue-yel-paint-safe-rust04 mineb-vis-shrub 16) +(def-tex minc-blue-paint-safe-rust04 mineb-vis-shrub 17) +(def-tex minc-metal-grate-01 mineb-vis-shrub 18) +(def-tex minc-blue-paint-rust02 mineb-vis-shrub 19) +(def-tex minc-yel-safe-paint-rust01 mineb-vis-shrub 20) +(def-tex minc-blue-paint-rust05 mineb-vis-shrub 21) +(def-tex minc-blue-paint-01 mineb-vis-shrub 22) +(def-tex minc-strut-01 mineb-vis-shrub 23) +(def-tex mine-moving-step-top-lod02 mineb-vis-shrub 24) +(def-tex mine-moving-plat-girder mineb-vis-shrub 25) +(def-tex min-rat-mesh-01 mineb-vis-shrub 26) +(def-tex minc-yel-paint-rust01 mineb-vis-shrub 27) +(def-tex minc-yel-paint-wall-01 mineb-vis-shrub 28) +(def-tex mine-falling-elevator-top-lod2 mineb-vis-shrub 29) +(def-tex mine-moving-plat-wheel mineb-vis-shrub 30) +(def-tex mine-moving-plat-drilltip mineb-vis-shrub 31) +(def-tex mine-moving-plat-top-lod1 mineb-vis-shrub 32) +(def-tex minc-chain-metal-01 mineb-vis-shrub 33) +(def-tex minc-blue-white-paint-safe-rust04 mineb-vis-shrub 34) +(def-tex minc-ox-pipe-01 mineb-vis-shrub 35) +(def-tex minc-rust-pipe-04 mineb-vis-shrub 44) +(def-tex minc-rust-pipe-06 mineb-vis-shrub 45) +(def-tex minc-crm-paint-wall-01 mineb-vis-shrub 46) +(def-tex minc-door-metal-03 mineb-vis-shrub 47) +(def-tex manta-eye-01 mineb-vis-pris 0) +(def-tex manta-gem-01 mineb-vis-pris 1) +(def-tex manta-hose mineb-vis-pris 2) +(def-tex manta-laser mineb-vis-pris 3) +(def-tex manta-metal-01 mineb-vis-pris 4) +(def-tex manta-metal-02 mineb-vis-pris 5) +(def-tex manta-skin-01 mineb-vis-pris 6) +(def-tex minc-rust-02 mineb-vis-pris 7) +(def-tex minc-metal-wheel-01 mineb-vis-pris 10) +(def-tex minc-rust-bars-01 mineb-vis-pris 12) +(def-tex minc-train-pipe-02 mineb-vis-pris 17) +(def-tex minc-blue-paint-rust04 mineb-vis-pris 23) +(def-tex bam-eyelight mineb-vis-pris 24) +(def-tex monster-frog-back mineb-vis-pris 25) +(def-tex monster-frog-belly mineb-vis-pris 26) +(def-tex monster-frog-eye mineb-vis-pris 27) +(def-tex monster-frog-fin mineb-vis-pris 28) +(def-tex monster-frog-leg mineb-vis-pris 29) +(def-tex monster-frog-legfront mineb-vis-pris 30) +(def-tex monster-frog-toenails mineb-vis-pris 31) +(def-tex minc-blue-paint-rust01 mineb-vis-pris 33) +(def-tex minc-rust-pipe-05 mineb-vis-pris 35) +(def-tex minc-blue-paint-safe-rust04 mineb-vis-pris 38) +(def-tex minc-light-smallcase mineb-vis-pris 39) +(def-tex minc-metal-grate-01 mineb-vis-pris 40) +(def-tex mincrane-piston-01 mineb-vis-pris 42) +(def-tex min-blue-paint-rust01 mineb-vis-pris 43) +(def-tex min-blue-paint-rust02 mineb-vis-pris 44) +(def-tex min-rat-mesh-01 mineb-vis-pris 45) +(def-tex min-rust-01 mineb-vis-pris 46) +(def-tex min-rust-bars-01 mineb-vis-pris 47) +(def-tex minc-blue-paint-01 mineb-vis-pris 48) +(def-tex minc-blue-paint-rust03 mineb-vis-pris 49) +(def-tex minc-bolt mineb-vis-pris 50) +(def-tex minc-metal-patch-01 mineb-vis-pris 51) +(def-tex minc-metal-platfrom-02 mineb-vis-pris 52) +(def-tex minc-metal-siding-01 mineb-vis-pris 53) +(def-tex minc-strut-01 mineb-vis-pris 54) +(def-tex rat-eartrans mineb-vis-pris 55) +(def-tex rat-eye mineb-vis-pris 56) +(def-tex rat-hair mineb-vis-pris 57) +(def-tex rat-nose mineb-vis-pris 58) +(def-tex rat-sidehair mineb-vis-pris 59) +(def-tex rat-skin mineb-vis-pris 60) +(def-tex rat-teeth mineb-vis-pris 61) +(def-tex mine-can-metal-01 mineb-vis-pris 62) +(def-tex mine-caution-metal-01 mineb-vis-pris 63) +(def-tex mine-decal-metal-01 mineb-vis-pris 64) +(def-tex mine-gray-metal-01 mineb-vis-pris 65) +(def-tex mine-pipe-metal-01 mineb-vis-pris 66) +(def-tex mine-red-big-metal-01 mineb-vis-pris 67) +(def-tex mine-red-metal-01 mineb-vis-pris 68) +(def-tex mine-red-stripe-metal-01 mineb-vis-pris 69) +(def-tex mine-red-white-metal-01 mineb-vis-pris 70) +(def-tex mine-under-metal-01 mineb-vis-pris 71) +(def-tex mine-white-stripe-metal-01 mineb-vis-pris 72) +(def-tex mine-blue-metal-01 mineb-vis-pris 73) +(def-tex mine-metal-wheel-01 mineb-vis-pris 74) +(def-tex mine-red-paint-rust05 mineb-vis-pris 75) +(def-tex mine-rust-01 mineb-vis-pris 76) +(def-tex mine-slate-metal-01 mineb-vis-pris 77) +(def-tex jakchires-precarmor-01 mineb-vis-pris 78) +(def-tex minc-cliff-face-01 minec-vis-tfrag 0) +(def-tex minc-door-metal-01 minec-vis-tfrag 1) +(def-tex minc-train-pipe-cap-02 minec-vis-tfrag 2) +(def-tex minc-base-metal-platfrom-01 minec-vis-tfrag 3) +(def-tex minc-rust-01 minec-vis-tfrag 4) +(def-tex minc-blue-paint-rust02 minec-vis-tfrag 5) +(def-tex minc-blue-paint-rust01 minec-vis-tfrag 6) +(def-tex minc-safe-plate-01 minec-vis-tfrag 7) +(def-tex minc-yel-paint-rust01 minec-vis-tfrag 8) +(def-tex minc-rust-bars-01 minec-vis-tfrag 9) +(def-tex minc-blue-paint-safe-rust04 minec-vis-tfrag 10) +(def-tex minc-rust-02 minec-vis-tfrag 11) +(def-tex minc-blue-yel-paint-safe-rust04 minec-vis-tfrag 12) +(def-tex minc-blue-white-paint-safe-rust04 minec-vis-tfrag 13) +(def-tex minc-blue-paint-01 minec-vis-tfrag 14) +(def-tex minc-chain-metal-01 minec-vis-tfrag 15) +(def-tex minc-red-paint-02 minec-vis-tfrag 16) +(def-tex minc-blue-paint-rust04 minec-vis-tfrag 17) +(def-tex minc-yel-safe-paint-rust01 minec-vis-tfrag 18) +(def-tex minc-strut-01 minec-vis-tfrag 19) +(def-tex minc-light minec-vis-tfrag 20) +(def-tex minc-train-pipe-01 minec-vis-tfrag 21) +(def-tex minc-rust-pipe-04 minec-vis-tfrag 22) +(def-tex minc-rust-pipe-03 minec-vis-tfrag 23) +(def-tex minc-stone minec-vis-tfrag 24) +(def-tex minc-plate-01 minec-vis-tfrag 25) +(def-tex minc-blue-paint-02 minec-vis-tfrag 26) +(def-tex minc-blue-paint-rust03 minec-vis-tfrag 27) +(def-tex minc-crm-paint-wall-01 minec-vis-tfrag 28) +(def-tex mina-idol-02 minec-vis-tfrag 29) +(def-tex mina-idol-01 minec-vis-tfrag 30) +(def-tex minc-metal-patch-01 minec-vis-tfrag 31) +(def-tex minc-yel-paint-wall-01 minec-vis-tfrag 32) +(def-tex minc-grill-01 minec-vis-tfrag 33) +(def-tex minb-stone26 minec-vis-tfrag 34) +(def-tex minb-stone-edge minec-vis-tfrag 35) +(def-tex minb-stone20 minec-vis-tfrag 36) +(def-tex minb-stone-tile minec-vis-tfrag 37) +(def-tex minb-stone19 minec-vis-tfrag 38) +(def-tex minc-crate-02 minec-vis-tfrag 39) +(def-tex minc-rocky-ground-01 minec-vis-tfrag 44) +(def-tex minc-rocky-ground-02 minec-vis-tfrag 45) +(def-tex minc-blue-paint-rust05 minec-vis-tfrag 46) +(def-tex minc-rocky-cliff-02 minec-vis-tfrag 47) +(def-tex minc-slab-01 minec-vis-tfrag 48) +(def-tex minc-rocky-cliff-01 minec-vis-tfrag 49) +(def-tex minc-safe-plate-02 minec-vis-tfrag 53) +(def-tex min-env-mar-01 minec-vis-tfrag 55) +(def-tex mina-idol-01-noalpha minec-vis-tfrag 59) +(def-tex mina-idol-02-noalpha minec-vis-tfrag 61) +(def-tex fora-citywall-frame minec-vis-tfrag 62) +(def-tex fora-citywall minec-vis-tfrag 63) +(def-tex fora-metal-wallgrill minec-vis-tfrag 64) +(def-tex fora-metal-green-main minec-vis-tfrag 65) +(def-tex fora-metal-green-02 minec-vis-tfrag 66) +(def-tex fora-roof-support minec-vis-tfrag 67) +(def-tex fora-stone-05 minec-vis-tfrag 68) +(def-tex fora-endblocks minec-vis-tfrag 69) +(def-tex fora-supportmetall minec-vis-tfrag 70) +(def-tex minc-safe-slide01 minec-vis-tfrag 77) +(def-tex minc-train-pipe-cap-01 minec-vis-tfrag 78) +(def-tex minc-slab-01a minec-vis-tfrag 80) +(def-tex minc-ox-pipe-01 minec-vis-tfrag 81) +(def-tex minc-light-blue minec-vis-tfrag 82) +(def-tex minc-brick-wall-01 minec-vis-tfrag 83) +(def-tex lt-eco-vent-blue-01 minec-vis-tfrag 84) +(def-tex lt-eco-vent-side-01 minec-vis-tfrag 85) +(def-tex minc-bolt minec-vis-shrub 0) +(def-tex minc-light minec-vis-shrub 1) +(def-tex minc-plate-01 minec-vis-shrub 2) +(def-tex minc-rocky-ground-01 minec-vis-shrub 3) +(def-tex minc-grass-ill-01 minec-vis-shrub 4) +(def-tex minc-rust-01 minec-vis-shrub 5) +(def-tex minc-blue-paint-rust04 minec-vis-shrub 6) +(def-tex minc-strut-01 minec-vis-shrub 7) +(def-tex minc-rust-pipe-03 minec-vis-shrub 8) +(def-tex minc-platfrom-metal-01 minec-vis-shrub 9) +(def-tex minc-blue-paint-rust01 minec-vis-shrub 10) +(def-tex minc-rust-bars-01 minec-vis-shrub 11) +(def-tex minc-blue-paint-01 minec-vis-shrub 12) +(def-tex minc-safe-plate-01 minec-vis-shrub 13) +(def-tex minc-falngplat-lorez minec-vis-shrub 14) +(def-tex minc-blue-paint-rust02 minec-vis-shrub 15) +(def-tex minc-yel-safe-paint-rust01 minec-vis-shrub 16) +(def-tex minc-rust-02 minec-vis-shrub 17) +(def-tex minc-blue-paint-02 minec-vis-shrub 18) +(def-tex minc-blue-white-paint-safe-rust04 minec-vis-shrub 19) +(def-tex minc-blue-yel-paint-safe-rust04 minec-vis-shrub 20) +(def-tex minc-yel-paint-rust01 minec-vis-shrub 21) +(def-tex minc-blue-paint-safe-rust04 minec-vis-shrub 22) +(def-tex minc-metal-grate-01 minec-vis-shrub 23) +(def-tex minc-blue-paint-rust05 minec-vis-shrub 24) +(def-tex mine-moving-step-top-lod02 minec-vis-shrub 25) +(def-tex minc-screw-01 minec-vis-shrub 26) +(def-tex minc-rust-pipe-07 minec-vis-shrub 27) +(def-tex minc-light-gray minec-vis-shrub 28) +(def-tex minc-light-red minec-vis-shrub 29) +(def-tex minc-light-blue minec-vis-shrub 30) +(def-tex gekko-body minec-vis-pris 0) +(def-tex gekko-eye-01 minec-vis-pris 1) +(def-tex gekko-fingers minec-vis-pris 2) +(def-tex gekko-hose minec-vis-pris 3) +(def-tex gekko-laser minec-vis-pris 4) +(def-tex gekko-laserbarrel minec-vis-pris 5) +(def-tex gekko-metal-01 minec-vis-pris 6) +(def-tex gekko-nails minec-vis-pris 7) +(def-tex gekko-tubes minec-vis-pris 8) +(def-tex grunt-eye-01 minec-vis-pris 9) +(def-tex grunt-gem-01 minec-vis-pris 10) +(def-tex grunt-hose minec-vis-pris 11) +(def-tex grunt-metal-01 minec-vis-pris 12) +(def-tex grunt-skin-01 minec-vis-pris 13) +(def-tex grunt-skin-02 minec-vis-pris 14) +(def-tex grunt-skin-03 minec-vis-pris 15) +(def-tex grunt-teeth-01 minec-vis-pris 16) +(def-tex manta-eye-01 minec-vis-pris 17) +(def-tex manta-gem-01 minec-vis-pris 18) +(def-tex manta-hose minec-vis-pris 19) +(def-tex manta-laser minec-vis-pris 20) +(def-tex manta-metal-01 minec-vis-pris 21) +(def-tex manta-metal-02 minec-vis-pris 22) +(def-tex manta-skin-01 minec-vis-pris 23) +(def-tex minc-blue-paint-rust01 minec-vis-pris 27) +(def-tex minc-door-metal-01 minec-vis-pris 29) +(def-tex minc-rust-01 minec-vis-pris 30) +(def-tex minc-blue-paint-rust02 minec-vis-pris 36) +(def-tex minc-plate-01 minec-vis-pris 37) +(def-tex bam-eyelight minec-vis-pris 60) +(def-tex cguard1-backmetal minec-vis-pris 61) +(def-tex cguard1-chestplate minec-vis-pris 62) +(def-tex cguard1-gunmetaldark2 minec-vis-pris 63) +(def-tex cguard1-guntube minec-vis-pris 64) +(def-tex cguard1-lens minec-vis-pris 65) +(def-tex cguardgame-metaledark-02 minec-vis-pris 66) +(def-tex cguardgame-metallight-01small minec-vis-pris 67) +(def-tex environment-oldmetal minec-vis-pris 68) +(def-tex kg-grunt-cable-01 minec-vis-pris 69) +(def-tex kg-grunt-rim-01 minec-vis-pris 70) +(def-tex kg-grunt-rim-02 minec-vis-pris 71) +(def-tex kg-grunt-rim-03 minec-vis-pris 72) +(def-tex roboguard-headshield minec-vis-pris 73) +(def-tex roboguard-shouldershield minec-vis-pris 74) +(def-tex squid-bulb-sm minec-vis-pris 75) +(def-tex widow-dull-inards minec-vis-pris 76) +(def-tex widow-pod-gun-metal minec-vis-pris 77) +(def-tex minc-chain-metal-01 minec-vis-pris 78) +(def-tex squid-drabgun minec-vis-pris 79) +(def-tex pecker-body-01 minec-vis-pris 80) +(def-tex pecker-face minec-vis-pris 81) +(def-tex pecker-plume minec-vis-pris 82) +(def-tex pecker-tail minec-vis-pris 83) +(def-tex pecker-teeth minec-vis-pris 84) +(def-tex pecker-wingbottom minec-vis-pris 85) +(def-tex pecker-wingtop minec-vis-pris 86) +(def-tex pecker-yellowfur minec-vis-pris 87) +(def-tex pecker-eyelid minec-vis-pris 88) +(def-tex waspala-glass-03 waspala-alpha 0) +(def-tex freehq-glass-01 freehq-water 0) +(def-tex common-glass freehq-water 36) +(def-tex fora-shrub-grass foresta-vis-shrub 3) +(def-tex fora-shrub-pebbles foresta-vis-shrub 5) +(def-tex fora-shrub-asian-grass foresta-vis-shrub 6) +(def-tex fora-shrub-cattail foresta-vis-shrub 7) +(def-tex fora-shrub-weed foresta-vis-shrub 8) +(def-tex for-bark foresta-vis-shrub 9) +(def-tex fora-shrub-growth foresta-vis-shrub 10) +(def-tex fora-shrub-vine foresta-vis-shrub 11) +(def-tex fora-precursor-metal-plain-01 foresta-vis-shrub 13) +(def-tex fora-precursor-circuitpattern-01 foresta-vis-shrub 14) +(def-tex fora-precursor-metal-edge-01 foresta-vis-shrub 15) +(def-tex fora-precursor-tube-ring-02 foresta-vis-shrub 16) +(def-tex mtn-environment-front-backup foresta-vis-shrub 17) +(def-tex fora-precursor-metal-plain-01dk foresta-vis-shrub 18) +(def-tex flying-bird-01 wascityb-sprite 28) +(def-tex flying-bird-02 wascityb-sprite 29) +(def-tex flying-bird-03 wascityb-sprite 30) +(def-tex flying-bird-04 wascityb-sprite 31) +(def-tex flying-bird-05 wascityb-sprite 32) +(def-tex flying-bird-06 wascityb-sprite 33) +(def-tex flying-bird-07 wascityb-sprite 34) +(def-tex flying-bird-08 wascityb-sprite 35) +(def-tex flying-bird-09 wascityb-sprite 36) +(def-tex flying-bird-10 wascityb-sprite 37) +(def-tex flying-bird-11 wascityb-sprite 38) +(def-tex flying-bird-12 wascityb-sprite 39) +(def-tex flying-bird-13 wascityb-sprite 40) +(def-tex flying-bird-14 wascityb-sprite 41) +(def-tex flying-bird-15 wascityb-sprite 42) +(def-tex flying-bird-16 wascityb-sprite 43) +(def-tex water-froth wascityb-sprite 44) +(def-tex wave-foam wascityb-sprite 45) +(def-tex boom wascityb-sprite 46) +(def-tex twirl-path wascityb-sprite 47) +(def-tex was-gun-beam wascityb-sprite 48) +(def-tex back01 ctycara-pris 0) +(def-tex brace01 ctycara-pris 1) +(def-tex carafront01 ctycara-pris 2) +(def-tex carawing01 ctycara-pris 3) +(def-tex cushion01 ctycara-pris 4) +(def-tex floorboard01 ctycara-pris 6) +(def-tex moter01 ctycara-pris 7) +(def-tex pipe01 ctycara-pris 8) +(def-tex carbdash01 ctycara-pris 10) +(def-tex carbside01 ctycara-pris 11) +(def-tex carbwing01 ctycara-pris 12) +(def-tex carccase01 ctycara-pris 13) +(def-tex carcfoil01 ctycara-pris 14) +(def-tex carcnose01 ctycara-pris 15) +(def-tex carcside01 ctycara-pris 16) +(def-tex carcvent01 ctycara-pris 17) +(def-tex bike-01 ctycarb-pris 0) +(def-tex bike-02 ctycarb-pris 1) +(def-tex bike-03 ctycarb-pris 2) +(def-tex bikebjets01 ctycarb-pris 3) +(def-tex bikebside01 ctycarb-pris 4) +(def-tex bikecmotor01 ctycarb-pris 5) +(def-tex bikecnosecone01 ctycarb-pris 6) +(def-tex bikecside01 ctycarb-pris 7) +(def-tex bikecwing01 ctycarb-pris 8) +(def-tex exstpipe01 ctycarb-pris 9) +(def-tex floorboard01 ctycarb-pris 10) +(def-tex pipe01 ctycarb-pris 11) +(def-tex riges01 ctycarb-pris 12) +(def-tex backThing01 ctycarc-pris 0) +(def-tex dash01 ctycarc-pris 2) +(def-tex gauge01 ctycarc-pris 3) +(def-tex grillRim01 ctycarc-pris 4) +(def-tex gunBoxBack01 ctycarc-pris 5) +(def-tex gunBoxFront01 ctycarc-pris 6) +(def-tex gunbox01 ctycarc-pris 7) +(def-tex gunbox02 ctycarc-pris 8) +(def-tex hood01 ctycarc-pris 9) +(def-tex jetTop01 ctycarc-pris 10) +(def-tex jets01 ctycarc-pris 11) +(def-tex kcfrontend01 ctycarc-pris 15) +(def-tex light01 ctycarc-pris 17) +(def-tex lightCase01 ctycarc-pris 18) +(def-tex post01 ctycarc-pris 19) +(def-tex rail01 ctycarc-pris 20) +(def-tex seat01 ctycarc-pris 21) +(def-tex stripe03 ctycarc-pris 22) +(def-tex turret01 ctycarc-pris 23) +(def-tex wing01 ctycarc-pris 24) +(def-tex wing02 ctycarc-pris 25) +(def-tex wing02grey01 ctycarc-pris 26) +(def-tex windshield01 ctycarc-water 0) +(def-tex bam-eyelight ctypepa-pris 0) +(def-tex bam-hairhilite ctypepa-pris 1) +(def-tex citfat-1-beard ctypepa-pris 2) +(def-tex citfat-1-headtop ctypepa-pris 3) +(def-tex citfat-1-pants ctypepa-pris 4) +(def-tex citfat-buzzcut ctypepa-pris 5) +(def-tex citfat-cotton-gather ctypepa-pris 6) +(def-tex citfat-cottonbutton ctypepa-pris 7) +(def-tex citfat-cottonclip ctypepa-pris 8) +(def-tex citfat-eye ctypepa-pris 9) +(def-tex citfat-eyebrow ctypepa-pris 10) +(def-tex citfat-eyebrow-bro ctypepa-pris 11) +(def-tex citfat-fleshbrown ctypepa-pris 12) +(def-tex citfat-hairflat ctypepa-pris 13) +(def-tex citfat-hairtrans ctypepa-pris 14) +(def-tex citichic-boot-01 ctypepa-pris 15) +(def-tex citichic-boot-02 ctypepa-pris 16) +(def-tex citichic-boot-03 ctypepa-pris 17) +(def-tex citichic-boot-04 ctypepa-pris 18) +(def-tex citichic-eye ctypepa-pris 19) +(def-tex citichic-flesh ctypepa-pris 20) +(def-tex citichic-hair-01 ctypepa-pris 21) +(def-tex citichic-pants ctypepa-pris 22) +(def-tex citichic-pants-02 ctypepa-pris 23) +(def-tex citichic-shirt-01 ctypepa-pris 24) +(def-tex citichic-skirt-01 ctypepa-pris 25) +(def-tex citichic-vest-01 ctypepa-pris 26) +(def-tex citn-1-pants ctypepa-pris 27) +(def-tex citn-allbuckel ctypepa-pris 28) +(def-tex citn-alleyebrow ctypepa-pris 29) +(def-tex citn-allflesh ctypepa-pris 30) +(def-tex citn-allhair ctypepa-pris 31) +(def-tex citn-alllcotton ctypepa-pris 32) +(def-tex citn-alllcotton-gather ctypepa-pris 33) +(def-tex citn-alllcotton-wrinkled ctypepa-pris 34) +(def-tex citn-allleather ctypepa-pris 35) +(def-tex citn-allleather-edge ctypepa-pris 36) +(def-tex citn-allleather-shoulder ctypepa-pris 37) +(def-tex citn-allleatherstrap ctypepa-pris 38) +(def-tex citn-allleatherwrinkled ctypepa-pris 39) +(def-tex citn-allleye ctypepa-pris 40) +(def-tex citn-allshoebottom ctypepa-pris 41) +(def-tex citn-allsuede ctypepa-pris 42) +(def-tex citn-allsuedeplain ctypepa-pris 43) +(def-tex cguardgame-armshield ctypesa-pris 0) +(def-tex cguardgame-backplate ctypesa-pris 1) +(def-tex cguardgame-blackstrap ctypesa-pris 2) +(def-tex cguardgame-boottop ctypesa-pris 3) +(def-tex cguardgame-chestplate ctypesa-pris 4) +(def-tex cguardgame-ear ctypesa-pris 5) +(def-tex cguardgame-face ctypesa-pris 6) +(def-tex cguardgame-greyheadshield ctypesa-pris 7) +(def-tex cguardgame-gunboltlight ctypesa-pris 8) +(def-tex cguardgame-gunhandle ctypesa-pris 9) +(def-tex cguardgame-gunleather ctypesa-pris 10) +(def-tex cguardgame-gunmetaldark ctypesa-pris 11) +(def-tex cguardgame-gunmetaldark2 ctypesa-pris 12) +(def-tex cguardgame-guntube ctypesa-pris 13) +(def-tex cguardgame-jacketstrap ctypesa-pris 14) +(def-tex cguardgame-metaledark-02 ctypesa-pris 15) +(def-tex cguardgame-metalered-01 ctypesa-pris 16) +(def-tex cguardgame-metallight-01small ctypesa-pris 17) +(def-tex cguardgame-metallight-02 ctypesa-pris 18) +(def-tex cguardgame-metallight-plain ctypesa-pris 19) +(def-tex cguardgame-scarf ctypesa-pris 20) +(def-tex cguardgame-shoebottom ctypesa-pris 21) +(def-tex cguardgame-shouldershield ctypesa-pris 22) +(def-tex cguardgame-sleeve ctypesa-pris 23) +(def-tex darkguard-armshield ctypesa-pris 25) +(def-tex darkguard-headshield ctypesa-pris 26) +(def-tex darkguard-scarf ctypesa-pris 27) +(def-tex darkguard-shouldershield ctypesa-pris 28) +(def-tex environment-oldmetal ctypesa-pris 29) +(def-tex grunt-eye-01 ctypepb-pris 0) +(def-tex grunt-gem-01 ctypepb-pris 1) +(def-tex grunt-hose ctypepb-pris 2) +(def-tex grunt-metal-01 ctypepb-pris 3) +(def-tex grunt-skin-01 ctypepb-pris 4) +(def-tex grunt-skin-02 ctypepb-pris 5) +(def-tex grunt-skin-03 ctypepb-pris 6) +(def-tex waspala-water waspala-water 3) +(def-tex waspala-waterfall waspala-water 4) +(def-tex waspala-waterfall-dest waspala-water 5) +(def-tex waspala-water-dest waspala-water 6) +(def-tex wang_0 desert-hfrag 0) +(def-tex wang_1 desert-hfrag 1) +(def-tex wang_2 desert-hfrag 2) +(def-tex wang_3 desert-hfrag 3) +(def-tex wang_4 desert-hfrag 4) +(def-tex wang_black desert-hfrag 5) +(def-tex wang_mip desert-hfrag 6) +(def-tex for-shrub-moss waspala-shrub 2) +(def-tex waspala-shrub-plant waspala-shrub 3) +(def-tex waspala-small-rocks waspala-shrub 5) +(def-tex minc-rust-01 minea-vis-shrub 0) +(def-tex minb-stone26 minea-vis-shrub 1) +(def-tex minc-plate-01 minea-vis-shrub 2) +(def-tex minc-blue-paint-rust02 minea-vis-shrub 3) +(def-tex minc-blue-paint-rust05 minea-vis-shrub 4) +(def-tex minc-blue-paint-rust04 minea-vis-shrub 7) +(def-tex min-env-mar-01 minea-vis-shrub 8) +(def-tex minc-rust-pipe-05 minea-vis-shrub 9) +(def-tex minc-rust-bars-01 minea-vis-shrub 10) +(def-tex minc-blue-paint-rust01 minea-vis-shrub 11) +(def-tex minc-door-metal-01 minea-vis-shrub 12) +(def-tex minc-green-paint-02 minea-vis-shrub 13) +(def-tex minc-door-metal-03 minea-vis-shrub 14) +(def-tex minc-rust-pipe-03 minea-vis-shrub 15) +(def-tex minc-safe-plate-02 minea-vis-shrub 16) +(def-tex seagull-wing intpfall-sprite 0) +(def-tex palcab-blue-rotaters intpfall-sprite 1) +(def-tex edgeglow intpfall-sprite 2) +(def-tex enemy-tracer intpfall-sprite 3) +(def-tex fora-dirt foresta-vis-alpha 0) +(def-tex fora-precursor-glass-b-02 foresta-vis-alpha 1) +(def-tex precprism-lens-07 foresta-vis-alpha 2) +(def-tex piss-puddle vinroom-sprite 0) +(def-tex screen-00 vinroom-sprite 1) +(def-tex screen-01 vinroom-sprite 2) +(def-tex screen-02 vinroom-sprite 3) +(def-tex screen-03 vinroom-sprite 4) +(def-tex screen-04 vinroom-sprite 5) +(def-tex screen-05 vinroom-sprite 6) +(def-tex screen-06 vinroom-sprite 7) +(def-tex screen-07 vinroom-sprite 8) +(def-tex screen-08 vinroom-sprite 9) +(def-tex screen-09 vinroom-sprite 10) +(def-tex screen-10 vinroom-sprite 11) +(def-tex screen-11 vinroom-sprite 12) +(def-tex screen-12 vinroom-sprite 13) +(def-tex screen-13 vinroom-sprite 14) +(def-tex screen-14 vinroom-sprite 15) +(def-tex screen-15 vinroom-sprite 16) +(def-tex tinydot vinroom-sprite 17) +(def-tex vinroom-small-monitor-01 vinroom-sprite 18) +(def-tex vinroom-small-monitor-02 vinroom-sprite 19) +(def-tex vinroom-small-monitor-03 vinroom-sprite 20) +(def-tex vinroom-small-monitor-04 vinroom-sprite 21) +(def-tex vinroom-small-monitor-05 vinroom-sprite 22) +(def-tex vinroom-small-monitor-06 vinroom-sprite 23) +(def-tex vinroom-small-monitor-07 vinroom-sprite 24) +(def-tex vinroom-small-monitor-08 vinroom-sprite 25) +(def-tex vinroom-tv-beam vinroom-sprite 26) +(def-tex vinroom-tv-circle vinroom-sprite 27) +(def-tex vinroom-tv-linetext-01 vinroom-sprite 28) +(def-tex vinroom-tv-linetext-02 vinroom-sprite 29) +(def-tex vinroom-tv-linetext-03 vinroom-sprite 30) +(def-tex vinroom-tv-linetext-04 vinroom-sprite 31) +(def-tex vinroom-tv-linetext-05 vinroom-sprite 32) +(def-tex vinroom-tv-linetext-06 vinroom-sprite 33) +(def-tex vinroom-tv-linetext-07 vinroom-sprite 34) +(def-tex vinroom-tv-linetext-08 vinroom-sprite 35) +(def-tex vinroom-tv-morgan vinroom-sprite 36) +(def-tex vinroom-tv-radar vinroom-sprite 37) +(def-tex vinroom-tv-radar-dots vinroom-sprite 38) +(def-tex vinroom-tv-text-a vinroom-sprite 39) +(def-tex vinroom-tv-text-g vinroom-sprite 40) +(def-tex vinroom-tv-text-m vinroom-sprite 41) +(def-tex vinroom-tv-text-n vinroom-sprite 42) +(def-tex vinroom-tv-text-o vinroom-sprite 43) +(def-tex vinroom-tv-text-r vinroom-sprite 44) +(def-tex vin-door-large-01 vinroom-vis-pris 100) +(def-tex vin-support-base-02 vinroom-vis-pris 101) +(def-tex common-black vinroom-vis-tfrag 0) +(def-tex strip-vin-pipe-01 vinroom-vis-tfrag 2) +(def-tex strip-vin-rim-02 vinroom-vis-tfrag 3) +(def-tex vin-black vinroom-vis-tfrag 4) +(def-tex vin-blue-light vinroom-vis-tfrag 5) +(def-tex vin-control-panel-01 vinroom-vis-tfrag 6) +(def-tex vin-control-panel-02 vinroom-vis-tfrag 7) +(def-tex vin-floor-01 vinroom-vis-tfrag 8) +(def-tex vin-floor-02 vinroom-vis-tfrag 9) +(def-tex vin-floor-02a vinroom-vis-tfrag 10) +(def-tex vin-floor-03 vinroom-vis-tfrag 11) +(def-tex vin-floor-03c vinroom-vis-tfrag 12) +(def-tex vin-floor-04 vinroom-vis-tfrag 13) +(def-tex vin-floor-04b vinroom-vis-tfrag 14) +(def-tex vin-floor-symbol vinroom-vis-tfrag 15) +(def-tex vin-handle-01 vinroom-vis-tfrag 16) +(def-tex vin-monitor-rim vinroom-vis-tfrag 17) +(def-tex vin-monitor-rim-02 vinroom-vis-tfrag 18) +(def-tex vin-monitor-rim-04 vinroom-vis-tfrag 19) +(def-tex vin-monitor-rim-05 vinroom-vis-tfrag 20) +(def-tex vin-panel-01 vinroom-vis-tfrag 21) +(def-tex vin-panel-03 vinroom-vis-tfrag 22) +(def-tex vin-panel-04 vinroom-vis-tfrag 23) +(def-tex vin-panel-05 vinroom-vis-tfrag 24) +(def-tex vin-panel-06 vinroom-vis-tfrag 25) +(def-tex vin-panel-07 vinroom-vis-tfrag 26) +(def-tex vin-panel-08 vinroom-vis-tfrag 27) +(def-tex vin-panel-09 vinroom-vis-tfrag 28) +(def-tex vin-panel-10 vinroom-vis-tfrag 29) +(def-tex vin-panel-11 vinroom-vis-tfrag 30) +(def-tex vin-pipe-01 vinroom-vis-tfrag 31) +(def-tex vin-pipe-02 vinroom-vis-tfrag 32) +(def-tex vin-pipe-03 vinroom-vis-tfrag 33) +(def-tex vin-pipe-04 vinroom-vis-tfrag 34) +(def-tex vin-pipe-05 vinroom-vis-tfrag 35) +(def-tex vin-red vinroom-vis-tfrag 36) +(def-tex vin-rim-01 vinroom-vis-tfrag 37) +(def-tex vin-rim-02 vinroom-vis-tfrag 38) +(def-tex vin-rim-03 vinroom-vis-tfrag 39) +(def-tex vin-turbine-panel-01 vinroom-vis-tfrag 40) +(def-tex vin-turbine-panel-04 vinroom-vis-tfrag 41) +(def-tex vin-wall-01 vinroom-vis-tfrag 42) +(def-tex vin-wall-02 vinroom-vis-tfrag 43) +(def-tex vin-wall-bottom-greyblue vinroom-vis-tfrag 44) +(def-tex vin-rim-04 vinroom-vis-tfrag 45) +(def-tex warpgate-circuitpattern2 vinroom-vis-tfrag 46) +(def-tex warpgate-precursormetal vinroom-vis-tfrag 47) +(def-tex warpgate-post-01 vinroom-vis-tfrag 48) +(def-tex vinroom-tv-circle freehq-sprite 0) +(def-tex tinydot freehq-sprite 1) +(def-tex holo-line freehq-sprite 2) +(def-tex screen-00 freehq-sprite 3) +(def-tex screen-01 freehq-sprite 4) +(def-tex screen-02 freehq-sprite 5) +(def-tex screen-03 freehq-sprite 6) +(def-tex screen-04 freehq-sprite 7) +(def-tex screen-05 freehq-sprite 8) +(def-tex screen-06 freehq-sprite 9) +(def-tex screen-07 freehq-sprite 10) +(def-tex screen-08 freehq-sprite 11) +(def-tex screen-09 freehq-sprite 12) +(def-tex screen-10 freehq-sprite 13) +(def-tex screen-11 freehq-sprite 14) +(def-tex screen-12 freehq-sprite 15) +(def-tex screen-13 freehq-sprite 16) +(def-tex screen-14 freehq-sprite 17) +(def-tex screen-15 freehq-sprite 18) +(def-tex vinroom-small-monitor-01 freehq-sprite 19) +(def-tex vinroom-small-monitor-02 freehq-sprite 20) +(def-tex vinroom-small-monitor-03 freehq-sprite 21) +(def-tex vinroom-small-monitor-04 freehq-sprite 22) +(def-tex vinroom-small-monitor-05 freehq-sprite 23) +(def-tex vinroom-small-monitor-06 freehq-sprite 24) +(def-tex vinroom-small-monitor-07 freehq-sprite 25) +(def-tex vinroom-small-monitor-08 freehq-sprite 26) +(def-tex vinroom-tv-beam freehq-sprite 28) +(def-tex vinroom-tv-linetext-01 freehq-sprite 29) +(def-tex vinroom-tv-linetext-02 freehq-sprite 30) +(def-tex vinroom-tv-linetext-03 freehq-sprite 31) +(def-tex vinroom-tv-linetext-04 freehq-sprite 32) +(def-tex vinroom-tv-linetext-05 freehq-sprite 33) +(def-tex vinroom-tv-linetext-06 freehq-sprite 34) +(def-tex vinroom-tv-linetext-07 freehq-sprite 35) +(def-tex vinroom-tv-linetext-08 freehq-sprite 36) +(def-tex vinroom-tv-radar freehq-sprite 37) +(def-tex vinroom-tv-radar-dots freehq-sprite 38) +(def-tex vinroom-tv-text-a freehq-sprite 39) +(def-tex vinroom-tv-text-g freehq-sprite 40) +(def-tex vinroom-tv-text-m freehq-sprite 41) +(def-tex vinroom-tv-text-n freehq-sprite 42) +(def-tex vinroom-tv-text-o freehq-sprite 43) +(def-tex vinroom-tv-text-r freehq-sprite 44) +(def-tex line-scroll freehq-sprite 45) +(def-tex holo-curve freehq-sprite 46) +(def-tex line-scroll2 freehq-sprite 47) +(def-tex rectangle freehq-sprite 48) +(def-tex circle freehq-sprite 49) +(def-tex landscape freehq-sprite 50) +(def-tex yavin freehq-sprite 51) +(def-tex twirl freehq-sprite 52) +(def-tex onin-magic-bigpuff freehq-sprite 53) +(def-tex wang_black wasintro-hfrag 0) +(def-tex wang_mip wasintro-hfrag 1) +(def-tex wang_0 wasintro-hfrag 2) +(def-tex wang_1 wasintro-hfrag 3) +(def-tex wang_2 wasintro-hfrag 4) +(def-tex wang_3 wasintro-hfrag 5) +(def-tex wang_4 wasintro-hfrag 6) +(def-tex hud-nest-cocoon-01 nsta-minimap 0) +(def-tex map-nst-upper nsta-minimap 1) +(def-tex map-nst-upper-2 nsta-minimap 3) +(def-tex JakIII inttitle-minimap 0) +(def-tex jak3-japan inttitle-minimap 1) +(def-tex NaughtyDog inttitle-minimap 2) +(def-tex wstlander-01-glovetop waswide-vis-water 0) +(def-tex wstd-floor-panel02 wasstadb-tfrag 1) +(def-tex wstd-floor-panel01 wasstadb-tfrag 5) +(def-tex wstd-stands-shell01 wasstadb-tfrag 10) +(def-tex wstd-stands-rib wasstadb-tfrag 11) +(def-tex wstd-tentacle-plate03 wasstadb-tfrag 16) +(def-tex wstd-stands-lowall01 wasstadb-tfrag 17) +(def-tex wstd-spear01 wasstadb-tfrag 20) +(def-tex wstd-spear02 wasstadb-tfrag 21) +(def-tex wstd-throne-plat03 wasstadb-tfrag 22) +(def-tex wstd-flag wasstadb-tfrag 23) +(def-tex wstd-tentacle-plate02 wasstadb-tfrag 24) +(def-tex wstd-scaffold-strut wasstadb-tfrag 28) +(def-tex wstd-ladder wasstadb-tfrag 29) +(def-tex wstd-scaffold-teeth wasstadb-tfrag 30) +(def-tex wstd-scaffold-wall-01 wasstadb-tfrag 31) +(def-tex wstd-scaffold-wall-02 wasstadb-tfrag 32) +(def-tex wstd-scaffold-wall-edge wasstadb-tfrag 33) +(def-tex wstd-scaffold-wall-03 wasstadb-tfrag 35) +(def-tex wstd-platform-base wasstadb-tfrag 36) +(def-tex wstd-platform-floor wasstadb-tfrag 37) +(def-tex wstd-platform-wall wasstadb-tfrag 38) +(def-tex wstd-scaffold-floor-01 wasstadb-tfrag 39) +(def-tex wstd-stands-ceilingplate wasstadb-tfrag 40) +(def-tex dummy-stripe-pole-01 wasstadb-tfrag 41) +(def-tex dummy-black-01 wasstadb-tfrag 42) +(def-tex dummy-chestplate-01 wasstadb-tfrag 43) +(def-tex dummy-blade-01 wasstadb-tfrag 44) +(def-tex dummy-white-bar-01 wasstadb-tfrag 45) +(def-tex dummy-eye-01 wasstadb-tfrag 46) +(def-tex dummy-black-bar-01 wasstadb-tfrag 47) +(def-tex dummy-blade-long-01 wasstadb-tfrag 48) +(def-tex dummy-faceplate-01 wasstadb-tfrag 49) +(def-tex dummy-blade-handle-01 wasstadb-tfrag 50) +(def-tex dummy-white-01 wasstadb-tfrag 51) +(def-tex dummy-env-01 wasstadb-tfrag 53) +(def-tex dummy-red-01 wasstadb-tfrag 54) +(def-tex wstd-scaffold-bar wasstadb-tfrag 55) +(def-tex wstd-stands-shell02 wasstadb-tfrag 58) +(def-tex bam-eyelight ldampeck-pris 0) +(def-tex pecker-body-01 ldampeck-pris 1) +(def-tex pecker-eyelid ldampeck-pris 2) +(def-tex pecker-face ldampeck-pris 3) +(def-tex pecker-plume ldampeck-pris 4) +(def-tex pecker-tail ldampeck-pris 5) +(def-tex pecker-teeth ldampeck-pris 6) +(def-tex pecker-wingbottom ldampeck-pris 7) +(def-tex pecker-wingtop ldampeck-pris 8) +(def-tex pecker-yellowfur ldampeck-pris 9) +(def-tex bam-eyelight ldampeck-pris2 0) +(def-tex environment-oldmetal ldampeck-pris2 1) +(def-tex king-arm ldampeck-pris2 2) +(def-tex king-blackskirt2 ldampeck-pris2 3) +(def-tex king-bluemetal ldampeck-pris2 4) +(def-tex king-bolt ldampeck-pris2 5) +(def-tex king-chest ldampeck-pris2 6) +(def-tex king-clip-02 ldampeck-pris2 7) +(def-tex king-ear ldampeck-pris2 8) +(def-tex king-earing ldampeck-pris2 9) +(def-tex king-face-01 ldampeck-pris2 10) +(def-tex king-finger ldampeck-pris2 11) +(def-tex king-greenmetal ldampeck-pris2 12) +(def-tex king-greenmetalplain ldampeck-pris2 13) +(def-tex king-hair ldampeck-pris2 14) +(def-tex king-hand ldampeck-pris2 15) +(def-tex king-horn ldampeck-pris2 16) +(def-tex king-iris ldampeck-pris2 17) +(def-tex king-leg ldampeck-pris2 18) +(def-tex king-lgblackstrap ldampeck-pris2 19) +(def-tex king-precursermetal-decor ldampeck-pris2 20) +(def-tex king-precursermetal-plain ldampeck-pris2 21) +(def-tex king-precursermetal-trim ldampeck-pris2 22) +(def-tex king-precursermetal-trim2 ldampeck-pris2 23) +(def-tex king-precursermetal-trimbolt ldampeck-pris2 24) +(def-tex king-shoebottom ldampeck-pris2 25) +(def-tex king-skirt ldampeck-pris2 26) +(def-tex king-teeth ldampeck-pris2 27) +(def-tex king-thinstrap ldampeck-pris2 28) +(def-tex king-vest ldampeck-pris2 29) +(def-tex king-vestback ldampeck-pris2 30) +(def-tex king-wrap ldampeck-pris2 31) +(def-tex king-wraps ldampeck-pris2 32) +(def-tex king-wristband ldampeck-pris2 33) +(def-tex king-skirt-b ldampeck-pris2 35) +(def-tex bam-eyelight ldamsig-pris2 0) +(def-tex charHOLD ldamsig-pris2 1) +(def-tex environment-oldmetal ldamsig-pris2 2) +(def-tex sig-belt ldamsig-pris2 3) +(def-tex sig-eye ldamsig-pris2 4) +(def-tex sig-eyelid ldamsig-pris2 5) +(def-tex sig-faceleft ldamsig-pris2 6) +(def-tex sig-facert ldamsig-pris2 7) +(def-tex sig-flask ldamsig-pris2 8) +(def-tex sig-gem-01 ldamsig-pris2 9) +(def-tex sig-glove ldamsig-pris2 10) +(def-tex sig-glovetop ldamsig-pris2 11) +(def-tex sig-gun-01 ldamsig-pris2 12) +(def-tex sig-gun-02 ldamsig-pris2 13) +(def-tex sig-gun-03 ldamsig-pris2 14) +(def-tex sig-gun-04 ldamsig-pris2 15) +(def-tex sig-gun-05 ldamsig-pris2 16) +(def-tex sig-headgear ldamsig-pris2 17) +(def-tex sig-horn ldamsig-pris2 18) +(def-tex sig-lens ldamsig-pris2 19) +(def-tex sig-metal-01 ldamsig-pris2 20) +(def-tex sig-metal-dirty ldamsig-pris2 21) +(def-tex sig-sac ldamsig-pris2 22) +(def-tex sig-shoebottom ldamsig-pris2 23) +(def-tex sig-shoetop ldamsig-pris2 24) +(def-tex sig-shoulderarmor ldamsig-pris2 25) +(def-tex sig-skirts ldamsig-pris2 26) +(def-tex sig-skirts-02 ldamsig-pris2 27) +(def-tex sig-skirts-03 ldamsig-pris2 28) +(def-tex sig-undergarments ldamsig-pris2 29) +(def-tex vin-teeth-01 ldamsig-pris2 30) +(def-tex king-arm ldamsig-pris2 31) +(def-tex king-blackskirt2 ldamsig-pris2 32) +(def-tex king-bluemetal ldamsig-pris2 33) +(def-tex king-bolt ldamsig-pris2 34) +(def-tex king-chest ldamsig-pris2 35) +(def-tex king-clip-02 ldamsig-pris2 36) +(def-tex king-ear ldamsig-pris2 37) +(def-tex king-earing ldamsig-pris2 38) +(def-tex king-face-01 ldamsig-pris2 39) +(def-tex king-finger ldamsig-pris2 40) +(def-tex king-greenmetal ldamsig-pris2 41) +(def-tex king-greenmetalplain ldamsig-pris2 42) +(def-tex king-hair ldamsig-pris2 43) +(def-tex king-hand ldamsig-pris2 44) +(def-tex king-horn ldamsig-pris2 45) +(def-tex king-iris ldamsig-pris2 46) +(def-tex king-leg ldamsig-pris2 47) +(def-tex king-lgblackstrap ldamsig-pris2 48) +(def-tex king-precursermetal-decor ldamsig-pris2 49) +(def-tex king-precursermetal-plain ldamsig-pris2 50) +(def-tex king-precursermetal-trim ldamsig-pris2 51) +(def-tex king-precursermetal-trim2 ldamsig-pris2 52) +(def-tex king-precursermetal-trimbolt ldamsig-pris2 53) +(def-tex king-shoebottom ldamsig-pris2 54) +(def-tex king-skirt ldamsig-pris2 55) +(def-tex king-teeth ldamsig-pris2 56) +(def-tex king-thinstrap ldamsig-pris2 57) +(def-tex king-vest ldamsig-pris2 58) +(def-tex king-vestback ldamsig-pris2 59) +(def-tex king-wrap ldamsig-pris2 60) +(def-tex king-wraps ldamsig-pris2 61) +(def-tex king-wristband ldamsig-pris2 62) +(def-tex king-skirt-b ldamsig-pris2 64) +(def-tex sig-flatfangs ldamsig-water 0) +(def-tex wstd-floor-panel02 wasstadc-tfrag 1) +(def-tex wstd-spear01 wasstadc-tfrag 4) +(def-tex wstd-spear02 wasstadc-tfrag 5) +(def-tex wstd-throne-wall01 wasstadc-tfrag 9) +(def-tex wstd-fight-plat-lrg-floor-02 wasstadc-tfrag 18) +(def-tex wstd-stands-black wasstadc-tfrag 24) +(def-tex wstd-fight-plat-lrg-floor-01 wasstadc-tfrag 42) +(def-tex wstd-scaffold-wall-01 wasstadc-tfrag 54) +(def-tex wstd-platform-base wasstadc-tfrag 55) +(def-tex wstd-platform-floor wasstadc-tfrag 56) +(def-tex wstd-platform-wall wasstadc-tfrag 57) +(def-tex wstd-scaffold-teeth wasstadc-tfrag 58) +(def-tex artifact-dec-01 wasstadc-tfrag 60) +(def-tex artifact-blue-glow-01 wasstadc-tfrag 61) +(def-tex artifact-plain-01 wasstadc-tfrag 62) +(def-tex artifact-plain-02 wasstadc-tfrag 63) +(def-tex artifact-dec-02 wasstadc-tfrag 64) +(def-tex wstd-fight-plat-box-top wasstadc-tfrag 65) +(def-tex wstd-fight-plat-box-side wasstadc-tfrag 66) +(def-tex wstd-fight-plat-box-end wasstadc-tfrag 67) +(def-tex wstd-fight-plat-tube wasstadc-tfrag 68) +(def-tex wstd-fight-plat-door wasstadc-tfrag 69) +(def-tex wstd-fight-plat-girder wasstadc-tfrag 72) +(def-tex wstd-scaffold-bar wasstadc-tfrag 73) +(def-tex wstd-fight-plat-wall-01 wasstadc-tfrag 74) +(def-tex wstd-fight-plat-grate wasstadc-tfrag 75) +(def-tex wstd-fight-plat-wall-03 wasstadc-tfrag 76) +(def-tex wstd-fight-plat-wall-02 wasstadc-tfrag 77) +(def-tex wstd-fight-plat-floor-01 wasstadc-tfrag 78) +(def-tex wstd-fight-plat-floor-02 wasstadc-tfrag 79) +(def-tex wstd-scaffold-strut wasstadc-tfrag 80) +(def-tex wstd-fight-plat-floor-03 wasstadc-tfrag 81) +(def-tex wstd-scaffold-wall-03 wasstadc-tfrag 82) +(def-tex wstd-fight-plat-lrg-floor-05 wasstadc-tfrag 84) +(def-tex wstd-fight-plat-lrg-floor-04 wasstadc-tfrag 85) +(def-tex wstd-fight-plat-lrg-floor-03 wasstadc-tfrag 86) +(def-tex wstd-fight-plat-hole wasstadc-tfrag 87) +(def-tex bam-eyelight ldampksm-pris 0) +(def-tex pecker-body-01 ldampksm-pris 1) +(def-tex pecker-eyelid ldampksm-pris 2) +(def-tex pecker-face ldampksm-pris 3) +(def-tex pecker-plume ldampksm-pris 4) +(def-tex pecker-tail ldampksm-pris 5) +(def-tex pecker-teeth ldampksm-pris 6) +(def-tex pecker-wingbottom ldampksm-pris 7) +(def-tex pecker-wingtop ldampksm-pris 8) +(def-tex pecker-yellowfur ldampksm-pris 9) +(def-tex bam-eyelight ldampksm-pris2 0) +(def-tex environment-oldmetal ldampksm-pris2 1) +(def-tex king-arm ldampksm-pris2 2) +(def-tex king-blackskirt2 ldampksm-pris2 3) +(def-tex king-bluemetal ldampksm-pris2 4) +(def-tex king-bolt ldampksm-pris2 5) +(def-tex king-chest ldampksm-pris2 6) +(def-tex king-clip-02 ldampksm-pris2 7) +(def-tex king-ear ldampksm-pris2 8) +(def-tex king-earing ldampksm-pris2 9) +(def-tex king-face-01 ldampksm-pris2 10) +(def-tex king-finger ldampksm-pris2 11) +(def-tex king-greenmetal ldampksm-pris2 12) +(def-tex king-greenmetalplain ldampksm-pris2 13) +(def-tex king-hair ldampksm-pris2 14) +(def-tex king-hand ldampksm-pris2 15) +(def-tex king-horn ldampksm-pris2 16) +(def-tex king-iris ldampksm-pris2 17) +(def-tex king-leg ldampksm-pris2 18) +(def-tex king-lgblackstrap ldampksm-pris2 19) +(def-tex king-precursermetal-decor ldampksm-pris2 20) +(def-tex king-precursermetal-plain ldampksm-pris2 21) +(def-tex king-precursermetal-trim ldampksm-pris2 22) +(def-tex king-precursermetal-trim2 ldampksm-pris2 23) +(def-tex king-precursermetal-trimbolt ldampksm-pris2 24) +(def-tex king-shoebottom ldampksm-pris2 25) +(def-tex king-skirt ldampksm-pris2 26) +(def-tex king-teeth ldampksm-pris2 27) +(def-tex king-thinstrap ldampksm-pris2 28) +(def-tex king-vest ldampksm-pris2 29) +(def-tex king-vestback ldampksm-pris2 30) +(def-tex king-wrap ldampksm-pris2 31) +(def-tex king-wraps ldampksm-pris2 32) +(def-tex king-wristband ldampksm-pris2 33) +(def-tex seem-arm ldampksm-pris2 35) +(def-tex seem-bootbottom ldampksm-pris2 36) +(def-tex seem-bootleg ldampksm-pris2 37) +(def-tex seem-bootlower ldampksm-pris2 38) +(def-tex seem-bootmet ldampksm-pris2 39) +(def-tex seem-boottoe ldampksm-pris2 40) +(def-tex seem-ear ldampksm-pris2 41) +(def-tex seem-eye ldampksm-pris2 42) +(def-tex seem-eyelid ldampksm-pris2 43) +(def-tex seem-face ldampksm-pris2 44) +(def-tex seem-finger ldampksm-pris2 45) +(def-tex seem-hand ldampksm-pris2 46) +(def-tex seem-pipeend ldampksm-pris2 47) +(def-tex seem-pipes-01 ldampksm-pris2 48) +(def-tex seem-precmetal-chestplate-01 ldampksm-pris2 49) +(def-tex seem-precmetal-edge ldampksm-pris2 50) +(def-tex seem-precmetal-plain ldampksm-pris2 51) +(def-tex seem-straps ldampksm-pris2 52) +(def-tex seem-uppertorso ldampksm-pris2 53) +(def-tex seem-headgearback ldampksm-pris2 54) +(def-tex seem-headpiecetop ldampksm-pris2 55) +(def-tex seem-pipes-02 ldampksm-pris2 56) +(def-tex seem-teeth ldampksm-pris2 57) +(def-tex king-skirt-b ldampksm-pris2 58) +(def-tex seem-skirt ldampksm-pris2 59) +(def-tex seem-skirt-small ldampksm-pris2 60) +(def-tex for-bark forestb-vis-shrub 0) +(def-tex fora-shrub-hanging-growth forestb-vis-shrub 1) +(def-tex fora-shrub-moss forestb-vis-shrub 2) +(def-tex fora-shrub-pebbles forestb-vis-shrub 3) +(def-tex fora-shrub-cattail forestb-vis-shrub 4) +(def-tex fora-shrub-grass forestb-vis-shrub 5) +(def-tex fora-shrub-asian-grass forestb-vis-shrub 6) +(def-tex fora-shrub-weed forestb-vis-shrub 7) +(def-tex fora-shrub-vine forestb-vis-shrub 8) +(def-tex fora-dirt forestb-vis-alpha 0) +(def-tex sewer-grate-01 sewk-vis-tfrag 0) +(def-tex sew-metal-floor-01 sewk-vis-tfrag 1) +(def-tex sewer-block-02-hitweak sewk-vis-tfrag 2) +(def-tex sewer-big-brace-01 sewk-vis-tfrag 3) +(def-tex sewer-metal-block-06 sewk-vis-tfrag 4) +(def-tex sewer-metal-block-05 sewk-vis-tfrag 5) +(def-tex sewer-concrete-edge-02 sewk-vis-tfrag 6) +(def-tex sewer-plate-05 sewk-vis-tfrag 7) +(def-tex sewer-metal-block-04 sewk-vis-tfrag 8) +(def-tex sewer-metal-block-01 sewk-vis-tfrag 9) +(def-tex sewer-metal-floor-01 sewk-vis-tfrag 10) +(def-tex sewer-brick-block-09 sewk-vis-tfrag 11) +(def-tex sewer-scaffold-01 sewk-vis-tfrag 12) +(def-tex sewer-scaffold-02 sewk-vis-tfrag 13) +(def-tex sewer-nut-01 sewk-vis-tfrag 14) +(def-tex sewer-pipe-rim-05b sewk-vis-tfrag 15) +(def-tex sewer-pipe-rim-07-hitweak sewk-vis-tfrag 16) +(def-tex common-black sewk-vis-tfrag 17) +(def-tex sewer-pipe-02 sewk-vis-tfrag 18) +(def-tex sewer-brick-block-11 sewk-vis-tfrag 19) +(def-tex sewer-brick-block-10 sewk-vis-tfrag 20) +(def-tex sewer-bolt-side-01 sewk-vis-tfrag 21) +(def-tex sewer-bolt-side-02 sewk-vis-tfrag 22) +(def-tex sewer-metal-trim-01 sewk-vis-tfrag 23) +(def-tex sewer-scaffold-03 sewk-vis-tfrag 24) +(def-tex sewer-metal-block-07 sewk-vis-tfrag 25) +(def-tex sewer-stone-arch-01 sewk-vis-tfrag 26) +(def-tex sewer-pipe-01 sewk-vis-tfrag 27) +(def-tex sewer-pipe-02-edge-01 sewk-vis-tfrag 28) +(def-tex sewer-pipe-rim-01 sewk-vis-tfrag 29) +(def-tex sewer-round-03 sewk-vis-tfrag 30) +(def-tex sewer-round-02 sewk-vis-tfrag 31) +(def-tex sewer-pipe-rim-06 sewk-vis-tfrag 32) +(def-tex sewer-metal-03 sewk-vis-tfrag 33) +(def-tex sewer-metal-block-02 sewk-vis-tfrag 34) +(def-tex sewer-small-light-01 sewk-vis-tfrag 35) +(def-tex sewer-pipe-rim-08 sewk-vis-tfrag 36) +(def-tex sewer-lip-01 sewk-vis-tfrag 37) +(def-tex sewer-metal-trim-02 sewk-vis-tfrag 38) +(def-tex sewer-block-01 sewk-vis-tfrag 39) +(def-tex sewer-pipe-rim-10 sewk-vis-tfrag 40) +(def-tex sewer-rubber-rim-01 sewk-vis-tfrag 41) +(def-tex sew-gun-rim-03 sewk-vis-tfrag 42) +(def-tex sewer-screw-02 sewk-vis-tfrag 43) +(def-tex sewer-pipe-rim-07 sewk-vis-tfrag 44) +(def-tex sewer-plate-01 sewk-vis-tfrag 45) +(def-tex sewer-round-01 sewk-vis-tfrag 46) +(def-tex sewer-yellow-light-01 sewk-vis-tfrag 47) +(def-tex sewer-yellow-light-02 sewk-vis-tfrag 48) +(def-tex sewer-red-light-01 sewk-vis-tfrag 49) +(def-tex sewer-red-light-02 sewk-vis-tfrag 50) +(def-tex sewer-brick-roof-02 sewk-vis-tfrag 51) +(def-tex sewer-brick-roof-03 sewk-vis-tfrag 52) +(def-tex sewer-brick-roof-01 sewk-vis-tfrag 53) +(def-tex sewer-brick-roof-04 sewk-vis-tfrag 54) +(def-tex sewer-big-brace-02 sewk-vis-tfrag 55) +(def-tex sewer-plate-04 sewk-vis-tfrag 56) +(def-tex sewer-big-brace-trim-01 sewk-vis-tfrag 57) +(def-tex sewer-big-brace-trim-02 sewk-vis-tfrag 58) +(def-tex sewer-nut sewk-vis-tfrag 59) +(def-tex sewer-nut-rim sewk-vis-tfrag 60) +(def-tex sewer-plate-06 sewk-vis-tfrag 61) +(def-tex sewer-corroded-trim sewk-vis-tfrag 62) +(def-tex sewer-rusted-metal sewk-vis-tfrag 63) +(def-tex sewer-metal-trim-02-hitweak sewk-vis-tfrag 64) +(def-tex strip-black sewk-vis-tfrag 65) +(def-tex sewer-pipe-rim-09 sewk-vis-tfrag 66) +(def-tex sewer-pipe-small-02 sewk-vis-tfrag 67) +(def-tex sewer-waterfall-02-i sewi-vis-water 1) +(def-tex sewer-waterfall-02-i-dest sewi-vis-water 3) +(def-tex sewer-water-still-01-i sewi-vis-water 4) +(def-tex sewer-water-still-01-i-dest sewi-vis-water 5) +(def-tex sewer-water-wave-01-i sewi-vis-water 6) +(def-tex sewer-water-wave-01-i-dest sewi-vis-water 7) +(def-tex sewer-brick-block-09 sewi-vis-tfrag 0) +(def-tex sewer-brick-block-10 sewi-vis-tfrag 1) +(def-tex sewer-brick-block-11 sewi-vis-tfrag 2) +(def-tex sewer-brick-block-02 sewi-vis-tfrag 3) +(def-tex sewer-brick-block-04 sewi-vis-tfrag 4) +(def-tex sewer-block-01 sewi-vis-tfrag 5) +(def-tex sewer-block-02-hitweak sewi-vis-tfrag 6) +(def-tex sewer-brick-roof-03 sewi-vis-tfrag 7) +(def-tex sewer-brick-block-01 sewi-vis-tfrag 9) +(def-tex sewer-black sewi-vis-tfrag 10) +(def-tex sewer-pipe-small-02 sewi-vis-tfrag 11) +(def-tex sewer-metal-block-06 sewi-vis-tfrag 12) +(def-tex sewer-brick-roof-01 sewi-vis-tfrag 13) +(def-tex sewer-brick-block-06 sewi-vis-tfrag 14) +(def-tex sewer-metal-block-06-hitweak sewi-vis-tfrag 15) +(def-tex sewer-concrete-block-02 sewi-vis-tfrag 16) +(def-tex sewer-metal-trim-02 sewi-vis-tfrag 17) +(def-tex sewer-pipe-rim-05 sewi-vis-tfrag 18) +(def-tex sewer-metal-02 sewi-vis-tfrag 19) +(def-tex sewer-grill-03 sewi-vis-tfrag 20) +(def-tex sewer-metal-03 sewi-vis-tfrag 21) +(def-tex sewer-small-light-01 sewi-vis-tfrag 22) +(def-tex sewer-pipe-rim-08 sewi-vis-tfrag 23) +(def-tex sewer-block-02 sewi-vis-tfrag 24) +(def-tex sewer-round-01 sewi-vis-tfrag 25) +(def-tex sewer-round-03 sewi-vis-tfrag 26) +(def-tex sewer-round-02 sewi-vis-tfrag 27) +(def-tex sewer-pipe-01 sewi-vis-tfrag 28) +(def-tex sewer-pipe-rim-07 sewi-vis-tfrag 29) +(def-tex sewer-pipe-rim-05b sewi-vis-tfrag 31) +(def-tex sewer-scaffold-01 sewi-vis-tfrag 32) +(def-tex sewer-concrete-edge-02 sewi-vis-tfrag 33) +(def-tex sewer-metal-block-04 sewi-vis-tfrag 34) +(def-tex sewer-metal-block-01 sewi-vis-tfrag 35) +(def-tex sewer-metal-block-02 sewi-vis-tfrag 37) +(def-tex sewer-pipe-02 sewi-vis-tfrag 38) +(def-tex sewer-pipe-rim-06 sewi-vis-tfrag 39) +(def-tex sewer-plate-05 sewi-vis-tfrag 40) +(def-tex sewer-metal-trim-01 sewi-vis-tfrag 41) +(def-tex sewer-rubber-rim-01 sewi-vis-tfrag 42) +(def-tex sewer-pipe-rim-09 sewi-vis-tfrag 43) +(def-tex sewer-pool-rim-02 sewi-vis-tfrag 46) +(def-tex sewer-lip-01 sewi-vis-tfrag 47) +(def-tex sewer-plate-04 sewi-vis-tfrag 48) +(def-tex sewer-flat-pipe-01 sewi-vis-tfrag 49) +(def-tex sewer-pipe-rim-03 sewi-vis-tfrag 50) +(def-tex sewer-scaffold-02 sewi-vis-tfrag 51) +(def-tex sewer-nut-01 sewi-vis-tfrag 52) +(def-tex sewer-bolt-side-01 sewi-vis-tfrag 53) +(def-tex sewer-bolt-side-02 sewi-vis-tfrag 54) +(def-tex sewer-scaffold-03 sewi-vis-tfrag 55) +(def-tex common-black sewi-vis-tfrag 56) +(def-tex sewer-concrete-edge-01 sewi-vis-tfrag 57) +(def-tex sewer-plate-02 sewi-vis-tfrag 58) +(def-tex sewer-plate-03 sewi-vis-tfrag 59) +(def-tex sewer-plate-01 sewi-vis-tfrag 60) +(def-tex sewer-hall-light-01 sewi-vis-tfrag 61) +(def-tex sewer-metal-floor-02 sewi-vis-tfrag 62) +(def-tex sewer-nut sewi-vis-tfrag 63) +(def-tex sewer-nut-rim sewi-vis-tfrag 64) +(def-tex sewer-brick-roof-05 sewi-vis-tfrag 66) +(def-tex sewer-pipe-small-01 sewi-vis-tfrag 67) +(def-tex sewer-metal-block-05 sewi-vis-tfrag 68) +(def-tex sewer-stone-newarch-01 sewi-vis-tfrag 69) +(def-tex sewer-brick-block-10-hitweak sewi-vis-tfrag 70) +(def-tex sewer-brick-block-04-hitweak sewi-vis-tfrag 71) +(def-tex sewer-block-01-hitweak sewi-vis-tfrag 72) +(def-tex sewer-lip-01-hitweak sewi-vis-tfrag 73) +(def-tex strip-black sewi-vis-tfrag 74) +(def-tex sewer-mantel-02 sewi-vis-tfrag 75) +(def-tex sewer-pipe-small-01 sewi-vis-shrub 0) +(def-tex sewer-moss-01 sewi-vis-shrub 1) +(def-tex sewer-nut sewi-vis-shrub 2) +(def-tex sewer-hang-moss-01 sewi-vis-shrub 3) +(def-tex sewer-shrub-rust-01 sewi-vis-shrub 4) +(def-tex sew-moving-stepb-grate sewi-vis-shrub 6) +(def-tex sew-gasstep-tube sewi-vis-shrub 7) +(def-tex sew-mine-b-body sewi-vis-shrub 8) +(def-tex sewer-plate-05 sewi-vis-shrub 9) +(def-tex sewer-plate-02 sewi-vis-shrub 11) +(def-tex sewer-shrub-pitting-01 sewi-vis-shrub 12) +(def-tex sewer-brick-block-10 sewh-vis-tfrag 0) +(def-tex sewer-brick-block-11 sewh-vis-tfrag 1) +(def-tex sewer-metal-block-02 sewh-vis-tfrag 2) +(def-tex sewer-pipe-rim-05b sewh-vis-tfrag 3) +(def-tex sewer-plate-05-hitweak sewh-vis-tfrag 4) +(def-tex sewer-metal-block-01 sewh-vis-tfrag 5) +(def-tex sewer-block-01 sewh-vis-tfrag 6) +(def-tex sewer-plate-04 sewh-vis-tfrag 7) +(def-tex sewer-brick-block-01 sewh-vis-tfrag 8) +(def-tex sewer-brick-block-06 sewh-vis-tfrag 9) +(def-tex sewer-metal-block-06-hitweak sewh-vis-tfrag 10) +(def-tex sewer-block-02 sewh-vis-tfrag 11) +(def-tex sewer-pipe-02 sewh-vis-tfrag 12) +(def-tex sewer-metal-new-01 sewh-vis-tfrag 13) +(def-tex sewer-metal-trim-01 sewh-vis-tfrag 14) +(def-tex sewer-electric-ring sewh-vis-tfrag 15) +(def-tex sewer-pipe-rim-10 sewh-vis-tfrag 16) +(def-tex sewer-brick-block-04 sewh-vis-tfrag 17) +(def-tex sewer-concrete-block-02 sewh-vis-tfrag 18) +(def-tex sewer-brick-block-02 sewh-vis-tfrag 19) +(def-tex sewer-block-02-hitweak sewh-vis-tfrag 21) +(def-tex sewer-brick-roof-03 sewh-vis-tfrag 22) +(def-tex sewer-mantel-01 sewh-vis-tfrag 23) +(def-tex sewer-mantel-02 sewh-vis-tfrag 24) +(def-tex sewer-plate-05 sewh-vis-tfrag 25) +(def-tex sewer-pipe-rim-06 sewh-vis-tfrag 26) +(def-tex sewer-scaffold-01 sewh-vis-tfrag 27) +(def-tex sewer-plate-01 sewh-vis-tfrag 28) +(def-tex sewer-scaffold-02 sewh-vis-tfrag 29) +(def-tex sewer-track-01 sewh-vis-tfrag 30) +(def-tex sewer-metal-edge-01 sewh-vis-tfrag 31) +(def-tex sewer-pool-rim-02 sewh-vis-tfrag 32) +(def-tex sewer-pipe-01 sewh-vis-tfrag 33) +(def-tex sewer-flat-pipe-01 sewh-vis-tfrag 34) +(def-tex sewer-bolt-side-01 sewh-vis-tfrag 35) +(def-tex sewer-bolt-side-02 sewh-vis-tfrag 36) +(def-tex sewer-pipe-rim-07 sewh-vis-tfrag 37) +(def-tex sewer-stone-arch-01 sewh-vis-tfrag 38) +(def-tex sewer-brick-roof-01 sewh-vis-tfrag 39) +(def-tex sewer-scaffold-03 sewh-vis-tfrag 40) +(def-tex sewer-pipe-rim-03 sewh-vis-tfrag 41) +(def-tex sewer-metal-block-06-slime sewh-vis-tfrag 43) +(def-tex sewer-metal-block-06-slime02 sewh-vis-tfrag 44) +(def-tex sewer-metal-block-02-small sewh-vis-tfrag 45) +(def-tex sewer-lip-01-hitweak sewh-vis-tfrag 46) +(def-tex sewer-metal-block-04 sewh-vis-tfrag 47) +(def-tex sewer-concrete-edge-02 sewh-vis-tfrag 48) +(def-tex sewer-metal-block-06 sewh-vis-tfrag 49) +(def-tex sewer-pipe-rim-08 sewh-vis-tfrag 50) +(def-tex common-black sewh-vis-tfrag 51) +(def-tex sewer-concrete-edge-01 sewh-vis-tfrag 52) +(def-tex sewer-pipe-small-02 sewh-vis-tfrag 53) +(def-tex sewer-pipe-rim-09 sewh-vis-tfrag 55) +(def-tex sewer-metal-03 sewh-vis-tfrag 56) +(def-tex sewer-plate-02 sewh-vis-tfrag 57) +(def-tex sewer-plate-03 sewh-vis-tfrag 58) +(def-tex sewer-pipe-rim-05 sewh-vis-tfrag 59) +(def-tex sewer-hall-light-01 sewh-vis-tfrag 60) +(def-tex sewer-metal-floor-01 sewh-vis-tfrag 61) +(def-tex sewer-grate-01 sewh-vis-tfrag 62) +(def-tex sewer-nut sewh-vis-tfrag 63) +(def-tex sewer-nut-rim sewh-vis-tfrag 64) +(def-tex sewer-metal-floor-allslime sewh-vis-tfrag 65) +(def-tex sewer-metal-floor-02-slime sewh-vis-tfrag 66) +(def-tex strip-black sewh-vis-tfrag 67) +(def-tex sewer-grill-02 sewh-vis-tfrag 68) +(def-tex sewer-metal-block-04-hitweak sewh-vis-tfrag 69) +(def-tex sewer-flat-pipe-01-hitweak sewh-vis-tfrag 70) +(def-tex sewer-brick-block-04-hitweak sewh-vis-tfrag 71) +(def-tex sewer-block-01-hitweak sewh-vis-tfrag 72) +(def-tex sewer-stone-newarch-01 sewh-vis-tfrag 73) +(def-tex sewer-brick-block-04-highertweak sewh-vis-tfrag 74) +(def-tex sewer-scaffold-03-hitweak sewh-vis-tfrag 75) +(def-tex sewer-metal-block-01-hitweak sewh-vis-tfrag 76) +(def-tex sewer-metal-block-06-highertweak sewh-vis-tfrag 77) +(def-tex sewer-plate-01-hitweak sewh-vis-tfrag 78) +(def-tex sewer-pipe-rim-05b-hitweak sewh-vis-tfrag 79) +(def-tex sewer-metal-floor-02-hitweak sewh-vis-tfrag 80) +(def-tex sewer-waterfall-02-g sewg-vis-water 0) +(def-tex sewer-water-01-g sewg-vis-water 1) +(def-tex sewer-water-01-g-dest sewg-vis-water 2) +(def-tex sewer-waterfall-02-g-dest sewg-vis-water 3) +(def-tex sewer-water-still-01-g-dest sewg-vis-water 4) +(def-tex sewer-water-wave-01-g-dest sewg-vis-water 5) +(def-tex sewer-water-wave-01-g sewg-vis-water 8) +(def-tex sewer-metal-block-06 sewg-vis-tfrag 0) +(def-tex sewer-metal-block-04 sewg-vis-tfrag 1) +(def-tex sewer-pipe-rim-05 sewg-vis-tfrag 2) +(def-tex sewer-plate-05 sewg-vis-tfrag 3) +(def-tex sewer-metal-03 sewg-vis-tfrag 4) +(def-tex sewer-pipe-rim-08 sewg-vis-tfrag 5) +(def-tex sewer-hall-light-01 sewg-vis-tfrag 6) +(def-tex common-black sewg-vis-tfrag 7) +(def-tex sewer-concrete-edge-01 sewg-vis-tfrag 8) +(def-tex sewer-pipe-small-02 sewg-vis-tfrag 9) +(def-tex sewer-pipe-rim-05b sewg-vis-tfrag 10) +(def-tex sewer-metal-block-02 sewg-vis-tfrag 11) +(def-tex sewer-metal-01 sewg-vis-tfrag 12) +(def-tex sewer-scaffold-01 sewg-vis-tfrag 13) +(def-tex sewer-concrete-edge-02 sewg-vis-tfrag 14) +(def-tex sewer-metal-block-01 sewg-vis-tfrag 15) +(def-tex sewer-plate-04 sewg-vis-tfrag 16) +(def-tex sewer-pipe-rim-07 sewg-vis-tfrag 17) +(def-tex sewer-pipe-rim-03 sewg-vis-tfrag 18) +(def-tex sewer-plate-02 sewg-vis-tfrag 19) +(def-tex sewer-plate-03 sewg-vis-tfrag 20) +(def-tex sewer-nut-01 sewg-vis-tfrag 21) +(def-tex sewer-pipe-02 sewg-vis-tfrag 22) +(def-tex sewer-pipe-rim-09 sewg-vis-tfrag 23) +(def-tex sewer-metal-trim-01 sewg-vis-tfrag 24) +(def-tex sewer-plate-01 sewg-vis-tfrag 25) +(def-tex sewer-plate-05-hitweak sewg-vis-tfrag 26) +(def-tex sewer-block-01 sewg-vis-tfrag 27) +(def-tex sewer-block-02 sewg-vis-tfrag 28) +(def-tex sewer-lip-01 sewg-vis-tfrag 29) +(def-tex sewer-metal-trim-02 sewg-vis-tfrag 30) +(def-tex sewer-mantel-02 sewg-vis-tfrag 31) +(def-tex sewer-brick-block-10 sewg-vis-tfrag 32) +(def-tex sewer-stone-arch-01 sewg-vis-tfrag 33) +(def-tex sewer-brick-block-11 sewg-vis-tfrag 34) +(def-tex sewer-brick-roof-03 sewg-vis-tfrag 35) +(def-tex sewer-brick-roof-01 sewg-vis-tfrag 36) +(def-tex sewer-brick-block-02 sewg-vis-tfrag 37) +(def-tex sewer-brick-block-04 sewg-vis-tfrag 38) +(def-tex sewer-block-02-hitweak sewg-vis-tfrag 39) +(def-tex sewer-metal-block-06-hitweak sewg-vis-tfrag 40) +(def-tex sewer-pipe-rim-06 sewg-vis-tfrag 41) +(def-tex sewer-rubber-rim-01 sewg-vis-tfrag 42) +(def-tex sewer-scaffold-02 sewg-vis-tfrag 43) +(def-tex sewer-flat-pipe-01 sewg-vis-tfrag 44) +(def-tex sewer-bolt-side-01 sewg-vis-tfrag 45) +(def-tex sewer-bolt-side-02 sewg-vis-tfrag 46) +(def-tex sewer-brick-roof-05 sewg-vis-tfrag 47) +(def-tex sewer-pipe-01 sewg-vis-tfrag 48) +(def-tex sewer-round-01 sewg-vis-tfrag 49) +(def-tex sewer-round-03 sewg-vis-tfrag 50) +(def-tex sewer-round-02 sewg-vis-tfrag 51) +(def-tex sewer-pipe-02-edge-01 sewg-vis-tfrag 52) +(def-tex sewer-pipe-rim-01 sewg-vis-tfrag 53) +(def-tex sewer-small-light-01 sewg-vis-tfrag 54) +(def-tex sewer-brick-block-01 sewg-vis-tfrag 55) +(def-tex sewer-brick-block-06 sewg-vis-tfrag 56) +(def-tex sewer-stone-arch-02 sewg-vis-tfrag 58) +(def-tex sewer-concrete-block-02 sewg-vis-tfrag 59) +(def-tex sewer-plate-06 sewg-vis-tfrag 60) +(def-tex sewer-plate-03-hitweak sewg-vis-tfrag 61) +(def-tex sewer-big-brace-trim-01 sewg-vis-tfrag 62) +(def-tex sewer-big-brace-trim-02 sewg-vis-tfrag 63) +(def-tex sewer-metal-edge-01 sewg-vis-tfrag 64) +(def-tex sewer-pool-rim-02 sewg-vis-tfrag 65) +(def-tex sewer-track-01 sewg-vis-tfrag 66) +(def-tex sewer-metal-floor-01 sewg-vis-tfrag 67) +(def-tex sewer-metal-floor-02 sewg-vis-tfrag 68) +(def-tex strip-black sewg-vis-tfrag 69) +(def-tex sewer-metal-block-04-hitweak sewg-vis-tfrag 70) +(def-tex sewer-flat-pipe-01-hitweak sewg-vis-tfrag 71) +(def-tex sewer-stone-newarch-01 sewg-vis-tfrag 72) +(def-tex sewer-lip-01-hitweak sewg-vis-tfrag 73) +(def-tex sewer-brick-block-04-hitweak sewg-vis-tfrag 74) +(def-tex sewer-block-01-hitweak sewg-vis-tfrag 75) +(def-tex sewer-nut sewg-vis-shrub 0) +(def-tex sewer-pipe-small-01 sewg-vis-shrub 1) +(def-tex sewer-moss-01 sewg-vis-shrub 2) +(def-tex sewer-hang-moss-01 sewg-vis-shrub 3) +(def-tex sew-jump-pad-grate sewg-vis-shrub 4) +(def-tex sewer-metal-01 sewg-vis-shrub 5) +(def-tex sewer-plate-05 sewg-vis-shrub 6) +(def-tex sewer-pipe-01 sewg-vis-shrub 7) +(def-tex sewer-pipe-rim-09 sewg-vis-shrub 8) +(def-tex sewer-pipe-rim-02 sewg-vis-shrub 9) +(def-tex sewer-pipe-small-02 sewg-vis-shrub 10) +(def-tex sew-moving-stepb-grate sewg-vis-shrub 11) +(def-tex sew-gasstep-tube sewg-vis-shrub 12) +(def-tex sew-mine-b-body sewg-vis-shrub 14) +(def-tex sewer-shrub-pitting-01 sewg-vis-shrub 15) +(def-tex sewer-moss-01 sewh-vis-shrub 0) +(def-tex sewer-hang-moss-01 sewh-vis-shrub 1) +(def-tex sewer-nut sewh-vis-shrub 2) +(def-tex sewer-pipe-small-01 sewh-vis-shrub 3) +(def-tex sew-moving-stepb-grate sewh-vis-shrub 4) +(def-tex sew-gasstep-tube sewh-vis-shrub 5) +(def-tex sewer-plate-05 sewh-vis-shrub 7) +(def-tex sew-mine-b-body sewh-vis-shrub 8) +(def-tex sewer-plate-02 sewi-vis-pris 0) +(def-tex sewer-plate-05 sewi-vis-pris 1) +(def-tex airlock-door-bolt sewi-vis-pris 2) +(def-tex airlock-door-cog sewi-vis-pris 3) +(def-tex airlock-door-main sewi-vis-pris 4) +(def-tex airlock-door-metal2 sewi-vis-pris 5) +(def-tex airlockl-door-metalframe sewi-vis-pris 6) +(def-tex sew-saw-arm sewi-vis-pris 7) +(def-tex sew-saw-blade sewi-vis-pris 8) +(def-tex sew-saw-body sewi-vis-pris 9) +(def-tex sew-saw-fan sewi-vis-pris 10) +(def-tex sew-saw-lens sewi-vis-pris 11) +(def-tex sew-saw-logo sewi-vis-pris 12) +(def-tex sew-saw-part1 sewi-vis-pris 13) +(def-tex sew-saw-part2 sewi-vis-pris 14) +(def-tex sew-saw-plate sewi-vis-pris 15) +(def-tex sew-saw-tubes sewi-vis-pris 16) +(def-tex sew-gun-panel-03 sewi-vis-pris 41) +(def-tex sew-jump-pad-grate sewi-vis-pris 42) +(def-tex sewer-nut-01 sewi-vis-pris 43) +(def-tex sewer-pipe-small-01 sewi-vis-pris 44) +(def-tex sewfence-01 sewi-vis-pris 45) +(def-tex sewfence-02 sewi-vis-pris 46) +(def-tex sewer-metal-floor-01 sewi-vis-pris 47) +(def-tex sewer-pipe-rim-07 sewi-vis-pris 48) +(def-tex sewer-screw-02 sewi-vis-pris 49) +(def-tex sew-jump-pad-grate-hitweak sewi-vis-pris 61) +(def-tex sewer-water-01-h sewh-vis-water 2) +(def-tex sewer-waterfall-02-h sewh-vis-water 3) +(def-tex sewer-water-01-h-dest sewh-vis-water 4) +(def-tex sewer-waterfall-02-h-dest sewh-vis-water 5) +(def-tex sewer-water-wave-02-h-dest sewh-vis-water 6) +(def-tex sewer-watefall-froth-01-h sewh-vis-water 7) +(def-tex sewer-water-wave-02-h sewh-vis-water 8) +(def-tex sewer-watefall-froth-01-h-dest sewh-vis-water 9) +(def-tex sew-gun-barrel-01 sewh-vis-pris 0) +(def-tex sew-gun-body-01 sewh-vis-pris 1) +(def-tex sew-gun-drum-01 sewh-vis-pris 2) +(def-tex sew-gun-panel-05 sewh-vis-pris 3) +(def-tex sew-gun-round-cap-01 sewh-vis-pris 4) +(def-tex sew-laserbeam-tip sewh-vis-pris 5) +(def-tex sewer-plate-03 sewh-vis-pris 6) +(def-tex scoutbot-legs sewh-vis-pris 7) +(def-tex scoutbot-lens sewh-vis-pris 8) +(def-tex scoutbot-plate-body sewh-vis-pris 9) +(def-tex scoutbot-plate-edge sewh-vis-pris 10) +(def-tex scoutbot-plate-logo sewh-vis-pris 11) +(def-tex scoutbot-shoulder sewh-vis-pris 12) +(def-tex sew-gun-round-01 sewh-vis-pris 13) +(def-tex sew-saw-part1 sewh-vis-pris 14) +(def-tex sew-saw-part2 sewh-vis-pris 15) +(def-tex sew-saw-tubes sewh-vis-pris 16) +(def-tex sew-gun-panel-02 sewh-vis-pris 17) +(def-tex sew-gun-rim-03 sewh-vis-pris 18) +(def-tex sew-metal-floor-01 sewh-vis-pris 19) +(def-tex sewer-metal-block-04 sewh-vis-pris 20) +(def-tex sewer-nut sewh-vis-pris 21) +(def-tex sewer-pipe-rim-05 sewh-vis-pris 22) +(def-tex sewer-pipe-rim-05b sewh-vis-pris 23) +(def-tex sew-gun-panel-06 sewh-vis-pris 29) +(def-tex sew-laserturret-1 sewh-vis-pris 30) +(def-tex sew-laserturret-2 sewh-vis-pris 31) +(def-tex sew-laserturret-center sewh-vis-pris 32) +(def-tex sew-laserturret-top sewh-vis-pris 33) +(def-tex sewer-plate-04 sewh-vis-pris 34) +(def-tex cguard1-backmetal sewh-vis-pris 36) +(def-tex cguard1-guntube sewh-vis-pris 37) +(def-tex environment-oldmetal sewh-vis-pris 38) +(def-tex kg-grunt-cable-01 sewh-vis-pris 39) +(def-tex kg-grunt-rim-03 sewh-vis-pris 40) +(def-tex roboguard-headshield sewh-vis-pris 41) +(def-tex widow-dull-inards sewh-vis-pris 42) +(def-tex blue-gem sewh-vis-pris 44) +(def-tex brown-hose sewh-vis-pris 45) +(def-tex cguard1-chestplate sewh-vis-pris 46) +(def-tex cguard1-gunmetaldark2 sewh-vis-pris 47) +(def-tex cguard1-lens sewh-vis-pris 48) +(def-tex cguardgame-backplate sewh-vis-pris 49) +(def-tex cguardgame-metaledark-02 sewh-vis-pris 50) +(def-tex cguardgame-metallight-01small sewh-vis-pris 51) +(def-tex cguardgame-shoebottom sewh-vis-pris 52) +(def-tex roboguard-die-stamped-metal-blue sewh-vis-pris 53) +(def-tex roboguard-die-stamped-metal-red sewh-vis-pris 54) +(def-tex roboguard-shouldershield sewh-vis-pris 55) +(def-tex squid-bulb-sm sewh-vis-pris 56) +(def-tex squid-tubes sewh-vis-pris 57) +(def-tex widow-pod-gun-metal sewh-vis-pris 58) +(def-tex wire-metal sewh-vis-pris 59) +(def-tex spydroid-gold sewh-vis-pris 60) +(def-tex spydroid-leg-grey sewh-vis-pris 61) +(def-tex spydroid-leg-grey-end sewh-vis-pris 62) +(def-tex spydroid-light sewh-vis-pris 63) +(def-tex spydroid-light-small sewh-vis-pris 64) +(def-tex spydroid-light-small-red sewh-vis-pris 65) +(def-tex spydroid-red sewh-vis-pris 66) +(def-tex squid-drabgun sewh-vis-pris 67) +(def-tex cguardgame-backplate sewg-vis-pris 0) +(def-tex cguardgame-metaledark-02 sewg-vis-pris 1) +(def-tex cguardgame-metallight-01small sewg-vis-pris 2) +(def-tex cguardgame-shoebottom sewg-vis-pris 3) +(def-tex sew-gun-drum-01 sewg-vis-pris 5) +(def-tex sewer-metal-01 sewg-vis-pris 6) +(def-tex sewer-metal-block-04 sewg-vis-pris 7) +(def-tex sewer-metal-floor-02 sewg-vis-pris 8) +(def-tex sewer-pipe-rim-07 sewg-vis-pris 10) +(def-tex sewer-plate-05 sewg-vis-pris 11) +(def-tex sewer-screw-02 sewg-vis-pris 12) +(def-tex airlock-door-bolt sewg-vis-pris 13) +(def-tex airlock-door-cog sewg-vis-pris 14) +(def-tex airlock-door-cog1 sewg-vis-pris 15) +(def-tex airlock-door-main sewg-vis-pris 16) +(def-tex airlock-door-metal2 sewg-vis-pris 17) +(def-tex airlockl-door-metalframe sewg-vis-pris 18) +(def-tex cguard1-backmetal sewg-vis-pris 35) +(def-tex cguard1-chestplate sewg-vis-pris 36) +(def-tex cguard1-gunmetaldark2 sewg-vis-pris 37) +(def-tex cguard1-guntube sewg-vis-pris 38) +(def-tex cguard1-lens sewg-vis-pris 40) +(def-tex environment-oldmetal sewg-vis-pris 42) +(def-tex roboguard-die-stamped-metal-blue sewg-vis-pris 43) +(def-tex roboguard-die-stamped-metal-red sewg-vis-pris 44) +(def-tex widow-pod-gun-metal sewg-vis-pris 45) +(def-tex wire-metal sewg-vis-pris 46) +(def-tex sew-fan-basetop sewg-vis-pris 47) +(def-tex sew-fan-canopy sewg-vis-pris 48) +(def-tex sew-gun-rim-04 sewg-vis-pris 49) +(def-tex sew-laserturret-pole sewg-vis-pris 50) +(def-tex sew-saw-lens sewg-vis-pris 51) +(def-tex sew-saw-part2 sewg-vis-pris 52) +(def-tex sewer-plate-04 sewg-vis-pris 53) +(def-tex sew-gun-barrel-01 sewg-vis-pris 61) +(def-tex sew-gun-body-01 sewg-vis-pris 62) +(def-tex sew-gun-panel-02 sewg-vis-pris 63) +(def-tex sew-gun-panel-05 sewg-vis-pris 64) +(def-tex sew-gun-rim-03 sewg-vis-pris 65) +(def-tex sew-laserbeam-tip sewg-vis-pris 66) +(def-tex sew-metal-floor-01 sewg-vis-pris 67) +(def-tex sewer-nut sewg-vis-pris 68) +(def-tex sewer-pipe-rim-05 sewg-vis-pris 69) +(def-tex sewer-pipe-rim-05b sewg-vis-pris 70) +(def-tex sewer-plate-03 sewg-vis-pris 71) +(def-tex blue-gem sewg-vis-pris 74) +(def-tex brown-hose sewg-vis-pris 75) +(def-tex roboguard-headshield sewg-vis-pris 76) +(def-tex roboguard-shouldershield sewg-vis-pris 77) +(def-tex squid-bulb-sm sewg-vis-pris 78) +(def-tex squid-tubes sewg-vis-pris 79) +(def-tex widow-dull-inards sewg-vis-pris 80) +(def-tex kg-grunt-cable-01 sewg-vis-pris 81) +(def-tex kg-grunt-rim-03 sewg-vis-pris 82) +(def-tex squid-drabgun sewg-vis-pris 84) +(def-tex sewer-waterfall-02-j sewj-vis-water 0) +(def-tex sewer-waterfall-02-j-dest sewj-vis-water 1) +(def-tex sewer-watefall-froth-01-j sewj-vis-water 2) +(def-tex sewer-watefall-froth-01-j-dest sewj-vis-water 3) +(def-tex sewer-metal-block-04 sewj-vis-tfrag 0) +(def-tex sewer-scaffold-01 sewj-vis-tfrag 1) +(def-tex sewer-concrete-edge-02 sewj-vis-tfrag 2) +(def-tex sewer-pipe-rim-05b sewj-vis-tfrag 3) +(def-tex sewer-nut-01 sewj-vis-tfrag 4) +(def-tex sewer-small-light-01 sewj-vis-tfrag 5) +(def-tex sewer-pipe-rim-08 sewj-vis-tfrag 6) +(def-tex sewer-brick-block-09 sewj-vis-tfrag 7) +(def-tex sewer-metal-block-07 sewj-vis-tfrag 8) +(def-tex sewer-scaffold-02 sewj-vis-tfrag 9) +(def-tex sewer-scaffold-03 sewj-vis-tfrag 10) +(def-tex sewer-pipe-rim-07-hitweak sewj-vis-tfrag 11) +(def-tex common-black sewj-vis-tfrag 12) +(def-tex sewer-pipe-02 sewj-vis-tfrag 13) +(def-tex sewer-metal-block-06 sewj-vis-tfrag 14) +(def-tex sewer-bolt-side-01 sewj-vis-tfrag 17) +(def-tex sewer-bolt-side-02 sewj-vis-tfrag 18) +(def-tex sewer-metal-trim-01 sewj-vis-tfrag 19) +(def-tex sewer-pipe-rim-06 sewj-vis-tfrag 21) +(def-tex sewer-plate-05 sewj-vis-tfrag 22) +(def-tex sewer-metal-03 sewj-vis-tfrag 23) +(def-tex sewer-lip-01-hitweak sewj-vis-tfrag 24) +(def-tex sewer-metal-floor-02 sewj-vis-tfrag 25) +(def-tex sewer-flat-pipe-01 sewj-vis-tfrag 26) +(def-tex sewer-metal-block-06-hitweak sewj-vis-tfrag 27) +(def-tex sewer-pipe-rim-09 sewj-vis-tfrag 28) +(def-tex sewer-pipe-rim-10 sewj-vis-tfrag 29) +(def-tex sewer-pipe-01 sewj-vis-tfrag 30) +(def-tex sewer-pipe-02-edge-01 sewj-vis-tfrag 31) +(def-tex sewer-pipe-rim-01 sewj-vis-tfrag 32) +(def-tex sewer-metal-block-02 sewj-vis-tfrag 33) +(def-tex sewer-metal-block-01 sewj-vis-tfrag 34) +(def-tex sewer-brick-block-04 sewj-vis-tfrag 35) +(def-tex sewer-brick-roof-01 sewj-vis-tfrag 36) +(def-tex sewer-block-01 sewj-vis-tfrag 40) +(def-tex sewer-plate-04 sewj-vis-tfrag 41) +(def-tex sewer-pipe-rim-07 sewj-vis-tfrag 45) +(def-tex sewer-pipe-small-02 sewj-vis-tfrag 47) +(def-tex sewer-brick-block-10 sewj-vis-tfrag 49) +(def-tex sewer-brick-block-11 sewj-vis-tfrag 50) +(def-tex sewer-brick-block-02 sewj-vis-tfrag 51) +(def-tex sewer-block-02-hitweak sewj-vis-tfrag 52) +(def-tex sewer-brick-roof-03 sewj-vis-tfrag 53) +(def-tex sewer-lip-01 sewj-vis-tfrag 54) +(def-tex sewer-metal-trim-02 sewj-vis-tfrag 55) +(def-tex sewer-round-01 sewj-vis-tfrag 56) +(def-tex sewer-round-03 sewj-vis-tfrag 57) +(def-tex sewer-round-02 sewj-vis-tfrag 58) +(def-tex sewer-plate-03-hitweak sewj-vis-tfrag 59) +(def-tex sewer-big-brace-trim-01 sewj-vis-tfrag 60) +(def-tex sewer-big-brace-trim-02 sewj-vis-tfrag 61) +(def-tex sewer-hall-light-01 sewj-vis-tfrag 62) +(def-tex sewer-plate-02 sewj-vis-tfrag 64) +(def-tex sewer-plate-03 sewj-vis-tfrag 65) +(def-tex sewer-brick-roof-02 sewj-vis-tfrag 66) +(def-tex sewer-brick-roof-04 sewj-vis-tfrag 67) +(def-tex sewer-big-brace-01 sewj-vis-tfrag 68) +(def-tex sewer-big-brace-02 sewj-vis-tfrag 69) +(def-tex sewer-block-02 sewj-vis-tfrag 70) +(def-tex sewer-grate-01 sewj-vis-tfrag 71) +(def-tex sewer-black sewj-vis-tfrag 72) +(def-tex strip-black sewj-vis-tfrag 73) +(def-tex sewer-metal-floor-01 sewj-vis-tfrag 74) +(def-tex sewer-stone-newarch-01 sewj-vis-tfrag 82) +(def-tex sewer-metal-edge-01 sewj-vis-tfrag 83) +(def-tex sewer-nut sewj-vis-shrub 0) +(def-tex sewer-pipe-small-01 sewj-vis-shrub 1) +(def-tex sewer-shrub-pitting-01 sewj-vis-shrub 5) +(def-tex airlock-door-bolt sewj-vis-pris 0) +(def-tex airlock-door-cog sewj-vis-pris 1) +(def-tex airlock-door-main sewj-vis-pris 2) +(def-tex airlock-door-metal2 sewj-vis-pris 3) +(def-tex airlockl-door-metalframe sewj-vis-pris 4) +(def-tex airlock-door-cog1 sewj-vis-pris 5) +(def-tex blue-gem sewj-vis-pris 7) +(def-tex brown-hose sewj-vis-pris 8) +(def-tex cguard1-backmetal sewj-vis-pris 9) +(def-tex cguard1-chestplate sewj-vis-pris 10) +(def-tex cguard1-gunmetaldark2 sewj-vis-pris 11) +(def-tex cguard1-guntube sewj-vis-pris 12) +(def-tex cguard1-lens sewj-vis-pris 13) +(def-tex cguardgame-backplate sewj-vis-pris 14) +(def-tex cguardgame-metaledark-02 sewj-vis-pris 15) +(def-tex cguardgame-metallight-01small sewj-vis-pris 16) +(def-tex cguardgame-shoebottom sewj-vis-pris 17) +(def-tex environment-oldmetal sewj-vis-pris 18) +(def-tex kg-grunt-cable-01 sewj-vis-pris 19) +(def-tex kg-grunt-rim-03 sewj-vis-pris 20) +(def-tex roboguard-die-stamped-metal-blue sewj-vis-pris 21) +(def-tex roboguard-die-stamped-metal-red sewj-vis-pris 22) +(def-tex roboguard-headshield sewj-vis-pris 23) +(def-tex roboguard-shouldershield sewj-vis-pris 24) +(def-tex squid-bulb-sm sewj-vis-pris 25) +(def-tex squid-tubes sewj-vis-pris 26) +(def-tex widow-dull-inards sewj-vis-pris 27) +(def-tex widow-pod-gun-metal sewj-vis-pris 28) +(def-tex wire-metal sewj-vis-pris 29) +(def-tex squid-drabgun sewj-vis-pris 30) +(def-tex sewer-plate-05 sewm-vis-tfrag 0) +(def-tex sewer-mantel-01 sewm-vis-tfrag 1) +(def-tex sewer-metal-block-02-small sewm-vis-tfrag 2) +(def-tex sewer-block-02 sewm-vis-tfrag 3) +(def-tex sewer-block-01 sewm-vis-tfrag 4) +(def-tex sewer-plate-05-hitweak sewm-vis-tfrag 5) +(def-tex sewer-metal-block-06-hitweak sewm-vis-tfrag 6) +(def-tex sewer-plate-01 sewm-vis-tfrag 7) +(def-tex sewer-metal-block-04 sewm-vis-tfrag 8) +(def-tex sewer-pipe-rim-08 sewm-vis-tfrag 9) +(def-tex sewer-metal-block-02 sewm-vis-tfrag 10) +(def-tex sewer-pipe-rim-05b sewm-vis-tfrag 11) +(def-tex sewer-lip-01 sewm-vis-tfrag 12) +(def-tex sewer-metal-trim-02 sewm-vis-tfrag 13) +(def-tex common-black sewm-vis-tfrag 14) +(def-tex sewer-concrete-edge-01 sewm-vis-tfrag 15) +(def-tex sewer-pipe-small-02 sewm-vis-tfrag 16) +(def-tex sewer-pipe-rim-03 sewm-vis-tfrag 17) +(def-tex sewer-metal-block-01 sewm-vis-tfrag 18) +(def-tex sewer-metal-block-05 sewm-vis-tfrag 19) +(def-tex sewer-plate-02 sewm-vis-tfrag 20) +(def-tex sewer-rubber-rim-01 sewm-vis-tfrag 21) +(def-tex sewer-metal-block-06 sewm-vis-tfrag 23) +(def-tex sewer-pipe-02 sewm-vis-tfrag 24) +(def-tex sewer-pipe-rim-09 sewm-vis-tfrag 25) +(def-tex sewer-metal-03 sewm-vis-tfrag 26) +(def-tex sewer-metal-trim-01 sewm-vis-tfrag 27) +(def-tex sewer-scaffold-01 sewm-vis-tfrag 28) +(def-tex sewer-concrete-edge-02 sewm-vis-tfrag 29) +(def-tex sewer-pipe-rim-05 sewm-vis-tfrag 30) +(def-tex sewer-plate-04 sewm-vis-tfrag 31) +(def-tex sewer-pipe-rim-07 sewm-vis-tfrag 32) +(def-tex sewer-plate-03 sewm-vis-tfrag 33) +(def-tex sewer-flat-pipe-01 sewm-vis-tfrag 34) +(def-tex sewer-brick-roof-01 sewm-vis-tfrag 36) +(def-tex sewer-scaffold-03 sewm-vis-tfrag 37) +(def-tex sewer-brick-block-11 sewm-vis-tfrag 38) +(def-tex sewer-brick-block-10 sewm-vis-tfrag 39) +(def-tex sewer-brick-block-01 sewm-vis-tfrag 40) +(def-tex sewer-brick-block-06 sewm-vis-tfrag 41) +(def-tex sewer-concrete-block-02 sewm-vis-tfrag 42) +(def-tex sewer-brick-block-02 sewm-vis-tfrag 43) +(def-tex sewer-pipe-01 sewm-vis-tfrag 44) +(def-tex sewer-pipe-02-edge-01 sewm-vis-tfrag 45) +(def-tex sewer-pipe-rim-01 sewm-vis-tfrag 46) +(def-tex sewer-round-03 sewm-vis-tfrag 47) +(def-tex sewer-round-02 sewm-vis-tfrag 48) +(def-tex sewer-round-01 sewm-vis-tfrag 49) +(def-tex sewer-pipe-rim-06 sewm-vis-tfrag 50) +(def-tex sewer-brick-roof-05 sewm-vis-tfrag 51) +(def-tex sewer-hall-light-01 sewm-vis-tfrag 52) +(def-tex sewer-bolt-side-01 sewm-vis-tfrag 53) +(def-tex sewer-bolt-side-02 sewm-vis-tfrag 54) +(def-tex sewer-natural-rock sewm-vis-tfrag 55) +(def-tex sewer-rebar sewm-vis-tfrag 56) +(def-tex sewer-block-02-hitweak sewm-vis-tfrag 58) +(def-tex sewer-pipe-rim-10 sewm-vis-tfrag 59) +(def-tex sewer-metal-floor-01 sewm-vis-tfrag 60) +(def-tex sewer-metal-edge-01 sewm-vis-tfrag 62) +(def-tex sewer-pool-rim-02 sewm-vis-tfrag 63) +(def-tex sewer-small-light-01 sewm-vis-tfrag 64) +(def-tex sewer-black sewm-vis-tfrag 65) +(def-tex sewer-nut sewm-vis-tfrag 66) +(def-tex sewer-nut-rim sewm-vis-tfrag 67) +(def-tex strip-black sewm-vis-tfrag 68) +(def-tex sewer-mantel-02 sewm-vis-tfrag 69) +(def-tex sewer-lip-01-hitweak sewm-vis-tfrag 70) +(def-tex sewer-flat-pipe-01-hitweak sewm-vis-tfrag 71) +(def-tex sewer-metal-block-01-hitweak sewm-vis-tfrag 72) +(def-tex sewer-brick-block-04-highertweak sewm-vis-tfrag 73) +(def-tex sewer-scaffold-03-hitweak sewm-vis-tfrag 74) +(def-tex sewer-pipe-rim-05b-hitweak sewm-vis-tfrag 75) +(def-tex sewer-plate-01-hitweak sewm-vis-tfrag 76) +(def-tex sewer-metal-block-04-hitweak sewm-vis-tfrag 77) +(def-tex sewer-brick-block-04-hitweak sewm-vis-tfrag 78) +(def-tex sewer-block-01-hitweak sewm-vis-tfrag 79) +(def-tex sewer-panel-01 sewm-vis-tfrag 80) +(def-tex sewer-rim-01 sewm-vis-tfrag 81) +(def-tex sewer-metal-02 sewm-vis-tfrag 82) +(def-tex sewer-grindpipe sewm-vis-tfrag 83) +(def-tex sewer-grate-01 sewm-vis-tfrag 84) +(def-tex sewer-brick-roof-06 sewm-vis-tfrag 85) +(def-tex sewer-nut sewm-vis-shrub 0) +(def-tex sewer-moss-01 sewm-vis-shrub 1) +(def-tex sewer-hang-moss-01 sewm-vis-shrub 2) +(def-tex sewer-shrub-rust-01 sewm-vis-shrub 3) +(def-tex sewer-pipe-small-01 sewm-vis-shrub 4) +(def-tex sew-jump-pad-grate sewm-vis-shrub 5) +(def-tex sewer-metal-01 sewm-vis-shrub 6) +(def-tex sewer-plate-05 sewm-vis-shrub 7) +(def-tex sewer-pipe-01 sewm-vis-shrub 8) +(def-tex sewer-pipe-rim-09 sewm-vis-shrub 9) +(def-tex sewer-pipe-rim-02 sewm-vis-shrub 10) +(def-tex sewer-pipe-small-02 sewm-vis-shrub 11) +(def-tex sewer-water-01-m-dest sewm-vis-water 0) +(def-tex sewer-waterfall-02-m-dest sewm-vis-water 1) +(def-tex sewer-water-highlight-01-m-dest sewm-vis-water 2) +(def-tex sewer-water-01-m sewm-vis-water 4) +(def-tex sewer-water-highlight-01-m sewm-vis-water 5) +(def-tex sewer-water-still-01-m sewm-vis-water 6) +(def-tex sewer-water-wave-01-m sewm-vis-water 7) +(def-tex sewer-waterfall-01-m sewm-vis-water 8) +(def-tex sewer-waterfall-02-m sewm-vis-water 9) +(def-tex sewer-waterfall-01-m-dest sewm-vis-water 10) +(def-tex sewer-water-still-01-m-dest sewm-vis-water 11) +(def-tex sewer-water-wave-01-m-dest sewm-vis-water 12) +(def-tex sewer-watefall-froth-01-m sewm-vis-water 13) +(def-tex sewer-watefall-froth-01-m-dest sewm-vis-water 14) +(def-tex airlock-door-bolt sewm-vis-pris 0) +(def-tex airlock-door-cog sewm-vis-pris 1) +(def-tex airlock-door-main sewm-vis-pris 2) +(def-tex airlock-door-metal2 sewm-vis-pris 3) +(def-tex airlockl-door-metalframe sewm-vis-pris 4) +(def-tex sewer-metal-01 sewm-vis-pris 6) +(def-tex sewer-plate-05 sewm-vis-pris 11) +(def-tex sew-fan-basetop sewm-vis-pris 12) +(def-tex sew-fan-canopy sewm-vis-pris 13) +(def-tex sew-gun-drum-01 sewm-vis-pris 14) +(def-tex sew-gun-rim-04 sewm-vis-pris 15) +(def-tex sew-laserturret-pole sewm-vis-pris 16) +(def-tex sew-saw-lens sewm-vis-pris 17) +(def-tex sew-saw-part2 sewm-vis-pris 18) +(def-tex sewer-metal-block-04 sewm-vis-pris 19) +(def-tex sewer-metal-floor-02 sewm-vis-pris 20) +(def-tex sewer-pipe-rim-07 sewm-vis-pris 21) +(def-tex sewer-plate-04 sewm-vis-pris 22) +(def-tex sewer-screw-02 sewm-vis-pris 23) +(def-tex nfish-eye-01 sewm-vis-pris 24) +(def-tex nfish-hose sewm-vis-pris 25) +(def-tex nfish-hose-02 sewm-vis-pris 26) +(def-tex nfish-metal-01 sewm-vis-pris 27) +(def-tex nfish-metalspike-01 sewm-vis-pris 28) +(def-tex nfish-skin-01 sewm-vis-pris 29) +(def-tex nfish-teeth-01 sewm-vis-pris 30) +(def-tex sewer-watefall-froth-01-l sewl-vis-water 2) +(def-tex sewer-waterfall-02-l sewl-vis-water 3) +(def-tex sewer-waterfall-02-l-dest sewl-vis-water 4) +(def-tex sewer-watefall-froth-01-l-dest sewl-vis-water 5) +(def-tex sewer-metal-block-04 sewl-vis-tfrag 0) +(def-tex sewer-scaffold-01 sewl-vis-tfrag 1) +(def-tex sewer-concrete-edge-02 sewl-vis-tfrag 2) +(def-tex sewer-pipe-rim-05b sewl-vis-tfrag 3) +(def-tex sewer-nut-01 sewl-vis-tfrag 4) +(def-tex sewer-small-light-01 sewl-vis-tfrag 5) +(def-tex sewer-pipe-rim-08 sewl-vis-tfrag 6) +(def-tex sewer-brick-block-09 sewl-vis-tfrag 7) +(def-tex sewer-metal-block-07 sewl-vis-tfrag 8) +(def-tex sewer-scaffold-02 sewl-vis-tfrag 9) +(def-tex sewer-scaffold-03 sewl-vis-tfrag 10) +(def-tex sewer-pipe-rim-07-hitweak sewl-vis-tfrag 11) +(def-tex common-black sewl-vis-tfrag 12) +(def-tex sewer-pipe-02 sewl-vis-tfrag 13) +(def-tex sewer-metal-block-06 sewl-vis-tfrag 14) +(def-tex sewer-bolt-side-01 sewl-vis-tfrag 17) +(def-tex sewer-bolt-side-02 sewl-vis-tfrag 18) +(def-tex sewer-metal-trim-01 sewl-vis-tfrag 19) +(def-tex sewer-pipe-rim-06 sewl-vis-tfrag 21) +(def-tex sewer-plate-05 sewl-vis-tfrag 22) +(def-tex sewer-metal-03 sewl-vis-tfrag 23) +(def-tex sewer-lip-01-hitweak sewl-vis-tfrag 24) +(def-tex sewer-metal-floor-02 sewl-vis-tfrag 25) +(def-tex sewer-flat-pipe-01 sewl-vis-tfrag 26) +(def-tex sewer-metal-block-06-hitweak sewl-vis-tfrag 27) +(def-tex sewer-pipe-rim-09 sewl-vis-tfrag 28) +(def-tex sewer-pipe-rim-10 sewl-vis-tfrag 29) +(def-tex sewer-pipe-01 sewl-vis-tfrag 30) +(def-tex sewer-pipe-02-edge-01 sewl-vis-tfrag 31) +(def-tex sewer-pipe-rim-01 sewl-vis-tfrag 32) +(def-tex sewer-metal-block-02 sewl-vis-tfrag 33) +(def-tex sewer-metal-block-01 sewl-vis-tfrag 34) +(def-tex sewer-brick-roof-01 sewl-vis-tfrag 36) +(def-tex sewer-pipe-rim-03 sewl-vis-tfrag 37) +(def-tex sewer-block-01 sewl-vis-tfrag 40) +(def-tex sewer-plate-04 sewl-vis-tfrag 41) +(def-tex sewer-pipe-rim-05 sewl-vis-tfrag 42) +(def-tex sewer-metal-02 sewl-vis-tfrag 43) +(def-tex sewer-grill-02 sewl-vis-tfrag 44) +(def-tex sewer-pipe-rim-07 sewl-vis-tfrag 45) +(def-tex sewer-concrete-edge-01 sewl-vis-tfrag 46) +(def-tex sewer-pipe-small-02 sewl-vis-tfrag 47) +(def-tex sewer-brick-block-10 sewl-vis-tfrag 49) +(def-tex sewer-brick-block-11 sewl-vis-tfrag 50) +(def-tex sewer-brick-roof-03 sewl-vis-tfrag 53) +(def-tex sewer-lip-01 sewl-vis-tfrag 54) +(def-tex sewer-metal-trim-02 sewl-vis-tfrag 55) +(def-tex sewer-round-01 sewl-vis-tfrag 56) +(def-tex sewer-round-03 sewl-vis-tfrag 57) +(def-tex sewer-round-02 sewl-vis-tfrag 58) +(def-tex sewer-plate-03-hitweak sewl-vis-tfrag 59) +(def-tex sewer-big-brace-trim-01 sewl-vis-tfrag 60) +(def-tex sewer-big-brace-trim-02 sewl-vis-tfrag 61) +(def-tex sewer-hall-light-01 sewl-vis-tfrag 62) +(def-tex sewer-plate-01 sewl-vis-tfrag 63) +(def-tex sewer-plate-02 sewl-vis-tfrag 64) +(def-tex sewer-plate-03 sewl-vis-tfrag 65) +(def-tex sewer-brick-roof-02 sewl-vis-tfrag 66) +(def-tex sewer-brick-roof-04 sewl-vis-tfrag 67) +(def-tex sewer-big-brace-01 sewl-vis-tfrag 68) +(def-tex sewer-big-brace-02 sewl-vis-tfrag 69) +(def-tex sewer-block-02 sewl-vis-tfrag 70) +(def-tex sewer-grate-01 sewl-vis-tfrag 71) +(def-tex sewer-black sewl-vis-tfrag 72) +(def-tex sewer-metal-floor-01 sewl-vis-tfrag 73) +(def-tex strip-black sewl-vis-tfrag 74) +(def-tex sewer-metal-block-05 sewl-vis-tfrag 75) +(def-tex sewer-brick-block-04-highertweak sewl-vis-tfrag 76) +(def-tex sewer-scaffold-03-hitweak sewl-vis-tfrag 77) +(def-tex sewer-pipe-rim-05b-hitweak sewl-vis-tfrag 78) +(def-tex sewer-plate-01-hitweak sewl-vis-tfrag 79) +(def-tex sewer-metal-block-04-hitweak sewl-vis-tfrag 80) +(def-tex sewer-metal-block-01-hitweak sewl-vis-tfrag 81) +(def-tex sewer-metal-edge-01 sewl-vis-tfrag 83) +(def-tex sewer-nut sewl-vis-shrub 0) +(def-tex sewer-pipe-small-01 sewl-vis-shrub 1) +(def-tex sewer-moss-01 sewl-vis-shrub 2) +(def-tex sewer-hang-moss-01 sewl-vis-shrub 3) +(def-tex sewer-shrub-rust-01 sewl-vis-shrub 4) +(def-tex sewer-shrub-pitting-01 sewl-vis-shrub 5) +(def-tex airlock-door-bolt sewl-vis-pris 0) +(def-tex airlock-door-cog sewl-vis-pris 1) +(def-tex airlock-door-main sewl-vis-pris 2) +(def-tex airlock-door-metal2 sewl-vis-pris 3) +(def-tex airlockl-door-metalframe sewl-vis-pris 4) +(def-tex airlock-door-cog1 sewl-vis-pris 5) +(def-tex grunt-eye-01 sewl-vis-pris 6) +(def-tex grunt-gem-01 sewl-vis-pris 7) +(def-tex grunt-metal-01 sewl-vis-pris 9) +(def-tex grunt-skin-02 sewl-vis-pris 11) +(def-tex grunt-skin-03 sewl-vis-pris 12) +(def-tex nwasp-eye-01 sewl-vis-pris 13) +(def-tex nwasp-gem-01 sewl-vis-pris 14) +(def-tex nwasp-hose sewl-vis-pris 15) +(def-tex nwasp-metal-01 sewl-vis-pris 16) +(def-tex nwasp-skin-01 sewl-vis-pris 17) +(def-tex nwasp-skin-02 sewl-vis-pris 18) +(def-tex nwasp-skin-03 sewl-vis-pris 19) +(def-tex bam-eyelight lsig-pris2 0) +(def-tex charHOLD lsig-pris2 1) +(def-tex environment-oldmetal lsig-pris2 2) +(def-tex sig-belt lsig-pris2 3) +(def-tex sig-eye lsig-pris2 4) +(def-tex sig-eyelid lsig-pris2 5) +(def-tex sig-faceleft lsig-pris2 6) +(def-tex sig-facert lsig-pris2 7) +(def-tex sig-flask lsig-pris2 8) +(def-tex sig-gem-01 lsig-pris2 9) +(def-tex sig-glove lsig-pris2 10) +(def-tex sig-glovetop lsig-pris2 11) +(def-tex sig-gun-01 lsig-pris2 12) +(def-tex sig-gun-02 lsig-pris2 13) +(def-tex sig-gun-03 lsig-pris2 14) +(def-tex sig-gun-04 lsig-pris2 15) +(def-tex sig-gun-05 lsig-pris2 16) +(def-tex sig-headgear lsig-pris2 17) +(def-tex sig-horn lsig-pris2 18) +(def-tex sig-lens lsig-pris2 19) +(def-tex sig-metal-01 lsig-pris2 20) +(def-tex sig-metal-dirty lsig-pris2 21) +(def-tex sig-sac lsig-pris2 22) +(def-tex sig-shoebottom lsig-pris2 23) +(def-tex sig-shoetop lsig-pris2 24) +(def-tex sig-shoulderarmor lsig-pris2 25) +(def-tex sig-skirts lsig-pris2 26) +(def-tex sig-skirts-02 lsig-pris2 27) +(def-tex sig-skirts-03 lsig-pris2 28) +(def-tex sig-undergarments lsig-pris2 29) +(def-tex vin-teeth-01 lsig-pris2 30) +(def-tex sig-flatfangs lsig-water 0) +(def-tex bam-eyelight onintent-pris 0) +(def-tex bam-hairhilite onintent-pris 1) +(def-tex daxter-eyelid onintent-pris 2) +(def-tex daxter-furhilite onintent-pris 3) +(def-tex daxter-orange onintent-pris 4) +(def-tex daxterarm onintent-pris 5) +(def-tex daxterbodyshort-eix onintent-pris 6) +(def-tex daxterbolt onintent-pris 7) +(def-tex daxterear onintent-pris 8) +(def-tex daxterfinger onintent-pris 9) +(def-tex daxterfoot onintent-pris 10) +(def-tex daxterfoot-bottom onintent-pris 11) +(def-tex daxtergoggles onintent-pris 12) +(def-tex daxterheadwidenew onintent-pris 13) +(def-tex daxterhelmetplain onintent-pris 14) +(def-tex daxterlense onintent-pris 15) +(def-tex daxternose onintent-pris 16) +(def-tex daxterteeth onintent-pris 17) +(def-tex daxtertuft onintent-pris 18) +(def-tex environment-oldmetal onintent-pris 19) +(def-tex onin-arm onintent-pris 48) +(def-tex onin-bowlhead onintent-pris 49) +(def-tex onin-braclet onintent-pris 50) +(def-tex onin-chain onintent-pris 52) +(def-tex onin-eye onintent-pris 53) +(def-tex onin-eyelid onintent-pris 54) +(def-tex onin-face onintent-pris 55) +(def-tex onin-finger onintent-pris 56) +(def-tex onin-hair onintent-pris 57) +(def-tex onin-hand onintent-pris 58) +(def-tex onin-handpalm onintent-pris 59) +(def-tex onin-idol onintent-pris 60) +(def-tex onin-idoleye onintent-pris 61) +(def-tex onin-mat onintent-pris 62) +(def-tex onin-neck onintent-pris 63) +(def-tex onin-rings onintent-pris 64) +(def-tex onin-rings2 onintent-pris 65) +(def-tex onin-scarf onintent-pris 66) +(def-tex onin-shirt onintent-pris 67) +(def-tex onin-skirt onintent-pris 68) +(def-tex onin-teeth onintent-pris 69) +(def-tex onin-toe onintent-pris 70) +(def-tex pecker-body-01 onintent-pris 71) +(def-tex pecker-eyelid onintent-pris 72) +(def-tex pecker-face onintent-pris 73) +(def-tex pecker-plume onintent-pris 74) +(def-tex pecker-tail onintent-pris 75) +(def-tex pecker-teeth onintent-pris 76) +(def-tex pecker-wingbottom onintent-pris 77) +(def-tex pecker-wingtop onintent-pris 78) +(def-tex pecker-yellowfur onintent-pris 79) +(def-tex jakc-armor onintent-pris 82) +(def-tex jakc-chestplate-straps onintent-pris 83) +(def-tex jakc-gogglemetal onintent-pris 84) +(def-tex jakc-lens onintent-pris 85) +(def-tex jakc-scarf onintent-pris 86) +(def-tex jakc-waistband2 onintent-pris 87) +(def-tex jakc-wraps onintent-pris 88) +(def-tex jakc-wristband-a2 onintent-pris 89) +(def-tex jakchires-arm onintent-pris 90) +(def-tex jakchires-blackstrap onintent-pris 91) +(def-tex jakchires-brownstrap onintent-pris 92) +(def-tex jakchires-brwnleather onintent-pris 93) +(def-tex jakchires-chestplate onintent-pris 94) +(def-tex jakchires-clips onintent-pris 95) +(def-tex jakchires-eye onintent-pris 96) +(def-tex jakchires-eyebrow onintent-pris 97) +(def-tex jakchires-eyelid onintent-pris 98) +(def-tex jakchires-facelft onintent-pris 99) +(def-tex jakchires-facert onintent-pris 100) +(def-tex jakchires-glovetop onintent-pris 101) +(def-tex jakchires-hair onintent-pris 102) +(def-tex jakchires-horn onintent-pris 103) +(def-tex jakchires-jacket onintent-pris 104) +(def-tex jakchires-leatherpouch onintent-pris 105) +(def-tex jakchires-lightbrownspat onintent-pris 106) +(def-tex jakchires-pants onintent-pris 107) +(def-tex jakchires-precarmor-01 onintent-pris 108) +(def-tex jakchires-shoebottom onintent-pris 109) +(def-tex jakchires-shoemetal onintent-pris 110) +(def-tex jakchires-shoeteop onintent-pris 111) +(def-tex jakchires-teeth onintent-pris 112) +(def-tex jakc-skirt onintent-pris 113) +(def-tex jakc-scarfhanging onintent-pris 114) +(def-tex hummingbird-body onintent-sprite 0) +(def-tex hummingbird-wing onintent-sprite 1) +(def-tex hummingbird-wing2 onintent-sprite 2) +(def-tex onin-game-circle onintent-sprite 3) +(def-tex onin-game-circle-darkener onintent-sprite 4) +(def-tex onin-game-scatter onintent-sprite 5) +(def-tex onin-game-square onintent-sprite 6) +(def-tex onin-game-square-darkener onintent-sprite 7) +(def-tex onin-game-triangle onintent-sprite 8) +(def-tex onin-game-triangle-darkener onintent-sprite 9) +(def-tex onin-game-x onintent-sprite 10) +(def-tex onin-game-x-darkener onintent-sprite 11) +(def-tex onin-magic-bigpuff onintent-sprite 12) +(def-tex onin-spider-01 onintent-sprite 13) +(def-tex onin-spider-02 onintent-sprite 14) +(def-tex onin-spider-03 onintent-sprite 15) +(def-tex onin-bamboo-mat onintent-tfrag 0) +(def-tex onin-basket onintent-tfrag 1) +(def-tex onin-basket-rim onintent-tfrag 2) +(def-tex onin-basket2 onintent-tfrag 3) +(def-tex onin-bottle-1 onintent-tfrag 4) +(def-tex onin-bottle-2 onintent-tfrag 5) +(def-tex onin-bottle-3 onintent-tfrag 6) +(def-tex onin-bottle-3-label onintent-tfrag 7) +(def-tex onin-bottle-cork onintent-tfrag 8) +(def-tex onin-bowl onintent-tfrag 9) +(def-tex onin-bowl2 onintent-tfrag 10) +(def-tex onin-cage-bottom onintent-tfrag 11) +(def-tex onin-cage-grey onintent-tfrag 12) +(def-tex onin-cage-plain onintent-tfrag 13) +(def-tex onin-cage-top onintent-tfrag 14) +(def-tex onin-candle onintent-tfrag 15) +(def-tex onin-candle-holder onintent-tfrag 16) +(def-tex onin-circle-rug onintent-tfrag 17) +(def-tex onin-circle-rug-mid onintent-tfrag 18) +(def-tex onin-circle-rug-top onintent-tfrag 19) +(def-tex onin-crate-body onintent-tfrag 20) +(def-tex onin-critter-face onintent-tfrag 21) +(def-tex onin-critter-fur onintent-tfrag 22) +(def-tex onin-critter-fur-trans onintent-tfrag 23) +(def-tex onin-dirt-floor onintent-tfrag 24) +(def-tex onin-dresser-drawer onintent-tfrag 25) +(def-tex onin-dresser-drawer-b onintent-tfrag 26) +(def-tex onin-dresser-drawer-handle onintent-tfrag 27) +(def-tex onin-dresser-drawer2 onintent-tfrag 28) +(def-tex onin-dresser-wood onintent-tfrag 29) +(def-tex onin-dresser-wood2 onintent-tfrag 30) +(def-tex onin-genie-lamp onintent-tfrag 31) +(def-tex onin-genie-lamp-plain onintent-tfrag 32) +(def-tex onin-jar onintent-tfrag 33) +(def-tex onin-jar-bottom onintent-tfrag 34) +(def-tex onin-plain-metal onintent-tfrag 35) +(def-tex onin-rocks onintent-tfrag 36) +(def-tex onin-rope onintent-tfrag 37) +(def-tex onin-rug-long onintent-tfrag 38) +(def-tex onin-rug-rolled onintent-tfrag 39) +(def-tex onin-rug-rolled-top onintent-tfrag 40) +(def-tex onin-sack onintent-tfrag 41) +(def-tex onin-shelf onintent-tfrag 42) +(def-tex onin-shelf-inside onintent-tfrag 43) +(def-tex onin-skull onintent-tfrag 44) +(def-tex onin-skull-bottom onintent-tfrag 45) +(def-tex onin-skull-pattern onintent-tfrag 46) +(def-tex onin-skull-teeth onintent-tfrag 47) +(def-tex onin-skull-top onintent-tfrag 48) +(def-tex onin-table onintent-tfrag 49) +(def-tex onin-table-rim onintent-tfrag 50) +(def-tex onin-tank-bolt onintent-tfrag 51) +(def-tex onin-tank-center-piece onintent-tfrag 52) +(def-tex onin-tank-glass onintent-tfrag 53) +(def-tex onin-tank-metal onintent-tfrag 54) +(def-tex onin-tank-wood onintent-tfrag 55) +(def-tex onin-tassles onintent-tfrag 56) +(def-tex onin-temp-01 onintent-tfrag 57) +(def-tex onin-tent onintent-tfrag 58) +(def-tex onin-tent-base onintent-tfrag 59) +(def-tex onin-tent-base-patch1 onintent-tfrag 60) +(def-tex onin-tent-patch1 onintent-tfrag 61) +(def-tex onin-tent-patch2 onintent-tfrag 62) +(def-tex onin-tent-wood-posts onintent-tfrag 63) +(def-tex onin-tank-glass onintent-water 0) +(def-tex bam-eyelight onintent-pris2 0) +(def-tex bam-hairhilite onintent-pris2 1) +(def-tex samos-arm onintent-pris2 2) +(def-tex samos-diaper onintent-pris2 3) +(def-tex samos-ear onintent-pris2 4) +(def-tex samos-eye onintent-pris2 5) +(def-tex samos-eyelid onintent-pris2 6) +(def-tex samos-face onintent-pris2 7) +(def-tex samos-finger-01 onintent-pris2 8) +(def-tex samos-hair onintent-pris2 9) +(def-tex samos-helmet onintent-pris2 10) +(def-tex samos-leaf onintent-pris2 11) +(def-tex samos-lens onintent-pris2 12) +(def-tex samos-log-01 onintent-pris2 13) +(def-tex samos-log-02 onintent-pris2 14) +(def-tex samos-log-03 onintent-pris2 15) +(def-tex samos-metal onintent-pris2 16) +(def-tex samos-strap onintent-pris2 17) +(def-tex samos-teeth2 onintent-pris2 18) +(def-tex samos-vest onintent-pris2 19) +(def-tex samosbird-beak onintent-pris2 20) +(def-tex samosbird-body onintent-pris2 21) +(def-tex samosbird-eye onintent-pris2 22) +(def-tex samosbird-plume onintent-pris2 23) +(def-tex samosbird-wing onintent-pris2 24) +(def-tex bam-eyelight ltornsam-pris2 0) +(def-tex bam-hairhilite ltornsam-pris2 1) +(def-tex samos-arm ltornsam-pris2 2) +(def-tex samos-diaper ltornsam-pris2 3) +(def-tex samos-ear ltornsam-pris2 4) +(def-tex samos-eye ltornsam-pris2 5) +(def-tex samos-eyelid ltornsam-pris2 6) +(def-tex samos-face ltornsam-pris2 7) +(def-tex samos-finger-01 ltornsam-pris2 8) +(def-tex samos-hair ltornsam-pris2 9) +(def-tex samos-helmet ltornsam-pris2 10) +(def-tex samos-leaf ltornsam-pris2 11) +(def-tex samos-lens ltornsam-pris2 12) +(def-tex samos-log-01 ltornsam-pris2 13) +(def-tex samos-log-02 ltornsam-pris2 14) +(def-tex samos-log-03 ltornsam-pris2 15) +(def-tex samos-metal ltornsam-pris2 16) +(def-tex samos-strap ltornsam-pris2 17) +(def-tex samos-teeth2 ltornsam-pris2 18) +(def-tex samos-vest ltornsam-pris2 19) +(def-tex samosbird-beak ltornsam-pris2 20) +(def-tex samosbird-body ltornsam-pris2 21) +(def-tex samosbird-eye ltornsam-pris2 22) +(def-tex samosbird-plume ltornsam-pris2 23) +(def-tex samosbird-wing ltornsam-pris2 24) +(def-tex charHOLD ltornsam-pris2 25) +(def-tex torn-armlft ltornsam-pris2 26) +(def-tex torn-armor ltornsam-pris2 27) +(def-tex torn-belt ltornsam-pris2 28) +(def-tex torn-belt2 ltornsam-pris2 29) +(def-tex torn-blademetal ltornsam-pris2 30) +(def-tex torn-ear ltornsam-pris2 31) +(def-tex torn-eye ltornsam-pris2 32) +(def-tex torn-eyelid ltornsam-pris2 33) +(def-tex torn-face ltornsam-pris2 34) +(def-tex torn-face-right ltornsam-pris2 35) +(def-tex torn-finger ltornsam-pris2 36) +(def-tex torn-footleather ltornsam-pris2 37) +(def-tex torn-gunbarrel ltornsam-pris2 38) +(def-tex torn-gunbarrel-02 ltornsam-pris2 39) +(def-tex torn-hair-01 ltornsam-pris2 40) +(def-tex torn-hair-02 ltornsam-pris2 41) +(def-tex torn-handle-01 ltornsam-pris2 42) +(def-tex torn-legshield ltornsam-pris2 43) +(def-tex torn-metal2 ltornsam-pris2 44) +(def-tex torn-mouth ltornsam-pris2 45) +(def-tex torn-pipe ltornsam-pris2 46) +(def-tex torn-scarf ltornsam-pris2 47) +(def-tex torn-shoe ltornsam-pris2 48) +(def-tex torn-shoe-02 ltornsam-pris2 49) +(def-tex torn-teeth-01 ltornsam-pris2 50) +(def-tex torn-vest ltornsam-pris2 51) +(def-tex bam-eyelight freehq-pris 0) +(def-tex bam-hairhilite freehq-pris 1) +(def-tex daxter-eyelid freehq-pris 2) +(def-tex daxter-furhilite freehq-pris 3) +(def-tex daxter-orange freehq-pris 4) +(def-tex daxterarm freehq-pris 5) +(def-tex daxterbodyshort-eix freehq-pris 6) +(def-tex daxterbolt freehq-pris 7) +(def-tex daxterear freehq-pris 8) +(def-tex daxterfinger freehq-pris 9) +(def-tex daxterfoot freehq-pris 10) +(def-tex daxterfoot-bottom freehq-pris 11) +(def-tex daxtergoggles freehq-pris 12) +(def-tex daxterheadwidenew freehq-pris 13) +(def-tex daxterhelmetplain freehq-pris 14) +(def-tex daxterlense freehq-pris 15) +(def-tex daxternose freehq-pris 16) +(def-tex daxterteeth freehq-pris 17) +(def-tex daxtertuft freehq-pris 18) +(def-tex environment-oldmetal freehq-pris 19) +(def-tex jakc-armor freehq-pris 74) +(def-tex jakc-chestplate-straps freehq-pris 75) +(def-tex jakc-gogglemetal freehq-pris 76) +(def-tex jakc-lens freehq-pris 77) +(def-tex jakc-scarf freehq-pris 78) +(def-tex jakc-waistband2 freehq-pris 79) +(def-tex jakc-wraps freehq-pris 80) +(def-tex jakc-wristband-a2 freehq-pris 81) +(def-tex jakchires-arm freehq-pris 82) +(def-tex jakchires-blackstrap freehq-pris 83) +(def-tex jakchires-brownstrap freehq-pris 84) +(def-tex jakchires-brwnleather freehq-pris 85) +(def-tex jakchires-chestplate freehq-pris 86) +(def-tex jakchires-clips freehq-pris 87) +(def-tex jakchires-eye freehq-pris 88) +(def-tex jakchires-eyebrow freehq-pris 89) +(def-tex jakchires-eyelid freehq-pris 90) +(def-tex jakchires-facelft freehq-pris 91) +(def-tex jakchires-facert freehq-pris 92) +(def-tex jakchires-glovetop freehq-pris 93) +(def-tex jakchires-hair freehq-pris 94) +(def-tex jakchires-horn freehq-pris 95) +(def-tex jakchires-jacket freehq-pris 96) +(def-tex jakchires-leatherpouch freehq-pris 97) +(def-tex jakchires-lightbrownspat freehq-pris 98) +(def-tex jakchires-pants freehq-pris 99) +(def-tex jakchires-precarmor-01 freehq-pris 100) +(def-tex jakchires-shoebottom freehq-pris 101) +(def-tex jakchires-shoemetal freehq-pris 102) +(def-tex jakchires-shoeteop freehq-pris 103) +(def-tex jakchires-teeth freehq-pris 104) +(def-tex jakc-skirt freehq-pris 105) +(def-tex jakc-scarfhanging freehq-pris 106) +(def-tex wstd-scaffold-teeth wasstadb-pris 3) +(def-tex wstd-tentacle-plate03 wasstadb-pris 4) +(def-tex wstd-trapdoor-bolt wasstadb-pris 5) +(def-tex wstd-trapdoor-grate wasstadb-pris 6) +(def-tex bam-eyelight wasseem-pris 0) +(def-tex bam-hairhilite wasseem-pris 1) +(def-tex daxter-eyelid wasseem-pris 2) +(def-tex daxter-furhilite wasseem-pris 3) +(def-tex daxter-orange wasseem-pris 4) +(def-tex daxterarm wasseem-pris 5) +(def-tex daxterbodyshort-eix wasseem-pris 6) +(def-tex daxterbolt wasseem-pris 7) +(def-tex daxterear wasseem-pris 8) +(def-tex daxterfinger wasseem-pris 9) +(def-tex daxterfoot wasseem-pris 10) +(def-tex daxterfoot-bottom wasseem-pris 11) +(def-tex daxtergoggles wasseem-pris 12) +(def-tex daxterheadwidenew wasseem-pris 13) +(def-tex daxterhelmetplain wasseem-pris 14) +(def-tex daxterlense wasseem-pris 15) +(def-tex daxternose wasseem-pris 16) +(def-tex daxterteeth wasseem-pris 17) +(def-tex daxtertuft wasseem-pris 18) +(def-tex environment-oldmetal wasseem-pris 19) +(def-tex seem-precmetal-edge wasseem-pris 60) +(def-tex dark-crystal-knob-01 wasseem-pris 66) +(def-tex dark-crystal-knob-02 wasseem-pris 67) +(def-tex dark-crystal-pickup-01 wasseem-pris 68) +(def-tex dark-crystal-pickup-02 wasseem-pris 69) +(def-tex dark-crystal-pickup-03 wasseem-pris 70) +(def-tex jakc-armor wasseem-pris 71) +(def-tex jakc-chestplate-straps wasseem-pris 72) +(def-tex jakc-gogglemetal wasseem-pris 73) +(def-tex jakc-lens wasseem-pris 74) +(def-tex jakc-scarf wasseem-pris 75) +(def-tex jakc-scarfhanging wasseem-pris 76) +(def-tex jakc-skirt wasseem-pris 77) +(def-tex jakc-waistband2 wasseem-pris 78) +(def-tex jakc-wraps wasseem-pris 79) +(def-tex jakc-wristband-a2 wasseem-pris 80) +(def-tex jakchires-arm wasseem-pris 81) +(def-tex jakchires-blackstrap wasseem-pris 82) +(def-tex jakchires-brownstrap wasseem-pris 83) +(def-tex jakchires-brwnleather wasseem-pris 84) +(def-tex jakchires-chestplate wasseem-pris 85) +(def-tex jakchires-clips wasseem-pris 86) +(def-tex jakchires-eye wasseem-pris 87) +(def-tex jakchires-eyebrow wasseem-pris 88) +(def-tex jakchires-eyelid wasseem-pris 89) +(def-tex jakchires-facelft wasseem-pris 90) +(def-tex jakchires-facert wasseem-pris 91) +(def-tex jakchires-glovetop wasseem-pris 92) +(def-tex jakchires-hair wasseem-pris 93) +(def-tex jakchires-horn wasseem-pris 94) +(def-tex jakchires-jacket wasseem-pris 95) +(def-tex jakchires-leatherpouch wasseem-pris 96) +(def-tex jakchires-lightbrownspat wasseem-pris 97) +(def-tex jakchires-pants wasseem-pris 98) +(def-tex jakchires-precarmor-01 wasseem-pris 99) +(def-tex jakchires-shoebottom wasseem-pris 100) +(def-tex jakchires-shoemetal wasseem-pris 101) +(def-tex jakchires-shoeteop wasseem-pris 102) +(def-tex jakchires-teeth wasseem-pris 103) +(def-tex dk-sat-cable-01 wasseem-pris 104) +(def-tex dk-sat-cable-02 wasseem-pris 105) +(def-tex dk-sat-cable-03 wasseem-pris 106) +(def-tex dk-sat-claw-01 wasseem-pris 107) +(def-tex dk-sat-panel-01 wasseem-pris 108) +(def-tex dk-sat-rim-01 wasseem-pris 109) +(def-tex dk-sat-rim-02 wasseem-pris 110) +(def-tex dk-sat-rim-03 wasseem-pris 111) +(def-tex dk-sat-rim-bright-01 wasseem-pris 112) +(def-tex dk-sat-screen-01 wasseem-pris 113) +(def-tex dk-sat-screen-rim-01 wasseem-pris 114) +(def-tex dk-sat-shell-01 wasseem-pris 115) +(def-tex monk-arm wasseem-pris 116) +(def-tex monk-bootbottom wasseem-pris 117) +(def-tex monk-cheststraps wasseem-pris 118) +(def-tex monk-ear-01 wasseem-pris 119) +(def-tex monk-eye-c wasseem-pris 120) +(def-tex monk-eye-d wasseem-pris 121) +(def-tex monk-eye-f wasseem-pris 122) +(def-tex monk-face-01 wasseem-pris 123) +(def-tex monk-face-02 wasseem-pris 124) +(def-tex monk-face-03 wasseem-pris 125) +(def-tex monk-face-04 wasseem-pris 126) +(def-tex monk-face-05 wasseem-pris 127) +(def-tex monk-face-06 wasseem-pris 128) +(def-tex monk-femalebelt wasseem-pris 129) +(def-tex monk-femalebootlower wasseem-pris 130) +(def-tex monk-femalebootmet wasseem-pris 131) +(def-tex monk-femalebootoe wasseem-pris 132) +(def-tex monk-femaleleg-01 wasseem-pris 133) +(def-tex monk-femaleskirt-bottom wasseem-pris 134) +(def-tex monk-femaleskirt-top wasseem-pris 135) +(def-tex monk-finger wasseem-pris 136) +(def-tex monk-gem wasseem-pris 137) +(def-tex monk-goggleleather wasseem-pris 138) +(def-tex monk-goggles wasseem-pris 139) +(def-tex monk-goldjewel wasseem-pris 140) +(def-tex monk-hair-a wasseem-pris 141) +(def-tex monk-hair-f wasseem-pris 142) +(def-tex monk-hand wasseem-pris 143) +(def-tex monk-jewelry wasseem-pris 144) +(def-tex monk-lens wasseem-pris 145) +(def-tex monk-malearm wasseem-pris 146) +(def-tex monk-malefoot2 wasseem-pris 147) +(def-tex monk-maleleg wasseem-pris 148) +(def-tex monk-maleshoebottom wasseem-pris 149) +(def-tex monk-maletorso wasseem-pris 150) +(def-tex monk-neckcover wasseem-pris 151) +(def-tex monk-pipe-01 wasseem-pris 152) +(def-tex monk-pipeend wasseem-pris 153) +(def-tex monk-redjewel wasseem-pris 154) +(def-tex monk-rope wasseem-pris 155) +(def-tex monk-scarob wasseem-pris 156) +(def-tex monk-staffa-wood wasseem-pris 157) +(def-tex monk-strap wasseem-pris 158) +(def-tex monk-trim wasseem-pris 159) +(def-tex monk-uppertorso-01 wasseem-pris 160) +(def-tex monk-waistwrap wasseem-pris 161) +(def-tex monk-wristwrap wasseem-pris 162) +(def-tex environment-darkprec wasseem-pris 167) +(def-tex des-wascity-outerwall-rock wasintro-vis-tfrag 0) +(def-tex des-bark-crooked-01 wasintro-vis-tfrag 2) +(def-tex des-palmtree-beard wasintro-vis-tfrag 13) +(def-tex des-palmplant-leaf-01 wasintro-vis-tfrag 14) +(def-tex des-cactus-02 wasintro-vis-tfrag 15) +(def-tex des-cactus-01 wasintro-vis-tfrag 16) +(def-tex des-mount-01 wasintro-vis-tfrag 17) +(def-tex des-mount-02 wasintro-vis-tfrag 18) +(def-tex des-mount-bottom-01 wasintro-vis-tfrag 19) +(def-tex des-cliff-trans-01 wasintro-vis-tfrag 20) +(def-tex des-cliff-top-03 wasintro-vis-tfrag 21) +(def-tex des-rock-01 wasintro-vis-tfrag 22) +(def-tex des-cliff-top-01 wasintro-vis-tfrag 23) +(def-tex des-cliff-01 wasintro-vis-tfrag 24) +(def-tex des-cliff-top-02 wasintro-vis-tfrag 25) +(def-tex des-wascity-outerwall-metal-b wasintro-vis-tfrag 31) +(def-tex des-wascity-palace-siding-01 wasintro-vis-tfrag 32) +(def-tex des-wascity-cement-road wasintro-vis-tfrag 33) +(def-tex des-wascity-outerwall-metal-d wasintro-vis-tfrag 34) +(def-tex des-shrub-pebbles wasintro-vis-shrub 1) +(def-tex des-rock-shrub-01 wasintro-vis-shrub 5) +(def-tex des-waterfall-dest wasintro-vis-water 1) +(def-tex ashelin-beltbuckle lashelin-pris2 0) +(def-tex ashelin-bolts lashelin-pris2 1) +(def-tex ashelin-boottop lashelin-pris2 2) +(def-tex ashelin-brownstrap lashelin-pris2 3) +(def-tex ashelin-cglogo lashelin-pris2 4) +(def-tex ashelin-cgrank lashelin-pris2 5) +(def-tex ashelin-chest lashelin-pris2 6) +(def-tex ashelin-eye lashelin-pris2 7) +(def-tex ashelin-eyebrow lashelin-pris2 8) +(def-tex ashelin-eyelid lashelin-pris2 9) +(def-tex ashelin-face lashelin-pris2 10) +(def-tex ashelin-glove lashelin-pris2 11) +(def-tex ashelin-gunbarrel-01 lashelin-pris2 12) +(def-tex ashelin-gunbarrel-02 lashelin-pris2 13) +(def-tex ashelin-gunbarrel-03 lashelin-pris2 14) +(def-tex ashelin-gunholster lashelin-pris2 15) +(def-tex ashelin-hair lashelin-pris2 16) +(def-tex ashelin-handle-01 lashelin-pris2 17) +(def-tex ashelin-jacketbody lashelin-pris2 18) +(def-tex ashelin-jacketsleeve lashelin-pris2 19) +(def-tex ashelin-jacketstraps lashelin-pris2 20) +(def-tex ashelin-pantstop lashelin-pris2 21) +(def-tex ashelin-redtop lashelin-pris2 22) +(def-tex ashelin-shells lashelin-pris2 23) +(def-tex ashelin-shield lashelin-pris2 24) +(def-tex ashelin-shoebottom lashelin-pris2 25) +(def-tex ashelin-shoemetal lashelin-pris2 26) +(def-tex ashelin-teeth lashelin-pris2 27) +(def-tex ashelin-whitestrap lashelin-pris2 28) +(def-tex bam-eyelight lashelin-pris2 29) +(def-tex bam-hairhilite lashelin-pris2 30) +(def-tex environment-oldmetal lashelin-pris2 31) +(def-tex bam-eyelight ctypesc-pris 0) +(def-tex blue-gem ctypesc-pris 1) +(def-tex brown-hose ctypesc-pris 2) +(def-tex cguard1-backmetal ctypesc-pris 3) +(def-tex cguard1-chestplate ctypesc-pris 4) +(def-tex cguard1-guntube ctypesc-pris 6) +(def-tex cguard1-lens ctypesc-pris 8) +(def-tex cguardgame-backplate ctypesc-pris 10) +(def-tex cguardgame-metallight-01small ctypesc-pris 12) +(def-tex cguardgame-shoebottom ctypesc-pris 13) +(def-tex environment-oldmetal ctypesc-pris 14) +(def-tex roboguard-die-stamped-metal-blue ctypesc-pris 15) +(def-tex roboguard-headshield ctypesc-pris 17) +(def-tex roboguard-shouldershield ctypesc-pris 18) +(def-tex widow-dull-inards ctypesc-pris 21) +(def-tex widow-pod-gun-metal ctypesc-pris 22) +(def-tex wire-metal ctypesc-pris 23) +(def-tex spydroid-gold ctypesc-pris 24) +(def-tex spydroid-leg-grey ctypesc-pris 25) +(def-tex spydroid-leg-grey-end ctypesc-pris 26) +(def-tex spydroid-light ctypesc-pris 27) +(def-tex spydroid-light-small ctypesc-pris 28) +(def-tex spydroid-light-small-red ctypesc-pris 29) +(def-tex spydroid-red ctypesc-pris 30) +(def-tex kg-fl-tret-backend ctypesc-pris 38) +(def-tex kg-fl-tret-black-plate ctypesc-pris 39) +(def-tex kg-fl-tret-guntrack ctypesc-pris 40) +(def-tex kg-fl-tret-motor ctypesc-pris 41) +(def-tex kg-fl-tret-red-plate ctypesc-pris 42) +(def-tex kg-fl-tret-backthing01 ctypesc-pris 43) +(def-tex kg-fl-tret-dash01 ctypesc-pris 44) +(def-tex kg-fl-tret-hood01 ctypesc-pris 45) +(def-tex kg-fl-tret-jets01 ctypesc-pris 46) +(def-tex kg-fl-tret-post01 ctypesc-pris 47) +(def-tex kg-grunt-cable-01 ctypesc-pris 48) +(def-tex kg-grunt-rim-03 ctypesc-pris 49) +(def-tex bam-eyelight arenacst-pris 0) +(def-tex bam-hairhilite arenacst-pris 1) +(def-tex daxter-eyelid arenacst-pris 2) +(def-tex daxter-furhilite arenacst-pris 3) +(def-tex daxter-orange arenacst-pris 4) +(def-tex daxterarm arenacst-pris 5) +(def-tex daxterbodyshort-eix arenacst-pris 6) +(def-tex daxterbolt arenacst-pris 7) +(def-tex daxterear arenacst-pris 8) +(def-tex daxterfinger arenacst-pris 9) +(def-tex daxterfoot arenacst-pris 10) +(def-tex daxterfoot-bottom arenacst-pris 11) +(def-tex daxtergoggles arenacst-pris 12) +(def-tex daxterheadwidenew arenacst-pris 13) +(def-tex daxterhelmetplain arenacst-pris 14) +(def-tex daxterlense arenacst-pris 15) +(def-tex daxternose arenacst-pris 16) +(def-tex daxterteeth arenacst-pris 17) +(def-tex daxtertuft arenacst-pris 18) +(def-tex environment-oldmetal arenacst-pris 19) +(def-tex jackb-lens arenacst-pris 20) +(def-tex jak-belt arenacst-pris 21) +(def-tex jak-gogglemetal arenacst-pris 22) +(def-tex jak-teeth arenacst-pris 23) +(def-tex jakb-armor arenacst-pris 24) +(def-tex jakb-blackstrap arenacst-pris 25) +(def-tex jakb-brownleather arenacst-pris 26) +(def-tex jakb-clips arenacst-pris 27) +(def-tex jakb-eye arenacst-pris 28) +(def-tex jakb-eyebrow arenacst-pris 29) +(def-tex jakb-eyelid arenacst-pris 30) +(def-tex jakb-facelft arenacst-pris 31) +(def-tex jakb-facert arenacst-pris 32) +(def-tex jakb-glovetop arenacst-pris 33) +(def-tex jakb-hairtrans arenacst-pris 34) +(def-tex jakb-horn arenacst-pris 35) +(def-tex jakb-jacketbody arenacst-pris 36) +(def-tex jakb-jacketsleeve arenacst-pris 37) +(def-tex jakb-leatherpouch arenacst-pris 38) +(def-tex jakb-leatherstrap arenacst-pris 39) +(def-tex jakb-lightbrownspat arenacst-pris 40) +(def-tex jakb-lightbrownstrap arenacst-pris 41) +(def-tex jakb-pants arenacst-pris 42) +(def-tex jakb-scarf arenacst-pris 43) +(def-tex jakb-shoebottom arenacst-pris 44) +(def-tex jakb-shoemetal arenacst-pris 45) +(def-tex jakb-shoeteop arenacst-pris 46) +(def-tex pecker-body-01 arenacst-pris 47) +(def-tex pecker-eyelid arenacst-pris 48) +(def-tex pecker-face arenacst-pris 49) +(def-tex pecker-plume arenacst-pris 50) +(def-tex pecker-tail arenacst-pris 51) +(def-tex pecker-teeth arenacst-pris 52) +(def-tex pecker-wingbottom arenacst-pris 53) +(def-tex pecker-wingtop arenacst-pris 54) +(def-tex pecker-yellowfur arenacst-pris 55) +(def-tex gun-barrel-alt arenacst-pris 56) +(def-tex gun-laser arenacst-pris 57) +(def-tex gun-main arenacst-pris 58) +(def-tex gun-tip arenacst-pris 59) +(def-tex bat-amulet-01 arenacst-pris 60) +(def-tex bat-amulet-02 arenacst-pris 61) +(def-tex bat-amulet-03 arenacst-pris 62) +(def-tex prebot-envmap arenacst-pris 63) +(def-tex jakc-armor arenacst-pris 83) +(def-tex jakc-chestplate-straps arenacst-pris 84) +(def-tex jakc-gogglemetal arenacst-pris 85) +(def-tex jakc-lens arenacst-pris 86) +(def-tex jakc-scarf arenacst-pris 87) +(def-tex jakc-waistband2 arenacst-pris 88) +(def-tex jakc-wraps arenacst-pris 89) +(def-tex jakc-wristband-a2 arenacst-pris 90) +(def-tex jakchires-arm arenacst-pris 91) +(def-tex jakchires-blackstrap arenacst-pris 92) +(def-tex jakchires-brownstrap arenacst-pris 93) +(def-tex jakchires-brwnleather arenacst-pris 94) +(def-tex jakchires-chestplate arenacst-pris 95) +(def-tex jakchires-clips arenacst-pris 96) +(def-tex jakchires-eye arenacst-pris 97) +(def-tex jakchires-eyebrow arenacst-pris 98) +(def-tex jakchires-eyelid arenacst-pris 99) +(def-tex jakchires-facelft arenacst-pris 100) +(def-tex jakchires-facert arenacst-pris 101) +(def-tex jakchires-glovetop arenacst-pris 102) +(def-tex jakchires-hair arenacst-pris 103) +(def-tex jakchires-horn arenacst-pris 104) +(def-tex jakchires-jacket arenacst-pris 105) +(def-tex jakchires-leatherpouch arenacst-pris 106) +(def-tex jakchires-lightbrownspat arenacst-pris 107) +(def-tex jakchires-pants arenacst-pris 108) +(def-tex jakchires-precarmor-01 arenacst-pris 109) +(def-tex jakchires-shoebottom arenacst-pris 110) +(def-tex jakchires-shoemetal arenacst-pris 111) +(def-tex jakchires-shoeteop arenacst-pris 112) +(def-tex jakchires-teeth arenacst-pris 113) +(def-tex jakc-skirt arenacst-pris 128) +(def-tex jakc-scarfhanging arenacst-pris 130) +(def-tex gun-cover arenacst-pris 131) +(def-tex bam-eyelight arenacst-pris2 0) +(def-tex environment-oldmetal arenacst-pris2 1) +(def-tex king-arm arenacst-pris2 2) +(def-tex king-blackskirt2 arenacst-pris2 3) +(def-tex king-bluemetal arenacst-pris2 4) +(def-tex king-bolt arenacst-pris2 5) +(def-tex king-chest arenacst-pris2 6) +(def-tex king-clip-02 arenacst-pris2 7) +(def-tex king-ear arenacst-pris2 8) +(def-tex king-earing arenacst-pris2 9) +(def-tex king-face-01 arenacst-pris2 10) +(def-tex king-finger arenacst-pris2 11) +(def-tex king-greenmetal arenacst-pris2 12) +(def-tex king-greenmetalplain arenacst-pris2 13) +(def-tex king-hair arenacst-pris2 14) +(def-tex king-hand arenacst-pris2 15) +(def-tex king-horn arenacst-pris2 16) +(def-tex king-iris arenacst-pris2 17) +(def-tex king-leg arenacst-pris2 18) +(def-tex king-lgblackstrap arenacst-pris2 19) +(def-tex king-precursermetal-decor arenacst-pris2 20) +(def-tex king-precursermetal-plain arenacst-pris2 21) +(def-tex king-precursermetal-trim arenacst-pris2 22) +(def-tex king-precursermetal-trim2 arenacst-pris2 23) +(def-tex king-precursermetal-trimbolt arenacst-pris2 24) +(def-tex king-shoebottom arenacst-pris2 25) +(def-tex king-skirt arenacst-pris2 26) +(def-tex king-teeth arenacst-pris2 27) +(def-tex king-thinstrap arenacst-pris2 28) +(def-tex king-vest arenacst-pris2 29) +(def-tex king-vestback arenacst-pris2 30) +(def-tex king-wrap arenacst-pris2 31) +(def-tex king-wraps arenacst-pris2 32) +(def-tex king-wristband arenacst-pris2 33) +(def-tex charHOLD arenacst-pris2 34) +(def-tex sig-belt arenacst-pris2 35) +(def-tex sig-eye arenacst-pris2 36) +(def-tex sig-eyelid arenacst-pris2 37) +(def-tex sig-faceleft arenacst-pris2 38) +(def-tex sig-facert arenacst-pris2 39) +(def-tex sig-flask arenacst-pris2 40) +(def-tex sig-gem-01 arenacst-pris2 41) +(def-tex sig-glove arenacst-pris2 42) +(def-tex sig-glovetop arenacst-pris2 43) +(def-tex sig-gun-01 arenacst-pris2 44) +(def-tex sig-gun-02 arenacst-pris2 45) +(def-tex sig-gun-03 arenacst-pris2 46) +(def-tex sig-gun-04 arenacst-pris2 47) +(def-tex sig-gun-05 arenacst-pris2 48) +(def-tex sig-headgear arenacst-pris2 49) +(def-tex sig-horn arenacst-pris2 50) +(def-tex sig-lens arenacst-pris2 51) +(def-tex sig-metal-01 arenacst-pris2 52) +(def-tex sig-metal-dirty arenacst-pris2 53) +(def-tex sig-sac arenacst-pris2 54) +(def-tex sig-shoebottom arenacst-pris2 55) +(def-tex sig-shoetop arenacst-pris2 56) +(def-tex sig-shoulderarmor arenacst-pris2 57) +(def-tex sig-skirts arenacst-pris2 58) +(def-tex sig-skirts-02 arenacst-pris2 59) +(def-tex sig-skirts-03 arenacst-pris2 60) +(def-tex sig-undergarments arenacst-pris2 61) +(def-tex vin-teeth-01 arenacst-pris2 62) +(def-tex seem-arm arenacst-pris2 63) +(def-tex seem-bootbottom arenacst-pris2 64) +(def-tex seem-bootleg arenacst-pris2 65) +(def-tex seem-bootlower arenacst-pris2 66) +(def-tex seem-bootmet arenacst-pris2 67) +(def-tex seem-boottoe arenacst-pris2 68) +(def-tex seem-ear arenacst-pris2 69) +(def-tex seem-eye arenacst-pris2 70) +(def-tex seem-eyelid arenacst-pris2 71) +(def-tex seem-face arenacst-pris2 72) +(def-tex seem-finger arenacst-pris2 73) +(def-tex seem-hand arenacst-pris2 74) +(def-tex seem-pipeend arenacst-pris2 75) +(def-tex seem-pipes-01 arenacst-pris2 76) +(def-tex seem-precmetal-chestplate-01 arenacst-pris2 77) +(def-tex seem-precmetal-edge arenacst-pris2 78) +(def-tex seem-precmetal-plain arenacst-pris2 79) +(def-tex seem-straps arenacst-pris2 80) +(def-tex seem-uppertorso arenacst-pris2 81) +(def-tex seem-headgearback arenacst-pris2 82) +(def-tex seem-headpiecetop arenacst-pris2 83) +(def-tex seem-pipes-02 arenacst-pris2 84) +(def-tex seem-teeth arenacst-pris2 85) +(def-tex king-skirt-b arenacst-pris2 86) +(def-tex seem-skirt arenacst-pris2 87) +(def-tex seem-skirt-small arenacst-pris2 88) +(def-tex bam-eyelight ljndklev-pris 0) +(def-tex bam-hairhilite ljndklev-pris 1) +(def-tex daxter-eyelid ljndklev-pris 2) +(def-tex daxter-furhilite ljndklev-pris 3) +(def-tex daxter-orange ljndklev-pris 4) +(def-tex daxterarm ljndklev-pris 5) +(def-tex daxterbodyshort-eix ljndklev-pris 6) +(def-tex daxterbolt ljndklev-pris 7) +(def-tex daxterear ljndklev-pris 8) +(def-tex daxterfinger ljndklev-pris 9) +(def-tex daxterfoot ljndklev-pris 10) +(def-tex daxterfoot-bottom ljndklev-pris 11) +(def-tex daxtergoggles ljndklev-pris 12) +(def-tex daxterheadwidenew ljndklev-pris 13) +(def-tex daxterhelmetplain ljndklev-pris 14) +(def-tex daxterlense ljndklev-pris 15) +(def-tex daxternose ljndklev-pris 16) +(def-tex daxterteeth ljndklev-pris 17) +(def-tex daxtertuft ljndklev-pris 18) +(def-tex environment-oldmetal ljndklev-pris 19) +(def-tex klever-earcup ljndklev-pris 47) +(def-tex klever-eye ljndklev-pris 48) +(def-tex klever-eyelid ljndklev-pris 49) +(def-tex klever-face-01 ljndklev-pris 50) +(def-tex klever-face-01scars ljndklev-pris 51) +(def-tex klever-hair ljndklev-pris 52) +(def-tex klever-mustache ljndklev-pris 53) +(def-tex klever-arm ljndklev-pris 54) +(def-tex klever-brownstrap ljndklev-pris 55) +(def-tex klever-chest ljndklev-pris 56) +(def-tex klever-clips ljndklev-pris 57) +(def-tex klever-handwrap ljndklev-pris 58) +(def-tex klever-armor-01 ljndklev-pris 59) +(def-tex klever-armor-02 ljndklev-pris 60) +(def-tex klever-blackstrap ljndklev-pris 61) +(def-tex klever-bolt ljndklev-pris 62) +(def-tex klever-gunmetal-01 ljndklev-pris 63) +(def-tex klever-gunmetal-02 ljndklev-pris 64) +(def-tex klever-gunmetal-03 ljndklev-pris 65) +(def-tex klever-gunmetal-04 ljndklev-pris 66) +(def-tex klever-gunmetal-05 ljndklev-pris 67) +(def-tex klever-hand ljndklev-pris 68) +(def-tex klever-horn ljndklev-pris 69) +(def-tex klever-shoe ljndklev-pris 70) +(def-tex klever-shoebottom ljndklev-pris 71) +(def-tex klever-skirtdark ljndklev-pris 72) +(def-tex klever-skirtlight ljndklev-pris 73) +(def-tex klever-thighs ljndklev-pris 74) +(def-tex klever-undershirt ljndklev-pris 75) +(def-tex klever-widebrownstrap ljndklev-pris 76) +(def-tex klever-fingerbottom ljndklev-pris 77) +(def-tex klever-fingertop ljndklev-pris 78) +(def-tex jakc-armor ljndklev-pris 79) +(def-tex jakc-chestplate-straps ljndklev-pris 80) +(def-tex jakc-gogglemetal ljndklev-pris 81) +(def-tex jakc-lens ljndklev-pris 82) +(def-tex jakc-scarf ljndklev-pris 83) +(def-tex jakc-scarfhanging ljndklev-pris 84) +(def-tex jakc-skirt ljndklev-pris 85) +(def-tex jakc-waistband2 ljndklev-pris 86) +(def-tex jakc-wraps ljndklev-pris 87) +(def-tex jakc-wristband-a2 ljndklev-pris 88) +(def-tex jakchires-arm ljndklev-pris 89) +(def-tex jakchires-blackstrap ljndklev-pris 90) +(def-tex jakchires-brownstrap ljndklev-pris 91) +(def-tex jakchires-brwnleather ljndklev-pris 92) +(def-tex jakchires-chestplate ljndklev-pris 93) +(def-tex jakchires-clips ljndklev-pris 94) +(def-tex jakchires-eye ljndklev-pris 95) +(def-tex jakchires-eyebrow ljndklev-pris 96) +(def-tex jakchires-eyelid ljndklev-pris 97) +(def-tex jakchires-facelft ljndklev-pris 98) +(def-tex jakchires-facert ljndklev-pris 99) +(def-tex jakchires-glovetop ljndklev-pris 100) +(def-tex jakchires-hair ljndklev-pris 101) +(def-tex jakchires-horn ljndklev-pris 102) +(def-tex jakchires-jacket ljndklev-pris 103) +(def-tex jakchires-leatherpouch ljndklev-pris 104) +(def-tex jakchires-lightbrownspat ljndklev-pris 105) +(def-tex jakchires-pants ljndklev-pris 106) +(def-tex jakchires-precarmor-01 ljndklev-pris 107) +(def-tex jakchires-shoebottom ljndklev-pris 108) +(def-tex jakchires-shoemetal ljndklev-pris 109) +(def-tex jakchires-shoeteop ljndklev-pris 110) +(def-tex jakchires-teeth ljndklev-pris 111) +(def-tex sig-flatfangs arenacst-water 0) +(def-tex wstlander-01-eye wasstadc-pris 0) +(def-tex wstlander-01-gunmetal-01 wasstadc-pris 1) +(def-tex wstlander-01-gunmetal-02 wasstadc-pris 2) +(def-tex wstlander-01-gunmetal-03 wasstadc-pris 3) +(def-tex wstlander-01-gunmetal-04 wasstadc-pris 4) +(def-tex wstlander-01-head wasstadc-pris 5) +(def-tex wstlander-01-leatherstrap wasstadc-pris 6) +(def-tex wstlander-01-mustache wasstadc-pris 7) +(def-tex wstlander-01-pants wasstadc-pris 8) +(def-tex wstlander-01-shoebottom wasstadc-pris 9) +(def-tex wstlander-01-shoetop wasstadc-pris 10) +(def-tex wstlander-01-shoulderarmor wasstadc-pris 11) +(def-tex wstlander-01-skirt wasstadc-pris 12) +(def-tex wstlander-01-wrap wasstadc-pris 13) +(def-tex marauder-belt wasstadc-pris 14) +(def-tex marauder-blade wasstadc-pris 15) +(def-tex marauder-blade-joint wasstadc-pris 16) +(def-tex marauder-gun-blade wasstadc-pris 17) +(def-tex marauder-gun-metal wasstadc-pris 18) +(def-tex marauder-gun-part wasstadc-pris 19) +(def-tex marauder-gun-tip wasstadc-pris 20) +(def-tex marauder-hand-blue wasstadc-pris 21) +(def-tex marauder-leather-brnstrap wasstadc-pris 22) +(def-tex marauder-leather-brown wasstadc-pris 23) +(def-tex marauder-leather-buckle wasstadc-pris 24) +(def-tex marauder-leather-handle wasstadc-pris 25) +(def-tex marauder-leather-part wasstadc-pris 26) +(def-tex marauder-leather-strap wasstadc-pris 27) +(def-tex marauder-metal-plate wasstadc-pris 28) +(def-tex marauder-shoe-bottom wasstadc-pris 29) +(def-tex marauder-skin wasstadc-pris 30) +(def-tex marauder-skin-nipple wasstadc-pris 31) +(def-tex marauder-skirt-01 wasstadc-pris 32) +(def-tex marauder-skirt-02 wasstadc-pris 33) +(def-tex marauder-spike wasstadc-pris 34) +(def-tex marauder-sword-edge wasstadc-pris 35) +(def-tex marauder-sword-metal wasstadc-pris 36) +(def-tex wstlander-02-arm wasstadc-pris 37) +(def-tex wstlander-02-armor wasstadc-pris 38) +(def-tex wstlander-02-belt wasstadc-pris 39) +(def-tex wstlander-02-bootheel wasstadc-pris 40) +(def-tex wstlander-02-eye wasstadc-pris 41) +(def-tex wstlander-02-glove wasstadc-pris 42) +(def-tex wstlander-02-head wasstadc-pris 43) +(def-tex wstlander-02-ponytail wasstadc-pris 44) +(def-tex wstlander-02-scarf wasstadc-pris 45) +(def-tex wstlander-02-shirt wasstadc-pris 46) +(def-tex wstlander-02-skirt wasstadc-pris 47) +(def-tex wstlander-03-eye wasstadc-pris 48) +(def-tex wstlander-03-flesh wasstadc-pris 49) +(def-tex wstlander-04-dark-blue wasstadc-pris 50) +(def-tex wstlander-04-gun wasstadc-pris 51) +(def-tex wstlander-04-headband wasstadc-pris 52) +(def-tex wstlander-04-shirt wasstadc-pris 53) +(def-tex wstlander-04-shirt-strap wasstadc-pris 54) +(def-tex wstlander-04-skirt wasstadc-pris 55) +(def-tex marauder-metal-mask wasstadc-pris 56) +(def-tex wstlander-01-glovetop wasstadc-water 0) +(def-tex map-desert desert-minimap 0) +(def-tex map-wascity waswide-minimap 1) +(def-tex can-cap desrace1-pris 0) +(def-tex can-knob desrace1-pris 1) +(def-tex can-side-long desrace1-pris 2) +(def-tex can-type desrace1-pris 3) +(def-tex intcept-base-green01 desrace1-pris 4) +(def-tex intcept-base-patern01 desrace1-pris 5) +(def-tex intcept-base-patern02 desrace1-pris 6) +(def-tex intcept-gun01 desrace1-pris 7) +(def-tex intcept-pipe01 desrace1-pris 8) +(def-tex intcept-teeth01 desrace1-pris 9) +(def-tex intcept-tread01 desrace1-pris 10) +(def-tex vehicle-body-panel-01 desrace1-pris 11) +(def-tex vehicle-brace-pipe-01 desrace1-pris 12) +(def-tex vehicle-cap-pin-01 desrace1-pris 13) +(def-tex vehicle-chrome-pipe-01 desrace1-pris 14) +(def-tex vehicle-gas-tank-01 desrace1-pris 15) +(def-tex vehicle-gun-box-01 desrace1-pris 16) +(def-tex vehicle-metal-plate-01 desrace1-pris 17) +(def-tex vehicle-toad-exhaust-01 desrace1-pris 18) +(def-tex vehicle-tread-blur-02 desrace1-pris 19) +(def-tex vehicle-wheel-01 desrace1-pris 20) +(def-tex vehicle-wheel-blur-01 desrace1-pris 21) +(def-tex jakc-wristband-a2 desrace1-pris 22) +(def-tex jakchires-brownstrap desrace1-pris 23) +(def-tex jakchires-precarmor-01 desrace1-pris 24) +(def-tex intcept-b-base-green01 desrace1-pris 27) +(def-tex intcept-b-base-patern01 desrace1-pris 28) +(def-tex intcept-b-base-patern02 desrace1-pris 29) +(def-tex intcept-b-gun01 desrace1-pris 30) +(def-tex intcept-b-pipe01 desrace1-pris 31) +(def-tex intcept-b-teeth01 desrace1-pris 32) +(def-tex hud-neo-spawner foresta-minimap 3) +(def-tex hud-dark-eco-plant foresta-minimap 4) +(def-tex hud-chase-statues-01 foresta-minimap 5) +(def-tex wascity-turret-hud-arrow-01 foresta-minimap 6) +(def-tex hud-purple-bar-01 foresta-minimap 7) +(def-tex map-forest foresta-minimap 8) +(def-tex wstd-arena-token wasstadb-water 0) +(def-tex map-factoryb factoryb-minimap 0) +(def-tex hud-fac-target-01 factoryb-minimap 1) +(def-tex hud-fac-tower-01 factoryb-minimap 2) +(def-tex hud-torpedo factoryb-minimap 3) +(def-tex hud-vehicle-health-bar-01 factoryb-minimap 4) +(def-tex bam-eyelight lbombbot-pris 0) +(def-tex bombot-darkgrey-01 lbombbot-pris 1) +(def-tex bombot-darkgrey-02 lbombbot-pris 2) +(def-tex bombot-gearsides lbombbot-pris 3) +(def-tex bombot-greybarrelend lbombbot-pris 4) +(def-tex bombot-greybarrelside lbombbot-pris 5) +(def-tex bombot-guards lbombbot-pris 6) +(def-tex bombot-guntop lbombbot-pris 7) +(def-tex bombot-insidegun lbombbot-pris 8) +(def-tex bombot-joint lbombbot-pris 9) +(def-tex bombot-lens lbombbot-pris 10) +(def-tex bombot-post01 lbombbot-pris 11) +(def-tex bombot-rail01 lbombbot-pris 12) +(def-tex bombot-redplate-01 lbombbot-pris 13) +(def-tex bombot-rimgrey lbombbot-pris 14) +(def-tex bombot-roundend lbombbot-pris 15) +(def-tex bombot-turret01 lbombbot-pris 16) +(def-tex bombot-wheel lbombbot-pris 17) +(def-tex environment-oldmetal lbombbot-pris 19) +(def-tex cguard1-backmetal lbombbot-pris 20) +(def-tex cguard1-guntube lbombbot-pris 21) +(def-tex kg-grunt-cable-01 lbombbot-pris 22) +(def-tex kg-grunt-rim-03 lbombbot-pris 23) +(def-tex roboguard-headshield lbombbot-pris 24) +(def-tex citwide-crimson-gold lbombbot-pris 25) +(def-tex citwide-crimson-light lbombbot-pris 26) +(def-tex citwide-crimson-red lbombbot-pris 27) +(def-tex citwide-crimson-tube lbombbot-pris 28) +(def-tex citwide-crimson-wall-plain lbombbot-pris 29) +(def-tex widow-bomb lbombbot-pris 30) +(def-tex widow-bomb-glow lbombbot-pris 31) +(def-tex widow-bomb-thrust lbombbot-pris 32) +(def-tex was-kangalizard-body waschase-pris 0) +(def-tex was-kangalizard-body-bottom waschase-pris 1) +(def-tex was-kangalizard-face waschase-pris 2) +(def-tex was-kangalizard-fin waschase-pris 3) +(def-tex bam-eyelight wasdoors-vis-pris 0) +(def-tex bam-hairhilite wasdoors-vis-pris 1) +(def-tex daxter-eyelid wasdoors-vis-pris 2) +(def-tex daxter-furhilite wasdoors-vis-pris 3) +(def-tex daxter-orange wasdoors-vis-pris 4) +(def-tex daxterarm wasdoors-vis-pris 5) +(def-tex daxterbodyshort-eix wasdoors-vis-pris 6) +(def-tex daxterbolt wasdoors-vis-pris 7) +(def-tex daxterear wasdoors-vis-pris 8) +(def-tex daxterfinger wasdoors-vis-pris 9) +(def-tex daxterfoot wasdoors-vis-pris 10) +(def-tex daxterfoot-bottom wasdoors-vis-pris 11) +(def-tex daxtergoggles wasdoors-vis-pris 12) +(def-tex daxterheadwidenew wasdoors-vis-pris 13) +(def-tex daxterhelmetplain wasdoors-vis-pris 14) +(def-tex daxterlense wasdoors-vis-pris 15) +(def-tex daxternose wasdoors-vis-pris 16) +(def-tex daxterteeth wasdoors-vis-pris 17) +(def-tex daxtertuft wasdoors-vis-pris 18) +(def-tex environment-oldmetal wasdoors-vis-pris 19) +(def-tex vehicle-wheel-01 wasdoors-vis-pris 48) +(def-tex jakc-armor wasdoors-vis-pris 49) +(def-tex jakc-chestplate-straps wasdoors-vis-pris 50) +(def-tex jakc-gogglemetal wasdoors-vis-pris 51) +(def-tex jakc-lens wasdoors-vis-pris 52) +(def-tex jakc-scarf wasdoors-vis-pris 53) +(def-tex jakc-scarfhanging wasdoors-vis-pris 54) +(def-tex jakc-skirt wasdoors-vis-pris 55) +(def-tex jakc-waistband2 wasdoors-vis-pris 56) +(def-tex jakc-wraps wasdoors-vis-pris 57) +(def-tex jakc-wristband-a2 wasdoors-vis-pris 58) +(def-tex jakchires-arm wasdoors-vis-pris 59) +(def-tex jakchires-blackstrap wasdoors-vis-pris 60) +(def-tex jakchires-brownstrap wasdoors-vis-pris 61) +(def-tex jakchires-brwnleather wasdoors-vis-pris 62) +(def-tex jakchires-chestplate wasdoors-vis-pris 63) +(def-tex jakchires-clips wasdoors-vis-pris 64) +(def-tex jakchires-eye wasdoors-vis-pris 65) +(def-tex jakchires-eyebrow wasdoors-vis-pris 66) +(def-tex jakchires-eyelid wasdoors-vis-pris 67) +(def-tex jakchires-facelft wasdoors-vis-pris 68) +(def-tex jakchires-facert wasdoors-vis-pris 69) +(def-tex jakchires-glovetop wasdoors-vis-pris 70) +(def-tex jakchires-hair wasdoors-vis-pris 71) +(def-tex jakchires-horn wasdoors-vis-pris 72) +(def-tex jakchires-jacket wasdoors-vis-pris 73) +(def-tex jakchires-leatherpouch wasdoors-vis-pris 74) +(def-tex jakchires-lightbrownspat wasdoors-vis-pris 75) +(def-tex jakchires-pants wasdoors-vis-pris 76) +(def-tex jakchires-precarmor-01 wasdoors-vis-pris 77) +(def-tex jakchires-shoebottom wasdoors-vis-pris 78) +(def-tex jakchires-shoemetal wasdoors-vis-pris 79) +(def-tex jakchires-shoeteop wasdoors-vis-pris 80) +(def-tex jakchires-teeth wasdoors-vis-pris 81) +(def-tex intcept-pipe01 wasdoors-vis-pris 82) +(def-tex intcept-tread01 wasdoors-vis-pris 83) +(def-tex bam-eyelight ldamklev-pris2 0) +(def-tex environment-oldmetal ldamklev-pris2 1) +(def-tex king-arm ldamklev-pris2 2) +(def-tex king-blackskirt2 ldamklev-pris2 3) +(def-tex king-bluemetal ldamklev-pris2 4) +(def-tex king-bolt ldamklev-pris2 5) +(def-tex king-chest ldamklev-pris2 6) +(def-tex king-clip-02 ldamklev-pris2 7) +(def-tex king-ear ldamklev-pris2 8) +(def-tex king-earing ldamklev-pris2 9) +(def-tex king-face-01 ldamklev-pris2 10) +(def-tex king-finger ldamklev-pris2 11) +(def-tex king-greenmetal ldamklev-pris2 12) +(def-tex king-greenmetalplain ldamklev-pris2 13) +(def-tex king-hair ldamklev-pris2 14) +(def-tex king-hand ldamklev-pris2 15) +(def-tex king-horn ldamklev-pris2 16) +(def-tex king-iris ldamklev-pris2 17) +(def-tex king-leg ldamklev-pris2 18) +(def-tex king-lgblackstrap ldamklev-pris2 19) +(def-tex king-precursermetal-decor ldamklev-pris2 20) +(def-tex king-precursermetal-plain ldamklev-pris2 21) +(def-tex king-precursermetal-trim ldamklev-pris2 22) +(def-tex king-precursermetal-trim2 ldamklev-pris2 23) +(def-tex king-precursermetal-trimbolt ldamklev-pris2 24) +(def-tex king-shoebottom ldamklev-pris2 25) +(def-tex king-skirt ldamklev-pris2 26) +(def-tex king-teeth ldamklev-pris2 27) +(def-tex king-thinstrap ldamklev-pris2 28) +(def-tex king-vest ldamklev-pris2 29) +(def-tex king-vestback ldamklev-pris2 30) +(def-tex king-wrap ldamklev-pris2 31) +(def-tex king-wraps ldamklev-pris2 32) +(def-tex king-wristband ldamklev-pris2 33) +(def-tex king-skirt-b ldamklev-pris2 34) +(def-tex JakIII title-minimap 0) +(def-tex mhcent-eye lnstobb-pris 4) +(def-tex mhcent-metal-01 lnstobb-pris 5) +(def-tex mhcent-metal-02 lnstobb-pris 6) +(def-tex mhcent-mouth-01 lnstobb-pris 7) +(def-tex mhcent-mouth-02 lnstobb-pris 8) +(def-tex mhcent-skin-02 lnstobb-pris 9) +(def-tex mhcent-skin-03 lnstobb-pris 10) +(def-tex nst-egg-spider-body lnstobb-pris 11) +(def-tex nst-egg-spider-egg lnstobb-pris 12) +(def-tex nst-egg-spider-eye lnstobb-pris 13) +(def-tex nst-egg-spider-metal lnstobb-pris 14) +(def-tex nst-egg-spider-pipe lnstobb-pris 15) +(def-tex eco-lt-cryst-02 lnstobb-pris 17) +(def-tex eco-lt-cryst-03 lnstobb-pris 19) +(def-tex bam-eyelight lwassig-pris 0) +(def-tex sig-skirts-02 lwassig-pris 2) +(def-tex sig2-belt lwassig-pris 3) +(def-tex sig2-eyestillsmall lwassig-pris 4) +(def-tex sig2-faceleft lwassig-pris 5) +(def-tex sig2-facert lwassig-pris 6) +(def-tex sig2-flask lwassig-pris 7) +(def-tex sig2-gem-01 lwassig-pris 8) +(def-tex sig2-glove lwassig-pris 9) +(def-tex sig2-glovetop lwassig-pris 10) +(def-tex sig2-gun-01 lwassig-pris 11) +(def-tex sig2-gun-02 lwassig-pris 12) +(def-tex sig2-gun-03 lwassig-pris 13) +(def-tex sig2-gun-04 lwassig-pris 14) +(def-tex sig2-gun-05 lwassig-pris 15) +(def-tex sig2-headgear lwassig-pris 16) +(def-tex sig2-horn lwassig-pris 17) +(def-tex sig2-lens lwassig-pris 18) +(def-tex sig2-metal-01 lwassig-pris 19) +(def-tex sig2-metal-dirty lwassig-pris 20) +(def-tex sig2-sac lwassig-pris 21) +(def-tex sig2-shoebottom lwassig-pris 22) +(def-tex sig2-shoetop lwassig-pris 23) +(def-tex sig2-shoulderarmor lwassig-pris 24) +(def-tex sig2-skirts lwassig-pris 25) +(def-tex sig2-skirts-03 lwassig-pris 26) +(def-tex sig2-undergarments lwassig-pris 27) +(def-tex cguard-air-train-fin introcst-tfrag 33) +(def-tex cguard-air-train-gold introcst-tfrag 34) +(def-tex cguard-air-train-hatch-door introcst-tfrag 35) +(def-tex cguard-air-train-inside-plain introcst-tfrag 36) +(def-tex cguard-air-train-backdoor introcst-tfrag 37) +(def-tex cguard-air-train-belt introcst-tfrag 38) +(def-tex cguard-air-train-side1 introcst-tfrag 39) +(def-tex cguard-air-train-inside-pipel introcst-tfrag 40) +(def-tex cguard-air-train-sidepack introcst-tfrag 41) +(def-tex cguard-air-train-side3 introcst-tfrag 42) +(def-tex cguard-air-train-inside-wall introcst-tfrag 43) +(def-tex cguard-air-train-inside-mechanical introcst-tfrag 44) +(def-tex cguard-air-train-glass introcst-tfrag 45) +(def-tex cguard-air-train-side2 introcst-tfrag 46) +(def-tex cguard-air-train-canister introcst-tfrag 47) +(def-tex cguard-air-train-light introcst-tfrag 48) +(def-tex cguard-air-train-inside-floor introcst-tfrag 49) +(def-tex cguard-air-train-seat introcst-tfrag 50) +(def-tex cguard-air-train-window-trim introcst-tfrag 51) +(def-tex hud-kanga-lizard waschase-minimap 0) +(def-tex mech-flame foresta-sprite 0) +(def-tex grenadier-grenade-part foresta-sprite 1) +(def-tex wave-foam foresta-sprite 3) +(def-tex forest-leaf foresta-sprite 6) +(def-tex forest-leaf2 foresta-sprite 7) +(def-tex forest-leaf3 foresta-sprite 8) +(def-tex forest-leaf4 foresta-sprite 9) +(def-tex racegate lforring-sprite 0) +(def-tex bam-eyelight lwstdpck-pris 0) +(def-tex pecker-body-01 lwstdpck-pris 1) +(def-tex pecker-eyelid lwstdpck-pris 2) +(def-tex pecker-face lwstdpck-pris 3) +(def-tex pecker-plume lwstdpck-pris 4) +(def-tex pecker-tail lwstdpck-pris 5) +(def-tex pecker-teeth lwstdpck-pris 6) +(def-tex pecker-wingbottom lwstdpck-pris 7) +(def-tex pecker-wingtop lwstdpck-pris 8) +(def-tex pecker-yellowfur lwstdpck-pris 9) +(def-tex bam-hairhilite lwstdpck-pris 10) +(def-tex environment-oldmetal lwstdpck-pris 11) +(def-tex jakc-armor lwstdpck-pris 39) +(def-tex jakc-chestplate-straps lwstdpck-pris 40) +(def-tex jakc-gogglemetal lwstdpck-pris 41) +(def-tex jakc-lens lwstdpck-pris 42) +(def-tex jakc-scarf lwstdpck-pris 43) +(def-tex jakc-scarfhanging lwstdpck-pris 44) +(def-tex jakc-skirt lwstdpck-pris 45) +(def-tex jakc-waistband2 lwstdpck-pris 46) +(def-tex jakc-wraps lwstdpck-pris 47) +(def-tex jakc-wristband-a2 lwstdpck-pris 48) +(def-tex jakchires-arm lwstdpck-pris 49) +(def-tex jakchires-blackstrap lwstdpck-pris 50) +(def-tex jakchires-brownstrap lwstdpck-pris 51) +(def-tex jakchires-brwnleather lwstdpck-pris 52) +(def-tex jakchires-chestplate lwstdpck-pris 53) +(def-tex jakchires-clips lwstdpck-pris 54) +(def-tex jakchires-eye lwstdpck-pris 55) +(def-tex jakchires-eyebrow lwstdpck-pris 56) +(def-tex jakchires-eyelid lwstdpck-pris 57) +(def-tex jakchires-facelft lwstdpck-pris 58) +(def-tex jakchires-facert lwstdpck-pris 59) +(def-tex jakchires-glovetop lwstdpck-pris 60) +(def-tex jakchires-hair lwstdpck-pris 61) +(def-tex jakchires-horn lwstdpck-pris 62) +(def-tex jakchires-jacket lwstdpck-pris 63) +(def-tex jakchires-leatherpouch lwstdpck-pris 64) +(def-tex jakchires-lightbrownspat lwstdpck-pris 65) +(def-tex jakchires-pants lwstdpck-pris 66) +(def-tex jakchires-precarmor-01 lwstdpck-pris 67) +(def-tex jakchires-shoebottom lwstdpck-pris 68) +(def-tex jakchires-shoemetal lwstdpck-pris 69) +(def-tex jakchires-shoeteop lwstdpck-pris 70) +(def-tex jakchires-teeth lwstdpck-pris 71) +(def-tex des-beach-01 desertc-vis-tfrag 1) +(def-tex des-wasmetal01 desertc-vis-tfrag 3) +(def-tex des-wasmetal06 desertc-vis-tfrag 4) +(def-tex des-wasmetal22 desertc-vis-tfrag 5) +(def-tex des-wasmetal12 desertc-vis-tfrag 6) +(def-tex des-wasmetal19 desertc-vis-tfrag 7) +(def-tex des-plate-05 desertc-vis-tfrag 8) +(def-tex des-wasmetal02 desertc-vis-tfrag 9) +(def-tex des-wasmetal25 desertc-vis-tfrag 10) +(def-tex des-wasmetal04 desertc-vis-tfrag 11) +(def-tex des-wasmetal07 desertc-vis-tfrag 12) +(def-tex des-pinetree-bark desertc-vis-tfrag 13) +(def-tex des-rock-01 desertc-vis-tfrag 14) +(def-tex des-mount-01 desertc-vis-tfrag 15) +(def-tex des-cliff-trans-01 desertc-vis-tfrag 16) +(def-tex des-cliff-top-01 desertc-vis-tfrag 17) +(def-tex des-cliff-01 desertc-vis-tfrag 18) +(def-tex des-mount-02 desertc-vis-tfrag 19) +(def-tex des-cliff-top-02 desertc-vis-tfrag 20) +(def-tex des-cliff-top-04 desertc-vis-tfrag 21) +(def-tex des-cliff-top-03 desertc-vis-tfrag 22) +(def-tex des-mount-bottom-01 desertc-vis-tfrag 23) +(def-tex des-pinetree-bark deserta-vis-tfrag 3) +(def-tex des-rock-01 deserta-vis-tfrag 4) +(def-tex des-mount-01 deserta-vis-tfrag 5) +(def-tex des-cliff-trans-01 deserta-vis-tfrag 6) +(def-tex des-cliff-top-01 deserta-vis-tfrag 7) +(def-tex des-cliff-01 deserta-vis-tfrag 8) +(def-tex des-mount-02 deserta-vis-tfrag 9) +(def-tex des-cliff-top-03 deserta-vis-tfrag 10) +(def-tex des-cliff-top-02 deserta-vis-tfrag 11) +(def-tex des-cliff-top-04 deserta-vis-tfrag 12) +(def-tex des-mount-bottom-01 deserta-vis-tfrag 13) +(def-tex des-corral-metal-02 desertg-vis-tfrag 4) +(def-tex des-corral-metal-04 desertg-vis-tfrag 5) +(def-tex des-corral-plate-02 desertg-vis-tfrag 6) +(def-tex des-corral-plate-03 desertg-vis-tfrag 7) +(def-tex des-corral-bar-03 desertg-vis-tfrag 8) +(def-tex des-corral-plate-01 desertg-vis-tfrag 9) +(def-tex des-corral-metal-03 desertg-vis-tfrag 10) +(def-tex des-corral-metal-01 desertg-vis-tfrag 11) +(def-tex des-corral-bar-02 desertg-vis-tfrag 12) +(def-tex des-corral-metal-05 desertg-vis-tfrag 13) +(def-tex des-rock-01 desertg-vis-tfrag 14) +(def-tex des-mount-01 desertg-vis-tfrag 19) +(def-tex des-mount-02 desertg-vis-tfrag 20) +(def-tex des-cave-wall-01 desertg-vis-tfrag 21) +(def-tex des-pole-01 desertg-vis-tfrag 25) +(def-tex des-cave-rock desertg-vis-tfrag 26) +(def-tex des-bridge-brace-01 desertg-vis-tfrag 27) +(def-tex des-bridge-plank desertg-vis-tfrag 28) +(def-tex des-cliff-trans-01 desertg-vis-tfrag 29) +(def-tex des-cliff-top-03 desertg-vis-tfrag 30) +(def-tex des-cliff-01 desertg-vis-tfrag 31) +(def-tex des-cliff-top-01 desertg-vis-tfrag 32) +(def-tex des-cliff-top-02 desertg-vis-tfrag 33) +(def-tex des-cliff-top-05 desertg-vis-tfrag 37) +(def-tex des-mount-bottom-01 desertg-vis-tfrag 38) +(def-tex des-ruins-bottom-01 desertg-vis-tfrag 39) +(def-tex des-ruins-top-01 desertg-vis-tfrag 40) +(def-tex des-ruins-bottom-02 desertg-vis-tfrag 41) +(def-tex des-ruins-top-02 desertg-vis-tfrag 42) +(def-tex des-ruins-roof-01 desertg-vis-tfrag 43) +(def-tex des-ruins-top-03 desertg-vis-tfrag 44) +(def-tex des-ruins-wall-01 desertg-vis-tfrag 45) +(def-tex des-egg-bulbtop-02 desertg-vis-tfrag 46) +(def-tex des-egg-bulb-01 desertg-vis-tfrag 47) +(def-tex des-egg-rim-01 desertg-vis-tfrag 48) +(def-tex des-egg-bottom desertg-vis-tfrag 49) +(def-tex des-egg-gem-01 desertg-vis-tfrag 50) +(def-tex des-cave-floor-01 desertg-vis-tfrag 51) +(def-tex des-shrub-pebbles desertg-vis-shrub 0) +(def-tex des-stain-wall-01 desertg-vis-shrub 3) +(def-tex des-sand-grass-01 desertg-vis-shrub 4) +(def-tex des-rock-shrub-01 desertg-vis-shrub 5) +(def-tex des-egg-pipe desertg-vis-pris 58) +(def-tex des-spiderweb desertg-vis-pris 59) +(def-tex des-cactus-leaf desertg-vis-pris 61) +(def-tex des-cactus-med-01 desertg-vis-pris 62) +(def-tex des-cactus-needle desertg-vis-pris 63) +(def-tex des-cactus-small-01 desertg-vis-pris 64) +(def-tex des-cactus-small-02 desertg-vis-pris 65) +(def-tex des-rope-01 desertb-vis-tfrag 5) +(def-tex des-plainrope desertb-vis-tfrag 6) +(def-tex des-palmtree-beard desertb-vis-tfrag 9) +(def-tex des-palmplant-leaf-02 desertb-vis-tfrag 10) +(def-tex wascity-outerwall-metal-c desertb-vis-tfrag 11) +(def-tex wascity-outerwall-metal-b desertb-vis-tfrag 12) +(def-tex wascity-greenmetal-tube desertb-vis-tfrag 13) +(def-tex wascity-metal-spike-01 desertb-vis-tfrag 14) +(def-tex wascity-outerwall-metal-d desertb-vis-tfrag 15) +(def-tex wascity-base desertb-vis-tfrag 16) +(def-tex wascitya-airlock-metal desertb-vis-tfrag 17) +(def-tex common-black desertb-vis-tfrag 18) +(def-tex wascity-metal-door-01 desertb-vis-tfrag 19) +(def-tex wascity-metal-indent desertb-vis-tfrag 20) +(def-tex wascitya-redish-metal desertb-vis-tfrag 21) +(def-tex wascity-cement-road desertb-vis-tfrag 22) +(def-tex wascity-metal-fan desertb-vis-tfrag 23) +(def-tex wascity-ground-01 desertb-vis-tfrag 24) +(def-tex wascity-metal-dirty desertb-vis-tfrag 25) +(def-tex wascitya-airlock-metal-bits desertb-vis-tfrag 26) +(def-tex wascitya-airlock-door desertb-vis-tfrag 27) +(def-tex des-branch-01 desertb-vis-tfrag 28) +(def-tex des-red-rock-01 desertb-vis-tfrag 29) +(def-tex des-cliff-trans-01 desertb-vis-tfrag 32) +(def-tex des-cliff-top-01 desertb-vis-tfrag 33) +(def-tex des-corral-plate-03 desertb-vis-tfrag 36) +(def-tex des-bridge-plank desertb-vis-tfrag 37) +(def-tex des-bridge-brace-01 desertb-vis-tfrag 38) +(def-tex des-rock-01 desertb-vis-tfrag 40) +(def-tex des-mount-01 desertb-vis-tfrag 41) +(def-tex des-pole-brace desertb-vis-tfrag 42) +(def-tex des-pole-01 desertb-vis-tfrag 43) +(def-tex des-corral-metal-01 desertb-vis-tfrag 44) +(def-tex des-corral-plate-02 desertb-vis-tfrag 45) +(def-tex des-mount-02 desertb-vis-tfrag 46) +(def-tex des-cliff-top-03 desertb-vis-tfrag 47) +(def-tex des-cliff-top-04 desertb-vis-tfrag 48) +(def-tex des-palm-top desertb-vis-tfrag 50) +(def-tex des-palm-root desertb-vis-tfrag 51) +(def-tex des-palmtree-trunk-02 desertb-vis-tfrag 52) +(def-tex des-palm-leaf-01 desertb-vis-tfrag 53) +(def-tex des-mount-bottom-01 desertb-vis-tfrag 54) +(def-tex des-mud desertb-vis-tfrag 55) +(def-tex des-totem-stone-trim desertb-vis-tfrag 57) +(def-tex des-totem-stone-01 desertb-vis-tfrag 58) +(def-tex des-cave-floor-01 desertb-vis-tfrag 59) +(def-tex des-shrub-pebbles desertb-vis-shrub 0) +(def-tex wascity-stain-wall-01 desertb-vis-shrub 3) +(def-tex wascity-stain-window-01 desertb-vis-shrub 4) +(def-tex wascity-blotch-withstreaks-01 desertb-vis-shrub 5) +(def-tex wascity-overlay-bullethole-a desertb-vis-shrub 6) +(def-tex wascity-overlay-bullethole-b desertb-vis-shrub 7) +(def-tex wascity-overlay-bullethole-c desertb-vis-shrub 8) +(def-tex des-sand-grass-01 desertb-vis-shrub 10) +(def-tex des-rock-shrub-01 desertb-vis-shrub 11) +(def-tex kgtrns-side01 desertb-vis-shrub 12) +(def-tex kgtrns-wing01 desertb-vis-shrub 13) +(def-tex kgtrns-box01 desertb-vis-shrub 14) +(def-tex kgtrns-topjet01 desertb-vis-shrub 15) +(def-tex des-beach-01 desertb-vis-water 0) +(def-tex des-cave-floor-01 desertb-vis-water 1) +(def-tex des-palm-top deserte-vis-tfrag 2) +(def-tex des-palm-root deserte-vis-tfrag 3) +(def-tex des-palmtree-beard deserte-vis-tfrag 4) +(def-tex des-palmplant-leaf-02 deserte-vis-tfrag 5) +(def-tex des-branch-01 deserte-vis-tfrag 6) +(def-tex des-mount-01 deserte-vis-tfrag 8) +(def-tex des-rock-01 deserte-vis-tfrag 9) +(def-tex des-mount-02 deserte-vis-tfrag 10) +(def-tex des-cliff-trans-01 deserte-vis-tfrag 11) +(def-tex des-cliff-top-03 deserte-vis-tfrag 12) +(def-tex des-cliff-top-01 deserte-vis-tfrag 14) +(def-tex des-palmtree-trunk-02 deserte-vis-tfrag 17) +(def-tex des-palm-leaf-01 deserte-vis-tfrag 18) +(def-tex des-mount-bottom-01 deserte-vis-tfrag 19) +(def-tex des-waterfall desertd-vis-water 0) +(def-tex des-waterfall-dest desertd-vis-water 2) +(def-tex des-bark-crooked-01 desertd-vis-tfrag 2) +(def-tex des-wasmetal01 desertd-vis-tfrag 3) +(def-tex des-wasmetal06 desertd-vis-tfrag 4) +(def-tex des-wasmetal22 desertd-vis-tfrag 5) +(def-tex des-wasmetal12 desertd-vis-tfrag 6) +(def-tex des-wasmetal19 desertd-vis-tfrag 7) +(def-tex des-plate-05 desertd-vis-tfrag 8) +(def-tex des-wasmetal02 desertd-vis-tfrag 9) +(def-tex des-wasmetal25 desertd-vis-tfrag 10) +(def-tex des-wasmetal04 desertd-vis-tfrag 11) +(def-tex des-wasmetal07 desertd-vis-tfrag 12) +(def-tex des-palmtree-beard desertd-vis-tfrag 13) +(def-tex des-palmplant-leaf-01 desertd-vis-tfrag 14) +(def-tex des-cactus-02 desertd-vis-tfrag 15) +(def-tex des-cactus-01 desertd-vis-tfrag 16) +(def-tex des-rock-01 desertd-vis-tfrag 17) +(def-tex des-mount-01 desertd-vis-tfrag 18) +(def-tex des-mount-02 desertd-vis-tfrag 19) +(def-tex des-cliff-top-01 desertd-vis-tfrag 20) +(def-tex des-cliff-trans-01 desertd-vis-tfrag 21) +(def-tex des-cliff-top-03 desertd-vis-tfrag 24) +(def-tex des-mount-bottom-01 desertd-vis-tfrag 26) +(def-tex des-shrub-pebbles desertd-vis-shrub 1) +(def-tex des-shrub-cattail desertd-vis-shrub 5) +(def-tex des-sand-grass-01 desertd-vis-shrub 7) +(def-tex des-rock-shrub-01 desertd-vis-shrub 8) +(def-tex des-beach-01 desertf-vis-tfrag 0) +(def-tex des-mount-01 desertf-vis-tfrag 1) +(def-tex des-mount-02 desertf-vis-tfrag 2) +(def-tex des-temple-brick-01 desertf-vis-tfrag 4) +(def-tex des-mount-bottom-01 desertf-vis-tfrag 6) +(def-tex des-cliff-01 desertf-vis-tfrag 7) +(def-tex des-pole-brace desertf-vis-tfrag 9) +(def-tex des-corral-metal-01 desertf-vis-tfrag 11) +(def-tex des-pole-01 desertf-vis-tfrag 12) +(def-tex des-corral-metal-03 desertf-vis-tfrag 13) +(def-tex des-corral-metal-04 desertf-vis-tfrag 14) +(def-tex des-temple-stone-01 desertf-vis-tfrag 20) +(def-tex des-ruins-top-01 desertf-vis-tfrag 22) +(def-tex des-corral-plate-02 desertf-vis-tfrag 24) +(def-tex des-ruins-top-03 desertf-vis-tfrag 25) +(def-tex des-wasmetal07 desertf-vis-tfrag 26) +(def-tex des-ruins-bottom-02 desertf-vis-tfrag 27) +(def-tex des-ruins-bottom-01 desertf-vis-tfrag 28) +(def-tex des-ruins-top-02 desertf-vis-tfrag 29) +(def-tex des-wasmetal20 desertf-vis-tfrag 30) +(def-tex des-wasmetal01 desertf-vis-tfrag 31) +(def-tex des-totem-stone-01 desertf-vis-tfrag 32) +(def-tex des-marauder-house-01 desertf-vis-tfrag 33) +(def-tex des-bridge-brace-01 desertf-vis-tfrag 34) +(def-tex des-ruins-roof-01 desertf-vis-tfrag 36) +(def-tex des-corral-bar-01 desertf-vis-tfrag 37) +(def-tex des-corral-metal-05 desertf-vis-tfrag 38) +(def-tex des-rock-01 desertf-vis-tfrag 40) +(def-tex des-corral-plate-01 desertf-vis-tfrag 41) +(def-tex des-totem-stone-trim desertf-vis-tfrag 42) +(def-tex des-corral-plate-03 desertf-vis-tfrag 44) +(def-tex des-wasmetal26 desertf-vis-tfrag 45) +(def-tex des-marauder-bridge-floor desertf-vis-tfrag 46) +(def-tex des-ruins-wall-01 desertf-vis-tfrag 47) +(def-tex des-corral-metal-02 desertf-vis-tfrag 48) +(def-tex des-marauder-bridge-wood-cap desertf-vis-tfrag 49) +(def-tex des-cliff-trans-01 desertf-vis-tfrag 50) +(def-tex des-cliff-top-03 desertf-vis-tfrag 51) +(def-tex des-corral-bar-03 desertf-vis-tfrag 52) +(def-tex des-beach-01 deserth-vis-tfrag 0) +(def-tex des-totem-stone-01 deserth-vis-tfrag 1) +(def-tex des-cliff-trans-01 deserth-vis-tfrag 2) +(def-tex des-cliff-top-01 deserth-vis-tfrag 3) +(def-tex des-mount-01 deserth-vis-tfrag 4) +(def-tex des-mount-02 deserth-vis-tfrag 5) +(def-tex des-cliff-top-03 deserth-vis-tfrag 6) +(def-tex des-mount-bottom-01 deserth-vis-tfrag 7) +(def-tex des-cliff-top-02 deserth-vis-tfrag 8) +(def-tex des-cliff-01 deserth-vis-tfrag 9) +(def-tex des-cliff-top-04 deserth-vis-tfrag 10) +(def-tex des-rock-01 deserth-vis-tfrag 11) +(def-tex des-palmtree-trunk-02 deserth-vis-tfrag 12) +(def-tex des-palmtree-beard deserth-vis-tfrag 13) +(def-tex des-palmplant-leaf-02 deserth-vis-tfrag 14) +(def-tex des-branch-01 deserth-vis-tfrag 15) +(def-tex des-palm-top deserth-vis-tfrag 16) +(def-tex des-palm-leaf-01 deserth-vis-tfrag 17) +(def-tex des-palm-root deserth-vis-tfrag 18) +(def-tex des-ruins-wall-01 deserth-vis-tfrag 24) +(def-tex des-totem-stone-trim deserth-vis-tfrag 28) +(def-tex des-totem-stone-eye deserth-vis-tfrag 29) +(def-tex des-temple-stone-01 deserth-vis-tfrag 30) +(def-tex des-temple-brick-01 deserth-vis-tfrag 32) +(def-tex des-mount-sand-trans deserth-vis-tfrag 33) +(def-tex gen-01 gungame-sprite 6) +(def-tex gen-02 gungame-sprite 7) +(def-tex gen-03 gungame-sprite 8) +(def-tex gun-cita-bit-01 gungame-sprite 17) +(def-tex gun-cita-bit-02 gungame-sprite 18) +(def-tex gun-cita-bit-03 gungame-sprite 19) +(def-tex gun-cita-bit-04 gungame-sprite 20) +(def-tex kg-targ-bit-01 gungame-sprite 21) +(def-tex kg-targ-bit-02 gungame-sprite 22) +(def-tex kg-targ-bit-03 gungame-sprite 23) +(def-tex kg-targ-bit-04 gungame-sprite 24) +(def-tex kg-bonus-bit-01 gungame-sprite 25) +(def-tex kg-bonus-bit-02 gungame-sprite 26) +(def-tex kg-bonus-bit-03 gungame-sprite 27) +(def-tex bam-eyelight gungame-vis-pris 0) +(def-tex bam-hairhilite gungame-vis-pris 1) +(def-tex daxter-eyelid gungame-vis-pris 2) +(def-tex daxter-furhilite gungame-vis-pris 3) +(def-tex daxter-orange gungame-vis-pris 4) +(def-tex daxterarm gungame-vis-pris 5) +(def-tex daxterbodyshort-eix gungame-vis-pris 6) +(def-tex daxterbolt gungame-vis-pris 7) +(def-tex daxterear gungame-vis-pris 8) +(def-tex daxterfinger gungame-vis-pris 9) +(def-tex daxterfoot gungame-vis-pris 10) +(def-tex daxterfoot-bottom gungame-vis-pris 11) +(def-tex daxtergoggles gungame-vis-pris 12) +(def-tex daxterheadwidenew gungame-vis-pris 13) +(def-tex daxterhelmetplain gungame-vis-pris 14) +(def-tex daxterlense gungame-vis-pris 15) +(def-tex daxternose gungame-vis-pris 16) +(def-tex daxterteeth gungame-vis-pris 17) +(def-tex daxtertuft gungame-vis-pris 18) +(def-tex environment-oldmetal gungame-vis-pris 19) +(def-tex jakc-armor gungame-vis-pris 77) +(def-tex jakc-chestplate-straps gungame-vis-pris 78) +(def-tex jakc-gogglemetal gungame-vis-pris 79) +(def-tex jakc-lens gungame-vis-pris 80) +(def-tex jakc-scarf gungame-vis-pris 81) +(def-tex jakc-waistband2 gungame-vis-pris 82) +(def-tex jakc-wraps gungame-vis-pris 83) +(def-tex jakc-wristband-a2 gungame-vis-pris 84) +(def-tex jakchires-arm gungame-vis-pris 85) +(def-tex jakchires-blackstrap gungame-vis-pris 86) +(def-tex jakchires-brownstrap gungame-vis-pris 87) +(def-tex jakchires-brwnleather gungame-vis-pris 88) +(def-tex jakchires-chestplate gungame-vis-pris 89) +(def-tex jakchires-clips gungame-vis-pris 90) +(def-tex jakchires-eye gungame-vis-pris 91) +(def-tex jakchires-eyebrow gungame-vis-pris 92) +(def-tex jakchires-eyelid gungame-vis-pris 93) +(def-tex jakchires-facelft gungame-vis-pris 94) +(def-tex jakchires-facert gungame-vis-pris 95) +(def-tex jakchires-glovetop gungame-vis-pris 96) +(def-tex jakchires-hair gungame-vis-pris 97) +(def-tex jakchires-horn gungame-vis-pris 98) +(def-tex jakchires-jacket gungame-vis-pris 99) +(def-tex jakchires-leatherpouch gungame-vis-pris 100) +(def-tex jakchires-lightbrownspat gungame-vis-pris 101) +(def-tex jakchires-pants gungame-vis-pris 102) +(def-tex jakchires-precarmor-01 gungame-vis-pris 103) +(def-tex jakchires-shoebottom gungame-vis-pris 104) +(def-tex jakchires-shoemetal gungame-vis-pris 105) +(def-tex jakchires-shoeteop gungame-vis-pris 106) +(def-tex jakchires-teeth gungame-vis-pris 107) +(def-tex jakc-scarfhanging gungame-vis-pris 120) +(def-tex jakc-skirt gungame-vis-pris 121) +(def-tex gun-bulletholes-01 gungame-vis-shrub 0) +(def-tex gun-bulletholes-02 gungame-vis-shrub 1) +(def-tex gun-bulletholes-03 gungame-vis-shrub 2) +(def-tex gun-shellcasings-02 gungame-vis-shrub 3) +(def-tex strip-shurb-dripstain-01 gungame-vis-shrub 4) +(def-tex city-bluelight gungame-vis-tfrag 0) +(def-tex city-metal-doorframe2 gungame-vis-tfrag 1) +(def-tex city-port-barge-deck gungame-vis-tfrag 2) +(def-tex city-port-barge-plain-metal gungame-vis-tfrag 3) +(def-tex city-port-door01 gungame-vis-tfrag 4) +(def-tex city-port-metal gungame-vis-tfrag 5) +(def-tex citywide-metal-wall gungame-vis-tfrag 6) +(def-tex common-black gungame-vis-tfrag 7) +(def-tex common-gun-panel-03 gungame-vis-tfrag 8) +(def-tex fort-door-metal gungame-vis-tfrag 9) +(def-tex gun-barrel-alt gungame-vis-tfrag 10) +(def-tex gun-bigpipe-ring-side gungame-vis-tfrag 11) +(def-tex gun-bigpipe-siding gungame-vis-tfrag 12) +(def-tex gun-blue-mag gungame-vis-tfrag 13) +(def-tex gun-bridge-brace01 gungame-vis-tfrag 14) +(def-tex gun-bridge-main gungame-vis-tfrag 15) +(def-tex gun-building-brick-01 gungame-vis-tfrag 16) +(def-tex gun-building-chimney gungame-vis-tfrag 17) +(def-tex gun-building-door-01 gungame-vis-tfrag 18) +(def-tex gun-building-roof gungame-vis-tfrag 20) +(def-tex gun-building-roof-tile-02 gungame-vis-tfrag 21) +(def-tex gun-building-roof-tile-sides-02 gungame-vis-tfrag 22) +(def-tex gun-building-wall-blue-01 gungame-vis-tfrag 23) +(def-tex gun-building-wall-brown-01 gungame-vis-tfrag 24) +(def-tex gun-building-wall-gray-01 gungame-vis-tfrag 25) +(def-tex gun-building-wall-green-01 gungame-vis-tfrag 26) +(def-tex gun-building-wall-purple-01 gungame-vis-tfrag 27) +(def-tex gun-building-wall-red-01 gungame-vis-tfrag 28) +(def-tex gun-building-wall-yellow-01 gungame-vis-tfrag 29) +(def-tex gun-building-window-01 gungame-vis-tfrag 30) +(def-tex gun-building-windowboard-01 gungame-vis-tfrag 31) +(def-tex gun-cover gungame-vis-tfrag 32) +(def-tex gun-dark-mag gungame-vis-tfrag 33) +(def-tex gun-darkgray gungame-vis-tfrag 34) +(def-tex gun-green-marble gungame-vis-tfrag 35) +(def-tex gun-gun-barrel-01 gungame-vis-tfrag 36) +(def-tex gun-gun-gray-01 gungame-vis-tfrag 37) +(def-tex gun-gun-gray-02 gungame-vis-tfrag 38) +(def-tex gun-guncase-door-01 gungame-vis-tfrag 39) +(def-tex gun-guncase-rim-01 gungame-vis-tfrag 40) +(def-tex gun-guncase-rim-02 gungame-vis-tfrag 41) +(def-tex gun-guncase-round-01 gungame-vis-tfrag 42) +(def-tex gun-guncase-round-02 gungame-vis-tfrag 43) +(def-tex gun-guncase-side-01 gungame-vis-tfrag 44) +(def-tex gun-guncase-top-01 gungame-vis-tfrag 45) +(def-tex gun-gunrack-01 gungame-vis-tfrag 46) +(def-tex gun-gunrack-02 gungame-vis-tfrag 47) +(def-tex gun-lamp-metal-01 gungame-vis-tfrag 48) +(def-tex gun-lamp-metal-02 gungame-vis-tfrag 49) +(def-tex gun-leather gungame-vis-tfrag 50) +(def-tex gun-light-01 gungame-vis-tfrag 51) +(def-tex gun-lightwall-01 gungame-vis-tfrag 52) +(def-tex gun-magport gungame-vis-tfrag 53) +(def-tex gun-main gungame-vis-tfrag 54) +(def-tex gun-metal-01 gungame-vis-tfrag 55) +(def-tex gun-metal-02 gungame-vis-tfrag 56) +(def-tex gun-metal-03 gungame-vis-tfrag 57) +(def-tex gun-metal-03b gungame-vis-tfrag 58) +(def-tex gun-metal-block-04 gungame-vis-tfrag 59) +(def-tex gun-metal-darker-01 gungame-vis-tfrag 60) +(def-tex gun-metal-darker-02 gungame-vis-tfrag 61) +(def-tex gun-metal-rim-01 gungame-vis-tfrag 62) +(def-tex gun-pavement-01 gungame-vis-tfrag 63) +(def-tex gun-pump gungame-vis-tfrag 64) +(def-tex gun-roof-01 gungame-vis-tfrag 65) +(def-tex gun-rubber-01 gungame-vis-tfrag 66) +(def-tex gun-track-01 gungame-vis-tfrag 67) +(def-tex gun-track-02 gungame-vis-tfrag 68) +(def-tex gun-vent-01 gungame-vis-tfrag 69) +(def-tex hip-tmetfloor04 gungame-vis-tfrag 70) +(def-tex hip-tmetring02 gungame-vis-tfrag 71) +(def-tex hip-twood01 gungame-vis-tfrag 72) +(def-tex sewer-rubber-rim-01 gungame-vis-tfrag 73) +(def-tex bam-eyelight lkleever-pris 0) +(def-tex bam-hairhilite lkleever-pris 1) +(def-tex klever-earcup lkleever-pris 2) +(def-tex klever-eye lkleever-pris 3) +(def-tex klever-eyelid lkleever-pris 4) +(def-tex klever-face-01 lkleever-pris 5) +(def-tex klever-face-01scars lkleever-pris 6) +(def-tex klever-hair lkleever-pris 7) +(def-tex klever-mustache lkleever-pris 8) +(def-tex klever-arm lkleever-pris 9) +(def-tex klever-brownstrap lkleever-pris 10) +(def-tex klever-chest lkleever-pris 11) +(def-tex klever-clips lkleever-pris 12) +(def-tex klever-handwrap lkleever-pris 13) +(def-tex klever-armor-01 lkleever-pris 14) +(def-tex klever-armor-02 lkleever-pris 15) +(def-tex klever-blackstrap lkleever-pris 16) +(def-tex klever-bolt lkleever-pris 17) +(def-tex klever-gunmetal-01 lkleever-pris 18) +(def-tex klever-gunmetal-02 lkleever-pris 19) +(def-tex klever-gunmetal-03 lkleever-pris 20) +(def-tex klever-gunmetal-04 lkleever-pris 21) +(def-tex klever-gunmetal-05 lkleever-pris 22) +(def-tex klever-hand lkleever-pris 23) +(def-tex klever-horn lkleever-pris 24) +(def-tex klever-shoe lkleever-pris 25) +(def-tex klever-shoebottom lkleever-pris 26) +(def-tex klever-skirtdark lkleever-pris 27) +(def-tex klever-skirtlight lkleever-pris 28) +(def-tex klever-thighs lkleever-pris 29) +(def-tex klever-undershirt lkleever-pris 30) +(def-tex klever-widebrownstrap lkleever-pris 31) +(def-tex klever-fingerbottom lkleever-pris 32) +(def-tex klever-fingertop lkleever-pris 33) +(def-tex intcept-lorez-spike01 desrace1-water 0) +(def-tex airlock-door-bolt ctyinda-vis-pris 0) +(def-tex airlock-door-cog ctyinda-vis-pris 1) +(def-tex airlock-door-main ctyinda-vis-pris 2) +(def-tex airlock-door-metal2 ctyinda-vis-pris 3) +(def-tex airlockl-door-metalframe ctyinda-vis-pris 4) +(def-tex citwide-crimson-gold ctyinda-vis-pris 5) +(def-tex citwide-crimson-light ctyinda-vis-pris 6) +(def-tex citwide-crimson-red ctyinda-vis-pris 7) +(def-tex citwide-crimson-tube ctyinda-vis-pris 8) +(def-tex citwide-crimson-wall-plain ctyinda-vis-pris 9) +(def-tex vin-door-large-01 ctyinda-vis-pris 10) +(def-tex vin-support-base-02 ctyinda-vis-pris 11) +(def-tex bam-eyelight ldamklev-pris 0) +(def-tex bam-hairhilite ldamklev-pris 1) +(def-tex klever-earcup ldamklev-pris 2) +(def-tex klever-eye ldamklev-pris 3) +(def-tex klever-eyelid ldamklev-pris 4) +(def-tex klever-face-01 ldamklev-pris 5) +(def-tex klever-face-01scars ldamklev-pris 6) +(def-tex klever-hair ldamklev-pris 7) +(def-tex klever-mustache ldamklev-pris 8) +(def-tex klever-arm ldamklev-pris 9) +(def-tex klever-armor-01 ldamklev-pris 10) +(def-tex klever-armor-02 ldamklev-pris 11) +(def-tex klever-blackstrap ldamklev-pris 12) +(def-tex klever-bolt ldamklev-pris 13) +(def-tex klever-brownstrap ldamklev-pris 14) +(def-tex klever-chest ldamklev-pris 15) +(def-tex klever-clips ldamklev-pris 16) +(def-tex klever-fingerbottom ldamklev-pris 17) +(def-tex klever-fingertop ldamklev-pris 18) +(def-tex klever-gunmetal-01 ldamklev-pris 19) +(def-tex klever-gunmetal-02 ldamklev-pris 20) +(def-tex klever-gunmetal-03 ldamklev-pris 21) +(def-tex klever-gunmetal-04 ldamklev-pris 22) +(def-tex klever-gunmetal-05 ldamklev-pris 23) +(def-tex klever-hand ldamklev-pris 24) +(def-tex klever-handwrap ldamklev-pris 25) +(def-tex klever-horn ldamklev-pris 26) +(def-tex klever-shoe ldamklev-pris 27) +(def-tex klever-shoebottom ldamklev-pris 28) +(def-tex klever-skirtdark ldamklev-pris 29) +(def-tex klever-skirtlight ldamklev-pris 30) +(def-tex klever-thighs ldamklev-pris 31) +(def-tex klever-undershirt ldamklev-pris 32) +(def-tex klever-widebrownstrap ldamklev-pris 33) +(def-tex intcept-base-green01 desrace2-pris 0) +(def-tex intcept-base-patern01 desrace2-pris 1) +(def-tex intcept-base-patern02 desrace2-pris 2) +(def-tex intcept-gun01 desrace2-pris 3) +(def-tex intcept-pipe01 desrace2-pris 4) +(def-tex intcept-teeth01 desrace2-pris 5) +(def-tex intcept-tread01 desrace2-pris 6) +(def-tex vehicle-body-panel-01 desrace2-pris 7) +(def-tex vehicle-brace-pipe-01 desrace2-pris 8) +(def-tex vehicle-cap-pin-01 desrace2-pris 9) +(def-tex vehicle-chrome-pipe-01 desrace2-pris 10) +(def-tex vehicle-gas-tank-01 desrace2-pris 11) +(def-tex vehicle-gun-box-01 desrace2-pris 12) +(def-tex vehicle-metal-plate-01 desrace2-pris 13) +(def-tex vehicle-toad-exhaust-01 desrace2-pris 14) +(def-tex vehicle-tread-blur-02 desrace2-pris 15) +(def-tex vehicle-wheel-01 desrace2-pris 16) +(def-tex vehicle-wheel-blur-01 desrace2-pris 17) +(def-tex intcept-b-base-green01 desrace2-pris 20) +(def-tex intcept-b-base-patern01 desrace2-pris 21) +(def-tex intcept-b-base-patern02 desrace2-pris 22) +(def-tex intcept-b-gun01 desrace2-pris 23) +(def-tex intcept-b-pipe01 desrace2-pris 24) +(def-tex intcept-b-teeth01 desrace2-pris 25) +(def-tex intcept-lorez-spike01 desrace2-water 0) +(def-tex water-wake sewa-sprite 0) +(def-tex water-trail sewa-sprite 1) +(def-tex mech-flame sewa-sprite 3) +(def-tex explosion-wave sewa-sprite 4) +(def-tex bigstarflash sewa-sprite 5) +(def-tex water-froth sewa-sprite 6) +(def-tex ceiling-dust sewa-sprite 7) +(def-tex flamingstick sewa-sprite 8) +(def-tex artifact-dec-01 desrace1-tfrag 0) +(def-tex artifact-blue-glow-01 desrace1-tfrag 1) +(def-tex artifact-plain-01 desrace1-tfrag 2) +(def-tex artifact-plain-02 desrace1-tfrag 3) +(def-tex artifact-dec-02 desrace1-tfrag 4) +(def-tex hud-rhino-turbometer wasall-minimap 30) +(def-tex hud-small-vehicle-health-bar-01 wasall-minimap 31) +(def-tex hud-turbo-boost-off-01 wasall-minimap 32) +(def-tex hud-turbo-boost-on-01 wasall-minimap 33) +(def-tex hud-turbo-boost-rim-01 wasall-minimap 34) +(def-tex palcab-lowres-background-hills-01 intpfall-vis-tfrag 0) +(def-tex strip-metal-02-lores intpfall-vis-tfrag 1) +(def-tex palcab-lowres-ctywide-wall-01 intpfall-vis-tfrag 2) +(def-tex palcab-lowres-background-crater-bottom-enviro intpfall-vis-tfrag 3) +(def-tex palcab-lowres-background-rocksnow2 intpfall-vis-tfrag 4) +(def-tex palcab-lowres-background-rocksnow intpfall-vis-tfrag 5) +(def-tex palcab-lowres-ctywide-wall-02 intpfall-vis-tfrag 6) +(def-tex palcab-lowres-ctyslum-ground intpfall-vis-tfrag 7) +(def-tex palcab-lowres-ctyslum-roof-01 intpfall-vis-tfrag 8) +(def-tex palcab-lowres-ctyslum-wall-01 intpfall-vis-tfrag 9) +(def-tex palcab-lowres-ctyslum-roof-02 intpfall-vis-tfrag 10) +(def-tex palcab-lowres-ctyslum-wall-04 intpfall-vis-tfrag 11) +(def-tex palcab-lowres-ctyslum-wall-02 intpfall-vis-tfrag 12) +(def-tex palcab-lowres-ctyslum-wall-03 intpfall-vis-tfrag 13) +(def-tex palcab-lowres-ctyslum-roof-03 intpfall-vis-tfrag 14) +(def-tex palcab-swingp-trim intpfall-vis-tfrag 15) +(def-tex palcab-steel intpfall-vis-tfrag 16) +(def-tex palcab-lowres-ctyslumc-wall-01 intpfall-vis-tfrag 17) +(def-tex palcab-lowres-ctyslumc-wall-02 intpfall-vis-tfrag 18) +(def-tex palcab-pipe-hoze intpfall-vis-tfrag 19) +(def-tex palcab-lowres-mark-roof-02 intpfall-vis-tfrag 20) +(def-tex city-lowres-ind-wall-04 intpfall-vis-tfrag 21) +(def-tex palcab-lowres-stadium-canopy intpfall-vis-tfrag 22) +(def-tex city-lowres-ind-wall-02 intpfall-vis-tfrag 23) +(def-tex city-lowres-fort-yellow intpfall-vis-tfrag 24) +(def-tex city-lowres-fort-red intpfall-vis-tfrag 25) +(def-tex palcab-lowres-mark-roof-01 intpfall-vis-tfrag 26) +(def-tex city-side-support intpfall-vis-tfrag 27) +(def-tex city-lowres-ind-wall-01 intpfall-vis-tfrag 28) +(def-tex city-lowres-port-roof intpfall-vis-tfrag 29) +(def-tex city-lowres-ind-wall-03 intpfall-vis-tfrag 30) +(def-tex city-lowres-ind-wall-07 intpfall-vis-tfrag 31) +(def-tex city-lowres-ind-wall-08 intpfall-vis-tfrag 32) +(def-tex city-lowres-ind-wall-05 intpfall-vis-tfrag 33) +(def-tex city-lowres-ind-wall-06 intpfall-vis-tfrag 34) +(def-tex palcab-lowres-farm-wall intpfall-vis-tfrag 35) +(def-tex palcab-lowres-farm-wall-top intpfall-vis-tfrag 36) +(def-tex palcab-lowres-mark-roof-rim-01 intpfall-vis-tfrag 37) +(def-tex palcab-lowres-mark-shops-01 intpfall-vis-tfrag 38) +(def-tex palcab-lowres-mark-awning-green intpfall-vis-tfrag 39) +(def-tex palcab-lowres-mark-awning-red intpfall-vis-tfrag 40) +(def-tex palcab-lowres-mark-highway intpfall-vis-tfrag 41) +(def-tex city-lowres-ctygen-side-02 intpfall-vis-tfrag 42) +(def-tex city-lowres-ctygen-build-01 intpfall-vis-tfrag 43) +(def-tex city-lowres-ctygen-stripe-01 intpfall-vis-tfrag 44) +(def-tex city-lowres-ctygen-roof-01 intpfall-vis-tfrag 45) +(def-tex city-lowres-ctygen-stripe-02 intpfall-vis-tfrag 46) +(def-tex city-lowres-ctygen-roof-02 intpfall-vis-tfrag 47) +(def-tex city-lowres-ctygen-build-02 intpfall-vis-tfrag 48) +(def-tex city-lowres-ctygen-side-01 intpfall-vis-tfrag 49) +(def-tex city-lowres-ctygen-build-03 intpfall-vis-tfrag 50) +(def-tex city-lowres-ctygen-build-04 intpfall-vis-tfrag 51) +(def-tex city-lowres-ctygen-build-05 intpfall-vis-tfrag 52) +(def-tex citywide-consite-steel intpfall-vis-tfrag 53) +(def-tex citywide-consite-wall intpfall-vis-tfrag 54) +(def-tex citywide-consite-orange intpfall-vis-tfrag 55) +(def-tex t-citywide-met-bm-red-strp01 intpfall-vis-tfrag 56) +(def-tex t-citywide-met-strp01 intpfall-vis-tfrag 57) +(def-tex t-citywide-red-met-01 intpfall-vis-tfrag 58) +(def-tex t-palshaft-panl-01 intpfall-vis-tfrag 59) +(def-tex t-palshaft-pil-01 intpfall-vis-tfrag 60) +(def-tex t-palshaft-dirt-blue-01 intpfall-vis-tfrag 61) +(def-tex t-citywide-met-pill-01 intpfall-vis-tfrag 62) +(def-tex t-citywide-met-wall-02 intpfall-vis-tfrag 63) +(def-tex t-citypal-met-strp01 intpfall-vis-tfrag 64) +(def-tex t-palshaft-plate01 intpfall-vis-tfrag 65) +(def-tex t-citypal-tree-01 intpfall-vis-tfrag 66) +(def-tex city-bigpipe-ring-02 intpfall-vis-tfrag 67) +(def-tex city-bigpipe-main-02 intpfall-vis-tfrag 68) +(def-tex palcab-lowres-background-mount-build-01 intpfall-vis-tfrag 69) +(def-tex palcab-lowres-background-mount-build-02 intpfall-vis-tfrag 70) +(def-tex palcab-lowres-background-mount-build-03 intpfall-vis-tfrag 71) +(def-tex palcab-swingp-base intpfall-vis-tfrag 72) +(def-tex palcab-lowres-background-trees2 intpfall-vis-tfrag 73) +(def-tex palcab-lowres-background-trees-edge intpfall-vis-tfrag 74) +(def-tex citywide-hangmetal intpfall-vis-tfrag 75) +(def-tex tcab-beam01 intpfall-vis-tfrag 76) +(def-tex tcab-plat-edg-01 intpfall-vis-tfrag 77) +(def-tex city-lowres-damaged-01 intpfall-vis-tfrag 78) +(def-tex ctyp-metal-01 intpfall-vis-tfrag 79) +(def-tex palace-break-girder01 intpfall-vis-tfrag 80) +(def-tex palcab-lowres-stadium-grass intpfall-vis-tfrag 81) +(def-tex palcab-lowres-background-desert-01 intpfall-vis-tfrag 82) +(def-tex t-citypal-dmnd-01 intpfall-vis-tfrag 83) +(def-tex t-citypal-statue-stone-01 intpfall-vis-tfrag 84) +(def-tex t-palshaft-r-strp-plate01 intpfall-vis-tfrag 85) +(def-tex palcab-lowres-farm-road intpfall-vis-tfrag 86) +(def-tex palcab-lowres-background-mounatin-window intpfall-vis-tfrag 87) +(def-tex tcab-blue-ring-01 intpfall-vis-tfrag 88) +(def-tex palcab-lowres-background-shoreline-01 intpfall-vis-tfrag 89) +(def-tex strip-metal-02-hitweak intpfall-vis-tfrag 90) +(def-tex palcab-lowres-background-hilltops-01 intpfall-vis-tfrag 91) +(def-tex palcab-lowres-background-desert-to-shore intpfall-vis-tfrag 92) +(def-tex palcab-lowres-background-peaks-01 intpfall-vis-tfrag 93) +(def-tex palcab-lowres-background-grass-to-desert-02 intpfall-vis-tfrag 94) +(def-tex palcab-lowres-background-strip intpfall-vis-tfrag 95) +(def-tex palcab-smallpipe intpfall-vis-tfrag 96) +(def-tex palcab-lowres-background-grass-to-desert-01 intpfall-vis-tfrag 97) +(def-tex palcab-lowres-background-crater-01 intpfall-vis-tfrag 98) +(def-tex palcab-lowres-background-peaks-02 intpfall-vis-tfrag 99) +(def-tex palcab-lowres-background-mountains-02 intpfall-vis-tfrag 100) +(def-tex palcab-lowres-background-mountains intpfall-vis-tfrag 101) +(def-tex palcab-lowres-background-shoreline-02 intpfall-vis-tfrag 102) +(def-tex tpal-panl_piller01 intpfall-vis-tfrag 103) +(def-tex tpal-beam-red-yellow01 intpfall-vis-tfrag 104) +(def-tex troof-beam01 intpfall-vis-tfrag 105) +(def-tex tpal-piller-caps01 intpfall-vis-tfrag 106) +(def-tex tpal-beam01 intpfall-vis-tfrag 107) +(def-tex tpal-beam-red01 intpfall-vis-tfrag 108) +(def-tex troof-sndwch-beam-01 intpfall-vis-tfrag 109) +(def-tex palroof-metal intpfall-vis-tfrag 110) +(def-tex tpal-beam-redstripe01 intpfall-vis-tfrag 111) +(def-tex tpal-horiz-trim02 intpfall-vis-tfrag 112) +(def-tex intr-grey-holes intpfall-vis-tfrag 113) +(def-tex intr-grey intpfall-vis-tfrag 114) +(def-tex tpal-horiz-trim01 intpfall-vis-tfrag 115) +(def-tex tpal-big-metal-panl01 intpfall-vis-tfrag 116) +(def-tex palcab-wall intpfall-vis-tfrag 117) +(def-tex palcab-lowres-background-shoreline-02 intpfall-vis-alpha 0) +(def-tex palcab-lowres-background-crater-rim intpfall-vis-alpha 1) +(def-tex palcab-lowres-background-trees-edge intpfall-vis-alpha 2) +(def-tex palcab-lowres-background-trees2 intpfall-vis-alpha 3) +(def-tex palcab-lowres-ctyslum-wall-03 intpfall-vis-alpha 4) +(def-tex palcab-lowres-background-grass-to-desert-01 intpfall-vis-pris 0) +(def-tex palcab-lowres-background-hills-01 intpfall-vis-pris 1) +(def-tex palcab-lowres-background-trees-edge intpfall-vis-pris 2) +(def-tex palcab-lowres-background-trees2 intpfall-vis-pris 3) +(def-tex palcab-lowres-ctyslum-wall-03 intpfall-vis-pris 4) +(def-tex palcab-lowres-farm-road intpfall-vis-pris 5) +(def-tex palcab-lowres-farm-wall intpfall-vis-pris 6) +(def-tex palcab-lowres-farm-wall-top intpfall-vis-pris 7) +(def-tex Ashelin intpfall-vis-pris 8) +(def-tex backThing01 intpfall-vis-pris 9) +(def-tex dash01 intpfall-vis-pris 10) +(def-tex flatgerydark01 intpfall-vis-pris 11) +(def-tex gauge01 intpfall-vis-pris 12) +(def-tex grillRim01 intpfall-vis-pris 13) +(def-tex gunBoxBack01 intpfall-vis-pris 14) +(def-tex gunBoxFront01 intpfall-vis-pris 15) +(def-tex gunbox01 intpfall-vis-pris 16) +(def-tex gunbox02 intpfall-vis-pris 17) +(def-tex hood01 intpfall-vis-pris 18) +(def-tex jetTop01 intpfall-vis-pris 19) +(def-tex jets01 intpfall-vis-pris 20) +(def-tex kcfrontend01 intpfall-vis-pris 21) +(def-tex light01 intpfall-vis-pris 22) +(def-tex lightCase01 intpfall-vis-pris 23) +(def-tex palace-break-base01 intpfall-vis-pris 24) +(def-tex palace-break-base02 intpfall-vis-pris 25) +(def-tex palace-break-base03 intpfall-vis-pris 26) +(def-tex palace-break-bigwall01 intpfall-vis-pris 27) +(def-tex palace-break-bigwall02 intpfall-vis-pris 28) +(def-tex palace-break-bigwall03 intpfall-vis-pris 29) +(def-tex palace-break-bigwall04 intpfall-vis-pris 30) +(def-tex palace-break-bigwall05 intpfall-vis-pris 31) +(def-tex palace-break-bigwall06 intpfall-vis-pris 32) +(def-tex palace-break-bigwall07 intpfall-vis-pris 33) +(def-tex palace-break-bigwall08 intpfall-vis-pris 34) +(def-tex palace-break-brokenwall intpfall-vis-pris 35) +(def-tex palace-break-door intpfall-vis-pris 36) +(def-tex palace-break-floor01 intpfall-vis-pris 37) +(def-tex palace-break-floor02 intpfall-vis-pris 38) +(def-tex palace-break-girder01 intpfall-vis-pris 39) +(def-tex palace-break-girder02 intpfall-vis-pris 40) +(def-tex palace-break-glass01 intpfall-vis-pris 41) +(def-tex palace-break-glass02 intpfall-vis-pris 42) +(def-tex palace-break-glass03 intpfall-vis-pris 43) +(def-tex palace-break-glass04 intpfall-vis-pris 44) +(def-tex palace-break-glass05 intpfall-vis-pris 45) +(def-tex palace-break-infloor intpfall-vis-pris 46) +(def-tex palace-break-pillwall01 intpfall-vis-pris 47) +(def-tex palace-break-pillwall02 intpfall-vis-pris 48) +(def-tex palace-break-pillwall03 intpfall-vis-pris 49) +(def-tex palace-break-pillwall04 intpfall-vis-pris 50) +(def-tex palace-break-pillwall05 intpfall-vis-pris 51) +(def-tex palace-break-pillwall06 intpfall-vis-pris 52) +(def-tex palace-break-pillwall07 intpfall-vis-pris 53) +(def-tex palace-break-pillwall08 intpfall-vis-pris 54) +(def-tex palace-break-plainwall intpfall-vis-pris 55) +(def-tex palace-break-rebar intpfall-vis-pris 56) +(def-tex palace-break-roof01 intpfall-vis-pris 57) +(def-tex palace-break-roof02 intpfall-vis-pris 58) +(def-tex palace-break-roof03 intpfall-vis-pris 59) +(def-tex palace-break-rooftile intpfall-vis-pris 60) +(def-tex palace-break-scabel1 intpfall-vis-pris 61) +(def-tex palace-break-sdanger1 intpfall-vis-pris 62) +(def-tex palace-break-sdanger2 intpfall-vis-pris 63) +(def-tex palace-break-spanel-1 intpfall-vis-pris 64) +(def-tex palace-break-spanel-2 intpfall-vis-pris 65) +(def-tex palace-break-spanel-3 intpfall-vis-pris 66) +(def-tex palace-break-spanel-4 intpfall-vis-pris 67) +(def-tex palace-break-spanel-5 intpfall-vis-pris 68) +(def-tex palace-break-spike01 intpfall-vis-pris 69) +(def-tex palace-break-spike02 intpfall-vis-pris 70) +(def-tex palace-break-spike03 intpfall-vis-pris 71) +(def-tex palace-break-wall02 intpfall-vis-pris 72) +(def-tex palace-break-wall03 intpfall-vis-pris 73) +(def-tex palace-break-wall04 intpfall-vis-pris 74) +(def-tex palace-break-wall05 intpfall-vis-pris 75) +(def-tex palace-break-wall06 intpfall-vis-pris 76) +(def-tex palace-break-wall07 intpfall-vis-pris 77) +(def-tex palace-break-wall08 intpfall-vis-pris 78) +(def-tex palace-break-wall09 intpfall-vis-pris 79) +(def-tex palace-break-walltile intpfall-vis-pris 80) +(def-tex palace-break-walltile-02 intpfall-vis-pris 81) +(def-tex palace-break-winwall01 intpfall-vis-pris 82) +(def-tex palace-break-winwall02 intpfall-vis-pris 83) +(def-tex post01 intpfall-vis-pris 84) +(def-tex rail01 intpfall-vis-pris 85) +(def-tex seat01 intpfall-vis-pris 86) +(def-tex stripe03 intpfall-vis-pris 87) +(def-tex tpal-beam-red01 intpfall-vis-pris 88) +(def-tex tpal-beam01 intpfall-vis-pris 89) +(def-tex tpal-drain01 intpfall-vis-pris 90) +(def-tex tpal-horiz-trim02 intpfall-vis-pris 91) +(def-tex turret01 intpfall-vis-pris 92) +(def-tex wing01 intpfall-vis-pris 93) +(def-tex wing02 intpfall-vis-pris 94) +(def-tex wing02grey01 intpfall-vis-pris 95) +(def-tex yellowcard01 intpfall-vis-pris 96) +(def-tex windshield01 intpfall-vis-water 0) +(def-tex hidelight-lightfade intpfall-vis-water 1) +(def-tex searchlight-envmap intpfall-vis-water 2) +(def-tex hud-gladiator wasstadc-minimap 0) +(def-tex bam-eyelight lsigjakc-pris 0) +(def-tex bam-hairhilite lsigjakc-pris 1) +(def-tex environment-oldmetal lsigjakc-pris 2) +(def-tex jakc-armor lsigjakc-pris 3) +(def-tex jakc-chestplate-straps lsigjakc-pris 4) +(def-tex jakc-gogglemetal lsigjakc-pris 5) +(def-tex jakc-lens lsigjakc-pris 6) +(def-tex jakc-scarf lsigjakc-pris 7) +(def-tex jakc-waistband2 lsigjakc-pris 8) +(def-tex jakc-wraps lsigjakc-pris 9) +(def-tex jakc-wristband-a2 lsigjakc-pris 10) +(def-tex jakchires-arm lsigjakc-pris 11) +(def-tex jakchires-blackstrap lsigjakc-pris 12) +(def-tex jakchires-brownstrap lsigjakc-pris 13) +(def-tex jakchires-brwnleather lsigjakc-pris 14) +(def-tex jakchires-chestplate lsigjakc-pris 15) +(def-tex jakchires-clips lsigjakc-pris 16) +(def-tex jakchires-eye lsigjakc-pris 17) +(def-tex jakchires-eyebrow lsigjakc-pris 18) +(def-tex jakchires-eyelid lsigjakc-pris 19) +(def-tex jakchires-facelft lsigjakc-pris 20) +(def-tex jakchires-facert lsigjakc-pris 21) +(def-tex jakchires-glovetop lsigjakc-pris 22) +(def-tex jakchires-hair lsigjakc-pris 23) +(def-tex jakchires-horn lsigjakc-pris 24) +(def-tex jakchires-jacket lsigjakc-pris 25) +(def-tex jakchires-leatherpouch lsigjakc-pris 26) +(def-tex jakchires-lightbrownspat lsigjakc-pris 27) +(def-tex jakchires-pants lsigjakc-pris 28) +(def-tex jakchires-precarmor-01 lsigjakc-pris 29) +(def-tex jakchires-shoebottom lsigjakc-pris 30) +(def-tex jakchires-shoemetal lsigjakc-pris 31) +(def-tex jakchires-shoeteop lsigjakc-pris 32) +(def-tex jakchires-teeth lsigjakc-pris 33) +(def-tex jakc-skirt lsigjakc-pris 34) +(def-tex jakc-scarfhanging lsigjakc-pris 35) +(def-tex bam-eyelight lsigjakc-pris2 0) +(def-tex charHOLD lsigjakc-pris2 1) +(def-tex environment-oldmetal lsigjakc-pris2 2) +(def-tex sig-belt lsigjakc-pris2 3) +(def-tex sig-eye lsigjakc-pris2 4) +(def-tex sig-eyelid lsigjakc-pris2 5) +(def-tex sig-faceleft lsigjakc-pris2 6) +(def-tex sig-facert lsigjakc-pris2 7) +(def-tex sig-flask lsigjakc-pris2 8) +(def-tex sig-gem-01 lsigjakc-pris2 9) +(def-tex sig-glove lsigjakc-pris2 10) +(def-tex sig-glovetop lsigjakc-pris2 11) +(def-tex sig-gun-01 lsigjakc-pris2 12) +(def-tex sig-gun-02 lsigjakc-pris2 13) +(def-tex sig-gun-03 lsigjakc-pris2 14) +(def-tex sig-gun-04 lsigjakc-pris2 15) +(def-tex sig-gun-05 lsigjakc-pris2 16) +(def-tex sig-headgear lsigjakc-pris2 17) +(def-tex sig-horn lsigjakc-pris2 18) +(def-tex sig-lens lsigjakc-pris2 19) +(def-tex sig-metal-01 lsigjakc-pris2 20) +(def-tex sig-metal-dirty lsigjakc-pris2 21) +(def-tex sig-sac lsigjakc-pris2 22) +(def-tex sig-shoebottom lsigjakc-pris2 23) +(def-tex sig-shoetop lsigjakc-pris2 24) +(def-tex sig-shoulderarmor lsigjakc-pris2 25) +(def-tex sig-skirts lsigjakc-pris2 26) +(def-tex sig-skirts-02 lsigjakc-pris2 27) +(def-tex sig-skirts-03 lsigjakc-pris2 28) +(def-tex sig-undergarments lsigjakc-pris2 29) +(def-tex vin-teeth-01 lsigjakc-pris2 30) +(def-tex sig-flatfangs lsigjakc-water 0) +(def-tex bam-eyelight ltorn-pris2 0) +(def-tex bam-hairhilite ltorn-pris2 1) +(def-tex charHOLD ltorn-pris2 2) +(def-tex torn-armlft ltorn-pris2 3) +(def-tex torn-armor ltorn-pris2 4) +(def-tex torn-belt ltorn-pris2 5) +(def-tex torn-belt2 ltorn-pris2 6) +(def-tex torn-blademetal ltorn-pris2 7) +(def-tex torn-ear ltorn-pris2 8) +(def-tex torn-eye ltorn-pris2 9) +(def-tex torn-eyelid ltorn-pris2 10) +(def-tex torn-face ltorn-pris2 11) +(def-tex torn-face-right ltorn-pris2 12) +(def-tex torn-finger ltorn-pris2 13) +(def-tex torn-footleather ltorn-pris2 14) +(def-tex torn-gunbarrel ltorn-pris2 15) +(def-tex torn-gunbarrel-02 ltorn-pris2 16) +(def-tex torn-hair-01 ltorn-pris2 17) +(def-tex torn-hair-02 ltorn-pris2 18) +(def-tex torn-handle-01 ltorn-pris2 19) +(def-tex torn-legshield ltorn-pris2 20) +(def-tex torn-metal2 ltorn-pris2 21) +(def-tex torn-mouth ltorn-pris2 22) +(def-tex torn-pipe ltorn-pris2 23) +(def-tex torn-scarf ltorn-pris2 24) +(def-tex torn-shoe ltorn-pris2 25) +(def-tex torn-shoe-02 ltorn-pris2 26) +(def-tex torn-teeth-01 ltorn-pris2 27) +(def-tex torn-vest ltorn-pris2 28) +(def-tex bam-eyelight freehq-pris2 0) +(def-tex bam-hairhilite freehq-pris2 1) +(def-tex charHOLD freehq-pris2 2) +(def-tex torn-armlft freehq-pris2 3) +(def-tex torn-armor freehq-pris2 4) +(def-tex torn-belt freehq-pris2 5) +(def-tex torn-belt2 freehq-pris2 6) +(def-tex torn-blademetal freehq-pris2 7) +(def-tex torn-ear freehq-pris2 8) +(def-tex torn-eye freehq-pris2 9) +(def-tex torn-eyelid freehq-pris2 10) +(def-tex torn-face freehq-pris2 11) +(def-tex torn-face-right freehq-pris2 12) +(def-tex torn-finger freehq-pris2 13) +(def-tex torn-footleather freehq-pris2 14) +(def-tex torn-gunbarrel freehq-pris2 15) +(def-tex torn-gunbarrel-02 freehq-pris2 16) +(def-tex torn-hair-01 freehq-pris2 17) +(def-tex torn-hair-02 freehq-pris2 18) +(def-tex torn-handle-01 freehq-pris2 19) +(def-tex torn-legshield freehq-pris2 20) +(def-tex torn-metal2 freehq-pris2 21) +(def-tex torn-mouth freehq-pris2 22) +(def-tex torn-pipe freehq-pris2 23) +(def-tex torn-scarf freehq-pris2 24) +(def-tex torn-shoe freehq-pris2 25) +(def-tex torn-shoe-02 freehq-pris2 26) +(def-tex torn-teeth-01 freehq-pris2 27) +(def-tex torn-vest freehq-pris2 28) +(def-tex bam-eyelight ljakc-pris 0) +(def-tex bam-hairhilite ljakc-pris 1) +(def-tex environment-oldmetal ljakc-pris 2) +(def-tex jakc-armor ljakc-pris 3) +(def-tex jakc-chestplate-straps ljakc-pris 4) +(def-tex jakc-gogglemetal ljakc-pris 5) +(def-tex jakc-lens ljakc-pris 6) +(def-tex jakc-scarf ljakc-pris 7) +(def-tex jakc-waistband2 ljakc-pris 8) +(def-tex jakc-wraps ljakc-pris 9) +(def-tex jakc-wristband-a2 ljakc-pris 10) +(def-tex jakchires-arm ljakc-pris 11) +(def-tex jakchires-blackstrap ljakc-pris 12) +(def-tex jakchires-brownstrap ljakc-pris 13) +(def-tex jakchires-brwnleather ljakc-pris 14) +(def-tex jakchires-chestplate ljakc-pris 15) +(def-tex jakchires-clips ljakc-pris 16) +(def-tex jakchires-eye ljakc-pris 17) +(def-tex jakchires-eyebrow ljakc-pris 18) +(def-tex jakchires-eyelid ljakc-pris 19) +(def-tex jakchires-facelft ljakc-pris 20) +(def-tex jakchires-facert ljakc-pris 21) +(def-tex jakchires-glovetop ljakc-pris 22) +(def-tex jakchires-hair ljakc-pris 23) +(def-tex jakchires-horn ljakc-pris 24) +(def-tex jakchires-jacket ljakc-pris 25) +(def-tex jakchires-leatherpouch ljakc-pris 26) +(def-tex jakchires-lightbrownspat ljakc-pris 27) +(def-tex jakchires-pants ljakc-pris 28) +(def-tex jakchires-precarmor-01 ljakc-pris 29) +(def-tex jakchires-shoebottom ljakc-pris 30) +(def-tex jakchires-shoemetal ljakc-pris 31) +(def-tex jakchires-shoeteop ljakc-pris 32) +(def-tex jakchires-teeth ljakc-pris 33) +(def-tex jakc-skirt ljakc-pris 34) +(def-tex jakc-scarfhanging ljakc-pris 35) +(def-tex gun-main ljakc-pris 36) +(def-tex gun-red-glow ljakc-pris 37) +(def-tex gun-red-mag ljakc-pris 38) +(def-tex bam-eyelight wasseem-pris2 0) +(def-tex environment-oldmetal wasseem-pris2 1) +(def-tex seem-arm wasseem-pris2 2) +(def-tex seem-bootbottom wasseem-pris2 3) +(def-tex seem-bootleg wasseem-pris2 4) +(def-tex seem-bootlower wasseem-pris2 5) +(def-tex seem-bootmet wasseem-pris2 6) +(def-tex seem-boottoe wasseem-pris2 7) +(def-tex seem-ear wasseem-pris2 8) +(def-tex seem-eye wasseem-pris2 9) +(def-tex seem-eyelid wasseem-pris2 10) +(def-tex seem-face wasseem-pris2 11) +(def-tex seem-finger wasseem-pris2 12) +(def-tex seem-hand wasseem-pris2 13) +(def-tex seem-pipeend wasseem-pris2 14) +(def-tex seem-pipes-01 wasseem-pris2 15) +(def-tex seem-precmetal-chestplate-01 wasseem-pris2 16) +(def-tex seem-precmetal-edge wasseem-pris2 17) +(def-tex seem-precmetal-plain wasseem-pris2 18) +(def-tex seem-straps wasseem-pris2 19) +(def-tex seem-uppertorso wasseem-pris2 20) +(def-tex seem-headgearback wasseem-pris2 21) +(def-tex seem-headpiecetop wasseem-pris2 22) +(def-tex seem-pipes-02 wasseem-pris2 23) +(def-tex seem-teeth wasseem-pris2 24) +(def-tex seem-skirt wasseem-pris2 26) +(def-tex seem-skirt-small wasseem-pris2 27) +(def-tex bam-eyelight ltornjnx-pris2 0) +(def-tex bam-hairhilite ltornjnx-pris2 1) +(def-tex charHOLD ltornjnx-pris2 2) +(def-tex torn-armlft ltornjnx-pris2 3) +(def-tex torn-armor ltornjnx-pris2 4) +(def-tex torn-belt ltornjnx-pris2 5) +(def-tex torn-belt2 ltornjnx-pris2 6) +(def-tex torn-blademetal ltornjnx-pris2 7) +(def-tex torn-ear ltornjnx-pris2 8) +(def-tex torn-eye ltornjnx-pris2 9) +(def-tex torn-eyelid ltornjnx-pris2 10) +(def-tex torn-face ltornjnx-pris2 11) +(def-tex torn-face-right ltornjnx-pris2 12) +(def-tex torn-finger ltornjnx-pris2 13) +(def-tex torn-footleather ltornjnx-pris2 14) +(def-tex torn-gunbarrel ltornjnx-pris2 15) +(def-tex torn-gunbarrel-02 ltornjnx-pris2 16) +(def-tex torn-hair-01 ltornjnx-pris2 17) +(def-tex torn-hair-02 ltornjnx-pris2 18) +(def-tex torn-handle-01 ltornjnx-pris2 19) +(def-tex torn-legshield ltornjnx-pris2 20) +(def-tex torn-metal2 ltornjnx-pris2 21) +(def-tex torn-mouth ltornjnx-pris2 22) +(def-tex torn-pipe ltornjnx-pris2 23) +(def-tex torn-scarf ltornjnx-pris2 24) +(def-tex torn-shoe ltornjnx-pris2 25) +(def-tex torn-shoe-02 ltornjnx-pris2 26) +(def-tex torn-teeth-01 ltornjnx-pris2 27) +(def-tex torn-vest ltornjnx-pris2 28) +(def-tex environment-oldmetal ltornjnx-pris2 29) +(def-tex jinx-arm ltornjnx-pris2 30) +(def-tex jinx-belt ltornjnx-pris2 31) +(def-tex jinx-blademetal ltornjnx-pris2 32) +(def-tex jinx-boottoe ltornjnx-pris2 33) +(def-tex jinx-boottop ltornjnx-pris2 34) +(def-tex jinx-brownstrap ltornjnx-pris2 35) +(def-tex jinx-brownstrapbolts ltornjnx-pris2 36) +(def-tex jinx-buckles ltornjnx-pris2 37) +(def-tex jinx-cigar ltornjnx-pris2 38) +(def-tex jinx-cigarflame ltornjnx-pris2 39) +(def-tex jinx-eyelid ltornjnx-pris2 40) +(def-tex jinx-face ltornjnx-pris2 41) +(def-tex jinx-finger ltornjnx-pris2 42) +(def-tex jinx-glove ltornjnx-pris2 43) +(def-tex jinx-glovepalm ltornjnx-pris2 44) +(def-tex jinx-hair ltornjnx-pris2 45) +(def-tex jinx-hairtye ltornjnx-pris2 46) +(def-tex jinx-handle ltornjnx-pris2 47) +(def-tex jinx-iris ltornjnx-pris2 48) +(def-tex jinx-kneepad ltornjnx-pris2 49) +(def-tex jinx-pants ltornjnx-pris2 50) +(def-tex jinx-rope-01 ltornjnx-pris2 51) +(def-tex jinx-scarf ltornjnx-pris2 52) +(def-tex jinx-shirt ltornjnx-pris2 53) +(def-tex jinx-shoebottom2 ltornjnx-pris2 54) +(def-tex jinx-singlerope ltornjnx-pris2 55) +(def-tex jinx-teeth ltornjnx-pris2 56) +(def-tex jinx-wraps ltornjnx-pris2 57) +(def-tex wstd-gate-pass-03 arenacst-tfrag 0) +(def-tex wstd-gate-pass-02 arenacst-tfrag 1) +(def-tex wstd-gate-pass-01 arenacst-tfrag 2) +(def-tex wstd-gate-pass-04 arenacst-tfrag 3) +(def-tex hud-arena-token wasstadb-minimap 0) +(def-tex sig2-flatfangs lwassig-water 0) +(def-tex wang_black hanga-hfrag 0) +(def-tex wang_mip hanga-hfrag 1) +(def-tex wang_0 hanga-hfrag 2) +(def-tex wang_1 hanga-hfrag 3) +(def-tex wang_2 hanga-hfrag 4) +(def-tex wang_3 hanga-hfrag 5) +(def-tex wang_4 hanga-hfrag 6) +(def-tex ctyslumc-water ctyslumc-vis-water 0) +(def-tex ctyslumc-water-dest ctyslumc-vis-water 1) +(def-tex ctyslumc-fountain-fall ctyslumc-vis-water 2) +(def-tex ctyslumc-fountain-fall-dest ctyslumc-vis-water 3) +(def-tex racegate hanga-sprite 0) +(def-tex glider-ring-dest hanga-sprite 2) +(def-tex glider-ring-dest2 hanga-sprite 3) +(def-tex bam-eyelight volcanox-pris 0) +(def-tex bam-hairhilite volcanox-pris 1) +(def-tex daxter-eyelid volcanox-pris 2) +(def-tex daxter-furhilite volcanox-pris 3) +(def-tex daxter-orange volcanox-pris 4) +(def-tex daxterarm volcanox-pris 5) +(def-tex daxterbodyshort-eix volcanox-pris 6) +(def-tex daxterbolt volcanox-pris 7) +(def-tex daxterear volcanox-pris 8) +(def-tex daxterfinger volcanox-pris 9) +(def-tex daxterfoot volcanox-pris 10) +(def-tex daxterfoot-bottom volcanox-pris 11) +(def-tex daxtergoggles volcanox-pris 12) +(def-tex daxterheadwidenew volcanox-pris 13) +(def-tex daxterhelmetplain volcanox-pris 14) +(def-tex daxterlense volcanox-pris 15) +(def-tex daxternose volcanox-pris 16) +(def-tex daxterteeth volcanox-pris 17) +(def-tex daxtertuft volcanox-pris 18) +(def-tex environment-oldmetal volcanox-pris 19) +(def-tex jakc-armor volcanox-pris 20) +(def-tex jakc-chestplate-straps volcanox-pris 21) +(def-tex jakc-gogglemetal volcanox-pris 22) +(def-tex jakc-lens volcanox-pris 23) +(def-tex jakc-scarf volcanox-pris 24) +(def-tex jakc-waistband2 volcanox-pris 25) +(def-tex jakc-wraps volcanox-pris 26) +(def-tex jakc-wristband-a2 volcanox-pris 27) +(def-tex jakchires-arm volcanox-pris 28) +(def-tex jakchires-blackstrap volcanox-pris 29) +(def-tex jakchires-brownstrap volcanox-pris 30) +(def-tex jakchires-brwnleather volcanox-pris 31) +(def-tex jakchires-chestplate volcanox-pris 32) +(def-tex jakchires-clips volcanox-pris 33) +(def-tex jakchires-eye volcanox-pris 34) +(def-tex jakchires-eyebrow volcanox-pris 35) +(def-tex jakchires-eyelid volcanox-pris 36) +(def-tex jakchires-facelft volcanox-pris 37) +(def-tex jakchires-facert volcanox-pris 38) +(def-tex jakchires-glovetop volcanox-pris 39) +(def-tex jakchires-hair volcanox-pris 40) +(def-tex jakchires-horn volcanox-pris 41) +(def-tex jakchires-jacket volcanox-pris 42) +(def-tex jakchires-leatherpouch volcanox-pris 43) +(def-tex jakchires-lightbrownspat volcanox-pris 44) +(def-tex jakchires-pants volcanox-pris 45) +(def-tex jakchires-precarmor-01 volcanox-pris 46) +(def-tex jakchires-shoebottom volcanox-pris 47) +(def-tex jakchires-shoemetal volcanox-pris 48) +(def-tex jakchires-shoeteop volcanox-pris 49) +(def-tex jakchires-teeth volcanox-pris 50) +(def-tex jakc-skirt volcanox-pris 51) +(def-tex jakc-scarfhanging volcanox-pris 52) +(def-tex tpl-glider-grip01 volcanox-pris 56) +(def-tex tpl-glider-metal01 volcanox-pris 57) +(def-tex tpl-glider-metal02 volcanox-pris 58) +(def-tex tpl-glider-precursor01 volcanox-pris 59) +(def-tex tpl-glider-wood03 volcanox-pris 60) +(def-tex tpl-rut01 volcanox-pris 61) +(def-tex tpl-wing01 volcanox-pris 62) +(def-tex tpl-wing03 volcanox-pris 63) +(def-tex dk-maker-idol-collar-01 volcanox-pris 78) +(def-tex dk-maker-idol-collar-02 volcanox-pris 79) +(def-tex dk-maker-idol-eye-01 volcanox-pris 80) +(def-tex dk-maker-idol-eye-dk-01 volcanox-pris 81) +(def-tex dk-maker-idol-globes-01 volcanox-pris 82) +(def-tex dk-maker-idol-globes-dk-01 volcanox-pris 83) +(def-tex dk-maker-idol-head-01 volcanox-pris 84) +(def-tex dk-maker-idol-metal-01 volcanox-pris 85) +(def-tex dk-maker-idol-tubes-01 volcanox-pris 86) +(def-tex dm-spines-dk-hose-01 volcanox-pris 88) +(def-tex dm-spines-dk-plate-01 volcanox-pris 89) +(def-tex dm-spines-dk-ribs-01 volcanox-pris 90) +(def-tex environment-darkprec volcanox-pris 91) +(def-tex monk-mummy-arm volcanox-pris 96) +(def-tex monk-mummy-boot volcanox-pris 97) +(def-tex monk-mummy-boottoe volcanox-pris 98) +(def-tex monk-mummy-ear volcanox-pris 99) +(def-tex monk-mummy-headgearback volcanox-pris 100) +(def-tex monk-mummy-precchest volcanox-pris 101) +(def-tex monk-mummy-precedge volcanox-pris 102) +(def-tex monk-mummy-precplain volcanox-pris 103) +(def-tex monk-mummy-shoebottom volcanox-pris 104) +(def-tex monk-mummy-skirt-01 volcanox-pris 105) +(def-tex monk-mummy-straps volcanox-pris 106) +(def-tex monk-mummy-uppertorso volcanox-pris 107) +(def-tex grunt-eye-01 volcanox-pris 108) +(def-tex grunt-gem-01 volcanox-pris 109) +(def-tex grunt-hose volcanox-pris 110) +(def-tex grunt-metal-01 volcanox-pris 111) +(def-tex grunt-skin-01 volcanox-pris 112) +(def-tex grunt-skin-02 volcanox-pris 113) +(def-tex grunt-skin-03 volcanox-pris 114) +(def-tex monk-mummy-face volcanox-pris 115) +(def-tex for-egg-bottom lformach-vis-pris 0) +(def-tex for-egg-bulb-01 lformach-vis-pris 1) +(def-tex for-egg-bulbtop-01 lformach-vis-pris 2) +(def-tex for-egg-gem-01 lformach-vis-pris 3) +(def-tex for-egg-rim-01 lformach-vis-pris 4) +(def-tex turret-controls lformach-vis-pris 13) +(def-tex turret-hose lformach-vis-pris 14) +(def-tex turret-light lformach-vis-pris 15) +(def-tex turret-metal lformach-vis-pris 16) +(def-tex turret-metal-2 lformach-vis-pris 17) +(def-tex turret-metal-red lformach-vis-pris 18) +(def-tex turret-mh-metal lformach-vis-pris 19) +(def-tex for-egg-bulbtop-02 lformach-vis-pris 20) +(def-tex for-hose lformach-vis-pris 21) +(def-tex common-black lformach-vis-pris 22) +(def-tex neo-wasp-base lformach-vis-pris 23) +(def-tex neo-wasp-body lformach-vis-pris 24) +(def-tex neo-wasp-brown lformach-vis-pris 25) +(def-tex neo-wasp-dark-brown lformach-vis-pris 26) +(def-tex neo-wasp-eye lformach-vis-pris 27) +(def-tex spawner-base lformach-vis-pris 28) +(def-tex spawner-base-main lformach-vis-pris 29) +(def-tex spawner-leaf-02 lformach-vis-pris 30) +(def-tex spawner-leaf-03 lformach-vis-pris 31) +(def-tex spawner-spike-01 lformach-vis-pris 32) +(def-tex spawner-spike-02 lformach-vis-pris 33) +(def-tex dp-bipedal-backhand-01 lformach-vis-pris 54) +(def-tex dp-bipedal-chest-01 lformach-vis-pris 55) +(def-tex dp-bipedal-dk-hose-01 lformach-vis-pris 56) +(def-tex dp-bipedal-dk-plate-01 lformach-vis-pris 57) +(def-tex dp-bipedal-dk-plate-02 lformach-vis-pris 58) +(def-tex dp-bipedal-dk-plate-03 lformach-vis-pris 59) +(def-tex dp-bipedal-dk-plate-04 lformach-vis-pris 60) +(def-tex dp-bipedal-dk-sm-plate-01 lformach-vis-pris 61) +(def-tex dp-bipedal-dk-stomach-plate-01 lformach-vis-pris 62) +(def-tex dp-bipedal-eye-01 lformach-vis-pris 63) +(def-tex dp-bipedal-finger-plate-01 lformach-vis-pris 64) +(def-tex dp-bipedal-nose-01 lformach-vis-pris 65) +(def-tex dp-bipedal-power-hose lformach-vis-pris 66) +(def-tex dp-bipedal-skin-bulge-01 lformach-vis-pris 67) +(def-tex dp-bipedal-skin-bulge-02 lformach-vis-pris 68) +(def-tex dp-bipedal-skin-plate-01 lformach-vis-pris 69) +(def-tex dp-bipedal-skin-ribs-01 lformach-vis-pris 70) +(def-tex dp-bipedal-spine-01 lformach-vis-pris 71) +(def-tex dp-bipedal-toe-01 lformach-vis-pris 72) +(def-tex dp-bipedal-skin-plate-small-01 lformach-vis-pris 73) +(def-tex environment-darkprec lformach-vis-pris 74) +(def-tex spawner-base-dead lformach-vis-pris 75) +(def-tex spawner-base-main-dead lformach-vis-pris 76) +(def-tex for-egg-membrane-01 lformach-vis-water 0) +(def-tex mhbat-eye-01 lnstoba-vis-pris 0) +(def-tex mhbat-hose lnstoba-vis-pris 1) +(def-tex mhbat-metal-01 lnstoba-vis-pris 2) +(def-tex mhbat-skin-01 lnstoba-vis-pris 3) +(def-tex mhbat-teeth lnstoba-vis-pris 4) +(def-tex mhbat-wings lnstoba-vis-pris 5) +(def-tex nsta-cave-floor-01 lnstoba-vis-pris 6) +(def-tex nsta-wall lnstoba-vis-pris 7) +(def-tex nestb-basekor lnstoba-vis-pris 8) +(def-tex nestb-eggskin lnstoba-vis-pris 9) +(def-tex nestb-membrane lnstoba-vis-pris 10) +(def-tex nsta-finger-pipe lnstoba-vis-pris 11) +(def-tex nst-egg-bottom lnstoba-vis-pris 12) +(def-tex nst-egg-bulb-01 lnstoba-vis-pris 13) +(def-tex nst-egg-bulbtop-01 lnstoba-vis-pris 14) +(def-tex nst-egg-gem-01 lnstoba-vis-pris 15) +(def-tex nst-egg-rim-01 lnstoba-vis-pris 16) +(def-tex nst-egg-bulbtop-02 lnstoba-vis-pris 17) +(def-tex nst-hose lnstoba-vis-pris 18) +(def-tex nest-pups lnstoba-vis-alpha 0) +(def-tex nest-pups lnstoba-vis-water 0) +(def-tex nst-egg-membrane-01 lnstoba-vis-water 1) +(def-tex ctyport-mine-body lctypatk-tfrag 0) +(def-tex ctyport-mine-rim-01 lctypatk-tfrag 1) +(def-tex ctyport-mine-tip lctypatk-tfrag 2) +(def-tex ctyport-mine-top lctypatk-tfrag 3) +(def-tex dax-missile-fin-02 lctypatk-tfrag 4) +(def-tex dax-missile-tip-01 lctypatk-tfrag 5) +(def-tex dax-missile-body-01 lctypatk-tfrag 6) +(def-tex dax-missile-body-02 lctypatk-tfrag 7) +(def-tex dax-missile-engine-glow lctypatk-tfrag 8) +(def-tex prt-min-metal-03 lctypatk-tfrag 13) +(def-tex prt-min-metal-02 lctypatk-tfrag 14) +(def-tex prt-min-metal-01 lctypatk-tfrag 15) +(def-tex prt-min-metal-04 lctypatk-tfrag 16) +(def-tex bam-eyelight ljak-pris 0) +(def-tex bam-hairhilite ljak-pris 1) +(def-tex environment-oldmetal ljak-pris 2) +(def-tex jackb-lens ljak-pris 3) +(def-tex jak-belt ljak-pris 4) +(def-tex jak-gogglemetal ljak-pris 5) +(def-tex jak-teeth ljak-pris 6) +(def-tex jakb-armor ljak-pris 7) +(def-tex jakb-blackstrap ljak-pris 8) +(def-tex jakb-brownleather ljak-pris 9) +(def-tex jakb-clips ljak-pris 10) +(def-tex jakb-eye ljak-pris 11) +(def-tex jakb-eyebrow ljak-pris 12) +(def-tex jakb-eyelid ljak-pris 13) +(def-tex jakb-facelft ljak-pris 14) +(def-tex jakb-facert ljak-pris 15) +(def-tex jakb-glovetop ljak-pris 16) +(def-tex jakb-hairtrans ljak-pris 17) +(def-tex jakb-horn ljak-pris 18) +(def-tex jakb-jacketbody ljak-pris 19) +(def-tex jakb-jacketsleeve ljak-pris 20) +(def-tex jakb-leatherpouch ljak-pris 21) +(def-tex jakb-leatherstrap ljak-pris 22) +(def-tex jakb-lightbrownspat ljak-pris 23) +(def-tex jakb-lightbrownstrap ljak-pris 24) +(def-tex jakb-pants ljak-pris 25) +(def-tex jakb-scarf ljak-pris 26) +(def-tex jakb-shoebottom ljak-pris 27) +(def-tex jakb-shoemetal ljak-pris 28) +(def-tex jakb-shoeteop ljak-pris 29) +(def-tex monk-malepants wasseem-water 1) +(def-tex bam-eyelight ljaksig-pris 0) +(def-tex bam-hairhilite ljaksig-pris 1) +(def-tex environment-oldmetal ljaksig-pris 2) +(def-tex jackb-lens ljaksig-pris 3) +(def-tex jak-belt ljaksig-pris 4) +(def-tex jak-gogglemetal ljaksig-pris 5) +(def-tex jak-teeth ljaksig-pris 6) +(def-tex jakb-armor ljaksig-pris 7) +(def-tex jakb-blackstrap ljaksig-pris 8) +(def-tex jakb-brownleather ljaksig-pris 9) +(def-tex jakb-clips ljaksig-pris 10) +(def-tex jakb-eye ljaksig-pris 11) +(def-tex jakb-eyebrow ljaksig-pris 12) +(def-tex jakb-eyelid ljaksig-pris 13) +(def-tex jakb-facelft ljaksig-pris 14) +(def-tex jakb-facert ljaksig-pris 15) +(def-tex jakb-glovetop ljaksig-pris 16) +(def-tex jakb-hairtrans ljaksig-pris 17) +(def-tex jakb-horn ljaksig-pris 18) +(def-tex jakb-jacketbody ljaksig-pris 19) +(def-tex jakb-jacketsleeve ljaksig-pris 20) +(def-tex jakb-leatherpouch ljaksig-pris 21) +(def-tex jakb-leatherstrap ljaksig-pris 22) +(def-tex jakb-lightbrownspat ljaksig-pris 23) +(def-tex jakb-lightbrownstrap ljaksig-pris 24) +(def-tex jakb-pants ljaksig-pris 25) +(def-tex jakb-scarf ljaksig-pris 26) +(def-tex jakb-shoebottom ljaksig-pris 27) +(def-tex jakb-shoemetal ljaksig-pris 28) +(def-tex jakb-shoeteop ljaksig-pris 29) +(def-tex bam-eyelight ljaksig-pris2 0) +(def-tex charHOLD ljaksig-pris2 1) +(def-tex environment-oldmetal ljaksig-pris2 2) +(def-tex sig-belt ljaksig-pris2 3) +(def-tex sig-eye ljaksig-pris2 4) +(def-tex sig-eyelid ljaksig-pris2 5) +(def-tex sig-faceleft ljaksig-pris2 6) +(def-tex sig-facert ljaksig-pris2 7) +(def-tex sig-flask ljaksig-pris2 8) +(def-tex sig-gem-01 ljaksig-pris2 9) +(def-tex sig-glove ljaksig-pris2 10) +(def-tex sig-glovetop ljaksig-pris2 11) +(def-tex sig-gun-01 ljaksig-pris2 12) +(def-tex sig-gun-02 ljaksig-pris2 13) +(def-tex sig-gun-03 ljaksig-pris2 14) +(def-tex sig-gun-04 ljaksig-pris2 15) +(def-tex sig-gun-05 ljaksig-pris2 16) +(def-tex sig-headgear ljaksig-pris2 17) +(def-tex sig-horn ljaksig-pris2 18) +(def-tex sig-lens ljaksig-pris2 19) +(def-tex sig-metal-01 ljaksig-pris2 20) +(def-tex sig-metal-dirty ljaksig-pris2 21) +(def-tex sig-sac ljaksig-pris2 22) +(def-tex sig-shoebottom ljaksig-pris2 23) +(def-tex sig-shoetop ljaksig-pris2 24) +(def-tex sig-shoulderarmor ljaksig-pris2 25) +(def-tex sig-skirts ljaksig-pris2 26) +(def-tex sig-skirts-02 ljaksig-pris2 27) +(def-tex sig-skirts-03 ljaksig-pris2 28) +(def-tex sig-undergarments ljaksig-pris2 29) +(def-tex vin-teeth-01 ljaksig-pris2 30) +(def-tex sig-flatfangs ljaksig-water 0) +(def-tex bam-eyelight ljkdmpk-pris 0) +(def-tex bam-hairhilite ljkdmpk-pris 1) +(def-tex environment-oldmetal ljkdmpk-pris 2) +(def-tex pecker-body-01 ljkdmpk-pris 30) +(def-tex pecker-eyelid ljkdmpk-pris 31) +(def-tex pecker-face ljkdmpk-pris 32) +(def-tex pecker-plume ljkdmpk-pris 33) +(def-tex pecker-tail ljkdmpk-pris 34) +(def-tex pecker-teeth ljkdmpk-pris 35) +(def-tex pecker-wingbottom ljkdmpk-pris 36) +(def-tex pecker-wingtop ljkdmpk-pris 37) +(def-tex pecker-yellowfur ljkdmpk-pris 38) +(def-tex jakc-armor ljkdmpk-pris 39) +(def-tex jakc-chestplate-straps ljkdmpk-pris 40) +(def-tex jakc-gogglemetal ljkdmpk-pris 41) +(def-tex jakc-lens ljkdmpk-pris 42) +(def-tex jakc-scarf ljkdmpk-pris 43) +(def-tex jakc-scarfhanging ljkdmpk-pris 44) +(def-tex jakc-skirt ljkdmpk-pris 45) +(def-tex jakc-waistband2 ljkdmpk-pris 46) +(def-tex jakc-wraps ljkdmpk-pris 47) +(def-tex jakc-wristband-a2 ljkdmpk-pris 48) +(def-tex jakchires-arm ljkdmpk-pris 49) +(def-tex jakchires-blackstrap ljkdmpk-pris 50) +(def-tex jakchires-brownstrap ljkdmpk-pris 51) +(def-tex jakchires-brwnleather ljkdmpk-pris 52) +(def-tex jakchires-chestplate ljkdmpk-pris 53) +(def-tex jakchires-clips ljkdmpk-pris 54) +(def-tex jakchires-eye ljkdmpk-pris 55) +(def-tex jakchires-eyebrow ljkdmpk-pris 56) +(def-tex jakchires-eyelid ljkdmpk-pris 57) +(def-tex jakchires-facelft ljkdmpk-pris 58) +(def-tex jakchires-facert ljkdmpk-pris 59) +(def-tex jakchires-glovetop ljkdmpk-pris 60) +(def-tex jakchires-hair ljkdmpk-pris 61) +(def-tex jakchires-horn ljkdmpk-pris 62) +(def-tex jakchires-jacket ljkdmpk-pris 63) +(def-tex jakchires-leatherpouch ljkdmpk-pris 64) +(def-tex jakchires-lightbrownspat ljkdmpk-pris 65) +(def-tex jakchires-pants ljkdmpk-pris 66) +(def-tex jakchires-precarmor-01 ljkdmpk-pris 67) +(def-tex jakchires-shoebottom ljkdmpk-pris 68) +(def-tex jakchires-shoemetal ljkdmpk-pris 69) +(def-tex jakchires-shoeteop ljkdmpk-pris 70) +(def-tex jakchires-teeth ljkdmpk-pris 71) +(def-tex bam-eyelight ljkdmpk-pris2 0) +(def-tex environment-oldmetal ljkdmpk-pris2 1) +(def-tex king-arm ljkdmpk-pris2 2) +(def-tex king-blackskirt2 ljkdmpk-pris2 3) +(def-tex king-bluemetal ljkdmpk-pris2 4) +(def-tex king-bolt ljkdmpk-pris2 5) +(def-tex king-chest ljkdmpk-pris2 6) +(def-tex king-clip-02 ljkdmpk-pris2 7) +(def-tex king-ear ljkdmpk-pris2 8) +(def-tex king-earing ljkdmpk-pris2 9) +(def-tex king-face-01 ljkdmpk-pris2 10) +(def-tex king-finger ljkdmpk-pris2 11) +(def-tex king-greenmetal ljkdmpk-pris2 12) +(def-tex king-greenmetalplain ljkdmpk-pris2 13) +(def-tex king-hair ljkdmpk-pris2 14) +(def-tex king-hand ljkdmpk-pris2 15) +(def-tex king-horn ljkdmpk-pris2 16) +(def-tex king-iris ljkdmpk-pris2 17) +(def-tex king-leg ljkdmpk-pris2 18) +(def-tex king-lgblackstrap ljkdmpk-pris2 19) +(def-tex king-precursermetal-decor ljkdmpk-pris2 20) +(def-tex king-precursermetal-plain ljkdmpk-pris2 21) +(def-tex king-precursermetal-trim ljkdmpk-pris2 22) +(def-tex king-precursermetal-trim2 ljkdmpk-pris2 23) +(def-tex king-precursermetal-trimbolt ljkdmpk-pris2 24) +(def-tex king-shoebottom ljkdmpk-pris2 25) +(def-tex king-skirt ljkdmpk-pris2 26) +(def-tex king-teeth ljkdmpk-pris2 27) +(def-tex king-thinstrap ljkdmpk-pris2 28) +(def-tex king-vest ljkdmpk-pris2 29) +(def-tex king-vestback ljkdmpk-pris2 30) +(def-tex king-wrap ljkdmpk-pris2 31) +(def-tex king-wraps ljkdmpk-pris2 32) +(def-tex king-wristband ljkdmpk-pris2 33) +(def-tex king-skirt-b ljkdmpk-pris2 34) +(def-tex bam-eyelight ljakklev-pris 0) +(def-tex bam-hairhilite ljakklev-pris 1) +(def-tex environment-oldmetal ljakklev-pris 2) +(def-tex jackb-lens ljakklev-pris 3) +(def-tex jak-belt ljakklev-pris 4) +(def-tex jak-gogglemetal ljakklev-pris 5) +(def-tex jak-teeth ljakklev-pris 6) +(def-tex jakb-armor ljakklev-pris 7) +(def-tex jakb-blackstrap ljakklev-pris 8) +(def-tex jakb-brownleather ljakklev-pris 9) +(def-tex jakb-clips ljakklev-pris 10) +(def-tex jakb-eye ljakklev-pris 11) +(def-tex jakb-eyebrow ljakklev-pris 12) +(def-tex jakb-eyelid ljakklev-pris 13) +(def-tex jakb-facelft ljakklev-pris 14) +(def-tex jakb-facert ljakklev-pris 15) +(def-tex jakb-glovetop ljakklev-pris 16) +(def-tex jakb-hairtrans ljakklev-pris 17) +(def-tex jakb-horn ljakklev-pris 18) +(def-tex jakb-jacketbody ljakklev-pris 19) +(def-tex jakb-jacketsleeve ljakklev-pris 20) +(def-tex jakb-leatherpouch ljakklev-pris 21) +(def-tex jakb-leatherstrap ljakklev-pris 22) +(def-tex jakb-lightbrownspat ljakklev-pris 23) +(def-tex jakb-lightbrownstrap ljakklev-pris 24) +(def-tex jakb-pants ljakklev-pris 25) +(def-tex jakb-scarf ljakklev-pris 26) +(def-tex jakb-shoebottom ljakklev-pris 27) +(def-tex jakb-shoemetal ljakklev-pris 28) +(def-tex jakb-shoeteop ljakklev-pris 29) +(def-tex klever-arm ljakklev-pris 30) +(def-tex klever-armor-01 ljakklev-pris 31) +(def-tex klever-armor-02 ljakklev-pris 32) +(def-tex klever-blackstrap ljakklev-pris 33) +(def-tex klever-bolt ljakklev-pris 34) +(def-tex klever-brownstrap ljakklev-pris 35) +(def-tex klever-chest ljakklev-pris 36) +(def-tex klever-clips ljakklev-pris 37) +(def-tex klever-earcup ljakklev-pris 38) +(def-tex klever-eye ljakklev-pris 39) +(def-tex klever-eyelid ljakklev-pris 40) +(def-tex klever-face-01 ljakklev-pris 41) +(def-tex klever-face-01scars ljakklev-pris 42) +(def-tex klever-fingerbottom ljakklev-pris 43) +(def-tex klever-fingertop ljakklev-pris 44) +(def-tex klever-gunmetal-01 ljakklev-pris 45) +(def-tex klever-gunmetal-02 ljakklev-pris 46) +(def-tex klever-gunmetal-03 ljakklev-pris 47) +(def-tex klever-gunmetal-04 ljakklev-pris 48) +(def-tex klever-gunmetal-05 ljakklev-pris 49) +(def-tex klever-hair ljakklev-pris 50) +(def-tex klever-hand ljakklev-pris 51) +(def-tex klever-handwrap ljakklev-pris 52) +(def-tex klever-horn ljakklev-pris 53) +(def-tex klever-mustache ljakklev-pris 54) +(def-tex klever-shoe ljakklev-pris 55) +(def-tex klever-shoebottom ljakklev-pris 56) +(def-tex klever-skirtdark ljakklev-pris 57) +(def-tex klever-skirtlight ljakklev-pris 58) +(def-tex klever-thighs ljakklev-pris 59) +(def-tex klever-undershirt ljakklev-pris 60) +(def-tex klever-widebrownstrap ljakklev-pris 61) +(def-tex bam-eyelight ljakcklv-pris 0) +(def-tex bam-hairhilite ljakcklv-pris 1) +(def-tex environment-oldmetal ljakcklv-pris 2) +(def-tex jakc-armor ljakcklv-pris 3) +(def-tex jakc-chestplate-straps ljakcklv-pris 4) +(def-tex jakc-gogglemetal ljakcklv-pris 5) +(def-tex jakc-lens ljakcklv-pris 6) +(def-tex jakc-scarf ljakcklv-pris 7) +(def-tex jakc-waistband2 ljakcklv-pris 8) +(def-tex jakc-wraps ljakcklv-pris 9) +(def-tex jakc-wristband-a2 ljakcklv-pris 10) +(def-tex jakchires-arm ljakcklv-pris 11) +(def-tex jakchires-blackstrap ljakcklv-pris 12) +(def-tex jakchires-brownstrap ljakcklv-pris 13) +(def-tex jakchires-brwnleather ljakcklv-pris 14) +(def-tex jakchires-chestplate ljakcklv-pris 15) +(def-tex jakchires-clips ljakcklv-pris 16) +(def-tex jakchires-eye ljakcklv-pris 17) +(def-tex jakchires-eyebrow ljakcklv-pris 18) +(def-tex jakchires-eyelid ljakcklv-pris 19) +(def-tex jakchires-facelft ljakcklv-pris 20) +(def-tex jakchires-facert ljakcklv-pris 21) +(def-tex jakchires-glovetop ljakcklv-pris 22) +(def-tex jakchires-hair ljakcklv-pris 23) +(def-tex jakchires-horn ljakcklv-pris 24) +(def-tex jakchires-jacket ljakcklv-pris 25) +(def-tex jakchires-leatherpouch ljakcklv-pris 26) +(def-tex jakchires-lightbrownspat ljakcklv-pris 27) +(def-tex jakchires-pants ljakcklv-pris 28) +(def-tex jakchires-precarmor-01 ljakcklv-pris 29) +(def-tex jakchires-shoebottom ljakcklv-pris 30) +(def-tex jakchires-shoemetal ljakcklv-pris 31) +(def-tex jakchires-shoeteop ljakcklv-pris 32) +(def-tex jakchires-teeth ljakcklv-pris 33) +(def-tex klever-arm ljakcklv-pris 34) +(def-tex klever-armor-01 ljakcklv-pris 35) +(def-tex klever-armor-02 ljakcklv-pris 36) +(def-tex klever-blackstrap ljakcklv-pris 37) +(def-tex klever-bolt ljakcklv-pris 38) +(def-tex klever-brownstrap ljakcklv-pris 39) +(def-tex klever-chest ljakcklv-pris 40) +(def-tex klever-clips ljakcklv-pris 41) +(def-tex klever-earcup ljakcklv-pris 42) +(def-tex klever-eye ljakcklv-pris 43) +(def-tex klever-eyelid ljakcklv-pris 44) +(def-tex klever-face-01 ljakcklv-pris 45) +(def-tex klever-face-01scars ljakcklv-pris 46) +(def-tex klever-fingerbottom ljakcklv-pris 47) +(def-tex klever-fingertop ljakcklv-pris 48) +(def-tex klever-gunmetal-01 ljakcklv-pris 49) +(def-tex klever-gunmetal-02 ljakcklv-pris 50) +(def-tex klever-gunmetal-03 ljakcklv-pris 51) +(def-tex klever-gunmetal-04 ljakcklv-pris 52) +(def-tex klever-gunmetal-05 ljakcklv-pris 53) +(def-tex klever-hair ljakcklv-pris 54) +(def-tex klever-hand ljakcklv-pris 55) +(def-tex klever-handwrap ljakcklv-pris 56) +(def-tex klever-horn ljakcklv-pris 57) +(def-tex klever-mustache ljakcklv-pris 58) +(def-tex klever-shoe ljakcklv-pris 59) +(def-tex klever-shoebottom ljakcklv-pris 60) +(def-tex klever-skirtdark ljakcklv-pris 61) +(def-tex klever-skirtlight ljakcklv-pris 62) +(def-tex klever-thighs ljakcklv-pris 63) +(def-tex klever-undershirt ljakcklv-pris 64) +(def-tex klever-widebrownstrap ljakcklv-pris 65) +(def-tex jakc-skirt ljakcklv-pris 66) +(def-tex jakc-scarfhanging ljakcklv-pris 67) +(def-tex wstlander-01-eye lwlandm-pris 0) +(def-tex wstlander-01-gunmetal-01 lwlandm-pris 1) +(def-tex wstlander-01-gunmetal-02 lwlandm-pris 2) +(def-tex wstlander-01-gunmetal-03 lwlandm-pris 3) +(def-tex wstlander-01-gunmetal-04 lwlandm-pris 4) +(def-tex wstlander-01-head lwlandm-pris 5) +(def-tex wstlander-01-leatherstrap lwlandm-pris 6) +(def-tex wstlander-01-mustache lwlandm-pris 7) +(def-tex wstlander-01-pants lwlandm-pris 8) +(def-tex wstlander-01-shoebottom lwlandm-pris 9) +(def-tex wstlander-01-shoetop lwlandm-pris 10) +(def-tex wstlander-01-shoulderarmor lwlandm-pris 11) +(def-tex wstlander-01-skirt lwlandm-pris 12) +(def-tex wstlander-01-wrap lwlandm-pris 13) +(def-tex wstlander-02-arm lwlandm-pris 14) +(def-tex wstlander-02-armor lwlandm-pris 15) +(def-tex wstlander-02-belt lwlandm-pris 16) +(def-tex wstlander-02-bootheel lwlandm-pris 17) +(def-tex wstlander-02-eye lwlandm-pris 18) +(def-tex wstlander-02-glove lwlandm-pris 19) +(def-tex wstlander-02-head lwlandm-pris 20) +(def-tex wstlander-02-ponytail lwlandm-pris 21) +(def-tex wstlander-02-scarf lwlandm-pris 22) +(def-tex wstlander-02-shirt lwlandm-pris 23) +(def-tex wstlander-02-skirt lwlandm-pris 24) +(def-tex wstlander-03-eye lwlandm-pris 25) +(def-tex wstlander-03-flesh lwlandm-pris 26) +(def-tex wstlander-04-dark-blue lwlandm-pris 27) +(def-tex wstlander-04-gun lwlandm-pris 28) +(def-tex wstlander-04-headband lwlandm-pris 29) +(def-tex wstlander-04-shirt lwlandm-pris 30) +(def-tex wstlander-04-shirt-strap lwlandm-pris 31) +(def-tex wstlander-04-skirt lwlandm-pris 32) +(def-tex wstlander-01-glovetop lwlandm-water 0) +(def-tex hud-target-reticle lformach-minimap 3) +(def-tex dm-turret-hud-arrow-01 lformach-minimap 4) +(def-tex dm-turret-hud-gun-arrow-01 lformach-minimap 5) +(def-tex dm-turret-hud-health-02 lformach-minimap 6) +(def-tex dm-turret-hud-health-03 lformach-minimap 7) +(def-tex dm-turret-hud-heat-ring-01 lformach-minimap 8) +(def-tex dm-turret-hud-heat-ring-03 lformach-minimap 9) +(def-tex dm-turret-hud-heat-ring-04 lformach-minimap 10) +(def-tex dm-turret-hud-health-01 lformach-minimap 11) +(def-tex dm-turret-hud-health-04 lformach-minimap 12) +(def-tex dm-turret-hud-heat-ring-02 lformach-minimap 13) +(def-tex bam-eyelight gungame-vis-pris2 0) +(def-tex bam-hairhilite gungame-vis-pris2 1) +(def-tex tess-belly gungame-vis-pris2 2) +(def-tex tess-belt gungame-vis-pris2 3) +(def-tex tess-belt2 gungame-vis-pris2 4) +(def-tex tess-buckle gungame-vis-pris2 5) +(def-tex tess-chest gungame-vis-pris2 6) +(def-tex tess-emblem gungame-vis-pris2 7) +(def-tex tess-eye gungame-vis-pris2 8) +(def-tex tess-eyelid gungame-vis-pris2 9) +(def-tex tess-face gungame-vis-pris2 10) +(def-tex tess-finger gungame-vis-pris2 11) +(def-tex tess-glove gungame-vis-pris2 12) +(def-tex tess-hair gungame-vis-pris2 13) +(def-tex tess-hairband gungame-vis-pris2 14) +(def-tex tess-jeans gungame-vis-pris2 15) +(def-tex tess-jeansback gungame-vis-pris2 16) +(def-tex tess-jeanscuff gungame-vis-pris2 17) +(def-tex tess-lowerboot gungame-vis-pris2 18) +(def-tex tess-scarf gungame-vis-pris2 19) +(def-tex tess-shirt-128 gungame-vis-pris2 20) +(def-tex tess-shirtstraps gungame-vis-pris2 21) +(def-tex tess-shoebottom gungame-vis-pris2 22) +(def-tex tess-shoetop gungame-vis-pris2 23) +(def-tex tess-sleeve gungame-vis-pris2 24) +(def-tex tess-teeth gungame-vis-pris2 25) +(def-tex tess-underwear gungame-vis-pris2 26) +(def-tex tess-upperboot gungame-vis-pris2 27) +(def-tex environment-oldmetal gungame-vis-pris2 28) +(def-tex environment-title gungame-vis-pris2 29) +(def-tex gun-backslit gungame-vis-pris2 30) +(def-tex gun-barrel-alt gungame-vis-pris2 31) +(def-tex gun-blue-glow gungame-vis-pris2 32) +(def-tex gun-blue-mag gungame-vis-pris2 33) +(def-tex gun-cover gungame-vis-pris2 34) +(def-tex gun-dark-mag gungame-vis-pris2 35) +(def-tex gun-eye gungame-vis-pris2 36) +(def-tex gun-laser gungame-vis-pris2 37) +(def-tex gun-leather gungame-vis-pris2 38) +(def-tex gun-magport gungame-vis-pris2 39) +(def-tex gun-main gungame-vis-pris2 40) +(def-tex gun-pump gungame-vis-pris2 41) +(def-tex gun-purple-glow gungame-vis-pris2 42) +(def-tex gun-red-glow gungame-vis-pris2 43) +(def-tex gun-red-mag gungame-vis-pris2 44) +(def-tex gun-teeth gungame-vis-pris2 45) +(def-tex gun-tip gungame-vis-pris2 46) +(def-tex gun-yellow-glow gungame-vis-pris2 47) +(def-tex gun-yellow-mag gungame-vis-pris2 48) +(def-tex gun-yellow-mag-end gungame-vis-pris2 49) +(def-tex gun-yellowgreen gungame-vis-pris2 50) +(def-tex jakc-armor gungame-vis-pris2 51) +(def-tex talkbox-light-02 gungame-vis-pris2 52) +(def-tex thrust-glob introcst-sprite 0) +(def-tex onin-game-circle waspgame-sprite 0) +(def-tex onin-game-circle-darkener waspgame-sprite 1) +(def-tex onin-game-scatter waspgame-sprite 2) +(def-tex onin-game-square waspgame-sprite 3) +(def-tex onin-game-square-darkener waspgame-sprite 4) +(def-tex onin-game-triangle waspgame-sprite 5) +(def-tex onin-game-triangle-darkener waspgame-sprite 6) +(def-tex onin-game-x waspgame-sprite 7) +(def-tex onin-game-x-darkener waspgame-sprite 8) +(def-tex des-pinetree-bark desertc-vis-shrub 0) +(def-tex des-rock-shrub-01 desertc-vis-shrub 1) +(def-tex des-shrub-pebbles desertc-vis-shrub 4) +(def-tex des-sand-grass-01 desertc-vis-shrub 7) +(def-tex des-pinetree-leaf-02 desertc-vis-shrub 8) +(def-tex des-pinetree-leaf-01 desertc-vis-shrub 9) +(def-tex bam-eyelight comba-pris 19) +(def-tex bam-hairhilite comba-pris 20) +(def-tex daxter-eyelid comba-pris 21) +(def-tex daxter-furhilite comba-pris 22) +(def-tex daxter-orange comba-pris 23) +(def-tex daxterarm comba-pris 24) +(def-tex daxterbodyshort-eix comba-pris 25) +(def-tex daxterbolt comba-pris 26) +(def-tex daxterear comba-pris 27) +(def-tex daxterfinger comba-pris 28) +(def-tex daxterfoot comba-pris 29) +(def-tex daxterfoot-bottom comba-pris 30) +(def-tex daxtergoggles comba-pris 31) +(def-tex daxterheadwidenew comba-pris 32) +(def-tex daxterhelmetplain comba-pris 33) +(def-tex daxterlense comba-pris 34) +(def-tex daxternose comba-pris 35) +(def-tex daxterteeth comba-pris 36) +(def-tex daxtertuft comba-pris 37) +(def-tex environment-oldmetal comba-pris 38) +(def-tex jakc-armor comba-pris 39) +(def-tex jakc-chestplate-straps comba-pris 40) +(def-tex jakc-gogglemetal comba-pris 41) +(def-tex jakc-lens comba-pris 42) +(def-tex jakc-scarf comba-pris 43) +(def-tex jakc-scarfhanging comba-pris 44) +(def-tex jakc-skirt comba-pris 45) +(def-tex jakc-waistband2 comba-pris 46) +(def-tex jakc-wraps comba-pris 47) +(def-tex jakc-wristband-a2 comba-pris 48) +(def-tex jakchires-arm comba-pris 49) +(def-tex jakchires-blackstrap comba-pris 50) +(def-tex jakchires-brownstrap comba-pris 51) +(def-tex jakchires-brwnleather comba-pris 52) +(def-tex jakchires-chestplate comba-pris 53) +(def-tex jakchires-clips comba-pris 54) +(def-tex jakchires-eye comba-pris 55) +(def-tex jakchires-eyebrow comba-pris 56) +(def-tex jakchires-eyelid comba-pris 57) +(def-tex jakchires-facelft comba-pris 58) +(def-tex jakchires-facert comba-pris 59) +(def-tex jakchires-glovetop comba-pris 60) +(def-tex jakchires-hair comba-pris 61) +(def-tex jakchires-horn comba-pris 62) +(def-tex jakchires-jacket comba-pris 63) +(def-tex jakchires-leatherpouch comba-pris 64) +(def-tex jakchires-lightbrownspat comba-pris 65) +(def-tex jakchires-pants comba-pris 66) +(def-tex jakchires-precarmor-01 comba-pris 67) +(def-tex jakchires-shoebottom comba-pris 68) +(def-tex jakchires-shoemetal comba-pris 69) +(def-tex jakchires-shoeteop comba-pris 70) +(def-tex jakchires-teeth comba-pris 71) +(def-tex pecker-body-01 comba-pris 72) +(def-tex pecker-eyelid comba-pris 73) +(def-tex pecker-face comba-pris 74) +(def-tex pecker-plume comba-pris 75) +(def-tex pecker-tail comba-pris 76) +(def-tex pecker-teeth comba-pris 77) +(def-tex pecker-wingbottom comba-pris 78) +(def-tex pecker-wingtop comba-pris 79) +(def-tex pecker-yellowfur comba-pris 80) +(def-tex rail-base-mid-01 comba-pris 86) +(def-tex rail-env-wall-01 comba-pris 90) +(def-tex rail-light-red comba-pris 96) +(def-tex rail-pipe-03 comba-pris 97) +(def-tex rail-cord-01 comba-pris 99) +(def-tex rail-edge-01 comba-pris 100) +(def-tex kid-medallion comba-pris 104) +(def-tex rail-pipe-01 comba-pris 105) +(def-tex rail-detail-01 comba-pris 106) +(def-tex rail-trim-01 comba-pris 107) +(def-tex des-shrub-pebbles deserta-vis-shrub 0) +(def-tex des-pinetree-bark deserta-vis-shrub 3) +(def-tex des-rock-shrub-01 deserta-vis-shrub 4) +(def-tex des-sand-grass-01 deserta-vis-shrub 7) +(def-tex des-pinetree-leaf-02 deserta-vis-shrub 8) +(def-tex des-pinetree-leaf-01 deserta-vis-shrub 9) +(def-tex missle-launcher-shaft-01 lctyhijk-tfrag 8) +(def-tex missle-launcher-gear-02 lctyhijk-tfrag 9) +(def-tex common-black lctyhijk-tfrag 10) +(def-tex missle-launcher-gear-01 lctyhijk-tfrag 11) +(def-tex missle-launcher-rim-01 lctyhijk-tfrag 12) +(def-tex missle-launcher-panel-02 lctyhijk-tfrag 13) +(def-tex missle-launcher-panel-03 lctyhijk-tfrag 14) +(def-tex missle-launcher-metal-01 lctyhijk-tfrag 15) +(def-tex missle-launcher-panel-01 lctyhijk-tfrag 16) +(def-tex missle-launcher-top-02 lctyhijk-tfrag 17) +(def-tex missle-launcher-top-01 lctyhijk-tfrag 18) +(def-tex missle-launcher-tube lctyhijk-tfrag 19) +(def-tex missle-launcher-tube-end-02 lctyhijk-tfrag 20) +(def-tex missle-launcher-tube-end-01 lctyhijk-tfrag 21) +(def-tex racegate wasleapr-sprite 1) +(def-tex rub-stad-brick stadium-vis-tfrag 0) +(def-tex stdm-lg-stone-trim-01 stadium-vis-tfrag 1) +(def-tex rub-statue-stone-01 stadium-vis-tfrag 2) +(def-tex rub-metal-01 stadium-vis-tfrag 3) +(def-tex stdm-light-fix-a stadium-vis-tfrag 4) +(def-tex stdm-metal-rim-01 stadium-vis-tfrag 5) +(def-tex rub-marble-floor-01-hitweak stadium-vis-tfrag 6) +(def-tex rub-copper-metal-02 stadium-vis-tfrag 7) +(def-tex stdm-wall-04 stadium-vis-tfrag 8) +(def-tex rub-cement-a stadium-vis-tfrag 9) +(def-tex stdm-cobble-floor-01 stadium-vis-tfrag 10) +(def-tex stdm-trim-02 stadium-vis-tfrag 11) +(def-tex stdm-stone-trim-01 stadium-vis-tfrag 12) +(def-tex stdm-stairs-01 stadium-vis-tfrag 13) +(def-tex stdm-base-01 stadium-vis-tfrag 14) +(def-tex rub-blastdoors stadium-vis-tfrag 15) +(def-tex rub-wall-gen-01 stadium-vis-tfrag 16) +(def-tex rub-beam-gen stadium-vis-tfrag 17) +(def-tex rub-city-wall-inside-damaged stadium-vis-tfrag 18) +(def-tex rub-cement-broken-end stadium-vis-tfrag 19) +(def-tex stdmb-broken-light stadium-vis-tfrag 20) +(def-tex stdm-wall-03 stadium-vis-tfrag 21) +(def-tex stdm-trim-03 stadium-vis-tfrag 22) +(def-tex rub-pal-metal stadium-vis-tfrag 23) +(def-tex stdm-metal-01 stadium-vis-tfrag 24) +(def-tex stdm-gar-girder-02 stadium-vis-tfrag 25) +(def-tex stdm-flowerbed-flowers-a stadium-vis-tfrag 26) +(def-tex stdm-flowerbed-small stadium-vis-tfrag 27) +(def-tex stdmb-lightpost-base stadium-vis-tfrag 28) +(def-tex stdm-rubble-01 stadium-vis-tfrag 29) +(def-tex stdmb-lightpost-base-02 stadium-vis-tfrag 30) +(def-tex rub-stad-brick-pieces stadium-vis-tfrag 31) +(def-tex rub-rubble-01 stadium-vis-tfrag 32) +(def-tex stdm-wallrock-dirt stadium-vis-tfrag 33) +(def-tex rub-wall-side-beam-02 stadium-vis-tfrag 34) +(def-tex rub-metal-pipeside-01 stadium-vis-tfrag 35) +(def-tex rub-wall-trim stadium-vis-tfrag 36) +(def-tex rub-panels-01 stadium-vis-tfrag 37) +(def-tex rub-wall-gen-04 stadium-vis-tfrag 38) +(def-tex rub-wall-gen-02 stadium-vis-tfrag 39) +(def-tex rub-ox-pipe-01 stadium-vis-tfrag 40) +(def-tex rub-wall-gen-03 stadium-vis-tfrag 41) +(def-tex rub-city-wall-frame stadium-vis-tfrag 42) +(def-tex stdm-glass-01 stadium-vis-tfrag 43) +(def-tex city-slum-burning-can stadium-vis-tfrag 44) +(def-tex rub-wall-gen-06 stadium-vis-tfrag 45) +(def-tex rub-cement-pillars stadium-vis-tfrag 46) +(def-tex rub-palace-tower-side stadium-vis-tfrag 47) +(def-tex rub-beam-gen-hole stadium-vis-tfrag 48) +(def-tex rub-palshaft-dirt-blue-01 stadium-vis-tfrag 49) +(def-tex rub-metal-flatpipe-01 stadium-vis-tfrag 50) +(def-tex rub-met-strp-close stadium-vis-tfrag 51) +(def-tex stdm-marble-floor-01 stadium-vis-tfrag 52) +(def-tex stdm-grass stadium-vis-tfrag 53) +(def-tex lt-eco-vent-blue-01 stadium-vis-tfrag 54) +(def-tex lt-eco-vent-side-01 stadium-vis-tfrag 55) +(def-tex rub-met-strp-close stadium-vis-shrub 15) +(def-tex rub-greyblue-plain-lowres stadium-vis-shrub 16) +(def-tex rub-beam-gen stadium-vis-shrub 17) +(def-tex rub-wall-small-grill stadium-vis-shrub 18) +(def-tex rub-scorch stadium-vis-shrub 19) +(def-tex rub-ground-01-small stadium-vis-shrub 21) +(def-tex rub-crater-shards-01 stadium-vis-shrub 22) +(def-tex des-shrub-pebbles deserte-vis-shrub 1) +(def-tex des-sand-grass-01 deserte-vis-shrub 4) +(def-tex des-rock-shrub-01 deserte-vis-shrub 5) +(def-tex bam-eyelight deshover-pris 0) +(def-tex bam-hairhilite deshover-pris 1) +(def-tex daxter-eyelid deshover-pris 2) +(def-tex daxter-furhilite deshover-pris 3) +(def-tex daxter-orange deshover-pris 4) +(def-tex daxterarm deshover-pris 5) +(def-tex daxterbodyshort-eix deshover-pris 6) +(def-tex daxterbolt deshover-pris 7) +(def-tex daxterear deshover-pris 8) +(def-tex daxterfinger deshover-pris 9) +(def-tex daxterfoot deshover-pris 10) +(def-tex daxterfoot-bottom deshover-pris 11) +(def-tex daxtergoggles deshover-pris 12) +(def-tex daxterheadwidenew deshover-pris 13) +(def-tex daxterhelmetplain deshover-pris 14) +(def-tex daxterlense deshover-pris 15) +(def-tex daxternose deshover-pris 16) +(def-tex daxterteeth deshover-pris 17) +(def-tex daxtertuft deshover-pris 18) +(def-tex environment-oldmetal deshover-pris 19) +(def-tex grunt-eye-01 deshover-pris 61) +(def-tex grunt-gem-01 deshover-pris 62) +(def-tex grunt-hose deshover-pris 63) +(def-tex grunt-metal-01 deshover-pris 64) +(def-tex grunt-skin-02 deshover-pris 65) +(def-tex grunt-skin-03 deshover-pris 66) +(def-tex jakc-armor deshover-pris 67) +(def-tex jakc-chestplate-straps deshover-pris 68) +(def-tex jakc-gogglemetal deshover-pris 69) +(def-tex jakc-lens deshover-pris 70) +(def-tex jakc-scarf deshover-pris 71) +(def-tex jakc-scarfhanging deshover-pris 72) +(def-tex jakc-skirt deshover-pris 73) +(def-tex jakc-waistband2 deshover-pris 74) +(def-tex jakc-wraps deshover-pris 75) +(def-tex jakc-wristband-a2 deshover-pris 76) +(def-tex jakchires-arm deshover-pris 77) +(def-tex jakchires-blackstrap deshover-pris 78) +(def-tex jakchires-brownstrap deshover-pris 79) +(def-tex jakchires-brwnleather deshover-pris 80) +(def-tex jakchires-chestplate deshover-pris 81) +(def-tex jakchires-clips deshover-pris 82) +(def-tex jakchires-eye deshover-pris 83) +(def-tex jakchires-eyebrow deshover-pris 84) +(def-tex jakchires-eyelid deshover-pris 85) +(def-tex jakchires-facelft deshover-pris 86) +(def-tex jakchires-facert deshover-pris 87) +(def-tex jakchires-glovetop deshover-pris 88) +(def-tex jakchires-hair deshover-pris 89) +(def-tex jakchires-horn deshover-pris 90) +(def-tex jakchires-jacket deshover-pris 91) +(def-tex jakchires-leatherpouch deshover-pris 92) +(def-tex jakchires-lightbrownspat deshover-pris 93) +(def-tex jakchires-pants deshover-pris 94) +(def-tex jakchires-precarmor-01 deshover-pris 95) +(def-tex jakchires-shoebottom deshover-pris 96) +(def-tex jakchires-shoemetal deshover-pris 97) +(def-tex jakchires-shoeteop deshover-pris 98) +(def-tex jakchires-teeth deshover-pris 99) +(def-tex dark-crystal-knob-01 deshover-pris 100) +(def-tex dark-crystal-knob-02 deshover-pris 101) +(def-tex dark-crystal-pickup-01 deshover-pris 102) +(def-tex dark-crystal-pickup-02 deshover-pris 103) +(def-tex dark-crystal-pickup-03 deshover-pris 104) +(def-tex vehicle-snake-tread-01 deshover-pris 105) +(def-tex vehicle-snake-tread-02 deshover-pris 106) +(def-tex vehicle-wheel-01 deshover-pris 107) +(def-tex wstlander-01-eye desresc-pris 47) +(def-tex wstlander-01-gunmetal-01 desresc-pris 48) +(def-tex wstlander-01-gunmetal-02 desresc-pris 49) +(def-tex wstlander-01-gunmetal-03 desresc-pris 50) +(def-tex wstlander-01-gunmetal-04 desresc-pris 51) +(def-tex wstlander-01-head desresc-pris 52) +(def-tex wstlander-01-leatherstrap desresc-pris 53) +(def-tex wstlander-01-mustache desresc-pris 54) +(def-tex wstlander-01-pants desresc-pris 55) +(def-tex wstlander-01-shoebottom desresc-pris 56) +(def-tex wstlander-01-shoetop desresc-pris 57) +(def-tex wstlander-01-shoulderarmor desresc-pris 58) +(def-tex wstlander-01-skirt desresc-pris 59) +(def-tex wstlander-01-wrap desresc-pris 60) +(def-tex wstlander-02-arm desresc-pris 61) +(def-tex wstlander-02-armor desresc-pris 62) +(def-tex wstlander-02-belt desresc-pris 63) +(def-tex wstlander-02-bootheel desresc-pris 64) +(def-tex wstlander-02-eye desresc-pris 65) +(def-tex wstlander-02-glove desresc-pris 66) +(def-tex wstlander-02-head desresc-pris 67) +(def-tex wstlander-02-ponytail desresc-pris 68) +(def-tex wstlander-02-scarf desresc-pris 69) +(def-tex wstlander-02-shirt desresc-pris 70) +(def-tex wstlander-02-skirt desresc-pris 71) +(def-tex wstlander-03-eye desresc-pris 72) +(def-tex wstlander-03-flesh desresc-pris 73) +(def-tex wstlander-04-dark-blue desresc-pris 74) +(def-tex wstlander-04-gun desresc-pris 75) +(def-tex wstlander-04-headband desresc-pris 76) +(def-tex wstlander-04-shirt desresc-pris 77) +(def-tex wstlander-04-shirt-strap desresc-pris 78) +(def-tex wstlander-04-skirt desresc-pris 79) +(def-tex dk-sat-cable-01 desresc-pris 84) +(def-tex dk-sat-cable-02 desresc-pris 85) +(def-tex dk-sat-cable-03 desresc-pris 86) +(def-tex dk-sat-claw-01 desresc-pris 87) +(def-tex dk-sat-panel-01 desresc-pris 88) +(def-tex dk-sat-rim-01 desresc-pris 89) +(def-tex dk-sat-rim-02 desresc-pris 90) +(def-tex dk-sat-rim-03 desresc-pris 91) +(def-tex dk-sat-rim-bright-01 desresc-pris 92) +(def-tex dk-sat-shell-01 desresc-pris 93) +(def-tex dk-sat-rim-lod-01 desresc-pris 114) +(def-tex dk-sat-shell-lod-01 desresc-pris 115) +(def-tex dark-crystal-knob-01 desresc-pris 137) +(def-tex dark-crystal-knob-02 desresc-pris 138) +(def-tex dark-crystal-pickup-01 desresc-pris 139) +(def-tex dark-crystal-pickup-02 desresc-pris 140) +(def-tex dark-crystal-pickup-03 desresc-pris 141) +(def-tex environment-darkprec desresc-pris 142) +(def-tex bam-eyelight oasiscst-pris 0) +(def-tex bam-hairhilite oasiscst-pris 1) +(def-tex daxter-eyelid oasiscst-pris 2) +(def-tex daxter-furhilite oasiscst-pris 3) +(def-tex daxter-orange oasiscst-pris 4) +(def-tex daxterarm oasiscst-pris 5) +(def-tex daxterbodyshort-eix oasiscst-pris 6) +(def-tex daxterbolt oasiscst-pris 7) +(def-tex daxterear oasiscst-pris 8) +(def-tex daxterfinger oasiscst-pris 9) +(def-tex daxterfoot oasiscst-pris 10) +(def-tex daxterfoot-bottom oasiscst-pris 11) +(def-tex daxtergoggles oasiscst-pris 12) +(def-tex daxterheadwidenew oasiscst-pris 13) +(def-tex daxterhelmetplain oasiscst-pris 14) +(def-tex daxterlense oasiscst-pris 15) +(def-tex daxternose oasiscst-pris 16) +(def-tex daxterteeth oasiscst-pris 17) +(def-tex daxtertuft oasiscst-pris 18) +(def-tex environment-oldmetal oasiscst-pris 19) +(def-tex jakc-armor oasiscst-pris 20) +(def-tex jakc-chestplate-straps oasiscst-pris 21) +(def-tex jakc-gogglemetal oasiscst-pris 22) +(def-tex jakc-lens oasiscst-pris 23) +(def-tex jakc-scarf oasiscst-pris 24) +(def-tex jakc-waistband2 oasiscst-pris 25) +(def-tex jakc-wraps oasiscst-pris 26) +(def-tex jakc-wristband-a2 oasiscst-pris 27) +(def-tex jakchires-arm oasiscst-pris 28) +(def-tex jakchires-blackstrap oasiscst-pris 29) +(def-tex jakchires-brownstrap oasiscst-pris 30) +(def-tex jakchires-brwnleather oasiscst-pris 31) +(def-tex jakchires-chestplate oasiscst-pris 32) +(def-tex jakchires-clips oasiscst-pris 33) +(def-tex jakchires-eye oasiscst-pris 34) +(def-tex jakchires-eyebrow oasiscst-pris 35) +(def-tex jakchires-eyelid oasiscst-pris 36) +(def-tex jakchires-facelft oasiscst-pris 37) +(def-tex jakchires-facert oasiscst-pris 38) +(def-tex jakchires-glovetop oasiscst-pris 39) +(def-tex jakchires-hair oasiscst-pris 40) +(def-tex jakchires-horn oasiscst-pris 41) +(def-tex jakchires-jacket oasiscst-pris 42) +(def-tex jakchires-leatherpouch oasiscst-pris 43) +(def-tex jakchires-lightbrownspat oasiscst-pris 44) +(def-tex jakchires-pants oasiscst-pris 45) +(def-tex jakchires-precarmor-01 oasiscst-pris 46) +(def-tex jakchires-shoebottom oasiscst-pris 47) +(def-tex jakchires-shoemetal oasiscst-pris 48) +(def-tex jakchires-shoeteop oasiscst-pris 49) +(def-tex jakchires-teeth oasiscst-pris 50) +(def-tex jakc-skirt oasiscst-pris 51) +(def-tex jakc-scarfhanging oasiscst-pris 52) +(def-tex kid-medallion oasiscst-pris 53) +(def-tex intcept-pipe01 oasiscst-pris 54) +(def-tex intcept-tread01 oasiscst-pris 55) +(def-tex vehicle-wheel-01 oasiscst-pris 56) +(def-tex ashelin-beltbuckle oasiscst-pris2 0) +(def-tex ashelin-bolts oasiscst-pris2 1) +(def-tex ashelin-boottop oasiscst-pris2 2) +(def-tex ashelin-brownstrap oasiscst-pris2 3) +(def-tex ashelin-cglogo oasiscst-pris2 4) +(def-tex ashelin-cgrank oasiscst-pris2 5) +(def-tex ashelin-chest oasiscst-pris2 6) +(def-tex ashelin-eye oasiscst-pris2 7) +(def-tex ashelin-eyebrow oasiscst-pris2 8) +(def-tex ashelin-eyelid oasiscst-pris2 9) +(def-tex ashelin-face oasiscst-pris2 10) +(def-tex ashelin-glove oasiscst-pris2 11) +(def-tex ashelin-gunbarrel-01 oasiscst-pris2 12) +(def-tex ashelin-gunbarrel-02 oasiscst-pris2 13) +(def-tex ashelin-gunbarrel-03 oasiscst-pris2 14) +(def-tex ashelin-gunholster oasiscst-pris2 15) +(def-tex ashelin-hair oasiscst-pris2 16) +(def-tex ashelin-handle-01 oasiscst-pris2 17) +(def-tex ashelin-jacketbody oasiscst-pris2 18) +(def-tex ashelin-jacketsleeve oasiscst-pris2 19) +(def-tex ashelin-jacketstraps oasiscst-pris2 20) +(def-tex ashelin-pantstop oasiscst-pris2 21) +(def-tex ashelin-redtop oasiscst-pris2 22) +(def-tex ashelin-shells oasiscst-pris2 23) +(def-tex ashelin-shield oasiscst-pris2 24) +(def-tex ashelin-shoebottom oasiscst-pris2 25) +(def-tex ashelin-shoemetal oasiscst-pris2 26) +(def-tex ashelin-teeth oasiscst-pris2 27) +(def-tex ashelin-whitestrap oasiscst-pris2 28) +(def-tex bam-eyelight oasiscst-pris2 29) +(def-tex bam-hairhilite oasiscst-pris2 30) +(def-tex environment-oldmetal oasiscst-pris2 31) +(def-tex bam-hairhilite desoasis-pris 0) +(def-tex environment-oldmetal desoasis-pris 1) +(def-tex ashelin-lo-beltbuckle desoasis-pris 2) +(def-tex ashelin-lo-bolts desoasis-pris 3) +(def-tex ashelin-lo-boottop desoasis-pris 4) +(def-tex ashelin-lo-brownstrap desoasis-pris 5) +(def-tex ashelin-lo-cglogo desoasis-pris 6) +(def-tex ashelin-lo-cgrank desoasis-pris 7) +(def-tex ashelin-lo-chest desoasis-pris 8) +(def-tex ashelin-lo-eye desoasis-pris 9) +(def-tex ashelin-lo-eyebrow desoasis-pris 10) +(def-tex ashelin-lo-face desoasis-pris 11) +(def-tex ashelin-lo-glove desoasis-pris 12) +(def-tex ashelin-lo-gunbarrel-01 desoasis-pris 13) +(def-tex ashelin-lo-gunbarrel-02 desoasis-pris 14) +(def-tex ashelin-lo-gunbarrel-03 desoasis-pris 15) +(def-tex ashelin-lo-gunholster desoasis-pris 16) +(def-tex ashelin-lo-hair desoasis-pris 17) +(def-tex ashelin-lo-handle-01 desoasis-pris 18) +(def-tex ashelin-lo-jacketbody desoasis-pris 19) +(def-tex ashelin-lo-jacketsleeve desoasis-pris 20) +(def-tex ashelin-lo-jacketstraps desoasis-pris 21) +(def-tex ashelin-lo-pantstop desoasis-pris 22) +(def-tex ashelin-lo-redtop desoasis-pris 23) +(def-tex ashelin-lo-shells desoasis-pris 24) +(def-tex ashelin-lo-shield desoasis-pris 25) +(def-tex ashelin-lo-shoebottom desoasis-pris 26) +(def-tex ashelin-lo-shoemetal desoasis-pris 27) +(def-tex ashelin-lo-whitestrap desoasis-pris 28) +(def-tex marauder-belt desoasis-pris 78) +(def-tex marauder-blade desoasis-pris 79) +(def-tex marauder-blade-joint desoasis-pris 80) +(def-tex marauder-gun-blade desoasis-pris 81) +(def-tex marauder-gun-metal desoasis-pris 82) +(def-tex marauder-gun-part desoasis-pris 83) +(def-tex marauder-gun-tip desoasis-pris 84) +(def-tex marauder-hand-blue desoasis-pris 85) +(def-tex marauder-leather-brnstrap desoasis-pris 86) +(def-tex marauder-leather-brown desoasis-pris 87) +(def-tex marauder-leather-buckle desoasis-pris 88) +(def-tex marauder-leather-handle desoasis-pris 89) +(def-tex marauder-leather-part desoasis-pris 90) +(def-tex marauder-leather-strap desoasis-pris 91) +(def-tex marauder-metal-mask desoasis-pris 92) +(def-tex marauder-metal-plate desoasis-pris 93) +(def-tex marauder-shoe-bottom desoasis-pris 94) +(def-tex marauder-skin desoasis-pris 95) +(def-tex marauder-skin-nipple desoasis-pris 96) +(def-tex marauder-skirt-01 desoasis-pris 97) +(def-tex marauder-skirt-02 desoasis-pris 98) +(def-tex marauder-spike desoasis-pris 99) +(def-tex marauder-sword-edge desoasis-pris 100) +(def-tex marauder-sword-metal desoasis-pris 101) +(def-tex intcept-base-green01 desoasis-pris 102) +(def-tex intcept-base-patern01 desoasis-pris 103) +(def-tex intcept-base-patern02 desoasis-pris 104) +(def-tex intcept-gun01 desoasis-pris 105) +(def-tex intcept-pipe01 desoasis-pris 106) +(def-tex intcept-teeth01 desoasis-pris 107) +(def-tex intcept-tread01 desoasis-pris 108) +(def-tex vehicle-body-panel-01 desoasis-pris 109) +(def-tex vehicle-brace-pipe-01 desoasis-pris 110) +(def-tex vehicle-cap-pin-01 desoasis-pris 111) +(def-tex vehicle-chrome-pipe-01 desoasis-pris 112) +(def-tex vehicle-gas-tank-01 desoasis-pris 113) +(def-tex vehicle-gun-box-01 desoasis-pris 114) +(def-tex vehicle-metal-plate-01 desoasis-pris 115) +(def-tex vehicle-toad-exhaust-01 desoasis-pris 116) +(def-tex vehicle-tread-blur-02 desoasis-pris 117) +(def-tex vehicle-wheel-01 desoasis-pris 118) +(def-tex vehicle-wheel-blur-01 desoasis-pris 119) +(def-tex backThing01 desoasis-pris 120) +(def-tex dash01 desoasis-pris 121) +(def-tex gauge01 desoasis-pris 122) +(def-tex grillRim01 desoasis-pris 123) +(def-tex gunBoxBack01 desoasis-pris 124) +(def-tex gunBoxFront01 desoasis-pris 125) +(def-tex gunbox01 desoasis-pris 126) +(def-tex gunbox02 desoasis-pris 127) +(def-tex hood01 desoasis-pris 128) +(def-tex jetTop01 desoasis-pris 129) +(def-tex jets01 desoasis-pris 130) +(def-tex kcfrontend01 desoasis-pris 131) +(def-tex light01 desoasis-pris 132) +(def-tex lightCase01 desoasis-pris 133) +(def-tex post01 desoasis-pris 134) +(def-tex rail01 desoasis-pris 135) +(def-tex seat01 desoasis-pris 136) +(def-tex stripe03 desoasis-pris 137) +(def-tex turret01 desoasis-pris 138) +(def-tex wing01 desoasis-pris 139) +(def-tex wing02 desoasis-pris 140) +(def-tex wing02grey01 desoasis-pris 141) +(def-tex intcept-b-base-green01 desoasis-pris 142) +(def-tex intcept-b-base-patern01 desoasis-pris 143) +(def-tex intcept-b-base-patern02 desoasis-pris 144) +(def-tex intcept-b-gun01 desoasis-pris 145) +(def-tex intcept-b-pipe01 desoasis-pris 146) +(def-tex intcept-b-teeth01 desoasis-pris 147) +(def-tex ashelin-beltbuckle desoasis-pris2 0) +(def-tex ashelin-bolts desoasis-pris2 1) +(def-tex ashelin-boottop desoasis-pris2 2) +(def-tex ashelin-brownstrap desoasis-pris2 3) +(def-tex ashelin-cglogo desoasis-pris2 4) +(def-tex ashelin-cgrank desoasis-pris2 5) +(def-tex ashelin-chest desoasis-pris2 6) +(def-tex ashelin-eye desoasis-pris2 7) +(def-tex ashelin-eyebrow desoasis-pris2 8) +(def-tex ashelin-eyelid desoasis-pris2 9) +(def-tex ashelin-face desoasis-pris2 10) +(def-tex ashelin-glove desoasis-pris2 11) +(def-tex ashelin-gunbarrel-01 desoasis-pris2 12) +(def-tex ashelin-gunbarrel-02 desoasis-pris2 13) +(def-tex ashelin-gunbarrel-03 desoasis-pris2 14) +(def-tex ashelin-gunholster desoasis-pris2 15) +(def-tex ashelin-hair desoasis-pris2 16) +(def-tex ashelin-handle-01 desoasis-pris2 17) +(def-tex ashelin-jacketbody desoasis-pris2 18) +(def-tex ashelin-jacketsleeve desoasis-pris2 19) +(def-tex ashelin-jacketstraps desoasis-pris2 20) +(def-tex ashelin-pantstop desoasis-pris2 21) +(def-tex ashelin-redtop desoasis-pris2 22) +(def-tex ashelin-shells desoasis-pris2 23) +(def-tex ashelin-shield desoasis-pris2 24) +(def-tex ashelin-shoebottom desoasis-pris2 25) +(def-tex ashelin-shoemetal desoasis-pris2 26) +(def-tex ashelin-teeth desoasis-pris2 27) +(def-tex ashelin-whitestrap desoasis-pris2 28) +(def-tex bam-eyelight desoasis-pris2 29) +(def-tex bam-hairhilite desoasis-pris2 30) +(def-tex environment-oldmetal desoasis-pris2 31) +(def-tex hud-caveboss-01 mined-minimap 0) +(def-tex hud-caveboss-health-01 mined-minimap 1) +(def-tex hud-small-frame-01 mined-minimap 2) +(def-tex hud-small-frame-02 mined-minimap 3) +(def-tex common-black mined-tfrag 8) +(def-tex minc-blue-paint-rust04 mined-tfrag 10) +(def-tex minc-door-metal-01 mined-tfrag 15) +(def-tex minc-door-metal-04 mined-tfrag 20) +(def-tex minc-door-metal-06 mined-tfrag 21) +(def-tex minc-safe-plate-01 mined-tfrag 22) +(def-tex minc-metal-patch-01 mined-tfrag 23) +(def-tex minc-door-metal-03 mined-tfrag 24) +(def-tex minc-door-metal-02 mined-tfrag 25) +(def-tex minc-door-metal-05 mined-tfrag 26) +(def-tex minc-blue-paint-rust05 mined-tfrag 28) +(def-tex minc-rust-01 mined-tfrag 29) +(def-tex cav-stone-01 mined-tfrag 34) +(def-tex minc-stone01 mined-tfrag 37) +(def-tex minc-light mined-tfrag 38) +(def-tex minc-brok-edge01 mined-tfrag 39) +(def-tex minc-brok-edge mined-tfrag 40) +(def-tex mined_rostone-01 mined-tfrag 41) +(def-tex minc-safe-plate-02 mined-tfrag 42) +(def-tex minc-blue-paint-rust01 mined-tfrag 43) +(def-tex minc-train-pipe-gen-01 mined-tfrag 44) +(def-tex minc-ox-pipe-01 mined-tfrag 46) +(def-tex mined_red_cgtd mined-tfrag 47) +(def-tex mined-pillar-molten mined-tfrag 48) +(def-tex mined-pillar-side-cold mined-tfrag 49) +(def-tex mined-pillar-side-cooling mined-tfrag 50) +(def-tex mined-pillar-side-hot mined-tfrag 51) +(def-tex mined-pillar-top-cold mined-tfrag 52) +(def-tex mined-pillar-top-cooling mined-tfrag 53) +(def-tex mined-pillar-top-hot mined-tfrag 54) +(def-tex mined-pillar-top2side-cold mined-tfrag 55) +(def-tex mined-pillar-top2side-cooling mined-tfrag 56) +(def-tex mined-pillar-top2side-hot mined-tfrag 57) +(def-tex mined-pillar-env mined-tfrag 58) +(def-tex mined-pillar-top2side-dest mined-tfrag 59) +(def-tex mined-pillar-side-dest mined-tfrag 60) +(def-tex mined-pillar-top-dest mined-tfrag 61) +(def-tex mined-pillar-molten-top mined-tfrag 62) +(def-tex mined_redbrake mined-tfrag 63) +(def-tex sewer-small-light-01 mined-tfrag 65) +(def-tex sewer-pipe-rim-08 mined-tfrag 66) +(def-tex cav-metdoor-02 mined-tfrag 77) +(def-tex minc-rust-bars-01 mined-tfrag 78) +(def-tex minc-green-paint-02 mined-tfrag 79) +(def-tex sewer-red-light-01 mined-tfrag 80) +(def-tex prebot-envmap mined-pris 0) +(def-tex prebot-eye mined-pris 1) +(def-tex prebot-eye-reflection mined-pris 2) +(def-tex prebot-innermetal mined-pris 3) +(def-tex prebot-orange mined-pris 4) +(def-tex prebot-tentacles mined-pris 5) +(def-tex bam-eyelight mined-pris 6) +(def-tex bam-hairhilite mined-pris 7) +(def-tex daxter-eyelid mined-pris 8) +(def-tex daxter-furhilite mined-pris 9) +(def-tex daxter-orange mined-pris 10) +(def-tex daxterarm mined-pris 11) +(def-tex daxterbodyshort-eix mined-pris 12) +(def-tex daxterbolt mined-pris 13) +(def-tex daxterear mined-pris 14) +(def-tex daxterfinger mined-pris 15) +(def-tex daxterfoot mined-pris 16) +(def-tex daxterfoot-bottom mined-pris 17) +(def-tex daxtergoggles mined-pris 18) +(def-tex daxterheadwidenew mined-pris 19) +(def-tex daxterhelmetplain mined-pris 20) +(def-tex daxterlense mined-pris 21) +(def-tex daxternose mined-pris 22) +(def-tex daxterteeth mined-pris 23) +(def-tex daxtertuft mined-pris 24) +(def-tex mine-blue-metal-01 mined-pris 25) +(def-tex mine-can-metal-01 mined-pris 26) +(def-tex mine-caution-metal-01 mined-pris 27) +(def-tex mine-decal-metal-01 mined-pris 28) +(def-tex mine-gray-metal-01 mined-pris 29) +(def-tex mine-metal-wheel-01 mined-pris 30) +(def-tex mine-pipe-metal-01 mined-pris 31) +(def-tex mine-red-big-metal-01 mined-pris 32) +(def-tex mine-red-metal-01 mined-pris 33) +(def-tex mine-red-paint-rust05 mined-pris 34) +(def-tex mine-red-stripe-metal-01 mined-pris 35) +(def-tex mine-red-white-metal-01 mined-pris 36) +(def-tex mine-rust-01 mined-pris 37) +(def-tex mine-slate-metal-01 mined-pris 38) +(def-tex mine-under-metal-01 mined-pris 39) +(def-tex mine-white-stripe-metal-01 mined-pris 40) +(def-tex environment-oldmetal mined-pris 41) +(def-tex jakc-armor mined-pris 42) +(def-tex jakc-chestplate-straps mined-pris 43) +(def-tex jakc-gogglemetal mined-pris 44) +(def-tex jakc-lens mined-pris 45) +(def-tex jakc-scarf mined-pris 46) +(def-tex jakc-waistband2 mined-pris 47) +(def-tex jakc-wraps mined-pris 48) +(def-tex jakc-wristband-a2 mined-pris 49) +(def-tex jakchires-arm mined-pris 50) +(def-tex jakchires-blackstrap mined-pris 51) +(def-tex jakchires-brownstrap mined-pris 52) +(def-tex jakchires-brwnleather mined-pris 53) +(def-tex jakchires-chestplate mined-pris 54) +(def-tex jakchires-clips mined-pris 55) +(def-tex jakchires-eye mined-pris 56) +(def-tex jakchires-eyebrow mined-pris 57) +(def-tex jakchires-eyelid mined-pris 58) +(def-tex jakchires-facelft mined-pris 59) +(def-tex jakchires-facert mined-pris 60) +(def-tex jakchires-glovetop mined-pris 61) +(def-tex jakchires-hair mined-pris 62) +(def-tex jakchires-horn mined-pris 63) +(def-tex jakchires-jacket mined-pris 64) +(def-tex jakchires-leatherpouch mined-pris 65) +(def-tex jakchires-lightbrownspat mined-pris 66) +(def-tex jakchires-pants mined-pris 67) +(def-tex jakchires-precarmor-01 mined-pris 68) +(def-tex jakchires-shoebottom mined-pris 69) +(def-tex jakchires-shoemetal mined-pris 70) +(def-tex jakchires-shoeteop mined-pris 71) +(def-tex jakchires-teeth mined-pris 72) +(def-tex minc-blue-paint-rust01 mined-pris 73) +(def-tex minc-blue-paint-rust05 mined-pris 74) +(def-tex minc-rust-01 mined-pris 75) +(def-tex minc-blue-paint-01 mined-pris 79) +(def-tex minc-crate-02 mined-pris 80) +(def-tex minc-crm-paint-wall-01 mined-pris 81) +(def-tex minc-door-metal-05 mined-pris 82) +(def-tex minc-door-metal-06 mined-pris 83) +(def-tex minc-light-red mined-pris 86) +(def-tex minc-reflector mined-pris 87) +(def-tex minc-safe-plate-02 mined-pris 88) +(def-tex minc-screw-02 mined-pris 89) +(def-tex minc-yel-paint-rust01 mined-pris 90) +(def-tex minc-yel-safe-paint-rust01 mined-pris 91) +(def-tex mined_redbrake mined-pris 92) +(def-tex ecocreature-claws mined-pris 120) +(def-tex ecocreature-eye mined-pris 121) +(def-tex ecocreature-flesh mined-pris 122) +(def-tex ecocreature-insidemouth mined-pris 123) +(def-tex ecocreature-joint mined-pris 124) +(def-tex ecocreature-palm mined-pris 125) +(def-tex jakc-skirt mined-pris 140) +(def-tex jakc-scarfhanging mined-pris 141) +(def-tex minc-blue-paint-rust04 mined-pris 142) +(def-tex minc-door-metal-center mined-pris 145) +(def-tex minc-rust-bars-01 mined-pris 147) +(def-tex minc-door-metal-03 mined-pris 150) +(def-tex mine-blue-paint-rustdoor mined-pris 151) +(def-tex mined_rostone-01 mined-pris 152) +(def-tex cav-metdoor-01 mined-pris 153) +(def-tex cav-metdoor-02 mined-pris 154) +(def-tex airlock-door-bolt mined-pris 155) +(def-tex airlock-door-cog mined-pris 156) +(def-tex airlock-door-cog1 mined-pris 157) +(def-tex airlock-door-main mined-pris 158) +(def-tex airlock-door-metal2 mined-pris 159) +(def-tex airlockl-door-metalframe mined-pris 160) +(def-tex gun-blue-glow mined-pris 161) +(def-tex prebot-foot mined-pris 162) +(def-tex prebot-innermetal-edges mined-pris 163) +(def-tex roboboss-abs mined-pris 164) +(def-tex roboboss-antennae mined-pris 165) +(def-tex roboboss-darkmetdull-01 mined-pris 166) +(def-tex roboboss-darkmetdull-02 mined-pris 167) +(def-tex roboboss-nose mined-pris 168) +(def-tex roboboss-pipe-02 mined-pris 169) +(def-tex roboboss-pipe-shin mined-pris 170) +(def-tex roboboss-shinyorange-01 mined-pris 171) +(def-tex roboboss-shinyorange-02 mined-pris 172) +(def-tex roboboss-shinyorange-03 mined-pris 173) +(def-tex roboboss-shinyorange-04 mined-pris 174) +(def-tex roboboss-shinyorange-05 mined-pris 175) +(def-tex roboboss-shinyorange-06 mined-pris 176) +(def-tex roboboss-shinyorange-07 mined-pris 177) +(def-tex roboboss-shinyorange-08 mined-pris 178) +(def-tex gun-main mined-pris 179) +(def-tex prebot-shockwave-end mined-water 0) +(def-tex prebot-shockwave mined-water 1) +(def-tex prebot-redgradient mined-water 2) +(def-tex ecocreature-teeth mined-water 3) +(def-tex sword-trail-low mined-water 4) +(def-tex bam-eyelight mined-pris2 0) +(def-tex bam-hairhilite mined-pris2 1) +(def-tex environment-oldmetal mined-pris2 2) +(def-tex veger-bookleather mined-pris2 3) +(def-tex veger-booksides mined-pris2 4) +(def-tex veger-bookspine mined-pris2 5) +(def-tex veger-bootbolt mined-pris2 6) +(def-tex veger-bootfoot mined-pris2 7) +(def-tex veger-bootstrap mined-pris2 8) +(def-tex veger-coat mined-pris2 9) +(def-tex veger-coatbelt mined-pris2 10) +(def-tex veger-coatclips mined-pris2 11) +(def-tex veger-endpaper mined-pris2 12) +(def-tex veger-eyelid mined-pris2 13) +(def-tex veger-face mined-pris2 14) +(def-tex veger-fingerbottom mined-pris2 15) +(def-tex veger-fingertop mined-pris2 16) +(def-tex veger-gold mined-pris2 17) +(def-tex veger-hair mined-pris2 18) +(def-tex veger-hand mined-pris2 19) +(def-tex veger-iris mined-pris2 20) +(def-tex veger-legwraps mined-pris2 21) +(def-tex veger-pages mined-pris2 22) +(def-tex veger-pants mined-pris2 23) +(def-tex veger-parchment mined-pris2 24) +(def-tex veger-scarf mined-pris2 25) +(def-tex veger-shoebottom mined-pris2 26) +(def-tex veger-shoulderplate mined-pris2 27) +(def-tex veger-shoulderplatemetal mined-pris2 28) +(def-tex veger-sleeve mined-pris2 29) +(def-tex veger-sleevelower mined-pris2 30) +(def-tex veger-stickwrap mined-pris2 31) +(def-tex veger-teeth mined-pris2 32) +(def-tex veger-vest mined-pris2 33) +(def-tex veger-walkingstick-01 mined-pris2 34) +(def-tex veger-walkingstick-02 mined-pris2 35) +(def-tex veger-walkingstick-03 mined-pris2 36) +(def-tex veger-whitecloth mined-pris2 37) +(def-tex environment-oldmetal desliz-pris 0) +(def-tex metalflut-eye desliz-pris 1) +(def-tex metalflut-leatherstrap-b-01 desliz-pris 2) +(def-tex metalflut-leatherstrap-c desliz-pris 3) +(def-tex metalflut-nail desliz-pris 4) +(def-tex metalflut-plates-02 desliz-pris 5) +(def-tex metalflut-rings desliz-pris 6) +(def-tex metalflut-roll desliz-pris 7) +(def-tex metalflut-saddle desliz-pris 8) +(def-tex metalflut-saddlehang desliz-pris 9) +(def-tex metalflut-saddleseat desliz-pris 10) +(def-tex metalflut-skin-01 desliz-pris 11) +(def-tex metalflut-skin-02 desliz-pris 12) +(def-tex metalflut-wrap desliz-pris 13) +(def-tex bam-eyelight desliz-pris 14) +(def-tex bam-hairhilite desliz-pris 15) +(def-tex klever-arm desliz-pris 16) +(def-tex klever-armor-01 desliz-pris 17) +(def-tex klever-armor-02 desliz-pris 18) +(def-tex klever-blackstrap desliz-pris 19) +(def-tex klever-bolt desliz-pris 20) +(def-tex klever-brownstrap desliz-pris 21) +(def-tex klever-chest desliz-pris 22) +(def-tex klever-clips desliz-pris 23) +(def-tex klever-earcup desliz-pris 24) +(def-tex klever-eye desliz-pris 25) +(def-tex klever-eyelid desliz-pris 26) +(def-tex klever-face-01 desliz-pris 27) +(def-tex klever-face-01scars desliz-pris 28) +(def-tex klever-fingerbottom desliz-pris 29) +(def-tex klever-fingertop desliz-pris 30) +(def-tex klever-gunmetal-01 desliz-pris 31) +(def-tex klever-gunmetal-02 desliz-pris 32) +(def-tex klever-gunmetal-03 desliz-pris 33) +(def-tex klever-gunmetal-04 desliz-pris 34) +(def-tex klever-gunmetal-05 desliz-pris 35) +(def-tex klever-hair desliz-pris 36) +(def-tex klever-hand desliz-pris 37) +(def-tex klever-handwrap desliz-pris 38) +(def-tex klever-horn desliz-pris 39) +(def-tex klever-mustache desliz-pris 40) +(def-tex klever-shoe desliz-pris 41) +(def-tex klever-shoebottom desliz-pris 42) +(def-tex klever-skirtdark desliz-pris 43) +(def-tex klever-skirtlight desliz-pris 44) +(def-tex klever-thighs desliz-pris 45) +(def-tex klever-undershirt desliz-pris 46) +(def-tex klever-widebrownstrap desliz-pris 47) +(def-tex daxter-eyelid desliz-pris 48) +(def-tex daxter-furhilite desliz-pris 49) +(def-tex daxter-orange desliz-pris 50) +(def-tex daxterarm desliz-pris 51) +(def-tex daxterbodyshort-eix desliz-pris 52) +(def-tex daxterbolt desliz-pris 53) +(def-tex daxterear desliz-pris 54) +(def-tex daxterfinger desliz-pris 55) +(def-tex daxterfoot desliz-pris 56) +(def-tex daxterfoot-bottom desliz-pris 57) +(def-tex daxtergoggles desliz-pris 58) +(def-tex daxterheadwidenew desliz-pris 59) +(def-tex daxterhelmetplain desliz-pris 60) +(def-tex daxterlense desliz-pris 61) +(def-tex daxternose desliz-pris 62) +(def-tex daxterteeth desliz-pris 63) +(def-tex daxtertuft desliz-pris 64) +(def-tex jakc-armor desliz-pris 65) +(def-tex jakc-chestplate-straps desliz-pris 66) +(def-tex jakc-gogglemetal desliz-pris 67) +(def-tex jakc-lens desliz-pris 68) +(def-tex jakc-scarf desliz-pris 69) +(def-tex jakc-scarfhanging desliz-pris 70) +(def-tex jakc-skirt desliz-pris 71) +(def-tex jakc-waistband2 desliz-pris 72) +(def-tex jakc-wraps desliz-pris 73) +(def-tex jakc-wristband-a2 desliz-pris 74) +(def-tex jakchires-arm desliz-pris 75) +(def-tex jakchires-blackstrap desliz-pris 76) +(def-tex jakchires-brownstrap desliz-pris 77) +(def-tex jakchires-brwnleather desliz-pris 78) +(def-tex jakchires-chestplate desliz-pris 79) +(def-tex jakchires-clips desliz-pris 80) +(def-tex jakchires-eye desliz-pris 81) +(def-tex jakchires-eyebrow desliz-pris 82) +(def-tex jakchires-eyelid desliz-pris 83) +(def-tex jakchires-facelft desliz-pris 84) +(def-tex jakchires-facert desliz-pris 85) +(def-tex jakchires-glovetop desliz-pris 86) +(def-tex jakchires-hair desliz-pris 87) +(def-tex jakchires-horn desliz-pris 88) +(def-tex jakchires-jacket desliz-pris 89) +(def-tex jakchires-leatherpouch desliz-pris 90) +(def-tex jakchires-lightbrownspat desliz-pris 91) +(def-tex jakchires-pants desliz-pris 92) +(def-tex jakchires-precarmor-01 desliz-pris 93) +(def-tex jakchires-shoebottom desliz-pris 94) +(def-tex jakchires-shoemetal desliz-pris 95) +(def-tex jakchires-shoeteop desliz-pris 96) +(def-tex jakchires-teeth desliz-pris 97) +(def-tex vehicle-snake-tread-01 desliz-pris 98) +(def-tex vehicle-snake-tread-02 desliz-pris 99) +(def-tex vehicle-wheel-01 desliz-pris 100) +(def-tex wstlander-01-glovetop desresc-water 0) +(def-tex vola-lava-rock-01 volcanoa-vis-tfrag 0) +(def-tex vola-stalk-01 volcanoa-vis-tfrag 1) +(def-tex vola-leaf-02 volcanoa-vis-tfrag 2) +(def-tex vol-bark volcanoa-vis-tfrag 3) +(def-tex vola-lava-02 volcanoa-vis-tfrag 4) +(def-tex vola-cracked-rock-top volcanoa-vis-tfrag 5) +(def-tex vola-drip-rock volcanoa-vis-tfrag 6) +(def-tex vola-grass-blob volcanoa-vis-tfrag 7) +(def-tex vola-grass-fringe-05 volcanoa-vis-tfrag 10) +(def-tex vola-grass-floor-01 volcanoa-vis-tfrag 11) +(def-tex vola-rock-side volcanoa-vis-tfrag 12) +(def-tex vola-jump-plat volcanoa-vis-tfrag 15) +(def-tex vol-bark-burnt volcanoa-vis-tfrag 20) +(def-tex vola-vine volcanoa-vis-tfrag 21) +(def-tex vola-grass-fringe-full volcanoa-vis-tfrag 22) +(def-tex vol-bushbase-01 volcanoa-vis-tfrag 23) +(def-tex vola-rock-top volcanoa-vis-tfrag 24) +(def-tex vol-dpipe-02 volcanoa-vis-tfrag 25) +(def-tex vol-plate-01 volcanoa-vis-tfrag 28) +(def-tex vol-ladder-wood volcanoa-vis-tfrag 29) +(def-tex wascity-wood-plain volcanoa-vis-tfrag 30) +(def-tex wascity-metal-ladder-rung volcanoa-vis-tfrag 31) +(def-tex vol-metal-01 volcanoa-vis-tfrag 32) +(def-tex vola-rock-side-wall volcanoa-vis-tfrag 34) +(def-tex vola-grass-fringe-05-HI volcanoa-vis-tfrag 38) +(def-tex vola-slide-metal volcanoa-vis-tfrag 40) +(def-tex vola-cable volcanoa-vis-tfrag 41) +(def-tex vola-rising-step-base volcanoa-vis-tfrag 42) +(def-tex vol-plat-top volcanoa-vis-tfrag 43) +(def-tex vola-dp-tendon volcanoa-vis-tfrag 45) +(def-tex vol-dk-sat-environment-map volcanoa-vis-tfrag 46) +(def-tex vol-bark-burnt-hole volcanoa-vis-tfrag 47) +(def-tex min-env-mar-01 volcanoa-vis-tfrag 48) +(def-tex vola-dp-organic-pipe volcanoa-vis-tfrag 49) +(def-tex minc-light volcanoa-vis-tfrag 50) +(def-tex minc-platfrom-metal-01 volcanoa-vis-tfrag 51) +(def-tex vol-shrub-grass volcanoa-vis-shrub 0) +(def-tex vola-grass-floor-01 volcanoa-vis-shrub 3) +(def-tex vola-lava-rock-01 volcanoa-vis-shrub 4) +(def-tex fora-shrub-pebbles volcanoa-vis-shrub 5) +(def-tex vola-leaf-small-01 volcanoa-vis-shrub 6) +(def-tex for-shrub-moss volcanoa-vis-shrub 7) +(def-tex vol-shrub-plant volcanoa-vis-shrub 9) +(def-tex vol-tree-fruit-01 volcanoa-vis-shrub 10) +(def-tex vol-tree-fruit-02 volcanoa-vis-shrub 11) +(def-tex for-shrub-asian-grass volcanoa-vis-shrub 14) +(def-tex vol-metal-01 volcanoa-vis-shrub 15) +(def-tex vola-lava-02 volcanoa-vis-shrub 16) +(def-tex vola-rock-side-wall volcanoa-vis-shrub 18) +(def-tex vola-shrub-leaf volcanoa-vis-shrub 19) +(def-tex vol-balance-plat-end volcanoa-vis-shrub 20) +(def-tex vol-balance-plat volcanoa-vis-shrub 21) +(def-tex vol-balance-plat-pole volcanoa-vis-shrub 22) +(def-tex vola-lava-ball volcanoa-vis-shrub 23) +(def-tex vol-plat-top volcanoa-vis-shrub 24) +(def-tex vola-rising-step-base volcanoa-vis-shrub 25) +(def-tex minc-bolt volcanoa-vis-shrub 26) +(def-tex vola-shrub-rope-01 volcanoa-vis-shrub 27) +(def-tex vol-bark-burnt volcanoa-vis-shrub 28) +(def-tex vol-feeler volcanoa-vis-shrub 29) +(def-tex vola-small-rock-sides volcanoa-vis-shrub 30) +(def-tex vola-rock-top volcanoa-vis-shrub 31) +(def-tex vola-flutprint-01 volcanoa-vis-shrub 34) +(def-tex vola-grass-fringe-02 volcanoa-vis-alpha 1) +(def-tex vola-lava-fall volcanoa-vis-alpha 3) +(def-tex vola-lava-01-dest volcanoa-vis-alpha 4) +(def-tex vola-lava-fall-dest volcanoa-vis-alpha 5) +(def-tex flamer-wing volcanoa-vis-alpha 6) +(def-tex environment-oldmetal volcanoa-vis-pris 2) +(def-tex metalflut-eye volcanoa-vis-pris 3) +(def-tex metalflut-leatherstrap-b-01 volcanoa-vis-pris 4) +(def-tex metalflut-leatherstrap-c volcanoa-vis-pris 5) +(def-tex metalflut-nail volcanoa-vis-pris 6) +(def-tex metalflut-plates-02 volcanoa-vis-pris 7) +(def-tex metalflut-rings volcanoa-vis-pris 8) +(def-tex metalflut-roll volcanoa-vis-pris 9) +(def-tex metalflut-saddle volcanoa-vis-pris 10) +(def-tex metalflut-saddlehang volcanoa-vis-pris 11) +(def-tex metalflut-saddleseat volcanoa-vis-pris 12) +(def-tex metalflut-skin-01 volcanoa-vis-pris 13) +(def-tex metalflut-skin-02 volcanoa-vis-pris 14) +(def-tex metalflut-wrap volcanoa-vis-pris 15) +(def-tex grunt-eye-01 volcanoa-vis-pris 16) +(def-tex grunt-hose volcanoa-vis-pris 17) +(def-tex grunt-metal-01 volcanoa-vis-pris 18) +(def-tex grunt-skin-01 volcanoa-vis-pris 19) +(def-tex grunt-skin-02 volcanoa-vis-pris 20) +(def-tex grunt-skin-03 volcanoa-vis-pris 21) +(def-tex bam-eyelight volcanoa-vis-pris 22) +(def-tex vol-bouncer-cloth volcanoa-vis-pris 32) +(def-tex spikey-frog-back volcanoa-vis-pris 43) +(def-tex spikey-frog-belly volcanoa-vis-pris 44) +(def-tex spikey-frog-eye volcanoa-vis-pris 45) +(def-tex spikey-frog-leg volcanoa-vis-pris 46) +(def-tex spikey-frog-legfront volcanoa-vis-pris 47) +(def-tex spikey-frog-toenails volcanoa-vis-pris 48) +(def-tex cav-stain-bolt-01 mined-shrub 4) +(def-tex mined_redbrake mined-shrub 5) +(def-tex sewer-pipe-small-01 mined-shrub 6) +(def-tex dust-devil-01 desert-sprite 3) +(def-tex dust-devil-02 desert-sprite 4) +(def-tex dust-devil-03 desert-sprite 5) +(def-tex dust-cloud desert-sprite 6) +(def-tex dust-sparkle desert-sprite 9) +(def-tex kleever-fist-logo desert-sprite 10) +(def-tex burning-bush-off desert-sprite 11) +(def-tex crack01 desert-sprite 12) +(def-tex ceiling-dust desert-sprite 13) +(def-tex hud-desert-lizard desliz-minimap 0) +(def-tex dk-sat-cable-01 waspgame-pris 0) +(def-tex dk-sat-cable-02 waspgame-pris 1) +(def-tex dk-sat-cable-03 waspgame-pris 2) +(def-tex dk-sat-claw-01 waspgame-pris 3) +(def-tex dk-sat-panel-01 waspgame-pris 4) +(def-tex dk-sat-rim-01 waspgame-pris 5) +(def-tex dk-sat-rim-02 waspgame-pris 6) +(def-tex dk-sat-rim-03 waspgame-pris 7) +(def-tex dk-sat-rim-bright-01 waspgame-pris 8) +(def-tex dk-sat-screen-01 waspgame-pris 9) +(def-tex dk-sat-screen-rim-01 waspgame-pris 10) +(def-tex dk-sat-shell-01 waspgame-pris 11) +(def-tex dk-sat-heart-01 waspgame-pris 12) +(def-tex dk-sat-ring-01 waspgame-pris 13) +(def-tex dk-sat-heart-vein-01 waspgame-pris 14) +(def-tex dk-sat-game-circle-01 waspgame-pris 15) +(def-tex dk-sat-game-ex-01 waspgame-pris 16) +(def-tex dk-sat-game-square-01 waspgame-pris 17) +(def-tex dk-sat-game-tri-01 waspgame-pris 18) +(def-tex environment-darkprec waspgame-pris 19) +(def-tex environment-oldmetal wasleapr-pris 0) +(def-tex metalflut-eye wasleapr-pris 1) +(def-tex metalflut-leatherstrap-b-01 wasleapr-pris 2) +(def-tex metalflut-leatherstrap-c wasleapr-pris 3) +(def-tex metalflut-nail wasleapr-pris 4) +(def-tex metalflut-plates-02 wasleapr-pris 5) +(def-tex metalflut-rings wasleapr-pris 6) +(def-tex metalflut-roll wasleapr-pris 7) +(def-tex metalflut-saddle wasleapr-pris 8) +(def-tex metalflut-saddlehang wasleapr-pris 9) +(def-tex metalflut-saddleseat wasleapr-pris 10) +(def-tex metalflut-skin-01 wasleapr-pris 11) +(def-tex metalflut-skin-02 wasleapr-pris 12) +(def-tex metalflut-wrap wasleapr-pris 13) +(def-tex monk-arm wasleapr-pris 15) +(def-tex monk-bootbottom wasleapr-pris 16) +(def-tex monk-cheststraps wasleapr-pris 17) +(def-tex monk-ear-01 wasleapr-pris 18) +(def-tex monk-eye-c wasleapr-pris 19) +(def-tex monk-eye-d wasleapr-pris 20) +(def-tex monk-eye-f wasleapr-pris 21) +(def-tex monk-face-01 wasleapr-pris 22) +(def-tex monk-face-02 wasleapr-pris 23) +(def-tex monk-face-03 wasleapr-pris 24) +(def-tex monk-face-04 wasleapr-pris 25) +(def-tex monk-face-05 wasleapr-pris 26) +(def-tex monk-face-06 wasleapr-pris 27) +(def-tex monk-femalebelt wasleapr-pris 28) +(def-tex monk-femalebootlower wasleapr-pris 29) +(def-tex monk-femalebootmet wasleapr-pris 30) +(def-tex monk-femalebootoe wasleapr-pris 31) +(def-tex monk-femaleleg-01 wasleapr-pris 32) +(def-tex monk-femaleskirt-bottom wasleapr-pris 33) +(def-tex monk-femaleskirt-top wasleapr-pris 34) +(def-tex monk-finger wasleapr-pris 35) +(def-tex monk-gem wasleapr-pris 36) +(def-tex monk-goggleleather wasleapr-pris 37) +(def-tex monk-goggles wasleapr-pris 38) +(def-tex monk-goldjewel wasleapr-pris 39) +(def-tex monk-hair-a wasleapr-pris 40) +(def-tex monk-hair-f wasleapr-pris 41) +(def-tex monk-hand wasleapr-pris 42) +(def-tex monk-jewelry wasleapr-pris 43) +(def-tex monk-lens wasleapr-pris 44) +(def-tex monk-malearm wasleapr-pris 45) +(def-tex monk-malefoot2 wasleapr-pris 46) +(def-tex monk-maleleg wasleapr-pris 47) +(def-tex monk-maleshoebottom wasleapr-pris 48) +(def-tex monk-maletorso wasleapr-pris 49) +(def-tex monk-neckcover wasleapr-pris 50) +(def-tex monk-pipe-01 wasleapr-pris 51) +(def-tex monk-pipeend wasleapr-pris 52) +(def-tex monk-redjewel wasleapr-pris 53) +(def-tex monk-rope wasleapr-pris 54) +(def-tex monk-scarob wasleapr-pris 55) +(def-tex monk-staffa-wood wasleapr-pris 56) +(def-tex monk-strap wasleapr-pris 57) +(def-tex monk-trim wasleapr-pris 58) +(def-tex monk-uppertorso-01 wasleapr-pris 59) +(def-tex monk-waistwrap wasleapr-pris 60) +(def-tex monk-wristwrap wasleapr-pris 61) +(def-tex seem-precmetal-edge wasleapr-pris 62) +(def-tex stadiumb-hud-lap-01 destrack-minimap 2) +(def-tex stadiumb-hud-lap-02 destrack-minimap 3) +(def-tex stadiumb-hud-lap-03 destrack-minimap 4) +(def-tex stadiumb-hud-nmbr-01 destrack-minimap 5) +(def-tex stadiumb-hud-nmbr-02 destrack-minimap 6) +(def-tex stadiumb-hud-nmbr-03 destrack-minimap 7) +(def-tex stadiumb-hud-nmbr-04 destrack-minimap 8) +(def-tex stadiumb-hud-nmbr-05 destrack-minimap 9) +(def-tex stadiumb-hud-nmbr-06 destrack-minimap 10) +(def-tex stadiumb-hud-nmbr-07 destrack-minimap 11) +(def-tex stadiumb-hud-nmbr-08 destrack-minimap 12) +(def-tex stadiumb-hud-ord-e destrack-minimap 13) +(def-tex stadiumb-hud-ord-er destrack-minimap 14) +(def-tex stadiumb-hud-ord-korean destrack-minimap 15) +(def-tex stadiumb-hud-ord-nd destrack-minimap 16) +(def-tex stadiumb-hud-ord-o destrack-minimap 17) +(def-tex stadiumb-hud-ord-rd destrack-minimap 18) +(def-tex stadiumb-hud-ord-st destrack-minimap 19) +(def-tex stadiumb-hud-ord-th destrack-minimap 20) +(def-tex map-desert-race destrack-minimap 23) +(def-tex hud-vehicle-health-bar-01 hanga-minimap 0) +(def-tex hud-glider-speed-01 hanga-minimap 1) +(def-tex hud-glider-speed-marker-01 hanga-minimap 2) +(def-tex minc-streek mined-alpha 0) +(def-tex cav-stain-01 mined-alpha 1) +(def-tex monk-malepants wasleapr-water 1) +(def-tex map-wasdoors wasdoors-minimap 0) +(def-tex ceiling-dust lwassig-sprite 1) +(def-tex des-burn-eye-off desert-vis-shrub 3) +(def-tex des-burn-eye-on desert-vis-shrub 4) +(def-tex des-burn-precursor-01 desert-vis-shrub 5) +(def-tex des-burn-precursor-01-bottom desert-vis-shrub 6) +(def-tex des-burn-precursor-head-01 desert-vis-shrub 7) +(def-tex wascity-ground-01 desert-vis-shrub 8) +(def-tex stadiumb-hud-booster-off-01 wasleapr-minimap 0) +(def-tex stadiumb-hud-booster-on-01 wasleapr-minimap 1) +(def-tex stadiumb-hud-lap-01 wasleapr-minimap 2) +(def-tex stadiumb-hud-lap-02 wasleapr-minimap 3) +(def-tex stadiumb-hud-lap-03 wasleapr-minimap 4) +(def-tex stadiumb-hud-nmbr-01 wasleapr-minimap 5) +(def-tex stadiumb-hud-nmbr-02 wasleapr-minimap 6) +(def-tex stadiumb-hud-nmbr-03 wasleapr-minimap 7) +(def-tex stadiumb-hud-nmbr-04 wasleapr-minimap 8) +(def-tex stadiumb-hud-nmbr-05 wasleapr-minimap 9) +(def-tex stadiumb-hud-nmbr-06 wasleapr-minimap 10) +(def-tex stadiumb-hud-nmbr-07 wasleapr-minimap 11) +(def-tex stadiumb-hud-nmbr-08 wasleapr-minimap 12) +(def-tex stadiumb-hud-ord-e wasleapr-minimap 13) +(def-tex stadiumb-hud-ord-er wasleapr-minimap 14) +(def-tex stadiumb-hud-ord-korean wasleapr-minimap 15) +(def-tex stadiumb-hud-ord-nd wasleapr-minimap 16) +(def-tex stadiumb-hud-ord-o wasleapr-minimap 17) +(def-tex stadiumb-hud-ord-rd wasleapr-minimap 18) +(def-tex stadiumb-hud-ord-st wasleapr-minimap 19) +(def-tex stadiumb-hud-ord-th wasleapr-minimap 20) +(def-tex stadiumb-hud-time-01 wasleapr-minimap 21) +(def-tex stadiumb-hud-time-02 wasleapr-minimap 22) +(def-tex intcept-base-green01 desinter-pris 0) +(def-tex intcept-base-patern01 desinter-pris 1) +(def-tex intcept-base-patern02 desinter-pris 2) +(def-tex intcept-gun01 desinter-pris 3) +(def-tex intcept-pipe01 desinter-pris 4) +(def-tex intcept-teeth01 desinter-pris 5) +(def-tex intcept-tread01 desinter-pris 6) +(def-tex vehicle-body-panel-01 desinter-pris 7) +(def-tex vehicle-brace-pipe-01 desinter-pris 8) +(def-tex vehicle-cap-pin-01 desinter-pris 9) +(def-tex vehicle-chrome-pipe-01 desinter-pris 10) +(def-tex vehicle-gas-tank-01 desinter-pris 11) +(def-tex vehicle-gun-box-01 desinter-pris 12) +(def-tex vehicle-metal-plate-01 desinter-pris 13) +(def-tex vehicle-toad-exhaust-01 desinter-pris 14) +(def-tex vehicle-tread-blur-02 desinter-pris 15) +(def-tex vehicle-wheel-01 desinter-pris 16) +(def-tex vehicle-wheel-blur-01 desinter-pris 17) +(def-tex intcept-b-base-green01 desinter-pris 20) +(def-tex intcept-b-base-patern01 desinter-pris 21) +(def-tex intcept-b-base-patern02 desinter-pris 22) +(def-tex intcept-b-gun01 desinter-pris 23) +(def-tex intcept-b-pipe01 desinter-pris 24) +(def-tex intcept-b-teeth01 desinter-pris 25) +(def-tex intcept-lorez-spike01 desinter-water 0) +(def-tex bam-eyelight wascast-pris 0) +(def-tex bam-hairhilite wascast-pris 1) +(def-tex daxter-eyelid wascast-pris 2) +(def-tex daxter-furhilite wascast-pris 3) +(def-tex daxter-orange wascast-pris 4) +(def-tex daxterarm wascast-pris 5) +(def-tex daxterbodyshort-eix wascast-pris 6) +(def-tex daxterbolt wascast-pris 7) +(def-tex daxterear wascast-pris 8) +(def-tex daxterfinger wascast-pris 9) +(def-tex daxterfoot wascast-pris 10) +(def-tex daxterfoot-bottom wascast-pris 11) +(def-tex daxtergoggles wascast-pris 12) +(def-tex daxterheadwidenew wascast-pris 13) +(def-tex daxterhelmetplain wascast-pris 14) +(def-tex daxterlense wascast-pris 15) +(def-tex daxternose wascast-pris 16) +(def-tex daxterteeth wascast-pris 17) +(def-tex daxtertuft wascast-pris 18) +(def-tex eco-lt-cryst-02 wascast-pris 20) +(def-tex environment-oldmetal wascast-pris 21) +(def-tex jakc-armor wascast-pris 22) +(def-tex jakc-chestplate-straps wascast-pris 23) +(def-tex jakc-gogglemetal wascast-pris 24) +(def-tex jakc-lens wascast-pris 25) +(def-tex jakc-scarf wascast-pris 26) +(def-tex jakc-scarfhanging wascast-pris 27) +(def-tex jakc-skirt wascast-pris 28) +(def-tex jakc-waistband2 wascast-pris 29) +(def-tex jakc-wraps wascast-pris 30) +(def-tex jakc-wristband-a2 wascast-pris 31) +(def-tex jakchires-arm wascast-pris 32) +(def-tex jakchires-blackstrap wascast-pris 33) +(def-tex jakchires-brownstrap wascast-pris 34) +(def-tex jakchires-brwnleather wascast-pris 35) +(def-tex jakchires-chestplate wascast-pris 36) +(def-tex jakchires-clips wascast-pris 37) +(def-tex jakchires-eye wascast-pris 38) +(def-tex jakchires-eyebrow wascast-pris 39) +(def-tex jakchires-eyelid wascast-pris 40) +(def-tex jakchires-facelft wascast-pris 41) +(def-tex jakchires-facert wascast-pris 42) +(def-tex jakchires-glovetop wascast-pris 43) +(def-tex jakchires-hair wascast-pris 44) +(def-tex jakchires-horn wascast-pris 45) +(def-tex jakchires-jacket wascast-pris 46) +(def-tex jakchires-leatherpouch wascast-pris 47) +(def-tex jakchires-lightbrownspat wascast-pris 48) +(def-tex jakchires-pants wascast-pris 49) +(def-tex jakchires-precarmor-01 wascast-pris 50) +(def-tex jakchires-shoebottom wascast-pris 51) +(def-tex jakchires-shoemetal wascast-pris 52) +(def-tex jakchires-shoeteop wascast-pris 53) +(def-tex jakchires-teeth wascast-pris 54) +(def-tex bat-amulet-01 wascast-pris 59) +(def-tex bat-amulet-02 wascast-pris 60) +(def-tex bat-amulet-03 wascast-pris 61) +(def-tex prebot-envmap wascast-pris 62) +(def-tex eco-lt-cryst-03 wascast-pris 64) +(def-tex des-transport-backdoor desrescg-pris 0) +(def-tex des-transport-cab desrescg-pris 1) +(def-tex des-transport-can desrescg-pris 2) +(def-tex des-transport-cowcatch desrescg-pris 3) +(def-tex des-transport-door desrescg-pris 4) +(def-tex des-transport-frame-01 desrescg-pris 5) +(def-tex des-transport-frame-02 desrescg-pris 6) +(def-tex des-transport-frame-03 desrescg-pris 7) +(def-tex des-transport-front desrescg-pris 8) +(def-tex des-transport-pipe desrescg-pris 9) +(def-tex des-transport-pipecap desrescg-pris 10) +(def-tex des-transport-plate-01 desrescg-pris 11) +(def-tex des-transport-plate-02 desrescg-pris 12) +(def-tex des-transport-pouch-01 desrescg-pris 13) +(def-tex des-transport-pouch-02 desrescg-pris 14) +(def-tex des-transport-pouch-03 desrescg-pris 15) +(def-tex des-transport-tread desrescg-pris 16) +(def-tex des-transport-wall-01 desrescg-pris 17) +(def-tex des-transport-wheel desrescg-pris 18) +(def-tex des-transport-wheel-back desrescg-pris 19) +(def-tex des-transport-wheel-side desrescg-pris 20) +(def-tex des-transport-window desrescg-pris 21) +(def-tex intcept-base-green01 desrescg-pris 22) +(def-tex intcept-base-patern01 desrescg-pris 23) +(def-tex intcept-base-patern02 desrescg-pris 24) +(def-tex intcept-gun01 desrescg-pris 25) +(def-tex intcept-pipe01 desrescg-pris 26) +(def-tex intcept-teeth01 desrescg-pris 27) +(def-tex intcept-tread01 desrescg-pris 28) +(def-tex vehicle-body-panel-01 desrescg-pris 29) +(def-tex vehicle-brace-pipe-01 desrescg-pris 30) +(def-tex vehicle-cap-pin-01 desrescg-pris 31) +(def-tex vehicle-chrome-pipe-01 desrescg-pris 32) +(def-tex vehicle-gas-tank-01 desrescg-pris 33) +(def-tex vehicle-gun-box-01 desrescg-pris 34) +(def-tex vehicle-metal-plate-01 desrescg-pris 35) +(def-tex vehicle-toad-exhaust-01 desrescg-pris 36) +(def-tex vehicle-tread-blur-02 desrescg-pris 37) +(def-tex vehicle-wheel-01 desrescg-pris 38) +(def-tex vehicle-wheel-blur-01 desrescg-pris 39) +(def-tex tread-marks desrescg-pris 40) +(def-tex intcept-b-base-green01 desrescg-pris 43) +(def-tex intcept-b-base-patern01 desrescg-pris 44) +(def-tex intcept-b-base-patern02 desrescg-pris 45) +(def-tex intcept-b-gun01 desrescg-pris 46) +(def-tex intcept-b-pipe01 desrescg-pris 47) +(def-tex intcept-b-teeth01 desrescg-pris 48) +(def-tex intcept-lorez-spike01 desrescg-water 0) +(def-tex bam-eyelight desrescc-pris 0) +(def-tex bam-hairhilite desrescc-pris 1) +(def-tex daxter-eyelid desrescc-pris 2) +(def-tex daxter-furhilite desrescc-pris 3) +(def-tex daxter-orange desrescc-pris 4) +(def-tex daxterarm desrescc-pris 5) +(def-tex daxterbodyshort-eix desrescc-pris 6) +(def-tex daxterbolt desrescc-pris 7) +(def-tex daxterear desrescc-pris 8) +(def-tex daxterfinger desrescc-pris 9) +(def-tex daxterfoot desrescc-pris 10) +(def-tex daxterfoot-bottom desrescc-pris 11) +(def-tex daxtergoggles desrescc-pris 12) +(def-tex daxterheadwidenew desrescc-pris 13) +(def-tex daxterhelmetplain desrescc-pris 14) +(def-tex daxterlense desrescc-pris 15) +(def-tex daxternose desrescc-pris 16) +(def-tex daxterteeth desrescc-pris 17) +(def-tex daxtertuft desrescc-pris 18) +(def-tex environment-oldmetal desrescc-pris 19) +(def-tex jakc-armor desrescc-pris 47) +(def-tex jakc-chestplate-straps desrescc-pris 48) +(def-tex jakc-gogglemetal desrescc-pris 49) +(def-tex jakc-lens desrescc-pris 50) +(def-tex jakc-scarf desrescc-pris 51) +(def-tex jakc-waistband2 desrescc-pris 52) +(def-tex jakc-wraps desrescc-pris 53) +(def-tex jakc-wristband-a2 desrescc-pris 54) +(def-tex jakchires-arm desrescc-pris 55) +(def-tex jakchires-blackstrap desrescc-pris 56) +(def-tex jakchires-brownstrap desrescc-pris 57) +(def-tex jakchires-brwnleather desrescc-pris 58) +(def-tex jakchires-chestplate desrescc-pris 59) +(def-tex jakchires-clips desrescc-pris 60) +(def-tex jakchires-eye desrescc-pris 61) +(def-tex jakchires-eyebrow desrescc-pris 62) +(def-tex jakchires-eyelid desrescc-pris 63) +(def-tex jakchires-facelft desrescc-pris 64) +(def-tex jakchires-facert desrescc-pris 65) +(def-tex jakchires-glovetop desrescc-pris 66) +(def-tex jakchires-hair desrescc-pris 67) +(def-tex jakchires-horn desrescc-pris 68) +(def-tex jakchires-jacket desrescc-pris 69) +(def-tex jakchires-leatherpouch desrescc-pris 70) +(def-tex jakchires-lightbrownspat desrescc-pris 71) +(def-tex jakchires-pants desrescc-pris 72) +(def-tex jakchires-precarmor-01 desrescc-pris 73) +(def-tex jakchires-shoebottom desrescc-pris 74) +(def-tex jakchires-shoemetal desrescc-pris 75) +(def-tex jakchires-shoeteop desrescc-pris 76) +(def-tex jakchires-teeth desrescc-pris 77) +(def-tex jakc-skirt desrescc-pris 78) +(def-tex jakc-scarfhanging desrescc-pris 79) +(def-tex minc-pre-12 minea-vis-water 0) +(def-tex sat-shield desresc-warp 0) +(def-tex sat-shield-env-uvscroll desresc-warp 1) +(def-tex sat-shield-dest desresc-warp 2) +(def-tex ctyslumb-water ctyslumb-vis-water 1) +(def-tex ctyslumb-water-dest ctyslumb-vis-water 2) +(def-tex ctyslumb-fountain-fall ctyslumb-vis-water 3) +(def-tex ctyslumb-fountain-fall-dest ctyslumb-vis-water 4) +(def-tex des-cave-floor-01 desert-vis-water 2) +(def-tex terraformer-metal-03 desboss1-pris 11) +(def-tex terraformer-metal-08 desboss1-pris 12) +(def-tex terraformer-minecore desboss1-pris 13) +(def-tex terraformer-minestrips-01 desboss1-pris 14) +(def-tex terraformer-transstrips-01 desboss1-pris 15) +(def-tex terraformer-footpipes-01 desboss1-pris 16) +(def-tex terraformer-metal-01 desboss1-pris 17) +(def-tex terraformer-metal-02 desboss1-pris 18) +(def-tex terraformer-metal-04 desboss1-pris 19) +(def-tex terraformer-metal-05 desboss1-pris 20) +(def-tex terraformer-metal-09 desboss1-pris 21) +(def-tex terraformer-metal-10 desboss1-pris 22) +(def-tex terraformer-organic-01 desboss1-pris 23) +(def-tex terraformer-organic-02 desboss1-pris 24) +(def-tex terraformer-metal-07 desboss1-pris 25) +(def-tex terraformer-bodyside-bottom desboss1-pris 26) +(def-tex terraformer-bodyside-top desboss1-pris 27) +(def-tex terraformer-bodytopplain desboss1-pris 28) +(def-tex terraformer-bodytopstrans desboss1-pris 29) +(def-tex terraformer-organic-03 desboss1-pris 30) +(def-tex terraformer-transbodytop-01 desboss1-pris 31) +(def-tex terraformer-cockpit desboss1-pris 32) +(def-tex terraformer-jewels desboss1-pris 34) +(def-tex bam-eyelight desboss1-pris 35) +(def-tex bam-hairhilite desboss1-pris 36) +(def-tex daxter-eyelid desboss1-pris 37) +(def-tex daxter-furhilite desboss1-pris 38) +(def-tex daxter-orange desboss1-pris 39) +(def-tex daxterarm desboss1-pris 40) +(def-tex daxterbodyshort-eix desboss1-pris 41) +(def-tex daxterbolt desboss1-pris 42) +(def-tex daxterear desboss1-pris 43) +(def-tex daxterfinger desboss1-pris 44) +(def-tex daxterfoot desboss1-pris 45) +(def-tex daxterfoot-bottom desboss1-pris 46) +(def-tex daxtergoggles desboss1-pris 47) +(def-tex daxterheadwidenew desboss1-pris 48) +(def-tex daxterhelmetplain desboss1-pris 49) +(def-tex daxterlense desboss1-pris 50) +(def-tex daxternose desboss1-pris 51) +(def-tex daxterteeth desboss1-pris 52) +(def-tex daxtertuft desboss1-pris 53) +(def-tex environment-oldmetal desboss1-pris 54) +(def-tex jakc-armor desboss1-pris 55) +(def-tex jakc-chestplate-straps desboss1-pris 56) +(def-tex jakc-gogglemetal desboss1-pris 57) +(def-tex jakc-lens desboss1-pris 58) +(def-tex jakc-scarf desboss1-pris 59) +(def-tex jakc-scarfhanging desboss1-pris 60) +(def-tex jakc-skirt desboss1-pris 61) +(def-tex jakc-waistband2 desboss1-pris 62) +(def-tex jakc-wraps desboss1-pris 63) +(def-tex jakc-wristband-a2 desboss1-pris 64) +(def-tex jakchires-arm desboss1-pris 65) +(def-tex jakchires-blackstrap desboss1-pris 66) +(def-tex jakchires-brownstrap desboss1-pris 67) +(def-tex jakchires-brwnleather desboss1-pris 68) +(def-tex jakchires-chestplate desboss1-pris 69) +(def-tex jakchires-clips desboss1-pris 70) +(def-tex jakchires-eye desboss1-pris 71) +(def-tex jakchires-eyebrow desboss1-pris 72) +(def-tex jakchires-eyelid desboss1-pris 73) +(def-tex jakchires-facelft desboss1-pris 74) +(def-tex jakchires-facert desboss1-pris 75) +(def-tex jakchires-glovetop desboss1-pris 76) +(def-tex jakchires-hair desboss1-pris 77) +(def-tex jakchires-horn desboss1-pris 78) +(def-tex jakchires-jacket desboss1-pris 79) +(def-tex jakchires-leatherpouch desboss1-pris 80) +(def-tex jakchires-lightbrownspat desboss1-pris 81) +(def-tex jakchires-pants desboss1-pris 82) +(def-tex jakchires-precarmor-01 desboss1-pris 83) +(def-tex jakchires-shoebottom desboss1-pris 84) +(def-tex jakchires-shoemetal desboss1-pris 85) +(def-tex jakchires-shoeteop desboss1-pris 86) +(def-tex jakchires-teeth desboss1-pris 87) +(def-tex vehicle-snake-tread-01 desboss1-pris 88) +(def-tex vehicle-snake-tread-02 desboss1-pris 89) +(def-tex vehicle-wheel-01 desboss1-pris 90) +(def-tex cty-grunt-eye-01 ctypesb-pris 8) +(def-tex cty-grunt-gem-01 ctypesb-pris 9) +(def-tex cty-grunt-hose ctypesb-pris 10) +(def-tex cty-grunt-metal-01 ctypesb-pris 11) +(def-tex cty-grunt-skin-01 ctypesb-pris 12) +(def-tex cty-grunt-skin-02 ctypesb-pris 13) +(def-tex cty-grunt-skin-03 ctypesb-pris 14) +(def-tex bam-eyelight lnstcst-pris 0) +(def-tex bam-hairhilite lnstcst-pris 1) +(def-tex daxter-eyelid lnstcst-pris 2) +(def-tex daxter-furhilite lnstcst-pris 3) +(def-tex daxter-orange lnstcst-pris 4) +(def-tex daxterarm lnstcst-pris 5) +(def-tex daxterbodyshort-eix lnstcst-pris 6) +(def-tex daxterbolt lnstcst-pris 7) +(def-tex daxterear lnstcst-pris 8) +(def-tex daxterfinger lnstcst-pris 9) +(def-tex daxterfoot lnstcst-pris 10) +(def-tex daxterfoot-bottom lnstcst-pris 11) +(def-tex daxtergoggles lnstcst-pris 12) +(def-tex daxterheadwidenew lnstcst-pris 13) +(def-tex daxterhelmetplain lnstcst-pris 14) +(def-tex daxterlense lnstcst-pris 15) +(def-tex daxternose lnstcst-pris 16) +(def-tex daxterteeth lnstcst-pris 17) +(def-tex daxtertuft lnstcst-pris 18) +(def-tex environment-oldmetal lnstcst-pris 19) +(def-tex jakc-armor lnstcst-pris 20) +(def-tex jakc-chestplate-straps lnstcst-pris 21) +(def-tex jakc-gogglemetal lnstcst-pris 22) +(def-tex jakc-lens lnstcst-pris 23) +(def-tex jakc-scarf lnstcst-pris 24) +(def-tex jakc-waistband2 lnstcst-pris 25) +(def-tex jakc-wraps lnstcst-pris 26) +(def-tex jakc-wristband-a2 lnstcst-pris 27) +(def-tex jakchires-arm lnstcst-pris 28) +(def-tex jakchires-blackstrap lnstcst-pris 29) +(def-tex jakchires-brownstrap lnstcst-pris 30) +(def-tex jakchires-brwnleather lnstcst-pris 31) +(def-tex jakchires-chestplate lnstcst-pris 32) +(def-tex jakchires-clips lnstcst-pris 33) +(def-tex jakchires-eye lnstcst-pris 34) +(def-tex jakchires-eyebrow lnstcst-pris 35) +(def-tex jakchires-eyelid lnstcst-pris 36) +(def-tex jakchires-facelft lnstcst-pris 37) +(def-tex jakchires-facert lnstcst-pris 38) +(def-tex jakchires-glovetop lnstcst-pris 39) +(def-tex jakchires-hair lnstcst-pris 40) +(def-tex jakchires-horn lnstcst-pris 41) +(def-tex jakchires-jacket lnstcst-pris 42) +(def-tex jakchires-leatherpouch lnstcst-pris 43) +(def-tex jakchires-lightbrownspat lnstcst-pris 44) +(def-tex jakchires-pants lnstcst-pris 45) +(def-tex jakchires-precarmor-01 lnstcst-pris 46) +(def-tex jakchires-shoebottom lnstcst-pris 47) +(def-tex jakchires-shoemetal lnstcst-pris 48) +(def-tex jakchires-shoeteop lnstcst-pris 49) +(def-tex jakchires-teeth lnstcst-pris 50) +(def-tex jakc-skirt lnstcst-pris 51) +(def-tex jakc-scarfhanging lnstcst-pris 52) +(def-tex desert-egg-bulb-01 lnstcst-pris 57) +(def-tex desert-egg-bulbtop-01 lnstcst-pris 58) +(def-tex desert-egg-gem-01 lnstcst-pris 59) +(def-tex vehicle-tread-01 lnstcst-pris 60) +(def-tex vehicle-wheel-01 lnstcst-pris 61) +(def-tex bam-eyelight lnstcst-pris2 0) +(def-tex charHOLD lnstcst-pris2 1) +(def-tex environment-oldmetal lnstcst-pris2 2) +(def-tex sig-belt lnstcst-pris2 3) +(def-tex sig-eye lnstcst-pris2 4) +(def-tex sig-eyelid lnstcst-pris2 5) +(def-tex sig-faceleft lnstcst-pris2 6) +(def-tex sig-facert lnstcst-pris2 7) +(def-tex sig-flask lnstcst-pris2 8) +(def-tex sig-gem-01 lnstcst-pris2 9) +(def-tex sig-glove lnstcst-pris2 10) +(def-tex sig-glovetop lnstcst-pris2 11) +(def-tex sig-gun-01 lnstcst-pris2 12) +(def-tex sig-gun-02 lnstcst-pris2 13) +(def-tex sig-gun-03 lnstcst-pris2 14) +(def-tex sig-gun-04 lnstcst-pris2 15) +(def-tex sig-gun-05 lnstcst-pris2 16) +(def-tex sig-headgear lnstcst-pris2 17) +(def-tex sig-horn lnstcst-pris2 18) +(def-tex sig-lens lnstcst-pris2 19) +(def-tex sig-metal-01 lnstcst-pris2 20) +(def-tex sig-metal-dirty lnstcst-pris2 21) +(def-tex sig-sac lnstcst-pris2 22) +(def-tex sig-shoebottom lnstcst-pris2 23) +(def-tex sig-shoetop lnstcst-pris2 24) +(def-tex sig-shoulderarmor lnstcst-pris2 25) +(def-tex sig-skirts lnstcst-pris2 26) +(def-tex sig-skirts-02 lnstcst-pris2 27) +(def-tex sig-skirts-03 lnstcst-pris2 28) +(def-tex sig-undergarments lnstcst-pris2 29) +(def-tex vin-teeth-01 lnstcst-pris2 30) +(def-tex sig-flatfangs lnstcst-water 0) +(def-tex desert-nest-egg-piping lnstcst-water 1) +(def-tex nst-spiderweb lnstcst-water 2) +(def-tex sewer-pipe-small-01 sewk-vis-shrub 0) +(def-tex sewer-nut sewk-vis-shrub 1) +(def-tex sewer-shrub-pitting-01 sewk-vis-shrub 2) +(def-tex airlock-door-bolt sewk-vis-pris 0) +(def-tex airlock-door-cog sewk-vis-pris 1) +(def-tex airlock-door-main sewk-vis-pris 2) +(def-tex airlock-door-metal2 sewk-vis-pris 3) +(def-tex airlockl-door-metalframe sewk-vis-pris 4) +(def-tex airlock-door-cog1 sewk-vis-pris 6) +(def-tex sewcurved-door-01 sewk-vis-pris 7) +(def-tex sewcurved-door-04 sewk-vis-pris 8) +(def-tex sewcurved-door-05 sewk-vis-pris 9) +(def-tex sewcurved-door-06 sewk-vis-pris 10) +(def-tex freehq-monitor06 freehq-shrub 1) +(def-tex freehq-gray-metal-disc01 freehq-shrub 2) +(def-tex freehq-wal-plate03 freehq-shrub 3) +(def-tex freehq-wal-tilem07 freehq-shrub 4) +(def-tex intcept-base-green01 destrack-pris 0) +(def-tex intcept-base-patern01 destrack-pris 1) +(def-tex intcept-base-patern02 destrack-pris 2) +(def-tex intcept-gun01 destrack-pris 3) +(def-tex intcept-pipe01 destrack-pris 4) +(def-tex intcept-teeth01 destrack-pris 5) +(def-tex intcept-tread01 destrack-pris 6) +(def-tex vehicle-body-panel-01 destrack-pris 7) +(def-tex vehicle-brace-pipe-01 destrack-pris 8) +(def-tex vehicle-cap-pin-01 destrack-pris 9) +(def-tex vehicle-chrome-pipe-01 destrack-pris 10) +(def-tex vehicle-gas-tank-01 destrack-pris 11) +(def-tex vehicle-gun-box-01 destrack-pris 12) +(def-tex vehicle-metal-plate-01 destrack-pris 13) +(def-tex vehicle-toad-exhaust-01 destrack-pris 14) +(def-tex vehicle-tread-blur-02 destrack-pris 15) +(def-tex vehicle-wheel-01 destrack-pris 16) +(def-tex vehicle-wheel-blur-01 destrack-pris 17) +(def-tex bam-eyelight destrack-pris 20) +(def-tex bam-hairhilite destrack-pris 21) +(def-tex klever-arm destrack-pris 22) +(def-tex klever-armor-01 destrack-pris 23) +(def-tex klever-armor-02 destrack-pris 24) +(def-tex klever-blackstrap destrack-pris 25) +(def-tex klever-bolt destrack-pris 26) +(def-tex klever-brownstrap destrack-pris 27) +(def-tex klever-chest destrack-pris 28) +(def-tex klever-clips destrack-pris 29) +(def-tex klever-earcup destrack-pris 30) +(def-tex klever-face-01 destrack-pris 31) +(def-tex klever-face-01scars destrack-pris 32) +(def-tex klever-fingerbottom destrack-pris 33) +(def-tex klever-fingertop destrack-pris 34) +(def-tex klever-gunmetal-01 destrack-pris 35) +(def-tex klever-gunmetal-02 destrack-pris 36) +(def-tex klever-gunmetal-03 destrack-pris 37) +(def-tex klever-gunmetal-04 destrack-pris 38) +(def-tex klever-gunmetal-05 destrack-pris 39) +(def-tex klever-hair destrack-pris 40) +(def-tex klever-hand destrack-pris 41) +(def-tex klever-handwrap destrack-pris 42) +(def-tex klever-horn destrack-pris 43) +(def-tex klever-mustache destrack-pris 44) +(def-tex klever-shoe destrack-pris 45) +(def-tex klever-shoebottom destrack-pris 46) +(def-tex klever-skirtdark destrack-pris 47) +(def-tex klever-skirtlight destrack-pris 48) +(def-tex klever-thighs destrack-pris 49) +(def-tex klever-undershirt destrack-pris 50) +(def-tex klever-widebrownstrap destrack-pris 51) +(def-tex des-corral-metal-01 destrack-pris 52) +(def-tex des-corral-plate-03 destrack-pris 53) +(def-tex des-pole-01 destrack-pris 54) +(def-tex des-pole-brace destrack-pris 55) +(def-tex des-train-barrier-screw destrack-pris 56) +(def-tex des-train-bollard-cap destrack-pris 57) +(def-tex des-train-bollard-pole-01 destrack-pris 58) +(def-tex des-shrub-pebbles destrack-pris 59) +(def-tex des-train-barrier-stone-red destrack-pris 60) +(def-tex daxter-eyelid destrack-pris 61) +(def-tex daxter-furhilite destrack-pris 62) +(def-tex daxter-orange destrack-pris 63) +(def-tex daxterarm destrack-pris 64) +(def-tex daxterbodyshort-eix destrack-pris 65) +(def-tex daxterbolt destrack-pris 66) +(def-tex daxterear destrack-pris 67) +(def-tex daxterfinger destrack-pris 68) +(def-tex daxterfoot destrack-pris 69) +(def-tex daxterfoot-bottom destrack-pris 70) +(def-tex daxtergoggles destrack-pris 71) +(def-tex daxterheadwidenew destrack-pris 72) +(def-tex daxterhelmetplain destrack-pris 73) +(def-tex daxterlense destrack-pris 74) +(def-tex daxternose destrack-pris 75) +(def-tex daxterteeth destrack-pris 76) +(def-tex daxtertuft destrack-pris 77) +(def-tex environment-oldmetal destrack-pris 78) +(def-tex jakc-armor destrack-pris 79) +(def-tex jakc-chestplate-straps destrack-pris 80) +(def-tex jakc-gogglemetal destrack-pris 81) +(def-tex jakc-lens destrack-pris 82) +(def-tex jakc-scarf destrack-pris 83) +(def-tex jakc-scarfhanging destrack-pris 84) +(def-tex jakc-skirt destrack-pris 85) +(def-tex jakc-waistband2 destrack-pris 86) +(def-tex jakc-wraps destrack-pris 87) +(def-tex jakc-wristband-a2 destrack-pris 88) +(def-tex jakchires-arm destrack-pris 89) +(def-tex jakchires-blackstrap destrack-pris 90) +(def-tex jakchires-brownstrap destrack-pris 91) +(def-tex jakchires-brwnleather destrack-pris 92) +(def-tex jakchires-chestplate destrack-pris 93) +(def-tex jakchires-clips destrack-pris 94) +(def-tex jakchires-eye destrack-pris 95) +(def-tex jakchires-eyebrow destrack-pris 96) +(def-tex jakchires-eyelid destrack-pris 97) +(def-tex jakchires-facelft destrack-pris 98) +(def-tex jakchires-facert destrack-pris 99) +(def-tex jakchires-glovetop destrack-pris 100) +(def-tex jakchires-hair destrack-pris 101) +(def-tex jakchires-horn destrack-pris 102) +(def-tex jakchires-jacket destrack-pris 103) +(def-tex jakchires-leatherpouch destrack-pris 104) +(def-tex jakchires-lightbrownspat destrack-pris 105) +(def-tex jakchires-pants destrack-pris 106) +(def-tex jakchires-precarmor-01 destrack-pris 107) +(def-tex jakchires-shoebottom destrack-pris 108) +(def-tex jakchires-shoemetal destrack-pris 109) +(def-tex jakchires-shoeteop destrack-pris 110) +(def-tex jakchires-teeth destrack-pris 111) +(def-tex wstlander-01-eye destrack-pris 126) +(def-tex wstlander-01-gunmetal-01 destrack-pris 127) +(def-tex wstlander-01-gunmetal-02 destrack-pris 128) +(def-tex wstlander-01-gunmetal-03 destrack-pris 129) +(def-tex wstlander-01-gunmetal-04 destrack-pris 130) +(def-tex wstlander-01-head destrack-pris 131) +(def-tex wstlander-01-leatherstrap destrack-pris 132) +(def-tex wstlander-01-mustache destrack-pris 133) +(def-tex wstlander-01-pants destrack-pris 134) +(def-tex wstlander-01-shoebottom destrack-pris 135) +(def-tex wstlander-01-shoetop destrack-pris 136) +(def-tex wstlander-01-shoulderarmor destrack-pris 137) +(def-tex wstlander-01-skirt destrack-pris 138) +(def-tex wstlander-01-wrap destrack-pris 139) +(def-tex wstlander-02-arm destrack-pris 140) +(def-tex wstlander-02-armor destrack-pris 141) +(def-tex wstlander-02-belt destrack-pris 142) +(def-tex wstlander-02-bootheel destrack-pris 143) +(def-tex wstlander-02-eye destrack-pris 144) +(def-tex wstlander-02-glove destrack-pris 145) +(def-tex wstlander-02-head destrack-pris 146) +(def-tex wstlander-02-ponytail destrack-pris 147) +(def-tex wstlander-02-scarf destrack-pris 148) +(def-tex wstlander-02-shirt destrack-pris 149) +(def-tex wstlander-02-skirt destrack-pris 150) +(def-tex wstlander-03-eye destrack-pris 151) +(def-tex wstlander-03-flesh destrack-pris 152) +(def-tex wstlander-04-dark-blue destrack-pris 153) +(def-tex wstlander-04-gun destrack-pris 154) +(def-tex wstlander-04-headband destrack-pris 155) +(def-tex wstlander-04-shirt destrack-pris 156) +(def-tex wstlander-04-shirt-strap destrack-pris 157) +(def-tex wstlander-04-skirt destrack-pris 158) +(def-tex intcept-b-base-green01 destrack-pris 159) +(def-tex intcept-b-base-patern01 destrack-pris 160) +(def-tex intcept-b-base-patern02 destrack-pris 161) +(def-tex intcept-b-gun01 destrack-pris 162) +(def-tex intcept-b-pipe01 destrack-pris 163) +(def-tex intcept-b-teeth01 destrack-pris 164) +(def-tex intcept-lorez-spike01 destrack-water 0) +(def-tex wstlander-01-glovetop destrack-water 1) +(def-tex bam-eyelight deshunt-pris2 0) +(def-tex charHOLD deshunt-pris2 1) +(def-tex environment-oldmetal deshunt-pris2 2) +(def-tex sig-belt deshunt-pris2 3) +(def-tex sig-eye deshunt-pris2 4) +(def-tex sig-eyelid deshunt-pris2 5) +(def-tex sig-faceleft deshunt-pris2 6) +(def-tex sig-facert deshunt-pris2 7) +(def-tex sig-flask deshunt-pris2 8) +(def-tex sig-gem-01 deshunt-pris2 9) +(def-tex sig-glove deshunt-pris2 10) +(def-tex sig-glovetop deshunt-pris2 11) +(def-tex sig-gun-01 deshunt-pris2 12) +(def-tex sig-gun-02 deshunt-pris2 13) +(def-tex sig-gun-03 deshunt-pris2 14) +(def-tex sig-gun-04 deshunt-pris2 15) +(def-tex sig-gun-05 deshunt-pris2 16) +(def-tex sig-headgear deshunt-pris2 17) +(def-tex sig-horn deshunt-pris2 18) +(def-tex sig-lens deshunt-pris2 19) +(def-tex sig-metal-01 deshunt-pris2 20) +(def-tex sig-metal-dirty deshunt-pris2 21) +(def-tex sig-sac deshunt-pris2 22) +(def-tex sig-shoebottom deshunt-pris2 23) +(def-tex sig-shoetop deshunt-pris2 24) +(def-tex sig-shoulderarmor deshunt-pris2 25) +(def-tex sig-skirts deshunt-pris2 26) +(def-tex sig-skirts-02 deshunt-pris2 27) +(def-tex sig-skirts-03 deshunt-pris2 28) +(def-tex sig-undergarments deshunt-pris2 29) +(def-tex vin-teeth-01 deshunt-pris2 30) +(def-tex sig-flatfangs deshunt-water 0) +(def-tex bam-eyelight ljkcdmkl-pris 0) +(def-tex bam-hairhilite ljkcdmkl-pris 1) +(def-tex environment-oldmetal ljkcdmkl-pris 2) +(def-tex jakc-armor ljkcdmkl-pris 3) +(def-tex jakc-chestplate-straps ljkcdmkl-pris 4) +(def-tex jakc-gogglemetal ljkcdmkl-pris 5) +(def-tex jakc-lens ljkcdmkl-pris 6) +(def-tex jakc-scarf ljkcdmkl-pris 7) +(def-tex jakc-scarfhanging ljkcdmkl-pris 8) +(def-tex jakc-skirt ljkcdmkl-pris 9) +(def-tex jakc-waistband2 ljkcdmkl-pris 10) +(def-tex jakc-wraps ljkcdmkl-pris 11) +(def-tex jakc-wristband-a2 ljkcdmkl-pris 12) +(def-tex jakchires-arm ljkcdmkl-pris 13) +(def-tex jakchires-blackstrap ljkcdmkl-pris 14) +(def-tex jakchires-brownstrap ljkcdmkl-pris 15) +(def-tex jakchires-brwnleather ljkcdmkl-pris 16) +(def-tex jakchires-chestplate ljkcdmkl-pris 17) +(def-tex jakchires-clips ljkcdmkl-pris 18) +(def-tex jakchires-eye ljkcdmkl-pris 19) +(def-tex jakchires-eyebrow ljkcdmkl-pris 20) +(def-tex jakchires-eyelid ljkcdmkl-pris 21) +(def-tex jakchires-facelft ljkcdmkl-pris 22) +(def-tex jakchires-facert ljkcdmkl-pris 23) +(def-tex jakchires-glovetop ljkcdmkl-pris 24) +(def-tex jakchires-hair ljkcdmkl-pris 25) +(def-tex jakchires-horn ljkcdmkl-pris 26) +(def-tex jakchires-jacket ljkcdmkl-pris 27) +(def-tex jakchires-leatherpouch ljkcdmkl-pris 28) +(def-tex jakchires-lightbrownspat ljkcdmkl-pris 29) +(def-tex jakchires-pants ljkcdmkl-pris 30) +(def-tex jakchires-precarmor-01 ljkcdmkl-pris 31) +(def-tex jakchires-shoebottom ljkcdmkl-pris 32) +(def-tex jakchires-shoemetal ljkcdmkl-pris 33) +(def-tex jakchires-shoeteop ljkcdmkl-pris 34) +(def-tex jakchires-teeth ljkcdmkl-pris 35) +(def-tex klever-arm ljkcdmkl-pris 36) +(def-tex klever-armor-01 ljkcdmkl-pris 37) +(def-tex klever-armor-02 ljkcdmkl-pris 38) +(def-tex klever-blackstrap ljkcdmkl-pris 39) +(def-tex klever-bolt ljkcdmkl-pris 40) +(def-tex klever-brownstrap ljkcdmkl-pris 41) +(def-tex klever-chest ljkcdmkl-pris 42) +(def-tex klever-clips ljkcdmkl-pris 43) +(def-tex klever-earcup ljkcdmkl-pris 44) +(def-tex klever-eye ljkcdmkl-pris 45) +(def-tex klever-eyelid ljkcdmkl-pris 46) +(def-tex klever-face-01 ljkcdmkl-pris 47) +(def-tex klever-face-01scars ljkcdmkl-pris 48) +(def-tex klever-fingerbottom ljkcdmkl-pris 49) +(def-tex klever-fingertop ljkcdmkl-pris 50) +(def-tex klever-gunmetal-01 ljkcdmkl-pris 51) +(def-tex klever-gunmetal-02 ljkcdmkl-pris 52) +(def-tex klever-gunmetal-03 ljkcdmkl-pris 53) +(def-tex klever-gunmetal-04 ljkcdmkl-pris 54) +(def-tex klever-gunmetal-05 ljkcdmkl-pris 55) +(def-tex klever-hair ljkcdmkl-pris 56) +(def-tex klever-hand ljkcdmkl-pris 57) +(def-tex klever-handwrap ljkcdmkl-pris 58) +(def-tex klever-horn ljkcdmkl-pris 59) +(def-tex klever-mustache ljkcdmkl-pris 60) +(def-tex klever-shoe ljkcdmkl-pris 61) +(def-tex klever-shoebottom ljkcdmkl-pris 62) +(def-tex klever-skirtdark ljkcdmkl-pris 63) +(def-tex klever-skirtlight ljkcdmkl-pris 64) +(def-tex klever-thighs ljkcdmkl-pris 65) +(def-tex klever-undershirt ljkcdmkl-pris 66) +(def-tex klever-widebrownstrap ljkcdmkl-pris 67) +(def-tex bam-eyelight ljkcdmkl-pris2 0) +(def-tex environment-oldmetal ljkcdmkl-pris2 1) +(def-tex king-arm ljkcdmkl-pris2 2) +(def-tex king-blackskirt2 ljkcdmkl-pris2 3) +(def-tex king-bluemetal ljkcdmkl-pris2 4) +(def-tex king-bolt ljkcdmkl-pris2 5) +(def-tex king-chest ljkcdmkl-pris2 6) +(def-tex king-clip-02 ljkcdmkl-pris2 7) +(def-tex king-ear ljkcdmkl-pris2 8) +(def-tex king-earing ljkcdmkl-pris2 9) +(def-tex king-face-01 ljkcdmkl-pris2 10) +(def-tex king-finger ljkcdmkl-pris2 11) +(def-tex king-greenmetal ljkcdmkl-pris2 12) +(def-tex king-greenmetalplain ljkcdmkl-pris2 13) +(def-tex king-hair ljkcdmkl-pris2 14) +(def-tex king-hand ljkcdmkl-pris2 15) +(def-tex king-horn ljkcdmkl-pris2 16) +(def-tex king-iris ljkcdmkl-pris2 17) +(def-tex king-leg ljkcdmkl-pris2 18) +(def-tex king-lgblackstrap ljkcdmkl-pris2 19) +(def-tex king-precursermetal-decor ljkcdmkl-pris2 20) +(def-tex king-precursermetal-plain ljkcdmkl-pris2 21) +(def-tex king-precursermetal-trim ljkcdmkl-pris2 22) +(def-tex king-precursermetal-trim2 ljkcdmkl-pris2 23) +(def-tex king-precursermetal-trimbolt ljkcdmkl-pris2 24) +(def-tex king-shoebottom ljkcdmkl-pris2 25) +(def-tex king-skirt ljkcdmkl-pris2 26) +(def-tex king-skirt-b ljkcdmkl-pris2 27) +(def-tex king-teeth ljkcdmkl-pris2 28) +(def-tex king-thinstrap ljkcdmkl-pris2 29) +(def-tex king-vest ljkcdmkl-pris2 30) +(def-tex king-vestback ljkcdmkl-pris2 31) +(def-tex king-wrap ljkcdmkl-pris2 32) +(def-tex king-wraps ljkcdmkl-pris2 33) +(def-tex king-wristband ljkcdmkl-pris2 34) +(def-tex bam-eyelight wcaseem-pris2 0) +(def-tex environment-oldmetal wcaseem-pris2 1) +(def-tex seem-arm wcaseem-pris2 3) +(def-tex seem-bootbottom wcaseem-pris2 4) +(def-tex seem-bootleg wcaseem-pris2 5) +(def-tex seem-bootlower wcaseem-pris2 6) +(def-tex seem-bootmet wcaseem-pris2 7) +(def-tex seem-boottoe wcaseem-pris2 8) +(def-tex seem-ear wcaseem-pris2 9) +(def-tex seem-eye wcaseem-pris2 10) +(def-tex seem-eyelid wcaseem-pris2 11) +(def-tex seem-face wcaseem-pris2 12) +(def-tex seem-finger wcaseem-pris2 13) +(def-tex seem-hand wcaseem-pris2 14) +(def-tex seem-headgearback wcaseem-pris2 15) +(def-tex seem-headpiecetop wcaseem-pris2 16) +(def-tex seem-pipeend wcaseem-pris2 17) +(def-tex seem-pipes-01 wcaseem-pris2 18) +(def-tex seem-pipes-02 wcaseem-pris2 19) +(def-tex seem-precmetal-chestplate-01 wcaseem-pris2 20) +(def-tex seem-precmetal-edge wcaseem-pris2 21) +(def-tex seem-precmetal-plain wcaseem-pris2 22) +(def-tex seem-straps wcaseem-pris2 23) +(def-tex seem-teeth wcaseem-pris2 24) +(def-tex seem-uppertorso wcaseem-pris2 25) +(def-tex seem-skirt wcaseem-pris2 26) +(def-tex seem-skirt-small wcaseem-pris2 27) +(def-tex citfat-hairflat ljinx-pris 8) +(def-tex citn-1-pants ljinx-pris 9) +(def-tex citn-allbuckel ljinx-pris 10) +(def-tex citn-alleyebrow ljinx-pris 11) +(def-tex citn-allflesh ljinx-pris 12) +(def-tex citn-alllcotton ljinx-pris 13) +(def-tex citn-allleather ljinx-pris 15) +(def-tex citn-allleatherstrap ljinx-pris 17) +(def-tex citn-allleatherwrinkled ljinx-pris 18) +(def-tex citn-allleye ljinx-pris 20) +(def-tex environment-oldmetal ljinx-pris 21) +(def-tex jakbsmall-blackstrap ljinx-pris 22) +(def-tex jakbsmall-finger ljinx-pris 23) +(def-tex jakbsmall-glovetop ljinx-pris 24) +(def-tex sig2-shoebottom ljinx-pris 29) +(def-tex sig2-shoetop ljinx-pris 30) +(def-tex citwide-crimson-gold ljinx-pris 31) +(def-tex citwide-crimson-light ljinx-pris 32) +(def-tex citwide-crimson-red ljinx-pris 33) +(def-tex citwide-crimson-tube ljinx-pris 34) +(def-tex citwide-crimson-wall-plain ljinx-pris 35) +(def-tex com-power-box-plate ljinx-pris 36) +(def-tex com-power-box-symbol ljinx-pris 37) +(def-tex com-power-box-tube ljinx-pris 38) +(def-tex com-power-box-wires-01 ljinx-pris 39) +(def-tex jinx-scarf-ingame ljinx-pris 40) +(def-tex logo-circuit title-pris 0) +(def-tex logo-jak title-pris 1) +(def-tex logo-black title-pris 3) +(def-tex ctydecoy-glow-02 lctyhijk-pris 0) +(def-tex ctydecoy-light-01 lctyhijk-pris 1) +(def-tex ctydecoy-plate-01 lctyhijk-pris 2) +(def-tex ctydecoy-plate-02 lctyhijk-pris 3) +(def-tex ctydecoy-plate-03 lctyhijk-pris 4) +(def-tex ctydecoy-plate-05 lctyhijk-pris 5) +(def-tex ctydecoy-plate-07 lctyhijk-pris 6) +(def-tex ctydecoy-plate-08 lctyhijk-pris 7) +(def-tex ctydecoy-plate-09 lctyhijk-pris 8) +(def-tex ctydecoy-round-01 lctyhijk-pris 9) +(def-tex ctydecoy-siren-01 lctyhijk-pris 10) +(def-tex homing-missle-body lctyhijk-pris 11) +(def-tex homing-missle-body-tip lctyhijk-pris 12) +(def-tex homing-missle-exhaust lctyhijk-pris 13) +(def-tex homing-missle-fin-01 lctyhijk-pris 14) +(def-tex kg-pickup-bed lctyhijk-pris 15) +(def-tex kg-pickup-body lctyhijk-pris 16) +(def-tex kg-pickup-engine-01 lctyhijk-pris 17) +(def-tex kg-pickup-fender lctyhijk-pris 18) +(def-tex kg-pickup-fender-edge lctyhijk-pris 19) +(def-tex kg-pickup-handrail lctyhijk-pris 20) +(def-tex kg-pickup-hood lctyhijk-pris 21) +(def-tex kg-pickup-joint lctyhijk-pris 22) +(def-tex kg-pickup-pipe lctyhijk-pris 23) +(def-tex kg-pickup-sidelogo lctyhijk-pris 24) +(def-tex kg-pickup-wings01 lctyhijk-pris 25) +(def-tex kg-pickup-wings02 lctyhijk-pris 26) +(def-tex ctydecoy-glass-01 lctyhijk-water 1) +(def-tex ruins-citywall-frame forestx-vis-tfrag 0) +(def-tex ruins-endblocks forestx-vis-tfrag 2) +(def-tex sewer-concrete-edge-02 forestx-vis-tfrag 5) +(def-tex sewer-metal-block-06 forestx-vis-tfrag 6) +(def-tex sewer-metal-block-04 forestx-vis-tfrag 7) +(def-tex forx-mount-glass01 forestx-vis-tfrag 8) +(def-tex forx-citywall-frame forestx-vis-tfrag 9) +(def-tex forx-citywall forestx-vis-tfrag 10) +(def-tex fora-rock-small forestx-vis-tfrag 11) +(def-tex airlock-door-bolt forestx-vis-pris 0) +(def-tex airlock-door-cog forestx-vis-pris 1) +(def-tex airlock-door-cog1 forestx-vis-pris 2) +(def-tex airlock-door-main forestx-vis-pris 3) +(def-tex airlock-door-metal2 forestx-vis-pris 4) +(def-tex airlockl-door-metalframe forestx-vis-pris 5) +(def-tex map-nst-lower lwassig-minimap 0) +(def-tex hip-tmetfloor11 hiphog-vis-tfrag 0) +(def-tex hip-tbluelit01 hiphog-vis-tfrag 1) +(def-tex hip-twood02 hiphog-vis-tfrag 2) +(def-tex hip-tredstool01 hiphog-vis-tfrag 3) +(def-tex hip-tredstool02 hiphog-vis-tfrag 4) +(def-tex hip-tmetring02 hiphog-vis-tfrag 5) +(def-tex hip-tmetring01 hiphog-vis-tfrag 6) +(def-tex hip-tbotyel01 hiphog-vis-tfrag 7) +(def-tex hip-tgreendark01 hiphog-vis-tfrag 8) +(def-tex hip-tbotblue02 hiphog-vis-tfrag 9) +(def-tex hip-tredmetal01 hiphog-vis-tfrag 10) +(def-tex hip-tgoldring01 hiphog-vis-tfrag 11) +(def-tex hip-tmetcan01 hiphog-vis-tfrag 12) +(def-tex hip-tbotred01 hiphog-vis-tfrag 13) +(def-tex hip-tbotblue01 hiphog-vis-tfrag 14) +(def-tex hip-tbluecup hiphog-vis-tfrag 15) +(def-tex hip-tredmetal09 hiphog-vis-tfrag 16) +(def-tex hip-tmetbooth01 hiphog-vis-tfrag 17) +(def-tex hip-tred-check01 hiphog-vis-tfrag 18) +(def-tex hip-tred-check10 hiphog-vis-tfrag 19) +(def-tex hip-tred-check09 hiphog-vis-tfrag 20) +(def-tex hip-tgreenmetal01 hiphog-vis-tfrag 21) +(def-tex hip-tbooth02 hiphog-vis-tfrag 22) +(def-tex hip-tboothlight01 hiphog-vis-tfrag 23) +(def-tex hip-tyellmetal03 hiphog-vis-tfrag 24) +(def-tex hip-tyellmetal04 hiphog-vis-tfrag 25) +(def-tex hip-tredmetal03 hiphog-vis-tfrag 26) +(def-tex hip-tyellmetal01 hiphog-vis-tfrag 27) +(def-tex hip-tyellmetal02 hiphog-vis-tfrag 28) +(def-tex hip-tredmetal04 hiphog-vis-tfrag 29) +(def-tex hip-troofmetal01 hiphog-vis-tfrag 30) +(def-tex hip-tbooth01 hiphog-vis-tfrag 31) +(def-tex hip-temp-02 hiphog-vis-tfrag 32) +(def-tex hip-tredlight01 hiphog-vis-tfrag 33) +(def-tex hip-tcounter02 hiphog-vis-tfrag 34) +(def-tex hip-tcounter04 hiphog-vis-tfrag 35) +(def-tex hip-tmetfloor04 hiphog-vis-tfrag 36) +(def-tex hip-tamblit01 hiphog-vis-tfrag 37) +(def-tex hip-tredmed01 hiphog-vis-tfrag 38) +(def-tex hip-treddark01 hiphog-vis-tfrag 40) +(def-tex hip-tredlite01 hiphog-vis-tfrag 41) +(def-tex hip-tgreenlite01 hiphog-vis-tfrag 43) +(def-tex hip-tgreenmed01 hiphog-vis-tfrag 44) +(def-tex hip-tpinup02 hiphog-vis-tfrag 45) +(def-tex hip-daxter-portrate04 hiphog-vis-tfrag 46) +(def-tex hip-daxter-portrate06 hiphog-vis-tfrag 47) +(def-tex hip-tyellwall01 hiphog-vis-tfrag 52) +(def-tex hip-tyellwall02 hiphog-vis-tfrag 53) +(def-tex hip-tyellwall03 hiphog-vis-tfrag 54) +(def-tex hip-tpillerpaint06 hiphog-vis-tfrag 55) +(def-tex hip-tpillerpaint03 hiphog-vis-tfrag 56) +(def-tex hip-tlogorag01 hiphog-vis-tfrag 57) +(def-tex hip-tred-step01 hiphog-vis-tfrag 58) +(def-tex hip-tyellwall04 hiphog-vis-tfrag 59) +(def-tex hip-tred-trim03 hiphog-vis-tfrag 60) +(def-tex hip-tpillerpaint02 hiphog-vis-tfrag 61) +(def-tex hip-tpillerpaint05 hiphog-vis-tfrag 62) +(def-tex hip-tpillerpaint04 hiphog-vis-tfrag 63) +(def-tex hip-twood01 hiphog-vis-tfrag 64) +(def-tex hip-tred-step04 hiphog-vis-tfrag 65) +(def-tex hip-tred-step03 hiphog-vis-tfrag 66) +(def-tex hip-tpillerpaint01 hiphog-vis-tfrag 67) +(def-tex hip-tred-step02 hiphog-vis-tfrag 68) +(def-tex hip-tred-check08 hiphog-vis-tfrag 69) +(def-tex hip-tred-step06 hiphog-vis-tfrag 70) +(def-tex hip-tred-steptrim01 hiphog-vis-tfrag 71) +(def-tex hip-tmetfloor02 hiphog-vis-tfrag 75) +(def-tex hip-tmetfloor03 hiphog-vis-tfrag 76) +(def-tex hip-tred-check11 hiphog-vis-tfrag 77) +(def-tex hip-tred-check02 hiphog-vis-tfrag 78) +(def-tex hip-tred-check05 hiphog-vis-tfrag 79) +(def-tex hip-tmetfloor01 hiphog-vis-tfrag 80) +(def-tex hip-tred-check07 hiphog-vis-tfrag 81) +(def-tex hip-tred-check06 hiphog-vis-tfrag 82) +(def-tex hip-tred-check12 hiphog-vis-tfrag 83) +(def-tex hip-tmetfloor-vent04 hiphog-vis-tfrag 84) +(def-tex hip-tmetfloor06 hiphog-vis-tfrag 87) +(def-tex hip-tmetfloor12 hiphog-vis-tfrag 88) +(def-tex hip-tmetfloor08 hiphog-vis-tfrag 89) +(def-tex hip-tmetfloor13 hiphog-vis-tfrag 90) +(def-tex hip-tred-step05 hiphog-vis-tfrag 91) +(def-tex hip-tgreen-try01 hiphog-vis-tfrag 92) +(def-tex hip-tcounter01 hiphog-vis-tfrag 93) +(def-tex hip-tcounter03 hiphog-vis-tfrag 94) +(def-tex hip-tred-trim01 hiphog-vis-tfrag 95) +(def-tex hip-tblack-trim01 hiphog-vis-tfrag 96) +(def-tex hip-tred-trim02 hiphog-vis-tfrag 97) +(def-tex hip-blue-light hiphog-vis-tfrag 99) +(def-tex hip-glass-shard-01 hiphog-vis-tfrag 107) +(def-tex hip-curtain hiphog-vis-tfrag 108) +(def-tex hip-map1 hiphog-vis-tfrag 109) +(def-tex hip-map4 hiphog-vis-tfrag 110) +(def-tex hip-map3 hiphog-vis-tfrag 111) +(def-tex hip-map2 hiphog-vis-tfrag 112) +(def-tex hip-crate-body hiphog-vis-tfrag 113) +(def-tex hip-gun-gray-02 hiphog-vis-tfrag 114) +(def-tex hip-gun-barrel-01 hiphog-vis-tfrag 115) +(def-tex hip-gun-gray-01 hiphog-vis-tfrag 116) +(def-tex hip-gun-leather hiphog-vis-tfrag 117) +(def-tex hip-gun-pump hiphog-vis-tfrag 118) +(def-tex hip-gun-main hiphog-vis-tfrag 119) +(def-tex common-black hiphog-vis-tfrag 120) +(def-tex hip-gun-magport hiphog-vis-tfrag 121) +(def-tex hip-gun-cover hiphog-vis-tfrag 122) +(def-tex hip-gun-barrel-alt hiphog-vis-tfrag 123) +(def-tex hip-gun-dark-mag hiphog-vis-tfrag 124) +(def-tex hip-carawing01 hiphog-vis-tfrag 125) +(def-tex gun-gunrack-01 hiphog-vis-tfrag 126) +(def-tex gun-gunrack-02 hiphog-vis-tfrag 127) +(def-tex hip-environment hiphog-vis-tfrag 128) +(def-tex bam-eyelight hiphog-vis-pris 0) +(def-tex bam-hairhilite hiphog-vis-pris 1) +(def-tex daxter-eyelid hiphog-vis-pris 2) +(def-tex daxter-furhilite hiphog-vis-pris 3) +(def-tex daxter-orange hiphog-vis-pris 4) +(def-tex daxterarm hiphog-vis-pris 5) +(def-tex daxterbodyshort-eix hiphog-vis-pris 6) +(def-tex daxterbolt hiphog-vis-pris 7) +(def-tex daxterear hiphog-vis-pris 8) +(def-tex daxterfinger hiphog-vis-pris 9) +(def-tex daxterfoot hiphog-vis-pris 10) +(def-tex daxterfoot-bottom hiphog-vis-pris 11) +(def-tex daxtergoggles hiphog-vis-pris 12) +(def-tex daxterheadwidenew hiphog-vis-pris 13) +(def-tex daxterhelmetplain hiphog-vis-pris 14) +(def-tex daxterlense hiphog-vis-pris 15) +(def-tex daxternose hiphog-vis-pris 16) +(def-tex daxterteeth hiphog-vis-pris 17) +(def-tex daxtertuft hiphog-vis-pris 18) +(def-tex environment-oldmetal hiphog-vis-pris 19) +(def-tex jakc-armor hiphog-vis-pris 20) +(def-tex jakc-chestplate-straps hiphog-vis-pris 21) +(def-tex jakc-gogglemetal hiphog-vis-pris 22) +(def-tex jakc-lens hiphog-vis-pris 23) +(def-tex jakc-scarf hiphog-vis-pris 24) +(def-tex jakc-scarfhanging hiphog-vis-pris 25) +(def-tex jakc-skirt hiphog-vis-pris 26) +(def-tex jakc-waistband2 hiphog-vis-pris 27) +(def-tex jakc-wraps hiphog-vis-pris 28) +(def-tex jakc-wristband-a2 hiphog-vis-pris 29) +(def-tex jakchires-arm hiphog-vis-pris 30) +(def-tex jakchires-blackstrap hiphog-vis-pris 31) +(def-tex jakchires-brownstrap hiphog-vis-pris 32) +(def-tex jakchires-brwnleather hiphog-vis-pris 33) +(def-tex jakchires-chestplate hiphog-vis-pris 34) +(def-tex jakchires-clips hiphog-vis-pris 35) +(def-tex jakchires-eye hiphog-vis-pris 36) +(def-tex jakchires-eyebrow hiphog-vis-pris 37) +(def-tex jakchires-eyelid hiphog-vis-pris 38) +(def-tex jakchires-facelft hiphog-vis-pris 39) +(def-tex jakchires-facert hiphog-vis-pris 40) +(def-tex jakchires-glovetop hiphog-vis-pris 41) +(def-tex jakchires-hair hiphog-vis-pris 42) +(def-tex jakchires-horn hiphog-vis-pris 43) +(def-tex jakchires-jacket hiphog-vis-pris 44) +(def-tex jakchires-leatherpouch hiphog-vis-pris 45) +(def-tex jakchires-lightbrownspat hiphog-vis-pris 46) +(def-tex jakchires-pants hiphog-vis-pris 47) +(def-tex jakchires-precarmor-01 hiphog-vis-pris 48) +(def-tex jakchires-shoebottom hiphog-vis-pris 49) +(def-tex jakchires-shoemetal hiphog-vis-pris 50) +(def-tex jakchires-shoeteop hiphog-vis-pris 51) +(def-tex jakchires-teeth hiphog-vis-pris 52) +(def-tex vehicle-brace-pipe-01 desbattl-pris 13) +(def-tex vehicle-cap-pin-01 desbattl-pris 14) +(def-tex vehicle-gun-box-01 desbattl-pris 15) +(def-tex vehicle-metal-01 desbattl-pris 16) +(def-tex vehicle-metal-plate-01 desbattl-pris 17) +(def-tex vehicle-rims-01 desbattl-pris 18) +(def-tex common-black desbattl-pris 19) +(def-tex mh-flyer-eye-01 desbattl-pris 20) +(def-tex mh-flyer-hose desbattl-pris 21) +(def-tex mh-flyer-leatherstrap-01 desbattl-pris 22) +(def-tex mh-flyer-metal-01 desbattl-pris 23) +(def-tex mh-flyer-seat-01 desbattl-pris 24) +(def-tex mh-flyer-seat-02 desbattl-pris 25) +(def-tex mh-flyer-skin-01 desbattl-pris 26) +(def-tex mh-flyer-skin-finger-01 desbattl-pris 27) +(def-tex mh-flyer-wing desbattl-pris 28) +(def-tex homing-missle-body desbattl-pris 29) +(def-tex homing-missle-body-tip desbattl-pris 30) +(def-tex homing-missle-exhaust desbattl-pris 31) +(def-tex homing-missle-fin-01 desbattl-pris 32) +(def-tex quantref-01 desbattl-pris 35) +(def-tex quantref-02 desbattl-pris 36) +(def-tex quantref-03 desbattl-pris 37) +(def-tex quantref-04 desbattl-pris 38) +(def-tex dust-cloud title-sprite 0) +(def-tex minb-spidweb-01 mineb-vis-water 0) +(def-tex minb-spidweb-02 mineb-vis-water 1) +(def-tex hemi-gradient-flames factoryb-vis-water 0) +(def-tex hemi-gradient-rim factoryb-vis-water 1) +(def-tex hemi-gradient-dest factoryb-vis-water 2) +(def-tex hemi-gradient-flames-dest factoryb-vis-water 3) +(def-tex fac-target-glass-01 factoryb-vis-water 4) +(def-tex common-black factoryb-vis-tfrag 0) +(def-tex facb_redmetal-02 factoryb-vis-tfrag 1) +(def-tex facb_redmetal-01 factoryb-vis-tfrag 2) +(def-tex fac-tower-door-03 factoryb-vis-tfrag 3) +(def-tex facb_temp_rust2 factoryb-vis-tfrag 4) +(def-tex facb-big-metal-panl04 factoryb-vis-tfrag 5) +(def-tex facb_blue-metal-02 factoryb-vis-tfrag 6) +(def-tex facb_redmetal-d-03 factoryb-vis-tfrag 7) +(def-tex fac-tower-base-03 factoryb-vis-tfrag 8) +(def-tex facb_redmetal-d-01b factoryb-vis-tfrag 9) +(def-tex fac-tower-06 factoryb-vis-tfrag 10) +(def-tex facb_dec-metal-03 factoryb-vis-tfrag 11) +(def-tex facb_blue-metal-03 factoryb-vis-tfrag 12) +(def-tex facb_temp_medium factoryb-vis-tfrag 13) +(def-tex facb_redmetal-d-01 factoryb-vis-tfrag 14) +(def-tex facb-beam01 factoryb-vis-tfrag 15) +(def-tex facb_temp_dark factoryb-vis-tfrag 16) +(def-tex facb-glass-01 factoryb-vis-tfrag 17) +(def-tex facb_blue-metal-01 factoryb-vis-tfrag 18) +(def-tex fac-tower-base-02 factoryb-vis-tfrag 19) +(def-tex facb-corrugate-01 factoryb-vis-tfrag 20) +(def-tex facb_dec-metal-02 factoryb-vis-tfrag 21) +(def-tex facb-bigpipe-01 factoryb-vis-tfrag 22) +(def-tex fac-tower-base-rim-03 factoryb-vis-tfrag 23) +(def-tex fac-tower-08 factoryb-vis-tfrag 24) +(def-tex fac-tower-base-rim-04 factoryb-vis-tfrag 25) +(def-tex fac-tower-panel-01 factoryb-vis-tfrag 26) +(def-tex fac-tower-base-rim-02 factoryb-vis-tfrag 27) +(def-tex fac-tower-door-01 factoryb-vis-tfrag 28) +(def-tex facb-big-metal-panl02 factoryb-vis-tfrag 29) +(def-tex fac-tower-pipe-01 factoryb-vis-tfrag 31) +(def-tex facb_redmetal-d-02 factoryb-vis-tfrag 32) +(def-tex fac-tower-base-04 factoryb-vis-tfrag 33) +(def-tex fac-tower-large-panel-02 factoryb-vis-tfrag 34) +(def-tex facb-spotlight factoryb-vis-tfrag 35) +(def-tex fac-tower-door-02 factoryb-vis-tfrag 36) +(def-tex facb-big-metal-panl01 factoryb-vis-tfrag 37) +(def-tex facb_dec-metal-01 factoryb-vis-tfrag 38) +(def-tex fac-tower-04 factoryb-vis-tfrag 40) +(def-tex fac-tower-01 factoryb-vis-tfrag 41) +(def-tex fac-tower-pipe-03 factoryb-vis-tfrag 42) +(def-tex fac-tower-large-panel-01 factoryb-vis-tfrag 43) +(def-tex fac-tower-09 factoryb-vis-tfrag 44) +(def-tex facb-light-01 factoryb-vis-tfrag 46) +(def-tex facb-metal-grill-01 factoryb-vis-tfrag 47) +(def-tex fac-tower-pipe-rim-01 factoryb-vis-tfrag 49) +(def-tex factory-base-01 factoryb-vis-tfrag 50) +(def-tex fac-tower-02 factoryb-vis-tfrag 51) +(def-tex fac-tower-broken-metal-02 factoryb-vis-tfrag 52) +(def-tex fac-tower-base-rim-01 factoryb-vis-tfrag 53) +(def-tex fac-tower-girder-01 factoryb-vis-tfrag 54) +(def-tex palace-break-rebar factoryb-vis-tfrag 55) +(def-tex fac-tower-pipe-02 factoryb-vis-tfrag 56) +(def-tex fac-tower-panel-02 factoryb-vis-tfrag 57) +(def-tex fac-tower-girder-02 factoryb-vis-tfrag 58) +(def-tex fac-tower-break-wall-01 factoryb-vis-tfrag 59) +(def-tex fac-tower-05 factoryb-vis-tfrag 60) +(def-tex fac-tower-03 factoryb-vis-tfrag 61) +(def-tex fac-tower-door-05 factoryb-vis-tfrag 62) +(def-tex fac-tower-door-04 factoryb-vis-tfrag 63) +(def-tex fac-tower-lens-01 factoryb-vis-tfrag 64) +(def-tex fac-tower-07 factoryb-vis-tfrag 65) +(def-tex facb_bluewindow_selfilluminated factoryb-vis-tfrag 66) +(def-tex facb_blue-metal-03-lotweak factoryb-vis-tfrag 67) +(def-tex fac-tower-base-02-hitweak factoryb-vis-tfrag 68) +(def-tex fac-tower-02-hitweak factoryb-vis-tfrag 69) +(def-tex fac-tower-door-03-hitweak factoryb-vis-tfrag 70) +(def-tex facb-beam01-hitweak factoryb-vis-tfrag 71) +(def-tex facb_redmetal-03 factoryb-vis-tfrag 72) +(def-tex fac-tower-pipe-02b factoryb-vis-tfrag 73) +(def-tex facb-bridgelights-01 factoryb-vis-alpha 0) +(def-tex facb-roadmarkings-01 factoryb-vis-alpha 1) +(def-tex common-black factoryb-vis-pris 0) +(def-tex fac-tower-08 factoryb-vis-pris 1) +(def-tex fac-tower-door-01 factoryb-vis-pris 2) +(def-tex fac-tower-door-04 factoryb-vis-pris 3) +(def-tex fac-tower-07 factoryb-vis-pris 10) +(def-tex fac-tower-panel-02 factoryb-vis-pris 16) +(def-tex fac-tower-base-03 factoryb-vis-pris 17) +(def-tex fac-tower-pipe-03 factoryb-vis-pris 18) +(def-tex fac-tower-pipe-rim-01 factoryb-vis-pris 19) +(def-tex fac-tower-base-rim-03 factoryb-vis-pris 45) +(def-tex fac-tower-base-rim-04 factoryb-vis-pris 46) +(def-tex fac-tower-pipe-01 factoryb-vis-pris 54) +(def-tex kgfighter-01 factoryb-vis-pris 58) +(def-tex kgfighter-02 factoryb-vis-pris 59) +(def-tex kgfighter-03 factoryb-vis-pris 60) +(def-tex kgfighter-05 factoryb-vis-pris 61) +(def-tex kgfighter-06 factoryb-vis-pris 62) +(def-tex kgfighter-07 factoryb-vis-pris 63) +(def-tex kgfighter-08 factoryb-vis-pris 64) +(def-tex kgfighter-09 factoryb-vis-pris 65) +(def-tex kgfighter-10 factoryb-vis-pris 66) +(def-tex kgfighter-11 factoryb-vis-pris 67) +(def-tex kgfighter-12 factoryb-vis-pris 68) +(def-tex kgfighter-13 factoryb-vis-pris 69) +(def-tex kgfighter-14 factoryb-vis-pris 70) +(def-tex kgfighter-lens-01 factoryb-vis-pris 71) +(def-tex kgfighter-lod02-cpit factoryb-vis-pris 72) +(def-tex kgfighter-lod02-side factoryb-vis-pris 73) +(def-tex kgfighter-lod02-tail factoryb-vis-pris 74) +(def-tex kgfighter-lod02-top factoryb-vis-pris 75) +(def-tex kgfighter-trim-01 factoryb-vis-pris 76) +(def-tex kgfighter-trim-02 factoryb-vis-pris 77) +(def-tex kgfighter-trim-03 factoryb-vis-pris 78) +(def-tex robotank-pipe-small-01 factoryb-vis-pris 80) +(def-tex robotank-tank-beige factoryb-vis-pris 81) +(def-tex robotank-tank-beige-logo factoryb-vis-pris 82) +(def-tex robotank-tank-blackstrip factoryb-vis-pris 83) +(def-tex robotank-tank-grey factoryb-vis-pris 84) +(def-tex robotank-tank-hubcap factoryb-vis-pris 85) +(def-tex robotank-tank-lod-top factoryb-vis-pris 86) +(def-tex robotank-tank-metal-plain factoryb-vis-pris 87) +(def-tex robotank-tank-red factoryb-vis-pris 88) +(def-tex robotank-tank-red-cap factoryb-vis-pris 89) +(def-tex robotank-tank-rim factoryb-vis-pris 90) +(def-tex robotank-tread-l-dest factoryb-vis-pris 91) +(def-tex robotank-tread-r-dest factoryb-vis-pris 92) +(def-tex bam-eyelight factoryb-vis-pris 109) +(def-tex bam-hairhilite factoryb-vis-pris 110) +(def-tex daxter-eyelid factoryb-vis-pris 111) +(def-tex daxter-furhilite factoryb-vis-pris 112) +(def-tex daxter-orange factoryb-vis-pris 113) +(def-tex daxterarm factoryb-vis-pris 114) +(def-tex daxterbodyshort-eix factoryb-vis-pris 115) +(def-tex daxterbolt factoryb-vis-pris 116) +(def-tex daxterear factoryb-vis-pris 117) +(def-tex daxterfinger factoryb-vis-pris 118) +(def-tex daxterfoot factoryb-vis-pris 119) +(def-tex daxterfoot-bottom factoryb-vis-pris 120) +(def-tex daxtergoggles factoryb-vis-pris 121) +(def-tex daxterheadwidenew factoryb-vis-pris 122) +(def-tex daxterhelmetplain factoryb-vis-pris 123) +(def-tex daxterlense factoryb-vis-pris 124) +(def-tex daxternose factoryb-vis-pris 125) +(def-tex daxterteeth factoryb-vis-pris 126) +(def-tex daxtertuft factoryb-vis-pris 127) +(def-tex environment-oldmetal factoryb-vis-pris 128) +(def-tex jakc-armor factoryb-vis-pris 129) +(def-tex jakc-chestplate-straps factoryb-vis-pris 130) +(def-tex jakc-gogglemetal factoryb-vis-pris 131) +(def-tex jakc-lens factoryb-vis-pris 132) +(def-tex jakc-scarf factoryb-vis-pris 133) +(def-tex jakc-scarfhanging factoryb-vis-pris 134) +(def-tex jakc-skirt factoryb-vis-pris 135) +(def-tex jakc-waistband2 factoryb-vis-pris 136) +(def-tex jakc-wraps factoryb-vis-pris 137) +(def-tex jakc-wristband-a2 factoryb-vis-pris 138) +(def-tex jakchires-arm factoryb-vis-pris 139) +(def-tex jakchires-blackstrap factoryb-vis-pris 140) +(def-tex jakchires-brownstrap factoryb-vis-pris 141) +(def-tex jakchires-brwnleather factoryb-vis-pris 142) +(def-tex jakchires-chestplate factoryb-vis-pris 143) +(def-tex jakchires-clips factoryb-vis-pris 144) +(def-tex jakchires-eye factoryb-vis-pris 145) +(def-tex jakchires-eyebrow factoryb-vis-pris 146) +(def-tex jakchires-eyelid factoryb-vis-pris 147) +(def-tex jakchires-facelft factoryb-vis-pris 148) +(def-tex jakchires-facert factoryb-vis-pris 149) +(def-tex jakchires-glovetop factoryb-vis-pris 150) +(def-tex jakchires-hair factoryb-vis-pris 151) +(def-tex jakchires-horn factoryb-vis-pris 152) +(def-tex jakchires-jacket factoryb-vis-pris 153) +(def-tex jakchires-leatherpouch factoryb-vis-pris 154) +(def-tex jakchires-lightbrownspat factoryb-vis-pris 155) +(def-tex jakchires-pants factoryb-vis-pris 156) +(def-tex jakchires-precarmor-01 factoryb-vis-pris 157) +(def-tex jakchires-shoebottom factoryb-vis-pris 158) +(def-tex jakchires-shoemetal factoryb-vis-pris 159) +(def-tex jakchires-shoeteop factoryb-vis-pris 160) +(def-tex jakchires-teeth factoryb-vis-pris 161) +(def-tex fac-target-redglow-01 factoryb-vis-pris 162) +(def-tex facb_blue-metal-02 factoryb-vis-pris 163) +(def-tex facb_dec-metal-02 factoryb-vis-pris 164) +(def-tex facb-big-metal-panl02 factoryb-vis-pris 165) +(def-tex hud-mhcentipede-01 lnstobb-minimap 0) +(def-tex hud-mhcentipede-meter-01 lnstobb-minimap 1) +(def-tex hud-small-frame-01 lnstobb-minimap 2) +(def-tex hud-small-frame-02 lnstobb-minimap 3) +(def-tex citwide-crimson-gold lctypatk-pris 0) +(def-tex citwide-crimson-light lctypatk-pris 1) +(def-tex citwide-crimson-red lctypatk-pris 2) +(def-tex citwide-crimson-tube lctypatk-pris 3) +(def-tex citwide-crimson-wall-plain lctypatk-pris 4) +(def-tex comm-centre-glow-02 deshover-tfrag 0) +(def-tex comm-centre-glow deshover-tfrag 1) +(def-tex comm-metal-01 deshover-tfrag 2) +(def-tex comm-hose-01 deshover-tfrag 3) +(def-tex comm-metal-02 deshover-tfrag 4) +(def-tex comm-metal-03 deshover-tfrag 5) +(def-tex sewer-metal-block-06 sewo-vis-tfrag 0) +(def-tex sewer-metal-block-04 sewo-vis-tfrag 1) +(def-tex sewer-pipe-rim-05 sewo-vis-tfrag 2) +(def-tex sewer-plate-05 sewo-vis-tfrag 3) +(def-tex sewer-hall-light-01 sewo-vis-tfrag 4) +(def-tex sewer-scaffold-01 sewo-vis-tfrag 5) +(def-tex sewer-concrete-edge-02 sewo-vis-tfrag 6) +(def-tex sewer-pipe-rim-05b sewo-vis-tfrag 7) +(def-tex sewer-metal-trim-02 sewo-vis-tfrag 8) +(def-tex sewer-lip-01 sewo-vis-tfrag 9) +(def-tex sewer-block-01 sewo-vis-tfrag 10) +(def-tex sewer-pipe-rim-10 sewo-vis-tfrag 11) +(def-tex sewer-brick-block-09 sewo-vis-tfrag 12) +(def-tex sewer-scaffold-02 sewo-vis-tfrag 13) +(def-tex sewer-nut-01 sewo-vis-tfrag 14) +(def-tex sewer-pipe-rim-07-hitweak sewo-vis-tfrag 15) +(def-tex common-black sewo-vis-tfrag 16) +(def-tex sewer-pipe-02 sewo-vis-tfrag 17) +(def-tex sewer-brick-block-11 sewo-vis-tfrag 18) +(def-tex sewer-brick-block-10 sewo-vis-tfrag 19) +(def-tex sewer-bolt-side-01 sewo-vis-tfrag 20) +(def-tex sewer-bolt-side-02 sewo-vis-tfrag 21) +(def-tex sewer-metal-trim-01 sewo-vis-tfrag 22) +(def-tex sewer-scaffold-03 sewo-vis-tfrag 23) +(def-tex sewer-metal-block-07 sewo-vis-tfrag 24) +(def-tex sewer-pipe-rim-06 sewo-vis-tfrag 25) +(def-tex sewer-pipe-01 sewo-vis-tfrag 26) +(def-tex sewer-pipe-02-edge-01 sewo-vis-tfrag 27) +(def-tex sewer-pipe-rim-01 sewo-vis-tfrag 28) +(def-tex sewer-round-03 sewo-vis-tfrag 29) +(def-tex sewer-round-02 sewo-vis-tfrag 30) +(def-tex sewer-stone-arch-01 sewo-vis-tfrag 31) +(def-tex sewer-metal-03 sewo-vis-tfrag 32) +(def-tex sewer-rubber-rim-01 sewo-vis-tfrag 33) +(def-tex sewer-pipe-small-02 sewo-vis-tfrag 34) +(def-tex sewer-pipe-rim-08 sewo-vis-tfrag 35) +(def-tex sewer-round-01 sewo-vis-tfrag 36) +(def-tex sewer-flat-pipe-01 sewo-vis-tfrag 37) +(def-tex sewer-metal-edge-01 sewo-vis-tfrag 38) +(def-tex sewer-pipe-rim-07 sewo-vis-tfrag 39) +(def-tex sewer-plate-06 sewo-vis-tfrag 40) +(def-tex sewer-plate-03-hitweak sewo-vis-tfrag 41) +(def-tex sewer-plate-04 sewo-vis-tfrag 42) +(def-tex sewer-big-brace-trim-01 sewo-vis-tfrag 43) +(def-tex sewer-big-brace-trim-02 sewo-vis-tfrag 44) +(def-tex sewer-plate-01 sewo-vis-tfrag 46) +(def-tex sewer-metal-block-02 sewo-vis-tfrag 47) +(def-tex sewer-small-light-01 sewo-vis-tfrag 48) +(def-tex sewer-pipe-rim-03 sewo-vis-tfrag 49) +(def-tex sewer-concrete-edge-01 sewo-vis-tfrag 50) +(def-tex sewer-metal-block-04-hitweak sewo-vis-tfrag 51) +(def-tex sewer-metal-block-01 sewo-vis-tfrag 52) +(def-tex sewer-plate-02 sewo-vis-tfrag 53) +(def-tex sewer-plate-03 sewo-vis-tfrag 54) +(def-tex strip-black sewo-vis-tfrag 55) +(def-tex sewer-pipe-rim-09 sewo-vis-tfrag 56) +(def-tex sewer-red-light-01 sewo-vis-tfrag 57) +(def-tex sewer-red-light-02 sewo-vis-tfrag 58) +(def-tex sewer-brick-roof-02 sewo-vis-tfrag 59) +(def-tex sewer-brick-roof-01 sewo-vis-tfrag 60) +(def-tex sewer-brick-roof-03 sewo-vis-tfrag 61) +(def-tex sewer-brick-roof-04 sewo-vis-tfrag 62) +(def-tex sewer-big-brace-01 sewo-vis-tfrag 63) +(def-tex sewer-big-brace-02 sewo-vis-tfrag 64) +(def-tex sewer-metal-floor-01 sewo-vis-tfrag 65) +(def-tex sewer-grate-01 sewo-vis-tfrag 66) +(def-tex sewer-block-02 sewo-vis-tfrag 67) +(def-tex sew-metal-floor-01 sewo-vis-tfrag 68) +(def-tex sewer-metal-block-05 sewo-vis-tfrag 69) +(def-tex sewer-grill-02 sewo-vis-tfrag 70) +(def-tex sewer-nut sewo-vis-shrub 0) +(def-tex sewer-pipe-small-01 sewo-vis-shrub 1) +(def-tex airlock-door-bolt sewo-vis-pris 0) +(def-tex airlock-door-cog sewo-vis-pris 1) +(def-tex airlock-door-main sewo-vis-pris 2) +(def-tex airlock-door-metal2 sewo-vis-pris 3) +(def-tex airlockl-door-metalframe sewo-vis-pris 4) +(def-tex airlock-door-cog1 sewo-vis-pris 5) +(def-tex grunt-eye-01 sewo-vis-pris 6) +(def-tex grunt-gem-01 sewo-vis-pris 7) +(def-tex grunt-metal-01 sewo-vis-pris 9) +(def-tex grunt-skin-02 sewo-vis-pris 11) +(def-tex grunt-skin-03 sewo-vis-pris 12) +(def-tex nwasp-eye-01 sewo-vis-pris 13) +(def-tex nwasp-gem-01 sewo-vis-pris 14) +(def-tex nwasp-hose sewo-vis-pris 15) +(def-tex nwasp-metal-01 sewo-vis-pris 16) +(def-tex nwasp-skin-01 sewo-vis-pris 17) +(def-tex nwasp-skin-02 sewo-vis-pris 18) +(def-tex nwasp-skin-03 sewo-vis-pris 19) +(def-tex holograph-env-noise deshover-warp 0) +(def-tex holograph-env-rim deshover-warp 1) +(def-tex holograph-env-scan deshover-warp 2) +(def-tex holograph-env-rim-dest deshover-warp 4) +(def-tex ctyslumc-overhang-02 lfacrm1-tfrag 0) +(def-tex ctyslumc-wall lfacrm1-tfrag 3) +(def-tex ctyslumc-wall-trim lfacrm1-tfrag 7) +(def-tex cityslumc-pinkish-purple lfacrm1-tfrag 8) +(def-tex cityslumc-metal-trim lfacrm1-tfrag 16) +(def-tex lfacrm-plate-01 lfacrm1-tfrag 17) +(def-tex lfacrm-plate-05 lfacrm1-tfrag 18) +(def-tex freehq-gray-metal-disc08 lfacrm1-tfrag 19) +(def-tex lfacrm-rivet-metal-01 lfacrm1-tfrag 20) +(def-tex lfacrm-rubber-01 lfacrm1-tfrag 21) +(def-tex lfacrm-yellow-metal-01 lfacrm1-tfrag 22) +(def-tex lfacrm-pbox-01 lfacrm1-tfrag 23) +(def-tex lfacrm-pbox-02 lfacrm1-tfrag 24) +(def-tex lfacrm-lens-01 lfacrm1-tfrag 25) +(def-tex lfacrm-oilcap-01 lfacrm1-tfrag 26) +(def-tex lfacrm-girder-01 lfacrm1-tfrag 27) +(def-tex lfacrm-yellow-metalrim-01 lfacrm1-tfrag 28) +(def-tex common-gray lfacrm1-tfrag 29) +(def-tex cityslumc-pipe lfacrm1-tfrag 31) +(def-tex ctyslumc-window-panes2 lfacrm1-tfrag 32) +(def-tex ctyslumc-light lfacrm1-tfrag 33) +(def-tex ctyslumc-overhang-01 lfacrm1-tfrag 34) +(def-tex freehq-gray-metal-disc01 lfacrm1-tfrag 35) +(def-tex common-black lfacrm1-tfrag 40) +(def-tex lfacrm-pipe-01 lfacrm1-tfrag 42) +(def-tex lfacrm-plate-04 lfacrm1-tfrag 43) +(def-tex lfacrm-box-01 lfacrm1-tfrag 44) +(def-tex lfacrm-metal-panel-08 lfacrm1-tfrag 45) +(def-tex lfacrm-starpanel-01 lfacrm1-tfrag 46) +(def-tex lfacrm-arches-01 lfacrm1-tfrag 47) +(def-tex lfacrm-tasphlt01 lfacrm1-tfrag 48) +(def-tex lfacrml-beam01 lfacrm1-tfrag 49) +(def-tex lfacrm-monitor-rim-04 lfacrm1-tfrag 50) +(def-tex lfacrm-rivet-01 lfacrm1-tfrag 51) +(def-tex lfacrm-panl02 lfacrm1-tfrag 52) +(def-tex lfacrm-wall-02 lfacrm1-tfrag 53) +(def-tex lfacrm-blue-light-02 lfacrm1-tfrag 54) +(def-tex lfacrm-monitor-rim-01 lfacrm1-tfrag 55) +(def-tex lfacrm-plate-06 lfacrm1-tfrag 56) +(def-tex lfacrm-trim-02 lfacrm1-tfrag 57) +(def-tex lfacrml-beam02 lfacrm1-tfrag 58) +(def-tex lfacrm-rivet-02 lfacrm1-tfrag 59) +(def-tex lfacrm-grill-01 lfacrm1-tfrag 60) +(def-tex lfacrm-roof-03 lfacrm1-tfrag 61) +(def-tex lfacrm-monitor-rim-03 lfacrm1-tfrag 62) +(def-tex lfacrm-smallpipe lfacrm1-tfrag 63) +(def-tex lfacrm-grill-02 lfacrm1-tfrag 64) +(def-tex lfacrm-yellowstripe lfacrm1-tfrag 65) +(def-tex lfacrm-wall-01 lfacrm1-tfrag 66) +(def-tex lfacrm-blue-light-01 lfacrm1-tfrag 67) +(def-tex lfacrm-brace-pipe-01 lfacrm1-tfrag 68) +(def-tex lfacrm-chrome-pipe-01 lfacrm1-tfrag 69) +(def-tex lfacrm-floor-01 lfacrm1-tfrag 70) +(def-tex lfacrm-red-light-01 lfacrm1-tfrag 71) +(def-tex lfacrm-monitor-rim-02 lfacrm1-tfrag 72) +(def-tex lfacrm-wall-circuit lfacrm1-tfrag 73) +(def-tex lfacrm-plate-05-bridge lfacrm1-tfrag 74) +(def-tex lfacrm-ind-wall-base-07 lfacrm1-tfrag 75) +(def-tex lfacrm-gar-dumpster-01 lfacrm1-tfrag 76) +(def-tex lfacrm-gar-dumpster-02 lfacrm1-tfrag 77) +(def-tex lfacrm-gar-dumpster-03 lfacrm1-tfrag 78) +(def-tex vola-lava-rock-01 volcanox-tfrag 0) +(def-tex vola-grass-floor-01 volcanox-tfrag 1) +(def-tex vola-rock-top volcanox-tfrag 2) +(def-tex vola-rock-side volcanox-tfrag 3) +(def-tex vola-grass-blob volcanox-tfrag 5) +(def-tex vol-ladder-wood volcanox-tfrag 6) +(def-tex vola-rock-side-wall volcanox-tfrag 7) +(def-tex vola-vine volcanox-tfrag 10) +(def-tex vola-grass-fringe-05-HI volcanox-tfrag 15) +(def-tex temple_sandstone_taper01 volcanox-tfrag 16) +(def-tex temple_sandstone_plat01 volcanox-tfrag 17) +(def-tex temple_sandstone_trim02 volcanox-tfrag 18) +(def-tex vol-bark-burnt volcanox-tfrag 19) +(def-tex warpgate-circuitpattern2 volcanox-tfrag 20) +(def-tex warpgate-precursormetal volcanox-tfrag 21) +(def-tex warpgate-post-01 volcanox-tfrag 22) +(def-tex common_sandstone_taper01 volcanox-tfrag 23) +(def-tex common_sandstone_ground01 volcanox-tfrag 24) +(def-tex common_sandstone_trim01 volcanox-tfrag 25) +(def-tex common_sandstone_base01 volcanox-tfrag 26) +(def-tex minc-light volcanox-tfrag 27) +(def-tex minc-platfrom-metal-01 volcanox-tfrag 28) +(def-tex palcab-lowres-background-hills-01 lfaccity-tfrag 0) +(def-tex strip-metal-02-lores lfaccity-tfrag 1) +(def-tex palcab-lowres-ctywide-wall-01 lfaccity-tfrag 2) +(def-tex palcab-lowres-background-crater-bottom-enviro lfaccity-tfrag 3) +(def-tex palcab-lowres-background-rocksnow2 lfaccity-tfrag 4) +(def-tex palcab-lowres-background-rocksnow lfaccity-tfrag 5) +(def-tex palcab-lowres-ctywide-wall-02 lfaccity-tfrag 6) +(def-tex palcab-lowres-ctyslum-ground lfaccity-tfrag 7) +(def-tex palcab-lowres-ctyslum-roof-03 lfaccity-tfrag 8) +(def-tex palcab-lowres-ctyslum-roof-01 lfaccity-tfrag 9) +(def-tex palcab-lowres-ctyslum-wall-01 lfaccity-tfrag 10) +(def-tex palcab-lowres-ctyslum-wall-02 lfaccity-tfrag 11) +(def-tex palcab-lowres-ctyslum-roof-02 lfaccity-tfrag 12) +(def-tex palcab-lowres-ctyslum-wall-04 lfaccity-tfrag 13) +(def-tex palcab-lowres-ctyslum-wall-03 lfaccity-tfrag 14) +(def-tex palcab-pipe-hoze lfaccity-tfrag 15) +(def-tex palcab-lowres-mark-roof-02 lfaccity-tfrag 16) +(def-tex city-lowres-ind-wall-04 lfaccity-tfrag 17) +(def-tex palcab-steel-lores lfaccity-tfrag 18) +(def-tex palcab-lowres-stadium-canopy lfaccity-tfrag 19) +(def-tex city-lowres-ind-wall-02 lfaccity-tfrag 20) +(def-tex city-lowres-fort-yellow lfaccity-tfrag 21) +(def-tex city-lowres-fort-red lfaccity-tfrag 22) +(def-tex palcab-lowres-mark-roof-01 lfaccity-tfrag 23) +(def-tex city-lowres-ind-wall-01 lfaccity-tfrag 25) +(def-tex city-lowres-port-roof lfaccity-tfrag 26) +(def-tex city-lowres-ind-wall-03 lfaccity-tfrag 27) +(def-tex city-lowres-ind-wall-07 lfaccity-tfrag 28) +(def-tex city-lowres-ind-wall-08 lfaccity-tfrag 29) +(def-tex city-lowres-ind-wall-05 lfaccity-tfrag 30) +(def-tex city-lowres-ind-wall-06 lfaccity-tfrag 31) +(def-tex palcab-lowres-mark-roof-rim-01 lfaccity-tfrag 32) +(def-tex palcab-lowres-mark-shops-01 lfaccity-tfrag 33) +(def-tex palcab-lowres-mark-awning-green lfaccity-tfrag 34) +(def-tex palcab-lowres-mark-awning-red lfaccity-tfrag 35) +(def-tex city-lowres-ctygen-side-02 lfaccity-tfrag 36) +(def-tex city-lowres-ctygen-stripe-01 lfaccity-tfrag 37) +(def-tex city-lowres-ctygen-roof-02 lfaccity-tfrag 38) +(def-tex city-lowres-ctygen-build-01 lfaccity-tfrag 39) +(def-tex palcab-lowres-mark-highway lfaccity-tfrag 40) +(def-tex city-lowres-ctygen-build-02 lfaccity-tfrag 41) +(def-tex city-lowres-ctygen-side-01 lfaccity-tfrag 42) +(def-tex city-lowres-ctygen-build-03 lfaccity-tfrag 43) +(def-tex city-lowres-ctygen-build-05 lfaccity-tfrag 44) +(def-tex city-lowres-ctygen-build-04 lfaccity-tfrag 45) +(def-tex city-lowres-ctygen-roof-01 lfaccity-tfrag 46) +(def-tex city-lowres-ctygen-stripe-02 lfaccity-tfrag 47) +(def-tex palcab-lorez-metal03 lfaccity-tfrag 48) +(def-tex palcab-lorez-metal01 lfaccity-tfrag 49) +(def-tex palcab-lorez-metal02 lfaccity-tfrag 50) +(def-tex t-citywide-met-strp01 lfaccity-tfrag 52) +(def-tex t-citywide-red-met-01 lfaccity-tfrag 53) +(def-tex t-citywide-met-strp02 lfaccity-tfrag 54) +(def-tex t-citywide-met-pill-01 lfaccity-tfrag 55) +(def-tex t-citywide-met-wall-02 lfaccity-tfrag 56) +(def-tex t-palshaft-plate01 lfaccity-tfrag 57) +(def-tex palcab-lowres-background-mount-build-01 lfaccity-tfrag 58) +(def-tex palcab-lowres-background-mount-build-02 lfaccity-tfrag 59) +(def-tex palcab-lowres-background-mount-build-03 lfaccity-tfrag 60) +(def-tex t-strip-lo-palsup-panel-1 lfaccity-tfrag 62) +(def-tex t-strip-lo-palsup-panel-2 lfaccity-tfrag 63) +(def-tex t-strip-lo-palsup-panel-3 lfaccity-tfrag 64) +(def-tex t-strip-lo-palsup-panel-4 lfaccity-tfrag 65) +(def-tex t-strip-lo-palsup-panel-5 lfaccity-tfrag 66) +(def-tex t-strip-lo-palsup-danger1 lfaccity-tfrag 67) +(def-tex t-strip-lo-palsup-danger2 lfaccity-tfrag 68) +(def-tex city-lowres-newslums-stripe-02 lfaccity-tfrag 69) +(def-tex city-lowres-newslums-bigwindows-02 lfaccity-tfrag 70) +(def-tex city-lowres-newslums-stripe-01 lfaccity-tfrag 71) +(def-tex city-lowres-damaged-01 lfaccity-tfrag 72) +(def-tex t-citywide-wall-tile-01 lfaccity-tfrag 73) +(def-tex palcab-lowres-farm-wall lfaccity-tfrag 74) +(def-tex palcab-lowres-farm-wall-top lfaccity-tfrag 75) +(def-tex t-palshaft-roof-01 lfaccity-tfrag 76) +(def-tex palace-break-girder01 lfaccity-tfrag 77) +(def-tex citywide-palace-01 lfaccity-tfrag 78) +(def-tex citywide-hangmetal lfaccity-tfrag 79) +(def-tex city-lowres-mhcity-wall-02 lfaccity-tfrag 80) +(def-tex city-lowres-mhcity-wall-01 lfaccity-tfrag 81) +(def-tex city-lowres-mhcity-detower-01 lfaccity-tfrag 82) +(def-tex city-lowres-mhcity-detower-02 lfaccity-tfrag 83) +(def-tex palcab-lowres-background-mountains-02 lfaccity-tfrag 84) +(def-tex city-lowres-mhcity-wall-06 lfaccity-tfrag 85) +(def-tex city-lowres-mhcity-wall-05 lfaccity-tfrag 86) +(def-tex common-black lfaccity-tfrag 87) +(def-tex city-lowres-mhcity-wall-03 lfaccity-tfrag 88) +(def-tex palcab-swingp-base-lores lfaccity-tfrag 89) +(def-tex palcab-lowres-background-trees-edge lfaccity-tfrag 90) +(def-tex palcab-lowres-background-trees2 lfaccity-tfrag 91) +(def-tex palcab-lowres-background-desert-01 lfaccity-tfrag 94) +(def-tex tcab-beam01 lfaccity-tfrag 95) +(def-tex tcab-plat-edg-01-lores lfaccity-tfrag 96) +(def-tex ctyp-metal-01 lfaccity-tfrag 97) +(def-tex palcab-wall-lores lfaccity-tfrag 98) +(def-tex palcab-lowres-stadium-grass lfaccity-tfrag 99) +(def-tex palace-break-brokenwall lfaccity-tfrag 100) +(def-tex citywide-consite-steel lfaccity-tfrag 101) +(def-tex t-palshaft-panl-01 lfaccity-tfrag 102) +(def-tex palcab-lowres-background-strip lfaccity-tfrag 103) +(def-tex city-lowres-mhcity-ground-01 lfaccity-tfrag 104) +(def-tex t-palshaft-r-strp-plate01 lfaccity-tfrag 105) +(def-tex tcab-beam01-lores lfaccity-tfrag 106) +(def-tex t-palshaft-pil-01 lfaccity-tfrag 108) +(def-tex ctywide-ox-met-01 lfaccity-tfrag 109) +(def-tex city-lowres-mhcity-tower-02 lfaccity-tfrag 110) +(def-tex city-lowres-mhcity-tower-01 lfaccity-tfrag 111) +(def-tex tcab-blue-ring-01 lfaccity-tfrag 112) +(def-tex palcab-swingp-trim lfaccity-tfrag 113) +(def-tex palcab-lowres-background-shoreline-01 lfaccity-tfrag 114) +(def-tex palcab-lowres-background-mounatin-window lfaccity-tfrag 115) +(def-tex palcab-lowres-background-hilltops-01 lfaccity-tfrag 116) +(def-tex palcab-lowres-background-desert-to-shore lfaccity-tfrag 117) +(def-tex palcab-lowres-background-crater-01 lfaccity-tfrag 118) +(def-tex palcab-lowres-background-peaks-01 lfaccity-tfrag 119) +(def-tex palcab-lowres-background-mountains lfaccity-tfrag 120) +(def-tex palcab-lowres-background-grass-to-desert-02 lfaccity-tfrag 121) +(def-tex palcab-lowres-background-grass-to-desert-01 lfaccity-tfrag 122) +(def-tex palcab-lowres-background-shoreline-02 lfaccity-tfrag 123) +(def-tex palcab-smallpipe-lores lfaccity-tfrag 124) +(def-tex palcab-lowres-background-peaks-02 lfaccity-tfrag 125) +(def-tex palcab-lorez-metal01-red lfaccity-tfrag 126) +(def-tex palcab-lorez-metal01-red-stripe lfaccity-tfrag 127) +(def-tex palcab-lorez-asphalt01 lfaccity-tfrag 128) +(def-tex palcab-lorez-plates01 lfaccity-tfrag 129) +(def-tex palcab-lorez-plates-red-stripe01 lfaccity-tfrag 130) +(def-tex rub-palace-tower-side lfaccity-tfrag 131) +(def-tex palcab-lowres-background-shoreline-02 lfaccity-alpha 0) +(def-tex palcab-lowres-background-crater-rim lfaccity-alpha 1) +(def-tex palcab-lowres-background-trees-edge lfaccity-alpha 2) +(def-tex palcab-lowres-background-trees2 lfaccity-alpha 3) +(def-tex palcab-lowres-ctyslum-wall-03 lfaccity-alpha 4) +(def-tex wascity-awning waswide-vis-shrub 8) +(def-tex wascity-cactus-tall waswide-vis-shrub 9) +(def-tex wascity-cactus-flower waswide-vis-shrub 10) +(def-tex wascity-cactus-tall-base waswide-vis-shrub 11) +(def-tex des-burn-eye-off waswide-vis-shrub 12) +(def-tex des-burn-eye-on waswide-vis-shrub 13) +(def-tex des-burn-precursor-01 waswide-vis-shrub 14) +(def-tex des-burn-precursor-01-bottom waswide-vis-shrub 15) +(def-tex des-burn-precursor-head-01 waswide-vis-shrub 16) +(def-tex wascity-ground-01 waswide-vis-shrub 17) +(def-tex bam-eyelight freecast-pris 0) +(def-tex bam-hairhilite freecast-pris 1) +(def-tex environment-oldmetal freecast-pris 2) +(def-tex keira-bellylong freecast-pris 3) +(def-tex keira-belt freecast-pris 4) +(def-tex keira-blackstrap freecast-pris 5) +(def-tex keira-brownstraps-new freecast-pris 6) +(def-tex keira-chokerhighres freecast-pris 7) +(def-tex keira-chokermetal freecast-pris 8) +(def-tex keira-eyelid freecast-pris 9) +(def-tex keira-face freecast-pris 10) +(def-tex keira-glasses freecast-pris 11) +(def-tex keira-glovenewlarge freecast-pris 12) +(def-tex keira-gogglestrap freecast-pris 13) +(def-tex keira-hair-newest freecast-pris 14) +(def-tex keira-handbottom freecast-pris 15) +(def-tex keira-handtop freecast-pris 16) +(def-tex keira-iris-64x64 freecast-pris 17) +(def-tex keira-largewraps freecast-pris 18) +(def-tex keira-lens-large freecast-pris 19) +(def-tex keira-maskbolt freecast-pris 20) +(def-tex keira-pantslarge freecast-pris 21) +(def-tex keira-shirt freecast-pris 22) +(def-tex keira-shoebottom freecast-pris 23) +(def-tex keira-torch-guard-01 freecast-pris 24) +(def-tex keira-torch-nozzle-01 freecast-pris 25) +(def-tex keira-torch-nozzle-02 freecast-pris 26) +(def-tex onin-arm freecast-pris 27) +(def-tex onin-bowlhead freecast-pris 28) +(def-tex onin-braclet freecast-pris 29) +(def-tex onin-chain freecast-pris 30) +(def-tex onin-eye freecast-pris 31) +(def-tex onin-eyelid freecast-pris 32) +(def-tex onin-face freecast-pris 33) +(def-tex onin-finger freecast-pris 34) +(def-tex onin-hair freecast-pris 35) +(def-tex onin-hand freecast-pris 36) +(def-tex onin-handpalm freecast-pris 37) +(def-tex onin-idol freecast-pris 38) +(def-tex onin-idoleye freecast-pris 39) +(def-tex onin-mat freecast-pris 40) +(def-tex onin-neck freecast-pris 41) +(def-tex onin-rings freecast-pris 42) +(def-tex onin-rings2 freecast-pris 43) +(def-tex onin-scarf freecast-pris 44) +(def-tex onin-shirt freecast-pris 45) +(def-tex onin-skirt freecast-pris 46) +(def-tex onin-teeth freecast-pris 47) +(def-tex onin-toe freecast-pris 48) +(def-tex pecker-body-01 freecast-pris 49) +(def-tex pecker-eyelid freecast-pris 50) +(def-tex pecker-face freecast-pris 51) +(def-tex pecker-plume freecast-pris 52) +(def-tex pecker-tail freecast-pris 53) +(def-tex pecker-teeth freecast-pris 54) +(def-tex pecker-wingbottom freecast-pris 55) +(def-tex pecker-wingtop freecast-pris 56) +(def-tex pecker-yellowfur freecast-pris 57) +(def-tex environment-title freecast-pris 58) +(def-tex gun-eye freecast-pris 59) +(def-tex gun-main freecast-pris 60) +(def-tex gun-teeth freecast-pris 61) +(def-tex gun-tip freecast-pris 62) +(def-tex gun-yellow-mag-end freecast-pris 63) +(def-tex gun-yellowgreen freecast-pris 64) +(def-tex jakc-armor freecast-pris 65) +(def-tex talkbox-light-02 freecast-pris 66) +(def-tex bam-eyelight freecast-pris2 0) +(def-tex bam-hairhilite freecast-pris2 1) +(def-tex environment-oldmetal freecast-pris2 2) +(def-tex samos-arm freecast-pris2 3) +(def-tex samos-diaper freecast-pris2 4) +(def-tex samos-ear freecast-pris2 5) +(def-tex samos-eye freecast-pris2 6) +(def-tex samos-eyelid freecast-pris2 7) +(def-tex samos-face freecast-pris2 8) +(def-tex samos-finger-01 freecast-pris2 9) +(def-tex samos-hair freecast-pris2 10) +(def-tex samos-helmet freecast-pris2 11) +(def-tex samos-leaf freecast-pris2 12) +(def-tex samos-lens freecast-pris2 13) +(def-tex samos-log-01 freecast-pris2 14) +(def-tex samos-log-02 freecast-pris2 15) +(def-tex samos-log-03 freecast-pris2 16) +(def-tex samos-metal freecast-pris2 17) +(def-tex samos-strap freecast-pris2 18) +(def-tex samos-teeth2 freecast-pris2 19) +(def-tex samos-vest freecast-pris2 20) +(def-tex samosbird-beak freecast-pris2 21) +(def-tex samosbird-body freecast-pris2 22) +(def-tex samosbird-eye freecast-pris2 23) +(def-tex samosbird-plume freecast-pris2 24) +(def-tex samosbird-wing freecast-pris2 25) +(def-tex veger-bookleather freecast-pris2 26) +(def-tex veger-booksides freecast-pris2 27) +(def-tex veger-bookspine freecast-pris2 28) +(def-tex veger-bootbolt freecast-pris2 29) +(def-tex veger-bootfoot freecast-pris2 30) +(def-tex veger-bootstrap freecast-pris2 31) +(def-tex veger-coat freecast-pris2 32) +(def-tex veger-coatbelt freecast-pris2 33) +(def-tex veger-coatclips freecast-pris2 34) +(def-tex veger-endpaper freecast-pris2 35) +(def-tex veger-eyelid freecast-pris2 36) +(def-tex veger-face freecast-pris2 37) +(def-tex veger-fingerbottom freecast-pris2 38) +(def-tex veger-fingertop freecast-pris2 39) +(def-tex veger-gold freecast-pris2 40) +(def-tex veger-hair freecast-pris2 41) +(def-tex veger-hand freecast-pris2 42) +(def-tex veger-iris freecast-pris2 43) +(def-tex veger-legwraps freecast-pris2 44) +(def-tex veger-pages freecast-pris2 45) +(def-tex veger-pants freecast-pris2 46) +(def-tex veger-parchment freecast-pris2 47) +(def-tex veger-scarf freecast-pris2 48) +(def-tex veger-shoebottom freecast-pris2 49) +(def-tex veger-shoulderplate freecast-pris2 50) +(def-tex veger-shoulderplatemetal freecast-pris2 51) +(def-tex veger-sleeve freecast-pris2 52) +(def-tex veger-sleevelower freecast-pris2 53) +(def-tex veger-stickwrap freecast-pris2 54) +(def-tex veger-teeth freecast-pris2 55) +(def-tex veger-vest freecast-pris2 56) +(def-tex veger-walkingstick-01 freecast-pris2 57) +(def-tex veger-walkingstick-02 freecast-pris2 58) +(def-tex veger-walkingstick-03 freecast-pris2 59) +(def-tex veger-whitecloth freecast-pris2 60) +(def-tex ashelin-beltbuckle freecast-pris2 61) +(def-tex ashelin-bolts freecast-pris2 62) +(def-tex ashelin-boottop freecast-pris2 63) +(def-tex ashelin-brownstrap freecast-pris2 64) +(def-tex ashelin-cglogo freecast-pris2 65) +(def-tex ashelin-cgrank freecast-pris2 66) +(def-tex ashelin-chest freecast-pris2 67) +(def-tex ashelin-eye freecast-pris2 68) +(def-tex ashelin-eyebrow freecast-pris2 69) +(def-tex ashelin-eyelid freecast-pris2 70) +(def-tex ashelin-face freecast-pris2 71) +(def-tex ashelin-glove freecast-pris2 72) +(def-tex ashelin-gunbarrel-01 freecast-pris2 73) +(def-tex ashelin-gunbarrel-02 freecast-pris2 74) +(def-tex ashelin-gunbarrel-03 freecast-pris2 75) +(def-tex ashelin-gunholster freecast-pris2 76) +(def-tex ashelin-hair freecast-pris2 77) +(def-tex ashelin-handle-01 freecast-pris2 78) +(def-tex ashelin-jacketbody freecast-pris2 79) +(def-tex ashelin-jacketsleeve freecast-pris2 80) +(def-tex ashelin-jacketstraps freecast-pris2 81) +(def-tex ashelin-pantstop freecast-pris2 82) +(def-tex ashelin-redtop freecast-pris2 83) +(def-tex ashelin-shells freecast-pris2 84) +(def-tex ashelin-shield freecast-pris2 85) +(def-tex ashelin-shoebottom freecast-pris2 86) +(def-tex ashelin-shoemetal freecast-pris2 87) +(def-tex ashelin-teeth freecast-pris2 88) +(def-tex ashelin-whitestrap freecast-pris2 89) +(def-tex keira-mask freecast-water 0) +(def-tex sewer-water-highlight-01-n sewn-vis-water 0) +(def-tex sewer-water-still-01-n sewn-vis-water 1) +(def-tex sewer-waterfall-02-n sewn-vis-water 2) +(def-tex sewer-water-wave-01-n sewn-vis-water 3) +(def-tex sewer-waterfall-01-n sewn-vis-water 4) +(def-tex sewer-waterfall-02-n-dest sewn-vis-water 5) +(def-tex sewer-water-still-01-n-dest sewn-vis-water 6) +(def-tex sewer-water-wave-01-n-dest sewn-vis-water 8) +(def-tex sewer-waterfall-01-n-dest sewn-vis-water 9) +(def-tex sewer-brick-block-01 sewn-vis-tfrag 0) +(def-tex sewer-brick-roof-01-mipping sewn-vis-tfrag 1) +(def-tex sewer-brick-block-11 sewn-vis-tfrag 2) +(def-tex sewer-brick-block-10 sewn-vis-tfrag 3) +(def-tex sewer-brick-block-02 sewn-vis-tfrag 4) +(def-tex sewer-brick-block-04 sewn-vis-tfrag 5) +(def-tex sewer-block-01 sewn-vis-tfrag 6) +(def-tex sewer-block-02-hitweak sewn-vis-tfrag 7) +(def-tex sewer-stone-newarch-01 sewn-vis-tfrag 8) +(def-tex sewer-brick-block-11-hitweak sewn-vis-tfrag 9) +(def-tex sewer-brick-block-10-hitweak sewn-vis-tfrag 10) +(def-tex sewer-small-light-01 sewn-vis-tfrag 11) +(def-tex sewer-pipe-rim-08 sewn-vis-tfrag 12) +(def-tex sewer-stone-newarch-01-lotweak sewn-vis-tfrag 13) +(def-tex sewer-stone-crack-01 sewn-vis-tfrag 14) +(def-tex sewer-block-02 sewn-vis-tfrag 15) +(def-tex sewer-stone-crack-01-hitweak sewn-vis-tfrag 16) +(def-tex sewer-metal-trim-02 sewn-vis-tfrag 17) +(def-tex sewer-lip-01 sewn-vis-tfrag 18) +(def-tex sewer-pillar-01 sewn-vis-tfrag 19) +(def-tex sewer-metal-02 sewn-vis-tfrag 20) +(def-tex sewer-brick-roof-03 sewn-vis-tfrag 21) +(def-tex sewer-mantel-01 sewn-vis-tfrag 22) +(def-tex sewer-stone-crack-02 sewn-vis-tfrag 23) +(def-tex sewer-brick-roof-01 sewn-vis-tfrag 24) +(def-tex sewer-concrete-block-02 sewn-vis-tfrag 25) +(def-tex sewer-stone-arch-02 sewn-vis-tfrag 26) +(def-tex sewer-stone-arch-01 sewn-vis-tfrag 27) +(def-tex sewer-metal-block-04 sewn-vis-tfrag 28) +(def-tex sewer-hall-light-01 sewn-vis-tfrag 29) +(def-tex sewer-brick-wall-01 sewn-vis-tfrag 30) +(def-tex sewer-block-03-hitweak sewn-vis-tfrag 31) +(def-tex sewer-stone-crack-03 sewn-vis-tfrag 32) +(def-tex sewer-mantel-02 sewn-vis-tfrag 33) +(def-tex sewer-black sewn-vis-tfrag 34) +(def-tex sewer-plate-05 sewn-vis-tfrag 36) +(def-tex sewer-scaffold-01 sewn-vis-tfrag 37) +(def-tex sewer-scaffold-02 sewn-vis-tfrag 38) +(def-tex sewer-pipe-rim-10 sewn-vis-tfrag 39) +(def-tex sewer-stone-arch-02-hitweak sewn-vis-tfrag 40) +(def-tex sewer-brick-roof-06 sewn-vis-tfrag 41) +(def-tex sewer-nut-01 sewn-vis-tfrag 42) +(def-tex sewer-pipe-rim-07 sewn-vis-tfrag 43) +(def-tex sewer-pipe-01 sewn-vis-tfrag 44) +(def-tex sewer-metal-floor-01 sewn-vis-tfrag 45) +(def-tex sewer-plate-02 sewn-vis-tfrag 46) +(def-tex sewer-pipe-02 sewn-vis-tfrag 47) +(def-tex sewer-pipe-rim-05b sewn-vis-tfrag 48) +(def-tex sewer-plate-03 sewn-vis-tfrag 49) +(def-tex strip-black sewn-vis-tfrag 50) +(def-tex sewer-grindpipe sewn-vis-tfrag 51) +(def-tex sewer-grate-01 sewn-vis-tfrag 52) +(def-tex sewer-metal-block-06 sewn-vis-tfrag 53) +(def-tex sewer-big-brace-trim-02 sewn-vis-tfrag 54) +(def-tex sewer-round-03 sewn-vis-tfrag 87) +(def-tex sewer-round-02 sewn-vis-tfrag 88) +(def-tex sewer-round-01 sewn-vis-tfrag 89) +(def-tex sewer-pipe-small-01 sewn-vis-shrub 0) +(def-tex airlock-door-bolt sewn-vis-pris 0) +(def-tex airlock-door-cog sewn-vis-pris 1) +(def-tex airlock-door-cog1 sewn-vis-pris 2) +(def-tex airlock-door-main sewn-vis-pris 3) +(def-tex airlock-door-metal2 sewn-vis-pris 4) +(def-tex airlockl-door-metalframe sewn-vis-pris 5) +(def-tex sew-fan-basetop sewn-vis-pris 6) +(def-tex sew-fan-canopy sewn-vis-pris 7) +(def-tex sew-gun-drum-01 sewn-vis-pris 8) +(def-tex sew-gun-rim-04 sewn-vis-pris 9) +(def-tex sew-laserturret-pole sewn-vis-pris 10) +(def-tex sew-saw-lens sewn-vis-pris 11) +(def-tex sew-saw-part2 sewn-vis-pris 12) +(def-tex sewer-metal-01 sewn-vis-pris 13) +(def-tex sewer-metal-block-04 sewn-vis-pris 14) +(def-tex sewer-metal-floor-02 sewn-vis-pris 15) +(def-tex sewer-pipe-rim-07 sewn-vis-pris 16) +(def-tex sewer-plate-04 sewn-vis-pris 17) +(def-tex sewer-plate-05 sewn-vis-pris 18) +(def-tex sewer-screw-02 sewn-vis-pris 19) +(def-tex grunt-eye-01 sewn-vis-pris 27) +(def-tex grunt-gem-01 sewn-vis-pris 28) +(def-tex grunt-hose sewn-vis-pris 29) +(def-tex grunt-metal-01 sewn-vis-pris 30) +(def-tex grunt-skin-01 sewn-vis-pris 31) +(def-tex grunt-skin-02 sewn-vis-pris 32) +(def-tex grunt-skin-03 sewn-vis-pris 33) +(def-tex grunt-teeth-01 sewn-vis-pris 34) +(def-tex rub-greyblue-plain-lowres stadiumb-vis-shrub 5) +(def-tex rub-beam-gen stadiumb-vis-shrub 6) +(def-tex rub-wall-small-grill stadiumb-vis-shrub 7) +(def-tex rub-met-strp-close stadiumb-vis-shrub 8) +(def-tex rub-blotch-withstreaks-01 stadiumb-vis-shrub 9) +(def-tex rub-stain-02 stadiumb-vis-shrub 10) +(def-tex rub-overlay-bullethole-b stadiumb-vis-shrub 11) +(def-tex rub-overlay-bullethole-c stadiumb-vis-shrub 12) +(def-tex rub-overlay-bullethole-a stadiumb-vis-shrub 13) +(def-tex rub-scorch stadiumb-vis-shrub 14) +(def-tex rub-statue-stone-01 stadiumb-vis-shrub 15) +(def-tex rub-rubble-01 stadiumb-vis-shrub 16) +(def-tex rub-coil-support stadiumb-vis-shrub 17) +(def-tex rub-ground-01-small stadiumb-vis-shrub 18) +(def-tex rub-crater-shards-01 stadiumb-vis-shrub 19) +(def-tex dp-text-01 wasseem-sprite 0) +(def-tex dp-text-02 wasseem-sprite 1) +(def-tex dp-text-03 wasseem-sprite 2) +(def-tex dp-text-04 wasseem-sprite 3) +(def-tex dp-text-05 wasseem-sprite 4) +(def-tex dp-text-06 wasseem-sprite 5) +(def-tex dp-text-07 wasseem-sprite 6) +(def-tex dp-text-08 wasseem-sprite 7) +(def-tex dp-text-09 wasseem-sprite 8) +(def-tex dp-text-10 wasseem-sprite 9) +(def-tex dp-text-11 wasseem-sprite 10) +(def-tex dp-text-12 wasseem-sprite 11) +(def-tex dp-text-13 wasseem-sprite 12) +(def-tex dp-text-14 wasseem-sprite 13) +(def-tex dp-text-15 wasseem-sprite 14) +(def-tex dp-text-16 wasseem-sprite 15) +(def-tex bam-eyelight lpatkcs-pris 0) +(def-tex bam-hairhilite lpatkcs-pris 1) +(def-tex daxter-eyelid lpatkcs-pris 2) +(def-tex daxter-furhilite lpatkcs-pris 3) +(def-tex daxter-orange lpatkcs-pris 4) +(def-tex daxterarm lpatkcs-pris 5) +(def-tex daxterbodyshort-eix lpatkcs-pris 6) +(def-tex daxterbolt lpatkcs-pris 7) +(def-tex daxterear lpatkcs-pris 8) +(def-tex daxterfinger lpatkcs-pris 9) +(def-tex daxterfoot lpatkcs-pris 10) +(def-tex daxterfoot-bottom lpatkcs-pris 11) +(def-tex daxtergoggles lpatkcs-pris 12) +(def-tex daxterheadwidenew lpatkcs-pris 13) +(def-tex daxterhelmetplain lpatkcs-pris 14) +(def-tex daxterlense lpatkcs-pris 15) +(def-tex daxternose lpatkcs-pris 16) +(def-tex daxterteeth lpatkcs-pris 17) +(def-tex daxtertuft lpatkcs-pris 18) +(def-tex des-beast-brown-tube deshover-pris2 0) +(def-tex des-beast-eye deshover-pris2 1) +(def-tex des-beast-feet deshover-pris2 2) +(def-tex des-beast-gunend deshover-pris2 3) +(def-tex des-beast-leg deshover-pris2 4) +(def-tex des-beast-metal-01 deshover-pris2 5) +(def-tex des-beast-metal-02 deshover-pris2 6) +(def-tex des-beast-metal-cap deshover-pris2 7) +(def-tex des-beast-metal-riveting deshover-pris2 8) +(def-tex des-beast-metal-teeth deshover-pris2 9) +(def-tex des-beast-mouth deshover-pris2 10) +(def-tex des-beast-nails deshover-pris2 11) +(def-tex des-beast-skin deshover-pris2 12) +(def-tex vol-shrub-grass volcanox-shrub 0) +(def-tex vol-metal-01 volcanox-shrub 1) +(def-tex vola-shrub-leaf volcanox-shrub 4) +(def-tex fora-shrub-pebbles volcanox-shrub 5) +(def-tex vola-small-rock-sides volcanox-shrub 6) +(def-tex vola-grass-floor-01 volcanox-shrub 7) +(def-tex vol-bark-burnt volcanox-shrub 10) +(def-tex des-sand-grass-01 deserth-vis-shrub 0) +(def-tex des-shrub-pebbles deserth-vis-shrub 1) +(def-tex des-rock-shrub-01 deserth-vis-shrub 3) +(def-tex hologram-lines deshover-sprite 1) +(def-tex holostatic-01 deshover-sprite 2) +(def-tex holostatic-02 deshover-sprite 3) +(def-tex holostatic-03 deshover-sprite 4) +(def-tex holostatic-04 deshover-sprite 5) +(def-tex mhcity-eggskin lctydest-pris 5) +(def-tex mhcity-floor-brace-02 lctydest-pris 6) +(def-tex mhcity-puffer-mid-01 lctydest-pris 7) +(def-tex mhcity-puffer-top-01 lctydest-pris 8) +(def-tex mhcity-vein-01 lctydest-pris 14) +(def-tex mhcity-grunt-egg-horns-01 lctydest-pris 17) +(def-tex mhcity-grunt-egg-metal-01 lctydest-pris 18) +(def-tex mhcity-de-tower-egg-inside lctydest-pris 22) +(def-tex mhcity-bubble lctydest-pris 23) +(def-tex bam-eyelight ltnjxhip-pris2 0) +(def-tex bam-hairhilite ltnjxhip-pris2 1) +(def-tex environment-oldmetal ltnjxhip-pris2 2) +(def-tex jinx-arm ltnjxhip-pris2 3) +(def-tex jinx-belt ltnjxhip-pris2 4) +(def-tex jinx-blademetal ltnjxhip-pris2 5) +(def-tex jinx-boottoe ltnjxhip-pris2 6) +(def-tex jinx-boottop ltnjxhip-pris2 7) +(def-tex jinx-brownstrap ltnjxhip-pris2 8) +(def-tex jinx-brownstrapbolts ltnjxhip-pris2 9) +(def-tex jinx-buckles ltnjxhip-pris2 10) +(def-tex jinx-cigar ltnjxhip-pris2 11) +(def-tex jinx-cigarflame ltnjxhip-pris2 12) +(def-tex jinx-eyelid ltnjxhip-pris2 13) +(def-tex jinx-face ltnjxhip-pris2 14) +(def-tex jinx-finger ltnjxhip-pris2 15) +(def-tex jinx-glove ltnjxhip-pris2 16) +(def-tex jinx-glovepalm ltnjxhip-pris2 17) +(def-tex jinx-hair ltnjxhip-pris2 18) +(def-tex jinx-hairtye ltnjxhip-pris2 19) +(def-tex jinx-handle ltnjxhip-pris2 20) +(def-tex jinx-iris ltnjxhip-pris2 21) +(def-tex jinx-kneepad ltnjxhip-pris2 22) +(def-tex jinx-pants ltnjxhip-pris2 23) +(def-tex jinx-rope-01 ltnjxhip-pris2 24) +(def-tex jinx-scarf ltnjxhip-pris2 25) +(def-tex jinx-shirt ltnjxhip-pris2 26) +(def-tex jinx-shoebottom2 ltnjxhip-pris2 27) +(def-tex jinx-singlerope ltnjxhip-pris2 28) +(def-tex jinx-teeth ltnjxhip-pris2 29) +(def-tex jinx-wraps ltnjxhip-pris2 30) +(def-tex charHOLD ltnjxhip-pris2 31) +(def-tex torn-armlft ltnjxhip-pris2 32) +(def-tex torn-armor ltnjxhip-pris2 33) +(def-tex torn-belt ltnjxhip-pris2 34) +(def-tex torn-belt2 ltnjxhip-pris2 35) +(def-tex torn-blademetal ltnjxhip-pris2 36) +(def-tex torn-ear ltnjxhip-pris2 37) +(def-tex torn-eye ltnjxhip-pris2 38) +(def-tex torn-eyelid ltnjxhip-pris2 39) +(def-tex torn-face ltnjxhip-pris2 40) +(def-tex torn-face-right ltnjxhip-pris2 41) +(def-tex torn-finger ltnjxhip-pris2 42) +(def-tex torn-footleather ltnjxhip-pris2 43) +(def-tex torn-gunbarrel ltnjxhip-pris2 44) +(def-tex torn-gunbarrel-02 ltnjxhip-pris2 45) +(def-tex torn-hair-01 ltnjxhip-pris2 46) +(def-tex torn-hair-02 ltnjxhip-pris2 47) +(def-tex torn-handle-01 ltnjxhip-pris2 48) +(def-tex torn-legshield ltnjxhip-pris2 49) +(def-tex torn-metal2 ltnjxhip-pris2 50) +(def-tex torn-mouth ltnjxhip-pris2 51) +(def-tex torn-pipe ltnjxhip-pris2 52) +(def-tex torn-scarf ltnjxhip-pris2 53) +(def-tex torn-shoe ltnjxhip-pris2 54) +(def-tex torn-shoe-02 ltnjxhip-pris2 55) +(def-tex torn-teeth-01 ltnjxhip-pris2 56) +(def-tex torn-vest ltnjxhip-pris2 57) +(def-tex gun-main ltnjxhip-pris 0) +(def-tex environment-oldmetal ltnjxhip-pris 1) +(def-tex sig2-gem-01 ltnjxhip-pris 2) +(def-tex sig2-gun-01 ltnjxhip-pris 3) +(def-tex sig2-gun-02 ltnjxhip-pris 4) +(def-tex sig2-gun-03 ltnjxhip-pris 5) +(def-tex sig2-gun-04 ltnjxhip-pris 6) +(def-tex sig2-metal-01 ltnjxhip-pris 7) +(def-tex sig2-shoulderarmor ltnjxhip-pris 8) +(def-tex lava-drop-01 volcanoa-sprite 0) +(def-tex lava-drop-02 volcanoa-sprite 1) +(def-tex lava-drop-03 volcanoa-sprite 2) +(def-tex lava-drop-04 volcanoa-sprite 3) +(def-tex lava-bubble volcanoa-sprite 5) +(def-tex forest-leaf volcanoa-sprite 6) +(def-tex forest-leaf2 volcanoa-sprite 7) +(def-tex forest-leaf3 volcanoa-sprite 8) +(def-tex forest-leaf4 volcanoa-sprite 9) +(def-tex rub-metal-01 rubblec-vis-tfrag 0) +(def-tex rub-blue-paint-rust04 rubblec-vis-tfrag 1) +(def-tex rub-rubble-01 rubblec-vis-tfrag 7) +(def-tex rub-dirt-a rubblec-vis-tfrag 53) +(def-tex rub-copper-metal-01 rubblec-vis-tfrag 54) +(def-tex rub-statue-stone-01 rubblec-vis-tfrag 55) +(def-tex rub-wall-gen-03 rubblec-vis-tfrag 56) +(def-tex rub-beam-gen rubblec-vis-tfrag 57) +(def-tex rub-metal-flatpipe-01 rubblec-vis-tfrag 58) +(def-tex rub-wall-side-beam-02 rubblec-vis-tfrag 60) +(def-tex rub-palace-tower-side rubblec-vis-tfrag 61) +(def-tex rub-city-wall-inside-damaged rubblec-vis-tfrag 62) +(def-tex rub-panels-01 rubblec-vis-tfrag 63) +(def-tex rub-met-strp-close rubblec-vis-tfrag 64) +(def-tex rub-wall-trim rubblec-vis-tfrag 65) +(def-tex rub-wall-gen-01 rubblec-vis-tfrag 66) +(def-tex rub-ground rubblec-vis-tfrag 67) +(def-tex rub-stad-brick rubblec-vis-tfrag 71) +(def-tex rub-wall-gen-04 rubblec-vis-tfrag 72) +(def-tex rub-wall-gen-02 rubblec-vis-tfrag 73) +(def-tex ctypal-wall-tile-01 rubblec-vis-tfrag 78) +(def-tex t-citypal-small-block-01 rubblec-vis-tfrag 79) +(def-tex t-citypal-red-met-01 rubblec-vis-tfrag 80) +(def-tex rub-window-01 rubblec-vis-tfrag 84) +(def-tex rub-wall-side-beam rubblec-vis-tfrag 85) +(def-tex rub-wall-gen-05 rubblec-vis-tfrag 86) +(def-tex rub-wall-gen-06 rubblec-vis-tfrag 87) +(def-tex rub-roof-tile rubblec-vis-tfrag 88) +(def-tex rub-window-02 rubblec-vis-tfrag 92) +(def-tex rub-cement-a rubblec-vis-tfrag 93) +(def-tex rub-palshaft-dirt-blue-01 rubblec-vis-tfrag 100) +(def-tex rub-metal-pipeside-01 rubblec-vis-tfrag 101) +(def-tex ctyn-top-bevel-small-bottom rubblec-vis-tfrag 102) +(def-tex ctyn-black-wall-lower-01 rubblec-vis-tfrag 103) +(def-tex ctyn-wall-2 rubblec-vis-tfrag 104) +(def-tex ctyn-brown-red rubblec-vis-tfrag 105) +(def-tex rub-wall-small-grill rubblec-vis-tfrag 106) +(def-tex ctyn-beams rubblec-vis-tfrag 107) +(def-tex rub-marble-floor-01-hitweak rubblec-vis-tfrag 109) +(def-tex rub-cement-broken-end rubblec-vis-tfrag 110) +(def-tex rub-copper-metal-02 rubblec-vis-tfrag 111) +(def-tex rub-stream-rocks rubblec-vis-tfrag 114) +(def-tex rub-stad-brick-pieces rubblec-vis-tfrag 115) +(def-tex rub-city-wall-frame rubblec-vis-tfrag 116) +(def-tex stdm-grass rubblec-vis-tfrag 122) +(def-tex stdm-trim-02 rubblec-vis-tfrag 131) +(def-tex rub-endblocks rubblec-vis-tfrag 143) +(def-tex rub-butress-metal-02 rubblec-vis-tfrag 144) +(def-tex rub-lamp-fencespike-round rubblec-vis-tfrag 145) +(def-tex rub-lamp-light-01 rubblec-vis-tfrag 146) +(def-tex rub-beam-gen-hole rubblec-vis-tfrag 147) +(def-tex rub-elec-switch-light-off rubblec-vis-tfrag 148) +(def-tex rub-elec-switch-light-on rubblec-vis-tfrag 149) +(def-tex rub-door-metal-frame rubblec-vis-tfrag 154) +(def-tex rub-door-metal rubblec-vis-tfrag 155) +(def-tex rub-met-strp-close rubblec-vis-shrub 5) +(def-tex rub-greyblue-plain-lowres rubblec-vis-shrub 6) +(def-tex rub-beam-gen rubblec-vis-shrub 7) +(def-tex rub-wall-small-grill rubblec-vis-shrub 8) +(def-tex rub-crater-shards-01 rubblec-vis-shrub 14) +(def-tex rub-ground-01-small rubblec-vis-shrub 15) +(def-tex rub-stain-01 rubblec-vis-shrub 17) +(def-tex rub-blotch-withstreaks-01 rubblec-vis-shrub 18) +(def-tex rub-overlay-bullethole-c rubblec-vis-shrub 19) +(def-tex rub-scorch rubblec-vis-shrub 21) +(def-tex rub-waterc rubblec-vis-water 3) +(def-tex rub-water-destc rubblec-vis-water 4) +(def-tex rub-metal-01 rubbleb-vis-tfrag 0) +(def-tex rub-blue-paint-rust04 rubbleb-vis-tfrag 1) +(def-tex rub-rubble-01 rubbleb-vis-tfrag 7) +(def-tex rub-statue-stone-01 rubbleb-vis-tfrag 83) +(def-tex rub-copper-metal-01 rubbleb-vis-tfrag 85) +(def-tex rub-dirt-a rubbleb-vis-tfrag 88) +(def-tex rub-wall-gen-03 rubbleb-vis-tfrag 90) +(def-tex rub-beam-gen rubbleb-vis-tfrag 91) +(def-tex rub-metal-flatpipe-01 rubbleb-vis-tfrag 92) +(def-tex rub-pal-red rubbleb-vis-tfrag 93) +(def-tex rub-palace-tower-side rubbleb-vis-tfrag 94) +(def-tex rub-met-strp-close rubbleb-vis-tfrag 95) +(def-tex rub-panels-01 rubbleb-vis-tfrag 96) +(def-tex rub-wall-gen-04 rubbleb-vis-tfrag 97) +(def-tex rub-wall-gen-02 rubbleb-vis-tfrag 98) +(def-tex rub-wall-side-beam-02 rubbleb-vis-tfrag 99) +(def-tex rub-wall-trim rubbleb-vis-tfrag 100) +(def-tex rub-wall-gen-01 rubbleb-vis-tfrag 101) +(def-tex rub-wall-side-beam rubbleb-vis-tfrag 102) +(def-tex rub-roof-tile rubbleb-vis-tfrag 103) +(def-tex rub-window-01 rubbleb-vis-tfrag 104) +(def-tex rub-city-wall-inside-damaged rubbleb-vis-tfrag 105) +(def-tex rub-window-02 rubbleb-vis-tfrag 110) +(def-tex rub-wall-gen-05 rubbleb-vis-tfrag 111) +(def-tex rub-wall-small-grill rubbleb-vis-tfrag 112) +(def-tex rub-cement-a rubbleb-vis-tfrag 113) +(def-tex rub-wall-gen-06 rubbleb-vis-tfrag 114) +(def-tex rub-stad-brick rubbleb-vis-tfrag 119) +(def-tex rub-ground rubbleb-vis-tfrag 120) +(def-tex rub-greyblue-plain-lowres rubbleb-vis-tfrag 124) +(def-tex rub-marble-floor-01-hitweak rubbleb-vis-tfrag 125) +(def-tex rub-copper-metal-02 rubbleb-vis-tfrag 126) +(def-tex rub-cement-broken-end rubbleb-vis-tfrag 127) +(def-tex rub-stream-rocks rubbleb-vis-tfrag 133) +(def-tex rub-blastdoors rubbleb-vis-tfrag 135) +(def-tex rub-stad-brick-pieces rubbleb-vis-tfrag 136) +(def-tex rub-city-wall-frame rubbleb-vis-tfrag 137) +(def-tex rub-endblocks rubbleb-vis-tfrag 143) +(def-tex rub-butress-metal-02 rubbleb-vis-tfrag 146) +(def-tex rub-pal-metal rubbleb-vis-tfrag 153) +(def-tex rub-pal-metal-trim rubbleb-vis-tfrag 154) +(def-tex rub-pal-pillar rubbleb-vis-tfrag 155) +(def-tex rub-pal-glass rubbleb-vis-tfrag 156) +(def-tex rub-palshaft-dirt-blue-01 rubbleb-vis-tfrag 157) +(def-tex rub-metal-pipeside-01 rubbleb-vis-tfrag 158) +(def-tex rub-lamp-fencespike-round rubbleb-vis-tfrag 166) +(def-tex rub-lamp-light-01 rubbleb-vis-tfrag 167) +(def-tex rub-beam-gen-hole rubbleb-vis-tfrag 168) +(def-tex rub-elec-switch-light-on rubbleb-vis-tfrag 169) +(def-tex rub-elec-switch-light-off rubbleb-vis-tfrag 170) +(def-tex rub-door-metal-frame rubbleb-vis-tfrag 175) +(def-tex rub-door-metal rubbleb-vis-tfrag 176) +(def-tex rub-met-strp-close rubbleb-vis-shrub 10) +(def-tex rub-greyblue-plain-lowres rubbleb-vis-shrub 11) +(def-tex rub-beam-gen rubbleb-vis-shrub 12) +(def-tex rub-wall-small-grill rubbleb-vis-shrub 13) +(def-tex ctyn-stain-wall-01 rubbleb-vis-shrub 14) +(def-tex rub-crater-shards-01 rubbleb-vis-shrub 15) +(def-tex rub-ground-01-small rubbleb-vis-shrub 16) +(def-tex rub-stain-01 rubbleb-vis-shrub 22) +(def-tex rub-blotch-withstreaks-01 rubbleb-vis-shrub 23) +(def-tex rub-waterb rubbleb-vis-water 2) +(def-tex rub-water-destb rubbleb-vis-water 3) +(def-tex security-dot-dest rubbleb-vis-water 4) +(def-tex security-env-dest rubbleb-vis-water 5) +(def-tex rub-metal-01 rubblea-vis-tfrag 0) +(def-tex rub-blue-paint-rust04 rubblea-vis-tfrag 1) +(def-tex rub-rubble-01 rubblea-vis-tfrag 7) +(def-tex rub-stream-rocks rubblea-vis-tfrag 72) +(def-tex rub-dirt-a rubblea-vis-tfrag 74) +(def-tex rub-wall-gen-03 rubblea-vis-tfrag 75) +(def-tex rub-beam-gen rubblea-vis-tfrag 76) +(def-tex rub-metal-flatpipe-01 rubblea-vis-tfrag 77) +(def-tex rub-pal-red rubblea-vis-tfrag 78) +(def-tex rub-wall-side-beam-02 rubblea-vis-tfrag 79) +(def-tex rub-city-wall-inside-damaged rubblea-vis-tfrag 80) +(def-tex rub-palace-tower-side rubblea-vis-tfrag 81) +(def-tex rub-wall-trim rubblea-vis-tfrag 82) +(def-tex rub-panels-01 rubblea-vis-tfrag 83) +(def-tex rub-wall-gen-04 rubblea-vis-tfrag 84) +(def-tex rub-wall-gen-02 rubblea-vis-tfrag 85) +(def-tex rub-met-strp-close rubblea-vis-tfrag 86) +(def-tex rub-wall-gen-01 rubblea-vis-tfrag 87) +(def-tex rub-greyblue-plain-lowres rubblea-vis-tfrag 88) +(def-tex rub-window-02 rubblea-vis-tfrag 92) +(def-tex rub-wall-gen-05 rubblea-vis-tfrag 93) +(def-tex rub-ground rubblea-vis-tfrag 94) +(def-tex rub-statue-stone-01 rubblea-vis-tfrag 95) +(def-tex rub-wall-side-beam rubblea-vis-tfrag 96) +(def-tex rub-wall-small-grill rubblea-vis-tfrag 97) +(def-tex rub-window-01 rubblea-vis-tfrag 98) +(def-tex rub-wall-gen-06 rubblea-vis-tfrag 99) +(def-tex rub-palshaft-dirt-blue-01 rubblea-vis-tfrag 100) +(def-tex rub-metal-pipeside-01 rubblea-vis-tfrag 101) +(def-tex rub-roof-tile rubblea-vis-tfrag 102) +(def-tex rub-cement-a rubblea-vis-tfrag 103) +(def-tex rub-citywall rubblea-vis-tfrag 104) +(def-tex rub-pal-metal rubblea-vis-tfrag 105) +(def-tex rub-pal-metal-trim rubblea-vis-tfrag 106) +(def-tex rub-pal-pillar rubblea-vis-tfrag 107) +(def-tex rub-pal-glass rubblea-vis-tfrag 108) +(def-tex rub-stad-brick rubblea-vis-tfrag 109) +(def-tex rub-marble-floor-01-hitweak rubblea-vis-tfrag 110) +(def-tex rub-copper-metal-02 rubblea-vis-tfrag 111) +(def-tex rub-cement-broken-end rubblea-vis-tfrag 112) +(def-tex rub-endblocks rubblea-vis-tfrag 115) +(def-tex rub-blastdoors rubblea-vis-tfrag 122) +(def-tex rub-stad-brick-pieces rubblea-vis-tfrag 123) +(def-tex rub-lamp-fencespike-round rubblea-vis-tfrag 124) +(def-tex rub-lamp-light-01 rubblea-vis-tfrag 125) +(def-tex rub-door-metal-frame rubblea-vis-tfrag 138) +(def-tex rub-door-metal rubblea-vis-tfrag 139) +(def-tex rub-cement-top rubblea-vis-tfrag 140) +(def-tex rub-greyblue-plain-lowres rubblea-vis-shrub 9) +(def-tex rub-beam-gen rubblea-vis-shrub 10) +(def-tex rub-wall-small-grill rubblea-vis-shrub 11) +(def-tex rub-met-strp-close rubblea-vis-shrub 12) +(def-tex rub-scorch rubblea-vis-shrub 13) +(def-tex rub-crater-shards-01 rubblea-vis-shrub 14) +(def-tex rub-ground-01-small rubblea-vis-shrub 15) +(def-tex intcept-tread01 rubblea-vis-pris 4) +(def-tex rhino-horn-02 rubblea-vis-pris 8) +(def-tex rhino-wheel-01 rubblea-vis-pris 12) +(def-tex vehicle-wheel-01 rubblea-vis-pris 36) +(def-tex bam-eyelight rubblea-vis-pris 39) +(def-tex pecker-body-01 rubblea-vis-pris 40) +(def-tex pecker-eyelid rubblea-vis-pris 41) +(def-tex pecker-face rubblea-vis-pris 42) +(def-tex pecker-plume rubblea-vis-pris 43) +(def-tex pecker-tail rubblea-vis-pris 44) +(def-tex pecker-teeth rubblea-vis-pris 45) +(def-tex pecker-wingbottom rubblea-vis-pris 46) +(def-tex pecker-wingtop rubblea-vis-pris 47) +(def-tex pecker-yellowfur rubblea-vis-pris 48) +(def-tex bam-hairhilite rubblea-vis-pris 49) +(def-tex daxter-eyelid rubblea-vis-pris 50) +(def-tex daxter-furhilite rubblea-vis-pris 51) +(def-tex daxter-orange rubblea-vis-pris 52) +(def-tex daxterarm rubblea-vis-pris 53) +(def-tex daxterbodyshort-eix rubblea-vis-pris 54) +(def-tex daxterbolt rubblea-vis-pris 55) +(def-tex daxterear rubblea-vis-pris 56) +(def-tex daxterfinger rubblea-vis-pris 57) +(def-tex daxterfoot rubblea-vis-pris 58) +(def-tex daxterfoot-bottom rubblea-vis-pris 59) +(def-tex daxtergoggles rubblea-vis-pris 60) +(def-tex daxterheadwidenew rubblea-vis-pris 61) +(def-tex daxterhelmetplain rubblea-vis-pris 62) +(def-tex daxterlense rubblea-vis-pris 63) +(def-tex daxternose rubblea-vis-pris 64) +(def-tex daxterteeth rubblea-vis-pris 65) +(def-tex daxtertuft rubblea-vis-pris 66) +(def-tex environment-darkprec rubblea-vis-pris 121) +(def-tex dk-sat-cable-01 rubblea-vis-pris 122) +(def-tex dk-sat-cable-02 rubblea-vis-pris 123) +(def-tex dk-sat-cable-03 rubblea-vis-pris 124) +(def-tex dk-sat-claw-01 rubblea-vis-pris 125) +(def-tex dk-sat-panel-01 rubblea-vis-pris 126) +(def-tex dk-sat-rim-01 rubblea-vis-pris 127) +(def-tex dk-sat-rim-02 rubblea-vis-pris 128) +(def-tex dk-sat-rim-03 rubblea-vis-pris 129) +(def-tex dk-sat-rim-bright-01 rubblea-vis-pris 130) +(def-tex dk-sat-screen-01 rubblea-vis-pris 131) +(def-tex dk-sat-screen-rim-01 rubblea-vis-pris 132) +(def-tex dk-sat-shell-01 rubblea-vis-pris 133) +(def-tex dk-sat-rim-lod-01 rubblea-vis-pris 134) +(def-tex dk-sat-shell-lod-01 rubblea-vis-pris 135) +(def-tex lfacrm-hangar-edge-01 lfacrm1-pris 1) +(def-tex lfacrm-hangar-panel-01 lfacrm1-pris 2) +(def-tex lfacrm-hangar-panel-02 lfacrm1-pris 3) +(def-tex lfacrm-hangar-panel-rim-01 lfacrm1-pris 4) +(def-tex lfacrm-hangar-tooth-01 lfacrm1-pris 5) +(def-tex bam-eyelight lseemwca-pris2 0) +(def-tex environment-oldmetal lseemwca-pris2 1) +(def-tex seem-arm lseemwca-pris2 2) +(def-tex seem-bootbottom lseemwca-pris2 3) +(def-tex seem-bootleg lseemwca-pris2 4) +(def-tex seem-bootlower lseemwca-pris2 5) +(def-tex seem-bootmet lseemwca-pris2 6) +(def-tex seem-boottoe lseemwca-pris2 7) +(def-tex seem-ear lseemwca-pris2 8) +(def-tex seem-eye lseemwca-pris2 9) +(def-tex seem-eyelid lseemwca-pris2 10) +(def-tex seem-face lseemwca-pris2 11) +(def-tex seem-finger lseemwca-pris2 12) +(def-tex seem-hand lseemwca-pris2 13) +(def-tex seem-headgearback lseemwca-pris2 14) +(def-tex seem-headpiecetop lseemwca-pris2 15) +(def-tex seem-pipeend lseemwca-pris2 16) +(def-tex seem-pipes-01 lseemwca-pris2 17) +(def-tex seem-pipes-02 lseemwca-pris2 18) +(def-tex seem-precmetal-chestplate-01 lseemwca-pris2 19) +(def-tex seem-precmetal-edge lseemwca-pris2 20) +(def-tex seem-precmetal-plain lseemwca-pris2 21) +(def-tex seem-skirt lseemwca-pris2 22) +(def-tex seem-skirt-small lseemwca-pris2 23) +(def-tex seem-straps lseemwca-pris2 24) +(def-tex seem-teeth lseemwca-pris2 25) +(def-tex seem-uppertorso lseemwca-pris2 26) +(def-tex inner lctysnpr-pris 7) +(def-tex mid lctysnpr-pris 8) +(def-tex outer lctysnpr-pris 9) +(def-tex sewer-metal-floor-01 lctysnpr-pris 10) +(def-tex sewer-pipe-rim-07 lctysnpr-pris 11) +(def-tex sewer-plate-02 lctysnpr-pris 12) +(def-tex sewer-plate-05 lctysnpr-pris 13) +(def-tex sewer-screw-02 lctysnpr-pris 14) +(def-tex bam-eyelight citycast-pris 0) +(def-tex bam-hairhilite citycast-pris 1) +(def-tex daxter-eyelid citycast-pris 2) +(def-tex daxter-furhilite citycast-pris 3) +(def-tex daxter-orange citycast-pris 4) +(def-tex daxterarm citycast-pris 5) +(def-tex daxterbodyshort-eix citycast-pris 6) +(def-tex daxterbolt citycast-pris 7) +(def-tex daxterear citycast-pris 8) +(def-tex daxterfinger citycast-pris 9) +(def-tex daxterfoot citycast-pris 10) +(def-tex daxterfoot-bottom citycast-pris 11) +(def-tex daxtergoggles citycast-pris 12) +(def-tex daxterheadwidenew citycast-pris 13) +(def-tex daxterhelmetplain citycast-pris 14) +(def-tex daxterlense citycast-pris 15) +(def-tex daxternose citycast-pris 16) +(def-tex daxterteeth citycast-pris 17) +(def-tex daxtertuft citycast-pris 18) +(def-tex environment-oldmetal citycast-pris 19) +(def-tex jakc-armor citycast-pris 20) +(def-tex jakc-chestplate-straps citycast-pris 21) +(def-tex jakc-gogglemetal citycast-pris 22) +(def-tex jakc-lens citycast-pris 23) +(def-tex jakc-scarf citycast-pris 24) +(def-tex jakc-scarfhanging citycast-pris 25) +(def-tex jakc-skirt citycast-pris 26) +(def-tex jakc-waistband2 citycast-pris 27) +(def-tex jakc-wraps citycast-pris 28) +(def-tex jakc-wristband-a2 citycast-pris 29) +(def-tex jakchires-arm citycast-pris 30) +(def-tex jakchires-blackstrap citycast-pris 31) +(def-tex jakchires-brownstrap citycast-pris 32) +(def-tex jakchires-brwnleather citycast-pris 33) +(def-tex jakchires-chestplate citycast-pris 34) +(def-tex jakchires-clips citycast-pris 35) +(def-tex jakchires-eye citycast-pris 36) +(def-tex jakchires-eyebrow citycast-pris 37) +(def-tex jakchires-eyelid citycast-pris 38) +(def-tex jakchires-facelft citycast-pris 39) +(def-tex jakchires-facert citycast-pris 40) +(def-tex jakchires-glovetop citycast-pris 41) +(def-tex jakchires-hair citycast-pris 42) +(def-tex jakchires-horn citycast-pris 43) +(def-tex jakchires-jacket citycast-pris 44) +(def-tex jakchires-leatherpouch citycast-pris 45) +(def-tex jakchires-lightbrownspat citycast-pris 46) +(def-tex jakchires-pants citycast-pris 47) +(def-tex jakchires-precarmor-01 citycast-pris 48) +(def-tex jakchires-shoebottom citycast-pris 49) +(def-tex jakchires-shoemetal citycast-pris 50) +(def-tex jakchires-shoeteop citycast-pris 51) +(def-tex jakchires-teeth citycast-pris 52) +(def-tex flatgerydark01 citycast-pris 54) +(def-tex palm-speaker citycast-pris 55) +(def-tex yellowcard01 citycast-pris 56) +(def-tex bam-eyelight citycast-pris2 0) +(def-tex bam-hairhilite citycast-pris2 1) +(def-tex charHOLD citycast-pris2 2) +(def-tex torn-armlft citycast-pris2 3) +(def-tex torn-armor citycast-pris2 4) +(def-tex torn-belt citycast-pris2 5) +(def-tex torn-belt2 citycast-pris2 6) +(def-tex torn-blademetal citycast-pris2 7) +(def-tex torn-ear citycast-pris2 8) +(def-tex torn-eye citycast-pris2 9) +(def-tex torn-eyelid citycast-pris2 10) +(def-tex torn-face citycast-pris2 11) +(def-tex torn-face-right citycast-pris2 12) +(def-tex torn-finger citycast-pris2 13) +(def-tex torn-footleather citycast-pris2 14) +(def-tex torn-gunbarrel citycast-pris2 15) +(def-tex torn-gunbarrel-02 citycast-pris2 16) +(def-tex torn-hair-01 citycast-pris2 17) +(def-tex torn-hair-02 citycast-pris2 18) +(def-tex torn-handle-01 citycast-pris2 19) +(def-tex torn-legshield citycast-pris2 20) +(def-tex torn-metal2 citycast-pris2 21) +(def-tex torn-mouth citycast-pris2 22) +(def-tex torn-pipe citycast-pris2 23) +(def-tex torn-scarf citycast-pris2 24) +(def-tex torn-shoe citycast-pris2 25) +(def-tex torn-shoe-02 citycast-pris2 26) +(def-tex torn-teeth-01 citycast-pris2 27) +(def-tex torn-vest citycast-pris2 28) +(def-tex intcept-lorez-spike01 desoasis-water 0) +(def-tex windshield01 desoasis-water 1) +(def-tex bam-eyelight ldax-pris 0) +(def-tex bam-hairhilite ldax-pris 1) +(def-tex daxter-eyelid ldax-pris 2) +(def-tex daxter-furhilite ldax-pris 3) +(def-tex daxter-orange ldax-pris 4) +(def-tex daxterarm ldax-pris 5) +(def-tex daxterbodyshort-eix ldax-pris 6) +(def-tex daxterbolt ldax-pris 7) +(def-tex daxterear ldax-pris 8) +(def-tex daxterfinger ldax-pris 9) +(def-tex daxterfoot ldax-pris 10) +(def-tex daxterfoot-bottom ldax-pris 11) +(def-tex daxtergoggles ldax-pris 12) +(def-tex daxterheadwidenew ldax-pris 13) +(def-tex daxterhelmetplain ldax-pris 14) +(def-tex daxterlense ldax-pris 15) +(def-tex daxternose ldax-pris 16) +(def-tex daxterteeth ldax-pris 17) +(def-tex daxtertuft ldax-pris 18) +(def-tex bam-eyelight lkeira-pris 0) +(def-tex bam-hairhilite lkeira-pris 1) +(def-tex keira-bellylong lkeira-pris 2) +(def-tex keira-belt lkeira-pris 3) +(def-tex keira-blackstrap lkeira-pris 4) +(def-tex keira-brownstraps-new lkeira-pris 5) +(def-tex keira-chokerhighres lkeira-pris 6) +(def-tex keira-chokermetal lkeira-pris 7) +(def-tex keira-eyelid lkeira-pris 8) +(def-tex keira-face lkeira-pris 9) +(def-tex keira-glasses lkeira-pris 10) +(def-tex keira-glovenewlarge lkeira-pris 11) +(def-tex keira-gogglestrap lkeira-pris 12) +(def-tex keira-hair-newest lkeira-pris 13) +(def-tex keira-handbottom lkeira-pris 14) +(def-tex keira-handtop lkeira-pris 15) +(def-tex keira-iris-64x64 lkeira-pris 16) +(def-tex keira-largewraps lkeira-pris 17) +(def-tex keira-lens-large lkeira-pris 18) +(def-tex keira-maskbolt lkeira-pris 19) +(def-tex keira-pantslarge lkeira-pris 20) +(def-tex keira-shirt lkeira-pris 21) +(def-tex keira-shoebottom lkeira-pris 22) +(def-tex keira-torch-guard-01 lkeira-pris 23) +(def-tex keira-torch-nozzle-01 lkeira-pris 24) +(def-tex keira-torch-nozzle-02 lkeira-pris 25) +(def-tex keira-mask lkeira-water 0) +(def-tex bam-eyelight lsamos-pris2 0) +(def-tex bam-hairhilite lsamos-pris2 1) +(def-tex samos-arm lsamos-pris2 2) +(def-tex samos-diaper lsamos-pris2 3) +(def-tex samos-ear lsamos-pris2 4) +(def-tex samos-eye lsamos-pris2 5) +(def-tex samos-eyelid lsamos-pris2 6) +(def-tex samos-face lsamos-pris2 7) +(def-tex samos-finger-01 lsamos-pris2 8) +(def-tex samos-hair lsamos-pris2 9) +(def-tex samos-helmet lsamos-pris2 10) +(def-tex samos-leaf lsamos-pris2 11) +(def-tex samos-lens lsamos-pris2 12) +(def-tex samos-log-01 lsamos-pris2 13) +(def-tex samos-log-02 lsamos-pris2 14) +(def-tex samos-log-03 lsamos-pris2 15) +(def-tex samos-metal lsamos-pris2 16) +(def-tex samos-strap lsamos-pris2 17) +(def-tex samos-teeth2 lsamos-pris2 18) +(def-tex samos-vest lsamos-pris2 19) +(def-tex samosbird-beak lsamos-pris2 20) +(def-tex samosbird-body lsamos-pris2 21) +(def-tex samosbird-eye lsamos-pris2 22) +(def-tex samosbird-plume lsamos-pris2 23) +(def-tex samosbird-wing lsamos-pris2 24) +(def-tex sewer-brick-block-10 minee-tfrag 0) +(def-tex sewer-brick-block-11 minee-tfrag 1) +(def-tex sewer-brick-block-06 minee-tfrag 2) +(def-tex sewer-plate-01 minee-tfrag 3) +(def-tex sewer-pipe-rim-01 minee-tfrag 4) +(def-tex sewer-big-brace-01 minee-tfrag 5) +(def-tex sewer-metal-block-01 minee-tfrag 6) +(def-tex sewer-block-01 minee-tfrag 7) +(def-tex sewer-brick-block-01 minee-tfrag 8) +(def-tex sewer-concrete-block-02 minee-tfrag 9) +(def-tex sewer-mantel-02 minee-tfrag 10) +(def-tex sewer-mantel-01 minee-tfrag 11) +(def-tex sewer-metal-block-05 minee-tfrag 12) +(def-tex sewer-pipe-rim-05b minee-tfrag 13) +(def-tex sewer-lip-01-hitweak minee-tfrag 14) +(def-tex sewer-small-light-01 minee-tfrag 15) +(def-tex sewer-pipe-rim-08 minee-tfrag 16) +(def-tex sewer-metal-block-06 minee-tfrag 17) +(def-tex sewer-metal-01 minee-tfrag 18) +(def-tex sewer-metal-block-04 minee-tfrag 19) +(def-tex sewer-metal-floor-01 minee-tfrag 20) +(def-tex sewer-plate-02 minee-tfrag 21) +(def-tex sewer-metal-floor-02 minee-tfrag 22) +(def-tex sewer-concrete-edge-02 minee-tfrag 23) +(def-tex sewer-grate-01 minee-tfrag 27) +(def-tex sewer-pipe-01 minee-tfrag 28) +(def-tex sewer-plate-05 minee-tfrag 29) +(def-tex sewer-screw-02 minee-tfrag 30) +(def-tex sew-elevator-lod0top minee-tfrag 31) +(def-tex sewer-pipe-small-01 minee-shrub 0) +(def-tex airlock-door-bolt minee-pris 0) +(def-tex airlock-door-cog minee-pris 1) +(def-tex airlock-door-cog1 minee-pris 2) +(def-tex airlock-door-main minee-pris 3) +(def-tex airlock-door-metal2 minee-pris 4) +(def-tex airlockl-door-metalframe minee-pris 5) +(def-tex bam-eyelight minee-pris 6) +(def-tex bam-hairhilite minee-pris 7) +(def-tex daxter-eyelid minee-pris 8) +(def-tex daxter-furhilite minee-pris 9) +(def-tex daxter-orange minee-pris 10) +(def-tex daxterarm minee-pris 11) +(def-tex daxterbodyshort-eix minee-pris 12) +(def-tex daxterbolt minee-pris 13) +(def-tex daxterear minee-pris 14) +(def-tex daxterfinger minee-pris 15) +(def-tex daxterfoot minee-pris 16) +(def-tex daxterfoot-bottom minee-pris 17) +(def-tex daxtergoggles minee-pris 18) +(def-tex daxterheadwidenew minee-pris 19) +(def-tex daxterhelmetplain minee-pris 20) +(def-tex daxterlense minee-pris 21) +(def-tex daxternose minee-pris 22) +(def-tex daxterteeth minee-pris 23) +(def-tex daxtertuft minee-pris 24) +(def-tex environment-oldmetal minee-pris 25) +(def-tex jakc-armor minee-pris 26) +(def-tex jakc-chestplate-straps minee-pris 27) +(def-tex jakc-gogglemetal minee-pris 28) +(def-tex jakc-lens minee-pris 29) +(def-tex jakc-scarf minee-pris 30) +(def-tex jakc-scarfhanging minee-pris 31) +(def-tex jakc-skirt minee-pris 32) +(def-tex jakc-waistband2 minee-pris 33) +(def-tex jakc-wraps minee-pris 34) +(def-tex jakc-wristband-a2 minee-pris 35) +(def-tex jakchires-arm minee-pris 36) +(def-tex jakchires-blackstrap minee-pris 37) +(def-tex jakchires-brownstrap minee-pris 38) +(def-tex jakchires-brwnleather minee-pris 39) +(def-tex jakchires-chestplate minee-pris 40) +(def-tex jakchires-clips minee-pris 41) +(def-tex jakchires-eye minee-pris 42) +(def-tex jakchires-eyebrow minee-pris 43) +(def-tex jakchires-eyelid minee-pris 44) +(def-tex jakchires-facelft minee-pris 45) +(def-tex jakchires-facert minee-pris 46) +(def-tex jakchires-glovetop minee-pris 47) +(def-tex jakchires-hair minee-pris 48) +(def-tex jakchires-horn minee-pris 49) +(def-tex jakchires-jacket minee-pris 50) +(def-tex jakchires-leatherpouch minee-pris 51) +(def-tex jakchires-lightbrownspat minee-pris 52) +(def-tex jakchires-pants minee-pris 53) +(def-tex jakchires-precarmor-01 minee-pris 54) +(def-tex jakchires-shoebottom minee-pris 55) +(def-tex jakchires-shoemetal minee-pris 56) +(def-tex jakchires-shoeteop minee-pris 57) +(def-tex jakchires-teeth minee-pris 58) +(def-tex holo-curve lctysnpr-sprite 0) +(def-tex facc-metal-panel-11 lfacrm2-tfrag 0) +(def-tex facc-sewer-floor lfacrm2-tfrag 3) +(def-tex facc-alt-wall lfacrm2-tfrag 4) +(def-tex facc-bigredplates-01 lfacrm2-tfrag 8) +(def-tex facc-panel-05 lfacrm2-tfrag 9) +(def-tex facc-panel-04 lfacrm2-tfrag 10) +(def-tex facc-wall-01 lfacrm2-tfrag 11) +(def-tex facc-pipe-01 lfacrm2-tfrag 13) +(def-tex facc-panel-02 lfacrm2-tfrag 14) +(def-tex facc-panel-03 lfacrm2-tfrag 15) +(def-tex facc-pipe-02 lfacrm2-tfrag 16) +(def-tex facc-panel-01 lfacrm2-tfrag 17) +(def-tex facc-panel-06 lfacrm2-tfrag 18) +(def-tex facc-wall-rnd-light-01 lfacrm2-tfrag 19) +(def-tex facc-big-metal-panl04 lfacrm2-tfrag 20) +(def-tex common-black lfacrm2-tfrag 21) +(def-tex facc-door-frame-02 lfacrm2-tfrag 22) +(def-tex facc-door-frame-01 lfacrm2-tfrag 23) +(def-tex facc-pipe-03 lfacrm2-tfrag 24) +(def-tex facc-arches-01 lfacrm2-tfrag 26) +(def-tex facc-light-02 lfacrm2-tfrag 28) +(def-tex facc-light-01 lfacrm2-tfrag 29) +(def-tex fac-elevator-rail-01 lfacrm2-tfrag 30) +(def-tex fac-elevator-rail-02 lfacrm2-tfrag 31) +(def-tex fac-elevator-side-02 lfacrm2-tfrag 32) +(def-tex fac-elevator-top-01 lfacrm2-tfrag 33) +(def-tex facc-metal-rim-03-hitweak lfacrm2-tfrag 34) +(def-tex facc-metal-panel-10-hitweak lfacrm2-tfrag 35) +(def-tex facc-seam-metal-hitweak lfacrm2-tfrag 36) +(def-tex facc-beam-02 lfacrm2-tfrag 37) +(def-tex facc-big-metal-panl01 lfacrm2-tfrag 38) +(def-tex facc-metal-panel-07 lfacrm2-tfrag 39) +(def-tex facc-floor-trim lfacrm2-tfrag 40) +(def-tex fac-elevator-side-01 lfacrm2-tfrag 41) +(def-tex facc-hole-grill-01 lfacrm2-alpha 1) +(def-tex ceiling-dust templex-sprite 1) +(def-tex des-beast-brown-tube desbattl-pris2 0) +(def-tex des-beast-eye desbattl-pris2 1) +(def-tex des-beast-feet desbattl-pris2 2) +(def-tex des-beast-gunend desbattl-pris2 3) +(def-tex des-beast-leg desbattl-pris2 4) +(def-tex des-beast-metal-01 desbattl-pris2 5) +(def-tex des-beast-metal-02 desbattl-pris2 6) +(def-tex des-beast-metal-cap desbattl-pris2 7) +(def-tex des-beast-metal-riveting desbattl-pris2 8) +(def-tex des-beast-metal-teeth desbattl-pris2 9) +(def-tex des-beast-mouth desbattl-pris2 10) +(def-tex des-beast-nails desbattl-pris2 11) +(def-tex des-beast-skin desbattl-pris2 12) +(def-tex sniper-core-glass-01 lctysnpr-water 0) +(def-tex pow-flat002 powergd-tfrag 0) +(def-tex pow-green-edge-01 powergd-tfrag 7) +(def-tex common-black powergd-tfrag 8) +(def-tex pow-green-tile-03 powergd-tfrag 9) +(def-tex pow-green-tile-01 powergd-tfrag 10) +(def-tex pow-green-tile-02 powergd-tfrag 11) +(def-tex pow-green-tile-04 powergd-tfrag 12) +(def-tex pow-green-tile-05 powergd-tfrag 13) +(def-tex pow-green-edge-04 powergd-tfrag 14) +(def-tex pow-green-edge-05 powergd-tfrag 15) +(def-tex comb-temp-dark combb-tfrag 1) +(def-tex comb-temp-glass combb-tfrag 2) +(def-tex rail-patch-01 combb-tfrag 6) +(def-tex rail-env-car-01 combb-tfrag 7) +(def-tex rail-edge-01 combb-tfrag 8) +(def-tex rail-base-mid-01 combb-tfrag 9) +(def-tex rail-light-blue-small combb-tfrag 10) +(def-tex rail-base-dark-01 combb-tfrag 12) +(def-tex rail-detail-01 combb-tfrag 13) +(def-tex rail-light-yellow-small combb-tfrag 14) +(def-tex rail-light-blue combb-tfrag 15) +(def-tex rail-cord-01 combb-tfrag 16) +(def-tex rail-pipe-01 combb-tfrag 17) +(def-tex rail-pipe-03 combb-tfrag 18) +(def-tex rail-gray-metal-01 combb-tfrag 19) +(def-tex rail-rock-01 combb-tfrag 20) +(def-tex rail-pipe-05 combb-tfrag 21) +(def-tex comb-redmarker combb-tfrag 23) +(def-tex rail-light-yellow combb-tfrag 25) +(def-tex rail-light-red combb-tfrag 26) +(def-tex comb-temp-dark combc-tfrag 1) +(def-tex comb-temp-glass combc-tfrag 2) +(def-tex comb-yell-light combc-tfrag 5) +(def-tex rail-patch-01 combc-tfrag 6) +(def-tex rail-env-car-01 combc-tfrag 8) +(def-tex rail-trim-01 combc-tfrag 9) +(def-tex rail-light-blue-small combc-tfrag 10) +(def-tex rail-edge-01 combc-tfrag 11) +(def-tex rail-base-mid-01 combc-tfrag 12) +(def-tex rail-base-dark-01 combc-tfrag 13) +(def-tex rail-light-blue combc-tfrag 14) +(def-tex rail-detail-01 combc-tfrag 15) +(def-tex rail-cord-01 combc-tfrag 16) +(def-tex rail-pipe-01 combc-tfrag 17) +(def-tex rail-pipe-03 combc-tfrag 18) +(def-tex rail-light-yellow-small combc-tfrag 19) +(def-tex rail-light-yellow combc-tfrag 20) +(def-tex rail-pipe-05 combc-tfrag 21) +(def-tex rail-gray-metal-01 combc-tfrag 22) +(def-tex rail-pipe-02 combc-tfrag 23) +(def-tex rail-rock-01 combc-tfrag 24) +(def-tex rail-env-wall-01 combc-tfrag 25) +(def-tex comb-redmarker combc-tfrag 26) +(def-tex rail-light-red combc-tfrag 27) +(def-tex map-ctyfarmb mhcitya-minimap 1) +(def-tex map-ctyporta mhcitya-minimap 2) +(def-tex map-ctyfarmb mhcityb-minimap 0) +(def-tex map-ctymarka mhcityb-minimap 2) +(def-tex comb-temp-dark combd-tfrag 1) +(def-tex comb-temp-glass combd-tfrag 2) +(def-tex rail-patch-01 combd-tfrag 6) +(def-tex rail-env-car-01 combd-tfrag 7) +(def-tex rail-base-dark-01 combd-tfrag 8) +(def-tex rail-edge-01 combd-tfrag 9) +(def-tex rail-base-mid-01 combd-tfrag 10) +(def-tex rail-light-blue-small combd-tfrag 11) +(def-tex rail-trim-01 combd-tfrag 12) +(def-tex rail-light-yellow-small combd-tfrag 13) +(def-tex rail-light-blue combd-tfrag 14) +(def-tex rail-detail-01 combd-tfrag 15) +(def-tex rail-cord-01 combd-tfrag 16) +(def-tex rail-pipe-01 combd-tfrag 17) +(def-tex rail-pipe-03 combd-tfrag 18) +(def-tex rail-light-yellow combd-tfrag 19) +(def-tex rail-gray-metal-01 combd-tfrag 20) +(def-tex rail-pipe-05 combd-tfrag 21) +(def-tex rail-pipe-02 combd-tfrag 22) +(def-tex rail-rock-01 combd-tfrag 23) +(def-tex rail-tread-01 combd-tfrag 24) +(def-tex rail-fit-01 combd-tfrag 25) +(def-tex rail-env-wall-01 combd-tfrag 26) +(def-tex comb-redmarker combd-tfrag 27) +(def-tex rail-light-red combd-tfrag 28) +(def-tex missle-launcher-gear-01 lpatkcs-tfrag 0) +(def-tex missle-launcher-panel-03 lpatkcs-tfrag 2) +(def-tex missle-launcher-shaft-01 lpatkcs-tfrag 3) +(def-tex dax-msl-lnch-clamp-01 lpatkcs-tfrag 4) +(def-tex dax-msl-lnch-rim-01 lpatkcs-tfrag 5) +(def-tex dax-msl-lnch-pipe-01 lpatkcs-tfrag 6) +(def-tex dax-msl-lnch-table-box-01 lpatkcs-tfrag 7) +(def-tex dax-msl-lnch-side-rim-01 lpatkcs-tfrag 8) +(def-tex dax-msl-lnch-side-01 lpatkcs-tfrag 9) +(def-tex dax-msl-lnch-table-side-01 lpatkcs-tfrag 10) +(def-tex dax-msl-lnch-table-01 lpatkcs-tfrag 11) +(def-tex minb-stone26 combn-tfrag 0) +(def-tex minb-stone12 combn-tfrag 1) +(def-tex minb-stone20 combn-tfrag 2) +(def-tex minb-stone11 combn-tfrag 3) +(def-tex minb-stone15 combn-tfrag 4) +(def-tex minb-stone22 combn-tfrag 5) +(def-tex minb-stone23 combn-tfrag 6) +(def-tex mina-idol-02 combn-tfrag 7) +(def-tex min-env-mar-01 combn-tfrag 11) +(def-tex minc-01 combn-tfrag 12) +(def-tex minc-pre-10 combn-tfrag 13) +(def-tex minc-pre-04 combn-tfrag 14) +(def-tex minc-pre-11 combn-tfrag 15) +(def-tex comb-temp-dark combn-tfrag 16) +(def-tex comb-temp-glass combn-tfrag 17) +(def-tex comb-temp-light combn-tfrag 18) +(def-tex comb-crct-small-drk combn-tfrag 19) +(def-tex comb-crct-medium combn-tfrag 20) +(def-tex comb-crct-small combn-tfrag 21) +(def-tex comb-tarn-wall-01 combn-tfrag 22) +(def-tex comb-tarn-fade-wall-01 combn-tfrag 23) +(def-tex common-black combn-tfrag 24) +(def-tex comb-env2 combn-tfrag 26) +(def-tex comb-env combn-tfrag 27) +(def-tex comb-plate-02 combn-tfrag 28) +(def-tex comb-ring combn-tfrag 29) +(def-tex comb-pipe2 combn-tfrag 30) +(def-tex comb-yell-light combn-tfrag 31) +(def-tex comb-pipe1 combn-tfrag 32) +(def-tex comb-pipe3 combn-tfrag 33) +(def-tex comb-pipe combn-tfrag 34) +(def-tex comb-long-vent combn-tfrag 35) +(def-tex comb-comb-tile combn-tfrag 36) +(def-tex comb-stone-03 combn-tfrag 37) +(def-tex comb-stone-04 combn-tfrag 38) +(def-tex comb-stone-05 combn-tfrag 39) +(def-tex comb-stone-01 combn-tfrag 40) +(def-tex comb-stone-02 combn-tfrag 41) +(def-tex rail-patch-01 combn-tfrag 42) +(def-tex rail-env-car-01 combn-tfrag 43) +(def-tex rail-light-blue combn-tfrag 45) +(def-tex rail-edge-01 combn-tfrag 46) +(def-tex rail-base-mid-01 combn-tfrag 47) +(def-tex rail-base-dark-01 combn-tfrag 48) +(def-tex rail-light-blue-small combn-tfrag 49) +(def-tex rail-detail-01 combn-tfrag 50) +(def-tex rail-cord-01 combn-tfrag 51) +(def-tex rail-pipe-01 combn-tfrag 52) +(def-tex rail-pipe-03 combn-tfrag 53) +(def-tex rail-gray-metal-01 combn-tfrag 54) +(def-tex minc-pre-12 combn-water 0) +(def-tex snip-trt-metal-03 lctysnpr-tfrag 0) +(def-tex snip-trt-metal-04 lctysnpr-tfrag 1) +(def-tex snip-trt-metal-01 lctysnpr-tfrag 2) +(def-tex snip-trt-metal-bolt lctysnpr-tfrag 3) +(def-tex snip-trt-metal-02 lctysnpr-tfrag 4) +(def-tex snip-trt-metal-05 lctysnpr-tfrag 5) +(def-tex snip-trt-metal-07 lctysnpr-tfrag 6) +(def-tex snip-trt-metal-06 lctysnpr-tfrag 7) +(def-tex snip-trt-metal-08 lctysnpr-tfrag 8) +(def-tex common-black lctysnpr-tfrag 9) +(def-tex kgt-gun03 lctysnpr-tfrag 10) +(def-tex kgt-gun02 lctysnpr-tfrag 11) +(def-tex kgt-rim01 lctysnpr-tfrag 13) +(def-tex kgt-gun01 lctysnpr-tfrag 14) +(def-tex cty-sniper-red lctysnpr-tfrag 15) +(def-tex sniper-core-glow-01 lctysnpr-tfrag 16) +(def-tex hud-vehicle-health-bar-01 wasdefen-minimap 0) +(def-tex facc-metal-panel-11 factoryc-vis-tfrag 0) +(def-tex facc-wall-01 factoryc-vis-tfrag 1) +(def-tex facc-wall-trim-01 factoryc-vis-tfrag 2) +(def-tex facc-turret-base factoryc-vis-tfrag 3) +(def-tex facc-door-frame-01 factoryc-vis-tfrag 4) +(def-tex facc-beam-01 factoryc-vis-tfrag 5) +(def-tex facc-metal-panel-09 factoryc-vis-tfrag 6) +(def-tex facb_temp_medium factoryc-vis-tfrag 12) +(def-tex fac-tower-pipe-01 factoryc-vis-tfrag 13) +(def-tex facc-big-metal-panl01 factoryc-vis-tfrag 14) +(def-tex facc-arches-01 factoryc-vis-tfrag 15) +(def-tex facc-panel-05 factoryc-vis-tfrag 16) +(def-tex facc-panel-04 factoryc-vis-tfrag 17) +(def-tex facc-pipe-01 factoryc-vis-tfrag 18) +(def-tex facc-panel-06 factoryc-vis-tfrag 19) +(def-tex facc-wall-rnd-light-01 factoryc-vis-tfrag 20) +(def-tex facc-panel-02 factoryc-vis-tfrag 21) +(def-tex facc-panel-03 factoryc-vis-tfrag 22) +(def-tex facc-pipe-02 factoryc-vis-tfrag 23) +(def-tex facc-panel-01 factoryc-vis-tfrag 24) +(def-tex facc-big-metal-panl04 factoryc-vis-tfrag 25) +(def-tex facc-bigpipe-01 factoryc-vis-tfrag 26) +(def-tex facc-pipe-rim-01 factoryc-vis-tfrag 27) +(def-tex facc-seam-metal factoryc-vis-tfrag 28) +(def-tex facc-redstriping-01 factoryc-vis-tfrag 29) +(def-tex facc-corrugate-01 factoryc-vis-tfrag 30) +(def-tex facc-floor-trim factoryc-vis-tfrag 31) +(def-tex facc-metal-panel-10 factoryc-vis-tfrag 34) +(def-tex facc-metal-ring-03 factoryc-vis-tfrag 38) +(def-tex facc-sewer-floor factoryc-vis-tfrag 40) +(def-tex common-black factoryc-vis-tfrag 42) +(def-tex facc-pipe-03 factoryc-vis-tfrag 43) +(def-tex facc-redstriping-01-hitweak factoryc-vis-tfrag 44) +(def-tex facc-beam-02 factoryc-vis-tfrag 46) +(def-tex facc-door-frame-02 factoryc-vis-tfrag 48) +(def-tex facc-wall-trim-02 factoryc-vis-tfrag 49) +(def-tex facc-techwall-01 factoryc-vis-tfrag 50) +(def-tex facc-light-02 factoryc-vis-tfrag 51) +(def-tex facc-light-01 factoryc-vis-tfrag 52) +(def-tex facc-beam-plat factoryc-vis-tfrag 54) +(def-tex facc-bigredplates-01 factoryc-vis-tfrag 57) +(def-tex facc-wheel-rim-01 factoryc-vis-tfrag 60) +(def-tex facc-wheel-rim-02 factoryc-vis-tfrag 61) +(def-tex facc-wheel-face-01 factoryc-vis-tfrag 62) +(def-tex facc-redmetal-01 factoryc-vis-tfrag 63) +(def-tex facc-big-metal-panl02 factoryc-vis-tfrag 64) +(def-tex facc-floor-grill-01 factoryc-vis-tfrag 65) +(def-tex facc-metal-panel-10-hitweak factoryc-vis-tfrag 66) +(def-tex facc-metal-rim-03 factoryc-vis-tfrag 67) +(def-tex facc-metal-panel-07 factoryc-vis-tfrag 68) +(def-tex facc-metal-rim-02 factoryc-vis-tfrag 69) +(def-tex facc-grill-01 factoryc-vis-tfrag 70) +(def-tex facc-grill-02 factoryc-vis-tfrag 71) +(def-tex facc-bigredplates-01-hitweak factoryc-vis-tfrag 96) +(def-tex fac-punch-wall--metal-edge-01 factoryc-vis-tfrag 97) +(def-tex fac-punch-wall--metal-edge-02 factoryc-vis-tfrag 98) +(def-tex facc-redmetaledge-01 factoryc-vis-tfrag 99) +(def-tex facc-redmetaledge-01-hitweak factoryc-vis-tfrag 100) +(def-tex facc-redmetal-02 factoryc-vis-tfrag 101) +(def-tex facc-metal-rim-03-hitweak factoryc-vis-tfrag 102) +(def-tex facc-seam-metal-hitweak factoryc-vis-tfrag 103) +(def-tex facc-big-metal-panl04-hitweak factoryc-vis-tfrag 104) +(def-tex facc-big-metal-panl01-hitweak factoryc-vis-tfrag 105) +(def-tex facc-metal-panel-12 factoryc-vis-tfrag 106) +(def-tex facc-redspot factoryc-vis-tfrag 107) +(def-tex facb-glass-01 factoryc-vis-alpha 0) +(def-tex facc-hole-grill-01 factoryc-vis-alpha 2) +(def-tex facc-convey factoryc-vis-alpha 3) +(def-tex facc-convey-dest factoryc-vis-alpha 4) +(def-tex facc-convey-02-dest factoryc-vis-alpha 5) +(def-tex facc-convey-02 factoryc-vis-alpha 6) +(def-tex fac-fence-rim-grill-01 factoryc-vis-shrub 0) +(def-tex fac-fence-rim-01 factoryc-vis-shrub 1) +(def-tex fac-fence-rim-02 factoryc-vis-shrub 2) +(def-tex fac-fence-rim-03 factoryc-vis-shrub 3) +(def-tex fac-break-floor-bolt factoryc-vis-shrub 4) +(def-tex fac-break-floor-edge-01 factoryc-vis-shrub 5) +(def-tex facc-beam-02 factoryc-vis-shrub 6) +(def-tex fac-break-floor-edge-02 factoryc-vis-shrub 7) +(def-tex fac-firetorch-01 factoryc-vis-shrub 8) +(def-tex fac-firetorch-fire-01 factoryc-vis-shrub 9) +(def-tex robopod-rim-01 factoryc-vis-shrub 10) +(def-tex robopod-door-02 factoryc-vis-shrub 11) +(def-tex common-black factoryc-vis-shrub 12) +(def-tex robopod-panel-01 factoryc-vis-shrub 13) +(def-tex robopod-door-01 factoryc-vis-shrub 14) +(def-tex robopod-panel-02 factoryc-vis-shrub 15) +(def-tex robopod-rim-02 factoryc-vis-shrub 16) +(def-tex fac-rotofan-rim-01 factoryc-vis-shrub 17) +(def-tex fac-rotofan-cap-02 factoryc-vis-shrub 18) +(def-tex fac-rotofan-cap-01 factoryc-vis-shrub 19) +(def-tex fac-rotofan-blade-02 factoryc-vis-shrub 20) +(def-tex fac-rotofan-blade-01 factoryc-vis-shrub 21) +(def-tex fac-rotofan-rim-02 factoryc-vis-shrub 22) +(def-tex facc-bolt-02 factoryc-vis-shrub 23) +(def-tex facc-bolt-01 factoryc-vis-shrub 24) +(def-tex facc-floor-grill-01 factoryc-vis-shrub 25) +(def-tex facb-move-plat-plate-01 factoryc-vis-shrub 29) +(def-tex facb-move-plat-plate-02 factoryc-vis-shrub 30) +(def-tex facc-markings-02 factoryc-vis-shrub 31) +(def-tex facc-markings-05 factoryc-vis-shrub 32) +(def-tex facc-markings-01 factoryc-vis-shrub 33) +(def-tex facc-markings-04 factoryc-vis-shrub 34) +(def-tex facc-markings-03 factoryc-vis-shrub 35) +(def-tex facc-markings-06 factoryc-vis-shrub 36) +(def-tex nst-egg-spider-body lforplnt-vis-pris 0) +(def-tex nst-egg-spider-egg lforplnt-vis-pris 1) +(def-tex nst-egg-spider-eye lforplnt-vis-pris 2) +(def-tex nst-egg-spider-metal lforplnt-vis-pris 3) +(def-tex nst-egg-spider-pipe lforplnt-vis-pris 4) +(def-tex mh-gem lforplnt-vis-pris 5) +(def-tex mh-gem-alpha-01 lforplnt-vis-pris 6) +(def-tex mh-gem-alpha-02 lforplnt-vis-pris 7) +(def-tex mh-gem-dest lforplnt-vis-pris 8) +(def-tex mh-plant-head lforplnt-vis-pris 9) +(def-tex mh-plant-legs lforplnt-vis-pris 10) +(def-tex jakchires-precarmor-01 lforplnt-vis-pris 11) +(def-tex bam-eyelight lforplnt-vis-pris 12) +(def-tex bam-hairhilite lforplnt-vis-pris 13) +(def-tex daxter-eyelid lforplnt-vis-pris 14) +(def-tex daxter-furhilite lforplnt-vis-pris 15) +(def-tex daxter-orange lforplnt-vis-pris 16) +(def-tex daxterarm lforplnt-vis-pris 17) +(def-tex daxterbodyshort-eix lforplnt-vis-pris 18) +(def-tex daxterbolt lforplnt-vis-pris 19) +(def-tex daxterear lforplnt-vis-pris 20) +(def-tex daxterfinger lforplnt-vis-pris 21) +(def-tex daxterfoot lforplnt-vis-pris 22) +(def-tex daxterfoot-bottom lforplnt-vis-pris 23) +(def-tex daxtergoggles lforplnt-vis-pris 24) +(def-tex daxterheadwidenew lforplnt-vis-pris 25) +(def-tex daxterhelmetplain lforplnt-vis-pris 26) +(def-tex daxterlense lforplnt-vis-pris 27) +(def-tex daxternose lforplnt-vis-pris 28) +(def-tex daxterteeth lforplnt-vis-pris 29) +(def-tex daxtertuft lforplnt-vis-pris 30) +(def-tex environment-oldmetal lforplnt-vis-pris 31) +(def-tex jakc-armor lforplnt-vis-pris 32) +(def-tex jakc-chestplate-straps lforplnt-vis-pris 33) +(def-tex jakc-gogglemetal lforplnt-vis-pris 34) +(def-tex jakc-lens lforplnt-vis-pris 35) +(def-tex jakc-scarf lforplnt-vis-pris 36) +(def-tex jakc-scarfhanging lforplnt-vis-pris 37) +(def-tex jakc-skirt lforplnt-vis-pris 38) +(def-tex jakc-waistband2 lforplnt-vis-pris 39) +(def-tex jakc-wraps lforplnt-vis-pris 40) +(def-tex jakc-wristband-a2 lforplnt-vis-pris 41) +(def-tex jakchires-arm lforplnt-vis-pris 42) +(def-tex jakchires-blackstrap lforplnt-vis-pris 43) +(def-tex jakchires-brownstrap lforplnt-vis-pris 44) +(def-tex jakchires-brwnleather lforplnt-vis-pris 45) +(def-tex jakchires-chestplate lforplnt-vis-pris 46) +(def-tex jakchires-clips lforplnt-vis-pris 47) +(def-tex jakchires-eye lforplnt-vis-pris 48) +(def-tex jakchires-eyebrow lforplnt-vis-pris 49) +(def-tex jakchires-eyelid lforplnt-vis-pris 50) +(def-tex jakchires-facelft lforplnt-vis-pris 51) +(def-tex jakchires-facert lforplnt-vis-pris 52) +(def-tex jakchires-glovetop lforplnt-vis-pris 53) +(def-tex jakchires-hair lforplnt-vis-pris 54) +(def-tex jakchires-horn lforplnt-vis-pris 55) +(def-tex jakchires-jacket lforplnt-vis-pris 56) +(def-tex jakchires-leatherpouch lforplnt-vis-pris 57) +(def-tex jakchires-lightbrownspat lforplnt-vis-pris 58) +(def-tex jakchires-pants lforplnt-vis-pris 59) +(def-tex jakchires-shoebottom lforplnt-vis-pris 60) +(def-tex jakchires-shoemetal lforplnt-vis-pris 61) +(def-tex jakchires-shoeteop lforplnt-vis-pris 62) +(def-tex jakchires-teeth lforplnt-vis-pris 63) +(def-tex bam-eyelight powergd-pris 0) +(def-tex cguard1-backmetal powergd-pris 1) +(def-tex cguard1-chestplate powergd-pris 2) +(def-tex cguard1-gunmetaldark2 powergd-pris 3) +(def-tex cguard1-guntube powergd-pris 4) +(def-tex cguard1-lens powergd-pris 5) +(def-tex cguardgame-metaledark-02 powergd-pris 6) +(def-tex cguardgame-metallight-01small powergd-pris 7) +(def-tex environment-oldmetal powergd-pris 8) +(def-tex grunt-eye-01 powergd-pris 9) +(def-tex grunt-gem-01 powergd-pris 10) +(def-tex grunt-hose powergd-pris 11) +(def-tex grunt-metal-01 powergd-pris 12) +(def-tex grunt-skin-01 powergd-pris 13) +(def-tex grunt-skin-02 powergd-pris 14) +(def-tex grunt-skin-03 powergd-pris 15) +(def-tex grunt-teeth-01 powergd-pris 16) +(def-tex kg-grunt-cable-01 powergd-pris 17) +(def-tex kg-grunt-rim-01 powergd-pris 18) +(def-tex kg-grunt-rim-02 powergd-pris 19) +(def-tex kg-grunt-rim-03 powergd-pris 20) +(def-tex roboguard-headshield powergd-pris 21) +(def-tex roboguard-shouldershield powergd-pris 22) +(def-tex squid-bulb-sm powergd-pris 23) +(def-tex widow-dull-inards powergd-pris 24) +(def-tex widow-pod-gun-metal powergd-pris 25) +(def-tex bam-hairhilite powergd-pris 26) +(def-tex bam-leather-belt-blue powergd-pris 27) +(def-tex sk-eye-lid powergd-pris 39) +(def-tex sk-ear powergd-pris 40) +(def-tex sk-orange2yellowfur powergd-pris 41) +(def-tex sk-solidorangefur powergd-pris 42) +(def-tex sk-yellowfurnew powergd-pris 43) +(def-tex grunt-vector-01 powergd-pris 44) +(def-tex grunt-vector-02 powergd-pris 45) +(def-tex grunt-vector-eye-01 powergd-pris 46) +(def-tex cipher-drum-01 powergd-pris 47) +(def-tex cipher-drum-02 powergd-pris 48) +(def-tex cipher-drum-03 powergd-pris 49) +(def-tex cipher-side-01 powergd-pris 50) +(def-tex cipher-side-02 powergd-pris 51) +(def-tex cipher-side-03 powergd-pris 52) +(def-tex squid-drabgun powergd-pris 53) +(def-tex switch-body-01 powergd-pris 54) +(def-tex switch-body-02 powergd-pris 55) +(def-tex bam-eyelight warpcast-pris 0) +(def-tex bam-hairhilite warpcast-pris 1) +(def-tex environment-oldmetal warpcast-pris 2) +(def-tex jakc-armor warpcast-pris 3) +(def-tex jakc-chestplate-straps warpcast-pris 4) +(def-tex jakc-gogglemetal warpcast-pris 5) +(def-tex jakc-lens warpcast-pris 6) +(def-tex jakc-scarf warpcast-pris 7) +(def-tex jakc-scarfhanging warpcast-pris 8) +(def-tex jakc-skirt warpcast-pris 9) +(def-tex jakc-waistband2 warpcast-pris 10) +(def-tex jakc-wraps warpcast-pris 11) +(def-tex jakc-wristband-a2 warpcast-pris 12) +(def-tex jakchires-arm warpcast-pris 13) +(def-tex jakchires-blackstrap warpcast-pris 14) +(def-tex jakchires-brownstrap warpcast-pris 15) +(def-tex jakchires-brwnleather warpcast-pris 16) +(def-tex jakchires-chestplate warpcast-pris 17) +(def-tex jakchires-clips warpcast-pris 18) +(def-tex jakchires-eye warpcast-pris 19) +(def-tex jakchires-eyebrow warpcast-pris 20) +(def-tex jakchires-eyelid warpcast-pris 21) +(def-tex jakchires-facelft warpcast-pris 22) +(def-tex jakchires-facert warpcast-pris 23) +(def-tex jakchires-glovetop warpcast-pris 24) +(def-tex jakchires-hair warpcast-pris 25) +(def-tex jakchires-horn warpcast-pris 26) +(def-tex jakchires-jacket warpcast-pris 27) +(def-tex jakchires-leatherpouch warpcast-pris 28) +(def-tex jakchires-lightbrownspat warpcast-pris 29) +(def-tex jakchires-pants warpcast-pris 30) +(def-tex jakchires-precarmor-01 warpcast-pris 31) +(def-tex jakchires-shoebottom warpcast-pris 32) +(def-tex jakchires-shoemetal warpcast-pris 33) +(def-tex jakchires-shoeteop warpcast-pris 34) +(def-tex jakchires-teeth warpcast-pris 35) +(def-tex daxter-eyelid warpcast-pris 36) +(def-tex daxter-furhilite warpcast-pris 37) +(def-tex daxter-orange warpcast-pris 38) +(def-tex daxterarm warpcast-pris 39) +(def-tex daxterbodyshort-eix warpcast-pris 40) +(def-tex daxterbolt warpcast-pris 41) +(def-tex daxterear warpcast-pris 42) +(def-tex daxterfinger warpcast-pris 43) +(def-tex daxterfoot warpcast-pris 44) +(def-tex daxterfoot-bottom warpcast-pris 45) +(def-tex daxtergoggles warpcast-pris 46) +(def-tex daxterheadwidenew warpcast-pris 47) +(def-tex daxterhelmetplain warpcast-pris 48) +(def-tex daxterlense warpcast-pris 49) +(def-tex daxternose warpcast-pris 50) +(def-tex daxterteeth warpcast-pris 51) +(def-tex daxtertuft warpcast-pris 52) +(def-tex gun-barrel-alt gungame1-pris 0) +(def-tex gun-laser gungame1-pris 1) +(def-tex gun-main gungame1-pris 2) +(def-tex gun-tip gungame1-pris 3) +(def-tex gun-main gungame2-pris 0) +(def-tex gun-red-glow gungame2-pris 1) +(def-tex gun-red-mag gungame2-pris 2) +(def-tex facc-bolt-02 lfacrm2-shrub 0) +(def-tex facc-bolt-01 lfacrm2-shrub 1) +(def-tex facc-markings-02 lfacrm2-shrub 2) +(def-tex facc-markings-06 lfacrm2-shrub 3) +(def-tex facc-markings-05 lfacrm2-shrub 4) +(def-tex facc-markings-01 lfacrm2-shrub 5) +(def-tex facc-markings-03 lfacrm2-shrub 6) +(def-tex facc-markings-04 lfacrm2-shrub 7) +(def-tex bam-eyelight lsigklv-pris 0) +(def-tex bam-hairhilite lsigklv-pris 1) +(def-tex klever-arm lsigklv-pris 2) +(def-tex klever-armor-01 lsigklv-pris 3) +(def-tex klever-armor-02 lsigklv-pris 4) +(def-tex klever-blackstrap lsigklv-pris 5) +(def-tex klever-bolt lsigklv-pris 6) +(def-tex klever-brownstrap lsigklv-pris 7) +(def-tex klever-chest lsigklv-pris 8) +(def-tex klever-clips lsigklv-pris 9) +(def-tex klever-earcup lsigklv-pris 10) +(def-tex klever-eye lsigklv-pris 11) +(def-tex klever-eyelid lsigklv-pris 12) +(def-tex klever-face-01 lsigklv-pris 13) +(def-tex klever-face-01scars lsigklv-pris 14) +(def-tex klever-fingerbottom lsigklv-pris 15) +(def-tex klever-fingertop lsigklv-pris 16) +(def-tex klever-gunmetal-01 lsigklv-pris 17) +(def-tex klever-gunmetal-02 lsigklv-pris 18) +(def-tex klever-gunmetal-03 lsigklv-pris 19) +(def-tex klever-gunmetal-04 lsigklv-pris 20) +(def-tex klever-gunmetal-05 lsigklv-pris 21) +(def-tex klever-hair lsigklv-pris 22) +(def-tex klever-hand lsigklv-pris 23) +(def-tex klever-handwrap lsigklv-pris 24) +(def-tex klever-horn lsigklv-pris 25) +(def-tex klever-mustache lsigklv-pris 26) +(def-tex klever-shoe lsigklv-pris 27) +(def-tex klever-shoebottom lsigklv-pris 28) +(def-tex klever-skirtdark lsigklv-pris 29) +(def-tex klever-skirtlight lsigklv-pris 30) +(def-tex klever-thighs lsigklv-pris 31) +(def-tex klever-undershirt lsigklv-pris 32) +(def-tex klever-widebrownstrap lsigklv-pris 33) +(def-tex bam-eyelight lsigklv-pris2 0) +(def-tex charHOLD lsigklv-pris2 1) +(def-tex environment-oldmetal lsigklv-pris2 2) +(def-tex sig-belt lsigklv-pris2 3) +(def-tex sig-eye lsigklv-pris2 4) +(def-tex sig-eyelid lsigklv-pris2 5) +(def-tex sig-faceleft lsigklv-pris2 6) +(def-tex sig-facert lsigklv-pris2 7) +(def-tex sig-flask lsigklv-pris2 8) +(def-tex sig-gem-01 lsigklv-pris2 9) +(def-tex sig-glove lsigklv-pris2 10) +(def-tex sig-glovetop lsigklv-pris2 11) +(def-tex sig-gun-01 lsigklv-pris2 12) +(def-tex sig-gun-02 lsigklv-pris2 13) +(def-tex sig-gun-03 lsigklv-pris2 14) +(def-tex sig-gun-04 lsigklv-pris2 15) +(def-tex sig-gun-05 lsigklv-pris2 16) +(def-tex sig-headgear lsigklv-pris2 17) +(def-tex sig-horn lsigklv-pris2 18) +(def-tex sig-lens lsigklv-pris2 19) +(def-tex sig-metal-01 lsigklv-pris2 20) +(def-tex sig-metal-dirty lsigklv-pris2 21) +(def-tex sig-sac lsigklv-pris2 22) +(def-tex sig-shoebottom lsigklv-pris2 23) +(def-tex sig-shoetop lsigklv-pris2 24) +(def-tex sig-shoulderarmor lsigklv-pris2 25) +(def-tex sig-skirts lsigklv-pris2 26) +(def-tex sig-skirts-02 lsigklv-pris2 27) +(def-tex sig-skirts-03 lsigklv-pris2 28) +(def-tex sig-undergarments lsigklv-pris2 29) +(def-tex vin-teeth-01 lsigklv-pris2 30) +(def-tex sig-flatfangs lsigklv-water 0) +(def-tex city-lowres-mhcity-tower-01 towerc-tfrag 106) +(def-tex tow-pup-skin-01 towerc-tfrag 126) +(def-tex bam-eyelight towerc-pris 0) +(def-tex bam-hairhilite towerc-pris 1) +(def-tex daxter-eyelid towerc-pris 2) +(def-tex daxter-furhilite towerc-pris 3) +(def-tex daxter-orange towerc-pris 4) +(def-tex daxterarm towerc-pris 5) +(def-tex daxterbodyshort-eix towerc-pris 6) +(def-tex daxterbolt towerc-pris 7) +(def-tex daxterear towerc-pris 8) +(def-tex daxterfinger towerc-pris 9) +(def-tex daxterfoot towerc-pris 10) +(def-tex daxterfoot-bottom towerc-pris 11) +(def-tex daxtergoggles towerc-pris 12) +(def-tex daxterheadwidenew towerc-pris 13) +(def-tex daxterhelmetplain towerc-pris 14) +(def-tex daxterlense towerc-pris 15) +(def-tex daxternose towerc-pris 16) +(def-tex daxterteeth towerc-pris 17) +(def-tex daxtertuft towerc-pris 18) +(def-tex tentacle-01 desert-vis-pris 4) +(def-tex tentacle-02 desert-vis-pris 5) +(def-tex cguard1-backmetal factoryc-vis-pris 3) +(def-tex cguard1-guntube factoryc-vis-pris 6) +(def-tex roboguard-headshield factoryc-vis-pris 17) +(def-tex widow-dull-inards factoryc-vis-pris 21) +(def-tex common-black factoryc-vis-pris 24) +(def-tex fac-switch-green-01 factoryc-vis-pris 25) +(def-tex fac-switch-red-01 factoryc-vis-pris 26) +(def-tex fac-switch-rim-01 factoryc-vis-pris 27) +(def-tex fac-switch-rim-02 factoryc-vis-pris 28) +(def-tex fac-switch-shaft factoryc-vis-pris 29) +(def-tex kg-grunt-cable-01 factoryc-vis-pris 49) +(def-tex kg-grunt-rim-03 factoryc-vis-pris 52) +(def-tex spydroid-gold factoryc-vis-pris 53) +(def-tex spydroid-leg-grey factoryc-vis-pris 54) +(def-tex spydroid-leg-grey-end factoryc-vis-pris 55) +(def-tex spydroid-light factoryc-vis-pris 56) +(def-tex spydroid-light-small factoryc-vis-pris 57) +(def-tex spydroid-light-small-red factoryc-vis-pris 58) +(def-tex spydroid-red factoryc-vis-pris 59) +(def-tex bam-eyelight combx-pris 0) +(def-tex bam-hairhilite combx-pris 1) +(def-tex daxter-eyelid combx-pris 2) +(def-tex daxter-furhilite combx-pris 3) +(def-tex daxter-orange combx-pris 4) +(def-tex daxterarm combx-pris 5) +(def-tex daxterbodyshort-eix combx-pris 6) +(def-tex daxterbolt combx-pris 7) +(def-tex daxterear combx-pris 8) +(def-tex daxterfinger combx-pris 9) +(def-tex daxterfoot combx-pris 10) +(def-tex daxterfoot-bottom combx-pris 11) +(def-tex daxtergoggles combx-pris 12) +(def-tex daxterheadwidenew combx-pris 13) +(def-tex daxterhelmetplain combx-pris 14) +(def-tex daxterlense combx-pris 15) +(def-tex daxternose combx-pris 16) +(def-tex daxterteeth combx-pris 17) +(def-tex daxtertuft combx-pris 18) +(def-tex environment-oldmetal combx-pris 19) +(def-tex jakc-armor combx-pris 20) +(def-tex jakc-chestplate-straps combx-pris 21) +(def-tex jakc-gogglemetal combx-pris 22) +(def-tex jakc-lens combx-pris 23) +(def-tex jakc-scarf combx-pris 24) +(def-tex jakc-scarfhanging combx-pris 25) +(def-tex jakc-skirt combx-pris 26) +(def-tex jakc-waistband2 combx-pris 27) +(def-tex jakc-wraps combx-pris 28) +(def-tex jakc-wristband-a2 combx-pris 29) +(def-tex jakchires-arm combx-pris 30) +(def-tex jakchires-blackstrap combx-pris 31) +(def-tex jakchires-brownstrap combx-pris 32) +(def-tex jakchires-brwnleather combx-pris 33) +(def-tex jakchires-chestplate combx-pris 34) +(def-tex jakchires-clips combx-pris 35) +(def-tex jakchires-eye combx-pris 36) +(def-tex jakchires-eyebrow combx-pris 37) +(def-tex jakchires-eyelid combx-pris 38) +(def-tex jakchires-facelft combx-pris 39) +(def-tex jakchires-facert combx-pris 40) +(def-tex jakchires-glovetop combx-pris 41) +(def-tex jakchires-hair combx-pris 42) +(def-tex jakchires-horn combx-pris 43) +(def-tex jakchires-jacket combx-pris 44) +(def-tex jakchires-leatherpouch combx-pris 45) +(def-tex jakchires-lightbrownspat combx-pris 46) +(def-tex jakchires-pants combx-pris 47) +(def-tex jakchires-precarmor-01 combx-pris 48) +(def-tex jakchires-shoebottom combx-pris 49) +(def-tex jakchires-shoemetal combx-pris 50) +(def-tex jakchires-shoeteop combx-pris 51) +(def-tex jakchires-teeth combx-pris 52) +(def-tex pecker-body-01 combx-pris 57) +(def-tex pecker-face combx-pris 58) +(def-tex pecker-plume combx-pris 59) +(def-tex pecker-tail combx-pris 60) +(def-tex pecker-teeth combx-pris 61) +(def-tex pecker-wingbottom combx-pris 62) +(def-tex pecker-wingtop combx-pris 63) +(def-tex pecker-yellowfur combx-pris 64) +(def-tex pecker-eyelid combx-pris 65) +(def-tex bam-eyelight ltnfxhip-pris2 0) +(def-tex bam-hairhilite ltnfxhip-pris2 1) +(def-tex charHOLD ltnfxhip-pris2 2) +(def-tex torn-armlft ltnfxhip-pris2 3) +(def-tex torn-armor ltnfxhip-pris2 4) +(def-tex torn-belt ltnfxhip-pris2 5) +(def-tex torn-belt2 ltnfxhip-pris2 6) +(def-tex torn-blademetal ltnfxhip-pris2 7) +(def-tex torn-ear ltnfxhip-pris2 8) +(def-tex torn-eye ltnfxhip-pris2 9) +(def-tex torn-eyelid ltnfxhip-pris2 10) +(def-tex torn-face ltnfxhip-pris2 11) +(def-tex torn-face-right ltnfxhip-pris2 12) +(def-tex torn-finger ltnfxhip-pris2 13) +(def-tex torn-footleather ltnfxhip-pris2 14) +(def-tex torn-gunbarrel ltnfxhip-pris2 15) +(def-tex torn-gunbarrel-02 ltnfxhip-pris2 16) +(def-tex torn-hair-01 ltnfxhip-pris2 17) +(def-tex torn-hair-02 ltnfxhip-pris2 18) +(def-tex torn-handle-01 ltnfxhip-pris2 19) +(def-tex torn-legshield ltnfxhip-pris2 20) +(def-tex torn-metal2 ltnfxhip-pris2 21) +(def-tex torn-mouth ltnfxhip-pris2 22) +(def-tex torn-pipe ltnfxhip-pris2 23) +(def-tex torn-scarf ltnfxhip-pris2 24) +(def-tex torn-shoe ltnfxhip-pris2 25) +(def-tex torn-shoe-02 ltnfxhip-pris2 26) +(def-tex torn-teeth-01 ltnfxhip-pris2 27) +(def-tex torn-vest ltnfxhip-pris2 28) +(def-tex holograph-env-rim-dest ltnfxhip-warp 0) +(def-tex holograph-env-noise ltnfxhip-warp 1) +(def-tex holograph-env-rim ltnfxhip-warp 2) +(def-tex holograph-env-scan ltnfxhip-warp 3) +(def-tex bam-eyelight wascast-pris2 0) +(def-tex environment-oldmetal wascast-pris2 1) +(def-tex seem-arm wascast-pris2 2) +(def-tex seem-bootbottom wascast-pris2 3) +(def-tex seem-bootleg wascast-pris2 4) +(def-tex seem-bootlower wascast-pris2 5) +(def-tex seem-bootmet wascast-pris2 6) +(def-tex seem-boottoe wascast-pris2 7) +(def-tex seem-ear wascast-pris2 8) +(def-tex seem-eye wascast-pris2 9) +(def-tex seem-eyelid wascast-pris2 10) +(def-tex seem-face wascast-pris2 11) +(def-tex seem-finger wascast-pris2 12) +(def-tex seem-hand wascast-pris2 13) +(def-tex seem-headgearback wascast-pris2 14) +(def-tex seem-headpiecetop wascast-pris2 15) +(def-tex seem-pipeend wascast-pris2 16) +(def-tex seem-pipes-01 wascast-pris2 17) +(def-tex seem-pipes-02 wascast-pris2 18) +(def-tex seem-precmetal-chestplate-01 wascast-pris2 19) +(def-tex seem-precmetal-edge wascast-pris2 20) +(def-tex seem-precmetal-plain wascast-pris2 21) +(def-tex seem-skirt wascast-pris2 22) +(def-tex seem-skirt-small wascast-pris2 23) +(def-tex seem-straps wascast-pris2 24) +(def-tex seem-teeth wascast-pris2 25) +(def-tex seem-uppertorso wascast-pris2 26) +(def-tex king-arm wascast-pris2 27) +(def-tex king-blackskirt2 wascast-pris2 28) +(def-tex king-bluemetal wascast-pris2 29) +(def-tex king-bolt wascast-pris2 30) +(def-tex king-chest wascast-pris2 31) +(def-tex king-clip-02 wascast-pris2 32) +(def-tex king-ear wascast-pris2 33) +(def-tex king-earing wascast-pris2 34) +(def-tex king-face-01 wascast-pris2 35) +(def-tex king-finger wascast-pris2 36) +(def-tex king-greenmetal wascast-pris2 37) +(def-tex king-greenmetalplain wascast-pris2 38) +(def-tex king-hair wascast-pris2 39) +(def-tex king-hand wascast-pris2 40) +(def-tex king-horn wascast-pris2 41) +(def-tex king-iris wascast-pris2 42) +(def-tex king-leg wascast-pris2 43) +(def-tex king-lgblackstrap wascast-pris2 44) +(def-tex king-precursermetal-decor wascast-pris2 45) +(def-tex king-precursermetal-plain wascast-pris2 46) +(def-tex king-precursermetal-trim wascast-pris2 47) +(def-tex king-precursermetal-trim2 wascast-pris2 48) +(def-tex king-precursermetal-trimbolt wascast-pris2 49) +(def-tex king-shoebottom wascast-pris2 50) +(def-tex king-skirt wascast-pris2 51) +(def-tex king-skirt-b wascast-pris2 52) +(def-tex king-teeth wascast-pris2 53) +(def-tex king-thinstrap wascast-pris2 54) +(def-tex king-vest wascast-pris2 55) +(def-tex king-vestback wascast-pris2 56) +(def-tex king-wrap wascast-pris2 57) +(def-tex king-wraps wascast-pris2 58) +(def-tex king-wristband wascast-pris2 59) +(def-tex temple-waterfall templex-vis-water 0) +(def-tex temple-waterfall-dest templex-vis-water 1) +(def-tex temple_sandstone_dirt01 templex-vis-water 2) +(def-tex temple_sandstone_out_01 templex-vis-tfrag 0) +(def-tex temple_bark01 templex-vis-tfrag 1) +(def-tex temple_sandstone_base01 templex-vis-tfrag 2) +(def-tex temple_sandstone01 templex-vis-tfrag 3) +(def-tex temple_sandstone_trim01 templex-vis-tfrag 4) +(def-tex temple_sandstone_pill01 templex-vis-tfrag 5) +(def-tex temple_sandstone_taper01 templex-vis-tfrag 6) +(def-tex temple_sandstone_ground01 templex-vis-tfrag 7) +(def-tex wstd-torchbowl-coal-01 templex-vis-tfrag 8) +(def-tex temple_sandstone_trim02 templex-vis-tfrag 9) +(def-tex temple_sandstone_stepside01 templex-vis-tfrag 10) +(def-tex temple_sandstone_star01 templex-vis-tfrag 11) +(def-tex temple_sandstone_box01 templex-vis-tfrag 12) +(def-tex temple_metal02 templex-vis-tfrag 13) +(def-tex temple_metal01 templex-vis-tfrag 14) +(def-tex temple_sandstone_steptop01 templex-vis-tfrag 15) +(def-tex temple_sandstone_spikehole01 templex-vis-tfrag 16) +(def-tex temple_sandstone_dirt01 templex-vis-tfrag 17) +(def-tex temple_sandstone_ground02 templex-vis-tfrag 18) +(def-tex temple_sandstone_plat01 templex-vis-tfrag 20) +(def-tex rail-env-wall-01 templex-vis-tfrag 21) +(def-tex temple_sandstone_pill07 templex-vis-tfrag 27) +(def-tex temple_pre-01 templex-vis-tfrag 29) +(def-tex temple_pre-04 templex-vis-tfrag 30) +(def-tex temple_leaf02 templex-vis-shrub 0) +(def-tex temple_leaf01 templex-vis-shrub 1) +(def-tex for-shrub-grass templex-vis-shrub 2) +(def-tex wstd-torchbowl-coal-01 templex-vis-shrub 3) +(def-tex temple_sandstone_ground01 templex-vis-shrub 6) +(def-tex temple_sandstone_out_01 templex-vis-pris 0) +(def-tex temple_sandstone_scale_01 templex-vis-pris 1) +(def-tex temple_sandstone_trim02 templex-vis-pris 2) +(def-tex tpl-symbl-yellow-01 templex-vis-pris 3) +(def-tex fac-punch-wall-glass-01 factoryc-vis-water 3) +(def-tex fac-punch-wall-glass-edge-01 factoryc-vis-water 4) +(def-tex comb-temp-dark combx-tfrag 0) +(def-tex comb-temp-glass combx-tfrag 2) +(def-tex min-env-mar-01 combx-tfrag 3) +(def-tex minc-01 combx-tfrag 4) +(def-tex minc-pre-04 combx-tfrag 6) +(def-tex minc-pre-11 combx-tfrag 7) +(def-tex comb-pipe2 combx-tfrag 8) +(def-tex comb-plate-02 combx-tfrag 9) +(def-tex comb-crct-medium combx-tfrag 10) +(def-tex comb-comb-tile combx-tfrag 11) +(def-tex rail-env-wall-01 combx-tfrag 13) +(def-tex tpl-door-face-01 combx-tfrag 14) +(def-tex minc-pre-12 combx-water 0) +(def-tex rail-comb-01 railx-tfrag 7) +(def-tex rail-cord-01 railx-tfrag 8) +(def-tex rail-base-mid-01 railx-tfrag 9) +(def-tex rail-light-blue railx-tfrag 10) +(def-tex rail-base-dark-01 railx-tfrag 11) +(def-tex rail-edge-01 railx-tfrag 12) +(def-tex rail-pipe-01 railx-tfrag 13) +(def-tex rail-trim-01 railx-tfrag 14) +(def-tex rail-light-yellow railx-tfrag 15) +(def-tex rail-detail-01 railx-tfrag 16) +(def-tex rail-pipe-02 railx-tfrag 17) +(def-tex rail-env-wall-01 railx-tfrag 18) +(def-tex rail-vent-01 railx-tfrag 19) +(def-tex rail-comb-02 railx-tfrag 20) +(def-tex rail-base-dark-trim-01 railx-tfrag 21) +(def-tex rail-tread-01 railx-tfrag 22) +(def-tex rail-base-mid-trim-01 railx-tfrag 23) +(def-tex rail-env-ground-01 railx-tfrag 24) +(def-tex rail-pipe-03 railx-tfrag 25) +(def-tex rail-pipe-04 railx-tfrag 26) +(def-tex rail-light-yellow-small railx-tfrag 27) +(def-tex rail-fit-01 railx-tfrag 28) +(def-tex rail-step-05 railx-tfrag 29) +(def-tex rail-step-03 railx-tfrag 30) +(def-tex rail-step-04 railx-tfrag 31) +(def-tex rail-step-01 railx-tfrag 32) +(def-tex rail-step-06 railx-tfrag 33) +(def-tex rail-step-02 railx-tfrag 34) +(def-tex rail-step-07 railx-tfrag 35) +(def-tex rail-grate-01 railx-tfrag 36) +(def-tex rail-light-blue-small railx-tfrag 38) +(def-tex rail-light-blue-small-3 railx-tfrag 39) +(def-tex rail-light-blue-small-2 railx-tfrag 40) +(def-tex rail-light-red railx-tfrag 41) +(def-tex rail-monitor-screen-01 railx-tfrag 42) +(def-tex rail-monitor-screen-02 railx-tfrag 43) +(def-tex mhcity-de-door-skin-01 mhcitya-vis-pris 0) +(def-tex mhcity-de-door-skin-02 mhcitya-vis-pris 1) +(def-tex mhcity-grunt-egg-base-01 mhcitya-vis-pris 2) +(def-tex mhcity-grunt-egg-bulb-01 mhcitya-vis-pris 3) +(def-tex mhcity-grunt-egg-bulbtop-01 mhcitya-vis-pris 4) +(def-tex mhcity-grunt-egg-gem-01 mhcitya-vis-pris 5) +(def-tex mhcity-grunt-egg-neck-01 mhcitya-vis-pris 6) +(def-tex mhcity-grunt-egg-rim-01 mhcitya-vis-pris 7) +(def-tex mhcity-vein-01 mhcitya-vis-pris 8) +(def-tex mhcity-grunt-egg-03 mhcitya-vis-pris 19) +(def-tex mhcity-grunt-egg-metal-01 mhcitya-vis-pris 20) +(def-tex mhcity-de-door-glow-01 mhcitya-vis-pris 21) +(def-tex mhcity-de-door-glow-off mhcitya-vis-pris 22) +(def-tex mhcity-grunt-egg-rim-burn mhcitya-vis-pris 24) +(def-tex mhcity-wall-tentacle-01 mhcitya-vis-pris 25) +(def-tex mhcity-eggskin mhcitya-vis-pris 26) +(def-tex mhcity-floor-brace-02 mhcitya-vis-pris 27) +(def-tex mhcity-puffer-mid-01 mhcitya-vis-pris 28) +(def-tex mhcity-puffer-top-01 mhcitya-vis-pris 29) +(def-tex mhcity-twitch-blade-cap mhcitya-vis-pris 30) +(def-tex mhcity-basebone mhcitya-vis-pris 32) +(def-tex mhcity-dirtymetal mhcitya-vis-pris 33) +(def-tex mhcity-bubble mhcitya-vis-pris 40) +(def-tex mhcity-wall-tentacle-01 mhcitya-vis-tfrag 0) +(def-tex mhcity-eggskin mhcitya-vis-tfrag 1) +(def-tex mhcity-grunt-egg-rim-01 mhcitya-vis-tfrag 2) +(def-tex mhcity-wall-tentacle-02 mhcitya-vis-tfrag 3) +(def-tex mhcity-baserock mhcitya-vis-tfrag 4) +(def-tex mhcity-grunt-egg-03 mhcitya-vis-tfrag 5) +(def-tex mhcity-building-base-01 mhcitya-vis-tfrag 6) +(def-tex mhcity-grunt-egg-metal-01 mhcitya-vis-tfrag 7) +(def-tex mhcity-building-door-frame mhcitya-vis-tfrag 8) +(def-tex mhcity-grunt-egg-neck-01 mhcitya-vis-tfrag 9) +(def-tex mhcity-black mhcitya-vis-tfrag 10) +(def-tex mhcity-vein-01 mhcitya-vis-tfrag 11) +(def-tex mhcity-skin-ground-01 mhcitya-vis-tfrag 12) +(def-tex mhcity-grunt-egg-gem-01 mhcitya-vis-tfrag 13) +(def-tex mhcity-floor-brace-02 mhcitya-vis-tfrag 14) +(def-tex mhcity-skin-ground-to-floor-01 mhcitya-vis-tfrag 15) +(def-tex mhcity-grunt-egg-03-to-floor mhcitya-vis-tfrag 16) +(def-tex mhcity-gapfiller-top-01 mhcitya-vis-tfrag 18) +(def-tex mhcity-de-tower-under mhcitya-vis-tfrag 23) +(def-tex mhcity-lilhouse-door-frame mhcitya-vis-tfrag 24) +(def-tex mhcity-base-02 mhcitya-vis-tfrag 25) +(def-tex mhcity-bigwall mhcitya-vis-tfrag 26) +(def-tex mhcity-mektunnel mhcitya-vis-tfrag 29) +(def-tex mhcity-farm-dirt-01 mhcitya-vis-tfrag 31) +(def-tex mhcity-basebone mhcitya-vis-tfrag 32) +(def-tex mhcity-base-ground mhcitya-vis-tfrag 33) +(def-tex mhcity-toadstool-vein-01 mhcitya-vis-tfrag 35) +(def-tex mhcity-de-tower-puff-01 mhcitya-vis-tfrag 39) +(def-tex mhcity-goo-base mhcitya-vis-tfrag 40) +(def-tex mhcity-base mhcitya-vis-tfrag 43) +(def-tex mhcity-grunt-egg-rim-01 mhcitya-vis-shrub 0) +(def-tex mhcity-eggskin mhcitya-vis-shrub 1) +(def-tex mhcity-grunt-egg-horns-01 mhcitya-vis-shrub 2) +(def-tex city-wire mhcitya-vis-shrub 3) +(def-tex mhcity-plant-01 mhcitya-vis-shrub 4) +(def-tex mhcity-plant-light-01 mhcitya-vis-shrub 5) +(def-tex city-farm-cattail-grass mhcitya-vis-shrub 6) +(def-tex city-ind-stain-02 mhcitya-vis-shrub 8) +(def-tex mhcity-goo-plants mhcitya-vis-shrub 11) +(def-tex mhcity-pebbles mhcitya-vis-shrub 12) +(def-tex mhcity-wall-tentacle-01 mhcityb-vis-tfrag 0) +(def-tex mhcity-eggskin mhcityb-vis-tfrag 1) +(def-tex mhcity-grunt-egg-rim-01 mhcityb-vis-tfrag 2) +(def-tex mhcity-wall-tentacle-02 mhcityb-vis-tfrag 3) +(def-tex mhcity-baserock mhcityb-vis-tfrag 4) +(def-tex mhcity-grunt-egg-03 mhcityb-vis-tfrag 5) +(def-tex mhcity-skin-ground-01 mhcityb-vis-tfrag 6) +(def-tex mhcity-floor-brace-02 mhcityb-vis-tfrag 7) +(def-tex mhcity-vein-01 mhcityb-vis-tfrag 8) +(def-tex mhcity-skin-ground-to-floor-01 mhcityb-vis-tfrag 9) +(def-tex mhcity-grunt-egg-03-to-floor mhcityb-vis-tfrag 10) +(def-tex mhcity-grunt-egg-gem-01 mhcityb-vis-tfrag 11) +(def-tex mhcity-gapfiller-top-01 mhcityb-vis-tfrag 13) +(def-tex mhcity-grunt-egg-metal-01 mhcityb-vis-tfrag 14) +(def-tex mhcity-building-base-01 mhcityb-vis-tfrag 15) +(def-tex mhcity-building-door-frame mhcityb-vis-tfrag 16) +(def-tex mhcity-grunt-egg-neck-01 mhcityb-vis-tfrag 17) +(def-tex mhcity-black mhcityb-vis-tfrag 18) +(def-tex mhcity-lilhouse-door-frame mhcityb-vis-tfrag 19) +(def-tex mhcity-base-02 mhcityb-vis-tfrag 20) +(def-tex mhcity-bigwall mhcityb-vis-tfrag 21) +(def-tex mhcity-mektunnel mhcityb-vis-tfrag 25) +(def-tex mhcity-de-tower-under mhcityb-vis-tfrag 26) +(def-tex mhcity-tallhouse mhcityb-vis-tfrag 35) +(def-tex mhcity-de-tower-puff-01 mhcityb-vis-tfrag 37) +(def-tex mhcity-goo-base mhcityb-vis-tfrag 38) +(def-tex mhcity-grind-strand-01 mhcityb-vis-tfrag 39) +(def-tex mhcity-basebone mhcityb-vis-tfrag 40) +(def-tex mhcity-base mhcityb-vis-tfrag 44) +(def-tex mhcity-grunt-egg-rim-01 mhcityb-vis-shrub 0) +(def-tex mhcity-eggskin mhcityb-vis-shrub 1) +(def-tex mhcity-grunt-egg-horns-01 mhcityb-vis-shrub 2) +(def-tex mhcity-plant-01 mhcityb-vis-shrub 3) +(def-tex mhcity-plant-light-01 mhcityb-vis-shrub 4) +(def-tex city-wire mhcityb-vis-shrub 6) +(def-tex mhcity-goo-plants mhcityb-vis-shrub 8) +(def-tex city-ind-stain-02 mhcityb-vis-shrub 9) +(def-tex mhcity-grunt-egg-base-01 mhcityb-vis-pris 0) +(def-tex mhcity-grunt-egg-bulb-01 mhcityb-vis-pris 1) +(def-tex mhcity-grunt-egg-bulbtop-01 mhcityb-vis-pris 2) +(def-tex mhcity-grunt-egg-gem-01 mhcityb-vis-pris 3) +(def-tex mhcity-grunt-egg-neck-01 mhcityb-vis-pris 4) +(def-tex mhcity-grunt-egg-rim-01 mhcityb-vis-pris 5) +(def-tex mhcity-vein-01 mhcityb-vis-pris 6) +(def-tex mhcity-grunt-egg-03 mhcityb-vis-pris 7) +(def-tex mhcity-grunt-egg-metal-01 mhcityb-vis-pris 8) +(def-tex mhcity-twitch-blade-cap mhcityb-vis-pris 9) +(def-tex mhcity-eggskin mhcityb-vis-pris 10) +(def-tex mhcity-floor-brace-02 mhcityb-vis-pris 11) +(def-tex mhcity-puffer-mid-01 mhcityb-vis-pris 12) +(def-tex mhcity-puffer-top-01 mhcityb-vis-pris 13) +(def-tex common-black mhcityb-vis-pris 14) +(def-tex mhcity-grunt-egg-horns-01 mhcityb-vis-pris 15) +(def-tex mhcity-tower-door-frame-01 mhcityb-vis-pris 16) +(def-tex mhcity-tower-door-metal-01 mhcityb-vis-pris 17) +(def-tex mhcity-wall-tentacle-01 mhcityb-vis-pris 18) +(def-tex mh-spawner-01 mhcityb-vis-pris 19) +(def-tex mh-spawner-02 mhcityb-vis-pris 20) +(def-tex mh-spawner-inner-mouth-01 mhcityb-vis-pris 21) +(def-tex mh-spawner-metal-01 mhcityb-vis-pris 22) +(def-tex mh-spawner-metal-tooth mhcityb-vis-pris 23) +(def-tex mhcity-basebone mhcityb-vis-pris 29) +(def-tex mhcity-dirtymetal mhcityb-vis-pris 30) +(def-tex mhcity-bubble mhcityb-vis-pris 31) +(def-tex jakc-wristband-a2 ldmpckgn-pris 0) +(def-tex jakchires-brownstrap ldmpckgn-pris 1) +(def-tex jakchires-precarmor-01 ldmpckgn-pris 2) +(def-tex bam-eyelight ldmpckgn-pris 3) +(def-tex pecker-body-01 ldmpckgn-pris 4) +(def-tex pecker-eyelid ldmpckgn-pris 5) +(def-tex pecker-face ldmpckgn-pris 6) +(def-tex pecker-plume ldmpckgn-pris 7) +(def-tex pecker-tail ldmpckgn-pris 8) +(def-tex pecker-teeth ldmpckgn-pris 9) +(def-tex pecker-wingbottom ldmpckgn-pris 10) +(def-tex pecker-wingtop ldmpckgn-pris 11) +(def-tex pecker-yellowfur ldmpckgn-pris 12) +(def-tex bam-eyelight ldmpckgn-pris2 0) +(def-tex environment-oldmetal ldmpckgn-pris2 1) +(def-tex king-arm ldmpckgn-pris2 2) +(def-tex king-blackskirt2 ldmpckgn-pris2 3) +(def-tex king-bluemetal ldmpckgn-pris2 4) +(def-tex king-bolt ldmpckgn-pris2 5) +(def-tex king-chest ldmpckgn-pris2 6) +(def-tex king-clip-02 ldmpckgn-pris2 7) +(def-tex king-ear ldmpckgn-pris2 8) +(def-tex king-earing ldmpckgn-pris2 9) +(def-tex king-face-01 ldmpckgn-pris2 10) +(def-tex king-finger ldmpckgn-pris2 11) +(def-tex king-greenmetal ldmpckgn-pris2 12) +(def-tex king-greenmetalplain ldmpckgn-pris2 13) +(def-tex king-hair ldmpckgn-pris2 14) +(def-tex king-hand ldmpckgn-pris2 15) +(def-tex king-horn ldmpckgn-pris2 16) +(def-tex king-iris ldmpckgn-pris2 17) +(def-tex king-leg ldmpckgn-pris2 18) +(def-tex king-lgblackstrap ldmpckgn-pris2 19) +(def-tex king-precursermetal-decor ldmpckgn-pris2 20) +(def-tex king-precursermetal-plain ldmpckgn-pris2 21) +(def-tex king-precursermetal-trim ldmpckgn-pris2 22) +(def-tex king-precursermetal-trim2 ldmpckgn-pris2 23) +(def-tex king-precursermetal-trimbolt ldmpckgn-pris2 24) +(def-tex king-shoebottom ldmpckgn-pris2 25) +(def-tex king-skirt ldmpckgn-pris2 26) +(def-tex king-skirt-b ldmpckgn-pris2 27) +(def-tex king-teeth ldmpckgn-pris2 28) +(def-tex king-thinstrap ldmpckgn-pris2 29) +(def-tex king-vest ldmpckgn-pris2 30) +(def-tex king-vestback ldmpckgn-pris2 31) +(def-tex king-wrap ldmpckgn-pris2 32) +(def-tex king-wraps ldmpckgn-pris2 33) +(def-tex king-wristband ldmpckgn-pris2 34) +(def-tex remote-metal-face-02 ltnjxhip-tfrag 0) +(def-tex remote-metal-face-01 ltnjxhip-tfrag 1) +(def-tex remote-button ltnjxhip-tfrag 2) +(def-tex common-black ltnjxhip-tfrag 3) +(def-tex remote-rim-01 ltnjxhip-tfrag 4) +(def-tex vehicle-wheel-01 ltrtwhls-pris 1) +(def-tex vehicle-tread-02 ltrtwhls-pris 2) +(def-tex water-splat lforplnt-sprite 0) +(def-tex hud-dax-missle-meter-01 lpatkcs-minimap 0) +(def-tex hud-dax-missle-meter-02 lpatkcs-minimap 1) +(def-tex hud-dax-missle-meter-03 lpatkcs-minimap 2) +(def-tex wascity-turret-hud-arrow-01 wascityb-minimap 0) +(def-tex wascity-turret-hud-big-arrow-01 wascityb-minimap 1) +(def-tex hud-dmrobot-target-01 wascityb-minimap 2) +(def-tex hud-dmrobot-target-02 wascityb-minimap 3) +(def-tex wascity-turret-hud-health-01 wascityb-minimap 4) +(def-tex wascity-turret-hud-health-02 wascityb-minimap 5) +(def-tex wascity-turret-hud-health-03 wascityb-minimap 6) +(def-tex wascity-turret-hud-health-04 wascityb-minimap 7) +(def-tex hud-dmrobot-target-03 wascityb-minimap 8) +(def-tex hud-dmrobot-target-small-01 wascityb-minimap 9) +(def-tex hud-target-reticle wascityb-minimap 16) +(def-tex bam-eyelight ljakndax-pris 0) +(def-tex bam-hairhilite ljakndax-pris 1) +(def-tex daxter-eyelid ljakndax-pris 2) +(def-tex daxter-furhilite ljakndax-pris 3) +(def-tex daxter-orange ljakndax-pris 4) +(def-tex daxterarm ljakndax-pris 5) +(def-tex daxterbodyshort-eix ljakndax-pris 6) +(def-tex daxterbolt ljakndax-pris 7) +(def-tex daxterear ljakndax-pris 8) +(def-tex daxterfinger ljakndax-pris 9) +(def-tex daxterfoot ljakndax-pris 10) +(def-tex daxterfoot-bottom ljakndax-pris 11) +(def-tex daxtergoggles ljakndax-pris 12) +(def-tex daxterheadwidenew ljakndax-pris 13) +(def-tex daxterhelmetplain ljakndax-pris 14) +(def-tex daxterlense ljakndax-pris 15) +(def-tex daxternose ljakndax-pris 16) +(def-tex daxterteeth ljakndax-pris 17) +(def-tex daxtertuft ljakndax-pris 18) +(def-tex environment-oldmetal ljakndax-pris 19) +(def-tex jakc-armor ljakndax-pris 20) +(def-tex jakc-chestplate-straps ljakndax-pris 21) +(def-tex jakc-gogglemetal ljakndax-pris 22) +(def-tex jakc-lens ljakndax-pris 23) +(def-tex jakc-scarf ljakndax-pris 24) +(def-tex jakc-scarfhanging ljakndax-pris 25) +(def-tex jakc-skirt ljakndax-pris 26) +(def-tex jakc-waistband2 ljakndax-pris 27) +(def-tex jakc-wraps ljakndax-pris 28) +(def-tex jakc-wristband-a2 ljakndax-pris 29) +(def-tex jakchires-arm ljakndax-pris 30) +(def-tex jakchires-blackstrap ljakndax-pris 31) +(def-tex jakchires-brownstrap ljakndax-pris 32) +(def-tex jakchires-brwnleather ljakndax-pris 33) +(def-tex jakchires-chestplate ljakndax-pris 34) +(def-tex jakchires-clips ljakndax-pris 35) +(def-tex jakchires-eye ljakndax-pris 36) +(def-tex jakchires-eyebrow ljakndax-pris 37) +(def-tex jakchires-eyelid ljakndax-pris 38) +(def-tex jakchires-facelft ljakndax-pris 39) +(def-tex jakchires-facert ljakndax-pris 40) +(def-tex jakchires-glovetop ljakndax-pris 41) +(def-tex jakchires-hair ljakndax-pris 42) +(def-tex jakchires-horn ljakndax-pris 43) +(def-tex jakchires-jacket ljakndax-pris 44) +(def-tex jakchires-leatherpouch ljakndax-pris 45) +(def-tex jakchires-lightbrownspat ljakndax-pris 46) +(def-tex jakchires-pants ljakndax-pris 47) +(def-tex jakchires-precarmor-01 ljakndax-pris 48) +(def-tex jakchires-shoebottom ljakndax-pris 49) +(def-tex jakchires-shoemetal ljakndax-pris 50) +(def-tex jakchires-shoeteop ljakndax-pris 51) +(def-tex jakchires-teeth ljakndax-pris 52) +(def-tex turbo-circle destrack-sprite 0) +(def-tex bam-eyelight mhctycst-pris 0) +(def-tex bam-hairhilite mhctycst-pris 1) +(def-tex daxter-eyelid mhctycst-pris 2) +(def-tex daxter-furhilite mhctycst-pris 3) +(def-tex daxter-orange mhctycst-pris 4) +(def-tex daxterarm mhctycst-pris 5) +(def-tex daxterbodyshort-eix mhctycst-pris 6) +(def-tex daxterbolt mhctycst-pris 7) +(def-tex daxterear mhctycst-pris 8) +(def-tex daxterfinger mhctycst-pris 9) +(def-tex daxterfoot mhctycst-pris 10) +(def-tex daxterfoot-bottom mhctycst-pris 11) +(def-tex daxtergoggles mhctycst-pris 12) +(def-tex daxterheadwidenew mhctycst-pris 13) +(def-tex daxterhelmetplain mhctycst-pris 14) +(def-tex daxterlense mhctycst-pris 15) +(def-tex daxternose mhctycst-pris 16) +(def-tex daxterteeth mhctycst-pris 17) +(def-tex daxtertuft mhctycst-pris 18) +(def-tex environment-oldmetal mhctycst-pris 19) +(def-tex jakc-armor mhctycst-pris 20) +(def-tex jakc-chestplate-straps mhctycst-pris 21) +(def-tex jakc-gogglemetal mhctycst-pris 22) +(def-tex jakc-lens mhctycst-pris 23) +(def-tex jakc-scarf mhctycst-pris 24) +(def-tex jakc-scarfhanging mhctycst-pris 25) +(def-tex jakc-skirt mhctycst-pris 26) +(def-tex jakc-waistband2 mhctycst-pris 27) +(def-tex jakc-wraps mhctycst-pris 28) +(def-tex jakc-wristband-a2 mhctycst-pris 29) +(def-tex jakchires-arm mhctycst-pris 30) +(def-tex jakchires-blackstrap mhctycst-pris 31) +(def-tex jakchires-brownstrap mhctycst-pris 32) +(def-tex jakchires-brwnleather mhctycst-pris 33) +(def-tex jakchires-chestplate mhctycst-pris 34) +(def-tex jakchires-clips mhctycst-pris 35) +(def-tex jakchires-eye mhctycst-pris 36) +(def-tex jakchires-eyebrow mhctycst-pris 37) +(def-tex jakchires-eyelid mhctycst-pris 38) +(def-tex jakchires-facelft mhctycst-pris 39) +(def-tex jakchires-facert mhctycst-pris 40) +(def-tex jakchires-glovetop mhctycst-pris 41) +(def-tex jakchires-hair mhctycst-pris 42) +(def-tex jakchires-horn mhctycst-pris 43) +(def-tex jakchires-jacket mhctycst-pris 44) +(def-tex jakchires-leatherpouch mhctycst-pris 45) +(def-tex jakchires-lightbrownspat mhctycst-pris 46) +(def-tex jakchires-pants mhctycst-pris 47) +(def-tex jakchires-precarmor-01 mhctycst-pris 48) +(def-tex jakchires-shoebottom mhctycst-pris 49) +(def-tex jakchires-shoemetal mhctycst-pris 50) +(def-tex jakchires-shoeteop mhctycst-pris 51) +(def-tex jakchires-teeth mhctycst-pris 52) +(def-tex mhcity-grunt-egg-horns-01 mhctycst-pris 56) +(def-tex mhcity-grunt-egg-metal-01 mhctycst-pris 57) +(def-tex mhcity-vein-01 mhctycst-pris 58) +(def-tex jakchires-arm-dark mhctycst-pris 59) +(def-tex jakchires-arm-norm mhctycst-pris 60) +(def-tex jakchires-eye-dark mhctycst-pris 61) +(def-tex jakchires-eye-norm mhctycst-pris 62) +(def-tex jakchires-eyebrow-dark mhctycst-pris 63) +(def-tex jakchires-eyebrow-norm mhctycst-pris 64) +(def-tex jakchires-eyelid-dark mhctycst-pris 65) +(def-tex jakchires-eyelid-norm mhctycst-pris 66) +(def-tex jakchires-facelft-dark mhctycst-pris 67) +(def-tex jakchires-facelft-norm mhctycst-pris 68) +(def-tex jakchires-facert-dark mhctycst-pris 69) +(def-tex jakchires-facert-norm mhctycst-pris 70) +(def-tex jakchires-hair-dark mhctycst-pris 71) +(def-tex jakchires-hair-norm mhctycst-pris 72) +(def-tex mhcity-de-tower-egg-inside mhctycst-pris 73) +(def-tex mhcity-de-tower-egg lctydest-water 0) +(def-tex mhcity-de-tower-egg mhctycst-water 0) +(def-tex hud-kg-bombbot-hud-01 lbombbot-minimap 0) +(def-tex water-splat mhcitya-sprite 0) +(def-tex dust-sparkle mhcitya-sprite 2) +(def-tex hud-jetboard-health lforplnt-minimap 1) +(def-tex wascity-turret-hud-big-arrow-01 desbattl-minimap 0) +(def-tex hud-des-beast desbattl-minimap 1) +(def-tex hud-target-reticle desbattl-minimap 2) +(def-tex hud-ashlyn-head desoasis-minimap 0) +(def-tex hud-gladiator desoasis-minimap 1) +(def-tex rub-water rubblea-vis-water 2) +(def-tex rub-water-dest rubblea-vis-water 3) +(def-tex cityslumc-purple-plain slumbset-tfrag 0) +(def-tex ctyslumc-railing-trim slumbset-tfrag 1) +(def-tex ctyslumc-floor-base slumbset-tfrag 2) +(def-tex ctyslumc-wall slumbset-tfrag 3) +(def-tex ctyslumc-billc slumbset-tfrag 4) +(def-tex cityslumc-lamp-small slumbset-tfrag 5) +(def-tex ctyslumc-light-amber slumbset-tfrag 6) +(def-tex cityslumc-lamp-red slumbset-tfrag 7) +(def-tex cityslumc-lamp-gold slumbset-tfrag 8) +(def-tex cityslumc-door-plate slumbset-tfrag 9) +(def-tex cityslumc-purple-column slumbset-tfrag 10) +(def-tex cityslumc-purple-column-2 slumbset-tfrag 11) +(def-tex ctyslumc-overhang-02 slumbset-tfrag 12) +(def-tex common-black slumbset-tfrag 13) +(def-tex ctyslumc-grass slumbset-tfrag 14) +(def-tex ctyslumc-flowerbed-flowers-a slumbset-tfrag 15) +(def-tex ctyslumc-tree-top slumbset-tfrag 16) +(def-tex ctyslumc-pinetree-big-bark slumbset-tfrag 17) +(def-tex ctyslumc-overhang-03 slumbset-tfrag 18) +(def-tex cityslumc-pinkish-purple slumbset-tfrag 19) +(def-tex ctyslumc-window-panes2 slumbset-tfrag 20) +(def-tex ctyslumc-green slumbset-tfrag 21) +(def-tex ctyslumc-roof slumbset-tfrag 22) +(def-tex ctyslumc-window-panes slumbset-tfrag 23) +(def-tex cityslumc-awning slumbset-tfrag 24) +(def-tex cityslumc-grey-side-pillar slumbset-tfrag 25) +(def-tex ctyslumc-wall-trim slumbset-tfrag 26) +(def-tex cityslumc-wall-surface-01 slumbset-tfrag 27) +(def-tex ctyslumc-overhang-01 slumbset-tfrag 28) +(def-tex cityslumc-gold-trim slumbset-tfrag 29) +(def-tex ctyslumc-light-blue slumbset-tfrag 30) +(def-tex cityslumc-little-gold slumbset-tfrag 31) +(def-tex cityslumc-top-pillar slumbset-tfrag 32) +(def-tex cityslumc-door slumbset-tfrag 33) +(def-tex cityslumc-pipe slumbset-tfrag 34) +(def-tex ctyslumc-window slumbset-tfrag 35) +(def-tex ctyslumc-brown slumbset-tfrag 36) +(def-tex common-gun-panel-03 slumbset-tfrag 37) +(def-tex ctyslumc-wall-sliver slumbset-tfrag 38) +(def-tex ctyslumc-vine-hang-a slumbset-tfrag 39) +(def-tex stdm-bush-01 slumbset-tfrag 40) +(def-tex ctyslumc-light slumbset-tfrag 41) +(def-tex ctyslumc-wall-colored slumbset-tfrag 42) +(def-tex ctyslumc-wall-colored2 slumbset-tfrag 43) +(def-tex cityslumc-metal-trim slumbset-tfrag 44) +(def-tex ctyslumc-grate1 slumbset-tfrag 45) +(def-tex cityslumc-awning-LOW slumbset-tfrag 46) +(def-tex city-tile-LOW slumbset-tfrag 47) +(def-tex ctyslumc-window-panes-LOW slumbset-tfrag 48) +(def-tex ctyslumc-wall-trim-LOW slumbset-tfrag 49) +(def-tex city-ind-black slumbset-tfrag 50) +(def-tex cityslumc-grass slumbset-shrub 0) +(def-tex cityslumc-gold-trim slumbset-shrub 1) +(def-tex ctyslumc-stain slumbset-shrub 2) +(def-tex cityslumc-grass-yellow slumbset-shrub 3) +(def-tex ctyslumc-decal-02 slumbset-shrub 4) +(def-tex ctyslumc-decal-04 slumbset-shrub 5) +(def-tex ctyslumc-wall slumbset-shrub 6) +(def-tex ctyslumc-light slumbset-shrub 7) +(def-tex ctyslumc-wire slumbset-shrub 8) +(def-tex ctyslumb-water-dest slumbset-water 0) +(def-tex keira-mask slumbset-water 1) +(def-tex ctyslumb-fountain-fall-dest slumbset-water 2) +(def-tex comb-temp-medium comba-tfrag 0) +(def-tex comb-temp-dark comba-tfrag 1) +(def-tex comb-temp-glass comba-tfrag 2) +(def-tex comb-temp-light comba-tfrag 3) +(def-tex comb-crct-small-drk comba-tfrag 4) +(def-tex comb-crct-medium comba-tfrag 5) +(def-tex comb-crct-small comba-tfrag 6) +(def-tex comb-tarn-wall-01 comba-tfrag 7) +(def-tex comb-tarn-fade-wall-01 comba-tfrag 8) +(def-tex rail-base-mid-01 comba-tfrag 11) +(def-tex comb-env comba-tfrag 12) +(def-tex comb-pipe1 comba-tfrag 14) +(def-tex comb-ring comba-tfrag 15) +(def-tex rail-light-red comba-tfrag 16) +(def-tex comb-pipe comba-tfrag 17) +(def-tex comb-long-vent comba-tfrag 18) +(def-tex rail-pipe-01 comba-tfrag 19) +(def-tex comb-comb-tile comba-tfrag 20) +(def-tex comb-plate-02 comba-tfrag 21) +(def-tex comb-pipe2 comba-tfrag 22) +(def-tex comb-pipe3 comba-tfrag 23) +(def-tex comb-grate comba-tfrag 24) +(def-tex comb-env2 comba-tfrag 25) +(def-tex comb-yell-light comba-tfrag 26) +(def-tex rail-edge-01 comba-tfrag 27) +(def-tex rail-pipe-03 comba-tfrag 28) +(def-tex rail-cord-01 comba-tfrag 29) +(def-tex comb-redmarker comba-tfrag 31) +(def-tex rail-gray-metal-01 comba-tfrag 32) +(def-tex rail-pipe-02 comba-tfrag 33) +(def-tex rail-pipe-05 comba-tfrag 34) +(def-tex bam-eyelight slumbset-pris 0) +(def-tex bam-hairhilite slumbset-pris 1) +(def-tex daxter-eyelid slumbset-pris 2) +(def-tex daxter-furhilite slumbset-pris 3) +(def-tex daxter-orange slumbset-pris 4) +(def-tex daxterarm slumbset-pris 5) +(def-tex daxterbodyshort-eix slumbset-pris 6) +(def-tex daxterbolt slumbset-pris 7) +(def-tex daxterear slumbset-pris 8) +(def-tex daxterfinger slumbset-pris 9) +(def-tex daxterfoot slumbset-pris 10) +(def-tex daxterfoot-bottom slumbset-pris 11) +(def-tex daxtergoggles slumbset-pris 12) +(def-tex daxterheadwidenew slumbset-pris 13) +(def-tex daxterhelmetplain slumbset-pris 14) +(def-tex daxterlense slumbset-pris 15) +(def-tex daxternose slumbset-pris 16) +(def-tex daxterteeth slumbset-pris 17) +(def-tex daxtertuft slumbset-pris 18) +(def-tex environment-oldmetal slumbset-pris 19) +(def-tex jakc-armor slumbset-pris 20) +(def-tex jakc-chestplate-straps slumbset-pris 21) +(def-tex jakc-gogglemetal slumbset-pris 22) +(def-tex jakc-lens slumbset-pris 23) +(def-tex jakc-scarf slumbset-pris 24) +(def-tex jakc-scarfhanging slumbset-pris 25) +(def-tex jakc-skirt slumbset-pris 26) +(def-tex jakc-waistband2 slumbset-pris 27) +(def-tex jakc-wraps slumbset-pris 28) +(def-tex jakc-wristband-a2 slumbset-pris 29) +(def-tex jakchires-arm slumbset-pris 30) +(def-tex jakchires-blackstrap slumbset-pris 31) +(def-tex jakchires-brownstrap slumbset-pris 32) +(def-tex jakchires-brwnleather slumbset-pris 33) +(def-tex jakchires-chestplate slumbset-pris 34) +(def-tex jakchires-clips slumbset-pris 35) +(def-tex jakchires-eye slumbset-pris 36) +(def-tex jakchires-eyebrow slumbset-pris 37) +(def-tex jakchires-eyelid slumbset-pris 38) +(def-tex jakchires-facelft slumbset-pris 39) +(def-tex jakchires-facert slumbset-pris 40) +(def-tex jakchires-glovetop slumbset-pris 41) +(def-tex jakchires-hair slumbset-pris 42) +(def-tex jakchires-horn slumbset-pris 43) +(def-tex jakchires-jacket slumbset-pris 44) +(def-tex jakchires-leatherpouch slumbset-pris 45) +(def-tex jakchires-lightbrownspat slumbset-pris 46) +(def-tex jakchires-pants slumbset-pris 47) +(def-tex jakchires-precarmor-01 slumbset-pris 48) +(def-tex jakchires-shoebottom slumbset-pris 49) +(def-tex jakchires-shoemetal slumbset-pris 50) +(def-tex jakchires-shoeteop slumbset-pris 51) +(def-tex jakchires-teeth slumbset-pris 52) +(def-tex keira-bellylong slumbset-pris 53) +(def-tex keira-belt slumbset-pris 54) +(def-tex keira-blackstrap slumbset-pris 55) +(def-tex keira-brownstraps-new slumbset-pris 56) +(def-tex keira-chokerhighres slumbset-pris 57) +(def-tex keira-chokermetal slumbset-pris 58) +(def-tex keira-eyelid slumbset-pris 59) +(def-tex keira-face slumbset-pris 60) +(def-tex keira-glasses slumbset-pris 61) +(def-tex keira-glovenewlarge slumbset-pris 62) +(def-tex keira-gogglestrap slumbset-pris 63) +(def-tex keira-hair-newest slumbset-pris 64) +(def-tex keira-handbottom slumbset-pris 65) +(def-tex keira-handtop slumbset-pris 66) +(def-tex keira-iris-64x64 slumbset-pris 67) +(def-tex keira-largewraps slumbset-pris 68) +(def-tex keira-lens-large slumbset-pris 69) +(def-tex keira-maskbolt slumbset-pris 70) +(def-tex keira-pantslarge slumbset-pris 71) +(def-tex keira-shirt slumbset-pris 72) +(def-tex keira-shoebottom slumbset-pris 73) +(def-tex keira-torch-guard-01 slumbset-pris 74) +(def-tex keira-torch-nozzle-01 slumbset-pris 75) +(def-tex keira-torch-nozzle-02 slumbset-pris 76) +(def-tex hud-vehicle-health-bar-01 stadiuma-minimap 0) +(def-tex comb-grate comba-alpha 0) +(def-tex comb-env2 comba-alpha 10) +(def-tex rail-light-red comba-alpha 12) +(def-tex comb-pre-metal-01-yellow comba-alpha 14) +(def-tex comb-pre-metal-fade-yellow comba-alpha 15) +(def-tex comb-pre-metal-01-plain comba-alpha 16) +(def-tex comb-pre-metal-fade-plain comba-alpha 17) +(def-tex rail-base-dark-01 railf-tfrag 1) +(def-tex rail-light-blue railf-tfrag 2) +(def-tex rail-light-yellow-small railf-tfrag 3) +(def-tex rail-edge-01 railf-tfrag 4) +(def-tex rail-cord-01 railf-tfrag 5) +(def-tex rail-detail-01 railf-tfrag 6) +(def-tex rail-base-mid-01 railf-tfrag 7) +(def-tex rail-gray-metal-01 railf-tfrag 8) +(def-tex rail-pipe-03 railf-tfrag 9) +(def-tex rail-pipe-01 railf-tfrag 10) +(def-tex rail-env-car-01 railf-tfrag 11) +(def-tex rail-pipe-05 railf-tfrag 12) +(def-tex comb-temp-glass railf-tfrag 13) +(def-tex rail-patch-01 railf-tfrag 14) +(def-tex comb-temp-dark railf-tfrag 15) +(def-tex comb-redmarker railf-tfrag 16) +(def-tex rail-light-yellow railf-tfrag 17) +(def-tex rail-light-blue-small railf-tfrag 18) +(def-tex rail-pipe-02 railf-tfrag 19) +(def-tex rail-rock-01 railf-tfrag 20) +(def-tex rail-light-red railf-tfrag 21) +(def-tex rail-fit-01 railf-tfrag 22) +(def-tex rail-env-wall-01 railf-tfrag 23) +(def-tex comb-ring railf-tfrag 24) +(def-tex comb-pipe2 railf-tfrag 25) +(def-tex comb-env2 railf-tfrag 26) +(def-tex rail-patch-01 railc-tfrag 2) +(def-tex comb-temp-glass railc-tfrag 3) +(def-tex comb-temp-dark railc-tfrag 4) +(def-tex rail-env-car-01 railc-tfrag 7) +(def-tex rail-light-blue railc-tfrag 8) +(def-tex rail-edge-01 railc-tfrag 9) +(def-tex rail-base-mid-01 railc-tfrag 10) +(def-tex rail-base-dark-01 railc-tfrag 11) +(def-tex rail-gray-metal-01 railc-tfrag 12) +(def-tex rail-light-blue-small railc-tfrag 13) +(def-tex rail-detail-01 railc-tfrag 14) +(def-tex rail-cord-01 railc-tfrag 15) +(def-tex rail-pipe-01 railc-tfrag 16) +(def-tex rail-pipe-03 railc-tfrag 17) +(def-tex rail-trim-01 railc-tfrag 18) +(def-tex rail-tread-01 railc-tfrag 19) +(def-tex rail-light-yellow-small railc-tfrag 20) +(def-tex rail-rock-01 railc-tfrag 21) +(def-tex rail-env-wall-01 railc-tfrag 22) +(def-tex comb-redmarker railc-tfrag 23) +(def-tex rail-light-yellow railc-tfrag 24) +(def-tex rail-pipe-05 railc-tfrag 25) +(def-tex rail-light-red railc-tfrag 26) +(def-tex rail-pipe-02 railc-tfrag 27) +(def-tex comb-ring railc-tfrag 28) +(def-tex rail-fit-01 railc-tfrag 29) +(def-tex rail-edge-01 raile-tfrag 1) +(def-tex rail-base-mid-01 raile-tfrag 2) +(def-tex rail-light-blue-small raile-tfrag 3) +(def-tex rail-detail-01 raile-tfrag 4) +(def-tex rail-cord-01 raile-tfrag 5) +(def-tex rail-pipe-01 raile-tfrag 6) +(def-tex rail-pipe-03 raile-tfrag 7) +(def-tex rail-patch-01 raile-tfrag 8) +(def-tex rail-light-blue raile-tfrag 9) +(def-tex rail-base-dark-01 raile-tfrag 10) +(def-tex rail-gray-metal-01 raile-tfrag 11) +(def-tex rail-env-car-01 raile-tfrag 12) +(def-tex rail-rock-01 raile-tfrag 13) +(def-tex comb-temp-glass raile-tfrag 14) +(def-tex rail-light-yellow-small raile-tfrag 15) +(def-tex comb-redmarker raile-tfrag 16) +(def-tex rail-light-yellow raile-tfrag 17) +(def-tex rail-light-red raile-tfrag 18) +(def-tex rail-fit-01 raile-tfrag 20) +(def-tex rail-pipe-05 raile-tfrag 21) +(def-tex rail-pipe-02 raile-tfrag 22) +(def-tex rail-env-wall-01 raile-tfrag 23) +(def-tex comb-temp-dark raile-tfrag 24) +(def-tex comb-ring raile-tfrag 25) +(def-tex rail-trim-01 raile-tfrag 26) +(def-tex comb-temp-dark raild-tfrag 1) +(def-tex comb-temp-glass raild-tfrag 2) +(def-tex rail-trim-01 raild-tfrag 4) +(def-tex rail-patch-01 raild-tfrag 5) +(def-tex rail-light-blue-small raild-tfrag 6) +(def-tex rail-edge-01 raild-tfrag 7) +(def-tex rail-base-mid-01 raild-tfrag 8) +(def-tex rail-base-dark-01 raild-tfrag 9) +(def-tex rail-env-car-01 raild-tfrag 11) +(def-tex rail-detail-01 raild-tfrag 12) +(def-tex rail-cord-01 raild-tfrag 13) +(def-tex rail-pipe-01 raild-tfrag 14) +(def-tex rail-pipe-03 raild-tfrag 15) +(def-tex rail-light-blue raild-tfrag 16) +(def-tex rail-gray-metal-01 raild-tfrag 17) +(def-tex rail-pipe-05 raild-tfrag 18) +(def-tex rail-rock-01 raild-tfrag 19) +(def-tex comb-redmarker raild-tfrag 20) +(def-tex rail-light-yellow raild-tfrag 21) +(def-tex rail-light-red raild-tfrag 22) +(def-tex rail-light-yellow-small raild-tfrag 24) +(def-tex rail-pipe-02 raild-tfrag 25) +(def-tex rail-fit-01 raild-tfrag 26) +(def-tex comb-ring raild-tfrag 27) +(def-tex rail-tread-01 raild-tfrag 28) +(def-tex rail-env-wall-01 raild-tfrag 30) +(def-tex comb-temp-dark railb-tfrag 2) +(def-tex comb-temp-glass railb-tfrag 3) +(def-tex rail-patch-01 railb-tfrag 5) +(def-tex rail-light-blue railb-tfrag 6) +(def-tex rail-edge-01 railb-tfrag 7) +(def-tex rail-base-mid-01 railb-tfrag 8) +(def-tex rail-base-dark-01 railb-tfrag 9) +(def-tex rail-gray-metal-01 railb-tfrag 10) +(def-tex rail-light-blue-small railb-tfrag 11) +(def-tex rail-detail-01 railb-tfrag 12) +(def-tex rail-cord-01 railb-tfrag 13) +(def-tex rail-pipe-01 railb-tfrag 14) +(def-tex rail-pipe-03 railb-tfrag 15) +(def-tex rail-rock-01 railb-tfrag 16) +(def-tex rail-env-car-01 railb-tfrag 17) +(def-tex rail-light-yellow-small railb-tfrag 18) +(def-tex rail-light-yellow railb-tfrag 19) +(def-tex rail-trim-01 railb-tfrag 20) +(def-tex comb-redmarker railb-tfrag 21) +(def-tex rail-pipe-05 railb-tfrag 22) +(def-tex rail-pipe-02 railb-tfrag 23) +(def-tex comb-ring railb-tfrag 24) +(def-tex rail-light-red railb-tfrag 25) +(def-tex comb-pipe2 railb-tfrag 26) +(def-tex rail-env-wall-01 railb-tfrag 27) +(def-tex comb-env2 railb-tfrag 28) +(def-tex security-dot-dest comba-water 0) +(def-tex security-env-dest comba-water 1) +(def-tex security-dot-src comba-water 2) +(def-tex security-env-uscroll comba-water 3) +(def-tex rail-base-mid-01 raila-pris 20) +(def-tex rail-env-wall-01 raila-pris 25) +(def-tex rail-light-red raila-pris 28) +(def-tex rail-pipe-03 raila-pris 29) +(def-tex rail-cord-01 raila-pris 31) +(def-tex rail-edge-01 raila-pris 32) +(def-tex rail-pipe-01 raila-pris 33) +(def-tex rail-detail-01 raila-pris 34) +(def-tex rail-trim-01 raila-pris 35) +(def-tex rub-wall-gen-03 rubblea2-vis-tfrag 0) +(def-tex rub-beam-gen rubblea2-vis-tfrag 1) +(def-tex rub-metal-flatpipe-01 rubblea2-vis-tfrag 3) +(def-tex rub-rubble-01 rubblea2-vis-tfrag 5) +(def-tex rub-wall-trim rubblea2-vis-tfrag 6) +(def-tex rub-wall-side-beam-02 rubblea2-vis-tfrag 7) +(def-tex rub-city-wall-inside-damaged rubblea2-vis-tfrag 8) +(def-tex rub-palace-tower-side rubblea2-vis-tfrag 9) +(def-tex rub-panels-01 rubblea2-vis-tfrag 10) +(def-tex rub-wall-gen-04 rubblea2-vis-tfrag 11) +(def-tex rub-wall-gen-02 rubblea2-vis-tfrag 12) +(def-tex rub-met-strp-close rubblea2-vis-tfrag 13) +(def-tex rub-wall-gen-01 rubblea2-vis-tfrag 14) +(def-tex rub-rock rubblea2-vis-tfrag 15) +(def-tex rub-roof-support rubblea2-vis-tfrag 16) +(def-tex rub-stone-05 rubblea2-vis-tfrag 17) +(def-tex rub-city-wall-frame rubblea2-vis-tfrag 18) +(def-tex rub-citywall rubblea2-vis-tfrag 19) +(def-tex rub-palshaft-dirt-blue-01 rubblea2-vis-tfrag 20) +(def-tex rub-city-wall-bottom-frame rubblea2-vis-tfrag 25) +(def-tex rub-city-wall-main rubblea2-vis-tfrag 26) +(def-tex rub-endblocks rubblea2-vis-tfrag 27) +(def-tex rub-metal-wallgrill rubblea2-vis-tfrag 28) +(def-tex rub-supportmetall rubblea2-vis-tfrag 29) +(def-tex rub-butress-metal-01 rubblea2-vis-tfrag 30) +(def-tex rub-butress-metal-02 rubblea2-vis-tfrag 31) +(def-tex rub-ground rubblea2-vis-tfrag 32) +(def-tex rub-statue-stone-01 rubblea2-vis-tfrag 33) +(def-tex rub-copper-metal-02 rubblea2-vis-tfrag 34) +(def-tex rub-dirt-a rubblea2-vis-tfrag 35) +(def-tex rub-metal-pipeside-01 rubblea2-vis-tfrag 36) +(def-tex rub-cement-a rubblea2-vis-tfrag 37) +(def-tex rub-wall-gen-06 rubblea2-vis-tfrag 38) +(def-tex rub-metal-01 rubblea2-vis-tfrag 39) +(def-tex rub-wall-side-beam rubblea2-vis-tfrag 40) +(def-tex rub-grass rubblea2-vis-tfrag 41) +(def-tex rub-stream-rocks rubblea2-vis-tfrag 42) +(def-tex rub-wallrock-dirt rubblea2-vis-tfrag 43) +(def-tex rub-cement-broken-end rubblea2-vis-tfrag 44) +(def-tex rub-grass-fringe rubblea2-vis-tfrag 45) +(def-tex rub-roof-tile rubblea2-vis-tfrag 46) +(def-tex rub-window-02 rubblea2-vis-tfrag 47) +(def-tex rub-rock-small rubblea2-vis-tfrag 48) +(def-tex rub-lamp-fencespike-round rubblea2-vis-tfrag 56) +(def-tex rub-lamp-light-01 rubblea2-vis-tfrag 57) +(def-tex rub-copper-metal-01 rubblea2-vis-tfrag 58) +(def-tex rub-elec-switch-light-on rubblea2-vis-tfrag 59) +(def-tex rub-elec-switch-light-off rubblea2-vis-tfrag 60) +(def-tex rub-cement-top rubblea2-vis-tfrag 66) +(def-tex rub-greyblue-plain-lowres rubblea2-vis-shrub 0) +(def-tex rub-beam-gen rubblea2-vis-shrub 1) +(def-tex rub-wall-small-grill rubblea2-vis-shrub 2) +(def-tex rub-met-strp-close rubblea2-vis-shrub 3) +(def-tex rub-shrub-grass rubblea2-vis-shrub 4) +(def-tex rub-crater-shards-01 rubblea2-vis-shrub 5) +(def-tex rub-ground-01-small rubblea2-vis-shrub 6) +(def-tex rub-shrub-cattail rubblea2-vis-shrub 11) +(def-tex rub-overlay-bullethole-c rubblea2-vis-shrub 12) +(def-tex rub-stain-01 rubblea2-vis-shrub 13) +(def-tex rub-dirt-a rubblea2-vis-water 1) +(def-tex rub-watera2 rubblea2-vis-water 2) +(def-tex rub-water-desta2 rubblea2-vis-water 3) +(def-tex rub-water-wave-01-dest rubblea2-vis-water 5) +(def-tex bam-eyelight railcst-pris 0) +(def-tex bam-hairhilite railcst-pris 1) +(def-tex daxter-eyelid railcst-pris 2) +(def-tex daxter-furhilite railcst-pris 3) +(def-tex daxter-orange railcst-pris 4) +(def-tex daxterarm railcst-pris 5) +(def-tex daxterbodyshort-eix railcst-pris 6) +(def-tex daxterbolt railcst-pris 7) +(def-tex daxterear railcst-pris 8) +(def-tex daxterfinger railcst-pris 9) +(def-tex daxterfoot railcst-pris 10) +(def-tex daxterfoot-bottom railcst-pris 11) +(def-tex daxtergoggles railcst-pris 12) +(def-tex daxterheadwidenew railcst-pris 13) +(def-tex daxterhelmetplain railcst-pris 14) +(def-tex daxterlense railcst-pris 15) +(def-tex daxternose railcst-pris 16) +(def-tex daxterteeth railcst-pris 17) +(def-tex daxtertuft railcst-pris 18) +(def-tex environment-oldmetal railcst-pris 20) +(def-tex jakc-armor railcst-pris 21) +(def-tex jakc-chestplate-straps railcst-pris 22) +(def-tex jakc-gogglemetal railcst-pris 23) +(def-tex jakc-lens railcst-pris 24) +(def-tex jakc-scarf railcst-pris 25) +(def-tex jakc-scarfhanging railcst-pris 26) +(def-tex jakc-skirt railcst-pris 27) +(def-tex jakc-waistband2 railcst-pris 28) +(def-tex jakc-wraps railcst-pris 29) +(def-tex jakc-wristband-a2 railcst-pris 30) +(def-tex jakchires-arm railcst-pris 31) +(def-tex jakchires-blackstrap railcst-pris 32) +(def-tex jakchires-brownstrap railcst-pris 33) +(def-tex jakchires-brwnleather railcst-pris 34) +(def-tex jakchires-chestplate railcst-pris 35) +(def-tex jakchires-clips railcst-pris 36) +(def-tex jakchires-eye railcst-pris 37) +(def-tex jakchires-eyebrow railcst-pris 38) +(def-tex jakchires-eyelid railcst-pris 39) +(def-tex jakchires-facelft railcst-pris 40) +(def-tex jakchires-facert railcst-pris 41) +(def-tex jakchires-glovetop railcst-pris 42) +(def-tex jakchires-hair railcst-pris 43) +(def-tex jakchires-horn railcst-pris 44) +(def-tex jakchires-jacket railcst-pris 45) +(def-tex jakchires-leatherpouch railcst-pris 46) +(def-tex jakchires-lightbrownspat railcst-pris 47) +(def-tex jakchires-pants railcst-pris 48) +(def-tex jakchires-precarmor-01 railcst-pris 49) +(def-tex jakchires-shoebottom railcst-pris 50) +(def-tex jakchires-shoemetal railcst-pris 51) +(def-tex jakchires-shoeteop railcst-pris 52) +(def-tex jakchires-teeth railcst-pris 53) +(def-tex prec-leader-beard railcst-pris 54) +(def-tex prec-leader-face2 railcst-pris 55) +(def-tex prec-leader-foreheadshield railcst-pris 56) +(def-tex prec-leader-hair railcst-pris 57) +(def-tex prec-leader-headshield railcst-pris 58) +(def-tex prec-teeth railcst-pris 59) +(def-tex prec-hand-back railcst-pris 71) +(def-tex prec-handpalm railcst-pris 72) +(def-tex prec-leader-armband railcst-pris 73) +(def-tex prec-neck railcst-pris 74) +(def-tex prec-surfer-chain railcst-pris 75) +(def-tex prec-surfer-chain-02 railcst-pris 76) +(def-tex prec-surfer-chain-03 railcst-pris 77) +(def-tex prec-surfer-hair railcst-pris 78) +(def-tex prec-surfer-hairshort railcst-pris 79) +(def-tex prec-surfer-pants railcst-pris 80) +(def-tex prec-surfer-sash railcst-pris 81) +(def-tex prec-surfer-shirt railcst-pris 82) +(def-tex prec-surfer-sleeve railcst-pris 83) +(def-tex prec-leader-arm railcst-pris 84) +(def-tex prec-leader-belt railcst-pris 85) +(def-tex prec-leader-frontskirt railcst-pris 86) +(def-tex prec-leader-pants railcst-pris 87) +(def-tex prec-leader-robe-02 railcst-pris 88) +(def-tex prec-leader-shirt railcst-pris 89) +(def-tex prec-leader-wrap railcst-pris 90) +(def-tex prec-orblarge railcst-pris 91) +(def-tex prec-orbsmall railcst-pris 92) +(def-tex prec-staff-01 railcst-pris 93) +(def-tex prec-staff-02 railcst-pris 94) +(def-tex torn-armor railcst-pris 106) +(def-tex torn-gunbarrel railcst-pris 107) +(def-tex torn-gunbarrel-02 railcst-pris 108) +(def-tex torn-handle-01 railcst-pris 109) +(def-tex dark-crystal-knob-01 railcst-pris 126) +(def-tex dark-crystal-knob-02 railcst-pris 127) +(def-tex eco-lt-cryst-01 railcst-pris 128) +(def-tex eco-lt-cryst-02 railcst-pris 129) +(def-tex prec-dumb-helmet railcst-pris 130) +(def-tex prec-dumb-pants railcst-pris 131) +(def-tex prec-dumb-shirt railcst-pris 132) +(def-tex prec-dumb-sleeve railcst-pris 133) +(def-tex prec-tess-shirtstraps railcst-pris 134) +(def-tex prec-insidemouth railcst-pris 135) +(def-tex prec-controller-black railcst-pris 136) +(def-tex prec-controller-but railcst-pris 137) +(def-tex prec-controller-but2 railcst-pris 138) +(def-tex prec-controller-dk railcst-pris 139) +(def-tex prec-controller-plain railcst-pris 140) +(def-tex prec-controller-rim railcst-pris 141) +(def-tex prec-leader-robe-01 railcst-pris 142) +(def-tex bam-eyelight railcst-pris2 0) +(def-tex bam-hairhilite railcst-pris2 1) +(def-tex environment-oldmetal railcst-pris2 2) +(def-tex veger-bookleather railcst-pris2 3) +(def-tex veger-booksides railcst-pris2 4) +(def-tex veger-bookspine railcst-pris2 5) +(def-tex veger-bootbolt railcst-pris2 6) +(def-tex veger-bootfoot railcst-pris2 7) +(def-tex veger-bootstrap railcst-pris2 8) +(def-tex veger-coat railcst-pris2 9) +(def-tex veger-coatbelt railcst-pris2 10) +(def-tex veger-coatclips railcst-pris2 11) +(def-tex veger-endpaper railcst-pris2 12) +(def-tex veger-eyelid railcst-pris2 13) +(def-tex veger-face railcst-pris2 14) +(def-tex veger-fingerbottom railcst-pris2 15) +(def-tex veger-fingertop railcst-pris2 16) +(def-tex veger-gold railcst-pris2 17) +(def-tex veger-hair railcst-pris2 18) +(def-tex veger-hand railcst-pris2 19) +(def-tex veger-iris railcst-pris2 20) +(def-tex veger-legwraps railcst-pris2 21) +(def-tex veger-pages railcst-pris2 22) +(def-tex veger-pants railcst-pris2 23) +(def-tex veger-parchment railcst-pris2 24) +(def-tex veger-scarf railcst-pris2 25) +(def-tex veger-shoebottom railcst-pris2 26) +(def-tex veger-shoulderplate railcst-pris2 27) +(def-tex veger-shoulderplatemetal railcst-pris2 28) +(def-tex veger-sleeve railcst-pris2 29) +(def-tex veger-sleevelower railcst-pris2 30) +(def-tex veger-stickwrap railcst-pris2 31) +(def-tex veger-teeth railcst-pris2 32) +(def-tex veger-vest railcst-pris2 33) +(def-tex veger-walkingstick-01 railcst-pris2 34) +(def-tex veger-walkingstick-02 railcst-pris2 35) +(def-tex veger-walkingstick-03 railcst-pris2 36) +(def-tex veger-whitecloth railcst-pris2 37) +(def-tex daxter-eyelid railcst-pris2 38) +(def-tex daxter-furhilite railcst-pris2 39) +(def-tex daxterteeth railcst-pris2 40) +(def-tex prec-veger-body railcst-pris2 41) +(def-tex prec-veger-ear railcst-pris2 42) +(def-tex prec-veger-foot railcst-pris2 43) +(def-tex prec-veger-foot-02 railcst-pris2 44) +(def-tex prec-veger-handback railcst-pris2 45) +(def-tex prec-veger-handpalm railcst-pris2 46) +(def-tex prec-veger-leg railcst-pris2 47) +(def-tex prec-veger-mouth railcst-pris2 48) +(def-tex prec-veger-neck railcst-pris2 49) +(def-tex prec-veger-newface railcst-pris2 50) +(def-tex prec-veger-nose railcst-pris2 51) +(def-tex prec-veger-orange railcst-pris2 52) +(def-tex prec-veger-sleeve railcst-pris2 53) +(def-tex prec-veger-spat railcst-pris2 54) +(def-tex prec-veger-vest railcst-pris2 55) +(def-tex stdm-grass-fringe stadium-vis-alpha 0) +(def-tex environment-darkprec wasdefen-pris 0) +(def-tex dp-robot-hull-03 wasdefen-pris 1) +(def-tex dp-robot-leg-hull-01 wasdefen-pris 2) +(def-tex dp-robot-panel-03 wasdefen-pris 3) +(def-tex dp-robot-panel-05 wasdefen-pris 4) +(def-tex dp-robot-rim-01 wasdefen-pris 5) +(def-tex dp-robot-tendons-01 wasdefen-pris 6) +(def-tex dp-robot-cable-01 wasdefen-pris 7) +(def-tex dp-robot-eyes wasdefen-pris 8) +(def-tex dp-robot-globe-joint wasdefen-pris 9) +(def-tex dp-robot-hex-pattern-01 wasdefen-pris 10) +(def-tex dp-robot-hull-01 wasdefen-pris 11) +(def-tex dp-robot-hull-02 wasdefen-pris 12) +(def-tex dp-robot-hull-04 wasdefen-pris 13) +(def-tex dp-robot-panel-02 wasdefen-pris 14) +(def-tex dp-robot-panel-06 wasdefen-pris 15) +(def-tex dp-robot-pipe-01 wasdefen-pris 16) +(def-tex dp-robot-tentacle-01 wasdefen-pris 17) +(def-tex dm-missle-body wasdefen-pris 18) +(def-tex dm-missle-tip wasdefen-pris 19) +(def-tex dm-missle-tubes wasdefen-pris 20) +(def-tex dm-missle-tip-glow-01 wasdefen-pris 21) +(def-tex palcab-lowres-background-hills-01 ltowcity-tfrag 0) +(def-tex strip-metal-02-lores ltowcity-tfrag 1) +(def-tex palcab-lowres-ctywide-wall-01 ltowcity-tfrag 2) +(def-tex palcab-lowres-background-crater-bottom-enviro ltowcity-tfrag 3) +(def-tex palcab-lowres-background-rocksnow2 ltowcity-tfrag 4) +(def-tex palcab-lowres-background-rocksnow ltowcity-tfrag 5) +(def-tex palcab-lowres-ctywide-wall-02 ltowcity-tfrag 6) +(def-tex palcab-lowres-ctyslum-ground ltowcity-tfrag 7) +(def-tex palcab-lowres-ctyslum-roof-03 ltowcity-tfrag 8) +(def-tex palcab-lowres-ctyslum-roof-01 ltowcity-tfrag 9) +(def-tex palcab-lowres-ctyslum-wall-01 ltowcity-tfrag 10) +(def-tex palcab-lowres-ctyslum-wall-02 ltowcity-tfrag 11) +(def-tex palcab-lowres-ctyslum-roof-02 ltowcity-tfrag 12) +(def-tex palcab-lowres-ctyslum-wall-04 ltowcity-tfrag 13) +(def-tex palcab-lowres-ctyslum-wall-03 ltowcity-tfrag 14) +(def-tex palcab-pipe-hoze ltowcity-tfrag 15) +(def-tex palcab-lowres-mark-roof-02 ltowcity-tfrag 16) +(def-tex city-lowres-ind-wall-04 ltowcity-tfrag 17) +(def-tex palcab-steel-lores ltowcity-tfrag 18) +(def-tex palcab-lowres-stadium-canopy ltowcity-tfrag 19) +(def-tex city-lowres-ind-wall-02 ltowcity-tfrag 20) +(def-tex city-lowres-fort-yellow ltowcity-tfrag 21) +(def-tex city-lowres-fort-red ltowcity-tfrag 22) +(def-tex palcab-lowres-mark-roof-01 ltowcity-tfrag 23) +(def-tex city-lowres-ind-wall-01 ltowcity-tfrag 24) +(def-tex city-lowres-port-roof ltowcity-tfrag 25) +(def-tex city-lowres-ind-wall-03 ltowcity-tfrag 26) +(def-tex city-lowres-ind-wall-07 ltowcity-tfrag 27) +(def-tex city-lowres-ind-wall-08 ltowcity-tfrag 28) +(def-tex city-lowres-ind-wall-05 ltowcity-tfrag 29) +(def-tex city-lowres-ind-wall-06 ltowcity-tfrag 30) +(def-tex palcab-lowres-mark-roof-rim-01 ltowcity-tfrag 31) +(def-tex palcab-lowres-mark-shops-01 ltowcity-tfrag 32) +(def-tex palcab-lowres-mark-awning-green ltowcity-tfrag 33) +(def-tex palcab-lowres-mark-awning-red ltowcity-tfrag 34) +(def-tex city-lowres-ctygen-side-02 ltowcity-tfrag 35) +(def-tex city-lowres-ctygen-stripe-01 ltowcity-tfrag 36) +(def-tex city-lowres-ctygen-roof-02 ltowcity-tfrag 37) +(def-tex city-lowres-ctygen-build-01 ltowcity-tfrag 38) +(def-tex palcab-lowres-mark-highway ltowcity-tfrag 39) +(def-tex city-lowres-ctygen-build-02 ltowcity-tfrag 40) +(def-tex city-lowres-ctygen-side-01 ltowcity-tfrag 41) +(def-tex city-lowres-ctygen-build-03 ltowcity-tfrag 42) +(def-tex city-lowres-ctygen-build-05 ltowcity-tfrag 43) +(def-tex city-lowres-ctygen-build-04 ltowcity-tfrag 44) +(def-tex city-lowres-ctygen-roof-01 ltowcity-tfrag 45) +(def-tex city-lowres-ctygen-stripe-02 ltowcity-tfrag 46) +(def-tex palcab-lorez-metal03 ltowcity-tfrag 47) +(def-tex palcab-lorez-metal01 ltowcity-tfrag 48) +(def-tex t-citywide-met-strp02 ltowcity-tfrag 49) +(def-tex t-citywide-met-strp01 ltowcity-tfrag 50) +(def-tex t-citywide-met-pill-01 ltowcity-tfrag 51) +(def-tex t-citywide-red-met-01 ltowcity-tfrag 52) +(def-tex t-citywide-met-wall-02 ltowcity-tfrag 53) +(def-tex t-palshaft-plate01 ltowcity-tfrag 54) +(def-tex palcab-lowres-background-mount-build-01 ltowcity-tfrag 55) +(def-tex palcab-lowres-background-mount-build-02 ltowcity-tfrag 56) +(def-tex palcab-lowres-background-mount-build-03 ltowcity-tfrag 57) +(def-tex t-strip-lo-palsup-panel-1 ltowcity-tfrag 59) +(def-tex t-strip-lo-palsup-panel-2 ltowcity-tfrag 60) +(def-tex t-strip-lo-palsup-panel-3 ltowcity-tfrag 61) +(def-tex t-strip-lo-palsup-panel-4 ltowcity-tfrag 62) +(def-tex t-strip-lo-palsup-panel-5 ltowcity-tfrag 63) +(def-tex t-strip-lo-palsup-danger1 ltowcity-tfrag 64) +(def-tex t-strip-lo-palsup-danger2 ltowcity-tfrag 65) +(def-tex city-lowres-newslums-stripe-02 ltowcity-tfrag 66) +(def-tex city-lowres-newslums-bigwindows-02 ltowcity-tfrag 67) +(def-tex city-lowres-newslums-stripe-01 ltowcity-tfrag 68) +(def-tex city-lowres-damaged-01 ltowcity-tfrag 69) +(def-tex t-citywide-wall-tile-01 ltowcity-tfrag 70) +(def-tex palcab-lowres-farm-wall ltowcity-tfrag 71) +(def-tex palcab-lowres-farm-wall-top ltowcity-tfrag 72) +(def-tex t-palshaft-roof-01 ltowcity-tfrag 73) +(def-tex palace-break-girder01 ltowcity-tfrag 74) +(def-tex citywide-palace-01 ltowcity-tfrag 75) +(def-tex citywide-hangmetal ltowcity-tfrag 76) +(def-tex city-lowres-mhcity-wall-02 ltowcity-tfrag 77) +(def-tex city-lowres-mhcity-wall-01 ltowcity-tfrag 78) +(def-tex city-lowres-mhcity-detower-01 ltowcity-tfrag 79) +(def-tex city-lowres-mhcity-detower-02 ltowcity-tfrag 80) +(def-tex common-black ltowcity-tfrag 83) +(def-tex city-lowres-mhcity-wall-03 ltowcity-tfrag 84) +(def-tex palcab-swingp-base-lores ltowcity-tfrag 85) +(def-tex palcab-lorez-asphalt01 ltowcity-tfrag 86) +(def-tex palcab-lowres-background-trees-edge ltowcity-tfrag 87) +(def-tex palcab-lowres-background-trees2 ltowcity-tfrag 88) +(def-tex palcab-lorez-metal02 ltowcity-tfrag 89) +(def-tex palcab-lorez-metal01-red ltowcity-tfrag 90) +(def-tex palcab-lorez-metal01-red-stripe ltowcity-tfrag 91) +(def-tex palcab-lorez-plates01 ltowcity-tfrag 92) +(def-tex tcab-beam01 ltowcity-tfrag 93) +(def-tex palcab-wall-lores ltowcity-tfrag 94) +(def-tex tcab-plat-edg-01-lores ltowcity-tfrag 95) +(def-tex palace-break-brokenwall ltowcity-tfrag 96) +(def-tex t-palshaft-panl-01 ltowcity-tfrag 97) +(def-tex citywide-consite-steel ltowcity-tfrag 98) +(def-tex palcab-lowres-stadium-grass ltowcity-tfrag 99) +(def-tex ctyp-metal-01 ltowcity-tfrag 100) +(def-tex palcab-lowres-background-strip ltowcity-tfrag 101) +(def-tex t-palshaft-pil-01 ltowcity-tfrag 102) +(def-tex ctywide-ox-met-01 ltowcity-tfrag 103) +(def-tex t-palshaft-r-strp-plate01 ltowcity-tfrag 104) +(def-tex palcab-lorez-plates-red-stripe01 ltowcity-tfrag 105) +(def-tex city-lowres-mhcity-tower-01 ltowcity-tfrag 106) +(def-tex palcab-swingp-trim ltowcity-tfrag 107) +(def-tex city-lowres-mhcity-tower-02 ltowcity-tfrag 108) +(def-tex palcab-lowres-background-shoreline-01 ltowcity-tfrag 109) +(def-tex palcab-lowres-background-mountains ltowcity-tfrag 110) +(def-tex palcab-lowres-background-grass-to-desert-02 ltowcity-tfrag 111) +(def-tex palcab-lowres-background-grass-to-desert-01 ltowcity-tfrag 112) +(def-tex palcab-lowres-background-mounatin-window ltowcity-tfrag 113) +(def-tex palcab-lowres-background-hilltops-01 ltowcity-tfrag 114) +(def-tex palcab-lowres-background-desert-01 ltowcity-tfrag 115) +(def-tex city-lowres-mhcity-ground-01 ltowcity-tfrag 116) +(def-tex tcab-beam01-lores ltowcity-tfrag 117) +(def-tex tcab-blue-ring-01 ltowcity-tfrag 118) +(def-tex palcab-lowres-background-peaks-01 ltowcity-tfrag 119) +(def-tex palcab-lowres-background-shoreline-02 ltowcity-tfrag 120) +(def-tex palcab-lowres-background-desert-to-shore ltowcity-tfrag 121) +(def-tex palcab-lowres-background-crater-01 ltowcity-tfrag 122) +(def-tex palcab-smallpipe-lores ltowcity-tfrag 123) +(def-tex palcab-lowres-background-peaks-02 ltowcity-tfrag 124) +(def-tex palcab-lowres-background-mountains-02 ltowcity-tfrag 125) +(def-tex rub-palace-tower-side ltowcity-tfrag 126) +(def-tex palcab-lowres-background-shoreline-02 ltowcity-alpha 0) +(def-tex palcab-lowres-background-crater-rim ltowcity-alpha 1) +(def-tex palcab-lowres-background-trees-edge ltowcity-alpha 2) +(def-tex palcab-lowres-background-trees2 ltowcity-alpha 3) +(def-tex palcab-lowres-ctyslum-wall-03 ltowcity-alpha 4) +(def-tex hud-jinx-head ljinx-minimap 0) +(def-tex bam-eyelight stadium-vis-pris 7) +(def-tex bam-hairhilite stadium-vis-pris 8) +(def-tex daxter-eyelid stadium-vis-pris 9) +(def-tex daxter-furhilite stadium-vis-pris 10) +(def-tex daxter-orange stadium-vis-pris 11) +(def-tex daxterarm stadium-vis-pris 12) +(def-tex daxterbodyshort-eix stadium-vis-pris 13) +(def-tex daxterbolt stadium-vis-pris 14) +(def-tex daxterear stadium-vis-pris 15) +(def-tex daxterfinger stadium-vis-pris 16) +(def-tex daxterfoot stadium-vis-pris 17) +(def-tex daxterfoot-bottom stadium-vis-pris 18) +(def-tex daxtergoggles stadium-vis-pris 19) +(def-tex daxterheadwidenew stadium-vis-pris 20) +(def-tex daxterhelmetplain stadium-vis-pris 21) +(def-tex daxterlense stadium-vis-pris 22) +(def-tex daxternose stadium-vis-pris 23) +(def-tex daxterteeth stadium-vis-pris 24) +(def-tex daxtertuft stadium-vis-pris 25) +(def-tex common-black lfaccar-pris 7) +(def-tex fac-vehicle-body-01 lfaccar-pris 8) +(def-tex fac-vehicle-body-02 lfaccar-pris 9) +(def-tex fac-vehicle-bolt-01 lfaccar-pris 10) +(def-tex fac-vehicle-brace-pipe-01 lfaccar-pris 11) +(def-tex fac-vehicle-cap-pin-01 lfaccar-pris 12) +(def-tex fac-vehicle-controls lfaccar-pris 13) +(def-tex fac-vehicle-detail-01 lfaccar-pris 15) +(def-tex fac-vehicle-exhaust-01 lfaccar-pris 17) +(def-tex fac-vehicle-exhaust-pipe-01 lfaccar-pris 18) +(def-tex fac-vehicle-hubcap-01 lfaccar-pris 20) +(def-tex fac-vehicle-metal-plate-02 lfaccar-pris 21) +(def-tex fac-vehicle-rim-01 lfaccar-pris 22) +(def-tex fac-vehicle-safety-plate-01 lfaccar-pris 23) +(def-tex fac-vehicle-tank-01 lfaccar-pris 24) +(def-tex fac-vehicle-tank-02 lfaccar-pris 25) +(def-tex fac-vehicle-tire-tread-01 lfaccar-pris 26) +(def-tex jets01 lfaccar-pris 27) +(def-tex light01 lfaccar-pris 28) +(def-tex lightCase01 lfaccar-pris 29) +(def-tex tread-interceptor-rhino lfaccar-pris 30) +(def-tex vehicle-snake-tread-01 lsnkwhls-pris 0) +(def-tex vehicle-snake-tread-02 lsnkwhls-pris 1) +(def-tex vehicle-wheel-01 lsnkwhls-pris 2) +(def-tex homing-missle-body lctyprot-pris 0) +(def-tex homing-missle-body-tip lctyprot-pris 1) +(def-tex homing-missle-exhaust lctyprot-pris 2) +(def-tex homing-missle-fin-01 lctyprot-pris 3) +(def-tex common-black lctyprot-pris 4) +(def-tex kg-rob-trans-door-edge-01 lctyprot-pris 5) +(def-tex kg-rob-trans-gun05 lctyprot-pris 6) +(def-tex kg-rob-trans-panel-01 lctyprot-pris 7) +(def-tex kg-rob-trans-panel-02 lctyprot-pris 8) +(def-tex kg-rob-trans-panel-03 lctyprot-pris 9) +(def-tex kg-rob-trans-panel-04 lctyprot-pris 10) +(def-tex kg-rob-trans-panel-05 lctyprot-pris 11) +(def-tex kg-rob-trans-panel-06 lctyprot-pris 12) +(def-tex kg-rob-trans-ribs01 lctyprot-pris 13) +(def-tex kg-rob-trans-rod-01 lctyprot-pris 14) +(def-tex kg-rob-trans-rod-02 lctyprot-pris 15) +(def-tex kg-rob-trans-thruster-01 lctyprot-pris 16) +(def-tex kg-rob-trans-thruster-02 lctyprot-pris 17) +(def-tex kg-rob-trans-thruster-03 lctyprot-pris 18) +(def-tex kg-rob-trans-thruster-04 lctyprot-pris 19) +(def-tex kg-rob-trans-thruster-glow-01 lctyprot-pris 20) +(def-tex missle-launcher-gear-02 lctyprot-pris 22) +(def-tex missle-launcher-metal-01 lctyprot-pris 23) +(def-tex missle-launcher-panel-02 lctyprot-pris 25) +(def-tex missle-launcher-rim-01 lctyprot-pris 26) +(def-tex missle-launcher-shaft-01 lctyprot-pris 27) +(def-tex missle-launcher-top-01 lctyprot-pris 28) +(def-tex missle-launcher-top-02 lctyprot-pris 29) +(def-tex missle-launcher-tube lctyprot-pris 30) +(def-tex missle-launcher-tube-end-01 lctyprot-pris 31) +(def-tex missle-launcher-tube-end-02 lctyprot-pris 32) +(def-tex kg-rob-trans-gun04 lctyprot-pris 33) +(def-tex comb-grate combn-alpha 0) +(def-tex bam-eyelight outrocst-pris 0) +(def-tex bam-hairhilite outrocst-pris 1) +(def-tex environment-oldmetal outrocst-pris 20) +(def-tex jakc-armor outrocst-pris 25) +(def-tex jakc-chestplate-straps outrocst-pris 26) +(def-tex jakc-gogglemetal outrocst-pris 27) +(def-tex jakc-lens outrocst-pris 28) +(def-tex jakc-scarf outrocst-pris 29) +(def-tex jakc-scarfhanging outrocst-pris 30) +(def-tex jakc-skirt outrocst-pris 31) +(def-tex jakc-waistband2 outrocst-pris 32) +(def-tex jakc-wraps outrocst-pris 33) +(def-tex jakc-wristband-a2 outrocst-pris 34) +(def-tex jakchires-arm outrocst-pris 35) +(def-tex jakchires-blackstrap outrocst-pris 36) +(def-tex jakchires-brownstrap outrocst-pris 37) +(def-tex jakchires-brwnleather outrocst-pris 38) +(def-tex jakchires-chestplate outrocst-pris 39) +(def-tex jakchires-clips outrocst-pris 40) +(def-tex jakchires-eye outrocst-pris 41) +(def-tex jakchires-eyebrow outrocst-pris 42) +(def-tex jakchires-eyelid outrocst-pris 43) +(def-tex jakchires-facelft outrocst-pris 44) +(def-tex jakchires-facert outrocst-pris 45) +(def-tex jakchires-glovetop outrocst-pris 46) +(def-tex jakchires-hair outrocst-pris 47) +(def-tex jakchires-horn outrocst-pris 48) +(def-tex jakchires-jacket outrocst-pris 49) +(def-tex jakchires-leatherpouch outrocst-pris 50) +(def-tex jakchires-lightbrownspat outrocst-pris 51) +(def-tex jakchires-pants outrocst-pris 52) +(def-tex jakchires-precarmor-01 outrocst-pris 53) +(def-tex jakchires-shoebottom outrocst-pris 54) +(def-tex jakchires-shoemetal outrocst-pris 55) +(def-tex jakchires-shoeteop outrocst-pris 56) +(def-tex jakchires-teeth outrocst-pris 57) +(def-tex klever-arm outrocst-pris 58) +(def-tex klever-armor-01 outrocst-pris 59) +(def-tex klever-armor-02 outrocst-pris 60) +(def-tex klever-blackstrap outrocst-pris 61) +(def-tex klever-bolt outrocst-pris 62) +(def-tex klever-brownstrap outrocst-pris 63) +(def-tex klever-chest outrocst-pris 64) +(def-tex klever-clips outrocst-pris 65) +(def-tex klever-earcup outrocst-pris 66) +(def-tex klever-eye outrocst-pris 67) +(def-tex klever-eyelid outrocst-pris 68) +(def-tex klever-face-01 outrocst-pris 69) +(def-tex klever-face-01scars outrocst-pris 70) +(def-tex klever-fingerbottom outrocst-pris 71) +(def-tex klever-fingertop outrocst-pris 72) +(def-tex klever-gunmetal-01 outrocst-pris 73) +(def-tex klever-gunmetal-02 outrocst-pris 74) +(def-tex klever-gunmetal-03 outrocst-pris 75) +(def-tex klever-gunmetal-04 outrocst-pris 76) +(def-tex klever-gunmetal-05 outrocst-pris 77) +(def-tex klever-hair outrocst-pris 78) +(def-tex klever-hand outrocst-pris 79) +(def-tex klever-handwrap outrocst-pris 80) +(def-tex klever-horn outrocst-pris 81) +(def-tex klever-mustache outrocst-pris 82) +(def-tex klever-shoe outrocst-pris 83) +(def-tex klever-shoebottom outrocst-pris 84) +(def-tex klever-skirtdark outrocst-pris 85) +(def-tex klever-skirtlight outrocst-pris 86) +(def-tex klever-thighs outrocst-pris 87) +(def-tex klever-undershirt outrocst-pris 88) +(def-tex klever-widebrownstrap outrocst-pris 89) +(def-tex pecker-body-01 outrocst-pris 112) +(def-tex pecker-eyelid outrocst-pris 113) +(def-tex pecker-face outrocst-pris 114) +(def-tex pecker-plume outrocst-pris 115) +(def-tex pecker-tail outrocst-pris 116) +(def-tex pecker-teeth outrocst-pris 117) +(def-tex pecker-wingbottom outrocst-pris 118) +(def-tex pecker-wingtop outrocst-pris 119) +(def-tex pecker-yellowfur outrocst-pris 120) +(def-tex ashelin-beltbuckle outrocst-pris2 0) +(def-tex ashelin-bolts outrocst-pris2 1) +(def-tex ashelin-boottop outrocst-pris2 2) +(def-tex ashelin-brownstrap outrocst-pris2 3) +(def-tex ashelin-cglogo outrocst-pris2 4) +(def-tex ashelin-cgrank outrocst-pris2 5) +(def-tex ashelin-chest outrocst-pris2 6) +(def-tex ashelin-eye outrocst-pris2 7) +(def-tex ashelin-eyebrow outrocst-pris2 8) +(def-tex ashelin-eyelid outrocst-pris2 9) +(def-tex ashelin-face outrocst-pris2 10) +(def-tex ashelin-glove outrocst-pris2 11) +(def-tex ashelin-gunbarrel-01 outrocst-pris2 12) +(def-tex ashelin-gunbarrel-02 outrocst-pris2 13) +(def-tex ashelin-gunbarrel-03 outrocst-pris2 14) +(def-tex ashelin-gunholster outrocst-pris2 15) +(def-tex ashelin-hair outrocst-pris2 16) +(def-tex ashelin-handle-01 outrocst-pris2 17) +(def-tex ashelin-jacketbody outrocst-pris2 18) +(def-tex ashelin-jacketsleeve outrocst-pris2 19) +(def-tex ashelin-jacketstraps outrocst-pris2 20) +(def-tex ashelin-pantstop outrocst-pris2 21) +(def-tex ashelin-redtop outrocst-pris2 22) +(def-tex ashelin-shells outrocst-pris2 23) +(def-tex ashelin-shield outrocst-pris2 24) +(def-tex ashelin-shoebottom outrocst-pris2 25) +(def-tex ashelin-shoemetal outrocst-pris2 26) +(def-tex ashelin-teeth outrocst-pris2 27) +(def-tex ashelin-whitestrap outrocst-pris2 28) +(def-tex bam-eyelight outrocst-pris2 29) +(def-tex bam-hairhilite outrocst-pris2 30) +(def-tex environment-oldmetal outrocst-pris2 31) +(def-tex samos-arm outrocst-pris2 32) +(def-tex samos-diaper outrocst-pris2 33) +(def-tex samos-ear outrocst-pris2 34) +(def-tex samos-eye outrocst-pris2 35) +(def-tex samos-eyelid outrocst-pris2 36) +(def-tex samos-face outrocst-pris2 37) +(def-tex samos-finger-01 outrocst-pris2 38) +(def-tex samos-hair outrocst-pris2 39) +(def-tex samos-helmet outrocst-pris2 40) +(def-tex samos-leaf outrocst-pris2 41) +(def-tex samos-lens outrocst-pris2 42) +(def-tex samos-log-01 outrocst-pris2 43) +(def-tex samos-log-02 outrocst-pris2 44) +(def-tex samos-log-03 outrocst-pris2 45) +(def-tex samos-metal outrocst-pris2 46) +(def-tex samos-strap outrocst-pris2 47) +(def-tex samos-teeth2 outrocst-pris2 48) +(def-tex samos-vest outrocst-pris2 49) +(def-tex samosbird-beak outrocst-pris2 50) +(def-tex samosbird-body outrocst-pris2 51) +(def-tex samosbird-eye outrocst-pris2 52) +(def-tex samosbird-plume outrocst-pris2 53) +(def-tex samosbird-wing outrocst-pris2 54) +(def-tex seem-arm outrocst-pris2 55) +(def-tex seem-bootbottom outrocst-pris2 56) +(def-tex seem-bootleg outrocst-pris2 57) +(def-tex seem-bootlower outrocst-pris2 58) +(def-tex seem-bootmet outrocst-pris2 59) +(def-tex seem-boottoe outrocst-pris2 60) +(def-tex seem-ear outrocst-pris2 61) +(def-tex seem-eye outrocst-pris2 62) +(def-tex seem-eyelid outrocst-pris2 63) +(def-tex seem-face outrocst-pris2 64) +(def-tex seem-finger outrocst-pris2 65) +(def-tex seem-hand outrocst-pris2 66) +(def-tex seem-headgearback outrocst-pris2 67) +(def-tex seem-headpiecetop outrocst-pris2 68) +(def-tex seem-pipeend outrocst-pris2 69) +(def-tex seem-pipes-01 outrocst-pris2 70) +(def-tex seem-pipes-02 outrocst-pris2 71) +(def-tex seem-precmetal-chestplate-01 outrocst-pris2 72) +(def-tex seem-precmetal-edge outrocst-pris2 73) +(def-tex seem-precmetal-plain outrocst-pris2 74) +(def-tex seem-skirt outrocst-pris2 75) +(def-tex seem-skirt-small outrocst-pris2 76) +(def-tex seem-straps outrocst-pris2 77) +(def-tex seem-teeth outrocst-pris2 78) +(def-tex seem-uppertorso outrocst-pris2 79) +(def-tex tess-belly outrocst-pris2 80) +(def-tex tess-belt outrocst-pris2 81) +(def-tex tess-belt2 outrocst-pris2 82) +(def-tex tess-buckle outrocst-pris2 83) +(def-tex tess-chest outrocst-pris2 84) +(def-tex tess-emblem outrocst-pris2 85) +(def-tex tess-eye outrocst-pris2 86) +(def-tex tess-eyelid outrocst-pris2 87) +(def-tex tess-face outrocst-pris2 88) +(def-tex tess-finger outrocst-pris2 89) +(def-tex tess-glove outrocst-pris2 90) +(def-tex tess-hair outrocst-pris2 91) +(def-tex tess-hairband outrocst-pris2 92) +(def-tex tess-jeans outrocst-pris2 93) +(def-tex tess-jeansback outrocst-pris2 94) +(def-tex tess-jeanscuff outrocst-pris2 95) +(def-tex tess-lowerboot outrocst-pris2 96) +(def-tex tess-scarf outrocst-pris2 97) +(def-tex tess-shirt-128 outrocst-pris2 98) +(def-tex tess-shirtstraps outrocst-pris2 99) +(def-tex tess-shoebottom outrocst-pris2 100) +(def-tex tess-shoetop outrocst-pris2 101) +(def-tex tess-sleeve outrocst-pris2 102) +(def-tex tess-teeth outrocst-pris2 103) +(def-tex tess-underwear outrocst-pris2 104) +(def-tex tess-upperboot outrocst-pris2 105) +(def-tex missile-target-01 stadiuma-sprite 0) +(def-tex dust-sparkle stadiuma-sprite 2) +(def-tex comb-temp-dark combe-tfrag 0) +(def-tex comb-temp-glass combe-tfrag 1) +(def-tex rail-base-dark-01 combe-tfrag 3) +(def-tex rail-cord-01 combe-tfrag 4) +(def-tex rail-edge-01 combe-tfrag 5) +(def-tex rail-light-blue combe-tfrag 6) +(def-tex comb-yell-light combe-tfrag 8) +(def-tex comb-pipe2 combe-tfrag 13) +(def-tex comb-env2 combe-tfrag 14) +(def-tex rail-patch-01 combe-tfrag 15) +(def-tex rail-env-car-01 combe-tfrag 16) +(def-tex rail-base-mid-01 combe-tfrag 17) +(def-tex rail-light-blue-small combe-tfrag 18) +(def-tex rail-trim-01 combe-tfrag 19) +(def-tex rail-detail-01 combe-tfrag 20) +(def-tex rail-pipe-01 combe-tfrag 21) +(def-tex rail-pipe-03 combe-tfrag 22) +(def-tex rail-light-yellow-small combe-tfrag 23) +(def-tex rail-light-yellow combe-tfrag 24) +(def-tex rail-gray-metal-01 combe-tfrag 25) +(def-tex rail-pipe-05 combe-tfrag 26) +(def-tex rail-pipe-02 combe-tfrag 27) +(def-tex rail-rock-01 combe-tfrag 28) +(def-tex rail-fit-01 combe-tfrag 29) +(def-tex rail-env-wall-01 combe-tfrag 30) +(def-tex comb-redmarker combe-tfrag 31) +(def-tex rail-light-red combe-tfrag 32) +(def-tex bam-eyelight ljkdxvin-pris 0) +(def-tex bam-hairhilite ljkdxvin-pris 1) +(def-tex daxter-eyelid ljkdxvin-pris 2) +(def-tex daxter-furhilite ljkdxvin-pris 3) +(def-tex daxter-orange ljkdxvin-pris 4) +(def-tex daxterarm ljkdxvin-pris 5) +(def-tex daxterbodyshort-eix ljkdxvin-pris 6) +(def-tex daxterbolt ljkdxvin-pris 7) +(def-tex daxterear ljkdxvin-pris 8) +(def-tex daxterfinger ljkdxvin-pris 9) +(def-tex daxterfoot ljkdxvin-pris 10) +(def-tex daxterfoot-bottom ljkdxvin-pris 11) +(def-tex daxtergoggles ljkdxvin-pris 12) +(def-tex daxterheadwidenew ljkdxvin-pris 13) +(def-tex daxterhelmetplain ljkdxvin-pris 14) +(def-tex daxterlense ljkdxvin-pris 15) +(def-tex daxternose ljkdxvin-pris 16) +(def-tex daxterteeth ljkdxvin-pris 17) +(def-tex daxtertuft ljkdxvin-pris 18) +(def-tex environment-oldmetal ljkdxvin-pris 19) +(def-tex jakc-armor ljkdxvin-pris 24) +(def-tex jakc-chestplate-straps ljkdxvin-pris 25) +(def-tex jakc-gogglemetal ljkdxvin-pris 26) +(def-tex jakc-lens ljkdxvin-pris 27) +(def-tex jakc-scarf ljkdxvin-pris 28) +(def-tex jakc-scarfhanging ljkdxvin-pris 29) +(def-tex jakc-skirt ljkdxvin-pris 30) +(def-tex jakc-waistband2 ljkdxvin-pris 31) +(def-tex jakc-wraps ljkdxvin-pris 32) +(def-tex jakc-wristband-a2 ljkdxvin-pris 33) +(def-tex jakchires-arm ljkdxvin-pris 34) +(def-tex jakchires-blackstrap ljkdxvin-pris 35) +(def-tex jakchires-brownstrap ljkdxvin-pris 36) +(def-tex jakchires-brwnleather ljkdxvin-pris 37) +(def-tex jakchires-chestplate ljkdxvin-pris 38) +(def-tex jakchires-clips ljkdxvin-pris 39) +(def-tex jakchires-eye ljkdxvin-pris 40) +(def-tex jakchires-eyebrow ljkdxvin-pris 41) +(def-tex jakchires-eyelid ljkdxvin-pris 42) +(def-tex jakchires-facelft ljkdxvin-pris 43) +(def-tex jakchires-facert ljkdxvin-pris 44) +(def-tex jakchires-glovetop ljkdxvin-pris 45) +(def-tex jakchires-hair ljkdxvin-pris 46) +(def-tex jakchires-horn ljkdxvin-pris 47) +(def-tex jakchires-jacket ljkdxvin-pris 48) +(def-tex jakchires-leatherpouch ljkdxvin-pris 49) +(def-tex jakchires-lightbrownspat ljkdxvin-pris 50) +(def-tex jakchires-pants ljkdxvin-pris 51) +(def-tex jakchires-precarmor-01 ljkdxvin-pris 52) +(def-tex jakchires-shoebottom ljkdxvin-pris 53) +(def-tex jakchires-shoemetal ljkdxvin-pris 54) +(def-tex jakchires-shoeteop ljkdxvin-pris 55) +(def-tex jakchires-teeth ljkdxvin-pris 56) +(def-tex holograph-env-rim-dest ljkdxvin-warp 0) +(def-tex holograph-env-noise ljkdxvin-warp 1) +(def-tex holograph-env-rim ljkdxvin-warp 2) +(def-tex holograph-env-scan ljkdxvin-warp 3) +(def-tex palcab-lowres-background-hills-01 lcitysml-tfrag 0) +(def-tex palcab-lowres-background-crater-bottom-enviro lcitysml-tfrag 1) +(def-tex palcab-lowres-ctywide-wall-01 lcitysml-tfrag 2) +(def-tex palcab-lowres-background-rocksnow2 lcitysml-tfrag 3) +(def-tex palcab-lowres-background-rocksnow lcitysml-tfrag 4) +(def-tex palcab-lowres-ctywide-wall-02 lcitysml-tfrag 5) +(def-tex palcab-lowres-ctyslum-ground lcitysml-tfrag 6) +(def-tex palcab-lowres-ctyslum-roof-03 lcitysml-tfrag 7) +(def-tex palcab-lowres-ctyslum-wall-02 lcitysml-tfrag 11) +(def-tex palcab-pipe-hoze lcitysml-tfrag 14) +(def-tex palcab-lowres-mark-roof-02 lcitysml-tfrag 15) +(def-tex city-lowres-ind-wall-04 lcitysml-tfrag 16) +(def-tex palcab-steel-lores lcitysml-tfrag 17) +(def-tex strip-metal-02-lores lcitysml-tfrag 18) +(def-tex palcab-lowres-stadium-canopy lcitysml-tfrag 19) +(def-tex city-lowres-ind-wall-02 lcitysml-tfrag 20) +(def-tex city-lowres-fort-yellow lcitysml-tfrag 21) +(def-tex city-lowres-fort-red lcitysml-tfrag 22) +(def-tex palcab-lowres-mark-roof-01 lcitysml-tfrag 23) +(def-tex city-lowres-port-roof lcitysml-tfrag 24) +(def-tex city-lowres-ind-wall-01 lcitysml-tfrag 25) +(def-tex city-lowres-ind-wall-07 lcitysml-tfrag 29) +(def-tex city-lowres-ind-wall-08 lcitysml-tfrag 30) +(def-tex palcab-lowres-mark-roof-rim-01 lcitysml-tfrag 31) +(def-tex palcab-lowres-mark-shops-01 lcitysml-tfrag 32) +(def-tex palcab-lowres-mark-awning-green lcitysml-tfrag 33) +(def-tex palcab-lowres-mark-awning-red lcitysml-tfrag 34) +(def-tex city-lowres-ctygen-side-02 lcitysml-tfrag 35) +(def-tex city-lowres-ctygen-stripe-01 lcitysml-tfrag 36) +(def-tex city-lowres-ctygen-roof-02 lcitysml-tfrag 37) +(def-tex city-lowres-ctygen-build-01 lcitysml-tfrag 38) +(def-tex palcab-lowres-mark-highway lcitysml-tfrag 39) +(def-tex city-lowres-ctygen-build-02 lcitysml-tfrag 40) +(def-tex city-lowres-ctygen-side-01 lcitysml-tfrag 41) +(def-tex city-lowres-ctygen-build-03 lcitysml-tfrag 42) +(def-tex city-lowres-ctygen-build-05 lcitysml-tfrag 43) +(def-tex city-lowres-ctygen-build-04 lcitysml-tfrag 44) +(def-tex city-lowres-ctygen-roof-01 lcitysml-tfrag 45) +(def-tex city-lowres-ctygen-stripe-02 lcitysml-tfrag 46) +(def-tex palcab-lorez-metal03 lcitysml-tfrag 47) +(def-tex palcab-lorez-metal01 lcitysml-tfrag 48) +(def-tex t-citywide-met-strp02 lcitysml-tfrag 49) +(def-tex t-citywide-met-strp01 lcitysml-tfrag 50) +(def-tex t-citywide-met-pill-01 lcitysml-tfrag 51) +(def-tex t-citywide-red-met-01 lcitysml-tfrag 52) +(def-tex t-citywide-met-wall-02 lcitysml-tfrag 53) +(def-tex t-palshaft-plate01 lcitysml-tfrag 54) +(def-tex palcab-lowres-background-mount-build-01 lcitysml-tfrag 55) +(def-tex palcab-lowres-background-mount-build-02 lcitysml-tfrag 56) +(def-tex palcab-lowres-background-mount-build-03 lcitysml-tfrag 57) +(def-tex t-strip-lo-palsup-panel-1 lcitysml-tfrag 59) +(def-tex t-strip-lo-palsup-panel-2 lcitysml-tfrag 60) +(def-tex t-strip-lo-palsup-panel-3 lcitysml-tfrag 61) +(def-tex t-strip-lo-palsup-panel-4 lcitysml-tfrag 62) +(def-tex t-strip-lo-palsup-panel-5 lcitysml-tfrag 63) +(def-tex t-strip-lo-palsup-danger1 lcitysml-tfrag 64) +(def-tex t-strip-lo-palsup-danger2 lcitysml-tfrag 65) +(def-tex city-lowres-newslums-stripe-02 lcitysml-tfrag 66) +(def-tex city-lowres-newslums-stripe-01 lcitysml-tfrag 68) +(def-tex city-lowres-damaged-01 lcitysml-tfrag 69) +(def-tex t-citywide-wall-tile-01 lcitysml-tfrag 70) +(def-tex palcab-lowres-farm-wall lcitysml-tfrag 71) +(def-tex palcab-lowres-farm-wall-top lcitysml-tfrag 72) +(def-tex t-palshaft-roof-01 lcitysml-tfrag 73) +(def-tex palace-break-girder01 lcitysml-tfrag 74) +(def-tex citywide-palace-01 lcitysml-tfrag 75) +(def-tex citywide-hangmetal lcitysml-tfrag 76) +(def-tex city-lowres-mhcity-wall-02 lcitysml-tfrag 77) +(def-tex city-lowres-mhcity-wall-01 lcitysml-tfrag 78) +(def-tex city-lowres-mhcity-detower-01 lcitysml-tfrag 79) +(def-tex city-lowres-mhcity-detower-02 lcitysml-tfrag 80) +(def-tex city-lowres-mhcity-wall-06 lcitysml-tfrag 81) +(def-tex city-lowres-mhcity-wall-05 lcitysml-tfrag 82) +(def-tex common-black lcitysml-tfrag 83) +(def-tex city-lowres-mhcity-wall-03 lcitysml-tfrag 84) +(def-tex palcab-lorez-asphalt01 lcitysml-tfrag 85) +(def-tex palcab-lowres-background-trees-edge lcitysml-tfrag 86) +(def-tex palcab-lowres-background-trees2 lcitysml-tfrag 87) +(def-tex palcab-lorez-metal02 lcitysml-tfrag 88) +(def-tex palcab-lorez-metal01-red lcitysml-tfrag 89) +(def-tex palcab-lorez-plates01 lcitysml-tfrag 90) +(def-tex palcab-lorez-metal01-red-stripe lcitysml-tfrag 91) +(def-tex tcab-plat-edg-01-lores lcitysml-tfrag 92) +(def-tex tcab-beam01 lcitysml-tfrag 93) +(def-tex palcab-wall-lores lcitysml-tfrag 94) +(def-tex ctyp-metal-01 lcitysml-tfrag 95) +(def-tex palace-break-brokenwall lcitysml-tfrag 96) +(def-tex city-lowres-mhcity-ground-01 lcitysml-tfrag 97) +(def-tex t-palshaft-r-strp-plate01 lcitysml-tfrag 98) +(def-tex palcab-lorez-plates-red-stripe01 lcitysml-tfrag 99) +(def-tex palcab-lowres-background-desert-01 lcitysml-tfrag 100) +(def-tex city-lowres-mhcity-tower-01 lcitysml-tfrag 101) +(def-tex city-lowres-mhcity-tower-02 lcitysml-tfrag 102) +(def-tex t-palshaft-panl-01 lcitysml-tfrag 103) +(def-tex t-palshaft-pil-01 lcitysml-tfrag 104) +(def-tex ctywide-ox-met-01 lcitysml-tfrag 105) +(def-tex palcab-lowres-background-grass-to-desert-01 lcitysml-tfrag 106) +(def-tex citywide-consite-steel lcitysml-tfrag 107) +(def-tex tcab-blue-ring-01 lcitysml-tfrag 108) +(def-tex palcab-swingp-trim lcitysml-tfrag 110) +(def-tex palcab-lowres-background-mounatin-window lcitysml-tfrag 111) +(def-tex tcab-beam01-lores lcitysml-tfrag 112) +(def-tex palcab-lowres-background-shoreline-01 lcitysml-tfrag 113) +(def-tex palcab-lowres-background-mountains lcitysml-tfrag 114) +(def-tex palcab-lowres-background-peaks-01 lcitysml-tfrag 115) +(def-tex palcab-lowres-background-peaks-02 lcitysml-tfrag 116) +(def-tex palcab-lowres-background-desert-to-shore lcitysml-tfrag 118) +(def-tex palcab-lowres-background-crater-01 lcitysml-tfrag 119) +(def-tex palcab-lowres-background-grass-to-desert-02 lcitysml-tfrag 120) +(def-tex palcab-lowres-background-mountains-02 lcitysml-tfrag 121) +(def-tex palcab-lowres-background-hilltops-01 lcitysml-tfrag 122) +(def-tex rub-palace-tower-side lcitysml-tfrag 123) +(def-tex palcab-lowres-background-shoreline-02 lcitysml-alpha 0) +(def-tex palcab-lowres-background-crater-rim lcitysml-alpha 1) +(def-tex palcab-lowres-background-trees-edge lcitysml-alpha 2) +(def-tex palcab-lowres-background-trees2 lcitysml-alpha 3) +(def-tex palcab-lowres-ctyslum-wall-03 lcitysml-alpha 4) +(def-tex templea-waterfall templea-vis-water 0) +(def-tex templea-waterfall-dest templea-vis-water 1) +(def-tex environment-lightjak templea-vis-water 2) +(def-tex lightjak-wings templea-vis-water 3) +(def-tex lightjak-wings-u-src templea-vis-water 4) +(def-tex lightjak-wings-v-src templea-vis-water 5) +(def-tex temple_sandstone_ground02 templea-vis-tfrag 2) +(def-tex temple_sandstone_base01 templea-vis-tfrag 3) +(def-tex templea_sandstone01 templea-vis-tfrag 4) +(def-tex temple-floor-01 templea-vis-tfrag 7) +(def-tex temple_metal01 templea-vis-tfrag 8) +(def-tex temple_metal02 templea-vis-tfrag 9) +(def-tex wstd-torchbowl-coal-01 templea-vis-tfrag 10) +(def-tex temple_sandstone_pill01 templea-vis-tfrag 11) +(def-tex temple_sandstone_trim02 templea-vis-tfrag 13) +(def-tex temple_sandstone_star01 templea-vis-tfrag 14) +(def-tex temple_sandstone_box01 templea-vis-tfrag 15) +(def-tex templea_sandstone_brick01 templea-vis-tfrag 16) +(def-tex temple_sandstone_dtale02 templea-vis-tfrag 18) +(def-tex wascity-rope templea-vis-tfrag 20) +(def-tex temple_sandstone_steptop01 templea-vis-tfrag 21) +(def-tex temple_sandstone_stepside01 templea-vis-tfrag 22) +(def-tex temple_sandstone_taper01 templea-vis-tfrag 24) +(def-tex temple_sandstone_ground01 templea-vis-tfrag 25) +(def-tex temple_sandstone_trim01 templea-vis-tfrag 26) +(def-tex common_sandstone_ground01 templea-vis-tfrag 28) +(def-tex common_sandstone_taper01 templea-vis-tfrag 29) +(def-tex common_sandstone_trim01 templea-vis-tfrag 30) +(def-tex common_sandstone_pill01 templea-vis-tfrag 31) +(def-tex common_sandstone_base01 templea-vis-tfrag 32) +(def-tex warpgate-circuitpattern2 templea-vis-tfrag 34) +(def-tex warpgate-precursormetal templea-vis-tfrag 35) +(def-tex warpgate-post-01 templea-vis-tfrag 36) +(def-tex temple_metal03 templea-vis-tfrag 37) +(def-tex temple_sandstone_brick-01 templea-vis-tfrag 38) +(def-tex rail-env-wall-01 templea-vis-tfrag 39) +(def-tex temple_pre_arrow-05 templea-vis-tfrag 40) +(def-tex temple_pre-01 templea-vis-tfrag 41) +(def-tex temple_pre_arrow-04 templea-vis-tfrag 42) +(def-tex temple_pre-04 templea-vis-tfrag 43) +(def-tex temple_sandstone_pill03 templea-vis-tfrag 44) +(def-tex temple_bark01 templea-vis-tfrag 45) +(def-tex temple_sandstone_pill02 templea-vis-tfrag 46) +(def-tex temple_pre-02 templea-vis-tfrag 47) +(def-tex temple_pre-03 templea-vis-tfrag 48) +(def-tex temple_sandstone_pill05 templea-vis-tfrag 49) +(def-tex environment-darkprec templea-vis-tfrag 50) +(def-tex dk-eco-vent-glow-01 templea-vis-tfrag 51) +(def-tex dk-eco-vent-side-01 templea-vis-tfrag 52) +(def-tex temple_sandstone_pill07 templea-vis-tfrag 53) +(def-tex temple_sandstone_scale_01 templea-vis-tfrag 54) +(def-tex temple_sandstone_wall01 templea-vis-tfrag 55) +(def-tex temple_sandstone_pill06 templea-vis-tfrag 56) +(def-tex tpl-symbl-yellow-glow-01 templea-vis-tfrag 57) +(def-tex temple_sandstone_brick-02 templea-vis-tfrag 58) +(def-tex temple_metal04 templea-vis-tfrag 59) +(def-tex temple_sandstone_ground02 templeb-vis-tfrag 2) +(def-tex temple_sandstone_base01 templeb-vis-tfrag 3) +(def-tex temple-steps-brown templeb-vis-tfrag 5) +(def-tex temple_sandstone_dtale02 templeb-vis-tfrag 6) +(def-tex temple_sandstone_box01 templeb-vis-tfrag 8) +(def-tex temple-floor-01 templeb-vis-tfrag 11) +(def-tex temple_sandstone_pill01 templeb-vis-tfrag 12) +(def-tex temple_sandstone_stepside01 templeb-vis-tfrag 13) +(def-tex temple-candle-side templeb-vis-tfrag 16) +(def-tex temple-candle-top templeb-vis-tfrag 17) +(def-tex temple-candle-wax-top templeb-vis-tfrag 18) +(def-tex temple_sandstone_star01 templeb-vis-tfrag 19) +(def-tex temple_metal01 templeb-vis-tfrag 20) +(def-tex temple_metal02 templeb-vis-tfrag 21) +(def-tex wstd-torchbowl-coal-01 templeb-vis-tfrag 22) +(def-tex lt-eco-vent-blue-01 templeb-vis-tfrag 25) +(def-tex lt-eco-vent-side-01 templeb-vis-tfrag 26) +(def-tex templea_sandstone_brick01 templeb-vis-tfrag 28) +(def-tex wascity-rope templeb-vis-tfrag 30) +(def-tex warpgate-circuitpattern2 templeb-vis-tfrag 31) +(def-tex warpgate-precursormetal templeb-vis-tfrag 32) +(def-tex warpgate-post-01 templeb-vis-tfrag 33) +(def-tex temple_sandstone_brick-01 templeb-vis-tfrag 35) +(def-tex temple_sandstone_pill03 templeb-vis-tfrag 36) +(def-tex temple_sandstone_trim02 templeb-vis-tfrag 37) +(def-tex temple_sandstone_steptop01 templeb-vis-tfrag 38) +(def-tex temple_sandstone_trim01 templeb-vis-tfrag 39) +(def-tex temple_sandstone_taper01 templeb-vis-tfrag 40) +(def-tex temple_sandstone_pill02 templeb-vis-tfrag 42) +(def-tex temple_pre-02 templeb-vis-tfrag 43) +(def-tex temple_pre-01 templeb-vis-tfrag 44) +(def-tex rail-env-wall-01 templeb-vis-tfrag 45) +(def-tex temple_sandstone_pill04 templeb-vis-tfrag 46) +(def-tex temple_sandstone_pill06 templeb-vis-tfrag 47) +(def-tex temple_pre-03 templeb-vis-tfrag 48) +(def-tex temple_pre-04 templeb-vis-tfrag 49) +(def-tex temple_sandstone_pill05 templeb-vis-tfrag 50) +(def-tex temple_sandstone_ground01 templeb-vis-tfrag 51) +(def-tex temple_sandstone_wall01 templeb-vis-tfrag 52) +(def-tex temple_sandstone_pill07 templeb-vis-tfrag 53) +(def-tex common_sandstone_ground01 templeb-vis-tfrag 54) +(def-tex common_sandstone_taper01 templeb-vis-tfrag 55) +(def-tex common_sandstone_trim01 templeb-vis-tfrag 56) +(def-tex common_sandstone_pill01 templeb-vis-tfrag 57) +(def-tex common_sandstone_base01 templeb-vis-tfrag 58) +(def-tex temple_sandstone_scale_01 templeb-vis-tfrag 59) +(def-tex tpl-symbl-yellow-glow-01 templeb-vis-tfrag 60) +(def-tex environment-darkprec templeb-vis-tfrag 61) +(def-tex dk-eco-vent-glow-01 templeb-vis-tfrag 62) +(def-tex dk-eco-vent-side-01 templeb-vis-tfrag 63) +(def-tex temple_metal04 templeb-vis-tfrag 64) +(def-tex common-black templeb-vis-tfrag 65) +(def-tex wstd-torchbowl-coal-01 templea-vis-shrub 0) +(def-tex temple_sandstone_ground01 templea-vis-shrub 1) +(def-tex temple_flag03 templea-vis-shrub 3) +(def-tex comb-temp-dark templed-vis-tfrag 0) +(def-tex comb-pipe2 templed-vis-tfrag 1) +(def-tex comb-plate-02 templed-vis-tfrag 2) +(def-tex comb-crct-medium templed-vis-tfrag 3) +(def-tex comb-temp-glass templed-vis-tfrag 4) +(def-tex temple_sandstone_dtale02 templed-vis-tfrag 5) +(def-tex temple_sandstone_ground02 templed-vis-tfrag 6) +(def-tex temple-steps-brown templed-vis-tfrag 9) +(def-tex temple_sandstone_out_01 templed-vis-tfrag 10) +(def-tex templea_sandstone_brick01 templed-vis-tfrag 11) +(def-tex lt-eco-vent-blue-01 templed-vis-tfrag 14) +(def-tex lt-eco-vent-side-01 templed-vis-tfrag 15) +(def-tex min-env-mar-01 templed-vis-tfrag 16) +(def-tex minc-01 templed-vis-tfrag 17) +(def-tex minc-pre-04 templed-vis-tfrag 19) +(def-tex minc-pre-11 templed-vis-tfrag 20) +(def-tex warpgate-circuitpattern2 templed-vis-tfrag 21) +(def-tex warpgate-precursormetal templed-vis-tfrag 22) +(def-tex warpgate-post-01 templed-vis-tfrag 23) +(def-tex temple_sandstone_base01 templed-vis-tfrag 24) +(def-tex temple_sandstone_box01 templed-vis-tfrag 25) +(def-tex temple_sandstone_pill01 templed-vis-tfrag 26) +(def-tex templea_sandstone01 templed-vis-tfrag 29) +(def-tex temple_metal01 templed-vis-tfrag 30) +(def-tex temple_metal02 templed-vis-tfrag 31) +(def-tex wstd-torchbowl-coal-01 templed-vis-tfrag 32) +(def-tex wascity-rope templed-vis-tfrag 34) +(def-tex temple_sandstone_stepside01 templed-vis-tfrag 35) +(def-tex temple_bark01 templed-vis-tfrag 37) +(def-tex temple-celing-01 templed-vis-tfrag 38) +(def-tex rail-env-wall-01 templed-vis-tfrag 39) +(def-tex temple_sandstone_brick-01 templed-vis-tfrag 43) +(def-tex temple_sandstone_trim02 templed-vis-tfrag 44) +(def-tex temple_sandstone_trim01 templed-vis-tfrag 45) +(def-tex temple_sandstone_steptop01 templed-vis-tfrag 46) +(def-tex temple_sandstone_pill03 templed-vis-tfrag 47) +(def-tex temple_sandstone_star01 templed-vis-tfrag 48) +(def-tex temple_pre-01 templed-vis-tfrag 50) +(def-tex temple_sandstone_pill02 templed-vis-tfrag 51) +(def-tex temple_pre-04 templed-vis-tfrag 52) +(def-tex temple_pre-03 templed-vis-tfrag 53) +(def-tex common_sandstone_ground01 templed-vis-tfrag 54) +(def-tex common_sandstone_taper01 templed-vis-tfrag 55) +(def-tex common_sandstone_trim01 templed-vis-tfrag 56) +(def-tex common_sandstone_pill01 templed-vis-tfrag 57) +(def-tex common_sandstone_base01 templed-vis-tfrag 58) +(def-tex temple_sandstone_pill07 templed-vis-tfrag 59) +(def-tex temple_sandstone_brick-02 templed-vis-tfrag 60) +(def-tex tpl-door-face-01 templed-vis-tfrag 61) +(def-tex temple_sandstone_pill05 templed-vis-tfrag 62) +(def-tex temple_sandstone_ground03 templed-vis-tfrag 63) +(def-tex temple_sandstone_pill06 templed-vis-tfrag 64) +(def-tex temple_sandstone_taper01 templed-vis-tfrag 65) +(def-tex temple_metal04 templed-vis-tfrag 66) +(def-tex temple_sandstone_ground04 templed-vis-tfrag 67) +(def-tex temple_sandstone_ground01 templed-vis-tfrag 68) +(def-tex environment-darkprec templed-vis-tfrag 69) +(def-tex dk-eco-vent-glow-01 templed-vis-tfrag 70) +(def-tex dk-eco-vent-side-01 templed-vis-tfrag 71) +(def-tex templea_sandstone01 templec-vis-tfrag 2) +(def-tex temple-floor-01 templec-vis-tfrag 3) +(def-tex templea_sandstone_brick01 templec-vis-tfrag 4) +(def-tex temple_sandstone_pill01 templec-vis-tfrag 5) +(def-tex wascity-rope templec-vis-tfrag 6) +(def-tex temple_metal01 templec-vis-tfrag 7) +(def-tex temple_metal02 templec-vis-tfrag 8) +(def-tex wstd-torchbowl-coal-01 templec-vis-tfrag 9) +(def-tex temple_sandstone_base01 templec-vis-tfrag 10) +(def-tex temple_sandstone_star01 templec-vis-tfrag 11) +(def-tex temple-box-brown templec-vis-tfrag 12) +(def-tex temple_sandstone_ground02 templec-vis-tfrag 13) +(def-tex temple_sandstone_steptop01 templec-vis-tfrag 14) +(def-tex temple_sandstone_stepside01 templec-vis-tfrag 15) +(def-tex temple_sandstone_box01 templec-vis-tfrag 16) +(def-tex temple_sandstone_dtale02 templec-vis-tfrag 18) +(def-tex temple_sandstone_out_01 templec-vis-tfrag 20) +(def-tex temple_sandstone_brick-01 templec-vis-tfrag 22) +(def-tex temple_sandstone_trim02 templec-vis-tfrag 23) +(def-tex temple_sandstone_trim01 templec-vis-tfrag 24) +(def-tex temple_sandstone_pill03 templec-vis-tfrag 25) +(def-tex temple_pre-02 templec-vis-tfrag 26) +(def-tex temple_pre-01 templec-vis-tfrag 27) +(def-tex temple_sandstone_pill02 templec-vis-tfrag 28) +(def-tex rail-env-wall-01 templec-vis-tfrag 29) +(def-tex temple_pre-03 templec-vis-tfrag 31) +(def-tex temple_sandstone_pill05 templec-vis-tfrag 32) +(def-tex temple_sandstone_pill07 templec-vis-tfrag 33) +(def-tex temple_bark01 templec-vis-tfrag 34) +(def-tex temple_metal04 templec-vis-tfrag 35) +(def-tex temple_sandstone_taper01 templec-vis-tfrag 36) +(def-tex temple_sandstone_brick-02 templec-vis-tfrag 37) +(def-tex temple_sandstone_pill06 templec-vis-tfrag 38) +(def-tex temple_sandstone_ground01 templec-vis-tfrag 39) +(def-tex temple_sandstone_wall01 templec-vis-tfrag 40) +(def-tex temple_sandstone_ground03 templec-vis-tfrag 41) +(def-tex temple-wall-01 templec-vis-tfrag 42) +(def-tex common_sandstone_taper01 templec-vis-tfrag 43) +(def-tex common_sandstone_ground01 templec-vis-tfrag 44) +(def-tex common_sandstone_trim01 templec-vis-tfrag 45) +(def-tex common_sandstone_pill01 templec-vis-tfrag 46) +(def-tex common_sandstone_base01 templec-vis-tfrag 47) +(def-tex dk-maker-idol-collar-01 templea-vis-pris 0) +(def-tex dk-maker-idol-collar-02 templea-vis-pris 1) +(def-tex dk-maker-idol-eye-01 templea-vis-pris 2) +(def-tex dk-maker-idol-eye-dk-01 templea-vis-pris 3) +(def-tex dk-maker-idol-globes-01 templea-vis-pris 4) +(def-tex dk-maker-idol-globes-dk-01 templea-vis-pris 5) +(def-tex dk-maker-idol-head-01 templea-vis-pris 6) +(def-tex dk-maker-idol-metal-01 templea-vis-pris 7) +(def-tex dk-maker-idol-tubes-01 templea-vis-pris 8) +(def-tex bam-eyelight templea-vis-pris 10) +(def-tex bam-hairhilite templea-vis-pris 11) +(def-tex daxter-eyelid templea-vis-pris 12) +(def-tex daxter-furhilite templea-vis-pris 13) +(def-tex daxter-orange templea-vis-pris 14) +(def-tex daxterarm templea-vis-pris 15) +(def-tex daxterbodyshort-eix templea-vis-pris 16) +(def-tex daxterbolt templea-vis-pris 17) +(def-tex daxterear templea-vis-pris 18) +(def-tex daxterfinger templea-vis-pris 19) +(def-tex daxterfoot templea-vis-pris 20) +(def-tex daxterfoot-bottom templea-vis-pris 21) +(def-tex daxtergoggles templea-vis-pris 22) +(def-tex daxterheadwidenew templea-vis-pris 23) +(def-tex daxterhelmetplain templea-vis-pris 24) +(def-tex daxterlense templea-vis-pris 25) +(def-tex daxternose templea-vis-pris 26) +(def-tex daxterteeth templea-vis-pris 27) +(def-tex daxtertuft templea-vis-pris 28) +(def-tex environment-oldmetal templea-vis-pris 29) +(def-tex jakc-armor templea-vis-pris 30) +(def-tex jakc-chestplate-straps templea-vis-pris 31) +(def-tex jakc-gogglemetal templea-vis-pris 32) +(def-tex jakc-lens templea-vis-pris 33) +(def-tex jakc-scarf templea-vis-pris 34) +(def-tex jakc-scarfhanging templea-vis-pris 35) +(def-tex jakc-skirt templea-vis-pris 36) +(def-tex jakc-waistband2 templea-vis-pris 37) +(def-tex jakc-wraps templea-vis-pris 38) +(def-tex jakc-wristband-a2 templea-vis-pris 39) +(def-tex jakchires-arm templea-vis-pris 40) +(def-tex jakchires-blackstrap templea-vis-pris 41) +(def-tex jakchires-brownstrap templea-vis-pris 42) +(def-tex jakchires-brwnleather templea-vis-pris 43) +(def-tex jakchires-chestplate templea-vis-pris 44) +(def-tex jakchires-clips templea-vis-pris 45) +(def-tex jakchires-eye templea-vis-pris 46) +(def-tex jakchires-eyebrow templea-vis-pris 47) +(def-tex jakchires-eyelid templea-vis-pris 48) +(def-tex jakchires-facelft templea-vis-pris 49) +(def-tex jakchires-facert templea-vis-pris 50) +(def-tex jakchires-glovetop templea-vis-pris 51) +(def-tex jakchires-hair templea-vis-pris 52) +(def-tex jakchires-horn templea-vis-pris 53) +(def-tex jakchires-jacket templea-vis-pris 54) +(def-tex jakchires-leatherpouch templea-vis-pris 55) +(def-tex jakchires-lightbrownspat templea-vis-pris 56) +(def-tex jakchires-pants templea-vis-pris 57) +(def-tex jakchires-precarmor-01 templea-vis-pris 58) +(def-tex jakchires-shoebottom templea-vis-pris 59) +(def-tex jakchires-shoemetal templea-vis-pris 60) +(def-tex jakchires-shoeteop templea-vis-pris 61) +(def-tex jakchires-teeth templea-vis-pris 62) +(def-tex temple_flag01 templea-vis-pris 63) +(def-tex tpl-door-edge-01 templea-vis-pris 69) +(def-tex tpl-door-face-01 templea-vis-pris 70) +(def-tex tpl-door-round-01 templea-vis-pris 71) +(def-tex temple_sandstone_out_01 templea-vis-pris 72) +(def-tex temple_sandstone_scale_01 templea-vis-pris 73) +(def-tex temple_sandstone_trim02 templea-vis-pris 74) +(def-tex tpl-symbl-yellow-01 templea-vis-pris 75) +(def-tex tpl-symbl-yellow-glow-01 templea-vis-pris 76) +(def-tex pre-lens-01 templea-vis-pris 78) +(def-tex pre-lens-glass01 templea-vis-pris 79) +(def-tex pre-light-01 templea-vis-pris 80) +(def-tex pre-med-01 templea-vis-pris 81) +(def-tex pre-pipe-01 templea-vis-pris 82) +(def-tex comb-env2 templea-vis-pris 86) +(def-tex kid-medallion templea-vis-pris 87) +(def-tex common-black templea-vis-pris 95) +(def-tex dp-bipedal-backhand-01 templea-vis-pris 96) +(def-tex dp-bipedal-chest-01 templea-vis-pris 97) +(def-tex dp-bipedal-dk-hose-01 templea-vis-pris 98) +(def-tex dp-bipedal-dk-plate-01 templea-vis-pris 99) +(def-tex dp-bipedal-dk-plate-02 templea-vis-pris 100) +(def-tex dp-bipedal-dk-plate-03 templea-vis-pris 101) +(def-tex dp-bipedal-dk-plate-04 templea-vis-pris 102) +(def-tex dp-bipedal-dk-sm-plate-01 templea-vis-pris 103) +(def-tex dp-bipedal-dk-stomach-plate-01 templea-vis-pris 104) +(def-tex dp-bipedal-eye-01 templea-vis-pris 105) +(def-tex dp-bipedal-finger-plate-01 templea-vis-pris 106) +(def-tex dp-bipedal-nose-01 templea-vis-pris 107) +(def-tex dp-bipedal-power-hose templea-vis-pris 108) +(def-tex dp-bipedal-skin-bulge-01 templea-vis-pris 109) +(def-tex dp-bipedal-skin-bulge-02 templea-vis-pris 110) +(def-tex dp-bipedal-skin-plate-01 templea-vis-pris 111) +(def-tex dp-bipedal-skin-plate-small-01 templea-vis-pris 112) +(def-tex dp-bipedal-skin-ribs-01 templea-vis-pris 113) +(def-tex dp-bipedal-spine-01 templea-vis-pris 114) +(def-tex dp-bipedal-toe-01 templea-vis-pris 115) +(def-tex environment-darkprec templea-vis-pris 116) +(def-tex temple_metal02 templea-vis-pris 118) +(def-tex temple_metal03 templea-vis-pris 125) +(def-tex temple_sandstone_brick-01 templea-vis-pris 126) +(def-tex timemap-ball-precmetal templed-vis-pris 14) +(def-tex timemap-centerball templed-vis-pris 15) +(def-tex timemap-notchborder templed-vis-pris 16) +(def-tex timemap-precmetal-feet templed-vis-pris 17) +(def-tex timemap-precmetal-plain-large templed-vis-pris 18) +(def-tex timemap-precmetal-teeth templed-vis-pris 19) +(def-tex timemap-smallball-01 templed-vis-pris 20) +(def-tex timemap-smallball-02 templed-vis-pris 21) +(def-tex timemap-wordborder templed-vis-pris 22) +(def-tex minc-pre-12 templed-vis-water 0) +(def-tex charHOLD templea-vis-pris2 63) +(def-tex grunt-eye-01 templea-vis-pris2 64) +(def-tex grunt-gem-01 templea-vis-pris2 65) +(def-tex grunt-hose templea-vis-pris2 66) +(def-tex grunt-metal-01 templea-vis-pris2 67) +(def-tex grunt-skin-01 templea-vis-pris2 68) +(def-tex grunt-skin-02 templea-vis-pris2 69) +(def-tex grunt-skin-03 templea-vis-pris2 70) +(def-tex spider-allfur-dark templea-vis-pris2 71) +(def-tex spider-allfur-med templea-vis-pris2 72) +(def-tex spider-emblem templea-vis-pris2 73) +(def-tex spider-leg templea-vis-pris2 74) +(def-tex spider-tusk templea-vis-pris2 75) +(def-tex spidereye templea-vis-pris2 76) +(def-tex spidereye-environment templea-vis-pris2 77) +(def-tex flamer-wing templea-vis-pris2 78) +(def-tex temple-candle-wick templeb-vis-shrub 0) +(def-tex wstd-torchbowl-coal-01 templeb-vis-shrub 1) +(def-tex wstd-torchbowl-coal-01 templec-vis-shrub 0) +(def-tex tplc-water-dest templec-vis-water 1) +(def-tex tplc-water templec-vis-water 2) +(def-tex tpl-symbl-violet-glow-01 templec-vis-water 3) +(def-tex tpl-symbl-yellow-glow-01 templec-vis-water 4) +(def-tex tpl-symbl-violet-01 templec-vis-water 5) +(def-tex tpl-symbl-yellow-01 templec-vis-water 6) +(def-tex temple_sandstone_base01 templeb-vis-pris 0) +(def-tex temple_sandstone01 templeb-vis-pris 23) +(def-tex temple_sandstone_pill01 templeb-vis-pris 24) +(def-tex temple_pre-01 templeb-vis-pris 25) +(def-tex rail-env-wall-01 templeb-vis-pris 27) +(def-tex temple_pre-03 templeb-vis-pris 28) +(def-tex temple_pre-04 templeb-vis-pris 29) +(def-tex temple_metal02 templeb-vis-pris 30) +(def-tex temple_sandstone_brick-01 templeb-vis-pris 38) +(def-tex temple_sandstone_pill02 templeb-vis-pris 39) +(def-tex temple_sandstone_pill05 templeb-vis-pris 40) +(def-tex temple_sandstone_stepside01 templeb-vis-pris 41) +(def-tex temple_sandstone_trim02 templeb-vis-pris 42) +(def-tex templea_sandstone01 templeb-vis-pris 66) +(def-tex precur-floor-plate-02 precura-vis-tfrag 0) +(def-tex precur-tubes-small-01 precura-vis-tfrag 1) +(def-tex precur-plate-pattern-01 precura-vis-tfrag 2) +(def-tex precur-tubes-segment-01 precura-vis-tfrag 3) +(def-tex precur-nail-01 precura-vis-tfrag 4) +(def-tex precur-nail-02 precura-vis-tfrag 5) +(def-tex precur-floor-plate-01 precura-vis-tfrag 6) +(def-tex precur-plate-end-01 precura-vis-tfrag 7) +(def-tex precur-wall-tube-02 precura-vis-tfrag 8) +(def-tex precur-wall-brace-01 precura-vis-tfrag 10) +(def-tex precur-light-green-01 precura-vis-tfrag 11) +(def-tex precur-tube-joint-01 precura-vis-tfrag 12) +(def-tex precur-tube-joint-02 precura-vis-tfrag 13) +(def-tex precur-tubes-bundle-01 precura-vis-tfrag 14) +(def-tex precur-pipe-round-01 precura-vis-tfrag 16) +(def-tex precur-wall-groove-01 precura-vis-tfrag 17) +(def-tex precur-tentacle-01 precura-vis-tfrag 18) +(def-tex precur-wall-blade-01 precura-vis-tfrag 19) +(def-tex precur-tubes-segment-02 precura-vis-tfrag 20) +(def-tex precur-plate-plain-01 precura-vis-tfrag 21) +(def-tex precur-frame-small-01 precura-vis-tfrag 22) +(def-tex precur-light-green-02 precura-vis-tfrag 23) +(def-tex precur-plate-thin-01 precura-vis-tfrag 24) +(def-tex precur-plate-large-01 precura-vis-tfrag 25) +(def-tex precur-road-plate-01 precura-vis-tfrag 26) +(def-tex precur-container-plate-01 precura-vis-tfrag 27) +(def-tex precur-plate-honey-01 precura-vis-tfrag 30) +(def-tex precur-engine-frame-01 precura-vis-tfrag 31) +(def-tex precur-wall-tube-01 precura-vis-tfrag 32) +(def-tex precur-platform-plate precura-vis-tfrag 33) +(def-tex precur-tubes-bundle-02 precura-vis-tfrag 34) +(def-tex precur-rubber-01 precura-vis-tfrag 35) +(def-tex precur-light-blue-01 precura-vis-tfrag 37) +(def-tex precur-tube-honey-big precura-vis-tfrag 38) +(def-tex precur-control-screen precura-vis-tfrag 39) +(def-tex common-black precura-vis-tfrag 40) +(def-tex precur-floor-large-01 precura-vis-tfrag 41) +(def-tex precur-generator-crystal-01 precura-vis-tfrag 48) +(def-tex precur-wall-tube-03 precura-vis-tfrag 49) +(def-tex precur-blue-light-02 precura-vis-tfrag 50) +(def-tex precur-light-green-big precura-vis-tfrag 54) +(def-tex precur-trim-01 precura-vis-tfrag 55) +(def-tex precur-bomb-light precura-vis-tfrag 56) +(def-tex precur-light-red-01 precura-vis-tfrag 58) +(def-tex precur-floor-base-01 precura-vis-tfrag 59) +(def-tex precur-bomb-spawner-hole precura-vis-tfrag 61) +(def-tex precur-small-plate-edge precura-vis-tfrag 62) +(def-tex environment-precur-level precura-vis-tfrag 63) +(def-tex precur-floor-large-01-lotweak precura-vis-tfrag 67) +(def-tex precur-plate-large-01 precurb-vis-tfrag 0) +(def-tex precur-tubes-small-01 precurb-vis-tfrag 1) +(def-tex precur-light-blue-01 precurb-vis-tfrag 2) +(def-tex precur-wall-brace-01 precurb-vis-tfrag 3) +(def-tex precur-wall-groove-01 precurb-vis-tfrag 4) +(def-tex precur-tubes-segment-02 precurb-vis-tfrag 5) +(def-tex precur-plate-thin-01 precurb-vis-tfrag 6) +(def-tex precur-tube-joint-01 precurb-vis-tfrag 7) +(def-tex precur-tubes-bundle-01 precurb-vis-tfrag 8) +(def-tex precur-floor-plate-02 precurb-vis-tfrag 9) +(def-tex precur-light-green-01 precurb-vis-tfrag 10) +(def-tex precur-nail-01 precurb-vis-tfrag 11) +(def-tex precur-tubes-segment-01 precurb-vis-tfrag 12) +(def-tex precur-floor-plate-01 precurb-vis-tfrag 13) +(def-tex precur-plate-end-01 precurb-vis-tfrag 14) +(def-tex precur-tube-joint-02 precurb-vis-tfrag 15) +(def-tex precur-frame-small-01 precurb-vis-tfrag 16) +(def-tex precur-light-green-02 precurb-vis-tfrag 17) +(def-tex precur-plate-plain-01 precurb-vis-tfrag 18) +(def-tex precur-tentacle-01 precurb-vis-tfrag 20) +(def-tex precur-wall-tube-01 precurb-vis-tfrag 21) +(def-tex precur-platform-plate precurb-vis-tfrag 22) +(def-tex precur-tubes-bundle-02 precurb-vis-tfrag 23) +(def-tex precur-wall-tube-02 precurb-vis-tfrag 24) +(def-tex precur-plate-honey-01 precurb-vis-tfrag 26) +(def-tex precur-plate-pattern-01 precurb-vis-tfrag 27) +(def-tex precur-container-plate-01 precurb-vis-tfrag 28) +(def-tex precur-engine-frame-01 precurb-vis-tfrag 31) +(def-tex precur-road-plate-01 precurb-vis-tfrag 32) +(def-tex precur-nail-02 precurb-vis-tfrag 33) +(def-tex precur-pipe-round-01 precurb-vis-tfrag 35) +(def-tex precur-blue-light-02 precurb-vis-tfrag 36) +(def-tex precur-wall-blade-01 precurb-vis-tfrag 37) +(def-tex common-black precurb-vis-tfrag 38) +(def-tex precur-control-screen precurb-vis-tfrag 39) +(def-tex precur-light-green-big precurb-vis-tfrag 48) +(def-tex precur-wall-tube-03 precurb-vis-tfrag 49) +(def-tex precur-generator-crystal-01 precurb-vis-tfrag 50) +(def-tex precur-trim-01 precurb-vis-tfrag 51) +(def-tex precur-floor-base-01 precurb-vis-tfrag 52) +(def-tex precur-tube-honey-big precurb-vis-tfrag 53) +(def-tex precur-light-red-01 precurb-vis-tfrag 54) +(def-tex precur-floor-large-01 precurb-vis-tfrag 55) +(def-tex precur-bomb-spawner-hole precurb-vis-tfrag 56) +(def-tex precur-switch-light precurb-vis-tfrag 57) +(def-tex precur-small-plate-edge precurb-vis-tfrag 58) +(def-tex environment-precur-level precurb-vis-tfrag 59) +(def-tex precur-small-plate-02 precurb-vis-tfrag 60) +(def-tex precur-floor-large-01-lotweak precurb-vis-tfrag 61) +(def-tex precur-tube-joint-01 precura-vis-shrub 0) +(def-tex precur-nail-01 precura-vis-shrub 2) +(def-tex precur-window-glass precura-vis-water 0) +(def-tex common-glass precura-vis-water 1) +(def-tex precur-tube-joint-01 precurb-vis-shrub 0) +(def-tex precur-blue-light-01 precurb-vis-shrub 1) +(def-tex precur-nail-01 precurb-vis-shrub 2) +(def-tex precur-road-plate-01 precurd-vis-tfrag 0) +(def-tex precur-wall-brace-01 precurd-vis-tfrag 1) +(def-tex precur-tentacle-01 precurd-vis-tfrag 2) +(def-tex precur-plate-large-01 precurd-vis-tfrag 3) +(def-tex precur-tubes-small-01 precurd-vis-tfrag 4) +(def-tex precur-wall-groove-01 precurd-vis-tfrag 6) +(def-tex precur-wall-tube-01 precurd-vis-tfrag 7) +(def-tex precur-tubes-segment-02 precurd-vis-tfrag 8) +(def-tex precur-plate-thin-01 precurd-vis-tfrag 9) +(def-tex precur-tube-joint-01 precurd-vis-tfrag 11) +(def-tex precur-tubes-bundle-01 precurd-vis-tfrag 12) +(def-tex precur-tube-joint-02 precurd-vis-tfrag 13) +(def-tex precur-tube-honey-big precurd-vis-tfrag 14) +(def-tex precur-light-green-01 precurd-vis-tfrag 15) +(def-tex precur-nail-02 precurd-vis-tfrag 16) +(def-tex precur-nail-01 precurd-vis-tfrag 17) +(def-tex precur-tubes-segment-01 precurd-vis-tfrag 18) +(def-tex precur-floor-plate-02 precurd-vis-tfrag 19) +(def-tex precur-small-plate-01 precurd-vis-tfrag 20) +(def-tex precur-small-plate-edge precurd-vis-tfrag 21) +(def-tex precur-small-plate-02 precurd-vis-tfrag 22) +(def-tex precur-wall-tube-02 precurd-vis-tfrag 23) +(def-tex precur-plate-end-01 precurd-vis-tfrag 24) +(def-tex precur-wall-blade-01 precurd-vis-tfrag 25) +(def-tex precur-tubes-bundle-02 precurd-vis-tfrag 26) +(def-tex precur-light-green-02 precurd-vis-tfrag 28) +(def-tex precur-plate-pattern-01 precurd-vis-tfrag 29) +(def-tex precur-plate-honey-01 precurd-vis-tfrag 30) +(def-tex precur-floor-plate-01 precurd-vis-tfrag 32) +(def-tex precur-pipe-round-01 precurd-vis-tfrag 33) +(def-tex precur-engine-frame-01 precurd-vis-tfrag 36) +(def-tex precur-bridge-stage-01 precurd-vis-tfrag 37) +(def-tex precur-bridge-floor-01 precurd-vis-tfrag 38) +(def-tex precur-bridge-plate-01 precurd-vis-tfrag 39) +(def-tex precur-trim-01 precurd-vis-tfrag 49) +(def-tex precur-wall-tube-03 precurd-vis-tfrag 50) +(def-tex precur-floor-base-01 precurd-vis-tfrag 51) +(def-tex precur-floor-large-01 precurd-vis-tfrag 53) +(def-tex environment-precur-level precurd-vis-tfrag 54) +(def-tex precur-blue-light-02 precurd-vis-tfrag 55) +(def-tex precur-terraformer-low-metal-02 precurd-vis-tfrag 56) +(def-tex precur-terraformer-low-legs precurd-vis-tfrag 57) +(def-tex precur-terraformer-low-body-02 precurd-vis-tfrag 58) +(def-tex precur-terraformer-low-metal-01 precurd-vis-tfrag 59) +(def-tex precur-terraformer-low-body-03 precurd-vis-tfrag 60) +(def-tex precur-terraformer-low-body-01 precurd-vis-tfrag 61) +(def-tex precur-floor-large-01-lotweak precurd-vis-tfrag 62) +(def-tex precur-light-green-big precurd-vis-tfrag 63) +(def-tex common-black precura-vis-pris 19) +(def-tex dp-bipedal-backhand-01 precura-vis-pris 20) +(def-tex dp-bipedal-chest-01 precura-vis-pris 21) +(def-tex dp-bipedal-dk-hose-01 precura-vis-pris 22) +(def-tex dp-bipedal-dk-plate-01 precura-vis-pris 23) +(def-tex dp-bipedal-dk-plate-02 precura-vis-pris 24) +(def-tex dp-bipedal-dk-plate-03 precura-vis-pris 25) +(def-tex dp-bipedal-dk-plate-04 precura-vis-pris 26) +(def-tex dp-bipedal-dk-sm-plate-01 precura-vis-pris 27) +(def-tex dp-bipedal-dk-stomach-plate-01 precura-vis-pris 28) +(def-tex dp-bipedal-eye-01 precura-vis-pris 29) +(def-tex dp-bipedal-finger-plate-01 precura-vis-pris 30) +(def-tex dp-bipedal-nose-01 precura-vis-pris 31) +(def-tex dp-bipedal-power-hose precura-vis-pris 32) +(def-tex dp-bipedal-skin-bulge-01 precura-vis-pris 33) +(def-tex dp-bipedal-skin-bulge-02 precura-vis-pris 34) +(def-tex dp-bipedal-skin-plate-01 precura-vis-pris 35) +(def-tex dp-bipedal-skin-plate-small-01 precura-vis-pris 36) +(def-tex dp-bipedal-skin-ribs-01 precura-vis-pris 37) +(def-tex dp-bipedal-spine-01 precura-vis-pris 38) +(def-tex dp-bipedal-toe-01 precura-vis-pris 39) +(def-tex environment-darkprec precura-vis-pris 40) +(def-tex neo-wasp-base precura-vis-pris 52) +(def-tex neo-wasp-body precura-vis-pris 53) +(def-tex neo-wasp-brown precura-vis-pris 54) +(def-tex neo-wasp-dark-brown precura-vis-pris 55) +(def-tex neo-wasp-eye precura-vis-pris 56) +(def-tex bam-eyelight precurd-vis-pris 0) +(def-tex bam-hairhilite precurd-vis-pris 1) +(def-tex daxter-eyelid precurd-vis-pris 2) +(def-tex daxter-furhilite precurd-vis-pris 3) +(def-tex daxter-orange precurd-vis-pris 4) +(def-tex daxterarm precurd-vis-pris 5) +(def-tex daxterbodyshort-eix precurd-vis-pris 6) +(def-tex daxterbolt precurd-vis-pris 7) +(def-tex daxterear precurd-vis-pris 8) +(def-tex daxterfinger precurd-vis-pris 9) +(def-tex daxterfoot precurd-vis-pris 10) +(def-tex daxterfoot-bottom precurd-vis-pris 11) +(def-tex daxtergoggles precurd-vis-pris 12) +(def-tex daxterheadwidenew precurd-vis-pris 13) +(def-tex daxterhelmetplain precurd-vis-pris 14) +(def-tex daxterlense precurd-vis-pris 15) +(def-tex daxternose precurd-vis-pris 16) +(def-tex daxterteeth precurd-vis-pris 17) +(def-tex daxtertuft precurd-vis-pris 18) +(def-tex dm-ship-cockpit-01 precurd-vis-pris 19) +(def-tex dm-ship-hull-01 precurd-vis-pris 20) +(def-tex dm-ship-hull-02 precurd-vis-pris 21) +(def-tex dm-ship-nose-01 precurd-vis-pris 22) +(def-tex dm-ship-nose-02 precurd-vis-pris 23) +(def-tex dm-ship-plate-01 precurd-vis-pris 24) +(def-tex environment-darkprec precurd-vis-pris 25) +(def-tex environment-oldmetal precurd-vis-pris 26) +(def-tex errocyber-faceflesh precurd-vis-pris 27) +(def-tex errolcyber-bluedome precurd-vis-pris 28) +(def-tex errolcyber-earcup precurd-vis-pris 29) +(def-tex errolcyber-hair precurd-vis-pris 30) +(def-tex errolcyber-head-01 precurd-vis-pris 31) +(def-tex errolcyber-head-02 precurd-vis-pris 32) +(def-tex errolcyber-insidemouth precurd-vis-pris 33) +(def-tex errolcyber-pipes-01 precurd-vis-pris 34) +(def-tex errolcyber-pipes-02 precurd-vis-pris 35) +(def-tex errolcyber-pipes-03 precurd-vis-pris 36) +(def-tex errolcyber-teeth precurd-vis-pris 37) +(def-tex terraformer-bodyside-bottom precurd-vis-pris 38) +(def-tex terraformer-bodyside-top precurd-vis-pris 39) +(def-tex terraformer-bodytopplain precurd-vis-pris 40) +(def-tex terraformer-bodytopstrans precurd-vis-pris 41) +(def-tex terraformer-cockpit precurd-vis-pris 42) +(def-tex terraformer-footpipes-01 precurd-vis-pris 44) +(def-tex terraformer-metal-01 precurd-vis-pris 45) +(def-tex terraformer-metal-02 precurd-vis-pris 46) +(def-tex terraformer-metal-03 precurd-vis-pris 47) +(def-tex terraformer-metal-04 precurd-vis-pris 48) +(def-tex terraformer-metal-05 precurd-vis-pris 49) +(def-tex terraformer-metal-07 precurd-vis-pris 50) +(def-tex terraformer-metal-08 precurd-vis-pris 51) +(def-tex terraformer-metal-09 precurd-vis-pris 52) +(def-tex terraformer-metal-10 precurd-vis-pris 53) +(def-tex terraformer-minestrips-01 precurd-vis-pris 54) +(def-tex terraformer-organic-01 precurd-vis-pris 55) +(def-tex terraformer-organic-02 precurd-vis-pris 56) +(def-tex terraformer-organic-03 precurd-vis-pris 57) +(def-tex terraformer-transbodytop-01 precurd-vis-pris 58) +(def-tex jakc-armor precurd-vis-pris 59) +(def-tex jakc-chestplate-straps precurd-vis-pris 60) +(def-tex jakc-gogglemetal precurd-vis-pris 61) +(def-tex jakc-lens precurd-vis-pris 62) +(def-tex jakc-scarf precurd-vis-pris 63) +(def-tex jakc-scarfhanging precurd-vis-pris 64) +(def-tex jakc-skirt precurd-vis-pris 65) +(def-tex jakc-waistband2 precurd-vis-pris 66) +(def-tex jakc-wraps precurd-vis-pris 67) +(def-tex jakc-wristband-a2 precurd-vis-pris 68) +(def-tex jakchires-arm precurd-vis-pris 69) +(def-tex jakchires-blackstrap precurd-vis-pris 70) +(def-tex jakchires-brownstrap precurd-vis-pris 71) +(def-tex jakchires-brwnleather precurd-vis-pris 72) +(def-tex jakchires-chestplate precurd-vis-pris 73) +(def-tex jakchires-clips precurd-vis-pris 74) +(def-tex jakchires-eye precurd-vis-pris 75) +(def-tex jakchires-eyebrow precurd-vis-pris 76) +(def-tex jakchires-eyelid precurd-vis-pris 77) +(def-tex jakchires-facelft precurd-vis-pris 78) +(def-tex jakchires-facert precurd-vis-pris 79) +(def-tex jakchires-glovetop precurd-vis-pris 80) +(def-tex jakchires-hair precurd-vis-pris 81) +(def-tex jakchires-horn precurd-vis-pris 82) +(def-tex jakchires-jacket precurd-vis-pris 83) +(def-tex jakchires-leatherpouch precurd-vis-pris 84) +(def-tex jakchires-lightbrownspat precurd-vis-pris 85) +(def-tex jakchires-pants precurd-vis-pris 86) +(def-tex jakchires-precarmor-01 precurd-vis-pris 87) +(def-tex jakchires-shoebottom precurd-vis-pris 88) +(def-tex jakchires-shoemetal precurd-vis-pris 89) +(def-tex jakchires-shoeteop precurd-vis-pris 90) +(def-tex jakchires-teeth precurd-vis-pris 91) +(def-tex dm-ship-tentacle-01 precurd-vis-pris 92) +(def-tex errolcyber-bighand-01 precurd-vis-pris 93) +(def-tex errolcyber-bigshoulder precurd-vis-pris 94) +(def-tex errolcyber-bluemetal-01 precurd-vis-pris 95) +(def-tex errolcyber-bluewrap precurd-vis-pris 96) +(def-tex errolcyber-chestplate precurd-vis-pris 97) +(def-tex errolcyber-dirtymetal precurd-vis-pris 98) +(def-tex errolcyber-fingers precurd-vis-pris 99) +(def-tex errolcyber-glovepalm precurd-vis-pris 100) +(def-tex errolcyber-greyknobs precurd-vis-pris 101) +(def-tex errolcyber-greymetal precurd-vis-pris 102) +(def-tex errolcyber-greymetal-02 precurd-vis-pris 103) +(def-tex errolcyber-insidewires precurd-vis-pris 104) +(def-tex errolcyber-jointpipe precurd-vis-pris 105) +(def-tex errolcyber-metalgold precurd-vis-pris 106) +(def-tex errolcyber-redmetal-01 precurd-vis-pris 107) +(def-tex errolcyber-redmetal-02 precurd-vis-pris 108) +(def-tex errolcyber-redmetal-03 precurd-vis-pris 109) +(def-tex errolcyber-rubberpipe precurd-vis-pris 110) +(def-tex errolcyber-rubberpipe-light precurd-vis-pris 111) +(def-tex errolcyber-spine precurd-vis-pris 112) +(def-tex errocyber-eye precurd-vis-pris 126) +(def-tex errocyber-eyelid precurd-vis-pris 127) +(def-tex errolcyber-metaleyelid precurd-vis-pris 128) +(def-tex errolcyber-roboeye precurd-vis-pris 129) +(def-tex precur-planet-water-01 precurd-vis-pris 135) +(def-tex precur-wall-brace-01 precurc-vis-tfrag 0) +(def-tex precur-plate-large-01 precurc-vis-tfrag 1) +(def-tex precur-tubes-small-01 precurc-vis-tfrag 2) +(def-tex precur-tube-joint-01 precurc-vis-tfrag 3) +(def-tex precur-light-green-01 precurc-vis-tfrag 4) +(def-tex precur-nail-02 precurc-vis-tfrag 5) +(def-tex precur-nail-01 precurc-vis-tfrag 6) +(def-tex precur-tubes-segment-01 precurc-vis-tfrag 7) +(def-tex precur-road-plate-01 precurc-vis-tfrag 8) +(def-tex precur-tentacle-01 precurc-vis-tfrag 9) +(def-tex precur-wall-tube-01 precurc-vis-tfrag 10) +(def-tex precur-tubes-segment-02 precurc-vis-tfrag 11) +(def-tex precur-wall-groove-01 precurc-vis-tfrag 12) +(def-tex common-black precurc-vis-tfrag 13) +(def-tex precur-rubber-01 precurc-vis-tfrag 14) +(def-tex precur-wall-tube-02 precurc-vis-tfrag 16) +(def-tex precur-plate-thin-01 precurc-vis-tfrag 17) +(def-tex precur-plate-end-01 precurc-vis-tfrag 19) +(def-tex precur-plate-pattern-01 precurc-vis-tfrag 20) +(def-tex precur-plate-honey-01 precurc-vis-tfrag 21) +(def-tex precur-tubes-bundle-01 precurc-vis-tfrag 22) +(def-tex precur-frame-small-01 precurc-vis-tfrag 23) +(def-tex precur-light-green-02 precurc-vis-tfrag 24) +(def-tex precur-lightball-base precurc-vis-tfrag 25) +(def-tex precur-pipe-round-01 precurc-vis-tfrag 26) +(def-tex precur-plate-plain-01 precurc-vis-tfrag 27) +(def-tex precur-container-plate-01 precurc-vis-tfrag 28) +(def-tex precur-tube-joint-02 precurc-vis-tfrag 31) +(def-tex precur-engine-frame-01 precurc-vis-tfrag 33) +(def-tex precur-blue-light-02 precurc-vis-tfrag 34) +(def-tex precur-wall-blade-01 precurc-vis-tfrag 35) +(def-tex precur-floor-plate-02 precurc-vis-tfrag 36) +(def-tex precur-platform-plate precurc-vis-tfrag 37) +(def-tex precur-floor-plate-01 precurc-vis-tfrag 38) +(def-tex precur-tubes-bundle-02 precurc-vis-tfrag 39) +(def-tex precur-trim-01 precurc-vis-tfrag 53) +(def-tex precur-small-plate-edge precurc-vis-tfrag 54) +(def-tex precur-wall-tube-03 precurc-vis-tfrag 55) +(def-tex precur-floor-base-01 precurc-vis-tfrag 56) +(def-tex precur-tube-honey-big precurc-vis-tfrag 57) +(def-tex precur-light-red-01 precurc-vis-tfrag 58) +(def-tex precur-floor-large-01 precurc-vis-tfrag 59) +(def-tex environment-precur-level precurc-vis-tfrag 60) +(def-tex precur-floor-large-01-lotweak precurc-vis-tfrag 64) +(def-tex precur-light-green-big precurc-vis-tfrag 65) +(def-tex precur-nail-01 precurc-vis-shrub 0) +(def-tex precur-tube-joint-01 precurc-vis-shrub 2) +(def-tex precur-blue-light-01 precurc-vis-shrub 3) +(def-tex hud-tformer-target-01 desboss1-minimap 0) +(def-tex tow-pup-skin-01 ltowera-vis-tfrag 3) +(def-tex tow-eggpod-01 ltowera-vis-tfrag 4) +(def-tex tow-pupeyes-01 ltowera-vis-tfrag 5) +(def-tex tow-pup-detail-01 ltowera-vis-tfrag 6) +(def-tex tow-eggtop-01 ltowera-vis-tfrag 8) +(def-tex tow-basebone-01 ltowera-vis-tfrag 9) +(def-tex tow-egg-remains-side ltowera-vis-tfrag 12) +(def-tex lt-eco-vent-blue-01 ltowera-vis-tfrag 13) +(def-tex lt-eco-vent-side-01 ltowera-vis-tfrag 14) +(def-tex tow-wall-supports ltowera-vis-tfrag 15) +(def-tex tow-base-ground ltowera-vis-tfrag 16) +(def-tex tow-plat-side ltowera-vis-tfrag 17) +(def-tex tow-base-ground-plat ltowera-vis-tfrag 18) +(def-tex tow-baserock ltowera-vis-tfrag 19) +(def-tex tow-pup-metal-01 ltowera-vis-tfrag 20) +(def-tex tow-egg-group-base ltowera-vis-tfrag 21) +(def-tex tow-groundpod ltowera-vis-tfrag 22) +(def-tex tow-blackhole ltowera-vis-tfrag 23) +(def-tex tow-eggside-01 ltowera-vis-tfrag 24) +(def-tex tow-wall-tentacle-02 ltowera-vis-tfrag 25) +(def-tex rail-env-wall-01 ltowera-vis-tfrag 26) +(def-tex tow-wall-supports-HI ltowera-vis-tfrag 27) +(def-tex tow-dplight-blue-01 ltowera-vis-tfrag 28) +(def-tex tow-wall-supports ltowera-vis-shrub 3) +(def-tex tow-groundpod ltowera-vis-shrub 4) +(def-tex tow-eggside-01 ltowera-vis-shrub 5) +(def-tex tow-slime-01 ltowera-vis-shrub 6) +(def-tex tow-eggcase-01 ltowera-vis-alpha 0) +(def-tex tow-eggtop-01 ltowera-vis-alpha 1) +(def-tex tow-eggside-01 ltowera-vis-alpha 2) +(def-tex tow-eggpod-01 ltowerb-vis-tfrag 1) +(def-tex mhcity-wall-tentacle-02 ltowerb-vis-tfrag 2) +(def-tex tow-eggcase-01 ltowerb-vis-tfrag 3) +(def-tex tow-eggtop-01 ltowerb-vis-tfrag 4) +(def-tex tow-pup-skin-01 ltowerb-vis-tfrag 5) +(def-tex tow-pupeyes-01 ltowerb-vis-tfrag 6) +(def-tex tow-pup-detail-01 ltowerb-vis-tfrag 7) +(def-tex tow-basebone-01 ltowerb-vis-tfrag 8) +(def-tex mhcity-basebone ltowerb-vis-tfrag 9) +(def-tex city-lowres-mhcity-wall-06 ltowerb-vis-tfrag 10) +(def-tex city-lowres-mhcity-wall-05 ltowerb-vis-tfrag 11) +(def-tex city-lowres-mhcity-tower-01 ltowerb-vis-tfrag 12) +(def-tex mhcity-baserock ltowerb-vis-tfrag 13) +(def-tex mhcity-base-ground ltowerb-vis-tfrag 14) +(def-tex tow-eggside-01 ltowerb-vis-tfrag 15) +(def-tex tow-wall-supports ltowerb-vis-tfrag 17) +(def-tex tow-egg-group-base ltowerb-vis-tfrag 18) +(def-tex tow-groundpod ltowerb-vis-tfrag 19) +(def-tex tow-pup-metal-01 ltowerb-vis-tfrag 20) +(def-tex tow-baserock ltowerb-vis-tfrag 21) +(def-tex tow-wall-supports-HI ltowerb-vis-tfrag 22) +(def-tex tow-outerpod-shell ltowerb-vis-tfrag 23) +(def-tex tow-wall-tentacle-02 ltowerb-vis-tfrag 24) +(def-tex tow-base-ground ltowerb-vis-tfrag 25) +(def-tex tow-outer-tubes ltowerb-vis-tfrag 27) +(def-tex tow-groundpod ltowerb-vis-shrub 2) +(def-tex tow-wall-supports ltowerb-vis-shrub 3) +(def-tex tow-eggcase-01 ltowerb-vis-alpha 0) +(def-tex tow-eggtop-01 ltowerb-vis-alpha 1) +(def-tex tow-eggside-01 ltowerb-vis-alpha 2) +(def-tex tow-eggpod-01 towerb-vis-tfrag 0) +(def-tex tow-egg-remains-side towerb-vis-tfrag 1) +(def-tex tow-pup-skin-01 towerb-vis-tfrag 2) +(def-tex tow-pupeyes-01 towerb-vis-tfrag 3) +(def-tex tow-pup-detail-01 towerb-vis-tfrag 4) +(def-tex tow-eggtop-01 towerb-vis-tfrag 6) +(def-tex tow-basebone-01 towerb-vis-tfrag 7) +(def-tex mhcity-wall-tentacle-02 towerb-vis-tfrag 8) +(def-tex tow-wall-supports towerb-vis-tfrag 12) +(def-tex tow-base-ground towerb-vis-tfrag 13) +(def-tex tow-plat-side towerb-vis-tfrag 14) +(def-tex tow-base-ground-plat towerb-vis-tfrag 15) +(def-tex tow-dplight-blue-01 towerb-vis-tfrag 16) +(def-tex tow-pup-metal-01 towerb-vis-tfrag 17) +(def-tex tow-egg-group-base towerb-vis-tfrag 18) +(def-tex tow-eggside-01 towerb-vis-tfrag 19) +(def-tex tow-groundpod towerb-vis-tfrag 20) +(def-tex tow-wall-supports-HI towerb-vis-tfrag 21) +(def-tex tow-blackhole towerb-vis-tfrag 22) +(def-tex tow-bridge-source towerb-vis-tfrag 23) +(def-tex tow-baserock towerb-vis-tfrag 24) +(def-tex rail-env-wall-01 towerb-vis-tfrag 25) +(def-tex tow-wall-tentacle-02 towerb-vis-tfrag 26) +(def-tex tow-eggcase-01 towerb-vis-alpha 0) +(def-tex tow-eggtop-01 towerb-vis-alpha 1) +(def-tex tow-eggside-01 towerb-vis-alpha 2) +(def-tex tow-wall-supports towerb-vis-shrub 3) +(def-tex tow-groundpod towerb-vis-shrub 4) +(def-tex tow-eggside-01 towerb-vis-shrub 5) +(def-tex tow-slime-01 towerb-vis-shrub 6) +(def-tex backThing01 ltowerb-vis-pris 0) +(def-tex bam-eyelight ltowerb-vis-pris 1) +(def-tex bam-hairhilite ltowerb-vis-pris 2) +(def-tex dash01 ltowerb-vis-pris 3) +(def-tex environment-oldmetal ltowerb-vis-pris 4) +(def-tex errocyber-faceflesh ltowerb-vis-pris 5) +(def-tex errolcyber-bluedome ltowerb-vis-pris 6) +(def-tex errolcyber-earcup ltowerb-vis-pris 7) +(def-tex errolcyber-hair ltowerb-vis-pris 8) +(def-tex errolcyber-head-01 ltowerb-vis-pris 9) +(def-tex errolcyber-head-02 ltowerb-vis-pris 10) +(def-tex errolcyber-insidemouth ltowerb-vis-pris 11) +(def-tex errolcyber-pipes-01 ltowerb-vis-pris 12) +(def-tex errolcyber-pipes-02 ltowerb-vis-pris 13) +(def-tex errolcyber-pipes-03 ltowerb-vis-pris 14) +(def-tex errolcyber-teeth ltowerb-vis-pris 15) +(def-tex gauge01 ltowerb-vis-pris 16) +(def-tex grillRim01 ltowerb-vis-pris 17) +(def-tex gunBoxBack01 ltowerb-vis-pris 18) +(def-tex gunBoxFront01 ltowerb-vis-pris 19) +(def-tex gunbox01 ltowerb-vis-pris 20) +(def-tex gunbox02 ltowerb-vis-pris 21) +(def-tex hood01 ltowerb-vis-pris 22) +(def-tex jakc-armor ltowerb-vis-pris 23) +(def-tex jakc-chestplate-straps ltowerb-vis-pris 24) +(def-tex jakc-gogglemetal ltowerb-vis-pris 25) +(def-tex jakc-lens ltowerb-vis-pris 26) +(def-tex jakc-scarf ltowerb-vis-pris 27) +(def-tex jakc-scarfhanging ltowerb-vis-pris 28) +(def-tex jakc-skirt ltowerb-vis-pris 29) +(def-tex jakc-waistband2 ltowerb-vis-pris 30) +(def-tex jakc-wraps ltowerb-vis-pris 31) +(def-tex jakc-wristband-a2 ltowerb-vis-pris 32) +(def-tex jakchires-arm ltowerb-vis-pris 33) +(def-tex jakchires-blackstrap ltowerb-vis-pris 34) +(def-tex jakchires-brownstrap ltowerb-vis-pris 35) +(def-tex jakchires-brwnleather ltowerb-vis-pris 36) +(def-tex jakchires-chestplate ltowerb-vis-pris 37) +(def-tex jakchires-clips ltowerb-vis-pris 38) +(def-tex jakchires-eye ltowerb-vis-pris 39) +(def-tex jakchires-eyebrow ltowerb-vis-pris 40) +(def-tex jakchires-eyelid ltowerb-vis-pris 41) +(def-tex jakchires-facelft ltowerb-vis-pris 42) +(def-tex jakchires-facert ltowerb-vis-pris 43) +(def-tex jakchires-glovetop ltowerb-vis-pris 44) +(def-tex jakchires-hair ltowerb-vis-pris 45) +(def-tex jakchires-horn ltowerb-vis-pris 46) +(def-tex jakchires-jacket ltowerb-vis-pris 47) +(def-tex jakchires-leatherpouch ltowerb-vis-pris 48) +(def-tex jakchires-lightbrownspat ltowerb-vis-pris 49) +(def-tex jakchires-pants ltowerb-vis-pris 50) +(def-tex jakchires-precarmor-01 ltowerb-vis-pris 51) +(def-tex jakchires-shoebottom ltowerb-vis-pris 52) +(def-tex jakchires-shoemetal ltowerb-vis-pris 53) +(def-tex jakchires-shoeteop ltowerb-vis-pris 54) +(def-tex jakchires-teeth ltowerb-vis-pris 55) +(def-tex jetTop01 ltowerb-vis-pris 56) +(def-tex jets01 ltowerb-vis-pris 57) +(def-tex kcfrontend01 ltowerb-vis-pris 58) +(def-tex light01 ltowerb-vis-pris 59) +(def-tex lightCase01 ltowerb-vis-pris 60) +(def-tex post01 ltowerb-vis-pris 61) +(def-tex rail01 ltowerb-vis-pris 62) +(def-tex seat01 ltowerb-vis-pris 63) +(def-tex stripe03 ltowerb-vis-pris 64) +(def-tex turret01 ltowerb-vis-pris 65) +(def-tex wing01 ltowerb-vis-pris 66) +(def-tex wing02 ltowerb-vis-pris 67) +(def-tex wing02grey01 ltowerb-vis-pris 68) +(def-tex errolcyber-bighand-01 ltowerb-vis-pris 69) +(def-tex errolcyber-bigshoulder ltowerb-vis-pris 70) +(def-tex errolcyber-bluemetal-01 ltowerb-vis-pris 71) +(def-tex errolcyber-bluewrap ltowerb-vis-pris 72) +(def-tex errolcyber-chestplate ltowerb-vis-pris 73) +(def-tex errolcyber-dirtymetal ltowerb-vis-pris 74) +(def-tex errolcyber-fingers ltowerb-vis-pris 75) +(def-tex errolcyber-glovepalm ltowerb-vis-pris 76) +(def-tex errolcyber-greyknobs ltowerb-vis-pris 77) +(def-tex errolcyber-greymetal ltowerb-vis-pris 78) +(def-tex errolcyber-greymetal-02 ltowerb-vis-pris 79) +(def-tex errolcyber-insidewires ltowerb-vis-pris 80) +(def-tex errolcyber-jointpipe ltowerb-vis-pris 81) +(def-tex errolcyber-metalgold ltowerb-vis-pris 82) +(def-tex errolcyber-redmetal-01 ltowerb-vis-pris 83) +(def-tex errolcyber-redmetal-02 ltowerb-vis-pris 84) +(def-tex errolcyber-redmetal-03 ltowerb-vis-pris 85) +(def-tex errolcyber-rubberpipe ltowerb-vis-pris 86) +(def-tex errolcyber-rubberpipe-light ltowerb-vis-pris 87) +(def-tex errolcyber-spine ltowerb-vis-pris 88) +(def-tex errocyber-eye ltowerb-vis-pris 89) +(def-tex errocyber-eyelid ltowerb-vis-pris 90) +(def-tex errolcyber-metaleyelid ltowerb-vis-pris 91) +(def-tex errolcyber-roboeye ltowerb-vis-pris 92) +(def-tex dark-crystal-knob-01 ltowerb-vis-pris 93) +(def-tex dark-crystal-knob-02 ltowerb-vis-pris 94) +(def-tex dark-crystal-pickup-01 ltowerb-vis-pris 95) +(def-tex dark-crystal-pickup-02 ltowerb-vis-pris 96) +(def-tex dark-crystal-pickup-03 ltowerb-vis-pris 97) +(def-tex bam-eyelight ltowerb-vis-pris2 0) +(def-tex charHOLD ltowerb-vis-pris2 1) +(def-tex environment-oldmetal ltowerb-vis-pris2 2) +(def-tex sig-belt ltowerb-vis-pris2 3) +(def-tex sig-eye ltowerb-vis-pris2 4) +(def-tex sig-eyelid ltowerb-vis-pris2 5) +(def-tex sig-faceleft ltowerb-vis-pris2 6) +(def-tex sig-facert ltowerb-vis-pris2 7) +(def-tex sig-flask ltowerb-vis-pris2 8) +(def-tex sig-gem-01 ltowerb-vis-pris2 9) +(def-tex sig-glove ltowerb-vis-pris2 10) +(def-tex sig-glovetop ltowerb-vis-pris2 11) +(def-tex sig-gun-01 ltowerb-vis-pris2 12) +(def-tex sig-gun-02 ltowerb-vis-pris2 13) +(def-tex sig-gun-03 ltowerb-vis-pris2 14) +(def-tex sig-gun-04 ltowerb-vis-pris2 15) +(def-tex sig-gun-05 ltowerb-vis-pris2 16) +(def-tex sig-headgear ltowerb-vis-pris2 17) +(def-tex sig-horn ltowerb-vis-pris2 18) +(def-tex sig-lens ltowerb-vis-pris2 19) +(def-tex sig-metal-01 ltowerb-vis-pris2 20) +(def-tex sig-metal-dirty ltowerb-vis-pris2 21) +(def-tex sig-sac ltowerb-vis-pris2 22) +(def-tex sig-shoebottom ltowerb-vis-pris2 23) +(def-tex sig-shoetop ltowerb-vis-pris2 24) +(def-tex sig-shoulderarmor ltowerb-vis-pris2 25) +(def-tex sig-skirts ltowerb-vis-pris2 26) +(def-tex sig-skirts-02 ltowerb-vis-pris2 27) +(def-tex sig-skirts-03 ltowerb-vis-pris2 28) +(def-tex sig-undergarments ltowerb-vis-pris2 29) +(def-tex vin-teeth-01 ltowerb-vis-pris2 30) +(def-tex windshield01 ltowerb-vis-water 0) +(def-tex sig-flatfangs ltowerb-vis-water 1) +(def-tex errolcyber-lens ltowerb-vis-water 2) +(def-tex bam-eyelight loutro-pris2 0) +(def-tex bam-hairhilite loutro-pris2 1) +(def-tex environment-oldmetal loutro-pris2 29) +(def-tex daxter-eyelid loutro-pris2 58) +(def-tex daxter-furhilite loutro-pris2 59) +(def-tex daxterteeth loutro-pris2 60) +(def-tex prec-veger-body loutro-pris2 61) +(def-tex prec-veger-ear loutro-pris2 62) +(def-tex prec-veger-foot loutro-pris2 63) +(def-tex prec-veger-foot-02 loutro-pris2 64) +(def-tex prec-veger-handback loutro-pris2 65) +(def-tex prec-veger-handpalm loutro-pris2 66) +(def-tex prec-veger-leg loutro-pris2 67) +(def-tex prec-veger-mouth loutro-pris2 68) +(def-tex prec-veger-neck loutro-pris2 69) +(def-tex prec-veger-newface loutro-pris2 70) +(def-tex prec-veger-nose loutro-pris2 71) +(def-tex prec-veger-orange loutro-pris2 72) +(def-tex prec-veger-sleeve loutro-pris2 73) +(def-tex prec-veger-spat loutro-pris2 74) +(def-tex prec-veger-vest loutro-pris2 75) +(def-tex veger-coatclips loutro-pris2 76) +(def-tex veger-hair loutro-pris2 77) +(def-tex veger-scarf loutro-pris2 78) +(def-tex bam-eyelight ljkfeet-pris 0) +(def-tex bam-hairhilite ljkfeet-pris 1) +(def-tex environment-oldmetal ljkfeet-pris 2) +(def-tex jak-orig-arm-formorph ljkfeet-pris 3) +(def-tex jak-orig-finger-formorph ljkfeet-pris 4) +(def-tex jakb-prison-handwraps ljkfeet-pris 5) +(def-tex jakb-prison-wraps ljkfeet-pris 6) +(def-tex jakc-armor ljkfeet-pris 7) +(def-tex jakc-chestplate-straps ljkfeet-pris 8) +(def-tex jakc-gogglemetal ljkfeet-pris 9) +(def-tex jakc-lens ljkfeet-pris 10) +(def-tex jakc-scarf ljkfeet-pris 11) +(def-tex jakc-waistband2 ljkfeet-pris 12) +(def-tex jakc-wraps ljkfeet-pris 13) +(def-tex jakc-wristband-a2 ljkfeet-pris 14) +(def-tex jakchires-arm ljkfeet-pris 15) +(def-tex jakchires-blackstrap ljkfeet-pris 16) +(def-tex jakchires-brownstrap ljkfeet-pris 17) +(def-tex jakchires-brwnleather ljkfeet-pris 18) +(def-tex jakchires-chestplate ljkfeet-pris 19) +(def-tex jakchires-clips ljkfeet-pris 20) +(def-tex jakchires-eye ljkfeet-pris 21) +(def-tex jakchires-eyebrow ljkfeet-pris 22) +(def-tex jakchires-eyelid ljkfeet-pris 23) +(def-tex jakchires-facelft ljkfeet-pris 24) +(def-tex jakchires-facert ljkfeet-pris 25) +(def-tex jakchires-glovetop ljkfeet-pris 26) +(def-tex jakchires-hair ljkfeet-pris 27) +(def-tex jakchires-horn ljkfeet-pris 28) +(def-tex jakchires-jacket ljkfeet-pris 29) +(def-tex jakchires-leatherpouch ljkfeet-pris 30) +(def-tex jakchires-pants ljkfeet-pris 31) +(def-tex jakchires-precarmor-01 ljkfeet-pris 32) +(def-tex jakchires-teeth ljkfeet-pris 33) +(def-tex bam-eyelight ldesgcst-pris 0) +(def-tex bam-hairhilite ldesgcst-pris 1) +(def-tex daxter-eyelid ldesgcst-pris 2) +(def-tex daxter-furhilite ldesgcst-pris 3) +(def-tex daxter-orange ldesgcst-pris 4) +(def-tex daxterarm ldesgcst-pris 5) +(def-tex daxterbodyshort-eix ldesgcst-pris 6) +(def-tex daxterbolt ldesgcst-pris 7) +(def-tex daxterear ldesgcst-pris 8) +(def-tex daxterfinger ldesgcst-pris 9) +(def-tex daxterfoot ldesgcst-pris 10) +(def-tex daxterfoot-bottom ldesgcst-pris 11) +(def-tex daxtergoggles ldesgcst-pris 12) +(def-tex daxterheadwidenew ldesgcst-pris 13) +(def-tex daxterhelmetplain ldesgcst-pris 14) +(def-tex daxterlense ldesgcst-pris 15) +(def-tex daxternose ldesgcst-pris 16) +(def-tex daxterteeth ldesgcst-pris 17) +(def-tex daxtertuft ldesgcst-pris 18) +(def-tex environment-oldmetal ldesgcst-pris 19) +(def-tex jakc-armor ldesgcst-pris 20) +(def-tex jakc-chestplate-straps ldesgcst-pris 21) +(def-tex jakc-gogglemetal ldesgcst-pris 22) +(def-tex jakc-lens ldesgcst-pris 23) +(def-tex jakc-scarf ldesgcst-pris 24) +(def-tex jakc-scarfhanging ldesgcst-pris 25) +(def-tex jakc-skirt ldesgcst-pris 26) +(def-tex jakc-waistband2 ldesgcst-pris 27) +(def-tex jakc-wraps ldesgcst-pris 28) +(def-tex jakc-wristband-a2 ldesgcst-pris 29) +(def-tex jakchires-arm ldesgcst-pris 30) +(def-tex jakchires-blackstrap ldesgcst-pris 31) +(def-tex jakchires-brownstrap ldesgcst-pris 32) +(def-tex jakchires-brwnleather ldesgcst-pris 33) +(def-tex jakchires-chestplate ldesgcst-pris 34) +(def-tex jakchires-clips ldesgcst-pris 35) +(def-tex jakchires-eye ldesgcst-pris 36) +(def-tex jakchires-eyebrow ldesgcst-pris 37) +(def-tex jakchires-eyelid ldesgcst-pris 38) +(def-tex jakchires-facelft ldesgcst-pris 39) +(def-tex jakchires-facert ldesgcst-pris 40) +(def-tex jakchires-glovetop ldesgcst-pris 41) +(def-tex jakchires-hair ldesgcst-pris 42) +(def-tex jakchires-horn ldesgcst-pris 43) +(def-tex jakchires-jacket ldesgcst-pris 44) +(def-tex jakchires-leatherpouch ldesgcst-pris 45) +(def-tex jakchires-lightbrownspat ldesgcst-pris 46) +(def-tex jakchires-pants ldesgcst-pris 47) +(def-tex jakchires-precarmor-01 ldesgcst-pris 48) +(def-tex jakchires-shoebottom ldesgcst-pris 49) +(def-tex jakchires-shoemetal ldesgcst-pris 50) +(def-tex jakchires-shoeteop ldesgcst-pris 51) +(def-tex jakchires-teeth ldesgcst-pris 52) +(def-tex bam-eyelight ldesgcst-pris2 0) +(def-tex charHOLD ldesgcst-pris2 1) +(def-tex environment-oldmetal ldesgcst-pris2 2) +(def-tex sig-belt ldesgcst-pris2 3) +(def-tex sig-eye ldesgcst-pris2 4) +(def-tex sig-eyelid ldesgcst-pris2 5) +(def-tex sig-faceleft ldesgcst-pris2 6) +(def-tex sig-facert ldesgcst-pris2 7) +(def-tex sig-flask ldesgcst-pris2 8) +(def-tex sig-gem-01 ldesgcst-pris2 9) +(def-tex sig-glove ldesgcst-pris2 10) +(def-tex sig-glovetop ldesgcst-pris2 11) +(def-tex sig-gun-01 ldesgcst-pris2 12) +(def-tex sig-gun-02 ldesgcst-pris2 13) +(def-tex sig-gun-03 ldesgcst-pris2 14) +(def-tex sig-gun-04 ldesgcst-pris2 15) +(def-tex sig-gun-05 ldesgcst-pris2 16) +(def-tex sig-headgear ldesgcst-pris2 17) +(def-tex sig-horn ldesgcst-pris2 18) +(def-tex sig-lens ldesgcst-pris2 19) +(def-tex sig-metal-01 ldesgcst-pris2 20) +(def-tex sig-metal-dirty ldesgcst-pris2 21) +(def-tex sig-sac ldesgcst-pris2 22) +(def-tex sig-shoebottom ldesgcst-pris2 23) +(def-tex sig-shoetop ldesgcst-pris2 24) +(def-tex sig-shoulderarmor ldesgcst-pris2 25) +(def-tex sig-skirts ldesgcst-pris2 26) +(def-tex sig-skirts-02 ldesgcst-pris2 27) +(def-tex sig-skirts-03 ldesgcst-pris2 28) +(def-tex sig-undergarments ldesgcst-pris2 29) +(def-tex vin-teeth-01 ldesgcst-pris2 30) +(def-tex sig-flatfangs ldesgcst-water 0) +(def-tex nst-egg-spider-body lbbspid-pris 0) +(def-tex nst-egg-spider-egg lbbspid-pris 1) +(def-tex nst-egg-spider-eye lbbspid-pris 2) +(def-tex nst-egg-spider-metal lbbspid-pris 3) +(def-tex nst-egg-spider-pipe lbbspid-pris 4) +(def-tex hud-small-vehicle-health-bar-01 comba-minimap 1) +(def-tex hud-small-vehicle-health-bar-02 comba-minimap 2) +(def-tex bam-eyelight rubblea-vis-pris2 0) +(def-tex environment-oldmetal rubblea-vis-pris2 1) +(def-tex king-arm rubblea-vis-pris2 2) +(def-tex king-blackskirt2 rubblea-vis-pris2 3) +(def-tex king-bluemetal rubblea-vis-pris2 4) +(def-tex king-bolt rubblea-vis-pris2 5) +(def-tex king-chest rubblea-vis-pris2 6) +(def-tex king-clip-02 rubblea-vis-pris2 7) +(def-tex king-ear rubblea-vis-pris2 8) +(def-tex king-earing rubblea-vis-pris2 9) +(def-tex king-face-01 rubblea-vis-pris2 10) +(def-tex king-finger rubblea-vis-pris2 11) +(def-tex king-greenmetal rubblea-vis-pris2 12) +(def-tex king-greenmetalplain rubblea-vis-pris2 13) +(def-tex king-hair rubblea-vis-pris2 14) +(def-tex king-hand rubblea-vis-pris2 15) +(def-tex king-horn rubblea-vis-pris2 16) +(def-tex king-iris rubblea-vis-pris2 17) +(def-tex king-leg rubblea-vis-pris2 18) +(def-tex king-lgblackstrap rubblea-vis-pris2 19) +(def-tex king-precursermetal-decor rubblea-vis-pris2 20) +(def-tex king-precursermetal-plain rubblea-vis-pris2 21) +(def-tex king-precursermetal-trim rubblea-vis-pris2 22) +(def-tex king-precursermetal-trim2 rubblea-vis-pris2 23) +(def-tex king-precursermetal-trimbolt rubblea-vis-pris2 24) +(def-tex king-shoebottom rubblea-vis-pris2 25) +(def-tex king-skirt rubblea-vis-pris2 26) +(def-tex king-skirt-b rubblea-vis-pris2 27) +(def-tex king-teeth rubblea-vis-pris2 28) +(def-tex king-thinstrap rubblea-vis-pris2 29) +(def-tex king-vest rubblea-vis-pris2 30) +(def-tex king-vestback rubblea-vis-pris2 31) +(def-tex king-wrap rubblea-vis-pris2 32) +(def-tex king-wraps rubblea-vis-pris2 33) +(def-tex king-wristband rubblea-vis-pris2 34) +(def-tex hud-darkmaker-mech-shield-01 precura-minimap 2) +(def-tex hud-progress-meter-arrow-02 precura-minimap 3) +(def-tex bam-eyelight loutro-pris 0) +(def-tex daxter-furhilite loutro-pris 1) +(def-tex daxter-orange loutro-pris 2) +(def-tex daxterarm loutro-pris 3) +(def-tex daxterbodyshort-eix loutro-pris 4) +(def-tex daxterear loutro-pris 5) +(def-tex daxterfinger loutro-pris 6) +(def-tex daxterfoot loutro-pris 7) +(def-tex daxterfoot-bottom loutro-pris 8) +(def-tex daxterheadwidenew loutro-pris 9) +(def-tex daxterhelmetplain loutro-pris 10) +(def-tex daxternose loutro-pris 11) +(def-tex daxterteeth loutro-pris 12) +(def-tex prec-leader-foreheadshield loutro-pris 13) +(def-tex prec-leader-headshield loutro-pris 14) +(def-tex bam-hairhilite loutro-pris 15) +(def-tex prec-hand-back loutro-pris 16) +(def-tex prec-handpalm loutro-pris 17) +(def-tex prec-leader-armband loutro-pris 18) +(def-tex prec-neck loutro-pris 19) +(def-tex prec-surfer-chain loutro-pris 20) +(def-tex prec-surfer-chain-02 loutro-pris 21) +(def-tex prec-surfer-chain-03 loutro-pris 22) +(def-tex prec-surfer-hair loutro-pris 23) +(def-tex prec-surfer-hairshort loutro-pris 24) +(def-tex prec-surfer-pants loutro-pris 25) +(def-tex prec-surfer-sash loutro-pris 26) +(def-tex prec-surfer-shirt loutro-pris 27) +(def-tex prec-surfer-sleeve loutro-pris 28) +(def-tex daxter-eyelid loutro-pris 59) +(def-tex daxterbolt loutro-pris 60) +(def-tex daxtergoggles loutro-pris 61) +(def-tex daxterlense loutro-pris 62) +(def-tex daxtertuft loutro-pris 63) +(def-tex prec-leader-arm loutro-pris 64) +(def-tex prec-leader-beard loutro-pris 65) +(def-tex prec-leader-belt loutro-pris 66) +(def-tex prec-leader-face2 loutro-pris 67) +(def-tex prec-leader-frontskirt loutro-pris 68) +(def-tex prec-leader-hair loutro-pris 69) +(def-tex prec-leader-pants loutro-pris 70) +(def-tex prec-leader-robe-02 loutro-pris 71) +(def-tex prec-leader-shirt loutro-pris 72) +(def-tex prec-leader-wrap loutro-pris 73) +(def-tex prec-orblarge loutro-pris 74) +(def-tex prec-orbsmall loutro-pris 75) +(def-tex prec-staff-01 loutro-pris 76) +(def-tex prec-staff-02 loutro-pris 77) +(def-tex prec-teeth loutro-pris 78) +(def-tex prec-insidemouth loutro-pris 96) +(def-tex prec-leader-robe-01 loutro-pris 110) +(def-tex holograph-env-rim-dest templea-warp 0) +(def-tex holograph-env-noise templea-warp 1) +(def-tex holograph-env-rim templea-warp 2) +(def-tex holograph-env-scan templea-warp 3) +(def-tex token-purple templec-sprite 1) +(def-tex tpl-symbol-tail templec-sprite 2) +(def-tex token-white templec-sprite 3) +(def-tex common-black towera-pris 0) +(def-tex dp-bipedal-backhand-01 towera-pris 1) +(def-tex dp-bipedal-chest-01 towera-pris 2) +(def-tex dp-bipedal-dk-hose-01 towera-pris 3) +(def-tex dp-bipedal-dk-plate-01 towera-pris 4) +(def-tex dp-bipedal-dk-plate-02 towera-pris 5) +(def-tex dp-bipedal-dk-plate-03 towera-pris 6) +(def-tex dp-bipedal-dk-plate-04 towera-pris 7) +(def-tex dp-bipedal-dk-sm-plate-01 towera-pris 8) +(def-tex dp-bipedal-dk-stomach-plate-01 towera-pris 9) +(def-tex dp-bipedal-eye-01 towera-pris 10) +(def-tex dp-bipedal-finger-plate-01 towera-pris 11) +(def-tex dp-bipedal-nose-01 towera-pris 12) +(def-tex dp-bipedal-power-hose towera-pris 13) +(def-tex dp-bipedal-skin-bulge-01 towera-pris 14) +(def-tex dp-bipedal-skin-bulge-02 towera-pris 15) +(def-tex dp-bipedal-skin-plate-01 towera-pris 16) +(def-tex dp-bipedal-skin-plate-small-01 towera-pris 17) +(def-tex dp-bipedal-skin-ribs-01 towera-pris 18) +(def-tex dp-bipedal-spine-01 towera-pris 19) +(def-tex dp-bipedal-toe-01 towera-pris 20) +(def-tex environment-darkprec towera-pris 21) +(def-tex ecocreature-claws towera-pris 22) +(def-tex ecocreature-eye towera-pris 23) +(def-tex ecocreature-flesh towera-pris 24) +(def-tex ecocreature-insidemouth towera-pris 25) +(def-tex ecocreature-joint towera-pris 26) +(def-tex ecocreature-palm towera-pris 27) +(def-tex neo-wasp-base towera-pris 35) +(def-tex neo-wasp-body towera-pris 36) +(def-tex neo-wasp-brown towera-pris 37) +(def-tex neo-wasp-dark-brown towera-pris 38) +(def-tex neo-wasp-eye towera-pris 39) +(def-tex ecocreature-teeth towera-water 1) +(def-tex temple_flag02 templec-vis-pris 1) +(def-tex comb-temp-dark railb2-tfrag 1) +(def-tex comb-temp-glass railb2-tfrag 2) +(def-tex rail-patch-01 railb2-tfrag 3) +(def-tex rail-light-blue railb2-tfrag 4) +(def-tex rail-edge-01 railb2-tfrag 5) +(def-tex rail-base-mid-01 railb2-tfrag 6) +(def-tex rail-base-dark-01 railb2-tfrag 7) +(def-tex rail-gray-metal-01 railb2-tfrag 8) +(def-tex rail-light-blue-small railb2-tfrag 9) +(def-tex rail-detail-01 railb2-tfrag 10) +(def-tex rail-cord-01 railb2-tfrag 11) +(def-tex rail-pipe-01 railb2-tfrag 12) +(def-tex rail-pipe-03 railb2-tfrag 13) +(def-tex rail-env-car-01 railb2-tfrag 14) +(def-tex rail-light-yellow railb2-tfrag 15) +(def-tex rail-light-yellow-small railb2-tfrag 16) +(def-tex rail-pipe-02 railb2-tfrag 17) +(def-tex comb-redmarker railb2-tfrag 18) +(def-tex rail-pipe-05 railb2-tfrag 19) +(def-tex comb-yell-light railb2-tfrag 20) +(def-tex rail-trim-01 railb2-tfrag 21) +(def-tex rail-light-red railb2-tfrag 22) +(def-tex rail-rock-01 railb2-tfrag 23) +(def-tex rail-env-wall-01 railb2-tfrag 25) +(def-tex cmn-precursor-blue-glow railcst-tfrag 29) +(def-tex cmn-precursor-plainstripe railcst-tfrag 30) +(def-tex cmn-precursor-stonehenge-side railcst-tfrag 31) +(def-tex cmn-precursor-stonehengetop railcst-tfrag 32) +(def-tex cmn-precursor-plat-lod03 railcst-tfrag 33) +(def-tex pre-mic-groove railcst-tfrag 34) +(def-tex pre-mic-dark railcst-tfrag 35) +(def-tex pre-mic-plain railcst-tfrag 36) +(def-tex pre-mic-speaker railcst-tfrag 37) +(def-tex precur-window-glass precurd-vis-water 0) +(def-tex errolcyber-lens precurd-vis-water 1) +(def-tex terraformer-cpitwindows-01 precurd-vis-water 3) +(def-tex terraformer-cpitwindows-02 precurd-vis-water 4) +(def-tex environment-lightjak precurd-vis-water 5) +(def-tex lightjak-wings precurd-vis-water 6) +(def-tex hud-des-beast deshover-minimap 0) +(def-tex hud-errol-01 factoryd-minimap 0) +(def-tex hud-errol-02 factoryd-minimap 1) +(def-tex hud-mhcentipede-meter-01 factoryd-minimap 3) +(def-tex hud-small-frame-01 factoryd-minimap 4) +(def-tex hud-small-frame-02 factoryd-minimap 5) +(def-tex bam-eyelight loutro2-pris2 0) +(def-tex charHOLD loutro2-pris2 2) +(def-tex environment-oldmetal loutro2-pris2 29) +(def-tex sig-belt loutro2-pris2 30) +(def-tex sig-eye loutro2-pris2 31) +(def-tex sig-eyelid loutro2-pris2 32) +(def-tex sig-faceleft loutro2-pris2 33) +(def-tex sig-facert loutro2-pris2 34) +(def-tex sig-flask loutro2-pris2 35) +(def-tex sig-gem-01 loutro2-pris2 36) +(def-tex sig-glove loutro2-pris2 37) +(def-tex sig-glovetop loutro2-pris2 38) +(def-tex sig-gun-01 loutro2-pris2 39) +(def-tex sig-gun-02 loutro2-pris2 40) +(def-tex sig-gun-03 loutro2-pris2 41) +(def-tex sig-gun-04 loutro2-pris2 42) +(def-tex sig-gun-05 loutro2-pris2 43) +(def-tex sig-headgear loutro2-pris2 44) +(def-tex sig-horn loutro2-pris2 45) +(def-tex sig-lens loutro2-pris2 46) +(def-tex sig-metal-01 loutro2-pris2 47) +(def-tex sig-metal-dirty loutro2-pris2 48) +(def-tex sig-sac loutro2-pris2 49) +(def-tex sig-shoebottom loutro2-pris2 50) +(def-tex sig-shoetop loutro2-pris2 51) +(def-tex sig-shoulderarmor loutro2-pris2 52) +(def-tex sig-skirts loutro2-pris2 53) +(def-tex sig-skirts-02 loutro2-pris2 54) +(def-tex sig-skirts-03 loutro2-pris2 55) +(def-tex sig-undergarments loutro2-pris2 56) +(def-tex vin-teeth-01 loutro2-pris2 57) +(def-tex bam-eyelight desbcst-pris 0) +(def-tex bam-hairhilite desbcst-pris 1) +(def-tex daxter-eyelid desbcst-pris 2) +(def-tex daxter-furhilite desbcst-pris 3) +(def-tex daxter-orange desbcst-pris 4) +(def-tex daxterarm desbcst-pris 5) +(def-tex daxterbodyshort-eix desbcst-pris 6) +(def-tex daxterbolt desbcst-pris 7) +(def-tex daxterear desbcst-pris 8) +(def-tex daxterfinger desbcst-pris 9) +(def-tex daxterfoot desbcst-pris 10) +(def-tex daxterfoot-bottom desbcst-pris 11) +(def-tex daxtergoggles desbcst-pris 12) +(def-tex daxterheadwidenew desbcst-pris 13) +(def-tex daxterhelmetplain desbcst-pris 14) +(def-tex daxterlense desbcst-pris 15) +(def-tex daxternose desbcst-pris 16) +(def-tex daxterteeth desbcst-pris 17) +(def-tex daxtertuft desbcst-pris 18) +(def-tex environment-oldmetal desbcst-pris 19) +(def-tex jakc-armor desbcst-pris 20) +(def-tex jakc-chestplate-straps desbcst-pris 21) +(def-tex jakc-gogglemetal desbcst-pris 22) +(def-tex jakc-lens desbcst-pris 23) +(def-tex jakc-scarf desbcst-pris 24) +(def-tex jakc-scarfhanging desbcst-pris 25) +(def-tex jakc-skirt desbcst-pris 26) +(def-tex jakc-waistband2 desbcst-pris 27) +(def-tex jakc-wraps desbcst-pris 28) +(def-tex jakc-wristband-a2 desbcst-pris 29) +(def-tex jakchires-arm desbcst-pris 30) +(def-tex jakchires-blackstrap desbcst-pris 31) +(def-tex jakchires-brownstrap desbcst-pris 32) +(def-tex jakchires-brwnleather desbcst-pris 33) +(def-tex jakchires-chestplate desbcst-pris 34) +(def-tex jakchires-clips desbcst-pris 35) +(def-tex jakchires-eye desbcst-pris 36) +(def-tex jakchires-eyebrow desbcst-pris 37) +(def-tex jakchires-eyelid desbcst-pris 38) +(def-tex jakchires-facelft desbcst-pris 39) +(def-tex jakchires-facert desbcst-pris 40) +(def-tex jakchires-glovetop desbcst-pris 41) +(def-tex jakchires-hair desbcst-pris 42) +(def-tex jakchires-horn desbcst-pris 43) +(def-tex jakchires-jacket desbcst-pris 44) +(def-tex jakchires-leatherpouch desbcst-pris 45) +(def-tex jakchires-lightbrownspat desbcst-pris 46) +(def-tex jakchires-pants desbcst-pris 47) +(def-tex jakchires-precarmor-01 desbcst-pris 48) +(def-tex jakchires-shoebottom desbcst-pris 49) +(def-tex jakchires-shoemetal desbcst-pris 50) +(def-tex jakchires-shoeteop desbcst-pris 51) +(def-tex jakchires-teeth desbcst-pris 52) +(def-tex vehicle-snake-tread-01 desbcst-pris 53) +(def-tex vehicle-snake-tread-02 desbcst-pris 54) +(def-tex vehicle-wheel-01 desbcst-pris 55) +(def-tex deswalk-break-01 desbcst-pris 56) +(def-tex deswalk-break-03 desbcst-pris 57) +(def-tex errocyber-eye desbcst-pris 58) +(def-tex errocyber-eyelid desbcst-pris 59) +(def-tex errocyber-faceflesh desbcst-pris 60) +(def-tex errolcyber-bighand-01 desbcst-pris 61) +(def-tex errolcyber-bigshoulder desbcst-pris 62) +(def-tex errolcyber-bluedome desbcst-pris 63) +(def-tex errolcyber-bluemetal-01 desbcst-pris 64) +(def-tex errolcyber-bluewrap desbcst-pris 65) +(def-tex errolcyber-chestplate desbcst-pris 66) +(def-tex errolcyber-dirtymetal desbcst-pris 67) +(def-tex errolcyber-earcup desbcst-pris 68) +(def-tex errolcyber-fingers desbcst-pris 69) +(def-tex errolcyber-glovepalm desbcst-pris 70) +(def-tex errolcyber-greyknobs desbcst-pris 71) +(def-tex errolcyber-greymetal desbcst-pris 72) +(def-tex errolcyber-greymetal-02 desbcst-pris 73) +(def-tex errolcyber-hair desbcst-pris 74) +(def-tex errolcyber-head-01 desbcst-pris 75) +(def-tex errolcyber-head-02 desbcst-pris 76) +(def-tex errolcyber-insidemouth desbcst-pris 77) +(def-tex errolcyber-insidewires desbcst-pris 78) +(def-tex errolcyber-jointpipe desbcst-pris 79) +(def-tex errolcyber-metaleyelid desbcst-pris 80) +(def-tex errolcyber-metalgold desbcst-pris 81) +(def-tex errolcyber-pipes-01 desbcst-pris 82) +(def-tex errolcyber-pipes-02 desbcst-pris 83) +(def-tex errolcyber-pipes-03 desbcst-pris 84) +(def-tex errolcyber-redmetal-01 desbcst-pris 85) +(def-tex errolcyber-redmetal-02 desbcst-pris 86) +(def-tex errolcyber-redmetal-03 desbcst-pris 87) +(def-tex errolcyber-roboeye desbcst-pris 88) +(def-tex errolcyber-rubberpipe desbcst-pris 89) +(def-tex errolcyber-rubberpipe-light desbcst-pris 90) +(def-tex errolcyber-spine desbcst-pris 91) +(def-tex errolcyber-teeth desbcst-pris 92) +(def-tex desw-hardplate-01 desbcst-pris 93) +(def-tex desw-hardplate-edge-01 desbcst-pris 94) +(def-tex desw-tubes-segment-02 desbcst-pris 95) +(def-tex desw-tubes-small-01 desbcst-pris 96) +(def-tex dm-urchin-cables-01 desbcst-pris 97) +(def-tex dm-urchin-finger-01 desbcst-pris 98) +(def-tex dm-urchin-plate-01 desbcst-pris 99) +(def-tex environment-darkprec desbcst-pris 100) +(def-tex ashelin-beltbuckle desbcst-pris2 0) +(def-tex ashelin-bolts desbcst-pris2 1) +(def-tex ashelin-boottop desbcst-pris2 2) +(def-tex ashelin-brownstrap desbcst-pris2 3) +(def-tex ashelin-cglogo desbcst-pris2 4) +(def-tex ashelin-cgrank desbcst-pris2 5) +(def-tex ashelin-chest desbcst-pris2 6) +(def-tex ashelin-eye desbcst-pris2 7) +(def-tex ashelin-eyebrow desbcst-pris2 8) +(def-tex ashelin-eyelid desbcst-pris2 9) +(def-tex ashelin-face desbcst-pris2 10) +(def-tex ashelin-glove desbcst-pris2 11) +(def-tex ashelin-gunbarrel-01 desbcst-pris2 12) +(def-tex ashelin-gunbarrel-02 desbcst-pris2 13) +(def-tex ashelin-gunbarrel-03 desbcst-pris2 14) +(def-tex ashelin-gunholster desbcst-pris2 15) +(def-tex ashelin-hair desbcst-pris2 16) +(def-tex ashelin-handle-01 desbcst-pris2 17) +(def-tex ashelin-jacketbody desbcst-pris2 18) +(def-tex ashelin-jacketsleeve desbcst-pris2 19) +(def-tex ashelin-jacketstraps desbcst-pris2 20) +(def-tex ashelin-pantstop desbcst-pris2 21) +(def-tex ashelin-redtop desbcst-pris2 22) +(def-tex ashelin-shells desbcst-pris2 23) +(def-tex ashelin-shield desbcst-pris2 24) +(def-tex ashelin-shoebottom desbcst-pris2 25) +(def-tex ashelin-shoemetal desbcst-pris2 26) +(def-tex ashelin-teeth desbcst-pris2 27) +(def-tex ashelin-whitestrap desbcst-pris2 28) +(def-tex bam-eyelight desbcst-pris2 29) +(def-tex bam-hairhilite desbcst-pris2 30) +(def-tex charHOLD desbcst-pris2 31) +(def-tex environment-oldmetal desbcst-pris2 32) +(def-tex sig-belt desbcst-pris2 33) +(def-tex sig-eye desbcst-pris2 34) +(def-tex sig-eyelid desbcst-pris2 35) +(def-tex sig-faceleft desbcst-pris2 36) +(def-tex sig-facert desbcst-pris2 37) +(def-tex sig-flask desbcst-pris2 38) +(def-tex sig-gem-01 desbcst-pris2 39) +(def-tex sig-glove desbcst-pris2 40) +(def-tex sig-glovetop desbcst-pris2 41) +(def-tex sig-gun-01 desbcst-pris2 42) +(def-tex sig-gun-02 desbcst-pris2 43) +(def-tex sig-gun-03 desbcst-pris2 44) +(def-tex sig-gun-04 desbcst-pris2 45) +(def-tex sig-gun-05 desbcst-pris2 46) +(def-tex sig-headgear desbcst-pris2 47) +(def-tex sig-horn desbcst-pris2 48) +(def-tex sig-lens desbcst-pris2 49) +(def-tex sig-metal-01 desbcst-pris2 50) +(def-tex sig-metal-dirty desbcst-pris2 51) +(def-tex sig-sac desbcst-pris2 52) +(def-tex sig-shoebottom desbcst-pris2 53) +(def-tex sig-shoetop desbcst-pris2 54) +(def-tex sig-shoulderarmor desbcst-pris2 55) +(def-tex sig-skirts desbcst-pris2 56) +(def-tex sig-skirts-02 desbcst-pris2 57) +(def-tex sig-skirts-03 desbcst-pris2 58) +(def-tex sig-undergarments desbcst-pris2 59) +(def-tex vin-teeth-01 desbcst-pris2 60) +(def-tex sig-flatfangs desbcst-water 0) +(def-tex errolcyber-lens desbcst-water 1) +(def-tex hud-wasdoors desjump-minimap 2) +(def-tex hud-catapult-01 desjump-minimap 3) +(def-tex hud-wasdoors-health desjump-minimap 4) +(def-tex hud-wasdoors-ring desjump-minimap 6) +(def-tex racegate lbbring1-sprite 0) +(def-tex intcept-base-green01 desjump-pris 0) +(def-tex intcept-base-patern01 desjump-pris 1) +(def-tex intcept-base-patern02 desjump-pris 2) +(def-tex intcept-gun01 desjump-pris 3) +(def-tex intcept-pipe01 desjump-pris 4) +(def-tex intcept-teeth01 desjump-pris 5) +(def-tex intcept-tread01 desjump-pris 6) +(def-tex vehicle-body-panel-01 desjump-pris 7) +(def-tex vehicle-brace-pipe-01 desjump-pris 8) +(def-tex vehicle-cap-pin-01 desjump-pris 9) +(def-tex vehicle-chrome-pipe-01 desjump-pris 10) +(def-tex vehicle-gas-tank-01 desjump-pris 11) +(def-tex vehicle-gun-box-01 desjump-pris 12) +(def-tex vehicle-metal-plate-01 desjump-pris 13) +(def-tex vehicle-toad-exhaust-01 desjump-pris 14) +(def-tex vehicle-tread-blur-02 desjump-pris 15) +(def-tex vehicle-wheel-01 desjump-pris 16) +(def-tex vehicle-wheel-blur-01 desjump-pris 17) +(def-tex catapult-body-under desjump-pris 18) +(def-tex catapult-bone-spike desjump-pris 19) +(def-tex catapult-bowl desjump-pris 20) +(def-tex catapult-brace-pipe-01 desjump-pris 21) +(def-tex catapult-brass-pipe01 desjump-pris 22) +(def-tex catapult-cap-pin-01 desjump-pris 23) +(def-tex catapult-gun-box-01 desjump-pris 24) +(def-tex catapult-metal-part-01 desjump-pris 25) +(def-tex catapult-metal-plate-01 desjump-pris 26) +(def-tex catapult-panel-face desjump-pris 27) +(def-tex catapult-panel-pattern-01 desjump-pris 28) +(def-tex catapult-panel-small desjump-pris 29) +(def-tex catapult-wood-arm-01 desjump-pris 30) +(def-tex catapult-wood-rope desjump-pris 31) +(def-tex catapult-wood-tip desjump-pris 32) +(def-tex beamgen-lens desjump-pris 33) +(def-tex beamgen-metal-dec-trim-01 desjump-pris 34) +(def-tex beamgen-metal-edge-01 desjump-pris 35) +(def-tex beamgen-metal-edge-02 desjump-pris 36) +(def-tex rhino-horn-01 desjump-pris 37) +(def-tex rhino-metal-01 desjump-pris 38) +(def-tex vehicle-exhaust-pipe-01 desjump-pris 39) +(def-tex vehicle-wire-01 desjump-pris 40) +(def-tex intcept-lorez-spike01 desjump-water 0) +(def-tex lava-drop-01 mined-sprite 0) +(def-tex lava-drop-02 mined-sprite 1) +(def-tex lava-drop-03 mined-sprite 2) +(def-tex lava-drop-04 mined-sprite 3) +(def-tex preship-glass-01 loutro-shrub 1) +(def-tex preship-metal-window-01 loutro-shrub 2) +(def-tex preship-blue-window-blue-02 loutro-shrub 3) +(def-tex preship-blue-window-glue loutro-shrub 4) +(def-tex preship-blue-thruster loutro-shrub 5) +(def-tex preship-window-strip-01 loutro-shrub 6) +(def-tex preship-metal-hull-03 loutro-shrub 7) +(def-tex preship-metal-hull-01 loutro-shrub 8) +(def-tex preship-metal-edge-03 loutro-shrub 9) +(def-tex preship-metal-trim-03 loutro-shrub 10) +(def-tex preship-metal-ring-top loutro-shrub 11) +(def-tex preship-metal-edge-01 loutro-shrub 12) +(def-tex preship-metal-edge-02 loutro-shrub 13) +(def-tex preship-metal-trim-01 loutro-shrub 14) +(def-tex preship-metal-trim-02 loutro-shrub 15) +(def-tex preship-metal-hull-02 loutro-shrub 16) +(def-tex rub-beam-gen stadiuma-vis-tfrag 0) +(def-tex rub-copper-metal-02 stadiuma-vis-tfrag 1) +(def-tex citywide-sail-01 stadiuma-vis-tfrag 2) +(def-tex citywide-stadium-lightpost-base-02 stadiuma-vis-tfrag 3) +(def-tex citywide-stadium-lightpost stadiuma-vis-tfrag 4) +(def-tex citywide-stadium-lightpost-base stadiuma-vis-tfrag 5) +(def-tex citywide-stadium-lightpost-end-02 stadiuma-vis-tfrag 6) +(def-tex citywide-stadium-lightpost-end stadiuma-vis-tfrag 7) +(def-tex citywide-stadium-lightbank stadiuma-vis-tfrag 8) +(def-tex rub-stad-brick stadiuma-vis-tfrag 9) +(def-tex stdm-wall-04 stadiuma-vis-tfrag 10) +(def-tex stdm-wall-03 stadiuma-vis-tfrag 11) +(def-tex rub-marble-floor-01-hitweak stadiuma-vis-tfrag 12) +(def-tex stdm-trim-02 stadiuma-vis-tfrag 13) +(def-tex rub-blastdoors stadiuma-vis-tfrag 14) +(def-tex rub-wall-gen-01 stadiuma-vis-tfrag 15) +(def-tex stdm-cobble-floor-01 stadiuma-vis-tfrag 16) +(def-tex common-black stadiuma-vis-tfrag 17) +(def-tex rub-wall-trim stadiuma-vis-tfrag 18) +(def-tex rub-city-wall-frame stadiuma-vis-tfrag 19) +(def-tex rub-citywall stadiuma-vis-tfrag 20) +(def-tex rub-stone-05 stadiuma-vis-tfrag 21) +(def-tex rub-endblocks stadiuma-vis-tfrag 22) +(def-tex rub-metal-wallgrill stadiuma-vis-tfrag 23) +(def-tex rub-supportmetall stadiuma-vis-tfrag 24) +(def-tex rub-butress-metal-01 stadiuma-vis-tfrag 25) +(def-tex rub-butress-metal-02 stadiuma-vis-tfrag 26) +(def-tex rub-city-wall-bottom-frame stadiuma-vis-tfrag 27) +(def-tex rub-metal-green-02 stadiuma-vis-tfrag 28) +(def-tex citywide-wall-brown-strip stadiuma-vis-tfrag 29) +(def-tex t-citywide-met-strp01 stadiuma-vis-tfrag 31) +(def-tex cityslumc-purple-column stadiuma-vis-tfrag 32) +(def-tex ctyslumc-light-blue stadiuma-vis-tfrag 33) +(def-tex cityslumc-purple-plain stadiuma-vis-tfrag 34) +(def-tex cityslumc-awning-LOW stadiuma-vis-tfrag 35) +(def-tex city-tile-LOW stadiuma-vis-tfrag 36) +(def-tex ctyslumc-window-panes-LOW stadiuma-vis-tfrag 37) +(def-tex city-lowres-mhcity-wall-02 stadiuma-vis-tfrag 38) +(def-tex city-lowres-mhcity-wall-06 stadiuma-vis-tfrag 39) +(def-tex city-lowres-mhcity-wall-05 stadiuma-vis-tfrag 40) +(def-tex city-lowres-mhcity-wall-03 stadiuma-vis-tfrag 41) +(def-tex rub-roof-support stadiuma-vis-tfrag 42) +(def-tex rub-citywall-frame stadiuma-vis-tfrag 43) +(def-tex rub-metal-green-main stadiuma-vis-tfrag 44) +(def-tex city-metal-strip-01 stadiuma-vis-tfrag 45) +(def-tex city-bridgeseam stadiuma-vis-tfrag 46) +(def-tex rub-city-wall-main stadiuma-vis-tfrag 47) +(def-tex rub-city-wall-inside-damaged stadiuma-vis-tfrag 48) +(def-tex rub-wall-side-beam stadiuma-vis-tfrag 49) +(def-tex rub-palace-tower-side stadiuma-vis-tfrag 50) +(def-tex rub-rock stadiuma-vis-tfrag 51) +(def-tex rub-wall-gen-02 stadiuma-vis-tfrag 52) +(def-tex rub-panels-01 stadiuma-vis-tfrag 53) +(def-tex rub-beam-gen-hole stadiuma-vis-tfrag 54) +(def-tex rub-wall-side-beam-02 stadiuma-vis-tfrag 55) +(def-tex rub-palshaft-dirt-blue-01 stadiuma-vis-tfrag 56) +(def-tex rub-metal-flatpipe-01 stadiuma-vis-tfrag 57) +(def-tex rub-metal-pipeside-01 stadiuma-vis-tfrag 58) +(def-tex rub-wall-gen-06 stadiuma-vis-tfrag 59) +(def-tex rub-metal-01 stadiuma-vis-tfrag 60) +(def-tex rub-wall-gen-04 stadiuma-vis-tfrag 61) +(def-tex fora-cliff-face-far stadiuma-vis-tfrag 62) +(def-tex rub-pal-metal stadiuma-vis-tfrag 63) +(def-tex citywide-wall-grey stadiuma-vis-tfrag 64) +(def-tex citywide-wall-grill stadiuma-vis-tfrag 65) +(def-tex citywide-wall-mainmetal stadiuma-vis-tfrag 66) +(def-tex citywide-wall-greydrain stadiuma-vis-tfrag 67) +(def-tex rub-rubble-01 stadiuma-vis-tfrag 68) +(def-tex stdm-lg-stone-trim-01 stadiuma-vis-tfrag 69) +(def-tex rub-statue-stone-01 stadiuma-vis-tfrag 70) +(def-tex city-lowres-mhcity-tower-01 stadiuma-vis-tfrag 71) +(def-tex rub-cement-pillars stadiuma-vis-tfrag 72) +(def-tex city-lowres-mhcity-tower-02 stadiuma-vis-tfrag 73) +(def-tex rub-copper stadiuma-vis-tfrag 74) +(def-tex citywide-stdm-wire stadiuma-vis-shrub 0) +(def-tex citywide-sail-01 stadiuma-vis-pris 0) +(def-tex des-pole-01 desertf-vis-pris 0) +(def-tex des-pole-brace desertf-vis-pris 1) +(def-tex des-bridge-bar-01 desertf-vis-pris 2) +(def-tex des-corral-bar-01 desertf-vis-pris 3) +(def-tex des-corral-bar-03 desertf-vis-pris 4) +(def-tex des-plainrope desertf-vis-pris 5) +(def-tex des-wasmetal01 desertf-vis-pris 6) +(def-tex des-bridge-plank desertf-vis-pris 7) +(def-tex des-corral-plate-03 desertf-vis-pris 8) +(def-tex des-corral-metal-02 desertf-vis-pris 9) +(def-tex des-corral-plate-02 desertf-vis-pris 10) +(def-tex des-wasmetal07 desertf-vis-pris 11) +(def-tex backThing01 lctyblow-pris 0) +(def-tex dash01 lctyblow-pris 1) +(def-tex gauge01 lctyblow-pris 2) +(def-tex grillRim01 lctyblow-pris 3) +(def-tex gunBoxBack01 lctyblow-pris 4) +(def-tex gunBoxFront01 lctyblow-pris 5) +(def-tex gunbox01 lctyblow-pris 6) +(def-tex gunbox02 lctyblow-pris 7) +(def-tex hood01 lctyblow-pris 8) +(def-tex jetTop01 lctyblow-pris 9) +(def-tex jets01 lctyblow-pris 10) +(def-tex kcfrontend01 lctyblow-pris 11) +(def-tex kg-pickup-bed lctyblow-pris 12) +(def-tex kg-pickup-body lctyblow-pris 13) +(def-tex kg-pickup-engine-01 lctyblow-pris 14) +(def-tex kg-pickup-fender lctyblow-pris 15) +(def-tex kg-pickup-fender-edge lctyblow-pris 16) +(def-tex kg-pickup-handrail lctyblow-pris 17) +(def-tex kg-pickup-hood lctyblow-pris 18) +(def-tex kg-pickup-joint lctyblow-pris 19) +(def-tex kg-pickup-pipe lctyblow-pris 20) +(def-tex kg-pickup-sidelogo lctyblow-pris 21) +(def-tex kg-pickup-wings01 lctyblow-pris 22) +(def-tex kg-pickup-wings02 lctyblow-pris 23) +(def-tex light01 lctyblow-pris 24) +(def-tex lightCase01 lctyblow-pris 25) +(def-tex post01 lctyblow-pris 26) +(def-tex rail01 lctyblow-pris 27) +(def-tex seat01 lctyblow-pris 28) +(def-tex stripe03 lctyblow-pris 29) +(def-tex turret01 lctyblow-pris 30) +(def-tex wing01 lctyblow-pris 31) +(def-tex wing02 lctyblow-pris 32) +(def-tex wing02grey01 lctyblow-pris 33) +(def-tex windshield01 lctyblow-water 0) +(def-tex desw-wall-tube-01 deswalk-vis-tfrag 0) +(def-tex desw-hardplate-edge-01 deswalk-vis-tfrag 1) +(def-tex desw-hardplate-01 deswalk-vis-tfrag 2) +(def-tex desw-tubes-segment-02 deswalk-vis-tfrag 3) +(def-tex desw-plate-pattern-01 deswalk-vis-tfrag 4) +(def-tex desw-container-plate-01 deswalk-vis-tfrag 5) +(def-tex desw-plate-large-01 deswalk-vis-tfrag 6) +(def-tex desw-beam01 deswalk-vis-tfrag 7) +(def-tex desw-wall-pucker-01 deswalk-vis-tfrag 8) +(def-tex desw-tubes-segment-01 deswalk-vis-tfrag 9) +(def-tex desw-tubes-small-01 deswalk-vis-tfrag 10) +(def-tex desw-tentacle-01 deswalk-vis-tfrag 11) +(def-tex desw-hardplate-01-hitweak deswalk-vis-tfrag 14) +(def-tex desw-tubes-bundle-01-hitweak deswalk-vis-tfrag 15) +(def-tex desw-wall-light-01 deswalk-vis-tfrag 16) +(def-tex desw-wall-tube-01-hitweak deswalk-vis-tfrag 17) +(def-tex desw-skirt-02 deswalk-vis-tfrag 21) +(def-tex desw-skirt-01 deswalk-vis-tfrag 22) +(def-tex desw-light-trim-01 deswalk-vis-tfrag 23) +(def-tex desw-wall-glow-02 deswalk-vis-tfrag 24) +(def-tex environment-darkprec deswalk-vis-tfrag 25) +(def-tex lt-eco-vent-blue-01 deswalk-vis-tfrag 32) +(def-tex lt-eco-vent-side-01 deswalk-vis-tfrag 33) +(def-tex dk-eco-vent-glow-01 deswalk-vis-tfrag 34) +(def-tex dk-eco-vent-side-01 deswalk-vis-tfrag 35) +(def-tex desw-wall-light-02 deswalk-vis-tfrag 36) +(def-tex desw-wall-light-03 deswalk-vis-tfrag 37) +(def-tex environment-darkprec deswalk-vis-pris 5) +(def-tex dm-urchin-base-01 deswalk-vis-pris 6) +(def-tex dm-urchin-horn-01 deswalk-vis-pris 7) +(def-tex dm-urchin-skin-01 deswalk-vis-pris 9) +(def-tex dm-tentacle-armor-01 deswalk-vis-pris 10) +(def-tex dm-tentacle-armor-02 deswalk-vis-pris 11) +(def-tex dm-tentacle-armor-03 deswalk-vis-pris 12) +(def-tex dm-tentacle-armor-04 deswalk-vis-pris 13) +(def-tex dm-tentacle-armor-05 deswalk-vis-pris 14) +(def-tex dm-tentacle-skin-01 deswalk-vis-pris 15) +(def-tex dm-tentacle-skin-02 deswalk-vis-pris 16) +(def-tex dm-ecotank-cap-01 deswalk-vis-pris 17) +(def-tex dm-ecotank-light-rim-01 deswalk-vis-pris 18) +(def-tex dm-ecotank-trim-01 deswalk-vis-pris 19) +(def-tex dm-ecotank-trim-02 deswalk-vis-pris 20) +(def-tex dm-ecotank-trim-03 deswalk-vis-pris 21) +(def-tex terraformer-footpipes-01 deswalk-vis-pris 24) +(def-tex terraformer-metal-01 deswalk-vis-pris 25) +(def-tex terraformer-metal-02 deswalk-vis-pris 26) +(def-tex terraformer-metal-03 deswalk-vis-pris 27) +(def-tex terraformer-metal-04 deswalk-vis-pris 28) +(def-tex terraformer-metal-05 deswalk-vis-pris 29) +(def-tex terraformer-metal-08 deswalk-vis-pris 31) +(def-tex terraformer-metal-09 deswalk-vis-pris 32) +(def-tex terraformer-metal-10 deswalk-vis-pris 33) +(def-tex terraformer-minestrips-01 deswalk-vis-pris 35) +(def-tex terraformer-organic-01 deswalk-vis-pris 36) +(def-tex terraformer-organic-02 deswalk-vis-pris 37) +(def-tex ecocreature-claws deswalk-vis-pris 42) +(def-tex ecocreature-eye deswalk-vis-pris 43) +(def-tex ecocreature-flesh deswalk-vis-pris 44) +(def-tex ecocreature-insidemouth deswalk-vis-pris 45) +(def-tex ecocreature-joint deswalk-vis-pris 46) +(def-tex ecocreature-palm deswalk-vis-pris 47) +(def-tex terraformer-minecore deswalk-vis-pris 48) +(def-tex terraformer-transstrips-01 deswalk-vis-pris 49) +(def-tex dm-urchin-light-02-dest deswalk-vis-pris 50) +(def-tex racegate lbbring2-sprite 0) +(def-tex racegate lbbring3-sprite 0) +(def-tex stadiumb-hud-booster-off-01 lfaccar-minimap 1) +(def-tex stadiumb-hud-booster-on-01 lfaccar-minimap 2) +(def-tex hud-small-vehicle-health-bar-01 lfaccar-minimap 3) +(def-tex hud-turbo-boost-off-01 lfaccar-minimap 4) +(def-tex hud-turbo-boost-on-01 lfaccar-minimap 5) +(def-tex hud-turbo-boost-rim-01 lfaccar-minimap 6) +(def-tex bam-eyelight lvincst-pris 0) +(def-tex bam-hairhilite lvincst-pris 1) +(def-tex daxter-eyelid lvincst-pris 2) +(def-tex daxter-furhilite lvincst-pris 3) +(def-tex daxter-orange lvincst-pris 4) +(def-tex daxterarm lvincst-pris 5) +(def-tex daxterbodyshort-eix lvincst-pris 6) +(def-tex daxterbolt lvincst-pris 7) +(def-tex daxterear lvincst-pris 8) +(def-tex daxterfinger lvincst-pris 9) +(def-tex daxterfoot lvincst-pris 10) +(def-tex daxterfoot-bottom lvincst-pris 11) +(def-tex daxtergoggles lvincst-pris 12) +(def-tex daxterheadwidenew lvincst-pris 13) +(def-tex daxterhelmetplain lvincst-pris 14) +(def-tex daxterlense lvincst-pris 15) +(def-tex daxternose lvincst-pris 16) +(def-tex daxterteeth lvincst-pris 17) +(def-tex daxtertuft lvincst-pris 18) +(def-tex environment-oldmetal lvincst-pris 19) +(def-tex jakc-armor lvincst-pris 20) +(def-tex jakc-chestplate-straps lvincst-pris 21) +(def-tex jakc-gogglemetal lvincst-pris 22) +(def-tex jakc-lens lvincst-pris 23) +(def-tex jakc-scarf lvincst-pris 24) +(def-tex jakc-scarfhanging lvincst-pris 25) +(def-tex jakc-skirt lvincst-pris 26) +(def-tex jakc-waistband2 lvincst-pris 27) +(def-tex jakc-wraps lvincst-pris 28) +(def-tex jakc-wristband-a2 lvincst-pris 29) +(def-tex jakchires-arm lvincst-pris 30) +(def-tex jakchires-blackstrap lvincst-pris 31) +(def-tex jakchires-brownstrap lvincst-pris 32) +(def-tex jakchires-brwnleather lvincst-pris 33) +(def-tex jakchires-chestplate lvincst-pris 34) +(def-tex jakchires-clips lvincst-pris 35) +(def-tex jakchires-eye lvincst-pris 36) +(def-tex jakchires-eyebrow lvincst-pris 37) +(def-tex jakchires-eyelid lvincst-pris 38) +(def-tex jakchires-facelft lvincst-pris 39) +(def-tex jakchires-facert lvincst-pris 40) +(def-tex jakchires-glovetop lvincst-pris 41) +(def-tex jakchires-hair lvincst-pris 42) +(def-tex jakchires-horn lvincst-pris 43) +(def-tex jakchires-jacket lvincst-pris 44) +(def-tex jakchires-leatherpouch lvincst-pris 45) +(def-tex jakchires-lightbrownspat lvincst-pris 46) +(def-tex jakchires-pants lvincst-pris 47) +(def-tex jakchires-precarmor-01 lvincst-pris 48) +(def-tex jakchires-shoebottom lvincst-pris 49) +(def-tex jakchires-shoemetal lvincst-pris 50) +(def-tex jakchires-shoeteop lvincst-pris 51) +(def-tex jakchires-teeth lvincst-pris 52) +(def-tex cipher-drum-01 lvincst-pris 53) +(def-tex cipher-drum-02 lvincst-pris 54) +(def-tex cipher-drum-03 lvincst-pris 55) +(def-tex cipher-side-01 lvincst-pris 56) +(def-tex cipher-side-02 lvincst-pris 57) +(def-tex cipher-side-03 lvincst-pris 58) +(def-tex holograph-env-rim-dest lvincst-warp 0) +(def-tex holograph-env-noise lvincst-warp 1) +(def-tex holograph-env-rim lvincst-warp 2) +(def-tex holograph-env-scan lvincst-warp 3) +(def-tex des-shrub-pebbles desertf-vis-shrub 0) +(def-tex des-rock-shrub-01 desertf-vis-shrub 1) +(def-tex des-sand-grass-01 desertf-vis-shrub 2) +(def-tex facc-metal-panel-11 factoryd-vis-tfrag 0) +(def-tex facc-panel-05 factoryd-vis-tfrag 1) +(def-tex facc-panel-04 factoryd-vis-tfrag 2) +(def-tex common-black factoryd-vis-tfrag 3) +(def-tex facc-door-frame-02 factoryd-vis-tfrag 4) +(def-tex facc-door-frame-01 factoryd-vis-tfrag 5) +(def-tex facc-pipe-03 factoryd-vis-tfrag 6) +(def-tex facc-wall-01 factoryd-vis-tfrag 7) +(def-tex facc-pipe-01 factoryd-vis-tfrag 8) +(def-tex facc-pipe-02 factoryd-vis-tfrag 9) +(def-tex facc-panel-06 factoryd-vis-tfrag 10) +(def-tex facc-wall-rnd-light-01 factoryd-vis-tfrag 11) +(def-tex facc-panel-01 factoryd-vis-tfrag 12) +(def-tex facc-panel-02 factoryd-vis-tfrag 13) +(def-tex facc-panel-03 factoryd-vis-tfrag 14) +(def-tex facc-big-metal-panl04 factoryd-vis-tfrag 15) +(def-tex facc-bigredplates-01 factoryd-vis-tfrag 16) +(def-tex facc-metal-rim-03-hitweak factoryd-vis-tfrag 17) +(def-tex facc-arches-01 factoryd-vis-tfrag 18) +(def-tex facc-metal-panel-10-hitweak factoryd-vis-tfrag 19) +(def-tex facc-seam-metal-hitweak factoryd-vis-tfrag 20) +(def-tex facc-beam-02 factoryd-vis-tfrag 21) +(def-tex facc-light-02 factoryd-vis-tfrag 22) +(def-tex facc-light-01 factoryd-vis-tfrag 23) +(def-tex facc-redmetal-01 factoryd-vis-tfrag 24) +(def-tex facc-pipe-04 factoryd-vis-tfrag 25) +(def-tex facc-big-metal-panl02 factoryd-vis-tfrag 26) +(def-tex facc-metal-panel-09 factoryd-vis-tfrag 27) +(def-tex facc-redstriping-01 factoryd-vis-tfrag 28) +(def-tex facc-redstriping-01-hitweak factoryd-vis-tfrag 29) +(def-tex facc-wall-trim-01 factoryd-vis-tfrag 30) +(def-tex facc-beam-01 factoryd-vis-tfrag 31) +(def-tex facc-hole-grill-01 factoryd-vis-tfrag 32) +(def-tex facd-metal-blue-glue-01 factoryd-vis-tfrag 33) +(def-tex facc-metal-panel-10 factoryd-vis-tfrag 34) +(def-tex facd-wall-01 factoryd-vis-tfrag 35) +(def-tex facd-wall-girders-01 factoryd-vis-tfrag 36) +(def-tex facd-metal-wall-rim-01 factoryd-vis-tfrag 37) +(def-tex facc-seam-metal factoryd-vis-tfrag 38) +(def-tex facd-metal-wall-01 factoryd-vis-tfrag 39) +(def-tex facd-metal-nut-01 factoryd-vis-tfrag 40) +(def-tex facd-metal-nut-02 factoryd-vis-tfrag 41) +(def-tex facd-yellow-glow factoryd-vis-tfrag 42) +(def-tex facc-big-metal-panl04-hitweak factoryd-vis-tfrag 43) +(def-tex facc-metal-panel-07 factoryd-vis-tfrag 44) +(def-tex facc-big-metal-panl01 factoryd-vis-tfrag 45) +(def-tex facc-floor-trim factoryd-vis-tfrag 46) +(def-tex facd-blue-glow-panel-01 factoryd-vis-tfrag 51) +(def-tex facd-wires-01 factoryd-vis-tfrag 52) +(def-tex facd-tubing-01 factoryd-vis-tfrag 53) +(def-tex facd-tubes-segment-02 factoryd-vis-tfrag 54) +(def-tex facd-darkmaker-metal-01 factoryd-vis-tfrag 55) +(def-tex facd-darkmaker-web-01 factoryd-vis-tfrag 56) +(def-tex facd-darkmaker-tentacle-01 factoryd-vis-tfrag 57) +(def-tex facc-metal-ring-03 factoryd-vis-tfrag 58) +(def-tex facd-wall-girders-01-hitweak factoryd-vis-tfrag 59) +(def-tex facc-redmetal-01-hitweak factoryd-vis-tfrag 60) +(def-tex facc-metal-panel-07-lotweak factoryd-vis-tfrag 61) +(def-tex facc-redspot factoryd-vis-tfrag 63) +(def-tex facc-hole-grill-01 factoryd-vis-alpha 0) +(def-tex facd-spotlights factoryd-vis-alpha 1) +(def-tex fac-drop-plat-plate-01 factoryd-vis-alpha 2) +(def-tex facc-bolt-02 factoryd-vis-shrub 0) +(def-tex facc-bolt-01 factoryd-vis-shrub 1) +(def-tex fac-drop-plat-plate-side-01 factoryd-vis-shrub 3) +(def-tex fac-drop-plat-plate-trim-01 factoryd-vis-shrub 4) +(def-tex fac-drop-plat-plate-trim-02 factoryd-vis-shrub 5) +(def-tex facc-markings-02 factoryd-vis-shrub 6) +(def-tex facc-markings-03 factoryd-vis-shrub 7) +(def-tex facc-markings-01 factoryd-vis-shrub 8) +(def-tex facc-markings-04 factoryd-vis-shrub 9) +(def-tex facc-markings-06 factoryd-vis-shrub 10) +(def-tex facc-markings-05 factoryd-vis-shrub 11) +(def-tex bam-eyelight factoryd-vis-pris 0) +(def-tex bam-hairhilite factoryd-vis-pris 1) +(def-tex environment-oldmetal factoryd-vis-pris 2) +(def-tex errocyber-faceflesh factoryd-vis-pris 3) +(def-tex errolcyber-bighand-01 factoryd-vis-pris 4) +(def-tex errolcyber-bigshoulder factoryd-vis-pris 5) +(def-tex errolcyber-bluedome factoryd-vis-pris 6) +(def-tex errolcyber-bluemetal-01 factoryd-vis-pris 7) +(def-tex errolcyber-bluewrap factoryd-vis-pris 8) +(def-tex errolcyber-chestplate factoryd-vis-pris 9) +(def-tex errolcyber-dirtymetal factoryd-vis-pris 10) +(def-tex errolcyber-earcup factoryd-vis-pris 11) +(def-tex errolcyber-fingers factoryd-vis-pris 12) +(def-tex errolcyber-glovepalm factoryd-vis-pris 13) +(def-tex errolcyber-greyknobs factoryd-vis-pris 14) +(def-tex errolcyber-greymetal factoryd-vis-pris 15) +(def-tex errolcyber-greymetal-02 factoryd-vis-pris 16) +(def-tex errolcyber-hair factoryd-vis-pris 17) +(def-tex errolcyber-head-01 factoryd-vis-pris 18) +(def-tex errolcyber-head-02 factoryd-vis-pris 19) +(def-tex errolcyber-insidemouth factoryd-vis-pris 20) +(def-tex errolcyber-insidewires factoryd-vis-pris 21) +(def-tex errolcyber-jointpipe factoryd-vis-pris 22) +(def-tex errolcyber-metalgold factoryd-vis-pris 23) +(def-tex errolcyber-pipes-01 factoryd-vis-pris 24) +(def-tex errolcyber-pipes-02 factoryd-vis-pris 25) +(def-tex errolcyber-pipes-03 factoryd-vis-pris 26) +(def-tex errolcyber-redmetal-01 factoryd-vis-pris 27) +(def-tex errolcyber-redmetal-02 factoryd-vis-pris 28) +(def-tex errolcyber-redmetal-03 factoryd-vis-pris 29) +(def-tex errolcyber-rubberpipe factoryd-vis-pris 30) +(def-tex errolcyber-rubberpipe-light factoryd-vis-pris 31) +(def-tex errolcyber-spine factoryd-vis-pris 32) +(def-tex errolcyber-teeth factoryd-vis-pris 33) +(def-tex blue-gem factoryd-vis-pris 34) +(def-tex brown-hose factoryd-vis-pris 52) +(def-tex cguard1-backmetal factoryd-vis-pris 53) +(def-tex cguard1-chestplate factoryd-vis-pris 54) +(def-tex cguard1-gunmetaldark2 factoryd-vis-pris 55) +(def-tex cguard1-guntube factoryd-vis-pris 56) +(def-tex cguard1-lens factoryd-vis-pris 57) +(def-tex cguardgame-backplate factoryd-vis-pris 58) +(def-tex cguardgame-metaledark-02 factoryd-vis-pris 67) +(def-tex cguardgame-metallight-01small factoryd-vis-pris 69) +(def-tex cguardgame-shoebottom factoryd-vis-pris 71) +(def-tex kg-grunt-cable-01 factoryd-vis-pris 74) +(def-tex kg-grunt-rim-01 factoryd-vis-pris 75) +(def-tex kg-grunt-rim-02 factoryd-vis-pris 76) +(def-tex kg-grunt-rim-03 factoryd-vis-pris 77) +(def-tex roboguard-die-stamped-metal-blue factoryd-vis-pris 78) +(def-tex roboguard-die-stamped-metal-red factoryd-vis-pris 79) +(def-tex roboguard-headshield factoryd-vis-pris 80) +(def-tex roboguard-shouldershield factoryd-vis-pris 81) +(def-tex spydroid-gold factoryd-vis-pris 82) +(def-tex spydroid-leg-grey factoryd-vis-pris 83) +(def-tex spydroid-leg-grey-end factoryd-vis-pris 84) +(def-tex spydroid-light factoryd-vis-pris 85) +(def-tex spydroid-light-small factoryd-vis-pris 86) +(def-tex spydroid-light-small-red factoryd-vis-pris 87) +(def-tex spydroid-red factoryd-vis-pris 88) +(def-tex squid-bulb-sm factoryd-vis-pris 89) +(def-tex squid-tubes factoryd-vis-pris 92) +(def-tex widow-dull-inards factoryd-vis-pris 93) +(def-tex widow-pod-gun-metal factoryd-vis-pris 94) +(def-tex wire-metal factoryd-vis-pris 95) +(def-tex common-black factoryd-vis-pris 97) +(def-tex missle-bot-eye-01 factoryd-vis-pris 98) +(def-tex missle-bot-gear-01 factoryd-vis-pris 99) +(def-tex missle-bot-gear-02 factoryd-vis-pris 100) +(def-tex missle-bot-gear-03 factoryd-vis-pris 101) +(def-tex missle-bot-generator-01 factoryd-vis-pris 102) +(def-tex missle-bot-generator-02 factoryd-vis-pris 103) +(def-tex missle-bot-generator-03 factoryd-vis-pris 104) +(def-tex missle-bot-hull-01 factoryd-vis-pris 105) +(def-tex missle-bot-leg-01 factoryd-vis-pris 106) +(def-tex missle-bot-pipe-01 factoryd-vis-pris 107) +(def-tex missle-bot-pipe-02 factoryd-vis-pris 108) +(def-tex missle-bot-thruster-01 factoryd-vis-pris 109) +(def-tex missle-bot-thruster-02 factoryd-vis-pris 110) +(def-tex missle-bot-wire-01 factoryd-vis-pris 111) +(def-tex dp-bipedal-backhand-01 factoryd-vis-pris 112) +(def-tex dp-bipedal-chest-01 factoryd-vis-pris 113) +(def-tex dp-bipedal-dk-hose-01 factoryd-vis-pris 114) +(def-tex dp-bipedal-dk-plate-01 factoryd-vis-pris 115) +(def-tex dp-bipedal-dk-plate-02 factoryd-vis-pris 116) +(def-tex dp-bipedal-dk-plate-03 factoryd-vis-pris 117) +(def-tex dp-bipedal-dk-plate-04 factoryd-vis-pris 118) +(def-tex dp-bipedal-dk-sm-plate-01 factoryd-vis-pris 119) +(def-tex dp-bipedal-dk-stomach-plate-01 factoryd-vis-pris 120) +(def-tex dp-bipedal-eye-01 factoryd-vis-pris 121) +(def-tex dp-bipedal-finger-plate-01 factoryd-vis-pris 122) +(def-tex dp-bipedal-nose-01 factoryd-vis-pris 123) +(def-tex dp-bipedal-power-hose factoryd-vis-pris 124) +(def-tex dp-bipedal-skin-bulge-01 factoryd-vis-pris 125) +(def-tex dp-bipedal-skin-bulge-02 factoryd-vis-pris 126) +(def-tex dp-bipedal-skin-plate-01 factoryd-vis-pris 127) +(def-tex dp-bipedal-skin-plate-small-01 factoryd-vis-pris 128) +(def-tex dp-bipedal-skin-ribs-01 factoryd-vis-pris 129) +(def-tex dp-bipedal-spine-01 factoryd-vis-pris 130) +(def-tex dp-bipedal-toe-01 factoryd-vis-pris 131) +(def-tex environment-darkprec factoryd-vis-pris 132) +(def-tex neo-wasp-base factoryd-vis-pris 133) +(def-tex neo-wasp-body factoryd-vis-pris 134) +(def-tex neo-wasp-brown factoryd-vis-pris 135) +(def-tex neo-wasp-dark-brown factoryd-vis-pris 136) +(def-tex neo-wasp-eye factoryd-vis-pris 137) +(def-tex squid-drabgun factoryd-vis-pris 138) +(def-tex eco-lt-cryst-02 factoryd-vis-pris 139) +(def-tex eco-lt-cryst-03 factoryd-vis-pris 140) +(def-tex errocyber-eye factoryd-vis-pris 141) +(def-tex errocyber-eyelid factoryd-vis-pris 142) +(def-tex errolcyber-metaleyelid factoryd-vis-pris 143) +(def-tex errolcyber-roboeye factoryd-vis-pris 144) +(def-tex errolcyber-lens factoryd-vis-water 0) +(def-tex rail-env-wall-01 comba-shrub 0) +(def-tex rail-base-dark-01 comba-shrub 1) +(def-tex rail-rider-decal-01 comba-shrub 2) +(def-tex rail-pipe-03 comba-shrub 3) +(def-tex rail-dash-01 comba-shrub 4) +(def-tex rail-gray-metal-01 comba-shrub 5) +(def-tex rail-car-vent-01 comba-shrub 6) +(def-tex rail-chair-01 comba-shrub 7) +(def-tex rail-light-blue comba-shrub 8) +(def-tex vehicle-snake-chassis-01 comba-shrub 10) +(def-tex vehicle-exhaust-pipe-01 comba-shrub 11) +(def-tex vehicle-snake-tank-02 comba-shrub 12) +(def-tex vehicle-pipe-01 comba-shrub 13) +(def-tex vehicle-chrome-pipe-01 comba-shrub 14) +(def-tex vehicle-body-panel-01 comba-shrub 15) +(def-tex vehicle-safety-plate-01 comba-shrub 16) +(def-tex vehicle-metal-plate-02 comba-shrub 17) +(def-tex vehicle-brace-pipe-01 comba-shrub 18) +(def-tex vehicle-cap-pin-01 comba-shrub 19) +(def-tex vehicle-snake-gun-02 comba-shrub 20) +(def-tex common-black comba-shrub 21) +(def-tex vehicle-cushion-01 comba-shrub 22) +(def-tex vehicle-snake-gun-01 comba-shrub 23) +(def-tex vehicle-rims-01 comba-shrub 24) +(def-tex vehicle-snake-drum-02 comba-shrub 25) +(def-tex vehicle-snake-tank-01 comba-shrub 26) +(def-tex vehicle-snake-drum-01 comba-shrub 27) +(def-tex vehicle-snake-drum-03 comba-shrub 28) +(def-tex rail-light-green comba-shrub 29) +(def-tex intcept-base-green01 desrally-pris 0) +(def-tex intcept-base-patern01 desrally-pris 1) +(def-tex intcept-base-patern02 desrally-pris 2) +(def-tex intcept-gun01 desrally-pris 3) +(def-tex intcept-pipe01 desrally-pris 4) +(def-tex intcept-teeth01 desrally-pris 5) +(def-tex intcept-tread01 desrally-pris 6) +(def-tex vehicle-body-panel-01 desrally-pris 7) +(def-tex vehicle-brace-pipe-01 desrally-pris 8) +(def-tex vehicle-cap-pin-01 desrally-pris 9) +(def-tex vehicle-chrome-pipe-01 desrally-pris 10) +(def-tex vehicle-gas-tank-01 desrally-pris 11) +(def-tex vehicle-gun-box-01 desrally-pris 12) +(def-tex vehicle-metal-plate-01 desrally-pris 13) +(def-tex vehicle-toad-exhaust-01 desrally-pris 14) +(def-tex vehicle-tread-blur-02 desrally-pris 15) +(def-tex vehicle-wheel-01 desrally-pris 16) +(def-tex vehicle-wheel-blur-01 desrally-pris 17) +(def-tex des-corral-metal-01 desrally-pris 18) +(def-tex des-corral-plate-02 desrally-pris 19) +(def-tex des-pole-01 desrally-pris 20) +(def-tex des-pole-brace desrally-pris 21) +(def-tex des-rope-01 desrally-pris 22) +(def-tex wstlander-01-eye desrally-pris 23) +(def-tex wstlander-01-gunmetal-01 desrally-pris 24) +(def-tex wstlander-01-gunmetal-02 desrally-pris 25) +(def-tex wstlander-01-gunmetal-03 desrally-pris 26) +(def-tex wstlander-01-gunmetal-04 desrally-pris 27) +(def-tex wstlander-01-head desrally-pris 28) +(def-tex wstlander-01-leatherstrap desrally-pris 29) +(def-tex wstlander-01-mustache desrally-pris 30) +(def-tex wstlander-01-pants desrally-pris 31) +(def-tex wstlander-01-shoebottom desrally-pris 32) +(def-tex wstlander-01-shoetop desrally-pris 33) +(def-tex wstlander-01-shoulderarmor desrally-pris 34) +(def-tex wstlander-01-skirt desrally-pris 35) +(def-tex wstlander-01-wrap desrally-pris 36) +(def-tex wstlander-02-arm desrally-pris 37) +(def-tex wstlander-02-armor desrally-pris 38) +(def-tex wstlander-02-belt desrally-pris 39) +(def-tex wstlander-02-bootheel desrally-pris 40) +(def-tex wstlander-02-eye desrally-pris 41) +(def-tex wstlander-02-glove desrally-pris 42) +(def-tex wstlander-02-head desrally-pris 43) +(def-tex wstlander-02-ponytail desrally-pris 44) +(def-tex wstlander-02-scarf desrally-pris 45) +(def-tex wstlander-02-shirt desrally-pris 46) +(def-tex wstlander-02-skirt desrally-pris 47) +(def-tex wstlander-03-eye desrally-pris 48) +(def-tex wstlander-03-flesh desrally-pris 49) +(def-tex wstlander-04-dark-blue desrally-pris 50) +(def-tex wstlander-04-gun desrally-pris 51) +(def-tex wstlander-04-headband desrally-pris 52) +(def-tex wstlander-04-shirt desrally-pris 53) +(def-tex wstlander-04-shirt-strap desrally-pris 54) +(def-tex wstlander-04-skirt desrally-pris 55) +(def-tex intcept-b-base-green01 desrally-pris 56) +(def-tex intcept-b-base-patern01 desrally-pris 57) +(def-tex intcept-b-base-patern02 desrally-pris 58) +(def-tex intcept-b-gun01 desrally-pris 59) +(def-tex intcept-b-pipe01 desrally-pris 60) +(def-tex intcept-b-teeth01 desrally-pris 61) +(def-tex intcept-lorez-spike01 desrally-water 0) +(def-tex wstlander-01-glovetop desrally-water 1) +(def-tex common-black lbiped-pris 0) +(def-tex dp-bipedal-backhand-01 lbiped-pris 1) +(def-tex dp-bipedal-chest-01 lbiped-pris 2) +(def-tex dp-bipedal-dk-hose-01 lbiped-pris 3) +(def-tex dp-bipedal-dk-plate-01 lbiped-pris 4) +(def-tex dp-bipedal-dk-plate-02 lbiped-pris 5) +(def-tex dp-bipedal-dk-plate-03 lbiped-pris 6) +(def-tex dp-bipedal-dk-plate-04 lbiped-pris 7) +(def-tex dp-bipedal-dk-sm-plate-01 lbiped-pris 8) +(def-tex dp-bipedal-dk-stomach-plate-01 lbiped-pris 9) +(def-tex dp-bipedal-eye-01 lbiped-pris 10) +(def-tex dp-bipedal-finger-plate-01 lbiped-pris 11) +(def-tex dp-bipedal-nose-01 lbiped-pris 12) +(def-tex dp-bipedal-power-hose lbiped-pris 13) +(def-tex dp-bipedal-skin-bulge-01 lbiped-pris 14) +(def-tex dp-bipedal-skin-bulge-02 lbiped-pris 15) +(def-tex dp-bipedal-skin-plate-01 lbiped-pris 16) +(def-tex dp-bipedal-skin-plate-small-01 lbiped-pris 17) +(def-tex dp-bipedal-skin-ribs-01 lbiped-pris 18) +(def-tex dp-bipedal-spine-01 lbiped-pris 19) +(def-tex dp-bipedal-toe-01 lbiped-pris 20) +(def-tex environment-darkprec lbiped-pris 21) +(def-tex holograph-env-noise volcanox-warp 0) +(def-tex holograph-env-rim volcanox-warp 1) +(def-tex holograph-env-scan volcanox-warp 2) +(def-tex holograph-env-rim-dest volcanox-warp 3) +(def-tex precur-ice-01 precurc-vis-water 0) +(def-tex common-glass precurc-vis-water 1) +(def-tex rail-env-wall-01 railcst-shrub 0) +(def-tex rail-base-dark-01 railcst-shrub 1) +(def-tex rail-rider-decal-01 railcst-shrub 2) +(def-tex rail-pipe-03 railcst-shrub 3) +(def-tex rail-dash-01 railcst-shrub 4) +(def-tex rail-gray-metal-01 railcst-shrub 5) +(def-tex rail-car-vent-01 railcst-shrub 6) +(def-tex rail-chair-01 railcst-shrub 7) +(def-tex rail-light-blue railcst-shrub 8) +(def-tex rail-light-green railcst-shrub 10) +(def-tex rail-env-wall-01 raila-shrub 0) +(def-tex rail-base-dark-01 raila-shrub 1) +(def-tex rail-rider-decal-01 raila-shrub 2) +(def-tex rail-pipe-03 raila-shrub 3) +(def-tex rail-dash-01 raila-shrub 4) +(def-tex rail-gray-metal-01 raila-shrub 5) +(def-tex rail-car-vent-01 raila-shrub 6) +(def-tex rail-chair-01 raila-shrub 7) +(def-tex rail-light-blue raila-shrub 8) +(def-tex vehicle-snake-chassis-01 raila-shrub 10) +(def-tex vehicle-exhaust-pipe-01 raila-shrub 11) +(def-tex vehicle-snake-tank-02 raila-shrub 12) +(def-tex vehicle-pipe-01 raila-shrub 13) +(def-tex vehicle-chrome-pipe-01 raila-shrub 14) +(def-tex vehicle-body-panel-01 raila-shrub 15) +(def-tex vehicle-safety-plate-01 raila-shrub 16) +(def-tex vehicle-metal-plate-02 raila-shrub 17) +(def-tex vehicle-brace-pipe-01 raila-shrub 18) +(def-tex vehicle-cap-pin-01 raila-shrub 19) +(def-tex vehicle-snake-gun-02 raila-shrub 20) +(def-tex common-black raila-shrub 21) +(def-tex vehicle-cushion-01 raila-shrub 22) +(def-tex vehicle-snake-gun-01 raila-shrub 23) +(def-tex vehicle-rims-01 raila-shrub 24) +(def-tex vehicle-snake-drum-02 raila-shrub 25) +(def-tex vehicle-snake-tank-01 raila-shrub 26) +(def-tex vehicle-snake-drum-01 raila-shrub 27) +(def-tex vehicle-snake-drum-03 raila-shrub 28) +(def-tex rail-light-green raila-shrub 29) +(def-tex racegate lbbring4-sprite 0) +(def-tex bam-eyelight templee-pris2 0) +(def-tex bam-hairhilite templee-pris2 1) +(def-tex environment-oldmetal templee-pris2 2) +(def-tex veger-bookleather templee-pris2 3) +(def-tex veger-booksides templee-pris2 4) +(def-tex veger-bookspine templee-pris2 5) +(def-tex veger-bootbolt templee-pris2 6) +(def-tex veger-bootfoot templee-pris2 7) +(def-tex veger-bootstrap templee-pris2 8) +(def-tex veger-coat templee-pris2 9) +(def-tex veger-coatbelt templee-pris2 10) +(def-tex veger-coatclips templee-pris2 11) +(def-tex veger-endpaper templee-pris2 12) +(def-tex veger-eyelid templee-pris2 13) +(def-tex veger-face templee-pris2 14) +(def-tex veger-fingerbottom templee-pris2 15) +(def-tex veger-fingertop templee-pris2 16) +(def-tex veger-gold templee-pris2 17) +(def-tex veger-hair templee-pris2 18) +(def-tex veger-hand templee-pris2 19) +(def-tex veger-iris templee-pris2 20) +(def-tex veger-legwraps templee-pris2 21) +(def-tex veger-pages templee-pris2 22) +(def-tex veger-pants templee-pris2 23) +(def-tex veger-parchment templee-pris2 24) +(def-tex veger-scarf templee-pris2 25) +(def-tex veger-shoebottom templee-pris2 26) +(def-tex veger-shoulderplate templee-pris2 27) +(def-tex veger-shoulderplatemetal templee-pris2 28) +(def-tex veger-sleeve templee-pris2 29) +(def-tex veger-sleevelower templee-pris2 30) +(def-tex veger-stickwrap templee-pris2 31) +(def-tex veger-teeth templee-pris2 32) +(def-tex veger-vest templee-pris2 33) +(def-tex veger-walkingstick-01 templee-pris2 34) +(def-tex veger-walkingstick-02 templee-pris2 35) +(def-tex veger-walkingstick-03 templee-pris2 36) +(def-tex veger-whitecloth templee-pris2 37) +(def-tex seem-arm templee-pris2 38) +(def-tex seem-bootbottom templee-pris2 39) +(def-tex seem-bootleg templee-pris2 40) +(def-tex seem-bootlower templee-pris2 41) +(def-tex seem-bootmet templee-pris2 42) +(def-tex seem-boottoe templee-pris2 43) +(def-tex seem-ear templee-pris2 44) +(def-tex seem-eye templee-pris2 45) +(def-tex seem-eyelid templee-pris2 46) +(def-tex seem-face templee-pris2 47) +(def-tex seem-finger templee-pris2 48) +(def-tex seem-hand templee-pris2 49) +(def-tex seem-headgearback templee-pris2 50) +(def-tex seem-headpiecetop templee-pris2 51) +(def-tex seem-pipeend templee-pris2 52) +(def-tex seem-pipes-01 templee-pris2 53) +(def-tex seem-pipes-02 templee-pris2 54) +(def-tex seem-precmetal-chestplate-01 templee-pris2 55) +(def-tex seem-precmetal-edge templee-pris2 56) +(def-tex seem-precmetal-plain templee-pris2 57) +(def-tex seem-skirt templee-pris2 58) +(def-tex seem-skirt-small templee-pris2 59) +(def-tex seem-straps templee-pris2 60) +(def-tex seem-teeth templee-pris2 61) +(def-tex seem-uppertorso templee-pris2 62) +(def-tex environment-darkprec ltowera-vis-pris 0) +(def-tex neo-wasp-base ltowera-vis-pris 1) +(def-tex neo-wasp-body ltowera-vis-pris 2) +(def-tex neo-wasp-brown ltowera-vis-pris 3) +(def-tex neo-wasp-dark-brown ltowera-vis-pris 4) +(def-tex neo-wasp-eye ltowera-vis-pris 5) +(def-tex precur-tube-joint-01 precurd-vis-shrub 0) +(def-tex precur-blue-light-01 precurd-vis-shrub 1) +(def-tex precur-tubes-small-01 precurd-vis-shrub 2) +(def-tex precur-bridge-plate-01 precurd-vis-shrub 3) +(def-tex precur-bridge-plate-edge precurd-vis-shrub 4) +(def-tex precur-floor-plate-01 precurd-vis-shrub 5) +(def-tex precur-wall-groove-01 precurd-vis-shrub 6) +(def-tex precur-bridge-floor-01 precurd-vis-shrub 7) +(def-tex precur-small-plate-edge precurd-vis-shrub 8) +(def-tex precur-floor-large-01 precurd-vis-shrub 9) +(def-tex precur-small-plate-01 precurd-vis-shrub 10) +(def-tex precur-small-plate-02 precurd-vis-shrub 11) +(def-tex precur-bridge-stage-01 precurd-vis-shrub 12) +(def-tex precur-nail-02 precurd-vis-shrub 13) +(def-tex precur-nail-01 precurd-vis-shrub 14) +(def-tex racegate lbbring5-sprite 0) +(def-tex precur-plate-large-01 lprecurc-vis-tfrag 1) +(def-tex precur-tubes-small-01 lprecurc-vis-tfrag 2) +(def-tex precur-tubes-segment-01 lprecurc-vis-tfrag 7) +(def-tex precur-wall-groove-01 lprecurc-vis-tfrag 12) +(def-tex precur-rubber-01 lprecurc-vis-tfrag 14) +(def-tex precur-small-plate-edge lprecurc-vis-tfrag 40) +(def-tex precur-trim-01 lprecurc-vis-tfrag 42) +(def-tex lt-eco-vent-blue-01 lprecurc-vis-tfrag 45) +(def-tex lt-eco-vent-side-01 lprecurc-vis-tfrag 46) +(def-tex environment-darkprec towerb-vis-pris 29) +(def-tex neo-wasp-base towerb-vis-pris 30) +(def-tex neo-wasp-body towerb-vis-pris 31) +(def-tex neo-wasp-brown towerb-vis-pris 32) +(def-tex neo-wasp-dark-brown towerb-vis-pris 33) +(def-tex neo-wasp-eye towerb-vis-pris 34) +(def-tex tow-energy-bridge-dest towerb-vis-water 2) +(def-tex tow-energy-bridge towerb-vis-water 3) +(def-tex bam-eyelight desboss2-pris 0) +(def-tex bam-hairhilite desboss2-pris 1) +(def-tex daxter-eyelid desboss2-pris 2) +(def-tex daxter-furhilite desboss2-pris 3) +(def-tex daxter-orange desboss2-pris 4) +(def-tex daxterarm desboss2-pris 5) +(def-tex daxterbodyshort-eix desboss2-pris 6) +(def-tex daxterbolt desboss2-pris 7) +(def-tex daxterear desboss2-pris 8) +(def-tex daxterfinger desboss2-pris 9) +(def-tex daxterfoot desboss2-pris 10) +(def-tex daxterfoot-bottom desboss2-pris 11) +(def-tex daxtergoggles desboss2-pris 12) +(def-tex daxterheadwidenew desboss2-pris 13) +(def-tex daxterhelmetplain desboss2-pris 14) +(def-tex daxterlense desboss2-pris 15) +(def-tex daxternose desboss2-pris 16) +(def-tex daxterteeth desboss2-pris 17) +(def-tex daxtertuft desboss2-pris 18) +(def-tex environment-oldmetal desboss2-pris 19) +(def-tex jakc-armor desboss2-pris 20) +(def-tex jakc-chestplate-straps desboss2-pris 21) +(def-tex jakc-gogglemetal desboss2-pris 22) +(def-tex jakc-lens desboss2-pris 23) +(def-tex jakc-scarf desboss2-pris 24) +(def-tex jakc-scarfhanging desboss2-pris 25) +(def-tex jakc-skirt desboss2-pris 26) +(def-tex jakc-waistband2 desboss2-pris 27) +(def-tex jakc-wraps desboss2-pris 28) +(def-tex jakc-wristband-a2 desboss2-pris 29) +(def-tex jakchires-arm desboss2-pris 30) +(def-tex jakchires-blackstrap desboss2-pris 31) +(def-tex jakchires-brownstrap desboss2-pris 32) +(def-tex jakchires-brwnleather desboss2-pris 33) +(def-tex jakchires-chestplate desboss2-pris 34) +(def-tex jakchires-clips desboss2-pris 35) +(def-tex jakchires-eye desboss2-pris 36) +(def-tex jakchires-eyebrow desboss2-pris 37) +(def-tex jakchires-eyelid desboss2-pris 38) +(def-tex jakchires-facelft desboss2-pris 39) +(def-tex jakchires-facert desboss2-pris 40) +(def-tex jakchires-glovetop desboss2-pris 41) +(def-tex jakchires-hair desboss2-pris 42) +(def-tex jakchires-horn desboss2-pris 43) +(def-tex jakchires-jacket desboss2-pris 44) +(def-tex jakchires-leatherpouch desboss2-pris 45) +(def-tex jakchires-lightbrownspat desboss2-pris 46) +(def-tex jakchires-pants desboss2-pris 47) +(def-tex jakchires-precarmor-01 desboss2-pris 48) +(def-tex jakchires-shoebottom desboss2-pris 49) +(def-tex jakchires-shoemetal desboss2-pris 50) +(def-tex jakchires-shoeteop desboss2-pris 51) +(def-tex jakchires-teeth desboss2-pris 52) +(def-tex errocyber-eye desboss2-pris 60) +(def-tex errocyber-eyelid desboss2-pris 61) +(def-tex errocyber-faceflesh desboss2-pris 62) +(def-tex errolcyber-bighand-01 desboss2-pris 63) +(def-tex errolcyber-bigshoulder desboss2-pris 64) +(def-tex errolcyber-bluedome desboss2-pris 65) +(def-tex errolcyber-bluemetal-01 desboss2-pris 66) +(def-tex errolcyber-bluewrap desboss2-pris 67) +(def-tex errolcyber-chestplate desboss2-pris 68) +(def-tex errolcyber-dirtymetal desboss2-pris 69) +(def-tex errolcyber-earcup desboss2-pris 70) +(def-tex errolcyber-fingers desboss2-pris 71) +(def-tex errolcyber-glovepalm desboss2-pris 72) +(def-tex errolcyber-greyknobs desboss2-pris 73) +(def-tex errolcyber-greymetal desboss2-pris 74) +(def-tex errolcyber-greymetal-02 desboss2-pris 75) +(def-tex errolcyber-hair desboss2-pris 76) +(def-tex errolcyber-head-01 desboss2-pris 77) +(def-tex errolcyber-head-02 desboss2-pris 78) +(def-tex errolcyber-insidemouth desboss2-pris 79) +(def-tex errolcyber-insidewires desboss2-pris 80) +(def-tex errolcyber-jointpipe desboss2-pris 81) +(def-tex errolcyber-metaleyelid desboss2-pris 82) +(def-tex errolcyber-metalgold desboss2-pris 83) +(def-tex errolcyber-pipes-01 desboss2-pris 84) +(def-tex errolcyber-pipes-02 desboss2-pris 85) +(def-tex errolcyber-pipes-03 desboss2-pris 86) +(def-tex errolcyber-redmetal-01 desboss2-pris 87) +(def-tex errolcyber-redmetal-02 desboss2-pris 88) +(def-tex errolcyber-redmetal-03 desboss2-pris 89) +(def-tex errolcyber-roboeye desboss2-pris 90) +(def-tex errolcyber-rubberpipe desboss2-pris 91) +(def-tex errolcyber-rubberpipe-light desboss2-pris 92) +(def-tex errolcyber-spine desboss2-pris 93) +(def-tex errolcyber-teeth desboss2-pris 94) +(def-tex vehicle-snake-tread-01 desboss2-pris 116) +(def-tex vehicle-snake-tread-02 desboss2-pris 117) +(def-tex vehicle-wheel-01 desboss2-pris 118) +(def-tex racegate lbbring6-sprite 0) +(def-tex dm-mech-claws lmech-pris 0) +(def-tex dm-mech-eye lmech-pris 1) +(def-tex dm-mech-head lmech-pris 2) +(def-tex dm-mech-joint lmech-pris 3) +(def-tex dm-mech-joint-cap lmech-pris 4) +(def-tex dm-mech-pipe lmech-pris 5) +(def-tex dm-mech-plate-head lmech-pris 6) +(def-tex dm-mech-plate-shin lmech-pris 7) +(def-tex dm-mech-plate-shoulder lmech-pris 8) +(def-tex dm-mech-tubes-01 lmech-pris 9) +(def-tex dm-mech-waist lmech-pris 10) +(def-tex environment-darkprec lmech-pris 11) +(def-tex targetred lmech-pris 12) +(def-tex environment-darkprec lprenme-pris 0) +(def-tex neo-wasp-base lprenme-pris 1) +(def-tex neo-wasp-body lprenme-pris 2) +(def-tex neo-wasp-brown lprenme-pris 3) +(def-tex neo-wasp-dark-brown lprenme-pris 4) +(def-tex neo-wasp-eye lprenme-pris 5) +(def-tex dm-ship-cockpit-01 lprenme-pris 6) +(def-tex dm-ship-hull-01 lprenme-pris 7) +(def-tex dm-ship-hull-02 lprenme-pris 8) +(def-tex dm-ship-nose-01 lprenme-pris 9) +(def-tex dm-ship-nose-02 lprenme-pris 10) +(def-tex dm-ship-plate-01 lprenme-pris 11) +(def-tex dm-ship-tentacle-01 lprenme-pris 12) +(def-tex bam-eyelight templed-vis-pris2 0) +(def-tex environment-oldmetal templed-vis-pris2 1) +(def-tex seem-arm templed-vis-pris2 2) +(def-tex seem-bootbottom templed-vis-pris2 3) +(def-tex seem-bootleg templed-vis-pris2 4) +(def-tex seem-bootlower templed-vis-pris2 5) +(def-tex seem-bootmet templed-vis-pris2 6) +(def-tex seem-boottoe templed-vis-pris2 7) +(def-tex seem-ear templed-vis-pris2 8) +(def-tex seem-eye templed-vis-pris2 9) +(def-tex seem-eyelid templed-vis-pris2 10) +(def-tex seem-face templed-vis-pris2 11) +(def-tex seem-finger templed-vis-pris2 12) +(def-tex seem-hand templed-vis-pris2 13) +(def-tex seem-headgearback templed-vis-pris2 14) +(def-tex seem-headpiecetop templed-vis-pris2 15) +(def-tex seem-pipeend templed-vis-pris2 16) +(def-tex seem-pipes-01 templed-vis-pris2 17) +(def-tex seem-pipes-02 templed-vis-pris2 18) +(def-tex seem-precmetal-chestplate-01 templed-vis-pris2 19) +(def-tex seem-precmetal-edge templed-vis-pris2 20) +(def-tex seem-precmetal-plain templed-vis-pris2 21) +(def-tex seem-skirt templed-vis-pris2 22) +(def-tex seem-skirt-small templed-vis-pris2 23) +(def-tex seem-straps templed-vis-pris2 24) +(def-tex seem-teeth templed-vis-pris2 25) +(def-tex seem-uppertorso templed-vis-pris2 26) +(def-tex marauder-belt deschase-pris 0) +(def-tex marauder-blade deschase-pris 1) +(def-tex marauder-blade-joint deschase-pris 2) +(def-tex marauder-gun-blade deschase-pris 3) +(def-tex marauder-gun-metal deschase-pris 4) +(def-tex marauder-gun-part deschase-pris 5) +(def-tex marauder-gun-tip deschase-pris 6) +(def-tex marauder-hand-blue deschase-pris 7) +(def-tex marauder-leather-brnstrap deschase-pris 8) +(def-tex marauder-leather-brown deschase-pris 9) +(def-tex marauder-leather-buckle deschase-pris 10) +(def-tex marauder-leather-handle deschase-pris 11) +(def-tex marauder-leather-part deschase-pris 12) +(def-tex marauder-leather-strap deschase-pris 13) +(def-tex marauder-metal-mask deschase-pris 14) +(def-tex marauder-metal-plate deschase-pris 15) +(def-tex marauder-shoe-bottom deschase-pris 16) +(def-tex marauder-skin deschase-pris 17) +(def-tex marauder-skin-nipple deschase-pris 18) +(def-tex marauder-skirt-01 deschase-pris 19) +(def-tex marauder-skirt-02 deschase-pris 20) +(def-tex marauder-spike deschase-pris 21) +(def-tex marauder-sword-edge deschase-pris 22) +(def-tex marauder-sword-metal deschase-pris 23) +(def-tex intcept-base-green01 deschase-pris 24) +(def-tex intcept-base-patern01 deschase-pris 25) +(def-tex intcept-base-patern02 deschase-pris 26) +(def-tex intcept-gun01 deschase-pris 27) +(def-tex intcept-pipe01 deschase-pris 28) +(def-tex intcept-teeth01 deschase-pris 29) +(def-tex intcept-tread01 deschase-pris 30) +(def-tex vehicle-body-panel-01 deschase-pris 31) +(def-tex vehicle-brace-pipe-01 deschase-pris 32) +(def-tex vehicle-cap-pin-01 deschase-pris 33) +(def-tex vehicle-chrome-pipe-01 deschase-pris 34) +(def-tex vehicle-gas-tank-01 deschase-pris 35) +(def-tex vehicle-gun-box-01 deschase-pris 36) +(def-tex vehicle-metal-plate-01 deschase-pris 37) +(def-tex vehicle-toad-exhaust-01 deschase-pris 38) +(def-tex vehicle-tread-blur-02 deschase-pris 39) +(def-tex vehicle-wheel-01 deschase-pris 40) +(def-tex vehicle-wheel-blur-01 deschase-pris 41) +(def-tex catapult-body-under deschase-pris 42) +(def-tex catapult-bone-spike deschase-pris 43) +(def-tex catapult-bowl deschase-pris 44) +(def-tex catapult-brace-pipe-01 deschase-pris 45) +(def-tex catapult-brass-pipe01 deschase-pris 46) +(def-tex catapult-cap-pin-01 deschase-pris 47) +(def-tex catapult-gun-box-01 deschase-pris 48) +(def-tex catapult-metal-part-01 deschase-pris 49) +(def-tex catapult-metal-plate-01 deschase-pris 50) +(def-tex catapult-panel-face deschase-pris 51) +(def-tex catapult-panel-pattern-01 deschase-pris 52) +(def-tex catapult-panel-small deschase-pris 53) +(def-tex catapult-wood-arm-01 deschase-pris 54) +(def-tex catapult-wood-rope deschase-pris 55) +(def-tex catapult-wood-tip deschase-pris 56) +(def-tex rhino-horn-01 deschase-pris 57) +(def-tex rhino-metal-01 deschase-pris 58) +(def-tex vehicle-exhaust-pipe-01 deschase-pris 59) +(def-tex vehicle-wire-01 deschase-pris 60) +(def-tex intcept-b-base-green01 deschase-pris 62) +(def-tex intcept-b-base-patern01 deschase-pris 63) +(def-tex intcept-b-base-patern02 deschase-pris 64) +(def-tex intcept-b-gun01 deschase-pris 65) +(def-tex intcept-b-pipe01 deschase-pris 66) +(def-tex intcept-b-teeth01 deschase-pris 67) +(def-tex intcept-lorez-spike01 deschase-water 0) +(def-tex environment-darkprec lprecurc-vis-pris 0) +(def-tex neo-wasp-base lprecurc-vis-pris 1) +(def-tex neo-wasp-body lprecurc-vis-pris 2) +(def-tex neo-wasp-brown lprecurc-vis-pris 3) +(def-tex neo-wasp-dark-brown lprecurc-vis-pris 4) +(def-tex neo-wasp-eye lprecurc-vis-pris 5) +(def-tex bam-eyelight gridcst-pris 0) +(def-tex bam-hairhilite gridcst-pris 1) +(def-tex environment-oldmetal gridcst-pris 2) +(def-tex jakc-armor gridcst-pris 3) +(def-tex jakc-chestplate-straps gridcst-pris 4) +(def-tex jakc-gogglemetal gridcst-pris 5) +(def-tex jakc-lens gridcst-pris 6) +(def-tex jakc-scarf gridcst-pris 7) +(def-tex jakc-scarfhanging gridcst-pris 8) +(def-tex jakc-skirt gridcst-pris 9) +(def-tex jakc-waistband2 gridcst-pris 10) +(def-tex jakc-wraps gridcst-pris 11) +(def-tex jakc-wristband-a2 gridcst-pris 12) +(def-tex jakchires-arm gridcst-pris 13) +(def-tex jakchires-blackstrap gridcst-pris 14) +(def-tex jakchires-brownstrap gridcst-pris 15) +(def-tex jakchires-brwnleather gridcst-pris 16) +(def-tex jakchires-chestplate gridcst-pris 17) +(def-tex jakchires-clips gridcst-pris 18) +(def-tex jakchires-eye gridcst-pris 19) +(def-tex jakchires-eyebrow gridcst-pris 20) +(def-tex jakchires-eyelid gridcst-pris 21) +(def-tex jakchires-facelft gridcst-pris 22) +(def-tex jakchires-facert gridcst-pris 23) +(def-tex jakchires-glovetop gridcst-pris 24) +(def-tex jakchires-hair gridcst-pris 25) +(def-tex jakchires-horn gridcst-pris 26) +(def-tex jakchires-jacket gridcst-pris 27) +(def-tex jakchires-leatherpouch gridcst-pris 28) +(def-tex jakchires-lightbrownspat gridcst-pris 29) +(def-tex jakchires-pants gridcst-pris 30) +(def-tex jakchires-precarmor-01 gridcst-pris 31) +(def-tex jakchires-shoebottom gridcst-pris 32) +(def-tex jakchires-shoemetal gridcst-pris 33) +(def-tex jakchires-shoeteop gridcst-pris 34) +(def-tex jakchires-teeth gridcst-pris 35) +(def-tex daxter-eyelid gridcst-pris 36) +(def-tex daxter-furhilite gridcst-pris 37) +(def-tex daxter-orange gridcst-pris 38) +(def-tex daxterarm gridcst-pris 39) +(def-tex daxterbodyshort-eix gridcst-pris 40) +(def-tex daxterbolt gridcst-pris 41) +(def-tex daxterear gridcst-pris 42) +(def-tex daxterfinger gridcst-pris 43) +(def-tex daxterfoot gridcst-pris 44) +(def-tex daxterfoot-bottom gridcst-pris 45) +(def-tex daxtergoggles gridcst-pris 46) +(def-tex daxterheadwidenew gridcst-pris 47) +(def-tex daxterhelmetplain gridcst-pris 48) +(def-tex daxterlense gridcst-pris 49) +(def-tex daxternose gridcst-pris 50) +(def-tex daxterteeth gridcst-pris 51) +(def-tex daxtertuft gridcst-pris 52) +(def-tex citwide-crimson-gold gridcst-pris 53) +(def-tex citwide-crimson-light gridcst-pris 54) +(def-tex citwide-crimson-red gridcst-pris 55) +(def-tex citwide-crimson-tube gridcst-pris 56) +(def-tex citwide-crimson-wall-plain gridcst-pris 57) +(def-tex gun-main gridcst-pris 58) +(def-tex back01 gridcst-pris 59) +(def-tex brace01 gridcst-pris 60) +(def-tex carafront01 gridcst-pris 61) +(def-tex carawing01 gridcst-pris 62) +(def-tex cushion01 gridcst-pris 63) +(def-tex floorboard01 gridcst-pris 64) +(def-tex moter01 gridcst-pris 65) +(def-tex pipe01 gridcst-pris 66) +(def-tex bam-eyelight gridcst-pris2 0) +(def-tex bam-hairhilite gridcst-pris2 1) +(def-tex environment-oldmetal gridcst-pris2 2) +(def-tex jinx-arm gridcst-pris2 3) +(def-tex jinx-belt gridcst-pris2 4) +(def-tex jinx-blademetal gridcst-pris2 5) +(def-tex jinx-boottoe gridcst-pris2 6) +(def-tex jinx-boottop gridcst-pris2 7) +(def-tex jinx-brownstrap gridcst-pris2 8) +(def-tex jinx-brownstrapbolts gridcst-pris2 9) +(def-tex jinx-buckles gridcst-pris2 10) +(def-tex jinx-cigar gridcst-pris2 11) +(def-tex jinx-cigarflame gridcst-pris2 12) +(def-tex jinx-eyelid gridcst-pris2 13) +(def-tex jinx-face gridcst-pris2 14) +(def-tex jinx-finger gridcst-pris2 15) +(def-tex jinx-glove gridcst-pris2 16) +(def-tex jinx-glovepalm gridcst-pris2 17) +(def-tex jinx-hair gridcst-pris2 18) +(def-tex jinx-hairtye gridcst-pris2 19) +(def-tex jinx-handle gridcst-pris2 20) +(def-tex jinx-iris gridcst-pris2 21) +(def-tex jinx-kneepad gridcst-pris2 22) +(def-tex jinx-pants gridcst-pris2 23) +(def-tex jinx-rope-01 gridcst-pris2 24) +(def-tex jinx-scarf gridcst-pris2 25) +(def-tex jinx-shirt gridcst-pris2 26) +(def-tex jinx-shoebottom2 gridcst-pris2 27) +(def-tex jinx-singlerope gridcst-pris2 28) +(def-tex jinx-teeth gridcst-pris2 29) +(def-tex jinx-wraps gridcst-pris2 30) +(def-tex stadiumb-hud-nmbr-01 desrally-minimap 0) +(def-tex stadiumb-hud-nmbr-02 desrally-minimap 1) +(def-tex stadiumb-hud-nmbr-03 desrally-minimap 2) +(def-tex stadiumb-hud-nmbr-04 desrally-minimap 3) +(def-tex stadiumb-hud-nmbr-05 desrally-minimap 4) +(def-tex stadiumb-hud-nmbr-06 desrally-minimap 5) +(def-tex stadiumb-hud-nmbr-07 desrally-minimap 6) +(def-tex stadiumb-hud-nmbr-08 desrally-minimap 7) +(def-tex stadiumb-hud-ord-e desrally-minimap 8) +(def-tex stadiumb-hud-ord-er desrally-minimap 9) +(def-tex stadiumb-hud-ord-korean desrally-minimap 10) +(def-tex stadiumb-hud-ord-nd desrally-minimap 11) +(def-tex stadiumb-hud-ord-o desrally-minimap 12) +(def-tex stadiumb-hud-ord-rd desrally-minimap 13) +(def-tex stadiumb-hud-ord-st desrally-minimap 14) +(def-tex stadiumb-hud-ord-th desrally-minimap 15) +(def-tex stadiumb-hud-lap-01 desrally-minimap 16) +(def-tex stadiumb-hud-lap-02 desrally-minimap 17) +(def-tex stadiumb-hud-lap-03 desrally-minimap 18) +(def-tex bam-eyelight lblowtkg-pris 0) +(def-tex cguard1-backmetal lblowtkg-pris 3) +(def-tex cguard1-guntube lblowtkg-pris 5) +(def-tex environment-oldmetal lblowtkg-pris 10) +(def-tex kg-fl-tret-backend lblowtkg-pris 11) +(def-tex kg-fl-tret-backthing01 lblowtkg-pris 12) +(def-tex kg-fl-tret-black-plate lblowtkg-pris 13) +(def-tex kg-fl-tret-dash01 lblowtkg-pris 14) +(def-tex kg-fl-tret-guntrack lblowtkg-pris 15) +(def-tex kg-fl-tret-hood01 lblowtkg-pris 16) +(def-tex kg-fl-tret-jets01 lblowtkg-pris 17) +(def-tex kg-fl-tret-motor lblowtkg-pris 18) +(def-tex kg-fl-tret-post01 lblowtkg-pris 19) +(def-tex kg-fl-tret-red-plate lblowtkg-pris 20) +(def-tex roboguard-headshield lblowtkg-pris 22) +(def-tex nwasp-eye-01 lblowtkg-pris 33) +(def-tex nwasp-gem-01 lblowtkg-pris 34) +(def-tex nwasp-hose lblowtkg-pris 35) +(def-tex nwasp-metal-01 lblowtkg-pris 36) +(def-tex nwasp-skin-01 lblowtkg-pris 37) +(def-tex nwasp-skin-02 lblowtkg-pris 38) +(def-tex nwasp-skin-03 lblowtkg-pris 39) +(def-tex homing-missle-body lblowtkg-pris 40) +(def-tex homing-missle-body-tip lblowtkg-pris 41) +(def-tex homing-missle-exhaust lblowtkg-pris 42) +(def-tex homing-missle-fin-01 lblowtkg-pris 43) +(def-tex bombot-darkgrey-01 lblowtkg-pris 44) +(def-tex bombot-darkgrey-02 lblowtkg-pris 45) +(def-tex bombot-gearsides lblowtkg-pris 46) +(def-tex bombot-greybarrelend lblowtkg-pris 47) +(def-tex bombot-greybarrelside lblowtkg-pris 48) +(def-tex bombot-guards lblowtkg-pris 49) +(def-tex bombot-guntop lblowtkg-pris 50) +(def-tex bombot-insidegun lblowtkg-pris 51) +(def-tex bombot-joint lblowtkg-pris 52) +(def-tex bombot-lens lblowtkg-pris 53) +(def-tex bombot-post01 lblowtkg-pris 54) +(def-tex bombot-rail01 lblowtkg-pris 55) +(def-tex bombot-redplate-01 lblowtkg-pris 56) +(def-tex bombot-rimgrey lblowtkg-pris 57) +(def-tex bombot-roundend lblowtkg-pris 58) +(def-tex bombot-turret01 lblowtkg-pris 59) +(def-tex bombot-wheel lblowtkg-pris 60) +(def-tex kg-grunt-cable-01 lblowtkg-pris 61) +(def-tex kg-grunt-rim-03 lblowtkg-pris 62) +(def-tex cty-grunt-eye-01 lblowtmh-pris 7) +(def-tex cty-grunt-hose lblowtmh-pris 9) +(def-tex cty-grunt-metal-01 lblowtmh-pris 10) +(def-tex cty-grunt-skin-01 lblowtmh-pris 11) +(def-tex cty-grunt-skin-02 lblowtmh-pris 12) +(def-tex cty-grunt-skin-03 lblowtmh-pris 13) +(def-tex cty-grunt-teeth-01 lblowtmh-pris 14) +(def-tex bam-eyelight lblowtmh-pris 15) +(def-tex blue-gem lblowtmh-pris 16) +(def-tex brown-hose lblowtmh-pris 17) +(def-tex cguard1-backmetal lblowtmh-pris 18) +(def-tex cguard1-chestplate lblowtmh-pris 19) +(def-tex cguard1-guntube lblowtmh-pris 20) +(def-tex cguard1-lens lblowtmh-pris 21) +(def-tex cguardgame-backplate lblowtmh-pris 22) +(def-tex cguardgame-metallight-01small lblowtmh-pris 23) +(def-tex cguardgame-shoebottom lblowtmh-pris 24) +(def-tex environment-oldmetal lblowtmh-pris 25) +(def-tex roboguard-die-stamped-metal-blue lblowtmh-pris 26) +(def-tex roboguard-headshield lblowtmh-pris 27) +(def-tex roboguard-shouldershield lblowtmh-pris 28) +(def-tex widow-pod-gun-metal lblowtmh-pris 29) +(def-tex wire-metal lblowtmh-pris 30) +(def-tex bam-eyelight towercst-pris 0) +(def-tex bam-hairhilite towercst-pris 1) +(def-tex daxter-eyelid towercst-pris 2) +(def-tex daxter-furhilite towercst-pris 3) +(def-tex daxter-orange towercst-pris 4) +(def-tex daxterarm towercst-pris 5) +(def-tex daxterbodyshort-eix towercst-pris 6) +(def-tex daxterbolt towercst-pris 7) +(def-tex daxterear towercst-pris 8) +(def-tex daxterfinger towercst-pris 9) +(def-tex daxterfoot towercst-pris 10) +(def-tex daxterfoot-bottom towercst-pris 11) +(def-tex daxtergoggles towercst-pris 12) +(def-tex daxterheadwidenew towercst-pris 13) +(def-tex daxterhelmetplain towercst-pris 14) +(def-tex daxterlense towercst-pris 15) +(def-tex daxternose towercst-pris 16) +(def-tex daxterteeth towercst-pris 17) +(def-tex daxtertuft towercst-pris 18) +(def-tex environment-oldmetal towercst-pris 19) +(def-tex jakc-armor towercst-pris 20) +(def-tex jakc-chestplate-straps towercst-pris 21) +(def-tex jakc-gogglemetal towercst-pris 22) +(def-tex jakc-lens towercst-pris 23) +(def-tex jakc-scarf towercst-pris 24) +(def-tex jakc-scarfhanging towercst-pris 25) +(def-tex jakc-skirt towercst-pris 26) +(def-tex jakc-waistband2 towercst-pris 27) +(def-tex jakc-wraps towercst-pris 28) +(def-tex jakc-wristband-a2 towercst-pris 29) +(def-tex jakchires-arm towercst-pris 30) +(def-tex jakchires-blackstrap towercst-pris 31) +(def-tex jakchires-brownstrap towercst-pris 32) +(def-tex jakchires-brwnleather towercst-pris 33) +(def-tex jakchires-chestplate towercst-pris 34) +(def-tex jakchires-clips towercst-pris 35) +(def-tex jakchires-eye towercst-pris 36) +(def-tex jakchires-eyebrow towercst-pris 37) +(def-tex jakchires-eyelid towercst-pris 38) +(def-tex jakchires-facelft towercst-pris 39) +(def-tex jakchires-facert towercst-pris 40) +(def-tex jakchires-glovetop towercst-pris 41) +(def-tex jakchires-hair towercst-pris 42) +(def-tex jakchires-horn towercst-pris 43) +(def-tex jakchires-jacket towercst-pris 44) +(def-tex jakchires-leatherpouch towercst-pris 45) +(def-tex jakchires-lightbrownspat towercst-pris 46) +(def-tex jakchires-pants towercst-pris 47) +(def-tex jakchires-precarmor-01 towercst-pris 48) +(def-tex jakchires-shoebottom towercst-pris 49) +(def-tex jakchires-shoemetal towercst-pris 50) +(def-tex jakchires-shoeteop towercst-pris 51) +(def-tex jakchires-teeth towercst-pris 52) +(def-tex backThing01 towercst-pris 53) +(def-tex common-black towercst-pris 54) +(def-tex dash01 towercst-pris 55) +(def-tex gauge01 towercst-pris 56) +(def-tex grillRim01 towercst-pris 57) +(def-tex gunBoxBack01 towercst-pris 58) +(def-tex gunBoxFront01 towercst-pris 59) +(def-tex gunbox01 towercst-pris 60) +(def-tex gunbox02 towercst-pris 61) +(def-tex hood01 towercst-pris 62) +(def-tex jetTop01 towercst-pris 63) +(def-tex jets01 towercst-pris 64) +(def-tex kcfrontend01 towercst-pris 65) +(def-tex kg-pickup-bed towercst-pris 66) +(def-tex kg-pickup-body towercst-pris 67) +(def-tex kg-pickup-engine-01 towercst-pris 68) +(def-tex kg-pickup-fender towercst-pris 69) +(def-tex kg-pickup-fender-edge towercst-pris 70) +(def-tex kg-pickup-handrail towercst-pris 71) +(def-tex kg-pickup-hood towercst-pris 72) +(def-tex kg-pickup-joint towercst-pris 73) +(def-tex kg-pickup-pipe towercst-pris 74) +(def-tex kg-pickup-sidelogo towercst-pris 75) +(def-tex kg-pickup-wings01 towercst-pris 76) +(def-tex kg-pickup-wings02 towercst-pris 77) +(def-tex light01 towercst-pris 78) +(def-tex lightCase01 towercst-pris 79) +(def-tex mhcity-eggskin towercst-pris 80) +(def-tex mhcity-grunt-egg-horns-01 towercst-pris 81) +(def-tex mhcity-tower-door-frame-01 towercst-pris 82) +(def-tex mhcity-tower-door-metal-01 towercst-pris 83) +(def-tex mhcity-vein-01 towercst-pris 84) +(def-tex mhcity-wall-tentacle-01 towercst-pris 85) +(def-tex post01 towercst-pris 86) +(def-tex rail01 towercst-pris 87) +(def-tex seat01 towercst-pris 88) +(def-tex stripe03 towercst-pris 89) +(def-tex turret01 towercst-pris 90) +(def-tex wing01 towercst-pris 91) +(def-tex wing02 towercst-pris 92) +(def-tex wing02grey01 towercst-pris 93) +(def-tex gun-dark-mag towercst-pris 94) +(def-tex gun-main towercst-pris 95) +(def-tex gun-purple-glow towercst-pris 96) +(def-tex bam-eyelight towercst-pris2 0) +(def-tex bam-hairhilite towercst-pris2 1) +(def-tex charHOLD towercst-pris2 2) +(def-tex environment-oldmetal towercst-pris2 3) +(def-tex jinx-arm towercst-pris2 4) +(def-tex jinx-belt towercst-pris2 5) +(def-tex jinx-blademetal towercst-pris2 6) +(def-tex jinx-boottoe towercst-pris2 7) +(def-tex jinx-boottop towercst-pris2 8) +(def-tex jinx-brownstrap towercst-pris2 9) +(def-tex jinx-brownstrapbolts towercst-pris2 10) +(def-tex jinx-buckles towercst-pris2 11) +(def-tex jinx-cigar towercst-pris2 12) +(def-tex jinx-cigarflame towercst-pris2 13) +(def-tex jinx-eyelid towercst-pris2 14) +(def-tex jinx-face towercst-pris2 15) +(def-tex jinx-finger towercst-pris2 16) +(def-tex jinx-glove towercst-pris2 17) +(def-tex jinx-glovepalm towercst-pris2 18) +(def-tex jinx-hair towercst-pris2 19) +(def-tex jinx-hairtye towercst-pris2 20) +(def-tex jinx-handle towercst-pris2 21) +(def-tex jinx-iris towercst-pris2 22) +(def-tex jinx-kneepad towercst-pris2 23) +(def-tex jinx-pants towercst-pris2 24) +(def-tex jinx-rope-01 towercst-pris2 25) +(def-tex jinx-scarf towercst-pris2 26) +(def-tex jinx-shirt towercst-pris2 27) +(def-tex jinx-shoebottom2 towercst-pris2 28) +(def-tex jinx-singlerope towercst-pris2 29) +(def-tex jinx-teeth towercst-pris2 30) +(def-tex jinx-wraps towercst-pris2 31) +(def-tex sig-belt towercst-pris2 32) +(def-tex sig-eye towercst-pris2 33) +(def-tex sig-eyelid towercst-pris2 34) +(def-tex sig-faceleft towercst-pris2 35) +(def-tex sig-facert towercst-pris2 36) +(def-tex sig-flask towercst-pris2 37) +(def-tex sig-gem-01 towercst-pris2 38) +(def-tex sig-glove towercst-pris2 39) +(def-tex sig-glovetop towercst-pris2 40) +(def-tex sig-gun-01 towercst-pris2 41) +(def-tex sig-gun-02 towercst-pris2 42) +(def-tex sig-gun-03 towercst-pris2 43) +(def-tex sig-gun-04 towercst-pris2 44) +(def-tex sig-gun-05 towercst-pris2 45) +(def-tex sig-headgear towercst-pris2 46) +(def-tex sig-horn towercst-pris2 47) +(def-tex sig-lens towercst-pris2 48) +(def-tex sig-metal-01 towercst-pris2 49) +(def-tex sig-metal-dirty towercst-pris2 50) +(def-tex sig-sac towercst-pris2 51) +(def-tex sig-shoebottom towercst-pris2 52) +(def-tex sig-shoetop towercst-pris2 53) +(def-tex sig-shoulderarmor towercst-pris2 54) +(def-tex sig-skirts towercst-pris2 55) +(def-tex sig-skirts-02 towercst-pris2 56) +(def-tex sig-skirts-03 towercst-pris2 57) +(def-tex sig-undergarments towercst-pris2 58) +(def-tex torn-armlft towercst-pris2 59) +(def-tex torn-armor towercst-pris2 60) +(def-tex torn-belt towercst-pris2 61) +(def-tex torn-belt2 towercst-pris2 62) +(def-tex torn-blademetal towercst-pris2 63) +(def-tex torn-ear towercst-pris2 64) +(def-tex torn-eye towercst-pris2 65) +(def-tex torn-eyelid towercst-pris2 66) +(def-tex torn-face towercst-pris2 67) +(def-tex torn-face-right towercst-pris2 68) +(def-tex torn-finger towercst-pris2 69) +(def-tex torn-footleather towercst-pris2 70) +(def-tex torn-gunbarrel towercst-pris2 71) +(def-tex torn-gunbarrel-02 towercst-pris2 72) +(def-tex torn-hair-01 towercst-pris2 73) +(def-tex torn-hair-02 towercst-pris2 74) +(def-tex torn-handle-01 towercst-pris2 75) +(def-tex torn-legshield towercst-pris2 76) +(def-tex torn-metal2 towercst-pris2 77) +(def-tex torn-mouth towercst-pris2 78) +(def-tex torn-pipe towercst-pris2 79) +(def-tex torn-scarf towercst-pris2 80) +(def-tex torn-shoe towercst-pris2 81) +(def-tex torn-shoe-02 towercst-pris2 82) +(def-tex torn-teeth-01 towercst-pris2 83) +(def-tex torn-vest towercst-pris2 84) +(def-tex vin-teeth-01 towercst-pris2 85) +(def-tex sig-flatfangs towercst-water 0) +(def-tex windshield01 towercst-water 1) +(def-tex errolbomb-target-dot-01 factoryd-sprite 0) +(def-tex errolbomb-target-indicator-arrow-01 factoryd-sprite 1) +(def-tex errolbomb-target-reg-01 factoryd-sprite 2) +(def-tex errolbomb-target-reg-corner-01 factoryd-sprite 3) +(def-tex errolbomb-target-supr-01 factoryd-sprite 4) +(def-tex errolbomb-target-supr-ring-01 factoryd-sprite 5) +(def-tex ceiling-dust factoryd-sprite 6) +(def-tex dust-sparkle factoryd-sprite 7) +(def-tex glass-shard-01 factoryd-sprite 8) +(def-tex glass-shard-02 factoryd-sprite 9) +(def-tex glass-shard-03 factoryd-sprite 10) +(def-tex glass-shard-04 factoryd-sprite 11) +(def-tex mech-flame factoryd-sprite 12) +(def-tex facc-metal-panel-07 factorya-shrub 0) +(def-tex facc-metal-panel-09 factorya-shrub 1) +(def-tex facc-beam-01 factorya-shrub 2) +(def-tex facc-hole-grill-01 factorya-shrub 3) +(def-tex facc-door-frame-01 factorya-shrub 4) +(def-tex hud-small-vehicle-health-bar-01 raila-minimap 1) +(def-tex hud-small-vehicle-health-bar-02 raila-minimap 2) +(def-tex bam-eyelight lfacrm2-pris 0) +(def-tex blue-gem lfacrm2-pris 1) +(def-tex brown-hose lfacrm2-pris 2) +(def-tex cguard1-backmetal lfacrm2-pris 3) +(def-tex cguard1-chestplate lfacrm2-pris 4) +(def-tex cguard1-gunmetaldark2 lfacrm2-pris 5) +(def-tex cguard1-guntube lfacrm2-pris 6) +(def-tex cguard1-lens lfacrm2-pris 7) +(def-tex cguardgame-backplate lfacrm2-pris 8) +(def-tex cguardgame-metaledark-02 lfacrm2-pris 9) +(def-tex cguardgame-metallight-01small lfacrm2-pris 10) +(def-tex cguardgame-shoebottom lfacrm2-pris 11) +(def-tex environment-oldmetal lfacrm2-pris 12) +(def-tex kg-grunt-cable-01 lfacrm2-pris 13) +(def-tex kg-grunt-rim-01 lfacrm2-pris 14) +(def-tex kg-grunt-rim-02 lfacrm2-pris 15) +(def-tex kg-grunt-rim-03 lfacrm2-pris 16) +(def-tex roboguard-die-stamped-metal-blue lfacrm2-pris 17) +(def-tex roboguard-die-stamped-metal-red lfacrm2-pris 18) +(def-tex roboguard-headshield lfacrm2-pris 19) +(def-tex roboguard-shouldershield lfacrm2-pris 20) +(def-tex squid-bulb-sm lfacrm2-pris 21) +(def-tex squid-tubes lfacrm2-pris 22) +(def-tex widow-dull-inards lfacrm2-pris 23) +(def-tex widow-pod-gun-metal lfacrm2-pris 24) +(def-tex wire-metal lfacrm2-pris 25) +(def-tex squid-drabgun lfacrm2-pris 26) +(def-tex des-mount-01 hangb-vis-tfrag 1) +(def-tex des-mount-02 hangb-vis-tfrag 2) +(def-tex des-totem-stone-01 hangb-vis-tfrag 5) +(def-tex des-bridge-plank hangb-vis-tfrag 10) +(def-tex des-rock-01 hangb-vis-tfrag 11) +(def-tex des-pole-01 hangb-vis-tfrag 14) +(def-tex des-wasmetal01 hangb-vis-tfrag 16) +(def-tex des-ruins-top-01 hangb-vis-tfrag 18) +(def-tex des-corral-plate-01 hangb-vis-tfrag 19) +(def-tex des-corral-metal-01 hangb-vis-tfrag 22) +(def-tex des-corral-metal-04 hangb-vis-tfrag 24) +(def-tex des-wasmetal07 hangb-vis-tfrag 25) +(def-tex wascity-outerwall-metal-d hangb-vis-tfrag 26) +(def-tex wascity-base hangb-vis-tfrag 27) +(def-tex wascitya-airlock-metal hangb-vis-tfrag 28) +(def-tex common-black hangb-vis-tfrag 29) +(def-tex wascity-outerwall-metal-b hangb-vis-tfrag 30) +(def-tex des-marauder-bridge-floor hangb-vis-tfrag 31) +(def-tex des-cave-floor-01 hangb-vis-tfrag 32) +(def-tex des-volcano-lava hangb-vis-tfrag 34) +(def-tex des-wascity-outerwall-metal-b hangb-vis-tfrag 35) +(def-tex des-wascity-outerwall-metal-d hangb-vis-tfrag 36) +(def-tex des-wascity-palace-siding-01 hangb-vis-tfrag 37) +(def-tex des-wascity-outerwall-rock hangb-vis-tfrag 38) +(def-tex des-wascity-cement-road hangb-vis-tfrag 39) +(def-tex des-low-sand hangb-vis-tfrag 40) +(def-tex des-low-tree-bark hangb-vis-tfrag 41) +(def-tex des-low-palm-leaf-01 hangb-vis-tfrag 42) +(def-tex des-low-pinetree-leaf-01 hangb-vis-tfrag 43) +(def-tex des-low-metal-bridge hangb-vis-tfrag 44) +(def-tex des-low-sand-brown-01 hangb-vis-tfrag 45) +(def-tex des-low-sand-brown-big hangb-vis-tfrag 46) +(def-tex des-low-sand-brown-03 hangb-vis-tfrag 47) +(def-tex des-low-sand-brown-02 hangb-vis-tfrag 48) +(def-tex des-low-sand-green-01 hangb-vis-tfrag 49) +(def-tex des-low-sand-green-03 hangb-vis-tfrag 50) +(def-tex des-low-sand-green-02 hangb-vis-tfrag 51) +(def-tex des-waterfall-dest hanga-vis-water 2) +(def-tex des-mount-01 hanga-vis-tfrag 0) +(def-tex des-mount-02 hanga-vis-tfrag 1) +(def-tex des-totem-stone-01 hanga-vis-tfrag 4) +(def-tex des-cliff-01 hanga-vis-tfrag 6) +(def-tex des-ruins-top-01 hanga-vis-tfrag 17) +(def-tex des-ruins-roof-01 hanga-vis-tfrag 25) +(def-tex des-beach-01 hanga-vis-tfrag 33) +(def-tex des-mount-sand-trans hanga-vis-tfrag 34) +(def-tex des-cliff-top-05 hanga-vis-tfrag 35) +(def-tex des-cliff-trans-01 hanga-vis-tfrag 37) +(def-tex des-cliff-top-02 hanga-vis-tfrag 38) +(def-tex des-mount-bottom-01 hanga-vis-tfrag 39) +(def-tex des-cave-floor-01 hanga-vis-tfrag 41) +(def-tex des-low-sand hanga-vis-tfrag 47) +(def-tex des-low-tree-bark hanga-vis-tfrag 48) +(def-tex des-low-palm-leaf-01 hanga-vis-tfrag 49) +(def-tex des-low-metal-bridge hanga-vis-tfrag 50) +(def-tex des-low-sand-brown-big hanga-vis-tfrag 51) +(def-tex des-low-sand-brown-03 hanga-vis-tfrag 52) +(def-tex des-low-sand-brown-01 hanga-vis-tfrag 53) +(def-tex des-low-sand-brown-02 hanga-vis-tfrag 54) +(def-tex des-low-sand-grey-01 hanga-vis-tfrag 55) +(def-tex des-low-sand-green-02 hanga-vis-tfrag 56) +(def-tex des-low-sand-grey-02 hanga-vis-tfrag 57) +(def-tex des-low-sand-green-01 hanga-vis-tfrag 58) +(def-tex des-low-sand-green-03 hanga-vis-tfrag 59) +(def-tex des-burn-precursor-01 hanga-vis-pris 0) +(def-tex des-glider-ring-deco hanga-vis-pris 1) +(def-tex des-glider-ring-yellow hanga-vis-pris 2) +(def-tex tpl-glider-grip01 hanga-vis-pris 11) +(def-tex tpl-glider-metal01 hanga-vis-pris 12) +(def-tex tpl-glider-metal02 hanga-vis-pris 13) +(def-tex tpl-glider-precursor01 hanga-vis-pris 14) +(def-tex tpl-glider-wood03 hanga-vis-pris 15) +(def-tex tpl-rut01 hanga-vis-pris 16) +(def-tex tpl-wing01 hanga-vis-pris 17) +(def-tex tpl-wing03 hanga-vis-pris 18) +(def-tex bam-eyelight lblowcst-pris 0) +(def-tex cguardgame-scarf lblowcst-pris 1) +(def-tex citfat-hairflat lblowcst-pris 2) +(def-tex citn-1-pants lblowcst-pris 3) +(def-tex citn-allbuckel lblowcst-pris 4) +(def-tex citn-alleyebrow lblowcst-pris 5) +(def-tex citn-allflesh lblowcst-pris 6) +(def-tex citn-alllcotton lblowcst-pris 7) +(def-tex citn-allleather lblowcst-pris 8) +(def-tex citn-allleatherstrap lblowcst-pris 9) +(def-tex citn-allleatherwrinkled lblowcst-pris 10) +(def-tex citn-allleye lblowcst-pris 11) +(def-tex environment-oldmetal lblowcst-pris 12) +(def-tex jakbsmall-blackstrap lblowcst-pris 13) +(def-tex jakbsmall-finger lblowcst-pris 14) +(def-tex jakbsmall-glovetop lblowcst-pris 15) +(def-tex sig-skirts-02 lblowcst-pris 16) +(def-tex sig2-belt lblowcst-pris 17) +(def-tex sig2-eyestillsmall lblowcst-pris 18) +(def-tex sig2-faceleft lblowcst-pris 19) +(def-tex sig2-facert lblowcst-pris 20) +(def-tex sig2-flask lblowcst-pris 21) +(def-tex sig2-gem-01 lblowcst-pris 22) +(def-tex sig2-glove lblowcst-pris 23) +(def-tex sig2-glovetop lblowcst-pris 24) +(def-tex sig2-gun-01 lblowcst-pris 25) +(def-tex sig2-gun-02 lblowcst-pris 26) +(def-tex sig2-gun-03 lblowcst-pris 27) +(def-tex sig2-gun-04 lblowcst-pris 28) +(def-tex sig2-gun-05 lblowcst-pris 29) +(def-tex sig2-headgear lblowcst-pris 30) +(def-tex sig2-horn lblowcst-pris 31) +(def-tex sig2-lens lblowcst-pris 32) +(def-tex sig2-metal-01 lblowcst-pris 33) +(def-tex sig2-metal-dirty lblowcst-pris 34) +(def-tex sig2-sac lblowcst-pris 35) +(def-tex sig2-shoebottom lblowcst-pris 36) +(def-tex sig2-shoetop lblowcst-pris 37) +(def-tex sig2-shoulderarmor lblowcst-pris 38) +(def-tex sig2-skirts lblowcst-pris 39) +(def-tex sig2-skirts-03 lblowcst-pris 40) +(def-tex sig2-undergarments lblowcst-pris 41) +(def-tex bam-hairhilite lblowcst-pris 42) +(def-tex charHOLD lblowcst-pris 43) +(def-tex torn-armlft lblowcst-pris 44) +(def-tex torn-armor lblowcst-pris 45) +(def-tex torn-belt lblowcst-pris 46) +(def-tex torn-belt2 lblowcst-pris 47) +(def-tex torn-ear lblowcst-pris 48) +(def-tex torn-eye-lorez lblowcst-pris 49) +(def-tex torn-face lblowcst-pris 50) +(def-tex torn-face-right lblowcst-pris 51) +(def-tex torn-finger lblowcst-pris 52) +(def-tex torn-footleather lblowcst-pris 53) +(def-tex torn-gunbarrel lblowcst-pris 54) +(def-tex torn-gunbarrel-02 lblowcst-pris 55) +(def-tex torn-hair-01 lblowcst-pris 56) +(def-tex torn-hair-02 lblowcst-pris 57) +(def-tex torn-handle-01 lblowcst-pris 58) +(def-tex torn-legshield lblowcst-pris 59) +(def-tex torn-metal2 lblowcst-pris 60) +(def-tex torn-pipe lblowcst-pris 61) +(def-tex torn-scarf lblowcst-pris 62) +(def-tex torn-shoe lblowcst-pris 63) +(def-tex torn-shoe-02 lblowcst-pris 64) +(def-tex torn-vest lblowcst-pris 65) +(def-tex sig2-flatfangs lblowcst-water 0) +(def-tex errolcyber-lens desboss2-water 0) +(def-tex terraformer-cpitwindows-01 desboss2-water 1) +(def-tex terraformer-cpitwindows-02 desboss2-water 2) +(def-tex hud-temple-token templec-minimap 0) +(def-tex ceiling-dust templea-sprite 0) +(def-tex dust-sparkle templea-sprite 2) +(def-tex charHOLD volcanoa-vis-pris2 0) +(def-tex flamer-wing volcanoa-vis-pris2 1) +(def-tex grunt-eye-01 volcanoa-vis-pris2 2) +(def-tex grunt-gem-01 volcanoa-vis-pris2 3) +(def-tex grunt-hose volcanoa-vis-pris2 4) +(def-tex grunt-metal-01 volcanoa-vis-pris2 5) +(def-tex grunt-skin-01 volcanoa-vis-pris2 6) +(def-tex grunt-skin-02 volcanoa-vis-pris2 7) +(def-tex grunt-skin-03 volcanoa-vis-pris2 8) +(def-tex flamer-wing templea-vis-alpha 0) +(def-tex bam-hairhilite loutro2-pris 0) +(def-tex daxter-furhilite loutro2-pris 1) +(def-tex daxterarm loutro2-pris 2) +(def-tex daxterbodyshort-eix loutro2-pris 3) +(def-tex daxterear loutro2-pris 4) +(def-tex daxterfinger loutro2-pris 5) +(def-tex daxterfoot loutro2-pris 6) +(def-tex daxterfoot-bottom loutro2-pris 7) +(def-tex prec-tess-belt loutro2-pris 8) +(def-tex prec-tess-belt2 loutro2-pris 9) +(def-tex prec-tess-emblem loutro2-pris 10) +(def-tex prec-tess-glove loutro2-pris 11) +(def-tex prec-tess-hair loutro2-pris 12) +(def-tex prec-tess-headband loutro2-pris 13) +(def-tex prec-tess-pantsback loutro2-pris 14) +(def-tex prec-tess-pantscuff loutro2-pris 15) +(def-tex prec-tess-pantsfront loutro2-pris 16) +(def-tex prec-tess-scarf loutro2-pris 17) +(def-tex prec-tess-shirt loutro2-pris 18) +(def-tex prec-tess-shirtstraps loutro2-pris 19) +(def-tex prec-tess-sleeve loutro2-pris 20) +(def-tex prec-dumb-helmet loutro2-pris 21) +(def-tex prec-dumb-pants loutro2-pris 22) +(def-tex prec-dumb-shirt loutro2-pris 23) +(def-tex prec-dumb-sleeve loutro2-pris 24) +(def-tex prec-hand-back loutro2-pris 25) +(def-tex prec-handpalm loutro2-pris 26) +(def-tex prec-leader-foreheadshield loutro2-pris 27) +(def-tex prec-leader-headshield loutro2-pris 28) +(def-tex prec-staff-02 loutro2-pris 29) +(def-tex bam-eyelight loutro2-pris 30) +(def-tex daxter-orange loutro2-pris 31) +(def-tex daxter-pants loutro2-pris 32) +(def-tex daxterbolt loutro2-pris 33) +(def-tex daxtergoggles loutro2-pris 34) +(def-tex daxterheadwidenew loutro2-pris 35) +(def-tex daxterhelmetplain loutro2-pris 36) +(def-tex daxterlense loutro2-pris 37) +(def-tex daxternose loutro2-pris 38) +(def-tex daxterteeth loutro2-pris 39) +(def-tex daxtertuft loutro2-pris 40) +(def-tex prec-veger-sleeve loutro2-pris 41) +(def-tex daxter-eyelid loutro2-pris 42) +(def-tex prec-neck loutro2-pris 43) +(def-tex prec-tess-face loutro2-pris 44) +(def-tex prec-tess-necktrans loutro2-pris 45) +(def-tex prec-tess-eye loutro2-pris 46) +(def-tex prec-tess-eyelid loutro2-pris 47) +(def-tex prec-tess-nose loutro2-pris 48) +(def-tex sig-flatfangs loutro2-water 0) +(def-tex hud-sniper-button-green-01 lctysnpr-minimap 0) +(def-tex hud-sniper-button-red-01 lctysnpr-minimap 1) +(def-tex comb-env2 raila-alpha 5) +(def-tex rail-light-red raila-alpha 7) +(def-tex comb-pre-metal-01-yellow raila-alpha 9) +(def-tex comb-pre-metal-fade-yellow raila-alpha 10) +(def-tex comb-pre-metal-01-plain raila-alpha 11) +(def-tex comb-pre-metal-fade-plain raila-alpha 12) +(def-tex rail-base-mid-01 raila-tfrag 0) +(def-tex rail-light-red raila-tfrag 1) +(def-tex rail-pipe-01 raila-tfrag 2) +(def-tex rail-edge-01 raila-tfrag 3) +(def-tex rail-pipe-03 raila-tfrag 4) +(def-tex rail-cord-01 raila-tfrag 5) +(def-tex comb-redmarker raila-tfrag 6) +(def-tex rail-gray-metal-01 raila-tfrag 7) +(def-tex rail-pipe-02 raila-tfrag 8) +(def-tex rail-pipe-05 raila-tfrag 9) +(def-tex hud-torn-head-01 lctypalt-minimap 0) +(def-tex hud-target-reticle lblowcst-minimap 1) +(def-tex wascity-turret-hud-big-arrow-01 lblowcst-minimap 2) +(def-tex hud-target-box-01 lblowcst-minimap 3) +(def-tex hud-vehicle-health-bar-01 lblowcst-minimap 4) +(def-tex hud-target-reticle-fancy-01 lblowcst-minimap 5) +(def-tex hud-target-reticle-fancy-02 lblowcst-minimap 6) +(def-tex hud-torn-head-01 lblowcst-minimap 7) +(def-tex bam-eyelight lctyass-pris 0) +(def-tex bombot-darkgrey-01 lctyass-pris 1) +(def-tex bombot-darkgrey-02 lctyass-pris 2) +(def-tex bombot-gearsides lctyass-pris 3) +(def-tex bombot-greybarrelend lctyass-pris 4) +(def-tex bombot-greybarrelside lctyass-pris 5) +(def-tex bombot-guards lctyass-pris 6) +(def-tex bombot-guntop lctyass-pris 7) +(def-tex bombot-insidegun lctyass-pris 8) +(def-tex bombot-joint lctyass-pris 9) +(def-tex bombot-lens lctyass-pris 10) +(def-tex bombot-post01 lctyass-pris 11) +(def-tex bombot-rail01 lctyass-pris 12) +(def-tex bombot-redplate-01 lctyass-pris 13) +(def-tex bombot-rimgrey lctyass-pris 14) +(def-tex bombot-roundend lctyass-pris 15) +(def-tex bombot-turret01 lctyass-pris 16) +(def-tex bombot-wheel lctyass-pris 17) +(def-tex environment-oldmetal lctyass-pris 18) +(def-tex cguard1-backmetal lctyass-pris 19) +(def-tex cguard1-guntube lctyass-pris 20) +(def-tex kg-grunt-cable-01 lctyass-pris 21) +(def-tex kg-grunt-rim-03 lctyass-pris 22) +(def-tex roboguard-headshield lctyass-pris 23) +(def-tex bam-hairhilite lctyass-pris 24) +(def-tex citfat-hairflat lctyass-pris 25) +(def-tex citn-1-pants lctyass-pris 26) +(def-tex citn-allbuckel lctyass-pris 27) +(def-tex citn-alleyebrow lctyass-pris 28) +(def-tex citn-allflesh lctyass-pris 29) +(def-tex citn-alllcotton lctyass-pris 30) +(def-tex citn-alllcotton-wrinkled lctyass-pris 31) +(def-tex citn-allleather lctyass-pris 32) +(def-tex citn-allleather-edge lctyass-pris 33) +(def-tex citn-allleather-shoulder lctyass-pris 34) +(def-tex citn-allleatherstrap lctyass-pris 35) +(def-tex citn-allleatherwrinkled lctyass-pris 36) +(def-tex citn-allleye lctyass-pris 37) +(def-tex citn-allshoebottom lctyass-pris 38) +(def-tex citn-allsuede lctyass-pris 39) +(def-tex widow-bomb lctyass-pris 40) +(def-tex widow-bomb-glow lctyass-pris 41) +(def-tex widow-bomb-thrust lctyass-pris 42) +(def-tex wstd-torchbowl-coal-01 templed-vis-shrub 0) +(def-tex temple_sandstone_ground01 templed-vis-shrub 1) +(def-tex dust-sparkle factorya-sprite 0) +(def-tex fan-blade factorya-sprite 1) +(def-tex ceiling-dust waspala-sprite 0) +(def-tex dust-sparkle waspala-sprite 1) +(def-tex ecocreature-teeth deswalk-vis-water 2) +(def-tex gun-cita-front-01 lgunnorm-pris 0) +(def-tex gun-citb-front-01 lgunnorm-pris 1) +(def-tex gun-citc-front-01 lgunnorm-pris 2) +(def-tex gun-citd-front-01 lgunnorm-pris 3) +(def-tex gun-dummy-side-a-01 lgunnorm-pris 4) +(def-tex kg-target-01 lgunnorm-pris 5) +(def-tex kg-target-b-front-01 lgunnorm-pris 6) +(def-tex kg-target-blasted-01 lgunnorm-pris 7) +(def-tex kg-target-bonus-01 lgunnorm-pris 8) +(def-tex kg-target-d-front lgunnorm-pris 9) +(def-tex kg-target-gun-01 lgunnorm-pris 10) +(def-tex kg-target-gun-02 lgunnorm-pris 11) +(def-tex kg-target-gun-04 lgunnorm-pris 12) +(def-tex kg-target-gun-05 lgunnorm-pris 13) +(def-tex kg-target-side-01 lgunnorm-pris 14) +(def-tex bomb-target-01 lgunnorm-pris 15) +(def-tex kg-target-c-front lgunnorm-pris 16) +(def-tex mhcityb-base-goo-01 lmhcityb-vis-tfrag 0) +(def-tex mhcityb-base-goo-01-dest lmhcityb-vis-tfrag 1) +(def-tex mhcitya-base-goo-01 lmhcitya-vis-tfrag 0) +(def-tex mhcitya-base-goo-01-dest lmhcitya-vis-tfrag 1) +(def-tex mhcity-de-tower-puff-01 lctydest-tfrag 0) +(def-tex mhcity-grunt-egg-rim-01 lctydest-tfrag 1) +(def-tex mhcity-grunt-egg-gem-01 lctydest-tfrag 2) +(def-tex mhcity-grunt-egg-03 lctydest-tfrag 3) +(def-tex mhcity-vein-01 lctydest-tfrag 4) +(def-tex mhcity-building-base-01 lctydest-tfrag 5) +(def-tex mhcity-goo-base lctydest-tfrag 6) +(def-tex mhcity-mektunnel lctydest-tfrag 7) +(def-tex mhcity-grind-strand-01 lctydest-tfrag 8) +(def-tex cityslumc-awning-LOW lfreeout-tfrag 0) +(def-tex city-tile-LOW lfreeout-tfrag 1) +(def-tex ctyslumc-window-panes-LOW lfreeout-tfrag 2) +(def-tex ctyslumc-wall-trim-LOW lfreeout-tfrag 3) +(def-tex cityslumc-purple-column lfreeout-tfrag 4) +(def-tex ctyslumc-light-blue lfreeout-tfrag 5) +(def-tex cityslumc-purple-plain lfreeout-tfrag 6) +(def-tex citywide-wall-mainmetal lfreeout-tfrag 7) +(def-tex citywide-wall-frame lfreeout-tfrag 8) +(def-tex citywide-wall-orange-plain lfreeout-tfrag 9) +(def-tex citywide-wall-boltedmetal lfreeout-tfrag 10) +(def-tex citywide-wall-greybolts lfreeout-tfrag 11) +(def-tex citywide-palace-support-03 lfreeout-tfrag 12) +(def-tex pow-pow-ring-red-01 powergd-water 0) +(def-tex pow-pow-ring-red-02 powergd-water 1) +(def-tex pow-pow-ring-red-03 powergd-water 2) +(def-tex pow-pow-ring-red-04 powergd-water 3) +(def-tex pow-pow-ring-red-05 powergd-water 4) +(def-tex pow-pow-ring-red-06 powergd-water 5) +(def-tex pow-pow-ring-red-07 powergd-water 6) +(def-tex grunt-vector-trail-01 powergd-water 7) +(def-tex kg-target-c-forcefield-01-dest lgunnorm-water 0) +(def-tex kg-target-c-forcefield-01 lgunnorm-water 1) +(def-tex gun-clank-target-01 lgunrnc-pris 0) +(def-tex gun-ratchet-target-01 lgunrnc-pris 1) +(def-tex kg-target-side-01 lgunrnc-pris 2) +(def-tex rc-mnstr-target-01 lgunrnc-pris 3) +(def-tex rc-mnstr-target-02 lgunrnc-pris 4) +(def-tex rc-mnstr-target-03 lgunrnc-pris 5) +(def-tex rc-mnstr-target-04 lgunrnc-pris 6) +(def-tex rc-mnstr-target-03-silver lgunrnc-pris 7) +(def-tex terraformer-cpitwindows-01 desboss1-water 0) +(def-tex terraformer-cpitwindows-02 desboss1-water 1) +(def-tex terraformer-bodyside-bottom desboss2-pris2 0) +(def-tex terraformer-bodyside-top desboss2-pris2 1) +(def-tex terraformer-footpipes-01 desboss2-pris2 2) +(def-tex terraformer-metal-01 desboss2-pris2 3) +(def-tex terraformer-metal-02 desboss2-pris2 4) +(def-tex terraformer-metal-03 desboss2-pris2 5) +(def-tex terraformer-metal-04 desboss2-pris2 6) +(def-tex terraformer-metal-05 desboss2-pris2 7) +(def-tex terraformer-metal-07 desboss2-pris2 8) +(def-tex terraformer-metal-08 desboss2-pris2 9) +(def-tex terraformer-metal-09 desboss2-pris2 10) +(def-tex terraformer-metal-10 desboss2-pris2 11) +(def-tex terraformer-metal-11 desboss2-pris2 12) +(def-tex terraformer-minestrips-01 desboss2-pris2 13) +(def-tex terraformer-organic-01 desboss2-pris2 14) +(def-tex terraformer-organic-02 desboss2-pris2 15) +(def-tex terraformer-organic-03 desboss2-pris2 16) +(def-tex terraformer-organic-04 desboss2-pris2 17) +(def-tex terraformer-organic-05 desboss2-pris2 18) +(def-tex terraformer-tank-01 desboss2-pris2 19) +(def-tex terraformer-bluelight desboss2-pris2 20) +(def-tex terraformer-bodyside-bottom desboss1-pris2 0) +(def-tex terraformer-bodyside-top desboss1-pris2 1) +(def-tex terraformer-footpipes-01 desboss1-pris2 2) +(def-tex terraformer-metal-01 desboss1-pris2 3) +(def-tex terraformer-metal-02 desboss1-pris2 4) +(def-tex terraformer-metal-03 desboss1-pris2 5) +(def-tex terraformer-metal-04 desboss1-pris2 6) +(def-tex terraformer-metal-05 desboss1-pris2 7) +(def-tex terraformer-metal-07 desboss1-pris2 8) +(def-tex terraformer-metal-08 desboss1-pris2 9) +(def-tex terraformer-metal-09 desboss1-pris2 10) +(def-tex terraformer-metal-10 desboss1-pris2 11) +(def-tex terraformer-metal-11 desboss1-pris2 12) +(def-tex terraformer-minestrips-01 desboss1-pris2 13) +(def-tex terraformer-organic-01 desboss1-pris2 14) +(def-tex terraformer-organic-02 desboss1-pris2 15) +(def-tex terraformer-organic-03 desboss1-pris2 16) +(def-tex terraformer-organic-04 desboss1-pris2 17) +(def-tex terraformer-organic-05 desboss1-pris2 18) +(def-tex terraformer-tank-01 desboss1-pris2 19) +(def-tex terraformer-bluelight desboss1-pris2 20) +(def-tex bam-eyelight deserrol-pris 0) +(def-tex bam-hairhilite deserrol-pris 1) +(def-tex environment-oldmetal deserrol-pris 2) +(def-tex errocyber-eye deserrol-pris 3) +(def-tex errocyber-eyelid deserrol-pris 4) +(def-tex errocyber-faceflesh deserrol-pris 5) +(def-tex errolcyber-bighand-01 deserrol-pris 6) +(def-tex errolcyber-bigshoulder deserrol-pris 7) +(def-tex errolcyber-bluedome deserrol-pris 8) +(def-tex errolcyber-bluemetal-01 deserrol-pris 9) +(def-tex errolcyber-bluewrap deserrol-pris 10) +(def-tex errolcyber-chestplate deserrol-pris 11) +(def-tex errolcyber-dirtymetal deserrol-pris 12) +(def-tex errolcyber-earcup deserrol-pris 13) +(def-tex errolcyber-fingers deserrol-pris 14) +(def-tex errolcyber-glovepalm deserrol-pris 15) +(def-tex errolcyber-greyknobs deserrol-pris 16) +(def-tex errolcyber-greymetal deserrol-pris 17) +(def-tex errolcyber-greymetal-02 deserrol-pris 18) +(def-tex errolcyber-hair deserrol-pris 19) +(def-tex errolcyber-head-01 deserrol-pris 20) +(def-tex errolcyber-head-02 deserrol-pris 21) +(def-tex errolcyber-insidemouth deserrol-pris 22) +(def-tex errolcyber-insidewires deserrol-pris 23) +(def-tex errolcyber-jointpipe deserrol-pris 24) +(def-tex errolcyber-metaleyelid deserrol-pris 25) +(def-tex errolcyber-metalgold deserrol-pris 26) +(def-tex errolcyber-pipes-01 deserrol-pris 27) +(def-tex errolcyber-pipes-02 deserrol-pris 28) +(def-tex errolcyber-pipes-03 deserrol-pris 29) +(def-tex errolcyber-redmetal-01 deserrol-pris 30) +(def-tex errolcyber-redmetal-02 deserrol-pris 31) +(def-tex errolcyber-redmetal-03 deserrol-pris 32) +(def-tex errolcyber-roboeye deserrol-pris 33) +(def-tex errolcyber-rubberpipe deserrol-pris 34) +(def-tex errolcyber-rubberpipe-light deserrol-pris 35) +(def-tex errolcyber-spine deserrol-pris 36) +(def-tex errolcyber-teeth deserrol-pris 37) +(def-tex errolcyber-lens deserrol-water 0) +(def-tex whack-scoreboard-0 powergd-sprite 0) +(def-tex whack-scoreboard-1 powergd-sprite 1) +(def-tex whack-scoreboard-2 powergd-sprite 2) +(def-tex whack-scoreboard-3 powergd-sprite 3) +(def-tex whack-scoreboard-4 powergd-sprite 4) +(def-tex whack-scoreboard-5 powergd-sprite 5) +(def-tex whack-scoreboard-6 powergd-sprite 6) +(def-tex whack-scoreboard-7 powergd-sprite 7) +(def-tex whack-scoreboard-8 powergd-sprite 8) +(def-tex whack-scoreboard-9 powergd-sprite 9) +(def-tex time-bubble-orbiter powergd-sprite 10) +(def-tex hud-marauder-vehicle deschase-minimap 0) +(def-tex hud-gladiator deschase-minimap 1) +(def-tex terraformer-bodyside-bottom precurd-vis-pris2 0) +(def-tex terraformer-bodyside-top precurd-vis-pris2 1) +(def-tex terraformer-footpipes-01 precurd-vis-pris2 2) +(def-tex terraformer-metal-01 precurd-vis-pris2 3) +(def-tex terraformer-metal-02 precurd-vis-pris2 4) +(def-tex terraformer-metal-03 precurd-vis-pris2 5) +(def-tex terraformer-metal-04 precurd-vis-pris2 6) +(def-tex terraformer-metal-05 precurd-vis-pris2 7) +(def-tex terraformer-metal-07 precurd-vis-pris2 8) +(def-tex terraformer-metal-08 precurd-vis-pris2 9) +(def-tex terraformer-metal-09 precurd-vis-pris2 10) +(def-tex terraformer-metal-10 precurd-vis-pris2 11) +(def-tex terraformer-metal-11 precurd-vis-pris2 12) +(def-tex terraformer-minestrips-01 precurd-vis-pris2 13) +(def-tex terraformer-organic-01 precurd-vis-pris2 14) +(def-tex terraformer-organic-02 precurd-vis-pris2 15) +(def-tex terraformer-organic-03 precurd-vis-pris2 16) +(def-tex terraformer-organic-04 precurd-vis-pris2 17) +(def-tex terraformer-organic-05 precurd-vis-pris2 18) +(def-tex terraformer-tank-01 precurd-vis-pris2 19) +(def-tex terraformer-bluelight precurd-vis-pris2 20) +(def-tex hud-darkeco-tower-egg lctydest-minimap 0) +(def-tex cty-roboscreen-dest foresta-warp 0) +(def-tex artifact-dec-01 deschase-tfrag 0) +(def-tex artifact-blue-glow-01 deschase-tfrag 1) +(def-tex artifact-plain-01 deschase-tfrag 2) +(def-tex wascitya-airlock-metal-bits desjump-tfrag 0) +(def-tex wascity-metal-dirty desjump-tfrag 1) +(def-tex wascity-outerwall-metal-c desjump-tfrag 2) +(def-tex wascity-metal-door-01 desjump-tfrag 3) +(def-tex wascitya-airlock-door desjump-tfrag 4) +(def-tex tow-baserock towercst-tfrag 0) +(def-tex tow-wall-supports towercst-tfrag 1) +(def-tex tow-eggpod-01 towercst-tfrag 2) +(def-tex tow-groundpod towercst-tfrag 3) +(def-tex tow-basebone-01 towercst-tfrag 4) +(def-tex tow-blackhole towercst-tfrag 5) +(def-tex tow-egg-group-base towercst-tfrag 6) +(def-tex tow-eggtop-01 towercst-tfrag 7) +(def-tex mhcity-skin-ground-01 towercst-tfrag 8) +(def-tex tow-eggside-01 towercst-tfrag 9) +(def-tex tow-pupeyes-01 towercst-tfrag 10) +(def-tex tow-pup-skin-01 towercst-tfrag 11) +(def-tex tow-pup-metal-01 towercst-tfrag 12) +(def-tex tow-pup-detail-01 towercst-tfrag 13) +(def-tex tow-base-ground towercst-tfrag 14) +(def-tex tow-plat-side towercst-tfrag 15) +(def-tex rail-env-wall-01 towercst-tfrag 16) +(def-tex tow-wall-tentacle-02 towercst-tfrag 17) +(def-tex tow-wall-supports towercst-shrub 0) +(def-tex tow-groundpod towercst-shrub 1) +(def-tex tow-eggside-01 towercst-shrub 2) +(def-tex tow-eggcase-01 towercst-alpha 0) +(def-tex tow-eggtop-01 towercst-alpha 1) +(def-tex tow-eggside-01 towercst-alpha 2) +(def-tex preship-glass-01 temp-shrub 1) +(def-tex preship-metal-window-01 temp-shrub 2) +(def-tex preship-blue-window-blue-02 temp-shrub 3) +(def-tex preship-blue-window-glue temp-shrub 4) +(def-tex preship-blue-thruster temp-shrub 5) +(def-tex preship-window-strip-01 temp-shrub 6) +(def-tex preship-metal-hull-03 temp-shrub 7) +(def-tex preship-metal-hull-01 temp-shrub 8) +(def-tex preship-metal-edge-03 temp-shrub 9) +(def-tex preship-metal-trim-03 temp-shrub 10) +(def-tex preship-metal-ring-top temp-shrub 11) +(def-tex preship-metal-edge-01 temp-shrub 12) +(def-tex preship-metal-edge-02 temp-shrub 13) +(def-tex preship-metal-trim-01 temp-shrub 14) +(def-tex preship-metal-trim-02 temp-shrub 15) +(def-tex preship-metal-hull-02 temp-shrub 16) +(def-tex stadiumb-hud-booster-off-01 lpattack-minimap 1) +(def-tex stadiumb-hud-booster-on-01 lpattack-minimap 2) +(def-tex hud-small-vehicle-health-bar-01 lpattack-minimap 3) +(def-tex hud-turbo-boost-off-01 lpattack-minimap 4) +(def-tex hud-turbo-boost-on-01 lpattack-minimap 5) +(def-tex hud-turbo-boost-rim-01 lpattack-minimap 6) +(def-tex mech-flame ltowera-sprite 0) +(def-tex mech-flame lformach-sprite 0) +(def-tex mech-flame lpattack-sprite 0) +(def-tex mech-flame lprecurc-sprite 0) +(def-tex common-black lpattack-vis-pris 1) +(def-tex common-transparent lpattack-vis-pris 2) +(def-tex dp-bipedal-backhand-01 lpattack-vis-pris 3) +(def-tex dp-bipedal-chest-01 lpattack-vis-pris 4) +(def-tex dp-bipedal-dk-hose-01 lpattack-vis-pris 5) +(def-tex dp-bipedal-dk-plate-01 lpattack-vis-pris 6) +(def-tex dp-bipedal-dk-plate-02 lpattack-vis-pris 7) +(def-tex dp-bipedal-dk-plate-03 lpattack-vis-pris 8) +(def-tex dp-bipedal-dk-plate-04 lpattack-vis-pris 9) +(def-tex dp-bipedal-dk-sm-plate-01 lpattack-vis-pris 10) +(def-tex dp-bipedal-dk-stomach-plate-01 lpattack-vis-pris 11) +(def-tex dp-bipedal-eye-01 lpattack-vis-pris 12) +(def-tex dp-bipedal-finger-plate-01 lpattack-vis-pris 13) +(def-tex dp-bipedal-nose-01 lpattack-vis-pris 14) +(def-tex dp-bipedal-power-hose lpattack-vis-pris 15) +(def-tex dp-bipedal-skin-bulge-01 lpattack-vis-pris 16) +(def-tex dp-bipedal-skin-bulge-02 lpattack-vis-pris 17) +(def-tex dp-bipedal-skin-plate-01 lpattack-vis-pris 18) +(def-tex dp-bipedal-skin-plate-small-01 lpattack-vis-pris 19) +(def-tex dp-bipedal-skin-ribs-01 lpattack-vis-pris 20) +(def-tex dp-bipedal-spine-01 lpattack-vis-pris 21) +(def-tex dp-bipedal-toe-01 lpattack-vis-pris 22) +(def-tex environment-darkprec lpattack-vis-pris 23) +(def-tex intcept-tread01 lpattack-vis-pris 25) +(def-tex king-iris lpattack-vis-pris 40) +(def-tex rhino-front-01 lpattack-vis-pris 53) +(def-tex rhino-front-02 lpattack-vis-pris 54) +(def-tex rhino-horn-01 lpattack-vis-pris 55) +(def-tex rhino-horn-02 lpattack-vis-pris 56) +(def-tex rhino-metal-01 lpattack-vis-pris 57) +(def-tex rhino-rag-01 lpattack-vis-pris 58) +(def-tex rhino-scoop-01 lpattack-vis-pris 59) +(def-tex rhino-wheel-01 lpattack-vis-pris 60) +(def-tex vehicle-brace-pipe-01 lpattack-vis-pris 61) +(def-tex vehicle-cap-pin-01 lpattack-vis-pris 62) +(def-tex vehicle-chrome-pipe-01 lpattack-vis-pris 63) +(def-tex vehicle-cushion-01 lpattack-vis-pris 64) +(def-tex vehicle-exhaust-pipe-01 lpattack-vis-pris 65) +(def-tex vehicle-gas-tank-01 lpattack-vis-pris 66) +(def-tex vehicle-gun-box-01 lpattack-vis-pris 67) +(def-tex vehicle-pipe-01 lpattack-vis-pris 68) +(def-tex vehicle-wheel-01 lpattack-vis-pris 69) +(def-tex vehicle-wire-01 lpattack-vis-pris 70) +(def-tex neo-wasp-base lpattack-vis-pris 71) +(def-tex neo-wasp-body lpattack-vis-pris 72) +(def-tex neo-wasp-brown lpattack-vis-pris 73) +(def-tex neo-wasp-dark-brown lpattack-vis-pris 74) +(def-tex neo-wasp-eye lpattack-vis-pris 75) +(def-tex tread-interceptor-rhino lpattack-vis-pris 76) +(def-tex king-arm-small lpattack-vis-pris 77) +(def-tex king-blackskirt2-small lpattack-vis-pris 78) +(def-tex king-bolt-small lpattack-vis-pris 79) +(def-tex king-chest-small lpattack-vis-pris 80) +(def-tex king-clip-02-small lpattack-vis-pris 81) +(def-tex king-ear-small lpattack-vis-pris 82) +(def-tex king-earing-small lpattack-vis-pris 83) +(def-tex king-face-01-small lpattack-vis-pris 84) +(def-tex king-finger-small lpattack-vis-pris 85) +(def-tex king-greenmetal-small lpattack-vis-pris 86) +(def-tex king-greenmetalplain-small lpattack-vis-pris 87) +(def-tex king-hair-small lpattack-vis-pris 88) +(def-tex king-hand-small lpattack-vis-pris 89) +(def-tex king-horn-small lpattack-vis-pris 90) +(def-tex king-leg-small lpattack-vis-pris 91) +(def-tex king-lgblackstrap-small lpattack-vis-pris 92) +(def-tex king-precursermetal-plain-small lpattack-vis-pris 93) +(def-tex king-precursermetal-trim2-small lpattack-vis-pris 94) +(def-tex king-precursermetal-trimbolt-small lpattack-vis-pris 95) +(def-tex king-shoebottom-small lpattack-vis-pris 96) +(def-tex king-skirt-small lpattack-vis-pris 97) +(def-tex king-thinstrap-small lpattack-vis-pris 98) +(def-tex king-vest-small lpattack-vis-pris 99) +(def-tex king-vestback-small lpattack-vis-pris 100) +(def-tex king-wrap-small lpattack-vis-pris 101) +(def-tex king-wristband-small lpattack-vis-pris 102) +(def-tex kg-rob-trans-tank-01 lctyprot-water 0) +(def-tex kg-rob-target-01 lctyprot-sprite 0) +(def-tex bam-eyelight loninsim-pris 0) +(def-tex bam-hairhilite loninsim-pris 1) +(def-tex environment-oldmetal loninsim-pris 2) +(def-tex onin-arm loninsim-pris 3) +(def-tex onin-bowlhead loninsim-pris 4) +(def-tex onin-braclet loninsim-pris 5) +(def-tex onin-chain loninsim-pris 6) +(def-tex onin-eye loninsim-pris 7) +(def-tex onin-eyelid loninsim-pris 8) +(def-tex onin-face loninsim-pris 9) +(def-tex onin-finger loninsim-pris 10) +(def-tex onin-hair loninsim-pris 11) +(def-tex onin-hand loninsim-pris 12) +(def-tex onin-handpalm loninsim-pris 13) +(def-tex onin-idol loninsim-pris 14) +(def-tex onin-idoleye loninsim-pris 15) +(def-tex onin-mat loninsim-pris 16) +(def-tex onin-neck loninsim-pris 17) +(def-tex onin-rings loninsim-pris 18) +(def-tex onin-rings2 loninsim-pris 19) +(def-tex onin-scarf loninsim-pris 20) +(def-tex onin-shirt loninsim-pris 21) +(def-tex onin-skirt loninsim-pris 22) +(def-tex onin-teeth loninsim-pris 23) +(def-tex onin-toe loninsim-pris 24) +(def-tex bam-eyelight loutro3-pris 0) +(def-tex bam-hairhilite loutro3-pris 1) +(def-tex environment-oldmetal loutro3-pris 2) +(def-tex onin-arm loutro3-pris 3) +(def-tex onin-bowlhead loutro3-pris 4) +(def-tex onin-braclet loutro3-pris 5) +(def-tex onin-chain loutro3-pris 6) +(def-tex onin-eye loutro3-pris 7) +(def-tex onin-eyelid loutro3-pris 8) +(def-tex onin-face loutro3-pris 9) +(def-tex onin-finger loutro3-pris 10) +(def-tex onin-hair loutro3-pris 11) +(def-tex onin-hand loutro3-pris 12) +(def-tex onin-handpalm loutro3-pris 13) +(def-tex onin-idol loutro3-pris 14) +(def-tex onin-idoleye loutro3-pris 15) +(def-tex onin-mat loutro3-pris 16) +(def-tex onin-neck loutro3-pris 17) +(def-tex onin-rings loutro3-pris 18) +(def-tex onin-rings2 loutro3-pris 19) +(def-tex onin-scarf loutro3-pris 20) +(def-tex onin-shirt loutro3-pris 21) +(def-tex onin-skirt loutro3-pris 22) +(def-tex onin-teeth loutro3-pris 23) +(def-tex onin-toe loutro3-pris 24) +(def-tex preship-metal-hull-03 loutro3-shrub 0) +(def-tex bt-wasp-flame lblowcst-sprite 0) +(def-tex explosion-wave factoryc-sprite 0) +(def-tex flamingstick factoryc-sprite 1) +(def-tex dm-mspider-pipe lppatrol-vis-pris 0) +(def-tex dm-mspider-plate-01 lppatrol-vis-pris 1) +(def-tex dm-mspider-purplesac lppatrol-vis-pris 2) +(def-tex dm-mspider-tubes-01 lppatrol-vis-pris 3) +(def-tex environment-darkprec lppatrol-vis-pris 4) +(def-tex dm_mine-spider-spawn lppatrol-vis-pris 5) +(def-tex dm_mine-spider-spawn-hole lppatrol-vis-pris 6) +(def-tex dm_mine-spider-spawn-small-tube lppatrol-vis-pris 7) +(def-tex grunt-eye-01 lppatrol-vis-pris 8) +(def-tex grunt-hose lppatrol-vis-pris 9) +(def-tex grunt-metal-01 lppatrol-vis-pris 10) +(def-tex grunt-skin-01 lppatrol-vis-pris 11) +(def-tex grunt-skin-02 lppatrol-vis-pris 12) +(def-tex grunt-skin-03 lppatrol-vis-pris 13) +(def-tex grunt-gem-01 lppatrol-vis-pris 14) +(def-tex grunt-teeth-01 lppatrol-vis-pris 15) +(def-tex environment-darkprec lppatrol-vis-tfrag 0) +(def-tex dk-eco-vent-glow-01 lppatrol-vis-tfrag 1) +(def-tex dk-eco-vent-side-01 lppatrol-vis-tfrag 2) +(def-tex lt-eco-vent-blue-01 lppatrol-vis-tfrag 3) +(def-tex lt-eco-vent-side-01 lppatrol-vis-tfrag 4) +(def-tex rub-statue-stone-01 lppatrol-vis-tfrag 5) +(def-tex rub-rubble-01 lppatrol-vis-tfrag 6) +(def-tex facb_redmetal-d-03 lfacout-vis-tfrag 0) +(def-tex facb_redmetal-01 lfacout-vis-tfrag 1) +(def-tex facb_redmetal-02 lfacout-vis-tfrag 2) +(def-tex fac-tower-base-03 lfacout-vis-tfrag 3) +(def-tex facb-big-metal-panl04 lfacout-vis-tfrag 4) +(def-tex fac-tower-base-02 lfacout-vis-tfrag 5) +(def-tex facb_temp_dark lfacout-vis-tfrag 6) +(def-tex fac-tower-base-rim-04 lfacout-vis-tfrag 7) +(def-tex fac-tower-panel-01 lfacout-vis-tfrag 8) +(def-tex common-black lfacout-vis-tfrag 9) +(def-tex facb_blue-metal-03 lfacout-vis-tfrag 10) +(def-tex fac-tower-base-rim-02 lfacout-vis-tfrag 11) +(def-tex fac-tower-base-rim-03 lfacout-vis-tfrag 12) +(def-tex facb_redmetal-d-01b lfacout-vis-tfrag 13) +(def-tex facb-bigpipe-01 lfacout-vis-tfrag 14) +(def-tex facb-big-metal-panl02 lfacout-vis-tfrag 15) +(def-tex fac-tower-door-01 lfacout-vis-tfrag 16) +(def-tex facb-light-01 lfacout-vis-tfrag 17) +(def-tex fac-tower-pipe-01 lfacout-vis-tfrag 18) +(def-tex facb_blue-metal-02 lfacout-vis-tfrag 19) +(def-tex facb_dec-metal-03 lfacout-vis-tfrag 20) +(def-tex facb_redmetal-d-02 lfacout-vis-tfrag 21) +(def-tex facb-beam01 lfacout-vis-tfrag 22) +(def-tex fac-tower-door-03 lfacout-vis-tfrag 23) +(def-tex fac-tower-08 lfacout-vis-tfrag 24) +(def-tex fac-tower-door-02 lfacout-vis-tfrag 25) +(def-tex facb-big-metal-panl01 lfacout-vis-tfrag 26) +(def-tex facb_dec-metal-01 lfacout-vis-tfrag 27) +(def-tex facb-spotlight lfacout-vis-tfrag 28) +(def-tex facb-metal-grill-01 lfacout-vis-tfrag 29) +(def-tex facb_redmetal-d-01 lfacout-vis-tfrag 30) +(def-tex fac-tower-pipe-03 lfacout-vis-tfrag 31) +(def-tex fac-tower-01 lfacout-vis-tfrag 32) +(def-tex facb_dec-metal-02 lfacout-vis-tfrag 33) +(def-tex facb_redmetal-03 lfacout-vis-tfrag 34) +(def-tex facb_bluewindow_selfilluminated lfacout-vis-tfrag 35) +(def-tex fac-tower-base-04 lfacout-vis-tfrag 36) +(def-tex fac-tower-06 lfacout-vis-tfrag 37) +(def-tex fac-tower-02-hitweak lfacout-vis-tfrag 38) +(def-tex facb-bridgelights-01 lfacout-vis-alpha 0) +(def-tex facb-roadmarkings-01 lfacout-vis-alpha 1) +(def-tex bam-eyelight museum-pris 0) +(def-tex bam-hairhilite museum-pris 1) +(def-tex environment-oldmetal museum-pris 2) +(def-tex jakc-armor museum-pris 30) +(def-tex jakc-chestplate-straps museum-pris 31) +(def-tex jakc-gogglemetal museum-pris 32) +(def-tex jakc-lens museum-pris 33) +(def-tex jakc-scarf museum-pris 34) +(def-tex jakc-scarfhanging museum-pris 35) +(def-tex jakc-skirt museum-pris 36) +(def-tex jakc-waistband2 museum-pris 37) +(def-tex jakc-wraps museum-pris 38) +(def-tex jakc-wristband-a2 museum-pris 39) +(def-tex jakchires-arm museum-pris 40) +(def-tex jakchires-blackstrap museum-pris 41) +(def-tex jakchires-brownstrap museum-pris 42) +(def-tex jakchires-brwnleather museum-pris 43) +(def-tex jakchires-chestplate museum-pris 44) +(def-tex jakchires-clips museum-pris 45) +(def-tex jakchires-eye museum-pris 46) +(def-tex jakchires-eyebrow museum-pris 47) +(def-tex jakchires-eyelid museum-pris 48) +(def-tex jakchires-facelft museum-pris 49) +(def-tex jakchires-facert museum-pris 50) +(def-tex jakchires-glovetop museum-pris 51) +(def-tex jakchires-hair museum-pris 52) +(def-tex jakchires-horn museum-pris 53) +(def-tex jakchires-jacket museum-pris 54) +(def-tex jakchires-leatherpouch museum-pris 55) +(def-tex jakchires-lightbrownspat museum-pris 56) +(def-tex jakchires-pants museum-pris 57) +(def-tex jakchires-precarmor-01 museum-pris 58) +(def-tex jakchires-shoebottom museum-pris 59) +(def-tex jakchires-shoemetal museum-pris 60) +(def-tex jakchires-shoeteop museum-pris 61) +(def-tex jakchires-teeth museum-pris 62) +(def-tex pecker-body-01 museum-pris 63) +(def-tex pecker-eyelid museum-pris 64) +(def-tex pecker-face museum-pris 65) +(def-tex pecker-plume museum-pris 66) +(def-tex pecker-tail museum-pris 67) +(def-tex pecker-teeth museum-pris 68) +(def-tex pecker-wingbottom museum-pris 69) +(def-tex pecker-wingtop museum-pris 70) +(def-tex pecker-yellowfur museum-pris 71) +(def-tex keira-bellylong museum-pris 90) +(def-tex keira-belt museum-pris 91) +(def-tex keira-blackstrap museum-pris 92) +(def-tex keira-brownstraps-new museum-pris 93) +(def-tex keira-chokerhighres museum-pris 94) +(def-tex keira-chokermetal museum-pris 95) +(def-tex keira-eyelid museum-pris 96) +(def-tex keira-face museum-pris 97) +(def-tex keira-glasses museum-pris 98) +(def-tex keira-glovenewlarge museum-pris 99) +(def-tex keira-gogglestrap museum-pris 100) +(def-tex keira-hair-newest museum-pris 101) +(def-tex keira-handbottom museum-pris 102) +(def-tex keira-handtop museum-pris 103) +(def-tex keira-iris-64x64 museum-pris 104) +(def-tex keira-largewraps museum-pris 105) +(def-tex keira-lens-large museum-pris 106) +(def-tex keira-maskbolt museum-pris 107) +(def-tex keira-pantslarge museum-pris 108) +(def-tex keira-shirt museum-pris 109) +(def-tex keira-shoebottom museum-pris 110) +(def-tex keira-torch-guard-01 museum-pris 111) +(def-tex keira-torch-nozzle-01 museum-pris 112) +(def-tex keira-torch-nozzle-02 museum-pris 113) +(def-tex klever-arm museum-pris 114) +(def-tex klever-armor-01 museum-pris 115) +(def-tex klever-armor-02 museum-pris 116) +(def-tex klever-blackstrap museum-pris 117) +(def-tex klever-bolt museum-pris 118) +(def-tex klever-brownstrap museum-pris 119) +(def-tex klever-chest museum-pris 120) +(def-tex klever-clips museum-pris 121) +(def-tex klever-earcup museum-pris 122) +(def-tex klever-eye museum-pris 123) +(def-tex klever-eyelid museum-pris 124) +(def-tex klever-face-01 museum-pris 125) +(def-tex klever-face-01scars museum-pris 126) +(def-tex klever-fingerbottom museum-pris 127) +(def-tex klever-fingertop museum-pris 128) +(def-tex klever-gunmetal-01 museum-pris 129) +(def-tex klever-gunmetal-02 museum-pris 130) +(def-tex klever-gunmetal-03 museum-pris 131) +(def-tex klever-gunmetal-04 museum-pris 132) +(def-tex klever-gunmetal-05 museum-pris 133) +(def-tex klever-hair museum-pris 134) +(def-tex klever-hand museum-pris 135) +(def-tex klever-handwrap museum-pris 136) +(def-tex klever-horn museum-pris 137) +(def-tex klever-mustache museum-pris 138) +(def-tex klever-shoe museum-pris 139) +(def-tex klever-shoebottom museum-pris 140) +(def-tex klever-skirtdark museum-pris 141) +(def-tex klever-skirtlight museum-pris 142) +(def-tex klever-thighs museum-pris 143) +(def-tex klever-undershirt museum-pris 144) +(def-tex klever-widebrownstrap museum-pris 145) +(def-tex onin-arm museum-pris 149) +(def-tex onin-bowlhead museum-pris 150) +(def-tex onin-braclet museum-pris 151) +(def-tex onin-chain museum-pris 152) +(def-tex onin-eye museum-pris 153) +(def-tex onin-eyelid museum-pris 154) +(def-tex onin-face museum-pris 155) +(def-tex onin-finger museum-pris 156) +(def-tex onin-hair museum-pris 157) +(def-tex onin-hand museum-pris 158) +(def-tex onin-handpalm museum-pris 159) +(def-tex onin-idol museum-pris 160) +(def-tex onin-idoleye museum-pris 161) +(def-tex onin-mat museum-pris 162) +(def-tex onin-neck museum-pris 163) +(def-tex onin-rings museum-pris 164) +(def-tex onin-rings2 museum-pris 165) +(def-tex onin-scarf museum-pris 166) +(def-tex onin-shirt museum-pris 167) +(def-tex onin-skirt museum-pris 168) +(def-tex onin-teeth museum-pris 169) +(def-tex onin-toe museum-pris 170) +(def-tex ashelin-beltbuckle museum-pris2 0) +(def-tex ashelin-bolts museum-pris2 1) +(def-tex ashelin-boottop museum-pris2 2) +(def-tex ashelin-brownstrap museum-pris2 3) +(def-tex ashelin-cglogo museum-pris2 4) +(def-tex ashelin-cgrank museum-pris2 5) +(def-tex ashelin-chest museum-pris2 6) +(def-tex ashelin-eye museum-pris2 7) +(def-tex ashelin-eyebrow museum-pris2 8) +(def-tex ashelin-eyelid museum-pris2 9) +(def-tex ashelin-face museum-pris2 10) +(def-tex ashelin-glove museum-pris2 11) +(def-tex ashelin-gunbarrel-01 museum-pris2 12) +(def-tex ashelin-gunbarrel-02 museum-pris2 13) +(def-tex ashelin-gunbarrel-03 museum-pris2 14) +(def-tex ashelin-gunholster museum-pris2 15) +(def-tex ashelin-hair museum-pris2 16) +(def-tex ashelin-handle-01 museum-pris2 17) +(def-tex ashelin-jacketbody museum-pris2 18) +(def-tex ashelin-jacketsleeve museum-pris2 19) +(def-tex ashelin-jacketstraps museum-pris2 20) +(def-tex ashelin-pantstop museum-pris2 21) +(def-tex ashelin-redtop museum-pris2 22) +(def-tex ashelin-shells museum-pris2 23) +(def-tex ashelin-shield museum-pris2 24) +(def-tex ashelin-shoebottom museum-pris2 25) +(def-tex ashelin-shoemetal museum-pris2 26) +(def-tex ashelin-teeth museum-pris2 27) +(def-tex ashelin-whitestrap museum-pris2 28) +(def-tex bam-eyelight museum-pris2 29) +(def-tex bam-hairhilite museum-pris2 30) +(def-tex charHOLD museum-pris2 31) +(def-tex environment-oldmetal museum-pris2 32) +(def-tex torn-armlft museum-pris2 33) +(def-tex torn-armor museum-pris2 34) +(def-tex torn-belt museum-pris2 35) +(def-tex torn-belt2 museum-pris2 36) +(def-tex torn-blademetal museum-pris2 37) +(def-tex torn-ear museum-pris2 38) +(def-tex torn-eye museum-pris2 39) +(def-tex torn-eyelid museum-pris2 40) +(def-tex torn-face museum-pris2 41) +(def-tex torn-face-right museum-pris2 42) +(def-tex torn-finger museum-pris2 43) +(def-tex torn-footleather museum-pris2 44) +(def-tex torn-gunbarrel museum-pris2 45) +(def-tex torn-gunbarrel-02 museum-pris2 46) +(def-tex torn-hair-01 museum-pris2 47) +(def-tex torn-hair-02 museum-pris2 48) +(def-tex torn-handle-01 museum-pris2 49) +(def-tex torn-legshield museum-pris2 50) +(def-tex torn-metal2 museum-pris2 51) +(def-tex torn-mouth museum-pris2 52) +(def-tex torn-pipe museum-pris2 53) +(def-tex torn-scarf museum-pris2 54) +(def-tex torn-shoe museum-pris2 55) +(def-tex torn-shoe-02 museum-pris2 56) +(def-tex torn-teeth-01 museum-pris2 57) +(def-tex torn-vest museum-pris2 58) +(def-tex tess-belly museum-pris2 59) +(def-tex tess-belt museum-pris2 60) +(def-tex tess-belt2 museum-pris2 61) +(def-tex tess-buckle museum-pris2 62) +(def-tex tess-chest museum-pris2 63) +(def-tex tess-emblem museum-pris2 64) +(def-tex tess-eye museum-pris2 65) +(def-tex tess-eyelid museum-pris2 66) +(def-tex tess-face museum-pris2 67) +(def-tex tess-finger museum-pris2 68) +(def-tex tess-glove museum-pris2 69) +(def-tex tess-hair museum-pris2 70) +(def-tex tess-hairband museum-pris2 71) +(def-tex tess-jeans museum-pris2 72) +(def-tex tess-jeansback museum-pris2 73) +(def-tex tess-jeanscuff museum-pris2 74) +(def-tex tess-lowerboot museum-pris2 75) +(def-tex tess-scarf museum-pris2 76) +(def-tex tess-shirt-128 museum-pris2 77) +(def-tex tess-shirtstraps museum-pris2 78) +(def-tex tess-shoebottom museum-pris2 79) +(def-tex tess-shoetop museum-pris2 80) +(def-tex tess-sleeve museum-pris2 81) +(def-tex tess-teeth museum-pris2 82) +(def-tex tess-underwear museum-pris2 83) +(def-tex tess-upperboot museum-pris2 84) +(def-tex samos-arm museum-pris2 85) +(def-tex samos-diaper museum-pris2 86) +(def-tex samos-ear museum-pris2 87) +(def-tex samos-eye museum-pris2 88) +(def-tex samos-eyelid museum-pris2 89) +(def-tex samos-face museum-pris2 90) +(def-tex samos-finger-01 museum-pris2 91) +(def-tex samos-hair museum-pris2 92) +(def-tex samos-helmet museum-pris2 93) +(def-tex samos-leaf museum-pris2 94) +(def-tex samos-lens museum-pris2 95) +(def-tex samos-log-01 museum-pris2 96) +(def-tex samos-log-02 museum-pris2 97) +(def-tex samos-log-03 museum-pris2 98) +(def-tex samos-metal museum-pris2 99) +(def-tex samos-strap museum-pris2 100) +(def-tex samos-teeth2 museum-pris2 101) +(def-tex samos-vest museum-pris2 102) +(def-tex samosbird-beak museum-pris2 103) +(def-tex samosbird-body museum-pris2 104) +(def-tex samosbird-eye museum-pris2 105) +(def-tex samosbird-plume museum-pris2 106) +(def-tex samosbird-wing museum-pris2 107) +(def-tex seem-arm museum-pris2 108) +(def-tex seem-bootbottom museum-pris2 109) +(def-tex seem-bootleg museum-pris2 110) +(def-tex seem-bootlower museum-pris2 111) +(def-tex seem-bootmet museum-pris2 112) +(def-tex seem-boottoe museum-pris2 113) +(def-tex seem-ear museum-pris2 114) +(def-tex seem-eye museum-pris2 115) +(def-tex seem-eyelid museum-pris2 116) +(def-tex seem-face museum-pris2 117) +(def-tex seem-finger museum-pris2 118) +(def-tex seem-hand museum-pris2 119) +(def-tex seem-headgearback museum-pris2 120) +(def-tex seem-headpiecetop museum-pris2 121) +(def-tex seem-pipeend museum-pris2 122) +(def-tex seem-pipes-01 museum-pris2 123) +(def-tex seem-pipes-02 museum-pris2 124) +(def-tex seem-precmetal-chestplate-01 museum-pris2 125) +(def-tex seem-precmetal-edge museum-pris2 126) +(def-tex seem-precmetal-plain museum-pris2 127) +(def-tex seem-skirt museum-pris2 128) +(def-tex seem-skirt-small museum-pris2 129) +(def-tex seem-straps museum-pris2 130) +(def-tex seem-teeth museum-pris2 131) +(def-tex seem-uppertorso museum-pris2 132) +(def-tex bam-eyelight outcast3-pris 0) +(def-tex bam-hairhilite outcast3-pris 1) +(def-tex charHOLD outcast3-pris 2) +(def-tex keira-bellylong outcast3-pris 3) +(def-tex keira-belt outcast3-pris 4) +(def-tex keira-blackstrap outcast3-pris 5) +(def-tex keira-brownstraps-new outcast3-pris 6) +(def-tex keira-chokerhighres outcast3-pris 7) +(def-tex keira-chokermetal outcast3-pris 8) +(def-tex keira-eyelid outcast3-pris 9) +(def-tex keira-face outcast3-pris 10) +(def-tex keira-glasses outcast3-pris 11) +(def-tex keira-glovenewlarge outcast3-pris 12) +(def-tex keira-gogglestrap outcast3-pris 13) +(def-tex keira-hair-newest outcast3-pris 14) +(def-tex keira-handbottom outcast3-pris 15) +(def-tex keira-handtop outcast3-pris 16) +(def-tex keira-iris-64x64 outcast3-pris 17) +(def-tex keira-largewraps outcast3-pris 18) +(def-tex keira-lens-large outcast3-pris 19) +(def-tex keira-maskbolt outcast3-pris 20) +(def-tex keira-pantslarge outcast3-pris 21) +(def-tex keira-shirt outcast3-pris 22) +(def-tex keira-shoebottom outcast3-pris 23) +(def-tex keira-torch-guard-01 outcast3-pris 24) +(def-tex keira-torch-nozzle-01 outcast3-pris 25) +(def-tex keira-torch-nozzle-02 outcast3-pris 26) +(def-tex torn-armlft outcast3-pris 27) +(def-tex torn-armor outcast3-pris 28) +(def-tex torn-belt outcast3-pris 29) +(def-tex torn-belt2 outcast3-pris 30) +(def-tex torn-blademetal outcast3-pris 31) +(def-tex torn-ear outcast3-pris 32) +(def-tex torn-eye outcast3-pris 33) +(def-tex torn-eyelid outcast3-pris 34) +(def-tex torn-face outcast3-pris 35) +(def-tex torn-face-right outcast3-pris 36) +(def-tex torn-finger outcast3-pris 37) +(def-tex torn-footleather outcast3-pris 38) +(def-tex torn-gunbarrel outcast3-pris 39) +(def-tex torn-gunbarrel-02 outcast3-pris 40) +(def-tex torn-hair-01 outcast3-pris 41) +(def-tex torn-hair-02 outcast3-pris 42) +(def-tex torn-handle-01 outcast3-pris 43) +(def-tex torn-legshield outcast3-pris 44) +(def-tex torn-metal2 outcast3-pris 45) +(def-tex torn-mouth outcast3-pris 46) +(def-tex torn-pipe outcast3-pris 47) +(def-tex torn-scarf outcast3-pris 48) +(def-tex torn-shoe outcast3-pris 49) +(def-tex torn-shoe-02 outcast3-pris 50) +(def-tex torn-teeth-01 outcast3-pris 51) +(def-tex torn-vest outcast3-pris 52) +(def-tex keira-mask outcast3-water 0) +(def-tex jakc-scarf deserta-vis-pris 0) +(def-tex keira-mask museum-water 0) +(def-tex bam-eyelight museum2-pris 0) +(def-tex bam-hairhilite museum2-pris 1) +(def-tex daxter-eyelid museum2-pris 2) +(def-tex daxter-orange museum2-pris 3) +(def-tex daxterarm museum2-pris 4) +(def-tex daxterbodyshort-eix museum2-pris 5) +(def-tex daxterear museum2-pris 6) +(def-tex daxterfinger museum2-pris 7) +(def-tex daxterfoot museum2-pris 8) +(def-tex daxterfoot-bottom museum2-pris 9) +(def-tex daxterheadwidenew museum2-pris 10) +(def-tex daxternose museum2-pris 11) +(def-tex daxterteeth museum2-pris 12) +(def-tex environment-oldmetal museum2-pris 13) +(def-tex errocyber-eye museum2-pris 14) +(def-tex errocyber-eyelid museum2-pris 15) +(def-tex errocyber-faceflesh museum2-pris 16) +(def-tex errolcyber-bighand-01 museum2-pris 17) +(def-tex errolcyber-bigshoulder museum2-pris 18) +(def-tex errolcyber-bluedome museum2-pris 19) +(def-tex errolcyber-bluemetal-01 museum2-pris 20) +(def-tex errolcyber-bluewrap museum2-pris 21) +(def-tex errolcyber-chestplate museum2-pris 22) +(def-tex errolcyber-dirtymetal museum2-pris 23) +(def-tex errolcyber-earcup museum2-pris 24) +(def-tex errolcyber-fingers museum2-pris 25) +(def-tex errolcyber-glovepalm museum2-pris 26) +(def-tex errolcyber-greyknobs museum2-pris 27) +(def-tex errolcyber-greymetal museum2-pris 28) +(def-tex errolcyber-greymetal-02 museum2-pris 29) +(def-tex errolcyber-hair museum2-pris 30) +(def-tex errolcyber-head-01 museum2-pris 31) +(def-tex errolcyber-head-02 museum2-pris 32) +(def-tex errolcyber-insidemouth museum2-pris 33) +(def-tex errolcyber-insidewires museum2-pris 34) +(def-tex errolcyber-jointpipe museum2-pris 35) +(def-tex errolcyber-metaleyelid museum2-pris 36) +(def-tex errolcyber-metalgold museum2-pris 37) +(def-tex errolcyber-pipes-01 museum2-pris 38) +(def-tex errolcyber-pipes-02 museum2-pris 39) +(def-tex errolcyber-pipes-03 museum2-pris 40) +(def-tex errolcyber-redmetal-01 museum2-pris 41) +(def-tex errolcyber-redmetal-02 museum2-pris 42) +(def-tex errolcyber-redmetal-03 museum2-pris 43) +(def-tex errolcyber-roboeye museum2-pris 44) +(def-tex errolcyber-rubberpipe museum2-pris 45) +(def-tex errolcyber-rubberpipe-light museum2-pris 46) +(def-tex errolcyber-spine museum2-pris 47) +(def-tex errolcyber-teeth museum2-pris 48) +(def-tex prec-dumb-helmet museum2-pris 49) +(def-tex prec-dumb-pants museum2-pris 50) +(def-tex prec-dumb-shirt museum2-pris 51) +(def-tex prec-dumb-sleeve museum2-pris 52) +(def-tex prec-hand-back museum2-pris 53) +(def-tex prec-handpalm museum2-pris 54) +(def-tex prec-insidemouth museum2-pris 55) +(def-tex prec-leader-arm museum2-pris 56) +(def-tex prec-leader-armband museum2-pris 57) +(def-tex prec-leader-beard museum2-pris 58) +(def-tex prec-leader-belt museum2-pris 59) +(def-tex prec-leader-face2 museum2-pris 60) +(def-tex prec-leader-foreheadshield museum2-pris 61) +(def-tex prec-leader-frontskirt museum2-pris 62) +(def-tex prec-leader-hair museum2-pris 63) +(def-tex prec-leader-headshield museum2-pris 64) +(def-tex prec-leader-pants museum2-pris 65) +(def-tex prec-leader-robe-01 museum2-pris 66) +(def-tex prec-leader-robe-02 museum2-pris 67) +(def-tex prec-leader-shirt museum2-pris 68) +(def-tex prec-leader-wrap museum2-pris 69) +(def-tex prec-neck museum2-pris 70) +(def-tex prec-orblarge museum2-pris 71) +(def-tex prec-orbsmall museum2-pris 72) +(def-tex prec-staff-01 museum2-pris 73) +(def-tex prec-staff-02 museum2-pris 74) +(def-tex prec-surfer-chain museum2-pris 75) +(def-tex prec-surfer-chain-02 museum2-pris 76) +(def-tex prec-surfer-chain-03 museum2-pris 77) +(def-tex prec-surfer-hair museum2-pris 78) +(def-tex prec-surfer-hairshort museum2-pris 79) +(def-tex prec-surfer-pants museum2-pris 80) +(def-tex prec-surfer-sash museum2-pris 81) +(def-tex prec-surfer-shirt museum2-pris 82) +(def-tex prec-surfer-sleeve museum2-pris 83) +(def-tex prec-teeth museum2-pris 84) +(def-tex prec-tess-belt museum2-pris 85) +(def-tex prec-tess-belt2 museum2-pris 86) +(def-tex prec-tess-emblem museum2-pris 87) +(def-tex prec-tess-eye museum2-pris 88) +(def-tex prec-tess-eyelid museum2-pris 89) +(def-tex prec-tess-face museum2-pris 90) +(def-tex prec-tess-glove museum2-pris 91) +(def-tex prec-tess-hair museum2-pris 92) +(def-tex prec-tess-headband museum2-pris 93) +(def-tex prec-tess-necktrans museum2-pris 94) +(def-tex prec-tess-pantsback museum2-pris 95) +(def-tex prec-tess-pantscuff museum2-pris 96) +(def-tex prec-tess-pantsfront museum2-pris 97) +(def-tex prec-tess-scarf museum2-pris 98) +(def-tex prec-tess-shirt museum2-pris 99) +(def-tex prec-tess-shirtstraps museum2-pris 100) +(def-tex prec-tess-sleeve museum2-pris 101) +(def-tex prec-tess-nose museum2-pris 102) +(def-tex daxter-furhilite museum2-pris 103) +(def-tex daxter-pants museum2-pris 104) +(def-tex daxterbolt museum2-pris 105) +(def-tex daxtergoggles museum2-pris 106) +(def-tex daxterhelmetplain museum2-pris 107) +(def-tex daxterlense museum2-pris 108) +(def-tex daxtertuft museum2-pris 109) +(def-tex prec-veger-sleeve museum2-pris 110) +(def-tex bam-eyelight museum2-pris2 0) +(def-tex bam-hairhilite museum2-pris2 1) +(def-tex daxter-eyelid museum2-pris2 2) +(def-tex daxter-furhilite museum2-pris2 3) +(def-tex daxterteeth museum2-pris2 4) +(def-tex environment-oldmetal museum2-pris2 5) +(def-tex jinx-arm museum2-pris2 6) +(def-tex jinx-belt museum2-pris2 7) +(def-tex jinx-blademetal museum2-pris2 8) +(def-tex jinx-boottoe museum2-pris2 9) +(def-tex jinx-boottop museum2-pris2 10) +(def-tex jinx-brownstrap museum2-pris2 11) +(def-tex jinx-brownstrapbolts museum2-pris2 12) +(def-tex jinx-buckles museum2-pris2 13) +(def-tex jinx-cigar museum2-pris2 14) +(def-tex jinx-cigarflame museum2-pris2 15) +(def-tex jinx-eyelid museum2-pris2 16) +(def-tex jinx-face museum2-pris2 17) +(def-tex jinx-finger museum2-pris2 18) +(def-tex jinx-glove museum2-pris2 19) +(def-tex jinx-glovepalm museum2-pris2 20) +(def-tex jinx-hair museum2-pris2 21) +(def-tex jinx-hairtye museum2-pris2 22) +(def-tex jinx-handle museum2-pris2 23) +(def-tex jinx-iris museum2-pris2 24) +(def-tex jinx-kneepad museum2-pris2 25) +(def-tex jinx-pants museum2-pris2 26) +(def-tex jinx-rope-01 museum2-pris2 27) +(def-tex jinx-scarf museum2-pris2 28) +(def-tex jinx-shirt museum2-pris2 29) +(def-tex jinx-shoebottom2 museum2-pris2 30) +(def-tex jinx-singlerope museum2-pris2 31) +(def-tex jinx-teeth museum2-pris2 32) +(def-tex jinx-wraps museum2-pris2 33) +(def-tex king-arm museum2-pris2 34) +(def-tex king-blackskirt2 museum2-pris2 35) +(def-tex king-bluemetal museum2-pris2 36) +(def-tex king-bolt museum2-pris2 37) +(def-tex king-chest museum2-pris2 38) +(def-tex king-clip-02 museum2-pris2 39) +(def-tex king-ear museum2-pris2 40) +(def-tex king-earing museum2-pris2 41) +(def-tex king-face-01 museum2-pris2 42) +(def-tex king-finger museum2-pris2 43) +(def-tex king-greenmetal museum2-pris2 44) +(def-tex king-greenmetalplain museum2-pris2 45) +(def-tex king-hair museum2-pris2 46) +(def-tex king-hand museum2-pris2 47) +(def-tex king-horn museum2-pris2 48) +(def-tex king-iris museum2-pris2 49) +(def-tex king-leg museum2-pris2 50) +(def-tex king-lgblackstrap museum2-pris2 51) +(def-tex king-precursermetal-decor museum2-pris2 52) +(def-tex king-precursermetal-plain museum2-pris2 53) +(def-tex king-precursermetal-trim museum2-pris2 54) +(def-tex king-precursermetal-trim2 museum2-pris2 55) +(def-tex king-precursermetal-trimbolt museum2-pris2 56) +(def-tex king-shoebottom museum2-pris2 57) +(def-tex king-skirt museum2-pris2 58) +(def-tex king-skirt-b museum2-pris2 59) +(def-tex king-teeth museum2-pris2 60) +(def-tex king-thinstrap museum2-pris2 61) +(def-tex king-vest museum2-pris2 62) +(def-tex king-vestback museum2-pris2 63) +(def-tex king-wrap museum2-pris2 64) +(def-tex king-wraps museum2-pris2 65) +(def-tex king-wristband museum2-pris2 66) +(def-tex prec-veger-body museum2-pris2 67) +(def-tex prec-veger-ear museum2-pris2 68) +(def-tex prec-veger-foot museum2-pris2 69) +(def-tex prec-veger-foot-02 museum2-pris2 70) +(def-tex prec-veger-handback museum2-pris2 71) +(def-tex prec-veger-handpalm museum2-pris2 72) +(def-tex prec-veger-leg museum2-pris2 73) +(def-tex prec-veger-mouth museum2-pris2 74) +(def-tex prec-veger-neck museum2-pris2 75) +(def-tex prec-veger-newface museum2-pris2 76) +(def-tex prec-veger-nose museum2-pris2 77) +(def-tex prec-veger-orange museum2-pris2 78) +(def-tex prec-veger-sleeve museum2-pris2 79) +(def-tex prec-veger-spat museum2-pris2 80) +(def-tex prec-veger-vest museum2-pris2 81) +(def-tex veger-coatclips museum2-pris2 82) +(def-tex veger-hair museum2-pris2 83) +(def-tex veger-scarf museum2-pris2 84) +(def-tex charHOLD museum2-pris2 85) +(def-tex sig-belt museum2-pris2 86) +(def-tex sig-eye museum2-pris2 87) +(def-tex sig-eyelid museum2-pris2 88) +(def-tex sig-faceleft museum2-pris2 89) +(def-tex sig-facert museum2-pris2 90) +(def-tex sig-flask museum2-pris2 91) +(def-tex sig-gem-01 museum2-pris2 92) +(def-tex sig-glove museum2-pris2 93) +(def-tex sig-glovetop museum2-pris2 94) +(def-tex sig-gun-01 museum2-pris2 95) +(def-tex sig-gun-02 museum2-pris2 96) +(def-tex sig-gun-03 museum2-pris2 97) +(def-tex sig-gun-04 museum2-pris2 98) +(def-tex sig-gun-05 museum2-pris2 99) +(def-tex sig-headgear museum2-pris2 100) +(def-tex sig-horn museum2-pris2 101) +(def-tex sig-lens museum2-pris2 102) +(def-tex sig-metal-01 museum2-pris2 103) +(def-tex sig-metal-dirty museum2-pris2 104) +(def-tex sig-sac museum2-pris2 105) +(def-tex sig-shoebottom museum2-pris2 106) +(def-tex sig-shoetop museum2-pris2 107) +(def-tex sig-shoulderarmor museum2-pris2 108) +(def-tex sig-skirts museum2-pris2 109) +(def-tex sig-skirts-02 museum2-pris2 110) +(def-tex sig-skirts-03 museum2-pris2 111) +(def-tex sig-undergarments museum2-pris2 112) +(def-tex vin-teeth-01 museum2-pris2 113) +(def-tex veger-bookleather museum2-pris2 114) +(def-tex veger-booksides museum2-pris2 115) +(def-tex veger-bookspine museum2-pris2 116) +(def-tex veger-bootbolt museum2-pris2 117) +(def-tex veger-bootfoot museum2-pris2 118) +(def-tex veger-bootstrap museum2-pris2 119) +(def-tex veger-coat museum2-pris2 120) +(def-tex veger-coatbelt museum2-pris2 121) +(def-tex veger-endpaper museum2-pris2 122) +(def-tex veger-eyelid museum2-pris2 123) +(def-tex veger-face museum2-pris2 124) +(def-tex veger-fingerbottom museum2-pris2 125) +(def-tex veger-fingertop museum2-pris2 126) +(def-tex veger-gold museum2-pris2 127) +(def-tex veger-hand museum2-pris2 128) +(def-tex veger-iris museum2-pris2 129) +(def-tex veger-legwraps museum2-pris2 130) +(def-tex veger-pages museum2-pris2 131) +(def-tex veger-pants museum2-pris2 132) +(def-tex veger-parchment museum2-pris2 133) +(def-tex veger-shoebottom museum2-pris2 134) +(def-tex veger-shoulderplate museum2-pris2 135) +(def-tex veger-shoulderplatemetal museum2-pris2 136) +(def-tex veger-sleeve museum2-pris2 137) +(def-tex veger-sleevelower museum2-pris2 138) +(def-tex veger-stickwrap museum2-pris2 139) +(def-tex veger-teeth museum2-pris2 140) +(def-tex veger-vest museum2-pris2 141) +(def-tex veger-walkingstick-01 museum2-pris2 142) +(def-tex veger-walkingstick-02 museum2-pris2 143) +(def-tex veger-walkingstick-03 museum2-pris2 144) +(def-tex veger-whitecloth museum2-pris2 145) +(def-tex errolcyber-lens museum2-water 0) +(def-tex sig-flatfangs museum2-water 1) +(def-tex fora-shrub-pebbles forestx-vis-shrub 0) +(def-tex fora-shrub-vine forestx-vis-shrub 1) +(def-tex fora-dirt forestx-vis-alpha 0) +(def-tex time-bubble lbbtcha1-sprite 0) +(def-tex time-bubble-clock lbbtcha1-sprite 1) +(def-tex time-bubble-orbiter lbbtcha1-sprite 2) +(def-tex time-bubble lbbtcha2-sprite 0) +(def-tex time-bubble-clock lbbtcha2-sprite 1) +(def-tex time-bubble-orbiter lbbtcha2-sprite 2) +(def-tex time-bubble lbbtcha3-sprite 0) +(def-tex time-bubble-clock lbbtcha3-sprite 1) +(def-tex time-bubble-orbiter lbbtcha3-sprite 2) +(def-tex time-bubble lbbsdrp1-sprite 0) +(def-tex time-bubble-orbiter lbbsdrp1-sprite 2) +(def-tex time-bubble lbbsdrp2-sprite 0) +(def-tex time-bubble-orbiter lbbsdrp2-sprite 2) +(def-tex time-bubble lbbsdrp3-sprite 0) +(def-tex time-bubble-orbiter lbbsdrp3-sprite 2) +(def-tex bam-eyelight museum3-pris 0) +(def-tex bam-hairhilite museum3-pris 1) +(def-tex daxter-eyelid museum3-pris 100) +(def-tex daxter-furhilite museum3-pris 101) +(def-tex daxter-orange museum3-pris 102) +(def-tex daxterarm museum3-pris 103) +(def-tex daxterbodyshort-eix museum3-pris 104) +(def-tex daxterbolt museum3-pris 105) +(def-tex daxterear museum3-pris 106) +(def-tex daxterfinger museum3-pris 107) +(def-tex daxterfoot museum3-pris 108) +(def-tex daxterfoot-bottom museum3-pris 109) +(def-tex daxtergoggles museum3-pris 110) +(def-tex daxterheadwidenew museum3-pris 111) +(def-tex daxterhelmetplain museum3-pris 112) +(def-tex daxterlense museum3-pris 113) +(def-tex daxternose museum3-pris 114) +(def-tex daxterteeth museum3-pris 115) +(def-tex daxtertuft museum3-pris 116) +(def-tex environment-oldmetal museum3-pris 117) +(def-tex jackb-lens museum3-pris 118) +(def-tex jak-belt museum3-pris 119) +(def-tex jak-gogglemetal museum3-pris 120) +(def-tex jak-teeth museum3-pris 121) +(def-tex jakb-armor museum3-pris 122) +(def-tex jakb-blackstrap museum3-pris 123) +(def-tex jakb-brownleather museum3-pris 124) +(def-tex jakb-clips museum3-pris 125) +(def-tex jakb-eye museum3-pris 126) +(def-tex jakb-eyebrow museum3-pris 127) +(def-tex jakb-eyelid museum3-pris 128) +(def-tex jakb-facelft museum3-pris 129) +(def-tex jakb-facert museum3-pris 130) +(def-tex jakb-glovetop museum3-pris 131) +(def-tex jakb-hairtrans museum3-pris 132) +(def-tex jakb-horn museum3-pris 133) +(def-tex jakb-jacketbody museum3-pris 134) +(def-tex jakb-jacketsleeve museum3-pris 135) +(def-tex jakb-leatherpouch museum3-pris 136) +(def-tex jakb-leatherstrap museum3-pris 137) +(def-tex jakb-lightbrownspat museum3-pris 138) +(def-tex jakb-lightbrownstrap museum3-pris 139) +(def-tex jakb-pants museum3-pris 140) +(def-tex jakb-scarf museum3-pris 141) +(def-tex jakb-shoebottom museum3-pris 142) +(def-tex jakb-shoemetal museum3-pris 143) +(def-tex jakb-shoeteop museum3-pris 144) +(def-tex keira-bellylong museum3-pris 145) +(def-tex keira-belt museum3-pris 146) +(def-tex keira-blackstrap museum3-pris 147) +(def-tex keira-brownstraps-new museum3-pris 148) +(def-tex keira-chokerhighres museum3-pris 149) +(def-tex keira-chokermetal museum3-pris 150) +(def-tex keira-eyelid museum3-pris 151) +(def-tex keira-face museum3-pris 152) +(def-tex keira-glasses museum3-pris 153) +(def-tex keira-glovenewlarge museum3-pris 154) +(def-tex keira-gogglestrap museum3-pris 155) +(def-tex keira-hair-newest museum3-pris 156) +(def-tex keira-handbottom museum3-pris 157) +(def-tex keira-handtop museum3-pris 158) +(def-tex keira-iris-64x64 museum3-pris 159) +(def-tex keira-largewraps museum3-pris 160) +(def-tex keira-lens-large museum3-pris 161) +(def-tex keira-maskbolt museum3-pris 162) +(def-tex keira-pantslarge museum3-pris 163) +(def-tex keira-shirt museum3-pris 164) +(def-tex keira-shoebottom museum3-pris 165) +(def-tex keira-torch-guard-01 museum3-pris 166) +(def-tex keira-torch-nozzle-01 museum3-pris 167) +(def-tex keira-torch-nozzle-02 museum3-pris 168) +(def-tex samos-arm museum3-pris 169) +(def-tex samos-ear museum3-pris 170) +(def-tex samos-finger-01 museum3-pris 171) +(def-tex samos-helmet museum3-pris 172) +(def-tex samos-leaf museum3-pris 173) +(def-tex samos-lens museum3-pris 174) +(def-tex samos-log-03 museum3-pris 175) +(def-tex samos-metal museum3-pris 176) +(def-tex samos-strap museum3-pris 177) +(def-tex samosyoung-beard museum3-pris 178) +(def-tex samosyoung-belt museum3-pris 179) +(def-tex samosyoung-buckle museum3-pris 180) +(def-tex samosyoung-diaper museum3-pris 181) +(def-tex samosyoung-egg museum3-pris 182) +(def-tex samosyoung-face museum3-pris 183) +(def-tex samosyoung-hair museum3-pris 184) +(def-tex samosyoung-log-01 museum3-pris 185) +(def-tex samosyoung-log-03 museum3-pris 186) +(def-tex samosyoung-pants museum3-pris 187) +(def-tex samosyoung-shirt museum3-pris 188) +(def-tex samosyoung-vest museum3-pris 189) +(def-tex vin-teeth-01 museum3-pris 190) +(def-tex kor-bag1 museum3-pris 206) +(def-tex kor-bag2 museum3-pris 207) +(def-tex kor-bag3 museum3-pris 208) +(def-tex kor-belt museum3-pris 209) +(def-tex kor-boot museum3-pris 210) +(def-tex kor-bootsole museum3-pris 211) +(def-tex kor-chain museum3-pris 212) +(def-tex kor-eye museum3-pris 213) +(def-tex kor-eyelid museum3-pris 214) +(def-tex kor-finger museum3-pris 215) +(def-tex kor-hair museum3-pris 216) +(def-tex kor-head museum3-pris 217) +(def-tex kor-hood museum3-pris 218) +(def-tex kor-jeweldark museum3-pris 219) +(def-tex kor-jewellight museum3-pris 220) +(def-tex kor-leatherstrap museum3-pris 221) +(def-tex kor-lowercaps museum3-pris 222) +(def-tex kor-panel museum3-pris 223) +(def-tex kor-robelight museum3-pris 224) +(def-tex kor-sleeveinside museum3-pris 225) +(def-tex kor-sleeveoutside museum3-pris 226) +(def-tex kor-sleevetight museum3-pris 227) +(def-tex kor-stickend museum3-pris 228) +(def-tex kor-stickside museum3-pris 229) +(def-tex kor-toe museum3-pris 230) +(def-tex kor-uppercaps museum3-pris 231) +(def-tex kor-wraps museum3-pris 232) +(def-tex kor-wrapsclean museum3-pris 233) +(def-tex kor-wrapsdirty museum3-pris 234) +(def-tex samos-eye museum3-pris 235) +(def-tex samos-eyelid museum3-pris 236) +(def-tex cguardred-armshield museum3-pris 237) +(def-tex cguardred-backmetal museum3-pris 238) +(def-tex cguardred-boottop museum3-pris 239) +(def-tex cguardred-brushedmetal museum3-pris 240) +(def-tex cguardred-chestplate museum3-pris 241) +(def-tex cguardred-eyering museum3-pris 242) +(def-tex cguardred-face museum3-pris 243) +(def-tex cguardred-glove museum3-pris 244) +(def-tex cguardred-greyheadshield museum3-pris 245) +(def-tex cguardred-gunboltlight museum3-pris 246) +(def-tex cguardred-gunhandle museum3-pris 247) +(def-tex cguardred-gunleather museum3-pris 248) +(def-tex cguardred-gunmetaldark museum3-pris 249) +(def-tex cguardred-gunmetaldark2 museum3-pris 250) +(def-tex cguardred-gunstrap museum3-pris 251) +(def-tex cguardred-guntube museum3-pris 252) +(def-tex cguardred-headshield museum3-pris 253) +(def-tex cguardred-jacketstraps museum3-pris 254) +(def-tex cguardred-lens museum3-pris 255) +(def-tex cguardred-metalcollar museum3-pris 256) +(def-tex cguardred-pants museum3-pris 257) +(def-tex cguardred-rubber-01 museum3-pris 258) +(def-tex cguardred-scarf museum3-pris 259) +(def-tex cguardred-shirt museum3-pris 260) +(def-tex cguardred-shoebottom museum3-pris 261) +(def-tex cguardred-shoemetal museum3-pris 262) +(def-tex cguardred-shouldershield museum3-pris 263) +(def-tex cguardred-sleeve museum3-pris 264) +(def-tex cguardred-teeth museum3-pris 265) +(def-tex bam-eyelight museum3-pris2 0) +(def-tex bam-hairhilite museum3-pris2 1) +(def-tex samos-arm museum3-pris2 43) +(def-tex samos-diaper museum3-pris2 44) +(def-tex samos-ear museum3-pris2 45) +(def-tex samos-eye museum3-pris2 46) +(def-tex samos-eyelid museum3-pris2 47) +(def-tex samos-face museum3-pris2 48) +(def-tex samos-finger-01 museum3-pris2 49) +(def-tex samos-hair museum3-pris2 50) +(def-tex samos-helmet museum3-pris2 51) +(def-tex samos-leaf museum3-pris2 52) +(def-tex samos-lens museum3-pris2 53) +(def-tex samos-log-01 museum3-pris2 54) +(def-tex samos-log-02 museum3-pris2 55) +(def-tex samos-log-03 museum3-pris2 56) +(def-tex samos-metal museum3-pris2 57) +(def-tex samos-strap museum3-pris2 58) +(def-tex samos-teeth2 museum3-pris2 59) +(def-tex samos-vest museum3-pris2 60) +(def-tex samosbird-beak museum3-pris2 61) +(def-tex samosbird-body museum3-pris2 62) +(def-tex samosbird-eye museum3-pris2 63) +(def-tex samosbird-plume museum3-pris2 64) +(def-tex samosbird-wing museum3-pris2 65) +(def-tex keira-mask museum3-water 0) +(def-tex bam-eyelight museum4-pris 11) +(def-tex bam-hairhilite museum4-pris 12) +(def-tex assis-brownstrapas museum4-pris 30) +(def-tex assis-glove museum4-pris 31) +(def-tex assis-lens museum4-pris 32) +(def-tex bam-iris-16x16 museum4-pris 34) +(def-tex billy-flesh museum4-pris 35) +(def-tex billy-hair museum4-pris 36) +(def-tex billy-hat museum4-pris 37) +(def-tex billy-jug museum4-pris 38) +(def-tex billy-jugrope museum4-pris 39) +(def-tex billy-jugtop museum4-pris 40) +(def-tex billy-pants museum4-pris 41) +(def-tex billy-shirt museum4-pris 42) +(def-tex billy-tail museum4-pris 43) +(def-tex billy-wrap museum4-pris 44) +(def-tex bluesage-barrel museum4-pris 63) +(def-tex bluesage-barreltop museum4-pris 64) +(def-tex bluesage-copperfixture museum4-pris 65) +(def-tex bluesage-copperwire museum4-pris 66) +(def-tex bluesage-eye-centered-16x16 museum4-pris 67) +(def-tex bluesage-eyelid museum4-pris 68) +(def-tex bluesage-flesh museum4-pris 69) +(def-tex bluesage-greenwire museum4-pris 70) +(def-tex bluesage-helmetwires museum4-pris 71) +(def-tex bluesage-helmetwires2 museum4-pris 72) +(def-tex bluesage-jacket museum4-pris 73) +(def-tex bluesage-leather museum4-pris 74) +(def-tex bluesage-lense museum4-pris 76) +(def-tex bluesage-pants museum4-pris 77) +(def-tex bluesage-pants2 museum4-pris 78) +(def-tex bluesage-staff museum4-pris 79) +(def-tex bluesage-staffhandle museum4-pris 80) +(def-tex charHOLD museum4-pris 86) +(def-tex es-eyelid museum4-pris 88) +(def-tex es-green-metal museum4-pris 89) +(def-tex es-precursor-metal-01 museum4-pris 90) +(def-tex esbelly-01 museum4-pris 91) +(def-tex eseye museum4-pris 92) +(def-tex eseyebrow museum4-pris 93) +(def-tex espants-01 museum4-pris 94) +(def-tex espants-02 museum4-pris 95) +(def-tex esskin museum4-pris 96) +(def-tex evilbro-balls museum4-pris 97) +(def-tex evilbro-beard museum4-pris 98) +(def-tex evilbro-belt museum4-pris 99) +(def-tex evilbro-blueleather-01 museum4-pris 100) +(def-tex evilbro-blueleather-02 museum4-pris 101) +(def-tex evilbro-brownleather museum4-pris 102) +(def-tex evilbro-chin museum4-pris 103) +(def-tex evilbro-eyelid museum4-pris 104) +(def-tex evilbro-flesh museum4-pris 105) +(def-tex evilbro-hair-01 museum4-pris 106) +(def-tex evilbro-mecharm-01 museum4-pris 107) +(def-tex evilbro-mecharm-02 museum4-pris 108) +(def-tex evilbro-mecharm-03 museum4-pris 109) +(def-tex evilbro-mechglove-01 museum4-pris 110) +(def-tex evilbro-mechglove-02 museum4-pris 111) +(def-tex evilbro-pants museum4-pris 112) +(def-tex evilbro-pipes museum4-pris 113) +(def-tex evilbro-redcape museum4-pris 114) +(def-tex evilbro-rings museum4-pris 115) +(def-tex evilbro-strap museum4-pris 116) +(def-tex evilbro-teeth museum4-pris 117) +(def-tex evilbro-wrap museum4-pris 118) +(def-tex explorer-ball museum4-pris 119) +(def-tex explorer-belt museum4-pris 120) +(def-tex explorer-buckle museum4-pris 121) +(def-tex explorer-eye-centered-16x16 museum4-pris 122) +(def-tex explorer-eyelid museum4-pris 123) +(def-tex explorer-mustache museum4-pris 124) +(def-tex explorer-pants museum4-pris 125) +(def-tex explorer-ring museum4-pris 126) +(def-tex explorer-spats museum4-pris 127) +(def-tex explorer-stick museum4-pris 128) +(def-tex explorer-vest-01 museum4-pris 129) +(def-tex explorer-vest-02 museum4-pris 130) +(def-tex farmer-belt museum4-pris 131) +(def-tex farmer-fag-01 museum4-pris 132) +(def-tex farmer-fag-02 museum4-pris 133) +(def-tex farmer-fag-edgewrap museum4-pris 134) +(def-tex farmer-flesh4x4 museum4-pris 135) +(def-tex farmer-hair museum4-pris 136) +(def-tex farmer-hat museum4-pris 137) +(def-tex farmer-hat-02 museum4-pris 138) +(def-tex farmer-headband museum4-pris 139) +(def-tex farmer-mouth museum4-pris 140) +(def-tex farmer-mustach museum4-pris 141) +(def-tex farmer-pants museum4-pris 142) +(def-tex farmer-redstraps museum4-pris 143) +(def-tex farmer-shirt museum4-pris 144) +(def-tex farmer-shirt2 museum4-pris 145) +(def-tex farmer-stick museum4-pris 146) +(def-tex farmer-teeth museum4-pris 147) +(def-tex farmer-toes museum4-pris 148) +(def-tex farmer-whitestraps museum4-pris 149) +(def-tex fman-armhair museum4-pris 169) +(def-tex fman-bandanna museum4-pris 170) +(def-tex fman-bandanna2 museum4-pris 171) +(def-tex fman-beard-01 museum4-pris 172) +(def-tex fman-beard-02 museum4-pris 173) +(def-tex fman-beard-03 museum4-pris 174) +(def-tex fman-belt museum4-pris 175) +(def-tex fman-eye-centered-16x16 museum4-pris 176) +(def-tex fman-eyelid museum4-pris 177) +(def-tex fman-flesh museum4-pris 178) +(def-tex fman-metal museum4-pris 179) +(def-tex fman-sharktooth museum4-pris 180) +(def-tex fman-shirt museum4-pris 181) +(def-tex fman-tatoo museum4-pris 182) +(def-tex fman-teeth museum4-pris 183) +(def-tex fman-toothstring museum4-pris 184) +(def-tex fman-vest museum4-pris 185) +(def-tex fman-vestplain museum4-pris 186) +(def-tex fman-wrap museum4-pris 187) +(def-tex hair-01 museum4-pris 189) +(def-tex hudax-buckle museum4-pris 190) +(def-tex hudax-cotton-32x32 museum4-pris 191) +(def-tex hudax-cotton-gather museum4-pris 192) +(def-tex hudax-eyelid museum4-pris 193) +(def-tex hudax-flesh museum4-pris 194) +(def-tex hudax-hair museum4-pris 195) +(def-tex hudax-leather-01 museum4-pris 196) +(def-tex hudax-leather-02 museum4-pris 197) +(def-tex hudax-lense museum4-pris 198) +(def-tex hudax-lenseside museum4-pris 199) +(def-tex hudax-tooth museum4-pris 200) +(def-tex hudax-vest museum4-pris 201) +(def-tex hudax-vestbutton museum4-pris 202) +(def-tex hudax-vestedge museum4-pris 203) +(def-tex hudax-wrap museum4-pris 204) +(def-tex mayor-flesh museum4-pris 208) +(def-tex redsage-dial museum4-pris 210) +(def-tex redsage-flesh museum4-pris 211) +(def-tex redsage-lense museum4-pris 212) +(def-tex redsage-multitile museum4-pris 213) +(def-tex redsage-multitileglow museum4-pris 214) +(def-tex redsage-squaretile museum4-pris 215) +(def-tex sculptor-belt museum4-pris 216) +(def-tex sculptor-eye museum4-pris 217) +(def-tex sculptor-eyelid museum4-pris 218) +(def-tex sculptor-glove museum4-pris 219) +(def-tex sculptor-hair museum4-pris 220) +(def-tex sculptor-hammer museum4-pris 221) +(def-tex sculptor-headband museum4-pris 222) +(def-tex sculptor-metal museum4-pris 223) +(def-tex sculptor-pants museum4-pris 224) +(def-tex sculptor-patch-01 museum4-pris 225) +(def-tex sculptor-patch-02 museum4-pris 226) +(def-tex sculptor-scarf museum4-pris 227) +(def-tex sculptor-screw museum4-pris 228) +(def-tex sculptor-shirt museum4-pris 229) +(def-tex sculptor-teeth museum4-pris 230) +(def-tex sculptor-teeth-02 museum4-pris 231) +(def-tex sculptor-vestbottom museum4-pris 232) +(def-tex sculptor-visor museum4-pris 233) +(def-tex vest-01 museum4-pris 234) +(def-tex yelsage-barrelplain museum4-pris 236) +(def-tex yelsage-barrelstrap museum4-pris 237) +(def-tex yelsage-barreltop museum4-pris 238) +(def-tex yelsage-beard museum4-pris 239) +(def-tex yelsage-boltstrip museum4-pris 240) +(def-tex yelsage-eye-16x16new museum4-pris 241) +(def-tex yelsage-eyelid museum4-pris 242) +(def-tex yelsage-flesh museum4-pris 243) +(def-tex yelsage-handlewrap museum4-pris 244) +(def-tex yelsage-headpipe-01 museum4-pris 245) +(def-tex yelsage-helmet museum4-pris 246) +(def-tex yelsage-jacketbrown museum4-pris 247) +(def-tex yelsage-jacketwhite-01 museum4-pris 248) +(def-tex yelsage-jacketwhite-02 museum4-pris 249) +(def-tex yelsage-leather museum4-pris 250) +(def-tex yelsage-leatherbutton museum4-pris 251) +(def-tex yelsage-leatherstrap museum4-pris 252) +(def-tex yelsage-leatherstrapblack museum4-pris 253) +(def-tex yelsage-lens museum4-pris 254) +(def-tex yelsage-pantsbutton museum4-pris 255) +(def-tex yelsage-ring museum4-pris 256) +(def-tex yelsage-smallplainmetal museum4-pris 257) +(def-tex yelsage-staffmetal-01 museum4-pris 258) +(def-tex yelsage-teeth museum4-pris 259) +(def-tex yelsage-yellowlens museum4-pris 260) +(def-tex mayor-eyelid museum4-pris 261) +(def-tex mayor-hair-01 museum4-pris 262) +(def-tex mayor-hair-02 museum4-pris 263) +(def-tex mayor-hair-03 museum4-pris 264) +(def-tex mayor-haircurl museum4-pris 265) +(def-tex mayor-hat museum4-pris 266) +(def-tex mayor-pants museum4-pris 267) +(def-tex mayor-scarf museum4-pris 268) +(def-tex mayor-shirt museum4-pris 269) +(def-tex mayor-shirt2 museum4-pris 270) +(def-tex mayor-spats museum4-pris 271) +(def-tex mayor-vestbutton museum4-pris 272) +(def-tex mayor-vesthole museum4-pris 273) +(def-tex mayor-white-eye museum4-pris 274) +(def-tex mineshort-candle museum4-pris 275) +(def-tex mineshort-flesh museum4-pris 276) +(def-tex mineshort-hairyflesh museum4-pris 277) +(def-tex mineshort-lamp museum4-pris 278) +(def-tex mineshort-lampback museum4-pris 279) +(def-tex mineshort-leathermud museum4-pris 280) +(def-tex mineshort-metal museum4-pris 281) +(def-tex mineshort-metalmud museum4-pris 282) +(def-tex mineshort-mustache museum4-pris 283) +(def-tex mineshort-pants museum4-pris 284) +(def-tex mineshort-pot museum4-pris 285) +(def-tex mineshort-pothandle museum4-pris 286) +(def-tex mineshort-screw museum4-pris 287) +(def-tex mineshort-shirt1 museum4-pris 288) +(def-tex mineshort-shirt2 museum4-pris 289) +(def-tex mineshort-shirtplain museum4-pris 290) +(def-tex mineshort-stick1 museum4-pris 291) +(def-tex mineshort-stick2 museum4-pris 292) +(def-tex mineshort-suspenders museum4-pris 293) +(def-tex mineshort-teeth museum4-pris 294) +(def-tex mineshort-twine museum4-pris 295) +(def-tex mineshort-wrap museum4-pris 296) +(def-tex gambler-barrel museum4-pris 298) +(def-tex gambler-card museum4-pris 299) +(def-tex gambler-cork museum4-pris 300) +(def-tex gambler-glasses museum4-pris 301) +(def-tex gambler-hair museum4-pris 302) +(def-tex gambler-hair2 museum4-pris 303) +(def-tex gambler-hat museum4-pris 304) +(def-tex gambler-metal museum4-pris 305) +(def-tex gambler-shirt museum4-pris 306) +(def-tex gambler-shirtsmall museum4-pris 307) +(def-tex gambler-spats museum4-pris 308) +(def-tex gambler-tie museum4-pris 309) +(def-tex gambler-vest museum4-pris 310) +(def-tex geo-belt museum4-pris 311) +(def-tex geo-braid museum4-pris 312) +(def-tex geo-buckle museum4-pris 313) +(def-tex geo-eyebrow museum4-pris 314) +(def-tex geo-hat museum4-pris 315) +(def-tex geo-hat-02 museum4-pris 316) +(def-tex geo-headstrap museum4-pris 317) +(def-tex geo-kneebuckle museum4-pris 318) +(def-tex geo-lamp museum4-pris 319) +(def-tex geo-lense museum4-pris 320) +(def-tex geo-liner museum4-pris 321) +(def-tex geo-lips museum4-pris 322) +(def-tex geo-pants museum4-pris 323) +(def-tex geo-rope museum4-pris 324) +(def-tex geo-shirt museum4-pris 325) +(def-tex geo-vest museum4-pris 326) +(def-tex geo-vest2 museum4-pris 327) +(def-tex geo-vest3 museum4-pris 328) +(def-tex geo-vest4 museum4-pris 329) +(def-tex minetall-belt museum4-pris 330) +(def-tex minetall-birbody museum4-pris 331) +(def-tex minetall-birdfoot museum4-pris 332) +(def-tex minetall-birdtail museum4-pris 333) +(def-tex minetall-birdwings museum4-pris 334) +(def-tex minetall-dynamite museum4-pris 335) +(def-tex minetall-hair museum4-pris 336) +(def-tex minetall-leatherstrap museum4-pris 337) +(def-tex minetall-leggings museum4-pris 338) +(def-tex minetall-overallbutton museum4-pris 339) +(def-tex minetall-overalls museum4-pris 340) +(def-tex minetall-pants museum4-pris 341) +(def-tex minetall-shirtbuckles museum4-pris 342) +(def-tex minetall-shovelbottom museum4-pris 343) +(def-tex minetall-shoveltop museum4-pris 344) +(def-tex minetall-stick museum4-pris 345) +(def-tex ogre-arm museum4-pris 346) +(def-tex ogre-beardring museum4-pris 347) +(def-tex ogre-bluefur museum4-pris 348) +(def-tex ogre-bolt museum4-pris 349) +(def-tex ogre-brownleather museum4-pris 350) +(def-tex ogre-claw museum4-pris 351) +(def-tex ogre-eye museum4-pris 352) +(def-tex ogre-furlong museum4-pris 353) +(def-tex ogre-furtrans museum4-pris 354) +(def-tex ogre-furtrans2 museum4-pris 355) +(def-tex ogre-greymetalbolt museum4-pris 356) +(def-tex ogre-hair museum4-pris 357) +(def-tex ogre-lens museum4-pris 358) +(def-tex ogre-ltmetal museum4-pris 359) +(def-tex ogre-nose museum4-pris 360) +(def-tex ogre-pipe museum4-pris 361) +(def-tex ogre-pipeends museum4-pris 362) +(def-tex ogre-pipeholders museum4-pris 363) +(def-tex ogre-skinbone museum4-pris 364) +(def-tex ogre-tanleather museum4-pris 365) +(def-tex ogre-vestfront museum4-pris 366) +(def-tex ogre-wristband museum4-pris 367) +(def-tex p-white museum4-pris 368) +(def-tex war-teeth museum4-pris 377) +(def-tex gambler-eye-16x16 museum4-pris 407) +(def-tex geo-eye-16x16 museum4-pris 408) +(def-tex mineshort-eye-16x16 museum4-pris 409) +(def-tex minetall-eye-16x16 museum4-pris 410) +(def-tex bluesage-leatherbuckle museum4-pris 420) +(def-tex ogre-envmap museum4-pris 476) +(def-tex ogre-phong museum4-pris 477) +(def-tex cty-explode-barrel-cap lblowcst-tfrag 0) +(def-tex cty-explode-barrel-orange lblowcst-tfrag 1) +(def-tex cty-explode-barrel-rim lblowcst-tfrag 2) +(def-tex des-bush-timer-chase-trail lbbtcha1-water 0) +(def-tex des-bush-timer-chase-trail lbbtcha2-water 0) +(def-tex des-bush-timer-chase-trail lbbtcha3-water 0) +(def-tex ceiling-dust desertd-sprite 0) +(def-tex cactus-bit1 desertd-sprite 1) +(def-tex hud-terraformer-head-01 deswalk-minimap 0) +(def-tex hud-mhcentipede-meter-01 deswalk-minimap 1) +(def-tex hud-small-frame-01 deswalk-minimap 2) +(def-tex hud-small-frame-02 deswalk-minimap 3) +(def-tex bam-eyelight museum4-pris2 0) +(def-tex bam-hairhilite museum4-pris2 1) +(def-tex charHOLD museum4-pris2 28) +(def-tex environment-oldmetal museum4-pris2 41) +(def-tex jak-orig-arm museum4-pris2 42) +(def-tex jak-orig-armor museum4-pris2 43) +(def-tex jak-orig-belt museum4-pris2 44) +(def-tex jak-orig-clips museum4-pris2 45) +(def-tex jak-orig-earflaps museum4-pris2 46) +(def-tex jak-orig-eye museum4-pris2 47) +(def-tex jak-orig-eyebrow museum4-pris2 48) +(def-tex jak-orig-eyelid museum4-pris2 49) +(def-tex jak-orig-face museum4-pris2 50) +(def-tex jak-orig-finger museum4-pris2 51) +(def-tex jak-orig-goggles museum4-pris2 52) +(def-tex jak-orig-hair museum4-pris2 53) +(def-tex jak-orig-handwraps museum4-pris2 54) +(def-tex jak-orig-jackettop museum4-pris2 55) +(def-tex jak-orig-leatherpouch museum4-pris2 56) +(def-tex jak-orig-lens museum4-pris2 57) +(def-tex jak-orig-lenscover museum4-pris2 58) +(def-tex jak-orig-pants museum4-pris2 59) +(def-tex jak-orig-skirt museum4-pris2 60) +(def-tex jak-orig-strap museum4-pris2 61) +(def-tex jak-orig-teeth museum4-pris2 62) +(def-tex jak-orig-wraps museum4-pris2 63) +(def-tex jak-orig-hairplain museum4-pris2 96) +(def-tex gen-01 precurd-sprite 0) +(def-tex gen-02 precurd-sprite 1) +(def-tex gen-03 precurd-sprite 2) +(def-tex final-beam-comb precurd-sprite 4) +(def-tex final-beam-dark precurd-sprite 5) +(def-tex final-beam-light precurd-sprite 6) +(def-tex bam-eyelight museum4-tfrag 0) +(def-tex flut-yellow2dkblue museum4-tfrag 1) +(def-tex flut-neck museum4-tfrag 2) +(def-tex flut-dkbluefeathers museum4-tfrag 3) +(def-tex flut-creamfeathers museum4-tfrag 4) +(def-tex flut-wingends museum4-tfrag 5) +(def-tex flut-wing museum4-tfrag 6) +(def-tex flut-plume museum4-tfrag 7) +(def-tex flut-face museum4-tfrag 8) +(def-tex flut-brow museum4-tfrag 9) +(def-tex orange museum4-tfrag 10) +(def-tex flut-leg museum4-tfrag 11) +(def-tex flut-tail museum4-tfrag 12) +(def-tex flut-nostril museum4-tfrag 13) +(def-tex war-teeth museum4-tfrag 14) +(def-tex war-cape museum4-tfrag 15) +(def-tex war-brokenstrap museum4-tfrag 16) +(def-tex war-chestplate museum4-tfrag 17) +(def-tex war-guards museum4-tfrag 18) +(def-tex bab-pendant museum4-tfrag 19) +(def-tex war-skirt museum4-tfrag 20) +(def-tex war-largebutton museum4-tfrag 21) +(def-tex war-hair museum4-tfrag 22) +(def-tex assis-flesh4x4 museum4-tfrag 23) +(def-tex war-wrapstrap museum4-tfrag 24) +(def-tex explorer-belt museum4-tfrag 25) +(def-tex billy-wrap museum4-tfrag 26) +(def-tex war-booboo museum4-tfrag 27) +(def-tex war-autoeye museum4-tfrag 28) +(def-tex flut-eye-16x16 museum4-tfrag 29) +(def-tex flut-eyelid museum4-tfrag 30) +(def-tex blady-lense museum4-tfrag 31) +(def-tex blady-mouthtop museum4-tfrag 32) +(def-tex blady-hat museum4-tfrag 33) +(def-tex blady-hatplain museum4-tfrag 34) +(def-tex blady-hateye museum4-tfrag 35) +(def-tex blady-hatseamend museum4-tfrag 36) +(def-tex blady-hateyecenter museum4-tfrag 37) +(def-tex farmer-flesh4x4 museum4-tfrag 38) +(def-tex blady-brownleather museum4-tfrag 39) +(def-tex blady-belt museum4-tfrag 40) +(def-tex farmer-teeth museum4-tfrag 41) +(def-tex blady-shirt museum4-tfrag 42) +(def-tex blady-diaper museum4-tfrag 43) +(def-tex farmer-whitestraps museum4-tfrag 44) +(def-tex farmer-toes museum4-tfrag 45) +(def-tex blady-feaTher museum4-tfrag 46) +(def-tex blady-metal museum4-tfrag 47) +(def-tex blady-bag museum4-tfrag 48) +(def-tex blady-brown4x4 museum4-tfrag 49) +(def-tex blady-armband museum4-tfrag 50) +(def-tex blady-eyecentered-32x32 museum4-tfrag 51) +(def-tex blady-eyelid museum4-tfrag 52) +(def-tex palcab-lowres-background-hills-01 lfacctyb-vis-tfrag 0) +(def-tex strip-metal-02-lores lfacctyb-vis-tfrag 1) +(def-tex palcab-lowres-ctywide-wall-01 lfacctyb-vis-tfrag 2) +(def-tex palcab-lowres-background-crater-bottom-enviro lfacctyb-vis-tfrag 3) +(def-tex palcab-lowres-background-rocksnow2 lfacctyb-vis-tfrag 4) +(def-tex palcab-lowres-background-rocksnow lfacctyb-vis-tfrag 5) +(def-tex palcab-lowres-ctywide-wall-02 lfacctyb-vis-tfrag 6) +(def-tex palcab-lowres-ctyslum-ground lfacctyb-vis-tfrag 7) +(def-tex palcab-lowres-ctyslum-roof-03 lfacctyb-vis-tfrag 8) +(def-tex palcab-lowres-ctyslum-roof-01 lfacctyb-vis-tfrag 9) +(def-tex palcab-lowres-ctyslum-wall-01 lfacctyb-vis-tfrag 10) +(def-tex palcab-lowres-ctyslum-wall-02 lfacctyb-vis-tfrag 11) +(def-tex palcab-lowres-ctyslum-roof-02 lfacctyb-vis-tfrag 12) +(def-tex palcab-lowres-ctyslum-wall-04 lfacctyb-vis-tfrag 13) +(def-tex palcab-lowres-ctyslum-wall-03 lfacctyb-vis-tfrag 14) +(def-tex palcab-pipe-hoze lfacctyb-vis-tfrag 15) +(def-tex palcab-lowres-mark-roof-02 lfacctyb-vis-tfrag 16) +(def-tex city-lowres-ind-wall-04 lfacctyb-vis-tfrag 17) +(def-tex palcab-steel-lores lfacctyb-vis-tfrag 18) +(def-tex palcab-lowres-stadium-canopy lfacctyb-vis-tfrag 19) +(def-tex city-lowres-ind-wall-02 lfacctyb-vis-tfrag 20) +(def-tex city-lowres-fort-yellow lfacctyb-vis-tfrag 21) +(def-tex city-lowres-fort-red lfacctyb-vis-tfrag 22) +(def-tex palcab-lowres-mark-roof-01 lfacctyb-vis-tfrag 23) +(def-tex city-lowres-ind-wall-01 lfacctyb-vis-tfrag 24) +(def-tex city-lowres-port-roof lfacctyb-vis-tfrag 25) +(def-tex city-lowres-ind-wall-03 lfacctyb-vis-tfrag 26) +(def-tex city-lowres-ind-wall-07 lfacctyb-vis-tfrag 27) +(def-tex city-lowres-ind-wall-08 lfacctyb-vis-tfrag 28) +(def-tex city-lowres-ind-wall-05 lfacctyb-vis-tfrag 29) +(def-tex city-lowres-ind-wall-06 lfacctyb-vis-tfrag 30) +(def-tex palcab-lowres-mark-roof-rim-01 lfacctyb-vis-tfrag 31) +(def-tex palcab-lowres-mark-shops-01 lfacctyb-vis-tfrag 32) +(def-tex palcab-lowres-mark-awning-green lfacctyb-vis-tfrag 33) +(def-tex palcab-lowres-mark-awning-red lfacctyb-vis-tfrag 34) +(def-tex city-lowres-ctygen-side-02 lfacctyb-vis-tfrag 35) +(def-tex city-lowres-ctygen-stripe-01 lfacctyb-vis-tfrag 36) +(def-tex city-lowres-ctygen-roof-02 lfacctyb-vis-tfrag 37) +(def-tex city-lowres-ctygen-build-01 lfacctyb-vis-tfrag 38) +(def-tex palcab-lowres-mark-highway lfacctyb-vis-tfrag 39) +(def-tex city-lowres-ctygen-build-02 lfacctyb-vis-tfrag 40) +(def-tex city-lowres-ctygen-side-01 lfacctyb-vis-tfrag 41) +(def-tex city-lowres-ctygen-build-03 lfacctyb-vis-tfrag 42) +(def-tex city-lowres-ctygen-build-05 lfacctyb-vis-tfrag 43) +(def-tex city-lowres-ctygen-build-04 lfacctyb-vis-tfrag 44) +(def-tex city-lowres-ctygen-roof-01 lfacctyb-vis-tfrag 45) +(def-tex city-lowres-ctygen-stripe-02 lfacctyb-vis-tfrag 46) +(def-tex palcab-lorez-metal03 lfacctyb-vis-tfrag 47) +(def-tex palcab-lorez-metal01 lfacctyb-vis-tfrag 48) +(def-tex t-citywide-met-strp02 lfacctyb-vis-tfrag 49) +(def-tex t-citywide-met-strp01 lfacctyb-vis-tfrag 50) +(def-tex t-citywide-met-pill-01 lfacctyb-vis-tfrag 51) +(def-tex t-citywide-red-met-01 lfacctyb-vis-tfrag 52) +(def-tex t-citywide-met-wall-02 lfacctyb-vis-tfrag 53) +(def-tex t-palshaft-plate01 lfacctyb-vis-tfrag 54) +(def-tex palcab-lowres-background-mount-build-01 lfacctyb-vis-tfrag 55) +(def-tex palcab-lowres-background-mount-build-02 lfacctyb-vis-tfrag 56) +(def-tex palcab-lowres-background-mount-build-03 lfacctyb-vis-tfrag 57) +(def-tex rub-palace-tower-side lfacctyb-vis-tfrag 58) +(def-tex t-strip-lo-palsup-panel-1 lfacctyb-vis-tfrag 59) +(def-tex t-strip-lo-palsup-panel-2 lfacctyb-vis-tfrag 60) +(def-tex t-strip-lo-palsup-panel-3 lfacctyb-vis-tfrag 61) +(def-tex t-strip-lo-palsup-panel-4 lfacctyb-vis-tfrag 62) +(def-tex t-strip-lo-palsup-panel-5 lfacctyb-vis-tfrag 63) +(def-tex t-strip-lo-palsup-danger1 lfacctyb-vis-tfrag 64) +(def-tex t-strip-lo-palsup-danger2 lfacctyb-vis-tfrag 65) +(def-tex city-lowres-newslums-stripe-02 lfacctyb-vis-tfrag 66) +(def-tex city-lowres-newslums-bigwindows-02 lfacctyb-vis-tfrag 67) +(def-tex city-lowres-newslums-stripe-01 lfacctyb-vis-tfrag 68) +(def-tex city-lowres-damaged-01 lfacctyb-vis-tfrag 69) +(def-tex t-citywide-wall-tile-01 lfacctyb-vis-tfrag 70) +(def-tex palcab-lowres-farm-wall lfacctyb-vis-tfrag 71) +(def-tex palcab-lowres-farm-wall-top lfacctyb-vis-tfrag 72) +(def-tex t-palshaft-roof-01 lfacctyb-vis-tfrag 73) +(def-tex palace-break-girder01 lfacctyb-vis-tfrag 74) +(def-tex citywide-palace-01 lfacctyb-vis-tfrag 75) +(def-tex citywide-hangmetal lfacctyb-vis-tfrag 76) +(def-tex city-lowres-mhcity-wall-02 lfacctyb-vis-tfrag 77) +(def-tex city-lowres-mhcity-wall-01 lfacctyb-vis-tfrag 78) +(def-tex city-lowres-mhcity-detower-01 lfacctyb-vis-tfrag 79) +(def-tex city-lowres-mhcity-detower-02 lfacctyb-vis-tfrag 80) +(def-tex city-lowres-mhcity-wall-06 lfacctyb-vis-tfrag 81) +(def-tex city-lowres-mhcity-wall-05 lfacctyb-vis-tfrag 82) +(def-tex common-black lfacctyb-vis-tfrag 83) +(def-tex city-lowres-mhcity-wall-03 lfacctyb-vis-tfrag 84) +(def-tex palcab-swingp-base-lores lfacctyb-vis-tfrag 85) +(def-tex palcab-lorez-asphalt01 lfacctyb-vis-tfrag 86) +(def-tex palcab-lowres-background-trees-edge lfacctyb-vis-tfrag 87) +(def-tex palcab-lowres-background-trees2 lfacctyb-vis-tfrag 88) +(def-tex palcab-lorez-metal02 lfacctyb-vis-tfrag 89) +(def-tex palcab-lorez-metal01-red lfacctyb-vis-tfrag 90) +(def-tex palcab-lorez-metal01-red-stripe lfacctyb-vis-tfrag 91) +(def-tex palcab-lorez-plates01 lfacctyb-vis-tfrag 92) +(def-tex tcab-beam01 lfacctyb-vis-tfrag 93) +(def-tex palcab-wall-lores lfacctyb-vis-tfrag 94) +(def-tex tcab-plat-edg-01-lores lfacctyb-vis-tfrag 95) +(def-tex palace-break-brokenwall lfacctyb-vis-tfrag 96) +(def-tex t-palshaft-panl-01 lfacctyb-vis-tfrag 97) +(def-tex citywide-consite-steel lfacctyb-vis-tfrag 98) +(def-tex palcab-lowres-stadium-grass lfacctyb-vis-tfrag 99) +(def-tex ctyp-metal-01 lfacctyb-vis-tfrag 100) +(def-tex palcab-lowres-background-strip lfacctyb-vis-tfrag 101) +(def-tex t-palshaft-pil-01 lfacctyb-vis-tfrag 102) +(def-tex ctywide-ox-met-01 lfacctyb-vis-tfrag 103) +(def-tex t-palshaft-r-strp-plate01 lfacctyb-vis-tfrag 104) +(def-tex palcab-lorez-plates-red-stripe01 lfacctyb-vis-tfrag 105) +(def-tex city-lowres-mhcity-tower-01 lfacctyb-vis-tfrag 106) +(def-tex palcab-swingp-trim lfacctyb-vis-tfrag 107) +(def-tex city-lowres-mhcity-tower-02 lfacctyb-vis-tfrag 108) +(def-tex palcab-lowres-background-shoreline-01 lfacctyb-vis-tfrag 109) +(def-tex palcab-lowres-background-mountains lfacctyb-vis-tfrag 110) +(def-tex palcab-lowres-background-grass-to-desert-02 lfacctyb-vis-tfrag 111) +(def-tex palcab-lowres-background-grass-to-desert-01 lfacctyb-vis-tfrag 112) +(def-tex palcab-lowres-background-mounatin-window lfacctyb-vis-tfrag 113) +(def-tex palcab-lowres-background-hilltops-01 lfacctyb-vis-tfrag 114) +(def-tex palcab-lowres-background-desert-01 lfacctyb-vis-tfrag 115) +(def-tex city-lowres-mhcity-ground-01 lfacctyb-vis-tfrag 116) +(def-tex tcab-beam01-lores lfacctyb-vis-tfrag 117) +(def-tex tcab-blue-ring-01 lfacctyb-vis-tfrag 118) +(def-tex palcab-lowres-background-peaks-01 lfacctyb-vis-tfrag 119) +(def-tex palcab-lowres-background-shoreline-02 lfacctyb-vis-tfrag 120) +(def-tex palcab-lowres-background-desert-to-shore lfacctyb-vis-tfrag 121) +(def-tex palcab-lowres-background-crater-01 lfacctyb-vis-tfrag 122) +(def-tex palcab-smallpipe-lores lfacctyb-vis-tfrag 123) +(def-tex palcab-lowres-background-peaks-02 lfacctyb-vis-tfrag 124) +(def-tex palcab-lowres-background-mountains-02 lfacctyb-vis-tfrag 125) +(def-tex palcab-lowres-background-shoreline-02 lfacctyb-vis-alpha 0) +(def-tex palcab-lowres-background-crater-rim lfacctyb-vis-alpha 1) +(def-tex palcab-lowres-background-trees-edge lfacctyb-vis-alpha 2) +(def-tex palcab-lowres-background-trees2 lfacctyb-vis-alpha 3) +(def-tex palcab-lowres-ctyslum-wall-03 lfacctyb-vis-alpha 4) +(def-tex stdm-wallrock-dirt rublcst-vis-tfrag 0) +(def-tex rub-marble-floor-01-hitweak rublcst-vis-tfrag 1) +(def-tex rub-rubble-01 rublcst-vis-tfrag 2) +(def-tex rub-panels-01 rublcst-vis-tfrag 3) +(def-tex rub-pal-red rublcst-vis-tfrag 4) +(def-tex rub-cement-a rublcst-vis-tfrag 5) +(def-tex rub-cement-pillars rublcst-vis-tfrag 6) +(def-tex rub-cement-broken-end rublcst-vis-tfrag 7) +(def-tex rub-wall-gen-01 rublcst-vis-tfrag 8) +(def-tex rub-wall-side-beam-02 rublcst-vis-tfrag 9) +(def-tex rub-city-wall-inside-damaged rublcst-vis-tfrag 10) +(def-tex rub-beam-gen rublcst-vis-tfrag 11) +(def-tex rub-wall-gen-04 rublcst-vis-tfrag 12) +(def-tex rub-wall-gen-02 rublcst-vis-tfrag 13) +(def-tex rub-wall-trim rublcst-vis-tfrag 14) +(def-tex rub-floor-c rublcst-vis-tfrag 15) +(def-tex rub-copper-metal-02 rublcst-vis-tfrag 16) +(def-tex rub-palace-tower-side rublcst-vis-tfrag 17) +(def-tex rub-met-strp-close rublcst-vis-tfrag 18) +(def-tex rail-patch-01 rublcst-vis-tfrag 19) +(def-tex rail-light-blue rublcst-vis-tfrag 20) +(def-tex rail-edge-01 rublcst-vis-tfrag 21) +(def-tex rail-base-mid-01 rublcst-vis-tfrag 22) +(def-tex rail-base-dark-01 rublcst-vis-tfrag 23) +(def-tex rail-gray-metal-01 rublcst-vis-tfrag 24) +(def-tex rail-pipe-03 rublcst-vis-tfrag 25) +(def-tex comb-temp-glass rublcst-vis-tfrag 26) +(def-tex rail-light-yellow-small rublcst-vis-tfrag 27) +(def-tex rub-precursor-a rublcst-vis-tfrag 28) +(def-tex rub-precursor-c rublcst-vis-tfrag 29) +(def-tex comb-ring rublcst-vis-tfrag 30) +(def-tex rail-detail-01 rublcst-vis-tfrag 31) +(def-tex rail-light-blue-small rublcst-vis-tfrag 32) +(def-tex rail-trim-01 rublcst-vis-tfrag 33) +(def-tex rail-cord-01 rublcst-vis-tfrag 34) +(def-tex rail-pipe-01 rublcst-vis-tfrag 35) +(def-tex rail-pipe-02 rublcst-vis-tfrag 36) +(def-tex rail-pipe-05 rublcst-vis-tfrag 37) +(def-tex rub-dirt-a rublcst-vis-tfrag 38) +(def-tex rub-wallrock-dirt rublcst-vis-tfrag 39) +(def-tex slum-ground-01 rublcst-vis-tfrag 40) +(def-tex rail-env-car-01 rublcst-vis-tfrag 41) +(def-tex rail-env-wall-01 rublcst-vis-tfrag 42) +(def-tex rub-crater-shards-01 rublcst-vis-shrub 0) +(def-tex rub-greyblue-plain-lowres rublcst-vis-shrub 1) +(def-tex rub-beam-gen rublcst-vis-shrub 2) +(def-tex rub-wall-small-grill rublcst-vis-shrub 3) +(def-tex rub-ground-01-small rublcst-vis-shrub 4) +(def-tex rub-met-strp-close rublcst-vis-shrub 5) +(def-tex rail-env-wall-01 rublcst-vis-shrub 6) +(def-tex rail-base-dark-01 rublcst-vis-shrub 7) +(def-tex rail-rider-decal-01 rublcst-vis-shrub 8) +(def-tex rail-pipe-03 rublcst-vis-shrub 9) +(def-tex rail-dash-01 rublcst-vis-shrub 10) +(def-tex rail-gray-metal-01 rublcst-vis-shrub 11) +(def-tex rail-car-vent-01 rublcst-vis-shrub 12) +(def-tex rail-chair-01 rublcst-vis-shrub 13) +(def-tex rail-light-blue rublcst-vis-shrub 14) +(def-tex rail-light-green rublcst-vis-shrub 15) +(def-tex bam-eyelight rublcst-vis-pris 0) +(def-tex bam-hairhilite rublcst-vis-pris 1) +(def-tex daxter-eyelid rublcst-vis-pris 2) +(def-tex daxter-furhilite rublcst-vis-pris 3) +(def-tex daxter-orange rublcst-vis-pris 4) +(def-tex daxterarm rublcst-vis-pris 5) +(def-tex daxterbodyshort-eix rublcst-vis-pris 6) +(def-tex daxterbolt rublcst-vis-pris 7) +(def-tex daxterear rublcst-vis-pris 8) +(def-tex daxterfinger rublcst-vis-pris 9) +(def-tex daxterfoot rublcst-vis-pris 10) +(def-tex daxterfoot-bottom rublcst-vis-pris 11) +(def-tex daxtergoggles rublcst-vis-pris 12) +(def-tex daxterheadwidenew rublcst-vis-pris 13) +(def-tex daxterhelmetplain rublcst-vis-pris 14) +(def-tex daxterlense rublcst-vis-pris 15) +(def-tex daxternose rublcst-vis-pris 16) +(def-tex daxterteeth rublcst-vis-pris 17) +(def-tex daxtertuft rublcst-vis-pris 18) +(def-tex environment-oldmetal rublcst-vis-pris 19) +(def-tex intcept-tread01 rublcst-vis-pris 20) +(def-tex jakc-armor rublcst-vis-pris 21) +(def-tex jakc-chestplate-straps rublcst-vis-pris 22) +(def-tex jakc-gogglemetal rublcst-vis-pris 23) +(def-tex jakc-lens rublcst-vis-pris 24) +(def-tex jakc-scarf rublcst-vis-pris 25) +(def-tex jakc-scarfhanging rublcst-vis-pris 26) +(def-tex jakc-skirt rublcst-vis-pris 27) +(def-tex jakc-waistband2 rublcst-vis-pris 28) +(def-tex jakc-wraps rublcst-vis-pris 29) +(def-tex jakc-wristband-a2 rublcst-vis-pris 30) +(def-tex jakchires-arm rublcst-vis-pris 31) +(def-tex jakchires-arm-dark rublcst-vis-pris 32) +(def-tex jakchires-arm-norm rublcst-vis-pris 33) +(def-tex jakchires-blackstrap rublcst-vis-pris 34) +(def-tex jakchires-brownstrap rublcst-vis-pris 35) +(def-tex jakchires-brwnleather rublcst-vis-pris 36) +(def-tex jakchires-chestplate rublcst-vis-pris 37) +(def-tex jakchires-clips rublcst-vis-pris 38) +(def-tex jakchires-eye rublcst-vis-pris 39) +(def-tex jakchires-eye-dark rublcst-vis-pris 40) +(def-tex jakchires-eye-norm rublcst-vis-pris 41) +(def-tex jakchires-eyebrow rublcst-vis-pris 42) +(def-tex jakchires-eyebrow-dark rublcst-vis-pris 43) +(def-tex jakchires-eyebrow-norm rublcst-vis-pris 44) +(def-tex jakchires-eyelid rublcst-vis-pris 45) +(def-tex jakchires-eyelid-dark rublcst-vis-pris 46) +(def-tex jakchires-eyelid-norm rublcst-vis-pris 47) +(def-tex jakchires-facelft rublcst-vis-pris 48) +(def-tex jakchires-facelft-dark rublcst-vis-pris 49) +(def-tex jakchires-facelft-norm rublcst-vis-pris 50) +(def-tex jakchires-facert rublcst-vis-pris 51) +(def-tex jakchires-facert-dark rublcst-vis-pris 52) +(def-tex jakchires-facert-norm rublcst-vis-pris 53) +(def-tex jakchires-glovetop rublcst-vis-pris 54) +(def-tex jakchires-hair rublcst-vis-pris 55) +(def-tex jakchires-hair-dark rublcst-vis-pris 56) +(def-tex jakchires-hair-norm rublcst-vis-pris 57) +(def-tex jakchires-horn rublcst-vis-pris 58) +(def-tex jakchires-jacket rublcst-vis-pris 59) +(def-tex jakchires-leatherpouch rublcst-vis-pris 60) +(def-tex jakchires-lightbrownspat rublcst-vis-pris 61) +(def-tex jakchires-pants rublcst-vis-pris 62) +(def-tex jakchires-precarmor-01 rublcst-vis-pris 63) +(def-tex jakchires-shoebottom rublcst-vis-pris 64) +(def-tex jakchires-shoemetal rublcst-vis-pris 65) +(def-tex jakchires-shoeteop rublcst-vis-pris 66) +(def-tex jakchires-teeth rublcst-vis-pris 67) +(def-tex kid-blackstrap rublcst-vis-pris 68) +(def-tex kid-brownstrap rublcst-vis-pris 69) +(def-tex kid-clips rublcst-vis-pris 70) +(def-tex kid-eye rublcst-vis-pris 71) +(def-tex kid-eyelid rublcst-vis-pris 72) +(def-tex kid-face rublcst-vis-pris 73) +(def-tex kid-finger rublcst-vis-pris 74) +(def-tex kid-foot rublcst-vis-pris 75) +(def-tex kid-hair rublcst-vis-pris 76) +(def-tex kid-helmet rublcst-vis-pris 77) +(def-tex kid-medallion rublcst-vis-pris 78) +(def-tex kid-overalls rublcst-vis-pris 79) +(def-tex kid-sash rublcst-vis-pris 80) +(def-tex kid-shirt rublcst-vis-pris 81) +(def-tex kid-teeth rublcst-vis-pris 82) +(def-tex rhino-horn-02 rublcst-vis-pris 83) +(def-tex rhino-wheel-01 rublcst-vis-pris 84) +(def-tex vehicle-wheel-01 rublcst-vis-pris 85) +(def-tex bam-eyelight rublcst-vis-pris2 0) +(def-tex bam-hairhilite rublcst-vis-pris2 1) +(def-tex environment-oldmetal rublcst-vis-pris2 2) +(def-tex king-arm rublcst-vis-pris2 3) +(def-tex king-blackskirt2 rublcst-vis-pris2 4) +(def-tex king-bluemetal rublcst-vis-pris2 5) +(def-tex king-bolt rublcst-vis-pris2 6) +(def-tex king-chest rublcst-vis-pris2 7) +(def-tex king-clip-02 rublcst-vis-pris2 8) +(def-tex king-ear rublcst-vis-pris2 9) +(def-tex king-earing rublcst-vis-pris2 10) +(def-tex king-face-01 rublcst-vis-pris2 11) +(def-tex king-finger rublcst-vis-pris2 12) +(def-tex king-greenmetal rublcst-vis-pris2 13) +(def-tex king-greenmetalplain rublcst-vis-pris2 14) +(def-tex king-hair rublcst-vis-pris2 15) +(def-tex king-hand rublcst-vis-pris2 16) +(def-tex king-horn rublcst-vis-pris2 17) +(def-tex king-iris rublcst-vis-pris2 18) +(def-tex king-leg rublcst-vis-pris2 19) +(def-tex king-lgblackstrap rublcst-vis-pris2 20) +(def-tex king-precursermetal-decor rublcst-vis-pris2 21) +(def-tex king-precursermetal-plain rublcst-vis-pris2 22) +(def-tex king-precursermetal-trim rublcst-vis-pris2 23) +(def-tex king-precursermetal-trim2 rublcst-vis-pris2 24) +(def-tex king-precursermetal-trimbolt rublcst-vis-pris2 25) +(def-tex king-shoebottom rublcst-vis-pris2 26) +(def-tex king-skirt rublcst-vis-pris2 27) +(def-tex king-skirt-b rublcst-vis-pris2 28) +(def-tex king-teeth rublcst-vis-pris2 29) +(def-tex king-thinstrap rublcst-vis-pris2 30) +(def-tex king-vest rublcst-vis-pris2 31) +(def-tex king-vestback rublcst-vis-pris2 32) +(def-tex king-wrap rublcst-vis-pris2 33) +(def-tex king-wraps rublcst-vis-pris2 34) +(def-tex king-wristband rublcst-vis-pris2 35) +(def-tex veger-bookleather rublcst-vis-pris2 36) +(def-tex veger-booksides rublcst-vis-pris2 37) +(def-tex veger-bookspine rublcst-vis-pris2 38) +(def-tex veger-bootbolt rublcst-vis-pris2 39) +(def-tex veger-bootfoot rublcst-vis-pris2 40) +(def-tex veger-bootstrap rublcst-vis-pris2 41) +(def-tex veger-coat rublcst-vis-pris2 42) +(def-tex veger-coatbelt rublcst-vis-pris2 43) +(def-tex veger-coatclips rublcst-vis-pris2 44) +(def-tex veger-endpaper rublcst-vis-pris2 45) +(def-tex veger-eyelid rublcst-vis-pris2 46) +(def-tex veger-face rublcst-vis-pris2 47) +(def-tex veger-fingerbottom rublcst-vis-pris2 48) +(def-tex veger-fingertop rublcst-vis-pris2 49) +(def-tex veger-gold rublcst-vis-pris2 50) +(def-tex veger-hair rublcst-vis-pris2 51) +(def-tex veger-hand rublcst-vis-pris2 52) +(def-tex veger-iris rublcst-vis-pris2 53) +(def-tex veger-legwraps rublcst-vis-pris2 54) +(def-tex veger-pages rublcst-vis-pris2 55) +(def-tex veger-pants rublcst-vis-pris2 56) +(def-tex veger-parchment rublcst-vis-pris2 57) +(def-tex veger-scarf rublcst-vis-pris2 58) +(def-tex veger-shoebottom rublcst-vis-pris2 59) +(def-tex veger-shoulderplate rublcst-vis-pris2 60) +(def-tex veger-shoulderplatemetal rublcst-vis-pris2 61) +(def-tex veger-sleeve rublcst-vis-pris2 62) +(def-tex veger-sleevelower rublcst-vis-pris2 63) +(def-tex veger-stickwrap rublcst-vis-pris2 64) +(def-tex veger-teeth rublcst-vis-pris2 65) +(def-tex veger-vest rublcst-vis-pris2 66) +(def-tex veger-walkingstick-01 rublcst-vis-pris2 67) +(def-tex veger-walkingstick-02 rublcst-vis-pris2 68) +(def-tex veger-walkingstick-03 rublcst-vis-pris2 69) +(def-tex veger-whitecloth rublcst-vis-pris2 70) +(def-tex rub-elec-switch-blue-paint-01 lpattack-vis-tfrag 0) +(def-tex rub-elec-switch-panel-01 lpattack-vis-tfrag 1) +(def-tex rub-wall-gen-03 lpattack-vis-tfrag 2) +(def-tex rub-elec-switch-pole-01 lpattack-vis-tfrag 3) +(def-tex rub-elec-switch-light-on-orange lpattack-vis-tfrag 4) +(def-tex rub-cement-broken-end lpattack-vis-tfrag 5) +(def-tex cactus-bit1 desertg-sprite 0) +(def-tex bam-eyelight museum3b-pris 0) +(def-tex bam-hairhilite museum3b-pris 1) +(def-tex environment-oldmetal museum3b-pris 2) +(def-tex errol-blackpipe museum3b-pris 3) +(def-tex errol-boottoe museum3b-pris 4) +(def-tex errol-brownpipe museum3b-pris 5) +(def-tex errol-chestplate museum3b-pris 6) +(def-tex errol-chestplateside museum3b-pris 7) +(def-tex errol-chinstrap museum3b-pris 8) +(def-tex errol-ear museum3b-pris 9) +(def-tex errol-earcup museum3b-pris 10) +(def-tex errol-eye museum3b-pris 11) +(def-tex errol-eyebrow museum3b-pris 12) +(def-tex errol-eyelid museum3b-pris 13) +(def-tex errol-face museum3b-pris 14) +(def-tex errol-faceemblem museum3b-pris 15) +(def-tex errol-facemask museum3b-pris 16) +(def-tex errol-gunbarrel-01 museum3b-pris 17) +(def-tex errol-gunbarrel-02 museum3b-pris 18) +(def-tex errol-gunbarrel-03 museum3b-pris 19) +(def-tex errol-gunhandle museum3b-pris 20) +(def-tex errol-hair museum3b-pris 21) +(def-tex errol-handback museum3b-pris 22) +(def-tex errol-handpalm museum3b-pris 23) +(def-tex errol-headleather museum3b-pris 24) +(def-tex errol-inseam museum3b-pris 25) +(def-tex errol-jacket museum3b-pris 26) +(def-tex errol-kneeguard museum3b-pris 27) +(def-tex errol-kneepadstrap museum3b-pris 28) +(def-tex errol-lens museum3b-pris 29) +(def-tex errol-metalrim museum3b-pris 30) +(def-tex errol-mouthpiece museum3b-pris 31) +(def-tex errol-pantleg museum3b-pris 32) +(def-tex errol-pipeends museum3b-pris 33) +(def-tex errol-scarf museum3b-pris 34) +(def-tex errol-shoe museum3b-pris 35) +(def-tex errol-shoebottom museum3b-pris 36) +(def-tex errol-shoulder-rtshield museum3b-pris 37) +(def-tex errol-sleeve museum3b-pris 38) +(def-tex errol-sleeve-lfttop museum3b-pris 39) +(def-tex errol-sleeve-rttop museum3b-pris 40) +(def-tex errol-teeth museum3b-pris 41) +(def-tex errol-wristband museum3b-pris 42) +(def-tex krew-arm museum3b-pris 43) +(def-tex krew-belt museum3b-pris 44) +(def-tex krew-bracelet museum3b-pris 45) +(def-tex krew-chain museum3b-pris 46) +(def-tex krew-chairleather museum3b-pris 47) +(def-tex krew-eyebrow museum3b-pris 48) +(def-tex krew-facelft museum3b-pris 49) +(def-tex krew-facert museum3b-pris 50) +(def-tex krew-fan-01 museum3b-pris 51) +(def-tex krew-foot museum3b-pris 52) +(def-tex krew-goldtooth museum3b-pris 53) +(def-tex krew-hand museum3b-pris 54) +(def-tex krew-handle museum3b-pris 55) +(def-tex krew-jewe-smaller museum3b-pris 56) +(def-tex krew-lamp museum3b-pris 57) +(def-tex krew-leatherplain museum3b-pris 58) +(def-tex krew-light museum3b-pris 59) +(def-tex krew-loop museum3b-pris 60) +(def-tex krew-loop2 museum3b-pris 61) +(def-tex krew-metalattachment museum3b-pris 62) +(def-tex krew-mole museum3b-pris 63) +(def-tex krew-pants museum3b-pris 64) +(def-tex krew-pipe-01 museum3b-pris 65) +(def-tex krew-pipe-02 museum3b-pris 66) +(def-tex krew-pipe-anim museum3b-pris 67) +(def-tex krew-plainmetal museum3b-pris 68) +(def-tex krew-ring museum3b-pris 69) +(def-tex krew-shirt museum3b-pris 70) +(def-tex krew-shirtleather museum3b-pris 71) +(def-tex krew-vehicle museum3b-pris 72) +(def-tex krew-vehicle2 museum3b-pris 73) +(def-tex krewleg museum3b-pris 74) +(def-tex kid-blackstrap museum3b-pris 75) +(def-tex kid-brownstrap museum3b-pris 76) +(def-tex kid-clips museum3b-pris 77) +(def-tex kid-eye museum3b-pris 78) +(def-tex kid-eyelid museum3b-pris 79) +(def-tex kid-face museum3b-pris 80) +(def-tex kid-finger museum3b-pris 81) +(def-tex kid-foot museum3b-pris 82) +(def-tex kid-hair museum3b-pris 83) +(def-tex kid-helmet museum3b-pris 84) +(def-tex kid-medallion museum3b-pris 85) +(def-tex kid-overalls museum3b-pris 86) +(def-tex kid-sash museum3b-pris 87) +(def-tex kid-shirt museum3b-pris 88) +(def-tex kid-teeth museum3b-pris 89) +(def-tex crocadog-collar museum3b-pris 90) +(def-tex crocadog-eye museum3b-pris 91) +(def-tex crocadog-eyelid museum3b-pris 92) +(def-tex crocadog-facegreen museum3b-pris 93) +(def-tex crocadog-faceyellow museum3b-pris 94) +(def-tex crocadog-footbottom museum3b-pris 95) +(def-tex crocadog-insidemouth museum3b-pris 96) +(def-tex crocadog-lowerbody-01 museum3b-pris 97) +(def-tex crocadog-nose museum3b-pris 98) +(def-tex crocadog-scale museum3b-pris 99) +(def-tex crocadog-teeth museum3b-pris 100) +(def-tex crocadog-toenails museum3b-pris 101) +(def-tex crocadog-upperbody-01 museum3b-pris 102) +(def-tex vin-armor museum3b-pris 103) +(def-tex vin-belt museum3b-pris 104) +(def-tex vin-belt-02 museum3b-pris 105) +(def-tex vin-blackstrap museum3b-pris 106) +(def-tex vin-clip museum3b-pris 107) +(def-tex vin-ear museum3b-pris 108) +(def-tex vin-emblem museum3b-pris 109) +(def-tex vin-face-01 museum3b-pris 110) +(def-tex vin-finger-01 museum3b-pris 111) +(def-tex vin-glove-01 museum3b-pris 112) +(def-tex vin-glove-02 museum3b-pris 113) +(def-tex vin-gunbarrel museum3b-pris 114) +(def-tex vin-gunbarrel-02 museum3b-pris 115) +(def-tex vin-gunhandle-01 museum3b-pris 116) +(def-tex vin-hair-01 museum3b-pris 117) +(def-tex vin-hair-02 museum3b-pris 118) +(def-tex vin-lens museum3b-pris 119) +(def-tex vin-ltbrownstrap museum3b-pris 120) +(def-tex vin-metal museum3b-pris 121) +(def-tex vin-pants museum3b-pris 122) +(def-tex vin-shirt-01 museum3b-pris 123) +(def-tex vin-shirt-02 museum3b-pris 124) +(def-tex vin-shoe-01 museum3b-pris 125) +(def-tex vin-shoe-02 museum3b-pris 126) +(def-tex vin-suspendercenter museum3b-pris 127) +(def-tex vin-teeth-01 museum3b-pris 128) +(def-tex vin-waistband museum3b-pris 129) +(def-tex krew-eyelid museum3b-pris 130) +(def-tex krew-lfteye museum3b-pris 131) +(def-tex krew-rteye museum3b-pris 132) +(def-tex bam-eyelight museum3b-pris2 0) +(def-tex bam-hairhilite museum3b-pris2 1) +(def-tex baron-armor museum3b-pris2 2) +(def-tex baron-armshield museum3b-pris2 3) +(def-tex baron-beard museum3b-pris2 4) +(def-tex baron-blackleatherstrap museum3b-pris2 5) +(def-tex baron-bolts museum3b-pris2 6) +(def-tex baron-brownleatherstrap museum3b-pris2 7) +(def-tex baron-brushedmetal museum3b-pris2 8) +(def-tex baron-chestemblem museum3b-pris2 9) +(def-tex baron-eye museum3b-pris2 10) +(def-tex baron-eyelid museum3b-pris2 11) +(def-tex baron-face museum3b-pris2 12) +(def-tex baron-hand museum3b-pris2 13) +(def-tex baron-headshield museum3b-pris2 14) +(def-tex baron-jacketinside museum3b-pris2 15) +(def-tex baron-jacketsleeve museum3b-pris2 16) +(def-tex baron-largebutton museum3b-pris2 17) +(def-tex baron-pants museum3b-pris2 18) +(def-tex baron-pipes museum3b-pris2 19) +(def-tex baron-scarf museum3b-pris2 20) +(def-tex baron-scarfend museum3b-pris2 21) +(def-tex baron-shoebottom museum3b-pris2 22) +(def-tex baron-shoulder museum3b-pris2 23) +(def-tex baron-swordcover museum3b-pris2 24) +(def-tex baron-swordcovertip museum3b-pris2 25) +(def-tex baron-swordhandles museum3b-pris2 26) +(def-tex baron-swordhilt museum3b-pris2 27) +(def-tex baron-swordtop museum3b-pris2 28) +(def-tex baron-whitestrap museum3b-pris2 29) +(def-tex baron-wristguard museum3b-pris2 30) +(def-tex brut-ankle museum3b-pris2 31) +(def-tex brut-armfur museum3b-pris2 32) +(def-tex brut-armsleeve museum3b-pris2 33) +(def-tex brut-button museum3b-pris2 34) +(def-tex brut-cloaktail museum3b-pris2 35) +(def-tex brut-cloaktop museum3b-pris2 36) +(def-tex brut-diaper museum3b-pris2 37) +(def-tex brut-eye museum3b-pris2 38) +(def-tex brut-eyelid museum3b-pris2 39) +(def-tex brut-feather museum3b-pris2 40) +(def-tex brut-finger museum3b-pris2 41) +(def-tex brut-footbottom museum3b-pris2 42) +(def-tex brut-footstrap museum3b-pris2 43) +(def-tex brut-foottop museum3b-pris2 44) +(def-tex brut-hair museum3b-pris2 45) +(def-tex brut-handpalm museum3b-pris2 46) +(def-tex brut-headtop museum3b-pris2 47) +(def-tex brut-jacket museum3b-pris2 48) +(def-tex brut-jaw museum3b-pris2 49) +(def-tex brut-legfur museum3b-pris2 50) +(def-tex brut-lens museum3b-pris2 51) +(def-tex brut-metalrim museum3b-pris2 52) +(def-tex brut-shirt museum3b-pris2 53) +(def-tex brut-teeth museum3b-pris2 54) +(def-tex brut-ties museum3b-pris2 55) +(def-tex brut-toenails museum3b-pris2 56) +(def-tex charHOLD museum3b-pris2 57) +(def-tex daxter-furhilite museum3b-pris2 58) +(def-tex environment-oldmetal museum3b-pris2 59) +(def-tex bab-allfur museum4b-pris 0) +(def-tex bab-diaper museum4b-pris 1) +(def-tex bab-eye museum4b-pris 2) +(def-tex bab-fur museum4b-pris 3) +(def-tex bab-furskin-trans museum4b-pris 4) +(def-tex bab-furtrans museum4b-pris 5) +(def-tex bab-longfur museum4b-pris 6) +(def-tex bab-nail-01 museum4b-pris 7) +(def-tex bab-pendant museum4b-pris 8) +(def-tex bab-shoulderstrap museum4b-pris 9) +(def-tex bab-skin museum4b-pris 10) +(def-tex common-glass museum4-water 2) +(def-tex common-gray-dark museum4-water 3) +(def-tex placeholder-white placeholder 0) + diff --git a/goal_src/jak3/engine/data/tpages.gc b/goal_src/jak3/engine/data/tpages.gc new file mode 100644 index 0000000000..6ae3c97256 --- /dev/null +++ b/goal_src/jak3/engine/data/tpages.gc @@ -0,0 +1,779 @@ +(defconstant desboss2-pris 2953) +(defconstant deshover-minimap 2727) +(defconstant deshover-sprite 1998) +(defconstant deshover-pris2 1989) +(defconstant deshover-warp 1935) +(defconstant deshover-pris 1598) +(defconstant lctyprot-sprite 3269) +(defconstant lctyprot-water 3264) +(defconstant lctyprot-pris 2592) +(defconstant ldax-pris 2130) +(defconstant wasstadb-minimap 1485) +(defconstant wasstadb-water 1309) +(defconstant wasstadb-tfrag 1085) +(defconstant volcanoa-vis-pris2 3053) +(defconstant volcanoa-vis-alpha 1634) +(defconstant volcanoa-vis-shrub 1633) +(defconstant volcanoa-vis-pris 1635) +(defconstant volcanoa-vis-tfrag 1632) +(defconstant lpatkcs-minimap 2359) +(defconstant lpatkcs-pris 1987) +(defconstant lpatkcs-tfrag 2205) +(defconstant comba-minimap 2676) +(defconstant comba-water 2496) +(defconstant comba-shrub 2889) +(defconstant comba-pris 1577) +(defconstant templeb-vis-shrub 2625) +(defconstant templeb-vis-tfrag 2617) +(defconstant arenacst-tfrag 1484) +(defconstant templex-vis-water 2326) +(defconstant templex-vis-shrub 2328) +(defconstant templex-vis-pris 2330) +(defconstant templex-vis-tfrag 2327) +(defconstant volcanox-tfrag 1938) +(defconstant loutro2-pris2 2746) +(defconstant loutro2-water 3070) +(defconstant loutro2-pris 3069) +(defconstant rubblea2-vis-shrub 2509) +(defconstant lcitysml-alpha 2606) +(defconstant lcitysml-tfrag 2605) +(defconstant mined-minimap 1612) +(defconstant mined-sprite 2776) +(defconstant mined-pris2 1623) +(defconstant mined-water 1622) +(defconstant mined-alpha 1691) +(defconstant mined-shrub 1651) +(defconstant mined-pris 1621) +(defconstant mined-tfrag 1620) +(defconstant lppatrol-vis-pris 3279) +(defconstant lppatrol-vis-tfrag 3280) +(defconstant lwlandm-pris 1550) +(defconstant lsig-pris2 1153) +(defconstant lsig-water 1154) +(defconstant wcaseem-pris2 1812) +(defconstant wasall-pris 325) +(defconstant wasseem-sprite 1975) +(defconstant wasseem-pris2 1468) +(defconstant wasseem-pris 1211) +(defconstant waspala-sprite 3132) +(defconstant waspala-water 968) +(defconstant waspala-alpha 933) +(defconstant waspala-shrub 980) +(defconstant waspala-pris 871) +(defconstant desliz-pris 1624) +(defconstant lsigjakc-pris2 1450) +(defconstant lsigjakc-water 1451) +(defconstant lsigjakc-pris 1449) +(defconstant combn-water 2211) +(defconstant combn-alpha 2595) +(defconstant combn-tfrag 2210) +(defconstant lgunrnc-pris 3171) +(defconstant lbbtcha1-sprite 3325) +(defconstant lbbtcha1-water 3378) +(defconstant desert-hfrag 976) +(defconstant ljakndax-pris 2362) +(defconstant desert-minimap 1253) +(defconstant desert-vis-pris 2304) +(defconstant ljkfeet-pris 2658) +(defconstant lnstobb-pris 1337) +(defconstant lctypalt-minimap 3093) +(defconstant lashelin-pris2 1222) +(defconstant lforring-sprite 1358) +(defconstant ctywide-sprite 123) +(defconstant railcst-pris2 2513) +(defconstant railcst-pris 2512) +(defconstant railcst-tfrag 2711) +(defconstant citycast-pris2 2095) +(defconstant deschase-minimap 3184) +(defconstant citycast-pris 2094) +(defconstant deschase-tfrag 3203) +(defconstant precurc-vis-water 2903) +(defconstant wasseem-water 1533) +(defconstant precurc-vis-shrub 2642) +(defconstant precurc-vis-tfrag 2640) +(defconstant ljndklev-pris 1247) +(defconstant ltrtwhls-pris 2356) +(defconstant combc-tfrag 2191) +(defconstant templec-minimap 3041) +(defconstant templec-sprite 2692) +(defconstant volcanox-pris 1517) +(defconstant templec-vis-shrub 2626) +(defconstant forestb-vis-water 821) +(defconstant forestb-vis-pris 820) +(defconstant forestb-vis-tfrag 819) +(defconstant desert-vis-tfrag 736) +(defconstant lbbring6-sprite 2954) +(defconstant ldesgcst-pris2 2661) +(defconstant ldesgcst-water 2662) +(defconstant lwlandm-water 1551) +(defconstant ldesgcst-pris 2660) +(defconstant vinroom-vis-tfrag 1026) +(defconstant loutro-pris2 2657) +(defconstant loutro-shrub 2812) +(defconstant nstb-sprite 646) +(defconstant desrescc-pris 1717) +(defconstant nstb-vis-water 608) +(defconstant nstb-vis-alpha 604) +(defconstant desinter-water 1713) +(defconstant desinter-pris 1712) +(defconstant lbbtcha2-sprite 3326) +(defconstant warpcast-pris 2270) +(defconstant lbbtcha2-water 3379) +(defconstant railc-tfrag 2484) +(defconstant gungame-sprite 1389) +(defconstant gungame-vis-pris2 1557) +(defconstant gungame-vis-pris 1391) +(defconstant gungame-vis-tfrag 1393) +(defconstant destrack-minimap 1666) +(defconstant railcst-shrub 2904) +(defconstant destrack-pris 1795) +(defconstant ljkcdmkl-pris2 1811) +(defconstant ljkcdmkl-pris 1810) +(defconstant lfacrm1-tfrag 1936) +(defconstant museum4-pris2 3386) +(defconstant museum4-water 3419) +(defconstant museum4-pris 3365) +(defconstant museum4-tfrag 3390) +(defconstant lbbring1-sprite 2767) +(defconstant museum-pris2 3297) +(defconstant ldampksm-pris 1092) +(defconstant museum-water 3310) +(defconstant lctyblow-water 2847) +(defconstant lctyblow-pris 2846) +(defconstant mineb-vis-shrub 928) +(defconstant mineb-vis-tfrag 926) +(defconstant stadiumb-vis-alpha 317) +(defconstant stadiumb-vis-shrub 1974) +(defconstant wasall-minimap 1427) +(defconstant stadiumb-vis-pris 318) +(defconstant stadiumb-vis-tfrag 319) +(defconstant destrack-sprite 2363) +(defconstant waswide-minimap 1254) +(defconstant waswide-vis-water 1075) +(defconstant waswide-vis-shrub 1956) +(defconstant waswide-vis-pris 874) +(defconstant rubblea-vis-pris2 2677) +(defconstant rubblea-vis-water 2416) +(defconstant loninsim-pris 3271) +(defconstant hangb-vis-tfrag 3028) +(defconstant ldmpckgn-pris 2348) +(defconstant ctygenb-minimap 219) +(defconstant ctygenb-sprite 222) +(defconstant ctygenb-vis-water 227) +(defconstant desliz-minimap 1654) +(defconstant desbcst-pris2 2763) +(defconstant deschase-pris 2961) +(defconstant sewb-vis-shrub 743) +(defconstant sewb-vis-pris 753) +(defconstant lbbring4-sprite 2906) +(defconstant forestx-vis-shrub 3316) +(defconstant lpattack-minimap 3235) +(defconstant ctyslumb-sprite 162) +(defconstant factorya-shrub 3011) +(defconstant factorya-pris 536) +(defconstant sewg-vis-pris 1133) +(defconstant sewg-vis-tfrag 1127) +(defconstant freecast-pris2 1968) +(defconstant freecast-pris 1967) +(defconstant ctyfarmb-sprite 253) +(defconstant ctyfarmb-vis-shrub 257) +(defconstant freehq-tfrag 798) +(defconstant ctyfarmb-vis-pris 256) +(defconstant ctyport-vis-tfrag 274) +(defconstant desertd-vis-shrub 1383) +(defconstant lfaccity-alpha 1951) +(defconstant wascityb-vis-water 842) +(defconstant factoryd-vis-shrub 2883) +(defconstant mhcitya-vis-tfrag 2342) +(defconstant wasleapr-water 1694) +(defconstant forestx-vis-alpha 3317) +(defconstant sewg-vis-water 1126) +(defconstant factoryc-vis-shrub 2235) +(defconstant precurd-vis-tfrag 2637) +(defconstant templeb-vis-pris 2628) +(defconstant lformach-vis-water 1519) +(defconstant ljkdxvin-pris 2601) +(defconstant templec-vis-water 2627) +(defconstant lformach-vis-pris 1518) +(defconstant lmhcityb-vis-tfrag 3141) +(defconstant desoasis-pris2 1605) +(defconstant precurb-vis-tfrag 2633) +(defconstant temp-shrub 3228) +(defconstant foresta-vis-alpha 1010) +(defconstant lwassig-sprite 1698) +(defconstant onintent-sprite 1157) +(defconstant intpfall-vis-water 1441) +(defconstant intpfall-vis-pris 1440) +(defconstant intpfall-vis-tfrag 1438) +(defconstant minee-tfrag 2140) +(defconstant lformach-sprite 3249) +(defconstant lbbsdrp3-sprite 3330) +(defconstant programmer 3) +(defconstant lctyhijk-tfrag 1580) +(defconstant slumbset-pris 2432) +(defconstant ldamklev-pris2 1323) +(defconstant ctyfarma-sprite 241) +(defconstant loutro3-shrub 3274) +(defconstant deswalk-vis-water 3134) +(defconstant templec-vis-tfrag 2620) +(defconstant hanga-sprite 1511) +(defconstant deswalk-vis-tfrag 2855) +(defconstant desertg-sprite 3409) +(defconstant desertg-vis-tfrag 1373) +(defconstant wasleapr-pris 1663) +(defconstant ctyport-vis-pris 272) +(defconstant desertd-vis-water 1381) +(defconstant lseemwca-pris2 2071) +(defconstant deserrol-water 3180) +(defconstant precurd-vis-pris 2639) +(defconstant lfacout-vis-alpha 3288) +(defconstant sewi-vis-pris 1130) +(defconstant desoasis-minimap 2408) +(defconstant ctyfarma-vis-pris 244) +(defconstant deserte-vis-tfrag 1380) +(defconstant lfacrm1-pris 2070) +(defconstant deserrol-pris 3179) +(defconstant precura-vis-pris 2638) +(defconstant sewi-vis-tfrag 1123) +(defconstant lfacout-vis-tfrag 3287) +(defconstant sewm-vis-shrub 1139) +(defconstant desert-sprite 1653) +(defconstant introcst-pris2 544) +(defconstant desbcst-pris 2762) +(defconstant sewm-vis-pris 1141) +(defconstant desbcst-water 2764) +(defconstant sewm-vis-tfrag 1138) +(defconstant desjump-water 2769) +(defconstant desjump-pris 2768) +(defconstant sewl-vis-pris 1145) +(defconstant deserta-vis-pris 3309) +(defconstant factorya-sprite 3102) +(defconstant introcst-sprite 1560) +(defconstant introcst-pris 540) +(defconstant ljak-pris 1527) +(defconstant precurb-vis-shrub 2636) +(defconstant mhctycst-water 2379) +(defconstant forestx-vis-tfrag 1838) +(defconstant sewh-vis-water 1131) +(defconstant sewh-vis-shrub 1129) +(defconstant sewh-vis-pris 1132) +(defconstant wasstada-sprite 591) +(defconstant ctyport-vis-shrub 273) +(defconstant desertd-vis-tfrag 1382) +(defconstant lfaccity-tfrag 1950) +(defconstant wascityb-vis-tfrag 841) +(defconstant factoryc-vis-alpha 2234) +(defconstant sewh-vis-tfrag 1125) +(defconstant stadiuma-vis-shrub 2815) +(defconstant hanga-hfrag 1503) +(defconstant deshover-tfrag 1920) +(defconstant hanga-vis-water 3029) +(defconstant hanga-vis-pris 3031) +(defconstant desrace2-pris 1408) +(defconstant hanga-vis-tfrag 3030) +(defconstant ldamklev-pris 1407) +(defconstant ljakcklv-pris 1542) +(defconstant towerb-vis-alpha 2651) +(defconstant towerb-vis-shrub 2652) +(defconstant forestx-vis-pris 1839) +(defconstant towerb-vis-pris 2948) +(defconstant ctyfarma-vis-alpha 243) +(defconstant sewf-vis-tfrag 757) +(defconstant factoryb-vis-pris 1866) +(defconstant lblowcst-pris 3032) +(defconstant desrace2-water 1409) +(defconstant lkeira-pris 2131) +(defconstant sewa-vis-shrub 800) +(defconstant ctyfarmb-vis-water 259) +(defconstant factoryd-sprite 2988) +(defconstant minec-vis-pris 932) +(defconstant freecast-water 1969) +(defconstant ctyslumc-sprite 170) +(defconstant combx-water 2334) +(defconstant volcanox-warp 2902) +(defconstant freehq-shrub 1793) +(defconstant museum3b-pris2 3416) +(defconstant wasstadc-water 1252) +(defconstant lctyhijk-pris 1835) +(defconstant lprecurc-vis-tfrag 2944) +(defconstant slumbset-water 2430) +(defconstant waschase-pris 1321) +(defconstant desboss2-pris2 3175) +(defconstant rubblea-vis-shrub 2066) +(defconstant ctypesa-pris 957) +(defconstant ldmpckgn-pris2 2349) +(defconstant ctysluma-minimap 131) +(defconstant wasintro-vis-tfrag 1213) +(defconstant level-default-sprite 4) +(defconstant minee-shrub 2141) +(defconstant lpattack-sprite 3250) +(defconstant lfacrm2-alpha 2168) +(defconstant ldampeck-pris 1086) +(defconstant ctypesc-pris 1244) +(defconstant ctysluma-vis-shrub 135) +(defconstant lfaccar-minimap 2867) +(defconstant ctypesb-pris 1758) +(defconstant lpattack-vis-tfrag 3408) +(defconstant towerc-tfrag 2299) +(defconstant forestb-vis-alpha 1117) +(defconstant sky-textures 8) +(defconstant desjump-tfrag 3220) +(defconstant templec-vis-pris 2706) +(defconstant deserte-vis-shrub 1597) +(defconstant arenacst-pris 1245) +(defconstant ctysluma-vis-tfrag 136) +(defconstant templea-vis-alpha 3057) +(defconstant level-default-minimap 9) +(defconstant desbattl-pris2 2173) +(defconstant lgunnorm-water 3170) +(defconstant factoryd-vis-tfrag 2881) +(defconstant mhcitya-vis-pris 2340) +(defconstant mhctycst-pris 2367) +(defconstant ljinx-pris 1826) +(defconstant templea-vis-pris2 2624) +(defconstant ctyslumb-vis-shrub 165) +(defconstant lvincst-warp 2870) +(defconstant sewa-vis-pris 741) +(defconstant destrack-water 1796) +(defconstant raila-shrub 2905) +(defconstant vinroom-sprite 1023) +(defconstant lkeira-water 2132) +(defconstant stadium-vis-tfrag 1591) +(defconstant templea-vis-pris 2621) +(defconstant wascityb-vis-shrub 843) +(defconstant sewo-vis-tfrag 1925) +(defconstant desertf-vis-tfrag 1384) +(defconstant templea-vis-tfrag 2616) +(defconstant ltowerb-vis-water 2655) +(defconstant loutro-pris 2682) +(defconstant desertc-vis-shrub 1573) +(defconstant lwassig-pris 1343) +(defconstant factoryd-vis-water 2885) +(defconstant ctyinda-vis-tfrag 180) +(defconstant oasiscst-pris 1600) +(defconstant desoasis-water 2114) +(defconstant towercst-tfrag 3223) +(defconstant towerc-pris 2302) +(defconstant templea-vis-water 2615) +(defconstant waswide-sprite 666) +(defconstant factoryd-vis-pris 2884) +(defconstant ctywide-vis-pris 125) +(defconstant mhcitya-vis-shrub 2343) +(defconstant ctyinda-vis-shrub 179) +(defconstant railb2-tfrag 2708) +(defconstant desresc-pris 1599) +(defconstant desertd-sprite 3384) +(defconstant gungame2-pris 2275) +(defconstant wasleapr-minimap 1707) +(defconstant stadiuma-vis-pris 2816) +(defconstant level-default-shrub 11) +(defconstant sewa-sprite 1411) +(defconstant lvincst-pris 2869) +(defconstant arenacst-pris2 1246) +(defconstant ltnjxhip-tfrag 2355) +(defconstant ljakc-pris 1466) +(defconstant minea-vis-pris 925) +(defconstant oasiscst-pris2 1601) +(defconstant towercst-shrub 3224) +(defconstant deswalk-vis-pris 2856) +(defconstant combe-tfrag 2599) +(defconstant ltowera-sprite 3248) +(defconstant desresc-water 1625) +(defconstant minec-vis-shrub 931) +(defconstant lblowcst-tfrag 3368) +(defconstant rubbleb-vis-shrub 2059) +(defconstant ctycarc-pris 950) +(defconstant level-default-water 5) +(defconstant minee-pris 2142) +(defconstant lprecurc-sprite 3251) +(defconstant ldampeck-pris2 1087) +(defconstant lwstdpck-pris 1367) +(defconstant ctyfarmb-vis-tfrag 258) +(defconstant forestb-vis-shrub 1116) +(defconstant level-default-pris 7) +(defconstant desoasis-pris 1603) +(defconstant precurd-vis-water 2712) +(defconstant templea-vis-shrub 2618) +(defconstant ltowera-vis-shrub 2645) +(defconstant ljaksig-pris 1536) +(defconstant lbbtcha3-water 3380) +(defconstant lbiped-pris 2901) +(defconstant ltowera-vis-tfrag 2644) +(defconstant ljakklev-pris 1541) +(defconstant towerb-vis-tfrag 2650) +(defconstant common 1) +(defconstant lbbsdrp1-sprite 3328) +(defconstant ctyfarmb-vis-alpha 255) +(defconstant sewb-vis-tfrag 742) +(defconstant templed-vis-pris2 2960) +(defconstant templed-vis-pris 2622) +(defconstant ctysluma-sprite 133) +(defconstant wasintro-vis-water 1215) +(defconstant desboss1-pris 1756) +(defconstant wasdoors-vis-tfrag 647) +(defconstant factoryd-vis-alpha 2882) +(defconstant ctyinda-sprite 177) +(defconstant lgunnorm-pris 3139) +(defconstant stadiuma-sprite 2598) +(defconstant rubblea-vis-tfrag 2065) +(defconstant ctypepa-pris 956) +(defconstant rubbleb-vis-water 2060) +(defconstant ctycarc-water 951) +(defconstant lprenme-pris 2956) +(defconstant lblowcst-water 3033) +(defconstant lfacrm2-tfrag 2167) +(defconstant lblowcst-sprite 3276) +(defconstant ltowera-vis-pris 2910) +(defconstant lprecurc-vis-pris 2964) +(defconstant sewd-vis-tfrag 746) +(defconstant templea-sprite 3043) +(defconstant level-default-warp 10) +(defconstant lblowcst-minimap 3094) +(defconstant minec-vis-tfrag 930) +(defconstant stadium-vis-pris 2553) +(defconstant ctyslumc-vis-shrub 173) +(defconstant factoryc-vis-water 2332) +(defconstant lctyhijk-water 1836) +(defconstant comba-tfrag 2431) +(defconstant wasdoors-vis-pris 1322) +(defconstant sewc-vis-pris 754) +(defconstant factoryb-vis-water 1863) +(defconstant hanga-minimap 1676) +(defconstant sewj-vis-tfrag 1135) +(defconstant wasdoors-vis-shrub 648) +(defconstant intpfall-vis-alpha 1439) +(defconstant wasdoors-minimap 1696) +(defconstant ljkdxvin-warp 2602) +(defconstant lnstoba-vis-pris 1520) +(defconstant lbbring3-sprite 2859) +(defconstant sewj-vis-pris 1137) +(defconstant wascityb-vis-pris 844) +(defconstant deserth-vis-tfrag 1385) +(defconstant sewo-vis-shrub 1926) +(defconstant loutro3-pris 3273) +(defconstant desresc-warp 1731) +(defconstant rubblec-vis-water 2057) +(defconstant ctycara-pris 948) +(defconstant ctyslumc-vis-tfrag 174) +(defconstant combx-tfrag 2333) +(defconstant wascityb-minimap 2360) +(defconstant wasstadc-pris 1251) +(defconstant railx-tfrag 2336) +(defconstant sewj-vis-shrub 1136) +(defconstant sewj-vis-water 1134) +(defconstant desert-vis-shrub 1702) +(defconstant nsta-vis-tfrag 593) +(defconstant factoryd-minimap 2736) +(defconstant desertf-vis-shrub 2871) +(defconstant ctyslumb-minimap 159) +(defconstant wasstadb-pris 1187) +(defconstant rublcst-vis-pris 3405) +(defconstant lmech-pris 2955) +(defconstant ctyfarmb-minimap 250) +(defconstant lctysnpr-tfrag 2220) +(defconstant environment-generic 2) +(defconstant lbbsdrp2-sprite 3329) +(defconstant gungame1-pris 2274) +(defconstant ltornsam-pris2 1165) +(defconstant nsta-vis-pris 795) +(defconstant towerb-vis-water 2949) +(defconstant nsta-vis-shrub 731) +(defconstant lwassig-minimap 1843) +(defconstant ctyslumb-vis-tfrag 166) +(defconstant lbombbot-minimap 2384) +(defconstant foresta-minimap 1302) +(defconstant desertf-vis-pris 2844) +(defconstant nsta-minimap 1072) +(defconstant lpattack-vis-pris 3263) +(defconstant lctysnpr-sprite 2154) +(defconstant lbbtcha3-sprite 3327) +(defconstant onintent-pris2 1163) +(defconstant ctyslumc-vis-water 1505) +(defconstant ctyslumc-minimap 167) +(defconstant lfreeout-tfrag 3158) +(defconstant ltnjxhip-pris 2049) +(defconstant museum3b-pris 3415) +(defconstant combx-pris 2306) +(defconstant factorya-water 535) +(defconstant towera-water 2699) +(defconstant lforplnt-vis-pris 2237) +(defconstant sewg-vis-shrub 1128) +(defconstant lctypatk-pris 1899) +(defconstant desjump-minimap 2766) +(defconstant deserth-vis-shrub 1995) +(defconstant factoryc-vis-pris 2305) +(defconstant precurd-sprite 3387) +(defconstant templex-sprite 2169) +(defconstant factoryc-sprite 3278) +(defconstant ctyindb-vis-pris 186) +(defconstant deshunt-water 1809) +(defconstant ctyindb-vis-shrub 187) +(defconstant ctyindb-minimap 181) +(defconstant ctywide-vis-tfrag 127) +(defconstant mhcityb-vis-tfrag 2345) +(defconstant lbbring2-sprite 2858) +(defconstant ltnfxhip-warp 2312) +(defconstant ltnfxhip-pris2 2311) +(defconstant lmhcitya-vis-tfrag 3142) +(defconstant minea-vis-tfrag 924) +(defconstant minea-vis-shrub 989) +(defconstant minea-vis-water 1727) +(defconstant mhcityb-vis-pris 2347) +(defconstant ctywide-vis-water 128) +(defconstant mhcityb-vis-shrub 2346) +(defconstant ldamsig-water 1089) +(defconstant outcast3-water 3307) +(defconstant mhcityb-minimap 2198) +(defconstant wasstadc-tfrag 1090) +(defconstant combd-tfrag 2199) +(defconstant lsigklv-water 2294) +(defconstant rublcst-vis-tfrag 3403) +(defconstant rublcst-vis-shrub 3404) +(defconstant rublcst-vis-pris2 3406) +(defconstant desrally-pris 2892) +(defconstant sewk-vis-shrub 1783) +(defconstant deschase-water 2962) +(defconstant sewc-vis-tfrag 744) +(defconstant desbattl-pris 1853) +(defconstant ctyindb-vis-tfrag 188) +(defconstant desbattl-minimap 2406) +(defconstant title-minimap 1324) +(defconstant sewe-vis-pris 756) +(defconstant factoryb-vis-alpha 1865) +(defconstant gamefont 12) +(defconstant sewk-vis-tfrag 1121) +(defconstant waspgame-pris 1662) +(defconstant desrally-water 2893) +(defconstant sewk-vis-pris 1784) +(defconstant ltornjnx-pris2 1479) +(defconstant lsnkwhls-pris 2588) +(defconstant slumbset-shrub 2429) +(defconstant lbombbot-pris 1320) +(defconstant ctyindb-sprite 184) +(defconstant lforplnt-minimap 2402) +(defconstant introcst-tfrag 1347) +(defconstant ctyfarma-minimap 238) +(defconstant level-default-tfrag 6) +(defconstant wasdefen-minimap 2224) +(defconstant lblowtmh-pris 2978) +(defconstant templed-vis-tfrag 2619) +(defconstant templed-vis-shrub 3101) +(defconstant ltowcity-tfrag 2530) +(defconstant ltowcity-alpha 2531) +(defconstant outrocst-pris 2596) +(defconstant powergd-water 3164) +(defconstant rubblec-vis-tfrag 2055) +(defconstant lwassig-water 1488) +(defconstant outrocst-pris2 2597) +(defconstant wascityb-sprite 947) +(defconstant rubblec-vis-shrub 2056) +(defconstant nstb-vis-tfrag 605) +(defconstant wascast-pris 1714) +(defconstant wascitya-vis-tfrag 632) +(defconstant lfacrm2-pris 3017) +(defconstant lkleever-pris 1394) +(defconstant lfacrm2-shrub 2282) +(defconstant waspgame-sprite 1561) +(defconstant desboss1-minimap 2643) +(defconstant desertg-vis-pris 1376) +(defconstant raile-tfrag 2485) +(defconstant desboss1-water 3172) +(defconstant rubblea-vis-pris 2067) +(defconstant ctypepb-pris 958) +(defconstant desboss1-pris2 3176) +(defconstant precura-vis-water 2635) +(defconstant deswalk-minimap 3385) +(defconstant freehq-pris 1167) +(defconstant sewm-vis-water 1140) +(defconstant powergd-pris 2249) +(defconstant ltnjxhip-pris2 2048) +(defconstant freehq-water 939) +(defconstant lfaccar-pris 2573) +(defconstant freehq-pris2 1464) +(defconstant waspala-tfrag 869) +(defconstant lctysnpr-minimap 3087) +(defconstant freehq-sprite 1035) +(defconstant ltorn-pris2 1463) +(defconstant wasleapr-sprite 1589) +(defconstant towera-pris 2698) +(defconstant vinroom-vis-pris 1024) +(defconstant lsamos-pris2 2133) +(defconstant stadium-vis-shrub 1592) +(defconstant halfpipe-water 510) +(defconstant arenacst-water 1248) +(defconstant lforplnt-sprite 2357) +(defconstant ctyfarma-vis-tfrag 246) +(defconstant ctyfarma-vis-shrub 245) +(defconstant ljinx-minimap 2552) +(defconstant desboss2-water 3036) +(defconstant sewo-vis-pris 1927) +(defconstant lctypatk-tfrag 1523) +(defconstant precura-vis-tfrag 2632) +(defconstant lctysnpr-pris 2091) +(defconstant precura-vis-shrub 2634) +(defconstant precura-minimap 2678) +(defconstant desert-vis-water 1744) +(defconstant wascitya-vis-pris 635) +(defconstant wascitya-vis-shrub 633) +(defconstant nstb-vis-shrub 606) +(defconstant placeholder 32767) +(defconstant desrescg-pris 1715) +(defconstant ctyslumb-vis-water 1743) +(defconstant wascitya-vis-water 634) +(defconstant nstb-vis-pris 607) +(defconstant desrescg-water 1716) +(defconstant templee-pris2 2909) +(defconstant sewc-vis-water 751) +(defconstant mineb-vis-pris 929) +(defconstant lctydest-tfrag 3147) +(defconstant lctydest-pris 2001) +(defconstant lctydest-water 2378) +(defconstant factoryb-vis-tfrag 1864) +(defconstant sewe-vis-water 755) +(defconstant lctydest-minimap 3197) +(defconstant sewe-vis-tfrag 748) +(defconstant title-pris 1830) +(defconstant precurd-vis-shrub 2912) +(defconstant gridcst-pris 2967) +(defconstant sewe-vis-shrub 749) +(defconstant deshunt-pris2 1808) +(defconstant waswide-vis-tfrag 873) +(defconstant raila-tfrag 3091) +(defconstant gungame-vis-shrub 1392) +(defconstant raila-pris 2501) +(defconstant waspala-pris2 872) +(defconstant raila-alpha 3090) +(defconstant raila-minimap 3015) +(defconstant sewc-vis-shrub 745) +(defconstant title-sprite 1854) +(defconstant ctyport-sprite 268) +(defconstant raild-tfrag 2486) +(defconstant desertb-vis-tfrag 1377) +(defconstant railb-tfrag 2487) +(defconstant desertb-vis-shrub 1378) +(defconstant desertb-vis-water 1379) +(defconstant lnstoba-vis-alpha 1521) +(defconstant lnstoba-vis-water 1522) +(defconstant sewl-vis-water 1142) +(defconstant museum3-pris 3360) +(defconstant sewl-vis-shrub 1144) +(defconstant museum3-water 3362) +(defconstant sewl-vis-tfrag 1143) +(defconstant museum3-pris2 3361) +(defconstant onintent-tfrag 1158) +(defconstant onintent-pris 1156) +(defconstant onintent-water 1159) +(defconstant stadium-vis-alpha 2514) +(defconstant sewn-vis-pris 1973) +(defconstant templed-vis-water 2623) +(defconstant wasstada-tfrag 405) +(defconstant wasstada-shrub 630) +(defconstant wasstada-alpha 609) +(defconstant museum-pris 3296) +(defconstant powergd-tfrag 2187) +(defconstant powergd-sprite 3181) +(defconstant slumbset-tfrag 2428) +(defconstant factoryb-minimap 1319) +(defconstant volcanox-shrub 1990) +(defconstant lctyass-pris 3099) +(defconstant mhcitya-sprite 2389) +(defconstant hiphog-vis-tfrag 1848) +(defconstant ctygenb-vis-shrub 225) +(defconstant ldamsig-pris2 1088) +(defconstant outcast3-pris 3306) +(defconstant mhcitya-minimap 2197) +(defconstant precurd-vis-pris2 3188) +(defconstant ltowerb-vis-pris 2653) +(defconstant ljkdmpk-pris2 1540) +(defconstant ltowerb-vis-alpha 2649) +(defconstant ltowerb-vis-pris2 2654) +(defconstant lnstcst-pris 1766) +(defconstant lnstcst-water 1768) +(defconstant lnstcst-pris2 1767) +(defconstant ltowera-vis-alpha 2646) +(defconstant ljaksig-pris2 1537) +(defconstant intpalrf-tfrag 428) +(defconstant ljkdmpk-pris 1539) +(defconstant ltowerb-vis-shrub 2648) +(defconstant intpalrf-alpha 430) +(defconstant towercst-pris 2983) +(defconstant intpfall-sprite 1007) +(defconstant towercst-alpha 3225) +(defconstant towercst-water 2985) +(defconstant towercst-pris2 2984) +(defconstant ctyport-minimap 265) +(defconstant desertg-vis-shrub 1374) +(defconstant railf-tfrag 2483) +(defconstant rubblea2-vis-water 2510) +(defconstant ctyinda-vis-pris 1401) +(defconstant ctyinda-minimap 175) +(defconstant ctyfarma-vis-water 247) +(defconstant waschase-minimap 1356) +(defconstant wascast-pris2 2323) +(defconstant wasintro-vis-shrub 1214) +(defconstant wasintro-hfrag 1037) +(defconstant ldampksm-pris2 1093) +(defconstant museum2-pris 3311) +(defconstant museum2-water 3313) +(defconstant museum2-pris2 3312) +(defconstant inttitle-minimap 1073) +(defconstant stadiuma-vis-tfrag 2814) +(defconstant stadiuma-minimap 2450) +(defconstant museum4b-pris 3417) +(defconstant desrace1-pris 1300) +(defconstant lnstobb-minimap 1867) +(defconstant desrally-minimap 2976) +(defconstant sewf-vis-shrub 758) +(defconstant rubbleb-vis-tfrag 2058) +(defconstant ctycarb-pris 949) +(defconstant sewf-vis-pris 759) +(defconstant lblowtkg-pris 2977) +(defconstant comba-alpha 2481) +(defconstant deserta-vis-tfrag 1372) +(defconstant templea-warp 2688) +(defconstant deserta-vis-shrub 1579) +(defconstant foresta-warp 3202) +(defconstant combb-tfrag 2189) +(defconstant wasstadc-minimap 1446) +(defconstant desertc-vis-tfrag 1371) +(defconstant intpalrf-shrub 429) +(defconstant ltowerb-vis-tfrag 2647) +(defconstant ljaksig-water 1538) +(defconstant sewi-vis-water 1122) +(defconstant halfpipe-tfrag 13) +(defconstant lctysnpr-water 2177) +(defconstant sewi-vis-shrub 1124) +(defconstant factoryc-vis-tfrag 2233) +(defconstant halfpipe-pris 15) +(defconstant wasdefen-pris 2527) +(defconstant desrace1-tfrag 1418) +(defconstant rubblea2-vis-tfrag 2508) +(defconstant desrace1-water 1399) +(defconstant sewn-vis-tfrag 1971) +(defconstant sewn-vis-shrub 1972) +(defconstant sewn-vis-water 1970) +(defconstant sewd-vis-pris 752) +(defconstant mineb-vis-water 1856) +(defconstant sewd-vis-shrub 747) +(defconstant gridcst-pris2 2968) +(defconstant sewd-vis-water 750) +(defconstant lsigklv-pris 2292) +(defconstant lfacctyb-vis-tfrag 3401) +(defconstant lsigklv-pris2 2293) +(defconstant lfacctyb-vis-alpha 3402) +(defconstant lformach-minimap 1555) +(defconstant nsta-sprite 446) +(defconstant lbbspid-pris 2664) +(defconstant foresta-vis-tfrag 773) +(defconstant foresta-vis-pris 774) +(defconstant volcanoa-sprite 2050) +(defconstant foresta-vis-shrub 941) +(defconstant foresta-vis-water 775) +(defconstant foresta-sprite 1357) +(defconstant lbbring5-sprite 2940) +(defconstant sewa-vis-tfrag 740) +(defconstant hiphog-vis-pris 1849) +(defconstant ctygenb-vis-tfrag 226) +(defconstant hiphog-sprite 895) +(defconstant ctygenb-vis-pris 224) + diff --git a/goal_src/jak3/engine/debug/anim-tester.gc b/goal_src/jak3/engine/debug/anim-tester.gc index 77b7329d1a..32f710d826 100644 --- a/goal_src/jak3/engine/debug/anim-tester.gc +++ b/goal_src/jak3/engine/debug/anim-tester.gc @@ -5,5 +5,168 @@ ;; name in dgo: anim-tester ;; dgos: GAME +(define-extern anim-tester-start (function symbol)) + ;; DECOMP BEGINS +(deftype list-control (structure) + ((listfunc (function int list-control symbol) :offset-assert 0) ;; guessed by decompiler + (list-owner uint32 :offset-assert 4) + (top int32 :offset-assert 8) + (left int32 :offset-assert 12) + (list glst-list :offset-assert 16) + (the-node glst-node :offset-assert 20) + (top-index int32 :offset-assert 24) + (the-index int32 :offset-assert 28) + (the-disp-line int32 :offset-assert 32) + (highlight-index int32 :offset-assert 36) + (current-index int32 :offset-assert 40) + (numlines int32 :offset-assert 44) + (lines-to-disp int32 :offset-assert 48) + (charswide int32 :offset-assert 52) + (highlight-disp-line int32 :offset-assert 56) + (field-id int32 :offset-assert 60) + (xpos int32 :offset-assert 64) + (ypos int32 :offset-assert 68) + (user-info int32 :offset-assert 72) + (return-int int32 :offset-assert 76) + ) + :allow-misaligned + :method-count-assert 9 + :size-assert #x50 + :flag-assert #x900000050 + ) + +(deftype list-field (structure) + ((left int32 :offset-assert 0) + (width int32 :offset-assert 4) + ) + :method-count-assert 9 + :size-assert #x8 + :flag-assert #x900000008 + ) + +(deftype DISP_LIST-bank (basic) + ((V_SPACING int32 :offset-assert 4) + (BORDER_WIDTH int32 :offset-assert 8) + (BORDER_HEIGHT int32 :offset-assert 12) + (MAX_LINES int32 :offset-assert 16) + (CHAR_WIDTH int32 :offset-assert 20) + (INC_DELAY int32 :offset-assert 24) + (BORDER_LINES int32 :offset-assert 28) + (CXOFF int32 :offset-assert 32) + (CYOFF int32 :offset-assert 36) + (BXOFF int32 :offset-assert 40) + (BYOFF int32 :offset-assert 44) + ) + :method-count-assert 9 + :size-assert #x30 + :flag-assert #x900000030 + ) + +(deftype anim-tester-bank (basic) + ((ANIM_SPEED float :offset-assert 4) + (BLEND float :offset-assert 8) + (OBJECT_LIST_X int32 :offset-assert 12) + (OBJECT_LIST_Y int32 :offset-assert 16) + (OBJECT_LIST_MIN_WIDTH int32 :offset-assert 20) + (ANIM_LIST_X int32 :offset-assert 24) + (ANIM_LIST_Y int32 :offset-assert 28) + (ANIM_LIST_MIN_WIDTH int32 :offset-assert 32) + (PICK_LIST_X int32 :offset-assert 36) + (PICK_LIST_Y int32 :offset-assert 40) + (PICK_LIST_MIN_WIDTH int32 :offset-assert 44) + (EDIT_LIST_X int32 :offset-assert 48) + (EDIT_LIST_Y int32 :offset-assert 52) + (EDIT_STATS_X int32 :offset-assert 56) + (EDIT_LIST_MIN_WIDTH int32 :offset-assert 60) + (EDIT_PICK_X int32 :offset-assert 64) + ) + :method-count-assert 9 + :size-assert #x44 + :flag-assert #x900000044 + ) + +(defenum anim-tester-flags + :bitfield #t + :type int32 + (fanimt0) + (fanimt1) + (fanimt2) + (fanimt3) + (fanimt4) + (fanimt5) + ) + +(deftype anim-tester (process-focusable) + ((flags anim-tester-flags :offset-assert 208) + (obj-list glst-list :inline :offset-assert 212) + (current-obj string :offset-assert 228) + (speed int32 :offset-assert 232) + (list-con list-control :inline :offset-assert 236) + (pick-con list-control :inline :offset-assert 316) + (item-field int64 :offset-assert 400) + (inc-delay int32 :offset-assert 408) + (inc-timer int32 :offset-assert 412) + (edit-mode int32 :offset-assert 416) + (old-mode int32 :offset-assert 420) + (anim-speed float :offset-assert 424) + (anim-gspeed float :offset-assert 428) + (anim-first float :offset-assert 432) + (anim-last float :offset-assert 436) + ) + :method-count-assert 28 + :size-assert #x1b8 + :heap-base #x140 + :flag-assert #x1c014001b8 + (:states + anim-tester-process + ) + ) + +(deftype anim-test-obj (glst-named-node) + ((obj-art-group basic :offset-assert 12) + (seq-list glst-list :inline :offset-assert 16) + (flags int32 :offset-assert 32) + (mesh-geo basic :offset-assert 36) + (joint-geo basic :offset-assert 40) + (list-con list-control :inline :offset-assert 44) + (parent uint32 :offset-assert 124) + (anim-index int32 :offset-assert 128) + (anim-hindex int32 :offset-assert 132) + (seq-index int32 :offset-assert 136) + (seq-hindex int32 :offset-assert 140) + ) + :method-count-assert 9 + :size-assert #x90 + :flag-assert #x900000090 + ) + +(deftype anim-test-sequence (glst-named-node) + ((item-list glst-list :inline :offset-assert 12) + (playing-item int32 :offset-assert 28) + (flags int32 :offset-assert 32) + (list-con list-control :inline :offset-assert 36) + (parent anim-test-obj :offset-assert 116) + ) + :method-count-assert 9 + :size-assert #x78 + :flag-assert #x900000078 + ) + +(deftype anim-test-seq-item (glst-named-node) + ((speed int32 :offset-assert 12) + (blend int32 :offset-assert 16) + (first-frame float :offset-assert 20) + (last-frame float :offset-assert 24) + (num-frames float :offset-assert 28) + (artist-base float :offset-assert 32) + (flags int32 :offset-assert 36) + (parent anim-test-sequence :offset-assert 40) + ) + :method-count-assert 9 + :size-assert #x2c + :flag-assert #x90000002c + ) + +(define-extern *anim-tester* (pointer anim-tester)) \ No newline at end of file diff --git a/goal_src/jak3/engine/debug/bug-report.gc b/goal_src/jak3/engine/debug/bug-report.gc index 9a9dc9d0dd..b56f7912e6 100644 --- a/goal_src/jak3/engine/debug/bug-report.gc +++ b/goal_src/jak3/engine/debug/bug-report.gc @@ -5,5 +5,383 @@ ;; name in dgo: bug-report ;; dgos: GAME +(declare-type bug-report process) + +(define-extern *bug-report* (pointer bug-report)) + ;; DECOMP BEGINS +;; og:preserve-this this file was manually rewritten +(declare-file (debug)) + +(define *continue-bug-report* + (new 'static 'continue-point + :name "wasall-start" + :level #f + :flags (continue-flags continue-flag-16) + :trans (new 'static 'vector :x 9283373.0 :y 126422.22 :z 1057314.9 :w 1.0) + :camera-trans (new 'static 'vector :x 9272728.0 :y 147014.05 :z 1009150.4 :w 1.0) + :quat (new 'static 'vector4h :data (new 'static 'array int16 4 -36 #x5dfc 22 #x56de)) + :camera-rot (new 'static 'array int16 9 #x796a 0 -10364 #x4b5 #x7f20 #xe21 #x2834 -3810 #x7899) + :on-goto #f + :vis-nick 'wasall + :vehicle-type #x1b + :want-count 4 + :want (new 'static 'inline-array level-buffer-state-small 4 + (new 'static 'level-buffer-state-small :name 'wasall :display? 'special) + (new 'static 'level-buffer-state-small :name 'desert-game :display? 'display) + (new 'static 'level-buffer-state-small :name 'wasdoors :display? 'display) + (new 'static 'level-buffer-state-small :name 'desertb :display? 'display) + ) + :want-sound (new 'static 'array symbol 3 'wasall1 'desert1 'desert2) + ) + ) + +(deftype bug-report (process) + ((bug-number uint32 5) + (digit uint32) + (state-time time-frame) + (next-down time-frame) + ) + (:state-methods + idle + ) + (:methods + (bug-report-method-15 (_type_) none) + (bug-report-method-16 (_type_) none) + ) + ) + +(define *bug-report* (the (pointer bug-report) #f)) + +(defmethod inspect ((this bug-report)) + (call-parent-method this) + (format #t "~2Tbug-number[5] @ #x~X~%" (-> this bug-number)) + (dotimes (i 5) + (format #t "~T [~D]~2Tbug-number: ~D~%" i (-> this bug-number i)) + ) + (format #t "~2Tdigit: ~D~%" (-> this digit)) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (format #t "~2Tnext-down: ~D~%" (-> this next-down)) + this + ) + +(defmethod deactivate ((this bug-report)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set! *bug-report* (the (pointer bug-report) #f)) + (call-parent-method this) + ) + +(defbehavior bug-report-init bug-report () + (set! *bug-report* (the (pointer bug-report) (process->ppointer self))) + (set! (-> self bug-number 0) (the-as uint 0)) + (set! (-> self bug-number 1) (the-as uint 0)) + (set! (-> self bug-number 2) (the-as uint 0)) + (set! (-> self bug-number 3) (the-as uint 0)) + (set! (-> self bug-number 4) (the-as uint 0)) + (set! (-> self digit) (the-as uint 0)) + (set! (-> self next-down) 0) + (go-virtual idle) + ) + +(defun bug-report-stop () + (kill-by-type bug-report *active-pool*) + (none) + ) + +(defun bug-report-start () + (bug-report-stop) + (process-spawn bug-report :init bug-report-init :name "bug-report") + (none) + ) + +(defstate idle (bug-report) + :virtual #t + :enter (behavior () (set-time! (-> self state-time))) + :code sleep-code + :trans (behavior () + (when (cpad-hold? 0 l2) + (when (>= (- (current-time) (-> self next-down)) 0) + (when (cpad-hold? 0 left) + (set! (-> self next-down) (+ (current-time) (seconds 0.2))) + (if (zero? (-> self digit)) + (set! (-> self digit) (the-as uint 4)) + (+! (-> self digit) -1) + ) + ) + (when (cpad-hold? 0 right) + (set! (-> self next-down) (+ (current-time) (seconds 0.2))) + (cond + ((= (-> self digit) 4) + (set! (-> self digit) (the-as uint 0)) + 0 + ) + (else + (+! (-> self digit) 1) + ) + ) + ) + (when (cpad-hold? 0 up) + (set! (-> self next-down) (+ (current-time) (seconds 0.2))) + (cond + ((= (-> self bug-number (-> self digit)) 9) + (set! (-> self bug-number (-> self digit)) (the-as uint 0)) + 0 + ) + (else + (+! (-> self bug-number (-> self digit)) 1) + ) + ) + ) + (when (cpad-hold? 0 down) + (set! (-> self next-down) (+ (current-time) (seconds 0.2))) + (if (zero? (-> self bug-number (-> self digit))) + (set! (-> self bug-number (-> self digit)) (the-as uint 9)) + (+! (-> self bug-number (-> self digit)) -1) + ) + ) + ) + (if (cpad-pressed? 0 x) + (bug-report-method-16 self) + ) + 0 + ) + (with-dma-buffer-add-bucket ((s5-0 (-> *display* frames (-> *display* on-screen) debug-buf)) + (bucket-id hud-draw-hud-alpha) + ) + (draw-string-xy "Use L2 + X to Load" s5-0 32 80 (font-color white) (font-flags kerning)) + (draw-string-xy "Use L2 + D-Pad to change bug number" s5-0 32 112 (font-color white) (font-flags kerning)) + (dotimes (s4-0 5) + (let ((s3-0 (clear *temp-string*))) + (format s3-0 "~1,'0D" (-> self bug-number s4-0)) + (draw-string-xy + s3-0 + s5-0 + (+ (* 24 s4-0) 32) + 132 + (if (= (-> self digit) s4-0) + (font-color red) + (font-color yellow) + ) + (font-flags kerning large) + ) + ) + ) + ) + ) + ) + +(defmethod bug-report-method-15 ((this bug-report)) + (if (not *target*) + (return #f) + ) + (let ((a0-1 (-> *target* control)) + (s5-0 *continue-bug-report*) + ) + (set! (-> s5-0 trans quad) (-> a0-1 trans quad)) + (set-vector! + (-> s5-0 quat) + (the int (* 32767.0 (-> a0-1 quat x))) + (the int (* 32767.0 (-> a0-1 quat y))) + (the int (* 32767.0 (-> a0-1 quat z))) + (the int (* 32767.0 (-> a0-1 quat w))) + ) + (let ((v1-6 *math-camera*)) + (set! (-> s5-0 camera-trans quad) (-> v1-6 trans quad)) + (set! (-> s5-0 camera-rot 0) (the int (* 32767.0 (-> v1-6 inv-camera-rot rvec x)))) + (set! (-> s5-0 camera-rot 1) (the int (* 32767.0 (-> v1-6 inv-camera-rot rvec y)))) + (set! (-> s5-0 camera-rot 2) (the int (* 32767.0 (-> v1-6 inv-camera-rot rvec z)))) + (set! (-> s5-0 camera-rot 3) (the int (* 32767.0 (-> v1-6 inv-camera-rot uvec x)))) + (set! (-> s5-0 camera-rot 4) (the int (* 32767.0 (-> v1-6 inv-camera-rot uvec y)))) + (set! (-> s5-0 camera-rot 5) (the int (* 32767.0 (-> v1-6 inv-camera-rot uvec z)))) + (set! (-> s5-0 camera-rot 6) (the int (* 32767.0 (-> v1-6 inv-camera-rot fvec x)))) + (set! (-> s5-0 camera-rot 7) (the int (* 32767.0 (-> v1-6 inv-camera-rot fvec y)))) + (set! (-> s5-0 camera-rot 8) (the int (* 32767.0 (-> v1-6 inv-camera-rot fvec z)))) + ) + (dotimes (s4-0 4) + (let ((v1-10 (lookup-level-info (-> *load-state* want s4-0 name)))) + (cond + ((and v1-10 (!= (-> v1-10 memory-mode) 10)) + (set! (-> s5-0 want s4-0 name) (-> *load-state* want s4-0 name)) + (set! (-> s5-0 want s4-0 display?) (-> *load-state* want s4-0 display?)) + ) + (else + (set! (-> s5-0 want s4-0 name) #f) + (set! (-> s5-0 want s4-0 display?) #f) + ) + ) + ) + ) + ) + (format + (clear *temp-string*) + "db/bug-report/bug-report-~D~D~D~D~D.txt" + (-> this bug-number 0) + (-> this bug-number 1) + (-> this bug-number 2) + (-> this bug-number 3) + (-> this bug-number 4) + ) + *temp-string* + (let ((gp-1 (new 'stack 'file-stream *temp-string* 'write))) + (let ((s5-2 format) + (s4-1 gp-1) + (s3-0 "nick ~S~%") + (v1-29 (lookup-level-info (-> *load-state* vis-nick))) + ) + (s5-2 s4-1 s3-0 (if v1-29 + (-> v1-29 name) + ) + ) + ) + (let ((t9-6 format) + (a0-37 gp-1) + (a1-16 "continue ~S~%") + (v1-31 (-> *game-info* current-continue)) + ) + (t9-6 a0-37 a1-16 (if v1-31 + (-> v1-31 name) + ) + ) + ) + (dotimes (s5-3 10) + (format gp-1 "level ~D ~A ~A~%" s5-3 (-> *load-state* want s5-3 name) (-> *load-state* want s5-3 display?)) + ) + (format gp-1 "music ~-8S~%" (-> *setting-control* user-current music)) + (dotimes (s5-4 6) + (format gp-1 "sound ~D ~-8S~%" s5-4 (-> *level* sound-bank s5-4 name)) + ) + (let ((v1-43 (target-pos 0))) + (format gp-1 "target ~f ~f ~f~%" (-> v1-43 x) (-> v1-43 y) (-> v1-43 z)) + ) + (let ((s5-5 *math-camera*)) + (format gp-1 "camera-trans ~f ~f ~f~%" (-> s5-5 trans x) (-> s5-5 trans y) (-> s5-5 trans z)) + (format + gp-1 + "camera-rot ~f ~f ~f " + (-> s5-5 inv-camera-rot rvec x) + (-> s5-5 inv-camera-rot rvec y) + (-> s5-5 inv-camera-rot rvec z) + ) + (format + gp-1 + "~f ~f ~f " + (-> s5-5 inv-camera-rot uvec x) + (-> s5-5 inv-camera-rot uvec y) + (-> s5-5 inv-camera-rot uvec z) + ) + (format + gp-1 + "~f ~f ~f~%" + (-> s5-5 inv-camera-rot fvec x) + (-> s5-5 inv-camera-rot fvec y) + (-> s5-5 inv-camera-rot fvec z) + ) + ) + (let ((s5-6 (-> *game-info* sub-task-list))) + (dotimes (s4-2 (-> s5-6 length)) + (when (nonzero? s4-2) + (let ((s3-1 (-> s5-6 s4-2))) + (if (game-task-node-info-method-12 s3-1) + (format gp-1 "open-node ~s~%" (-> s3-1 name)) + ) + ) + ) + ) + ) + (file-stream-close gp-1) + (file-stream-close gp-1) + ) + (none) + ) + +(defmethod bug-report-method-16 ((this bug-report)) + (local-vars + (sv-128 string) + (sv-132 string) + (sv-136 continue-point) + (sv-140 int) + (sv-144 vector) + (sv-148 vector) + ) + (format + (clear *temp-string*) + "db/bug-report/bug-report-~D~D~D~D~D.txt" + (-> this bug-number 0) + (-> this bug-number 1) + (-> this bug-number 2) + (-> this bug-number 3) + (-> this bug-number 4) + ) + *temp-string* + (let ((gp-1 (new 'stack 'file-stream *temp-string* 'read))) + (when (zero? (-> gp-1 file)) + (set! sv-128 (new 'debug 'string 1024 (the-as string #f))) + (set! sv-132 (new 'debug 'string 64 (the-as string #f))) + (set! sv-136 *continue-bug-report*) + (set! sv-140 0) + (set! sv-144 (new 'stack-no-clear 'vector)) + (set! sv-148 (new 'stack-no-clear 'vector)) + (file-stream-read-string gp-1 sv-128) + (while (string-get-arg!! sv-132 sv-128) + (cond + ((string= "nick" sv-132) + (string-get-arg!! sv-132 sv-128) + ) + ((string= "continue" sv-132) + (string-get-arg!! sv-132 sv-128) + ) + ((string= "level" sv-132) + (string-get-int32!! (the-as (pointer int32) (& sv-140)) sv-128) + (string-get-arg!! sv-132 sv-128) + (set! (-> sv-136 want sv-140 name) (string->symbol sv-132)) + (string-get-arg!! sv-132 sv-128) + (set! (-> sv-136 want sv-140 display?) (string->symbol sv-132)) + ) + ((string= "music" sv-132) + (string-get-arg!! sv-132 sv-128) + ) + ((string= "target" sv-132) + (string-get-float!! (the-as (pointer float) (-> sv-136 trans)) sv-128) + (string-get-float!! (&-> sv-136 trans y) sv-128) + (string-get-float!! (&-> sv-136 trans z) sv-128) + ) + ((string= "camera-trans" sv-132) + (string-get-float!! (the-as (pointer float) (-> sv-136 camera-trans)) sv-128) + (string-get-float!! (&-> sv-136 camera-trans y) sv-128) + (string-get-float!! (&-> sv-136 camera-trans z) sv-128) + ) + ((string= "camera-rot" sv-132) + (let ((s5-1 (new 'stack-no-clear 'array 'float 9))) + (string-get-float!! (&-> s5-1 0) sv-128) + (string-get-float!! (&-> s5-1 1) sv-128) + (string-get-float!! (&-> s5-1 2) sv-128) + (string-get-float!! (&-> s5-1 3) sv-128) + (string-get-float!! (&-> s5-1 4) sv-128) + (string-get-float!! (&-> s5-1 5) sv-128) + (string-get-float!! (&-> s5-1 6) sv-128) + (string-get-float!! (&-> s5-1 7) sv-128) + (string-get-float!! (&-> s5-1 8) sv-128) + (dotimes (v1-34 9) + (set! (-> sv-136 camera-rot v1-34) (the int (* 32767.0 (-> s5-1 v1-34)))) + ) + ) + ) + ((string= "open-node" sv-132) + (string-get-arg!! sv-132 sv-128) + (let ((a0-48 (task-node-index-by-name sv-132))) + (if a0-48 + (task-node-open! (the-as game-task-node a0-48) 'menu) + ) + ) + ) + ) + ) + (file-stream-close gp-1) + (stop 'debug) + (start 'debug *continue-bug-report*) + ) + (file-stream-close gp-1) + ) + (none) + ) diff --git a/goal_src/jak3/engine/debug/collision-editor.gc b/goal_src/jak3/engine/debug/collision-editor.gc index c32215bc43..e32c2daf9e 100644 --- a/goal_src/jak3/engine/debug/collision-editor.gc +++ b/goal_src/jak3/engine/debug/collision-editor.gc @@ -5,5 +5,955 @@ ;; name in dgo: collision-editor ;; dgos: GAME +;; +++collision-editor-func +(defenum collision-editor-func + :type uint64 + (analog 0) + (edit 1) + (print-collision 2) + (stop-editor 3) + ) +;; ---collision-editor-func + + ;; DECOMP BEGINS +;; this file is debug only +(declare-file (debug)) + +(defskelgroup skel-collision-editor sew-rove-plat sew-rove-plat-lod0-jg sew-rove-plat-idle-ja + ((sew-rove-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 100) + ) + +(deftype collision-editor-default-proc (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defstate idle (collision-editor-default-proc) + :virtual #t + :trans (behavior () + (deactivate self) + ) + :code sleep-code + ) + +(defbehavior collision-editor-default-proc-init-by-other collision-editor-default-proc () + (let ((gp-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-sphere gp-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 4096000.0) + (set! (-> gp-0 total-prims) (the-as uint 1)) + (set! (-> gp-0 root-prim) v1-2) + ) + (set! (-> gp-0 nav-radius) (* 0.75 (-> gp-0 root-prim local-sphere w))) + (let ((v1-5 (-> gp-0 root-prim))) + (set! (-> gp-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> gp-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> self root) gp-0) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-collision-editor" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (transform-post) + (go-virtual idle) + ) + +(deftype collision-editor-edited-proc (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defstate idle (collision-editor-edited-proc) + :virtual #t + :code sleep-code + :post (behavior () + (transform-post) + ) + ) + +(defbehavior collision-editor-edited-proc-init-by-other collision-editor-edited-proc () + (let ((gp-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-sphere gp-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! (-> gp-0 total-prims) (the-as uint 1)) + (set! (-> gp-0 root-prim) v1-2) + ) + (set! (-> gp-0 nav-radius) (* 0.75 (-> gp-0 root-prim local-sphere w))) + (let ((v1-5 (-> gp-0 root-prim))) + (set! (-> gp-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> gp-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> self root) gp-0) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-collision-editor" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go-virtual idle) + ) + +(define *collision-editor-mesh-names* (new 'static 'boxed-array :type string "moveplat")) + +(define *collision-editor-art-group-name* "sew-rove-plat") + +(defun collision-editor-add-mesh-to-ccache ((arg0 collide-shape-prim-group) (arg1 collide-cache)) + (set! (-> arg1 collide-box4w min x) -409600000) + (set! (-> arg1 collide-box4w min y) -409600000) + (set! (-> arg1 collide-box4w min z) -409600000) + (set! (-> arg1 collide-box4w max x) #x186a0000) + (set! (-> arg1 collide-box4w max y) #x186a0000) + (set! (-> arg1 collide-box4w max z) #x186a0000) + (set! (-> arg1 num-tris) 0) + (set! (-> arg1 num-prims) 0) + (set! (-> arg1 collide-with) (the-as collide-spec -1)) + (set! (-> arg1 ignore-mask) (new 'static 'pat-surface)) + (add-fg-prim-using-box arg0 arg1) + (none) + ) + +;; 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 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 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 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 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 272 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16 +(defun print-default-collision ((arg0 process-drawable)) + (local-vars (sv-224 matrix) (sv-240 symbol) (sv-256 string) (sv-272 float) (sv-288 float)) + (let ((gp-0 (process-spawn collision-editor-default-proc :name "collision-editor-default-proc"))) + (when gp-0 + (when (and (nonzero? (-> (the-as process-drawable (-> gp-0 0)) draw)) + (-> (the-as process-drawable (-> gp-0 0)) draw jgeo) + ) + (format #t "(group (#f~%") + (format #t " :action (solid)~%") + (format #t " :collide-as enemy~%") + (format #t " :collide-with (player-list hit-by-others-list jak bot)~%") + (format #t " :sphere ((meters 0.0) (meters 0.0) (meters 0.0) (meters 2.0))~%") + (format + #t + " :transform-index (joint-node-index ~S ~S)~%" + *collision-editor-art-group-name* + (-> (the-as process-drawable (-> gp-0 0)) node-list data 3 joint name) + ) + (format #t " :children (~%") + (let* ((t9-10 (method-of-type res-lump get-property-struct)) + (a0-11 (-> (the-as process-drawable (-> gp-0 0)) draw jgeo extra)) + (a1-10 'collide-mesh-group) + (a2-3 'interp) + (a3-3 -1000000000.0) + (t0-0 (the-as float #f)) + (s5-1 (the-as + (array collide-mesh) + (t9-10 a0-11 a1-10 a2-3 a3-3 (the-as structure t0-0) (the-as (pointer res-tag) #f) *res-static-buf*) + ) + ) + ) + (cond + ((and s5-1 (> (length s5-1) 0)) + (dotimes (s4-0 (length s5-1)) + (format + #t + " (mesh ((la-collide-mesh ~S ~S)~%" + *collision-editor-art-group-name* + (-> *collision-editor-mesh-names* s4-0) + ) + (format #t " :action solid~%") + (format #t " :collide-as enemy~%") + (format #t " :collide-with (player-list hit-by-others-list jak bot)~%") + (let ((v1-22 (-> s5-1 s4-0 joint-id))) + (cond + ((= v1-22 -1) + (format #t " ;;:transform-index JOINT_ID_NO_TRANSFORM~%") + ) + ((= v1-22 -2) + (format #t " ;;:transform-index JOINT_ID_ROOT_TRANSLATION~%") + ) + ((= v1-22 -3) + (format #t " ;;:transform-index JOINT_ID_ROOT_TRANSFORM~%") + ) + (else + (let ((t9-19 format) + (a0-23 #t) + (a1-18 " :transform-index (joint-node-index ~S ~S)~%") + (a2-5 *collision-editor-art-group-name*) + (a3-12 (-> (the-as process-drawable (-> gp-0 0)) node-list data (+ (-> s5-1 s4-0 joint-id) 1) joint name)) + ) + (t9-19 a0-23 a1-18 a2-5 a3-12) + (let ((s0-0 (new 'stack 'collide-shape-prim-mesh (the-as collide-shape 0) (the-as uint a3-12) (the-as uint t0-0)))) + (set! (-> s0-0 cshape) (the-as collide-shape (-> (the-as process-drawable (-> gp-0 0)) root))) + (set! (-> s0-0 transform-index) (+ (-> s5-1 s4-0 joint-id) 1)) + (set! (-> s0-0 prim-core prim-type) 1) + (set! (-> s0-0 local-sphere w) 1.0) + (set! (-> s0-0 mesh) (-> s5-1 s4-0)) + (set! (-> s0-0 mesh-cache-id) (the-as uint 0)) + (set! (-> s0-0 mesh-id) s4-0) + (collision-editor-add-mesh-to-ccache (the-as collide-shape-prim-group s0-0) *collide-cache*) + (let ((a0-26 (the-as object (-> *collide-cache* tris))) + (v1-41 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'vector)) + ) + (when (nonzero? (-> *collide-cache* num-tris)) + (set! (-> v1-41 quad) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 quad)) + (set! (-> s2-0 quad) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 quad)) + ) + (countdown (a1-27 (-> *collide-cache* num-tris)) + (set! (-> v1-41 x) (fmin + (fmin + (fmin (-> v1-41 x) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 x)) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 x) + ) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 x) + ) + ) + (set! (-> v1-41 y) (fmin + (fmin + (fmin (-> v1-41 y) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 y)) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 y) + ) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 y) + ) + ) + (set! (-> v1-41 z) (fmin + (fmin + (fmin (-> v1-41 z) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 z)) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 z) + ) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 z) + ) + ) + (set! (-> s2-0 x) (fmax + (fmax + (fmax (-> s2-0 x) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 x)) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 x) + ) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 x) + ) + ) + (set! (-> s2-0 y) (fmax + (fmax + (fmax (-> s2-0 y) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 y)) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 y) + ) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 y) + ) + ) + (set! (-> s2-0 z) (fmax + (fmax + (fmax (-> s2-0 z) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 z)) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 z) + ) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 z) + ) + ) + (set! a0-26 (-> (the-as (inline-array collide-cache-tri) a0-26) 1)) + ) + (vector+! s3-0 v1-41 s2-0) + (vector-float*! s3-0 s3-0 0.5) + (vector<-cspace! s1-0 (-> (the-as process-drawable (-> gp-0 0)) node-list data (-> s0-0 transform-index))) + (vector-! s1-0 s3-0 s1-0) + (set! sv-224 (new 'stack-no-clear 'matrix)) + (let* ((a0-35 (-> (the-as process-drawable (-> gp-0 0)) node-list data (-> s0-0 transform-index) bone transform)) + (a2-11 (-> a0-35 rvec quad)) + (a1-36 (-> a0-35 uvec quad)) + (v1-53 (-> a0-35 fvec quad)) + (a0-36 (-> a0-35 trans quad)) + ) + (set! (-> sv-224 rvec quad) a2-11) + (set! (-> sv-224 uvec quad) a1-36) + (set! (-> sv-224 fvec quad) v1-53) + (set! (-> sv-224 trans quad) a0-36) + ) + (vector-reset! (-> sv-224 trans)) + (matrix-transpose! sv-224 sv-224) + (vector-matrix*! s1-0 s1-0 sv-224) + (let ((s0-1 format)) + (set! sv-240 #t) + (set! sv-256 " :sphere ((meters ~M) (meters ~M) (meters ~M) (meters ~M))~%") + (set! sv-272 (-> s1-0 x)) + (set! sv-288 (-> s1-0 y)) + (let ((s1-1 (-> s1-0 z)) + (t1-1 (* 1.0001 (vector-vector-distance s3-0 s2-0))) + ) + (set! t0-0 s1-1) + (s0-1 sv-240 sv-256 sv-272 sv-288 t0-0 t1-1) + ) + ) + ) + ) + ) + ) + ) + ) + (format #t " ))~%") + ) + #f + ) + (else + (format #t " (sphere (#f~%") + (format #t " :action solid~%") + (format #t " :collide-as enemy~%") + (format #t " :collide-with (player-list hit-by-others-list jak bot)~%") + (format + #t + " :transform-index (joint-node-index ~S ~S)~%" + *collision-editor-art-group-name* + (-> (the-as process-drawable (-> gp-0 0)) node-list data 3 joint name) + ) + (format #t " :sphere ((meters 0.0) (meters 0.0) (meters 0.0) (meters 1.0))~%") + (format #t " ))~%") + ) + ) + ) + (format #t " )))~%") + ) + ) + (deactivate (-> gp-0 0)) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defun print-actual-collision ((arg0 process-drawable)) + (format #t "~%~%") + (when arg0 + (when (type? (-> arg0 root) collide-shape) + (let ((s5-0 (-> (the-as collide-shape (-> arg0 root)) root-prim)) + (s4-0 0) + ) + (let ((v1-3 (-> s5-0 prim-core prim-type))) + (cond + ((or (= v1-3 1) (= v1-3 -1)) + (set! s4-0 1) + ) + ((zero? v1-3) + (let ((s4-1 s5-0)) + (format #t "(group (#f~%") + (format #t " ;;:action (solid)~%") + (format #t " ;;:collide-as enemy~%") + (format #t " ;;:collide-with (player-list hit-by-others-list jak bot)~%") + (format + #t + " :sphere ((meters ~M) (meters ~M) (meters ~M) (meters ~M))~%" + (-> s5-0 local-sphere x) + (-> s5-0 local-sphere y) + (-> s5-0 local-sphere z) + (-> s5-0 local-sphere w) + ) + (format + #t + " :transform-index (joint-node-index ~S ~S)~%" + *collision-editor-art-group-name* + (-> arg0 node-list data (-> s4-1 transform-index) joint name) + ) + (format #t " :children (~%") + (set! s4-0 (the-as int (-> s4-1 specific 1))) + ) + (&+! s5-0 80) + ) + ) + ) + (dotimes (s3-0 s4-0) + (case (-> s5-0 prim-core prim-type) + ((1) + (let ((v1-11 s5-0)) + (format + #t + " (mesh ((la-collide-mesh ~S ~S)~%" + *collision-editor-art-group-name* + (-> (the-as + (array string) + (+ (* (-> (the-as collide-shape-prim-mesh v1-11) mesh-id) 4) (the-as int *collision-editor-mesh-names*)) + ) + 0 + ) + ) + ) + (format #t " ;;:action solid~%") + (format #t " ;;:collide-as enemy~%") + (format #t " ;;:collide-with (player-list hit-by-others-list jak bot)~%") + (format + #t + " :transform-index (joint-node-index ~S ~S)~%" + *collision-editor-art-group-name* + (-> arg0 node-list data (-> s5-0 transform-index) joint name) + ) + (format + #t + " :sphere ((meters ~M) (meters ~M) (meters ~M) (meters ~M))~%" + (-> s5-0 local-sphere x) + (-> s5-0 local-sphere y) + (-> s5-0 local-sphere z) + (-> s5-0 local-sphere w) + ) + (format #t " ))~%") + ) + ((-1) + (format #t " (sphere (#f~%") + (format #t " ;;:action solid~%") + (format #t " ;;:collide-as enemy~%") + (format #t " ;;:collide-with (player-list hit-by-others-list jak bot)~%") + (format + #t + " :transform-index (joint-node-index ~S ~S)~%" + *collision-editor-art-group-name* + (-> arg0 node-list data (-> s5-0 transform-index) joint name) + ) + (format + #t + " :sphere ((meters ~M) (meters ~M) (meters ~M) (meters ~M))~%" + (-> s5-0 local-sphere x) + (-> s5-0 local-sphere y) + (-> s5-0 local-sphere z) + (-> s5-0 local-sphere w) + ) + (format #t " ))~%") + ) + ) + (&+! s5-0 80) + ) + ) + (if (zero? (-> (the-as collide-shape (-> arg0 root)) root-prim prim-core prim-type)) + (format #t " )))~%") + ) + ) + ) + (format #t "~%~%") + (none) + ) + +(deftype collision-editor (process) + ((proc handle) + ) + (:state-methods + idle + ) + ) + +(defmethod inspect ((this collision-editor)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Tproc: ~D~%" (-> this proc)) + (label cfg-4) + this + ) + +(deftype collision-edit-info (structure) + ((editing symbol) + (current-func collision-editor-func) + (analog-func collision-editor-func) + (current-prim int32) + ) + (:methods + (collision-edit-info-method-9 (_type_) none) + (draw-menu (_type_ process-drawable) none) + (collision-edit-info-method-11 (_type_ process-drawable) none) + ) + ) + +(defmethod inspect ((this collision-edit-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'collision-edit-info) + (format #t "~1Tediting: ~A~%" (-> this editing)) + (format #t "~1Tcurrent-func: ~D~%" (-> this current-func)) + (format #t "~1Tanalog-func: ~D~%" (-> this analog-func)) + (format #t "~1Tcurrent-prim: ~D~%" (-> this current-prim)) + (label cfg-4) + this + ) + +(defun collision-edit-get-max-prim ((arg0 process-drawable)) + (let ((gp-0 0)) + (when (and arg0 (type? (-> arg0 root) collide-shape)) + (let ((v1-3 (-> (the-as collide-shape (-> arg0 root)) root-prim))) + (if (zero? (-> v1-3 prim-core prim-type)) + (set! gp-0 (the-as int (-> v1-3 specific 1))) + ) + ) + ) + gp-0 + ) + ) + +;; WARN: Return type mismatch int vs collide-shape-prim. +(defun collision-edit-get-prim ((arg0 process-drawable) (arg1 int)) + (when (and arg0 (type? (-> arg0 root) collide-shape)) + (let ((s5-0 (-> (the-as collide-shape (-> arg0 root)) root-prim)) + (v1-3 (collision-edit-get-max-prim arg0)) + ) + (if (and s5-0 (>= v1-3 arg1)) + (return (the-as collide-shape-prim (+ (the-as uint s5-0) (* 80 arg1)))) + ) + ) + ) + (the-as collide-shape-prim #f) + ) + +(defmethod collision-edit-info-method-9 ((this collision-edit-info)) + (if (cpad-pressed? 0 up) + (+! (-> this current-func) -1) + ) + (if (cpad-pressed? 0 left) + (+! (-> this current-func) -4) + ) + (if (cpad-pressed? 0 down) + (+! (-> this current-func) 1) + ) + (if (cpad-pressed? 0 right) + (+! (-> this current-func) 4) + ) + (cond + ((< (the-as int (-> this current-func)) 0) + (set! (-> this current-func) (collision-editor-func stop-editor)) + ) + ((>= (the-as int (-> this current-func)) 4) + (set! (-> this current-func) (collision-editor-func analog)) + 0 + ) + ) + (none) + ) + +(defmethod collision-edit-info-method-11 ((this collision-edit-info) (arg0 process-drawable)) + (local-vars (s5-0 int)) + (when (not arg0) + (set! s5-0 (the-as int #f)) + (goto cfg-14) + ) + (set! s5-0 (-> this current-prim)) + (let ((v1-2 (collision-edit-get-max-prim arg0))) + (when (cpad-pressed? 0 r1) + (+! s5-0 1) + (if (cpad-hold? 0 l1) + (+! s5-0 4) + ) + ) + (when (cpad-pressed? 0 l1) + (+! s5-0 -1) + (if (cpad-hold? 0 r1) + (+! s5-0 -4) + ) + ) + (if (< s5-0 0) + (set! s5-0 v1-2) + ) + (if (< v1-2 s5-0) + (set! s5-0 0) + ) + ) + (set! (-> this current-prim) s5-0) + (label cfg-14) + (none) + ) + +(defmethod draw-menu ((this collision-edit-info) (arg0 process-drawable)) + (local-vars (a3-0 string)) + (when (cpad-pressed? 0 l2) + (set! (-> this editing) (not (-> this editing))) + (cond + ((-> this editing) + (set! *external-cam-mode* 'locked) + ) + (*target* + (set! *external-cam-mode* #f) + ) + (else + (set! *external-cam-mode* 'pad-0) + ) + ) + ) + (cond + ((or (not (-> this editing)) (cpad-hold? 0 r2)) + (if (not (-> this editing)) + (format *stdcon* "press l2 to edit collision~%") + (format *stdcon* "release r2 to continue editing collision~%") + ) + (if (or (cpad-hold? 0 r2) (not *target*)) + (set! *external-cam-mode* 'pad-0) + ) + ) + (else + (set! *external-cam-mode* 'locked) + (collision-edit-info-method-9 this) + (collision-edit-info-method-11 this arg0) + (let ((s3-0 ">") + (s4-0 " ") + ) + (if (not (logtest? (-> *display* real-frame-clock integral-frame-counter) 8)) + (set! s3-0 " ") + ) + (format *stdcon* " r2/l2: move camera~%") + (let ((s2-0 (-> this current-prim))) + "??" + (let ((v1-38 (collision-edit-get-prim arg0 0))) + (when v1-38 + (if (zero? (-> v1-38 prim-core prim-type)) + (+! s2-0 -1) + ) + ) + ) + (cond + ((= s2-0 -1) + (set! a3-0 "*group*") + ) + ((= (-> (collision-edit-get-prim arg0 s2-0) prim-core prim-type) 1) + (set! a3-0 (-> *collision-editor-mesh-names* s2-0)) + ) + (else + (set! a3-0 "*sphere*") + ) + ) + ) + (format *stdcon* " r1/l1: select prim ~D ~S~%" (-> this current-prim) a3-0) + (format *stdcon* " dpad: select function~%") + (format *stdcon* " x, tri: toggle/call~%") + (format *stdcon* "------------------------~%") + (format + *stdcon* + " ~S analog: ~S~%" + (if (= (-> this current-func) (collision-editor-func analog)) + s3-0 + s4-0 + ) + (if (= (-> this analog-func) (collision-editor-func analog)) + "adjust sphere" + "???" + ) + ) + (let ((v1-50 (collision-edit-get-prim arg0 (-> this current-prim))) + (a3-2 (the-as basic "??")) + ) + (if (zero? (-> v1-50 transform-index)) + (set! a3-2 "*root*") + ) + (if (and v1-50 + (< (-> v1-50 transform-index) (-> arg0 node-list length)) + (-> arg0 node-list data (-> v1-50 transform-index) joint) + ) + (set! a3-2 (-> arg0 node-list data (-> v1-50 transform-index) joint name)) + ) + (format + *stdcon* + " ~S change sphere joint ~S~%" + (if (= (-> this current-func) (collision-editor-func edit)) + s3-0 + s4-0 + ) + a3-2 + ) + ) + (format + *stdcon* + " ~S print to listener~%" + (if (= (-> this current-func) (collision-editor-func print-collision)) + s3-0 + s4-0 + ) + ) + (format *stdcon* " ~S quit~%" (cond + ((= (-> this current-func) (collision-editor-func stop-editor)) + (empty) + s3-0 + ) + (else + s4-0 + ) + ) + ) + ) + (let ((s4-1 0)) + (if (cpad-pressed? 0 x) + (+! s4-1 1) + ) + (if (cpad-pressed? 0 triangle) + (+! s4-1 -1) + ) + (when (nonzero? s4-1) + (case (-> this current-func) + (((collision-editor-func analog)) + (+! (-> this analog-func) s4-1) + ) + (((collision-editor-func edit)) + (let ((v1-75 (collision-edit-get-prim arg0 (-> this current-prim)))) + (when (and v1-75 (!= (-> v1-75 prim-core prim-type) 1)) + (let* ((a0-41 (-> v1-75 transform-index)) + (a1-25 (+ (-> arg0 node-list length) -1)) + (a0-42 (+ a0-41 s4-1)) + ) + (if (< a0-42 0) + (set! a0-42 a1-25) + ) + (while (or (= a0-42 1) (= a0-42 2)) + (+! a0-42 s4-1) + ) + (if (< a1-25 a0-42) + (set! a0-42 0) + ) + (set! (-> v1-75 transform-index) a0-42) + ) + ) + ) + ) + (((collision-editor-func print-collision)) + (print-actual-collision arg0) + ) + (((collision-editor-func stop-editor)) + (kill-by-type collision-editor-edited-proc *active-pool*) + (kill-by-type collision-editor *active-pool*) + ) + (else + (format 0 "~%ERROR: bad collision-edit-func~%") + ) + ) + ) + ) + (cond + ((< (the-as int (-> this analog-func)) 0) + (set! (-> this analog-func) (collision-editor-func analog)) + 0 + ) + ((>= (the-as int (-> this analog-func)) 1) + (set! (-> this analog-func) (collision-editor-func analog)) + 0 + ) + ) + (when arg0 + (let ((f30-0 (analog-input (the-as int (-> *cpad-list* cpads 0 rightx)) 128.0 48.0 110.0 1.0)) + (f28-0 (analog-input (the-as int (-> *cpad-list* cpads 0 righty)) 128.0 48.0 110.0 1.0)) + (f26-0 (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 48.0 110.0 1.0)) + (f24-0 (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 48.0 110.0 1.0)) + ) + (when (or (!= f30-0 0.0) (!= f28-0 0.0) (!= f26-0 0.0) (!= f24-0 0.0)) + (when (= (-> this analog-func) (collision-editor-func analog)) + (set! f30-0 (* -409.6 f30-0)) + (set! f28-0 (* -409.6 f28-0)) + (let ((f0-8 (+ (* 0.01 f24-0) (* -0.01 f26-0)))) + (set! f24-0 (+ 1.0 f0-8)) + ) + (set! f26-0 0.0) + ) + (when (= (-> this analog-func) (collision-editor-func analog)) + (let ((s4-2 (collision-edit-get-prim arg0 (-> this current-prim)))) + (when s4-2 + (set! (-> s4-2 local-sphere w) (* (-> s4-2 local-sphere w) f24-0)) + (let ((s3-1 (new 'stack-no-clear 'matrix))) + (let* ((a2-17 (matrix-local->world #f #f)) + (v1-107 (-> a2-17 rvec quad)) + (a0-58 (-> a2-17 uvec quad)) + (a1-37 (-> a2-17 fvec quad)) + (a2-18 (-> a2-17 trans quad)) + ) + (set! (-> s3-1 rvec quad) v1-107) + (set! (-> s3-1 uvec quad) a0-58) + (set! (-> s3-1 fvec quad) a1-37) + (set! (-> s3-1 trans quad) a2-18) + ) + (let ((s2-1 (new 'stack-no-clear 'matrix))) + (let* ((a2-19 (-> arg0 node-list data (-> s4-2 transform-index) bone transform)) + (v1-111 (-> a2-19 rvec quad)) + (a0-61 (-> a2-19 uvec quad)) + (a1-38 (-> a2-19 fvec quad)) + (a2-20 (-> a2-19 trans quad)) + ) + (set! (-> s2-1 rvec quad) v1-111) + (set! (-> s2-1 uvec quad) a0-61) + (set! (-> s2-1 fvec quad) a1-38) + (set! (-> s2-1 trans quad) a2-20) + ) + (let ((s1-1 (new 'stack-no-clear 'vector))) + (set! (-> s1-1 x) f30-0) + (set! (-> s1-1 y) f28-0) + (set! (-> s1-1 z) f26-0) + (set! (-> s1-1 w) 1.0) + (vector-reset! (-> s3-1 trans)) + (vector-matrix*! s1-1 s1-1 s3-1) + (vector-reset! (-> s2-1 trans)) + (matrix-transpose! s2-1 s2-1) + (vector-matrix*! s1-1 s1-1 s2-1) + (+! (-> s4-2 local-sphere x) (-> s1-1 x)) + (+! (-> s4-2 local-sphere y) (-> s1-1 y)) + (+! (-> s4-2 local-sphere z) (-> s1-1 z)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let ((s5-1 (collision-edit-get-prim arg0 (-> this current-prim)))) + (cond + (s5-1 + (show-maya-skeleton arg0 (-> s5-1 transform-index) #x45800000) + (let ((gp-1 (shl #x80ff 16))) + (let ((v1-117 (-> s5-1 prim-core prim-type))) + (cond + ((= v1-117 1) + (collision-editor-add-mesh-to-ccache (the-as collide-shape-prim-group s5-1) *collide-cache*) + (debug-draw *collide-cache*) + (let ((s4-3 (the-as object (-> *collide-cache* tris)))) + (countdown (s3-2 (-> *collide-cache* num-tris)) + (when (< (-> s5-1 prim-core world-sphere w) + (vector-vector-distance + (the-as vector (-> s5-1 prim-core)) + (the-as vector (-> (the-as collide-cache-tri s4-3) vertex)) + ) + ) + (add-debug-x + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> (the-as collide-cache-tri s4-3) vertex)) + (new 'static 'rgba :r #xff :g #xff :a #x80) + ) + (set! gp-1 (the-as int (the-as uint #x800000ff))) + ) + (when (< (-> s5-1 prim-core world-sphere w) + (vector-vector-distance (the-as vector (-> s5-1 prim-core)) (-> (the-as collide-cache-tri s4-3) vertex 1)) + ) + (add-debug-x + #t + (bucket-id debug-no-zbuf1) + (-> (the-as collide-cache-tri s4-3) vertex 1) + (new 'static 'rgba :r #xff :g #xff :a #x80) + ) + (set! gp-1 (the-as int (the-as uint #x800000ff))) + ) + (when (< (-> s5-1 prim-core world-sphere w) + (vector-vector-distance (the-as vector (-> s5-1 prim-core)) (-> (the-as collide-cache-tri s4-3) vertex 2)) + ) + (add-debug-x + #t + (bucket-id debug-no-zbuf1) + (-> (the-as collide-cache-tri s4-3) vertex 2) + (new 'static 'rgba :r #xff :g #xff :a #x80) + ) + (set! gp-1 (the-as int (the-as uint #x800000ff))) + ) + (set! s4-3 (&+ (the-as collide-cache-tri s4-3) 64)) + ) + ) + ) + ((= v1-117 -1) + ) + ((zero? v1-117) + ) + ) + ) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> s5-1 prim-core)) + (-> s5-1 prim-core world-sphere w) + (the-as rgba gp-1) + ) + ) + ) + (else + (show-maya-skeleton arg0 1000 #x45800000) + ) + ) + ) + 0 + (none) + ) + +(define *collision-edit-info* (the-as collision-edit-info 0)) + +(define *collision-edit-info* + (new 'static 'collision-edit-info :editing #t :current-func (collision-editor-func print-collision)) + ) + +(defstate idle (collision-editor) + :virtual #t + :exit (behavior () + (set! *external-cam-mode* #f) + ) + :trans (behavior () + (let ((gp-0 *collision-edit-info*) + (s5-0 (method-of-type collision-edit-info draw-menu)) + (s4-0 (handle->process (-> self proc))) + ) + (s5-0 gp-0 (the-as process-drawable (if (type? s4-0 process-drawable) + s4-0 + ) + ) + ) + ) + ) + :code sleep-code + ) + +(defbehavior collision-editor-init-by-other collision-editor ((arg0 handle)) + (set! (-> self proc) arg0) + (go-virtual idle) + ) + +(defun stop-collision-edit () + (kill-by-type collision-editor-edited-proc *active-pool*) + (kill-by-type collision-editor *active-pool*) + 0 + (none) + ) + +(defun collision-edit ((arg0 process)) + (stop-collision-edit) + (when (not arg0) + (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 arg0))) + (process-spawn collision-editor gp-2 :name "collision-editor") + ) + ) diff --git a/goal_src/jak3/engine/debug/debug-part.gc b/goal_src/jak3/engine/debug/debug-part.gc index dc04dbd0ad..3ee03d8121 100644 --- a/goal_src/jak3/engine/debug/debug-part.gc +++ b/goal_src/jak3/engine/debug/debug-part.gc @@ -5,5 +5,1844 @@ ;; name in dgo: debug-part ;; dgos: GAME +(define-extern hud-money type) + ;; DECOMP BEGINS +;; this file is debug only +(declare-file (debug)) + +(defpart 537 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 64.0 64.0) + (:rotvel-z (degrees 0.3)) + (:fade-a -1.6) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-red-eco-strike-ground + :id 152 + :duration (seconds 0.035) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 538) (sp-item 539)) + ) + +(defpart 538 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 24.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 32.0) + (:a 8.0 56.0) + (:vel-y (meters 0.13333334) (meters 0.16666667)) + (:scalevel-x (meters 0.013333334)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.4222223) + (:fade-a -0.35555556) + (:accel-y (meters 0.00008333333)) + (:friction 0.7) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.3)) + (:next-launcher 540) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 539 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 32.0) + (:y (meters 1)) + (:scale-x (meters 1) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:a 64.0 8.0) + (:vel-y (meters 0.3)) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-g -2.8444445) + (:fade-a -0.82222223) + (:friction 0.7) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.15)) + (:next-launcher 540) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpartgroup group-red-eco-spinkick + :id 153 + :duration (seconds 0.035) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 541) (sp-item 542) (sp-item 543 :flags (sp6))) + ) + +(defpart 541 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 32.0) + (:a 8.0 56.0) + (:scalevel-x (meters 0.013333334)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.4222223) + (:fade-a -0.35555556) + (:accel-y (meters 0.00008333333)) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.3)) + (:next-launcher 540) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +(defpart 540 + :init-specs ((:fade-r -0.7111111) (:fade-g 0.7111111) (:fade-b 0.35555556)) + ) + +(defpart 542 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.66) + (:scale-x (meters 1) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:a 64.0 8.0) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-g -2.8444445) + (:fade-a -0.82222223) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.15)) + (:next-launcher 540) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.1)) + ) + ) + +(defpart 543 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 96.0) + (:a 64.0) + (:fade-a -4.0) + (:accel-y (meters 0.00008333333)) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-eco-blue + :id 154 + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 550 :flags (sp3) :binding 544) + (sp-item 544 :fade-after (meters 40) :flags (sp2 sp3) :binding 545) + (sp-item 544 :fade-after (meters 60) :flags (sp2 sp3) :binding 545) + (sp-item 544 :fade-after (meters 80) :flags (sp2 sp3) :binding 545) + (sp-item 544 :fade-after (meters 100) :flags (sp2 sp3) :binding 545) + (sp-item 544 :fade-after (meters 130) :flags (sp2 sp3) :binding 545) + (sp-item 544 :flags (sp2 sp3) :binding 545) + (sp-item 545 :flags (sp2 sp3) :binding 546) + (sp-item 545 :flags (sp2 sp3) :binding 547) + (sp-item 545 :flags (sp2 sp3) :binding 548) + (sp-item 545 :flags (sp2 sp3) :binding 546) + (sp-item 545 :flags (sp2 sp3) :binding 547) + (sp-item 545 :flags (sp2 sp3) :binding 548) + (sp-item 546 :fade-after (meters 60) :flags (sp2) :binding 549) + (sp-item 547 :fade-after (meters 70) :flags (sp2) :binding 549) + (sp-item 548 :fade-after (meters 80) :flags (sp2) :binding 549) + (sp-item 546 :fade-after (meters 90) :flags (sp2) :binding 549) + (sp-item 547 :fade-after (meters 100) :flags (sp2) :binding 549) + (sp-item 548 :fade-after (meters 100) :flags (sp2) :binding 549) + (sp-item 549 :flags (sp2)) + ) + ) + +(defpart 550 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 4)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + ) + ) + +(defpart 544 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 6.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.3) (meters 0.15)) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0 32.0) + (:g 32.0 96.0) + (:b 128.0 128.0) + (:a 32.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.0148148155) (meters 0.0044444446)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:rotvel-z (degrees -0.1) 1 (degrees 0.2)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 551) + ) + ) + +(defpart 551 + :init-specs ((:fade-a -0.21333334) (:timer (seconds 0.5))) + ) + +(defpart 545 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.2) (meters 0.1)) + (:scale-x (meters 0.8) (meters 0.4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 96.0) + (:g 96.0) + (:b 192.0) + (:a 32.0 32.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.017777778) (meters 0.0148148155)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:rotvel-z (degrees 269.52002) (degrees 208.99998)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 552) + ) + ) + +(defpart 552 + :init-specs ((:fade-a -0.16) (:timer (seconds 0.5))) + ) + +(defpart 546 + :init-specs ((:texture (common-white common)) + (:num 0.0 1.0) + (:scale-x (meters 0.2) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.15) (meters 0.1)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 128.0 64.0) + (:fade-a -1.6) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +(defpart 547 + :init-specs ((:texture (common-white common)) + (:num 0.0 1.0) + (:scale-x (meters 0.2) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.15) (meters 0.1)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 128.0 64.0) + (:fade-a -1.6) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +(defpart 548 + :init-specs ((:texture (common-white common)) + (:num 0.0 1.0) + (:scale-x (meters 0.2) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.15) (meters 0.1)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 128.0 64.0) + (:fade-a -1.6) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +(defpart 549 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.2 0.2) + (:scale-x (meters 1) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0) + (:b 192.0) + (:a 96.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpartgroup group-eco-blue-collect + :id 155 + :duration (seconds 0.5) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 558 :flags (sp3) :binding 554) + (sp-item 554 :flags (sp2 sp3) :binding 555) + (sp-item 554 :flags (sp2 sp3) :binding 556) + (sp-item 554 :flags (sp2 sp3) :binding 555) + (sp-item 554 :flags (sp2 sp3) :binding 556) + (sp-item 554 :flags (sp2 sp3) :binding 557) + (sp-item 555 :fade-after (meters 40) :flags (sp2)) + (sp-item 555 :fade-after (meters 40) :flags (sp2)) + (sp-item 555 :fade-after (meters 40) :flags (sp2)) + (sp-item 555 :fade-after (meters 40) :flags (sp2)) + (sp-item 556 :fade-after (meters 40) :flags (sp2)) + (sp-item 556 :fade-after (meters 40) :flags (sp2)) + (sp-item 556 :fade-after (meters 40) :flags (sp2)) + (sp-item 556 :fade-after (meters 40) :flags (sp2)) + (sp-item 557 :fade-after (meters 40) :flags (sp2)) + (sp-item 557 :fade-after (meters 40) :flags (sp2)) + (sp-item 557 :fade-after (meters 40) :flags (sp2)) + (sp-item 557 :fade-after (meters 40) :flags (sp2)) + ) + ) + +(defpart 558 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 96.0) + (:g 96.0) + (:b 192.0) + (:a 64.0) + (:fade-a -3.2) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'part-tracker-track-root) + (:next-time (seconds 0.05)) + (:next-launcher 418) + ) + ) + +(defpart 554 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 5.0) + (:y (meters -4) (meters 16)) + (:z (meters 0.08)) + (:scale-x (meters 0.75) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 127.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.017777778) 2.0 (meters 0.035555556)) + (:vel-y (meters 0)) + (:vel-z (meters 0.08)) + (:accel-z (meters -0.0053333333)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +(defpart 555 + :init-specs ((:texture (common-white common)) + (:num 1.0) + (:scale-x (meters 0.2) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.15) (meters 0.1)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 128.0 64.0) + (:fade-a -1.4) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +(defpart 556 + :init-specs ((:texture (common-white common)) + (:num 1.0) + (:scale-x (meters 0.2) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.15) (meters 0.1)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 128.0 64.0) + (:fade-a -1.4) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +(defpart 557 + :init-specs ((:texture (common-white common)) + (:num 1.0) + (:scale-x (meters 0.2) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.15) (meters 0.1)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 128.0 64.0) + (:fade-a -1.4) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +(defpartgroup group-part-vent-blue-active + :id 156 + :bounds (static-bspherem 0 5 0 5) + :parts ((sp-item 562 :fade-after (meters 140) :falloff-to (meters 140) :binding 559) + (sp-item 562 :fade-after (meters 140) :falloff-to (meters 140) :binding 560) + (sp-item 562 :fade-after (meters 140) :falloff-to (meters 140) :binding 561) + (sp-item 563) + (sp-item 564 :fade-after (meters 120) :falloff-to (meters 120)) + (sp-item 565 :fade-after (meters 120) :falloff-to (meters 120)) + (sp-item 566 :fade-after (meters 120) :falloff-to (meters 120)) + (sp-item 561 :fade-after (meters 30) :falloff-to (meters 30) :flags (sp2)) + (sp-item 560 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp2)) + (sp-item 559 :fade-after (meters 80) :falloff-to (meters 80) :flags (sp2)) + (sp-item 561 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp2)) + (sp-item 560 :fade-after (meters 100) :falloff-to (meters 100) :flags (sp2)) + (sp-item 559 :fade-after (meters 110) :falloff-to (meters 110) :flags (sp2)) + (sp-item 561 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp2)) + (sp-item 560 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp2)) + ) + ) + +(defpartgroup group-part-vent-blue-inactive + :id 157 + :bounds (static-bspherem 0 5 0 5) + :parts ((sp-item 562 :fade-after (meters 100)) (sp-item 563)) + ) + +(defpart 563 + :init-specs ((:texture (middot level-default-sprite)) + (:num 0.1 1.0) + (:x (meters -0.75) (meters 1.5)) + (:y (meters 0.5)) + (:z (meters -0.75) (meters 1.5)) + (:scale-x (meters 1.5) (meters 1.4)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0) + (:b 192.0) + (:a 64.0) + (:vel-y (meters 0.016666668) (meters 0.016666668)) + (:fade-a -0.2) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 562 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.05 0.1) + (:x (meters -0.75) (meters 1.5)) + (:y (meters 0.5)) + (:z (meters -0.75) (meters 1.5)) + (:scale-x (meters 1.5) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 192.0) + (:a 96.0) + (:vel-y (meters 0.01) (meters 0.01)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 559 + :init-specs ((:texture (common-white common)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 1.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 128.0) + (:fade-a -1.4) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +(defpart 560 + :init-specs ((:texture (common-white common)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 1.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 128.0) + (:fade-a -1.4) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +(defpart 561 + :init-specs ((:texture (common-white common)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 1.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 128.0) + (:fade-a -1.4) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +(defpart 564 + :init-specs ((:texture (common-white common)) + (:num 0.1 0.5) + (:x (meters -0.5) (meters 1)) + (:y (meters 0.5)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 1.5) (meters 1.5)) + (:rot-x 4) + (:rot-z (degrees 10) (degrees 160)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:fade-a -1.4) + (:timer (seconds 0.305)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +(defpart 565 + :init-specs ((:texture (common-white common)) + (:num 0.2 0.4) + (:x (meters -0.5) (meters 1)) + (:y (meters 0.5)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 1.5) (meters 1.5)) + (:rot-x 4) + (:rot-z (degrees 10) (degrees 160)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:fade-a -1.4) + (:timer (seconds 0.305)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +(defpart 566 + :init-specs ((:texture (common-white common)) + (:num 0.3 0.1) + (:x (meters -0.5) (meters 1)) + (:y (meters 0.5)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 1.5) (meters 1.5)) + (:rot-x 4) + (:rot-z (degrees 10) (degrees 160)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:fade-a -1.4) + (:timer (seconds 0.305)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +(defpart 553 + :init-specs ((:r 64.0) (:g 64.0) (:fade-r -1.0) (:fade-g -1.0) (:fade-a -2.0)) + ) + +(defpartgroup group-eco-red + :id 158 + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 571 :flags (sp3) :binding 567) + (sp-item 567 :flags (sp2 sp3) :binding 568) + (sp-item 567 :flags (sp2 sp3) :binding 568) + (sp-item 567 :flags (sp2 sp3) :binding 568) + (sp-item 567 :flags (sp2 sp3) :binding 568) + (sp-item 567 :flags (sp2 sp3) :binding 568) + (sp-item 567 :flags (sp2 sp3) :binding 568) + (sp-item 568 :flags (sp2 sp3) :binding 569) + (sp-item 568 :flags (sp2 sp3) :binding 569) + (sp-item 568 :flags (sp2 sp3) :binding 569) + (sp-item 569 :fade-after (meters 100) :flags (sp2 sp3) :binding 570) + (sp-item 569 :fade-after (meters 100) :flags (sp2 sp3) :binding 570) + (sp-item 569 :fade-after (meters 100) :flags (sp2 sp3) :binding 570) + (sp-item 570 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp2)) + (sp-item 570 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp2)) + (sp-item 570 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp2)) + ) + ) + +(defpart 571 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 4)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + ) + ) + +(defpart 567 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 6.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.15) (meters 0.2)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 24.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.0148148155) (meters 0.0044444446)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:rotvel-z (degrees -0.1) 1 (degrees 0.2)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 572) + ) + ) + +(defpart 572 + :init-specs ((:fade-a -0.16) (:timer (seconds 0.5))) + ) + +(defpart 568 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.25) (meters 0.1)) + (:scale-x (meters 0.6) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 64.0 64.0) + (:a 32.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.017777778) (meters 0.0148148155)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 573) + ) + ) + +(defpart 573 + :init-specs ((:fade-a -0.21333334) (:timer (seconds 0.5))) + ) + +(defpart 569 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 16)) + (:y (meters 0) (meters 16)) + (:z (meters 0.07) (meters 0.03)) + (:scale-x (meters 0.6) (meters 0.6)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 64.0 64.0) + (:a 32.0) + (:vel-x (meters 0.11259259)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 573) + ) + ) + +(defpart 570 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.1 1.0) + (:scale-x (meters 0.4) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 28.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 32.0 32.0) + (:scalevel-x (meters -0.00038095238)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.4) + (:fade-a -0.01904762) + (:accel-y (meters 0.000100000005) (meters 0.00015)) + (:timer (seconds 0.1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.8)) + (:next-launcher 574) + ) + ) + +(defpart 574 + :init-specs ((:fade-g 0.0)) + ) + +(defpartgroup group-eco-red-collect + :id 159 + :duration (seconds 0.5) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 577 :flags (sp3) :binding 575) + (sp-item 575 :flags (sp2 sp3) :binding 576) + (sp-item 575 :flags (sp2 sp3) :binding 576) + (sp-item 575 :flags (sp2 sp3) :binding 576) + (sp-item 575 :flags (sp2 sp3) :binding 576) + (sp-item 575 :flags (sp2 sp3) :binding 576) + (sp-item 576 :fade-after (meters 40) :flags (sp2)) + (sp-item 576 :fade-after (meters 40) :flags (sp2)) + (sp-item 576 :fade-after (meters 40) :flags (sp2)) + (sp-item 576 :fade-after (meters 40) :flags (sp2)) + (sp-item 576 :fade-after (meters 40) :flags (sp2)) + ) + ) + +(defpart 577 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 128.0) + (:fade-a -3.2) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'part-tracker-track-root) + (:next-time (seconds 0.05)) + (:next-launcher 418) + ) + ) + +(defpart 575 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 5.0) + (:y (meters -4) (meters 16)) + (:z (meters 0.08)) + (:scale-x (meters 0.3) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 127.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.017777778) 2.0 (meters 0.035555556)) + (:vel-y (meters 0)) + (:vel-z (meters 0.08)) + (:accel-z (meters -0.0053333333)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +(defpart 576 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 28.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 64.0 32.0) + (:vel-y (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-x (meters -0.005555555)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:scalevel-y :copy scalevel-x) + (:fade-g -2.0) + (:fade-a -0.22857143) + (:accel-y (meters 0.000100000005) (meters 0.00015)) + (:timer (seconds 0.18)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.8)) + (:next-launcher 578) + ) + ) + +(defpartgroup group-part-vent-red-active + :id 160 + :bounds (static-bspherem 0 3 0 5) + :parts ((sp-item 582 :fade-after (meters 30) :period (seconds 1.1) :length (seconds 0.017) :binding 579) + (sp-item 582 :fade-after (meters 60) :period (seconds 2.455) :length (seconds 0.017) :binding 579) + (sp-item 582 :fade-after (meters 90) :period (seconds 3.12) :length (seconds 0.017) :binding 579) + (sp-item 582 :fade-after (meters 130) :period (seconds 1.76) :length (seconds 0.017) :binding 579) + (sp-item 582 :fade-after (meters 170) :period (seconds 2.67) :length (seconds 0.017) :binding 579) + (sp-item 579 :flags (sp2 sp3) :binding 580) + (sp-item 579 :flags (sp2 sp3) :binding 580) + (sp-item 579 :flags (sp2 sp3) :binding 580) + (sp-item 579 :flags (sp2 sp3) :binding 580) + (sp-item 579 :flags (sp2 sp3) :binding 580) + (sp-item 579 :flags (sp2 sp3) :binding 580) + (sp-item 579 :flags (sp2 sp3) :binding 580) + (sp-item 579 :flags (sp2 sp3) :binding 580) + (sp-item 580 :flags (sp2 sp3) :binding 581) + (sp-item 580 :flags (sp2 sp3) :binding 581) + (sp-item 580 :flags (sp2 sp3) :binding 581) + (sp-item 580 :flags (sp2 sp3) :binding 581) + (sp-item 580 :flags (sp2 sp3) :binding 581) + (sp-item 580 :flags (sp2 sp3) :binding 581) + (sp-item 580 :flags (sp2 sp3) :binding 581) + (sp-item 580 :flags (sp2 sp3) :binding 581) + (sp-item 581 :fade-after (meters 90) :falloff-to (meters 50) :flags (sp2)) + (sp-item 581 :fade-after (meters 90) :falloff-to (meters 60) :flags (sp2)) + (sp-item 581 :fade-after (meters 90) :falloff-to (meters 70) :flags (sp2)) + (sp-item 581 :fade-after (meters 90) :falloff-to (meters 80) :flags (sp2)) + (sp-item 581 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp2)) + (sp-item 581 :fade-after (meters 90) :falloff-to (meters 100) :flags (sp2)) + (sp-item 581 :fade-after (meters 90) :falloff-to (meters 100) :flags (sp2)) + (sp-item 581 :fade-after (meters 90) :falloff-to (meters 100) :flags (sp2)) + (sp-item 583 :fade-after (meters 140) :falloff-to (meters 140)) + (sp-item 584) + ) + ) + +(defpartgroup group-part-vent-red-inactive + :id 161 + :bounds (static-bspherem 0 3 0 5) + :parts ((sp-item 583 :fade-after (meters 140) :falloff-to (meters 140)) (sp-item 584)) + ) + +(defpart 584 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.6 0.6) + (:x (meters -0.75) (meters 1.5)) + (:y (meters 0.5)) + (:z (meters -0.75) (meters 1.5)) + (:scale-x (meters 1.9) (meters 1.9)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 32.0) + (:vel-y (meters 0.016666668) (meters 0.016666668)) + (:rotvel-z (degrees -0.1) 1 (degrees 0.2)) + (:fade-a -0.10666667) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 583 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.1 0.3) + (:x (meters -0.5) (meters 1)) + (:y (meters 0.5)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 1.5) (meters 0.4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 64.0) + (:vel-y (meters 0.01) (meters 0.01)) + (:rotvel-z (degrees -0.1) (degrees 0.1)) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 582 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 1.5)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:a 1.0) + (:vel-y (meters 0.006666667) (meters 0.0033333334)) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 5)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 579 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.5)) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 128.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.017777778) (meters 0.017777778)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:rotvel-z (degrees -0.1) 1 (degrees 0.2)) + (:fade-a -0.28444445) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +(defpart 580 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.25) (meters 0.1)) + (:scale-x (meters 1) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 64.0 64.0) + (:a 32.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.017777778) (meters 0.0148148155)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +(defpart 581 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.1 1.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 28.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 64.0 32.0) + (:vel-y (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-x (meters -0.0023809525)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.4) + (:fade-a -0.07619048) + (:accel-y (meters 0.000100000005) (meters 0.00015)) + (:timer (seconds 0.1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.8)) + (:next-launcher 578) + ) + ) + +(defpart 578 + :init-specs ((:fade-g 0.0)) + ) + +(defpartgroup group-part-vent-yellow-active + :id 162 + :bounds (static-bspherem 0 3 0 5) + :parts ((sp-item 588 :fade-after (meters 40) :period (seconds 1.1) :length (seconds 0.017) :binding 585) + (sp-item 588 :fade-after (meters 60) :period (seconds 2.455) :length (seconds 0.017) :binding 585) + (sp-item 588 :fade-after (meters 80) :period (seconds 3.12) :length (seconds 0.017) :binding 585) + (sp-item 588 :fade-after (meters 100) :period (seconds 1.76) :length (seconds 0.017) :binding 585) + (sp-item 588 :fade-after (meters 130) :period (seconds 2.67) :length (seconds 0.017) :binding 585) + (sp-item 585 :flags (sp2 sp3) :binding 586) + (sp-item 585 :flags (sp2 sp3) :binding 586) + (sp-item 585 :flags (sp2 sp3) :binding 586) + (sp-item 585 :flags (sp2 sp3) :binding 586) + (sp-item 585 :flags (sp2 sp3) :binding 586) + (sp-item 585 :flags (sp2 sp3) :binding 586) + (sp-item 585 :flags (sp2 sp3) :binding 586) + (sp-item 585 :flags (sp2 sp3) :binding 586) + (sp-item 586 :flags (sp2 sp3) :binding 587) + (sp-item 586 :flags (sp2 sp3) :binding 587) + (sp-item 586 :flags (sp2 sp3) :binding 587) + (sp-item 586 :flags (sp2 sp3) :binding 587) + (sp-item 586 :flags (sp2 sp3) :binding 587) + (sp-item 586 :flags (sp2 sp3) :binding 587) + (sp-item 586 :flags (sp2 sp3) :binding 587) + (sp-item 586 :flags (sp2 sp3) :binding 587) + (sp-item 587 :fade-after (meters 90) :falloff-to (meters 60) :flags (sp2)) + (sp-item 587 :fade-after (meters 90) :falloff-to (meters 70) :flags (sp2)) + (sp-item 587 :fade-after (meters 90) :falloff-to (meters 80) :flags (sp2)) + (sp-item 587 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp2)) + (sp-item 587 :fade-after (meters 90) :falloff-to (meters 100) :flags (sp2)) + (sp-item 587 :fade-after (meters 90) :falloff-to (meters 100) :flags (sp2)) + (sp-item 587 :fade-after (meters 90) :falloff-to (meters 100) :flags (sp2)) + (sp-item 587 :fade-after (meters 90) :falloff-to (meters 100) :flags (sp2)) + (sp-item 589 :fade-after (meters 140) :falloff-to (meters 140)) + (sp-item 590) + ) + ) + +(defpartgroup group-part-vent-yellow-inactive + :id 163 + :bounds (static-bspherem 0 3 0 5) + :parts ((sp-item 589 :fade-after (meters 140) :falloff-to (meters 140)) (sp-item 590)) + ) + +(defpart 590 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.6 0.6) + (:x (meters -0.75) (meters 1.5)) + (:y (meters 0.5)) + (:z (meters -0.75) (meters 1.5)) + (:scale-x (meters 1.9) (meters 1.9)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 92.0 32.0) + (:g 32.0 92.0) + (:b 0.0) + (:a 32.0) + (:vel-y (meters 0.016666668) (meters 0.016666668)) + (:rotvel-z (degrees -0.1) 1 (degrees 0.2)) + (:fade-a -0.10666667) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 589 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.1 0.3) + (:x (meters -0.5) (meters 1)) + (:y (meters 0.5)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 1.5) (meters 0.4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 64.0) + (:vel-y (meters 0.01) (meters 0.01)) + (:rotvel-z (degrees -0.1) (degrees 0.1)) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 588 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 1.5)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:a 1.0) + (:vel-y (meters 0.013333334) (meters 0.013333334)) + (:timer (seconds 1.25)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 5)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 585 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 16)) + (:y (meters 0)) + (:z (meters 0.2) (meters 0.2)) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 64.0 64.0) + (:a 128.0) + (:vel-x (meters 0.10666667)) + (:rotvel-z (degrees -0.3) 1 (degrees 0.6)) + (:fade-a -0.34133333) + (:timer (seconds 1.25)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +(defpart 586 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 16)) + (:y (meters 0) (meters 16)) + (:z (meters 0.2)) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 64.0 64.0) + (:a 128.0) + (:vel-x (meters 0.11259259)) + (:rotvel-z (degrees -0.3) 1 (degrees 0.6)) + (:fade-a -0.34133333) + (:timer (seconds 1.25)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +(defpart 587 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.5 2.0) + (:y (meters -0.05)) + (:scale-x (meters 0.4) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 100.0 28.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 64.0 64.0) + (:vel-y (meters 0.0023333333) (meters 0.0016666667)) + (:scalevel-x (meters -0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.4) + (:fade-a -0.024242423) + (:accel-y (meters -0.000100000005) (meters -0.0003)) + (:friction 0.93) + (:timer (seconds 0.1) (seconds 0.697)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.3)) + (:next-launcher 591) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.05)) + ) + ) + +(defpart 591 + :init-specs ((:fade-r 0.0)) + ) + +(defpartgroup group-eco-yellow + :id 164 + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 596 :flags (sp3) :binding 592) + (sp-item 592 :flags (sp2 sp3) :binding 593) + (sp-item 592 :flags (sp2 sp3) :binding 593) + (sp-item 592 :flags (sp2 sp3) :binding 593) + (sp-item 592 :flags (sp2 sp3) :binding 593) + (sp-item 592 :flags (sp2 sp3) :binding 593) + (sp-item 592 :flags (sp2 sp3) :binding 593) + (sp-item 593 :flags (sp2 sp3) :binding 594) + (sp-item 593 :flags (sp2 sp3) :binding 594) + (sp-item 593 :flags (sp2 sp3) :binding 594) + (sp-item 593 :flags (sp2 sp3) :binding 594) + (sp-item 594 :fade-after (meters 100) :flags (sp2 sp3) :binding 595) + (sp-item 594 :fade-after (meters 100) :flags (sp2 sp3) :binding 595) + (sp-item 594 :fade-after (meters 100) :flags (sp2 sp3) :binding 595) + (sp-item 594 :fade-after (meters 100) :flags (sp2 sp3) :binding 595) + (sp-item 595 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp2)) + (sp-item 595 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp2)) + (sp-item 595 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp2)) + (sp-item 595 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp2)) + ) + ) + +(defpart 596 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 4)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + ) + ) + +(defpart 592 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 5.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.15) (meters 0.2)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 64.0 192.0) + (:b 0.0) + (:a 16.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.0148148155) (meters 0.0044444446)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:rotvel-z (degrees -0.1) 1 (degrees 0.2)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 597) + ) + ) + +(defpart 597 + :init-specs ((:fade-a -0.10666667) (:timer (seconds 0.5))) + ) + +(defpart 593 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.75) (meters 0.1)) + (:scale-x (meters 0.4) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 64.0 64.0) + (:a 32.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.017777778) (meters 0.0148148155)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 598) + ) + ) + +(defpart 598 + :init-specs ((:fade-a -0.16) (:timer (seconds 0.5))) + ) + +(defpart 594 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 16)) + (:y (meters 0) (meters 16)) + (:z (meters 0.12) (meters 0.03)) + (:scale-x (meters 0.4) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 64.0 64.0) + (:a 32.0) + (:vel-x (meters 0.11259259)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 598) + ) + ) + +(defpart 595 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.1 1.0) + (:scale-x (meters 0.3) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 100.0 28.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 32.0 32.0) + (:scalevel-x (meters -0.0006190476)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.4) + (:fade-a -0.01904762) + (:accel-y (meters -0.000100000005) (meters -0.00015)) + (:timer (seconds 0.1) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.8)) + (:next-launcher 599) + ) + ) + +(defpart 599 + :init-specs ((:fade-g 0.0)) + ) + +(defpartgroup group-eco-yellow-collect + :id 165 + :duration (seconds 0.5) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 602 :flags (sp3) :binding 600) + (sp-item 600 :flags (sp2 sp3) :binding 601) + (sp-item 600 :flags (sp2 sp3) :binding 601) + (sp-item 600 :flags (sp2 sp3) :binding 601) + (sp-item 600 :flags (sp2 sp3) :binding 601) + (sp-item 600 :flags (sp2 sp3) :binding 601) + (sp-item 601 :fade-after (meters 40) :flags (sp2)) + (sp-item 601 :fade-after (meters 40) :flags (sp2)) + (sp-item 601 :fade-after (meters 40) :flags (sp2)) + (sp-item 601 :fade-after (meters 40) :flags (sp2)) + (sp-item 601 :fade-after (meters 40) :flags (sp2)) + ) + ) + +(defpart 602 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 64.0 192.0) + (:b 0.0) + (:a 64.0) + (:fade-a -3.2) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'part-tracker-track-root) + (:next-time (seconds 0.05)) + (:next-launcher 418) + ) + ) + +(defpart 600 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 5.0) + (:y (meters -4) (meters 16)) + (:z (meters 0.08)) + (:scale-x (meters 0.3) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 127.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.017777778) 2.0 (meters 0.035555556)) + (:vel-y (meters 0)) + (:vel-z (meters 0.08)) + (:accel-z (meters -0.0053333333)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +(defpart 601 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.3) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 100.0 28.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 32.0 32.0) + (:scalevel-x (meters -0.0006190476)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.4) + (:fade-a -0.01904762) + (:accel-y (meters -0.000100000005) (meters -0.00015)) + (:timer (seconds 0.1) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.8)) + (:next-launcher 599) + ) + ) + +(defpartgroup group-fuel-cell-starburst + :id 166 + :bounds (static-bspherem 0 0.5 0 1.5) + :parts ((sp-item 603 :fade-after (meters 35)) + (sp-item 604 :fade-after (meters 20)) + (sp-item 605 :flags (sp1 sp3)) + (sp-item 606 :flags (sp1 sp3)) + ) + ) + +(defpart 603 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 0.5) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.8)) + (:r 0.0 1 255.0) + (:g 0.0 1 255.0) + (:b 0.0 1 255.0) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.15) (degrees 0.3)) + (:scalevel-y (meters 0.009765625)) + (:fade-a 0.35555556) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + (:next-time (seconds 0.3)) + (:next-launcher 607) + ) + ) + +(defpart 607 + :init-specs ((:fade-a -0.53333336)) + ) + +(defpart 604 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 0.06) + (:scale-x (meters 2) (meters 0.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2)) + (:r 0.0 1 255.0) + (:g 0.0 1 255.0) + (:b 0.0 1 255.0) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.15) (degrees 0.3)) + (:fade-a 0.32) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + (:next-time (seconds 0.25)) + (:next-launcher 607) + ) + ) + +(defpart 605 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3.5)) + (:rot-z (degrees 0)) + (:scale-y (meters 3)) + (:r 192.0) + (:g 192.0) + (:b 0.0 128.0) + (:a 64.0) + (:rotvel-z (degrees -0.4)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + ) + ) + +(defpart 606 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-z (degrees 0)) + (:scale-y (meters 3.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:rotvel-z (degrees 0.3)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + ) + ) + +(defun sparticle-track-root-money ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((v1-1 (-> arg1 key proc))) + (when (!= (-> v1-1 type) hud-money) + (let ((v1-3 (-> v1-1 root trans))) + (set! (-> arg2 x) (-> v1-3 x)) + (set! (-> arg2 y) (+ 2048.0 (-> v1-3 y))) + (set! (-> arg2 z) (-> v1-3 z)) + ) + ) + ) + 0 + (none) + ) + +(defpart 608 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 0.5) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.8)) + (:r 192.0) + (:g 192.0) + (:b 0.0 128.0) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.15) (degrees 0.3)) + (:scalevel-y (meters 0.009765625)) + (:fade-a 0.35555556) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.3)) + (:next-launcher 609) + ) + ) + +(defpart 609 + :init-specs ((:fade-a -0.53333336)) + ) + +(defpart 610 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 0.06) + (:scale-x (meters 2) (meters 0.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2)) + (:r 192.0) + (:g 192.0) + (:b 0.0 128.0) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.15) (degrees 0.3)) + (:fade-a 0.32) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.25)) + (:next-launcher 609) + ) + ) + +(defpart 611 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 192.0) + (:g 192.0) + (:b 0.0 128.0) + (:a 32.0) + (:rotvel-z (degrees -0.4)) + (:timer (seconds 12)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root-money) + ) + ) + +(defpart 612 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3)) + (:rot-z (degrees 0)) + (:scale-y (meters 2.5)) + (:r 192.0) + (:g 192.0) + (:b 0.0 128.0) + (:a 32.0) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 12)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root-money) + ) + ) + +(defpartgroup group-money-starburst :id 167 :bounds (static-bspherem 0 0.5 0 1.5) :parts ((sp-item 613))) + +(defpartgroup group-buzzer-effect :id 168 :bounds (static-bspherem 0 0 0 1) :parts ((sp-item 249))) + +(defpartgroup group-blue-collect + :id 169 + :duration (seconds 0.017) + :linger-duration (seconds 4) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 614) (sp-item 615) (sp-item 616)) + ) + +(defpart 614 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 16.0) + (:scale-x (meters 6) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5) (meters 1)) + (:r 32.0 32.0) + (:g 60.0 20.0) + (:b 128.0 64.0) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y (meters 0.009765625)) + (:fade-a 2.1333334) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.017) (seconds 0.065)) + (:next-launcher 455) + ) + ) + +(defpart 615 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 6.0) + (:scale-x (meters 8) (meters 2)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5)) + (:r 32.0 32.0) + (:g 60.0 20.0) + (:b 128.0 64.0) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:fade-a 2.1333334) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.017) (seconds 0.065)) + (:next-launcher 455) + ) + ) + +(defpart 616 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g 60.0 20.0) + (:b 128.0 64.0) + (:a 128.0) + (:scalevel-x (meters 0.1)) + (:rotvel-z (degrees -0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.2)) + (:next-launcher 458) + ) + ) + +(defpartgroup group-yellow-collect + :id 170 + :duration (seconds 0.017) + :linger-duration (seconds 4) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 617) (sp-item 618) (sp-item 619)) + ) + +(defpart 617 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 16.0) + (:scale-x (meters 6) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5) (meters 1)) + (:r 128.0 128.0) + (:g 64.0 192.0) + (:b 0.0) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y (meters 0.009765625)) + (:fade-a 2.1333334) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.017) (seconds 0.065)) + (:next-launcher 455) + ) + ) + +(defpart 618 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 6.0) + (:scale-x (meters 8) (meters 2)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5)) + (:r 128.0 128.0) + (:g 64.0 192.0) + (:b 0.0) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:fade-a 2.1333334) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.017) (seconds 0.065)) + (:next-launcher 455) + ) + ) + +(defpart 619 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 64.0 192.0) + (:b 0.0) + (:a 128.0) + (:scalevel-x (meters 0.1)) + (:rotvel-z (degrees -0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.2)) + (:next-launcher 458) + ) + ) + +(defpart 458 + :init-specs ((:scalevel-x (meters -0.025)) (:scalevel-y :copy scalevel-x)) + ) + +(defpartgroup group-red-collect + :id 171 + :duration (seconds 0.017) + :linger-duration (seconds 4) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 620) (sp-item 621) (sp-item 622)) + ) + +(defpart 620 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 16.0) + (:scale-x (meters 6) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5) (meters 1)) + (:r 128.0 128.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y (meters 0.009765625)) + (:fade-a 2.1333334) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.017) (seconds 0.065)) + (:next-launcher 455) + ) + ) + +(defpart 621 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 6.0) + (:scale-x (meters 8) (meters 2)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5)) + (:r 128.0 128.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:fade-a 2.1333334) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.017) (seconds 0.065)) + (:next-launcher 455) + ) + ) + +(defpart 622 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 128.0) + (:scalevel-x (meters 0.1)) + (:rotvel-z (degrees -0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.2)) + (:next-launcher 458) + ) + ) diff --git a/goal_src/jak3/engine/debug/debug.gc b/goal_src/jak3/engine/debug/debug.gc index 250a7a505e..23346f1d79 100644 --- a/goal_src/jak3/engine/debug/debug.gc +++ b/goal_src/jak3/engine/debug/debug.gc @@ -1333,7 +1333,7 @@ (set! (-> gp-0 0 y) (* (cos (-> arg0 stick0-dir)) (-> arg0 stick0-speed))) (dotimes (s5-1 32) (with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) debug-buf)) - (bucket-id bucket583) + (bucket-id debug) ) (draw-sprite2d-xy s3-0 @@ -1580,7 +1580,7 @@ ) (let ((s5-0 (the-as adgif-shader (-> arg1 base)))) (adgif-shader<-texture-simple! s5-0 a1-1) - (set! (-> s5-0 alpha) (new 'static 'gs-alpha :b #x1 :d #x1)) + (set! (-> s5-0 alpha) (new 'static 'gs-miptbp :tbp1 #x44)) (set! (-> s5-0 tex0 tfx) 0) (set! (-> s5-0 tex1 mmag) 0) (set! (-> s5-0 clamp) (new 'static 'gs-clamp)) diff --git a/goal_src/jak3/engine/debug/default-menu.gc b/goal_src/jak3/engine/debug/default-menu.gc index cd10f7e461..4633e0a486 100644 --- a/goal_src/jak3/engine/debug/default-menu.gc +++ b/goal_src/jak3/engine/debug/default-menu.gc @@ -5,5 +5,7137 @@ ;; name in dgo: default-menu ;; dgos: GAME +(define-extern *ocean-map-sewer* ocean-map) + ;; DECOMP BEGINS +;; this file is debug only +(declare-file (debug)) + +(define *debug-menu-context* (new 'debug 'debug-menu-context)) + +(define *dm-cam-mode-interpolation* 0) + +(defun dm-cam-mode-func ((arg0 (state camera-slave)) (arg1 debug-menu-msg)) + (if (and (= arg1 (debug-menu-msg press)) arg0) + (set-setting-by-param *setting-control* 'mode-name (-> arg0 name) 0 0) + ) + (if *camera* + (send-event *camera* 'query-state arg0) + (not arg0) + ) + ) + +(defun dm-cam-mode-default ((arg0 object) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (remove-setting-by-arg0 *setting-control* 'mode-name) + ) + (not (get-setting *setting-control* 'mode-name)) + ) + +(defun dm-cam-settings-default ((arg0 object) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (remove-setting-by-arg0 *setting-control* 'fov) + (remove-setting-by-arg0 *setting-control* 'slave-options) + ) + (and (not (get-setting *setting-control* 'fov)) (not (get-setting *setting-control* 'slave-options))) + ) + +(defun dm-cam-settings-func ((arg0 int) (arg1 debug-menu-msg)) + (when (and (= arg1 (debug-menu-msg press)) *camera*) + (cond + ((zero? arg0) + (send-event *camera* 'toggle-slave-option (cam-slave-options BUTT_CAM)) + ) + ((= arg0 1) + (send-event *camera* 'toggle-slave-option (cam-slave-options SAME_SIDE)) + ) + ((= arg0 2) + (send-event *camera* 'toggle-slave-option (cam-slave-options MOVE_SPHERICAL)) + ) + ((= arg0 3) + (send-event *camera* 'toggle-slave-option (cam-slave-options DRAG)) + ) + ((= arg0 4) + (send-event *camera* 'toggle-slave-option (cam-slave-options ALLOW_Z_ROT)) + ) + ((= arg0 6) + (set-setting-by-param *setting-control* 'slave-options 'clear 0 16) + ) + ((= arg0 7) + (send-event *camera* 'toggle-slave-option (cam-slave-options FIND_HIDDEN_TARGET)) + ) + ((= arg0 8) + (send-event *camera* 'toggle-slave-option (cam-slave-options COLLIDE)) + ) + ((= arg0 9) + (send-event *camera* 'toggle-slave-option (cam-slave-options LINE_OF_SIGHT)) + ) + ((= arg0 10) + (send-event *camera* 'toggle-slave-option (cam-slave-options NO_ROTATE)) + ) + ((= arg0 11) + (send-event *camera* 'toggle-slave-option (cam-slave-options STICKY_ANGLE)) + ) + ) + ) + (cond + (*camera* + (cond + ((zero? arg0) + (logtest? (-> *camera* slave-options) (cam-slave-options-u32 BUTT_CAM)) + ) + ((= arg0 1) + (logtest? (-> *camera* slave-options) (cam-slave-options-u32 SAME_SIDE)) + ) + ((= arg0 2) + (logtest? (-> *camera* slave-options) (cam-slave-options-u32 MOVE_SPHERICAL)) + ) + ((= arg0 3) + (logtest? (-> *camera* slave-options) (cam-slave-options-u32 DRAG)) + ) + ((= arg0 4) + (logtest? (-> *camera* slave-options) (cam-slave-options-u32 ALLOW_Z_ROT)) + ) + ((= arg0 6) + (not (get-setting *setting-control* 'slave-options)) + ) + ((= arg0 7) + (logtest? (-> *camera* slave-options) (cam-slave-options-u32 FIND_HIDDEN_TARGET)) + ) + ((= arg0 8) + (logtest? (-> *camera* slave-options) (cam-slave-options-u32 COLLIDE)) + ) + ((= arg0 9) + (logtest? (-> *camera* slave-options) (cam-slave-options-u32 LINE_OF_SIGHT)) + ) + ((= arg0 10) + (logtest? (-> *camera* slave-options) (cam-slave-options-u32 NO_ROTATE)) + ) + ((= arg0 11) + (logtest? (-> *camera* slave-options) (cam-slave-options-u32 STICKY_ANGLE)) + ) + (else + #f + ) + ) + ) + (else + #f + ) + ) + ) + +(defun dm-cam-settings-func-int ((arg0 int) (arg1 debug-menu-msg) (arg2 int) (arg3 int)) + (when (and (= arg1 (debug-menu-msg press)) *camera*) + (if (= (/ arg0 8) 5) + (set! *dm-cam-mode-interpolation* arg2) + ) + ) + (cond + (*camera* + (if (= (/ arg0 8) 5) + *dm-cam-mode-interpolation* + arg3 + ) + ) + (else + arg3 + ) + ) + ) + +(defun dm-cam-externalize ((arg0 symbol) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (cond + ((= arg0 'reset) + (if (!= *external-cam-mode* 'locked) + (external-cam-reset!) + ) + ) + ((= arg0 'allow-z) + (set! *external-cam-options* (logxor *external-cam-options* (external-cam-option allow-z))) + ) + ((= *external-cam-mode* arg0) + (set! *external-cam-mode* #f) + ) + (else + (if (not *external-cam-mode*) + (external-cam-reset!) + ) + (set! *external-cam-mode* arg0) + ) + ) + ) + (if (= arg0 'allow-z) + (logtest? *external-cam-options* (external-cam-option allow-z)) + (= *external-cam-mode* arg0) + ) + ) + +(defun dm-cam-setting-float ((arg0 float) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (when (= arg1 (debug-menu-msg press)) + (let ((v1-2 arg0)) + (when (= (the-as int v1-2) 'fov) + (if (not (get-setting *setting-control* 'fov)) + (set! arg2 64.0) + ) + (set-setting-by-param *setting-control* 'fov #f (* 182.04445 arg2) 0) + (if *camera-combiner* + (set! (-> *camera-combiner* fov) (* 182.04445 arg2)) + ) + (if (and *camera* (-> *camera* slave)) + (set! (-> *camera* slave 0 fov) (* 182.04445 arg2)) + ) + ) + ) + ) + (cond + ((= (the-as int arg0) 'fov) + (cond + ((get-setting *setting-control* 'fov) + (empty) + arg2 + ) + (*math-camera* + (* 0.005493164 (-> *math-camera* fov)) + ) + (else + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + +(defun dm-cam-render-float ((arg0 int) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (when (= arg1 (debug-menu-msg press)) + (when (zero? (/ arg0 8)) + (when *math-camera* + (set! (-> *math-camera* fov) (* 182.04445 arg2)) + (update-math-camera + *math-camera* + (-> *setting-control* user-current video-mode) + (-> *setting-control* user-current aspect-ratio) + (-> *math-camera* fov) + ) + ) + ) + ) + (cond + ((zero? (/ arg0 8)) + (cond + (*math-camera* + (* 0.005493164 (-> *math-camera* fov)) + ) + (else + (empty) + arg3 + ) + ) + ) + (else + (empty) + arg3 + ) + ) + ) + +(defun dm-subdiv-float ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (when (= arg1 (debug-menu-msg press)) + (case arg0 + (('close) + (when (and *math-camera* *subdivide-settings*) + (dotimes (v1-6 12) + (set! (-> *subdivide-settings* close v1-6) (* 4096.0 arg2)) + ) + ) + ) + (('far) + (when (and *math-camera* *subdivide-settings*) + (dotimes (v1-13 12) + (set! (-> *subdivide-settings* far v1-13) (* 4096.0 arg2)) + ) + ) + ) + ) + ) + (case arg0 + (('close) + (if (and *math-camera* *subdivide-settings*) + (* 0.00024414062 (-> *subdivide-settings* close 0)) + arg3 + ) + ) + (('far) + (if (and *math-camera* *subdivide-settings*) + (* 0.00024414062 (-> *subdivide-settings* far 0)) + arg3 + ) + ) + (else + arg3 + ) + ) + ) + +(defun dm-subdiv-int ((arg0 symbol) (arg1 debug-menu-msg) (arg2 int) (arg3 int)) + (when (= arg1 (debug-menu-msg press)) + (case arg0 + (('anim-speed) + (if *anim-tester* + (set! (-> *anim-tester* 0 speed) arg2) + ) + ) + ) + ) + (case arg0 + (('anim-speed) + (if *anim-tester* + (-> *anim-tester* 0 speed) + arg3 + ) + ) + (else + arg3 + ) + ) + ) + +(defun dm-select-race-path ((arg0 object) (arg1 debug-menu-msg) (arg2 int)) + (if (= arg1 (debug-menu-msg press)) + (set! *select-race-path* arg2) + ) + *select-race-path* + ) + +(defun dm-setting-language ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *setting-control* user-default language) (the-as language-enum (/ arg0 8))) + ) + (= (-> *setting-control* user-default language) (/ arg0 8)) + ) + +(defun dm-setting-subtitle-language ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *setting-control* user-default subtitle-language) (the-as language-enum (/ arg0 8))) + ) + (= (-> *setting-control* user-default subtitle-language) (/ arg0 8)) + ) + +(defun dm-setting-audio-language ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *setting-control* user-default audio-language) (the-as language-enum (/ arg0 8))) + ) + (= (-> *setting-control* user-default audio-language) (/ arg0 8)) + ) + +(defun dm-setting-stereo-mode ((arg0 object) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *setting-control* user-default stereo-mode) (the-as int (/ (the-as int arg0) 8))) + ) + (= (-> *setting-control* user-default stereo-mode) (/ (the-as int arg0) 8)) + ) + +(defun dm-current-continue ((arg0 string) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (start 'play (get-continue-by-name *game-info* arg0)) + ) + (string= (-> (get-current-continue-forced *game-info*) name) arg0) + ) + +(defun dm-subdiv-draw-func ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *subdivide-draw-mode* (the-as subdivide-setting (/ arg0 8))) + ) + (= (/ arg0 8) *subdivide-draw-mode*) + ) + +(defun dm-scissor-subdiv-draw-func ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *subdivide-scissor-draw-mode* (the-as subdivide-setting (/ arg0 8))) + ) + (= (/ arg0 8) *subdivide-scissor-draw-mode*) + ) + +(defun dm-foreground-subdiv-draw-func ((arg0 int) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (set! *subdivide-foreground-draw-mode* (the-as subdivide-setting (/ arg0 8))) + (let ((v1-3 *generic-consts*) + (a1-1 (/ arg0 8)) + ) + (cond + ((zero? a1-1) + (set! (-> v1-3 base-strgif str-prim) + (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> v1-3 base-strgif fan-prim) + (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ((= a1-1 1) + (set! (-> v1-3 base-strgif str-prim) + (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> v1-3 base-strgif fan-prim) + (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ((= a1-1 2) + (set! (-> v1-3 base-strgif str-prim) + (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> v1-3 base-strgif fan-prim) + (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ((= a1-1 3) + (set! (-> v1-3 base-strgif str-prim) + (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> v1-3 base-strgif fan-prim) + (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ) + ) + ) + (= (/ arg0 8) *subdivide-foreground-draw-mode*) + ) + +(defun dm-col-rend-on-func ((arg0 object) (arg1 debug-menu-msg)) + (let ((v1-0 *col-rend*)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> v1-0 draw?) (not (-> v1-0 draw?))) + ) + (-> v1-0 draw?) + ) + ) + +(defun dm-col-rend-outline-func ((arg0 object) (arg1 debug-menu-msg)) + (let ((v1-0 *col-rend*)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> v1-0 outline?) (not (-> v1-0 outline?))) + ) + (-> v1-0 outline?) + ) + ) + +(defun dm-col-rend-back-face-func ((arg0 object) (arg1 debug-menu-msg)) + (let ((v1-0 *col-rend*)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> v1-0 show-back-faces?) (not (-> v1-0 show-back-faces?))) + ) + (-> v1-0 show-back-faces?) + ) + ) + +(defun dm-col-rend-normals-func ((arg0 object) (arg1 debug-menu-msg)) + (let ((v1-0 *col-rend*)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> v1-0 show-normals?) (not (-> v1-0 show-normals?))) + ) + (-> v1-0 show-normals?) + ) + ) + +(defun dm-col-rend-ghost-hidden-func ((arg0 object) (arg1 debug-menu-msg)) + (let ((v1-0 *col-rend*)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> v1-0 ghost-hidden?) (not (-> v1-0 ghost-hidden?))) + ) + (-> v1-0 ghost-hidden?) + ) + ) + +(defun dm-col-rend-track-func ((arg0 int) (arg1 debug-menu-msg)) + (let ((v1-0 *col-rend*)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> v1-0 track) (the-as uint (/ arg0 8))) + ) + (= (/ arg0 8) (-> v1-0 track)) + ) + ) + +(defun dm-col-rend-show-only-toggle-func ((arg0 uint) (arg1 debug-menu-msg)) + (let ((v1-0 *col-rend*)) + (when (= arg1 (debug-menu-msg press)) + (logxor! (-> v1-0 show-only) arg0) + (logand! (-> v1-0 show-only) -57) + ) + (logtest? (-> v1-0 show-only) arg0) + ) + ) + +(defun dm-col-rend-show-only-set-func ((arg0 uint) (arg1 debug-menu-msg)) + (let ((v1-0 *col-rend*)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> v1-0 show-only) arg0) + ) + (= (-> v1-0 show-only) arg0) + ) + ) + +(defun dm-col-rend-cspec-toggle ((arg0 uint) (arg1 debug-menu-msg)) + (let ((v1-0 *col-rend*)) + (if (= arg1 (debug-menu-msg press)) + (logxor! (-> v1-0 cspec) (the-as uint arg0)) + ) + (logtest? (-> v1-0 cspec) arg0) + ) + ) + +(defun dm-col-rend-size ((arg0 object) (arg1 debug-menu-msg) (arg2 float)) + (let ((v1-0 *col-rend*)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> v1-0 bbox-radius) (* 2048.0 arg2)) + ) + (* 0.00024414062 (* 2.0 (-> v1-0 bbox-radius))) + ) + ) + +(defun dm-col-rend-cam-dist ((arg0 object) (arg1 debug-menu-msg) (arg2 float)) + (let ((v1-0 *col-rend*)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> v1-0 camera-to-bbox-dist) (* 4096.0 arg2)) + ) + (* 0.00024414062 (-> v1-0 camera-to-bbox-dist)) + ) + ) + +(defun dm-ocean-height-func ((arg0 ocean-height-hack) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (set! *ocean-height-hack* (the-as ocean-height-hack (/ (the-as int arg0) 8))) + (let* ((v1-3 (/ (the-as int arg0) 8)) + (f0-0 (cond + ((= v1-3 2) + -16384000.0 + ) + ((= v1-3 3) + -216498.17 + ) + ((= v1-3 4) + -265650.2 + ) + ((= v1-3 5) + -314802.2 + ) + ((= v1-3 6) + -368050.2 + ) + (else + 0.0 + ) + ) + ) + ) + (set-height! *ocean-map-sewer* f0-0) + ) + ) + (= (/ (the-as int arg0) 8) *ocean-height-hack*) + ) + +(defun dm-ocean-subdiv-draw-func ((arg0 object) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *subdivide-ocean-draw-mode* (the-as subdivide-setting (/ (the-as int arg0) 8))) + ) + (= (/ (the-as int arg0) 8) *subdivide-ocean-draw-mode*) + ) + +(defun dm-time-of-day-func ((arg0 int) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (cond + ((zero? (/ arg0 8)) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 7) + (set! (-> *time-of-day-context* mode) (the-as time-of-day-palette-id (/ arg0 8))) + ) + ((= (/ arg0 8) 1) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 10) + (set! (-> *time-of-day-context* mode) (the-as time-of-day-palette-id (/ arg0 8))) + ) + ((= (/ arg0 8) 2) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 12) + (set! (-> *time-of-day-context* mode) (the-as time-of-day-palette-id (/ arg0 8))) + ) + ((= (/ arg0 8) 3) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 14) + (set! (-> *time-of-day-context* mode) (the-as time-of-day-palette-id (/ arg0 8))) + ) + ((= (/ arg0 8) 4) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 18) + (set! (-> *time-of-day-context* mode) (the-as time-of-day-palette-id (/ arg0 8))) + ) + ((= (/ arg0 8) 5) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 19) + (set! (-> *time-of-day-context* mode) (the-as time-of-day-palette-id (/ arg0 8))) + ) + ((= (/ arg0 8) 6) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 23) + (set! (-> *time-of-day-context* mode) (the-as time-of-day-palette-id (/ arg0 8))) + ) + ((= (/ arg0 8) 7) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 4) + (set! (-> *time-of-day-context* mode) (the-as time-of-day-palette-id (/ arg0 8))) + ) + ((= (/ arg0 8) 8) + (send-event + (ppointer->process *time-of-day*) + 'dest-clock-ratio-set + (if *time-of-day-fast* + #x42700000 + #x3f800000 + ) + (seconds 2) + ) + ) + (else + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + (set! (-> *time-of-day-context* mode) + (logand (logxor (-> *time-of-day-context* mode) (the-as uint (/ arg0 8))) + (time-of-day-palette-id palette-0 palette-1 palette-2 palette-3 palette-4 palette-5 palette-6 palette-7) + ) + ) + ) + ) + (send-event (ppointer->process *time-of-day*) 'change 'minutes 0) + (send-event (ppointer->process *time-of-day*) 'change 'seconds 0) + (send-event (ppointer->process *time-of-day*) 'change 'frames 0) + (set! *teleport-count* 1) + ) + (cond + ((< (/ arg0 8) 9) + (= (/ arg0 8) (-> *time-of-day-context* mode)) + ) + ((< (/ arg0 8) 8) + #f + ) + (else + (logtest? (-> *time-of-day-context* mode) (/ arg0 8)) + ) + ) + ) + +(defun dm-time-of-day-func2 ((arg0 symbol) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (set! (-> arg0 value) (not (-> arg0 value))) + (if (nonzero? (send-event (ppointer->process *time-of-day*) 'ratio)) + (send-event + (ppointer->process *time-of-day*) + 'dest-clock-ratio-set + (if *time-of-day-fast* + #x42700000 + #x3f800000 + ) + (seconds 2) + ) + ) + ) + (-> arg0 value) + ) + +(defun dm-time-of-day-palette-func ((arg0 int) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (set! (-> *time-of-day-context* overide-palette) (the-as time-of-day-palette-id (/ arg0 8))) + (cond + ((zero? (/ arg0 8)) + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id palette-0)) + ) + ((= (/ arg0 8) 1) + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id palette-1)) + ) + ((= (/ arg0 8) 2) + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id palette-2)) + ) + ((= (/ arg0 8) 3) + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id palette-3)) + ) + ((= (/ arg0 8) 4) + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id palette-4)) + ) + ((= (/ arg0 8) 5) + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id palette-5)) + ) + ((= (/ arg0 8) 6) + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id palette-6)) + ) + ((= (/ arg0 8) 7) + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id palette-7)) + ) + ) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + ) + (cond + ((zero? (/ arg0 8)) + (= (-> *time-of-day-context* mode) 16) + ) + ((= (/ arg0 8) 1) + (= (-> *time-of-day-context* mode) 32) + ) + ((= (/ arg0 8) 2) + (= (-> *time-of-day-context* mode) 64) + ) + ((= (/ arg0 8) 3) + (= (-> *time-of-day-context* mode) 128) + ) + ((= (/ arg0 8) 4) + (= (-> *time-of-day-context* mode) 256) + ) + ((= (/ arg0 8) 5) + (= (-> *time-of-day-context* mode) 512) + ) + ((= (/ arg0 8) 6) + (= (-> *time-of-day-context* mode) 1024) + ) + ((= (/ arg0 8) 7) + (= (-> *time-of-day-context* mode) 2048) + ) + ) + ) + +(defun dm-boolean-toggle-pick-func ((arg0 symbol) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> arg0 value) (not (-> arg0 value))) + ) + (-> arg0 value) + ) + +(defun dm-time-of-day-pick-func ((arg0 symbol) (arg1 debug-menu-msg)) + (time-of-day-setup (= arg1 (debug-menu-msg press))) + ) + +(defun dm-stats-memory-func ((arg0 int) (arg1 debug-menu-msg)) + (let ((v1-0 (/ arg0 8))) + (if (= arg1 (debug-menu-msg press)) + (set! *stats-memory-level-index* v1-0) + ) + (= *stats-memory-level-index* v1-0) + ) + ) + +(defun dm-actor-marks-pick-func ((arg0 symbol) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *display-actor-marks* arg0) + ) + (= *display-actor-marks* arg0) + ) + +;; WARN: Return type mismatch number vs object. +(defun dm-debug-actor-lod-dist ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (local-vars (sv-16 res-tag)) + (when (= arg1 (debug-menu-msg press)) + (when (and *debug-actor* (>= (-> (the-as process-drawable *debug-actor*) draw lod-set max-lod) (/ arg0 8))) + (let ((a0-4 (&+ (-> (the-as process-drawable *debug-actor*) draw jgeo extra data-base) (* (/ arg0 8) 4)))) + (mem-set32! a0-4 1 (the-as int (* 4096.0 arg2))) + ) + (reset-actors 'debug) + ) + ) + (cond + (*debug-actor* + (let ((f30-0 0.00024414062)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-21 (res-lump-data + (-> (the-as process-drawable *debug-actor*) draw jgeo extra) + 'lod-dist + (pointer float) + :tag-ptr (& sv-16) + ) + ) + ) + (* f30-0 (if (and v1-21 (< (/ arg0 8) (the-as int (-> sv-16 elt-count)))) + (-> v1-21 (/ arg0 8)) + 0.0 + ) + ) + ) + ) + ) + (else + 0 + ) + ) + ) + +(defun dm-select-race-pick-func ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *select-race* (the-as race-selection (/ arg0 8))) + ) + (= (/ arg0 8) *select-race*) + ) + +(defun dm-compact-actor-pick-func ((arg0 symbol) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *compact-actors* arg0) + ) + (= *compact-actors* arg0) + ) + +(defun dm-actor-vis-pick-func ((arg0 symbol) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *display-actor-vis* arg0) + ) + (= *display-actor-vis* arg0) + ) + +(defun dm-game-mode-pick-func ((arg0 symbol) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *game-info* mode) arg0) + ) + (= (-> *game-info* mode) arg0) + ) + +(defun dm-game-feature-toggle-pick-func ((arg0 int) (arg1 debug-menu-msg)) + (let ((v1-1 (ash 1 (/ arg0 8)))) + (when (= arg1 (debug-menu-msg press)) + (logxor! (-> *game-info* features) (the-as uint v1-1)) + (set! (-> *game-info* debug-features) + (logior (logclear (-> *game-info* debug-features) v1-1) (logand (-> *game-info* features) v1-1)) + ) + (if (logtest? (game-feature + gun-red-1 + gun-red-2 + gun-red-3 + gun-yellow-1 + gun-yellow-2 + gun-yellow-3 + gun-blue-1 + gun-blue-2 + gun-blue-3 + gun-dark-1 + gun-dark-2 + gun-dark-3 + ) + (-> *game-info* features) + ) + (logior! (-> *game-info* features) (game-feature gun)) + (logclear! (-> *game-info* features) (game-feature gun)) + ) + (if (logtest? (game-feature + gun-red-1 + gun-red-2 + gun-red-3 + gun-yellow-1 + gun-yellow-2 + gun-yellow-3 + gun-blue-1 + gun-blue-2 + gun-blue-3 + gun-dark-1 + gun-dark-2 + gun-dark-3 + ) + (-> *game-info* debug-features) + ) + (logior! (-> *game-info* debug-features) (game-feature gun)) + (logclear! (-> *game-info* debug-features) (game-feature gun)) + ) + ) + (logtest? (-> *game-info* features) v1-1) + ) + ) + +(defun dm-game-vehicle-toggle-pick-func ((arg0 int) (arg1 debug-menu-msg)) + (let ((v1-1 (ash 1 (/ arg0 8)))) + (when (= arg1 (debug-menu-msg press)) + (logxor! (-> *game-info* vehicles) (the-as uint v1-1)) + (set! (-> *game-info* debug-vehicles) + (logior (logclear (-> *game-info* debug-vehicles) v1-1) (logand (-> *game-info* vehicles) v1-1)) + ) + ) + (logtest? (-> *game-info* vehicles) v1-1) + ) + ) + +(defun dm-game-secret-toggle-pick-func ((arg0 int) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (logxor! (-> *game-info* secrets) (the-as uint (ash 1 (/ arg0 8)))) + (update-task-masks 'event) + ) + (logtest? (-> *game-info* secrets) (ash 1 (/ arg0 8))) + ) + +(defun display-scene-control-toggle-pick-func ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *display-scene-control* (logxor *display-scene-control* (the-as uint arg0))) + ) + (logtest? *display-scene-control* arg0) + ) + +(defun display-scene-control-set-pick-func ((arg0 scene-controls) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *display-scene-control* arg0) + ) + (= *display-scene-control* arg0) + ) + +(defun display-bot-marks-toggle-pick-func ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *display-bot-marks* (logxor *display-bot-marks* (the-as uint arg0))) + ) + (logtest? *display-bot-marks* arg0) + ) + +(defun display-bot-marks-set-pick-func ((arg0 bot-marks-controls) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *display-bot-marks* arg0) + ) + (= *display-bot-marks* arg0) + ) + +(defun display-race-marks-toggle-pick-func ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *display-race-marks* (logxor *display-race-marks* (the-as uint arg0))) + ) + (logtest? *display-race-marks* arg0) + ) + +(defun display-race-marks-set-pick-func ((arg0 race-marks-controls) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *display-race-marks* arg0) + ) + (= *display-race-marks* arg0) + ) + +(defun dm-vu1-user-toggle-pick-func ((arg0 vu1-renderer-mask) (arg1 debug-menu-msg)) + (let ((v1-1 (ash 1 (/ (the-as int arg0) 8)))) + (if (= arg1 (debug-menu-msg press)) + (logxor! (-> *display* vu1-enable-user-menu) (the-as uint v1-1)) + ) + (logtest? (-> *display* vu1-enable-user-menu) v1-1) + ) + ) + +(defun dm-vu1-user-all-pick-func ((arg0 symbol) (arg1 debug-menu-msg)) + (let ((v1-1 (the-as uint #x17fffffff8))) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *display* vu1-enable-user-menu) (the-as vu1-renderer-mask v1-1)) + ) + (= (-> *display* vu1-enable-user-menu) v1-1) + ) + ) + +(defun dm-vu1-user-none-pick-func ((arg0 symbol) (arg1 debug-menu-msg)) + (let ((v1-0 0)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *display* vu1-enable-user-menu) (the-as vu1-renderer-mask v1-0)) + ) + (= (-> *display* vu1-enable-user-menu) v1-0) + ) + ) + +(defun dm-texture-user-toggle-pick-func ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (logxor! (-> *texture-pool* texture-enable-user-menu) (the-as uint arg0)) + ) + (logtest? (-> *texture-pool* texture-enable-user-menu) arg0) + ) + +(defun dm-texture-user-set-pick-func ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *texture-pool* texture-enable-user-menu) (the-as texture-enable-mask arg0)) + ) + (= (-> *texture-pool* texture-enable-user-menu) arg0) + ) + +(defun dm-strip-lines-toggle-pick-func ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *display-strip-lines* (logxor *display-strip-lines* (the-as uint (/ arg0 8)))) + ) + (logtest? *display-strip-lines* (/ arg0 8)) + ) + +(defun dm-strip-lines-set-pick-func ((arg0 strip-lines-controls) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *display-strip-lines* (the-as strip-lines-controls (/ (the-as int arg0) 8))) + ) + (= *display-strip-lines* (/ (the-as int arg0) 8)) + ) + +(defun dm-edit-instance-toggle-pick-func ((arg0 int) (arg1 debug-menu-msg)) + (dotimes (s4-0 (-> *level* length)) + (let ((a1-1 (-> *level* level s4-0))) + (when (= (-> a1-1 status) 'active) + (let ((v1-4 (find-instance-by-name-level *edit-instance* a1-1))) + (when v1-4 + (if (= arg1 (debug-menu-msg press)) + (logxor! (-> v1-4 flags) (the-as uint arg0)) + ) + (logtest? (-> v1-4 flags) arg0) + ) + ) + ) + ) + ) + #f + ) + +;; og:preserve-this +(defun all-texture-tweak-adjust ((arg0 texture-page-dir) (arg1 float)) + (none) + ) + +(defun dm-float-field-tie-rvanish-func ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (let ((f30-0 arg3)) + (dotimes (s3-0 (-> *level* length)) + (let ((a1-1 (-> *level* level s3-0))) + (when (= (-> a1-1 status) 'active) + (let ((s2-0 (find-instance-by-name-level (the-as string (-> arg0 value)) a1-1))) + (when s2-0 + (case (prototype-bucket-type s2-0) + ((instance-tie) + (let* ((f0-0 (-> (the-as prototype-bucket-tie s2-0) tie-vanish-far)) + (f1-2 (- f0-0 (/ 128.0 (-> (the-as prototype-bucket-tie s2-0) tie-rvanish)))) + ) + (let ((f2-1 (-> (the-as prototype-bucket-tie s2-0) dists w))) + (when (= arg1 (debug-menu-msg press)) + (logior! (-> (the-as prototype-bucket-tie s2-0) flags) (prototype-flags vanish)) + (set! f1-2 (fmax (fmin (* 4096.0 arg2) f0-0) (+ 4096.0 f2-1))) + (let ((f0-1 (fmax f0-0 (+ 4096.0 f1-2)))) + (set! (-> (the-as prototype-bucket-tie s2-0) tie-rvanish) (/ 128.0 (- f0-1 f1-2))) + (set! (-> (the-as prototype-bucket-tie s2-0) tie-vanish-far) f0-1) + ) + ) + ) + (set! f30-0 (* 0.00024414062 f1-2)) + ) + ) + ) + ) + ) + ) + ) + ) + f30-0 + ) + ) + +(defun dm-float-field-tie-vanish-far-func ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (let ((f30-0 arg3)) + (dotimes (s3-0 (-> *level* length)) + (let ((a1-1 (-> *level* level s3-0))) + (when (= (-> a1-1 status) 'active) + (let ((s2-0 (find-instance-by-name-level (the-as string (-> arg0 value)) a1-1))) + (when s2-0 + (case (prototype-bucket-type s2-0) + ((instance-tie) + (let ((f0-0 (-> (the-as prototype-bucket-tie s2-0) tie-vanish-far))) + (let ((f2-1 (- f0-0 (/ 128.0 (-> (the-as prototype-bucket-tie s2-0) tie-rvanish)))) + (f1-2 (-> (the-as prototype-bucket-tie s2-0) dists w)) + ) + (when (= arg1 (debug-menu-msg press)) + (logior! (-> s2-0 flags) (prototype-flags vanish)) + (set! f0-0 (fmax (* 4096.0 arg2) (+ 4096.0 f2-1))) + (let ((f1-4 (fmax (fmin f2-1 f0-0) (+ 4096.0 f1-2)))) + (set! (-> (the-as prototype-bucket-tie s2-0) tie-rvanish) (/ 128.0 (- f0-0 f1-4))) + ) + (set! (-> (the-as prototype-bucket-tie s2-0) tie-vanish-far) f0-0) + ) + ) + (set! f30-0 (* 0.00024414062 f0-0)) + ) + ) + ) + ) + ) + ) + ) + ) + f30-0 + ) + ) + +(defun dm-bug-report-output-pick-func ((arg0 symbol) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *bug-report-output-mode* arg0) + ) + (= *bug-report-output-mode* arg0) + ) + +(defun dm-bug-report-report-pick-func ((arg0 symbol) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (bug-report-display arg0) + ) + 0 + (none) + ) + +(defun debug-menu-node arg0 name) (-> arg1 name)) + ) + +(defun dm-shader-pick-func ((arg0 texture-id) (arg1 debug-menu-msg)) + (if (and (= arg1 (debug-menu-msg press)) + *texture-page-dir* + (-> *texture-page-dir* entries (-> arg0 page) page) + (-> *texture-page-dir* entries (-> arg0 page) link) + (nonzero? (-> *texture-page-dir* entries (-> arg0 page) link next (-> arg0 index))) + ) + (set! *edit-shader* arg0) + ) + (and (nonzero? *edit-shader*) (= arg0 *edit-shader*)) + ) + +(define *shader-pick-menu* (the-as debug-menu #f)) + +;; WARN: Return type mismatch pair vs none. +(defun build-shader-list () + (debug-menu-remove-all-items *shader-pick-menu*) + (when *texture-page-dir* + (dotimes (gp-0 (-> *texture-page-dir* length)) + (let ((s5-0 (-> *texture-page-dir* entries gp-0 page)) + (s4-0 (-> *texture-page-dir* entries gp-0 link)) + ) + (when (and s5-0 s4-0) + (dotimes (s3-0 (-> s5-0 length)) + (when (and (-> s5-0 data s3-0) (nonzero? (-> s4-0 next s3-0))) + (let ((a1-1 (new + 'debug + 'debug-menu-item-flag + (-> s5-0 data s3-0 name) + (logior (shr (shl s3-0 52) 44) (shr (shl gp-0 52) 32)) + dm-shader-pick-func + ) + ) + ) + (debug-menu-append-item *shader-pick-menu* a1-1) + ) + ) + ) + ) + ) + ) + ) + (set! (-> *shader-pick-menu* items) (sort (-> *shader-pick-menu* items) debug-menu-node *level* length)) + (let ((a1-1 (-> *level* level s5-0))) + (when (= (-> a1-1 status) 'active) + (if (find-instance-by-name-level arg0 a1-1) + (set! *edit-instance* arg0) + ) + ) + ) + ) + ) + (the-as basic (and *edit-instance* (string= arg0 *edit-instance*))) + ) + +(defun dm-enable-instance-func ((arg0 string) (arg1 debug-menu-msg)) + (let ((s3-0 #f)) + (dotimes (s4-0 (-> *level* length)) + (let ((a1-1 (-> *level* level s4-0))) + (when (= (-> a1-1 status) 'active) + (let ((v1-4 (find-instance-by-name-level arg0 a1-1))) + (when v1-4 + (if (= arg1 (debug-menu-msg press)) + (logxor! (-> v1-4 flags) (prototype-flags disable)) + ) + (set! s3-0 (not (logtest? (-> v1-4 flags) (prototype-flags disable)))) + ) + ) + ) + ) + ) + s3-0 + ) + ) + +(define *instance-shrub-menu* (the-as debug-menu #f)) + +(define *instance-tie-menu* (the-as debug-menu #f)) + +(define *enable-instance-shrub-menu* (the-as debug-menu #f)) + +(define *enable-instance-tie-menu* (the-as debug-menu #f)) + +(defun build-instance-list ((arg0 object)) + (debug-menu-remove-all-items *instance-shrub-menu*) + (debug-menu-remove-all-items *instance-tie-menu*) + (debug-menu-remove-all-items *enable-instance-shrub-menu*) + (debug-menu-remove-all-items *enable-instance-tie-menu*) + (set! *display-instance-info* #f) + (dotimes (gp-0 (-> *level* length)) + (let ((v1-3 (-> *level* level gp-0))) + (when (= (-> v1-3 status) 'active) + (let ((s5-0 (-> v1-3 bsp drawable-trees))) + (dotimes (s4-0 (-> s5-0 length)) + (let ((v1-7 (-> s5-0 trees s4-0))) + (case (-> v1-7 type) + ((drawable-tree-instance-shrub) + (let ((s3-0 (-> (the-as drawable-tree-instance-shrub v1-7) info prototype-inline-array-shrub))) + (dotimes (s2-0 (-> s3-0 length)) + (let ((a1-4 + (new + 'global + 'debug-menu-item-flag + (-> s3-0 data s2-0 name) + (the-as int (-> s3-0 data s2-0 name)) + dm-instance-pick-func + ) + ) + ) + (debug-menu-append-item *instance-shrub-menu* a1-4) + ) + (let ((a1-6 + (new + 'debug + 'debug-menu-item-flag + (-> s3-0 data s2-0 name) + (the-as int (-> s3-0 data s2-0 name)) + dm-enable-instance-func + ) + ) + ) + (set! (-> a1-6 is-on) #t) + (debug-menu-append-item *enable-instance-shrub-menu* a1-6) + ) + ) + ) + ) + ((drawable-tree-instance-tie) + (let ((s3-1 (-> (the-as drawable-tree-instance-tie v1-7) prototypes prototype-array-tie))) + (dotimes (s2-1 (-> s3-1 length)) + (let ((a1-9 + (new + 'debug + 'debug-menu-item-flag + (-> s3-1 array-data s2-1 name) + (the-as int (-> s3-1 array-data s2-1 name)) + dm-instance-pick-func + ) + ) + ) + (debug-menu-append-item *instance-tie-menu* a1-9) + ) + (let ((a1-11 + (new + 'debug + 'debug-menu-item-flag + (-> s3-1 array-data s2-1 name) + (the-as int (-> s3-1 array-data s2-1 name)) + dm-enable-instance-func + ) + ) + ) + (set! (-> a1-11 is-on) #t) + (debug-menu-append-item *enable-instance-tie-menu* a1-11) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (set! (-> *instance-shrub-menu* items) + (sort + (-> *instance-shrub-menu* items) + (lambda ((arg0 debug-menu) (arg1 debug-menu)) (string<=? (-> arg0 name) (-> arg1 name))) + ) + ) + (set! (-> *instance-tie-menu* items) + (sort + (-> *instance-tie-menu* items) + (lambda ((arg0 debug-menu) (arg1 debug-menu)) (string<=? (-> arg0 name) (-> arg1 name))) + ) + ) + (set! (-> *enable-instance-shrub-menu* items) + (sort + (-> *enable-instance-shrub-menu* items) + (lambda ((arg0 debug-menu) (arg1 debug-menu)) (string<=? (-> arg0 name) (-> arg1 name))) + ) + ) + (set! (-> *enable-instance-tie-menu* items) + (sort + (-> *enable-instance-tie-menu* items) + (lambda ((arg0 debug-menu) (arg1 debug-menu)) (string<=? (-> arg0 name) (-> arg1 name))) + ) + ) + 0 + (none) + ) + +(defun dm-scene-load-pick-func ((arg0 pair) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (let ((s5-0 *display-profile*)) + (play-clean #f) + (set! *display-profile* s5-0) + ) + (set! *debug-menu-scene-play* #t) + (let ((s5-1 (car (cdr arg0)))) + (process-spawn scene-player :init scene-player-init s5-1 #t (car arg0) :name "scene-player") + ) + (debug-menu-context-send-msg *debug-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation)) + (set-master-mode 'game) + ) + #f + ) + +;; WARN: Return type mismatch object vs none. +(defun debug-create-cam-restore () + (cond + (*math-camera* + (format #t "(defun-debug cam-restore ()~%") + (format #t " ;;this function is a hack, don't use it as an example~%") + (format #t " (let ((pos (new 'stack 'vector))~%") + (format #t " (rot (new 'stack 'matrix)))~%") + (format #t " (set! (-> pos x) ~12F)~%" (-> *math-camera* trans x)) + (format #t " (set! (-> pos y) ~12F)~%" (-> *math-camera* trans y)) + (format #t " (set! (-> pos z) ~12F)~%" (-> *math-camera* trans z)) + (format #t " (set! (-> pos w) 1.0)~%") + (format #t " (set! (-> rot data 0) ~12F)~%" (-> *math-camera* inv-camera-rot rvec x)) + (format #t " (set! (-> rot data 1) ~12F)~%" (-> *math-camera* inv-camera-rot rvec y)) + (format #t " (set! (-> rot data 2) ~12F)~%" (-> *math-camera* inv-camera-rot rvec z)) + (format #t " (set! (-> rot data 3) ~12F)~%" (-> *math-camera* inv-camera-rot rvec w)) + (format #t " (set! (-> rot data 4) ~12F)~%" (-> *math-camera* inv-camera-rot uvec x)) + (format #t " (set! (-> rot data 5) ~12F)~%" (-> *math-camera* inv-camera-rot uvec y)) + (format #t " (set! (-> rot data 6) ~12F)~%" (-> *math-camera* inv-camera-rot uvec z)) + (format #t " (set! (-> rot data 7) ~12F)~%" (-> *math-camera* inv-camera-rot uvec w)) + (format #t " (set! (-> rot data 8) ~12F)~%" (-> *math-camera* inv-camera-rot fvec x)) + (format #t " (set! (-> rot data 9) ~12F)~%" (-> *math-camera* inv-camera-rot fvec y)) + (format #t " (set! (-> rot data 10) ~12F)~%" (-> *math-camera* inv-camera-rot fvec z)) + (format #t " (set! (-> rot data 11) ~12F)~%" (-> *math-camera* inv-camera-rot fvec w)) + (format #t " (set! (-> rot data 12) ~12F)~%" 0) + (format #t " (set! (-> rot data 13) ~12F)~%" 0) + (format #t " (set! (-> rot data 14) ~12F)~%" 0) + (format #t " (set! (-> rot data 15) ~12F)~%" #x3f800000) + (let ((gp-0 (new 'stack-no-clear 'euler-angles))) + (matrix->eul gp-0 (-> *math-camera* inv-camera-rot) 21) + (format #t " ;; euler angles (xyz order degrees) x ~R y ~R z ~R~%" (-> gp-0 x) (-> gp-0 y) (-> gp-0 z)) + (format + #t + " ;; MAYA euler angles (xyz order degrees) x ~R y ~R z ~R~%" + (-> gp-0 x) + (- 32768.0 (-> gp-0 y)) + (-> gp-0 z) + ) + ) + (format #t " (debug-set-camera-pos-rot! pos rot)~%") + (format #t " (send-event *camera* 'set-fov (deg ~f))~%" (* 0.005493164 (-> *math-camera* fov))) + (format #t " (clear *camera-old-level*)~%") + (format #t " (format *camera-old-level* \"~A\")~%" (-> *level* level0 name)) + (let ((t9-31 format) + (a0-31 #t) + (a1-31 " (set! *camera-old-cpu* ~D)~%") + (a2-25 (-> *display* frames (-> *display* last-screen) profile-array data 0)) + ) + (t9-31 a0-31 a1-31 (- (-> a2-25 data 0 end-time) (-> a2-25 data 0 start-time))) + ) + (let ((t9-32 format) + (a0-32 #t) + (a1-32 " (set! *camera-old-vu* ~D)~%") + (a2-29 (-> *display* frames (-> *display* on-screen) profile-array data 1)) + ) + (t9-32 a0-32 a1-32 (- (-> a2-29 data 0 end-time) (-> a2-29 data 0 start-time))) + ) + (compute-memory-usage! (the-as level (-> *level* level)) #f) + (format #t " (set! *camera-old-tfrag-bytes* ~D)~%" (+ (-> *level* level0 mem-usage-block data 1 total) + (-> *level* level0 mem-usage-block data 2 total) + (-> *level* level0 mem-usage-block data 3 total) + (-> *level* level0 mem-usage-block data 4 total) + (-> *level* level0 mem-usage-block data 5 total) + (-> *level* level0 mem-usage-block data 6 total) + (-> *level* level0 mem-usage-block data 7 total) + (-> *level* level0 mem-usage-block data 8 total) + ) + ) + (format #t " (clear *camera-old-stat-string-tfrag*)~%") + (format #t " (clear *camera-old-stat-string-tfrag-near*)~%") + (format #t " (clear *camera-old-stat-string-total*)~%") + (when *stats-poly* + (format #t " (format *camera-old-stat-string-tfrag* \"~S\")~%" *stat-string-tfrag*) + (format #t " (format *camera-old-stat-string-tfrag-near* \"~S\")~%" *stat-string-tfrag-scissor*) + (format #t " (format *camera-old-stat-string-total* \"~S\")~%" *stat-string-total*) + ) + (format #t " (set! *display-camera-old-stats* #t)~%") + (format #t " )~%") + (format #t " )~%") + ) + (else + (format #t "camera save failed~%") + ) + ) + (none) + ) + +(defun debug-menu-make-camera-mode-menu ((arg0 debug-menu) (arg1 debug-menu)) + (new 'debug 'debug-menu-item-submenu "Camera" arg0) + (let ((a1-3 (new 'debug 'debug-menu-item-submenu "Mode" arg1))) + (debug-menu-append-item arg0 a1-3) + ) + (let ((a1-5 (new 'debug 'debug-menu-item-flag "Default" (the-as int #f) dm-cam-mode-default))) + (debug-menu-append-item arg1 a1-5) + ) + (let ((a1-7 (new 'debug 'debug-menu-item-flag "Free-floating" (the-as int cam-free-floating) dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-7) + ) + (let ((a1-9 (new 'debug 'debug-menu-item-flag "Fixed" (the-as int cam-fixed) dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-9) + ) + (let ((a1-11 (new 'debug 'debug-menu-item-flag "No Trans" (the-as int cam-no-trans) dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-11) + ) + (let ((a1-13 (new 'debug 'debug-menu-item-flag "Pov" (the-as int cam-pov) dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-13) + ) + (let ((a1-15 (new 'debug 'debug-menu-item-flag "Pov180" (the-as int cam-pov180) dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-15) + ) + (let ((a1-17 (new 'debug 'debug-menu-item-flag "Pov-track" (the-as int cam-pov-track) dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-17) + ) + (let ((a1-19 (new 'debug 'debug-menu-item-flag "Decel" (the-as int cam-decel) dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-19) + ) + (let ((a1-21 (new 'debug 'debug-menu-item-flag "Endless fall" (the-as int cam-endlessfall) dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-21) + ) + (let ((a1-23 (new 'debug 'debug-menu-item-flag "Eye" (the-as int cam-eye) dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-23) + ) + (let ((a1-25 (new 'debug 'debug-menu-item-flag "Stick" (the-as int cam-stick) dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-25) + ) + (let ((a1-27 (new 'debug 'debug-menu-item-flag "String" (the-as int cam-string) dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-27) + ) + (let ((a1-29 (new 'debug 'debug-menu-item-flag "Standoff" (the-as int cam-standoff) dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-29) + ) + (let ((a1-31 (new 'debug 'debug-menu-item-flag "Circular" (the-as int cam-circular) dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-31) + ) + (let ((a1-33 (new 'debug 'debug-menu-item-flag "Look At" (the-as int cam-lookat) dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-33) + ) + (let ((a1-35 (new 'debug 'debug-menu-item-flag "Center of world" (the-as int cam-point-watch) dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-35) + ) + (let ((a1-37 (new 'debug 'debug-menu-item-flag "Spline" (the-as int cam-spline) dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-37) + ) + (let ((a1-39 (new 'debug 'debug-menu-item-flag "Tube Sled" (the-as int cam-tube-sled) dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-39) + ) + (let ((a1-41 (new 'debug 'debug-menu-item-flag "Bike" (the-as int cam-bike) dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-41) + ) + ) + +(defun debug-menu-make-camera-menu ((arg0 debug-menu-context)) + (let* ((gp-0 (new 'debug 'debug-menu arg0 "Camera menu")) + (s5-0 (new 'debug 'debug-menu-item-submenu "Camera" gp-0)) + ) + (let ((a1-3 (new 'debug 'debug-menu arg0 "Camera mode menu"))) + (debug-menu-make-camera-mode-menu gp-0 a1-3) + ) + (let ((s3-0 (new 'debug 'debug-menu arg0 "Camera externalize menu"))) + (let ((a1-6 (new 'debug 'debug-menu-item-submenu "External" s3-0))) + (debug-menu-append-item gp-0 a1-6) + ) + (let ((a1-8 (new 'debug 'debug-menu-item-flag "CPad 0" (the-as int 'pad-0) dm-cam-externalize))) + (debug-menu-append-item s3-0 a1-8) + ) + (let ((a1-10 (new 'debug 'debug-menu-item-flag "CPad 1" (the-as int 'pad-1) dm-cam-externalize))) + (debug-menu-append-item s3-0 a1-10) + ) + (let ((a1-12 (new 'debug 'debug-menu-item-flag "Lock" (the-as int 'locked) dm-cam-externalize))) + (debug-menu-append-item s3-0 a1-12) + ) + (let ((a1-14 (new 'debug 'debug-menu-item-flag "Reset" (the-as int 'reset) dm-cam-externalize))) + (debug-menu-append-item s3-0 a1-14) + ) + (let ((a1-16 (new 'debug 'debug-menu-item-flag "Allow z rot" (the-as int 'allow-z) dm-cam-externalize))) + (debug-menu-append-item s3-0 a1-16) + ) + (let ((s2-0 (new 'debug 'debug-menu-item-var "Fov" 0 80))) + (debug-menu-item-var-make-float s2-0 dm-cam-render-float 1.0 #t 15.0 180.0 1) + (debug-menu-append-item s3-0 s2-0) + ) + (let ((a1-21 + (new 'debug 'debug-menu-item-flag "turbo free" (the-as int '*camera-turbo-free*) dm-boolean-toggle-pick-func) + ) + ) + (debug-menu-append-item s3-0 a1-21) + ) + ) + (let ((s3-1 (new 'debug 'debug-menu arg0 "Camera collision menu"))) + (let ((a1-24 (new 'debug 'debug-menu-item-submenu "Collision" s3-1))) + (debug-menu-append-item gp-0 a1-24) + ) + (let ((a1-26 (new + 'debug + 'debug-menu-item-flag + "Record" + (the-as int '*record-cam-collide-history*) + dm-boolean-toggle-pick-func + ) + ) + ) + (debug-menu-append-item s3-1 a1-26) + ) + (let ((a1-28 (new + 'debug + 'debug-menu-item-flag + "Display" + (the-as int '*display-cam-collide-history*) + dm-boolean-toggle-pick-func + ) + ) + ) + (debug-menu-append-item s3-1 a1-28) + ) + ) + (let ((s4-1 (new 'debug 'debug-menu arg0 "Camera settings menu"))) + (let ((a1-31 (new 'debug 'debug-menu-item-submenu "Settings" s4-1))) + (debug-menu-append-item gp-0 a1-31) + ) + (let ((a1-33 (new 'debug 'debug-menu-item-flag "Default" (the-as int #f) dm-cam-settings-default))) + (debug-menu-append-item s4-1 a1-33) + ) + (let ((a1-35 + (new 'debug 'debug-menu-item-flag "turbo free" (the-as int '*camera-turbo-free*) dm-boolean-toggle-pick-func) + ) + ) + (debug-menu-append-item s4-1 a1-35) + ) + (let ((s3-2 (new 'debug 'debug-menu-item-var "Fov" (the-as int 'fov) 80))) + (debug-menu-item-var-make-float + s3-2 + (the-as (function int debug-menu-msg float float float) dm-cam-setting-float) + 1.0 + #t + 15.0 + 180.0 + 1 + ) + (debug-menu-append-item s4-1 s3-2) + ) + (let ((a1-40 (new 'debug 'debug-menu-item-flag "Butt cam" 0 dm-cam-settings-func))) + (debug-menu-append-item s4-1 a1-40) + ) + (let ((a1-42 (new 'debug 'debug-menu-item-flag "Same side" 1 dm-cam-settings-func))) + (debug-menu-append-item s4-1 a1-42) + ) + (let ((a1-44 (new 'debug 'debug-menu-item-flag "Move spherical" 2 dm-cam-settings-func))) + (debug-menu-append-item s4-1 a1-44) + ) + (let ((a1-46 (new 'debug 'debug-menu-item-flag "Drag" 3 dm-cam-settings-func))) + (debug-menu-append-item s4-1 a1-46) + ) + (let ((a1-48 (new 'debug 'debug-menu-item-flag "Allow Z rot" 4 dm-cam-settings-func))) + (debug-menu-append-item s4-1 a1-48) + ) + (let ((a1-50 (new 'debug 'debug-menu-item-flag "Pitch for jump" 6 dm-cam-settings-func))) + (debug-menu-append-item s4-1 a1-50) + ) + (let ((a1-52 (new 'debug 'debug-menu-item-flag "Find hidden target" 7 dm-cam-settings-func))) + (debug-menu-append-item s4-1 a1-52) + ) + (let ((a1-54 (new 'debug 'debug-menu-item-flag "Collide" 8 dm-cam-settings-func))) + (debug-menu-append-item s4-1 a1-54) + ) + (let ((a1-56 (new 'debug 'debug-menu-item-flag "Line of Sight" 9 dm-cam-settings-func))) + (debug-menu-append-item s4-1 a1-56) + ) + (let ((a1-58 (new 'debug 'debug-menu-item-flag "No Rotate" 10 dm-cam-settings-func))) + (debug-menu-append-item s4-1 a1-58) + ) + (let ((a1-60 (new 'debug 'debug-menu-item-flag "Sticky Angle" 11 dm-cam-settings-func))) + (debug-menu-append-item s4-1 a1-60) + ) + (let ((s3-3 (new 'debug 'debug-menu-item-var "Interp Frms" 40 80))) + (debug-menu-item-var-make-int s3-3 dm-cam-settings-func-int 1 #f 0 0 #f) + (debug-menu-append-item s4-1 s3-3) + ) + (let ((a1-65 (new + 'debug + 'debug-menu-item-flag + "no mip/lod correction" + (the-as int '*camera-no-mip-correction*) + dm-boolean-toggle-pick-func + ) + ) + ) + (debug-menu-append-item s4-1 a1-65) + ) + (let ((a1-67 (new + 'debug + 'debug-menu-item-flag + "last attacker" + (the-as int '*display-camera-last-attacker*) + dm-boolean-toggle-pick-func + ) + ) + ) + (debug-menu-append-item s4-1 a1-67) + ) + (let ((a1-69 (new + 'debug + 'debug-menu-item-flag + "old stats" + (the-as int '*display-camera-old-stats*) + dm-boolean-toggle-pick-func + ) + ) + ) + (debug-menu-append-item s4-1 a1-69) + ) + (let ((a1-71 (new 'debug 'debug-menu-item-flag "Amy cam" (the-as int '*amy-cam*) dm-boolean-toggle-pick-func))) + (debug-menu-append-item s4-1 a1-71) + ) + (let ((a1-73 + (new 'debug 'debug-menu-item-flag "xyz axes" (the-as int '*display-xyz-axes*) dm-boolean-toggle-pick-func) + ) + ) + (debug-menu-append-item s4-1 a1-73) + ) + (let ((a1-75 (new + 'debug + 'debug-menu-item-flag + "Master Marks" + (the-as int '*display-cam-master-marks*) + dm-boolean-toggle-pick-func + ) + ) + ) + (debug-menu-append-item s4-1 a1-75) + ) + (let ((a1-77 + (new 'debug 'debug-menu-item-flag "Other Marks" (the-as int '*display-cam-other*) dm-boolean-toggle-pick-func) + ) + ) + (debug-menu-append-item s4-1 a1-77) + ) + (let ((a1-79 (new + 'debug + 'debug-menu-item-flag + "los debug" + (the-as int '*display-cam-los-debug*) + dm-boolean-toggle-pick-func + ) + ) + ) + (debug-menu-append-item s4-1 a1-79) + ) + (let ((a1-81 + (new 'debug 'debug-menu-item-flag "los info" (the-as int '*display-cam-los-info*) dm-boolean-toggle-pick-func) + ) + ) + (debug-menu-append-item s4-1 a1-81) + ) + (let ((a1-83 (new + 'debug + 'debug-menu-item-flag + "los Marks" + (the-as int '*display-cam-los-marks*) + dm-boolean-toggle-pick-func + ) + ) + ) + (debug-menu-append-item s4-1 a1-83) + ) + (let ((a1-85 (new + 'debug + 'debug-menu-item-flag + "coll Marks" + (the-as int '*display-cam-coll-marks*) + dm-boolean-toggle-pick-func + ) + ) + ) + (debug-menu-append-item s4-1 a1-85) + ) + (let ((a1-87 (new + 'debug + 'debug-menu-item-flag + "Camera Marks" + (the-as int '*display-camera-marks*) + dm-boolean-toggle-pick-func + ) + ) + ) + (debug-menu-append-item s4-1 a1-87) + ) + ) + (let ((a1-89 (new + 'debug + 'debug-menu-item-flag + "Edit" + (the-as int '*cam-layout*) + (lambda ((arg0 symbol) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (if (-> arg0 value) + (cam-layout-stop) + (cam-layout-start) + ) + ) + (-> arg0 value) + ) + ) + ) + ) + (debug-menu-append-item gp-0 a1-89) + ) + (let ((a1-91 (new + 'debug + 'debug-menu-item-function + "Save Pos" + (the-as int #f) + (the-as (function object object) debug-create-cam-restore) + ) + ) + ) + (debug-menu-append-item gp-0 a1-91) + ) + s5-0 + ) + ) + +(defun debug-menu-make-shader-menu ((arg0 debug-menu-context)) + (let* ((gp-0 (new 'debug 'debug-menu arg0 "Shader menu")) + (s5-0 (new 'debug 'debug-menu-item-submenu "Shader" gp-0)) + ) + (let ((a3-3 (new 'debug 'debug-menu arg0 "Shader pick menu"))) + (set! *shader-pick-menu* a3-3) + (let ((a1-4 (new 'debug 'debug-menu-item-submenu "Pick Shader" a3-3))) + (debug-menu-append-item gp-0 a1-4) + ) + ) + (let ((a1-6 (new + 'debug + 'debug-menu-item-function + "Refresh" + (the-as int #f) + (the-as (function object object) build-shader-list) + ) + ) + ) + (debug-menu-append-item gp-0 a1-6) + ) + (let ((s4-1 (new 'debug 'debug-menu-item-var "tweak" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-float + s4-1 + (the-as + (function int debug-menu-msg float float float) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((s4-0 (the-as texture-id (-> arg0 value))) + (gp-0 (lookup-texture-by-id s4-0)) + (v1-3 (-> *texture-page-dir* entries (-> s4-0 page) link)) + ) + (cond + ((and gp-0 v1-3) + (when (= arg1 (debug-menu-msg press)) + (set! (-> gp-0 uv-dist) arg2) + (let ((s5-1 (the-as object (* (-> v1-3 next (-> s4-0 index) shader) 16)))) + (while (nonzero? (the-as uint s5-1)) + (adgif-shader-update! (the-as adgif-shader s5-1) gp-0) + (set! s5-1 (* (-> (the-as adgif-shader s5-1) next shader) 16)) + ) + ) + ) + (-> gp-0 uv-dist) + ) + (else + (empty) + arg3 + ) + ) + ) + ) + (else + (empty) + arg3 + ) + ) + ) + ) + 0.1 + #t + 0.1 + 30.0 + 1 + ) + (debug-menu-append-item gp-0 s4-1) + ) + (let ((a1-11 (new + 'debug + 'debug-menu-item-function + "all tweak+" + (the-as int #f) + (the-as (function object object) (lambda () (all-texture-tweak-adjust *texture-page-dir* 0.1))) + ) + ) + ) + (debug-menu-append-item gp-0 a1-11) + ) + (let ((a1-13 (new + 'debug + 'debug-menu-item-function + "all tweak-" + (the-as int #f) + (the-as (function object object) (lambda () (all-texture-tweak-adjust *texture-page-dir* -0.1))) + ) + ) + ) + (debug-menu-append-item gp-0 a1-13) + ) + (let ((s4-2 (new 'debug 'debug-menu-item-var "l" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-2 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) tex1 l) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) tex1 l) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 3 + #f + ) + (debug-menu-append-item gp-0 s4-2) + ) + (let ((s4-3 (new 'debug 'debug-menu-item-var "k" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-3 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + ;; og:preserve-this + (let ((a1-8 (the-as object (* (the-as int (-> a0-3 next (-> v1-1 index) shader)) 16)))) + (while (nonzero? (the-as int a1-8)) + (set! (-> (the-as adgif-shader a1-8) tex1 k) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (sar (shl (the-as int (the-as adgif-shader (-> (the-as adgif-shader v1-8) tex1))) 20) 52) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + -2048 + 2047 + #f + ) + (debug-menu-append-item gp-0 s4-3) + ) + (let ((s4-4 (new 'debug 'debug-menu-item-var "mmin" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-4 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) tex1 mmin) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) tex1 mmin) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 5 + #t + ) + (debug-menu-append-item gp-0 s4-4) + ) + (let ((s4-5 (new 'debug 'debug-menu-item-var "mmag" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-5 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) tex1 mmag) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) tex1 mmag) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 1 + #t + ) + (debug-menu-append-item gp-0 s4-5) + ) + (let ((s4-6 (new 'debug 'debug-menu-item-var "lcm" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-6 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) tex1 lcm) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) tex1 lcm) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 1 + #t + ) + (debug-menu-append-item gp-0 s4-6) + ) + (let ((s4-7 (new 'debug 'debug-menu-item-var "tfx" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-7 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + ;; og:preserve-this + (let ((a1-8 (the-as object (* (the-as int (-> a0-3 next (-> v1-1 index) shader)) 16)))) + (while (nonzero? (the-as int a1-8)) + (set! (-> (the-as adgif-shader a1-8) tex0 tfx) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (shr (shl (the-as int (the-as adgif-shader (-> (the-as adgif-shader v1-8) tex0))) 27) 62) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 3 + #t + ) + (debug-menu-append-item gp-0 s4-7) + ) + (let ((s4-8 (new 'debug 'debug-menu-item-var "tbp" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-8 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) tex0 tbp0) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) tex0 tbp0) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + #x4000 + #t + ) + (debug-menu-append-item gp-0 s4-8) + ) + (let ((s4-9 (new 'debug 'debug-menu-item-var "tbw" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-9 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) tex0 tbw) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) tex0 tbw) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 15 + #t + ) + (debug-menu-append-item gp-0 s4-9) + ) + (let ((s4-10 (new 'debug 'debug-menu-item-var "tw" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-10 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) tex0 tw) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) tex0 tw) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 10 + #t + ) + (debug-menu-append-item gp-0 s4-10) + ) + (let ((s4-11 (new 'debug 'debug-menu-item-var "th" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-11 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + ;; og:preserve-this + (let ((a1-8 (the-as object (* (the-as int (-> a0-3 next (-> v1-1 index) shader)) 16)))) + (while (nonzero? (the-as int a1-8)) + (set! (-> (the-as adgif-shader a1-8) tex0 th) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (shr (shl (the-as int (the-as adgif-shader (-> (the-as adgif-shader v1-8) tex0))) 30) 60) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 10 + #t + ) + (debug-menu-append-item gp-0 s4-11) + ) + (let ((s4-12 (new 'debug 'debug-menu-item-var "mxl" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-12 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) tex1 mxl) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) tex1 mxl) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 6 + #t + ) + (debug-menu-append-item gp-0 s4-12) + ) + (let ((s4-13 (new 'debug 'debug-menu-item-var "wms" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-13 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) clamp wms) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) clamp wms) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 3 + #t + ) + (debug-menu-append-item gp-0 s4-13) + ) + (let ((s4-14 (new 'debug 'debug-menu-item-var "wmt" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-14 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) clamp wmt) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) clamp wmt) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 3 + #t + ) + (debug-menu-append-item gp-0 s4-14) + ) + (let ((s4-15 (new 'debug 'debug-menu-item-var "minu" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-15 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) clamp minu) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) clamp minu) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 511 + #t + ) + (debug-menu-append-item gp-0 s4-15) + ) + (let ((s4-16 (new 'debug 'debug-menu-item-var "maxu" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-16 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) clamp maxu) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) clamp maxu) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 511 + #t + ) + (debug-menu-append-item gp-0 s4-16) + ) + (let ((s4-17 (new 'debug 'debug-menu-item-var "minv" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-17 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + ;; og:preserve-this + (let ((a1-8 (the-as object (* (the-as int (-> a0-3 next (-> v1-1 index) shader)) 16)))) + (while (nonzero? (the-as int a1-8)) + (set! (-> (the-as adgif-shader a1-8) clamp minv) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (shr (shl (the-as int (the-as adgif-shader (-> (the-as adgif-shader v1-8) clamp))) 30) 54) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 511 + #t + ) + (debug-menu-append-item gp-0 s4-17) + ) + (let ((s4-18 (new 'debug 'debug-menu-item-var "maxv" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-18 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + ;; og:preserve-this + (let ((a1-8 (the-as object (* (the-as int (-> a0-3 next (-> v1-1 index) shader)) 16)))) + (while (nonzero? (the-as int a1-8)) + (set! (-> (the-as adgif-shader a1-8) clamp maxv) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (shr (shl (the-as int (the-as adgif-shader (-> (the-as adgif-shader v1-8) clamp))) 20) 54) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 511 + #t + ) + (debug-menu-append-item gp-0 s4-18) + ) + s5-0 + ) + ) + +(defun debug-menu-make-instance-menu ((arg0 debug-menu-context)) + (let* ((gp-0 (new 'debug 'debug-menu arg0 "Instance menu")) + (s5-0 (new 'debug 'debug-menu-item-submenu "Instance" gp-0)) + ) + (let ((a3-3 (new 'debug 'debug-menu arg0 "Instance shrub menu"))) + (set! *instance-shrub-menu* a3-3) + (let ((a1-4 (new 'debug 'debug-menu-item-submenu "Pick Shrub" a3-3))) + (debug-menu-append-item gp-0 a1-4) + ) + ) + (let ((a3-5 (new 'debug 'debug-menu arg0 "Instance tie menu"))) + (set! *instance-tie-menu* a3-5) + (let ((a1-7 (new 'debug 'debug-menu-item-submenu "Pick Tie" a3-5))) + (debug-menu-append-item gp-0 a1-7) + ) + ) + (let ((a1-9 (new 'debug 'debug-menu-item-function "Refresh" (the-as int #f) build-instance-list))) + (debug-menu-append-item gp-0 a1-9) + ) + (let ((a1-11 (new + 'debug + 'debug-menu-item-function + "Print Info" + (the-as int #f) + (the-as (function object object) print-prototype-list) + ) + ) + ) + (debug-menu-append-item gp-0 a1-11) + ) + (let ((s3-0 (new 'debug 'debug-menu-item-var "near" (the-as int '*edit-instance*) 80))) + (debug-menu-item-var-make-float + s3-0 + (the-as + (function int debug-menu-msg float float float) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (let ((f30-0 arg3)) + (dotimes (s3-0 (-> *level* length)) + (let ((a1-1 (-> *level* level s3-0))) + (when (= (-> a1-1 status) 'active) + (let ((s2-0 (find-instance-by-name-level (the-as string (-> arg0 value)) a1-1))) + (when s2-0 + (when (= arg1 (debug-menu-msg press)) + (set! (-> s2-0 dists x) (* 4096.0 arg2)) + (prototype-bucket-recalc-fields s2-0) + ) + (set! f30-0 (* 0.00024414062 (-> s2-0 dists x))) + ) + ) + ) + ) + ) + f30-0 + ) + ) + ) + 1.0 + #t + 10.0 + 250.0 + 1 + ) + (debug-menu-append-item gp-0 s3-0) + ) + (let ((s3-1 (new 'debug 'debug-menu-item-var "far" (the-as int '*edit-instance*) 80))) + (debug-menu-item-var-make-float + s3-1 + (the-as + (function int debug-menu-msg float float float) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (let ((f30-0 arg3)) + (dotimes (s3-0 (-> *level* length)) + (let ((a1-1 (-> *level* level s3-0))) + (when (= (-> a1-1 status) 'active) + (let ((s2-0 (find-instance-by-name-level (the-as string (-> arg0 value)) a1-1))) + (when s2-0 + (when (= arg1 (debug-menu-msg press)) + (set! (-> s2-0 dists w) (* 4096.0 arg2)) + (prototype-bucket-recalc-fields s2-0) + ) + (set! f30-0 (* 0.00024414062 (-> s2-0 dists w))) + ) + ) + ) + ) + ) + f30-0 + ) + ) + ) + 1.0 + #t + 10.0 + 250.0 + 1 + ) + (debug-menu-append-item gp-0 s3-1) + ) + (let ((s3-2 (new 'debug 'debug-menu-item-var "tie vanish near" (the-as int '*edit-instance*) 80))) + (debug-menu-item-var-make-float + s3-2 + (the-as (function int debug-menu-msg float float float) dm-float-field-tie-rvanish-func) + 1.0 + #t + 10.0 + 250.0 + 1 + ) + (debug-menu-append-item gp-0 s3-2) + ) + (let ((s3-3 (new 'debug 'debug-menu-item-var "tie vanish far" (the-as int '*edit-instance*) 80))) + (debug-menu-item-var-make-float + s3-3 + (the-as (function int debug-menu-msg float float float) dm-float-field-tie-vanish-far-func) + 1.0 + #t + 10.0 + 250.0 + 1 + ) + (debug-menu-append-item gp-0 s3-3) + ) + (let ((a1-25 (new 'debug 'debug-menu-item-flag "invisible" 1 dm-edit-instance-toggle-pick-func))) + (debug-menu-append-item gp-0 a1-25) + ) + (let ((a3-18 (new 'debug 'debug-menu arg0 "Enable Instance Shrub Menu"))) + (set! *enable-instance-shrub-menu* a3-18) + (let ((a1-28 (new 'debug 'debug-menu-item-submenu "Enable Shrub" a3-18))) + (debug-menu-append-item gp-0 a1-28) + ) + ) + (let ((a3-20 (new 'debug 'debug-menu arg0 "Enable Instance Tie Menu"))) + (set! *enable-instance-tie-menu* a3-20) + (let ((a1-31 (new 'debug 'debug-menu-item-submenu "Enable Tie" a3-20))) + (debug-menu-append-item gp-0 a1-31) + ) + ) + (let ((a1-33 (new + 'debug + 'debug-menu-item-flag + "Instance Info" + (the-as int '*display-instance-info*) + dm-boolean-toggle-pick-func + ) + ) + ) + (debug-menu-append-item gp-0 a1-33) + ) + s5-0 + ) + ) + +(defun dm-task-menu-pick-func ((arg0 game-task) (arg1 debug-menu-msg)) + (let ((gp-0 (/ (the-as int arg0) 8))) + (when (= arg1 (debug-menu-msg press)) + (if (cpad-hold? 0 l1) + (task-node-open! (the-as game-task-node gp-0) 'menu) + (task-node-close! (the-as game-task-node gp-0) 'menu) + ) + ) + (if (and (not (task-node-closed? (the-as game-task-node gp-0))) + (not (task-node-open? (the-as game-task-node gp-0))) + ) + (return 'invalid) + ) + (task-node-closed? (the-as game-task-node gp-0)) + ) + ) + +(defun debug-menu-make-continue-sub-menu ((arg0 game-info) (arg1 symbol)) + (local-vars + (sv-16 (function symbol type object object pair)) + (sv-32 symbol) + (sv-48 type) + (sv-64 symbol) + (sv-80 (function symbol type object object pair)) + (sv-96 symbol) + (sv-112 type) + (sv-128 string) + (sv-144 (function symbol type object object pair)) + (sv-160 symbol) + (sv-176 type) + (sv-192 string) + (sv-208 symbol) + (sv-224 type) + ) + (let ((s4-0 *level-load-list*) + (s5-0 '()) + ) + (while (not (null? s4-0)) + (let ((v1-1 (-> (the-as symbol (car s4-0)) value))) + (when (or (= arg1 'test) (= (-> (the-as level-load-info v1-1) taskname) arg1)) + (let ((s3-0 (-> (the-as level-load-info v1-1) continues))) + (while (not (null? s3-0)) + (let ((v1-2 (car s3-0)) + (a0-5 arg1) + ) + (when (if (= a0-5 'test) + (logtest? (continue-flags continue-flag-16) (-> (the-as continue-point v1-2) flags)) + #t + ) + (let ((s2-0 (method-of-type pair new)) + (s1-0 'global) + (s0-0 pair) + ) + (set! sv-16 (method-of-type pair new)) + (set! sv-32 'global) + (set! sv-48 pair) + (set! sv-64 'flag) + (set! sv-80 (method-of-type pair new)) + (set! sv-96 'global) + (set! sv-112 pair) + (set! sv-128 (-> (the-as continue-point v1-2) name)) + (set! sv-144 (method-of-type pair new)) + (set! sv-160 'global) + (set! sv-176 pair) + (set! sv-192 (-> (the-as continue-point v1-2) name)) + (let* ((a3-1 (cons 'dm-current-continue '())) + (a3-2 (sv-144 sv-160 sv-176 sv-192 a3-1)) + (a3-3 (sv-80 sv-96 sv-112 sv-128 a3-2)) + ) + (set! s5-0 (s2-0 s1-0 s0-0 (sv-16 sv-32 sv-48 sv-64 a3-3) s5-0)) + ) + ) + ) + ) + (set! s3-0 (cdr s3-0)) + ) + ) + ) + ) + (set! s4-0 (cdr s4-0)) + ) + (let ((s4-1 s5-0) + (s5-1 '()) + ) + (let ((a2-6 (car s4-1))) + (while (not (null? s4-1)) + (set! s5-1 (cons a2-6 s5-1)) + (set! s4-1 (cdr s4-1)) + (set! a2-6 (car s4-1)) + ) + ) + (let ((s4-2 (method-of-type pair new)) + (s3-1 'global) + (s2-1 pair) + (s1-1 'menu) + (s0-1 (method-of-type pair new)) + ) + (set! sv-208 'global) + (set! sv-224 pair) + (let ((a2-7 (symbol->string-debug arg1)) + (a3-6 s5-1) + ) + (s4-2 s3-1 s2-1 s1-1 (s0-1 sv-208 sv-224 a2-7 a3-6)) + ) + ) + ) + ) + ) + +(defun debug-menu-make-task-sub-menu ((arg0 symbol)) + (local-vars + (sv-16 (function symbol type object object pair)) + (sv-32 symbol) + (sv-48 type) + (sv-64 symbol) + (sv-80 (function symbol type object object pair)) + (sv-96 symbol) + (sv-112 type) + (sv-128 string) + (sv-144 (function symbol type object object pair)) + (sv-160 symbol) + (sv-176 type) + (sv-192 int) + (sv-208 symbol) + (sv-224 type) + ) + (let ((gp-0 '())) + (let ((s4-0 (-> *game-info* sub-task-list))) + (countdown (s3-0 (-> s4-0 length)) + (when (nonzero? s3-0) + (let ((v1-4 (-> s4-0 s3-0))) + (when (= (-> v1-4 level) arg0) + (let ((s2-0 (method-of-type pair new)) + (s1-0 'global) + (s0-0 pair) + ) + (set! sv-16 (method-of-type pair new)) + (set! sv-32 'global) + (set! sv-48 pair) + (set! sv-64 'flag) + (set! sv-80 (method-of-type pair new)) + (set! sv-96 'global) + (set! sv-112 pair) + (set! sv-128 (-> v1-4 name)) + (set! sv-144 (method-of-type pair new)) + (set! sv-160 'global) + (set! sv-176 pair) + (set! sv-192 (* s3-0 8)) + (let* ((a3-1 (cons 'dm-task-menu-pick-func '())) + (a3-2 (sv-144 sv-160 sv-176 sv-192 a3-1)) + (a3-3 (sv-80 sv-96 sv-112 sv-128 a3-2)) + ) + (set! gp-0 (s2-0 s1-0 s0-0 (sv-16 sv-32 sv-48 sv-64 a3-3) gp-0)) + ) + ) + ) + ) + ) + ) + ) + (let ((s4-1 (method-of-type pair new)) + (s3-1 'global) + (s2-1 pair) + (s1-1 'menu) + (s0-1 (method-of-type pair new)) + ) + (set! sv-208 'global) + (set! sv-224 pair) + (let ((a2-5 (symbol->string-debug arg0)) + (a3-5 gp-0) + ) + (s4-1 s3-1 s2-1 s1-1 (s0-1 sv-208 sv-224 a2-5 a3-5)) + ) + ) + ) + ) + +(defun debug-menu-make-task-menu ((arg0 debug-menu-context)) + (local-vars (sv-16 debug-menu-context)) + (let* ((s5-0 (new 'debug 'debug-menu arg0 "Task menu")) + (s4-0 (new 'debug 'debug-menu-item-submenu "Task" s5-0)) + ) + (let* ((s3-0 '(city + comb + desert + factory + forest + mine + nest + palace + sewer + wascity + arena + temple + tower + volcano + precursor + default + test + ) + ) + (a0-3 (car s3-0)) + ) + (while (not (null? s3-0)) + (let ((s2-0 debug-menu-append-item) + (s1-0 s5-0) + (s0-0 debug-menu-make-from-template) + ) + (set! sv-16 arg0) + (let ((a1-2 (debug-menu-make-task-sub-menu (the-as symbol a0-3)))) + (s2-0 s1-0 (s0-0 sv-16 a1-2)) + ) + ) + (set! s3-0 (cdr s3-0)) + (set! a0-3 (car s3-0)) + ) + ) + s4-0 + ) + ) + +;; WARN: Return type mismatch int vs object. +(defun dm-play-task-with-continue ((arg0 game-task) (arg1 string)) + (let* ((t9-0 play-task) + (a1-1 'debug) + (a2-0 (cond + ((cpad-hold? 0 l1) + 'pre-play + ) + ((cpad-hold? 0 r1) + 'kiosk + ) + ) + ) + (a1-2 (t9-0 arg0 a1-1 a2-0)) + ) + (if arg1 + (set! a1-2 arg1) + ) + (start 'play (get-continue-by-name *game-info* a1-2)) + ) + (set-master-mode 'game) + 0 + ) + +(defun dm-play-task ((arg0 game-task)) + (dm-play-task-with-continue (the-as game-task (/ (the-as int arg0) 8)) (the-as string #f)) + ) + +(defun dm-play-race ((arg0 race-selection) (arg1 symbol)) + (let ((s5-0 (the-as string #f)) + (gp-0 0) + ) + (case arg0 + (((race-selection desertb-race-record)) + (set! gp-0 15) + (set! s5-0 "desertb-race-record") + ) + (((race-selection rs1)) + (set! gp-0 131) + (set! s5-0 "desertb-race-record") + ) + (((race-selection desrally-record)) + (set! gp-0 132) + (set! s5-0 "desrally-record") + ) + ) + (if (not arg1) + (set! s5-0 (the-as string #f)) + ) + (format #t "dm-play-race starting task ~d continue ~s~%" gp-0 s5-0) + (if (nonzero? gp-0) + (dm-play-task-with-continue (the-as game-task gp-0) s5-0) + ) + ) + ) + +(defun debug-menu-make-play-menu ((arg0 debug-menu-context)) + (local-vars + (sv-16 type) + (sv-32 (function symbol type object object pair)) + (sv-48 symbol) + (sv-64 type) + (sv-80 symbol) + (sv-96 (function symbol type object object pair)) + (sv-112 symbol) + (sv-128 type) + (sv-144 string) + (sv-160 (function symbol type object object pair)) + (sv-176 symbol) + (sv-192 type) + (sv-208 symbol) + (sv-224 type) + (sv-240 (function symbol type object object pair)) + (sv-256 symbol) + (sv-272 type) + (sv-288 symbol) + (sv-304 (function symbol type object object pair)) + (sv-320 symbol) + (sv-336 type) + (sv-352 (function symbol type object object pair)) + (sv-368 symbol) + (sv-384 type) + (sv-400 int) + (sv-416 type) + (sv-432 symbol) + (sv-448 (function symbol type object object pair)) + (sv-464 symbol) + (sv-480 type) + (sv-496 string) + (sv-512 (function symbol type object object pair)) + (sv-528 symbol) + (sv-544 type) + (sv-560 symbol) + ) + (let ((s5-0 '())) + (let ((s2-0 #x200000)) + (countdown (s4-0 (-> *game-info* play-list length)) + (let ((s3-0 (-> *game-info* play-list s4-0))) + (when (-> s3-0 play-continue) + (let ((s1-0 + (logand (game-task-node-flag act1 act2 act3 bbush) (-> *game-info* sub-task-list (-> s3-0 play-node) flags)) + ) + ) + (when (!= s1-0 s2-0) + (let ((s2-1 (method-of-type pair new)) + (s0-0 'global) + ) + (set! sv-16 pair) + (set! sv-32 (method-of-type pair new)) + (set! sv-48 'global) + (set! sv-64 pair) + (set! sv-80 'function) + (set! sv-96 (method-of-type pair new)) + (set! sv-112 'global) + (set! sv-128 pair) + (cond + ((logtest? (game-task-node-flag act3) s1-0) + (set! sv-144 "=== Burning Bush ===") + ) + ((logtest? (game-task-node-flag act2) s1-0) + (set! sv-144 "====== ACT 3 ======") + ) + ((logtest? (game-task-node-flag act1) s1-0) + (set! sv-144 "====== ACT 2 ======") + ) + (else + (set! sv-144 "======= END =======") + ) + ) + (set! sv-160 (method-of-type pair new)) + (set! sv-176 'global) + (set! sv-192 pair) + (set! sv-208 (the-as symbol #f)) + (let* ((a3-1 (cons 'nothing '())) + (a3-2 (sv-160 sv-176 sv-192 sv-208 a3-1)) + (a3-3 (sv-96 sv-112 sv-128 sv-144 a3-2)) + (a2-4 (sv-32 sv-48 sv-64 sv-80 a3-3)) + ) + (set! s5-0 (s2-1 s0-0 sv-16 a2-4 s5-0)) + ) + ) + (set! s2-0 (the-as int s1-0)) + ) + ) + (let ((s1-1 (method-of-type pair new)) + (s0-1 'global) + ) + (set! sv-224 pair) + (set! sv-240 (method-of-type pair new)) + (set! sv-256 'global) + (set! sv-272 pair) + (set! sv-288 'function) + (set! sv-304 (method-of-type pair new)) + (set! sv-320 'global) + (set! sv-336 pair) + (let ((s3-1 (-> s3-0 name))) + (set! sv-352 (method-of-type pair new)) + (set! sv-368 'global) + (set! sv-384 pair) + (set! sv-400 (* s4-0 8)) + (let* ((a3-6 (cons 'dm-play-task '())) + (a3-7 (sv-352 sv-368 sv-384 sv-400 a3-6)) + (a3-8 (sv-304 sv-320 sv-336 s3-1 a3-7)) + (a2-9 (sv-240 sv-256 sv-272 sv-288 a3-8)) + (a3-9 s5-0) + ) + (set! s5-0 (s1-1 s0-1 sv-224 a2-9 a3-9)) + ) + ) + ) + ) + ) + ) + ) + (let ((s4-1 (method-of-type pair new)) + (s3-2 'global) + (s2-2 pair) + (s1-2 (method-of-type pair new)) + (s0-2 'global) + ) + (set! sv-416 pair) + (set! sv-432 'function) + (set! sv-448 (method-of-type pair new)) + (set! sv-464 'global) + (set! sv-480 pair) + (set! sv-496 "====== ACT 1 ======") + (set! sv-512 (method-of-type pair new)) + (set! sv-528 'global) + (set! sv-544 pair) + (set! sv-560 (the-as symbol #f)) + (let* ((a3-11 (cons 'nothing '())) + (a3-12 (sv-512 sv-528 sv-544 sv-560 a3-11)) + (a3-13 (sv-448 sv-464 sv-480 sv-496 a3-12)) + (a3-15 (s4-1 s3-2 s2-2 (s1-2 s0-2 sv-416 sv-432 a3-13) s5-0)) + ) + (debug-menu-make-from-template arg0 (cons 'menu (cons "Play" a3-15))) + ) + ) + ) + ) + +(defun dm-anim-tester-flag-func ((arg0 int) (arg1 debug-menu-msg)) + (when *anim-tester* + (case arg0 + (('at-apply-align) + (if (= arg1 (debug-menu-msg press)) + (logxor! (-> *anim-tester* 0 flags) (anim-tester-flags fanimt5)) + ) + (return (logtest? (-> *anim-tester* 0 flags) (anim-tester-flags fanimt5))) + ) + (('at-show-joint-info) + (if (= arg1 (debug-menu-msg press)) + (logxor! (-> *anim-tester* 0 flags) (anim-tester-flags fanimt4)) + ) + (return (logtest? (-> *anim-tester* 0 flags) (anim-tester-flags fanimt4))) + ) + ) + ) + #f + ) + +(defun dm-anim-tester-func ((arg0 int) (arg1 debug-menu-msg)) + (local-vars (v0-1 symbol)) + (if (not *anim-tester*) + (anim-tester-start) + ) + (when *anim-tester* + (cond + ((= arg0 'at-pick-object) + (send-event (ppointer->process *anim-tester*) 'pick-object) + (set! v0-1 #t) + (set! (-> *debug-menu-context* is-hidden) v0-1) + v0-1 + ) + ((= arg0 'at-pick-joint-anim) + (send-event (ppointer->process *anim-tester*) 'pick-joint-anim) + (set! v0-1 #t) + (set! (-> *debug-menu-context* is-hidden) v0-1) + v0-1 + ) + ) + ) + ) + +(defun dm-pilot-mode ((arg0 object)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'pilot #f arg0 #t) + ) + +(defun stop-watch-display ((arg0 object) (arg1 object)) + (let ((v1-3 (- (-> *display* base-clock frame-counter) (-> *game-info* stop-watch-start)))) + (format arg1 "Stop watch ~D:~D:~D~%" (/ v1-3 #x4650) (/ (mod v1-3 #x4650) 300) (/ (* 100 (mod v1-3 300)) 300)) + ) + #f + ) + +(defun debug-menu-context-make-default-menus ((arg0 debug-menu-context)) + (local-vars (sv-16 debug-menu-context)) + (let ((s5-0 (new 'debug 'debug-menu arg0 "Main menu"))) + (debug-menu-context-set-root-menu arg0 s5-0) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Artist" + (flag "Poly Stats" *stats-poly* dm-boolean-toggle-pick-func) + (menu + "Memory Stats" + (flag "Enable" *stats-memory* dm-boolean-toggle-pick-func) + (flag "Short" *stats-memory-short* dm-boolean-toggle-pick-func) + (flag "Level 0" 0 dm-stats-memory-func) + (flag "Level 1" 1 dm-stats-memory-func) + (flag "Level 2" 2 dm-stats-memory-func) + (flag "Level 3" 3 dm-stats-memory-func) + (flag "Level 4" 4 dm-stats-memory-func) + (flag "Level 5" 5 dm-stats-memory-func) + (flag "Level 6" 6 dm-stats-memory-func) + (flag "Level 7" 7 dm-stats-memory-func) + (flag "Level 8" 8 dm-stats-memory-func) + (flag "Level 9" 9 dm-stats-memory-func) + ) + (flag "All Visible" *artist-all-visible* dm-boolean-toggle-pick-func) + (flag "Flip Visible" *artist-flip-visible* dm-boolean-toggle-pick-func) + (flag "Fix Visible" *artist-fix-visible* dm-boolean-toggle-pick-func) + (flag "Fix Frustum" *artist-fix-frustum* dm-boolean-toggle-pick-func) + (flag "Manual Sample Point" *manual-sample-point* dm-boolean-toggle-pick-func) + (flag "Error Spheres" *artist-error-spheres* dm-boolean-toggle-pick-func) + (flag "Use menu subdiv" *artist-use-menu-subdiv* dm-boolean-toggle-pick-func) + (float-var "Subdiv Close" close dm-subdiv-float 10 1 #t 1 1000 1) + (float-var "Subdiv Far" far dm-subdiv-float 10 1 #t 1 1000 1) + (function + "Target Start" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (start 'debug (get-current-continue-forced *game-info*)) + ) + ) + (function "Target Stop" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (stop 'debug))) + ;; (menu + ;; "Anim Tester" + ;; (int-var "Speed" anim-speed dm-subdiv-int 10 10 #t -300 1000) + ;; (flag "Apply Align" at-apply-align dm-anim-tester-flag-func) + ;; (flag "Show Joint Inf" at-show-joint-info dm-anim-tester-flag-func) + ;; (function "Pick Object" at-pick-object dm-anim-tester-func) + ;; (function "Pick Joint Anim" at-pick-joint-anim dm-anim-tester-func) + ;; (function "Pick Sequence" at-pick-sequence dm-anim-tester-func) + ;; (function "Save Sequences" at-save-sequences dm-anim-tester-func) + ;; ) + (flag "Show Entity Errors" *display-entity-errors* dm-boolean-toggle-pick-func) + (flag "Capture Mode" *display-capture-mode* dm-boolean-toggle-pick-func) + (flag "Sprite Info" *display-sprite-info* dm-boolean-toggle-pick-func) + (flag "Sprite Marks" *display-sprite-marks* dm-boolean-toggle-pick-func) + (flag "Sprite Spheres" *display-sprite-spheres* dm-boolean-toggle-pick-func) + (flag "Time of Day" #f dm-time-of-day-pick-func) + (flag "Preload Anims" *preload-spool-anims* dm-boolean-toggle-pick-func) + (function + "Mike F" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (debug-actor "drill-crane-14") + (send-event *debug-actor* 'die) + ) + ) + (function + "Editor" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (kill-by-type editable-player *active-pool*) + (process-spawn editable-player :init editable-player-init #f :name "editable-player" :to *entity-pool*) + (set-master-mode 'game) + ) + ) + (flag + "Screen shot highres enable" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *screen-shot-work* highres-enable) (not (-> *screen-shot-work* highres-enable))) + ) + (-> *screen-shot-work* highres-enable) + ) + ) + (flag + "Screen shot hud enable" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *screen-shot-work* hud-enable) (not (-> *screen-shot-work* hud-enable))) + ) + (-> *screen-shot-work* hud-enable) + ) + ) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Game" + (function + "New Game" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (initialize! *game-info* 'game (the-as game-save #f) (the-as string #f) (the-as resetter-spec #f)) + ) + ) + (function + "New Life" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (initialize! *game-info* 'dead (the-as game-save #f) (the-as string #f) (the-as resetter-spec #f)) + ) + ) + (function + "Kill Target" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (set! (-> *game-info* mode) 'play) + (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 'death)) + ) + ) + ) + ) + (function + "Hit Target" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (set! (-> *game-info* mode) 'play) + (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)) + ) + ) + ) + ) + (function + "Reset Game" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (set! (-> *game-info* mode) 'debug) + (initialize! *game-info* 'game (the-as game-save #f) (the-as string #f) (the-as resetter-spec #f)) + ) + ) + (function "Reset Actors" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (reset-actors 'debug))) + (function + "Save Game" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (auto-save-command 'save 0 0 *default-pool* #f)) + ) + (function + "Load Game" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (auto-save-command 'restore 0 0 *default-pool* #f)) + ) + (function + "Manager Complete" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (script-eval '(send-event *task-manager* 'complete))) + ) + (flag "Target" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (when (= arg1 (debug-menu-msg press)) + (if *target* + (stop 'debug) + (start 'debug (get-current-continue-forced *game-info*)) + ) + ) + *target* + ) + ) + (flag "Game Mode" play dm-game-mode-pick-func) + (flag "Debug Mode" debug dm-game-mode-pick-func) + (function + "Stop Watch Start" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (remove-by-param0 *debug-engine* stop-watch-display) + (add-connection *debug-engine* *dproc* stop-watch-display *dproc* *stdcon0* #f) + (set! (-> *game-info* stop-watch-start) (-> *display* base-clock frame-counter)) + (set! (-> *game-info* stop-watch-stop) 0) + (format #t "Stop watch started!~%") + ) + ) + (function + "Stop Watch Stop" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (remove-by-param0 *debug-engine* stop-watch-display) + (set! (-> *game-info* stop-watch-stop) (-> *display* base-clock frame-counter)) + (let ((v1-7 (- (-> *game-info* stop-watch-stop) (-> *game-info* stop-watch-start)))) + (format + #t + "Stop watch elasped time was ~D:~D:~D~%" + (/ v1-7 #x4650) + (/ (mod v1-7 #x4650) 300) + (/ (* 100 (mod v1-7 300)) 300) + ) + ) + ) + ) + (function + "Continue Start" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (start 'play (-> *game-info* current-continue))) + ) + (function + "Kiosk Reset" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (auto-save-command 'restore 0 0 *default-pool* #f)) + ) + (menu + "Secrets" + (flag "hero-mode" 0 dm-game-secret-toggle-pick-func) + (flag "toggle-beard" 14 dm-game-secret-toggle-pick-func) + (flag "hflip-screen" 15 dm-game-secret-toggle-pick-func) + (flag "endless-ammo" 16 dm-game-secret-toggle-pick-func) + (flag "invulnerable" 17 dm-game-secret-toggle-pick-func) + (flag "endless-dark" 18 dm-game-secret-toggle-pick-func) + (flag "endless-light" 19 dm-game-secret-toggle-pick-func) + (flag "scene-player-1" 1 dm-game-secret-toggle-pick-func) + (flag "scene-player-2" 2 dm-game-secret-toggle-pick-func) + (flag "scene-player-3" 3 dm-game-secret-toggle-pick-func) + (flag "level-select-1" 5 dm-game-secret-toggle-pick-func) + (flag "level-select-2" 6 dm-game-secret-toggle-pick-func) + (flag "level-select-3" 7 dm-game-secret-toggle-pick-func) + (flag "scrap-book-1" 8 dm-game-secret-toggle-pick-func) + (flag "scrap-book-2" 9 dm-game-secret-toggle-pick-func) + (flag "scrap-book-3" 10 dm-game-secret-toggle-pick-func) + (flag "gungame-blue" 20 dm-game-secret-toggle-pick-func) + (flag "gungame-dark" 21 dm-game-secret-toggle-pick-func) + (flag "gungame-ratchet" 22 dm-game-secret-toggle-pick-func) + (flag "big-head" 23 dm-game-secret-toggle-pick-func) + (flag "little-head" 24 dm-game-secret-toggle-pick-func) + (flag "fast-movie" 25 dm-game-secret-toggle-pick-func) + (flag "slow-movie" 26 dm-game-secret-toggle-pick-func) + (flag "unlimited-turbos" 27 dm-game-secret-toggle-pick-func) + (flag "vehicle-hit-points" 28 dm-game-secret-toggle-pick-func) + (flag "board-fast" 29 dm-game-secret-toggle-pick-func) + (flag "vehicle-fox" 30 dm-game-secret-toggle-pick-func) + (flag "vehicle-mirage" 31 dm-game-secret-toggle-pick-func) + (flag "vehicle-x-ride" 32 dm-game-secret-toggle-pick-func) + (flag "model-viewer-1" 11 dm-game-secret-toggle-pick-func) + (flag "model-viewer-2" 12 dm-game-secret-toggle-pick-func) + (flag "model-viewer-3" 13 dm-game-secret-toggle-pick-func) + (flag "kleever-diaper" 33 dm-game-secret-toggle-pick-func) + (flag "bad-weather" 34 dm-game-secret-toggle-pick-func) + (flag "fast-weather" 35 dm-game-secret-toggle-pick-func) + (flag "daxter-pants" 36 dm-game-secret-toggle-pick-func) + (flag "darkjak-tracking" 37 dm-game-secret-toggle-pick-func) + (flag "commentary" 4 dm-game-secret-toggle-pick-func) + (flag "jak-is-jak2" 38 dm-game-secret-toggle-pick-func) + (flag "button-invis" 40 dm-game-secret-toggle-pick-func) + (flag "statistics" 39 dm-game-secret-toggle-pick-func) + (flag "gun-dark-4" 41 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-red-1" 42 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-red-2" 43 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-red-3" 44 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-yellow-1" 45 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-yellow-2" 46 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-yellow-3" 47 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-blue-1" 48 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-blue-2" 49 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-blue-3" 50 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-dark-1" 51 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-dark-2" 52 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-dark-3" 53 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-ammo-red" 54 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-ammo-yellow" 55 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-ammo-blue" 56 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-ammo-dark" 57 dm-game-secret-toggle-pick-func) + ) + (function "Print Load State" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (dotimes (gp-0 11) + (let ((s5-0 (-> *level* level gp-0))) + (if (!= (-> s5-0 status) 'inactive) + (format + #t + "~Tlevel ~2D ~16S ~16S bits #b~18,'0B ~A~%" + gp-0 + (-> s5-0 name) + (if (nonzero? (-> s5-0 info)) + (level-memory-mode->string (-> s5-0 info memory-mode)) + ) + (-> s5-0 memory-mask) + (-> s5-0 status) + ) + ) + ) + ) + #t + ) + ) + (menu "Continue") + (menu + "Settings" + (float-var + "sfx-volume" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *setting-control* (nonzero? *setting-control*)) + (set! (-> *setting-control* user-default sfx-volume) arg2) + ) + ) + ((or (not *setting-control*) (zero? *setting-control*)) + 0 + ) + (else + (-> *setting-control* user-default sfx-volume) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.01) + #t + 0 + 1 + 0 + ) + (float-var + "ambient-volume" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *setting-control* (nonzero? *setting-control*)) + (set! (-> *setting-control* user-default ambient-volume) arg2) + ) + ) + ((or (not *setting-control*) (zero? *setting-control*)) + 0 + ) + (else + (-> *setting-control* user-default ambient-volume) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.01) + #t + 0 + 1 + 0 + ) + (float-var + "music-volume" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *setting-control* (nonzero? *setting-control*)) + (set! (-> *setting-control* user-default music-volume) arg2) + ) + ) + ((or (not *setting-control*) (zero? *setting-control*)) + 0 + ) + (else + (-> *setting-control* user-default music-volume) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.01) + #t + 0 + 1 + 0 + ) + (float-var + "dialog-volume" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *setting-control* (nonzero? *setting-control*)) + (set! (-> *setting-control* user-default dialog-volume) arg2) + ) + ) + ((or (not *setting-control*) (zero? *setting-control*)) + 0 + ) + (else + (-> *setting-control* user-default dialog-volume) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.01) + #t + 0 + 1 + 0 + ) + (float-var + "contrast" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *setting-control* (nonzero? *setting-control*)) + (set! (-> *setting-control* user-default contrast) arg2) + ) + ) + ((or (not *setting-control*) (zero? *setting-control*)) + 0 + ) + (else + (-> *setting-control* user-default contrast) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.00390625) + #t + (new 'static 'bfloat :data 0.25) + (new 'static 'bfloat :data 1.0) + 0 + ) + (float-var + "brightness" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *setting-control* (nonzero? *setting-control*)) + (set! (-> *setting-control* user-default brightness) arg2) + ) + ) + ((or (not *setting-control*) (zero? *setting-control*)) + 0 + ) + (else + (-> *setting-control* user-default brightness) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.00390625) + #t + (new 'static 'bfloat :data 0.25) + (new 'static 'bfloat :data 1.0) + 0 + ) + (function + "reset contrast and brightness" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (set! (-> *setting-control* user-default contrast) 0.5) + (set! (-> *setting-control* user-default brightness) 0.5) + ) + ) + (menu + "Language" + (flag "english" 0 dm-setting-language) + (flag "french" 1 dm-setting-language) + (flag "german" 2 dm-setting-language) + (flag "spanish" 3 dm-setting-language) + (flag "italian" 4 dm-setting-language) + (flag "korean" 7 dm-setting-language) + (flag "russian" 8 dm-setting-language) + (flag "portuguese" 9 dm-setting-language) + (flag "uk-english" 11 dm-setting-language) + ) + (menu + "Audio Language" + (flag "english" 0 dm-setting-audio-language) + (flag "french" 1 dm-setting-audio-language) + (flag "german" 2 dm-setting-audio-language) + (flag "spanish" 3 dm-setting-audio-language) + (flag "italian" 4 dm-setting-audio-language) + (flag "commentary" 5 dm-setting-audio-language) + ) + (menu + "Subtitle Language" + (flag "english" 0 dm-setting-subtitle-language) + (flag "french" 1 dm-setting-subtitle-language) + (flag "german" 2 dm-setting-subtitle-language) + (flag "spanish" 3 dm-setting-subtitle-language) + (flag "italian" 4 dm-setting-subtitle-language) + (flag "korean" 7 dm-setting-subtitle-language) + (flag "russian" 8 dm-setting-subtitle-language) + (flag "portuguese" 9 dm-setting-subtitle-language) + (flag "uk-english" 11 dm-setting-subtitle-language) + ) + (flag + "play-hints " + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *setting-control* user-default play-hints) (not (-> *setting-control* user-default play-hints))) + ) + (-> *setting-control* user-default play-hints) + ) + ) + (flag + "subtitle " + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *setting-control* user-default subtitle) (not (-> *setting-control* user-default subtitle))) + ) + (-> *setting-control* user-default subtitle) + ) + ) + (flag + "vibration" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *setting-control* user-default vibration) (not (-> *setting-control* user-default vibration))) + ) + (-> *setting-control* user-default vibration) + ) + ) + (menu + "Stereo Mode" + (flag "mono" 0 dm-setting-stereo-mode) + (flag "stereo" 1 dm-setting-stereo-mode) + (flag "surround" 2 dm-setting-stereo-mode) + ) + (flag + "camera-stick-dir" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *setting-control* user-default camera-stick-dir) + (not (-> *setting-control* user-default camera-stick-dir)) + ) + ) + (-> *setting-control* user-default camera-stick-dir) + ) + ) + (flag + "progressive-scan" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *setting-control* user-default set-video-mode) + (not (-> *setting-control* user-default set-video-mode)) + ) + ) + (-> *setting-control* user-default set-video-mode) + ) + ) + (flag + "border-mode" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (set! (-> *setting-control* user-default border-mode) (not (-> *setting-control* user-default border-mode))) + (set! (-> *level* play?) (-> *setting-control* user-default border-mode)) + ) + (-> *setting-control* user-default border-mode) + ) + ) + ) + (menu + "Features" + (flag "armor0" 52 dm-game-feature-toggle-pick-func) + (flag "armor1" 53 dm-game-feature-toggle-pick-func) + (flag "armor2" 54 dm-game-feature-toggle-pick-func) + (flag "armor3" 55 dm-game-feature-toggle-pick-func) + (flag "artifact-invis" 51 dm-game-feature-toggle-pick-func) + (flag "board" 18 dm-game-feature-toggle-pick-func) + (flag "board-training" 36 dm-game-feature-toggle-pick-func) + (flag "board-launch" 37 dm-game-feature-toggle-pick-func) + (flag "board-zap" 39 dm-game-feature-toggle-pick-func) + (flag "board-trail" 38 dm-game-feature-toggle-pick-func) + (flag "carry" 19 dm-game-feature-toggle-pick-func) + (flag "sidekick" 20 dm-game-feature-toggle-pick-func) + (flag "darkeco" 58 dm-game-feature-toggle-pick-func) + (flag "darkjak" 40 dm-game-feature-toggle-pick-func) + (flag "darkjak-smack" 41 dm-game-feature-toggle-pick-func) + (flag "darkjak-bomb0" 42 dm-game-feature-toggle-pick-func) + (flag "darkjak-bomb1" 43 dm-game-feature-toggle-pick-func) + (flag "darkjak-tracking" 44 dm-game-feature-toggle-pick-func) + (flag "darkjak-invinc" 45 dm-game-feature-toggle-pick-func) + (flag "lighteco" 57 dm-game-feature-toggle-pick-func) + (flag "lightjak" 46 dm-game-feature-toggle-pick-func) + (flag "lightjak-regen" 47 dm-game-feature-toggle-pick-func) + (flag "lightjak-swoop" 48 dm-game-feature-toggle-pick-func) + (flag "lightjak-freeze" 49 dm-game-feature-toggle-pick-func) + (flag "lightjak-shield" 50 dm-game-feature-toggle-pick-func) + (flag "gun-yellow-1" 9 dm-game-feature-toggle-pick-func) + (flag "gun-yellow-2" 10 dm-game-feature-toggle-pick-func) + (flag "gun-yellow-3" 11 dm-game-feature-toggle-pick-func) + (flag "gun-upgrade-yellow-ammo-1" 23 dm-game-feature-toggle-pick-func) + (flag "gun-upgrade-yellow-ammo-2" 24 dm-game-feature-toggle-pick-func) + (flag "gun-red-1" 6 dm-game-feature-toggle-pick-func) + (flag "gun-red-2" 7 dm-game-feature-toggle-pick-func) + (flag "gun-red-3" 8 dm-game-feature-toggle-pick-func) + (flag "gun-upgrade-red-ammo-1" 25 dm-game-feature-toggle-pick-func) + (flag "gun-upgrade-red-ammo-2" 26 dm-game-feature-toggle-pick-func) + (flag "gun-blue-1" 12 dm-game-feature-toggle-pick-func) + (flag "gun-blue-2" 13 dm-game-feature-toggle-pick-func) + (flag "gun-blue-3" 14 dm-game-feature-toggle-pick-func) + (flag "gun-upgrade-blue-ammo-1" 27 dm-game-feature-toggle-pick-func) + (flag "gun-upgrade-blue-ammo-2" 28 dm-game-feature-toggle-pick-func) + (flag "gun-dark-1" 15 dm-game-feature-toggle-pick-func) + (flag "gun-dark-2" 16 dm-game-feature-toggle-pick-func) + (flag "gun-dark-3" 17 dm-game-feature-toggle-pick-func) + (flag "gun-upgrade-dark-ammo-1" 29 dm-game-feature-toggle-pick-func) + (flag "gun-upgrade-dark-ammo-2" 30 dm-game-feature-toggle-pick-func) + (flag "gun-upgrade-speed" 21 dm-game-feature-toggle-pick-func) + (flag "gun-upgrade-damage" 22 dm-game-feature-toggle-pick-func) + (flag "pass-port-mh" 31 dm-game-feature-toggle-pick-func) + (flag "pass-port-inda" 32 dm-game-feature-toggle-pick-func) + (flag "pass-inda-indb" 33 dm-game-feature-toggle-pick-func) + (flag "pass-indb-sluma" 34 dm-game-feature-toggle-pick-func) + (flag "pass-slumb-genb" 35 dm-game-feature-toggle-pick-func) + (flag "turtle" 0 dm-game-vehicle-toggle-pick-func) + (flag "snake" 1 dm-game-vehicle-toggle-pick-func) + (flag "scorpion" 2 dm-game-vehicle-toggle-pick-func) + (flag "toad" 3 dm-game-vehicle-toggle-pick-func) + (flag "fox" 4 dm-game-vehicle-toggle-pick-func) + (flag "rhino" 5 dm-game-vehicle-toggle-pick-func) + (flag "mirage" 6 dm-game-vehicle-toggle-pick-func) + (flag "x-ride" 7 dm-game-vehicle-toggle-pick-func) + ) + ) + ) + ) + (let* ((s4-2 (debug-menu-find-from-template arg0 '("Game" "Continue"))) + (s3-2 + '(city + comb + desert + factory + forest + mine + nest + palace + sewer + wascity + arena + temple + tower + volcano + precursor + default + test + ) + ) + (a1-7 (car s3-2)) + ) + (while (not (null? s3-2)) + (let ((s2-0 debug-menu-append-item) + (s1-0 s4-2) + (s0-0 debug-menu-make-from-template) + ) + (set! sv-16 arg0) + (let ((a1-8 (debug-menu-make-continue-sub-menu *game-info* (the-as symbol a1-7)))) + (s2-0 s1-0 (s0-0 sv-16 a1-8)) + ) + ) + (set! s3-2 (cdr s3-2)) + (set! a1-7 (car s3-2)) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Stats" + (flag "Poly" *stats-poly* dm-boolean-toggle-pick-func) + (flag "Collide" *stats-collide* dm-boolean-toggle-pick-func) + (flag "Bsp" *stats-bsp* dm-boolean-toggle-pick-func) + (flag "Buffer" *stats-buffer* dm-boolean-toggle-pick-func) + (flag "Target" *stats-target* dm-boolean-toggle-pick-func) + (flag "Blerc" *stats-blerc* dm-boolean-toggle-pick-func) + (flag "Profile bars" *stats-profile-bars* dm-boolean-toggle-pick-func) + (flag "Perf" *stats-perf* dm-boolean-toggle-pick-func) + (menu + "Memory Stats" + (flag "Enable" *stats-memory* dm-boolean-toggle-pick-func) + (flag "Short" *stats-memory-short* dm-boolean-toggle-pick-func) + (flag "Level 0" 0 dm-stats-memory-func) + (flag "Level 1" 1 dm-stats-memory-func) + (flag "Level 2" 2 dm-stats-memory-func) + (flag "Level 3" 3 dm-stats-memory-func) + (flag "Level 4" 4 dm-stats-memory-func) + (flag "Level 5" 5 dm-stats-memory-func) + (flag "Level 6" 6 dm-stats-memory-func) + (flag "Level 7" 7 dm-stats-memory-func) + (flag "Level 8" 8 dm-stats-memory-func) + (flag "Level 9" 9 dm-stats-memory-func) + ) + (function + "Print Entity Memory" + #f + ,(lambda () + (format #t "~%~%========================= Entity Memory =========================~%~%") + (let ((gp-0 (-> *level* level))) + (inspect (-> gp-0 0 art-group)) + (dotimes (s5-0 (-> gp-0 0 art-group art-group-array length)) + (inspect (-> gp-0 0 art-group art-group-array s5-0)) + ) + ) + #f + ) + ) + (function + "Print Texture Info" + #f + ,(lambda () + (format #t "~%~%========================= Texture Info =========================~%~%") + (inspect *texture-page-dir*) + ) + ) + (function + "Print Texture Verbose" + #f + ,(lambda () + (format #t "~%~%========================= Texture Info =========================~%~%") + (texture-page-dir-inspect *texture-page-dir* #t) + ) + ) + (function + "Print Merc Stats" + #f + ,(lambda () + (format #t "~%~%========================== Merc Stats ==========================~%~%") + (merc-stats) + ) + ) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Render" + (menu + "Background" + (flag "Textured" 0 dm-subdiv-draw-func) + (flag "Outline" 1 dm-subdiv-draw-func) + (flag "Gouraud" 2 dm-subdiv-draw-func) + (flag "Hack" 3 dm-subdiv-draw-func) + ) + (menu + "Background Scissor" + (flag "Textured" 0 dm-scissor-subdiv-draw-func) + (flag "Outline" 1 dm-scissor-subdiv-draw-func) + (flag "Gouraud" 2 dm-scissor-subdiv-draw-func) + (flag "Hack" 3 dm-scissor-subdiv-draw-func) + ) + (menu + "Foreground" + (flag "Textured" 0 dm-foreground-subdiv-draw-func) + (flag "Outline" 1 dm-foreground-subdiv-draw-func) + (flag "Gouraud" 2 dm-foreground-subdiv-draw-func) + (flag "Hack" 3 dm-foreground-subdiv-draw-func) + ) + (menu + "Ocean" + (flag "Textured" 0 dm-ocean-subdiv-draw-func) + (flag "Outline" 1 dm-ocean-subdiv-draw-func) + (flag "Gouraud" 2 dm-ocean-subdiv-draw-func) + (flag "Hack" 3 dm-ocean-subdiv-draw-func) + ) + (flag "SKY TEXTURES" 32 dm-texture-user-toggle-pick-func) + (flag "sky" 3 dm-vu1-user-toggle-pick-func) + (flag "ocean" 4 dm-vu1-user-toggle-pick-func) + (flag "ocean-wave" 5 dm-vu1-user-toggle-pick-func) + (flag "HFRAG TIE TEXTURES" 64 dm-texture-user-toggle-pick-func) + (flag "hfrag" 6 dm-vu1-user-toggle-pick-func) + (flag "hfrag-scissor" 7 dm-vu1-user-toggle-pick-func) + (flag "TFRAG TIE TEXTURES" #x1 dm-texture-user-toggle-pick-func) + (flag "tfrag" 8 dm-vu1-user-toggle-pick-func) + (flag "tie" 10 dm-vu1-user-toggle-pick-func) + (flag "tie-envmap" 11 dm-vu1-user-toggle-pick-func) + (flag "tie-scissor" 9 dm-vu1-user-toggle-pick-func) + (flag "tie-envmap-scissor" 12 dm-vu1-user-toggle-pick-func) + (flag "tie-vanish" 13 dm-vu1-user-toggle-pick-func) + (flag "SHRUB TEXTURES" #x4 dm-texture-user-toggle-pick-func) + (flag "shrub-near" 18 dm-vu1-user-toggle-pick-func) + (flag "shrubbery" 17 dm-vu1-user-toggle-pick-func) + (flag "shrubbery-vanish" 20 dm-vu1-user-toggle-pick-func) + (flag "billboard" 19 dm-vu1-user-toggle-pick-func) + (flag "ALPHA TEXTURES" 1 dm-texture-user-toggle-pick-func) + (flag "tfrag-trans" 21 dm-vu1-user-toggle-pick-func) + (flag "tie-trans" 23 dm-vu1-user-toggle-pick-func) + (flag "tie-envmap-trans" 24 dm-vu1-user-toggle-pick-func) + (flag "tie-scissor-trans" 22 dm-vu1-user-toggle-pick-func) + (flag "tie-envmap-scissor-trans" 25 dm-vu1-user-toggle-pick-func) + (flag "PRIS TEXTURES" #x2 dm-texture-user-toggle-pick-func) + (flag "merc" 15 dm-vu1-user-toggle-pick-func) + (flag "emerc" 16 dm-vu1-user-toggle-pick-func) + (flag "generic" 14 dm-vu1-user-toggle-pick-func) + (flag "WATER TEXTURES" 2 dm-texture-user-toggle-pick-func) + (flag "tfrag-water" 26 dm-vu1-user-toggle-pick-func) + (flag "tie-water" 28 dm-vu1-user-toggle-pick-func) + (flag "tie-envmap-water" 29 dm-vu1-user-toggle-pick-func) + (flag "tie-scissor-water" 27 dm-vu1-user-toggle-pick-func) + (flag "tie-envmap-scissor-water" 30 dm-vu1-user-toggle-pick-func) + (flag "SPRITE TEXTURES" 8 dm-texture-user-toggle-pick-func) + (flag "sprite" 31 dm-vu1-user-toggle-pick-func) + (flag "shadow" 32 dm-vu1-user-toggle-pick-func) + (flag "shadow-debug" *shadow-debug* dm-boolean-toggle-pick-func) + (flag "depth-cue" 36 dm-vu1-user-toggle-pick-func) + (flag "WARP TEXTURES" 4 dm-texture-user-toggle-pick-func) + (flag "HUD TEXTURES" 16 dm-texture-user-toggle-pick-func) + (flag "all on" #f dm-vu1-user-all-pick-func) + (flag "all off" #f dm-vu1-user-none-pick-func) + (flag "all textures on" #x3ff dm-texture-user-set-pick-func) + (flag "all textures off" 0 dm-texture-user-set-pick-func) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Collision" + (menu + "Collision Renderer" + (flag "On" 0 dm-col-rend-on-func) + (flag "Track Player" 0 dm-col-rend-track-func) + (flag "Track Camera" 1 dm-col-rend-track-func) + (float-var " Dist" #f dm-col-rend-cam-dist 10 1 #t 0 80 1) + (flag "Fixed Pos" 2 dm-col-rend-track-func) + (float-var "Size" #f dm-col-rend-size 10 1 #t 1 20 1) + (flag "Outline" 0 dm-col-rend-outline-func) + (flag "Show Back-faces" 0 dm-col-rend-back-face-func) + (flag "Show Normals" 0 dm-col-rend-normals-func) + (flag "Ghost Hidden" 0 dm-col-rend-ghost-hidden-func) + (menu + "Show Only" + (flag "(board)" 1 dm-col-rend-show-only-set-func) + (flag "(grind)" 2 dm-col-rend-show-only-set-func) + (flag "(grindonly)" 4 dm-col-rend-show-only-set-func) + (flag "melt" 16384 dm-col-rend-show-only-toggle-func) + (flag "noboard" 8 dm-col-rend-show-only-toggle-func) + (flag "nocamera" 16 dm-col-rend-show-only-toggle-func) + (flag "noedge" 32 dm-col-rend-show-only-toggle-func) + (flag "noendlessfall" 64 dm-col-rend-show-only-toggle-func) + (flag "noentity" 128 dm-col-rend-show-only-toggle-func) + (flag "nogrind" 256 dm-col-rend-show-only-toggle-func) + (flag "nojak" 512 dm-col-rend-show-only-toggle-func) + (flag "nolineofsight" 1024 dm-col-rend-show-only-toggle-func) + (flag "nomech" 2048 dm-col-rend-show-only-toggle-func) + (flag "nopilot" 4096 dm-col-rend-show-only-toggle-func) + (flag "noproj" 8192 dm-col-rend-show-only-toggle-func) + (flag "probe" 32768 dm-col-rend-show-only-toggle-func) + (flag "Select All" 49144 dm-col-rend-show-only-set-func) + (flag "Unselect All" 0 dm-col-rend-show-only-set-func) + ) + (menu + "Find" + (flag "background" 1 dm-col-rend-cspec-toggle) + (flag "obstacles" 2 dm-col-rend-cspec-toggle) + (flag "pushers" 4 dm-col-rend-cspec-toggle) + (flag "Jak" 8 dm-col-rend-cspec-toggle) + (flag "other" 16 dm-col-rend-cspec-toggle) + ) + ) + (flag "Collision Cache" *display-collide-cache* dm-boolean-toggle-pick-func) + (flag "Collision Marks" *display-collision-marks* dm-boolean-toggle-pick-func) + (flag "Ground Stats" *display-ground-stats* dm-boolean-toggle-pick-func) + (flag "Hipri Collision Marks" *display-hipri-collision-marks* dm-boolean-toggle-pick-func) + (flag "Edge Collision Marks" *display-edge-collision-marks* dm-boolean-toggle-pick-func) + (flag "Collide Stats" *stats-collide* dm-boolean-toggle-pick-func) + (flag "Render Collision" *display-render-collision* dm-boolean-toggle-pick-func) + (flag "Collide List Boxes" *collide-list-boxes* dm-boolean-toggle-pick-func) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Display" + (flag "Profile" *display-profile* dm-boolean-toggle-pick-func) + (flag "Ticks" *profile-ticks* dm-boolean-toggle-pick-func) + (flag "File Info" *display-file-info* dm-boolean-toggle-pick-func) + (flag "Level Spheres" *display-level-spheres* dm-boolean-toggle-pick-func) + (flag "Camera Marks" *display-camera-marks* dm-boolean-toggle-pick-func) + (flag "Camera Info" *display-camera-info* dm-boolean-toggle-pick-func) + (flag "Geometry Marks" *display-geo-marks* dm-boolean-toggle-pick-func) + (flag "Art Control" *display-art-control* dm-boolean-toggle-pick-func) + (flag "Gui Control" *display-gui-control* dm-boolean-toggle-pick-func) + (flag "Instance Info" *display-instance-info* dm-boolean-toggle-pick-func) + (menu + "strip lines" + (flag "strippable" 1 dm-strip-lines-toggle-pick-func) + (flag "convertible" 2 dm-strip-lines-toggle-pick-func) + (flag "edgeable" 4 dm-strip-lines-toggle-pick-func) + (flag "ordinary" 8 dm-strip-lines-toggle-pick-func) + (flag "color mismatch" 16 dm-strip-lines-toggle-pick-func) + (flag "shader mismatch" 32 dm-strip-lines-toggle-pick-func) + (flag "uv mismatch" 64 dm-strip-lines-toggle-pick-func) + (flag "too big" 128 dm-strip-lines-toggle-pick-func) + (flag "good" 3 dm-strip-lines-set-pick-func) + (flag "bad" 240 dm-strip-lines-set-pick-func) + (flag "all edges" 255 dm-strip-lines-set-pick-func) + (flag "strips" 256 dm-strip-lines-set-pick-func) + (flag "frags" 512 dm-strip-lines-set-pick-func) + (flag "none" 0 dm-strip-lines-set-pick-func) + ) + (menu + "collision mesh" + (flag "wall" 1024 dm-strip-lines-toggle-pick-func) + (flag "ground" 2048 dm-strip-lines-toggle-pick-func) + (flag "all" 3072 dm-strip-lines-set-pick-func) + (flag "none" 0 dm-strip-lines-set-pick-func) + ) + (flag "Texture Distances" *display-texture-distances* dm-boolean-toggle-pick-func) + (flag "Texture Download" *display-texture-download* dm-boolean-toggle-pick-func) + (flag "Level Border" *display-level-border* dm-boolean-toggle-pick-func) + (flag "Split Boxes" *display-split-boxes* dm-boolean-toggle-pick-func) + (flag "Split Box Info" *display-split-box-info* dm-boolean-toggle-pick-func) + (flag "Memcard Info" *display-memcard-info* dm-boolean-toggle-pick-func) + (flag "Trail Graph" *display-trail-graph* dm-boolean-toggle-pick-func) + (flag "Color Bars" *display-color-bars* dm-boolean-toggle-pick-func) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Actor" + (flag "Spawn Actors" *spawn-actors* dm-boolean-toggle-pick-func) + (function "Reset Actors" #f ,(lambda () (reset-actors 'debug))) + (function "Traffic Start" #f ,(lambda () (let ((gp-0 traffic-start)) + (if (valid? gp-0 function "" #t 0) + (gp-0) + ) + ) + ) + ) + (function "Traffic Kill" #f ,(lambda () (let ((gp-0 traffic-kill)) + (if (valid? gp-0 function "" #t 0) + (gp-0) + ) + ) + ) + ) + (menu + "Bot" + (function + "Bot Next" + #f + ,(lambda () + (send-event (process-by-name "sig-atoll-1" *active-pool*) 'skip) + (send-event (process-by-name "hal-sewer-1" *active-pool*) 'skip) + (send-event (process-by-name "hal-escort-1" *active-pool*) 'skip) + (send-event (process-by-name "squid-2" *active-pool*) 'skip) + (send-event (process-by-name "metalkor-1" *active-pool*) 'skip) + (send-event (process-by-name "sig-under-1" *active-pool*) 'skip) + (send-event (process-by-name "scorpion-gun-manager-1" *active-pool*) 'skip) + (send-event (process-by-name "terraformer-1" *active-pool*) 'skip) + ) + ) + (menu + "Bot Marks" + (flag "course spots" 1 display-bot-marks-toggle-pick-func) + (flag "task spots" 2 display-bot-marks-toggle-pick-func) + (flag "all on" 3 display-bot-marks-set-pick-func) + (flag "all off" 0 display-bot-marks-set-pick-func) + ) + ) + (menu + "Actor Compaction" + (flag "off" #f dm-compact-actor-pick-func) + (flag "on" #t dm-compact-actor-pick-func) + (flag "debug" debug dm-compact-actor-pick-func) + ) + (flag "Traffic height map" *display-traffic-height-map* dm-boolean-toggle-pick-func) + (flag "View Anims" *debug-view-anims* dm-boolean-toggle-pick-func) + (flag "Unkillable" *debug-unkillable* dm-boolean-toggle-pick-func) + (flag "Jak Vehicle Unkillable" *debug-player-vehicle-unkillable* dm-boolean-toggle-pick-func) + (flag "Regions" *execute-regions* dm-boolean-toggle-pick-func) + (flag "Region Marks" *display-region-marks* dm-boolean-toggle-pick-func) + (flag "Actor Vis" *vis-actors* dm-boolean-toggle-pick-func) + (float-var + "Entity clock" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *display* (nonzero? *display*)) + (update-rates! (-> *display* entity-clock) arg2) + ) + ) + ((or (not *display*) (zero? *display*)) + 0 + ) + (else + (-> *display* entity-clock clock-ratio) + ) + ) + ) + 4 + (new 'static 'bfloat :data 0.01) + #t + (new 'static 'bfloat) + (new 'static 'bfloat :data 1.0) + (new 'static 'bfloat :data 0.0001) + ) + (flag "Battle Marks" *display-battle-marks* dm-boolean-toggle-pick-func) + (menu + "Hover Marks" + (flag "Nav Network" *display-nav-network* dm-boolean-toggle-pick-func) + (flag "Debug Hover" *debug-hover* dm-boolean-toggle-pick-func) + ) + (flag "Path Marks" *display-path-marks* dm-boolean-toggle-pick-func) + (flag "Nav Marks" *display-nav-marks* dm-boolean-toggle-pick-func) + (flag "Vol Marks" *display-vol-marks* dm-boolean-toggle-pick-func) + (flag "Collision Marks" *display-collision-marks* dm-boolean-toggle-pick-func) + (menu + "Debug Actor" + (float-var "lod0-dist" 0 dm-debug-actor-lod-dist 10 (new 'static 'bfloat :data 1.0) #f 0 0 1) + (float-var "lod1-dist" 1 dm-debug-actor-lod-dist 10 (new 'static 'bfloat :data 1.0) #f 0 0 1) + (float-var "lod2-dist" 2 dm-debug-actor-lod-dist 10 (new 'static 'bfloat :data 1.0) #f 0 0 1) + (flag "Joint Axes" *display-joint-axes* dm-boolean-toggle-pick-func) + ) + (menu + "Actor Vis" + (flag "off" #f dm-actor-vis-pick-func) + (flag "box" box dm-actor-vis-pick-func) + (flag "sphere" sphere dm-actor-vis-pick-func) + (flag "all" #t dm-actor-vis-pick-func) + ) + (menu + "Actor Marks" + (flag "off" #f dm-actor-marks-pick-func) + (flag "alive entities" #t dm-actor-marks-pick-func) + (flag "all entities" full dm-actor-marks-pick-func) + (flag "processes" process dm-actor-marks-pick-func) + ) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Target" + (menu + "Mode" + (function + "normal" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (send-event *target* 'change-mode 'normal)) + ) + (function "racer" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'racer #f) + ) + ) + (function "flut" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'flut #f) + ) + ) + (function "board" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (logior! (-> *game-info* features) (game-feature board)) + (logior! (-> *game-info* debug-features) (game-feature board)) + (send-event *target* 'change-mode 'board #f) + ) + ) + (function "mech" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'mech #f) + ) + ) + (function "gun" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (logior! (-> *game-info* features) (game-feature gun)) + (logior! (-> *game-info* debug-features) (game-feature gun)) + (send-event *target* 'change-mode 'gun #f (pickup-type none)) + ) + ) + (function + "darkjak" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature darkjak) (-> *game-info* features))) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature darkjak) (-> *game-info* debug-features))) + ) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0)) + ) + ) + (function + "lightjak" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature lightjak) (-> *game-info* features))) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature lightjak) (-> *game-info* debug-features))) + ) + (send-event *target* 'change-mode 'lightjak #f 5) + ) + ) + (function "indax" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'indax #f #f) + ) + ) + (function + "invisible" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature artifact-invis) (-> *game-info* features))) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature artifact-invis) (-> *game-info* debug-features))) + ) + (send-event *target* 'change-mode 'invisible #f) + ) + ) + ) + (menu + "Pilot Mode" + (function "h-bike-a" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 0))) + (function "h-bike-b" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 1))) + (function "h-bike-c" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 2))) + (function "h-bike-d" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 6))) + (function "h-car-a" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 3))) + (function "h-car-b" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 4))) + (function "h-car-c" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 5))) + (function "h-hellcat" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 7))) + (function "h-warf" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 8))) + (function "h-glider" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 9))) + (function "h-sled" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 10))) + (function "v-turtle" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 12))) + (function "v-snake" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 13))) + (function "v-scorpion" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 14))) + (function "v-toad" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 15))) + (function "v-fox" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 16))) + (function "v-rhino" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 17))) + (function "v-mirage" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 18))) + (function "v-x-ride" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 19))) + (function "v-marauder" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 20))) + (function "v-faccar" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 21))) + (function "v-catapult" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 22))) + (function "v-marauder-b" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 23))) + (function "evantestbike" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 29))) + (function "test-car" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 25))) + (function "wbike-test" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 26))) + ) + (flag "Target" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (when (= arg1 (debug-menu-msg press)) + (if *target* + (stop 'debug) + (start 'debug (get-current-continue-forced *game-info*)) + ) + ) + *target* + ) + ) + (menu + "Darkjak" + (function + "get all" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (set! (-> *game-info* features) + (the-as + game-feature + (logior (game-feature darkjak darkjak-smack darkjak-bomb0 darkjak-bomb1 feature44 feature45) + (-> *game-info* features) + ) + ) + ) + (set! (-> *game-info* debug-features) + (the-as + game-feature + (logior (game-feature darkjak darkjak-smack darkjak-bomb0 darkjak-bomb1 feature44 feature45) + (-> *game-info* debug-features) + ) + ) + ) + (send-event *target* 'get-pickup (pickup-type eco-pill-dark) 100.0) + ) + ) + (function + "debug" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (set! (-> *game-info* features) + (the-as + game-feature + (logior (game-feature darkjak darkjak-smack darkjak-bomb0 darkjak-bomb1 feature44 feature45) + (-> *game-info* features) + ) + ) + ) + (set! (-> *game-info* debug-features) + (the-as + game-feature + (logior (game-feature darkjak darkjak-smack darkjak-bomb0 darkjak-bomb1 feature44 feature45) + (-> *game-info* debug-features) + ) + ) + ) + (send-event *target* 'get-pickup (pickup-type eco-pill-dark) 100.0) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage active bomb0 no-anim disable-force-on)) + ) + ) + (function + "manual" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature darkjak) (-> *game-info* features))) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature darkjak) (-> *game-info* debug-features))) + ) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0)) + ) + ) + (function + "rapid" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature darkjak) (-> *game-info* features))) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature darkjak) (-> *game-info* debug-features))) + ) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage bomb0)) + ) + ) + (function "smack" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0 bomb1)) + ) + ) + (function + "bomb0" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0 bomb1 invinc)) + ) + ) + (function + "bomb1" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0 bomb1 invinc giant)) + ) + ) + (function + "tracking" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0 bomb1 invinc giant no-anim)) + ) + ) + (function + "invinc" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event + *target* + 'change-mode + 'darkjak + #f + (darkjak-stage force-on bomb0 invinc giant no-anim disable-force-on) + ) + ) + ) + ) + (menu + "Lightjak" + (function + "get all" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (set! (-> *game-info* features) + (the-as + game-feature + (logior (game-feature lightjak lightjak-regen lightjak-swoop lightjak-freeze lightjak-shield) + (-> *game-info* features) + ) + ) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature lightjak) (-> *game-info* debug-features))) + ) + (send-event *target* 'get-pickup (pickup-type eco-pill-light) 100.0) + ) + ) + (function + "debug" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (set! (-> *game-info* features) + (the-as + game-feature + (logior (game-feature lightjak lightjak-regen lightjak-swoop lightjak-freeze lightjak-shield) + (-> *game-info* features) + ) + ) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature lightjak) (-> *game-info* debug-features))) + ) + (send-event *target* 'get-pickup (pickup-type eco-pill-light) 100.0) + (send-event *target* 'change-mode 'lightjak #f 6) + ) + ) + (function + "manual" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature lightjak) (-> *game-info* features))) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature lightjak) (-> *game-info* debug-features))) + ) + (send-event *target* 'change-mode 'lightjak #f 5) + ) + ) + (function + "normal" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature lightjak) (-> *game-info* features))) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature lightjak) (-> *game-info* debug-features))) + ) + (send-event *target* 'change-mode 'lightjak #f 4) + ) + ) + ) + (flag "Target Marks" *display-target-marks* dm-boolean-toggle-pick-func) + (flag "Gun Marks" *gun-marks* dm-boolean-toggle-pick-func) + (flag "Target Stats" *stats-target* dm-boolean-toggle-pick-func) + (flag "Sidekick Stats" *display-sidekick-stats* dm-boolean-toggle-pick-func) + (flag "Invulnerable" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (when (= arg1 (debug-menu-msg press)) + (if *target* + (logxor! (-> *target* target-flags) (target-flags tf2)) + ) + ) + (and *target* (logtest? (-> *target* target-flags) (target-flags tf2))) + ) + ) + (flag + "Endless Ammo" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (when (= arg1 (debug-menu-msg press)) + (if *target* + (set! (-> *target* target-flags) (logxor (target-flags tf16) (the-as int (-> *target* target-flags)))) + ) + ) + (and *target* (logtest? (target-flags tf16) (-> *target* target-flags))) + ) + ) + (function + "Full Stuff" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (send-event *target* 'get-pickup (pickup-type health) 1000.0) + (send-event *target* 'get-pickup (pickup-type shield) 1000.0) + (send-event *target* 'get-pickup (pickup-type skill) 100.0) + (send-event *target* 'get-pickup (pickup-type gem) 100.0) + (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) + (send-event *target* 'get-pickup (pickup-type eco-pill-dark) 100.0) + (send-event *target* 'get-pickup (pickup-type eco-pill-light) 100.0) + (set! (-> *game-info* features) + (the-as + game-feature + (logior (game-feature + gun + gun-red-1 + gun-red-2 + gun-red-3 + gun-yellow-1 + gun-yellow-2 + gun-yellow-3 + gun-blue-1 + gun-blue-2 + gun-blue-3 + gun-dark-1 + gun-dark-2 + gun-dark-3 + board + darkjak + ) + (-> *game-info* features) + ) + ) + ) + (let ((v0-10 + (logior (game-feature gun gun-red-1 gun-yellow-1 gun-blue-1 gun-dark-1 board darkjak) + (-> *game-info* debug-features) + ) + ) + ) + (set! (-> *game-info* debug-features) (the-as game-feature v0-10)) + v0-10 + ) + ) + ) + (function + "Dump Stuff" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (send-event *target* 'get-pickup (pickup-type shield) -1000.0) + (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) + ) + ) + (function + "Trick Mode" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (send-event *target* 'get-pickup (pickup-type trick-judge) 18000.0) + ) + ) + (function + "Reset Trans" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (when *target* + (position-in-front-of-camera! (target-pos 0) 40960.0 4096.0) + (set! (-> *target* control transv quad) (the-as uint128 0)) + (quaternion-identity! (-> *target* control quat)) + (quaternion-identity! (-> *target* control quat-for-control)) + (quaternion-identity! (-> *target* control dir-targ)) + ) + ) + ) + (function + "Zero Trans" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (when *target* + (set-vector! (-> *target* control trans) 0.0 163840.0 0.0 1.0) + (set! (-> *target* control transv quad) (the-as uint128 0)) + (quaternion-identity! (-> *target* control quat)) + (quaternion-identity! (-> *target* control quat-for-control)) + (quaternion-identity! (-> *target* control dir-targ)) + ) + ) + ) + (flag "Slow Frame Rate" *slow-frame-rate* dm-boolean-toggle-pick-func) + (function "Print Pos" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((v1-0 (target-pos 0))) + (format #t "~6,,2m ~6,,2m ~6,,2m~%" (-> v1-0 x) (-> v1-0 y) (-> v1-0 z)) + ) + 0 + ) + ) + (flag "Goggles" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (when (= arg1 (debug-menu-msg press)) + (cond + ((not *target*) + ) + ((= (-> *target* goggles-interp-targ) 0.0) + (set! (-> *target* goggles-interp-targ) 1.0) + ) + (else + (set! (-> *target* goggles-interp-targ) 0.0) + ) + ) + ) + (if *target* + (!= (-> *target* goggles-interp-targ) 0.0) + #f + ) + ) + ) + (flag "Scarf" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (when (= arg1 (debug-menu-msg press)) + (cond + ((not *target*) + ) + ((= (-> *target* scarf-interp-targ) 0.0) + (set! (-> *target* scarf-interp-targ) 1.0) + ) + (else + (set! (-> *target* scarf-interp-targ) 0.0) + ) + ) + ) + (if *target* + (!= (-> *target* scarf-interp-targ) 0.0) + #f + ) + ) + ) + (function + "Save Continue" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (if *target* + (trsq->continue-point (-> *target* control)) + ) + ) + ) + (flag "RC Board Controls" *target-rc-board-controls* dm-boolean-toggle-pick-func) + ) + ) + ) + (debug-menu-append-item s5-0 (debug-menu-make-camera-menu arg0)) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Racing" + (flag "Desertb" 0 dm-select-race-pick-func) + (flag "Desert Rally" 2 dm-select-race-pick-func) + (int-var "Select Path" 0 dm-select-race-path 10 1 #t 0 7) + (menu + "Race Marks" + (flag "Path 0 (Red)" 1 display-race-marks-toggle-pick-func) + (flag "Path 1 (Green)" 2 display-race-marks-toggle-pick-func) + (flag "Path 2 (Blue)" 4 display-race-marks-toggle-pick-func) + (flag "Path 3 (Yellow)" 8 display-race-marks-toggle-pick-func) + (flag "Path 4 (Cyan)" 16 display-race-marks-toggle-pick-func) + (flag "Path 5 (Violet)" 32 display-race-marks-toggle-pick-func) + (flag "Path 6 (Orange)" 64 display-race-marks-toggle-pick-func) + (flag "Path 7 (Black)" 128 display-race-marks-toggle-pick-func) + (flag "All Paths On" 255 display-race-marks-set-pick-func) + (flag "All Off" 0 display-race-marks-set-pick-func) + ) + (flag "Race Mesh" *display-race-mesh* dm-boolean-toggle-pick-func) + (function + "Record Selected Path" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (set! *race-record-path* #t) + (dm-play-race *select-race* #t) + ) + ) + (function + "Play Race" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (set! *race-record-path* #f) + (dm-play-race *select-race* #f) + ) + ) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Nav Graph" + (function + "Start Editor" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (when (not (get-nav-graph-editor)) + (let ((t9-1 run-nav-graph-editor) + (a0-1 'test) + ) + (t9-1 a0-1) + ) + ) + ) + ) + (function + "Exit Editor" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (if (get-nav-graph-editor) + (exit-nav-graph-editor) + ) + ) + ) + (function + "Toggle Plane Mode" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (if a0-1 + ((method-of-object a0-1 nav-graph-editor-method-64)) + ) + ) + ) + ) + (function + "Toggle Hover Mode" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (if a0-1 + ((method-of-object a0-1 nav-graph-editor-method-65)) + ) + ) + ) + ) + (menu + "Load" + (function + "Hover Foresta" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'hover + 'foresta + (t9-1) + ) + ) + ) + ) + ) + (function + "Hover Sewc" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'hover + 'sewc + (t9-1) + ) + ) + ) + ) + ) + (function + "Hover Sewg" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'hover + 'sewg + (t9-1) + ) + ) + ) + ) + ) + (function + "Hover Sewl" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'hover + 'sewl + (t9-1) + ) + ) + ) + ) + ) + (function + "Traffic" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'traffic + (t9-1) + ) + ) + ) + ) + ) + (function + "Minimap" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'minimap + (t9-1) + ) + ) + ) + ) + ) + (function + "flyingsaw_2" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'flyingsaw_2 + (t9-1) + ) + ) + ) + ) + ) + (function + "flyingsaw_3" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'flyingsaw_3 + (t9-1) + ) + ) + ) + ) + ) + (function + "forest-plant-1" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'forest-plant-1 + (t9-1) + ) + ) + ) + ) + ) + (function + "forest-plant-2" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'forest-plant-2 + (t9-1) + ) + ) + ) + ) + ) + (function + "forest-plant-3" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'forest-plant-3 + (t9-1) + ) + ) + ) + ) + ) + (function + "forest-plant-4" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'forest-plant-4 + (t9-1) + ) + ) + ) + ) + ) + (function + "Desert Beast" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'beast + (t9-1) + ) + ) + ) + ) + ) + (function + "Was Minimap" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'wasminimap + (t9-1) + ) + ) + ) + ) + ) + (function + "Desert Rescue" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'desrescue + (t9-1) + ) + ) + ) + ) + ) + (function + "Assault" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'assault + (t9-1) + ) + ) + ) + ) + ) + (function + "Timer Chase 1" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'timer-chase-1 + (t9-1) + ) + ) + ) + ) + ) + (function + "ProtectHQ" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'protect-hq + (t9-1) + ) + ) + ) + ) + ) + (function + "Blow Tower" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'blow-tower + (t9-1) + ) + ) + ) + ) + ) + (function + "desert-lizard" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'desert-lizard + (t9-1) + ) + ) + ) + ) + ) + (function + "terraformer-walk" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'terraformer-walk + (t9-1) + ) + ) + ) + ) + ) + (function + "terraformer-fly" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'terraformer-fly + (t9-1) + ) + ) + ) + ) + ) + (function + "Desert Beast Battle" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'beast-battle + (t9-1) + ) + ) + ) + ) + ) + (function + "Desert Chase Marauder" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'desert-chase-marauder + (t9-1) + ) + ) + ) + ) + ) + ) + (function + "Save" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (if a0-1 + ((method-of-object a0-1 nav-graph-editor-method-67)) + ) + ) + ) + ) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Nav Mesh" + (function + "Start Editor" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (when (not *nav-mesh-editor*) + (kill-by-type nav-mesh-editor *active-pool*) + (let ((gp-0 (get-process *default-dead-pool* nav-mesh-editor #x4000 1))) + (when gp-0 + (let ((t9-2 (method-of-type nav-mesh-editor activate))) + (t9-2 (the-as nav-mesh-editor gp-0) *entity-pool* "nav-mesh-editor" (the-as pointer #x70004000)) + ) + (let ((t9-3 run-function-in-process) + (a0-4 gp-0) + (a1-4 nav-mesh-editor-init) + ) + ((the-as (function object object none) t9-3) a0-4 a1-4) + ) + (-> gp-0 ppointer) + ) + ) + ) + ) + ) + (function + "Exit Editor" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (kill-by-type nav-mesh-editor *active-pool*)) + ) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Ocean" + (menu + "Ocean Height" + (flag "zero" 1 dm-ocean-height-func) + (flag "far-below" 2 dm-ocean-height-func) + (flag "sewer-start" 3 dm-ocean-height-func) + (flag "sewer-hi" 4 dm-ocean-height-func) + (flag "sewer-med" 5 dm-ocean-height-func) + (flag "sewer-lo" 6 dm-ocean-height-func) + ) + (menu + "Ocean Subdiv" + (flag "Textured" 0 dm-ocean-subdiv-draw-func) + (flag "Outline" 1 dm-ocean-subdiv-draw-func) + (flag "Gouraud" 2 dm-ocean-subdiv-draw-func) + ) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Time of day" + (flag "7am sunrise" 0 dm-time-of-day-func) + (flag "10am morning" 1 dm-time-of-day-func) + (flag "12pm noon" 2 dm-time-of-day-func) + (flag "2pm afternoon" 3 dm-time-of-day-func) + (flag "6pm sunset" 4 dm-time-of-day-func) + (flag "7pm twilight" 5 dm-time-of-day-func) + (flag "11pm evening" 6 dm-time-of-day-func) + (flag "4am green sun" 7 dm-time-of-day-func) + (flag "palette 0" 16 dm-time-of-day-func) + (flag "palette 1" 32 dm-time-of-day-func) + (flag "palette 2" 64 dm-time-of-day-func) + (flag "palette 3" 128 dm-time-of-day-func) + (flag "palette 4" 256 dm-time-of-day-func) + (flag "palette 5" 512 dm-time-of-day-func) + (flag "palette 6" 1024 dm-time-of-day-func) + (flag "palette 7" 2048 dm-time-of-day-func) + (flag "on" #f dm-time-of-day-pick-func) + (flag "Fast" *time-of-day-fast* dm-time-of-day-func2) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Mood" + (flag + "Overide Enable" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *time-of-day-context* overide-enable) (not (-> *time-of-day-context* overide-enable))) + ) + (-> *time-of-day-context* overide-enable) + ) + ) + (menu + "Weather" + (flag + "Overide Weather Enable" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *mood-control* overide-weather-flag) (not (-> *mood-control* overide-weather-flag))) + ) + (-> *mood-control* overide-weather-flag) + ) + ) + (flag + "Display Values" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *mood-control* display-flag) (not (-> *mood-control* display-flag))) + ) + (-> *mood-control* display-flag) + ) + ) + (float-var + "Clouds" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *mood-control* (nonzero? *mood-control*)) + (set! (-> *mood-control* overide cloud) arg2) + ) + ) + ((or (not *mood-control*) (zero? *mood-control*)) + 0 + ) + (else + (-> *mood-control* overide cloud) + ) + ) + ) + 1 + (new 'static 'bfloat :data 0.00390625) + #t + 0 + (new 'static 'bfloat :data 1.0) + 0 + ) + (float-var + "Fog" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *mood-control* (nonzero? *mood-control*)) + (set! (-> *mood-control* overide fog) arg2) + ) + ) + ((or (not *mood-control*) (zero? *mood-control*)) + 0 + ) + (else + (-> *mood-control* overide fog) + ) + ) + ) + 1 + (new 'static 'bfloat :data 0.00390625) + #t + 0 + (new 'static 'bfloat :data 1.0) + 0 + ) + ) + (menu + "Colors" + (flag "7am sunrise" 0 dm-time-of-day-func) + (flag "10am morning" 1 dm-time-of-day-func) + (flag "12pm noon" 2 dm-time-of-day-func) + (flag "2pm afternoon" 3 dm-time-of-day-func) + (flag "6pm sunset" 4 dm-time-of-day-func) + (flag "7pm twilight" 5 dm-time-of-day-func) + (flag "11pm evening" 6 dm-time-of-day-func) + (flag "4am green sun" 7 dm-time-of-day-func) + (flag "time of day on" #f dm-time-of-day-pick-func) + (float-var + "Ambient Red" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-color-table* (nonzero? *overide-mood-color-table*)) + (set! (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + amb-color + x + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-color-table*) (zero? *overide-mood-color-table*)) + 0 + ) + (else + (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + amb-color + x + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Ambient Green" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-color-table* (nonzero? *overide-mood-color-table*)) + (set! (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + amb-color + y + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-color-table*) (zero? *overide-mood-color-table*)) + 0 + ) + (else + (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + amb-color + y + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Ambient Blue" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-color-table* (nonzero? *overide-mood-color-table*)) + (set! (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + amb-color + z + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-color-table*) (zero? *overide-mood-color-table*)) + 0 + ) + (else + (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + amb-color + z + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Ambient Mult" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-color-table* (nonzero? *overide-mood-color-table*)) + (set! (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + amb-color + w + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-color-table*) (zero? *overide-mood-color-table*)) + 0 + ) + (else + (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + amb-color + w + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + 2 + 0 + ) + (float-var + "Light Red" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-color-table* (nonzero? *overide-mood-color-table*)) + (set! (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + lgt-color + x + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-color-table*) (zero? *overide-mood-color-table*)) + 0 + ) + (else + (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + lgt-color + x + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Light Green" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-color-table* (nonzero? *overide-mood-color-table*)) + (set! (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + lgt-color + y + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-color-table*) (zero? *overide-mood-color-table*)) + 0 + ) + (else + (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + lgt-color + y + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Light Blue" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-color-table* (nonzero? *overide-mood-color-table*)) + (set! (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + lgt-color + z + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-color-table*) (zero? *overide-mood-color-table*)) + 0 + ) + (else + (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + lgt-color + z + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Light Mult" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-color-table* (nonzero? *overide-mood-color-table*)) + (set! (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + lgt-color + w + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-color-table*) (zero? *overide-mood-color-table*)) + 0 + ) + (else + (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + lgt-color + w + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + 2 + 0 + ) + (function + "reset selected time" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (mem-copy! + (the-as + pointer + (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + ) + ) + (the-as + pointer + (-> *debug-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + ) + ) + 32 + ) + (set! (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + lgt-color + w + ) + 1.0 + ) + (set! (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + amb-color + w + ) + 1.0 + ) + ) + ) + (function + "reset all times" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (mem-copy! (the-as pointer *overide-mood-color-table*) (the-as pointer *debug-mood-color-table*) 256) + (dotimes (v1-0 8) + (set! (-> *overide-mood-color-table* data v1-0 lgt-color w) 1.0) + (set! (-> *overide-mood-color-table* data v1-0 amb-color w) 1.0) + ) + #f + ) + ) + ) + (menu + "Fog" + (flag "7am sunrise" 0 dm-time-of-day-func) + (flag "10am morning" 1 dm-time-of-day-func) + (flag "12pm noon" 2 dm-time-of-day-func) + (flag "2pm afternoon" 3 dm-time-of-day-func) + (flag "6pm sunset" 4 dm-time-of-day-func) + (flag "7pm twilight" 5 dm-time-of-day-func) + (flag "11pm evening" 6 dm-time-of-day-func) + (flag "4am green sun" 7 dm-time-of-day-func) + (flag "time of day on" #f dm-time-of-day-pick-func) + (float-var + "Red" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-fog-table* (nonzero? *overide-mood-fog-table*)) + (set! (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-color + x + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-fog-table*) (zero? *overide-mood-fog-table*)) + 0 + ) + (else + (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-color + x + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 1.0) + #t + 0 + 255 + 0 + ) + (float-var + "Green" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-fog-table* (nonzero? *overide-mood-fog-table*)) + (set! (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-color + y + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-fog-table*) (zero? *overide-mood-fog-table*)) + 0 + ) + (else + (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-color + y + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 1.0) + #t + 0 + 255 + 0 + ) + (float-var + "Blue" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-fog-table* (nonzero? *overide-mood-fog-table*)) + (set! (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-color + z + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-fog-table*) (zero? *overide-mood-fog-table*)) + 0 + ) + (else + (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-color + z + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 1.0) + #t + 0 + 255 + 0 + ) + (float-var + "Mult" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-fog-table* (nonzero? *overide-mood-fog-table*)) + (set! (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-color + w + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-fog-table*) (zero? *overide-mood-fog-table*)) + 0 + ) + (else + (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-color + w + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.00390625) + #t + 0 + 1 + 0 + ) + (float-var + "Start" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-fog-table* (nonzero? *overide-mood-fog-table*)) + (set! (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + x + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-fog-table*) (zero? *overide-mood-fog-table*)) + 0 + ) + (else + (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + x + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 1.0) + #t + -1000 + 10000 + 0 + ) + (float-var + "End" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-fog-table* (nonzero? *overide-mood-fog-table*)) + (set! (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + y + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-fog-table*) (zero? *overide-mood-fog-table*)) + 0 + ) + (else + (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + y + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 1.0) + #t + 0 + 10000 + 0 + ) + (float-var + "Max" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-fog-table* (nonzero? *overide-mood-fog-table*)) + (set! (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + w + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-fog-table*) (zero? *overide-mood-fog-table*)) + 0 + ) + (else + (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + w + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.5) + #t + 0 + 255 + 0 + ) + (float-var + "Min" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-fog-table* (nonzero? *overide-mood-fog-table*)) + (set! (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + z + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-fog-table*) (zero? *overide-mood-fog-table*)) + 0 + ) + (else + (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + z + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.5) + #t + 0 + 255 + 0 + ) + (function + "reset selected time" + #f + ,(lambda () + (mem-copy! + (the-as + pointer + (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + ) + ) + (the-as + pointer + (-> *debug-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + ) + ) + 48 + ) + (set! (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-color + w + ) + 1.0 + ) + (set! (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + x + ) + (* 0.00024414062 + (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + x + ) + ) + ) + (set! (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + y + ) + (* 0.00024414062 + (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + y + ) + ) + ) + ) + ) + (function + "reset all times" + #f + ,(lambda () + (mem-copy! (the-as pointer *overide-mood-fog-table*) (the-as pointer *debug-mood-fog-table*) 384) + (dotimes (v1-0 8) + (set! (-> *overide-mood-fog-table* data v1-0 fog-color w) 1.0) + (set! (-> *overide-mood-fog-table* data v1-0 fog-dists x) + (* 0.00024414062 (-> *overide-mood-fog-table* data v1-0 fog-dists x)) + ) + (set! (-> *overide-mood-fog-table* data v1-0 fog-dists y) + (* 0.00024414062 (-> *overide-mood-fog-table* data v1-0 fog-dists y)) + ) + ) + #f + ) + ) + ) + (menu + "Palette" + (flag "palette 0" 0 dm-time-of-day-palette-func) + (flag "palette 1" 1 dm-time-of-day-palette-func) + (flag "palette 2" 2 dm-time-of-day-palette-func) + (flag "palette 3" 3 dm-time-of-day-palette-func) + (flag "palette 4" 4 dm-time-of-day-palette-func) + (flag "palette 5" 5 dm-time-of-day-palette-func) + (flag "palette 6" 6 dm-time-of-day-palette-func) + (flag "palette 7" 7 dm-time-of-day-palette-func) + (flag "time of day on" #f dm-time-of-day-pick-func) + (float-var + "Red" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *time-of-day-context* (nonzero? *time-of-day-context*)) + (set! (-> *time-of-day-context* times (-> *time-of-day-context* overide-palette) x) arg2) + ) + ) + ((or (not *time-of-day-context*) (zero? *time-of-day-context*)) + 0 + ) + (else + (-> *time-of-day-context* times (-> *time-of-day-context* overide-palette) x) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Green" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *time-of-day-context* (nonzero? *time-of-day-context*)) + (set! (-> *time-of-day-context* times (-> *time-of-day-context* overide-palette) y) arg2) + ) + ) + ((or (not *time-of-day-context*) (zero? *time-of-day-context*)) + 0 + ) + (else + (-> *time-of-day-context* times (-> *time-of-day-context* overide-palette) y) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Blue" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *time-of-day-context* (nonzero? *time-of-day-context*)) + (set! (-> *time-of-day-context* times (-> *time-of-day-context* overide-palette) z) arg2) + ) + ) + ((or (not *time-of-day-context*) (zero? *time-of-day-context*)) + 0 + ) + (else + (-> *time-of-day-context* times (-> *time-of-day-context* overide-palette) z) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Mult" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *time-of-day-context* (nonzero? *time-of-day-context*)) + (set! (-> *time-of-day-context* times (-> *time-of-day-context* overide-palette) w) arg2) + ) + ) + ((or (not *time-of-day-context*) (zero? *time-of-day-context*)) + 0 + ) + (else + (-> *time-of-day-context* times (-> *time-of-day-context* overide-palette) w) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (function + "reset selected time" + #f + ,(lambda () (let ((v0-0 (-> *time-of-day-context* times (-> *time-of-day-context* overide-palette)))) + (set! (-> v0-0 x) 1.0) + (set! (-> v0-0 y) 1.0) + (set! (-> v0-0 z) 1.0) + (set! (-> v0-0 w) 1.0) + v0-0 + ) + ) + ) + (function "reset all times" #f ,(lambda () + (dotimes (v1-0 8) + (set-vector! (-> *time-of-day-context* times v1-0) 1.0 1.0 1.0 1.0) + ) + #f + ) + ) + ) + (menu + "Filter" + (float-var + "Red" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *time-of-day-context* (nonzero? *time-of-day-context*)) + (set! (-> *time-of-day-context* filter-color x) arg2) + ) + ) + ((or (not *time-of-day-context*) (zero? *time-of-day-context*)) + 0 + ) + (else + (-> *time-of-day-context* filter-color x) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Green" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *time-of-day-context* (nonzero? *time-of-day-context*)) + (set! (-> *time-of-day-context* filter-color y) arg2) + ) + ) + ((or (not *time-of-day-context*) (zero? *time-of-day-context*)) + 0 + ) + (else + (-> *time-of-day-context* filter-color y) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Blue" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *time-of-day-context* (nonzero? *time-of-day-context*)) + (set! (-> *time-of-day-context* filter-color z) arg2) + ) + ) + ((or (not *time-of-day-context*) (zero? *time-of-day-context*)) + 0 + ) + (else + (-> *time-of-day-context* filter-color z) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Mult" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *time-of-day-context* (nonzero? *time-of-day-context*)) + (set! (-> *time-of-day-context* filter-color w) arg2) + ) + ) + ((or (not *time-of-day-context*) (zero? *time-of-day-context*)) + 0 + ) + (else + (-> *time-of-day-context* filter-color w) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + 2 + 0 + ) + (function "reset filter" #f ,(lambda () (let ((v0-0 (-> *time-of-day-context* filter-color))) + (set! (-> v0-0 x) 1.0) + (set! (-> v0-0 y) 1.0) + (set! (-> v0-0 z) 1.0) + (set! (-> v0-0 w) 1.0) + v0-0 + ) + ) + ) + ) + (menu + "Sky" + (float-var + "Cloud Min" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *time-of-day-context* (nonzero? *time-of-day-context*)) + (set! (-> *time-of-day-context* current-clouds cloud-min) arg2) + ) + ) + ((or (not *time-of-day-context*) (zero? *time-of-day-context*)) + 0 + ) + (else + (-> *time-of-day-context* current-clouds cloud-min) + ) + ) + ) + 1 + (new 'static 'bfloat :data 0.00390625) + #t + 0 + 1 + 0 + ) + (float-var + "Cloud Max" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *time-of-day-context* (nonzero? *time-of-day-context*)) + (set! (-> *time-of-day-context* current-clouds cloud-max) arg2) + ) + ) + ((or (not *time-of-day-context*) (zero? *time-of-day-context*)) + 0 + ) + (else + (-> *time-of-day-context* current-clouds cloud-max) + ) + ) + ) + 1 + (new 'static 'bfloat :data 0.00390625) + #t + 0 + 1 + 0 + ) + (function + "reset sky" + #f + ,(lambda () + (set! (-> *time-of-day-context* current-clouds cloud-min) (-> *mood-control* mood-clouds cloud-min)) + (set! (-> *time-of-day-context* current-clouds cloud-max) (-> *mood-control* mood-clouds cloud-max)) + ) + ) + ) + (function "Print mood tables" #f ,(lambda () (print-mood-tables))) + (function + "reset everything" + #f + ,(lambda () + (mem-copy! (the-as pointer *overide-mood-color-table*) (the-as pointer *debug-mood-color-table*) 256) + (mem-copy! (the-as pointer *overide-mood-fog-table*) (the-as pointer *debug-mood-fog-table*) 384) + (dotimes (v1-0 8) + (set! (-> *overide-mood-color-table* data v1-0 lgt-color w) 1.0) + (set! (-> *overide-mood-color-table* data v1-0 amb-color w) 1.0) + (set! (-> *overide-mood-fog-table* data v1-0 fog-color w) 1.0) + (set! (-> *overide-mood-fog-table* data v1-0 fog-dists x) + (* 0.00024414062 (-> *overide-mood-fog-table* data v1-0 fog-dists x)) + ) + (set! (-> *overide-mood-fog-table* data v1-0 fog-dists y) + (* 0.00024414062 (-> *overide-mood-fog-table* data v1-0 fog-dists y)) + ) + (set-vector! (-> *time-of-day-context* times v1-0) 1.0 1.0 1.0 1.0) + ) + (set-vector! (-> *time-of-day-context* filter-color) 1.0 1.0 1.0 1.0) + (set! (-> *time-of-day-context* current-clouds cloud-min) (-> *mood-control* mood-clouds cloud-min)) + (set! (-> *time-of-day-context* current-clouds cloud-max) (-> *mood-control* mood-clouds cloud-max)) + ) + ) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Sound" + (flag "Effect Debug" *debug-effect-control* dm-boolean-toggle-pick-func) + (flag "Regions" *execute-regions* dm-boolean-toggle-pick-func) + (flag "Region Marks" *display-region-marks* dm-boolean-toggle-pick-func) + (flag "Sound channels" *display-iop-info* dm-boolean-toggle-pick-func) + (function "Reload Banks" #f sound-bank-reload) + (function "List Sounds" #f ,(lambda () (list-sounds))) + (function "IOP Info" #f ,(lambda () (loader-test-command (sound-command iop-mem) (the-as uint 0)))) + ) + ) + ) + (debug-menu-append-item s5-0 (debug-menu-make-shader-menu arg0)) + (debug-menu-append-item s5-0 (debug-menu-make-instance-menu arg0)) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Bug Report" + (flag "display" *display-bug-report* dm-boolean-toggle-pick-func) + (function "Start" #f ,(lambda () (bug-report-start))) + (function "Stop" #f ,(lambda () (bug-report-stop))) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Scene" + (menu + "Scene Info" + (flag "channel" 1 display-scene-control-toggle-pick-func) + (flag "anim name" 2 display-scene-control-toggle-pick-func) + (flag "dma size" 4 display-scene-control-toggle-pick-func) + (flag "bounds spheres" 8 display-scene-control-toggle-pick-func) + (flag "actors" 16 display-scene-control-toggle-pick-func) + (flag "actor-marks" 32 display-scene-control-toggle-pick-func) + (flag "special fma spheres" 64 display-scene-control-toggle-pick-func) + (flag "all on" 95 display-scene-control-set-pick-func) + (flag "all off" 0 display-scene-control-set-pick-func) + ) + (menu + "arena" + (function + "arena-training-1-intro" + ("waspala-intro-training" "arena-training-1-intro") + dm-scene-load-pick-func + ) + (function "arena-fight-1-intro" ("wasstada-pre-fight-1" "arena-fight-1-intro") dm-scene-load-pick-func) + (function "arena-fight-1-res" ("wasstada-fight" "arena-fight-1-res") dm-scene-load-pick-func) + (function "wascity-chase-intro" ("wasstada-wascity-chase" "wascity-chase-intro") dm-scene-load-pick-func) + (function "arena-fight-2-res" ("wasstada-fight" "arena-fight-2-res") dm-scene-load-pick-func) + (function "arena-fight-3-intro" ("wasstada-fight" "arena-fight-3-intro") dm-scene-load-pick-func) + (function "arena-fight-3-res" ("wasstada-fight" "arena-fight-3-res") dm-scene-load-pick-func) + ) + (menu + "city" + (function "sewer-hum-kg-entrance" ("ctyslumb-sewer" "sewer-hum-kg-entrance") dm-scene-load-pick-func) + (function "sewer-kg-entrance" ("ctyinda-sewer" "sewer-kg-entrance") dm-scene-load-pick-func) + (function "sewer-genb-entrance" ("ctygenb-sewer" "sewer-genb-entrance") dm-scene-load-pick-func) + (function "city-gun-course-intro" ("gungame-start" "city-gun-course-intro") dm-scene-load-pick-func) + (function "city-gun-course-1-res" ("gungame-start" "city-gun-course-1-res") dm-scene-load-pick-func) + (function "city-gun-course-2-intro" ("gungame-start" "city-gun-course-2-intro") dm-scene-load-pick-func) + (function "city-gun-course-2-res" ("gungame-start" "city-gun-course-2-res") dm-scene-load-pick-func) + (function "city-port-attack-intro-b" ("ctyport-hiphog" "ctyport-attack-get-on-nuke") dm-scene-load-pick-func) + (function "city-port-attack-res" ("ctyport-attack-res" "city-port-attack-res") dm-scene-load-pick-func) + (function "city-hijack-vehicle-res" ("ctyhijack-res" "city-hijack-vehicle-res") dm-scene-load-pick-func) + (function "city-get-dark-punch" ("mhcitya-fma" "city-get-dark-punch") dm-scene-load-pick-func) + (function "sewer-met-hum-intro" ("ctygenb-samos" "sewer-met-hum-intro") dm-scene-load-pick-func) + (function "city-destroy-grid-res" ("ctyinda-grid-res-a" "city-destroy-grid-res") dm-scene-load-pick-func) + (function "tower-destroy-intro" ("mhcityb-tower-fma" "tower-destroy-intro") dm-scene-load-pick-func) + ) + (menu + "desert" + (function "nest-destroy-barrier" ("desertg-egg-wall-scene" "nest-destroy-barrier") dm-scene-load-pick-func) + (function "nest-hunt-intro" ("desertg-egg-wall-scene" "nest-hunt-intro") dm-scene-load-pick-func) + (function "nest-hunt-res" ("desertg-hunt-res-start" "nest-hunt-res") dm-scene-load-pick-func) + (function + "desert-oasis-defense-res" + ("desert-ashelin-movie" "desert-oasis-defense-res") + dm-scene-load-pick-func + ) + (function "desert-rescue-res-a" ("desert-rescue-movie" "desert-rescue-res-a") dm-scene-load-pick-func) + (function "desert-hover-res" ("desert-hover-movie" "desert-hover-res") dm-scene-load-pick-func) + (function "desert-lizard-catch" ("desert-lizard-corral" "desert-lizard-catch") dm-scene-load-pick-func) + (function "desert-lizard-catch-2" ("desert-lizard-corral" "desert-lizard-catch-2") dm-scene-load-pick-func) + (function "desert-lizard-catch-3" ("desert-lizard-corral" "desert-lizard-resolution") dm-scene-load-pick-func) + (function + "desert-oasis-defense-res-b" + ("desert-ashelin-movie" "desert-oasis-defense-res-b") + dm-scene-load-pick-func + ) + (function "desert-glide-res" ("volcanox-vola-start" "desert-glide-res") dm-scene-load-pick-func) + (function "desert-courserace-win" ("desertg-hunt-res-start" "desert-courserace-win") dm-scene-load-pick-func) + (function + "desert-final-boss-res" + ("desert-final-boss-res-movie-a" "desert-final-boss-res") + dm-scene-load-pick-func + ) + (function + "desert-final-boss-res-b" + ("desert-final-boss-res-movie" "desert-final-boss-res-b") + dm-scene-load-pick-func + ) + (function + "desert-final-boss-intro" + ("wasall-final-boss-intro-movie" "desert-final-boss-intro") + dm-scene-load-pick-func + ) + (function + "full desert-jak-gets-on-terraformer" + ("desert-boss-res-a" ("desert-jak-gets-on-t-a" "desert-jak-gets-on-t-b" "desert-jak-gets-on-t-c")) + dm-scene-load-pick-func + ) + (function "desert-jak-gets-on-t-a" ("desert-boss-res-a" "desert-jak-gets-on-t-a") dm-scene-load-pick-func) + (function "desert-jak-gets-on-t-b" ("desert-boss-res-b" "desert-jak-gets-on-t-b") dm-scene-load-pick-func) + (function "desert-jak-gets-on-t-c" ("desert-boss-res-b" "desert-jak-gets-on-t-c") dm-scene-load-pick-func) + (function + "full outro" + ("desert-final-boss-res-movie-a" ("desert-final-boss-res" "desert-final-boss-res-b" "arena-outro")) + dm-scene-load-pick-func + ) + ) + (menu + "comb" + (function "comb-exit" ("combn-start" "comb-exit") dm-scene-load-pick-func) + (function "comb-entrance-temple" ("temple-comb-entrance" "comb-entrance-temple") dm-scene-load-pick-func) + (function "catacombs-wild-ride-res" ("railx-start" "catacombs-wild-ride-res") dm-scene-load-pick-func) + (function "catacomb-get-shield" ("combn-start" "catacomb-get-shield") dm-scene-load-pick-func) + ) + (menu + "factory" + (function "factory-sky-battle-res" ("factorya-movie" "factory-sky-battle-res") dm-scene-load-pick-func) + (function + "factory-sky-battle-intro-b" + ("factorya-intro-b" "factory-sky-battle-intro-b") + dm-scene-load-pick-func + ) + (function "factory-indax-1-intro" ("factoryc-start" "factory-indax-1-intro") dm-scene-load-pick-func) + (function "factory-indax-2-intro" ("factoryc-start" "factory-indax-2-intro") dm-scene-load-pick-func) + (function "factory-indax-3-intro" ("factoryc-start" "factory-indax-3-intro") dm-scene-load-pick-func) + (function "factory-indax-4-intro" ("factoryc-start" "factory-indax-4-intro") dm-scene-load-pick-func) + (function "factory-boss-intro" ("factoryd-start" "factory-boss-intro") dm-scene-load-pick-func) + (function "factory-boss-res" ("factoryd-res-fma" "factory-boss-res") dm-scene-load-pick-func) + ) + (menu + "forest" + (function "forest-tower" ("foresta-start" "forest-tower") dm-scene-load-pick-func) + (function + "forest-turn-on-machine-res" + ("forest-pillar-start" "forest-turn-on-machine-res") + dm-scene-load-pick-func + ) + (function "precursor-tour-res" ("precura-foresta" "precursor-tour-res") dm-scene-load-pick-func) + (function "forest-ring-chase-res" ("foresta-start" "forest-ring-chase-res") dm-scene-load-pick-func) + (function "forest-res-b" ("foresta-start" "forest-res-b") dm-scene-load-pick-func) + ) + (menu + "freehq" + (function "factory-sky-battle-intro" ("freehq-movie" "factory-sky-battle-intro") dm-scene-load-pick-func) + (function "city-protect-hq-intro" ("freehq-movie" "city-protect-hq-intro") dm-scene-load-pick-func) + (function "city-protect-hq-res" ("freehq-movie" "city-protect-hq-res") dm-scene-load-pick-func) + (function "city-blow-tower-intro" ("freehq-movie" "city-blow-tower-intro") dm-scene-load-pick-func) + (function "temple-defend-intro" ("freehq-movie" "temple-defend-intro") dm-scene-load-pick-func) + ) + (menu + "hiphog" + (function "sewer-kg-met-intro" ("hiphog-movie" "sewer-kg-met-intro") dm-scene-load-pick-func) + (function "port-assault-intro" ("hiphog-movie" "port-assault-intro") dm-scene-load-pick-func) + (function "city-blow-barricade-intro" ("hiphog-movie" "city-blow-barricade-intro") dm-scene-load-pick-func) + (function "city-blow-barricade-res" ("hiphog-movie" "city-blow-barricade-res") dm-scene-load-pick-func) + (function "city-port-fight-intro" ("hiphog-movie" "city-port-fight-intro") dm-scene-load-pick-func) + (function "city-sniper-fight-intro" ("hiphog-movie" "city-sniper-fight-intro") dm-scene-load-pick-func) + (function "city-port-attack-intro" ("hiphog-movie" "city-port-attack-intro") dm-scene-load-pick-func) + ) + (menu + "intro" + (function + "full intro" + ("wasintro-start" ("intro-drop" "intro-lost" "intro-ffhq" "intro-tired" "intro-palace" "intro-rescue")) + dm-scene-load-pick-func + ) + (function "intro-drop" ("wasintro-start" "intro-drop") dm-scene-load-pick-func) + (function "intro-lost" ("wasintro-start" "intro-lost") dm-scene-load-pick-func) + (function "intro-ffhq" ("freehq-intro" "intro-ffhq") dm-scene-load-pick-func) + (function "intro-tired" ("wasintro-tired" "intro-tired") dm-scene-load-pick-func) + (function "intro-palace" ("wasintro-palace" "intro-palace") dm-scene-load-pick-func) + (function "intro-rescue" ("wasintro-rescue" "intro-rescue") dm-scene-load-pick-func) + ) + (menu + "mine" + (function "catacombs-travel-res" ("minec-start" "catacombs-travel-res") dm-scene-load-pick-func) + (function "mine-train-intro" ("mineb-elevator-room" "mine-train-intro") dm-scene-load-pick-func) + (function "mine-train-res" ("minec-train" "mine-train-res") dm-scene-load-pick-func) + (function "mine-boss-intro" ("prebot-intro" "mine-boss-intro") dm-scene-load-pick-func) + (function "prebot-hit-a" ("prebot-fight" "prebot-hit-a") dm-scene-load-pick-func) + (function "prebot-hit-b" ("prebot-fight" "prebot-hit-b") dm-scene-load-pick-func) + (function "mine-boss-res" ("prebot-fight" "mine-boss-res") dm-scene-load-pick-func) + (function "minee-genb-exit" ("minee-exit" "minee-genb-exit") dm-scene-load-pick-func) + (function "mine-explore-res" ("mineb-elevator-room" "mine-explore-res") dm-scene-load-pick-func) + ) + (menu + "onintent" + (function + "city-find-catacomb-ent-intro" + ("onintent-start" "city-find-catacomb-ent-intro") + dm-scene-load-pick-func + ) + ) + (menu "outro" (function "arena-outro" ("wasstada-outro" "arena-outro") dm-scene-load-pick-func)) + (menu + "precursor" + (function "precursor-destroy-ship-res" ("precurd-start" "precursor-destroy-ship-res") dm-scene-load-pick-func) + (function "desert-final-boss-intro-a" ("precurd-escape" "desert-final-boss-intro-a") dm-scene-load-pick-func) + (function + "precursor-destroy-ship-exp-res" + ("precurd-escape" "precursor-destroy-ship-exp-res") + dm-scene-load-pick-func + ) + (function + "precursor-destroy-ship-lose" + ("precura-start" "precursor-destroy-ship-lose") + dm-scene-load-pick-func + ) + (function + "full final-boss-intro" + ("precurd-escape" ("desert-final-boss-intro-a" "precursor-destroy-ship-exp-res" "desert-final-boss-intro")) + dm-scene-load-pick-func + ) + ) + (menu + "rubble" + (function "palace-ruins-attack-intro" ("rubblea-start" "palace-ruins-attack-intro") dm-scene-load-pick-func) + (function + "full palace-ruins-attack-res" + ("rubblec-fma" ("palace-ruins-attack-res-a" "palace-ruins-attack-res")) + dm-scene-load-pick-func + ) + (function "palace-ruins-attack-res" ("rubblec-fma" "palace-ruins-attack-res") dm-scene-load-pick-func) + (function "palace-ruins-attack-res-a" ("rubblec-fma" "palace-ruins-attack-res-a") dm-scene-load-pick-func) + (function "palace-ruins-patrol-intro" ("stadium-tunnel" "palace-ruins-patrol-intro") dm-scene-load-pick-func) + ) + (menu + "sewer" + (function "sewer-kg-exit" ("sewf-start" "sewer-kg-exit") dm-scene-load-pick-func) + (function "sewer-mh-exit" ("sewj-exit" "sewer-mh-exit") dm-scene-load-pick-func) + (function "sewer-port-exit" ("sewo-exit" "sewer-port-exit") dm-scene-load-pick-func) + (function "sewer-waterslide" ("sewd-start" "sewer-waterslide") dm-scene-load-pick-func) + (function "sewer-hum-kg-res" ("sewe-switch" "sewer-hum-kg-res") dm-scene-load-pick-func) + (function "sewer-met-hum-intro" ("ctygenb-samos" "sewer-met-hum-intro") dm-scene-load-pick-func) + ) + (menu + "temple" + (function "temple-climb-intro" ("templex-start" "temple-climb-intro") dm-scene-load-pick-func) + (function "temple-climb-res" ("templex-pre-hang" "temple-climb-res") dm-scene-load-pick-func) + (function "temple-oracle-intro" ("templeb-oracle-movie" "temple-oracle-intro") dm-scene-load-pick-func) + (function "temple-oracle-res" ("templeb-start" "temple-oracle-res") dm-scene-load-pick-func) + (function + "temple-jak-gets-light-glide" + ("templeb-glide" "temple-jak-gets-light-glide") + dm-scene-load-pick-func + ) + (function "temple-tests-res-a" ("templeb-flash-freeze" "temple-tests-res-a") dm-scene-load-pick-func) + (function "temple-tests-res-b" ("comba-elevator" "temple-tests-res-b") dm-scene-load-pick-func) + (function "temple-tests-intro" ("templea-mardoor" "temple-tests-intro") dm-scene-load-pick-func) + (function "temple-defend-res" ("templed-start" "temple-defend-res") dm-scene-load-pick-func) + ) + (menu + "throne" + (function + "full training intro" + ("waspala-intro-training" ("intro-training" "arena-training-1-intro")) + dm-scene-load-pick-func + ) + (function "intro-training" ("waspala-intro-training" "intro-training") dm-scene-load-pick-func) + (function "arena-fight-2-intro" ("waspala-start" "arena-fight-2-intro") dm-scene-load-pick-func) + (function "nest-eggs-intro" ("waspala-start" "nest-eggs-intro") dm-scene-load-pick-func) + (function "desert-rescue-intro" ("waspala-start" "desert-rescue-intro") dm-scene-load-pick-func) + (function "desert-jump-mission-intro" ("waspala-start" "desert-jump-mission-intro") dm-scene-load-pick-func) + ) + (menu + "tower" + (function "tower-destroy-res" ("towerb-top" "tower-destroy-res") dm-scene-load-pick-func) + (function "tower-destroy-res-b" ("ltowerb-fma" "tower-destroy-res-b") dm-scene-load-pick-func) + ) + (menu + "vinroom" + (function "city-power-game-intro" ("vinroom-movie" "city-power-game-intro") dm-scene-load-pick-func) + (function "city-power-game-res" ("vinroom-movie" "city-power-game-res") dm-scene-load-pick-func) + ) + (menu + "volcano" + (function "volcano-darkeco-res" ("volcano-movie" "volcano-darkeco-res") dm-scene-load-pick-func) + (function "volcano-indax-1-intro" ("volcano-movie" "volcano-indax-1-intro") dm-scene-load-pick-func) + (function "volcano-indax-1-res" ("volcano-movie" "volcano-indax-1-res") dm-scene-load-pick-func) + (function "volcano-indax-2-intro" ("volcano-movie" "volcano-indax-2-intro") dm-scene-load-pick-func) + (function "volcano-indax-2-res" ("volcano-movie" "volcano-indax-2-res") dm-scene-load-pick-func) + ) + (menu + "warp" + (function "desert-air-train-in" ("desert-warp" "desert-air-train-in") dm-scene-load-pick-func) + (function "desert-air-train-out" ("desert-warp" "desert-air-train-out") dm-scene-load-pick-func) + (function "city-air-train-out" ("ctyport-air-train" "city-air-train-out") dm-scene-load-pick-func) + (function "city-air-train-in-desert" ("ctyport-air-train" "city-air-train-in-desert") dm-scene-load-pick-func) + ) + (menu + "wasdoors" + (function "desert-course-race-intro" ("wasdoors-desert" "desert-course-race-intro") dm-scene-load-pick-func) + (function + "desert-artifact-race-1-intro" + ("wasdoors-desert" "desert-artifact-race-1-intro") + dm-scene-load-pick-func + ) + (function + "desert-artifact-race-1-res" + ("wasdoors-desert" "desert-artifact-race-1-res") + dm-scene-load-pick-func + ) + (function + "desert-artifact-race-2-intro" + ("wasdoors-desert" "desert-artifact-race-2-intro") + dm-scene-load-pick-func + ) + (function "desert-hover-intro" ("wasdoors-desert" "desert-hover-intro") dm-scene-load-pick-func) + (function "desert-beast-battle-intro" ("wasdoors-desert" "desert-beast-battle-intro") dm-scene-load-pick-func) + (function + "desert-catch-lizards-intro" + ("wasdoors-desert" "desert-catch-lizards-intro") + dm-scene-load-pick-func + ) + ) + (menu + "wasteland" + (function "wascity-pre-game-intro" ("wascityb-seem" "wascity-pre-game-intro") dm-scene-load-pick-func) + (function "wascity-pre-game-res" ("wascityb-seem" "wascity-pre-game-res") dm-scene-load-pick-func) + (function "wascity-leaper-race-intro" ("wascitya-seem" "wascity-leaper-race-intro") dm-scene-load-pick-func) + (function "wascity-leaper-race-res" ("wascityb-flut" "wascity-leaper-race-res") dm-scene-load-pick-func) + (function "wascity-gun-intro" ("wascityb-gungame" "wascity-gun-intro") dm-scene-load-pick-func) + (function "wascity-gun-res" ("wascityb-gungame" "wascity-gun-res") dm-scene-load-pick-func) + (function "nest-eggs-intro" ("waspala-nest" "nest-eggs-intro") dm-scene-load-pick-func) + (function "wascity-defend-res" ("wascityb-gungame" "wascity-defend-res") dm-scene-load-pick-func) + ) + ) + ) + ) + (debug-menu-append-item s5-0 (debug-menu-make-task-menu arg0)) + (debug-menu-append-item s5-0 (debug-menu-make-play-menu arg0)) + ) + arg0 + ) + +(define *popup-menu-context* (new 'debug 'debug-menu-context)) + +(defun popup-menu-context-make-default-menus ((arg0 debug-menu-context)) + (debug-menu-make-from-template + arg0 + '(main-menu + "Popup" + (flag "Cam 1" pad-1 dm-cam-externalize) + (flag "Turbo Cam" *camera-turbo-free* dm-boolean-toggle-pick-func) + (flag "Target" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (when (= arg1 (debug-menu-msg press)) + (if *target* + (stop 'debug) + (start 'debug (get-current-continue-forced *game-info*)) + ) + ) + *target* + ) + ) + (menu + "Mode" + (function "normal" #f ,(lambda () (send-event *target* 'change-mode 'normal))) + (function "racer" #f ,(lambda () + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'racer #f) + ) + ) + (function "flut" #f ,(lambda () + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'flut #f) + ) + ) + (function "board" #f ,(lambda () + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (logior! (-> *game-info* features) (game-feature board)) + (logior! (-> *game-info* debug-features) (game-feature board)) + (send-event *target* 'change-mode 'board #f) + ) + ) + (function "mech" #f ,(lambda () + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'mech #f) + ) + ) + (function "gun" #f ,(lambda () + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (logior! (-> *game-info* features) (game-feature gun)) + (logior! (-> *game-info* debug-features) (game-feature gun)) + (send-event *target* 'change-mode 'gun #f (pickup-type none)) + ) + ) + (function + "darkjak" + #f + ,(lambda () + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature darkjak) (-> *game-info* features))) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature darkjak) (-> *game-info* debug-features))) + ) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0)) + ) + ) + (function + "lightjak" + #f + ,(lambda () + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature lightjak) (-> *game-info* features))) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature lightjak) (-> *game-info* debug-features))) + ) + (send-event *target* 'change-mode 'lightjak #f 5) + ) + ) + (function "indax" #f ,(lambda () + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'indax #f) + ) + ) + (function + "invisible" + #f + ,(lambda () + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature artifact-invis) (-> *game-info* features))) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature artifact-invis) (-> *game-info* debug-features))) + ) + (send-event *target* 'change-mode 'invisible #f) + ) + ) + ) + (flag "Game" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (let ((v1-3 (-> *game-info* mode))) + (set! (-> *game-info* mode) (cond + ((= v1-3 'play) + 'debug + ) + ((= v1-3 'debug) + 'play + ) + (else + (-> *game-info* mode) + ) + ) + ) + ) + ) + (= (-> *game-info* mode) 'play) + ) + ) + (function "Clean" #f ,(lambda () + (if (time-of-day-setup #f) + (time-of-day-setup #t) + ) + (play-clean #f) + ) + ) + (flag "Stats" *stats-target* dm-boolean-toggle-pick-func) + (function "Reset" #f ,(lambda () (reset-actors 'debug))) + (function "Start" #f ,(lambda () (start 'play (-> *game-info* current-continue)))) + (function + "Editor" + #f + ,(lambda () + (kill-by-type editable-player *active-pool*) + (process-spawn editable-player :init editable-player-init #f :name "editable-player" :to *entity-pool*) + (set-master-mode 'game) + ) + ) + ) + ) + arg0 + ) + +(debug-menu-context-make-default-menus *debug-menu-context*) + +(popup-menu-context-make-default-menus *popup-menu-context*) + +(defun menu-respond-to-pause () + (case *master-mode* + (('menu) + (cond + ((and (cpad-hold? 0 l3) (cpad-hold? 0 select)) + (debug-menu-context-send-msg *popup-menu-context* (debug-menu-msg activate) (debug-menu-dest activation)) + (debug-menu-context-send-msg *debug-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation)) + ;; (debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation)) + ) + ((and (cpad-hold? 1 start) *editable*) + ;; (debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg activate) (debug-menu-dest activation)) + (debug-menu-context-send-msg *debug-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation)) + (debug-menu-context-send-msg *popup-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation)) + ) + ((and (cpad-hold? 0 l3) (cpad-hold? 0 start)) + (debug-menu-context-send-msg *debug-menu-context* (debug-menu-msg activate) (debug-menu-dest activation)) + (debug-menu-context-send-msg *popup-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation)) + ;; (debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation)) + ) + ) + ) + (else + (debug-menu-context-send-msg *debug-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation)) + (debug-menu-context-send-msg *popup-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation)) + ;; (debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation)) + ) + ) + #f + ) + +(defun *menu-hook* () + (debug-menus-handler *debug-menu-context*) + (debug-menus-handler *popup-menu-context*) + ) diff --git a/goal_src/jak3/engine/debug/editable-h.gc b/goal_src/jak3/engine/debug/editable-h.gc index c4990f7400..f7fc0e4fa0 100644 --- a/goal_src/jak3/engine/debug/editable-h.gc +++ b/goal_src/jak3/engine/debug/editable-h.gc @@ -5,5 +5,876 @@ ;; name in dgo: editable-h ;; dgos: GAME +;; +++editable-command +(defenum editable-command + :type uint32 + (none 0) + (exit 1) + (kill 2) + (select-one 3) + (select-add 4) + (select-remove 5) + (select-toggle 6) + (select-all 7) + (select-none 8) + (select-region 9) + (select-face 10) + (select-prim 11) + (select-current-owner 12) + (select-current-region 13) + (select-current-face 14) + (select-current-prim 15) + (pick-target 16) + (pick-loc 17) + (pick-yes-no 18) + (cancel 19) + (drag-none 20) + (drag-move 21) + (drag-scale 22) + (drag-rotate 23) + (drag-resize 24) + (camera-tumble 25) + (camera-xz 26) + (camera-xy 27) + (camera-rotate 28) + (camera-move 29) + (camera-zoom 30) + (insert-sphere 31) + (insert-point 32) + (insert-sample 33) + (insert-simple-camera 34) + (insert-light 35) + (insert-entity 36) + (insert-face 37) + (insert-plane 38) + (insert-box 39) + (insert-wall 40) + (delete 41) + (copy 42) + (resize 43) + (snap-to-ground 44) + (snap-xz 45) + (snap-y 46) + (snap-rotate 47) + (flip-side 48) + (region-set 49) + (region-new 50) + (edit-plane-set 51) + (edit-plane-clear 52) + (delete-region 53) + (copy-region 54) + (region-add 55) + (save 56) + (load 57) + (update-game 58) + (print-region-info 59) + (refresh-filter 60) + (rotate-level 61) + (translate-y-level 62) + (select-user0 63) + (select-user1 64) + (select-user2 65) + (select-user3 66) + (select-user4 67) + (select-user5 68) + (select-user6 69) + (select-user7 70) + (select-user8 71) + (select-user9 72) + (select-user10 73) + (select-user11 74) + (select-user12 75) + ) +;; ---editable-command + + +;; +++editable-filter +(defenum editable-filter + :type uint32 + :bitfield #t + (none 0) + (unknown 1) + (sound 2) + (part 3) + (user-setting 4) + (cam-setting 5) + (load 6) + (water-command 7) + (camera 8) + (target 9) + (water 10) + (data 11) + (city_vis 12) + (sample 13) + (light 14) + (entity 15) + (selected 16) + ) +;; ---editable-filter + + +;; +++editable-flag +(defenum editable-flag + :type uint32 + :bitfield #t + (selected) + (no-save) + (orient) + (x) + (y) + (z) + (no-plane-snap) + (no-update) + (mark) + (top-set) + (bot-set) + (changed) + ) +;; ---editable-flag + +(declare-type editable-array basic) +(declare-type editable-plane editable) +(declare-type editable-region basic) + ;; DECOMP BEGINS +;; this file is debug only +(declare-file (debug)) + +(define *editable-temp-id* 0) + +(define *editable-default-name* (new 'debug 'string 32 "undefined")) + +(defun editable-command->string ((arg0 editable-command)) + (case arg0 + (((editable-command select-current-face)) + "select-current-face" + ) + (((editable-command camera-move)) + "camera-move" + ) + (((editable-command select-current-region)) + "select-current-region" + ) + (((editable-command insert-sample)) + "insert-sample" + ) + (((editable-command print-region-info)) + "print-region-info" + ) + (((editable-command camera-rotate)) + "camera-rotate" + ) + (((editable-command select-user1)) + "select-user1" + ) + (((editable-command select-add)) + "select-add" + ) + (((editable-command camera-xz)) + "camera-xz" + ) + (((editable-command pick-loc)) + "pick-loc" + ) + (((editable-command insert-box)) + "insert-box" + ) + (((editable-command insert-entity)) + "insert-entity" + ) + (((editable-command translate-y-level)) + "translate-y-level" + ) + (((editable-command select-user11)) + "select-user11" + ) + (((editable-command select-user10)) + "select-user10" + ) + (((editable-command select-all)) + "select-all" + ) + (((editable-command copy-region)) + "copy-region" + ) + (((editable-command select-none)) + "select-none" + ) + (((editable-command camera-zoom)) + "camera-zoom" + ) + (((editable-command delete-region)) + "delete-region" + ) + (((editable-command select-toggle)) + "select-toggle" + ) + (((editable-command copy)) + "copy" + ) + (((editable-command pick-yes-no)) + "pick-yes-no" + ) + (((editable-command insert-light)) + "insert-light" + ) + (((editable-command none)) + "none" + ) + (((editable-command select-user4)) + "select-user4" + ) + (((editable-command resize)) + "resize" + ) + (((editable-command flip-side)) + "flip-side" + ) + (((editable-command refresh-filter)) + "refresh-filter" + ) + (((editable-command cancel)) + "cancel" + ) + (((editable-command save)) + "save" + ) + (((editable-command select-user6)) + "select-user6" + ) + (((editable-command region-new)) + "region-new" + ) + (((editable-command snap-to-ground)) + "snap-to-ground" + ) + (((editable-command pick-target)) + "pick-target" + ) + (((editable-command snap-y)) + "snap-y" + ) + (((editable-command select-user8)) + "select-user8" + ) + (((editable-command select-face)) + "select-face" + ) + (((editable-command exit)) + "exit" + ) + (((editable-command drag-move)) + "drag-move" + ) + (((editable-command edit-plane-set)) + "edit-plane-set" + ) + (((editable-command select-region)) + "select-region" + ) + (((editable-command delete)) + "delete" + ) + (((editable-command select-user0)) + "select-user0" + ) + (((editable-command camera-xy)) + "camera-xy" + ) + (((editable-command select-current-owner)) + "select-current-owner" + ) + (((editable-command region-add)) + "region-add" + ) + (((editable-command insert-sphere)) + "insert-sphere" + ) + (((editable-command insert-plane)) + "insert-plane" + ) + (((editable-command drag-rotate)) + "drag-rotate" + ) + (((editable-command select-one)) + "select-one" + ) + (((editable-command update-game)) + "update-game" + ) + (((editable-command select-user2)) + "select-user2" + ) + (((editable-command select-user3)) + "select-user3" + ) + (((editable-command snap-rotate)) + "snap-rotate" + ) + (((editable-command rotate-level)) + "rotate-level" + ) + (((editable-command select-prim)) + "select-prim" + ) + (((editable-command drag-none)) + "drag-none" + ) + (((editable-command select-current-prim)) + "select-current-prim" + ) + (((editable-command select-user5)) + "select-user5" + ) + (((editable-command insert-wall)) + "insert-wall" + ) + (((editable-command insert-simple-camera)) + "insert-sample-camera" + ) + (((editable-command insert-face)) + "insert-face" + ) + (((editable-command region-set)) + "region-set" + ) + (((editable-command select-user7)) + "select-user7" + ) + (((editable-command insert-point)) + "insert-point" + ) + (((editable-command drag-resize)) + "drag-resize" + ) + (((editable-command kill)) + "kill" + ) + (((editable-command snap-xz)) + "snap-xz" + ) + (((editable-command select-user12)) + "select-user12" + ) + (((editable-command camera-tumble)) + "camera-tumble" + ) + (((editable-command select-user9)) + "select-user9" + ) + (((editable-command edit-plane-clear)) + "edit-plane-clear" + ) + (((editable-command drag-scale)) + "drag-scale" + ) + (((editable-command load)) + "load" + ) + (((editable-command select-remove)) + "select-remove" + ) + (else + "*unknown*" + ) + ) + ) + +;; WARN: Return type mismatch basic vs string. +(defun editable-filter->string ((arg0 editable-filter) (arg1 basic)) + (if (= (logand arg0 (editable-filter target)) (editable-filter target)) + (format arg1 "target ") + ) + (if (= (logand arg0 (editable-filter city_vis)) (editable-filter city_vis)) + (format arg1 "city_vis ") + ) + (if (= (logand arg0 (editable-filter water-command)) (editable-filter water-command)) + (format arg1 "water-command ") + ) + (if (= (logand arg0 (editable-filter user-setting)) (editable-filter user-setting)) + (format arg1 "user-setting ") + ) + (if (= (logand arg0 (editable-filter sample)) (editable-filter sample)) + (format arg1 "sample ") + ) + (if (= (logand arg0 (editable-filter light)) (editable-filter light)) + (format arg1 "light ") + ) + (if (= (logand arg0 (editable-filter part)) (editable-filter part)) + (format arg1 "part ") + ) + (if (= (logand arg0 (editable-filter unknown)) (editable-filter unknown)) + (format arg1 "unknown ") + ) + (if (= (logand arg0 (editable-filter entity)) (editable-filter entity)) + (format arg1 "entity ") + ) + (if (= (logand arg0 (editable-filter data)) (editable-filter data)) + (format arg1 "data ") + ) + (if (= (logand arg0 (editable-filter water)) (editable-filter water)) + (format arg1 "water ") + ) + (if (= (logand arg0 (editable-filter cam-setting)) (editable-filter cam-setting)) + (format arg1 "cam-setting ") + ) + (if (= (logand (editable-filter selected) arg0) (editable-filter selected)) + (format arg1 "selected ") + ) + (if (= (logand arg0 (editable-filter none)) (editable-filter none)) + (format arg1 "none ") + ) + (if (= (logand arg0 (editable-filter camera)) (editable-filter camera)) + (format arg1 "camera ") + ) + (if (= (logand arg0 (editable-filter load)) (editable-filter load)) + (format arg1 "load ") + ) + (if (= (logand arg0 (editable-filter sound)) (editable-filter sound)) + (format arg1 "sound ") + ) + (the-as string arg1) + ) + +(deftype editable-region (basic) + ((changed symbol) + (locked symbol) + (id uint64) + (filter editable-filter) + (tree symbol) + (level string) + (on-enter string) + (on-inside string) + (on-exit string) + ) + (:methods + (new (symbol type) _type_) + (editable-region-method-9 () none) + (editable-region-method-10 () none) + (editable-region-method-11 () none) + (editable-region-method-12 () none) + ) + ) + + +(deftype editable (basic) + ((flags editable-flag) + (name string) + (id uint32) + (region editable-region) + (owner pair) + (prefix basic) + ) + (:methods + (editable-method-9 () none) + (editable-method-10 () none) + (editable-method-11 () none) + (editable-method-12 () none) + (editable-method-13 () none) + (editable-method-14 () none) + (editable-method-15 () none) + (editable-method-16 () none) + (editable-method-17 () none) + (editable-method-18 () none) + (editable-method-19 () none) + (editable-method-20 () none) + (editable-method-21 () none) + (editable-method-22 () none) + (editable-method-23 () none) + (editable-method-24 () none) + (editable-method-25 () none) + (editable-method-26 () none) + (editable-method-27 () none) + (editable-method-28 () none) + (editable-method-29 () none) + (editable-method-30 () none) + (editable-method-31 () none) + (editable-method-32 () none) + (editable-method-33 () none) + (editable-method-34 () none) + (editable-method-35 () none) + ) + ) + + +(deftype editable-array (basic) + ((allocated-length int32) + (length int32) + (region editable-region) + (backup-region editable-region) + (region-lock? symbol) + (move-lock? symbol) + (move-speed float) + (selection (array editable)) + (filter editable-filter 2) + (target editable) + (target-mode editable-command) + (target-command editable-command) + (target-message string) + (edit-plane editable-plane) + (edit-plane-center vector :inline) + (edit-plane-normal vector :inline) + (level-offset vector :inline) + (level-info-id uint32) + (level uint32) + (edit-param0 float) + (data editable :dynamic) + ) + (:methods + (new (symbol type int) _type_) + (editable-array-method-9 () none) + (editable-array-method-10 () none) + (editable-array-method-11 () none) + (editable-array-method-12 () none) + (editable-array-method-13 () none) + (editable-array-method-14 () none) + (editable-array-method-15 () none) + (editable-array-method-16 () none) + (editable-array-method-17 () none) + (editable-array-method-18 () none) + (editable-array-method-19 () none) + ) + ) + + +(defmethod new editable-array ((allocation symbol) (type-to-make type) (arg0 int)) + (let ((s5-0 (object-new allocation type-to-make (the-as int (+ (-> type-to-make size) (* arg0 4)))))) + (set! (-> s5-0 allocated-length) arg0) + (set! (-> s5-0 length) 0) + (set! (-> s5-0 region) #f) + (set! (-> s5-0 backup-region) #f) + (set! (-> s5-0 region-lock?) #f) + (set! (-> s5-0 move-lock?) #f) + (set! (-> s5-0 target) #f) + (set! (-> s5-0 target-command) (editable-command none)) + (set! (-> s5-0 target-message) #f) + (set! (-> s5-0 selection) + (the-as (array editable) ((method-of-type array new) allocation array editable arg0)) + ) + (set! (-> s5-0 edit-plane) #f) + (set! (-> s5-0 filter 0) (editable-filter + none + unknown + sound + part + user-setting + cam-setting + load + water-command + city_vis + sample + light + entity + ) + ) + (set! (-> s5-0 filter 1) (editable-filter camera target water data city_vis sample light entity selected)) + (dotimes (v1-5 arg0) + (set! (-> s5-0 data v1-5) #f) + (set! (-> s5-0 selection v1-5) #f) + ) + s5-0 + ) + ) + +(deftype editable-point (editable) + ((radius meters) + (trans vector :inline) + ) + (:methods + (new (symbol type vector editable-region) _type_) + ) + ) + + +(defmethod new editable-point ((allocation symbol) (type-to-make type) (arg0 vector) (arg1 editable-region)) + (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> gp-0 region) #f) + (set! (-> gp-0 name) "undefined") + (set! (-> gp-0 prefix) "undefined") + (let* ((s3-0 gp-0) + (s2-0 (method-of-object s3-0 editable-method-23)) + ) + (set! arg1 (cond + (arg1 + (empty) + arg1 + ) + (else + (new 'debug 'editable-region) + ) + ) + ) + (s2-0) + ) + (set! (-> gp-0 trans quad) (-> arg0 quad)) + (set! (-> gp-0 radius) 2048.0) + (set! (-> gp-0 owner) '()) + gp-0 + ) + ) + +(deftype editable-sphere (editable-point) + () + (:methods + (new (symbol type vector float editable-region) _type_) + ) + ) + + +(defmethod new editable-sphere ((allocation symbol) (type-to-make type) (arg0 vector) (arg1 float) (arg2 editable-region)) + (let ((s5-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> s5-0 region) #f) + (set! (-> s5-0 name) "undefined") + (set! (-> s5-0 prefix) "undefined") + (let* ((s2-0 s5-0) + (s1-0 (method-of-object s2-0 editable-method-23)) + ) + (set! arg2 (cond + (arg2 + (empty) + arg2 + ) + (else + (new 'debug 'editable-region) + ) + ) + ) + (s1-0) + ) + (set! (-> s5-0 trans quad) (-> arg0 quad)) + (set! (-> s5-0 radius) arg1) + (set! (-> s5-0 owner) '()) + s5-0 + ) + ) + +(deftype editable-sample (editable-point) + () + ) + + +(deftype editable-light (editable-sphere) + ((direction vector :inline) + (color vector :inline) + (decay-start float) + (ambient-point-ratio float) + (brightness float) + (shadow uint32 :overlay-at (-> direction data 0)) + (shadows float 5) + (shadow-ambi float :overlay-at (-> shadows 0)) + (shadow-dir0 float :overlay-at (-> shadows 1)) + (shadow-dir1 float :overlay-at (-> shadows 2)) + (shadow-dir2 float :overlay-at (-> shadows 3)) + (shadow-dir3 float :overlay-at (-> shadows 4)) + ) + (:methods + (new (symbol type vector float editable-region) _type_) + ) + ) + + +(defmethod new editable-light ((allocation symbol) (type-to-make type) (arg0 vector) (arg1 float) (arg2 editable-region)) + (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> gp-0 region) #f) + (let* ((s2-0 gp-0) + (s1-0 (method-of-object s2-0 editable-method-23)) + ) + (set! arg2 (cond + (arg2 + (empty) + arg2 + ) + (else + (new 'debug 'editable-region) + ) + ) + ) + (s1-0) + ) + (set! (-> gp-0 trans quad) (-> arg0 quad)) + (set! (-> gp-0 radius) arg1) + (set! (-> gp-0 owner) '()) + (set! (-> gp-0 prefix) (new 'debug 'string 32 *editable-default-name*)) + (let ((s5-1 (new 'debug 'string 32 (the-as string #f)))) + (format s5-1 "~s-~d" (-> gp-0 prefix) *editable-temp-id*) + (set! (-> gp-0 name) s5-1) + ) + (set! *editable-temp-id* (+ *editable-temp-id* 1)) + (set! (-> gp-0 decay-start) 0.5) + (set! (-> gp-0 ambient-point-ratio) 1.0) + (set! (-> gp-0 brightness) 1.0) + (set-vector! (-> gp-0 color) 1.0 1.0 1.0 -1.0) + (set-vector! (-> gp-0 direction) 0.0 0.0 0.0 0.0) + (set! (-> gp-0 shadow-ambi) 1.0) + (set! (-> gp-0 shadow-dir0) 1.0) + (set! (-> gp-0 shadow-dir1) 1.0) + (set! (-> gp-0 shadow-dir2) 1.0) + (set! (-> gp-0 shadow-dir3) 1.0) + gp-0 + ) + ) + +(deftype editable-entity (editable-point) + ((angles euler-angles :inline) + (idx int32) + ) + (:methods + (new (symbol type vector float editable-region) _type_) + (editable-entity-method-36 () none) + ) + ) + + +(defmethod new editable-entity ((allocation symbol) (type-to-make type) (arg0 vector) (arg1 float) (arg2 editable-region)) + (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> gp-0 region) #f) + (let* ((s2-0 gp-0) + (s1-0 (method-of-object s2-0 editable-method-23)) + ) + (set! arg2 (cond + (arg2 + (empty) + arg2 + ) + (else + (new 'debug 'editable-region) + ) + ) + ) + (s1-0) + ) + (set! (-> gp-0 trans quad) (-> arg0 quad)) + (set! (-> gp-0 radius) arg1) + (set! (-> gp-0 owner) '()) + (set! (-> gp-0 prefix) (new 'debug 'string 32 "entity")) + (set! (-> gp-0 name) (new 'debug 'string 32 "entity")) + gp-0 + ) + ) + +(deftype editable-face (editable) + ((length int32) + (normal vector :inline) + (center vector :inline) + (vertex editable-point 6) + ) + (:methods + (new (symbol type editable-region) _type_) + (editable-face-method-36 () none) + (editable-face-method-37 () none) + ) + ) + + +(defmethod new editable-face ((allocation symbol) (type-to-make type) (arg0 editable-region)) + (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> gp-0 region) #f) + (set! (-> gp-0 name) "undefined") + (set! (-> gp-0 prefix) "undefined") + (let* ((s4-0 gp-0) + (s3-0 (method-of-object s4-0 editable-method-23)) + ) + (set! arg0 (cond + (arg0 + (empty) + arg0 + ) + (else + (new 'debug 'editable-region) + ) + ) + ) + (s3-0) + ) + (set! (-> gp-0 owner) '()) + gp-0 + ) + ) + +(deftype editable-plane (editable) + ((length int32) + (radius meters) + (vertex editable-point 2) + ) + (:methods + (new (symbol type editable-region) _type_) + (editable-plane-method-36 () none) + (editable-plane-method-37 () none) + ) + ) + + +(defmethod new editable-plane ((allocation symbol) (type-to-make type) (arg0 editable-region)) + (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> gp-0 region) #f) + (set! (-> gp-0 name) "undefined") + (set! (-> gp-0 prefix) "undefined") + (let* ((s4-0 gp-0) + (s3-0 (method-of-object s4-0 editable-method-23)) + ) + (set! arg0 (cond + (arg0 + (empty) + arg0 + ) + (else + (new 'debug 'editable-region) + ) + ) + ) + (s3-0) + ) + (set! (-> gp-0 owner) '()) + (set! (-> gp-0 radius) 20480.0) + gp-0 + ) + ) + +(deftype editable-player (process-drawable) + ((current editable-array) + (current-command uint32) + (select-command function) + (drag-command uint32) + (extra-command function) + (left-handed basic) + (light-names basic) + (external-cam-mode symbol) + (command editable-command 6) + (close-menu-time time-frame) + (mouse-pos vector :inline) + (mouse-end vector :inline) + (manipulator manipulator :inline) + (mouse-box vector 2 :inline) + (mouse-hit vector :inline) + (mouse-normal vector :inline) + (float-variable float) + (float-step float) + (float-max float) + (float-min float) + (float-id uint32) + ) + (:methods + (editable-player-method-20 () none) + (editable-player-method-21 () none) + (editable-player-method-22 () none) + (editable-player-method-23 () none) + ) + ) + + +(deftype editable-work (basic) + ((num-found int16) + (last-found int16) + (last-x float) + (last-y float) + (hide symbol) + (found editable 256) + (dists uint32 256) + ) + ) + + +(define *editable-work* (new 'global 'editable-work)) + +(define *editable* (the-as (pointer editable-player) #f)) diff --git a/goal_src/jak3/engine/debug/editable-player.gc b/goal_src/jak3/engine/debug/editable-player.gc index dabf3ab4ef..6f1a65831b 100644 --- a/goal_src/jak3/engine/debug/editable-player.gc +++ b/goal_src/jak3/engine/debug/editable-player.gc @@ -5,5 +5,8 @@ ;; name in dgo: editable-player ;; dgos: GAME +(define-extern editable-player-init (function symbol none :behavior editable-player)) +(define-extern *editable-menu-context* debug-menu-context) + ;; DECOMP BEGINS diff --git a/goal_src/jak3/engine/debug/manipulator.gc b/goal_src/jak3/engine/debug/manipulator.gc index 0479fa63b9..ebd3f5ea62 100644 --- a/goal_src/jak3/engine/debug/manipulator.gc +++ b/goal_src/jak3/engine/debug/manipulator.gc @@ -5,5 +5,673 @@ ;; name in dgo: manipulator ;; dgos: GAME +;; +++manipulator-action +(defenum manipulator-action + :type uint32 + (ma0 0) + (ma1 1) + (ma2 2) + (ma3 3) + (ma4 4) + (ma5 5) + (ma6 6) + (ma7 7) + ) +;; ---manipulator-action + + +;; +++manipulator-mode +(defenum manipulator-mode + :type uint32 + (mm0 0) + (mm1 1) + ) +;; ---manipulator-mode + + ;; DECOMP BEGINS +;; this file is debug only +(declare-file (debug)) + +(deftype manipulator (structure) + ((action manipulator-action) + (mode manipulator-mode) + (dragging? symbol) + (position vector :inline) + (speed vector :inline) + (drag-ref-position vector :inline) + (mouse-ref-position vector :inline) + (mat matrix :inline) + (rotate-ref int32) + (angles euler-angles :inline) + ) + (:methods + (set-mode (_type_ manipulator-mode) none) + (manipulator-method-10 (_type_) none) + (manipulator-method-11 (_type_) none) + (manipulator-method-12 (_type_ vector) none) + (manipulator-method-13 (_type_ vector vector) none) + (manipulator-method-14 (_type_) none) + ) + ) + + +;; WARN: Return type mismatch symbol vs none. +(defun draw-axis ((arg0 vector) (arg1 vector) (arg2 float) (arg3 float) (arg4 rgba)) + (local-vars + (sv-160 int) + (sv-176 (function symbol bucket-id vector vector vector rgba symbol)) + (sv-192 symbol) + (sv-208 int) + (sv-224 vector) + (sv-240 vector) + (sv-256 vector) + (sv-272 vector) + (sv-288 vector) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s1-0 (new 'stack-no-clear 'vector))) + (cond + ((< (fabs (vector-dot arg1 *x-vector*)) 0.5) + (vector-cross! s1-0 *x-vector* arg1) + ) + ((< (fabs (vector-dot arg1 *y-vector*)) 0.5) + (vector-cross! s1-0 *y-vector* arg1) + ) + (else + (vector-cross! s1-0 *z-vector* arg1) + ) + ) + (vector-cross! s1-0 s1-0 arg1) + (vector-normalize! s1-0 1.0) + (let ((s0-0 (new 'stack-no-clear 'vector))) + (let ((v1-10 arg0)) + (let ((a0-8 arg1)) + (let ((a1-10 arg2)) + (.mov vf7 a1-10) + ) + (.lvf vf5 (&-> a0-8 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 (&-> s0-0 quad) vf6) + (set! sv-160 0) + (while (< sv-160 8) + (set! sv-176 add-debug-flat-triangle) + (set! sv-192 #t) + (set! sv-208 584) + (set! sv-224 (new 'stack-no-clear 'vector)) + (let ((v1-16 s0-0)) + (let ((a0-9 arg1)) + (let ((a1-11 arg3)) + (.mov vf7 a1-11) + ) + (.lvf vf5 (&-> a0-9 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 (&-> sv-224 quad) vf6) + (set! sv-256 (new 'stack-no-clear 'vector)) + (set! sv-240 s0-0) + (let* ((a2-3 + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) arg1 (* 182.04445 (the float (* 45 sv-160)))) + ) + (v1-22 (vector-orient-by-quat! (new 'stack-no-clear 'vector) s1-0 a2-3)) + ) + (let ((a0-13 (* 0.25 arg3))) + (.mov vf7 a0-13) + ) + (.lvf vf5 (&-> v1-22 quad)) + ) + (.lvf vf4 (&-> sv-240 quad)) + (.add.x.vf 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-256 quad) vf6) + (set! sv-288 (new 'stack-no-clear 'vector)) + (set! sv-272 s0-0) + (let* ((a2-7 (quaternion-vector-angle! + (new 'stack-no-clear 'quaternion) + arg1 + (* 182.04445 (the float (* 45 (+ sv-160 1)))) + ) + ) + (v1-29 (vector-orient-by-quat! (new 'stack-no-clear 'vector) s1-0 a2-7)) + ) + (let ((a0-17 (* 0.25 arg3))) + (.mov vf7 a0-17) + ) + (.lvf vf5 (&-> v1-29 quad)) + ) + (.lvf vf4 (&-> sv-272 quad)) + (.add.x.vf 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-288 quad) vf6) + (let ((t1-0 arg4)) + (sv-176 sv-192 (the-as bucket-id sv-208) sv-224 sv-256 sv-288 t1-0) + ) + (set! sv-160 (+ sv-160 1)) + ) + ) + ) + (add-debug-vector #t (bucket-id debug-no-zbuf2) arg0 arg1 arg2 arg4) + (none) + ) + ) + +(defmethod set-mode ((this manipulator) (arg0 manipulator-mode)) + (set! (-> this mode) arg0) + 0 + (none) + ) + +;; ERROR: function was not converted to expressions. Cannot decompile. + +(defmethod manipulator-method-11 ((this manipulator)) + (local-vars (sv-240 rgba) (sv-256 vector) (sv-272 vector)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (format *stdcon* "~M ~M ~M~%" (-> this position x) (-> this position y) (-> this position z)) + (let ((s5-0 (-> this position))) + 0.0 + (let* ((v0-1 + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> *math-camera* trans) (-> this position)) 1.0) + ) + (s4-0 (< (fabs (vector-dot v0-1 (the-as vector (-> this mat)))) 0.9)) + (s3-0 (< (fabs (vector-dot v0-1 (-> this mat uvec))) 0.9)) + (s2-0 (< (fabs (vector-dot v0-1 (-> this mat fvec))) 0.9)) + (f30-1 (* 0.15 (vector-vector-distance (-> *math-camera* trans) s5-0))) + ) + (if s4-0 + (draw-axis + s5-0 + (the-as vector (-> this mat)) + f30-1 + (* 0.25 f30-1) + (if (= (-> this action) (manipulator-action ma1)) + *color-yellow* + *color-red* + ) + ) + ) + (if s3-0 + (draw-axis s5-0 (-> this mat uvec) f30-1 (* 0.25 f30-1) (if (= (-> this action) (manipulator-action ma2)) + *color-yellow* + *color-green* + ) + ) + ) + (if s2-0 + (draw-axis s5-0 (-> this mat fvec) f30-1 (* 0.25 f30-1) (if (= (-> this action) (manipulator-action ma3)) + *color-yellow* + *color-blue* + ) + ) + ) + (let ((s1-0 (new 'stack-no-clear 'vector)) + (s0-0 (new 'stack-no-clear 'vector)) + ) + (let ((f28-0 0.1)) + (if (= (-> this action) (manipulator-action ma7)) + (set! sv-240 *color-yellow*) + (set! sv-240 *color-light-blue*) + ) + (let ((a1-7 s1-0)) + (let ((v1-26 s5-0)) + (let ((a0-13 (vector+! + (new 'stack-no-clear 'vector) + (the-as vector (-> *math-camera* inv-camera-rot)) + (-> *math-camera* inv-camera-rot uvec) + ) + ) + ) + (let ((a2-6 (* f30-1 f28-0))) + (.mov vf7 a2-6) + ) + (.lvf vf5 (&-> a0-13 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 quad) vf6) + ) + (let ((a0-14 s0-0)) + (let ((v1-27 s1-0)) + (let ((a1-9 (-> *math-camera* inv-camera-rot uvec))) + (let ((a2-8 (* -2.0 f30-1 f28-0))) + (.mov vf7 a2-8) + ) + (.lvf vf5 (&-> a1-9 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 (&-> a0-14 quad) vf6) + ) + (add-debug-line #t (bucket-id debug-no-zbuf1) s1-0 s0-0 sv-240 #f (the-as rgba -1)) + (set! (-> s1-0 quad) (-> s0-0 quad)) + (let ((a0-18 s0-0)) + (let ((v1-29 s0-0)) + (let ((a1-12 (-> *math-camera* inv-camera-rot))) + (let ((a2-11 (* -2.0 f30-1 f28-0))) + (.mov vf7 a2-11) + ) + (.lvf vf5 (&-> a1-12 rvec 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 (&-> a0-18 quad) vf6) + ) + (add-debug-line #t (bucket-id debug-no-zbuf1) s1-0 s0-0 sv-240 #f (the-as rgba -1)) + (set! (-> s1-0 quad) (-> s0-0 quad)) + (let ((a0-22 s0-0)) + (let ((v1-31 s0-0)) + (let ((a1-15 (-> *math-camera* inv-camera-rot uvec))) + (let ((a2-14 (* 2.0 f30-1 f28-0))) + (.mov vf7 a2-14) + ) + (.lvf vf5 (&-> a1-15 quad)) + ) + (.lvf vf4 (&-> v1-31 quad)) + ) + (.add.x.vf 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) + ) + (add-debug-line #t (bucket-id debug-no-zbuf1) s1-0 s0-0 sv-240 #f (the-as rgba -1)) + (set! (-> s1-0 quad) (-> s0-0 quad)) + (let ((a0-26 s0-0)) + (let ((v1-33 s0-0)) + (let ((a1-18 (-> *math-camera* inv-camera-rot))) + (let ((a2-17 (* 2.0 f30-1 f28-0))) + (.mov vf7 a2-17) + ) + (.lvf vf5 (&-> a1-18 rvec 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 (&-> a0-26 quad) vf6) + ) + ) + (let ((t9-9 add-debug-line) + (a0-27 #t) + (a1-19 577) + (t1-3 #f) + (t2-3 -1) + ) + (t9-9 a0-27 (the-as bucket-id a1-19) s1-0 s0-0 sv-240 t1-3 (the-as rgba t2-3)) + ) + ) + (let ((s1-1 (new 'stack-no-clear 'vector))) + (when (and s3-0 s2-0) + (let ((a1-20 s1-1)) + (let ((v1-36 s5-0)) + (let ((a0-29 (vector+! (new 'stack-no-clear 'vector) (-> this mat fvec) (-> this mat uvec)))) + (let ((a2-20 f30-1)) + (.mov vf7 a2-20) + ) + (.lvf vf5 (&-> a0-29 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-20 quad) vf6) + ) + (let ((s0-1 draw-axis)) + (set! sv-256 s1-1) + (let ((a1-22 (vector-negate! (new 'stack-no-clear 'vector) (-> this mat uvec))) + (a2-21 (* 0.15 f30-1)) + (a3-11 (* 0.15 f30-1)) + (t0-11 (if (= (-> this action) (manipulator-action ma6)) + *color-yellow* + *color-green* + ) + ) + ) + (s0-1 sv-256 a1-22 a2-21 a3-11 t0-11) + ) + ) + (let ((s0-2 draw-axis)) + (set! sv-272 s1-1) + (let ((a1-24 (vector-negate! (new 'stack-no-clear 'vector) (-> this mat fvec))) + (a2-22 (* 0.15 f30-1)) + (a3-12 (* 0.15 f30-1)) + (t0-12 (if (= (-> this action) (manipulator-action ma6)) + *color-yellow* + *color-blue* + ) + ) + ) + (s0-2 sv-272 a1-24 a2-22 a3-12 t0-12) + ) + ) + ) + (set! s2-0 (and s4-0 s2-0)) + (when s2-0 + (let ((a1-25 s1-1)) + (let ((v1-44 s5-0)) + (let ((a0-37 (vector+! (new 'stack-no-clear 'vector) (the-as vector (-> this mat)) (-> this mat fvec)))) + (let ((a2-24 f30-1)) + (.mov vf7 a2-24) + ) + (.lvf vf5 (&-> a0-37 quad)) + ) + (.lvf vf4 (&-> v1-44 quad)) + ) + (.add.x.vf 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-25 quad) vf6) + ) + (draw-axis + s1-1 + (vector-negate! (new 'stack-no-clear 'vector) (the-as vector (-> this mat))) + (* 0.15 f30-1) + (* 0.15 f30-1) + (if (= (-> this action) (manipulator-action ma5)) + *color-yellow* + *color-red* + ) + ) + (draw-axis + s1-1 + (vector-negate! (new 'stack-no-clear 'vector) (-> this mat fvec)) + (* 0.15 f30-1) + (* 0.15 f30-1) + (if (= (-> this action) (manipulator-action ma5)) + *color-yellow* + *color-blue* + ) + ) + ) + (set! s3-0 (and s4-0 s3-0)) + (when s3-0 + (let ((a0-44 s1-1)) + (let ((v1-52 (vector+! (new 'stack-no-clear 'vector) (the-as vector (-> this mat)) (-> this mat uvec)))) + (let ((a1-31 f30-1)) + (.mov vf7 a1-31) + ) + (.lvf vf5 (&-> v1-52 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-44 quad) vf6) + ) + (draw-axis + s1-1 + (vector-negate! (new 'stack-no-clear 'vector) (the-as vector (-> this mat))) + (* 0.15 f30-1) + (* 0.15 f30-1) + (if (= (-> this action) (manipulator-action ma4)) + *color-yellow* + *color-red* + ) + ) + (draw-axis + s1-1 + (vector-negate! (new 'stack-no-clear 'vector) (-> this mat uvec)) + (* 0.15 f30-1) + (* 0.15 f30-1) + (if (= (-> this action) (manipulator-action ma4)) + *color-yellow* + *color-green* + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod manipulator-method-12 ((this manipulator) (arg0 vector)) + (set! (-> this rotate-ref) (the int (-> *mouse* posx))) + (set! (-> this mouse-ref-position quad) (-> arg0 quad)) + (set! (-> this drag-ref-position quad) (-> this position quad)) + (set! (-> this dragging?) #t) + (set! (-> this speed quad) (the-as uint128 0)) + 0 + (none) + ) + +(defmethod manipulator-method-13 ((this manipulator) (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) + (cond + ((= (-> this mode) (manipulator-mode mm0)) + (set! (-> this speed quad) (-> this position quad)) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) arg1 arg0)) + (s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this mouse-ref-position) arg0)) + ) + 0.0 + 0.0 + (let ((s2-0 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'vector)) + ) + (cond + ((or (= (-> this action) (manipulator-action ma1)) + (= (-> this action) (manipulator-action ma2)) + (= (-> this action) (manipulator-action ma3)) + ) + (cond + ((= (-> this action) (manipulator-action ma1)) + (cond + ((< (fabs (vector-dot s5-1 (-> this mat uvec))) (fabs (vector-dot s5-1 (-> this mat fvec)))) + (set! (-> s2-0 quad) (-> this mat fvec quad)) + (set! (-> s1-0 quad) (-> this mat uvec quad)) + ) + (else + (set! (-> s2-0 quad) (-> this mat uvec quad)) + (set! (-> s1-0 quad) (-> this mat fvec quad)) + ) + ) + ) + ((= (-> this action) (manipulator-action ma2)) + (cond + ((< (fabs (vector-dot s5-1 (the-as vector (-> this mat)))) (fabs (vector-dot s5-1 (-> this mat fvec)))) + (set! (-> s2-0 quad) (-> this mat fvec quad)) + (set! (-> s1-0 quad) (-> this mat rvec quad)) + ) + (else + (set! (-> s2-0 quad) (-> this mat rvec quad)) + (set! (-> s1-0 quad) (-> this mat fvec quad)) + ) + ) + ) + ((= (-> this action) (manipulator-action ma3)) + (cond + ((< (fabs (vector-dot s5-1 (-> this mat uvec))) (fabs (vector-dot s5-1 (the-as vector (-> this mat))))) + (set! (-> s2-0 quad) (-> this mat rvec quad)) + (set! (-> s1-0 quad) (-> this mat uvec quad)) + ) + (else + (set! (-> s2-0 quad) (-> this mat uvec quad)) + (set! (-> s1-0 quad) (-> this mat rvec quad)) + ) + ) + ) + ) + (let ((f30-0 (intersect-ray-plane arg0 s5-1 (-> this position) s2-0)) + (f0-11 (intersect-ray-plane arg0 s4-1 (-> this position) s2-0)) + ) + (let ((a1-3 s5-1)) + (let ((v1-41 arg0)) + (let ((a0-43 s5-1)) + (let ((a2-3 f30-0)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a0-43 quad)) + ) + (.lvf vf4 (&-> v1-41 quad)) + ) + (.add.x.vf 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 ((a0-44 s4-1)) + (let ((v1-42 s4-1)) + (let ((a1-4 f0-11)) + (.mov vf7 a1-4) + ) + (.lvf vf5 (&-> v1-42 quad)) + ) + (.lvf vf4 (&-> arg0 quad)) + (.add.x.vf 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-44 quad) vf6) + ) + ) + (vector-flatten! s5-1 (vector-! (new 'stack-no-clear 'vector) s5-1 (-> this position)) s1-0) + (vector-flatten! s4-1 (vector-! (new 'stack-no-clear 'vector) s4-1 (-> this position)) s1-0) + (let ((v1-46 (vector-! (new 'stack-no-clear 'vector) s5-1 s4-1))) + (vector+! (-> this position) (-> this drag-ref-position) v1-46) + (format *stdcon* "delta ~M ~M ~M~%" (-> v1-46 x) (-> v1-46 y) (-> v1-46 z)) + ) + ) + ((or (= (-> this action) (manipulator-action ma4)) + (= (-> this action) (manipulator-action ma5)) + (= (-> this action) (manipulator-action ma6)) + (= (-> this action) (manipulator-action ma7)) + ) + (cond + ((= (-> this action) (manipulator-action ma4)) + (set! (-> s2-0 quad) (-> *z-vector* quad)) + ) + ((= (-> this action) (manipulator-action ma5)) + (set! (-> s2-0 quad) (-> *y-vector* quad)) + ) + ((= (-> this action) (manipulator-action ma6)) + (set! (-> s2-0 quad) (-> *x-vector* quad)) + ) + ((= (-> this action) (manipulator-action ma7)) + (set! (-> s2-0 quad) (-> *math-camera* inv-camera-rot fvec quad)) + ) + ) + (vector-normalize! s2-0 1.0) + (let ((f30-1 (intersect-ray-plane arg0 s5-1 (-> this position) s2-0)) + (f0-15 (intersect-ray-plane arg0 s4-1 (-> this position) s2-0)) + ) + (let ((a1-14 s5-1)) + (let ((v1-69 arg0)) + (let ((a0-69 s5-1)) + (let ((a2-13 f30-1)) + (.mov vf7 a2-13) + ) + (.lvf vf5 (&-> a0-69 quad)) + ) + (.lvf vf4 (&-> v1-69 quad)) + ) + (.add.x.vf 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-14 quad) vf6) + ) + (let ((v1-70 s4-1)) + (let ((a0-70 arg0)) + (let ((a1-15 s4-1)) + (let ((a2-14 f0-15)) + (.mov vf7 a2-14) + ) + (.lvf vf5 (&-> a1-15 quad)) + ) + (.lvf vf4 (&-> a0-70 quad)) + ) + (.add.x.vf 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-70 quad) vf6) + ) + ) + (vector+! (-> this position) (-> this drag-ref-position) (vector-! (new 'stack-no-clear 'vector) s5-1 s4-1)) + ) + ) + ) + ) + (vector-! (-> this speed) (-> this position) (-> this speed)) + ) + ((= (-> this mode) (manipulator-mode mm1)) + (let ((s4-2 (- (-> this rotate-ref) (the int (-> *mouse* posx)))) + (s5-2 (new 'stack-no-clear 'matrix)) + ) + (new 'stack 'euler-angles) + (matrix-identity! s5-2) + (cond + ((= (-> this action) (manipulator-action ma1)) + (matrix-axis-angle! s5-2 (the-as vector (-> this mat)) (* 182.04445 (the float s4-2))) + ) + ((= (-> this action) (manipulator-action ma2)) + (matrix-axis-angle! s5-2 (-> this mat uvec) (* 182.04445 (the float s4-2))) + ) + ((= (-> this action) (manipulator-action ma3)) + (matrix-axis-angle! s5-2 (-> this mat fvec) (* 182.04445 (the float s4-2))) + ) + ) + (matrix*! (-> this mat) (-> this mat) s5-2) + ) + (vector-normalize! (the-as vector (-> this mat)) 1.0) + (vector-normalize! (-> this mat uvec) 1.0) + (vector-normalize! (-> this mat fvec) 1.0) + (matrix->eul (-> this angles) (-> this mat) 21) + (format *stdcon* "X = ~R~%Y = ~R~%Z = ~R~%" (-> this angles x) (-> this angles y) (-> this angles z)) + (set! (-> this rotate-ref) (the int (-> *mouse* posx))) + ) + (else + ) + ) + 0 + (none) + ) + ) + +(defmethod manipulator-method-14 ((this manipulator)) + (set! (-> this speed quad) (the-as uint128 0)) + (set! (-> this dragging?) #f) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/debug/memory-usage.gc b/goal_src/jak3/engine/debug/memory-usage.gc index 6f485c785d..57b603b9f7 100644 --- a/goal_src/jak3/engine/debug/memory-usage.gc +++ b/goal_src/jak3/engine/debug/memory-usage.gc @@ -7,3 +7,568 @@ ;; DECOMP BEGINS +;; this file is debug only +(declare-file (debug)) + + +(defmethod mem-usage ((this object) (usage memory-usage-block) (flags int)) + this + ) + +(defmethod calculate-total ((this memory-usage-block)) + (let ((v0-0 0)) + (dotimes (v1-0 (-> this length)) + (+! v0-0 (-> this data v1-0 total)) + ) + v0-0 + ) + ) + +(defmethod reset! ((this memory-usage-block)) + (set! (-> this length) 0) + (dotimes (v1-0 113) + (set! (-> this data v1-0 used) 0) + (set! (-> this data v1-0 total) 0) + (set! (-> this data v1-0 count) 0) + ) + this + ) + +(defun mem-size ((arg0 basic) (arg1 symbol) (arg2 int)) + (let ((gp-0 (new 'stack 'memory-usage-block))) + (mem-usage arg0 gp-0 arg2) + (if arg1 + (inspect gp-0) + ) + (calculate-total gp-0) + ) + ) + +(defmethod compute-memory-usage! ((this level) (arg0 symbol)) + (if (zero? (-> this mem-usage-block)) + (set! (-> this mem-usage-block) (new 'debug 'memory-usage-block)) + ) + (set! arg0 (or (zero? (-> this mem-usage-block length)) arg0)) + (when arg0 + (mem-usage this (reset! (-> this mem-usage-block)) 0) + (set! (-> this mem-usage) (calculate-total (-> this mem-usage-block))) + 0 + ) + (-> this mem-usage-block) + ) + +(defmethod mem-usage ((this process-tree) (usage memory-usage-block) (flags int)) + (let ((s3-0 91)) + (let* ((s2-0 *dead-pool-list*) + (a0-1 (car s2-0)) + ) + (while (not (null? s2-0)) + (set! (-> usage data s3-0 name) (symbol->string-debug (the-as symbol a0-1))) + (+! s3-0 1) + (set! s2-0 (cdr s2-0)) + (set! a0-1 (car s2-0)) + ) + ) + (set! (-> usage length) (max (-> usage length) s3-0)) + ) + (set! (-> usage data 97 name) "*debug-dead-pool*") + (set! *temp-mem-usage* usage) + (when (logtest? flags 32) + (let* ((s5-1 91) + (s4-1 *dead-pool-list*) + (v1-10 (car s4-1)) + ) + (while (not (null? s4-1)) + (let ((a0-4 (-> (the-as symbol v1-10) value))) + (set! *global-search-count* s5-1) + (iterate-process-tree + (the-as process-tree a0-4) + (lambda ((arg0 basic)) + (let ((gp-0 *temp-mem-usage*) + (s5-0 *global-search-count*) + ) + (+! (-> gp-0 data s5-0 used) 1) + (+! (-> gp-0 data s5-0 total) (logand -16 (+ (asize-of arg0) 15))) + ) + #t + ) + *null-kernel-context* + ) + ) + (+! s5-1 1) + (set! s4-1 (cdr s4-1)) + (set! v1-10 (car s4-1)) + ) + ) + ) + (iterate-process-tree + this + (lambda ((arg0 process-drawable)) + (let ((gp-0 *temp-mem-usage*)) + (let ((s4-0 (cond + ((= (-> arg0 pool) *8k-dead-pool*) + 92 + ) + ((= (-> arg0 pool) *16k-dead-pool*) + 93 + ) + ((= (-> arg0 pool) *nk-dead-pool*) + 94 + ) + ((= (-> arg0 pool) *target-dead-pool*) + 95 + ) + ((= (-> arg0 pool) *camera-dead-pool*) + 96 + ) + ((= (-> arg0 pool) *debug-dead-pool*) + 97 + ) + (else + 91 + ) + ) + ) + ) + (+! (-> gp-0 data s4-0 count) 1) + (+! (-> gp-0 data s4-0 total) (logand -16 (+ (asize-of arg0) 15))) + ) + (set! (-> gp-0 length) (max 99 (-> gp-0 length))) + (set! (-> gp-0 data 98 name) "process-active") + (+! (-> gp-0 data 98 count) 1) + (let ((v1-23 (asize-of arg0))) + (+! (-> gp-0 data 98 used) v1-23) + (+! (-> gp-0 data 98 total) (logand -16 (+ v1-23 15))) + ) + (set! (-> gp-0 length) (max 100 (-> gp-0 length))) + (set! (-> gp-0 data 99 name) "heap-total") + (+! (-> gp-0 data 99 count) 1) + (let ((v1-34 (+ (- -4 (the-as int arg0)) (the-as int (-> arg0 heap-cur))))) + (+! (-> gp-0 data 99 used) v1-34) + (+! (-> gp-0 data 99 total) (logand -16 (+ v1-34 15))) + ) + (set! (-> gp-0 length) (max 101 (-> gp-0 length))) + (set! (-> gp-0 data 100 name) "heap-process") + (+! (-> gp-0 data 100 count) 1) + (let ((v1-45 (- (-> arg0 type size) (-> arg0 type heap-base)))) + (+! (-> gp-0 data 100 used) v1-45) + (+! (-> gp-0 data 100 total) (logand -16 (+ v1-45 15))) + ) + (set! (-> gp-0 length) (max 102 (-> gp-0 length))) + (set! (-> gp-0 data 101 name) "heap-header") + (+! (-> gp-0 data 101 count) 1) + (let ((v1-55 (-> arg0 type heap-base))) + (+! (-> gp-0 data 101 used) v1-55) + (+! (-> gp-0 data 101 total) (logand -16 (+ v1-55 15))) + ) + (set! (-> gp-0 length) (max 103 (-> gp-0 length))) + (set! (-> gp-0 data 102 name) "heap-thread") + (+! (-> gp-0 data 102 count) 1) + (let ((v1-65 (asize-of (-> arg0 main-thread)))) + (+! (-> gp-0 data 102 used) v1-65) + (+! (-> gp-0 data 102 total) (logand -16 (+ v1-65 15))) + ) + (when (type? arg0 process-drawable) + (when (nonzero? (-> arg0 root)) + (set! (-> gp-0 length) (max 104 (-> gp-0 length))) + (set! (-> gp-0 data 103 name) "heap-root") + (+! (-> gp-0 data 103 count) 1) + (let ((v1-78 (asize-of (-> arg0 root)))) + (+! (-> gp-0 data 103 used) v1-78) + (+! (-> gp-0 data 103 total) (logand -16 (+ v1-78 15))) + ) + (when (type? (-> arg0 root) collide-shape) + (set! (-> gp-0 length) (max 110 (-> gp-0 length))) + (set! (-> gp-0 data 109 name) "heap-collide-prim") + (+! (-> gp-0 data 109 count) 1) + (let ((v1-90 (asize-of (-> (the-as collide-shape-moving (-> arg0 root)) root-prim)))) + (+! (-> gp-0 data 109 used) v1-90) + (+! (-> gp-0 data 109 total) (logand -16 (+ v1-90 15))) + ) + ) + ) + (when (nonzero? (-> arg0 node-list)) + (set! (-> gp-0 length) (max 107 (-> gp-0 length))) + (set! (-> gp-0 data 106 name) "heap-cspace") + (+! (-> gp-0 data 106 count) 1) + (let ((v1-102 (asize-of (-> arg0 node-list)))) + (+! (-> gp-0 data 106 used) v1-102) + (+! (-> gp-0 data 106 total) (logand -16 (+ v1-102 15))) + ) + ) + (when (nonzero? (-> arg0 draw)) + (set! (-> gp-0 length) (max 105 (-> gp-0 length))) + (set! (-> gp-0 data 104 name) "heap-draw-control") + (+! (-> gp-0 data 104 count) 1) + (let ((v1-114 (asize-of (-> arg0 draw)))) + (+! (-> gp-0 data 104 used) v1-114) + (+! (-> gp-0 data 104 total) (logand -16 (+ v1-114 15))) + ) + (when (nonzero? (-> arg0 draw skeleton)) + (set! (-> gp-0 length) (max 108 (-> gp-0 length))) + (set! (-> gp-0 data 107 name) "heap-bone") + (+! (-> gp-0 data 107 count) 1) + (let ((v1-128 (asize-of (-> arg0 draw skeleton)))) + (+! (-> gp-0 data 107 used) v1-128) + (+! (-> gp-0 data 107 total) (logand -16 (+ v1-128 15))) + ) + ) + ) + (when (nonzero? (-> arg0 skel)) + (set! (-> gp-0 length) (max 106 (-> gp-0 length))) + (set! (-> gp-0 data 105 name) "heap-joint-control") + (+! (-> gp-0 data 105 count) 1) + (let ((v1-140 (asize-of (-> arg0 skel)))) + (+! (-> gp-0 data 105 used) v1-140) + (+! (-> gp-0 data 105 total) (logand -16 (+ v1-140 15))) + ) + ) + (when (nonzero? (-> arg0 part)) + (set! (-> gp-0 length) (max 109 (-> gp-0 length))) + (set! (-> gp-0 data 108 name) "heap-part") + (+! (-> gp-0 data 108 count) 1) + (let ((v1-152 (asize-of (-> arg0 part)))) + (+! (-> gp-0 data 108 used) v1-152) + (+! (-> gp-0 data 108 total) (logand -16 (+ v1-152 15))) + ) + ) + (when (nonzero? (-> arg0 nav)) + (set! (-> gp-0 length) (max 111 (-> gp-0 length))) + (set! (-> gp-0 data 110 name) "heap-misc") + (+! (-> gp-0 data 110 count) 1) + (let ((v1-164 (asize-of (-> arg0 nav)))) + (+! (-> gp-0 data 110 used) v1-164) + (+! (-> gp-0 data 110 total) (logand -16 (+ v1-164 15))) + ) + ) + (when (nonzero? (-> arg0 path)) + (set! (-> gp-0 length) (max 111 (-> gp-0 length))) + (set! (-> gp-0 data 110 name) "heap-misc") + (+! (-> gp-0 data 110 count) 1) + (let ((v1-176 (asize-of (-> arg0 path)))) + (+! (-> gp-0 data 110 used) v1-176) + (+! (-> gp-0 data 110 total) (logand -16 (+ v1-176 15))) + ) + ) + (when (nonzero? (-> arg0 vol)) + (set! (-> gp-0 length) (max 111 (-> gp-0 length))) + (set! (-> gp-0 data 110 name) "heap-misc") + (+! (-> gp-0 data 110 count) 1) + (let ((v1-188 (asize-of (-> arg0 vol)))) + (+! (-> gp-0 data 110 used) v1-188) + (+! (-> gp-0 data 110 total) (logand -16 (+ v1-188 15))) + ) + ) + ) + ) + #t + ) + *null-kernel-context* + ) + this + ) + +(define *max-dma* 0) + +(defmethod print-mem-usage ((this memory-usage-block) (arg0 level) (arg1 object)) + (local-vars (sv-16 object) (sv-32 string) (sv-48 symbol)) + (let ((s3-0 (&- (-> arg0 heap current) (the-as uint (-> arg0 heap base))))) + (let ((v1-2 (+ (-> this data 62 total) (-> this data 63 total)))) + (< #x10000 v1-2) + ) + (let* ((v1-4 (-> arg0 info memory-mode)) + (v1-5 + (cond + ((= v1-4 (level-memory-mode large)) + #xbd0000 + ) + ((= v1-4 (level-memory-mode medium)) + #x8fb800 + ) + ((or (= v1-4 (level-memory-mode small-center)) (= v1-4 (level-memory-mode city-center))) + #x627000 + ) + ((or (= v1-4 (level-memory-mode borrow)) + (= v1-4 (level-memory-mode borrow0)) + (= v1-4 (level-memory-mode borrow1)) + (= v1-4 (level-memory-mode borrow2)) + (= v1-4 (level-memory-mode borrow3)) + (= v1-4 (level-memory-mode borrow4)) + (= v1-4 (level-memory-mode borrow-city-small)) + ) + (+ (- #xc000 (the-as int (-> arg0 heap base))) (the-as int (-> arg0 heap top-base))) + ) + ((or (= v1-4 (level-memory-mode tiny-center)) + (= v1-4 (level-memory-mode tiny-edge)) + (= v1-4 (level-memory-mode city-tiny-edge)) + (= v1-4 (level-memory-mode tiny)) + ) + #x3f0000 + ) + ((= v1-4 (level-memory-mode micro)) + #x1f8000 + ) + ((= v1-4 (level-memory-mode tiny-center-micro)) + #x2f4000 + ) + ((= v1-4 (level-memory-mode tiny-center-small)) + #x4ec000 + ) + (else + #x5e8000 + ) + ) + ) + (a0-25 (-> arg0 info memory-mode)) + (v1-8 + (- (the-as int v1-5) + (the-as + uint + (if (or (= a0-25 (level-memory-mode tiny-center)) (or (= a0-25 (level-memory-mode tiny-edge)) + (= a0-25 (level-memory-mode city-tiny-edge)) + (= a0-25 (level-memory-mode tiny)) + ) + ) + #x24000 + #xc000 + ) + ) + ) + ) + (a0-28 0) + ) + (when (-> arg0 info borrow) + (dotimes (a1-21 5) + (+! a0-28 (-> arg0 info borrow borrow-size a1-21)) + ) + ) + (let ((s1-0 (- v1-8 (shl a0-28 10))) + (s2-0 (* (dma-buffer-length (-> *display* frames (-> *display* last-screen) global-buf)) 16)) + ) + (set! *max-dma* (max s2-0 *max-dma*)) + (if (< (- s1-0 (the-as int (shl (-> arg0 info buffer-size) 10))) s3-0) + (format arg1 "~3L") + ) + (let ((s0-0 format)) + (set! sv-16 arg1) + (set! sv-32 "~0K~10,'-S--~5,'-DK-of-~5,'-DK--~5,'-DK-of-~5,'-DK--") + (set! sv-48 (-> arg0 name)) + (let* ((s3-1 (sar s3-0 10)) + (s4-1 (- (sar s1-0 10) (the-as int (-> arg0 info buffer-size)))) + (s1-1 (sar (memory-used *nk-dead-pool*) 10)) + (t2-0 (sar (memory-total *nk-dead-pool*) 10)) + (t0-0 s4-1) + (t1-0 s1-1) + ) + (s0-0 sv-16 sv-32 sv-48 s3-1 t0-0 t1-0 t2-0) + (format arg1 "~5,'-DK/~5,'-DK--~%" (shr s2-0 10) (sar *max-dma* 10)) + (when *stats-memory-short* + (let ((s3-2 (if (cpad-hold? 1 l3) + #t + arg1 + ) + ) + (s4-2 format) + (s2-1 "heap-~5,'-DK/~5,'-DK----~D---~D/~D~%") + (s1-2 (sar (memory-used *nk-dead-pool*) 10)) + (s0-1 (sar (memory-total *nk-dead-pool*) 10)) + ) + (set! t0-0 (the-as int (compact-time *nk-dead-pool*))) + (set! t1-0 (the-as int (-> *nk-dead-pool* compact-count))) + (set! t2-0 (the-as int (-> *nk-dead-pool* compact-count-targ))) + (s4-2 s3-2 s2-1 s1-2 s0-1 (the-as uint t0-0) (the-as uint t1-0) (the-as uint t2-0)) + ) + ) + (when (not *stats-memory-short*) + (set! (-> *dma-mem-usage* data 88 total) + (* (dma-buffer-length (-> *display* frames (-> *display* last-screen) debug-buf)) 16) + ) + (let ((t9-11 format) + (a0-47 arg1) + (a1-28 " bsp ~192H~5DK ~280Hdebug~456H~5DK~%") + (a2-12 (sar (+ (-> this data 59 total) (-> this data 60 total) (-> this data 61 total)) 10)) + (a3-5 (sar (-> *dma-mem-usage* data 88 total) 10)) + ) + (t9-11 a0-47 a1-28 a2-12 a3-5 (the-as none t0-0) (the-as none t1-0) (the-as none t2-0)) + (format + arg1 + " bsp-leaf-vis ~192H~5DK~%" + (sar (+ (-> this data 62 total) (-> this data 63 total)) 10) + (the-as none a3-5) + ) + (format arg1 " level-code ~192H~5DK~%" (sar (-> this data 66 total) 10) (the-as none a3-5)) + ) + (format + arg1 + " tfrag ~192H~5DK ~280Htfragment~456H~5DK~%" + (sar + (+ (-> this data 1 total) + (-> this data 2 total) + (-> this data 3 total) + (-> this data 4 total) + (-> this data 5 total) + (-> this data 6 total) + (-> this data 7 total) + (-> this data 8 total) + ) + 10 + ) + (sar (-> *dma-mem-usage* data 1 total) 10) + ) + (format + arg1 + " tie-proto ~192H~5DK ~280Hsky~456H~5DK~%" + (sar + (+ (-> this data 9 total) + (-> this data 10 total) + (-> this data 11 total) + (-> this data 12 total) + (-> this data 13 total) + (-> this data 14 total) + (-> this data 16 total) + (-> this data 17 total) + ) + 10 + ) + (sar (-> *dma-mem-usage* data 89 total) 10) + ) + (format + arg1 + " tie-instance ~192H~5DK ~280Htie-fragment~456H~5DK~%" + (sar (+ (-> this data 18 total) (-> this data 20 total) (-> this data 21 total) (-> this data 22 total)) 10) + (sar (-> *dma-mem-usage* data 9 total) 10) + ) + (format + arg1 + " shrub-proto ~192H~5DK ~280Htie-scissor~456H~5DK~%" + (sar + (+ (-> this data 25 total) + (-> this data 26 total) + (-> this data 27 total) + (-> this data 28 total) + (-> this data 29 total) + (-> this data 30 total) + (-> this data 31 total) + (-> this data 32 total) + (-> this data 33 total) + ) + 10 + ) + (sar (-> *dma-mem-usage* data 15 total) 10) + ) + (format + arg1 + " shrub-instance ~192H~5DK ~280Hshrubbery~456H~5DK~%" + (sar (-> this data 34 total) 10) + (sar (-> *dma-mem-usage* data 27 total) 10) + ) + (format + arg1 + " hfragment ~192H~5DK ~280Hhfragment~456H~5DK~%" + (sar (-> this data 43 total) 10) + (sar (-> *dma-mem-usage* data 43 total) 10) + (the-as none t0-0) + (the-as none t1-0) + (the-as none t2-0) + ) + (format + arg1 + " collision ~192H~5DK ~280Htie-generic~456H~5DK~%" + (sar + (+ (-> this data 51 total) + (-> this data 52 total) + (-> this data 53 total) + (-> this data 54 total) + (-> this data 55 total) + (-> this data 56 total) + (-> this data 57 total) + (-> this data 58 total) + ) + 10 + ) + (sar (-> *dma-mem-usage* data 17 total) 10) + ) + (format + arg1 + " pris-geo ~192H~5DK ~280Hpris-fragment~456H~5DK~%" + (sar + (+ (-> this data 35 total) + (-> this data 36 total) + (-> this data 37 total) + (-> this data 38 total) + (-> this data 39 total) + (-> this data 40 total) + (-> this data 41 total) + (-> this data 42 total) + (-> this data 74 total) + (-> this data 75 total) + (-> this data 76 total) + (-> this data 77 total) + (-> this data 79 total) + (-> this data 82 total) + (-> this data 81 total) + (-> this data 112 total) + ) + 10 + ) + (sar (-> *dma-mem-usage* data 35 total) 10) + ) + (format + arg1 + " pris-anim ~192H~5DK ~280Hpris-generic~456H~5DK~%" + (sar + (+ (-> this data 68 total) + (-> this data 69 total) + (-> this data 70 total) + (-> this data 71 total) + (-> this data 72 total) + (-> this data 78 total) + (-> this data 80 total) + (-> this data 73 total) + ) + 10 + ) + (sar (-> *dma-mem-usage* data 90 total) 10) + ) + (format + arg1 + " textures ~192H~5DK ~280Htextures~456H~5DK~%" + (sar (-> this data 83 total) 10) + (sar (-> *dma-mem-usage* data 83 total) 10) + ) + (format arg1 " entity ~192H~5DK~%" (sar + (+ (-> this data 67 total) + (-> this data 44 total) + (-> this data 45 total) + (-> this data 46 total) + (-> this data 50 total) + (-> this data 49 total) + (-> this data 47 total) + (-> this data 48 total) + ) + 10 + ) + ) + (format + arg1 + " misc ~192H~5DK ~280Hsprite~456H~5DK~%" + (sar + (+ (-> this data 0 total) + (-> this data 64 total) + (-> this data 65 total) + (-> this data 84 total) + (-> this data 85 total) + ) + 10 + ) + (sar (-> *dma-mem-usage* data 86 total) 10) + ) + ) + ) + ) + ) + ) + ) + (format arg1 "~1K~0L") + this + ) diff --git a/goal_src/jak3/engine/debug/menu.gc b/goal_src/jak3/engine/debug/menu.gc index defda242f7..6802ebec9d 100644 --- a/goal_src/jak3/engine/debug/menu.gc +++ b/goal_src/jak3/engine/debug/menu.gc @@ -5,5 +5,1491 @@ ;; name in dgo: menu ;; dgos: GAME +;; +++debug-menu-msg +(defenum debug-menu-msg + :type int32 + (activate 1) + (deactivate 2) + (update 3) + (press 4) + ) +;; ---debug-menu-msg + + +;; +++debug-menu-dest +(defenum debug-menu-dest + :type int32 + (activation 0) + (root 1) + (open-menus 2) + (current-selection 3) + ) +;; ---debug-menu-dest + +(declare-type debug-menu-node basic) +(declare-type debug-menu-context basic) +(declare-type debug-menu debug-menu-node) +(declare-type debug-menu-item debug-menu-node) + +(define-extern debug-menu-context-send-msg (function debug-menu-context debug-menu-msg debug-menu-dest debug-menu-context)) +(define-extern debug-menu-make-from-template (function debug-menu-context pair debug-menu-node)) +(define-extern debug-menu-item-send-msg (function debug-menu-item debug-menu-msg debug-menu-item)) +(define-extern debug-menu-send-msg (function debug-menu debug-menu-msg symbol debug-menu)) + ;; DECOMP BEGINS +;; this file is debug only +(declare-file (debug)) + +(deftype debug-menu-context (basic) + ((is-active symbol) + (sel-length int32) + (sel-menu debug-menu 8) + (root-menu debug-menu) + (joypad-func (function basic int none)) + (joypad-item debug-menu-item) + (font font-context) + (is-hidden symbol) + (joypad-number int32) + ) + (:methods + (new (symbol type) _type_) + ) + ) + + +(defmethod new debug-menu-context ((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 is-active) #f) + (set! (-> gp-0 is-hidden) #f) + (set! (-> gp-0 sel-length) 0) + (set! (-> gp-0 root-menu) #f) + (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)) + ) + (set! (-> gp-0 joypad-number) 0) + gp-0 + ) + ) + +(deftype debug-menu-node (basic) + ((name string) + (parent debug-menu) + (refresh-delay int32) + (refresh-ctr int32) + ) + ) + + +(defmethod print ((this debug-menu-node)) + (format #t "#<~A ~A @ #x~X>" (-> this type) (-> this name) this) + this + ) + +(deftype debug-menu (debug-menu-node) + ((context debug-menu-context) + (selected-item debug-menu-item) + (pix-width int32) + (pix-height int32) + (items pair) + ) + (:methods + (new (symbol type debug-menu-context string) _type_) + ) + ) + + +(defmethod new debug-menu ((allocation symbol) (type-to-make type) (arg0 debug-menu-context) (arg1 string)) + (let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> v0-0 context) arg0) + (set! (-> v0-0 name) arg1) + (set! (-> v0-0 parent) #f) + (set! (-> v0-0 selected-item) #f) + (set! (-> v0-0 items) '()) + v0-0 + ) + ) + +(deftype debug-menu-item (debug-menu-node) + ((id int32) + ) + ) + + +(deftype debug-menu-item-submenu (debug-menu-item) + ((submenu debug-menu) + ) + (:methods + (new (symbol type string debug-menu) _type_) + ) + ) + + +(defmethod new debug-menu-item-submenu ((allocation symbol) (type-to-make type) (arg0 string) (arg1 debug-menu)) + (let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> v0-0 name) arg0) + (set! (-> v0-0 parent) #f) + (set! (-> v0-0 refresh-delay) 0) + (set! (-> v0-0 refresh-ctr) (-> v0-0 refresh-delay)) + (set! (-> v0-0 submenu) arg1) + (set! (-> v0-0 submenu parent) (the-as debug-menu v0-0)) + v0-0 + ) + ) + +(deftype debug-menu-item-function (debug-menu-item) + ((activate-func (function object object)) + (hilite-timer int8) + ) + (:methods + (new (symbol type string object (function object object)) _type_) + ) + ) + + +(defmethod new debug-menu-item-function ((allocation symbol) (type-to-make type) (arg0 string) (arg1 object) (arg2 (function object object))) + (let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> v0-0 name) arg0) + (set! (-> v0-0 parent) #f) + (set! (-> v0-0 refresh-delay) 0) + (set! (-> v0-0 refresh-ctr) (-> v0-0 refresh-delay)) + (set! (-> v0-0 id) (the-as int arg1)) + (set! (-> v0-0 activate-func) arg2) + (set! (-> v0-0 hilite-timer) 0) + v0-0 + ) + ) + +(deftype debug-menu-item-flag (debug-menu-item) + ((activate-func (function object debug-menu-msg object)) + (is-on symbol) + ) + (:methods + (new (symbol type string object (function object debug-menu-msg object)) _type_) + ) + ) + + +(defmethod new debug-menu-item-flag ((allocation symbol) + (type-to-make type) + (arg0 string) + (arg1 object) + (arg2 (function object debug-menu-msg object)) + ) + (let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> v0-0 name) arg0) + (set! (-> v0-0 parent) #f) + (set! (-> v0-0 refresh-delay) 23) + (set! (-> v0-0 refresh-ctr) (-> v0-0 refresh-delay)) + (set! (-> v0-0 id) (the-as int arg1)) + (set! (-> v0-0 activate-func) arg2) + (set! (-> v0-0 is-on) #f) + v0-0 + ) + ) + +(deftype debug-menu-item-var (debug-menu-item) + ((display-str string) + (grabbed-joypad-p symbol) + (float-p symbol) + (range-p symbol) + (show-len int32) + (inc-delay int32) + (inc-delay-ctr int32) + (step-delay-ctr int32) + (inc-dir int32) + (fval float) + (fundo-val float) + (frange-min float) + (frange-max float) + (fstart-inc float) + (fstep float) + (fprecision int32) + (factivate-func (function int debug-menu-msg float float float)) + (ival int32 :overlay-at fval) + (iundo-val int32 :overlay-at fundo-val) + (irange-min int32 :overlay-at frange-min) + (irange-max int32 :overlay-at frange-max) + (istart-inc int32 :overlay-at fstart-inc) + (istep int32 :overlay-at fstep) + (ihex-p symbol) + (iactivate-func (function int debug-menu-msg int int int) :overlay-at factivate-func) + (ifloat-p symbol) + ) + (:methods + (new (symbol type string int int) _type_) + ) + ) + + +(defun debug-menu-item-var-update-display-str ((arg0 debug-menu-item-var)) + (cond + ((-> arg0 float-p) + (format (clear (-> arg0 display-str)) "~f" (-> arg0 fval)) + ) + ((-> arg0 ihex-p) + (format (clear (-> arg0 display-str)) "x~X" (-> arg0 fval)) + ) + ((-> arg0 ifloat-p) + (cond + ((and (< (the-as int (-> arg0 fval)) 0) (< -100 (the-as int (-> arg0 fval)))) + (let ((s5-2 format) + (a0-8 (clear (-> arg0 display-str))) + (a1-2 "-0.~1d") + (v1-8 (abs (the-as int (-> arg0 fval)))) + ) + (s5-2 a0-8 a1-2 (/ (mod v1-8 100) 10)) + ) + ) + (else + (let ((s5-3 format) + (a0-10 (clear (-> arg0 display-str))) + (a1-3 "~2d.~1d") + (a2-6 (/ (the-as int (-> arg0 fval)) 100)) + (v1-12 (abs (the-as int (-> arg0 fval)))) + ) + (s5-3 a0-10 a1-3 a2-6 (/ (mod v1-12 100) 10)) + ) + ) + ) + ) + (else + (format (clear (-> arg0 display-str)) "~D" (-> arg0 fval)) + ) + ) + arg0 + ) + +(defun debug-menu-item-var-make-int ((arg0 debug-menu-item-var) + (arg1 (function int debug-menu-msg int int int)) + (arg2 int) + (arg3 symbol) + (arg4 int) + (arg5 int) + (arg6 symbol) + ) + (set! (-> arg0 float-p) #f) + (set! (-> arg0 range-p) arg3) + (set! (-> arg0 frange-min) (the-as float arg4)) + (set! (-> arg0 frange-max) (the-as float arg5)) + (set! (-> arg0 fstart-inc) (the-as float arg2)) + (set! (-> arg0 fstep) (the-as float arg2)) + (set! (-> arg0 ihex-p) arg6) + (set! (-> arg0 factivate-func) (the-as (function int debug-menu-msg float float float) arg1)) + (cond + (arg3 + (set! (-> arg0 fval) (the-as float arg4)) + ) + (else + (set! (-> arg0 fval) 0.0) + 0 + ) + ) + (if arg1 + (set! (-> arg0 fval) + (the-as + float + (arg1 (-> arg0 id) (debug-menu-msg update) (the-as int (-> arg0 fval)) (the-as int (-> arg0 fval))) + ) + ) + ) + (debug-menu-item-var-update-display-str arg0) + arg0 + ) + +(defun debug-menu-item-var-make-float ((arg0 debug-menu-item-var) + (arg1 (function int debug-menu-msg float float float)) + (arg2 float) + (arg3 symbol) + (arg4 float) + (arg5 float) + (arg6 int) + ) + (set! (-> arg0 float-p) #t) + (set! (-> arg0 range-p) arg3) + (set! (-> arg0 frange-min) arg4) + (set! (-> arg0 frange-max) arg5) + (set! (-> arg0 fstart-inc) arg2) + (set! (-> arg0 fstep) arg2) + (set! (-> arg0 fprecision) arg6) + (set! (-> arg0 factivate-func) arg1) + (if arg3 + (set! (-> arg0 fval) arg4) + (set! (-> arg0 fval) 0.0) + ) + (if arg1 + (set! (-> arg0 fval) + (the float (the-as int (arg1 (-> arg0 id) (debug-menu-msg update) (-> arg0 fval) (-> arg0 fval)))) + ) + ) + (debug-menu-item-var-update-display-str arg0) + arg0 + ) + +(defmethod new debug-menu-item-var ((allocation symbol) (type-to-make type) (arg0 string) (arg1 int) (arg2 int)) + (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (let ((v1-2 (/ arg2 8))) + (set! (-> gp-0 name) arg0) + (set! (-> gp-0 parent) #f) + (set! (-> gp-0 refresh-delay) 31) + (set! (-> gp-0 refresh-ctr) (-> gp-0 refresh-delay)) + (set! (-> gp-0 id) arg1) + (set! v1-2 (cond + ((< 3 v1-2) + (empty) + v1-2 + ) + (else + 3 + ) + ) + ) + (set! (-> gp-0 show-len) v1-2) + ) + (set! (-> gp-0 grabbed-joypad-p) #f) + (set! (-> gp-0 ifloat-p) #f) + (set! (-> gp-0 display-str) (new 'debug 'string 64 (the-as string #f))) + (debug-menu-item-var-make-int gp-0 (the-as (function int debug-menu-msg int int int) #f) 1 #t 0 0 #f) + gp-0 + ) + ) + +(defun debug-menu-context-grab-joypad ((arg0 debug-menu-context) (arg1 basic) (arg2 (function basic int none))) + (cond + ((-> arg0 joypad-func) + #f + ) + (else + (set! (-> arg0 joypad-func) arg2) + (set! (-> arg0 joypad-item) (the-as debug-menu-item arg1)) + #t + ) + ) + ) + +(defun debug-menu-context-release-joypad ((arg0 debug-menu-context)) + (set! (-> arg0 joypad-func) #f) + (set! (-> arg0 joypad-item) #f) + #f + ) + +(defun debug-menu-item-get-max-width ((arg0 debug-menu-item) (arg1 debug-menu)) + (local-vars (v0-1 int)) + 0 + (cond + ((= (-> arg0 type) debug-menu-item-submenu) + (set! v0-1 + (+ (the int + (-> (get-string-length (-> (the-as debug-menu-item-submenu arg0) name) (-> arg1 context font)) length) + ) + 16 + ) + ) + ) + ((= (-> arg0 type) debug-menu-item-var) + (set! v0-1 + (the int + (-> (get-string-length (-> (the-as debug-menu-item-var arg0) display-str) (-> arg1 context font)) length) + ) + ) + ) + (else + (set! v0-1 (+ (the int (-> (get-string-length (-> arg0 name) (-> arg1 context font)) length)) 6)) + ) + ) + v0-1 + ) + +(defun debug-menu-context-default-selection ((arg0 debug-menu-context) (arg1 symbol)) + (when (or (zero? (-> arg0 sel-length)) (not arg1)) + (let ((s5-0 (-> arg0 root-menu))) + (when (and s5-0 (not (null? (-> s5-0 items)))) + (let ((s4-0 (-> arg0 is-active))) + (if s4-0 + (debug-menu-context-send-msg arg0 (debug-menu-msg deactivate) (debug-menu-dest activation)) + ) + (set! (-> arg0 sel-length) 1) + (set! (-> arg0 sel-menu 0) s5-0) + (set! (-> s5-0 selected-item) (the-as debug-menu-item (-> s5-0 items car))) + (if s4-0 + (debug-menu-context-send-msg arg0 (debug-menu-msg activate) (debug-menu-dest activation)) + ) + ) + ) + ) + ) + arg0 + ) + +(defun debug-menu-rebuild ((arg0 debug-menu)) + (let ((s4-0 0) + (s5-0 0) + ) + (let* ((s3-0 (-> arg0 items)) + (a0-1 (car s3-0)) + ) + (while (not (null? s3-0)) + (+! s5-0 1) + (set! (-> (the-as debug-menu-item a0-1) parent) arg0) + (set! s4-0 (max s4-0 (debug-menu-item-get-max-width (the-as debug-menu-item a0-1) arg0))) + (set! s3-0 (cdr s3-0)) + (set! a0-1 (car s3-0)) + ) + ) + (set! (-> arg0 pix-width) (+ s4-0 18)) + (set! (-> arg0 pix-height) (+ (* 15 s5-0) 10)) + ) + (let ((a0-2 (-> arg0 context))) + (debug-menu-context-default-selection a0-2 #t) + ) + arg0 + ) + +(defun debug-menu-context-set-root-menu ((arg0 debug-menu-context) (arg1 debug-menu)) + (let ((s4-0 (-> arg0 is-active))) + (if s4-0 + (debug-menu-context-send-msg arg0 (debug-menu-msg deactivate) (debug-menu-dest activation)) + ) + (set! (-> arg0 root-menu) arg1) + (debug-menu-context-default-selection arg0 #f) + (if s4-0 + (debug-menu-context-send-msg arg0 (debug-menu-msg activate) (debug-menu-dest activation)) + ) + ) + arg0 + ) + +(defun debug-menu-append-item ((arg0 debug-menu) (arg1 debug-menu-node)) + (let* ((gp-0 (-> arg0 context)) + (s4-0 (-> gp-0 is-active)) + ) + (if s4-0 + (debug-menu-context-send-msg gp-0 (debug-menu-msg deactivate) (debug-menu-dest activation)) + ) + (set! (-> arg1 parent) arg0) + (set! (-> arg0 items) (the-as pair (append! (-> arg0 items) (cons arg1 '())))) + (debug-menu-rebuild arg0) + (if s4-0 + (debug-menu-context-send-msg gp-0 (debug-menu-msg activate) (debug-menu-dest activation)) + ) + ) + arg1 + ) + +(defun debug-menu-remove-all-items ((arg0 debug-menu)) + (let* ((gp-0 (-> arg0 context)) + (s4-0 (-> gp-0 is-active)) + ) + (if s4-0 + (debug-menu-context-send-msg gp-0 (debug-menu-msg deactivate) (debug-menu-dest activation)) + ) + (set! (-> arg0 items) '()) + (set! (-> arg0 selected-item) #f) + (debug-menu-rebuild arg0) + (if s4-0 + (debug-menu-context-send-msg gp-0 (debug-menu-msg activate) (debug-menu-dest activation)) + ) + ) + arg0 + ) + +;; WARN: Return type mismatch object vs function. +(defun debug-menu-func-decode ((arg0 object)) + (let ((v1-2 (rtype-of arg0))) + (the-as function (cond + ((or (= v1-2 symbol) (= v1-2 type)) + (-> (the-as symbol arg0) value) + ) + ((= v1-2 function) + arg0 + ) + (else + nothing + ) + ) + ) + ) + ) + +;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +(defun debug-menu-make-from-template ((arg0 debug-menu-context) (arg1 pair)) + (local-vars + (s4-0 debug-menu-node) + (sv-16 object) + (sv-32 (function object int int)) + (sv-48 int) + (sv-64 (function object int int)) + (sv-80 (function object float float)) + (sv-96 float) + (sv-112 (function object float float)) + (sv-128 float) + (sv-144 (function object int int)) + ) + (when (or (not arg1) (null? arg1)) + (set! s4-0 (the-as debug-menu-node #f)) + (goto cfg-39) + ) + (let ((s5-0 (car arg1)) + (s4-1 (car (cdr arg1))) + ) + (cond + ((= s5-0 'menu) + (let ((s5-1 (new 'debug 'debug-menu arg0 (the-as string s4-1)))) + (set! s4-0 (new 'debug 'debug-menu-item-submenu (the-as string s4-1) s5-1)) + (let* ((gp-1 (cdr (cdr arg1))) + (a1-3 (car gp-1)) + ) + (while (not (null? gp-1)) + (let ((a1-4 (debug-menu-make-from-template arg0 (the-as pair a1-3)))) + (if a1-4 + (debug-menu-append-item s5-1 a1-4) + ) + ) + (set! gp-1 (cdr gp-1)) + (set! a1-3 (car gp-1)) + ) + ) + ) + ) + ((= s5-0 'main-menu) + (set! s4-0 (new 'debug 'debug-menu arg0 (the-as string s4-1))) + (let* ((gp-2 (cdr (cdr arg1))) + (a1-6 (car gp-2)) + ) + (while (not (null? gp-2)) + (let ((a1-7 (debug-menu-make-from-template arg0 (the-as pair a1-6)))) + (if a1-7 + (debug-menu-append-item (the-as debug-menu s4-0) a1-7) + ) + ) + (set! gp-2 (cdr gp-2)) + (set! a1-6 (car gp-2)) + ) + ) + (debug-menu-context-set-root-menu arg0 (the-as debug-menu s4-0)) + ) + (else + (set! s4-0 + (cond + ((= s5-0 'flag) + (new + 'debug + 'debug-menu-item-flag + (the-as string s4-1) + (car (cdr (cdr arg1))) + (the-as (function object debug-menu-msg object) (debug-menu-func-decode (car (cdr (cdr (cdr arg1)))))) + ) + ) + ((or (= s5-0 0) (= s5-0 'function)) + (new + 'debug + 'debug-menu-item-function + (the-as string s4-1) + (car (cdr (cdr arg1))) + (the-as (function object object) (debug-menu-func-decode (car (cdr (cdr (cdr arg1)))))) + ) + ) + ((= s5-0 'var) + (new + 'debug + 'debug-menu-item-var + (the-as string s4-1) + (the-as int (car (cdr (cdr arg1)))) + (the-as int (car (cdr (cdr (cdr arg1))))) + ) + ) + ((or (= s5-0 'int-var) (= s5-0 'int-var-gat1) (= s5-0 'hex-var)) + (set! s4-0 (new + 'debug + 'debug-menu-item-var + (the-as string s4-1) + (the-as int (car (cdr (cdr arg1)))) + (the-as int (ref arg1 4)) + ) + ) + (let ((s3-4 debug-menu-item-var-make-int) + (s2-3 (the-as debug-menu-item-var s4-0)) + (s1-3 (debug-menu-func-decode (car (cdr (cdr (cdr arg1)))))) + (s0-2 (command-get-int (ref arg1 5) 0)) + ) + (set! sv-16 (ref arg1 6)) + (set! sv-32 command-get-int) + (let ((a0-24 (ref arg1 7)) + (a1-18 0) + ) + (set! sv-48 (sv-32 a0-24 a1-18)) + ) + (set! sv-64 command-get-int) + (let* ((a0-26 (ref arg1 8)) + (a1-20 0) + (t1-0 (sv-64 a0-26 a1-20)) + (t2-0 (= s5-0 'hex-var)) + ) + (s3-4 s2-3 (the-as (function int debug-menu-msg int int int) s1-3) s0-2 (the-as symbol sv-16) sv-48 t1-0 t2-0) + ) + ) + s4-0 + ) + ((= s5-0 'float-var) + (set! s4-0 (new + 'debug + 'debug-menu-item-var + (the-as string s4-1) + (the-as int (car (cdr (cdr arg1)))) + (the-as int (ref arg1 4)) + ) + ) + (let ((s5-5 debug-menu-item-var-make-float) + (s3-6 (the-as debug-menu-item-var s4-0)) + (s2-5 (debug-menu-func-decode (car (cdr (cdr (cdr arg1)))))) + (s1-6 (command-get-float (ref arg1 5) 0.0)) + (s0-3 (ref arg1 6)) + ) + (set! sv-80 command-get-float) + (let ((a0-35 (ref arg1 7)) + (a1-28 0.0) + ) + (set! sv-96 (sv-80 a0-35 a1-28)) + ) + (set! sv-112 command-get-float) + (let ((a0-37 (ref arg1 8)) + (a1-30 0.0) + ) + (set! sv-128 (sv-112 a0-37 a1-30)) + ) + (set! sv-144 command-get-int) + (let* ((a0-39 (ref arg1 9)) + (a1-32 0) + (t2-1 (sv-144 a0-39 a1-32)) + ) + (s5-5 + s3-6 + (the-as (function int debug-menu-msg float float float) s2-5) + s1-6 + (the-as symbol s0-3) + sv-96 + sv-128 + t2-1 + ) + ) + ) + s4-0 + ) + (else + (the-as debug-menu-node #f) + ) + ) + ) + ) + ) + ) + (label cfg-39) + s4-0 + ) + +;; WARN: Return type mismatch object vs debug-menu. +(defun debug-menu-find-from-template ((arg0 debug-menu-context) (arg1 pair)) + (let ((s5-0 (the-as object (-> arg0 root-menu)))) + (while (begin (label cfg-12) (and s5-0 (type? s5-0 debug-menu) (not (null? arg1)))) + (let ((s3-0 (-> (the-as debug-menu s5-0) items)) + (s5-1 (car arg1)) + ) + (set! arg1 (cdr arg1)) + (let ((s4-0 (car s3-0))) + (while (not (null? s3-0)) + (when (string= (the-as string s5-1) (-> (the-as debug-menu-item s4-0) name)) + (if (type? s4-0 debug-menu-item-submenu) + (set! s5-0 (-> (the-as debug-menu-item-submenu s4-0) submenu)) + (set! s5-0 s4-0) + ) + (goto cfg-12) + ) + (set! s3-0 (cdr s3-0)) + (set! s4-0 (car s3-0)) + ) + ) + ) + (set! s5-0 #f) + (goto cfg-19) + ) + (label cfg-19) + (the-as debug-menu s5-0) + ) + ) + +(defun debug-menu-item-submenu-render ((arg0 debug-menu-item-submenu) (arg1 int) (arg2 int) (arg3 int) (arg4 symbol)) + (let ((s5-0 (-> arg0 parent context font))) + (let ((v1-2 s5-0) + (a0-1 arg2) + ) + (set! (-> v1-2 origin x) (the float arg1)) + (set! (-> v1-2 origin y) (the float a0-1)) + ) + (set! (-> s5-0 color) (cond + ((zero? arg3) + (font-color menu) + ) + (arg4 + (font-color menu-selected-parent) + ) + (else + (font-color menu-parent) + ) + ) + ) + (with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) debug-buf)) + (bucket-id debug-menu) + ) + (draw-string-adv (-> arg0 name) s3-0 s5-0) + (draw-string-adv "..." s3-0 s5-0) + ) + ) + arg0 + ) + +(defun debug-menu-item-function-render ((arg0 debug-menu-item-function) (arg1 int) (arg2 int) (arg3 int) (arg4 symbol)) + (let ((s5-0 (-> arg0 parent context font))) + (let ((v1-2 s5-0) + (a0-1 arg2) + ) + (set! (-> v1-2 origin x) (the float arg1)) + (set! (-> v1-2 origin y) (the float a0-1)) + ) + (set! (-> s5-0 color) (the-as font-color (cond + ((> (-> arg0 hilite-timer) 0) + (+! (-> arg0 hilite-timer) -1) + 10 + ) + ((< (-> arg0 hilite-timer) 0) + (+! (-> arg0 hilite-timer) 1) + 14 + ) + ((nonzero? arg3) + 13 + ) + (else + 12 + ) + ) + ) + ) + (with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) debug-buf)) + (bucket-id debug-menu) + ) + (set-context! *font-work* s5-0) + (draw-string (-> arg0 name) s3-0 s5-0) + ) + ) + arg0 + ) + +(defun debug-menu-item-flag-render ((arg0 debug-menu-item-flag) (arg1 int) (arg2 int) (arg3 int) (arg4 symbol)) + (let ((s5-0 (-> arg0 parent context font))) + (let ((v1-2 s5-0) + (a0-1 arg2) + ) + (set! (-> v1-2 origin x) (the float arg1)) + (set! (-> v1-2 origin y) (the float a0-1)) + ) + (set! (-> s5-0 color) (cond + ((= (-> arg0 is-on) 'invalid) + (font-color menu-invalid) + ) + ((-> arg0 is-on) + (if (zero? arg3) + (font-color menu-flag-on) + (font-color menu-flag-on-parent) + ) + ) + ((zero? arg3) + (font-color menu-flag-off) + ) + (else + (font-color menu-flag-off-parent) + ) + ) + ) + (with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) debug-buf)) + (bucket-id debug-menu) + ) + (set-context! *font-work* s5-0) + (draw-string (-> arg0 name) s3-0 s5-0) + ) + ) + arg0 + ) + +(defun debug-menu-item-var-render ((arg0 debug-menu-item-var) (arg1 int) (arg2 int) (arg3 int) (arg4 symbol)) + (let ((s5-0 (-> arg0 parent context font))) + (let ((v1-2 s5-0) + (a0-1 arg2) + ) + (set! (-> v1-2 origin x) (the float arg1)) + (set! (-> v1-2 origin y) (the float a0-1)) + ) + (set! (-> s5-0 color) (cond + ((zero? arg3) + (if (-> arg0 grabbed-joypad-p) + (font-color menu-selected) + (font-color menu) + ) + ) + (arg4 + (font-color menu-selected-parent) + ) + (else + (font-color menu-parent) + ) + ) + ) + (with-dma-buffer-add-bucket ((s1-0 (-> *display* frames (-> *display* on-screen) debug-buf)) + (bucket-id debug-menu) + ) + (draw-string-adv (-> arg0 name) s1-0 s5-0) + (draw-string-adv ":" s1-0 s5-0) + (cond + ((>= (-> arg0 show-len) (length (-> arg0 display-str))) + (set-context! *font-work* s5-0) + (draw-string (-> arg0 display-str) s1-0 s5-0) + ) + (else + (set-context! *font-work* s5-0) + (draw-string "..." s1-0 s5-0) + (set! arg4 (and (zero? arg3) arg4)) + (when arg4 + (let ((v1-18 s5-0) + (a1-7 20) + (a0-10 379) + ) + (set! (-> v1-18 origin x) (the float a1-7)) + (set! (-> v1-18 origin y) (the float a0-10)) + ) + (draw-string-adv (-> arg0 name) s1-0 s5-0) + (draw-string-adv ":" s1-0 s5-0) + (draw-string (-> arg0 display-str) s1-0 s5-0) + ) + ) + ) + ) + ) + arg0 + ) + +(defun debug-menu-item-render ((arg0 debug-menu-item) (arg1 int) (arg2 int) (arg3 int) (arg4 symbol)) + (when (> (-> arg0 refresh-delay) 0) + (+! (-> arg0 refresh-ctr) -1) + (when (<= (-> arg0 refresh-ctr) 0) + (set! (-> arg0 refresh-ctr) (-> arg0 refresh-delay)) + (debug-menu-item-send-msg arg0 (debug-menu-msg update)) + ) + ) + (cond + ((= (-> arg0 type) debug-menu-item-submenu) + (debug-menu-item-submenu-render (the-as debug-menu-item-submenu arg0) arg1 arg2 arg3 arg4) + ) + ((= (-> arg0 type) debug-menu-item-function) + (debug-menu-item-function-render (the-as debug-menu-item-function arg0) arg1 arg2 arg3 arg4) + ) + ((= (-> arg0 type) debug-menu-item-flag) + (debug-menu-item-flag-render (the-as debug-menu-item-flag arg0) arg1 arg2 arg3 arg4) + ) + ((= (-> arg0 type) debug-menu-item-var) + (debug-menu-item-var-render (the-as debug-menu-item-var arg0) arg1 arg2 arg3 arg4) + ) + (else + (format 0 "ERROR: Found unknown item type!~%") + ) + ) + arg0 + ) + +(defun debug-menu-render ((arg0 debug-menu) (arg1 int) (arg2 int) (arg3 debug-menu-node) (arg4 int)) + (local-vars (sv-16 dma-buffer) (sv-32 pointer)) + (let ((v1-0 0)) + (let* ((a0-1 (-> arg0 items)) + (a1-1 (car a0-1)) + ) + (while (not (null? a0-1)) + (if (= a1-1 arg3) + (goto cfg-7) + ) + (+! v1-0 1) + (set! a0-1 (cdr a0-1)) + (set! a1-1 (car a0-1)) + ) + ) + (label cfg-7) + (if (< 16 v1-0) + (set! arg2 (- arg2 (* 15 (+ v1-0 -16)))) + ) + ) + (with-dma-buffer-add-bucket ((s0-0 (-> *display* frames (-> *display* on-screen) debug-buf)) + (bucket-id debug-menu) + ) + (draw-sprite2d-xy + s0-0 + arg1 + arg2 + (-> arg0 pix-width) + (-> arg0 pix-height) + (new 'static 'rgba :a #x40) + #x3fffff + ) + ) + (let* ((s3-1 (+ arg1 3)) + (s2-1 (+ arg2 5)) + (s1-1 (-> arg0 items)) + (s0-1 (car s1-1)) + ) + (while (not (null? s1-1)) + (when (= s0-1 arg3) + (set! (-> arg0 context font color) (if (nonzero? arg4) + (font-color menu-parent) + (font-color menu) + ) + ) + (let ((v1-20 (-> arg0 context font)) + (a1-5 s3-1) + (a0-15 s2-1) + ) + (set! (-> v1-20 origin x) (the float a1-5)) + (set! (-> v1-20 origin y) (the float a0-15)) + ) + (set! sv-16 (-> *display* frames (-> *display* on-screen) debug-buf)) + (set! sv-32 (-> sv-16 base)) + (set-context! *font-work* (-> arg0 context font)) + (draw-string ">" sv-16 (-> arg0 context font)) + (let ((a3-3 (-> sv-16 base))) + (when (!= sv-32 a3-3) + (let ((v1-35 (the-as object (-> sv-16 base)))) + (set! (-> (the-as dma-packet v1-35) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-35) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-35) vif1) (new 'static 'vif-tag)) + (set! (-> sv-16 base) (&+ (the-as pointer v1-35) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id debug-menu) + sv-32 + (the-as (pointer dma-tag) a3-3) + ) + ) + ) + ) + (debug-menu-item-render (the-as debug-menu-item s0-1) (+ s3-1 12) s2-1 arg4 (= s0-1 arg3)) + (+! s2-1 15) + (set! s1-1 (cdr s1-1)) + (set! s0-1 (car s1-1)) + ) + ) + arg0 + ) + +(defun debug-menu-context-render ((arg0 debug-menu-context)) + (let ((s4-0 6)) + (dotimes (s5-0 (-> arg0 sel-length)) + (let ((s3-0 (-> arg0 sel-menu s5-0))) + (let ((a3-0 (-> s3-0 selected-item))) + (debug-menu-render s3-0 s4-0 52 a3-0 (+ (- -1 s5-0) (-> arg0 sel-length))) + ) + (set! s4-0 (+ s4-0 3 (-> s3-0 pix-width))) + ) + ) + ) + arg0 + ) + +(defun debug-menu-context-select-next-or-prev-item ((arg0 debug-menu-context) (arg1 int)) + (local-vars (v1-6 object)) + (let ((s5-0 (-> arg0 sel-menu (+ (-> arg0 sel-length) -1)))) + (let ((a2-0 (-> s5-0 selected-item)) + (a0-1 '()) + (v1-4 '()) + ) + (let ((a3-0 (-> s5-0 items))) + (while (not (null? a3-0)) + (when (= (car a3-0) a2-0) + (set! v1-4 a3-0) + (goto cfg-7) + ) + (set! a0-1 a3-0) + (set! a3-0 (cdr a3-0)) + ) + ) + (label cfg-7) + (when (null? v1-4) + (format 0 "ERROR: Couldn't find selected item in menu.~%") + (set! arg0 arg0) + (goto cfg-19) + ) + (cond + ((>= arg1 0) + (if (null? (cdr v1-4)) + (set! v1-6 (car (-> s5-0 items))) + (set! v1-6 (car (cdr v1-4))) + ) + ) + ((null? a0-1) + (set! v1-6 (car (last (-> s5-0 items)))) + ) + (else + (set! v1-6 (car a0-1)) + ) + ) + ) + (set! (-> s5-0 selected-item) (the-as debug-menu-item v1-6)) + ) + (label cfg-19) + arg0 + ) + +(defun debug-menu-context-select-new-item ((arg0 debug-menu-context) (arg1 int)) + (let* ((a2-0 (-> arg0 sel-menu (+ (-> arg0 sel-length) -1))) + (a1-1 (-> a2-0 selected-item)) + (a0-1 0) + (v1-4 -1) + ) + (let ((a2-1 (-> a2-0 items))) + (while (not (null? a2-1)) + (if (= (car a2-1) a1-1) + (set! v1-4 a0-1) + ) + (set! a2-1 (cdr a2-1)) + (+! a0-1 1) + ) + ) + (when (= v1-4 -1) + (format 0 "ERROR: Couldn't find selected item in menu.~%") + (set! arg0 arg0) + (goto cfg-25) + ) + (cond + ((>= arg1 0) + (cond + ((= v1-4 (+ a0-1 -1)) + (set! arg1 1) + ) + ((>= (+ v1-4 arg1) a0-1) + (set! arg1 (+ (- -1 v1-4) a0-1)) + ) + ) + (dotimes (s4-0 arg1) + (debug-menu-context-select-next-or-prev-item arg0 1) + ) + ) + (else + (cond + ((zero? v1-4) + (set! arg1 -1) + ) + ((< (+ v1-4 arg1) 0) + (set! arg1 (- v1-4)) + ) + ) + (dotimes (s4-1 (- arg1)) + (debug-menu-context-select-next-or-prev-item arg0 -1) + ) + ) + ) + ) + (label cfg-25) + arg0 + ) + +(defun debug-menu-context-open-submenu ((arg0 debug-menu-context) (arg1 debug-menu)) + (let ((v1-0 (-> arg0 sel-length))) + (when (>= v1-0 8) + (format 0 "ERROR: Trying to exceed maximum menu depth!") + (return arg1) + ) + (when (null? (-> arg1 items)) + (format 0 "ERROR: Submenu has no items!") + (return arg1) + ) + (set! (-> arg0 sel-menu v1-0) arg1) + (if (not (-> arg1 selected-item)) + (set! (-> arg1 selected-item) (the-as debug-menu-item (-> arg1 items car))) + ) + (set! (-> arg0 sel-length) (+ v1-0 1)) + ) + (debug-menu-context-send-msg arg0 (debug-menu-msg activate) (debug-menu-dest current-selection)) + ) + +(defun debug-menu-context-close-submenu ((arg0 debug-menu-context)) + (debug-menu-context-send-msg arg0 (debug-menu-msg deactivate) (debug-menu-dest current-selection)) + (if (< 1 (-> arg0 sel-length)) + (+! (-> arg0 sel-length) -1) + ) + arg0 + ) + +(defun debug-menu-item-submenu-msg ((arg0 debug-menu-item-submenu) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (let ((a0-1 (-> arg0 parent context))) + (debug-menu-context-open-submenu a0-1 (-> arg0 submenu)) + ) + ) + arg0 + ) + +(defun debug-menu-item-function-msg ((arg0 debug-menu-item-function) (arg1 debug-menu-msg)) + (cond + ((= arg1 (debug-menu-msg press)) + (cond + ((-> arg0 activate-func) + (if ((-> arg0 activate-func) (-> arg0 id)) + (set! (-> arg0 hilite-timer) 6) + (set! (-> arg0 hilite-timer) -6) + ) + ) + (else + (set! (-> arg0 hilite-timer) -6) + ) + ) + ) + ((= arg1 (debug-menu-msg deactivate)) + (set! (-> arg0 hilite-timer) 0) + 0 + ) + ) + arg0 + ) + +(defun debug-menu-item-flag-msg ((arg0 debug-menu-item-flag) (arg1 debug-menu-msg)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (-> arg0 activate-func) + (set! (-> arg0 is-on) (the-as symbol ((-> arg0 activate-func) (-> arg0 id) (debug-menu-msg press)))) + ) + (let ((a0-2 (-> arg0 parent context))) + (debug-menu-context-send-msg a0-2 (debug-menu-msg update) (debug-menu-dest open-menus)) + ) + ) + ((or (= arg1 (debug-menu-msg update)) (= arg1 (debug-menu-msg activate))) + (if (-> arg0 activate-func) + (set! (-> arg0 is-on) (the-as symbol ((-> arg0 activate-func) (-> arg0 id) (debug-menu-msg update)))) + ) + (set! (-> arg0 refresh-ctr) (-> arg0 refresh-delay)) + ) + ) + arg0 + ) + +(defun debug-menu-item-var-joypad-handler ((arg0 debug-menu-item-var) (arg1 int)) + (cond + ((not (cpad-hold? arg1 x)) + (let ((a0-2 (-> arg0 parent context))) + (debug-menu-context-release-joypad a0-2) + ) + (set! (-> arg0 grabbed-joypad-p) #f) + (when (cpad-pressed? arg1 square) + (cond + ((-> arg0 float-p) + (if (-> arg0 factivate-func) + (set! (-> arg0 fval) + ((-> arg0 factivate-func) (-> arg0 id) (debug-menu-msg press) (-> arg0 fundo-val) (-> arg0 fval)) + ) + ) + ) + (else + (if (-> arg0 factivate-func) + (set! (-> arg0 fval) + ((-> arg0 factivate-func) (-> arg0 id) (debug-menu-msg press) (-> arg0 fundo-val) (-> arg0 fval)) + ) + ) + ) + ) + (debug-menu-item-var-update-display-str arg0) + ) + (let ((a0-7 (-> arg0 parent context))) + (debug-menu-context-send-msg a0-7 (debug-menu-msg update) (debug-menu-dest open-menus)) + ) + ) + ((or (cpad-hold? arg1 right) (cpad-hold? arg1 left) (cpad-hold? arg1 down) (cpad-hold? arg1 up)) + (let ((v1-45 (cond + ((cpad-hold? arg1 right) + 10 + ) + ((cpad-hold? arg1 up) + 1 + ) + ((cpad-hold? arg1 down) + -1 + ) + (else + -10 + ) + ) + ) + ) + (when (!= v1-45 (-> arg0 inc-dir)) + (set! (-> arg0 inc-dir) v1-45) + (set! (-> arg0 inc-delay) 15) + (set! (-> arg0 inc-delay-ctr) 0) + (set! (-> arg0 step-delay-ctr) 30) + (set! (-> arg0 fstep) (-> arg0 fstart-inc)) + (set! (-> arg0 fstep) (-> arg0 fstart-inc)) + ) + ) + (cond + ((<= (-> arg0 inc-delay-ctr) 0) + (if (> (-> arg0 inc-delay) 0) + (+! (-> arg0 inc-delay) -1) + ) + (when (zero? (-> arg0 inc-delay)) + (cond + ((<= (-> arg0 step-delay-ctr) 0) + (set! (-> arg0 step-delay-ctr) 30) + (cond + ((-> arg0 float-p) + (if (< (-> arg0 fstep) 10000000.0) + (set! (-> arg0 fstep) (* 2.0 (-> arg0 fstep))) + ) + ) + (else + (if (< (the-as int (-> arg0 fstep)) #x989680) + (set! (-> arg0 fstep) (the-as float (* (-> arg0 fstep) 2))) + ) + ) + ) + ) + (else + (+! (-> arg0 step-delay-ctr) -1) + ) + ) + ) + (set! (-> arg0 inc-delay-ctr) (-> arg0 inc-delay)) + (cond + ((-> arg0 float-p) + (when (-> arg0 factivate-func) + (let ((f0-8 (+ (-> arg0 fval) (* (the float (-> arg0 inc-dir)) (-> arg0 fstep))))) + (if (-> arg0 range-p) + (set! f0-8 (fmin (fmax f0-8 (-> arg0 frange-min)) (-> arg0 frange-max))) + ) + (set! (-> arg0 fval) ((-> arg0 factivate-func) (-> arg0 id) (debug-menu-msg press) f0-8 (-> arg0 fval))) + ) + ) + ) + (else + (when (-> arg0 factivate-func) + (let ((a2-4 (+ (the-as int (-> arg0 fval)) (* (-> arg0 inc-dir) (the-as int (-> arg0 fstep)))))) + (if (-> arg0 range-p) + (set! a2-4 (min (max a2-4 (the-as int (-> arg0 frange-min))) (the-as int (-> arg0 frange-max)))) + ) + (set! (-> arg0 fval) + ((-> arg0 factivate-func) (-> arg0 id) (debug-menu-msg press) (the-as float a2-4) (-> arg0 fval)) + ) + ) + ) + ) + ) + (debug-menu-item-var-update-display-str arg0) + (let ((a0-29 (-> arg0 parent context))) + (debug-menu-context-send-msg a0-29 (debug-menu-msg update) (debug-menu-dest current-selection)) + ) + ) + (else + (+! (-> arg0 inc-delay-ctr) -1) + ) + ) + ) + (else + (set! (-> arg0 inc-dir) 0) + 0 + ) + ) + arg0 + ) + +(defun debug-menu-item-var-msg ((arg0 debug-menu-item-var) (arg1 debug-menu-msg)) + (cond + ((= arg1 (debug-menu-msg deactivate)) + (when (-> arg0 grabbed-joypad-p) + (let ((a0-1 (-> arg0 parent context))) + (debug-menu-context-release-joypad a0-1) + ) + (set! (-> arg0 grabbed-joypad-p) #f) + ) + ) + ((= arg1 (debug-menu-msg press)) + (when (not (-> arg0 grabbed-joypad-p)) + (let ((a0-2 (-> arg0 parent context))) + (when (debug-menu-context-grab-joypad + a0-2 + arg0 + (the-as (function basic int none) debug-menu-item-var-joypad-handler) + ) + (set! (-> arg0 grabbed-joypad-p) #t) + (set! (-> arg0 fundo-val) (-> arg0 fval)) + (set! (-> arg0 fundo-val) (-> arg0 fval)) + (set! (-> arg0 inc-dir) 0) + 0 + ) + ) + ) + ) + ((or (= arg1 (debug-menu-msg update)) (= arg1 (debug-menu-msg activate))) + (cond + ((-> arg0 float-p) + (if (-> arg0 factivate-func) + (set! (-> arg0 fval) + ((-> arg0 factivate-func) (-> arg0 id) (debug-menu-msg update) (-> arg0 fval) (-> arg0 fval)) + ) + ) + ) + (else + (if (-> arg0 factivate-func) + (set! (-> arg0 fval) + ((-> arg0 factivate-func) (-> arg0 id) (debug-menu-msg update) (-> arg0 fval) (-> arg0 fval)) + ) + ) + ) + ) + (debug-menu-item-var-update-display-str arg0) + (set! (-> arg0 refresh-ctr) (-> arg0 refresh-delay)) + ) + ) + arg0 + ) + +(defun debug-menu-item-send-msg ((arg0 debug-menu-item) (arg1 debug-menu-msg)) + (cond + ((= (-> arg0 type) debug-menu-item-submenu) + (debug-menu-item-submenu-msg (the-as debug-menu-item-submenu arg0) arg1) + ) + ((= (-> arg0 type) debug-menu-item-function) + (debug-menu-item-function-msg (the-as debug-menu-item-function arg0) arg1) + ) + ((= (-> arg0 type) debug-menu-item-flag) + (debug-menu-item-flag-msg (the-as debug-menu-item-flag arg0) arg1) + ) + ((= (-> arg0 type) debug-menu-item-var) + (debug-menu-item-var-msg (the-as debug-menu-item-var arg0) arg1) + ) + (else + (format 0 "ERROR: Found unknown item type!~%") + ) + ) + arg0 + ) + +(defun debug-menu-send-msg ((arg0 debug-menu) (arg1 debug-menu-msg) (arg2 symbol)) + (let* ((s3-0 (-> arg0 items)) + (s2-0 (car s3-0)) + ) + (while (not (null? s3-0)) + (debug-menu-item-send-msg (the-as debug-menu-item s2-0) arg1) + (if (and arg2 (= (-> (the-as debug-menu-item s2-0) type) debug-menu-item-submenu)) + (debug-menu-send-msg (-> (the-as debug-menu-item-submenu s2-0) submenu) arg1 #t) + ) + (set! s3-0 (cdr s3-0)) + (set! s2-0 (car s3-0)) + ) + ) + arg0 + ) + +(defun debug-menu-context-send-msg ((arg0 debug-menu-context) (arg1 debug-menu-msg) (arg2 debug-menu-dest)) + (cond + ((= arg2 (debug-menu-dest root)) + (debug-menu-send-msg (-> arg0 root-menu) arg1 #t) + ) + ((= arg2 (debug-menu-dest open-menus)) + (when (-> arg0 is-active) + (dotimes (s4-0 (-> arg0 sel-length)) + (let ((a0-2 (-> arg0 sel-menu s4-0))) + (debug-menu-send-msg a0-2 arg1 #f) + ) + ) + ) + ) + ((= arg2 (debug-menu-dest current-selection)) + (when (-> arg0 is-active) + (if (nonzero? (-> arg0 sel-length)) + (debug-menu-send-msg (-> arg0 sel-menu (+ (-> arg0 sel-length) -1)) arg1 #f) + ) + ) + ) + ((= arg2 (debug-menu-dest activation)) + (cond + ((= arg1 (debug-menu-msg activate)) + (when (not (-> arg0 is-active)) + (set! (-> arg0 is-active) #t) + (debug-menu-context-send-msg arg0 (debug-menu-msg activate) (debug-menu-dest open-menus)) + ) + ) + ((= arg1 (debug-menu-msg deactivate)) + (when (-> arg0 is-active) + (debug-menu-context-send-msg arg0 (debug-menu-msg deactivate) (debug-menu-dest open-menus)) + (set! (-> arg0 is-active) #f) + ) + ) + ) + ) + ) + arg0 + ) + +(defun debug-menu-context-activate-selection ((arg0 debug-menu-context)) + (let ((a0-1 (-> arg0 sel-menu (+ (-> arg0 sel-length) -1) selected-item))) + (debug-menu-item-send-msg a0-1 (debug-menu-msg press)) + ) + arg0 + ) + +(defun debug-menus-default-joypad-func ((arg0 debug-menu-context)) + (cond + ((cpad-pressed? (-> arg0 joypad-number) square) + (cond + ((< 1 (-> arg0 sel-length)) + (debug-menu-context-close-submenu arg0) + ) + (else + ) + ) + ) + ((cpad-pressed? (-> arg0 joypad-number) x) + (debug-menu-context-activate-selection arg0) + ) + ((cpad-pressed? (-> arg0 joypad-number) up) + (debug-menu-context-select-new-item arg0 -1) + ) + ((cpad-pressed? (-> arg0 joypad-number) down) + (debug-menu-context-select-new-item arg0 1) + ) + ((cpad-pressed? (-> arg0 joypad-number) left) + (debug-menu-context-select-new-item arg0 -5) + ) + ((cpad-pressed? (-> arg0 joypad-number) right) + (debug-menu-context-select-new-item arg0 5) + ) + ) + arg0 + ) + +(defun debug-menus-active ((arg0 debug-menu-context)) + (when (not (-> arg0 is-hidden)) + (if (-> arg0 joypad-func) + ((-> arg0 joypad-func) (-> arg0 joypad-item) (-> arg0 joypad-number)) + (debug-menus-default-joypad-func arg0) + ) + (debug-menu-context-render arg0) + ) + arg0 + ) + +(defun debug-menus-handler ((arg0 debug-menu-context)) + (if (-> arg0 is-active) + (debug-menus-active arg0) + ) + arg0 + ) diff --git a/goal_src/jak3/engine/debug/nav-mesh-editor-h.gc b/goal_src/jak3/engine/debug/nav-mesh-editor-h.gc index 13b5c92ce5..8e8361a1c2 100644 --- a/goal_src/jak3/engine/debug/nav-mesh-editor-h.gc +++ b/goal_src/jak3/engine/debug/nav-mesh-editor-h.gc @@ -5,5 +5,204 @@ ;; name in dgo: nav-mesh-editor-h ;; dgos: GAME +(define-extern nav-mesh-editor-init (function none)) + ;; DECOMP BEGINS +;; this file is debug only +(declare-file (debug)) + +(deftype vector-array (inline-array-class) + ((data vector :inline :dynamic) + ) + ) + + +(set! (-> vector-array heap-base) (the-as uint 16)) + +(deftype int16-array (inline-array-class) + ((data int16 :dynamic) + ) + ) + + +(set! (-> int16-array heap-base) (the-as uint 2)) + +(deftype nav-mesh-poly (structure) + ((poly-id uint32) + (flags uint32) + (index basic) + (insert-pos uint32) + ) + (:methods + (new (symbol type) _type_) + (nav-mesh-poly-method-9 () none) + (nav-mesh-poly-method-10 () none) + (nav-mesh-poly-method-11 () none) + (nav-mesh-poly-method-12 () none) + (nav-mesh-poly-method-13 () none) + (nav-mesh-poly-method-14 () none) + ) + ) + + +(deftype nav-mesh-poly-array (inline-array-class) + ((data nav-mesh-poly :inline :dynamic) + ) + ) + +(set! (-> nav-mesh-poly-array heap-base) (the-as uint 16)) + +;; WARN: Return type mismatch object vs nav-mesh-poly. +(defmethod new nav-mesh-poly ((allocation symbol) (type-to-make type)) + (let ((t9-0 (method-of-type structure new)) + (v1-1 type-to-make) + ) + (-> type-to-make size) + (let ((gp-0 (the-as object (t9-0 allocation v1-1)))) + (when (zero? (the-as structure gp-0)) + (set! gp-0 0) + (goto cfg-4) + ) + ((method-of-type nav-mesh-poly nav-mesh-poly-method-9)) + (label cfg-4) + (the-as nav-mesh-poly gp-0) + ) + ) + ) + +(deftype nav-mesh-tri-quad (structure) + ((indices int32 4) + (poly uint32) + ) + ) + + +(deftype nav-mesh-tri-quad-array (inline-array-class) + ((data nav-mesh-tri-quad :inline :dynamic) + ) + ) + + +(set! (-> nav-mesh-tri-quad-array heap-base) (the-as uint 32)) + +(deftype nav-mesh-editable (structure) + ((flags uint32) + (verts basic) + (tris basic) + (quads nav-mesh-tri-quad-array) + (navmesh-id uint32) + (idx uint32) + (level-name symbol) + (level-id uint32) + (polys nav-mesh-poly-array) + (selected-poly uint32) + ) + (:methods + (nav-mesh-editable-method-9 () none) + (nav-mesh-editable-method-10 () none) + (nav-mesh-editable-method-11 () none) + (nav-mesh-editable-method-12 () none) + (nav-mesh-editable-method-13 () none) + (nav-mesh-editable-method-14 () none) + (nav-mesh-editable-method-15 () none) + (nav-mesh-editable-method-16 () none) + (nav-mesh-editable-method-17 () none) + (nav-mesh-editable-method-18 () none) + ) + ) + + +(deftype nav-mesh-editable-array (inline-array-class) + ((data nav-mesh-editable :inline :dynamic) + ) + ) + + +(set! (-> nav-mesh-editable-array heap-base) (the-as uint 48)) + +(deftype nav-mesh-editor-undo (structure) + ((current-nav-mesh nav-mesh-editable) + (selected-poly uint32) + (index basic) + (insert-pos uint32) + (verts basic) + ) + (:methods + (new (symbol type) _type_) + (nav-mesh-editor-undo-method-9 () none) + ) + ) + + +(deftype nav-mesh-editor-undo-array (inline-array-class) + ((data nav-mesh-editor-undo :inline :dynamic) + ) + ) + + +(set! (-> nav-mesh-editor-undo-array heap-base) (the-as uint 32)) + +;; WARN: Return type mismatch object vs nav-mesh-editor-undo. +(defmethod new nav-mesh-editor-undo ((allocation symbol) (type-to-make type)) + (let ((t9-0 (method-of-type structure new)) + (v1-1 type-to-make) + ) + (-> type-to-make size) + (let ((gp-0 (the-as object (t9-0 allocation v1-1)))) + (when (zero? (the-as structure gp-0)) + (set! gp-0 0) + (goto cfg-4) + ) + ((method-of-type nav-mesh-editor-undo nav-mesh-editor-undo-method-9)) + (label cfg-4) + (the-as nav-mesh-editor-undo gp-0) + ) + ) + ) + +(deftype nav-mesh-editor (process-drawable) + ((close-menu-time uint64) + (external-cam-mode basic) + (mouse-pressed uint64) + (mouse-screen-pos vector :inline) + (mouse-pos vector :inline) + (mouse-end vector :inline) + (mouse-hit vector :inline) + (mouse-hit-pick vector :inline) + (mouse-snap vector :inline) + (mouse-normal vector :inline) + (mouse-collide basic) + (mouse-tumble-dist float) + (mouse-tumble vector :inline) + (manipulator-pos vector :inline) + (manipulator-back-pos vector :inline) + (lock-action basic) + (mouse-action uint32) + (mouse-action-pos-ref vector :inline) + (nav-meshes basic) + (current-nav-mesh nav-mesh-editable) + (manipulator manipulator :inline) + (level-name basic) + (level-id uint32) + (undo-min uint32) + (undo-id uint32) + (undo-max uint32) + (undos basic) + (hide-unselected basic) + (allow-snap basic) + ) + (:methods + (nav-mesh-editor-method-20 () none) + (nav-mesh-editor-method-21 () none) + (nav-mesh-editor-method-22 () none) + (nav-mesh-editor-method-23 () none) + (nav-mesh-editor-method-24 () none) + (nav-mesh-editor-method-25 () none) + (nav-mesh-editor-method-26 () none) + (nav-mesh-editor-method-27 () none) + ) + ) + + +(define *nav-mesh-editor* (the-as nav-mesh-editor #f)) diff --git a/goal_src/jak3/engine/debug/nav/mysql-nav-graph.gc b/goal_src/jak3/engine/debug/nav/mysql-nav-graph.gc index 68b6622717..476d4b990d 100644 --- a/goal_src/jak3/engine/debug/nav/mysql-nav-graph.gc +++ b/goal_src/jak3/engine/debug/nav/mysql-nav-graph.gc @@ -5,5 +5,217 @@ ;; name in dgo: mysql-nav-graph ;; dgos: GAME +;; +++nav-clock-type +(defenum nav-clock-type + "This string value is stored in their SQL database" + :type uint32 + :bitfield #f + (no-clock 0) + (clock2 1) + (clock3 2) + (clock4 3) + ) +;; ---nav-clock-type + + +;; +++nav-clock-mask +(defenum nav-clock-mask + "This string value is stored in their SQL database" + :type uint32 + :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-clock-mask + + +;; +++nav-directionality +(defenum nav-directionality + :type uint32 + :bitfield #f + (default 0) + (directed 1) + (bi_directional 2) + ) +;; ---nav-directionality + + +;; +++nav-node-flag +(defenum nav-node-flag + "This string value is stored in their SQL database" + :type uint32 + :bitfield #t + (visited 0) + (blocked 1) + (pedestrian 2) + (selected 3) + (hidden 4) + ) +;; ---nav-node-flag + + +;; +++mysql-save-flag +(defenum mysql-save-flag + :type uint32 + :bitfield #t + (delete 1) + (update 2) + (insert 3) + ) +;; ---mysql-save-flag + + +(declare-type mysql-nav-edge structure) + ;; DECOMP BEGINS +;; this file is debug only +(declare-file (debug)) + +(deftype mysql-nav-node (structure) + ((mysql-save-flag mysql-save-flag) + (runtime-id uint32) + (temp-edge-list (inline-array mysql-nav-edge)) + (level-node-index int32) + (cam-dist float) + (visible symbol) + (nav_node_id uint32) + (nav_graph_id uint32) + (position vector :inline) + (level_name symbol) + (angle float) + (radius float) + (nav_node_flag nav-node-flag) + (nav_mesh_id uint32) + (data_int_0 uint32) + (data_int_1 uint32) + ) + (:methods + (mysql-nav-node-method-9 () none) + (mysql-nav-node-method-10 () none) + ) + ) + + +(deftype mysql-nav-node-array (inline-array-class) + ((data mysql-nav-node :dynamic) + ) + ) + + +(set! (-> mysql-nav-node-array heap-base) (the-as uint 80)) + +(deftype mysql-nav-edge (structure) + ((mysql-save-flag mysql-save-flag) + (runtime-id uint32) + (runtime-node-id-1 int32) + (runtime-node-id-2 int32) + (temp-next-edge mysql-nav-edge) + (nav_edge_id uint32) + (nav_graph_id uint32) + (nav_node_id_1 uint32) + (nav_node_id_2 uint32) + (directionality nav-directionality) + (speed_limit float) + (density float) + (traffic_edge_flag int32) + (nav_clock_mask nav-clock-mask) + (nav_clock_type nav-clock-type) + (nav_territory_type uint32) + (exclusive_data uint32) + (width float) + (minimap_edge_flag int32) + ) + :allow-misaligned + (:methods + (mysql-nav-edge-method-9 () none) + ) + ) + + +(deftype mysql-nav-edge-array (inline-array-class) + ((data mysql-nav-edge :inline :dynamic) + ) + ) + + +(set! (-> mysql-nav-edge-array heap-base) (the-as uint 80)) + +(deftype mysql-nav-visnode (structure) + ((mysql-save-flag mysql-save-flag) + (runtime-node-id int32) + (runtime-edge-id int32) + (nav_visnode_id uint32) + (nav_graph_id uint32) + (nav_node_id uint32) + (nav_edge_id uint32) + ) + (:methods + (mysql-nav-visnode-method-9 () none) + ) + ) + + +(deftype mysql-nav-visnode-array (inline-array-class) + ((data mysql-nav-visnode :inline :dynamic) + ) + ) + + +(set! (-> mysql-nav-visnode-array heap-base) (the-as uint 32)) + +(deftype mysql-nav-pov-conn (structure) + ((runtime-node-id-1 int32) + (runtime-node-id-2 int32) + ) + ) + + +(deftype mysql-nav-graph-level-info (structure) + ((level symbol) + (level-id uint32) + (node-count int32) + (branch-count int32) + (to-link-count int32) + ) + :allow-misaligned + ) + + +(deftype mysql-nav-graph (basic) + ((nav_graph_id uint32) + (graph-type basic) + (node-array mysql-nav-node-array) + (edge-array mysql-nav-edge-array) + (visnode-array mysql-nav-visnode-array) + (pov-conn-array uint32) + (pov-conn-array-length int32) + (level-info-array-length int32) + (level-info-last-lookup int32) + (level-info-array mysql-nav-graph-level-info 32 :inline) + ) + (:methods + (new (symbol type) _type_) + (mysql-nav-graph-method-9 () none) + (mysql-nav-graph-method-10 () none) + (mysql-nav-graph-method-11 () none) + (mysql-nav-graph-method-12 () none) + (mysql-nav-graph-method-13 () none) + (mysql-nav-graph-method-14 () none) + (mysql-nav-graph-method-15 () none) + (mysql-nav-graph-method-16 () none) + (mysql-nav-graph-method-17 () none) + (mysql-nav-graph-method-18 () none) + (mysql-nav-graph-method-19 () none) + (mysql-nav-graph-method-20 () none) + (mysql-nav-graph-method-21 () none) + (mysql-nav-graph-method-22 () none) + (mysql-nav-graph-method-23 () none) + ) + ) diff --git a/goal_src/jak3/engine/debug/nav/nav-graph-editor.gc b/goal_src/jak3/engine/debug/nav/nav-graph-editor.gc index aa5ca9ad21..2bbcb6f3f0 100644 --- a/goal_src/jak3/engine/debug/nav/nav-graph-editor.gc +++ b/goal_src/jak3/engine/debug/nav/nav-graph-editor.gc @@ -5,5 +5,123 @@ ;; name in dgo: nav-graph-editor ;; dgos: GAME +(declare-type nav-graph-editor process) +(define-extern run-nav-graph-editor (function symbol (pointer process))) +(define-extern get-nav-graph-editor (function nav-graph-editor)) +(define-extern exit-nav-graph-editor (function none)) +(define-extern *nav-graph-editor* (pointer nav-graph-editor)) + ;; DECOMP BEGINS +;; this file is debug only +(declare-file (debug)) + +(deftype nav-graph-command (structure) + ((com-type uint32) + (id int32) + (index int32) + (move-vec vector :inline) + ) + ) + + +(deftype nav-graph-command-array (inline-array-class) + ((data nav-graph-command :inline :dynamic) + ) + ) + + +(set! (-> nav-graph-command-array heap-base) (the-as uint 32)) + +(deftype nav-graph-editor (process) + ((nav-graph mysql-nav-graph) + (mode symbol) + (command-id int32) + (max-command int32) + (selected-index int32) + (selected-dist float) + (selected-node-edge? symbol) + (closest-node int32) + (dist-closest-node float) + (closest-edge int32) + (dist-closest-edge float) + (mouse-pos vector :inline) + (mouse-hit vector :inline) + (mouse-hit-pick vector :inline) + (mouse-normal vector :inline) + (mouse-spos-hold vector :inline) + (edge-src int32) + (edge-dst int32) + (edge-visibility int32) + (vehicle-edit-mode symbol) + (hover-edit-mode symbol) + (plane-height float) + (plane-height-hold float) + (minimap-make-mode uint8) + (clipping-dist float) + (default-node mysql-nav-node :inline) + (default-edge mysql-nav-edge :inline) + (command-array nav-graph-command-array) + ) + (:state-methods + move-node + move-plane + create + edit-edge + create-edge + adjust-plane + adjust-it + adjust-minimap + adjust-node-angle + adjust-node-radius + adjust-edge-visibility + adjust-edge-width + adjust-edge-density + draw-closest-minimap + create-pov + ) + (:methods + (nav-graph-editor-method-29 () none) + (nav-graph-editor-method-30 () none) + (nav-graph-editor-method-31 () none) + (nav-graph-editor-method-32 () none) + (nav-graph-editor-method-33 () none) + (nav-graph-editor-method-34 () none) + (nav-graph-editor-method-35 () none) + (nav-graph-editor-method-36 () none) + (nav-graph-editor-method-37 () none) + (nav-graph-editor-method-38 () none) + (nav-graph-editor-method-39 () none) + (nav-graph-editor-method-40 () none) + (nav-graph-editor-method-41 () none) + (nav-graph-editor-method-42 () none) + (nav-graph-editor-method-43 () none) + (nav-graph-editor-method-44 () none) + (nav-graph-editor-method-45 () none) + (nav-graph-editor-method-46 () none) + (nav-graph-editor-method-47 () none) + (nav-graph-editor-method-48 () none) + (nav-graph-editor-method-49 () none) + (nav-graph-editor-method-50 () none) + (nav-graph-editor-method-51 () none) + (nav-graph-editor-method-52 () none) + (nav-graph-editor-method-53 () none) + (nav-graph-editor-method-54 () none) + (nav-graph-editor-method-55 () none) + (nav-graph-editor-method-56 () none) + (nav-graph-editor-method-57 () none) + (nav-graph-editor-method-58 () none) + (nav-graph-editor-method-59 () none) + (nav-graph-editor-method-60 () none) + (nav-graph-editor-method-61 () none) + (nav-graph-editor-method-62 () none) + (nav-graph-editor-method-63 () none) + (nav-graph-editor-method-64 () none) + (nav-graph-editor-method-65 () none) + (nav-graph-editor-method-66 () none) + (nav-graph-editor-method-67 () none) + ) + ) + + +(define *nav-graph-editor* (the-as (pointer nav-graph-editor) #f)) diff --git a/goal_src/jak3/engine/debug/part-tester.gc b/goal_src/jak3/engine/debug/part-tester.gc index bfc9465c25..c66b7ee290 100644 --- a/goal_src/jak3/engine/debug/part-tester.gc +++ b/goal_src/jak3/engine/debug/part-tester.gc @@ -5,5 +5,178 @@ ;; name in dgo: part-tester ;; dgos: GAME +(#when PC_PORT + (define *part-tester-id* 127) + ) + ;; DECOMP BEGINS +;; this file is debug only +(declare-file (debug)) + +(defpartgroup group-part-tester + :id 198 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 249)) + ) + +(defpartgroup group-debug-placeholder-small + :id 199 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 822 :flags (sp7))) + ) + +(defpart 822 + :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 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +(defpartgroup group-debug-placeholder-single + :id 200 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 823 :flags (sp7))) + ) + +(defpart 823 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +(defpartgroup group-debug-placeholder-multiple + :id 201 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 824 :flags (sp7))) + ) + +(defpart 824 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.01)) + (:timer (seconds 2)) + (:flags ()) + (:conerot-x (degrees -45) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(deftype part-tester (process) + ((root trsqv) + (part sparticle-launch-control) + (old-group sparticle-launch-group) + ) + (:states + part-tester-idle + ) + ) + + +(define *part-tester-name* (the-as string #f)) + +(defmethod deactivate ((this part-tester)) + "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 deactivate) this) + (none) + ) + +(defstate part-tester-idle (part-tester) + :code (behavior () + (until #f + (let ((gp-0 (entity-by-name *part-tester-name*))) + (when gp-0 + (let ((s5-0 (the-as process-drawable (-> gp-0 extra process)))) + (if (and s5-0 (type? s5-0 process-drawable) (nonzero? (-> s5-0 root))) + (set! (-> self root trans quad) (-> s5-0 root trans quad)) + (set! (-> self root trans quad) (-> gp-0 extra trans quad)) + ) + ) + ) + ) + (add-debug-x + #t + (bucket-id debug-no-zbuf1) + (-> self root trans) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + ) + (let ((gp-1 (-> *part-group-id-table* 198))) + (let ((s5-1 (-> self root trans))) + (when (!= gp-1 (-> self old-group)) + (when (nonzero? (-> self part)) + (kill-particles (-> self part)) + (set! (-> self heap-cur) (&-> (-> self part) type)) + ) + (set! (-> self part) (create-launch-control gp-1 self)) + ) + (if (nonzero? (-> self part)) + (spawn (-> self part) (cond + ((logtest? (-> gp-1 flags) (sp-group-flag sp2)) + *zero-vector* + ) + (else + (empty) + s5-1 + ) + ) + ) + ) + ) + (set! (-> self old-group) gp-1) + ) + (suspend) + ) + #f + ) + ) + +(define-extern *part-tester* (pointer part-tester)) + +;; WARN: Return type mismatch object vs none. +(defbehavior part-tester-init-by-other process-drawable ((arg0 vector)) + (+! (-> self clock ref-count) -1) + (+! (-> *display* part-clock ref-count) 1) + (set! (-> self clock) (-> *display* part-clock)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 quad)) + (set! *part-tester* (the-as (pointer part-tester) (process->ppointer self))) + (go part-tester-idle) + (none) + ) + +(define-perm *debug-part-dead-pool* dead-pool (new 'debug 'dead-pool 1 #x10000 "*debug-part-dead-pool*")) + +;; WARN: Return type mismatch (pointer process) vs none. +(defun start-part () + (kill-by-type part-tester *active-pool*) + (process-spawn part-tester (target-pos 0) :name "part-tester" :from *debug-part-dead-pool*) + (none) + ) diff --git a/goal_src/jak3/engine/dma/dma-buffer.gc b/goal_src/jak3/engine/dma/dma-buffer.gc index c8afef49f7..c428cf4983 100644 --- a/goal_src/jak3/engine/dma/dma-buffer.gc +++ b/goal_src/jak3/engine/dma/dma-buffer.gc @@ -297,7 +297,7 @@ (let ((,bucket-edge (the (pointer dma-tag) (-> ,buf base)))) ;; if nothing was added, skip the tag entirely. - (when (!= ,bucket-edge ,buf-start) + ;;(when (!= ,bucket-edge ,buf-start) (let ((,pkt (the-as dma-packet (-> ,buf base)))) (set! (-> ,pkt dma) (new 'static 'dma-tag :id (dma-tag-id next))) @@ -311,7 +311,7 @@ ,buf-start ;; the first thing in this chain, bucket will patch previous to this ,bucket-edge ;; end of this chain (ptr to next tag) ) - ) + ;; ) ) ) ) @@ -374,7 +374,8 @@ (base pointer) (end pointer) (real-buffer-end int32) - (data uint64 1 :offset 32) + (data-buffer uint8 :dynamic :overlay-at real-buffer-end) + (data uint64 1 :offset 32) ) (:methods (new (symbol type int) _type_) diff --git a/goal_src/jak3/engine/draw/draw-node.gc b/goal_src/jak3/engine/draw/draw-node.gc index bbe0d67d76..2a2e04c89d 100644 --- a/goal_src/jak3/engine/draw/draw-node.gc +++ b/goal_src/jak3/engine/draw/draw-node.gc @@ -5,5 +5,44 @@ ;; name in dgo: draw-node ;; dgos: GAME +(define-extern draw-node-cull (function pointer pointer (inline-array draw-node) int none)) + ;; DECOMP BEGINS +(defmethod collect-regions ((this draw-node) (arg0 sphere) (arg1 int) (arg2 region-prim-list)) + "Fill the region-prim-list with regions that intersect the sphere." + (dotimes (s2-0 arg1) + (if (spheres-overlap? arg0 (the-as sphere (-> this bsphere))) + (collect-regions (-> this child) arg0 (the-as int (-> this child-count)) arg2) + ) + (&+! this 32) + ) + 0 + (none) + ) + + +(defmethod mem-usage ((this drawable-inline-array-node) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 65 (-> usage length))) + (set! (-> usage data 64 name) "draw-node") + (+! (-> usage data 64 count) (-> this length)) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 64 used) v1-6) + (+! (-> usage data 64 total) (logand -16 (+ v1-6 15))) + ) + this + ) + +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this drawable-inline-array-node)) + (the-as int (+ (-> drawable-inline-array-node size) (* (+ (-> this length) -1) 32))) + ) + +(defmethod collect-regions ((this drawable-inline-array-node) (arg0 sphere) (arg1 int) (arg2 region-prim-list)) + "Fill the region-prim-list with regions that intersect the sphere." + (collect-regions (the-as draw-node (-> this data)) arg0 (-> this length) arg2) + 0 + (none) + ) + +;; ERROR: function was not converted to expressions. Cannot decompile. diff --git a/goal_src/jak3/engine/draw/drawable-group.gc b/goal_src/jak3/engine/draw/drawable-group.gc index 179caf5583..76124ebcbe 100644 --- a/goal_src/jak3/engine/draw/drawable-group.gc +++ b/goal_src/jak3/engine/draw/drawable-group.gc @@ -7,3 +7,98 @@ ;; DECOMP BEGINS +(defmethod new drawable-group ((allocation symbol) (type-to-make type) (arg0 int)) + (let ((v0-0 (object-new allocation type-to-make (the-as int (+ (-> type-to-make size) (* arg0 4)))))) + (set! (-> v0-0 length) arg0) + v0-0 + ) + ) + +(defmethod print ((this drawable-group)) + (format #t "#<~A @ #x~X [~D]" (-> this type) this (-> this length)) + (dotimes (s5-0 (-> this length)) + (format #t " ~A" (-> this data s5-0)) + ) + (format #t ">") + this + ) + +(defmethod length ((this drawable-group)) + (-> this length) + ) + +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this drawable-group)) + (the-as int (+ (-> drawable-group size) (* (-> this length) 4))) + ) + +(defmethod mem-usage ((this drawable-group) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 0 used) v1-6) + (+! (-> usage data 0 total) (logand -16 (+ v1-6 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this data s3-0) usage flags) + ) + this + ) + +(defmethod login ((this drawable-group)) + "Initialize the object after it is loaded." + (dotimes (s5-0 (-> this length)) + (login (-> this data s5-0)) + ) + this + ) + +(defmethod draw ((this drawable-group)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + (when (vis-cull (-> this id)) + (when (sphere-cull (-> this bsphere)) + (dotimes (s5-0 (-> this length)) + (draw (-> this data s5-0)) + ) + ) + ) + 0 + (none) + ) + +(defmethod collect-stats ((this drawable-group)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + (when (vis-cull (-> this id)) + (when (sphere-cull (-> this bsphere)) + (dotimes (s5-0 (-> this length)) + (collect-stats (-> this data s5-0)) + ) + ) + ) + 0 + (none) + ) + +(defmethod debug-draw ((this drawable-group)) + "Debug-draw a drawable and its children. Typically uses the debug-draw functions." + (when (vis-cull (-> this id)) + (when (sphere-cull (-> this bsphere)) + (dotimes (s5-0 (-> this length)) + (debug-draw (-> this data s5-0)) + ) + ) + ) + 0 + (none) + ) + +(defmethod unpack-vis ((this drawable-group) (arg0 (pointer int8)) (arg1 (pointer int8))) + (dotimes (s4-0 (-> this length)) + (set! arg1 (unpack-vis (-> this data s4-0) arg0 arg1)) + ) + arg1 + ) diff --git a/goal_src/jak3/engine/draw/drawable-h.gc b/goal_src/jak3/engine/draw/drawable-h.gc index b4846378d2..b8ebc2c281 100644 --- a/goal_src/jak3/engine/draw/drawable-h.gc +++ b/goal_src/jak3/engine/draw/drawable-h.gc @@ -7,8 +7,10 @@ (declare-type region-prim-list structure) +(define-extern sphere-cull "Is this sphere visible? Uses cached camera matrix registers, so use with care." (function vector symbol)) (define-extern sphere-in-view-frustum? (function sphere symbol)) (define-extern line-in-view-frustum? (function vector vector symbol)) +(define-extern vis-cull (function int symbol)) ;; DECOMP BEGINS @@ -25,8 +27,8 @@ control over memory layout for use with DMA." (:methods (login (_type_) _type_) (draw (_type_) none) - (drawable-method-11 () none) - (drawable-method-12 () none) + (drawable-method-11 (_type_) none) + (drawable-method-12 (_type_) none) (collect-stats (_type_) none) (debug-draw (_type_) none) (unpack-vis (_type_ (pointer int8) (pointer int8)) (pointer int8)) diff --git a/goal_src/jak3/engine/draw/drawable-inline-array.gc b/goal_src/jak3/engine/draw/drawable-inline-array.gc index 0720a85c9a..f24a0b9813 100644 --- a/goal_src/jak3/engine/draw/drawable-inline-array.gc +++ b/goal_src/jak3/engine/draw/drawable-inline-array.gc @@ -7,3 +7,32 @@ ;; DECOMP BEGINS +(defmethod length ((this drawable-inline-array)) + (-> this length) + ) + +(defmethod login ((this drawable-inline-array)) + "Initialize the object after it is loaded." + this + ) + +(defmethod draw ((this drawable-inline-array)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + 0 + (none) + ) + +(defmethod collect-stats ((this drawable-inline-array)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + 0 + (none) + ) + +(defmethod debug-draw ((this drawable-inline-array)) + "Debug-draw a drawable and its children. Typically uses the debug-draw functions." + 0 + (none) + ) diff --git a/goal_src/jak3/engine/draw/drawable-tree-h.gc b/goal_src/jak3/engine/draw/drawable-tree-h.gc index e109b3378b..3a7a77a41c 100644 --- a/goal_src/jak3/engine/draw/drawable-tree-h.gc +++ b/goal_src/jak3/engine/draw/drawable-tree-h.gc @@ -17,5 +17,6 @@ Generally, the object passed to a large renderer is a drawable-tree." (deftype drawable-tree-array (drawable-group) "Collection of drawable trees. This might have a tfrag tree, tie tree, etc." - () + ((trees drawable-tree :dynamic :offset 32) + ) ) diff --git a/goal_src/jak3/engine/draw/drawable-tree.gc b/goal_src/jak3/engine/draw/drawable-tree.gc index ba42cf7453..bf2fdc3b1b 100644 --- a/goal_src/jak3/engine/draw/drawable-tree.gc +++ b/goal_src/jak3/engine/draw/drawable-tree.gc @@ -7,3 +7,90 @@ ;; DECOMP BEGINS +(defmethod draw ((this drawable-tree-array)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + (case (-> *level* draw-level *draw-index* display?) + (('special #f) + ) + (else + (dotimes (s5-0 (-> this length)) + (draw (-> this trees s5-0)) + ) + ) + ) + 0 + (none) + ) + +(defmethod collect-stats ((this drawable-tree-array)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + (dotimes (s5-0 (-> this length)) + (collect-stats (-> this trees s5-0)) + ) + 0 + (none) + ) + +(defmethod debug-draw ((this drawable-tree-array)) + "Debug-draw a drawable and its children. Typically uses the debug-draw functions." + (dotimes (s5-0 (-> this length)) + (debug-draw (-> this trees s5-0)) + ) + 0 + (none) + ) + +(defmethod unpack-vis ((this drawable-tree) (arg0 (pointer int8)) (arg1 (pointer int8))) + (local-vars (t5-1 uint)) + (let* ((v1-0 (the-as drawable-inline-array-node (-> this data 0))) + (a3-1 (/ (-> v1-0 data 0 id) 8)) + (t0-0 (-> v1-0 length)) + (v1-1 (&+ arg0 a3-1)) + (a3-3 (/ (+ t0-0 7) 8)) + ) + (dotimes (t0-1 a3-3) + (let ((t1-0 (-> arg1 0))) + (set! arg1 (&-> arg1 1)) + (set! (-> v1-1 0) t1-0) + ) + (set! v1-1 (&-> v1-1 1)) + ) + ) + (let ((v1-5 (+ (-> this length) -1))) + (when (nonzero? v1-5) + (dotimes (a3-5 v1-5) + (let* ((t0-4 (-> this data a3-5)) + (t2-0 (the-as drawable-inline-array-node (-> this data (+ a3-5 1)))) + (t1-5 (/ (-> (the-as drawable-inline-array-node t0-4) data 0 id) 8)) + (t2-2 (/ (-> t2-0 data 0 id) 8)) + (t0-5 (-> (the-as drawable-inline-array-node t0-4) length)) + (t1-6 (&+ arg0 t1-5)) + (t2-3 (the-as object (&+ arg0 t2-2))) + ) + (loop + (let ((t3-0 (-> t1-6 0))) + (set! t1-6 (&-> t1-6 1)) + (let ((t4-0 128)) + (label cfg-7) + (b! (not (logtest? t3-0 t4-0)) cfg-9 :delay (set! t5-1 (the-as uint (-> arg1 0)))) + (set! arg1 (&-> arg1 1)) + (set! (-> (the-as (pointer int8) t2-3) 0) (the-as int t5-1)) + (label cfg-9) + (+! t0-5 -1) + (b! (zero? t0-5) cfg-12 :delay (shift-arith-right-32 t4-0 t4-0 1)) + (b! (nonzero? (the-as uint t4-0)) cfg-7 :delay (set! t2-3 (&-> (the-as (pointer int8) t2-3) 1))) + ) + ) + ) + ) + (label cfg-12) + (nop!) + 0 + ) + ) + ) + arg1 + ) diff --git a/goal_src/jak3/engine/draw/drawable.gc b/goal_src/jak3/engine/draw/drawable.gc index aa165ec06c..e3ec07f109 100644 --- a/goal_src/jak3/engine/draw/drawable.gc +++ b/goal_src/jak3/engine/draw/drawable.gc @@ -5,5 +5,2277 @@ ;; name in dgo: drawable ;; dgos: GAME +(defmacro spr-work () + `(the work-area *fake-scratchpad-data*)) + +(define-extern draw-vortex (function none)) ;; doesn't exist in jak 3!! + ;; DECOMP BEGINS +;; ERROR: Bad vector register dependency: vf16 +;; ERROR: Bad vector register dependency: vf17 +;; ERROR: Bad vector register dependency: vf18 +;; ERROR: Bad vector register dependency: vf19 +(defun sphere-cull ((arg0 vector)) + "Is this sphere visible? Uses cached camera matrix registers, so use with care." + (local-vars (v1-0 uint128) (v1-1 uint128) (v1-2 uint128)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf10 :class vf) + (vf16 :class vf) + (vf17 :class vf) + (vf18 :class vf) + (vf19 :class vf) + (vf9 :class vf) + ) + ;; og:preserve-this modified for PC: these register would be loaded by the draw method of bsp. + (let ((at-0 *math-camera*)) + (.lvf vf16 (&-> at-0 plane 0 quad)) + (.lvf vf17 (&-> at-0 plane 1 quad)) + (.lvf vf18 (&-> at-0 plane 2 quad)) + (.lvf vf19 (&-> at-0 plane 3 quad)) + ) + (init-vf0-vector) + (.lvf vf10 (&-> arg0 quad)) + (.mul.x.vf acc vf16 vf10) + (.add.mul.y.vf acc vf17 vf10 acc) + (.add.mul.z.vf acc vf18 vf10 acc) + (.sub.mul.w.vf vf9 vf19 vf0 acc) + (.add.w.vf vf9 vf9 vf10) + (.mov v1-0 vf9) + (.pcgtw v1-1 0 v1-0) + (.ppach v1-2 (the-as uint128 0) v1-1) + (zero? (the-as int v1-2)) + ) + ) + +;; ERROR: Bad vector register dependency: vf20 +;; ERROR: Bad vector register dependency: vf21 +;; ERROR: Bad vector register dependency: vf22 +;; ERROR: Bad vector register dependency: vf23 +(defun guard-band-cull ((arg0 vector)) + "Is this sphere within the guard band, and maybe needs clipping? Uses cached camera matrix registers, so use with care." + (local-vars (v1-0 uint128) (v1-1 uint128) (v1-2 uint128)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf10 :class vf) + (vf20 :class vf) + (vf21 :class vf) + (vf22 :class vf) + (vf23 :class vf) + (vf9 :class vf) + ) + (init-vf0-vector) + ;; og:preserve-this modified for PC: these registers would be loaded in dma-add-process-drawable + (let ((at-0 *math-camera*)) + (.lvf vf20 (&-> at-0 guard-plane 0 quad)) + (.lvf vf21 (&-> at-0 guard-plane 1 quad)) + (.lvf vf22 (&-> at-0 guard-plane 2 quad)) + (.lvf vf23 (&-> at-0 guard-plane 3 quad)) + ) + (.lvf vf10 (&-> arg0 quad)) + (.mul.x.vf acc vf20 vf10) + (.add.mul.y.vf acc vf21 vf10 acc) + (.add.mul.z.vf acc vf22 vf10 acc) + (.sub.mul.w.vf vf9 vf23 vf0 acc) + (.sub.w.vf vf9 vf9 vf10) + (.mov v1-0 vf9) + (.pcgtw v1-1 0 v1-0) + (.ppach v1-2 (the-as uint128 0) v1-1) + (nonzero? (the-as int v1-2)) + ) + ) + +(defun sphere-in-view-frustum? ((arg0 sphere)) + "Check if sphere is in view frustum. Uses math-camera, so doesn't need register setup." + (local-vars (v1-1 uint128) (v1-2 uint128) (v1-3 uint128)) + (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) + (let ((v1-0 *math-camera*)) + (.lvf vf6 (&-> arg0 quad)) + (.lvf vf1 (&-> v1-0 plane 0 quad)) + (.lvf vf2 (&-> v1-0 plane 1 quad)) + (.lvf vf3 (&-> v1-0 plane 2 quad)) + (.lvf vf4 (&-> v1-0 plane 3 quad)) + ) + (.mul.x.vf acc vf1 vf6) + (.add.mul.y.vf acc vf2 vf6 acc) + (.add.mul.z.vf acc vf3 vf6 acc) + (.sub.mul.w.vf vf5 vf4 vf0 acc) + (.add.w.vf vf5 vf5 vf6) + (.mov v1-1 vf5) + (.pcgtw v1-2 0 v1-1) + (.ppach v1-3 (the-as uint128 0) v1-2) + (zero? (the-as int v1-3)) + ) + ) + +(defun line-in-view-frustum? ((arg0 vector) (arg1 vector)) + "Check if line is in view frustum. Uses math-camera, so doesn't need register setup." + (local-vars (v1-1 uint128) (v1-2 uint128) (v1-3 uint128) (a0-1 uint128) (a0-2 uint128) (a0-3 uint128)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf10 :class vf) + (vf16 :class vf) + (vf17 :class vf) + (vf18 :class vf) + (vf19 :class vf) + (vf9 :class vf) + ) + (init-vf0-vector) + (let ((v1-0 *math-camera*)) + (.lvf vf9 (&-> arg0 quad)) + (.lvf vf10 (&-> arg1 quad)) + (.lvf vf16 (&-> v1-0 plane 0 quad)) + (.lvf vf17 (&-> v1-0 plane 1 quad)) + (.lvf vf18 (&-> v1-0 plane 2 quad)) + (.lvf vf19 (&-> v1-0 plane 3 quad)) + ) + (.mul.x.vf acc vf16 vf9) + (.add.mul.y.vf acc vf17 vf9 acc) + (.add.mul.z.vf acc vf18 vf9 acc) + (.sub.mul.w.vf vf9 vf19 vf0 acc) + (.mul.x.vf acc vf16 vf10) + (.add.mul.y.vf acc vf17 vf10 acc) + (.add.mul.z.vf acc vf18 vf10 acc) + (.sub.mul.w.vf vf10 vf19 vf0 acc) + (.mov v1-1 vf9) + (.pcgtw v1-2 0 v1-1) + (.ppach v1-3 (the-as uint128 0) v1-2) + (.mov a0-1 vf10) + (.pcgtw a0-2 0 a0-1) + (.ppach a0-3 (the-as uint128 0) a0-2) + (not (logtest? (the-as int v1-3) (the-as int a0-3))) + ) + ) + +;; ERROR: failed type prop at 3: Could not figure out load: (set! v1 (l.b (+ v1 #x3800))) +;; WARN: Return type mismatch none vs symbol. +;; ERROR: Unsupported inline assembly instruction kind - [addiu a0, a0, 56] +(defun vis-cull ((id int)) + "Is this thing visible in the precomputed visiblity data? By draw-node id. + Assumes the scratchpad has the vis-list loaded." + (let* ((vis-byte (-> (spr-work) background vis-list (/ id 8))) ;; vis byte + (shift-amount (+ 56 (logand id 7))) + (shifted (shl vis-byte shift-amount)) + ) + (< (the-as int shifted) 0) + ) + ) + + +;; ERROR: Failed load: (set! v1-2 (l.b (+ v1-1 #x3800))) at op 2 +;; ERROR: Unsupported inline assembly instruction kind - [addiu a0, a0, 56] +(defun-debug vis-cull-debug ((a0-0 work-area) (id int)) + "Like vis-cull, but you can specify a different work-area. + Unused." + (let* ((vis-byte (-> a0-0 background vis-list (/ id 8))) ;; vis byte + (shift-amount (+ 56 (logand id 7))) + (shifted (shl vis-byte shift-amount)) + ) + (< (the-as int shifted) 0) + ) + ) + +(defun error-sphere ((arg0 drawable-error) (arg1 string)) + "Draw an error sphere and text for a drawable-error." + (when *artist-error-spheres* + (when (vis-cull (-> arg0 id)) + (when (sphere-cull (-> arg0 bsphere)) + (add-debug-sphere + #t + (bucket-id debug) + (-> arg0 bsphere) + (-> arg0 bsphere w) + (new 'static 'rgba :r #x80 :a #x80) + ) + (add-debug-text-3d + #t + (bucket-id debug-no-zbuf1) + arg1 + (-> arg0 bsphere) + (font-color white) + (the-as vector2h #f) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod login ((this drawable)) + "Initialize the object after it is loaded." + this + ) + +(defmethod draw ((this drawable)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + 0 + (none) + ) + +(defmethod drawable-method-11 ((this drawable)) + 0 + (none) + ) + +(defmethod drawable-method-12 ((this drawable)) + 0 + (none) + ) + +(defmethod collect-regions ((this drawable) (arg0 sphere) (arg1 int) (arg2 region-prim-list)) + "Fill the region-prim-list with regions that intersect the sphere." + 0 + (none) + ) + +(defmethod collect-stats ((this drawable)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + 0 + (none) + ) + +(defmethod debug-draw ((this drawable)) + "Debug-draw a drawable and its children. Typically uses the debug-draw functions." + 0 + (none) + ) + +(defmethod draw ((this drawable-error)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + (error-sphere this (-> this name)) + 0 + (none) + ) + +(defmethod unpack-vis ((this drawable) (arg0 (pointer int8)) (arg1 (pointer int8))) + arg1 + ) + +(define *edit-instance* (the-as string #f)) + +(when *debug-segment* +(define *instance-mem-usage* (new 'debug 'memory-usage-block)) + +) +(defun find-instance-by-name-level ((arg0 string) (arg1 level)) + "Find shrub or tie prototype by name in a level. + Yes it says instance. No it does not return an instance." + (let ((s5-0 (-> arg1 bsp drawable-trees))) + (dotimes (s4-0 (-> s5-0 length)) + (let ((v1-3 (-> s5-0 data s4-0))) + (case (-> v1-3 type) + ((drawable-tree-instance-shrub) + (let ((s3-0 (-> (the-as drawable-tree-instance-shrub v1-3) info prototype-inline-array-shrub))) + (dotimes (s2-0 (-> s3-0 length)) + (if (string= arg0 (-> s3-0 data s2-0 name)) + (return (-> s3-0 data s2-0)) + ) + ) + ) + ) + ((drawable-tree-instance-tie) + (let ((s3-1 (-> (the-as drawable-tree-instance-tie v1-3) prototypes prototype-array-tie))) + (dotimes (s2-1 (-> s3-1 length)) + (if (string= arg0 (-> s3-1 array-data s2-1 name)) + (return (-> s3-1 array-data s2-1)) + ) + ) + ) + ) + ) + ) + ) + ) + (the-as prototype-bucket #f) + ) + +(defun find-instance-by-name ((arg0 string)) + "Find shrub or tie prototype by name in any level. + Yes it says instance. No it does not return an instance." + (dotimes (s5-0 (-> *level* length)) + (let ((a1-0 (-> *level* level s5-0))) + (when (= (-> a1-0 status) 'active) + (let ((a0-4 (find-instance-by-name-level arg0 a1-0))) + (if a0-4 + (return a0-4) + ) + ) + ) + ) + ) + (the-as prototype-bucket #f) + ) + +(defun prototypes-game-visible-set! ((arg0 pair) (arg1 symbol) (arg2 level)) + "Disable collision/visibilty of tie/shrub based on a list of prototype names. + Only looks in the given level." + (let ((a0-1 (car arg0))) + (while (not (null? arg0)) + (let ((v1-0 (find-instance-by-name-level (the-as string a0-1) arg2))) + (when v1-0 + (if arg1 + (logclear! (-> v1-0 flags) (prototype-flags visible no-collide)) + (logior! (-> v1-0 flags) (prototype-flags visible no-collide)) + ) + ) + ) + (set! arg0 (cdr arg0)) + (set! a0-1 (car arg0)) + ) + ) + 0 + ) + +(defun-debug find-instance-by-index ((arg0 type) (arg1 int) (arg2 bsp-header)) + (dotimes (v1-0 (-> *level* length)) + (let ((a3-3 (-> *level* level v1-0))) + (when (= (-> a3-3 status) 'active) + (let ((a3-4 (-> a3-3 bsp))) + (when (or (not arg2) (= a3-4 arg2)) + (let ((a3-5 (-> a3-4 drawable-trees))) + (dotimes (t0-5 (-> a3-5 length)) + (let ((t1-3 (-> a3-5 data t0-5))) + (case (-> t1-3 type) + ((drawable-tree-instance-shrub) + (when (= arg0 (-> t1-3 type)) + (let ((v1-2 (-> (the-as drawable-tree-instance-shrub t1-3) info prototype-inline-array-shrub))) + (return (-> v1-2 data arg1)) + ) + ) + ) + ((drawable-tree-instance-tie) + (when (= arg0 (-> t1-3 type)) + (let ((v1-5 (-> (the-as drawable-tree-instance-tie t1-3) prototypes prototype-array-tie))) + (return (-> v1-5 array-data arg1)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (the-as prototype-bucket #f) + ) + +(defun-debug prototype-bucket-type ((arg0 prototype-bucket)) + (case (-> arg0 geometry 1 type) + ((prototype-shrubbery shrubbery) + instance-shrubbery + ) + ((prototype-tie prototype-tie tie-fragment) + instance-tie + ) + ) + ) + +(defun-debug prototype-bucket-recalc-fields ((arg0 prototype-bucket)) + (case (prototype-bucket-type arg0) + ((instance-shrubbery) + (set! (-> arg0 rdists x) (/ 1.0 (- (-> arg0 dists w) (-> arg0 dists x)))) + ) + (else + (set! (-> arg0 dists z) (+ (-> arg0 dists x) (* 0.33333334 (- (-> arg0 dists w) (-> arg0 dists x))))) + (set! (-> arg0 rdists x) (/ 1.0 (- (-> arg0 dists z) (-> arg0 dists x)))) + ) + ) + (set! (-> arg0 rdists z) (/ 1.0 (- (-> arg0 dists w) (-> arg0 dists z)))) + (set! (-> arg0 dists y) (* 0.5 (-> arg0 dists x))) + (set! (-> arg0 rdists y) (/ 1.0 (-> arg0 dists y))) + arg0 + ) + +(defun-debug print-prototype-list () + (local-vars (sv-16 (function prototype-bucket-shrub memory-usage-block int prototype-bucket-shrub))) + (dotimes (gp-0 (-> *level* length)) + (let ((s5-0 (-> *level* level gp-0))) + (when (= (-> s5-0 status) 'active) + (format #t "-------- level ~S~%" (-> s5-0 name)) + (let ((s5-1 (-> s5-0 bsp drawable-trees))) + (dotimes (s4-0 (-> s5-1 length)) + (let ((v1-8 (-> s5-1 data s4-0))) + (case (-> v1-8 type) + ((drawable-tree-instance-shrub) + (let ((s3-0 (-> (the-as drawable-tree-instance-shrub v1-8) info prototype-inline-array-shrub))) + (dotimes (s2-0 (-> s3-0 length)) + 0 + (let ((s1-0 (-> s3-0 data s2-0))) + (dotimes (s0-0 4) + (reset! *instance-mem-usage*) + (if (nonzero? (-> s1-0 geometry s0-0)) + (mem-usage (-> s1-0 geometry s0-0) *instance-mem-usage* 0) + ) + ) + (let ((s0-1 s1-0)) + (set! sv-16 (method-of-object s0-1 mem-usage)) + (let ((a1-4 (reset! *instance-mem-usage*)) + (a2-2 0) + ) + (sv-16 s0-1 a1-4 a2-2) + ) + ) + (let ((v1-29 (calculate-total *instance-mem-usage*))) + (format + #t + " ~-48S~4D shrub ~5,,2fK ~4,,2fK~%" + (-> s1-0 name) + (-> s1-0 in-level) + (* 0.0009765625 (the float v1-29)) + (* 0.0009765625 (the float (* (the-as uint 80) (-> s1-0 in-level)))) + ) + ) + ) + ) + ) + ) + ((drawable-tree-instance-tie) + (let ((s3-1 (-> (the-as drawable-tree-instance-tie v1-8) prototypes prototype-array-tie))) + (dotimes (s2-1 (-> s3-1 length)) + 0 + (let ((s1-1 (-> s3-1 array-data s2-1))) + (reset! *instance-mem-usage*) + (dotimes (s0-2 4) + (when (nonzero? (-> s1-1 tie-geom s0-2)) + (let* ((a0-13 (-> s1-1 tie-geom s0-2)) + (t9-8 (method-of-object a0-13 mem-usage)) + (a1-7 *instance-mem-usage*) + (v1-47 s0-2) + ) + (t9-8 a0-13 a1-7 (logior (cond + ((= v1-47 1) + 4 + ) + ((= v1-47 2) + 8 + ) + ((= v1-47 3) + 16 + ) + (else + 0 + ) + ) + 2 + ) + ) + ) + ) + ) + (mem-usage s1-1 *instance-mem-usage* 0) + (let ((v1-54 (calculate-total *instance-mem-usage*))) + (format + #t + " ~-48S~4D tie ~5,,2fK ~4,,2fK~%" + (-> s1-1 name) + (-> s1-1 in-level) + (* 0.0009765625 (the float v1-54)) + (* 0.0009765625 (the float (* (-> s1-1 in-level) 64))) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defun-debug draw-instance-info ((arg0 string)) + (local-vars + (sv-16 uint) + (sv-32 uint) + (sv-48 uint) + (sv-64 int) + (sv-80 int) + (sv-96 int) + (sv-112 int) + (sv-128 int) + (sv-144 int) + ) + (when (and *display-instance-info* *edit-instance*) + (let ((s5-0 (find-instance-by-name *edit-instance*))) + (when s5-0 + (dotimes (s4-0 (-> *level* length)) + (let ((v1-5 (-> *level* level s4-0))) + (when (= (-> v1-5 status) 'active) + (let ((s3-0 (-> v1-5 bsp drawable-trees))) + (dotimes (s2-0 (-> s3-0 length)) + (let ((v1-9 (-> s3-0 data s2-0))) + (case (-> v1-9 type) + ((drawable-tree-instance-shrub) + ) + ((drawable-tree-instance-tie) + (let ((s1-0 (-> (the-as + drawable-tree-instance-tie + (+ (* (+ (-> (the-as drawable-tree-instance-tie v1-9) length) -1) 4) (the-as int v1-9)) + ) + data + 0 + ) + ) + ) + (dotimes (s0-0 (-> (the-as drawable-inline-array-instance-tie s1-0) length)) + (if (string= (-> (the-as drawable-inline-array-instance-tie s1-0) data s0-0 bucket-ptr name) *edit-instance*) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (the-as + vector + (+ (the-as uint (-> (the-as drawable-inline-array-instance-tie s1-0) data 0 bsphere)) (* s0-0 64)) + ) + (-> (the-as drawable-inline-array-instance-tie s1-0) data s0-0 bsphere w) + (new 'static 'rgba :g #xff :a #x80) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let ((s2-1 (prototype-bucket-type s5-0))) + (let ((s4-1 0)) + 0 + (cond + ((= s2-1 instance-shrubbery) + (set! s4-1 80) + ) + ((= s2-1 instance-tie) + (reset! *instance-mem-usage*) + (dotimes (s4-2 4) + (when (nonzero? (-> s5-0 geometry s4-2)) + (let* ((a0-17 (-> s5-0 geometry s4-2)) + (t9-5 (method-of-object a0-17 mem-usage)) + (a1-6 *instance-mem-usage*) + (v1-40 s4-2) + ) + (t9-5 a0-17 a1-6 (logior (cond + ((= v1-40 1) + 4 + ) + ((= v1-40 2) + 8 + ) + ((= v1-40 3) + 16 + ) + (else + 0 + ) + ) + 2 + ) + ) + ) + ) + ) + (set! s4-1 (+ (calculate-total *instance-mem-usage*) 64)) + ) + ) + (mem-usage s5-0 (reset! *instance-mem-usage*) 0) + (let ((v1-50 (calculate-total *instance-mem-usage*))) + (format + arg0 + "~%~A ~A b @ #x~X ~,,2fK/~,,2fK~%" + s2-1 + (-> s5-0 name) + s5-0 + (* 0.0009765625 (the float v1-50)) + (* 0.0009765625 (the float s4-1)) + ) + ) + ) + (format arg0 "near: ~m mid: ~m far: ~m~%" (-> s5-0 dists x) (-> s5-0 dists z) (-> s5-0 dists w)) + (let ((s3-2 0) + (s4-3 0) + ) + (cond + ((= s2-1 instance-shrubbery) + (let ((f30-0 0.0)) + (format + arg0 + "usage: vis: ~D shrub: ~D trans-shrub ~D bill: ~D in level: ~D~%" + (-> (the-as prototype-bucket-shrub s5-0) count 0) + (-> (the-as prototype-bucket-shrub s5-0) count 1) + (-> (the-as prototype-bucket-shrub s5-0) count 2) + (-> (the-as prototype-bucket-shrub s5-0) count 3) + (-> (the-as prototype-bucket-shrub s5-0) in-level) + ) + (format arg0 "~%frag# tris dverts strlen tex~%") + (let ((s1-2 (the-as prototype-shrubbery (-> (the-as prototype-bucket-shrub s5-0) geometry 1))) + (s2-2 (+ (-> (the-as prototype-bucket-shrub s5-0) count 1) (-> (the-as prototype-bucket-shrub s5-0) count 2))) + ) + (dotimes (s0-1 (-> s1-2 length)) + (set! sv-16 (shrub-num-tris (-> s1-2 data s0-1))) + (set! sv-32 (-> s1-2 data s0-1 header data 2)) + (set! sv-48 (-> s1-2 data s0-1 header data 0)) + (format + arg0 + "~5D ~4D ~5D ~6f ~D~%" + s0-1 + sv-16 + sv-32 + (/ (* 2.0 (the float sv-16)) (the float (- sv-32 sv-16))) + sv-48 + ) + (+! s3-2 sv-16) + (+! s4-3 sv-32) + (set! f30-0 + (+ 29.0 + (* 5.5 (the float (- sv-32 sv-16))) + (* 22.0 (the float sv-48)) + (* 8.0 (the float sv-32)) + (* 53.0 (the float (/ (+ s2-2 9) (the-as uint 10)))) + (* (the float s2-2) (+ 15.0 (* 5.0 (the float sv-48)) (* 13.5 (the float sv-32)))) + f30-0 + ) + ) + ) + (format + arg0 + "total ~4D ~5D ~6f ~D speed: ~f~%" + s3-2 + s4-3 + (/ (* 2.0 (the float s3-2)) (the float (- s4-3 s3-2))) + (-> s5-0 utextures) + (/ f30-0 (* (the float s2-2) (the float s3-2))) + ) + ) + ) + ) + ((= s2-1 instance-tie) + (set! sv-144 0) + (let ((s1-3 0) + (s0-2 0) + (s2-3 0) + ) + (format arg0 "~%level visible frags tris dverts strlen tex ttris~%") + (set! sv-64 1) + (set! sv-80 3) + (while (>= sv-80 sv-64) + (let ((v1-100 (-> (the-as prototype-bucket-tie s5-0) tie-geom sv-64))) + (set! sv-96 0) + (set! sv-112 0) + (set! sv-128 0) + (dotimes (a0-36 (-> v1-100 length)) + (set! sv-96 (+ sv-96 (-> v1-100 data a0-36 debug num-tris))) + (set! sv-112 (+ sv-112 (-> v1-100 data a0-36 debug num-dverts))) + (set! sv-128 (+ sv-128 (-> v1-100 data a0-36 tex-count))) + ) + (set! sv-144 (+ sv-144 (-> (the-as prototype-bucket-tie s5-0) count sv-64))) + (format + arg0 + "~5D ~7D ~5D ~5D" + sv-64 + (-> (the-as prototype-bucket-tie s5-0) count sv-64) + (-> v1-100 length) + sv-96 + ) + ) + (format + arg0 + " ~5D ~6f ~3D ~5D~%" + sv-112 + (/ (* 2.0 (the float sv-96)) (the float (- sv-112 sv-96))) + sv-128 + (* (the-as uint sv-96) (-> (the-as prototype-bucket-tie s5-0) count sv-64)) + ) + (+! s1-3 (* (the-as uint sv-96) (-> (the-as prototype-bucket-tie s5-0) count sv-64))) + (+! s0-2 (* (the-as uint sv-112) (-> (the-as prototype-bucket-tie s5-0) count sv-64))) + (+! s3-2 sv-96) + (+! s4-3 sv-112) + (+! s2-3 sv-128) + (set! sv-64 (+ sv-64 1)) + ) + (let ((t9-20 format) + (a0-52 arg0) + (a1-28 "total ~7D/~3D ~5D") + (a3-12 (-> s5-0 in-level)) + ) + (t9-20 a0-52 a1-28 sv-144 a3-12 s3-2) + ) + (format + arg0 + " ~5D ~6f ~3D ~5D~%" + s4-3 + (/ (* 2.0 (the float s1-3)) (the float (- s0-2 s1-3))) + s2-3 + s1-3 + ) + ) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch uint vs none. +(defun-debug set-shadow-by-name ((arg0 string) (arg1 int) (arg2 int)) + "Modify the shadow values for a process." + (let ((v1-0 (process-by-name arg0 *active-pool*))) + (when v1-0 + (let ((v1-1 (-> (the-as process-drawable v1-0) draw))) + (cond + ((< arg2 16) + (logior! (-> v1-1 shadow-mask) (ash 1 arg1)) + (logclear! (-> v1-1 shadow-values) (ash 15 (* arg1 4))) + (logior! (-> v1-1 shadow-values) (ash arg2 (* arg1 4))) + ) + (else + (logclear! (-> v1-1 shadow-mask) (ash 1 arg1)) + (logclear! (-> v1-1 shadow-values) (ash 15 (* arg1 4))) + ) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defun-debug get-shadow-by-name ((arg0 string)) + "Print to stdout the mask/values for the given process shadows" + (let ((v1-0 (process-by-name arg0 *active-pool*))) + (when v1-0 + (let ((s5-0 (-> (the-as process-drawable v1-0) draw))) + (format 0 "actor ~s {~%" arg0) + (format 0 " SHADOW_MASK(0x~02x)~%" (-> s5-0 shadow-mask)) + (format 0 " SHADOW_VALUES(0x~08x)~%" (-> s5-0 shadow-values)) + ) + (format 0 "}~%") + ) + ) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defun-debug teleport-camera-by-name ((arg0 string)) + "Move camera to entity by name" + (let* ((gp-0 (entity-by-name arg0)) + (v1-0 (if (type? gp-0 entity-actor) + gp-0 + ) + ) + ) + (if (and v1-0 *camera*) + (send-event *camera* 'teleport-to-vector-start-string (-> v1-0 trans)) + ) + ) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defun-debug teleport-camera-by-pos ((arg0 float) (arg1 float) (arg2 float)) + "Move camera to position" + (let ((v1-0 (new 'stack-no-clear 'vector))) + (when *camera* + (set-vector! v1-0 (* 4096.0 arg0) (* 4096.0 arg1) (* 4096.0 arg2) 1.0) + (send-event *camera* 'teleport-to-vector-start-string v1-0) + ) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun calc-vu1-shadow ((arg0 light-group) (arg1 draw-control)) + "Update shadow-ctrl based on lights" + (rlet ((acc :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s5-0 (-> arg1 shadow-ctrl settings shadow-dir)) + (f30-0 (-> arg1 shadow-ctrl settings shadow-dir w)) + ) + (.lvf vf1 (&-> arg0 dir0 direction quad)) + (.lvf vf2 (&-> arg0 dir1 direction quad)) + (.lvf vf3 (&-> arg0 dir2 direction quad)) + (.lvf vf4 (&-> arg0 dir0 extra quad)) + (.lvf vf5 (&-> arg0 dir1 extra quad)) + (.lvf vf6 (&-> arg0 dir2 extra quad)) + (.mul.x.vf acc vf1 vf4) + (.add.mul.x.vf acc vf2 vf5 acc) + (.add.mul.x.vf vf1 vf3 vf6 acc) + (.svf (&-> s4-0 quad) vf1) + (vector-normalize! s4-0 -1.0) + (when (< (- (-> s4-0 y)) 0.9063) + (let* ((f0-2 0.4226) + (f1-1 (-> s4-0 x)) + (f1-3 (* f1-1 f1-1)) + (f2-0 (-> s4-0 z)) + (f0-3 (/ f0-2 (sqrtf (+ f1-3 (* f2-0 f2-0))))) + ) + (set! (-> s4-0 x) (* (-> s4-0 x) f0-3)) + (set! (-> s4-0 y) -0.9063) + (set! (-> s4-0 z) (* (-> s4-0 z) f0-3)) + ) + ) + (cond + ((logtest? (-> arg1 shadow-ctrl settings flags) (shadow-flags shdf08)) + (set! (-> s5-0 quad) (-> s4-0 quad)) + ) + (else + (when (not (paused?)) + (vector-seek! s5-0 s4-0 (* 0.2 (seconds-per-frame))) + (vector-normalize! s5-0 1.0) + ) + ) + ) + (set! (-> arg1 shadow-ctrl settings shadow-dir w) f30-0) + ) + (none) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +;; ERROR: Unsupported inline assembly instruction kind - [srl v1, v1, 24] +(defun calc-shadow-masks ((arg0 light-group) (arg1 draw-control) (arg2 uint)) + (local-vars (v1-25 uint) (v1-26 int) (sv-64 light-hash) (sv-68 vector) (sv-72 mood-context) (sv-76 pointer)) + (let ((s5-0 (the-as (array float) (new 'stack 'boxed-array float 6)))) + (let ((v1-1 (-> arg1 shadow-mask)) + (a0-2 (-> arg1 shadow-values)) + ) + (dotimes (a1-2 5) + (if (not (logtest? v1-1 (ash 1 a1-2))) + (set! (-> s5-0 a1-2) 1.0) + (set! (-> s5-0 a1-2) (* 0.0625 (the float (logand (ash a0-2 (* -4 a1-2)) 15)))) + ) + ) + ) + (when (or (and (>= (the-as int arg2) 10) (< (the-as int arg2) 18)) + (and (>= (the-as int arg2) 30) (< (the-as int arg2) 38)) + ) + (dotimes (s3-1 (-> *level* length)) + (let ((v1-10 (-> *level* level s3-1))) + (when (= (-> v1-10 status) 'active) + (set! sv-64 (-> v1-10 light-hash)) + (set! sv-68 (-> arg1 origin)) + (set! sv-72 (-> v1-10 mood-context)) + (when (nonzero? sv-64) + (let ((v1-13 (light-hash-get-bucket-index sv-64 (-> arg1 origin)))) + (when (!= v1-13 -1) + (let ((s2-0 (-> sv-64 bucket-array v1-13))) + (set! sv-76 (the pointer (+ (+ (-> s2-0 index) 0) (the-as uint (-> sv-64 index-array))))) + (dotimes (s1-0 (the-as int (-> s2-0 count))) + (let ((s0-0 (-> sv-64 light-sphere-array (-> (the-as (pointer uint8) (&+ sv-76 s1-0)))))) + (when (= (-> s0-0 palette-index) -2) + (let* ((f0-3 (-> s0-0 bsphere w)) + (f28-0 (* f0-3 (-> s0-0 decay-start))) + (f26-0 (- f0-3 f28-0)) + (f0-8 (fmax 0.0 (fmin 1.0 (/ (- (vector-vector-distance (-> s0-0 bsphere) sv-68) f28-0) f26-0)))) + ) + (when (!= f0-8 1.0) + ;; (.srl v1-26 v1-25 24) + ;; og:preserve-this + (set! v1-26 (logand #xffffffff (shr (-> s0-0 shadow) 24))) + (let ((a0-26 (shr (shl (-> s0-0 shadow) 40) 40))) + (dotimes (a1-6 5) + (when (logtest? v1-26 (ash 1 a1-6)) + (let ((f1-5 (* 0.0625 (the float (logand (ash a0-26 (* -4 a1-6)) 15))))) + 1.0 + (set! (-> s5-0 a1-6) (fmin (-> s5-0 a1-6) (+ f1-5 (* (- 1.0 f1-5) f0-8)))) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (dotimes (v1-35 4) + (when (nonzero? (-> arg0 lights v1-35 mask)) + (let ((a0-36 (-> arg0 lights v1-35 palette-index))) + (set! (-> arg0 lights v1-35 extra x) (* (-> arg0 lights v1-35 extra x) (-> s5-0 a0-36))) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun calc-realtime-lights ((arg0 light-group) (arg1 draw-control) (arg2 uint)) + (local-vars (sv-16 light-hash) (sv-20 vector) (sv-24 mood-context)) + (when (or (and (>= (the-as int arg2) 10) (< (the-as int arg2) 18)) + (and (>= (the-as int arg2) 30) (< (the-as int arg2) 38)) + ) + (dotimes (s4-0 (-> *level* length)) + (let ((v1-5 (-> *level* level s4-0))) + (when (= (-> v1-5 status) 'active) + (set! sv-16 (-> v1-5 light-hash)) + (set! sv-20 (-> arg1 origin)) + (set! sv-24 (-> v1-5 mood-context)) + (when (nonzero? sv-16) + (let ((v1-8 (light-hash-get-bucket-index sv-16 (-> arg1 origin)))) + (when (!= v1-8 -1) + (let* ((s3-0 (-> sv-16 bucket-array v1-8)) + (s2-0 (+ (+ (-> s3-0 index) 0) (the-as uint (-> sv-16 index-array)))) + ) + (dotimes (s1-0 (the-as int (-> s3-0 count))) + (let* ((a1-3 (-> sv-16 light-sphere-array (-> (the-as (pointer uint8) (+ s2-0 s1-0))))) + (v1-14 (-> a1-3 palette-index)) + (f0-1 (if (= v1-14 -1) + 1.0 + (-> sv-24 times v1-14 w) + ) + ) + ) + (if (not (or (= (-> a1-3 palette-index) -2) (= (* (-> a1-3 brightness) f0-1) 0.0))) + (add-light-sphere-to-light-group arg0 a1-3 sv-20 sv-24) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +(defun calc-vu1-lights ((arg0 vu-lights) (arg1 draw-control) (arg2 symbol)) + (local-vars (v1-44 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (let ((s4-0 *time-of-day-context*)) + (cond + ((logtest? (-> arg1 global-effect) (draw-control-global-effect title-light)) + (when (not (-> s4-0 title-updated)) + (set! (-> s4-0 title-updated) #t) + (let ((s2-1 (-> *math-camera* inv-camera-rot)) + (a1-1 (new 'static 'vector :x 0.612 :y 0.5 :z -0.612)) + (s3-0 (new 'static 'vector :x -0.696 :y 0.174 :z 0.696)) + ) + (vector-matrix*! (the-as vector (-> s4-0 title-light-group)) a1-1 s2-1) + (vector-matrix*! (the-as vector (-> s4-0 title-light-group dir1)) s3-0 s2-1) + ) + ) + (vu-lights<-light-group! arg0 (-> s4-0 title-light-group)) + ) + ((logtest? (-> arg1 global-effect) (draw-control-global-effect rim-lights)) + (let ((s1-0 (-> *math-camera* inv-camera-rot)) + (a1-4 (new 'static 'vector :x 0.77455187 :y 0.44725248 :z 0.44725248)) + (s3-1 (new 'static 'vector :x -0.77455187 :y 0.44725248 :z 0.44725248)) + (s2-2 (new 'static 'vector :y -0.8944 :z 0.4472)) + (s4-1 (-> s4-0 rim-light-group)) + ) + (vector-matrix*! (the-as vector (-> s4-1 dir0)) a1-4 s1-0) + (vector-matrix*! (the-as vector (-> s4-1 dir1)) s3-1 s1-0) + (vector-matrix*! (the-as vector (-> s4-1 dir2)) s2-2 s1-0) + (vu-lights<-light-group! arg0 s4-1) + ) + ) + ((logtest? (-> arg1 global-effect) (draw-control-global-effect rim-lights2)) + (let ((s1-1 (-> *math-camera* inv-camera-rot)) + (a1-8 (new 'static 'vector :x 0.77455187 :y 0.44725248 :z 0.44725248)) + (s3-2 (new 'static 'vector :x -0.77455187 :y 0.44725248 :z 0.44725248)) + (s2-3 (new 'static 'vector :y -0.8944 :z 0.4472)) + (s4-2 (-> s4-0 rim-light-group2)) + ) + (vector-matrix*! (the-as vector (-> s4-2 dir0)) a1-8 s1-1) + (vector-matrix*! (the-as vector (-> s4-2 dir1)) s3-2 s1-1) + (vector-matrix*! (the-as vector (-> s4-2 dir2)) s2-3 s1-1) + (vu-lights<-light-group! arg0 s4-2) + ) + ) + ((logtest? (-> arg1 global-effect) (draw-control-global-effect rim-lights3)) + (let ((s1-2 (-> *math-camera* inv-camera-rot)) + (a1-12 (new 'static 'vector :x 0.77455187 :y 0.44725248 :z 0.44725248)) + (s3-3 (new 'static 'vector :x -0.77455187 :y 0.44725248 :z 0.44725248)) + (s2-4 (new 'static 'vector :y -0.8944 :z 0.4472)) + (s4-3 (-> s4-0 rim-light-group3)) + ) + (vector-matrix*! (the-as vector (-> s4-3 dir0)) a1-12 s1-2) + (vector-matrix*! (the-as vector (-> s4-3 dir1)) s3-3 s1-2) + (vector-matrix*! (the-as vector (-> s4-3 dir2)) s2-4 s1-2) + (vu-lights<-light-group! arg0 s4-3) + ) + ) + (else + (let ((v1-20 (-> arg1 level-index)) + (s1-3 (-> arg1 light-index)) + (s3-4 (new 'stack-no-clear 'light-group)) + ) + (if (and (>= v1-20 (the-as uint 10)) (< s1-3 (the-as uint 20))) + (+! s1-3 20) + ) + (let ((v1-22 (+ (the-as uint (-> *level* level0 mood-context)) (* (the-as uint 5424) v1-20)))) + (cond + ((< s1-3 (the-as uint 8)) + (quad-copy! (the-as pointer s3-4) (the-as pointer (+ (* (the-as uint 192) s1-3) 112 v1-22)) 12) + ) + ((< s1-3 (the-as uint 18)) + (quad-copy! (the-as pointer s3-4) (the-as pointer (+ (* (the-as uint 192) (+ s1-3 -10)) 112 v1-22)) 12) + ) + ((< s1-3 (the-as uint 28)) + (quad-copy! (the-as pointer s3-4) (the-as pointer (-> s4-0 light-group (+ s1-3 -20))) 12) + ) + ((< s1-3 (the-as uint 38)) + (quad-copy! (the-as pointer s3-4) (the-as pointer (-> s4-0 light-group (+ s1-3 -30))) 12) + ) + ) + ) + (calc-shadow-masks s3-4 arg1 s1-3) + (calc-realtime-lights s3-4 arg1 s1-3) + (vu-lights<-light-group! arg0 s3-4) + (if (and arg2 + (nonzero? (-> arg1 shadow-ctrl)) + (-> arg1 shadow-ctrl) + (not (logtest? (-> arg1 shadow-ctrl settings flags) (shadow-flags disable-draw))) + (not (logtest? (-> arg1 shadow-ctrl settings flags) (shadow-flags shdf07))) + ) + (calc-vu1-shadow s3-4 arg1) + ) + ) + ) + ) + ) + (.lvf vf5 (&-> arg1 color-mult quad)) + (.lvf vf6 (&-> arg1 color-emissive quad)) + (.lvf vf1 (&-> arg0 color 0 quad)) + (.lvf vf2 (&-> arg0 color 1 quad)) + (.lvf vf3 (&-> arg0 color 2 quad)) + (.lvf vf4 (&-> arg0 ambient quad)) + (.mul.vf vf4 vf4 vf5) + (.mul.vf vf1 vf1 vf5) + (.mul.vf vf2 vf2 vf5) + (.mul.vf vf3 vf3 vf5) + (.add.vf vf4 vf4 vf6) + (.svf (&-> arg0 color 0 quad) vf1) + (.svf (&-> arg0 color 1 quad) vf2) + (.svf (&-> arg0 color 2 quad) vf3) + (.svf (&-> arg0 ambient quad) vf4) + (.mov v1-44 vf4) + 0 + (none) + ) + ) + +;; WARN: Function dma-add-process-drawable has a return type of none, but the expression builder found a return statement. +(defun dma-add-process-drawable ((arg0 process-drawable) (arg1 draw-control) (arg2 symbol) (arg3 dma-buffer)) + "Generate DMA for foreground object, calculate lights/shadows, etc." + (local-vars (a0-41 int) (a0-43 int) (a3-9 uint128) (sv-16 process-drawable)) + (with-pp + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf15 :class vf) + (vf16 :class vf) + (vf17 :class vf) + (vf18 :class vf) + (vf19 :class vf) + (vf20 :class vf) + (vf21 :class vf) + (vf22 :class vf) + (vf23 :class vf) + (vf24 :class vf) + (vf25 :class vf) + (vf26 :class vf) + (vf27 :class vf) + (vf28 :class vf) + (vf29 :class vf) + ) + (init-vf0-vector) + (set! sv-16 arg0) + (start-profiling! (-> *perf-stats* data (perf-stat-bucket foreground))) + (when (get-menu-mode *blit-displays-work*) + (if (not (logtest? (-> arg1 status) (draw-control-status hud))) + (return #f) + ) + ) + (logclear! (-> arg1 status) (draw-control-status on-screen)) + (when (not (logtest? (-> arg1 status) (draw-control-status no-draw no-draw-temp uninited))) + ;; og:preserve-this + (let ((s3-0 (-> (scratchpad-object foreground-work) bounds)) + (s4-0 (-> (scratchpad-object foreground-work) lights)) + ) + (.lvf vf16 (&-> arg1 origin quad)) + (.svf (&-> s3-0 quad) vf16) + (when (or (sphere-in-view-frustum? s3-0) (logtest? (-> arg1 status) (draw-control-status no-bounds-check))) + (calc-vu1-lights s4-0 arg1 #t) + (let ((at-0 *math-camera*)) + (.lvf vf16 (&-> at-0 plane 0 quad)) + (.lvf vf17 (&-> at-0 plane 1 quad)) + (.lvf vf18 (&-> at-0 plane 2 quad)) + (.lvf vf19 (&-> at-0 plane 3 quad)) + (.lvf vf20 (&-> at-0 guard-plane 0 quad)) + (.lvf vf21 (&-> at-0 guard-plane 1 quad)) + (.lvf vf22 (&-> at-0 guard-plane 2 quad)) + (.lvf vf23 (&-> at-0 guard-plane 3 quad)) + (.lvf vf24 (&-> at-0 camera-rot rvec quad)) + (.lvf vf25 (&-> at-0 camera-rot uvec quad)) + (.lvf vf26 (&-> at-0 camera-rot fvec quad)) + (.lvf vf27 (&-> at-0 camera-rot trans quad)) + ) + ;; og:preserve-this + (let ((v1-20 (-> (scratchpad-object foreground-work) distance))) + (.lvf vf15 (&-> s3-0 quad)) + (.mul.w.vf acc vf27 vf0) + (.add.mul.x.vf acc vf24 vf15 acc) + (.add.mul.y.vf acc vf25 vf15 acc) + (.add.mul.z.vf vf15 vf26 vf15 acc :mask #b111) + (.mul.vf vf28 vf15 vf15) + (.max.w.vf vf29 vf0 vf0) + (.add.y.vf acc vf28 vf28) + (.add.mul.z.vf vf28 vf29 vf28 acc :mask #b1) + (.sqrt.vf Q vf28 :ftf #b0) + (.sub.w.vf vf28 vf0 vf15 :mask #b1000) + (.wait.vf) + (.add.vf vf15 vf28 Q :mask #b1000) + (.svf (&-> v1-20 quad) vf15) + (when (< 0.0 (+ (-> v1-20 z) (-> arg1 bounds w))) + (let ((s4-1 0)) + (let ((f30-0 (-> v1-20 w))) + (if (and *debug-segment* (-> *screen-shot-work* highres-enable)) + (set! f30-0 0.0) + ) + (set! (-> arg1 distance) f30-0) + (when (nonzero? (-> arg1 lod-set max-lod)) + (cond + ((>= (-> arg1 force-lod) 0) + (set! s4-1 (-> arg1 force-lod)) + ;; 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) + ) + ) + (else + (while (and (< s4-1 (-> arg1 lod-set max-lod)) (< (-> arg1 lod-set lod s4-1 dist) f30-0)) + (+! s4-1 1) + ) + ) + ) + ) + ;; 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))) + (f0-5 (* f30-0 (-> *math-camera* fov-correction-factor))) + (a0-18 (-> arg1 mgeo header texture-usage-group)) + ) + (dotimes (a1-4 7) + (let ((a2-2 (+ a1-4 12))) + (if (not (logtest? (-> arg1 status) (draw-control-status no-closest-distance))) + (set! (-> v1-49 closest-object a2-2) (fmin (-> v1-49 closest-object a2-2) f30-0)) + ) + ) + (let ((t0-0 (cond + ((>= f0-5 (-> a0-18 data a1-4 data 0 dist)) + 0 + ) + ((>= f0-5 (-> a0-18 data a1-4 data 1 dist)) + 1 + ) + (else + 2 + ) + ) + ) + (a2-12 (+ a1-4 12)) + ) + (let ((a3-8 (-> v1-49 texture-mask a2-12 mask quad)) + (t0-3 (-> (the-as (pointer uint128) (+ (the-as uint a0-18) (* 48 a1-4) (* t0-0 16))) 0)) + ) + (.por a3-9 a3-8 t0-3) + ) + (set! (-> v1-49 texture-mask a2-12 mask quad) a3-9) + ) + ) + ) + (if (or (guard-band-cull s3-0) (< f30-0 (* 1.2 (-> *math-camera* d)))) + (logior! (-> arg1 status) (draw-control-status close-to-screen)) + (logclear! (-> arg1 status) (draw-control-status close-to-screen)) + ) + (logior! (-> arg1 status) (draw-control-status on-screen)) + (if (logtest? (-> arg1 status) (draw-control-status no-draw-bounds no-draw-bounds2)) + (return #f) + ) + (set! (-> pp clock) (-> sv-16 clock)) + ;; 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))) + (let ((s5-1 *matrix-engine*)) + (when (= (-> s5-1 length) (-> s5-1 allocated-length)) + (format 0 "Matrix engine is too small!~%") + (format *stdcon* "Matrix engine is too small!~%") + (break!) + 0 + ) + (set! (-> s5-1 (-> s5-1 length)) (process->handle sv-16)) + (+! (-> s5-1 length) 1) + ) + ) + (lod-set! arg1 s4-1) + ) + (logior! (-> arg1 status) (draw-control-status lod-set)) + ) + ) + ) + ) + ) + (stop-profiling! (-> *perf-stats* data (perf-stat-bucket foreground))) + (label cfg-79) + 0 + 0 + (none) + ) + ) + ) + +(define *hud-lights* (new 'global 'vu-lights)) + +(set-vector! (-> *hud-lights* direction 0) 1.0 0.0 0.0 1.0) + +(set-vector! (-> *hud-lights* direction 1) 0.0 1.0 0.0 1.0) + +(set-vector! (-> *hud-lights* direction 2) 0.0 0.0 1.0 1.0) + +(set-vector! (-> *hud-lights* color 0) 0.0 0.0 0.0 1.0) + +(set-vector! (-> *hud-lights* color 1) 0.0 0.0 0.0 1.0) + +(set-vector! (-> *hud-lights* color 2) 0.5 0.5 0.5 1.0) + +(set-vector! (-> *hud-lights* ambient) 0.5 0.5 0.5 1.0) + +(defun dma-add-process-drawable-hud ((arg0 process-drawable) (arg1 draw-control) (arg2 float) (arg3 dma-buffer)) + "Special version of dma-add-process-drawable for drawing hud foreground objects" + (local-vars (a3-4 uint128)) + (logclear! (-> arg1 status) (draw-control-status on-screen)) + (when (not (logtest? (-> arg1 status) (draw-control-status no-draw no-draw-temp uninited))) + ;; og:preserve-this + (let ((v1-6 (-> (scratchpad-object foreground-work) lights)) + (a0-3 *hud-lights*) + ) + (set! (-> v1-6 direction 0 quad) (-> a0-3 direction 0 quad)) + (set! (-> v1-6 direction 1 quad) (-> a0-3 direction 1 quad)) + (set! (-> v1-6 direction 2 quad) (-> a0-3 direction 2 quad)) + (set! (-> v1-6 color 0 quad) (-> a0-3 color 0 quad)) + (set! (-> v1-6 color 1 quad) (-> a0-3 color 1 quad)) + (set! (-> v1-6 color 2 quad) (-> a0-3 color 2 quad)) + (set! (-> v1-6 ambient quad) (-> a0-3 ambient quad)) + ) + (lod-set! arg1 0) + (logior! (-> arg1 status) (draw-control-status on-screen)) + (foreground-draw-hud arg1 arg3 arg2) + (let ((v1-12 (-> *level* level-default)) + (a0-9 (-> arg1 mgeo header texture-usage-group)) + ) + (dotimes (a1-9 7) + (let ((a2-1 (+ a1-9 12))) + (let ((a3-3 (-> v1-12 texture-mask a2-1 mask quad)) + (t0-3 (-> a0-9 data a1-9 data 2 mask quad)) + ) + (.por a3-4 a3-3 t0-3) + ) + (set! (-> v1-12 texture-mask a2-1 mask quad) a3-4) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun add-process-drawable ((arg0 process-drawable) (arg1 draw-control) (arg2 symbol) (arg3 dma-buffer)) + "Foreground engine function to generate dma for a process-drawable." + ((-> arg1 dma-add-func) arg0 arg1 arg2 arg3) + (none) + ) + +;; ERROR: Unsupported inline assembly instruction kind - [cache dxwbin v1, 0] +;; ERROR: Unsupported inline assembly instruction kind - [cache dxwbin v1, 1] +(defun foreground-engine-execute ((arg0 engine)) + "Draw all foreground objects!" + (when (> (length arg0) 0) + (let ((gp-0 (-> *display* frames (-> *display* on-screen) global-buf base))) + (with-profiler 'foreground *profile-foreground-color* + (let ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf))) + ; (let ((v1-34 (-> s4-1 base))) + ; (.sync.l) + ; (.cache dxwbin v1-34 0) + ; (.sync.l) + ; (.cache dxwbin v1-34 1) + ; ) + ; (.sync.l) + ; 0 + (foreground-init) + (execute-connections arg0 s4-1) + ) + (foreground-wrapup) + ) + (let ((v1-54 *dma-mem-usage*)) + (when (nonzero? v1-54) + (set! (-> v1-54 length) (max 36 (-> v1-54 length))) + (set! (-> v1-54 data 35 name) "pris-fragment") + (+! (-> v1-54 data 35 count) 1) + (+! (-> v1-54 data 35 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint gp-0)) + ) + (set! (-> v1-54 data 35 total) (-> v1-54 data 35 used)) + ) + ) + ) + ) + 0 + (none) + ) + +(defun-debug main-debug-hook () + "Run debug engine, collision renderer." + (when (not (or (= *master-mode* 'menu) (= *master-mode* 'progress))) + (let ((a0-3 *col-rend*)) + (if (-> a0-3 draw?) + (draw a0-3) + ) + ) + (execute-connections *debug-engine* #f) + (draw-instance-info *stdcon*) + ) + (none) + ) + +(define *debug-hook* (cons main-debug-hook '())) + +(define *add-sphere* #f) + +(define *generic-effect-mode* 0) + +;; WARN: Return type mismatch symbol vs none. +(defun foreground-initialize-engines () + "Initialize shadow chains prior to foreground drawing." + (let ((v1-0 *shadow-globals*)) + (dotimes (a0-0 3) + (let ((a1-2 (-> v1-0 bucket a0-0))) + (set! (-> a1-2 first) (the-as pointer 0)) + (set! (-> a1-2 next) (the-as pointer 0)) + (set! (-> a1-2 shadow-color) (cond + ((zero? a0-0) + (new 'static 'rgba :r #xf0 :g #xf0 :b #xf0 :a #x80) + ) + ((= a0-0 1) + (the-as rgba (-> *setting-control* user-current spotlight-color)) + ) + (else + (the-as rgba (-> *setting-control* user-current highlight-color)) + ) + ) + ) + (set! (-> a1-2 constants) (the-as shadow-vu1-constants 0)) + ) + ) + ) + (none) + ) + +(defun foreground-execute-cpu-vu0-engines () + "Run foreground drawing code on EE/VU0 (bones, generic merc, part of shadow, lightning, prim)" + (let ((gp-0 (-> *display* frames (-> *display* on-screen) global-buf))) + (bones-init gp-0) + (bones-mtx-calc-execute) + ;; (generic-merc-execute-all gp-0) + ;; (shadow-execute-all gp-0) + ) + (lightning-draw-all) + ;(prim-engine-execute) + (none) + ) + +(defun real-main-draw-hook () + "Do all drawing! Called by main loop to run drawing for a frame. + Note that this also dispatches collide events, updates actors, etc. + It's a bit more than just drawing." + (local-vars (a0-115 int) (a0-117 int)) + (with-pp + (let ((v1-5 (-> *display* frames (-> *display* on-screen) global-buf))) + (set! (-> v1-5 end) (the pointer (&- (-> v1-5 end) (the-as uint (* (shr (+ (-> *display* mem-reserve-size) 8255) 6) 64))))) + ) + (when *display-bug-report* + (let ((v1-13 (-> *display* frames (-> *display* on-screen) global-buf))) + (&+! (-> v1-13 end) -262144) + ) + ) + (set! (-> *display* dma-buffer-overflow) #f) + (set! (-> *display* mem-reserve-size) (the-as uint 0)) + (when *slow-frame-rate* + (dotimes (v1-18 #xc3500) + (nop!) + (nop!) + (nop!) + (nop!) + (nop!) + (nop!) + ) + ) + "Function to be executed to set up for engine dma" + + ;; update renderer enable masks from menu + (set! (-> *display* vu1-enable-user) (-> *display* vu1-enable-user-menu)) + (set! (-> *texture-pool* texture-enable-user) (-> *texture-pool* texture-enable-user-menu)) + + ;; print memory stats + (when *debug-segment* + (when (and *stats-memory* (!= *master-mode* 'menu)) + (cond + (*stats-memory-short* + (dotimes (gp-0 (-> *level* length)) + (let ((s5-0 (-> *level* level gp-0))) + (if (= (-> s5-0 status) 'active) + (print-mem-usage (compute-memory-usage! s5-0 #f) s5-0 *stdcon*) + ) + ) + ) + ) + (else + (let ((gp-1 (-> *level* level *stats-memory-level-index*))) + (if (and gp-1 (= (-> gp-1 status) 'active)) + (print-mem-usage (compute-memory-usage! gp-1 #f) gp-1 *stdcon*) + ) + ) + ) + ) + ) + (reset! *dma-mem-usage*) + ) + + ;; reset foreground + (foreground-initialize-engines) + (reset! *prim-work*) + + ; ;; update wind/time of day prior to drawing. + (let ((gp-2 (-> 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)) + ) + ; (if (not (paused?)) + ; (update-wind *wind-work* *wind-scales*) + ; ) + (update-time-of-day *time-of-day-context*) + (set! (-> pp clock) gp-2) + ) + + ; ;; draw sky + ; (with-profiler 'sky *profile-sky-color* + ; (if (-> *sky-work* draw-vortex) + ; (draw-vortex) + ; (draw *sky-work*) + ; ) + ; (flush-cache 0) + ; ) + + + ; ;; 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) + ) + + ;; draw foreground + (foreground-engine-execute *foreground-draw-engine*) + + ;; do VU0/EE part of foreground drawing + (let ((gp-6 (-> 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)) + ) + (foreground-execute-cpu-vu0-engines) + (set! (-> pp clock) gp-6) + ) + + + ; (when *add-sphere* + ; ) + + ;; sprites/particles + (if (not (paused?)) + (execute-part-engine) + ) + (when (logtest? (vu1-renderer-mask sprite) (-> *display* vu1-enable-user)) + (if (not (get-screen-copied *blit-displays-work*)) + (sprite-draw *display*) + ) + ) + + ;; debug drawing + (when *debug-segment* + (debug-draw-actors *level* *display-actor-marks*) + (collide-shape-draw-debug-marks) + ) + ; (when *display-trail-graph* + ; (let ((a0-67 *trail-graph*)) + ; (if a0-67 + ; (debug-draw a0-67) + ; ) + ; ) + ; ) + + ;; dispatch collision events + (send-events-for-touching-shapes *touching-list*) + (free-nodes *touching-list*) + (prepare *collide-rider-pool*) + (send-all! *event-queue*) + + ;; level update actors: + (with-profiler 'actors *profile-actors-color* + (actors-update *level*) + ) + + ;; do navigation math + (with-profiler 'nav *profile-nav-color* + (update-nav-meshes-method *level*) + ) + + ;; draw the background + (with-profiler 'background *profile-background-color* + (init-background) + (execute-connections *background-draw-engine* #f) + (start-profiling! (-> *perf-stats* data (perf-stat-bucket background))) + (finish-background) + (stop-profiling! (-> *perf-stats* data (perf-stat-bucket background))) + (update-wait-stats + (-> *perf-stats* data (perf-stat-bucket background)) + (-> *background-work* wait-to-vu0) + (the-as uint 0) + (the-as uint 0) + ) + ) + + ;; end GOMI stats hack collection + (end-perf-stat-collection) + + ;; run collect-stats without the perf-stat collection running + (when (and (!= *master-mode* 'menu) *stats-poly*) + (dotimes (gp-13 (-> *level* length)) + (let ((v1-326 (-> *level* level gp-13))) + (if (= (-> v1-326 status) 'active) + (collect-stats (-> v1-326 bsp)) + ) + ) + ) + (print-terrain-stats) + ) + (when (not (paused?)) + (if (and (!= *master-mode* 'menu) *stats-perf*) + (print-perf-stats) + ) + (if (and (!= *master-mode* 'menu) *stats-collide*) + (print-collide-stats) + ) + ) + + ;; restart perf-stat collection + (start-perf-stat-collection) + 0 + (none) + ) + ) + +(defun main-draw-hook () + "Wrapper of real-main-draw-hook" + (real-main-draw-hook) + (none) + ) + +(define *draw-hook* main-draw-hook) + +;; WARN: Return type mismatch symbol vs none. +(defun default-init-buffer ((arg0 bucket-id) (arg1 gs-zbuf) (arg2 gs-test)) + "Initialize DMA chain for a bucket." + (let ((v1-0 *display*) + (t0-0 16) + ) + (+! (-> v1-0 mem-reserve-size) t0-0) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((t1-0 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> t1-0 real-buffer-end) (the-as int (&+ (-> t1-0 base) t0-0))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((v1-8 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + (when (!= v1-8 (-> v1-8 last)) + (let* ((a0-8 (-> *display* frames (-> *display* on-screen) global-buf)) + (a3-15 (-> a0-8 base)) + ) + (let ((t0-2 *display*) + (t1-2 176) + ) + (+! (-> t0-2 mem-reserve-size) t1-2) + (when (not (-> t0-2 dma-buffer-overflow)) + (let ((t3-0 (-> t0-2 frames (-> t0-2 on-screen) global-buf))) + (if (< (-> t3-0 real-buffer-end) (the-as int (&+ (-> t3-0 base) t1-2))) + (set! (-> t0-2 dma-buffer-overflow) #t) + ) + ) + (if (not (-> t0-2 dma-buffer-overflow)) + (dma-buffer-add-gs-set-flusha a0-8 + (zbuf-1 arg1) + (test-1 arg2) + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (pabe 0) + (clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))) + (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (texa (new 'static 'gs-texa :ta1 #x80)) + (texclut (new 'static 'gs-texclut :cbw #x4)) + (fogcol *fog-color*) + ) + ) + ) + ) + (let ((a1-17 (the-as dma-packet (-> a0-8 base)))) + (set! (-> a1-17 dma) (new 'static 'dma-tag :id (dma-tag-id next) :addr (-> v1-8 next))) + (set! (-> a1-17 vif0) (new 'static 'vif-tag)) + (set! (-> a1-17 vif1) (new 'static 'vif-tag)) + (set! (-> a0-8 base) (the-as pointer (&+ a1-17 16))) + ) + (set! (-> v1-8 next) (the-as uint a3-15)) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun default-end-buffer ((arg0 bucket-id) (arg1 gs-zbuf) (arg2 gs-test)) + "Add DMA data at the end of a bucket to reset settings." + (let ((v1-0 *display*) + (a3-0 16) + ) + (+! (-> v1-0 mem-reserve-size) a3-0) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((t1-0 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> t1-0 real-buffer-end) (the-as int (&+ (-> t1-0 base) a3-0))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((v1-8 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + (when (!= v1-8 (-> v1-8 last)) + (let* ((a3-6 (-> *display* frames (-> *display* on-screen) global-buf)) + (a0-8 (-> a3-6 base)) + ) + (let ((t0-11 *display*) + (t1-2 176) + ) + (+! (-> t0-11 mem-reserve-size) t1-2) + (when (not (-> t0-11 dma-buffer-overflow)) + (let ((t3-0 (-> t0-11 frames (-> t0-11 on-screen) global-buf))) + (if (< (-> t3-0 real-buffer-end) (the-as int (&+ (-> t3-0 base) t1-2))) + (set! (-> t0-11 dma-buffer-overflow) #t) + ) + ) + (if (not (-> t0-11 dma-buffer-overflow)) + (dma-buffer-add-gs-set-flusha a3-6 + (zbuf-1 arg1) + (test-1 arg2) + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (pabe 0) + (clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))) + (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (texa (new 'static 'gs-texa :ta1 #x80)) + (texclut (new 'static 'gs-texclut :cbw #x4)) + (fogcol *fog-color*) + ) + ) + ) + ) + (let ((t0-16 (-> a3-6 base))) + (let ((a1-17 (the-as dma-packet (-> a3-6 base)))) + (set! (-> a1-17 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> a1-17 vif0) (new 'static 'vif-tag)) + (set! (-> a1-17 vif1) (new 'static 'vif-tag)) + (set! (-> a3-6 base) (the-as pointer (&+ a1-17 16))) + ) + (set! (-> (the-as (pointer uint32) (-> v1-8 last)) 1) (the-as uint a0-8)) + (set! (-> v1-8 last) (the-as (pointer dma-tag) t0-16)) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +(defun-debug screen-shot-scale ((arg0 int) (arg1 string)) + (set! (-> *screen-shot-work* size) arg0) + (set! (-> *screen-shot-work* name) arg1) + (set! *display-profile* #f) + 0 + (none) + ) + +(defun-debug screen-shot () + "Take a screenshot." + (screen-shot-scale 1 "image") + 0 + (none) + ) + +;; WARN: Return type mismatch display vs none. +(defun display-frame-start ((arg0 display) (arg1 int) (arg2 float)) + "Advance clocks, poll pads/mouse, set up buckets." + + ;; workaround for PS2 hardware bug + ;; (set! (-> (the-as vif-bank #x10003c00) err me0) 1) + + ;; update clocks + (set-time-ratios *display* 1.0) + (tick! (-> arg0 frame-clock)) + (tick! (-> arg0 real-frame-clock)) + (set-time-ratios *display* arg2) + (tick! (-> arg0 session-clock)) + (tick! (-> arg0 game-clock)) + (tick! (-> arg0 total-game-clock)) + (tick! (-> arg0 base-clock)) + (tick! (-> arg0 real-clock)) + (tick! (-> arg0 target-clock)) + (tick! (-> arg0 camera-clock)) + (tick! (-> arg0 entity-clock)) + (tick! (-> arg0 bg-clock)) + (tick! (-> arg0 user0-clock)) + (tick! (-> arg0 user1-clock)) + (tick! (-> arg0 user2-clock)) + (tick! (-> arg0 user3-clock)) + (tick! (-> arg0 user4-clock)) + (tick! (-> arg0 user5-clock)) + (tick! (-> arg0 user6-clock)) + (tick! (-> arg0 user7-clock)) + (tick! (-> arg0 user8-clock)) + (tick! (-> arg0 user9-clock)) + (set! (-> arg0 bg-clock frame-counter) (the-as time-frame (mod (-> arg0 bg-clock frame-counter) #x69780))) + (tick! (-> arg0 part-clock)) + + (when (and (nonzero? *screen-shot-work*) (!= (-> *screen-shot-work* count) -1)) + (let ((v1-61 (-> *screen-shot-work* size))) + (if (!= (-> *screen-shot-work* count) (* v1-61 v1-61)) + (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* + (sync-path 0 0) + ) + (let ((v1-75 (-> s5-1 global-buf))) + (set! (-> v1-75 base) (-> v1-75 data)) + (set! (-> v1-75 end) (the-as pointer (+ (+ (-> v1-75 allocated-length) 28) (the-as int v1-75)))) + ) + (when *debug-segment* + (let ((v1-78 (-> s5-1 debug-buf))) + (set! (-> v1-78 base) (-> v1-78 data)) + (set! (-> v1-78 end) (the-as pointer (+ (+ (-> v1-78 allocated-length) 28) (the-as int v1-78)))) + ) + ) + (let ((v1-79 (-> s5-1 calc-buf))) + (set! (-> v1-79 base) (-> v1-79 data)) + (set! (-> v1-79 end) (the-as pointer (+ (+ (-> v1-79 allocated-length) 28) (the-as int v1-79)))) + ) + (*pre-draw-hook* (-> s5-1 calc-buf)) + (when (not (paused?)) + (clear *stdcon1*) + (debug-reset-buffers) + (clear! *simple-sprite-system*) + ) + (set! (-> s5-1 bucket-group) (dma-buffer-add-buckets (-> s5-1 calc-buf) 586)) + ) + (service-cpads) + (service-mouse) + (service-keybd) + (execute-connections *pad-engine* #f) + (none) + ) + +(defun display-frame-finish ((arg0 display)) + "Do final texture remaps, sync DMA (wait for previous rendering to finish), and finalize DMA chain." + (local-vars (a0-54 int) (a0-56 int)) + (with-pp + (let* ((s4-0 (-> arg0 frames (-> arg0 on-screen))) + (s5-0 (-> s4-0 calc-buf)) + ) + (-> s4-0 global-buf base) + (tfrag-vu1-init-buffers) + (tie-vu1-init-buffers) + (merc-vu1-init-buffers) + (emerc-vu1-init-buffers) + (generic-vu1-init-buffers) + (with-profiler 'texture *profile-texture-color* + (when (-> *texture-pool* update-sprites-flag) + (update-sprites *texture-pool*) + ;; TODO + (particle-adgif-cache-flush) + (remap-all-particles) + ) + (let ((s3-1 (-> pp clock))) + (if (= (-> *time-of-day-context* mode) (time-of-day-palette-id unk3)) + (set! (-> pp clock) (-> arg0 bg-clock)) + (set! (-> pp clock) (-> arg0 real-clock)) + ) + (upload-textures *texture-pool*) + (set! (-> pp clock) s3-1) + ) + (if (-> *texture-pool* update-flag) + (update-warp-and-hud *texture-pool*) + ) + (-> arg0 frames (-> arg0 on-screen) global-buf) + (update-eyes) + ) + (when *debug-segment* + (with-profiler 'debug *profile-debug-color* + (debug-draw-buffers) + ) + (with-profiler 'gs-sync *profile-gs-sync-color* + (when (nonzero? (sync-path 0 0)) + (*dma-timeout-hook*) + (reset-vif1-path) + (nop!) + (nop!) + 0 + ) + ) + (let ((s3-7 (-> arg0 frames (-> arg0 on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-148 (+ (-> s3-7 depth) -1)) + (s2-6 (-> s3-7 segment v1-148)) + (s1-6 (-> s3-7 base-time)) + ) + (when (>= v1-148 0) + (set! (-> s2-6 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s1-6)))) + (+! (-> s3-7 depth) -1) + ) + ) + ) + ) + 0 + (stop-profiling! (-> *perf-stats* data 0)) + ; (let ((v1-155 (-> *perf-stats* data))) + ; (b! (zero? (-> v1-155 0 ctrl)) cfg-63 :delay (nop!)) + ; (.mtc0 Perf 0) + ; (.sync.l) + ; (.sync.p) + ; (.mfpc a0-54 pcr0) + ; (+! (-> v1-155 0 accum0) a0-54) + ; (.mfpc a0-56 pcr1) + ; (+! (-> v1-155 0 accum1) a0-56) + ; ) + ; (label cfg-63) + ; 0 + (with-dma-buffer-add-bucket ((s2-7 (-> arg0 frames (-> arg0 on-screen) debug-buf)) + (bucket-id debug-no-zbuf2) + ) + (when (and (or *display-profile* *stats-profile-bars*) (not *display-capture-mode*)) + (postprocess-data! (-> arg0 frames (-> arg0 on-screen) profile-array)) + (let ((a2-0 7)) + (if *display-profile* + (draw-bars! *profile-array* s2-7 a2-0) + ) + ) + (if (and (!= *master-mode* 'menu) *stats-profile-bars*) + (draw-text! *profile-array*) + ) + ) + (when *display-deci-count* + (let ((s1-7 draw-string-xy)) + (format (clear *temp-string*) "~D" *deci-count*) + (s1-7 *temp-string* s2-7 448 210 (font-color default) (font-flags shadow kerning)) + ) + ) + + (#when PC_PORT + (draw *pc-settings* s2-7) + (draw-memory *pc-settings* s2-7) + (print-debug-misc *pc-settings*) + ) + (display-file-info) + ) + ) + (let ((s3-9 6) + (s2-8 583) + ) + (while (>= s2-8 s3-9) + (default-end-buffer + (the-as bucket-id s3-9) + (new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24)) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (+! s3-9 1) + ) + ) + (default-init-buffer + (bucket-id debug-no-zbuf1) + (new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24) :zmsk #x1) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest always)) + ) + (default-init-buffer + (bucket-id debug-no-zbuf2) + (new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24) :zmsk #x1) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest always)) + ) + (default-init-buffer + (bucket-id tex-hud-pris2) + (new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24) :zmsk #x1) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest always)) + ) + (default-init-buffer + (bucket-id bucket8) + (new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24)) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest always)) + ) + (*post-draw-hook* (-> arg0 frames (-> arg0 on-screen) calc-buf)) + (let ((v1-199 *display*) + (a0-75 16) + ) + (+! (-> v1-199 mem-reserve-size) a0-75) + (when (not (-> v1-199 dma-buffer-overflow)) + (let ((a2-9 (-> v1-199 frames (-> v1-199 on-screen) global-buf))) + (if (< (-> a2-9 real-buffer-end) (the-as int (&+ (-> a2-9 base) a0-75))) + (set! (-> v1-199 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-199 dma-buffer-overflow)) + (let* ((v1-201 s5-0) + (a0-79 (the-as dma-packet (-> v1-201 base))) + ) + (set! (-> a0-79 dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> a0-79 vif0) (new 'static 'vif-tag :imm #x24b :cmd (vif-cmd mark))) + (set! (-> a0-79 vif1) (new 'static 'vif-tag :cmd (vif-cmd flushe) :irq #x1 :msk #x1)) + (set! (-> v1-201 base) (the-as pointer (&+ a0-79 16))) + ) + ) + ) + ) + (dma-buffer-patch-buckets (the-as dma-bucket (-> s4-0 bucket-group)) 586) + (let ((v1-202 *display*) + (a0-81 16) + ) + (+! (-> v1-202 mem-reserve-size) a0-81) + (when (not (-> v1-202 dma-buffer-overflow)) + (let ((a2-11 (-> v1-202 frames (-> v1-202 on-screen) global-buf))) + (if (< (-> a2-11 real-buffer-end) (the-as int (&+ (-> a2-11 base) a0-81))) + (set! (-> v1-202 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-202 dma-buffer-overflow)) + (let* ((v1-204 s5-0) + (a0-85 (-> v1-204 base)) + ) + (set! (-> (the-as (pointer int64) a0-85)) #x70000000) + (set! (-> (the-as (pointer uint64) a0-85) 1) (the-as uint 0)) + (set! (-> v1-204 base) (&+ a0-85 16)) + ) + ) + ) + ) + (flush-cache 0) + (when (not (paused?)) + (when *stats-buffer* + (let* ((a0-87 (-> s4-0 global-buf)) + (v1-208 (-> s5-0 base)) + (a2-13 (-> s5-0 data)) + (s4-1 (-> a0-87 base)) + (s5-1 (-> a0-87 data)) + (s3-10 (-> a0-87 end)) + ) + (format *stdcon* "~0kvu1 buf = ~d~%" (&- v1-208 (the-as uint a2-13))) + (format *stdcon* "~0kglobal buf = ~d~%" (&- s4-1 (the-as uint s5-1))) + (format *stdcon* "~0kbase = #x~x~%" s4-1) + (format *stdcon* "~0kend = #x~x~%" s3-10) + ) + ) + ) + ) + arg0 + ) + ) + +(defun determine-pause-mode () + "Update pause modes" + (when (and (or (not *progress-process*) (can-go-back? (-> *progress-process* 0))) + (or (!= *master-mode* 'freeze) (and *debug-segment* (cpad-pressed? 0 select start) (cpad-hold? 0 l3))) + ) + (if (or (cpad-pressed? 0 select start) + (cond + ((= *master-mode* 'menu) + (cpad-pressed? 0 r3 r2 triangle circle) + ) + (*cam-layout* + #f + ) + (else + #f + ) + ) + (or (and (logtest? (-> *cpad-list* cpads 0 valid) 128) + (= *master-mode* 'game) + (>= (-> *display* base-clock frame-counter) (-> *game-info* blackout-time)) + (= (-> *setting-control* user-current bg-a) 0.0) + (and (= (-> *setting-control* user-current bg-a-force) 0.0) + (< (seconds 1003) (-> *display* real-clock frame-counter)) + ) + ) + (and (cpad-pressed? 0 r2) (or (= *master-mode* 'pause) (= *master-mode* 'menu))) + *pause-lock* + ) + ) + (toggle-pause) + ) + ) + (if (and *progress-process* (!= *master-mode* 'progress)) + (deactivate-progress) + ) + 0 + (none) + ) + +(defun calc-ratio ((arg0 int) (arg1 int)) + (let ((f0-1 (the float (sar (- arg0 arg1) 48)))) + (if (< f0-1 0.0) + (set! f0-1 (+ 65536.0 f0-1)) + ) + (/ f0-1 (the float *ticks-per-frame*)) + ) + ) + +;; og:preserve-this pc port function +(defun pc-maybe-vsync () + "PC Port implementation of the block of code in display-sync that computes frame-time-ratio and maybe vsyncs." + ;; for now, it's very simple. + + ;; I think the right logic in the future is to always vsync here, but return a more accurate dog ratio. + + (syncv 0) ;; sync always! + 1.0 ;; and report that we run at full speed. + ) + +(defun display-sync ((arg0 display)) + ;; wait for VU1 rendering to complete. + (sync-path 0 0) + + ;; measure the time it took for this frame + (let* ((s4-0 (-> arg0 last-screen)) + (s2-0 (shl (timer-count (the-as timer-bank #x10000800)) 48)) + (s5-0 (shl (-> arg0 frames s4-0 start-time) 48)) + (a1-1 (shl (-> arg0 vblank-start-time 0) 48)) + (s1-0 (shl (-> arg0 vblank-start-time 1) 48)) + ) + + ;; the *ticks-per-frame* is set based on vblank interrupt timing. Just lock it, like we did for Jak 2. + ;; this value should be related the PS2's NTSC/PAL output system. + ;; (set! *ticks-per-frame* (max 9000 (min #x2ee0 (sar (- s1-0 a1-1) 48)))) + (set! *ticks-per-frame* 9765) + + (let ((f28-0 (the float *ticks-per-frame*)) + (s3-0 (sar (- s2-0 s5-0) 48)) + (f30-1 (fmax 1.0 (calc-ratio (the-as int s2-0) (the-as int s5-0)))) + ) + (/ (the float (sar (- s2-0 (the-as uint s1-0)) 48)) f28-0) + (let ((f28-1 (/ (the float (sar (- s2-0 (the-as uint s1-0)) 48)) f28-0)) + (f26-0 (fmax 1.0 (fmin 4.0 (-> *display* dog-ratio)))) + ) + (if (< (the-as int s3-0) 0) + (set! s3-0 (the uint (+ #x10000 s3-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 + ; ((-> arg0 run-half-speed) + ; (syncv 0) + ; (let ((a0-8 (shl (timer-count (the-as timer-bank #x10000800)) 48))) + ; (if (and (< (calc-ratio (the-as int a0-8) (the-as int s5-0)) 2.0) (< f28-1 0.9)) + ; (syncv 0) + ; ) + ; ) + ; 2.0 + ; ) + ; ((< 1.0 f30-1) + ; (when (> (-> arg0 force-sync) 0) + ; (syncv 0) + ; (+! (-> arg0 force-sync) -1) + ; (let ((a0-12 (shl (timer-count (the-as timer-bank #x10000800)) 48))) + ; (set! f30-1 (calc-ratio (the-as int a0-12) (the-as int s5-0))) + ; ) + ; ) + ; f30-1 + ; ) + ; ((and (= f30-1 1.0) (< f30-1 f26-0)) + ; (while (< f30-1 f26-0) + ; (let ((a0-14 (shl (timer-count (the-as timer-bank #x10000800)) 48))) + ; (set! f30-1 (calc-ratio (the-as int a0-14) (the-as int s5-0))) + ; ) + ; (if (< f30-1 0.0) + ; (set! f30-1 f26-0) + ; ) + ; ) + ; 1.0 + ; ) + ; (else + ; (if (< f28-1 0.9) + ; (syncv 0) + ; ) + ; f30-1 + ; ) + ; ) + ; ) + ) + + ;; always vsync: + (set! f30-1 (pc-maybe-vsync)) + + ;; remember start time: + (let ((s4-1 (-> arg0 on-screen))) + (let ((v1-50 (timer-count (the-as timer-bank #x10000800)))) + (let ((a0-19 (sar (- (shl v1-50 48) s5-0) 48))) + (if (< (the-as int a0-19) 0) + (set! a0-19 (the uint (+ #x10000 a0-19))) + ) + (+! (-> arg0 total-run-time) a0-19) + ) + (set! (-> arg0 frames s4-1 start-time) v1-50) + ) + + ;; (set-graphics-mode) + + ;; start dma + (let ((s5-1 (-> arg0 frames s4-1 calc-buf))) + (when (nonzero? (dma-buffer-length s5-1)) + ;; swap buffers + (+! s4-1 1) + (if (< 1 s4-1) + (set! s4-1 0) + ) + (set! (-> arg0 last-screen) (-> arg0 on-screen)) + (set! (-> arg0 on-screen) s4-1) + ;; reset VU profiler + (when *debug-segment* + (set! *profile-interrupt-segment* (-> *display* frames (-> *display* last-screen) profile-array data 1)) + (set! (-> *profile-interrupt-segment* depth) 0) + (set! (-> *profile-interrupt-segment* max-depth) 1) + ) + ;; DMA! + (if (not (-> *display* dma-buffer-overflow)) + ;; (dma-buffer-send-chain (the-as dma-bank-source #x10009000) s5-1) + (__send-gfx-dma-chain (the-as dma-bank-source #x10009000) (-> s5-1 data)) + + ) + ) + ) + (determine-pause-mode) + (when (and (nonzero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1) (!= (-> *screen-shot-work* size) -1)) + (let ((v1-82 (-> *screen-shot-work* size))) + (set! (-> *screen-shot-work* count) (* v1-82 v1-82)) + ) + (set-master-mode 'pause) + ) + (display-frame-start arg0 s4-1 f30-1) + ) + ) + ) + (none) + ) diff --git a/goal_src/jak3/engine/engine/engines.gc b/goal_src/jak3/engine/engine/engines.gc index b66c427156..299770373c 100644 --- a/goal_src/jak3/engine/engine/engines.gc +++ b/goal_src/jak3/engine/engine/engines.gc @@ -11,6 +11,7 @@ :bitfield #t (pls0 0) (pls1 1) + (pls2 2) ) ;; ---part-local-space-flags diff --git a/goal_src/jak3/engine/entity/entity-h.gc b/goal_src/jak3/engine/entity/entity-h.gc index 4651cb7922..47318cab24 100644 --- a/goal_src/jak3/engine/entity/entity-h.gc +++ b/goal_src/jak3/engine/entity/entity-h.gc @@ -32,12 +32,16 @@ (declare-type race-mesh basic) (declare-type nav-poly structure) +(define-extern process-by-ename (function string process)) (define-extern entity-by-name (function string entity)) (define-extern entity-by-aid (function uint entity)) (define-extern reset-actors (function symbol none)) (define-extern process-entity-status! (function process entity-perm-status symbol entity-perm-status)) (define-extern process-drawable-from-entity! (function process-drawable entity-actor none)) (define-extern init-entity (function process entity-actor type none)) +(define-extern entity-by-type (function type entity-actor)) +(define-extern entity-actor-from-level-name (function symbol entity-actor)) +(define-extern birth-viewer (function process entity-actor object)) (define-extern *spawn-actors* symbol) @@ -89,7 +93,7 @@ (task game-task :overlay-at (-> perm task)) ) (:methods - (entity-links-method-9 () none) + (birth? (_type_ vector) symbol) ) ) @@ -172,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 ae31d78fb8..529ca0fec5 100644 --- a/goal_src/jak3/engine/entity/entity-table.gc +++ b/goal_src/jak3/engine/entity/entity-table.gc @@ -7,3 +7,308 @@ ;; DECOMP BEGINS +;; TODO stub +(define *entity-info* (new 'static 'boxed-array :type entity-info + (new 'static 'entity-info + :ptype (type-ref factory-boss :method-count 31) + :pool '*16k-dead-pool* + :heap-size #x8000 + ) + (new 'static 'entity-info + :ptype (type-ref flitter-spawner :method-count 22) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :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) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref bt-grunt :method-count 0) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref bt-roboguard :method-count 0) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref w-parking-spot :method-count 27) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref min-elevator :method-count 52) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref tpl-bouncer :method-count 28) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref veger-npc :method-count 40) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref seem-npc :method-count 40) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref krimson-wall :method-count 0) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref kleever-catch-lizards :method-count 21) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref kleever-npc :method-count 40) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref damus-npc :method-count 40) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :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 36) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref ladder :method-count 27) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mh-centipede :method-count 0) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref dark-tower :method-count 0) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :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 21) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :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 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref a :method-count 0) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :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 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :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 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :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 21) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :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 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :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 22) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :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 35) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-puffer :method-count 35) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref a :method-count 0) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref searchlight :method-count 0) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref ctyn-lamp :method-count 0) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref burning-bush :method-count 0) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref sail-boat-a :method-count 0) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref barge :method-count 0) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref boat-manager :method-count 0) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref propa :method-count 0) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref city-window-a :method-count 0) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref cty-window-a :method-count 0) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref parking-spot :method-count 0) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref security-wall :method-count 0) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref cty-guard-turret :method-count 0) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref cty-fruit-stand :method-count 0) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref fruit-stand :method-count 31) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref torn :method-count 0) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref neon-baron :method-count 0) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + ) + ) + +(defun entity-info-lookup ((arg0 type)) + (the-as entity-info (cond + ((nonzero? (-> arg0 method-table 13)) + (-> arg0 method-table 13) + ) + (else + (let ((v1-1 *entity-info*)) + (dotimes (a1-0 (-> v1-1 length)) + (let ((a2-3 (-> v1-1 a1-0 ptype))) + (when (if (logtest? (the-as int a2-3) 1) + (= (-> arg0 symbol) a2-3) + (= arg0 a2-3) + ) + (set! (-> arg0 method-table 13) (the-as function (-> v1-1 a1-0))) + (return (the-as entity-info (-> v1-1 a1-0))) + ) + ) + ) + ) + (set! (-> arg0 method-table 13) #f) + (the-as basic #f) + ) + ) + ) + ) \ No newline at end of file diff --git a/goal_src/jak3/engine/entity/entity.gc b/goal_src/jak3/engine/entity/entity.gc index dfd3d69007..cbce3b963f 100644 --- a/goal_src/jak3/engine/entity/entity.gc +++ b/goal_src/jak3/engine/entity/entity.gc @@ -7,3 +7,2553 @@ ;; DECOMP BEGINS +(define *spawn-actors* #t) + +(define *compact-actors* #t) + +(define *vis-actors* #t) + +;; WARN: Return type mismatch int vs drawable-actor. +(defmethod mem-usage ((this drawable-actor) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 45 (-> usage length))) + (set! (-> usage data 44 name) "entity") + (+! (-> usage data 44 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 44 used) v1-6) + (+! (-> usage data 44 total) (logand -16 (+ v1-6 15))) + ) + (mem-usage (-> this actor) usage (logior flags 64)) + (the-as drawable-actor 0) + ) + +;; WARN: Return type mismatch int vs drawable-inline-array-actor. +(defmethod mem-usage ((this drawable-inline-array-actor) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-5 32)) + (+! (-> usage data 0 used) v1-5) + (+! (-> usage data 0 total) (logand -16 (+ v1-5 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this data s3-0) usage flags) + ) + (the-as drawable-inline-array-actor 0) + ) + +(defmethod print ((this entity-links)) + (format #t "#" (-> this process) this) + this + ) + +(defmethod print ((this entity-perm)) + (format + #t + "#" + (-> this aid) + (-> this task) + (-> this status) + (-> this user-uint64) + this + ) + this + ) + +(defmethod print ((this actor-group)) + (format #t "# this length)) + (format #t " ~A" (-> this data s5-0 actor)) + ) + (format #t " @ #x~X>" this) + this + ) + + +(defmethod birth! ((this entity)) + (format #t "birth ~A~%" this) + this + ) + +(defmethod kill! ((this entity)) + (format #t "kill ~A~%" this) + this + ) + +(defmethod print ((this entity)) + (format #t "#<~A :name ~S @ #x~X>" (-> this type) (res-lump-struct this 'name structure) this) + this + ) + +(defmethod get-level ((this entity)) + (dotimes (v1-0 (-> *level* length)) + (let ((a1-3 (-> *level* level v1-0))) + (when (= (-> a1-3 status) 'active) + (if (and (>= (the-as int this) (the-as int (-> a1-3 heap base))) + (< (the-as int this) (the-as int (-> a1-3 heap top-base))) + ) + (return a1-3) + ) + ) + ) + ) + (-> *level* level-default) + ) + +(defun entity-by-name ((arg0 string)) + (if (not arg0) + (return (the-as entity #f)) + ) + (dotimes (s5-0 (-> *level* length)) + (let ((s4-0 (-> *level* level s5-0))) + (when (= (-> s4-0 status) 'active) + (let ((s3-0 (-> s4-0 bsp actors))) + (when (nonzero? s3-0) + (dotimes (s2-0 (-> s3-0 length)) + (let ((s1-0 (-> s3-0 data s2-0 actor))) + (if (string= (res-lump-struct s1-0 'name string) arg0) + (return s1-0) + ) + ) + ) + ) + ) + (let ((s3-1 (-> s4-0 bsp nav-meshes))) + (when (nonzero? s3-1) + (dotimes (s2-1 (-> s3-1 length)) + (let ((s1-1 (-> s3-1 s2-1))) + (if (string= (res-lump-struct s1-1 'name string) arg0) + (return s1-1) + ) + ) + ) + ) + ) + (let ((s3-2 (-> s4-0 bsp race-meshes))) + (when (nonzero? s3-2) + (dotimes (s2-2 (-> s3-2 length)) + (let ((s1-2 (-> s3-2 s2-2))) + (if (string= (res-lump-struct s1-2 'name string) arg0) + (return s1-2) + ) + ) + ) + ) + ) + (let ((s4-1 (-> s4-0 bsp cameras))) + (when (nonzero? s4-1) + (dotimes (s3-3 (-> s4-1 length)) + (let ((s2-3 (-> s4-1 s3-3))) + (if (string= (res-lump-struct s2-3 'name string) arg0) + (return s2-3) + ) + ) + ) + ) + ) + ) + ) + ) + (the-as entity #f) + ) + +(defun entity-by-type ((arg0 type)) + (dotimes (s5-0 (-> *level* length)) + (let ((v1-3 (-> *level* level s5-0))) + (when (= (-> v1-3 status) 'active) + (let ((s4-0 (-> v1-3 bsp actors))) + (when (nonzero? s4-0) + (dotimes (s3-0 (-> s4-0 length)) + (let ((s2-0 (-> s4-0 data s3-0 actor))) + (if (and (type? s2-0 entity-actor) (= (-> s2-0 etype) arg0)) + (return s2-0) + ) + ) + ) + ) + ) + ) + ) + ) + (the-as entity-actor #f) + ) + +(defun entity-by-aid ((arg0 uint)) + (dotimes (v1-0 (-> *level* length)) + (let ((a1-3 (-> *level* level v1-0))) + (when (= (-> a1-3 status) 'active) + (let ((a1-4 (-> a1-3 entity))) + (when (nonzero? a1-4) + (let ((a2-4 0) + (a3-2 (+ (-> a1-4 length) -1)) + ) + 0 + (while (>= a3-2 a2-4) + (let* ((t0-3 (+ a2-4 (/ (- a3-2 a2-4) 2))) + (t1-2 (-> a1-4 data t0-3)) + (t2-0 (-> t1-2 perm aid)) + ) + (cond + ((= t2-0 arg0) + (return (-> t1-2 entity)) + ) + ((< (the-as uint t2-0) arg0) + (set! a2-4 (+ t0-3 1)) + ) + (else + (set! a3-2 (+ t0-3 -1)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (the-as entity #f) + ) + +;; WARN: Return type mismatch entity vs entity-actor. +(defun entity-actor-from-level-name ((arg0 symbol)) + (let ((v0-0 (the-as entity #f))) + (dotimes (s5-0 (-> *level* length)) + (let ((s4-0 (-> *level* level s5-0))) + (when (= (-> s4-0 status) 'active) + (when (= (-> s4-0 name) arg0) + (when (zero? (-> s4-0 entity length)) + (format 0 "ERROR: level ~s has no entities!!" (-> s4-0 name)) + (when *debug-segment* + (break!) + 0 + ) + ) + (set! v0-0 (-> s4-0 entity data 0 entity)) + ) + ) + ) + ) + (the-as entity-actor v0-0) + ) + ) + +(defmethod update-nav-meshes-method ((this level-group)) + (when (not (paused?)) + (dotimes (s5-0 (-> this length)) + (let ((v1-4 (-> this level s5-0))) + (when (= (-> v1-4 status) 'active) + (let ((s4-0 (-> v1-4 bsp nav-meshes))) + (when (nonzero? s4-0) + (dotimes (s3-0 (-> s4-0 length)) + (update-navigation (-> s4-0 s3-0 nav-mesh)) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defun entity-nav-mesh-by-aid ((arg0 actor-id)) + (dotimes (v1-0 (-> *level* length)) + (let ((a1-3 (-> *level* level v1-0))) + (when (= (-> a1-3 status) 'active) + (let ((a1-5 (-> a1-3 bsp nav-meshes))) + (when (nonzero? a1-5) + (let ((a2-4 0) + (a3-2 (+ (-> a1-5 length) -1)) + ) + 0 + (while (>= a3-2 a2-4) + (let* ((t0-3 (+ a2-4 (/ (- a3-2 a2-4) 2))) + (t1-2 (-> a1-5 t0-3)) + (t2-0 (-> t1-2 aid)) + ) + (cond + ((= t2-0 arg0) + (return t1-2) + ) + ((< t2-0 (the-as uint arg0)) + (set! a2-4 (+ t0-3 1)) + ) + (else + (set! a3-2 (+ t0-3 -1)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (the-as entity-nav-mesh #f) + ) + +(defun nav-mesh-from-res-tag ((arg0 entity) (arg1 symbol) (arg2 int)) + (let ((v1-1 (res-lump-data arg0 arg1 pointer)) + (gp-0 (the-as nav-mesh #f)) + ) + (when v1-1 + (let* ((s5-1 (entity-nav-mesh-by-aid (the-as actor-id (-> (the-as (pointer uint32) (&+ v1-1 (* arg2 4))))))) + (v1-3 (if (type? s5-1 entity-nav-mesh) + s5-1 + ) + ) + ) + (if v1-3 + (set! gp-0 (-> v1-3 nav-mesh)) + ) + ) + ) + gp-0 + ) + ) + +(defun entity-by-meters ((arg0 float) (arg1 float) (arg2 float)) + (dotimes (v1-0 (-> *level* length)) + (let ((a3-3 (-> *level* level v1-0))) + (when (= (-> a3-3 status) 'active) + (let ((a3-5 (-> a3-3 bsp actors))) + (when (nonzero? a3-5) + (dotimes (t0-4 (-> a3-5 length)) + (let* ((t1-3 (-> a3-5 data t0-4 actor)) + (t2-1 (-> t1-3 extra trans)) + ) + (if (and (= (the float (the int (-> t2-1 x))) arg0) + (= (the float (the int (-> t2-1 y))) arg1) + (= (the float (the int (-> t2-1 z))) arg2) + ) + (return t1-3) + ) + ) + ) + ) + ) + ) + ) + ) + (the-as entity-actor #f) + ) + +(defun process-by-ename ((arg0 string)) + (let ((v1-0 (entity-by-name arg0))) + (if v1-0 + (-> v1-0 extra process) + ) + ) + ) + +(defun entity-process-count ((arg0 symbol)) + (let ((gp-0 0)) + (dotimes (s4-0 (-> *level* length)) + (let ((s3-0 (-> *level* level s4-0))) + (when (= (-> s3-0 status) 'active) + (let ((s2-0 (-> s3-0 bsp level entity))) + (dotimes (s1-0 (-> s2-0 length)) + (let ((v1-9 (-> s2-0 data s1-0 entity))) + (case arg0 + (('vis) + (if (is-object-visible? s3-0 (-> v1-9 extra vis-id)) + (+! gp-0 1) + ) + ) + (else + (if (-> v1-9 extra process) + (+! gp-0 1) + ) + ) + ) + ) + ) + ) + ) + ) + ) + gp-0 + ) + ) + +(defun entity-count () + (let ((v0-0 0)) + (dotimes (v1-0 (-> *level* length)) + (let ((a0-3 (-> *level* level v1-0))) + (when (= (-> a0-3 status) 'active) + (let ((a0-6 (-> a0-3 bsp level entity))) + (dotimes (a1-3 (-> a0-6 length)) + (-> a0-6 data a1-3 entity) + (+! v0-0 1) + ) + ) + ) + ) + ) + v0-0 + ) + ) + +(defun entity-remap-names ((arg0 pair)) + (let ((s5-0 (car arg0))) + (while (not (null? arg0)) + (let ((a0-2 (entity-by-meters + (the float (/ (the-as int (car (cdr s5-0))) 8)) + (the float (/ (the-as int (car (cdr (cdr s5-0)))) 8)) + (the float (/ (the-as int (car (cdr (cdr (cdr s5-0))))) 8)) + ) + ) + ) + (if a0-2 + (add-data! + a0-2 + (new 'static 'res-tag :name 'name :key-frame -1000000000.0 :elt-count #x1 :elt-type string) + (the-as pointer (car s5-0)) + ) + ) + ) + (set! arg0 (cdr arg0)) + (set! s5-0 (car arg0)) + ) + ) + 0 + (none) + ) + +(defun-debug process-status-bits ((arg0 process) (arg1 symbol)) + (let* ((s5-0 arg0) + (s3-0 (if (type? s5-0 process-drawable) + (the-as process-drawable s5-0) + ) + ) + ) + (if (and s3-0 (zero? (-> s3-0 draw))) + (set! s3-0 (the-as process-drawable #f)) + ) + (let ((s5-1 format) + (s4-0 "~C~C~C") + (a2-0 (if (and arg0 (not (logtest? (-> *kernel-context* prevent-from-run) (-> arg0 mask))) (run-logic? arg0)) + 114 + 32 + ) + ) + (a3-0 (if (and s3-0 (logtest? (-> s3-0 draw status) (draw-control-status on-screen))) + 100 + 32 + ) + ) + (t0-0 (cond + ((and s3-0 (logtest? (-> s3-0 draw status) (draw-control-status on-screen))) + (let ((v1-14 (-> s3-0 draw cur-lod))) + (cond + ((zero? v1-14) + 48 + ) + ((= v1-14 1) + 49 + ) + ((= v1-14 2) + 50 + ) + ((= v1-14 3) + 51 + ) + ((= v1-14 4) + 52 + ) + ) + ) + ) + (else + 32 + ) + ) + ) + ) + (s5-1 arg1 s4-0 a2-0 a3-0 t0-0) + ) + ) + 0 + (none) + ) + +(defun process-entity-set! ((arg0 process) (arg1 entity)) + (set! (-> arg0 entity) (the-as entity-actor arg1)) + (if arg1 + (set! (-> arg0 level) (-> arg1 extra level)) + (set! (-> arg0 level) (-> *level* level-default)) + ) + arg1 + ) + +(defun process-task-mask ((arg0 process)) + (-> 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)) + (format + #t + "#<~A ~S ~A :state ~S :flags " + (-> this type) + (-> this name) + (-> this status) + (if (-> this state) + (-> this state name) + ) + ) + (process-status-bits this #t) + (format + #t + " :stack ~D/~D :heap ~D/~D @ #x~X>" + (&- (-> this top-thread stack-top) (the-as uint (-> this top-thread sp))) + (-> this main-thread stack-size) + (- (-> this allocated-length) (&- (-> this heap-top) (the-as uint (-> this heap-cur)))) + (-> this allocated-length) + this + ) + ) + (else + (format + #t + "#<~A ~S ~A :state ~S @ #x~X" + (-> this type) + (-> this name) + (-> this status) + (if (-> this state) + (-> this state name) + ) + this + ) + ) + ) + this + ) + + + + +;; WARN: Return type mismatch entity-actor vs none. +(defmethod debug-print ((this entity-actor) (arg0 symbol) (arg1 type)) + (let ((s4-0 (-> this etype))) + (when (or (not arg1) (and s4-0 (valid? s4-0 type (the-as string #f) #f 0) (type-type? s4-0 arg1))) + (format #t "~5D #x~8X ~-26S" (-> this extra vis-id) this (res-lump-struct this 'name structure)) + (let ((t9-4 format) + (a0-5 #t) + (a1-5 "~8D ~3D ~-8S #x~4X") + (a2-4 (-> this extra perm aid)) + (a3-3 (-> this extra perm task)) + (t0-3 (-> this extra level nickname)) + ) + (set! t0-3 (cond + (t0-3 + (empty) + t0-3 + ) + (else + (-> this extra level name) + ) + ) + ) + (t9-4 a0-5 a1-5 a2-4 a3-3 t0-3 (-> this extra perm status)) + ) + (if (= arg0 'entity-meters) + (format #t " :trans ~14m ~14m ~14m " (-> this extra trans x) (-> this extra trans y) (-> this extra trans z)) + (format + #t + " :trans ~11,,1f ~11,,1f ~11,,1f " + (-> this extra trans x) + (-> this extra trans y) + (-> this extra trans z) + ) + ) + (let* ((s3-2 (-> this extra process)) + (s4-2 (if (type? s3-2 process-drawable) + s3-2 + ) + ) + ) + (format + #t + ":pr #x~8X ~-18S ~-5S/~-5S " + (if (-> this extra process) + (-> this extra process) + 0 + ) + (if (and (-> this extra process) (-> this extra process state)) + (-> this extra process state name) + "" + ) + (if (-> this extra process) + (* (- (-> this extra process allocated-length) + (&- (-> this extra process heap-top) (the-as uint (-> this extra process heap-cur))) + ) + 8 + ) + "" + ) + (if (-> this extra process) + (* (-> this extra process allocated-length) 8) + "" + ) + ) + (process-status-bits s4-2 #t) + ) + (format #t "~%") + (if (= arg0 'entity-perm) + (format #t " ~`entity-perm`P~%" (-> this extra perm)) + ) + ) + ) + (none) + ) + +(defmethod debug-print-entities ((this level-group) (arg0 symbol) (arg1 type) (arg2 string)) + (let ((t9-0 format) + (a0-1 #t) + (a1-1 + " id address name aid tsk lev status x y z address state heap flags~%" + ) + ) + 0 + 0 + 0 + (t9-0 a0-1 a1-1) + ) + (dotimes (s2-0 (-> this length)) + (let ((s1-0 (-> this level s2-0))) + (when (= (-> s1-0 status) 'active) + (when (or (not arg2) (= arg2 (-> s1-0 name))) + (case arg0 + (('art-group) + (format #t "level ~A~%" (-> s1-0 name)) + (dotimes (s0-0 (-> s1-0 art-group art-group-array length)) + (format #t "~T~2D ~S~%" s0-0 (-> s1-0 art-group art-group-array s0-0 name)) + ) + ) + (else + (let ((s1-1 (-> s1-0 bsp level entity))) + (dotimes (s0-1 (-> s1-1 length)) + (debug-print (the-as entity-actor (-> s1-1 data s0-1 entity)) arg0 arg1) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch entity-actor vs none. +(defmethod add-to-level! ((this entity-actor) (arg0 level-group) (arg1 level) (arg2 actor-id)) + (let ((v1-4 (-> arg1 entity data (-> arg1 entity length)))) + (+! (-> arg1 entity length) 1) + (set! (-> v1-4 process) #f) + (set! (-> v1-4 entity) this) + (set! (-> this extra) v1-4) + (cond + ((-> arg0 entity-link) + (let* ((a0-6 (-> arg0 entity-link)) + (t0-1 (-> a0-6 next-link)) + ) + (set! (-> a0-6 next-link) v1-4) + (set! (-> v1-4 prev-link) a0-6) + (set! (-> v1-4 next-link) t0-1) + (set! (-> t0-1 prev-link) v1-4) + ) + ) + (else + (set! (-> v1-4 prev-link) v1-4) + (set! (-> v1-4 next-link) v1-4) + ) + ) + (set! (-> arg0 entity-link) v1-4) + (set! (-> v1-4 trans quad) (-> this trans quad)) + ) + (set! (-> this extra perm aid) arg2) + (set! (-> this extra level) arg1) + (set! (-> this extra kill-mask) + (logior (logand (-> this kill-mask) + (task-mask + task0 + task1 + task2 + task3 + task4 + task5 + task6 + task7 + done + dummy0 + dummy1 + vehicle + special + primary0 + ctywide + never + ) + ) + (logclear + (task-mask movie0 movie1 movie2 tm19 tm20 tm21 tm22 tm23 tm24 tm25 tm26 tm27 tm28 tm29 tm30 tm31) + (-> this kill-mask) + ) + ) + ) + (if (not (-> arg1 vis-info 0)) + (set! (-> this extra vis-dist) (res-lump-float this 'vis-dist :default 40960000.0)) + ) + (cond + ((= (-> this type) entity-actor) + (set! (-> this extra perm task) (-> this task)) + (set! (-> this extra vis-id) (-> this vis-id)) + ) + (else + (set! (-> this extra perm task) (game-task none)) + (set! (-> this extra vis-id) 0) + 0 + ) + ) + (none) + ) + +(defmethod remove-from-level! ((this entity) (arg0 level-group)) + (let ((v1-0 (-> this extra))) + (cond + ((= (-> v1-0 next-link) v1-0) + (set! (-> arg0 entity-link) #f) + ) + (else + (set! (-> v1-0 next-link prev-link) (-> v1-0 prev-link)) + (set! (-> v1-0 prev-link next-link) (-> v1-0 next-link)) + (if (= (-> arg0 entity-link) v1-0) + (set! (-> arg0 entity-link) (-> v1-0 prev-link)) + ) + ) + ) + ) + this + ) + +(defun update-actor-vis-box ((arg0 process-drawable) (arg1 vector) (arg2 vector)) + (when (and arg0 (nonzero? (-> arg0 draw)) (not (logtest? (-> arg0 draw status) (draw-control-status no-draw)))) + (let ((v1-5 (-> arg0 draw origin)) + (f0-0 (-> arg0 draw bounds w)) + ) + (set! (-> arg1 x) (fmin (-> arg1 x) (- (-> v1-5 x) f0-0))) + (set! (-> arg1 y) (fmin (-> arg1 y) (- (-> v1-5 y) f0-0))) + (set! (-> arg1 z) (fmin (-> arg1 z) (- (-> v1-5 z) f0-0))) + (set! (-> arg2 x) (fmax (-> arg2 x) (+ (-> v1-5 x) f0-0))) + (set! (-> arg2 y) (fmax (-> arg2 y) (+ (-> v1-5 y) f0-0))) + (set! (-> arg2 z) (fmax (-> arg2 z) (+ (-> v1-5 z) f0-0))) + ) + ) + 0 + (none) + ) + +(defmethod update-vis-volumes ((this level-group)) + (local-vars (sv-16 (inline-array vector)) (sv-20 vector) (sv-24 vector) (sv-28 process)) + (dotimes (s5-0 (-> this length)) + (let ((v1-3 (-> this level s5-0))) + (when (= (-> v1-3 status) 'active) + (let ((s4-0 (-> v1-3 bsp level entity))) + (dotimes (s3-0 (-> s4-0 length)) + (let ((s2-0 (-> s4-0 data s3-0 entity))) + (set! sv-16 (res-lump-data s2-0 'visvol (inline-array vector))) + (set! sv-20 (-> sv-16 0)) + (set! sv-24 (-> sv-16 1)) + (let ((s2-1 (-> s2-0 extra process))) + (set! sv-28 (if (type? s2-1 process-drawable) + s2-1 + ) + ) + ) + ) + (when sv-28 + (update-actor-vis-box (the-as process-drawable sv-28) sv-20 sv-24) + (let ((s2-2 (-> sv-28 child))) + (while s2-2 + (let ((s1-0 update-actor-vis-box) + (s0-0 (-> s2-2 0)) + ) + (s1-0 + (the-as process-drawable (if (type? s0-0 process-drawable) + s0-0 + ) + ) + sv-20 + sv-24 + ) + ) + (set! s2-2 (-> s2-2 0 brother)) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defun expand-bounding-box ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector)) + (set! (-> arg0 x) (fmin (-> arg0 x) (-> arg2 x))) + (set! (-> arg0 y) (fmin (-> arg0 y) (-> arg2 y))) + (set! (-> arg0 z) (fmin (-> arg0 z) (-> arg2 z))) + (set! (-> arg1 x) (fmax (-> arg1 x) (-> arg3 x))) + (set! (-> arg1 y) (fmax (-> arg1 y) (-> arg3 y))) + (set! (-> arg1 z) (fmax (-> arg1 z) (-> arg3 z))) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs object. +(defun expand-bounding-box-from-nav-meshes ((arg0 entity) (arg1 vector) (arg2 vector)) + (local-vars (sv-16 res-tag)) + (set! sv-16 (new 'static 'res-tag)) + (res-lump-data arg0 'nav-mesh-actor pointer :tag-ptr (& sv-16)) + (dotimes (s3-0 (the-as int (-> sv-16 elt-count))) + (let ((a0-3 (nav-mesh-from-res-tag arg0 'nav-mesh-actor s3-0))) + (when a0-3 + (let ((s2-0 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'vector)) + ) + (compute-bounding-box-from-vertices a0-3 s2-0 s1-0) + (expand-bounding-box arg1 arg2 s2-0 s1-0) + ) + ) + ) + ) + #f + ) + +(defmethod level-group-method-24 ((this level-group)) + (local-vars + (sv-16 (inline-array vector)) + (sv-20 vector) + (sv-24 vector) + (sv-28 float) + (sv-32 float) + (sv-36 vector) + (sv-40 entity) + (sv-48 res-tag) + ) + (dotimes (s5-0 (-> this length)) + (let ((v1-3 (-> this level s5-0))) + (when (= (-> v1-3 status) 'active) + (let ((s4-0 (-> v1-3 bsp level entity))) + (dotimes (s3-0 (-> s4-0 length)) + (let ((s2-0 (-> s4-0 data s3-0 entity))) + (set! sv-16 (res-lump-data s2-0 'visvol (inline-array vector))) + (set! sv-20 (-> sv-16 0)) + (set! sv-24 (-> sv-16 1)) + (set! sv-28 (the-as float -12288.0)) + (set! sv-32 (the-as float 12288.0)) + (set! sv-36 (-> s2-0 extra trans)) + (set! sv-40 s2-0) + (let ((v1-17 (entity-actor-lookup s2-0 'nav-mesh-actor 0))) + (if v1-17 + (set! sv-40 v1-17) + ) + ) + ) + (cond + ((type? sv-40 entity-actor) + (let ((enemy-option (res-lump-value sv-40 'enemy-options enemy-option :time -1000000000.0))) + (cond + ((logtest? (enemy-option spawner) (the-as uint128 enemy-option)) + (set! (-> sv-20 quad) (-> sv-36 quad)) + (set! (-> sv-24 quad) (-> sv-36 quad)) + (set! sv-28 (the-as float -409.6)) + (set! sv-32 (the-as float 409.6)) + ) + ((string-prefix= "battle" (res-lump-struct sv-40 'name string)) + (set! (-> sv-20 quad) (-> sv-36 quad)) + (set! (-> sv-24 quad) (-> sv-36 quad)) + (set! sv-48 (new 'static 'res-tag)) + (let ((v1-29 (res-lump-data sv-40 'actor-groups (pointer actor-group) :tag-ptr (& sv-48)))) + (when (and v1-29 (nonzero? (-> sv-48 elt-count))) + (let* ((s2-2 (-> v1-29 0)) + (s1-1 (-> s2-2 length)) + ) + (dotimes (s0-0 s1-1) + (let ((a0-26 (-> s2-2 data s0-0 actor))) + (expand-bounding-box-from-nav-meshes a0-26 sv-20 sv-24) + ) + ) + ) + ) + ) + ) + (else + (expand-bounding-box-from-nav-meshes sv-40 sv-20 sv-24) + ) + ) + ) + ) + (else + (set! (-> sv-20 quad) (-> sv-36 quad)) + (set! (-> sv-24 quad) (-> sv-36 quad)) + ) + ) + (+! (-> sv-20 x) sv-28) + (+! (-> sv-20 y) sv-28) + (+! (-> sv-20 z) sv-28) + (+! (-> sv-24 x) sv-32) + (+! (-> sv-24 y) sv-32) + (+! (-> sv-24 z) sv-32) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod print-volume-sizes ((this level-group)) + (local-vars + (sv-16 (inline-array vector)) + (sv-20 float) + (sv-24 vector) + (sv-28 type) + (sv-32 vector) + (sv-36 vector) + (sv-48 int) + (sv-64 entity) + (sv-80 string) + ) + (let ((s5-0 0)) + (dotimes (v1-0 (-> this length)) + (let ((a0-4 (-> this level v1-0))) + (if (= (-> a0-4 status) 'active) + (+! s5-0 (-> a0-4 entity length)) + ) + ) + ) + (let ((s4-0 (the-as string #f))) + (while (nonzero? s5-0) + 0 + (let ((s2-0 (the-as string #f)) + (s3-0 (the-as entity #f)) + ) + (dotimes (s1-0 (-> this length)) + (let ((v1-7 (-> this level s1-0))) + (when (= (-> v1-7 status) 'active) + (let ((s0-0 (-> v1-7 entity))) + (set! sv-48 (-> s0-0 length)) + (while (nonzero? sv-48) + (set! sv-48 (+ sv-48 -1)) + (set! sv-64 (-> s0-0 data sv-48 entity)) + (set! sv-80 (res-lump-struct sv-64 'name string)) + (when (and (or (not s4-0) (string>? sv-80 s4-0)) (or (not s2-0) (string (the-as entity-actor s3-0) extra trans)) + (set! sv-28 (if (type? s3-0 entity-actor) + (-> (the-as entity-actor s3-0) etype) + (the-as type #f) + ) + ) + (set! sv-32 (-> sv-16 0)) + (set! sv-36 (-> sv-16 1)) + (format #t "actor-vis ~S ~6,,1M " (res-lump-struct s3-0 'name structure) sv-20) + (format + #t + "~6,,1M ~6,,1M ~6,,1M ~6,,1M ~6,,1M ~6,,1M~%" + (- (-> sv-32 x) (-> sv-24 x)) + (- (-> sv-32 y) (-> sv-24 y)) + (- (-> sv-32 z) (-> sv-24 z)) + (- (-> sv-36 x) (-> sv-24 x)) + (- (-> sv-36 y) (-> sv-24 y)) + (- (-> sv-36 z) (-> sv-24 z)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defun expand-vis-box-with-point ((arg0 entity) (arg1 vector)) + (let ((v1-1 (res-lump-data arg0 'visvol (inline-array vector)))) + (when v1-1 + (let ((a0-2 (-> v1-1 0)) + (v1-2 (-> v1-1 1)) + ) + (set! (-> a0-2 x) (fmin (-> a0-2 x) (-> arg1 x))) + (set! (-> a0-2 y) (fmin (-> a0-2 y) (-> arg1 y))) + (set! (-> a0-2 z) (fmin (-> a0-2 z) (-> arg1 z))) + (set! (-> v1-2 x) (fmax (-> v1-2 x) (-> arg1 x))) + (set! (-> v1-2 y) (fmax (-> v1-2 y) (-> arg1 y))) + (set! (-> v1-2 z) (fmax (-> v1-2 z) (-> arg1 z))) + ) + ) + ) + 0 + (none) + ) + +(deftype debug-actor-info (basic) + ((name string) + (handle handle) + (process process) + (pid int32) + ) + ) + + +(define *debug-actor-info* (new 'static 'debug-actor-info :name #f)) + +(define *pid-string* (new 'global 'string 128 (the-as string #f))) + +(defun-debug debug-actor ((arg0 string)) + (let ((gp-0 *debug-actor-info*)) + (set! (-> gp-0 name) #f) + (set! (-> gp-0 handle) (the-as handle #f)) + (cond + ((string-prefix= "pid " arg0) + (let ((s4-0 (length arg0))) + (when (< 4 s4-0) + (clear *pid-string*) + (catn-string<-charp *pid-string* (&-> arg0 data 4) (+ s4-0 -4)) + (set! (-> gp-0 pid) (string->int *pid-string*)) + ) + ) + (let ((gp-1 (lambda ((arg0 process)) (let ((v1-0 *debug-actor-info*)) + (when (= (-> arg0 pid) (-> v1-0 pid)) + (let ((v0-0 (process->handle arg0))) + (set! (-> v1-0 handle) (the-as handle v0-0)) + v0-0 + ) + ) + ) + ) + ) + ) + (iterate-process-tree *pusher-pool* gp-1 *null-kernel-context*) + (iterate-process-tree *entity-pool* gp-1 *null-kernel-context*) + ) + ) + (else + (set! (-> gp-0 name) arg0) + ) + ) + ) + 0 + (none) + ) + +(defun-debug debug-actor-process ((arg0 process)) + (let ((v1-0 *debug-actor-info*)) + (set! (-> v1-0 handle) (process->handle arg0)) + ) + (none) + ) + +(defun-debug draw-actor-marks ((arg0 process)) + (local-vars (sv-16 entity-actor) (sv-20 (pointer int32))) + (b! + (not (and (or (type? arg0 process-drawable) (= (-> arg0 type) part-tracker) (type? arg0 part-spawner)) + (nonzero? (-> (the-as process-drawable arg0) root)) + ) + ) + cfg-51 + :delay (nop!) + ) + (when (type? arg0 process-drawable) + (when (and (-> (the-as process-drawable arg0) nav) (nonzero? (-> (the-as process-drawable arg0) nav))) + (if (= arg0 *debug-actor*) + (debug-draw (-> (the-as process-drawable arg0) nav)) + ) + ) + (if (nonzero? (-> (the-as process-drawable arg0) path)) + (debug-draw (-> (the-as process-drawable arg0) path)) + ) + (if (nonzero? (-> (the-as process-drawable arg0) vol)) + (debug-draw (-> (the-as process-drawable arg0) vol)) + ) + (if (and (nonzero? (-> (the-as process-drawable arg0) draw)) *display-actor-vis*) + (add-debug-sphere + #t + (bucket-id debug) + (-> (the-as process-drawable arg0) draw origin) + (-> (the-as process-drawable arg0) draw bounds w) + (new 'static 'rgba :r #x80 :a #x80) + ) + ) + ) + (add-debug-x + #t + (bucket-id debug-no-zbuf1) + (-> (the-as process-drawable arg0) root trans) + (new 'static 'rgba :r #x80 :g #xff :b #x80 :a #x80) + ) + (set! sv-16 (-> arg0 entity)) + (cond + ((and sv-16 (= (-> sv-16 extra process) arg0)) + (add-debug-text-3d + #t + (bucket-id debug-no-zbuf1) + (res-lump-struct sv-16 'name string) + (-> (the-as process-drawable arg0) root trans) + (if (logtest? (-> sv-16 extra perm status) (entity-perm-status bit-0 error)) + (font-color red) + (font-color white) + ) + (new 'static 'vector2h :y 8) + ) + (set! sv-20 (res-lump-data sv-16 'eco-info (pointer int32) :time 0.0)) + (when sv-20 + (let ((s5-1 add-debug-text-3d) + (s4-1 #t) + (s3-1 577) + ) + (format (clear *temp-string*) "~S ~D~%" (pickup-type->string (the-as pickup-type (-> sv-20 0))) (-> sv-20 1)) + (s5-1 + s4-1 + (the-as bucket-id s3-1) + *temp-string* + (-> (the-as process-drawable arg0) root trans) + (font-color white) + (new 'static 'vector2h :y 24) + ) + ) + ) + (let ((a0-23 (res-lump-struct sv-16 'art-name string))) + (if (and a0-23 (logtest? (the-as int a0-23) 1)) + (add-debug-text-3d + #t + (bucket-id debug-no-zbuf1) + (symbol->string-debug (the-as symbol a0-23)) + (-> (the-as process-drawable arg0) root trans) + (font-color white) + (new 'static 'vector2h :y 24) + ) + ) + ) + (when *display-actor-vis* + (let ((v1-56 (res-lump-data sv-16 'visvol (inline-array vector))) + (a1-14 (-> sv-16 extra vis-id)) + ) + (if v1-56 + (add-debug-box + #t + (bucket-id debug-no-zbuf1) + (-> v1-56 0) + (-> v1-56 1) + (if (is-object-visible? (-> sv-16 extra level) a1-14) + (new 'static 'rgba :g #x80 :b #x80 :a #x80) + (new 'static 'rgba :r #x80 :b #x80 :a #x80) + ) + ) + ) + ) + ) + ) + (else + (let ((s5-4 add-debug-text-3d) + (s4-4 #t) + (s3-4 577) + ) + (format (clear *temp-string*) "pid ~d" (-> arg0 pid)) + (s5-4 + s4-4 + (the-as bucket-id s3-4) + *temp-string* + (-> (the-as process-drawable arg0) root trans) + (font-color green) + (new 'static 'vector2h :y 8) + ) + ) + ) + ) + (add-debug-text-3d + #t + (bucket-id debug-no-zbuf1) + (if (-> arg0 state) + (symbol->string-debug (-> arg0 state name)) + "#f" + ) + (-> (the-as process-drawable arg0) root trans) + (font-color white) + (new 'static 'vector2h :y 16) + ) + (label cfg-51) + 0 + (none) + ) + +(defmethod debug-draw-actors ((this level-group) (arg0 symbol)) + (local-vars + (sv-16 symbol) + (sv-20 vector) + (sv-32 int) + (sv-48 (function symbol bucket-id vector vector rgba symbol)) + (sv-64 symbol) + (sv-80 int) + (sv-96 pointer) + (sv-112 pointer) + (sv-128 int) + ) + (let ((s4-0 *debug-actor-info*)) + (set! (-> s4-0 process) #f) + (if (zero? (-> s4-0 handle pid)) + (set! (-> s4-0 handle) + (logior (logand (-> s4-0 handle) (shl (the-as uint #xffffffff) 32)) (shr (shl (the-as int #f) 32) 32)) + ) + ) + (let ((v1-7 (handle->process (-> s4-0 handle)))) + (when (not v1-7) + (when (-> s4-0 name) + (let ((s3-0 (process-by-name (-> s4-0 name) *active-pool*))) + (set! v1-7 (if (type? s3-0 process-drawable) + s3-0 + ) + ) + ) + (set! (-> s4-0 handle) (process->handle v1-7)) + ) + ) + (set! (-> s4-0 process) v1-7) + ) + (set! *debug-actor* (-> s4-0 process)) + ) + (set! sv-16 arg0) + (when (and sv-16 (not (or (= *master-mode* 'menu) (= *master-mode* 'progress)))) + (cond + ((= sv-16 'process) + (let ((s5-1 draw-actor-marks)) + (iterate-process-tree *pusher-pool* s5-1 *null-kernel-context*) + (iterate-process-tree *entity-pool* s5-1 *null-kernel-context*) + ) + ) + (else + (dotimes (s5-2 (-> this length)) + (let ((v1-21 (-> this level s5-2))) + (when (= (-> v1-21 status) 'active) + (let ((s4-1 (-> v1-21 bsp level entity))) + (dotimes (s3-1 (-> s4-1 length)) + (let ((s2-0 (-> s4-1 data s3-1 entity))) + (set! sv-20 (-> s2-0 extra trans)) + (when (or (= sv-16 'full) (-> s2-0 extra process)) + (add-debug-x #t (bucket-id debug-no-zbuf1) sv-20 (if (-> s2-0 extra process) + (new 'static 'rgba :r #x80 :g #xff :b #x80 :a #x80) + (new 'static 'rgba :r #xff :a #x80) + ) + ) + (when (< (vector-vector-distance (math-camera-pos) sv-20) 491520.0) + (let ((s1-1 add-debug-text-3d) + (s0-0 #t) + ) + (set! sv-32 577) + (let ((a2-4 (res-lump-struct s2-0 'name structure)) + (a3-2 sv-20) + (t0-1 (if (logtest? (-> s2-0 extra perm status) (entity-perm-status bit-0 error)) + 1 + 5 + ) + ) + (t1-1 (new 'static 'vector2h :y 8)) + ) + (s1-1 s0-0 (the-as bucket-id sv-32) (the-as string a2-4) a3-2 (the-as font-color t0-1) t1-1) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (when (and *display-actor-vis* (not *debug-actor*)) + (let ((s5-3 *display-actor-vis*)) + (dotimes (s4-2 (-> this length)) + (let ((s3-2 (-> this level s4-2))) + (when (= (-> s3-2 status) 'active) + (let ((s2-1 (-> s3-2 bsp level entity))) + (dotimes (s1-2 (-> s2-1 length)) + (let ((s0-1 (-> s2-1 data s1-2 entity))) + (let ((v0-9 (res-lump-data s0-1 'visvol pointer)) + (a1-16 (-> s0-1 extra vis-id)) + ) + (when (and v0-9 (or (= s5-3 #t) (= s5-3 'box))) + (set! sv-48 add-debug-box) + (set! sv-64 #t) + (set! sv-80 577) + (set! sv-96 (&+ v0-9 0)) + (set! sv-112 (&+ v0-9 16)) + (let ((t0-3 (if (is-object-visible? s3-2 a1-16) + (the-as uint #x80808000) + (the-as uint #x80800080) + ) + ) + ) + (sv-48 sv-64 (the-as bucket-id sv-80) (the-as vector sv-96) (the-as vector sv-112) (the-as rgba t0-3)) + ) + ) + ) + (when (or (= s5-3 #t) (= s5-3 'sphere)) + (let ((s0-2 (-> s0-1 extra process))) + (when s0-2 + (when (and (type? s0-2 process-drawable) (nonzero? (-> (the-as process-drawable s0-2) draw))) + (add-debug-x + #t + (bucket-id debug-no-zbuf1) + (-> (the-as process-drawable s0-2) root trans) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + ) + (add-debug-sphere + #t + (bucket-id debug) + (-> (the-as process-drawable s0-2) draw origin) + (-> (the-as process-drawable s0-2) draw bounds w) + (new 'static 'rgba :r #x80 :a #x80) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (if *generate-actor-vis* + (update-vis-volumes this) + ) + (cond + (*debug-actor* + (let* ((s4-3 *debug-actor*) + (s5-4 (if (type? s4-3 process-drawable) + (the-as process-drawable s4-3) + ) + ) + ) + (when s5-4 + (if (nonzero? (-> s5-4 skel)) + (debug-print-channels (-> s5-4 skel) (the-as symbol *stdcon*)) + ) + (when (and (nonzero? (-> s5-4 nav)) (-> s5-4 nav) *display-nav-marks*) + (let ((s4-4 (-> s5-4 nav state flags))) + (if (= (logand s4-4 (nav-state-flag in-target-poly)) (nav-state-flag in-target-poly)) + (format *stdcon* "in-target-poly ") + ) + (if (= (logand s4-4 (nav-state-flag directional-mode)) (nav-state-flag directional-mode)) + (format *stdcon* "directional-mode ") + ) + (if (= (logand s4-4 (nav-state-flag initialized)) (nav-state-flag initialized)) + (format *stdcon* "initialized ") + ) + (if (= (logand s4-4 (nav-state-flag display-marks)) (nav-state-flag display-marks)) + (format *stdcon* "display-marks ") + ) + (if (= (logand s4-4 (nav-state-flag recovery-mode)) (nav-state-flag recovery-mode)) + (format *stdcon* "recovery-mode ") + ) + (if (= (logand s4-4 (nav-state-flag touching-sphere)) (nav-state-flag touching-sphere)) + (format *stdcon* "touching-sphere ") + ) + (if (= (logand s4-4 (nav-state-flag trapped-by-sphere)) (nav-state-flag trapped-by-sphere)) + (format *stdcon* "trapped-by-sphere ") + ) + (if (= (logand s4-4 (nav-state-flag blocked)) (nav-state-flag blocked)) + (format *stdcon* "blocked ") + ) + (if (= (logand s4-4 (nav-state-flag avoiding-sphere)) (nav-state-flag avoiding-sphere)) + (format *stdcon* "avoiding-sphere ") + ) + (if (= (logand s4-4 (nav-state-flag target-inside)) (nav-state-flag target-inside)) + (format *stdcon* "target-inside ") + ) + (if (= (logand s4-4 (nav-state-flag debug)) (nav-state-flag debug)) + (format *stdcon* "debug ") + ) + (if (= (logand s4-4 (nav-state-flag at-gap)) (nav-state-flag at-gap)) + (format *stdcon* "at-gap ") + ) + (if (= (logand s4-4 (nav-state-flag use-position)) (nav-state-flag use-position)) + (format *stdcon* "user-position ") + ) + (if (= (logand s4-4 (nav-state-flag in-mesh)) (nav-state-flag in-mesh)) + (format *stdcon* "in-mesh ") + ) + (if (= (logand s4-4 (nav-state-flag at-target)) (nav-state-flag at-target)) + (format *stdcon* "at-target ") + ) + (if (= (logand s4-4 (nav-state-flag target-poly-dirty)) (nav-state-flag target-poly-dirty)) + (format *stdcon* "target-poly-dirty ") + ) + ) + (format *stdcon* "~%") + ) + (when *display-joint-axes* + (if (and (type? s5-4 process-drawable) (nonzero? (-> s5-4 draw))) + (draw-joint-axes s5-4) + ) + ) + (draw-actor-marks s5-4) + ) + ) + ) + (*display-nav-mesh* + (dotimes (s5-5 (-> this length)) + (let ((v1-145 (-> this level s5-5))) + (when (= (-> v1-145 status) 'active) + (let ((s4-5 (-> v1-145 bsp nav-meshes))) + (when (nonzero? s4-5) + (dotimes (s3-3 (-> s4-5 length)) + (let ((s2-2 (-> s4-5 s3-3))) + (if (name= *display-nav-mesh* (res-lump-struct s2-2 'name structure)) + (debug-draw s2-2) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (else + (when *display-nav-marks* + (dotimes (s5-6 (-> this length)) + (let ((v1-163 (-> this level s5-6))) + (when (= (-> v1-163 status) 'active) + (let ((s4-6 (-> v1-163 bsp nav-meshes))) + (when (nonzero? s4-6) + (dotimes (s3-4 (-> s4-6 length)) + (debug-draw (-> s4-6 s3-4)) + ) + ) + ) + ) + ) + ) + ) + (if (or *display-path-marks* *display-vol-marks*) + (iterate-process-tree + *active-pool* + (lambda ((arg0 process)) (when (type? arg0 process-drawable) + (if (nonzero? (-> (the-as process-drawable arg0) path)) + (debug-draw (-> (the-as process-drawable arg0) path)) + ) + (if (nonzero? (-> (the-as process-drawable arg0) vol)) + (debug-draw (-> (the-as process-drawable arg0) vol)) + ) + ) + ) + *null-kernel-context* + ) + ) + ) + ) + (when (and *display-actor-graph* (not (or (= *master-mode* 'menu) (= *master-mode* 'progress)))) + (if (not (paused?)) + (float-save-timeplot (if (< (the int (the float (mod (current-time) 600))) 300) + 1.0 + 0.0 + ) + ) + ) + (camera-plot-float-func + 0.0 + 399.0 + -81920.0 + 81920.0 + float-lookup-redline + (new 'static 'vector4w :x #xff :w #x80) + ) + (camera-plot-float-func + 0.0 + 399.0 + -81920.0 + 81920.0 + float-lookup-blueline + (new 'static 'vector4w :z #xff :w #x80) + ) + (camera-plot-float-func + 0.0 + 399.0 + -81920.0 + 81920.0 + float-lookup-greenline + (new 'static 'vector4w :y #xff :w #x80) + ) + (camera-plot-float-func + 0.0 + 399.0 + 0.0 + 409600.0 + float-lookup-yellowline + (new 'static 'vector4w :x #xff :y #xff :w #x80) + ) + (camera-plot-float-func + 0.0 + 399.0 + 0.0 + 1.0 + float-lookup-timeplot + (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) + ) + ) + (when *display-split-boxes* + (dotimes (s5-7 (-> this length)) + (let ((v1-193 (-> this level s5-7))) + (when (= (-> v1-193 status) 'active) + (let ((s4-7 (-> v1-193 bsp region-tree))) + (when (nonzero? s4-7) + (let* ((s3-5 (-> s4-7 data2 (+ (-> s4-7 length) -1) length)) + (s2-3 0) + (a0-113 (the-as object (+ (+ (* s2-3 32) 32) (the-as int (-> s4-7 data2 (+ (-> s4-7 length) -1)))))) + ) + (while (< s2-3 s3-5) + (debug-draw-region (the-as drawable-region-prim a0-113) 0) + (+! s2-3 1) + (set! a0-113 (+ (+ (* s2-3 32) 32) (the-as int (-> s4-7 data2 (+ (-> s4-7 length) -1))))) + ) + ) + ) + ) + ) + ) + ) + ) + (when *display-region-marks* + (dotimes (s5-8 (-> this length)) + (let ((s4-8 (-> this level s5-8))) + (when (= (-> s4-8 status) 'active) + (when (nonzero? (-> s4-8 bsp region-trees)) + (let* ((s3-6 (-> s4-8 bsp region-trees length)) + (s2-4 0) + (s1-4 (-> s4-8 bsp region-trees s2-4)) + ) + (while (< s2-4 s3-6) + (let ((s0-4 (-> s1-4 data2 (+ (-> s1-4 length) -1) length))) + (set! sv-128 0) + (let ((a0-128 (the-as object (+ (+ (* sv-128 32) 32) (the-as int (-> s1-4 data2 (+ (-> s1-4 length) -1))))))) + (while (< sv-128 s0-4) + (debug-draw-region (the-as drawable-region-prim a0-128) 0) + (set! sv-128 (+ sv-128 1)) + (set! a0-128 (+ (+ (* sv-128 32) 32) (the-as int (-> s1-4 data2 (+ (-> s1-4 length) -1))))) + ) + ) + ) + (+! s2-4 1) + (set! s1-4 (-> s4-8 bsp region-trees s2-4)) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod birth! ((this entity-camera)) + (add-connection *camera-engine* *camera* nothing this #f #f) + this + ) + +(defmethod kill! ((this entity-camera)) + (remove-by-param1 *camera-engine* (the-as int this)) + this + ) + +;; WARN: Return type mismatch process vs none. +(defun init-entity ((arg0 process) (arg1 entity-actor) (arg2 type)) + (activate arg0 *entity-pool* (res-lump-struct arg1 'name string) (the-as pointer #x70004000)) + (set! (-> arg0 entity) arg1) + (set! (-> arg0 level) (-> arg1 extra level)) + (set! (-> arg1 extra process) arg0) + (run-now-in-process arg0 (method-of-object arg0 init-from-entity!) arg0 arg1) + (none) + ) + +(defmethod birth! ((this entity-actor)) + (let* ((s5-0 (-> this etype)) + (v1-0 (entity-info-lookup s5-0)) + (s4-0 (get-process + *default-dead-pool* + s5-0 + (if v1-0 + (-> v1-0 heap-size) + #x4000 + ) + 0 + ) + ) + ) + (cond + ((not s4-0) + ) + ((begin + (set! (-> s4-0 type) s5-0) + (and s5-0 + (valid? s5-0 type (the-as string #f) #f 0) + (valid? (method-of-object s4-0 init-from-entity!) function (the-as string #f) #f 0) + ) + ) + (init-entity s4-0 this s5-0) + ) + (else + (when (not (birth-viewer s4-0 this)) + (format 0 "ERROR: no proper process type named ~A exists in the code, could not start ~A~%" s5-0 this) + (logior! (-> this extra perm status) (entity-perm-status bit-0)) + ) + ) + ) + ) + this + ) + +;; WARN: Return type mismatch symbol vs none. +(defun entity-deactivate-handler ((arg0 process) (arg1 entity-actor)) + (when (= arg0 (-> arg1 extra process)) + (logclear! (-> arg1 extra perm status) (entity-perm-status error no-kill)) + (set! (-> arg1 extra process) #f) + ) + (none) + ) + +(defmethod kill! ((this entity-actor)) + (let ((a0-1 (-> this extra process))) + (if a0-1 + (deactivate a0-1) + (entity-deactivate-handler a0-1 this) + ) + ) + this + ) + +;; WARN: Return type mismatch bsp-header vs none. +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 s5, Count] +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count] +(defmethod birth ((this bsp-header)) + (local-vars (v1-75 int) (s5-0 int) (sv-16 int)) + (.mfc0 s5-0 Count) + (let ((a2-0 (if (nonzero? (-> this actors)) + (-> this actors length) + 0 + ) + ) + ) + (cond + ((not (-> this level entity)) + (set! (-> this level entity) (new 'loading-level 'entity-links-array a2-0)) + ) + ((< (-> this level entity allocated-length) a2-0) + (format + 0 + "ERROR: Attempting to rebirth level ~A with incorrect entity table size ~D/~D~%" + (-> this level) + a2-0 + (-> this level entity allocated-length) + ) + ) + ) + ) + (set! (-> this level entity length) 0) + 0 + (when (nonzero? (-> this actors)) + (dotimes (s4-0 (-> this actors length)) + (let* ((a0-4 (-> this actor-birth-order s4-0)) + (v1-23 (-> this actors data (logand a0-4 8191) actor)) + ) + (add-to-level! v1-23 *level* (-> this level) (the-as actor-id (-> v1-23 aid))) + ) + ) + ) + (let ((s4-1 (-> this cameras))) + (when (nonzero? s4-1) + (dotimes (s3-0 (-> s4-1 length)) + (birth! (-> s4-1 s3-0)) + ) + ) + ) + (let ((s4-2 (-> this level status))) + (set! (-> this level status) 'active) + (do-nothing *level*) + (dotimes (s3-1 (-> *level* length)) + (let ((s2-0 (-> *level* level s3-1))) + (when (= (-> s2-0 status) 'active) + (when (nonzero? (-> s2-0 bsp actor-groups)) + (countdown (s1-0 (-> s2-0 bsp actor-groups length)) + (let ((s0-0 (-> s2-0 bsp actor-groups s1-0))) + (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) (the-as entity-actor (entity-by-aid (-> s0-0 data sv-16 id)))) + ) + (set! sv-16 (+ sv-16 1)) + ) + ) + ) + ) + ) + ) + ) + (set! (-> this level status) s4-2) + ) + (.mfc0 v1-75 Count) + (let ((a3-2 (- v1-75 s5-0))) + (format 0 "Done ~S in ~D~%" "birth" a3-2) + ) + (none) + ) + +(defun check-for-rougue-process ((arg0 process) (arg1 int) (arg2 int) (arg3 level)) + (cond + ((-> arg0 entity) + (cond + ((or (= (-> arg0 level) arg3) (= (-> arg0 entity extra level) arg3)) + (format #t "NOTICE: rogue level entity ~A still alive~%" arg0) + (deactivate arg0) + ) + ((let ((v1-9 (-> arg0 name))) + (and (>= (the-as int v1-9) arg1) (< (the-as int v1-9) arg2)) + ) + (format #t "NOTICE: rogue level entity ~A still alive~%" arg0) + (deactivate arg0) + ) + ((and (logtest? (-> arg0 entity extra kill-mask) (task-mask ctywide)) + (or (= (-> arg3 name) 'ctywide) (= (-> arg3 name) 'waswide)) + ) + (format #t "NOTICE: rogue level entity ~A still alive~%" arg0) + (deactivate arg0) + ) + ((and (logtest? (-> arg0 entity extra kill-mask) (task-mask vehicle)) + (or (= (-> arg3 name) 'ctywide) (= (-> arg3 name) 'wasall)) + ) + (format #t "NOTICE: rogue level entity ~A still alive~%" arg0) + (deactivate arg0) + ) + ((and (logtest? (-> arg0 entity extra kill-mask) (task-mask primary0)) + (logtest? (-> arg3 info base-task-mask) (task-mask primary0)) + ) + (format #t "NOTICE: rogue level entity ~A still alive~%" arg0) + (deactivate arg0) + ) + ) + ) + ((= (-> arg0 level) arg3) + (format #t "NOTICE: rogue level entity ~A still alive~%" arg0) + (deactivate arg0) + ) + ((= (-> arg0 type) part-tracker) + (let ((v1-45 (the-as part-tracker arg0))) + (if (and (nonzero? (-> v1-45 part)) + (>= (the-as int (-> v1-45 part group)) arg1) + (< (the-as int (-> v1-45 part group)) arg2) + ) + (deactivate arg0) + ) + ) + ) + ((type? arg0 part-spawner) + (let ((v1-50 (the-as part-spawner arg0))) + (if (and (nonzero? (-> v1-50 part)) + (>= (the-as int (-> v1-50 part group)) arg1) + (< (the-as int (-> v1-50 part group)) arg2) + ) + (deactivate arg0) + ) + ) + ) + (else + (let* ((s3-0 arg0) + (v1-55 (if (type? s3-0 process-drawable) + s3-0 + ) + ) + ) + (when v1-55 + (cond + ((and (nonzero? (-> (the-as process-drawable v1-55) part)) + (>= (the-as int (-> (the-as process-drawable v1-55) part group)) arg1) + (< (the-as int (-> (the-as process-drawable v1-55) part group)) arg2) + ) + (format + #t + "NOTICE: rogue null level entity (using part ~A) ~A still alive~%" + (-> (the-as process-drawable v1-55) part group) + arg0 + ) + (deactivate arg0) + ) + ((and (nonzero? (-> (the-as process-drawable v1-55) draw)) + (>= (the-as int (-> (the-as process-drawable v1-55) draw art-group)) arg1) + (< (the-as int (-> (the-as process-drawable v1-55) draw art-group)) arg2) + ) + (format + #t + "NOTICE: rogue null level entity (using art ~A) ~A still alive~%" + (-> (the-as process-drawable v1-55) draw art-group) + arg0 + ) + (deactivate arg0) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch bsp-header vs none. +(defmethod deactivate-entities ((this bsp-header)) + (let ((v1-1 (-> this level heap base)) + (a0-2 (-> this level heap top-base)) + ) + (when (nonzero? (-> this actor-groups)) + (dotimes (a1-2 (-> this actor-groups length)) + (let ((a2-2 (-> this actor-groups a1-2))) + (dotimes (a3-1 (-> a2-2 length)) + (let ((t0-2 (-> a2-2 data a3-1 actor))) + (if (and t0-2 (not (and (>= (the-as int t0-2) (the-as int v1-1)) (< (the-as int t0-2) (the-as int a0-2))))) + (set! (-> a2-2 data a3-1 actor) #f) + ) + ) + ) + ) + ) + ) + (dotimes (a1-5 (-> *level* length)) + (let ((a2-10 (-> *level* level a1-5))) + (when (= (-> a2-10 status) 'active) + (when (!= a2-10 (-> this level)) + (when (nonzero? (-> a2-10 bsp actor-groups)) + (dotimes (a3-10 (-> a2-10 bsp actor-groups length)) + (let ((t0-13 (-> a2-10 bsp actor-groups a3-10))) + (dotimes (t1-2 (-> t0-13 length)) + (let ((t2-3 (-> t0-13 data t1-2 actor))) + (if (and t2-3 (>= (the-as int t2-3) (the-as int v1-1)) (< (the-as int t2-3) (the-as int a0-2))) + (set! (-> t0-13 data t1-2 actor) #f) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let ((s5-0 (-> this actors))) + (when (nonzero? s5-0) + (dotimes (s4-0 (-> s5-0 length)) + (let ((s3-0 (-> s5-0 data s4-0 actor))) + (kill! s3-0) + (remove-from-level! s3-0 *level*) + ) + ) + ) + ) + (let ((s5-1 (-> this cameras))) + (when (nonzero? s5-1) + (dotimes (s4-1 (-> s5-1 length)) + (kill! (-> s5-1 s4-1)) + ) + ) + ) + (let ((v1-23 (-> this level heap base)) + (a0-7 (-> this level heap top-base)) + (s5-2 (lambda ((arg0 process)) (check-for-rougue-process + arg0 + (-> *kernel-context* relocating-min) + (-> *kernel-context* relocating-max) + (-> *kernel-context* relocating-level) + ) + ) + ) + ) + (set! (-> *kernel-context* relocating-min) (the-as int v1-23)) + (set! (-> *kernel-context* relocating-max) (the-as int a0-7)) + (set! (-> *kernel-context* relocating-level) (-> this level)) + (iterate-process-tree *pusher-pool* s5-2 *null-kernel-context*) + (iterate-process-tree *entity-pool* s5-2 *null-kernel-context*) + (iterate-process-tree *default-pool* s5-2 *null-kernel-context*) + ) + (let ((s5-3 (-> this nav-meshes))) + (when (nonzero? s5-3) + (dotimes (s4-2 (-> s5-3 length)) + (kill! (-> s5-3 s4-2)) + ) + ) + ) + (none) + ) + +(defun process-drawable-scale-from-entity! ((arg0 process-drawable) (arg1 entity)) + (let ((v1-1 (res-lump-struct arg1 'scale vector))) + (if v1-1 + (set! (-> arg0 root scale quad) (-> v1-1 quad)) + (vector-identity! (-> arg0 root scale)) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch process-drawable vs none. +(defun process-drawable-from-entity! ((arg0 process-drawable) (arg1 entity-actor)) + (logior! (-> arg0 mask) (process-mask actor-pause)) + (set! (-> arg0 root trans quad) (-> arg1 extra trans quad)) + (quaternion-copy! (-> arg0 root quat) (-> arg1 quat)) + (vector-identity! (-> arg0 root scale)) + (none) + ) + +(defmethod update ((this entity-perm) (arg0 symbol) (arg1 entity-perm-status)) + (cond + ((= arg0 'game) + (logclear! (-> this status) arg1) + ) + ((task-complete? *game-info* (-> this task)) + (if (or (= arg0 'try) (= arg0 'life)) + (logclear! (-> this status) (logior (if (logtest? (-> this status) (entity-perm-status bit-4)) + 524 + 0 + ) + #x8203 + ) + ) + (logclear! (-> this status) (logior (if (logtest? (-> this status) (entity-perm-status bit-4)) + 524 + 0 + ) + 515 + ) + ) + ) + ) + (else + (logclear! (-> this status) (logclear + (logior arg1 (if (logtest? (-> this status) (entity-perm-status bit-4)) + 524 + 0 + ) + ) + (if (logtest? (-> this status) (entity-perm-status bit-14)) + 32 + 0 + ) + ) + ) + ) + ) + (when (not (logtest? (-> this status) (entity-perm-status bit-5))) + (set! (-> this user-uint64) (the-as uint 0)) + 0 + ) + this + ) + +(defun reset-actors ((arg0 symbol)) + (let* ((v1-0 arg0) + (perm + (cond + ((or (= v1-0 'life) (= v1-0 'debug)) + (the-as + entity-perm-status + (entity-perm-status bit-0 error dead no-kill bit-5 subtask-complete bit-9 bit-12 bit-15) + ) + ) + ((= v1-0 'try) + (the-as + entity-perm-status + (entity-perm-status bit-0 error dead no-kill bit-5 subtask-complete bit-9 bit-12 bit-15) + ) + ) + ((= v1-0 'game) + (the-as entity-perm-status (entity-perm-status + bit-0 + error + dead + no-kill + bit-4 + bit-5 + subtask-complete + complete + bit-9 + bit-10 + save + bit-12 + bit-13 + bit-15 + ) + ) + ) + (else + (the-as + entity-perm-status + (entity-perm-status bit-0 error dead no-kill bit-4 bit-5 subtask-complete bit-9 bit-10 bit-12 bit-15) + ) + ) + ) + ) + (s4-0 *game-info*) + ) + (dotimes (s3-0 (-> *level* length)) + (let ((v1-4 (-> *level* level s3-0))) + (when (or (= (-> v1-4 status) 'active) (= (-> v1-4 status) 'alive) (= (-> v1-4 status) 'loaded)) + (when (-> v1-4 part-engine) + (set! (-> v1-4 part-engine length) 0) + 0 + ) + (when (-> v1-4 entity) + (let ((s2-0 (-> v1-4 bsp level entity))) + (dotimes (s1-0 (-> s2-0 length)) + (let ((s0-0 (-> s2-0 data s1-0 entity))) + (if (not (and (-> s0-0 extra process) (logtest? (-> s0-0 extra process mask) (process-mask no-kill)))) + (kill! s0-0) + ) + (update (-> s0-0 extra perm) arg0 (the-as entity-perm-status perm)) + ) + ) + ) + ) + ) + ) + ) + (let ((s3-1 (-> s4-0 task-perm-list))) + (dotimes (s2-1 (-> s3-1 length)) + (update (-> s3-1 data s2-1) arg0 (the-as entity-perm-status perm)) + ) + (logior! (-> s3-1 data 1 status) (entity-perm-status complete)) + ) + (let ((s4-1 (-> s4-0 perm-list))) + (dotimes (s3-2 (-> s4-1 length)) + (update (-> s4-1 data s3-2) arg0 (the-as entity-perm-status perm)) + ) + ) + ) + (let ((s5-1 (lambda ((arg0 process)) (if (not (logtest? (-> arg0 mask) (process-mask no-kill))) + (deactivate arg0) + ) + ) + ) + ) + (iterate-process-tree *pusher-pool* s5-1 *null-kernel-context*) + (iterate-process-tree *entity-pool* s5-1 *null-kernel-context*) + ) + (if #t + (task-node-reset arg0) + ) + (dotimes (s5-2 (-> *level* length)) + (let ((s4-2 (-> *level* level s5-2))) + (when (= (-> s4-2 status) 'active) + (let ((s3-3 (the-as (function level none) (get-callback-symbol-value-by-slot! (-> s4-2 info) 35)))) + (if (and s3-3 (type? s3-3 function)) + (s3-3 s4-2) + ) + ) + ) + ) + ) + (set! (-> *ACTOR-bank* birth-max) 1000) + (update-task-masks arg0) + 0 + (none) + ) + +(defun reset-cameras () + (remove-all *camera-engine*) + (dotimes (gp-0 (-> *level* length)) + (let ((v1-5 (-> *level* level gp-0))) + (when (= (-> v1-5 status) 'active) + (let ((s5-0 (-> v1-5 bsp cameras))) + (when (nonzero? s5-0) + (dotimes (s4-0 (-> s5-0 length)) + (birth! (-> s5-0 s4-0)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod run-logic? ((this process-drawable)) + "Should this process be run? Checked by execute-process-tree." + (or (not (logtest? (-> this mask) (process-mask actor-pause))) + (or (>= (+ (-> *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 birth? ((this entity-links) (arg0 vector)) + (and (not (logtest? (-> this perm status) (entity-perm-status bit-0 dead))) + (< (vector-vector-distance (-> this trans) arg0) (-> *ACTOR-bank* birth-dist)) + ) + ) + +;; ERROR: Stack slot load at 96 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 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 +;; WARN: Function (method 17 level-group) has a return type of none, but the expression builder found a return statement. +(defmethod actors-update ((this level-group)) + (local-vars + (sv-16 vector) + (sv-24 int) + (sv-32 task-mask) + (sv-48 entity-links) + (sv-64 string) + (sv-80 string) + (sv-96 float) + ) + (when *compact-actors* + (if (and (= *compact-actors* 'debug) (= (-> *nk-dead-pool* alive-list prev) (-> *nk-dead-pool* first-gap))) + (churn *nk-dead-pool* 1) + ) + (let ((s5-0 + (the int + (lerp-scale 8.0 1.0 (the float (-> *display* frames (-> *display* last-screen) run-time)) 2000.0 8000.0) + ) + ) + ) + (if (nonzero? *debug-dead-pool*) + (compact *debug-dead-pool* 10) + ) + (compact *nk-dead-pool* s5-0) + ) + ) + (update-actor-hash) + (when (not (paused?)) + (let ((s5-1 (-> *display* frames (-> *display* last-screen) run-time))) + (let ((f0-5 (fmax + 327680.0 + (fmin (+ 327680.0 (* 204.8 (the float (- 7000 (the-as int s5-1))))) (-> *ACTOR-bank* birth-dist)) + ) + ) + ) + (seek! (-> *ACTOR-bank* pause-dist) f0-5 (* 81920.0 (seconds-per-frame))) + ) + (seekl! (-> *ACTOR-bank* birth-max) (the int (lerp-scale 25.0 2.0 (the float s5-1) 2000.0 7000.0)) 10) + ) + (if (movie?) + (set! (-> *ACTOR-bank* birth-max) 1000) + ) + ) + (when *spawn-actors* + (set! sv-16 (if (movie?) + (math-camera-pos) + (camera-pos) + ) + ) + (set! sv-24 0) + (dotimes (s5-2 (-> this length)) + (let ((s4-1 (-> this level s5-2))) + (when (= (-> s4-1 status) 'active) + (set! sv-32 (-> s4-1 task-mask)) + (cond + ((= (-> s4-1 display?) 'special) + (let* ((s4-2 (-> s4-1 entity)) + (s3-1 (-> s4-2 length)) + ) + (dotimes (s2-0 s3-1) + (let ((v1-53 (-> s4-2 data s2-0))) + (cond + ((and (logtest? (-> v1-53 kill-mask) (task-mask special)) (not (logtest? (-> v1-53 kill-mask) sv-32))) + (when (not (or (-> v1-53 process) (logtest? (-> v1-53 perm status) (entity-perm-status bit-0 dead)))) + (birth! (-> v1-53 entity)) + (set! sv-24 (+ sv-24 1)) + (if (>= sv-24 (-> *ACTOR-bank* birth-max)) + (return #f) + ) + ) + ) + (else + (if (and (-> v1-53 process) + (not (logtest? (-> v1-53 perm status) (entity-perm-status no-kill))) + (not (logtest? (-> v1-53 process mask) (process-mask no-kill))) + ) + (kill! (-> v1-53 entity)) + ) + ) + ) + ) + ) + ) + ) + ((= (-> s4-1 display?) 'actor) + (let* ((s4-3 (-> s4-1 entity)) + (s3-2 (-> s4-3 length)) + ) + (dotimes (s2-1 s3-2) + (let ((v1-66 (-> s4-3 data s2-1))) + (cond + ((not (logtest? (-> v1-66 kill-mask) sv-32)) + (when (not (or (-> v1-66 process) (logtest? (-> v1-66 perm status) (entity-perm-status bit-0 dead)))) + (birth! (-> v1-66 entity)) + (set! sv-24 (+ sv-24 1)) + (if (>= sv-24 (-> *ACTOR-bank* birth-max)) + (return #f) + ) + ) + ) + (else + (if (and (-> v1-66 process) + (not (logtest? (-> v1-66 perm status) (entity-perm-status no-kill))) + (not (logtest? (-> v1-66 process mask) (process-mask no-kill))) + ) + (kill! (-> v1-66 entity)) + ) + ) + ) + ) + ) + ) + ) + ((not *vis-actors*) + (let* ((s4-4 (-> s4-1 entity)) + (s3-3 (-> s4-4 length)) + ) + (dotimes (s2-2 s3-3) + (let ((s1-0 (-> s4-4 data s2-2))) + (cond + ((and (< (vector-vector-distance (-> s1-0 trans) sv-16) (-> *ACTOR-bank* birth-dist)) + (not (logtest? (-> s1-0 perm status) (entity-perm-status bit-9 bit-10))) + (not (logtest? (-> s1-0 kill-mask) sv-32)) + ) + (when (not (or (-> s1-0 process) (logtest? (-> s1-0 perm status) (entity-perm-status bit-0 dead)))) + (birth! (-> s1-0 entity)) + (set! sv-24 (+ sv-24 1)) + (if (>= sv-24 (-> *ACTOR-bank* birth-max)) + (return #f) + ) + ) + ) + (else + (if (and (-> s1-0 process) + (not (logtest? (-> s1-0 perm status) (entity-perm-status no-kill))) + (not (logtest? (-> s1-0 process mask) (process-mask no-kill))) + ) + (kill! (-> s1-0 entity)) + ) + ) + ) + ) + ) + ) + ) + (*vis-actors* + (when (not (and (-> s4-1 vis-info 0) (-> s4-1 all-visible?))) + (let* ((s3-4 (-> s4-1 entity)) + (s2-3 (-> s3-4 length)) + (s0-0 #f) + ) + (dotimes (s1-1 s2-3) + (set! sv-48 (-> s3-4 data s1-1)) + (cond + ((and (is-object-visible? s4-1 (-> sv-48 vis-id)) + (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))) + ) + (when (not (or (-> sv-48 process) (logtest? (-> sv-48 perm status) (entity-perm-status bit-0 dead)) s0-0)) + (birth! (-> sv-48 entity)) + (set! sv-24 (+ sv-24 1)) + (when (< (/ (the float (memory-free *nk-dead-pool*)) (the float (memory-total *nk-dead-pool*))) 0.1) + (when (and *debug-segment* (not *display-capture-mode*)) + (let ((s0-1 format)) + (set! sv-64 *stdcon*) + (set! sv-80 "low actor memory, no birth triggered!!! ~,,0fK/~,,0fK~%") + (set! sv-96 (* 0.0009765625 (the float (memory-free *nk-dead-pool*)))) + (let ((a3-2 (* 0.0009765625 (the float (memory-total *nk-dead-pool*))))) + (s0-1 sv-64 sv-80 sv-96 a3-2) + ) + ) + ) + (set! s0-0 #t) + ) + ) + ) + (else + (when (and (-> sv-48 process) + (not (logtest? (-> sv-48 perm status) (entity-perm-status no-kill))) + (not (logtest? (-> sv-48 process mask) (process-mask no-kill))) + ) + (kill! (-> sv-48 entity)) + (set! sv-24 (+ sv-24 1)) + ) + ) + ) + (if (>= sv-24 (-> *ACTOR-bank* birth-max)) + (return #f) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defun entity-birth-no-kill ((arg0 entity)) + (let ((gp-0 (-> arg0 extra))) + (logior! (-> gp-0 perm status) (entity-perm-status no-kill)) + (if (not (or (-> gp-0 process) (logtest? (-> gp-0 perm status) (entity-perm-status bit-0 dead)))) + (birth! (-> gp-0 entity)) + ) + (-> gp-0 process) + ) + ) + +(defun entity-task-complete-on ((arg0 entity)) + (let ((v1-0 (-> arg0 extra))) + (if (nonzero? (-> v1-0 perm task)) + (logior! (-> *game-info* task-perm-list data (-> v1-0 perm task) status) (entity-perm-status complete)) + ) + ) + 0 + (none) + ) + +(defun entity-task-complete-off ((arg0 entity)) + (let ((v1-0 (-> arg0 extra))) + (if (!= (-> v1-0 perm task) (game-task complete)) + (logclear! (-> *game-info* task-perm-list data (-> v1-0 perm task) status) (entity-perm-status complete)) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch entity-perm-status vs none. +(defmethod toggle-status ((this entity-actor) (arg0 entity-perm-status) (arg1 symbol)) + (let ((v1-0 (-> this extra))) + (if arg1 + (logior! (-> v1-0 perm status) arg0) + (logclear! (-> v1-0 perm status) arg0) + ) + (-> v1-0 perm status) + ) + (none) + ) + +;; WARN: Return type mismatch int vs entity-perm-status. +(defun process-entity-status! ((arg0 process) (arg1 entity-perm-status) (arg2 symbol)) + (the-as entity-perm-status (cond + ((and (-> arg0 entity) arg0 (= arg0 (-> arg0 entity extra process))) + (let ((v1-6 (-> arg0 entity extra))) + (if arg2 + (logior! (-> v1-6 perm status) arg1) + (logclear! (-> v1-6 perm status) arg1) + ) + (the-as int (-> v1-6 perm status)) + ) + ) + (else + 0 + ) + ) + ) + ) + +;; WARN: Return type mismatch entity-actor vs entity. +(defun find-nearest-entity ((arg0 vector) (arg1 type)) + (local-vars (v1-8 object)) + (let ((gp-0 (the-as entity-actor #f))) + (let ((f30-0 0.0) + (f28-0 0.0) + ) + (dotimes (s3-0 (-> *level* length)) + (let ((v1-3 (-> *level* level s3-0))) + (when (= (-> v1-3 status) 'active) + (let ((s2-0 (-> v1-3 bsp actors))) + (when (nonzero? s2-0) + (dotimes (s1-0 (-> s2-0 length)) + (let ((s0-0 (-> s2-0 data s1-0 actor))) + (let ((v1-7 (or (not arg1) (type-type? (-> s0-0 etype) arg1)))) + (b! (not v1-7) cfg-15 :likely-delay (set! v1-8 v1-7)) + ) + (set! f28-0 (vector-vector-distance arg0 (-> s0-0 extra trans))) + (set! v1-8 f28-0) + (b! (not (the int v1-8)) cfg-15 :likely-delay (nop!)) + (set! v1-8 (or (not gp-0) (< f28-0 f30-0))) + (label cfg-15) + (when v1-8 + (set! gp-0 s0-0) + (set! f30-0 f28-0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (the-as entity gp-0) + ) + ) + +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 s4, Count] +(defun-debug entity-speed-test ((arg0 string)) + (local-vars (s4-0 int)) + (let ((gp-0 (entity-by-name arg0))) + (when gp-0 + (set! *spawn-actors* #f) + (reset-actors 'debug) + 0 + (disable-irq) + (.mtc0 Count 0) + (.sync.p) + (birth! gp-0) + (.mfc0 s4-0 Count) + (enable-irq) + (format #t "~D spawn ~A ~A ~%" s4-0 arg0 (-> gp-0 extra process)) + (kill! gp-0) + ) + ) + ) + +(defun-debug dump-entity-remap ((arg0 object) (arg1 object)) + (local-vars + (sv-16 symbol) + (sv-32 string) + (sv-48 symbol) + (sv-64 string) + (sv-80 symbol) + (sv-96 string) + (sv-112 string) + ) + (format #t "~%(:eval (remap-entity-list '(") + (dotimes (s4-0 (-> *level* length)) + (let ((s3-0 (-> *level* level s4-0))) + (when (= (-> s3-0 status) 'active) + (when (= (-> s3-0 name) arg0) + (let ((s2-0 (-> s3-0 bsp actors))) + (when (nonzero? s2-0) + (dotimes (s1-0 (-> s2-0 length)) + (let ((a0-4 (-> s2-0 data s1-0 actor)) + (s0-0 format) + ) + (set! sv-16 #t) + (set! sv-32 "~A ") + (let ((a2-1 (res-lump-struct a0-4 'name structure))) + (s0-0 sv-16 sv-32 a2-1) + ) + ) + ) + ) + ) + (let ((s2-1 (-> s3-0 bsp nav-meshes))) + (when (nonzero? s2-1) + (dotimes (s1-1 (-> s2-1 length)) + (let ((a0-6 (-> s2-1 s1-1)) + (s0-1 format) + ) + (set! sv-48 #t) + (set! sv-64 "~A ") + (let ((a2-3 (res-lump-struct a0-6 'name structure))) + (s0-1 sv-48 sv-64 a2-3) + ) + ) + ) + ) + ) + (let ((s2-2 (-> s3-0 bsp race-meshes))) + (when (nonzero? s2-2) + (dotimes (s1-2 (-> s2-2 length)) + (let ((a0-8 (-> s2-2 s1-2)) + (s0-2 format) + ) + (set! sv-80 #t) + (set! sv-96 "~A ") + (let ((a2-5 (res-lump-struct a0-8 'name structure))) + (s0-2 sv-80 sv-96 a2-5) + ) + ) + ) + ) + ) + (let ((s3-1 (-> s3-0 bsp cameras))) + (when (nonzero? s3-1) + (dotimes (s2-3 (-> s3-1 length)) + (let ((a0-10 (-> s3-1 s2-3)) + (s1-3 format) + (s0-3 #t) + ) + (set! sv-112 "~A ") + (let ((a2-7 (res-lump-struct a0-10 'name structure))) + (s1-3 s0-3 sv-112 a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (format #t ") '~A '~A))~%~%" arg0 arg1) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/entity/relocate.gc b/goal_src/jak3/engine/entity/relocate.gc index 566ef4854e..5d27c57ba7 100644 --- a/goal_src/jak3/engine/entity/relocate.gc +++ b/goal_src/jak3/engine/entity/relocate.gc @@ -7,3 +7,417 @@ ;; DECOMP BEGINS +(defmethod relocate ((this process) (offset int)) + (let ((v1-0 *kernel-context*)) + (set! (-> v1-0 relocating-process) this) + (set! (-> v1-0 relocating-min) (the-as int (&-> this type))) + (set! (-> v1-0 relocating-max) + (the-as int (+ (+ (-> this allocated-length) -4 (-> process size)) (the-as int this))) + ) + (set! (-> v1-0 relocating-offset) offset) + ) + (&+! (-> this ppointer 0) offset) + (let ((v1-5 (-> this entity))) + (if (and v1-5 (= (-> v1-5 extra process) this)) + (&+! (-> v1-5 extra process) offset) + ) + ) + (let ((v1-7 (-> this connection-list next1))) + (while (the-as connection v1-7) + (let ((a0-14 (-> v1-7 prev1))) + (if (and (>= (the-as int a0-14) (-> *kernel-context* relocating-min)) + (< (the-as int a0-14) (-> *kernel-context* relocating-max)) + ) + (&+! (-> v1-7 prev1) offset) + ) + ) + (let ((a0-19 (-> (the-as connection v1-7) param1))) + (if (and (>= (the-as int a0-19) (-> *kernel-context* relocating-min)) + (< (the-as int a0-19) (-> *kernel-context* relocating-max)) + ) + (&+! (-> (the-as connection v1-7) param1) offset) + ) + ) + (let ((a0-24 (-> (the-as connection v1-7) param2))) + (if (and (>= a0-24 (-> *kernel-context* relocating-min)) (< a0-24 (-> *kernel-context* relocating-max))) + (+! (-> (the-as connection v1-7) param2) offset) + ) + ) + (let ((a0-29 (-> (the-as connection v1-7) param3))) + (if (and (>= a0-29 (-> *kernel-context* relocating-min)) (< a0-29 (-> *kernel-context* relocating-max))) + (+! (-> (the-as connection v1-7) param3) offset) + ) + ) + (set! v1-7 (-> (the-as connection v1-7) next1)) + ) + ) + (let ((v1-10 (-> this self))) + (if (and (>= (the-as int v1-10) (-> *kernel-context* relocating-min)) + (< (the-as int v1-10) (-> *kernel-context* relocating-max)) + ) + (&+! (-> this self) offset) + ) + ) + (let ((v1-15 (-> this ppointer))) + (if (and (>= (the-as int v1-15) (-> *kernel-context* relocating-min)) + (< (the-as int v1-15) (-> *kernel-context* relocating-max)) + ) + (&+! (-> this ppointer) offset) + ) + ) + ;; og:preserve-this basic cast + (let ((s4-0 (the-as basic (&+ (-> this heap-base) 4)))) + (while (< (the-as int s4-0) (the-as int (-> this heap-cur))) + (relocate s4-0 offset) + (&+! s4-0 (logand -16 (+ (asize-of s4-0) 15))) + ) + ) + (&+! (-> this main-thread) offset) + (&+! (-> this top-thread) offset) + (if (-> this state-stack) + (&+! (-> this state-stack) offset) + ) + (&+! (-> this heap-base) offset) + (&+! (-> this heap-cur) offset) + (&+! (-> this heap-top) offset) + (let ((a2-4 (asize-of this)) + (a1-22 (&-> this type)) + ) + (cond + ((>= offset 0) + (qmem-copy->! (&+ a1-22 offset) a1-22 a2-4) + ) + ((< a2-4 2560) + (qmem-copy<-! (&+ a1-22 offset) a1-22 a2-4) + ) + (else + (ultimate-memcpy (&+ a1-22 offset) a1-22 (the-as uint a2-4)) + ) + ) + ) + (set! (-> *kernel-context* relocating-process) #f) + (&+ this offset) + ) + +(defmethod relocate ((this cpu-thread) (offset int)) + (&+! (-> this process) offset) + this + ) + +;; WARN: Return type mismatch process vs process-drawable. +(defmethod relocate ((this process-drawable) (offset int)) + (let ((v1-0 *kernel-context*)) + (set! (-> v1-0 relocating-process) this) + (set! (-> v1-0 relocating-min) (the-as int (&-> this type))) + (set! (-> v1-0 relocating-max) + (the-as int (+ (+ (-> this allocated-length) -4 (-> process size)) (the-as int this))) + ) + (set! (-> v1-0 relocating-offset) offset) + ) + (let ((a0-6 (-> this nav))) + (if (and (nonzero? a0-6) a0-6) + (relocate a0-6 offset) + ) + ) + (if (nonzero? (-> this root)) + (&+! (-> this root) offset) + ) + (if (nonzero? (-> this node-list)) + (&+! (-> this node-list) offset) + ) + (if (nonzero? (-> this draw)) + (&+! (-> this draw) offset) + ) + (if (nonzero? (-> this skel)) + (&+! (-> this skel) offset) + ) + (if (nonzero? (-> this align)) + (&+! (-> this align) offset) + ) + (if (nonzero? (-> this path)) + (&+! (-> this path) offset) + ) + (if (nonzero? (-> this vol)) + (&+! (-> this vol) offset) + ) + (if (nonzero? (-> this fact)) + (&+! (-> this fact) offset) + ) + (if (nonzero? (-> this link)) + (&+! (-> this link) offset) + ) + (if (nonzero? (-> this part)) + (&+! (-> this part) offset) + ) + (if (nonzero? (-> this water)) + (&+! (-> this water) offset) + ) + (if (nonzero? (-> this sound)) + (&+! (-> this sound) offset) + ) + (if (nonzero? (-> this carry)) + (&+! (-> this carry) offset) + ) + (if (nonzero? (-> this rbody)) + (&+! (-> this rbody) offset) + ) + (the-as process-drawable ((method-of-type process relocate) this offset)) + ) + +(defmethod relocate ((this collide-shape) (offset int)) + (&+! (-> this process) offset) + (&+! (-> this root-prim) offset) + this + ) + +;; WARN: Return type mismatch collide-shape vs collide-shape-moving. +(defmethod relocate ((this collide-shape-moving) (offset int)) + (if (-> this dynam) + (&+! (-> this dynam) offset) + ) + (the-as collide-shape-moving ((method-of-type collide-shape relocate) this offset)) + ) + +(defmethod relocate ((this collide-shape-prim) (offset int)) + (&+! (-> this cshape) offset) + this + ) + +(defmethod relocate ((this collide-shape-prim-group) (offset int)) + (&+! (-> this cshape) offset) + (&+! (-> this child) offset) + this + ) + +(defmethod relocate ((this fact-info) (offset int)) + (&+! (-> this process) offset) + this + ) + +(defmethod relocate ((this draw-control) (offset int)) + (&+! (-> this skeleton) offset) + (&+! (-> this process) offset) + (when (-> this ripple) + (if (-> this ripple query) + (&+! (-> this ripple query) offset) + ) + (&+! (-> this ripple) offset) + ) + (let ((v1-14 (-> this shadow-ctrl))) + (if (and (>= (the-as int v1-14) (-> *kernel-context* relocating-min)) + (< (the-as int v1-14) (-> *kernel-context* relocating-max)) + ) + (&+! (-> this shadow-ctrl) offset) + ) + ) + (when (-> this cloth-instances) + (dotimes (v1-21 (-> this cloth-instances length)) + (&+! (-> this cloth-instances v1-21) offset) + ) + (&+! (-> this cloth-instances) offset) + ) + this + ) + +(defmethod relocate ((this joint-control) (offset int)) + (if (-> this effect) + (&+! (-> this effect) offset) + ) + (if (-> this top-anim) + (&+! (-> this top-anim) offset) + ) + (&+! (-> this root-channel) offset) + (countdown (v1-10 (-> this allocated-length)) + (&+! (-> this channel v1-10 parent) offset) + ) + this + ) + +(defmethod relocate ((this cspace-array) (offset int)) + (countdown (v1-0 (-> this length)) + (let ((a2-2 (-> this data v1-0))) + (if (-> a2-2 parent) + (&+! (-> a2-2 parent) offset) + ) + (&+! (-> a2-2 bone) offset) + (let ((a3-6 (-> a2-2 param1))) + (if (and (>= (the-as int a3-6) (-> *kernel-context* relocating-min)) + (< (the-as int a3-6) (-> *kernel-context* relocating-max)) + ) + (&+! (-> a2-2 param1) offset) + ) + ) + (let ((a3-11 (-> a2-2 param2))) + (if (and (>= (the-as int a3-11) (-> *kernel-context* relocating-min)) + (< (the-as int a3-11) (-> *kernel-context* relocating-max)) + ) + (&+! (-> a2-2 param2) offset) + ) + ) + ) + ) + this + ) + +(defmethod relocate ((this path-control) (offset int)) + (&+! (-> this process) offset) + (let ((v1-2 (-> this curve cverts))) + (if (and (>= (the-as int v1-2) (-> *kernel-context* relocating-min)) + (< (the-as int v1-2) (-> *kernel-context* relocating-max)) + ) + (&+! (-> this curve cverts) offset) + ) + ) + this + ) + +(defmethod relocate ((this vol-control) (offset int)) + (&+! (-> this process) offset) + this + ) + +(defmethod relocate ((this water-control) (offset int)) + (&+! (-> this process) offset) + this + ) + +(defmethod relocate ((this actor-link-info) (offset int)) + (&+! (-> this process) offset) + this + ) + +(defmethod relocate ((this align-control) (offset int)) + (&+! (-> this process) offset) + this + ) + +(defmethod relocate ((this joint-mod) (offset int)) + (&+! (-> this process) offset) + (&+! (-> this joint) offset) + this + ) + +(defmethod relocate ((this joint-mod-ik) (offset int)) + (&+! (-> this process) offset) + this + ) + +(defmethod relocate ((this effect-control) (offset int)) + (&+! (-> this process) offset) + this + ) + +(defmethod relocate ((this sparticle-launch-control) (offset int)) + (&+! (-> this proc) offset) + (countdown (v1-2 (-> this length)) + (let* ((a0-4 (-> this data v1-2)) + (a2-0 (-> a0-4 center)) + ) + (if (and (>= (the-as int a2-0) (-> *kernel-context* relocating-min)) + (< (the-as int a2-0) (-> *kernel-context* relocating-max)) + ) + (&+! (-> a0-4 center) offset) + ) + ) + ) + (forall-particles-with-key + this + (lambda ((arg0 sparticle-system) (arg1 sparticle-cpuinfo)) + (let ((v1-1 (-> *kernel-context* relocating-offset))) + (set! (-> arg1 key) (the-as sparticle-launch-control (+ (the-as int (-> arg1 key)) v1-1))) + (if (-> arg1 binding) + (set! (-> arg1 binding) (the-as sparticle-launch-state (+ (the-as int (-> arg1 binding)) v1-1))) + ) + ) + 0 + (none) + ) + #t + #t + ) + this + ) + +;; WARN: Return type mismatch process vs camera-master. +(defmethod relocate ((this camera-master) (offset int)) + (if (nonzero? (-> this water-drip)) + (&+! (-> this water-drip) offset) + ) + (the-as camera-master ((method-of-type process relocate) this offset)) + ) + +;; WARN: Return type mismatch process vs time-of-day-proc. +(defmethod relocate ((this time-of-day-proc) (offset int)) + (if (nonzero? (-> this sun)) + (&+! (-> this sun) offset) + ) + (if (nonzero? (-> this green-sun)) + (&+! (-> this green-sun) offset) + ) + (if (nonzero? (-> this moon)) + (&+! (-> this moon) offset) + ) + (if (nonzero? (-> this day-star)) + (&+! (-> this day-star) offset) + ) + (the-as time-of-day-proc ((method-of-type process relocate) this offset)) + ) + +;; WARN: Return type mismatch process vs part-tracker. +(defmethod relocate ((this part-tracker) (offset int)) + (if (nonzero? (-> this root)) + (&+! (-> this root) offset) + ) + (if (nonzero? (-> this part)) + (&+! (-> this part) offset) + ) + (the-as part-tracker ((method-of-type process relocate) this offset)) + ) + +;; WARN: Return type mismatch process vs part-spawner. +(defmethod relocate ((this part-spawner) (offset int)) + (if (nonzero? (-> this root)) + (&+! (-> this root) offset) + ) + (if (nonzero? (-> this part)) + (&+! (-> this part) offset) + ) + (if (nonzero? (-> this path)) + (&+! (-> this path) offset) + ) + (if (nonzero? (-> this sound)) + (&+! (-> this sound) offset) + ) + (if (nonzero? (-> this sound-extra)) + (&+! (-> this sound-extra) offset) + ) + (the-as part-spawner ((method-of-type process relocate) this offset)) + ) + +;; WARN: Return type mismatch process vs lightning-tracker. +(defmethod relocate ((this lightning-tracker) (offset int)) + (if (nonzero? (-> this root)) + (&+! (-> this root) offset) + ) + (if (nonzero? (-> this lightning)) + (&+! (-> this lightning) offset) + ) + (the-as lightning-tracker ((method-of-type process relocate) this offset)) + ) + +;; WARN: Return type mismatch process-drawable vs manipy. +(defmethod relocate ((this manipy) (offset int)) + (if (nonzero? (-> this joint 0)) + (&+! (-> this joint 0) offset) + ) + (if (nonzero? (-> this joint 1)) + (&+! (-> this joint 1) offset) + ) + (if (nonzero? (-> this joint 2)) + (&+! (-> this joint 2) offset) + ) + (if (nonzero? (-> this joint 3)) + (&+! (-> this joint 3) offset) + ) + (the-as manipy ((method-of-type process-drawable relocate) this offset)) + ) diff --git a/goal_src/jak3/engine/entity/res.gc b/goal_src/jak3/engine/entity/res.gc index f27cc2e829..75d2c4af9b 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-h.gc b/goal_src/jak3/engine/game/effect-control-h.gc index 3fed7b2913..5bb94bfb00 100644 --- a/goal_src/jak3/engine/game/effect-control-h.gc +++ b/goal_src/jak3/engine/game/effect-control-h.gc @@ -47,11 +47,11 @@ (:methods (new (symbol type process-drawable) _type_) (effect-control-method-9 (_type_) none) - (do-effect (_type_ symbol float int) none) - (effect-control-method-11 () none) + (do-effect (_type_ string float int) none) + (do-effect-for-surface (_type_ symbol float int basic pat-surface) none) (play-effect-sound (_type_ symbol float int basic sound-name) int) (set-channel-offset! (_type_ int) none) - (effect-control-method-14 () none) + (play-effects-from-res-lump (_type_ float float float) none) ) ) diff --git a/goal_src/jak3/engine/game/effect-control.gc b/goal_src/jak3/engine/game/effect-control.gc index fd8878caa0..ba36a3b16d 100644 --- a/goal_src/jak3/engine/game/effect-control.gc +++ b/goal_src/jak3/engine/game/effect-control.gc @@ -7,3 +7,1078 @@ ;; DECOMP BEGINS +(define *footstep-surface* (new 'static 'pat-surface :material (pat-material grass))) + +(define *debug-effect-control* #f) + +(defun sound-name-with-material ((arg0 string) (arg1 pat-surface) (arg2 string)) + (format + (clear *temp-string*) + "~S~S~S" + arg0 + (-> (new 'static 'boxed-array :type string + "-unk" + "-ice" + "-qsd" + "-wtr" + "-tar" + "-san" + "-wod" + "-grs" + "-pmt" + "-snw" + "-dsn" + "-unk" + "-lav" + "-cwd" + "-grv" + "-drt" + "-mtl" + "-str" + "-pmt" + "-swm" + "-unk" + "-mtl" + "-neu" + "-stn" + "-cmt" + "-car" + "-gmt" + "-smt" + "-hwd" + "-sqi" + "-mhm" + "-for" + "-mhs" + "-dma" + ) + (-> arg1 material) + ) + arg2 + ) + (string->sound-name *temp-string*) + ) + +(defun effect-param->sound-spec ((arg0 sound-spec) (arg1 (pointer float)) (arg2 int) (arg3 process-focusable)) + (while (> arg2 0) + (case (the int (-> arg1 0)) + ((3) + (logior! (-> arg0 mask) (sound-mask volume)) + (set! (-> arg0 volume) (the int (* 1024.0 (-> arg1 1)))) + ) + ((4) + (logior! (-> arg0 mask) (sound-mask volume)) + (+! (-> arg0 volume) (the int (* 1024.0 (* (-> arg1 1) (rand-vu))))) + ) + ((5) + (logior! (-> arg0 mask) (sound-mask pitch)) + (set! (-> arg0 pitch-mod) (the int (* 1524.0 (-> arg1 1)))) + ) + ((6) + (logior! (-> arg0 mask) (sound-mask pitch)) + (+! (-> arg0 pitch-mod) (the int (* 1524.0 (* (-> arg1 1) (rand-vu))))) + ) + ((9) + (logior! (-> arg0 mask) (sound-mask bend)) + (set! (-> arg0 bend) (the int (* 327.66998 (-> arg1 1)))) + ) + ((10) + (logior! (-> arg0 mask) (sound-mask bend)) + (+! (-> arg0 bend) (the int (* 327.66998 (* (-> arg1 1) (rand-vu))))) + ) + ((11) + (logior! (-> arg0 mask) (sound-mask fo-min)) + (set! (-> arg0 fo-min) (the int (-> arg1 1))) + ) + ((12) + (logior! (-> arg0 mask) (sound-mask fo-max)) + (set! (-> arg0 fo-max) (the int (-> arg1 1))) + ) + ((13) + (logior! (-> arg0 mask) (sound-mask fo-curve)) + (set! (-> arg0 fo-curve) (the int (-> arg1 1))) + ) + ((19) + (set! (-> arg0 priority) (the int (-> arg1 1))) + ) + ((25) + (logior! (-> arg0 mask) (sound-mask reg0)) + (set! (-> arg0 reg 0) (the-as uint (-> *footstep-surface* material))) + (let* ((s2-3 arg3) + (v1-33 (if (type? s2-3 process-focusable) + s2-3 + ) + ) + ) + (when v1-33 + (cond + ((focus-test? v1-33 in-air) + (set! (-> arg0 reg 0) (the-as uint 126)) + ) + ((focus-test? v1-33 touch-water) + (set! (-> arg0 reg 0) (the-as uint 127)) + ) + (else + (let* ((s2-4 (-> v1-33 root)) + (v1-34 (if (type? s2-4 collide-shape-moving) + s2-4 + ) + ) + ) + (if v1-34 + (set! (-> arg0 reg 0) (the-as uint (-> (the-as collide-shape-moving v1-34) ground-pat material))) + ) + ) + ) + ) + ) + ) + ) + ((21) + (logior! (-> arg0 mask) (sound-mask reg0)) + (set! (-> arg0 reg 0) (the-as uint (the int (-> arg1 1)))) + ) + ((22) + (logior! (-> arg0 mask) (sound-mask reg1)) + (set! (-> arg0 reg 1) (the-as uint (the int (-> arg1 1)))) + ) + ((23) + (logior! (-> arg0 mask) (sound-mask reg2)) + (set! (-> arg0 reg 2) (the-as uint (the int (-> arg1 1)))) + ) + ) + (+! arg2 -2) + (set! arg1 (&-> arg1 2)) + ) + arg0 + ) + +(defmethod effect-control-method-9 ((this effect-control)) + (let* ((a0-1 (-> this process skel)) + (v1-3 (if (< (the-as uint (-> this channel-offset)) (-> a0-1 active-channels)) + (-> a0-1 root-channel (-> this channel-offset)) + (the-as joint-control-channel #f) + ) + ) + ) + (cond + ((and v1-3 (-> v1-3 frame-group)) + (let* ((s5-0 (-> v1-3 frame-group)) + (f30-0 (+ (* (-> v1-3 frame-num) (-> s5-0 artist-step)) (-> s5-0 artist-base))) + ) + (let ((a0-3 (-> a0-1 root-channel 0 num-func))) + (cond + ((!= s5-0 (-> this last-frame-group)) + (set! (-> this res) (-> s5-0 extra)) + (let ((v1-6 (-> (lookup-tag-idx (-> s5-0 extra) 'effect-name 'base -1000000000.0) lo))) + (set! (-> this name) (if (>= (the-as int v1-6) 0) + (&-> (-> s5-0 extra tag) v1-6) + (the-as (pointer res-tag) #f) + ) + ) + ) + (if (and (-> this name) (= (-> this name 0 key-frame) -1000000000.0)) + (set! (-> this name) (&-> (-> this name) 1)) + ) + (play-effects-from-res-lump this f30-0 f30-0 f30-0) + ) + ((or (not (-> this name)) (= f30-0 (-> this last-frame-num))) + ) + (else + (let ((f28-0 (-> this last-frame-num)) + (f26-0 f30-0) + ) + (cond + ((= a0-3 num-func-seek!) + (let ((f0-6 (+ (* (-> v1-3 param 0) (-> s5-0 artist-step)) (-> s5-0 artist-base)))) + (cond + ((< f26-0 f28-0) + (if (>= f28-0 f0-6) + (play-effects-from-res-lump this f26-0 f28-0 f30-0) + ) + ) + (else + (if (>= f0-6 f28-0) + (play-effects-from-res-lump this f28-0 f26-0 f30-0) + ) + ) + ) + ) + ) + ((or (= a0-3 num-func-loop!) (= a0-3 num-func-loop-speedless!) (= a0-3 num-func-loop-set!)) + (cond + ((>= (-> v1-3 param 0) 0.0) + (cond + ((< f26-0 f28-0) + (play-effects-from-res-lump this f28-0 9999999.0 f30-0) + (play-effects-from-res-lump this -100000000.0 f26-0 9999999.0) + ) + (else + (play-effects-from-res-lump this f28-0 f26-0 f30-0) + ) + ) + ) + ((< f28-0 f26-0) + (play-effects-from-res-lump this f26-0 9999999.0 f30-0) + (play-effects-from-res-lump this -100000000.0 f28-0 9999999.0) + ) + (else + (play-effects-from-res-lump this f26-0 f28-0 f30-0) + ) + ) + ) + ((= a0-3 num-func-+!) + (if (>= (-> v1-3 param 0) 0.0) + (play-effects-from-res-lump this f28-0 f26-0 f30-0) + (play-effects-from-res-lump this f26-0 f28-0 f30-0) + ) + ) + ((= a0-3 num-func-identity) + (play-effects-from-res-lump this f30-0 f30-0 f30-0) + ) + ) + ) + ) + ) + ) + (set! (-> this last-frame-group) s5-0) + (set! (-> this last-frame-num) f30-0) + ) + ) + (else + (set! (-> this last-frame-group) #f) + ) + ) + ) + 0 + (none) + ) + +(defmethod play-effects-from-res-lump ((this effect-control) (arg0 float) (arg1 float) (arg2 float)) + ;; 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)) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Function (method 10 effect-control) has a return type of none, but the expression builder found a return statement. +(defmethod do-effect ((this effect-control) (arg0 string) (arg1 float) (arg2 int)) + (local-vars (sv-288 res-lump)) + (let* ((v1-2 (rtype-of arg0)) + (s3-0 (cond + ((= v1-2 symbol) + (symbol->string (the-as symbol arg0)) + ) + ((= v1-2 string) + arg0 + ) + (else + (the-as string #f) + ) + ) + ) + ) + (cond + ((logtest? (-> this flags) (effect-control-flag ecf2)) + (return #f) + ) + ((string= s3-0 "script") + (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 gp-1) + ) + (return #f) + ) + ) + (set! arg2 (cond + ((< arg2 0) + (let ((v0-7 (get-property-value + (-> this res) + 'effect-joint + 'exact + arg1 + (the-as uint128 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (if (zero? v0-7) + 0 + (the-as int (+ v0-7 1)) + ) + ) + ) + (else + (empty) + arg2 + ) + ) + ) + (when (logtest? (-> this flags) (effect-control-flag ecf0)) + (if (send-event (-> this process) 'effect-control s3-0 arg1 arg2) + (return 0) + ) + ) + (cond + ((and (= (-> s3-0 data 0) 101) + (= (-> s3-0 data 1) 102) + (= (-> s3-0 data 2) 102) + (= (-> s3-0 data 3) 101) + (= (-> s3-0 data 4) 99) + (= (-> s3-0 data 5) 116) + (= (-> s3-0 data 6) 45) + ) + (let* ((s2-0 (-> this process root)) + (v1-38 (if (type? s2-0 collide-shape-moving) + s2-0 + ) + ) + (t1-2 (if v1-38 + (-> (the-as collide-shape-moving v1-38) ground-pat) + *footstep-surface* + ) + ) + ) + (do-effect-for-surface this (the-as symbol s3-0) arg1 arg2 (-> this res) t1-2) + ) + ) + ((and (= (-> s3-0 data 0) 103) + (= (-> s3-0 data 1) 114) + (= (-> s3-0 data 2) 111) + (= (-> s3-0 data 3) 117) + (= (-> s3-0 data 4) 112) + (= (-> s3-0 data 5) 45) + ) + (let ((s2-1 (lookup-part-group-by-name s3-0))) + (when (and (nonzero? s2-1) s2-1 (= (-> s2-1 type) sparticle-launch-group)) + (if *debug-effect-control* + (format + #t + "(~5D) effect group ~A ~A frame ~F joint ~D~%" + (current-time) + (-> this process name) + s3-0 + arg1 + arg2 + ) + ) + (cond + ((logtest? (-> s2-1 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data arg2)) quad) + ) + (part-tracker-spawn part-tracker-subsampler :to (-> this process) :group s2-1) + ) + (else + (set! (-> *launch-matrix* trans quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data arg2)) quad) + ) + (part-tracker-spawn part-tracker :to (-> this process) :group s2-1) + ) + ) + ) + ) + ) + ((and (= (-> s3-0 data 0) 101) + (= (-> s3-0 data 1) 118) + (= (-> s3-0 data 2) 101) + (= (-> s3-0 data 3) 110) + (= (-> s3-0 data 4) 116) + (= (-> s3-0 data 5) 45) + ) + (send-event (-> this process) (string->symbol s3-0) arg1 arg2) + ) + ((string= s3-0 "camera-shake") + (activate! *camera-smush-control* 819.2 15 75 1.0 0.9 (-> *display* camera-clock)) + ) + ((and (= (-> s3-0 data 0) 100) + (= (-> s3-0 data 1) 101) + (= (-> s3-0 data 2) 97) + (= (-> s3-0 data 3) 116) + (= (-> s3-0 data 4) 104) + (= (-> s3-0 data 5) 45) + ) + (let ((s3-1 (-> (string->symbol s3-0) value))) + (when (and (logtest? (-> this flags) (effect-control-flag ecf1)) + (zero? (-> this process draw death-timer)) + (= (-> (the-as death-info s3-1) type) death-info) + ) + (let ((v1-131 (-> this process draw))) + (let ((a1-25 (-> (the-as death-info s3-1) vertex-skip)) + (a0-59 + (max + 2 + (the-as int (/ (-> (the-as death-info s3-1) timer) (the-as uint (the int (-> *display* time-factor))))) + ) + ) + ) + (when (= (-> *setting-control* user-current video-mode) 'pal) + (if (< (the-as uint 1) a1-25) + (set! a1-25 (/ (the-as uint (* (the-as uint 50) a1-25)) (the-as uint 60))) + ) + ) + (let ((a2-29 (-> *display* frames (-> *display* last-screen) run-time))) + (cond + ((< 9000 (the-as int a2-29)) + (set! a1-25 (* a1-25 4)) + ) + ((< 7000 (the-as int a2-29)) + (set! a1-25 (* a1-25 2)) + ) + ) + ) + (set! (-> v1-131 death-vertex-skip) a1-25) + (set! (-> v1-131 death-effect) (-> (the-as death-info s3-1) effect)) + (set! (-> v1-131 death-timer) (the-as uint (+ a0-59 1))) + ) + (set! (-> v1-131 death-timer-org) (-> v1-131 death-timer)) + (set! (-> v1-131 death-draw-overlap) (-> (the-as death-info s3-1) overlap)) + ) + (when (-> (the-as death-info s3-1) sound) + (let* ((s2-3 this) + (s1-0 (method-of-object s2-3 play-effect-sound)) + (s0-0 (-> (the-as death-info s3-1) sound)) + ) + (set! sv-288 (-> this res)) + (let ((t1-5 (string->sound-name (-> (the-as death-info s3-1) sound)))) + (s1-0 s2-3 (the-as symbol s0-0) arg1 arg2 sv-288 t1-5) + ) + ) + ) + (send-event (-> this process) 'death-start (the-as death-info s3-1)) + ) + ) + ) + (else + (play-effect-sound this (the-as symbol s3-0) arg1 arg2 (-> this res) (string->sound-name s3-0)) + ) + ) + ) + 0 + (none) + ) + +(defmethod do-effect-for-surface ((this effect-control) (arg0 symbol) (arg1 float) (arg2 int) (arg3 basic) (arg4 pat-surface)) + (local-vars + (sv-64 + (function sparticle-system sparticle-launcher matrix sparticle-launch-state sparticle-launch-control float none) + ) + (sv-80 sparticle-system) + (sv-96 vector) + (sv-112 matrix) + (sv-128 + (function sparticle-system sparticle-launcher matrix sparticle-launch-state sparticle-launch-control float none) + ) + (sv-144 sparticle-system) + (sv-160 vector) + (sv-176 matrix) + (sv-192 symbol) + (sv-208 + (function sparticle-system sparticle-launcher matrix sparticle-launch-state sparticle-launch-control float none) + ) + (sv-224 sparticle-system) + (sv-240 vector) + (sv-256 matrix) + ) + (let ((s1-0 (the-as sound-name #f))) + (-> *display* frames (-> *display* last-screen) run-time) + (set! sv-192 arg0) + (cond + ((string= (the-as string sv-192) "effect-walk-step-left") + (set! s1-0 (sound-name-with-material "walk" arg4 "1")) + ) + ((string= (the-as string sv-192) "effect-run-step-left") + (set! s1-0 (sound-name-with-material "run" arg4 "1")) + ) + ((string= (the-as string sv-192) "effect-mech-step-left") + (set! s1-0 (sound-name-with-material "mwlk" arg4 "1")) + ) + ((string= (the-as string sv-192) "effect-walk-step-right") + (set! s1-0 (sound-name-with-material "walk" arg4 "2")) + ) + ((string= (the-as string sv-192) "effect-run-step-right") + (set! s1-0 (sound-name-with-material "run" arg4 "2")) + ) + ((string= (the-as string sv-192) "effect-mech-step-right") + (set! s1-0 (sound-name-with-material "mwlk" arg4 "2")) + ) + ((string= (the-as string sv-192) "effect-roll") + (set! s1-0 (sound-name-with-material "roll" arg4 "")) + ) + ((string= (the-as string sv-192) "effect-slide") + (set! s1-0 (sound-name-with-material "slide" arg4 "")) + ) + ((string= (the-as string sv-192) "effect-land") + (set! s1-0 (sound-name-with-material "land" arg4 "")) + ) + ((string= (the-as string sv-192) "effect-zoom-land") + (set! s1-0 (sound-name-with-material "zoom-land" arg4 "")) + ) + ((string= (the-as string sv-192) "effect-zoom-hit") + (set! s1-0 (sound-name-with-material "zoom-hit" arg4 "")) + ) + ((string= (the-as string sv-192) "effect-flut-land") + (set! s1-0 (sound-name-with-material "flut-land" arg4 "")) + ) + ((string= (the-as string sv-192) "effect-land-poof") + (do-effect + this + (-> (new 'static 'boxed-array :type string + "group-land-poof-unk" + "group-land-poof-ice" + "group-land-poof-qsd" + "group-land-poof-wtr" + "group-land-poof-tar" + "group-land-poof-san" + "group-land-poof-wod" + "group-land-poof-grs" + "group-land-poof-pmt" + "group-land-poof-snw" + "group-land-poof-dsn" + "group-land-poof-unk" + "group-land-poof-lav" + "group-land-poof-cwd" + "group-land-poof-grv" + "group-land-poof-drt" + "group-land-poof-mtl" + "group-land-poof-str" + "group-land-poof-pmt" + "group-land-poof-swm" + "group-land-poof-unk" + "group-land-poof-mtl" + "group-land-poof-neu" + "group-land-poof-stn" + "group-land-poof-cmt" + "group-land-poof-car" + "group-land-poof-gmt" + "group-land-poof-smt" + "group-land-poof-hwd" + "group-land-poof-sqi" + "group-land-poof-mhm" + "group-land-poof-for" + "group-land-poof-mhs" + "group-land-poof-dma" + ) + (-> arg4 material) + ) + arg1 + -1 + ) + ) + ((string= (the-as string sv-192) "effect-run-poof") + (do-effect + this + (-> (new 'static 'boxed-array :type string + "group-run-poof-unk" + "group-run-poof-ice" + "group-run-poof-qsd" + "group-run-poof-wtr" + "group-run-poof-tar" + "group-run-poof-san" + "group-run-poof-wod" + "group-run-poof-grs" + "group-run-poof-pmt" + "group-run-poof-snw" + "group-run-poof-dsn" + "group-run-poof-unk" + "group-run-poof-lav" + "group-run-poof-cwd" + "group-run-poof-grv" + "group-run-poof-drt" + "group-run-poof-mtl" + "group-run-poof-str" + "group-run-poof-pmt" + "group-run-poof-swm" + "group-run-poof-unk" + "group-run-poof-mtl" + "group-run-poof-neu" + "group-run-poof-stn" + "group-run-poof-cmt" + "group-run-poof-car" + "group-run-poof-gmt" + "group-run-poof-smt" + "group-run-poof-hwd" + "group-run-poof-sqi" + "group-run-poof-mhm" + "group-run-poof-for" + "group-run-poof-mhs" + "group-run-poof-dma" + ) + (-> arg4 material) + ) + arg1 + -1 + ) + ) + ((string= (the-as string sv-192) "effect-just-footprint") + (do-effect + this + (-> (new 'static 'boxed-array :type string + "group-just-footprint-unk" + "group-just-footprint-ice" + "group-just-footprint-qsd" + "group-just-footprint-wtr" + "group-just-footprint-tar" + "group-just-footprint-san" + "group-just-footprint-wod" + "group-just-footprint-grs" + "group-just-footprint-pmt" + "group-just-footprint-snw" + "group-just-footprint-dsn" + "group-just-footprint-unk" + "group-just-footprint-lav" + "group-just-footprint-cwd" + "group-just-footprint-grv" + "group-just-footprint-drt" + "group-just-footprint-mtl" + "group-just-footprint-str" + "group-just-footprint-pmt" + "group-just-footprint-swm" + "group-just-footprint-unk" + "group-just-footprint-mtl" + "group-just-footprint-neu" + "group-just-footprint-stn" + "group-just-footprint-cmt" + "group-just-footprint-car" + "group-just-footprint-gmt" + "group-just-footprint-smt" + "group-just-footprint-hwd" + "group-just-footprint-sqi" + "group-just-footprint-mhm" + "group-just-footprint-for" + "group-just-footprint-mhs" + "group-just-footprint-dma" + ) + (-> arg4 material) + ) + arg1 + -1 + ) + ) + ((string= (the-as string sv-192) "effect-just-poof") + (do-effect + this + (-> (new 'static 'boxed-array :type string + "group-just-poof-unk" + "group-just-poof-ice" + "group-just-poof-qsd" + "group-just-poof-wtr" + "group-just-poof-tar" + "group-just-poof-san" + "group-just-poof-wod" + "group-just-poof-grs" + "group-just-poof-pmt" + "group-just-poof-snw" + "group-just-poof-dsn" + "group-just-poof-unk" + "group-just-poof-lav" + "group-just-poof-cwd" + "group-just-poof-grv" + "group-just-poof-drt" + "group-just-poof-mtl" + "group-just-poof-str" + "group-just-poof-pmt" + "group-just-poof-swm" + "group-just-poof-unk" + "group-just-poof-mtl" + "group-just-poof-neu" + "group-just-poof-stn" + "group-just-poof-cmt" + "group-just-poof-car" + "group-just-poof-gmt" + "group-just-poof-smt" + "group-just-poof-hwd" + "group-just-poof-sqi" + "group-just-poof-mhm" + "group-just-poof-for" + "group-just-poof-mhs" + "group-just-poof-dma" + ) + (-> arg4 material) + ) + arg1 + -1 + ) + ) + ((string= (the-as string sv-192) "effect-slide-poof") + (do-effect + this + (-> (new 'static 'boxed-array :type string + "group-slide-poof-unk" + "group-slide-poof-ice" + "group-slide-poof-qsd" + "group-slide-poof-wtr" + "group-slide-poof-tar" + "group-slide-poof-san" + "group-slide-poof-wod" + "group-slide-poof-grs" + "group-slide-poof-pmt" + "group-slide-poof-snw" + "group-slide-poof-dsn" + "group-slide-poof-unk" + "group-slide-poof-lav" + "group-slide-poof-cwd" + "group-slide-poof-grv" + "group-slide-poof-drt" + "group-slide-poof-mtl" + "group-slide-poof-str" + "group-slide-poof-pmt" + "group-slide-poof-swm" + "group-slide-poof-unk" + "group-slide-poof-mtl" + "group-slide-poof-neu" + "group-slide-poof-stn" + "group-slide-poof-cmt" + "group-slide-poof-car" + "group-slide-poof-gmt" + "group-slide-poof-smt" + "group-slide-poof-hwd" + "group-slide-poof-sqi" + "group-slide-poof-mhm" + "group-slide-poof-for" + "group-slide-poof-mhs" + "group-slide-poof-dma" + ) + (-> arg4 material) + ) + arg1 + -1 + ) + ) + ((string= (the-as string sv-192) "effect-droppings") + (let ((s0-1 (-> *part-id-table* (-> (new 'static 'boxed-array :type uint32 + #x8e + #x2a9 + #x2aa + #x2ab + #x2ac + #x75 + #x8b + #x77 + #x2ad + #x79 + #x2ae + #x8e + #x2af + #x8d + #x2b0 + #x76 + #x2b1 + #x2b2 + #x2ad + #x2b3 + #x8e + #x2b1 + #x2b4 + #x8c + #x2b5 + #x2b6 + #x2b7 + #x2b8 + #x2b9 + #x2ba + #x2bb + #x78 + #x2bc + #x2bd + ) + (-> arg4 material) + ) + ) + ) + ) + (when (nonzero? s0-1) + (set! sv-64 sp-launch-particles-var) + (set! sv-80 *sp-particle-system-2d*) + (set! sv-112 *launch-matrix*) + (set! sv-96 (-> sv-112 trans)) + (let ((v1-80 (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data arg2)) quad))) + (set! (-> sv-96 quad) v1-80) + ) + (let ((a3-6 #f) + (t0-1 #f) + (t1-1 1.0) + ) + (sv-64 sv-80 s0-1 sv-112 (the-as sparticle-launch-state a3-6) (the-as sparticle-launch-control t0-1) t1-1) + ) + ) + ) + ) + ((string= (the-as string sv-192) "effect-jump-droppings") + (let ((s0-2 (-> *part-id-table* (-> (new 'static 'boxed-array :type uint32 + #x2be + #x2bf + #x2c0 + #x2c1 + #x2c2 + #x86 + #x2c3 + #x89 + #x2c4 + #x88 + #x2c5 + #x2be + #x2c6 + #x2c7 + #x2c8 + #x87 + #x2c9 + #x2ca + #x2c4 + #x2cb + #x2be + #x2c9 + #x2cc + #x2cd + #x2ce + #x2cf + #x2d0 + #x2d1 + #x2d2 + #x2d3 + #x2d4 + #x8a + #x2d5 + #x2d6 + ) + (-> arg4 material) + ) + ) + ) + ) + (when (nonzero? s0-2) + (set! sv-128 sp-launch-particles-var) + (set! sv-144 *sp-particle-system-2d*) + (set! sv-176 *launch-matrix*) + (set! sv-160 (-> sv-176 trans)) + (let ((v1-97 (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data arg2)) quad))) + (set! (-> sv-160 quad) v1-97) + ) + (let ((a3-7 #f) + (t0-2 #f) + (t1-2 1.0) + ) + (sv-128 sv-144 s0-2 sv-176 (the-as sparticle-launch-state a3-7) (the-as sparticle-launch-control t0-2) t1-2) + ) + ) + ) + ) + ((let ((t9-40 string=) + (a1-45 "effect-board-poof") + ) + (t9-40 (the-as string sv-192) a1-45) + ) + (let ((s0-3 (-> *part-id-table* (-> (new 'static 'boxed-array :type uint32 + #x2d7 + #x2d8 + #x2d9 + #x2da + #x2db + #x2dc + #x2dd + #x2de + #x2df + #x2e0 + #x2e1 + #x2d7 + #x2e2 + #x2e3 + #x2e4 + #x2e5 + #x2e6 + #x2e7 + #x2df + #x2e8 + #x2d7 + #x2e6 + #x2e9 + #x2a2 + #x2ea + #x2eb + #x2ec + #x2ed + #x2ee + #x2ef + #x2f0 + #x2f1 + #x2f2 + #x2f3 + ) + (-> arg4 material) + ) + ) + ) + ) + (when (nonzero? s0-3) + (set! sv-208 sp-launch-particles-var) + (set! sv-224 *sp-particle-system-2d*) + (set! sv-256 *launch-matrix*) + (set! sv-240 (-> sv-256 trans)) + (let ((v1-114 (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data arg2)) quad))) + (set! (-> sv-240 quad) v1-114) + ) + (let ((a3-8 #f) + (t0-3 #f) + (t1-3 1.0) + ) + (sv-208 sv-224 s0-3 sv-256 (the-as sparticle-launch-state a3-8) (the-as sparticle-launch-control t0-3) t1-3) + ) + ) + ) + ) + ) + (if s1-0 + (play-effect-sound this arg0 arg1 arg2 arg3 s1-0) + ) + ) + 0 + (none) + ) + +(defmethod play-effect-sound ((this effect-control) (arg0 symbol) (arg1 float) (arg2 int) (arg3 basic) (arg4 sound-name)) + (local-vars (sv-112 res-tag) (sv-128 sound-name) (sv-144 basic) (sv-160 (function vector vector float))) + (set! sv-144 arg3) + (let ((s0-0 arg4) + (gp-0 (the-as object (new 'stack 'sound-spec))) + (s5-0 (if (< arg2 0) + (the-as vector #f) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data arg2)) + ) + ) + ) + (set! (-> (the-as sound-spec gp-0) sound-name) s0-0) + (logior! (-> (the-as sound-spec gp-0) mask) (sound-mask volume)) + (set! (-> (the-as sound-spec gp-0) pitch-mod) 0) + (set! (-> (the-as sound-spec gp-0) volume) 1024) + (set! sv-112 (new 'static 'res-tag)) + (let* ((t9-2 (method-of-type res-lump get-property-data)) + (a1-5 'effect-param) + (a2-1 'exact) + (a3-1 arg1) + (t0-1 #f) + (t1-1 (the-as (pointer res-tag) (& sv-112))) + (t2-0 *res-static-buf*) + (a1-6 (t9-2 (the-as res-lump sv-144) a1-5 a2-1 a3-1 (the-as pointer t0-1) t1-1 t2-0)) + ) + (when a1-6 + (effect-param->sound-spec + (the-as sound-spec gp-0) + (the-as (pointer float) a1-6) + (the-as int (-> sv-112 elt-count)) + (the-as process-focusable (-> this process)) + ) + (if (logtest? (-> (the-as sound-spec gp-0) mask) (sound-mask unk)) + (return 0) + ) + ) + ) + (let ((f0-0 (-> *setting-control* user-current under-water-pitch-mod))) + (when (!= f0-0 0.0) + (logior! (-> (the-as sound-spec gp-0) mask) (sound-mask pitch)) + (let ((f0-1 (* 2.0 f0-0))) + (set! (-> (the-as sound-spec gp-0) pitch-mod) + (- (-> (the-as sound-spec gp-0) pitch-mod) (the int (* 1524.0 f0-1))) + ) + ) + ) + ) + (if (or (and (nonzero? (-> (the-as sound-spec gp-0) fo-max)) + (let ((f30-0 (* 4096.0 (the float (-> (the-as sound-spec gp-0) fo-max))))) + (set! sv-160 vector-vector-distance) + (let ((a0-8 (ear-trans 0)) + (a1-7 s5-0) + ) + (< f30-0 (sv-160 a0-8 a1-7)) + ) + ) + ) + (= (-> (the-as (pointer int8) gp-0) 9) 126) + ) + (return 0) + ) + (when *debug-effect-control* + (set! sv-128 s0-0) + (string<-charp (clear *temp-string*) (the-as (pointer uint8) (& sv-128))) + (format + #t + "(~5D) effect sound ~A ~S (~S) frame ~F joint ~D " + (current-time) + (-> this process name) + arg0 + *temp-string* + arg1 + arg2 + ) + (format + #t + "volume: ~f pitch-mod: ~f~%" + (* 0.09765625 (the float (-> (the-as sound-spec gp-0) volume))) + (* 0.000656168 (the float (-> (the-as sound-spec gp-0) pitch-mod))) + ) + ) + (sound-play-by-spec (the-as sound-spec gp-0) (new-sound-id) s5-0) + ) + 0 + ) + +(defbehavior target-land-effect target () + (cond + ((focus-test? self flut) + (do-effect (-> self skel effect) "effect-land-poof" -1.0 -1) + (do-effect (-> self skel effect) "effect-flut-land" -1.0 -1) + ) + ((focus-test? self pilot) + (sound-play-by-name + (sound-name-with-material "zoom-land" (-> self control ground-pat) "") + (new-sound-id) + (the int (* 1024.0 (* 0.000016276043 (-> self control ground-impact-vel)))) + 0 + 0 + (sound-group) + #t + ) + ) + ((logtest? (water-flag touch-water) (-> self water flags)) + (do-effect (-> self skel effect) "effect-land-water" -1.0 -1) + ) + (else + (do-effect (-> self skel effect) "effect-land-poof" -1.0 -1) + (do-effect (-> self skel effect) "effect-land" -1.0 -1) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/game/fact-h.gc b/goal_src/jak3/engine/game/fact-h.gc index 95980f030a..7436ff1391 100644 --- a/goal_src/jak3/engine/game/fact-h.gc +++ b/goal_src/jak3/engine/game/fact-h.gc @@ -440,7 +440,7 @@ (trig-mask uint8 2) ) (:methods - (new (symbol type process (pointer float) pickup-type float) _type_) + (new (symbol type process (pointer float)) _type_) (clear-mask-bits (_type_ int) none) ) ) @@ -520,13 +520,7 @@ (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9) ) -(defmethod new fact-info-enemy ((allocation symbol) - (type-to-make type) - (arg0 process) - (arg1 (pointer float)) - (arg2 pickup-type) - (arg3 float) - ) +(defmethod new fact-info-enemy ((allocation symbol) (type-to-make type) (arg0 process) (arg1 (pointer float))) (local-vars (sv-16 res-tag) (sv-32 res-tag)) (let ((gp-0 (the-as diff --git a/goal_src/jak3/engine/game/game-h.gc b/goal_src/jak3/engine/game/game-h.gc index 334f2478d7..805ae33656 100644 --- a/goal_src/jak3/engine/game/game-h.gc +++ b/goal_src/jak3/engine/game/game-h.gc @@ -112,7 +112,8 @@ 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) + (root trsqv) (node-list cspace-array) (draw draw-control) (skel joint-control) diff --git a/goal_src/jak3/engine/game/game-info-h.gc b/goal_src/jak3/engine/game/game-info-h.gc index 5a3e6044c0..a4dc47f0ca 100644 --- a/goal_src/jak3/engine/game/game-info-h.gc +++ b/goal_src/jak3/engine/game/game-info-h.gc @@ -13,14 +13,14 @@ (amulet0 0) (amulet1 1) (amulet2 2) - (pass-wascity 3) + (pass-front-gate 3) (seal-of-mar 4) - (pass-factory 5) + (cypher-gliph 5) (artifact-holocube 6) - (artifact-quantum-reflector 7) - (artifact-prism 8) - (artifact-beam-generator 9) - (artifact-time-map 10) + (artifact-av-reflector 7) + (artifact-av-prism 8) + (artifact-av-generator 9) + (artifact-av-map 10) (light-eco-crystal0 11) (light-eco-crystal1 12) (light-eco-crystal2 13) @@ -239,32 +239,31 @@ (command-list pair) (object-name string 256) (object-status basic 256) - (update-callback basic) + (update-callback (function load-state object)) ) (:methods (new (symbol type) _type_) - (load-state-method-9 () none) - (load-state-method-10 () none) - (load-state-method-11 () none) + (reset! (_type_) _type_) + (update! (_type_) int) + (want-levels (_type_ (pointer symbol)) int) (want-sound-banks (_type_ (pointer symbol)) none) - (load-state-method-13 () none) - (load-state-method-14 () none) - (load-state-method-15 () none) - (load-state-method-16 () none) + (want-display-level (_type_ symbol symbol) int) + (want-vis-level (_type_ symbol) none) + (want-force-vis (_type_ symbol symbol) int) + (want-force-inside (_type_ symbol symbol) none) (execute-commands-up-to (_type_ float) none) (backup-load-state-and-set-cmds (_type_ pair) int) (restore-load-state-and-cleanup (_type_) int) (restore-load-state (_type_) int) - (load-state-method-21 (_type_) none) + (add-borrow-levels (_type_) none) ) ) -;; WARN: Return type mismatch none vs load-state. (defmethod new load-state ((allocation symbol) (type-to-make type)) (let ((a0-1 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) (set! (-> a0-1 update-callback) #f) - (the-as load-state ((method-of-object a0-1 load-state-method-9))) + (reset! a0-1) ) ) @@ -353,7 +352,7 @@ (play-list (array game-task-info)) (sub-task-list (array game-task-node-info)) (mission-list (array game-task-node-info)) - (task-node-commands (array uint8)) + (task-node-commands (array game-task-node-command)) (task-node-exclusive (array uint16)) (task-counter uint32) (unknown-arr4 (array uint16)) @@ -414,7 +413,7 @@ (dust-storm handle) (flut-count int32) (death-resetter resetter-spec :inline) - (current-vehicle uint8) + (current-vehicle game-vehicle-u8) (vehicle-turbo-ready float) (percent-complete float) ) diff --git a/goal_src/jak3/engine/game/game-info.gc b/goal_src/jak3/engine/game/game-info.gc index a8e6e7bccf..b4ff04b720 100644 --- a/goal_src/jak3/engine/game/game-info.gc +++ b/goal_src/jak3/engine/game/game-info.gc @@ -55,12 +55,12 @@ ) (defmethod subtask-index-by-name ((this game-info) (arg0 string)) - (let ((s5-0 (-> *game-info* sub-task-list))) - (dotimes (s4-0 (-> s5-0 length)) - (when (nonzero? s4-0) - (let ((v1-4 (-> s5-0 s4-0))) + (let ((subtasks (-> *game-info* sub-task-list))) + (dotimes (i (-> subtasks length)) + (when (nonzero? i) + (let ((v1-4 (-> subtasks i))) (if (string= arg0 (-> v1-4 name)) - (return s4-0) + (return i) ) ) ) @@ -202,7 +202,7 @@ (set! (-> continue-rot 8) (the int (* 32767.0 (-> rot fvec z)))) ) ) - (load-state-method-21 arg0) + (add-borrow-levels arg0) this ) @@ -382,12 +382,7 @@ (when (or (and (-> subtask manager) (handle->process (-> subtask manager manager))) (and (-> subtask manager) (-> subtask manager level) - (let* ((a0-8 *level*) - (t9-2 (method-of-object a0-8 level-group-method-26)) - (a1-1 (-> subtask manager level)) - ) - (= (t9-2 a0-8 a1-1) 'active) - ) + (= (status-of-level-and-borrows *level* (-> subtask manager level) #f) 'active) ) (and (not (-> subtask manager)) (= (-> level info taskname) (-> subtask level))) ) @@ -481,7 +476,7 @@ (set! (-> this old-vehicles) (game-vehicles)) (set! (-> this secrets) (game-secrets)) (set! (-> this purchase-secrets) (game-secrets)) - (set! (-> this current-vehicle) (the-as uint 27)) + (set! (-> this current-vehicle) (game-vehicle-u8 v-turtle v-snake v-toad v-fox)) (set-continue! this (cond @@ -592,7 +587,10 @@ (dotimes (v1-96 (-> this game-score length)) (set! (-> this game-score v1-96) 0.0) ) - ((method-of-object *bigmap* bigmap-method-9)) + (when (nonzero? *bigmap*) ;; og:preserve-this not-yet-implemented check + (format 0 "skipping bigmap init in game-info~%") + ((method-of-object *bigmap* bigmap-method-9)) + ) ) ) (case mode @@ -689,13 +687,17 @@ (get-current-continue-forced this) ) ) + (t1-3 arg2) + (t2-0 reset-spec) ) - ((the-as (function symbol symbol continue-point game-save resetter-spec none :behavior process) s0-2) - (the-as symbol sv-128) - (the-as symbol sv-144) - (the-as continue-point sv-160) - (the-as game-save mode) - (the-as resetter-spec t0-4) + ((the-as (function cpu-thread function symbol symbol continue-point game-save resetter-spec none) s0-2) + sv-128 + sv-144 + sv-160 + mode + (the-as continue-point t0-4) + t1-3 + t2-0 ) ) ) @@ -1399,6 +1401,10 @@ (defmethod copy-perms-to-level! ((this game-info) (arg0 level)) (let ((s5-0 (-> arg0 bsp level entity))) + (when (not s5-0) ;; og:preserve-this not-yet-implemented check + (format #t "skipping copy-perms-to-level! since we have no entity links (needs entity.gc)~%") + (return 0) + ) (dotimes (s4-0 (-> s5-0 length)) (let* ((s3-0 (-> s5-0 data s4-0 entity extra perm)) (v1-7 (actor-perm this (-> s3-0 aid))) @@ -1898,7 +1904,10 @@ (defmethod adjust-to-screen-flip ((this cpad-info)) (if (and (not (paused?)) (zero? (-> this number)) (-> *setting-control* user-current player-control-override)) - (override-player-controls) + (when (nonzero? override-player-controls) ;; og:preserve-this not-yet-implemented check + ;; added nonzero check, but I suspect there's a bug we're even getting here... + (override-player-controls) + ) ) (when (logtest? (-> *game-info* secrets) (game-secrets hflip-screen)) (set! (-> this leftx) (- 255 (the-as int (-> this leftx)))) @@ -1964,39 +1973,39 @@ ) ) -(defmethod get-rank ((this highscore-info) (arg0 float)) - (let ((v0-0 0)) +(defmethod get-rank ((this highscore-info) (score float)) + (let ((place 0)) (cond ((logtest? (-> this flags) (highscore-flags time)) (cond - ((= arg0 0.0) + ((= score 0.0) ) - ((>= (-> this gold-score) arg0) - (set! v0-0 3) + ((>= (-> this gold-score) score) + (set! place 3) ) - ((>= (-> this silver-score) arg0) - (set! v0-0 2) + ((>= (-> this silver-score) score) + (set! place 2) ) - ((>= (-> this bronze-score) arg0) - (set! v0-0 1) + ((>= (-> this bronze-score) score) + (set! place 1) ) ) ) (else (cond - ((>= arg0 (-> this gold-score)) - (set! v0-0 3) + ((>= score (-> this gold-score)) + (set! place 3) ) - ((>= arg0 (-> this silver-score)) - (set! v0-0 2) + ((>= score (-> this silver-score)) + (set! place 2) ) - ((>= arg0 (-> this bronze-score)) - (set! v0-0 1) + ((>= score (-> this bronze-score)) + (set! place 1) ) ) ) ) - v0-0 + place ) ) @@ -2140,7 +2149,7 @@ board sidekick board-launch - feature39 + board-zap darkjak darkjak-smack darkjak-bomb0 @@ -2153,9 +2162,9 @@ lightjak-freeze lightjak-shield artifact-invis - feature56 - feature57 - feature58 + jakc + lighteco + darkeco ) ) (set! (-> gp-0 vehicles) (game-vehicles v-turtle v-snake v-scorpion v-toad v-fox v-rhino v-mirage v-x-ride)) @@ -2180,7 +2189,7 @@ (set! (-> gp-0 distance) 0.0) (set! (-> gp-0 health-bar-vehicle) 0.0) (set! (-> gp-0 dust-storm) (the-as handle #f)) - (set! (-> gp-0 current-vehicle) (the-as uint 27)) + (set! (-> gp-0 current-vehicle) (game-vehicle-u8 v-turtle v-snake v-toad v-fox)) ) 0 diff --git a/goal_src/jak3/engine/game/game-save.gc b/goal_src/jak3/engine/game/game-save.gc index c8c18c558f..f73535ca3c 100644 --- a/goal_src/jak3/engine/game/game-save.gc +++ b/goal_src/jak3/engine/game/game-save.gc @@ -1898,7 +1898,7 @@ (set! (-> this vehicles) (the-as game-vehicles (-> (the-as game-save-tag s4-0) user-uint64))) ) (((game-save-elt vehicle)) - (set! (-> this current-vehicle) (-> (the-as game-save-tag s4-0) user-uint8 0)) + (set! (-> this current-vehicle) (the-as game-vehicle-u8 (-> (the-as game-save-tag s4-0) user-uint8 0))) ) (((game-save-elt items)) (set! (-> this items) (the-as game-items (-> (the-as game-save-tag s4-0) user-uint64))) @@ -2308,7 +2308,7 @@ ) ) (print-game-text - (lookup-text! *common-text* (text-id text-00a0) #f) + (lookup-text! *common-text* (text-id progress-memcard-saving) #f) gp-1 #f 44 @@ -2323,7 +2323,7 @@ (set! (-> v1-38 height) (the float 200)) ) (let ((s5-2 print-game-text)) - (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-00a4) #f) 1) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-remove-warn) #f) 1) (s5-2 *temp-string* gp-1 #f 44 (bucket-id hud-draw-hud-alpha)) ) ) @@ -2334,13 +2334,7 @@ (let* ((s5-3 (-> *display* frames (-> *display* on-screen) global-buf)) (gp-2 (-> s5-3 base)) ) - (let ((a0-39 (-> self icon)) - (t9-14 (method-of-type hud-sprite draw)) - (a1-12 s5-3) - (a2-10 (-> self level)) - ) - (t9-14 a0-39 a1-12 a2-10) - ) + (draw (-> self icon) s5-3 (-> self level) #f) (let ((a3-8 (-> s5-3 base))) (when (!= gp-2 a3-8) (let ((v1-55 (the-as object (-> s5-3 base)))) @@ -2403,7 +2397,12 @@ ) (set! (-> self starting-auto-save-status) (the-as basic (-> *setting-control* user-default auto-save))) (set! (-> *setting-control* user-default auto-save) #f) - (set-vector! (-> self icon color) 128 128 128 128) + (let ((v1-61 (-> self icon color-ptr))) + (set! (-> v1-61 0) 128) + (set! (-> v1-61 1) 128) + (set! (-> v1-61 2) 128) + (set! (-> v1-61 3) 128) + ) (set! (-> self icon pos x) 440) (set! (-> self icon pos y) 210) (set! (-> self icon pos z) #xffffff) @@ -2411,8 +2410,8 @@ (set! (-> self icon scale-x) 2.0) (set! (-> self icon scale-y) 2.0) (set! (-> self icon angle) 0.0) - (set! (-> self icon flags) (the-as uint 0)) - (set! (-> self icon tex) (lookup-texture-by-id (new 'static 'texture-id :page #x9))) + (set! (-> self icon flags) (hud-sprite-flags)) + (set! (-> self icon tid) (the-as texture-id (get-texture checkpoint level-default-minimap))) (go-virtual get-heap) ) @@ -2999,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/idle-control.gc b/goal_src/jak3/engine/game/idle-control.gc index 9b6488a5af..c1754850a7 100644 --- a/goal_src/jak3/engine/game/idle-control.gc +++ b/goal_src/jak3/engine/game/idle-control.gc @@ -5,5 +5,123 @@ ;; name in dgo: idle-control ;; dgos: GAME +;; +++idle-control-cmd +(defenum idle-control-cmd + :type uint8 + (reset 0) + (play 1) + (push 2) + ) +;; ---idle-control-cmd + + ;; DECOMP BEGINS +(deftype idle-control-frame (structure) + ((command idle-control-cmd) + (anim uint32) + (param0 int32) + (param1 int32) + (param2 pair) + ) + ) + + +(deftype idle-control (structure) + ((anim (inline-array idle-control-frame)) + (anim-speed float) + (current-index int32) + (counter int32) + (target int32) + ) + (:methods + (init! (_type_ (inline-array idle-control-frame)) none) + (play-idle-frames! (_type_ process-drawable) none :behavior process-drawable) + ) + ) + + +;; WARN: Return type mismatch idle-control vs none. +(defmethod init! ((this idle-control) (arg0 (inline-array idle-control-frame))) + "Initialize this [[idle-control]]." + (set! (-> this anim) arg0) + (set! (-> this anim-speed) 0.0) + (set! (-> this current-index) 0) + (set! (-> this counter) 0) + (set! (-> this target) 0) + (none) + ) + +;; WARN: Function (method 10 idle-control) has a return type of none, but the expression builder found a return statement. +(defmethod play-idle-frames! ((this idle-control) (arg0 process-drawable)) + "Set the process pointer to the given [[process-drawable]] and run the idle frames for it." + (when (nonzero? (-> this anim)) + ;; og:preserve-this + (protect (PP) + ;; (set! self arg0) + (set! PP arg0) + (loop + (let ((s4-0 (-> this anim (-> this current-index)))) + (case (-> s4-0 command) + (((idle-control-cmd play)) + (if (< (-> s4-0 anim) 0) + (return #f) + ) + (when (zero? (-> this target)) + (set! (-> this target) (rand-vu-int-range (-> s4-0 param0) (-> s4-0 param1))) + (set! (-> this anim-speed) + (rand-vu-float-range + (command-get-float (-> s4-0 param2 car) 0.0) + (command-get-float (-> (the-as pair (-> s4-0 param2 cdr)) car) 0.0) + ) + ) + (ja :group! (-> (the-as process-drawable self) draw art-group data (-> s4-0 anim)) :num! min) + (return #f) + ) + (ja :group! (-> (the-as process-drawable self) draw art-group data (-> s4-0 anim)) + :num! (seek! max (-> this anim-speed)) + ) + (cond + ((ja-done? 0) + (+! (-> this counter) 1) + (cond + ((>= (-> this counter) (-> this target)) + (+! (-> this current-index) 1) + (set! (-> this counter) 0) + (set! (-> this target) 0) + 0 + ) + (else + (ja :num-func num-func-identity :frame-num 0.0) + (return #f) + ) + ) + ) + (else + (return #f) + ) + ) + ) + (((idle-control-cmd push)) + (ja-channel-push! 1 (the-as time-frame (-> s4-0 param0))) + (+! (-> this current-index) 1) + (set! (-> this counter) 0) + (set! (-> this target) 0) + 0 + ) + (((idle-control-cmd reset)) + (set! (-> this current-index) 0) + (set! (-> this counter) 0) + (set! (-> this target) 0) + 0 + ) + ) + ) + ) + ;; og:preserve-this + ;; (set! self s5-0) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/game/main-h.gc b/goal_src/jak3/engine/game/main-h.gc index a9c9316541..58b35f2003 100644 --- a/goal_src/jak3/engine/game/main-h.gc +++ b/goal_src/jak3/engine/game/main-h.gc @@ -10,8 +10,11 @@ (define-extern paused? (function symbol)) (define-extern demo? (function symbol)) (define-extern kiosk? (function symbol)) +(define-extern scene-select? (function symbol)) (define-extern set-blackout-frames (function time-frame none)) (define-extern set-master-mode (function symbol none)) +(define-extern on (function symbol process)) +(define-extern toggle-pause (function int)) ;; +++main-h:collide-spec (defenum collide-spec @@ -76,16 +79,16 @@ (defenum scene-controls :type int64 :bitfield #t - ; (channel) - ; (anim-name) - ; (dma-size) - ; (bounds-spheres) - ; (actors) - ; (actor-marks) - ; (special-fma-spheres) - ; (scene-controls-7) - ; (scene-controls-8) - ; (display-controls) + (channel) + (anim-name) + (dma-size) + (bounds-spheres) + (actors) + (actor-marks) + (special-fma-spheres) + (scene-controls-7) + (scene-controls-8) + (display-controls) ) ;; ---main-h:scene-controls @@ -115,35 +118,26 @@ ;; +++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 ;; +++main-h:race-selection (defenum race-selection :type int64 - ; (kiera-class3 0) - ; (kiera-class2 1) - ; (kiera-class1 2) - ; (errol 3) - ; (bush-class3 4) - ; (bush-class2 5) - ; (bush-class1 6) - ; (bush-errol 7) - ; (bush-port 8) - ; (bush-class3-reverse 9) - ; (bush-class2-reverse 10) - ; (bush-class1-reverse 11) + (desertb-race-record 0) + (rs1 1) + (desrally-record 2) ) ;; ---main-h:race-selection @@ -168,6 +162,9 @@ ) ;; ---main-h:ocean-height-hack +(define-extern *progress-cheat* symbol) +(define-extern *last-master-mode* symbol) + ;; DECOMP BEGINS (define *stats-poly* #f) @@ -354,7 +351,7 @@ (define *debug-player-vehicle-unkillable* #f) -(define *debug-actor* (the-as object #f)) +(define *debug-actor* (the-as process #f)) (define *gun-marks* #f) @@ -417,7 +414,7 @@ (deftype screen-filter (basic) ((draw? symbol) - (bucket int32) + (bucket bucket-id) (depth int32) (ztest uint64) (color vector :inline) @@ -426,11 +423,11 @@ (extra vector :inline) (speed float :overlay-at (-> extra data 0)) (current-interp float :overlay-at (-> extra data 1)) - (lock-vsync? basic) + (lock-vsync? symbol) ) (:methods (draw (_type_) none) - (setup (_type_ vector vector float bucket-id) none) + (setup (_type_ vector vector float bucket-id int int symbol) none) (disable (_type_) none) ) ) @@ -451,7 +448,7 @@ (camera-to-bbox-dist float) ) (:methods - (col-rend-method-9 () none) + (draw (_type_) none) ) ) diff --git a/goal_src/jak3/engine/game/main.gc b/goal_src/jak3/engine/game/main.gc index 815ebf1df7..da53ab2fce 100644 --- a/goal_src/jak3/engine/game/main.gc +++ b/goal_src/jak3/engine/game/main.gc @@ -5,5 +5,1758 @@ ;; name in dgo: main ;; dgos: GAME +(define-extern menu-respond-to-pause (function symbol)) +(define-extern anim-tester-add-object (function string none)) + ;; DECOMP BEGINS +;; WARN: Return type mismatch time-frame vs none. +(defun set-letterbox-frames ((arg0 time-frame)) + "Enable letterbox for the given amount of time." + (with-pp + (set! (-> *game-info* letterbox-time) + (+ (-> *display* base-clock frame-counter) + (the int (/ (* (the float arg0) (-> *display* game-clock clock-ratio)) (-> pp clock clock-ratio))) + ) + ) + (none) + ) + ) + +(defun letterbox ((arg0 bucket-id) (arg1 float)) + "Draw letterbox" + (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 + (none) + ) + +(defun set-blackout-frames ((arg0 time-frame)) + "Enable blackout for the given amount of time." + (with-pp + (if (zero? arg0) + (set! (-> *game-info* blackout-time) (-> *display* base-clock frame-counter)) + (set! (-> *game-info* blackout-time) + (the-as + time-frame + (max + (-> *game-info* blackout-time) + (+ (-> *display* base-clock frame-counter) + (the int (/ (* (the float arg0) (-> *display* game-clock clock-ratio)) (-> pp clock clock-ratio))) + arg0 + ) + ) + ) + ) + ) + (none) + ) + ) + +(defun blackout ((arg0 bucket-id)) + "Draw blackout as a sprite." + (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + arg0 + ) + (draw-sprite2d-xy-absolute s4-0 0 0 512 416 (new 'static 'rgba :a #x80) #x3fffff) + ) + 0 + (none) + ) + +(defun add-blackout ((arg0 time-frame) (r int) (g int) (b int) (arg4 int)) + "Update display settings to do blackout with GS pmode alp." + (let ((v1-0 *display*)) + (let ((a0-1 (new 'static 'array time-frame 2 (seconds 0) (seconds 0)))) + (set! (-> v1-0 bgcolor r) r) + (set! (-> v1-0 bgcolor g) g) + (set! (-> v1-0 bgcolor b) b) + (set! (-> v1-0 pmode alp) (- 255 arg4)) + (set! (-> a0-1 0) 0) + (set! (-> a0-1 1) 0) + ) + (if (nonzero? arg4) + (set! (-> v1-0 force-sync) (the-as uint (max 4 (the-as int (-> v1-0 force-sync))))) + ) + ) + 0 + ) + +(defun paused? () + "Are we paused? Counts any type of pause/menu/freeze." + (or (= *master-mode* 'pause) (= *master-mode* 'progress) (= *master-mode* 'menu) (= *master-mode* 'freeze)) + ) + +(defun movie? () + "Are we in a movie?" + (logtest? (-> *kernel-context* prevent-from-run) (process-mask movie)) + ) + +(defun scene-select? () + (and (>= (-> *game-info* demo-state) (the-as uint 100)) (< (-> *game-info* demo-state) (the-as uint 200))) + ) + +(defun demo? () + "Is this a demo version?" + (or (= *kernel-boot-message* 'demo) (= *kernel-boot-message* 'demo-shared)) + ) + +(defun kiosk? () + "Is this a kiosk version of the game?" + (= *kernel-boot-message* 'kiosk) + ) + +(define *last-master-mode* 'game) + +(defun set-master-mode ((arg0 symbol)) + "Change the master mode and adjust a few masks" + (when (!= arg0 *master-mode*) + (set! *last-master-mode* *master-mode*) + (set! *master-mode* arg0) + (case *master-mode* + (('pause) + (if (not *debug-pause*) + (logior! (-> *setting-control* user-default process-mask) (process-mask pause)) + ) + (logclear! (-> *setting-control* user-default process-mask) (process-mask freeze menu)) + (set! *pause-lock* #f) + (sound-group-pause (the-as sound-group #xffffffff)) + (set! (-> *game-info* pause-start-time) (-> *display* real-clock frame-counter)) + ) + (('freeze) + (logior! (-> *setting-control* user-default process-mask) (process-mask freeze)) + (logclear! (-> *setting-control* user-default process-mask) (process-mask pause menu)) + (sound-group-pause (sound-group sfx ambient)) + (set! (-> *game-info* pause-start-time) (-> *display* real-clock frame-counter)) + ) + (('menu) + (logior! (-> *setting-control* user-default process-mask) (process-mask menu)) + (logclear! (-> *setting-control* user-default process-mask) (process-mask freeze pause progress)) + (sound-group-pause (the-as sound-group #xffffffff)) + (set! *pause-lock* #f) + ) + (('progress) + (logclear! (-> *setting-control* user-default process-mask) (process-mask freeze pause menu)) + (sound-group-pause (the-as sound-group #xffffffff)) + (when (not *progress-process*) + (activate-progress *dproc* 'main) + (if (not *progress-process*) + (set-master-mode 'game) + ) + ) + (set! (-> *game-info* pause-start-time) (-> *display* real-clock frame-counter)) + ) + (('game) + (logclear! (-> *setting-control* user-default process-mask) (process-mask freeze pause menu)) + (sound-group-continue (the-as sound-group #xffffffff)) + ) + ) + (apply-settings *setting-control*) + ) + (if *debug-segment* + (menu-respond-to-pause) + ) + 0 + (none) + ) + +(defun pause-allowed? () + "Should we allow a pause?" + (not (or (< (-> *display* base-clock frame-counter) (-> *game-info* blackout-time)) + (!= (-> *setting-control* user-current bg-a) 0.0) + (!= (-> *setting-control* user-current bg-a-force) 0.0) + (not (-> *setting-control* user-current allow-pause)) + (handle->process (-> *game-info* auto-save-proc)) + (= *master-mode* 'freeze) + (not *target*) + *master-exit* + (not *common-text*) + ) + ) + ) + +(defun toggle-pause () + "Update the pause state. Call this if the user presses a pause button + This function will check the button and state and do a pause if needed." + (case *master-mode* + (('game) + (set-master-mode + (cond + ((and (logtest? (-> *cpad-list* cpads 0 valid) 128) + *target* + (>= (-> *display* base-clock frame-counter) (-> *game-info* blackout-time)) + (= (-> *setting-control* user-current bg-a) 0.0) + (and (= (-> *setting-control* user-current bg-a-force) 0.0) + (< (seconds 1003) (-> *display* real-clock frame-counter)) + ) + ) + (if (or *progress-process* (not (-> *setting-control* user-current allow-pause))) + *master-mode* + 'pause + ) + ) + ((and (cpad-pressed? 0 select start) (cpad-hold? 0 l3) *debug-segment*) + 'menu + ) + ((and (or (cpad-hold? 0 select) (cpad-hold? 0 r2)) *debug-segment*) + 'pause + ) + ((and (not *debug-segment*) (not (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons start)))) + (if (pause-allowed?) + 'pause + *master-mode* + ) + ) + ((not (progress-allowed?)) + (if (pause-allowed?) + 'pause + *master-mode* + ) + ) + ((cpad-hold? 0 start) + 'progress + ) + (else + *master-mode* + ) + ) + ) + ) + (('menu) + (set-master-mode (cond + ((and *debug-segment* (cpad-hold? 0 l3) (cpad-pressed? 0 select start)) + 'menu + ) + ((cpad-hold? 0 select r2) + (if *debug-segment* + 'pause + *master-mode* + ) + ) + ((cpad-hold? 0 r3 r2 triangle circle) + 'game + ) + ((cpad-hold? 0 start) + 'game + ) + (else + *master-mode* + ) + ) + ) + (set! *pause-lock* #f) + ) + (('pause) + (set-master-mode (cond + ((and (cpad-pressed? 0 select start) (cpad-hold? 0 l3) *debug-segment*) + 'menu + ) + ((and (or (not *debug-segment*) (not *cheat-mode*)) (cpad-hold? 0 select)) + 'game + ) + ((and *cheat-mode* (cpad-hold? 0 select r2)) + 'game + ) + ((cpad-hold? 0 start) + 'game + ) + (else + *master-mode* + ) + ) + ) + (set! *pause-lock* (and *cheat-mode* (cpad-hold? 0 r2))) + ) + (('freeze) + (set-master-mode (if (and (cpad-pressed? 0 select start) (cpad-hold? 0 l3) *debug-segment*) + 'menu + *master-mode* + ) + ) + ) + (('progress) + (if (cpad-hold? 0 start) + (hide-progress-screen) + ) + (set! *pause-lock* (and *cheat-mode* (cpad-hold? 0 r2))) + ) + ) + 0 + ) + +(define *screen-filter* (new 'static 'screen-filter :draw? #f :bucket (bucket-id tex-hud-pris2))) + +;; WARN: Function (method 9 screen-filter) has a return type of none, but the expression builder found a return statement. +(defmethod draw ((this screen-filter)) + "Add DMA data to our bucket to draw the filter." + (local-vars (v1-1 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (when (not (paused?)) + (.lvf vf4 (&-> this extra quad)) + (.lvf vf1 (&-> this color-dest quad)) + (.lvf vf2 (&-> this color quad)) + (.sub.vf vf3 vf1 vf2) + (.add.x.vf vf4 vf4 vf4 :mask #b10) + (.min.w.vf vf4 vf4 vf0 :mask #b10) + (.max.y.vf vf4 vf4 vf0 :mask #b10) + (.mul.y.vf vf3 vf3 vf4) + (.add.vf vf1 vf2 vf3) + (.svf (&-> this extra quad) vf4) + (.svf (&-> this color quad) vf1) + (.mov v1-1 vf1) + ) + (let ((f0-0 0.1)) + (when (and (>= f0-0 (fabs (- (-> this color-dest x) (-> this color x)))) + (>= f0-0 (fabs (- (-> this color-dest y) (-> this color y)))) + (>= f0-0 (fabs (- (-> this color-dest z) (-> this color z)))) + (>= f0-0 (fabs (- (-> this color-dest w) (-> this color w)))) + (>= f0-0 (-> this color w)) + ) + (disable this) + (return 0) + ) + ) + (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> this bucket) + ) + (dma-buffer-add-gs-set s4-0 (test-1 (-> this ztest))) + (let ((t1-0 (new 'static 'rgba + :r (the int (-> this color x)) + :g (the int (-> this color y)) + :b (the int (-> this color z)) + :a (the int (-> this color w)) + ) + ) + ) + (draw-sprite2d-xy s4-0 -256 -208 512 416 t1-0 (-> this depth)) + ) + ) + 0 + (none) + ) + ) + +(defmethod setup ((this screen-filter) + (arg0 vector) + (arg1 vector) + (arg2 float) + (arg3 bucket-id) + (arg4 int) + (arg5 int) + (arg6 symbol) + ) + "Initialize the screen-filter with the given settings." + (set! (-> this draw?) #t) + (set! (-> this color quad) (-> arg0 quad)) + (set! (-> this color-src quad) (-> arg0 quad)) + (set! (-> this color-dest quad) (-> arg1 quad)) + (set! (-> this extra x) arg2) + (set! (-> this extra y) 0.0) + (set! (-> this bucket) arg3) + (set! (-> this depth) arg4) + (set! (-> this ztest) (the-as uint arg5)) + (set! (-> this lock-vsync?) arg6) + 0 + (none) + ) + +(defmethod disable ((this screen-filter)) + (set! (-> this draw?) #f) + 0 + (none) + ) + +(define *cheat-temp* (the-as (pointer int32) (malloc 'global 20))) + +(define *master-exit* #f) + +(define *progress-cheat* #f) + +(define *first-boot* #t) + +(defun main-timeouts () + "Maybe reset/restart the game if no input has been given. + Mainly used for kiosk/demo modes." + (when (demo?) + (let ((gp-0 (scf-get-timeout)) + (v1-1 (scf-get-inactive-timeout)) + ) + (when (and (or (and (nonzero? gp-0) + (>= (+ -300000 (-> *display* real-clock frame-counter)) (the int (* 300.0 (the float gp-0)))) + ) + (and (nonzero? v1-1) + (or (and (>= (- (-> *display* base-clock frame-counter) (-> *cpad-list* cpads 0 change-time)) + (the int (* 300.0 (the float v1-1))) + ) + (>= (- (-> *display* game-clock frame-counter) (-> *game-info* kiosk-timeout)) + (the int (* 300.0 (the float v1-1))) + ) + ) + (and (or (= *master-mode* 'pause) (= *master-mode* 'progress) (= *master-mode* 'freeze)) + (>= (- (-> *display* real-clock frame-counter) (-> *game-info* pause-start-time)) + (the int (* 300.0 (the float v1-1))) + ) + ) + ) + ) + (or (= *master-exit* 'force) (= *master-exit* 'movie)) + ) + (or *master-exit* (-> *setting-control* user-current allow-timeout)) + (!= *master-exit* #t) + ) + (cond + ((and (= *kernel-boot-message* 'demo) (not *master-exit*)) + (let ((v1-17 (level-get-target-inside *level*))) + (when (and v1-17 (!= (-> v1-17 name) 'demo) (not (logtest? (-> v1-17 info level-flags) (level-flags lf0)))) + (persist-with-delay *setting-control* 'sfx-volume (seconds 0.5) 'sfx-volume 'abs 0.0 0) + (persist-with-delay *setting-control* 'music-volume (seconds 0.5) 'music-volume 'abs 0.0 0) + (persist-with-delay *setting-control* 'dialog-volume (seconds 0.5) 'dialog-volume 'abs 0.0 0) + (persist-with-delay *setting-control* 'ambient-volume (seconds 0.5) 'ambient-volume 'abs 0.0 0) + (set! (-> *setting-control* user-current sfx-volume) 0.01) + (set! (-> *setting-control* user-current music-volume) 0.01) + (set! (-> *setting-control* user-current dialog-volume) 0.01) + (set! (-> *setting-control* user-current ambient-volume) 0.01) + (apply-settings *setting-control*) + (set! (-> *game-info* mode) 'play) + (initialize! *game-info* 'game (the-as game-save #f) "title-restart" (the-as resetter-spec #f)) + ) + ) + ) + (else + (when (process-spawn-function + process + (lambda ((arg0 int)) + (set-blackout-frames (seconds 100)) + (set! (-> *setting-control* user-default allow-pause) #f) + (set! (-> *setting-control* user-default allow-progress) #f) + (apply-settings *setting-control*) + (set! (-> *setting-control* user-default sfx-volume) 0.0) + (set! (-> *setting-control* user-default music-volume) 0.0) + (set! (-> *setting-control* user-default dialog-volume) 0.0) + (set! (-> *setting-control* user-default ambient-volume) 0.0) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (seconds 0.1)) + (suspend) + ) + ) + (kernel-shutdown arg0) + (none) + ) + (if (= *master-exit* 'movie) + 2 + 1 + ) + :to *display-pool* + ) + (set! (-> *setting-control* user-default sfx-volume) 0.0) + (set! (-> *setting-control* user-default music-volume) 0.0) + (set! (-> *setting-control* user-default dialog-volume) 0.0) + (set! (-> *setting-control* user-default ambient-volume) 0.0) + (set! *master-exit* #t) + ) + ) + ) + ) + ) + ) + (case *kernel-boot-message* + (('kiosk) + (if (and (= *master-mode* 'pause) + (>= (- (-> *display* real-clock frame-counter) (-> *cpad-list* cpads 0 real-change-time)) (seconds 60)) + ) + (set-master-mode 'game) + ) + ) + ) + 0 + (none) + ) + +(defun main-cheats () + (when (and (cpad-hold? 0 l3) (or *cheat-mode* (not (demo?)))) + ((lambda () + (when (nonzero? (-> *cpad-list* cpads 0 button0-rel 0)) + (let ((v1-5 (-> *cheat-temp* 0))) + (cond + ((zero? v1-5) + (cond + ((cpad-pressed? 0 up) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 1) + (cond + ((cpad-pressed? 0 up) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 2) + (cond + ((cpad-pressed? 0 down) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 3) + (cond + ((cpad-pressed? 0 down) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 4) + (cond + ((cpad-pressed? 0 left) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 5) + (cond + ((cpad-pressed? 0 right) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 6) + (cond + ((cpad-pressed? 0 left) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 7) + (cond + ((cpad-pressed? 0 right) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 8) + (cond + ((cpad-pressed? 0 x) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 9) + (cond + ((cpad-pressed? 0 x) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 10) + (cond + ((cpad-pressed? 0 square) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 11) + (cond + ((cpad-pressed? 0 circle) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 12) + (cond + ((cpad-pressed? 0 square) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 13) + (cond + ((cpad-pressed? 0 circle) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r1)) + (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)) + ) + (set! (-> *cheat-temp* 0) 0) + 0 + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ) + ) + ) + (when *cheat-mode* + (when (nonzero? (-> *cpad-list* cpads 0 button0-rel 0)) + (let ((v1-146 (-> *cheat-temp* 1))) + (cond + ((zero? v1-146) + (cond + ((cpad-pressed? 0 circle) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 1) + (cond + ((cpad-pressed? 0 square) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 2) + (cond + ((cpad-pressed? 0 circle) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 3) + (cond + ((cpad-pressed? 0 square) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 4) + (cond + ((cpad-pressed? 0 x) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 5) + (cond + ((cpad-pressed? 0 x) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 6) + (cond + ((cpad-pressed? 0 right) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 7) + (cond + ((cpad-pressed? 0 left) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 8) + (cond + ((cpad-pressed? 0 right) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 9) + (cond + ((cpad-pressed? 0 left) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 10) + (cond + ((cpad-pressed? 0 down) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 11) + (cond + ((cpad-pressed? 0 down) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 12) + (cond + ((cpad-pressed? 0 up) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 13) + (cond + ((cpad-pressed? 0 up) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r1)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons r1)) + (set! *cheat-mode* (if (= *cheat-mode* 'debug) + #t + 'debug + ) + ) + (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)) + ) + (set! (-> *cheat-temp* 1) 0) + 0 + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ) + ) + ) + ) + (none) + ) + ) + ((lambda () + (scf-get-territory) + (when (nonzero? (-> *cpad-list* cpads 0 button0-rel 0)) + (let ((v1-6 (-> *cheat-temp* 2))) + (cond + ((zero? v1-6) + (cond + ((cpad-pressed? 0 l1) + (+! (-> *cheat-temp* 2) 1) + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ((= v1-6 1) + (cond + ((cpad-pressed? 0 r1) + (+! (-> *cheat-temp* 2) 1) + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ((= v1-6 2) + (cond + ((cpad-pressed? 0 l1) + (+! (-> *cheat-temp* 2) 1) + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ((= v1-6 3) + (cond + ((cpad-pressed? 0 r1) + (+! (-> *cheat-temp* 2) 1) + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ((= v1-6 4) + (cond + ((cpad-pressed? 0 triangle) + (+! (-> *cheat-temp* 2) 1) + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ((= v1-6 5) + (cond + ((cpad-pressed? 0 circle) + (+! (-> *cheat-temp* 2) 1) + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ((= v1-6 6) + (cond + ((cpad-pressed? 0 x) + (+! (-> *cheat-temp* 2) 1) + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ((= v1-6 7) + (cond + ((cpad-pressed? 0 square) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r1)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons r1)) + (set! *progress-cheat* (if *progress-cheat* + #f + 'language + ) + ) + (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)) + ) + (set! (-> *cheat-temp* 2) 0) + 0 + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ) + ) + ) + (when *debug-segment* + (when (nonzero? (-> *cpad-list* cpads 0 button0-rel 0)) + (let ((v1-94 (-> *cheat-temp* 3))) + (cond + ((zero? v1-94) + (cond + ((cpad-pressed? 0 x) + (+! (-> *cheat-temp* 3) 1) + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ((= v1-94 1) + (cond + ((cpad-pressed? 0 square) + (+! (-> *cheat-temp* 3) 1) + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ((= v1-94 2) + (cond + ((cpad-pressed? 0 triangle) + (+! (-> *cheat-temp* 3) 1) + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ((= v1-94 3) + (cond + ((cpad-pressed? 0 circle) + (+! (-> *cheat-temp* 3) 1) + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ((= v1-94 4) + (cond + ((cpad-pressed? 0 x) + (+! (-> *cheat-temp* 3) 1) + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ((= v1-94 5) + (cond + ((cpad-pressed? 0 square) + (+! (-> *cheat-temp* 3) 1) + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ((= v1-94 6) + (cond + ((cpad-pressed? 0 triangle) + (+! (-> *cheat-temp* 3) 1) + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ((= v1-94 7) + (cond + ((cpad-pressed? 0 circle) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r1)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons r1)) + (set! *progress-cheat* (if *progress-cheat* + #f + 'pal + ) + ) + (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)) + ) + (set! (-> *cheat-temp* 3) 0) + 0 + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ) + ) + ) + (when (nonzero? (-> *cpad-list* cpads 1 button0-rel 0)) + (let ((v1-180 (-> *cheat-temp* 5))) + (cond + ((zero? v1-180) + (cond + ((cpad-pressed? 1 triangle) + (+! (-> *cheat-temp* 5) 1) + ) + (else + (set! (-> *cheat-temp* 5) 0) + 0 + ) + ) + ) + ((= v1-180 1) + (cond + ((cpad-pressed? 1 x) + (+! (-> *cheat-temp* 5) 1) + ) + (else + (set! (-> *cheat-temp* 5) 0) + 0 + ) + ) + ) + ((= v1-180 2) + (cond + ((cpad-pressed? 1 circle) + (+! (-> *cheat-temp* 5) 1) + ) + (else + (set! (-> *cheat-temp* 5) 0) + 0 + ) + ) + ) + ((= v1-180 3) + (cond + ((cpad-pressed? 1 square) + (+! (-> *cheat-temp* 5) 1) + ) + (else + (set! (-> *cheat-temp* 5) 0) + 0 + ) + ) + ) + ((= v1-180 4) + (cond + ((cpad-pressed? 1 triangle) + (+! (-> *cheat-temp* 5) 1) + ) + (else + (set! (-> *cheat-temp* 5) 0) + 0 + ) + ) + ) + ((= v1-180 5) + (cond + ((cpad-pressed? 1 x) + (+! (-> *cheat-temp* 5) 1) + ) + (else + (set! (-> *cheat-temp* 5) 0) + 0 + ) + ) + ) + ((= v1-180 6) + (cond + ((cpad-pressed? 1 circle) + (+! (-> *cheat-temp* 5) 1) + ) + (else + (set! (-> *cheat-temp* 5) 0) + 0 + ) + ) + ) + ((= v1-180 7) + (cond + ((cpad-pressed? 1 square) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r1)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons r1)) + (set! *cheat-mode* (if (= *cheat-mode* 'camera) + #f + 'camera + ) + ) + (cond + (*cheat-mode* + (if (not *external-cam-mode*) + (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)) + ) + (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)) + ) + ) + (set! (-> *cheat-temp* 5) 0) + 0 + ) + (else + (set! (-> *cheat-temp* 5) 0) + 0 + ) + ) + ) + ) + ) + ) + ) + (none) + ) + ) + ) + (if (and *cheat-mode* (not *debug-segment*) (cpad-hold? 1 l3)) + ((lambda () + (cond + ((cpad-pressed? 1 x) + (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) + (send-event *target* 'get-pickup (pickup-type eco-pill-dark) 1000.0) + (send-event *target* 'get-pickup (pickup-type eco-pill-light) 1000.0) + (send-event *target* 'get-pickup (pickup-type skill) 1000.0) + (send-event *target* 'get-pickup (pickup-type gem) 1000.0) + (set! (-> *game-info* features) + (the-as + game-feature + (logior (game-feature + gun + gun-red-1 + gun-red-2 + gun-red-3 + gun-yellow-1 + gun-yellow-2 + gun-yellow-3 + gun-blue-1 + gun-blue-2 + gun-blue-3 + gun-dark-1 + gun-dark-2 + gun-dark-3 + board + darkjak + darkjak-smack + darkjak-bomb0 + darkjak-bomb1 + feature44 + feature45 + lightjak + lightjak-regen + lightjak-swoop + lightjak-freeze + lightjak-shield + ) + (-> *game-info* features) + ) + ) + ) + (set! (-> *game-info* debug-features) + (the-as + game-feature + (logior (game-feature gun gun-red-1 gun-yellow-1 gun-blue-1 gun-dark-1 board darkjak lightjak) + (-> *game-info* debug-features) + ) + ) + ) + (sound-play-by-spec (static-sound-spec "menu-pick" :group 1 :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)) + ) + ((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)) + ) + ) + ((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)) + ) + ) + ((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)) + ) + ) + ) + (none) + ) + ) + ) + (if (and *display-bug-report* (not *progress-process*)) + (position->stream *stdcon* '*stdcon* #t) + ) + (when (and (= *cheat-mode* 'debug) (not *debug-segment*)) + (when (and (cpad-hold? 0 l1) (cpad-hold? 0 l2) (cpad-hold? 0 r1) (cpad-pressed? 0 r2)) + (if *target* + (stop 'debug) + (start 'play (get-current-continue-forced *game-info*)) + ) + ) + (if (and (cpad-hold? 0 left) (cpad-hold? 0 up) (cpad-pressed? 0 select)) + (initialize! *game-info* 'game (the-as game-save #f) "title-restart" (the-as resetter-spec #f)) + ) + (if (cpad-pressed? 1 r3) + (inspect global) + ) + (when (cpad-hold? 1 r3) + (with-dma-buffer-add-bucket ((s5-1 (if *debug-segment* + (-> *display* frames (-> *display* on-screen) debug-buf) + (-> *display* frames (-> *display* on-screen) global-buf) + ) + ) + (bucket-id debug) + ) + (show-iop-memory s5-1) + ) + ) + (if (cpad-pressed? 1 triangle) + (set! *display-level-border* (not *display-level-border*)) + ) + ) + (main-timeouts) + 0 + (none) + ) + +(defun end-display ((arg0 display)) + (let ((s5-0 (-> (if *debug-segment* + (-> arg0 frames (-> arg0 on-screen) debug-buf) + (-> arg0 frames (-> arg0 on-screen) global-buf) + ) + base + ) + ) + ) + (with-profiler 'debug *profile-debug-color* + (with-dma-buffer-add-bucket ((s3-1 (if *debug-segment* + (-> arg0 frames (-> arg0 on-screen) debug-buf) + (-> arg0 frames (-> arg0 on-screen) global-buf) + ) + ) + (bucket-id debug-no-zbuf2) + ) + (if (and (= *master-mode* 'pause) + (and (!= *cheat-mode* 'camera) (or (zero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1))) + ) + (draw-string-xy + (lookup-text! *common-text* (text-id progress-pause) #f) + s3-1 + 256 + (if (< (-> *display* base-clock frame-counter) (-> *game-info* letterbox-time)) + 352 + 320 + ) + (font-color red) + (font-flags shadow kerning middle large) + ) + ) + (let ((s2-2 (the int (-> *font-context* origin y)))) + (cond + ((or (!= (-> *setting-control* user-current letterbox) 0.0) + (< (-> *display* base-clock frame-counter) (-> *game-info* letterbox-time)) + ) + (+! s2-2 56) + ) + ((and *display-profile* (not *display-capture-mode*)) + (+! s2-2 48) + ) + ) + (when (or (zero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1) (-> *screen-shot-work* hud-enable)) + (let* ((v1-73 + (draw-string-xy + *stdcon0* + s3-1 + (the int (-> *font-context* origin x)) + s2-2 + (font-color default) + (font-flags shadow kerning) + ) + ) + (a3-4 (+ s2-2 (the int (* 2.0 (-> v1-73 b))))) + ) + (draw-string-xy + *stdcon1* + s3-1 + (the int (-> *font-context* origin x)) + a3-4 + (font-color default) + (font-flags shadow kerning) + ) + ) + ) + ) + (if (or (not *debug-segment*) *display-capture-mode*) + (set! *stdebug* *null*) + (set! *stdebug* *stdcon1*) + ) + (if *display-iop-info* + (show-iop-info s3-1) + ) + (if *display-memcard-info* + (show-mc-info s3-1) + ) + ) + (set! *stdcon* (clear *stdcon0*)) + ) + (let ((v1-113 *dma-mem-usage*)) + (when (nonzero? v1-113) + (set! (-> v1-113 length) (max 89 (-> v1-113 length))) + (set! (-> v1-113 data 88 name) "debug") + (+! (-> v1-113 data 88 count) 1) + (+! (-> v1-113 data 88 used) (&- + (-> (if *debug-segment* + (-> arg0 frames (-> arg0 on-screen) debug-buf) + (-> arg0 frames (-> arg0 on-screen) global-buf) + ) + base + ) + (the-as uint s5-0) + ) + ) + (set! (-> v1-113 data 88 total) (-> v1-113 data 88 used)) + ) + ) + ) + 0 + (none) + ) + +(defun display-loop-main ((arg0 display)) + "Main function to run entire game engine." + (with-pp + + ;; do some work on loading a level + (if (-> *level* loading-level) + (load-continue (-> *level* loading-level)) + ) + + ; ;; modify vertices for merc face animation. I believe this is somewhat racing DMA of merc data to VU1. + ; (with-profiler 'merc *profile-merc-color* + ; (blerc-execute) + ; (blerc-init) + ; ) + + ; ;; modify merc vertices for texture scrolling effect. Again, racing DMA. + ; (texscroll-execute) + + ; ;; modify merc vertices for water ripple effect. Again, racing DMA. + ; (ripple-execute) + + ; ;; detect player/camera entering/exiting regions, and run callbacks for those. + (region-execute) + + ;; decompress joint animations, compute joint and bone transformation for each actor. + ;; note that we also run this in a separate process. The math-engine will only run for + ;; actors that have changed their animation state. This is just a last chance for actors + ;; to update their joints before drawing. + (with-profiler 'joints *profile-joints-color* + (execute-math-engine) + ) + + ;; cloth simulation update + (execute-cloth-engine) + + (with-profiler 'debug *profile-debug-color* + ;; run debug callbacks + (let* ((s5-5 *debug-hook*) + (t9-13 (car s5-5)) + ) + (while (not (null? s5-5)) + ((the-as (function none) t9-13)) + (set! s5-5 (cdr s5-5)) + (set! t9-13 (car s5-5)) + ) + ) + ;; look for cheat-code inputs + (main-cheats) + ) + + ;; Update camera data for rendering based on the location of the in-game camera. + ;; (movement of the camera is handled by the camera process, this is just preparing + ;; to render) + (with-profiler 'camera *profile-camera-color* + (update-camera) + (execute-cam-post-hook-engine) + ) + + ; ;; Update start-menu map and masking + ; (update *bigmap*) + + ;; do some more level loading. + (if (-> *level* loading-level) + (load-continue (-> *level* loading-level)) + ) + + ;; run the drawing system! + ;; (note that this does a significant amount of non-drawing stuff, like collision callbacks, actors-update, + ;; navigation update...) + (with-profiler 'draw-hook *profile-draw-hook-color* + (*draw-hook*) + ) + + ;; more level loading + (if (-> *level* loading-level) + (load-continue (-> *level* loading-level)) + ) + + ; (if *display-color-bars* + ; (draw-color-bars *blit-displays-work*) + ; ) + + ;; run debug menu + (*menu-hook*) + ; load the right language file. + ;; disabled for now: seems to load 255COMMON.TXT. + (load-level-text-files -1) + + ;; draw screen filter + (when (-> *screen-filter* draw?) + (if (-> *screen-filter* lock-vsync?) + (set! (-> arg0 force-sync) (the-as uint (max 4 (the-as int (-> arg0 force-sync))))) + ) + (draw *screen-filter*) + ) + + ;; draw letterbox + (when (or (!= (-> *setting-control* user-current letterbox) 0.0) + (< (-> *display* base-clock frame-counter) (-> *game-info* letterbox-time)) + ) + (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) (-> *screen-shot-work* hud-enable)) + ) + (letterbox + (bucket-id tex-hud-pris2) + (if (< (-> *display* base-clock frame-counter) (-> *game-info* letterbox-time)) + 1.0 + (-> *setting-control* user-current letterbox) + ) + ) + ) + ) + + ;; update blackout settings + (when (-> *setting-control* user-current render) + (if (< (-> *display* base-clock frame-counter) (-> *game-info* blackout-time)) + (set! (-> *setting-control* user-default bg-a-force) 1.0) + (set! (-> *setting-control* user-default bg-a-force) 0.0) + ) + ) + + ; ;; generate DMA to copy from render buffer to frame buffer. + (with-profiler 'blit-displays *profile-blit-color* + (blit-displays-work-method-19 *blit-displays-work*) + ) + + ;; wrap up this frame (drawing of stdcon, debugging, etc.) + (end-display arg0) + + ;; finalize the DMA chain. This does have some potentially complicated texture stuff. + ;; Note that, in debug mode, this will do a sync-path, waiting for VU1 to finish. + ;; this is required to be able to display profiling data for all VU1 renderers, since this + ;; function also draws the profiling bars + (display-frame-finish arg0) + + ;; flip DMA buffers! Wait for VU1 to finish, compute frame times, do a vsync, and send the next chain. + (display-sync arg0) + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;; new frame + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + ;; start stat collection for this frame + (start-frame! (-> arg0 frames (-> arg0 on-screen) profile-array data 0)) + (start-profiling! (-> *perf-stats* data 0)) + + ;; update *teleport* flag, which is set when the game intentionally teleports the camera, + ;; and indicates that effects should not be gradually transitioned. + (set! (-> *time-of-day-context* title-updated) #f) + (set! *teleport* #f) + (when (nonzero? *teleport-count*) + (set! *teleport* #t) + (set! *teleport-count* (+ *teleport-count* -1)) + ) + + ;; do particles as soon as possible, since we're racing to send their data to VU1. + (execute-particle-local-space-engine 0) + (let ((gp-1 (-> pp clock))) + (set! (-> pp clock) (-> *display* part-clock)) + (process-particles) + (set! (-> pp clock) gp-1) + ) + (execute-particle-local-space-engine 1) + + ;; init unused? VU0 collision stuff. + ; (dma-send + ; (the-as dma-bank #x10008000) + ; (the-as uint (-> *collide-vif0-init* data)) + ; (the-as uint (/ (-> *collide-vif0-init* length) 4)) + ; ) + + ;; update sound system. + (swap-sound-buffers + (ear-trans 0) + (ear-trans 1) + (if (-> *setting-control* user-current lock-sound-camera-to-target) + (ear-trans 1) + (camera-pos) + ) + (-> (math-camera-matrix) fvec) + (-> (math-camera-matrix) rvec) + (-> *setting-control* user-current sound-ear-scale) + ) + + ;; update streaming animations + (str-play-kick) + + ;; update the level system + (level-update *level*) + + ;; update memory card + ; (mc-run) + + ;; check for memory card errors. + ; (auto-save-check) + 0 + (none) + ) + ) + +(defbehavior display-loop process () + "Main loop for running the game." + + (stack-size-set! (-> self main-thread) 512) + + ;; start process to run math (joints) engine. + (process-spawn-function + process + (lambda :behavior process + () + (logclear! (-> self mask) (process-mask freeze pause menu progress entity)) + (until #f + (with-profiler 'joints *profile-joints-color* + (execute-math-engine) + ) + (suspend) + ) + #f + ) + :name "matrix" + :from *4k-dead-pool* + :to *mid-pool* + ) + + + (let ((gp-1 *display*)) + ;; initial setup + (set! *teleport* #t) + (update *setting-control*) ;; dies on camera stuff, which looks for entities. + (init-time-of-day-context *time-of-day-context*) + (display-sync gp-1) + (display-frame-finish gp-1) + (display-sync gp-1) + (install-handler 3 vblank-handler) + (free-nodes *touching-list*) + (prepare *collide-rider-pool*) + (update-actor-hash) + ;; (blerc-init) + ; (dma-send + ; (the-as dma-bank #x10008000) + ; (the-as uint (-> *collide-vif0-init* data)) + ; (the-as uint (/ (-> *collide-vif0-init* length) 4)) + ; ) + (suspend) + (set! (-> *setting-control* user-default bg-a) 0.0) + (set! (-> gp-1 frames 0 start-time) (timer-count (the-as timer-bank #x10000800))) + (set! (-> gp-1 frames 1 start-time) (timer-count (the-as timer-bank #x10000800))) + (set! (-> gp-1 dog-ratio) 1.0) + + ;; main loop + (while *run* + (display-loop-main gp-1) + + ;; while we suspend, all actors will run. + (with-profiler 'actors *profile-actors-color* + (suspend) + ) + + ;; run the pc port hooks and code + (#when PC_PORT + (update *pc-settings*) + (if (and *display-sha* *debug-segment* (not-screen-shot?)) + (draw-build-revision))) + ) + ) + (set! *dproc* #f) + (format 0 "display is off #<#x~X>.~%" self) + 0 + ) + +(defun on ((arg0 symbol)) + "Start the display process." + (when (not *dproc*) + (when (not arg0) + (if (= (-> *level* level0 status) 'inactive) + (bg 'halfpipe) + ) + ) + (set! *run* #t) + (set! *dproc* (ppointer->process (process-spawn-function + process + display-loop + :name "display" + :from *4k-dead-pool* + :to *display-pool* + :stack *kernel-dram-stack* + ) + ) + ) + (cond + ((or (level-get-with-status *level* 'loaded) + (level-get-with-status *level* 'alive) + (level-get-with-status *level* 'active) + ) + (activate-levels! *level*) + (when (not arg0) + (let ((gp-1 (entity-by-type camera-start))) + (when (and gp-1 (type? gp-1 entity-actor)) + (while (not (camera-teleport-to-entity gp-1)) + (suspend) + ) + ) + ) + ) + (if (and (= *kernel-boot-message* 'art-group) *kernel-boot-art-group*) + (anim-tester-add-object *kernel-boot-art-group*) + ) + ) + (else + (kill-by-name "display" *active-pool*) + (set! *dproc* #f) + ) + ) + ) + *dproc* + ) + +(defun off () + "Stop the display process." + (stop 'debug) + (dotimes (gp-0 (-> *level* length)) + (let ((a0-2 (-> *level* level gp-0))) + (if (= (-> a0-2 status) 'active) + (deactivate a0-2) + ) + ) + ) + (set! *run* #f) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/game/penetrate-h.gc b/goal_src/jak3/engine/game/penetrate-h.gc index 141fdb3b74..9d05497f7d 100644 --- a/goal_src/jak3/engine/game/penetrate-h.gc +++ b/goal_src/jak3/engine/game/penetrate-h.gc @@ -5,26 +5,25 @@ ;; name in dgo: penetrate-h ;; dgos: GAME -;; +++game-h:knocked-type +;; +++knocked-type (defenum knocked-type :type uint8 - (knocked-type-0 0) - (knocked-type-1 1) - (knocked-type-2 2) - (knocked-type-3 3) - (knocked-type-4 4) ;; what the heck is this! (its on gator, and cant trigger it for the life of me) - (knocked-type-5 5) - (knocked-type-6 6) - (knocked-type-7 7) - (knocked-type-8 8) - (knocked-type-9 9) - (knocked-type-10 10) + (none 0) + (mech-punch 1) + (explode-or-darkjak 2) + (dark-shot 3) + (yellow-shot 4) + (red-shot 5) + (blue-shot 6) + (vehicle 7) + (knocked-off 8) ) -;; ---game-h:knocked-type +;; ---knocked-type +;; +++penetrate (defenum penetrate - :bitfield #t :type uint64 + :bitfield #t (touch 0) (generic-attack 1) (lunge 2) @@ -63,7 +62,35 @@ (jak-dark-nuke 35) (jak-dark-blackhole 36) (emp-blast 37) + (penetrate38 38) + (penetrate39 39) + (penetrate40 40) + (penetrate41 41) + (penetrate42 42) + (penetrate43 43) + (penetrate44 44) + (penetrate45 45) + (penetrate46 46) + (penetrate47 47) + (penetrate48 48) + (penetrate49 49) + (penetrate50 50) + (penetrate51 51) + (penetrate52 52) + (penetrate53 53) + (penetrate54 54) + (penetrate55 55) + (penetrate56 56) + (penetrate57 57) + (penetrate58 58) + (penetrate59 59) + (penetrate60 60) + (penetrate61 61) + (penetrate64 62) + (penetrate63 63) ) +;; ---penetrate + ;; DECOMP BEGINS diff --git a/goal_src/jak3/engine/game/settings-h.gc b/goal_src/jak3/engine/game/settings-h.gc index 45eae8dcb1..2ecd8eccd0 100644 --- a/goal_src/jak3/engine/game/settings-h.gc +++ b/goal_src/jak3/engine/game/settings-h.gc @@ -103,7 +103,7 @@ (feature36 36) (board-launch 37) (board-trail 38) - (feature39 39) + (board-zap 39) (darkjak 40) (darkjak-smack 41) (darkjak-bomb0 42) @@ -120,9 +120,9 @@ (armor1 53) (armor2 54) (armor3 55) - (feature56 56) - (feature57 57) - (feature58 58) + (jakc 56) + (lighteco 57) + (darkeco 58) (feature59 59) (feature60 60) (feature61 61) @@ -276,6 +276,15 @@ (declare-type resetter-spec structure) +;; +++game-vehicle-u8 +(defenum game-vehicle-u8 + :type uint8 + :bitfield #t + :copy-entries game-vehicles + ) +;; ---game-vehicle-u8 + + ;; DECOMP BEGINS (deftype user-setting-data (structure) @@ -563,13 +572,13 @@ ) (:methods (new (symbol type int) _type_) - (add-setting (_type_ process symbol object object object) none) + (add-setting (_type_ process symbol object object object) connection) (persist-with-delay (_type_ symbol time-frame symbol symbol float int) none) - (set-setting (_type_ process symbol object object object) none) + (set-setting (_type_ process symbol object object object) connection) (remove-setting (_type_ process symbol) none) (kill-persister (_type_ engine-pers object) none) (setting-control-method-14 (_type_ object) connectable) - (setting-control-method-15 (_type_ object) connectable) + (get-setting (_type_ object) connectable) (remove-setting-by-arg0 (_type_ object) none) (set-setting-by-param (_type_ symbol object object object) connection) (apply-settings (_type_) user-setting-data) diff --git a/goal_src/jak3/engine/game/settings.gc b/goal_src/jak3/engine/game/settings.gc index 985b4256c4..2fe58d2dc1 100644 --- a/goal_src/jak3/engine/game/settings.gc +++ b/goal_src/jak3/engine/game/settings.gc @@ -1199,17 +1199,13 @@ this ) -;; WARN: Return type mismatch connection vs none. (defmethod add-setting ((this setting-control) (arg0 process) (arg1 symbol) (arg2 object) (arg3 object) (arg4 object)) (add-connection (-> this engine) arg0 arg1 arg2 arg3 arg4) - (none) ) -;; WARN: Return type mismatch connection vs none. (defmethod set-setting ((this setting-control) (arg0 process) (arg1 symbol) (arg2 object) (arg3 object) (arg4 object)) (remove-setting this arg0 arg1) (add-connection (-> this engine) arg0 arg1 arg2 arg3 arg4) - (none) ) (defmethod persist-with-delay ((this setting-control) (arg0 symbol) (arg1 time-frame) (arg2 symbol) (arg3 symbol) (arg4 float) (arg5 int)) @@ -1265,7 +1261,7 @@ (none) ) -(defmethod setting-control-method-15 ((this setting-control) (arg0 object)) +(defmethod get-setting ((this setting-control) (arg0 object)) (let ((v1-1 (-> this engine-hi alive-list next0))) (-> this engine-hi) (let ((a2-2 (-> (the-as connection v1-1) next0))) @@ -1429,13 +1425,7 @@ (set! (-> s5-0 allow-error) (-> s4-0 allow-error)) (set! (-> s5-0 under-water-pitch-mod) (-> s4-0 under-water-pitch-mod)) (set! (-> s5-0 slow-time) (-> s4-0 slow-time)) - (if (and (-> s4-0 mirror) (let* ((a0-55 *level*) - (t9-4 (method-of-object a0-55 level-group-method-26)) - (a1-36 'ctywide) - ) - (= (t9-4 a0-55 a1-36) 'active) - ) - ) + (if (and (-> s4-0 mirror) (= (status-of-level-and-borrows *level* 'ctywide #f) 'active)) (set! (-> s5-0 mirror) #f) (set! (-> s5-0 mirror) (-> s4-0 mirror)) ) @@ -1659,7 +1649,7 @@ (when (and (!= (-> s4-0 music) (-> s5-0 music)) (and (zero? (rpc-busy? 1)) (or (not (-> s4-0 music)) - (and (< 0.0 (-> s5-0 music-volume)) (not (level-group-method-28 *level*)) (not (-> s5-0 movie))) + (and (< 0.0 (-> s5-0 music-volume)) (not (load-in-progress? *level*)) (not (-> s5-0 movie))) ) (not *master-exit*) ) diff --git a/goal_src/jak3/engine/game/task/game-task.gc b/goal_src/jak3/engine/game/task/game-task.gc index cebc0b93f6..fc6d7784af 100644 --- a/goal_src/jak3/engine/game/task/game-task.gc +++ b/goal_src/jak3/engine/game/task/game-task.gc @@ -4208,10 +4208,11 @@ :user-count 3 ) :borrow '() - :open? (lambda () (or (not (task-node-closed? (game-task-node wascity-defend-get-to))) - (task-node-closed? (game-task-node wascity-defend-resolution)) - ) - ) + :open? (lambda () + (or (not (task-node-closed? (game-task-node wascity-defend-get-to))) + (task-node-closed? (game-task-node wascity-defend-resolution)) + ) + ) :on-close #f :reset (new 'static 'task-reset-info :restart-info #f @@ -23355,83 +23356,85 @@ ) ) (set! (-> game-info mission-list) (new 'global 'boxed-array game-task-node-info 410)) - (set! (-> game-info task-node-commands) (new 'static 'boxed-array :type uint8 - #x48 - #x20 - #x1f - #x1 - #x5 - #x23 - #x22 - #x19 - #x36 - #xa - #x3a - #x41 - #x48 - #x32 - #x39 - #x3f - #x3a - #x8 - #x6 - #x37 - #xd - #xb - #x3e - #x3a - #x39 - #xf - #x40 - #x31 - #x28 - #x27 - #x26 - #x2f - #x2d - #x3 - #x3b - #x29 - #x2a - #x33 - #x12 - #x10 - #x1b - #xe - #xc - #x21 - #x1a - #x2e - #x34 - #x30 - #x13 - #x11 - #x1c - #x9 - #x7 - #x14 - #x1d - #x3c - #x43 - #x39 - #x44 - #x46 - #x45 - #x39 - #x17 - #x15 - #x2b - #x47 - #x38 - #x35 - #x18 - #x16 - #x3a - #x1e - #x42 - #x4 - #x3 - ) + (set! (-> game-info task-node-commands) + (the-as (array game-task-node-command) (new 'static 'boxed-array :type uint8 + #x48 + #x20 + #x1f + #x1 + #x5 + #x23 + #x22 + #x19 + #x36 + #xa + #x3a + #x41 + #x48 + #x32 + #x39 + #x3f + #x3a + #x8 + #x6 + #x37 + #xd + #xb + #x3e + #x3a + #x39 + #xf + #x40 + #x31 + #x28 + #x27 + #x26 + #x2f + #x2d + #x3 + #x3b + #x29 + #x2a + #x33 + #x12 + #x10 + #x1b + #xe + #xc + #x21 + #x1a + #x2e + #x34 + #x30 + #x13 + #x11 + #x1c + #x9 + #x7 + #x14 + #x1d + #x3c + #x43 + #x39 + #x44 + #x46 + #x45 + #x39 + #x17 + #x15 + #x2b + #x47 + #x38 + #x35 + #x18 + #x16 + #x3a + #x1e + #x42 + #x4 + #x3 + ) + ) ) (dotimes (v1-4 (-> game-info sub-task-list length)) (if (-> game-info sub-task-list v1-4 manager) 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 abcec9b7f0..7d49900122 100644 --- a/goal_src/jak3/engine/game/task/task-control-h.gc +++ b/goal_src/jak3/engine/game/task/task-control-h.gc @@ -43,6 +43,19 @@ ) ;; ---task-manager-mask +(declare-type editable-player process) +(define-extern *editable* (pointer editable-player)) + +;; temporarily forward declared as symbols +(define-extern *cty-faction-manager* symbol) +(define-extern *cty-attack-controller* symbol) +(set! *cty-faction-manager* #f) +(set! *cty-attack-controller* #f) + +(define-extern cty-attack-reset (function symbol symbol symbol none)) +(define-extern setup-city-task-faction (function object)) +(define-extern cty-faction-evaluate-commands (function pair object)) + (define-extern update-task-masks (function symbol int)) (define-extern task-resolution-close! (function game-task symbol)) (define-extern task-node-closed? (function game-task-node symbol)) @@ -51,6 +64,17 @@ (define-extern game-task-node->string (function game-task-node string)) (define-extern task-close! (function string symbol)) (define-extern task-node-index-by-name (function string int)) +(define-extern task-node-close! (function game-task-node symbol int)) +(define-extern task-node-open? (function game-task-node symbol)) + +(define-extern restart-mission (function int)) +(define-extern play-task (function game-task symbol symbol string)) +(define-extern play-clean (function symbol int)) + +(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 @@ -1420,11 +1444,11 @@ (faction-commands pair) ) (:methods - (game-task-node-info-method-9 () none) + (get-idx-in-task-list (_type_) int) (open! (_type_ symbol) int) - (game-task-node-info-method-11 () none) + (game-task-node-info-method-11 (_type_ symbol) none) (game-task-node-info-method-12 (_type_) symbol) - (game-task-node-info-method-13 () none) + (eval-game-task-cmd! (_type_) none) ) ) @@ -1434,13 +1458,13 @@ (text-name text-id) (pre-play-node game-task-node) (kiosk-play-node game-task-node) - (pre-play-continue string) + (pre-play-continue object) (play-node game-task-node) (play-continue string) (kiosk-play-continue object) ) (:methods - (game-task-info-method-9 (_type_) none) + (get-play-list-idx (_type_) int) ) ) @@ -1476,25 +1500,27 @@ (hud-counter handle :overlay-at (-> hud 1)) (intro-time time-frame) ) + (:state-methods + wait + active + complete + resolution + (fail resetter-params) + (restart symbol) + ) (:methods - (task-manager-method-14 () none) - (task-manager-method-15 () none) - (task-manager-method-16 () none) - (task-manager-method-17 () none) - (task-manager-method-18 () none) - (task-manager-method-19 () none) - (task-manager-method-20 () none) - (task-manager-method-21 () none) - (task-manager-method-22 () none) - (task-manager-method-23 () none) - (task-manager-method-24 () none) - (task-manager-method-25 () none) - (task-manager-method-26 () none) - (task-manager-method-27 () none) - (task-manager-method-28 () none) - (task-manager-method-29 () none) - (task-manager-method-30 () none) - (task-manager-method-31 (_type_ symbol) resetter-spec) + (init! (_type_) none) + (set-time-limit (_type_) none) + (kill-all-children (_type_) none) + (hud-timer-handler (_type_) none) + (ready? (_type_) object) + (task-manager-method-25 (_type_) none) + (task-manager-method-26 (_type_) none) + (task-manager-method-27 (_type_) none) + (task-manager-method-28 (_type_) none) + (go-fail (_type_) object) + (taskman-event-handler (_type_ process int symbol event-message-block) object) + (on-fail (_type_ symbol) resetter-params) ) ) @@ -1513,4 +1539,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 3e43caa92a..5b971fc741 100644 --- a/goal_src/jak3/engine/game/task/task-control.gc +++ b/goal_src/jak3/engine/game/task/task-control.gc @@ -5,5 +5,3362 @@ ;; name in dgo: task-control ;; dgos: GAME +(define-extern task-node-close-upwards (function (array game-task-node-info) int none)) + ;; DECOMP BEGINS +(deftype resetter-control (basic) + ((process handle) + (handle-init-hack symbol :overlay-at process) + ) + (:methods + (check-reset (_type_) object) + (get-resetter (_type_) process) + (spawn-resetter! (_type_ resetter-params game-task-node-info) symbol) + (do-reset (_type_) object) + ) + ) + + +(define *resetter-control* (new 'static 'resetter-control :handle-init-hack #f)) + +(defmethod print ((this resetter-spec)) + (format + #t + "#" + (-> this continue) + (-> this reset-mode) + (game-task-node->string (-> this node)) + (-> this execute) + this + ) + this + ) + +(defun game-task-node->string ((arg0 game-task-node)) + (-> *game-info* sub-task-list arg0 name) + ) + +(defmethod get-play-list-idx ((this game-task-info)) + (let ((v1-1 (-> *game-info* play-list))) + (countdown (a1-0 (-> v1-1 length)) + (if (= this (-> v1-1 a1-0)) + (return a1-0) + ) + ) + ) + 0 + ) + +(defmethod get-idx-in-task-list ((this game-task-node-info)) + (let ((v1-1 (-> *game-info* sub-task-list))) + (countdown (a1-0 (-> v1-1 length)) + (if (= this (-> v1-1 a1-0)) + (return a1-0) + ) + ) + ) + 0 + ) + +(defun reset-city-squad-control ((arg0 symbol)) + (if (and (nonzero? *cty-attack-controller*) *cty-attack-controller*) + (cty-attack-reset arg0 #f #f) + ) + (none) + ) + +(defun city-task-faction-commands () + (if (or (zero? *cty-faction-manager*) (not *cty-faction-manager*)) + (return 0) + ) + (setup-city-task-faction) + ) + +(defun evaluate-faction-commands ((arg0 pair)) + (if (or (zero? *cty-faction-manager*) (not *cty-faction-manager*) (zero? arg0)) + (return 0) + ) + (cty-faction-evaluate-commands arg0) + ) + +(defun update-task-masks ((arg0 symbol)) + (local-vars (a3-2 symbol) (sv-176 game-task-event)) + (if (= arg0 'none) + (return 0) + ) + (do-nothing *level*) + (cond + ((or (= arg0 'debug) (= arg0 'level)) + ) + ((logtest? (-> *game-info* secrets) (game-secrets hero-mode)) + (set! (-> *game-info* features) (game-feature + gun + gun-red-1 + gun-red-2 + gun-red-3 + gun-yellow-1 + gun-yellow-2 + gun-yellow-3 + gun-blue-1 + gun-blue-2 + gun-blue-3 + gun-dark-1 + gun-dark-2 + gun-dark-3 + board + gun-upgrade-yellow-ammo-1 + gun-upgrade-yellow-ammo-2 + gun-upgrade-red-ammo-1 + gun-upgrade-red-ammo-2 + gun-upgrade-blue-ammo-1 + gun-upgrade-blue-ammo-2 + gun-upgrade-dark-ammo-1 + gun-upgrade-dark-ammo-2 + board-launch + board-zap + darkjak + darkjak-bomb0 + darkjak-bomb1 + lightjak + lightjak-regen + lightjak-freeze + lightjak-shield + armor0 + armor1 + armor2 + armor3 + lighteco + darkeco + ) + ) + (set! (-> *game-info* items) (game-items)) + (set! (-> *game-info* vehicles) (game-vehicles v-turtle v-snake v-scorpion v-toad v-rhino)) + (set! (-> *game-info* light-crystal) 0.0) + (set! (-> *game-info* dark-crystal) 0.0) + ) + (else + (set! (-> *game-info* features) (game-feature)) + (set! (-> *game-info* items) (game-items)) + (set! (-> *game-info* vehicles) (game-vehicles)) + (set! (-> *game-info* light-crystal) 0.0) + (set! (-> *game-info* dark-crystal) 0.0) + ) + ) + (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))) + (set! (-> v1-43 length) 0) + (let ((a0-10 (-> *game-info* sub-task-list))) + (dotimes (a1-0 (-> a0-10 length)) + (when (nonzero? a1-0) + (let ((a2-3 (-> a0-10 a1-0))) + (set! a3-2 + (and (logtest? (-> a2-3 flags) (game-task-node-flag exclusive)) + (not (logtest? (-> a2-3 flags) (game-task-node-flag closed))) + (begin + (dotimes (a3-5 4) + (let ((t1-0 (-> a2-3 parent-node a3-5))) + (when (and (nonzero? t1-0) (not (logtest? (-> a0-10 t1-0 flags) (game-task-node-flag closed)))) + (set! a3-2 #f) + (goto cfg-38) + ) + ) + ) + #t + ) + ) + ) + (label cfg-38) + (when a3-2 + (when (< (-> v1-43 length) (-> v1-43 allocated-length)) + (set! (-> v1-43 (-> v1-43 length)) (the-as uint (-> a2-3 task))) + (+! (-> v1-43 length) 1) + ) + ) + ) + ) + ) + ) + ) + (let ((s5-1 + (lambda ((arg0 pair)) + (let ((s4-0 (-> arg0 car))) + (while (not (null? (the-as object arg0))) + (let ((v1-0 (-> (the-as pair s4-0) car)) + (s5-0 (-> (the-as pair (-> (the-as pair s4-0) cdr)) car)) + ) + (-> (the-as pair (-> (the-as pair (-> (the-as pair s4-0) cdr)) cdr)) car) + (-> (the-as pair (-> (the-as pair (-> (the-as pair (-> (the-as pair s4-0) cdr)) cdr)) cdr)) car) + (let* ((s3-0 (-> (the-as symbol v1-0) value)) + (v1-1 (if (type? s3-0 level-load-info) + s3-0 + ) + ) + (a0-11 (-> (the-as pair (-> (the-as pair s4-0) cdr)) cdr)) + ) + (when (and v1-1 (-> (the-as level-load-info v1-1) borrow)) + (case s5-0 + (('alias) + (set! a0-11 (cond + ((-> (the-as pair a0-11) car) + (empty) + a0-11 + ) + (else + #f + ) + ) + ) + (set! (-> (the-as level-load-info v1-1) borrow alias) a0-11) + ) + (else + (set! (-> (the-as level-load-info v1-1) borrow borrow-info (/ (the-as int s5-0) 8)) a0-11) + ) + ) + ) + ) + ) + (set! arg0 (the-as pair (-> arg0 cdr))) + (set! s4-0 (-> arg0 car)) + ) + ) + #f + ) + ) + ) + (let ((s4-1 #f)) + (s5-1 (-> *game-info* sub-task-list (game-task-node city-start-start) borrow)) + (evaluate-faction-commands (-> *game-info* sub-task-list (game-task-node city-start-start) faction-commands)) + (let ((s3-0 (-> *game-info* sub-task-list))) + (dotimes (s2-0 (-> s3-0 length)) + (when (nonzero? s2-0) + (let ((s1-0 (-> s3-0 s2-0))) + (case arg0 + (('debug 'level) + ) + (else + (if (logtest? (-> s1-0 flags) (game-task-node-flag closed)) + (eval-game-task-cmd! s1-0) + ) + ) + ) + (when (game-task-node-info-method-12 s1-0) + (if (-> s1-0 on-open) + (script-eval (-> s1-0 on-open) :key s1-0) + ) + (when (-> s1-0 when-open) + (let ((s0-0 (-> s1-0 when-open length))) + (while (begin (label cfg-75) (nonzero? s0-0)) + (+! s0-0 -1) + (set! sv-176 (-> s1-0 when-open s0-0)) + (case (-> sv-176 actor) + (((game-task-actor minimap)) + (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)) + ) + ) + ) + ((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)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (s5-1 (-> s1-0 borrow)) + (when (not (null? (-> s1-0 faction-commands))) + (set! s4-1 #t) + (evaluate-faction-commands (-> s1-0 faction-commands)) + ) + ) + ) + ) + ) + ) + (if (not s4-1) + (city-task-faction-commands) + ) + ) + (dotimes (s4-2 (the-as int (-> *setting-control* user-current faction-command-count))) + (evaluate-faction-commands (-> *setting-control* user-current faction-command s4-2)) + ) + (if (logtest? (game-secrets darkjak-tracking) (-> *game-info* secrets)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature feature44) (-> *game-info* features))) + ) + ) + (logior! (-> *game-info* features) (-> *game-info* debug-features)) + (logior! (-> *game-info* items) (-> *game-info* debug-items)) + (logior! (-> *game-info* vehicles) (-> *game-info* debug-vehicles)) + (dotimes (s4-3 (the-as int (-> *setting-control* user-current borrow-count))) + (s5-1 (-> *setting-control* user-current borrow s4-3)) + ) + ) + (case arg0 + (('load) + ) + (else + (let ((s5-2 (-> *game-info* sub-task-list))) + (dotimes (s4-4 (-> s5-2 length)) + (when (nonzero? s4-4) + (let ((s3-1 (-> s5-2 s4-4))) + (if (and (-> s3-1 manager) (or (and (logtest? (-> s3-1 flags) (game-task-node-flag closed)) + (not (task-node-closed? (-> s3-1 manager final-node))) + ) + (game-task-node-info-method-12 s3-1) + ) + ) + (script-eval '(task-manager) :key s3-1) + ) + ) + ) + ) + ) + ) + ) + (add-borrow-levels *load-state*) + (dotimes (s5-3 (-> *level* length)) + (let ((a0-75 (-> *level* level s5-3))) + (if (= (-> a0-75 status) 'active) + (set-proto-vis! a0-75 arg0) + ) + ) + ) + (if (logtest? (game-secrets vehicle-fox) (-> *game-info* secrets)) + (logior! (-> *game-info* vehicles) (game-vehicles v-fox)) + ) + (if (logtest? (game-secrets vehicle-mirage) (-> *game-info* secrets)) + (logior! (-> *game-info* vehicles) (game-vehicles v-mirage)) + ) + (if (logtest? (game-secrets vehicle-x-ride) (-> *game-info* secrets)) + (logior! (-> *game-info* vehicles) (game-vehicles v-x-ride)) + ) + (set! (-> *game-info* percent-complete) (calculate-percentage *game-info*)) + 0 + ) + +(defmethod set-proto-vis! ((this level) (arg0 symbol)) + (if (= arg0 'none) + (return 0) + ) + (set! (-> this task-mask) + (logior (logand (-> this info base-task-mask) (task-mask task0 task1 task2 task3 task4 task5 task6 task7 done)) + (logand (-> this task-mask) (task-mask primary0)) + ) + ) + (let ((v1-8 (-> this info taskname)) + (a0-4 (-> *game-info* sub-task-list)) + ) + (dotimes (a1-1 (-> a0-4 length)) + (when (nonzero? a1-1) + (let ((a2-3 (-> a0-4 a1-1))) + (when (and (logtest? (-> a2-3 flags) (game-task-node-flag closed)) (= (-> a2-3 level) v1-8)) + (cond + ((logtest? (-> a2-3 flags) (game-task-node-flag abs-task-mask)) + (set! (-> this task-mask) (-> a2-3 task-mask)) + ) + ((logtest? (-> a2-3 flags) (game-task-node-flag set-task-mask)) + (logior! (-> this task-mask) (-> a2-3 task-mask)) + ) + ((logtest? (-> a2-3 flags) (game-task-node-flag clear-task-mask)) + (logclear! (-> this task-mask) (-> a2-3 task-mask)) + ) + ) + ) + ) + ) + ) + ) + (case (-> this name) + (('foresta 'forestb) + (prototypes-game-visible-set! '("gun-base-cylinder.mb" "gun-base-tubes.mb") #f this) + (prototypes-game-visible-set! + '("destroyed-statue-base.mb" + "destroyed-statue-chunk-a.mb" + "destroyed-statue-chunk-b.mb" + "destroyed-statue-eyelid.mb" + "destroyed-statue-rubble-terrain.mb" + "fora-grounder-destroyed-statue-lil-rocks.mb" + "fora-shrub-destroyed-statue-pebbles.mb" + "neo-spawner-root-a.mb" + "neo-spawner-root-b.mb" + ) + (and (task-node-closed? (game-task-node wascity-defend-resolution)) + (not (task-node-closed? (game-task-node precursor-tour-resolution))) + ) + this + ) + (prototypes-game-visible-set! + '("green-eco-vent-a.mb") + (not (task-node-closed? (game-task-node forest-ring-chase-introduction))) + this + ) + ) + (('mhcityb 'mhcitya) + (prototypes-game-visible-set! + '("mhcity-de-tower-grind-strand-long-nocol01.mb" + "mhcity-ground-lower-wall-gapfiller-strand-nub-01.mb" + "mhcity-ground-lower-wall-veins-small-02.mb" + "mhcity-wall-vine-thin-c-destrand-01.mb" + "mhcity-wall-vine-thin-s-destrand-01.mb" + ) + (not (task-node-closed? (game-task-node city-destroy-darkeco-resolution))) + this + ) + ) + (('factoryb) + (prototypes-game-visible-set! + '("facb-gun-tower-base-01.mb") + (not (task-node-closed? (game-task-node factory-sky-battle-tower1))) + this + ) + (prototypes-game-visible-set! + '("facb-gun-tower-base-02.mb") + (not (task-node-closed? (game-task-node factory-sky-battle-tower2))) + this + ) + (prototypes-game-visible-set! + '("facb-gun-tower-base-03.mb") + (not (task-node-closed? (game-task-node factory-sky-battle-tower3))) + this + ) + (prototypes-game-visible-set! + '("facb-gun-tower-base-04.mb") + (not (task-node-closed? (game-task-node factory-sky-battle-tower4))) + this + ) + ) + (('precurd) + (prototypes-game-visible-set! + '("precur-road-bridge01.mb" + "precur-road-bridge02.mb" + "precur-road-bridge03.mb" + "precur-road-bridge04.mb" + "precur-road-bridge05.mb" + ) + (not (task-node-closed? (game-task-node precursor-destroy-ship-escape-continue))) + this + ) + ) + (('desertg) + (prototypes-game-visible-set! '("des-egg.mb") (not (task-node-closed? (game-task-node nest-eggs-wall))) this) + ) + (('wasstada) + (prototypes-game-visible-set! + '("wstd-table.mb") + (task-node-closed? (game-task-node arena-fight-1-introduction)) + this + ) + ) + (('desertg) + (prototypes-game-visible-set! '("des-egg.mb") (not (task-node-closed? (game-task-node nest-eggs-wall))) this) + ) + (('templea 'templed) + (prototypes-game-visible-set! + '("tpl-hide-debris-blocka.mb" + "tpl-hide-debris-blockb.mb" + "tpl-hide-debris-plank-8m.mb" + "tpl-hide-debris-rock1.mb" + "tpl-hide-sunken-brick-01.mb" + "tpl-hide-collision-01.mb" + ) + (task-node-closed? (game-task-node temple-defend-introduction)) + this + ) + (prototypes-game-visible-set! + '("tpl-hall-alter-tunnel-section-jnt-hide.mb" "tpl-hall-alter-tunnel-section-hide.mb") + (not (task-node-closed? (game-task-node temple-tests-resolution))) + this + ) + ) + (('ctywide) + (prototypes-game-visible-set! + '("palcab-lowres-mhcity-tower-shell.mb" + "palcab-lowres-mhcity-tower-shelleye-01.mb" + "palcab-lowres-mhcity-tower-cap.mb" + "palcab-lowres-mhcity-tower-capdoor-01.mb" + ) + (not (task-node-closed? (game-task-node tower-destroy-resolution))) + this + ) + (prototypes-game-visible-set! + '("palcab-lowres-mhcity-tower-shell-blasted-01.mb" "palcab-lowres-mhcity-tower-shell-blasted-02.mb") + (task-node-closed? (game-task-node tower-destroy-resolution)) + this + ) + ) + (('ctygenb) + (prototypes-game-visible-set! + '("city-cable-grindable-turnoff-01.mb" + "city-cable-grindable-collision-01.mb" + "city-cable-grindable-collision.mb" + ) + (task-node-closed? (game-task-node tower-destroy-resolution)) + this + ) + ) + (('atoll) + ) + (('ctymarkb) + ) + (('ctypal) + ) + (('ctyasha) + ) + (('stadiumb) + ) + (('hiphog) + ) + ) + (logior! (-> this task-mask) (-> *setting-control* user-current task-mask)) + 0 + ) + +(defun play-clean ((arg0 symbol)) + (set! *display-entity-errors* #f) + (set! *display-profile* #f) + (set! *display-actor-marks* #f) + (set! (-> *level* play?) #t) + (time-of-day-setup #t) + (set! *time-of-day-fast* #f) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 1.0) + (let ((t9-2 reset-city-squad-control) + (a0-5 #f) + ) + (t9-2 a0-5) + ) + (when arg0 + (let ((s5-0 (-> *game-info* mode))) + (set! (-> *game-info* mode) arg0) + (initialize! *game-info* 'game (the-as game-save #f) (the-as string #f) (the-as resetter-spec #f)) + (set! (-> *game-info* mode) s5-0) + ) + ) + 0 + ) + +;; WARN: Return type mismatch object vs string. +(defun play-task ((arg0 game-task) (arg1 symbol) (arg2 symbol)) + (persist-with-delay *setting-control* 'fail-music-volume (seconds 5) 'music-volume 'abs 0.0 0) + (persist-with-delay *setting-control* 'fail-sfx-volume (seconds 5) 'sfx-volume 'abs 0.0 0) + (persist-with-delay *setting-control* 'fail-dialog-volume (seconds 5) 'dialog-volume 'abs 0.0 0) + (play-clean arg1) + (let ((gp-1 (-> *game-info* play-list arg0))) + (the-as string (cond + ((and (= arg2 'pre-play) (-> gp-1 pre-play-continue)) + (task-node-open! (-> gp-1 pre-play-node) 'menu) + (-> gp-1 pre-play-continue) + ) + ((and (= arg2 'kiosk) (-> gp-1 kiosk-play-continue)) + (send-event (ppointer->process *time-of-day*) 'change 'hour 7) + (task-node-open! (-> gp-1 kiosk-play-node) 'event) + (if (pair? (-> gp-1 kiosk-play-continue)) + (-> (the-as pair (-> gp-1 kiosk-play-continue)) car) + (-> gp-1 kiosk-play-continue) + ) + ) + (else + (if (-> gp-1 play-continue) + (task-node-open! (-> gp-1 play-node) 'menu) + ) + (-> gp-1 play-continue) + ) + ) + ) + ) + ) + +(defun restart-mission () + (let ((gp-0 #t)) + (let ((s5-0 #f)) + (let ((t9-0 reset-city-squad-control) + (a0-0 #f) + ) + (t9-0 a0-0) + ) + (let ((v1-1 (-> *task-manager-engine* alive-list next0))) + *task-manager-engine* + (let ((s4-0 (-> v1-1 next0))) + (while (!= v1-1 (-> *task-manager-engine* alive-list-end)) + (let ((a0-3 (-> (the-as connection v1-1) param1))) + (if (not s5-0) + (set! s5-0 #t) + ) + (if (and (-> (the-as task-manager a0-3) next-state) + (let ((v1-7 (-> (the-as task-manager a0-3) next-state name))) + (or (= v1-7 'complete) (= v1-7 'resolution) (= v1-7 'fail) (= v1-7 'restart)) + ) + ) + (set! s5-0 'busy) + ) + (if (send-event (the-as process-tree a0-3) 'restart) + (set! gp-0 #f) + ) + ) + (set! v1-1 s4-0) + *task-manager-engine* + (set! s4-0 (-> s4-0 next0)) + ) + ) + ) + (if (or (and *target* (focus-test? *target* dead) s5-0) (= s5-0 'busy)) + (return (the-as int #f)) + ) + ) + (cond + ((-> *setting-control* user-current restart-info) + (spawn-resetter! + *resetter-control* + (the-as resetter-params (-> *setting-control* user-current restart-info)) + (the-as game-task-node-info #f) + ) + ) + (gp-0 + (let ((s5-1 (the-as game-task-node-info #f)) + (s4-1 (level-get-target-inside *level*)) + (gp-1 (the-as string #f)) + ) + (when (and s4-1 (not (logtest? (-> s4-1 info level-flags) (level-flags lf0)))) + (let ((s3-0 (-> *game-info* sub-task-list))) + (dotimes (s2-0 (-> s3-0 length)) + (when (nonzero? s2-0) + (let ((s1-0 (-> s3-0 s2-0))) + (if (and (= (-> s1-0 level) (-> s4-1 info taskname)) + (!= (-> s1-0 level) 'city) + (not (logtest? (-> s1-0 flags) (game-task-node-flag no-restart))) + (game-task-node-info-method-12 s1-0) + ) + (set! s5-1 s1-0) + ) + ) + ) + ) + ) + ) + (when s5-1 + (let ((v1-56 (-> *game-info* play-list (-> s5-1 task)))) + (cond + ((and (-> s5-1 reset) (-> s5-1 reset restart-info)) + (spawn-resetter! *resetter-control* (-> s5-1 reset restart-info) (the-as game-task-node-info #f)) + (return 0) + ) + ((-> v1-56 play-continue) + (set! gp-1 (-> v1-56 play-continue)) + ) + ) + ) + ) + (let ((a1-8 (new 'stack-no-clear 'resetter-params))) + (set! (-> a1-8 flags) (resetter-flag auto-reset text-message no-audio)) + (set! (-> a1-8 message) (resetter-message mission-retry)) + (set! (-> a1-8 retry continue) gp-1) + (set! (-> a1-8 retry node) (game-task-node none)) + (set! (-> a1-8 retry reset-mode) 'try) + (set! (-> a1-8 retry execute) #f) + (set! (-> a1-8 fail node) (game-task-node none)) + (set! (-> a1-8 fail continue) #f) + (set! (-> a1-8 fail reset-mode) 'life) + (set! (-> a1-8 fail execute) #f) + (set! (-> a1-8 reset-delay) (the-as uint 0)) + (set! (-> a1-8 task) (game-task none)) + (set! (-> a1-8 text-message) (text-id null)) + (spawn-resetter! *resetter-control* a1-8 (the-as game-task-node-info #f)) + ) + ) + ) + ) + ) + 0 + ) + +;; WARN: Function fail-mission has a return type of none, but the expression builder found a return statement. +(defun fail-mission () + (let ((gp-0 #t)) + (let ((s5-0 #f)) + (let ((t9-0 reset-city-squad-control) + (a0-0 #f) + ) + (t9-0 a0-0) + ) + (let ((v1-1 (-> *task-manager-engine* alive-list next0))) + *task-manager-engine* + (let ((s4-0 (-> v1-1 next0))) + (while (!= v1-1 (-> *task-manager-engine* alive-list-end)) + (let ((a0-3 (-> (the-as connection v1-1) param1))) + (if (not s5-0) + (set! s5-0 #t) + ) + (if (and (-> (the-as task-manager a0-3) next-state) + (let ((v1-7 (-> (the-as task-manager a0-3) next-state name))) + (or (= v1-7 'complete) (= v1-7 'resolution) (= v1-7 'fail) (= v1-7 'restart)) + ) + ) + (set! s5-0 'busy) + ) + (if (send-event (the-as process-tree a0-3) 'fail #t) + (set! gp-0 #f) + ) + ) + (set! v1-1 s4-0) + *task-manager-engine* + (set! s4-0 (-> s4-0 next0)) + ) + ) + ) + (if (or (and *target* (focus-test? *target* dead) s5-0) (= s5-0 'busy)) + (return #f) + ) + ) + (cond + ((-> *setting-control* user-current fail-info) + (spawn-resetter! + *resetter-control* + (the-as resetter-params (-> *setting-control* user-current fail-info)) + (the-as game-task-node-info #f) + ) + ) + (gp-0 + (let ((s4-1 (the-as game-task-node-info #f)) + (s3-0 (level-get-target-inside *level*)) + (gp-1 (the-as string #f)) + (s5-1 138) + ) + (when (and s3-0 (not (logtest? (-> s3-0 info level-flags) (level-flags lf0)))) + (let ((s2-0 (-> *game-info* sub-task-list))) + (dotimes (s1-0 (-> s2-0 length)) + (when (nonzero? s1-0) + (let ((s0-0 (-> s2-0 s1-0))) + (if (and (= (-> s0-0 level) (-> s3-0 info taskname)) + (!= (-> s0-0 level) 'city) + (not (logtest? (-> s0-0 flags) (game-task-node-flag no-restart))) + (game-task-node-info-method-12 s0-0) + ) + (set! s4-1 s0-0) + ) + ) + ) + ) + ) + ) + (cond + ((and s4-1 (-> s4-1 reset) (-> s4-1 reset fail-info)) + (spawn-resetter! *resetter-control* (-> s4-1 reset fail-info) (the-as game-task-node-info #f)) + (return 0) + ) + ((= (status-of-level-and-borrows *level* 'wasall #f) 'active) + (set! gp-1 "wasdoors-desert") + (if (and (-> *game-info* current-continue) + (logtest? (continue-flags record-path) (-> *game-info* current-continue flags)) + ) + (set! gp-1 (-> *game-info* current-continue name)) + ) + (set! s5-1 1973) + ) + ((and s4-1 (let ((a0-25 (-> *game-info* play-list (-> s4-1 task) play-continue))) + (when a0-25 + (set! gp-1 a0-25) + gp-1 + ) + ) + ) + ) + ) + (let ((a1-12 (new 'stack-no-clear 'resetter-params))) + (set! (-> a1-12 flags) (resetter-flag auto-reset text-message)) + (set! (-> a1-12 message) (resetter-message mission-fail)) + (set! (-> a1-12 retry continue) #f) + (set! (-> a1-12 retry node) (game-task-node none)) + (set! (-> a1-12 retry reset-mode) 'try) + (set! (-> a1-12 retry execute) #f) + (set! (-> a1-12 fail node) (game-task-node none)) + (set! (-> a1-12 fail continue) gp-1) + (set! (-> a1-12 fail reset-mode) 'life) + (set! (-> a1-12 fail execute) #f) + (set! (-> a1-12 reset-delay) (the-as uint 1500)) + (set! (-> a1-12 task) (game-task none)) + (set! (-> a1-12 text-message) (the-as text-id s5-1)) + (spawn-resetter! *resetter-control* a1-12 (the-as game-task-node-info #f)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defun task-node-by-name ((arg0 string)) + (let ((s5-0 (-> *game-info* sub-task-list))) + (dotimes (s4-0 (-> s5-0 length)) + (when (nonzero? s4-0) + (let ((s3-0 (-> s5-0 s4-0))) + (if (string= arg0 (-> s3-0 name)) + (return s3-0) + ) + ) + ) + ) + ) + (the-as game-task-node-info #f) + ) + +(defun task-node-index-by-name ((arg0 string)) + (let ((s5-0 (-> *game-info* sub-task-list))) + (dotimes (s4-0 (-> s5-0 length)) + (when (nonzero? s4-0) + (let ((v1-4 (-> s5-0 s4-0))) + (if (string= arg0 (-> v1-4 name)) + (return s4-0) + ) + ) + ) + ) + ) + 0 + ) + +(defun task-resolution-close! ((arg0 game-task)) + (let ((v1-1 (-> *game-info* sub-task-list))) + (dotimes (a1-0 (-> v1-1 length)) + (when (nonzero? a1-0) + (let ((a2-3 (-> v1-1 a1-0))) + (when (and (= (-> a2-3 task) arg0) (logtest? (-> a2-3 flags) (game-task-node-flag close-task))) + (open! a2-3 'event) + (return #t) + ) + ) + ) + ) + ) + #f + ) + +(defun task-close! ((arg0 string)) + (let ((s5-0 (-> *game-info* sub-task-list))) + (dotimes (s4-0 (-> s5-0 length)) + (when (nonzero? s4-0) + (let ((s3-0 (-> s5-0 s4-0))) + (when (string= arg0 (-> s3-0 name)) + (let ((gp-2 (not (logtest? (-> s3-0 flags) (game-task-node-flag closed))))) + (open! s3-0 'event) + (return gp-2) + ) + ) + ) + ) + ) + ) + (format 0 "ERROR: attempting to close unknown task node ~A.~%" arg0) + #f + ) + +(defun task-closed? ((arg0 string)) + (let ((s5-0 (-> *game-info* sub-task-list))) + (dotimes (s4-0 (-> s5-0 length)) + (when (nonzero? s4-0) + (let ((s3-0 (-> s5-0 s4-0))) + (if (string= arg0 (-> s3-0 name)) + (return (logtest? (-> s3-0 flags) (game-task-node-flag closed))) + ) + ) + ) + ) + ) + (format 0 "ERROR: attempting to query closed? of unknown task node ~A.~%" arg0) + #f + ) + +(defun open-task-nodes ((arg0 (array game-task-node-info))) + (local-vars (a3-4 symbol)) + (set! (-> arg0 length) 0) + (let ((v1-1 (-> *game-info* sub-task-list))) + (dotimes (a1-0 (-> v1-1 length)) + (when (nonzero? a1-0) + (let ((a2-3 (-> v1-1 a1-0))) + (when (and (not (logtest? (-> a2-3 flags) (game-task-node-flag closed))) + (begin + (dotimes (a3-3 4) + (when (and (nonzero? (-> a2-3 parent-node a3-3)) + (not (logtest? (-> v1-1 (-> a2-3 parent-node a3-3) flags) (game-task-node-flag closed))) + ) + (set! a3-4 #f) + (goto cfg-14) + ) + ) + (set! a3-4 #t) + (label cfg-14) + (and a3-4 (< (-> arg0 length) (-> arg0 allocated-length))) + ) + ) + (set! (-> arg0 (-> arg0 length)) a2-3) + (+! (-> arg0 length) 1) + ) + ) + ) + ) + ) + arg0 + ) + +(defmethod print ((this game-task-node-info)) + (format + #t + "#" + (-> this name) + (cond + ((logtest? (-> this flags) (game-task-node-flag closed)) + "closed" + ) + ((game-task-node-info-method-12 this) + "open" + ) + (else + "inactive" + ) + ) + this + ) + this + ) + +(defmethod open! ((this game-task-node-info) (arg0 symbol)) + (when (not (logtest? (-> this flags) (game-task-node-flag closed))) + (let ((s4-0 (lambda ((arg0 game-task-node-info) (arg1 symbol)) + (logior! (-> arg0 flags) (game-task-node-flag closed)) + (+! (-> *game-info* task-counter) 1) + (when (zero? (-> arg0 close-time)) + (set! (-> arg0 gem-count) (the-as uint (the int (-> *game-info* gem)))) + (set! (-> arg0 skill-count) (the-as uint (the int (-> *game-info* skill)))) + (set! (-> arg0 close-time) (the-as uint (-> *display* game-clock frame-counter))) + ) + (if (-> arg0 on-close) + (script-eval (-> arg0 on-close) :key arg0) + ) + (when (logtest? (-> arg0 flags) (game-task-node-flag close-task)) + (let ((t9-2 reset-city-squad-control) + (a0-4 #f) + ) + (t9-2 a0-4) + ) + (target-reset-on-task-finish) + (if (= arg1 'event) + (menu-secrets-notify-task-node-close (the-as game-task-node arg0)) + ) + ) + (if (logtest? (-> arg0 flags) (game-task-node-flag close-task)) + ((lambda ((arg0 game-task-node-info)) + (if *target* + (send-event *target* 'get-pickup (pickup-type fuel-cell) (the float (-> arg0 task))) + (give *game-info* 'fuel-cell (the float (-> arg0 task)) (the-as handle #f)) + ) + ) + arg0 + ) + ) + ) + ) + ) + (let ((s2-0 0) + (s3-0 (new 'stack-no-clear 'array 'game-task-node 64)) + ) + (let ((s1-0 this)) + (loop + (cond + ((= (-> s1-0 parent-node 0) (game-task-node none)) + (goto cfg-21) + ) + ((= (-> s1-0 parent-node 1) (game-task-node none)) + (let ((v1-10 (-> *game-info* sub-task-list (-> s1-0 parent-node 0)))) + (cond + ((logtest? (-> v1-10 flags) (game-task-node-flag closed)) + (goto cfg-21) + ) + (else + (set! (-> s3-0 s2-0) (-> s1-0 parent-node 0)) + (+! s2-0 1) + (when (< 64 s2-0) + (break!) + 0 + ) + ) + ) + (set! s1-0 v1-10) + ) + ) + (else + (dotimes (s0-0 4) + (let ((v1-15 (-> s1-0 parent-node s0-0))) + (if (nonzero? v1-15) + (open! (-> *game-info* sub-task-list v1-15) 'none) + ) + ) + ) + (goto cfg-21) + ) + ) + ) + ) + (label cfg-21) + (while (nonzero? s2-0) + (+! s2-0 -1) + (s4-0 (-> *game-info* sub-task-list (-> s3-0 s2-0)) arg0) + ) + ) + (s4-0 this arg0) + ) + (let ((s4-1 (-> *game-info* sub-task-list))) + (dotimes (s3-1 (-> s4-1 length)) + (when (nonzero? s3-1) + (let ((s2-1 (-> s4-1 s3-1))) + (if (and (or (logtest? (-> s2-1 flags) (game-task-node-flag auto-close disk-close)) + (and (kiosk?) + (logtest? (-> this flags) (game-task-node-flag close-task)) + (!= arg0 'menu) + (logtest? (-> s2-1 flags) (game-task-node-flag kiosk-close)) + ) + ) + (game-task-node-info-method-12 s2-1) + ) + (open! s2-1 'none) + ) + ) + ) + ) + ) + (update-task-masks arg0) + ) + 0 + ) + +(defun task-node-closed? ((arg0 game-task-node)) + (let ((v1-2 (-> *game-info* sub-task-list arg0))) + (logtest? (-> v1-2 flags) (game-task-node-flag closed)) + ) + ) + +(defun task-node-close! ((arg0 game-task-node) (arg1 symbol)) + (open! (-> *game-info* sub-task-list arg0) arg1) + 0 + ) + +(defun task-open? ((arg0 string)) + (let ((s5-0 (-> *game-info* sub-task-list)) + (s4-0 0) + ) + (while (< s4-0 (-> s5-0 length)) + (when (nonzero? s4-0) + (let ((v1-4 (-> s5-0 s4-0))) + (if (string= arg0 (-> v1-4 name)) + (return (task-node-open? (the-as game-task-node s4-0))) + ) + ) + ) + (set! s4-0 (+ s4-0 1)) + ) + ) + (format 0 "ERROR: attempting to query open? of unknown task node ~A.~%" arg0) + #f + ) + +(defmethod game-task-node-info-method-11 ((this game-task-node-info) (arg0 symbol)) + (local-vars (v1-19 symbol)) + (when (logtest? (-> this flags) (game-task-node-flag closed)) + (logclear! (-> this flags) (game-task-node-flag closed)) + (+! (-> *game-info* task-counter) 1) + (if (logtest? (-> this flags) (game-task-node-flag close-task)) + (logclear! (-> *game-info* task-perm-list data (-> this task) status) (entity-perm-status complete)) + ) + (let ((s5-0 (-> *game-info* sub-task-list))) + (dotimes (s4-0 (-> s5-0 length)) + (when (nonzero? s4-0) + (let ((a0-4 (-> s5-0 s4-0))) + (set! v1-19 + (and (logtest? (-> a0-4 flags) (game-task-node-flag closed)) + (begin + (dotimes (v1-20 4) + (when (and (nonzero? (-> a0-4 parent-node v1-20)) + (not (logtest? (-> s5-0 (-> a0-4 parent-node v1-20) flags) (game-task-node-flag closed))) + ) + (set! v1-19 #t) + (goto cfg-17) + ) + ) + #f + ) + ) + ) + (label cfg-17) + (if v1-19 + (game-task-node-info-method-11 a0-4 'none) + ) + ) + ) + ) + ) + (update-task-masks arg0) + ) + 0 + (none) + ) + +(defun task-node-open? ((arg0 game-task-node)) + (let ((v1-1 (-> *game-info* sub-task-list))) + (game-task-node-info-method-12 (-> v1-1 arg0)) + ) + ) + +(defmethod game-task-node-info-method-12 ((this game-task-node-info)) + (local-vars (a0-3 symbol) (a1-1 symbol)) + (let ((a1-0 (-> *game-info* sub-task-list)) + (v1-1 this) + ) + (and (not (logtest? (-> v1-1 flags) (game-task-node-flag closed))) + (begin + (dotimes (a2-2 4) + (let ((t0-0 (-> v1-1 parent-node a2-2))) + (when (and (nonzero? t0-0) (not (logtest? (-> a1-0 t0-0 flags) (game-task-node-flag closed)))) + (set! a1-1 #f) + (goto cfg-12) + ) + ) + ) + (set! a1-1 #t) + (label cfg-12) + a1-1 + ) + (and (or (zero? (+ (-> *setting-control* user-current exclusive-task-count) (-> *game-info* task-node-exclusive length)) + ) + (begin + (dotimes (a1-6 (the-as int (-> *setting-control* user-current exclusive-task-count))) + (when (= (-> *setting-control* user-current exclusive-task a1-6) (-> this task)) + (set! a0-3 #t) + (goto cfg-29) + ) + ) + (dotimes (a1-9 (-> *game-info* task-node-exclusive length)) + (when (= (-> *game-info* task-node-exclusive a1-9) (-> this task)) + (set! a0-3 #t) + (goto cfg-29) + ) + ) + (set! a0-3 #f) + (label cfg-29) + (or a0-3 (logtest? (-> v1-1 flags) (game-task-node-flag auto-close disk-close))) + ) + ) + (or (not (-> v1-1 open?)) ((-> v1-1 open?) v1-1)) + ) + ) + ) + ) + +(defun task-node-open! ((arg0 game-task-node) (arg1 symbol)) + (let ((s5-0 (-> *game-info* sub-task-list arg0))) + (dotimes (s4-0 4) + (if (nonzero? (-> s5-0 parent-node s4-0)) + (open! (-> *game-info* sub-task-list (-> s5-0 parent-node s4-0)) arg1) + ) + ) + (game-task-node-info-method-11 s5-0 arg1) + ) + 0 + ) + +(defmethod eval-game-task-cmd! ((this game-task-node-info)) + (dotimes (v1-0 (the-as int (-> this command-count))) + (case (-> *game-info* task-node-commands (+ (-> this command-index) v1-0)) + (((game-task-node-command none)) + ) + (((game-task-node-command add-jakc)) + (set! (-> *game-info* features) (the-as game-feature (logior (game-feature jakc) (-> *game-info* features)))) + ) + (((game-task-node-command add-sidekick)) + (logior! (-> *game-info* features) (game-feature sidekick)) + ) + (((game-task-node-command sub-sidekick)) + (logclear! (-> *game-info* features) (game-feature sidekick)) + ) + (((game-task-node-command add-board)) + (logior! (-> *game-info* features) (game-feature board)) + ) + (((game-task-node-command add-board-training)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature feature36) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-board-launch)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature board-launch) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-board-zap)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature board-zap) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-board-trail)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature board-trail) (-> *game-info* features))) + ) + ) + (((game-task-node-command sub-board-trail)) + (set! (-> *game-info* features) + (the-as game-feature (logclear (-> *game-info* features) (game-feature board-trail))) + ) + ) + (((game-task-node-command sub-board)) + (logclear! (-> *game-info* features) (game-feature board)) + ) + (((game-task-node-command add-gun-red-1)) + (logior! (-> *game-info* features) (game-feature gun gun-red-1)) + ) + (((game-task-node-command add-gun-red-2)) + (logior! (-> *game-info* features) (game-feature gun gun-red-2)) + ) + (((game-task-node-command add-gun-red-3)) + (logior! (-> *game-info* features) (game-feature gun gun-red-3)) + ) + (((game-task-node-command add-gun-red-ammo-1)) + (logior! (-> *game-info* features) (game-feature gun gun-upgrade-red-ammo-1)) + ) + (((game-task-node-command add-gun-red-ammo-2)) + (logior! (-> *game-info* features) (game-feature gun gun-upgrade-red-ammo-2)) + ) + (((game-task-node-command add-gun-yellow-1)) + (logior! (-> *game-info* features) (game-feature gun gun-yellow-1)) + ) + (((game-task-node-command add-gun-yellow-2)) + (logior! (-> *game-info* features) (game-feature gun gun-yellow-2)) + ) + (((game-task-node-command add-gun-yellow-3)) + (logior! (-> *game-info* features) (game-feature gun gun-yellow-3)) + ) + (((game-task-node-command add-gun-yellow-ammo-1)) + (logior! (-> *game-info* features) (game-feature gun gun-upgrade-yellow-ammo-1)) + ) + (((game-task-node-command add-gun-yellow-ammo-2)) + (logior! (-> *game-info* features) (game-feature gun gun-upgrade-yellow-ammo-2)) + ) + (((game-task-node-command add-gun-blue-1)) + (logior! (-> *game-info* features) (game-feature gun gun-blue-1)) + ) + (((game-task-node-command add-gun-blue-2)) + (logior! (-> *game-info* features) (game-feature gun gun-blue-2)) + ) + (((game-task-node-command add-gun-blue-3)) + (logior! (-> *game-info* features) (game-feature gun gun-blue-3)) + ) + (((game-task-node-command add-gun-blue-ammo-1)) + (logior! (-> *game-info* features) (game-feature gun gun-upgrade-blue-ammo-1)) + ) + (((game-task-node-command add-gun-blue-ammo-2)) + (logior! (-> *game-info* features) (game-feature gun gun-upgrade-blue-ammo-2)) + ) + (((game-task-node-command add-gun-dark-1)) + (logior! (-> *game-info* features) (game-feature gun gun-dark-1)) + ) + (((game-task-node-command add-gun-dark-2)) + (logior! (-> *game-info* features) (game-feature gun gun-dark-2)) + ) + (((game-task-node-command add-gun-dark-3)) + (logior! (-> *game-info* features) (game-feature gun gun-dark-3)) + ) + (((game-task-node-command add-gun-dark-ammo-1)) + (logior! (-> *game-info* features) (game-feature gun gun-upgrade-dark-ammo-1)) + ) + (((game-task-node-command add-gun-dark-ammo-2)) + (logior! (-> *game-info* features) (game-feature gun gun-upgrade-dark-ammo-2)) + ) + (((game-task-node-command add-pass-port-mh)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature feature31) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-pass-port-inda)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature feature32) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-pass-inda-indb)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature feature33) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-pass-indb-sluma)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature feature34) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-pass-slumb-genb)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature feature35) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-darkeco)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature darkeco) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-darkjak)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature darkjak) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-darkjak-smack)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature darkjak-smack) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-darkjak-bomb0)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature darkjak-bomb0) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-darkjak-bomb1)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature darkjak-bomb1) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-darkjak-tracking)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature feature44) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-darkjak-invinc)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature feature45) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-lighteco)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature lighteco) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-lightjak)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature lightjak) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-lightjak-regen)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature lightjak lightjak-regen) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-lightjak-swoop)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature lightjak lightjak-swoop) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-lightjak-freeze)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature lightjak lightjak-freeze) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-lightjak-shield)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature lightjak lightjak-shield) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-armor-0)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature armor0) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-armor-1)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature armor1) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-armor-2)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature armor2) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-armor-3)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature armor3) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-artifact-invis)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature artifact-invis) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-light-eco-crystal)) + (+! (-> *game-info* light-crystal) 1.0) + (case (-> *game-info* light-crystal) + ((1.0) + (logior! (-> *game-info* items) (game-items light-eco-crystal0)) + ) + ((2.0) + (logior! (-> *game-info* items) (game-items light-eco-crystal1)) + ) + ((3.0) + (logior! (-> *game-info* items) (game-items light-eco-crystal2)) + ) + ((4.0) + (logior! (-> *game-info* items) (game-items light-eco-crystal3)) + ) + ) + ) + (((game-task-node-command add-dark-eco-crystal)) + (+! (-> *game-info* dark-crystal) 1.0) + (case (-> *game-info* dark-crystal) + ((1.0) + (logior! (-> *game-info* items) (game-items dark-eco-crystal0)) + ) + ((2.0) + (logior! (-> *game-info* items) (game-items dark-eco-crystal1)) + ) + ((3.0) + (logior! (-> *game-info* items) (game-items dark-eco-crystal2)) + ) + ((4.0) + (logior! (-> *game-info* items) (game-items dark-eco-crystal3)) + ) + ) + ) + (((game-task-node-command add-vehicle-turtle)) + (logior! (-> *game-info* vehicles) (game-vehicles v-turtle)) + ) + (((game-task-node-command add-vehicle-snake)) + (logior! (-> *game-info* vehicles) (game-vehicles v-snake)) + ) + (((game-task-node-command add-vehicle-scorpion)) + (logior! (-> *game-info* vehicles) (game-vehicles v-scorpion)) + ) + (((game-task-node-command add-vehicle-toad)) + (logior! (-> *game-info* vehicles) (game-vehicles v-toad)) + ) + (((game-task-node-command add-vehicle-rhino)) + (logior! (-> *game-info* vehicles) (game-vehicles v-rhino)) + ) + (((game-task-node-command add-amulet-1)) + (logior! (-> *game-info* items) (game-items amulet0)) + ) + (((game-task-node-command add-amulet-2)) + (logior! (-> *game-info* items) (game-items amulet1)) + ) + (((game-task-node-command add-amulet-3)) + (logior! (-> *game-info* items) (game-items amulet2)) + ) + (((game-task-node-command add-pass-front-gate)) + (logior! (-> *game-info* items) (game-items pass-front-gate)) + ) + (((game-task-node-command add-seal)) + (logior! (-> *game-info* items) (game-items seal-of-mar)) + ) + (((game-task-node-command add-cypher-gliph)) + (logior! (-> *game-info* items) (game-items cypher-gliph)) + ) + (((game-task-node-command add-av-cube)) + (logior! (-> *game-info* items) (game-items artifact-holocube)) + ) + (((game-task-node-command add-av-reflector)) + (logior! (-> *game-info* items) (game-items artifact-av-reflector)) + ) + (((game-task-node-command add-av-prism)) + (logior! (-> *game-info* items) (game-items artifact-av-prism)) + ) + (((game-task-node-command add-av-generator)) + (logior! (-> *game-info* items) (game-items artifact-av-generator)) + ) + (((game-task-node-command add-av-map)) + (logior! (-> *game-info* items) (game-items artifact-av-map)) + ) + ) + ) + 0 + (none) + ) + +(defun task-node-close-upwards ((arg0 (array game-task-node-info)) (arg1 int)) + (let ((s5-0 (-> arg0 arg1))) + (dotimes (s4-0 4) + (when (nonzero? (-> s5-0 parent-node s4-0)) + (let ((v1-11 (-> arg0 (-> s5-0 parent-node s4-0)))) + (when (not (logtest? (-> v1-11 flags) (game-task-node-flag closed))) + (logior! (-> v1-11 flags) (game-task-node-flag closed)) + (task-node-close-upwards arg0 (the-as int (-> s5-0 parent-node s4-0))) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defun task-node-reset ((arg0 symbol)) + (let ((s5-0 (-> *game-info* sub-task-list))) + (dotimes (s4-0 (-> s5-0 length)) + (when (nonzero? s4-0) + (let ((s3-0 (-> s5-0 s4-0))) + (when (logtest? (-> s3-0 flags) (game-task-node-flag closed)) + (case arg0 + (('game) + (if (nonzero? s4-0) + (logclear! (-> s3-0 flags) (game-task-node-flag closed)) + ) + ) + (('life) + (if (and (not (task-complete? *game-info* (-> s3-0 task))) + (not (logtest? (-> s3-0 flags) (game-task-node-flag save-on-life))) + ) + (logclear! (-> s3-0 flags) (game-task-node-flag closed)) + ) + ) + (('try) + (if (and (not (task-complete? *game-info* (-> s3-0 task))) + (or (not (logtest? (-> s3-0 flags) (game-task-node-flag save-on-life save-on-try))) + (logtest? (-> s3-0 flags) (game-task-node-flag reset-on-try)) + ) + ) + (logclear! (-> s3-0 flags) (game-task-node-flag closed)) + ) + ) + ) + (if (logtest? (-> s3-0 flags) (game-task-node-flag closed)) + (task-node-close-upwards s5-0 s4-0) + ) + ) + ) + ) + ) + ) + (+! (-> *game-info* task-counter) 1) + 0 + ) + +(defun-debug task-node-dump ((arg0 symbol)) + (let ((gp-0 (-> *game-info* sub-task-list))) + (dotimes (s5-0 (-> gp-0 length)) + (when (nonzero? s5-0) + (let* ((s0-0 (-> gp-0 s5-0)) + (s4-0 format) + (s3-0 #t) + (s2-0 " ~-40S ~-8S ~S~%") + (s1-0 (game-task-node->string (the-as game-task-node s5-0))) + (a3-0 (if (task-node-closed? (the-as game-task-node s5-0)) + "closed" + "open" + ) + ) + (t0-0 (and (-> s0-0 manager) (handle->process (-> s0-0 manager manager)))) + ) + (set! t0-0 (cond + (t0-0 + (empty) + t0-0 + ) + (else + "" + ) + ) + ) + (s4-0 s3-0 s2-0 s1-0 a3-0 t0-0) + ) + ) + ) + ) + #f + ) + +(defmethod print ((this game-task-event)) + (let* ((t9-0 format) + (a0-1 #t) + (a1-0 "#") + (v1-0 (-> this actor)) + (a2-1 (cond + ((= v1-0 (game-task-actor wascity-turret)) + "wascity-turret" + ) + ((= v1-0 (game-task-actor none)) + "none" + ) + ((= v1-0 (game-task-actor burning-bush-genb-2)) + "burning-bush-genb-2" + ) + ((= v1-0 (game-task-actor unused-slot-18)) + "unused-slot-18" + ) + ((= v1-0 (game-task-actor burning-bush-wasb-3)) + "burning-bush-wasb-3" + ) + ((= v1-0 (game-task-actor burning-bush-desd-3)) + "burning-bush-desd-3" + ) + ((= v1-0 (game-task-actor unused-slot-17)) + "unused-slot-17" + ) + ((= v1-0 (game-task-actor unused-slot-15)) + "unused-slot-15" + ) + ((= v1-0 (game-task-actor burning-bush-inda-1)) + "burning-bush-inda-1" + ) + ((= v1-0 (game-task-actor veger-ruins)) + "veger-ruins" + ) + ((= v1-0 (game-task-actor burning-bush-desb-2)) + "burning-bush-desb-2" + ) + ((= v1-0 (game-task-actor unused-slot-16)) + "unused-slot-16" + ) + ((= v1-0 (game-task-actor burning-bush-desf)) + "burning-bush-desf" + ) + ((= v1-0 (game-task-actor burning-bush-slumb-3)) + "burning-bush-slumb-3" + ) + ((= v1-0 (game-task-actor wascity-leaper)) + "wascity-leaper" + ) + ((= v1-0 (game-task-actor unused-slot-8)) + "unused-slot-8" + ) + ((= v1-0 (game-task-actor burning-bush-slumb-2)) + "burning-bush-slumb-2" + ) + ((= v1-0 (game-task-actor burning-bush-desb)) + "burning-bush-desb" + ) + ((= v1-0 (game-task-actor burning-bush-wasa-2)) + "burning-bush-wasa-2" + ) + ((= v1-0 (game-task-actor seem-wascitya)) + "seem-wascitya" + ) + ((= v1-0 (game-task-actor ashelin-oasis)) + "ashelin-oasis" + ) + ((= v1-0 (game-task-actor was-pre-game-deserte)) + "was-pre-game-deserte" + ) + ((= v1-0 (game-task-actor burning-bush-indb)) + "burning-bush-indb" + ) + ((= v1-0 (game-task-actor burning-bush-port-4)) + "burning-bush-port-4" + ) + ((= v1-0 (game-task-actor burning-bush-port-5)) + "burning-bush-port-5" + ) + ((= v1-0 (game-task-actor seem-wascity)) + "seem-wascity" + ) + ((= v1-0 (game-task-actor burning-bush-wasa-1)) + "burning-bush-wasa-1" + ) + ((= v1-0 (game-task-actor unused-slot-20)) + "unused-slot-20" + ) + ((= v1-0 (game-task-actor vin-vinroom)) + "vin-vinroom" + ) + ((= v1-0 (game-task-actor burning-bush-marka)) + "burning-bush-marka" + ) + ((= v1-0 (game-task-actor burning-bush-slumc-2)) + "burning-bush-slumc-2" + ) + ((= v1-0 (game-task-actor burning-bush-desc-5)) + "burning-bush-desc-5" + ) + ((= v1-0 (game-task-actor unused-slot-19)) + "unused-slot-19" + ) + ((= v1-0 (game-task-actor monk-mummy)) + "monk-mummy" + ) + ((= v1-0 (game-task-actor torn-freehq)) + "torn-freehq" + ) + ((= v1-0 (game-task-actor burning-bush-indb-3)) + "burning-bush-indb-3" + ) + ((= v1-0 (game-task-actor burning-bush-desb-4)) + "burning-bush-desb-4" + ) + ((= v1-0 (game-task-actor seem-temple)) + "seem-temple" + ) + ((= v1-0 (game-task-actor kleever-arena)) + "kleever-arena" + ) + ((= v1-0 (game-task-actor unused-slot-21)) + "unused-slot-21" + ) + ((= v1-0 (game-task-actor burning-bush-indb-2)) + "burning-bush-indb-2" + ) + ((= v1-0 (game-task-actor oracle-oracle)) + "oracle-oracle" + ) + ((= v1-0 (game-task-actor jinx-hiphog)) + "jinx-hiphog" + ) + ((= v1-0 (game-task-actor minimap)) + "minimap" + ) + ((= v1-0 (game-task-actor burning-bush-arena)) + "burning-bush-arena" + ) + ((= v1-0 (game-task-actor damus-wasdoors)) + "damus-wasdoors" + ) + ((= v1-0 (game-task-actor kleever-pen)) + "kleever-pen" + ) + ((= v1-0 (game-task-actor burning-bush-markb)) + "burning-bush-markb" + ) + ((= v1-0 (game-task-actor burning-bush-genb-4)) + "burning-bush-genb-4" + ) + ((= v1-0 (game-task-actor daxter)) + "daxter" + ) + ((= v1-0 (game-task-actor burning-bush-genb-5)) + "burning-bush-genb-5" + ) + ((= v1-0 (game-task-actor torn-hipbar)) + "torn-hipbar" + ) + ((= v1-0 (game-task-actor burning-bush-genb-1)) + "burning-bush-genb-1" + ) + ((= v1-0 (game-task-actor burning-bush-inda-4)) + "burning-bush-inda-4" + ) + ((= v1-0 (game-task-actor burning-bush-desb-3)) + "burning-bush-desb-3" + ) + ((= v1-0 (game-task-actor sig-nest)) + "sig-nest" + ) + ((= v1-0 (game-task-actor unused-slot-22)) + "unused-slot-22" + ) + ((= v1-0 (game-task-actor burning-bush-slumb)) + "burning-bush-slumb" + ) + ((= v1-0 (game-task-actor ashelin-freehq)) + "ashelin-freehq" + ) + ((= v1-0 (game-task-actor burning-bush-desc-2)) + "burning-bush-desc-2" + ) + ((= v1-0 (game-task-actor samos-onintent)) + "samos-onintent" + ) + ((= v1-0 (game-task-actor burning-bush-desd)) + "burning-bush-desd" + ) + ((= v1-0 (game-task-actor burning-bush-desg-2)) + "burning-bush-desg-2" + ) + ((= v1-0 (game-task-actor burning-bush-wasa-6)) + "burning-bush-wasa-6" + ) + ((= v1-0 (game-task-actor burning-bush-wasb-7)) + "burning-bush-wasb-7" + ) + ((= v1-0 (game-task-actor burning-bush-wasb-2)) + "burning-bush-wasb-2" + ) + ((= v1-0 (game-task-actor burning-bush-inda-5)) + "burning-bush-inda-5" + ) + ((= v1-0 (game-task-actor sig-talkbox)) + "sig-talkbox" + ) + ((= v1-0 (game-task-actor pecker-onintent)) + "pecker-onintent" + ) + ((= v1-0 (game-task-actor damus-arena)) + "damus-arena" + ) + ((= v1-0 (game-task-actor burning-bush-wasa-5)) + "burning-bush-wasa-5" + ) + ((= v1-0 (game-task-actor unused-slot-23)) + "unused-slot-23" + ) + ((= v1-0 (game-task-actor damus-wascity)) + "damus-wascity" + ) + ((= v1-0 (game-task-actor monk-wascity)) + "monk-wascity" + ) + ((= v1-0 (game-task-actor damus-desert)) + "damus-desert" + ) + ((= v1-0 (game-task-actor burning-bush-wasb-1)) + "burning-bush-wasb-1" + ) + ((= v1-0 (game-task-actor burning-bush-desc-4)) + "burning-bush-desc-4" + ) + ((= v1-0 (game-task-actor burning-bush-dese-5)) + "burning-bush-dese-5" + ) + ((= v1-0 (game-task-actor was-pre-game-wascityb)) + "was-pre-game-wascityb" + ) + ((= v1-0 (game-task-actor burning-bush-slumc)) + "burning-bush-slumc" + ) + ((= v1-0 (game-task-actor power-game-vinroom)) + "power-game-vinroom" + ) + ((= v1-0 (game-task-actor tess-gungame)) + "tess-gungame" + ) + ((= v1-0 (game-task-actor pecker)) + "pecker" + ) + ((= v1-0 (game-task-actor torn-hipbooth)) + "torn-hipbooth" + ) + ((= v1-0 (game-task-actor burning-bush-desg-4)) + "burning-bush-desg-4" + ) + ((= v1-0 (game-task-actor burning-bush-genc-2)) + "burning-bush-genc-2" + ) + ((= v1-0 (game-task-actor damus-ruins)) + "damus-ruins" + ) + ((= v1-0 (game-task-actor unused-slot-24)) + "unused-slot-24" + ) + ((= v1-0 (game-task-actor ashelin-talkbox)) + "ashelin-talkbox" + ) + ((= v1-0 (game-task-actor burning-bush-port-8)) + "burning-bush-port-8" + ) + ((= v1-0 (game-task-actor burning-bush-port-2)) + "burning-bush-port-2" + ) + ((= v1-0 (game-task-actor burning-bush-wasb-6)) + "burning-bush-wasb-6" + ) + ((= v1-0 (game-task-actor burning-bush-port-3)) + "burning-bush-port-3" + ) + ((= v1-0 (game-task-actor unused-slot-27)) + "unused-slot-27" + ) + ((= v1-0 (game-task-actor burning-bush-slumb-4)) + "burning-bush-slumb-4" + ) + ((= v1-0 (game-task-actor burning-bush-desg-3)) + "burning-bush-desg-3" + ) + ((= v1-0 (game-task-actor sig-wasdoors)) + "sig-wasdoors" + ) + ((= v1-0 (game-task-actor samos-freehq)) + "samos-freehq" + ) + ((= v1-0 (game-task-actor burning-bush-sluma-1)) + "burning-bush-sluma-1" + ) + ((= v1-0 (game-task-actor onin-talkbox)) + "onin-talkbox" + ) + ((= v1-0 (game-task-actor unused-slot-25)) + "unused-slot-25" + ) + ((= v1-0 (game-task-actor burning-bush-desc-3)) + "burning-bush-desc-3" + ) + ((= v1-0 (game-task-actor burning-bush-genb)) + "burning-bush-genb" + ) + ((= v1-0 (game-task-actor burning-bush-markb-2)) + "burning-bush-markb-2" + ) + ((= v1-0 (game-task-actor burning-bush-dese-2)) + "burning-bush-dese-2" + ) + ((= v1-0 (game-task-actor burning-bush-indb-1)) + "burning-bush-indb-1" + ) + ((= v1-0 (game-task-actor unused-slot-9)) + "unused-slot-9" + ) + ((= v1-0 (game-task-actor burning-bush-slumb-1)) + "burning-bush-slumb-1" + ) + ((= v1-0 (game-task-actor unused-slot-28)) + "unused-slot-28" + ) + ((= v1-0 (game-task-actor burning-bush-pal-2)) + "burning-bush-pal-2" + ) + ((= v1-0 (game-task-actor burning-bush-desa-2)) + "burning-bush-desa-2" + ) + ((= v1-0 (game-task-actor burning-bush-farma)) + "burning-bush-farma" + ) + ((= v1-0 (game-task-actor burning-bush-desg)) + "burning-bush-desg" + ) + ((= v1-0 (game-task-actor keira-freehq)) + "keira-freehq" + ) + ((= v1-0 (game-task-actor unused-slot-26)) + "unused-slot-26" + ) + ((= v1-0 (game-task-actor burning-bush-desd-5)) + "burning-bush-desd-5" + ) + ((= v1-0 (game-task-actor burning-bush-wasb-5)) + "burning-bush-wasb-5" + ) + ((= v1-0 (game-task-actor burning-bush-desc)) + "burning-bush-desc" + ) + ((= v1-0 (game-task-actor burning-bush-genb-3)) + "burning-bush-genb-3" + ) + ((= v1-0 (game-task-actor onin-onintent)) + "onin-onintent" + ) + ((= v1-0 (game-task-actor unused-slot-29)) + "unused-slot-29" + ) + ((= v1-0 (game-task-actor unused-slot-10)) + "unused-slot-10" + ) + ((= v1-0 (game-task-actor burning-bush-inda-2)) + "burning-bush-inda-2" + ) + ((= v1-0 (game-task-actor unused-slot-30)) + "unused-slot-30" + ) + ((= v1-0 (game-task-actor burning-bush-inda-3)) + "burning-bush-inda-3" + ) + ((= v1-0 (game-task-actor burning-bush-slumc-1)) + "burning-bush-slumc-1" + ) + ((= v1-0 (game-task-actor samos-genb)) + "samos-genb" + ) + ((= v1-0 (game-task-actor burning-bush-dese-4)) + "burning-bush-dese-4" + ) + ((= v1-0 (game-task-actor burning-bush-desh)) + "burning-bush-desh" + ) + ((= v1-0 (game-task-actor samos-talkbox)) + "samos-talkbox" + ) + ((= v1-0 (game-task-actor burning-bush-farmb)) + "burning-bush-farmb" + ) + ((= v1-0 (game-task-actor gun-gungame)) + "gun-gungame" + ) + ((= v1-0 (game-task-actor burning-bush-wasa-4)) + "burning-bush-wasa-4" + ) + ((= v1-0 (game-task-actor unused-slot-12)) + "unused-slot-12" + ) + ((= v1-0 (game-task-actor onin-freehq)) + "onin-freehq" + ) + ((= v1-0 (game-task-actor burning-bush-desa-3)) + "burning-bush-desa-3" + ) + ((= v1-0 (game-task-actor burning-bush-port-6)) + "burning-bush-port-6" + ) + ((= v1-0 (game-task-actor unused-slot-11)) + "unused-slot-11" + ) + ((= v1-0 (game-task-actor unused-slot-31)) + "unused-slot-31" + ) + ((= v1-0 (game-task-actor burning-bush-wasa-3)) + "burning-bush-wasa-3" + ) + ((= v1-0 (game-task-actor veger-cave)) + "veger-cave" + ) + ((= v1-0 (game-task-actor burning-bush-port-1)) + "burning-bush-port-1" + ) + ((= v1-0 (game-task-actor keira-genb)) + "keira-genb" + ) + ((= v1-0 (game-task-actor burning-bush-dese-3)) + "burning-bush-dese-3" + ) + ((= v1-0 (game-task-actor burning-bush-gena-2)) + "burning-bush-gena-2" + ) + ((= v1-0 (game-task-actor burning-bush-genc)) + "burning-bush-genc" + ) + ((= v1-0 (game-task-actor burning-bush-desd-2)) + "burning-bush-desd-2" + ) + ((= v1-0 (game-task-actor burning-bush-desa)) + "burning-bush-desa" + ) + ((= v1-0 (game-task-actor burning-bush-port)) + "burning-bush-port" + ) + ((= v1-0 (game-task-actor burning-bush-inda)) + "burning-bush-inda" + ) + ((= v1-0 (game-task-actor burning-bush-stadium)) + "burning-bush-stadium" + ) + ((= v1-0 (game-task-actor damus-waspal)) + "damus-waspal" + ) + ((= v1-0 (game-task-actor burning-bush-port-7)) + "burning-bush-port-7" + ) + ((= v1-0 (game-task-actor burning-bush-wasb-4)) + "burning-bush-wasb-4" + ) + ((= v1-0 (game-task-actor keira-garage)) + "keira-garage" + ) + ((= v1-0 (game-task-actor torn-hiptable)) + "torn-hiptable" + ) + ((= v1-0 (game-task-actor torn-hiphog)) + "torn-hiphog" + ) + ((= v1-0 (game-task-actor kleever-wasdoors)) + "kleever-wasdoors" + ) + ((= v1-0 (game-task-actor unused-slot-14)) + "unused-slot-14" + ) + ((= v1-0 (game-task-actor unused-slot-13)) + "unused-slot-13" + ) + ((= v1-0 (game-task-actor burning-bush-dese)) + "burning-bush-dese" + ) + ((= v1-0 (game-task-actor seem-leaper)) + "seem-leaper" + ) + ((= v1-0 (game-task-actor burning-bush-pal)) + "burning-bush-pal" + ) + ((= v1-0 (game-task-actor kleever-wascityb)) + "kleever-wascityb" + ) + ((= v1-0 (game-task-actor burning-bush-desd-4)) + "burning-bush-desd-4" + ) + ((= v1-0 (game-task-actor burning-bush-sluma-3)) + "burning-bush-sluma-3" + ) + ((= v1-0 (game-task-actor burning-bush-sluma-2)) + "burning-bush-sluma-2" + ) + ((= v1-0 (game-task-actor burning-bush-gena)) + "burning-bush-gena" + ) + ((= v1-0 (game-task-actor burning-bush-sluma)) + "burning-bush-sluma" + ) + (else + "*unknown*" + ) + ) + ) + (v1-1 (-> this action)) + ) + (t9-0 + a0-1 + a1-0 + a2-1 + (cond + ((= v1-1 (game-task-action idle)) + "idle" + ) + ((= v1-1 (game-task-action play)) + "play" + ) + ((= v1-1 (game-task-action show)) + "show" + ) + ((= v1-1 (game-task-action talk)) + "talk" + ) + ((= v1-1 (game-task-action hide)) + "hide" + ) + ((= v1-1 (game-task-action say)) + "say" + ) + ((= v1-1 (game-task-action trade)) + "trade" + ) + ((= v1-1 (game-task-action menu)) + "menu" + ) + (else + "*unknown*" + ) + ) + (-> this scene) + this + ) + ) + this + ) + +(defmethod new game-task-control ((allocation symbol) (type-to-make type) (arg0 game-task-actor)) + (let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> v0-0 actor) arg0) + v0-0 + ) + ) + +(defmethod get-current-task-event ((this game-task-control)) + (let ((gp-0 (new 'static 'game-task-event :scene #f))) + (let ((s4-0 #f)) + (when (!= (-> this counter) (-> *game-info* task-counter)) + (set! (-> this counter) (-> *game-info* task-counter)) + (set! (-> this current-node) (game-task-node none)) + (set! (-> this current-event) #f) + (set! s4-0 #t) + (let ((s2-0 (-> *game-info* sub-task-list))) + (dotimes (s3-0 (-> s2-0 length)) + (when (nonzero? s3-0) + (let ((s1-0 (-> s2-0 s3-0))) + (when (and (task-node-open? (the-as game-task-node s3-0)) + (-> s1-0 when-open) + (begin + (countdown (v1-12 (-> s1-0 when-open length)) + (when (= (-> this actor) (-> s1-0 when-open v1-12 actor)) + (set! (-> this current-event) (-> s1-0 when-open v1-12)) + (set! (-> this current-node) (the-as game-task-node s3-0)) + #t + (goto cfg-18) + ) + ) + #f + ) + ) + ) + ) + ) + ) + ) + ) + (label cfg-18) + (cond + ((= (-> this current-node) (game-task-node none)) + (set! (-> gp-0 actor) (-> this actor)) + ) + ((begin (set! gp-0 (-> this current-event)) (not (logtest? (-> gp-0 flags) (game-task-flags gatflag-00)))) + ) + (else + (set! (-> gp-0 action) (the-as game-task-action (-> gp-0 tex))) + ) + ) + (if s4-0 + (logior! (-> gp-0 flags) (game-task-flags gatflag-01)) + (logclear! (-> gp-0 flags) (game-task-flags gatflag-01)) + ) + ) + gp-0 + ) + ) + +(deftype resetter (process) + ((params resetter-params :inline) + (message resetter-message :overlay-at (-> params message)) + (flags resetter-flag :overlay-at (-> params flags)) + (reset-delay uint32 :overlay-at (-> params reset-delay)) + (task game-task :overlay-at (-> params task)) + (text-message text-id :overlay-at (-> params text-message)) + (retry resetter-spec :inline :overlay-at (-> params retry)) + (retry-continue continue-point :overlay-at (-> params retry continue)) + (retry-node game-task-node :overlay-at (-> params retry node)) + (retry-reset-mode symbol :overlay-at (-> params retry reset-mode)) + (fail resetter-spec :inline :overlay-at (-> params fail)) + (fail-continue continue-point :overlay-at (-> params fail continue)) + (fail-node game-task-node :overlay-at (-> params fail node)) + (fail-reset-mode symbol :overlay-at (-> params fail reset-mode)) + (resetter-id text-id :offset 176) + (grabbed-player? symbol :offset 180) + (grabbed-time time-frame) + (dead-player? symbol) + (retry? symbol) + (message-id text-id) + (stinger uint32) + (start-time time-frame) + ) + (:state-methods + idle + resetting + ) + (:methods + (resetter-method-16 (_type_) none) + ) + ) + + +(defmethod run-logic? ((this resetter)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; WARN: Return type mismatch float vs none. +(defmethod resetter-method-16 ((this resetter)) + (when (and (not (logtest? (-> this params flags) (resetter-flag no-message))) + (= (get-status *gui-control* (the-as sound-id (-> this message-id))) (gui-status active)) + ) + (let ((gp-0 + (new 'stack 'font-context *font-default-matrix* 70 20 0.0 (font-color orange) (font-flags shadow kerning)) + ) + ) + (set! (-> gp-0 origin x) 120.0) + (let ((v1-7 gp-0)) + (set! (-> v1-7 scale) 0.7) + ) + (let ((v1-8 gp-0)) + (set! (-> v1-8 width) (the float 300)) + ) + (let ((v1-9 gp-0)) + (set! (-> v1-9 height) (the float 35)) + ) + (set! (-> gp-0 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((s4-0 (if (logtest? (-> this params flags) (resetter-flag text-message)) + (the-as int (-> this params text-message)) + 138 + ) + ) + ) + (when (nonzero? s4-0) + (let ((s3-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (the-as text-id s4-0) #f) 1) + (s3-0 *temp-string* gp-0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + (when (= (-> this params message) (resetter-message mission-fail-or-retry)) + (let ((v1-17 gp-0)) + (set! (-> v1-17 height) (the float 95)) + ) + (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-0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (let ((v1-19 gp-0)) + (set! (-> v1-19 height) (the float 155)) + ) + (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-0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + (none) + ) + +(defstate idle (resetter) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('reset) + (cond + ((-> self grabbed-player?) + (persist-with-delay *setting-control* 'fail (seconds 10) 'bg-a 'abs 1.0 0) + (go-virtual resetting) + ) + (else + (logior! (-> self params flags) (resetter-flag auto-reset)) + (set! (-> self params reset-delay) (the-as uint 0)) + #t + ) + ) + ) + (('query) + (case (-> block param 0) + (('reset) + (-> self grabbed-player?) + ) + ) + ) + ) + ) + :exit (behavior () + (update-rates! (-> *display* bg-clock) 1.0) + (update-rates! (-> *display* entity-clock) 1.0) + (update-rates! (-> *display* target-clock) 1.0) + (update-rates! (-> *display* camera-clock) 1.0) + ) + :code (behavior () + (if (and *target* (focus-test? *target* dead)) + (set! (-> self dead-player?) #t) + ) + (cond + ((or (= (-> self params message) (resetter-message mission-fail)) + (= (-> self params message) (resetter-message mission-retry)) + (logtest? (-> self params flags) (resetter-flag no-grab)) + ) + (while (begin + (if (and *target* (focus-test? *target* grabbed)) + (process-release? *target*) + ) + (if (logtest? (-> self params flags) (resetter-flag no-draw-target)) + (send-event *target* 'draw #f) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 2) + (set! (-> a1-1 message) 'attack-invinc) + (set! (-> a1-1 param 0) (the-as uint #f)) + (set! (-> a1-1 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) (mode 'bot)) + ) + ) + ) + (not (or (send-event-function *target* a1-1) (and *target* (focus-test? *target* dead)))) + ) + ) + (suspend) + ) + (hide-hud 'hud-health) + ) + ((= (-> self params message) (resetter-message mission-fail-or-retry)) + (while (not (process-grab? *target* 'dead)) + (suspend) + ) + ) + ) + (set! (-> self grabbed-player?) #t) + (set! (-> self grabbed-time) (-> *display* real-clock frame-counter)) + (kill-current-talker '() '() 'exit) + (when (and (not (-> self dead-player?)) (not (logtest? (-> self params flags) (resetter-flag no-slow-down)))) + (while (< (- (-> *display* real-clock frame-counter) (-> self grabbed-time)) (seconds 1.5)) + (let ((f30-0 + (lerp-scale 0.0 1.0 (the float (- (-> *display* real-clock frame-counter) (-> self grabbed-time))) 0.0 450.0) + ) + ) + (set-filter-color! + (lerp-scale 1.0 1.25 f30-0 0.0 1.0) + (lerp-scale 1.0 0.875 f30-0 0.0 1.0) + (lerp-scale 1.0 0.25 f30-0 0.0 1.0) + ) + (update-rates! (-> *display* bg-clock) (- 1.0 f30-0)) + (update-rates! (-> *display* entity-clock) (- 1.0 f30-0)) + (update-rates! (-> *display* target-clock) (- 1.0 f30-0)) + (update-rates! (-> *display* camera-clock) (- 1.0 f30-0)) + ) + (resetter-method-16 self) + (suspend) + ) + (+! (-> self clock ref-count) -1) + (+! (-> *display* real-clock ref-count) 1) + (set! (-> self clock) (-> *display* real-clock)) + (logclear! (-> self mask) (process-mask freeze)) + (set-master-mode 'freeze) + (set-setting! 'sfx-volume 'abs 0.0 0) + (set-setting! 'ambient-volume 'abs 0.0 0) + ) + (case (-> self params message) + (((resetter-message mission-fail) (resetter-message mission-retry)) + (until #f + (when (or (and (logtest? (-> self params flags) (resetter-flag auto-reset)) + (>= (- (-> *display* real-clock frame-counter) (-> self grabbed-time)) + (the-as time-frame (-> self params reset-delay)) + ) + ) + (or (cpad-pressed? 0 confirm) + (and (kiosk?) + (>= (- (-> *display* real-clock frame-counter) (-> self start-time)) (seconds 60)) + (>= (- (-> *display* real-clock frame-counter) (-> *cpad-list* cpads 0 real-change-time)) (seconds 60)) + ) + ) + ) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (if (= (-> self params message) (resetter-message mission-retry)) + (set! (-> self retry?) #t) + ) + (persist-with-delay *setting-control* 'fail (seconds 10) 'bg-a 'abs 1.0 0) + (go-virtual resetting) + ) + (resetter-method-16 self) + (suspend) + ) + #f + ) + (((resetter-message mission-fail-or-retry)) + (until #f + (when (cpad-pressed? 0 confirm) + (sound-play "mission-retry") + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (set! (-> self retry?) #t) + (cond + ((not *target*) + ) + ((focus-test? *target* grabbed) + (while (not (process-release? *target*)) + (suspend) + ) + ) + ) + (suspend) + (persist-with-delay *setting-control* 'fail (seconds 10) 'bg-a 'abs 1.0 0) + (go-virtual resetting) + ) + (let ((v1-147 (when (cpad-pressed? 0 triangle) + (sound-play "mission-quit") + #t + ) + ) + ) + (when (or v1-147 + (and (kiosk?) + (>= (- (-> *display* real-clock frame-counter) (-> self start-time)) (seconds 60)) + (>= (- (-> *display* real-clock frame-counter) (-> *cpad-list* cpads 0 real-change-time)) (seconds 60)) + ) + ) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) + (set! (-> self retry?) #f) + (cond + ((not *target*) + ) + ((focus-test? *target* grabbed) + (while (not (process-release? *target*)) + (suspend) + ) + ) + ) + (suspend) + (go-virtual resetting) + ) + ) + (resetter-method-16 self) + (suspend) + ) + #f + ) + ) + ) + ) + +(defmethod deactivate ((this resetter)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set-filter-color! 1.0 1.0 1.0) + (sound-group-continue (the-as sound-group #xffffffff)) + (update-rates! (-> *display* bg-clock) 1.0) + (update-rates! (-> *display* entity-clock) 1.0) + (update-rates! (-> *display* target-clock) 1.0) + (update-rates! (-> *display* camera-clock) 1.0) + (call-parent-method this) + (none) + ) + +(defstate resetting (resetter) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('reset) + #t + ) + (('query) + (case (-> block param 0) + (('reset) + #t + ) + ) + ) + ) + ) + :exit (behavior () + (if (= *master-mode* 'freeze) + (set-master-mode 'game) + ) + (process-release? *target*) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (let ((f30-0 (lerp-scale 1.0 0.0 (the float (- (current-time) gp-0)) 0.0 300.0))) + (set-filter-color! + (lerp-scale 1.0 1.25 f30-0 0.0 1.0) + (lerp-scale 1.0 0.875 f30-0 0.0 1.0) + (lerp-scale 1.0 0.25 f30-0 0.0 1.0) + ) + ) + (suspend) + ) + ) + (let ((gp-1 (if (-> self retry?) + (-> self params retry) + (-> self params fail) + ) + ) + ) + (format 0 "---------> resetting with ~`resetter-spec`P~%" gp-1) + (let ((s5-1 (-> gp-1 execute))) + (if s5-1 + (script-eval (the-as pair s5-1)) + ) + ) + (cond + ((and *target* + (or (and (focus-test? *target* dead) #t) (and (not (-> gp-1 continue)) (focus-test? *target* grabbed))) + ) + (inc-death-count! *game-info*) + (if (-> gp-1 continue) + (set-continue! *game-info* (-> gp-1 continue) #t) + ) + (when (-> gp-1 reset-mode) + (task-node-reset (-> gp-1 reset-mode)) + (update-task-masks (-> gp-1 reset-mode)) + ) + (if (nonzero? (-> gp-1 node)) + (task-node-open! (-> gp-1 node) 'event) + ) + (if (and *target* (focus-test? *target* dead grabbed)) + (send-event *target* 'end-mode 'bot (if (-> self retry?) + (-> self params retry) + (-> self params fail) + ) + ) + ) + ) + (else + (initialize! *game-info* #f (the-as game-save #f) (the-as string #f) gp-1) + ) + ) + (cond + ((or (and *target* (focus-test? *target* dead)) (-> gp-1 continue)) + (persist-with-delay *setting-control* 'fail-sfx-volume (seconds 3) 'sfx-volume 'abs 0.0 0) + (persist-with-delay *setting-control* 'fail-dialog-volume (seconds 3) 'dialog-volume 'abs 0.0 0) + (persist-with-delay *setting-control* 'fail-music-volume (seconds 3) 'music-volume 'abs 0.0 0) + ) + (else + (set-action! + *gui-control* + (gui-action fade) + (the-as sound-id (-> self stinger)) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + ) + (persist-with-delay *setting-control* 'allow-continue (seconds 3) 'allow-continue #f 0.0 0) + (persist-with-delay *setting-control* 'speech-control (seconds 3) 'speech-control #f 0.0 0) + ) + ) + +(defbehavior resetter-init-by-other resetter ((arg0 resetter-params) (arg1 game-task-node-info)) + (stack-size-set! (-> self main-thread) 512) + (mem-copy! (the-as pointer (-> self params)) (the-as pointer arg0) 48) + (set! (-> self grabbed-player?) #f) + (set! (-> self dead-player?) #f) + (set! (-> self retry?) #f) + (set-setting! 'allow-continue #f 0.0 0) + (set-setting! 'gun-eject #f 0.0 0) + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (set! (-> self start-time) (-> *display* real-clock frame-counter)) + (set! (-> *game-info* mode) 'play) + (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 citizen) + (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 jak-mode) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (when (not (or (logtest? (-> arg0 flags) (resetter-flag no-audio)) + (and arg1 (logtest? (-> arg0 flags) (resetter-flag no-audio-first)) (zero? (-> arg1 death-count))) + ) + ) + (if (and arg1 (logtest? (-> arg0 flags) (resetter-flag no-audio-first))) + (set-action! + *gui-control* + (gui-action stop) + (the-as sound-id 1) + (gui-channel alert) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (set! (-> self stinger) + (the-as uint (add-process *gui-control* *target* (gui-channel task) (gui-action play) "lose1" -99.0 0)) + ) + (sound-params-set! *gui-control* (the-as sound-id (-> self stinger)) #f -1 -1 -1 0.75) + ) + (set-setting! 'music-volume 'abs 0.0 0) + (if (logtest? (-> arg0 flags) (resetter-flag stop-sfx)) + (set-setting! 'sfx-volume 'abs 0.0 0) + ) + (set-setting! 'speech-control #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) + (set-setting! 'allow-pause #f 0.0 0) + (+! (-> self clock ref-count) -1) + (+! (-> *display* base-clock ref-count) 1) + (set! (-> self clock) (-> *display* base-clock)) + (apply-settings *setting-control*) + (if (or (not (logtest? (-> self params flags) (resetter-flag text-message))) + (nonzero? (-> self params text-message)) + (= (-> self params message) (resetter-message mission-fail-or-retry)) + ) + (set! (-> self message-id) + (the-as text-id (add-process *gui-control* self (gui-channel supertitle) (gui-action play) "fail" 81920.0 0)) + ) + ) + (set! (-> self resetter-id) + (the-as text-id (add-process *gui-control* self (gui-channel resetter) (gui-action play) "fail" -99.0 0)) + ) + (go-virtual idle) + ) + +(defmethod spawn-resetter! ((this resetter-control) (arg0 resetter-params) (arg1 game-task-node-info)) + (when (not (handle->process (-> this process))) + (let ((v1-4 (process-spawn resetter arg0 arg1 :name "resetter" :to *entity-pool*))) + (when v1-4 + (set! (-> this process) (process->handle (-> v1-4 0))) + #t + ) + ) + ) + ) + +(defmethod do-reset ((this resetter-control)) + (send-event (handle->process (-> this process)) 'reset) + ) + +(defmethod check-reset ((this resetter-control)) + (send-event (handle->process (-> this process)) 'query 'reset) + ) + +(defmethod get-resetter ((this resetter-control)) + (handle->process (-> this process)) + ) + +(defmethod task-manager-method-25 ((this task-manager)) + 0 + (none) + ) + +(defmethod task-manager-method-26 ((this task-manager)) + 0 + (none) + ) + +(defmethod task-manager-method-27 ((this task-manager)) + 0 + (none) + ) + +(defmethod task-manager-method-28 ((this task-manager)) + 0 + (none) + ) + +;; WARN: Return type mismatch structure vs resetter-params. +;; WARN: disable def twice: 65. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: disable def twice: 127. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: disable def twice: 189. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: disable def twice: 251. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod on-fail ((this task-manager) (arg0 symbol)) + (local-vars (v0-0 structure)) + (let ((gp-0 (-> *game-info* sub-task-list (-> this node-info manager final-node))) + (s5-0 (-> this node-info)) + (v1-5 arg0) + ) + (the-as + resetter-params + (cond + ((= v1-5 'death) + (let ((v1-7 (-> *setting-control* user-current death-info))) + (if v1-7 + (return (the-as resetter-params v1-7)) + ) + ) + (while (!= gp-0 s5-0) + (if (and (-> gp-0 reset) + (-> gp-0 reset death-info) + (or (logtest? (-> gp-0 flags) (game-task-node-flag closed)) (game-task-node-info-method-12 gp-0)) + ) + (return (the-as resetter-params (-> gp-0 reset death-info))) + ) + (set! gp-0 (-> *game-info* sub-task-list (-> gp-0 parent-node 0))) + ) + (when (and (-> gp-0 reset) + (-> gp-0 reset death-info) + (or (logtest? (-> gp-0 flags) (game-task-node-flag closed)) (game-task-node-info-method-12 gp-0)) + ) + (return (the-as resetter-params (-> gp-0 reset death-info))) + v0-0 + ) + ) + ((= v1-5 'fail) + (let ((v1-35 (-> *setting-control* user-current fail-info))) + (if v1-35 + (return (the-as resetter-params v1-35)) + ) + ) + (while (!= gp-0 s5-0) + (if (and (-> gp-0 reset) + (-> gp-0 reset fail-info) + (or (logtest? (-> gp-0 flags) (game-task-node-flag closed)) (game-task-node-info-method-12 gp-0)) + ) + (return (the-as resetter-params (-> gp-0 reset fail-info))) + ) + (set! gp-0 (-> *game-info* sub-task-list (-> gp-0 parent-node 0))) + ) + (when (and (-> gp-0 reset) + (-> gp-0 reset fail-info) + (or (logtest? (-> gp-0 flags) (game-task-node-flag closed)) (game-task-node-info-method-12 gp-0)) + ) + (return (the-as resetter-params (-> gp-0 reset fail-info))) + v0-0 + ) + ) + ((= v1-5 'restart) + (let ((v1-63 (-> *setting-control* user-current restart-info))) + (if v1-63 + (return (the-as resetter-params v1-63)) + ) + ) + (while (!= gp-0 s5-0) + (if (and (-> gp-0 reset) + (-> gp-0 reset restart-info) + (or (logtest? (-> gp-0 flags) (game-task-node-flag closed)) (game-task-node-info-method-12 gp-0)) + ) + (return (the-as resetter-params (-> gp-0 reset restart-info))) + ) + (set! gp-0 (-> *game-info* sub-task-list (-> gp-0 parent-node 0))) + ) + (when (and (-> gp-0 reset) + (-> gp-0 reset restart-info) + (or (logtest? (-> gp-0 flags) (game-task-node-flag closed)) (game-task-node-info-method-12 gp-0)) + ) + (return (the-as resetter-params (-> gp-0 reset restart-info))) + v0-0 + ) + ) + ((= v1-5 'quit) + (let ((v1-91 (-> *setting-control* user-current quit-info))) + (if v1-91 + (return (the-as resetter-params v1-91)) + ) + ) + (while (!= gp-0 s5-0) + (if (and (-> gp-0 reset) + (-> gp-0 reset quit-info) + (or (logtest? (-> gp-0 flags) (game-task-node-flag closed)) (game-task-node-info-method-12 gp-0)) + ) + (return (the-as resetter-params (-> gp-0 reset quit-info))) + ) + (set! gp-0 (-> *game-info* sub-task-list (-> gp-0 parent-node 0))) + ) + (when (and (-> gp-0 reset) + (-> gp-0 reset quit-info) + (or (logtest? (-> gp-0 flags) (game-task-node-flag closed)) (game-task-node-info-method-12 gp-0)) + ) + (return (the-as resetter-params (-> gp-0 reset quit-info))) + v0-0 + ) + ) + (else + (the-as structure #f) + ) + ) + ) + ) + ) + +(defbehavior task-manager-init-by-other task-manager ((arg0 game-task-node-info) (arg1 symbol)) + (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) + (add-setting! 'task arg0 0.0 0) + (add-setting! 'task-manager (process->ppointer self) 0.0 0) + (set-time! (-> self intro-time)) + (set! (-> self fail-on-death?) (if (and (-> self node-info reset) (-> self node-info reset death-info)) + #t + #f + ) + ) + (when arg1 + (let* ((v1-19 (level-get *level* arg1)) + (a1-6 (if (and (nonzero? (-> v1-19 entity)) (> (-> v1-19 entity length) 0)) + (-> v1-19 entity data 0 entity) + ) + ) + ) + (if a1-6 + (process-entity-set! self a1-6) + ) + ) + ) + (init! self) + (go-virtual wait) + ) + +(defmethod kill-all-children ((this task-manager)) + (while (-> this child) + (deactivate (ppointer->process (-> this child))) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs object. +(defmethod go-fail ((this task-manager)) + (if *debug-segment* + (format #t "task failed: ran out of time~%") + ) + (go (method-of-object this fail) (on-fail this 'fail)) + 0 + ) + +(defmethod hud-timer-handler ((this task-manager)) + (when (nonzero? (-> this start-time)) + (let ((v1-3 (handle->process (-> this hud-timer)))) + (if (and *target* (not v1-3)) + (set! (-> this hud-timer) + (ppointer->handle (process-spawn hud-timer :init hud-init-by-other :name "hud-timer" :to *target*)) + ) + ) + ) + (let ((v1-13 (- (-> this time-limit) (- (current-time) (-> this start-time))))) + (let ((a0-15 *game-info*)) + (set! (-> a0-15 timer) v1-13) + (set! (-> a0-15 timer-flash) (< v1-13 (seconds 10))) + ) + (when (< v1-13 0) + (send-event (handle->process (-> this hud-timer)) 'hide-and-die) + (go-fail this) + ) + ) + ) + 0 + (none) + ) + +(defmethod init! ((this task-manager)) + (set! (-> this info) (-> this node-info manager)) + (countdown (v1-2 4) + (set! (-> this hud v1-2) (the-as handle #f)) + ) + (set! (-> this arrow) (the-as handle #f)) + (set! (-> this player-vehicle) (the-as handle #f)) + (set! (-> this fail-now) #f) + (set! (-> this restart-now) #f) + (set! (-> this allow-fail) #t) + 0 + (none) + ) + +(defmethod set-time-limit ((this task-manager)) + (when (logtest? (-> this info mask) (task-manager-mask time-limit)) + (set-time! (-> this start-time)) + (set! (-> this time-limit) (the-as time-frame (-> this info time-limit))) + ) + 0 + (none) + ) + +(defmethod deactivate ((this task-manager)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (with-pp + (let ((s5-0 pp)) + (set! pp this) + (task-manager-method-25 this) + (set! pp s5-0) + ) + (countdown (s5-1 4) + (send-event (handle->process (-> this hud s5-1)) 'hide-and-die) + ) + ((method-of-type process deactivate) this) + (none) + ) + ) + +(defbehavior task-manager-event-handler task-manager ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (taskman-event-handler self arg0 arg1 arg2 arg3) + ) + +(defmethod taskman-event-handler ((this task-manager) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-2 object)) + (case arg2 + (('fail) + (let ((s4-0 (on-fail this 'fail)) + (v1-2 (if (>= arg1 1) + (-> arg3 param 0) + ) + ) + ) + (if (and (not (and (-> this next-state) (let ((a0-7 (-> this next-state name))) + (or (= a0-7 'complete) (= a0-7 'resolution) (= a0-7 'fail) (= a0-7 'retry)) + ) + ) + ) + (or (not v1-2) s4-0) + (not (scene-select?)) + ) + (go (method-of-object this fail) s4-0) + ) + ) + ) + (('restart) + (let ((a0-12 (on-fail this 'restart))) + (if (and (not (and (-> this next-state) (let ((v1-11 (-> this next-state name))) + (or (= v1-11 'complete) (= v1-11 'fail) (= v1-11 'restart)) + ) + ) + ) + a0-12 + ) + (go (method-of-object this restart) (the-as symbol a0-12)) + ) + ) + ) + (('restart-immediately) + (let ((a0-16 (on-fail this 'restart))) + (when (and (or (not (and (-> this next-state) (let ((v1-19 (-> this next-state name))) + (or (= v1-19 'complete) (= v1-19 'resolution) (= v1-19 'fail) (= v1-19 'restart)) + ) + ) + ) + (not (-> this allow-fail)) + ) + a0-16 + ) + (set! (-> this restart-now) #t) + (go (method-of-object this restart) (the-as symbol a0-16)) + ) + ) + ) + (('quit) + (let ((a0-20 (on-fail this 'quit))) + (if (and (not (and (-> this next-state) (let ((v1-30 (-> this next-state name))) + (or (= v1-30 'complete) (= v1-30 'resolution) (= v1-30 'fail) (= v1-30 'restart)) + ) + ) + ) + a0-20 + ) + (go (method-of-object this restart) (the-as symbol a0-20)) + ) + ) + ) + (('complete) + (if (or (not (and (-> this next-state) (let ((v1-37 (-> this next-state name))) + (or (= v1-37 'complete) (= v1-37 'resolution) (= v1-37 'fail) (= v1-37 'restart)) + ) + ) + ) + (not (-> this allow-fail)) + ) + (go (method-of-object this complete)) + ) + ) + (('wait) + (go (method-of-object this wait)) + ) + (('active) + (go (method-of-object this active)) + ) + (('fail-on-death) + (set! v0-2 (-> arg3 param 0)) + (set! (-> this fail-on-death?) (the-as symbol v0-2)) + v0-2 + ) + (('target) + (case (-> arg3 param 0) + (('die) + (let ((a0-37 (on-fail this 'death))) + (when a0-37 + (if (not (and (-> this next-state) + (let ((v1-51 (-> this next-state name))) + (or (= v1-51 'wait) (= v1-51 'complete) (= v1-51 'resolution) (= v1-51 'fail) (= v1-51 'restart)) + ) + ) + ) + (go (method-of-object this fail) a0-37) + ) + (if (not (and (-> this next-state) (let ((v1-59 (-> this next-state name))) + (or (= v1-59 'wait) (= v1-59 'complete) (= v1-59 'resolution)) + ) + ) + ) + 'wait + ) + ) + ) + ) + ) + ) + (('fail-continue) + (let ((v1-61 (on-fail this 'fail))) + (when v1-61 + (case (-> v1-61 message) + (((resetter-message mission-retry)) + (-> v1-61 retry) + ) + (else + (-> v1-61 fail) + ) + ) + ) + ) + ) + (('fail-immediately) + (when (or (not (and (-> this next-state) (let ((v1-65 (-> this next-state name))) + (or (= v1-65 'complete) (= v1-65 'resolution) (= v1-65 'fail) (= v1-65 'restart)) + ) + ) + ) + (not (-> this allow-fail)) + ) + (set! (-> this allow-fail) #t) + (set! (-> this fail-now) #t) + (go (method-of-object this fail) (on-fail this 'fail)) + ) + ) + (('allow-fail) + (set! v0-2 (-> arg3 param 0)) + (set! (-> this allow-fail) (the-as symbol v0-2)) + v0-2 + ) + ) + ) + +(defmethod ready? ((this task-manager)) + (and (or (not (logtest? (game-task-node-flag city-wait) (-> this node-info flags))) + (let ((a0-4 (level-get-target-inside *level*))) + (cond + ((not (and a0-4 (logtest? (-> a0-4 info level-flags) (level-flags lf0)))) + (set-time! (-> this intro-time)) + #f + ) + (else + #t + ) + ) + ) + ) + (or (zero? (-> this info intro-delay)) + (time-elapsed? (-> this intro-time) (the-as time-frame (-> this info intro-delay))) + ) + (and *target* (not (logtest? (focus-status dead teleporting) (-> *target* focus-status)))) + (not (-> *setting-control* user-current talking)) + ) + ) + +(defstate wait (task-manager) + :virtual #t + :event task-manager-event-handler + :trans (behavior () + (if (or (and (nonzero? (-> self info final-node)) (task-node-closed? (-> self info final-node))) + (and (not (logtest? (-> self node-info flags) (game-task-node-flag closed))) + (not (game-task-node-info-method-12 (-> self node-info))) + ) + ) + (deactivate self) + ) + ) + :code (behavior () + (local-vars (v1-18 symbol)) + (while (or (not *target*) (not *spawn-actors*)) + (suspend) + ) + (when (or (logtest? (game-task-node-flag intro-wait city-wait) (-> self node-info flags)) + (nonzero? (-> self info intro-delay)) + ) + (while (not (ready? self)) + (suspend) + ) + (let ((a0-5 (-> self info intro-scene))) + (when a0-5 + (let ((gp-1 (talker-spawn-func + (string->talker-speech (the-as string a0-5)) + *entity-pool* + (target-pos 0) + (the-as region #f) + ) + ) + ) + (get-status *gui-control* gp-1) + (until v1-18 + (suspend) + (let ((v1-17 (get-status *gui-control* gp-1))) + (set! v1-18 (or (= v1-17 (gui-status stop)) (= v1-17 (gui-status unknown)))) + ) + ) + ) + ) + ) + (if (logtest? (-> self node-info flags) (game-task-node-flag intro-wait)) + (open! (-> self node-info) 'event) + ) + ) + (set-time-limit self) + (if (logtest? (-> self info mask) (task-manager-mask auto-complete)) + (go-virtual complete) + ) + (go-virtual active) + ) + ) + +(defstate active (task-manager) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + ((-> (method-of-object self wait) trans)) + (if (logtest? (-> self info mask) (task-manager-mask time-limit)) + (hud-timer-handler self) + ) + (if (and *debug-segment* (not *editable*)) + (format *stdebug* "task-manager ~A alive~%" (-> self node-info name)) + ) + (task-manager-method-26 self) + ) + :code sleep-code + ) + +(defstate complete (task-manager) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set-setting! 'allow-progress #f 0.0 0) + ) + :code (behavior () + (if (get-resetter *resetter-control*) + (sleep-code) + ) + (send-event (handle->process (-> self arrow)) 'die) + (countdown (gp-0 4) + (send-event (handle->process (-> self hud gp-0)) 'hide-and-die) + ) + (let ((gp-1 (-> self child))) + (while gp-1 + (send-event (ppointer->process gp-1) 'notify 'die) + (set! gp-1 (-> gp-1 0 brother)) + ) + ) + (when (not (logtest? (game-task-node-flag no-hud-wait) (-> self node-info flags))) + (let ((gp-2 (current-time))) + (label cfg-28) + (when (not (time-elapsed? gp-2 (seconds 5))) + (when (handle->process (-> self arrow)) + (suspend) + (goto cfg-28) + ) + (countdown (v1-42 4) + (when (handle->process (-> self hud v1-42)) + (suspend) + (goto cfg-28) + ) + ) + ) + ) + ) + (go-virtual resolution) + ) + ) + +(defstate resolution (task-manager) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (local-vars (v1-27 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) + (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-27 (or (handle->process (-> self arrow)) (begin + (countdown (v1-28 4) + (when (handle->process (-> self hud v1-28)) + (set! v1-27 #t) + (goto cfg-39) + ) + ) + #f + ) + ) + ) + (label cfg-39) + v1-27 + ) + (suspend) + ) + ) + ) + +(defstate fail (task-manager) + :virtual #t + :event task-manager-event-handler + :exit (behavior () + (disable *screen-filter*) + ) + :code (behavior ((arg0 resetter-params)) + (while (not (-> self allow-fail)) + (suspend) + ) + (send-event (handle->process (-> self arrow)) 'die) + (countdown (s5-0 4) + (send-event (handle->process (-> self hud s5-0)) 'hide-and-die) + ) + (task-manager-method-28 self) + (let ((s5-1 (-> self info on-fail))) + (if s5-1 + (script-eval s5-1) + ) + ) + (when arg0 + (spawn-resetter! *resetter-control* arg0 (-> self node-info)) + (while (get-resetter *resetter-control*) + (suspend) + ) + ) + ) + ) + +(defstate restart (task-manager) + :virtual #t + :event task-manager-event-handler + :exit (-> (method-of-type task-manager fail) exit) + :code (behavior ((arg0 symbol)) + (send-event (handle->process (-> self arrow)) 'die) + (countdown (s5-0 4) + (send-event (handle->process (-> self hud s5-0)) 'hide-and-die) + ) + (task-manager-method-28 self) + (let ((s5-1 (-> self info on-fail))) + (if s5-1 + (script-eval s5-1) + ) + ) + (cond + (arg0 + (spawn-resetter! *resetter-control* (the-as resetter-params arg0) (-> self node-info)) + (while (get-resetter *resetter-control*) + (suspend) + ) + ) + (else + (initialize! *game-info* 'try (the-as game-save #f) (the-as string #f) (the-as resetter-spec #f)) + ) + ) + ) + ) diff --git a/goal_src/jak3/engine/geometry/path-h.gc b/goal_src/jak3/engine/geometry/path-h.gc index beb7f58084..e1f8705c17 100644 --- a/goal_src/jak3/engine/geometry/path-h.gc +++ b/goal_src/jak3/engine/geometry/path-h.gc @@ -32,29 +32,29 @@ These path-controls are typically allocated on a process heap." ) (:methods (new (symbol type process symbol float entity symbol) _type_) - (path-control-method-9 (_type_) none) - (path-control-method-10 () none) - (path-control-method-11 () none) - (path-control-method-12 () none) - (path-control-method-13 () none) + (debug-draw (_type_) none) + (get-point-in-path! (_type_ vector float symbol) vector) + (get-random-point (_type_ vector) vector) + (path-control-method-12 (_type_ vector float float) vector) + (displacement-between-two-points-normalized! (_type_ vector float) vector) (get-point-at-percent-along-path! (_type_ vector float symbol) vector) - (path-control-method-15 () none) + (path-control-method-15 (_type_ vector float float) vector) (displacement-between-points-at-percent-normalized! (_type_ vector float) vector) (get-num-segments (_type_) float) - (path-control-method-18 () none) + (total-distance (_type_) float) (get-num-verts (_type_) int) (segement-duration->path-duration (_type_ float) float) (path-duration->segment-duration (_type_ float) float) - (path-control-method-22 () none) - (path-control-method-23 () none) - (path-control-method-24 () none) + (path-control-method-22 (_type_ vector) float) + (path-control-method-23 (_type_ vector) float) + (path-control-method-24 (_type_ vector) float) (path-control-method-25 (_type_ vector) float) - (path-control-method-26 () none) - (path-control-method-27 () none) - (path-control-method-28 () none) - (path-control-method-29 () none) + (path-control-method-26 (_type_ float float) float) + (path-control-method-27 (_type_ vector) vector) + (path-control-method-28 (_type_ vector vector symbol) float) + (path-control-method-29 (_type_ vector int float) float) (should-display-marks? (_type_) symbol) - (path-control-method-31 () none) + (displacement-between-two-points! (_type_ vector float float) vector) ) ) diff --git a/goal_src/jak3/engine/geometry/path.gc b/goal_src/jak3/engine/geometry/path.gc index b61956a364..a62afb8a15 100644 --- a/goal_src/jak3/engine/geometry/path.gc +++ b/goal_src/jak3/engine/geometry/path.gc @@ -7,3 +7,570 @@ ;; DECOMP BEGINS +(defmethod debug-draw ((this path-control)) + (cond + ((logtest? (-> this flags) (path-control-flag not-found)) + (when (and (type? (-> this process) process-drawable) *display-entity-errors* (not *display-capture-mode*)) + (let ((s5-0 add-debug-text-3d) + (s4-0 #t) + (s3-0 577) + ) + (format (clear *temp-string*) "path data error in ~S" (-> this process name)) + (s5-0 + s4-0 + (the-as bucket-id s3-0) + *temp-string* + (-> this process root trans) + (font-color red) + (the-as vector2h #f) + ) + ) + ) + ) + ((let ((a0-5 this)) + (and *display-path-marks* (logtest? (-> a0-5 flags) (path-control-flag display))) + ) + (dotimes (s5-1 (-> this curve num-cverts)) + (let ((s4-1 (-> this curve cverts s5-1))) + (if (and (logtest? (-> this flags) (path-control-flag draw-line)) (< s5-1 (+ (-> this curve num-cverts) -1))) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + s4-1 + (-> this curve cverts (+ s5-1 1)) + (new 'static 'rgba :r #xff :g #x80 :a #x80) + #f + (the-as rgba -1) + ) + ) + (if (logtest? (-> this flags) (path-control-flag draw-point)) + (add-debug-x #t (bucket-id debug-no-zbuf1) s4-1 (new 'static 'rgba :r #xff :a #x80)) + ) + (when (logtest? (-> this flags) (path-control-flag draw-text)) + (let ((s3-1 add-debug-text-3d) + (s2-1 #t) + (s1-0 577) + ) + (format (clear *temp-string*) "~D" s5-1) + (s3-1 s2-1 (the-as bucket-id s1-0) *temp-string* s4-1 (font-color orange) (the-as vector2h #f)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod total-distance ((this path-control)) + (let ((f30-0 (-> this curve length))) + (when (= f30-0 0.0) + (dotimes (s5-0 (+ (-> this curve num-cverts) -1)) + (+! f30-0 (vector-vector-distance (-> this curve cverts s5-0) (-> this curve cverts (+ s5-0 1)))) + ) + (set! (-> this curve length) f30-0) + ) + f30-0 + ) + ) + +(defmethod total-distance ((this curve-control)) + (let ((f0-0 (-> this curve length))) + (when (= f0-0 0.0) + (set! f0-0 (curve-length (-> this curve))) + (set! (-> this curve length) f0-0) + ) + f0-0 + ) + ) + +(defmethod path-control-method-26 ((this path-control) (arg0 float) (arg1 float)) + (local-vars (v1-9 float)) + (let ((f30-0 (* arg0 (the float (+ (-> this curve num-cverts) -1)))) + (f28-0 (if (< 0.0 arg1) + 1.0 + -1.0 + ) + ) + (f26-0 (fabs arg1)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (get-point-in-path! this s5-0 f30-0 'interp) + 0.0 + (while (< 0.0 f26-0) + (let ((f24-0 (the float (the int (+ f28-0 f30-0))))) + (set! f30-0 (cond + ((or (< f24-0 0.0) (>= f24-0 (the float (-> this curve num-cverts)))) + (set! v1-9 f24-0) + (goto cfg-19) + f30-0 + ) + (else + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> this curve cverts (the int (the float (the int f24-0))) quad)) + 0.0 + (let ((f0-16 (vector-vector-distance s5-0 s4-0))) + (cond + ((< f0-16 f26-0) + (set! f26-0 (- f26-0 f0-16)) + (set! (-> s5-0 quad) (-> s4-0 quad)) + f24-0 + ) + (else + (let ((f0-17 (/ f26-0 f0-16))) + (set! v1-9 (lerp f30-0 f24-0 f0-17)) + ) + (goto cfg-19) + f30-0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (set! v1-9 (the-as float #f)) + (label cfg-19) + (let* ((f0-21 (/ v1-9 (the float (+ (-> this curve num-cverts) -1)))) + (f0-22 (fmin 1.0 f0-21)) + ) + (fmax 0.0 f0-22) + ) + ) + +(defmethod get-point-in-path! ((this path-control) (arg0 vector) (arg1 float) (arg2 symbol)) + (let ((a1-1 (-> this curve num-cverts)) + (f0-3 (the float (the int arg1))) + ) + (cond + ((< arg1 0.0) + (set! (-> arg0 quad) (-> this curve cverts 0 quad)) + ) + ((>= f0-3 (the float (+ a1-1 -1))) + (set! (-> arg0 quad) (-> this curve cverts (+ a1-1 -1) quad)) + ) + ((or (= arg2 'exact) (= f0-3 arg1)) + (set! (-> arg0 quad) (-> this curve cverts (the int f0-3) quad)) + ) + (else + (vector-lerp! + arg0 + (-> this curve cverts (the int f0-3)) + (-> this curve cverts (the int (+ 1.0 f0-3))) + (- arg1 f0-3) + ) + ) + ) + ) + arg0 + ) + +(defmethod get-random-point ((this path-control) (arg0 vector)) + (with-pp + (cond + ((> (-> this curve num-cverts) 0) + (let ((a0-2 (rand-vu-int-count (-> this curve num-cverts)))) + (set! (-> arg0 quad) (-> this curve cverts a0-2 quad)) + ) + ) + (else + (format #t "WARNING: method get-random-point called on a path-control object with no vertices.~%") + (if pp + (format #t "current process is ~A~%" (-> pp name)) + ) + (set! (-> arg0 quad) (-> *null-vector* quad)) + ) + ) + arg0 + ) + ) + +(defmethod get-point-at-percent-along-path! ((this path-control) (arg0 vector) (arg1 float) (arg2 symbol)) + (get-point-in-path! this arg0 (* arg1 (the float (+ (-> this curve num-cverts) -1))) arg2) + ) + +(defmethod get-point-at-percent-along-path! ((this curve-control) (arg0 vector) (arg1 float) (arg2 symbol)) + (if (not (logtest? (-> this flags) (path-control-flag not-found))) + (curve-evaluate! + arg0 + arg1 + (-> this curve cverts) + (-> this curve num-cverts) + (-> this curve knots) + (-> this curve num-knots) + ) + ) + arg0 + ) + +(defmethod get-point-in-path! ((this curve-control) (arg0 vector) (arg1 float) (arg2 symbol)) + (if (not (logtest? (-> this flags) (path-control-flag not-found))) + (curve-evaluate! + arg0 + (/ arg1 (the float (+ (-> this curve num-cverts) -1))) + (-> this curve cverts) + (-> this curve num-cverts) + (-> this curve knots) + (-> this curve num-knots) + ) + ) + arg0 + ) + +(defmethod displacement-between-two-points! ((this path-control) (arg0 vector) (arg1 float) (arg2 float)) + (let ((v1-0 (-> this curve num-cverts)) + (f0-3 (the float (the int arg1))) + ) + (cond + ((or (logtest? (-> this flags) (path-control-flag not-found)) (< v1-0 2) (< arg1 0.0)) + (vector-reset! arg0) + ) + (else + (let ((f0-4 (fmin f0-3 (the float (+ v1-0 -2))))) + (vector-! arg0 (-> this curve cverts (the int (+ 1.0 f0-4))) (-> this curve cverts (the int f0-4))) + ) + (vector-float*! arg0 arg0 arg2) + ) + ) + ) + arg0 + ) + +(defmethod path-control-method-12 ((this path-control) (arg0 vector) (arg1 float) (arg2 float)) + (displacement-between-two-points! this arg0 arg1 arg2) + ) + +(defmethod path-control-method-15 ((this path-control) (arg0 vector) (arg1 float) (arg2 float)) + (path-control-method-12 + this + arg0 + (* arg1 (the float (+ (-> this curve num-cverts) -1))) + (* arg2 (the float (+ (-> this curve num-cverts) -1))) + ) + ) + +(defmethod displacement-between-two-points-normalized! ((this path-control) (arg0 vector) (arg1 float)) + (displacement-between-two-points! this arg0 arg1 1.0) + (vector-normalize! arg0 1.0) + ) + +(defmethod displacement-between-points-at-percent-normalized! ((this path-control) (arg0 vector) (arg1 float)) + (displacement-between-two-points-normalized! this arg0 (* arg1 (the float (+ (-> this curve num-cverts) -1)))) + ) + +(defmethod displacement-between-two-points! ((this curve-control) (arg0 vector) (arg1 float) (arg2 float)) + (when (not (logtest? (-> this flags) (path-control-flag not-found))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (curve-evaluate! + arg0 + arg1 + (-> this curve cverts) + (-> this curve num-cverts) + (-> this curve knots) + (-> this curve num-knots) + ) + (cond + ((< arg1 (- 1.0 arg2)) + (curve-evaluate! + s4-0 + (+ arg1 arg2) + (-> this curve cverts) + (-> this curve num-cverts) + (-> this curve knots) + (-> this curve num-knots) + ) + (vector-! arg0 s4-0 arg0) + ) + (else + (curve-evaluate! + s4-0 + (- arg1 arg2) + (-> this curve cverts) + (-> this curve num-cverts) + (-> this curve knots) + (-> this curve num-knots) + ) + (vector-! arg0 arg0 s4-0) + ) + ) + ) + ) + ) + +(defmethod path-control-method-26 ((this curve-control) (arg0 float) (arg1 float)) + (let* ((f30-0 0.0001) + (v1-2 (displacement-between-two-points! this (new 'stack-no-clear 'vector) arg0 f30-0)) + ) + 0.0 + 0.0 + (let* ((f0-3 (/ f30-0 (vector-length v1-2))) + (v1-4 (+ arg0 (* f0-3 arg1))) + ) + (fmax 0.0 (fmin 1.0 v1-4)) + ) + ) + ) + +(defmethod path-control-method-12 ((this curve-control) (arg0 vector) (arg1 float) (arg2 float)) + (displacement-between-two-points! this arg0 (/ arg1 (the float (+ (-> this curve num-cverts) -1))) arg2) + ) + +(defmethod path-control-method-15 ((this curve-control) (arg0 vector) (arg1 float) (arg2 float)) + (displacement-between-two-points! this arg0 arg1 arg2) + ) + +(defmethod displacement-between-points-at-percent-normalized! ((this curve-control) (arg0 vector) (arg1 float)) + (displacement-between-two-points! this arg0 arg1 0.01) + (vector-normalize! arg0 1.0) + ) + +(defmethod displacement-between-two-points-normalized! ((this curve-control) (arg0 vector) (arg1 float)) + (displacement-between-points-at-percent-normalized! + this + arg0 + (/ arg1 (the float (+ (-> this curve num-cverts) -1))) + ) + ) + +(defmethod path-control-method-28 ((this path-control) (arg0 vector) (arg1 vector) (arg2 symbol)) + (local-vars + (sv-96 vector) + (sv-100 vector) + (sv-104 vector) + (sv-108 vector) + (sv-112 number) + (sv-116 vector) + (sv-120 symbol) + (sv-124 float) + ) + (set! sv-96 (new 'stack-no-clear 'vector)) + (set! sv-100 (new 'stack-no-clear 'vector)) + (set! sv-104 (new 'stack-no-clear 'vector)) + (set! sv-108 (new 'stack-no-clear 'vector)) + (set! sv-112 -1.0) + (set! sv-116 (new 'stack-no-clear 'vector)) + (set! sv-120 (the-as symbol #f)) + (set! sv-124 (the-as float -1.0)) + (get-point-in-path! this sv-96 0.0 'interp) + ;; og:preserve-this + (set! sv-112 (the-as float #x7f800000)) + (when (not arg2) + (set! sv-124 (path-control-method-22 this arg0)) + (get-point-in-path! this sv-108 sv-124 'interp) + (set! sv-112 (vector-vector-distance-squared sv-108 arg0)) + ) + (let ((s3-1 (new 'stack-no-clear 'vector))) + (vector+! s3-1 arg0 arg1) + (dotimes (s2-0 (+ (-> this curve num-cverts) -1)) + (get-point-in-path! this sv-100 (the float (+ s2-0 1)) 'interp) + (vector-! sv-104 sv-100 sv-96) + (let ((s0-0 #f)) + 0.0 + (let ((s1-0 (new 'stack-no-clear 'vector))) + (set! (-> s1-0 x) -1.0) + (set! (-> s1-0 y) -1.0) + (line-line-find-intersection-xz arg0 arg1 sv-96 sv-104 s1-0) + (when (>= (-> s1-0 x) 0.0) + (if (and (< 0.0 (-> s1-0 y)) (>= 1.0 (-> s1-0 y))) + (set! s0-0 #t) + ) + (vector+float*! sv-116 arg0 arg1 (-> s1-0 x)) + (cond + ((and s0-0 (not sv-120)) + (set! (-> sv-108 quad) (-> sv-116 quad)) + (set! sv-112 (vector-vector-distance-squared sv-116 arg0)) + (set! sv-124 (lerp (the float s2-0) (the float (+ s2-0 1)) (-> s1-0 y))) + (set! sv-120 #t) + ) + ((and s0-0 sv-120) + (let ((f0-22 (vector-vector-distance-squared sv-116 arg0))) + (when (< f0-22 (the-as float sv-112)) + (set! (-> sv-108 quad) (-> sv-116 quad)) + (set! sv-112 f0-22) + (set! sv-124 (lerp (the float s2-0) (the float (+ s2-0 1)) (-> s1-0 y))) + ) + ) + ) + ((not (or s0-0 sv-120)) + (let ((s0-1 (new 'stack-no-clear 'vector)) + (a3-5 (new 'stack-no-clear 'vector)) + ) + (set! (-> s1-0 y) (fmax 0.0 (fmin 1.0 (-> s1-0 y)))) + (vector+float*! s0-1 sv-96 sv-104 (-> s1-0 y)) + (let* ((f0-32 (vector-segment-distance-point! s0-1 arg0 s3-1 a3-5)) + (f0-33 (* f0-32 f0-32)) + ) + (when (< f0-33 (the-as float sv-112)) + (set! (-> sv-108 quad) (-> s0-1 quad)) + (set! sv-112 f0-33) + (set! sv-124 (lerp (the float s2-0) (the float (+ s2-0 1)) (-> s1-0 y))) + ) + ) + ) + ) + ) + ) + ) + ) + (set! (-> sv-96 quad) (-> sv-100 quad)) + ) + ) + (set! sv-124 (/ sv-124 (the float (+ (-> this curve num-cverts) -1)))) + sv-124 + ) + +(defmethod path-control-method-29 ((this path-control) (arg0 vector) (arg1 int) (arg2 float)) + (let ((s2-0 (get-point-in-path! this (new 'stack-no-clear 'vector) (the float arg1) 'interp)) + (a2-3 (get-point-in-path! this (new 'stack-no-clear 'vector) (the float (+ arg1 1)) 'interp)) + ) + (vector-segment-distance-point! arg0 s2-0 a2-3 (the-as vector arg2)) + ) + ) + +(defmethod path-control-method-22 ((this path-control) (arg0 vector)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (f30-0 4096000000.0) + (f28-0 0.0) + ) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> arg0 quad)) + (set! (-> s3-0 y) 0.0) + (get-point-in-path! this s4-0 0.0 'interp) + (set! (-> s4-0 y) 0.0) + (dotimes (s1-0 (+ (-> this curve num-cverts) -1)) + (set! (-> s5-0 quad) (-> s4-0 quad)) + (get-point-in-path! this s4-0 (the float (+ s1-0 1)) 'interp) + (set! (-> s4-0 y) 0.0) + (let ((f0-5 (vector-segment-distance-point! s3-0 s5-0 s4-0 s2-0))) + (when (< f0-5 f30-0) + (set! f30-0 f0-5) + (set! f28-0 + (+ (/ (vector-vector-xz-distance s2-0 s5-0) (vector-vector-xz-distance s4-0 s5-0)) (the float s1-0)) + ) + ) + ) + ) + ) + f28-0 + ) + ) + +(defmethod path-control-method-24 ((this path-control) (arg0 vector)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (f30-0 4096000000.0) + (f28-0 0.0) + ) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> arg0 quad)) + (get-point-in-path! this s4-0 0.0 'interp) + (dotimes (s1-0 (+ (-> this curve num-cverts) -1)) + (set! (-> s5-0 quad) (-> s4-0 quad)) + (get-point-in-path! this s4-0 (the float (+ s1-0 1)) 'interp) + (let ((f0-2 (vector-segment-distance-point! s3-0 s5-0 s4-0 s2-0))) + (when (< f0-2 f30-0) + (set! f30-0 f0-2) + (set! f28-0 (+ (/ (vector-vector-distance s2-0 s5-0) (vector-vector-distance s4-0 s5-0)) (the float s1-0))) + ) + ) + ) + ) + f28-0 + ) + ) + +(defmethod path-control-method-25 ((this path-control) (arg0 vector)) + (/ (path-control-method-24 this arg0) (the float (+ (-> this curve num-cverts) -1))) + ) + +(defmethod path-control-method-23 ((this path-control) (arg0 vector)) + (/ (path-control-method-22 this arg0) (the float (+ (-> this curve num-cverts) -1))) + ) + +(defmethod debug-draw ((this curve-control)) + (cond + ((logtest? (-> this flags) (path-control-flag not-found)) + (when (and (type? (-> this process) process-drawable) *display-entity-errors* (not *display-capture-mode*)) + (let ((s5-0 add-debug-text-3d) + (s4-0 #t) + (s3-0 577) + ) + (format (clear *temp-string*) "curve data error in ~S" (-> this process name)) + (s5-0 + s4-0 + (the-as bucket-id s3-0) + *temp-string* + (-> this process root trans) + (font-color red) + (the-as vector2h #f) + ) + ) + ) + ) + ((let ((a0-5 this)) + (and *display-path-marks* (logtest? (-> a0-5 flags) (path-control-flag display))) + ) + (if (and (logtest? (-> this flags) (path-control-flag draw-line)) (> (-> this curve num-cverts) 0)) + (add-debug-curve2 + #t + (bucket-id debug-no-zbuf1) + (-> this curve) + (new 'static 'rgba :r #xff :g #x80 :a #x80) + #f + ) + ) + (dotimes (s5-1 (-> this curve num-cverts)) + (let ((s4-1 (-> this curve cverts s5-1))) + (if (logtest? (-> this flags) (path-control-flag draw-point)) + (add-debug-x #t (bucket-id debug-no-zbuf1) s4-1 (new 'static 'rgba :r #xff :a #x80)) + ) + (when (logtest? (-> this flags) (path-control-flag draw-text)) + (let ((s3-1 add-debug-text-3d) + (s2-1 #t) + (s1-0 577) + ) + (format (clear *temp-string*) "~D" s5-1) + (s3-1 s2-1 (the-as bucket-id s1-0) *temp-string* s4-1 (font-color orange) (the-as vector2h #f)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod path-control-method-27 ((this path-control) (arg0 vector)) + (let ((s4-0 (-> this curve num-cverts))) + (let ((f30-0 (/ 1.0 (the float s4-0)))) + (set-vector! arg0 0.0 0.0 0.0 0.0) + (dotimes (s3-0 s4-0) + (vector+float*! + arg0 + arg0 + (get-point-in-path! this (new 'stack-no-clear 'vector) (the float s3-0) 'interp) + f30-0 + ) + ) + ) + (dotimes (s3-1 s4-0) + (let ((f0-10 + (vector-vector-distance arg0 (get-point-in-path! this (new 'stack-no-clear 'vector) (the float s3-1) 'interp)) + ) + ) + (if (< (-> arg0 w) f0-10) + (set! (-> arg0 w) (+ 4096.0 f0-10)) + ) + ) + ) + ) + arg0 + ) diff --git a/goal_src/jak3/engine/gfx/background/background.gc b/goal_src/jak3/engine/gfx/background/background.gc index 36fa6dbaaf..0172bb5671 100644 --- a/goal_src/jak3/engine/gfx/background/background.gc +++ b/goal_src/jak3/engine/gfx/background/background.gc @@ -5,5 +5,675 @@ ;; name in dgo: background ;; dgos: GAME +(defun add-pc-tfrag3-data ((dma-buf dma-buffer) (lev level)) + "Add PC-port specific tfrag data" + (let ((packet (the-as dma-packet (-> dma-buf base)))) + (set! (-> packet dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc 24)) + (set! (-> packet vif0) (new 'static 'vif-tag)) + (set! (-> packet vif1) (new 'static 'vif-tag :cmd (vif-cmd pc-port))) + (set! (-> dma-buf base) (the pointer (&+ packet 16))) + ) + + ;; first 4 quadwords are planes, then itimes + (let ((data-ptr (the-as (pointer uint128) (-> dma-buf base)))) + ;; the "use-camera-other" flag is set to "move" entire levels, + ;; like the rotating city below in the throne room. + (cond + ((logtest? (-> lev info level-flags) (level-flags use-camera-other)) + (set! (-> data-ptr 0) (-> *math-camera* plane-other 0 quad)) + (set! (-> data-ptr 1) (-> *math-camera* plane-other 1 quad)) + (set! (-> data-ptr 2) (-> *math-camera* plane-other 2 quad)) + (set! (-> data-ptr 3) (-> *math-camera* plane-other 3 quad)) + (set! (-> data-ptr 4) (-> lev mood-context itimes 0 quad)) + (set! (-> data-ptr 5) (-> lev mood-context itimes 1 quad)) + (set! (-> data-ptr 6) (-> lev mood-context itimes 2 quad)) + (set! (-> data-ptr 7) (-> lev mood-context itimes 3 quad)) + (set! (-> data-ptr 8) (-> *math-camera* camera-temp-other vector 0 quad)) + (set! (-> data-ptr 9) (-> *math-camera* camera-temp-other vector 1 quad)) + (set! (-> data-ptr 10) (-> *math-camera* camera-temp-other vector 2 quad)) + (set! (-> data-ptr 11) (-> *math-camera* camera-temp-other vector 3 quad)) + (set! (-> data-ptr 12) (-> *math-camera* hvdf-off quad)) + (let ((vec (-> (the (inline-array vector) data-ptr) 13))) + (set! (-> vec x) (-> *math-camera* pfog0)) + (set! (-> vec y) (-> *math-camera* fog-min)) + (set! (-> vec z) (-> *math-camera* fog-max)) + ) + (set! (-> data-ptr 14) (-> *math-camera* trans-other quad)) + + (set! (-> data-ptr 15) (-> *math-camera* camera-rot-other vector 0 quad)) + (set! (-> data-ptr 16) (-> *math-camera* camera-rot-other vector 1 quad)) + (set! (-> data-ptr 17) (-> *math-camera* camera-rot-other vector 2 quad)) + (set! (-> data-ptr 18) (-> *math-camera* camera-rot-other vector 3 quad)) + + (set! (-> data-ptr 19) (-> *math-camera* perspective vector 0 quad)) + (set! (-> data-ptr 20) (-> *math-camera* perspective vector 1 quad)) + (set! (-> data-ptr 21) (-> *math-camera* perspective vector 2 quad)) + (set! (-> data-ptr 22) (-> *math-camera* perspective vector 3 quad)) + + ) + (else + (set! (-> data-ptr 0) (-> *math-camera* plane 0 quad)) + (set! (-> data-ptr 1) (-> *math-camera* plane 1 quad)) + (set! (-> data-ptr 2) (-> *math-camera* plane 2 quad)) + (set! (-> data-ptr 3) (-> *math-camera* plane 3 quad)) + (set! (-> data-ptr 4) (-> lev mood-context itimes 0 quad)) + (set! (-> data-ptr 5) (-> lev mood-context itimes 1 quad)) + (set! (-> data-ptr 6) (-> lev mood-context itimes 2 quad)) + (set! (-> data-ptr 7) (-> lev mood-context itimes 3 quad)) + (set! (-> data-ptr 8) (-> *math-camera* camera-temp vector 0 quad)) + (set! (-> data-ptr 9) (-> *math-camera* camera-temp vector 1 quad)) + (set! (-> data-ptr 10) (-> *math-camera* camera-temp vector 2 quad)) + (set! (-> data-ptr 11) (-> *math-camera* camera-temp vector 3 quad)) + (set! (-> data-ptr 12) (-> *math-camera* hvdf-off quad)) + (let ((vec (-> (the (inline-array vector) data-ptr) 13))) + (set! (-> vec x) (-> *math-camera* pfog0)) + (set! (-> vec y) (-> *math-camera* fog-min)) + (set! (-> vec z) (-> *math-camera* fog-max)) + ) + (set! (-> data-ptr 14) (-> *math-camera* trans quad)) + + (set! (-> data-ptr 15) (-> *math-camera* camera-rot vector 0 quad)) + (set! (-> data-ptr 16) (-> *math-camera* camera-rot vector 1 quad)) + (set! (-> data-ptr 17) (-> *math-camera* camera-rot vector 2 quad)) + (set! (-> data-ptr 18) (-> *math-camera* camera-rot vector 3 quad)) + + (set! (-> data-ptr 19) (-> *math-camera* perspective vector 0 quad)) + (set! (-> data-ptr 20) (-> *math-camera* perspective vector 1 quad)) + (set! (-> data-ptr 21) (-> *math-camera* perspective vector 2 quad)) + (set! (-> data-ptr 22) (-> *math-camera* perspective vector 3 quad)) + ) + ) + + (charp<-string (the (pointer uint8) (&-> data-ptr 23)) (symbol->string (-> lev nickname))) + ) + (&+! (-> dma-buf base) (* 16 24)) + ) + ;; DECOMP BEGINS +(define *background-work* (new 'global 'background-work)) + +(define background-vu0-block (new 'static 'vu-function :length 59 :qlength 30)) + +(defun background-upload-vu0 () + "Upload VU0 functions for background. (believed unused?)" + ;; (upload-vu0-program background-vu0-block (&-> *background-work* wait-to-vu0)) + 0 + (none) + ) + +(defun init-background () + "Reset lists of trees to draw for background rendering." + (dotimes (v1-0 8) + (set! (-> *background-work* tfrag-trees v1-0) #f) + (set! (-> *background-work* tfrag-trans-trees v1-0) #f) + (set! (-> *background-work* tfrag-water-trees v1-0) #f) + ) + (set! (-> *background-work* tfrag-tree-count) 0) + (set! (-> *background-work* tfrag-trans-tree-count) 0) + (set! (-> *background-work* tfrag-water-tree-count) 0) + (set! (-> *background-work* shrub-tree-count) 0) + (set! (-> *background-work* tie-tree-count) 0) + (set! (-> *background-work* wait-to-vu0) (the-as uint 0)) + 0 + (none) + ) + +(defun upload-vis-bits ((arg0 level) (arg1 level) (arg2 bsp-header)) + "Upload vis data to the scratchpad." + (let ((v1-2 (/ (+ (-> arg2 visible-list-length) 15) 16))) + (let ((a0-1 (-> arg0 vis-bits)) + (a1-1 (the-as (pointer uinteger) (-> arg2 all-visible-list))) + ;; (a2-2 (the-as (pointer uint128) (+ #x3800 #x70000000))) + (a2-2 (scratchpad-ptr uint128 :offset #x3800)) + ) + (b! (not *artist-flip-visible*) cfg-5 :delay (nop!)) + (nop!) + (nop!) + (label cfg-2) + (let ((a3-2 (-> (the-as (pointer uint128) a0-1)))) + (&+! a0-1 16) + (let ((t0-0 (-> (the-as (pointer uint128) a1-1) 0))) + (set! a1-1 (&-> (the-as (pointer uint8) a1-1) 16)) + (nop!) + (nop!) + (let ((a3-3 (logxor a3-2 (the-as uint t0-0)))) + (+! v1-2 -1) + (set! (-> a2-2 0) a3-3) + ) + ) + ) + (set! a2-2 (&-> a2-2 1)) + (b! (> v1-2 0) cfg-2 :delay (nop!)) + 0 + (b! #t cfg-8 :delay (nop!)) + (nop!) + (label cfg-5) + (nop!) + (nop!) + (label cfg-6) + (let ((a1-2 (-> (the-as (pointer uint128) a0-1)))) + (&+! a0-1 16) + (nop!) + (+! v1-2 -1) + (set! (-> a2-2 0) a1-2) + ) + (set! a2-2 (&-> a2-2 1)) + ) + (b! (> v1-2 0) cfg-6 :delay (nop!)) + ) + 0 + (label cfg-8) + (none) + ) + +;; ERROR: function was not converted to expressions. Cannot decompile. +(defun set-background-regs! ((arg0 level)) + ;; not needed. + (none) + ) + +;; WARN: Return type mismatch plane vs none. +(defun set-tie-quard-planes! ((arg0 level)) + "Set up TIE work guard planes." + (cond + ((logtest? (-> arg0 info level-flags) (level-flags use-camera-other)) + (set! (-> *instance-tie-work* guard-plane 0 quad) (-> *math-camera* guard-plane-other 0 quad)) + (set! (-> *instance-tie-work* guard-plane 1 quad) (-> *math-camera* guard-plane-other 1 quad)) + (set! (-> *instance-tie-work* guard-plane 2 quad) (-> *math-camera* guard-plane-other 2 quad)) + (set! (-> *instance-tie-work* guard-plane 3 quad) (-> *math-camera* guard-plane-other 3 quad)) + ) + (else + (set! (-> *instance-tie-work* guard-plane 0 quad) (-> *math-camera* guard-plane 0 quad)) + (set! (-> *instance-tie-work* guard-plane 1 quad) (-> *math-camera* guard-plane 1 quad)) + (set! (-> *instance-tie-work* guard-plane 2 quad) (-> *math-camera* guard-plane 2 quad)) + (set! (-> *instance-tie-work* guard-plane 3 quad) (-> *math-camera* guard-plane 3 quad)) + ) + ) + (none) + ) + +;; WARN: Return type mismatch plane vs none. +(defun set-shrub-quard-planes! ((arg0 level)) + "Set shrub work guard planes." + (cond + ((logtest? (-> arg0 info level-flags) (level-flags use-camera-other)) + (set! (-> *instance-shrub-work* guard-plane 0 quad) (-> *math-camera* guard-plane-other 0 quad)) + (set! (-> *instance-shrub-work* guard-plane 1 quad) (-> *math-camera* guard-plane-other 1 quad)) + (set! (-> *instance-shrub-work* guard-plane 2 quad) (-> *math-camera* guard-plane-other 2 quad)) + (set! (-> *instance-shrub-work* guard-plane 3 quad) (-> *math-camera* guard-plane-other 3 quad)) + ) + (else + (set! (-> *instance-shrub-work* guard-plane 0 quad) (-> *math-camera* guard-plane 0 quad)) + (set! (-> *instance-shrub-work* guard-plane 1 quad) (-> *math-camera* guard-plane 1 quad)) + (set! (-> *instance-shrub-work* guard-plane 2 quad) (-> *math-camera* guard-plane 2 quad)) + (set! (-> *instance-shrub-work* guard-plane 3 quad) (-> *math-camera* guard-plane 3 quad)) + ) + ) + (none) + ) + +(defun set-subdivide-settings! ((arg0 level)) + "Set subdivide settings from the level." + (if *artist-use-menu-subdiv* + (update-subdivide-settings! *subdivide-settings* *math-camera* 11) + (update-subdivide-settings! *subdivide-settings* *math-camera* (-> arg0 index)) + ) + (none) + ) + +(defun add-pc-camera-data ((dma-buf dma-buffer)) + "Add PC-port specific camera data. used as fallback for collide mesh renderer. + Same as add-pc-trag3-data but level-specific data is left undefined." + (let ((packet (the-as dma-packet (-> dma-buf base)))) + (set! (-> packet dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc 24)) + (set! (-> packet vif0) (new 'static 'vif-tag)) + (set! (-> packet vif1) (new 'static 'vif-tag :cmd (vif-cmd pc-port))) + (set! (-> dma-buf base) (the pointer (&+ packet 16))) + ) + + ;; first 4 quadwords are planes, then itimes + (let ((data-ptr (the-as (pointer uint128) (-> dma-buf base)))) + ;; the "use-camera-other" flag is set to "move" entire levels, + ;; like the rotating city below in the throne room. + (set! (-> data-ptr 0) (-> *math-camera* plane 0 quad)) + (set! (-> data-ptr 1) (-> *math-camera* plane 1 quad)) + (set! (-> data-ptr 2) (-> *math-camera* plane 2 quad)) + (set! (-> data-ptr 3) (-> *math-camera* plane 3 quad)) + ;; (set! (-> data-ptr 4) (-> lev mood-context itimes 0 quad)) + ;; (set! (-> data-ptr 5) (-> lev mood-context itimes 1 quad)) + ;; (set! (-> data-ptr 6) (-> lev mood-context itimes 2 quad)) + ;; (set! (-> data-ptr 7) (-> lev mood-context itimes 3 quad)) + (set! (-> data-ptr 8) (-> *math-camera* camera-temp vector 0 quad)) + (set! (-> data-ptr 9) (-> *math-camera* camera-temp vector 1 quad)) + (set! (-> data-ptr 10) (-> *math-camera* camera-temp vector 2 quad)) + (set! (-> data-ptr 11) (-> *math-camera* camera-temp vector 3 quad)) + (set! (-> data-ptr 12) (-> *math-camera* hvdf-off quad)) + (let ((vec (-> (the (inline-array vector) data-ptr) 13))) + (set! (-> vec x) (-> *math-camera* pfog0)) + (set! (-> vec y) (-> *math-camera* fog-min)) + (set! (-> vec z) (-> *math-camera* fog-max)) + ) + (set! (-> data-ptr 14) (-> *math-camera* trans quad)) + + (set! (-> data-ptr 15) (-> *math-camera* camera-rot vector 0 quad)) + (set! (-> data-ptr 16) (-> *math-camera* camera-rot vector 1 quad)) + (set! (-> data-ptr 17) (-> *math-camera* camera-rot vector 2 quad)) + (set! (-> data-ptr 18) (-> *math-camera* camera-rot vector 3 quad)) + + (set! (-> data-ptr 19) (-> *math-camera* perspective vector 0 quad)) + (set! (-> data-ptr 20) (-> *math-camera* perspective vector 1 quad)) + (set! (-> data-ptr 21) (-> *math-camera* perspective vector 2 quad)) + (set! (-> data-ptr 22) (-> *math-camera* perspective vector 3 quad)) + + (charp<-string (the (pointer uint8) (&-> data-ptr 23)) (symbol->string #f)) + ) + (&+! (-> dma-buf base) (* 16 24)) + ) + +(defun add-pc-port-background-data ((dma-buf dma-buffer)) + "PC Port added" + ;; loop over levels + (dotimes (lev-idx (-> *level* length)) + (let ((lev (-> *level* draw-level lev-idx)) + (dma-start (-> dma-buf base))) + (cond + ((and lev (= (-> lev status) 'active)) + ;; the level is active. + (let ((packet (the-as dma-packet (-> dma-buf base)))) + (set! (-> packet dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc 128)) + (set! (-> packet vif0) (the-as vif-tag *fog-color*)) + (set! (-> packet vif1) (new 'static 'vif-tag :cmd (vif-cmd pc-port))) + (set! (-> dma-buf base) (the pointer (&+ packet 16))) + ) + (quad-copy! (-> dma-buf base) (-> lev vis-bits) 128) + (&+! (-> dma-buf base) (* 16 128)) + ) + (else + (let ((packet (the-as dma-packet (-> dma-buf base)))) + (set! (-> packet dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc 1)) + (set! (-> packet vif0) (the-as vif-tag *fog-color*)) + (set! (-> packet vif1) (new 'static 'vif-tag :cmd (vif-cmd pc-port))) + (set! (-> dma-buf base) (the pointer (&+ packet 16))) + ) + (set! (-> (the (pointer uint128) (-> dma-buf base))) (the uint128 0)) + (&+! (-> dma-buf base) (* 16 1)) + ) + ) + + + (let ((a3-3 (-> dma-buf base))) + (let ((v1-38 (the-as object (-> dma-buf base)))) + (set! (-> (the-as dma-packet v1-38) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-38) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-38) vif1) (new 'static 'vif-tag)) + (set! (-> dma-buf base) (&+ (the-as pointer v1-38) 16)) + ) + (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket2) + dma-start + (the-as (pointer dma-tag) a3-3) + ) + ) + ) + ) + (let* ((dma-buff (-> *display* frames (-> *display* on-screen) global-buf)) + (dma-start (-> dma-buff base))) + (add-pc-camera-data dma-buff) + (let ((a3-22 (-> dma-buff base))) + (let ((v1-57 (the-as object (-> dma-buff base)))) + (set! (-> (the-as dma-packet v1-57) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-57) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-57) vif1) (new 'static 'vif-tag)) + (set! (-> dma-buff base) (&+ (the-as pointer v1-57) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket2) + dma-start + (the-as (pointer dma-tag) a3-22) + ) + ) + ) + (the-as pointer 0) + ) + +;; WARN: Function finish-background has a return type of none, but the expression builder found a return statement. +(defun finish-background () + "Run all renderers for background data added." + + (#when PC_PORT + (add-pc-port-background-data + (-> *display* frames (-> *display* on-screen) global-buf) + ) + ) + + (if (get-menu-mode *blit-displays-work*) + (return #f) + ) + (when (not (paused?)) + (flush-cache 0) + (dotimes (gp-0 (-> *level* length)) + (let ((v1-8 (-> *level* level gp-0))) + (when (= (-> v1-8 status) 'active) + (-> v1-8 bsp wind-array) + ;; (if (nonzero? (-> v1-8 bsp wind-array-length)) + ;; (level-update-wind *wind-work*) + ;; ) + ) + ) + ) + ) + (background-upload-vu0) + (dotimes (v1-14 (-> *level* length)) + (let ((a0-12 (-> *level* level v1-14))) + (when (= (-> a0-12 status) 'active) + (let ((a0-13 (-> a0-12 bsp))) + (when (nonzero? (-> a0-13 tfrag-masks)) + (dotimes (a1-7 (-> a0-13 tfrag-masks length)) + (set! (-> a0-13 tfrag-closest a1-7) 4095996000.0) + ) + ) + (when (nonzero? (-> a0-13 shrub-masks)) + (dotimes (a1-12 (-> a0-13 shrub-masks length)) + (set! (-> a0-13 shrub-closest a1-12) 4095996000.0) + ) + ) + (when (nonzero? (-> a0-13 alpha-masks)) + (dotimes (a1-17 (-> a0-13 alpha-masks length)) + (set! (-> a0-13 alpha-closest a1-17) 4095996000.0) + ) + ) + (when (nonzero? (-> a0-13 water-masks)) + (dotimes (a1-22 (-> a0-13 water-masks length)) + (set! (-> a0-13 water-closest a1-22) 4095996000.0) + ) + ) + ) + ) + ) + ) + (when (nonzero? (-> *background-work* shrub-tree-count)) + (with-profiler 'shrubbery *profile-shrubbery-color* + (dotimes (gp-2 (-> *background-work* shrub-tree-count)) + (set! *draw-index* (-> *background-work* shrub-levels gp-2 draw-index)) + (flush-cache 0) + (let ((s5-1 (-> *background-work* shrub-trees gp-2)) + (s4-1 (-> *background-work* shrub-levels gp-2)) + ) + ; (if (nonzero? (-> s5-1 colors-added)) + ; (time-of-day-interp-colors + ; (-> *instance-shrub-work* colors) + ; (the-as uint (-> s5-1 colors-added)) + ; (-> s4-1 mood-context) + ; ) + ; ) + (set-background-regs! s4-1) + (set-shrub-quard-planes! s4-1) + (draw-drawable-tree-instance-shrub s5-1 s4-1) + ) + ) + ) + ) + (let ((gp-4 (the-as level #f))) + (when (or (nonzero? (-> *background-work* tfrag-tree-count)) + (nonzero? (-> *background-work* tfrag-trans-tree-count)) + (nonzero? (-> *background-work* tfrag-water-tree-count)) + ) + (let ((s5-5 (max + (max (-> *background-work* tfrag-tree-count) (-> *background-work* tfrag-trans-tree-count)) + (-> *background-work* tfrag-water-tree-count) + ) + ) + (s4-3 (the-as time-of-day-palette #f)) + ) + (with-profiler 'tfrag *profile-tfrag-color* + (dotimes (s3-2 s5-5) + (let ((s2-1 (-> *background-work* tfrag-trees s3-2))) + (when s2-1 + (let ((s1-1 (-> *background-work* tfrag-levels s3-2))) + (let ((a2-23 (-> s1-1 bsp)) + (s0-1 (-> s2-1 time-of-day-pal)) + ) + (upload-vis-bits s1-1 gp-4 a2-23) + (set-subdivide-settings! s1-1) + (when (not (or (zero? s0-1) (= s4-3 s0-1))) + (flush-cache 0) + ;; (time-of-day-interp-colors-scratch (the-as (pointer rgba) (+ 6144 #x70000000)) s0-1 (-> s1-1 mood-context)) + (set! s4-3 s0-1) + ) + ) + (set! *draw-index* (-> s1-1 draw-index)) + (set! (-> *tfrag-work* min-dist z) 4095996000.0) + (set-background-regs! s1-1) + ) + (draw-drawable-tree-tfrag s2-1) + (set! (-> *level* draw-level *draw-index* closest-object 0) (-> *tfrag-work* min-dist z)) + ) + ) + (let ((s2-2 (-> *background-work* tfrag-trans-trees s3-2))) + (when s2-2 + (let ((s1-2 (-> *background-work* tfrag-trans-levels s3-2))) + (let ((a2-25 (-> s1-2 bsp)) + (s0-2 (-> s2-2 time-of-day-pal)) + ) + (upload-vis-bits s1-2 gp-4 a2-25) + (set-subdivide-settings! s1-2) + (when (not (or (zero? s0-2) (= s4-3 s0-2))) + (flush-cache 0) + ;; (time-of-day-interp-colors-scratch (the-as (pointer rgba) (+ 6144 #x70000000)) s0-2 (-> s1-2 mood-context)) + (set! s4-3 s0-2) + ) + ) + (set! *draw-index* (-> s1-2 draw-index)) + (set! (-> *tfrag-work* min-dist z) 4095996000.0) + (set-background-regs! s1-2) + ) + (draw-drawable-tree-tfrag-trans s2-2) + (set! (-> *level* draw-level *draw-index* closest-object 3) (-> *tfrag-work* min-dist z)) + ) + ) + (let ((s2-3 (-> *background-work* tfrag-water-trees s3-2))) + (when s2-3 + (let ((s1-3 (-> *background-work* tfrag-water-levels s3-2))) + (let ((a2-27 (-> s1-3 bsp)) + (s0-3 (-> s2-3 time-of-day-pal)) + ) + (upload-vis-bits s1-3 gp-4 a2-27) + (set-subdivide-settings! s1-3) + (when (not (or (zero? s0-3) (= s4-3 s0-3))) + (flush-cache 0) + ;; (time-of-day-interp-colors-scratch (the-as (pointer rgba) (+ 6144 #x70000000)) s0-3 (-> s1-3 mood-context)) + (set! s4-3 s0-3) + ) + ) + (set! *draw-index* (-> s1-3 draw-index)) + (set! (-> *tfrag-work* min-dist z) 4095996000.0) + (set-background-regs! s1-3) + ) + (draw-drawable-tree-tfrag-water s2-3) + (set! (-> *level* draw-level *draw-index* closest-object 4) (-> *tfrag-work* min-dist z)) + ) + ) + ) + ) + ) + ) + (when (nonzero? (-> *background-work* tie-tree-count)) + (set! (-> *instance-tie-work* tod-env-color quad) (-> *time-of-day-context* current-env-color quad)) + (with-profiler 'tie *profile-tie-color* + (dotimes (s5-8 (-> *background-work* tie-tree-count)) + (let ((s4-6 (-> *background-work* tie-levels s5-8))) + (let ((a2-29 (-> s4-6 bsp))) + (when (!= s4-6 gp-4) + (set! (-> *instance-tie-work* min-dist x) 4095996000.0) + (upload-vis-bits s4-6 gp-4 a2-29) + (set-subdivide-settings! s4-6) + (set! gp-4 s4-6) + ) + ) + (set! *draw-index* (-> s4-6 draw-index)) + (set! (-> *prototype-tie-work* mood) (-> s4-6 mood-context)) + (set-background-regs! s4-6) + (set-tie-quard-planes! s4-6) + (tie-scissor-make-perspective-matrix + (-> *instance-tie-work* tie-scissor-perspective-matrix) + (if (logtest? (-> s4-6 info level-flags) (level-flags use-camera-other)) + (-> *math-camera* camera-temp-other) + (-> *math-camera* camera-temp) + ) + ) + (draw-drawable-tree-instance-tie (-> *background-work* tie-trees s5-8) s4-6) + ) + (set! (-> *background-work* tie-generic s5-8) (the-as basic (-> *prototype-tie-work* generic-next))) + (set! (-> *background-work* tie-generic-trans s5-8) + (the-as basic (-> *prototype-tie-work* generic-trans-next)) + ) + ) + ) + ) + ) + (let ((a0-116 (-> *display* frames (-> *display* on-screen) global-buf))) + (when (< (-> a0-116 real-buffer-end) (the-as int (-> a0-116 base))) + (break!) + 0 + ) + ) + (dotimes (gp-6 (-> *level* draw-level-count)) + (let ((s5-10 (-> *level* draw-level gp-6))) + (when (and s5-10 (= (-> s5-10 status) 'active)) + (when (and (nonzero? (-> s5-10 bsp hfrag-drawable)) (= (-> s5-10 display?) 'display)) + (with-profiler 'hfrag *profile-hfrag-color* + (set! *draw-index* (-> s5-10 draw-index)) + (let ((s4-9 (-> *display* frames (-> *display* on-screen) global-buf base))) + (draw (-> s5-10 bsp hfrag-drawable)) + (let ((v1-293 *dma-mem-usage*)) + (when (nonzero? v1-293) + (set! (-> v1-293 length) (max 44 (-> v1-293 length))) + (set! (-> v1-293 data 43 name) "hfragment") + (+! (-> v1-293 data 43 count) 1) + (+! (-> v1-293 data 43 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s4-9)) + ) + (set! (-> v1-293 data 43 total) (-> v1-293 data 43 used)) + ) + ) + ) + ) + ) + ) + ) + ) + (let ((a0-139 (-> *display* frames (-> *display* on-screen) global-buf))) + (when (< (-> a0-139 real-buffer-end) (the-as int (-> a0-139 base))) + (break!) + 0 + ) + ) + (dotimes (v1-323 (-> *level* length)) + (let ((a1-55 (-> *level* level v1-323))) + (when (= (-> a1-55 status) 'active) + (let ((a0-145 (-> a1-55 bsp))) + (when (nonzero? (-> a0-145 tfrag-masks)) + (let ((a2-43 (-> a1-55 texture-mask))) + (dotimes (a3-5 (-> a0-145 tfrag-masks length)) + (let ((f0-12 (* (-> a0-145 tfrag-closest a3-5) (-> *math-camera* fov-correction-factor)))) + (when (!= f0-12 4095996000.0) + (let ((t0-8 (-> a0-145 tfrag-masks data a3-5))) + (dotimes (t1-2 3) + (when (or (= t1-2 2) (>= f0-12 (-> t0-8 data t1-2 dist))) + (dotimes (t2-5 3) + (logior! + (-> (&-> a2-43 0 mask data t2-5) 0) + (-> (the-as (pointer int32) (+ (* t2-5 4) (the-as int t0-8) (* t1-2 16))) 0) + ) + ) + (goto cfg-176) + ) + ) + ) + ) + ) + (label cfg-176) + ) + ) + ) + (when (nonzero? (-> a0-145 shrub-masks)) + (let ((a2-48 (-> a1-55 texture-mask 2))) + (dotimes (a3-6 (-> a0-145 shrub-masks length)) + (let ((f0-14 (* (-> a0-145 shrub-closest a3-6) (-> *math-camera* fov-correction-factor)))) + (when (!= f0-14 4095996000.0) + (let ((t0-24 (-> a0-145 shrub-masks data a3-6))) + (dotimes (t1-5 3) + (when (or (= t1-5 2) (>= f0-14 (-> t0-24 data t1-5 dist))) + (dotimes (t2-11 3) + (logior! + (-> a2-48 mask data t2-11) + (-> (the-as (pointer int32) (+ (* t2-11 4) (the-as int t0-24) (* t1-5 16))) 0) + ) + ) + (goto cfg-196) + ) + ) + ) + ) + ) + (label cfg-196) + ) + ) + ) + (when (nonzero? (-> a0-145 alpha-masks)) + (let ((a2-53 (-> a1-55 texture-mask 3))) + (dotimes (a3-7 (-> a0-145 alpha-masks length)) + (let ((f0-16 (* (-> a0-145 alpha-closest a3-7) (-> *math-camera* fov-correction-factor)))) + (when (!= f0-16 4095996000.0) + (let ((t0-40 (-> a0-145 alpha-masks data a3-7))) + (dotimes (t1-8 3) + (when (or (= t1-8 2) (>= f0-16 (-> t0-40 data t1-8 dist))) + (dotimes (t2-17 3) + (logior! + (-> a2-53 mask data t2-17) + (-> (the-as (pointer int32) (+ (* t2-17 4) (the-as int t0-40) (* t1-8 16))) 0) + ) + ) + (goto cfg-216) + ) + ) + ) + ) + ) + (label cfg-216) + ) + ) + ) + (when (nonzero? (-> a0-145 water-masks)) + (let ((a1-56 (-> a1-55 texture-mask 4))) + (dotimes (a2-58 (-> a0-145 water-masks length)) + (let ((f0-18 (* (-> a0-145 water-closest a2-58) (-> *math-camera* fov-correction-factor)))) + (when (!= f0-18 4095996000.0) + (let ((a3-16 (-> a0-145 water-masks data a2-58))) + (dotimes (t0-50 3) + (when (or (= t0-50 2) (>= f0-18 (-> a3-16 data t0-50 dist))) + (dotimes (t1-14 3) + (logior! + (-> a1-56 mask data t1-14) + (-> (the-as (pointer int32) (+ (* t1-14 4) (the-as int a3-16) (* t0-50 16))) 0) + ) + ) + (goto cfg-236) + ) + ) + ) + ) + ) + (label cfg-236) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/gfx/background/hfrag/hfrag-h.gc b/goal_src/jak3/engine/gfx/background/hfrag/hfrag-h.gc index 0ebc2c4959..ff78260ab9 100644 --- a/goal_src/jak3/engine/gfx/background/hfrag/hfrag-h.gc +++ b/goal_src/jak3/engine/gfx/background/hfrag/hfrag-h.gc @@ -33,7 +33,8 @@ (deftype hfrag-packed-index (uint16) - () + ((bit11 uint8 :offset 11 :size 5) + ) ) (deftype hfrag-vertex (structure) @@ -243,8 +244,8 @@ (buckets-far uint32) (buckets-mid uint32) (buckets-near uint32) - (verts uint32) - (pat-array uint32) + (verts (inline-array hfrag-vertex)) + (pat-array (pointer pat-surface)) (pat-length uint16) (num-buckets-far uint16) (num-buckets-mid uint16) @@ -252,11 +253,11 @@ (size uint32 :overlay-at (-> start-corner data 3)) ) (:methods - (hfragment-method-17 () none) - (hfragment-method-18 () none) - (hfragment-method-19 () none) - (hfragment-method-20 () none) - (hfragment-method-21 () none) + (hfragment-method-17 (_type_ collide-cache collide-query) none) + (hfragment-method-18 (_type_ collide-cache collide-query) none) + (hfragment-method-19 (_type_ collide-cache collide-query int int int int) none) + (hfragment-method-20 (_type_ collide-cache int int uint uint uint pat-surface) none) + (hfragment-method-21 (_type_ collide-cache int int uint uint uint pat-surface) none) ) ) @@ -420,6 +421,7 @@ ) ) + (deftype hfrag-mip-packet (structure) ((mip-tmpl dma-gif-packet :inline) (tex0-1 vector :inline) diff --git a/goal_src/jak3/engine/gfx/background/hfrag/hfrag.gc b/goal_src/jak3/engine/gfx/background/hfrag/hfrag.gc index 76632c541e..9b18f00f5c 100644 --- a/goal_src/jak3/engine/gfx/background/hfrag/hfrag.gc +++ b/goal_src/jak3/engine/gfx/background/hfrag/hfrag.gc @@ -7,3 +7,342 @@ ;; DECOMP BEGINS +(defmethod hfragment-method-20 ((this hfragment) + (arg0 collide-cache) + (arg1 int) + (arg2 int) + (arg3 uint) + (arg4 uint) + (arg5 uint) + (arg6 pat-surface) + ) + (let ((v1-0 (-> arg0 num-tris))) + (cond + ((>= v1-0 460) + (if (= *cheat-mode* 'debug) + (print-exceeded-max-cache-tris) + ) + ) + (else + (let ((v1-6 (-> arg0 tris v1-0))) + (let ((f0-2 (+ (* 32768.0 (the float arg1)) (-> this start-corner x))) + (f1-5 (+ (* 32768.0 (the float arg2)) (-> this start-corner z))) + ) + (set-vector! (-> v1-6 vertex 2) f0-2 (the float (* arg3 8)) f1-5 1.0) + (set-vector! (-> v1-6 vertex 1) (+ 32768.0 f0-2) (the float (* arg4 8)) f1-5 1.0) + (set-vector! (-> v1-6 vertex 0) f0-2 (the float (* arg5 8)) (+ 32768.0 f1-5) 1.0) + ) + (set! (-> v1-6 clear-flags) (the-as uint128 0)) + (set! (-> v1-6 pat) arg6) + (set! (-> v1-6 collide-ptr) #f) + ) + (+! (-> arg0 num-tris) 1) + ) + ) + ) + 0 + (none) + ) + +(defmethod hfragment-method-21 ((this hfragment) + (arg0 collide-cache) + (arg1 int) + (arg2 int) + (arg3 uint) + (arg4 uint) + (arg5 uint) + (arg6 pat-surface) + ) + (let ((v1-0 (-> arg0 num-tris))) + (cond + ((>= v1-0 460) + (if (= *cheat-mode* 'debug) + (print-exceeded-max-cache-tris) + ) + ) + (else + (let ((v1-6 (-> arg0 tris v1-0))) + (let ((f0-2 (+ (* 32768.0 (the float arg1)) (-> this start-corner x))) + (f1-5 (+ (* 32768.0 (the float arg2)) (-> this start-corner z))) + ) + (set-vector! (-> v1-6 vertex 2) f0-2 (the float (* arg4 8)) (+ 32768.0 f1-5) 1.0) + (set-vector! (-> v1-6 vertex 1) (+ 32768.0 f0-2) (the float (* arg3 8)) f1-5 1.0) + (set-vector! (-> v1-6 vertex 0) (+ 32768.0 f0-2) (the float (* arg5 8)) (+ 32768.0 f1-5) 1.0) + ) + (set! (-> v1-6 clear-flags) (the-as uint128 0)) + (set! (-> v1-6 pat) arg6) + (set! (-> v1-6 collide-ptr) #f) + ) + (+! (-> arg0 num-tris) 1) + ) + ) + ) + 0 + (none) + ) + +(defmethod hfragment-method-19 ((this hfragment) (arg0 collide-cache) (arg1 collide-query) (arg2 int) (arg3 int) (arg4 int) (arg5 int)) + (local-vars + (sv-16 uint) + (sv-24 uint) + (sv-32 uint) + (sv-40 uint) + (sv-48 int) + (sv-56 int) + (sv-64 int) + (sv-72 int) + ) + (let ((v1-0 (-> this verts)) + (a0-2 (+ (* arg3 512) arg2)) + (s2-0 (-> this pat-array 0)) + ) + (when (not (logtest? (-> arg1 ignore-pat) s2-0)) + (when (nonzero? (-> (the-as hfrag-vertex (+ (* a0-2 4) (the-as int v1-0))) packed-index bit11)) + (set! sv-16 (-> (the-as (pointer uint16) (+ (* a0-2 4) (the-as int v1-0))))) + (set! sv-24 (-> (the-as (pointer uint16) (+ (* (+ a0-2 1) 4) (the-as int v1-0))))) + (set! sv-32 (-> (the-as (pointer uint16) (+ (* (+ a0-2 512) 4) (the-as int v1-0))))) + (set! sv-40 (-> (the-as (pointer uint16) (+ (* (+ a0-2 513) 4) (the-as int v1-0))))) + (set! sv-48 0) + (set! sv-56 0) + (set! sv-64 0) + (set! sv-72 0) + (if (< (the-as int sv-16) arg4) + (set! sv-48 1) + ) + (if (< arg5 (the-as int sv-16)) + (set! sv-48 (logior sv-48 2)) + ) + (if (< (the-as int sv-24) arg4) + (set! sv-56 1) + ) + (if (< arg5 (the-as int sv-24)) + (set! sv-56 (logior sv-56 2)) + ) + (if (< (the-as int sv-32) arg4) + (set! sv-64 1) + ) + (if (< arg5 (the-as int sv-32)) + (set! sv-64 (logior sv-64 2)) + ) + (if (< (the-as int sv-40) arg4) + (set! sv-72 1) + ) + (if (< arg5 (the-as int sv-40)) + (set! sv-72 (logior sv-72 2)) + ) + (if (not (logtest? (logand sv-48 sv-56) sv-64)) + (hfragment-method-20 this arg0 arg2 arg3 sv-16 sv-24 sv-32 s2-0) + ) + (if (not (logtest? (logand sv-56 sv-64) sv-72)) + (hfragment-method-21 this arg0 arg2 arg3 sv-24 sv-32 sv-40 s2-0) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod hfragment-method-17 ((this hfragment) (arg0 collide-cache) (arg1 collide-query)) + (local-vars (sv-16 int) (sv-24 int) (sv-32 int) (sv-40 int) (sv-48 int) (sv-56 int)) + (set! sv-16 (the int (* 0.000030517578 (- (-> arg1 bbox min x) (-> this start-corner x))))) + (set! sv-24 (the int (* 0.000030517578 (- (-> arg1 bbox min z) (-> this start-corner z))))) + (set! sv-32 (the int (* 0.000030517578 (- (-> arg1 bbox max x) (-> this start-corner x))))) + (set! sv-40 (the int (* 0.000030517578 (- (-> arg1 bbox max z) (-> this start-corner z))))) + (set! sv-48 (the int (* 0.125 (-> arg1 bbox min y)))) + (set! sv-56 (the int (* 0.125 (-> arg1 bbox max y)))) + (set! sv-16 (max 0 (min 511 sv-16))) + (set! sv-32 (max 0 (min 511 sv-32))) + (set! sv-24 (max 0 (min 511 sv-24))) + (set! sv-40 (max 0 (min 511 sv-40))) + (let ((s3-0 sv-24) + (s2-0 sv-40) + ) + (while (>= s2-0 s3-0) + (let ((s1-0 sv-16) + (s0-0 sv-32) + ) + (while (>= s0-0 s1-0) + (hfragment-method-19 this arg0 arg1 s1-0 s3-0 sv-48 sv-56) + (+! s1-0 1) + ) + ) + (+! s3-0 1) + ) + ) + 0 + (none) + ) + +(defmethod hfragment-method-18 ((this hfragment) (arg0 collide-cache) (arg1 collide-query)) + (local-vars + (v1-30 int) + (v1-31 int) + (v1-57 int) + (v1-58 int) + (a0-16 int) + (a0-17 int) + (a0-35 int) + (a0-36 int) + (s3-0 int) + (s3-2 int) + (sv-64 vector) + (sv-68 vector) + (sv-72 vector) + (sv-76 float) + (sv-80 float) + (sv-128 int) + (sv-144 int) + (sv-160 int) + (sv-176 int) + (sv-192 int) + (sv-208 int) + ) + (set! sv-64 (new 'stack-no-clear 'vector)) + (set! sv-68 (new 'stack-no-clear 'vector)) + (set! sv-72 (new 'stack-no-clear 'vector)) + (set! sv-76 (the-as float 0.000030517578)) + (set! sv-80 (* 0.000030517578 (-> arg1 radius))) + (vector-! sv-64 (-> arg1 start-pos) (-> this start-corner)) + (vector-float*! sv-64 sv-64 sv-76) + (vector-float*! sv-72 (-> arg1 move-dist) sv-76) + (vector+! sv-68 sv-64 sv-72) + (cond + ((< (fabs (-> sv-72 z)) (fabs (-> sv-72 x))) + (when (< (-> sv-72 x) 0.0) + (let ((v1-15 (new 'stack-no-clear 'vector))) + (set! (-> v1-15 quad) (-> sv-64 quad)) + (set! (-> sv-64 quad) (-> sv-68 quad)) + (set! (-> sv-68 quad) (-> v1-15 quad)) + ) + (vector-negate! sv-72 sv-72) + ) + (let* ((a0-9 (the int (- (-> sv-64 x) sv-80))) + (v1-20 (the int (+ (-> sv-68 x) sv-80))) + (f0-15 (fmax 1.0 (the float (- v1-20 a0-9)))) + (f30-0 (/ (-> sv-72 y) f0-15)) + (f28-0 (/ (-> sv-72 z) f0-15)) + (f26-0 (+ sv-80 (* 0.5 (fabs f30-0)))) + (f24-0 (+ sv-80 (* 0.5 (fabs f28-0)))) + ) + (cond + ((< a0-9 0) + (+! (-> sv-64 y) (* f30-0 (- (the float a0-9)))) + (+! (-> sv-64 z) (* f28-0 (- (the float a0-9)))) + (set! s3-0 0) + ) + (else + (set! s3-0 (min 511 a0-9)) + ) + ) + (let ((s2-1 (max 0 (min 511 v1-20))) + (s1-0 s3-0) + ) + (while (>= s2-1 s1-0) + (let* ((f0-23 (the float (- s1-0 s3-0))) + (f1-23 (+ (-> sv-64 y) (* f30-0 f0-23))) + (f0-25 (+ (-> sv-64 z) (* f28-0 f0-23))) + (s0-0 (the int (* 4096.0 (+ (- -0.5 f26-0) f1-23)))) + ) + (set! sv-128 (the int (* 4096.0 (+ 0.5 f26-0 f1-23)))) + (let ((a0-15 (the int (- f0-25 f24-0))) + (v1-29 (the int (+ f0-25 f24-0))) + ) + (set! sv-144 0) + (let ((a2-1 sv-144) + (a1-21 (min 511 a0-15)) + ) + (set-on-less-than a0-16 a2-1 a1-21) + (move-if-not-zero a0-17 a1-21 a0-16 a0-16) + ) + (set! sv-144 a0-17) + (set! sv-160 0) + (let ((a1-22 sv-160) + (a0-20 (min 511 v1-29)) + ) + (set-on-less-than v1-30 a1-22 a0-20) + (move-if-not-zero v1-31 a0-20 v1-30 v1-30) + ) + ) + (set! sv-160 v1-31) + (while (>= sv-160 sv-144) + (hfragment-method-19 this arg0 arg1 s1-0 sv-144 s0-0 sv-128) + (set! sv-144 (+ sv-144 1)) + ) + ) + (+! s1-0 1) + ) + ) + ) + ) + (else + (when (< (-> sv-72 z) 0.0) + (let ((v1-42 (new 'stack-no-clear 'vector))) + (set! (-> v1-42 quad) (-> sv-64 quad)) + (set! (-> sv-64 quad) (-> sv-68 quad)) + (set! (-> sv-68 quad) (-> v1-42 quad)) + ) + (vector-negate! sv-72 sv-72) + ) + (let* ((a0-27 (the int (- (-> sv-64 z) sv-80))) + (v1-47 (the int (+ (-> sv-68 z) sv-80))) + (f0-36 (fmax 1.0 (the float (- v1-47 a0-27)))) + (f30-1 (/ (-> sv-72 y) f0-36)) + (f28-1 (/ (-> sv-72 x) f0-36)) + (f26-1 (+ sv-80 (* 0.5 (fabs f30-1)))) + (f24-1 (+ sv-80 (* 0.5 (fabs f28-1)))) + ) + (cond + ((< a0-27 0) + (+! (-> sv-64 y) (* f30-1 (the float (- a0-27)))) + (+! (-> sv-64 x) (* f28-1 (the float (- a0-27)))) + (set! s3-2 0) + ) + (else + (set! s3-2 (min 511 a0-27)) + ) + ) + (let ((s2-3 (max 0 (min 511 v1-47))) + (s1-1 s3-2) + ) + (while (>= s2-3 s1-1) + (let* ((f0-44 (the float (- s1-1 s3-2))) + (f1-47 (+ (-> sv-64 y) (* f30-1 f0-44))) + (f0-46 (+ (-> sv-64 x) (* f28-1 f0-44))) + (s0-1 (the int (* 4096.0 (+ (- -0.5 f26-1) f1-47)))) + ) + (set! sv-176 (the int (* 4096.0 (+ 0.5 f26-1 f1-47)))) + (let ((a0-34 (the int (- f0-46 f24-1))) + (v1-56 (the int (+ f0-46 f24-1))) + ) + (set! sv-192 0) + (let ((a2-3 sv-192) + (a1-41 (min 511 a0-34)) + ) + (set-on-less-than a0-35 a2-3 a1-41) + (move-if-not-zero a0-36 a1-41 a0-35 a0-35) + ) + (set! sv-192 a0-36) + (set! sv-208 0) + (let ((a1-42 sv-208) + (a0-39 (min 511 v1-56)) + ) + (set-on-less-than v1-57 a1-42 a0-39) + (move-if-not-zero v1-58 a0-39 v1-57 v1-57) + ) + ) + (set! sv-208 v1-58) + (while (>= sv-208 sv-192) + (hfragment-method-19 this arg0 arg1 sv-192 s1-1 s0-1 sv-176) + (set! sv-192 (+ sv-192 1)) + ) + ) + (+! s1-1 1) + ) + ) + ) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/gfx/background/prototype-h.gc b/goal_src/jak3/engine/gfx/background/prototype-h.gc index 3d3e995018..2ac7337c2c 100644 --- a/goal_src/jak3/engine/gfx/background/prototype-h.gc +++ b/goal_src/jak3/engine/gfx/background/prototype-h.gc @@ -57,11 +57,12 @@ (deftype prototype-bucket-shrub (prototype-bucket) ((next uint32 4) (count uint16 4) - (mod-count uint16 4) + (count-quad uint128 :overlay-at (-> count 0)) + (mod-count uint16 4 :offset 88) (last dma-packet 4) - (next-clear uint128 :overlay-at (-> next 0)) - (count-clear uint64 :overlay-at (-> count 0)) - (last-clear uint128 :overlay-at (-> last 0)) + (next-clear uint128 :overlay-at (-> next 0)) + (count-clear uint64 :overlay-at (-> count 0)) + (last-clear uint128 :overlay-at (-> last 0)) ) ) diff --git a/goal_src/jak3/engine/gfx/background/prototype.gc b/goal_src/jak3/engine/gfx/background/prototype.gc index c77321c045..ae0e2303bb 100644 --- a/goal_src/jak3/engine/gfx/background/prototype.gc +++ b/goal_src/jak3/engine/gfx/background/prototype.gc @@ -7,3 +7,110 @@ ;; DECOMP BEGINS +(defmethod login ((this prototype-inline-array-shrub)) + "Initialize the object after it is loaded." + (let ((s5-0 (-> *level* level *level-index* bsp))) + (dotimes (s4-0 (-> this length)) + (let ((s3-0 (-> this data s4-0))) + (when (and *debug-segment* (-> *screen-shot-work* highres-enable)) + (dotimes (v1-9 4) + (+! (-> s3-0 dists data v1-9) 40960000.0) + (set! (-> s3-0 rdists data v1-9) (/ 1.0 (-> s3-0 dists data v1-9))) + ) + ) + (set! *texture-masks* (-> s5-0 shrub-masks data (-> s3-0 texture-masks-index))) + (dotimes (s2-0 4) + (let ((a0-15 (-> s3-0 geometry s2-0))) + (if (nonzero? a0-15) + (login a0-15) + ) + ) + ) + ) + ) + ) + this + ) + +(defmethod mem-usage ((this prototype-array-tie) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 0 used) v1-6) + (+! (-> usage data 0 total) (logand -16 (+ v1-6 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this array-data s3-0) usage flags) + ) + this + ) + +(defmethod mem-usage ((this prototype-bucket-tie) (usage memory-usage-block) (flags int)) + (dotimes (s3-0 4) + (let ((a0-1 (-> this tie-geom s3-0))) + (if (nonzero? a0-1) + (mem-usage a0-1 usage (logior flags 1)) + ) + ) + ) + (set! (-> usage length) (max 85 (-> usage length))) + (set! (-> usage data 84 name) "string") + (+! (-> usage data 84 count) 1) + (let ((v1-13 (asize-of (-> this name)))) + (+! (-> usage data 84 used) v1-13) + (+! (-> usage data 84 total) (logand -16 (+ v1-13 15))) + ) + (when (nonzero? (-> this tie-colors)) + (set! (-> usage length) (max 17 (-> usage length))) + (set! (-> usage data 16 name) "tie-pal") + (+! (-> usage data 16 count) 1) + (let ((v1-25 (asize-of (-> this tie-colors)))) + (+! (-> usage data 16 used) v1-25) + (+! (-> usage data 16 total) (logand -16 (+ v1-25 15))) + ) + ) + (if (nonzero? (-> this collide-hash-fragment-array)) + (mem-usage (-> this collide-hash-fragment-array) usage (logior flags 1)) + ) + this + ) + +(defmethod mem-usage ((this prototype-inline-array-shrub) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 0 used) v1-6) + (+! (-> usage data 0 total) (logand -16 (+ v1-6 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this data s3-0) usage flags) + ) + this + ) + +(defmethod mem-usage ((this prototype-bucket-shrub) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 25 (-> usage length))) + (set! (-> usage data 24 name) "prototype-bucket-shrub") + (+! (-> usage data 24 count) 1) + (let ((v1-5 112)) + (+! (-> usage data 24 used) v1-5) + (+! (-> usage data 24 total) (logand -16 (+ v1-5 15))) + ) + (dotimes (s3-0 4) + (let ((a0-5 (-> this geometry s3-0))) + (if (nonzero? a0-5) + (mem-usage a0-5 usage (logior flags 1)) + ) + ) + ) + (set! (-> usage length) (max 85 (-> usage length))) + (set! (-> usage data 84 name) "string") + (+! (-> usage data 84 count) 1) + (let ((v1-22 (asize-of (-> this name)))) + (+! (-> usage data 84 used) v1-22) + (+! (-> usage data 84 total) (logand -16 (+ v1-22 15))) + ) + this + ) diff --git a/goal_src/jak3/engine/gfx/background/tfrag/tfrag-h.gc b/goal_src/jak3/engine/gfx/background/tfrag/tfrag-h.gc index 62953903a6..d95b6819bd 100644 --- a/goal_src/jak3/engine/gfx/background/tfrag/tfrag-h.gc +++ b/goal_src/jak3/engine/gfx/background/tfrag/tfrag-h.gc @@ -6,7 +6,12 @@ ;; dgos: GAME (declare-type tfrag-work structure) +(declare-type drawable-tree-tfrag structure) (define-extern *tfrag-work* tfrag-work) +(define-extern draw-drawable-tree-tfrag (function drawable-tree-tfrag none)) +(define-extern draw-drawable-tree-tfrag-trans (function drawable-tree-tfrag none)) +(define-extern draw-drawable-tree-tfrag-water (function drawable-tree-tfrag none)) +(define-extern *pc-tfrag-draw-level* level) ;; added ;; DECOMP BEGINS @@ -45,6 +50,7 @@ (dma-base uint32 :overlay-at (-> dma-chain 1)) (dma-level-1 uint32 :overlay-at (-> dma-chain 2)) (dma-qwc uint8 4 :offset 44) + (dma-qwc-word uint32 :overlay-at (-> dma-qwc 0)) (shader (inline-array adgif-shader) :offset 48) (num-shaders uint8 :offset 52) (num-base-colors uint8 :offset 53) @@ -54,6 +60,7 @@ (color-count uint8 :offset 57) (texture-masks-index uint16 :offset 58) (generic generic-tfragment :offset 60) + (generic-u32 uint32 :overlay-at generic) ) ) diff --git a/goal_src/jak3/engine/gfx/background/tfrag/tfrag-methods.gc b/goal_src/jak3/engine/gfx/background/tfrag/tfrag-methods.gc index ce0538cf1b..055079e7d1 100644 --- a/goal_src/jak3/engine/gfx/background/tfrag/tfrag-methods.gc +++ b/goal_src/jak3/engine/gfx/background/tfrag/tfrag-methods.gc @@ -7,3 +7,788 @@ ;; DECOMP BEGINS +;; WARN: Return type mismatch symbol vs none. +(defun edge-debug-lines ((arg0 (array vector-array))) + "Draw tfrag debug lines. These debug-lines are not stored in retail copies." + (when (nonzero? arg0) + (dotimes (s5-0 (-> arg0 length)) + (when (logtest? *display-strip-lines* (ash 1 s5-0)) + (let ((s4-0 (-> arg0 s5-0))) + (dotimes (s3-0 (/ (-> s4-0 length) 2)) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> s4-0 data (* s3-0 2)) + (-> s4-0 data (+ (* s3-0 2) 1)) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + #f + (the-as rgba -1) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch drawable-tree-tfrag vs none. +(defun draw-drawable-tree-tfrag ((arg0 drawable-tree-tfrag)) + "Top-level function to generate DMA for tfrag." + (local-vars (sv-16 int)) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tfrag)) + (let ((s5-0 (+ (-> arg0 length) -1))) + (when (nonzero? s5-0) + ; (dotimes (s4-0 s5-0) + ; (let* ((v1-8 (-> arg0 arrays s4-0)) + ; (a0-4 (-> arg0 arrays (+ s4-0 1))) + ; (a1-1 (/ (-> (the-as drawable-inline-array-node v1-8) data 0 id) 8)) + ; (a0-6 (/ (-> (the-as drawable-inline-array-node a0-4) data 0 id) 8)) + ; (a1-3 (+ a1-1 #x3800 #x70000000)) + ; (a0-8 (+ a0-6 #x3800 #x70000000)) + ; ) + ; (draw-node-cull + ; (the-as pointer a0-8) + ; (the-as pointer a1-3) + ; (the-as (inline-array draw-node) (&+ v1-8 32)) + ; (-> v1-8 length) + ; ) + ; ) + ; ) + ) + (let* ((v1-14 (-> arg0 arrays s5-0)) + (s4-1 (&+ v1-14 32)) + (s3-0 (-> v1-14 length)) + ) + (set! sv-16 (+ (/ (-> s4-1 id) 8) #x3800 #x70000000)) + (let ((s5-1 (-> *display* frames (-> *display* on-screen) global-buf base))) + (with-dma-buffer-add-bucket ((s1-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 10 + (bucket-id tfrag-l0-tfrag) + (bucket-id tfrag-l1-tfrag) + (bucket-id tfrag-l2-tfrag) + (bucket-id tfrag-l3-tfrag) + (bucket-id tfrag-l4-tfrag) + (bucket-id tfrag-l5-tfrag) + (bucket-id tfrag-l6-tfrag) + (bucket-id tfrag-l7-tfrag) + (bucket-id tfrag-l8-tfrag) + (bucket-id tfrag-l9-tfrag) + ) + *draw-index* + ) + ) + (set! (-> *tfrag-work* wait-to-spr) (the-as uint 0)) + (set! (-> *tfrag-work* wait-from-spr) (the-as uint 0)) + (set! (-> *tfrag-work* texture-dists) (the-as uint (-> *level* draw-level *draw-index* bsp tfrag-closest))) + (set! (-> *tfrag-work* last-call) (the-as uint 0)) + ;; (draw-inline-array-tfrag (the-as pointer sv-16) s4-1 s3-0 s1-0) + (set! (-> *level* draw-level *draw-index* tfrag-last-calls 0) (-> *tfrag-work* last-call)) + (update-wait-stats + (-> *perf-stats* data 42) + (the-as uint 0) + (-> *tfrag-work* wait-to-spr) + (-> *tfrag-work* wait-from-spr) + ) + ) + ; (with-dma-buffer-add-bucket ((s1-1 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (-> (new 'static 'array bucket-id 10 + ; (bucket-id tfrag-scissor-l0-tfrag) + ; (bucket-id tfrag-scissor-l1-tfrag) + ; (bucket-id tfrag-scissor-l2-tfrag) + ; (bucket-id tfrag-scissor-l3-tfrag) + ; (bucket-id tfrag-scissor-l4-tfrag) + ; (bucket-id tfrag-scissor-l5-tfrag) + ; (bucket-id tfrag-scissor-l6-tfrag) + ; (bucket-id tfrag-scissor-l7-tfrag) + ; (bucket-id tfrag-scissor-l8-tfrag) + ; (bucket-id tfrag-scissor-l9-tfrag) + ; ) + ; *draw-index* + ; ) + ; ) + ; (set! (-> *tfrag-work* near-wait-to-spr) (the-as uint 0)) + ; (set! (-> *tfrag-work* near-wait-from-spr) (the-as uint 0)) + ; (set! (-> *tfrag-work* last-call) (the-as uint 0)) + ; ;; (draw-inline-array-tfrag-scissor (the-as pointer sv-16) s4-1 s3-0 s1-1) + ; (set! (-> *level* draw-level *draw-index* tfrag-last-calls 1) (-> *tfrag-work* last-call)) + ; (update-wait-stats + ; (-> *perf-stats* data 43) + ; (the-as uint 0) + ; (-> *tfrag-work* near-wait-to-spr) + ; (-> *tfrag-work* near-wait-from-spr) + ; ) + ; ) + (let ((a0-33 *dma-mem-usage*)) + (when (nonzero? a0-33) + (set! (-> a0-33 length) (max 2 (-> a0-33 length))) + (set! (-> a0-33 data 1 name) "tfragment") + (+! (-> a0-33 data 1 count) 1) + (+! (-> a0-33 data 1 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-1)) + ) + (set! (-> a0-33 data 1 total) (-> a0-33 data 1 used)) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch drawable-tree-tfrag vs none. +(defun draw-drawable-tree-tfrag-trans ((arg0 drawable-tree-tfrag)) + "Top-level function to generate DMA for tfrag." + (local-vars (sv-16 int)) + (when (logtest? (vu1-renderer-mask tfrag-trans) (-> *display* vu1-enable-user)) + (let ((s5-0 (+ (-> arg0 length) -1))) + (when (nonzero? s5-0) + ; (dotimes (s4-0 s5-0) + ; (let* ((v1-7 (-> arg0 arrays s4-0)) + ; (a0-6 (-> arg0 arrays (+ s4-0 1))) + ; (a1-1 (/ (-> (the-as drawable-inline-array-node v1-7) data 0 id) 8)) + ; (a0-8 (/ (-> (the-as drawable-inline-array-node a0-6) data 0 id) 8)) + ; (a1-3 (+ a1-1 #x3800 #x70000000)) + ; (a0-10 (+ a0-8 #x3800 #x70000000)) + ; ) + ; (draw-node-cull + ; (the-as pointer a0-10) + ; (the-as pointer a1-3) + ; (the-as (inline-array draw-node) (&+ v1-7 32)) + ; (-> v1-7 length) + ; ) + ; ) + ; ) + ) + (let* ((v1-13 (-> arg0 arrays s5-0)) + (s5-1 (&+ v1-13 32)) + (s4-1 (-> v1-13 length)) + ) + (set! sv-16 (+ (/ (-> s5-1 id) 8) #x3800 #x70000000)) + (with-dma-buffer-add-bucket ((s2-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 12 + (bucket-id tfrag-l0-alpha) + (bucket-id tfrag-l1-alpha) + (bucket-id tfrag-l2-alpha) + (bucket-id tfrag-l3-alpha) + (bucket-id tfrag-l4-alpha) + (bucket-id tfrag-l5-alpha) + (bucket-id tfrag-l6-alpha) + (bucket-id tfrag-l7-alpha) + (bucket-id tfrag-l8-alpha) + (bucket-id tfrag-l9-alpha) + (bucket-id bucket0) + (bucket-id bucket0) + ) + *draw-index* + ) + ) + (set! (-> *tfrag-work* wait-to-spr) (the-as uint 0)) + (set! (-> *tfrag-work* wait-from-spr) (the-as uint 0)) + (set! (-> *tfrag-work* texture-dists) (the-as uint (-> *level* draw-level *draw-index* bsp alpha-closest))) + (set! (-> *tfrag-work* last-call) (the-as uint 0)) + ;; (draw-inline-array-tfrag (the-as pointer sv-16) s5-1 s4-1 s2-0) + (set! (-> *level* draw-level *draw-index* tfrag-last-calls 2) (-> *tfrag-work* last-call)) + (update-wait-stats + (-> *perf-stats* data 42) + (the-as uint 0) + (-> *tfrag-work* wait-to-spr) + (-> *tfrag-work* wait-from-spr) + ) + ) + ; (with-dma-buffer-add-bucket ((s2-1 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (-> (new 'static 'array bucket-id 12 + ; (bucket-id tfrag-scissor-l0-alpha) + ; (bucket-id tfrag-scissor-l1-alpha) + ; (bucket-id tfrag-scissor-l2-alpha) + ; (bucket-id tfrag-scissor-l3-alpha) + ; (bucket-id tfrag-scissor-l4-alpha) + ; (bucket-id tfrag-scissor-l5-alpha) + ; (bucket-id tfrag-scissor-l6-alpha) + ; (bucket-id tfrag-scissor-l7-alpha) + ; (bucket-id tfrag-scissor-l8-alpha) + ; (bucket-id tfrag-scissor-l9-alpha) + ; (bucket-id bucket0) + ; (bucket-id bucket0) + ; ) + ; *draw-index* + ; ) + ; ) + ; (set! (-> *tfrag-work* near-wait-to-spr) (the-as uint 0)) + ; (set! (-> *tfrag-work* near-wait-from-spr) (the-as uint 0)) + ; (set! (-> *tfrag-work* last-call) (the-as uint 0)) + ; ;; (draw-inline-array-tfrag-scissor (the-as pointer sv-16) s5-1 s4-1 s2-1) + ; (set! (-> *level* draw-level *draw-index* tfrag-last-calls 3) (-> *tfrag-work* last-call)) + ; (update-wait-stats + ; (-> *perf-stats* data 43) + ; (the-as uint 0) + ; (-> *tfrag-work* near-wait-to-spr) + ; (-> *tfrag-work* near-wait-from-spr) + ; ) + ; ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch drawable-tree-tfrag vs none. +(defun draw-drawable-tree-tfrag-water ((arg0 drawable-tree-tfrag)) + "Top-level function to generate DMA for tfrag." + (local-vars (sv-16 int)) + (when (logtest? (vu1-renderer-mask tfrag-water) (-> *display* vu1-enable-user)) + (let ((s5-0 (+ (-> arg0 length) -1))) + (when (nonzero? s5-0) + ; (dotimes (s4-0 s5-0) + ; (let* ((v1-7 (-> arg0 arrays s4-0)) + ; (a0-6 (-> arg0 arrays (+ s4-0 1))) + ; (a1-1 (/ (-> (the-as drawable-inline-array-node v1-7) data 0 id) 8)) + ; (a0-8 (/ (-> (the-as drawable-inline-array-node a0-6) data 0 id) 8)) + ; (a1-3 (+ a1-1 #x3800 #x70000000)) + ; (a0-10 (+ a0-8 #x3800 #x70000000)) + ; ) + ; (draw-node-cull + ; (the-as pointer a0-10) + ; (the-as pointer a1-3) + ; (the-as (inline-array draw-node) (&+ v1-7 32)) + ; (-> v1-7 length) + ; ) + ; ) + ; ) + ) + (let* ((v1-13 (-> arg0 arrays s5-0)) + (s5-1 (&+ v1-13 32)) + (s4-1 (-> v1-13 length)) + ) + (set! sv-16 (+ (/ (-> s5-1 id) 8) #x3800 #x70000000)) + (with-dma-buffer-add-bucket ((s2-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 12 + (bucket-id tfrag-l0-water) + (bucket-id tfrag-l1-water) + (bucket-id tfrag-l2-water) + (bucket-id tfrag-l3-water) + (bucket-id tfrag-l4-water) + (bucket-id tfrag-l5-water) + (bucket-id tfrag-l6-water) + (bucket-id tfrag-l7-water) + (bucket-id tfrag-l8-water) + (bucket-id tfrag-l9-water) + (bucket-id bucket0) + (bucket-id bucket0) + ) + *draw-index* + ) + ) + (set! (-> *tfrag-work* wait-to-spr) (the-as uint 0)) + (set! (-> *tfrag-work* wait-from-spr) (the-as uint 0)) + (set! (-> *tfrag-work* texture-dists) (the-as uint (-> *level* draw-level *draw-index* bsp water-closest))) + (set! (-> *tfrag-work* last-call) (the-as uint 0)) + ;; (draw-inline-array-tfrag (the-as pointer sv-16) s5-1 s4-1 s2-0) + (set! (-> *level* draw-level *draw-index* tfrag-last-calls 4) (-> *tfrag-work* last-call)) + (update-wait-stats + (-> *perf-stats* data 42) + (the-as uint 0) + (-> *tfrag-work* wait-to-spr) + (-> *tfrag-work* wait-from-spr) + ) + ) + ; (with-dma-buffer-add-bucket ((s2-1 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (-> (new 'static 'array bucket-id 12 + ; (bucket-id tfrag-scissor-l0-water) + ; (bucket-id tfrag-scissor-l1-water) + ; (bucket-id tfrag-scissor-l2-water) + ; (bucket-id tfrag-scissor-l3-water) + ; (bucket-id tfrag-scissor-l4-water) + ; (bucket-id tfrag-scissor-l5-water) + ; (bucket-id tfrag-scissor-l6-water) + ; (bucket-id tfrag-scissor-l7-water) + ; (bucket-id tfrag-scissor-l8-water) + ; (bucket-id tfrag-scissor-l9-water) + ; (bucket-id bucket0) + ; (bucket-id bucket0) + ; ) + ; *draw-index* + ; ) + ; ) + ; (set! (-> *tfrag-work* near-wait-to-spr) (the-as uint 0)) + ; (set! (-> *tfrag-work* near-wait-from-spr) (the-as uint 0)) + ; (set! (-> *tfrag-work* last-call) (the-as uint 0)) + ; (draw-inline-array-tfrag-scissor (the-as pointer sv-16) s5-1 s4-1 s2-1) + ; (set! (-> *level* draw-level *draw-index* tfrag-last-calls 5) (-> *tfrag-work* last-call)) + ; (update-wait-stats + ; (-> *perf-stats* data 43) + ; (the-as uint 0) + ; (-> *tfrag-work* near-wait-to-spr) + ; (-> *tfrag-work* near-wait-from-spr) + ; ) + ; ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch pointer vs none. +(defun tfrag-vu1-init-buf ((arg0 bucket-id) (arg1 gs-test) (arg2 int) (arg3 uint) (arg4 symbol)) + "Do all tfrag buffer setup for a single bucket." + (let ((v1-0 *display*) + (a0-1 32) + ) + (+! (-> v1-0 mem-reserve-size) a0-1) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((t1-0 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> t1-0 real-buffer-end) (the-as int (&+ (-> t1-0 base) a0-1))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + + (let ((s4-0 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + (when (!= s4-0 (-> s4-0 last)) + (let* ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s2-1 (-> s3-0 base)) + ) + (tfrag-init-buffer s3-0 arg1 arg2 arg4) + (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 (-> s4-0 next))) + (set! (-> (the-as dma-packet v1-14) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-14) vif1) (new 'static 'vif-tag)) + (set! (-> s3-0 base) (the-as pointer (&+ (the-as dma-packet v1-14) 16))) + ) + (set! (-> s4-0 next) (the-as uint s2-1)) + ) + ) + ) + (let ((s5-1 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + (when (!= s5-1 (-> s5-1 last)) + (let* ((s3-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s4-1 (-> s3-1 base)) + ) + (tfrag-end-buffer s3-1 (the-as int arg3)) + (let ((v0-5 (-> s3-1 base))) + (let ((v1-28 (the-as object (-> s3-1 base)))) + (set! (-> (the-as dma-packet v1-28) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-28) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-28) vif1) (new 'static 'vif-tag)) + (set! (-> s3-1 base) (&+ (the-as pointer v1-28) 16)) + ) + (set! (-> (the-as (pointer int32) (-> s5-1 last)) 1) (the-as int s4-1)) + (set! (-> s5-1 last) (the-as (pointer dma-tag) v0-5)) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch pointer vs none. +;; ERROR: Failed store: (s.w! (+ v1-14 8) 0) at op 52 +;; ERROR: Failed store: (s.w! (+ v1-14 12) 0) at op 53 +;; ERROR: Failed store: (s.w! (+ v1-28 8) 0) at op 84 +;; ERROR: Failed store: (s.w! (+ v1-28 12) 0) at op 85 +;; ERROR: Failed store: (s.w! (+ v1-30 4) s4-1) at op 89 +(defun tfrag-scissor-vu1-init-buf ((arg0 bucket-id) (arg1 gs-test) (arg2 int) (arg3 uint) (arg4 symbol)) + (none) + ) + +(deftype tfrag-init-data (structure) + ((tfrag-bucket bucket-id) + (tfrag-scissor-bucket bucket-id) + (tfrag-trans-bucket bucket-id) + (tfrag-scissor-trans-bucket bucket-id) + (tfrag-water-bucket bucket-id) + (tfrag-water-scissor-bucket bucket-id) + ) + ) + + +(define *tfrag-init-table* (new 'static 'inline-array tfrag-init-data 10 + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l0-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-scissor-l0-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-l0-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-scissor-l0-alpha) + :tfrag-water-bucket (bucket-id tfrag-l0-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-scissor-l0-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l1-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-scissor-l1-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-l1-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-scissor-l1-alpha) + :tfrag-water-bucket (bucket-id tfrag-l1-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-scissor-l1-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l2-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-scissor-l2-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-l2-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-scissor-l2-alpha) + :tfrag-water-bucket (bucket-id tfrag-l2-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-scissor-l2-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l3-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-scissor-l3-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-l3-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-scissor-l3-alpha) + :tfrag-water-bucket (bucket-id tfrag-l3-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-scissor-l3-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l4-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-scissor-l4-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-l4-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-scissor-l4-alpha) + :tfrag-water-bucket (bucket-id tfrag-l4-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-scissor-l4-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l5-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-scissor-l5-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-l5-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-scissor-l5-alpha) + :tfrag-water-bucket (bucket-id tfrag-l5-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-scissor-l5-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l6-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-scissor-l6-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-l6-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-scissor-l6-alpha) + :tfrag-water-bucket (bucket-id tfrag-l6-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-scissor-l6-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l7-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-scissor-l7-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-l7-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-scissor-l7-alpha) + :tfrag-water-bucket (bucket-id tfrag-l7-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-scissor-l7-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l8-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-scissor-l8-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-l8-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-scissor-l8-alpha) + :tfrag-water-bucket (bucket-id tfrag-l8-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-scissor-l8-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l9-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-scissor-l9-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-l9-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-scissor-l9-alpha) + :tfrag-water-bucket (bucket-id tfrag-l9-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-scissor-l9-water) + ) + ) + ) + +(define *pc-tfrag-draw-level* (the level #f)) + +(defun tfrag-vu1-init-buffers () + "Initialize all tfrag buckets." + (dotimes (gp-0 10) + (let ((s5-0 (-> *level* draw-level gp-0)) + (s4-0 (-> *tfrag-init-table* gp-0)) + ) + (set! *pc-tfrag-draw-level* s5-0) + (when s5-0 + (set-subdivide-settings! s5-0) + (let ((s3-0 (-> s5-0 tfrag-gs-test))) + (tfrag-vu1-init-buf + (-> s4-0 tfrag-bucket) + s3-0 + 0 + (-> s5-0 tfrag-last-calls 0) + (logtest? (-> s5-0 info level-flags) (level-flags use-camera-other)) + ) + (tfrag-scissor-vu1-init-buf + (-> s4-0 tfrag-scissor-bucket) + s3-0 + 0 + (-> s5-0 tfrag-last-calls 1) + (logtest? (-> s5-0 info level-flags) (level-flags use-camera-other)) + ) + ) + (tfrag-vu1-init-buf + (-> s4-0 tfrag-trans-bucket) + (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + 1 + (-> s5-0 tfrag-last-calls 2) + (logtest? (-> s5-0 info level-flags) (level-flags use-camera-other)) + ) + (tfrag-scissor-vu1-init-buf + (-> s4-0 tfrag-scissor-trans-bucket) + (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + 1 + (-> s5-0 tfrag-last-calls 3) + (logtest? (-> s5-0 info level-flags) (level-flags use-camera-other)) + ) + (tfrag-vu1-init-buf + (-> s4-0 tfrag-water-bucket) + (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest greater-equal)) + 1 + (-> s5-0 tfrag-last-calls 4) + (logtest? (-> s5-0 info level-flags) (level-flags use-camera-other)) + ) + (tfrag-scissor-vu1-init-buf + (-> s4-0 tfrag-water-scissor-bucket) + (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest greater-equal)) + 1 + (-> s5-0 tfrag-last-calls 5) + (logtest? (-> s5-0 info level-flags) (level-flags use-camera-other)) + ) + ) + ) + ) + (none) + ) + +(defmethod draw ((this drawable-tree-tfrag)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + (let ((v1-1 (-> *background-work* tfrag-tree-count)) + (a1-3 (-> *level* draw-level *draw-index*)) + ) + (set! (-> *background-work* tfrag-trees v1-1) this) + (set! (-> *background-work* tfrag-levels v1-1) a1-3) + ) + (+! (-> *background-work* tfrag-tree-count) 1) + 0 + (none) + ) + +(defmethod draw ((this drawable-tree-tfrag-trans)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + (let ((v1-1 (-> *background-work* tfrag-trans-tree-count)) + (a1-3 (-> *level* draw-level *draw-index*)) + ) + (set! (-> *background-work* tfrag-trans-trees v1-1) this) + (set! (-> *background-work* tfrag-trans-levels v1-1) a1-3) + ) + (+! (-> *background-work* tfrag-trans-tree-count) 1) + 0 + (none) + ) + +(defmethod draw ((this drawable-tree-tfrag-water)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + (let ((v1-1 (-> *background-work* tfrag-water-tree-count)) + (a1-3 (-> *level* draw-level *draw-index*)) + ) + (set! (-> *background-work* tfrag-water-trees v1-1) this) + (set! (-> *background-work* tfrag-water-levels v1-1) a1-3) + ) + (+! (-> *background-work* tfrag-water-tree-count) 1) + 0 + (none) + ) + +(defmethod collect-stats ((this tfragment)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + (stats-tfrag-asm this) + 0 + (none) + ) + +(defmethod collect-stats ((this drawable-tree-tfrag)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tfrag)) + (set! (-> *tfrag-work* vu1-enable-tfrag) + (the-as int (logand (-> *display* vu1-enable-user) (vu1-renderer-mask tfrag))) + ) + (set! (-> *tfrag-work* vu1-enable-tfrag-scissor) + (the-as int (logand (-> *display* vu1-enable-user) (vu1-renderer-mask tfrag))) + ) + (set! (-> *tfrag-work* tr-stat-tfrag) (-> *terrain-stats* tfrag)) + (set! (-> *tfrag-work* tr-stat-tfrag-scissor) (-> *terrain-stats* tfrag-scissor)) + (let ((v1-15 (-> *tfrag-work* frag-dists quad))) + (set! (-> *tfrag-work* frag-dists quad) v1-15) + ) + (dotimes (s5-0 (-> this length)) + (collect-stats (-> this arrays s5-0)) + ) + ) + 0 + (none) + ) + +(defmethod collect-stats ((this drawable-tree-tfrag-trans)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + (when (logtest? (vu1-renderer-mask tfrag-trans) (-> *display* vu1-enable-user)) + (set! (-> *tfrag-work* vu1-enable-tfrag) + (the-as int (logand (vu1-renderer-mask tfrag-trans) (-> *display* vu1-enable-user))) + ) + (set! (-> *tfrag-work* vu1-enable-tfrag-scissor) + (the-as int (logand (vu1-renderer-mask tfrag-trans) (-> *display* vu1-enable-user))) + ) + (set! (-> *tfrag-work* tr-stat-tfrag) (-> *terrain-stats* tfrag-trans)) + (set! (-> *tfrag-work* tr-stat-tfrag-scissor) (-> *terrain-stats* tfrag-scissor-trans)) + (let ((v1-12 (-> *tfrag-work* frag-dists quad))) + (set! (-> *tfrag-work* frag-dists quad) v1-12) + ) + (dotimes (s5-0 (-> this length)) + (collect-stats (-> this arrays s5-0)) + ) + ) + 0 + (none) + ) + +(defmethod collect-stats ((this drawable-tree-tfrag-water)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + (when (logtest? (vu1-renderer-mask tfrag-water) (-> *display* vu1-enable-user)) + (set! (-> *tfrag-work* vu1-enable-tfrag) + (the-as int (logand (vu1-renderer-mask tfrag-water) (-> *display* vu1-enable-user))) + ) + (set! (-> *tfrag-work* vu1-enable-tfrag-scissor) + (the-as int (logand (vu1-renderer-mask tfrag-water) (-> *display* vu1-enable-user))) + ) + (set! (-> *tfrag-work* tr-stat-tfrag) (-> *terrain-stats* tfrag-water)) + (set! (-> *tfrag-work* tr-stat-tfrag-scissor) (-> *terrain-stats* tfrag-scissor-water)) + (let ((v1-12 (-> *tfrag-work* frag-dists quad))) + (set! (-> *tfrag-work* frag-dists quad) v1-12) + ) + (dotimes (s5-0 (-> this length)) + (collect-stats (-> this arrays s5-0)) + ) + ) + 0 + (none) + ) + +(defmethod collect-stats ((this drawable-inline-array-tfrag)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tfrag)) + (dotimes (s5-0 (-> this length)) + (let ((s4-0 (-> this data s5-0))) + (if (vis-cull (-> s4-0 id)) + (collect-stats s4-0) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod collect-stats ((this drawable-inline-array-tfrag-trans)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + (when (logtest? (vu1-renderer-mask tfrag-trans) (-> *display* vu1-enable-user)) + (dotimes (s5-0 (-> this length)) + (let ((s4-0 (-> this data s5-0))) + (if (vis-cull (-> s4-0 id)) + (collect-stats s4-0) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod collect-stats ((this drawable-inline-array-tfrag-water)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + (when (logtest? (vu1-renderer-mask tfrag-water) (-> *display* vu1-enable-user)) + (dotimes (s5-0 (-> this length)) + (let ((s4-0 (-> this data s5-0))) + (if (vis-cull (-> s4-0 id)) + (collect-stats s4-0) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod debug-draw ((this drawable-tree-tfrag)) + "Debug-draw a drawable and its children. Typically uses the debug-draw functions." + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tfrag)) + (dotimes (s5-0 (-> this length)) + (debug-draw (-> this arrays s5-0)) + ) + ) + 0 + (none) + ) + +(defmethod debug-draw ((this drawable-tree-tfrag-trans)) + "Debug-draw a drawable and its children. Typically uses the debug-draw functions." + (when (logtest? (vu1-renderer-mask tfrag-trans) (-> *display* vu1-enable-user)) + (dotimes (s5-0 (-> this length)) + (debug-draw (-> this arrays s5-0)) + ) + ) + 0 + (none) + ) + +(defmethod debug-draw ((this drawable-tree-tfrag-water)) + "Debug-draw a drawable and its children. Typically uses the debug-draw functions." + (when (logtest? (vu1-renderer-mask tfrag-water) (-> *display* vu1-enable-user)) + (dotimes (s5-0 (-> this length)) + (debug-draw (-> this arrays s5-0)) + ) + ) + 0 + (none) + ) + +(defmethod debug-draw ((this drawable-inline-array-tfrag)) + "Debug-draw a drawable and its children. Typically uses the debug-draw functions." + (dotimes (s5-0 (-> this length)) + (let ((s4-0 (-> this data s5-0))) + (if (vis-cull (-> s4-0 id)) + (debug-draw s4-0) + ) + ) + ) + 0 + (none) + ) + +(defmethod debug-draw ((this tfragment)) + "Debug-draw a drawable and its children. Typically uses the debug-draw functions." + (-> *display* frames (-> *display* on-screen) global-buf) + (edge-debug-lines (-> this debug-data debug-lines)) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/gfx/background/tfrag/tfrag-near.gc b/goal_src/jak3/engine/gfx/background/tfrag/tfrag-near.gc index 6cb3ce9cf9..d5fb0a3ea4 100644 --- a/goal_src/jak3/engine/gfx/background/tfrag/tfrag-near.gc +++ b/goal_src/jak3/engine/gfx/background/tfrag/tfrag-near.gc @@ -7,3 +7,72 @@ ;; DECOMP BEGINS +(define tnear-vu1-block (new 'static 'vu-function :length #x38b :qlength #x1c6)) + +;; WARN: Return type mismatch symbol vs none. +(defun-debug tfrag-details ((arg0 tfragment)) + (format 0 "id = ~d~%" (-> arg0 id)) + (format 0 "common:~%") + (let ((s5-0 (-> arg0 dma-qwc 0)) + (s4-0 (-> arg0 dma-common)) + ) + (format 0 "qwc = ~d, ref = ~x~%" s5-0 s4-0) + (disasm-vif-tag (the-as (pointer vif-tag) s4-0) (the-as int (* s5-0 4)) (the-as symbol 0) #t) + ) + (format 0 "base:~%") + (let ((s5-1 (-> arg0 dma-qwc 1)) + (s4-1 (-> arg0 dma-base)) + ) + (format 0 "qwc = ~d, ref = ~x~%" s5-1 s4-1) + (disasm-vif-tag (the-as (pointer vif-tag) s4-1) (the-as int (* s5-1 4)) (the-as symbol 0) #t) + ) + (format 0 "level-0:~%") + (let ((s5-2 (-> arg0 dma-qwc 3)) + (s4-2 (-> arg0 dma-qwc-word)) + ) + (format 0 "qwc = ~d, ref = ~x~%" s5-2 s4-2) + (disasm-vif-tag (the-as (pointer vif-tag) s4-2) (the-as int (* s5-2 4)) (the-as symbol 0) #t) + ) + (format 0 "level-1:~%") + (let ((s5-3 (-> arg0 dma-qwc 2)) + (gp-1 (-> arg0 dma-level-1)) + ) + (format 0 "qwc = ~d, ref = ~x~%" s5-3 gp-1) + (disasm-vif-tag (the-as (pointer vif-tag) gp-1) (the-as int (* s5-3 4)) (the-as symbol 0) #t) + ) + (none) + ) + +;; WARN: Return type mismatch vector vs none. +(defun-debug clip-restore () + (let ((a0-0 (new-stack-vector0)) + (a1-0 (new 'stack-no-clear 'matrix)) + ) + (set! (-> a1-0 rvec quad) (the-as uint128 0)) + (set! (-> a1-0 uvec quad) (the-as uint128 0)) + (set! (-> a1-0 fvec quad) (the-as uint128 0)) + (set! (-> a1-0 trans quad) (the-as uint128 0)) + (set! (-> a0-0 x) 92648.22) + (set! (-> a0-0 y) 238025.03) + (set! (-> a0-0 z) 199836.31) + (set! (-> a0-0 w) 1.0) + (set! (-> a1-0 rvec x) -0.9283) + (set! (-> a1-0 rvec y) 0.0) + (set! (-> a1-0 rvec z) 0.3716) + (set! (-> a1-0 rvec w) 0.0) + (set! (-> a1-0 uvec x) -0.2257) + (set! (-> a1-0 uvec y) 0.7945) + (set! (-> a1-0 uvec z) -0.5637) + (set! (-> a1-0 uvec w) 0.0) + (set! (-> a1-0 fvec x) -0.2952) + (set! (-> a1-0 fvec y) -0.6072) + (set! (-> a1-0 fvec z) -0.7375) + (set! (-> a1-0 fvec w) 0.0) + (set! (-> a1-0 trans x) 0.0) + (set! (-> a1-0 trans y) 0.0) + (set! (-> a1-0 trans z) 0.0) + (set! (-> a1-0 trans w) 1.0) + (debug-set-camera-pos-rot! a0-0 a1-0) + ) + (none) + ) diff --git a/goal_src/jak3/engine/gfx/background/tfrag/tfrag-work.gc b/goal_src/jak3/engine/gfx/background/tfrag/tfrag-work.gc index 960c6a6ddd..058af9b842 100644 --- a/goal_src/jak3/engine/gfx/background/tfrag/tfrag-work.gc +++ b/goal_src/jak3/engine/gfx/background/tfrag/tfrag-work.gc @@ -7,3 +7,36 @@ ;; DECOMP BEGINS +(define *tfrag-work* (new 'static 'tfrag-work + :base-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + ) + :level-0-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + ) + :common-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + ) + :level-1-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + ) + :color-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :imm #x102 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #xc000 :cmd (vif-cmd unpack-v4-8)) + ) + :max-fragment #xffff + ) + ) + +(set! (-> *tfrag-work* color-ptr x) (+ 6144 #x70000000)) + +(set! (-> *tfrag-work* color-ptr y) (+ 6144 #x70000000)) + +(set! (-> *tfrag-work* color-ptr z) (+ 6144 #x70000000)) + +(set! (-> *tfrag-work* color-ptr w) (+ 6144 #x70000000)) diff --git a/goal_src/jak3/engine/gfx/background/tfrag/tfrag.gc b/goal_src/jak3/engine/gfx/background/tfrag/tfrag.gc index df6bdcdba1..aa5756576c 100644 --- a/goal_src/jak3/engine/gfx/background/tfrag/tfrag.gc +++ b/goal_src/jak3/engine/gfx/background/tfrag/tfrag.gc @@ -5,5 +5,507 @@ ;; name in dgo: tfrag ;; dgos: GAME +(define-extern draw-inline-array-tfrag (function pointer drawable-inline-array int dma-buffer none)) +(define-extern draw-inline-array-tfrag-scissor (function pointer drawable-inline-array int dma-buffer none)) + ;; DECOMP BEGINS +(defmethod login ((this tfragment)) + "Initialize the object after it is loaded." + (when (nonzero? *texture-masks-array*) + (dotimes (s5-0 (the-as int (-> this num-shaders))) + (let ((v1-3 (adgif-shader-login-no-remap (-> this shader s5-0))) + (a0-7 (-> *texture-masks-array* data (-> this texture-masks-index))) + ) + (when v1-3 + (dotimes (a1-3 3) + (dotimes (a2-0 3) + (set! (-> (the-as (pointer int32) (+ (+ (* a1-3 16) (* a2-0 4)) (the-as int a0-7)))) + (logior (-> (the-as (pointer int32) (+ (* a2-0 4) (the-as int a0-7) (* a1-3 16))) 0) + (-> (the-as texture (+ (* a2-0 4) (the-as int v1-3) (* a1-3 16))) masks data 0 mask x) + ) + ) + ) + (set! (-> a0-7 data a1-3 dist) (fmax (-> a0-7 data a1-3 dist) (-> v1-3 masks data a1-3 dist))) + ) + ) + ) + ) + ) + this + ) + +(defmethod mem-usage ((this tfragment) (usage memory-usage-block) (flags int)) + (when (logtest? flags 2) + (+! (-> usage data 19 count) 1) + (let ((v1-6 (+ (-> this num-base-colors) (-> this num-level0-colors) (-> this num-level1-colors)))) + (+! (-> usage data 19 used) v1-6) + (+! (-> usage data 19 total) (logand -4 (+ v1-6 3))) + ) + (set! this this) + (goto cfg-16) + ) + (let ((s4-0 1)) + (set! (-> usage length) (max (-> usage length) (+ s4-0 8))) + (set! (-> usage data s4-0 name) "tfragment") + (+! (-> usage data s4-0 count) 1) + (let ((v1-20 (asize-of this))) + (+! (-> usage data s4-0 used) v1-20) + (+! (-> usage data s4-0 total) (logand -16 (+ v1-20 15))) + ) + (set! (-> usage data (+ s4-0 1) name) "tfragment-base") + (+! (-> usage data (+ s4-0 1) count) 1) + (let ((v1-31 (* (-> this dma-qwc 0) 16))) + (+! (-> usage data (+ s4-0 1) used) v1-31) + (+! (-> usage data (+ s4-0 1) total) v1-31) + ) + (set! (-> usage data (+ s4-0 2) name) "tfragment-common") + (+! (-> usage data (+ s4-0 2) count) 1) + (let ((v1-41 (* (- (-> this dma-qwc 1) (-> this dma-qwc 0)) 16))) + (+! (-> usage data (+ s4-0 2) used) v1-41) + (+! (-> usage data (+ s4-0 2) total) v1-41) + ) + (set! (-> usage data (+ s4-0 3) name) "tfragment-level0") + (when (nonzero? (-> this num-level0-colors)) + (+! (-> usage data (+ s4-0 3) count) 1) + (let ((v1-53 (* (- (-> this dma-qwc 2) (-> this dma-qwc 0)) 16))) + (+! (-> usage data (+ s4-0 3) used) v1-53) + (+! (-> usage data (+ s4-0 3) total) v1-53) + ) + ) + (set! (-> usage data (+ s4-0 4) name) "tfragment-level1") + (when (not (or (= (-> this dma-level-1) (-> this dma-common)) + (= (-> this dma-level-1) (-> this dma-base)) + (zero? (-> this num-level1-colors)) + ) + ) + (+! (-> usage data (+ s4-0 4) count) 1) + (let ((v1-68 (* (- (-> this dma-qwc 3) + (- (/ (the-as int (- (-> this dma-level-1) (-> this dma-common))) 16) (-> this dma-qwc 0)) + ) + 16 + ) + ) + ) + (+! (-> usage data (+ s4-0 4) used) v1-68) + (+! (-> usage data (+ s4-0 4) total) v1-68) + ) + ) + (set! (-> usage data (+ s4-0 5) name) "tfragment-color") + (+! (-> usage data (+ s4-0 5) count) 1) + (let ((v1-77 + (if (logtest? flags 1) + 0 + (the-as int (* (+ (-> this num-base-colors) (-> this num-level0-colors) (-> this num-level1-colors)) 2)) + ) + ) + ) + (+! (-> usage data (+ s4-0 5) used) v1-77) + (+! (-> usage data (+ s4-0 5) total) (logand -16 (+ v1-77 15))) + ) + (set! (-> usage data (+ s4-0 6) name) "tfragment-debug") + ) + (label cfg-16) + this + ) + + +(defmethod login ((this drawable-inline-array-tfrag)) + "Initialize the object after it is loaded." + (set! *texture-masks-array* (-> *level* level *level-index* bsp tfrag-masks)) + (dotimes (s5-0 (-> this length)) + (login (-> this data s5-0)) + ) + this + ) + +(defmethod login ((this drawable-inline-array-tfrag-trans)) + "Initialize the object after it is loaded." + (set! *texture-masks-array* (-> *level* level *level-index* bsp alpha-masks)) + (dotimes (s5-0 (-> this length)) + (login (-> this data s5-0)) + ) + this + ) + +(defmethod login ((this drawable-inline-array-tfrag-water)) + "Initialize the object after it is loaded." + (set! *texture-masks-array* (-> *level* level *level-index* bsp water-masks)) + (dotimes (s5-0 (-> this length)) + (login (-> this data s5-0)) + ) + this + ) + +(defmethod mem-usage ((this drawable-inline-array-tfrag) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-5 32)) + (+! (-> usage data 0 used) v1-5) + (+! (-> usage data 0 total) (logand -16 (+ v1-5 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this data s3-0) usage flags) + ) + this + ) + +(defmethod mem-usage ((this drawable-tree-tfrag) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 0 used) v1-6) + (+! (-> usage data 0 total) (logand -16 (+ v1-6 15))) + ) + (when (nonzero? (-> this time-of-day-pal)) + (set! (-> usage length) (max 9 (-> usage length))) + (set! (-> usage data 8 name) "tfragment-pal") + (+! (-> usage data 8 count) 1) + (let ((v1-18 (asize-of (-> this time-of-day-pal)))) + (+! (-> usage data 8 used) v1-18) + (+! (-> usage data 8 total) (logand -16 (+ v1-18 15))) + ) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this arrays s3-0) usage flags) + ) + this + ) + +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this drawable-inline-array-tfrag)) + (the-as int (+ (-> drawable-inline-array-tfrag size) (* (+ (-> this length) -1) 64))) + ) + +(define *tfrag-display-stats* #f) + +(define tfrag-vu1-block (new 'static 'vu-function)) ;; og:preserve-this + +;; WARN: Return type mismatch tfrag-data vs none. +(defun tfrag-data-setup ((arg0 tfrag-data) (arg1 int) (arg2 int)) + "Set up VU1 constants" + (let ((v1-0 *math-camera*)) + (let ((a0-1 (-> arg0 data))) + (set! (-> a0-1 0) (the-as uint (-> v1-0 pfog0))) + (set! (-> a0-1 1) (the-as uint (-> v1-0 fog-min))) + (set! (-> a0-1 2) (the-as uint (-> v1-0 fog-max))) + (set! (-> a0-1 3) (the-as uint 3072.0)) + ) + (set-vector! (-> arg0 val) 0.5 1.0 2048.0 0.0) + (set-vector! (-> arg0 ambient) 1.0 1.0 1.0 1.0) + (let ((a0-4 arg2)) + (cond + ((zero? a0-4) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :pre #x1 + :nreg #x3 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1 :abe arg1) + ) + ) + (set! (-> arg0 fangif tag) + (new 'static 'gif-tag64 + :pre #x1 + :nreg #x3 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :fge #x1 :abe arg1) + ) + ) + ) + ((= a0-4 1) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :pre #x1 + :nreg #x3 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe arg1) + ) + ) + (set! (-> arg0 fangif tag) + (new 'static 'gif-tag64 + :pre #x1 + :nreg #x3 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe arg1) + ) + ) + ) + ((= a0-4 2) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :pre #x1 + :nreg #x3 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :fge #x1 :abe arg1) + ) + ) + (set! (-> arg0 fangif tag) + (new 'static 'gif-tag64 + :pre #x1 + :nreg #x3 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :fge #x1 :abe arg1) + ) + ) + ) + ((= a0-4 3) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :pre #x1 + :nreg #x3 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe arg1) + ) + ) + (set! (-> arg0 fangif tag) + (new 'static 'gif-tag64 + :pre #x1 + :nreg #x3 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :fge #x1 :abe arg1) + ) + ) + ) + ) + ) + (set! (-> arg0 strgif regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 fangif regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 adgif tag) (new 'static 'gif-tag64 :nloop #x5 :nreg #x1)) + (set! (-> arg0 adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (set! (-> arg0 hvdf-offset quad) (-> v1-0 hvdf-off quad)) + (set! (-> arg0 hmge-scale quad) (-> v1-0 hmge-scale quad)) + (set! (-> arg0 invh-scale quad) (-> v1-0 inv-hmge-scale quad)) + (set! (-> arg0 guard quad) (-> v1-0 guard quad)) + ) + (set-tfrag-dists! (-> arg0 dists)) + (none) + ) + +;; WARN: Return type mismatch pointer vs none. +(defun add-tfrag-mtx-0 ((arg0 dma-buffer) (arg1 symbol)) + "Add DMA for transferring matrix0 (same as matrix1)" + (let* ((a2-0 4) + (v1-0 arg0) + (a0-1 (the-as dma-packet (-> v1-0 base))) + ) + (set! (-> a0-1 dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-0)) + (set! (-> a0-1 vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> a0-1 vif1) (new 'static 'vif-tag :imm #x5 :cmd (vif-cmd unpack-v4-32) :num a2-0)) + (set! (-> v1-0 base) (the-as pointer (&+ a0-1 16))) + ) + (if arg1 + (column-scale-matrix! + (the-as matrix (-> arg0 base)) + (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + (-> *math-camera* camera-temp-other) + ) + (column-scale-matrix! + (the-as matrix (-> arg0 base)) + (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + (-> *math-camera* camera-temp) + ) + ) + (&+! (-> arg0 base) 64) + (none) + ) + +;; WARN: Return type mismatch pointer vs none. +(defun add-tfrag-mtx-1 ((arg0 dma-buffer) (arg1 symbol)) + "Add DMA for transferring matrix1 (same as matrix0)" + (let* ((a2-0 4) + (v1-0 arg0) + (a0-1 (the-as dma-packet (-> v1-0 base))) + ) + (set! (-> a0-1 dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-0)) + (set! (-> a0-1 vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> a0-1 vif1) (new 'static 'vif-tag :imm #x14d :cmd (vif-cmd unpack-v4-32) :num a2-0)) + (set! (-> v1-0 base) (the-as pointer (&+ a0-1 16))) + ) + (if arg1 + (column-scale-matrix! + (the-as matrix (-> arg0 base)) + (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + (-> *math-camera* camera-temp-other) + ) + (column-scale-matrix! + (the-as matrix (-> arg0 base)) + (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + (-> *math-camera* camera-temp) + ) + ) + (&+! (-> arg0 base) 64) + (none) + ) + +;; WARN: Return type mismatch dma-packet vs none. +(defun add-tfrag-data ((arg0 dma-buffer) (arg1 int) (arg2 int)) + "Add DMA for tfrag constants." + (let* ((a3-0 14) + (v1-0 arg0) + (a0-1 (the-as dma-packet (-> v1-0 base))) + ) + (set! (-> a0-1 dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a3-0)) + (set! (-> a0-1 vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> a0-1 vif1) (new 'static 'vif-tag :imm #x290 :cmd (vif-cmd unpack-v4-32) :num a3-0)) + (set! (-> v1-0 base) (the-as pointer (&+ a0-1 16))) + ) + (tfrag-data-setup (the-as tfrag-data (-> arg0 base)) arg1 arg2) + (&+! (-> arg0 base) 224) + (let ((v1-3 (the-as dma-packet (-> arg0 base)))) + (set! (-> v1-3 dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> v1-3 vif0) (new 'static 'vif-tag)) + (set! (-> v1-3 vif1) (new 'static 'vif-tag :cmd (vif-cmd mscal) :msk #x1)) + (set! (-> arg0 base) (the-as pointer (&+ v1-3 16))) + ) + (none) + ) + +(define t-stat (new 'global 'tfrag-stats)) + +;; WARN: Return type mismatch symbol vs none. +(defun tfrag-print-stats ((arg0 symbol)) + "Print out accumulated tfrag stats." + (when (and *tfrag-display-stats* (!= *master-mode* 'menu)) + (format arg0 "~%") + (format arg0 "tris: ~8d~%" (-> t-stat tris)) + (format arg0 "verts: ~8d~%" (+ (-> t-stat base-verts) (-> t-stat level0-verts) (-> t-stat level1-verts))) + (format arg0 " base: ~8d~%" (-> t-stat base-verts)) + (format arg0 " lev0: ~8d~%" (-> t-stat level0-verts)) + (format arg0 " lev1: ~8d~%" (-> t-stat level1-verts)) + (format arg0 "tfaces: ~8d~%" (-> t-stat tfaces)) + (format arg0 "tfrags: ~8d~%" (-> t-stat tfrags)) + (format arg0 "dtris: ~8d~%" (-> t-stat dtris)) + (format arg0 "dps: ~8d~%" (-> t-stat drawpoints)) + (format arg0 "strips: ~8d~%" (-> t-stat strips)) + (format arg0 "shaders:~8d~%" (-> t-stat dma-tex)) + (format arg0 "tri/str:~8f~%" (/ (the float (-> t-stat dtris)) (the float (-> t-stat strips)))) + (format arg0 "dma-cnt:~8d (~8d)~%" (-> t-stat dma-cnt) (* (-> t-stat dma-cnt) 32)) + (format arg0 "dma-dta:~8d (~8d)~%" (-> t-stat dma-dta) (/ (* 33 (-> t-stat dma-dta)) 10)) + (let ((f0-4 (* 32.0 (the float (-> t-stat dma-cnt)))) + (f1-5 (* 3.3 (the float (-> t-stat dma-dta)))) + (f2-3 (* 30.0 (the float (-> t-stat tfrags)))) + ) + (+ f0-4 f1-5 f2-3) + ) + ) + (none) + ) + +(set! (-> t-stat from) 0) + +(set! (-> t-stat to) 0) + +(set! (-> t-stat cnt) 0) + +;; WARN: Return type mismatch symbol vs none. +(defun tfrag-init-buffer ((arg0 dma-buffer) (arg1 gs-test) (arg2 int) (arg3 symbol)) + "Initialize DMA bucket for Tfrag rendering." + (let ((v1-0 *display*) + (a0-6 (+ (* (+ (/ (-> tfrag-vu1-block qlength) 127) 1) 16) 480)) + ) + (+! (-> v1-0 mem-reserve-size) a0-6) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((a2-1 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> a2-1 real-buffer-end) (the-as int (&+ (-> a2-1 base) a0-6))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (dma-buffer-add-vu-function arg0 tfrag-vu1-block 1) + (dma-buffer-add-gs-set arg0 (test-1 arg1)) + (add-tfrag-mtx-0 arg0 arg3) + (add-tfrag-mtx-1 arg0 arg3) + (add-tfrag-data arg0 arg2 (the-as int *subdivide-draw-mode*)) + (#when PC_PORT + (add-pc-tfrag3-data arg0 *pc-tfrag-draw-level*) + ) + (let ((v1-5 (the-as dma-packet (-> arg0 base)))) + (set! (-> v1-5 dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> v1-5 vif0) (new 'static 'vif-tag :cmd (vif-cmd base))) + (set! (-> v1-5 vif1) (new 'static 'vif-tag :imm #x148 :cmd (vif-cmd offset))) + (set! (-> arg0 base) (the-as pointer (&+ v1-5 16))) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun tfrag-end-buffer ((arg0 dma-buffer) (arg1 int)) + "Finalize DMA bucket for tfrag rendering." + (let ((v1-0 *display*) + (a2-0 64) + ) + (+! (-> v1-0 mem-reserve-size) a2-0) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((t0-0 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> t0-0 real-buffer-end) (the-as int (&+ (-> t0-0 base) a2-0))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (let* ((v1-2 arg0) + (a2-4 (the-as dma-packet (-> v1-2 base))) + ) + (set! (-> a2-4 dma) (new 'static 'dma-tag :qwc #x3 :id (dma-tag-id cnt))) + (set! (-> a2-4 vif0) (new 'static 'vif-tag :cmd (vif-cmd stmask))) + (set! (-> a2-4 vif1) (new 'static 'vif-tag)) + (set! (-> v1-2 base) (the-as pointer (&+ a2-4 16))) + ) + (let* ((v1-3 arg0) + (a0-1 (-> v1-3 base)) + ) + (set! (-> (the-as (pointer vif-tag) a0-1) 0) (the-as vif-tag arg1)) + (set! (-> (the-as (pointer vif-tag) a0-1) 1) (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1)) + (set! (-> (the-as (pointer vif-tag) a0-1) 2) (new 'static 'vif-tag :cmd (vif-cmd stmod))) + (set! (-> (the-as (pointer vif-tag) a0-1) 3) (new 'static 'vif-tag :cmd (vif-cmd strow) :msk #x1)) + (set! (-> (the-as (pointer int32) a0-1) 4) 0) + (set! (-> (the-as (pointer int32) a0-1) 5) 0) + (set! (-> (the-as (pointer int32) a0-1) 6) 0) + (set! (-> (the-as (pointer int32) a0-1) 7) 0) + (set! (-> (the-as (pointer vif-tag) a0-1) 8) (new 'static 'vif-tag :cmd (vif-cmd base))) + (set! (-> (the-as (pointer vif-tag) a0-1) 9) (new 'static 'vif-tag :cmd (vif-cmd offset))) + (set! (-> (the-as (pointer vif-tag) a0-1) 10) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as (pointer vif-tag) a0-1) 11) (new 'static 'vif-tag)) + (set! (-> v1-3 base) (&+ a0-1 48)) + ) + ) + ) + ) + (none) + ) + +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; WARN: Return type mismatch symbol vs none. +;; ERROR: Failed store: (s.w! (+ v1-5 8) a0-21) at op 77 +;; ERROR: Failed store: (s.w! (+ v1-5 12) a0-22) at op 79 +(defun tfrag-scissor-init-buffer ((arg0 dma-buffer) (arg1 gs-test) (arg2 int) (arg3 symbol)) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +;; ERROR: Failed store: (s.w! (+ a2-4 8) a3-11) at op 25 +;; ERROR: Failed store: (s.w! (+ a2-4 12) 0) at op 26 +;; ERROR: Failed store: (s.w! (+ a0-1 4) a1-1) at op 33 +;; ERROR: Failed store: (s.w! (+ a0-1 8) a1-2) at op 35 +;; ERROR: Failed store: (s.w! (+ a0-1 12) a1-3) at op 37 +;; ERROR: Failed store: (s.w! (+ a0-1 16) 0) at op 38 +;; ERROR: Failed store: (s.w! (+ a0-1 20) 0) at op 39 +;; ERROR: Failed store: (s.w! (+ a0-1 24) 0) at op 40 +;; ERROR: Failed store: (s.w! (+ a0-1 28) 0) at op 41 +;; ERROR: Failed store: (s.w! (+ a0-1 32) a1-4) at op 43 +;; ERROR: Failed store: (s.w! (+ a0-1 36) a1-5) at op 45 +;; ERROR: Failed store: (s.w! (+ a0-1 40) a1-6) at op 47 +;; ERROR: Failed store: (s.w! (+ a0-1 44) 0) at op 48 +(defun tfrag-scissor-end-buffer ((arg0 dma-buffer) (arg1 uint)) + (none) + ) + +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; ERROR: function was not converted to expressions. Cannot decompile. +(defun stats-tfrag-asm ((frag tfragment)) + (format 0 "no stats for you~%") + (none) + ) diff --git a/goal_src/jak3/engine/gfx/background/tie/tie-h.gc b/goal_src/jak3/engine/gfx/background/tie/tie-h.gc index 5553750d85..a1cd058a1e 100644 --- a/goal_src/jak3/engine/gfx/background/tie/tie-h.gc +++ b/goal_src/jak3/engine/gfx/background/tie/tie-h.gc @@ -6,7 +6,12 @@ ;; dgos: GAME (declare-type prototype-tie-work structure) +(declare-type instance-tie-work structure) +(declare-type drawable-tree-instance-tie structure) (define-extern *prototype-tie-work* prototype-tie-work) +(define-extern *instance-tie-work* instance-tie-work) +(define-extern tie-scissor-make-perspective-matrix (function matrix matrix none)) +(define-extern draw-drawable-tree-instance-tie (function drawable-tree-instance-tie level none)) ;; DECOMP BEGINS diff --git a/goal_src/jak3/engine/gfx/background/tie/tie-methods.gc b/goal_src/jak3/engine/gfx/background/tie/tie-methods.gc index 4ce35008d5..436de8e016 100644 --- a/goal_src/jak3/engine/gfx/background/tie/tie-methods.gc +++ b/goal_src/jak3/engine/gfx/background/tie/tie-methods.gc @@ -7,3 +7,1886 @@ ;; DECOMP BEGINS +(deftype tie-debug (structure) + ((max-instance uint32) + (min-instance uint32) + (test-fragment uint32) + (frag-count uint32) + ) + ) + + +(define *tie* (new 'global 'tie-debug)) + +(defun tie-debug-between ((arg0 uint) (arg1 uint)) + (set! (-> *instance-tie-work* test-id) arg1) + (set! (-> *instance-tie-work* test-id2) arg0) + arg0 + ) + +(defun tie-debug-one ((arg0 uint) (arg1 uint)) + (set! (-> *instance-tie-work* test-id) (+ arg1 -1 arg0)) + (set! (-> *instance-tie-work* test-id2) arg0) + arg0 + ) + +(defun tie-debug-frag-between ((arg0 uint) (arg1 uint)) + (set! (-> *tie* test-fragment) arg0) + (let ((v0-0 (- arg1 arg0))) + (set! (-> *tie* frag-count) v0-0) + v0-0 + ) + ) + +(defun tie-debug-frag-one ((arg0 uint) (arg1 uint)) + (set! (-> *tie* test-fragment) arg0) + (set! (-> *tie* frag-count) arg1) + arg1 + ) + +;; WARN: Return type mismatch symbol vs none. +(defun walk-tie-generic-prototypes () + (none) + ) + +(define *pke-hack* (new 'global 'vector)) + +(defun pc-add-tie-vis-mask ((lev level) (dma-buf dma-buffer)) + "Add data so Tie3.cpp can hide protos." + (let ((packet (the-as dma-packet (-> dma-buf base)))) + (set! (-> packet vif0) (new 'static 'vif-tag)) + (set! (-> packet vif1) (new 'static 'vif-tag :cmd (vif-cmd pc-port))) + (set! (-> dma-buf base) (the pointer (&+ packet 16))) + + (let ((lev-trees (-> lev bsp drawable-trees)) + (data-ptr (the (pointer uint8) (-> dma-buf base))) + ) + (dotimes (tree-idx (-> lev-trees length)) + (let ((tree (-> lev-trees data tree-idx))) + (when (= (-> tree type) drawable-tree-instance-tie) + (let* ((tie-tree (the drawable-tree-instance-tie tree)) + (protos (-> tie-tree prototypes prototype-array-tie)) + ) + (dotimes (i (-> protos length)) + (let ((proto (-> protos array-data i))) + (when (logtest? (-> proto flags) (prototype-flags visible)) + ;; invisible! + ;(format 0 "invis: ~A~%" (-> proto name)) + (let ((src (-> proto name data))) + (while (nonzero? (-> src)) + (set! (-> data-ptr) (-> src)) + (&+! src 1) + (&+! data-ptr 1) + ) + (set! (-> data-ptr) 0) + (&+! data-ptr 1) + ) + ) + ) + ) + ) + ) + ) + ) + ;; align + (while (nonzero? (logand data-ptr #xf)) + (set! (-> data-ptr) 0) + (&+! data-ptr 1) + ) + (set! (-> packet dma) (new 'static 'dma-tag + :id (dma-tag-id cnt) + :qwc (/ (&- data-ptr (-> dma-buf base)) 16)) + ) + (set! (-> dma-buf base) data-ptr) + #f + ) + ) + ) + +(defun pc-add-tie-envmap-info ((dma-buf dma-buffer)) + (let ((packet (the-as dma-packet (-> dma-buf base)))) + (set! (-> packet dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc 1)) + (set! (-> packet vif0) (new 'static 'vif-tag)) + (set! (-> packet vif1) (new 'static 'vif-tag :cmd (vif-cmd pc-port))) + (set! (-> dma-buf base) (the pointer (&+ packet 16))) + (set! (-> (the (pointer uint128) (-> dma-buf base))) + (if (and *time-of-day-context* + (nonzero? *time-of-day-context*)) + (-> *time-of-day-context* current-env-color quad) + (the uint128 0) + ) + ) + (set! (-> dma-buf base) (the pointer (&+ packet 32))) + ) + ) + +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; WARN: Return type mismatch pointer vs object. +;; ERROR: Failed store: (s.d! (the-as uint a0-5) a1-5) at op 46 +;; ERROR: Failed store: (s.d! (the-as uint a0-18) a1-23) at op 144 +;; ERROR: Failed store: (s.d! (the-as uint a0-31) a1-41) at op 242 +;; ERROR: Failed store: (s.d! (the-as uint a0-44) a1-59) at op 340 +;; ERROR: Failed store: (s.d! (the-as uint a0-57) a1-77) at op 438 +;; ERROR: Failed store: (s.d! (the-as uint a0-72) a1-95) at op 537 +;; ERROR: Failed store: (s.d! (the-as uint a0-87) a1-113) at op 636 +;; ERROR: Failed store: (s.d! (the-as uint a0-102) a1-131) at op 735 +;; ERROR: Failed store: (s.d! (the-as uint a0-117) a1-149) at op 834 +;; ERROR: Failed store: (s.d! (the-as uint a0-132) a1-167) at op 933 +;; ERROR: Failed store: (s.d! (the-as uint a0-147) a1-185) at op 1032 +;; ERROR: Failed store: (s.d! (the-as uint a0-162) a1-203) at op 1131 +;; ERROR: Failed store: (s.d! (the-as uint a0-176) a1-221) at op 1230 +;; ERROR: Failed store: (s.w! (+ a0-179 8) 0) at op 1239 +;; ERROR: Failed store: (s.w! (+ a0-179 12) 0) at op 1240 +(defun instance-tie-patch-buckets ((arg0 dma-buffer) (arg1 level)) + ; (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie-scissor)) + ; (when (nonzero? (-> *prototype-tie-work* scissor-count)) + ; (let ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (with-dma-buffer-add-bucket ((v1-17 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (-> (new 'static 'array bucket-id 10 + ; (bucket-id tie-scissor-l0-tfrag) + ; (bucket-id tie-scissor-l1-tfrag) + ; (bucket-id tie-scissor-l2-tfrag) + ; (bucket-id tie-scissor-l3-tfrag) + ; (bucket-id tie-scissor-l4-tfrag) + ; (bucket-id tie-scissor-l5-tfrag) + ; (bucket-id tie-scissor-l6-tfrag) + ; (bucket-id tie-scissor-l7-tfrag) + ; (bucket-id tie-scissor-l8-tfrag) + ; (bucket-id tie-scissor-l9-tfrag) + ; ) + ; (-> arg1 draw-index) + ; ) + ; ) + ; (let ((a1-1 (-> v1-17 base)) + ; (a0-5 (the-as object (-> *prototype-tie-work* scissor-last))) + ; ) + ; (let ((a3-1 (-> *prototype-tie-work* scissor-next))) + ; (set! (-> (the-as (pointer uint128) a1-1)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-1)) + ; (logior (logand (-> (the-as (pointer uint64) a1-1)) (the-as uint #x80000000ffffffff)) (shr (shl a3-1 33) 1)) + ; ) + ; ) + ; (let ((a1-5 (logior (logand (-> (the-as (pointer uint64) a0-5) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-1 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint a0-5) a1-5) + ; ) + ; ) + ; (&+! (-> v1-17 base) 16) + ; ) + ; (let ((v1-25 *dma-mem-usage*)) + ; (when (nonzero? v1-25) + ; (set! (-> v1-25 length) (max 16 (-> v1-25 length))) + ; (set! (-> v1-25 data 15 name) "tie-scissor") + ; (+! (-> v1-25 data 15 count) 1) + ; (+! (-> v1-25 data 15 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-0)) + ; ) + ; (set! (-> v1-25 data 15 total) (-> v1-25 data 15 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + ; (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie)) + ; (when (nonzero? (-> *prototype-tie-work* tie-count)) + ; (let ((s5-1 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (with-dma-buffer-add-bucket ((v1-43 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (-> (new 'static 'array bucket-id 10 + ; (bucket-id tie-l0-tfrag) + ; (bucket-id tie-l1-tfrag) + ; (bucket-id tie-l2-tfrag) + ; (bucket-id tie-l3-tfrag) + ; (bucket-id tie-l4-tfrag) + ; (bucket-id tie-l5-tfrag) + ; (bucket-id tie-l6-tfrag) + ; (bucket-id tie-l7-tfrag) + ; (bucket-id tie-l8-tfrag) + ; (bucket-id tie-l9-tfrag) + ; ) + ; (-> arg1 draw-index) + ; ) + ; ) + ; (let ((a1-19 (-> v1-43 base)) + ; (a0-18 (the-as object (-> *prototype-tie-work* tie-last))) + ; ) + ; (let ((a3-10 (-> *prototype-tie-work* tie-next))) + ; (set! (-> (the-as (pointer uint128) a1-19)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-19)) + ; (logior (logand (-> (the-as (pointer uint64) a1-19)) (the-as uint #x80000000ffffffff)) (shr (shl a3-10 33) 1)) + ; ) + ; ) + ; (let ((a1-23 (logior (logand (-> (the-as (pointer uint64) a0-18) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-19 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint a0-18) a1-23) + ; ) + ; ) + ; (&+! (-> v1-43 base) 16) + ; ) + ; (let ((v1-51 *dma-mem-usage*)) + ; (when (nonzero? v1-51) + ; (set! (-> v1-51 length) (max 10 (-> v1-51 length))) + ; (set! (-> v1-51 data 9 name) "tie-fragment") + ; (+! (-> v1-51 data 9 count) 1) + ; (+! (-> v1-51 data 9 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-1)) + ; ) + ; (set! (-> v1-51 data 9 total) (-> v1-51 data 9 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask etie)) + ; (when (nonzero? (-> *prototype-tie-work* envmap-count)) + (let ((s5-2 (-> *display* frames (-> *display* on-screen) global-buf base))) + (with-dma-buffer-add-bucket ((v1-69 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 10 + (bucket-id tie-l0-tfrag) ; (bucket-id etie-l0-tfrag) + (bucket-id tie-l1-tfrag) ; (bucket-id etie-l1-tfrag) + (bucket-id tie-l2-tfrag) ; (bucket-id etie-l2-tfrag) + (bucket-id tie-l3-tfrag) ; (bucket-id etie-l3-tfrag) + (bucket-id tie-l4-tfrag) ; (bucket-id etie-l4-tfrag) + (bucket-id tie-l5-tfrag) ; (bucket-id etie-l5-tfrag) + (bucket-id tie-l6-tfrag) ; (bucket-id etie-l6-tfrag) + (bucket-id tie-l7-tfrag) ; (bucket-id etie-l7-tfrag) + (bucket-id tie-l8-tfrag) ; (bucket-id etie-l8-tfrag) + (bucket-id tie-l9-tfrag) ; (bucket-id etie-l9-tfrag) + ) + (-> arg1 draw-index) + ) + ) + (add-pc-tfrag3-data v1-69 arg1) + (pc-add-tie-vis-mask arg1 v1-69) + (pc-add-tie-envmap-info v1-69) + ; (let ((a1-37 (-> v1-69 base)) + ; (a0-31 (the-as object (-> *prototype-tie-work* envmap-last))) + ; ) + ; (let ((a3-19 (-> *prototype-tie-work* envmap-next))) + ; (set! (-> (the-as (pointer uint128) a1-37)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-37)) + ; (logior (logand (-> (the-as (pointer uint64) a1-37)) (the-as uint #x80000000ffffffff)) (shr (shl a3-19 33) 1)) + ; ) + ; ) + ; (let ((a1-41 (logior (logand (-> (the-as (pointer uint64) a0-31) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-37 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint a0-31) a1-41) + ; ) + ; ) + ; (&+! (-> v1-69 base) 16) + ) + (let ((v1-77 *dma-mem-usage*)) + (when (nonzero? v1-77) + (set! (-> v1-77 length) (max 10 (-> v1-77 length))) + (set! (-> v1-77 data 9 name) "tie-fragment") + (+! (-> v1-77 data 9 count) 1) + (+! (-> v1-77 data 9 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-2)) + ) + (set! (-> v1-77 data 9 total) (-> v1-77 data 9 used)) + ) + ) + ) + ; ) + ) + ; (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask etie-scissor)) + ; (when (nonzero? (-> *prototype-tie-work* envmap-scissor-count)) + ; (let ((s5-3 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (with-dma-buffer-add-bucket ((v1-95 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (-> (new 'static 'array bucket-id 10 + ; (bucket-id etie-scissor-l0-tfrag) + ; (bucket-id etie-scissor-l1-tfrag) + ; (bucket-id etie-scissor-l2-tfrag) + ; (bucket-id etie-scissor-l3-tfrag) + ; (bucket-id etie-scissor-l4-tfrag) + ; (bucket-id etie-scissor-l5-tfrag) + ; (bucket-id etie-scissor-l6-tfrag) + ; (bucket-id etie-scissor-l7-tfrag) + ; (bucket-id etie-scissor-l8-tfrag) + ; (bucket-id etie-scissor-l9-tfrag) + ; ) + ; (-> arg1 draw-index) + ; ) + ; ) + ; (let ((a1-55 (-> v1-95 base)) + ; (a0-44 (the-as object (-> *prototype-tie-work* envmap-scissor-last))) + ; ) + ; (let ((a3-28 (-> *prototype-tie-work* envmap-scissor-next))) + ; (set! (-> (the-as (pointer uint128) a1-55)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-55)) + ; (logior (logand (-> (the-as (pointer uint64) a1-55)) (the-as uint #x80000000ffffffff)) (shr (shl a3-28 33) 1)) + ; ) + ; ) + ; (let ((a1-59 (logior (logand (-> (the-as (pointer uint64) a0-44) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-55 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint a0-44) a1-59) + ; ) + ; ) + ; (&+! (-> v1-95 base) 16) + ; ) + ; (let ((v1-103 *dma-mem-usage*)) + ; (when (nonzero? v1-103) + ; (set! (-> v1-103 length) (max 10 (-> v1-103 length))) + ; (set! (-> v1-103 data 9 name) "tie-fragment") + ; (+! (-> v1-103 data 9 count) 1) + ; (+! (-> v1-103 data 9 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-3)) + ; ) + ; (set! (-> v1-103 data 9 total) (-> v1-103 data 9 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + ; (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie-vanish)) + ; (when (nonzero? (-> *prototype-tie-work* vanish-count)) + ; (let ((s5-4 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (with-dma-buffer-add-bucket ((v1-121 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (-> (new 'static 'array bucket-id 10 + ; (bucket-id tie-vanish-l0-tfrag) + ; (bucket-id tie-vanish-l1-tfrag) + ; (bucket-id tie-vanish-l2-tfrag) + ; (bucket-id tie-vanish-l3-tfrag) + ; (bucket-id tie-vanish-l4-tfrag) + ; (bucket-id tie-vanish-l5-tfrag) + ; (bucket-id tie-vanish-l6-tfrag) + ; (bucket-id tie-vanish-l7-tfrag) + ; (bucket-id tie-vanish-l8-tfrag) + ; (bucket-id tie-vanish-l9-tfrag) + ; ) + ; (-> arg1 draw-index) + ; ) + ; ) + ; (let ((a1-73 (-> v1-121 base)) + ; (a0-57 (the-as object (-> *prototype-tie-work* vanish-last))) + ; ) + ; (let ((a3-37 (-> *prototype-tie-work* vanish-next))) + ; (set! (-> (the-as (pointer uint128) a1-73)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-73)) + ; (logior (logand (-> (the-as (pointer uint64) a1-73)) (the-as uint #x80000000ffffffff)) (shr (shl a3-37 33) 1)) + ; ) + ; ) + ; (let ((a1-77 (logior (logand (-> (the-as (pointer uint64) a0-57) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-73 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint a0-57) a1-77) + ; ) + ; ) + ; (&+! (-> v1-121 base) 16) + ; ) + ; (let ((v1-129 *dma-mem-usage*)) + ; (when (nonzero? v1-129) + ; (set! (-> v1-129 length) (max 10 (-> v1-129 length))) + ; (set! (-> v1-129 data 9 name) "tie-fragment") + ; (+! (-> v1-129 data 9 count) 1) + ; (+! (-> v1-129 data 9 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-4)) + ; ) + ; (set! (-> v1-129 data 9 total) (-> v1-129 data 9 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + ; (when (logtest? (vu1-renderer-mask tie-scissor-trans) (-> *display* vu1-enable-user)) + ; (when (nonzero? (-> *prototype-tie-work* scissor-trans-count)) + ; (let ((s5-5 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (with-dma-buffer-add-bucket ((v1-146 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (-> (new 'static 'array bucket-id 10 + ; (bucket-id tie-scissor-l0-alpha) + ; (bucket-id tie-scissor-l1-alpha) + ; (bucket-id tie-scissor-l2-alpha) + ; (bucket-id tie-scissor-l3-alpha) + ; (bucket-id tie-scissor-l4-alpha) + ; (bucket-id tie-scissor-l5-alpha) + ; (bucket-id tie-scissor-l6-alpha) + ; (bucket-id tie-scissor-l7-alpha) + ; (bucket-id tie-scissor-l8-alpha) + ; (bucket-id tie-scissor-l9-alpha) + ; ) + ; (-> arg1 draw-index) + ; ) + ; ) + ; (let ((a1-91 (-> v1-146 base)) + ; (a0-72 (the-as object (-> *prototype-tie-work* scissor-trans-last))) + ; ) + ; (let ((a3-46 (-> *prototype-tie-work* scissor-trans-next))) + ; (set! (-> (the-as (pointer uint128) a1-91)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-91)) + ; (logior (logand (-> (the-as (pointer uint64) a1-91)) (the-as uint #x80000000ffffffff)) (shr (shl a3-46 33) 1)) + ; ) + ; ) + ; (let ((a1-95 (logior (logand (-> (the-as (pointer uint64) a0-72) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-91 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint a0-72) a1-95) + ; ) + ; ) + ; (&+! (-> v1-146 base) 16) + ; ) + ; (let ((v1-154 *dma-mem-usage*)) + ; (when (nonzero? v1-154) + ; (set! (-> v1-154 length) (max 16 (-> v1-154 length))) + ; (set! (-> v1-154 data 15 name) "tie-scissor") + ; (+! (-> v1-154 data 15 count) 1) + ; (+! (-> v1-154 data 15 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-5)) + ; ) + ; (set! (-> v1-154 data 15 total) (-> v1-154 data 15 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + ; (when (logtest? (vu1-renderer-mask tie-trans) (-> *display* vu1-enable-user)) + ; (when (nonzero? (-> *prototype-tie-work* trans-count)) + ; (let ((s5-6 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (with-dma-buffer-add-bucket ((v1-171 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (-> (new 'static 'array bucket-id 10 + ; (bucket-id tie-l0-alpha) + ; (bucket-id tie-l1-alpha) + ; (bucket-id tie-l2-alpha) + ; (bucket-id tie-l3-alpha) + ; (bucket-id tie-l4-alpha) + ; (bucket-id tie-l5-alpha) + ; (bucket-id tie-l6-alpha) + ; (bucket-id tie-l7-alpha) + ; (bucket-id tie-l8-alpha) + ; (bucket-id tie-l9-alpha) + ; ) + ; (-> arg1 draw-index) + ; ) + ; ) + ; (let ((a1-109 (-> v1-171 base)) + ; (a0-87 (the-as object (-> *prototype-tie-work* trans-last))) + ; ) + ; (let ((a3-55 (-> *prototype-tie-work* trans-next))) + ; (set! (-> (the-as (pointer uint128) a1-109)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-109)) + ; (logior (logand (-> (the-as (pointer uint64) a1-109)) (the-as uint #x80000000ffffffff)) + ; (shr (shl a3-55 33) 1) + ; ) + ; ) + ; ) + ; (let ((a1-113 (logior (logand (-> (the-as (pointer uint64) a0-87) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-109 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint a0-87) a1-113) + ; ) + ; ) + ; (&+! (-> v1-171 base) 16) + ; ) + ; (let ((v1-179 *dma-mem-usage*)) + ; (when (nonzero? v1-179) + ; (set! (-> v1-179 length) (max 10 (-> v1-179 length))) + ; (set! (-> v1-179 data 9 name) "tie-fragment") + ; (+! (-> v1-179 data 9 count) 1) + ; (+! (-> v1-179 data 9 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-6)) + ; ) + ; (set! (-> v1-179 data 9 total) (-> v1-179 data 9 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + ; (when (logtest? (vu1-renderer-mask etie-trans) (-> *display* vu1-enable-user)) + ; (when (nonzero? (-> *prototype-tie-work* envmap-trans-count)) + ; (let ((s5-7 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (with-dma-buffer-add-bucket ((v1-196 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (-> (new 'static 'array bucket-id 10 + ; (bucket-id etie-l0-alpha) + ; (bucket-id etie-l1-alpha) + ; (bucket-id etie-l2-alpha) + ; (bucket-id etie-l3-alpha) + ; (bucket-id etie-l4-alpha) + ; (bucket-id etie-l5-alpha) + ; (bucket-id etie-l6-alpha) + ; (bucket-id etie-l7-alpha) + ; (bucket-id etie-l8-alpha) + ; (bucket-id etie-l9-alpha) + ; ) + ; (-> arg1 draw-index) + ; ) + ; ) + ; (let ((a1-127 (-> v1-196 base)) + ; (a0-102 (the-as object (-> *prototype-tie-work* envmap-trans-last))) + ; ) + ; (let ((a3-64 (-> *prototype-tie-work* envmap-trans-next))) + ; (set! (-> (the-as (pointer uint128) a1-127)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-127)) + ; (logior (logand (-> (the-as (pointer uint64) a1-127)) (the-as uint #x80000000ffffffff)) + ; (shr (shl a3-64 33) 1) + ; ) + ; ) + ; ) + ; (let ((a1-131 (logior (logand (-> (the-as (pointer uint64) a0-102) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-127 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint a0-102) a1-131) + ; ) + ; ) + ; (&+! (-> v1-196 base) 16) + ; ) + ; (let ((v1-204 *dma-mem-usage*)) + ; (when (nonzero? v1-204) + ; (set! (-> v1-204 length) (max 10 (-> v1-204 length))) + ; (set! (-> v1-204 data 9 name) "tie-fragment") + ; (+! (-> v1-204 data 9 count) 1) + ; (+! (-> v1-204 data 9 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-7)) + ; ) + ; (set! (-> v1-204 data 9 total) (-> v1-204 data 9 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + ; (when (logtest? (vu1-renderer-mask etie-scissor-trans) (-> *display* vu1-enable-user)) + ; (when (nonzero? (-> *prototype-tie-work* envmap-scissor-trans-count)) + ; (let ((s5-8 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (with-dma-buffer-add-bucket ((v1-221 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (-> (new 'static 'array bucket-id 10 + ; (bucket-id etie-scissor-l0-alpha) + ; (bucket-id etie-scissor-l1-alpha) + ; (bucket-id etie-scissor-l2-alpha) + ; (bucket-id etie-scissor-l3-alpha) + ; (bucket-id etie-scissor-l4-alpha) + ; (bucket-id etie-scissor-l5-alpha) + ; (bucket-id etie-scissor-l6-alpha) + ; (bucket-id etie-scissor-l7-alpha) + ; (bucket-id etie-scissor-l8-alpha) + ; (bucket-id etie-scissor-l9-alpha) + ; ) + ; (-> arg1 draw-index) + ; ) + ; ) + ; (let ((a1-145 (-> v1-221 base)) + ; (a0-117 (the-as object (-> *prototype-tie-work* envmap-scissor-trans-last))) + ; ) + ; (let ((a3-73 (-> *prototype-tie-work* envmap-scissor-trans-next))) + ; (set! (-> (the-as (pointer uint128) a1-145)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-145)) + ; (logior (logand (-> (the-as (pointer uint64) a1-145)) (the-as uint #x80000000ffffffff)) + ; (shr (shl a3-73 33) 1) + ; ) + ; ) + ; ) + ; (let ((a1-149 (logior (logand (-> (the-as (pointer uint64) a0-117) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-145 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint a0-117) a1-149) + ; ) + ; ) + ; (&+! (-> v1-221 base) 16) + ; ) + ; (let ((v1-229 *dma-mem-usage*)) + ; (when (nonzero? v1-229) + ; (set! (-> v1-229 length) (max 10 (-> v1-229 length))) + ; (set! (-> v1-229 data 9 name) "tie-fragment") + ; (+! (-> v1-229 data 9 count) 1) + ; (+! (-> v1-229 data 9 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-8)) + ; ) + ; (set! (-> v1-229 data 9 total) (-> v1-229 data 9 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + ; (when (logtest? (vu1-renderer-mask tie-scissor-water) (-> *display* vu1-enable-user)) + ; (when (nonzero? (-> *prototype-tie-work* scissor-water-count)) + ; (let ((s5-9 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (with-dma-buffer-add-bucket ((v1-246 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (-> (new 'static 'array bucket-id 10 + ; (bucket-id tie-scissor-l0-water) + ; (bucket-id tie-scissor-l1-water) + ; (bucket-id tie-scissor-l2-water) + ; (bucket-id tie-scissor-l3-water) + ; (bucket-id tie-scissor-l4-water) + ; (bucket-id tie-scissor-l5-water) + ; (bucket-id tie-scissor-l6-water) + ; (bucket-id tie-scissor-l7-water) + ; (bucket-id tie-scissor-l8-water) + ; (bucket-id tie-scissor-l9-water) + ; ) + ; (-> arg1 draw-index) + ; ) + ; ) + ; (let ((a1-163 (-> v1-246 base)) + ; (a0-132 (the-as object (-> *prototype-tie-work* scissor-water-last))) + ; ) + ; (let ((a3-82 (-> *prototype-tie-work* scissor-water-next))) + ; (set! (-> (the-as (pointer uint128) a1-163)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-163)) + ; (logior (logand (-> (the-as (pointer uint64) a1-163)) (the-as uint #x80000000ffffffff)) + ; (shr (shl a3-82 33) 1) + ; ) + ; ) + ; ) + ; (let ((a1-167 (logior (logand (-> (the-as (pointer uint64) a0-132) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-163 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint a0-132) a1-167) + ; ) + ; ) + ; (&+! (-> v1-246 base) 16) + ; ) + ; (let ((v1-254 *dma-mem-usage*)) + ; (when (nonzero? v1-254) + ; (set! (-> v1-254 length) (max 16 (-> v1-254 length))) + ; (set! (-> v1-254 data 15 name) "tie-scissor") + ; (+! (-> v1-254 data 15 count) 1) + ; (+! (-> v1-254 data 15 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-9)) + ; ) + ; (set! (-> v1-254 data 15 total) (-> v1-254 data 15 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + ; (when (logtest? (vu1-renderer-mask tie-water) (-> *display* vu1-enable-user)) + ; (when (nonzero? (-> *prototype-tie-work* water-count)) + ; (let ((s5-10 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (with-dma-buffer-add-bucket ((v1-271 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (-> (new 'static 'array bucket-id 10 + ; (bucket-id tie-l0-water) + ; (bucket-id tie-l1-water) + ; (bucket-id tie-l2-water) + ; (bucket-id tie-l3-water) + ; (bucket-id tie-l4-water) + ; (bucket-id tie-l5-water) + ; (bucket-id tie-l6-water) + ; (bucket-id tie-l7-water) + ; (bucket-id tie-l8-water) + ; (bucket-id tie-l9-water) + ; ) + ; (-> arg1 draw-index) + ; ) + ; ) + ; (let ((a1-181 (-> v1-271 base)) + ; (a0-147 (the-as object (-> *prototype-tie-work* water-last))) + ; ) + ; (let ((a3-91 (-> *prototype-tie-work* water-next))) + ; (set! (-> (the-as (pointer uint128) a1-181)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-181)) + ; (logior (logand (-> (the-as (pointer uint64) a1-181)) (the-as uint #x80000000ffffffff)) + ; (shr (shl a3-91 33) 1) + ; ) + ; ) + ; ) + ; (let ((a1-185 (logior (logand (-> (the-as (pointer uint64) a0-147) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-181 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint a0-147) a1-185) + ; ) + ; ) + ; (&+! (-> v1-271 base) 16) + ; ) + ; (let ((v1-279 *dma-mem-usage*)) + ; (when (nonzero? v1-279) + ; (set! (-> v1-279 length) (max 10 (-> v1-279 length))) + ; (set! (-> v1-279 data 9 name) "tie-fragment") + ; (+! (-> v1-279 data 9 count) 1) + ; (+! (-> v1-279 data 9 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-10)) + ; ) + ; (set! (-> v1-279 data 9 total) (-> v1-279 data 9 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + ; (when (logtest? (vu1-renderer-mask etie-water) (-> *display* vu1-enable-user)) + ; (when (nonzero? (-> *prototype-tie-work* envmap-water-count)) + ; (let ((s5-11 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (with-dma-buffer-add-bucket ((v1-296 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (-> (new 'static 'array bucket-id 10 + ; (bucket-id etie-l0-water) + ; (bucket-id etie-l1-water) + ; (bucket-id etie-l2-water) + ; (bucket-id etie-l3-water) + ; (bucket-id etie-l4-water) + ; (bucket-id etie-l5-water) + ; (bucket-id etie-l6-water) + ; (bucket-id etie-l7-water) + ; (bucket-id etie-l8-water) + ; (bucket-id etie-l9-water) + ; ) + ; (-> arg1 draw-index) + ; ) + ; ) + ; (let ((a1-199 (-> v1-296 base)) + ; (a0-162 (the-as object (-> *prototype-tie-work* envmap-water-last))) + ; ) + ; (let ((a3-100 (-> *prototype-tie-work* envmap-water-next))) + ; (set! (-> (the-as (pointer uint128) a1-199)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-199)) + ; (logior (logand (-> (the-as (pointer uint64) a1-199)) (the-as uint #x80000000ffffffff)) + ; (shr (shl a3-100 33) 1) + ; ) + ; ) + ; ) + ; (let ((a1-203 (logior (logand (-> (the-as (pointer uint64) a0-162) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-199 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint a0-162) a1-203) + ; ) + ; ) + ; (&+! (-> v1-296 base) 16) + ; ) + ; (let ((v1-304 *dma-mem-usage*)) + ; (when (nonzero? v1-304) + ; (set! (-> v1-304 length) (max 10 (-> v1-304 length))) + ; (set! (-> v1-304 data 9 name) "tie-fragment") + ; (+! (-> v1-304 data 9 count) 1) + ; (+! (-> v1-304 data 9 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-11)) + ; ) + ; (set! (-> v1-304 data 9 total) (-> v1-304 data 9 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + ; (when (logtest? (vu1-renderer-mask etie-scissor-water) (-> *display* vu1-enable-user)) + ; (when (nonzero? (-> *prototype-tie-work* envmap-scissor-water-count)) + ; (let* ((s5-12 (-> *display* frames (-> *display* on-screen) global-buf base)) + ; (v1-320 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (a2-120 (-> v1-320 base)) + ; ) + ; (let ((a1-217 (-> v1-320 base)) + ; (a0-176 (the-as object (-> *prototype-tie-work* envmap-scissor-water-last))) + ; ) + ; (let ((a3-109 (-> *prototype-tie-work* envmap-scissor-water-next))) + ; (set! (-> (the-as (pointer uint128) a1-217)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-217)) + ; (logior (logand (-> (the-as (pointer uint64) a1-217)) (the-as uint #x80000000ffffffff)) + ; (shr (shl a3-109 33) 1) + ; ) + ; ) + ; ) + ; (let ((a1-221 (logior (logand (-> (the-as (pointer uint64) a0-176) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-217 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint a0-176) a1-221) + ; ) + ; ) + ; (&+! (-> v1-320 base) 16) + ; (let* ((a3-115 (-> v1-320 base)) + ; (v0-12 (when (!= a2-120 a3-115) + ; (let ((a0-179 (-> v1-320 base))) + ; (set! (-> (the-as (pointer int64) a0-179)) #x20000000) + ; (s.w! (+ a0-179 8) 0) + ; (s.w! (+ a0-179 12) 0) + ; (set! (-> v1-320 base) (&+ a0-179 16)) + ; ) + ; (dma-bucket-insert-tag + ; (-> *display* frames (-> *display* on-screen) bucket-group) + ; (-> (new 'static 'array bucket-id 10 + ; (bucket-id etie-scissor-l0-water) + ; (bucket-id etie-scissor-l1-water) + ; (bucket-id etie-scissor-l2-water) + ; (bucket-id etie-scissor-l3-water) + ; (bucket-id etie-scissor-l4-water) + ; (bucket-id etie-scissor-l5-water) + ; (bucket-id etie-scissor-l6-water) + ; (bucket-id etie-scissor-l7-water) + ; (bucket-id etie-scissor-l8-water) + ; (bucket-id etie-scissor-l9-water) + ; ) + ; (-> arg1 draw-index) + ; ) + ; a2-120 + ; (the-as (pointer dma-tag) a3-115) + ; ) + ; ) + ; ) + ; ) + ; (let ((v1-328 *dma-mem-usage*)) + ; (when (nonzero? v1-328) + ; (set! (-> v1-328 length) (max 10 (-> v1-328 length))) + ; (set! (-> v1-328 data 9 name) "tie-fragment") + ; (+! (-> v1-328 data 9 count) 1) + ; (+! (-> v1-328 data 9 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-12)) + ; ) + ; (set! (-> v1-328 data 9 total) (-> v1-328 data 9 used)) + ; ) + ; ) + ; v0-12 + ; ) + ; ) + ; ) + ; ) + (the object 0) + ) + +(defun draw-drawable-tree-instance-tie ((arg0 drawable-tree-instance-tie) (arg1 level)) + (local-vars (v0-9 object) (a0-42 int) (a0-44 int) (a0-55 int) (a0-57 int) (sv-16 int)) + (when (logtest? (vu1-renderer-mask + tie-scissor + tie + etie + etie-scissor + tie-vanish + generic + tie-scissor-trans + tie-trans + etie-trans + etie-scissor-trans + ) + (-> *display* vu1-enable-user) + ) + (set! (-> *instance-tie-work* wind-vectors) (-> arg0 prototypes wind-vectors)) + (let ((s5-0 (+ (-> arg0 length) -1))) + (when (nonzero? s5-0) + ; (dotimes (s4-0 s5-0) + ; (let* ((v1-9 (-> arg0 data s4-0)) + ; (a0-7 (-> arg0 data (+ s4-0 1))) + ; (a1-2 (/ (-> (the-as drawable-inline-array-node v1-9) data 0 id) 8)) + ; (a0-9 (/ (-> (the-as drawable-inline-array-node a0-7) data 0 id) 8)) + ; (a1-4 (+ a1-2 #x3800 #x70000000)) + ; (a0-11 (+ a0-9 #x3800 #x70000000)) + ; ) + ; (draw-node-cull + ; (the-as pointer a0-11) + ; (the-as pointer a1-4) + ; (-> (the-as drawable-inline-array-node v1-9) data) + ; (-> (the-as drawable-inline-array-node v1-9) length) + ; ) + ; ) + ; ) + ) + (let* ((s2-0 (-> arg0 data s5-0)) + (s3-0 (-> arg0 prototypes prototype-array-tie)) + (s4-1 (-> s3-0 length)) + (s5-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s0-0 (-> s5-1 base)) + (s1-1 (&- (-> s5-1 end) (the-as uint (* (-> arg0 prototypes prototype-max-qwc) 16)))) + ) + (when *debug-segment* + (if (>= (the-as uint s0-0) (the-as uint s1-1)) + (format *stdcon* "out of tie memory~%") + ) + ) + (when (< (the-as uint s0-0) (the-as uint s1-1)) + (set! (-> *instance-tie-work* buffer-start) (the-as uint (-> s5-1 base))) + (set! (-> *instance-tie-work* buffer-end) (the-as uint s1-1)) + (dotimes (v1-28 16) + (set! (-> *prototype-tie-work* last v1-28) (the-as uint 0)) + (set! (-> *prototype-tie-work* next v1-28) (the-as uint 0)) + (set! (-> *prototype-tie-work* count v1-28) (the-as uint 0)) + ) + (dotimes (v1-31 s4-1) + (let ((a0-26 (-> s3-0 array-data v1-31))) + (dotimes (a1-9 3) + (set! (-> a0-26 next-clear a1-9) (the-as uint128 0)) + (set! (-> a0-26 count-clear a1-9) (the-as uint 0)) + ) + ) + ) + (let* ((s1-2 (&+ s2-0 32)) + (s0-1 (+ (/ (-> s1-2 id) 8) #x3800 #x70000000)) + ) + (set! sv-16 (-> (the-as drawable-inline-array-instance-tie s2-0) length)) + (when (nonzero? sv-16) + (let* ((v1-41 (logand (the-as int *gsf-buffer*) 8191)) + (v1-43 + (the-as + object + (logand (the-as int (&- (logand (the-as int (&-> (-> s3-0 data) -640)) 8191) (the-as uint v1-41))) 8191) + ) + ) + ) + (set! *instance-tie-work-copy* (the-as instance-tie-work (+ (the-as int *gsf-buffer*) (the-as int v1-43)))) + ) + (quad-copy! (the-as pointer *instance-tie-work-copy*) (the-as pointer *instance-tie-work*) 35) + (let ((s2-1 (-> *display* frames (-> *display* on-screen) global-buf base))) + (set! (-> *instance-tie-work-copy* wait-to-spr) (the-as uint 0)) + (set! (-> *instance-tie-work-copy* wait-from-spr) (the-as uint 0)) + (set! (-> *instance-tie-work-copy* tfrag-dists) (the-as uint (-> arg1 bsp tfrag-closest))) + (set! (-> *instance-tie-work-copy* alpha-dists) (the-as uint (-> arg1 bsp alpha-closest))) + (set! (-> *instance-tie-work-copy* water-dists) (the-as uint (-> arg1 bsp water-closest))) + ; (let* ((v1-61 (-> *perf-stats* data 46)) + ; (a0-39 (-> v1-61 ctrl)) + ; ) + ; (+! (-> v1-61 count) 1) + ; (b! (zero? a0-39) cfg-23 :delay (nop!)) + ; (.mtc0 Perf 0) + ; (.sync.l) + ; (.sync.p) + ; (.mtpc pcr0 0) + ; (.mtpc pcr1 0) + ; (.sync.l) + ; (.sync.p) + ; (.mtc0 Perf a0-39) + ; ) + ; (.sync.l) + ; (.sync.p) + ; (label cfg-23) + ; 0 + ; (let ((t9-3 draw-inline-array-instance-tie) + ; (a3-1 s5-1) + ; ) + ; (t9-3 (the-as pointer s0-1) (the-as (inline-array instance-tie) s1-2) sv-16 a3-1) + ; ) + ; (let ((v1-64 (-> *perf-stats* data 46))) + ; (b! (zero? (-> v1-64 ctrl)) cfg-25 :delay (nop!)) + ; (.mtc0 Perf 0) + ; (.sync.l) + ; (.sync.p) + ; (.mfpc a0-42 pcr0) + ; (+! (-> v1-64 accum0) a0-42) + ; (.mfpc a0-44 pcr1) + ; (+! (-> v1-64 accum1) a0-44) + ; ) + ; (label cfg-25) + ; 0 + (update-wait-stats + (-> *perf-stats* data 46) + (the-as uint 0) + (-> *instance-tie-work-copy* wait-to-spr) + (-> *instance-tie-work-copy* wait-from-spr) + ) + (let ((v1-71 (-> *instance-tie-work-copy* min-dist quad))) + (set! (-> *instance-tie-work* min-dist quad) v1-71) + ) + (set! (-> *instance-tie-work* flags) (-> *instance-tie-work-copy* flags)) + (if (and *debug-segment* (< (the-as int (-> *instance-tie-work* buffer-end)) (the-as int (-> s5-1 base)))) + (format *stdcon* "out of tie memory~%") + ) + (when (>= (the-as int (-> *instance-tie-work* buffer-end)) (the-as int (-> s5-1 base))) + (set! (-> *prototype-tie-work* wait-to-spr) (the-as uint 0)) + (set! (-> *prototype-tie-work* wait-from-spr) (the-as uint 0)) + ; (let* ((v1-85 (-> *perf-stats* data 47)) + ; (a0-52 (-> v1-85 ctrl)) + ; ) + ; (+! (-> v1-85 count) 1) + ; (b! (zero? a0-52) cfg-33 :delay (nop!)) + ; (.mtc0 Perf 0) + ; (.sync.l) + ; (.sync.p) + ; (.mtpc pcr0 0) + ; (.mtpc pcr1 0) + ; (.sync.l) + ; (.sync.p) + ; (.mtc0 Perf a0-52) + ; ) + ; (.sync.l) + ; (.sync.p) + ; (label cfg-33) + ; 0 + ; (draw-inline-array-prototype-tie-asm s5-1 s4-1 s3-0) + ; (let ((v1-88 (-> *perf-stats* data 47))) + ; (b! (zero? (-> v1-88 ctrl)) cfg-35 :delay (nop!)) + ; (.mtc0 Perf 0) + ; (.sync.l) + ; (.sync.p) + ; (.mfpc a0-55 pcr0) + ; (+! (-> v1-88 accum0) a0-55) + ; (.mfpc a0-57 pcr1) + ; (+! (-> v1-88 accum1) a0-57) + ; ) + ; (label cfg-35) + ; 0 + (update-wait-stats + (-> *perf-stats* data 47) + (the-as uint 0) + (-> *prototype-tie-work* wait-to-spr) + (-> *prototype-tie-work* wait-from-spr) + ) + ) + (let ((a0-60 *dma-mem-usage*)) + (when (nonzero? a0-60) + (set! (-> a0-60 length) (max 10 (-> a0-60 length))) + (set! (-> a0-60 data 9 name) "tie-fragment") + (+! (-> a0-60 data 9 count) 1) + (+! (-> a0-60 data 9 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s2-1)) + ) + (set! (-> a0-60 data 9 total) (-> a0-60 data 9 used)) + ) + ) + ) + ) + ) + (set! v0-9 (cond + ((< (the-as int (-> *instance-tie-work* buffer-end)) (the-as int (-> s5-1 base))) + (if *debug-segment* + (format *stdcon* "out of tie memory~%") + ) + (set! v0-9 (-> *instance-tie-work* buffer-start)) + (set! (-> s5-1 base) (the-as pointer v0-9)) + v0-9 + ) + (else + (instance-tie-patch-buckets s5-1 arg1) + ) + ) + ) + ) + ) + ) + ) + (set! (-> arg1 tie-min-dist) (-> *instance-tie-work* min-dist x)) + 0 + (none) + ) + +;; ERROR: failed type prop at 40: Unknown symbol: tie-near-init-engine +;; WARN: Return type mismatch symbol vs none. +(defun tie-init-scissor-buf ((a0-0 bucket-id) (a1-0 gs-alpha) (a2-0 gs-test) (a3-0 gs-test)) + (none) + ) + +;; WARN: Return type mismatch pointer vs none. +(defun tie-init-buf ((arg0 bucket-id) (arg1 gs-alpha) (arg2 gs-test) (arg3 gs-test)) + (let ((v1-0 *display*) + (a0-1 80) + ) + (+! (-> v1-0 mem-reserve-size) a0-1) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((t1-0 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> t1-0 real-buffer-end) (the-as int (&+ (-> t1-0 base) a0-1))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((s5-0 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + (when (!= s5-0 (-> s5-0 last)) + (let* ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s3-1 (-> s4-0 base)) + ) + (tie-init-engine s4-0 arg1 arg2 arg3) + (let* ((v1-14 s4-0) + (a0-9 (the-as dma-packet (-> v1-14 base))) + ) + (set! (-> a0-9 dma) (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id cnt))) + (set! (-> a0-9 vif0) (new 'static 'vif-tag)) + (set! (-> a0-9 vif1) (new 'static 'vif-tag :imm #x2 :cmd (vif-cmd direct) :msk #x1)) + (set! (-> v1-14 base) (the-as pointer (&+ a0-9 16))) + ) + (let* ((v1-15 s4-0) + (a0-11 (the-as gs-gif-tag (-> v1-15 base))) + ) + (set! (-> a0-11 tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x1)) + (set! (-> a0-11 regs) GIF_REGS_ALL_AD) + (set! (-> v1-15 base) (the-as pointer (&+ a0-11 16))) + ) + (let* ((v1-16 s4-0) + (a0-13 (-> v1-16 base)) + ) + (set! (-> (the-as (pointer gs-zbuf) a0-13) 0) (new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24))) + (set! (-> (the-as (pointer gs-reg64) a0-13) 1) (gs-reg64 zbuf-1)) + (set! (-> v1-16 base) (&+ a0-13 16)) + ) + (let ((v1-17 (the-as object (-> s4-0 base)))) + (set! (-> (the-as dma-packet v1-17) dma) (new 'static 'dma-tag :id (dma-tag-id next) :addr (-> s5-0 next))) + (set! (-> (the-as dma-packet v1-17) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-17) vif1) (new 'static 'vif-tag)) + (set! (-> s4-0 base) (the-as pointer (&+ (the-as dma-packet v1-17) 16))) + ) + (set! (-> s5-0 next) (the-as uint s3-1)) + ) + ) + ) + (let ((gp-1 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + (when (!= gp-1 (-> gp-1 last)) + (let* ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-1 (-> s4-1 base)) + ) + (tie-end-buffer s4-1) + (let ((v0-5 (-> s4-1 base))) + (let ((v1-31 (the-as dma-packet (-> s4-1 base)))) + (set! (-> v1-31 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> v1-31 vif0) (new 'static 'vif-tag)) + (set! (-> v1-31 vif1) (new 'static 'vif-tag)) + (set! (-> s4-1 base) (the-as pointer (&+ v1-31 16))) + ) + (set! (-> (the-as (pointer uint32) (-> gp-1 last)) 1) (the-as uint s5-1)) + (set! (-> gp-1 last) (the-as (pointer dma-tag) v0-5)) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch pointer vs none. +;; ERROR: Failed store: (s.w! (+ v1-14 8) 0) at op 50 +;; ERROR: Failed store: (s.w! (+ v1-14 12) 0) at op 51 +;; ERROR: Failed store: (s.w! (+ v1-28 8) 0) at op 81 +;; ERROR: Failed store: (s.w! (+ v1-28 12) 0) at op 82 +;; ERROR: Failed store: (s.w! (+ v1-30 4) s5-1) at op 86 +(defun tie-init-envmap-buf ((arg0 bucket-id) (arg1 gs-alpha) (arg2 gs-test)) + (none) + ) + +;; ERROR: failed type prop at 40: Unknown symbol: etn-init-engine +;; WARN: Return type mismatch symbol vs none. +(defun tie-init-envmap-scissor-buf ((a0-0 bucket-id) (a1-0 gs-alpha) (a2-0 int) (a3-0 int)) + (none) + ) + +(deftype tie-init-data (structure) + ((tie-bucket bucket-id) + (tie-scissor-bucket bucket-id) + (tie-envmap-bucket bucket-id) + (tie-envmap-scissor-bucket bucket-id) + (tie-vanish-bucket bucket-id) + (tie-trans-bucket bucket-id) + (tie-scissor-trans-bucket bucket-id) + (tie-envmap-trans-bucket bucket-id) + (tie-envmap-scissor-trans-bucket bucket-id) + (tie-water-bucket bucket-id) + (tie-scissor-water-bucket bucket-id) + (tie-envmap-water-bucket bucket-id) + (tie-envmap-scissor-water-bucket bucket-id) + ) + ) + + +(define *tie-init-table* (new 'static 'inline-array tie-init-data 10 + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l0-tfrag) + :tie-scissor-bucket (bucket-id tie-scissor-l0-tfrag) + :tie-envmap-bucket (bucket-id etie-l0-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-scissor-l0-tfrag) + :tie-vanish-bucket (bucket-id tie-vanish-l0-tfrag) + :tie-trans-bucket (bucket-id tie-l0-alpha) + :tie-scissor-trans-bucket (bucket-id tie-scissor-l0-alpha) + :tie-envmap-trans-bucket (bucket-id etie-l0-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-scissor-l0-alpha) + :tie-water-bucket (bucket-id tie-l0-water) + :tie-scissor-water-bucket (bucket-id tie-scissor-l0-water) + :tie-envmap-water-bucket (bucket-id etie-l0-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-scissor-l0-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l1-tfrag) + :tie-scissor-bucket (bucket-id tie-scissor-l1-tfrag) + :tie-envmap-bucket (bucket-id etie-l1-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-scissor-l1-tfrag) + :tie-vanish-bucket (bucket-id tie-vanish-l1-tfrag) + :tie-trans-bucket (bucket-id tie-l1-alpha) + :tie-scissor-trans-bucket (bucket-id tie-scissor-l1-alpha) + :tie-envmap-trans-bucket (bucket-id etie-l1-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-scissor-l1-alpha) + :tie-water-bucket (bucket-id tie-l1-water) + :tie-scissor-water-bucket (bucket-id tie-scissor-l1-water) + :tie-envmap-water-bucket (bucket-id etie-l1-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-scissor-l1-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l2-tfrag) + :tie-scissor-bucket (bucket-id tie-scissor-l2-tfrag) + :tie-envmap-bucket (bucket-id etie-l2-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-scissor-l2-tfrag) + :tie-vanish-bucket (bucket-id tie-vanish-l2-tfrag) + :tie-trans-bucket (bucket-id tie-l2-alpha) + :tie-scissor-trans-bucket (bucket-id tie-scissor-l2-alpha) + :tie-envmap-trans-bucket (bucket-id etie-l2-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-scissor-l2-alpha) + :tie-water-bucket (bucket-id tie-l2-water) + :tie-scissor-water-bucket (bucket-id tie-scissor-l2-water) + :tie-envmap-water-bucket (bucket-id etie-l2-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-scissor-l2-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l3-tfrag) + :tie-scissor-bucket (bucket-id tie-scissor-l3-tfrag) + :tie-envmap-bucket (bucket-id etie-l3-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-scissor-l3-tfrag) + :tie-vanish-bucket (bucket-id tie-vanish-l3-tfrag) + :tie-trans-bucket (bucket-id tie-l3-alpha) + :tie-scissor-trans-bucket (bucket-id tie-scissor-l3-alpha) + :tie-envmap-trans-bucket (bucket-id etie-l3-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-scissor-l3-alpha) + :tie-water-bucket (bucket-id tie-l3-water) + :tie-scissor-water-bucket (bucket-id tie-scissor-l3-water) + :tie-envmap-water-bucket (bucket-id etie-l3-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-scissor-l3-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l4-tfrag) + :tie-scissor-bucket (bucket-id tie-scissor-l4-tfrag) + :tie-envmap-bucket (bucket-id etie-l4-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-scissor-l4-tfrag) + :tie-vanish-bucket (bucket-id tie-vanish-l4-tfrag) + :tie-trans-bucket (bucket-id tie-l4-alpha) + :tie-scissor-trans-bucket (bucket-id tie-scissor-l4-alpha) + :tie-envmap-trans-bucket (bucket-id etie-l4-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-scissor-l4-alpha) + :tie-water-bucket (bucket-id tie-l4-water) + :tie-scissor-water-bucket (bucket-id tie-scissor-l4-water) + :tie-envmap-water-bucket (bucket-id etie-l4-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-scissor-l4-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l5-tfrag) + :tie-scissor-bucket (bucket-id tie-scissor-l5-tfrag) + :tie-envmap-bucket (bucket-id etie-l5-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-scissor-l5-tfrag) + :tie-vanish-bucket (bucket-id tie-vanish-l5-tfrag) + :tie-trans-bucket (bucket-id tie-l5-alpha) + :tie-scissor-trans-bucket (bucket-id tie-scissor-l5-alpha) + :tie-envmap-trans-bucket (bucket-id etie-l5-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-scissor-l5-alpha) + :tie-water-bucket (bucket-id tie-l5-water) + :tie-scissor-water-bucket (bucket-id tie-scissor-l5-water) + :tie-envmap-water-bucket (bucket-id etie-l5-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-scissor-l5-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l6-tfrag) + :tie-scissor-bucket (bucket-id tie-scissor-l6-tfrag) + :tie-envmap-bucket (bucket-id etie-l6-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-scissor-l6-tfrag) + :tie-vanish-bucket (bucket-id tie-vanish-l6-tfrag) + :tie-trans-bucket (bucket-id tie-l6-alpha) + :tie-scissor-trans-bucket (bucket-id tie-scissor-l6-alpha) + :tie-envmap-trans-bucket (bucket-id etie-l6-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-scissor-l6-alpha) + :tie-water-bucket (bucket-id tie-l6-water) + :tie-scissor-water-bucket (bucket-id tie-scissor-l6-water) + :tie-envmap-water-bucket (bucket-id etie-l6-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-scissor-l6-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l7-tfrag) + :tie-scissor-bucket (bucket-id tie-scissor-l7-tfrag) + :tie-envmap-bucket (bucket-id etie-l7-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-scissor-l7-tfrag) + :tie-vanish-bucket (bucket-id tie-vanish-l7-tfrag) + :tie-trans-bucket (bucket-id tie-l7-alpha) + :tie-scissor-trans-bucket (bucket-id tie-scissor-l7-alpha) + :tie-envmap-trans-bucket (bucket-id etie-l7-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-scissor-l7-alpha) + :tie-water-bucket (bucket-id tie-l7-water) + :tie-scissor-water-bucket (bucket-id tie-scissor-l7-water) + :tie-envmap-water-bucket (bucket-id etie-l7-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-scissor-l7-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l8-tfrag) + :tie-scissor-bucket (bucket-id tie-scissor-l8-tfrag) + :tie-envmap-bucket (bucket-id etie-l8-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-scissor-l8-tfrag) + :tie-vanish-bucket (bucket-id tie-vanish-l8-tfrag) + :tie-trans-bucket (bucket-id tie-l8-alpha) + :tie-scissor-trans-bucket (bucket-id tie-scissor-l8-alpha) + :tie-envmap-trans-bucket (bucket-id etie-l8-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-scissor-l8-alpha) + :tie-water-bucket (bucket-id tie-l8-water) + :tie-scissor-water-bucket (bucket-id tie-scissor-l8-water) + :tie-envmap-water-bucket (bucket-id etie-l8-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-scissor-l8-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l9-tfrag) + :tie-scissor-bucket (bucket-id tie-scissor-l9-tfrag) + :tie-envmap-bucket (bucket-id etie-l9-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-scissor-l9-tfrag) + :tie-vanish-bucket (bucket-id tie-vanish-l9-tfrag) + :tie-trans-bucket (bucket-id tie-l9-alpha) + :tie-scissor-trans-bucket (bucket-id tie-scissor-l9-alpha) + :tie-envmap-trans-bucket (bucket-id etie-l9-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-scissor-l9-alpha) + :tie-water-bucket (bucket-id tie-l9-water) + :tie-scissor-water-bucket (bucket-id tie-scissor-l9-water) + :tie-envmap-water-bucket (bucket-id etie-l9-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-scissor-l9-water) + ) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun tie-vu1-init-buffers () + (let ((gp-0 0) + (s5-0 100) + (s4-0 68) + ) + (dotimes (s3-0 10) + (let ((v1-2 (-> *level* draw-level s3-0)) + (s2-0 (-> *tie-init-table* s3-0)) + ) + (when v1-2 + (tie-init-buf + (-> s2-0 tie-bucket) + (the-as gs-alpha gp-0) + (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (let ((t9-1 tie-init-scissor-buf) + (a0-3 (-> s2-0 tie-scissor-bucket)) + (a1-2 0) + (a2-1 #x5026b) + (a3-1 #x50000) + ) + (t9-1 a0-3 (the-as gs-alpha a1-2) (the-as gs-test a2-1) (the-as gs-test a3-1)) + (tie-init-envmap-buf + (-> s2-0 tie-envmap-bucket) + (the-as gs-alpha gp-0) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (tie-init-envmap-scissor-buf (-> s2-0 tie-envmap-scissor-bucket) (the-as gs-alpha gp-0) #x50000 a3-1) + ) + (tie-init-buf + (-> s2-0 tie-vanish-bucket) + (the-as gs-alpha s5-0) + (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (tie-init-buf + (-> s2-0 tie-trans-bucket) + (the-as gs-alpha s4-0) + (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (let ((t9-6 tie-init-scissor-buf) + (a0-8 (-> s2-0 tie-scissor-trans-bucket)) + (a1-7 1) + (a2-6 #x5026b) + (a3-4 #x50000) + ) + (t9-6 a0-8 (the-as gs-alpha a1-7) (the-as gs-test a2-6) (the-as gs-test a3-4)) + (tie-init-envmap-buf + (-> s2-0 tie-envmap-trans-bucket) + (the-as gs-alpha s4-0) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (tie-init-envmap-scissor-buf (-> s2-0 tie-envmap-scissor-trans-bucket) (the-as gs-alpha s4-0) #x50000 a3-4) + ) + (tie-init-buf + (-> s2-0 tie-water-bucket) + (the-as gs-alpha s4-0) + (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest greater-equal)) + (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (let ((t9-10 tie-init-scissor-buf) + (a0-12 (-> s2-0 tie-scissor-water-bucket)) + (a1-11 1) + (a2-10 #x51001) + (a3-6 #x51001) + ) + (t9-10 a0-12 (the-as gs-alpha a1-11) (the-as gs-test a2-10) (the-as gs-test a3-6)) + (tie-init-envmap-buf + (-> s2-0 tie-envmap-water-bucket) + (the-as gs-alpha s4-0) + (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (tie-init-envmap-scissor-buf (-> s2-0 tie-envmap-scissor-water-bucket) (the-as gs-alpha s4-0) #x51001 a3-6) + ) + ) + ) + ) + ) + (none) + ) + +(defmethod draw ((this drawable-tree-instance-tie)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + (let ((v1-1 (-> *background-work* tie-tree-count)) + (a1-3 (-> *level* draw-level *draw-index*)) + ) + (set! (-> *background-work* tie-trees v1-1) this) + (set! (-> *background-work* tie-levels v1-1) a1-3) + ) + (+! (-> *background-work* tie-tree-count) 1) + 0 + (none) + ) + +(defmethod collect-stats ((this drawable-tree-instance-tie)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + (when (logtest? (vu1-renderer-mask + tie-scissor + tie + etie + tie-vanish + generic + tie-scissor-trans + tie-trans + etie-trans + tie-scissor-water + tie-water + etie-water + ) + (-> *display* vu1-enable-user) + ) + (-> this data (+ (-> this length) -1)) + (let ((v1-9 (-> this prototypes prototype-array-tie))) + (dotimes (a0-1 (-> v1-9 length)) + (let ((a1-4 (-> v1-9 array-data a0-1))) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask generic)) + (let ((a2-4 0) + (a3-0 2) + ) + (while (>= a3-0 a2-4) + (let ((t0-2 (-> a1-4 generic-count a2-4)) + (t2-0 (-> a1-4 tie-geom (+ a2-4 1))) + ) + (when (nonzero? t0-2) + (let ((t1-4 (the-as object (-> t2-0 data))) + (t2-1 (-> t2-0 length)) + ) + (+! (-> *terrain-stats* tie-generic groups) 1) + (+! (-> *terrain-stats* tie-generic fragments) t2-1) + (+! (-> *terrain-stats* tie-generic instances) t0-2) + (dotimes (t3-9 t2-1) + (let ((t5-0 (* (-> (the-as tie-fragment t1-4) debug num-tris) t0-2)) + (t4-7 (* (-> (the-as tie-fragment t1-4) debug num-dverts) t0-2)) + ) + (+! (-> *terrain-stats* tie-generic tris) t5-0) + (+! (-> *terrain-stats* tie-generic dverts) t4-7) + ) + (set! t1-4 (&+ (the-as tie-fragment t1-4) 64)) + ) + ) + ) + ) + (+! a2-4 1) + ) + ) + ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie-vanish)) + (let ((a2-11 (-> a1-4 vanish-count)) + (t0-4 (-> a1-4 tie-geom 3)) + ) + (when (nonzero? a2-11) + (let ((a3-2 (the-as object (-> t0-4 data))) + (t0-5 (-> t0-4 length)) + ) + (+! (-> *terrain-stats* tie-vanish groups) 1) + (+! (-> *terrain-stats* tie-vanish fragments) t0-5) + (+! (-> *terrain-stats* tie-vanish instances) a2-11) + (dotimes (t1-15 t0-5) + (let ((t3-10 (* (-> (the-as tie-fragment a3-2) debug num-tris) a2-11)) + (t2-9 (* (-> (the-as tie-fragment a3-2) debug num-dverts) a2-11)) + ) + (+! (-> *terrain-stats* tie-vanish tris) t3-10) + (+! (-> *terrain-stats* tie-vanish dverts) t2-9) + ) + (set! a3-2 (&+ (the-as tie-fragment a3-2) 64)) + ) + ) + ) + ) + ) + (cond + ((logtest? (-> a1-4 flags) (prototype-flags tpage-water)) + (when (logtest? (vu1-renderer-mask tie-water) (-> *display* vu1-enable-user)) + (let ((a2-18 1) + (a3-6 3) + ) + (while (>= a3-6 a2-18) + (let ((t0-8 (-> a1-4 count a2-18)) + (t2-11 (-> a1-4 tie-geom a2-18)) + ) + (when (nonzero? t0-8) + (let ((t1-19 (the-as object (-> t2-11 data))) + (t2-12 (-> t2-11 length)) + ) + (+! (-> *terrain-stats* tie-water groups) 1) + (+! (-> *terrain-stats* tie-water fragments) t2-12) + (+! (-> *terrain-stats* tie-water instances) t0-8) + (dotimes (t3-24 t2-12) + (let ((t5-5 (* (-> (the-as tie-fragment t1-19) debug num-tris) t0-8)) + (t4-19 (* (-> (the-as tie-fragment t1-19) debug num-dverts) t0-8)) + ) + (+! (-> *terrain-stats* tie-water tris) t5-5) + (+! (-> *terrain-stats* tie-water dverts) t4-19) + ) + (set! t1-19 (&+ (the-as tie-fragment t1-19) 64)) + ) + ) + ) + ) + (+! a2-18 1) + ) + ) + ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie-scissor)) + (let ((a2-25 (-> a1-4 tie-scissor-count)) + (t0-10 (-> a1-4 tie-geom 0)) + ) + (when (nonzero? a2-25) + (let ((a3-8 (the-as object (-> t0-10 data))) + (t0-11 (-> t0-10 length)) + ) + (+! (-> *terrain-stats* tie-scissor-water groups) 1) + (+! (-> *terrain-stats* tie-scissor-water fragments) t0-11) + (+! (-> *terrain-stats* tie-scissor-water instances) a2-25) + (dotimes (t1-30 t0-11) + (let ((t3-25 (* (-> (the-as tie-fragment a3-8) debug num-tris) a2-25)) + (t2-20 (* (-> (the-as tie-fragment a3-8) debug num-dverts) a2-25)) + ) + (+! (-> *terrain-stats* tie-scissor-water tris) t3-25) + (+! (-> *terrain-stats* tie-scissor-water dverts) t2-20) + ) + (set! a3-8 (&+ (the-as tie-fragment a3-8) 64)) + ) + ) + ) + ) + ) + (when (logtest? (vu1-renderer-mask etie-water) (-> *display* vu1-enable-user)) + (let ((a2-30 1) + (a3-12 3) + ) + (while (>= a3-12 a2-30) + (let ((t0-14 (-> a1-4 envmap-count a2-30)) + (t2-22 (-> a1-4 tie-geom a2-30)) + ) + (when (nonzero? t0-14) + (let ((t1-34 (the-as object (-> t2-22 data))) + (t2-23 (-> t2-22 length)) + ) + (+! (-> *terrain-stats* tie-envmap-water groups) 1) + (+! (-> *terrain-stats* tie-envmap-water fragments) t2-23) + (+! (-> *terrain-stats* tie-envmap-water instances) t0-14) + (dotimes (t3-39 t2-23) + (let ((t5-10 (* (* t0-14 (-> (the-as tie-fragment t1-34) debug num-tris)) 2)) + (t4-33 (* (* t0-14 (-> (the-as tie-fragment t1-34) debug num-dverts)) 2)) + ) + (+! (-> *terrain-stats* tie-envmap-water tris) t5-10) + (+! (-> *terrain-stats* tie-envmap-water dverts) t4-33) + ) + (set! t1-34 (&+ (the-as tie-fragment t1-34) 64)) + ) + ) + ) + ) + (+! a2-30 1) + ) + ) + ) + (when (logtest? (vu1-renderer-mask etie-scissor-water) (-> *display* vu1-enable-user)) + (let ((a2-35 (-> a1-4 envmap-scissor-count)) + (t0-16 (-> a1-4 tie-geom 0)) + ) + (when (nonzero? a2-35) + (let ((a1-5 (the-as object (-> t0-16 data))) + (a3-17 (-> t0-16 length)) + ) + (+! (-> *terrain-stats* tie-envmap-scissor-water groups) 1) + (+! (-> *terrain-stats* tie-envmap-scissor-water fragments) a3-17) + (+! (-> *terrain-stats* tie-envmap-scissor-water instances) a2-35) + (dotimes (t0-26 a3-17) + (let ((t2-24 (* (* a2-35 (-> (the-as tie-fragment a1-5) debug num-tris)) 2)) + (t1-45 (* (* a2-35 (-> (the-as tie-fragment a1-5) debug num-dverts)) 2)) + ) + (+! (-> *terrain-stats* tie-envmap-scissor-water tris) t2-24) + (+! (-> *terrain-stats* tie-envmap-scissor-water dverts) t1-45) + ) + (set! a1-5 (&+ (the-as tie-fragment a1-5) 64)) + ) + ) + ) + ) + ) + ) + ((logtest? (-> a1-4 flags) (prototype-flags tpage-alpha)) + (when (logtest? (vu1-renderer-mask tie-trans) (-> *display* vu1-enable-user)) + (let ((a2-41 1) + (a3-21 3) + ) + (while (>= a3-21 a2-41) + (let ((t0-29 (-> a1-4 count a2-41)) + (t2-29 (-> a1-4 tie-geom a2-41)) + ) + (when (nonzero? t0-29) + (let ((t1-50 (the-as object (-> t2-29 data))) + (t2-30 (-> t2-29 length)) + ) + (+! (-> *terrain-stats* tie-trans groups) 1) + (+! (-> *terrain-stats* tie-trans fragments) t2-30) + (+! (-> *terrain-stats* tie-trans instances) t0-29) + (dotimes (t3-52 t2-30) + (let ((t5-15 (* (-> (the-as tie-fragment t1-50) debug num-tris) t0-29)) + (t4-42 (* (-> (the-as tie-fragment t1-50) debug num-dverts) t0-29)) + ) + (+! (-> *terrain-stats* tie-trans tris) t5-15) + (+! (-> *terrain-stats* tie-trans dverts) t4-42) + ) + (set! t1-50 (&+ (the-as tie-fragment t1-50) 64)) + ) + ) + ) + ) + (+! a2-41 1) + ) + ) + ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie-scissor)) + (let ((a2-48 (-> a1-4 tie-scissor-count)) + (t0-31 (-> a1-4 tie-geom 0)) + ) + (when (nonzero? a2-48) + (let ((a3-23 (the-as object (-> t0-31 data))) + (t0-32 (-> t0-31 length)) + ) + (+! (-> *terrain-stats* tie-scissor-trans groups) 1) + (+! (-> *terrain-stats* tie-scissor-trans fragments) t0-32) + (+! (-> *terrain-stats* tie-scissor-trans instances) a2-48) + (dotimes (t1-61 t0-32) + (let ((t3-53 (* (-> (the-as tie-fragment a3-23) debug num-tris) a2-48)) + (t2-38 (* (-> (the-as tie-fragment a3-23) debug num-dverts) a2-48)) + ) + (+! (-> *terrain-stats* tie-scissor-trans tris) t3-53) + (+! (-> *terrain-stats* tie-scissor-trans dverts) t2-38) + ) + (set! a3-23 (&+ (the-as tie-fragment a3-23) 64)) + ) + ) + ) + ) + ) + (when (logtest? (vu1-renderer-mask etie-trans) (-> *display* vu1-enable-user)) + (let ((a2-53 1) + (a3-27 3) + ) + (while (>= a3-27 a2-53) + (let ((t0-35 (-> a1-4 envmap-count a2-53)) + (t2-40 (-> a1-4 tie-geom a2-53)) + ) + (when (nonzero? t0-35) + (let ((t1-65 (the-as object (-> t2-40 data))) + (t2-41 (-> t2-40 length)) + ) + (+! (-> *terrain-stats* tie-envmap-trans groups) 1) + (+! (-> *terrain-stats* tie-envmap-trans fragments) t2-41) + (+! (-> *terrain-stats* tie-envmap-trans instances) t0-35) + (dotimes (t3-67 t2-41) + (let ((t5-20 (* (* t0-35 (-> (the-as tie-fragment t1-65) debug num-tris)) 2)) + (t4-56 (* (* t0-35 (-> (the-as tie-fragment t1-65) debug num-dverts)) 2)) + ) + (+! (-> *terrain-stats* tie-envmap-trans tris) t5-20) + (+! (-> *terrain-stats* tie-envmap-trans dverts) t4-56) + ) + (set! t1-65 (&+ (the-as tie-fragment t1-65) 64)) + ) + ) + ) + ) + (+! a2-53 1) + ) + ) + ) + (when (logtest? (vu1-renderer-mask etie-scissor-trans) (-> *display* vu1-enable-user)) + (let ((a2-58 (-> a1-4 envmap-scissor-count)) + (t0-37 (-> a1-4 tie-geom 0)) + ) + (when (nonzero? a2-58) + (let ((a1-7 (the-as object (-> t0-37 data))) + (a3-32 (-> t0-37 length)) + ) + (+! (-> *terrain-stats* tie-envmap-scissor-trans groups) 1) + (+! (-> *terrain-stats* tie-envmap-scissor-trans fragments) a3-32) + (+! (-> *terrain-stats* tie-envmap-scissor-trans instances) a2-58) + (dotimes (t0-47 a3-32) + (let ((t2-42 (* (* a2-58 (-> (the-as tie-fragment a1-7) debug num-tris)) 2)) + (t1-76 (* (* a2-58 (-> (the-as tie-fragment a1-7) debug num-dverts)) 2)) + ) + (+! (-> *terrain-stats* tie-envmap-scissor-trans tris) t2-42) + (+! (-> *terrain-stats* tie-envmap-scissor-trans dverts) t1-76) + ) + (set! a1-7 (&+ (the-as tie-fragment a1-7) 64)) + ) + ) + ) + ) + ) + ) + (else + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie)) + (let ((a2-63 1) + (a3-34 3) + ) + (while (>= a3-34 a2-63) + (let ((t0-50 (-> a1-4 count a2-63)) + (t2-47 (-> a1-4 tie-geom a2-63)) + ) + (when (nonzero? t0-50) + (let ((t1-81 (the-as object (-> t2-47 data))) + (t2-48 (-> t2-47 length)) + ) + (+! (-> *terrain-stats* tie groups) 1) + (+! (-> *terrain-stats* tie fragments) t2-48) + (+! (-> *terrain-stats* tie instances) t0-50) + (dotimes (t3-80 t2-48) + (let ((t5-25 (* (-> (the-as tie-fragment t1-81) debug num-tris) t0-50)) + (t4-65 (* (-> (the-as tie-fragment t1-81) debug num-dverts) t0-50)) + ) + (+! (-> *terrain-stats* tie tris) t5-25) + (+! (-> *terrain-stats* tie dverts) t4-65) + ) + (set! t1-81 (&+ (the-as tie-fragment t1-81) 64)) + ) + ) + ) + ) + (+! a2-63 1) + ) + ) + ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie-scissor)) + (let ((a2-70 (-> a1-4 tie-scissor-count)) + (t0-52 (-> a1-4 tie-geom 0)) + ) + (when (nonzero? a2-70) + (let ((a3-36 (the-as object (-> t0-52 data))) + (t0-53 (-> t0-52 length)) + ) + (+! (-> *terrain-stats* tie-scissor groups) 1) + (+! (-> *terrain-stats* tie-scissor fragments) t0-53) + (+! (-> *terrain-stats* tie-scissor instances) a2-70) + (dotimes (t1-92 t0-53) + (let ((t3-81 (* (-> (the-as tie-fragment a3-36) debug num-tris) a2-70)) + (t2-56 (* (-> (the-as tie-fragment a3-36) debug num-dverts) a2-70)) + ) + (+! (-> *terrain-stats* tie-scissor tris) t3-81) + (+! (-> *terrain-stats* tie-scissor dverts) t2-56) + ) + (set! a3-36 (&+ (the-as tie-fragment a3-36) 64)) + ) + ) + ) + ) + ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask etie)) + (let ((a2-76 1) + (a3-38 3) + ) + (while (>= a3-38 a2-76) + (let ((t0-56 (-> a1-4 envmap-count a2-76)) + (t2-58 (-> a1-4 tie-geom a2-76)) + ) + (when (nonzero? t0-56) + (let ((t1-96 (the-as object (-> t2-58 data))) + (t2-59 (-> t2-58 length)) + ) + (+! (-> *terrain-stats* tie-envmap groups) 1) + (+! (-> *terrain-stats* tie-envmap fragments) t2-59) + (+! (-> *terrain-stats* tie-envmap instances) t0-56) + (dotimes (t3-95 t2-59) + (let ((t5-30 (* (* t0-56 (-> (the-as tie-fragment t1-96) debug num-tris)) 2)) + (t4-79 (* (* t0-56 (-> (the-as tie-fragment t1-96) debug num-dverts)) 2)) + ) + (+! (-> *terrain-stats* tie-envmap tris) t5-30) + (+! (-> *terrain-stats* tie-envmap dverts) t4-79) + ) + (set! t1-96 (&+ (the-as tie-fragment t1-96) 64)) + ) + ) + ) + ) + (+! a2-76 1) + ) + ) + ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask etie-scissor)) + (let ((a2-82 (-> a1-4 envmap-scissor-count)) + (t0-58 (-> a1-4 tie-geom 0)) + ) + (when (nonzero? a2-82) + (let ((a1-9 (the-as object (-> t0-58 data))) + (a3-41 (-> t0-58 length)) + ) + (+! (-> *terrain-stats* tie-envmap-scissor groups) 1) + (+! (-> *terrain-stats* tie-envmap-scissor fragments) a3-41) + (+! (-> *terrain-stats* tie-envmap-scissor instances) a2-82) + (dotimes (t0-68 a3-41) + (let ((t2-60 (* (* a2-82 (-> (the-as tie-fragment a1-9) debug num-tris)) 2)) + (t1-107 (* (* a2-82 (-> (the-as tie-fragment a1-9) debug num-dverts)) 2)) + ) + (+! (-> *terrain-stats* tie-envmap-scissor tris) t2-60) + (+! (-> *terrain-stats* tie-envmap-scissor dverts) t1-107) + ) + (set! a1-9 (&+ (the-as tie-fragment a1-9) 64)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod debug-draw ((this drawable-tree-instance-tie)) + "Debug-draw a drawable and its children. Typically uses the debug-draw functions." + (-> this data (+ (-> this length) -1)) + (let* ((gp-0 (-> this prototypes prototype-array-tie)) + (s5-0 (-> gp-0 length)) + ) + (dotimes (s4-0 s5-0) + (debug-draw (-> gp-0 array-data s4-0 tie-geom 0)) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/gfx/background/tie/tie-near.gc b/goal_src/jak3/engine/gfx/background/tie/tie-near.gc index 779569c7a4..af445d29ef 100644 --- a/goal_src/jak3/engine/gfx/background/tie/tie-near.gc +++ b/goal_src/jak3/engine/gfx/background/tie/tie-near.gc @@ -7,3 +7,7 @@ ;; DECOMP BEGINS +(defun tie-scissor-make-perspective-matrix ((arg0 matrix) (arg1 matrix)) + (column-scale-matrix! arg0 (-> *math-camera* hmge-scale) arg1) + (none) + ) \ No newline at end of file diff --git a/goal_src/jak3/engine/gfx/background/tie/tie-work.gc b/goal_src/jak3/engine/gfx/background/tie/tie-work.gc index 1f4a6b66e7..b23a618ba6 100644 --- a/goal_src/jak3/engine/gfx/background/tie/tie-work.gc +++ b/goal_src/jak3/engine/gfx/background/tie/tie-work.gc @@ -9,3 +9,162 @@ ;; DECOMP BEGINS +(define *instance-tie-work* (new 'static 'instance-tie-work + :wind-const (new 'static 'vector :x 0.5 :y 100.0 :z 0.0166 :w -1.0) + :constant (new 'static 'vector :x 4096.0 :y 128.0) + :far-morph (new 'static 'vector :x 1.0 :w 256.0) + :upload-color-0 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x80c6 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :upload-color-1 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :cmd (vif-cmd stmod)) + :vif1 (new 'static 'vif-tag :imm #xc0cc :cmd (vif-cmd unpack-v4-8)) + ) + :upload-color-2 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :cmd (vif-cmd stmod)) + ) + :upload-color-ret (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ret)) + :vif0 (new 'static 'vif-tag :cmd (vif-cmd stmod)) + ) + :generic-color-0 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x3) + ) + :generic-color-1 (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref))) + :generic-color-end (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id end))) + :envmap-color-0 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x8 :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x8000 :num #x8 :cmd (vif-cmd unpack-v4-32)) + ) + :envmap-color-1 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :cmd (vif-cmd stmod)) + :vif1 (new 'static 'vif-tag :imm #xc008 :cmd (vif-cmd unpack-v4-8)) + ) + :refl-fade-fac -0.000625 + :refl-fade-end 409600.0 + :use-etie #t + ) + ) + +(set! (-> *instance-tie-work* upload-color-2 vif1) (new 'static 'vif-tag :cmd (vif-cmd mscal) :msk #x1)) + +(set! (-> *instance-tie-work* upload-color-ret vif1) (new 'static 'vif-tag :cmd (vif-cmd mscal) :msk #x1)) + +(define *prototype-tie-work* (new 'static 'prototype-tie-work + :upload-flushe (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :cmd (vif-cmd flushe) :msk #x1) + ) + :upload-palette (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x20 :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x1 :cmd (vif-cmd stmod)) + :vif1 (new 'static 'vif-tag :imm #x4346 :num #x80 :cmd (vif-cmd unpack-v4-8)) + ) + :upload-model-0 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :cmd (vif-cmd stmod)) + :vif1 (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32)) + ) + :upload-model-1 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x4000 :cmd (vif-cmd unpack-v4-8)) + ) + :upload-model-2 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x32 :cmd (vif-cmd unpack-v4-16)) + ) + :upload-model-3 (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id call))) + :upload-model-near-0 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :cmd (vif-cmd stmod)) + :vif1 (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32)) + ) + :upload-model-near-1 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x4000 :cmd (vif-cmd unpack-v4-8)) + ) + :upload-model-near-2 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x1e :cmd (vif-cmd unpack-v4-8)) + ) + :upload-model-near-3 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x32 :cmd (vif-cmd unpack-v4-16)) + ) + :upload-model-near-4 (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id call))) + :envmap-palette (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x20 :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x1 :cmd (vif-cmd stmod)) + :vif1 (new 'static 'vif-tag :imm #x4302 :num #x80 :cmd (vif-cmd unpack-v4-8)) + ) + :envmap-shader (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x5 :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :cmd (vif-cmd stmod)) + :vif1 (new 'static 'vif-tag :imm #x387 :num #x5 :cmd (vif-cmd unpack-v4-32)) + ) + :upload-envmap-0 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #xb8 :cmd (vif-cmd base)) + :vif1 (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32)) + ) + :upload-envmap-1 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x20 :cmd (vif-cmd offset)) + :vif1 (new 'static 'vif-tag :imm #x4000 :cmd (vif-cmd unpack-v4-8)) + ) + :upload-envmap-2 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x20 :cmd (vif-cmd unpack-v4-16)) + ) + :upload-envmap-3 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x84 :cmd (vif-cmd unpack-v4-8)) + ) + :upload-envmap-4 (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id call))) + :upload-envmap-scissor-4 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #xac :cmd (vif-cmd unpack-v4-8)) + ) + :generic-palette (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x20 :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x1) + ) + :generic-model-0 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x2) + ) + :generic-model-1 (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref))) + :generic-model-2 (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref))) + :model-next (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id next))) + :clamp #x8000ff00ff00ff + ) + ) + +(set! (-> *prototype-tie-work* upload-model-1 vif0) + (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd mscal) :msk #x1) + ) + +(set! (-> *prototype-tie-work* upload-model-3 vif0) + (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd mscal) :msk #x1) + ) + +(set! (-> *prototype-tie-work* upload-model-near-1 vif0) + (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd mscal) :msk #x1) + ) + +(set! (-> *prototype-tie-work* upload-model-near-4 vif0) + (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd mscal) :msk #x1) + ) + +(set! (-> *prototype-tie-work* upload-envmap-2 vif0) + (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd mscalf) :msk #x1) + ) + +(set! (-> *prototype-tie-work* upload-envmap-4 vif1) + (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) diff --git a/goal_src/jak3/engine/gfx/background/tie/tie.gc b/goal_src/jak3/engine/gfx/background/tie/tie.gc index d690c5ca21..86358bb424 100644 --- a/goal_src/jak3/engine/gfx/background/tie/tie.gc +++ b/goal_src/jak3/engine/gfx/background/tie/tie.gc @@ -7,3 +7,653 @@ ;; DECOMP BEGINS +(defmethod login ((this tie-fragment)) + "Initialize the object after it is loaded." + (let ((s5-0 (the-as adgif-shader (-> this gif-ref))) + (s4-0 (/ (-> this tex-count) (the-as uint 5))) + ) + (dotimes (s3-0 (the-as int s4-0)) + (let ((v1-1 (adgif-shader-login-no-remap s5-0))) + (when v1-1 + (dotimes (a0-4 3) + (dotimes (a1-0 3) + (set! (-> (the-as (pointer int32) (+ (+ (* a0-4 16) (* a1-0 4)) (the-as int *texture-masks*)))) + (logior (-> (the-as (pointer int32) (+ (* a1-0 4) (the-as int *texture-masks*) (* a0-4 16))) 0) + (-> (the-as (pointer int32) (+ (* a1-0 4) (the-as int v1-1) (* a0-4 16))) 15) + ) + ) + ) + (set! (-> *texture-masks* data a0-4 dist) + (fmax (-> *texture-masks* data a0-4 dist) (-> v1-1 masks data a0-4 dist)) + ) + ) + ) + ) + (when (= (-> s5-0 reg-4) 66) + (set! (-> s5-0 reg-4) (the-as uint 127)) + (set! (-> s5-0 alpha) (new 'static 'gs-miptbp)) + 0 + ) + (&+! s5-0 80) + ) + ) + this + ) + + +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this drawable-inline-array-instance-tie)) + (the-as int (+ (-> drawable-inline-array-instance-tie size) (* (+ (-> this length) -1) 64))) + ) + +; (defmethod login ((this drawable-tree-instance-tie)) +; "Initialize the object after it is loaded." +; this +; ) + +(defmethod login ((this drawable-tree-instance-tie)) + "Initialize the object after it is loaded." + (dotimes (s5-0 (-> this length)) + (login (-> this data s5-0)) + ) + this + ) + + +(defmethod login ((this prototype-tie)) + "Initialize the object after it is loaded." + (dotimes (s5-0 (-> this length)) + (login (-> this data s5-0)) + ) + this + ) + +(defmethod mem-usage ((this drawable-tree-instance-tie) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-5 32)) + (+! (-> usage data 0 used) v1-5) + (+! (-> usage data 0 total) (logand -16 (+ v1-5 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this data s3-0) usage flags) + ) + (mem-usage (-> this prototypes prototype-array-tie) usage (logior flags 1)) + this + ) + +(defmethod mem-usage ((this tie-fragment) (usage memory-usage-block) (flags int)) + (when (logtest? flags 2) + (let ((v1-3 (* (-> this color-count) 4)) + (a0-2 (cond + ((logtest? flags 4) + 20 + ) + ((logtest? flags 8) + 21 + ) + (else + 22 + ) + ) + ) + ) + (+! (-> usage data a0-2 count) 1) + (+! (-> usage data a0-2 used) v1-3) + (+! (-> usage data a0-2 total) (logand -4 (+ v1-3 3))) + ) + (set! (-> usage length) (max 23 (-> usage length))) + (set! this this) + (goto cfg-13) + ) + (set! (-> usage length) (max 18 (-> usage length))) + (set! (-> usage data 9 name) "tie-fragment") + (set! (-> usage data 10 name) "tie-gif") + (set! (-> usage data 11 name) "tie-points") + (set! (-> usage data 12 name) "tie-colors") + (set! (-> usage data 14 name) "tie-debug") + (set! (-> usage data 13 name) "tie-draw-points") + (set! (-> usage data 17 name) "tie-generic") + (+! (-> usage data 9 count) 1) + (let ((v1-21 (asize-of this))) + (+! (-> usage data 9 used) v1-21) + (+! (-> usage data 9 total) (logand -16 (+ v1-21 15))) + ) + (let ((v1-26 (* (-> this gif-count) 16))) + (+! (-> usage data 10 count) (-> this tex-count)) + (+! (-> usage data 10 used) v1-26) + (+! (-> usage data 10 total) (logand -16 (+ v1-26 15))) + ) + (let ((v1-31 (* (-> this vertex-count) 16))) + (+! (-> usage data 11 count) (-> this vertex-count)) + (+! (-> usage data 11 used) v1-31) + (+! (-> usage data 11 total) (logand -16 (+ v1-31 15))) + ) + (let ((v1-36 (* (-> this dp-qwc) 16))) + (+! (-> usage data 13 count) (* (-> this dp-qwc) 16)) + (+! (-> usage data 13 used) v1-36) + (+! (-> usage data 13 total) (logand -16 (+ v1-36 15))) + ) + (let ((v1-41 (* (-> this generic-count) 16))) + (+! (-> usage data 17 count) 1) + (+! (-> usage data 17 used) v1-41) + (+! (-> usage data 17 total) (logand -16 (+ v1-41 15))) + ) + (let ((s4-0 (-> this debug debug-lines))) + (when (nonzero? s4-0) + (dotimes (s3-0 (-> s4-0 length)) + (+! (-> usage data 14 count) (-> s4-0 s3-0 length)) + (let ((v1-52 (asize-of (-> s4-0 s3-0)))) + (+! (-> usage data 12 used) v1-52) + (+! (-> usage data 12 total) (logand -16 (+ v1-52 15))) + ) + ) + ) + ) + (label cfg-13) + this + ) + +(defmethod mem-usage ((this instance-tie) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 19 (-> usage length))) + (set! (-> usage data 18 name) "instance-tie") + (+! (-> usage data 18 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 18 used) v1-6) + (+! (-> usage data 18 total) (logand -16 (+ v1-6 15))) + ) + (when (nonzero? (-> this color-indices)) + (set! (-> usage length) (max 24 (-> usage length))) + (set! (-> usage data 23 name) "instance-tie-colors*") + (set! (-> usage data 19 name) "instance-tie-colors0") + (set! (-> usage data 20 name) "instance-tie-colors1") + (set! (-> usage data 21 name) "instance-tie-colors2") + (set! (-> usage data 22 name) "instance-tie-colors3") + (+! (-> usage data 23 count) 1) + (let ((s3-0 (-> this bucket-ptr))) + (+ (-> usage data 19 used) (-> usage data 20 used) (-> usage data 21 used) (-> usage data 22 used)) + (dotimes (s2-0 4) + (let ((a0-10 (-> s3-0 tie-geom s2-0))) + (when (nonzero? a0-10) + (let ((t9-1 (method-of-object a0-10 mem-usage)) + (a1-2 usage) + (v1-29 s2-0) + ) + (t9-1 a0-10 a1-2 (logior (logior (cond + ((= v1-29 1) + 4 + ) + ((= v1-29 2) + 8 + ) + ((= v1-29 3) + 16 + ) + (else + 0 + ) + ) + 2 + ) + flags + ) + ) + ) + ) + ) + ) + ) + ) + this + ) + +(defmethod mem-usage ((this drawable-inline-array-instance-tie) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-5 32)) + (+! (-> usage data 0 used) v1-5) + (+! (-> usage data 0 total) (logand -16 (+ v1-5 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this data s3-0) usage flags) + ) + this + ) + +(defmethod mem-usage ((this prototype-tie) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-5 32)) + (+! (-> usage data 0 used) v1-5) + (+! (-> usage data 0 total) (logand -16 (+ v1-5 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this data s3-0) usage flags) + ) + this + ) + +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this prototype-tie)) + (the-as int (+ (-> prototype-tie size) (* (+ (-> this length) -1) 64))) + ) + +(deftype tie-consts (structure) + ((data uint32 40) + (vector vector 10 :inline :overlay-at (-> data 0)) + (quads uint128 10 :overlay-at (-> data 0)) + (adgif gs-gif-tag :inline :overlay-at (-> data 0)) + (strgif gs-gif-tag :inline :overlay-at (-> data 4)) + (extra vector :inline :overlay-at (-> data 8)) + (gifbufs vector :inline :overlay-at (-> data 12)) + (clrbufs qword :inline :overlay-at (-> data 16)) + (misc qword :inline :overlay-at (-> data 20)) + (atestgif gs-gif-tag :inline :overlay-at (-> data 24)) + (alpha gs-adcmd :inline :overlay-at (-> data 28)) + (atest gs-adcmd 2 :inline :overlay-at (-> data 32)) + (atest-tra gs-adcmd :inline :overlay-at (-> data 32)) + (atest-def gs-adcmd :inline :overlay-at (-> data 36)) + ) + ) + + +(define tie-vu1-block (new 'static 'vu-function #|:length #x3e7 :qlength #x1f4|#)) + +(defun tie-init-consts ((arg0 tie-consts) (arg1 gs-alpha) (arg2 gs-test) (arg3 gs-test)) + "Set up tie-consts for VU1" + (set! (-> arg0 adgif tag) (new 'static 'gif-tag64 :nloop #x5 :nreg #x1)) + (set! (-> arg0 adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (case *subdivide-draw-mode* + (((subdivide-setting textured)) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting outline)) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting gouraud)) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting hack)) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :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 strgif regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (let ((f0-0 8388894.0) + (f1-0 8389078.0) + (f2-0 8389262.0) + ) + (set! (-> arg0 gifbufs x) f2-0) + (set! (-> arg0 gifbufs y) f1-0) + (set! (-> arg0 gifbufs z) f2-0) + (set! (-> arg0 gifbufs w) f1-0) + (set! (-> arg0 extra x) (+ f0-0 f1-0 f2-0)) + (set! (-> arg0 extra y) 0.0) + (set! (-> arg0 extra z) (+ f0-0 f1-0 f2-0)) + ) + (set! (-> arg0 clrbufs vector4w x) 198) + (set! (-> arg0 clrbufs vector4w y) 242) + (set! (-> arg0 clrbufs vector4w z) 198) + (set! (-> arg0 clrbufs vector4w w) 242) + (set! (-> arg0 atestgif tag) (new 'static 'gif-tag64 :nloop #x2 :eop #x1 :nreg #x1)) + (set! (-> arg0 atestgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (set! (-> arg0 alpha data) (the-as uint arg1)) + (set! (-> arg0 alpha cmds) (gs-reg64 alpha-1)) + (set! (-> arg0 atest-tra cmds) (gs-reg64 test-1)) + (set! (-> arg0 atest-tra data) (the-as uint arg2)) + (set! (-> arg0 atest-def cmds) (gs-reg64 test-1)) + (set! (-> arg0 atest-def data) (the-as uint arg3)) + (set! (-> arg0 misc vector4w x) 0) + (set! (-> arg0 misc vector4w y) -1) + (none) + ) + +(defun tie-init-engine ((arg0 dma-buffer) (arg1 gs-alpha) (arg2 gs-test) (arg3 gs-test)) + "Set up DMA to initialize TIE vu1." + (let ((v1-0 *display*) + (a0-6 (+ (* (+ (/ (-> tie-vu1-block qlength) 127) 1) 16) 240)) + ) + (+! (-> v1-0 mem-reserve-size) a0-6) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((a2-1 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> a2-1 real-buffer-end) (the-as int (&+ (-> a2-1 base) a0-6))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (dma-buffer-add-vu-function arg0 tie-vu1-block 1) + (let ((s2-0 10)) + (let* ((v1-2 arg0) + (a0-11 (the-as dma-packet (-> v1-2 base))) + ) + (set! (-> a0-11 dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc s2-0)) + (set! (-> a0-11 vif0) (new 'static 'vif-tag :cmd (vif-cmd stmod))) + (set! (-> a0-11 vif1) (new 'static 'vif-tag :imm #x3c6 :cmd (vif-cmd unpack-v4-32) :num s2-0)) + (set! (-> v1-2 base) (the-as pointer (&+ a0-11 16))) + ) + (tie-init-consts (the-as tie-consts (-> arg0 base)) arg1 arg2 arg3) + (&+! (-> arg0 base) (* s2-0 16)) + ) + (let* ((v1-5 arg0) + (a0-15 (the-as dma-packet (-> v1-5 base))) + ) + (set! (-> a0-15 dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> a0-15 vif0) (new 'static 'vif-tag :imm #x8 :cmd (vif-cmd mscalf) :msk #x1)) + (set! (-> a0-15 vif1) (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1)) + (set! (-> v1-5 base) (the-as pointer (&+ a0-15 16))) + ) + (let* ((v1-6 arg0) + (a0-17 (the-as dma-packet (-> v1-6 base))) + ) + (set! (-> a0-17 dma) (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id cnt))) + (set! (-> a0-17 vif0) (new 'static 'vif-tag)) + (set! (-> a0-17 vif1) (new 'static 'vif-tag :cmd (vif-cmd strow) :msk #x1)) + (set! (-> v1-6 base) (the-as pointer (&+ a0-17 16))) + ) + (let ((v1-7 (the-as object (-> arg0 base)))) + (set! (-> (the-as vector v1-7) x) 8388608.0) + (set! (-> (the-as vector v1-7) y) 8388608.0) + (set! (-> (the-as vector v1-7) z) 8388608.0) + (set! (-> (the-as vector v1-7) w) 8388608.0) + (set! (-> (the-as (pointer vif-tag) v1-7) 4) (new 'static 'vif-tag :cmd (vif-cmd base))) + (set! (-> (the-as (pointer vif-tag) v1-7) 5) (new 'static 'vif-tag :imm #x2c :cmd (vif-cmd offset))) + (set! (-> (the-as (pointer vif-tag) v1-7) 6) (new 'static 'vif-tag :cmd (vif-cmd stmod))) + (set! (-> (the-as (pointer vif-tag) v1-7) 7) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> arg0 base) (&+ (the-as pointer v1-7) 32)) + ) + ) + ) + ) + 0 + (none) + ) + +(defun tie-end-buffer ((arg0 dma-buffer)) + "Set up DMA to finish TIE." + (let ((v1-0 *display*) + (a1-0 96) + ) + (+! (-> v1-0 mem-reserve-size) a1-0) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((a3-0 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> a3-0 real-buffer-end) (the-as int (&+ (-> a3-0 base) a1-0))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (dma-buffer-add-gs-set arg0 (test-1 (new 'static 'gs-test :zte #x1 :ztst (gs-ztest greater-equal)))) + (let* ((v1-5 arg0) + (a1-10 (the-as dma-packet (-> v1-5 base))) + ) + (set! (-> a1-10 dma) (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id cnt))) + (set! (-> a1-10 vif0) (new 'static 'vif-tag :cmd (vif-cmd stmask))) + (set! (-> a1-10 vif1) (new 'static 'vif-tag)) + (set! (-> v1-5 base) (the-as pointer (&+ a1-10 16))) + ) + (let* ((v1-6 arg0) + (a0-1 (-> v1-6 base)) + ) + (set! (-> (the-as (pointer vif-tag) a0-1) 0) (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd mscalf) :msk #x1)) + (set! (-> (the-as (pointer vif-tag) a0-1) 1) (new 'static 'vif-tag :cmd (vif-cmd stmod))) + (set! (-> (the-as (pointer vif-tag) a0-1) 2) (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1)) + (set! (-> (the-as (pointer vif-tag) a0-1) 3) (new 'static 'vif-tag :cmd (vif-cmd strow) :msk #x1)) + (set! (-> (the-as (pointer vif-tag) a0-1) 4) (new 'static 'vif-tag)) + (set! (-> (the-as (pointer vif-tag) a0-1) 5) (new 'static 'vif-tag)) + (set! (-> (the-as (pointer vif-tag) a0-1) 6) (new 'static 'vif-tag)) + (set! (-> (the-as (pointer vif-tag) a0-1) 7) (new 'static 'vif-tag)) + (set! (-> v1-6 base) (&+ a0-1 32)) + ) + ) + ) + ) + 0 + (none) + ) + +(defun-debug tie-int-reg ((arg0 int)) + "Get the name of TIE VU1 program integer register." + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + "zero" + ) + ((= v1-0 1) + "itemp" + ) + ((= v1-0 2) + "point-ptr" + ) + ((= v1-0 3) + "clr-ptr" + ) + ((= v1-0 4) + "target-bp1-ptr" + ) + ((= v1-0 5) + "skip-bp2" + ) + ((= v1-0 6) + "target-bp2-ptr" + ) + ((= v1-0 7) + "target-ip1-ptr" + ) + ((= v1-0 8) + "target-ip2-ptr" + ) + ((= v1-0 9) + "ind/ind0" + ) + ((= v1-0 10) + " ind1" + ) + ((= v1-0 11) + " ind2" + ) + ((= v1-0 12) + "dest-ptr" + ) + ((= v1-0 13) + "dest2-ptr" + ) + ((= v1-0 14) + "skip-ips" + ) + ((= v1-0 15) + "kick-addr" + ) + ) + ) + ) + +(defun-debug tie-float-reg ((arg0 int)) + "Get the name of TIE VU1 program float register." + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + "zero" + ) + ((= v1-0 1) + "t-mtx0" + ) + ((= v1-0 2) + "t-mtx1" + ) + ((= v1-0 3) + "t-mtx2" + ) + ((= v1-0 4) + "t-mtx3" + ) + ((= v1-0 5) + "vtx-0" + ) + ((= v1-0 6) + "vtx-1" + ) + ((= v1-0 7) + "vtx-2" + ) + ((= v1-0 8) + "vtx-3" + ) + ((= v1-0 9) + "pos-0/2" + ) + ((= v1-0 10) + "pos-1/3" + ) + ((= v1-0 11) + "clr-0" + ) + ((= v1-0 12) + "clr-1" + ) + ((= v1-0 13) + "clr-2" + ) + ((= v1-0 14) + "clr-3" + ) + ((= v1-0 15) + "tex-0" + ) + ((= v1-0 16) + "tex-1" + ) + ((= v1-0 17) + "tex-2" + ) + ((= v1-0 18) + "tex-3" + ) + ((= v1-0 19) + "res-0/2" + ) + ((= v1-0 20) + "res-1/3" + ) + ((= v1-0 21) + "gifbuf" + ) + ((= v1-0 22) + "clrbuf" + ) + ((= v1-0 23) + "extra" + ) + ((= v1-0 24) + "inds" + ) + ((= v1-0 25) + "--" + ) + ((= v1-0 26) + "--" + ) + ((= v1-0 27) + "morph" + ) + ((= v1-0 28) + "xyzofs" + ) + ((= v1-0 29) + "clr1" + ) + ((= v1-0 30) + "clr2" + ) + ((= v1-0 31) + "--" + ) + ) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun-debug tie-ints () + "Dump TIE integer regs for debug." + (local-vars (sv-16 uint)) + (let ((gp-0 (+ #x3da0 #x1100c000))) + (dotimes (s5-0 16) + (if (< s5-0 10) + (format 0 " ") + ) + (let ((s4-0 format) + (s3-0 0) + (s2-0 "vi~d: ~6d #x~4,'0X ~s~%") + (s1-0 s5-0) + (s0-0 (-> (the-as (pointer uint32) (+ gp-0 (* (* s5-0 4) 4))) 0)) + ) + (set! sv-16 (-> (the-as (pointer uint32) (+ gp-0 (* (* s5-0 4) 4))) 0)) + (let ((t1-0 (tie-int-reg s5-0))) + (s4-0 s3-0 s2-0 s1-0 s0-0 sv-16 t1-0) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun-debug tie-floats () + "Dump TIE float regs for debug." + (local-vars (sv-16 uint) (sv-32 uint)) + (let ((gp-0 (the-as (pointer uint32) (+ #x3da0 #x1100c000)))) + (dotimes (s5-0 32) + (if (< s5-0 10) + (format 0 " ") + ) + (format + 0 + "vf~d: #x~8,'0X #x~8,'0X #x~8,'0X #x~8,'0X " + s5-0 + (-> gp-0 (* s5-0 4)) + (-> gp-0 (+ (* s5-0 4) 1)) + (-> gp-0 (+ (* s5-0 4) 2)) + (-> gp-0 (+ (* s5-0 4) 3)) + ) + (let ((s4-0 format) + (s3-0 0) + (s2-0 "~F ~F ~F ~F ~s~%") + (s1-0 (-> gp-0 (* s5-0 4))) + (s0-0 (-> gp-0 (+ (* s5-0 4) 1))) + ) + (set! sv-16 (-> gp-0 (+ (* s5-0 4) 2))) + (set! sv-32 (-> gp-0 (+ (* s5-0 4) 3))) + (let ((t2-1 (tie-float-reg s5-0))) + (s4-0 s3-0 s2-0 s1-0 s0-0 sv-16 sv-32 t2-1) + ) + ) + ) + ) + (none) + ) diff --git a/goal_src/jak3/engine/gfx/background/wind-h.gc b/goal_src/jak3/engine/gfx/background/wind-h.gc index c1b5187e1f..fa9be41384 100644 --- a/goal_src/jak3/engine/gfx/background/wind-h.gc +++ b/goal_src/jak3/engine/gfx/background/wind-h.gc @@ -5,6 +5,10 @@ ;; name in dgo: wind-h ;; dgos: GAME +(declare-type wind-work structure) + +(define-extern level-update-wind (function wind-work none)) + ;; DECOMP BEGINS (deftype wind-vector (structure) diff --git a/goal_src/jak3/engine/gfx/blit-displays-h.gc b/goal_src/jak3/engine/gfx/blit-displays-h.gc index 2d01452072..33177d7164 100644 --- a/goal_src/jak3/engine/gfx/blit-displays-h.gc +++ b/goal_src/jak3/engine/gfx/blit-displays-h.gc @@ -48,7 +48,7 @@ (blit-displays-work-method-16 () none) (blit-displays-work-method-17 (_type_ vector int float symbol) none) (blit-displays-work-method-18 () none) - (blit-displays-work-method-19 () none) + (blit-displays-work-method-19 (_type_) none) (blit-displays-work-method-20 () none) (get-menu-mode (_type_) symbol) (get-screen-copied (_type_) symbol) diff --git a/goal_src/jak3/engine/gfx/blit-displays.gc b/goal_src/jak3/engine/gfx/blit-displays.gc index 1b9cebe9ae..6919cc8ce0 100644 --- a/goal_src/jak3/engine/gfx/blit-displays.gc +++ b/goal_src/jak3/engine/gfx/blit-displays.gc @@ -5,5 +5,94 @@ ;; name in dgo: blit-displays ;; dgos: GAME +;; just a stub for now. +(define-extern draw-color-bars (function blit-displays-work none)) + +(define *blit-displays-work* (new 'static 'blit-displays-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) + ) + :gif (new 'static 'array uint64 2 #x1000000000008005 #xe) + ) + :sprite-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x41 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x41 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x408b400000008010 #x5353) + ) + :contrast-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x41 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x41 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x40ab400000008010 #x5353) + ) + :sprite-slow-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) + ) + :gif (new 'static 'array uint64 2 #x50ab400000008001 #x53531) + ) + :draw-slow-time-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x13 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x13 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x30aec00000008006 #x531) + ) + :line-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x41 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x41 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x2020c00000008020 #x55) + ) + :scan-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x4c :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x4c :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x5020c0000000800f #x55551) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) + :line-color #x3f80000000000000 + :scan-colors (new 'static 'inline-array vector4w 15 + (new 'static 'vector4w :y 1 :z 1) + (new 'static 'vector4w :y 1 :z 1) + (new 'static 'vector4w :y 1 :z 1) + (new 'static 'vector4w :y 1 :z 1) + (new 'static 'vector4w :x 1 :y 3 :z 2) + (new 'static 'vector4w :x 1 :y 4 :z 3) + (new 'static 'vector4w :x 2 :y 6 :z 5) + (new 'static 'vector4w :x 3 :y 8 :z 7) + (new 'static 'vector4w :x 5 :y 11 :z 10) + (new 'static 'vector4w :x 6 :y 14 :z 13) + (new 'static 'vector4w :x 9 :y 20 :z 17) + (new 'static 'vector4w :x 13 :y 27 :z 21) + (new 'static 'vector4w :x 17 :y 36 :z 24) + (new 'static 'vector4w :x 22 :y 45 :z 28) + (new 'static 'vector4w :x 32 :y 63 :z 32) + ) + :menu-mode #f + :screen-copied #f + :horizontal-flip-flag #f + ) + ) + +;; stub: + +(defmethod blit-displays-work-method-19 ((this blit-displays-work)) + (set! (-> this slow-time) (- 1.0 (-> *setting-control* user-current slow-time))) + (none) + ) + +(defmethod blit-displays-work-method-17 ((this blit-displays-work) (arg0 vector) (arg1 int) (arg2 float) (arg3 symbol)) + (none) + ) + ;; DECOMP BEGINS diff --git a/goal_src/jak3/engine/gfx/font-h.gc b/goal_src/jak3/engine/gfx/font-h.gc index 4c448ea76b..b014473dfe 100644 --- a/goal_src/jak3/engine/gfx/font-h.gc +++ b/goal_src/jak3/engine/gfx/font-h.gc @@ -16,6 +16,7 @@ (right 4) (large 5) (pc-hack 6) + (ff7 7) ) ;; ---font-flags @@ -78,7 +79,9 @@ (b float :offset 32)) ) +(declare-type font-context structure) (define-extern draw-string-xy (function string dma-buffer int int font-color font-flags draw-string-result)) +(define-extern draw-string (function string dma-buffer font-context draw-string-result)) ;; DECOMP BEGINS @@ -105,18 +108,19 @@ ) (deftype font-context (basic) - ((origin vector :inline) - (strip-gif vector :inline) - (width float) - (height float) - (projection float) - (scale float) - (color font-color) - (flags font-flags) - (mat matrix) - (start-line uint32) - (alpha float) - (max-x float) + ((origin vector :inline) + (strip-gif vector :inline) + (width float) + (height float) + (projection float) + (scale float) + (color font-color) + (color-signed int32 :overlay-at color) + (flags font-flags) + (mat matrix) + (start-line uint32) + (alpha float) + (max-x float) ) (:methods (new (symbol type matrix int int float font-color font-flags) _type_) @@ -301,7 +305,7 @@ (reg-save uint32 5) ) (:methods - (set-context! (_type_ object) none) + (set-context! (_type_ font-context) none) ) ) @@ -728,6 +732,3 @@ (set! (-> *font-work* color-table arg0 color 3) arg4) 0 ) - - -(define-extern draw-string (function string dma-buffer font-context draw-string-result)) diff --git a/goal_src/jak3/engine/gfx/font.gc b/goal_src/jak3/engine/gfx/font.gc index 50a8996857..46c0310378 100644 --- a/goal_src/jak3/engine/gfx/font.gc +++ b/goal_src/jak3/engine/gfx/font.gc @@ -5,5 +5,57 @@ ;; name in dgo: font ;; dgos: GAME +(deftype draw-string-result (uint64) + ((length float :offset 0) + (b float :offset 32)) + ) + ;; DECOMP BEGINS +(defmethod-mips2c "(method 9 font-work)" 9 font-work) + +(def-mips2c draw-string-asm (function string dma-buffer font-context draw-string-result)) + +;; WARN: Return type mismatch uint vs draw-string-result. +;; 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)) + (let ((v1-1 (the int (* 128.0 (-> arg2 alpha))))) + (-> arg2 origin quad) + (dotimes (a0-2 45) + (dotimes (a1-1 4) + (set! (-> *font-work* color-table a0-2 color a1-1 a) v1-1) + ) + ) + (set! (-> *font-work* color-shadow w) v1-1) + ) + (if (< (the-as uint (dma-buffer-free arg1)) (the-as uint (* (length arg0) 32))) + (set! v0-2 (the-as uint (-> arg2 origin quad))) + (set! v0-2 (the-as uint (draw-string-asm arg0 arg1 arg2))) + ) + (dotimes (v1-7 45) + (dotimes (a0-9 4) + (set! (-> *font-work* color-table v1-7 color a0-9 a) #x80) + ) + ) + (set! (-> *font-work* color-shadow w) 128) + (the-as draw-string-result v0-2) + ) + +(def-mips2c get-string-length (function string font-context draw-string-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))) + (set-context! *font-work* s4-0) + (draw-string arg0 arg1 s4-0) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun draw-string-adv ((arg0 string) (arg1 dma-buffer) (arg2 font-context)) + (set-context! *font-work* arg2) + (let ((v1-2 (draw-string arg0 arg1 arg2))) + (+! (-> arg2 origin x) (-> v1-2 length)) + ) + (none) + ) diff --git a/goal_src/jak3/engine/gfx/foreground/eye-h.gc b/goal_src/jak3/engine/gfx/foreground/eye-h.gc index 9e294be4b3..619aa911d5 100644 --- a/goal_src/jak3/engine/gfx/foreground/eye-h.gc +++ b/goal_src/jak3/engine/gfx/foreground/eye-h.gc @@ -9,9 +9,17 @@ (define-extern find-free-eye-index (function int string int int)) (define-extern free-eye-index (function int int)) (define-extern merc-eye-anim (function process-drawable none)) +(define-extern update-eyes (function none)) ;; DECOMP BEGINS +;; TODO: remove this - just a stub. +(defun find-free-eye-index ((a int) (b string) (c int)) + 0) +(defun get-eye-block ((a int) (c int)) + 0) + + (deftype eye (structure) "Data for a single eye." ((data vector 2 :inline) diff --git a/goal_src/jak3/engine/gfx/foreground/eye.gc b/goal_src/jak3/engine/gfx/foreground/eye.gc index 3cffcb83d0..7c8458ec31 100644 --- a/goal_src/jak3/engine/gfx/foreground/eye.gc +++ b/goal_src/jak3/engine/gfx/foreground/eye.gc @@ -7,3 +7,1027 @@ ;; DECOMP BEGINS +(define *eye-work* (new 'static 'eye-work + :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) + ) + :gif (new 'static 'array uint64 2 #x508b400000008001 #x53531) + ) + :sprite-tmpl2 (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) + ) + :gif (new 'static 'array uint64 2 #x50ab400000008001 #x53531) + ) + :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) + ) + :gif (new 'static 'array uint64 2 #x1000000000008005 #xe) + ) + :blink-table (new 'static 'array float 10 0.0 0.667 0.9 1.0 1.0 1.0 1.0 0.333 0.1 0.0) + ) + ) + +(defun find-free-eye-index ((arg0 int) (arg1 string) (arg2 int)) + (dotimes (s4-0 32) + (let ((s2-0 (-> *eye-control-array* data s4-0))) + (when (!= (-> s2-0 level-index) -1) + (when (string-charp= arg1 (-> s2-0 art-group-name)) + (if (= (-> *kernel-context* login-level-index) (-> s2-0 level-index)) + (return s4-0) + ) + ) + ) + ) + ) + (let ((v1-14 (-> *level* level (-> *kernel-context* login-level-index)))) + (dotimes (s4-1 32) + (let ((s2-1 (-> *eye-control-array* data s4-1))) + (when (= (-> s2-1 level-index) -1) + (cond + ((< arg2 60) + (set! (-> s2-1 high-res?) #f) + (set! (-> s2-1 eye-slot) (logand (-> v1-14 eye-slot-lowres arg0) 15)) + (+! (-> v1-14 eye-slot-lowres arg0) 1) + ) + (else + (set! (-> s2-1 high-res?) #t) + (set! (-> s2-1 eye-slot) (logand (-> v1-14 eye-slot-highres arg0) 3)) + (+! (-> v1-14 eye-slot-highres arg0) 1) + ) + ) + (copyn-charp<-string (-> s2-1 art-group-name) arg1 (min 63 (+ (length arg1) 1))) + (set! (-> s2-1 level-index) (-> *kernel-context* login-level-index)) + (return s4-1) + ) + ) + ) + ) + (format 0 "ERROR: no free eye-controls available.~%") + 0 + ) + +(defun free-eye-index ((idx int)) + (when (< idx 32) + (let ((v1-4 (-> *eye-control-array* data idx))) + (set! (-> v1-4 process) (the-as handle #f)) + (set! (-> v1-4 random-time) (the-as uint 60)) + (set! (-> v1-4 blink) 0.0) + (set! (-> v1-4 shaders) (the-as (inline-array adgif-shader) #f)) + (set! (-> v1-4 level-index) -1) + (set! (-> v1-4 high-res?) #f) + (set! (-> v1-4 eye-slot) (the-as uint 0)) + (set! (-> v1-4 art-group-name 0) (the-as uint 0)) + (dotimes (a0-4 2) + (set! (-> v1-4 eyes a0-4 shader-count) (the-as uint 0)) + (dotimes (a1-3 8) + (set! (-> (the-as eye-control (+ (+ (* a1-3 4) (* 80 a0-4)) (the-as int v1-4))) left shader 0) #f) + ) + ) + ) + ) + 0 + ) + +(defun render-eyes-32 ((arg0 dma-buffer) (arg1 eye-control) (arg2 int)) + (local-vars (sv-16 float)) + (let ((v1-0 *display*) + (a0-1 1776) + ) + (+! (-> v1-0 mem-reserve-size) a0-1) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((a2-1 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> a2-1 real-buffer-end) (the-as int (&+ (-> a2-1 base) a0-1))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (let* ((v1-2 (-> arg1 eye-slot)) + (s4-0 32) + (s3-0 (+ (* v1-2 32) 32)) + (s2-0 (* v1-2 32)) + ) + (let ((f28-0 (* 16.0 (+ (the float (+ s4-0 16)) (* 32.0 (-> arg1 left x))))) + (f26-0 (* 16.0 (+ (the float (+ s3-0 16)) (* 32.0 (-> arg1 left y))))) + (f30-0 (* 16.0 (+ (the float (+ s4-0 48)) (* 32.0 (-> arg1 right x))))) + ) + (set! sv-16 (* 16.0 (+ (the float (+ s3-0 16)) (* 32.0 (-> arg1 right y))))) + (let ((s1-0 (-> arg1 shaders 0))) + (let ((v1-16 (the-as object (-> arg0 base)))) + (set! (-> (the-as dma-gif-packet v1-16) dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> (the-as dma-gif-packet v1-16) quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-0 (the-as structure (&+ (the-as dma-gif-packet v1-16) 32)))) + (quad-copy! (the-as pointer s0-0) (the-as pointer s1-0) 5) + (set! (-> (the-as adgif-shader s0-0) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x1f :maxv #x1f) + ) + (set! (-> (the-as adgif-shader s0-0) alpha) (new 'static 'gs-miptbp :tbp1 #x44)) + (set! (-> (the-as adgif-shader s0-0) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (dma-buffer-add-gs-set arg0 (scissor-1 (new 'static 'gs-scissor :scax1 #x3f :scay1 (+ s2-0 31) :scay0 s2-0))) + (let ((v1-25 (the-as object (-> arg0 base)))) + (set! (-> (the-as (inline-array vector4w) v1-25) 0 quad) (-> *eye-work* sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-25) 1 quad) (-> *eye-work* sprite-tmpl quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) v1-25) 2) 128 128 128 128) + (set-vector! (-> (the-as (inline-array vector4w) v1-25) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) v1-25) 4) (* s4-0 16) (the-as int (* s3-0 16)) #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) v1-25) 5) 0 0 0 0) + (set-vector! + (-> (the-as (inline-array vector4w) v1-25) 6) + (* (+ s4-0 64) 16) + (the-as int (* (+ s3-0 32) 16)) + #xffffff + 0 + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-30 (ash 16 (the-as int (-> s1-0 tex0 tw)))) + (a0-35 (ash 16 (the-as int (-> s1-0 tex0 th)))) + ) + (dma-buffer-add-gs-set arg0 (scissor-1 (new 'static 'gs-scissor :scax1 #x1f :scay1 (+ s2-0 31) :scay0 s2-0))) + (let* ((f0-6 (* 256.0 (-> arg1 left iris-scale))) + (a1-34 (the-as object (-> arg0 base))) + (a2-15 (the int (- f28-0 f0-6))) + (t0-5 (the int (- f26-0 f0-6))) + (a3-9 (the int (+ f28-0 f0-6))) + (t1-0 (the int (+ f26-0 f0-6))) + ) + (set! (-> (the-as (inline-array vector4w) a1-34) 0 quad) (-> *eye-work* sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-34) 1 quad) (-> *eye-work* sprite-tmpl quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-34) 2) 128 128 128 128) + (set-vector! (-> (the-as (inline-array vector4w) a1-34) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-34) 4) a2-15 t0-5 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-34) 5) v1-30 a0-35 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-34) 6) a3-9 t1-0 #xffffff 0) + ) + ) + ) + (&+! (-> arg0 base) 112) + (let ((s1-1 (-> arg1 shaders 3))) + (let ((v1-35 (the-as object (-> arg0 base)))) + (set! (-> (the-as dma-gif-packet v1-35) dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> (the-as dma-gif-packet v1-35) quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-1 (the-as structure (&+ (the-as dma-gif-packet v1-35) 32)))) + (quad-copy! (the-as pointer s0-1) (the-as pointer s1-1) 5) + (set! (-> (the-as adgif-shader s0-1) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x1f :maxv #x1f) + ) + (set! (-> (the-as adgif-shader s0-1) alpha) (new 'static 'gs-miptbp :tbp1 #x44)) + (set! (-> (the-as adgif-shader s0-1) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-42 (ash 16 (the-as int (-> s1-1 tex0 tw)))) + (a0-47 (ash 16 (the-as int (-> s1-1 tex0 th)))) + ) + (dma-buffer-add-gs-set arg0 + (scissor-1 (new 'static 'gs-scissor :scax0 #x20 :scax1 #x3f :scay1 (+ s2-0 31) :scay0 s2-0)) + ) + (let* ((f0-10 (* 256.0 (-> arg1 right iris-scale))) + (a1-44 (the-as object (-> arg0 base))) + (a2-25 (the int (- f30-0 f0-10))) + (t0-11 (the int (- sv-16 f0-10))) + (a3-19 (the int (+ f30-0 f0-10))) + (t1-1 (the int (+ sv-16 f0-10))) + ) + (set! (-> (the-as (inline-array vector4w) a1-44) 0 quad) (-> *eye-work* sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-44) 1 quad) (-> *eye-work* sprite-tmpl quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-44) 2) 128 128 128 128) + (set-vector! (-> (the-as (inline-array vector4w) a1-44) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-44) 4) a2-25 t0-11 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-44) 5) v1-42 a0-47 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-44) 6) a3-19 t1-1 #xffffff 0) + ) + ) + ) + (&+! (-> arg0 base) 112) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always))) + ) + (let ((s1-2 (-> arg1 shaders 1))) + (let ((v1-50 (the-as object (-> arg0 base)))) + (set! (-> (the-as dma-gif-packet v1-50) dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> (the-as dma-gif-packet v1-50) quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-2 (the-as structure (&+ (the-as dma-gif-packet v1-50) 32)))) + (quad-copy! (the-as pointer s0-2) (the-as pointer s1-2) 5) + (set! (-> (the-as adgif-shader s0-2) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x1f :maxv #x1f) + ) + (set! (-> (the-as adgif-shader s0-2) alpha) (new 'static 'gs-miptbp :tbp1 #x44)) + (set! (-> (the-as adgif-shader s0-2) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-57 (ash 16 (the-as int (-> s1-2 tex0 tw)))) + (a0-65 (ash 16 (the-as int (-> s1-2 tex0 th)))) + ) + (dma-buffer-add-gs-set arg0 (scissor-1 (new 'static 'gs-scissor :scax1 #x1f :scay1 (+ s2-0 31) :scay0 s2-0))) + (let* ((f0-14 (* 256.0 (-> arg1 left pupil-scale))) + (a1-61 (the-as object (-> arg0 base))) + (a2-35 (the int (- f28-0 f0-14))) + (t0-17 (the int (- f26-0 f0-14))) + (a3-29 (the int (+ f28-0 f0-14))) + (t1-2 (the int (+ f26-0 f0-14))) + ) + (set! (-> (the-as (inline-array vector4w) a1-61) 0 quad) (-> *eye-work* sprite-tmpl2 dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-61) 1 quad) (-> *eye-work* sprite-tmpl2 quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-61) 2) 128 128 128 128) + (set-vector! (-> (the-as (inline-array vector4w) a1-61) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-61) 4) a2-35 t0-17 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-61) 5) v1-57 a0-65 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-61) 6) a3-29 t1-2 #xffffff 0) + ) + ) + ) + (&+! (-> arg0 base) 112) + (let ((s1-3 (-> arg1 shaders 4))) + (let ((v1-62 (the-as object (-> arg0 base)))) + (set! (-> (the-as dma-gif-packet v1-62) dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> (the-as dma-gif-packet v1-62) quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-3 (the-as structure (&+ (the-as dma-gif-packet v1-62) 32)))) + (quad-copy! (the-as pointer s0-3) (the-as pointer s1-3) 5) + (set! (-> (the-as adgif-shader s0-3) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x1f :maxv #x1f) + ) + (set! (-> (the-as adgif-shader s0-3) alpha) (new 'static 'gs-miptbp :tbp1 #x44)) + (set! (-> (the-as adgif-shader s0-3) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-69 (ash 16 (the-as int (-> s1-3 tex0 tw)))) + (a0-77 (ash 16 (the-as int (-> s1-3 tex0 th)))) + ) + (dma-buffer-add-gs-set arg0 + (scissor-1 (new 'static 'gs-scissor :scax0 #x20 :scax1 #x3f :scay1 (+ s2-0 31) :scay0 s2-0)) + ) + (let* ((f0-18 (* 256.0 (-> arg1 right pupil-scale))) + (a1-71 (the-as object (-> arg0 base))) + (a2-45 (the int (- f30-0 f0-18))) + (t0-23 (the int (- sv-16 f0-18))) + (a3-39 (the int (+ f30-0 f0-18))) + (t1-3 (the int (+ sv-16 f0-18))) + ) + (set! (-> (the-as (inline-array vector4w) a1-71) 0 quad) (-> *eye-work* sprite-tmpl2 dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-71) 1 quad) (-> *eye-work* sprite-tmpl2 quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-71) 2) 128 128 128 128) + (set-vector! (-> (the-as (inline-array vector4w) a1-71) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-71) 4) a2-45 t0-23 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-71) 5) v1-69 a0-77 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-71) 6) a3-39 t1-3 #xffffff 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))) + ) + (let ((s1-4 (-> arg1 shaders 2))) + (let ((v1-77 (the-as object (-> arg0 base)))) + (set! (-> (the-as dma-gif-packet v1-77) dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> (the-as dma-gif-packet v1-77) quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-4 (the-as structure (&+ (the-as dma-gif-packet v1-77) 32)))) + (quad-copy! (the-as pointer s0-4) (the-as pointer s1-4) 5) + (set! (-> (the-as adgif-shader s0-4) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x1f :maxv #x1f) + ) + (set! (-> (the-as adgif-shader s0-4) alpha) (new 'static 'gs-miptbp :tbp1 #x1)) + (set! (-> (the-as adgif-shader s0-4) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-84 (ash 16 (the-as int (-> s1-4 tex0 tw)))) + (a0-95 (ash 16 (the-as int (-> s1-4 tex0 th)))) + ) + (when (< (-> arg1 left lid) 0.0) + (let ((f0-23 (+ 1.0 (-> arg1 left lid)))) + (set! (-> arg1 left lid) (+ f0-23 (* (- 1.0 f0-23) (-> arg1 blink)))) + ) + ) + (dma-buffer-add-gs-set arg0 (scissor-1 (new 'static 'gs-scissor :scax1 #x1f :scay1 (+ s2-0 31) :scay0 s2-0))) + (let* ((f0-27 (+ (the float (+ s3-0 -32)) (* 32.0 (-> arg1 left lid)))) + (a1-93 (the-as object (-> arg0 base))) + (a2-55 (* s4-0 16)) + (t0-29 (the int (* 16.0 f0-27))) + (a3-51 (* (+ s4-0 32) 16)) + (t1-6 (the int (* 16.0 (+ f0-27 (* 32.0 (-> arg1 left lid-scale)))))) + ) + (set! (-> (the-as (inline-array vector4w) a1-93) 0 quad) (-> *eye-work* sprite-tmpl2 dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-93) 1 quad) (-> *eye-work* sprite-tmpl2 quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-93) 2) 128 128 128 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-93) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-93) 4) a2-55 t0-29 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-93) 5) v1-84 a0-95 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-93) 6) a3-51 t1-6 #xffffff 0) + ) + ) + ) + (&+! (-> arg0 base) 112) + (let ((s1-5 (-> arg1 shaders 5))) + (let ((v1-89 (the-as object (-> arg0 base)))) + (set! (-> (the-as dma-gif-packet v1-89) dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> (the-as dma-gif-packet v1-89) quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-5 (the-as structure (&+ (the-as dma-gif-packet v1-89) 32)))) + (quad-copy! (the-as pointer s0-5) (the-as pointer s1-5) 5) + (set! (-> (the-as adgif-shader s0-5) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x1f :maxv #x1f) + ) + (set! (-> (the-as adgif-shader s0-5) alpha) (new 'static 'gs-miptbp :tbp1 #x1)) + (set! (-> (the-as adgif-shader s0-5) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-96 (ash 16 (the-as int (-> s1-5 tex0 tw)))) + (a0-107 (ash 16 (the-as int (-> s1-5 tex0 th)))) + ) + (when (< (-> arg1 right lid) 0.0) + (let ((f0-33 (+ 1.0 (-> arg1 right lid)))) + (set! (-> arg1 right lid) (+ f0-33 (* (- 1.0 f0-33) (-> arg1 blink)))) + ) + ) + (dma-buffer-add-gs-set arg0 + (scissor-1 (new 'static 'gs-scissor :scax0 #x20 :scax1 #x3f :scay1 (+ s2-0 31) :scay0 s2-0)) + ) + (let* ((f0-37 (+ (the float (+ s3-0 -32)) (* 32.0 (-> arg1 right lid)))) + (a1-108 (the-as object (-> arg0 base))) + (a2-66 (* (+ s4-0 64) 16)) + (t0-35 (the int (* 16.0 f0-37))) + (a3-63 (* (+ s4-0 32) 16)) + (t1-9 (the int (* 16.0 (+ f0-37 (* 32.0 (-> arg1 left lid-scale)))))) + ) + (set! (-> (the-as (inline-array vector4w) a1-108) 0 quad) (-> *eye-work* sprite-tmpl2 dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-108) 1 quad) (-> *eye-work* sprite-tmpl2 quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-108) 2) 128 128 128 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-108) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-108) 4) a2-66 t0-35 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-108) 5) v1-96 a0-107 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-108) 6) a3-63 t1-9 #xffffff 0) + ) + ) + ) + ) + (let ((v0-0 (&+ (-> arg0 base) 112))) + (set! (-> arg0 base) v0-0) + v0-0 + ) + ) + ) + ) + ) + +(defun render-eyes-64 ((arg0 dma-buffer) (arg1 eye-control) (arg2 int)) + (local-vars (sv-16 float)) + (let ((v1-0 *display*) + (a0-1 1776) + ) + (+! (-> v1-0 mem-reserve-size) a0-1) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((a2-1 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> a2-1 real-buffer-end) (the-as int (&+ (-> a2-1 base) a0-1))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (let* ((v1-2 (-> arg1 eye-slot)) + (s4-0 64) + (s3-0 (+ (* v1-2 64) 64)) + (s2-0 (* v1-2 64)) + ) + (let ((f28-0 (* 16.0 (+ (the float (+ s4-0 32)) (* 64.0 (-> arg1 left x))))) + (f26-0 (* 16.0 (+ (the float (+ s3-0 32)) (* 64.0 (-> arg1 left y))))) + (f30-0 (* 16.0 (+ (the float (+ s4-0 96)) (* 64.0 (-> arg1 right x))))) + ) + (set! sv-16 (* 16.0 (+ (the float (+ s3-0 32)) (* 64.0 (-> arg1 right y))))) + (let ((s1-0 (-> arg1 shaders 0))) + (let ((v1-16 (the-as object (-> arg0 base)))) + (set! (-> (the-as dma-gif-packet v1-16) dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> (the-as dma-gif-packet v1-16) quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-0 (the-as structure (&+ (the-as dma-gif-packet v1-16) 32)))) + (quad-copy! (the-as pointer s0-0) (the-as pointer s1-0) 5) + (set! (-> (the-as adgif-shader s0-0) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x3f :maxv #x3f) + ) + (set! (-> (the-as adgif-shader s0-0) alpha) (new 'static 'gs-miptbp :tbp1 #x44)) + (set! (-> (the-as adgif-shader s0-0) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (dma-buffer-add-gs-set arg0 (scissor-1 (new 'static 'gs-scissor :scax1 #x7f :scay1 (+ s2-0 63) :scay0 s2-0))) + (let ((v1-25 (the-as object (-> arg0 base)))) + (set! (-> (the-as (inline-array vector4w) v1-25) 0 quad) (-> *eye-work* sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-25) 1 quad) (-> *eye-work* sprite-tmpl quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) v1-25) 2) 128 128 128 128) + (set-vector! (-> (the-as (inline-array vector4w) v1-25) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) v1-25) 4) (* s4-0 16) (the-as int (* s3-0 16)) #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) v1-25) 5) 0 0 0 0) + (set-vector! + (-> (the-as (inline-array vector4w) v1-25) 6) + (* (+ s4-0 128) 16) + (the-as int (* (+ s3-0 64) 16)) + #xffffff + 0 + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-30 (ash 16 (the-as int (-> s1-0 tex0 tw)))) + (a0-35 (ash 16 (the-as int (-> s1-0 tex0 th)))) + ) + (dma-buffer-add-gs-set arg0 (scissor-1 (new 'static 'gs-scissor :scax1 #x3f :scay1 (+ s2-0 63) :scay0 s2-0))) + (let* ((f0-6 (* 512.0 (-> arg1 left iris-scale))) + (a1-34 (the-as object (-> arg0 base))) + (a2-15 (the int (- f28-0 f0-6))) + (t0-5 (the int (- f26-0 f0-6))) + (a3-9 (the int (+ f28-0 f0-6))) + (t1-0 (the int (+ f26-0 f0-6))) + ) + (set! (-> (the-as (inline-array vector4w) a1-34) 0 quad) (-> *eye-work* sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-34) 1 quad) (-> *eye-work* sprite-tmpl quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-34) 2) 128 128 128 128) + (set-vector! (-> (the-as (inline-array vector4w) a1-34) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-34) 4) a2-15 t0-5 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-34) 5) v1-30 a0-35 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-34) 6) a3-9 t1-0 #xffffff 0) + ) + ) + ) + (&+! (-> arg0 base) 112) + (let ((s1-1 (-> arg1 shaders 3))) + (let ((v1-35 (the-as dma-gif-packet (-> arg0 base)))) + (set! (-> v1-35 dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> v1-35 quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-1 (the-as structure (&+ v1-35 32)))) + (quad-copy! (the-as pointer s0-1) (the-as pointer s1-1) 5) + (set! (-> (the-as adgif-shader s0-1) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x3f :maxv #x3f) + ) + (set! (-> (the-as adgif-shader s0-1) alpha) (new 'static 'gs-miptbp :tbp1 #x44)) + (set! (-> (the-as adgif-shader s0-1) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-42 (ash 16 (the-as int (-> s1-1 tex0 tw)))) + (a0-47 (ash 16 (the-as int (-> s1-1 tex0 th)))) + ) + (dma-buffer-add-gs-set arg0 + (scissor-1 (new 'static 'gs-scissor :scax0 #x40 :scax1 #x7f :scay1 (+ s2-0 63) :scay0 s2-0)) + ) + (let* ((f0-10 (* 512.0 (-> arg1 right iris-scale))) + (a1-44 (the-as object (-> arg0 base))) + (a2-25 (the int (- f30-0 f0-10))) + (t0-11 (the int (- sv-16 f0-10))) + (a3-19 (the int (+ f30-0 f0-10))) + (t1-1 (the int (+ sv-16 f0-10))) + ) + (set! (-> (the-as (inline-array vector4w) a1-44) 0 quad) (-> *eye-work* sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-44) 1 quad) (-> *eye-work* sprite-tmpl quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-44) 2) 128 128 128 128) + (set-vector! (-> (the-as (inline-array vector4w) a1-44) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-44) 4) a2-25 t0-11 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-44) 5) v1-42 a0-47 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-44) 6) a3-19 t1-1 #xffffff 0) + ) + ) + ) + (&+! (-> arg0 base) 112) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always))) + ) + (let ((s1-2 (-> arg1 shaders 1))) + (let ((v1-50 (the-as dma-gif-packet (-> arg0 base)))) + (set! (-> v1-50 dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> v1-50 quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-2 (the-as structure (&+ v1-50 32)))) + (quad-copy! (the-as pointer s0-2) (the-as pointer s1-2) 5) + (set! (-> (the-as adgif-shader s0-2) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x3f :maxv #x3f) + ) + (set! (-> (the-as adgif-shader s0-2) alpha) (new 'static 'gs-miptbp :tbp1 #x44)) + (set! (-> (the-as adgif-shader s0-2) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-57 (ash 16 (the-as int (-> s1-2 tex0 tw)))) + (a0-65 (ash 16 (the-as int (-> s1-2 tex0 th)))) + ) + (dma-buffer-add-gs-set arg0 (scissor-1 (new 'static 'gs-scissor :scax1 #x3f :scay1 (+ s2-0 63) :scay0 s2-0))) + (let* ((f0-14 (* 512.0 (-> arg1 left pupil-scale))) + (a1-61 (the-as object (-> arg0 base))) + (a2-35 (the int (- f28-0 f0-14))) + (t0-17 (the int (- f26-0 f0-14))) + (a3-29 (the int (+ f28-0 f0-14))) + (t1-2 (the int (+ f26-0 f0-14))) + ) + (set! (-> (the-as (pointer uint128) a1-61)) (-> *eye-work* sprite-tmpl2 dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-61) 1 quad) (-> *eye-work* sprite-tmpl2 quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-61) 2) 128 128 128 128) + (set-vector! (-> (the-as (inline-array vector4w) a1-61) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-61) 4) a2-35 t0-17 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-61) 5) v1-57 a0-65 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-61) 6) a3-29 t1-2 #xffffff 0) + ) + ) + ) + (&+! (-> arg0 base) 112) + (let ((s1-3 (-> arg1 shaders 4))) + (let ((v1-62 (the-as object (-> arg0 base)))) + (set! (-> (the-as dma-gif-packet v1-62) dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> (the-as dma-gif-packet v1-62) quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-3 (the-as structure (&+ (the-as dma-gif-packet v1-62) 32)))) + (quad-copy! (the-as pointer s0-3) (the-as pointer s1-3) 5) + (set! (-> (the-as adgif-shader s0-3) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x3f :maxv #x3f) + ) + (set! (-> (the-as adgif-shader s0-3) alpha) (new 'static 'gs-miptbp :tbp1 #x44)) + (set! (-> (the-as adgif-shader s0-3) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-69 (ash 16 (the-as int (-> s1-3 tex0 tw)))) + (a0-77 (ash 16 (the-as int (-> s1-3 tex0 th)))) + ) + (dma-buffer-add-gs-set arg0 + (scissor-1 (new 'static 'gs-scissor :scax0 #x40 :scax1 #x7f :scay1 (+ s2-0 63) :scay0 s2-0)) + ) + (let* ((f0-18 (* 512.0 (-> arg1 right pupil-scale))) + (a1-71 (the-as object (-> arg0 base))) + (a2-45 (the int (- f30-0 f0-18))) + (t0-23 (the int (- sv-16 f0-18))) + (a3-39 (the int (+ f30-0 f0-18))) + (t1-3 (the int (+ sv-16 f0-18))) + ) + (set! (-> (the-as (inline-array vector4w) a1-71) 0 quad) (-> *eye-work* sprite-tmpl2 dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-71) 1 quad) (-> *eye-work* sprite-tmpl2 quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-71) 2) 128 128 128 128) + (set-vector! (-> (the-as (inline-array vector4w) a1-71) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-71) 4) a2-45 t0-23 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-71) 5) v1-69 a0-77 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-71) 6) a3-39 t1-3 #xffffff 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))) + ) + (let ((s1-4 (-> arg1 shaders 2))) + (let ((v1-77 (the-as object (-> arg0 base)))) + (set! (-> (the-as dma-gif-packet v1-77) dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> (the-as dma-gif-packet v1-77) quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-4 (the-as structure (&+ (the-as dma-gif-packet v1-77) 32)))) + (quad-copy! (the-as pointer s0-4) (the-as pointer s1-4) 5) + (set! (-> (the-as adgif-shader s0-4) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x3f :maxv #x3f) + ) + (set! (-> (the-as adgif-shader s0-4) alpha) (new 'static 'gs-miptbp :tbp1 #x1)) + (set! (-> (the-as adgif-shader s0-4) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-84 (ash 16 (the-as int (-> s1-4 tex0 tw)))) + (a0-95 (ash 16 (the-as int (-> s1-4 tex0 th)))) + ) + (when (< (-> arg1 left lid) 0.0) + (let ((f0-23 (+ 1.0 (-> arg1 left lid)))) + (set! (-> arg1 left lid) (+ f0-23 (* (- 1.0 f0-23) (-> arg1 blink)))) + ) + ) + (dma-buffer-add-gs-set arg0 (scissor-1 (new 'static 'gs-scissor :scax1 #x3f :scay1 (+ s2-0 63) :scay0 s2-0))) + (let* ((f0-27 (+ (the float (+ s3-0 -64)) (* 64.0 (-> arg1 left lid)))) + (a1-93 (the-as object (-> arg0 base))) + (a2-55 (* s4-0 16)) + (t0-29 (the int (* 16.0 f0-27))) + (a3-51 (* (+ s4-0 64) 16)) + (t1-6 (the int (* 16.0 (+ f0-27 (* 64.0 (-> arg1 left lid-scale)))))) + ) + (set! (-> (the-as (inline-array vector4w) a1-93) 0 quad) (-> *eye-work* sprite-tmpl2 dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-93) 1 quad) (-> *eye-work* sprite-tmpl2 quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-93) 2) 128 128 128 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-93) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-93) 4) a2-55 t0-29 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-93) 5) v1-84 a0-95 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-93) 6) a3-51 t1-6 #xffffff 0) + ) + ) + ) + (&+! (-> arg0 base) 112) + (let ((s1-5 (-> arg1 shaders 5))) + (let ((v1-89 (the-as object (-> arg0 base)))) + (set! (-> (the-as dma-gif-packet v1-89) dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> (the-as dma-gif-packet v1-89) quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-5 (the-as structure (&+ (the-as dma-gif-packet v1-89) 32)))) + (quad-copy! (the-as pointer s0-5) (the-as pointer s1-5) 5) + (set! (-> (the-as adgif-shader s0-5) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x3f :maxv #x3f) + ) + (set! (-> (the-as adgif-shader s0-5) alpha) (new 'static 'gs-miptbp :tbp1 #x1)) + (set! (-> (the-as adgif-shader s0-5) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-96 (ash 16 (the-as int (-> s1-5 tex0 tw)))) + (a0-107 (ash 16 (the-as int (-> s1-5 tex0 th)))) + ) + (when (< (-> arg1 right lid) 0.0) + (let ((f0-33 (+ 1.0 (-> arg1 right lid)))) + (set! (-> arg1 right lid) (+ f0-33 (* (- 1.0 f0-33) (-> arg1 blink)))) + ) + ) + (dma-buffer-add-gs-set arg0 + (scissor-1 (new 'static 'gs-scissor :scax0 #x40 :scax1 #x7f :scay1 (+ s2-0 63) :scay0 s2-0)) + ) + (let* ((f0-37 (+ (the float (+ s3-0 -64)) (* 64.0 (-> arg1 right lid)))) + (a1-108 (the-as object (-> arg0 base))) + (a2-66 (* (+ s4-0 128) 16)) + (t0-35 (the int (* 16.0 f0-37))) + (a3-63 (* (+ s4-0 64) 16)) + (t1-9 (the int (* 16.0 (+ f0-37 (* 64.0 (-> arg1 left lid-scale)))))) + ) + (set! (-> (the-as (pointer uint128) a1-108)) (-> *eye-work* sprite-tmpl2 dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-108) 1 quad) (-> *eye-work* sprite-tmpl2 quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-108) 2) 128 128 128 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-108) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-108) 4) a2-66 t0-35 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-108) 5) v1-96 a0-107 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-108) 6) a3-63 t1-9 #xffffff 0) + ) + ) + ) + ) + (let ((v0-0 (&+ (-> arg0 base) 112))) + (set! (-> arg0 base) v0-0) + v0-0 + ) + ) + ) + ) + ) + +(defun update-eyes () + (when (not (-> *blit-displays-work* screen-copied)) + (dotimes (gp-0 32) + (let* ((s5-0 (-> *eye-control-array* data gp-0)) + (v1-7 (handle->process (-> s5-0 process))) + ) + (when (and v1-7 + (logtest? (-> (the-as process-drawable v1-7) skel status) (joint-control-status eye-anim)) + (logtest? (-> (the-as process-drawable v1-7) draw status) (draw-control-status on-screen)) + ) + (when (-> s5-0 shaders) + (when (not (paused?)) + (cond + ((and (>= (-> s5-0 left lid) 0.0) (>= (-> s5-0 right lid) 0.0)) + (set! (-> s5-0 random-time) (the-as uint 60)) + (set! (-> s5-0 blink) 0.0) + ) + (else + (+! (-> s5-0 random-time) -1) + (let ((v1-19 (-> s5-0 random-time))) + (when (< v1-19 (the-as uint 10)) + (set! (-> s5-0 blink) (-> *eye-work* blink-table v1-19)) + (if (zero? v1-19) + (set! (-> s5-0 random-time) (the-as uint (the int (rand-vu-float-range 60.0 240.0)))) + ) + ) + ) + ) + ) + ) + (when (-> s5-0 left shader) + (cond + ((and (= (-> s5-0 left pupil-scale) 0.0) (= (-> s5-0 left iris-scale) 0.0)) + (dotimes (v1-24 (the-as int (-> s5-0 left shader-count))) + (set! (-> s5-0 left shader v1-24 tex0 tfx) 1) + ) + ) + (else + (dotimes (v1-27 (the-as int (-> s5-0 left shader-count))) + (set! (-> s5-0 left shader v1-27 tex0 tfx) 0) + ) + ) + ) + ) + (when (-> s5-0 right shader) + (cond + ((and (= (-> s5-0 right pupil-scale) 0.0) (= (-> s5-0 right iris-scale) 0.0)) + (dotimes (v1-34 (the-as int (-> s5-0 right shader-count))) + (set! (-> s5-0 right shader v1-34 tex0 tfx) 1) + ) + ) + (else + (dotimes (v1-37 (the-as int (-> s5-0 right shader-count))) + (set! (-> s5-0 right shader v1-37 tex0 tfx) 0) + ) + ) + ) + ) + (cond + ((-> s5-0 high-res?) + (let ((v1-42 *display*) + (a0-45 16) + ) + (+! (-> v1-42 mem-reserve-size) a0-45) + (when (not (-> v1-42 dma-buffer-overflow)) + (let ((a2-0 (-> v1-42 frames (-> v1-42 on-screen) global-buf))) + (if (< (-> a2-0 real-buffer-end) (the-as int (&+ (-> a2-0 base) a0-45))) + (set! (-> v1-42 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-42 dma-buffer-overflow)) + (with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (the-as bucket-id (-> s5-0 bucket)) + ) + (let ((t9-2 set-display-gs-state-offset) + (a0-50 s3-0) + (a1-35 (-> *eyes-texture-base* vram-page)) + (a2-2 (the-as object 128)) + ) + (t9-2 a0-50 (the-as int a1-35) (the-as int a2-2) 256 0 0 64 64) + (let ((v1-50 *display*) + (a0-51 48) + ) + (+! (-> v1-50 mem-reserve-size) a0-51) + (when (not (-> v1-50 dma-buffer-overflow)) + (let* ((a2-3 (-> v1-50 frames (-> v1-50 on-screen) global-buf)) + (a1-44 (-> a2-3 real-buffer-end)) + ) + (set! a2-2 (-> a2-3 base)) + (if (< a1-44 (the-as int (&+ (the-as pointer a2-2) a0-51))) + (set! (-> v1-50 dma-buffer-overflow) #t) + ) + ) + (if (not (-> v1-50 dma-buffer-overflow)) + (dma-buffer-add-gs-set s3-0 + (test-1 (new 'static 'gs-test :ate #x1 :atst (gs-atest always) :zte #x1 :ztst (gs-ztest always))) + ) + ) + ) + ) + (render-eyes-64 s3-0 s5-0 (the-as int a2-2)) + ) + (reset-display-gs-state *display* s3-0) + (let ((v1-55 *display*) + (a0-62 48) + ) + (+! (-> v1-55 mem-reserve-size) a0-62) + (when (not (-> v1-55 dma-buffer-overflow)) + (let ((a2-4 (-> v1-55 frames (-> v1-55 on-screen) global-buf))) + (if (< (-> a2-4 real-buffer-end) (the-as int (&+ (-> a2-4 base) a0-62))) + (set! (-> v1-55 dma-buffer-overflow) #t) + ) + ) + (if (not (-> v1-55 dma-buffer-overflow)) + (dma-buffer-add-gs-set s3-0 (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))) + ) + ) + ) + ) + ) + ) + ) + ) + ((not (-> s5-0 high-res?)) + (let ((v1-68 *display*) + (a0-74 16) + ) + (+! (-> v1-68 mem-reserve-size) a0-74) + (when (not (-> v1-68 dma-buffer-overflow)) + (let ((a2-7 (-> v1-68 frames (-> v1-68 on-screen) global-buf))) + (if (< (-> a2-7 real-buffer-end) (the-as int (&+ (-> a2-7 base) a0-74))) + (set! (-> v1-68 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-68 dma-buffer-overflow)) + (with-dma-buffer-add-bucket ((s3-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (the-as bucket-id (-> s5-0 bucket)) + ) + (let ((t9-6 set-display-gs-state-offset) + (a0-79 s3-1) + (a1-88 (-> *eyes-texture-base* vram-page)) + (a2-9 (the-as object 64)) + ) + (t9-6 a0-79 (the-as int a1-88) (the-as int a2-9) 512 0 0 32 32) + (let ((v1-76 *display*) + (a0-80 48) + ) + (+! (-> v1-76 mem-reserve-size) a0-80) + (when (not (-> v1-76 dma-buffer-overflow)) + (let* ((a2-10 (-> v1-76 frames (-> v1-76 on-screen) global-buf)) + (a1-97 (-> a2-10 real-buffer-end)) + ) + (set! a2-9 (-> a2-10 base)) + (if (< a1-97 (the-as int (&+ (the-as pointer a2-9) a0-80))) + (set! (-> v1-76 dma-buffer-overflow) #t) + ) + ) + (if (not (-> v1-76 dma-buffer-overflow)) + (dma-buffer-add-gs-set s3-1 + (test-1 (new 'static 'gs-test :ate #x1 :atst (gs-atest always) :zte #x1 :ztst (gs-ztest always))) + ) + ) + ) + ) + (render-eyes-32 s3-1 s5-0 (the-as int a2-9)) + ) + (reset-display-gs-state *display* s3-1) + (let ((v1-81 *display*) + (a0-91 48) + ) + (+! (-> v1-81 mem-reserve-size) a0-91) + (when (not (-> v1-81 dma-buffer-overflow)) + (let ((a2-11 (-> v1-81 frames (-> v1-81 on-screen) global-buf))) + (if (< (-> a2-11 real-buffer-end) (the-as int (&+ (-> a2-11 base) a0-91))) + (set! (-> v1-81 dma-buffer-overflow) #t) + ) + ) + (if (not (-> v1-81 dma-buffer-overflow)) + (dma-buffer-add-gs-set s3-1 (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch uint vs int. +(defun get-eye-block ((arg0 int) (arg1 int)) + (let ((v1-0 arg0) + (a0-4 (-> ct32-24-block-table (* arg1 4))) + ) + (the-as int (+ (-> *eyes-texture-base* vram-block) (* v1-0 32) a0-4)) + ) + ) + +(defun convert-eye-data ((arg0 eye) (arg1 uint)) + (local-vars + (v0-0 float) + (v1-0 uint128) + (v1-1 uint128) + (v1-2 uint128) + (v1-3 uint128) + (v1-4 uint128) + (v1-5 uint128) + ) + (rlet ((vf1 :class vf) + (vf2 :class vf) + ) + (.pextlb v1-0 arg1 0) + (.pextlh v1-1 v1-0 0) + (.pw.sra v1-2 v1-1 16) + (.mov vf1 v1-2) + (.pextlb v1-3 0 arg1) + (.pextuh v1-4 0 v1-3) + (.pw.sll v1-5 v1-4 6) + (.mov vf2 v1-5) + (vitof15.xyzw vf1 vf1) + (vitof12.xyzw vf2 vf2) + (.svf (&-> arg0 data 0 quad) vf1) + (.svf (&-> arg0 data 1 quad) vf2) + (.mov v0-0 vf2) + v0-0 + ) + ) + +(defun merc-eye-anim ((arg0 process-drawable)) + (let* ((v1-2 (-> arg0 draw mgeo header eye-ctrl)) + (a0-2 (-> arg0 skel float-channels)) + (s3-0 (cond + ((> a0-2 0) + (-> arg0 skel channel (+ a0-2 -1 (-> arg0 skel active-channels))) + ) + (else + (let ((a0-8 (-> arg0 skel root-channel)) + (a1-4 (-> arg0 skel effect)) + ) + (-> a0-8 (if a1-4 + (-> a1-4 channel-offset) + 0 + ) + ) + ) + ) + ) + ) + (s4-0 (-> s3-0 frame-group)) + ) + (when (and (logtest? (-> arg0 skel status) (joint-control-status eye-anim)) + (and (nonzero? v1-2) (> (-> arg0 skel active-channels) 0) s4-0) + ) + (cond + ((and (-> arg0 skel override) (!= (-> arg0 skel override 41) 0.0)) + (let ((v1-6 (-> *eye-control-array* data (-> v1-2 eye-ctrl-index))) + (a0-24 (-> arg0 skel override)) + ) + (set! (-> v1-6 left x) (-> a0-24 42)) + (set! (-> v1-6 left y) (-> a0-24 43)) + (set! (-> v1-6 left lid) (-> a0-24 44)) + (set! (-> v1-6 left iris-scale) (-> a0-24 45)) + (set! (-> v1-6 left pupil-scale) (-> a0-24 46)) + (set! (-> v1-6 left lid-scale) (-> a0-24 47)) + (set! (-> v1-6 right x) (-> a0-24 48)) + (set! (-> v1-6 right y) (-> a0-24 49)) + (set! (-> v1-6 right lid) (-> a0-24 50)) + (set! (-> v1-6 right iris-scale) (-> a0-24 51)) + (set! (-> v1-6 right pupil-scale) (-> a0-24 52)) + (set! (-> v1-6 right lid-scale) (-> a0-24 53)) + ) + (logior! (-> arg0 skel status) (joint-control-status eye-anim-valid)) + ) + (else + (let* ((s5-0 (-> *eye-control-array* data (-> v1-2 eye-ctrl-index))) + (f0-13 (-> s3-0 frame-num)) + (f30-0 (- f0-13 (* (the float (the int (/ f0-13 1.0))) 1.0))) + ) + (set! (-> s5-0 process) (process->handle arg0)) + (set! (-> s5-0 shaders) (-> v1-2 shader)) + (let ((a0-34 *level*) + (v1-11 (-> arg0 draw)) + ) + (set! (-> s5-0 bucket) (the-as uint (vu1-bucket-map + (the-as int (-> a0-34 draw-index-map (-> v1-11 level-index))) + (the-as int (-> v1-11 default-texture-page)) + (merc-mode texture) + ) + ) + ) + ) + (let ((s2-0 (new 'stack-no-clear 'eye)) + (s1-0 (new 'stack-no-clear 'eye)) + ) + (cond + ((-> s4-0 eye-anim) + (let ((s0-1 (min (the int (-> s3-0 frame-num)) (-> s4-0 eye-anim max-frame))) + (s3-2 (min (+ (the int (-> s3-0 frame-num)) 1) (-> s4-0 eye-anim max-frame))) + ) + (convert-eye-data s2-0 (-> s4-0 eye-anim data (* s0-1 2) dword)) + (convert-eye-data s1-0 (-> s4-0 eye-anim data (* s3-2 2) dword)) + (vector4-lerp! (the-as vector (-> s5-0 eyes)) (the-as vector (&-> s2-0 x)) (the-as vector (&-> s1-0 x)) f30-0) + (vector4-lerp! + (the-as vector (&-> s5-0 left iris-scale)) + (the-as vector (&-> s2-0 iris-scale)) + (the-as vector (&-> s1-0 iris-scale)) + f30-0 + ) + (convert-eye-data s2-0 (-> s4-0 eye-anim data (+ (* s0-1 2) 1) dword)) + (convert-eye-data s1-0 (-> s4-0 eye-anim data (+ (* s3-2 2) 1) dword)) + ) + (vector4-lerp! + (the-as vector (-> s5-0 right)) + (the-as vector (&-> s2-0 x)) + (the-as vector (&-> s1-0 x)) + f30-0 + ) + (vector4-lerp! + (the-as vector (&-> s5-0 right iris-scale)) + (the-as vector (&-> s2-0 iris-scale)) + (the-as vector (&-> s1-0 iris-scale)) + f30-0 + ) + ) + (else + (format *stdcon* "no eye anim data for ~s~%" (-> arg0 name)) + (set! (-> s5-0 left x) 0.0) + (set! (-> s5-0 left y) 0.0) + (set! (-> s5-0 left lid) -1.0) + (set! (-> s5-0 left iris-scale) 0.55) + (set! (-> s5-0 left pupil-scale) 0.45) + (set! (-> s5-0 left lid-scale) 1.0) + (set! (-> s5-0 right x) 0.0) + (set! (-> s5-0 right y) 0.0) + (set! (-> s5-0 right lid) -1.0) + (set! (-> s5-0 right iris-scale) 0.55) + (set! (-> s5-0 right pupil-scale) 0.45) + (set! (-> s5-0 right lid-scale) 1.0) + ) + ) + ) + ) + (logior! (-> arg0 skel status) (joint-control-status eye-anim-valid)) + ) + ) + ) + ) + (if (logtest? (-> arg0 skel status) (joint-control-status eye-anim-valid)) + (logclear! (-> arg0 skel status) (joint-control-status eye-anim-valid)) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/gfx/foreground/foreground-h.gc b/goal_src/jak3/engine/gfx/foreground/foreground-h.gc index 73a5e73e22..acc6225bda 100644 --- a/goal_src/jak3/engine/gfx/foreground/foreground-h.gc +++ b/goal_src/jak3/engine/gfx/foreground/foreground-h.gc @@ -11,7 +11,7 @@ (define-extern *foreground-draw-engine* engine) (define-extern *default-shadow-settings* shadow-settings) (define-extern *foreground* foreground-globals) - +(define-extern foreground-draw-hud (function draw-control dma-buffer float none)) ;; DECOMP BEGINS @@ -124,6 +124,7 @@ that assigns stuff to buckets and prepares DMA for merc (or requests for generic "Scratch info computed per-merc-effect by the foreground code, then later read by merc DMA generation. This is only for the currently-processing merc model's effects." ((color-fade rgba) + (alpha uint8 :offset 3) (merc-path uint8) (ignore-alpha uint8) (disable-draw uint8) diff --git a/goal_src/jak3/engine/gfx/foreground/foreground.gc b/goal_src/jak3/engine/gfx/foreground/foreground.gc index a0e1d108d2..31ddc33c3d 100644 --- a/goal_src/jak3/engine/gfx/foreground/foreground.gc +++ b/goal_src/jak3/engine/gfx/foreground/foreground.gc @@ -17,10 +17,11 @@ ) ;; ---merc-mode +;; Note: merc mode 5 seems to be totally bogus - the buckets are somewhat random. ;; DECOMP BEGINS -(define foreground-vu0-block (new 'static 'vu-function :length 9 :qlength 5)) +(define foreground-vu0-block (new 'static 'vu-function #|:length 9 :qlength 5|#)) (define *bucket-map* (new 'static 'array bucket-id-16 462 (bucket-id-16 merc-l0-tfrag) @@ -34,7 +35,7 @@ (bucket-id-16 gmerc-l0-pris) (bucket-id-16 tex-l0-pris) (bucket-id-16 gmerc2-l0-pris) - (bucket-id-16 bucket32) + (bucket-id-16 tie-vanish-l1-tfrag) (bucket-id-16 merc-l0-shrub) (bucket-id-16 emerc-l0-shrub) (bucket-id-16 gmerc-l0-shrub) @@ -46,7 +47,7 @@ (bucket-id-16 gmerc-l0-alpha) (bucket-id-16 tex-l0-alpha) (bucket-id-16 gmerc2-l0-alpha) - (bucket-id-16 bucket20) + (bucket-id-16 tie-vanish-l0-tfrag) (bucket-id-16 merc-l0-water) (bucket-id-16 merc-l0-water) (bucket-id-16 gmerc-l0-water) @@ -58,7 +59,7 @@ (bucket-id-16 gmerc-l0-pris) (bucket-id-16 tex-l0-pris) (bucket-id-16 gmerc2-l0-pris) - (bucket-id-16 bucket32) + (bucket-id-16 tie-vanish-l1-tfrag) (bucket-id-16 merc-l0-pris2) (bucket-id-16 emerc-l0-pris2) (bucket-id-16 gmerc-l0-pris2) @@ -82,7 +83,7 @@ (bucket-id-16 gmerc-l1-shrub) (bucket-id-16 tex-l1-shrub) (bucket-id-16 gmerc2-l1-shrub) - (bucket-id-16 bucket11) + (bucket-id-16 tfrag-l0-tfrag) (bucket-id-16 merc-l1-alpha) (bucket-id-16 emerc-l1-alpha) (bucket-id-16 gmerc-l1-alpha) @@ -106,7 +107,7 @@ (bucket-id-16 gmerc-l1-pris2) (bucket-id-16 tex-l1-pris2) (bucket-id-16 gmerc2-l1-pris2) - (bucket-id-16 bucket44) + (bucket-id-16 tie-vanish-l2-tfrag) (bucket-id-16 merc-l2-tfrag) (bucket-id-16 emerc-l2-tfrag) (bucket-id-16 gmerc-l2-tfrag) @@ -124,7 +125,7 @@ (bucket-id-16 gmerc-l2-shrub) (bucket-id-16 tex-l2-shrub) (bucket-id-16 gmerc2-l2-shrub) - (bucket-id-16 bucket12) + (bucket-id-16 tie-l0-tfrag) (bucket-id-16 merc-l2-alpha) (bucket-id-16 emerc-l2-alpha) (bucket-id-16 gmerc-l2-alpha) @@ -136,7 +137,7 @@ (bucket-id-16 gmerc-l2-water) (bucket-id-16 tex-l2-water) (bucket-id-16 gmerc2-l2-water) - (bucket-id-16 bucket56) + (bucket-id-16 tie-vanish-l3-tfrag) (bucket-id-16 merc-l2-pris) (bucket-id-16 emerc-l2-pris) (bucket-id-16 gmerc-l2-pris) @@ -160,19 +161,19 @@ (bucket-id-16 gmerc-l3-pris) (bucket-id-16 tex-l3-pris) (bucket-id-16 gmerc2-l3-pris) - (bucket-id-16 bucket35) + (bucket-id-16 tfrag-l2-tfrag) (bucket-id-16 merc-l3-shrub) (bucket-id-16 emerc-l3-shrub) (bucket-id-16 gmerc-l3-shrub) (bucket-id-16 tex-l3-shrub) (bucket-id-16 gmerc2-l3-shrub) - (bucket-id-16 bucket13) + (bucket-id-16 etie-l0-tfrag) (bucket-id-16 merc-l3-alpha) (bucket-id-16 emerc-l3-alpha) (bucket-id-16 gmerc-l3-alpha) (bucket-id-16 tex-l3-alpha) (bucket-id-16 gmerc2-l3-alpha) - (bucket-id-16 bucket23) + (bucket-id-16 tfrag-l1-tfrag) (bucket-id-16 merc-l3-water) (bucket-id-16 merc-l3-water) (bucket-id-16 gmerc-l3-water) @@ -184,7 +185,7 @@ (bucket-id-16 gmerc-l3-pris) (bucket-id-16 tex-l3-pris) (bucket-id-16 gmerc2-l3-pris) - (bucket-id-16 bucket35) + (bucket-id-16 tfrag-l2-tfrag) (bucket-id-16 merc-l3-pris2) (bucket-id-16 emerc-l3-pris2) (bucket-id-16 gmerc-l3-pris2) @@ -202,19 +203,19 @@ (bucket-id-16 gmerc-l4-pris) (bucket-id-16 tex-l4-pris) (bucket-id-16 gmerc2-l4-pris) - (bucket-id-16 bucket36) + (bucket-id-16 tie-l2-tfrag) (bucket-id-16 merc-l4-shrub) (bucket-id-16 emerc-l4-shrub) (bucket-id-16 gmerc-l4-shrub) (bucket-id-16 tex-l4-shrub) (bucket-id-16 gmerc2-l4-shrub) - (bucket-id-16 bucket14) + (bucket-id-16 tfrag-scissor-l0-tfrag) (bucket-id-16 merc-l4-alpha) (bucket-id-16 emerc-l4-alpha) (bucket-id-16 gmerc-l4-alpha) (bucket-id-16 tex-l4-alpha) (bucket-id-16 gmerc2-l4-alpha) - (bucket-id-16 bucket24) + (bucket-id-16 tie-l1-tfrag) (bucket-id-16 merc-l4-water) (bucket-id-16 merc-l4-water) (bucket-id-16 gmerc-l4-water) @@ -226,13 +227,13 @@ (bucket-id-16 gmerc-l4-pris) (bucket-id-16 tex-l4-pris) (bucket-id-16 gmerc2-l4-pris) - (bucket-id-16 bucket36) + (bucket-id-16 tie-l2-tfrag) (bucket-id-16 merc-l4-pris2) (bucket-id-16 emerc-l4-pris2) (bucket-id-16 gmerc-l4-pris2) (bucket-id-16 tex-l4-pris2) (bucket-id-16 gmerc2-l4-pris2) - (bucket-id-16 bucket47) + (bucket-id-16 tfrag-l3-tfrag) (bucket-id-16 merc-l5-tfrag) (bucket-id-16 emerc-l5-tfrag) (bucket-id-16 gmerc-l5-tfrag) @@ -244,37 +245,37 @@ (bucket-id-16 gmerc-l5-pris) (bucket-id-16 tex-l5-pris) (bucket-id-16 gmerc2-l5-pris) - (bucket-id-16 bucket37) + (bucket-id-16 etie-l2-tfrag) (bucket-id-16 merc-l5-shrub) (bucket-id-16 emerc-l5-shrub) (bucket-id-16 gmerc-l5-shrub) (bucket-id-16 tex-l5-shrub) (bucket-id-16 gmerc2-l5-shrub) - (bucket-id-16 bucket15) + (bucket-id-16 tie-scissor-l0-tfrag) (bucket-id-16 merc-l5-alpha) (bucket-id-16 emerc-l5-alpha) (bucket-id-16 gmerc-l5-alpha) (bucket-id-16 tex-l5-alpha) (bucket-id-16 gmerc2-l5-alpha) - (bucket-id-16 bucket25) + (bucket-id-16 etie-l1-tfrag) (bucket-id-16 merc-l5-water) (bucket-id-16 merc-l5-water) (bucket-id-16 gmerc-l5-water) (bucket-id-16 tex-l5-water) (bucket-id-16 gmerc2-l5-water) - (bucket-id-16 bucket59) + (bucket-id-16 tfrag-l4-tfrag) (bucket-id-16 merc-l5-pris) (bucket-id-16 emerc-l5-pris) (bucket-id-16 gmerc-l5-pris) (bucket-id-16 tex-l5-pris) (bucket-id-16 gmerc2-l5-pris) - (bucket-id-16 bucket37) + (bucket-id-16 etie-l2-tfrag) (bucket-id-16 merc-l5-pris2) (bucket-id-16 emerc-l5-pris2) (bucket-id-16 gmerc-l5-pris2) (bucket-id-16 tex-l5-pris2) (bucket-id-16 gmerc2-l5-pris2) - (bucket-id-16 bucket48) + (bucket-id-16 tie-l3-tfrag) (bucket-id-16 merc-l6-tfrag) (bucket-id-16 emerc-l6-tfrag) (bucket-id-16 gmerc-l6-tfrag) @@ -286,37 +287,37 @@ (bucket-id-16 gmerc-l6-pris) (bucket-id-16 tex-l6-pris) (bucket-id-16 gmerc2-l6-pris) - (bucket-id-16 bucket38) + (bucket-id-16 tfrag-scissor-l2-tfrag) (bucket-id-16 merc-l6-shrub) (bucket-id-16 emerc-l6-shrub) (bucket-id-16 gmerc-l6-shrub) (bucket-id-16 tex-l6-shrub) (bucket-id-16 gmerc2-l6-shrub) - (bucket-id-16 bucket16) + (bucket-id-16 etie-scissor-l0-tfrag) (bucket-id-16 merc-l6-alpha) (bucket-id-16 emerc-l6-alpha) (bucket-id-16 gmerc-l6-alpha) (bucket-id-16 tex-l6-alpha) (bucket-id-16 gmerc2-l6-alpha) - (bucket-id-16 bucket26) + (bucket-id-16 tfrag-scissor-l1-tfrag) (bucket-id-16 merc-l6-water) (bucket-id-16 merc-l6-water) (bucket-id-16 gmerc-l6-water) (bucket-id-16 tex-l6-water) (bucket-id-16 gmerc2-l6-water) - (bucket-id-16 bucket60) + (bucket-id-16 tie-l4-tfrag) (bucket-id-16 merc-l6-pris) (bucket-id-16 emerc-l6-pris) (bucket-id-16 gmerc-l6-pris) (bucket-id-16 tex-l6-pris) (bucket-id-16 gmerc2-l6-pris) - (bucket-id-16 bucket38) + (bucket-id-16 tfrag-scissor-l2-tfrag) (bucket-id-16 merc-l6-pris2) (bucket-id-16 emerc-l6-pris2) (bucket-id-16 gmerc-l6-pris2) (bucket-id-16 tex-l6-pris2) (bucket-id-16 gmerc2-l6-pris2) - (bucket-id-16 bucket49) + (bucket-id-16 etie-l3-tfrag) (bucket-id-16 merc-l7-tfrag) (bucket-id-16 emerc-l7-tfrag) (bucket-id-16 gmerc-l7-tfrag) @@ -328,7 +329,7 @@ (bucket-id-16 gmerc-l7-pris) (bucket-id-16 tex-l7-pris) (bucket-id-16 gmerc2-l7-pris) - (bucket-id-16 bucket39) + (bucket-id-16 tie-scissor-l2-tfrag) (bucket-id-16 merc-l7-shrub) (bucket-id-16 emerc-l7-shrub) (bucket-id-16 gmerc-l7-shrub) @@ -340,25 +341,25 @@ (bucket-id-16 gmerc-l7-alpha) (bucket-id-16 tex-l7-alpha) (bucket-id-16 gmerc2-l7-alpha) - (bucket-id-16 bucket27) + (bucket-id-16 tie-scissor-l1-tfrag) (bucket-id-16 merc-l7-water) (bucket-id-16 merc-l7-water) (bucket-id-16 gmerc-l7-water) (bucket-id-16 tex-l7-water) (bucket-id-16 gmerc2-l7-water) - (bucket-id-16 bucket61) + (bucket-id-16 etie-l4-tfrag) (bucket-id-16 merc-l7-pris) (bucket-id-16 emerc-l7-pris) (bucket-id-16 gmerc-l7-pris) (bucket-id-16 tex-l7-pris) (bucket-id-16 gmerc2-l7-pris) - (bucket-id-16 bucket39) + (bucket-id-16 tie-scissor-l2-tfrag) (bucket-id-16 merc-l7-pris2) (bucket-id-16 emerc-l7-pris2) (bucket-id-16 gmerc-l7-pris2) (bucket-id-16 tex-l7-pris2) (bucket-id-16 gmerc2-l7-pris2) - (bucket-id-16 bucket50) + (bucket-id-16 tfrag-scissor-l3-tfrag) (bucket-id-16 merc-l8-tfrag) (bucket-id-16 emerc-l8-tfrag) (bucket-id-16 gmerc-l8-tfrag) @@ -370,7 +371,7 @@ (bucket-id-16 gmerc-l8-pris) (bucket-id-16 tex-l8-pris) (bucket-id-16 gmerc2-l8-pris) - (bucket-id-16 bucket40) + (bucket-id-16 etie-scissor-l2-tfrag) (bucket-id-16 merc-l8-shrub) (bucket-id-16 emerc-l8-shrub) (bucket-id-16 gmerc-l8-shrub) @@ -382,25 +383,25 @@ (bucket-id-16 gmerc-l8-alpha) (bucket-id-16 tex-l8-alpha) (bucket-id-16 gmerc2-l8-alpha) - (bucket-id-16 bucket28) + (bucket-id-16 etie-scissor-l1-tfrag) (bucket-id-16 merc-l8-water) (bucket-id-16 merc-l8-water) (bucket-id-16 gmerc-l8-water) (bucket-id-16 tex-l8-water) (bucket-id-16 gmerc2-l8-water) - (bucket-id-16 bucket62) + (bucket-id-16 tfrag-scissor-l4-tfrag) (bucket-id-16 merc-l8-pris) (bucket-id-16 emerc-l8-pris) (bucket-id-16 gmerc-l8-pris) (bucket-id-16 tex-l8-pris) (bucket-id-16 gmerc2-l8-pris) - (bucket-id-16 bucket40) + (bucket-id-16 etie-scissor-l2-tfrag) (bucket-id-16 merc-l8-pris2) (bucket-id-16 emerc-l8-pris2) (bucket-id-16 gmerc-l8-pris2) (bucket-id-16 tex-l8-pris2) (bucket-id-16 gmerc2-l8-pris2) - (bucket-id-16 bucket51) + (bucket-id-16 tie-scissor-l3-tfrag) (bucket-id-16 merc-l9-tfrag) (bucket-id-16 emerc-l9-tfrag) (bucket-id-16 gmerc-l9-tfrag) @@ -430,7 +431,7 @@ (bucket-id-16 gmerc-l9-water) (bucket-id-16 tex-l9-water) (bucket-id-16 gmerc2-l9-water) - (bucket-id-16 bucket63) + (bucket-id-16 tie-scissor-l4-tfrag) (bucket-id-16 merc-l9-pris) (bucket-id-16 emerc-l9-pris) (bucket-id-16 gmerc-l9-pris) @@ -442,7 +443,7 @@ (bucket-id-16 gmerc-l9-pris2) (bucket-id-16 tex-l9-pris2) (bucket-id-16 gmerc2-l9-pris2) - (bucket-id-16 bucket52) + (bucket-id-16 etie-scissor-l3-tfrag) (bucket-id-16 merc-lcom-tfrag) (bucket-id-16 emerc-lcom-tfrag) (bucket-id-16 gmerc-lcom-tfrag) @@ -472,7 +473,7 @@ (bucket-id-16 gmerc-lcom-water) (bucket-id-16 tex-lcom-water) (bucket-id-16 gmerc2-lcom-water) - (bucket-id-16 bucket64) + (bucket-id-16 etie-scissor-l4-tfrag) (bucket-id-16 merc-lcom-pris) (bucket-id-16 emerc-lcom-pris) (bucket-id-16 gmerc-lcom-pris) @@ -512,24 +513,24 @@ (defun foreground-init () "Initialize scratchpad and VU0 for foreground. Start foreground DMA chains." - (let ((gp-0 (the-as foreground-work (+ #x70000000 0)))) + (let ((gp-0 (scratchpad-object foreground-work))) (vu-lights-default! *default-lights*) - (let ((s5-0 *vu0-dma-list*)) - (let ((v1-1 s5-0)) - (set! (-> v1-1 base) (-> v1-1 data)) - (set! (-> v1-1 end) (the-as pointer (+ (+ (-> v1-1 allocated-length) 28) (the-as int v1-1)))) - ) - (dma-buffer-add-vu-function s5-0 foreground-vu0-block 0) - (let* ((v1-2 s5-0) - (a0-6 (-> v1-2 base)) - ) - (set! (-> (the-as (pointer uint64) a0-6) 0) (the-as uint #x70000000)) - (set! (-> (the-as (pointer uint64) a0-6) 1) (the-as uint 0)) - (set! (-> v1-2 base) (&+ a0-6 16)) - ) - (.sync.l) - (dma-buffer-send-chain (the-as dma-bank-source #x10008000) s5-0) - ) + ;; (let ((s5-0 *vu0-dma-list*)) + ;; (let ((v1-1 s5-0)) + ;; (set! (-> v1-1 base) (-> v1-1 data)) + ;; (set! (-> v1-1 end) (the-as pointer (+ (+ (-> v1-1 allocated-length) 28) (the-as int v1-1)))) + ;; ) + ;; (dma-buffer-add-vu-function s5-0 foreground-vu0-block 0) + ;; (let* ((v1-2 s5-0) + ;; (a0-6 (-> v1-2 base)) + ;; ) + ;; (set! (-> (the-as (pointer uint64) a0-6) 0) (the-as uint #x70000000)) + ;; (set! (-> (the-as (pointer uint64) a0-6) 1) (the-as uint 0)) + ;; (set! (-> v1-2 base) (&+ a0-6 16)) + ;; ) + ;; (.sync.l) + ;; (dma-buffer-send-chain (the-as dma-bank-source #x10008000) s5-0) + ;; ) (set! (-> gp-0 next-tmpl dma) (new 'static 'dma-tag :id (dma-tag-id next))) (set! (-> gp-0 next-tmpl vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) (set! (-> gp-0 next-tmpl vif1) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) @@ -755,7 +756,7 @@ (defun foreground-wrapup () "Finish foreground DMA chains." - (let ((gp-0 (the-as foreground-work (+ #x70000000 0)))) + (let ((gp-0 (scratchpad-object foreground-work))) (dotimes (s5-0 11) (let ((s4-0 (-> gp-0 grid level-buckets s5-0))) (dotimes (s3-0 7) @@ -820,7 +821,7 @@ :shadow-dir (new 'static 'vector :x -0.4226 :y -0.9063 :w 409600.0) :bot-plane (new 'static 'plane :y 1.0 :w 37683.2) :top-plane (new 'static 'plane :y 1.0 :w 4096.0) - :fade-vec (new 'static 'vector :x 409600.0) + :fade-dist 409600.0 ) ) @@ -854,7 +855,7 @@ (let ((t1-5 (-> a3-3 flags))) (-> arg0 cur-lod) (when (not (logtest? t1-5 (shadow-flags disable-fade))) - (if (< (-> a3-3 fade-vec x) t0-0) + (if (< (-> a3-3 fade-dist) t0-0) (set! t1-5 (logior t1-5 (shadow-flags disable-draw))) ) ) @@ -1064,8 +1065,822 @@ ;; ERROR: Bad vector register dependency: vf9 ;; ERROR: Unsupported inline assembly instruction kind - [lui at, 28672] ;; ERROR: Unsupported inline assembly instruction kind - [vcallms 0] -(defun foreground-draw ((dc draw-control) (dma-buf dma-buffer) (dist float)) - (local-vars (work foreground-work) (a0-100 uint)) +;; (defun foreground-draw ((dc draw-control) (dma-buf dma-buffer) (dist float)) +;; (local-vars (work foreground-work) (a0-100 uint)) +;; (rlet ((vf1 :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) +;; (acc :class vf) +;; ) +;; ;; (.lui work 28672) +;; (set! work (scratchpad-object foreground-work)) +;; (let* ((bone-calc (-> dma-buf base)) +;; (matrix-mem (the-as object (&+ bone-calc 64))) +;; ) +;; (let ((a3-0 (logand (the-as int matrix-mem) 48))) +;; (b! (zero? a3-0) cfg-2 :delay (nop!)) +;; (set! matrix-mem (&- (&+ (the-as pointer matrix-mem) 64) (the-as uint a3-0))) +;; ) +;; (label cfg-2) +;; (let* ((num-bones (+ (-> dc mgeo length) 3)) +;; (matrix-mem-size (* num-bones 128)) +;; ) +;; (let ((regs (-> (scratchpad-object foreground-work) regs))) +;; (set! (-> regs joint-ptr) (the-as (inline-array joint) (-> dc jgeo data 0))) +;; (set! (-> regs bone-ptr) (-> dc skeleton bones)) +;; (set! (-> regs num-bones) (the-as uint num-bones)) +;; (set! (-> regs dist) dist) +;; (set! (-> regs dma-buf) dma-buf) +;; (set! (-> regs level-buckets) (-> (scratchpad-object foreground-work) +;; grid +;; level-buckets +;; (-> (scratchpad-object foreground-work) draw-index-map (-> dc level-index)) +;; ) +;; ) +;; ) +;; (let ((bone-output matrix-mem) +;; (bone-flags 0) +;; ) +;; (let ((fg-regs (-> (scratchpad-object foreground-work) regs)) +;; (calc-list *bone-calculation-list*) +;; (calc (the-as bone-calculation bone-calc)) +;; ) +;; (let ((t2-4 (-> fg-regs joint-ptr)) +;; (t3-0 (-> fg-regs bone-ptr)) +;; (t4-1 (-> fg-regs num-bones)) +;; (t5-0 calc) +;; ) +;; (set! (-> t5-0 flags) (the-as bone-calc-flags bone-flags)) +;; (set! (-> t5-0 num-bones) t4-1) +;; (set! (-> t5-0 matrix-area) (the-as (inline-array pris-mtx) bone-output)) +;; (set! (-> t5-0 joints) t2-4) +;; (set! (-> t5-0 bones) t3-0) +;; (set! (-> t5-0 next) (the-as bone-calculation 0)) +;; ) +;; (if (nonzero? (-> calc-list next)) +;; (set! (-> calc-list next next) calc) +;; ) +;; (if (zero? (-> calc-list first)) +;; (set! (-> calc-list first) calc) +;; ) +;; (set! (-> calc-list next) calc) +;; ) +;; (&+ bone-calc 48) +;; (let ((dma-ptr (the-as object (+ (the-as uint matrix-mem) matrix-mem-size)))) +;; (set! (-> work regs mtxs) (the-as (inline-array pris-mtx) matrix-mem)) +;; (let ((bucket-info (-> *foreground* merc-bucket-info))) +;; (when (= (-> dc data-format) (draw-control-data-format merc)) +;; (let ((lights-in (-> (scratchpad-object foreground-work) lights)) +;; (lights-out (-> bucket-info light)) +;; ) +;; (let ((inv-camera (-> *math-camera* inv-camera-rot))) +;; (nop!) +;; (nop!) +;; (.lvf vf4 (&-> inv-camera rvec quad)) +;; (nop!) +;; (.lvf vf5 (&-> inv-camera uvec quad)) +;; (nop!) +;; (.lvf vf6 (&-> inv-camera fvec quad)) +;; ) +;; (nop!) +;; (.lvf vf1 (&-> lights-in direction 0 quad)) +;; (nop!) +;; (.lvf vf2 (&-> lights-in direction 1 quad)) +;; (nop!) +;; (.lvf vf3 (&-> lights-in direction 2 quad)) +;; ;; (.vcallms 0) +;; ; mulax.xyzw ACC, vf01, vf04 +;; (.mul.x.vf acc vf1 vf4) +;; ; madday.xyzw ACC, vf02, vf04 +;; (.add.mul.y.vf acc vf2 vf4 acc) +;; ; maddz.xyzw vf07, vf03, vf04 +;; (.add.mul.z.vf vf7 vf3 vf4 acc) +;; ; mulax.xyzw ACC, vf01, vf05 +;; (.mul.x.vf acc vf1 vf5) +;; ; madday.xyzw ACC, vf02, vf05 +;; (.add.mul.y.vf acc vf2 vf5 acc) +;; ; maddz.xyzw vf08, vf03, vf05 +;; (.add.mul.z.vf vf8 vf3 vf5 acc) +;; ; mulax.xyzw ACC, vf01, vf06 +;; (.mul.x.vf acc vf1 vf6) +;; ; madday.xyzw ACC, vf02, vf06 :e +;; (.add.mul.y.vf acc vf2 vf6 acc) +;; ; maddz.xyzw vf09, vf03, vf06 +;; (.add.mul.z.vf vf9 vf3 vf6 acc) +;; (let ((a1-9 (-> lights-in color 0 quad))) +;; (nop!) +;; (let ((a2-6 (-> lights-in color 1 quad))) +;; (nop!) +;; (let ((a3-4 (-> lights-in color 2 quad))) +;; (nop!) +;; (let ((a0-6 (-> lights-in ambient quad))) +;; (nop!) +;; (set! (-> lights-out color 0 quad) a1-9) +;; (nop!) +;; (set! (-> lights-out color 1 quad) a2-6) +;; (nop!) +;; (set! (-> lights-out color 2 quad) a3-4) +;; (nop!) +;; (set! (-> lights-out ambient quad) a0-6) +;; ) +;; ) +;; ) +;; ) +;; (nop!) +;; (.nop.vf) +;; (nop!) +;; (.svf (&-> lights-out direction 0 quad) vf7) +;; (nop!) +;; (.svf (&-> lights-out direction 1 quad) vf8) +;; (nop!) +;; (.svf (&-> lights-out direction 2 quad) vf9) +;; (nop!) +;; (set! (-> lights-out direction 1 w) 0.0) +;; ) +;; (set! (-> (scratchpad-object foreground-work) regs merc-used) (the-as uint 0)) +;; (set! (-> (scratchpad-object foreground-work) regs emerc-used) (the-as uint 0)) +;; (set! (-> (scratchpad-object foreground-work) regs mercneric-used) (the-as uint 0)) +;; (set! (-> bucket-info needs-clip) (if (logtest? (-> dc status) (draw-control-status close-to-screen)) +;; 1 +;; 0 +;; ) +;; ) +;; (set! (-> bucket-info need-mercprime-if-merc) 0) +;; (set! (-> bucket-info must-use-mercneric-for-clip) 0) +;; (when (logtest? (-> dc status) (draw-control-status close-to-screen)) +;; (cond +;; ((logtest? (-> dc status) (draw-control-status force-vu1)) +;; (set! (-> bucket-info need-mercprime-if-merc) 1) +;; ) +;; ((nonzero? (-> dc longest-edge)) +;; (if (foreground-check-longest-edge-asm dc (-> (scratchpad-object foreground-work) regs dist)) +;; (set! (-> bucket-info need-mercprime-if-merc) 1) +;; (set! (-> bucket-info must-use-mercneric-for-clip) 1) +;; ) +;; ) +;; (else +;; (set! (-> bucket-info must-use-mercneric-for-clip) 1) +;; ) +;; ) +;; ) +;; (let ((geo (-> dc lod-set lod (-> dc cur-lod) geo))) +;; (let ((effect-mask (-> dc effect-mask))) +;; (dotimes (effect-idx (the-as int (-> geo header effect-count))) +;; (cond +;; ((= (logand effect-mask 1) 1) +;; (set! (-> bucket-info effect effect-idx disable-draw) (the-as uint 1)) +;; ) +;; ((begin +;; (set! (-> bucket-info effect effect-idx disable-draw) (the-as uint 0)) +;; (set! (-> bucket-info effect effect-idx disable-envmap) (the-as uint 0)) +;; (when (logtest? (-> geo effect effect-idx effect-bits) (effect-bits texscroll)) +;; (let* ((v1-40 (the-as structure (-> geo effect effect-idx extra-info))) +;; (texscroll-info +;; (the-as +;; mei-texture-scroll +;; (+ (the-as uint v1-40) (* (-> (the-as merc-extra-info v1-40) texture-scroll-offset) 16)) +;; ) +;; ) +;; ) +;; (if (< (-> (scratchpad-object foreground-work) regs dist) (-> texscroll-info max-dist)) +;; (texscroll-make-request (-> geo effect effect-idx)) +;; ) +;; ) +;; ) +;; (if (and (logtest? (-> geo effect effect-idx effect-bits) (effect-bits ripple)) (-> dc ripple)) +;; (set! dma-ptr (foreground-ripple dc geo (the-as pointer dma-ptr) effect-idx)) +;; ) +;; (or (nonzero? (-> dc death-timer)) +;; (and (logtest? (-> dc global-effect) (draw-control-global-effect no-textures)) +;; (not (logtest? (-> geo effect effect-idx effect-usage) 8)) +;; ) +;; ) +;; ) +;; (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 2)) +;; (set! (-> bucket-info effect effect-idx disable-envmap) (the-as uint 1)) +;; (set! (-> (scratchpad-object foreground-work) regs mercneric-used) (the-as uint 1)) +;; ) +;; ((logtest? (-> geo effect effect-idx effect-bits) (effect-bits force-mercneric)) +;; (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 2)) +;; (set! (-> (scratchpad-object foreground-work) regs mercneric-used) (the-as uint 1)) +;; ) +;; ((and (logtest? (-> geo effect effect-idx effect-usage) 1) +;; (not (logtest? (-> dc global-effect) (draw-control-global-effect disable-envmap))) +;; ) +;; 0.0 +;; (let* ((v1-75 (the-as structure (-> geo effect effect-idx extra-info))) +;; (envmap-info +;; (the-as mei-envmap-tint (+ (the-as uint v1-75) (* (-> (the-as merc-extra-info v1-75) envmap-tint-offset) 16))) +;; ) +;; (envmap-fade0 (-> envmap-info fade0)) +;; (envmap-fade1 (-> envmap-info fade1)) +;; (envmap-interp (+ (* envmap-fade0 (-> (scratchpad-object foreground-work) regs dist)) envmap-fade1)) +;; (envmap-strength (fmax 0.0 (fmin 1.0 envmap-interp))) +;; ) +;; (cond +;; ((or (nonzero? (-> bucket-info must-use-mercneric-for-clip)) +;; (or (< 0.0 envmap-strength) (logtest? (-> geo effect effect-idx effect-bits) (effect-bits cross-fade))) +;; ) +;; (let ((envmap-tint (&-> envmap-info tint)) +;; (envmap-rgba-out (the-as (pointer uint8) (-> bucket-info effect effect-idx))) +;; ) +;; (let ((tod-rgba (-> *time-of-day-context* current-env-color))) +;; (if (and (logtest? (-> geo effect effect-idx effect-bits) (effect-bits cross-fade)) +;; (logtest? (-> dc status) (draw-control-status warp-cross-fade)) +;; ) +;; (set! envmap-strength (* 0.0078125 (the float (- 128 (the-as int (-> dc force-fade)))) envmap-strength)) +;; ) +;; (cond +;; ((logtest? (-> geo effect effect-idx effect-bits) (effect-bits ignore-tod-for-envmap-tint)) +;; (dotimes (a1-18 3) +;; (set! (-> envmap-rgba-out a1-18) +;; (the-as +;; uint +;; (min 255 (the int (* envmap-strength (the float (-> (the-as (pointer uint8) (&+ envmap-tint a1-18)) 0))))) +;; ) +;; ) +;; ) +;; ) +;; (else +;; (let ((envmap-rgba-multiplier (* 0.0078125 envmap-strength))) +;; (dotimes (a2-26 3) +;; (set! (-> envmap-rgba-out a2-26) +;; (the-as +;; uint +;; (min +;; 255 +;; (the int +;; (* envmap-rgba-multiplier +;; (-> tod-rgba data a2-26) +;; (the float (-> (the-as (pointer uint8) (&+ envmap-tint a2-26)) 0)) +;; ) +;; ) +;; ) +;; ) +;; ) +;; ) +;; ) +;; ) +;; ) +;; ) +;; (set! (-> envmap-rgba-out 3) (the-as uint 128)) +;; ) +;; (cond +;; ((and (logtest? (-> dc status) (draw-control-status force-vu1)) +;; (logtest? (-> geo effect effect-idx effect-bits) (effect-bits emerc)) +;; ) +;; (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 1)) +;; (set! (-> (scratchpad-object foreground-work) regs emerc-used) (the-as uint 1)) +;; ) +;; (else +;; (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 2)) +;; (set! (-> (scratchpad-object foreground-work) regs mercneric-used) (the-as uint 1)) +;; (if (logtest? (-> dc status) (draw-control-status force-fade)) +;; (set! (-> bucket-info light fade-int) (-> dc force-fade)) +;; ) +;; ) +;; ) +;; (set! (-> bucket-info effect effect-idx ignore-alpha) +;; (the-as uint (if (logtest? (-> geo effect effect-idx effect-bits) (effect-bits ignore-alpha)) +;; 1 +;; 0 +;; ) +;; ) +;; ) +;; ) +;; ((logtest? (-> dc status) (draw-control-status force-fade)) +;; (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 2)) +;; (set! (-> bucket-info effect effect-idx ignore-alpha) +;; (the-as uint (if (logtest? (-> geo effect effect-idx effect-bits) (effect-bits ignore-alpha)) +;; 1 +;; 0 +;; ) +;; ) +;; ) +;; (set! (-> (scratchpad-object foreground-work) regs mercneric-used) (the-as uint 1)) +;; (set! (-> bucket-info light fade-int) (-> dc force-fade)) +;; ) +;; (else +;; (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 0)) +;; (set! (-> bucket-info effect effect-idx ignore-alpha) (the-as uint 1)) +;; (set! (-> (scratchpad-object foreground-work) regs merc-used) (the-as uint 1)) +;; ) +;; ) +;; ) +;; ) +;; (else +;; (cond +;; ((logtest? (-> geo effect effect-idx effect-bits) (effect-bits cross-fade)) +;; (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 2)) +;; (set! (-> (scratchpad-object foreground-work) regs mercneric-used) (the-as uint 1)) +;; ) +;; ((or (logtest? (-> dc status) (draw-control-status force-fade)) +;; (nonzero? (-> bucket-info must-use-mercneric-for-clip)) +;; ) +;; (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 2)) +;; (if (logtest? (-> dc global-effect) (draw-control-global-effect disable-envmap)) +;; (set! (-> bucket-info effect effect-idx disable-envmap) (the-as uint 1)) +;; ) +;; (set! (-> (scratchpad-object foreground-work) regs mercneric-used) (the-as uint 1)) +;; ) +;; (else +;; (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 0)) +;; (set! (-> (scratchpad-object foreground-work) regs merc-used) (the-as uint 1)) +;; ) +;; ) +;; (set! (-> bucket-info effect effect-idx ignore-alpha) +;; (the-as +;; uint +;; (if (or (logtest? (-> geo effect effect-idx effect-bits) (effect-bits ignore-alpha)) +;; (logtest? (-> dc global-effect) (draw-control-global-effect disable-envmap)) +;; ) +;; 1 +;; 0 +;; ) +;; ) +;; ) +;; ) +;; ) +;; (set! effect-mask (shr effect-mask 1)) +;; ) +;; ) +;; +;; +;; ;; TODO reassign for PC! +;; +;; (when (nonzero? (-> (scratchpad-object foreground-work) regs mercneric-used)) +;; (if (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask generic)) +;; (set! dma-ptr (foreground-generic-merc dc (the-as pointer dma-ptr) 0)) +;; ) +;; ) +;; (if (-> dc shadow) +;; (set! dma-ptr +;; (foreground-shadow dc (-> (scratchpad-object foreground-work) regs mtxs) (the-as pointer dma-ptr)) +;; ) +;; ) +;; (when (nonzero? (-> (scratchpad-object foreground-work) regs merc-used)) +;; (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask merc)) +;; (let ((fade-amount 0) +;; (fade-enable #f) +;; ) +;; (cond +;; ((logtest? (-> geo effect 0 effect-bits) (effect-bits no-fade-out)) +;; (set! fade-enable #f) +;; ) +;; ((logtest? (-> dc status) (draw-control-status force-fade)) +;; (set! fade-amount (the-as int (-> dc force-fade))) +;; (set! fade-enable #t) +;; ) +;; ((= (-> dc cur-lod) (-> dc lod-set max-lod)) +;; (let ((dist-until-gone +;; (- (-> dc lod-set lod (-> dc cur-lod) dist) (-> (scratchpad-object foreground-work) regs dist)) +;; ) +;; ) +;; (if (< dist-until-gone 81920.0) +;; (set! fade-enable #t) +;; ) +;; (set! fade-amount (the int (* 0.0015625 dist-until-gone))) +;; ) +;; ) +;; ) +;; (when fade-enable +;; (let ((v1-164 (min 128 (max 0 fade-amount))) +;; (a0-90 (-> bucket-info light)) +;; ) +;; (set! (-> a0-90 fade-flags) (the-as uint 0.00000000000000000000000000000000000000000014)) +;; (set! (-> a0-90 fade-int) (the-as uint v1-164)) +;; ) +;; ) +;; ) +;; (if (nonzero? (-> bucket-info need-mercprime-if-merc)) +;; (set! dma-ptr +;; (foreground-merc +;; dc +;; (-> (scratchpad-object foreground-work) regs mtxs) +;; (the-as pointer dma-ptr) +;; 32 +;; 17 +;; bone-flags +;; ) +;; ) +;; (set! dma-ptr +;; (foreground-merc +;; dc +;; (-> (scratchpad-object foreground-work) regs mtxs) +;; (the-as pointer dma-ptr) +;; 35 +;; 20 +;; bone-flags +;; ) +;; ) +;; ) +;; ) +;; ) +;; ) +;; (when (nonzero? (-> (scratchpad-object foreground-work) regs emerc-used)) +;; (if (logtest? (vu1-renderer-mask emerc) (-> *display* vu1-enable-user)) +;; (set! dma-ptr +;; (foreground-emerc +;; dc +;; (-> (scratchpad-object foreground-work) regs mtxs) +;; (the-as pointer dma-ptr) +;; 29 +;; 19 +;; bone-flags +;; ) +;; ) +;; ) +;; ) +;; (when (nonzero? (-> dc death-timer)) +;; (b! (paused?) cfg-131 :delay (empty-form)) +;; (+! (-> dc death-timer) -1) +;; (if (>= (the-as uint 1) (-> dc death-timer)) +;; (send-event (-> dc process) 'death-end dc) +;; ) +;; ) +;; ) +;; ) +;; (label cfg-131) +;; (let ((v1-190 (logand (the-as int dma-ptr) 48))) +;; 0 +;; (b! (zero? v1-190) cfg-133 :delay (set! a0-100 (the-as uint #x20000000))) +;; ;; (s.q! dma-ptr a0-100) +;; (set! (-> (the (pointer uint128) dma-ptr) 0) (the uint128 a0-100)) +;; +;; (let ((a0-101 dma-ptr)) +;; (set! dma-ptr (+ (- (the-as int dma-ptr) (the-as uint v1-190)) 64)) +;; ;; (s.w! (+ a0-101 4) (the-as int dma-ptr)) +;; (set! (-> (the (pointer int32) (+ (the-as uint a0-101) 4))) (the-as int dma-ptr)) +;; ) +;; ) +;; (label cfg-133) +;; (set! (-> (scratchpad-object foreground-work) regs dma-buf base) +;; (the-as pointer (logand (the-as int dma-ptr) #xfffffff)) +;; ) +;; ) +;; ) +;; ) +;; ) +;; 0 +;; (none) +;; ) +;; ) + +(defun pc-merc-blend-shape ((pd process-drawable) (blerc-weights-out (pointer float))) + "PC implementation to get blerc weights as floats and avoid the u16 rounding. + Returns #f if there is no blerc running, which means that we should use base positions. + If things work correctly, the original implementation would try to restore weights of 0 + after the animation finishes - it leaves `blend-shape-valid` set after `blend-shape` is cleared + causing one more round of merc-blend-shape to run with hardcoded weights of 0. + " + (when (or (not (-> pd skel)) + (zero? (-> pd skel)) + ;; types such as debris-group are not actually proper process-drawables and + ;; don't have a joint-control. + (symbol-member? (-> pd type symbol) '(debris-group)) + ) + (return #f) + ) + + ;; grab the currently playing animation + (let* ((jc-channel (-> pd skel root-channel 0)) + (anim (-> jc-channel frame-group)) + (got-weights #f) + ) + (when (and anim ;; we have an anim + (> (-> pd skel active-channels) 0) ;; there are channels running + (zero? (-> pd draw cur-lod)) ;; using high lod + (logtest? (-> pd skel status) (joint-control-status blend-shape)) ;; blend shape is on + ) + (cond + ;; first, see if we have an override: + ((and (-> pd skel override) (!= (-> pd skel override 0) 0.0)) + ;; we do! copy from there. + (let* ((mctrl (-> pd draw mgeo)) + (num-targets (-> mctrl header blend-target-count)) + (override-array (-> pd skel override)) + ) + (set! got-weights #t) + (dotimes (i num-targets) + (set! (-> blerc-weights-out i) (* 8192.0 (-> override-array (+ i 1)))) + ) + ) + ) + (else + ;; otherwise, do the animation + (let ((shape-anim (-> anim blend-shape-anim))) + (when shape-anim + (let ((mctrl (-> pd draw mgeo))) + (let* ((num-targets (-> mctrl header blend-target-count)) + (frame-f (-> jc-channel frame-num)) + ;; round down to the integer frame + (frame-i (the int frame-f)) + (frame-1-data (the (pointer uint8) (&+ shape-anim (* frame-i num-targets)))) + ) + (cond + ;; check if there's a frame after this + ((< frame-i (the-as int (+ (-> anim frames num-frames) -1))) + ;; there is, interpolate between them. + ;; this is rewritten to use floats, but still use the same scaling as the s16 weights. + (let* ((frame-2-data (&+ frame-1-data num-targets)) + (frame-2-mult (* 64.0 (- frame-f (the float frame-i)))) + (frame-1-mult (- 64.0 frame-2-mult)) + ) + (set! got-weights #t) + (dotimes (i num-targets) + ;; key difference: this is floats + (set! (-> blerc-weights-out i) + (+ (* (the float (- (-> frame-1-data i) 64)) frame-1-mult) + (* (the float (- (-> frame-2-data i) 64)) frame-2-mult) + ) + ) + ) + ) + ) + (else + ;; at the last frame, nothing to interpolate. + (set! got-weights #t) + (dotimes (a3-7 num-targets) + (set! (-> blerc-weights-out a3-7) (the float (* (+ (-> (the-as (pointer uint8) (&+ frame-1-data a3-7))) -64) 64))) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + got-weights + + ) + ) + +(defenum pc-merc-bits + :type uint8 + :bitfield #t + (update-verts 0) + (disable-fog 1) + (pc-blerc 2) + (disable-envmap 3) + ) + +(deftype pc-merc-flags (structure) + ((enable-mask uint64) + (ignore-alpha-mask uint64) + (effect-count uint8) + (bit-flags pc-merc-bits) + ) + ) + +(defun pc-merc-draw-request ((dc draw-control) (dma-buf pointer) (matrix-buf pointer) (tex-idx int) (update-verts symbol) (blercs (pointer float))) + "Send a request to PC Merc2 to draw the given object. + Only draws the effects which match this texture index. + Just places a single big dma packet, you have to patch the end yourself. + If update-verts is set to #t, tell the PC renderer to use EE version of vertices. + If update-verts is set to 'blerc, tell the PC renderer to use the included blerc weights + to modify the vertices." + (let ((start-packet (the-as dma-packet dma-buf)) + (qwc-total 0)) + (set! (-> start-packet dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> start-packet vif0) (new 'static 'vif-tag)) + (set! (-> start-packet vif1) (new 'static 'vif-tag :cmd (vif-cmd pc-port))) + (set! dma-buf (the pointer (&+ start-packet 16))) + + ;; NAME: 128 char, 8 qw + (let ((data-ptr (the-as (pointer uint128) dma-buf))) + (charp<-string (the (pointer uint8) (&-> data-ptr 0)) (-> dc mgeo name)) + ) + (&+! dma-buf (* 16 8)) + (+! qwc-total 8) + + ;; LIGHTS: + (quad-copy! dma-buf (the pointer (-> (-> *foreground* merc-bucket-info) light)) 7) + (&+! dma-buf (* 16 7)) + (+! qwc-total 7) + + + (let ((matrix-slot-string (the (pointer uint8) dma-buf)) ;; matrix slot list (so PC knows what order they come in) + (enable-mask 0) + (ignore-alpha-mask 0) + (matrix-out-idx 0) + ) + (&+! dma-buf (* 16 8)) + (+! qwc-total 8) + ;; flag of matrices we've already transferred and can de-dup + (let ((transferred-matrices (new 'stack-no-clear 'array 'uint8 128))) + (dotimes (i 128) (set! (-> transferred-matrices i) 0)) + + (let ((merc-ctrl (-> dc lod-set lod (-> dc cur-lod) geo))) + ;; loop to: grab matrices and populate flags + (dotimes (effect-idx (-> merc-ctrl header effect-count)) + + ;; check to skip fragment. only draw if: + ;; We want to use "merc" + ;; We aren't disabled (new feature in jak 2) + ;; We match the texture index for the bucket. + (when (and (zero? (-> (-> *foreground* merc-bucket-info) effect effect-idx merc-path)) + (zero? (-> (-> *foreground* merc-bucket-info) effect effect-idx disable-draw)) + (= tex-idx (-> merc-ctrl effect effect-idx texture-index)) + ) + ;; set enable bit for pc render + (logior! enable-mask (ash 1 effect-idx)) + ;; set alpha bit for pc render + (when (nonzero? (-> (-> *foreground* merc-bucket-info) effect effect-idx ignore-alpha)) + (logior! ignore-alpha-mask (ash 1 effect-idx)) + ) + (let* ((effect (-> merc-ctrl effect effect-idx)) + (frag (-> effect frag-ctrl)) + ) + ;; iterate over fragments + (dotimes (frag-idx (-> effect frag-count)) + ;; matrices + (dotimes (mat-xfer-idx (-> frag mat-xfer-count)) + (let ((mat-idx (-> frag mat-dest-data mat-xfer-idx matrix-number))) + (if (>= mat-idx 128) ;; pc merc2 limit + (break!) + ) + (when (zero? (-> transferred-matrices mat-idx)) + ;; transfer it. + (set! (-> transferred-matrices mat-idx) 1) + (set! (-> matrix-slot-string matrix-out-idx) mat-idx) + (+! matrix-out-idx 1) + (set! (-> (the (pointer pointer) dma-buf)) (&+ matrix-buf (* 128 mat-idx))) + (&+! dma-buf 16) + (+! qwc-total 1) + ) + ) + ) + (&+! frag (* 2 (-> frag mat-xfer-count))) + (&+! frag (size-of merc-fragment-control)) + ) + ) + ) + ) ;; end effect loop + + ;; end matrix string + (while (< matrix-out-idx 128) + (set! (-> matrix-slot-string matrix-out-idx) #xff) + (+! matrix-out-idx 1) + ) + + ;; flags + (let ((flags (the (pc-merc-flags) dma-buf))) + (set! (-> flags effect-count) (-> merc-ctrl header effect-count)) + (set! (-> flags bit-flags) (the pc-merc-bits 0)) + (when update-verts + (if (= update-verts 'blerc) + (logior! (-> flags bit-flags) (pc-merc-bits pc-blerc)) + (logior! (-> flags bit-flags) (pc-merc-bits update-verts)) + ) + ) + (when (logtest? (-> dc status) (draw-control-status disable-fog)) + (logior! (-> flags bit-flags) (pc-merc-bits disable-fog)) + ) + (when (logtest? (-> dc global-effect) (draw-control-global-effect disable-envmap)) + (logior! (-> flags bit-flags) (pc-merc-bits disable-envmap)) + ) + (set! (-> flags enable-mask) enable-mask) + (set! (-> flags ignore-alpha-mask) ignore-alpha-mask) + ) + (&+! dma-buf (* 16 2)) + (+! qwc-total 2) + + ;; include blerc weights. + (when (= update-verts 'blerc) + (mem-copy! dma-buf blercs (* 40 4)) + (&+! dma-buf (* 40 4)) + (+! qwc-total 10) + ) + + ;; fades + (let ((fades (the (pointer uint32) dma-buf))) + (dotimes (i (-> merc-ctrl header effect-count)) + (set! (-> fades i) (the-as uint (-> (-> *foreground* merc-bucket-info) effect i color-fade))) + ) + ) + + (let ((num-fades (/ (+ (-> merc-ctrl header effect-count) 3) 4))) + (&+! dma-buf (* 16 num-fades)) + (+! qwc-total num-fades) + ) + + ;; merc ptrs + (let ((merc-ptrs (the (pointer object) dma-buf))) + (dotimes (i (-> merc-ctrl header effect-count)) + (set! (-> merc-ptrs i) (-> merc-ctrl effect i)) + ) + ) + (let ((num-fades (/ (+ (-> merc-ctrl header effect-count) 3) 4))) + (&+! dma-buf (* 16 num-fades)) + (+! qwc-total num-fades) + ) + ) + ) + ) + + (set! (-> start-packet dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc qwc-total)) + dma-buf + ) + ) + +(defun pc-draw-bones ((dc draw-control) (dma-buf pointer) (matrix-buf pointer)) + "Add a dma packet to tell the PC renderer which model we are renderering." + (let* ((use-flags (new 'stack-no-clear 'array 'uint8 7)) + (blerc-weights (new 'stack-no-clear 'array 'float 40)) + (mctrl (-> dc mgeo)) + (buckets (-> (scratchpad-object foreground-work) grid level-buckets (-> (scratchpad-object foreground-work) draw-index-map (-> dc level-index)))) + (has-ripple-or-texscroll #f) + (uses-fp-blerc (and *use-fp-blerc* (pc-merc-blend-shape (the process-drawable (-> dc process)) blerc-weights))) + ) + ;; mark all as unused, until we see a use + (dotimes (i 7) (set! (-> use-flags i) 0)) + + ;; look for uses. + (dotimes (i (-> mctrl header effect-count)) + ;;(format 0 "effect ~d, texture ~d~%" i (-> mctrl effect i texture-index)) + (when (= 0 (-> *foreground* merc-bucket-info effect i merc-path)) + (set! (-> use-flags (-> mctrl effect i texture-index)) 1) + (when (logtest? (-> (-> dc lod-set lod (-> dc cur-lod) geo) effect i effect-bits) (effect-bits ripple texscroll)) + (set! has-ripple-or-texscroll #t) + ) + ) + ) + + ;; loop over texture groupe + (dotimes (i 7) + (when (nonzero? (-> use-flags i)) + ;; this one is used, update the model for pc. + ;; create dma-packet to send the name: + (let ((packet (the-as dma-packet dma-buf)) + (vertex-update #f) + ) + (when has-ripple-or-texscroll + (set! vertex-update #t) + ) + (when uses-fp-blerc + (set! vertex-update 'blerc) + ) + + ;; if the fp blerc is disabled, handle blerc with normal modified vertices. + (unless *use-fp-blerc* + (let* ((pd (the process-drawable (-> dc process))) + (jc (-> pd skel))) + (when (nonzero? jc) + (when (logtest? (-> jc status) (joint-control-status blend-shape-valid)) + (set! vertex-update #t) + ) + ) + ) + ) + + ; (format 0 "~D weights: ~X~%" i blerc-weights) + + (set! dma-buf (pc-merc-draw-request dc dma-buf matrix-buf i vertex-update blerc-weights)) + + ;; create a patch packet + (let ((patch-packet (the-as dma-packet dma-buf))) + (set! (-> patch-packet dma) (the-as dma-tag #x20000000)) + (set! (-> patch-packet vif0) (new 'static 'vif-tag)) + (set! (-> patch-packet vif1) (new 'static 'vif-tag)) + (set! dma-buf (the pointer (&+ patch-packet 16))) + + ;; now, the confusing splice stuff + (let ((merc-chain (-> buckets data i merc))) + ;; first step: set first, if we are the first thing to draw. + (when (zero? (-> merc-chain first)) + (set! (-> merc-chain first) packet) + ) + + ;; second step: patch the last thing that was drawn + (when (nonzero? (-> merc-chain patch)) + (let ((patch-addr (+ 4 (the-as int (-> merc-chain patch))))) + (set! (-> (the (pointer dma-packet) patch-addr)) packet) + ) + ) + + ;; third step: update patch to point to our packet. + (set! (-> merc-chain patch) patch-packet) + + ) + ) + ) + + ) + ) + ) + dma-buf + ) + +(defun foreground-draw ((dc draw-control) (dma-buf dma-buffer) (dist-in float)) + (local-vars (fg-work foreground-work) (a0-92 uint)) (rlet ((vf1 :class vf) (vf2 :class vf) (vf3 :class vf) @@ -1077,82 +1892,86 @@ (vf9 :class vf) (acc :class vf) ) - ;; (.lui work 28672) - (set! work (scratchpad-object foreground-work)) - (let* ((bone-calc (-> dma-buf base)) - (matrix-mem (the-as object (&+ bone-calc 64))) - ) - (let ((a3-0 (logand (the-as int matrix-mem) 48))) - (b! (zero? a3-0) cfg-2 :delay (nop!)) - (set! matrix-mem (&- (&+ (the-as pointer matrix-mem) 64) (the-as uint a3-0))) - ) - (label cfg-2) - (let* ((num-bones (+ (-> dc mgeo length) 3)) - (matrix-mem-size (* num-bones 128)) - ) - (let ((regs (-> (scratchpad-object foreground-work) regs))) - (set! (-> regs joint-ptr) (the-as (inline-array joint) (-> dc jgeo data 0))) - (set! (-> regs bone-ptr) (-> dc skeleton bones)) - (set! (-> regs num-bones) (the-as uint num-bones)) - (set! (-> regs dist) dist) - (set! (-> regs dma-buf) dma-buf) - (set! (-> regs level-buckets) (-> (scratchpad-object foreground-work) - grid - level-buckets - (-> (scratchpad-object foreground-work) draw-index-map (-> dc level-index)) - ) - ) - ) - (let ((bone-output matrix-mem) - (bone-flags 0) + ;;(.lui fg-work 28672) + (set! fg-work (scratchpad-object foreground-work)) + ;; (with-pc + ;; (when (-> *pc-settings* force-envmap?) + ;; (set! dist-in 0.0))) + (let* ((bone-calc (the-as bone-calculation (-> dma-buf base))) + (matrix-mem (the-as object (&+ (the-as pointer bone-calc) 64))) + ) + (let ((a3-0 (logand (the-as int matrix-mem) 48))) + (b! (zero? a3-0) cfg-2 :delay (nop!)) + (set! matrix-mem (&- (&+ (the-as pointer matrix-mem) 64) (the-as uint a3-0))) + ) + (label cfg-2) + (let* ((num-bones (+ (-> dc mgeo num-joints) 3)) + (bone-mem-size (* num-bones 128)) + ) + (let ((fg-regs (-> (scratchpad-object foreground-work) regs))) + (set! (-> fg-regs joint-ptr) (the-as (inline-array joint) (-> dc jgeo data 0))) + (set! (-> fg-regs bone-ptr) (-> dc skeleton bones)) + (set! (-> fg-regs num-bones) (the-as uint num-bones)) + (set! (-> fg-regs dist) dist-in) + (set! (-> fg-regs dma-buf) dma-buf) + (set! (-> fg-regs level-buckets) + (-> (scratchpad-object foreground-work) + grid + level-buckets + (-> (scratchpad-object foreground-work) draw-index-map (-> dc level-index)) + ) + ) ) - (let ((fg-regs (-> (scratchpad-object foreground-work) regs)) - (calc-list *bone-calculation-list*) - (calc (the-as bone-calculation bone-calc)) - ) - (let ((t2-4 (-> fg-regs joint-ptr)) - (t3-0 (-> fg-regs bone-ptr)) - (t4-1 (-> fg-regs num-bones)) - (t5-0 calc) + (let ((matrix-mem2 matrix-mem) + (bflags 0) ) - (set! (-> t5-0 flags) (the-as bone-calc-flags bone-flags)) - (set! (-> t5-0 num-bones) t4-1) - (set! (-> t5-0 matrix-area) (the-as (inline-array pris-mtx) bone-output)) - (set! (-> t5-0 joints) t2-4) - (set! (-> t5-0 bones) t3-0) - (set! (-> t5-0 next) (the-as bone-calculation 0)) - ) - (if (nonzero? (-> calc-list next)) - (set! (-> calc-list next next) calc) - ) - (if (zero? (-> calc-list first)) - (set! (-> calc-list first) calc) - ) - (set! (-> calc-list next) calc) - ) - (&+ bone-calc 48) - (let ((dma-ptr (the-as object (+ (the-as uint matrix-mem) matrix-mem-size)))) - (set! (-> work regs mtxs) (the-as (inline-array pris-mtx) matrix-mem)) - (let ((bucket-info (-> *foreground* merc-bucket-info))) - (when (= (-> dc data-format) (draw-control-data-format merc)) - (let ((lights-in (-> (scratchpad-object foreground-work) lights)) - (lights-out (-> bucket-info light)) + (let ((f-regs (-> (scratchpad-object foreground-work) regs)) + (bone-list *bone-calculation-list*) + (calc-to-add bone-calc) + ) + (let ((jnt (-> f-regs joint-ptr)) + (bn (-> f-regs bone-ptr)) + (count (-> f-regs num-bones)) + (calc calc-to-add) ) - (let ((inv-camera (-> *math-camera* inv-camera-rot))) - (nop!) - (nop!) - (.lvf vf4 (&-> inv-camera rvec quad)) - (nop!) - (.lvf vf5 (&-> inv-camera uvec quad)) - (nop!) - (.lvf vf6 (&-> inv-camera fvec quad)) + (set! (-> calc flags) (the-as bone-calc-flags bflags)) + (set! (-> calc num-bones) count) + (set! (-> calc matrix-area) (the-as (inline-array pris-mtx) matrix-mem2)) + (set! (-> calc joints) jnt) + (set! (-> calc bones) bn) + (set! (-> calc next) (the-as bone-calculation 0)) + ) + (if (nonzero? (-> bone-list next)) + (set! (-> bone-list next next) calc-to-add) + ) + (if (zero? (-> bone-list first)) + (set! (-> bone-list first) calc-to-add) ) - (nop!) - (.lvf vf1 (&-> lights-in direction 0 quad)) - (nop!) - (.lvf vf2 (&-> lights-in direction 1 quad)) - (nop!) - (.lvf vf3 (&-> lights-in direction 2 quad)) + (set! (-> bone-list next) calc-to-add) + ) + (&+ bone-calc 48) + (let ((dma-ptr (the-as pointer (+ (the-as uint matrix-mem) bone-mem-size)))) + (set! (-> fg-work regs mtxs) (the-as (inline-array pris-mtx) matrix-mem)) + (let ((bucket-info (-> *foreground* merc-bucket-info))) + (when (= (-> dc data-format) (draw-control-data-format merc)) + (let ((fg-lights (-> (scratchpad-object foreground-work) lights)) + (rotated-light-out (-> bucket-info light)) + ) + (let ((inv-cam-rot (-> *math-camera* inv-camera-rot))) + (nop!) + (nop!) + (.lvf vf4 (&-> inv-cam-rot quad 0)) + (nop!) + (.lvf vf5 (&-> inv-cam-rot quad 1)) + (nop!) + (.lvf vf6 (&-> inv-cam-rot quad 2)) + ) + (nop!) + (.lvf vf1 (&-> fg-lights direction 0 quad)) + (nop!) + (.lvf vf2 (&-> fg-lights direction 1 quad)) + (nop!) + (.lvf vf3 (&-> fg-lights direction 2 quad)) ;; (.vcallms 0) ; mulax.xyzw ACC, vf01, vf04 (.mul.x.vf acc vf1 vf4) @@ -1172,366 +1991,374 @@ (.add.mul.y.vf acc vf2 vf6 acc) ; maddz.xyzw vf09, vf03, vf06 (.add.mul.z.vf vf9 vf3 vf6 acc) - (let ((a1-9 (-> lights-in color 0 quad))) - (nop!) - (let ((a2-6 (-> lights-in color 1 quad))) - (nop!) - (let ((a3-4 (-> lights-in color 2 quad))) + + (let ((a1-9 (-> fg-lights color 0 quad))) (nop!) - (let ((a0-6 (-> lights-in ambient quad))) + (let ((a2-6 (-> fg-lights color 1 quad))) (nop!) - (set! (-> lights-out color 0 quad) a1-9) - (nop!) - (set! (-> lights-out color 1 quad) a2-6) - (nop!) - (set! (-> lights-out color 2 quad) a3-4) - (nop!) - (set! (-> lights-out ambient quad) a0-6) + (let ((a3-4 (-> fg-lights color 2 quad))) + (nop!) + (let ((a0-6 (-> fg-lights ambient quad))) + (nop!) + (set! (-> rotated-light-out color 0 quad) a1-9) + (nop!) + (set! (-> rotated-light-out color 1 quad) a2-6) + (nop!) + (set! (-> rotated-light-out color 2 quad) a3-4) + (nop!) + (set! (-> rotated-light-out ambient quad) a0-6) + ) + ) ) ) + (nop!) + (.nop.vf) + (nop!) + (.svf (&-> rotated-light-out direction 0 quad) vf7) + (nop!) + (.svf (&-> rotated-light-out direction 1 quad) vf8) + (nop!) + (.svf (&-> rotated-light-out direction 2 quad) vf9) + (nop!) + (set! (-> rotated-light-out fade-flags) (the-as uint 0)) ) - ) - (nop!) - (.nop.vf) - (nop!) - (.svf (&-> lights-out direction 0 quad) vf7) - (nop!) - (.svf (&-> lights-out direction 1 quad) vf8) - (nop!) - (.svf (&-> lights-out direction 2 quad) vf9) - (nop!) - (set! (-> lights-out direction 1 w) 0.0) - ) - (set! (-> (scratchpad-object foreground-work) regs merc-used) (the-as uint 0)) - (set! (-> (scratchpad-object foreground-work) regs emerc-used) (the-as uint 0)) - (set! (-> (scratchpad-object foreground-work) regs mercneric-used) (the-as uint 0)) - (set! (-> bucket-info needs-clip) (if (logtest? (-> dc status) (draw-control-status close-to-screen)) - 1 - 0 - ) - ) - (set! (-> bucket-info need-mercprime-if-merc) 0) - (set! (-> bucket-info must-use-mercneric-for-clip) 0) - (when (logtest? (-> dc status) (draw-control-status close-to-screen)) - (cond - ((logtest? (-> dc status) (draw-control-status force-vu1)) - (set! (-> bucket-info need-mercprime-if-merc) 1) - ) - ((nonzero? (-> dc longest-edge)) - (if (foreground-check-longest-edge-asm dc (-> (scratchpad-object foreground-work) regs dist)) + (set! (-> (scratchpad-object foreground-work) regs merc-used) (the-as uint 0)) + (set! (-> (scratchpad-object foreground-work) regs emerc-used) (the-as uint 0)) + (set! (-> (scratchpad-object foreground-work) regs mercneric-used) (the-as uint 0)) + (set! (-> bucket-info needs-clip) (if (logtest? (-> dc status) (draw-control-status close-to-screen)) + 1 + 0 + ) + ) + (set! (-> bucket-info need-mercprime-if-merc) 0) + (set! (-> bucket-info must-use-mercneric-for-clip) 0) + (when (logtest? (-> dc status) (draw-control-status close-to-screen)) + (cond + ((logtest? (-> dc status) (draw-control-status force-vu1)) (set! (-> bucket-info need-mercprime-if-merc) 1) - (set! (-> bucket-info must-use-mercneric-for-clip) 1) ) - ) - (else - (set! (-> bucket-info must-use-mercneric-for-clip) 1) - ) - ) - ) - (let ((geo (-> dc lod-set lod (-> dc cur-lod) geo))) - (let ((effect-mask (-> dc effect-mask))) - (dotimes (effect-idx (the-as int (-> geo header effect-count))) - (cond - ((= (logand effect-mask 1) 1) - (set! (-> bucket-info effect effect-idx disable-draw) (the-as uint 1)) + ((nonzero? (-> dc longest-edge)) + (if (foreground-check-longest-edge-asm dc (-> (scratchpad-object foreground-work) regs dist)) + (set! (-> bucket-info need-mercprime-if-merc) 1) + (set! (-> bucket-info must-use-mercneric-for-clip) 1) + ) ) - ((begin - (set! (-> bucket-info effect effect-idx disable-draw) (the-as uint 0)) - (set! (-> bucket-info effect effect-idx disable-envmap) (the-as uint 0)) - (when (logtest? (-> geo effect effect-idx effect-bits) (effect-bits texscroll)) - (let* ((v1-40 (the-as structure (-> geo effect effect-idx extra-info))) - (texscroll-info - (the-as - mei-texture-scroll - (+ (the-as uint v1-40) (* (-> (the-as merc-extra-info v1-40) texture-scroll-offset) 16)) + (else + (set! (-> bucket-info must-use-mercneric-for-clip) 1) + ) + ) + ) + (let ((geo (-> dc lod-set lod (-> dc cur-lod) geo))) + (let ((effect-mask (-> dc effect-mask))) + (dotimes (effect-idx (the-as int (-> geo header effect-count))) + (cond + ((= (logand effect-mask 1) 1) + (set! (-> bucket-info effect effect-idx disable-draw) (the-as uint 1)) + ) + ((begin + (set! (-> bucket-info effect effect-idx disable-draw) (the-as uint 0)) + (set! (-> bucket-info effect effect-idx disable-envmap) (the-as uint 0)) + (when (logtest? (-> geo effect effect-idx effect-bits) (effect-bits texscroll)) + (let* ((extra (the-as structure (-> geo effect effect-idx extra-info))) + (tex-scroll-info + (the-as + mei-texture-scroll + (+ (the-as uint extra) (* (-> (the-as merc-extra-info extra) texture-scroll-offset) 16)) + ) + ) ) - ) - ) - (if (< (-> (scratchpad-object foreground-work) regs dist) (-> texscroll-info max-dist)) - (texscroll-make-request (-> geo effect effect-idx)) + (if (< (-> (scratchpad-object foreground-work) regs dist) (-> tex-scroll-info max-dist)) + (texscroll-make-request (-> geo effect effect-idx)) + ) ) + ) + (when (and (logtest? (-> geo effect effect-idx effect-bits) (effect-bits ripple)) (-> dc ripple)) + (set! dma-ptr (foreground-ripple dc geo dma-ptr effect-idx)) + ) + (nonzero? (-> dc death-timer)) ) + (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 2)) + (set! (-> (scratchpad-object foreground-work) regs mercneric-used) (the-as uint 1)) ) - (if (and (logtest? (-> geo effect effect-idx effect-bits) (effect-bits ripple)) (-> dc ripple)) - (set! dma-ptr (foreground-ripple dc geo (the-as pointer dma-ptr) effect-idx)) - ) - (or (nonzero? (-> dc death-timer)) - (and (logtest? (-> dc global-effect) (draw-control-global-effect no-textures)) - (not (logtest? (-> geo effect effect-idx effect-usage) 8)) - ) - ) - ) - (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 2)) - (set! (-> bucket-info effect effect-idx disable-envmap) (the-as uint 1)) - (set! (-> (scratchpad-object foreground-work) regs mercneric-used) (the-as uint 1)) - ) - ((logtest? (-> geo effect effect-idx effect-bits) (effect-bits force-mercneric)) - (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 2)) - (set! (-> (scratchpad-object foreground-work) regs mercneric-used) (the-as uint 1)) - ) - ((and (logtest? (-> geo effect effect-idx effect-usage) 1) - (not (logtest? (-> dc global-effect) (draw-control-global-effect disable-envmap))) - ) - 0.0 - (let* ((v1-75 (the-as structure (-> geo effect effect-idx extra-info))) - (envmap-info - (the-as mei-envmap-tint (+ (the-as uint v1-75) (* (-> (the-as merc-extra-info v1-75) envmap-tint-offset) 16))) - ) - (envmap-fade0 (-> envmap-info fade0)) - (envmap-fade1 (-> envmap-info fade1)) - (envmap-interp (+ (* envmap-fade0 (-> (scratchpad-object foreground-work) regs dist)) envmap-fade1)) - (envmap-strength (fmax 0.0 (fmin 1.0 envmap-interp))) - ) - (cond - ((or (nonzero? (-> bucket-info must-use-mercneric-for-clip)) - (or (< 0.0 envmap-strength) (logtest? (-> geo effect effect-idx effect-bits) (effect-bits cross-fade))) + ((logtest? (-> geo effect effect-idx effect-bits) (effect-bits force-mercneric)) + (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 2)) + (set! (-> (scratchpad-object foreground-work) regs mercneric-used) (the-as uint 1)) + ) + ((and (logtest? (-> geo effect effect-idx effect-usage) 1) + (zero? (logand (-> dc global-effect) (draw-control-global-effect disable-envmap))) ) - (let ((envmap-tint (&-> envmap-info tint)) - (envmap-rgba-out (the-as (pointer uint8) (-> bucket-info effect effect-idx))) + 0.0 + (let* ((ei (the-as structure (-> geo effect effect-idx extra-info))) + (tint-info + (the-as mei-envmap-tint (+ (the-as uint ei) (* (-> (the-as merc-extra-info ei) envmap-tint-offset) 16))) + ) + (t-fade-0 (-> tint-info fade0)) + (t-fade-1 (-> tint-info fade1)) + (t-interp (+ (* t-fade-0 (-> (scratchpad-object foreground-work) regs dist)) t-fade-1)) + (t-amount (fmax 0.0 (fmin 1.0 t-interp))) ) - (let ((tod-rgba (-> *time-of-day-context* current-env-color))) - (if (and (logtest? (-> geo effect effect-idx effect-bits) (effect-bits cross-fade)) - (logtest? (-> dc status) (draw-control-status warp-cross-fade)) + (cond + ((or (nonzero? (-> bucket-info must-use-mercneric-for-clip)) + (or (< 0.0 t-amount) (logtest? (-> geo effect effect-idx effect-bits) (effect-bits cross-fade))) + ) + (let ((a0-33 (&-> tint-info tint)) + (v1-74 (the-as object (-> bucket-info effect effect-idx))) + ) + (let ((a1-17 (-> *time-of-day-context* current-env-color))) + (if (and (logtest? (-> geo effect effect-idx effect-bits) (effect-bits cross-fade)) + (logtest? (-> dc status) (draw-control-status warp-cross-fade)) + ) + (set! t-amount (* 0.0078125 (the float (- 128 (the-as int (-> dc force-fade)))) t-amount)) + ) + (cond + ((logtest? (-> geo effect effect-idx effect-bits) (effect-bits ignore-tod-for-envmap-tint)) + (dotimes (a1-18 3) + (set! (-> (the-as (pointer int8) (&+ (the-as pointer v1-74) a1-18))) + (the int (* t-amount (the float (-> (the-as (pointer uint8) (&+ a0-33 a1-18)) 0)))) + ) ) - (set! envmap-strength (* 0.0078125 (the float (- 128 (the-as int (-> dc force-fade)))) envmap-strength)) + ) + (else + (let ((f0-7 (* 0.0078125 t-amount))) + (dotimes (a2-27 3) + (set! (-> (the-as (pointer int8) (&+ (the-as pointer v1-74) a2-27))) + (the int (* f0-7 (-> a1-17 data a2-27) (the float (-> (the-as (pointer uint8) (&+ a0-33 a2-27)) 0)))) + ) + ) + ) + ) + ) ) + (set! (-> (the-as merc-effect-bucket-info v1-74) alpha) (the-as uint 128)) + ) + ;(format 0 "envmap stat: ~A ~A~%" (-> dc process name) (logtest? (-> geo effect effect-idx effect-bits) (effect-bits emerc))) (cond - ((logtest? (-> geo effect effect-idx effect-bits) (effect-bits ignore-tod-for-envmap-tint)) - (dotimes (a1-18 3) - (set! (-> envmap-rgba-out a1-18) - (the-as - uint - (min 255 (the int (* envmap-strength (the float (-> (the-as (pointer uint8) (&+ envmap-tint a1-18)) 0))))) - ) - ) - ) + ((and (logtest? (-> dc status) (draw-control-status force-vu1)) + (logtest? (-> geo effect effect-idx effect-bits) (effect-bits emerc)) + ) + (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 1)) + (set! (-> (scratchpad-object foreground-work) regs emerc-used) (the-as uint 1)) ) (else - (let ((envmap-rgba-multiplier (* 0.0078125 envmap-strength))) - (dotimes (a2-26 3) - (set! (-> envmap-rgba-out a2-26) - (the-as - uint - (min - 255 - (the int - (* envmap-rgba-multiplier - (-> tod-rgba data a2-26) - (the float (-> (the-as (pointer uint8) (&+ envmap-tint a2-26)) 0)) - ) - ) - ) - ) - ) + (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 2)) + (set! (-> (scratchpad-object foreground-work) regs mercneric-used) (the-as uint 1)) + (if (logtest? (-> dc status) (draw-control-status force-fade)) + (set! (-> bucket-info light fade-int) (-> dc force-fade)) ) - ) ) ) + + (set! (-> bucket-info effect effect-idx ignore-alpha) + (the-as uint (if (logtest? (-> geo effect effect-idx effect-bits) (effect-bits ignore-alpha)) + 1 + 0 + ) + ) + ) ) - (set! (-> envmap-rgba-out 3) (the-as uint 128)) - ) + ((logtest? (-> dc status) (draw-control-status force-fade)) + (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 2)) + (set! (-> bucket-info effect effect-idx ignore-alpha) + (the-as uint (if (logtest? (-> geo effect effect-idx effect-bits) (effect-bits ignore-alpha)) + 1 + 0 + ) + ) + ) + (set! (-> (scratchpad-object foreground-work) regs mercneric-used) (the-as uint 1)) + (set! (-> bucket-info light fade-int) (-> dc force-fade)) + ) + (else + (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 0)) + (set! (-> bucket-info effect effect-idx ignore-alpha) (the-as uint 1)) + (set! (-> (scratchpad-object foreground-work) regs merc-used) (the-as uint 1)) + ) + ) + ) + ) ;; end if envmap + + (else (cond - ((and (logtest? (-> dc status) (draw-control-status force-vu1)) - (logtest? (-> geo effect effect-idx effect-bits) (effect-bits emerc)) - ) - (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 1)) - (set! (-> (scratchpad-object foreground-work) regs emerc-used) (the-as uint 1)) + ((logtest? (-> geo effect effect-idx effect-bits) (effect-bits cross-fade)) + (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 2)) + (set! (-> (scratchpad-object foreground-work) regs mercneric-used) (the-as uint 1)) + ) + ((or (logtest? (-> dc status) (draw-control-status force-fade)) + (nonzero? (-> bucket-info must-use-mercneric-for-clip)) + ) + (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 2)) + (if (logtest? (-> dc global-effect) (draw-control-global-effect disable-envmap)) + (set! (-> bucket-info effect effect-idx disable-envmap) (the-as uint 1)) + ) + (set! (-> (scratchpad-object foreground-work) regs mercneric-used) (the-as uint 1)) ) (else - (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 2)) - (set! (-> (scratchpad-object foreground-work) regs mercneric-used) (the-as uint 1)) - (if (logtest? (-> dc status) (draw-control-status force-fade)) - (set! (-> bucket-info light fade-int) (-> dc force-fade)) - ) + (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 0)) + (set! (-> (scratchpad-object foreground-work) regs merc-used) (the-as uint 1)) ) ) (set! (-> bucket-info effect effect-idx ignore-alpha) - (the-as uint (if (logtest? (-> geo effect effect-idx effect-bits) (effect-bits ignore-alpha)) - 1 - 0 - ) - ) - ) - ) - ((logtest? (-> dc status) (draw-control-status force-fade)) - (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 2)) - (set! (-> bucket-info effect effect-idx ignore-alpha) - (the-as uint (if (logtest? (-> geo effect effect-idx effect-bits) (effect-bits ignore-alpha)) - 1 - 0 - ) - ) + (the-as + uint + (if (or (logtest? (-> geo effect effect-idx effect-bits) (effect-bits ignore-alpha)) + (logtest? (-> dc global-effect) (draw-control-global-effect disable-envmap)) + ) + 1 + 0 + ) + ) ) - (set! (-> (scratchpad-object foreground-work) regs mercneric-used) (the-as uint 1)) - (set! (-> bucket-info light fade-int) (-> dc force-fade)) ) - (else - (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 0)) - (set! (-> bucket-info effect effect-idx ignore-alpha) (the-as uint 1)) - (set! (-> (scratchpad-object foreground-work) regs merc-used) (the-as uint 1)) + ) + (set! effect-mask (shr effect-mask 1)) + ) + ) + + ;; reassign for PC. For the most part, we reassign everything to merc. The exceptions are: + ;; - "warp" effect is on: this special effect isn't supported by PC merc + ;; - "death" effect is on: this requires the renderer to return transformed vertices. + ;; - using the warp bucket. - there's no merc warp bucket, so we have to use generic here. + ;; NOTE: we don't listen to force-mercneric because I believe we handle this case correctly + ;; in extract_merc.cpp by checking the trans bit. This can be enabled, but texture uploads + ;; for at least water aren't hooked up to the PC texture system. + (when (or (nonzero? (-> (scratchpad-object foreground-work) regs mercneric-used)) + (nonzero? (-> (scratchpad-object foreground-work) regs emerc-used)) + ) + + ;; technically we should use generic for ripple query, but the only user is dark eco, + ;; which doesn't actually do anything with the result of the query. + (when #t ;;(not (and (-> dc ripple) (-> dc ripple query))) + (set! (-> (scratchpad-object foreground-work) regs mercneric-used) 0) + (set! (-> (scratchpad-object foreground-work) regs emerc-used) 0) + (set! (-> (scratchpad-object foreground-work) regs merc-used) 1) + (dotimes (effect-idx (the-as int (-> geo header effect-count))) + (cond + ((or (logtest? (-> geo effect effect-idx effect-bits) (effect-bits cross-fade)) + (logtest? (-> geo effect effect-idx effect-bits) (effect-bits force-mercneric)) + (= (-> geo effect effect-idx texture-index) (tpage-category warp)) + (nonzero? (-> dc death-timer)) + ) + + ; (if (logtest? (-> geo effect effect-idx effect-bits) (effect-bits cross-fade)) + ; (format *stdcon* "[fg] ~S to generic 1~%" (-> dc process name)) + ; ) + ; (if (= (-> geo effect effect-idx texture-index) (tpage-category warp)) + ; (format *stdcon* "[fg] ~S to generic 2~%" (-> dc process name)) + ; ) + ; (if (nonzero? (-> dc death-timer)) + ; (format *stdcon* "[fg] ~S to generic 3~%" (-> dc process name)) + ; ) + (set! (-> bucket-info effect effect-idx merc-path) 2) + (set! (-> (scratchpad-object foreground-work) regs mercneric-used) 1) ) - ) - ) - ) - (else - (cond - ((logtest? (-> geo effect effect-idx effect-bits) (effect-bits cross-fade)) - (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 2)) - (set! (-> (scratchpad-object foreground-work) regs mercneric-used) (the-as uint 1)) - ) - ((or (logtest? (-> dc status) (draw-control-status force-fade)) - (nonzero? (-> bucket-info must-use-mercneric-for-clip)) - ) - (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 2)) - (if (logtest? (-> dc global-effect) (draw-control-global-effect disable-envmap)) - (set! (-> bucket-info effect effect-idx disable-envmap) (the-as uint 1)) - ) - (set! (-> (scratchpad-object foreground-work) regs mercneric-used) (the-as uint 1)) - ) - (else - (set! (-> bucket-info effect effect-idx merc-path) (the-as uint 0)) - (set! (-> (scratchpad-object foreground-work) regs merc-used) (the-as uint 1)) + (else + (set! (-> bucket-info effect effect-idx merc-path) 0) + ) + ) + + (when (logtest? (-> geo effect effect-idx effect-usage) 1) + (set! (-> bucket-info effect effect-idx ignore-alpha) 1) ) ) - (set! (-> bucket-info effect effect-idx ignore-alpha) - (the-as - uint - (if (or (logtest? (-> geo effect effect-idx effect-bits) (effect-bits ignore-alpha)) - (logtest? (-> dc global-effect) (draw-control-global-effect disable-envmap)) - ) - 1 - 0 - ) - ) - ) ) ) - (set! effect-mask (shr effect-mask 1)) - ) - ) - ;; TODO reassign for PC! - (when (nonzero? (-> (scratchpad-object foreground-work) regs mercneric-used)) - (if (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask generic)) - (set! dma-ptr (foreground-generic-merc dc (the-as pointer dma-ptr) 0)) - ) - ) - (if (-> dc shadow) - (set! dma-ptr - (foreground-shadow dc (-> (scratchpad-object foreground-work) regs mtxs) (the-as pointer dma-ptr)) - ) - ) - (when (nonzero? (-> (scratchpad-object foreground-work) regs merc-used)) - (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask merc)) - (let ((fade-amount 0) - (fade-enable #f) + (when (nonzero? (-> (scratchpad-object foreground-work) regs mercneric-used)) + (if (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask generic)) + (set! dma-ptr (foreground-generic-merc dc dma-ptr 0)) ) - (cond - ((logtest? (-> geo effect 0 effect-bits) (effect-bits no-fade-out)) - (set! fade-enable #f) - ) - ((logtest? (-> dc status) (draw-control-status force-fade)) - (set! fade-amount (the-as int (-> dc force-fade))) - (set! fade-enable #t) - ) - ((= (-> dc cur-lod) (-> dc lod-set max-lod)) - (let ((dist-until-gone - (- (-> dc lod-set lod (-> dc cur-lod) dist) (-> (scratchpad-object foreground-work) regs dist)) - ) - ) - (if (< dist-until-gone 81920.0) - (set! fade-enable #t) - ) - (set! fade-amount (the int (* 0.0015625 dist-until-gone))) - ) - ) + ) + (if (-> dc shadow) + (set! dma-ptr (foreground-shadow dc (-> (scratchpad-object foreground-work) regs mtxs) dma-ptr)) ) - (when fade-enable - (let ((v1-164 (min 128 (max 0 fade-amount))) - (a0-90 (-> bucket-info light)) + (when (nonzero? (-> (scratchpad-object foreground-work) regs merc-used)) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask merc)) + (let ((merc-fade-int 0) + (fade-enable #f) + ) + (cond + ((logtest? (-> geo effect 0 effect-bits) (effect-bits no-fade-out)) + (set! fade-enable #f) + ) + ((logtest? (-> dc status) (draw-control-status force-fade)) + (set! merc-fade-int (the-as int (-> dc force-fade))) + (set! fade-enable #t) + ) + ((= (-> dc cur-lod) (-> dc lod-set max-lod)) + (let ((dist-until-gone + (- (-> dc lod-set lod (-> dc cur-lod) dist) (-> (scratchpad-object foreground-work) regs dist)) + ) + ) + (if (< dist-until-gone 81920.0) + (set! fade-enable #t) + ) + (set! merc-fade-int (the int (* 0.0015625 dist-until-gone))) + ) + ) + ) + (when fade-enable + (let ((v1-159 (min 128 (max 0 merc-fade-int))) + (a0-84 (-> bucket-info light)) + ) + (set! (-> a0-84 fade-flags) (the-as uint 0.00000000000000000000000000000000000000000014)) + (set! (-> a0-84 fade-int) (the-as uint v1-159)) ) - (set! (-> a0-90 fade-flags) (the-as uint 0.00000000000000000000000000000000000000000014)) - (set! (-> a0-90 fade-int) (the-as uint v1-164)) + ) ) + + ;; added + (set! dma-ptr (pc-draw-bones dc dma-ptr (the pointer (-> (scratchpad-object foreground-work) regs mtxs)))) + + ; (if (nonzero? (-> bucket-info need-mercprime-if-merc)) + ; (set! dma-ptr (foreground-merc dc (-> (scratchpad-object foreground-work) regs mtxs) dma-ptr 32 17 bucket-info)) + ; (set! dma-ptr (foreground-merc dc (-> (scratchpad-object foreground-work) regs mtxs) dma-ptr 35 20 bucket-info)) + ; ) ) ) - (if (nonzero? (-> bucket-info need-mercprime-if-merc)) - (set! dma-ptr - (foreground-merc - dc - (-> (scratchpad-object foreground-work) regs mtxs) - (the-as pointer dma-ptr) - 32 - 17 - bone-flags - ) - ) - (set! dma-ptr - (foreground-merc - dc - (-> (scratchpad-object foreground-work) regs mtxs) - (the-as pointer dma-ptr) - 35 - 20 - bone-flags - ) - ) + ) + (when (nonzero? (-> (scratchpad-object foreground-work) regs emerc-used)) + (if (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask emerc)) + (set! dma-ptr (foreground-emerc dc (-> (scratchpad-object foreground-work) regs mtxs) dma-ptr 29 19 bflags)) ) ) - ) - ) - (when (nonzero? (-> (scratchpad-object foreground-work) regs emerc-used)) - (if (logtest? (vu1-renderer-mask emerc) (-> *display* vu1-enable-user)) - (set! dma-ptr - (foreground-emerc - dc - (-> (scratchpad-object foreground-work) regs mtxs) - (the-as pointer dma-ptr) - 29 - 19 - bone-flags - ) + (when (nonzero? (-> dc death-timer)) + (when (not (paused?)) + (+! (-> dc death-timer) -1) + (if (>= (the-as uint 1) (-> dc death-timer)) + (send-event (-> dc process) 'death-end dc) ) + ) ) + ) ) - (when (nonzero? (-> dc death-timer)) - (b! (paused?) cfg-131 :delay (empty-form)) - (+! (-> dc death-timer) -1) - (if (>= (the-as uint 1) (-> dc death-timer)) - (send-event (-> dc process) 'death-end dc) - ) + (let ((v1-186 (logand (the-as int dma-ptr) 48))) + 0 + (b! (zero? v1-186) cfg-128 :delay (set! a0-92 (the-as uint #x20000000))) + ;; (s.q! (the-as object dma-ptr) a0-92) + (set! (-> (the (pointer uint128) dma-ptr) 0) (the uint128 a0-92)) + + (let ((a0-93 (the-as object dma-ptr))) + (set! dma-ptr (the-as pointer (+ (- (the-as int dma-ptr) (the-as uint v1-186)) 64))) + ;; (s.w! (+ a0-93 4) (the-as int dma-ptr)) + (set! (-> (the (pointer int32) (+ (the-as uint a0-93) 4))) (the-as int dma-ptr)) + ) ) + (label cfg-128) + (set! (-> (scratchpad-object foreground-work) regs dma-buf base) + (the-as pointer (logand (the-as int dma-ptr) #xfffffff)) + ) ) ) - (label cfg-131) - (let ((v1-190 (logand (the-as int dma-ptr) 48))) - 0 - (b! (zero? v1-190) cfg-133 :delay (set! a0-100 (the-as uint #x20000000))) - ;; (s.q! dma-ptr a0-100) - (set! (-> (the (pointer uint128) dma-ptr) 0) (the uint128 a0-100)) - - (let ((a0-101 dma-ptr)) - (set! dma-ptr (+ (- (the-as int dma-ptr) (the-as uint v1-190)) 64)) - ;; (s.w! (+ a0-101 4) (the-as int dma-ptr)) - (set! (-> (the (pointer int32) (+ (the-as uint a0-101) 4))) (the-as int dma-ptr)) - ) - ) - (label cfg-133) - (set! (-> (scratchpad-object foreground-work) regs dma-buf base) - (the-as pointer (logand (the-as int dma-ptr) #xfffffff)) - ) ) ) + 0 + (none) ) - ) - 0 - (none) - ) ) -;; ERROR: function was not converted to expressions. Cannot decompile. +(def-mips2c foreground-draw-hud (function draw-control dma-buffer float none)) (kmemopen global "foreground-engine") diff --git a/goal_src/jak3/engine/gfx/foreground/lights-h.gc b/goal_src/jak3/engine/gfx/foreground/lights-h.gc index f3d993e5da..d866de3d9e 100644 --- a/goal_src/jak3/engine/gfx/foreground/lights-h.gc +++ b/goal_src/jak3/engine/gfx/foreground/lights-h.gc @@ -56,6 +56,7 @@ ((index uint16) (count uint16) ) + :pack-me ) diff --git a/goal_src/jak3/engine/gfx/foreground/merc/generic-merc-h.gc b/goal_src/jak3/engine/gfx/foreground/merc/generic-merc-h.gc index ce5ea3c255..2d591b5729 100644 --- a/goal_src/jak3/engine/gfx/foreground/merc/generic-merc-h.gc +++ b/goal_src/jak3/engine/gfx/foreground/merc/generic-merc-h.gc @@ -5,6 +5,8 @@ ;; name in dgo: generic-merc-h ;; dgos: GAME +(define-extern generic-merc-execute-all (function dma-buffer none)) + ;; DECOMP BEGINS (deftype merc-matrix (structure) diff --git a/goal_src/jak3/engine/gfx/foreground/merc/merc-blend-shape.gc b/goal_src/jak3/engine/gfx/foreground/merc/merc-blend-shape.gc index 48b4c3c900..9059272778 100644 --- a/goal_src/jak3/engine/gfx/foreground/merc/merc-blend-shape.gc +++ b/goal_src/jak3/engine/gfx/foreground/merc/merc-blend-shape.gc @@ -5,5 +5,314 @@ ;; name in dgo: merc-blend-shape ;; dgos: GAME +(define-extern setup-blerc-chains (function merc-ctrl (pointer int16) dma-buffer none)) + +;; when true, uses the PC float blerc implementation. +(define *use-fp-blerc* #t) + +(defun process-drawable-might-need-blerc? ((pd process-drawable)) + "Annoyingly, some warp object have blend shape anims, like the hiphog mirror. + These are never drawn with PC-merc (it doesn't support warp), so we still + need to the PS2-style blerc for generic. This function sees if this process-drawable + might be warp." + (let ((draw (-> pd draw))) + (if (or (zero? draw) (not draw)) + (return #f) + ) + (let ((geo (-> draw mgeo))) + (if (or (zero? geo) (not geo)) + (return #f) + ) + + (dotimes (effect-idx (-> geo header effect-count)) + (when (= (-> geo effect effect-idx texture-index) (tpage-category warp)) + (return #t) + ) + ) + ) + ) + + #f + ) + ;; DECOMP BEGINS +(define *stats-blerc* #f) + +(deftype blerc-block-header (structure) + ((tag generic-merc-tag :inline) + (vtx-count uint32) + (overlap uint32) + (lump-dest uint32) + (lump-qwc uint32) + ) + ) + + +(deftype blerc-block (structure) + ((output uint8 848) + (header blerc-block-header :inline) + ) + ) + + +(deftype blerc-dcache (structure) + ((repl-mult vector 40 :inline) + ) + ) + + +(deftype blerc-globals (structure) + ((first uint32) + (next uint32) + (min-val int16) + (max-val int16) + (fragment-count int32) + (vtx-count int32) + (target-vtx-count int32) + ) + ) + + +(define *blerc-globals* (new 'global 'blerc-globals)) + +(deftype blerc-context (structure) + ((block-a blerc-block :inline) + (dummy uint8 7312) + (block-b blerc-block :inline) + ) + ) + + +(defun-debug blerc-stats-init () + (when *stats-blerc* + (when (nonzero? (-> *blerc-globals* fragment-count)) + (format *stdcon* "~%BLERC (merc blend target) STATS~%") + (format + *stdcon* + " ~D fragments, ~D vertices~%" + (-> *blerc-globals* fragment-count) + (-> *blerc-globals* vtx-count) + ) + (format + *stdcon* + " ~D blend target computations (~F average)~%" + (-> *blerc-globals* target-vtx-count) + (/ (the float (-> *blerc-globals* target-vtx-count)) (the float (-> *blerc-globals* vtx-count))) + ) + (if (< (-> *blerc-globals* min-val) 0) + (format *stdcon* "MINIMUM OUT OF RANGE: ~D~%" (-> *blerc-globals* min-val)) + ) + (if (< 255 (-> *blerc-globals* max-val)) + (format *stdcon* "MAXIMUM OUT OF RANGE: ~D~%" (-> *blerc-globals* max-val)) + ) + ) + (let ((a0-7 *blerc-globals*)) + (set! (-> a0-7 min-val) 255) + (set! (-> a0-7 max-val) 0) + (set! (-> a0-7 fragment-count) 0) + (set! (-> a0-7 vtx-count) 0) + (set! (-> a0-7 target-vtx-count) 0) + ) + ) + 0 + (none) + ) + +(defun blerc-init () + (blerc-stats-init) + (let ((v1-0 *blerc-globals*)) + (set! (-> v1-0 first) (the-as uint 0)) + (set! (-> v1-0 next) (the-as uint 0)) + ) + 0 + (none) + ) + +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; ERROR: function has no type analysis. Cannot decompile. + +;; ERROR: function has no type analysis. Cannot decompile. + +(def-mips2c blerc-execute (function none)) + +;; WARN: Return type mismatch int vs object. +(defun merc-blend-shape ((arg0 process-drawable)) + (with-profiler 'merc *profile-merc-color* + (let* ((v1-1 (-> arg0 skel float-channels)) + (a2-0 (cond + ((> v1-1 0) + (-> arg0 skel channel (+ v1-1 -1 (-> arg0 skel active-channels))) + ) + (else + (let ((v1-7 (-> arg0 skel root-channel)) + (a0-5 (-> arg0 skel effect)) + ) + (-> v1-7 (if a0-5 + (-> a0-5 channel-offset) + 0 + ) + ) + ) + ) + ) + ) + (a3-0 (-> a2-0 frame-group)) + (a1-0 (new 'stack-no-clear 'array 'int16 128)) + (disable-blerc? (and *use-fp-blerc* (not (process-drawable-might-need-blerc? arg0)))) + ) + (when (and a3-0 (and (> (-> arg0 skel active-channels) 0) + (zero? (-> arg0 draw cur-lod)) + (logtest? (-> arg0 skel status) (joint-control-status blend-shape)) + ) + ) + (cond + ((and (-> arg0 skel override) (!= (-> arg0 skel override 0) 0.0)) + (let* ((a0-12 (-> arg0 draw mgeo)) + (v1-20 (-> a0-12 header blend-target-count)) + (a2-2 (-> arg0 skel override)) + ) + (when (nonzero? v1-20) + (dotimes (a3-1 (the-as int v1-20)) + (set! (-> a1-0 a3-1) (the int (* 8192.0 (-> a2-2 (+ a3-1 1))))) + ) + (when (not disable-blerc?) + (setup-blerc-chains a0-12 a1-0 (-> *display* frames (-> *display* on-screen) global-buf)) + ) + (logior! (-> arg0 skel status) (joint-control-status blend-shape-valid)) + ;; og:preserve-this changed so we don't skip the profiler bar end + ; (return (the-as object #f)) + (goto end) + ) + ) + ) + (else + (let ((t2-0 (-> a3-0 blend-shape-anim))) + (when t2-0 + (let ((a0-14 (-> arg0 draw mgeo))) + (let* ((v1-33 (-> a0-14 header blend-target-count)) + (t0-8 (-> a2-0 frame-num)) + (t1-2 (the int t0-8)) + (a2-6 (&+ t2-0 (* (the-as uint t1-2) v1-33))) + ) + (cond + ((< t1-2 (the-as int (+ (-> a3-0 frames num-frames) -1))) + (let* ((a3-6 (&+ a2-6 v1-33)) + (t0-9 (* 64.0 (- t0-8 (the float t1-2)))) + (t1-4 (- 64.0 t0-9)) + ) + (dotimes (t2-2 (the-as int v1-33)) + (set! (-> a1-0 t2-2) (the int (+ 0.5 + (* (the float (+ (-> (the-as (pointer uint8) (&+ a3-6 t2-2))) -64)) t0-9) + (* (the float (+ (-> (the-as (pointer uint8) (&+ a2-6 t2-2))) -64)) t1-4) + ) + ) + ) + ) + ) + ) + (else + (dotimes (a3-7 (the-as int v1-33)) + (set! (-> a1-0 a3-7) (the-as int (* (+ (-> (the-as (pointer uint8) (&+ a2-6 a3-7))) -64) 64))) + ) + ) + ) + ) + (when (not disable-blerc?) + (setup-blerc-chains a0-14 a1-0 (-> *display* frames (-> *display* on-screen) global-buf)) + ) + ) + (logior! (-> arg0 skel status) (joint-control-status blend-shape-valid)) + ;; og:preserve-this changed so we don't skip the profiler bar end + ;; (return (the-as object #f)) + (goto end) + ) + ) + ) + ) + ) + (when (logtest? (-> arg0 skel status) (joint-control-status blend-shape-valid)) + (logclear! (-> arg0 skel status) (joint-control-status blend-shape-valid)) + (when (not disable-blerc?) + (setup-blerc-chains + (-> arg0 draw lod-set lod 0 geo) + (new 'static 'array int16 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) + (-> *display* frames (-> *display* on-screen) global-buf) + ) + ) + ) + ) + (label end) + ) + 0 + ) + +(def-mips2c setup-blerc-chains-for-one-fragment (function object object object object object object object)) + +(defun setup-blerc-chains ((arg0 merc-ctrl) (arg1 (pointer int16)) (arg2 dma-buffer)) + (local-vars + (sv-16 uint) + (sv-20 pointer) + (sv-24 merc-effect) + (sv-28 uint) + (sv-32 object) + (sv-48 int) + (sv-64 int) + ) + (set! sv-16 (-> arg0 header effect-count)) + (let ((s3-0 (-> arg0 header blend-target-count)) + (v1-1 (-> arg2 base)) + ) + (set! sv-20 (&+ v1-1 0)) + (let ((a2-1 (the-as object (&+ v1-1 16)))) + (if (zero? (-> *blerc-globals* first)) + (set! (-> *blerc-globals* first) (the-as uint a2-1)) + ) + (dotimes (s2-0 (the-as int sv-16)) + (set! sv-24 (-> arg0 effect s2-0)) + (set! sv-28 (-> sv-24 blend-frag-count)) + (when (nonzero? sv-28) + (let ((v1-15 (the-as object (-> sv-24 frag-geo))) + (s1-0 (the-as structure (-> sv-24 frag-ctrl))) + (s0-0 (the-as object (-> sv-24 blend-data))) + ) + (set! sv-32 (-> sv-24 blend-ctrl)) + (set! sv-48 0) + (while (< sv-48 (the-as int sv-28)) + (set! sv-64 (+ (the-as int v1-15) + (logand (* (+ (-> (the-as merc-fragment-control s1-0) unsigned-four-count) 3) 4) #xfff0) + ) + ) + (if (nonzero? (-> (the-as (pointer uint8) sv-32) 0)) + (set! a2-1 (setup-blerc-chains-for-one-fragment s3-0 arg1 a2-1 s0-0 sv-32 sv-64)) + ) + (let ((a0-14 (logand (+ (* (the-as uint 6) (-> (the-as merc-blend-ctrl sv-32) blend-vtx-count)) 15) #xfff0))) + (set! v1-15 + (+ sv-64 + (logand (* (+ (-> (the-as merc-fragment-control s1-0) lump-four-count) 3) 4) #xfff0) + (* (-> (the-as merc-fragment-control s1-0) fp-qwc) 16) + ) + ) + ;; og:preserve-this + (set! s1-0 (&+ s1-0 (* (-> (the-as merc-fragment-control s1-0) mat-xfer-count) 2) 4)) + (set! s0-0 + (+ (the-as int s0-0) (* (the-as uint a0-14) (+ (-> (the-as merc-blend-ctrl sv-32) nonzero-index-count) 1))) + ) + ) + (set! sv-32 (+ (the-as int sv-32) s3-0 2)) + (the-as int sv-32) + (set! sv-48 (+ sv-48 1)) + ) + ) + ) + ) + (set! (-> (the-as (pointer int64) sv-20)) (logior #x20000000 (shr (shl (the-as int a2-1) 33) 1))) + (set! (-> (the-as (pointer uint32) sv-20) 2) (the-as uint 0)) + (set! (-> (the-as (pointer uint32) sv-20) 3) (the-as uint 0)) + (set! (-> arg2 base) (the-as pointer a2-1)) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/gfx/foreground/merc/merc-death.gc b/goal_src/jak3/engine/gfx/foreground/merc/merc-death.gc index 242dee627c..d78d10abbd 100644 --- a/goal_src/jak3/engine/gfx/foreground/merc/merc-death.gc +++ b/goal_src/jak3/engine/gfx/foreground/merc/merc-death.gc @@ -7,3 +7,145 @@ ;; DECOMP BEGINS +(define *merc-death-globals* (new 'global 'vector)) + +(defun birth-func-death-sparks () + 0 + (none) + ) + +(define death-seed + (new 'static 'death-info :vertex-skip #x8 :timer #xe0 :overlap #xff :effect #x34 :sound "temp-enemy-die") + ) + +(defun start-seed-effect ((arg0 process-drawable) (arg1 vector) (arg2 cspace)) + (let ((v1-0 (-> arg0 draw)) + (a1-1 death-seed) + ) + (set! (-> v1-0 death-vertex-skip) (-> a1-1 vertex-skip)) + (set! (-> v1-0 death-effect) (-> a1-1 effect)) + (set! (-> v1-0 death-timer) (+ (-> a1-1 timer) 1)) + (set! (-> v1-0 death-timer-org) (-> v1-0 death-timer)) + (set! (-> v1-0 death-draw-overlap) (-> a1-1 overlap)) + ) + (send-event + arg0 + 'trans-hook + (lambda :behavior process-drawable () (let ((v0-0 200)) + (set! (-> self draw death-timer) (the-as uint v0-0)) + (the-as time-frame v0-0) + ) + ) + ) + 0 + (none) + ) + +(defpart 52 + :init-specs ((:scale-x (meters 1)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 64.0 196.0) + (:g 196.0 64.0) + (:b 0.0) + (:a 4.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:func 'sparticle-texture-glow-soft) + ) + ) + +(define death-default + (new 'static 'death-info :vertex-skip #xa :timer #x4b :overlap #x4 :effect #x35 :sound "enemy-fizz") + ) + +(define death-warp-in + (new 'static 'death-info :vertex-skip #x96 :timer #x4b :effect #x36 :sound "warpgate-tele") + ) + +(define death-warp-out + (new 'static 'death-info :vertex-skip #x96 :timer #x96 :effect #x36 :sound "warpgate-tele") + ) + +(defun sparticle-texture-glow-soft ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (particle-adgif-callback (-> arg1 adgif) (new 'static 'texture-id :index #xf :page #x4)) + (set! (-> arg1 sp-func) (the-as (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d uint none) 0)) + 0 + (none) + ) + +(defpart 54 + :init-specs ((:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g 32.0 64.0) + (:b 128.0 128.0) + (:a 128.0) + (:scalevel-x (meters 0.02) (meters 0.02)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0 -1.28) + (:friction 0.92 0.02) + (:timer (seconds 1.667)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.1) (seconds 0.065)) + (:next-launcher 55) + ) + ) + +(defpart 55 + :init-specs ((:scale-x (meters 0.3) (meters 0.2)) + (:scale-y :copy scale-x) + (:a 64.0 32.0) + (:omega (degrees 0.045) (degrees 0.03375)) + (:vel-x (meters -0.053333335) (meters 0.10666667)) + (:vel-y (meters -0.026666667) (meters 0.093333334)) + (:vel-z (meters -0.053333335) (meters 0.10666667)) + (:scalevel-x (meters -0.001) (meters -0.008)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:func 'sparticle-motion-blur) + ) + ) + +(defpart 53 + :init-specs ((:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 96.0 150.0) + (:g 32.0 64.0) + (:b 128.0 128.0) + (:a 128.0) + (:scalevel-x (meters 0.02) (meters 0.02)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0 -1.28) + (:friction 0.92 0.02) + (:timer (seconds 1.667)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.1) (seconds 0.065)) + (:next-launcher 56) + ) + ) + +(defpart 56 + :init-specs ((:scale-x (meters 0.3) (meters 0.2)) + (:scale-y :copy scale-x) + (:a 64.0 32.0) + (:omega (degrees 0.045) (degrees 0.03375)) + (:vel-x (meters -0.053333335) (meters 0.10666667)) + (:vel-y (meters -0.026666667) (meters 0.093333334)) + (:vel-z (meters -0.053333335) (meters 0.10666667)) + (:scalevel-x (meters -0.001) (meters -0.008)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:func 'sparticle-motion-blur) + ) + ) + +(defun merc-death-spawn ((arg0 int) (arg1 vector) (arg2 vector)) + (let ((v1-2 (-> *part-id-table* arg0))) + (if (and (nonzero? v1-2) (= (-> v1-2 type) sparticle-launcher)) + (sp-launch-particles-death *sp-particle-system-2d* v1-2 arg1) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/gfx/foreground/merc/merc-h.gc b/goal_src/jak3/engine/gfx/foreground/merc/merc-h.gc index e8b54c0f42..7d3325e051 100644 --- a/goal_src/jak3/engine/gfx/foreground/merc/merc-h.gc +++ b/goal_src/jak3/engine/gfx/foreground/merc/merc-h.gc @@ -408,6 +408,6 @@ Consists of a header and a list of [[merc-effect]]s." (timer uint8) (overlap uint8) (effect uint32) - (sound symbol) + (sound string) ) ) diff --git a/goal_src/jak3/engine/gfx/foreground/ripple.gc b/goal_src/jak3/engine/gfx/foreground/ripple.gc index 7d6f6d47af..7fb1b6ff5c 100644 --- a/goal_src/jak3/engine/gfx/foreground/ripple.gc +++ b/goal_src/jak3/engine/gfx/foreground/ripple.gc @@ -5,7 +5,193 @@ ;; name in dgo: ripple ;; dgos: GAME +(define-extern ripple-find-height (function process-drawable int vector float)) (define-extern ripple-make-request (function ripple-wave merc-effect none)) +(define-extern ripple-execute (function none)) ;; 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/foreground/shadow-cpu-h.gc b/goal_src/jak3/engine/gfx/foreground/shadow-cpu-h.gc index 5678883b84..30f796b63e 100644 --- a/goal_src/jak3/engine/gfx/foreground/shadow-cpu-h.gc +++ b/goal_src/jak3/engine/gfx/foreground/shadow-cpu-h.gc @@ -23,6 +23,7 @@ (declare-type shadow-vu1-constants structure) +(define-extern shadow-execute-all (function dma-buffer none)) ;; DECOMP BEGINS @@ -47,7 +48,7 @@ ((settings shadow-settings :inline) ) (:methods - (new (symbol type float float float vector float float) _type_) + (new (symbol type float float float vector shadow-flags float) _type_) (enable-draw (shadow-control) int) (disable-draw (shadow-control) int) (set-top-plane-offset (shadow-control float) int) @@ -215,14 +216,14 @@ (arg1 float) (arg2 float) (arg3 vector) - (arg4 float) + (arg4 shadow-flags) (arg5 float) ) (let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) (if arg3 (set! (-> v0-0 settings center quad) (-> arg3 quad)) ) - (set! (-> v0-0 settings flags) (the-as shadow-flags arg4)) + (set! (-> v0-0 settings flags) arg4) (set-vector! (-> v0-0 settings shadow-dir) 0.0 -1.0 0.0 arg2) (set-vector! (-> v0-0 settings bot-plane) 0.0 1.0 0.0 (- arg0)) (set-vector! (-> v0-0 settings top-plane) 0.0 1.0 0.0 (- arg1)) diff --git a/goal_src/jak3/engine/gfx/foreground/shadow-cpu.gc b/goal_src/jak3/engine/gfx/foreground/shadow-cpu.gc index 0e4f5408ab..a833defbe1 100644 --- a/goal_src/jak3/engine/gfx/foreground/shadow-cpu.gc +++ b/goal_src/jak3/engine/gfx/foreground/shadow-cpu.gc @@ -7,3 +7,8 @@ ;; DECOMP BEGINS +;; stub +(format 0 "shadow-cpu: stubbed shadow-control::14~%") +(defmethod shadow-control-method-14 ((this shadow-control) (arg0 vector) (arg1 vector) (arg2 float) (arg3 float) (arg4 float)) + (none) + ) \ No newline at end of file diff --git a/goal_src/jak3/engine/gfx/generic/generic-effect.gc b/goal_src/jak3/engine/gfx/generic/generic-effect.gc index 8be16423e3..f4292acb65 100644 --- a/goal_src/jak3/engine/gfx/generic/generic-effect.gc +++ b/goal_src/jak3/engine/gfx/generic/generic-effect.gc @@ -5,5 +5,256 @@ ;; name in dgo: generic-effect ;; dgos: GAME +(define-extern *default-envmap-shader* adgif-shader) + ;; DECOMP BEGINS +(define *target-lock* (the-as object 0)) + +(define *generic-consts* + (new 'static 'generic-consts + :dma-header (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32)) + ) + :vif-header (new 'static 'array uint32 4 #x1000404 #x1000404 #x1000404 #x6c000000) + :dma-ref-vtxs (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref))) + :dma-cnt-call (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id cnt))) + :matrix (new 'static 'matrix + :rvec (new 'static 'vector :x 1.0) + :uvec (new 'static 'vector :y 1.0) + :fvec (new 'static 'vector :z 1.0) + :trans (new 'static 'vector :w 1.0) + ) + :base-strgif (new 'static 'generic-gif-tag + :fan-prim (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + :str-prim (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + :regs (new 'static 'gif-tag-regs-32 :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + :alpha-opaque (new 'static 'gs-adcmd :cmds (gs-reg64 alpha-1)) + :alpha-translucent (new 'static 'gs-adcmd :cmds (gs-reg64 alpha-1) :x #x44) + :ztest-normal (new 'static 'gs-adcmd :cmds (gs-reg64 test-1) :x #x5026b) + :ztest-opaque (new 'static 'gs-adcmd :cmds (gs-reg64 test-1) :x #x5000a) + :adcmd-offsets (new 'static 'array uint8 16 #x0 #x20 #x20 #x20 #x0 #x30 #x30 #x30 #x0 #x30 #x30 #x30 #x0 #x30 #x30 #x30) + :stcycle-tag #x1000103 + :unpack-vtx-tag #x68000000 + :unpack-clr-tag #x6e004000 + :unpack-tex-tag #x65000000 + :mscal-tag #x14000006 + :reset-cycle-tag #x1000404 + :dma-tag-cnt #x10000000 + :envmap (new 'static 'generic-envmap-consts + :consts (new 'static 'vector :x 1.0 :z 0.5 :w 0.5) + :strgif (new 'static 'generic-gif-tag + :fan-prim (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + :str-prim (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + :regs (new 'static 'gif-tag-regs-32 :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + :colors (new 'static 'vector4w :x -2139062144 :y -2139062144 :z -2139062144 :w -2139062144) + ) + :light-consts (new 'static 'vector :x 255.0 :y 8388608.0) + ) + ) + +(defun generic-work-init ((arg0 generic-bucket-state)) + "Initialize the scratchpad work for generic." + (quad-copy! + (the-as pointer (-> (scratchpad-object generic-work) fx-buf work)) + (the-as pointer *generic-consts*) + 27 + ) + (set! (-> (scratchpad-object generic-work) saves gifbuf-adr) (-> arg0 gifbuf-adr)) + (set! (-> (scratchpad-object generic-work) saves inbuf-adr) (-> arg0 inbuf-adr)) + (set! (-> (scratchpad-object generic-work) saves cur-outbuf) + (the-as uint (-> (scratchpad-object generic-work) fx-buf)) + ) + (let* ((v1-6 *default-envmap-shader*) + (a0-9 (-> (scratchpad-object generic-work) fx-buf work consts envmap shader)) + (a1-2 (-> v1-6 quad 0 quad)) + (a2-1 (-> v1-6 quad 1 quad)) + (a3-0 (-> v1-6 quad 2 quad)) + (t0-0 (-> v1-6 quad 3 quad)) + (v0-1 (-> v1-6 quad 4 quad)) + ) + (set! (-> a0-9 quad 0 quad) a1-2) + (set! (-> a0-9 quad 1 quad) a2-1) + (set! (-> a0-9 quad 2 quad) a3-0) + (set! (-> a0-9 quad 3 quad) t0-0) + (set! (-> a0-9 quad 4 quad) v0-1) + ) + (none) + ) + +(defun generic-upload-vu0 () + "Upload generic VU0 program." + (none) + ) + +(defun upload-vu0-program ((a0-0 vu-function) (a1-0 pointer)) + "Upload vu-function to VU0." + (none) + ) + +(defun generic-initialize-without-sync ((arg0 matrix) (arg1 vu-lights)) + "Init generic, version for generic-merc, which relies on generic-merc init running after." + ;; (upload-vu0-program generic-vu0-block (the-as pointer #x70000054)) + (let ((a2-0 (-> (scratchpad-object generic-work) fx-buf work consts matrix)) + (v1-1 (-> arg0 rvec quad)) + (a0-3 (-> arg0 uvec quad)) + (a1-2 (-> arg0 fvec quad)) + (a3-0 (-> arg0 trans quad)) + ) + (set! (-> a2-0 rvec quad) v1-1) + (set! (-> a2-0 uvec quad) a0-3) + (set! (-> a2-0 fvec quad) a1-2) + (set! (-> a2-0 trans quad) a3-0) + ) + (if arg1 + (quad-copy! (the-as pointer (-> (scratchpad-object generic-work) fx-buf work lights)) (the-as pointer arg1) 7) + ) + 0 + (none) + ) + +;; definition for function generic-initialize +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun generic-initialize ((arg0 generic-bucket-state) (arg1 matrix) (arg2 vu-lights)) + "Normal init for generic - sets up scratchpad and VU0." + (generic-work-init arg0) + (generic-upload-vu0) + (let ((a2-1 (-> (scratchpad-object generic-work) fx-buf work consts matrix)) + (v1-1 (-> arg1 rvec quad)) + (a0-2 (-> arg1 uvec quad)) + (a1-1 (-> arg1 fvec quad)) + (a3-0 (-> arg1 trans quad)) + ) + (set! (-> a2-1 rvec quad) v1-1) + (set! (-> a2-1 uvec quad) a0-2) + (set! (-> a2-1 fvec quad) a1-1) + (set! (-> a2-1 trans quad) a3-0) + ) + (if arg2 + (quad-copy! (the-as pointer (-> (the-as generic-work #x70000000) fx-buf work lights)) (the-as pointer arg2) 7) + ) + 0 + (none) + ) + +;; definition for function generic-wrapup +;; WARN: Return type mismatch uint vs none. +(defun generic-wrapup ((arg0 generic-bucket-state)) + (set! (-> arg0 gifbuf-adr) (-> (scratchpad-object generic-work) saves gifbuf-adr)) + (set! (-> arg0 inbuf-adr) (-> (scratchpad-object generic-work) saves inbuf-adr)) + (none) + ) + +;; definition for function generic-dma-from-spr +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function generic-light-proc +;; INFO: function output is handled by mips2c +(def-mips2c generic-light-proc function) + +;; definition for function generic-envmap-proc +;; INFO: function output is handled by mips2c +(def-mips2c generic-envmap-proc function) + +;; definition for function generic-prepare-dma-double +;; INFO: function output is handled by mips2c +(def-mips2c generic-prepare-dma-double function) + +;; definition for function generic-prepare-dma-single +;; INFO: function output is handled by mips2c +(def-mips2c generic-prepare-dma-single function) + +;; definition for function generic-envmap-dproc +;; ERROR: function has no type analysis. Cannot decompile. + +;; definition for function generic-interp-dproc +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function generic-no-light-proc +;; INFO: function output is handled by mips2c +;; (def-mips2c generic-no-light-proc function) don't need + +;; definition for function generic-no-light-dproc-only +;; ERROR: function has no type analysis. Cannot decompile. + +;; definition for function generic-no-light-dproc +;; ERROR: function has no type analysis. Cannot decompile. + +;; definition for function generic-no-light+envmap +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function generic-no-light +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function generic-envmap-only-proc +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function generic-light +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function generic-copy-vtx-dclr-dtex +;; ERROR: function has no type analysis. Cannot decompile. + +;; definition for function generic-none +;; ERROR: function has no type analysis. Cannot decompile. + +;; definition for function generic-none-dma-wait +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for symbol *warp-data*, type object +(define *warp-data* (the-as object (malloc 'global 1024))) + +;; definition for function generic-warp-source-proc +;; INFO: function output is handled by mips2c +(def-mips2c generic-warp-source-proc (function none)) + +;; definition for function generic-warp-source +;; ERROR: Unsupported inline assembly instruction kind - [lui at, 28672] +(defun generic-warp-source ((arg0 gsf-buffer)) + (set! (-> (scratchpad-object generic-work) saves gsf-buf) arg0) + (generic-warp-source-proc) + (none) + ) + +;; definition for function generic-warp-dest-proc +;; INFO: function output is handled by mips2c +(def-mips2c generic-warp-dest-proc function) + +;; definition for function generic-warp-dest +;; INFO: function output is handled by mips2c +(def-mips2c generic-warp-dest function) + +;; definition for function generic-warp-envmap-dest +;; INFO: function output is handled by mips2c +(def-mips2c generic-warp-envmap-dest function) + +;; definition for function generic-debug-light-proc +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition (debug) for function generic-post-debug +;; ERROR: function has no type analysis. Cannot decompile. + + + + diff --git a/goal_src/jak3/engine/gfx/generic/generic-vu1.gc b/goal_src/jak3/engine/gfx/generic/generic-vu1.gc index 2de717185e..4a2cc0d0a1 100644 --- a/goal_src/jak3/engine/gfx/generic/generic-vu1.gc +++ b/goal_src/jak3/engine/gfx/generic/generic-vu1.gc @@ -46,10 +46,16 @@ ) (defun generic-setup-shrub-constants ((arg0 generic-shrub-constants) (arg1 int) (arg2 int) (arg3 int)) - (set! (-> arg0 shrub-giftag qword vector4w x) (logior #x30004000 (shr (shl arg3 53) 38))) - (set! (-> arg0 shrub-giftag qword vector4w y) (logior #x30004000 (shr (shl arg2 53) 38))) - (set! (-> arg0 shrub-giftag qword vector4w z) 1042) - (set! (-> arg0 shrub-giftag qword vector4w w) 0) + (set! (-> arg0 shrub-giftag fan-prim) + (new 'static 'gif-tag-prim :pre #x1 :nreg #x3 :prim (the-as gs-prim arg3)) + ) + (set! (-> arg0 shrub-giftag str-prim) + (new 'static 'gif-tag-prim :pre #x1 :nreg #x3 :prim (the-as gs-prim arg2)) + ) + (set! (-> arg0 shrub-giftag regs) + (new 'static 'gif-tag-regs-32 :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 shrub-giftag num-strips) (the-as uint 0)) (set! (-> arg0 shrub-adnop dword 0) (the-as uint arg1)) (set! (-> arg0 shrub-adnop dword 1) (the-as uint 71)) (none) diff --git a/goal_src/jak3/engine/gfx/generic/lightning/lightning-h.gc b/goal_src/jak3/engine/gfx/generic/lightning/lightning-h.gc index 01bd38a6cf..696b5122e0 100644 --- a/goal_src/jak3/engine/gfx/generic/lightning/lightning-h.gc +++ b/goal_src/jak3/engine/gfx/generic/lightning/lightning-h.gc @@ -43,7 +43,13 @@ (declare-type lightning-spec basic) (define-extern *lightning-spec-id-table* (array lightning-spec)) +(define-extern lightning-fractal-gen (function (inline-array vector) int int float lightning-spec none)) +(define-extern lightning-uniform-gen (function (inline-array vector) int int float lightning-spec none)) +(define-extern lightning-trail-uniform-gen (function (inline-array vector) (inline-array vector) float int symbol)) +(define-extern lightning-trail-fractal-gen (function (inline-array vector) (inline-array vector) int int float lightning-spec none)) (define-extern process-drawable-art-error (state string process-drawable)) +(define-extern unlink-lightning-spec-by-heap (function kheap none)) +(define-extern lightning-draw-all (function none)) ;; DECOMP BEGINS @@ -66,7 +72,7 @@ (radius float) (duration float) (duration-rand float) - (sound symbol) + (sound sound-spec) (delay float) (delay-rand float) ) diff --git a/goal_src/jak3/engine/gfx/generic/lightning/lightning-new-h.gc b/goal_src/jak3/engine/gfx/generic/lightning/lightning-new-h.gc index 20c6274386..ee4001795f 100644 --- a/goal_src/jak3/engine/gfx/generic/lightning/lightning-new-h.gc +++ b/goal_src/jak3/engine/gfx/generic/lightning/lightning-new-h.gc @@ -7,3 +7,136 @@ ;; DECOMP BEGINS +(deftype lightning-appearance (structure) + ((base-alpha float) + (width-range-start float) + (width-range-end float) + (tex-id uint32) + (blend-mode uint64) + (fade-time time-frame) + (regenerate-time-start time-frame) + (regenerate-time-end time-frame) + (alpha-1-curve curve2d-fast) + (alpha-1-mode uint64) + (alpha-1-repeat-dist float) + (alpha-2-curve curve2d-fast) + (alpha-2-mode uint64) + (alpha-2-repeat-dist float) + (width-curve curve2d-fast) + (width-mode uint64) + (width-repeat-dist float) + (uv-repeat-dist float) + (uv-shift? symbol) + (uv-shift-speed time-frame) + (use-sprite-bucket? symbol :offset 128) + (use-accurate-interp? symbol) + ) + ) + + +(deftype lightning-span-internal (structure) + ((index int16) + (span-flags uint8) + (num-inner-points int8) + ) + :pack-me + ) + + +(deftype lightning-span (structure) + ((random-offset-size-start float) + (inner-random-offset-size float) + ) + :pack-me + ) + + +(deftype lightning-spans-array (inline-array-class) + ((data lightning-span :inline :dynamic) + ) + ) + + +(set! (-> lightning-spans-array heap-base) (the-as uint 8)) + +(deftype lightning-spans-internal-array (inline-array-class) + ((data lightning-span-internal :inline :dynamic) + ) + ) + + +(set! (-> lightning-spans-internal-array heap-base) (the-as uint 4)) + +(deftype tex-u-holder (structure) + ((uu float) + (last-dist float) + ) + ) + + +(deftype lightning-bolt (basic) + ((current-points vector-array) + (desired-points vector-array) + (span-pts-start vector-array) + (spans lightning-spans-array) + (spans-internal lightning-spans-internal-array) + (strip1 prim-strip) + (strip2 prim-strip) + (inner-point-travel-time time-frame) + (start-fade-time time-frame) + (new-inner-point-generate-time time-frame) + (last-generate-time time-frame) + (base-width float) + (current-uv-shift float) + (current-fade-scalar float) + (fractal-reduction float) + (appearance lightning-appearance) + (fade-mode uint64) + (generate-mode uint64) + (snap-inner-points? symbol) + (span-data int8 2) + (num-active-spans int8 :overlay-at (-> span-data 0)) + (num-spans int8 :overlay-at (-> span-data 1)) + (base-color rgba) + ) + (:methods + (init! (_type_ int int lightning-appearance) none) + (reset-spans! (_type_) none) + (lightning-bolt-method-11 (_type_) none) + (lightning-bolt-method-12 (_type_) none) + (lightning-bolt-method-13 (_type_ int) none) + (lightning-bolt-method-14 (_type_) int) + (lightning-bolt-method-15 (_type_ object int lightning-span-internal) none) + (lightning-bolt-method-16 (_type_ vector float float vector matrix) none) + (lightning-bolt-method-17 (_type_ uint float float curve2d-fast float) float) + (lightning-bolt-method-18 (_type_ prim-strip vector rgba float float) none) + (lightning-bolt-method-19 (_type_ vector int int matrix float float) none) + (lightning-bolt-method-20 (_type_ int lightning-span-internal) vector) + (lightning-bolt-method-21 (_type_ int int float) none) + (lightning-bolt-method-22 (_type_) none) + ) + ) + + +(deftype lightning-new-tracker (process) + ((bolt lightning-bolt) + (lifetime time-frame) + (state-time time-frame) + ) + (:state-methods + active + die + ) + ) + + +(deftype lightning-tracker-init-params (structure) + ((appearance lightning-appearance) + (start-pt vector :inline) + (end-pt vector :inline) + (lifetime time-frame) + (num-inner-points int8) + (inner-random-offset-size float) + (random-offset-size-start float) + ) + ) diff --git a/goal_src/jak3/engine/gfx/generic/lightning/lightning-new.gc b/goal_src/jak3/engine/gfx/generic/lightning/lightning-new.gc index c0d5fb79c4..3cf75556a4 100644 --- a/goal_src/jak3/engine/gfx/generic/lightning/lightning-new.gc +++ b/goal_src/jak3/engine/gfx/generic/lightning/lightning-new.gc @@ -7,3 +7,840 @@ ;; DECOMP BEGINS +(define *lightning-alpha-additive* (new 'static 'gs-alpha :b #x2 :d #x1)) + +(define *lightning-alpha-blend* (new 'static 'gs-alpha :b #x1 :d #x1)) + +(define *lightning-alpha-subtractive* (new 'static 'gs-alpha :a #x2 :d #x1)) + +(defmethod init! ((this lightning-bolt) (arg0 int) (arg1 int) (arg2 lightning-appearance)) + (set! (-> this num-spans) arg0) + (set! (-> this spans) (new 'process 'lightning-spans-array arg0)) + (set! (-> this num-active-spans) 0) + (set! (-> this span-pts-start) (new 'process 'vector-array arg0)) + (let ((s3-0 (* arg1 arg0))) + (let ((s2-1 (+ (* arg1 (+ arg0 -1)) 1))) + (set! (-> this current-points) (new 'process 'vector-array s2-1)) + (set! (-> this desired-points) (new 'process 'vector-array s2-1)) + ) + (let ((f30-0 (* 2.0 (the float s3-0)))) + (set! (-> this strip1) + (new 'process 'prim-strip (the int f30-0) (new 'static 'texture-id :index #x3 :page #x1) (the-as string #f)) + ) + (set! (-> this strip2) + (new 'process 'prim-strip (the int f30-0) (new 'static 'texture-id :index #x3 :page #x1) (the-as string #f)) + ) + ) + ) + (set! (-> this appearance) arg2) + (set! (-> this spans-internal) (new 'process 'lightning-spans-internal-array arg0)) + (set! (-> this current-uv-shift) 0.0) + (set! (-> this strip1 clamp) (new 'static 'gs-clamp)) + (set! (-> this strip2 clamp) (new 'static 'gs-clamp)) + (when (-> this appearance use-sprite-bucket?) + (set! (-> this strip1 bucket) (bucket-id generic-sprite-1)) + (set! (-> this strip1 sink) (the-as uint 65)) + (set! (-> this strip1 texture-index) (the-as uint 7)) + (set! (-> this strip2 bucket) (bucket-id generic-sprite-1)) + (set! (-> this strip2 sink) (the-as uint 65)) + (set! (-> this strip2 texture-index) (the-as uint 7)) + ) + (set! (-> this new-inner-point-generate-time) + (rand-vu-int-range + (the-as int (-> this appearance regenerate-time-start)) + (the-as int (-> this appearance regenerate-time-end)) + ) + ) + (set! (-> this base-width) + (rand-vu-float-range (-> this appearance width-range-start) (-> this appearance width-range-end)) + ) + (set! (-> this fade-mode) (the-as uint 0)) + (set! (-> this current-fade-scalar) 1.0) + (when (-> this appearance uv-shift?) + (let* ((v1-31 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-32 (the-as number (logior #x3f800000 v1-31))) + ) + (set! (-> this current-uv-shift) (+ -1.0 (the-as float v1-32))) + ) + ) + (dotimes (v1-35 (-> this num-spans)) + (logand! (-> this spans-internal data v1-35 span-flags) -2) + (set! (-> this spans-internal data v1-35 index) v1-35) + ) + (set! (-> this base-color) *color-gray*) + 0 + (none) + ) + +(defmethod reset-spans! ((this lightning-bolt)) + (set! (-> this num-active-spans) 0) + 0 + (none) + ) + +(defmethod lightning-bolt-method-20 ((this lightning-bolt) (arg0 int) (arg1 lightning-span-internal)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (let* ((f30-0 -0.5) + (v1-2 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-3 (the-as number (logior #x3f800000 v1-2))) + ) + (set! (-> s3-0 x) (+ f30-0 (+ -1.0 (the-as float v1-3)))) + ) + (let* ((f30-1 -0.5) + (v1-7 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-8 (the-as number (logior #x3f800000 v1-7))) + ) + (set! (-> s3-0 y) (+ f30-1 (+ -1.0 (the-as float v1-8)))) + ) + (set! (-> s3-0 z) (the float (-> arg1 index))) + (set! (-> s3-0 w) 1.0) + (set! (-> this desired-points data arg0 quad) (-> s3-0 quad)) + ) + (set! (-> this current-points data arg0 z) (the float (-> arg1 index))) + (-> this desired-points data arg0) + ) + +(defmethod lightning-bolt-method-21 ((this lightning-bolt) (arg0 int) (arg1 int) (arg2 float)) + (local-vars (sv-16 int) (sv-24 vector) (sv-28 vector) (sv-32 float)) + (let ((v1-0 (-> this desired-points))) + (when (< 1 (- arg1 arg0)) + (set! sv-16 (/ (+ arg0 arg1) 2)) + (set! sv-24 (-> v1-0 data arg0)) + (set! sv-28 (-> v1-0 data arg1)) + (set! sv-32 (the-as float 1.0)) + (set! sv-32 (-> sv-28 z)) + (let ((s2-0 (-> v1-0 data sv-16))) + (let* ((f30-0 (* 0.5 (+ (-> sv-24 x) (-> sv-28 x)))) + (f28-0 arg2) + (f26-0 -0.5) + (v1-6 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-7 (the-as number (logior #x3f800000 v1-6))) + ) + (set! (-> s2-0 x) (+ f30-0 (* f28-0 (+ f26-0 (+ -1.0 (the-as float v1-7)))))) + ) + (let* ((f30-1 (* 0.5 (+ (-> sv-24 y) (-> sv-28 y)))) + (f28-1 arg2) + (f26-1 -0.5) + (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-1 (* f28-1 (+ f26-1 (+ -1.0 (the-as float v1-15)))))) + ) + (set! (-> s2-0 z) (lerp (-> sv-24 z) sv-32 0.5)) + ) + (lightning-bolt-method-21 this arg0 sv-16 (* arg2 (-> this fractal-reduction))) + (lightning-bolt-method-21 this sv-16 arg1 (* arg2 (-> this fractal-reduction))) + ) + ) + 0 + (none) + ) + +(defmethod lightning-bolt-method-15 ((this lightning-bolt) (arg0 object) (arg1 int) (arg2 lightning-span-internal)) + (let ((v1-0 (-> this generate-mode))) + (cond + ((zero? v1-0) + (let ((f30-0 (the float (-> arg2 index))) + (f28-0 (the float (+ (-> arg2 index) 1))) + (f26-0 (/ 1.0 (the float (+ (-> arg2 num-inner-points) 1)))) + ) + 0.0 + (let ((f24-0 (+ 0.0 f26-0))) + (dotimes (s3-0 (-> arg2 num-inner-points)) + (let ((f22-0 (lerp f30-0 f28-0 f24-0))) + (let ((s2-0 (-> this desired-points data (+ s3-0 1 arg1)))) + (let* ((f20-0 -0.5) + (v1-13 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-14 (the-as number (logior #x3f800000 v1-13))) + ) + (set! (-> s2-0 x) (+ f20-0 (+ -1.0 (the-as float v1-14)))) + ) + (let* ((f20-1 -0.5) + (v1-18 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-19 (the-as number (logior #x3f800000 v1-18))) + ) + (set! (-> s2-0 y) (+ f20-1 (+ -1.0 (the-as float v1-19)))) + ) + (set! (-> s2-0 z) f22-0) + (set! (-> s2-0 w) 1.0) + ) + (set! (-> this current-points data (+ s3-0 1 arg1) z) f22-0) + ) + (+! f24-0 f26-0) + ) + ) + ) + ) + ((= v1-0 1) + (lightning-bolt-method-21 this arg1 (+ (-> arg2 num-inner-points) 1 arg1) 1.0) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch uint vs int. +(defmethod lightning-bolt-method-14 ((this lightning-bolt)) + (the-as int (-> this fade-mode)) + ) + +(defmethod lightning-bolt-method-13 ((this lightning-bolt) (arg0 int)) + (when (!= (-> this fade-mode) arg0) + (let ((v1-1 arg0)) + (cond + ((zero? v1-1) + (set! (-> this current-fade-scalar) 1.0) + (set-time! (-> this start-fade-time)) + ) + ((= v1-1 2) + (set-time! (-> this start-fade-time)) + (set! (-> this current-fade-scalar) 1.0) + ) + ((= v1-1 1) + (set! (-> this current-fade-scalar) 0.0) + (set-time! (-> this start-fade-time)) + ) + ((= v1-1 3) + (dotimes (v1-12 (-> this num-spans)) + (logand! (-> this spans-internal data v1-12 span-flags) -2) + ) + ) + ) + ) + (set! (-> this fade-mode) (the-as uint arg0)) + ) + (none) + ) + +;; WARN: Function (method 11 lightning-bolt) has a return type of none, but the expression builder found a return statement. +(defmethod lightning-bolt-method-11 ((this lightning-bolt)) + (local-vars + (sv-16 time-frame) + (sv-24 float) + (sv-32 time-frame) + (sv-40 float) + (sv-64 vector) + (sv-68 float) + (sv-72 float) + ) + (with-pp + (case (-> this fade-mode) + ((2) + (let* ((f1-2 (/ (the float (- (current-time) (-> this start-fade-time))) (the float (-> this appearance fade-time)))) + (f0-3 (fmax 0.0 (fmin 1.0 f1-2))) + ) + (set! (-> this current-fade-scalar) (lerp 1.0 0.0 f0-3)) + ) + (if (>= 0.0 (-> this current-fade-scalar)) + (lightning-bolt-method-13 this 3) + ) + ) + ((1) + (let* ((f1-7 (/ (the float (- (current-time) (-> this start-fade-time))) (the float (-> this appearance fade-time)))) + (f0-9 (fmax 0.0 (fmin 1.0 f1-7))) + ) + (set! (-> this current-fade-scalar) (lerp 0.0 1.0 f0-9)) + ) + (if (>= (-> this current-fade-scalar) 1.0) + (lightning-bolt-method-13 this 0) + ) + ) + ) + (if (= (-> this fade-mode) 3) + (return 0) + ) + (if (zero? (-> this fade-mode)) + (set! (-> this current-fade-scalar) 1.0) + ) + (set! (-> this num-active-spans) (min (-> this num-active-spans) (+ (-> this num-spans) -1))) + (let ((v1-31 (-> this num-active-spans)) + (a0-14 (+ (-> this num-spans) -1)) + ) + (while (>= a0-14 v1-31) + (let ((a1-6 (-> this spans-internal data v1-31))) + (logand! (-> a1-6 span-flags) -2) + ) + (+! v1-31 1) + ) + ) + (let ((v1-37 (time-elapsed? (-> this last-generate-time) (-> this new-inner-point-generate-time)))) + (dotimes (a0-17 (-> this num-active-spans)) + (-> this spans data a0-17) + (let ((a1-12 (-> this spans-internal data a0-17))) + (if (or v1-37 (not (logtest? (-> a1-12 span-flags) 1))) + (logior! (-> a1-12 span-flags) 2) + (logand! (-> a1-12 span-flags) -3) + ) + ) + ) + ) + (let ((s5-0 0)) + (dotimes (s4-0 (-> this num-active-spans)) + (-> this spans data s4-0) + (let* ((a2-13 (-> this spans-internal data s4-0)) + (s3-0 (+ (-> a2-13 num-inner-points) 1)) + ) + (when (logtest? (-> a2-13 span-flags) 2) + (when (or (-> this snap-inner-points?) + (and (logtest? (-> a2-13 span-flags) 2) (not (logtest? (-> a2-13 span-flags) 1))) + ) + (dotimes (v1-55 s3-0) + (set! (-> this current-points data (+ v1-55 s5-0) quad) (-> this desired-points data (+ v1-55 s5-0) quad)) + ) + ) + (lightning-bolt-method-20 this s5-0 a2-13) + ) + (+! s5-0 s3-0) + ) + ) + (when (time-elapsed? (-> this last-generate-time) (-> this new-inner-point-generate-time)) + (lightning-bolt-method-20 this s5-0 (-> this spans-internal data (-> this num-active-spans))) + (if (-> this snap-inner-points?) + (set! (-> this current-points data s5-0 quad) (-> this desired-points data s5-0 quad)) + ) + (set-time! (-> this last-generate-time)) + (set! (-> this new-inner-point-generate-time) (rand-vu-int-range + (the-as int (-> this appearance regenerate-time-start)) + (the-as int (-> this appearance regenerate-time-end)) + ) + ) + ) + ) + (let ((s5-1 0)) + (dotimes (s4-1 (-> this num-active-spans)) + (let* ((a1-24 (-> this spans data s4-1)) + (a3-5 (-> this spans-internal data s4-1)) + (s3-1 (+ (-> a3-5 num-inner-points) 1)) + ) + (if (logtest? (-> a3-5 span-flags) 2) + (lightning-bolt-method-15 this a1-24 s5-1 a3-5) + ) + (+! s5-1 s3-1) + ) + ) + ) + (let ((s5-2 0)) + (dotimes (s4-2 (+ (-> this num-active-spans) 1)) + (-> this spans data s4-2) + (let* ((v1-102 (-> this spans-internal data s4-2)) + (s3-2 (+ (-> v1-102 num-inner-points) 1)) + ) + (if (= s4-2 (-> this num-active-spans)) + (set! s3-2 1) + ) + (cond + ((not (-> this appearance use-accurate-interp?)) + (let ((a0-49 (the-as int (- (current-time) (-> pp clock old-frame-counter))))) + 0.0 + (if (logtest? (-> v1-102 span-flags) 2) + (set! a0-49 0) + ) + (let* ((f1-12 (/ (the float a0-49) (the float (-> this inner-point-travel-time)))) + (f30-0 (fmax 0.0 (fmin 1.0 f1-12))) + ) + (dotimes (s2-0 s3-2) + (vector-lerp! + (-> this current-points data (+ s2-0 s5-2)) + (-> this current-points data (+ s2-0 s5-2)) + (-> this desired-points data (+ s2-0 s5-2)) + f30-0 + ) + ) + ) + ) + ) + (else + (set! sv-16 (- (current-time) (- (current-time) (-> pp clock old-frame-counter)))) + (set! sv-24 (the-as float 0.0)) + (set! sv-32 (current-time)) + (set! sv-40 (the-as float 0.0)) + (set! sv-24 + (/ (the float (- sv-16 (-> this last-generate-time))) (the float (-> this inner-point-travel-time))) + ) + (set! sv-40 + (/ (the float (- sv-32 (-> this last-generate-time))) (the float (-> this inner-point-travel-time))) + ) + (set! sv-24 (fmax 0.0 (fmin 1.0 sv-24))) + (set! sv-40 (fmax 0.0 (fmin 1.0 sv-40))) + (let ((f30-1 (- 1.0 sv-24))) + (dotimes (s2-1 s3-2) + (set! sv-64 (new 'stack-no-clear 'vector)) + (set! sv-68 (the-as float 0.0)) + (set! sv-72 (the-as float 0.0)) + (set-vector! + sv-64 + (- (-> this desired-points data (+ s2-1 s5-2) x) (-> this current-points data (+ s2-1 s5-2) x)) + (- (-> this desired-points data (+ s2-1 s5-2) y) (-> this current-points data (+ s2-1 s5-2) y)) + 0.0 + 1.0 + ) + (set! sv-68 (vector-normalize-ret-len! sv-64 1.0)) + (when (< 0.0 f30-1) + (set! sv-72 (/ sv-68 f30-1)) + (vector-float*! sv-64 sv-64 (* sv-72 (- sv-40 sv-24))) + (vector+! (-> this current-points data (+ s2-1 s5-2)) (-> this current-points data (+ s2-1 s5-2)) sv-64) + (set! (-> this current-points data (+ s2-1 s5-2) z) (-> this desired-points data (+ s2-1 s5-2) z)) + ) + ) + ) + ) + ) + (+! s5-2 s3-2) + ) + ) + ) + (dotimes (v1-156 (-> this num-active-spans)) + (-> this spans data v1-156) + (let ((a0-82 (-> this spans-internal data v1-156))) + (logior! (-> a0-82 span-flags) 1) + ) + ) + (none) + ) + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod lightning-bolt-method-19 ((this lightning-bolt) (arg0 vector) (arg1 int) (arg2 int) (arg3 matrix) (arg4 float) (arg5 float)) + (let ((a1-2 + (vector-! (new 'stack-no-clear 'vector) (-> this current-points data arg2) (-> this current-points data arg1)) + ) + ) + (set! (-> a1-2 x) (* (-> a1-2 x) arg4)) + (set! (-> a1-2 y) (* (-> a1-2 y) arg4)) + (set! (-> a1-2 z) (* (-> a1-2 z) arg5)) + (vector-rotate*! arg0 a1-2 arg3) + ) + (none) + ) + +(defun matrix<-vector-yz2! ((arg0 matrix) (arg1 vector) (arg2 vector)) + (set! (-> arg0 fvec quad) (-> arg1 quad)) + (vector-cross! (-> arg0 rvec) arg2 arg1) + (vector-normalize! (-> arg0 rvec) 1.0) + (vector-cross! (-> arg0 uvec) arg1 (-> arg0 rvec)) + (vector-normalize! (-> arg0 uvec) 1.0) + (set! (-> arg0 rvec w) 1.0) + (set! (-> arg0 uvec w) 1.0) + (set! (-> arg0 fvec w) 1.0) + arg0 + ) + +;; WARN: Return type mismatch number vs none. +;; WARN: Function (method 22 lightning-bolt) has a return type of none, but the expression builder found a return statement. +(defmethod lightning-bolt-method-22 ((this lightning-bolt)) + (with-pp + (set! (-> this strip1 num-verts) (the-as uint 0)) + (set! (-> this strip2 num-verts) (the-as uint 0)) + (set! (-> this strip1 adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> this strip1 data0) + (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (set! (-> this strip2 adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> this strip2 data0) + (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (set! (-> this strip1 adnops 1 cmds) (gs-reg64 alpha-1)) + (set! (-> this strip2 adnops 1 cmds) (gs-reg64 alpha-1)) + (let ((v1-9 (-> this appearance blend-mode))) + (cond + ((= v1-9 1) + (set! (-> this strip1 data1) (the-as gs-test *lightning-alpha-additive*)) + (set! (-> this strip2 data1) (the-as gs-test *lightning-alpha-additive*)) + ) + ((zero? v1-9) + (set! (-> this strip1 data1) (the-as gs-test *lightning-alpha-blend*)) + (set! (-> this strip2 data1) (the-as gs-test *lightning-alpha-blend*)) + ) + ((= v1-9 2) + (set! (-> this strip1 data1) (the-as gs-test *lightning-alpha-subtractive*)) + (set! (-> this strip2 data1) (the-as gs-test *lightning-alpha-subtractive*)) + ) + ) + ) + (set! (-> this strip1 tex-id) (the-as texture-id (-> this appearance tex-id))) + (set! (-> this strip2 tex-id) (the-as texture-id (-> this appearance tex-id))) + (if (= (-> this fade-mode) 3) + (return 0) + ) + (when (-> this appearance uv-shift?) + (let ((f0-2 (/ (the float (- (current-time) (-> pp clock old-frame-counter))) + (the float (-> this appearance uv-shift-speed)) + ) + ) + ) + (+! (-> this current-uv-shift) f0-2) + ) + (let ((f0-4 (-> this current-uv-shift))) + (set! (-> this current-uv-shift) (- f0-4 (the float (the int f0-4)))) + ) + (if (< (-> this current-uv-shift) 1.0) + (+! (-> this current-uv-shift) 1.0) + ) + ) + (none) + ) + ) + +(defun choose-nice-perp ((arg0 vector)) + (let* ((f0-0 (-> arg0 x)) + (f0-2 (* f0-0 f0-0)) + (f1-0 (-> arg0 z)) + ) + (if (< (+ f0-2 (* f1-0 f1-0)) 0.01) + *x-vector* + *up-vector* + ) + ) + ) + +;; WARN: Function (method 12 lightning-bolt) has a return type of none, but the expression builder found a return statement. +(defmethod lightning-bolt-method-12 ((this lightning-bolt)) + (local-vars + (sv-48 int) + (sv-56 float) + (sv-60 vector) + (sv-64 matrix) + (sv-96 lightning-span) + (sv-100 lightning-span-internal) + (sv-104 vector) + (sv-224 matrix) + (sv-228 vector) + (sv-232 vector) + (sv-236 float) + (sv-240 vector) + (sv-244 float) + (sv-248 float) + (sv-256 int) + (sv-288 lightning-span) + (sv-292 lightning-span-internal) + (sv-296 vector) + (sv-416 matrix) + (sv-420 vector) + (sv-424 vector) + (sv-428 vector) + (sv-432 float) + ) + (when (= (-> this fade-mode) 3) + (set! (-> this strip1 num-verts) (the-as uint 0)) + (set! (-> this strip2 num-verts) (the-as uint 0)) + (return 0) + ) + (set! sv-48 0) + (set! sv-56 (the-as float 0.0)) + (set! sv-60 (new 'stack-no-clear 'vector)) + (set! sv-64 (new 'stack-no-clear 'matrix)) + (lightning-bolt-method-22 this) + (set! (-> sv-60 x) 0.0) + (set! (-> sv-60 y) 0.0) + (dotimes (s5-0 (-> this num-active-spans)) + (set! sv-96 (-> this spans data s5-0)) + (set! sv-100 (-> this spans-internal data s5-0)) + (set! sv-104 (new 'stack-no-clear 'vector)) + (set! sv-224 (new 'stack-no-clear 'matrix)) + (set! sv-228 (new 'stack-no-clear 'vector)) + (set! sv-232 (new 'stack-no-clear 'vector)) + (set! sv-236 (the-as float 0.0)) + (set! sv-240 + (vector-! + (new 'stack-no-clear 'vector) + (-> this span-pts-start data (+ s5-0 1)) + (-> this span-pts-start data s5-0) + ) + ) + (set! sv-244 (the float (-> sv-100 index))) + (vector-normalize! sv-240 1.0) + (set! sv-236 + (vector-vector-distance (-> this span-pts-start data s5-0) (-> this span-pts-start data (+ s5-0 1))) + ) + (matrix<-vector-yz2! sv-224 sv-240 (choose-nice-perp sv-240)) + (let ((f30-0 (-> sv-96 random-offset-size-start))) + (lightning-bolt-method-19 this sv-104 sv-48 (+ sv-48 1) sv-224 f30-0 sv-236) + (set! (-> sv-232 quad) (-> this current-points data sv-48 quad)) + (set! (-> sv-232 x) (* (-> sv-232 x) f30-0)) + (set! (-> sv-232 y) (* (-> sv-232 y) f30-0)) + ) + (set! (-> sv-232 z) (- (-> sv-232 z) sv-244)) + (set! (-> sv-232 z) (* (-> sv-232 z) sv-236)) + (vector-rotate*! sv-228 sv-232 sv-224) + (vector+! sv-228 sv-228 (-> this span-pts-start data s5-0)) + (lightning-bolt-method-16 this sv-228 (vector-length sv-232) sv-56 sv-60 (the-as matrix sv-104)) + (set! sv-248 (-> sv-96 inner-random-offset-size)) + (dotimes (s4-1 (-> sv-100 num-inner-points)) + (set! sv-256 (+ sv-48 1 s4-1)) + (lightning-bolt-method-19 this sv-104 (+ sv-256 -1) sv-256 sv-224 sv-248 sv-236) + (set! (-> sv-232 quad) (-> this current-points data sv-256 quad)) + (set! (-> sv-232 x) (* (-> sv-232 x) sv-248)) + (set! (-> sv-232 y) (* (-> sv-232 y) sv-248)) + (set! (-> sv-232 z) (- (-> sv-232 z) sv-244)) + (set! (-> sv-232 z) (* (-> sv-232 z) sv-236)) + (vector-rotate*! sv-228 sv-232 sv-224) + (vector+! sv-228 sv-228 (-> this span-pts-start data s5-0)) + (lightning-bolt-method-16 this sv-228 (vector-length sv-232) sv-56 sv-60 (the-as matrix sv-104)) + ) + (set! sv-56 (+ sv-56 sv-236)) + (set! sv-48 (+ (-> sv-100 num-inner-points) 1 sv-48)) + (set! (-> sv-64 rvec quad) (-> sv-104 quad)) + ) + (let ((s5-1 (-> this num-active-spans))) + (set! sv-288 (-> this spans data s5-1)) + (set! sv-292 (-> this spans-internal data s5-1)) + (set! sv-296 (new 'stack-no-clear 'vector)) + (set! sv-416 (new 'stack-no-clear 'matrix)) + (set! sv-420 (new 'stack-no-clear 'vector)) + (set! sv-424 (new 'stack-no-clear 'vector)) + (set! sv-428 (vector-! + (new 'stack-no-clear 'vector) + (-> this span-pts-start data s5-1) + (-> this span-pts-start data (+ s5-1 -1)) + ) + ) + (set! sv-432 (the float (-> sv-292 index))) + (vector-normalize! sv-428 1.0) + (matrix<-vector-yz2! sv-416 sv-428 (choose-nice-perp sv-428)) + (let ((f0-33 (-> sv-288 random-offset-size-start))) + (set! (-> sv-424 quad) (-> this current-points data sv-48 quad)) + (set! (-> sv-424 x) (* (-> sv-424 x) f0-33)) + (set! (-> sv-424 y) (* (-> sv-424 y) f0-33)) + ) + (set! (-> sv-424 z) (- (-> sv-424 z) sv-432)) + (vector-rotate*! sv-420 sv-424 sv-416) + (vector+! sv-420 sv-420 (-> this span-pts-start data s5-1)) + ) + (lightning-bolt-method-16 this sv-420 0.0 sv-56 sv-60 sv-64) + 0 + (none) + ) + +(defmethod relocate ((this lightning-bolt) (offset int)) + (if (nonzero? (-> this spans)) + (&+! (-> this spans) offset) + ) + (if (nonzero? (-> this strip1)) + (&+! (-> this strip1) offset) + ) + (if (nonzero? (-> this strip2)) + (&+! (-> this strip2) offset) + ) + (dotimes (v1-12 (+ (-> this num-spans) -1)) + ) + (if (nonzero? (-> this spans-internal)) + (&+! (-> this spans-internal) offset) + ) + (if (nonzero? (-> this current-points)) + (&+! (-> this current-points) offset) + ) + (if (nonzero? (-> this desired-points)) + (&+! (-> this desired-points) offset) + ) + (if (nonzero? (-> this span-pts-start)) + (&+! (-> this span-pts-start) offset) + ) + (call-parent-method this offset) + ) + +(defmethod lightning-bolt-method-17 ((this lightning-bolt) (arg0 uint) (arg1 float) (arg2 float) (arg3 curve2d-fast) (arg4 float)) + (if (not arg3) + (return 1.0) + ) + (let ((v1-2 arg0)) + (cond + ((zero? v1-2) + (curve2d-method-9 arg3 (/ arg2 arg4) 3) + ) + ((= v1-2 1) + (curve2d-method-9 arg3 arg1 3) + ) + ((= v1-2 2) + (let* ((v1-6 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-7 (the-as number (logior #x3f800000 v1-6))) + ) + (+ -1.0 (the-as float v1-7)) + ) + ) + (else + 1.0 + ) + ) + ) + ) + +(defmethod lightning-bolt-method-16 ((this lightning-bolt) (arg0 vector) (arg1 float) (arg2 float) (arg3 vector) (arg4 matrix)) + (local-vars (sv-160 vector) (sv-164 vector) (sv-168 vector) (sv-172 vector) (sv-176 rgba)) + 0.0 + 0.0 + 0.0 + (let ((f28-0 + (/ (the float (- (current-time) (-> this last-generate-time))) (the float (-> this inner-point-travel-time))) + ) + (f30-0 (+ arg2 arg1)) + ) + (math-camera-pos) + (let* ((s2-0 (-> this appearance)) + (f24-0 (* (lightning-bolt-method-17 + this + (-> s2-0 alpha-1-mode) + f28-0 + f30-0 + (-> s2-0 alpha-1-curve) + (-> s2-0 alpha-1-repeat-dist) + ) + (lightning-bolt-method-17 + this + (-> s2-0 alpha-2-mode) + f28-0 + f30-0 + (-> s2-0 alpha-2-curve) + (-> s2-0 alpha-2-repeat-dist) + ) + (-> s2-0 base-alpha) + (-> this current-fade-scalar) + ) + ) + (f22-0 (* (lightning-bolt-method-17 + this + (-> s2-0 width-mode) + f28-0 + f30-0 + (-> s2-0 width-curve) + (-> s2-0 width-repeat-dist) + ) + (-> this base-width) + ) + ) + (f0-14 (/ f30-0 (-> s2-0 uv-repeat-dist))) + (f28-1 (+ (- f0-14 (* (the float (the int (/ f0-14 6.0))) 6.0)) (-> this current-uv-shift))) + ) + (vector-normalize! (the-as vector arg4) 1.0) + (let* ((a2-4 (-> (camera-matrix) uvec)) + (v1-13 (matrix-f-u-compose (new 'stack-no-clear 'matrix) (the-as vector arg4) a2-4)) + (f26-1 6.0) + ) + (set! sv-160 (vector+float*! (new 'stack-no-clear 'vector) arg0 (-> v1-13 rvec) (* 0.5 f22-0))) + (set! sv-164 (vector+float*! (new 'stack-no-clear 'vector) arg0 (-> v1-13 rvec) (* -0.5 f22-0))) + (set! sv-168 (vector+float*! (new 'stack-no-clear 'vector) arg0 (-> v1-13 uvec) (* 0.5 f22-0))) + (set! sv-172 (vector+float*! (new 'stack-no-clear 'vector) arg0 (-> v1-13 uvec) (* -0.5 f22-0))) + (set! sv-176 (the-as rgba (new 'stack-no-clear 'array 'rgba 1))) + (set! sv-176 (-> this base-color)) + (set! sv-176 (copy-and-set-field sv-176 a (the int (* 128.0 f24-0)))) + (when (< f28-1 (-> arg3 x)) + (let ((s3-1 (new 'stack-no-clear 'vector)) + (s4-1 (new 'stack-no-clear 'vector)) + ) + (let ((f24-1 (/ (- (+ f26-1 f28-1) (-> arg3 x)) f26-1))) + (let ((a1-10 (+ (the-as uint (-> this strip1 data 0 pos)) (* (+ (-> this strip1 num-verts) -2) 32))) + (s2-1 (+ (the-as uint (-> this strip1 data 0 pos)) (* (+ (-> this strip1 num-verts) -1) 32))) + ) + (vector-lerp! s3-1 (the-as vector a1-10) sv-160 f24-1) + (vector-lerp! s4-1 (the-as vector s2-1) sv-164 f24-1) + ) + (lightning-bolt-method-18 this (-> this strip1) s3-1 sv-176 0.0 f26-1) + (lightning-bolt-method-18 this (-> this strip1) s4-1 sv-176 1.0 f26-1) + (lightning-bolt-method-18 this (-> this strip1) s3-1 sv-176 0.0 0.0) + (lightning-bolt-method-18 this (-> this strip1) s4-1 sv-176 1.0 0.0) + (let ((a1-16 (+ (the-as uint (-> this strip2 data 0 pos)) (* (+ (-> this strip2 num-verts) -2) 32))) + (s2-2 (+ (the-as uint (-> this strip2 data 0 pos)) (* (+ (-> this strip2 num-verts) -1) 32))) + ) + (vector-lerp! s3-1 (the-as vector a1-16) sv-168 f24-1) + (vector-lerp! s4-1 (the-as vector s2-2) sv-172 f24-1) + ) + ) + (lightning-bolt-method-18 this (-> this strip2) s3-1 sv-176 1.0 f26-1) + (lightning-bolt-method-18 this (-> this strip2) s4-1 sv-176 0.0 f26-1) + (lightning-bolt-method-18 this (-> this strip2) s3-1 sv-176 1.0 0.0) + (lightning-bolt-method-18 this (-> this strip2) s4-1 sv-176 0.0 0.0) + ) + ) + ) + (lightning-bolt-method-18 this (-> this strip1) sv-160 sv-176 0.0 f28-1) + (lightning-bolt-method-18 this (-> this strip1) sv-164 sv-176 1.0 f28-1) + (lightning-bolt-method-18 this (-> this strip2) sv-168 sv-176 1.0 f28-1) + (lightning-bolt-method-18 this (-> this strip2) sv-172 sv-176 0.0 f28-1) + (set! (-> arg3 y) f30-0) + (set! (-> arg3 x) f28-1) + ) + ) + 0 + (none) + ) + +(defmethod lightning-bolt-method-18 ((this lightning-bolt) (arg0 prim-strip) (arg1 vector) (arg2 rgba) (arg3 float) (arg4 float)) + (when (< (-> arg0 num-verts) (-> arg0 allocated-num-verts)) + (let ((v1-5 (-> arg0 data (-> arg0 num-verts)))) + (set! (-> v1-5 pos quad) (-> arg1 quad)) + (set! (-> v1-5 col) arg2) + (set! (-> v1-5 stq x) arg3) + (set! (-> v1-5 stq y) arg4) + ) + (+! (-> arg0 num-verts) 1) + ) + 0 + (none) + ) + +(defbehavior lightning-new-tracker-init-by-other lightning-new-tracker ((arg0 lightning-tracker-init-params)) + (set! (-> self bolt) (new 'process 'lightning-bolt)) + (init! (-> self bolt) 2 (+ (-> arg0 num-inner-points) 2) (-> arg0 appearance)) + (set! (-> self lifetime) (-> arg0 lifetime)) + (set! (-> self bolt span-pts-start data 0 quad) (-> arg0 start-pt quad)) + (set! (-> self bolt span-pts-start data 1 quad) (-> arg0 end-pt quad)) + (set! (-> self bolt spans-internal data 0 num-inner-points) (-> arg0 num-inner-points)) + (set! (-> self bolt spans data 0 inner-random-offset-size) (-> arg0 inner-random-offset-size)) + (set! (-> self bolt spans data 0 random-offset-size-start) (-> arg0 random-offset-size-start)) + (set! (-> self bolt inner-point-travel-time) (seconds 0.017)) + (set! (-> self bolt snap-inner-points?) #t) + (set! (-> self bolt appearance) (-> arg0 appearance)) + (set! (-> self bolt fractal-reduction) 0.4) + (set! (-> self bolt generate-mode) (the-as uint 1)) + (go-virtual active) + ) + +;; WARN: Return type mismatch process vs lightning-new-tracker. +(defun create-lightning-tracker-new ((arg0 lightning-tracker-init-params)) + (let ((v1-1 (process-spawn lightning-new-tracker arg0 :name "lightning-new-tracker" :stack-size #x8000))) + (if v1-1 + (return (the-as lightning-new-tracker (-> v1-1 0))) + ) + ) + (the-as lightning-new-tracker #f) + ) + +(defmethod relocate ((this lightning-new-tracker) (offset int)) + (if (nonzero? (-> this bolt)) + (&+! (-> this bolt) offset) + ) + (call-parent-method this offset) + ) + +(defstate active (lightning-new-tracker) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self bolt num-active-spans) 1) + (lightning-bolt-method-13 (-> self bolt) 0) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (-> self lifetime)) + (go-virtual die) + ) + (lightning-bolt-method-11 (-> self bolt)) + (lightning-bolt-method-12 (-> self bolt)) + ) + :code sleep-code + ) + +(defstate die (lightning-new-tracker) + :virtual #t + :enter (behavior () + (lightning-bolt-method-13 (-> self bolt) 2) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (lightning-bolt-method-11 (-> self bolt)) + (lightning-bolt-method-12 (-> self bolt)) + ) + :code (behavior () + (until (= (lightning-bolt-method-14 (-> self bolt)) 3) + (suspend) + ) + ) + ) diff --git a/goal_src/jak3/engine/gfx/generic/lightning/lightning.gc b/goal_src/jak3/engine/gfx/generic/lightning/lightning.gc index b0cd910a6e..c75c7b4557 100644 --- a/goal_src/jak3/engine/gfx/generic/lightning/lightning.gc +++ b/goal_src/jak3/engine/gfx/generic/lightning/lightning.gc @@ -7,3 +7,830 @@ ;; DECOMP BEGINS +(kmemopen global "part-tables") + +(define *lightning-spec-id-table* (new 'global 'boxed-array lightning-spec 128)) + +(kmemclose) + +(define *lightning-gcf* + (new 'static 'gcf-control + :giftag (new 'static 'generic-gif-tag + :fan-prim (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + :str-prim (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + :regs (new 'static 'gif-tag-regs-32 :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + :adnops (new 'static 'inline-array gs-adcmd 2 + (new 'static 'gs-adcmd :cmds (gs-reg64 hack)) + (new 'static 'gs-adcmd :cmds (gs-reg64 hack)) + ) + ) + ) + +(defun lightning-fractal-gen ((arg0 (inline-array vector)) (arg1 int) (arg2 int) (arg3 float) (arg4 lightning-spec)) + (local-vars (sv-16 vector) (sv-32 vector)) + (when (< 1 (- arg2 arg1)) + (let ((s1-0 (/ (+ arg1 arg2) 2))) + (set! sv-16 (-> arg0 arg1)) + (set! sv-32 (-> arg0 arg2)) + (let ((s0-0 (-> arg0 s1-0))) + (let* ((f30-0 (* 0.5 (+ (-> sv-16 x) (-> sv-32 x)))) + (f28-0 arg3) + (f26-0 -0.5) + (v1-12 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-13 (the-as number (logior #x3f800000 v1-12))) + ) + (set! (-> s0-0 x) (+ f30-0 (* f28-0 (+ f26-0 (+ -1.0 (the-as float v1-13)))))) + ) + (let* ((f30-1 (* 0.5 (+ (-> sv-16 y) (-> sv-32 y)))) + (f28-1 arg3) + (f26-1 -0.5) + (v1-19 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-20 (the-as number (logior #x3f800000 v1-19))) + ) + (set! (-> s0-0 y) (+ f30-1 (* f28-1 (+ f26-1 (+ -1.0 (the-as float v1-20)))))) + ) + (let* ((f30-2 (* 0.5 (+ (-> sv-16 z) (-> sv-32 z)))) + (f28-2 arg3) + (f26-2 -0.5) + (v1-26 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-27 (the-as number (logior #x3f800000 v1-26))) + ) + (set! (-> s0-0 z) (+ f30-2 (* f28-2 (+ f26-2 (+ -1.0 (the-as float v1-27)))))) + ) + ) + (lightning-fractal-gen arg0 arg1 s1-0 (* arg3 (-> arg4 reduction)) arg4) + (lightning-fractal-gen arg0 s1-0 arg2 (* arg3 (-> arg4 reduction)) arg4) + ) + ) + 0 + (none) + ) + +(defun lightning-uniform-gen ((arg0 (inline-array vector)) (arg1 int) (arg2 int) (arg3 float) (arg4 lightning-spec)) + (local-vars (sv-32 vector)) + (let ((s4-0 (-> arg0 arg1)) + (s3-0 (-> arg0 arg2)) + (f30-0 (/ 1.0 (the float (- arg2 arg1)))) + (f28-0 0.0) + (s2-0 (new-stack-vector0)) + (s1-0 arg1) + (s0-0 arg2) + ) + (while (>= s0-0 s1-0) + (vector-lerp! (-> arg0 s1-0) s4-0 s3-0 f28-0) + (set! sv-32 s2-0) + (let* ((f26-0 0.4) + (f24-0 -0.5) + (v1-7 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-8 (the-as number (logior #x3f800000 v1-7))) + ) + (set! (-> sv-32 x) (* f26-0 (+ f24-0 (+ -1.0 (the-as float v1-8))) arg3)) + ) + (let* ((f26-1 0.4) + (f24-1 -0.5) + (v1-13 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-14 (the-as number (logior #x3f800000 v1-13))) + ) + (set! (-> sv-32 y) (* f26-1 (+ f24-1 (+ -1.0 (the-as float v1-14))) arg3)) + ) + (let* ((f26-2 0.4) + (f24-2 -0.5) + (v1-19 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-20 (the-as number (logior #x3f800000 v1-19))) + ) + (set! (-> sv-32 z) (* f26-2 (+ f24-2 (+ -1.0 (the-as float v1-20))) arg3)) + ) + (set! (-> sv-32 w) 1.0) + (vector+! (-> arg0 s1-0) (-> arg0 s1-0) s2-0) + (+! f28-0 f30-0) + (+! s1-0 1) + ) + ) + 0 + (none) + ) + +(defun lightning-trail-uniform-gen ((arg0 (inline-array vector)) (arg1 (inline-array vector)) (arg2 float) (arg3 int)) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (dotimes (s1-0 arg3) + (let ((s0-0 s2-0)) + (let* ((f30-0 0.4) + (f28-0 -0.5) + (v1-3 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-4 (the-as number (logior #x3f800000 v1-3))) + ) + (set! (-> s0-0 x) (* f30-0 (+ f28-0 (+ -1.0 (the-as float v1-4))) arg2)) + ) + (let* ((f30-1 0.4) + (f28-1 -0.5) + (v1-9 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-10 (the-as number (logior #x3f800000 v1-9))) + ) + (set! (-> s0-0 y) (* f30-1 (+ f28-1 (+ -1.0 (the-as float v1-10))) arg2)) + ) + (let* ((f30-2 0.4) + (f28-2 -0.5) + (v1-15 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-16 (the-as number (logior #x3f800000 v1-15))) + ) + (set! (-> s0-0 z) (* f30-2 (+ f28-2 (+ -1.0 (the-as float v1-16))) arg2)) + ) + (set! (-> s0-0 w) 1.0) + ) + (vector+! (-> arg0 s1-0) (-> arg1 s1-0) s2-0) + ) + ) + #f + ) + +(defun lightning-trail-fractal-gen ((arg0 (inline-array vector)) + (arg1 (inline-array vector)) + (arg2 int) + (arg3 int) + (arg4 float) + (arg5 lightning-spec) + ) + (local-vars (sv-80 vector) (sv-96 vector) (sv-112 vector) (sv-128 vector) (sv-144 vector)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (when (< 1 (- arg3 arg2)) + (let ((s0-0 (/ (+ arg2 arg3) 2))) + (set! sv-96 (new 'stack-no-clear 'vector)) + (let ((v1-5 (-> arg0 arg2)) + (a0-3 (-> arg1 arg2)) + ) + (.lvf vf4 (&-> v1-5 quad)) + (.lvf vf5 (&-> a0-3 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-96 quad) vf6) + (set! sv-112 (new 'stack-no-clear 'vector)) + (let ((v1-9 (-> arg0 arg3)) + (a0-5 (-> arg1 arg3)) + ) + (.lvf vf4 (&-> v1-9 quad)) + (.lvf vf5 (&-> a0-5 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-112 quad) vf6) + (set! sv-144 (new 'stack-no-clear 'vector)) + (set! sv-128 (new 'stack-no-clear 'vector)) + (set! sv-80 sv-144) + (let* ((f30-0 arg4) + (f28-0 -0.5) + (v1-15 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-16 (the-as number (logior #x3f800000 v1-15))) + ) + (set! (-> sv-80 x) (* f30-0 (+ f28-0 (+ -1.0 (the-as float v1-16))))) + ) + (let* ((f30-1 arg4) + (f28-1 -0.5) + (v1-20 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-21 (the-as number (logior #x3f800000 v1-20))) + ) + (set! (-> sv-80 y) (* f30-1 (+ f28-1 (+ -1.0 (the-as float v1-21))))) + ) + (let* ((f30-2 arg4) + (f28-2 -0.5) + (v1-25 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-26 (the-as number (logior #x3f800000 v1-25))) + ) + (set! (-> sv-80 z) (* f30-2 (+ f28-2 (+ -1.0 (the-as float v1-26))))) + ) + (set! (-> sv-80 w) 1.0) + (let ((v1-31 sv-128) + (a0-15 sv-128) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> sv-96 quad)) + (.lvf vf5 (&-> sv-112 quad)) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> a0-15 quad) vf6) + (vector-float*! v1-31 a0-15 0.5) + ) + (let ((v1-33 sv-144)) + (let ((a0-16 sv-144)) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> a0-16 quad)) + ) + (.lvf vf5 (&-> sv-128 quad)) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-33 quad) vf6) + ) + (let ((v1-35 (-> arg0 s0-0))) + (let ((a0-19 (-> arg1 s0-0))) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> a0-19 quad)) + ) + (.lvf vf5 (&-> sv-144 quad)) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-35 quad) vf6) + ) + (lightning-trail-fractal-gen arg0 arg1 arg2 s0-0 (* arg4 (-> arg5 reduction)) arg5) + (lightning-trail-fractal-gen arg0 arg1 s0-0 arg3 (* arg4 (-> arg5 reduction)) arg5) + ) + ) + 0 + (none) + ) + ) + +(deftype lightning-globals (structure) + ((gcf-buf uint16) + (vtx-buf uint16) + ) + ) + + +(defun gs-packed-rgba-lerp! ((arg0 gs-packed-rgba) (arg1 rgba) (arg2 rgba) (arg3 float)) + (local-vars (v1-0 uint128) (v1-1 uint128) (a1-1 uint128) (a1-2 uint128)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (.pextlb v1-0 0 arg1) + (.pextlb a1-1 0 arg2) + (.pextlh v1-1 0 v1-0) + (.pextlh a1-2 0 a1-1) + (.mov vf1 v1-1) + (.mov vf2 a1-2) + (.mov vf3 arg3) + (.itof.vf vf1 vf1) + (.itof.vf vf2 vf2) + (.mul.w.vf acc vf1 vf0) + (.add.mul.x.vf acc vf2 vf3 acc) + (.sub.mul.x.vf vf1 vf1 vf3 acc) + (.ftoi.vf vf1 vf1) + (.svf (&-> arg0 quad) vf1) + arg0 + ) + ) + +(defbehavior lightning-fade process ((arg0 lightning-control)) + (local-vars (v0-1 int) (sv-16 rgba)) + (let ((f0-0 (-> arg0 spec fade-time))) + (-> arg0 process 0 clock) + (cond + ((< (-> arg0 state counter) f0-0) + (+! (-> arg0 state counter) (* 300.0 (seconds-per-frame))) + (let ((gp-0 (-> arg0 state))) + (let* ((s5-0 (-> arg0 spec)) + (f30-0 (fmax 0.0 (fmin 1.0 (* (- 1.0 (/ (-> gp-0 counter) f0-0)) (-> s5-0 fade-start-factor))))) + ) + (set! sv-16 (-> s5-0 fade-to-color)) + (set! (-> gp-0 start-color) (rgba-lerp sv-16 (-> s5-0 start-color) (the-as rgba f30-0))) + (set! v0-1 (the-as int (rgba-lerp sv-16 (-> s5-0 end-color) (the-as rgba f30-0)))) + ) + (set! (-> gp-0 end-color) (the-as rgba v0-1)) + ) + ) + (else + (let ((v1-9 arg0)) + (set! v0-1 0) + (let ((a0-4 (!= v0-1 (-> v1-9 state mode)))) + (case v0-1 + ((3) + (if a0-4 + (set! (-> v1-9 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-9 state start-color) (-> v1-9 spec start-color)) + (set! (-> v1-9 state end-color) (-> v1-9 spec end-color)) + ) + ) + ) + (set! (-> v1-9 state mode) (the-as uint v0-1)) + ) + ) + ) + ) + v0-1 + ) + +(defun lightning-update ((arg0 lightning-control)) + (local-vars + (sv-16 lightning-spec) + (sv-20 vector-array) + (sv-24 vector-array) + (sv-28 vector-array) + (sv-32 symbol) + (sv-36 clock) + ) + (let* ((gp-0 (-> arg0 state points-to-draw)) + (s4-0 (+ gp-0 -1)) + (s5-0 (-> arg0 state)) + ) + (set! sv-16 (-> arg0 spec)) + (set! sv-20 (-> s5-0 line)) + (set! sv-24 (-> s5-0 meet)) + (set! sv-28 (-> s5-0 path)) + (set! sv-32 (= (-> s5-0 mode) 1)) + (set! sv-36 (-> arg0 process 0 clock)) + (when (not (or (= (-> sv-36 time-adjust-ratio) 0.0) (< gp-0 2))) + (when (logtest? (-> sv-16 flags) (lightning-spec-flags lsf4)) + (let ((f1-1 (vector-vector-distance (the-as vector (-> sv-24 data)) (-> sv-24 data s4-0)))) + (set! (-> s5-0 box-size) + (* (-> sv-16 box-size) (fmax 1.0 (fmin 5.0 (/ f1-1 (* 4096.0 (the float (-> sv-16 adjust-distance))))))) + ) + ) + ) + (set! (-> s5-0 counter) (fmax 0.0 (- (-> s5-0 counter) (-> sv-36 time-adjust-ratio)))) + (when sv-32 + (set! (-> s5-0 mode) (the-as uint 2)) + (set! (-> s5-0 counter) 0.0) + ) + (when (>= 0.0 (-> s5-0 counter)) + (let ((v1-33 (-> sv-16 rand-func))) + (cond + ((or (zero? v1-33) (= v1-33 1)) + (let ((v1-35 (-> sv-16 rand-func))) + (cond + ((zero? v1-35) + (lightning-fractal-gen (-> sv-24 data) 0 s4-0 (-> s5-0 box-size) sv-16) + ) + ((= v1-35 1) + (lightning-uniform-gen (-> sv-24 data) 0 s4-0 (-> s5-0 box-size) sv-16) + ) + ) + ) + (when sv-32 + (dotimes (v1-43 gp-0) + (set! (-> sv-20 data v1-43 quad) (-> sv-24 data v1-43 quad)) + ) + ) + ) + ((or (= v1-33 2) (= v1-33 3)) + (case (-> sv-16 rand-func) + ((2) + (set! (-> sv-24 data 0 quad) (-> sv-28 data 0 quad)) + (set! (-> sv-24 data s4-0 quad) (-> sv-28 data s4-0 quad)) + (lightning-trail-fractal-gen (-> sv-24 data) (-> sv-28 data) 0 s4-0 (-> s5-0 box-size) sv-16) + ) + (else + (lightning-trail-uniform-gen (-> sv-24 data) (-> sv-28 data) (-> s5-0 box-size) gp-0) + ) + ) + (when sv-32 + (dotimes (v1-63 gp-0) + (set! (-> sv-20 data v1-63 quad) (-> sv-28 data v1-63 quad)) + ) + ) + ) + ) + ) + (set! (-> s5-0 counter) (the float (-> sv-16 merge-count))) + ) + (let ((f0-14 (fmax 0.0 (fmin 1.0 (* (-> sv-16 merge-factor) (-> sv-36 time-adjust-ratio)))))) + (dotimes (v1-72 gp-0) + (let* ((a1-21 (-> sv-20 data v1-72)) + (a2-7 (-> sv-24 data v1-72)) + (a0-31 a1-21) + ) + (set! (-> a0-31 x) (+ (-> a1-21 x) (* f0-14 (- (-> a2-7 x) (-> a1-21 x))))) + (set! (-> a0-31 y) (+ (-> a1-21 y) (* f0-14 (- (-> a2-7 y) (-> a1-21 y))))) + (set! (-> a0-31 z) (+ (-> a1-21 z) (* f0-14 (- (-> a2-7 z) (-> a1-21 z))))) + ) + ) + ) + #f + ) + ) + ) + +(defun lightning-draw ((arg0 dma-buffer) (arg1 lightning-control) (arg2 lightning-globals)) + (local-vars + (sv-16 math-camera) + (sv-20 (inline-array gcf-vertex)) + (sv-24 lightning-spec) + (sv-28 float) + (sv-32 texture) + (sv-48 vector-array) + (sv-64 int) + (sv-80 int) + (sv-96 int) + (sv-112 int) + (sv-128 int) + (sv-144 int) + (sv-160 int) + (sv-176 gcf-control) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf17 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf6 :class vf) + (vf7 :class vf) + (vf8 :class vf) + (vf9 :class vf) + ) + (init-vf0-vector) + (set! sv-16 *math-camera*) + (set! sv-20 (the-as (inline-array gcf-vertex) *gsf-buffer*)) + (let* ((s3-0 (-> arg1 state points-to-draw)) + (s2-0 (+ s3-0 -1)) + (s1-0 *lightning-gcf*) + (s0-0 (-> sv-16 camera-rot)) + ) + (set! sv-32 (lookup-texture-by-id (-> arg1 spec texture))) + (set! sv-48 (-> arg1 state line)) + (set! sv-24 (-> arg1 spec)) + (when (< 1 s3-0) + (set! sv-64 0) + (while (< sv-64 2) + (set! sv-28 (/ 1.0 (the float s2-0))) + (cond + ((logtest? (-> sv-24 flags) (lightning-spec-flags lsf0)) + (set! sv-80 0) + (while (< sv-80 (* s3-0 2)) + (cond + ((not (logtest? sv-80 1)) + (gs-packed-rgba-lerp! + (-> sv-20 sv-80 clr) + (-> arg1 state start-color) + (-> arg1 state end-color) + (* (the float (/ sv-80 2)) sv-28) + ) + (let ((v1-24 (-> sv-20 sv-80))) + (set! (-> v1-24 tex x) 0) + (set! (-> v1-24 tex y) (* (/ 4096 s3-0) (/ sv-80 2))) + (set! (-> v1-24 tex z) 4096) + (set! (-> v1-24 tex w) 0) + ) + ) + (else + (gs-packed-rgba-lerp! + (-> sv-20 sv-80 clr) + (-> arg1 state start-color) + (-> arg1 state end-color) + (* (the float (/ sv-80 2)) sv-28) + ) + (let ((v1-33 (-> sv-20 sv-80))) + (set! (-> v1-33 tex x) 4096) + (set! (-> v1-33 tex y) (* (/ 4096 s3-0) (/ sv-80 2))) + (set! (-> v1-33 tex z) 4096) + (set! (-> v1-33 tex w) 0) + ) + ) + ) + (set! sv-80 (+ sv-80 1)) + ) + ) + ((logtest? (-> sv-24 flags) (lightning-spec-flags lsf1)) + (dotimes (v1-43 (* s3-0 2)) + (cond + ((not (logtest? v1-43 1)) + (let ((a0-26 (-> sv-20 v1-43))) + (set! (-> a0-26 tex x) 0) + (set! (-> a0-26 tex y) (* (/ 4096 s3-0) (/ v1-43 2))) + (set! (-> a0-26 tex z) 4096) + (set! (-> a0-26 tex w) 0) + ) + ) + (else + (let ((a0-30 (-> sv-20 v1-43))) + (set! (-> a0-30 tex x) 4096) + (set! (-> a0-30 tex y) (* (/ 4096 s3-0) (/ v1-43 2))) + (set! (-> a0-30 tex z) 4096) + (set! (-> a0-30 tex w) 0) + ) + ) + ) + ) + (dotimes (v1-46 (* s2-0 2)) + (set! (-> sv-20 v1-46 clr x) (the-as int (-> arg1 state start-color r))) + (set! (-> sv-20 v1-46 clr y) (the-as int (-> arg1 state start-color g))) + (set! (-> sv-20 v1-46 clr z) (the-as int (-> arg1 state start-color b))) + (set! (-> sv-20 v1-46 clr w) (the-as int (-> arg1 state start-color a))) + ) + (dotimes (v1-49 2) + (let ((a0-45 (+ v1-49 (* s2-0 2)))) + (set! (-> sv-20 a0-45 clr x) (the-as int (-> arg1 state end-color r))) + (set! (-> sv-20 a0-45 clr y) (the-as int (-> arg1 state end-color g))) + (set! (-> sv-20 a0-45 clr z) (the-as int (-> arg1 state end-color b))) + (set! (-> sv-20 a0-45 clr w) (the-as int (-> arg1 state end-color a))) + ) + ) + ) + ((logtest? (-> sv-24 flags) (lightning-spec-flags lsf2)) + (dotimes (v1-56 (* s3-0 2)) + (cond + ((not (logtest? v1-56 1)) + (let ((a0-52 (-> sv-20 v1-56))) + (set! (-> a0-52 tex x) 0) + (set! (-> a0-52 tex y) (* (/ 4096 s3-0) (/ v1-56 2))) + (set! (-> a0-52 tex z) 4096) + (set! (-> a0-52 tex w) 0) + ) + ) + (else + (let ((a0-56 (-> sv-20 v1-56))) + (set! (-> a0-56 tex x) 4096) + (set! (-> a0-56 tex y) (* (/ 4096 s3-0) (/ v1-56 2))) + (set! (-> a0-56 tex z) 4096) + (set! (-> a0-56 tex w) 0) + ) + ) + ) + ) + (dotimes (v1-59 (* (+ s3-0 -2) 2)) + (let ((a0-58 (+ v1-59 2))) + (set! (-> sv-20 a0-58 clr x) (the-as int (-> arg1 state start-color r))) + (set! (-> sv-20 a0-58 clr y) (the-as int (-> arg1 state start-color g))) + (set! (-> sv-20 a0-58 clr z) (the-as int (-> arg1 state start-color b))) + (set! (-> sv-20 a0-58 clr w) (the-as int (-> arg1 state start-color a))) + ) + ) + (dotimes (v1-62 2) + (let ((a0-63 v1-62)) + (set! (-> sv-20 a0-63 clr x) (the-as int (-> arg1 state end-color r))) + (set! (-> sv-20 a0-63 clr y) (the-as int (-> arg1 state end-color g))) + (set! (-> sv-20 a0-63 clr z) (the-as int (-> arg1 state end-color b))) + (set! (-> sv-20 a0-63 clr w) (the-as int (-> arg1 state end-color a))) + ) + ) + (dotimes (v1-65 2) + (let ((a0-67 (+ v1-65 (* s2-0 2)))) + (set! (-> sv-20 a0-67 clr x) (the-as int (-> arg1 state end-color r))) + (set! (-> sv-20 a0-67 clr y) (the-as int (-> arg1 state end-color g))) + (set! (-> sv-20 a0-67 clr z) (the-as int (-> arg1 state end-color b))) + (set! (-> sv-20 a0-67 clr w) (the-as int (-> arg1 state end-color a))) + ) + ) + ) + ) + (let ((f0-8 (-> sv-24 radius)) + (f1-4 0.5) + (v1-71 (-> sv-48 data)) + (a0-71 (the-as object (-> sv-20 0))) + (a1-82 (the-as object (-> sv-20 1))) + ) + 1 + (.lvf vf1 (&-> s0-0 rvec quad)) + (.lvf vf2 (&-> s0-0 uvec quad)) + (.lvf vf3 (&-> s0-0 fvec quad)) + (.lvf vf4 (&-> s0-0 trans quad)) + (let ((a2-44 f0-8)) + (.mov vf8 a2-44) + ) + (let ((a2-45 f1-4)) + (.mov vf17 a2-45) + ) + (.add.x.vf vf17 vf0 vf8 :mask #b10) + (.add.w.vf vf17 vf0 vf0 :mask #b100) + (.add.w.vf vf17 vf17 vf0 :mask #b100) + (dotimes (a2-46 s3-0) + (.lvf vf8 (&-> v1-71 0 quad)) + (.mul.w.vf acc vf4 vf0 :mask #b111) + (.add.mul.x.vf acc vf1 vf8 acc :mask #b111) + (.add.mul.y.vf acc vf2 vf8 acc :mask #b111) + (.add.mul.z.vf vf8 vf3 vf8 acc :mask #b111) + (.add.x.vf vf6 vf8 vf0) + (b! (zero? sv-64) cfg-44 :delay (.add.x.vf vf7 vf8 vf0)) + (.add.y.vf vf6 vf6 vf17 :mask #b10) + (b! #t cfg-45 :delay (.sub.y.vf vf7 vf7 vf17 :mask #b10)) + (label cfg-44) + (.add.y.vf vf6 vf6 vf17 :mask #b1) + (.sub.y.vf vf7 vf7 vf17 :mask #b1) + (label cfg-45) + (.svf (&-> (the-as (pointer uint128) a1-82) 2) vf6) + (.svf (&-> (the-as (pointer uint128) a0-71) 2) vf7) + (set! a1-82 (&-> (the-as (pointer uint128) a1-82) 6)) + (set! a0-71 (&-> (the-as (pointer uint128) a0-71) 6)) + (.add.x.vf vf9 vf8 vf0) + (set! v1-71 (the-as (inline-array vector) (-> v1-71 1))) + ) + ) + (set! sv-96 s2-0) + (set! sv-112 0) + (while (> sv-96 0) + (if (< 40 sv-96) + (set! sv-128 40) + (set! sv-128 sv-96) + ) + (set! sv-144 (+ sv-128 1)) + (set! sv-160 12) + (let* ((v1-81 arg0) + (a0-73 (the-as object (-> v1-81 base))) + ) + (set! (-> (the-as dma-packet a0-73) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc sv-160)) + (set! (-> (the-as dma-packet a0-73) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet a0-73) vif1) + (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32) :imm (shr (shl (-> arg2 gcf-buf) 54) 54) :num sv-160) + ) + (set! (-> v1-81 base) (the-as pointer (the-as dma-packet (&+ (the-as dma-packet a0-73) 16)))) + ) + (set! sv-176 (the-as gcf-control (-> arg0 base))) + (let* ((v1-84 (-> sv-176 matrix)) + (a3-31 (-> sv-16 perspective)) + (a0-76 (-> a3-31 rvec quad)) + (a1-88 (-> a3-31 uvec quad)) + (a2-58 (-> a3-31 fvec quad)) + (a3-32 (-> a3-31 trans quad)) + ) + (set! (-> v1-84 rvec quad) a0-76) + (set! (-> v1-84 uvec quad) a1-88) + (set! (-> v1-84 fvec quad) a2-58) + (set! (-> v1-84 trans quad) a3-32) + ) + (quad-copy! (the-as pointer (-> sv-176 giftag)) (the-as pointer (-> s1-0 giftag)) 3) + (set! (-> sv-176 giftag num-strips) (the-as uint 1)) + (set! (-> sv-176 num-dps) (the-as uint (* sv-144 2))) + (set! (-> sv-176 kick-offset) (the-as uint 0)) + (when sv-32 + (adgif-shader<-texture-simple! (the-as adgif-shader (-> sv-176 shader)) sv-32) + (adgif-shader-update! (the-as adgif-shader (-> sv-176 shader)) sv-32) + ) + (set! (-> sv-176 shader 0 shader alpha) (new 'static 'gs-miptbp :tbp1 #x48 :tbw2 #x20)) + (set! (-> sv-176 shader 0 shader tex0 tfx) 0) + (set! (-> sv-176 shader 0 pos) (the-as uint 0)) + (set! (-> sv-176 shader 0 num) (the-as uint (+ #x8000 (* sv-144 2)))) + (&+! (-> arg0 base) (* sv-160 16)) + (let* ((v1-104 arg0) + (a0-90 (the-as object (-> v1-104 base))) + ) + (set! (-> (the-as dma-packet a0-90) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc (* 6 sv-144))) + (set! (-> (the-as dma-packet a0-90) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet a0-90) vif1) + (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32) :imm (shr (shl (-> arg2 vtx-buf) 54) 54) :num (* 6 sv-144)) + ) + (set! (-> v1-104 base) (the-as pointer (&+ (the-as dma-packet a0-90) 16))) + ) + (quad-copy! (-> arg0 base) (the-as pointer (-> sv-20 sv-112)) (* 6 sv-144)) + (&+! (-> arg0 base) (* 96 sv-144)) + (let* ((v1-109 arg0) + (a0-95 (the-as object (-> v1-109 base))) + ) + (set! (-> (the-as dma-packet a0-95) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-95) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet a0-95) vif1) (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd mscal) :msk #x1)) + (set! (-> v1-109 base) (the-as pointer (&+ (the-as dma-packet a0-95) 16))) + ) + (set! (-> arg2 gcf-buf) (- 1704 (the-as int (-> arg2 gcf-buf)))) + (+! (-> arg2 vtx-buf) 279) + (if (< (the-as uint 567) (-> arg2 vtx-buf)) + (set! (-> arg2 vtx-buf) (the-as uint 9)) + ) + (set! sv-96 (- sv-96 sv-128)) + (set! sv-112 (+ sv-112 (* sv-128 2))) + sv-112 + ) + (set! sv-64 (+ sv-64 1)) + ) + #f + ) + ) + ) + ) + +(defun-debug lightning-start ((arg0 float) (arg1 float)) + (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 ((t9-2 run-function-in-process) + (a0-3 gp-0) + (a1-3 lightning-tracker-init) + (a2-2 (new 'static 'lightning-spec + :name #f + :flags (lightning-spec-flags lsf1) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + :end-color (new 'static 'rgba :r #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 16 + :box-size 32768.0 + :merge-factor 0.5 + :merge-count 2 + :radius 2048.0 + :duration 18000.0 + :sound #f + ) + ) + (a3-2 0) + (t0-0 #f) + (t1-0 #f) + (t2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> t2-0 x) arg0) + (set! (-> t2-0 y) 0.0) + (set! (-> t2-0 z) arg1) + (set! (-> t2-0 w) 1.0) + (let ((t3-0 (new 'stack-no-clear 'vector))) + (set! (-> t3-0 x) arg0) + (set! (-> t3-0 y) 262144.0) + (set! (-> t3-0 z) arg1) + (set! (-> t3-0 w) 1.0) + ((the-as (function object object object object object object object object none) t9-2) + a0-3 + a1-3 + a2-2 + a3-2 + t0-0 + t1-0 + t2-0 + t3-0 + ) + ) + ) + (-> gp-0 ppointer) + ) + ) + ) + +(define *lightning-globals* (new 'global 'lightning-globals)) + +(define *lightning* #t) + +(defun lightning-draw-all () + (when (and *lightning* (not (get-menu-mode *blit-displays-work*))) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask generic)) + (let ((s5-0 *lightning-engine*)) + (when (> (length s5-0) 0) + (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id generic-sprite-3) + ) + (let ((s3-0 *lightning-globals*)) + (let ((v1-17 s3-0)) + (set! (-> v1-17 gcf-buf) (the-as uint 837)) + (set! (-> v1-17 vtx-buf) (the-as uint 9)) + ) + (let* ((v1-19 (-> s5-0 alive-list next0)) + (s2-0 (-> v1-19 next0)) + ) + (while (!= v1-19 (-> s5-0 alive-list-end)) + (let* ((s1-0 (-> (the-as connection v1-19) param1)) + (s0-0 (-> (the-as dma-buffer s1-0) data-buffer 0)) + ) + (when (not (paused?)) + (case s0-0 + ((1 2) + (lightning-update (the-as lightning-control s1-0)) + ) + ((3) + (lightning-fade (the-as lightning-control s1-0)) + ) + ) + ) + (if (or (= s0-0 2) (= s0-0 3)) + (lightning-draw s4-0 (the-as lightning-control s1-0) s3-0) + ) + ) + (set! v1-19 s2-0) + (set! s2-0 (-> s2-0 next0)) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defun unlink-lightning-spec-by-heap ((arg0 kheap)) + (let* ((v1-0 *lightning-spec-id-table*) + (a2-0 (-> v1-0 length)) + (a1-0 (-> arg0 base)) + (a0-1 (-> arg0 top-base)) + ) + (while (nonzero? a2-0) + (+! a2-0 -1) + (let ((a3-2 (-> v1-0 a2-0))) + (when (and (>= (the-as int a3-2) (the-as int a1-0)) (< (the-as int a3-2) (the-as int a0-1))) + (set! (-> v1-0 a2-0) (the-as lightning-spec 0)) + 0 + ) + ) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/gfx/hw/display-h.gc b/goal_src/jak3/engine/gfx/hw/display-h.gc index c346eaca39..45f1b2ea88 100644 --- a/goal_src/jak3/engine/gfx/hw/display-h.gc +++ b/goal_src/jak3/engine/gfx/hw/display-h.gc @@ -16,15 +16,15 @@ At any point in time, there are 3 frames in progress: this frame also needs a DMA buffer, which is being filled up. |# -(defconstant DEFAULT_ALL_RENDERERS - (vu1-renderer-mask - sky ocean ocean-wave tfrag tie tie-envmap tie-scissor tie-envmap-scissor - tie-vanish generic merc emerc shrubbery shrub-near billboard shrubbery-vanish - tfrag-trans tie-scissor-trans tie-trans tie-envmap-trans tie-envmap-scissor-trans - tfrag-water tie-scissor-water tie-water tie-envmap-water tie-envmap-scissor-water - sprite shadow rn31 rn32 rn33 depth-cue rn36 - ) - ) +; (defconstant DEFAULT_ALL_RENDERERS +; (vu1-renderer-mask +; sky ocean ocean-wave tfrag tie tie-envmap tie-scissor tie-envmap-scissor +; tie-vanish generic merc emerc shrubbery shrub-near billboard shrubbery-vanish +; tfrag-trans tie-scissor-trans tie-trans tie-envmap-trans tie-envmap-scissor-trans +; tfrag-water tie-scissor-water tie-water tie-envmap-water tie-envmap-scissor-water +; sprite shadow rn31 rn32 rn33 depth-cue rn36 +; ) +; ) ;; DECOMP BEGINS @@ -62,8 +62,8 @@ At any point in time, there are 3 frames in progress: ((on-screen int32) (last-screen int32) (frames display-frame 2) - (bgcolor uint64) - (pmode uint64) + (bgcolor gs-bgcolor) + (pmode gs-pmode) (clock clock 22) (session-clock clock :overlay-at (-> clock 0)) (game-clock clock :overlay-at (-> clock 1)) @@ -111,10 +111,80 @@ At any point in time, there are 3 frames in progress: (set-display gp-0) (set! (-> gp-0 frames 0) (new 'global 'display-frame)) (set! (-> gp-0 frames 1) (new 'global 'display-frame)) - (set! (-> gp-0 pmode) (the-as uint 165)) + (set! (-> gp-0 pmode) (new 'static 'gs-pmode :en1 #x1 :crtmd #x1 :mmod #x1 :slbg #x1)) (set! (-> gp-0 run-half-speed) #f) - (set! (-> gp-0 vu1-enable-user-menu) DEFAULT_ALL_RENDERERS) - (set! (-> gp-0 vu1-enable-user) DEFAULT_ALL_RENDERERS) + (set! (-> gp-0 vu1-enable-user-menu) (vu1-renderer-mask + rn3 + rn4 + rn5 + rn6 + rn7 + tfrag + tie-scissor + tie + etie + etie-scissor + tie-vanish + generic + merc + emerc + shrubbery + shrub-near + billboard + shrub-vanish + tfrag-trans + tie-scissor-trans + tie-trans + etie-trans + etie-scissor-trans + tfrag-water + tie-scissor-water + tie-water + etie-water + etie-scissor-water + sprite + rn32 + rn33 + rn34 + rn36 + ) + ) + (set! (-> gp-0 vu1-enable-user) (vu1-renderer-mask + rn3 + rn4 + rn5 + rn6 + rn7 + tfrag + tie-scissor + tie + etie + etie-scissor + tie-vanish + generic + merc + emerc + shrubbery + shrub-near + billboard + shrub-vanish + tfrag-trans + tie-scissor-trans + tie-trans + etie-trans + etie-scissor-trans + tfrag-water + tie-scissor-water + tie-water + etie-water + etie-scissor-water + sprite + rn32 + rn33 + rn34 + rn36 + ) + ) gp-0 ) ) diff --git a/goal_src/jak3/engine/gfx/hw/display.gc b/goal_src/jak3/engine/gfx/hw/display.gc index 3c7346eaa8..65fe94b6dd 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 0669f032e0..b1d698e6b4 100644 --- a/goal_src/jak3/engine/gfx/hw/video-h.gc +++ b/goal_src/jak3/engine/gfx/hw/video-h.gc @@ -7,6 +7,8 @@ (define-extern set-graphics-mode (function none)) (define-extern get-video-mode (function symbol)) +(define-extern get-aspect-ratio (function symbol)) +(define-extern set-progressive-scan (function symbol none)) ;; DECOMP BEGINS diff --git a/goal_src/jak3/engine/gfx/hw/video.gc b/goal_src/jak3/engine/gfx/hw/video.gc index 009dfe3320..d7f67fa336 100644 --- a/goal_src/jak3/engine/gfx/hw/video.gc +++ b/goal_src/jak3/engine/gfx/hw/video.gc @@ -5,5 +5,119 @@ ;; name in dgo: video ;; dgos: GAME +(define-extern *video-mode* int) + ;; DECOMP BEGINS +(defun set-video-mode ((arg0 symbol)) + (case arg0 + (('ntsc) + (set! (-> *setting-control* user-default screenx) 0) + (set! (-> *setting-control* user-default screeny) 8) + (set! (-> *video-params* display-fbp) 164) + (set! (-> *video-params* display-sy) 224) + (set! *video-mode* 0) + (sound-set-fps 60) + ) + (('pal) + (set! (-> *setting-control* user-default screenx) 0) + (set! (-> *setting-control* user-default screeny) 24) + (set! (-> *video-params* display-fbp) 144) + (set! (-> *video-params* display-sy) 256) + (set! *video-mode* 1) + (sound-set-fps 50) + ) + ) + (set-time-ratios *display* (-> *display* dog-ratio)) + (set! (-> *video-params* reset-video-mode) #t) + (set! (-> *math-camera* isometric uvec y) 0.5) + (set! (-> *math-camera* y-clip) 416.0) + (set! (-> *math-camera* y-pix) (* 0.5 (-> *math-camera* y-clip))) + (set! *profile-y* 1848) + (set! (-> *video-params* set-video-mode) #t) + 0 + (none) + ) + +(defun get-video-mode () + (-> *setting-control* user-current video-mode) + ) + +(defun set-aspect-ratio ((arg0 symbol)) + (case arg0 + (('aspect4x3) + (set! (-> *video-params* relative-x-scale) 1.0) + (set! (-> *video-params* relative-x-scale-reciprical) 1.0) + ) + (('aspect16x9) + (set! (-> *video-params* relative-x-scale) 0.75) + (set! (-> *video-params* relative-x-scale-reciprical) 1.3333334) + ) + ) + 0 + (none) + ) + +(defun get-aspect-ratio () + (-> *setting-control* user-current aspect-ratio) + ) + +(defun set-progressive-scan ((arg0 symbol)) + (set! (-> *setting-control* user-default set-video-mode) arg0) + 0 + (none) + ) + +(defun get-progressive-scan () + (-> *setting-control* user-current set-video-mode) + ) + +(defun set-graphics-mode () + (let ((v1-0 *setting-control*) + (gp-0 (the-as gs-bank #x12000000)) + (s5-0 *video-params*) + ) + (let ((s4-0 *display*)) + (cond + ((-> v1-0 user-current set-video-mode) + (when (nonzero? (-> s5-0 smode2)) + (reset-graph 0 0 80 0) + (set! (-> s5-0 smode2) (the-as uint 0)) + 0 + ) + (set! (-> gp-0 display1) (new 'static 'gs-display + :magh #x1 + :dw #x4ff + :dy (+ (-> s5-0 display-dy) 50) + :dx (+ (* (-> s5-0 display-dx) 2) 326) + :dh (+ (* (-> s5-0 display-sy) 2) -1) + ) + ) + ) + (else + (when (or (!= (-> s5-0 smode2) 1) (-> *video-params* set-video-mode)) + (if (= (-> *setting-control* user-current video-mode) 'ntsc) + (reset-graph 0 1 2 0) + (reset-graph 0 1 3 0) + ) + (set! (-> s5-0 smode2) (the-as uint 1)) + (set! (-> s5-0 set-video-mode) #f) + ) + (set! (-> gp-0 display1) (new 'static 'gs-display + :magh #x3 + :dw #x9ff + :dy (+ (-> s5-0 display-dy) 50) + :dx (+ (* (-> s5-0 display-dx) 4) 652) + :dh (+ (* (-> s5-0 display-sy) 2) -1) + ) + ) + ) + ) + (set! (-> gp-0 pmode) (-> s4-0 pmode)) + (set! (-> gp-0 bgcolor) (-> s4-0 bgcolor)) + ) + (set! (-> gp-0 dspfb1) (new 'static 'gs-display-fb :fbw #xa :fbp (-> s5-0 display-fbp))) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/gfx/math-camera.gc b/goal_src/jak3/engine/gfx/math-camera.gc index 9bb9d2f2c7..39ad9f0dcc 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-funcs.gc b/goal_src/jak3/engine/gfx/mood/mood-funcs.gc index 9afac91696..6349200f6e 100644 --- a/goal_src/jak3/engine/gfx/mood/mood-funcs.gc +++ b/goal_src/jak3/engine/gfx/mood/mood-funcs.gc @@ -7,3 +7,522 @@ ;; DECOMP BEGINS +(defbehavior update-mood-default time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (copy-mood-exterior arg0) + 0 + (none) + ) + +(defun update-mood-copy-parent ((arg0 mood-context) (arg1 object) (arg2 int)) + (let* ((v1-3 (-> *level* level arg2)) + (a1-3 (-> v1-3 info memory-mode)) + ) + (when (or (or (= a1-3 (level-memory-mode borrow)) + (= a1-3 (level-memory-mode borrow0)) + (= a1-3 (level-memory-mode borrow1)) + (= a1-3 (level-memory-mode borrow2)) + (= a1-3 (level-memory-mode borrow3)) + (= a1-3 (level-memory-mode borrow4)) + (= a1-3 (level-memory-mode micro)) + (= a1-3 (level-memory-mode borrow-city-small)) + ) + (-> v1-3 borrow-from-level) + ) + (let ((v1-4 (-> v1-3 borrow-from-level))) + (if (and v1-4 (= (-> v1-4 status) 'active)) + (mem-copy! (the-as pointer arg0) (the-as pointer (-> v1-4 mood-context)) 1968) + ) + ) + ) + ) + 0 + (none) + ) + +(defun get-sphere-interp ((arg0 sphere) (arg1 vector) (arg2 float) (arg3 float)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + 0.0 + (set! (-> v1-0 quad) (-> arg0 quad)) + (vector-! v1-0 arg1 v1-0) + (let ((f1-0 (vector-length v1-0))) + (/ (fmax 0.0 (fmin (- f1-0 arg2) arg3)) arg3) + ) + ) + ) + +(deftype ctywide-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + ) + ) + + +(defbehavior update-mood-ctywide 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) + ) + 0 + (none) + ) + +(defbehavior update-mood-copy-ctywide time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (let ((v1-1 (level-get *level* 'ctywide))) + (cond + ((and v1-1 (= (-> v1-1 status) 'active)) + (mem-copy! (the-as pointer arg0) (the-as pointer (-> v1-1 mood-context)) 1968) + ) + (else + (update-mood-ctywide arg0 arg1 arg2) + (if (or (>= arg1 18.0) (>= 6.0 arg1)) + (set! (-> arg0 times 5 w) 1.0) + ) + ) + ) + ) + 0 + (none) + ) + +(deftype ctysluma-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + (spec-0 sp-field-init-spec) + (spec-1 sp-field-init-spec) + (flicker float) + ) + ) + + +;; WARN: Return type mismatch sp-field-init-spec vs float. +(defun init-mood-ctysluma ((arg0 mood-context)) + (let ((gp-0 (-> arg0 state))) + (let ((a0-1 (-> *part-id-table* 2))) + (set! (-> gp-0 4) (the-as uint 0)) + (if (nonzero? a0-1) + (set! (-> gp-0 4) (the-as uint (get-field-spec-by-id a0-1 (sp-field-id spt-a)))) + ) + ) + (let ((a0-2 (-> *part-id-table* 3))) + (set! (-> gp-0 5) (the-as uint 0)) + (the-as float (when (nonzero? a0-2) + (let ((v0-1 (get-field-spec-by-id a0-2 (sp-field-id spt-a)))) + (set! (-> gp-0 5) (the-as uint v0-1)) + v0-1 + ) + ) + ) + ) + ) + ) + +(defbehavior update-mood-ctysluma time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (copy-mood-exterior arg0) + (when (and (!= arg2 -1) + (= (-> *level* level arg2 status) 'active) + (< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9)) + ) + (let ((s5-1 (the-as ctysluma-states (-> arg0 state)))) + (update-mood-flames arg0 6 1 8 1.0 0.000390625 1.5) + (update-mood-light arg0 5 0 1.0 0.0 arg1 0.0 2.0) + (if (nonzero? (-> s5-1 spec-0)) + (set! (-> s5-1 spec-0 initial-valuef) (* 32.0 (-> s5-1 light fade))) + ) + (if (nonzero? (-> s5-1 spec-1)) + (set! (-> s5-1 spec-1 initial-valuef) (* 8.0 (-> s5-1 light fade))) + ) + (set! (-> arg0 times 7 w) (-> s5-1 flicker)) + (if (not (paused?)) + (set! (-> s5-1 flicker) (rand-vu-float-range 0.8 1.0)) + ) + ) + ) + 0 + (none) + ) + +(deftype ctyslumb-states (structure) + ((light light-state :inline) + (spec-0 sp-field-init-spec) + (spec-1 sp-field-init-spec) + (flicker float) + ) + ) + + +;; WARN: Return type mismatch sp-field-init-spec vs uint. +(defun init-mood-ctyslumb ((arg0 mood-context)) + (let ((gp-0 (-> arg0 state))) + (let ((a0-1 (-> *part-id-table* 4))) + (set! (-> gp-0 2) (the-as uint 0)) + (if (nonzero? a0-1) + (set! (-> gp-0 2) (the-as uint (get-field-spec-by-id a0-1 (sp-field-id spt-a)))) + ) + ) + (let ((a0-2 (-> *part-id-table* 5))) + (set! (-> gp-0 3) (the-as uint 0)) + (the-as uint (when (nonzero? a0-2) + (let ((v0-1 (get-field-spec-by-id a0-2 (sp-field-id spt-a)))) + (set! (-> gp-0 3) (the-as uint v0-1)) + v0-1 + ) + ) + ) + ) + ) + ) + +(deftype ctyslumc-states (structure) + ((light light-state :inline) + (spec-0 sp-field-init-spec) + (spec-1 sp-field-init-spec) + (flicker float) + ) + ) + + +;; WARN: Return type mismatch sp-field-init-spec vs none. +(defun init-mood-ctyslumc ((arg0 mood-context)) + (let ((gp-0 (-> arg0 state))) + (let ((a0-1 (-> *part-id-table* 6))) + (set! (-> gp-0 2) (the-as uint 0)) + (if (nonzero? a0-1) + (set! (-> gp-0 2) (the-as uint (get-field-spec-by-id a0-1 (sp-field-id spt-a)))) + ) + ) + (let ((a0-2 (-> *part-id-table* 7))) + (set! (-> gp-0 3) (the-as uint 0)) + (if (nonzero? a0-2) + (set! (-> gp-0 3) (the-as uint (get-field-spec-by-id a0-2 (sp-field-id spt-a)))) + ) + ) + ) + (none) + ) + +(deftype ctygenb-states (structure) + ((light light-state :inline) + (flame flames-state :inline) + (flicker flicker-state :inline) + (spec-0 sp-field-init-spec) + (spec-1 sp-field-init-spec) + (spec-2 sp-field-init-spec) + (spec-3 sp-field-init-spec) + (next-flicker float) + ) + ) + + +;; WARN: Return type mismatch sp-field-init-spec vs object. +(defun init-mood-ctygenb ((arg0 mood-context)) + (let ((gp-0 (-> arg0 state))) + (let ((a0-1 (-> *part-id-table* 8))) + (set! (-> gp-0 5) (the-as uint 0)) + (if (nonzero? a0-1) + (set! (-> gp-0 5) (the-as uint (get-field-spec-by-id a0-1 (sp-field-id spt-a)))) + ) + ) + (let ((a0-2 (-> *part-id-table* 9))) + (set! (-> gp-0 6) (the-as uint 0)) + (if (nonzero? a0-2) + (set! (-> gp-0 6) (the-as uint (get-field-spec-by-id a0-2 (sp-field-id spt-a)))) + ) + ) + (let ((a0-3 (-> *part-id-table* 10))) + (set! (-> gp-0 7) (the-as uint 0)) + (if (nonzero? a0-3) + (set! (-> gp-0 7) (the-as uint (get-field-spec-by-id a0-3 (sp-field-id spt-a)))) + ) + ) + (let ((a0-4 (-> *part-id-table* 11))) + (set! (-> gp-0 8) (the-as uint 0)) + (when (nonzero? a0-4) + (let ((v0-3 (get-field-spec-by-id a0-4 (sp-field-id spt-a)))) + (set! (-> gp-0 8) (the-as uint v0-3)) + v0-3 + ) + ) + ) + ) + ) + +(define *mhcity-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 171.4687 :y 155.0 :z 58.125 :w 128.0) + :fog-dists (new 'static 'vector :y 819200.0 :z 240.0 :w 130.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 171.4687 :y 155.0 :z 58.125 :w 128.0) + :fog-dists (new 'static 'vector :y 819200.0 :z 240.0 :w 130.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 171.4687 :y 155.0 :z 58.125 :w 128.0) + :fog-dists (new 'static 'vector :y 819200.0 :z 240.0 :w 130.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 171.4687 :y 155.0 :z 58.125 :w 128.0) + :fog-dists (new 'static 'vector :y 819200.0 :z 240.0 :w 130.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 171.4687 :y 155.0 :z 58.125 :w 128.0) + :fog-dists (new 'static 'vector :y 819200.0 :z 240.0 :w 130.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 180.0 :y 179.0 :z 40.0 :w 128.0) + :fog-dists (new 'static 'vector :x 40960.0 :y 819200.0 :z 240.0 :w 165.5) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 180.0 :y 159.0 :z 50.0 :w 128.0) + :fog-dists (new 'static 'vector :x 40960.0 :y 819200.0 :z 240.0 :w 175.5) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 180.0 :y 179.0 :z 40.0 :w 128.0) + :fog-dists (new 'static 'vector :x 40960.0 :y 819200.0 :z 230.0 :w 165.5) + :erase-color (new 'static 'vector :w 128.0) + ) + ) + ) + ) + +;; ERROR: function has no type analysis. Cannot decompile. + +(deftype mhcitya-states (structure) + ((pulse pulse-state :inline) + ) + ) + + +;; WARN: Return type mismatch float vs object. +(defun init-mood-mhcitya ((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 + ) + ) + ) + +(deftype mhcityb-states (structure) + ((pulse pulse-state :inline) + ) + ) + + +;; WARN: Return type mismatch float vs object. +(defun init-mood-mhcityb ((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 + ) + ) + ) + +(deftype ctyport-states (structure) + ((light light-state :inline) + (spec-0 sp-field-init-spec) + (neon-min-bright float) + ) + ) + + +(define *ctyport-level* (the-as level-group #f)) + +(deftype ctymarka-states (structure) + ((light light-state :inline) + (blink float) + ) + ) + + +(defbehavior update-mood-ctymarka 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 (-> arg0 state))) + (update-mood-light arg0 5 0 1.0 0.0 arg1 0.0 2.0) + (set! (-> arg0 times 6 w) (the-as float (-> gp-1 2))) + (set! (-> arg0 times 7 w) 0.75) + (when (not (paused?)) + (let ((v1-11 (-> *display* part-clock frame-counter))) + (if (< (* 0.2 (the float (mod v1-11 600))) 60.0) + (set! (-> gp-1 2) (the-as uint 0.0)) + (set! (-> gp-1 2) (the-as uint 1.0)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(deftype mountain-states (structure) + ((light0 light-state :inline) + (light1 light-state :inline) + (spec-0 sp-field-init-spec) + (spec-1 sp-field-init-spec) + (spec-2 sp-field-init-spec) + (spec-3 sp-field-init-spec) + (spec-4 sp-field-init-spec) + (spec-5 sp-field-init-spec) + (spec-6 sp-field-init-spec) + ) + ) + + +;; WARN: Return type mismatch sp-field-init-spec vs uint. +(defun init-mood-mountain ((arg0 mood-context)) + (let ((gp-0 (-> arg0 state))) + (let ((a0-1 (-> *part-id-table* 12))) + (set! (-> gp-0 4) (the-as uint 0)) + (if (nonzero? a0-1) + (set! (-> gp-0 4) (the-as uint (get-field-spec-by-id a0-1 (sp-field-id spt-a)))) + ) + ) + (let ((a0-2 (-> *part-id-table* 13))) + (set! (-> gp-0 5) (the-as uint 0)) + (if (nonzero? a0-2) + (set! (-> gp-0 5) (the-as uint (get-field-spec-by-id a0-2 (sp-field-id spt-a)))) + ) + ) + (let ((a0-3 (-> *part-id-table* 14))) + (set! (-> gp-0 6) (the-as uint 0)) + (if (nonzero? a0-3) + (set! (-> gp-0 6) (the-as uint (get-field-spec-by-id a0-3 (sp-field-id spt-a)))) + ) + ) + (let ((a0-4 (-> *part-id-table* 15))) + (set! (-> gp-0 7) (the-as uint 0)) + (if (nonzero? a0-4) + (set! (-> gp-0 7) (the-as uint (get-field-spec-by-id a0-4 (sp-field-id spt-a)))) + ) + ) + (let ((a0-5 (-> *part-id-table* 16))) + (set! (-> gp-0 8) (the-as uint 0)) + (if (nonzero? a0-5) + (set! (-> gp-0 8) (the-as uint (get-field-spec-by-id a0-5 (sp-field-id spt-a)))) + ) + ) + (let ((a0-6 (-> *part-id-table* 17))) + (set! (-> gp-0 9) (the-as uint 0)) + (if (nonzero? a0-6) + (set! (-> gp-0 9) (the-as uint (get-field-spec-by-id a0-6 (sp-field-id spt-a)))) + ) + ) + (let ((a0-7 (-> *part-id-table* 18))) + (set! (-> gp-0 10) (the-as uint 0)) + (the-as uint (when (nonzero? a0-7) + (let ((v0-6 (get-field-spec-by-id a0-7 (sp-field-id spt-a)))) + (set! (-> gp-0 10) (the-as uint v0-6)) + v0-6 + ) + ) + ) + ) + ) + ) + +(deftype ctyinda-states (structure) + ((light light-state :inline) + ) + ) + + +(defbehavior update-mood-ctyinda 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)) + ) + (set! (-> arg0 times 6 w) 1.0) + (let ((f0-1 0.5)) + (let ((f1-0 1.0)) + (cond + ((or (>= 6.0 arg1) (>= arg1 18.0)) + (set! f0-1 f1-0) + ) + ((and (< 6.0 arg1) (< arg1 7.0)) + (+! f0-1 (* (- f1-0 f0-1) (- 7.0 arg1))) + ) + ((and (< 17.0 arg1) (< arg1 18.0)) + (+! f0-1 (* (- f1-0 f0-1) (+ -17.0 arg1))) + ) + ) + ) + (set! (-> arg0 times 7 w) f0-1) + ) + (-> arg0 state) + (update-mood-light arg0 5 0 1.0 0.0 arg1 0.0 2.0) + ) + 0 + (none) + ) + +(deftype ctyindb-states (structure) + ((light light-state :inline) + (flicker float) + ) + ) + + +(defbehavior update-mood-ctyindb 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 (-> arg0 state))) + (set! (-> arg0 times 6 w) 1.0) + (update-mood-light arg0 5 0 1.0 0.0 arg1 0.0 2.0) + (set! (-> arg0 times 7 w) (the-as float (-> s4-1 2))) + (if (not (paused?)) + (set! (-> s4-1 2) (the-as uint (rand-vu-float-range 0.8 1.0))) + ) + ) + ) + 0 + (none) + ) +(defun set-atoll-explosion! ((arg0 float)) + (let ((v1-1 (level-get *level* 'atoll))) + (when v1-1 + (let ((v1-2 (-> v1-1 mood-context state)) + (f0-0 arg0) + ) + (set! (-> v1-2 2) (the-as uint f0-0)) + f0-0 + ) + ) + ) + ) + +(defbehavior update-mood-atollext time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (copy-mood-exterior-ambi arg0 #t) + (when (and (= (-> *level* level arg2 status) 'active) + (< (the-as uint (-> *time-of-day-context* mode)) (the-as uint 9)) + ) + (set-vector! (-> arg0 times 1) 1.0 1.0 1.0 1.0) + (set! (-> arg0 times 2 w) 0.0) + (set! (-> arg0 times 3 w) 0.0) + (set! (-> arg0 times 4 w) 0.0) + (set! (-> arg0 times 5 w) 0.0) + (set! (-> arg0 times 6 w) 0.0) + (set! (-> arg0 times 7 w) 0.0) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/gfx/mood/mood-h.gc b/goal_src/jak3/engine/gfx/mood/mood-h.gc index d40ba85f58..8e9ff09a5c 100644 --- a/goal_src/jak3/engine/gfx/mood/mood-h.gc +++ b/goal_src/jak3/engine/gfx/mood/mood-h.gc @@ -6,190 +6,283 @@ ;; dgos: GAME (declare-type sky-color-day structure) +(declare-type mood-context structure) (define-extern movie? (function symbol)) +(define-extern clear-mood-context (function mood-context symbol)) + ;; DECOMP BEGINS (deftype mood-channel (structure) - ((data float 24) - (vecs vector4 6 :overlay-at (-> data 0)))) + ((data float 24) + (vecs vector4 6 :inline :overlay-at (-> data 0)) + ) + ) + (deftype mood-channel-group (structure) - ((data mood-channel 4 :inline))) + ((data mood-channel 4 :inline) + ) + ) + (deftype mood-fog (structure) - ((fog-color vector :inline) - (fog-dists vector :inline) - (fog-start meters :overlay-at (-> fog-dists data 0)) - (fog-end meters :overlay-at (-> fog-dists data 1)) - (fog-max float :overlay-at (-> fog-dists data 2)) - (fog-min float :overlay-at (-> fog-dists data 3)) - (erase-color vector :inline))) + ((fog-color vector :inline) + (fog-dists vector :inline) + (fog-start meters :overlay-at (-> fog-dists data 0)) + (fog-end meters :overlay-at (-> fog-dists data 1)) + (fog-max float :overlay-at (-> fog-dists data 2)) + (fog-min float :overlay-at (-> fog-dists data 3)) + (erase-color vector :inline) + ) + ) + (deftype mood-fog-table (structure) - ((data mood-fog 8 :inline))) + ((data mood-fog 8 :inline) + (_data uint128 24 :overlay-at data) + ) + ) + (deftype mood-color (structure) - ((lgt-color vector :inline) - (amb-color vector :inline))) + ((lgt-color vector :inline) + (amb-color vector :inline) + ) + ) + (deftype mood-direction-table (structure) - ((data vector 4 :inline))) + ((data vector 4 :inline) + ) + ) + (deftype mood-color-table (structure) - ((data mood-color 8 :inline))) + ((data mood-color 8 :inline) + (_data uint128 16 :overlay-at data) + ) + ) + (deftype mood-sky-table (structure) - ((data vector 8 :inline))) + ((data vector 8 :inline) + ) + ) + (deftype mood-clouds (structure) - ((cloud-min float) - (cloud-max float))) + ((cloud-min float) + (cloud-max float) + ) + ) + (deftype mood-weather (structure) - ((data float 2) - (cloud float :overlay-at (-> data 0)) - (fog float :overlay-at (-> data 1))) + ((data float 2) + (cloud float :overlay-at (-> data 0)) + (fog float :overlay-at (-> data 1)) + ) :pack-me - :allow-misaligned) + :allow-misaligned + ) + (deftype mood-iweather (structure) - ((data int32 2) - (cloud int32 :overlay-at (-> data 0)) - (fog int32 :overlay-at (-> data 1))) - :allow-misaligned) + ((data int32 2) + (cloud int32 :overlay-at (-> data 0)) + (fog int32 :overlay-at (-> data 1)) + ) + :allow-misaligned + ) + (deftype mood-range (structure) - ((data float 4) - (min-cloud float :overlay-at (-> data 0)) - (max-cloud float :overlay-at (-> data 1)) - (min-fog float :overlay-at (-> data 2)) - (max-fog float :overlay-at (-> data 3)) - (quad uint128 :overlay-at (-> data 0)))) + ((data float 4) + (min-cloud float :overlay-at (-> data 0)) + (max-cloud float :overlay-at (-> data 1)) + (min-fog float :overlay-at (-> data 2)) + (max-fog float :overlay-at (-> data 3)) + (quad uint128 :overlay-at (-> data 0)) + ) + ) + (deftype mood-filters-table (structure) - ((data vector 8 :inline))) + ((data vector 8 :inline) + ) + ) + (deftype mood-table (basic) - ((mood-fog-table mood-fog-table) - (mood-color-table mood-color-table) - (mood-channel-group mood-channel-group) - (mood-direction-table mood-direction-table) - (mood-sky-table mood-sky-table) - (mood-interp-table sky-color-day))) + ((mood-fog-table mood-fog-table) + (mood-color-table mood-color-table) + (mood-channel-group mood-channel-group) + (mood-direction-table mood-direction-table) + (mood-sky-table mood-sky-table) + (mood-interp-table sky-color-day) + ) + ) + (deftype light-state (structure) - ((time float) - (fade float))) + ((time float) + (fade float) + ) + :pack-me + ) + (deftype flicker-state (structure) - ((flicker-off uint8) - (flicker-on uint8))) + ((flicker-off uint8) + (flicker-on uint8) + ) + :allow-misaligned + ) + (deftype florescent-state (structure) - ((value float) - (delay int8) - (delay2 int8))) + ((value float) + (delay int8) + (delay2 int8) + ) + ) + (deftype electricity-state (structure) - ((value float) - (scale float))) + ((value float) + (scale float) + ) + :pack-me + ) + (deftype pulse-state (structure) - ((pulse float) - (brightness float) - (target-brightness float) - (speed float))) + ((pulse float) + (brightness float) + (target-brightness float) + (speed float) + ) + :pack-me + ) + (deftype strobe-state (structure) - ((time float))) + ((time float) + ) + ) + (deftype flames-state (structure) - ((time float) - (index uint8) - (length uint8) - (height uint8))) + ((time float) + (index uint8) + (length uint8) + (height uint8) + ) + :pack-me + ) + (deftype mood-context-core (structure) - ((current-fog mood-fog :inline) - (current-sky-color vector :inline) - (current-env-color vector :inline) - (current-prt-color vector :inline) - (current-shadow-color vector :inline))) + ((current-fog mood-fog :inline) + (current-sky-color vector :inline) + (current-env-color vector :inline) + (current-prt-color vector :inline) + (current-shadow-color vector :inline) + ) + ) + (deftype mood-context-core2 (mood-context-core) - ((light-group light-group 8 :inline))) + ((light-group light-group 8 :inline) + ) + ) + (deftype mood-context-core3 (mood-context-core2) - ((times vector 8 :inline))) + ((times vector 8 :inline) + ) + ) + (deftype mood-context (mood-context-core3) - ((itimes vector4w 4 :inline) - (state uint32 32))) + ((itimes vector4w 4 :inline) + (state uint32 32) + (data uint128 123 :overlay-at (-> current-fog fog-color data 0)) + ) + ) + (deftype mood-control-work (structure) - ((color vector4w :inline) - (weather mood-weather :inline) - (iweather mood-iweather :inline) - (interp mood-weather :inline) - (index int32 4) - (color-interp float) - (color-index int32 2) - (channel-interp float) - (channel-index int32 2) - (cloud-interp float) - (cloud-index int32 2))) + ((color vector4w :inline) + (weather mood-weather :inline) + (iweather mood-iweather :inline) + (interp mood-weather :inline) + (index int32 4) + (color-interp float) + (color-index int32 2) + (channel-interp float) + (channel-index int32 2) + (cloud-interp float) + (cloud-index int32 2) + ) + ) + (deftype mood-control (mood-table) - ((mood-clouds mood-clouds) - (current-interp mood-weather :inline) - (target-interp mood-weather :inline) - (speed-interp mood-weather :inline) - (range mood-range :inline) - (time-until-random mood-weather :inline) - (time-until-random-min mood-weather :inline) - (time-until-random-max mood-weather :inline) - (current-special-interp float) - (target-special-interp float) - (rate-special-interp float) - (display-flag symbol) - (overide-weather-flag symbol) - (pad int32) - (overide mood-weather :inline) - (lightning-index int32) - (lightning-val int32) - (lightning-time int32) - (lightning-time2 float) - (lightning-time3 float) - (lightning-flash float) - (lightning-id sound-id) - (lightning-count0 uint32) - (lightning-count1 uint32) - (lightning-count2 uint32) - (rain-id sound-id) - (sound-pitch float) - (fogs mood-fog-table 9) - (colors mood-color-table 3) - (channels mood-channel-group 3) - (clouds mood-clouds 9)) + ((mood-clouds mood-clouds) + (current-interp mood-weather :inline) + (target-interp mood-weather :inline) + (speed-interp mood-weather :inline) + (range mood-range :inline) + (time-until-random mood-weather :inline) + (time-until-random-min mood-weather :inline) + (time-until-random-max mood-weather :inline) + (current-special-interp float) + (target-special-interp float) + (rate-special-interp float) + (display-flag symbol) + (overide-weather-flag symbol) + (pad int32) + (overide mood-weather :inline) + (lightning-index int32) + (lightning-val int32) + (lightning-time int32) + (lightning-time2 float) + (lightning-time3 float) + (lightning-flash float) + (lightning-id sound-id) + (lightning-count0 uint32) + (lightning-count1 uint32) + (lightning-count2 uint32) + (rain-id sound-id) + (sound-pitch float) + (fogs mood-fog-table 9) + (colors mood-color-table 3) + (channels mood-channel-group 3) + (clouds mood-clouds 9) + ) (:methods - (mood-control-method-9 () none) - (mood-control-method-10 () none) - (mood-control-method-11 () none) - (mood-control-method-12 () none) - (set-special-interps! (_type_ float float symbol) none) - (weather-event-concluded? (_type_) symbol) - (mood-control-method-15 () none) - (mood-control-method-16 () none) - (mood-control-method-17 () none) - (mood-control-method-18 () none) - (mood-control-method-19 () none) - (mood-control-method-20 () none) - (mood-control-method-21 () none) - (mood-control-method-22 () none) - (mood-control-method-23 () none) - (mood-control-method-24 () none))) + (init-weather! (_type_) none) + (set-cloud-and-fog-interp! (_type_ float float float float) none) + (update-mood-range! (_type_ float float float float) none) + (set-time-for-random-weather! (_type_ float float) none) + (set-special-interps! (_type_ float float symbol) none) + (weather-event-concluded? (_type_) symbol) + (set-lightning-time! (_type_ int int float) none) + (apply-mood-clouds-and-fog (_type_ mood-control-work) none) + (apply-mood-fog (_type_ mood-control-work mood-color-table mood-color-table mood-color-table float) none) + (apply-fog-height (_type_ mood-control-work float float float float) none) + (apply-mood-colors (_type_ mood-control-work) none) + (mood-control-method-20 (_type_ mood-control-work mood-color-table mood-color-table mood-color-table float) none) + (apply-mood-channels (_type_ mood-control-work) none) + (adjust-num-clouds (_type_ mood-control-work) none) + (gen-lightning-and-thunder! (_type_ int) none) + (play-or-stop-lightning-sfx! (_type_ sound-spec vector) none) + ) + ) + (defmethod set-special-interps! ((this mood-control) (target-interp float) (rate-interp float) (set-current-interp? symbol)) "Sets the `*-special-interp` values with the given values @@ -201,10 +294,15 @@ (let ((clamped-interp (fmax 0.0 (fmin 1.0 target-interp)))) (set! (-> this target-special-interp) clamped-interp) (set! (-> this rate-special-interp) rate-interp) - (if set-current-interp? (set! (-> this current-special-interp) clamped-interp))) + (if set-current-interp? + (set! (-> this current-special-interp) clamped-interp) + ) + ) 0 - (none)) + (none) + ) (defmethod weather-event-concluded? ((this mood-control)) "@returns [[#t]] if [[this::override-weather-flag]] is set, we aren't in a cutscene and [[this::current-special-interp]] is equal to `0.0`" - (and (-> this overide-weather-flag) (not (movie?)) (= (-> this current-special-interp) 0.0))) + (and (-> this overide-weather-flag) (not (movie?)) (= (-> this current-special-interp) 0.0)) + ) diff --git a/goal_src/jak3/engine/gfx/mood/mood-tables.gc b/goal_src/jak3/engine/gfx/mood/mood-tables.gc index 5dd7cc39e4..bdd6911002 100644 --- a/goal_src/jak3/engine/gfx/mood/mood-tables.gc +++ b/goal_src/jak3/engine/gfx/mood/mood-tables.gc @@ -5,6 +5,10 @@ ;; name in dgo: mood-tables ;; dgos: GAME +(define-extern *debug-mood-color-table* mood-color-table) +(define-extern *debug-mood-fog-table* mood-fog-table) +(define-extern print-mood-tables (function none)) + ;; DECOMP BEGINS (define *no-cloud-haze-mood-fog-table* diff --git a/goal_src/jak3/engine/gfx/mood/mood-tables2.gc b/goal_src/jak3/engine/gfx/mood/mood-tables2.gc index 54a2201e61..e0bbc974e7 100644 --- a/goal_src/jak3/engine/gfx/mood/mood-tables2.gc +++ b/goal_src/jak3/engine/gfx/mood/mood-tables2.gc @@ -7,3 +7,439 @@ ;; DECOMP BEGINS +;; this file is debug only +(declare-file (debug)) + +(define *overide-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.375 :y 1.157) + :amb-color (new 'static 'vector :x 0.625 :y 0.553 :z 0.725 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.473 :y 1.337 :z 1.0) + :amb-color (new 'static 'vector :x 0.527 :y 0.652 :z 0.75 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.473 :y 1.348 :z 1.15) + :amb-color (new 'static 'vector :x 0.527 :y 0.652 :z 0.75 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.473 :y 1.337 :z 1.0) + :amb-color (new 'static 'vector :x 0.527 :y 0.652 :z 0.75 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 1.5 :y 1.148) + :amb-color (new 'static 'vector :x 0.5 :y 0.562 :z 0.75 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 0.05 :y 0.149 :z 0.375) + :amb-color (new 'static 'vector :x 0.35 :y 0.451 :z 0.625 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 0.1 :y 0.35 :z 0.5) + :amb-color (new 'static 'vector :x 0.3 :y 0.35 :z 0.5 :w 1.0) + ) + (new 'static 'mood-color + :lgt-color (new 'static 'vector :x 0.1 :y 0.575 :z 0.4) + :amb-color (new 'static 'vector :x 0.3 :y 0.425 :z 0.5 :w 1.0) + ) + ) + ) + ) + +(define *overide-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 160.0 :y 150.0 :z 200.0 :w 128.0) + :fog-dists (new 'static 'vector :x 262144.0 :y 3690496.0 :z 255.0 :w 64.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 150.0 :y 165.0 :z 220.0 :w 128.0) + :fog-dists (new 'static 'vector :x 262144.0 :y 3690496.0 :z 255.0 :w 64.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 128.0 :y 180.0 :z 243.0 :w 128.0) + :fog-dists (new 'static 'vector :x 262144.0 :y 3690496.0 :z 255.0 :w 64.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 150.0 :y 165.0 :z 220.0 :w 128.0) + :fog-dists (new 'static 'vector :x 262144.0 :y 3690496.0 :z 255.0 :w 64.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 160.0 :y 150.0 :z 200.0 :w 128.0) + :fog-dists (new 'static 'vector :x 262144.0 :y 3690496.0 :z 255.0 :w 64.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :x 16.0 :y 32.0 :z 100.0 :w 128.0) + :fog-dists (new 'static 'vector :x 262144.0 :y 3690496.0 :z 255.0 :w 64.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :y 24.0 :z 64.0 :w 128.0) + :fog-dists (new 'static 'vector :x 262144.0 :y 3690496.0 :z 255.0 :w 64.0) + :erase-color (new 'static 'vector :w 128.0) + ) + (new 'static 'mood-fog + :fog-color (new 'static 'vector :y 56.0 :z 72.0 :w 128.0) + :fog-dists (new 'static 'vector :x 262144.0 :y 3690496.0 :z 255.0 :w 64.0) + :erase-color (new 'static 'vector :w 128.0) + ) + ) + ) + ) + +;; WARN: Return type mismatch pointer vs none. +(defun init-overide-table ((table mood-table)) + "Similar to the beginning of [[init-mood-control]], does the bare minimum to setup the given [[mood-table]] + @param! table The table to initialize + @returns [[none]]" + (set! (-> table mood-fog-table) (new 'debug 'mood-fog-table)) + (set! (-> table mood-color-table) (new 'debug 'mood-color-table)) + (set! (-> table mood-channel-group) *no-cloud-mood-channel-group*) + (set! (-> table mood-direction-table) *mood-direction-table*) + (set! (-> table mood-sky-table) *mood-sky-table*) + (set! (-> table mood-interp-table) *mood-interp-table*) + (mem-copy! (the-as pointer (-> table mood-fog-table)) (the-as pointer *no-cloud-clear-mood-fog-table*) 384) + (mem-copy! (the-as pointer (-> table mood-color-table)) (the-as pointer *no-cloud-mood-color-table*) 256) + (none) + ) + +(define *overide-table* (new 'static 'mood-table)) + +(init-overide-table *overide-table*) + +;; WARN: Return type mismatch object vs none. +(defun print-mood-tables () + "Generates the GOAL code for defining the current state of [[*overide-table*]]" + (mem-copy! (the-as pointer (-> *overide-table* mood-fog-table)) (the-as pointer *overide-mood-fog-table*) 384) + (mem-copy! + (the-as pointer (-> *overide-table* mood-color-table)) + (the-as pointer *overide-mood-color-table*) + 256 + ) + (dotimes (data-idx 8) + (vector-float*! + (the-as vector (-> *overide-table* mood-fog-table data data-idx)) + (the-as vector (-> *overide-table* mood-fog-table data data-idx)) + (-> *overide-table* mood-fog-table data data-idx fog-color w) + ) + (vector-float*! + (the-as vector (-> *overide-table* mood-color-table data data-idx)) + (the-as vector (-> *overide-table* mood-color-table data data-idx)) + (-> *overide-table* mood-color-table data data-idx lgt-color w) + ) + (vector-float*! + (the-as vector (+ (the-as uint (-> *overide-table* mood-color-table data 0 amb-color)) (* data-idx 32))) + (the-as vector (+ (the-as uint (-> *overide-table* mood-color-table data 0 amb-color)) (* data-idx 32))) + (-> *overide-table* mood-color-table data data-idx amb-color w) + ) + (set! (-> *overide-table* mood-fog-table data data-idx fog-color w) 128.0) + (set! (-> *overide-table* mood-color-table data data-idx lgt-color w) 0.0) + (set! (-> *overide-table* mood-color-table data data-idx amb-color w) 1.0) + ) + (format 0 "(define *overide-mood-color-table*~%") + (format 0 " (new 'static 'mood-color-table~%") + (format 0 " :data (new 'static 'inline-array 'mood-color 0~%") + (dotimes (_color-idx 8) + (format 0 " (new 'static 'mood-color") + (let ((color-idx _color-idx)) + (cond + ((zero? color-idx) + (format 0 " ; sun rise~%") + ) + ((= color-idx 1) + (format 0 " ; morning~%") + ) + ((= color-idx 2) + (format 0 " ; noon~%") + ) + ((= color-idx 3) + (format 0 " ; afternoon~%") + ) + ((= color-idx 4) + (format 0 " ; sunset~%") + ) + ((= color-idx 5) + (format 0 " ; twilight~%") + ) + ((= color-idx 6) + (format 0 " ; evening~%") + ) + ((= color-idx 7) + (format 0 " ; green sun~%") + ) + ) + ) + (format + 0 + " :lgt-color (new 'static 'vector :x ~f :y ~f :z ~f :w ~f)~%" + (-> *overide-table* mood-color-table data _color-idx lgt-color x) + (-> *overide-table* mood-color-table data _color-idx lgt-color y) + (-> *overide-table* mood-color-table data _color-idx lgt-color z) + (-> *overide-table* mood-color-table data _color-idx lgt-color w) + ) + (format + 0 + " :amb-color (new 'static 'vector :x ~f :y ~f :z ~f :w ~f)~%" + (-> *overide-table* mood-color-table data _color-idx amb-color x) + (-> *overide-table* mood-color-table data _color-idx amb-color y) + (-> *overide-table* mood-color-table data _color-idx amb-color z) + (-> *overide-table* mood-color-table data _color-idx amb-color w) + ) + (format 0 " )~%") + ) + (format 0 " )~%") + (format 0 " )~%") + (format 0 " )~%") + (format 0 "(define *overide-mood-fog-table*~%") + (format 0 " (new 'static 'mood-fog-table~%") + (format 0 " :data (new 'static 'inline-array 'mood-fog 0~%") + (dotimes (_fog-idx 8) + (format 0 " (new 'static 'mood-fog") + (let ((fog-idx _fog-idx)) + (cond + ((zero? fog-idx) + (format 0 " ; sun rise~%") + ) + ((= fog-idx 1) + (format 0 " ; morning~%") + ) + ((= fog-idx 2) + (format 0 " ; noon~%") + ) + ((= fog-idx 3) + (format 0 " ; afternoon~%") + ) + ((= fog-idx 4) + (format 0 " ; sunset~%") + ) + ((= fog-idx 5) + (format 0 " ; twilight~%") + ) + ((= fog-idx 6) + (format 0 " ; evening~%") + ) + ((= fog-idx 7) + (format 0 " ; green sun~%") + ) + ) + ) + (format + 0 + " :fog-color (new 'static 'vector :x ~f :y ~f :z ~f :w ~f)~%" + (-> *overide-table* mood-fog-table data _fog-idx fog-color x) + (-> *overide-table* mood-fog-table data _fog-idx fog-color y) + (-> *overide-table* mood-fog-table data _fog-idx fog-color z) + (-> *overide-table* mood-fog-table data _fog-idx fog-color w) + ) + (format + 0 + " :fog-start (meters ~f) :fog-end (meters ~f) :fog-min ~f :fog-max ~f ~%" + (-> *overide-table* mood-fog-table data _fog-idx fog-dists x) + (-> *overide-table* mood-fog-table data _fog-idx fog-dists y) + (-> *overide-table* mood-fog-table data _fog-idx fog-dists w) + (-> *overide-table* mood-fog-table data _fog-idx fog-dists z) + ) + (format 0 " :erase-color (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 128.0)~%") + (format 0 " )~%") + ) + (format 0 " )~%") + (format 0 " )~%") + (format 0 " )~%") + (format 0 "(define *overide-table* (new 'static 'mood-table))~%") + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defun desaturate-mood-colors ((arg0 float) (arg1 float) (arg2 float)) + "Unused - Generate GOAL code for a new [[*overide-mood-color-table*]] definition that desaturates the color + Apply said overrides to the [[*overide-table*]]" + (mem-copy! + (the-as pointer (-> *overide-table* mood-color-table)) + (the-as pointer *no-cloud-mood-color-table*) + 256 + ) + (dotimes (data-idx 8) + (let ((color-data (-> *overide-table* mood-color-table data data-idx)) + (mood-colors + (the-as + (inline-array mood-color) + (-> (the-as (inline-array mood-color) (-> *overide-table* mood-color-table data 0 amb-color)) data-idx) + ) + ) + ) + (let ((max-light-color + (fmax (fmax (-> color-data lgt-color x) (-> color-data lgt-color y)) (-> color-data lgt-color z)) + ) + (max-0th-light-color + (fmax (fmax (-> mood-colors 0 lgt-color x) (-> mood-colors 0 lgt-color y)) (-> mood-colors 0 lgt-color z)) + ) + ) + (set! (-> color-data lgt-color x) + (* (+ (-> color-data lgt-color x) (* (- max-light-color (-> color-data lgt-color x)) arg0)) arg1) + ) + (set! (-> color-data lgt-color y) + (* (+ (-> color-data lgt-color y) (* (- max-light-color (-> color-data lgt-color y)) arg0)) arg1) + ) + (set! (-> color-data lgt-color z) + (* (+ (-> color-data lgt-color z) (* (- max-light-color (-> color-data lgt-color z)) arg0)) arg1) + ) + (set! (-> color-data lgt-color w) 0.0) + (set! (-> mood-colors 0 lgt-color x) + (* (+ (-> mood-colors 0 lgt-color x) (* (- max-0th-light-color (-> mood-colors 0 lgt-color x)) arg0)) arg2) + ) + (set! (-> mood-colors 0 lgt-color y) + (* (+ (-> mood-colors 0 lgt-color y) (* (- max-0th-light-color (-> mood-colors 0 lgt-color x)) arg0)) arg2) + ) + (set! (-> mood-colors 0 lgt-color z) + (* (+ (-> mood-colors 0 lgt-color z) (* (- max-0th-light-color (-> mood-colors 0 lgt-color x)) arg0)) arg2) + ) + ) + (set! (-> mood-colors 0 lgt-color w) 1.0) + ) + ) + (format 0 "(define *overide-mood-color-table*~%") + (format 0 " (new 'static 'mood-color-table~%") + (format 0 " :data (new 'static 'inline-array 'mood-color 0~%") + (dotimes (_color-idx 8) + (format 0 " (new 'static 'mood-color") + (let ((color-idx _color-idx)) + (cond + ((zero? color-idx) + (format 0 " ; sun rise~%") + ) + ((= color-idx 1) + (format 0 " ; morning~%") + ) + ((= color-idx 2) + (format 0 " ; noon~%") + ) + ((= color-idx 3) + (format 0 " ; afternoon~%") + ) + ((= color-idx 4) + (format 0 " ; sunset~%") + ) + ((= color-idx 5) + (format 0 " ; twilight~%") + ) + ((= color-idx 6) + (format 0 " ; evening~%") + ) + ((= color-idx 7) + (format 0 " ; green sun~%") + ) + ) + ) + (format + 0 + " :lgt-color (new 'static 'vector :x ~f :y ~f :z ~f :w ~f)~%" + (-> *overide-table* mood-color-table data _color-idx lgt-color x) + (-> *overide-table* mood-color-table data _color-idx lgt-color y) + (-> *overide-table* mood-color-table data _color-idx lgt-color z) + (-> *overide-table* mood-color-table data _color-idx lgt-color w) + ) + (format + 0 + " :amb-color (new 'static 'vector :x ~f :y ~f :z ~f :w ~f)~%" + (-> *overide-table* mood-color-table data _color-idx amb-color x) + (-> *overide-table* mood-color-table data _color-idx amb-color y) + (-> *overide-table* mood-color-table data _color-idx amb-color z) + (-> *overide-table* mood-color-table data _color-idx amb-color w) + ) + (format 0 " )~%") + ) + (format 0 " )~%") + (format 0 " )~%") + (format 0 " )~%") + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defun desaturate-mood-fog ((arg0 (pointer mood-fog-table)) (arg1 float) (arg2 float)) + "Unused - Generate GOAL code for a new [[*overide-mood-fog-table*]] definition that desaturates the fog color + Apply said overrides to the [[*overide-table*]]" + (mem-copy! (the-as pointer (-> *overide-table* mood-fog-table)) arg0 384) + (dotimes (data-idx 8) + (let ((fog-data (-> *overide-table* mood-fog-table data data-idx))) + (let ((max-fog-val (fmax (fmax (-> fog-data fog-color x) (-> fog-data fog-color y)) (-> fog-data fog-color z)))) + (set! (-> fog-data fog-color x) + (* (+ (-> fog-data fog-color x) (* (- max-fog-val (-> fog-data fog-color x)) arg1)) arg2) + ) + (set! (-> fog-data fog-color y) + (* (+ (-> fog-data fog-color y) (* (- max-fog-val (-> fog-data fog-color y)) arg1)) arg2) + ) + (set! (-> fog-data fog-color z) + (* (+ (-> fog-data fog-color z) (* (- max-fog-val (-> fog-data fog-color z)) arg1)) arg2) + ) + ) + (set! (-> fog-data fog-color w) 1.0) + ) + ) + (format 0 "(define *overide-mood-fog-table*~%") + (format 0 " (new 'static 'mood-fog-table~%") + (format 0 " :data (new 'static 'inline-array 'mood-fog 0~%") + (dotimes (_fog-idx 8) + (format 0 " (new 'static 'mood-fog") + (let ((fog-idx _fog-idx)) + (cond + ((zero? fog-idx) + (format 0 " ; sun rise~%") + ) + ((= fog-idx 1) + (format 0 " ; morning~%") + ) + ((= fog-idx 2) + (format 0 " ; noon~%") + ) + ((= fog-idx 3) + (format 0 " ; afternoon~%") + ) + ((= fog-idx 4) + (format 0 " ; sunset~%") + ) + ((= fog-idx 5) + (format 0 " ; twilight~%") + ) + ((= fog-idx 6) + (format 0 " ; evening~%") + ) + ((= fog-idx 7) + (format 0 " ; green sun~%") + ) + ) + ) + (format + 0 + " :fog-color (new 'static 'vector :x ~f :y ~f :z ~f :w ~f)~%" + (-> *overide-table* mood-fog-table data _fog-idx fog-color x) + (-> *overide-table* mood-fog-table data _fog-idx fog-color y) + (-> *overide-table* mood-fog-table data _fog-idx fog-color z) + (-> *overide-table* mood-fog-table data _fog-idx fog-color w) + ) + (format + 0 + " :fog-start (meters ~f) :fog-end (meters ~f) :fog-min ~f :fog-max ~f ~%" + (* 0.00024414062 (-> *overide-table* mood-fog-table data _fog-idx fog-dists x)) + (* 0.00024414062 (-> *overide-table* mood-fog-table data _fog-idx fog-dists y)) + (-> *overide-table* mood-fog-table data _fog-idx fog-dists w) + (-> *overide-table* mood-fog-table data _fog-idx fog-dists z) + ) + (format 0 " :erase-color (new 'static 'vector :x 0.0 :y 0.0 :z 0.0 :w 128.0)~%") + (format 0 " )~%") + ) + (format 0 " )~%") + (format 0 " )~%") + (format 0 " )~%") + (none) + ) + +(define *debug-mood-color-table* (-> *mood-control* mood-color-table)) + +(define *debug-mood-fog-table* (-> *mood-control* mood-fog-table)) diff --git a/goal_src/jak3/engine/gfx/mood/mood.gc b/goal_src/jak3/engine/gfx/mood/mood.gc index 75a39a24ac..8068f4d4d2 100644 --- a/goal_src/jak3/engine/gfx/mood/mood.gc +++ b/goal_src/jak3/engine/gfx/mood/mood.gc @@ -8,3 +8,1619 @@ ;; DECOMP BEGINS +(defun palette-select-special ((arg0 mood-context-core3)) + (dotimes (v1-0 8) + (cond + ((logtest? (-> *time-of-day-context* mode) (ash 16 v1-0)) + (if (-> *time-of-day-context* overide-enable) + (set! (-> arg0 times v1-0 quad) (-> *time-of-day-context* times v1-0 quad)) + (set! (-> arg0 times v1-0 w) 1.0) + ) + ) + (else + (set! (-> arg0 times v1-0 w) 0.0) + ) + ) + ) + #f + ) + +(defun clear-mood-times ((mood-ctx mood-context)) + (dotimes (idx 8) + (set! (-> mood-ctx times idx w) 0.0) + ) + #f + ) + +(defun update-mood-itimes ((arg0 mood-context)) + (local-vars + (v1-0 uint128) + (v1-1 uint128) + (v1-2 uint128) + (v1-3 uint128) + (a1-0 uint128) + (a1-1 uint128) + (a1-2 uint128) + (a1-3 uint128) + (a2-0 uint128) + (a2-1 uint128) + (a3-0 uint128) + (a3-1 uint128) + (t0-0 uint128) + (t0-1 uint128) + (t1-0 uint128) + (t1-1 uint128) + (t2-0 uint128) + (t2-1 uint128) + (t3-0 uint128) + (t3-1 uint128) + ) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + (vf8 :class vf) + ) + (nop!) + (nop!) + (.lvf vf1 (&-> arg0 times 0 quad)) + (nop!) + (.lvf vf2 (&-> arg0 times 1 quad)) + (.mul.w.vf vf1 vf1 vf1 :mask #b111) + (.lvf vf3 (&-> arg0 times 2 quad)) + (.mul.w.vf vf2 vf2 vf2 :mask #b111) + (.lvf vf4 (&-> arg0 times 3 quad)) + (.mul.w.vf vf3 vf3 vf3 :mask #b111) + (.lvf vf5 (&-> arg0 times 4 quad)) + (.mul.w.vf vf4 vf4 vf4 :mask #b111) + (.lvf vf6 (&-> arg0 times 5 quad)) + (.mul.w.vf vf5 vf5 vf5 :mask #b111) + (.lvf vf7 (&-> arg0 times 6 quad)) + (.mul.w.vf vf6 vf6 vf6 :mask #b111) + (.lvf vf8 (&-> arg0 times 7 quad)) + (.mul.w.vf vf7 vf7 vf7 :mask #b111) + (nop!) + (.mul.w.vf vf8 vf8 vf8 :mask #b111) + (nop!) + (vftoi12.xyzw vf1 vf1) + (nop!) + (vftoi12.xyzw vf2 vf2) + (nop!) + (vftoi12.xyzw vf3 vf3) + (nop!) + (vftoi12.xyzw vf4 vf4) + (nop!) + (vftoi12.xyzw vf5 vf5) + (nop!) + (vftoi12.xyzw vf6 vf6) + (nop!) + (vftoi12.xyzw vf7 vf7) + (nop!) + (vftoi12.xyzw vf8 vf8) + (nop!) + (.mov v1-0 vf1) + (nop!) + (.mov a1-0 vf2) + (nop!) + (.mov a2-0 vf3) + (.pw.sra v1-1 v1-0 6) + (.mov a3-0 vf4) + (.pw.sra a1-1 a1-0 6) + (.mov t0-0 vf5) + (.pw.sra a2-1 a2-0 6) + (.mov t1-0 vf6) + (.pw.sra a3-1 a3-0 6) + (.mov t2-0 vf7) + (.pw.sra t0-1 t0-0 6) + (.mov t3-0 vf8) + (.pw.sra t1-1 t1-0 6) + (.pw.sra t2-1 t2-0 6) + (nop!) + (.pw.sra t3-1 t3-0 6) + (nop!) + (.ppach v1-2 a1-1 v1-1) + (nop!) + (.ppach a1-2 a3-1 a2-1) + (set! (-> arg0 itimes 0 quad) v1-2) + (.ppach v1-3 t1-1 t0-1) + (set! (-> arg0 itimes 1 quad) a1-2) + (.ppach a1-3 t3-1 t2-1) + (set! (-> arg0 itimes 2 quad) v1-3) + (nop!) + (set! (-> arg0 itimes 3 quad) a1-3) + 0 + (none) + ) + ) + +(defun update-mood-direction ((arg0 mood-context-core3) (arg1 mood-table) (arg2 float)) + (local-vars (sv-16 light-group)) + (let* ((v1-0 (-> arg1 mood-channel-group)) + (a2-1 (-> arg1 mood-direction-table)) + (a3-0 (the int arg2)) + (t0-1 (mod (+ a3-0 1) 24)) + (f0-3 (- arg2 (the float a3-0))) + (f1-3 (- 1.0 f0-3)) + (t1-0 0) + (a1-3 (-> arg0 light-group)) + ) + (set! sv-16 (-> arg0 light-group 1)) + (set! (-> a1-3 0 ambi extra x) 1.0) + (set! (-> a1-3 0 dir0 extra x) 0.0) + (set! (-> a1-3 0 dir1 extra x) 0.0) + (set! (-> a1-3 0 dir2 extra x) 0.0) + (dotimes (t2-2 4) + (let ((f2-6 (+ (* f1-3 (-> (the-as (pointer float) (+ (+ (* a3-0 4) (* 96 t2-2)) (the-as int v1-0))))) + (* f0-3 (-> (the-as (pointer float) (+ (+ (* t0-1 4) (* 96 t2-2)) (the-as int v1-0))))) + ) + ) + ) + (when (!= f2-6 0.0) + (set! (-> a1-3 0 lights t1-0 extra x) f2-6) + (set! (-> a1-3 0 lights t1-0 mask) (the-as uint (ash 2 t2-2))) + (set! (-> a1-3 0 lights t1-0 palette-index) (+ t2-2 1)) + (set! (-> a1-3 0 lights t1-0 direction quad) (-> a2-1 data t2-2 quad)) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> a1-3 0 dir0 color)) (* 48 t1-0)))) + (-> arg0 times (+ t2-2 1) quad) + ) + (set! (-> arg0 times (+ t2-2 1) w) f2-6) + (+! t1-0 1) + ) + ) + ) + (set! (-> a1-3 0 ambi mask) (the-as uint 1)) + (set! (-> a1-3 0 ambi palette-index) 0) + (mem-copy! (the-as pointer sv-16) (the-as pointer a1-3) 192) + ) + (let ((f0-4 1.0)) + (let ((f1-4 1.1)) + (cond + ((or (>= 6.0 arg2) (>= arg2 18.0)) + (set! f0-4 f1-4) + ) + ((and (< 6.0 arg2) (< arg2 7.0)) + (+! f0-4 (* (- f1-4 f0-4) (- 7.0 arg2))) + ) + ((and (< 17.0 arg2) (< arg2 18.0)) + (+! f0-4 (* (- f1-4 f0-4) (+ -17.0 arg2))) + ) + ) + ) + (set! (-> sv-16 dir0 extra x) (* (-> sv-16 dir0 extra x) f0-4)) + (set! (-> sv-16 dir1 extra x) (* (-> sv-16 dir1 extra x) f0-4)) + (set! (-> sv-16 dir2 extra x) (* (-> sv-16 dir2 extra x) f0-4)) + ) + ) + +(defun update-mood-exterior ((arg0 mood-context-core3) (arg1 mood-table) (arg2 float) (arg3 int)) + (local-vars (v0-1 object) (sv-32 mood-color) (sv-48 mood-color) (sv-64 vector)) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + 0 + 0 + 0.0 + (let* ((v1-3 (the int arg2)) + (f0-4 (- arg2 (the float v1-3))) + (f1-3 (- 1.0 f0-4)) + (a0-6 (/ v1-3 24)) + (v1-7 (-> arg1 mood-interp-table hour (- v1-3 (* 24 a0-6)))) + (s3-0 (-> v1-7 snapshot1)) + (s2-0 (-> v1-7 snapshot2)) + (f30-0 (+ (* f1-3 (-> v1-7 morph-start)) (* f0-4 (-> v1-7 morph-end)))) + ) + (set! v0-1 + (cond + ((and (-> *level* level arg3 bsp) + (nonzero? (-> *level* level arg3 bsp)) + (not (-> *level* level arg3 bsp ambients)) + ) + (set! v0-1 (-> arg0 times)) + (set! (-> (the-as (inline-array vector) v0-1) 0 x) 1.0) + (set! (-> (the-as (inline-array vector) v0-1) 0 y) 1.0) + (set! (-> (the-as (inline-array vector) v0-1) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v0-1) 0 w) 1.0) + v0-1 + ) + ((= s3-0 s2-0) + (let ((a2-1 (-> arg1 mood-color-table data s3-0)) + (v1-26 (-> arg0 times)) + (a1-2 (-> arg0 times 1)) + (a0-16 (-> arg0 light-group)) + ) + (set! (-> v1-26 0 quad) (-> a2-1 amb-color quad)) + (set! (-> a1-2 quad) (-> a2-1 lgt-color quad)) + (set! (-> arg0 times 2 quad) (-> a1-2 quad)) + (set! (-> arg0 times 3 quad) (-> a1-2 quad)) + (set! (-> arg0 times 4 quad) (-> a1-2 quad)) + (set! (-> a0-16 0 ambi color quad) (-> v1-26 0 quad)) + ) + (set! (-> arg0 current-sky-color quad) (-> arg1 mood-sky-table data s3-0 quad)) + (mem-copy! (the-as pointer (-> arg0 current-fog)) (the-as pointer (-> arg1 mood-fog-table data s3-0)) 48) + ) + (else + (set! sv-32 (-> arg1 mood-color-table data s3-0)) + (set! sv-48 (-> arg1 mood-color-table data s2-0)) + (let ((s1-0 (-> arg0 times))) + (set! sv-64 (-> arg0 times 1)) + (let ((s0-0 (-> arg0 light-group))) + (vector4-lerp! (the-as vector s1-0) (-> sv-32 amb-color) (-> sv-48 amb-color) f30-0) + (vector4-lerp! sv-64 (-> sv-32 lgt-color) (-> sv-48 lgt-color) f30-0) + (set! (-> arg0 times 2 quad) (-> sv-64 quad)) + (set! (-> arg0 times 3 quad) (-> sv-64 quad)) + (set! (-> arg0 times 4 quad) (-> sv-64 quad)) + (set! (-> s0-0 0 ambi color quad) (-> s1-0 0 quad)) + ) + ) + (vector4-lerp! + (-> arg0 current-sky-color) + (-> arg1 mood-sky-table data s3-0) + (-> arg1 mood-sky-table data s2-0) + f30-0 + ) + (vector4-array-lerp! + (the-as (inline-array vector4) (-> arg0 current-fog)) + (the-as (inline-array vector4) (-> arg1 mood-fog-table data s3-0)) + (the-as (inline-array vector4) (-> arg1 mood-fog-table data s2-0)) + f30-0 + 3 + ) + ) + ) + ) + ) + (set-vector! (-> arg0 current-prt-color) 0.0 0.0 0.0 0.0) + (set-vector! (-> arg0 current-env-color) 0.0 0.0 0.0 0.0) + (let ((f0-18 (-> *mood-control* lightning-flash)) + (a0-36 (-> *mood-control* lightning-index)) + ) + (when (and (!= f0-18 0.0) (< a0-36 4)) + (let ((v1-64 (new 'stack-no-clear 'vector)) + (a0-40 (-> arg0 times (+ a0-36 1))) + ) + (set-vector! v1-64 f0-18 f0-18 f0-18 0.0) + (vector+! a0-40 a0-40 v1-64) + ) + ) + ) + (update-mood-direction arg0 arg1 arg2) + ) + ) + ) + +(defun copy-mood-exterior ((arg0 mood-context)) + (set! (-> *time-of-day-context* exterior-level) (the-as basic #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)) + (a1-4 (the-as structure (-> *level* level-default mood-context))) + ) + (dotimes (a2-1 31) + (set! (-> (the-as (inline-array vector) v1-2) 0 quad) + (-> (the-as mood-context a1-4) current-fog fog-color quad) + ) + (set! v1-2 (-> (the-as (inline-array vector) v1-2) 1)) + (set! a1-4 (-> (the-as mood-context a1-4) current-fog fog-dists)) + ) + ) + (let ((v1-5 (the-as object (-> arg0 times))) + (a0-2 (the-as object (-> *level* level-default mood-context times))) + ) + (dotimes (a1-6 5) + (set! (-> (the-as (inline-array vector) v1-5) 0 quad) (-> (the-as (inline-array vector) a0-2) 0 quad)) + (set! v1-5 (-> (the-as (inline-array vector) v1-5) 1)) + (set! a0-2 (-> (the-as (inline-array vector) a0-2) 1)) + ) + ) + #f + ) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defun copy-mood-exterior-ambi ((arg0 mood-context) (arg1 symbol)) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (let ((v1-1 (the-as structure arg0)) + (a2-3 (the-as structure (-> *level* level-default mood-context))) + ) + (dotimes (a3-1 31) + (set! (-> (the-as mood-context v1-1) current-fog fog-color quad) + (-> (the-as mood-context a2-3) current-fog fog-color quad) + ) + (set! v1-1 (-> (the-as mood-context v1-1) current-fog fog-dists)) + (set! a2-3 (-> (the-as mood-context a2-3) current-fog fog-dists)) + ) + ) + (set! (-> arg0 times 0 quad) (-> *level* level-default mood-context times 0 quad)) + (vector+! + (the-as vector (-> arg0 times)) + (the-as vector (-> arg0 times)) + (-> *level* level-default mood-context times 1) + ) + (when arg1 + (set! (-> arg0 times 1 quad) (-> *level* level-default mood-context times 1 quad)) + (set! (-> arg0 times 1 w) 1.0) + ) + ) + ) + (none) + ) + +(defun clear-mood-context ((arg0 mood-context)) + (let ((v1-0 arg0)) + (dotimes (a1-0 123) + (set! (-> v1-0 data a1-0) (the-as uint128 0)) + ) + ) + (dotimes (v1-3 8) + (set-vector! (-> arg0 times v1-3) 1.0 1.0 1.0 0.0) + ) + #f + ) + +(defun update-mood-interior ((arg0 mood-context) (arg1 symbol)) + (let ((v1-0 (-> arg0 light-group))) + (cond + (arg1 + (set! (-> arg0 current-fog fog-color quad) (-> *level* level-default mood-context current-fog fog-color quad)) + (set-vector! (-> arg0 current-fog fog-dists) 98304.0 3072000.0 255.0 150.0) + (set-vector! (-> arg0 current-fog erase-color) 0.0 0.0 0.0 128.0) + ) + (else + (let ((a1-4 (-> arg0 current-fog))) + (set! (-> a1-4 fog-color x) 150.0) + (set! (-> a1-4 fog-color y) 165.0) + (set! (-> a1-4 fog-color z) 220.0) + (set! (-> a1-4 fog-color w) 128.0) + ) + (set-vector! (-> arg0 current-fog fog-dists) 2048000.0 12288000.0 255.0 150.0) + (set-vector! (-> arg0 current-fog erase-color) 0.0 0.0 0.0 128.0) + ) + ) + (set-vector! (-> arg0 current-prt-color) 0.0 0.0 0.0 0.0) + (set-vector! (-> arg0 current-env-color) 96.0 96.0 96.0 128.0) + (set-vector! (-> arg0 current-sky-color) 0.0 0.0 0.0 1.0) + (let ((a0-2 (-> v1-0 0))) + (set! (-> a0-2 dir0 direction x) 0.0) + (set! (-> a0-2 dir0 direction y) 1.0) + (set! (-> a0-2 dir0 direction z) 0.0) + (set! (-> a0-2 dir0 direction w) 0.0) + ) + (set-vector! (-> v1-0 0 dir0 color) 0.667 0.667 0.667 1.0) + (set-vector! (-> v1-0 0 ambi color) 0.333 0.333 0.333 1.0) + (set! (-> v1-0 0 dir0 extra x) 1.0) + (set! (-> v1-0 0 dir1 extra x) 0.0) + (set! (-> v1-0 0 dir2 extra x) 0.0) + (set! (-> v1-0 0 ambi extra x) 1.0) + ) + ) + +(defun update-mood-interior-ambient ((arg0 mood-context) (arg1 symbol) (arg2 float)) + (update-mood-interior arg0 arg1) + (set! (-> arg0 times 0 quad) (-> *level* level-default mood-context times 0 quad)) + (vector+float*! + (the-as vector (-> arg0 times)) + (the-as vector (-> arg0 times)) + (-> *level* level-default mood-context times 1) + arg2 + ) + ) + +(defbehavior update-mood-flames time-of-day-proc ((arg0 mood-context) (arg1 int) (arg2 int) (arg3 int) (arg4 float) (arg5 float) (arg6 float)) + (let* ((gp-0 (the-as flames-state (+ (+ arg3 1840) (the-as int arg0)))) + (s4-0 (+ (-> gp-0 index) arg1)) + (f0-0 (-> gp-0 time)) + (v1-2 (-> gp-0 length)) + (s0-0 (-> gp-0 height)) + ) + (dotimes (a0-1 arg2) + (set! (-> arg0 times (+ arg1 a0-1) w) arg4) + ) + (cond + ((>= f0-0 (the float v1-2)) + (set! (-> gp-0 index) (the-as uint (the int (rand-vu-float-range 0.0 (+ -0.01 (the float arg2)))))) + (set! (-> gp-0 time) 0.0) + (set! (-> gp-0 length) (the-as uint (the int (* (rand-vu-float-range 7.0 15.0) arg6)))) + (set! (-> gp-0 height) (the-as uint (the int (rand-vu-float-range 0.0 255.0)))) + (set! (-> arg0 times s4-0 w) arg4) + ) + (else + (let ((f0-14 (sin (* 32768.0 (/ f0-0 (the float v1-2)))))) + (set! (-> arg0 times s4-0 w) (+ (* (the float s0-0) f0-14 arg5) arg4)) + ) + (if (not (paused?)) + (set! (-> gp-0 time) (+ (-> gp-0 time) (if (= (-> *display* bg-clock clock-ratio) 0.0) + 1.0 + (-> self clock time-adjust-ratio) + ) + ) + ) + ) + ) + ) + ) + ) + +(define *flash0* + (new 'static 'boxed-array :type float 1.0 0.0 0.5 1.0 0.5 0.0 0.5 0.35 0.4 0.35 0.25 0.1 0.04) + ) + +(define *flash1* (new 'static 'boxed-array :type float 1.0 0.8 0.0 1.0 0.5 1.0 0.4 0.2 0.1)) + +(define *flash2* (new 'static 'boxed-array :type float 1.0 0.9 0.8 0.7 0.0 0.0 1.0 0.0 1.0 0.5)) + +(define *flash3* (new 'static 'boxed-array :type float 0.5 0.0 1.0 0.9 1.0 0.8 0.3 0.0 0.0 0.5 0.1 0.5 0.35)) + +(define *flash4* + (new 'static 'boxed-array :type float 1.0 0.0 1.0 0.0 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.5 0.4 0.3 0.2 0.1) + ) + +(define *flash5* (new 'static 'boxed-array :type float + 1.0 + 0.0 + 1.0 + 0.0 + 1.0 + 0.95 + 0.9 + 0.85 + 0.8 + 0.75 + 0.7 + 0.65 + 0.6 + 0.55 + 0.5 + 0.45 + 0.4 + 0.35 + 0.3 + 0.25 + 0.2 + 0.5 + 0.45 + 0.4 + 0.35 + 0.3 + 0.25 + 0.2 + 0.15 + 0.1 + 0.05 + ) + ) + +(define *flash6* + (new 'static 'boxed-array :type float 1.0 0.0 1.0 0.0 0.5 0.0 0.5 0.35 0.0 0.0 1.0 0.0 0.2 0.1) + ) + +(define *flash7* + (new 'static 'boxed-array :type float 1.0 0.8 0.3 0.0 0.6 0.5 0.4 0.3 0.2 0.5 0.4 0.3 0.2 0.1) + ) + +(defun update-mood-light ((arg0 mood-context) (arg1 int) (arg2 int) (arg3 float) (arg4 float) (arg5 float) (arg6 float) (arg7 float)) + (with-pp + (let* ((gp-0 (the-as light-state (+ (+ arg2 1840) (the-as int arg0)))) + (f0-0 512.0) + (f1-1 (+ (-> gp-0 time) arg6)) + (f26-0 (* f0-0 (- f1-1 (* (the float (the int (/ f1-1 256.0))) 256.0)))) + (f30-1 (+ (fabs arg3) (* (cos f26-0) arg4))) + (f28-0 (-> gp-0 fade)) + ) + (cond + ((or (>= arg5 18.0) (>= 6.0 arg5)) + (set! f28-0 (cond + ((< arg3 0.0) + (if (not (paused?)) + (set! f28-0 (seek f28-0 1.0 (* 2.0 (seconds-per-frame)))) + ) + f28-0 + ) + (else + 1.0 + ) + ) + ) + (set! (-> gp-0 fade) f28-0) + (set! (-> arg0 times arg1 w) (* f30-1 f28-0)) + (when (not (paused?)) + (let ((f0-10 (-> gp-0 time))) + (set! arg7 (cond + ((= (-> *display* bg-clock clock-ratio) 0.0) + (empty) + arg7 + ) + (else + (* arg7 (-> pp clock time-adjust-ratio)) + ) + ) + ) + (set! (-> gp-0 time) (+ f0-10 arg7)) + ) + ) + ) + ((= f28-0 1.0) + (cond + ((< f26-0 3640.889) + (set! (-> arg0 times arg1 w) f30-1) + (set! (-> gp-0 fade) 0.99) + ) + (else + (set! (-> arg0 times arg1 w) f30-1) + ) + ) + (if (not (paused?)) + (set! (-> gp-0 time) (+ (-> gp-0 time) (if (= (-> *display* bg-clock clock-ratio) 0.0) + arg7 + (* arg7 (-> pp clock time-adjust-ratio)) + ) + ) + ) + ) + ) + ((and (< f28-0 1.0) (< 0.0 f28-0)) + (set! (-> arg0 times arg1 w) f28-0) + (when (not (paused?)) + (if (< 0.75 f28-0) + (set! (-> gp-0 fade) (- (-> gp-0 fade) (* 0.04 (-> pp clock time-adjust-ratio)))) + (set! (-> gp-0 fade) (- (-> gp-0 fade) (* 0.02 (-> pp clock time-adjust-ratio)))) + ) + ) + ) + (else + (set! (-> gp-0 fade) 0.0) + (set! (-> gp-0 time) 0.0) + ) + ) + ) + ) + ) + +(deftype lava-state (structure) + ((lava float) + ) + ) + + +(defun update-mood-lava ((arg0 mood-context) (arg1 int) (arg2 int) (arg3 float) (arg4 float) (arg5 float) (arg6 float) (arg7 float)) + (let ((gp-0 (+ (+ arg2 1840) (the-as int arg0)))) + (let ((f0-1 (cos (-> (the-as (pointer float) gp-0))))) + (set! (-> arg0 times arg1 w) (+ arg3 (* f0-1 arg4))) + (set! (-> arg0 times (+ arg1 1) w) (+ arg3 (* (- f0-1) arg4))) + ) + (if (not (paused?)) + (set! (-> (the-as (pointer float) gp-0)) (+ (-> (the-as (pointer float) gp-0)) arg5)) + ) + ) + ) + +(defun update-mood-flicker ((arg0 mood-context) (arg1 int) (arg2 int)) + (let ((gp-0 (the-as flicker-state (+ (+ arg2 1840) (the-as int arg0))))) + (cond + ((nonzero? (-> gp-0 flicker-on)) + (set! (-> arg0 times arg1 w) 1.0) + (if (not (paused?)) + (+! (-> gp-0 flicker-on) -1) + ) + ) + ((nonzero? (-> gp-0 flicker-off)) + (if (not (paused?)) + (+! (-> gp-0 flicker-off) -1) + ) + ) + (else + (set! (-> gp-0 flicker-on) (the-as uint (the int (rand-vu-float-range 2.0 20.0)))) + (if (zero? (the int (rand-vu-float-range 0.0 3.0))) + (set! (-> gp-0 flicker-off) (the-as uint (the int (rand-vu-float-range 2.0 120.0)))) + (set! (-> gp-0 flicker-off) (the-as uint (the int (rand-vu-float-range 2.0 20.0)))) + ) + ) + ) + ) + (none) + ) + +(defun update-mood-florescent ((arg0 mood-context) (arg1 int) (arg2 int)) + (let ((gp-0 (the-as florescent-state (+ (+ arg2 1840) (the-as int arg0))))) + (set! (-> arg0 times arg1 w) (-> gp-0 value)) + (when (not (paused?)) + (cond + ((zero? (-> gp-0 delay)) + (set! (-> gp-0 delay2) (the int (rand-vu-float-range 10.0 60.0))) + (set! (-> gp-0 delay) (the int (rand-vu-float-range 60.0 120.0))) + ) + (else + (+! (-> gp-0 delay) -1) + ) + ) + (cond + ((>= (-> gp-0 delay2) (-> gp-0 delay)) + (set! (-> gp-0 value) (rand-vu-float-range 1.0 1.5)) + ) + ((< (-> gp-0 delay2) (-> gp-0 delay)) + (set! (-> gp-0 value) 1.5) + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun update-mood-electricity ((arg0 mood-context) (arg1 int) (arg2 int) (arg3 float) (arg4 float)) + (let ((gp-0 (the-as electricity-state (+ (+ arg2 1840) (the-as int arg0))))) + (set! (-> arg0 times arg1 w) (* (-> gp-0 value) (-> gp-0 scale))) + (if (not (paused?)) + (set! (-> gp-0 value) (rand-vu-float-range arg3 arg4)) + ) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun update-mood-pulse ((arg0 mood-context) (arg1 int) (arg2 int) (arg3 float) (arg4 float) (arg5 float) (arg6 float)) + (let ((gp-0 (the-as pulse-state (+ (+ arg2 1840) (the-as int arg0))))) + (set! (-> arg0 times arg1 w) + (fmin 1.9921875 (* (+ arg3 (* (cos (+ (-> gp-0 pulse) arg6)) arg4)) (-> gp-0 brightness))) + ) + (when (not (paused?)) + (+! (-> gp-0 pulse) arg5) + (seek! (-> gp-0 brightness) (-> gp-0 target-brightness) (* (-> gp-0 speed) (seconds-per-frame))) + ) + ) + (none) + ) + +(defun update-mood-strobe ((arg0 mood-context) (arg1 int) (arg2 int) (arg3 int) (arg4 float)) + (let ((gp-0 (+ (+ arg2 1840) (the-as int arg0)))) + (let ((a2-1 (the int (-> (the-as (pointer float) gp-0))))) + (if (logtest? arg3 (ash 1 a2-1)) + (set! (-> arg0 times arg1 w) 1.0) + (set! (-> arg0 times arg1 w) 0.3) + ) + ) + (when (not (paused?)) + (let ((f0-5 (+ (-> (the-as (pointer float) gp-0)) arg4))) + (set! (-> (the-as (pointer float) gp-0)) (- f0-5 (* (the float (the int (/ f0-5 32.0))) 32.0))) + ) + ) + ) + ) + +(defun update-mood-caustics ((arg0 mood-context) (arg1 int) (arg2 float) (arg3 float) (arg4 float) (arg5 float)) + (let ((f0-2 (sin (+ arg2 arg3)))) + (set! (-> arg0 times arg1 w) (+ arg4 (* f0-2 arg5))) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun overide-mood-fog ((arg0 mood-context) (arg1 float) (arg2 int) (arg3 float)) + 0 + 0 + 0.0 + (let* ((v1-3 (-> *mood-control* mood-interp-table)) + (a0-1 (the int arg1)) + (f0-4 (- arg1 (the float a0-1))) + (f1-3 (- 1.0 f0-4)) + (a1-3 (/ a0-1 24)) + (a0-5 (-> v1-3 hour (- a0-1 (* 24 a1-3)))) + (a1-5 (-> a0-5 snapshot1)) + (v1-4 (-> a0-5 snapshot2)) + (f0-6 (+ (* f1-3 (-> a0-5 morph-start)) (* f0-4 (-> a0-5 morph-end)))) + ) + (if (= a1-5 v1-4) + (mem-copy! (the-as pointer (-> arg0 current-fog)) (the-as pointer (+ (* 48 a1-5) 0 arg2)) 48) + (vector4-array-lerp! + (the-as (inline-array vector4) (-> arg0 current-fog)) + (the-as (inline-array vector4) (+ (* 48 a1-5) 0 arg2)) + (the-as (inline-array vector4) (+ (* 48 v1-4) 0 arg2)) + f0-6 + 3 + ) + ) + ) + (if (!= arg3 0.0) + (vector4-array-lerp! + (the-as (inline-array vector4) (-> arg0 current-fog)) + (the-as (inline-array vector4) (-> arg0 current-fog)) + (the-as (inline-array vector4) (-> *level* level-default mood-context)) + arg3 + 3 + ) + ) + (none) + ) + +;; WARN: Return type mismatch rgbaf vs none. +(defun overide-mood-color ((arg0 mood-context) (arg1 float) (arg2 int) (arg3 float)) + 0 + 0 + 0.0 + (let* ((v1-3 (-> *mood-control* mood-interp-table)) + (a0-1 (the int arg1)) + (f0-4 (- arg1 (the float a0-1))) + (f1-3 (- 1.0 f0-4)) + (a1-3 (/ a0-1 24)) + (a1-5 (-> v1-3 hour (- a0-1 (* 24 a1-3)))) + (a0-5 (-> a1-5 snapshot1)) + (v1-4 (-> a1-5 snapshot2)) + (f30-0 (+ (* f1-3 (-> a1-5 morph-start)) (* f0-4 (-> a1-5 morph-end)))) + ) + (cond + ((= a0-5 v1-4) + (let ((a0-6 (+ (* a0-5 32) 0 arg2)) + (a1-7 (-> arg0 times)) + (v1-7 (-> arg0 times 1)) + ) + (set! (-> a1-7 0 quad) (-> (the-as (inline-array vector) (+ a0-6 16)) 0 quad)) + (set! (-> v1-7 quad) (-> (the-as (inline-array vector) (+ a0-6 0)) 0 quad)) + (set! (-> arg0 times 2 quad) (-> v1-7 quad)) + (set! (-> arg0 times 3 quad) (-> v1-7 quad)) + (set! (-> arg0 times 4 quad) (-> v1-7 quad)) + ) + ) + (else + (let ((s3-0 (+ (* a0-5 32) 0 arg2)) + (s2-0 (+ (* v1-4 32) 0 arg2)) + (a0-14 (-> arg0 times)) + (s4-0 (-> arg0 times 1)) + ) + (vector4-lerp! (the-as vector a0-14) (the-as vector (+ s3-0 16)) (the-as vector (+ s2-0 16)) f30-0) + (vector4-lerp! s4-0 (the-as vector (+ s3-0 0)) (the-as vector (+ s2-0 0)) f30-0) + (set! (-> arg0 times 2 quad) (-> s4-0 quad)) + (set! (-> arg0 times 3 quad) (-> s4-0 quad)) + (set! (-> arg0 times 4 quad) (-> s4-0 quad)) + ) + ) + ) + ) + (let ((s4-1 (-> arg0 light-group))) + (let ((s3-1 (-> *level* level-default mood-context))) + (if (!= arg3 0.0) + (vector4-array-lerp! + (the-as (inline-array vector4) (-> arg0 times)) + (the-as (inline-array vector4) (-> arg0 times)) + (the-as (inline-array vector4) (-> s3-1 times)) + arg3 + 5 + ) + ) + (dotimes (v1-17 5) + (set! (-> arg0 times v1-17 w) (-> (the-as mood-context (+ (the-as uint s3-1) (* v1-17 16))) times 0 w)) + ) + ) + (set! (-> s4-1 0 ambi color quad) (-> arg0 times 0 quad)) + (set! (-> s4-1 0 dir0 color quad) (-> arg0 times 1 quad)) + (set! (-> s4-1 0 dir1 color quad) (-> arg0 times 2 quad)) + (set! (-> s4-1 0 dir2 color quad) (-> arg0 times 3 quad)) + ) + (none) + ) + +(defmethod apply-mood-clouds-and-fog ((this mood-control) (arg0 mood-control-work)) + (let ((v1-0 (-> this mood-fog-table))) + (dotimes (a0-1 24) + (set! (-> v1-0 _data a0-1) (the-as uint128 0)) + ) + ) + (let ((s4-0 (-> this mood-fog-table))) + (let ((f30-0 (- 1.0 (-> arg0 interp cloud)))) + (when (!= f30-0 0.0) + (let ((f0-4 (* (- 1.0 (-> arg0 interp fog)) f30-0)) + (a2-0 (-> this fogs (-> arg0 index 0))) + ) + (if (!= f0-4 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) a2-0) + f0-4 + 24 + ) + ) + ) + (let ((f0-6 (* (-> arg0 interp fog) f30-0)) + (a2-1 (-> this fogs (-> arg0 index 1))) + ) + (if (!= f0-6 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) a2-1) + f0-6 + 24 + ) + ) + ) + ) + ) + (let ((f30-1 (-> arg0 interp cloud))) + (when (!= f30-1 0.0) + (let ((f0-10 (* (- 1.0 (-> arg0 interp fog)) f30-1)) + (a2-2 (-> this fogs (-> arg0 index 2))) + ) + (if (!= f0-10 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) a2-2) + f0-10 + 24 + ) + ) + ) + (let ((f0-12 (* (-> arg0 interp fog) f30-1)) + (a2-3 (-> this fogs (-> arg0 index 3))) + ) + (if (!= f0-12 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) a2-3) + f0-12 + 24 + ) + ) + ) + ) + ) + ) + (let ((f0-13 (-> *time-of-day-context* fog-mult)) + (v1-29 (-> this mood-fog-table)) + ) + (dotimes (a0-6 8) + (set! (-> v1-29 data a0-6 fog-dists y) (* (-> v1-29 data a0-6 fog-dists y) f0-13)) + ) + ) + 0 + (none) + ) + +(defmethod apply-mood-fog ((this mood-control) + (arg0 mood-control-work) + (arg1 mood-color-table) + (arg2 mood-color-table) + (arg3 mood-color-table) + (arg4 float) + ) + (let ((v1-0 (-> this mood-fog-table))) + (dotimes (a1-1 24) + (set! (-> v1-0 _data a1-1) (the-as uint128 0)) + ) + ) + (let ((s4-0 (-> this mood-fog-table)) + (f0-1 (fmax 0.0 (fmin 1.0 (* 5.0 (- 0.2 arg4))))) + (f30-0 (if (>= 0.2 arg4) + (fmax 0.0 (fmin 1.0 (* 5.0 arg4))) + (- 1.0 (fmax 0.0 (fmin 1.0 (* 1.25 (+ -0.2 arg4))))) + ) + ) + (f28-0 (fmax 0.0 (fmin 1.0 (* 1.25 (+ -0.2 arg4))))) + ) + (if (!= f0-1 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) arg1) + f0-1 + 24 + ) + ) + (if (!= f30-0 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) arg2) + f30-0 + 24 + ) + ) + (if (!= f28-0 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) arg3) + f28-0 + 24 + ) + ) + ) + 0 + (none) + ) + +(defmethod apply-fog-height ((this mood-control) (arg0 mood-control-work) (arg1 float) (arg2 float) (arg3 float) (arg4 float)) + (cond + ((= arg4 0.2) + (set-fog-height! arg2) + ) + ((< arg4 0.2) + (set-fog-height! (lerp arg1 arg2 (* 5.0 arg4))) + ) + (else + (set-fog-height! (lerp arg2 arg3 (* 1.25 (+ -0.2 arg4)))) + ) + ) + 0 + (none) + ) + +(defmethod apply-mood-colors ((this mood-control) (arg0 mood-control-work)) + (let ((v1-0 (-> this mood-color-table))) + (dotimes (a0-1 16) + (set! (-> v1-0 _data a0-1) (the-as uint128 0)) + ) + ) + (let ((s4-0 (-> this mood-color-table))) + (let ((f0-1 (- 1.0 (-> arg0 color-interp))) + (a2-0 (-> this colors (-> arg0 color-index 0))) + ) + (if (!= f0-1 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) a2-0) + f0-1 + 16 + ) + ) + ) + (let ((f0-2 (-> arg0 color-interp)) + (a2-1 (-> this colors (-> arg0 color-index 1))) + ) + (if (!= f0-2 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) a2-1) + f0-2 + 16 + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod mood-control-method-20 ((this mood-control) + (arg0 mood-control-work) + (arg1 mood-color-table) + (arg2 mood-color-table) + (arg3 mood-color-table) + (arg4 float) + ) + (let ((v1-0 (-> this mood-color-table))) + (dotimes (a1-1 16) + (set! (-> v1-0 _data a1-1) (the-as uint128 0)) + ) + ) + (let ((s4-0 (-> this mood-color-table)) + (f0-1 (fmax 0.0 (fmin 1.0 (* 5.0 (- 0.2 arg4))))) + (f30-0 (if (>= 0.2 arg4) + (fmax 0.0 (fmin 1.0 (* 5.0 arg4))) + (- 1.0 (fmax 0.0 (fmin 1.0 (* 1.25 (+ -0.2 arg4))))) + ) + ) + (f28-0 (fmax 0.0 (fmin 1.0 (* 1.25 (+ -0.2 arg4))))) + ) + (if (!= f0-1 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) arg1) + f0-1 + 16 + ) + ) + (if (!= f30-0 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) arg2) + f30-0 + 16 + ) + ) + (if (!= f28-0 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) arg3) + f28-0 + 16 + ) + ) + ) + 0 + (none) + ) + +(defmethod apply-mood-channels ((this mood-control) (arg0 mood-control-work)) + (let ((v1-0 (-> this mood-channel-group))) + (dotimes (a0-1 24) + (set! (-> v1-0 data 0 vecs a0-1 quad) (the-as uint128 0)) + ) + ) + (let ((s4-0 (-> this mood-channel-group))) + (let ((f0-1 (- 1.0 (-> arg0 channel-interp))) + (a2-0 (-> this channels (-> arg0 channel-index 0))) + ) + (if (!= f0-1 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) a2-0) + f0-1 + 24 + ) + ) + ) + (let ((f0-2 (-> arg0 channel-interp)) + (a2-1 (-> this channels (-> arg0 channel-index 1))) + ) + (if (!= f0-2 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) a2-1) + f0-2 + 24 + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod adjust-num-clouds ((this mood-control) (arg0 mood-control-work)) + (let ((v1-0 (-> this mood-clouds))) + (set! (-> v1-0 cloud-min) 0.0) + (set! (-> v1-0 cloud-max) 0.0) + (let ((f0-3 (- 1.0 (-> arg0 cloud-interp))) + (a2-4 (-> this clouds (-> arg0 cloud-index 0))) + ) + (when (!= f0-3 0.0) + (set! (-> v1-0 cloud-min) (* (-> a2-4 cloud-min) f0-3)) + (set! (-> v1-0 cloud-max) (* (-> a2-4 cloud-max) f0-3)) + ) + ) + (let ((f0-5 (-> arg0 cloud-interp)) + (a0-2 (-> this clouds (-> arg0 cloud-index 1))) + ) + (when (!= f0-5 0.0) + (+! (-> v1-0 cloud-min) (* (-> a0-2 cloud-min) f0-5)) + (+! (-> v1-0 cloud-max) (* (-> a0-2 cloud-max) f0-5)) + ) + ) + ) + 0 + (none) + ) + +(defmethod play-or-stop-lightning-sfx! ((this mood-control) (arg0 sound-spec) (arg1 vector)) + (vector+! (new 'stack-no-clear 'vector) arg1 (math-camera-pos)) + (cond + ((or (load-in-progress? *level*) (movie?)) + (when (nonzero? (-> this lightning-id)) + (sound-stop (-> this lightning-id)) + (set! (-> this lightning-id) (new 'static 'sound-id)) + 0 + ) + ) + (else + (when (nonzero? (-> this lightning-id)) + (sound-stop (-> this lightning-id)) + (set! (-> this lightning-id) (new 'static 'sound-id)) + 0 + ) + (set! (-> this lightning-id) (sound-play-by-spec arg0 (new-sound-id) arg1)) + ) + ) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod gen-lightning-and-thunder! ((this mood-control) (arg0 int)) + (local-vars (a1-2 (array float))) + (let ((v1-3 (-> this mood-channel-group data (-> this lightning-index))) + (a1-1 (-> this lightning-val)) + (a0-4 (/ (-> this lightning-time) 2)) + (f0-0 (-> this lightning-time2)) + ) + (set! (-> this lightning-flash) 0.0) + (cond + ((>= 0.0 f0-0) + (cond + ((zero? a1-1) + (set! a1-2 *flash0*) + ) + ((= a1-1 1) + (set! a1-2 *flash1*) + ) + ((= a1-1 2) + (set! a1-2 *flash2*) + ) + ((= a1-1 3) + (set! a1-2 *flash3*) + ) + ((= a1-1 4) + (set! a1-2 *flash4*) + ) + ((= a1-1 5) + (set! a1-2 *flash5*) + ) + ((= a1-1 6) + (set! a1-2 *flash6*) + ) + (else + (set! a1-2 *flash7*) + ) + ) + (cond + ((< a0-4 (-> a1-2 length)) + (let ((f30-0 (-> a1-2 a0-4)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (cond + ((= (-> this lightning-index) 4) + (set! (-> this lightning-flash) f30-0) + ) + ((= (-> this lightning-index) 5) + (set! (-> this lightning-flash) f30-0) + (dotimes (s4-0 8) + (set-vector! s5-0 255.0 255.0 255.0 128.0) + (vector4-lerp! + (the-as vector (-> this mood-fog-table data s4-0)) + (the-as vector (-> this mood-fog-table data s4-0)) + s5-0 + f30-0 + ) + ) + ) + (else + (set! (-> this lightning-flash) (* 1.9921875 f30-0)) + (let ((a0-17 (-> v1-3 data))) + (set! (-> a0-17 0) 1.0) + (set! (-> a0-17 1) 1.0) + (set! (-> a0-17 2) 1.0) + (set! (-> a0-17 3) 1.0) + ) + (set! (-> (the-as vector (&-> v1-3 data 4)) quad) (-> (the-as vector (-> v1-3 data)) quad)) + (set! (-> (the-as vector (&-> v1-3 data 8)) quad) (-> (the-as vector (-> v1-3 data)) quad)) + (set! (-> (the-as vector (&-> v1-3 data 12)) quad) (-> (the-as vector (-> v1-3 data)) quad)) + (set! (-> (the-as vector (&-> v1-3 data 16)) quad) (-> (the-as vector (-> v1-3 data)) quad)) + (set! (-> (the-as vector (&-> v1-3 data 20)) quad) (-> (the-as vector (-> v1-3 data)) quad)) + ) + ) + ) + (if (not (paused?)) + (+! (-> this lightning-time) 1) + ) + ) + (else + (level-get-target-inside *level*) + (cond + ((!= (-> this lightning-time3) 0.0) + (set! (-> this lightning-time2) (-> this lightning-time3)) + (set! (-> this lightning-time3) 0.0) + ) + (else + (set! (-> this lightning-time2) (rand-vu-float-range 5.0 10.0)) + ) + ) + ) + ) + ) + (else + (when (not (paused?)) + (set! (-> this lightning-time2) (- (-> this lightning-time2) (seconds-per-frame))) + (when (>= 0.0 (-> this lightning-time2)) + (when (= (-> this lightning-time3) 0.0) + (set! (-> this lightning-index) (mod (the-as int (rand-uint31-gen *random-generator*)) 6)) + (set! (-> this lightning-val) (the-as int (logand (rand-uint31-gen *random-generator*) 7))) + ) + (set! (-> this lightning-time) 0) + (cond + ((zero? (-> this lightning-index)) + (play-or-stop-lightning-sfx! + this + (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 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 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 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 0) + (new 'static 'vector :y 40960000.0) + ) + ) + ((= (-> this lightning-index) 5) + (play-or-stop-lightning-sfx! + this + (static-sound-spec "thunder-a" :group 0) + (new 'static 'vector :y 40960000.0) + ) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +(defmethod set-lightning-time! ((this mood-control) (arg0 int) (arg1 int) (arg2 float)) + (set! (-> this lightning-index) arg0) + (set! (-> this lightning-val) arg1) + (set! (-> this lightning-time2) (seconds-per-frame)) + (set! (-> this lightning-time3) arg2) + 0 + (none) + ) + +(defmethod init-weather! ((this mood-control)) + (local-vars (v1-32 int) (a1-12 object)) + (let ((s5-0 (level-get-target-inside *level*))) + (when s5-0 + (set! (-> this mood-direction-table) *mood-direction-table*) + (let ((s4-0 (new 'stack-no-clear 'mood-control-work))) + (let ((s3-0 this)) + (cond + ((and (-> s3-0 overide-weather-flag) (not (movie?)) (= (-> s3-0 current-special-interp) 0.0)) + (set! (-> s4-0 weather cloud) (* 2.0 (fmax 0.0 (fmin 1.0 (-> this overide cloud))))) + (set! (-> s4-0 weather fog) (* 2.0 (-> this overide fog))) + ) + (else + (set! (-> s4-0 weather cloud) (* 2.0 (fmax 0.0 (fmin 1.0 (-> this current-interp cloud))))) + (set! (-> s4-0 weather fog) (* 2.0 (fmax 0.0 (fmin 1.0 (-> this current-interp fog))))) + ) + ) + ) + (set! (-> s4-0 iweather cloud) (the int (-> s4-0 weather cloud))) + (let ((f0-12 (- (-> s4-0 weather cloud) (the float (-> s4-0 iweather cloud))))) + (cond + ((zero? (-> s4-0 iweather cloud)) + (if (< f0-12 0.5) + (set! (-> s4-0 interp cloud) 0.0) + (set! (-> s4-0 interp cloud) (* 2.0 (+ -0.5 f0-12))) + ) + ) + (else + (set! (-> s4-0 interp cloud) f0-12) + ) + ) + ) + (set! (-> s4-0 iweather fog) (the int (-> s4-0 weather fog))) + (set! (-> s4-0 interp fog) (- (-> s4-0 weather fog) (the float (-> s4-0 iweather fog)))) + (let ((a0-2 (-> s4-0 iweather fog)) + (v1-23 (-> s4-0 iweather cloud)) + ) + (set! (-> s4-0 index 0) (+ (* 3 v1-23) a0-2)) + (set! (-> s4-0 index 1) (+ a0-2 1 (* 3 v1-23))) + (set! (-> s4-0 index 2) (+ (* 3 (+ v1-23 1)) a0-2)) + (set! (-> s4-0 index 3) (+ a0-2 1 (* 3 (+ v1-23 1)))) + ) + (let ((v1-27 (-> s4-0 iweather cloud))) + (set! (-> s4-0 color-interp) (-> s4-0 interp cloud)) + (set! (-> s4-0 color-index 0) v1-27) + (set! (-> s4-0 color-index 1) (+ v1-27 1)) + ) + 0 + (let ((f0-22 (- (-> s4-0 weather cloud) (the float (-> s4-0 iweather cloud))))) + (cond + ((zero? (-> s4-0 iweather cloud)) + (set! (-> s4-0 channel-interp) 0.0) + (set! v1-32 0) + ) + ((= (-> s4-0 iweather cloud) 2) + (set! (-> s4-0 channel-interp) 0.0) + (set! v1-32 2) + ) + ((< f0-22 0.5) + (set! (-> s4-0 channel-interp) (* 2.0 f0-22)) + (set! v1-32 0) + ) + (else + (set! (-> s4-0 channel-interp) (* 2.0 (+ -0.5 f0-22))) + (set! v1-32 1) + ) + ) + ) + (set! (-> s4-0 channel-index 0) v1-32) + (set! (-> s4-0 channel-index 1) (+ v1-32 1)) + (let* ((s3-1 this) + (f0-33 (if (and (-> s3-1 overide-weather-flag) (and (not (movie?)) (= (-> s3-1 current-special-interp) 0.0))) + (* 8.0 (-> this overide cloud)) + (* 8.0 (fmax 0.0 (fmin 1.0 (-> this current-interp cloud)))) + ) + ) + (v1-45 (the int f0-33)) + ) + (set! (-> s4-0 cloud-interp) (- f0-33 (the float v1-45))) + (set! (-> s4-0 cloud-index 0) v1-45) + (set! (-> s4-0 cloud-index 1) (+ v1-45 1)) + ) + (cond + ((= (-> *time-of-day-context* special-mood) 'desert) + (apply-mood-fog + this + s4-0 + (the-as mood-color-table *desert-mood-fog-table*) + (the-as mood-color-table *sandstorm-start-mood-fog-table*) + (the-as mood-color-table *sandstorm-end-mood-fog-table*) + (-> this current-special-interp) + ) + (mood-control-method-20 + this + s4-0 + *desert-mood-color-table* + *sandstorm-start-mood-color-table* + *sandstorm-end-mood-color-table* + (-> this current-special-interp) + ) + (apply-fog-height this s4-0 327680.0 614400.0 4096000.0 (-> this current-special-interp)) + (set! a1-12 s4-0) + (adjust-num-clouds this (the-as mood-control-work a1-12)) + ) + (else + (apply-mood-clouds-and-fog this s4-0) + (apply-mood-colors this s4-0) + (apply-mood-channels this s4-0) + (set! a1-12 s4-0) + (adjust-num-clouds this (the-as mood-control-work a1-12)) + ) + ) + ) + (when (not (or (paused?) (let ((s4-1 this)) + (and (-> s4-1 overide-weather-flag) (not (movie?)) (= (-> s4-1 current-special-interp) 0.0)) + ) + ) + ) + (when (!= (-> this time-until-random cloud) -99.0) + (set! (-> this target-interp cloud) + (fmax (fmin (-> this target-interp cloud) (-> this range max-cloud)) (-> this range min-cloud)) + ) + (let ((t9-13 seek) + (a0-19 (-> this current-interp cloud)) + ) + (set! a1-12 (-> this target-interp cloud)) + (set! (-> this current-interp cloud) + (t9-13 a0-19 (the-as float a1-12) (* (/ 1.0 (-> this speed-interp cloud)) (seconds-per-frame))) + ) + ) + ) + (when (!= (-> this time-until-random fog) -99.0) + (set! (-> this target-interp fog) + (fmax (fmin (-> this target-interp fog) (-> this range max-fog)) (-> this range min-fog)) + ) + (let ((t9-14 seek) + (a0-20 (-> this current-interp fog)) + ) + (set! a1-12 (-> this target-interp fog)) + (set! (-> this current-interp fog) + (t9-14 a0-20 (the-as float a1-12) (* (/ 1.0 (-> this speed-interp fog)) (seconds-per-frame))) + ) + ) + ) + (when (!= (-> this time-until-random cloud) -99.0) + (set! (-> this time-until-random cloud) (- (-> this time-until-random cloud) (* 300.0 (seconds-per-frame)))) + (when (< (-> this time-until-random cloud) 0.0) + (set! (-> this time-until-random cloud) + (rand-vu-float-range (-> this time-until-random-min cloud) (-> this time-until-random-max cloud)) + ) + (let ((f30-0 (rand-vu-float-range (-> this range min-cloud) (-> this range max-cloud))) + (f28-0 (rand-vu-float-range (-> this range min-cloud) (-> this range max-cloud))) + (f26-0 (rand-vu-float-range (-> this range min-cloud) (-> this range max-cloud))) + (f24-0 (rand-vu-float-range (-> this range min-cloud) (-> this range max-cloud))) + (f2-11 (rand-vu-float-range (-> this range min-cloud) (-> this range max-cloud))) + ) + (set! (-> this target-interp cloud) (fmax 0.0 (+ -0.25 (* 0.25 (+ f30-0 f28-0 f26-0 f24-0 f2-11))))) + ) + (let ((t9-21 rand-vu-float-range) + (a0-27 30.0) + ) + (set! a1-12 120.0) + (set! (-> this speed-interp cloud) (t9-21 a0-27 (the-as float a1-12))) + ) + (when (and (< 0.0 (-> *setting-control* user-current rain)) + (< (-> this target-interp cloud) 0.5) + (< 0.25 (-> this target-interp cloud)) + (or (< (-> this target-interp fog) 0.25) (< 0.75 (-> this target-interp fog))) + ) + (set! (-> this speed-interp fog) (fabs (/ (* 1.25 (-> this current-interp fog) (-> this speed-interp cloud)) + (+ -0.75 (-> this current-interp cloud)) + ) + ) + ) + (set! (-> this target-interp fog) 0.5) + (set! (-> this time-until-random fog) (-> this time-until-random cloud)) + ) + ) + ) + (when (!= (-> this time-until-random fog) -99.0) + (set! (-> this time-until-random fog) (- (-> this time-until-random fog) (* 300.0 (seconds-per-frame)))) + (when (< (-> this time-until-random fog) 0.0) + (set! (-> this time-until-random fog) + (rand-vu-float-range (-> this time-until-random-min fog) (-> this time-until-random-max fog)) + ) + (let ((f30-1 (rand-vu-float-range (-> this range min-fog) (-> this range max-fog))) + (f28-1 (rand-vu-float-range (-> this range min-fog) (-> this range max-fog))) + (f26-1 (rand-vu-float-range (-> this range min-fog) (-> this range max-fog))) + (f24-1 (rand-vu-float-range (-> this range min-fog) (-> this range max-fog))) + (f0-108 (rand-vu-float-range (-> this range min-fog) (-> this range max-fog))) + ) + (set! (-> this target-interp fog) (* 0.2 (+ f30-1 f28-1 f26-1 f24-1 f0-108))) + ) + (let ((t9-28 rand-vu-float-range) + (a0-34 30.0) + ) + (set! a1-12 120.0) + (set! (-> this speed-interp fog) (t9-28 a0-34 (the-as float a1-12))) + ) + ) + ) + ) + (when (logtest? (game-secrets bad-weather) (-> *game-info* secrets)) + (set! (-> this current-interp cloud) 1.0) + (set! (-> this current-interp fog) 1.0) + ) + (let* ((s4-2 this) + (f30-2 (if (and (-> s4-2 overide-weather-flag) (and (not (movie?)) (= (-> s4-2 current-special-interp) 0.0))) + (-> this overide cloud) + (-> this current-interp cloud) + ) + ) + (s4-3 this) + (f26-2 (if (and (-> s4-3 overide-weather-flag) (and (not (movie?)) (= (-> s4-3 current-special-interp) 0.0))) + (-> this overide fog) + (-> this current-interp fog) + ) + ) + (f28-2 (fmin (-> s5-0 info max-rain) (-> *time-of-day-context* max-rain))) + ) + (set! (-> this sound-pitch) (* 1.442695 (logf (-> *display* bg-clock clock-ratio)))) + (let* ((f0-125 (fmax 0.0 (fmin (* 4.0 (fmax 0.0 (+ -0.5 f26-2)) (fmax 0.0 (+ -0.5 f30-2))) f28-2))) + (f30-3 (fmin 0.75 f0-125)) + ) + (set! (-> *setting-control* user-default rain) f30-3) + (level-get-target-inside *level*) + (cond + ((and (< 0.0 (-> *setting-control* user-current rain)) (!= *master-mode* 'progress)) + (gen-lightning-and-thunder! this (the-as int a1-12)) + (cond + ((zero? (-> this rain-id)) + (set! (-> this rain-id) (sound-play-by-name + (static-sound-name "rain-hiss") + (new-sound-id) + (the int (* 1024.0 f30-3)) + (the int (* 1524.0 (-> this sound-pitch))) + 0 + (sound-group) + #t + ) + ) + ) + (else + (when *sound-player-enable* + (let ((v1-146 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-146 command) (sound-command set-param)) + (set! (-> v1-146 id) (-> this rain-id)) + (set! (-> v1-146 params volume) (the int (* 1024.0 f30-3))) + (set! (-> v1-146 params pitch-mod) (the int (* 1524.0 (-> this sound-pitch)))) + (set! (-> v1-146 params mask) (the-as uint 3)) + (-> v1-146 id) + ) + ) + ) + ) + ) + (else + (set! (-> this lightning-flash) 0.0) + (when (nonzero? (-> this rain-id)) + (sound-stop (-> this rain-id)) + (set! (-> this rain-id) (new 'static 'sound-id)) + 0 + ) + ) + ) + ) + ) + (if (and (not (paused?)) (not (-> *game-info* dust-storm))) + (seek! + (-> this current-special-interp) + (-> this target-special-interp) + (* (-> this rate-special-interp) (seconds-per-frame)) + ) + ) + (when (-> this display-flag) + (let ((s5-2 this)) + (cond + ((and (-> s5-2 overide-weather-flag) (not (movie?)) (= (-> s5-2 current-special-interp) 0.0)) + (format *stdcon* "overide cloud ~f~%" (-> this overide cloud)) + (format *stdcon* "overide fog ~f~%" (-> this overide fog)) + ) + (else + (format *stdcon* "time until random cloud ~f~%" (* 0.0033333334 (-> this time-until-random cloud))) + (format *stdcon* "current cloud ~f~%" (-> this current-interp cloud)) + (format *stdcon* "target cloud ~f~%" (-> this target-interp cloud)) + (format *stdcon* "speed cloud ~f~%" (* (/ 1.0 (-> this speed-interp cloud)) (seconds-per-frame))) + (format *stdcon* "time until random fog ~f~%" (* 0.0033333334 (-> this time-until-random fog))) + (format *stdcon* "current fog ~f~%" (-> this current-interp fog)) + (format *stdcon* "target fog ~f~%" (-> this target-interp fog)) + (format *stdcon* "speed fog ~f~%" (* (/ 1.0 (-> this speed-interp fog)) (seconds-per-frame))) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod set-cloud-and-fog-interp! ((this mood-control) (arg0 float) (arg1 float) (arg2 float) (arg3 float)) + (set! (-> this target-interp cloud) arg0) + (set! (-> this target-interp fog) arg1) + (set! (-> this speed-interp cloud) arg2) + (set! (-> this speed-interp fog) arg3) + (if (= arg2 0.0) + (set! (-> this current-interp cloud) arg0) + ) + (if (= arg3 0.0) + (set! (-> this current-interp fog) arg1) + ) + 0 + (none) + ) + +(defmethod update-mood-range! ((this mood-control) (arg0 float) (arg1 float) (arg2 float) (arg3 float)) + (set! (-> this range min-cloud) arg0) + (set! (-> this range max-cloud) arg1) + (set! (-> this range min-fog) arg2) + (set! (-> this range max-fog) arg3) + 0 + (none) + ) + +(defmethod set-time-for-random-weather! ((this mood-control) (arg0 float) (arg1 float)) + (set! (-> this time-until-random cloud) arg0) + (set! (-> this time-until-random fog) arg1) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/gfx/mood/time-of-day-h.gc b/goal_src/jak3/engine/gfx/mood/time-of-day-h.gc index d0b8b2e45e..e6a90c3f5c 100644 --- a/goal_src/jak3/engine/gfx/mood/time-of-day-h.gc +++ b/goal_src/jak3/engine/gfx/mood/time-of-day-h.gc @@ -5,6 +5,8 @@ ;; name in dgo: time-of-day-h ;; dgos: GAME +(define-extern time-of-day-setup (function symbol symbol)) + ;; +++time-of-day-palette-id (defenum time-of-day-palette-id :type uint32 @@ -25,6 +27,15 @@ ;; ---time-of-day-palette-id (declare-type sparticle-launch-control inline-array-class) +(declare-type time-of-day-palette structure) +(define-extern time-of-day-interp-colors (function (pointer rgba) uint mood-context none)) +(define-extern time-of-day-interp-colors-scratch (function (pointer rgba) time-of-day-palette mood-context none)) +(declare-type time-of-day-proc process) +(declare-type time-of-day-context structure) +(define-extern *time-of-day* (pointer time-of-day-proc)) +(define-extern update-time-of-day (function time-of-day-context none)) +(define-extern init-time-of-day-context (function time-of-day-context symbol)) +(define-extern calc-fade-from-fog (function vector float)) ;; DECOMP BEGINS @@ -75,8 +86,8 @@ and the code in mood.gc, which set the actual fade values for time-of-day." (moon-count int32) (moon sparticle-launch-control) (day-star-count int32) - (day-star basic) - (day-star-enable basic) + (day-star sparticle-launch-control) + (day-star-enable symbol) (start-timer int32) ) ) diff --git a/goal_src/jak3/engine/gfx/mood/time-of-day.gc b/goal_src/jak3/engine/gfx/mood/time-of-day.gc index 5895d8951e..b0d19b69cf 100644 --- a/goal_src/jak3/engine/gfx/mood/time-of-day.gc +++ b/goal_src/jak3/engine/gfx/mood/time-of-day.gc @@ -5,5 +5,803 @@ ;; name in dgo: time-of-day ;; dgos: GAME +(define-extern time-of-day-effect (function none)) +(define-extern *overide-mood-color-table* mood-color-table) ;; +(define-extern *overide-mood-fog-table* mood-fog-table) ;; + ;; DECOMP BEGINS +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this time-of-day-palette)) + (the-as int (+ (-> this type size) (* (* (-> this height) (-> this width)) 4))) + ) + +(defmethod deactivate ((this time-of-day-proc)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this sun)) + (kill-particles (-> this sun)) + ) + (if (nonzero? (-> this green-sun)) + (kill-particles (-> this green-sun)) + ) + (if (nonzero? (-> this moon)) + (kill-particles (-> this moon)) + ) + (if (nonzero? (-> this day-star)) + (kill-particles (-> this day-star)) + ) + ((method-of-type process deactivate) this) + (none) + ) + +(if (zero? time-of-day-effect) + (set! time-of-day-effect nothing) + ) + +(defbehavior time-of-day-update time-of-day-proc () + "Update particles, sky, and effect for time-of-day." + (time-of-day-effect) + (let ((v1-3 (if (-> *time-of-day-context* use-camera-other) + (-> *math-camera* inv-camera-rot-other) + (-> *math-camera* inv-camera-rot) + ) + ) + (gp-0 (if (-> *time-of-day-context* use-camera-other) + (-> *math-camera* trans-other) + (-> *math-camera* trans) + ) + ) + ) + (when (-> *setting-control* user-current weather) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-5 (-> v1-3 fvec))) + (set! (-> s5-0 quad) (-> *math-camera* trans quad)) + (vector-! s4-0 s5-0 (-> *math-camera* prev-trans)) + (let ((f0-1 (vector-dot s4-0 v1-5))) + (vector+float*! s5-0 s5-0 v1-5 (* 25.0 f0-1)) + ) + ) + (set! (-> s5-0 y) (-> *math-camera* trans y)) + (if (< 0.0 (-> *setting-control* user-current rain)) + (update-rain (-> *setting-control* user-current rain) s5-0 s4-0) + ) + (if (< 0.0 (-> *setting-control* user-current snow)) + (update-snow (-> *setting-control* user-current snow) s5-0 s4-0) + ) + ) + ) + (cond + (*dproc* + (cond + ((< (-> self start-timer) 4) + (+! (-> self start-timer) 1) + ) + (else + (let ((s5-1 (-> *time-of-day-context* sky)) + (s4-1 (= (-> *setting-control* user-current sky-type) 'star-field)) + ) + (cond + ((or (and (>= (-> self time-of-day) 6.25) (and (< (-> self time-of-day) 18.75) s5-1)) s4-1) + (if (zero? (-> self sun-count)) + (spawn (-> self sun) gp-0) + ) + ) + ((> (-> self sun-count) 0) + (kill-particles (-> self sun)) + ) + ) + (cond + ((or (and (or (>= (-> self time-of-day) 21.75) (>= 10.25 (-> self time-of-day))) s5-1) s4-1) + (if (zero? (-> self green-sun-count)) + (spawn (-> self green-sun) gp-0) + ) + ) + ((> (-> self green-sun-count) 0) + (kill-particles (-> self green-sun)) + ) + ) + (cond + ((or (and (or (>= 7.0 (-> self time-of-day)) (>= (-> self time-of-day) 17.0)) s5-1) s4-1) + (if (zero? (-> self moon-count)) + (spawn (-> self moon) gp-0) + ) + ) + ((> (-> self moon-count) 0) + (kill-particles (-> self moon)) + ) + ) + (cond + ((and (-> self day-star-enable) s5-1 (not s4-1)) + (if (zero? (-> self day-star-count)) + (spawn (-> self day-star) gp-0) + ) + ) + ((> (-> self day-star-count) 0) + (kill-particles (-> self day-star)) + ) + ) + ) + ) + ) + ) + (else + (set! (-> self start-timer) 0) + 0 + ) + ) + ) + (set! (-> self sun-count) 0) + (set! (-> self green-sun-count) 0) + (set! (-> self moon-count) 0) + (set! (-> self day-star-count) 0) + (update-time-and-speed *sky-work* (-> self time-of-day) (-> self time-ratio)) + 0 + (none) + ) + +(defbehavior update-counters time-of-day-proc () + "Set hours, minutes, senonds based on current frame." + (let ((v1-2 (-> *display* bg-clock frame-counter))) + 0 + (let ((v1-3 (* 60 v1-2))) + (set! (-> self old-frame) (-> self current-frame)) + (set! (-> self current-frame) (the-as uint v1-3)) + (set! (-> self frames) (the-as uint v1-3)) + (set! (-> self hours) (/ v1-3 #x107ac0)) + (let ((v1-4 (- v1-3 (* #x107ac0 (-> self hours))))) + (set! (-> self minutes) (/ v1-4 #x4650)) + (let ((v1-5 (- v1-4 (* #x4650 (-> self minutes))))) + (set! (-> self seconds) (/ v1-5 300)) + (- v1-5 (* 300 (-> self seconds))) + ) + ) + ) + ) + (let ((f0-1 (* 0.0000009259259 (the float (mod (the-as int (-> self frames)) #x18b8200))))) + (set! (-> self time-of-day) f0-1) + (set! (-> *time-of-day-context* time) f0-1) + f0-1 + ) + ) + +(defstate time-of-day-tick (time-of-day-proc) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('change) + (case (-> block param 0) + (('ratio) + (let ((a0-5 (-> *display* bg-clock)) + (f0-0 (the-as float (-> block param 1))) + ) + (set! (-> self time-ratio) f0-0) + (set! (-> self dest-time-ratio) f0-0) + (update-rates! a0-5 f0-0) + ) + ) + (('hour) + (let ((f28-0 (the float (-> block param 1))) + (f30-0 (if (>= argc 3) + (the float (-> block param 2)) + 0.0 + ) + ) + ) + (update-counters) + (let ((v1-10 (-> *display* bg-clock frame-counter)) + (a0-7 #x69780) + (a1-5 (/ (+ (the int (* 1080000.0 f28-0)) (the int (* 18000.0 f30-0))) 60)) + ) + (set! (-> *display* bg-clock frame-counter) (+ (- v1-10 (the-as time-frame (mod v1-10 a0-7))) a0-7 a1-5)) + ) + ) + (update-counters) + (kill-particles (-> self sun)) + (kill-particles (-> self green-sun)) + (kill-particles (-> self moon)) + (kill-particles (-> self day-star)) + (set! (-> self sun-count) 0) + (set! (-> self green-sun-count) 0) + (set! (-> self moon-count) 0) + (set! (-> self day-star-count) 0) + (-> self hours) + ) + ) + ) + (('save) + (set! (-> self old-frame-save) (-> self old-frame)) + (set! (-> self current-frame-save) (-> self current-frame)) + (set! (-> self frames-save) (-> self frames)) + (set! (-> self time-of-day-save) (-> self time-of-day)) + ) + (('restore) + (set! (-> self old-frame) (-> self old-frame-save)) + (set! (-> self current-frame) (-> self current-frame-save)) + (set! (-> self frames) (-> self frames-save)) + (set! (-> self time-of-day) (-> self time-of-day-save)) + (let ((v1-30 (-> *display* bg-clock frame-counter)) + (a0-18 #x69780) + (a1-8 (/ (the int (* 1080000.0 (-> self time-of-day))) 60)) + ) + (set! (-> *display* bg-clock frame-counter) (+ (- v1-30 (the-as time-frame (mod v1-30 a0-18))) a0-18 a1-8)) + ) + (update-counters) + (kill-particles (-> self sun)) + (kill-particles (-> self green-sun)) + (kill-particles (-> self moon)) + (kill-particles (-> self day-star)) + (set! (-> self sun-count) 0) + (set! (-> self green-sun-count) 0) + (set! (-> self moon-count) 0) + (set! (-> self day-star-count) 0) + (-> self hours) + ) + (('ratio) + (-> self time-ratio) + ) + (('day-length) + (if (= (-> self time-ratio) 0.0) + 0 + (/ 25920000.0 (-> self time-ratio)) + ) + ) + (('time-frame) + (-> self frames) + ) + (('time-of-day) + (-> self time-of-day) + ) + (('time-of-day-norm) + (* 0.041666668 (-> self time-of-day)) + ) + (('hour) + (-> self hours) + ) + (('minute) + (-> self minutes) + ) + (('second) + (-> self seconds) + ) + (('dest-clock-ratio-set) + (set! (-> self dest-time-ratio) (the-as float (-> block param 0))) + (let ((f0-23 (-> self time-ratio)) + (f1-4 (-> self dest-time-ratio)) + (f2-1 (/ 300.0 (the float (-> block param 1)))) + ) + (set! (-> self dest-time-delta) (* (fabs (- f0-23 f1-4)) f2-1 (-> *display* real-clock seconds-per-frame))) + ) + (-> self dest-time-ratio) + ) + ) + ) + :code (behavior () + (until #f + (if (!= (-> self time-ratio) 0.0) + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id unk3)) + ) + (when (!= (-> self time-ratio) (-> self dest-time-ratio)) + (seek! (-> self time-ratio) (-> self dest-time-ratio) (-> self dest-time-delta)) + (update-rates! (-> *display* bg-clock) (-> self time-ratio)) + ) + (update-counters) + (suspend) + ) + #f + ) + :post time-of-day-update + ) + +(defbehavior init-time-of-day time-of-day-proc () + "Initialize the time-of-day process" + (stack-size-set! (-> self main-thread) 128) + (set! (-> self hours) 0) + (set! (-> self minutes) 0) + (set! (-> self seconds) 0) + (set! (-> self frames) (the-as uint 0)) + (set! (-> self time-of-day) 0.0) + (cond + (*time-of-day-fast* + (set! (-> self time-ratio) 60.0) + (set! (-> self dest-time-ratio) 60.0) + ) + (else + (set! (-> self time-ratio) 1.0) + (set! (-> self dest-time-ratio) 1.0) + ) + ) + (update-rates! (-> *display* bg-clock) (-> self time-ratio)) + (set! (-> self sun) (create-launch-control (-> *part-group-id-table* 3) self)) + (set! (-> self green-sun) (create-launch-control (-> *part-group-id-table* 4) self)) + (set! (-> self moon) (create-launch-control (-> *part-group-id-table* 5) self)) + (set! (-> self day-star) (create-launch-control (-> *part-group-id-table* 6) self)) + (set! (-> self event-hook) (-> time-of-day-tick event)) + (go time-of-day-tick) + ) + +(defun start-time-of-day () + "Start a new time of day process, killing old one if needed." + (kill-by-name "time-of-day-proc" *active-pool*) + (set! *time-of-day* + (process-spawn time-of-day-proc :init init-time-of-day :name "time-of-day-proc" :to *bg-pool*) + ) + *time-of-day* + ) + +(defun time-of-day-setup ((arg0 symbol)) + "Check if the time of day ratio is set up or not. If arg0 = #t, then set it if needed." + (when arg0 + (when (= (-> *time-of-day* 0 time-ratio) 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'ratio (if *time-of-day-fast* + #x42700000 + #x3f800000 + ) + ) + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id unk3)) + ) + ) + (!= (-> *time-of-day* 0 time-ratio) 0.0) + ) + +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; ERROR: function was not converted to expressions. Cannot decompile. + +(defun init-time-of-day-context ((arg0 time-of-day-context)) + "Set up lighting data to defaults" + (set-vector! (-> arg0 title-light-group dir0 color) 0.82 0.82 0.82 1.0) + (set-vector! (-> arg0 title-light-group dir1 color) 2.0 2.0 2.0 1.0) + (set-vector! (-> arg0 title-light-group ambi color) 0.4 0.4 0.4 1.0) + (set! (-> arg0 title-light-group dir0 extra x) 1.0) + (set! (-> arg0 title-light-group dir1 extra x) 1.0) + (set! (-> arg0 title-light-group ambi extra x) 1.0) + (set-vector! (-> arg0 rim-light-group dir0 color) 0.0 1.9 2.0 1.0) + (set-vector! (-> arg0 rim-light-group dir1 color) 0.0 1.9 2.0 1.0) + (set-vector! (-> arg0 rim-light-group dir2 color) 0.0 1.9 2.0 1.0) + (set-vector! (-> arg0 rim-light-group ambi color) 0.0 0.0 0.3 1.0) + (set! (-> arg0 rim-light-group dir0 extra x) 1.0) + (set! (-> arg0 rim-light-group dir1 extra x) 1.0) + (set! (-> arg0 rim-light-group dir2 extra x) 1.0) + (set! (-> arg0 rim-light-group ambi extra x) 1.0) + (set-vector! (-> arg0 rim-light-group2 dir0 color) 3.0 3.0 3.0 1.0) + (set-vector! (-> arg0 rim-light-group2 dir1 color) 3.0 3.0 3.0 1.0) + (set-vector! (-> arg0 rim-light-group2 dir2 color) 3.0 3.0 3.0 1.0) + (set-vector! (-> arg0 rim-light-group2 ambi color) 0.0 0.0 0.0 1.0) + (set! (-> arg0 rim-light-group2 dir0 extra x) 1.0) + (set! (-> arg0 rim-light-group2 dir1 extra x) 1.0) + (set! (-> arg0 rim-light-group2 dir2 extra x) 1.0) + (set! (-> arg0 rim-light-group2 ambi extra x) 1.0) + (set-vector! (-> arg0 rim-light-group3 dir0 color) 1.0 0.0 0.0 1.0) + (set-vector! (-> arg0 rim-light-group3 dir1 color) 1.0 0.0 0.0 1.0) + (set-vector! (-> arg0 rim-light-group3 dir2 color) 1.0 0.0 0.0 1.0) + (set-vector! (-> arg0 rim-light-group3 ambi color) 0.0 0.0 0.0 1.0) + (set! (-> arg0 rim-light-group3 dir0 extra x) 1.0) + (set! (-> arg0 rim-light-group3 dir1 extra x) 1.0) + (set! (-> arg0 rim-light-group3 dir2 extra x) 1.0) + (set! (-> arg0 rim-light-group3 ambi extra x) 1.0) + (set-vector! (-> arg0 filter-color) 1.0 1.0 1.0 1.0) + (set! (-> arg0 overide-enable) #f) + (when *debug-segment* + (mem-copy! (the-as pointer *overide-mood-color-table*) (the-as pointer *no-cloud-mood-color-table*) 256) + (mem-copy! (the-as pointer *overide-mood-fog-table*) (the-as pointer *no-cloud-clear-mood-fog-table*) 384) + (dotimes (v1-32 8) + (set! (-> *overide-mood-color-table* data v1-32 lgt-color w) 1.0) + (set! (-> *overide-mood-color-table* data v1-32 amb-color w) 1.0) + (set! (-> *overide-mood-fog-table* data v1-32 fog-color w) 1.0) + (set! (-> *overide-mood-fog-table* data v1-32 fog-dists x) + (* 0.00024414062 (-> *overide-mood-fog-table* data v1-32 fog-dists x)) + ) + (set! (-> *overide-mood-fog-table* data v1-32 fog-dists y) + (* 0.00024414062 (-> *overide-mood-fog-table* data v1-32 fog-dists y)) + ) + (set-vector! (-> *time-of-day-context* times v1-32) 1.0 1.0 1.0 1.0) + ) + #f + ) + ) + +(defun set-filter-color! ((arg0 float) (arg1 float) (arg2 float)) + "Set RGB of filter." + (set-vector! (-> *time-of-day-context* filter-color) arg0 arg1 arg2 1.0) + 0 + (none) + ) + +(defun tod-madd! ((arg0 vector) (arg1 vector) (arg2 vector)) + "Multiply-add" + (local-vars (v0-0 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (.mov vf6 arg2) + (.lvf vf4 (&-> arg0 quad)) + (.lvf vf5 (&-> arg1 quad)) + (.mul.w.vf acc vf4 vf0) + (.add.mul.x.vf vf4 vf5 vf6 acc) + (.svf (&-> arg0 quad) vf4) + (.mov v0-0 vf4) + v0-0 + ) + ) + +(defun update-environment-colors ((arg0 time-of-day-context)) + (let* ((v1-0 (-> arg0 light-group)) + (s4-0 (-> v1-0 0 ambi color)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (let ((s2-0 (-> arg0 current-prt-color)) + (s3-0 (-> arg0 current-env-color)) + ) + (vector4-lerp! s5-0 (-> v1-0 0 dir0 color) (-> v1-0 0 dir1 color) (-> v1-0 0 dir1 extra x)) + (when (and (= (-> s2-0 x) 0.0) (= (-> s2-0 y) 0.0) (= (-> s2-0 z) 0.0)) + (set! (-> s2-0 x) (* 0.5 (+ (-> s4-0 x) (* 0.5 (+ (-> s4-0 x) (-> s5-0 x)))))) + (set! (-> s2-0 y) (* 0.5 (+ (-> s4-0 y) (* 0.5 (+ (-> s4-0 y) (-> s5-0 y)))))) + (set! (-> s2-0 z) (* 0.5 (+ (-> s4-0 z) (* 0.5 (+ (-> s4-0 z) (-> s5-0 z)))))) + (set! (-> s2-0 w) 1.0) + ) + (when (and (= (-> s3-0 x) 0.0) (= (-> s3-0 y) 0.0) (= (-> s3-0 z) 0.0)) + (set! (-> s3-0 x) (* 48.0 (+ (-> s5-0 x) (* 0.5 (+ (-> s4-0 x) (-> s5-0 x)))))) + (set! (-> s3-0 y) (* 48.0 (+ (-> s5-0 y) (* 0.5 (+ (-> s4-0 y) (-> s5-0 y)))))) + (set! (-> s3-0 z) (* 48.0 (+ (-> s5-0 z) (* 0.5 (+ (-> s4-0 z) (-> s5-0 z)))))) + (set! (-> s3-0 w) 128.0) + ) + ) + (let* ((f0-23 (fmax (fmax (-> s4-0 x) (-> s4-0 y)) (-> s4-0 z))) + (f2-14 (fmax (fmax (-> s5-0 x) (-> s5-0 y)) (-> s5-0 z))) + (f0-27 (fmin 0.85 (- 1.0 (/ (* 0.5 f2-14) (+ f0-23 f2-14))))) + (v0-1 (-> arg0 current-shadow-color)) + ) + (set! (-> v0-1 x) f0-27) + (set! (-> v0-1 y) f0-27) + (set! (-> v0-1 z) f0-27) + (set! (-> v0-1 w) 1.0) + v0-1 + ) + ) + ) + +(defun update-time-of-day ((arg0 time-of-day-context)) + (with-pp + (set! (-> arg0 exterior-level) #f) + (init-weather! *mood-control*) + (update-colors-for-time *sky-work* (-> arg0 time)) + (cond + ((-> arg0 overide-enable) + (mem-copy! (the-as pointer (-> *overide-table* mood-fog-table)) (the-as pointer *overide-mood-fog-table*) 384) + (mem-copy! + (the-as pointer (-> *overide-table* mood-color-table)) + (the-as pointer *overide-mood-color-table*) + 256 + ) + (dotimes (v1-7 8) + (vector-float*! + (the-as vector (-> *overide-table* mood-fog-table data v1-7)) + (the-as vector (-> *overide-table* mood-fog-table data v1-7)) + (-> *overide-table* mood-fog-table data v1-7 fog-color w) + ) + (vector-float*! + (the-as vector (-> *overide-table* mood-color-table data v1-7)) + (the-as vector (-> *overide-table* mood-color-table data v1-7)) + (-> *overide-table* mood-color-table data v1-7 lgt-color w) + ) + (vector-float*! + (the-as vector (+ (the-as uint (-> *overide-table* mood-color-table data 0 amb-color)) (* v1-7 32))) + (the-as vector (+ (the-as uint (-> *overide-table* mood-color-table data 0 amb-color)) (* v1-7 32))) + (-> *overide-table* mood-color-table data v1-7 amb-color w) + ) + (set! (-> *overide-table* mood-fog-table data v1-7 fog-color w) 128.0) + (set! (-> *overide-table* mood-color-table data v1-7 lgt-color w) 0.0) + (set! (-> *overide-table* mood-fog-table data v1-7 fog-dists x) + (* 4096.0 (-> *overide-table* mood-fog-table data v1-7 fog-dists x)) + ) + (set! (-> *overide-table* mood-fog-table data v1-7 fog-dists y) + (* 4096.0 (-> *overide-table* mood-fog-table data v1-7 fog-dists y)) + ) + ) + (let ((s5-0 (-> *level* level-default mood-context))) + (clear-mood-times s5-0) + (update-mood-exterior s5-0 *overide-table* (-> arg0 time) 10) + (update-mood-itimes s5-0) + ) + ) + (else + (let ((s5-1 *mood-control*)) + (set! (-> arg0 current-clouds cloud-min) (-> s5-1 mood-clouds cloud-min)) + (set! (-> arg0 current-clouds cloud-max) (-> s5-1 mood-clouds cloud-max)) + (let ((s4-0 (-> *level* level-default mood-context))) + (clear-mood-times s4-0) + (update-mood-exterior s4-0 s5-1 (-> arg0 time) 10) + (update-mood-itimes s4-0) + ) + ) + ) + ) + (vector-float*! (-> arg0 filter) (-> arg0 filter-color) (-> arg0 filter-color w)) + (set! (-> arg0 sky) #f) + (set! (-> arg0 special-mood) #f) + (set! (-> arg0 use-camera-other) #f) + (set! (-> arg0 target-interp) 0.0) + (let ((f0-16 4096000.0)) + (dotimes (v1-19 (-> *level* length)) + (let ((a0-52 (-> *level* level v1-19))) + (when (= (-> a0-52 status) 'active) + (if (logtest? (-> a0-52 info level-flags) (level-flags lf9)) + (set! (-> arg0 sky) #t) + ) + (if (and (= (-> a0-52 display?) 'display) (-> a0-52 info special-mood)) + (set! (-> arg0 special-mood) (the-as basic (-> a0-52 info special-mood))) + ) + (if (logtest? (-> a0-52 info level-flags) (level-flags use-camera-other)) + (set! (-> arg0 use-camera-other) (the-as basic #t)) + ) + (set! f0-16 (fmin f0-16 (-> a0-52 info fog-height))) + ) + ) + ) + (if (!= (-> *time-of-day-context* special-mood) 'desert) + (set-fog-height! f0-16) + ) + ) + (if (-> arg0 sky) + (set! (-> (&-> *level* level-default texture-anim-array 9) 0) *sky-texture-anim-array*) + (set! (-> (&-> *level* level-default texture-anim-array 9) 0) #f) + ) + (let ((s5-2 (level-get-target-inside *level*))) + (dotimes (s4-1 10) + (let ((s3-0 (-> *level* level s4-1))) + (case (-> s3-0 status) + (('active 'loaded 'shutdown 'special) + (when (not (paused?)) + (cond + ((not s5-2) + (set! (-> arg0 interp s4-1) 1.0) + ) + ((= s3-0 s5-2) + (if *teleport* + (set! (-> arg0 interp s4-1) 1.0) + (set! (-> arg0 interp s4-1) (fmin 1.0 (+ 0.0166 (-> arg0 interp s4-1)))) + ) + ) + (*teleport* + (set! (-> arg0 interp s4-1) 0.0) + ) + (else + (set! (-> arg0 interp s4-1) (fmax 0.0 (+ -0.0166 (-> arg0 interp s4-1)))) + ) + ) + ) + (let ((s2-0 (-> pp clock))) + (set! (-> pp clock) (-> *display* real-clock)) + (set! (-> s3-0 mood-func) (the-as (function mood-context float int none) (-> s3-0 info mood-func value))) + (clear-mood-times (-> s3-0 mood-context)) + (if (nonzero? (-> s3-0 mood-func)) + ((-> s3-0 mood-func) (-> s3-0 mood-context) (-> arg0 time) s4-1) + (update-mood-default (-> s3-0 mood-context) (-> arg0 time) s4-1) + ) + (when (-> arg0 overide-enable) + (let ((s1-0 (new 'stack-no-clear 'structure))) + (dotimes (s0-0 8) + (let ((a1-59 (-> s3-0 mood-context times s0-0))) + (vector-float*! (the-as vector s1-0) (-> arg0 times s0-0) (-> arg0 times s0-0 w)) + (vector4-mul! (the-as vector4 a1-59) (the-as vector4 a1-59) (the-as vector4 s1-0)) + ) + ) + ) + ) + (update-mood-itimes (-> s3-0 mood-context)) + (set! (-> pp clock) s2-0) + ) + ) + (else + (set! (-> arg0 interp s4-1) 0.0) + ) + ) + ) + ) + ) + (if (and (-> arg0 exterior-level) (!= (-> *mood-control* lightning-flash) 0.0)) + (set! (-> *display* force-sync) (the-as uint 2)) + ) + (let ((f0-29 0.0)) + (dotimes (v1-91 10) + (+! f0-29 (-> arg0 interp v1-91)) + ) + (when (!= f0-29 0.0) + (dotimes (v1-95 10) + (set! (-> arg0 interp v1-95) (/ (-> arg0 interp v1-95) f0-29)) + ) + (let ((v1-98 (-> arg0 current-fog))) + (dotimes (a0-83 103) + ;; og:preserve-this + (set! (-> (the-as (pointer int128) (+ (* a0-83 16) (the-as int v1-98)))) (the int128 0)) + ) + ) + (let* ((s5-3 (-> arg0 current-fog)) + (s4-2 (-> *mood-control* range)) + (v1-103 (level-get-target-inside *level*)) + (s3-1 (if v1-103 + (-> v1-103 index) + 0 + ) + ) + ) + (set! (-> s4-2 quad) (the-as uint128 0)) + (set! (-> arg0 max-rain) 0.0) + (set! (-> arg0 fog-mult) 0.0) + (set! (-> arg0 ocean-alpha) 0.0) + (dotimes (s2-1 10) + (let ((f30-0 (-> arg0 interp s2-1)) + (s1-1 (-> *level* level s2-1)) + ) + (when (!= f30-0 0.0) + (let ((a2-23 (-> s1-1 mood-context))) + (vector4-array-madd! + (the-as (inline-array vector4) s5-3) + (the-as (inline-array vector4) s5-3) + (the-as (inline-array vector4) a2-23) + f30-0 + 7 + ) + ) + (dotimes (s0-1 8) + (let ((a2-24 (-> s1-1 mood-context light-group s0-1)) + (a1-63 (-> arg0 light-group s0-1)) + ) + (light-group-madd! a1-63 (the-as (pointer light-group) a1-63) a2-24 f30-0) + ) + ) + (let ((a2-25 (-> s1-1 info mood-range))) + (vector4-madd! (the-as vector4 s4-2) (the-as vector4 s4-2) (the-as vector4 a2-25) f30-0) + ) + (+! (-> arg0 max-rain) (* (-> s1-1 info max-rain) f30-0)) + (+! (-> arg0 fog-mult) (* (-> s1-1 info fog-mult) f30-0)) + (+! (-> arg0 ocean-alpha) (* (-> s1-1 info ocean-alpha) f30-0)) + (when (= s2-1 s3-1) + (dotimes (v1-126 8) + (let ((a0-92 (-> s1-1 mood-context light-group v1-126)) + (a1-68 (-> arg0 light-group v1-126)) + ) + (dotimes (a2-26 4) + (set! (-> a1-68 lights a2-26 extra y) (-> a0-92 lights a2-26 extra y)) + ) + ) + ) + ) + ) + ) + ) + ) + (dotimes (s5-4 8) + (dotimes (s4-3 3) + (let ((v1-135 (+ (+ (* 48 s4-3) 156 (* 192 s5-4)) (the-as int arg0)))) + (vector-normalize! (the-as vector (+ v1-135 0)) 1.0) + ) + ) + ) + ) + ) + (if (and (-> arg0 overide-enable) (!= (-> *time-of-day-context* mode) 8)) + (mem-copy! + (the-as pointer (-> arg0 current-fog)) + (the-as + pointer + (-> *overide-table* + mood-fog-table + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + ) + ) + 48 + ) + ) + (let ((f30-1 (-> *blit-displays-work* slow-time)) + (a1-76 (new 'stack-no-clear 'vector)) + (s5-5 (-> arg0 current-fog)) + ) + (let ((f28-0 f30-1)) + (dotimes (v1-151 4) + (set! f28-0 (* f28-0 f30-1)) + ) + (set-vector! a1-76 0.0 48.0 128.0 128.0) + (vector4-lerp! (-> s5-5 fog-color) a1-76 (-> s5-5 fog-color) f30-1) + (set! (-> s5-5 fog-dists x) (lerp 131072.0 (-> s5-5 fog-dists x) f30-1)) + (set! (-> s5-5 fog-dists y) (lerp 819200.0 (-> s5-5 fog-dists y) f28-0)) + ) + (set! (-> s5-5 fog-dists z) (lerp 199.0 (-> s5-5 fog-dists z) f30-1)) + (set! (-> s5-5 fog-dists w) (lerp 64.0 (-> s5-5 fog-dists w) f30-1)) + ) + (update-environment-colors arg0) + (let ((a0-109 (-> arg0 current-fog)) + (v1-156 *fog-texture-work*) + ) + (let ((a1-81 (-> a0-109 fog-color))) + (set! *fog-color* + (new 'static 'rgba :r (the int (-> a1-81 x)) :g (the int (-> a1-81 y)) :b (the int (-> a1-81 z))) + ) + (set! (-> v1-156 color) (new 'static 'rgba + :r (the int (-> a1-81 x)) + :r (the int (-> a1-81 x)) + :g (the int (-> a1-81 y)) + :b (the int (-> a1-81 z)) + ) + ) + ) + (let ((a1-86 (-> a0-109 erase-color))) + (set! (-> arg0 erase-color) + (new 'static 'rgba :a #x80 :b (the int (-> a1-86 z)) :g (the int (-> a1-86 y)) :r (the int (-> a1-86 x))) + ) + ) + (let ((f0-73 (-> a0-109 fog-dists x)) + (f1-18 (-> a0-109 fog-dists y)) + ) + (let ((f3-0 (-> a0-109 fog-dists z)) + (f2-2 (-> a0-109 fog-dists w)) + ) + (set! (-> *math-camera* fog-start) f0-73) + (set! (-> *math-camera* fog-end) f1-18) + (set! (-> *math-camera* fog-max) f3-0) + (set! (-> *math-camera* fog-min) f2-2) + (set! (-> v1-156 alpha-near) (* 0.003921569 (the float (- 255 (the int f3-0))))) + (set! (-> v1-156 alpha-far) (* 0.003921569 (the float (- 255 (the int f2-2))))) + ) + (set! (-> v1-156 alpha-delta) (- (-> v1-156 alpha-far) (-> v1-156 alpha-near))) + (set! (-> v1-156 fog-near) f0-73) + (set! (-> v1-156 fog-far) f1-18) + (set! (-> v1-156 fog-delta) (- f1-18 f0-73)) + ) + ) + (set-cloud-minmax! (-> arg0 current-clouds cloud-min) (-> arg0 current-clouds cloud-max)) + (reset! *palette-fade-controls*) + 0 + (none) + ) + ) + +(defun calc-fade-from-fog ((arg0 vector)) + (let* ((f0-0 (vector-vector-distance (math-camera-pos) arg0)) + (v1-1 (-> *time-of-day-context* current-fog)) + (f1-0 (-> v1-1 fog-dists x)) + (f2-0 (-> v1-1 fog-dists y)) + (f3-1 (* 0.003921569 (-> v1-1 fog-dists w))) + (f4-2 (* 0.003921569 (-> v1-1 fog-dists z))) + ) + (+ f4-2 (* (fmax 0.0 (fmin 1.0 (/ (- f0-0 f1-0) (- f2-0 f1-0)))) (- f3-1 f4-2))) + ) + ) + +(defmethod set-fade! ((this palette-fade-controls) (arg0 int) (arg1 float) (arg2 float) (arg3 vector)) + (cond + ((and (>= arg0 0) (< arg0 8)) + (let ((v1-3 (-> this control arg0))) + (when (< arg2 (-> v1-3 actor-dist)) + (if arg3 + (set! (-> v1-3 trans quad) (-> arg3 quad)) + ) + (set! (-> v1-3 fade) (fmax 0.0 (fmin 1.993 arg1))) + (set! (-> v1-3 actor-dist) arg2) + ) + ) + ) + (else + (format 0 "ERROR: Bogus palette-fade-control index!~%") + ) + ) + ) + +(defmethod reset! ((this palette-fade-controls)) + (countdown (v1-0 8) + (let ((a1-2 (-> this control v1-0))) + (set! (-> a1-2 fade) 0.0) + (set! (-> a1-2 actor-dist) 4096000000.0) + ) + ) + 0 + (none) + ) + +(start-time-of-day) diff --git a/goal_src/jak3/engine/gfx/mood/weather-part.gc b/goal_src/jak3/engine/gfx/mood/weather-part.gc index 6256c79bd0..a376fdb05d 100644 --- a/goal_src/jak3/engine/gfx/mood/weather-part.gc +++ b/goal_src/jak3/engine/gfx/mood/weather-part.gc @@ -7,3 +7,914 @@ ;; DECOMP BEGINS +(defpartgroup group-rain-screend-drop-real + :id 1 + :flags (sp2) + :bounds (static-bspherem 0 0 0 16) + :parts ((sp-item 23 :binding 19) + (sp-item 19 :flags (sp2 sp3) :binding 20) + (sp-item 19 :flags (sp2 sp3) :binding 20) + (sp-item 19 :flags (sp2 sp3) :binding 20) + (sp-item 19 :flags (sp2 sp3) :binding 20) + (sp-item 19 :flags (sp2 sp3) :binding 20) + (sp-item 19 :flags (sp2 sp3) :binding 20) + (sp-item 19 :flags (sp2 sp3) :binding 20) + (sp-item 19 :flags (sp2 sp3) :binding 20) + (sp-item 19 :flags (sp2 sp3) :binding 20) + (sp-item 19 :flags (sp2 sp3) :binding 20) + (sp-item 19 :flags (sp2 sp3) :binding 20) + (sp-item 19 :flags (sp2 sp3) :binding 20) + (sp-item 19 :flags (sp2 sp3) :binding 20) + (sp-item 19 :flags (sp2 sp3) :binding 20) + (sp-item 19 :flags (sp2 sp3) :binding 20) + (sp-item 19 :flags (sp2 sp3) :binding 20) + (sp-item 20 :flags (sp2 sp3)) + (sp-item 20 :flags (sp2 sp3)) + (sp-item 20 :flags (sp2 sp3)) + (sp-item 20 :flags (sp2 sp3)) + (sp-item 20 :flags (sp2 sp3)) + (sp-item 20 :flags (sp2 sp3)) + (sp-item 20 :flags (sp2 sp3)) + (sp-item 20 :flags (sp2 sp3)) + (sp-item 20 :flags (sp2 sp3)) + (sp-item 20 :flags (sp2 sp3)) + (sp-item 20 :flags (sp2 sp3)) + (sp-item 20 :flags (sp2 sp3)) + (sp-item 20 :flags (sp2 sp3)) + (sp-item 20 :flags (sp2 sp3)) + (sp-item 20 :flags (sp2 sp3)) + (sp-item 20 :flags (sp2 sp3)) + (sp-item 24 :binding 21) + (sp-item 21 :flags (sp2 sp3) :binding 22) + (sp-item 21 :flags (sp2 sp3) :binding 22) + (sp-item 21 :flags (sp2 sp3) :binding 22) + (sp-item 21 :flags (sp2 sp3) :binding 22) + (sp-item 21 :flags (sp2 sp3) :binding 22) + (sp-item 21 :flags (sp2 sp3) :binding 22) + (sp-item 21 :flags (sp2 sp3) :binding 22) + (sp-item 21 :flags (sp2 sp3) :binding 22) + (sp-item 21 :flags (sp2 sp3) :binding 22) + (sp-item 21 :flags (sp2 sp3) :binding 22) + (sp-item 21 :flags (sp2 sp3) :binding 22) + (sp-item 21 :flags (sp2 sp3) :binding 22) + (sp-item 21 :flags (sp2 sp3) :binding 22) + (sp-item 21 :flags (sp2 sp3) :binding 22) + (sp-item 21 :flags (sp2 sp3) :binding 22) + (sp-item 21 :flags (sp2 sp3) :binding 22) + (sp-item 22 :flags (sp2 sp3)) + (sp-item 22 :flags (sp2 sp3)) + (sp-item 22 :flags (sp2 sp3)) + (sp-item 22 :flags (sp2 sp3)) + (sp-item 22 :flags (sp2 sp3)) + (sp-item 22 :flags (sp2 sp3)) + (sp-item 22 :flags (sp2 sp3)) + (sp-item 22 :flags (sp2 sp3)) + (sp-item 22 :flags (sp2 sp3)) + (sp-item 22 :flags (sp2 sp3)) + (sp-item 22 :flags (sp2 sp3)) + (sp-item 22 :flags (sp2 sp3)) + (sp-item 22 :flags (sp2 sp3)) + (sp-item 22 :flags (sp2 sp3)) + (sp-item 22 :flags (sp2 sp3)) + (sp-item 22 :flags (sp2 sp3)) + ) + ) + +(define group-rain-screend-drop (-> *part-group-id-table* 1)) + +(defpart 24 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.1) + (:x (meters -4.5) (meters 9)) + (:y (meters -3) (meters 6)) + (:scale-x (meters 2.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 12.0) + (:scalevel-x (meters 0.16666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.8) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 21 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 20.0) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.8) + (:accel-y (meters -0.00066666666)) + (:timer (seconds 0.9)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.05)) + (:next-launcher 25) + ) + ) + +(defpart 25 + :init-specs ((:scalevel-x (meters 0.004166667)) (:scalevel-y :copy scalevel-x) (:fade-a -0.06666667)) + ) + +(defpart 22 + :init-specs ((:num 1.0) + (:rot-x 12) + (:r 4096.0) + (:g 3276.8) + (:b 3276.8) + (:fade-r 6.068148) + (:fade-g 68.26667) + (:fade-b 3.034074) + (:accel-y (meters -0.00066666666)) + (:timer (seconds 0.9)) + (:flags (distort)) + (:next-time (seconds 0.1)) + (:next-launcher 26) + ) + ) + +(defpart 26 + :init-specs ((:fade-g -5.1200004)) + ) + +(defpart 23 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.1) + (:x (meters -4.5) (meters 9)) + (:y (meters -3) (meters 6)) + (:scale-x (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 12.0) + (:scalevel-x (meters 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.8) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 19 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.6)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 20.0) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.8) + (:accel-y (meters -0.00066666666)) + (:timer (seconds 0.9)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.05)) + (:next-launcher 27) + ) + ) + +(defpart 27 + :init-specs ((:scalevel-x (meters 0.008333334)) (:scalevel-y :copy scalevel-x) (:fade-a -0.06666667)) + ) + +(defpart 20 + :init-specs ((:num 1.0) + (:rot-x 24) + (:r 12288.0) + (:g 6553.6) + (:b 6553.6) + (:fade-r 12.136296) + (:fade-g 136.53334) + (:fade-b 6.068148) + (:accel-y (meters -0.00066666666)) + (:timer (seconds 0.9)) + (:flags (distort)) + (:next-time (seconds 0.1)) + (:next-launcher 28) + ) + ) + +(defpart 28 + :init-specs ((:fade-g -10.240001)) + ) + +(defpartgroup group-stars + :id 2 + :flags (sp1) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 29 :flags (sp6)) (sp-item 30 :flags (sp6)) (sp-item 31 :flags (sp6))) + ) + +(defpart 29 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30) (meters 20)) + (:scale-y :copy scale-x) + (:r 256.0) + (:g 256.0) + (:b 256.0) + (:a 0.0) + (:fade-a 0.42666668) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.2) (seconds 0.797)) + (:next-launcher 32) + (:conerot-x (degrees -89) (degrees 178)) + (:conerot-y (degrees 0) (degrees 1440)) + (:rotate-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 5000)) + ) + ) + +(defpart 32 + :init-specs ((:fade-a 0.0) (:next-time (seconds 99999)) (:next-launcher 33)) + ) + +(defpart 33 + :init-specs ((:fade-a -0.42666668)) + ) + +(defpart 30 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30) (meters 20)) + (:scale-y :copy scale-x) + (:r 256.0) + (:g 256.0) + (:b 256.0) + (:a 0.0) + (:fade-a 0.42666668) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.2) (seconds 0.797)) + (:next-launcher 32) + (:conerot-x (degrees 30) (degrees 59)) + (:conerot-y (degrees 0) (degrees 2880)) + (:rotate-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 5000)) + ) + ) + +(defpart 31 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30) (meters 20)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:fade-a 0.42666668) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.2) (seconds 0.797)) + (:next-launcher 32) + (:conerot-x (degrees 60) (degrees 29)) + (:conerot-y (degrees 0) (degrees 5760)) + (:rotate-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 5000)) + ) + ) + +(defpart 34 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 4.0) + (:x (meters 10) (meters 10)) + (:y (meters 2) (meters 14)) + (:scale-x (meters 0.2) (meters 0.1)) + (:rot-x 4) + (: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.01) (meters -0.0033333334)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:fade-a 0.85333335) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.25) (seconds 0.247)) + (:next-launcher 35) + (:rotate-y (degrees 0) (degrees 180)) + ) + ) + +(defpart 36 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.0) + (:x (meters 0) (meters 20)) + (:y (meters 16)) + (:scale-x (meters 0.2) (meters 0.1)) + (:rot-x 4) + (: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.01) (meters -0.0033333334)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:fade-a 0.85333335) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.25) (seconds 0.247)) + (:next-launcher 35) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 35 + :init-specs ((:fade-a 0.0) (:next-time (seconds 4)) (:next-launcher 37)) + ) + +(defpart 37 + :init-specs ((:fade-a -0.85333335)) + ) + +(defun update-snow ((arg0 float) (arg1 vector) (arg2 vector)) + (let ((f0-0 (lerp-scale 0.0 1.0 (vector-length arg2) 2048.0 40960.0))) + (set! (-> *part-id-table* 36 init-specs 1 initial-valuef) (- 1.0 f0-0)) + (set! (-> *part-id-table* 34 init-specs 1 initial-valuef) (* 4.0 f0-0)) + ) + (set! (-> *part-id-table* 34 init-specs 19 initial-valuef) (+ 32768.0 (vector-y-angle arg2))) + (launch-particles (-> *part-id-table* 36) arg1) + (launch-particles (-> *part-id-table* 34) arg1) + 0 + (none) + ) + +(defpart 38 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:birth-func 'birth-func-rain) + (:num 1.0) + (:x (meters -20) (meters 40)) + (:y (meters 30)) + (:scale-x (meters 0.03) (meters 0.03)) + (:scale-y (meters 0.5) (meters 0.5)) + (:r 32.0 32.0) + (:g :copy r) + (:b 64.0 32.0) + (:a 32.0 64.0) + (:vel-y (meters -0.1) (meters -0.2)) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:userdata 0.0) + (:func 'check-drop-level-rain) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 39 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:birth-func 'birth-func-rain) + (:num 4.0) + (:x (meters -20) (meters 40)) + (:y (meters 30)) + (:scale-x (meters 0.03) (meters 0.03)) + (:scale-y (meters 0.5) (meters 0.5)) + (:r 32.0 32.0) + (:g :copy r) + (:b 64.0 32.0) + (:a 32.0 64.0) + (:vel-y (meters -0.06666667) (meters -0.033333335)) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:userdata 0.0) + (:func 'check-drop-level-rain2) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 40 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 1.0 3.0) + (:scale-x (meters 0.08) (meters 0.03)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g :copy r) + (:b 64.0 32.0) + (:a 64.0 64.0) + (:omega (degrees 0.01575) (degrees 0.009)) + (:vel-y (meters 0.033333335) (meters 0.06666667)) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.005) (meters -0.00066666666)) + (:friction 0.98) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 launch-along-z)) + (:userdata 0.0) + (:func 'check-drop-level-splash) + (:next-time (seconds 0) (seconds 0.33)) + (:next-launcher 41) + (:conerot-x (degrees 0) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 42 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-omega-normal-orient) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 0.5) (meters 0.25)) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g :copy r) + (:b 64.0 32.0) + (:a 64.0 32.0) + (:omega (degrees 0)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.2) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 10 0 0 #x401800 #x403d00 #x400700 #x408200)) + (:func 'sparticle-texture-animate) + ) + ) + +(defpart 43 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 2.0 4.0) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.06) (meters 0.03)) + (:r 255.0) + (:g 128.0 128.0) + (:b 0.0 128.0) + (:a 128.0) + (:omega (degrees 0.018) (degrees 0.01125)) + (:vel-y (meters 0.1) (meters 0.06666667)) + (:fade-g -2.55 -2.55) + (:fade-b -8.0) + (:fade-a -0.32 -0.64) + (:friction 0.8 0.02) + (:timer (seconds 0.335) (seconds 0.33)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 80)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 44 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.25)) + (:rot-x (degrees 0.225)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 196.0 128.0) + (:b 128.0 64.0) + (:a 96.0 16.0) + (:omega (degrees 3608.9998)) + (:scalevel-x (meters 0.08)) + (:scalevel-y :copy scalevel-x) + (:fade-g -6.375) + (:fade-b -13.066667) + (:fade-a -2.8) + (:timer (seconds 0.05) (seconds 0.03)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + ) + ) + +(defun birth-func-omega-normal-orient ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (local-vars (v1-6 float) (v1-7 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'quaternion)) + ) + (set! (-> s4-0 x) (* 0.007874016 (the float (-> arg1 datab 2)))) + (set! (-> s4-0 y) 0.0) + (set! (-> s4-0 z) (* -0.007874016 (the float (-> arg1 datab 0)))) + (vector-normalize! s4-0 1.0) + (quaternion-vector-angle! gp-0 s4-0 (acos (* 0.007874016 (the float (-> arg1 datab 1))))) + (cond + ((< (-> gp-0 w) 0.0) + (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> gp-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) + (.mov v1-6 vf1) + ) + (else + (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> gp-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) + (.mov v1-7 vf1) + ) + ) + ) + 0 + (none) + ) + ) + +(defun birth-func-rain ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (let ((s4-0 (new 'stack-no-clear 'collide-query))) + (set! (-> s4-0 start-pos quad) (-> arg2 x-y-z-sx quad)) + (set-vector! (-> s4-0 move-dist) 0.0 -163840.0 0.0 1.0) + (let ((v1-2 s4-0)) + (set! (-> v1-2 radius) 40.96) + (set! (-> v1-2 collide-with) (collide-spec backgnd)) + (set! (-> v1-2 ignore-process0) #f) + (set! (-> v1-2 ignore-process1) #f) + (set! (-> v1-2 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-2 action-mask) (collide-action solid)) + ) + (fill-using-line-sphere *collide-cache* s4-0) + (cond + ((>= (probe-using-line-sphere *collide-cache* s4-0) 0.0) + (set! (-> arg1 user-float) (-> s4-0 best-other-tri intersect y)) + (let ((f0-8 (+ 65536.0 (-> *math-camera* trans y)))) + (if (< (-> arg1 user-float) f0-8) + (set! (-> arg2 x-y-z-sx y) f0-8) + ) + ) + (set! (-> arg1 datab 0) (the int (* 127.0 (-> s4-0 best-other-tri normal x)))) + (set! (-> arg1 datab 1) (the int (* 127.0 (-> s4-0 best-other-tri normal y)))) + (set! (-> arg1 datab 2) (the int (* 127.0 (-> s4-0 best-other-tri normal z)))) + (set! (-> arg1 datab 3) (the-as int (-> s4-0 best-other-tri pat event))) + ) + (else + (set! (-> arg1 omega) 65280.0) + (set! (-> arg1 user-float) (+ -204800.0 (-> arg2 x-y-z-sx y))) + ) + ) + ) + (let ((f0-21 (get-height *ocean* (-> arg2 x-y-z-sx) #f))) + (when (!= f0-21 4095996000.0) + (when (< (-> arg1 user-float) f0-21) + (set! (-> arg1 user-float) f0-21) + (set! (-> arg1 datab 0) 0) + (set! (-> arg1 datab 1) 127) + (set! (-> arg1 datab 2) 0) + (set! (-> arg1 datab 3) 0) + 0 + ) + ) + ) + 0 + (none) + ) + +(defun check-drop-level-rain ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (when (< (-> arg2 y) (-> arg1 user-float)) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'matrix)) + ) + (let ((f30-0 (-> arg1 user-float))) + (sp-kill-particle arg0 arg1) + (set-vector! s4-0 (-> arg2 x) (-> arg1 user-float) (-> arg2 z) 1.0) + (-> arg1 omega) + (set-vector! + (-> gp-0 uvec) + (* 0.007874016 (the float (-> arg1 datab 0))) + (* 0.007874016 (the float (-> arg1 datab 1))) + (* 0.007874016 (the float (-> arg1 datab 2))) + 0.0 + ) + (set-vector! (-> gp-0 fvec) 0.0 0.0 1.0 0.0) + (vector-cross! (-> gp-0 rvec) (-> gp-0 uvec) (-> gp-0 fvec)) + (set! (-> gp-0 trans quad) (-> s4-0 quad)) + (set! (-> *part-id-table* 40 init-specs 23 initial-valuef) (vector-y-angle (-> gp-0 uvec))) + (set! (-> *part-id-table* 40 init-specs 22 initial-valuef) (- 16384.0 (vector-x-angle (-> gp-0 uvec)))) + (set! (-> *part-id-table* 40 init-specs 16 initial-valuef) f30-0) + ) + (launch-particles (-> *part-id-table* 40) gp-0 :origin-is-matrix #t) + (case (-> arg1 datab 3) + ((11 10) + (sound-play "sizzle-drips") + (launch-particles (-> *part-id-table* 44) gp-0 :origin-is-matrix #t) + (launch-particles (-> *part-id-table* 43) gp-0 :origin-is-matrix #t) + ) + (else + (sound-play "dry-drips") + (set! (-> *part-id-table* 42 init-specs 10 initial-valuef) (-> arg1 omega)) + (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 42) gp-0 :origin-is-matrix #t) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun check-drop-level-rain2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (if (< (-> arg2 y) (-> arg1 user-float)) + (sp-kill-particle arg0 arg1) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun check-drop-level-splash ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-motion-blur arg0 arg1 arg2) + (if (< (-> arg2 y) (-> arg1 user-float)) + (sp-kill-particle arg0 arg1) + ) + (none) + ) + +(defun update-rain ((arg0 float) (arg1 vector) (arg2 vector)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 x) (-> arg2 x)) + (set! (-> v1-0 y) 0.0) + (set! (-> v1-0 z) (-> arg2 z)) + (set! (-> v1-0 w) 1.0) + (let ((gp-1 (vector+float*! (new 'stack-no-clear 'vector) arg1 v1-0 0.0))) + (let* ((s4-0 (matrix-local->world #f #f)) + (f28-0 (lerp-scale 122.88 245.76 (fabs (-> s4-0 fvec y)) 0.0 0.7)) + (f30-0 (lerp-scale 2048.0 245.76 (fabs (-> s4-0 fvec y)) 0.0 0.7)) + ) + (let ((f26-0 (lerp-scale 0.0 0.1 (-> s4-0 fvec y) 0.3 0.7)) + (f0-11 (lerp-scale 1.0 0.1 (-> s4-0 fvec y) 0.3 0.7)) + ) + (if (< 0.0 f26-0) + (send-event *camera* 'part-water-drip f26-0 f0-11) + ) + ) + (set! (-> *part-id-table* 38 init-specs 5 initial-valuef) f28-0) + (set! (-> *part-id-table* 38 init-specs 5 random-rangef) f28-0) + (set! (-> *part-id-table* 39 init-specs 5 initial-valuef) f28-0) + (set! (-> *part-id-table* 39 init-specs 5 random-rangef) f28-0) + (set! (-> *part-id-table* 38 init-specs 6 initial-valuef) f30-0) + (set! (-> *part-id-table* 38 init-specs 6 random-rangef) f30-0) + (set! (-> *part-id-table* 39 init-specs 6 initial-valuef) f30-0) + (set! (-> *part-id-table* 39 init-specs 6 random-rangef) f30-0) + ) + (set! (-> *part-id-table* 38 init-specs 2 initial-valuef) arg0) + (set! (-> *part-id-table* 39 init-specs 2 initial-valuef) (* 4.0 arg0)) + (launch-particles (-> *part-id-table* 38) gp-1) + (launch-particles (-> *part-id-table* 39) gp-1) + ) + ) + 0 + (none) + ) + +(defbehavior cam-master-effect camera-master () + (when (not (or (movie?) (>= (+ (current-time) (seconds -10)) (-> self water-drip-time)))) + (set! (-> *part-id-table* 24 init-specs 1 initial-valuef) (-> self water-drip-mult)) + (set! (-> *part-id-table* 23 init-specs 1 initial-valuef) (* 0.9 (-> self water-drip-mult))) + (set! (-> *part-id-table* 21 init-specs 11 initial-valuef) (* -2.7306666 (-> self water-drip-speed))) + (set! (-> *part-id-table* 22 init-specs 8 initial-valuef) (* -2.7306666 (-> self water-drip-speed))) + (set! (-> *part-id-table* 19 init-specs 11 initial-valuef) (* -2.7306666 (-> self water-drip-speed))) + (set! (-> *part-id-table* 20 init-specs 8 initial-valuef) (* -2.7306666 (-> self water-drip-speed))) + (spawn (-> self water-drip) *zero-vector*) + ) + 0 + (none) + ) + +(defun sparticle-track-sun ((arg0 int) (arg1 sparticle-cpuinfo) (arg2 matrix)) + (-> arg1 key) + (let* ((s2-0 (the int (-> arg1 user-float))) + (s5-0 (math-camera-pos)) + (s4-0 (the-as object (+ (the-as uint (-> *sky-work* upload-data)) (* (/ s2-0 4) 64)))) + ) + (let ((s3-0 *time-of-day*) + (v1-4 (-> *math-camera* inv-camera-rot)) + ) + (cond + ((= s2-0 1) + (set! (-> arg2 uvec z) (+ 8192.0 (* 0.5 (vector-y-angle (-> v1-4 fvec))))) + (set! (-> s3-0 0 sun-count) 1) + ) + ((= s2-0 4) + (set! (-> arg2 uvec z) (+ -8192.0 (* 0.5 (vector-y-angle (-> v1-4 fvec))))) + (+! (-> s3-0 0 green-sun-count) 1) + ) + ((= s2-0 8) + (set! (-> arg2 uvec z) (+ -8192.0 (* 0.5 (vector-y-angle (-> v1-4 fvec))))) + (+! (-> s3-0 0 moon-count) 1) + ) + ((= s2-0 12) + (set! (-> arg2 uvec z) (+ -8192.0 (* 0.5 (vector-y-angle (-> v1-4 fvec))))) + (+! (-> s3-0 0 day-star-count) 1) + (let ((f0-15 (* 6144000.0 (fmax 0.3 (fmin 1.0 (* 0.01 (-> *game-info* percent-complete))))))) + (set! (-> arg2 rvec w) f0-15) + (set! (-> arg2 uvec w) f0-15) + ) + ) + ((= s2-0 13) + (set! (-> arg2 uvec z) (+ -8192.0 (* 0.5 (vector-y-angle (-> v1-4 fvec))))) + (+! (-> s3-0 0 day-star-count) 1) + (let ((f0-20 (* 12288000.0 (fmax 0.3 (fmin 1.0 (* 0.01 (-> *game-info* percent-complete))))))) + (set! (-> arg2 rvec w) f0-20) + (set! (-> arg2 uvec w) f0-20) + ) + ) + ) + ) + (let ((s3-1 (new 'stack-no-clear 'vector))) + (set! (-> s3-1 quad) (-> (the-as vector s4-0) quad)) + (if (-> *time-of-day-context* use-camera-other) + (vector-matrix*! s3-1 s3-1 (-> *math-camera* camera-rot-other-sky)) + ) + (vector+float*! s3-1 s5-0 s3-1 4096.0) + (set! (-> arg2 rvec x) (-> s3-1 x)) + (set! (-> arg2 rvec y) (-> s3-1 y)) + (set! (-> arg2 rvec z) (-> s3-1 z)) + ) + ) + 0 + (none) + ) + +(defpartgroup group-sun + :id 3 + :flags (sp1) + :bounds (static-bspherem 0 0 0 70) + :parts ((sp-item 45 :flags (sp3 sp6)) (sp-item 46 :flags (sp3 sp6))) + ) + +(defpart 45 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2550)) + (:rot-x (degrees 1687.5)) + (:rot-z (degrees 30)) + (:scale-y (meters 2550)) + (:r 64.0) + (:g 64.0) + (:b 16.0) + (:a 70.0) + (:omega (degrees 0)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 1.0) + (:func 'sparticle-track-sun) + ) + ) + +(defpart 46 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 12000)) + (:rot-x (degrees 1687.5)) + (:rot-z (degrees 30)) + (:scale-y (meters 12000)) + (:r 64.0) + (:g 32.0) + (:b 0.0) + (:a 80.0) + (:omega (degrees 0)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 1.0) + (:func 'sparticle-track-sun) + ) + ) + +(defpartgroup group-green-sun + :id 4 + :flags (sp1) + :bounds (static-bspherem 0 0 0 70) + :parts ((sp-item 47 :flags (sp3 sp6)) (sp-item 48 :flags (sp3 sp6))) + ) + +(defpart 47 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1500)) + (:rot-x (degrees 1125)) + (:rot-z (degrees 30)) + (:scale-y (meters 1500)) + (:r 16.0) + (:g 64.0) + (:b 32.0) + (:a 64.0) + (:omega (degrees 0)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 4.0) + (:func 'sparticle-track-sun) + ) + ) + +(defpart 48 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3000)) + (:rot-x (degrees 1125)) + (:rot-z (degrees 30)) + (:scale-y (meters 3000)) + (:r 0.0) + (:g 43.0) + (:b 8.0) + (:a 64.0) + (:omega (degrees 0)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 4.0) + (:func 'sparticle-track-sun) + ) + ) + +(defpartgroup group-moon + :id 5 + :flags (sp1) + :bounds (static-bspherem 0 0 0 70) + :parts ((sp-item 49 :flags (sp3 sp6))) + ) + +(defpart 49 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6000)) + (:rot-x (degrees 2992.5)) + (:rot-z (degrees 30)) + (:scale-y (meters 6000)) + (:r 16.0) + (:g 32.0) + (:b 64.0) + (:a 64.0) + (:omega (degrees 0)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 8.0) + (:func 'sparticle-track-sun) + ) + ) + +(defpartgroup group-day-star + :id 6 + :flags (sp1) + :bounds (static-bspherem 0 0 0 70) + :parts ((sp-item 50 :flags (sp3 sp6)) (sp-item 51 :flags (sp3 sp6))) + ) + +(defpart 50 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2000)) + (:rot-x (degrees 1125)) + (:rot-z (degrees 30)) + (:scale-y (meters 2000)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:omega (degrees 0)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 12.0) + (:func 'sparticle-track-sun) + ) + ) + +(defpart 51 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5000)) + (:rot-x (degrees 1125)) + (:rot-z (degrees 30)) + (:scale-y (meters 5000)) + (:r 32.0) + (:g 0.0) + (:b 128.0) + (:a 64.0) + (:omega (degrees 0)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 13.0) + (:func 'sparticle-track-sun) + ) + ) diff --git a/goal_src/jak3/engine/gfx/ocean/ocean-h.gc b/goal_src/jak3/engine/gfx/ocean/ocean-h.gc index a4ced77ed3..410c8ca46f 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) @@ -410,87 +410,87 @@ (wait-to-vu0 uint32) ) (:methods - (ocean-method-11 () none) - (ocean-method-12 () none) - (ocean-method-13 () 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) + (get-height (_type_ vector symbol) float) + (draw! (_type_) none) + (update-map (_type_) 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 e306fd2730..911aa5399a 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 b2f89187a2..5bf67054e8 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 abc98590fb..930544311e 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 fea66bcea3..080272bc6d 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 920a88f26c..5df7b638c7 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 05d60b6230..c550f3da68 100644 --- a/goal_src/jak3/engine/gfx/ocean/ocean.gc +++ b/goal_src/jak3/engine/gfx/ocean/ocean.gc @@ -5,5 +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 +(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)) + (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)) + (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/shrub/shrub-work.gc b/goal_src/jak3/engine/gfx/shrub/shrub-work.gc index 0949c41213..7df7c8a5e2 100644 --- a/goal_src/jak3/engine/gfx/shrub/shrub-work.gc +++ b/goal_src/jak3/engine/gfx/shrub/shrub-work.gc @@ -9,3 +9,313 @@ ;; DECOMP BEGINS +(define *instance-shrub-work* + (new 'static 'instance-shrub-work + :matrix-tmpl (new 'static 'inline-array qword 20 + (new 'static 'qword :data (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c050143)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050148)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05014d)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050152)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050157)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05015c)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050161)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050166)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05016b)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c050170)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c050176)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05017b)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050180)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050185)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05018a)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05018f)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050194)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050199)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05019e)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c0501a3)) + ) + :count-tmpl (new 'static 'inline-array vector4w 20 + (new 'static 'vector4w :x #x20000000 :z #x60010175 :w 10) + (new 'static 'vector4w :x #x20000000 :z #x60010142 :w 1) + (new 'static 'vector4w :x #x20000000 :z #x60010142 :w 2) + (new 'static 'vector4w :x #x20000000 :z #x60010142 :w 3) + (new 'static 'vector4w :x #x20000000 :z #x60010142 :w 4) + (new 'static 'vector4w :x #x20000000 :z #x60010142 :w 5) + (new 'static 'vector4w :x #x20000000 :z #x60010142 :w 6) + (new 'static 'vector4w :x #x20000000 :z #x60010142 :w 7) + (new 'static 'vector4w :x #x20000000 :z #x60010142 :w 8) + (new 'static 'vector4w :x #x20000000 :z #x60010142 :w 9) + (new 'static 'vector4w :x #x20000000 :z #x60010142 :w 10) + (new 'static 'vector4w :x #x20000000 :z #x60010175 :w 1) + (new 'static 'vector4w :x #x20000000 :z #x60010175 :w 2) + (new 'static 'vector4w :x #x20000000 :z #x60010175 :w 3) + (new 'static 'vector4w :x #x20000000 :z #x60010175 :w 4) + (new 'static 'vector4w :x #x20000000 :z #x60010175 :w 5) + (new 'static 'vector4w :x #x20000000 :z #x60010175 :w 6) + (new 'static 'vector4w :x #x20000000 :z #x60010175 :w 7) + (new 'static 'vector4w :x #x20000000 :z #x60010175 :w 8) + (new 'static 'vector4w :x #x20000000 :z #x60010175 :w 9) + ) + :mscalf-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1) + ) + :mscalf-ret-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ret)) + :vif0 (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1) + ) + :adgif-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id next)) + :vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x1000000000008005 #xe) + ) + :billboard-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #xd :id (dma-tag-id next)) + :vif1 (new 'static 'vif-tag :imm #xd :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x303e400000008004 #x412) + ) + :shrub-near-packets (new 'static 'inline-array shrub-near-packet 6 + (new 'static 'shrub-near-packet + :matrix-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x9 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x400a :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #xb :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data (new 'static 'inline-array qword 2 + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x345 #x117)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c)) + ) + ) + (new 'static 'shrub-near-packet + :matrix-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x120 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x4121 :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x122 :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data (new 'static 'inline-array qword 2 + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x363 #x22e)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c)) + ) + ) + (new 'static 'shrub-near-packet + :matrix-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x237 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x4238 :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x239 :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data (new 'static 'inline-array qword 2 + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x345 #x0)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c)) + ) + ) + (new 'static 'shrub-near-packet + :matrix-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x9 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x400a :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #xb :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data (new 'static 'inline-array qword 2 + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x363 #x117)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c)) + ) + ) + (new 'static 'shrub-near-packet + :matrix-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x120 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x4121 :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x122 :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data (new 'static 'inline-array qword 2 + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x345 #x22e)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c)) + ) + ) + (new 'static 'shrub-near-packet + :matrix-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x237 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x4238 :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x239 :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data (new 'static 'inline-array qword 2 + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x363 #x0)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c)) + ) + ) + ) + :dma-ref (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref))) + :dma-end (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id end))) + :wind-const (new 'static 'vector :x 0.5 :y 100.0 :z 0.0166 :w -1.0) + :constants (new 'static 'vector :x 128.0 :y 1.0) + :color-constant (new 'static 'vector4w :x #x47000000 :y #x47000000 :z #x47000000) + :start-bank (new 'static 'array uint8 20 #x0 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + ) + +(set! (-> *instance-shrub-work* mscalf-tmpl vif0 imm) 103) + +(set! (-> *instance-shrub-work* mscalf-ret-tmpl vif0 imm) 103) diff --git a/goal_src/jak3/engine/gfx/shrub/shrubbery-h.gc b/goal_src/jak3/engine/gfx/shrub/shrubbery-h.gc index 1e28f9dddf..ceda23eef7 100644 --- a/goal_src/jak3/engine/gfx/shrub/shrubbery-h.gc +++ b/goal_src/jak3/engine/gfx/shrub/shrubbery-h.gc @@ -6,6 +6,10 @@ ;; dgos: GAME (define-extern shrub-make-perspective-matrix (function matrix matrix matrix)) +(declare-type instance-shrub-work structure) +(declare-type drawable-tree-instance-shrub structure) +(define-extern *instance-shrub-work* instance-shrub-work) +(define-extern draw-drawable-tree-instance-shrub (function drawable-tree-instance-shrub level none)) ;; DECOMP BEGINS @@ -161,7 +165,7 @@ This requires storing the data for all shrubs prototype twice!" (vertex-tmpl dma-packet :inline) (mscal-tmpl dma-packet :inline) (init-tmpl dma-packet :inline) - (init-data qword 8) + (init-data qword 2 :inline) ) ) diff --git a/goal_src/jak3/engine/gfx/shrub/shrubbery.gc b/goal_src/jak3/engine/gfx/shrub/shrubbery.gc index 9f33d75a65..6826a846a0 100644 --- a/goal_src/jak3/engine/gfx/shrub/shrubbery.gc +++ b/goal_src/jak3/engine/gfx/shrub/shrubbery.gc @@ -5,5 +5,1152 @@ ;; name in dgo: shrubbery ;; dgos: GAME +(define-extern mem-usage-shrub-walk (function draw-node int memory-usage-block int draw-node)) +(define-extern highres-shrub-login (function draw-node none)) +(define-extern draw-inline-array-instance-shrub (function dma-buffer drawable int (inline-array prototype-bucket-shrub) none)) + ;; DECOMP BEGINS +(defun pc-add-shrub-vis-mask ((dma-buf dma-buffer) (lev level)) + "Add data so Proto.cpp can disable drawing for disabled protos." + (let ((packet (the-as dma-packet (-> dma-buf base)))) + (set! (-> packet vif0) (new 'static 'vif-tag)) + (set! (-> packet vif1) (new 'static 'vif-tag :cmd (vif-cmd pc-port))) + (set! (-> dma-buf base) (the pointer (&+ packet 16))) + + (let ((lev-trees (-> lev bsp drawable-trees)) + (data-ptr (the (pointer uint8) (-> dma-buf base))) + ) + (dotimes (tree-idx (-> lev-trees length)) + (let ((tree (-> lev-trees data tree-idx))) + (when (= (-> tree type) drawable-tree-instance-shrub) + (let* ((shrub-tree (the drawable-tree-instance-shrub tree)) + (protos (-> shrub-tree info prototype-inline-array-shrub)) + ) + (dotimes (i (-> protos length)) + (let ((proto (-> protos data i))) + (when (logtest? (-> proto flags) (prototype-flags visible)) + ;; invisible! + ;; (format 0 "invis: ~A~%" (-> proto name)) + (let ((src (-> proto name data))) + (while (nonzero? (-> src)) + (set! (-> data-ptr) (-> src)) + (&+! src 1) + (&+! data-ptr 1) + ) + (set! (-> data-ptr) 0) + (&+! data-ptr 1) + ) + ) + ) + ) + ) + ) + ) + ) + ;; align + (while (nonzero? (logand data-ptr #xf)) + (set! (-> data-ptr) 0) + (&+! data-ptr 1) + ) + (set! (-> packet dma) (new 'static 'dma-tag + :id (dma-tag-id cnt) + :qwc (/ (&- data-ptr (-> dma-buf base)) 16)) + ) + (set! (-> dma-buf base) data-ptr) + #f + ) + ) + ) + +(defmethod login ((this billboard)) + "Initialize the object after it is loaded." + (adgif-shader-login (-> this flat)) + this + ) + +(defmethod mem-usage ((this billboard) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 34 (-> usage length))) + (set! (-> usage data 33 name) "billboard") + (+! (-> usage data 33 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 33 used) v1-6) + (+! (-> usage data 33 total) (logand -16 (+ v1-6 15))) + ) + this + ) + +(defun mem-usage-shrub-walk ((arg0 draw-node) (arg1 int) (arg2 memory-usage-block) (arg3 int)) + "Walk the shrub tree and compute memory usagbe for draw nodes and shrub instances." + (set! (-> arg2 length) (max 65 (-> arg2 length))) + (set! (-> arg2 data 64 name) "draw-node") + (+! (-> arg2 data 64 count) arg1) + (let ((v1-5 (* arg1 32))) + (+! (-> arg2 data 64 used) v1-5) + (+! (-> arg2 data 64 total) (logand -16 (+ v1-5 15))) + ) + (let ((s2-0 arg0)) + (dotimes (s1-0 arg1) + (let ((a1-2 (-> s2-0 child-count))) + (cond + ((logtest? (-> s2-0 flags) 1) + (mem-usage-shrub-walk (the-as draw-node (-> s2-0 child)) (the-as int a1-2) arg2 arg3) + ) + (else + (set! (-> arg2 length) (max 35 (-> arg2 length))) + (set! (-> arg2 data 34 name) "instance-shrubbery") + (+! (-> arg2 data 34 count) a1-2) + (let ((v1-18 (* (the-as uint 80) a1-2))) + (+! (-> arg2 data 34 used) v1-18) + (+! (-> arg2 data 34 total) (logand -16 (+ v1-18 15))) + ) + ) + ) + ) + (&+! s2-0 32) + ) + ) + arg0 + ) + +(defmethod mem-usage ((this drawable-tree-instance-shrub) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-5 32)) + (+! (-> usage data 0 used) v1-5) + (+! (-> usage data 0 total) (logand -16 (+ v1-5 15))) + ) + (when (nonzero? (-> this colors-added)) + (set! (-> usage length) (max 33 (-> usage length))) + (set! (-> usage data 32 name) "shrubbery-pal") + (+! (-> usage data 32 count) 1) + (let ((v1-17 (asize-of (-> this colors-added)))) + (+! (-> usage data 32 used) v1-17) + (+! (-> usage data 32 total) (logand -16 (+ v1-17 15))) + ) + ) + (mem-usage-shrub-walk + (the-as draw-node (&+ (-> this data 0) 32)) + (-> (the-as drawable-group (-> this data 0)) length) + usage + flags + ) + (mem-usage (-> this info prototype-inline-array-shrub) usage (logior flags 1)) + this + ) + +(defmethod login ((this generic-shrub-fragment)) + "Initialize the object after it is loaded." + (let ((s5-0 (/ (-> this cnt-qwc) (the-as uint 5)))) + (dotimes (s4-0 (the-as int s5-0)) + (adgif-shader-login-no-remap (-> this textures s4-0)) + ) + ) + this + ) + +(defmethod mem-usage ((this generic-shrub-fragment) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 27 (-> usage length))) + (set! (-> usage data 25 name) "generic-shrub") + (+! (-> usage data 25 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 25 used) v1-6) + (+! (-> usage data 25 total) (logand -16 (+ v1-6 15))) + ) + (set! (-> usage data 26 name) "generic-shrub-data") + (+! (-> usage data 26 count) 1) + (let ((v1-17 (* (+ (-> this cnt-qwc) (-> this vtx-qwc) (-> this col-qwc) (-> this stq-qwc)) 16))) + (+! (-> usage data 26 used) v1-17) + (+! (-> usage data 26 total) (logand -16 (+ v1-17 15))) + ) + this + ) + + +(defmethod mem-usage ((this prototype-shrubbery) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-5 32)) + (+! (-> usage data 0 used) v1-5) + (+! (-> usage data 0 total) (logand -16 (+ v1-5 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this data s3-0) usage flags) + ) + this + ) + +(defmethod login ((this prototype-shrubbery)) + "Initialize the object after it is loaded." + (dotimes (s5-0 (-> this length)) + (login (-> this data s5-0)) + ) + this + ) + +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this prototype-shrubbery)) + (the-as int (+ (-> prototype-shrubbery size) (* (+ (-> this length) -1) 32))) + ) + +(defmethod login ((this prototype-generic-shrub)) + "Initialize the object after it is loaded." + (dotimes (s5-0 (-> this length)) + (login (-> this data s5-0)) + ) + this + ) + +(defmethod login ((this shrubbery)) + "Initialize the object after it is loaded." + (let ((s5-0 (* (-> this header data 0) 2))) + (dotimes (s4-0 (the-as int s5-0)) + (let ((v1-3 (adgif-shader-login-no-remap (-> this textures s4-0)))) + (when v1-3 + (dotimes (a0-5 3) + (dotimes (a1-0 3) + (set! (-> (the-as (pointer int32) (+ (+ (* a0-5 16) (* a1-0 4)) (the-as int *texture-masks*)))) + (logior (-> (the-as (pointer int32) (+ (* a1-0 4) (the-as int *texture-masks*) (* a0-5 16))) 0) + (-> (the-as (pointer int32) (+ (* a1-0 4) (the-as int v1-3) (* a0-5 16))) 15) + ) + ) + ) + (set! (-> *texture-masks* data a0-5 dist) + (fmax (-> *texture-masks* data a0-5 dist) (-> v1-3 masks data a0-5 dist)) + ) + ) + ) + ) + ) + ) + (shrubbery-login-post-texture this) + this + ) + +(defmethod mem-usage ((this shrubbery) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 28 (-> usage length))) + (set! (-> usage data 27 name) "shrubbery") + (+! (-> usage data 27 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 27 used) v1-6) + (+! (-> usage data 27 total) (logand -16 (+ v1-6 15))) + ) + (set! (-> usage length) (max 30 (-> usage length))) + (set! (-> usage data 29 name) "shrubbery-vertex") + (+! (-> usage data 29 count) 1) + (let ((v1-16 (* (-> this vtx-qwc) 16))) + (+! (-> usage data 29 used) v1-16) + (+! (-> usage data 29 total) (logand -16 (+ v1-16 15))) + ) + (set! (-> usage length) (max 31 (-> usage length))) + (set! (-> usage data 30 name) "shrubbery-color") + (+! (-> usage data 30 count) 1) + (let ((v1-26 (* (-> this col-qwc) 16))) + (+! (-> usage data 30 used) v1-26) + (+! (-> usage data 30 total) (logand -16 (+ v1-26 15))) + ) + (set! (-> usage length) (max 29 (-> usage length))) + (set! (-> usage data 28 name) "shrubbery-object") + (+! (-> usage data 28 count) 1) + (let ((v1-36 (* (-> this obj-qwc) 16))) + (+! (-> usage data 28 used) v1-36) + (+! (-> usage data 28 total) (logand -16 (+ v1-36 15))) + ) + (set! (-> usage length) (max 32 (-> usage length))) + (set! (-> usage data 31 name) "shrubbery-stq") + (+! (-> usage data 31 count) 1) + (let ((v1-46 (* (-> this stq-qwc) 16))) + (+! (-> usage data 31 used) v1-46) + (+! (-> usage data 31 total) (logand -16 (+ v1-46 15))) + ) + this + ) + +(defun-debug highres-shrub-login ((arg0 draw-node)) + "Set draw-node's distance to max, to force to always draw." + (set! (-> arg0 distance) 40960000.0) + (when (logtest? (-> arg0 flags) 1) + (dotimes (s5-0 (the-as int (-> arg0 child-count))) + (let ((a0-2 (+ (+ (* s5-0 32) 32) (the-as int (-> arg0 child))))) + (highres-shrub-login (the-as draw-node a0-2)) + ) + ) + ) + 0 + (none) + ) + +(defmethod login ((this drawable-tree-instance-shrub)) + "Initialize the object after it is loaded." + (when (and *debug-segment* (-> *screen-shot-work* highres-enable)) + (dotimes (s5-0 (-> this length)) + (let ((a0-1 (-> this data s5-0))) + (highres-shrub-login (the-as draw-node a0-1)) + ) + ) + ) + (if (nonzero? (-> this info prototype-inline-array-shrub)) + (login (-> this info prototype-inline-array-shrub)) + ) + this + ) + +;; og:preserve-this +(define shrub-vu1-block (new 'static 'vu-function #|:length #x26a :qlength #x135|#)) + +(defun shrub-num-tris ((arg0 shrubbery)) + "Get the number of triangles in this shrubbery." + (- (-> arg0 header data 2) (* (-> arg0 header data 1) 2)) + ) + +(defun shrub-make-perspective-matrix ((arg0 matrix) (arg1 matrix)) + "Create shrub drawing matrix." + (let* ((v1-0 arg0) + (t0-0 arg1) + (a1-1 (-> 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) a1-1) + (set! (-> v1-0 uvec quad) a2-0) + (set! (-> v1-0 fvec quad) a3-0) + (set! (-> v1-0 trans quad) t0-1) + ) + (let ((f0-1 (/ 1.0 (-> *math-camera* pfog0)))) + (set! (-> arg0 rvec w) (* (-> arg0 rvec w) f0-1)) + (set! (-> arg0 uvec w) (* (-> arg0 uvec w) f0-1)) + (set! (-> arg0 fvec w) (* (-> arg0 fvec w) f0-1)) + (set! (-> arg0 trans w) (* (-> arg0 trans w) f0-1)) + ) + (+! (-> arg0 rvec x) (* (-> arg0 rvec w) (-> *math-camera* hvdf-off x))) + (+! (-> arg0 uvec x) (* (-> arg0 uvec w) (-> *math-camera* hvdf-off x))) + (+! (-> arg0 fvec x) (* (-> arg0 fvec w) (-> *math-camera* hvdf-off x))) + (+! (-> arg0 trans x) (* (-> arg0 trans w) (-> *math-camera* hvdf-off x))) + (+! (-> arg0 rvec y) (* (-> arg0 rvec w) (-> *math-camera* hvdf-off y))) + (+! (-> arg0 uvec y) (* (-> arg0 uvec w) (-> *math-camera* hvdf-off y))) + (+! (-> arg0 fvec y) (* (-> arg0 fvec w) (-> *math-camera* hvdf-off y))) + (+! (-> arg0 trans y) (* (-> arg0 trans w) (-> *math-camera* hvdf-off y))) + (+! (-> arg0 rvec z) (* (-> arg0 rvec w) (-> *math-camera* hvdf-off z))) + (+! (-> arg0 uvec z) (* (-> arg0 uvec w) (-> *math-camera* hvdf-off z))) + (+! (-> arg0 fvec z) (* (-> arg0 fvec w) (-> *math-camera* hvdf-off z))) + (+! (-> arg0 trans z) (* (-> arg0 trans w) (-> *math-camera* hvdf-off z))) + arg0 + ) + +(defun shrub-init-view-data ((arg0 shrub-view-data)) + "Initialize shrub drawing constants." + (set! (-> arg0 texture-giftag tag) (new 'static 'gif-tag64 :nloop #x1 :nreg #x4)) + (set! (-> arg0 texture-giftag regs) (new 'static 'gif-tag-regs + :regs0 (gif-reg-id a+d) + :regs1 (gif-reg-id a+d) + :regs2 (gif-reg-id a+d) + :regs3 (gif-reg-id a+d) + ) + ) + (set! (-> arg0 texture-giftag word 3) (the-as uint #x40a00000)) + (set! (-> arg0 consts x) 25167696.0) + (set! (-> arg0 consts y) 8388608.0) + (set! (-> arg0 consts z) (-> *math-camera* pfog0)) + (set! (-> arg0 consts w) (-> *math-camera* pfog1)) + (set! (-> arg0 fog-clamp x) (-> *math-camera* fog-min)) + (set! (-> arg0 fog-clamp y) (-> *math-camera* fog-max)) + #f + ) + +(defun shrub-upload-view-data ((arg0 dma-buffer)) + "Create DMA to set shrub vu1 constants." + (let ((s5-0 3)) + (let* ((v1-0 arg0) + (a0-1 (the-as dma-packet (-> v1-0 base))) + ) + (set! (-> a0-1 dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc s5-0)) + (set! (-> a0-1 vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> a0-1 vif1) (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32) :num s5-0)) + (set! (-> v1-0 base) (the-as pointer (&+ a0-1 16))) + ) + (shrub-init-view-data (the-as shrub-view-data (-> arg0 base))) + (&+! (-> arg0 base) (* s5-0 16)) + ) + #f + ) + +(defun shrub-time ((arg0 int) (arg1 int) (arg2 int) (arg3 int) (arg4 int)) + "Unknown. Maybe rough cycle count for a shrub fragment?" + (+ (* arg0 8) 29 (* 22 arg2) (* 11 arg1) (* (+ (* arg4 2) 15 (* 5 arg2) (* 13 arg0)) arg3) 53) + ) + +(defun shrub-do-init-frame ((arg0 dma-buffer)) + "Set up DMA to set up VU1 for shrub rendering." + (dma-buffer-add-vu-function arg0 shrub-vu1-block 1) + (shrub-upload-view-data arg0) + (let* ((v1-0 arg0) + (a0-3 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-3) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-3) vif0) (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1 :imm #x0)) + (set! (-> (the-as dma-packet a0-3) vif1) (new 'static 'vif-tag :cmd (vif-cmd flushe) :msk #x1)) + (set! (-> v1-0 base) (&+ (the-as pointer a0-3) 16)) + ) + (let* ((v1-1 arg0) + (a0-5 (the-as object (-> v1-1 base))) + ) + (set! (-> (the-as dma-packet a0-5) dma) (new 'static 'dma-tag :qwc #x3 :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-5) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet a0-5) vif1) (new 'static 'vif-tag)) + (set! (-> v1-1 base) (&+ (the-as pointer a0-5) 16)) + ) + (let ((v1-2 (-> arg0 base))) + (set! (-> (the-as (pointer vif-tag) v1-2) 0) (new 'static 'vif-tag :cmd (vif-cmd strow) :msk #x1)) + (set! (-> (the-as (pointer uint32) v1-2) 1) (the-as uint #x8080)) + (set! (-> (the-as (pointer uint32) v1-2) 2) (the-as uint #x8080)) + (set! (-> (the-as (pointer uint32) v1-2) 3) (the-as uint #x8080)) + (set! (-> (the-as (pointer uint32) v1-2) 4) (the-as uint 0)) + (set! (-> (the-as (pointer vif-tag) v1-2) 5) (new 'static 'vif-tag :cmd (vif-cmd stcol) :msk #x1)) + (set! (-> (the-as (pointer uint32) v1-2) 6) (the-as uint 4096)) + (set! (-> (the-as (pointer uint32) v1-2) 7) (the-as uint 4096)) + (set! (-> (the-as (pointer uint32) v1-2) 8) (the-as uint 4096)) + (set! (-> (the-as (pointer uint32) v1-2) 9) (the-as uint 4096)) + (set! (-> (the-as (pointer vif-tag) v1-2) 10) (new 'static 'vif-tag :cmd (vif-cmd stmask))) + (set! (-> (the-as (pointer uint32) v1-2) 11) (the-as uint #xa0a0a0a0)) + (set! (-> arg0 base) (&+ v1-2 48)) + ) + (set! *shrub-state* 2) + #f + ) + +(defun shrub-init-frame ((arg0 dma-buffer) (arg1 gs-test)) + "Set up DMA to set up VU1 and GS for shrub rendering." + (shrub-do-init-frame arg0) + (let* ((v1-0 arg0) + (a0-2 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-2) dma) (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-2) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet a0-2) vif1) (new 'static 'vif-tag :imm #x2 :cmd (vif-cmd direct) :msk #x1)) + (set! (-> v1-0 base) (&+ (the-as pointer a0-2) 16)) + ) + (let* ((v1-1 arg0) + (a0-4 (the-as object (-> v1-1 base))) + ) + (set! (-> (the-as gs-gif-tag a0-4) tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x1)) + (set! (-> (the-as gs-gif-tag a0-4) regs) GIF_REGS_ALL_AD) + (set! (-> v1-1 base) (&+ (the-as pointer a0-4) 16)) + ) + (let ((v1-2 (-> arg0 base))) + (set! (-> (the-as (pointer gs-test) v1-2) 0) arg1) + (set! (-> (the-as (pointer gs-reg64) v1-2) 1) (gs-reg64 test-1)) + (set! (-> arg0 base) (&+ v1-2 16)) + ) + #f + ) + +(defun shrub-upload-model ((arg0 shrubbery) (arg1 dma-buffer) (arg2 int)) + "Set up DMA to upload a single shrub model." + (let* ((v1-0 arg1) + (a3-0 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a3-0) dma) + (new 'static 'dma-tag + :id (dma-tag-id ref) + :addr (the-as int (-> arg0 bsphere x)) + :qwc (+ (-> arg0 obj-qwc) (-> arg0 vtx-qwc) (-> arg0 col-qwc) (-> arg0 stq-qwc)) + ) + ) + (set! (-> (the-as dma-packet a3-0) vif0) (new 'static 'vif-tag :cmd (vif-cmd base) :imm *shrub-state*)) + (set! (-> (the-as dma-packet a3-0) vif1) (new 'static 'vif-tag :cmd (vif-cmd offset))) + (set! (-> v1-0 base) (&+ (the-as pointer a3-0) 16)) + ) + (cond + ((= arg2 1) + (let* ((v1-2 arg1) + (a0-9 (the-as object (-> v1-2 base))) + ) + (set! (-> (the-as dma-packet a0-9) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-9) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet a0-9) vif1) (new 'static 'vif-tag :cmd (vif-cmd mscal) :msk #x1 :imm #x11)) + (set! (-> v1-2 base) (&+ (the-as pointer a0-9) 16)) + ) + ) + (else + (let* ((v1-3 arg1) + (a0-11 (the-as object (-> v1-3 base))) + ) + (set! (-> (the-as dma-packet a0-11) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-11) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet a0-11) vif1) (new 'static 'vif-tag :cmd (vif-cmd mscal) :msk #x1 :imm #x15)) + (set! (-> v1-3 base) (&+ (the-as pointer a0-11) 16)) + ) + ) + ) + (set! *shrub-state* (- 164 *shrub-state*)) + #f + ) + +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; ERROR: Failed load: (set! a2-11 (l.d (+ a0-14 96))) at op 102 +(defun draw-prototype-inline-array-shrub ((arg0 int) (arg1 (inline-array prototype-bucket-shrub))) + (the pointer 0) + ; (local-vars + ; (sv-16 drawable) + ; (sv-32 uint) + ; (sv-48 int) + ; (sv-64 drawable) + ; (sv-80 int) + ; (sv-96 uint) + ; (sv-112 drawable) + ; (sv-128 int) + ; ) + ; (let ((v1-0 (the-as object arg1)) + ; (a0-6 (-> *display* frames (-> *display* on-screen) global-buf)) + ; ) + ; (countdown (a1-2 arg0) + ; (when (nonzero? (-> (the-as prototype-bucket-shrub v1-0) count 1)) + ; (let ((a2-2 (-> a0-6 base))) + ; (set! (-> (the-as (pointer uint128) a2-2)) + ; (-> *instance-shrub-work* count-tmpl (-> (the-as prototype-bucket-shrub v1-0) mod-count 1) quad) + ; ) + ; (set! (-> (the-as (pointer uint64) a2-2)) + ; (logior (logand (-> (the-as (pointer uint64) a2-2)) (the-as uint #x80000000ffffffff)) + ; (shr (shl (-> (the-as prototype-bucket-shrub v1-0) next 1) 33) 1) + ; ) + ; ) + ; (set! (-> (the-as prototype-bucket-shrub v1-0) next 1) (the-as uint a2-2)) + ; ) + ; (&+! (-> a0-6 base) 16) + ; ) + ; (when (nonzero? (-> (the-as prototype-bucket-shrub v1-0) count 2)) + ; (let ((a2-7 (-> a0-6 base))) + ; (set! (-> (the-as (pointer uint128) a2-7)) + ; (-> *instance-shrub-work* count-tmpl (-> (the-as prototype-bucket-shrub v1-0) mod-count 2) quad) + ; ) + ; (set! (-> (the-as (pointer uint64) a2-7)) + ; (logior (logand (-> (the-as (pointer uint64) a2-7)) (the-as uint #x80000000ffffffff)) + ; (shr (shl (-> (the-as prototype-bucket-shrub v1-0) next 2) 33) 1) + ; ) + ; ) + ; (set! (-> (the-as prototype-bucket-shrub v1-0) next 2) (the-as uint a2-7)) + ; ) + ; (&+! (-> a0-6 base) 16) + ; ) + ; (set! v1-0 (&+ (the-as prototype-bucket-shrub v1-0) 112)) + ; ) + ; ) + ; (when (logtest? (vu1-renderer-mask shrub-near) (-> *display* vu1-enable-user)) + ; (when (nonzero? (-> *instance-shrub-work* near-count)) + ; (let ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (with-dma-buffer-add-bucket ((s2-0 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (-> (new 'static 'array bucket-id 12 + ; (bucket-id shrub-near-l0-shrub) + ; (bucket-id shrub-near-l1-shrub) + ; (bucket-id shrub-near-l2-shrub) + ; (bucket-id shrub-near-l3-shrub) + ; (bucket-id shrub-near-l4-shrub) + ; (bucket-id shrub-near-l5-shrub) + ; (bucket-id shrub-near-l6-shrub) + ; (bucket-id shrub-near-l7-shrub) + ; (bucket-id shrub-near-l8-shrub) + ; (bucket-id shrub-near-l9-shrub) + ; (bucket-id bucket0) + ; (bucket-id bucket0) + ; ) + ; *draw-index* + ; ) + ; ) + ; (generic-init-buf s2-0 (new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24))) + ; (generic-add-shrub-constants s2-0 #x5026b 60 61) + ; (let ((a0-14 (+ (+ (-> *instance-shrub-work* current-shrub-near-packet) 5152) (the-as uint *instance-shrub-work*))) + ; (v1-23 (-> s2-0 base)) + ; (a1-7 (+ (-> *instance-shrub-work* near-last) 176)) + ; ) + ; (let ((a2-13 (logior (logand (l.d (+ a0-14 96)) (the-as uint #x80000000ffffffff)) + ; (shr (shl (-> *instance-shrub-work* near-next) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (+ a0-14 96) a2-13) + ; ) + ; (let ((a2-14 (l.q (+ a0-14 96))) + ; (a3-18 (l.q (+ a0-14 112))) + ; (a0-15 (l.q (+ a0-14 128))) + ; ) + ; (set! (-> (the-as (pointer uint128) v1-23)) a2-14) + ; (s.q! (+ v1-23 16) a3-18) + ; (s.q! (+ v1-23 32) a0-15) + ; ) + ; (let ((v1-24 (&+ v1-23 48))) + ; (s.w! (+ a1-7 4) v1-24) + ; (set! (-> s2-0 base) v1-24) + ; ) + ; ) + ; ) + ; (let ((v1-34 *dma-mem-usage*)) + ; (when (nonzero? v1-34) + ; (set! (-> v1-34 length) (max 28 (-> v1-34 length))) + ; (set! (-> v1-34 data 27 name) "shrubbery") + ; (+! (-> v1-34 data 27 count) 1) + ; (+! (-> v1-34 data 27 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s4-0)) + ; ) + ; (set! (-> v1-34 data 27 total) (-> v1-34 data 27 used)) + ; ) + ; ) + ; ) + ; ) + ; (when (nonzero? (-> *instance-shrub-work* near-trans-count)) + ; (let ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (with-dma-buffer-add-bucket ((s2-1 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (-> (new 'static 'array bucket-id 12 + ; (bucket-id shrub-near-trans-l0-shrub) + ; (bucket-id shrub-near-trans-l1-shrub) + ; (bucket-id shrub-near-trans-l2-shrub) + ; (bucket-id shrub-near-trans-l3-shrub) + ; (bucket-id shrub-near-trans-l4-shrub) + ; (bucket-id shrub-near-trans-l5-shrub) + ; (bucket-id shrub-near-trans-l6-shrub) + ; (bucket-id shrub-near-trans-l7-shrub) + ; (bucket-id shrub-near-trans-l8-shrub) + ; (bucket-id shrub-near-trans-l9-shrub) + ; (bucket-id bucket0) + ; (bucket-id bucket0) + ; ) + ; *draw-index* + ; ) + ; ) + ; (generic-init-buf s2-1 (new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24))) + ; (generic-add-shrub-constants s2-1 #x51001 124 125) + ; (let ((a0-26 + ; (+ (+ (-> *instance-shrub-work* current-shrub-near-trans-packet) 5152) (the-as uint *instance-shrub-work*)) + ; ) + ; (v1-51 (-> s2-1 base)) + ; (a1-24 (+ (-> *instance-shrub-work* near-trans-last) 176)) + ; ) + ; (let ((a2-28 (logior (logand (l.d (+ a0-26 96)) (the-as uint #x80000000ffffffff)) + ; (shr (shl (-> *instance-shrub-work* near-trans-next) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (+ a0-26 96) a2-28) + ; ) + ; (let ((a2-29 (l.q (+ a0-26 96))) + ; (a3-27 (l.q (+ a0-26 112))) + ; (a0-27 (l.q (+ a0-26 128))) + ; ) + ; (set! (-> (the-as (pointer uint128) v1-51)) a2-29) + ; (s.q! (+ v1-51 16) a3-27) + ; (s.q! (+ v1-51 32) a0-27) + ; ) + ; (let ((v1-52 (&+ v1-51 48))) + ; (s.w! (+ a1-24 4) v1-52) + ; (set! (-> s2-1 base) v1-52) + ; ) + ; ) + ; ) + ; (let ((v1-62 *dma-mem-usage*)) + ; (when (nonzero? v1-62) + ; (set! (-> v1-62 length) (max 28 (-> v1-62 length))) + ; (set! (-> v1-62 data 27 name) "shrubbery") + ; (+! (-> v1-62 data 27 count) 1) + ; (+! (-> v1-62 data 27 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s4-1)) + ; ) + ; (set! (-> v1-62 data 27 total) (-> v1-62 data 27 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + ; (when (logtest? (vu1-renderer-mask shrubbery) (-> *display* vu1-enable-user)) + ; (let ((s4-2 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (with-dma-buffer-add-bucket ((s2-2 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (-> (new 'static 'array bucket-id 12 + ; (bucket-id shrub-l0-shrub) + ; (bucket-id shrub-l1-shrub) + ; (bucket-id shrub-l2-shrub) + ; (bucket-id shrub-l3-shrub) + ; (bucket-id shrub-l4-shrub) + ; (bucket-id shrub-l5-shrub) + ; (bucket-id shrub-l6-shrub) + ; (bucket-id shrub-l7-shrub) + ; (bucket-id shrub-l8-shrub) + ; (bucket-id shrub-l9-shrub) + ; (bucket-id bucket0) + ; (bucket-id bucket0) + ; ) + ; *draw-index* + ; ) + ; ) + ; (shrub-init-frame s2-2 (new 'static 'gs-test + ; :ate #x1 + ; :atst (gs-atest greater-equal) + ; :aref #x26 + ; :zte #x1 + ; :ztst (gs-ztest greater-equal) + ; ) + ; ) + ; (let ((s1-0 (the-as prototype-bucket-shrub arg1))) + ; (countdown (s0-0 arg0) + ; (when (nonzero? (-> s1-0 count 1)) + ; (if (logtest? (-> s1-0 flags) (prototype-flags tpage-alpha)) + ; (set! sv-16 (-> s1-0 geometry 2)) + ; (set! sv-16 (-> s1-0 geometry 1)) + ; ) + ; (set! sv-32 (-> s1-0 next 1)) + ; (if (logtest? (-> s1-0 flags) (prototype-flags tpage-alpha)) + ; (set! sv-48 #x51001) + ; (set! sv-48 #x5026b) + ; ) + ; (set! sv-64 (&+ sv-16 32)) + ; (set! sv-80 0) + ; (while (< sv-80 (-> (the-as prototype-shrubbery sv-16) length)) + ; (shrub-upload-model + ; (the-as shrubbery sv-64) + ; s2-2 + ; (the-as int (-> *instance-shrub-work* start-bank (-> s1-0 mod-count 1))) + ; ) + ; (if (zero? sv-80) + ; (dma-buffer-add-gs-set s2-2 (test-1 sv-48)) + ; ) + ; (let* ((v1-98 s2-2) + ; (a0-44 (-> v1-98 base)) + ; ) + ; (set! (-> (the-as (pointer uint64) a0-44)) (logior #x50000000 (shr (shl sv-32 33) 1))) + ; (s.w! (+ a0-44 8) 0) + ; (s.w! (+ a0-44 12) 0) + ; (set! (-> v1-98 base) (&+ a0-44 16)) + ; ) + ; (set! sv-64 (&+ sv-64 32)) + ; (set! sv-80 (+ sv-80 1)) + ; ) + ; ) + ; (&+! s1-0 112) + ; ) + ; ) + ; ) + ; (let ((v1-117 *dma-mem-usage*)) + ; (when (nonzero? v1-117) + ; (set! (-> v1-117 length) (max 28 (-> v1-117 length))) + ; (set! (-> v1-117 data 27 name) "shrubbery") + ; (+! (-> v1-117 data 27 count) 1) + ; (+! (-> v1-117 data 27 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s4-2)) + ; ) + ; (set! (-> v1-117 data 27 total) (-> v1-117 data 27 used)) + ; ) + ; ) + ; ) + ; ) + ; (when (logtest? (vu1-renderer-mask shrub-vanish) (-> *display* vu1-enable-user)) + ; (let ((s4-3 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (with-dma-buffer-add-bucket ((s2-3 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (-> (new 'static 'array bucket-id 12 + ; (bucket-id shrub-vanish-l0-shrub) + ; (bucket-id shrub-vanish-l1-shrub) + ; (bucket-id shrub-vanish-l2-shrub) + ; (bucket-id shrub-vanish-l3-shrub) + ; (bucket-id shrub-vanish-l4-shrub) + ; (bucket-id shrub-vanish-l5-shrub) + ; (bucket-id shrub-vanish-l6-shrub) + ; (bucket-id shrub-vanish-l7-shrub) + ; (bucket-id shrub-vanish-l8-shrub) + ; (bucket-id shrub-vanish-l9-shrub) + ; (bucket-id bucket0) + ; (bucket-id bucket0) + ; ) + ; *draw-index* + ; ) + ; ) + ; (shrub-init-frame s2-3 (new 'static 'gs-test + ; :ate #x1 + ; :atst (gs-atest greater-equal) + ; :aref #x26 + ; :afail #x1 + ; :zte #x1 + ; :ztst (gs-ztest greater-equal) + ; ) + ; ) + ; (let ((s1-1 (the-as prototype-bucket-shrub arg1))) + ; (countdown (s0-1 arg0) + ; (when (nonzero? (-> s1-1 count 2)) + ; (let ((v1-134 (-> s1-1 geometry 2))) + ; (set! sv-96 (-> s1-1 next 2)) + ; (set! sv-112 (&+ v1-134 32)) + ; (set! sv-128 (-> (the-as prototype-shrubbery v1-134) length)) + ; ) + ; (while (nonzero? sv-128) + ; (set! sv-128 (+ sv-128 -1)) + ; (shrub-upload-model + ; (the-as shrubbery sv-112) + ; s2-3 + ; (the-as int (-> *instance-shrub-work* start-bank (-> s1-1 mod-count 2))) + ; ) + ; (let* ((v1-140 s2-3) + ; (a0-60 (-> v1-140 base)) + ; ) + ; (set! (-> (the-as (pointer uint64) a0-60)) (logior #x50000000 (shr (shl sv-96 33) 1))) + ; (s.w! (+ a0-60 8) 0) + ; (s.w! (+ a0-60 12) 0) + ; (set! (-> v1-140 base) (&+ a0-60 16)) + ; ) + ; (set! sv-112 (&+ sv-112 32)) + ; ) + ; ) + ; (&+! s1-1 112) + ; ) + ; ) + ; ) + ; (let ((v1-157 *dma-mem-usage*)) + ; (when (nonzero? v1-157) + ; (set! (-> v1-157 length) (max 28 (-> v1-157 length))) + ; (set! (-> v1-157 data 27 name) "shrubbery") + ; (+! (-> v1-157 data 27 count) 1) + ; (+! (-> v1-157 data 27 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s4-3)) + ; ) + ; (set! (-> v1-157 data 27 total) (-> v1-157 data 27 used)) + ; ) + ; ) + ; ) + ; ) + ; (when (logtest? (vu1-renderer-mask billboard) (-> *display* vu1-enable-user)) + ; (let* ((s4-4 (-> *display* frames (-> *display* on-screen) global-buf base)) + ; (v1-171 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (a2-70 (-> v1-171 base)) + ; ) + ; (dma-buffer-add-gs-set v1-171 (test-1 (new 'static 'gs-test + ; :ate #x1 + ; :atst (gs-atest greater-equal) + ; :aref #x80 + ; :afail #x1 + ; :zte #x1 + ; :ztst (gs-ztest greater-equal) + ; ) + ; ) + ; ) + ; (let ((a0-73 (-> v1-171 base))) + ; (while (nonzero? arg0) + ; (+! arg0 -1) + ; (when (nonzero? (-> (the-as prototype-bucket-shrub arg1) count 3)) + ; (set! (-> *instance-shrub-work* adgif-tmpl dma-vif dma addr) (-> (the-as prototype-bucket-shrub arg1) next 3)) + ; (set! (-> (the-as (pointer uint128) a0-73)) (-> *instance-shrub-work* adgif-tmpl dma-vif quad)) + ; (let ((a1-91 (-> *instance-shrub-work* adgif-tmpl quad 1))) + ; (s.q! (+ a0-73 16) a1-91) + ; ) + ; (let ((a1-92 (the-as prototype-bucket-shrub (-> (the-as prototype-bucket-shrub arg1) geometry 3)))) + ; (let ((a3-46 (-> a1-92 dists quad))) + ; (s.q! (+ a0-73 32) a3-46) + ; ) + ; (let ((a3-47 (-> a1-92 rdists quad))) + ; (s.q! (+ a0-73 48) a3-47) + ; ) + ; (let ((a3-48 (-> a1-92 next-clear))) + ; (s.q! (+ a0-73 64) a3-48) + ; ) + ; (let ((a3-49 (-> a1-92 count-quad))) + ; (s.q! (+ a0-73 80) a3-49) + ; ) + ; (let ((a1-93 (-> a1-92 last-clear))) + ; (s.q! (+ a0-73 96) a1-93) + ; ) + ; ) + ; (&+! a0-73 112) + ; (set! (-> (the-as prototype-bucket-shrub arg1) last 3 dma addr) (the-as int a0-73)) + ; ) + ; (set! arg1 (the-as (inline-array prototype-bucket-shrub) (&+ (the-as prototype-bucket-shrub arg1) 112))) + ; ) + ; (set! (-> v1-171 base) a0-73) + ; ) + ; (let* ((a3-54 (-> v1-171 base)) + ; (v0-12 (when (!= a2-70 a3-54) + ; (let ((a0-74 (-> v1-171 base))) + ; (set! (-> (the-as (pointer int64) a0-74)) #x20000000) + ; (s.w! (+ a0-74 8) 0) + ; (s.w! (+ a0-74 12) 0) + ; (set! (-> v1-171 base) (&+ a0-74 16)) + ; ) + ; (dma-bucket-insert-tag + ; (-> *display* frames (-> *display* on-screen) bucket-group) + ; (-> (new 'static 'array bucket-id 12 + ; (bucket-id billboard-l0-shrub) + ; (bucket-id billboard-l1-shrub) + ; (bucket-id billboard-l2-shrub) + ; (bucket-id billboard-l3-shrub) + ; (bucket-id billboard-l4-shrub) + ; (bucket-id billboard-l5-shrub) + ; (bucket-id billboard-l6-shrub) + ; (bucket-id billboard-l7-shrub) + ; (bucket-id billboard-l8-shrub) + ; (bucket-id billboard-l9-shrub) + ; (bucket-id bucket0) + ; (bucket-id bucket0) + ; ) + ; *draw-index* + ; ) + ; a2-70 + ; (the-as (pointer dma-tag) a3-54) + ; ) + ; ) + ; ) + ; ) + ; (let ((v1-179 *dma-mem-usage*)) + ; (when (nonzero? v1-179) + ; (set! (-> v1-179 length) (max 34 (-> v1-179 length))) + ; (set! (-> v1-179 data 33 name) "billboard") + ; (+! (-> v1-179 data 33 count) 1) + ; (+! (-> v1-179 data 33 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s4-4)) + ; ) + ; (set! (-> v1-179 data 33 total) (-> v1-179 data 33 used)) + ; ) + ; ) + ; v0-12 + ; ) + ; ) + ; ) + ) + +(defun draw-drawable-tree-instance-shrub ((arg0 drawable-tree-instance-shrub) (arg1 level)) + "Draw a shrub tree!" + (local-vars (a0-4 int) (a0-6 int) (a0-11 int) (a0-13 int)) + (set! (-> *instance-shrub-work* texture-dists) (the-as uint (-> arg1 bsp shrub-closest))) + (set! (-> *instance-shrub-work* near-last) (the-as uint 0)) + (set! (-> *instance-shrub-work* near-next) (the-as uint 0)) + (set! (-> *instance-shrub-work* near-count) (the-as uint 0)) + (set! (-> *instance-shrub-work* near-trans-last) (the-as uint 0)) + (set! (-> *instance-shrub-work* near-trans-next) (the-as uint 0)) + (set! (-> *instance-shrub-work* near-trans-count) (the-as uint 0)) + (set! (-> *instance-shrub-work* wind-vectors) (-> arg0 info wind-vectors)) + (set! (-> *instance-shrub-work* wait-to-spr) (the-as uint 0)) + (set! (-> *instance-shrub-work* wait-from-spr) (the-as uint 0)) + (when (logtest? (vu1-renderer-mask shrubbery shrub-near billboard shrub-vanish) (-> *display* vu1-enable-user)) + (let* ((v1-16 (-> arg0 info prototype-inline-array-shrub)) + (s5-0 (-> v1-16 length)) + (s4-0 (-> v1-16 data)) + ) + (countdown (a1-5 s5-0) + (let ((a2-3 (-> v1-16 data a1-5))) + (set! (-> a2-3 next-clear) (the-as uint128 0)) + (set! (-> a2-3 last-clear) (the-as uint128 0)) + (set! (-> a2-3 count-clear) (the-as uint 0)) + ) + 0 + ) + (let ((v1-24 (-> *display* frames (-> *display* on-screen) global-buf))) + (when (nonzero? (-> arg0 length)) + (let ((gp-0 (-> *display* frames (-> *display* on-screen) global-buf base))) + ;; (start-profiling! (-> *perf-stats* data (perf-stat-bucket inst-shrub))) + ;; (draw-inline-array-instance-shrub + ;; v1-24 + ;; (&+ (-> arg0 data 0) 32) + ;; (-> (the-as drawable-group (-> arg0 data 0)) length) + ;; s4-0 + ;; ) + ;; (stop-profiling! (-> *perf-stats* data (perf-stat-bucket inst-shrub))) + + ;; (start-profiling! (-> *perf-stats* data (perf-stat-bucket proto-shrub))) + ;; (draw-prototype-inline-array-shrub s5-0 s4-0) + ;; (stop-profiling! (-> *perf-stats* data (perf-stat-bucket proto-shrub))) + + ;; og:preserve-this PC port shrub drawing + (with-dma-buffer-add-bucket ((buf (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 10 + (bucket-id shrub-l0-shrub) + (bucket-id shrub-l1-shrub) + (bucket-id shrub-l2-shrub) + (bucket-id shrub-l3-shrub) + (bucket-id shrub-l4-shrub) + (bucket-id shrub-l5-shrub) + (bucket-id shrub-l6-shrub) + (bucket-id shrub-l7-shrub) + (bucket-id shrub-l8-shrub) + (bucket-id shrub-l9-shrub) + ) + *draw-index* + )) + (add-pc-tfrag3-data buf (-> *level* draw-level *draw-index*)) + (pc-add-shrub-vis-mask buf (-> *level* draw-level *draw-index*)) + ) + (let ((v1-33 *dma-mem-usage*)) + (when (nonzero? v1-33) + (set! (-> v1-33 length) (max 28 (-> v1-33 length))) + (set! (-> v1-33 data 27 name) "shrubbery") + (+! (-> v1-33 data 27 count) 1) + (+! (-> v1-33 data 27 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint gp-0)) + ) + (set! (-> v1-33 data 27 total) (-> v1-33 data 27 used)) + ) + ) + ) + ) + ) + ) + (update-wait-stats + (-> *perf-stats* data 44) + (the-as uint 0) + (-> *instance-shrub-work* wait-to-spr) + (-> *instance-shrub-work* wait-from-spr) + ) + ) + 0 + (none) + ) + +(defmethod draw ((this drawable-tree-instance-shrub)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + (let ((v1-1 (-> *background-work* shrub-tree-count)) + (a1-3 (-> *level* draw-level *draw-index*)) + ) + (set! (-> *background-work* shrub-trees v1-1) this) + (set! (-> *background-work* shrub-levels v1-1) a1-3) + ) + (+! (-> *background-work* shrub-tree-count) 1) + 0 + (none) + ) + +(defmethod unpack-vis ((this drawable-tree-instance-shrub) (arg0 (pointer int8)) (arg1 (pointer int8))) + arg1 + ) + +(defmethod collect-stats ((this drawable-tree-instance-shrub)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + (when (logtest? (vu1-renderer-mask shrubbery shrub-near billboard shrub-vanish) (-> *display* vu1-enable-user)) + (let* ((v1-4 (-> this info prototype-inline-array-shrub)) + (gp-0 (the-as object (-> v1-4 data))) + ) + (countdown (s5-0 (-> v1-4 length)) + (when (logtest? (vu1-renderer-mask shrub-near) (-> *display* vu1-enable-user)) + (let ((v1-8 (-> (the-as prototype-bucket-shrub gp-0) count 0)) + (a1-2 (-> (the-as prototype-bucket-shrub gp-0) geometry 0)) + ) + (when (nonzero? v1-8) + (let ((a0-4 (-> (the-as drawable-group a1-2) length))) + (+! (-> *terrain-stats* shrub groups) 1) + (+! (-> *terrain-stats* shrub fragments) (* a0-4 (the-as int v1-8))) + ) + (+! (-> *terrain-stats* shrub instances) v1-8) + ) + ) + ) + (when (logtest? (vu1-renderer-mask shrubbery) (-> *display* vu1-enable-user)) + (let ((s4-0 (-> (the-as prototype-bucket-shrub gp-0) count 1)) + (v1-13 (-> (the-as prototype-bucket-shrub gp-0) geometry 1)) + ) + (when (nonzero? s4-0) + (let ((s3-0 (&+ v1-13 32)) + (s2-0 (-> (the-as drawable-group v1-13) length)) + ) + (+! (-> *terrain-stats* shrub groups) 1) + (+! (-> *terrain-stats* shrub fragments) s2-0) + (+! (-> *terrain-stats* shrub instances) s4-0) + (while (nonzero? s2-0) + (+! s2-0 -1) + (let ((a0-17 (* (shrub-num-tris (the-as shrubbery s3-0)) s4-0)) + (v1-25 (* (-> (the-as shrubbery s3-0) header data 2) s4-0)) + ) + (+! (-> *terrain-stats* shrub tris) a0-17) + (+! (-> *terrain-stats* shrub dverts) v1-25) + ) + (&+! s3-0 32) + ) + ) + ) + ) + ) + (when (logtest? (vu1-renderer-mask shrub-vanish) (-> *display* vu1-enable-user)) + (let ((s4-1 (-> (the-as prototype-bucket-shrub gp-0) count 2)) + (v1-31 (-> (the-as prototype-bucket-shrub gp-0) geometry 2)) + ) + (when (nonzero? s4-1) + (let ((s3-1 (&+ v1-31 32)) + (s2-1 (-> (the-as drawable-group v1-31) length)) + ) + (+! (-> *terrain-stats* trans-shrub groups) 1) + (+! (-> *terrain-stats* trans-shrub fragments) s2-1) + (+! (-> *terrain-stats* trans-shrub instances) s4-1) + (while (nonzero? s2-1) + (+! s2-1 -1) + (let ((a0-30 (* (shrub-num-tris (the-as shrubbery s3-1)) s4-1)) + (v1-43 (* (-> (the-as shrubbery s3-1) header data 2) s4-1)) + ) + (+! (-> *terrain-stats* trans-shrub tris) a0-30) + (+! (-> *terrain-stats* trans-shrub dverts) v1-43) + ) + (&+! s3-1 32) + ) + ) + ) + ) + ) + (when (logtest? (vu1-renderer-mask billboard) (-> *display* vu1-enable-user)) + (let ((v1-49 (-> (the-as prototype-bucket-shrub gp-0) count 3))) + (when (nonzero? v1-49) + (+! (-> *terrain-stats* billboard groups) 1) + (+! (-> *terrain-stats* billboard instances) v1-49) + (+! (-> *terrain-stats* billboard tris) (* v1-49 2)) + (+! (-> *terrain-stats* billboard dverts) (* v1-49 4)) + ) + ) + ) + (set! gp-0 (-> (the-as (inline-array prototype-bucket-shrub) gp-0) 1)) + ) + ) + ) + 0 + (none) + ) + +(deftype dma-test (structure) + ((data qword 101 :inline) + ) + ) + + +(define *dma-test* (new 'global 'dma-test)) + +(deftype dma-test-work (structure) + ((upload dma-packet :inline) + (end dma-packet :inline) + ) + ) + + +(define *dma-test-work* + (new 'static 'dma-test-work + :upload (new 'static 'dma-packet :dma (new 'static 'dma-tag :qwc #x20 :id (dma-tag-id ref))) + :end (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id end))) + ) + ) + +;; WARN: Return type mismatch uint128 vs none. +;; ERROR: Failed store: (s.q! (+ v1-0 1616) v0-0) at op 29 +; (defun init-dma-test () +; (let ((a0-0 *dma-test-work*) +; (v1-0 *dma-test*) +; ) +; (let ((a1-6 (-> *display* frames (-> *display* on-screen) calc-buf base))) +; (dotimes (a2-1 100) +; (set! (-> a0-0 upload dma addr) (the-as int a1-6)) +; (set! (-> v1-0 data a2-1 quad) (-> a0-0 upload quad)) +; (&+! a1-6 256) +; ) +; ) +; (let ((v0-0 (-> a0-0 end quad))) +; (s.q! (+ v1-0 1616) v0-0) +; ) +; ) +; (none) +; ) + +; (init-dma-test) + +;; 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/sky/sky-data.gc b/goal_src/jak3/engine/gfx/sky/sky-data.gc index 328ae3b49e..f12e8ba570 100644 --- a/goal_src/jak3/engine/gfx/sky/sky-data.gc +++ b/goal_src/jak3/engine/gfx/sky/sky-data.gc @@ -7,3 +7,1100 @@ ;; DECOMP BEGINS +(define *sky-work* + (new 'static 'sky-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) + ) + :gif (new 'static 'array uint64 2 #x1000000000008005 #xe) + ) + :draw-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) + ) + :gif (new 'static 'array uint64 2 #x502b400000008001 #x42421) + ) + :draw-tmpl2 (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) + ) + :gif (new 'static 'array uint64 2 #x50ab400000008001 #x43431) + ) + :fog-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #xa :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x902a400000008001 #x424242421) + ) + :blend-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) + ) + :gif (new 'static 'array uint64 2 #x50ab400000008001 #x43431) + ) + :sprite-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x3 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x3 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x2003400000008001 #x55) + ) + :sprite-tmpl2 (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x21 :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x21 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x2003400000008010 #x55) + ) + :sun-coords (new 'static 'inline-array vector 2 + (new 'static 'vector :x -267.0 :y -267.0 :w 1.0) + (new 'static 'vector :x 267.0 :y 267.0) + ) + :green-coords (new 'static 'inline-array vector 2 + (new 'static 'vector :x -126.0 :y -126.0 :w 1.0) + (new 'static 'vector :x 126.0 :y 126.0) + ) + :moon0-coords (new 'static 'inline-array vector 2 + (new 'static 'vector :x -357.0 :y -357.0) + (new 'static 'vector :x 357.0 :y 357.0) + ) + :moon1-coords (new 'static 'inline-array vector 2 + (new 'static 'vector :x -1207.0 :y -1207.0 :w 1.0) + (new 'static 'vector :x 1207.0 :y 1207.0) + ) + :moon2-coords (new 'static 'inline-array vector 2 + (new 'static 'vector :x -232.0 :y -232.0) + (new 'static 'vector :x 232.0 :y 232.0) + ) + :day-star-coords (new 'static 'inline-array vector 2 + (new 'static 'vector :x -126.0 :y -126.0 :w 1.0) + (new 'static 'vector :x 126.0 :y 126.0) + ) + :star-coords (new 'static 'inline-array vector 2 (new 'static 'vector :x -1.5 :y -1.5) (new 'static 'vector :x 1.5 :y 1.5)) + :sun-colors (new 'static 'inline-array vector4w 2 + (new 'static 'vector4w :x #xff :y 64 :w 64) + (new 'static 'vector4w :x #xff :y #xff :z #x80 :w 64) + ) + :green-colors (new 'static 'inline-array vector4w 2 + (new 'static 'vector4w :y #xc4 :w #x80) + (new 'static 'vector4w :x #xc4 :y #xff :z #xff :w #x80) + ) + :moon-colors (new 'static 'inline-array vector4w 3 + (new 'static 'vector4w :x 16 :y 32 :z 64 :w 96) + (new 'static 'vector4w :x 16 :y 32 :z 64 :w 64) + (new 'static 'vector4w :x 80 :y 80 :z 80 :w #x80) + ) + :day-star-colors (new 'static 'inline-array vector4w 3 + (new 'static 'vector4w :z #xc4 :w #x80) + (new 'static 'vector4w :x #xc4 :y #xff :z #xff :w #x80) + (new 'static 'vector4w) + ) + :st-coords (new 'static 'inline-array vector 2 (new 'static 'vector :z 1.0) (new 'static 'vector :x 1.0 :y 1.0 :z 1.0)) + :random (new 'static 'inline-array vector4w 8 + (new 'static 'vector4w :x #x181920 :y #x141516 :z #x101112 :w #x234567) + (new 'static 'vector4w :x #x878237 :y #x48778 :z #x489197 :w #x893830) + (new 'static 'vector4w :x #x24762 :y #x289278 :z #x724781 :w #x712983) + (new 'static 'vector4w :x #x176128 :y #x387487 :z #x780983 :w #x723176) + (new 'static 'vector4w :x #x987239 :y #x699872 :z #x987165 :w #x982397) + (new 'static 'vector4w :x #x723897 :y #x238723 :z #x987293 :w #x102981) + (new 'static 'vector4w :x #x387528 :y #x723099 :z #x140983 :w #x874310) + (new 'static 'vector4w :x #x2387 :y #x129818 :z #x219810 :w #x623790) + ) + :giftag-base (new 'static 'dma-gif :gif (new 'static 'array uint64 2 #x3002c00000008001 #x412)) + :giftag-haze (new 'static 'dma-gif :gif (new 'static 'array uint64 2 #x3026c00000008001 #x412)) + :giftag-roof (new 'static 'dma-gif :gif (new 'static 'array uint64 2 #x302ec00000008001 #x412)) + :giftag-ocean (new 'static 'dma-gif :gif (new 'static 'array uint64 2 #x301ec00000008001 #x412)) + :draw-vortex #f + :day-star-scale 1.0 + :disable-day-star #f + ) + ) + +(define sky-base-polygons (new 'static 'inline-array sky-vertex 12 + (new 'static 'sky-vertex :pos (new 'static 'vector :z -40960000.0)) + (new 'static 'sky-vertex :pos (new 'static 'vector :x 40960000.0)) + (new 'static 'sky-vertex :pos (new 'static 'vector :y -40960000.0)) + (new 'static 'sky-vertex :pos (new 'static 'vector :x 40960000.0)) + (new 'static 'sky-vertex :pos (new 'static 'vector :z 40960000.0)) + (new 'static 'sky-vertex :pos (new 'static 'vector :y -40960000.0)) + (new 'static 'sky-vertex :pos (new 'static 'vector :z 40960000.0)) + (new 'static 'sky-vertex :pos (new 'static 'vector :x -40960000.0)) + (new 'static 'sky-vertex :pos (new 'static 'vector :y -40960000.0)) + (new 'static 'sky-vertex :pos (new 'static 'vector :x -40960000.0)) + (new 'static 'sky-vertex :pos (new 'static 'vector :z -40960000.0)) + (new 'static 'sky-vertex :pos (new 'static 'vector :y -40960000.0)) + ) + ) + +(define sky-roof-polygons (new 'static 'inline-array sky-vertex 12 + (new 'static 'sky-vertex :pos (new 'static 'vector :z -40960000.0)) + (new 'static 'sky-vertex :pos (new 'static 'vector :x 40960000.0)) + (new 'static 'sky-vertex :pos (new 'static 'vector :y 10240000.0)) + (new 'static 'sky-vertex :pos (new 'static 'vector :x 40960000.0)) + (new 'static 'sky-vertex :pos (new 'static 'vector :z 40960000.0)) + (new 'static 'sky-vertex :pos (new 'static 'vector :y 10240000.0)) + (new 'static 'sky-vertex :pos (new 'static 'vector :z 40960000.0)) + (new 'static 'sky-vertex :pos (new 'static 'vector :x -40960000.0)) + (new 'static 'sky-vertex :pos (new 'static 'vector :y 10240000.0)) + (new 'static 'sky-vertex :pos (new 'static 'vector :x -40960000.0)) + (new 'static 'sky-vertex :pos (new 'static 'vector :z -40960000.0)) + (new 'static 'sky-vertex :pos (new 'static 'vector :y 10240000.0)) + ) + ) + +(define *cloud-vert-array* (new 'static 'cloud-vert-array)) + +(define *cloud-poly* (new 'static 'inline-array sky-vertex 648 + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + ) + ) + +(defun init-cloud-vert-array () + (let ((gp-0 *cloud-vert-array*)) + (dotimes (s5-0 10) + (dotimes (s4-0 10) + (let ((s3-0 (-> gp-0 data (+ (* 10 s5-0) s4-0)))) + (set! (-> s3-0 pos x) (* 2.0 (+ -4.5 (the float s4-0)))) + (set! (-> s3-0 pos z) (* 2.0 (+ -4.5 (the float s5-0)))) + (set! (-> s3-0 pos y) + (fmin (cos (* 182.04445 (* 10.0 (-> s3-0 pos x)))) (cos (* 182.04445 (* 10.0 (-> s3-0 pos z))))) + ) + (set-vector! (-> s3-0 stq) (* 0.25 (the float (+ s4-0 -4))) (* 0.25 (the float (+ s5-0 -4))) 1.0 1.0) + (set! (-> s3-0 nrm quad) (-> s3-0 pos quad)) + (+! (-> s3-0 nrm y) 1.0) + (vector-normalize! (-> s3-0 nrm) 1.0) + (vector-negate! (-> s3-0 nrm2) (-> s3-0 nrm)) + (cond + ((or (zero? s5-0) (= s5-0 9) (zero? s4-0) (= s4-0 9)) + (set! (-> s3-0 col w) 0.0) + (set! (-> s3-0 col2 w) 0.0) + ) + ((or (= s5-0 1) (= s5-0 8) (= s4-0 1) (= s4-0 8)) + (set! (-> s3-0 col w) 48.0) + (set! (-> s3-0 col2 w) 48.0) + ) + (else + (set! (-> s3-0 col w) 128.0) + (set! (-> s3-0 col2 w) 128.0) + ) + ) + ) + ) + ) + ) + #f + ) + +(init-cloud-vert-array) + +(define *haze-vert-array* (new 'static 'haze-vert-array)) + +(define *haze-poly* (new 'static 'inline-array sky-vertex 144 + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + (new 'static 'sky-vertex) + ) + ) + +(defun init-haze-vert-array () + (let ((gp-0 *haze-vert-array*)) + (dotimes (s5-0 36) + (let ((s4-0 (-> gp-0 data s5-0))) + (set! (-> s4-0 pos x) (* 9.0 (sin (* 182.04445 (* 10.0 (the float s5-0)))))) + (set! (-> s4-0 pos z) (* 9.0 (cos (* 182.04445 (* 10.0 (the float s5-0)))))) + (set! (-> s4-0 pos y) 0.0) + (set! (-> s4-0 nrm quad) (-> s4-0 pos quad)) + (+! (-> s4-0 nrm y) 1.0) + (vector-normalize! (-> s4-0 nrm) 1.0) + ) + ) + ) + #f + ) + +(init-haze-vert-array) + +(defmethod init-sun-data! ((this sky-work) (arg0 int) (arg1 float) (arg2 float) (arg3 float)) + (let ((v1-0 (logand arg0 1))) + (set! (-> this upload-data sun v1-0 r-sun) arg1) + (set! (-> this upload-data sun v1-0 r-halo) arg2) + (set! (-> this upload-data sun v1-0 r-aurora) arg3) + ) + 0 + (none) + ) + +(defmethod init-orbit-settings! ((this sky-work) (arg0 int) (arg1 float) (arg2 float) (arg3 float) (arg4 float) (arg5 float) (arg6 float)) + (set! (-> this orbit arg0 high-noon) arg1) + (set! (-> this orbit arg0 tilt) (* 0.017453292 arg2)) + (set! (-> this orbit arg0 rise) (* 0.017453292 arg3)) + (set! (-> this orbit arg0 dist) arg4) + (set! (-> this orbit arg0 min-halo) arg5) + (set! (-> this orbit arg0 max-halo) arg6) + 0 + (none) + ) + +(defun sky-make-sun-data ((arg0 sky-work) (arg1 int) (arg2 float)) + (let* ((s4-0 (-> arg0 orbit arg1)) + (s3-0 (the-as sky-sun-data (+ (the-as uint (-> arg0 upload-data)) (* arg1 64)))) + (f0-1 (- arg2 (-> s4-0 high-noon))) + (f30-0 (* 2730.6667 f0-1)) + (f28-0 (* (sin f30-0) (-> s4-0 dist))) + (f30-1 (cos f30-0)) + ) + (let* ((f24-0 (* f30-1 (-> s4-0 dist))) + (f26-0 (* f24-0 (cos-rad (-> s4-0 tilt)))) + (f24-1 (* f24-0 (sin-rad (-> s4-0 tilt)))) + (f22-0 (sin-rad (-> s4-0 rise))) + (f0-10 (cos-rad (-> s4-0 rise))) + ) + (set! (-> s3-0 pos z) (- (+ (* f28-0 f0-10) (* f24-1 f22-0)))) + (set! (-> s3-0 pos y) f26-0) + (set! (-> s3-0 pos x) (- (* f24-1 f0-10) (* f28-0 f22-0))) + ) + (let ((f0-14 (if (< f30-1 0.0) + 0.0 + f30-1 + ) + ) + ) + (set! (-> arg0 upload-data sun arg1 r-aurora) + (+ (* (-> s4-0 min-halo) (- 1.0 f0-14)) (* (-> s4-0 max-halo) f0-14)) + ) + ) + ) + 0 + (none) + ) + +(defun sky-make-moon-data ((arg0 sky-work) (arg1 float)) + (let* ((s5-0 (-> arg0 orbit 2)) + (gp-0 (-> arg0 upload-data moon)) + (f0-1 (- arg1 (-> s5-0 high-noon))) + (f28-0 (* 2730.6667 f0-1)) + (f30-0 (* (sin f28-0) (-> s5-0 dist))) + (f26-0 (* (cos f28-0) (-> s5-0 dist))) + (f28-1 (* f26-0 (cos-rad (-> s5-0 tilt)))) + (f26-1 (* f26-0 (sin-rad (-> s5-0 tilt)))) + (f24-0 (sin-rad (-> s5-0 rise))) + (f0-10 (cos-rad (-> s5-0 rise))) + ) + (set! (-> gp-0 pos z) (- (+ (* f30-0 f0-10) (* f26-1 f24-0)))) + (set! (-> gp-0 pos y) f28-1) + (set! (-> gp-0 pos x) (- (* f26-1 f0-10) (* f30-0 f24-0))) + ) + 0 + (none) + ) + +(init-sun-data! *sky-work* 0 60.0 200.0 300.0) + +(init-sun-data! *sky-work* 1 15.0 20.0 300.0) + +(init-orbit-settings! *sky-work* 0 12.5 -20.0 90.0 9950.0 300.0 300.0) + +(init-orbit-settings! *sky-work* 1 4.0 0.0 90.0 9950.0 300.0 300.0) + +(init-orbit-settings! *sky-work* 2 0.5 -40.0 90.0 9950.0 300.0 300.0) + +(let ((v0-9 (-> *sky-work* upload-data day-star))) + (set! (-> v0-9 pos x) 0.0) + (set! (-> v0-9 pos y) 2000.0) + (set! (-> v0-9 pos z) -9000.0) + (set! (-> v0-9 pos w) 1.0) + ) diff --git a/goal_src/jak3/engine/gfx/sky/sky-h.gc b/goal_src/jak3/engine/gfx/sky/sky-h.gc index 11aca67edd..417817391c 100644 --- a/goal_src/jak3/engine/gfx/sky/sky-h.gc +++ b/goal_src/jak3/engine/gfx/sky/sky-h.gc @@ -194,12 +194,12 @@ (disable-day-star basic) ) (:methods - (sky-work-method-9 () none) - (sky-work-method-10 () none) - (sky-work-method-11 () none) - (sky-work-method-12 () none) + (init-sun-data! (_type_ int float float float) none) + (init-orbit-settings! (_type_ int float float float float float float) none) + (update-colors-for-time (_type_ float) none) + (update-time-and-speed (_type_ float float) none) (sky-work-method-13 () none) - (sky-work-method-14 () none) + (draw (_type_) none) (sky-work-method-15 () none) (sky-work-method-16 () none) (sky-work-method-17 () none) diff --git a/goal_src/jak3/engine/gfx/sky/sky-tng.gc b/goal_src/jak3/engine/gfx/sky/sky-tng.gc index e46894d876..4c10895d47 100644 --- a/goal_src/jak3/engine/gfx/sky/sky-tng.gc +++ b/goal_src/jak3/engine/gfx/sky/sky-tng.gc @@ -7,3 +7,78 @@ ;; DECOMP BEGINS +(defun close-sky-buffer ((arg0 dma-buffer)) + "Terminate dma from large polygon renderer. This should be called after the last + call to render-sky-tri/quad." + (nop!) + (let ((v1-0 #x8000) + (v0-0 (-> arg0 base)) + ) + (set! (-> (the-as (pointer uint128) v0-0)) (the uint128 0)) + (nop!) + (set! (-> (the-as (pointer int32) v0-0)) v1-0) + (let ((v0-1 (&+ v0-0 16))) + ;; to save like 1 instruction they put this in the delay slot of the jr-ra + ;;(.jr ra-0) + (set! (-> arg0 base) v0-1) + ) + ) + (none) + ) + +(defmethod update-time-and-speed ((this sky-work) (arg0 float) (arg1 float)) + (if (and (level-get-target-inside *level*) (= (-> (level-get-target-inside *level*) info taskname) 'nest)) + (set! arg1 (* 10.0 arg1)) + ) + (sky-make-sun-data this 0 arg0) + (sky-make-sun-data this 1 arg0) + (sky-make-moon-data this arg0) + (+! (-> this off-s) (the int (* -8.0 arg1))) + (+! (-> this off-t) (the int (* 2.0 arg1))) + (set! (-> this time) arg0) + 0 + (none) + ) + +(defmethod update-colors-for-time ((this sky-work) (arg0 float)) + 0 + 0 + 0.0 + (let ((s5-0 *no-cloud-mood-color-table*)) + (let ((s3-0 (-> *level* level-default mood-context)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (let* ((v1-3 (the int arg0)) + (f0-4 (- arg0 (the float v1-3))) + (f1-3 (- 1.0 f0-4)) + (a0-4 (/ v1-3 24)) + (a1-2 (-> *mood-interp-table* hour (- v1-3 (* 24 a0-4)))) + (a0-7 (-> a1-2 snapshot1)) + (v1-7 (-> a1-2 snapshot2)) + (f0-6 (+ (* f1-3 (-> a1-2 morph-start)) (* f0-4 (-> a1-2 morph-end)))) + ) + (cond + ((= a0-7 v1-7) + (set! (-> this sun0-color quad) (-> s5-0 data a0-7 lgt-color quad)) + ) + (else + (let ((a1-5 (-> s5-0 data a0-7)) + (v1-11 (-> s5-0 data v1-7)) + ) + (vector4-lerp! (-> this sun0-color) (-> a1-5 lgt-color) (-> v1-11 lgt-color) f0-6) + ) + ) + ) + ) + (set! (-> this sun0-color-lower quad) (-> s3-0 times 1 quad)) + (set! (-> this ambi-color-lower quad) (-> s3-0 times 0 quad)) + (set-vector! s4-0 1.9921875 1.9921875 1.9921875 1.0) + (vector4-lerp! (-> this ambi-color) (-> this ambi-color-lower) s4-0 (-> *mood-control* lightning-flash)) + ) + (set! (-> this sun0-color quad) (-> this sun0-color quad)) + (set! (-> this sun1-color quad) (-> s5-0 data 7 lgt-color quad)) + (set! (-> this moon-color quad) (-> s5-0 data 6 lgt-color quad)) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/gfx/sprite/particles/light-trails-h.gc b/goal_src/jak3/engine/gfx/sprite/particles/light-trails-h.gc index 26fbaaf8e5..faaa0e1518 100644 --- a/goal_src/jak3/engine/gfx/sprite/particles/light-trails-h.gc +++ b/goal_src/jak3/engine/gfx/sprite/particles/light-trails-h.gc @@ -7,3 +7,228 @@ ;; DECOMP BEGINS +(deftype color-array (inline-array-class) + ((data rgbaf :inline :dynamic) + ) + ) + + +(set! (-> color-array heap-base) (the-as uint 16)) + +(deftype light-trail-composition (structure) + ((color-mode uint64) + (color-curve curve-color-piecewise) + (color-repeat-dist float) + (alpha-1-mode uint64) + (alpha-2-mode uint64) + (base-alpha float) + (alpha-curve-1 curve2d-piecewise) + (alpha-curve-2 curve2d-piecewise) + (alpha-repeat-dist float) + (width-mode uint64) + (base-width float) + (width-curve curve2d-piecewise) + (width-repeat-dist float) + (uv-mode uint64) + (uv-repeat-dist float) + (max-age time-frame) + (tex-id uint32) + (lie-mode uint64) + (lie-vector vector :inline) + (zbuffer? symbol) + (use-tape-mode? symbol) + (blend-mode uint64) + (frame-stagger uint8) + ) + ) + + +(deftype light-trail-breadcrumb (structure) + ((pos vector :inline) + (birth-time uint32 :overlay-at (-> pos data 3)) + ) + ) + + +(deftype breadcrumb-array (inline-array-class) + ((data light-trail-breadcrumb :dynamic) + ) + ) + + +(set! (-> breadcrumb-array heap-base) (the-as uint 16)) + +(deftype light-trail (basic) + ((crumb-array (array light-trail-breadcrumb)) + (crumb-size uint8) + (crumb-count int16) + (max-crumb-count int16) + (appearance light-trail-composition) + (start-marker uint64) + (end-marker uint64) + (decision uint64) + (total-distance-traveled float) + (strip prim-strip) + (strip2 prim-strip) + (cache-vector vector 4 :inline) + ) + (:methods + (light-trail-method-9 (_type_ light-trail-composition int) none) + (light-trail-method-10 (_type_) none) + (light-trail-method-11 (_type_ vector time-frame) int) + (light-trail-method-12 (_type_) none) + (light-trail-method-13 (_type_) int) + (light-trail-method-14 (_type_) none) + (light-trail-method-15 (_type_) none) + (add-vert! (_type_ prim-strip vector float float float) none) + (light-trail-method-17 (_type_ vector float float vector float) symbol) + (light-trail-method-18 (_type_ light-trail-breadcrumb int vector vector) none) + (light-trail-method-19 (_type_ float int) none) + (reset-crumbs! (_type_) none) + (light-trail-method-21 (_type_ vector) none) + ) + ) + + +(deftype weapon-trail-crumb (light-trail-breadcrumb) + ((offset vector :inline) + ) + ) + + +(deftype weapon-trail (light-trail) + () + (:methods + (weapon-trail-method-22 (_type_ vector vector) light-trail-breadcrumb) + (weapon-trail-method-23 (_type_ vector vector) none) + ) + ) + + +(deftype tread-trail-crumb (light-trail-breadcrumb) + ((normal vector :inline) + ) + ) + + +(deftype tread-trail (light-trail) + () + (:methods + (tread-trail-method-22 (_type_ vector vector) light-trail-breadcrumb) + (tread-trail-method-23 (_type_ vector vector) light-trail-breadcrumb) + ) + ) + + +(deftype light-trail-tracker-spawn-params (structure) + ((appearance light-trail-composition) + (max-num-crumbs int32) + (tracked-obj handle) + (track-immediately? symbol) + ) + ) + + +(deftype weapon-trail-tracker-spawn-params (light-trail-tracker-spawn-params) + ((joint0 int16) + (joint1 int16) + ) + ) + + +(deftype light-trail-tracker (process) + ((trail light-trail) + (tracked-object handle) + (offscreen? symbol) + (offscreen-start-time time-frame) + (next-line-check-time time-frame) + (last-add-frame-val uint32) + ) + (:state-methods + tracking + die + ) + (:methods + (light-trail-tracker-method-16 (_type_ process-focusable vector) vector) + (light-trail-tracker-method-17 (_type_ process-focusable) symbol) + (light-trail-tracker-method-18 (_type_ process-focusable) symbol) + (light-trail-tracker-method-19 (_type_) symbol) + (light-trail-tracker-method-20 (_type_ vector) none) + ) + ) + + +(deftype weapon-trail-tracker (light-trail-tracker) + ((trail weapon-trail :override) + (joint0 int16) + (joint1 int16) + (state-time time-frame) + ) + (:state-methods + hang-on + ) + ) + + +(deftype tread-trail-tracker (light-trail-tracker) + ((trail tread-trail :override) + ) + ) + + +(defbehavior light-trail-tracker-init-by-other light-trail-tracker ((arg0 light-trail-tracker-spawn-params)) + (stack-size-set! (-> self main-thread) 32) + (set! (-> self tracked-object) (-> arg0 tracked-obj)) + (set! (-> self trail) (new 'process 'light-trail)) + (set! (-> self next-line-check-time) 0) + (set! (-> self last-add-frame-val) (the-as uint 0)) + (set! (-> self offscreen?) #f) + (light-trail-method-9 (-> self trail) (-> arg0 appearance) (-> arg0 max-num-crumbs)) + (when (-> arg0 track-immediately?) + (let ((gp-1 (handle->process (-> self tracked-object)))) + (if (light-trail-tracker-method-17 self (the-as process-focusable gp-1)) + (light-trail-method-11 + (-> self trail) + (light-trail-tracker-method-16 self (the-as process-focusable gp-1) (new 'stack-no-clear 'vector)) + (seconds 10000) + ) + ) + ) + ) + (go-virtual tracking) + ) + +(defbehavior weapon-trail-tracker-init-by-other weapon-trail-tracker ((arg0 weapon-trail-tracker-spawn-params)) + (set! (-> self tracked-object) (-> arg0 tracked-obj)) + (set! (-> self trail) (new 'process 'weapon-trail)) + (set! (-> self next-line-check-time) 0) + (set! (-> self last-add-frame-val) (the-as uint 0)) + (set! (-> self joint0) (-> arg0 joint0)) + (set! (-> self joint1) (-> arg0 joint1)) + (set! (-> self offscreen?) #f) + (light-trail-method-9 (-> self trail) (-> arg0 appearance) (-> arg0 max-num-crumbs)) + (go-virtual tracking) + ) + +(defbehavior tread-trail-tracker-init-by-other tread-trail-tracker ((arg0 light-trail-tracker-spawn-params)) + (set! (-> self tracked-object) (-> arg0 tracked-obj)) + (set! (-> self trail) (new 'process 'tread-trail)) + (set! (-> self offscreen?) #f) + (set! (-> self next-line-check-time) 0) + (set! (-> self last-add-frame-val) (the-as uint 0)) + (light-trail-method-9 (-> self trail) (-> arg0 appearance) (-> arg0 max-num-crumbs)) + (go-virtual tracking) + ) + +(deftype light-trail-tracker-water (light-trail-tracker) + () + ) + + +(deftype light-trail-tracker-projectile (light-trail-tracker) + ((state-time time-frame) + ) + (:state-methods + hang-on + ) + ) diff --git a/goal_src/jak3/engine/gfx/sprite/particles/light-trails.gc b/goal_src/jak3/engine/gfx/sprite/particles/light-trails.gc index c9f4f8811b..68f562bfe0 100644 --- a/goal_src/jak3/engine/gfx/sprite/particles/light-trails.gc +++ b/goal_src/jak3/engine/gfx/sprite/particles/light-trails.gc @@ -7,3 +7,1258 @@ ;; DECOMP BEGINS +(defmethod light-trail-method-9 ((this light-trail) (arg0 light-trail-composition) (arg1 int)) + (set! (-> this appearance) arg0) + (set! (-> this crumb-size) (the-as uint (max 16 (the-as int (-> this crumb-size))))) + (set! (-> this crumb-array) + (the-as + (array light-trail-breadcrumb) + (new 'process 'boxed-array uint8 (* arg1 (the-as int (-> this crumb-size)))) + ) + ) + (set! (-> this max-crumb-count) arg1) + (set! (-> this crumb-count) 0) + (set! (-> this strip) + (new 'process 'prim-strip (* arg1 2) (the-as texture-id (-> arg0 tex-id)) (the-as string #f)) + ) + (set! (-> this strip2) #f) + (if (= (-> this appearance lie-mode) 3) + (set! (-> this strip2) + (new 'process 'prim-strip (* arg1 2) (the-as texture-id (-> arg0 tex-id)) (the-as string #f)) + ) + ) + (light-trail-method-10 this) + 0 + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod light-trail-method-10 ((this light-trail)) + (set! (-> this crumb-count) 0) + (set! (-> this start-marker) (the-as uint (current-time))) + (set! (-> this end-marker) (the-as uint (current-time))) + (set! (-> this decision) (the-as uint 2)) + (set! (-> this total-distance-traveled) 0.0) + (none) + ) + +(defmethod light-trail-method-11 ((this light-trail) (arg0 vector) (arg1 time-frame)) + (local-vars (s3-0 int)) + (with-pp + (if (< (seconds 5000) arg1) + (set! arg1 (- (current-time) (-> pp clock old-frame-counter))) + ) + (let ((v1-5 (-> this crumb-count))) + 0.0 + (when (> v1-5 0) + (let* ((v1-8 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ v1-5 -1)))) + (f0-1 (vector-vector-distance (the-as vector (&+ v1-8 0)) arg0)) + ) + (cond + ((< f0-1 40.96) + (set! (-> this decision) (the-as uint 1)) + (set! s3-0 1) + (goto cfg-12) + ) + (else + (+! (-> this total-distance-traveled) f0-1) + ) + ) + ) + ) + ) + (set! s3-0 2) + (when (= (-> this crumb-count) (-> this max-crumb-count)) + (let ((a0-11 (&+ (-> this crumb-array data) (* (-> this crumb-size) 0))) + (a1-4 (&+ (-> this crumb-array data) (-> this crumb-size))) + (v1-20 (* (+ (-> this crumb-count) -1) (the-as int (-> this crumb-size)))) + ) + (quad-copy! a0-11 a1-4 (/ v1-20 16)) + ) + (+! (-> this crumb-count) -1) + (set! s3-0 0) + ) + (let ((a1-5 (new 'stack-no-clear 'light-trail-breadcrumb))) + (let ((f1-2 (the float (- (-> this start-marker) (-> this end-marker)))) + (f2-0 (the float (-> this appearance max-age))) + (f0-5 0.0) + ) + (if (-> this appearance use-tape-mode?) + (set! f0-5 (- f2-0 f1-2)) + ) + (set! (-> a1-5 pos quad) (-> arg0 quad)) + (set! (-> a1-5 pos w) (the-as float (the int (- (the float (+ (-> this start-marker) arg1)) f0-5)))) + ) + (mem-copy! + (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (-> this crumb-count))) + (the-as pointer a1-5) + (the-as int (-> this crumb-size)) + ) + ) + (+! (-> this crumb-count) 1) + (set! (-> this decision) (the-as uint 0)) + (label cfg-12) + s3-0 + ) + ) + +(defmethod light-trail-method-21 ((this light-trail) (arg0 vector)) + (with-pp + (let ((v1-0 (-> this crumb-count))) + 0.0 + (cond + ((zero? v1-0) + (light-trail-method-11 this arg0 (seconds 10000)) + ) + (else + (set! (-> this decision) (the-as uint 0)) + (let ((gp-0 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ v1-0 -1))))) + (let ((f0-1 (vector-vector-distance (the-as vector (&+ gp-0 0)) arg0))) + (+! (-> this total-distance-traveled) f0-1) + (if (< f0-1 40.96) + (set! (-> this decision) (the-as uint 1)) + ) + ) + (let ((f1-3 (the float (- (-> this start-marker) (-> this end-marker)))) + (f2-0 (the float (-> this appearance max-age))) + (f0-4 0.0) + ) + (if (-> this appearance use-tape-mode?) + (set! f0-4 (- f2-0 f1-3)) + ) + (set! (-> (the-as light-trail-breadcrumb (&+ gp-0 0)) pos quad) (-> arg0 quad)) + (set! (-> gp-0 3) + (the-as + light-trail-breadcrumb + (the int (- (the float (+ (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter)))) f0-4)) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + ) + +(defmethod add-vert! ((this light-trail) (arg0 prim-strip) (arg1 vector) (arg2 float) (arg3 float) (arg4 float)) + (let ((v1-3 (-> arg0 data (-> arg0 num-verts)))) + (set! (-> v1-3 pos quad) (-> arg1 quad)) + (set! (-> v1-3 col) (the-as rgba arg2)) + (set! (-> v1-3 stq x) arg3) + (set! (-> v1-3 stq y) arg4) + ) + (+! (-> arg0 num-verts) 1) + 0 + (none) + ) + +(defmethod light-trail-method-17 ((this light-trail) (arg0 vector) (arg1 float) (arg2 float) (arg3 vector) (arg4 float)) + (if (< (+ (-> this strip allocated-num-verts) -2) (-> this strip num-verts)) + (return #f) + ) + (cond + ((= (-> this appearance lie-mode) 3) + (let ((s1-0 (new 'stack-no-clear 'vector))) + (set! (-> s1-0 quad) (-> this cache-vector 0 quad)) + (vector-normalize! s1-0 (* 0.5 arg2)) + (add-vert! this (-> this strip) (vector+! (new 'stack-no-clear 'vector) arg0 s1-0) arg1 arg4 0.0) + (add-vert! this (-> this strip) (vector+float*! (new 'stack-no-clear 'vector) arg0 s1-0 -1.0) arg1 arg4 1.0) + ) + (let ((s1-1 (new 'stack-no-clear 'vector))) + (set! (-> s1-1 quad) (-> this cache-vector 1 quad)) + (vector-normalize! s1-1 (* 0.5 arg2)) + (add-vert! this (-> this strip2) (vector+! (new 'stack-no-clear 'vector) arg0 s1-1) arg1 arg4 0.0) + (add-vert! this (-> this strip2) (vector+float*! (new 'stack-no-clear 'vector) arg0 s1-1 -1.0) arg1 arg4 1.0) + ) + ) + (else + (let ((s1-2 (new 'stack-no-clear 'vector))) + (set! (-> s1-2 quad) (-> arg3 quad)) + (vector-normalize! s1-2 (* 0.5 arg2)) + (add-vert! this (-> this strip) (vector+! (new 'stack-no-clear 'vector) arg0 s1-2) arg1 arg4 0.0) + (add-vert! this (-> this strip) (vector+float*! (new 'stack-no-clear 'vector) arg0 s1-2 -1.0) arg1 arg4 1.0) + ) + ) + ) + #f + ) + +(defun compute-trail-scaled-t ((arg0 uint) (arg1 float) (arg2 float) (arg3 float) (arg4 float) (arg5 float) (arg6 vector)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + arg1 + ) + ((= v1-0 5) + (let* ((v1-2 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-3 (the-as number (logior #x3f800000 v1-2))) + ) + (+ -1.0 (the-as float v1-3)) + ) + ) + ((= v1-0 2) + (/ arg2 arg5) + ) + ((= v1-0 1) + (/ arg3 arg5) + ) + ((= v1-0 3) + (/ arg4 arg5) + ) + ((= v1-0 4) + (/ (vector-vector-distance (camera-pos) arg6) arg5) + ) + (else + 1.0 + ) + ) + ) + ) + +(kmemopen global "light-trails") + +(define *dist-cache-array* (the-as (pointer float) (malloc 'global 4000))) + +(define *total-length* 0.0) + +(kmemclose) + +;; WARN: Return type mismatch vector vs none. +(defmethod light-trail-method-18 ((this light-trail) (arg0 light-trail-breadcrumb) (arg1 int) (arg2 vector) (arg3 vector)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (cond + ((> (the-as uint arg1) 0) + (let ((t2-1 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint (+ arg1 -1)))))) + (vector-! v1-0 (-> arg0 pos) (the-as vector (&+ t2-1 0))) + ) + ) + (else + (let ((t1-6 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint (+ arg1 1)))))) + (vector-! v1-0 (the-as vector (&+ t1-6 0)) (-> arg0 pos)) + ) + ) + ) + (let ((a2-9 (-> this appearance lie-mode))) + (cond + ((= a2-9 1) + (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) + (set! (-> arg3 y) 0.0) + ) + ((zero? a2-9) + (vector-cross! arg3 (vector-! (new 'stack-no-clear 'vector) (-> arg0 pos) arg2) v1-0) + ) + ((= a2-9 2) + (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) + (set! (-> arg3 y) 0.0) + (vector-cross! arg3 v1-0 arg3) + ) + ((= a2-9 3) + (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) + (set! (-> arg3 y) 0.0) + (set! (-> this cache-vector 0 quad) (-> arg3 quad)) + (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) + (set! (-> arg3 y) 0.0) + (vector-cross! arg3 v1-0 arg3) + (set! (-> this cache-vector 1 quad) (-> arg3 quad)) + ) + ) + ) + ) + (none) + ) + +(defmethod light-trail-method-12 ((this light-trail)) + (local-vars + (sv-64 time-frame) + (sv-72 uint) + (sv-80 int) + (sv-88 float) + (sv-92 float) + (sv-96 float) + (sv-100 rgbaf) + (sv-104 vector) + (sv-128 vector) + (sv-132 vector) + (sv-136 float) + (sv-140 float) + (sv-144 float) + (sv-148 float) + (sv-152 float) + (sv-156 float) + (sv-192 float) + (sv-196 float) + (sv-200 vector) + (sv-204 vector) + ) + (set! (-> *dist-cache-array* 0) 0.0) + (set! *total-length* 0.0) + (let ((s5-0 (new 'stack-no-clear 'array 'int32 4))) + (set! (-> s5-0 0) (-> this crumb-count)) + (let ((s3-0 (+ (-> s5-0 0) -1)) + (s4-0 1) + ) + (while (>= s3-0 s4-0) + (let* ((v1-5 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint (+ s4-0 -1))))) + (a1-3 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint s4-0)))) + (a0-6 (- (-> this start-marker) (the-as uint (-> a1-3 3)))) + ) + (when (and (>= a0-6 0) (< a0-6 (-> this appearance max-age))) + (set! *total-length* + (+ *total-length* (vector-vector-distance (the-as vector (&+ v1-5 0)) (the-as vector (&+ a1-3 0)))) + ) + (set! (-> *dist-cache-array* s4-0) *total-length*) + ) + ) + (+! s4-0 1) + ) + ) + (set! sv-64 (-> this appearance max-age)) + (set! sv-72 (- (-> this start-marker) (-> this end-marker))) + (set! sv-80 0) + (set! sv-88 (the-as float 0.0)) + (set! sv-92 (the-as float -100.0)) + (set! sv-96 (the-as float 0.0)) + (set! sv-100 (new 'stack-no-clear 'rgbaf)) + (set! sv-104 (new 'stack-no-clear 'vector)) + (if (= (-> this appearance uv-mode) 3) + (set! sv-92 (the-as float 100.0)) + ) + (set! sv-128 (math-camera-pos)) + (set! sv-132 (new 'stack-no-clear 'vector)) + (set! (-> this strip num-verts) (the-as uint 0)) + (set! (-> this strip tex-id) (the-as texture-id (-> this appearance tex-id))) + (cond + ((not (-> this appearance zbuffer?)) + (set! (-> this strip adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> this strip data0) (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x80 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + ) + (else + (set! (-> this strip adnops 0 cmds) (gs-reg64 hack)) + (set! (-> this strip data0) (new 'static 'gs-test)) + 0 + ) + ) + (let ((v1-34 (-> this appearance blend-mode))) + (cond + ((= v1-34 1) + (set! (-> this strip alpha) (new 'static 'gs-alpha :b #x2 :d #x1)) + ) + ((zero? v1-34) + (set! (-> this strip alpha) (new 'static 'gs-alpha :b #x1 :d #x1)) + ) + ((= v1-34 2) + (set! (-> this strip alpha) (new 'static 'gs-alpha :a #x2 :d #x1)) + ) + ) + ) + (when (-> this strip2) + (set! (-> this strip2 num-verts) (the-as uint 0)) + (set! (-> this strip2 tex-id) (the-as texture-id (-> this appearance tex-id))) + (cond + ((not (-> this appearance zbuffer?)) + (set! (-> this strip2 adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> this strip2 data0) (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x80 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + ) + (else + (set! (-> this strip2 adnops 0 cmds) (gs-reg64 hack)) + (set! (-> this strip2 data0) (new 'static 'gs-test)) + 0 + ) + ) + (let ((v1-52 (-> this appearance blend-mode))) + (cond + ((= v1-52 1) + (set! (-> this strip2 alpha) (new 'static 'gs-alpha :b #x2 :d #x1)) + ) + ((zero? v1-52) + (set! (-> this strip2 alpha) (new 'static 'gs-alpha :b #x1 :d #x1)) + ) + ((= v1-52 2) + (set! (-> this strip2 alpha) (new 'static 'gs-alpha :a #x2 :d #x1)) + ) + ) + ) + ) + (countdown (s5-1 (-> s5-0 0)) + (let* ((s3-1 s5-1) + (s4-1 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) s3-1))) + ) + (set! sv-136 (/ (the float (+ (- (-> this start-marker) (the-as uint (-> s4-1 3))) sv-80)) (the float sv-64))) + (when (or (< 1.0 sv-136) (< sv-136 0.0)) + ) + (when (and (>= 1.0 sv-136) (>= sv-136 0.0)) + (let* ((f30-1 (-> *dist-cache-array* s5-1)) + (f28-0 (- *total-length* f30-1)) + (f26-0 (- (-> this total-distance-traveled) f28-0)) + ) + (set! sv-140 (the-as float 1.0)) + (set! sv-144 (the-as float 1.0)) + (set! sv-148 (the-as float 1.0)) + (set! sv-152 (the-as float 0.0)) + (set! sv-156 (the-as float 0.0)) + (when (-> this appearance alpha-curve-1) + (set! sv-140 + (compute-trail-scaled-t + (-> this appearance alpha-1-mode) + sv-136 + f30-1 + f28-0 + f26-0 + (-> this appearance alpha-repeat-dist) + (the-as vector (&+ s4-1 0)) + ) + ) + (set! sv-140 (curve2d-method-9 (-> this appearance alpha-curve-1) sv-140 3)) + ) + (when (-> this appearance alpha-curve-2) + (set! sv-144 + (compute-trail-scaled-t + (-> this appearance alpha-2-mode) + sv-136 + f30-1 + f28-0 + f26-0 + (-> this appearance alpha-repeat-dist) + (the-as vector (&+ s4-1 0)) + ) + ) + (set! sv-144 (curve2d-method-9 (-> this appearance alpha-curve-2) sv-144 3)) + ) + (when (-> this appearance width-curve) + (set! sv-148 + (compute-trail-scaled-t + (-> this appearance width-mode) + sv-136 + f30-1 + f28-0 + f26-0 + (-> this appearance width-repeat-dist) + (the-as vector (&+ s4-1 0)) + ) + ) + (set! sv-148 (curve2d-method-9 (-> this appearance width-curve) sv-148 3)) + ) + (set! sv-152 + (compute-trail-scaled-t + (-> this appearance uv-mode) + sv-136 + f30-1 + f28-0 + f26-0 + (-> this appearance uv-repeat-dist) + (the-as vector (&+ s4-1 0)) + ) + ) + (when (or (< 1.0 sv-152) (< sv-152 0.0)) + (let ((f0-43 sv-152)) + (set! sv-152 (- f0-43 (the float (the int f0-43)))) + ) + ) + (set! sv-192 (* sv-140 sv-144 (-> this appearance base-alpha))) + (set! sv-196 (* sv-148 (-> this appearance base-width))) + (set! sv-200 (new 'stack-no-clear 'vector)) + (set! sv-204 (new 'stack-no-clear 'vector)) + (when (-> this appearance color-curve) + (set! sv-156 + (compute-trail-scaled-t + (-> this appearance color-mode) + sv-136 + f30-1 + f28-0 + f26-0 + (-> this appearance color-repeat-dist) + (the-as vector (&+ s4-1 0)) + ) + ) + (curve-color-method-9 (-> this appearance color-curve) sv-156 (the-as rgbaf sv-200) 3) + ) + ) + (set! (-> sv-200 w) (* (-> sv-200 w) sv-192)) + (light-trail-method-18 this (the-as light-trail-breadcrumb s4-1) s3-1 sv-128 sv-204) + (when (or (and (= (-> this appearance uv-mode) 3) (< sv-92 sv-152)) + (and (!= (-> this appearance uv-mode) 3) (< sv-152 sv-92)) + ) + (let ((s2-0 (new 'stack-no-clear 'inline-array 'vector 5))) + (set! (-> s2-0 3 z) (- sv-152)) + (set! (-> s2-0 3 w) (- sv-92 (-> s2-0 3 z))) + (set! (-> s2-0 4 x) (/ sv-92 (-> s2-0 3 w))) + (vector-lerp! (-> s2-0 0) sv-104 (the-as vector (&+ s4-1 0)) (-> s2-0 4 x)) + (rgbaf-lerp! (the-as rgbaf (-> s2-0 2)) sv-100 (the-as rgbaf sv-200) (-> s2-0 4 x)) + (set! (-> s2-0 3 y) (lerp sv-96 sv-196 (-> s2-0 4 x))) + (vector-lerp! (-> s2-0 1) sv-132 sv-204 (-> s2-0 4 x)) + (set! (-> s2-0 3 x) (the-as float (rgba<-rgbaf (the-as rgba (-> s2-0 3 x)) (the-as rgbaf (-> s2-0 2))))) + (light-trail-method-17 this (-> s2-0 0) (-> s2-0 3 x) (-> s2-0 3 y) (-> s2-0 1) 0.0) + (light-trail-method-17 this (-> s2-0 0) (-> s2-0 3 x) (-> s2-0 3 y) (-> s2-0 1) 1.0) + ) + ) + (light-trail-method-17 + this + (the-as vector (&+ s4-1 0)) + (the-as float (rgba<-rgbaf (the-as rgba (new 'stack-no-clear 'rgbaf)) (the-as rgbaf sv-200))) + sv-196 + sv-204 + sv-152 + ) + (when (> s3-1 0) + (let ((v1-149 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ s3-1 -1))))) + (set! sv-88 (+ sv-88 (vector-vector-distance (the-as vector (&+ s4-1 0)) (the-as vector (&+ v1-149 0))))) + ) + ) + (set! sv-92 sv-152) + (set! (-> sv-104 quad) (-> (the-as vector (&+ s4-1 0)) quad)) + (set! sv-96 sv-196) + (set! (-> sv-100 quad) (-> sv-200 quad)) + (set! (-> sv-132 quad) (-> sv-204 quad)) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod light-trail-method-19 ((this light-trail) (arg0 float) (arg1 int)) + 0 + (none) + ) + +;; WARN: Return type mismatch pointer vs none. +(defmethod light-trail-method-14 ((this light-trail)) + (let ((s4-0 (new 'stack-no-clear 'light-trail-breadcrumb)) + (s5-0 -1) + ) + (let ((s3-0 (-> this crumb-count))) + (dotimes (s2-0 s3-0) + (let ((a1-0 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint s2-0))))) + (cond + ((< (the-as uint (-> a1-0 3)) (-> this end-marker)) + (mem-copy! (the-as pointer s4-0) a1-0 16) + (set! s5-0 s2-0) + ) + (else + (goto cfg-8) + ) + ) + ) + ) + ) + (label cfg-8) + (when (>= s5-0 0) + (let ((s3-1 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint (+ s5-0 1))))) + (s2-1 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint s5-0)))) + ) + (let* ((f0-1 (the float (- (-> this start-marker) (the-as uint (-> s3-1 3))))) + (f1-1 (the float (- (-> this start-marker) (the-as uint (-> s4-0 pos w))))) + (f30-0 (/ (- (the float (-> this appearance max-age)) f0-1) (- f1-1 f0-1))) + ) + (light-trail-method-19 this f30-0 s5-0) + (vector-lerp! (the-as vector (&+ s2-1 0)) (the-as vector (&+ s3-1 0)) (-> s4-0 pos) f30-0) + ) + (set! (-> s2-1 3) (the-as light-trail-breadcrumb (-> this end-marker))) + ) + (when (> s5-0 0) + (set! (-> this crumb-count) (- (-> this crumb-count) s5-0)) + (mem-copy! + (&+ (-> this crumb-array data) (* (-> this crumb-size) 0)) + (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint s5-0))) + (* (-> this crumb-count) (the-as int (-> this crumb-size))) + ) + ) + ) + ) + (none) + ) + +(defmethod light-trail-method-13 ((this light-trail)) + (with-pp + (if (<= (-> this crumb-count) 0) + (return 0) + ) + (let ((v1-3 (-> this decision))) + (cond + ((= v1-3 2) + (return 0) + ) + ((zero? v1-3) + (+! (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter))) + (let ((v1-8 (- (-> this start-marker) (the-as uint (-> this appearance max-age))))) + (when (< (the-as int (-> this end-marker)) (the-as int v1-8)) + (set! (-> this end-marker) v1-8) + (light-trail-method-14 this) + ) + ) + ) + ((= v1-3 1) + (+! (-> this end-marker) (- (current-time) (-> pp clock old-frame-counter))) + (when (< (the-as int (-> this start-marker)) (the-as int (-> this end-marker))) + (reset-crumbs! this) + (set! (-> this end-marker) (-> this start-marker)) + ) + (+! (-> this end-marker) (- (current-time) (-> pp clock old-frame-counter))) + (+! (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter))) + ) + ) + ) + (set! (-> this decision) (the-as uint 1)) + 0 + ) + ) + +(defmethod reset-crumbs! ((this light-trail)) + (set! (-> this crumb-count) 0) + 0 + (none) + ) + +(defbehavior light-trail-tracker-common-post light-trail-tracker () + (cond + ((light-trail-tracker-method-19 self) + (light-trail-method-12 (-> self trail)) + ) + (else + (set! (-> self trail strip num-verts) (the-as uint 0)) + (when (-> self trail strip2) + (set! (-> self trail strip2 num-verts) (the-as uint 0)) + 0 + ) + ) + ) + ) + +(defstate tracking (light-trail-tracker) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('notice) + (case (-> block param 0) + (('add-crumb) + (let ((a1-1 (handle->process (-> self tracked-object)))) + (light-trail-tracker-method-20 + self + (light-trail-tracker-method-16 self (the-as process-focusable a1-1) (new 'stack-no-clear 'vector)) + ) + ) + ) + (('add-crumb-elapsed) + (let ((a1-4 (handle->process (-> self tracked-object)))) + (light-trail-method-11 + (-> self trail) + (light-trail-tracker-method-16 self (the-as process-focusable a1-4) (new 'stack-no-clear 'vector)) + (the-as time-frame (the int (the-as float (-> block param 1)))) + ) + ) + ) + (('add-crumb-pos) + (light-trail-tracker-method-20 self (the-as vector (-> block param 1))) + ) + (('replace-last-crumb) + (light-trail-method-21 (-> self trail) (the-as vector (-> block param 1))) + ) + (('die) + (go-virtual die) + ) + ) + ) + ) + #t + ) + :trans (behavior () + (let ((gp-0 (handle->process (-> self tracked-object)))) + (cond + ((light-trail-tracker-method-18 self (the-as process-focusable gp-0)) + (go-virtual die) + ) + (else + (if (light-trail-tracker-method-17 self (the-as process-focusable gp-0)) + (light-trail-tracker-method-20 + self + (light-trail-tracker-method-16 self (the-as process-focusable gp-0) (new 'stack-no-clear 'vector)) + ) + ) + (light-trail-method-13 (-> self trail)) + 0 + ) + ) + ) + ) + :code sleep-code + :post light-trail-tracker-common-post + ) + +(defstate die (light-trail-tracker) + :virtual #t + :enter (behavior () + '() + ) + :trans (behavior () + (light-trail-method-13 (-> self trail)) + ) + :code (behavior () + (until #f + (if (>= 1 (-> self trail crumb-count)) + (return #f) + ) + (suspend) + ) + #f + ) + :post light-trail-tracker-common-post + ) + +(defmethod relocate ((this light-trail-tracker) (offset int)) + (if (nonzero? (-> this trail)) + (&+! (-> this trail) offset) + ) + (call-parent-method this offset) + ) + +(defmethod relocate ((this light-trail) (offset int)) + (&+! (-> this crumb-array) offset) + (&+! (-> this strip) offset) + (if (-> this strip2) + (&+! (-> this strip2) offset) + ) + this + ) + +(defmethod light-trail-tracker-method-16 ((this light-trail-tracker) (arg0 process-focusable) (arg1 vector)) + (let ((a0-2 (if (type? arg0 process-focusable) + arg0 + ) + ) + ) + (if a0-2 + (set! (-> arg1 quad) (-> (get-trans a0-2 0) quad)) + ) + ) + arg1 + ) + +(defmethod light-trail-tracker-method-17 ((this light-trail-tracker) (arg0 process-focusable)) + #t + ) + +(defmethod light-trail-tracker-method-16 ((this light-trail-tracker-water) (arg0 process-focusable) (arg1 vector)) + (let ((a0-2 (if (type? arg0 process-focusable) + arg0 + ) + ) + ) + (when a0-2 + (let ((s5-1 (-> a0-2 water))) + (when (and s5-1 a0-2 (nonzero? s5-1)) + (set! (-> arg1 quad) (-> (get-trans a0-2 0) quad)) + (set! (-> arg1 y) (+ 40.96 (-> s5-1 surface-height))) + ) + ) + ) + ) + arg1 + ) + +;; WARN: Return type mismatch object vs symbol. +(defmethod light-trail-tracker-method-17 ((this light-trail-tracker-water) (arg0 process-focusable)) + (the-as symbol (and *target* (or (logtest? (water-flag touch-water) (-> *target* water flags)) + (logtest? (-> *target* control status) (collide-status on-water)) + ) + ) + ) + ) + +(defmethod light-trail-tracker-method-18 ((this light-trail-tracker) (arg0 process-focusable)) + (not arg0) + ) + +(defmethod light-trail-tracker-method-18 ((this light-trail-tracker-water) (arg0 process-focusable)) + (let ((v1-0 (if (type? arg0 process-focusable) + arg0 + ) + ) + ) + (or (not v1-0) + (not (-> v1-0 water)) + (not (logtest? (water-flag touch-water) (-> v1-0 water flags))) + (not (logtest? (water-flag break-surface) (-> v1-0 water flags))) + ) + ) + ) + +;; WARN: Return type mismatch uint vs int. +(defun estimate-light-trail-mem-usage ((arg0 uint) (arg1 uint)) + (let* ((a2-0 (-> prim-vertex size)) + (a3-0 (-> prim-strip size)) + (v1-3 (-> light-trail size)) + (a0-3 (+ a3-0 (* arg0 (-> light-trail-breadcrumb size)) (* (* arg0 a2-0) 2))) + ) + (if arg1 + (set! a0-3 (* a0-3 2)) + ) + (the-as int (shl (+ (sar (+ v1-3 a0-3) 10) 1) 10)) + ) + ) + +(defmethod light-trail-tracker-method-18 ((this light-trail-tracker-projectile) (arg0 process-focusable)) + (if (not arg0) + (set! (-> this tracked-object) (the-as handle #f)) + ) + #f + ) + +(defmethod light-trail-tracker-method-16 ((this light-trail-tracker-projectile) (arg0 process-focusable) (arg1 vector)) + (let ((a0-1 arg0)) + (if a0-1 + (set! (-> arg1 quad) (-> a0-1 root trans quad)) + ) + ) + arg1 + ) + +(defstate tracking (light-trail-tracker-projectile) + :virtual #t + :trans (behavior () + (let ((gp-0 (handle->process (-> self tracked-object)))) + (cond + ((not gp-0) + (go-virtual hang-on) + ) + (else + (if (light-trail-tracker-method-17 self (the-as process-focusable gp-0)) + (light-trail-tracker-method-20 + self + (light-trail-tracker-method-16 self (the-as process-focusable gp-0) (new 'stack-no-clear 'vector)) + ) + ) + (light-trail-method-13 (-> self trail)) + ) + ) + ) + ) + :code sleep-code + :post light-trail-tracker-common-post + ) + +(defstate hang-on (light-trail-tracker-projectile) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 2)) + (go-virtual die) + ) + (light-trail-method-13 (-> self trail)) + ) + :code sleep-code + :post light-trail-tracker-common-post + ) + +(defstate hang-on (weapon-trail-tracker) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 2)) + (go-virtual die) + ) + (light-trail-method-13 (-> self trail)) + ) + :code sleep-code + :post light-trail-tracker-common-post + ) + +(defstate tracking (weapon-trail-tracker) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('notice) + (case (-> block param 0) + (('die) + (go-virtual hang-on) + ) + (('add-crumbs) + (let ((a1-1 (-> block param 1)) + (a2-1 (-> block param 2)) + ) + (weapon-trail-method-22 (-> self trail) (the-as vector a1-1) (the-as vector a2-1)) + ) + ) + ) + ) + ) + #t + ) + :trans (behavior () + (let ((gp-0 (handle->process (-> self tracked-object)))) + (cond + ((light-trail-tracker-method-18 self (the-as process-focusable gp-0)) + (go-virtual hang-on) + ) + (else + (when (and (>= (-> self joint0) 0) (>= (-> self joint1) 0)) + (let ((s5-0 (vector<-cspace! + (new 'stack-no-clear 'vector) + (-> (the-as process-drawable gp-0) node-list data (-> self joint0)) + ) + ) + (a2-0 (vector<-cspace! + (new 'stack-no-clear 'vector) + (-> (the-as process-drawable gp-0) node-list data (-> self joint1)) + ) + ) + ) + (weapon-trail-method-22 (-> self trail) s5-0 a2-0) + ) + ) + (light-trail-method-13 (-> self trail)) + ) + ) + ) + ) + :code sleep-code + :post light-trail-tracker-common-post + ) + +(defstate tracking (tread-trail-tracker) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('reset) + (light-trail-method-10 (-> self trail)) + ) + (('notice) + (case (-> block param 0) + (('die) + (go-virtual die) + ) + (('add-crumbs) + (let ((a1-1 (-> block param 0)) + (a2-1 (-> block param 1)) + ) + (tread-trail-method-22 (-> self trail) (the-as vector a1-1) (the-as vector a2-1)) + ) + ) + ) + ) + ) + #t + ) + :trans (behavior () + (let ((gp-0 (handle->process (-> self tracked-object)))) + (cond + ((light-trail-tracker-method-18 self (the-as process-focusable gp-0)) + (go-virtual die) + ) + (else + (when (and gp-0 (nonzero? (-> (the-as process-drawable gp-0) draw))) + (let ((a1-2 (-> (the-as process-drawable gp-0) draw))) + (setup-dma-and-tex (-> self trail strip) a1-2) + ) + ) + (light-trail-method-13 (-> self trail)) + ) + ) + ) + ) + :code sleep-code + :post light-trail-tracker-common-post + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod light-trail-method-18 ((this weapon-trail) (arg0 light-trail-breadcrumb) (arg1 int) (arg2 vector) (arg3 vector)) + (set! (-> arg3 quad) (-> (&+ arg0 16) pos quad)) + (none) + ) + +(defmethod light-trail-method-9 ((this weapon-trail) (arg0 light-trail-composition) (arg1 int)) + (set! (-> this crumb-size) (the-as uint 32)) + (call-parent-method this arg0 arg1) + (none) + ) + +;; WARN: Return type mismatch (pointer light-trail-breadcrumb) vs light-trail-breadcrumb. +(defmethod weapon-trail-method-22 ((this weapon-trail) (arg0 vector) (arg1 vector)) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (v1-0 (new 'stack-no-clear 'vector)) + ) + (vector-! gp-0 arg1 arg0) + (vector-float*! gp-0 gp-0 0.5) + (vector+! v1-0 arg0 gp-0) + (let ((v1-1 (light-trail-method-11 this v1-0 (seconds 10000)))) + (the-as + light-trail-breadcrumb + (when (!= v1-1 1) + (let ((v0-1 + (the-as + object + (&+ (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ (-> this crumb-count) -1))) 16) + ) + ) + ) + (set! (-> (the-as light-trail-breadcrumb v0-1) pos quad) (-> gp-0 quad)) + v0-1 + ) + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod weapon-trail-method-23 ((this weapon-trail) (arg0 vector) (arg1 vector)) + (local-vars (gp-0 (pointer light-trail-breadcrumb)) (f0-2 float)) + (with-pp + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (v1-0 (-> this crumb-count)) + ) + 0.0 + (cond + ((zero? v1-0) + (weapon-trail-method-22 this arg0 arg1) + ) + ((begin + (set! (-> this decision) (the-as uint 0)) + (set! gp-0 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ v1-0 -1)))) + (vector-! s4-0 arg1 arg0) + (vector-float*! s4-0 s4-0 0.5) + (vector+! s3-0 arg0 s4-0) + (set! f0-2 (vector-vector-distance (the-as vector (&+ gp-0 0)) s3-0)) + (< f0-2 40.96) + ) + (set! (-> this decision) (the-as uint 1)) + ) + (else + (+! (-> this total-distance-traveled) f0-2) + (let ((f1-2 (the float (- (-> this start-marker) (-> this end-marker)))) + (f2-0 (the float (-> this appearance max-age))) + (f0-6 0.0) + ) + (if (-> this appearance use-tape-mode?) + (set! f0-6 (- f2-0 f1-2)) + ) + (set! (-> (the-as light-trail-breadcrumb (&+ gp-0 0)) pos quad) (-> s3-0 quad)) + (set! (-> (the-as light-trail-breadcrumb (&+ gp-0 16)) pos quad) (-> s4-0 quad)) + (set! (-> gp-0 3) + (the-as + light-trail-breadcrumb + (the int (- (the float (+ (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter)))) f0-6)) + ) + ) + ) + ) + ) + ) + (none) + ) + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod light-trail-method-19 ((this weapon-trail) (arg0 float) (arg1 int)) + (let ((v1-2 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) arg1))) + (a2-2 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ arg1 1)))) + ) + (vector-lerp! (the-as vector (&+ v1-2 16)) (the-as vector (&+ a2-2 16)) (the-as vector (&+ v1-2 16)) arg0) + ) + (none) + ) + +(defmethod light-trail-method-17 ((this weapon-trail) (arg0 vector) (arg1 float) (arg2 float) (arg3 vector) (arg4 float)) + (when (< (+ (-> this strip allocated-num-verts) -2) (-> this strip num-verts)) + (format 0 "Out of stuff (~d)~%" (-> this strip allocated-num-verts)) + (return #f) + ) + (vector-float*! arg3 arg3 arg2) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (set! (-> s2-0 quad) (-> arg3 quad)) + (add-vert! this (-> this strip) (vector+! (new 'stack-no-clear 'vector) arg0 s2-0) arg1 arg4 0.0) + (add-vert! this (-> this strip) (vector+float*! (new 'stack-no-clear 'vector) arg0 s2-0 -1.0) arg1 arg4 1.0) + ) + #f + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod light-trail-method-18 ((this tread-trail) (arg0 light-trail-breadcrumb) (arg1 int) (arg2 vector) (arg3 vector)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (cond + ((> (the-as uint arg1) 0) + (let ((a3-3 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint (+ arg1 -1)))))) + (vector-! v1-0 (-> arg0 pos) (the-as vector (&+ a3-3 0))) + ) + ) + (else + (let ((a2-5 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint (+ arg1 1)))))) + (vector-! v1-0 (the-as vector (&+ a2-5 0)) (-> arg0 pos)) + ) + ) + ) + (vector-cross! arg3 v1-0 (the-as vector (&+ arg0 16))) + ) + (none) + ) + +(defmethod light-trail-method-9 ((this tread-trail) (arg0 light-trail-composition) (arg1 int)) + (set! (-> this crumb-size) (the-as uint 32)) + (call-parent-method this arg0 arg1) + (none) + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod light-trail-method-19 ((this tread-trail) (arg0 float) (arg1 int)) + (let ((v1-2 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) arg1))) + (a2-2 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ arg1 1)))) + ) + (vector-lerp! (the-as vector (&+ v1-2 16)) (the-as vector (&+ a2-2 16)) (the-as vector (&+ v1-2 16)) arg0) + ) + (none) + ) + +;; WARN: Return type mismatch (pointer light-trail-breadcrumb) vs light-trail-breadcrumb. +(defmethod tread-trail-method-22 ((this tread-trail) (arg0 vector) (arg1 vector)) + (let ((v1-1 (light-trail-method-11 this arg0 (seconds 10000)))) + (the-as + light-trail-breadcrumb + (when (!= v1-1 1) + (let ((v0-1 + (the-as + object + (&+ (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ (-> this crumb-count) -1))) 16) + ) + ) + ) + (set! (-> (the-as light-trail-breadcrumb v0-1) pos quad) (-> arg1 quad)) + v0-1 + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch object vs light-trail-breadcrumb. +(defmethod tread-trail-method-23 ((this tread-trail) (arg0 vector) (arg1 vector)) + (with-pp + (let ((v1-0 (-> this crumb-count))) + 0.0 + (the-as + light-trail-breadcrumb + (cond + ((zero? v1-0) + (tread-trail-method-22 this arg0 arg1) + ) + (else + (set! (-> this decision) (the-as uint 0)) + (let ((s5-0 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ v1-0 -1))))) + (let ((f0-1 (vector-vector-distance (the-as vector (&+ s5-0 0)) arg0))) + (+! (-> this total-distance-traveled) f0-1) + (if (< f0-1 40.96) + (set! (-> this decision) (the-as uint 1)) + ) + ) + (let ((f1-3 (the float (- (-> this start-marker) (-> this end-marker)))) + (f2-0 (the float (-> this appearance max-age))) + (f0-4 0.0) + ) + (if (-> this appearance use-tape-mode?) + (set! f0-4 (- f2-0 f1-3)) + ) + (set! (-> (the-as light-trail-breadcrumb (&+ s5-0 0)) pos quad) (-> arg0 quad)) + (set! (-> s5-0 3) + (the-as + light-trail-breadcrumb + (the int (- (the float (+ (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter)))) f0-4)) + ) + ) + ) + (let ((v0-0 (the-as object (&+ s5-0 16)))) + (set! (-> (the-as light-trail-breadcrumb v0-0) pos quad) (-> arg1 quad)) + v0-0 + ) + ) + ) + ) + ) + ) + ) + ) + +(defmethod light-trail-tracker-method-19 ((this light-trail-tracker)) + (let ((a1-0 (handle->process (-> this tracked-object)))) + #t + (let ((v1-4 #t)) + (let ((a0-4 #f)) + (if (and a1-0 + (nonzero? (-> (the-as process-drawable a1-0) draw)) + (logtest? (-> (the-as process-drawable a1-0) draw status) + (draw-control-status no-draw no-draw-temp no-draw-bounds no-draw-bounds2) + ) + ) + (set! v1-4 #f) + ) + (if (and a1-0 + (nonzero? (-> (the-as process-drawable a1-0) draw)) + (logtest? (-> (the-as process-drawable a1-0) draw status) (draw-control-status on-screen)) + ) + (set! a0-4 #t) + ) + (when v1-4 + (if (and (-> this offscreen?) (not a0-4)) + (set! v1-4 #f) + ) + (when (< (-> this next-line-check-time) (current-time)) + (let ((a0-11 (-> this trail crumb-count))) + (when (< 1 a0-11) + (let ((v1-8 (&+ (-> this trail crumb-array data) (* (-> this trail crumb-size) 0))) + (a1-19 (&+ (-> this trail crumb-array data) (* (the-as int (-> this trail crumb-size)) (+ a0-11 -1)))) + ) + (set! v1-4 (line-in-view-frustum? (the-as vector (&+ v1-8 0)) (the-as vector (&+ a1-19 0)))) + ) + ) + ) + (set-time! (-> this next-line-check-time)) + ) + ) + ) + (when (and (not v1-4) (not (-> this offscreen?))) + (set! (-> this offscreen?) #t) + (set-time! (-> this offscreen-start-time)) + ) + (if (and v1-4 (-> this offscreen?)) + (set! (-> this offscreen?) #f) + ) + ) + ) + (or (not (-> this offscreen?)) (not (time-elapsed? + (-> this offscreen-start-time) + (the int (* 0.5 (the float (-> this trail appearance max-age)))) + ) + ) + ) + ) + +;; WARN: Return type mismatch uint vs none. +(defmethod light-trail-tracker-method-20 ((this light-trail-tracker) (arg0 vector)) + (if (zero? (mod (-> this last-add-frame-val) (-> this trail appearance frame-stagger))) + (light-trail-method-11 (-> this trail) arg0 (seconds 10000)) + (light-trail-method-21 (-> this trail) arg0) + ) + (+! (-> this last-add-frame-val) 1) + (none) + ) diff --git a/goal_src/jak3/engine/gfx/sprite/particles/sparticle-h.gc b/goal_src/jak3/engine/gfx/sprite/particles/sparticle-h.gc index 185379b8aa..02b8e6cda3 100644 --- a/goal_src/jak3/engine/gfx/sprite/particles/sparticle-h.gc +++ b/goal_src/jak3/engine/gfx/sprite/particles/sparticle-h.gc @@ -7,6 +7,9 @@ (declare-type sprite-vec-data-2d structure) +(define-extern sp-get-particle (function sparticle-system int sparticle-launch-state sparticle-cpuinfo)) +(define-extern kill-all-particles-with-key (function sparticle-launch-control none)) + ;; +++sp-cpuinfo-flag (defenum sp-cpuinfo-flag :bitfield #t @@ -38,6 +41,17 @@ ;; ---sp-cpuinfo-flag +(defmacro .movz (result value check original) + `(if (= ,check 0) + (set! ,result (the-as int ,value)) + (set! ,result (the-as int ,original)) + ) + ) + +(define-extern kill-all-particles-in-level (function level int)) +(define-extern remap-all-particles (function none)) +(define-extern process-particles (function none)) + ;; DECOMP BEGINS (define *sp-60-hz* #t) @@ -60,6 +74,7 @@ (friction float) (timer int32) (flags sp-cpuinfo-flag) + (flags-s32 int32 :overlay-at flags) (user-int32 int32) (user-uint32 uint32 :overlay-at user-int32) (user-float float :overlay-at user-int32) @@ -115,7 +130,12 @@ There are separate systems for different modes of sprite rendering: 2D/billboard (vecdata-table pointer) (adgifdata-table (inline-array adgif-shader)) ) + (:methods + (new (symbol type int int symbol pointer (inline-array adgif-shader)) _type_) + ) ) +(define-extern sp-kill-particle (function sparticle-system sparticle-cpuinfo symbol)) + (define-extern *sp-particle-system-2d* sparticle-system) (define-extern *sp-particle-system-3d* sparticle-system) \ No newline at end of file diff --git a/goal_src/jak3/engine/gfx/sprite/particles/sparticle-launcher-h.gc b/goal_src/jak3/engine/gfx/sprite/particles/sparticle-launcher-h.gc index 745fc32b51..1e566f9e31 100644 --- a/goal_src/jak3/engine/gfx/sprite/particles/sparticle-launcher-h.gc +++ b/goal_src/jak3/engine/gfx/sprite/particles/sparticle-launcher-h.gc @@ -9,6 +9,11 @@ (declare-type sparticle-cpuinfo structure) (declare-type sparticle-system structure) +(define-extern unlink-part-group-by-heap (function kheap int)) +(define-extern particle-adgif-cache-flush (function none)) +(define-extern execute-part-engine (function none)) +(define-extern execute-particle-local-space-engine (function int none)) + ;; +++sp-field-id (defenum sp-field-id :type uint16 @@ -303,7 +308,10 @@ `(new 'static 'sp-field-init-spec :field (sp-field-id ,field-enum-name) :initial-value (sp-cpuinfo-flag ,@param0) :random-mult 1) ) ((eq? field-name 'texture) - `(new 'static 'sp-field-init-spec :field (sp-field-id ,field-enum-name) :tex ,param0 :flags (sp-flag int)) + (if (eq? (car param0) 'new) + `(new 'static 'sp-field-init-spec :field (sp-field-id ,field-enum-name) :tex ,param0 :flags (sp-flag int)) + `(new 'static 'sp-field-init-spec :field (sp-field-id ,field-enum-name) :tex ,(string->symbol-format "{}-{}" (car param0) (cadr param0)) :flags (sp-flag int)) + ) ) ((eq? field-name 'next-launcher) `(new 'static 'sp-field-init-spec :field (sp-field-id ,field-enum-name) :initial-value ,param0 :flags (sp-flag launcher)) @@ -429,6 +437,7 @@ (sym symbol :overlay-at initial-valuef) (sound sound-spec :overlay-at initial-valuef) ) + :allow-misaligned ) @@ -525,13 +534,13 @@ particle system itself. This type just holds the launching-related state." (data sparticle-launch-state :inline :dynamic) ) (:methods - (sparticle-launch-control-method-14 () none) - (sparticle-launch-control-method-15 () none) + (initialize (_type_ sparticle-launch-group process-drawable) none) + (is-visible? (_type_ vector) symbol) (spawn (_type_ vector) object) - (sparticle-launch-control-method-17 (_type_ matrix) none) - (sparticle-launch-control-method-18 (_type_ cspace) none) + (spawn-from-mat (_type_ matrix) none) + (spawn-from-cspace (_type_ cspace) none) (kill-particles (_type_) none) - (sparticle-launch-control-method-20 (_type_ float) none) + (set-local-space-info (_type_ particle-local-space-info) none) ) ) @@ -547,8 +556,8 @@ particle system itself. This type just holds the launching-related state." ) (:methods (new (symbol type sparticle-system sparticle-launcher float) _type_) - (sparticle-subsampler-method-9 () none) - (sparticle-subsampler-method-10 (_type_ matrix) none) + (init-with-vec! (_type_ vector) vector) + (init-with-mat! (_type_ matrix) matrix) ) ) @@ -585,6 +594,9 @@ particle system itself. This type just holds the launching-related state." (the float (sar (shl (the int (atan (-> arg0 y) (* -1.0 (-> arg0 x)))) 48) 48)) ) +(define-extern lookup-part-group-by-name (function string sparticle-launch-group)) +(define-extern sparticle-motion-blur (function sparticle-system sparticle-cpuinfo vector none)) (define-extern sp-launch-particles-var (function sparticle-system sparticle-launcher matrix sparticle-launch-state sparticle-launch-control float none)) (define-extern *part-id-table* (array sparticle-launcher)) (define-extern *part-group-id-table* (array sparticle-launch-group)) +(define-extern sparticle-set-conerot (function sparticle-launcher vector none)) \ No newline at end of file diff --git a/goal_src/jak3/engine/gfx/sprite/particles/sparticle-launcher.gc b/goal_src/jak3/engine/gfx/sprite/particles/sparticle-launcher.gc index b9f0f5b78a..3cc536876a 100644 --- a/goal_src/jak3/engine/gfx/sprite/particles/sparticle-launcher.gc +++ b/goal_src/jak3/engine/gfx/sprite/particles/sparticle-launcher.gc @@ -35,3 +35,2742 @@ ;; DECOMP BEGINS +;; WARN: Return type mismatch int vs sparticle-launcher. + +(kmemopen global "part-tables") + +(define *part-id-table* (new 'global 'boxed-array sparticle-launcher 5500)) + +(define *part-group-id-table* (new 'global 'boxed-array sparticle-launch-group 1700)) + +(define *sp-temp* 0.0) + +(kmemclose) + +(defun lookup-part-group-by-name ((arg0 string)) + (let* ((s5-0 *part-group-id-table*) + (s4-0 (-> s5-0 length)) + ) + (dotimes (s3-0 s4-0) + (let ((s2-0 (-> s5-0 s3-0))) + (if (and (nonzero? s2-0) (string= arg0 (-> s2-0 name))) + (return s2-0) + ) + ) + ) + ) + (the-as sparticle-launch-group #f) + ) + +;; WARN: Return type mismatch (pointer sparticle-launch-group) vs (pointer object). +(defun lookup-part-group-pointer-by-name ((arg0 string)) + (let* ((s4-0 *part-group-id-table*) + (s3-0 (-> s4-0 length)) + ) + (dotimes (gp-0 s3-0) + (let ((v1-2 (-> s4-0 gp-0))) + (if (and (nonzero? v1-2) (string= arg0 (-> v1-2 name))) + (return (the-as (pointer object) (&+ (-> s4-0 data) (* gp-0 4)))) + ) + ) + ) + ) + (the-as (pointer sparticle-launch-group) #f) + ) + +(defun part-group-pointer? ((arg0 pointer)) + (let ((v1-0 *part-group-id-table*)) + (and (>= (the-as int arg0) (the-as int (-> v1-0 data))) (< (the-as int arg0) (the-as int (&-> v1-0 1700)))) + ) + ) + +(defun unlink-part-group-by-heap ((arg0 kheap)) + (let* ((v1-0 *part-group-id-table*) + (a2-0 (-> v1-0 length)) + (a1-0 (-> arg0 base)) + (a0-1 (-> arg0 top-base)) + ) + (while (nonzero? a2-0) + (+! a2-0 -1) + (let ((a3-2 (-> v1-0 a2-0))) + (when (and (>= (the-as int a3-2) (the-as int a1-0)) (< (the-as int a3-2) (the-as int a0-1))) + (set! (-> v1-0 a2-0) (the-as sparticle-launch-group 0)) + 0 + ) + ) + ) + ) + 0 + ) + +(def-mips2c sp-init-fields! (function (pointer float) (inline-array sp-field-init-spec) sp-field-id sp-field-id symbol (inline-array sp-field-init-spec))) + +(deftype sp-queued-launch-particles (structure) + ((sp-system sparticle-system) + (sp-launcher sparticle-launcher) + (pos vector :inline) + ) + ) + + +(deftype sp-launch-queue (basic) + ((in-use int32) + (queue sp-queued-launch-particles 256 :inline) + ) + ) + + +(kmemopen global "launcher-queue") + +(define *sp-launcher-lock* #f) + +(define *sp-launch-queue* (new 'global 'sp-launch-queue)) + +(define *sp-launcher-enable* #t) + +(kmemclose) + +(defun particle-setup-adgif ((arg0 adgif-shader) (arg1 int)) + (let ((a1-1 (lookup-texture-by-id-fast (the-as texture-id arg1))) + (s5-0 #f) + ) + (when (not a1-1) + (set! a1-1 (get-texture common-white common)) + (set! s5-0 #t) + ) + (set! (-> arg0 tex1) (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (set! (-> arg0 tex0 tfx) 0) + (adgif-shader<-texture! arg0 a1-1) + (set! (-> arg0 prims 1) (gs-reg64 tex0-1)) + (set! (-> arg0 prims 3) (the-as gs-reg64 (logior arg1 20))) + (set! (-> arg0 prims 5) (gs-reg64 miptbp1-1)) + (set! (-> arg0 clamp-reg) (gs-reg64 zbuf-1)) + (set! (-> arg0 prims 9) (gs-reg64 alpha-1)) + (if s5-0 + (logior! (-> arg0 link-test) (link-test-flags backup-sprite-tex)) + ) + ) + (set! (-> arg0 alpha) (new 'static 'gs-miptbp :tbp1 #x44)) + (set! (-> arg0 clamp) (new 'static 'gs-clamp :minu #x13 :minv #x101)) + 0 + (none) + ) + +(deftype particle-adgif-cache (basic) + ((used int32) + (last uint16) + (lastgif adgif-shader) + (tidhash uint16 80) + (spadgif adgif-shader 80 :inline) + ) + ) + + +(kmemopen global "part-adgif-cache") + +(define *particle-adgif-cache* (new 'global 'particle-adgif-cache)) + +(set! (-> *particle-adgif-cache* used) 0) + +(kmemclose) + +(defun particle-adgif-cache-flush () + (set! (-> *particle-adgif-cache* used) 0) + (set! (-> *particle-adgif-cache* last) (the-as uint 0)) + 0 + (none) + ) + +(def-mips2c particle-adgif (function adgif-shader texture-id none)) + +;; ERROR: Bad vector register dependency: vf16 +;; ERROR: Bad vector register dependency: vf17 +;; ERROR: Bad vector register dependency: vf18 +;; ERROR: Bad vector register dependency: vf19 +;; ERROR: Bad vector register dependency: vf20 +(defun particle-adgif-callback ((arg0 adgif-shader) (arg1 texture-id)) + (local-vars (v1-0 float)) + (rlet ((vf16 :class vf) + (vf17 :class vf) + (vf18 :class vf) + (vf19 :class vf) + (vf20 :class vf) + ) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'vector 4))) + (let ((s4-0 (-> arg0 alpha)) + (s3-0 (-> arg0 clamp)) + ) + ;; og:preserve-this + ; (.svf (&-> s5-0 0 quad) vf16) + ; (.svf (&-> s5-0 1 quad) vf17) + ; (.svf (&-> s5-0 2 quad) vf18) + ; (.svf (&-> s5-0 3 quad) vf19) + ; (.svf (&-> s5-0 4 quad) vf20) + (particle-adgif arg0 arg1) + (set! (-> arg0 alpha) s4-0) + (set! (-> arg0 clamp) s3-0) + ) + ;; og:preserve-this + ; (.lvf vf16 (&-> s5-0 0 quad)) + ; (.lvf vf17 (&-> s5-0 1 quad)) + ; (.lvf vf18 (&-> s5-0 2 quad)) + ; (.lvf vf19 (&-> s5-0 3 quad)) + ; (.lvf vf20 (&-> s5-0 4 quad)) + ) + (.mov v1-0 vf20) + 0 + (none) + ) + ) + +(defun sp-queue-launch ((arg0 sparticle-system) (arg1 sparticle-launcher) (arg2 matrix)) + (let ((v1-0 *sp-launch-queue*)) + (when (= (-> v1-0 in-use) 256) + (format 0 "ERROR: sp-launch-particles called during processing, and queue is full~%") + (return 0) + ) + (let ((a3-5 (-> v1-0 queue (-> v1-0 in-use)))) + (set! (-> a3-5 sp-system) arg0) + (set! (-> a3-5 sp-launcher) arg1) + (set! (-> a3-5 pos quad) (-> arg2 trans quad)) + ) + (let ((v0-1 (+ (-> v1-0 in-use) 1))) + (set! (-> v1-0 in-use) v0-1) + v0-1 + ) + ) + ) + +(defun sp-adjust-launch ((arg0 sparticle-launchinfo) + (arg1 sparticle-cpuinfo) + (arg2 (inline-array sp-field-init-spec)) + (arg3 matrix) + (arg4 symbol) + ) + (let ((s2-0 (new 'stack-no-clear 'matrix)) + (s5-0 (new 'stack-no-clear 'matrix)) + ) + (let ((s0-0 (new 'stack-no-clear 'vector))) + (sp-init-fields! + (the-as (pointer float) (-> s2-0 rvec)) + arg2 + (sp-field-id launch-fields-start) + (sp-field-id launch-fields-end) + #t + ) + (matrix-rotate-xyz! s5-0 (-> s2-0 rvec)) + (vector3s-matrix*! (the-as vector3s (-> arg1 vel-sxvel)) (the-as vector3s (-> arg1 vel-sxvel)) s5-0) + (matrix-rotate-xyz! s5-0 (-> s2-0 uvec)) + (vector3s-matrix*! (the-as vector3s (-> arg1 vel-sxvel)) (the-as vector3s (-> arg1 vel-sxvel)) s5-0) + (matrix*! s5-0 s5-0 arg3) + (set-vector! s0-0 0.0 (-> s2-0 fvec w) 0.0 1.0) + (vector-matrix*! s0-0 s0-0 s5-0) + (+! (-> arg0 launchrot x) (-> s0-0 x)) + (+! (-> arg0 launchrot y) (-> s0-0 y)) + (+! (-> arg0 launchrot z) (-> s0-0 z)) + ) + (when (logtest? (sp-cpuinfo-flag set-conerot) (-> arg1 flags)) + (let ((f0-10 (vector-length (-> arg3 rvec))) + (f1-3 (vector-length (-> arg3 uvec))) + (f2-0 (vector-length (-> arg3 fvec))) + ) + (set! (-> arg0 launchrot w) (* (-> arg0 launchrot w) f0-10)) + (set! (-> arg0 conerot w) (* (-> arg0 conerot w) f1-3)) + (set! (-> arg1 vel-sxvel w) (* (-> arg1 vel-sxvel w) f0-10)) + (set! (-> arg1 rot-syvel w) (* (-> arg1 rot-syvel w) f1-3)) + (set! (-> arg1 vel-sxvel x) (* (-> arg1 vel-sxvel x) f0-10)) + (set! (-> arg1 vel-sxvel y) (* (-> arg1 vel-sxvel y) f1-3)) + (set! (-> arg1 vel-sxvel z) (* (-> arg1 vel-sxvel z) f2-0)) + ) + ) + (matrix-rotate-xyz! s5-0 (-> s2-0 fvec)) + (matrix*! s5-0 s5-0 arg3) + (vector3s-rotate*! (the-as vector3s (-> arg0 launchrot)) (the-as vector3s (-> arg0 launchrot)) s5-0) + (vector3s-rotate*! (the-as vector3s (-> arg1 vel-sxvel)) (the-as vector3s (-> arg1 vel-sxvel)) s5-0) + (if (not (logtest? (sp-cpuinfo-flag launch-along-z) (-> arg1 flags))) + (vector3s-rotate*! (the-as vector3s (-> arg1 acc)) (the-as vector3s (-> arg1 acc)) s5-0) + ) + (if (logtest? (sp-cpuinfo-flag right-multiply-quat) (-> arg1 flags)) + (set! (-> arg0 conerot y) (+ 16384.0 (vector-y-angle (-> s5-0 fvec)))) + ) + (when arg4 + (let ((s4-1 (new 'stack-no-clear 'euler-angles))) + (matrix->eul s4-1 s5-0 13) + (set! (-> arg0 conerot x) (- (-> arg0 conerot x) (-> s4-1 y))) + (set! (-> arg0 conerot y) (- (-> arg0 conerot y) (-> s4-1 z))) + (set! (-> arg0 conerot z) (- (-> arg0 conerot z) (-> s4-1 x))) + ) + ) + ) + 0 + (none) + ) + +(defun sp-euler-convert ((arg0 sparticle-launchinfo) (arg1 sparticle-cpuinfo)) + (local-vars (v1-1 float) (v1-2 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((a1-1 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'quaternion)) + ) + (set-vector! a1-1 (-> arg0 conerot x) (-> arg0 conerot y) (-> arg0 conerot z) 1.0) + (quaternion-zxy! s5-0 a1-1) + (cond + ((< (-> s5-0 w) 0.0) + (.lvf vf1 (&-> arg0 conerot quad)) + (.lvf vf2 (&-> s5-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg0 conerot quad) vf1) + (.mov v1-1 vf1) + ) + (else + (.lvf vf1 (&-> arg0 conerot quad)) + (.lvf vf2 (&-> s5-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg0 conerot quad) vf1) + (.mov v1-2 vf1) + ) + ) + ) + (cond + (*sp-60-hz* + (set! (-> arg1 rot-syvel x) (* 5.0 (-> arg1 rot-syvel x))) + (set! (-> arg1 rot-syvel y) (* 5.0 (-> arg1 rot-syvel y))) + (set! (-> arg1 rot-syvel z) (* 5.0 (-> arg1 rot-syvel z))) + ) + (else + (set! (-> arg1 rot-syvel x) (* 6.0 (-> arg1 rot-syvel x))) + (set! (-> arg1 rot-syvel y) (* 6.0 (-> arg1 rot-syvel y))) + (set! (-> arg1 rot-syvel z) (* 6.0 (-> arg1 rot-syvel z))) + ) + ) + (quaternion-zxy! (-> arg1 rotvel3d) (-> arg1 rot-syvel)) + 0 + (none) + ) + ) + +(defun sp-rotate-system ((arg0 sparticle-launchinfo) (arg1 sparticle-cpuinfo) (arg2 transformq)) + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (let ((a1-1 (new 'stack-no-clear 'quaternion))) + (let* ((v1-0 a1-1) + (a0-1 arg2) + (f0-0 (-> a0-1 quat x)) + (f1-0 (-> a0-1 quat y)) + (f2-0 (-> a0-1 quat z)) + ) + (set! (-> v1-0 x) f0-0) + (set! (-> v1-0 y) f1-0) + (set! (-> v1-0 z) f2-0) + (set! (-> v1-0 w) (sqrtf (- (- (- 1.0 (* f2-0 f2-0)) (* f1-0 f1-0)) (* f0-0 f0-0)))) + ) + (quaternion->matrix s5-0 a1-1) + ) + (vector3s-rotate*! (the-as vector3s (-> arg0 launchrot)) (the-as vector3s (-> arg0 launchrot)) s5-0) + (vector3s-rotate*! (the-as vector3s (-> arg1 vel-sxvel)) (the-as vector3s (-> arg1 vel-sxvel)) s5-0) + (if (not (logtest? (sp-cpuinfo-flag launch-along-z) (-> arg1 flags))) + (vector3s-rotate*! (the-as vector3s (-> arg1 acc)) (the-as vector3s (-> arg1 acc)) s5-0) + ) + ) + 0 + (none) + ) + +(deftype sp-launch-stack (structure) + ((ra basic) + (dummy0 basic) + (dummy1 basic) + (b-spfic basic) + (r16 uint128) + (r17 uint128) + (r18 uint128) + (pos uint128) + (matrix matrix :inline) + (l-spfic basic) + (birth-info sparticle-birthinfo :inline) + (sprite sprite-vec-data-2d :inline) + (r19 uint128) + (r20 uint128) + (r21 uint128) + (r22 uint128) + ) + ) + + +(def-mips2c sp-launch-particles-var (function sparticle-system sparticle-launcher matrix sparticle-launch-state sparticle-launch-control float none)) + +(define *death-adgif* (the-as adgif-shader #f)) + +;; WARN: Function sp-launch-particles-death has a return type of none, but the expression builder found a return statement. +(defun sp-launch-particles-death ((arg0 sparticle-system) (arg1 sparticle-launcher) (arg2 vector)) + (local-vars (v1-26 float) (v1-28 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf30 :class vf) + (vf31 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (.lvf vf30 (&-> arg2 quad)) + (let ((v1-0 #x437f0000)) + (.mov vf31 v1-0) + ) + (let ((s5-0 (new 'stack-no-clear 'matrix)) + (gp-0 (sp-get-particle arg0 0 (the-as sparticle-launch-state #f))) + ) + (if (not gp-0) + (return 0) + ) + (let* ((a1-2 (-> arg1 init-specs 0)) + (a1-3 (sp-init-fields! + (the-as (pointer float) (-> s5-0 rvec)) + (the-as (inline-array sp-field-init-spec) a1-2) + (sp-field-id sprite-fields-start) + (sp-field-id sprite-fields-end) + #t + ) + ) + ) + (sp-init-fields! (&-> gp-0 omega) a1-3 (sp-field-id cpu-fields-start) (sp-field-id cpu-fields-end) #t) + ) + (set! (-> s5-0 uvec y) 0.0) + (set! (-> s5-0 uvec z) (the float (sar (shl (the int (-> s5-0 uvec z)) 48) 48))) + (.lvf vf4 (&-> s5-0 fvec quad)) + (.lvf vf5 (&-> s5-0 rvec quad)) + (.min.x.vf vf4 vf4 vf31 :mask #b111) + (.add.vf vf5 vf5 vf30 :mask #b111) + (.svf (&-> s5-0 fvec quad) vf4) + (.svf (&-> s5-0 rvec quad) vf5) + (when (not *death-adgif*) + (set! *death-adgif* (new 'static 'adgif-shader)) + (particle-adgif *death-adgif* (new 'static 'texture-id :index #x18 :page #x4)) + (set! (-> *death-adgif* alpha) (new 'static 'gs-miptbp :tbp1 #x48)) + ) + (let ((v1-14 (-> *death-adgif* quad 0 quad))) + (set! (-> gp-0 adgif quad 0 quad) v1-14) + ) + (let ((v1-16 (-> *death-adgif* quad 1 quad))) + (set! (-> gp-0 adgif quad 1 quad) v1-16) + ) + (let ((v1-18 (-> *death-adgif* quad 2 quad))) + (set! (-> gp-0 adgif quad 2 quad) v1-18) + ) + (let ((v1-20 (-> *death-adgif* quad 3 quad))) + (set! (-> gp-0 adgif quad 3 quad) v1-20) + ) + (let ((v1-22 (-> *death-adgif* quad 4 quad))) + (set! (-> gp-0 adgif quad 4 quad) v1-22) + ) + (set! (-> gp-0 clock-index) (the-as uint 8)) + (.lvf vf4 (&-> (-> *time-of-day-context* current-prt-color) quad)) + (.lvf vf5 (&-> s5-0 fvec quad)) + (.lvf vf6 (&-> gp-0 fade quad)) + (.mul.vf vf5 vf5 vf4 :mask #b111) + (.mul.vf vf6 vf6 vf4 :mask #b111) + (.svf (&-> s5-0 fvec quad) vf5) + (.svf (&-> gp-0 fade quad) vf6) + (.mov v1-26 vf6) + (set! (-> gp-0 key) (the-as sparticle-launch-control 0)) + (set! (-> gp-0 binding) #f) + (let ((v1-27 (-> gp-0 sprite))) + (.lvf vf1 (&-> s5-0 rvec quad)) + (.lvf vf2 (&-> s5-0 uvec quad)) + (.lvf vf3 (&-> s5-0 fvec quad)) + (.svf (&-> v1-27 x-y-z-sx quad) vf1) + (.svf (&-> v1-27 flag-rot-sy quad) vf2) + (.sub.w.vf vf3 vf0 vf0 :mask #b1000) + (.svf (&-> v1-27 r-g-b-a quad) vf3) + ) + (.mov v1-28 vf3) + (logior! (-> gp-0 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-5)) + (set! (-> gp-0 cache-alpha) (-> s5-0 fvec w)) + ) + 0 + (none) + ) + ) + +(defun sp-clear-queue () + (let ((gp-0 *sp-launch-queue*) + (s5-0 *launch-matrix*) + ) + (when (> (-> gp-0 in-use) 0) + (dotimes (s4-0 (-> gp-0 in-use)) + (let ((v1-4 (-> gp-0 queue s4-0))) + (set! (-> s5-0 trans quad) (-> v1-4 pos quad)) + (launch-particles :system (-> v1-4 sp-system) (-> v1-4 sp-launcher) s5-0 :origin-is-matrix #t) + ) + ) + (set! (-> gp-0 in-use) 0) + 0 + ) + ) + 0 + (none) + ) + +(defun sp-relaunch-setup-fields ((arg0 object) (arg1 sparticle-launcher) (arg2 sparticle-cpuinfo) (arg3 sprite-vec-data-3d)) + (local-vars + (sv-80 (inline-array sp-field-init-spec)) + (sv-88 sp-cpuinfo-flag) + (sv-96 matrix) + (sv-100 symbol) + (sv-104 symbol) + ) + (set! sv-80 (the-as (inline-array sp-field-init-spec) (-> arg1 init-specs 0))) + (set! sv-88 (logand (-> arg2 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-9 level0 level1 sp-cpuinfo-flag-12))) + (set! sv-96 (new 'stack-no-clear 'matrix)) + (set! sv-100 (the-as symbol #f)) + (set! sv-104 (the-as symbol #f)) + (set! (-> arg2 next-launcher) (the-as basic 0)) + (when (nonzero? (-> arg2 key)) + (let ((s3-0 #t)) + (cond + ((logtest? (sp-cpuinfo-flag left-multiply-quat) (-> arg2 flags)) + (quaternion->matrix sv-96 (-> arg2 key proc root quat)) + ) + ((logtest? (-> arg2 key group flags) (sp-group-flag sp12)) + (let* ((v1-17 sv-96) + (a3-1 (-> arg2 key local-space-binding mat-new)) + (a0-5 (-> a3-1 rvec quad)) + (a1-2 (-> a3-1 uvec quad)) + (a2-1 (-> a3-1 fvec quad)) + (a3-2 (-> a3-1 trans quad)) + ) + (set! (-> v1-17 rvec quad) a0-5) + (set! (-> v1-17 uvec quad) a1-2) + (set! (-> v1-17 fvec quad) a2-1) + (set! (-> v1-17 trans quad) a3-2) + ) + ) + (else + (set! s3-0 #f) + ) + ) + (when s3-0 + (matrix-transpose! sv-96 sv-96) + (when (or (get-field-spec-by-id arg1 (sp-field-id spt-accel-x)) + (get-field-spec-by-id arg1 (sp-field-id spt-accel-y)) + (get-field-spec-by-id arg1 (sp-field-id spt-accel-z)) + ) + (set! sv-100 #t) + (vector3s-rotate*! (the-as vector3s (-> arg2 acc)) (the-as vector3s (-> arg2 acc)) sv-96) + ) + (when (or (get-field-spec-by-id arg1 (sp-field-id spt-vel-x)) + (get-field-spec-by-id arg1 (sp-field-id spt-vel-y)) + (get-field-spec-by-id arg1 (sp-field-id spt-vel-z)) + ) + (set! sv-104 #t) + (vector3s-rotate*! (the-as vector3s (-> arg2 vel-sxvel)) (the-as vector3s (-> arg2 vel-sxvel)) sv-96) + ) + (matrix-transpose! sv-96 sv-96) + ) + ) + ) + (cond + ((and (logtest? (-> arg2 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-13)) + (not (logtest? (-> arg2 flags) (sp-cpuinfo-flag distort))) + (not (logtest? (-> arg2 flags) (sp-cpuinfo-flag glow))) + ) + (let ((f20-0 (-> arg3 r-g-b-a x)) + (f22-0 (-> arg3 r-g-b-a y)) + (f24-0 (-> arg3 r-g-b-a z)) + (f26-0 (-> arg2 fade x)) + (f28-0 (-> arg2 fade y)) + (f30-0 (-> arg2 fade z)) + ) + (set! (-> arg3 r-g-b-a x) 99999.0) + (set! (-> arg3 r-g-b-a y) 99999.0) + (set! (-> arg3 r-g-b-a z) 99999.0) + (set! (-> arg2 fade x) 99999.0) + (set! (-> arg2 fade y) 99999.0) + (set! (-> arg2 fade z) 99999.0) + (set! sv-80 + (sp-init-fields! + (the-as (pointer float) (-> arg3 x-y-z-sx)) + sv-80 + (sp-field-id sprite-fields-start) + (sp-field-id sprite-fields-end) + #f + ) + ) + (set! sv-80 + (sp-init-fields! (&-> arg2 omega) sv-80 (sp-field-id cpu-fields-start) (sp-field-id cpu-fields-end) #f) + ) + (logior! (-> arg2 flags) sv-88) + (let ((v1-54 (-> *time-of-day-context* current-prt-color))) + (if (= (-> arg3 r-g-b-a x) 99999.0) + (set! (-> arg3 r-g-b-a x) f20-0) + (set! (-> arg3 r-g-b-a x) (* (-> arg3 r-g-b-a x) (-> v1-54 x))) + ) + (if (= (-> arg3 r-g-b-a y) 99999.0) + (set! (-> arg3 r-g-b-a y) f22-0) + (set! (-> arg3 r-g-b-a y) (* (-> arg3 r-g-b-a y) (-> v1-54 y))) + ) + (if (= (-> arg3 r-g-b-a z) 99999.0) + (set! (-> arg3 r-g-b-a z) f24-0) + (set! (-> arg3 r-g-b-a z) (* (-> arg3 r-g-b-a z) (-> v1-54 z))) + ) + (if (= (-> arg2 fade x) 99999.0) + (set! (-> arg2 fade x) f26-0) + (set! (-> arg2 fade x) (* (-> arg2 fade x) (-> v1-54 x))) + ) + (if (= (-> arg2 fade y) 99999.0) + (set! (-> arg2 fade y) f28-0) + (set! (-> arg2 fade y) (* (-> arg2 fade y) (-> v1-54 y))) + ) + (if (= (-> arg2 fade z) 99999.0) + (set! (-> arg2 fade z) f30-0) + (set! (-> arg2 fade z) (* (-> arg2 fade z) (-> v1-54 z))) + ) + ) + ) + ) + (else + (set! sv-80 + (sp-init-fields! + (the-as (pointer float) (-> arg3 x-y-z-sx)) + sv-80 + (sp-field-id sprite-fields-start) + (sp-field-id sprite-fields-end) + #f + ) + ) + (set! sv-80 + (sp-init-fields! (&-> arg2 omega) sv-80 (sp-field-id cpu-fields-start) (sp-field-id cpu-fields-end) #f) + ) + ) + ) + (if sv-100 + (vector3s-rotate*! (the-as vector3s (-> arg2 acc)) (the-as vector3s (-> arg2 acc)) sv-96) + ) + (if sv-104 + (vector3s-rotate*! (the-as vector3s (-> arg2 vel-sxvel)) (the-as vector3s (-> arg2 vel-sxvel)) sv-96) + ) + 0 + 0 + (none) + ) + +(defun sp-relaunch-particle-2d ((arg0 object) (arg1 sparticle-launcher) (arg2 sparticle-cpuinfo) (arg3 sprite-vec-data-2d)) + (sp-relaunch-setup-fields arg0 arg1 arg2 (the-as sprite-vec-data-3d arg3)) + (when (logtest? (-> arg2 flags) (sp-cpuinfo-flag distort)) + (set! (-> arg3 r-g-b-a w) 0.0) + (set! (-> arg2 fade w) 0.0) + (logclear! (-> arg2 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-2)) + ) + (when (logtest? (-> arg2 flags) (sp-cpuinfo-flag glow)) + ) + 0 + (none) + ) + +(defun sp-relaunch-particle-3d ((arg0 object) (arg1 sparticle-launcher) (arg2 sparticle-cpuinfo) (arg3 sprite-vec-data-3d)) + (local-vars (v1-9 float) (v1-10 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (let* ((v1-0 s4-0) + (a2-1 arg3) + (f0-0 (-> a2-1 qx-qy-qz-sy x)) + (f1-0 (-> a2-1 qx-qy-qz-sy y)) + (f2-0 (-> a2-1 qx-qy-qz-sy z)) + ) + (set! (-> v1-0 x) f0-0) + (set! (-> v1-0 y) f1-0) + (set! (-> v1-0 z) f2-0) + (set! (-> v1-0 w) (sqrtf (- (- (- 1.0 (* f2-0 f2-0)) (* f1-0 f1-0)) (* f0-0 f0-0)))) + ) + (set! (-> arg3 qx-qy-qz-sy x) 0.0) + (set! (-> arg3 qx-qy-qz-sy y) 0.0) + (set! (-> arg3 qx-qy-qz-sy z) 0.0) + (sp-relaunch-setup-fields arg0 arg1 arg2 arg3) + (let* ((a1-1 (-> arg2 flags-s32)) + (v1-1 -2) + ;; og:preserve-this + (a0-1 (the-as uint (-> arg3 r-g-b-a x))) + (a1-2 (logand a1-1 #x4000)) + ) + 1 + (let ((a1-3 (sar a1-2 14))) + (set! (-> arg3 r-g-b-a x) (the-as float (logior (logand a0-1 (the-as uint v1-1)) a1-3))) + ) + ) + (let ((a1-4 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'quaternion)) + ) + (set-vector! a1-4 (-> arg3 qx-qy-qz-sy x) (-> arg3 qx-qy-qz-sy y) (-> arg3 qx-qy-qz-sy z) 1.0) + (quaternion-zxy! s3-0 a1-4) + (if (logtest? (sp-cpuinfo-flag left-multiply-quat) (-> arg2 flags)) + (quaternion*! s3-0 s4-0 s3-0) + ) + (cond + ((< (-> s3-0 w) 0.0) + (.lvf vf1 (&-> arg3 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s3-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg3 qx-qy-qz-sy quad) vf1) + (.mov v1-9 vf1) + ) + (else + (.lvf vf1 (&-> arg3 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s3-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg3 qx-qy-qz-sy quad) vf1) + (.mov v1-10 vf1) + ) + ) + ) + ) + (cond + (*sp-60-hz* + (set! (-> arg2 rot-syvel x) (* 5.0 (-> arg2 rot-syvel x))) + (set! (-> arg2 rot-syvel y) (* 5.0 (-> arg2 rot-syvel y))) + (set! (-> arg2 rot-syvel z) (* 5.0 (-> arg2 rot-syvel z))) + ) + (else + (set! (-> arg2 rot-syvel x) (* 6.0 (-> arg2 rot-syvel x))) + (set! (-> arg2 rot-syvel y) (* 6.0 (-> arg2 rot-syvel y))) + (set! (-> arg2 rot-syvel z) (* 6.0 (-> arg2 rot-syvel z))) + ) + ) + (quaternion-zxy! (-> arg2 rotvel3d) (-> arg2 rot-syvel)) + 0 + (none) + ) + ) + +(defmethod initialize ((this sparticle-launch-control) (arg0 sparticle-launch-group) (arg1 process-drawable)) + (let ((s5-0 0)) + (set! (-> this group) arg0) + (set! (-> this proc) arg1) + (set! (-> this local-clock) 0) + (set! (-> this local-space-binding) (the-as particle-local-space-info 1.0)) + (set! (-> this matrix) 0) + (set! (-> this last-spawn-frame) + (the-as int (+ (-> *display* real-frame-clock integral-frame-counter) (seconds -0.007))) + ) + (set! (-> this last-spawn-time) 0) + (if (logtest? (-> this group flags) (sp-group-flag sp4)) + (quaternion->matrix (-> this origin) (-> arg1 root quat)) + (matrix-identity! (-> this origin)) + ) + (when (logtest? (-> arg0 flags) (sp-group-flag sp6)) + (let ((f0-1 (-> arg0 rotate-x)) + (f1-0 (-> arg0 rotate-y)) + (f2-0 (-> arg0 rotate-z)) + (t9-2 matrix-rotate-xyz!) + (a0-3 (new 'stack-no-clear 'matrix)) + (a1-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-2 x) f0-1) + (set! (-> a1-2 y) f1-0) + (set! (-> a1-2 z) f2-0) + (set! (-> a1-2 w) 1.0) + (let ((a1-3 (t9-2 a0-3 a1-2))) + (matrix*! (-> this origin) a1-3 (-> this origin)) + ) + ) + ) + (when (logtest? (-> arg0 flags) (sp-group-flag sp7)) + (let ((a1-4 (new 'stack-no-clear 'vector))) + (set! (-> a1-4 x) (-> arg0 scale-x)) + (set! (-> a1-4 y) (-> arg0 scale-y)) + (set! (-> a1-4 z) (-> arg0 scale-z)) + (set! (-> a1-4 w) 1.0) + (set! (-> a1-4 w) 1.0) + (scale-matrix! (-> this origin) a1-4 (-> this origin)) + ) + ) + (dotimes (s3-0 (-> arg0 length)) + (let* ((a0-7 (-> arg0 launcher s3-0)) + (a1-6 (-> *part-id-table* (-> a0-7 launcher))) + (v1-29 (-> this data s5-0)) + ) + (when (nonzero? a1-6) + (set! (-> v1-29 group-item) a0-7) + (cond + ((= (-> a1-6 type) sparticle-launcher) + (set! (-> v1-29 accum) 0.0) + (set! (-> v1-29 spawn-time) (the-as uint (+ (current-time) (seconds -100)))) + (set! (-> v1-29 offset) (the-as uint (-> a0-7 offset))) + (set! (-> v1-29 randomize) (the-as uint 0)) + (cond + ((logtest? (-> a0-7 flags) (sp-group-item-flag sp2)) + (logclear! (-> v1-29 flags) (sp-launch-state-flags sp0)) + (set! (-> v1-29 center) #f) + (set! (-> v1-29 sprite3d) #f) + (set! (-> v1-29 sprite) #f) + ) + (else + (logior! (-> v1-29 flags) (sp-launch-state-flags sp0)) + (set! (-> v1-29 center) (-> this origin trans)) + (set! (-> v1-29 sprite3d) #f) + (set! (-> v1-29 sprite) #f) + ) + ) + (+! s5-0 1) + ) + (else + (format 0 "initialize called with non-particle-launcher~%") + ) + ) + ) + ) + ) + (set! (-> this length) s5-0) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs sparticle-launch-control. +(defmethod create-launch-control ((this sparticle-launch-group) (arg0 process)) + (let ((gp-0 (the-as object (new 'process 'sparticle-launch-control (-> this length))))) + (when (zero? (the-as sparticle-launch-control gp-0)) + (go process-drawable-art-error "memory") + (set! gp-0 0) + (goto cfg-4) + ) + (initialize (the-as sparticle-launch-control gp-0) this (the-as process-drawable arg0)) + (label cfg-4) + (the-as sparticle-launch-control gp-0) + ) + ) + +(defmethod kill-particles ((this sparticle-launch-control)) + (countdown (v1-0 (-> this length)) + (let ((a0-4 (-> this data v1-0))) + (logclear! (-> a0-4 flags) (sp-launch-state-flags sp1)) + ) + ) + (set! (-> this local-clock) 0) + (set! (-> this local-space-binding) (the-as particle-local-space-info 1.0)) + (kill-all-particles-with-key this) + (if (> (-> this matrix) 0) + (sprite-release-user-hvdf (-> this matrix)) + ) + 0 + (none) + ) + +(defmethod clear-2 ((this sparticle-launch-control)) + "Set length to 0" + (kill-all-particles-with-key this) + 0 + (none) + ) + +(defmethod is-visible? ((this sparticle-launch-control) (arg0 vector)) + (let* ((v1-0 (-> this group)) + (f0-0 (-> v1-0 bounds r)) + ) + (cond + ((= f0-0 0.0) + #t + ) + ((nonzero? (-> this matrix)) + #t + ) + (else + (let ((s5-1 (vector+! (new 'stack-no-clear 'vector) arg0 (the-as vector (-> v1-0 bounds))))) + (set! (-> s5-1 w) f0-0) + (when (or *display-sprite-marks* + *display-sprite-spheres* + (and *display-actor-vis* (= (-> this proc) *debug-actor*)) + ) + (add-debug-sphere + *display-sprite-spheres* + (bucket-id debug) + s5-1 + (-> s5-1 w) + (new 'static 'rgba :g #xff :a #x80) + ) + (add-debug-matrix *display-sprite-marks* (bucket-id debug) (-> this origin) (meters 2)) + ) + (sphere-in-view-frustum? (the-as sphere s5-1)) + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch particle-local-space-info vs none. +(defmethod set-local-space-info ((this sparticle-launch-control) (arg0 particle-local-space-info)) + (set! (-> this local-space-binding) arg0) + (none) + ) + +(defun execute-particle-local-space-engine ((arg0 int)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (let* ((gp-0 *part-local-space-engine*) + (v1-2 (-> gp-0 alive-list next0)) + (s5-0 (-> (the-as connection v1-2) next0)) + ) + (while (!= v1-2 (-> gp-0 alive-list-end)) + ((the-as (function object) (-> (the-as connection v1-2) param0))) + (set! v1-2 s5-0) + (set! s5-0 (-> (the-as connection s5-0) next0)) + ) + ) + ) + ((= v1-0 1) + (let* ((v1-7 *part-local-space-engine*) + (a1-0 (-> v1-7 alive-list next0)) + (a0-13 (-> (the-as particle-local-space-info a1-0) next0)) + ) + (while (!= a1-0 (-> v1-7 alive-list-end)) + (let* ((a2-0 (-> (the-as particle-local-space-info a1-0) mat-prev)) + (t1-0 (-> (the-as particle-local-space-info a1-0) mat-new)) + (a1-1 (-> t1-0 rvec quad)) + (a3-0 (-> t1-0 uvec quad)) + (t0-0 (-> t1-0 fvec quad)) + (t1-1 (-> t1-0 trans quad)) + ) + (set! (-> a2-0 rvec quad) a1-1) + (set! (-> a2-0 uvec quad) a3-0) + (set! (-> a2-0 fvec quad) t0-0) + (set! (-> a2-0 trans quad) t1-1) + ) + (set! a1-0 a0-13) + (set! a0-13 (-> a0-13 next0)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defun local-space-camera ((arg0 particle-local-space-info)) + (let ((s5-0 (math-camera-matrix)) + (gp-0 (-> arg0 mat-new)) + ) + (logior! (-> arg0 flags) (part-local-space-flags pls2)) + (cond + ((logtest? (-> arg0 flags) (part-local-space-flags pls0)) + (matrix-identity! gp-0) + (set! (-> gp-0 trans quad) (-> s5-0 trans quad)) + ) + ((logtest? (-> arg0 flags) (part-local-space-flags pls1)) + (let ((a2-0 gp-0) + (v1-7 (-> s5-0 rvec quad)) + (a0-4 (-> s5-0 uvec quad)) + (a1-0 (-> s5-0 fvec quad)) + (a3-0 (-> s5-0 trans quad)) + ) + (set! (-> a2-0 rvec quad) v1-7) + (set! (-> a2-0 uvec quad) a0-4) + (set! (-> a2-0 fvec quad) a1-0) + (set! (-> a2-0 trans quad) a3-0) + ) + (set! (-> gp-0 rvec y) 0.0) + (set! (-> gp-0 fvec y) 0.0) + (vector-normalize! (-> gp-0 rvec) 1.0) + (vector-normalize! (-> gp-0 fvec) 1.0) + (vector-cross! (-> gp-0 uvec) (-> gp-0 fvec) (-> gp-0 rvec)) + ) + (else + (let* ((a2-1 s5-0) + (v1-10 (-> a2-1 rvec quad)) + (a0-8 (-> a2-1 uvec quad)) + (a1-4 (-> a2-1 fvec quad)) + (a2-2 (-> a2-1 trans quad)) + ) + (set! (-> gp-0 rvec quad) v1-10) + (set! (-> gp-0 uvec quad) a0-8) + (set! (-> gp-0 fvec quad) a1-4) + (set! (-> gp-0 trans quad) a2-2) + ) + ) + ) + ) + 0 + (none) + ) + +(defun local-space-proc-joint ((arg0 particle-local-space-info)) + (let ((a2-0 (handle->process (-> arg0 hand)))) + (when a2-0 + (let ((s5-0 (-> (the-as process-drawable a2-0) node-list data (the-as int (-> arg0 param1)) bone transform)) + (gp-0 (-> arg0 mat-new)) + ) + (logior! (-> arg0 flags) (part-local-space-flags pls2)) + (cond + ((logtest? (-> arg0 flags) (part-local-space-flags pls0)) + (matrix-identity! gp-0) + (set! (-> gp-0 trans quad) (-> s5-0 trans quad)) + ) + ((logtest? (-> arg0 flags) (part-local-space-flags pls1)) + (let ((a2-2 gp-0) + (v1-14 (-> s5-0 rvec quad)) + (a0-4 (-> s5-0 uvec quad)) + (a1-5 (-> s5-0 fvec quad)) + (a3-0 (-> s5-0 trans quad)) + ) + (set! (-> a2-2 rvec quad) v1-14) + (set! (-> a2-2 uvec quad) a0-4) + (set! (-> a2-2 fvec quad) a1-5) + (set! (-> a2-2 trans quad) a3-0) + ) + (set! (-> gp-0 rvec y) 0.0) + (set! (-> gp-0 fvec y) 0.0) + (vector-normalize! (-> gp-0 rvec) 1.0) + (vector-normalize! (-> gp-0 fvec) 1.0) + (vector-cross! (-> gp-0 uvec) (-> gp-0 fvec) (-> gp-0 rvec)) + ) + (else + (let* ((a2-3 s5-0) + (v1-17 (-> a2-3 rvec quad)) + (a0-8 (-> a2-3 uvec quad)) + (a1-9 (-> a2-3 fvec quad)) + (a2-4 (-> a2-3 trans quad)) + ) + (set! (-> gp-0 rvec quad) v1-17) + (set! (-> gp-0 uvec quad) a0-8) + (set! (-> gp-0 fvec quad) a1-9) + (set! (-> gp-0 trans quad) a2-4) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod spawn-from-mat ((this sparticle-launch-control) (arg0 matrix)) + (let* ((a2-0 (-> this origin)) + (a3-0 arg0) + (v1-0 (-> a3-0 rvec quad)) + (a0-1 (-> a3-0 uvec quad)) + (a1-1 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> a2-0 rvec quad) v1-0) + (set! (-> a2-0 uvec quad) a0-1) + (set! (-> a2-0 fvec quad) a1-1) + (set! (-> a2-0 trans quad) a3-1) + ) + (let ((s4-0 (-> this group))) + (when (logtest? (-> s4-0 flags) (sp-group-flag sp6)) + (let ((f0-0 (-> s4-0 rotate-x)) + (f1-0 (-> s4-0 rotate-y)) + (f2-0 (-> s4-0 rotate-z)) + (t9-0 matrix-rotate-xyz!) + (a0-2 (new 'stack-no-clear 'matrix)) + (a1-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-2 x) f0-0) + (set! (-> a1-2 y) f1-0) + (set! (-> a1-2 z) f2-0) + (set! (-> a1-2 w) 1.0) + (let ((a1-3 (t9-0 a0-2 a1-2))) + (matrix*! (-> this origin) a1-3 (-> this origin)) + ) + ) + ) + (when (logtest? (-> s4-0 flags) (sp-group-flag sp7)) + (let ((a1-4 (new 'stack-no-clear 'vector))) + (set! (-> a1-4 x) (-> s4-0 scale-x)) + (set! (-> a1-4 y) (-> s4-0 scale-y)) + (set! (-> a1-4 z) (-> s4-0 scale-z)) + (set! (-> a1-4 w) 1.0) + (set! (-> a1-4 w) 1.0) + (scale-matrix! (-> this origin) a1-4 (-> this origin)) + ) + ) + ) + (spawn this (-> arg0 trans)) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod spawn-from-cspace ((this sparticle-launch-control) (arg0 cspace)) + (let* ((v1-0 (-> this origin)) + (a3-0 (-> arg0 bone transform)) + (a0-2 (-> a3-0 rvec quad)) + (a1-1 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-0 rvec quad) a0-2) + (set! (-> v1-0 uvec quad) a1-1) + (set! (-> v1-0 fvec quad) a2-0) + (set! (-> v1-0 trans quad) a3-1) + ) + (let ((s4-0 (-> this group))) + (when (logtest? (-> s4-0 flags) (sp-group-flag sp6)) + (let ((f0-0 (-> s4-0 rotate-x)) + (f1-0 (-> s4-0 rotate-y)) + (f2-0 (-> s4-0 rotate-z)) + (t9-0 matrix-rotate-xyz!) + (a0-3 (new 'stack-no-clear 'matrix)) + (a1-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-2 x) f0-0) + (set! (-> a1-2 y) f1-0) + (set! (-> a1-2 z) f2-0) + (set! (-> a1-2 w) 1.0) + (let ((a1-3 (t9-0 a0-3 a1-2))) + (matrix*! (-> this origin) a1-3 (-> this origin)) + ) + ) + ) + (when (logtest? (-> s4-0 flags) (sp-group-flag sp7)) + (let ((a1-4 (new 'stack-no-clear 'vector))) + (set! (-> a1-4 x) (-> s4-0 scale-x)) + (set! (-> a1-4 y) (-> s4-0 scale-y)) + (set! (-> a1-4 z) (-> s4-0 scale-z)) + (set! (-> a1-4 w) 1.0) + (set! (-> a1-4 w) 1.0) + (scale-matrix! (-> this origin) a1-4 (-> this origin)) + ) + ) + ) + (spawn this (vector<-cspace! (-> this origin trans) arg0)) + (none) + ) + +;; WARN: Return type mismatch int vs object. +(defmethod spawn ((this sparticle-launch-control) (arg0 vector)) + (with-pp + (set! (-> this origin trans quad) (-> arg0 quad)) + (if (not (or (is-visible? this arg0) + (logtest? (-> this group flags) (sp-group-flag sp1 sp2)) + (and (logtest? (-> this group flags) (sp-group-flag sp2 sp11)) + (not (-> *setting-control* user-current part-bounds-check)) + ) + ) + ) + (return (the-as object 0)) + ) + (when (logtest? (-> this group flags) (sp-group-flag sp12)) + (let* ((v1-18 (-> this origin)) + (a3-0 (-> this local-space-binding mat-prev)) + (a0-5 (-> a3-0 rvec quad)) + (a1-2 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-18 rvec quad) a0-5) + (set! (-> v1-18 uvec quad) a1-2) + (set! (-> v1-18 fvec quad) a2-0) + (set! (-> v1-18 trans quad) a3-1) + ) + ) + (let ((s4-0 (the-as int (current-time))) + (s5-0 (-> this last-spawn-time)) + ) + (let ((v1-22 (-> *display* real-frame-clock integral-frame-counter))) + (if (!= v1-22 (+ (-> this last-spawn-frame) 1)) + (set! s5-0 (the-as int (- (the-as time-frame s4-0) (logand (the-as int (-> pp clock sparticle-data x)) 255)))) + ) + ) + (set! (-> this last-spawn-frame) (the-as int (-> *display* real-frame-clock integral-frame-counter))) + (set! (-> this last-spawn-time) s4-0) + (when (logtest? (-> this group flags) (sp-group-flag sp0)) + (set! s5-0 (-> this local-clock)) + (+! (-> this local-clock) (logand (the-as int (-> pp clock sparticle-data x)) 255)) + (set! s4-0 (-> this local-clock)) + ) + (let* ((f30-0 (vector-vector-distance arg0 (math-camera-pos))) + (v1-38 1) + (a0-12 *time-of-day*) + ;; og:preserve-this added check + (s3-1 (if (nonzero? *time-of-day*) + (ash v1-38 + (if a0-12 + (-> a0-12 0 hours) + 0 + ) + ) + 0 + ) + ) + ) + (if (nonzero? (-> this matrix)) + (set! f30-0 0.0) + ) + (let ((s2-1 (-> this length))) + (b! #t cfg-102 :delay (nop!)) + (label cfg-26) + (+! s2-1 -1) + (let* ((a3-2 (-> this data s2-1)) + (v1-45 (-> a3-2 group-item)) + (a1-5 (-> *part-id-table* (-> v1-45 launcher))) + ) + (when (and a1-5 (nonzero? a1-5) (logtest? (-> a3-2 flags) (sp-launch-state-flags sp0))) + (let* ((f1-3 (if (!= (-> v1-45 falloff-to) 0.0) + (- 1.0 (/ f30-0 (-> v1-45 falloff-to))) + 1.0 + ) + ) + (f0-5 f1-3) + ) + (let ((a0-24 sparticle-launcher)) + (b! (!= (-> a1-5 type) a0-24) cfg-101 :delay (nop!)) + ) + (b! (not (logtest? (-> v1-45 flags) (sp-group-item-flag sp3))) cfg-49 :delay (nop!)) + (when (not (logtest? (-> a3-2 flags) (sp-launch-state-flags sp1))) + (set! (-> a3-2 spawn-time) (the-as uint s4-0)) + (logior! (-> a3-2 flags) (sp-launch-state-flags sp1)) + (when (< 0.0 f0-5) + (cond + ((logtest? (-> v1-45 flags) (sp-group-item-flag sp7)) + (launch-particles + :system (if (logtest? (-> v1-45 flags) (sp-group-item-flag is-3d)) + *sp-particle-system-3d* + *sp-particle-system-2d* + ) + a1-5 + (-> this origin) + :launch-state a3-2 + :launch-control this + :rate f0-5 + :origin-is-matrix #t + ) + ) + (else + (let ((t9-4 sp-launch-particles-var) + (a0-37 (if (logtest? (-> v1-45 flags) (sp-group-item-flag is-3d)) + *sp-particle-system-3d* + *sp-particle-system-2d* + ) + ) + (a2-5 *launch-matrix*) + ) + (set! (-> a2-5 trans quad) (-> a3-2 center quad)) + (t9-4 a0-37 a1-5 a2-5 a3-2 this f0-5) + ) + ) + ) + ) + ) + (b! #t cfg-100 :delay (nop!)) + (label cfg-49) + (when (or (logtest? s3-1 (-> v1-45 hour-mask)) + (not (or (= (-> v1-45 fade-after) 0.0) (< f30-0 (-> v1-45 fade-after)))) + ) + 0 + (goto cfg-100) + ) + (b! (nonzero? (-> v1-45 period)) cfg-66 :delay (empty-form)) + (if (not (logtest? (-> v1-45 flags) (sp-group-item-flag sp6))) + (set! f0-5 (* 0.2 (the float (- s4-0 s5-0)) f0-5)) + ) + (b! #t cfg-88 :delay (nop!)) + (label cfg-66) + 0 + 0 + (let* ((a2-6 (-> v1-45 length)) + (a0-56 (-> v1-45 period)) + (t0-10 (mod (+ (- s5-0 (the-as int (-> this data s2-1 offset))) a0-56) (the-as int a0-56))) + (a0-57 (mod (the-as uint (+ (- s4-0 (the-as int (-> this data s2-1 offset))) a0-56)) a0-56)) + ) + (set! f0-5 (cond + ((and (< t0-10 (the-as int a2-6)) (< (the-as int a0-57) (the-as int a2-6))) + (* 0.2 (the float (- s4-0 s5-0)) f0-5) + ) + ((and (< t0-10 (the-as int a2-6)) (>= (the-as int a0-57) (the-as int a2-6))) + (* 0.2 (the float (- a2-6 (the-as uint t0-10))) f0-5) + ) + ((and (>= t0-10 (the-as int a2-6)) (< (the-as int a0-57) (the-as int a2-6))) + (* 0.2 (the float a0-57) f0-5) + ) + (else + (when (not (logtest? (-> v1-45 flags) (sp-group-item-flag sp1))) + 0 + (goto cfg-100) + ) + (when (< (the-as uint (- s4-0 (the-as int (-> this data s2-1 spawn-time)))) (-> v1-45 period)) + 0 + (goto cfg-100) + ) + (set! (-> this data s2-1 offset) (- (-> v1-45 period) a0-57)) + (* 0.2 (the float (- s4-0 s5-0)) f0-5) + ) + ) + ) + ) + (label cfg-88) + (set! (-> a3-2 spawn-time) (the-as uint s4-0)) + (logior! (-> a3-2 flags) (sp-launch-state-flags sp1)) + (when (< 0.0 f0-5) + (if (logtest? (-> v1-45 flags) (sp-group-item-flag sp6)) + (set! f0-5 f1-3) + ) + (cond + ((logtest? (-> v1-45 flags) (sp-group-item-flag sp7)) + (launch-particles + :system (if (logtest? (-> v1-45 flags) (sp-group-item-flag is-3d)) + *sp-particle-system-3d* + *sp-particle-system-2d* + ) + a1-5 + (-> this origin) + :launch-state a3-2 + :launch-control this + :rate f0-5 + :origin-is-matrix #t + ) + ) + (else + (let ((t9-6 sp-launch-particles-var) + (a0-82 (if (logtest? (-> v1-45 flags) (sp-group-item-flag is-3d)) + *sp-particle-system-3d* + *sp-particle-system-2d* + ) + ) + (a2-23 *launch-matrix*) + ) + (set! (-> a2-23 trans quad) (-> a3-2 center quad)) + (t9-6 a0-82 a1-5 a2-23 a3-2 this f0-5) + ) + ) + ) + ) + ) + (label cfg-100) + (b! #t cfg-102 :delay (nop!)) + (label cfg-101) + (format 0 "spawn called for non-sparticle-launcher~%") + ) + ) + (label cfg-102) + (b! (nonzero? s2-1) cfg-26 :delay (nop!)) + ) + ) + ) + 0 + ) + ) + +(defun execute-part-engine () + (local-vars (sv-96 sparticle-launcher) (sv-104 int)) + (let ((gp-0 *sp-particle-system-2d*)) + (let* ((s5-0 *part-engine*) + (s4-0 *part-id-table*) + (s3-0 (new 'stack-no-clear 'matrix)) + (s2-0 (new 'stack-no-clear 'vector)) + (v1-1 (-> s5-0 alive-list next0)) + (s1-0 (-> v1-1 next0)) + ) + (while (!= v1-1 (-> s5-0 alive-list-end)) + (let* ((a0-2 (the-as process-drawable (-> (the-as connection v1-1) param1))) + (a1-0 (-> a0-2 draw)) + (s0-0 (the-as object (-> (the-as connection v1-1) param3))) + ) + (when (and (logtest? (-> a1-0 status) (draw-control-status on-screen)) + (< (-> a1-0 distance) (-> (the-as vector s0-0) w)) + ) + (set! sv-96 (-> s4-0 (-> (the-as connection v1-1) param2))) + (set! sv-104 (the-as int (-> (the-as connection v1-1) param0))) + (when (nonzero? sv-96) + (let ((a1-8 (-> a0-2 node-list data sv-104))) + (let* ((v1-7 s3-0) + (t0-0 (-> a1-8 bone transform)) + (a0-5 (-> t0-0 rvec quad)) + (a2-2 (-> t0-0 uvec quad)) + (a3-0 (-> t0-0 fvec quad)) + (t0-1 (-> t0-0 trans quad)) + ) + (set! (-> v1-7 rvec quad) a0-5) + (set! (-> v1-7 uvec quad) a2-2) + (set! (-> v1-7 fvec quad) a3-0) + (set! (-> v1-7 trans quad) t0-1) + ) + (vector<-cspace! (-> s3-0 trans) a1-8) + ) + (set! (-> s2-0 quad) (-> (the-as vector s0-0) quad)) + (set! (-> s2-0 w) 1.0) + (vector-matrix*! (-> s3-0 trans) s2-0 s3-0) + (launch-particles :system gp-0 sv-96 s3-0 :origin-is-matrix #t) + ) + ) + ) + (set! v1-1 s1-0) + (set! s1-0 (-> s1-0 next0)) + ) + ) + (let* ((s5-1 (camera-pos)) + (v1-12 1) + (a0-14 *time-of-day*) + ;; og:preserve-this added check + (s4-1 (if (nonzero? *time-of-day*) + (ash v1-12 + (if a0-14 + (-> a0-14 0 hours) + 0 + ) + ) + 0 + ) + ) + ) + (dotimes (s3-1 (-> *level* length)) + (let ((v1-16 (-> *level* level s3-1))) + (when (= (-> v1-16 status) 'active) + (let ((s2-1 (-> v1-16 part-engine))) + (when s2-1 + (countdown (s1-1 (-> s2-1 length)) + (let ((s0-1 (-> s2-1 data s1-1))) + (when (and (or (zero? (-> s0-1 param3)) + ;; og:preserve-this + (< (vector-vector-distance s5-1 (the-as vector (&-> s0-1 param0))) (the-as float (-> s0-1 param3))) + ) + (not (logtest? s4-1 (the-as int (-> s0-1 prev1)))) + ) + (let ((a1-14 (-> s0-1 next1)) + (t9-5 sp-launch-particles-var) + (a0-25 gp-0) + (a2-5 *launch-matrix*) + ) + (set! (-> a2-5 trans quad) (-> (the-as vector (&-> s0-1 param0)) quad)) + (t9-5 + a0-25 + (the-as sparticle-launcher a1-14) + a2-5 + (the-as sparticle-launch-state #f) + (the-as sparticle-launch-control #f) + 1.0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defun sparticle-track-root ((arg0 object) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((v1-3 (-> arg1 key proc root trans))) + (set! (-> arg2 x) (-> v1-3 x)) + (set! (-> arg2 y) (-> v1-3 y)) + (set! (-> arg2 z) (-> v1-3 z)) + ) + 0 + (none) + ) + +(defun sparticle-track-root-prim ((arg0 object) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((v1-4 (-> (the-as collide-shape (-> arg1 key proc root)) root-prim prim-core))) + (set! (-> arg2 x) (-> v1-4 world-sphere x)) + (set! (-> arg2 y) (-> v1-4 world-sphere y)) + (set! (-> arg2 z) (-> v1-4 world-sphere z)) + ) + 0 + (none) + ) + +(defun sparticle-track-joint ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let* ((v1-1 (-> arg1 key proc)) + (a1-1 (the int (-> arg1 user-float))) + (v1-3 (vector<-cspace! (new 'stack-no-clear 'vector) (-> v1-1 node-list data a1-1))) + ) + (set! (-> arg2 x) (-> v1-3 x)) + (set! (-> arg2 y) (-> v1-3 y)) + (set! (-> arg2 z) (-> v1-3 z)) + ) + 0 + (none) + ) + +(defun sparticle-turn-to-vel ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-3d)) + (local-vars (v1-1 float) (v1-2 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (new 'stack-no-clear 'quaternion))) + (quaternion-axis-angle! gp-0 0.0 1.0 0.0 (+ 32768.0 (vector-y-angle (-> arg1 vel-sxvel)))) + (cond + ((< (-> gp-0 w) 0.0) + (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> gp-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) + (.mov v1-1 vf1) + ) + (else + (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> gp-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) + (.mov v1-2 vf1) + ) + ) + ) + 0 + (none) + ) + ) + +(defun sparticle-rotate-to-vel-3d ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-3d) (arg3 vector)) + (local-vars (v1-9 float) (v1-10 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (new 'stack-no-clear 'vector) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> arg1 vel-sxvel quad)) + (let ((s4-0 (-> arg1 key proc))) + (vector-normalize! s5-0 1.0) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (v1-4 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-4 x) (-> arg2 x-y-z-sx x)) + (set! (-> v1-4 y) (-> arg2 x-y-z-sx y)) + (set! (-> v1-4 z) (-> arg2 x-y-z-sx z)) + (set! (-> v1-4 w) 1.0) + (let ((s3-1 (vector-! s3-0 v1-4 (-> s4-0 root trans))) + (s2-0 (new 'stack-no-clear 'matrix)) + ) + (cond + (#t + (set! (-> s3-1 y) 0.0) + (vector-rotate-around-y! s3-1 s3-1 16384.0) + (vector-normalize! s3-1 1.0) + (matrix-r-f-compose s2-0 s5-0 s3-1 arg3) + ) + (else + (matrix-r-f-compose s2-0 s5-0 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> s4-0 root quat)) arg3) + ) + ) + (let ((s5-1 (new 'stack-no-clear 'quaternion))) + (matrix->quaternion s5-1 s2-0) + (cond + ((< (-> s5-1 w) 0.0) + (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) + (.mov v1-9 vf1) + ) + (else + (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) + (.mov v1-10 vf1) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defun birth-func-clean ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (when *display-capture-mode* + (set! (-> arg1 timer) 0) + 0 + ) + 0 + (none) + ) + +(defun birth-func-process-clock ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (set! (-> arg1 clock-index) (the-as uint (-> *kernel-context* current-process clock index))) + 0 + (none) + ) + +(defun birth-func-copy-rot-color ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (local-vars (v1-5 float) (v1-6 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (-> arg4 sprite))) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (let* ((v1-0 arg2) + (f0-0 (-> v1-0 qx-qy-qz-sy x)) + (f1-0 (-> v1-0 qx-qy-qz-sy y)) + (f2-0 (-> v1-0 qx-qy-qz-sy z)) + ) + (set! (-> s4-0 x) f0-0) + (set! (-> s4-0 y) f1-0) + (set! (-> s4-0 z) f2-0) + (set! (-> s4-0 w) (sqrtf (- (- (- 1.0 (* f2-0 f2-0)) (* f1-0 f1-0)) (* f0-0 f0-0)))) + ) + (quaternion-rotate-y! s4-0 s4-0 (-> s5-0 sprite flag-rot-sy z)) + (let ((v1-4 arg2)) + (cond + ((< (-> s4-0 w) 0.0) + (.lvf vf1 (&-> v1-4 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s4-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> v1-4 qx-qy-qz-sy quad) vf1) + (.mov v1-5 vf1) + ) + (else + (.lvf vf1 (&-> v1-4 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s4-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> v1-4 qx-qy-qz-sy quad) vf1) + (.mov v1-6 vf1) + ) + ) + ) + ) + (set! (-> arg2 r-g-b-a x) (-> s5-0 sprite r-g-b-a x)) + (set! (-> arg2 r-g-b-a y) (-> s5-0 sprite r-g-b-a y)) + (set! (-> arg2 r-g-b-a z) (-> s5-0 sprite r-g-b-a z)) + ) + 0 + (none) + ) + ) + +(define *global-toggle* 0) + +(defun birth-func-copy2-rot-color ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (local-vars (v1-18 float) (v1-19 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (-> arg4 sprite))) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (let* ((v1-0 arg2) + (f0-0 (-> v1-0 qx-qy-qz-sy x)) + (f1-0 (-> v1-0 qx-qy-qz-sy y)) + (f2-0 (-> v1-0 qx-qy-qz-sy z)) + ) + (set! (-> s4-0 x) f0-0) + (set! (-> s4-0 y) f1-0) + (set! (-> s4-0 z) f2-0) + (set! (-> s4-0 w) (sqrtf (- (- (- 1.0 (* f2-0 f2-0)) (* f1-0 f1-0)) (* f0-0 f0-0)))) + ) + (let ((a1-1 (new-stack-vector0))) + (set! (-> a1-1 y) (-> s5-0 sprite flag-rot-sy z)) + (set! (-> a1-1 z) (if (logtest? *global-toggle* 1) + (the float (sar (shl (the int (- 16384.0 (-> s5-0 sprite x-y-z-sx w))) 48) 48)) + (the float (sar (shl (the int (+ 16384.0 (-> s5-0 sprite x-y-z-sx w))) 48) 48)) + ) + ) + (quaternion-zxy! s4-0 a1-1) + ) + (let ((v1-17 arg2)) + (cond + ((< (-> s4-0 w) 0.0) + (.lvf vf1 (&-> v1-17 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s4-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> v1-17 qx-qy-qz-sy quad) vf1) + (.mov v1-18 vf1) + ) + (else + (.lvf vf1 (&-> v1-17 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s4-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> v1-17 qx-qy-qz-sy quad) vf1) + (.mov v1-19 vf1) + ) + ) + ) + ) + (set! (-> arg2 r-g-b-a x) (-> s5-0 sprite r-g-b-a x)) + (set! (-> arg2 r-g-b-a y) (-> s5-0 sprite r-g-b-a y)) + (set! (-> arg2 r-g-b-a z) (-> s5-0 sprite r-g-b-a z)) + ) + (set! *global-toggle* (+ *global-toggle* 1)) + 0 + (none) + ) + ) + +(defun birth-func-copy-omega-to-z ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (set! (-> arg2 qx-qy-qz-sy z) (+ -16384.0 (-> arg1 omega))) + (set! (-> arg1 next-time) (-> arg4 sprite next-time)) + (set! (-> arg2 x-y-z-sx w) (* 163.85638 (the float (-> arg4 sprite next-time)))) + 0 + (none) + ) + +(defun birth-func-random-next-time ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (set! (-> arg1 next-time) (the-as uint (the int (rand-vu-float-range 0.0 (-> arg1 user-float))))) + 0 + (none) + ) + +(defun sparticle-respawn-heights ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((gp-0 (the-as (array int32) (-> arg1 user-float)))) + (when (and (nonzero? gp-0) + ;; og:preserve-this + (or (and (< (-> arg1 vel-sxvel y) 0.0) (< (-> arg2 y) (the-as float (-> gp-0 1)))) + (and (< 0.0 (-> arg1 vel-sxvel y)) (< (the-as float (-> gp-0 2)) (-> arg2 y))) + ) + ) + (sp-kill-particle arg0 arg1) + (let ((s3-0 (+ (-> gp-0 length) -1))) + (when (< 2 s3-0) + (let ((s2-0 (new 'stack-no-clear 'vector)) + (s1-0 (if (zero? (-> gp-0 0)) + *sp-particle-system-2d* + *sp-particle-system-3d* + ) + ) + ) + (set-vector! s2-0 (-> arg2 x) (-> arg1 user-float) (-> arg2 z) 1.0) + (let ((s5-1 3)) + (while (>= s3-0 s5-1) + (let ((t9-1 sp-launch-particles-var) + (a0-2 s1-0) + (a1-3 (-> *part-id-table* (-> gp-0 s5-1))) + (a2-1 *launch-matrix*) + ) + (set! (-> a2-1 trans quad) (-> s2-0 quad)) + (t9-1 a0-2 a1-3 a2-1 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (+! s5-1 1) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defun sparticle-respawn-timer ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (when (<= (-> arg1 timer) 0) + (let ((gp-0 (the-as (array int32) (-> arg1 user-float)))) + (when (nonzero? gp-0) + (sp-kill-particle arg0 arg1) + (let ((s5-0 (+ (-> gp-0 length) -1))) + (when (< 2 s5-0) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (if (zero? (-> gp-0 0)) + *sp-particle-system-2d* + *sp-particle-system-3d* + ) + ) + ) + (set-vector! s4-0 (-> arg2 x) (-> arg1 user-float) (-> arg2 z) 1.0) + (let ((s2-1 3)) + (while (>= s5-0 s2-1) + (let ((t9-1 sp-launch-particles-var) + (a0-2 s3-0) + (a1-3 (-> *part-id-table* (-> gp-0 s2-1))) + (a2-1 *launch-matrix*) + ) + (set! (-> a2-1 trans quad) (-> s4-0 quad)) + (t9-1 a0-2 a1-3 a2-1 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (+! s2-1 1) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun sparticle-texture-animate ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((v1-0 (the-as (array int32) (-> arg1 user-float)))) + (when (nonzero? v1-0) + (if (zero? (-> v1-0 2)) + (set! (-> v1-0 2) (-> arg1 timer)) + ) + (let* ((a0-6 (+ (-> v1-0 length) -3)) + (a2-1 (-> v1-0 0)) + (a3-0 (-> v1-0 2)) + (t0-1 (if (< (-> arg1 timer) 0) + (the-as int (-> *display* base-clock frame-counter)) + (- a3-0 (-> arg1 timer)) + ) + ) + ) + (cond + ((zero? (-> v1-0 1)) + (let ((v1-2 + (the-as + (array int32) + (-> (the-as + (array int32) + (+ (* (+ (max 0 (min (+ (/ t0-1 a2-1) (-> arg1 user1-int16)) (+ a0-6 -1))) 3) 4) (the-as int v1-0)) + ) + 0 + ) + ) + ) + ) + (if (nonzero? v1-2) + (particle-adgif-callback (-> arg1 adgif) (the-as texture-id v1-2)) + ) + ) + ) + (else + (let ((v1-4 (-> v1-0 (+ (mod (max 0 (+ (/ t0-1 a2-1) (-> arg1 user1-int16))) a0-6) 3)))) + (if (nonzero? v1-4) + (particle-adgif-callback (-> arg1 adgif) (the-as texture-id v1-4)) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +;; ERROR: Bad vector register dependency: vf1 +;; ERROR: Bad vector register dependency: vf2 +(defun sparticle-texture-day-night ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d)) + (local-vars + (v1-9 uint128) + (v1-10 uint128) + (v1-13 uint128) + (v1-14 uint128) + (v1-23 uint128) + (v1-24 uint128) + (v1-27 uint128) + (v1-28 uint128) + (v1-33 float) + (a0-5 float) + (a0-11 float) + (t7-0 int) ;; og:preserve-this float -> int + (t7-3 int) ;; og:preserve-this float -> int + (s3-0 float) + (s4-0 float) + ) + (rlet ((vf1 :class vf) + (vf2 :class vf) + ) + (let ((s2-0 (the-as (array int32) (-> arg1 user-float)))) + (when (nonzero? s2-0) + (let* ((v1-1 *time-of-day*) + (s1-0 (if v1-1 + (-> v1-1 0 hours) + 0 + ) + ) + (f0-0 (rand-vu)) + ) + (.mov s4-0 vf1) + (.mov s3-0 vf2) + (cond + ((or (< s1-0 6) (< 18 s1-0)) + (let ((a1-1 (-> s2-0 7))) + (when (nonzero? a1-1) + (let ((v1-6 f0-0)) + (.mov vf2 v1-6) + ) + (let ((v1-8 (the-as uint128 (make-u128 0 (-> s2-0 9))))) + (.pextlb v1-9 0 v1-8) + ) + (.pextlb v1-10 0 v1-9) + (.mov vf1 v1-10) + (.itof.vf vf1 vf1) + (.mul.x.vf vf1 vf1 vf2) + (let ((v1-12 (the-as uint128 (make-u128 0 (-> s2-0 8))))) + (.pextlb v1-13 0 v1-12) + ) + (.pextlb v1-14 0 v1-13) + (.mov vf2 v1-14) + (.itof.vf vf2 vf2) + (.add.vf vf1 vf1 vf2) + (let ((v1-15 (-> arg1 flags-s32))) + (when (nonzero? (-> s2-0 10)) + (.lvf vf2 (&-> *time-of-day-context* current-prt-color quad)) + (.mul.vf vf1 vf1 vf2) + (.mov a0-5 vf1) + ) + (let ((v1-16 (logand v1-15 #x4000))) + (.mov t7-0 vf1) + (let ((v1-17 (sar v1-16 14))) + ;; og:preserve-this + (set! (-> arg2 r-g-b-a quad) (the-as uint128 (logior (logand (the-as uint t7-0) (the-as uint -2)) v1-17))) + ) + ) + ) + (particle-adgif-callback (-> arg1 adgif) (the-as texture-id a1-1)) + ) + ) + ) + (else + (let ((a1-2 (-> s2-0 3))) + (when (nonzero? a1-2) + (let ((v1-20 f0-0)) + (.mov vf2 v1-20) + ) + (let ((v1-22 (the-as uint128 (make-u128 0 (-> s2-0 5))))) + (.pextlb v1-23 0 v1-22) + ) + (.pextlb v1-24 0 v1-23) + (.mov vf1 v1-24) + (.itof.vf vf1 vf1) + (.mul.x.vf vf1 vf1 vf2) + (let ((v1-26 (the-as uint128 (make-u128 0 (-> s2-0 4))))) + (.pextlb v1-27 0 v1-26) + ) + (.pextlb v1-28 0 v1-27) + (.mov vf2 v1-28) + (.itof.vf vf2 vf2) + (.add.vf vf1 vf1 vf2) + (let ((v1-29 (-> arg1 flags-s32))) + (when (nonzero? (-> s2-0 6)) + (.lvf vf2 (&-> *time-of-day-context* current-prt-color quad)) + (.mul.vf vf1 vf1 vf2) + (.mov a0-11 vf1) + ) + (let ((v1-30 (logand v1-29 #x4000))) + (.mov t7-3 vf1) + (let ((v1-31 (sar v1-30 14))) + ;; og:preserve-this + (set! (-> arg2 r-g-b-a quad) (the-as uint128 (logior (logand (the-as uint t7-3) (the-as uint -2)) v1-31))) + ) + ) + ) + (particle-adgif-callback (-> arg1 adgif) (the-as texture-id a1-2)) + ) + ) + ) + ) + ) + (.mov vf1 s4-0) + (.mov vf2 s3-0) + (.mov v1-33 vf2) + ) + ) + (none) + ) + ) + +(defun sparticle-mode-animate ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d)) + (let ((a0-1 (-> arg1 key)) + (v1-0 (the-as object (-> arg1 user-float))) + ) + (when (nonzero? (the-as float v1-0)) + (let ((a1-2 (the-as (array uint32) (-> (the-as (array symbol) v1-0) 0 value)))) + (when (nonzero? a1-2) + (let* ((a1-4 (the-as object (-> a1-2 (min (the-as int (+ (-> a0-1 state-mode 0) 1)) (+ (-> a1-2 length) -1))))) + (a0-8 (the-as + object + (-> (the-as (array int32) a1-4) + (+ (mod + (the-as int (/ (-> a0-1 state-counter) (the-as uint (/ (-> (the-as vector4w a1-4) w) 8)))) + (+ (-> (the-as (pointer int32) a1-4) 0) -1) + ) + 1 + ) + ) + ) + ) + (a1-6 (/ (-> (the-as (array int32) v1-0) 1) 8)) + (a2-14 (-> (the-as (pointer int64) a0-8) (/ a1-6 64))) + (a0-11 (logtest? a2-14 (ash 1 (logand a1-6 63)))) + (s4-0 (if a0-11 + (-> (the-as (pointer int32) v1-0) 6) + (-> (the-as (pointer int32) v1-0) 5) + ) + ) + ) + (if a0-11 + (set! (-> arg2 r-g-b-a x) (rand-vu-float-range 64.0 192.0)) + (set! (-> arg2 r-g-b-a x) (rand-vu-float-range 32.0 48.0)) + ) + (set! (-> arg2 r-g-b-a y) (-> arg2 r-g-b-a x)) + (set! (-> arg2 r-g-b-a z) (-> arg2 r-g-b-a x)) + (if (nonzero? s4-0) + (particle-adgif-callback (-> arg1 adgif) (the-as texture-id s4-0)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(def-mips2c sparticle-motion-blur (function sparticle-system sparticle-cpuinfo vector none)) + +;; WARN: Return type mismatch int vs object. +(defun-debug sparticle-motion-blur-old ((arg0 object) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-3d)) + (let ((s2-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector4w)) + (s3-0 (new 'stack-no-clear 'vector4w)) + ) + (set! (-> s2-0 x) (-> arg2 x-y-z-sx x)) + (set! (-> s2-0 y) (-> arg2 x-y-z-sx y)) + (set! (-> s2-0 z) (-> arg2 x-y-z-sx z)) + (set! (-> s2-0 w) 1.0) + (when (and (or (!= (-> arg1 vel-sxvel x) 0.0) (!= (-> arg1 vel-sxvel y) 0.0) (!= (-> arg1 vel-sxvel z) 0.0)) + (transform-point-qword! s5-0 s2-0) + ) + (+! (-> s2-0 x) (* 32.0 (-> arg1 vel-sxvel x))) + (+! (-> s2-0 y) (* 32.0 (-> arg1 vel-sxvel y))) + (+! (-> s2-0 z) (* 32.0 (-> arg1 vel-sxvel z))) + (when (transform-point-qword! s3-0 s2-0) + (let* ((f0-14 (the float (+ (-> s5-0 x) -28672))) + (f1-10 (the float (+ (-> s5-0 y) -29440))) + (f2-4 (the float (+ (-> s3-0 x) -28672))) + (f3-1 (the float (+ (-> s3-0 y) -29440))) + (f30-0 (- f2-4 f0-14)) + (f28-0 (- f3-1 f1-10)) + ) + (set! (-> arg2 qx-qy-qz-sy z) (+ -16384.0 (atan f30-0 f28-0))) + (let ((f0-17 (-> arg1 omega))) + (if (!= f0-17 0.0) + (set! (-> arg2 x-y-z-sx w) (* (sqrtf (+ (* f30-0 f30-0) (* f28-0 f28-0))) + f0-17 + (lerp-scale 3.0 0.25 (/ 1.0 (the float (-> s5-0 z))) 0.000001 0.00000014285715) + ) + ) + ) + ) + ) + (return (the-as object #f)) + ) + ) + ) + (if (!= (-> arg1 omega) 0.0) + (set! (-> arg2 x-y-z-sx w) 0.0) + ) + 0 + ) + +(defun sparticle-set-conerot ((arg0 sparticle-launcher) (arg1 vector)) + (let ((s5-0 (get-field-spec-by-id arg0 (sp-field-id spt-conerot-x))) + (s4-0 (get-field-spec-by-id arg0 (sp-field-id spt-conerot-y))) + (v1-3 (get-field-spec-by-id arg0 (sp-field-id spt-conerot-z))) + ) + (set! (-> s5-0 initial-valuef) (-> arg1 x)) + (set! (-> s4-0 initial-valuef) (-> arg1 y)) + (set! (-> v1-3 initial-valuef) (-> arg1 z)) + ) + 0 + (none) + ) + +(defun sparticle-next-on-mode-1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (if (zero? (-> arg1 key state-mode 0)) + (set! (-> arg1 next-time) + (the-as uint (* (max 1 (the-as int (-> *display* clock (-> arg1 clock-index) sparticle-data x))) 2)) + ) + ) + 0.0 + ) + +(defun check-ground-bounce ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((f0-1 (+ (-> arg1 key origin trans y) (-> arg1 user-float)))) + (when (and (< (-> arg2 launchrot y) f0-1) (< (-> arg1 vel-sxvel y) 0.0)) + (set! (-> arg2 launchrot y) f0-1) + (set! (-> arg1 vel-sxvel y) (* (-> arg1 vel-sxvel y) (- (rand-vu-float-range 0.6 0.8)))) + ) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun check-drop-group-center ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((f0-0 (-> arg1 key origin trans y))) + (if (< (-> arg2 launchrot y) f0-0) + (sp-kill-particle arg0 arg1) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun check-bubble-height ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (if (< (-> arg1 key origin trans y) (-> arg2 launchrot y)) + (sp-kill-particle arg0 arg1) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun check-raise-group-center ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (if (< (-> arg1 key origin trans y) (-> arg2 launchrot y)) + (sp-kill-particle arg0 arg1) + ) + (none) + ) + +(defun birth-func-y->userdata ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) + (+! (-> arg1 user-float) (-> arg2 rvec y)) + 0 + (none) + ) + +(defun birth-func-ocean-height ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) + (set! (-> arg2 rvec y) (+ (get-height *ocean* (-> arg2 rvec) #t) (-> arg1 user-float))) + 0 + (none) + ) + +(defun birth-func-camera-orient ((arg0 int) (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) + ) + ) + +(defun birth-func-set-parent-pntr ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (set! (-> arg1 user-float) (the-as float (-> arg4 sprite sprite))) + 0 + (none) + ) + +(defun birth-func-get-parent-quat ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (let ((a0-1 (-> arg4 sprite sprite)) + (a1-1 (new 'stack-no-clear 'quaternion)) + ) + (when a0-1 + (let ((v1-2 a1-1) + (f0-0 (-> a0-1 flag-rot-sy x)) + (f1-0 (-> a0-1 flag-rot-sy y)) + (f2-0 (-> a0-1 flag-rot-sy z)) + ) + (set! (-> v1-2 x) f0-0) + (set! (-> v1-2 y) f1-0) + (set! (-> v1-2 z) f2-0) + (set! (-> v1-2 w) (sqrtf (- (- (- 1.0 (* f2-0 f2-0)) (* f1-0 f1-0)) (* f0-0 f0-0)))) + ) + (quaternion->matrix (-> arg4 control origin) a1-1) + ) + ) + 0 + (none) + ) + +(defun spt-func-camera-facing-orbiter ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (new 'stack-no-clear 'quaternion))) + 0.0 + (quaternion<-rotate-y-vector s5-0 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> arg1 rotvel3d))) + (let ((f0-2 (- (camera-angle) (quaternion-xz-angle s5-0)))) + (quaternion-rotate-y! (-> arg1 rotvel3d) (-> arg1 rotvel3d) f0-2) + ) + ) + ) + +(define *particle-quat* (new 'static 'quaternion :w 1.0)) + +(defun birth-func-set-quat ((arg0 int) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (local-vars (a0-2 float) (a0-3 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((a0-1 arg2) + (v1-0 *particle-quat*) + ) + (cond + ((< (-> v1-0 w) 0.0) + (.lvf vf1 (&-> a0-1 conerot quad)) + (.lvf vf2 (&-> v1-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> a0-1 conerot quad) vf1) + (.mov a0-2 vf1) + ) + (else + (.lvf vf1 (&-> a0-1 conerot quad)) + (.lvf vf2 (&-> v1-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> a0-1 conerot quad) vf1) + (.mov a0-3 vf1) + ) + ) + ) + 0 + (none) + ) + ) + +(define *particle-vel* (new 'static 'vector :w 1.0)) + +(defun birth-func-set-vel ((arg0 object) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((v1-0 *particle-vel*)) + (set! (-> arg1 vel-sxvel x) (-> v1-0 x)) + (set! (-> arg1 vel-sxvel y) (-> v1-0 y)) + (set! (-> arg1 vel-sxvel z) (-> v1-0 z)) + ) + 0 + (none) + ) + +(defun birth-func-texture-group ((arg0 int) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (the-as (array int32) (-> arg1 user-float)))) + (when (nonzero? s5-0) + (let* ((s4-0 (+ (-> s5-0 length) -3)) + (v1-3 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) s4-0) 3)) + (a1-1 (-> s5-0 v1-3)) + ) + (set! (-> arg1 user1-int16) (the-as uint (+ v1-3 -3))) + (if (nonzero? a1-1) + (particle-adgif-callback (-> arg1 adgif) (the-as texture-id a1-1)) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: new jak 2 until loop case, check carefully +(defmethod get-field-spec-by-id ((this sparticle-launcher) (arg0 sp-field-id)) + "Look up a field's init spec by ID number." + (let ((v1-0 0)) + (until #f + (let ((a2-2 (-> this init-specs v1-0 field))) + (cond + ((= a2-2 arg0) + (return (-> this init-specs v1-0)) + ) + ((or (< (the-as uint arg0) (the-as uint a2-2)) (= a2-2 (sp-field-id spt-end))) + (return (the-as sp-field-init-spec #f)) + ) + (else + (+! v1-0 1) + ) + ) + ) + ) + ) + (the-as sp-field-init-spec #f) + ) + +(defmethod setup-special-textures ((this sparticle-launcher) (arg0 string)) + "Set the particle's texture to the texture with the given name, and convert userdata strings to textures." + (let ((s5-0 (get-field-spec-by-id this (sp-field-id spt-texture))) + (v1-1 (lookup-texture-id-by-name arg0 (the-as string #f))) + ) + (if s5-0 + (set! (-> s5-0 initial-valuef) (the-as float v1-1)) + ) + ) + (let ((v1-3 (get-field-spec-by-id this (sp-field-id spt-userdata)))) + (when (and v1-3 (= (-> v1-3 flags) (sp-flag object))) + (let ((gp-1 (the-as (array int32) (-> v1-3 initial-valuef)))) + (when (and (= (logand (the-as int gp-1) 7) 4) (type? gp-1 array) (logtest? (-> gp-1 1) 128)) + (set! (-> gp-1 0) (/ (-> gp-1 0) 8)) + (set! (-> gp-1 1) (/ (logand (-> gp-1 1) 8) 8)) + (set! (-> gp-1 2) (/ (-> gp-1 2) 8)) + (set! (-> gp-1 content-type) int32) + (dotimes (s5-1 (+ (-> gp-1 length) -3)) + (set! (-> gp-1 (+ s5-1 3)) + (the-as int (lookup-texture-id-by-name (the-as string (-> gp-1 (+ s5-1 3))) (the-as string #f))) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch degrees vs none. +(defun rot-to-particle ((arg0 degrees) (arg1 sprite-vec-data-2d) (arg2 matrix)) + (logand! (-> arg1 flag) -49) + (let ((v1-4 (the int (* 0.000061035156 (+ 32768.0 arg0))))) + (if (or (zero? v1-4) (= v1-4 3)) + (logior! (-> arg1 flag) 32) + ) + ) + (set! (-> arg1 flag-rot-sy z) arg0) + (none) + ) + +(defun birth-func-flip-based-on-scale ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (when (< (-> arg2 x-y-z-sx w) 0.0) + (set! (-> arg2 qx-qy-qz-sy x) (the-as float (logior (the-as int (-> arg2 qx-qy-qz-sy x)) 16))) + (set! (-> arg2 x-y-z-sx w) (* -1.0 (-> arg2 x-y-z-sx w))) + ) + (when (< (-> arg2 qx-qy-qz-sy w) 0.0) + (set! (-> arg2 qx-qy-qz-sy x) (the-as float (logior (the-as int (-> arg2 qx-qy-qz-sy x)) 32))) + (set! (-> arg2 qx-qy-qz-sy w) (* -1.0 (-> arg2 qx-qy-qz-sy w))) + ) + 0 + (none) + ) + +(defun sparticle-2d-spline-align ((arg0 object) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d) (arg3 object)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 x) (-> arg1 vel-sxvel x)) + (set! (-> s3-0 y) (-> arg1 vel-sxvel y)) + (set! (-> s3-0 z) (-> arg1 vel-sxvel z)) + (set! (-> s3-0 w) 1.0) + (let ((f30-0 (-> arg2 flag-rot-sy z))) + (vector-normalize! s3-0 1.0) + (let ((s5-0 deg-seek) + (s4-0 f30-0) + ) + 0.0 + (let ((a0-2 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-1 (new 'stack-no-clear 'vector))) + (let ((f0-7 (vector-dot a0-2 s3-0))) + (vector-float*! v1-1 a0-2 f0-7) + ) + (vector-! s3-0 s3-0 v1-1) + ) + ) + (let ((a2-2 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s3-0 s3-0 a2-2) + ) + (let* ((a1-11 (the float (sar (shl (the int (atan (-> s3-0 y) (* -1.0 (-> s3-0 x)))) 48) 48))) + (a2-3 (* 65536.0 (seconds-per-frame))) + (f0-17 (s5-0 s4-0 a1-11 a2-3)) + ) + (rot-to-particle f0-17 arg2 (the-as matrix a2-3)) + ) + ) + ) + ) + 0 + (none) + ) + +(defun sparticle-2d-spline-align-instant ((arg0 object) (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) + (-> arg2 flag-rot-sy z) + (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)))) + (rot-to-particle f0-16 arg2 a2-2) + ) + ) + ) + 0 + (none) + ) + +(defun birth-func-inherit-size ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (let ((v1-1 (-> arg4 sprite sprite))) + (set! (-> arg2 x-y-z-sx w) (* (-> v1-1 x-y-z-sx w) (-> arg2 x-y-z-sx w))) + (set! (-> arg2 qx-qy-qz-sy w) (* (-> v1-1 flag-rot-sy w) (-> arg2 qx-qy-qz-sy w))) + ) + 0 + (none) + ) + +(defun birth-func-texture-group-2d ((arg0 object) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group (the-as int arg0) arg1 arg2) + 0 + (none) + ) + +(defun birth-func-set-vel-2d ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((v1-0 *particle-vel*)) + (set! (-> arg1 vel-sxvel x) (-> v1-0 x)) + (set! (-> arg1 vel-sxvel y) (-> v1-0 y)) + (set! (-> arg1 vel-sxvel z) (-> v1-0 z)) + ) + 0 + (none) + ) + +(defun sparticle-3d-rotate-xz-to-camera ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-3d)) + (local-vars (v1-4 float) (v1-5 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (new 'stack-no-clear 'vector) + (-> arg1 key proc) + (let ((a0-1 (math-camera-matrix)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> a0-1 rvec quad)) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + (let ((a1-3 (matrix-fr-compose (new 'stack-no-clear 'matrix) s5-0 *up-vector*)) + (s5-1 (new 'stack-no-clear 'quaternion)) + ) + (matrix->quaternion s5-1 a1-3) + (cond + ((< (-> s5-1 w) 0.0) + (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) + (.mov v1-4 vf1) + ) + (else + (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) + (.mov v1-5 vf1) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod init-with-vec! ((this sparticle-subsampler) (arg0 vector)) + (let ((f30-0 (-> this spt-num))) + (when (not (-> this inited?)) + (set! (-> this spawn-mat trans quad) (-> arg0 quad)) + (set! (-> this inited?) #t) + (set! f30-0 0.000000000000000000000000000000000000000000001) + ) + (set! (-> this sp-launcher birthaccum) 0.0) + (let ((f28-0 (/ 1.0 f30-0))) + 0.0 + (let ((s4-0 (new 'stack-no-clear 'matrix))) + (let* ((a2-0 s4-0) + (a3-0 (-> this spawn-mat)) + (v1-8 (-> a3-0 rvec quad)) + (a0-3 (-> a3-0 uvec quad)) + (a1-1 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> a2-0 rvec quad) v1-8) + (set! (-> a2-0 uvec quad) a0-3) + (set! (-> a2-0 fvec quad) a1-1) + (set! (-> a2-0 trans quad) a3-1) + ) + (dotimes (s3-0 (the int f30-0)) + (let ((f0-5 (* f28-0 (the float s3-0)))) + (vector-lerp! (-> s4-0 trans) arg0 (-> this spawn-mat trans) f0-5) + ) + (launch-particles :system (-> this sp-system) (-> this sp-launcher) s4-0 :origin-is-matrix #t) + ) + ) + ) + ) + (let ((v0-2 (-> this spawn-mat trans))) + (set! (-> v0-2 quad) (-> arg0 quad)) + v0-2 + ) + ) + +(defmethod init-with-mat! ((this sparticle-subsampler) (arg0 matrix)) + (when (not (-> this inited?)) + (let* ((a2-0 (-> this spawn-mat)) + (a3-0 arg0) + (v1-2 (-> a3-0 rvec quad)) + (a0-1 (-> a3-0 uvec quad)) + (a1-1 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> a2-0 rvec quad) v1-2) + (set! (-> a2-0 uvec quad) a0-1) + (set! (-> a2-0 fvec quad) a1-1) + (set! (-> a2-0 trans quad) a3-1) + ) + (set! (-> this inited?) #t) + ) + (set! (-> this sp-launcher birthaccum) 0.0) + (let ((f30-0 (/ 1.0 (-> this spt-num)))) + 0.0 + (let ((s4-0 (new 'stack-no-clear 'matrix))) + (let* ((a2-1 s4-0) + (a3-2 arg0) + (v1-6 (-> a3-2 rvec quad)) + (a0-2 (-> a3-2 uvec quad)) + (a1-2 (-> a3-2 fvec quad)) + (a3-3 (-> a3-2 trans quad)) + ) + (set! (-> a2-1 rvec quad) v1-6) + (set! (-> a2-1 uvec quad) a0-2) + (set! (-> a2-1 fvec quad) a1-2) + (set! (-> a2-1 trans quad) a3-3) + ) + (dotimes (s3-0 (the int (-> this spt-num))) + (let ((f0-5 (* f30-0 (the float s3-0)))) + (vector-lerp! (-> s4-0 trans) (-> arg0 trans) (-> this spawn-mat trans) f0-5) + ) + (launch-particles :system (-> this sp-system) (-> this sp-launcher) s4-0 :origin-is-matrix #t) + ) + ) + ) + (let ((v0-2 (-> this spawn-mat))) + (let ((v1-10 (-> arg0 rvec quad)) + (a0-5 (-> arg0 uvec quad)) + (a1-5 (-> arg0 fvec quad)) + (a2-4 (-> arg0 trans quad)) + ) + (set! (-> v0-2 rvec quad) v1-10) + (set! (-> v0-2 uvec quad) a0-5) + (set! (-> v0-2 fvec quad) a1-5) + (set! (-> v0-2 trans quad) a2-4) + ) + v0-2 + ) + ) + +(defun spt-func-relative-pos ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-3d)) + (local-vars + (sv-256 vector) + (sv-260 vector) + (sv-264 vector) + (sv-268 matrix) + (sv-272 matrix) + (sv-276 matrix) + (sv-280 matrix) + (sv-284 matrix) + ) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 x) (-> arg2 x-y-z-sx x)) + (set! (-> v1-0 y) (-> arg2 x-y-z-sx y)) + (set! (-> v1-0 z) (-> arg2 x-y-z-sx z)) + (set! (-> v1-0 w) 1.0) + (set! sv-256 v1-0) + ) + (let ((v1-1 (new 'stack-no-clear 'vector))) + (set! (-> v1-1 x) (-> arg1 vel-sxvel x)) + (set! (-> v1-1 y) (-> arg1 vel-sxvel y)) + (set! (-> v1-1 z) (-> arg1 vel-sxvel z)) + (set! (-> v1-1 w) 1.0) + (set! sv-260 v1-1) + ) + (let ((v1-2 (new 'stack-no-clear 'vector))) + (set! (-> v1-2 x) (-> arg1 acc x)) + (set! (-> v1-2 y) (-> arg1 acc y)) + (set! (-> v1-2 z) (-> arg1 acc z)) + (set! (-> v1-2 w) 1.0) + (set! sv-264 v1-2) + ) + (set! sv-268 (-> arg1 key local-space-binding mat-prev)) + (set! sv-272 (-> arg1 key local-space-binding mat-new)) + (set! sv-276 (new 'stack-no-clear 'matrix)) + (set! sv-280 (new 'stack-no-clear 'matrix)) + (set! sv-284 (new 'stack-no-clear 'matrix)) + (let* ((a2-1 sv-280) + (a3-0 sv-268) + (v1-12 (-> a3-0 rvec quad)) + (a0-4 (-> a3-0 uvec quad)) + (a1-1 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> a2-1 rvec quad) v1-12) + (set! (-> a2-1 uvec quad) a0-4) + (set! (-> a2-1 fvec quad) a1-1) + (set! (-> a2-1 trans quad) a3-1) + ) + (let* ((a2-2 sv-284) + (a3-2 sv-272) + (v1-13 (-> a3-2 rvec quad)) + (a0-5 (-> a3-2 uvec quad)) + (a1-2 (-> a3-2 fvec quad)) + (a3-3 (-> a3-2 trans quad)) + ) + (set! (-> a2-2 rvec quad) v1-13) + (set! (-> a2-2 uvec quad) a0-5) + (set! (-> a2-2 fvec quad) a1-2) + (set! (-> a2-2 trans quad) a3-3) + ) + (dotimes (s4-0 3) + (vector-normalize! (the-as vector (&-> sv-280 quad s4-0)) 1.0) + (vector-normalize! (the-as vector (&-> sv-284 quad s4-0)) 1.0) + ) + (set! (-> sv-256 w) 1.0) + (set! (-> sv-260 w) 0.0) + (set! (-> sv-264 w) 0.0) + (let ((a1-6 (matrix-inverse-of-rot-trans! (new 'stack-no-clear 'matrix) sv-280))) + (matrix*! sv-276 a1-6 sv-284) + ) + (vector-matrix*! sv-256 sv-256 sv-276) + (set! (-> arg2 x-y-z-sx x) (-> sv-256 x)) + (set! (-> arg2 x-y-z-sx y) (-> sv-256 y)) + (set! (-> arg2 x-y-z-sx z) (-> sv-256 z)) + (-> arg2 x-y-z-sx) + (vector-matrix*! sv-260 sv-260 sv-276) + (set! (-> arg1 vel-sxvel x) (-> sv-260 x)) + (set! (-> arg1 vel-sxvel y) (-> sv-260 y)) + (set! (-> arg1 vel-sxvel z) (-> sv-260 z)) + (-> arg1 vel-sxvel) + (vector-matrix*! sv-264 sv-264 sv-276) + (set! (-> arg1 acc x) (-> sv-264 x)) + (set! (-> arg1 acc y) (-> sv-264 y)) + (set! (-> arg1 acc z) (-> sv-264 z)) + (-> arg1 acc) + 0 + (none) + ) + +(defun spt-func-turn-to-vel-radial ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-3d)) + (local-vars (v1-5 float) (v1-6 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (new 'stack-no-clear 'vector) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> arg1 vel-sxvel quad)) + (let ((s3-0 (-> arg1 key proc))) + (vector-normalize! s5-0 1.0) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (v1-4 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-4 x) (-> arg2 x-y-z-sx x)) + (set! (-> v1-4 y) (-> arg2 x-y-z-sx y)) + (set! (-> v1-4 z) (-> arg2 x-y-z-sx z)) + (set! (-> v1-4 w) 1.0) + (let ((s4-1 (vector-! s4-0 v1-4 (-> s3-0 root trans))) + (s3-1 (new 'stack-no-clear 'matrix)) + ) + (set! (-> s4-1 y) 0.0) + (vector-rotate-around-y! s4-1 s4-1 16384.0) + (vector-normalize! s4-1 1.0) + (matrix-f-r-compose s3-1 s5-0 s4-1) + (let ((s5-1 (new 'stack-no-clear 'quaternion))) + (matrix->quaternion s5-1 s3-1) + (cond + ((< (-> s5-1 w) 0.0) + (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) + (.mov v1-5 vf1) + ) + (else + (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) + (.mov v1-6 vf1) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) diff --git a/goal_src/jak3/engine/gfx/sprite/particles/sparticle.gc b/goal_src/jak3/engine/gfx/sprite/particles/sparticle.gc index 0197a0dce9..7dcd32e7ed 100644 --- a/goal_src/jak3/engine/gfx/sprite/particles/sparticle.gc +++ b/goal_src/jak3/engine/gfx/sprite/particles/sparticle.gc @@ -7,3 +7,683 @@ ;; DECOMP BEGINS +;; WARN: Return type mismatch object vs sparticle-cpuinfo. +(defmethod print ((this sparticle-cpuinfo)) + (format #t "~%") + (dotimes (s5-0 16) + (format #t "~D:~F~%" s5-0 (the-as float (-> this data s5-0))) + ) + (format #t "TIMER:~D~%" (-> this timer)) + (the-as sparticle-cpuinfo (format #t "FLAGS:~X~%" (-> this flags))) + ) + +;; WARN: Return type mismatch (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d uint none) vs none. +(defun sp-particle-copy! ((arg0 sparticle-cpuinfo) (arg1 sparticle-cpuinfo)) + (let ((v1-1 (-> arg1 sprite x-y-z-sx quad))) + (set! (-> arg0 sprite x-y-z-sx quad) v1-1) + ) + (let ((v1-3 (-> arg1 sprite flag-rot-sy quad))) + (set! (-> arg0 sprite flag-rot-sy quad) v1-3) + ) + (let ((v1-5 (-> arg1 sprite r-g-b-a quad))) + (set! (-> arg0 sprite r-g-b-a quad) v1-5) + ) + (dotimes (v1-6 10) + (set! (-> arg0 adgif prims v1-6) (-> arg1 adgif prims v1-6)) + ) + (set! (-> arg0 vel-sxvel quad) (-> arg1 vel-sxvel quad)) + (set! (-> arg0 rot-syvel quad) (-> arg1 rot-syvel quad)) + (set! (-> arg0 fade quad) (-> arg1 fade quad)) + (set! (-> arg0 acc quad) (-> arg1 acc quad)) + (set! (-> arg0 friction) (-> arg1 friction)) + (set! (-> arg0 timer) (-> arg1 timer)) + (set! (-> arg0 flags) (-> arg1 flags)) + (set! (-> arg0 user-float) (-> arg1 user-float)) + (set! (-> arg0 sp-func) (-> arg1 sp-func)) + (none) + ) + +(defmethod new sparticle-system ((allocation symbol) + (type-to-make type) + (arg0 int) + (arg1 int) + (arg2 symbol) + (arg3 pointer) + (arg4 (inline-array adgif-shader)) + ) + (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (let* ((v1-3 (/ (+ arg0 63) 64)) + (a0-2 (/ (+ arg1 63) 64)) + (a1-2 (* v1-3 64)) + (a2-2 (* a0-2 64)) + (s2-1 (+ v1-3 a0-2)) + (s5-1 (+ a1-2 a2-2)) + ) + (set! (-> gp-0 blocks 0) v1-3) + (set! (-> gp-0 length 0) a1-2) + (set! (-> gp-0 num-alloc 0) 0) + (set! (-> gp-0 blocks 1) a0-2) + (set! (-> gp-0 length 1) a2-2) + (set! (-> gp-0 num-alloc 1) 0) + (set! (-> gp-0 is-3d) (the-as basic arg2)) + (set! (-> gp-0 alloc-table) (the-as (pointer uint64) (malloc 'global (* s2-1 8)))) + (set! (-> gp-0 cpuinfo-table) (the-as (inline-array sparticle-cpuinfo) (malloc 'global (* 144 s5-1)))) + (set! (-> gp-0 vecdata-table) arg3) + (set! (-> gp-0 adgifdata-table) arg4) + (dotimes (v1-5 s2-1) + (set! (-> gp-0 alloc-table v1-5) (the-as uint -1)) + ) + (dotimes (s4-1 s5-1) + (set! (-> gp-0 cpuinfo-table s4-1 valid) (the-as uint 0)) + (set! (-> gp-0 cpuinfo-table s4-1 sprite) + (the-as sprite-vec-data-2d (&+ (-> gp-0 vecdata-table) (* 48 s4-1))) + ) + (set! (-> gp-0 cpuinfo-table s4-1 adgif) (-> gp-0 adgifdata-table s4-1)) + (adgif-shader<-texture-simple! (-> gp-0 adgifdata-table s4-1) (the-as texture #f)) + (set! (-> gp-0 adgifdata-table s4-1 alpha) (new 'static 'gs-miptbp :tbp1 #x48)) + ) + ) + gp-0 + ) + ) + +(kmemopen global "part-systems") + +(define *sp-particle-system-2d* + (new 'global 'sparticle-system 1920 128 #f (-> *sprite-array-2d* vec-data) (-> *sprite-array-2d* adgif-data)) + ) + +(define *sp-particle-system-3d* + (new 'global 'sparticle-system 256 0 #t (-> *sprite-array-3d* vec-data) (-> *sprite-array-3d* adgif-data)) + ) + +(kmemclose) + +(defun sp-get-block-size ((arg0 sparticle-system) (arg1 int)) + (let ((v0-0 0)) + (let ((v1-0 0) + (a2-0 (-> arg0 blocks 0)) + ) + (when (= arg1 1) + (set! v1-0 a2-0) + (set! a2-0 (-> arg0 blocks 1)) + ) + (dotimes (a1-3 a2-0) + (if (!= (-> arg0 alloc-table (+ v1-0 a1-3)) -1) + (set! v0-0 (+ a1-3 1)) + ) + ) + ) + v0-0 + ) + ) + +(defun sp-get-approx-alloc-size ((arg0 sparticle-system) (arg1 int)) + (let ((a3-0 arg1) + (v1-0 0) + ) + (let ((a1-1 0) + (a2-0 (-> arg0 blocks 0)) + ) + (when (= a3-0 1) + (set! a1-1 a2-0) + (set! a2-0 (-> arg0 blocks 1)) + ) + (dotimes (a3-3 a2-0) + (if (!= (-> arg0 alloc-table (+ a1-1 a3-3)) -1) + (set! v1-0 (+ a3-3 1)) + ) + ) + ) + (* v1-0 64) + ) + ) + +(defun sp-free-particle ((arg0 sparticle-system) (arg1 int) (arg2 sparticle-cpuinfo) (arg3 sprite-vec-data-2d)) + (if (and (-> arg2 binding) (nonzero? (-> arg2 binding))) + (logclear! (-> arg2 binding flags) (sp-launch-state-flags sp0 sp1)) + ) + (let ((v1-6 (/ arg1 64)) + (t0-4 (logand arg1 63)) + ) + (logior! (-> arg0 alloc-table v1-6) (ash 1 t0-4)) + ) + (if (< arg1 (-> arg0 length 0)) + (+! (-> arg0 num-alloc 0) -1) + (+! (-> arg0 num-alloc 1) -1) + ) + (set! (-> arg2 valid) (the-as uint 0)) + (set! (-> arg3 r-g-b-a w) 0.0) + 0 + (none) + ) + +;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2] +;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2] +;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2] +;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2] +;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2] +;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t2, t1] +(defun sp-get-particle ((arg0 sparticle-system) (arg1 int) (arg2 sparticle-launch-state)) + (local-vars + (a2-3 int) + (a2-4 int) + (a2-5 int) + (a2-6 int) + (a2-7 int) + (a2-8 int) + (t1-16 int) + (t1-17 int) + (t1-18 int) + (t1-19 int) + (t1-20 int) + (t3-5 int) + ) + (let ((v1-0 0) + (t0-0 (-> arg0 blocks 0)) + (a3-0 0) + ) + (when (= arg1 1) + (set! v1-0 t0-0) + (set! t0-0 (-> arg0 blocks 1)) + ) + (when arg2 + (set! a3-0 (the-as int (-> arg2 randomize))) + (+! (-> arg2 randomize) 1) + (when (= (-> arg2 randomize) t0-0) + (set! (-> arg2 randomize) (the-as uint 0)) + 0 + ) + ) + (dotimes (a2-1 t0-0) + (when (nonzero? (-> arg0 alloc-table (+ v1-0 a3-0))) + (let ((a2-2 0) + (t1-15 (-> arg0 alloc-table (+ v1-0 a3-0))) + (t0-4 (* (+ v1-0 a3-0) 64)) + ) + 0 + 0 + (let ((t2-4 (shl t1-15 32)) + (t3-0 (+ a2-2 32)) + ) + (move-if-not-zero t1-16 t2-4 t2-4 t1-15) + (.movz a2-3 t3-0 t2-4 a2-2) + ) + (let ((t2-5 (shl t1-16 16)) + (t3-1 (+ a2-3 16)) + ) + (move-if-not-zero t1-17 t2-5 t2-5 t1-16) + (.movz a2-4 t3-1 t2-5 a2-3) + ) + (let ((t2-6 (* t1-17 256)) + (t3-2 (+ a2-4 8)) + ) + (move-if-not-zero t1-18 t2-6 t2-6 t1-17) + (.movz a2-5 t3-2 t2-6 a2-4) + ) + (let ((t2-7 (* t1-18 16)) + (t3-3 (+ a2-5 4)) + ) + (move-if-not-zero t1-19 t2-7 t2-7 t1-18) + (.movz a2-6 t3-3 t2-7 a2-5) + ) + (let ((t2-8 (* t1-19 4)) + (t3-4 (+ a2-6 2)) + ) + (move-if-not-zero t1-20 t2-8 t2-8 t1-19) + (.movz a2-7 t3-4 t2-8 a2-6) + (let ((t1-21 (* t1-20 2)) + (t2-9 (+ a2-7 1)) + ) + (move-if-not-zero t3-5 t1-21 t1-21 t3-4) + (.movz a2-8 t2-9 t1-21 a2-7) + ) + ) + (let ((t0-5 (+ t0-4 a2-8))) + (logxor! (-> arg0 alloc-table (+ v1-0 a3-0)) (the-as uint (ash 1 a2-8))) + (+! (-> arg0 num-alloc arg1) 1) + (let ((v1-9 (-> arg0 cpuinfo-table t0-5))) + (set! (-> v1-9 valid) (the-as uint 1)) + (return v1-9) + ) + ) + ) + ) + (+! a3-0 1) + (if (= a3-0 t0-0) + (set! a3-0 0) + ) + ) + ) + (the-as sparticle-cpuinfo #f) + ) + +(defun sp-kill-particle ((arg0 sparticle-system) (arg1 sparticle-cpuinfo)) + (cond + ;; og:preserve-this + ((in-scratchpad? arg1) + (set! (-> arg1 timer) 0) + 0 + ) + (else + (let ((a2-1 (/ (the-as int (- (the-as uint arg1) (the-as uint (the-as uint (-> arg0 cpuinfo-table 0))))) 144))) + (when (or (< a2-1 0) (>= a2-1 (+ (-> arg0 length 0) (-> arg0 length 1)))) + (format 0 "Tried to release particle ~D~%" a2-1) + (return #f) + ) + (sp-free-particle arg0 a2-1 arg1 (-> arg1 sprite)) + ) + ) + ) + #t + ) + +(defun sp-orbiter ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let* ((f2-0 (-> arg1 omega)) + (f0-0 (-> arg1 radius)) + (f3-0 (-> arg1 vel-sxvel x)) + (f30-0 (-> arg1 vel-sxvel y)) + (f1-0 (-> arg1 vel-sxvel z)) + (f4-0 (-> *display* clock (-> arg1 clock-index) sparticle-data y)) + (f26-0 (+ f2-0 (* f3-0 f4-0))) + ) + (set! (-> arg1 omega) f26-0) + (let ((f28-0 (+ f0-0 (* f1-0 f4-0)))) + (set! (-> arg1 radius) f28-0) + (let ((f24-0 (sin f26-0)) + (f26-1 (cos f26-0)) + (f22-0 (sin (* 0.5 f30-0))) + (f0-5 (cos (* 0.5 f30-0))) + (a2-1 (new 'stack-no-clear 'quaternion)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (let ((s3-0 (new 'stack-no-clear 'matrix))) + (set-vector! a2-1 (* f22-0 f26-1) 0.0 (* f22-0 f24-0) f0-5) + (quaternion*! (-> arg1 rotvel3d) (-> arg1 rotvel3d) a2-1) + (quaternion-normalize! (-> arg1 rotvel3d)) + (set-vector! s4-0 (* f24-0 f28-0) 0.0 (* f26-1 f28-0) 1.0) + (quaternion->matrix s3-0 (-> arg1 rotvel3d)) + (vector-matrix*! s4-0 s4-0 s3-0) + ) + (let ((v1-8 (the-as sprite-vec-data-2d (-> arg1 user-float)))) + (set! (-> arg2 x) (+ (-> s4-0 x) (-> v1-8 x-y-z-sx x))) + (set! (-> arg2 y) (+ (-> s4-0 y) (-> v1-8 x-y-z-sx y))) + (set! (-> arg2 z) (+ (-> s4-0 z) (-> v1-8 x-y-z-sx z))) + ) + ) + ) + ) + 0 + (none) + ) + +(def-mips2c sp-process-block-2d (function sparticle-system int int int int symbol none)) + +(def-mips2c sp-process-block-3d (function sparticle-system int int int int symbol none)) + +(defun sp-copy-to-spr ((arg0 int) (arg1 pointer) (arg2 int)) + (let ((a2-1 (/ (+ arg2 15) 16))) + ;; og:preserve-this + ; (dma-send-to-spr-no-flush (the-as uint arg0) (the-as uint arg1) (the-as uint a2-1) #t) + (__mem-move (&+ (scratchpad-start) arg0) arg1 (the uint (* a2-1 16))) + ) + 0 + (none) + ) + +(defun sp-copy-from-spr ((arg0 int) (arg1 pointer) (arg2 int)) + (let ((a2-1 (/ (+ arg2 15) 16))) + ;; og:preserve-this + ; (dma-send-from-spr-no-flush (the-as uint arg1) (the-as uint arg0) (the-as uint a2-1) #t) + (__mem-move arg1 (&+ (scratchpad-start) arg0) (the uint (* a2-1 16))) + ) + 0 + (none) + ) + +;; ERROR: function was not converted to expressions. Cannot decompile. + +(defun sp-process-block ((arg0 sparticle-system) (arg1 int) (arg2 sprite-array-2d) (arg3 int)) + (local-vars (sv-16 int) (sv-32 int) (sv-48 int) (sv-64 int)) + (let ((s3-0 352) + (s2-0 (* 144 arg3)) + (s5-0 (* 48 arg3)) + ) + (set! sv-32 (* 80 arg3)) + (let ((s1-0 (+ s3-0 s2-0))) + (set! sv-16 (+ s1-0 s5-0)) + (sp-copy-to-spr s3-0 (the-as pointer (-> arg0 cpuinfo-table arg1)) s2-0) + (sp-copy-to-spr s1-0 (&+ (-> arg0 vecdata-table) (* 48 arg1)) s5-0) + (let ((t9-2 sp-copy-to-spr) + (a1-7 (-> arg0 adgifdata-table arg1)) + ) + (t9-2 sv-16 (the-as pointer a1-7) sv-32) + ) + ;; og:preserve-this + (set! sv-48 (+ (the int (scratchpad-start)) s3-0)) + (set! sv-64 (+ (the int (scratchpad-start)) s1-0)) + (let ((t1-0 (paused?))) + (cond + ((-> arg0 is-3d) + (let ((t9-4 sp-process-block-3d) + (a0-6 arg0) + (a3-1 arg1) + ) + (t9-4 a0-6 sv-48 sv-64 a3-1 arg3 t1-0) + ) + ) + (else + (sp-process-block-2d arg0 sv-48 sv-64 arg1 arg3 t1-0) + ) + ) + ) + (sp-copy-from-spr s3-0 (the-as pointer (-> arg0 cpuinfo-table arg1)) s2-0) + (sp-copy-from-spr s1-0 (&+ (-> arg0 vecdata-table) (* 48 arg1)) s5-0) + ) + ) + 0 + (none) + ) + +(defun sp-process-particle-system ((arg0 sparticle-system) (arg1 int) (arg2 sprite-array-2d)) + (countdown (v1-0 22) + (let ((a0-4 (-> *display* clock v1-0 sparticle-data quad))) + ;; og:preserve-this + (set! (-> (the-as vector (+ (the int (scratchpad-start)) (* v1-0 16))) quad) a0-4) + ) + ) + (let* ((v1-3 352) + (s1-0 (/ (- #x4000 v1-3) 272)) + (s2-0 0) + (s3-0 (sp-get-approx-alloc-size arg0 arg1)) + ) + (if (= arg1 1) + (set! s2-0 (* (-> arg0 blocks 0) 64)) + ) + (set! (-> arg2 num-valid arg1) s3-0) + (flush-cache 0) + (while (>= s3-0 s1-0) + (sp-process-block arg0 s2-0 arg2 s1-0) + (set! s3-0 (- s3-0 s1-0)) + (+! s2-0 s1-0) + ) + (if (> s3-0 0) + (sp-process-block arg0 s2-0 arg2 s3-0) + ) + ) + 0 + (none) + ) + +(define-perm *particles-flag* symbol #t) + +(defun forall-particles-with-key-runner ((arg0 sparticle-launch-control) + (arg1 (function sparticle-system sparticle-cpuinfo none)) + (arg2 sparticle-system) + ) + (local-vars (sv-16 int)) + (let ((s3-0 (the-as object (-> arg2 cpuinfo-table 0))) + (s2-0 (&+ (-> arg2 vecdata-table) 0)) + (s1-0 (+ (-> arg2 blocks 0) (-> arg2 blocks 1))) + ) + (dotimes (s0-0 s1-0) + (cond + ((!= (-> arg2 alloc-table s0-0) -1) + (set! sv-16 0) + (while (< sv-16 64) + (if (and (nonzero? (-> (the-as sparticle-cpuinfo s3-0) valid)) (= (-> (the-as sparticle-cpuinfo s3-0) key) arg0)) + (arg1 arg2 (the-as sparticle-cpuinfo s3-0)) + ) + (set! s3-0 (-> (the-as (inline-array sparticle-cpuinfo) s3-0) 1)) + (&+! s2-0 48) + (set! sv-16 (+ sv-16 1)) + ) + ) + (else + (set! s3-0 (-> (the-as (inline-array sparticle-cpuinfo) s3-0) 64)) + (&+! s2-0 3072) + ) + ) + ) + ) + 0 + (none) + ) + +(defun forall-particles-with-key ((arg0 sparticle-launch-control) + (arg1 (function sparticle-system sparticle-cpuinfo none)) + (arg2 symbol) + (arg3 symbol) + ) + (if arg2 + (forall-particles-with-key-runner arg0 arg1 *sp-particle-system-2d*) + ) + (if arg3 + (forall-particles-with-key-runner arg0 arg1 *sp-particle-system-3d*) + ) + 0 + (none) + ) + +(defun sparticle-kill-it ((arg0 sparticle-system) (arg1 sparticle-cpuinfo)) + (set! (-> arg1 timer) 0) + (set! (-> arg1 sp-func) (the-as (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d uint none) 0)) + (when (and (-> arg1 binding) (nonzero? (-> arg1 binding))) + (logclear! (-> arg1 binding flags) (sp-launch-state-flags sp0 sp1)) + (set! (-> arg1 binding) #f) + ) + 0 + (none) + ) + +(define *sparticle-kill-it-level* 0) + +(defun sparticle-kill-it-level ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 pointer)) + (if (= (logand (shr (the-as int (-> arg1 flags)) 9) 15) *sparticle-kill-it-level*) + (sparticle-kill-it arg0 arg1) + ) + 0 + (none) + ) + +(defun sparticle-60-to-50 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 pointer)) + (let ((gp-0 (-> arg1 rotvel3d)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (vector-angle<-quaternion! s5-0 gp-0) + (set! (-> s5-0 w) (* 12516.455 (-> s5-0 w))) + (quaternion-vector-angle! gp-0 s5-0 (-> s5-0 w)) + ) + 0 + (none) + ) + +(defun sparticle-50-to-60 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 pointer)) + (let ((gp-0 (-> arg1 rotvel3d)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (vector-angle<-quaternion! s5-0 gp-0) + (set! (-> s5-0 w) (* 8691.982 (-> s5-0 w))) + (quaternion-vector-angle! gp-0 s5-0 (-> s5-0 w)) + ) + 0 + (none) + ) + +(defun kill-all-particles-with-key ((arg0 sparticle-launch-control)) + (forall-particles-with-key arg0 sparticle-kill-it #t #t) + 0 + (none) + ) + +(defun forall-particles-runner ((arg0 (function sparticle-system sparticle-cpuinfo pointer none)) (arg1 sparticle-system)) + (let ((s4-0 (the-as object (-> arg1 cpuinfo-table 0))) + (s3-0 (&+ (-> arg1 vecdata-table) 0)) + (s2-0 (+ (-> arg1 blocks 0) (-> arg1 blocks 1))) + ) + (dotimes (s1-0 s2-0) + (cond + ((!= (-> arg1 alloc-table s1-0) -1) + (dotimes (s0-0 64) + (if (nonzero? (-> (the-as sparticle-cpuinfo s4-0) valid)) + (arg0 arg1 (the-as sparticle-cpuinfo s4-0) s3-0) + ) + (set! s4-0 (+ (the-as uint s4-0) 144)) + (&+! s3-0 48) + ) + ) + (else + (set! s4-0 (&+ (the-as pointer s4-0) 9216)) + (&+! s3-0 3072) + ) + ) + ) + ) + 0 + (none) + ) + +(defun forall-particles ((arg0 function) (arg1 symbol) (arg2 symbol)) + (if arg1 + (forall-particles-runner + (the-as (function sparticle-system sparticle-cpuinfo pointer none) arg0) + *sp-particle-system-2d* + ) + ) + (if arg2 + (forall-particles-runner + (the-as (function sparticle-system sparticle-cpuinfo pointer none) arg0) + *sp-particle-system-3d* + ) + ) + 0 + (none) + ) + +(defun kill-all-particles-in-level ((arg0 level)) + (set! *sparticle-kill-it-level* (-> arg0 index)) + (forall-particles sparticle-kill-it-level #t #t) + 0 + ) + +(defun all-particles-50-to-60 () + (forall-particles-runner sparticle-50-to-60 *sp-particle-system-3d*) + (none) + ) + +(defun all-particles-60-to-50 () + (forall-particles-runner sparticle-60-to-50 *sp-particle-system-3d*) + (none) + ) + +;; WARN: Return type mismatch gs-miptbp vs none. +(defun remap-particle ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 pointer)) + (let* ((gp-0 (-> arg1 adgif)) + (a0-1 (-> gp-0 texture-id)) + (v1-0 (lookup-texture-by-id-fast a0-1)) + ) + (when v1-0 + (set! (-> gp-0 tex0 tbp0) (-> v1-0 dest 0)) + (set! (-> gp-0 tex0 cbp) (-> v1-0 clutdest)) + (set! (-> gp-0 miptbp1 tbp1) (-> v1-0 dest 1)) + (set! (-> gp-0 miptbp1 tbp2) (-> v1-0 dest 2)) + (set! (-> gp-0 miptbp1 tbp3) (-> v1-0 dest 3)) + ) + ) + (none) + ) + +(defun remap-all-particles () + (forall-particles remap-particle #t #t) + (none) + ) + +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 gp, Count] +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count] +(defun process-particles () + (local-vars (v1-53 int) (gp-0 int)) + (with-pp + (when *particles-flag* + 0 + 0 + (.mfc0 gp-0 Count) + (set! *sp-launcher-lock* #t) + (when *debug-segment* + (let ((s5-0 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-12 'particle) + (s4-0 *profile-particle-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s3-0 (-> s5-0 data (-> s5-0 count)))) + (let ((s2-0 (-> s5-0 base-time))) + (set! (-> s3-0 name) v1-12) + (set! (-> s3-0 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s2-0)))) + ) + (set! (-> s3-0 depth) (the-as uint (-> s5-0 depth))) + (set! (-> s3-0 color) s4-0) + (set! (-> s5-0 segment (-> s5-0 depth)) s3-0) + ) + (set! (-> s5-0 count) (min 1023 (+ (-> s5-0 count) 1))) + (+! (-> s5-0 depth) 1) + (set! (-> s5-0 max-depth) (max (-> s5-0 max-depth) (-> s5-0 depth))) + ) + ) + 0 + ) + (logand (the-as int (-> pp clock sparticle-data x)) 255) + (cond + (*sp-60-hz* + (when (= (-> *setting-control* user-current video-mode) 'pal) + (set! *sp-60-hz* #f) + (all-particles-60-to-50) + ) + ) + (else + (when (= (-> *setting-control* user-current video-mode) 'ntsc) + (set! *sp-60-hz* #t) + (all-particles-50-to-60) + ) + ) + ) + (clear-sprite-aux-list) + (sp-process-particle-system *sp-particle-system-2d* 0 *sprite-array-2d*) + (sp-process-particle-system *sp-particle-system-2d* 1 *sprite-array-2d*) + (sp-process-particle-system *sp-particle-system-3d* 0 (the-as sprite-array-2d *sprite-array-3d*)) + (when *debug-segment* + (let ((s5-1 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-47 (+ (-> s5-1 depth) -1)) + (s4-1 (-> s5-1 segment v1-47)) + (s3-1 (-> s5-1 base-time)) + ) + (when (>= v1-47 0) + (set! (-> s4-1 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-1)))) + (+! (-> s5-1 depth) -1) + ) + ) + ) + ) + 0 + ) + (set! *sp-launcher-lock* #f) + (sp-clear-queue) + (.mfc0 v1-53 Count) + (- v1-53 gp-0) + (when *display-sprite-info* + (if (movie?) + (format *stdcon* "~%~%~%") + ) + (format + *stdcon* + "2d: ~4d~100h3d: ~4d~200hwarp/glow: ~3D~350hhud:~3D~%" + (-> *sp-particle-system-2d* num-alloc 0) + (-> *sp-particle-system-3d* num-alloc 0) + (-> *sprite-aux-list* entry) + (-> *sp-particle-system-2d* num-alloc 1) + ) + ) + ) + 0 + (none) + ) + ) diff --git a/goal_src/jak3/engine/gfx/sprite/sprite-distort.gc b/goal_src/jak3/engine/gfx/sprite/sprite-distort.gc index 600e10634e..4c9387a76c 100644 --- a/goal_src/jak3/engine/gfx/sprite/sprite-distort.gc +++ b/goal_src/jak3/engine/gfx/sprite/sprite-distort.gc @@ -93,7 +93,7 @@ (none) ) -(define sprite-distort-vu1-block (new 'static 'vu-function :length 63 :qlength 32)) +(define sprite-distort-vu1-block (new 'static 'vu-function #|:length 63 :qlength 32|#)) (defun sprite-init-distorter ((arg0 dma-buffer)) "Generate DMA to initialize the distort renderer." @@ -111,6 +111,24 @@ ) (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) ) + ;; send current aspect used by the sine tables (PC only) + (#when PC_PORT + (let ((packet (the-as dma-packet (-> arg0 base)))) + (set! (-> packet dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc 1)) + (set! (-> packet vif0) (new 'static 'vif-tag)) + (set! (-> packet vif1) (new 'static 'vif-tag :cmd (vif-cmd pc-port))) + (&+! (-> arg0 base) 16) + ) + (let ((aspect-vec (the-as vector (-> arg0 base)))) + (set-vector! aspect-vec + (-> *sprite-distorter-sine-tables* aspx) + (-> *sprite-distorter-sine-tables* aspy) + 0.0 + 0.0 + ) + (&+! (-> arg0 base) 16) + ) + ) (let* ((v1-3 arg0) (a1-6 (the-as dma-packet (-> v1-3 base))) ) diff --git a/goal_src/jak3/engine/gfx/sprite/sprite-glow.gc b/goal_src/jak3/engine/gfx/sprite/sprite-glow.gc index 5a0813144e..23ea7cefa7 100644 --- a/goal_src/jak3/engine/gfx/sprite/sprite-glow.gc +++ b/goal_src/jak3/engine/gfx/sprite/sprite-glow.gc @@ -235,7 +235,8 @@ ) ) -(define sprite-glow-vu1-block (new 'static 'vu-function :length #x86 :qlength 67)) +;; og:preserve-this +(define sprite-glow-vu1-block (new 'static 'vu-function #|:length #x86 :qlength 67|#)) ;; WARN: Return type mismatch vector vs none. (defun sprite-glow-init-consts ((arg0 sprite-glow-consts)) diff --git a/goal_src/jak3/engine/gfx/sprite/sprite.gc b/goal_src/jak3/engine/gfx/sprite/sprite.gc index abff81bcd2..1fbf64c999 100644 --- a/goal_src/jak3/engine/gfx/sprite/sprite.gc +++ b/goal_src/jak3/engine/gfx/sprite/sprite.gc @@ -287,7 +287,7 @@ The glow and distort renderers will pull sprites from here." ) ) (set! (-> arg0 screen-shader prims 9) (gs-reg64 alpha-1)) - (set! (-> arg0 screen-shader alpha) (new 'static 'gs-alpha :b #x1 :d #x1)) + (set! (-> arg0 screen-shader alpha) (new 'static 'gs-miptbp :tbp1 #x44)) (set! (-> arg0 sincos-01 z) 0.999998) (set! (-> arg0 sincos-23 z) -0.16666014) (set! (-> arg0 sincos-45 z) 0.008326521) @@ -332,7 +332,7 @@ The glow and distort renderers will pull sprites from here." (none) ) -(define sprite-vu1-block (new 'static 'vu-function :length #x37b :qlength #x1be)) +(define sprite-vu1-block (new 'static 'vu-function #|:length #x37b :qlength #x1be|#)) (defmethod new sprite-array-2d ((allocation symbol) (type-to-make type) (arg0 int) (arg1 int)) (let* ((v1-0 (+ arg0 arg1)) @@ -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-funcs.gc b/goal_src/jak3/engine/gfx/texture/texture-anim-funcs.gc index 15103b19b6..b6ee17969e 100644 --- a/goal_src/jak3/engine/gfx/texture/texture-anim-funcs.gc +++ b/goal_src/jak3/engine/gfx/texture/texture-anim-funcs.gc @@ -5,5 +5,7 @@ ;; name in dgo: texture-anim-funcs ;; dgos: GAME +(define *fog-texture-work* (new 'static 'fog-texture-work :const (new 'static 'vector :x 0.00390625))) + ;; DECOMP BEGINS 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 388c16b53f..2612a95bb8 100644 --- a/goal_src/jak3/engine/gfx/texture/texture-anim-h.gc +++ b/goal_src/jak3/engine/gfx/texture/texture-anim-h.gc @@ -152,7 +152,7 @@ (alpha-near float) (alpha-far float) (alpha-delta float) - (color uint32) + (color rgba) ) ) diff --git a/goal_src/jak3/engine/gfx/texture/texture-anim-tables.gc b/goal_src/jak3/engine/gfx/texture/texture-anim-tables.gc index 7b56655029..90ddd50802 100644 --- a/goal_src/jak3/engine/gfx/texture/texture-anim-tables.gc +++ b/goal_src/jak3/engine/gfx/texture/texture-anim-tables.gc @@ -5,5 +5,24 @@ ;; name in dgo: texture-anim-tables ;; dgos: GAME +(define-extern *sky-texture-anim-array* (texture-anim-array texture-anim)) +(define-extern *darkjak-texture-anim-array* (texture-anim-array texture-anim)) +(define-extern *darkjak-highres-texture-anim-array* (texture-anim-array texture-anim)) +(define-extern *skull-gem-texture-anim-array* (texture-anim-array texture-anim)) +(define-extern *default-water-texture-anim-array* (texture-anim-array texture-anim)) +(define-extern *default-warp-texture-anim-array* (texture-anim-array texture-anim)) +(define-extern set-darkjak-texture-morph! (function float none)) + ;; DECOMP BEGINS +(defun set-darkjak-texture-morph! ((arg0 float)) + (none) + ) + +(defun set-fog-height! ((arg0 float)) + (none) + ) + +(defun set-cloud-minmax! ((arg0 float) (arg1 float)) + (none) + ) \ No newline at end of file diff --git a/goal_src/jak3/engine/gfx/texture/texture-finish.gc b/goal_src/jak3/engine/gfx/texture/texture-finish.gc index 47e2ac5429..2fc7199f1f 100644 --- a/goal_src/jak3/engine/gfx/texture/texture-finish.gc +++ b/goal_src/jak3/engine/gfx/texture/texture-finish.gc @@ -7,3 +7,22 @@ ;; DECOMP BEGINS +(setup-font-texture *texture-pool*) + +(let ((v1-2 (get-texture skull-gem-dest programmer))) + (when v1-2 + (set! (-> v1-2 w) 32) + (set! (-> v1-2 h) 32) + (set! (-> v1-2 dest 0) (-> *skull-gem-texture-base* vram-block)) + ) + ) + +(format #t "skipping init in texture-finish.~%") +; (init! *sky-texture-anim-array*) +; (init! *darkjak-texture-anim-array*) +; (init! *skull-gem-texture-anim-array*) +; (init! *default-water-texture-anim-array*) +; (init! *default-warp-texture-anim-array*) + +(kmemclose) + diff --git a/goal_src/jak3/engine/gfx/texture/texture-h.gc b/goal_src/jak3/engine/gfx/texture/texture-h.gc index e4a59084d6..b9027ade5d 100644 --- a/goal_src/jak3/engine/gfx/texture/texture-h.gc +++ b/goal_src/jak3/engine/gfx/texture/texture-h.gc @@ -278,22 +278,24 @@ to have a smaller impact on frame times when loading." These are used by many different renderers and partially managed by the texture system. For example, the texture system will automatically update tbp to point to the location of the texture." - ((quad qword 5 :inline) - (prims gs-reg64 10 :overlay-at quad) - (reg-0 uint8 :overlay-at (-> quad 0 data 2)) - (reg-1 uint8 :overlay-at (-> prims 3)) - (reg-2 uint8 :overlay-at (-> prims 5)) - (reg-3 uint8 :overlay-at (-> prims 7)) - (reg-4 uint8 :overlay-at (-> prims 9)) - (tex0 gs-tex0 :overlay-at (-> quad 0 data 0)) - (tex1 gs-tex1 :overlay-at (-> prims 2)) - (miptbp1 gs-miptbp :overlay-at (-> prims 4)) - (clamp gs-clamp :overlay-at (-> prims 6)) - (clamp-reg gs-reg64 :overlay-at reg-3) - (alpha gs-alpha :overlay-at (-> prims 8)) - (link-test link-test-flags :overlay-at (-> quad 0 data 2)) - (texture-id texture-id :overlay-at reg-1) - (next shader-ptr :overlay-at reg-2) + ((quad qword 5 :inline) + (prims gs-reg64 10 :overlay-at quad) + (reg-0 uint8 :overlay-at (-> quad 0 data 2)) + (reg-1 uint8 :overlay-at (-> prims 3)) + (reg-2 uint8 :overlay-at (-> prims 5)) + (reg-3 uint8 :overlay-at (-> prims 7)) + (reg-4 uint8 :overlay-at (-> prims 9)) + (tex0 gs-tex0 :overlay-at (-> quad 0 data 0)) + (tex1 gs-tex1 :overlay-at (-> prims 2)) + (miptbp1 gs-miptbp :overlay-at (-> prims 4)) + (clamp gs-clamp :overlay-at (-> prims 6)) + (clamp-reg gs-reg64 :overlay-at reg-3) + (alpha gs-miptbp :overlay-at (-> prims 8)) + (link-test link-test-flags :overlay-at (-> quad 0 data 2)) + (texture-id texture-id :overlay-at reg-1) + (next shader-ptr :overlay-at reg-2) + (alpha-as-miptb2 gs-miptbp :overlay-at alpha) + (reg-4-u32 gs-reg32 :overlay-at reg-4) ) ) @@ -1279,3 +1281,10 @@ of the texture." (define *grey-scale-base* (new 'static 'texture-base)) (define *map-texture-base* (new 'static 'texture-base)) + +(defmacro get-texture (name tpage) + `(lookup-texture-by-id ,(string->symbol-format "{}-{}" name tpage)) + ) + +(import "goal_src/jak3/engine/data/tpages.gc") +(import "goal_src/jak3/engine/data/textures.gc") diff --git a/goal_src/jak3/engine/gfx/texture/texture-upload.gc b/goal_src/jak3/engine/gfx/texture/texture-upload.gc index d7b7ccf86e..8affc76e50 100644 --- a/goal_src/jak3/engine/gfx/texture/texture-upload.gc +++ b/goal_src/jak3/engine/gfx/texture/texture-upload.gc @@ -7,3 +7,23 @@ ;; DECOMP BEGINS +(define *generic-envmap-texture* (get-texture pal-environment-front environment-generic)) +(define *default-envmap-shader* (new 'global 'adgif-shader)) + +(let ((gp-0 *default-envmap-shader*)) + (let ((a1-1 *generic-envmap-texture*)) + (adgif-shader<-texture! gp-0 a1-1) + ) + (set! (-> gp-0 tex1) (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (set! (-> gp-0 clamp) (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))) + (set! (-> gp-0 alpha) (new 'static 'gs-miptbp :tbp1 #x58)) + (set! (-> gp-0 prims 1) (gs-reg64 tex0-1)) + (set! (-> gp-0 prims 3) (gs-reg64 tex1-1)) + (set! (-> gp-0 prims 5) (gs-reg64 miptbp1-1)) + (set! (-> gp-0 clamp-reg) (gs-reg64 clamp-1)) + (set! (-> gp-0 prims 9) (gs-reg64 alpha-1)) + ) + +(set! (-> *texture-pool* allocate-func) texture-page-common-boot-allocate) + +(kmemopen global "tpages") \ No newline at end of file diff --git a/goal_src/jak3/engine/gfx/texture/texture.gc b/goal_src/jak3/engine/gfx/texture/texture.gc index 4dbfff305c..b8c68a7edc 100644 --- a/goal_src/jak3/engine/gfx/texture/texture.gc +++ b/goal_src/jak3/engine/gfx/texture/texture.gc @@ -716,6 +716,10 @@ ;; WARN: Return type mismatch symbol vs none. (defun upload-vram-data ((dma-buf dma-buffer) (dest int) (data-ptr pointer) (h int) (w int)) "Add DMA to later upload a texture, by reference. Sets up the GIF for receiving the texture." + (#when PC_PORT + ;; disabled. + (return #f) + ) (let ((v1-0 *display*) (a0-2 (* 96 (+ (sar h 11) 1))) ) @@ -829,6 +833,13 @@ (+! s5-0 sv-32) ) (dma-buffer-add-gs-set s3-0 (texflush 1)) + + (#when PC_PORT + (dma-buffer-add-cnt-vif2 s3-0 1 (new 'static 'vif-tag :cmd (vif-cmd pc-port)) (the-as vif-tag 3)) + (dma-buffer-add-uint64 s3-0 page) + (dma-buffer-add-uint64 s3-0 mode) + ) + (let ((a3-3 (-> s3-0 base))) (when (!= s4-0 a3-3) (let ((v1-56 (the-as dma-packet (-> s3-0 base)))) @@ -906,6 +917,76 @@ 0 ) +;; og:preserve-this pc port function +(defun upload-vram-pages-pris-pc ((pool texture-pool) + (dest-seg texture-pool-segment) + (tpage texture-page) + (bucket bucket-id) + (mask (pointer int32)) + ) + "Build DMA for uploading the given texture-page in pc format. + We don't use the mask system of the original game properly." + (if (not tpage) + (return 0) + ) + (let* ((dma-buf (-> *display* frames (-> *display* on-screen) global-buf)) + (s4-0 (-> dma-buf base)) + (any-uploads #f) + (vram-ptr (shr (-> tpage segment 0 dest) 12)) + (tpage-num-chunks (the-as int (-> tpage size))) + (tpage-id (-> tpage id)) + ) + ;; align and truncate + (set! tpage-num-chunks (shr (min (the-as int (-> dest-seg size)) (the-as int (+ tpage-num-chunks 4095))) 12)) + + ;; loop over chunks, seeing if any need to be uploaded. + (dotimes (chunk-idx tpage-num-chunks) + (let ((mask-work (-> mask (/ chunk-idx 32)))) + (when (logtest? mask-work (ash 1 (logand chunk-idx 31))) + (set! any-uploads #t) + ) + ) + ) + + ;; not used at all. we don't set merc masks on PC, so this should happen most of the time. + ; (when (not any-uploads) + ; (return 0) + ; ) + + ;; but non-merc users of this function (like map/hud) will get here + + ;; upload everything in the tpage. + ;; uploads are "free" on PC, so no harm, but we have to tell the game we're doing this + ;; otherwise it might think that an old texture was left behind and skip a later upload + (dotimes (chunk-idx tpage-num-chunks) + (let ((chunk-dest (+ vram-ptr chunk-idx))) + (set! (-> pool ids chunk-dest) tpage-id) + ) + ) + + ;; tell pc port we upload everything. + (dma-buffer-add-cnt-vif2 dma-buf 1 (new 'static 'vif-tag :cmd (vif-cmd pc-port)) (the-as vif-tag 3)) + (dma-buffer-add-uint64 dma-buf tpage) + (dma-buffer-add-uint64 dma-buf -1) + + (let ((a3-5 (-> dma-buf base))) + (let ((v1-43 (the-as dma-packet (-> dma-buf base)))) + (set! (-> v1-43 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> v1-43 vif0) (new 'static 'vif-tag)) + (set! (-> v1-43 vif1) (new 'static 'vif-tag)) + (set! (-> dma-buf base) (the-as pointer (&+ v1-43 16))) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + bucket + s4-0 + (the-as (pointer dma-tag) a3-5) + ) + ) + ) + 0 + ) + (defun upload-vram-pages-pris ((pool texture-pool) (pool-segment texture-pool-segment) (page texture-page) @@ -1262,7 +1343,7 @@ ) ) (((tpage-category pris)) - (set! (-> lev upload-size 1) (upload-vram-pages-pris + (set! (-> lev upload-size 1) (upload-vram-pages-pris-pc pool (-> pool segment-common) a2-1 @@ -1328,7 +1409,7 @@ (let ((t0-22 (-> lev texture-mask category))) (set! (-> t0-22 mask quad) (the-as uint128 -1)) (set! (-> lev upload-size 8) - (upload-vram-pages-pris pool (-> pool segment-common) a2-1 bucket (the-as (pointer int32) t0-22)) + (upload-vram-pages-pris-pc pool (-> pool segment-common) a2-1 bucket (the-as (pointer int32) t0-22)) ) ) ) @@ -1340,76 +1421,81 @@ ) ) (((tpage-category hfrag)) - (set! (-> lev upload-size 10) - (upload-vram-pages pool (-> pool segment-common) a2-1 (tex-upload-mode seg0-1-2) bucket) - ) + ;; for PC: disable hfrag texture uploads since we're going to rewrite the renderer. + ;; this saves us from creating the bucket renderer and processing uploads. + ; (set! (-> lev upload-size 10) + ; (upload-vram-pages pool (-> pool segment-common) a2-1 (tex-upload-mode seg0-1-2) bucket) + ; ) ) ) - (let ((a1-26 (-> lev texture-anim-array category))) - (cond - ((= category (tpage-category warp)) - (when (= (-> lev index) 10) - (dotimes (s2-1 11) - (let ((v1-55 (-> *level* level s2-1))) - (when (or (= (-> v1-55 status) 'active) (= (-> v1-55 status) 'reserved)) - (let ((a1-30 (-> v1-55 texture-anim-array 5))) - (if a1-30 - (update-texture-anim bucket a1-30) - ) + ;; added nonzero check. + (when (nonzero? update-texture-anim) + (let ((a1-26 (-> lev texture-anim-array category))) + (cond + ((= category (tpage-category warp)) + (when (= (-> lev index) 10) + (dotimes (s2-1 11) + (let ((v1-55 (-> *level* level s2-1))) + (when (or (= (-> v1-55 status) 'active) (= (-> v1-55 status) 'reserved)) + (let ((a1-30 (-> v1-55 texture-anim-array 5))) + (if a1-30 + (update-texture-anim bucket a1-30) + ) + ) ) ) ) ) ) - ) - ((= category (tpage-category sprite)) - (when (= (-> lev index) 10) - (dotimes (s2-2 11) - (let ((v1-64 (-> *level* level s2-2))) - (when (or (= (-> v1-64 status) 'active) (= (-> v1-64 status) 'reserved)) - (let ((a1-34 (-> v1-64 texture-anim-array 7))) - (if a1-34 - (update-texture-anim bucket a1-34) - ) + ((= category (tpage-category sprite)) + (when (= (-> lev index) 10) + (dotimes (s2-2 11) + (let ((v1-64 (-> *level* level s2-2))) + (when (or (= (-> v1-64 status) 'active) (= (-> v1-64 status) 'reserved)) + (let ((a1-34 (-> v1-64 texture-anim-array 7))) + (if a1-34 + (update-texture-anim bucket a1-34) + ) + ) ) ) ) ) ) - ) - ((= category (tpage-category hud)) - (when (= (-> lev index) 10) - (dotimes (s2-3 11) - (let ((v1-73 (-> *level* level s2-3))) - (when (or (= (-> v1-73 status) 'active) (= (-> v1-73 status) 'reserved)) - (let ((a1-38 (-> v1-73 texture-anim-array 8))) - (if a1-38 - (update-texture-anim bucket a1-38) - ) + ((= category (tpage-category hud)) + (when (= (-> lev index) 10) + (dotimes (s2-3 11) + (let ((v1-73 (-> *level* level s2-3))) + (when (or (= (-> v1-73 status) 'active) (= (-> v1-73 status) 'reserved)) + (let ((a1-38 (-> v1-73 texture-anim-array 8))) + (if a1-38 + (update-texture-anim bucket a1-38) + ) + ) ) ) ) ) ) - ) - ((= category (tpage-category sky)) - (when (-> *time-of-day-context* sky) - (if a1-26 - (update-texture-anim bucket a1-26) - ) + ((= category (tpage-category sky)) + (when (-> *time-of-day-context* sky) + (if a1-26 + (update-texture-anim bucket a1-26) + ) + ) ) - ) - ((= bucket (bucket-id tex-lcom-sky-post)) - (when (and (-> *time-of-day-context* sky) *ocean-map*) - (if a1-26 - (update-texture-anim bucket a1-26) - ) + ((= bucket (bucket-id tex-lcom-sky-post)) + (when (and (-> *time-of-day-context* sky) *ocean-map*) + (if a1-26 + (update-texture-anim bucket a1-26) + ) + ) ) - ) - (else - (if a1-26 - (update-texture-anim bucket a1-26) - ) + (else + (if a1-26 + (update-texture-anim bucket a1-26) + ) + ) ) ) ) @@ -1436,9 +1522,9 @@ "Turn on masks for skull gem textures, so they will be uploaded." (local-vars (v0-3 uint128) (v1-2 uint128) (v1-3 uint128)) (let ((gp-0 (-> *level* level-default texture-mask))) - (let* ((s5-0 (lookup-texture-by-id (new 'static 'texture-id :index #x17 :page #x6))) - (s4-0 (lookup-texture-by-id (new 'static 'texture-id :index #x18 :page #x6))) - (a0-4 (lookup-texture-by-id (new 'static 'texture-id :index #x19 :page #x6))) + (let* ((s5-0 (get-texture skull-gem-alpha-00 level-default-tfrag)) + (s4-0 (get-texture skull-gem-alpha-01 level-default-tfrag)) + (a0-4 (get-texture skull-gem-alpha-02 level-default-tfrag)) (v1-1 (-> gp-0 0 mask quad)) (a1-0 (-> s5-0 masks data 0 mask quad)) (a2-0 (-> s4-0 masks data 0 mask quad)) @@ -1456,7 +1542,8 @@ (defun upload-textures ((pool texture-pool)) "Set up DMA for all texture uploads for this frame." (cond - ((not (get-screen-copied *blit-displays-work*)) + ;; added the nonzero check here. + ((and (nonzero? *blit-displays-work*) (not (get-screen-copied *blit-displays-work*))) (set-skull-gem-masks) (set! (-> *level* level-default texture-anim-array 0) *skull-gem-texture-anim-array*) ) @@ -1490,7 +1577,7 @@ (add-level-tpage-dma pool s3-0 (the-as tpage-category (-> s4-0 level-texture-page)) (-> s4-0 bucket)) ) (else - (if (not (get-menu-mode *blit-displays-work*)) + (if (or (zero? *blit-displays-work*) (not (get-menu-mode *blit-displays-work*))) ;; added or check. (add-level-tpage-dma pool s3-0 (the-as tpage-category (-> s4-0 level-texture-page)) (-> s4-0 bucket)) ) ) @@ -1520,6 +1607,12 @@ (defmethod upload-now! ((this texture-page) (mode tex-upload-mode)) "Upload a texture to VRAM immediately, wait for DMA to finish." + + ;; og:preserve-this + (#when PC_PORT + ;; load it to the PC Port's texture pool. + (__pc-texture-upload-now this mode) + ) (let ((gp-0 *txt-dma-list*)) (let ((v1-0 gp-0)) (set! (-> v1-0 base) (-> v1-0 data)) @@ -1534,7 +1627,10 @@ (set! (-> (the-as (pointer uint64) a0-7) 1) (the-as uint 0)) (set! (-> v1-6 base) (&+ a0-7 16)) ) - (dma-buffer-send-chain (the-as dma-bank-source #x1000a000) gp-0) + ;; the actual send + (#unless PC_PORT + (dma-buffer-send-chain (the-as dma-bank-source #x1000a000) gp-0) + ) ) (dma-sync (the-as pointer #x1000a000) 0 0) (none) @@ -1572,6 +1668,13 @@ (defun texture-relocate ((dma-buf dma-buffer) (tex texture) (dest int) (tex-format gs-psm) (clut-dest int)) "Move a texture in VRAM." + + ;; og:preserve-this + (#when PC_PORT + ;; as far as I know this is only used for fonts which have 1 mip level. + (__pc-texture-relocate (/ dest 64) (-> tex dest 0) tex-format) + (return dma-buf) + ) (dotimes (v1-0 (the-as int (-> tex num-mips))) (let ((t1-1 (ash (-> tex w) (- v1-0))) (t2-3 (ash (-> tex h) (- v1-0))) @@ -1655,7 +1758,7 @@ (set! (-> v1-6 base) (-> v1-6 data)) (set! (-> v1-6 end) (the-as pointer (+ (+ (-> v1-6 allocated-length) 28) (the-as int v1-6)))) ) - (let ((s2-0 (lookup-texture-by-id (new 'static 'texture-id :index #x1 :page #xc))) + (let ((s2-0 (get-texture font.12lo gamefont)) (s1-0 #xc2000) (s0-0 36) ) @@ -1664,7 +1767,7 @@ (font-set-tex0 (the-as (pointer gs-tex0) (-> *font-work* small-font-0-tmpl)) s2-0 s1-0 s0-0 sv-20) (font-set-tex0 (the-as (pointer gs-tex0) (-> *font-work* small-font-2-tmpl)) s2-0 s1-0 s0-0 sv-20) ) - (let ((s3-1 (lookup-texture-by-id (new 'static 'texture-id :page #xc))) + (let ((s3-1 (get-texture font.12hi gamefont)) (s2-1 #xc2000) (s1-1 44) ) @@ -1673,7 +1776,7 @@ (font-set-tex0 (the-as (pointer gs-tex0) (-> *font-work* small-font-1-tmpl)) s3-1 s2-1 s1-1 sv-20) (font-set-tex0 (the-as (pointer gs-tex0) (-> *font-work* small-font-3-tmpl)) s3-1 s2-1 s1-1 sv-20) ) - (let ((s3-2 (lookup-texture-by-id (new 'static 'texture-id :index #x4 :page #xc))) + (let ((s3-2 (get-texture font.24lo gamefont)) (s2-2 #x90000) (s1-2 36) ) @@ -1681,7 +1784,7 @@ (texture-relocate s4-0 s3-2 s2-2 (the-as gs-psm s1-2) -1) (font-set-tex0 (the-as (pointer gs-tex0) (-> *font-work* large-font-0-tmpl)) s3-2 s2-2 s1-2 sv-20) ) - (let ((s3-3 (lookup-texture-by-id (new 'static 'texture-id :index #x2 :page #xc))) + (let ((s3-3 (get-texture font.24hi gamefont)) (s2-3 #x90000) (s1-3 44) ) @@ -1689,7 +1792,7 @@ (texture-relocate s4-0 s3-3 s2-3 (the-as gs-psm s1-3) -1) (font-set-tex0 (the-as (pointer gs-tex0) (-> *font-work* large-font-1-tmpl)) s3-3 s2-3 s1-3 sv-20) ) - (let ((s3-4 (lookup-texture-by-id (new 'static 'texture-id :index #x5 :page #xc))) + (let ((s3-4 (get-texture font.24lo2 gamefont)) (s2-4 #x5e000) (s1-4 36) ) @@ -1697,7 +1800,7 @@ (texture-relocate s4-0 s3-4 s2-4 (the-as gs-psm s1-4) -1) (font-set-tex0 (the-as (pointer gs-tex0) (-> *font-work* large-font-2-tmpl)) s3-4 s2-4 s1-4 sv-20) ) - (let ((s3-5 (lookup-texture-by-id (new 'static 'texture-id :index #x3 :page #xc))) + (let ((s3-5 (get-texture font.24hi2 gamefont)) (s2-5 #x5e000) (s1-5 44) ) @@ -1713,7 +1816,9 @@ (set! (-> (the-as (pointer uint64) a0-32) 1) (the-as uint 0)) (set! (-> v1-30 base) (&+ a0-32 16)) ) - (dma-buffer-send-chain (the-as dma-bank-source #x10009000) s4-0) + (#unless PC_PORT + (dma-buffer-send-chain (the-as dma-bank-source #x10009000) s4-0) + ) ) (dma-sync (the-as pointer #x10009000) 0 0) (if (and s5-0 (-> s5-0 page) (= (-> this cur) (+ sv-16 (-> s5-0 page size)))) @@ -1799,6 +1904,20 @@ ) (set! (-> this segment 1 dest) (-> this segment 0 size)) (set! (-> this segment 2 dest) (+ (-> this segment 0 size) (-> this segment 1 size))) + + ;; og:preserve-this added texture remap + (dotimes (texture-idx (-> this length)) + (let ((tex (-> this data texture-idx))) + (when (and tex (nonzero? tex)) + (let ((offset (__pc-get-tex-remap (the int (-> this id)) texture-idx))) + (when (nonzero? offset) + ) + (+! (-> tex dest 0) offset) + ) + ) + ) + ) + (set! (-> this vram-size) (-> this size)) (let* ((a3-0 (-> this id)) (s4-0 (-> *texture-page-dir* entries a3-0)) @@ -2242,7 +2361,12 @@ ) ) -(when (not *debug-segment*) +;; modified for PC port: never bother with the debug-mode texture login. +;; it will never work on PC, and it causes problems with custom levels, due to the way that it allocates the link +;; array for texture-pages that don't exist, which are never then set to false, causing them to be referenced +;; after the level is unloaded. This probably works fine if you are playing one level at a time, or if the backup +;; texture page loading actually works. +(when (or (not *debug-segment*) PC_PORT) (set! adgif-shader-login adgif-shader-login-fast) (set! adgif-shader-login-no-remap adgif-shader-login-no-remap-fast) ) @@ -2256,7 +2380,7 @@ (adgif-shader<-texture! shader tex) ) (set! (-> shader clamp) (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))) - (set! (-> shader alpha) (new 'static 'gs-alpha :b #x1 :d #x1)) + (set! (-> shader alpha) (new 'static 'gs-miptbp :tbp1 #x44)) (set! (-> shader prims 1) (gs-reg64 tex0-1)) (set! (-> shader prims 3) (gs-reg64 tex1-1)) (set! (-> shader prims 5) (gs-reg64 miptbp1-1)) @@ -2390,5 +2514,47 @@ (none) ) +(defun adgif-shader<-texture! ((arg0 adgif-shader) (arg1 texture)) + "Set up an adgif-shader from a texture." + (set! (-> arg0 tex1 mxl) (+ (-> arg1 num-mips) -1)) + (set! (-> arg0 tex1 l) (-> arg1 mip-shift)) + (set! (-> arg0 tex1 mmag) (logand (-> arg1 tex1-control) 1)) + (set! (-> arg0 tex1 mmin) (shr (-> arg1 tex1-control) 1)) + (set! (-> arg0 tex0) (new 'static 'gs-tex0 + :tcc #x1 + :cld #x1 + :cpsm (-> arg1 clutpsm) + :cbp (-> arg1 clutdest) + :tfx (-> arg0 tex0 tfx) + :th (log2 (-> arg1 h)) + :tw (log2 (-> arg1 w)) + :tbw (-> arg1 width 0) + :tbp0 (-> arg1 dest 0) + :psm (the-as int (-> arg1 psm)) + ) + ) + (set! (-> arg0 miptbp1) (new 'static 'gs-miptbp + :tbp1 (-> arg1 dest 1) + :tbw1 (-> arg1 width 1) + :tbp2 (-> arg1 dest 2) + :tbw2 (-> arg1 width 2) + :tbp3 (-> arg1 dest 3) + :tbw3 (-> arg1 width 3) + ) + ) + (when (< (the-as uint 4) (-> arg1 num-mips)) + (set! (-> arg0 alpha-as-miptb2) (new 'static 'gs-miptbp + :tbp1 (-> arg1 dest 4) + :tbw1 (-> arg1 width 4) + :tbp2 (-> arg1 dest 5) + :tbw2 (-> arg1 width 5) + :tbp3 (-> arg1 dest 6) + :tbw3 (-> arg1 width 6) + ) + ) + (set! (-> (&-> arg0 reg-4-u32) 0) (gs-reg32 miptbp2-1)) + ) + arg0 + ) (define *texture-pool* (new 'global 'texture-pool)) diff --git a/goal_src/jak3/engine/gfx/vu1-user-h.gc b/goal_src/jak3/engine/gfx/vu1-user-h.gc index 27d650e40c..95007f153d 100644 --- a/goal_src/jak3/engine/gfx/vu1-user-h.gc +++ b/goal_src/jak3/engine/gfx/vu1-user-h.gc @@ -28,7 +28,7 @@ :type int32 (bucket0 0) (bucket1 1) - (bucket2 2) + (bucket2 2) ;; pc vis stuff (bucket3 3) ;; blit? (tex-lcom-sky-pre 4) (bucket5 5) ;; sky @@ -38,363 +38,363 @@ (bucket9 9) ;; hfrag (tex-l0-tfrag 10) ;; texture - (bucket11 11) ;; tfrag - (bucket12 12) ;; tie - (bucket13 13) ;; tie - (bucket14 14) ;; tfrag - (bucket15 15) ;; tie - (bucket16 16) ;; tie + (tfrag-l0-tfrag 11) ;; tfrag + (tie-l0-tfrag 12) ;; tie + (etie-l0-tfrag 13) ;; tie + (tfrag-scissor-l0-tfrag 14) ;; tfrag + (tie-scissor-l0-tfrag 15) ;; tie + (etie-scissor-l0-tfrag 16) ;; tie (merc-l0-tfrag 17) ;; merc (emerc-l0-tfrag 18) ;; emerc (gmerc-l0-tfrag 19) ;; generic - (bucket20 20) ;; tie + (tie-vanish-l0-tfrag 20) ;; tie (gmerc2-l0-tfrag 21) ;; generic (tex-l1-tfrag 22) - (bucket23 23) - (bucket24 24) - (bucket25 25) - (bucket26 26) - (bucket27 27) - (bucket28 28) + (tfrag-l1-tfrag 23) + (tie-l1-tfrag 24) + (etie-l1-tfrag 25) + (tfrag-scissor-l1-tfrag 26) + (tie-scissor-l1-tfrag 27) + (etie-scissor-l1-tfrag 28) (merc-l1-tfrag 29) (emerc-l1-tfrag 30) (gmerc-l1-tfrag 31) - (bucket32 32) + (tie-vanish-l1-tfrag 32) (gmerc2-l1-tfrag 33) (tex-l2-tfrag 34) - (bucket35 35) - (bucket36 36) - (bucket37 37) - (bucket38 38) - (bucket39 39) - (bucket40 40) + (tfrag-l2-tfrag 35) + (tie-l2-tfrag 36) + (etie-l2-tfrag 37) + (tfrag-scissor-l2-tfrag 38) + (tie-scissor-l2-tfrag 39) + (etie-scissor-l2-tfrag 40) (merc-l2-tfrag 41) (emerc-l2-tfrag 42) (gmerc-l2-tfrag 43) - (bucket44 44) + (tie-vanish-l2-tfrag 44) (gmerc2-l2-tfrag 45) (tex-l3-tfrag 46) - (bucket47 47) - (bucket48 48) - (bucket49 49) - (bucket50 50) - (bucket51 51) - (bucket52 52) + (tfrag-l3-tfrag 47) + (tie-l3-tfrag 48) + (etie-l3-tfrag 49) + (tfrag-scissor-l3-tfrag 50) + (tie-scissor-l3-tfrag 51) + (etie-scissor-l3-tfrag 52) (merc-l3-tfrag 53) (emerc-l3-tfrag 54) (gmerc-l3-tfrag 55) - (bucket56 56) + (tie-vanish-l3-tfrag 56) (gmerc2-l3-tfrag 57) (tex-l4-tfrag 58) - (bucket59 59) - (bucket60 60) - (bucket61 61) - (bucket62 62) - (bucket63 63) - (bucket64 64) + (tfrag-l4-tfrag 59) + (tie-l4-tfrag 60) + (etie-l4-tfrag 61) + (tfrag-scissor-l4-tfrag 62) + (tie-scissor-l4-tfrag 63) + (etie-scissor-l4-tfrag 64) (merc-l4-tfrag 65) (emerc-l4-tfrag 66) (gmerc-l4-tfrag 67) - (bucket68 68) + (tie-vanish-l4-tfrag 68) (gmerc2-l4-tfrag 69) (tex-l5-tfrag 70) - (bucket71 71) - (bucket72 72) - (bucket73 73) - (bucket74 74) - (bucket75 75) - (bucket76 76) + (tfrag-l5-tfrag 71) + (tie-l5-tfrag 72) + (etie-l5-tfrag 73) + (tfrag-scissor-l5-tfrag 74) + (tie-scissor-l5-tfrag 75) + (etie-scissor-l5-tfrag 76) (merc-l5-tfrag 77) (emerc-l5-tfrag 78) (gmerc-l5-tfrag 79) - (bucket80 80) + (tie-vanish-l5-tfrag 80) (gmerc2-l5-tfrag 81) (tex-l6-tfrag 82) - (bucket83 83) - (bucket84 84) - (bucket85 85) - (bucket86 86) - (bucket87 87) - (bucket88 88) + (tfrag-l6-tfrag 83) + (tie-l6-tfrag 84) + (etie-l6-tfrag 85) + (tfrag-scissor-l6-tfrag 86) + (tie-scissor-l6-tfrag 87) + (etie-scissor-l6-tfrag 88) (merc-l6-tfrag 89) (emerc-l6-tfrag 90) (gmerc-l6-tfrag 91) - (bucket92 92) + (tie-vanish-l6-tfrag 92) (gmerc2-l6-tfrag 93) (tex-l7-tfrag 94) - (bucket95 95) - (bucket96 96) - (bucket97 97) - (bucket98 98) - (bucket99 99) - (bucket100 100) + (tfrag-l7-tfrag 95) + (tie-l7-tfrag 96) + (etie-l7-tfrag 97) + (tfrag-scissor-l7-tfrag 98) + (tie-scissor-l7-tfrag 99) + (etie-scissor-l7-tfrag 100) (merc-l7-tfrag 101) (emerc-l7-tfrag 102) (gmerc-l7-tfrag 103) - (bucket104 104) + (tie-vanish-l7-tfrag 104) (gmerc2-l7-tfrag 105) (tex-l8-tfrag 106) - (bucket107 107) - (bucket108 108) - (bucket109 109) - (bucket110 110) - (bucket111 111) - (bucket112 112) + (tfrag-l8-tfrag 107) + (tie-l8-tfrag 108) + (etie-l8-tfrag 109) + (tfrag-scissor-l8-tfrag 110) + (tie-scissor-l8-tfrag 111) + (etie-scissor-l8-tfrag 112) (merc-l8-tfrag 113) (emerc-l8-tfrag 114) (gmerc-l8-tfrag 115) - (bucket116 116) + (tie-vanish-l8-tfrag 116) (gmerc2-l8-tfrag 117) (tex-l9-tfrag 118) - (bucket119 119) - (bucket120 120) - (bucket121 121) - (bucket122 122) - (bucket123 123) - (bucket124 124) + (tfrag-l9-tfrag 119) + (tie-l9-tfrag 120) + (etie-l9-tfrag 121) + (tfrag-scissor-l9-tfrag 122) + (tie-scissor-l9-tfrag 123) + (etie-scissor-l9-tfrag 124) (merc-l9-tfrag 125) (emerc-l9-tfrag 126) (gmerc-l9-tfrag 127) - (bucket128 128) + (tie-vanish-l9-tfrag 128) (gmerc2-l9-tfrag 129) (tex-l0-shrub 130) - (bucket131 131) - (bucket132 132) - (bucket133 133) - (bucket134 134) - (bucket135 135) + (shrub-l0-shrub 131) + (shrub-near-l0-shrub 132) + (billboard-l0-shrub 133) + (shrub-vanish-l0-shrub 134) + (shrub-near-trans-l0-shrub 135) (merc-l0-shrub 136) (emerc-l0-shrub 137) (gmerc-l0-shrub 138) (gmerc2-l0-shrub 139) (tex-l1-shrub 140) - (bucket141 141) - (bucket142 142) - (bucket143 143) - (bucket144 144) - (bucket145 145) + (shrub-l1-shrub 141) + (shrub-near-l1-shrub 142) + (billboard-l1-shrub 143) + (shrub-vanish-l1-shrub 144) + (shrub-near-trans-l1-shrub 145) (merc-l1-shrub 146) (emerc-l1-shrub 147) (gmerc-l1-shrub 148) (gmerc2-l1-shrub 149) (tex-l2-shrub 150) - (bucket151 151) - (bucket152 152) - (bucket153 153) - (bucket154 154) - (bucket155 155) + (shrub-l2-shrub 151) + (shrub-near-l2-shrub 152) + (billboard-l2-shrub 153) + (shrub-vanish-l2-shrub 154) + (shrub-near-trans-l2-shrub 155) (merc-l2-shrub 156) (emerc-l2-shrub 157) (gmerc-l2-shrub 158) (gmerc2-l2-shrub 159) (tex-l3-shrub 160) - (bucket161 161) - (bucket162 162) - (bucket163 163) - (bucket164 164) - (bucket165 165) + (shrub-l3-shrub 161) + (shrub-near-l3-shrub 162) + (billboard-l3-shrub 163) + (shrub-vanish-l3-shrub 164) + (shrub-near-trans-l3-shrub 165) (merc-l3-shrub 166) (emerc-l3-shrub 167) (gmerc-l3-shrub 168) (gmerc2-l3-shrub 169) (tex-l4-shrub 170) - (bucket171 171) - (bucket172 172) - (bucket173 173) - (bucket174 174) - (bucket175 175) + (shrub-l4-shrub 171) + (shrub-near-l4-shrub 172) + (billboard-l4-shrub 173) + (shrub-vanish-l4-shrub 174) + (shrub-near-trans-l4-shrub 175) (merc-l4-shrub 176) (emerc-l4-shrub 177) (gmerc-l4-shrub 178) (gmerc2-l4-shrub 179) (tex-l5-shrub 180) - (bucket181 181) - (bucket182 182) - (bucket183 183) - (bucket184 184) - (bucket185 185) + (shrub-l5-shrub 181) + (shrub-near-l5-shrub 182) + (billboard-l5-shrub 183) + (shrub-vanish-l5-shrub 184) + (shrub-near-trans-l5-shrub 185) (merc-l5-shrub 186) (emerc-l5-shrub 187) (gmerc-l5-shrub 188) (gmerc2-l5-shrub 189) (tex-l6-shrub 190) - (bucket191 191) - (bucket192 192) - (bucket193 193) - (bucket194 194) - (bucket195 195) + (shrub-l6-shrub 191) + (shrub-near-l6-shrub 192) + (billboard-l6-shrub 193) + (shrub-vanish-l6-shrub 194) + (shrub-near-trans-l6-shrub 195) (merc-l6-shrub 196) (emerc-l6-shrub 197) (gmerc-l6-shrub 198) (gmerc2-l6-shrub 199) (tex-l7-shrub 200) - (bucket201 201) - (bucket202 202) - (bucket203 203) - (bucket204 204) - (bucket205 205) + (shrub-l7-shrub 201) + (shrub-near-l7-shrub 202) + (billboard-l7-shrub 203) + (shrub-vanish-l7-shrub 204) + (shrub-near-trans-l7-shrub 205) (merc-l7-shrub 206) (emerc-l7-shrub 207) (gmerc-l7-shrub 208) (gmerc2-l7-shrub 209) (tex-l8-shrub 210) - (bucket211 211) - (bucket212 212) - (bucket213 213) - (bucket214 214) - (bucket215 215) + (shrub-l8-shrub 211) + (shrub-near-l8-shrub 212) + (billboard-l8-shrub 213) + (shrub-vanish-l8-shrub 214) + (shrub-near-trans-l8-shrub 215) (merc-l8-shrub 216) (emerc-l8-shrub 217) (gmerc-l8-shrub 218) (gmerc2-l8-shrub 219) (tex-l9-shrub 220) - (bucket221 221) - (bucket222 222) - (bucket223 223) - (bucket224 224) - (bucket225 225) + (shrub-l9-shrub 221) + (shrub-near-l9-shrub 222) + (billboard-l9-shrub 223) + (shrub-vanish-l9-shrub 224) + (shrub-near-trans-l9-shrub 225) (merc-l9-shrub 226) (emerc-l9-shrub 227) (gmerc-l9-shrub 228) (gmerc2-l9-shrub 229) (tex-l0-alpha 230) - (bucket231 231) - (bucket232 232) - (bucket233 233) + (tfrag-l0-alpha 231) + (tie-l0-alpha 232) + (etie-l0-alpha 233) (merc-l0-alpha 234) (emerc-l0-alpha 235) (gmerc-l0-alpha 236) - (bucket237 237) - (bucket238 238) - (bucket239 239) + (tfrag-scissor-l0-alpha 237) + (tie-scissor-l0-alpha 238) + (etie-scissor-l0-alpha 239) (gmerc2-l0-alpha 240) (tex-l1-alpha 241) - (bucket242 242) - (bucket243 243) - (bucket244 244) + (tfrag-l1-alpha 242) + (tie-l1-alpha 243) + (etie-l1-alpha 244) (merc-l1-alpha 245) (emerc-l1-alpha 246) (gmerc-l1-alpha 247) - (bucket248 248) - (bucket249 249) - (bucket250 250) + (tfrag-scissor-l1-alpha 248) + (tie-scissor-l1-alpha 249) + (etie-scissor-l1-alpha 250) (gmerc2-l1-alpha 251) (tex-l2-alpha 252) - (bucket253 253) - (bucket254 254) - (bucket255 255) + (tfrag-l2-alpha 253) + (tie-l2-alpha 254) + (etie-l2-alpha 255) (merc-l2-alpha 256) (emerc-l2-alpha 257) (gmerc-l2-alpha 258) - (bucket259 259) - (bucket260 260) - (bucket261 261) + (tfrag-scissor-l2-alpha 259) + (tie-scissor-l2-alpha 260) + (etie-scissor-l2-alpha 261) (gmerc2-l2-alpha 262) (tex-l3-alpha 263) - (bucket264 264) - (bucket265 265) - (bucket266 266) + (tfrag-l3-alpha 264) + (tie-l3-alpha 265) + (etie-l3-alpha 266) (merc-l3-alpha 267) (emerc-l3-alpha 268) (gmerc-l3-alpha 269) - (bucket270 270) - (bucket271 271) - (bucket272 272) + (tfrag-scissor-l3-alpha 270) + (tie-scissor-l3-alpha 271) + (etie-scissor-l3-alpha 272) (gmerc2-l3-alpha 273) (tex-l4-alpha 274) - (bucket275 275) - (bucket276 276) - (bucket277 277) + (tfrag-l4-alpha 275) + (tie-l4-alpha 276) + (etie-l4-alpha 277) (merc-l4-alpha 278) (emerc-l4-alpha 279) (gmerc-l4-alpha 280) - (bucket281 281) - (bucket282 282) - (bucket283 283) + (tfrag-scissor-l4-alpha 281) + (tie-scissor-l4-alpha 282) + (etie-scissor-l4-alpha 283) (gmerc2-l4-alpha 284) (tex-l5-alpha 285) - (bucket286 286) - (bucket287 287) - (bucket288 288) + (tfrag-l5-alpha 286) + (tie-l5-alpha 287) + (etie-l5-alpha 288) (merc-l5-alpha 289) (emerc-l5-alpha 290) (gmerc-l5-alpha 291) - (bucket292 292) - (bucket293 293) - (bucket294 294) + (tfrag-scissor-l5-alpha 292) + (tie-scissor-l5-alpha 293) + (etie-scissor-l5-alpha 294) (gmerc2-l5-alpha 295) (tex-l6-alpha 296) - (bucket297 297) - (bucket298 298) - (bucket299 299) + (tfrag-l6-alpha 297) + (tie-l6-alpha 298) + (etie-l6-alpha 299) (merc-l6-alpha 300) (emerc-l6-alpha 301) (gmerc-l6-alpha 302) - (bucket303 303) - (bucket304 304) - (bucket305 305) + (tfrag-scissor-l6-alpha 303) + (tie-scissor-l6-alpha 304) + (etie-scissor-l6-alpha 305) (gmerc2-l6-alpha 306) (tex-l7-alpha 307) - (bucket308 308) - (bucket309 309) - (bucket310 310) + (tfrag-l7-alpha 308) + (tie-l7-alpha 309) + (etie-l7-alpha 310) (merc-l7-alpha 311) (emerc-l7-alpha 312) (gmerc-l7-alpha 313) - (bucket314 314) - (bucket315 315) - (bucket316 316) + (tfrag-scissor-l7-alpha 314) + (tie-scissor-l7-alpha 315) + (etie-scissor-l7-alpha 316) (gmerc2-l7-alpha 317) (tex-l8-alpha 318) - (bucket319 319) - (bucket320 320) - (bucket321 321) + (tfrag-l8-alpha 319) + (tie-l8-alpha 320) + (etie-l8-alpha 321) (merc-l8-alpha 322) (emerc-l8-alpha 323) (gmerc-l8-alpha 324) - (bucket325 325) - (bucket326 326) - (bucket327 327) + (tfrag-scissor-l8-alpha 325) + (tie-scissor-l8-alpha 326) + (etie-scissor-l8-alpha 327) (gmerc2-l8-alpha 328) (tex-l9-alpha 329) - (bucket330 330) - (bucket331 331) - (bucket332 332) + (tfrag-l9-alpha 330) + (tie-l9-alpha 331) + (etie-l9-alpha 332) (merc-l9-alpha 333) (emerc-l9-alpha 334) (gmerc-l9-alpha 335) - (bucket336 336) - (bucket337 337) - (bucket338 338) + (tfrag-scissor-l9-alpha 336) + (tie-scissor-l9-alpha 337) + (etie-scissor-l9-alpha 338) (gmerc2-l9-alpha 339) (tex-lcom-tfrag 340) @@ -549,111 +549,111 @@ (tex-l0-water 463) (merc-l0-water 464) (gmerc-l0-water 465) - (bucket466 466) - (bucket467 467) - (bucket468 468) - (bucket469 469) - (bucket470 470) - (bucket471 471) + (tfrag-l0-water 466) + (tie-l0-water 467) + (etie-l0-water 468) + (tie-scissor-l0-water 469) + (tfrag-scissor-l0-water 470) + (etie-scissor-l0-water 471) (gmerc2-l0-water 472) (tex-l1-water 473) (merc-l1-water 474) (gmerc-l1-water 475) - (bucket476 476) - (bucket477 477) - (bucket478 478) - (bucket479 479) - (bucket480 480) - (bucket481 481) + (tfrag-l1-water 476) + (tie-l1-water 477) + (etie-l1-water 478) + (tie-scissor-l1-water 479) + (tfrag-scissor-l1-water 480) + (etie-scissor-l1-water 481) (gmerc2-l1-water 482) (tex-l2-water 483) (merc-l2-water 484) (gmerc-l2-water 485) - (bucket486 486) - (bucket487 487) - (bucket488 488) - (bucket489 489) - (bucket490 490) - (bucket491 491) + (tfrag-l2-water 486) + (tie-l2-water 487) + (etie-l2-water 488) + (tie-scissor-l2-water 489) + (tfrag-scissor-l2-water 490) + (etie-scissor-l2-water 491) (gmerc2-l2-water 492) (tex-l3-water 493) (merc-l3-water 494) (gmerc-l3-water 495) - (bucket496 496) - (bucket497 497) - (bucket498 498) - (bucket499 499) - (bucket500 500) - (bucket501 501) + (tfrag-l3-water 496) + (tie-l3-water 497) + (etie-l3-water 498) + (tie-scissor-l3-water 499) + (tfrag-scissor-l3-water 500) + (etie-scissor-l3-water 501) (gmerc2-l3-water 502) (tex-l4-water 503) (merc-l4-water 504) (gmerc-l4-water 505) - (bucket506 506) - (bucket507 507) - (bucket508 508) - (bucket509 509) - (bucket510 510) - (bucket511 511) + (tfrag-l4-water 506) + (tie-l4-water 507) + (etie-l4-water 508) + (tie-scissor-l4-water 509) + (tfrag-scissor-l4-water 510) + (etie-scissor-l4-water 511) (gmerc2-l4-water 512) (tex-l5-water 513) (merc-l5-water 514) (gmerc-l5-water 515) - (bucket516 516) - (bucket517 517) - (bucket518 518) - (bucket519 519) - (bucket520 520) - (bucket521 521) + (tfrag-l5-water 516) + (tie-l5-water 517) + (etie-l5-water 518) + (tie-scissor-l5-water 519) + (tfrag-scissor-l5-water 520) + (etie-scissor-l5-water 521) (gmerc2-l5-water 522) (tex-l6-water 523) (merc-l6-water 524) (gmerc-l6-water 525) - (bucket526 526) - (bucket527 527) - (bucket528 528) - (bucket529 529) - (bucket530 530) - (bucket531 531) + (tfrag-l6-water 526) + (tie-l6-water 527) + (etie-l6-water 528) + (tie-scissor-l6-water 529) + (tfrag-scissor-l6-water 530) + (etie-scissor-l6-water 531) (gmerc2-l6-water 532) (tex-l7-water 533) (merc-l7-water 534) (gmerc-l7-water 535) - (bucket536 536) - (bucket537 537) - (bucket538 538) - (bucket539 539) - (bucket540 540) - (bucket541 541) + (tfrag-l7-water 536) + (tie-l7-water 537) + (etie-l7-water 538) + (tie-scissor-l7-water 539) + (tfrag-scissor-l7-water 540) + (etie-scissor-l7-water 541) (gmerc2-l7-water 542) (tex-l8-water 543) (merc-l8-water 544) (gmerc-l8-water 545) - (bucket546 546) - (bucket547 547) - (bucket548 548) - (bucket549 549) - (bucket550 550) - (bucket551 551) + (tfrag-l8-water 546) + (tie-l8-water 547) + (etie-l8-water 548) + (tie-scissor-l8-water 549) + (tfrag-scissor-l8-water 550) + (etie-scissor-l8-water 551) (gmerc2-l8-water 552) (tex-l9-water 553) (merc-l9-water 554) (gmerc-l9-water 555) - (bucket556 556) - (bucket557 557) - (bucket558 558) - (bucket559 559) - (bucket560 560) - (bucket561 561) + (tfrag-l9-water 556) + (tie-l9-water 557) + (etie-l9-water 558) + (tie-scissor-l9-water 559) + (tfrag-scissor-l9-water 560) + (etie-scissor-l9-water 561) (gmerc2-l9-water 562) (tex-lcom-water 563) @@ -679,9 +679,9 @@ (tex-hud-pris2 580) (hud-draw-pris2 581) (bucket582 582) - (bucket583 583) + (debug 583) (debug-no-zbuf2 584) - (bucket585 585) + (debug-menu 585) (bucket586 586) ) @@ -693,45 +693,45 @@ ) ;; +++vu1-renderer-mask -;; TODO stolen from Jak 2 +;; TODO stolen from Jak 2 (and it was all wrong...) (defenum vu1-renderer-mask :type uint64 :bitfield #t (rn0) (rn1) (rn2) - (sky) - (ocean) - (ocean-wave) + (rn3) + (rn4) + (rn5) + (rn6) + (rn7) (tfrag) - (tie) - (tie-envmap) (tie-scissor) - (tie-envmap-scissor) + (tie) + (etie) + (etie-scissor) (tie-vanish) + (generic) ;; right + (merc) ;; right + (emerc) ;; right (shrubbery) (shrub-near) - (generic) - (merc) - (emerc) (billboard) - (shrubbery-vanish) + (shrub-vanish) (tfrag-trans) (tie-scissor-trans) (tie-trans) - (tie-envmap-trans) - (tie-envmap-scissor-trans) + (etie-trans) + (etie-scissor-trans) (tfrag-water) (tie-scissor-water) (tie-water) - (tie-envmap-water) - (tie-envmap-scissor-water) + (etie-water) + (etie-scissor-water) (sprite) - (shadow) - (rn31) (rn32) (rn33) - (depth-cue) + (rn34) (rn35) (rn36) (rn37) diff --git a/goal_src/jak3/engine/level/bsp-h.gc b/goal_src/jak3/engine/level/bsp-h.gc index f1d6a49e06..50db2ad152 100644 --- a/goal_src/jak3/engine/level/bsp-h.gc +++ b/goal_src/jak3/engine/level/bsp-h.gc @@ -8,6 +8,9 @@ (declare-type bsp-header drawable) (declare-type bsp-node structure) (declare-type entity-camera entity) +(declare-type entity-nav-mesh structure) +(declare-type entity-race-mesh entity) +(declare-type city-level-info structure) (define-extern inspect-bsp-tree (function bsp-header bsp-node none)) (define-extern map-bsp-tree (function (function bsp-node none) bsp-header bsp-node none)) @@ -40,30 +43,46 @@ This is used for precomputed visibility, based on the camera position. This is n "The bsp-header is really an entire level. This probably started as a very simple structure, but now it is extremely complicated." ((info file-info :overlay-at id) - (all-visible-list (pointer uint16) :offset 32) - (visible-list-length int16 :offset 36) - (drawable-trees drawable-tree-array :offset 40) - (pat pointer :offset 44) - (pat-length int32 :offset 48) + (all-visible-list (pointer uint8)) + (visible-list-length int16) + (extra-vis-list-length int16) + (drawable-trees drawable-tree-array) + (pat pointer) + (pat-length int32) (texture-remap-table (pointer uint64)) (texture-remap-table-len int32) (texture-ids (pointer texture-id)) (texture-page-count int32) (unknown-basic basic) - (actors drawable-inline-array-actor :offset 112) + (name symbol) + (nickname symbol) + (vis-info level-vis-info 8) + (actors drawable-inline-array-actor) (cameras (array entity-camera)) - (nodes (inline-array bsp-node) :offset 120) + (nodes (inline-array bsp-node)) (level level) (current-leaf-idx uint16) - (texture-flags texture-page-flag 10 :offset 130) + (texture-flags texture-page-flag 10) (cam-outside-bsp uint8 :offset 152) (cam-using-back uint8) (cam-box-idx uint16) + (ambients symbol) + (subdivide-close float :offset 160) + (subdivide-far float) + (race-meshes (array entity-race-mesh)) (actor-birth-order (pointer uint32) :offset 172) + (light-hash light-hash) + (nav-meshes (array entity-nav-mesh)) + (actor-groups (array actor-group)) (region-trees (array drawable-tree-region-prim) :offset 188) + (region-array region-array) (collide-hash collide-hash :offset 196) + (wind-array uint32 :offset 200) + (wind-array-length int32 :offset 204) + (city-level-info city-level-info :offset 208) (vis-spheres vector-array :offset 216) (vis-spheres-length uint32 :offset 248) + (region-tree drawable-tree-region-prim :offset 252) (tfrag-masks texture-masks-array :offset 256) (tfrag-closest (pointer float)) (tfrag-mask-count uint32 :overlay-at tfrag-closest) @@ -78,7 +97,7 @@ This probably started as a very simple structure, but now it is extremely compli (water-mask-count uint32 :overlay-at water-closest) (bsp-scale vector :inline :offset 288) (bsp-offset vector :inline) - (unk-drawable drawable :offset 320) + (hfrag-drawable drawable :offset 320) (end uint8 :offset 399) ) (:methods diff --git a/goal_src/jak3/engine/level/bsp.gc b/goal_src/jak3/engine/level/bsp.gc index 799ae08ea8..c1fab62459 100644 --- a/goal_src/jak3/engine/level/bsp.gc +++ b/goal_src/jak3/engine/level/bsp.gc @@ -105,8 +105,8 @@ (+! (-> usage data 65 used) v1-92) (+! (-> usage data 65 total) (logand -16 (+ v1-92 15))) ) - (if (nonzero? (-> this unk-drawable)) - (mem-usage (-> this unk-drawable) usage flags) + (if (nonzero? (-> this hfrag-drawable)) + (mem-usage (-> this hfrag-drawable) usage flags) ) (when (nonzero? (-> this region-trees)) (let* ((s3-0 (-> this region-trees length)) @@ -150,8 +150,8 @@ ) ) ) - (if (nonzero? (-> this unk-drawable)) - (login (-> this unk-drawable)) + (if (nonzero? (-> this hfrag-drawable)) + (login (-> this hfrag-drawable)) ) this ) @@ -339,8 +339,8 @@ (if (nonzero? (-> this drawable-trees)) (collect-stats (-> this drawable-trees)) ) - (if (nonzero? (-> this unk-drawable)) - (collect-stats (-> this unk-drawable)) + (if (nonzero? (-> this hfrag-drawable)) + (collect-stats (-> this hfrag-drawable)) ) 0 (none) @@ -574,7 +574,7 @@ ) (when (zero? (+ s2-0 s3-0 s4-0 gp-0)) (dotimes (a0-5 (-> v1-0 length)) - (let ((a1-2 (-> v1-0 data a0-5))) + (let ((a1-2 (-> v1-0 trees a0-5))) (cond ((= (-> a1-2 type) drawable-tree-tfrag) (let* ((a2-5 (-> (the-as drawable-tree-tfrag a1-2) arrays (+ (-> (the-as drawable-tree-tfrag a1-2) length) -1))) diff --git a/goal_src/jak3/engine/level/level-h.gc b/goal_src/jak3/engine/level/level-h.gc index 7cbe2996ea..f783a45f35 100644 --- a/goal_src/jak3/engine/level/level-h.gc +++ b/goal_src/jak3/engine/level/level-h.gc @@ -5,6 +5,11 @@ ;; name in dgo: level-h ;; dgos: GAME +;; max amount of levels in level heap +(defconstant LEVEL_MAX 10) +;; total amount of levels, including ones outside level heap (default-level) +(defconstant LEVEL_TOTAL 11) + (declare-type bsp-header basic) (declare-type drawable basic) (declare-type entity-links-array inline-array-class) @@ -13,12 +18,16 @@ (declare-type game-text-info structure) (declare-type entity-links structure) (declare-type level-group basic) +(declare-type level-load-info structure) +(declare-type text-id uint32) (define-extern *level* level-group) (define-extern *draw-index* int) (define-extern *level-index* int) (define-extern *print-login* symbol) (define-extern level-remap-texture (function texture-id texture-id)) +(define-extern lookup-level-info (function symbol level-load-info)) + ;; +++vis-info-flag (defenum vis-info-flag @@ -110,6 +119,19 @@ (movie0 16) (movie1 17) (movie2 18) + (tm19 19) + (tm20 20) + (tm21 21) + (tm22 22) + (tm23 23) + (tm24 24) + (tm25 25) + (tm26 26) + (tm27 27) + (tm28 28) + (tm29 29) + (tm30 30) + (tm31 31) ) ;; ---task-mask @@ -159,7 +181,7 @@ (lf7 7) (lf8 8) (lf9 9) - (lf10 10) + (use-camera-other 10) (lf11 11) (lf12 12) (lf13 13) @@ -255,9 +277,9 @@ ) (deftype level-borrow-info (basic) - ((alias symbol) + ((alias object) (borrow-size uint16 5) - (borrow-info symbol 5) + (borrow-info object 5) ) ) @@ -303,12 +325,11 @@ (mood-range mood-range :inline) ) (:methods - (level-load-info-method-9 (_type_ int) object) - (level-load-info-method-10 (_type_) none) + (get-callback-symbol-value-by-slot! (_type_ int) object) + (get-callback-by-slot! (_type_ int) object) ) ) -(define-extern lookup-level-info (function symbol level-load-info)) (deftype login-state (basic) ((state int32) @@ -337,6 +358,12 @@ (loaded-texture-page-count int32) (entity entity-links-array) (closest-object meters 10) + (tie-min-dist float :offset 352) + (fg-tfrag-min-dist float) + (fg-prim-min-dist float) + (fg-shrub-min-dist float) + (fg-warp-min-dist float :offset 372) + (fg-prim2-min-dist float :offset 380) (upload-size int32 20 :offset 388) (inside-boxes? basic) (display? symbol) @@ -380,7 +407,7 @@ (alpha-dists pointer) (water-masks texture-masks-array) (water-dists pointer) - (tfrag-last-calls int32 6) + (tfrag-last-calls uint32 6) (texture-anim-array texture-anim-array 11) (light-hash light-hash) (draw-priority float) @@ -396,27 +423,27 @@ (unknown-pad uint8 14) ) (:methods - (level-method-9 () none) - (level-method-10 () none) - (level-method-11 () none) + (deactivate (_type_) _type_) + (unload! (_type_) _type_) + (is-object-visible? (_type_ int) symbol) (level-method-12 () none) - (level-method-13 () none) + (bsp-name (_type_) symbol) (compute-memory-usage! (_type_ symbol) memory-usage-block) - (level-method-15 () none) + (inside-bsp? (_type_) symbol) (update-vis! (_type_ level-vis-info uint (pointer uint8)) symbol) - (level-method-17 () none) - (level-method-18 () none) - (level-method-19 () none) - (level-method-20 () none) + (load-continue (_type_) _type_) + (load-begin (_type_) _type_) + (login-begin (_type_) _type_) + (debug-print-region-splitbox (_type_ vector object) none) (get-art-group-by-name (_type_ string) art-group) - (level-method-22 () none) - (level-method-23 () none) + (set-proto-vis! (_type_ symbol) int) + (lookup-text (_type_ text-id symbol) string) (level-method-24 () none) - (level-method-25 () none) - (level-method-26 () none) - (level-method-27 () none) - (level-method-28 () none) - (level-method-29 () none) + (birth (_type_) _type_) + (level-status-update! (_type_ symbol) _type_) + (load-common-package (_type_) none) + (init-vis-from-bsp (_type_) none) + (vis-clear (_type_) none) ) ) @@ -462,27 +489,27 @@ ) (:methods (level-get (_type_ symbol) level) - (level-group-method-10 () none) + (level-get-with-status (_type_ symbol) level) (get-level-by-heap-ptr-and-status (_type_ pointer symbol) level) - (level-group-method-12 () none) - (level-group-method-13 () none) - (level-group-method-14 () none) - (level-group-method-15 () none) - (level-group-method-16 () none) - (level-group-method-17 () none) - (level-group-method-18 () none) + (level-get-for-use (_type_ symbol symbol) level) + (activate-levels! (_type_) int) + (debug-print-entities (_type_ symbol type string) none) + (debug-draw-actors (_type_ symbol) none) + (assign-draw-indices (_type_) none) + (actors-update (_type_) none) + (update-nav-meshes-method (_type_) none) (level-update (_type_) none) (level-get-target-inside (_type_) level) - (level-group-method-21 () none) + (init-level-system (_type_ symbol) none) (art-group-get-by-name (_type_ string (pointer level)) art-group) - (level-group-method-23 () none) - (level-group-method-24 () none) - (level-group-method-25 () none) - (level-group-method-26 (_type_ symbol) symbol) - (level-group-method-27 () none) - (level-group-method-28 (_type_) symbol) - (level-group-method-29 () none) - (level-group-method-30 () none) + (update-vis-volumes (_type_) none) + (level-group-method-24 (_type_) none) + (print-volume-sizes (_type_) none) + (status-of-level-and-borrows (_type_ symbol symbol) symbol) + (do-nothing (_type_) none) + (load-in-progress? (_type_) symbol) + (is-load-allowed? (_type_ (pointer symbol)) symbol) + (level-get-most-disposable (_type_) level) ) ) diff --git a/goal_src/jak3/engine/level/level-info.gc b/goal_src/jak3/engine/level/level-info.gc index 4cf36ead21..a68f209b8c 100644 --- a/goal_src/jak3/engine/level/level-info.gc +++ b/goal_src/jak3/engine/level/level-info.gc @@ -445,7 +445,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xbb8 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -15) :fog-height (meters 80) @@ -570,7 +570,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x1a4 #x1a4 #x1a4 #x30c #x32a) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -15) :fog-height (meters 80) @@ -602,7 +602,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -633,7 +633,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -664,7 +664,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -695,7 +695,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -726,7 +726,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -757,7 +757,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -3151,7 +3151,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x71c #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -100) :fog-height (meters 80) @@ -3334,7 +3334,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x13a1 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -3478,7 +3478,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xbea #x898 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -4234,7 +4234,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x4ba #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -15) :fog-height (meters 80) @@ -4355,7 +4355,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x82a #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -15) :fog-height (meters 80) @@ -4497,7 +4497,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x1b #x2ee #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -15) :fog-height (meters 80) @@ -4718,7 +4718,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x3e8 #xe6 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -5102,7 +5102,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xfa #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -5277,7 +5277,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xfa #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -6125,7 +6125,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xa28 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -10000) :fog-height (meters 80) @@ -8081,7 +8081,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x79e #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -8350,7 +8350,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x785 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -8383,7 +8383,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x21c #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) @@ -8515,7 +8515,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x195 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -10000) :fog-height (meters 80) @@ -8548,7 +8548,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x320 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -8839,7 +8839,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x258 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -9320,7 +9320,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x3e8 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -9754,7 +9754,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x4dd #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -9787,7 +9787,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x8ca #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) @@ -10238,7 +10238,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x898 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters 10) :fog-height (meters 80) @@ -11700,7 +11700,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x52d #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -13765,7 +13765,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x3e8 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) @@ -14201,7 +14201,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -14623,7 +14623,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x4c9 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) @@ -15756,7 +15756,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x3e8 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -16235,7 +16235,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xa #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -17556,7 +17556,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x285 #x8fc #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -17725,7 +17725,7 @@ :index #x110 :task-level #x9 :master-level 'factorya - :level-flags (level-flags lf10 lf12 lf13) + :level-flags (level-flags use-camera-other lf12 lf13) :packages '() :run-packages '("common") :memory-mode (level-memory-mode borrow) @@ -17754,7 +17754,7 @@ :index #x111 :task-level #x9 :master-level 'factorya - :level-flags (level-flags lf10 lf12 lf13) + :level-flags (level-flags use-camera-other lf12 lf13) :packages '() :run-packages '("common") :memory-mode (level-memory-mode borrow) @@ -17821,7 +17821,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xc4e #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -18193,7 +18193,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xc4e #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -18277,7 +18277,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xc4e #x9c4 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters 516) :fog-height (meters 80) @@ -18462,7 +18462,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x258 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) @@ -18578,7 +18578,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x384 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) diff --git a/goal_src/jak3/engine/level/level.gc b/goal_src/jak3/engine/level/level.gc index c6849ea815..663f0e57bd 100644 --- a/goal_src/jak3/engine/level/level.gc +++ b/goal_src/jak3/engine/level/level.gc @@ -5,5 +5,3901 @@ ;; name in dgo: level ;; dgos: GAME +(define-extern level-update-after-load (function level login-state level)) +(define-extern *level-type-list* type) +(define-extern city-sound-expand-want-list (function none)) + +(defmacro start-debug (str &rest args) + `(format 0 ,(string-append "[START] " str) ,@args) + ) + +(defun give-all-stuff () + (send-event *target* 'get-pickup (pickup-type health) 1000.0) + (send-event *target* 'get-pickup (pickup-type shield) 1000.0) + ;; (send-event *target* 'get-pickup (pickup-type skill) 100.0) + ;; (send-event *target* 'get-pickup (pickup-type gem) 100.0) + (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) + (send-event *target* 'get-pickup (pickup-type eco-pill-dark) 100.0) + (send-event *target* 'get-pickup (pickup-type eco-pill-light) 100.0) + (logior! (-> *game-info* features) + (game-feature + jakc + board board-launch board-zap + darkeco + darkjak darkjak darkjak-smack darkjak-bomb0 darkjak-bomb1 + lighteco + lightjak lightjak-regen lightjak-swoop lightjak-freeze lightjak-shield + gun + gun-red-1 gun-yellow-1 gun-blue-1 gun-dark-1 + gun-red-2 gun-yellow-2 gun-blue-2 gun-dark-2 + gun-red-3 gun-yellow-3 gun-blue-3 gun-dark-3)) + (logior! (-> *game-info* vehicles) + (game-vehicles + v-turtle + v-snake + v-scorpion + v-toad + v-fox + v-rhino + v-mirage + v-x-ride)) + ) + +(defmacro test-play () + "Temporary start macro" + `(begin + (start-debug "test-play~%") + (define *kernel-boot-message* 'play) + (start-debug "loading GAME.DGO~%") + (load-package "game" global) + (play-boot) + + ;; wait 10 frames and then turn on profile bars. + ;; they get shut off as part of startup, so we can't do it here. + (process-spawn-function + process + (lambda () + (dotimes (i 10) + (suspend) + ) + (true! *display-profile*) + ;; (true! *stats-profile-bars*) + ;; (true! *display-actor-marks*) + ;; (true! *display-bones*) + (give-all-stuff) + ) + ) + ) + ) + ;; DECOMP BEGINS +(defun level-memory-mode->string ((arg0 level-memory-mode)) + "Convert level-memory-mode enum to string." + (case arg0 + (((level-memory-mode large)) + "large" + ) + (((level-memory-mode city-center)) + "city-center" + ) + (((level-memory-mode tiny)) + "tiny" + ) + (((level-memory-mode borrow1)) + "borrow1" + ) + (((level-memory-mode borrow)) + "borrow" + ) + (((level-memory-mode small-center)) + "small-center" + ) + (((level-memory-mode alias)) + "alias" + ) + (((level-memory-mode borrow2)) + "borrow2" + ) + (((level-memory-mode tiny-edge)) + "tiny-edge" + ) + (((level-memory-mode borrow-city-small)) + "borrow-city-small" + ) + (((level-memory-mode borrow3)) + "borrow3" + ) + (((level-memory-mode medium)) + "medium" + ) + (((level-memory-mode tiny-center-micro)) + "tiny-center-micro" + ) + (((level-memory-mode small-edge)) + "small-edge" + ) + (((level-memory-mode borrow4)) + "borrow4" + ) + (((level-memory-mode tiny-center)) + "tiny-center" + ) + (((level-memory-mode city-tiny-edge)) + "city-tiny-edge" + ) + (((level-memory-mode tiny-center-small)) + "tiny-center-small" + ) + (((level-memory-mode borrow0)) + "borrow0" + ) + (((level-memory-mode micro)) + "micro" + ) + (else + "*unknown*" + ) + ) + ) + +;; WARN: Return type mismatch object vs level-load-info. +(defun lookup-level-info ((arg0 symbol)) + "Get the level load info. Symbol can be the level name, visname, nickname, or a symbol that contains a level-load-info value." + (the-as + level-load-info + (cond + (arg0 + (let ((v1-0 (-> arg0 value))) + (if (and (nonzero? v1-0) + v1-0 + (= (logand (the-as int v1-0) 7) 4) + (= (-> (the-as basic v1-0) type) level-load-info) + ) + (return (the-as level-load-info v1-0)) + ) + ) + (let* ((v1-2 *level-load-list*) + (a1-5 (car v1-2)) + ) + (while (not (null? v1-2)) + (let ((a1-6 (the-as level-load-info (-> (the-as symbol a1-5) value)))) + (if (or (= arg0 (-> a1-6 name)) (= arg0 (-> a1-6 visname)) (= arg0 (-> a1-6 nickname))) + (return a1-6) + ) + ) + (set! v1-2 (cdr v1-2)) + (set! a1-5 (car v1-2)) + ) + ) + default-level + ) + (else + default-level + ) + ) + ) + ) + +(defmethod get-callback-symbol-value-by-slot! ((this level-load-info) (arg0 int)) + "Look up value of symbol in callback-list with the given int as the car. Print warning if symbol's value is 0." + (let* ((v1-0 (the-as object (-> this callback-list))) + (a2-0 (-> (the-as pair v1-0) car)) + ) + (while (not (null? v1-0)) + (let ((a3-1 (/ (the-as int (-> (the-as pair a2-0) car)) 8)) + (t0-0 (-> (the-as pair a2-0) cdr)) + ) + (when (= a3-1 arg0) + (cond + ((nonzero? (-> (the-as symbol t0-0) value)) + (return (-> (the-as symbol t0-0) value)) + ) + (else + (format 0 "WARNING: level ~A has undefined callback slot ~D with value ~A~%" (-> this name) a3-1 t0-0) + (return #f) + ) + ) + (set! v1-0 0) + ) + ) + (set! v1-0 (-> (the-as pair v1-0) cdr)) + (set! a2-0 (-> (the-as pair v1-0) car)) + ) + ) + #f + ) + +;; WARN: Return type mismatch pair vs object. +(defmethod get-callback-by-slot! ((this level-load-info) (arg0 int)) + "Look up value in callback-list with the given int as the car and return it. Doesn't derefence the symbol." + (let* ((v1-0 (-> this callback-list)) + (a0-1 (car v1-0)) + ) + (while (not (null? v1-0)) + (let ((a2-1 (/ (the-as int (car a0-1)) 8)) + (a0-2 (cdr a0-1)) + ) + (if (= a2-1 arg0) + (return (the-as object a0-2)) + ) + ) + (set! v1-0 (cdr v1-0)) + (set! a0-1 (car v1-0)) + ) + ) + (the-as pair #f) + ) + +(defmethod load-in-progress? ((this level-group)) + "Is there a load happening now?" + (!= (-> *level* loading-level) (-> *level* level-default)) + ) + +(defmethod get-level-by-heap-ptr-and-status ((this level-group) (arg0 pointer) (arg1 symbol)) + "Look up a loaded level, given pointer inside of level's heap, + and the status of the level (active or loading)." + (case arg1 + (('active) + (dotimes (v1-1 (-> this length)) + (let ((a2-6 (-> this level v1-1))) + (when (= (-> a2-6 status) 'active) + (if (and (>= (the-as int arg0) (the-as int (-> a2-6 heap base))) + (< (the-as int arg0) (the-as int (-> a2-6 heap top-base))) + ) + (return a2-6) + ) + ) + ) + ) + ) + (('loading) + (dotimes (v1-5 (-> this length)) + (let ((a2-12 (-> this level v1-5))) + (when (!= (-> a2-12 status) 'inactive) + (if (and (>= (the-as int arg0) (the-as int (-> a2-12 heap base))) + (< (the-as int arg0) (the-as int (-> a2-12 heap top-base))) + ) + (return a2-12) + ) + ) + ) + ) + ) + ) + (the-as level #f) + ) + +;; WARN: Return type mismatch object vs symbol. +(defmethod is-load-allowed? ((this level-group) (arg0 (pointer symbol))) + "Does the exclusive-load setting allow us to load this level?" + (let ((v1-1 (the-as pair (-> *setting-control* user-current exclusive-load)))) + (if (or (not v1-1) (null? v1-1)) + (return (the-as symbol #t)) + ) + (let ((a0-4 (if arg0 + (-> arg0 0) + 'default + ) + ) + (v0-0 (the-as object #t)) + ) + (let ((a1-1 (car v1-1))) + (while (not (null? v1-1)) + (case (car a1-1) + (('allow) + (if (= (car (cdr a1-1)) a0-4) + (return (the-as symbol #t)) + ) + (if (= (car (cdr a1-1)) 'all) + (set! v0-0 #t) + ) + ) + (('ignore) + (if (= (car (cdr a1-1)) a0-4) + (return (the-as symbol #f)) + ) + (if (= (car (cdr a1-1)) 'all) + (set! v0-0 #f) + ) + ) + ) + (set! v1-1 (cdr v1-1)) + (set! a1-1 (car v1-1)) + ) + ) + (the-as symbol v0-0) + ) + ) + ) + +(defun remap-level-name ((arg0 level-load-info)) + "Get the load name, depending on if we should load a vis level or not." + (if (-> *level* vis?) + (-> arg0 visname) + (-> arg0 name) + ) + ) + +(defmethod get-art-group-by-name ((this level) (arg0 string)) + "Look up art-group in this level by name." + (countdown (s4-0 (-> this art-group art-group-array length)) + (if (name= (-> this art-group art-group-array s4-0 name) arg0) + (return (-> this art-group art-group-array s4-0)) + ) + ) + (the-as art-group #f) + ) + +(defmethod bsp-name ((this level)) + "Try getting the name from the BSP. If that fails, return the level's name (typically the same)." + (if (and (!= (-> this status) 'inactive) (-> this bsp) (nonzero? (-> this bsp name))) + (-> this bsp name) + (-> this name) + ) + ) + +(defun add-bsp-drawable ((arg0 bsp-header) (arg1 level) (arg2 symbol) (arg3 display-frame)) + "Callback function used by background-engine to draw a bsp. + Note that most drawing work has been moved into finish-background, + and the draw method called here just adds references to high-level rendering data + to lists. The exception is debug-draw, which does run here (only for draw-strip-lines)." + (draw arg0) + (if (nonzero? *display-strip-lines*) + (debug-draw arg0) + ) + (none) + ) + +(defmethod print ((this level)) + (format #t "#<~A ~A ~S @ #x~X>" (-> this type) (-> this status) (-> this name) this) + this + ) + +(defmethod relocate ((this bsp-header) (offset int)) + (let ((gp-0 (-> *level* loading-level))) + (when gp-0 + (cond + (this + (cond + ((not (type? this bsp-header)) + (format 0 "ERROR: level ~A is not a bsp-header.~%" (-> gp-0 name)) + (the-as bsp-header #f) + ) + ((not (file-info-correct-version? (-> this info) (file-kind level-bt) 0)) + (the-as bsp-header #f) + ) + ((< 2048 (-> this visible-list-length)) + (format + 0 + "ERROR: level ~A visible-list-length ~d is greater than 2048 (16384 drawables).~%" + (-> gp-0 name) + (-> this visible-list-length) + ) + (the-as bsp-header #f) + ) + (else + (set! (-> gp-0 bsp) this) + (set! (-> this level) gp-0) + this + ) + ) + ) + (else + (format 0 "ERROR: level ~A is not a valid file.~%" (-> gp-0 name)) + (the-as bsp-header #f) + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch level vs none. +(defmethod load-common-package ((this level)) + "Somewhat useless leftover from a more compliated package system. Will load common in some cases." + (when (not (or (not (-> this bsp)) (= *kernel-boot-mode* 'debug-boot))) + (if (not (null? (-> this info packages))) + (load-package "common" global) + ) + ) + (none) + ) + +(defmethod vis-clear ((this level)) + "Clear visibility data: both the info and the cached vis bits. Switch all-visible? to loading." + (countdown (v1-0 8) + (nop!) + (set! (-> this vis-info v1-0) #f) + ) + (dotimes (v1-3 128) + (set! (-> (the-as (pointer int128) (&+ (-> this vis-bits) (* v1-3 16)))) (the int128 0)) + ) + (set! (-> this all-visible?) 'loading) + 0 + (none) + ) + +(defmethod init-vis-from-bsp ((this level)) + "Link vis-infos from the bsp to the level." + (when (not (or (= (-> this status) 'inactive) (not (-> this bsp)))) + (set! (-> this all-visible?) 'loading) + (dotimes (s5-0 8) + (let ((s4-0 (-> this bsp vis-info s5-0))) + (cond + ((and s4-0 (nonzero? s4-0) (valid? s4-0 level-vis-info (the-as string #f) #f 0)) + (set! (-> this vis-info s5-0) s4-0) + (set! (-> s4-0 current-vis-string) (the-as uint -1)) + (if (= (-> s4-0 from-level) (-> this load-name)) + (set! (-> s4-0 from-bsp) (-> this bsp)) + (set! (-> s4-0 from-bsp) #f) + ) + (set! (-> s4-0 vis-bits) (the-as uint (-> this vis-bits))) + (set! (-> s4-0 flags) + (the-as vis-info-flag (logclear (-> s4-0 flags) (vis-info-flag in-iop loading vis-valid))) + ) + (set! *vis-boot* #t) + ) + (else + (set! (-> this vis-info s5-0) #f) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod level-get-for-use ((this level-group) (arg0 symbol) (arg1 symbol)) + "Request a level by name in the given state. + Will return quickly (non-blocking) and might not be able to get a level in the desired state, + though it will do some small amount of work to make progress on loading. + + This is the most general/powerful function like this: if there is no level with this name + it will kick out levels as needed to make a free slot, and set up a new level, and start + the load. This should only be used when you might want to start a load." + (local-vars (s5-1 level)) + + (start-debug "level-get-for-use: ~A ~A~%" arg0 arg1) + (init-level-system this #f) + (let* ((s2-0 (lookup-level-info arg0)) + (s1-0 (remap-level-name s2-0)) + ) + (start-debug " remapped name: ~A~%" s1-0) + (let ((s5-0 (level-get this s1-0))) + (start-debug " existing? ~A~%" s5-0) + (when s5-0 + (level-status-update! s5-0 arg1) + (set! s5-1 s5-0) + (goto cfg-28) + ) + ) + (let ((a0-7 (level-get-most-disposable this))) + (start-debug " most disposable: ~A~%" a0-7) + (set! s5-1 (if a0-7 + (level-status-update! a0-7 'inactive) + a0-7 + ) + ) + ) + (when (not level) + (format 0 "ERROR: could not find a slot to load ~A into.~%" arg0) + (set! s5-1 (the-as level #f)) + (goto cfg-28) + ) + (let ((s0-0 (-> s2-0 master-level))) + (when s0-0 + (let ((a0-10 (lookup-level-info s0-0))) + (when (not (logtest? (level-flags lf17) (-> a0-10 level-flags))) + (dotimes (v1-16 (-> this length)) + (let ((a0-15 (-> this level v1-16))) + (when (or (= (-> a0-15 status) 'active) (= (-> a0-15 status) 'alive) (= (-> a0-15 status) 'loaded)) + (if (= (-> a0-15 name) s0-0) + (goto cfg-24) + ) + ) + ) + ) + (format 0 "ERROR: level ~A is loading before master-level ~A~%" arg0 s0-0) + (break!) + 0 + ) + ) + ) + ) + (label cfg-24) + (let ((v1-22 (+ (-> this load-order) 1))) + (set! (-> this load-order) v1-22) + (set! (-> s5-1 load-order) v1-22) + ) + (set! (-> s5-1 info) s2-0) + (set! (-> s5-1 name) arg0) + (set! (-> s5-1 load-name) s1-0) + ) + (dotimes (v1-23 11) + (set! (-> s5-1 texture-anim-array v1-23) #f) + ) + (set! (-> s5-1 display?) #f) + (set! (-> s5-1 force-all-visible?) #f) + (set! (-> s5-1 force-inside?) #f) + (level-status-update! s5-1 'loading) + (level-status-update! s5-1 arg1) + (label cfg-28) + s5-1 + ) + +(defmethod do-nothing ((this level-group)) + "Empty method." + 0 + (none) + ) + +(defmethod status-of-level-and-borrows ((this level-group) (arg0 symbol) (arg1 symbol)) + "Get the combined status of a level and borrow levels." + (if (not arg0) + (return #f) + ) + (let ((s4-0 (level-get *level* arg0)) + (v1-3 (lookup-level-info arg0)) + ) + (cond + (s4-0 + (when (and (or (= (-> s4-0 status) 'loaded) (= (-> s4-0 status) 'active)) + (and (-> s4-0 info borrow) (!= arg1 'ignore-borrow)) + ) + (dotimes (s3-1 5) + (let ((v1-14 (-> s4-0 info borrow borrow-info s3-1))) + (when v1-14 + (when (car (cdr v1-14)) + (let ((v1-15 (status-of-level-and-borrows this (the-as symbol (car v1-14)) arg1))) + (if (!= v1-15 (-> s4-0 status)) + (return v1-15) + ) + ) + ) + ) + ) + ) + ) + (-> s4-0 status) + ) + ((and v1-3 (-> v1-3 borrow) (-> v1-3 borrow alias)) + (b! + (not (or (= arg0 'ctywide-ff) + (= arg0 'ctywide-kg) + (= arg0 'ctywide-mh) + (= arg0 'ctywide-ff-kg) + (= arg0 'ctywide-ff-mh) + (= arg0 'ctywide-mh-kg) + ) + ) + cfg-42 + :delay (nop!) + ) + (let ((s5-1 (the-as object *borrow-city-status-list*))) + (b! #t cfg-43 :delay (nop!)) + (label cfg-42) + (set! s5-1 (-> v1-3 borrow alias)) + (label cfg-43) + (let* ((a0-26 s5-1) + (s4-1 ((method-of-type (rtype-of a0-26) length) a0-26)) + ) + (while (and (> s4-1 0) (car s5-1)) + (when (and (!= (car s5-1) 'dummy) + (or (= arg1 'all) (let ((a0-31 (lookup-level-info (the-as symbol (car s5-1))))) + (and a0-31 (not (logtest? (-> a0-31 level-flags) (level-flags lf15)))) + ) + ) + ) + (let ((v1-29 (status-of-level-and-borrows *level* (the-as symbol (car s5-1)) arg1))) + (if (!= v1-29 'active) + (return v1-29) + ) + ) + ) + (set! s5-1 (cdr (cdr s5-1))) + (+! s4-1 -2) + ) + ) + ) + 'active + ) + ) + ) + ) + +(defmethod level-status-update! ((this level) (arg0 symbol)) + "Try to update the level to the given status, calling whatever is needed to make it happen. + This can do both loading, linking, login, and activation. + This is somewhat similar to level-get-for-use, but requires that you already have the level object. + This function is the way to transition from loaded to alive/active." + (start-debug "level-status-update: ~A ~A (current ~A)~%" this arg0 (-> this status)) + (case arg0 + (('inactive) + (-> this status) + (unload! this) + ) + (('loading) + (case (-> this status) + (('inactive) + (load-begin this) + ) + ) + ) + (('loading-bt) + (case (-> this status) + (('loading) + (set! (-> this status) arg0) + (do-nothing *level*) + (load-continue this) + ) + ) + ) + (('loading-done) + (case (-> this status) + (('loading-bt) + (set! (-> this status) arg0) + (do-nothing *level*) + ) + ) + ) + (('loaded) + (case (-> this status) + (('loading-done) + (login-begin this) + ) + (('alive 'active) + (deactivate this) + ) + ) + ) + (('alive 'active) + (when *dproc* + (case (-> this status) + (('loaded) + (birth this) + (level-status-update! this arg0) + ) + (('alive) + (when (and *dproc* (= arg0 'active)) + (when (zero? (-> this display-start-time)) + (set! (-> this display-start-time) (the-as uint (-> *display* real-clock frame-counter))) + 0 + ) + (remove-by-param1 *background-draw-engine* (the-as int (-> this bsp))) + (add-connection *background-draw-engine* *dproc* add-bsp-drawable (-> this bsp) this #f) + (dotimes (v1-49 20) + (set! (-> this closest-object v1-49) 0.0) + (set! (-> this texture-mask v1-49 mask quad) (the-as uint128 0)) + ) + (set! (-> this status) 'active) + (do-nothing *level*) + (assign-draw-indices *level*) + ) + ) + ) + ) + ) + ) + this + ) + +(define *login-state* (new 'global 'login-state)) + +(define *print-login* #t) + +(defun load-buffer-resize ((arg0 level) (arg1 dgo-header)) + "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))))) + ) + (((level-memory-mode tiny-edge)) + (set! (-> arg0 load-buffer-size) (+ (-> arg1 length) 2048)) + ) + ) + (let ((v1-4 (logand -64 (+ (-> arg0 load-buffer-size) 63)))) + (if (= arg1 (-> arg0 load-buffer 0)) + (set! (-> arg0 load-buffer 0) (- (-> arg0 load-buffer 1) v1-4)) + (set! (-> arg0 load-buffer 1) + (the-as uint (&- (logand -64 (&+ (-> arg0 heap top-base) 0)) (the-as uint v1-4))) + ) + ) + ) + (set! (-> arg0 heap top) (the-as pointer (-> arg0 load-buffer 0))) + 0 + (none) + ) + +(defmethod load-continue ((this level)) + "Main function to run level loading/linking. + Called by the engine to make progress on loading levels." + (local-vars (sv-16 symbol)) + (when (-> this linking) + (when (nonzero? (link-resume)) + (set! (-> this linking) #f) + (case (-> this status) + (('loading) + (when (not (-> *texture-relocate-later* memcpy)) + (cond + ((= (-> this load-buffer-mode) (level-memory-mode borrow)) + (let ((a2-0 (logand -64 (&+ (-> this heap current) 63)))) + (dgo-load-continue a2-0 a2-0 a2-0) + ) + ) + (else + (load-buffer-resize this (-> this load-buffer-last)) + (dgo-load-continue + (the-as pointer (-> this load-buffer 0)) + (the-as pointer (-> this load-buffer 1)) + (logand -64 (&+ (-> this heap current) 63)) + ) + ) + ) + ) + ) + (('loading-bt) + (level-status-update! this 'loading-done) + (level-status-update! this 'loaded) + ) + ) + ) + (set! this this) + (goto cfg-39) + ) + (when (-> *texture-relocate-later* memcpy) + (relocate-later) + (load-buffer-resize this (-> this load-buffer-last)) + (dgo-load-continue + (the-as pointer (-> this load-buffer 0)) + (the-as pointer (-> this load-buffer 1)) + (logand -64 (&+ (-> this heap current) 63)) + ) + (set! this this) + (goto cfg-39) + ) + (case (-> this status) + (('loading) + (set! sv-16 (the-as symbol #f)) + (let ((s5-0 (dgo-load-get-next (& sv-16)))) + (when s5-0 + (set! (-> this load-buffer-last) (the-as dgo-header s5-0)) + (+! (-> *level* load-size) (-> (the-as (pointer uint32) s5-0))) + (set! (-> *level* load-time) + (* 0.016666668 (the float (- (-> *display* real-clock integral-frame-counter) *dgo-time*))) + ) + (set! (-> *level* load-login-time) + (* 0.016666668 (the float (- (-> *display* real-clock integral-frame-counter) *dgo-time*))) + ) + (cond + ((not sv-16) + (cond + ((= (-> this load-buffer-mode) (level-memory-mode borrow)) + (cond + ((dgo-load-link (the-as dgo-header s5-0) (-> this heap) (the-as uint (-> this heap top-base)) *print-login* #f) + (when (not (-> *texture-relocate-later* memcpy)) + (let ((a2-8 (logand -64 (&+ (-> this heap current) 63)))) + (dgo-load-continue a2-8 a2-8 a2-8) + ) + ) + ) + (else + (set! (-> this linking) #t) + ) + ) + ) + ((dgo-load-link (the-as dgo-header s5-0) (-> this heap) (-> this load-buffer 1) *print-login* #f) + (when (not (-> *texture-relocate-later* memcpy)) + (load-buffer-resize this (the-as dgo-header s5-0)) + (dgo-load-continue + (the-as pointer (-> this load-buffer 0)) + (the-as pointer (-> this load-buffer 1)) + (logand -64 (&+ (-> this heap current) 63)) + ) + ) + ) + (else + (set! (-> this linking) #t) + ) + ) + ) + (else + (set! (-> this heap top) (-> this heap top-base)) + (level-status-update! this 'loading-bt) + ) + ) + ) + ) + ) + (('login) + (level-update-after-load this *login-state*) + ) + (('loading-bt) + (let ((a0-36 (logand -64 (&+ (-> this heap current) 63)))) + (cond + ((dgo-load-link + (the-as dgo-header a0-36) + (-> this heap) + (the-as uint (-> this heap top-base)) + *print-login* + #t + ) + (level-status-update! this 'loading-done) + (level-status-update! this 'loaded) + ) + (else + (set! (-> this linking) #t) + ) + ) + ) + ) + ) + (label cfg-39) + this + ) + +(defun level-find-borrow-slot ((borrower-level level) (mode level-memory-mode)) + "Set up a level to 'borrow' from another. + This function finds the right 'host' level, which should + have prepared a heap for this level. This level will then + be configured to use this heap." + (local-vars (a2-1 level) (found-slot symbol)) + (let ((host-level-borrow-slot -1)) + (dotimes (host-level-candidate-idx 10) + (let ((host-level-candidate (-> *level* level host-level-candidate-idx))) + (when (and (or (= (-> host-level-candidate status) 'active) (= (-> host-level-candidate status) 'loaded)) + (and (-> host-level-candidate info borrow) + (begin + (let ((mode2 mode)) + (set! found-slot + (cond + ((= mode2 (level-memory-mode borrow)) + (dotimes (host-level-slot-idx 5) + (when (and (-> host-level-candidate info borrow borrow-info host-level-slot-idx) + (= (car (-> host-level-candidate info borrow borrow-info host-level-slot-idx)) (-> borrower-level name)) + (nonzero? (-> host-level-candidate info borrow borrow-size host-level-slot-idx)) + ) + (set! host-level-borrow-slot host-level-slot-idx) + (set! found-slot #t) + (goto cfg-70) + ) + ) + #f + ) + ((= mode2 (level-memory-mode borrow-city-small)) + (when (= (-> borrower-level info master-level) (-> host-level-candidate name)) + (dotimes (t0-13 3) + (when (not (-> host-level-candidate borrow-level t0-13)) + (set! host-level-borrow-slot t0-13) + (set! found-slot #t) + (goto cfg-70) + ) + ) + #f + ) + ) + ((= mode2 (level-memory-mode borrow0)) + (when (and (= (-> borrower-level info master-level) (-> host-level-candidate name)) + (nonzero? (-> host-level-candidate info borrow borrow-size 0)) + ) + (set! host-level-borrow-slot 0) + (set! found-slot #t) + (goto cfg-70) + found-slot + ) + ) + ((= mode2 (level-memory-mode borrow1)) + (when (and (= (-> borrower-level info master-level) (-> host-level-candidate name)) + (nonzero? (-> host-level-candidate info borrow borrow-size 1)) + ) + (set! host-level-borrow-slot 1) + (set! found-slot #t) + (goto cfg-70) + found-slot + ) + ) + ((= mode2 (level-memory-mode borrow2)) + (when (and (= (-> borrower-level info master-level) (-> host-level-candidate name)) + (nonzero? (-> host-level-candidate info borrow borrow-size 2)) + ) + (set! host-level-borrow-slot 2) + (set! found-slot #t) + (goto cfg-70) + found-slot + ) + ) + ((= mode2 (level-memory-mode borrow3)) + (when (and (= (-> borrower-level info master-level) (-> host-level-candidate name)) + (nonzero? (-> host-level-candidate info borrow borrow-size 3)) + ) + (set! host-level-borrow-slot 3) + (set! found-slot #t) + (goto cfg-70) + found-slot + ) + ) + ((= mode2 (level-memory-mode borrow4)) + (when (and (= (-> borrower-level info master-level) (-> host-level-candidate name)) + (nonzero? (-> host-level-candidate info borrow borrow-size 4)) + ) + (set! host-level-borrow-slot 4) + (set! found-slot #t) + (goto cfg-70) + found-slot + ) + ) + ) + ) + ) + (label cfg-70) + (and found-slot + (>= host-level-borrow-slot 0) + (not (-> host-level-candidate borrow-level host-level-borrow-slot)) + ) + ) + ) + ) + (set! a2-1 host-level-candidate) + (goto cfg-82) + ) + ) + ) + (set! a2-1 (the-as level #f)) + (label cfg-82) + (cond + (a2-1 + (set! (-> borrower-level borrow-from-level) a2-1) + (set! (-> a2-1 borrow-level host-level-borrow-slot) borrower-level) + (mem-copy! + (the-as pointer (-> borrower-level heap)) + (the-as pointer (-> a2-1 borrow-heap host-level-borrow-slot)) + 16 + ) + ) + (else + (format + 0 + "ERROR: level ~A could not find free ~S bank in the level-group heap~%" + (-> borrower-level name) + (level-memory-mode->string mode) + ) + (break!) + 0 + ) + ) + ) + 0 + (none) + ) + +(defmethod load-begin ((this level)) + "Start loading data of a level." + (local-vars + (sv-16 level) + (memory-unused? (function level-group int symbol)) + (sv-24 int) + (mask int) + (sv-40 int) + (sv-48 int) + (sv-56 int) + ) + (dotimes (v1-0 5) + (set! (-> this borrow-level v1-0) #f) + ) + (set! (-> this borrow-from-level) #f) + (set! (-> this memory-mask) (the-as uint 0)) + (let ((mem-mode (-> this info memory-mode))) + (dotimes (v1-4 10) + (set! sv-16 (-> *level* level v1-4)) + (when (and (or (= (-> sv-16 status) 'active) (= (-> sv-16 status) 'loaded)) (-> sv-16 info borrow)) + (dotimes (a0-16 5) + (when (and (-> sv-16 info borrow borrow-info a0-16) + (= (car (-> sv-16 info borrow borrow-info a0-16)) (-> this name)) + (nonzero? (-> sv-16 info borrow borrow-size a0-16)) + ) + (when (!= mem-mode (level-memory-mode borrow)) + (format 0 "WARNING: level ~A upgraded to borrow~%" (-> this name)) + (set! mem-mode (level-memory-mode borrow)) + ) + (goto cfg-28) + ) + ) + ) + ) + (label cfg-28) + (case mem-mode + (((level-memory-mode borrow) + (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) + ) + (level-find-borrow-slot this mem-mode) + ) + (else + (set! memory-unused? (lambda ((arg0 level-group) (arg1 int)) + (dotimes (v1-0 11) + (if (logtest? (-> arg0 level v1-0 memory-mask) arg1) + (return #f) + ) + ) + #t + ) + ) + (set! sv-24 0) + (set! mask 0) + (set! sv-40 0) + (dotimes (v1-15 10) + (let ((lev (-> *level* level v1-15))) + (when (and (or (= (-> lev status) 'active) (= (-> lev status) 'loaded)) + (or (= (-> lev info memory-mode) (level-memory-mode micro)) + (= (-> lev info memory-mode) (level-memory-mode city-tiny-edge)) + ) + ) + (case (-> lev info memory-mode) + (((level-memory-mode city-tiny-edge)) + (set! 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)) + #x3c000 + 60 + ) + ) + ) + ) + (((level-memory-mode micro)) + (set! 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! sv-56 0) + (case mem-mode + (((level-memory-mode large)) + (case mask + ((3) + (let ((s4-0 #x3ffc0)) + (when (memory-unused? *level* s4-0) + (set! sv-24 48) + (set! sv-56 s4-0) + (goto cfg-322) + ) + ) + (let ((s4-1 #x3ffc)) + (when (memory-unused? *level* s4-1) + (set! sv-24 16) + (set! sv-56 s4-1) + (goto cfg-322) + ) + ) + ) + ((#x30000) + (let ((s4-2 4095)) + (when (memory-unused? *level* s4-2) + (set! sv-24 0) + (set! sv-56 s4-2) + (goto cfg-322) + ) + ) + (let ((s4-3 #xfff0)) + (when (memory-unused? *level* s4-3) + (set! sv-24 32) + (set! sv-56 s4-3) + (goto cfg-322) + ) + ) + ) + (else + (let ((s4-4 4095)) + (when (memory-unused? *level* s4-4) + (set! sv-24 0) + (set! sv-56 s4-4) + (goto cfg-322) + ) + ) + (let ((s4-5 #x3ffc0)) + (when (memory-unused? *level* s4-5) + (set! sv-24 48) + (set! sv-56 s4-5) + (goto cfg-322) + ) + ) + ) + ) + ) + (((level-memory-mode medium)) + (let ((s4-6 511)) + (when (memory-unused? *level* s4-6) + (set! sv-24 0) + (set! sv-56 s4-6) + (goto cfg-322) + ) + ) + (let ((s4-7 #x3fe00)) + (when (memory-unused? *level* s4-7) + (set! sv-24 73) + (set! sv-56 s4-7) + (goto cfg-322) + ) + ) + ) + (((level-memory-mode small-center)) + (case mask + ((3) + (case sv-40 + ((#x3c000) + (let ((s4-8 #x3f00)) + (when (memory-unused? *level* s4-8) + (set! sv-24 64) + (set! sv-56 s4-8) + (goto cfg-322) + ) + ) + ) + (else + (let ((s4-9 4032)) + (when (memory-unused? *level* s4-9) + (set! sv-24 48) + (set! sv-56 s4-9) + (goto cfg-322) + ) + ) + ) + ) + ) + ((#x30000) + (case sv-40 + ((#x3c000) + (let ((s4-10 1008)) + (when (memory-unused? *level* s4-10) + (set! sv-24 32) + (set! sv-56 s4-10) + (goto cfg-322) + ) + ) + ) + (else + (let ((s4-11 4032)) + (when (memory-unused? *level* s4-11) + (set! sv-24 48) + (set! sv-56 s4-11) + (goto cfg-322) + ) + ) + ) + ) + ) + (else + (let ((s4-12 4032)) + (when (memory-unused? *level* s4-12) + (set! sv-24 48) + (set! sv-56 s4-12) + (goto cfg-322) + ) + ) + ) + ) + ) + (((level-memory-mode city-center)) + (let ((s4-13 4032)) + (when (memory-unused? *level* s4-13) + (set! sv-24 48) + (set! sv-56 s4-13) + (goto cfg-322) + ) + ) + ) + (((level-memory-mode small-edge)) + (case mask + ((3) + (case sv-40 + ((#x3c000) + (let ((s4-14 252)) + (when (memory-unused? *level* s4-14) + (set! sv-24 16) + (set! sv-56 s4-14) + (goto cfg-322) + ) + ) + (let ((s4-15 #x3f00)) + (when (memory-unused? *level* s4-15) + (set! sv-24 64) + (set! sv-56 s4-15) + (goto cfg-322) + ) + ) + ) + (else + (let ((s4-16 #x3f000)) + (when (memory-unused? *level* s4-16) + (set! sv-24 98) + (set! sv-56 s4-16) + (goto cfg-322) + ) + ) + (let ((s4-17 4032)) + (when (memory-unused? *level* s4-17) + (set! sv-24 48) + (set! sv-56 s4-17) + (goto cfg-322) + ) + ) + ) + ) + ) + ((#x30000) + (case sv-40 + ((#x3c000) + (let ((s4-18 #xfc00)) + (when (memory-unused? *level* s4-18) + (set! sv-24 82) + (set! sv-56 s4-18) + (goto cfg-322) + ) + ) + (let ((s4-19 1008)) + (when (memory-unused? *level* s4-19) + (set! sv-24 32) + (set! sv-56 s4-19) + (goto cfg-322) + ) + ) + ) + (else + (let ((s4-20 63)) + (when (memory-unused? *level* s4-20) + (set! sv-24 0) + (set! sv-56 s4-20) + (goto cfg-322) + ) + ) + (let ((s4-21 4032)) + (when (memory-unused? *level* s4-21) + (set! sv-24 48) + (set! sv-56 s4-21) + (goto cfg-322) + ) + ) + ) + ) + ) + (else + (let ((s4-22 63)) + (when (memory-unused? *level* s4-22) + (set! sv-24 0) + (set! sv-56 s4-22) + (goto cfg-322) + ) + ) + (let ((s4-23 #x3f000)) + (when (memory-unused? *level* s4-23) + (set! sv-24 98) + (set! sv-56 s4-23) + (goto cfg-322) + ) + ) + ) + ) + ) + (((level-memory-mode micro)) + (let ((s4-24 3)) + (when (memory-unused? *level* s4-24) + (set! sv-24 0) + (set! sv-56 s4-24) + (goto cfg-322) + ) + ) + (let ((s4-25 #x30000)) + (when (memory-unused? *level* s4-25) + (set! sv-24 130) + (set! sv-56 s4-25) + (goto cfg-322) + ) + ) + ) + (((level-memory-mode tiny-edge) (level-memory-mode city-tiny-edge)) + (let ((v1-126 mask)) + (cond + ((or (zero? v1-126) (= v1-126 3)) + (let ((s4-26 60)) + (when (memory-unused? *level* s4-26) + (set! sv-24 16) + (set! sv-56 s4-26) + (goto cfg-322) + ) + ) + (let ((s4-27 #x3c000)) + (when (memory-unused? *level* s4-27) + (set! sv-24 114) + (set! sv-56 s4-27) + (goto cfg-322) + ) + ) + ) + ((= v1-126 #x30000) + (let ((s4-28 #xf000)) + (when (memory-unused? *level* s4-28) + (set! sv-24 98) + (set! sv-56 s4-28) + (goto cfg-322) + ) + ) + (let ((s4-29 15)) + (when (memory-unused? *level* s4-29) + (set! sv-24 0) + (set! sv-56 s4-29) + (goto cfg-322) + ) + ) + ) + ) + ) + ) + (((level-memory-mode tiny)) + (let ((v1-143 mask)) + (cond + ((or (zero? v1-143) (= v1-143 3)) + (let ((s4-30 60)) + (when (memory-unused? *level* s4-30) + (set! sv-24 16) + (set! sv-56 s4-30) + (goto cfg-322) + ) + ) + (let ((s4-31 #x3c000)) + (when (memory-unused? *level* s4-31) + (set! sv-24 114) + (set! sv-56 s4-31) + (goto cfg-322) + ) + ) + (let ((s4-32 #x3c00)) + (when (memory-unused? *level* s4-32) + (set! sv-24 82) + (set! sv-56 s4-32) + (goto cfg-322) + ) + ) + (let ((s4-33 960)) + (when (memory-unused? *level* s4-33) + (set! sv-24 48) + (set! sv-56 s4-33) + (goto cfg-322) + ) + ) + ) + ((= v1-143 #x30000) + (let ((s4-34 #xf000)) + (when (memory-unused? *level* s4-34) + (set! sv-24 98) + (set! sv-56 s4-34) + (goto cfg-322) + ) + ) + (let ((s4-35 15)) + (when (memory-unused? *level* s4-35) + (set! sv-24 0) + (set! sv-56 s4-35) + (goto cfg-322) + ) + ) + (let ((s4-36 240)) + (when (memory-unused? *level* s4-36) + (set! sv-24 32) + (set! sv-56 s4-36) + (goto cfg-322) + ) + ) + (let ((s4-37 3840)) + (when (memory-unused? *level* s4-37) + (set! sv-24 64) + (set! sv-56 s4-37) + (goto cfg-322) + ) + ) + ) + ) + ) + ) + (((level-memory-mode tiny-center)) + (let ((v1-176 mask)) + (cond + ((or (zero? v1-176) (= v1-176 3)) + (let ((s4-38 #x3c00)) + (when (memory-unused? *level* s4-38) + (set! sv-24 82) + (set! sv-56 s4-38) + (goto cfg-322) + ) + ) + (let ((s4-39 960)) + (when (memory-unused? *level* s4-39) + (set! sv-24 48) + (set! sv-56 s4-39) + (goto cfg-322) + ) + ) + ) + ((= v1-176 #x30000) + (let ((s4-40 240)) + (when (memory-unused? *level* s4-40) + (set! sv-24 32) + (set! sv-56 s4-40) + (goto cfg-322) + ) + ) + (let ((s4-41 3840)) + (when (memory-unused? *level* s4-41) + (set! sv-24 64) + (set! sv-56 s4-41) + (goto cfg-322) + ) + ) + ) + ) + ) + ) + (((level-memory-mode tiny-center-small)) + (let ((v1-194 mask)) + (cond + ((or (zero? v1-194) (= v1-194 3)) + (let ((s4-42 #x3e00)) + (when (memory-unused? *level* s4-42) + (set! sv-24 72) + (set! sv-56 s4-42) + (goto cfg-322) + ) + ) + (let ((s4-43 1984)) + (when (memory-unused? *level* s4-43) + (set! sv-24 48) + (set! sv-56 s4-43) + (goto cfg-322) + ) + ) + ) + ((= v1-194 #x30000) + (let ((s4-44 496)) + (when (memory-unused? *level* s4-44) + (set! sv-24 32) + (set! sv-56 s4-44) + (goto cfg-322) + ) + ) + (let ((s4-45 3968)) + (when (memory-unused? *level* s4-45) + (set! sv-24 56) + (set! sv-56 s4-45) + (goto cfg-322) + ) + ) + ) + ) + ) + ) + (((level-memory-mode tiny-center-micro)) + (let ((v1-213 mask)) + (cond + ((or (zero? v1-213) (= v1-213 3)) + (let ((s4-46 448)) + (when (memory-unused? *level* s4-46) + (set! sv-24 48) + (set! sv-56 s4-46) + (goto cfg-322) + ) + ) + (let ((s4-47 #x3800)) + (when (memory-unused? *level* s4-47) + (set! sv-24 90) + (set! sv-56 s4-47) + (goto cfg-322) + ) + ) + ) + ((= v1-213 #x30000) + (let ((s4-48 3584)) + (when (memory-unused? *level* s4-48) + (set! sv-24 72) + (set! sv-56 s4-48) + (goto cfg-322) + ) + ) + (let ((s4-49 112)) + (when (memory-unused? *level* s4-49) + (set! sv-24 32) + (set! sv-56 s4-49) + (goto cfg-322) + ) + ) + ) + ) + ) + ) + ) + (label cfg-322) + (cond + ((zero? sv-56) + (format + 0 + "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 + ) + (dotimes (s5-1 11) + (let ((s4-51 (-> *level* level s5-1))) + (when (!= (-> s4-51 status) 'inactive) + (format 0 "~Tlevel ~2D ~16S " s5-1 (-> s4-51 name)) + (format + 0 + "~16S bits #b~18,'0B~%" + (if (nonzero? (-> s4-51 info)) + (level-memory-mode->string (-> s4-51 info memory-mode)) + ) + (-> s4-51 memory-mask) + ) + ) + ) + ) + #t + (break!) + 0 + ) + (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)) + ) + ) + (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)) + ) + ) + ) + ) + ) + ) + ) + ) + (set! loading-level (-> this heap)) + (set! (-> *level* loading-level) this) + (set! (-> this level-type) #f) + (set! *level-type-list* (the-as type (&-> this level-type))) + (set! (-> *level* log-in-level-bsp) #f) + (set! (-> this nickname) #f) + (set! (-> this bsp) #f) + (set! (-> this entity) #f) + (set! (-> this linking) #f) + (set! (-> this task-mask) (-> *setting-control* user-current task-mask)) + (vis-clear this) + (set! (-> this load-start-time) (the-as uint (-> *display* real-clock frame-counter))) + (set! (-> this load-stop-time) (the-as uint 0)) + (set! (-> this display-start-time) (the-as uint 0)) + (set! (-> this part-engine) #f) + (dotimes (v1-258 4) + (set! (-> this user-object v1-258) #f) + ) + (set! (-> this load-id) (the-as uint (new-sound-id))) + (set! (-> this status) 'loading) + (do-nothing *level*) + (set! (-> *texture-pool* allocate-func) texture-page-level-allocate) + (if (= (-> this load-name) (-> this info visname)) + (format (clear *temp-string*) "~S" (-> this info nickname)) + (format (clear *temp-string*) "~S" (-> this name)) + ) + (set! (-> *temp-string* data 8) (the-as uint 0)) + (format *temp-string* ".DGO") + (set! (-> this heap top) (-> this heap top-base)) + (set! (-> *level* load-level) (-> this load-name)) + (set! (-> *level* load-size) (the-as uint 0)) + (set! (-> *level* load-time) 0.0) + (set! (-> *level* load-login-time) 0.0) + (set! (-> this code-memory-start) (-> this heap current)) + (let ((v1-278 (-> this info memory-mode))) + (cond + ((or (or (= v1-278 (level-memory-mode borrow)) (or (= v1-278 (level-memory-mode borrow0)) + (= v1-278 (level-memory-mode borrow1)) + (= v1-278 (level-memory-mode borrow2)) + (= v1-278 (level-memory-mode borrow3)) + (= v1-278 (level-memory-mode borrow4)) + (= v1-278 (level-memory-mode micro)) + (= v1-278 (level-memory-mode borrow-city-small)) + ) + ) + (-> this borrow-from-level) + (logtest? (-> this info level-flags) (level-flags lf6)) + ) + (set! (-> this load-buffer-mode) (level-memory-mode borrow)) + (let ((t0-2 (logand -64 (&+ (-> this heap current) 63)))) + (dgo-load-begin *temp-string* (the-as uint128 (-> this load-id)) t0-2 t0-2 t0-2) + ) + ) + (else + (let* ((v1-287 (-> this info memory-mode)) + (s4-52 + (cond + ((= v1-287 (level-memory-mode micro)) + #x80000 + ) + ((= v1-287 (level-memory-mode tiny-center-micro)) + #xc0000 + ) + ((or (= v1-287 (level-memory-mode tiny-center)) + (= v1-287 (level-memory-mode tiny-edge)) + (= v1-287 (level-memory-mode tiny)) + (= v1-287 (level-memory-mode city-tiny-edge)) + ) + #xc8000 + ) + (else + #x1b5800 + ) + ) + ) + (s5-4 (kmalloc (-> this heap) s4-52 (kmalloc-flags align-64 top) "dgo-level-buf-2")) + (s3-2 (kmalloc (-> this heap) s4-52 (kmalloc-flags align-64 top) "dgo-level-buf-2")) + ) + (format 0 "-----------> begin load ~A [~S] buffers ~d bytes~%" (-> this load-name) *temp-string* s4-52) + (set! (-> this load-buffer 0) (the-as uint s3-2)) + (set! (-> this load-buffer 1) (the-as uint s5-4)) + (set! (-> this load-buffer-size) (the-as uint s4-52)) + (set! (-> this load-buffer-mode) (level-memory-mode micro)) + (dgo-load-begin + *temp-string* + (the-as uint128 (-> this load-id)) + s3-2 + s5-4 + (logand -64 (&+ (-> this heap current) 63)) + ) + ) + ) + ) + ) + this + ) + +(defmethod login-begin ((this level)) + "Start logging in loaded level data." + (set! (-> *texture-pool* allocate-func) texture-page-default-allocate) + (format 0 "LOGIN-BEGIN: ~A~%" this) + (cond + ((-> this bsp) + (format 0 " and with a bsp too~%") + (let ((s5-0 (-> this bsp))) + (set! (-> s5-0 level tfrag-gs-test) + (if (logtest? (-> s5-0 texture-flags 0) (texture-page-flag alpha-enable)) + (new 'static 'gs-test :ate #x1 :atst (gs-atest always) :zte #x1 :ztst (gs-ztest greater-equal)) + (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + ) + (set! (-> *level* log-in-level-bsp) (-> this bsp)) + (login-level-textures *texture-pool* this (-> this bsp texture-page-count) (-> this bsp texture-ids)) + (dotimes (v1-10 10) + (set! (-> this sky-mask mask data v1-10) 0) + ) + (let* ((s4-0 (-> this info callback-list)) + (v1-14 (car s4-0)) + ) + (while (not (null? s4-0)) + (let ((s3-0 (/ (the-as int (car v1-14)) 8)) + (a3-1 (the-as symbol (cdr v1-14))) + ) + (when (and (< (the-as uint 1) s3-0) (< s3-0 (the-as uint 13))) + (if (nonzero? (-> a3-1 value)) + (set! (-> this texture-anim-array (+ s3-0 -2)) (init! (the-as texture-anim-array (-> a3-1 value)))) + (format 0 "WARNING: level ~A has undefined texture anim array ~A~%" (-> this name) a3-1) + ) + ) + ) + (set! s4-0 (cdr s4-0)) + (set! v1-14 (car s4-0)) + ) + ) + (build-masks s5-0) + ) + (set! (-> *login-state* state) -1) + (set! (-> *login-state* pos) (the-as uint 0)) + (set! (-> *login-state* elts) (the-as uint 0)) + (dotimes (v1-28 11) + (set! (-> this eye-slot-lowres v1-28) (the-as uint 0)) + (set! (-> this eye-slot-highres v1-28) (the-as uint 0)) + ) + (set! (-> this status) 'login) + (do-nothing *level*) + ) + (else + (level-status-update! this 'inactive) + (set! loading-level global) + (set! (-> *level* loading-level) (-> *level* level-default)) + (set! *level-type-list* (the-as type 0)) + 0 + ) + ) + this + ) + +;; WARN: Found some very strange gotos. Check result carefully, this is not well tested. +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 s5, Count] +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count] +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count] +(defun level-update-after-load ((arg0 level) (arg1 login-state)) + "Run the post-load state machine to login level data." + (local-vars + (v1-4 int) + (v1-244 int) + (s5-0 int) + (sv-16 drawable) + (sv-32 proxy-prototype-array-tie) + (sv-48 int) + (sv-64 prototype-bucket-tie) + (sv-80 int) + (sv-96 adgif-shader) + ) + (set! *level-index* (-> arg0 index)) + 0 + (let* ((s3-0 (-> arg0 bsp)) + (s2-0 (-> s3-0 drawable-trees)) + ) + 0 + ; (.mfc0 s5-0 Count) + (label cfg-1) + 0 + ; (.mfc0 v1-4 Count) + ; (let ((v1-5 (- v1-4 s5-0))) + ; (when (< #x186a0 v1-5) + ; (set! arg0 arg0) + ; (goto cfg-116) + ; ) + ; ) + (let ((s0-0 (the-as int (-> arg1 pos)))) + (when (= (-> arg1 state) -1) + (when (< s0-0 (-> s2-0 length)) + (let ((s1-0 (-> s2-0 trees (the-as uint s0-0)))) + (cond + ((= (-> (the-as drawable-tree-tfrag s1-0) type) drawable-tree-tfrag) + (dotimes (s0-1 (-> (the-as drawable-tree-tfrag s1-0) length)) + (cond + ((= (-> (the-as drawable-tree-tfrag s1-0) arrays s0-1 type) drawable-inline-array-tfrag) + (set! (-> arg1 elt (-> arg1 elts)) (-> (the-as drawable-tree-tfrag s1-0) arrays s0-1)) + (+! (-> arg1 elts) 1) + ) + (else + (login (-> (the-as drawable-tree-tfrag s1-0) arrays s0-1)) + ) + ) + ) + ) + ((= (-> s1-0 type) drawable-tree-instance-tie) + (set! (-> arg1 elt (-> arg1 elts)) s1-0) + (+! (-> arg1 elts) 1) + ) + (else + (login s1-0) + (if (nonzero? (-> s3-0 hfrag-drawable)) + (login (-> s3-0 hfrag-drawable)) + ) + ) + ) + ) + (+! (-> arg1 pos) 1) + (goto cfg-1) + ) + (let ((v1-42 (- (the-as uint s0-0) (-> s2-0 length)))) + (when (< (the-as int v1-42) (-> arg0 art-group art-group-array length)) + (let ((s0-2 (-> arg0 art-group art-group-array v1-42)) + (s1-1 (-> *kernel-context* login-level-index)) + ) + (set! (-> *kernel-context* login-level-index) (-> arg0 index)) + (login s0-2) + (if (contains-art-for-other-group? s0-2) + (link-art-to-master s0-2) + ) + (set! (-> *kernel-context* login-level-index) s1-1) + ) + (+! (-> arg1 pos) 1) + (goto cfg-1) + ) + ) + (set! (-> arg1 pos) (the-as uint 0)) + (set! (-> arg1 state) 0) + (goto cfg-1) + ) + (when (< (-> arg1 state) (the-as int (-> arg1 elts))) + (set! sv-16 (-> arg1 elt (-> arg1 state))) + (cond + ((= (-> sv-16 type) drawable-inline-array-tfrag) + (set! *texture-masks-array* (-> arg0 bsp tfrag-masks)) + (cond + ((< s0-0 (-> (the-as drawable-inline-array-tfrag sv-16) length)) + (dotimes (s1-2 200) + (when (< s0-0 (-> (the-as drawable-inline-array-tfrag sv-16) length)) + (login (-> (the-as drawable-inline-array-tfrag sv-16) data (the-as uint s0-0))) + (set! s0-0 (the-as int (+ (the-as uint s0-0) 1))) + ) + ) + (set! (-> arg1 pos) (the-as uint s0-0)) + ) + (else + (set! (-> arg1 pos) (the-as uint 0)) + (set! s0-0 (+ (-> arg1 state) 1)) + (set! (-> arg1 state) s0-0) + ) + ) + ) + ((= (-> sv-16 type) drawable-tree-instance-tie) + (let ((s1-3 (-> (the-as drawable-tree-instance-tie sv-16) prototypes prototype-array-tie))) + (set! sv-32 (-> (the-as drawable-tree-instance-tie sv-16) prototypes)) + (when (< s0-0 (-> s1-3 length)) + (set! sv-48 0) + (while (< sv-48 10) + (when (< s0-0 (-> s1-3 length)) + (set! sv-64 (-> s1-3 array-data (the-as uint s0-0))) + (+! (-> sv-32 prototype-max-qwc) 32) + (cond + ((logtest? (-> sv-64 flags) (prototype-flags tpage-alpha)) + (set! *texture-masks* (-> *level* level *level-index* bsp alpha-masks data (-> sv-64 texture-masks-index))) + ) + ((logtest? (-> sv-64 flags) (prototype-flags tpage-water)) + (set! *texture-masks* (-> *level* level *level-index* bsp water-masks data (-> sv-64 texture-masks-index))) + ) + (else + (set! *texture-masks* (-> *level* level *level-index* bsp tfrag-masks data (-> sv-64 texture-masks-index))) + ) + ) + (when (and *debug-segment* (-> *screen-shot-work* highres-enable)) + (dotimes (v1-116 4) + (+! (-> sv-64 dists data v1-116) 40960000.0) + (set! (-> sv-64 rdists data v1-116) (/ 1.0 (-> sv-64 dists data v1-116))) + ) + ) + (set! sv-80 0) + (while (< sv-80 4) + (let ((a0-63 (-> sv-64 tie-geom sv-80))) + (when (nonzero? a0-63) + (+! (-> sv-32 prototype-max-qwc) (* 7 (-> a0-63 length))) + (login a0-63) + ) + ) + (set! sv-80 (+ sv-80 1)) + ) + (set! s0-0 (the-as int (+ (the-as uint s0-0) 1))) + ) + (set! sv-48 (+ sv-48 1)) + ) + (set! (-> arg1 pos) (the-as uint s0-0)) + ) + (when (= (the-as uint s0-0) (-> s1-3 length)) + (dotimes (s0-3 (-> s1-3 length)) + (let ((v1-146 (-> s1-3 array-data s0-3))) + (cond + ((logtest? (-> v1-146 flags) (prototype-flags tpage-alpha)) + (set! *texture-masks* (-> *level* level *level-index* bsp alpha-masks data (-> v1-146 texture-masks-index))) + ) + ((logtest? (-> v1-146 flags) (prototype-flags tpage-water)) + (set! *texture-masks* (-> *level* level *level-index* bsp water-masks data (-> v1-146 texture-masks-index))) + ) + (else + (set! *texture-masks* (-> *level* level *level-index* bsp tfrag-masks data (-> v1-146 texture-masks-index))) + ) + ) + (set! sv-96 (-> v1-146 envmap-shader)) + ) + (when (nonzero? sv-96) + (let ((v0-8 (adgif-shader-login-no-remap sv-96))) + (when v0-8 + (dotimes (v1-150 3) + (dotimes (a0-82 3) + (set! (-> (the-as (pointer int32) (+ (+ (* v1-150 16) (* a0-82 4)) (the-as int *texture-masks*)))) + (logior (-> (the-as (pointer int32) (+ (* a0-82 4) (the-as int *texture-masks*) (* v1-150 16))) 0) + (-> (the-as (pointer int32) (+ (* a0-82 4) (the-as int v0-8) (* v1-150 16))) 15) + ) + ) + ) + (set! (-> *texture-masks* data v1-150 dist) + (fmax (-> *texture-masks* data v1-150 dist) (-> v0-8 masks data v1-150 dist)) + ) + ) + ) + ) + (set! (-> sv-96 tex1) (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (set! (-> sv-96 clamp) (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))) + (set! (-> sv-96 alpha) (new 'static 'gs-miptbp :tbp1 #x58)) + (set! (-> sv-96 reg-0) (the-as uint 6)) + (set! (-> sv-96 reg-1) (the-as uint 20)) + (set! (-> sv-96 reg-2) (the-as uint 52)) + (set! (-> sv-96 reg-3) (the-as uint 8)) + (set! (-> sv-96 reg-4) (the-as uint 66)) + ) + ) + (set! (-> arg1 pos) (the-as uint 0)) + (+! (-> arg1 state) 1) + ) + ) + ) + ) + (goto cfg-1) + ) + (when (= (-> arg1 state) (-> arg1 elts)) + (let ((v1-168 (-> arg0 bsp))) + (cond + ((or (zero? (-> v1-168 nav-meshes)) (= (the-as uint s0-0) (-> v1-168 nav-meshes length))) + (set! (-> arg1 pos) (the-as uint 0)) + (+! (-> arg1 state) 1) + ) + (else + (initialize-nav-mesh! (-> v1-168 nav-meshes (the-as uint s0-0))) + (+! (-> arg1 pos) 1) + ) + ) + ) + (goto cfg-1) + ) + (when (zero? (the-as uint s0-0)) + (set! (-> arg1 pos) (the-as uint 1)) + (set! arg0 arg0) + (goto cfg-116) + ) + ) + ) + (set! (-> arg0 nickname) (-> arg0 bsp nickname)) + (let ((f0-6 (-> arg0 bsp subdivide-close)) + (f1-3 (-> arg0 bsp subdivide-far)) + ) + (when (and (= f0-6 0.0) (= f1-3 0.0)) + (set! f0-6 122880.0) + (set! f1-3 286720.0) + ) + (set! (-> *subdivide-settings* close (-> arg0 index)) f0-6) + (set! (-> *subdivide-settings* far (-> arg0 index)) f1-3) + (set! (-> *subdivide-settings* close 11) f0-6) + (set! (-> *subdivide-settings* far 11) f1-3) + ) + (when (and *debug-segment* (-> *screen-shot-work* highres-enable)) + (set! (-> *subdivide-settings* close (-> arg0 index)) 40960000.0) + (set! (-> *subdivide-settings* far (-> arg0 index)) 41369600.0) + (set! (-> *subdivide-settings* close 11) 40960000.0) + (set! (-> *subdivide-settings* far 11) 41369600.0) + ) + (init-vis-from-bsp arg0) + (if (nonzero? (-> arg0 info part-engine-max)) + (set! (-> arg0 part-engine) + (new 'loading-level 'engine 'sparticle-launcher (the-as int (* (-> arg0 info part-engine-max) 16)) connection) + ) + ) + (load-common-package arg0) + (clear-mood-context (-> arg0 mood-context)) + (set! (-> arg0 mood-init) + (the-as (function mood-context none) (get-callback-symbol-value-by-slot! (-> arg0 info) 23)) + ) + (if (-> arg0 mood-init) + ((-> arg0 mood-init) (-> arg0 mood-context)) + ) + (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)))) + ) + (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))) + (set! (-> a0-121 top) (-> a0-121 top-base)) + ) + ) + ) + (set! (-> arg0 draw-priority) (-> arg0 info draw-priority)) + (set! (-> arg0 status) 'loaded) + (do-nothing *level*) + (mark-hud-warp-sprite-dirty *texture-pool*) + (set! loading-level global) + (set! (-> *level* loading-level) (-> *level* level-default)) + (set! *level-type-list* (the-as type 0)) + (set! (-> *level* log-in-level-bsp) #f) + (set! (-> arg0 load-stop-time) (the-as uint (-> *display* real-clock frame-counter))) + 0 + (.mfc0 v1-244 Count) + (- v1-244 s5-0) + (set! (-> *level* load-login-time) + (* 0.016666668 (the float (- (-> *display* real-clock integral-frame-counter) *dgo-time*))) + ) + (label cfg-116) + arg0 + ) + +(defmethod birth ((this level)) + "Start running a level." + (local-vars (sv-96 int)) + (case (-> this status) + (('loaded) + (let ((s5-0 loading-level) + (s4-0 (-> *level* loading-level)) + (s3-0 (-> *level* log-in-level-bsp)) + (s2-1 *level-type-list*) + ) + (let ((s1-0 (not (-> this entity)))) + (set! loading-level (-> this heap)) + (set! (-> *level* log-in-level-bsp) (-> this bsp)) + (set! (-> *level* loading-level) this) + (set! *level-type-list* (the-as type (&-> this level-type))) + (cond + ((valid? (-> this bsp light-hash) light-hash (the-as string #f) #t 0) + (set! (-> this light-hash) (-> this bsp light-hash)) + ) + (else + (set! (-> this light-hash) (the-as light-hash 0)) + 0 + ) + ) + (birth (-> this bsp)) + (set! (-> this status) 'alive) + (do-nothing *level*) + (set! (-> this render?) #t) + (copy-perms-to-level! *game-info* this) + (send-event *camera* 'level-activate (-> this name)) + (send-event *target* 'level-activate (-> this name)) + (when s1-0 + (let ((s1-1 (get-callback-symbol-value-by-slot! (-> this info) 33))) + (if (and s1-1 (type? s1-1 function)) + ((the-as (function object object) s1-1) this) + ) + ) + ) + ) + (let ((s1-2 (-> this status))) + (set! (-> this status) 'active) + (do-nothing *level*) + (update-task-masks 'level) + (assign-draw-indices *level*) + (let ((s0-0 (-> this bsp nav-meshes))) + (when (nonzero? s0-0) + (set! sv-96 0) + (while (< sv-96 (-> s0-0 length)) + (birth! (-> s0-0 sv-96)) + (set! sv-96 (+ sv-96 1)) + ) + ) + ) + (if (and (!= (-> this bsp city-level-info) 0) *traffic-manager*) + (send-event *traffic-manager* 'level-loaded this) + ) + (let ((s0-1 (get-callback-symbol-value-by-slot! (-> this info) 35))) + (if (and s0-1 (type? s0-1 function)) + ((the-as (function object object object) s0-1) this 'display) + ) + ) + (set! (-> this status) s1-2) + ) + (set! loading-level s5-0) + (set! (-> *level* loading-level) s4-0) + (set! (-> *level* log-in-level-bsp) s3-0) + (set! *level-type-list* s2-1) + ) + ) + ) + this + ) + +(defmethod deactivate ((this level)) + "Keep a level in memory, but kill entities and stop drawing it." + (case (-> this status) + (('active 'alive) + (format 0 "----------- deactivate(kill) ~A (status ~A)~%" this (-> this status)) + (if (and (!= (-> this bsp city-level-info) 0) *traffic-manager*) + (send-event *traffic-manager* 'level-killed this) + ) + (let ((s5-0 (get-callback-symbol-value-by-slot! (-> this info) 36))) + (if (and s5-0 (type? s5-0 function)) + ((the-as (function object object) s5-0) this) + ) + ) + (copy-perms-from-level! *game-info* this) + (send-event *target* 'level-deactivate (-> this name)) + (remove-by-param1 *background-draw-engine* (the-as int (-> this bsp))) + (let ((s5-1 (-> this status))) + (set! (-> this status) 'shutdown) + (do-nothing *level*) + (deactivate-entities (-> this bsp)) + (set! (-> this status) s5-1) + ) + (kill-all-particles-in-level this) + (unload-from-heap *anim-manager* (-> this heap)) + (set! (-> this inside-boxes?) #f) + (set! (-> this meta-inside?) #f) + (set! (-> this force-inside?) #f) + (set! (-> this status) 'loaded) + (do-nothing *level*) + (set! (-> this light-hash) (the-as light-hash 0)) + (set! (-> this all-visible?) 'loading) + (dotimes (v1-35 128) + (set! (-> (the-as (pointer int128) (&+ (-> this vis-bits) (* v1-35 16)))) (the int128 0)) + ) + (countdown (v1-38 8) + (let ((a0-23 (-> this vis-info v1-38))) + (if a0-23 + (set! (-> a0-23 current-vis-string) (the-as uint -1)) + ) + ) + ) + (when (logtest? (-> this info base-task-mask) (task-mask primary0)) + (let ((v1-45 (task-mask))) + (dotimes (a0-24 (-> *level* length)) + (let ((a1-15 (-> *level* level a0-24))) + (if (= (-> a1-15 status) 'active) + (set! v1-45 (logior v1-45 (logand (-> a1-15 info base-task-mask) (task-mask primary0)))) + ) + ) + ) + (when (not (logtest? v1-45 (task-mask primary0))) + (dotimes (v1-48 (-> *level* length)) + (let ((a0-30 (-> *level* level v1-48))) + (if (= (-> a0-30 status) 'active) + (logior! (-> a0-30 task-mask) (task-mask primary0)) + ) + ) + ) + ) + ) + ) + ) + ) + (if (= (-> *level* log-in-level-bsp) (-> this bsp)) + (set! (-> *level* log-in-level-bsp) #f) + ) + this + ) + +(defmethod unload! ((this level)) + "Remove level from memory." + (deactivate this) + (when (!= (-> this status) 'inactive) + (when (not (logtest? (level-flags lf17) (-> this info level-flags))) + (dotimes (s5-0 (-> *level* length)) + (let ((v1-10 (-> *level* level s5-0))) + (when (or (= (-> v1-10 status) 'active) (= (-> v1-10 status) 'alive) (= (-> v1-10 status) 'loaded)) + (when (= (-> v1-10 info master-level) (-> this name)) + (format + 0 + "ERROR: level ~A is unloading but level ~A depends on it as a master-level~%" + (-> this name) + (-> v1-10 name) + ) + (break!) + 0 + ) + ) + ) + ) + ) + (dotimes (s5-1 5) + (when (-> this borrow-level s5-1) + (unload! (-> this borrow-level s5-1)) + (set! (-> this borrow-level s5-1) #f) + ) + ) + (when (-> this borrow-from-level) + (dotimes (v1-30 5) + (if (= this (-> this borrow-from-level borrow-level v1-30)) + (set! (-> this borrow-from-level borrow-level v1-30) #f) + ) + ) + (set! (-> this borrow-from-level) #f) + ) + (case (-> this status) + (('loading 'loading-bt) + (dgo-load-cancel (the-as int (-> this load-id))) + (link-reset) + ) + (('alive 'active 'loaded) + (when (-> this entity) + (let ((s5-2 (get-callback-symbol-value-by-slot! (-> this info) 34))) + (if (and s5-2 (type? s5-2 function)) + ((the-as (function level object) s5-2) this) + ) + ) + ) + ) + ) + (when (or (= (-> this status) 'loaded) + (= (-> this status) 'alive) + (= (-> this status) 'active) + (= (-> this status) 'login) + ) + (dotimes (s5-3 (-> this art-group art-group-array length)) + (let ((s4-0 (-> this art-group art-group-array s5-3))) + (if (contains-art-for-other-group? s4-0) + (unlink-art-to-master s4-0) + ) + (art-method-10 s4-0) + ) + ) + (case (-> this status) + (('alive 'active 'loaded) + (let* ((s5-4 (-> this info callback-list)) + (v1-68 (car s5-4)) + ) + (while (not (null? s5-4)) + (let ((s4-1 (/ (the-as int (car v1-68)) 8)) + (v1-69 (the-as object (cdr v1-68))) + ) + (when (and (< (the-as uint 1) s4-1) (< s4-1 (the-as uint 13))) + (if (nonzero? (-> (the-as symbol v1-69) value)) + (set! (-> this texture-anim-array (+ s4-1 -2)) + (clear! (the-as texture-anim-array (-> (the-as symbol v1-69) value))) + ) + ) + ) + ) + (set! s5-4 (cdr s5-4)) + (set! v1-68 (car s5-4)) + ) + ) + ) + ) + ) + (set! (-> this bsp) #f) + (set! (-> this entity) #f) + (set! (-> this status) 'inactive) + (do-nothing *level*) + (set! (-> this linking) #f) + (set! (-> this art-group string-array length) 0) + (set! (-> this art-group art-group-array length) 0) + (set! (-> this mem-usage-block) (the-as memory-usage-block 0)) + (set! (-> this mem-usage) 0) + (set! (-> this part-engine) #f) + (dotimes (v1-83 4) + (set! (-> this user-object v1-83) #f) + ) + (dotimes (v1-86 11) + (set! (-> this texture-anim-array v1-86) #f) + ) + (countdown (s5-5 (-> this loaded-texture-page-count)) + (dotimes (v1-89 32) + (when (= (-> this loaded-texture-page s5-5) (-> *texture-pool* common-page v1-89)) + (set! (-> *texture-pool* common-page v1-89) (the-as texture-page 0)) + 0 + ) + ) + (unload-page *texture-pool* (-> this loaded-texture-page s5-5)) + ) + (set! (-> this loaded-texture-page-count) 0) + (unlink-shaders-in-heap *texture-page-dir* (-> this heap)) + (unlink-part-group-by-heap (-> this heap)) + (unlink-lightning-spec-by-heap (-> this heap)) + (particle-adgif-cache-flush) + (set! (-> this loaded-text-info-count) 0) + (dotimes (s5-6 2) + (let ((v1-103 (-> *art-control* buffer s5-6 pending-load-file))) + (if (and (>= (the-as int v1-103) (the-as int (-> this heap base))) + (< (the-as int v1-103) (the-as int (-> this heap top-base))) + ) + (set-pending-file (-> *art-control* buffer s5-6) (the-as string #f) -1 (the-as handle #f) 100000000.0) + ) + ) + ) + (let ((v1-112 0) + (a0-79 0) + (a1-27 (-> this level-type)) + ) + (while a1-27 + (+! a0-79 1) + (+! v1-112 (-> a1-27 psize)) + (set! (-> a1-27 symbol value) (the-as object 0)) + (set! a1-27 (the-as type (-> a1-27 method-table 8))) + ) + ) + (let* ((s5-7 (-> this info packages)) + (a0-80 (car s5-7)) + ) + (while (not (null? s5-7)) + (case (rtype-of a0-80) + ((symbol) + (unload (symbol->string (the-as symbol a0-80))) + ) + ((string) + (unload (the-as string a0-80)) + ) + ) + (set! s5-7 (cdr s5-7)) + (set! a0-80 (car s5-7)) + ) + ) + (vis-clear this) + (let ((v1-127 (-> this heap))) + (set! (-> v1-127 current) (-> v1-127 base)) + ) + (set! (-> this memory-mask) (the-as uint 0)) + (set! (-> this code-memory-start) (the-as pointer 0)) + (set! (-> this code-memory-end) (the-as pointer 0)) + (set! (-> this level-type) #f) + (when (= (-> *level* loading-level) this) + (set! loading-level global) + (set! (-> *level* loading-level) (-> *level* level-default)) + (set! (-> *level* log-in-level-bsp) #f) + (set! *level-type-list* (the-as type 0)) + 0 + ) + (assign-draw-indices *level*) + ) + this + ) + +(defmethod is-object-visible? ((this level) (arg0 int)) + "Is drawable arg0 visible? Note that this will return #f if the visibility data is not loaded." + ;; check the vis bits! + (let* (;; lwu v1, 388(a0) + (vis-data (-> this vis-bits)) + ;; sra a0, a1, 3 + (byte-idx (sar arg0 3)) + ;; daddu v1, a0, v1 + ;; lb v1, 0(v1) + (vis-byte (-> (the (pointer int8) vis-data) byte-idx)) + ;; andi a0, a1, 7 + (bit-idx (logand arg0 #b111)) + ;; addiu a0, a0, 56 + (shift-amount (+ bit-idx 56)) ;; 56 + 8 = 64, to set the sign bit + ;; dsllv v1, v1, a0 + (check-sign-word (the int (shl vis-byte shift-amount))) ;; signed + ) + ;; slt v1, v1, r0 v1 = (csw < 0) + ;; daddiu v0, s7, 8 + ;; movz v0, s7, v1 if (csw >= 0) result = false + ;;(format 0 "vis check ~D ~X ~X ~A~%" arg0 vis-byte check-sign-word (>= check-sign-word 0)) + (< check-sign-word 0) + ) + ) + +(defmethod inside-bsp? ((this level)) + "Check if the camera is inside the BSP for this level." + (cond + ((not (-> this bsp)) + #f + ) + ((-> this force-inside?) + #t + ) + (else + (zero? (-> this bsp cam-outside-bsp)) + ) + ) + ) + +(defmethod debug-print-region-splitbox ((this level) (arg0 vector) (arg1 object)) + (cond + ((or (not (-> this bsp)) (zero? (-> this bsp region-tree))) + ) + ((nonzero? (-> this bsp region-tree)) + (debug-print (-> this bsp region-tree) arg0 arg1) + ) + ) + 0 + (none) + ) + +(defmethod mem-usage ((this level) (usage memory-usage-block) (flags int)) + (when (= (-> this status) 'active) + (set! (-> usage length) (max 68 (-> usage length))) + (set! (-> usage data 67 name) "entity-links") + (+! (-> usage data 67 count) (-> this entity length)) + (let ((v1-8 (asize-of (-> this entity)))) + (+! (-> usage data 67 used) v1-8) + (+! (-> usage data 67 total) (logand -16 (+ v1-8 15))) + ) + (mem-usage (-> this art-group) usage flags) + (set! (-> usage length) (max 67 (-> usage length))) + (set! (-> usage data 66 name) "level-code") + (+! (-> usage data 66 count) 1) + (let ((v1-20 (&- (-> this code-memory-end) (the-as uint (-> this code-memory-start))))) + (+! (-> usage data 66 used) v1-20) + (+! (-> usage data 66 total) (logand -16 (+ v1-20 15))) + ) + (countdown (s3-0 (-> this loaded-texture-page-count)) + (mem-usage (-> this loaded-texture-page s3-0) usage flags) + ) + (countdown (s3-1 (-> this loaded-text-info-count)) + (mem-usage (-> this loaded-text-info s3-1) usage flags) + ) + (countdown (s3-2 8) + (let ((s2-0 (-> this vis-info s3-2))) + (when s2-0 + (cond + ((zero? s3-2) + (set! (-> usage length) (max 63 (-> usage length))) + (set! (-> usage data 62 name) "bsp-leaf-vis-self") + (+! (-> usage data 62 count) 1) + (let ((v1-47 (+ (asize-of s2-0) (-> s2-0 allocated-length)))) + (+! (-> usage data 62 used) v1-47) + (+! (-> usage data 62 total) (logand -16 (+ v1-47 15))) + ) + ) + (else + (set! (-> usage length) (max 64 (-> usage length))) + (set! (-> usage data 63 name) "bsp-leaf-vis-adj") + (+! (-> usage data 63 count) 1) + (let ((v1-58 (+ (asize-of s2-0) (-> s2-0 allocated-length)))) + (+! (-> usage data 63 used) v1-58) + (+! (-> usage data 63 total) (logand -16 (+ v1-58 15))) + ) + ) + ) + ) + ) + ) + (mem-usage (-> this bsp) usage flags) + ) + this + ) + +(defmethod init-level-system ((this level-group) (arg0 symbol)) + "If needed, initialize the level system by loading common/art packages and allocating level heaps." + (when (zero? (-> *level* heap base)) + (start-debug "allocating levels~%") + (kmemopen global "level-heaps") + (when (nmember "game" *kernel-packages*) + (set! *kernel-packages* (cons "art" *kernel-packages*)) + (set! *kernel-packages* (cons "common" *kernel-packages*)) + ) + (load-package "art" global) + (if arg0 + (load-package "common" global) + ) + (let ((s5-1 (if (and arg0 (not *debug-segment*)) + #x11f7000 + #x1af2800 + ) + ) + (gp-1 (-> this heap)) + ) + (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)) + (set! (-> gp-1 top) (-> gp-1 top-base)) + ) + (start-debug "GLOBAL~%") + (inspect global) + (start-debug "LEVEL~%") + (inspect (-> this heap)) + (kmemclose) + ) + 0 + (none) + ) + +(defmethod level-get-with-status ((this level-group) (arg0 symbol)) + "Get the first level with the given status, #f if there are none." + (dotimes (v1-0 (-> this length)) + (if (= (-> this level v1-0 status) arg0) + (return (-> this level v1-0)) + ) + ) + (the-as level #f) + ) + +(defmethod level-get-most-disposable ((this level-group)) + "Get the level inside this level-group that should + be used to load a new level." + (dotimes (v1-0 (-> this length)) + (case (-> this level v1-0 status) + (('inactive) + (return (-> this level v1-0)) + ) + ) + ) + (dotimes (v1-6 (-> this length)) + (case (-> this level v1-6 status) + (('loading 'loading-bt) + (return (-> this level v1-6)) + ) + ) + ) + (dotimes (v1-12 (-> this length)) + (case (-> this level v1-12 status) + (('loaded) + (return (-> this level v1-12)) + ) + ) + ) + (let ((v0-0 (the-as level #f))) + (dotimes (v1-18 (-> this length)) + (case (-> this level v1-18 status) + (('active) + (if (and (not (-> this level v1-18 inside-boxes?)) + (or (not v0-0) (< (-> this level v1-18 info priority) (-> v0-0 info priority))) + ) + (set! v0-0 (-> this level v1-18)) + ) + ) + ) + ) + v0-0 + ) + ) + +(defmethod level-get ((this level-group) (arg0 symbol)) + "Lookup loaded level by name." + (when arg0 + (dotimes (v1-0 (-> this length)) + (if (and (!= (-> this level v1-0 status) 'inactive) + (or (= (-> this level v1-0 name) arg0) (= (-> this level v1-0 load-name) arg0)) + ) + (return (-> this level v1-0)) + ) + ) + (the-as level #f) + ) + ) + +(defmethod art-group-get-by-name ((this level-group) (arg0 string) (arg1 (pointer level))) + "Check all levels for an art group with the given name." + (countdown (s4-0 11) + (let ((s3-0 (-> *level* level s4-0))) + (when (or (= (-> s3-0 status) 'active) (= (-> s3-0 status) 'reserved)) + (countdown (s2-0 (-> s3-0 art-group art-group-array length)) + (when (name= (-> s3-0 art-group art-group-array s2-0 name) arg0) + (if arg1 + (set! (-> arg1 0) s3-0) + ) + (return (-> s3-0 art-group art-group-array s2-0)) + ) + ) + ) + ) + ) + (the-as art-group #f) + ) + +(defmethod activate-levels! ((this level-group)) + "Make all levels 'active!" + (dotimes (s5-0 (-> this length)) + (level-status-update! (-> this level s5-0) 'active) + ) + 0 + ) + +(defmethod level-get-target-inside ((this level-group)) + "Get the level that the player is 'in'." + (let ((s5-0 (target-pos 0))) + (let ((v1-1 (-> *load-state* vis-nick))) + (when v1-1 + (dotimes (a0-3 (-> this length)) + (let ((a1-3 (-> this level a0-3))) + (when (= (-> a1-3 status) 'active) + (if (and (= (-> a1-3 name) v1-1) (not (logtest? (-> a1-3 info level-flags) (level-flags lf1)))) + (return a1-3) + ) + ) + ) + ) + ) + ) + (let ((v1-5 (-> *game-info* current-continue level))) + (dotimes (a0-5 (-> this length)) + (let ((a1-8 (-> this level a0-5))) + (when (= (-> a1-8 status) 'active) + (if (and (= (-> a1-8 name) v1-5) (not (logtest? (-> a1-8 info level-flags) (level-flags lf1)))) + (return a1-8) + ) + ) + ) + ) + ) + (let ((s4-0 (the-as level #f))) + (let ((f30-0 0.0)) + (dotimes (s3-0 (-> this length)) + (let ((s2-0 (-> this level s3-0))) + (when (= (-> s2-0 status) 'active) + (let ((f0-0 (vector-vector-distance (-> s2-0 bsp bsphere) s5-0))) + (if (and (-> s2-0 inside-boxes?) + (not (logtest? (-> s2-0 info level-flags) (level-flags lf1))) + (or (not s4-0) (< f0-0 f30-0)) + ) + (set! s4-0 s2-0) + ) + ) + ) + ) + ) + ) + (if s4-0 + (return s4-0) + ) + ) + ) + (dotimes (v1-26 (-> this length)) + (let ((a0-11 (-> this level v1-26))) + (when (= (-> a0-11 status) 'active) + (if (and (-> a0-11 meta-inside?) (not (logtest? (-> a0-11 info level-flags) (level-flags lf1)))) + (return a0-11) + ) + ) + ) + ) + (let ((v0-1 (the-as level #f))) + 0.0 + (dotimes (v1-29 (-> this length)) + (let ((a0-16 (-> this level v1-29))) + (when (= (-> a0-16 status) 'active) + (if (and (not v0-1) (not (logtest? (-> a0-16 info level-flags) (level-flags lf1)))) + (set! v0-1 a0-16) + ) + ) + ) + ) + v0-1 + ) + ) + +(defmethod mem-usage ((this level-group) (usage memory-usage-block) (flags int)) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this level s3-0) usage flags) + ) + this + ) + +(defun bg ((arg0 symbol)) + "Debug function to start playing a given level." + (set! *cheat-mode* (if *debug-segment* + 'debug + #f + ) + ) + (let ((v1-2 (lookup-level-info arg0))) + (cond + ((= (-> v1-2 visname) arg0) + (set! (-> *level* vis?) #t) + (set! arg0 (-> v1-2 name)) + ) + (else + (set! (-> *level* vis?) #f) + (set! (-> *kernel-context* low-memory-message) #f) + ) + ) + (let ((a0-8 (-> v1-2 memory-mode))) + (if (or (= a0-8 (level-memory-mode borrow)) (or (= a0-8 (level-memory-mode borrow0)) + (= a0-8 (level-memory-mode borrow1)) + (= a0-8 (level-memory-mode borrow2)) + (= a0-8 (level-memory-mode borrow3)) + (= a0-8 (level-memory-mode borrow4)) + (= a0-8 (level-memory-mode borrow-city-small)) + ) + ) + (set! (-> v1-2 memory-mode) (level-memory-mode small-edge)) + ) + ) + (let* ((s5-0 (-> v1-2 run-packages)) + (a0-12 (car s5-0)) + ) + (while (not (null? s5-0)) + (case (rtype-of a0-12) + ((symbol) + (load-package (symbol->string (the-as symbol a0-12)) global) + ) + ((string) + (load-package (the-as string a0-12) global) + ) + ) + (set! s5-0 (cdr s5-0)) + (set! a0-12 (car s5-0)) + ) + ) + ) + (let ((s5-1 (level-get-for-use *level* arg0 'active))) + (while (and s5-1 + (or (= (-> s5-1 status) 'loading) (= (-> s5-1 status) 'loading-bt) (= (-> s5-1 status) 'login)) + (not *dproc*) + ) + (load-continue s5-1) + ) + (reset! *load-state*) + (set! (-> *load-state* vis-nick) (-> s5-1 name)) + (set! (-> *load-state* want 0 name) (-> s5-1 name)) + (set! (-> *load-state* want 0 display?) 'display) + (if (-> s5-1 info continues) + (set-continue! *game-info* (the-as basic (car (-> s5-1 info continues))) #f) + ) + ) + (dotimes (v1-35 3) + (set! (-> *load-state* want-sound v1-35 name) (-> *game-info* current-continue want-sound v1-35)) + (set! (-> *load-state* want-sound v1-35 mode) (sound-bank-mode unknown)) + ) + (add-borrow-levels *load-state*) + (activate-levels! *level*) + (set! *print-login* #f) + (cond + ((= arg0 'halfpipe) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 14) + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1)) + ) + (else + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id unk3)) + ) + ) + 0 + (none) + ) + +(defconstant *default-boot-level* 'wasall) + +(defmacro play-desert () + `(start 'play (get-continue-by-name *game-info* "desert-start")) + ) + +(defmacro play-was () + `(start 'play (get-continue-by-name *game-info* "wascitya-start")) + ) + +(defun play ((arg0 symbol) (arg1 symbol)) + "Start (or restart) the game! + This will start up the display process, and load the initial level." + (start-debug "call to play!~%") + (kmemopen global "level-boot") + (when *kernel-boot-level* + (bg (string->symbol (the-as string *kernel-boot-level*))) + (on #f) + (kmemclose) + (kmemclose) + (return 0) + ) + *kernel-boot-message* + (let ((s5-0 (if *debug-segment* + *default-boot-level* + 'title + ) + ) + ) + (stop 'play) + (set! (-> *level* vis?) arg0) + (set! (-> *level* want-level) #f) + (set! (-> *level* border?) #t) + (set! (-> *setting-control* user-default border-mode) #t) + (set! (-> *level* play?) #t) + (init-level-system *level* #t) + (set! *display-profile* #f) + (set! *cheat-mode* (if *debug-segment* + 'debug + #f + ) + ) + (set! *time-of-day-fast* #f) + + ;; added nonzero check here. + (when (nonzero? *time-of-day*) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 1.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 7) + (send-event (ppointer->process *time-of-day*) 'change 'minutes 0) + (send-event (ppointer->process *time-of-day*) 'change 'seconds 0) + (send-event (ppointer->process *time-of-day*) 'change 'frames 0) + ) + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id unk3)) + (set! (-> *mood-control* overide-weather-flag) #f) + (set-blackout-frames (seconds 0.02)) + (when (not *dproc*) + (reset! *load-state*) + (let ((s4-1 (level-get-for-use *level* s5-0 'active))) + (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) #f) + (set! (-> a1-9 2) #f) + (set! (-> a1-9 1) (if (= s5-0 'ctysluma) + 'ctywide + ) + ) + (set! (-> a1-9 0) s5-0) + (want-levels *load-state* a1-9) + ) + (want-display-level *load-state* s5-0 'display) + (if (= s5-0 'ctysluma) + (want-display-level *load-state* 'ctywide 'display) + ) + (want-vis-level *load-state* s5-0) + (while (and s4-1 (or (= (-> s4-1 status) 'loading) (= (-> s4-1 status) 'loading-bt) (= (-> s4-1 status) 'login))) + (set-blackout-frames (seconds 0.02)) + (load-continue s4-1) + ) + ) + ) + (set! *print-login* #f) + (level-status-update! (level-get *level* s5-0) 'active) + ) + (on #t) + (if arg1 + (initialize! *game-info* 'boot (the-as game-save #f) (the-as string #f) (the-as resetter-spec #f)) + ) + (kmemclose) + (kmemclose) + 0 + ) + +(defun play-boot () + "Function called by the C Kernel to start the game (wrapper around play)." + + (start-debug "call to play-boot!~%") + (process-spawn-function + process + (lambda () (play #t #t) (none)) + :from *4k-dead-pool* + :stack *kernel-dram-stack* + ) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs sound-bank-mode. +(defun sound-bank-name->mode ((arg0 symbol)) + (let ((v1-0 arg0)) + (the-as sound-bank-mode (cond + ((or (= v1-0 'half1) + (= v1-0 'half2) + (= v1-0 'ctyslmch) + (= v1-0 'ctyslmbh) + (= v1-0 'ctygnbh) + (= v1-0 'ctyindh) + (= v1-0 'ctyslmah) + (= v1-0 'ctyporth) + (= v1-0 'mhcity1h) + (= v1-0 'mhcity2h) + (= v1-0 'citypedh) + (= v1-0 'cityffh) + (= v1-0 'citycarh) + (= v1-0 'vinroomh) + (= v1-0 'ctyprtdh) + (= v1-0 'citybbh) + ) + 5 + ) + ((= v1-0 'ctywide) + 9 + ) + (else + 4 + ) + ) + ) + ) + ) + +;; WARN: Function update-sound-banks has a return type of none, but the expression builder found a return statement. +(defun update-sound-banks ((arg0 load-state) (arg1 (inline-array sound-bank-state))) + (local-vars (v1-90 symbol)) + (let ((s4-0 0) + (s5-0 (the-as object #f)) + ) + (dotimes (v1-1 6) + (set! (-> arg0 want-exp-sound v1-1 name) #f) + (set! (-> arg0 want-exp-sound v1-1 mode) (sound-bank-mode none)) + (set! (-> arg0 target-sound v1-1 name) #f) + (set! (-> arg0 target-sound v1-1 mode) (sound-bank-mode none)) + ) + (dotimes (s3-0 3) + (let ((a0-10 (the-as object (-> *load-state* want-sound s3-0 name)))) + (dotimes (v1-6 (-> *level* length)) + (let ((a1-4 (-> *level* level v1-6))) + (when (= (-> a1-4 status) 'active) + (let ((a1-6 (-> a1-4 info extra-sound-bank))) + (when a1-6 + (let ((a2-4 (car a1-6))) + (while (not (null? a1-6)) + (if (= (car a2-4) a0-10) + (set! a0-10 (cdr a2-4)) + ) + (set! a1-6 (cdr a1-6)) + (set! a2-4 (car a1-6)) + ) + ) + ) + ) + ) + ) + ) + (dotimes (v1-9 (the-as int (-> *setting-control* user-current extra-bank-count))) + (let ((a1-13 (and (not (null? (-> *setting-control* user-current extra-bank v1-9))) + (-> *setting-control* user-current extra-bank v1-9) + ) + ) + ) + (when a1-13 + (let ((a2-12 (car a1-13))) + (while (not (null? a1-13)) + (cond + ((and (= s3-0 2) (= (car a2-12) 'force2)) + (set! s5-0 (car (cdr a2-12))) + ) + ((= (car a2-12) a0-10) + (set! a0-10 (cdr a2-12)) + ) + ) + (set! a1-13 (cdr a1-13)) + (set! a2-12 (car (the-as pair a1-13))) + ) + ) + ) + ) + ) + (case (rtype-of a0-10) + ((symbol) + (when a0-10 + (set! (-> arg0 want-exp-sound s4-0 name) (the-as symbol a0-10)) + (set! (-> arg0 want-exp-sound s4-0 mode) (sound-bank-name->mode (the-as symbol a0-10))) + (+! s4-0 1) + ) + ) + ((pair) + (let* ((s2-0 (the-as pair a0-10)) + (a0-11 (car s2-0)) + ) + (while (not (null? s2-0)) + (when a0-11 + (set! (-> arg0 want-exp-sound s4-0 name) (the-as symbol a0-11)) + (set! (-> arg0 want-exp-sound s4-0 mode) (sound-bank-name->mode (the-as symbol a0-11))) + (+! s4-0 1) + ) + (set! s2-0 (cdr s2-0)) + (set! a0-11 (car s2-0)) + ) + ) + ) + ) + ) + ) + (if (= *city-mode* 'ctywide) + (city-sound-expand-want-list) + ) + (when s5-0 + (cond + ((-> arg0 want-exp-sound 1) + (set! (-> arg0 want-exp-sound 2 name) (the-as symbol s5-0)) + (set! (-> arg0 want-exp-sound 2 mode) (sound-bank-name->mode (the-as symbol s5-0))) + ) + ((-> arg0 want-exp-sound) + (set! (-> arg0 want-exp-sound 1 name) (the-as symbol s5-0)) + (set! (-> arg0 want-exp-sound 1 mode) (sound-bank-name->mode (the-as symbol s5-0))) + ) + (else + (set! (-> arg0 want-exp-sound 0 name) (the-as symbol s5-0)) + (set! (-> arg0 want-exp-sound 0 mode) (sound-bank-name->mode (the-as symbol s5-0))) + ) + ) + ) + ) + (let ((s4-1 0) + (s3-1 0) + (s2-1 0) + (s1-0 0) + (s5-1 (new 'stack-no-clear 'array 'int8 36)) + ) + (dotimes (v1-43 10) + (set! (-> s5-1 v1-43) 0) + ) + (dotimes (s0-0 6) + (case (-> arg0 want-exp-sound s0-0 mode) + (((sound-bank-mode virtual)) + ) + (((sound-bank-mode full)) + (if (>= s2-1 3) + (goto cfg-80) + ) + (+! s2-1 1) + (+! s3-1 1) + (mem-copy! (the-as pointer (-> arg0 target-sound s1-0)) (the-as pointer (-> arg0 want-exp-sound s0-0)) 8) + (+! s1-0 1) + ) + (((sound-bank-mode half)) + (cond + ((even? s4-1) + (if (>= s2-1 3) + (goto cfg-80) + ) + (+! s2-1 1) + (mem-copy! (the-as pointer (-> arg0 target-sound s1-0)) (the-as pointer (-> arg0 want-exp-sound s0-0)) 8) + ) + (else + (mem-copy! (the-as pointer (-> arg0 target-sound s1-0)) (the-as pointer (-> arg0 want-exp-sound s0-0)) 8) + ) + ) + (set! (-> arg0 target-sound s1-0 mode) (sound-bank-mode half)) + (+! s4-1 1) + (+! s1-0 1) + ) + ) + (label cfg-80) + ) + (let ((v1-76 0)) + (dotimes (a0-28 6) + (case (-> arg0 target-sound a0-28 mode) + (((sound-bank-mode half)) + (dotimes (a1-32 6) + (when (= (-> *level* sound-bank a1-32 name) (-> arg0 target-sound a0-28 name)) + (let ((a2-26 (-> *level* sound-bank a1-32 mode))) + (when (and (>= (the-as uint a2-26) (the-as uint 6)) + (>= (the-as uint 8) (the-as uint a2-26)) + (not (and (nonzero? s3-1) + (= (+ v1-76 1) s4-1) + (< 1 s4-1) + (zero? (-> s5-1 a2-26)) + (or (= (-> s5-1 6) 1) (= (-> s5-1 7) 1) (= (-> s5-1 8) 1)) + ) + ) + ) + (set! (-> arg0 target-sound a0-28 mode) (-> *level* sound-bank a1-32 mode)) + (+! (-> s5-1 a2-26) 1) + (+! v1-76 1) + ) + ) + (goto cfg-112) + ) + ) + ) + ) + (label cfg-112) + ) + ) + (dotimes (v1-79 6) + (case (-> arg0 target-sound v1-79 mode) + (((sound-bank-mode half)) + (cond + ((= (-> s5-1 6) 1) + (+! (-> s5-1 6) 1) + (set! (-> arg0 target-sound v1-79 mode) (sound-bank-mode halfa)) + ) + ((= (-> s5-1 7) 1) + (+! (-> s5-1 7) 1) + (set! (-> arg0 target-sound v1-79 mode) (sound-bank-mode halfb)) + ) + ((= (-> s5-1 8) 1) + (+! (-> s5-1 8) 1) + (set! (-> arg0 target-sound v1-79 mode) (sound-bank-mode halfc)) + ) + ((zero? (-> s5-1 6)) + (+! (-> s5-1 6) 1) + (set! (-> arg0 target-sound v1-79 mode) (sound-bank-mode halfa)) + ) + ((zero? (-> s5-1 7)) + (+! (-> s5-1 7) 1) + (set! (-> arg0 target-sound v1-79 mode) (sound-bank-mode halfb)) + ) + ((zero? (-> s5-1 8)) + (+! (-> s5-1 8) 1) + (set! (-> arg0 target-sound v1-79 mode) (sound-bank-mode halfc)) + ) + ) + ) + ) + ) + ) + (if (or (nonzero? (rpc-busy? 1)) (not (-> *setting-control* user-current sound-bank-load))) + (return 0) + ) + (dotimes (s4-2 6) + (let ((s5-2 (-> arg0 target-sound s4-2)) + (s2-2 + (lambda ((arg0 load-state) (arg1 sound-bank-state)) + (if (not (-> arg1 name)) + (return #f) + ) + (countdown (v1-3 6) + (if (and (= (-> arg1 name) (-> arg0 target-sound v1-3 name)) (= (-> arg1 mode) (-> arg0 target-sound v1-3 mode))) + (return #t) + ) + ) + #f + ) + ) + ) + (set! v1-90 (and (-> s5-2 name) (begin + (dotimes (v1-91 6) + (when (and (= (-> s5-2 name) (-> *level* sound-bank v1-91 name)) + (= (-> s5-2 mode) (-> *level* sound-bank v1-91 mode)) + ) + (set! v1-90 #f) + (goto cfg-150) + ) + ) + #t + ) + ) + ) + (label cfg-150) + (when v1-90 + (let ((s3-2 -1)) + (let ((v1-94 -1)) + (case (-> s5-2 mode) + (((sound-bank-mode full)) + ) + (else + (dotimes (a0-70 3) + (if (or (= (-> *level* sound-bank (* a0-70 2) mode) (-> s5-2 mode)) + (= (-> *level* sound-bank (+ (* a0-70 2) 1) mode) (-> s5-2 mode)) + ) + (set! v1-94 a0-70) + ) + ) + ) + ) + (dotimes (a0-73 3) + (case (-> s5-2 mode) + (((sound-bank-mode full)) + (when (and (not (-> *level* sound-bank (* a0-73 2) name)) (not (-> *level* sound-bank (+ (* a0-73 2) 1) name))) + (set! s3-2 (* a0-73 2)) + (goto cfg-224) + ) + ) + (else + (when (or (< v1-94 0) (= v1-94 a0-73)) + (when (and (not (-> *level* sound-bank (* a0-73 2) name)) + (or (not (-> *level* sound-bank (+ (* a0-73 2) 1) name)) + (= (-> *level* sound-bank (+ (* a0-73 2) 1) mode) (-> s5-2 mode)) + ) + ) + (set! s3-2 (* a0-73 2)) + (goto cfg-224) + ) + (when (and (not (-> *level* sound-bank (+ (* a0-73 2) 1) name)) + (= (-> *level* sound-bank (* a0-73 2) mode) (-> s5-2 mode)) + ) + (set! s3-2 (+ (* a0-73 2) 1)) + (goto cfg-224) + ) + ) + ) + ) + ) + ) + (case (-> s5-2 mode) + (((sound-bank-mode full)) + ) + (else + (let ((s1-1 0)) + (while (< s1-1 6) + (when (or (and (-> *level* sound-bank s1-1 name) + (= (-> *level* sound-bank s1-1 mode) (-> s5-2 mode)) + (not (s2-2 arg0 (-> *level* sound-bank s1-1))) + ) + (= (-> *level* sound-bank s1-1 name) (-> s5-2 name)) + ) + (format 0 "Unload soundbank ~A from slot ~D~%" (-> *level* sound-bank s1-1 name) s1-1) + (sound-bank-unload (string->sound-name (symbol->string (-> *level* sound-bank s1-1 name)))) + (set! (-> *level* sound-bank s1-1 name) #f) + (set! (-> *level* sound-bank s1-1 mode) (sound-bank-mode none)) + (return 0) + ) + (set! s1-1 (+ s1-1 1)) + ) + ) + ) + ) + (dotimes (s1-2 3) + (when (and (not (s2-2 arg0 (-> *level* sound-bank (* s1-2 2)))) + (not (s2-2 arg0 (-> *level* sound-bank (+ (* s1-2 2) 1)))) + ) + (let ((gp-2 (if (-> *level* sound-bank (* s1-2 2) name) + (* s1-2 2) + (+ (* s1-2 2) 1) + ) + ) + ) + (format 0 "Unload soundbank ~A from slot ~D~%" (-> *level* sound-bank gp-2 name) gp-2) + (sound-bank-unload (string->sound-name (symbol->string (-> *level* sound-bank gp-2 name)))) + (set! (-> *level* sound-bank gp-2 name) #f) + (set! (-> *level* sound-bank gp-2 mode) (sound-bank-mode none)) + ) + (return 0) + ) + ) + (label cfg-224) + (let ((s2-3 0)) + (while (< s2-3 6) + (when (= (-> *level* sound-bank s2-3 name) (-> s5-2 name)) + (format 0 "Unload soundbank ~A from slot ~D~%" (-> *level* sound-bank s2-3 name) s2-3) + (sound-bank-unload (string->sound-name (symbol->string (-> *level* sound-bank s2-3 name)))) + (set! (-> *level* sound-bank s2-3 name) #f) + (set! (-> *level* sound-bank s2-3 mode) (sound-bank-mode none)) + (return 0) + ) + (set! s2-3 (+ s2-3 1)) + ) + ) + (when (>= s3-2 0) + (format 0 "Load soundbank ~A in slot ~D~%" (-> s5-2 name) s3-2) + (sound-bank-load (string->sound-name (symbol->string (-> s5-2 name))) (the-as int (-> s5-2 mode)) 0) + (mem-copy! (the-as pointer (-> *level* sound-bank s3-2)) (the-as pointer s5-2) 8) + (return 0) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod update! ((this load-state)) + (local-vars (a0-11 symbol)) + (if (-> this update-callback) + ((-> this update-callback) this) + ) + (let ((v1-3 #f)) + (let ((s5-0 0)) + -1 + (countdown (s4-0 10) + (let ((a0-3 -1)) + (countdown (a1-0 10) + (let ((a2-3 (-> *level* level a1-0))) + (when (and (!= (-> a2-3 status) 'inactive) (>= (-> a2-3 load-order) (the-as uint s5-0))) + (let ((a3-5 #f)) + (dotimes (t0-2 10) + (if (= (-> a2-3 name) (-> this target t0-2 name)) + (set! a3-5 #t) + ) + ) + (when (not a3-5) + (set! s5-0 (the-as int (-> a2-3 load-order))) + (set! a0-3 a1-0) + ) + ) + ) + ) + ) + (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) + ) + (set! v1-3 #t) + ) + ) + ) + ) + (let ((s5-1 #f)) + (countdown (a0-10 10) + (when (!= (-> *level* level a0-10 status) 'inactive) + (set! a0-11 #f) + (goto cfg-25) + ) + ) + (set! a0-11 #t) + (label cfg-25) + (if a0-11 + (set! s5-1 #t) + ) + (if v1-3 + (return 0) + ) + (let ((v1-11 (new 'static 'boxed-array :type symbol :length 0 :allocated-length 10))) + (countdown (a0-15 10) + (set! (-> v1-11 a0-15) #f) + ) + (dotimes (a0-18 10) + (when (-> this target a0-18 name) + (set! (-> v1-11 a0-18) (-> this target a0-18 name)) + (dotimes (a1-17 10) + (let ((a2-13 (-> *level* level a1-17))) + (if (and (!= (-> a2-13 status) 'inactive) (= (-> a2-13 name) (-> this target a0-18 name))) + (set! (-> v1-11 a0-18) #f) + ) + ) + ) + ) + ) + (let ((s4-1 -1)) + (dotimes (a0-21 10) + (when (-> v1-11 a0-21) + (set! s4-1 a0-21) + (goto cfg-53) + ) + ) + (label cfg-53) + (when (!= s4-1 -1) + (when (and (or s5-1 (not (check-busy *load-dgo-rpc*))) (not (load-in-progress? *level*))) + (format 0 "Adding level ~A~%" (-> this target s4-1 name)) + (let ((s3-1 (level-get-for-use *level* (-> this target s4-1 name) 'loaded))) + (when (and s5-1 (-> this target s4-1 display?)) + (format 0 "Waiting for level to load~%") + (while (or (= (-> s3-1 status) 'loading) (= (-> s3-1 status) 'loading-bt) (= (-> s3-1 status) 'login)) + (load-continue s3-1) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (dotimes (s5-2 10) + (when (-> this target s5-2 name) + (dotimes (s4-2 11) + (let ((s3-2 (-> *level* level s4-2))) + (when (!= (-> s3-2 status) 'inactive) + (when (= (-> s3-2 name) (-> this target s5-2 name)) + (when (!= (-> s3-2 display?) (-> this target s5-2 display?)) + (cond + ((not (-> s3-2 display?)) + (cond + ((or (= (-> s3-2 status) 'loaded) (= (-> s3-2 status) 'active)) + (format 0 "Displaying level ~A [~A]~%" (-> this target s5-2 name) (-> this target s5-2 display?)) + (level-get-for-use *level* (-> s3-2 info name) 'active) + (set! (-> s3-2 display?) (-> this target s5-2 display?)) + ) + (else + (if (and (logtest? (-> s3-2 info level-flags) (level-flags lf11)) + (!= (-> this target s5-2 display?) 'display-no-wait) + ) + (send-event *target* 'loading) + ) + (if (and (= *cheat-mode* 'debug) (not *display-capture-mode*)) + (format *stdcon* "display on for ~A but level is loading~%" (-> this target s5-2 name)) + ) + ) + ) + ) + ((not (-> this target s5-2 display?)) + (set! (-> s3-2 display?) #f) + (format 0 "Turning level ~A off~%" (-> s3-2 name)) + (deactivate s3-2) + ) + (else + (format + 0 + "Setting level ~A display command to ~A~%" + (-> this target s5-2 name) + (-> this target s5-2 display?) + ) + (set! (-> s3-2 display?) (-> this target s5-2 display?)) + ) + ) + ) + (when (!= (-> s3-2 force-all-visible?) (-> this target s5-2 force-vis?)) + (set! (-> s3-2 force-all-visible?) (-> this target s5-2 force-vis?)) + (format + 0 + "Setting force-all-visible?[~A] to ~A~%" + (-> this target s5-2 name) + (-> this target s5-2 force-vis?) + ) + ) + (when (!= (-> s3-2 force-inside?) (-> this target s5-2 force-inside?)) + (format + 0 + "Setting force-inside?[~A] ~A->~A~%" + (-> this target s5-2 name) + (-> s3-2 force-inside?) + (-> this target s5-2 force-inside?) + ) + (set! (-> s3-2 force-inside?) (-> this target s5-2 force-inside?)) + ) + ) + ) + ) + ) + ) + ) + (when (-> *level* border?) + (let ((v1-131 (the-as level #f)) + (a0-55 0) + ) + (dotimes (a1-35 (-> *level* length)) + (let ((a2-32 (-> *level* level a1-35))) + (when (= (-> a2-32 status) 'active) + (when (and (-> a2-32 inside-boxes?) (not (null? (-> a2-32 info continues)))) + (if (= (-> a2-32 name) (-> this vis-nick)) + (goto cfg-137) + ) + (if (or (not v1-131) (not (logtest? (-> a2-32 info level-flags) (level-flags lf1)))) + (set! v1-131 a2-32) + ) + (+! a0-55 1) + ) + ) + ) + ) + (if (and (>= a0-55 1) (!= (-> v1-131 name) (-> this vis-nick))) + (want-vis-level this (-> v1-131 name)) + ) + ) + ) + (label cfg-137) + (update-sound-banks this (-> *level* sound-bank)) + 0 + ) + +(defmethod assign-draw-indices ((this level-group)) + "Assign the order for levels to be drawn." + (local-vars (t0-3 symbol)) + (set! (-> this draw-level-count) 0) + (dotimes (v1-0 11) + (let ((f0-0 100000.0) + (a1-1 (the-as level #f)) + ) + (dotimes (a2-0 (-> this length)) + (let ((a3-3 (-> this level a2-0))) + (when (= (-> a3-3 status) 'active) + (set! t0-3 (and (< (-> a3-3 draw-priority) f0-0) (begin + (dotimes (t0-4 (-> this draw-level-count)) + (when (= a3-3 (-> this draw-level t0-4)) + (set! t0-3 #f) + (goto cfg-14) + ) + ) + #t + ) + ) + ) + (label cfg-14) + (when t0-3 + (set! a1-1 a3-3) + (set! f0-0 (-> a1-1 draw-priority)) + ) + ) + ) + ) + (when a1-1 + (set! (-> this draw-level (-> this draw-level-count)) a1-1) + (set! (-> a1-1 draw-index) (-> this draw-level-count)) + (+! (-> this draw-level-count) 1) + ) + ) + ) + (while (< (-> this draw-level-count) 11) + (set! (-> this draw-level (-> this draw-level-count)) #f) + (+! (-> this draw-level-count) 1) + ) + (set! (-> this draw-level 10) (-> this level-default)) + (set! (-> (&-> this level-default draw-index) 0) 10) + (dotimes (v1-13 11) + (let ((a2-9 (-> this level v1-13))) + (if a2-9 + (set! (-> this draw-index-map v1-13) (the-as uint (-> a2-9 draw-index))) + ) + ) + ) + 0 + (none) + ) + +(defmethod level-update ((this level-group)) + "Per-frame update of the level system." + (local-vars (v1-109 symbol)) + (camera-pos) + (new 'static 'boxed-array :type symbol :length 0 :allocated-length 10) + (update *setting-control*) + (update *gui-control* #t) + (update *art-control* #t) + (clear-rec *art-control*) + (dotimes (s5-0 10) + (load-continue (-> this level s5-0)) + ) + (dotimes (s5-1 (-> this length)) + (let ((s4-0 (-> this level s5-1))) + (when (= (-> s4-0 status) 'active) + (let* ((a0-7 s4-0) + (t9-6 (method-of-object a0-7 inside-bsp?)) + ) + (-> *math-camera* trans) + (set! (-> s4-0 inside-boxes?) (the-as basic (t9-6 a0-7))) + ) + (if (-> s4-0 inside-boxes?) + (set! (-> s4-0 meta-inside?) #t) + ) + ) + ) + ) + (update! *load-state*) + (let ((s5-2 (level-get-target-inside this))) + (dotimes (s4-1 (-> this length)) + (let ((s3-0 (-> this level s4-1))) + (when (= (-> s3-0 status) 'active) + (when (-> s3-0 inside-boxes?) + (dotimes (v1-41 (-> this length)) + (let ((a0-14 (-> this level v1-41))) + (when (= (-> a0-14 status) 'active) + (if (and (!= s3-0 a0-14) (not (-> a0-14 inside-boxes?))) + (set! (-> a0-14 meta-inside?) #f) + ) + ) + ) + ) + ) + (when (and (= s3-0 s5-2) + (begin + (set! (-> *setting-control* user-default music) (-> s3-0 info music-bank)) + (set! (-> *setting-control* user-default sound-reverb) (-> s3-0 info sound-reverb)) + #t + ) + (or (-> *level* border?) (logtest? (-> *game-info* current-continue flags) (continue-flags change-continue))) + (and (or (and (!= (-> s3-0 name) (-> *game-info* current-continue level)) + (or (not (logtest? (level-flags lf18) (-> s3-0 info level-flags))) + (!= (-> s3-0 info taskname) (-> (lookup-level-info (-> *game-info* current-continue level)) taskname)) + ) + ) + (logtest? (-> *game-info* current-continue flags) (continue-flags change-continue)) + ) + (not (null? (-> s3-0 info continues))) + (-> *setting-control* user-current allow-continue) + ) + ) + (let ((s2-1 (car (-> s3-0 info continues)))) + (let* ((s1-0 (target-pos 0)) + (s3-1 (-> s3-0 info continues)) + (s0-0 (car s3-1)) + ) + (while (not (null? s3-1)) + (when (and (or (< (vector-vector-distance s1-0 (-> (the-as continue-point s0-0) trans)) + (vector-vector-distance s1-0 (-> (the-as continue-point s2-1) trans)) + ) + (string= (-> *game-info* current-continue name) (-> (the-as continue-point s0-0) name)) + ) + (not (logtest? (-> (the-as continue-point s0-0) flags) (continue-flags change-continue no-auto))) + ) + (set! s2-1 s0-0) + (if (string= (-> *game-info* current-continue name) (-> (the-as continue-point s0-0) name)) + (goto cfg-62) + ) + ) + (set! s3-1 (cdr s3-1)) + (set! s0-0 (car s3-1)) + ) + ) + (label cfg-62) + (if (and s2-1 (not (logtest? (-> (the-as continue-point s2-1) flags) (continue-flags change-continue no-auto)))) + (set-continue! *game-info* (the-as basic s2-1) #f) + ) + ) + ) + ) + ) + ) + ) + (dotimes (v1-94 (-> this length)) + (let ((a0-48 (-> this level v1-94))) + (when (= (-> a0-48 status) 'active) + (set! (-> a0-48 vis-self-index) 0) + 0 + ) + ) + ) + (when (and (not *display-capture-mode*) (= *cheat-mode* 'debug)) + (dotimes (s5-3 (-> this length)) + (let ((v1-104 (-> this level s5-3))) + (when (= (-> v1-104 status) 'active) + (if (and (= (-> v1-104 status) 'active) + (!= (-> v1-104 display?) 'special) + (nonzero? (-> v1-104 bsp cam-outside-bsp)) + ) + (format *stdcon* "~3Loutside of bsp ~S~%~0L" (-> v1-104 name)) + ) + ) + ) + ) + ) + (countdown (v1-108 10) + (when (-> this level v1-108 inside-boxes?) + (set! v1-109 #f) + (goto cfg-96) + ) + ) + (set! v1-109 #t) + (label cfg-96) + (cond + (v1-109 + 0 + ) + (else + (dotimes (s5-4 (-> this length)) + (let ((s4-2 (-> this level s5-4))) + (when (= (-> s4-2 status) 'active) + (dotimes (s3-2 8) + (let ((s2-2 (-> s4-2 vis-info s3-2))) + (when s2-2 + (set! (-> s2-2 flags) (the-as vis-info-flag (logclear (-> s2-2 flags) (vis-info-flag vis-valid)))) + (cond + ((= s3-2 (-> s4-2 vis-self-index)) + (set! (-> s2-2 from-bsp) (-> s4-2 bsp)) + ) + (else + (let ((v1-123 (level-get this (-> s2-2 from-level)))) + (set! (-> s2-2 from-bsp) (if v1-123 + (-> v1-123 bsp) + ) + ) + ) + ) + ) + ) + ) + ) + (let ((v1-126 #f)) + (cond + ((= (-> s4-2 display?) 'display-self) + (let ((v1-130 (-> s4-2 vis-info (-> s4-2 vis-self-index)))) + (if v1-130 + (set! (-> v1-130 flags) (the-as vis-info-flag (logior (vis-info-flag vis-valid) (-> v1-130 flags)))) + ) + ) + ) + ((and (-> s4-2 inside-boxes?) (not v1-126)) + (let ((v1-135 (-> s4-2 vis-info (-> s4-2 vis-self-index)))) + (if v1-135 + (set! (-> v1-135 flags) (the-as vis-info-flag (logior (vis-info-flag vis-valid) (-> v1-135 flags)))) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (assign-draw-indices this) + (when (or *display-level-border* *display-texture-distances* *display-texture-download* *display-split-box-info*) + (when *display-level-border* + (format + *stdcon* + " want: ~A ~A/~A ~A ~A/~A~%" + (-> *load-state* want 0 name) + (-> *load-state* want 0 display?) + (-> *load-state* want 0 force-vis?) + (-> *load-state* want 1 name) + (-> *load-state* want 1 display?) + (-> *load-state* want 1 force-vis?) + ) + (let ((t9-20 format) + (a0-86 *stdcon*) + (a1-30 " nick ~A cur ~S cont ~A~%~%") + (a2-6 (-> *load-state* vis-nick)) + (v1-156 (and *target* (-> *target* current-level) (-> *target* current-level name))) + ) + (t9-20 + a0-86 + a1-30 + a2-6 + (if v1-156 + v1-156 + ) + (-> *game-info* current-continue name) + ) + ) + ) + (dotimes (s5-5 11) + (let ((s4-3 (-> this level s5-5))) + (when (or (= (-> s4-3 status) 'active) (= (-> s4-3 status) 'reserved)) + (format + *stdcon* + "~A: ~S ~A~%" + (-> s4-3 name) + (if (-> s4-3 inside-boxes?) + "inside" + ) + (-> s4-3 display?) + ) + (when *display-texture-distances* + (format *stdcon* "~10Htfrag: ~8,,0m" (-> s4-3 closest-object 0)) + (format *stdcon* "~140Hshrub: ~8,,0m" (-> s4-3 closest-object 2)) + (format *stdcon* "~272Halpha: ~8,,0m~%" (-> s4-3 closest-object 3)) + (format *stdcon* "~27Htie: ~8,,0m" (-> s4-3 tie-min-dist)) + (format *stdcon* "~140Hfg-tf: ~8,,0m" (-> s4-3 fg-tfrag-min-dist)) + (format *stdcon* "~270Hfg-pr: ~8,,0m~%" (-> s4-3 fg-prim-min-dist)) + (format *stdcon* "~10Hfg-wa: ~8,,0m" (-> s4-3 fg-warp-min-dist)) + (format *stdcon* "~140Hfg-sh: ~8,,0m" (-> s4-3 fg-shrub-min-dist)) + (format *stdcon* "~267Hfg-p2: ~8,,0m~%" (-> s4-3 fg-prim2-min-dist)) + ) + (when *display-texture-download* + (format + *stdcon* + "~30Htf: ~8D~134Hpr: ~8D~252Hsh: ~8D~370Hhd: ~8D~%" + (-> s4-3 upload-size 0) + (-> s4-3 upload-size 1) + (-> s4-3 upload-size 2) + (-> s4-3 upload-size 8) + ) + (format + *stdcon* + "~30Hal: ~8D~131Hwa: ~8D~252Hsp: ~8D~370Hwp: ~8D~%" + (-> s4-3 upload-size 3) + (-> s4-3 upload-size 4) + (-> s4-3 upload-size 7) + (-> s4-3 upload-size 5) + ) + (format *stdcon* "~30Hp2: ~8D~131Hhf: ~8D~%~1K" (-> s4-3 upload-size 6) (-> s4-3 upload-size 10)) + ) + (if *display-split-box-info* + (debug-print-region-splitbox s4-3 (-> *math-camera* trans) *stdcon*) + ) + ) + ) + ) + ) + (when (and (-> this disk-load-timing?) (-> this load-level)) + (let ((s5-6 format) + (s4-4 *stdcon*) + (s3-3 "~0Kload ~16S ~5S ~5DK ~5,,2fs ~5,,2fs~1K ~5,,0f k/s~%") + (s2-3 (-> this load-level)) + (v1-188 (lookup-level-info (-> this load-level))) + ) + (s5-6 + s4-4 + s3-3 + s2-3 + (if v1-188 + (-> v1-188 nickname) + "" + ) + (shr (-> this load-size) 10) + (-> this load-time) + (-> this load-login-time) + (if (= (-> this load-time) 0.0) + 0 + (* 0.0009765625 (/ (the float (-> this load-size)) (-> this load-time))) + ) + ) + ) + ) + (let ((v1-194 (- #x2000000 (the-as int (-> global current))))) + (if (and (not *debug-segment*) (or (< v1-194 #x4000) (= *cheat-mode* 'debug))) + (format + *stdcon* + "~3Lglobal heap fatally low at ~D.~DK free~%~0L" + (sar v1-194 10) + (/ (logand v1-194 1023) 103) + ) + ) + ) + ;; og:preserve-this added + (let ((lev-names (new 'stack-no-clear 'array 'string 10)) + (active-lev-names (new 'stack-no-clear 'array 'string 10))) + (dotimes (i 10) + (set! (-> active-lev-names i) "none") + (set! (-> lev-names i) "none") + (cond + ((or (= (-> this level i status) 'active) + (= (-> this level i status) 'alive) + (= (-> this level i status) 'loaded)) + ;; using info nickname since desert's bsp nickname is desert-vis, not dst. + (set! (-> lev-names i) (symbol->string (-> this level i info nickname))) + (if (-> this level i display?) + (set! (-> active-lev-names i) (symbol->string (-> this level i info nickname)))) + ) + ) + ) + (__pc-set-levels lev-names) + (__pc-set-active-levels active-lev-names) + ) + 0 + (none) + ) + +(defun-debug show-level ((arg0 symbol)) + (set! (-> *setting-control* user-default border-mode) #t) + (let ((s5-0 (new 'stack-no-clear 'array 'symbol 10))) + (set! (-> s5-0 9) #f) + (set! (-> s5-0 8) #f) + (set! (-> s5-0 7) #f) + (set! (-> s5-0 6) #f) + (set! (-> s5-0 5) #f) + (set! (-> s5-0 4) #f) + (set! (-> s5-0 3) #f) + (set! (-> s5-0 2) #f) + (set! (-> s5-0 1) arg0) + (set! (-> s5-0 0) (-> (level-get-target-inside *level*) name)) + (want-levels *load-state* s5-0) + ) + (want-display-level *load-state* arg0 'display) + 0 + (none) + ) + +(format 0 "about to start level stuff...~%") + +(when (zero? (-> *level* level0 art-group)) + (kmemopen global "level-struct") + (let ((gp-0 *level*)) + (set! (-> gp-0 loading-level) (-> gp-0 level-default)) + (dotimes (s5-0 10) + (let ((s4-0 (-> gp-0 level s5-0))) + (set! (-> s4-0 art-group) (new 'global 'load-dir-art-group 100 s4-0)) + (set! (-> s4-0 vis-bits) (malloc 'global 2048)) + (vis-clear s4-0) + (set! (-> s4-0 tfrag-masks) (new 'global 'texture-masks-array 1)) + (set! (-> s4-0 tfrag-dists) (malloc 'global 4)) + (set! (-> s4-0 shrub-masks) (new 'global 'texture-masks-array 1)) + (set! (-> s4-0 shrub-dists) (malloc 'global 4)) + (set! (-> s4-0 alpha-masks) (new 'global 'texture-masks-array 1)) + (set! (-> s4-0 alpha-dists) (malloc 'global 4)) + (set! (-> s4-0 water-masks) (new 'global 'texture-masks-array 1)) + (set! (-> s4-0 water-dists) (malloc 'global 4)) + (clear-mood-context (-> s4-0 mood-context)) + ) + ) + (set! (-> (&-> gp-0 level-default art-group) 0) (new 'global 'load-dir-art-group 512 (-> gp-0 level-default))) + (dotimes (v1-38 11) + (let ((a0-55 (-> gp-0 level v1-38))) + (dotimes (a1-50 11) + (set! (-> a0-55 texture-anim-array a1-50) #f) + (set! (-> a0-55 eye-slot-lowres a1-50) (the-as uint 0)) + (set! (-> a0-55 eye-slot-highres a1-50) (the-as uint 0)) + ) + (set! (-> a0-55 borrow-from-level) #f) + (dotimes (a1-53 5) + (set! (-> a0-55 borrow-level a1-53) #f) + ) + ) + ) + (set! (-> (&-> gp-0 level-default texture-anim-array 9) 0) *sky-texture-anim-array*) + (set! (-> (&-> gp-0 level-default texture-anim-array 1) 0) *darkjak-texture-anim-array*) + (set! (-> (&-> gp-0 level-default texture-anim-array 4) 0) *default-water-texture-anim-array*) + (set! (-> (&-> gp-0 level-default texture-anim-array 5) 0) *default-warp-texture-anim-array*) + (set! (-> (&-> gp-0 level-default draw-priority) 0) 20.0) + (set! (-> (&-> gp-0 level-default info) 0) default-level) + (set! (-> *kernel-context* login-level-index) (-> (&-> gp-0 level-default index) 0)) + (set! *default-level* (-> gp-0 level-default)) + ) + (kmemclose) + ) + +(format 0 "done level stuff...~%") diff --git a/goal_src/jak3/engine/level/region-h.gc b/goal_src/jak3/engine/level/region-h.gc index d498d1576a..d2be6e83a3 100644 --- a/goal_src/jak3/engine/level/region-h.gc +++ b/goal_src/jak3/engine/level/region-h.gc @@ -6,6 +6,7 @@ ;; dgos: GAME (declare-type region-prim-area structure) +(define-extern region-execute (function none)) ;; DECOMP BEGINS diff --git a/goal_src/jak3/engine/level/region.gc b/goal_src/jak3/engine/level/region.gc index ecf0190a65..b658e2a088 100644 --- a/goal_src/jak3/engine/level/region.gc +++ b/goal_src/jak3/engine/level/region.gc @@ -7,3 +7,641 @@ ;; DECOMP BEGINS +;; WARN: Return type mismatch int vs drawable-region-prim. +(defmethod mem-usage ((this drawable-region-prim) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 51 (-> usage length))) + (set! (-> usage data 50 name) "region") + (+! (-> usage data 50 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 50 used) v1-6) + (+! (-> usage data 50 total) (logand -16 (+ v1-6 15))) + ) + (mem-usage (-> this region) usage (logior flags 128)) + (the-as drawable-region-prim 0) + ) + +;; WARN: Return type mismatch int vs drawable-inline-array-region-prim. +(defmethod mem-usage ((this drawable-inline-array-region-prim) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-5 32)) + (+! (-> usage data 0 used) v1-5) + (+! (-> usage data 0 total) (logand -16 (+ v1-5 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this data s3-0) usage flags) + ) + (the-as drawable-inline-array-region-prim 0) + ) + +(defmethod draw ((this drawable-tree-region-prim)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + 0 + (none) + ) + +(defmethod unpack-vis ((this drawable-tree-region-prim) (arg0 (pointer int8)) (arg1 (pointer int8))) + arg1 + ) + +(defmethod collect-regions ((this drawable-region-prim) (arg0 sphere) (arg1 int) (arg2 region-prim-list)) + "Fill the region-prim-list with regions that intersect the sphere." + (dotimes (s2-0 arg1) + (when (spheres-overlap? arg0 (the-as sphere (-> this bsphere))) + (set! (-> arg2 items (-> arg2 num-items)) this) + (+! (-> arg2 num-items) 1) + ) + (&+! this 32) + ) + 0 + (none) + ) + +(defmethod collect-regions ((this drawable-inline-array-region-prim) (arg0 sphere) (arg1 int) (arg2 region-prim-list)) + "Fill the region-prim-list with regions that intersect the sphere." + (collect-regions (the-as drawable-region-prim (-> this data)) arg0 (-> this length) arg2) + 0 + (none) + ) + +(defmethod collect-regions ((this drawable-tree-region-prim) (arg0 sphere) (arg1 int) (arg2 region-prim-list)) + "Fill the region-prim-list with regions that intersect the sphere." + (collect-regions (-> this data2 0) arg0 (-> this length) arg2) + 0 + (none) + ) + +(defmethod debug-draw-region ((this drawable-region-prim) (arg0 int)) + (local-vars (sv-32 vector2h) (sv-36 vector)) + (set! sv-32 (new 'stack 'vector2h)) + (set! sv-36 (-> this bsphere)) + (add-debug-x #t (bucket-id debug-no-zbuf1) sv-36 (new 'static 'rgba :r #xff :g #xff :a #x80)) + (when (nonzero? (-> this region)) + (let ((s5-0 add-debug-text-3d) + (s4-0 #t) + (s3-0 577) + ) + (format (clear *temp-string*) "region-~D~%" (-> this region id)) + (s5-0 s4-0 (the-as bucket-id s3-0) *temp-string* sv-36 (font-color white) sv-32) + ) + (+! (-> sv-32 y) 8) + (let ((s5-1 (-> this region on-enter))) + (when s5-1 + (let ((s4-1 add-debug-text-3d) + (s3-1 #t) + (s2-1 577) + ) + (format (clear *temp-string*) "(on-enter ~S)" s5-1) + (s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* sv-36 (font-color white) sv-32) + ) + (+! (-> sv-32 y) 8) + ) + ) + (let ((s5-2 (-> this region on-inside))) + (when s5-2 + (let ((s4-2 add-debug-text-3d) + (s3-2 #t) + (s2-2 577) + ) + (format (clear *temp-string*) "(on-inside ~S)" s5-2) + (s4-2 s3-2 (the-as bucket-id s2-2) *temp-string* sv-36 (font-color white) sv-32) + ) + (+! (-> sv-32 y) 8) + ) + ) + (let ((gp-1 (-> this region on-exit))) + (when gp-1 + (let ((s5-3 add-debug-text-3d) + (s4-3 #t) + (s3-3 577) + ) + (format (clear *temp-string*) "(on-exit ~S)" gp-1) + (s5-3 s4-3 (the-as bucket-id s3-3) *temp-string* sv-36 (font-color white) sv-32) + ) + (+! (-> sv-32 y) 8) + ) + ) + ) + 0 + (none) + ) + +(defmethod track-region ((this drawable-region-prim) (arg0 region-prim-area)) + #f + ) + +(defmethod within-area? ((this drawable-region-prim) (arg0 region-prim-area)) + "@returns Whether or not the object overlaps with the provided [[region-prim-area]]'s extent" + #f + ) + +(defmethod track-entered-region! ((this region-prim-area) (arg0 drawable-region-sphere)) + (let ((v1-0 (-> this region-enter-count))) + (let ((a2-0 (-> arg0 region))) + (countdown (a3-0 v1-0) + (if (= (-> this region-enter-list a3-0) a2-0) + (return (the-as int #f)) + ) + ) + (set! (-> this region-enter-list v1-0) a2-0) + ) + (set! (-> this region-enter-prim-list v1-0) arg0) + (set! (-> this region-enter-count) (+ v1-0 1)) + ) + 0 + ) + +(defmethod track-exited-region! ((this region-prim-area) (arg0 drawable-region-sphere)) + (let ((v1-0 (-> this region-exit-count))) + (let ((a2-0 (-> arg0 region))) + (countdown (a3-0 v1-0) + (if (= (-> this region-exit-list a3-0) a2-0) + (return (the-as int #f)) + ) + ) + (set! (-> this region-exit-list v1-0) a2-0) + ) + (set! (-> this region-exit-prim-list v1-0) arg0) + (set! (-> this region-exit-count) (+ v1-0 1)) + ) + 0 + ) + +(defmethod track-inside-region! ((this region-prim-area) (arg0 drawable-region-sphere)) + (let ((v1-0 (-> this region-inside-count))) + (let ((a2-0 (-> arg0 region))) + (countdown (a3-0 v1-0) + (if (= (-> this region-inside-list a3-0) a2-0) + (return (the-as int #f)) + ) + ) + (set! (-> this region-inside-list v1-0) a2-0) + ) + (set! (-> this region-inside-prim-list v1-0) arg0) + (set! (-> this region-inside-count) (+ v1-0 1)) + ) + 0 + ) + +(defmethod track-start-region! ((this region-prim-area) (arg0 drawable-region-sphere)) + (let ((v1-0 (-> this region-start-count))) + (let ((a2-0 (-> arg0 region))) + (countdown (a3-0 v1-0) + (if (= (-> this region-start-list a3-0) a2-0) + (return (the-as int #f)) + ) + ) + (set! (-> this region-start-list v1-0) a2-0) + ) + (set! (-> this region-start-prim-list v1-0) arg0) + (set! (-> this region-start-count) (+ v1-0 1)) + ) + 0 + ) + +(defmethod debug-draw-region ((this drawable-region-sphere) (arg0 int)) + (let ((t9-0 (method-of-type drawable-region-prim debug-draw-region))) + (t9-0 this arg0) + ) + (let ((a2-0 (-> this bsphere))) + (add-debug-sphere #t (bucket-id debug) a2-0 (-> this bsphere w) (new 'static 'rgba :r #xff :a #x80)) + ) + 0 + (none) + ) + +(defmethod track-region ((this drawable-region-sphere) (arg0 region-prim-area)) + (-> this region) + (let ((s4-0 (-> this bsphere))) + (if (< 0.0 (ray-sphere-intersect (-> arg0 pos) (-> arg0 ray) s4-0 (-> s4-0 w))) + (track-entered-region! arg0 this) + ) + (if (< 0.0 (ray-sphere-intersect (-> arg0 exit-pos) (-> arg0 exit-ray) s4-0 (-> s4-0 w))) + (track-exited-region! arg0 this) + ) + (if (spheres-overlap? (the-as sphere (-> arg0 pos)) (the-as sphere s4-0)) + (track-start-region! arg0 this) + ) + (when (spheres-overlap? (the-as sphere (-> arg0 exit-pos)) (the-as sphere s4-0)) + (track-inside-region! arg0 this) + #t + ) + ) + ) + +(defmethod within-area? ((this drawable-region-sphere) (arg0 region-prim-area)) + "@returns Whether or not the object overlaps with the provided [[region-prim-area]]'s extent" + (spheres-overlap? (the-as sphere (-> arg0 pos)) (the-as sphere (-> this bsphere))) + ) + +(defmethod debug-draw-region ((this drawable-region-face) (arg0 int)) + (when (zero? arg0) + (let ((t9-0 (method-of-type drawable-region-prim debug-draw-region))) + (t9-0 this arg0) + ) + ) + (let ((s5-0 (-> this bsphere))) + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + s5-0 + (-> this data normal) + (meters 2) + (new 'static 'rgba :r #xff :g #xff :a #x80) + ) + (add-debug-sphere #t (bucket-id debug) s5-0 (-> this bsphere w) (new 'static 'rgba :r #xff :a #x30)) + ) + (add-debug-bound + (bucket-id debug) + (-> this data points) + (the-as int (-> this data num-points)) + (new 'static 'rgba :r #x80 :g #x80 :a #x40) + (new 'static 'rgba :r #x80 :a #x40) + 0 + ) + 0 + (none) + ) + +(defmethod track-region ((this drawable-region-face) (arg0 region-prim-area)) + (local-vars (sv-48 vector) (sv-52 vector) (sv-56 (inline-array vector))) + (-> this region) + (let* ((s4-0 (-> this data)) + (v1-1 (-> s4-0 normal)) + (a0-3 (>= 0.0 (- (vector-dot (-> arg0 pos) v1-1) (-> v1-1 w)))) + (s3-0 (>= 0.0 (- (vector-dot (-> arg0 exit-pos) v1-1) (-> v1-1 w)))) + ) + (when (!= a0-3 s3-0) + (when (nonzero? (-> s4-0 num-points)) + (set! sv-48 (new 'stack-no-clear 'vector)) + (set! sv-52 (new 'stack-no-clear 'vector)) + (set! sv-56 (-> s4-0 points)) + (ray-plane-intersect sv-48 sv-52 (-> arg0 pos) (-> arg0 ray) (-> sv-56 0) (-> sv-56 1) (-> sv-56 2)) + (let ((s4-1 (-> s4-0 num-points)) + (s2-0 0) + (s1-0 (vector-negate! (new 'stack-no-clear 'vector) sv-52)) + ) + (while (< (+ s2-0 2) (the-as int s4-1)) + (if (or (point-in-triangle-cross + sv-48 + sv-52 + (-> (the-as (inline-array vector) sv-56) 0) + (-> (the-as (inline-array vector) sv-56) 1) + (-> (the-as (inline-array vector) sv-56) 2) + ) + (point-in-triangle-cross + sv-48 + s1-0 + (-> (the-as (inline-array vector) sv-56) 0) + (-> (the-as (inline-array vector) sv-56) 1) + (-> (the-as (inline-array vector) sv-56) 2) + ) + ) + (goto cfg-17) + ) + (+! s2-0 1) + (set! sv-56 (the-as (inline-array vector) (-> (the-as (inline-array vector) sv-56) 1))) + ) + ) + (set! s3-0 s3-0) + (goto cfg-20) + ) + (label cfg-17) + (if s3-0 + (track-entered-region! arg0 (the-as drawable-region-sphere this)) + (track-exited-region! arg0 (the-as drawable-region-sphere this)) + ) + ) + (label cfg-20) + s3-0 + ) + ) + +(defmethod debug-draw-region ((this drawable-region-volume) (arg0 int)) + (let ((t9-0 (method-of-type drawable-region-prim debug-draw-region))) + (t9-0 this arg0) + ) + (let* ((s5-0 (-> this faces length)) + (s4-0 0) + (a0-3 (-> this faces data s4-0)) + ) + (while (< s4-0 s5-0) + (debug-draw-region a0-3 1) + (+! s4-0 1) + (set! a0-3 (-> this faces data s4-0)) + ) + ) + 0 + (none) + ) + +(defmethod track-region ((this drawable-region-volume) (arg0 region-prim-area)) + (if (within-area? this arg0) + (track-start-region! arg0 (the-as drawable-region-sphere this)) + ) + (let* ((s4-0 (-> this faces length)) + (s3-0 0) + (a0-4 (-> this faces data s3-0)) + ) + (while (< s3-0 s4-0) + (if (not (track-region a0-4 arg0)) + (return #f) + ) + (+! s3-0 1) + (set! a0-4 (-> this faces data s3-0)) + ) + ) + (track-inside-region! arg0 (the-as drawable-region-sphere this)) + #t + ) + +(defmethod within-area? ((this drawable-region-volume) (arg0 region-prim-area)) + "@returns Whether or not the object overlaps with the provided [[region-prim-area]]'s extent" + (let* ((v1-1 (-> this faces length)) + (a2-0 0) + (a3-2 (-> this faces data a2-0)) + ) + (while (< a2-0 v1-1) + (let ((a3-4 (-> a3-2 data normal))) + (if (< 0.0 (- (vector-dot (-> arg0 pos) a3-4) (-> a3-4 w))) + (return #f) + ) + ) + (+! a2-0 1) + (set! a3-2 (-> this faces data a2-0)) + ) + ) + #t + ) + +(defmethod drawable-tree-region-prim-method-17 ((this drawable-tree-region-prim) (arg0 vector)) + ;; og:preserve-this + (sphere<-vector+r! (the-as sphere (-> (scratchpad-object region-prim-area) pos)) arg0 0.0) + (let* ((s5-0 (-> this data2 (+ (-> this length) -1) length)) + (s4-0 0) + (a0-8 (the-as object (+ (+ (* s4-0 32) 32) (the-as int (-> this data2 (+ (-> this length) -1)))))) + ) + (while (< s4-0 s5-0) + ;; og:preserve-this + (if (within-area? (the-as drawable-region-prim a0-8) (scratchpad-object region-prim-area)) + (return #t) + ) + (+! s4-0 1) + (set! a0-8 (+ (+ (* s4-0 32) 32) (the-as int (-> this data2 (+ (-> this length) -1))))) + ) + ) + #f + ) + +;; WARN: Return type mismatch int vs symbol. +(defmethod point-in-region-debug! ((this region) (arg0 vector)) + "Debug check to see if point is in region. This is not efficient, since it has to find the parent geometry of this region." + (local-vars (sv-16 int) (sv-32 int)) + ;; og:preserve-this + (sphere<-vector+r! (the-as sphere (-> (scratchpad-object region-prim-area) pos)) arg0 0.0) + (dotimes (s5-0 (-> *level* length)) + (let ((s4-0 (-> *level* level s5-0))) + (when (= (-> s4-0 status) 'active) + (when (nonzero? (-> s4-0 bsp region-trees)) + (let* ((s3-0 (-> s4-0 bsp region-trees length)) + (s2-0 0) + (s1-0 (-> s4-0 bsp region-trees s2-0)) + ) + (while (< s2-0 s3-0) + (let ((s0-0 (-> s1-0 data2 (+ (-> s1-0 length) -1) length))) + (set! sv-16 0) + (set! sv-32 (+ (+ (* sv-16 32) 32) (the-as int (-> s1-0 data2 (+ (-> s1-0 length) -1))))) + (while (< sv-16 s0-0) + (if (and (= (-> (the-as drawable-region-prim sv-32) region) this) + (within-area? + (the-as drawable-region-prim sv-32) + ;; og:preserve-this + (the-as region-prim-area (-> (scratchpad-object region-prim-area) region-prim-list)) + ) + ) + (return (the-as symbol sv-32)) + ) + (set! sv-16 (+ sv-16 1)) + (set! sv-32 (+ (+ (* sv-16 32) 32) (the-as int (-> s1-0 data2 (+ (-> s1-0 length) -1))))) + ) + ) + (+! s2-0 1) + (set! s1-0 (-> s4-0 bsp region-trees s2-0)) + ) + ) + ) + ) + ) + ) + (the-as symbol #f) + ) + +(defmethod debug-print ((this drawable-tree-region-prim) (arg0 vector) (arg1 object)) + ;; og:preserve-this + (sphere<-vector+r! (the-as sphere (-> (scratchpad-object region-prim-area) pos)) arg0 0.0) + (let* ((s4-0 (-> this data2 (+ (-> this length) -1) length)) + (s3-0 0) + (s2-0 (the-as object (+ (+ (* s3-0 32) 32) (the-as int (-> this data2 (+ (-> this length) -1)))))) + ) + (while (< s3-0 s4-0) + ;; og:preserve-this + (if (within-area? (the-as drawable-region-prim s2-0) (scratchpad-object region-prim-area)) + (format + arg1 + " splitbox-~D ~A~%" + (-> (the-as drawable-region-prim s2-0) id) + (the-as drawable-region-prim s2-0) + ) + ) + (+! s3-0 1) + (set! s2-0 (+ (+ (* s3-0 32) 32) (the-as int (-> this data2 (+ (-> this length) -1))))) + ) + ) + 0 + (none) + ) + +(defun region-tree-execute ((arg0 symbol) (arg1 vector) (arg2 vector)) + (local-vars (sv-32 vector)) + (set! sv-32 (vector-average! (new 'stack-no-clear 'vector) arg1 arg2)) + (set! (-> sv-32 w) (* 0.5 (vector-vector-distance arg1 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)) arg1 0.0) + (sphere<-vector+r! (the-as sphere (-> (scratchpad-object region-prim-area) exit-pos)) arg2 0.0) + (vector-! (-> (scratchpad-object region-prim-area) ray) arg2 arg1) + (vector-! (-> (scratchpad-object region-prim-area) exit-ray) arg1 arg2) + (dotimes (s5-1 (-> *level* length)) + (let ((v1-17 (-> *level* level s5-1))) + (when (= (-> v1-17 status) 'active) + (let ((s4-1 (-> v1-17 bsp region-trees))) + (when (nonzero? s4-1) + (let* ((s3-0 (-> s4-1 length)) + (s2-0 0) + (a0-14 (-> s4-1 s2-0)) + ) + (while (< s2-0 s3-0) + (if (= (-> a0-14 name) arg0) + ;; og:preserve-this + (collect-regions a0-14 (the-as sphere sv-32) 0 (-> (scratchpad-object region-prim-area) region-prim-list)) + ) + (+! s2-0 1) + (set! a0-14 (-> s4-1 s2-0)) + ) + ) + ) + ) + ) + ) + ) + ;; og:preserve-this + (countdown (gp-1 (-> (scratchpad-object region-prim-area) region-prim-list num-items)) + (track-region + (-> (scratchpad-object region-prim-area) region-prim-list items gp-1) + (the-as region-prim-area (-> (scratchpad-object region-prim-area) region-prim-list)) + ) + ) + (let ((gp-2 (-> (scratchpad-object region-prim-area) region-enter-count))) + (while (begin (label cfg-22) (nonzero? gp-2)) + (+! gp-2 -1) + (let* ((a2-5 (-> (scratchpad-object region-prim-area) region-enter-list gp-2)) + (s5-2 (-> a2-5 on-enter)) + ) + (when s5-2 + (countdown (v1-47 (-> (scratchpad-object region-prim-area) region-start-count)) + (if (= a2-5 (-> (scratchpad-object region-prim-area) region-start-list v1-47)) + (goto cfg-22) + ) + ) + (script-eval + s5-2 + :key a2-5 + :vector (-> (scratchpad-object region-prim-area) region-enter-prim-list gp-2 bsphere) + ) + ) + ) + ) + ) + ;; og:preserve-this + (let ((gp-3 (-> (scratchpad-object region-prim-area) region-exit-count))) + (while (begin (label cfg-31) (nonzero? gp-3)) + (+! gp-3 -1) + (let* ((a2-6 (-> (scratchpad-object region-prim-area) region-exit-list gp-3)) + (s5-3 (-> a2-6 on-exit)) + ) + (when s5-3 + (countdown (v1-64 (-> (scratchpad-object region-prim-area) region-inside-count)) + (if (= a2-6 (-> (scratchpad-object region-prim-area) region-inside-list v1-64)) + (goto cfg-31) + ) + ) + (script-eval + s5-3 + :key a2-6 + :vector (-> (scratchpad-object region-prim-area) region-exit-prim-list gp-3 bsphere) + ) + ) + ) + ) + ) + ;; og:preserve-this + (countdown (gp-4 (-> (scratchpad-object region-prim-area) region-inside-count)) + (let* ((a2-7 (-> (scratchpad-object region-prim-area) region-inside-list gp-4)) + (s5-4 (-> a2-7 on-inside)) + ) + (if s5-4 + (script-eval + s5-4 + :key a2-7 + :vector (-> (scratchpad-object region-prim-area) region-inside-prim-list gp-4 bsphere) + ) + ) + ) + ) + 0 + (none) + ) + +(defun region-execute () + (set! (-> *level* camera-pos 1 quad) (-> *level* camera-pos 0 quad)) + (set! (-> *level* camera-pos 0 quad) (-> (camera-pos) quad)) + (set! (-> *level* target-pos 1 quad) (-> *level* target-pos 0 quad)) + (set! (-> *level* target-pos 0 quad) (-> (target-pos 0) quad)) + (when (and *execute-regions* (-> *setting-control* user-current region-mode) (not (paused?))) + (region-tree-execute 'camera (-> *level* camera-pos 1) (the-as vector (-> *level* camera-pos))) + (region-tree-execute 'target (-> *level* target-pos 1) (the-as vector (-> *level* target-pos))) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs drawable-region-prim. +(defun region-prim-lookup-by-id ((arg0 int) (arg1 symbol) (arg2 int)) + (let ((v1-0 -1)) + (dotimes (a3-0 (-> *level* length)) + (let ((t0-3 (-> *level* level a3-0))) + (when (= (-> t0-3 status) 'active) + (when (nonzero? (-> t0-3 bsp region-trees)) + (let* ((t1-8 (-> t0-3 bsp region-trees length)) + (t2-1 0) + (t3-2 (-> t0-3 bsp region-trees t2-1)) + ) + (while (< t2-1 t1-8) + (when (or (not arg1) (= (-> t3-2 name) arg1)) + (let* ((t4-10 (-> t3-2 data2 (+ (-> t3-2 length) -1) length)) + (t5-0 0) + (t6-2 (the-as object (+ (+ (* t5-0 32) 32) (the-as int (-> t3-2 data2 (+ (-> t3-2 length) -1)))))) + ) + (while (< t5-0 t4-10) + (when (= (-> (the-as drawable-region-prim t6-2) region id) arg0) + (+! v1-0 1) + (if (= v1-0 arg2) + (return (the-as drawable-region-prim t6-2)) + ) + ) + (+! t5-0 1) + (set! t6-2 (+ (+ (* t5-0 32) 32) (the-as int (-> t3-2 data2 (+ (-> t3-2 length) -1))))) + ) + ) + ) + (+! t2-1 1) + (set! t3-2 (-> t0-3 bsp region-trees t2-1)) + ) + ) + ) + ) + ) + ) + ) + (the-as drawable-region-prim #f) + ) + +(defun region-lookup-by-id ((arg0 int)) + (dotimes (v1-0 (-> *level* length)) + (let ((a1-3 (-> *level* level v1-0))) + (when (= (-> a1-3 status) 'active) + (when (nonzero? (-> a1-3 bsp region-array)) + (let* ((a2-8 (-> a1-3 bsp region-array length)) + (a3-1 0) + (t0-2 (-> a1-3 bsp region-array data a3-1)) + ) + (while (< a3-1 a2-8) + (if (= (-> t0-2 id) arg0) + (return t0-2) + ) + (+! a3-1 1) + (set! t0-2 (-> a1-3 bsp region-array data a3-1)) + ) + ) + ) + ) + ) + ) + (the-as region #f) + ) diff --git a/goal_src/jak3/engine/load/decomp.gc b/goal_src/jak3/engine/load/decomp.gc index eebe06cea5..c99650612c 100644 --- a/goal_src/jak3/engine/load/decomp.gc +++ b/goal_src/jak3/engine/load/decomp.gc @@ -7,3 +7,501 @@ ;; DECOMP BEGINS +(defun unpack-comp-rle ((arg0 (pointer int8)) (arg1 (pointer int8))) + "Decompress data compressed with run-length encoding." + (local-vars (v1-2 int) (v1-3 uint)) + (nop!) + (loop + (loop + (set! v1-2 (-> arg1 0)) + (set! arg1 (&-> arg1 1)) + (b! (<= v1-2 0) cfg-5 :delay (nop!)) + (let ((a2-0 (-> arg1 0))) + (set! arg1 (&-> arg1 1)) + (label cfg-3) + (nop!) + (nop!) + (nop!) + (nop!) + (set! (-> arg0 0) a2-0) + ) + (set! arg0 (&-> arg0 1)) + (b! (> v1-2 0) cfg-3 :delay (set! v1-2 (+ v1-2 -1))) + ) + (label cfg-5) + (b! (zero? v1-2) cfg-8 :delay (set! v1-3 (the-as uint (- v1-2)))) + (label cfg-6) + (let ((a2-1 (-> arg1 0))) + (set! arg1 (&-> arg1 1)) + (nop!) + (nop!) + (set! (-> arg0 0) a2-1) + ) + (+! v1-3 -1) + (b! (> (the-as int v1-3) 0) cfg-6 :delay (set! arg0 (&-> arg0 1))) + ) + (label cfg-8) + arg1 + ) + +(deftype huf-dictionary-node (structure) + ((zero uint16) + (one uint16) + ) + ) + + +(defun unpack-comp-huf ((arg0 (pointer uint8)) (arg1 (pointer uint8)) (arg2 uint) (arg3 huf-dictionary-node)) + "Decompress data compressed with huffman encoding." + (local-vars (t1-1 uint) (t3-2 (pointer uint16))) + (nop!) + (let ((t1-0 (-> arg3 zero)) + (a2-1 (+ arg2 -1028)) + (t2-0 (-> arg3 one)) + ) + (nop!) + (label cfg-1) + (let ((v1-4 128)) + (nop!) + (let ((t0-0 (-> arg1 0))) + (set! arg1 (&-> arg1 1)) + (label cfg-2) + (let ((t3-0 (logand t0-0 v1-4))) + (shift-arith-right-32 v1-4 v1-4 1) + (b! (zero? t3-0) cfg-4 :delay (set! t1-1 t1-0)) + ) + ) + (nop!) + (set! t1-1 t2-0) + (label cfg-4) + (let ((t2-1 (+ t1-1 -256))) + (let ((t3-1 (* t1-1 4))) + (b! (< (the-as int t2-1) 0) cfg-8 :delay (set! t3-2 (the-as (pointer uint16) (+ t3-1 a2-1)))) + ) + (b! (zero? t2-1) cfg-10 :delay (set! t1-0 (-> t3-2 0))) + ) + (b! (nonzero? v1-4) cfg-2 :delay (set! t2-0 (-> t3-2 1))) + (b! #t cfg-1 :delay (nop!)) + (label cfg-8) + (set! (-> arg0 0) t1-1) + (set! arg0 (&-> arg0 1)) + (nop!) + (set! t1-0 (-> arg3 zero)) + (b! (nonzero? v1-4) cfg-2 :delay (set! t2-0 (-> arg3 one))) + ) + ) + (b! #t cfg-1 :delay (nop!)) + (label cfg-10) + (nop!) + (nop!) + 0 + (none) + ) + +(defun unpack-comp-lzo ((arg0 (pointer uint8)) (arg1 (pointer uint8))) + "Decompress data compressed with LZO encoding." + 0 + (let ((v1-1 arg0)) + (b! (>= (the-as uint 17) (-> arg1 0)) cfg-5 :delay #f) + (let ((a2-4 (the-as int (+ (-> arg1 0) -17)))) + (set! arg1 (&-> arg1 1)) + (b! (< a2-4 4) cfg-41) + (until (<= a2-4 0) + (set! (-> arg0 0) (-> arg1 0)) + (set! arg0 (&-> arg0 1)) + (set! arg1 (&-> arg1 1)) + (+! a2-4 -1) + ) + (b! #t cfg-15 :delay (nop!)) + (label cfg-5) + (b! #t cfg-45 :delay (nop!)) + (label cfg-6) + (let ((a2-6 (-> arg1 0))) + (set! arg1 (&-> arg1 1)) + (b! (>= (the-as int a2-6) 16) cfg-18) + (b! (nonzero? a2-6) cfg-12 :delay (empty-form)) + (while (zero? (-> arg1 0)) + (+! a2-6 255) + (set! arg1 (&-> arg1 1)) + ) + (set! a2-6 (+ (-> arg1 0) 15 a2-6)) + (set! arg1 (&-> arg1 1)) + (label cfg-12) + (set! (-> arg0 0) (-> arg1 0)) + (set! (-> arg0 1) (-> arg1 1)) + (set! (-> arg0 2) (-> arg1 2)) + (set! arg0 (&-> arg0 3)) + (set! arg1 (&-> arg1 3)) + (until (<= (the-as int a2-6) 0) + (set! (-> arg0 0) (-> arg1 0)) + (set! arg0 (&-> arg0 1)) + (set! arg1 (&-> arg1 1)) + (+! a2-6 -1) + ) + (label cfg-15) + (set! a2-6 (-> arg1 0)) + (set! arg1 (&-> arg1 1)) + (b! (>= (the-as int a2-6) 16) cfg-18) + (let ((a2-10 (the-as (pointer uint8) (&- (&- (&-> arg0 -2049) (the-as uint (/ (the-as int a2-6) 4))) (the-as uint (* (-> arg1 0) 4)))))) + (set! arg1 (&-> arg1 1)) + (set! (-> arg0 0) (-> a2-10 0)) + (set! (-> arg0 1) (-> a2-10 1)) + (set! (-> arg0 2) (-> a2-10 2)) + (set! arg0 (&-> arg0 3)) + (&-> a2-10 2) + ) + (b! #t cfg-39 :delay (nop!)) + (b! #t cfg-43 :delay (nop!)) + (label cfg-18) + (b! (< (the-as int a2-6) 64) cfg-20) + (let ((a3-23 + (the-as (pointer uint8) (&- (&- (&-> arg0 -1) (the-as uint (logand (/ (the-as int a2-6) 4) 7))) (the-as uint (* (-> arg1 0) 8)))) + ) + ) + (set! arg1 (&-> arg1 1)) + (let ((a2-13 (+ (/ (the-as int a2-6) 32) -1))) + (b! #t cfg-36 :delay (nop!)) + (label cfg-20) + (b! (< (the-as int a2-6) 32) cfg-27) + (set! a2-13 (the-as int (logand a2-6 31))) + (b! (nonzero? a2-13) cfg-26 :delay (empty-form)) + (b! #t cfg-24 :delay (nop!)) + (label cfg-23) + (+! a2-13 255) + (set! arg1 (&-> arg1 1)) + (label cfg-24) + (b! (zero? (-> arg1 0)) cfg-23 :delay (nop!)) + (set! a2-13 (the-as int (+ (-> arg1 0) 31 a2-13))) + (set! arg1 (&-> arg1 1)) + (label cfg-26) + (set! a3-23 (the-as (pointer uint8) (&- (&-> arg0 -1) (the-as uint (+ (shr (-> arg1 0) 2) (* (-> arg1 1) 64)))))) + (set! arg1 (&-> arg1 2)) + (b! #t cfg-36 :delay (nop!)) + (label cfg-27) + (b! (< (the-as int a2-6) 16) cfg-35) + (let ((a3-32 (the-as (pointer uint8) (&- arg0 (the-as uint (shl (logand a2-6 8) 11)))))) + (set! a2-13 (the-as int (logand a2-6 7))) + (b! (nonzero? a2-13) cfg-33 :delay (empty-form)) + (b! #t cfg-31 :delay (nop!)) + (label cfg-30) + (+! a2-13 255) + (set! arg1 (&-> arg1 1)) + (label cfg-31) + (b! (zero? (-> arg1 0)) cfg-30 :delay (nop!)) + (set! a2-13 (the-as int (+ (-> arg1 0) 7 a2-13))) + (set! arg1 (&-> arg1 1)) + (label cfg-33) + (let ((a3-33 (&- a3-32 (the-as uint (+ (shr (-> arg1 0) 2) (* (-> arg1 1) 64)))))) + (set! arg1 (&-> arg1 2)) + (b! (= a3-33 arg0) cfg-47 :delay (nop!)) + (set! a3-23 (&-> (the-as (pointer uint8) a3-33) -16384)) + ) + ) + (b! #t cfg-36 :delay (nop!)) + (label cfg-35) + (let ((a2-16 (the-as (pointer uint8) (&- (&- (&-> arg0 -1) (the-as uint (/ (the-as int a2-6) 4))) (the-as uint (* (-> arg1 0) 4)))))) + (set! arg1 (&-> arg1 1)) + (set! (-> arg0 0) (-> a2-16 0)) + (set! (-> arg0 1) (-> a2-16 1)) + (set! arg0 (&-> arg0 2)) + (&-> a2-16 1) + ) + (b! #t cfg-39 :delay (nop!)) + (label cfg-36) + (set! (-> arg0 0) (-> a3-23 0)) + (set! (-> arg0 1) (-> a3-23 1)) + (set! arg0 (&-> arg0 2)) + (let ((a3-39 (&-> a3-23 2))) + (until (<= (the-as int a2-13) 0) + (set! (-> arg0 0) (-> a3-39 0)) + (set! arg0 (&-> arg0 1)) + (set! a3-39 (&-> a3-39 1)) + (+! a2-13 -1) + ) + ) + ) + ) + (label cfg-39) + (set! a2-4 (the-as int (logand (-> arg1 -2) 3))) + (b! (zero? (the-as uint a2-4)) cfg-45 :delay (nop!)) + (until (<= a2-4 0) + (label cfg-41) + (set! (-> arg0 0) (-> arg1 0)) + (set! arg0 (&-> arg0 1)) + (set! arg1 (&-> arg1 1)) + (set! a2-4 (the-as int (+ (the-as uint a2-4) -1))) + ) + (set! a2-6 (-> arg1 0)) + ) + ) + (set! arg1 (&-> arg1 1)) + (label cfg-43) + (b! #t cfg-18 :delay (nop!)) + (label cfg-45) + (b! #t cfg-6 :delay (nop!)) + (label cfg-47) + (&- arg0 (the-as uint v1-1)) + ) + (none) + ) + +(defmethod update-vis! ((this level) (arg0 level-vis-info) (arg1 uint) (arg2 (pointer uint8))) + "Load/decompress precomputed visibility." + (local-vars (t0-3 uint128) (sv-16 int) (sv-32 (pointer int8))) + (let* ((a0-1 (-> arg0 from-bsp current-leaf-idx)) + (v1-1 (-> arg0 current-vis-string)) + (s3-0 (-> arg0 vis-string a0-1)) + ) + 0 + (+ #x70000000 0) + (+ 2048 #x70000000) + (b! (!= v1-1 s3-0) cfg-8 :delay (empty-form)) + (b! (not (logtest? (vis-info-flag loading) (-> arg0 flags))) cfg-6 :delay (empty-form)) + (if (check-busy *ramdisk-rpc*) + (return #f) + ) + (logclear! (-> arg0 flags) (vis-info-flag loading)) + (let ((s3-1 (the-as (pointer integer) (-> this vis-buffer)))) + (b! #t cfg-16 :delay (nop!)) + (label cfg-6) + (return #t) + (label cfg-8) + (when (logtest? (vis-info-flag loading) (-> arg0 flags)) + (if (check-busy *ramdisk-rpc*) + (return #f) + ) + (logclear! (-> arg0 flags) (vis-info-flag loading)) + ) + (set! (-> arg0 current-vis-string) s3-0) + (b! (logtest? (vis-info-flag in-iop) (-> arg0 flags)) cfg-15 :delay (empty-form)) + (set! s3-1 (&+ arg2 s3-0)) + (b! #t cfg-16 :delay (nop!)) + (label cfg-15) + (format 0 "ERROR: ramdisk vis for level ~A, this is not supported~%" (-> this name)) + (let ((v0-1 #f)) + (b! #t cfg-49 :delay (nop!)) + (label cfg-16) + (let ((s2-0 (the-as int (logand (vis-info-flag + dummy0 + dummy1 + dummy2 + dummy3 + dummy4 + dummy5 + dummy6 + dummy7 + dummy8 + dummy9 + dummy10 + dummy11 + dummy12 + dummy13 + dummy14 + dummy15 + dummy16 + dummy17 + dummy18 + dummy19 + dummy20 + dummy21 + dummy22 + dummy23 + dummy24 + dummy25 + dummy26 + dummy27 + dummy28 + ) + (-> arg0 flags) + ) + ) + ) + ;; og:preserve-this + (s1-0 (&-> (the-as (pointer int8) *fake-scratchpad-data*) 0)) + (s0-0 (the-as (pointer int8) (&+ *fake-scratchpad-data* 2048))) + (s4-1 (-> this bsp visible-list-length)) + ) + (when (zero? (the-as vis-info-flag s2-0)) + (let ((v1-30 (/ (+ s4-1 15) 16))) + (dotimes (a0-19 v1-30) + (set! (-> (the-as (pointer int128) (&+ s1-0 (* a0-19 16)))) (the int128 0)) + ) + ) + (mem-copy! s1-0 (the-as (pointer uint8) s3-1) s4-1) + ) + (while (nonzero? s2-0) + (let ((v1-33 (logand s2-0 7))) + (cond + ((= v1-33 1) + (let ((v1-35 (/ (+ s4-1 15) 16))) + (dotimes (a0-23 v1-35) + (set! (-> (the-as (pointer int128) (&+ s1-0 (* a0-23 16)))) (the int128 0)) + ) + ) + (set! sv-16 (-> this bsp extra-vis-list-length)) + (set! sv-32 (&+ s1-0 (- s4-1 sv-16))) + (let ((v1-45 (unpack-vis (-> this bsp drawable-trees) s1-0 (the-as (pointer int8) s3-1)))) + (dotimes (a0-25 sv-16) + (let ((a1-9 (-> v1-45 0))) + (set! v1-45 (&-> v1-45 1)) + (set! (-> sv-32 0) a1-9) + ) + (set! sv-32 (&-> sv-32 1)) + ) + ) + #f + ) + ((= v1-33 2) + (unpack-comp-rle s1-0 (the-as (pointer int8) s3-1)) + ) + ((= v1-33 3) + (unpack-comp-huf + (the-as (pointer uint8) s1-0) + (the-as (pointer uint8) s3-1) + (-> arg0 dictionary) + (the-as huf-dictionary-node (+ (-> arg0 dictionary) (-> arg0 dictionary-length) -4)) + ) + ) + ((= v1-33 4) + (unpack-comp-lzo (the-as (pointer uint8) s1-0) (the-as (pointer uint8) s3-1)) + ) + ) + ) + (set! s3-1 s1-0) + (set! s1-0 s0-0) + (set! s0-0 (the-as (pointer int8) s3-1)) + (shift-arith-right-32 s2-0 s2-0 3) + ) + (let ((s2-1 (the-as (pointer uint8) s3-1)) + (s1-1 (-> this bsp all-visible-list)) + (v1-51 #f) + ) + (dotimes (s0-1 s4-1) + (when (!= (logand (-> s2-1 0) (-> s1-1 0)) (-> s2-1 0)) + (format #t "ERROR: illegal vis bits set [byte ~X] ~X -> ~X~%" s0-1 (-> s2-1 0) (-> s1-1 0)) + (set! v1-51 #t) + ) + (set! s2-1 (&-> s2-1 1)) + (set! s1-1 (&-> s1-1 1)) + ) + (when v1-51 + (format #t "src = #x~x dest = #x~x ~s ~s~%" s3-1 (-> arg0 vis-bits) (-> arg0 level) (-> arg0 from-level)) + (format #t "leaf-index = ~d~%" (-> arg0 from-bsp current-leaf-idx)) + 0 + ) + ) + (let ((v1-55 s3-1) + (a0-42 (the-as object (-> arg0 vis-bits))) + (a1-22 (the-as (pointer uinteger) (-> this bsp all-visible-list))) + (a2-11 (/ (+ s4-1 15) 16)) + ) + (dotimes (a3-6 a2-11) + (let ((t0-2 (-> (the-as (pointer uint128) v1-55) 0)) + (t1-1 (-> (the-as (pointer uint128) a1-22) 0)) + ) + (.pand t0-3 t0-2 t1-1) + ) + (set! (-> (the-as (pointer uint128) a0-42) 0) t0-3) + (set! a0-42 (+ (the-as uint a0-42) 16)) + (set! v1-55 (&-> (the-as (pointer uint8) v1-55) 16)) + (set! a1-22 (&-> (the-as (pointer uint8) a1-22) 16)) + ) + ) + ) + (set! v0-1 #t) + (label cfg-49) + v0-1 + ) + ) + ) + ) + +;; WARN: Return type mismatch int vs (pointer uint8). +(defun pack-comp-rle ((arg0 (pointer uint8)) (arg1 (pointer uint8)) (arg2 int) (arg3 int)) + "Compress data, used for map mask stuff." + (let ((s4-0 0)) + 0 + (while (and (> arg2 0) (< (+ s4-0 131) arg3)) + (cond + ((= (-> arg1 0) (-> arg1 1)) + (let ((v1-2 (-> arg1 0))) + (set! arg1 (&-> arg1 2)) + (let ((a0-2 2)) + (+! arg2 -2) + (while (> arg2 0) + (cond + ((= v1-2 (-> arg1 0)) + (+! a0-2 1) + (set! arg1 (&-> arg1 1)) + (+! arg2 -1) + (if (>= a0-2 128) + (goto cfg-12) + ) + ) + (else + (goto cfg-12) + ) + ) + ) + (label cfg-12) + (set! (-> arg0 0) (the-as uint (+ a0-2 -1))) + ) + (set! (-> arg0 1) v1-2) + ) + (set! arg0 (&-> arg0 2)) + (+! s4-0 2) + ) + (else + (let ((a0-4 arg1) + (v1-4 1) + ) + (set! arg1 (&-> arg1 1)) + (+! arg2 -1) + (while (< 1 arg2) + (when (and (= (-> arg1 0) (-> arg1 1)) (< 2 arg2)) + (if (= (-> arg1 0) (-> arg1 2)) + (goto cfg-26) + ) + ) + (+! v1-4 1) + (set! arg1 (&-> arg1 1)) + (+! arg2 -1) + (if (>= v1-4 127) + (goto cfg-26) + ) + ) + (label cfg-26) + (when (= arg2 1) + (+! v1-4 1) + (set! arg1 (&-> arg1 1)) + (+! arg2 -1) + ) + (set! (-> arg0 0) (the-as uint (- v1-4))) + (let ((a1-21 (&-> arg0 1)) + (a2-4 (+ s4-0 1)) + ) + (dotimes (t0-0 v1-4) + (set! (-> a1-21 t0-0) (-> a0-4 t0-0)) + ) + (set! arg0 (&+ a1-21 v1-4)) + (set! s4-0 (+ a2-4 v1-4)) + ) + ) + ) + ) + ) + (if (< arg3 (+ s4-0 131)) + (format 0 "(GOMI) Warning: May have run out of bigmap bit mask compression memory~%") + ) + (when (= arg2 1) + (set! (-> arg0 0) (the-as uint -1)) + (set! (-> arg0 1) (-> arg1 0)) + (set! arg0 (&-> arg0 2)) + (+! s4-0 2) + (&-> arg1 1) + ) + (set! (-> arg0 0) (the-as uint 0)) + (&-> arg0 1) + (the-as (pointer uint8) (+ s4-0 1)) + ) + ) diff --git a/goal_src/jak3/engine/load/file-io.gc b/goal_src/jak3/engine/load/file-io.gc index a16e942505..fd658610fd 100644 --- a/goal_src/jak3/engine/load/file-io.gc +++ b/goal_src/jak3/engine/load/file-io.gc @@ -145,20 +145,22 @@ NOTE: this is a special type in three ways: (format *file-temp-string* "map~D/~S-mp" MAP_FILE_VERSION name) ) ((= kind (file-kind art-group)) - (format - *file-temp-string* - "art-group~D/~S-ag" - (cond - ((> ag-version-override 0) - (empty) - ag-version-override - ) - (else - ART_GROUP_FILE_VERSION - ) - ) - name - ) + ;; og:preserve-this removed art group prefix + ; (format + ; *file-temp-string* + ; "art-group~D/~S-ag" + ; (cond + ; ((> ag-version-override 0) + ; (empty) + ; ag-version-override + ; ) + ; (else + ; ART_GROUP_FILE_VERSION + ; ) + ; ) + ; name + ; ) + (format *file-temp-string* "~S-ag" name) ) ) *file-temp-string* diff --git a/goal_src/jak3/engine/load/load-state.gc b/goal_src/jak3/engine/load/load-state.gc index e36a00f979..47b1cb8db5 100644 --- a/goal_src/jak3/engine/load/load-state.gc +++ b/goal_src/jak3/engine/load/load-state.gc @@ -5,5 +5,618 @@ ;; name in dgo: load-state ;; dgos: GAME +(declare-type cty-borrow-manager basic) +(define-extern *city-borrow-manager* cty-borrow-manager) +(define-extern mark-permanent-holds (function pair object)) +(define-extern add-want-level (function (inline-array level-buffer-state) (pointer int64) symbol symbol symbol symbol object)) +(define-extern *backup-load-state* load-state) + + ;; DECOMP BEGINS +(defmethod print ((this level-buffer-state)) + (format + #t + "#" + (-> this name) + (-> this display?) + (-> this force-vis?) + (-> this force-inside?) + this + ) + this + ) + +(defmethod print ((this level-buffer-state-small)) + (format #t "#" (-> this name) (-> this display?) this) + this + ) + +(defmethod print ((this sound-bank-state)) + (let ((t9-0 format) + (a0-1 #t) + (a1-0 "#") + (a2-0 (-> this name)) + (v1-0 (-> this mode)) + ) + (t9-0 + a0-1 + a1-0 + a2-0 + (cond + ((= v1-0 (sound-bank-mode halfa)) + "halfa" + ) + ((= v1-0 (sound-bank-mode halfc)) + "halfc" + ) + ((= v1-0 (sound-bank-mode half)) + "half" + ) + ((= v1-0 (sound-bank-mode full)) + "full" + ) + ((= v1-0 (sound-bank-mode mode)) + "mode" + ) + ((= v1-0 (sound-bank-mode unknown)) + "unknown" + ) + ((= v1-0 (sound-bank-mode common)) + "common" + ) + ((= v1-0 (sound-bank-mode halfb)) + "halfb" + ) + ((= v1-0 (sound-bank-mode none)) + "none" + ) + ((= v1-0 (sound-bank-mode virtual)) + "virtual" + ) + (else + "*unknown*" + ) + ) + this + ) + ) + this + ) + +(defmethod reset! ((this load-state)) + (dotimes (v1-0 10) + (set! (-> this want v1-0 name) #f) + (set! (-> this want v1-0 display?) #f) + (set! (-> this want v1-0 force-vis?) #f) + (set! (-> this want v1-0 force-inside?) #f) + ) + (dotimes (v1-3 3) + (set! (-> this want-sound v1-3 name) #f) + (set! (-> this want-sound v1-3 mode) (sound-bank-mode none)) + ) + (set! (-> this command-list) '()) + (dotimes (v1-7 256) + (set! (-> this object-name v1-7) #f) + (set! (-> this object-status v1-7) (the-as basic 0)) + ) + this + ) + +(defun level-base-level-name ((arg0 symbol)) + (when arg0 + (let ((v1-0 (lookup-level-info arg0))) + (if (and v1-0 (-> v1-0 borrow) (-> v1-0 borrow alias)) + (car (-> v1-0 borrow alias)) + ) + ) + ) + ) + +(defmethod want-levels ((this load-state) (arg0 (pointer symbol))) + (dotimes (v1-0 10) + (dotimes (a0-1 10) + (when (= (-> this want v1-0 name) (-> arg0 a0-1)) + (set! (-> arg0 a0-1) #f) + (goto cfg-8) + ) + ) + (set! (-> this want v1-0 name) #f) + (label cfg-8) + ) + (dotimes (s4-0 10) + (when (-> arg0 s4-0) + (dotimes (s3-0 10) + (when (not (-> this want s3-0 name)) + (set! (-> this want s3-0 name) (-> arg0 s4-0)) + (set! (-> this want s3-0 display?) #f) + (set! (-> this want s3-0 force-vis?) #f) + (set! (-> this want s3-0 force-inside?) #f) + (let ((a0-13 (level-base-level-name (-> this want s3-0 name)))) + (dotimes (v1-22 10) + (when (= (-> this want-exp v1-22 name) a0-13) + (set! (-> this want s3-0 display?) (-> this want-exp v1-22 display?)) + (set! (-> this want s3-0 force-vis?) (-> this want-exp v1-22 force-vis?)) + (set! (-> this want s3-0 force-inside?) (-> this want-exp v1-22 force-inside?)) + (goto cfg-21) + ) + ) + ) + (label cfg-21) + (goto cfg-26) + ) + ) + ) + (label cfg-26) + ) + (dotimes (v1-35 10) + (when (not (-> this want v1-35 name)) + (set! (-> this want v1-35 display?) #f) + (set! (-> this want v1-35 force-vis?) #f) + (set! (-> this want v1-35 force-inside?) #f) + ) + ) + (add-borrow-levels this) + 0 + ) + +(define *borrow-city-expansion-list* '(#f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f)) + +(define *borrow-city-status-list* '(#f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f)) + +;; WARN: Return type mismatch pair vs object. +(defun borrow-city-expansion ((arg0 pair)) + (local-vars (v1-12 type) (s2-2 int) (sv-16 pair) (sv-20 symbol) (sv-24 object)) + (let ((gp-0 *borrow-city-expansion-list*)) + 0 + (let ((s4-0 0)) + (b! #t cfg-2 :delay (nop!)) + (label cfg-1) + (set! (car (ref& gp-0 s4-0)) #f) + (set! (car (ref& *borrow-city-status-list* s4-0)) #f) + (+! s4-0 1) + (label cfg-2) + (let ((a0-3 (the-as object gp-0))) + (b! (< s4-0 ((method-of-type (rtype-of (the-as pair a0-3)) length) (the-as pair a0-3))) cfg-1) + ) + ) + (let* ((v1-7 gp-0) + (a0-4 arg0) + (a1-4 (car a0-4)) + ) + (while (not (null? a0-4)) + (set! (car v1-7) a1-4) + (set! v1-7 (cdr v1-7)) + (set! a0-4 (cdr a0-4)) + (set! a1-4 (car a0-4)) + ) + ) + (let ((v1-11 (shr (shl (the-as int arg0) 61) 61))) + (b! (zero? v1-11) cfg-20 :likely-delay (set! v1-12 binteger)) + (b! (= v1-11 4) cfg-20 :likely-delay (set! v1-12 (-> (the-as basic arg0) type))) + (b! (= v1-11 2) cfg-20 :likely-delay (set! v1-12 pair)) + ) + (set! v1-12 symbol) + (label cfg-20) + (let ((s5-1 ((method-of-type v1-12 length) arg0))) + (if (and (nonzero? *city-borrow-manager*) *city-borrow-manager*) + (mark-permanent-holds gp-0) + ) + (dotimes (s4-1 (the-as int (-> *setting-control* user-current borrow-city-count))) + (set! sv-16 (-> *setting-control* user-current borrow-city s4-1)) + (let* ((s3-0 sv-16) + (v1-20 (car s3-0)) + ) + (while (not (null? s3-0)) + (set! sv-20 (the-as symbol #f)) + (set! sv-24 v1-20) + (when sv-24 + (dotimes (s2-0 (/ s5-1 2)) + (when (= sv-24 (ref gp-0 (* s2-0 2))) + (set! sv-20 #t) + (if (= (ref gp-0 (+ (* s2-0 2) 1)) 'auto) + (set! (car (ref& gp-0 (+ (* s2-0 2) 1))) 'faction) + ) + 0 + (goto cfg-37) + ) + ) + (label cfg-37) + (when (not sv-20) + (dotimes (s2-1 (/ s5-1 2)) + (when (= (ref gp-0 (+ (* s2-1 2) 1)) 'auto) + (set! s2-2 s2-1) + (goto cfg-45) + ) + ) + (set! s2-2 -1) + (label cfg-45) + (when (> s2-2 0) + (set! (car (ref& gp-0 (* s2-2 2))) sv-24) + (set! (car (ref& gp-0 (+ (* s2-2 2) 1))) 'faction) + ) + ) + ) + (set! s3-0 (cdr s3-0)) + (set! v1-20 (car s3-0)) + ) + ) + ) + (let ((s4-2 0)) + (dotimes (s3-1 (/ s5-1 2)) + (let ((v1-48 (ref gp-0 (+ (* s3-1 2) 1)))) + (when (not (or (= v1-48 'auto) (= v1-48 'faction))) + (set! (car (ref& *borrow-city-status-list* (* s4-2 2))) (ref gp-0 (* s3-1 2))) + (set! (car (ref& *borrow-city-status-list* (+ (* s4-2 2) 1))) (ref gp-0 (+ (* s3-1 2) 1))) + (+! s4-2 1) + ) + ) + ) + ) + (dotimes (s4-3 (/ s5-1 2)) + (case (ref gp-0 (+ (* s4-3 2) 1)) + (('auto 'faction) + (set! (car (ref& gp-0 (+ (* s4-3 2) 1))) 'special) + ) + ) + ) + ) + gp-0 + ) + ) + +;; WARN: Return type mismatch int vs object. +(defun add-want-level ((arg0 (inline-array level-buffer-state)) + (arg1 (pointer int64)) + (arg2 symbol) + (arg3 symbol) + (arg4 symbol) + (arg5 symbol) + ) + (when arg2 + (let ((s1-0 (lookup-level-info arg2))) + (cond + ((>= (-> arg1 0) 10) + ) + ((and (-> s1-0 borrow) (-> s1-0 borrow alias)) + (let* ((s0-1 (borrow-city-expansion (the-as pair (-> s1-0 borrow alias)))) + (a0-3 (-> s1-0 borrow alias)) + (s1-1 ((method-of-type (rtype-of a0-3) length) a0-3)) + ) + (while (and (> s1-1 0) (car s0-1)) + (when (!= (car s0-1) 'dummy) + (let ((t9-3 add-want-level) + (a0-5 arg0) + (a1-3 arg1) + (a2-1 (car s0-1)) + (a3-1 (car (cdr s0-1))) + ) + (set! a3-1 (cond + ((or (not arg3) (= a3-1 'copy)) + arg3 + ) + (else + (empty) + a3-1 + ) + ) + ) + (t9-3 a0-5 a1-3 (the-as symbol a2-1) (the-as symbol a3-1) arg4 arg5) + ) + ) + (set! s0-1 (cdr (cdr s0-1))) + (+! s1-1 -2) + ) + ) + ) + (else + (set! (-> arg0 (-> arg1 0) name) arg2) + (set! (-> arg0 (-> arg1 0) display?) arg3) + (set! (-> arg0 (-> arg1 0) force-vis?) arg4) + (set! (-> arg0 (-> arg1 0) force-inside?) arg5) + (+! (-> arg1 0) 1) + (when (-> s1-0 borrow) + (dotimes (s0-2 5) + (let ((v1-38 (-> s1-0 borrow borrow-info s0-2))) + (when v1-38 + (let ((t9-4 add-want-level) + (a0-9 arg0) + (a1-4 arg1) + (a2-2 (car v1-38)) + (a3-2 (car (cdr v1-38))) + ) + (set! a3-2 (cond + ((or (not arg3) (= a3-2 'copy)) + arg3 + ) + (else + (empty) + a3-2 + ) + ) + ) + (t9-4 a0-9 a1-4 (the-as symbol a2-2) (the-as symbol a3-2) arg4 arg5) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + ) + +(defmethod add-borrow-levels ((this load-state)) + (local-vars (sv-16 int)) + (dotimes (s5-0 10) + (let ((a0-1 (-> this want s5-0 name))) + (when a0-1 + (let ((a0-2 (lookup-level-info a0-1))) + (when (= (-> a0-2 memory-mode) (level-memory-mode borrow)) + (set! (-> this want s5-0 name) #f) + (set! (-> this want s5-0 display?) #f) + (set! (-> this want s5-0 force-vis?) #f) + (set! (-> this want s5-0 force-inside?) #f) + ) + ) + ) + ) + ) + (set! sv-16 0) + (dotimes (s5-1 10) + (if (-> this want s5-1 name) + (add-want-level + (-> this want-exp) + (the-as (pointer int64) (& sv-16)) + (-> this want s5-1 name) + (-> this want s5-1 display?) + (-> this want s5-1 force-vis?) + (-> this want s5-1 force-inside?) + ) + ) + ) + (while (< sv-16 10) + (set! (-> this want-exp sv-16 name) #f) + (set! (-> this want-exp sv-16 display?) #f) + (set! (-> this want-exp sv-16 force-vis?) #f) + (set! (-> this want-exp sv-16 force-inside?) #f) + (set! sv-16 (+ sv-16 1)) + ) + (cond + ((-> this update-callback) + ((-> this update-callback) this) + ) + (else + (dotimes (v1-49 10) + (set! (-> this target v1-49 name) (-> this want-exp v1-49 name)) + (set! (-> this target v1-49 display?) (-> this want-exp v1-49 display?)) + (set! (-> this target v1-49 force-vis?) (-> this want-exp v1-49 force-vis?)) + (set! (-> this target v1-49 force-inside?) (-> this want-exp v1-49 force-inside?)) + ) + ) + ) + 0 + (none) + ) + +(defmethod want-sound-banks ((this load-state) (arg0 (pointer symbol))) + (dotimes (v1-0 3) + (dotimes (a2-0 3) + (when (= (-> this want-sound v1-0 name) (-> arg0 a2-0)) + (set! (-> arg0 a2-0) #f) + (goto cfg-8) + ) + ) + (set! (-> this want-sound v1-0 name) #f) + (set! (-> this want-sound v1-0 mode) (sound-bank-mode none)) + 0 + (label cfg-8) + ) + (dotimes (v1-3 3) + (when (-> arg0 v1-3) + (dotimes (a2-15 3) + (when (not (-> this want-sound a2-15 name)) + (set! (-> this want-sound a2-15 name) (-> arg0 v1-3)) + (set! (-> this want-sound a2-15 mode) (sound-bank-mode unknown)) + (goto cfg-19) + ) + ) + ) + (label cfg-19) + ) + 0 + (none) + ) + +(defmethod want-display-level ((this load-state) (arg0 symbol) (arg1 symbol)) + (dotimes (v1-0 10) + (when (= (-> this want v1-0 name) arg0) + (set! (-> this want v1-0 display?) arg1) + (add-borrow-levels this) + (return 0) + ) + ) + (if arg1 + (format 0 "ERROR: can't display ~A because it isn't loaded~%" arg0) + ) + 0 + ) + +(defmethod want-vis-level ((this load-state) (arg0 symbol)) + (let ((v1-0 (lookup-level-info arg0))) + (if v1-0 + (set! arg0 (-> v1-0 name)) + ) + ) + (set! (-> this vis-nick) arg0) + 0 + (none) + ) + +(defmethod want-force-vis ((this load-state) (arg0 symbol) (arg1 symbol)) + (dotimes (v1-0 10) + (when (= (-> this want v1-0 name) arg0) + (set! (-> this want v1-0 force-vis?) arg1) + (add-borrow-levels this) + (return 0) + ) + ) + (format 0 "ERROR: can't force vis on ~A because it isn't loaded~%" arg0) + 0 + ) + +;; WARN: Function (method 16 load-state) has a return type of none, but the expression builder found a return statement. +(defmethod want-force-inside ((this load-state) (arg0 symbol) (arg1 symbol)) + (dotimes (v1-0 10) + (when (= (-> this want v1-0 name) arg0) + (set! (-> this want v1-0 force-inside?) arg1) + (add-borrow-levels this) + (return 0) + ) + ) + (format 0 "ERROR: can't force inside on ~A because it isn't loaded~%" arg0) + 0 + (none) + ) + +(define *display-load-commands* #f) + +(defmethod backup-load-state-and-set-cmds ((this load-state) (arg0 pair)) + (dotimes (s4-0 256) + (when (-> this object-name s4-0) + (format 0 "WARNING: load state somehow aquired object command ~A~%" (-> this object-name s4-0)) + (set! (-> this object-name s4-0) #f) + ) + ) + (mem-copy! (&-> *backup-load-state* type) (&-> this type) 2664) + (set! (-> *backup-load-state* command-list) '()) + (set! (-> this command-list) arg0) + 0 + ) + +(defmethod restore-load-state-and-cleanup ((this load-state)) + (with-pp + (execute-commands-up-to this 100000.0) + (dotimes (gp-0 256) + (when (-> this object-name gp-0) + (let ((a0-3 (entity-by-name (-> this object-name gp-0)))) + (when a0-3 + (set! (-> a0-3 extra perm status) (the-as entity-perm-status (-> this object-status gp-0))) + (if (-> a0-3 extra process) + (kill! a0-3) + ) + ) + ) + (set! (-> this object-name gp-0) #f) + ) + ) + (let ((s5-0 (new 'stack 'load-state)) + (gp-1 (-> *load-state* update-callback)) + ) + (mem-copy! (&-> s5-0 type) (&-> *load-state* type) 2664) + (mem-copy! (&-> this type) (&-> *backup-load-state* type) 2664) + (when (!= (-> pp type) scene-player) + (dotimes (s4-1 10) + (mem-copy! (the-as pointer (-> *load-state* want s4-1)) (the-as pointer (-> s5-0 want s4-1)) 16) + ) + (dotimes (v1-34 3) + (set! (-> *load-state* want-sound v1-34 name) (-> s5-0 want-sound v1-34 name)) + (set! (-> *load-state* want-sound v1-34 mode) (-> s5-0 want-sound v1-34 mode)) + ) + ) + (dotimes (s4-2 10) + (mem-copy! (the-as pointer (-> *load-state* want-exp s4-2)) (the-as pointer (-> s5-0 want-exp s4-2)) 16) + (mem-copy! (the-as pointer (-> *load-state* target s4-2)) (the-as pointer (-> s5-0 target s4-2)) 16) + ) + (dotimes (v1-47 6) + (set! (-> *load-state* want-exp-sound v1-47 name) (-> s5-0 want-exp-sound v1-47 name)) + (set! (-> *load-state* want-exp-sound v1-47 mode) (-> s5-0 want-exp-sound v1-47 mode)) + (set! (-> *load-state* target-sound v1-47 name) (-> s5-0 target-sound v1-47 name)) + (set! (-> *load-state* target-sound v1-47 mode) (-> s5-0 target-sound v1-47 mode)) + ) + (set! (-> *load-state* update-callback) gp-1) + ) + (add-borrow-levels *load-state*) + 0 + ) + ) + +(defmethod restore-load-state ((this load-state)) + (dotimes (v1-0 256) + (if (-> this object-name v1-0) + (set! (-> this object-name v1-0) #f) + ) + ) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'level-buffer-state 10))) + (dotimes (s4-0 10) + ((method-of-type level-buffer-state new) (the-as symbol (-> s5-0 s4-0)) level-buffer-state) + ) + (let ((s4-1 (new 'stack-no-clear 'inline-array 'level-buffer-state 10))) + (dotimes (s3-0 10) + ((method-of-type level-buffer-state new) (the-as symbol (-> s4-1 s3-0)) level-buffer-state) + ) + (let ((s3-1 (-> *load-state* update-callback))) + (dotimes (s2-0 10) + (mem-copy! (the-as pointer (-> s5-0 s2-0)) (the-as pointer (-> *load-state* want-exp s2-0)) 16) + (mem-copy! (the-as pointer (-> s4-1 s2-0)) (the-as pointer (-> *load-state* target s2-0)) 16) + ) + (mem-copy! (&-> this type) (&-> *backup-load-state* type) 2664) + (dotimes (gp-1 10) + (mem-copy! (the-as pointer (-> *load-state* want-exp gp-1)) (the-as pointer (-> s5-0 gp-1)) 16) + (mem-copy! (the-as pointer (-> *load-state* target gp-1)) (the-as pointer (-> s4-1 gp-1)) 16) + ) + (set! (-> *load-state* update-callback) s3-1) + ) + ) + ) + (add-borrow-levels *load-state*) + 0 + ) + +;; WARN: Function (method 17 load-state) has a return type of none, but the expression builder found a return statement. +(defmethod execute-commands-up-to ((this load-state) (arg0 float)) + (with-pp + (let ((s4-0 (new 'stack 'script-context (process->ppointer pp) pp (the-as vector #f)))) + (set! (-> s4-0 load-state) this) + (while (not (null? (-> this command-list))) + (let ((f0-0 (command-get-float (car (car (-> this command-list))) 0.0)) + (s3-0 (cdr (car (-> this command-list)))) + ) + (if (< arg0 f0-0) + (return #f) + ) + (if *display-load-commands* + (format 0 "NOTICE: ~D: ~f: execute command ~A~%" (current-time) f0-0 s3-0) + ) + (cond + ((pair? (car s3-0)) + (let ((a1-4 (car s3-0))) + (while (not (null? s3-0)) + (eval! s4-0 (the-as pair a1-4)) + (set! s3-0 (cdr s3-0)) + (set! a1-4 (car s3-0)) + ) + ) + ) + (else + (eval! s4-0 s3-0) + ) + ) + ) + (set! (-> this command-list) (cdr (-> this command-list))) + ) + ) + 0 + (none) + ) + ) + +(kmemopen global "load-state-struct") + +(define *backup-load-state* (new 'global 'load-state)) + +(define-perm *load-state* load-state (new 'global 'load-state)) + +(kmemclose) diff --git a/goal_src/jak3/engine/load/loader.gc b/goal_src/jak3/engine/load/loader.gc index 39be3c41a7..b250d89e94 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/math.gc b/goal_src/jak3/engine/math/math.gc index 8c0d11c366..5dc2bbe684 100644 --- a/goal_src/jak3/engine/math/math.gc +++ b/goal_src/jak3/engine/math/math.gc @@ -572,7 +572,7 @@ More efficient than the -old version." ;; og:preserve-this ; (.mula.s f0-1 f2-3) ; (.madd.s f0-2 f1-2 f3-1) - (+ (* f0-1 f2-3) (* f1-2 f3-1)) + (set! f0-2 (+ (* f0-1 f2-3) (* f1-2 f3-1))) ) f0-2 ) diff --git a/goal_src/jak3/engine/math/matrix-compose.gc b/goal_src/jak3/engine/math/matrix-compose.gc index f9bcacbd3e..7f8e1688b1 100644 --- a/goal_src/jak3/engine/math/matrix-compose.gc +++ b/goal_src/jak3/engine/math/matrix-compose.gc @@ -14,14 +14,14 @@ arg0 ) -(defun matrix-fu-compose ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 vector)) +(defun matrix-fu-compose ((arg0 matrix) (arg1 vector) (arg2 vector)) (set! (-> arg0 fvec quad) (-> arg1 quad)) (set! (-> arg0 uvec quad) (-> arg2 quad)) (vector-cross! (-> arg0 rvec) arg2 arg1) arg0 ) -(defun matrix-fr-compose ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 vector)) +(defun matrix-fr-compose ((arg0 matrix) (arg1 vector) (arg2 vector)) (set! (-> arg0 fvec quad) (-> arg1 quad)) (set! (-> arg0 rvec quad) (-> arg2 quad)) (vector-cross! (-> arg0 uvec) arg1 arg2) @@ -35,7 +35,7 @@ arg0 ) -(defun matrix-f-u-compose ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 vector)) +(defun matrix-f-u-compose ((arg0 matrix) (arg1 vector) (arg2 vector)) (set! (-> arg0 fvec quad) (-> arg1 quad)) (vector-cross! (-> arg0 rvec) arg2 arg1) (vector-normalize! (-> arg0 rvec) 1.0) @@ -43,7 +43,7 @@ arg0 ) -(defun matrix-f-r-compose ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 vector)) +(defun matrix-f-r-compose ((arg0 matrix) (arg1 vector) (arg2 vector)) (set! (-> arg0 fvec quad) (-> arg1 quad)) (vector-cross! (-> arg0 uvec) arg1 arg2) (vector-normalize! (-> arg0 uvec) 1.0) @@ -51,7 +51,7 @@ arg0 ) -(defun matrix-u-f-compose ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 vector)) +(defun matrix-u-f-compose ((arg0 matrix) (arg1 vector) (arg2 vector)) (set! (-> arg0 uvec quad) (-> arg1 quad)) (vector-cross! (-> arg0 rvec) arg1 arg2) (vector-normalize! (-> arg0 rvec) 1.0) @@ -83,10 +83,10 @@ arg0 ) -(defun matrix-f-compose ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 vector)) +(defun matrix-f-compose ((arg0 matrix) (arg1 vector) (arg2 float)) (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 arg3) + (matrix-f-u-compose arg0 arg1 a2-1) ) arg0 ) @@ -94,7 +94,7 @@ (defun matrix-u-compose ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 vector)) (set! (-> arg0 uvec quad) (-> arg1 quad)) (let ((a2-1 (vector-get-unique! (new 'stack-no-clear 'vector) arg1))) - (matrix-u-f-compose arg0 arg1 a2-1 arg3) + (matrix-u-f-compose arg0 arg1 a2-1) ) arg0 ) diff --git a/goal_src/jak3/engine/math/matrix-h.gc b/goal_src/jak3/engine/math/matrix-h.gc index a228a001e4..22d8336a3d 100644 --- a/goal_src/jak3/engine/math/matrix-h.gc +++ b/goal_src/jak3/engine/math/matrix-h.gc @@ -23,7 +23,7 @@ some, but not all, functions assume that a matrix is an affine transform. others assume that the rotation has no scale or shear (and that its inverse is its transpose)." ((data float 16) - (vector vector 4 :overlay-at (-> data 0)) + (vector vector 4 :inline :overlay-at (-> data 0)) (quad uint128 4 :overlay-at (-> data 0)) (rvec vector :inline :overlay-at (-> data 0)) (uvec vector :inline :overlay-at (-> data 4)) diff --git a/goal_src/jak3/engine/nav/nav-control-h.gc b/goal_src/jak3/engine/nav/nav-control-h.gc index 177ac40cb1..e4a6f742f6 100644 --- a/goal_src/jak3/engine/nav/nav-control-h.gc +++ b/goal_src/jak3/engine/nav/nav-control-h.gc @@ -100,53 +100,53 @@ (user-position vector :inline :overlay-at virtual-current-pos-local) ) (:methods - (nav-state-method-9 () none) - (nav-state-method-10 () none) - (nav-state-method-11 () none) - (nav-state-method-12 () none) - (nav-state-method-13 () none) - (nav-state-method-14 () none) - (nav-state-method-15 () none) - (nav-state-method-16 () none) - (nav-state-method-17 () none) - (nav-state-method-18 () none) - (nav-state-method-19 () none) - (nav-state-method-20 () none) + (debug-draw (_type_) none) + (nav-state-method-10 (_type_) none) + (plan-over-pat1-polys-using-route (_type_ nav-gap-info) symbol) + (get-velocity (_type_ vector) vector) + (get-travel (_type_ vector) vector) + (get-heading (_type_ vector) vector) + (get-target-pos (_type_ vector) vector) + (get-speed (_type_) meters) + (get-rotation-rate (_type_) float) + (try-projecting-to-current-poly (_type_ vector vector vector) symbol) + (get-current-poly (_type_) nav-poly) + (copy-nav-state! (_type_ (pointer nav-state)) none) (nav-state-method-21 () none) (nav-state-method-22 () none) (nav-state-method-23 () none) - (nav-state-method-24 () none) - (nav-state-method-25 () none) - (nav-state-method-26 () none) - (nav-state-method-27 () none) - (nav-state-method-28 () none) - (nav-state-method-29 () none) - (nav-state-method-30 () none) - (nav-state-method-31 () none) - (nav-state-method-32 () none) - (nav-state-method-33 () none) - (nav-state-method-34 () none) - (nav-state-method-35 () none) - (nav-state-method-36 () none) - (nav-state-method-37 () none) - (nav-state-method-38 () none) - (nav-state-method-39 () none) - (nav-state-method-40 () none) - (nav-state-method-41 () none) - (nav-state-method-42 () none) - (nav-state-method-43 () none) - (nav-state-method-44 () none) - (nav-state-method-45 () none) - (nav-state-method-46 () none) - (nav-state-method-47 () none) - (nav-state-method-48 () none) + (turn-and-navigate-to-destination (_type_) none) + (navigate-using-route-portals-wrapper (_type_) none) + (navigate-using-best-dir-recompute-avoid-spheres-1-wrapper (_type_) none) + (navigate-within-poly-wrapper (_type_) none) + (compute-travel-speed (_type_) none) + (nav-state-method-29 (_type_) none) + (nav-state-method-30 (_type_) none) + (navigate-using-best-dir-recompute-avoid-spheres-2 (_type_) none) + (update-travel-dir-from-spheres (_type_) none) + (compute-speed-simple (_type_) none) + (navigate-v1! (_type_) none) + (reset-target! (_type_) none) + (add-offset-to-target! (_type_ vector) none) + (navigate-v2! (_type_) none) + (set-current-poly! (_type_ nav-poly) none) + (nav-state-method-39 (_type_) symbol) + (do-navigation-to-destination (_type_ vector) none) + (clamp-vector-to-mesh-cross-gaps (_type_ vector) symbol) + (set-target-pos! (_type_ vector) none) + (set-virtual-cur-pos! (_type_ vector) none) + (set-travel! (_type_ vector) none) + (set-velocity! (_type_ vector) none) + (set-heading! (_type_ vector) none) + (set-speed! (_type_ meters) none) + (reset! (_type_ nav-control) none) (nav-state-method-49 () none) - (nav-state-method-50 () none) - (nav-state-method-51 () none) - (nav-state-method-52 () none) - (nav-state-method-53 () none) - (nav-state-method-54 () none) - (nav-state-method-55 () none) + (navigate-using-best-dir-use-existing-avoid-spheres (_type_ nav-avoid-spheres-params) none) + (nav-state-method-51 (_type_) none) + (navigate-using-route-portals (_type_) none) + (navigate-using-best-dir-recompute-avoid-spheres-1 (_type_) none) + (navigate-within-poly (_type_) none) + (clamp-travel-vector (_type_) none) ) ) @@ -177,43 +177,43 @@ (mesh basic :overlay-at (-> state mesh)) ) (:methods - (nav-control-method-9 () none) - (nav-control-method-10 () none) + (debug-draw (_type_) none) + (point-in-bsphere? (_type_ vector) symbol) (find-poly-containing-point-1 (_type_ vector) nav-poly) - (nav-control-method-12 () none) - (nav-control-method-13 () none) - (nav-control-method-14 () none) - (nav-control-method-15 () none) - (nav-control-method-16 () none) - (nav-control-method-17 () none) - (nav-control-method-18 () none) - (nav-control-method-19 () none) - (nav-control-method-20 () none) - (nav-control-method-21 () none) - (nav-control-method-22 () none) - (nav-control-method-23 () none) - (nav-control-method-24 () none) - (nav-control-method-25 () none) - (nav-control-method-26 () none) - (nav-control-method-27 () none) - (nav-control-method-28 () none) - (nav-control-method-29 () none) - (nav-control-method-30 () none) - (nav-control-method-31 () none) - (nav-control-method-32 () none) - (nav-control-method-33 () none) - (nav-control-method-34 () none) - (nav-control-method-35 () none) - (nav-control-method-36 () none) - (nav-control-method-37 () none) - (nav-control-method-38 () none) - (nav-control-method-39 () none) - (nav-control-method-40 () none) - (nav-control-method-41 () none) - (nav-control-method-42 () none) - (nav-control-method-43 () none) + (closest-point-on-mesh (_type_ vector vector nav-poly) nav-poly) + (find-nearest-poly-to-point (_type_ vector) nav-poly) + (project-point-onto-plane-of-poly (_type_ nav-poly vector vector vector) none) + (find-poly-containing-point-2 (_type_ vector) nav-poly) + (is-above-poly-max-height? (_type_ vector float) symbol) + (is-in-mesh? (_type_ vector float) symbol) + (avoid-spheres-1! (_type_ nav-avoid-spheres-params) symbol) + (avoid-spheres-2! (_type_ nav-avoid-spheres-params) symbol) + (clamp-vector-to-mesh-cross-gaps (_type_ vector nav-poly vector float symbol clamp-travel-vector-to-mesh-return-info) none) + (clamp-vector-to-mesh-no-gaps (_type_ vector nav-poly vector clamp-travel-vector-to-mesh-return-info) none) + (find-first-sphere-and-update-avoid-params (_type_ vector nav-avoid-spheres-params) float) + (set-spheres-from-nav-ids (_type_) none) + (add-root-sphere-to-hash! (_type_ vector int) symbol) + (get-max-rotation-rate (_type_) float) + (get-sphere-mask (_type_) uint) + (get-target-speed (_type_) meters) + (enable-extra-sphere! (_type_) none) + (disable-extra-sphere! (_type_) none) + (copy-extra-nav-sphere! (_type_ sphere) none) + (set-extra-nav-sphere-xyz! (_type_ sphere) none) + (set-extra-nav-sphere-radius! (_type_ float) none) + (set-nearest-y-thres! (_type_ float) none) + (set-nav-cull-radius! (_type_ meters) none) + (set-speed-scale! (_type_ float) none) + (set-target-speed! (_type_ meters) none) + (set-acceleration! (_type_ meters) none) + (set-turning-acceleration! (_type_ meters) none) + (set-max-rotation-rate! (_type_ float) none) + (set-sphere-mask! (_type_ uint) none) + (remove! (_type_) none) + (init! (_type_ collide-shape) none) + (display-marks? (_type_) symbol) (nav-control-method-44 () none) - (nav-control-method-45 () none) - (nav-control-method-46 () none) + (find-first-sphere-intersecting-ray (_type_ vector vector vector) sphere) + (find-sphere-ids-from-sphere-hash (_type_ symbol) none) ) ) diff --git a/goal_src/jak3/engine/nav/nav-control.gc b/goal_src/jak3/engine/nav/nav-control.gc index fd26046819..c88d1c1e2f 100644 --- a/goal_src/jak3/engine/nav/nav-control.gc +++ b/goal_src/jak3/engine/nav/nav-control.gc @@ -7,3 +7,3758 @@ ;; DECOMP BEGINS +(define *nav-triangle-test-count* 0) + +(define *nav-last-triangle-test-count* 0) + +(defun debug-nav-validate-current-poly ((arg0 nav-mesh) (arg1 nav-poly) (arg2 vector)) + (local-vars (sv-32 vector) (sv-36 float)) + (when (not (point-in-poly? arg0 arg1 arg2)) + (set! sv-32 (new 'stack-no-clear 'vector)) + (project-point-into-poly-2d arg0 arg1 sv-32 arg2) + (set! sv-36 (vector-vector-xz-distance arg2 sv-32)) + #f + ) + ) + +(defun debug-report-nav-stats () + 0 + (none) + ) + +(defmethod relocate ((this nav-control) (offset int)) + (&+! (-> this process) offset) + (&+! (-> this shape) offset) + this + ) + +(defmethod remove! ((this nav-control)) + (remove-nav-control (-> this state mesh) this) + 0 + (none) + ) + +(defmethod enable-extra-sphere! ((this nav-control)) + (logior! (-> this shape nav-flags) (nav-flags has-extra-sphere)) + 0 + (none) + ) + +(defmethod disable-extra-sphere! ((this nav-control)) + (logclear! (-> this shape nav-flags) (nav-flags has-extra-sphere)) + 0 + (none) + ) + +(defmethod copy-extra-nav-sphere! ((this nav-control) (arg0 sphere)) + (mem-copy! (the-as pointer (-> this extra-nav-sphere)) (the-as pointer arg0) 16) + 0 + (none) + ) + +(defmethod set-extra-nav-sphere-xyz! ((this nav-control) (arg0 sphere)) + (let ((f0-0 (-> this extra-nav-sphere w))) + (set! (-> this extra-nav-sphere quad) (-> arg0 quad)) + (set! (-> this extra-nav-sphere w) f0-0) + ) + 0 + (none) + ) + +(defmethod set-extra-nav-sphere-radius! ((this nav-control) (arg0 float)) + (set! (-> this extra-nav-sphere w) arg0) + 0 + (none) + ) + +(defmethod set-nearest-y-thres! ((this nav-control) (arg0 float)) + (set! (-> this nearest-y-threshold) arg0) + 0 + (none) + ) + +(defmethod set-nav-cull-radius! ((this nav-control) (arg0 meters)) + (set! (-> this nav-cull-radius) arg0) + 0 + (none) + ) + +(defmethod set-speed-scale! ((this nav-control) (arg0 float)) + (set! (-> this speed-scale) arg0) + 0 + (none) + ) + +(defmethod set-target-speed! ((this nav-control) (arg0 meters)) + (set! (-> this target-speed) arg0) + 0 + (none) + ) + +(defmethod get-target-speed ((this nav-control)) + (-> this target-speed) + ) + +(defmethod set-acceleration! ((this nav-control) (arg0 meters)) + (set! (-> this acceleration) arg0) + 0 + (none) + ) + +(defmethod set-turning-acceleration! ((this nav-control) (arg0 meters)) + (set! (-> this turning-acceleration) arg0) + 0 + (none) + ) + +(defmethod set-max-rotation-rate! ((this nav-control) (arg0 float)) + (set! (-> this max-rotation-rate) arg0) + 0 + (none) + ) + +(defmethod get-max-rotation-rate ((this nav-control)) + (-> this max-rotation-rate) + ) + +(defmethod set-sphere-mask! ((this nav-control) (arg0 uint)) + (set! (-> this sphere-mask) arg0) + 0 + (none) + ) + +(defmethod get-sphere-mask ((this nav-control)) + (-> this sphere-mask) + ) + +(defmethod point-in-bsphere? ((this nav-control) (arg0 vector)) + (let ((v1-1 (-> this state mesh bounds))) + (>= (-> v1-1 r) (vector-vector-distance arg0 v1-1)) + ) + ) + +(defmethod display-marks? ((this nav-control)) + (and *display-nav-marks* (logtest? (-> this flags) (nav-control-flag display-marks))) + ) + +(defmethod init! ((this nav-control) (arg0 collide-shape)) + (set! (-> this callback-info) #f) + (logior! (-> this flags) (nav-control-flag update-heading-from-facing output-sphere-hash)) + (let ((v1-2 this)) + (set! (-> v1-2 sphere-mask) (the-as uint #x1000f8)) + ) + 0 + (set! (-> this sphere-count) 0) + (set! (-> this sphere-array) (the-as (inline-array sphere) #f)) + (set! (-> this shape) arg0) + (set! (-> this process) (-> arg0 process)) + (set! (-> this speed-scale) 1.0) + (set! (-> this acceleration) 4096.0) + (set! (-> this turning-acceleration) 4096.0) + (set! (-> this max-rotation-rate) 131072.0) + (set! (-> this target-speed) 0.0) + (set! (-> this nav-cull-radius) 40960.0) + (reset! (-> this state) this) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +;; WARN: Function get-nav-control has a return type of none, but the expression builder found a return statement. +(defun get-nav-control ((arg0 process-drawable) (arg1 nav-mesh)) + (if (not arg1) + (set! arg1 (nav-mesh-from-res-tag (-> arg0 entity) 'nav-mesh-actor 0)) + ) + (when (not arg1) + (if (-> arg0 entity) + (logior! (-> arg0 entity extra perm status) (entity-perm-status error)) + ) + (go process-drawable-art-error "no nav-mesh") + (return 0) + ) + (add-process-drawable-to-nav-mesh arg1 arg0 #t) + (none) + ) + +(defmethod find-nearest-poly-to-point ((this nav-control) (arg0 vector)) + (let ((gp-0 (new 'stack 'nav-find-poly-parms))) + (vector-! (-> gp-0 point) arg0 (the-as vector (-> this state mesh bounds))) + (set! (-> gp-0 y-threshold) (-> this nearest-y-threshold)) + (set! (-> gp-0 ignore) (the-as uint 2)) + (nav-mesh-method-46 (-> this state mesh) (the-as nav-poly gp-0)) + (-> gp-0 poly) + ) + ) + +(defmethod project-point-onto-plane-of-poly ((this nav-control) (arg0 nav-poly) (arg1 vector) (arg2 vector) (arg3 vector)) + (project-point-onto-plane-of-poly-local + (-> this state mesh) + arg0 + arg1 + arg2 + (vector-! (new 'stack-no-clear 'vector) arg3 (the-as vector (-> this state mesh bounds))) + ) + (vector+! arg1 arg1 (the-as vector (-> this state mesh bounds))) + 0 + (none) + ) + +(defmethod is-in-mesh? ((this nav-control) (arg0 vector) (arg1 float)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (vector-! v1-0 arg0 (the-as vector (-> this state mesh bounds))) + (let ((a1-1 (-> this state mesh))) + (is-in-mesh-local? a1-1 v1-0 arg1 (-> this nearest-y-threshold)) + ) + ) + ) + +(defmethod debug-draw ((this nav-control)) + (local-vars (sv-32 nav-mesh) (sv-36 vector)) + (when #t + (debug-draw (-> this state mesh)) + (set! sv-32 (-> this state mesh)) + (set! sv-36 (new 'stack-no-clear 'vector)) + (if (logtest? (-> this shape nav-flags) (nav-flags has-root-sphere)) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> this root-nav-sphere) + (-> this root-nav-sphere w) + (new 'static 'rgba :g #xff :b #xff :a #x20) + ) + ) + (if (logtest? (-> this shape nav-flags) (nav-flags has-extra-sphere)) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> this extra-nav-sphere) + (-> this extra-nav-sphere w) + (new 'static 'rgba :g #xff :b #xff :a #x20) + ) + ) + (when (logtest? (-> this shape nav-flags) (nav-flags has-child-spheres)) + ) + (dotimes (s5-0 (-> this sphere-count)) + (let ((v1-23 (-> this state mesh work debug sphere-array s5-0))) + (vector+! sv-36 (the-as vector (-> sv-32 bounds)) (the-as vector v1-23)) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + sv-36 + (- (-> v1-23 r) (-> this shape nav-radius)) + (new 'static 'rgba :g #xff :b #xff :a #x20) + ) + ) + ) + (dotimes (s5-1 (the-as int (-> sv-32 static-sphere-count))) + (let ((s4-0 (-> sv-32 static-sphere s5-1))) + (add-debug-sphere #t (bucket-id debug) s4-0 (-> s4-0 r) *color-blue*) + (let ((s3-0 add-debug-text-3d) + (s2-0 #t) + (s1-0 577) + ) + (format (clear *temp-string*) "~D" s5-1) + (s3-0 s2-0 (the-as bucket-id s1-0) *temp-string* s4-0 (font-color cyan) (the-as vector2h #f)) + ) + ) + ) + (debug-draw (-> this state)) + ) + 0 + (none) + ) + +(defmethod find-poly-containing-point-1 ((this nav-control) (arg0 vector)) + (let ((v1-0 (new 'stack-no-clear 'nav-poly))) + (vector-! (the-as vector (-> v1-0 vertex)) arg0 (the-as vector (-> this state mesh bounds))) + (set! (-> v1-0 vertex1 x) (-> this nearest-y-threshold)) + (set! (-> v1-0 data 20) (the-as uint 2)) + (nav-mesh-method-45 (-> this state mesh) v1-0) + ) + ) + +(defmethod find-poly-containing-point-2 ((this nav-control) (arg0 vector)) + (let ((v1-0 (new 'stack-no-clear 'nav-poly))) + (vector-! (the-as vector (-> v1-0 vertex)) arg0 (the-as vector (-> this state mesh bounds))) + (set! (-> v1-0 vertex1 x) (-> this nearest-y-threshold)) + (set! (-> v1-0 data 20) (the-as uint 2)) + (nav-mesh-method-45 (-> this state mesh) v1-0) + ) + ) + +;; WARN: Return type mismatch object vs symbol. +(defmethod is-above-poly-max-height? ((this nav-control) (arg0 vector) (arg1 float)) + (let ((a1-1 (new 'stack-no-clear 'nav-poly))) + (vector-! (the-as vector (-> a1-1 vertex)) arg0 (the-as vector (-> this state mesh bounds))) + (set! (-> a1-1 vertex1 x) (-> this nearest-y-threshold)) + (set! (-> a1-1 data 20) (the-as uint 2)) + (the-as + symbol + (and (nav-mesh-method-45 (-> this state mesh) a1-1) (< (-> arg0 y) (+ (-> this state mesh bounds y) arg1))) + ) + ) + ) + +(defmethod find-first-sphere-intersecting-ray ((this nav-control) (arg0 vector) (arg1 vector) (arg2 vector)) + (let ((s5-0 (the-as sphere #f))) + (let ((f30-0 -0.000001)) + (countdown (s1-0 (-> this sphere-count)) + (let* ((s0-0 (-> this sphere-array s1-0)) + (f0-1 (ray-circle-intersect arg0 arg1 s0-0 (-> s0-0 r))) + ) + (when (< f30-0 f0-1) + (set! s5-0 s0-0) + (set! f30-0 f0-1) + ) + ) + ) + (set! (-> arg2 x) f30-0) + ) + s5-0 + ) + ) + +(defun add-nav-sphere ((arg0 nav-control) (arg1 sphere) (arg2 int)) + (local-vars (a2-4 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (when (< (-> arg0 sphere-count) arg2) + (let ((v1-3 (-> arg0 sphere-array (-> arg0 sphere-count)))) + (let ((a2-3 arg1) + (a3-0 (-> arg0 root-nav-sphere)) + ) + (.lvf vf2 (&-> a2-3 quad)) + (.lvf vf3 (&-> a3-0 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a2-4 vf1) + (let ((f1-0 a2-4) + (f0-1 (+ (-> arg1 r) (-> arg0 shape nav-radius))) + ) + (when (and (< 0.0 f1-0) (let ((f2-3 (+ f0-1 (-> arg0 nav-cull-radius)))) + (< f1-0 (* f2-3 f2-3)) + ) + ) + (vector-! (the-as vector v1-3) (the-as vector arg1) (the-as vector (-> arg0 state mesh bounds))) + (set! (-> v1-3 r) f0-1) + (+! (-> arg0 sphere-count) 1) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defun add-collide-shape-spheres ((arg0 nav-control) (arg1 collide-shape) (arg2 sphere)) + (local-vars (a2-6 float) (t0-4 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (when (logtest? (-> arg1 nav-flags) (nav-flags has-root-sphere)) + (set! (-> arg2 quad) (-> arg1 trans quad)) + (set! (-> arg2 r) (-> arg1 nav-radius)) + (let ((v1-4 arg0) + (a3-2 16) + ) + (when (< (-> v1-4 sphere-count) a3-2) + (let ((a3-5 (-> v1-4 sphere-array (-> v1-4 sphere-count)))) + (let ((t0-3 arg2) + (t1-0 (-> v1-4 root-nav-sphere)) + ) + (.lvf vf2 (&-> t0-3 quad)) + (.lvf vf3 (&-> t1-0 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov t0-4 vf1) + (let ((f1-0 t0-4) + (f0-2 (+ (-> arg2 r) (-> v1-4 shape nav-radius))) + ) + (when (and (< 0.0 f1-0) (let ((f2-3 (+ f0-2 (-> v1-4 nav-cull-radius)))) + (< f1-0 (* f2-3 f2-3)) + ) + ) + (vector-! (the-as vector a3-5) (the-as vector arg2) (the-as vector (-> v1-4 state mesh bounds))) + (set! (-> a3-5 r) f0-2) + (+! (-> v1-4 sphere-count) 1) + ) + ) + ) + ) + ) + 0 + ) + (when (logtest? (-> arg1 nav-flags) (nav-flags has-extra-sphere)) + (let ((v1-9 arg0) + (a0-1 (-> arg1 process nav extra-nav-sphere)) + (a1-2 16) + ) + (when (< (-> v1-9 sphere-count) a1-2) + (let ((a1-5 (-> v1-9 sphere-array (-> v1-9 sphere-count)))) + (let ((a2-5 a0-1) + (a3-6 (-> v1-9 root-nav-sphere)) + ) + (.lvf vf2 (&-> a2-5 quad)) + (.lvf vf3 (&-> a3-6 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a2-6 vf1) + (let ((f1-1 a2-6) + (f0-4 (+ (-> a0-1 w) (-> v1-9 shape nav-radius))) + ) + (when (and (< 0.0 f1-1) (let ((f2-9 (+ f0-4 (-> v1-9 nav-cull-radius)))) + (< f1-1 (* f2-9 f2-9)) + ) + ) + (vector-! (the-as vector a1-5) a0-1 (the-as vector (-> v1-9 state mesh bounds))) + (set! (-> a1-5 r) f0-4) + (+! (-> v1-9 sphere-count) 1) + ) + ) + ) + ) + ) + 0 + ) + (none) + ) + ) + +(defmethod find-sphere-ids-from-sphere-hash ((this nav-control) (arg0 symbol)) + (let ((s5-0 (new 'stack-no-clear 'find-nav-sphere-ids-params))) + (set! (-> s5-0 bsphere quad) (-> this root-nav-sphere quad)) + (+! (-> s5-0 bsphere r) (-> this nav-cull-radius)) + (set! (-> s5-0 max-len) 16) + (set! (-> s5-0 mask) (-> this sphere-mask)) + (set! (-> s5-0 array) (-> this sphere-id-array)) + (set! (-> s5-0 y-threshold) (-> this nearest-y-threshold)) + (sphere-hash-method-29 (-> this state mesh sphere-hash) s5-0) + (set! (-> this sphere-count) (-> s5-0 len)) + ) + 0 + (none) + ) + +(defmethod set-spheres-from-nav-ids ((this nav-control)) + (let ((v1-2 (-> this state mesh sphere-hash sphere-array)) + (a1-0 (-> this sphere-id-array)) + (a2-1 (-> this state mesh bounds)) + (a3-0 (-> this root-nav-sphere)) + (t0-0 (-> this sphere-count)) + ) + (dotimes (t1-0 t0-0) + (let ((t3-0 (-> v1-2 (-> a1-0 t1-0))) + (t2-4 (-> this sphere-array t1-0)) + ) + (vector-! (the-as vector t2-4) (the-as vector t3-0) (the-as vector a2-1)) + (set! (-> t2-4 r) (+ (-> t3-0 r) (-> a3-0 w))) + ) + ) + ) + 0 + (none) + ) + +(deftype nav-control-cfs-work (structure) + ((in-dir vector :inline) + (right-dir vector :inline) + (best-dir vector 2 :inline) + (temp-dir vector 2 :inline) + (away-dir vector :inline) + (best-dir-angle degrees 2) + (ignore-mask uint64) + (initial-ignore-mask uint64) + (i-sphere int32) + (i-first-sphere int32) + (i-inside-sphere int32) + (inside-sphere-dist float) + (sign float) + (travel-len float) + (dist2 float) + (inside-dist float) + (rand-angle float) + (dir-update basic) + (debug-offset vector :inline) + ) + ) + + +(defun circle-tangent-directions ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((t1-0 (new 'stack-no-clear 'vector)) + (t0-0 (new 'stack-no-clear 'vector)) + (v1-0 (new 'stack-no-clear 'vector)) + ) + (vector-! t1-0 arg1 arg0) + (set! (-> t1-0 y) 0.0) + (let ((a0-1 t0-0)) + (let ((t3-2 t1-0)) + (set! (-> a0-1 quad) (-> t3-2 quad)) + ) + (let ((f0-1 1.0)) + (.lvf vf1 (&-> a0-1 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((t2-3 f0-1)) + (.mov vf3 t2-3) + ) + ) + (.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 (&-> a0-1 quad) vf1) + ) + (set! (-> v1-0 quad) (-> t0-0 quad)) + (set! (-> v1-0 x) (-> t0-0 z)) + (set! (-> v1-0 z) (- (-> t0-0 x))) + (let* ((f0-5 (-> arg1 w)) + (f1-1 (vector-dot t0-0 t1-0)) + (f0-6 (fmin f0-5 f1-1)) + (f2-0 f1-1) + (f2-2 (* f2-0 f2-0)) + (f3-0 f0-6) + (f2-4 (sqrtf (- f2-2 (* f3-0 f3-0)))) + (f3-4 (/ 1.0 f1-1)) + (f1-3 (* f2-4 f3-4)) + (f0-7 (* f0-6 f3-4)) + (a0-9 (new 'stack-no-clear 'vector)) + ) + (vector-float*! a0-9 t0-0 f1-3) + (let ((t0-1 arg2)) + (let ((a1-3 a0-9)) + (let ((a2-1 v1-0)) + (let ((t1-1 f0-7)) + (.mov vf7 t1-1) + ) + (.lvf vf5 (&-> a2-1 quad)) + ) + (.lvf vf4 (&-> a1-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 (&-> t0-1 quad) vf6) + ) + (let ((v0-0 arg3)) + (let ((a1-4 (- f0-7))) + (.mov vf7 a1-4) + ) + (.lvf vf5 (&-> v1-0 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 (&-> v0-0 quad) vf6) + v0-0 + ) + ) + ) + ) + ) + +(defun circle-ray-intersection? ((arg0 vector) (arg1 vector) (arg2 float) (arg3 vector)) + (let ((f1-1 (- (-> arg3 x) (-> arg0 x))) + (f0-2 (- (-> arg3 z) (-> arg0 z))) + ) + (when (< (fabs (- (* (-> arg1 z) f1-1) (* (-> arg1 x) f0-2))) (-> arg3 w)) + (let ((f2-7 (+ (* (-> arg1 x) f1-1) (* (-> arg1 z) f0-2)))) + (cond + ((< f2-7 0.0) + (let ((f0-5 (+ (* f1-1 f1-1) (* f0-2 f0-2))) + (f1-4 (-> arg3 w)) + ) + (< f0-5 (* f1-4 f1-4)) + ) + ) + ((< arg2 f2-7) + (let* ((f0-8 (- (-> arg3 x) (+ (-> arg0 x) (* (-> arg1 x) arg2)))) + (f1-10 (- (-> arg3 z) (+ (-> arg0 z) (* (-> arg1 z) arg2)))) + (f0-11 (+ (* f0-8 f0-8) (* f1-10 f1-10))) + (f1-13 (-> arg3 w)) + ) + (< f0-11 (* f1-13 f1-13)) + ) + ) + (else + #t + ) + ) + ) + ) + ) + ) + +(defun find-closest-circle-ray-intersection ((arg0 vector) (arg1 vector) (arg2 float) (arg3 int) (arg4 (inline-array vector)) (arg5 int)) + 1.0 + (let ((v0-0 -1)) + (vector-float*! (new 'stack-no-clear 'vector) arg1 arg2) + (let ((v1-3 0)) + (b! #t cfg-18 :delay (nop!)) + (label cfg-1) + (b! (logtest? arg5 (ash 1 v1-3)) cfg-17 :delay (empty-form)) + (let* ((t4-0 arg0) + (t3-1 arg1) + (f0-2 arg2) + (t2-6 (-> arg4 v1-3)) + (f2-1 (- (-> t2-6 x) (-> t4-0 x))) + (f1-2 (- (-> t2-6 z) (-> t4-0 z))) + ) + (b! + (not (when (< (fabs (- (* (-> t3-1 z) f2-1) (* (-> t3-1 x) f1-2))) (-> t2-6 w)) + (let ((f3-7 (+ (* (-> t3-1 x) f2-1) (* (-> t3-1 z) f1-2)))) + (cond + ((< f3-7 0.0) + (let ((f0-5 (+ (* f2-1 f2-1) (* f1-2 f1-2))) + (f1-5 (-> t2-6 w)) + ) + (< f0-5 (* f1-5 f1-5)) + ) + ) + ((< f0-2 f3-7) + (let* ((f1-9 (- (-> t2-6 x) (+ (-> t4-0 x) (* (-> t3-1 x) f0-2)))) + (f2-5 (- (-> t2-6 z) (+ (-> t4-0 z) (* (-> t3-1 z) f0-2)))) + (f0-10 (+ (* f1-9 f1-9) (* f2-5 f2-5))) + (f1-12 (-> t2-6 w)) + ) + (< f0-10 (* f1-12 f1-12)) + ) + ) + (else + #t + ) + ) + ) + ) + ) + cfg-17 + :delay (empty-form) + ) + ) + (set! v0-0 v1-3) + (b! #t cfg-20 :delay (nop!)) + (label cfg-17) + (+! v1-3 1) + (label cfg-18) + (b! (< v1-3 arg3) cfg-1) + ) + (label cfg-20) + v0-0 + ) + ) + +(defun compute-dir-parm ((arg0 vector) (arg1 vector) (arg2 vector)) + (let ((a2-1 (the-as number (vector-dot arg0 arg2))) + (a3-1 #xffffffff80000000) + (v1-2 #x3f800000) + ) + (* (the-as float (logior (logand (the-as uint a2-1) a3-1) v1-2)) (- 1.0 (vector-dot arg0 arg1))) + ) + ) + +(defmethod avoid-spheres-1! ((this nav-control) (arg0 nav-avoid-spheres-params)) + (local-vars (v1-28 int) (a0-29 int) (a1-3 float)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'nav-control-cfs-work))) + (set! (-> s5-0 in-dir quad) (-> arg0 travel quad)) + (set! (-> s5-0 in-dir y) 0.0) + (let ((v1-1 (-> s5-0 in-dir))) + (let ((f0-1 1.0)) + (.lvf vf1 (&-> v1-1 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-4 f0-1)) + (.mov vf3 a0-4) + ) + ) + (.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-1 quad) vf1) + ) + (set! (-> s5-0 travel-len) (vector-dot (-> s5-0 in-dir) (-> arg0 travel))) + (set! (-> s5-0 right-dir quad) (-> s5-0 in-dir quad)) + (set! (-> s5-0 right-dir x) (- (-> s5-0 in-dir z))) + (set! (-> s5-0 right-dir z) (-> s5-0 in-dir x)) + (set! (-> s5-0 best-dir 0 quad) (-> s5-0 in-dir quad)) + (set! (-> s5-0 best-dir 1 quad) (-> s5-0 in-dir quad)) + (set! (-> s5-0 best-dir-angle 0) 0.0) + (set! (-> s5-0 best-dir-angle 1) 0.0) + (set! (-> s5-0 initial-ignore-mask) (the-as uint 0)) + (set! (-> s5-0 i-inside-sphere) -1) + (set! (-> s5-0 inside-sphere-dist) 0.0) + (let ((f0-10 65536.0)) + (set! (-> arg0 closest-sphere-dist2) (* f0-10 f0-10)) + ) + (dotimes (v1-10 (-> this sphere-count)) + (let ((a0-13 (-> this sphere-array v1-10))) + (let ((a1-2 (-> arg0 current-pos)) + (a2-0 a0-13) + ) + (.lvf vf2 (&-> a1-2 quad)) + (.lvf vf3 (&-> a2-0 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a1-3 vf1) + (set! (-> s5-0 dist2) a1-3) + (let ((f0-14 (-> arg0 closest-sphere-dist2)) + (f1-0 (-> s5-0 dist2)) + (f2-0 (-> a0-13 r)) + ) + (set! (-> arg0 closest-sphere-dist2) (fmin f0-14 (- f1-0 (* f2-0 f2-0)))) + ) + (when (< (-> arg0 closest-sphere-dist2) 0.0) + (vector-! (the-as vector (-> s5-0 temp-dir)) (-> arg0 current-pos) (the-as vector a0-13)) + (set! (-> s5-0 temp-dir 0 y) 0.0) + (if (< 0.0 (vector-dot (the-as vector (-> s5-0 temp-dir)) (-> s5-0 in-dir))) + (+! (-> s5-0 initial-ignore-mask) (ash 1 v1-10)) + ) + (set! (-> s5-0 inside-dist) (- (-> a0-13 r) (sqrtf (-> s5-0 dist2)))) + (when (< (-> s5-0 inside-sphere-dist) (-> s5-0 inside-dist)) + (set! (-> s5-0 i-inside-sphere) v1-10) + (set! (-> s5-0 inside-sphere-dist) (-> s5-0 inside-dist)) + ) + ) + ) + ) + (set! (-> s5-0 i-first-sphere) (find-closest-circle-ray-intersection + (-> arg0 current-pos) + (-> s5-0 in-dir) + (-> s5-0 travel-len) + (-> this sphere-count) + (-> this sphere-array) + (the-as int (-> s5-0 initial-ignore-mask)) + ) + ) + (let ((v1-13 -1)) + (b! (!= (-> s5-0 i-first-sphere) v1-13) cfg-13 :delay (empty-form)) + ) + (set! (-> arg0 out-travel 0 quad) (-> arg0 travel quad)) + (set! (-> arg0 out-travel 1 quad) (the-as uint128 0)) + (set! (-> arg0 avoiding-sphere?) #f) + (b! #t cfg-43 :delay (nop!)) + (label cfg-13) + (+! (-> s5-0 initial-ignore-mask) (ash 1 (-> s5-0 i-first-sphere))) + (let ((a1-17 (-> this sphere-array (-> s5-0 i-first-sphere)))) + (circle-tangent-directions + (-> arg0 current-pos) + a1-17 + (the-as vector (-> s5-0 temp-dir)) + (-> s5-0 temp-dir 1) + ) + ) + (dotimes (v1-20 2) + (let ((a0-28 (vector-dot (-> s5-0 right-dir) (-> s5-0 temp-dir v1-20)))) + (shift-arith-right-32 a0-29 a0-28 31) + ) + (let ((a0-30 (logand a0-29 1)) + (f0-27 (- 1.0 (vector-dot (-> s5-0 in-dir) (-> s5-0 temp-dir v1-20)))) + ) + (set! (-> s5-0 best-dir a0-30 quad) (-> s5-0 temp-dir v1-20 quad)) + (set! (-> s5-0 best-dir-angle a0-30) f0-27) + ) + ) + 0 + (set! (-> s5-0 sign) 1.0) + (let ((s3-0 0)) + (b! #t cfg-34 :delay (nop!)) + (label cfg-20) + (-> s5-0 i-first-sphere) + (set! (-> s5-0 dir-update) (the-as basic #t)) + (set! (-> s5-0 ignore-mask) (-> s5-0 initial-ignore-mask)) + (b! #t cfg-30 :delay (nop!)) + (label cfg-21) + (+! (-> s5-0 ignore-mask) (ash 1 v1-28)) + (circle-tangent-directions + (-> arg0 current-pos) + (-> this sphere-array v1-28) + (the-as vector (-> s5-0 temp-dir)) + (-> s5-0 temp-dir 1) + ) + (set! (-> s5-0 dir-update) #f) + (dotimes (v1-30 2) + (let* ((f0-29 (-> s5-0 sign)) + (a1-31 (-> s5-0 temp-dir v1-30)) + (a0-39 (-> s5-0 in-dir)) + (a2-14 (-> s5-0 right-dir)) + (a3-7 (the-as number (vector-dot a1-31 a2-14))) + (t0-1 #xffffffff80000000) + (a2-16 #x3f800000) + (f0-30 (* f0-29 (* (the-as float (logior (logand (the-as uint a3-7) (the-as uint t0-1)) a2-16)) + (- 1.0 (vector-dot a1-31 a0-39)) + ) + ) + ) + ) + (when (< (-> s5-0 best-dir-angle s3-0) f0-30) + (set! (-> s5-0 best-dir s3-0 quad) (-> s5-0 temp-dir v1-30 quad)) + (set! (-> s5-0 best-dir-angle s3-0) f0-30) + (set! (-> s5-0 dir-update) (the-as basic #t)) + ) + ) + ) + (label cfg-30) + (when (-> s5-0 dir-update) + (set! v1-28 (find-closest-circle-ray-intersection + (-> arg0 current-pos) + (-> s5-0 best-dir s3-0) + (-> s5-0 travel-len) + (-> this sphere-count) + (-> this sphere-array) + (the-as int (-> s5-0 ignore-mask)) + ) + ) + (b! (!= v1-28 -1) cfg-21 :delay (nop!)) + ) + (set! (-> s5-0 sign) (* -1.0 (-> s5-0 sign))) + (+! s3-0 1) + (label cfg-34) + (b! (< s3-0 2) cfg-20) + ) + (when (!= (-> s5-0 i-inside-sphere) -1) + (let ((s4-1 (-> this sphere-array (-> s5-0 i-inside-sphere)))) + (vector-! (-> s5-0 away-dir) (-> arg0 current-pos) (the-as vector s4-1)) + (set! (-> s5-0 away-dir y) 0.0) + (when (>= 40.96 (vector-length (-> s5-0 away-dir))) + (set! (-> s5-0 rand-angle) (* 65536.0 (rand-vu))) + (set! (-> s5-0 away-dir x) (cos (-> s5-0 rand-angle))) + (set! (-> s5-0 away-dir z) (sin (-> s5-0 rand-angle))) + ) + (let ((v1-51 (-> s5-0 away-dir))) + (let ((f0-42 1.0)) + (.lvf vf1 (&-> v1-51 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-60 f0-42)) + (.mov vf3 a0-60) + ) + ) + (.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-51 quad) vf1) + ) + (let ((f0-44 (/ (-> s5-0 inside-sphere-dist) (-> s4-1 r)))) + (let ((v1-52 (-> s5-0 best-dir))) + (let ((a0-61 (-> s5-0 best-dir)) + (a1-39 (-> s5-0 away-dir)) + (f1-19 f0-44) + ) + (.lvf vf1 (&-> a0-61 0 quad)) + (.lvf vf2 (&-> a1-39 quad)) + (let ((a0-62 f1-19)) + (.mov vf4 a0-62) + ) + ) + (.add.x.vf vf3 vf0 vf0 :mask #b1000) + (.sub.vf vf2 vf2 vf1) + (.mul.x.vf vf2 vf2 vf4) + (.add.vf vf3 vf1 vf2 :mask #b111) + (.svf (&-> v1-52 0 quad) vf3) + ) + (let ((v1-53 (-> s5-0 best-dir 1))) + (let ((a0-63 (-> s5-0 best-dir 1)) + (a1-40 (-> s5-0 away-dir)) + ) + (.lvf vf1 (&-> a0-63 quad)) + (.lvf vf2 (&-> a1-40 quad)) + ) + (let ((a0-64 f0-44)) + (.mov vf4 a0-64) + ) + (.add.x.vf vf3 vf0 vf0 :mask #b1000) + (.sub.vf vf2 vf2 vf1) + (.mul.x.vf vf2 vf2 vf4) + (.add.vf vf3 vf1 vf2 :mask #b111) + (.svf (&-> v1-53 quad) vf3) + ) + ) + ) + (let ((v1-54 (-> s5-0 best-dir))) + (let ((f0-45 1.0)) + (.lvf vf1 (&-> v1-54 0 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-66 f0-45)) + (.mov vf3 a0-66) + ) + ) + (.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-54 0 quad) vf1) + ) + (let ((v1-55 (-> s5-0 best-dir 1))) + (let ((f0-46 1.0)) + (.lvf vf1 (&-> v1-55 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-68 f0-46)) + (.mov vf3 a0-68) + ) + ) + (.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-55 quad) vf1) + ) + ) + (vector-dot (-> s5-0 in-dir) (the-as vector (-> s5-0 best-dir))) + (vector-dot (-> s5-0 in-dir) (-> s5-0 best-dir 1)) + (let* ((f0-52 (vector-dot (-> arg0 pref-dir) (the-as vector (-> s5-0 best-dir)))) + (a1-41 (if (< (vector-dot (-> arg0 pref-dir) (-> s5-0 best-dir 1)) f0-52) + 0 + 1 + ) + ) + (v1-65 (- 1 a1-41)) + ) + (vector-float*! (the-as vector (-> arg0 out-travel)) (-> s5-0 best-dir a1-41) (-> s5-0 travel-len)) + (vector-float*! (-> arg0 out-travel 1) (-> s5-0 best-dir v1-65) (-> s5-0 travel-len)) + ) + ) + 0 + (set! (-> arg0 avoiding-sphere?) #t) + (label cfg-43) + (-> arg0 avoiding-sphere?) + ) + ) + +(defmethod avoid-spheres-2! ((this nav-control) (arg0 nav-avoid-spheres-params)) + (local-vars (a0-32 int) (a1-3 float)) + (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 (new 'stack-no-clear 'nav-control-cfs-work))) + (set! (-> s5-0 in-dir quad) (-> arg0 travel quad)) + (set! (-> s5-0 in-dir y) 0.0) + (let ((v1-1 (-> s5-0 in-dir))) + (let ((f0-1 1.0)) + (.lvf vf1 (&-> v1-1 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-4 f0-1)) + (.mov vf3 a0-4) + ) + ) + (.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-1 quad) vf1) + ) + (set! (-> s5-0 travel-len) (vector-dot (-> s5-0 in-dir) (-> arg0 travel))) + (set! (-> s5-0 right-dir quad) (-> s5-0 in-dir quad)) + (set! (-> s5-0 right-dir x) (- (-> s5-0 in-dir z))) + (set! (-> s5-0 right-dir z) (-> s5-0 in-dir x)) + (set! (-> s5-0 best-dir 0 quad) (-> s5-0 in-dir quad)) + (set! (-> s5-0 best-dir 1 quad) (-> s5-0 in-dir quad)) + (set! (-> s5-0 best-dir-angle 0) 0.0) + (set! (-> s5-0 best-dir-angle 1) 0.0) + (set! (-> s5-0 initial-ignore-mask) (the-as uint 0)) + (let ((f0-9 65536.0)) + (set! (-> arg0 closest-sphere-dist2) (* f0-9 f0-9)) + ) + (dotimes (v1-9 (-> this sphere-count)) + (let ((a0-13 (-> this sphere-array v1-9))) + (let ((a1-2 (-> arg0 current-pos)) + (a2-0 a0-13) + ) + (.lvf vf2 (&-> a1-2 quad)) + (.lvf vf3 (&-> a2-0 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a1-3 vf1) + (set! (-> s5-0 dist2) a1-3) + (let ((f0-13 (-> arg0 closest-sphere-dist2)) + (f1-0 (-> s5-0 dist2)) + (f2-0 (-> a0-13 r)) + ) + (set! (-> arg0 closest-sphere-dist2) (fmin f0-13 (- f1-0 (* f2-0 f2-0)))) + ) + (when (< (-> arg0 closest-sphere-dist2) 0.0) + (vector-! (the-as vector (-> s5-0 temp-dir)) (-> arg0 current-pos) (the-as vector a0-13)) + (set! (-> s5-0 temp-dir 0 y) 0.0) + (if (< 0.0 (vector-dot (the-as vector (-> s5-0 temp-dir)) (-> s5-0 in-dir))) + (+! (-> s5-0 initial-ignore-mask) (ash 1 v1-9)) + ) + ) + ) + ) + (set! (-> s5-0 i-first-sphere) (find-closest-circle-ray-intersection + (-> arg0 current-pos) + (-> s5-0 in-dir) + (-> s5-0 travel-len) + (-> this sphere-count) + (-> this sphere-array) + (the-as int (-> s5-0 initial-ignore-mask)) + ) + ) + (let ((v1-12 -1)) + (b! (!= (-> s5-0 i-first-sphere) v1-12) cfg-11 :delay (empty-form)) + ) + (set! (-> arg0 out-travel 0 quad) (-> arg0 travel quad)) + (set! (-> arg0 out-travel 1 quad) (the-as uint128 0)) + (set! (-> arg0 avoiding-sphere?) #f) + (b! #t cfg-21 :delay (nop!)) + (label cfg-11) + (+! (-> s5-0 initial-ignore-mask) (ash 1 (-> s5-0 i-first-sphere))) + (let ((a1-15 (-> this sphere-array (-> s5-0 i-first-sphere)))) + (circle-tangent-directions + (-> arg0 current-pos) + a1-15 + (the-as vector (-> s5-0 temp-dir)) + (-> s5-0 temp-dir 1) + ) + ) + (dotimes (v1-19 2) + (let ((a0-31 (vector-dot (-> s5-0 right-dir) (-> s5-0 temp-dir v1-19)))) + (shift-arith-right-32 a0-32 a0-31 31) + ) + (let ((a0-33 (logand a0-32 1)) + (f0-22 (- 1.0 (vector-dot (-> s5-0 in-dir) (-> s5-0 temp-dir v1-19)))) + ) + (set! (-> s5-0 best-dir a0-33 quad) (-> s5-0 temp-dir v1-19 quad)) + (set! (-> s5-0 best-dir-angle a0-33) f0-22) + ) + ) + 0 + (vector-dot (-> s5-0 in-dir) (the-as vector (-> s5-0 best-dir))) + (vector-dot (-> s5-0 in-dir) (-> s5-0 best-dir 1)) + (let* ((f0-28 (vector-dot (-> arg0 pref-dir) (the-as vector (-> s5-0 best-dir)))) + (a1-25 (if (< (vector-dot (-> arg0 pref-dir) (-> s5-0 best-dir 1)) f0-28) + 0 + 1 + ) + ) + (v1-32 (- 1 a1-25)) + ) + (vector-float*! (the-as vector (-> arg0 out-travel)) (-> s5-0 best-dir a1-25) (-> s5-0 travel-len)) + (vector-float*! (-> arg0 out-travel 1) (-> s5-0 best-dir v1-32) (-> s5-0 travel-len)) + ) + ) + 0 + (set! (-> arg0 avoiding-sphere?) #t) + (label cfg-21) + (-> arg0 avoiding-sphere?) + ) + ) + +(defmethod clamp-vector-to-mesh-no-gaps ((this nav-control) + (arg0 vector) + (arg1 nav-poly) + (arg2 vector) + (arg3 clamp-travel-vector-to-mesh-return-info) + ) + (clamp-vector-to-mesh-no-gaps (-> this state mesh) arg0 arg1 arg2 arg3) + 0 + (none) + ) + +(defmethod clamp-vector-to-mesh-no-gaps ((this nav-mesh) (arg0 vector) (arg1 nav-poly) (arg2 vector) (arg3 clamp-travel-vector-to-mesh-return-info)) + (local-vars + (v1-12 symbol) + (sv-112 nav-ray) + (sv-116 vector) + (sv-120 symbol) + (sv-124 nav-mesh-work) + (sv-128 int) + (sv-136 int) + (sv-144 nav-mesh-work) + (sv-148 nav-poly) + (sv-152 uint) + (sv-156 (pointer int8)) + (sv-160 (pointer int8)) + (sv-164 float) + (sv-168 float) + (sv-172 vector) + (sv-176 vector) + (sv-180 float) + (sv-184 float) + (sv-188 uint) + (sv-192 vector) + (sv-196 vector) + (sv-200 float) + (sv-204 float) + (sv-208 float) + (sv-212 float) + ) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (set! (-> arg3 found-boundary) #f) + (set! (-> arg3 gap-poly) #f) + (set! sv-112 (new 'stack-no-clear 'nav-ray)) + (set! sv-116 (new 'stack-no-clear 'vector)) + (set! sv-120 (the-as symbol #f)) + (set! sv-124 (-> this work)) + (vector-! sv-116 arg0 (the-as vector (-> this bounds))) + (set! (-> sv-112 current-poly) arg1) + (set! (-> sv-112 current-pos quad) (-> sv-116 quad)) + (vector+! (-> sv-112 dest-pos) sv-116 arg2) + (let* ((t2-0 this) + (v1-11 (-> sv-112 dest-pos)) + (a1-4 (-> arg1 vertex-count)) + (a2-1 (-> arg1 vertex)) + (t1-4 (-> t2-0 work vert0-table)) + (t2-2 (-> t2-0 work vert1-table)) + ) + (dotimes (t3-0 (the-as int a1-4)) + (let* ((t4-3 (-> a2-1 (-> t1-4 t3-0))) + (t5-3 (-> a2-1 (-> t2-2 t3-0))) + (f0-1 (- (-> t4-3 z) (-> t5-3 z))) + (f1-2 (- (-> t5-3 x) (-> t4-3 x))) + (f2-2 (- (-> v1-11 x) (-> t4-3 x))) + (f3-2 (- (-> v1-11 z) (-> t4-3 z))) + (f0-3 (+ (* f2-2 f0-1) (* f3-2 f1-2))) + ) + (when (< 0.0 f0-3) + (set! v1-12 #f) + (goto cfg-7) + ) + ) + ) + ) + (set! v1-12 #t) + (label cfg-7) + (b! v1-12 cfg-41 :delay (nop!)) + (set! sv-128 0) + (let ((v1-16 sv-112)) + (vector-! (-> v1-16 dir) (-> v1-16 dest-pos) (-> v1-16 current-pos)) + (set! (-> v1-16 dir y) 0.0) + (let ((a1-6 (-> v1-16 dir))) + (let ((f0-5 1.0)) + (.lvf vf1 (&-> a1-6 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a2-4 f0-5)) + (.mov vf3 a2-4) + ) + ) + (.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-6 quad) vf1) + ) + (set! (-> v1-16 next-poly) #f) + (set! (-> v1-16 len) 0.0) + (set! (-> v1-16 last-edge) -1) + (set! (-> v1-16 terminated) #f) + (set! (-> v1-16 reached-dest) #f) + (set! (-> v1-16 hit-boundary) #f) + (set! (-> v1-16 hit-gap) #f) + (set! (-> v1-16 ignore) (the-as uint 3)) + ) + 0 + (until (or (>= sv-128 15) (-> sv-112 terminated)) + (set! sv-128 (+ sv-128 1)) + (let ((a1-9 this) + (v1-20 sv-112) + ) + (set! sv-136 -1) + (set! sv-144 (-> a1-9 work)) + (set! sv-148 (-> v1-20 current-poly)) + (set! sv-152 (-> v1-20 current-poly vertex-count)) + (set! sv-156 (-> a1-9 work vert0-table)) + (set! sv-160 (-> a1-9 work vert1-table)) + (set! sv-164 (- (-> v1-20 dest-pos x) (-> v1-20 current-pos x))) + (set! sv-168 (- (-> v1-20 dest-pos z) (-> v1-20 current-pos z))) + (dotimes (a2-14 (the-as int sv-152)) + (set! sv-172 (-> sv-148 vertex (-> sv-156 a2-14))) + (set! sv-176 (-> sv-148 vertex (-> sv-160 a2-14))) + (set! sv-180 (- (-> sv-172 z) (-> sv-176 z))) + (set! sv-184 (- (-> sv-176 x) (-> sv-172 x))) + (let ((f0-17 (+ (* sv-164 sv-180) (* sv-168 sv-184)))) + (when (< 0.0 f0-17) + (let ((f1-15 (+ (* sv-180 (- (-> sv-172 x) (-> v1-20 current-pos x))) + (* sv-184 (- (-> sv-172 z) (-> v1-20 current-pos z))) + ) + ) + ) + (when (< f1-15 f0-17) + (set! sv-136 a2-14) + (let ((f0-19 (fmax 0.0 (/ f1-15 f0-17)))) + (set! sv-164 (* sv-164 f0-19)) + (set! sv-168 (* sv-168 f0-19)) + ) + ) + ) + ) + ) + ) + (let ((f0-23 (+ (* sv-164 (-> v1-20 dir x)) (* sv-168 (-> v1-20 dir z))))) + (+! (-> v1-20 len) f0-23) + ) + 0 + (set! (-> v1-20 next-poly) #f) + (cond + ((= sv-136 -1) + (set! (-> v1-20 current-pos quad) (-> v1-20 dest-pos quad)) + (set! (-> v1-20 reached-dest) #t) + (set! (-> v1-20 terminated) #t) + ) + (else + (+! (-> v1-20 current-pos x) sv-164) + (+! (-> v1-20 current-pos z) sv-168) + (set! sv-188 (-> sv-148 adj-poly sv-136)) + (if (!= sv-188 255) + (set! (-> v1-20 next-poly) (-> a1-9 poly-array sv-188)) + ) + (cond + ((and (-> v1-20 next-poly) (not (logtest? (-> v1-20 next-poly pat) (-> v1-20 ignore)))) + (set! (-> v1-20 current-poly) (-> v1-20 next-poly)) + ) + (else + (set! (-> v1-20 last-edge) sv-136) + (if (-> v1-20 next-poly) + (set! (-> v1-20 hit-gap) #t) + (set! (-> v1-20 hit-boundary) #t) + ) + (set! (-> v1-20 terminated) #t) + ) + ) + ) + ) + ) + 0 + ) + (cond + ((or (-> sv-112 hit-boundary) (-> sv-112 hit-gap)) + (set! sv-192 (-> sv-112 current-poly vertex (-> sv-124 vert0-table (-> sv-112 last-edge)))) + (set! sv-196 (-> sv-112 current-poly vertex (-> sv-124 vert1-table (-> sv-112 last-edge)))) + (set! sv-200 (- (-> sv-192 z) (-> sv-196 z))) + (set! sv-204 (- (-> sv-196 x) (-> sv-192 x))) + (set! sv-208 (-> arg2 x)) + (set! sv-212 (-> arg2 z)) + (let* ((f0-35 sv-200) + (f0-37 (* f0-35 f0-35)) + (f1-27 sv-204) + (f0-39 (sqrtf (+ f0-37 (* f1-27 f1-27)))) + (f0-41 (/ 1.0 f0-39)) + ) + (set! sv-200 (* sv-200 f0-41)) + (set! sv-204 (* sv-204 f0-41)) + ) + (set! (-> arg3 found-boundary) #t) + (vector+! (-> arg3 intersection) (-> sv-112 current-pos) (the-as vector (-> this bounds))) + (set! (-> arg3 boundary-normal x) sv-200) + (set! (-> arg3 boundary-normal y) 0.0) + (set! (-> arg3 boundary-normal z) sv-204) + (set! (-> arg3 poly) (-> sv-112 current-poly)) + (set! (-> arg3 edge) (-> sv-112 last-edge)) + (vector+! (-> arg3 vert-0) sv-192 (the-as vector (-> this bounds))) + (vector+! (-> arg3 vert-1) sv-196 (the-as vector (-> this bounds))) + (set! (-> sv-112 dest-pos quad) (-> sv-112 current-pos quad)) + (if (-> sv-112 hit-gap) + (set! (-> arg3 gap-poly) (-> sv-112 next-poly)) + ) + ) + (else + ) + ) + (vector-! arg2 (-> sv-112 current-pos) sv-116) + 0 + (label cfg-41) + 0 + (none) + ) + ) + +;; WARN: Return type mismatch object vs none. +;; WARN: Function (method 23 nav-mesh) has a return type of none, but the expression builder found a return statement. +(defmethod find-adjacent-bounds-one ((this nav-mesh) (arg0 vector) (arg1 nav-poly) (arg2 int) (arg3 int)) + (local-vars (sv-16 nav-poly)) + (if (zero? arg3) + (set! arg2 (the-as int (mod (the-as uint (+ arg2 1)) (-> arg1 vertex-count)))) + ) + (set! sv-16 arg1) + (let ((s2-0 (-> sv-16 vertex arg2)) + (s3-0 sv-16) + (s1-0 100) + ) + (while (begin (label cfg-21) (nonzero? s1-0)) + (+! s1-0 -1) + (if (nonzero? arg3) + (set! arg2 (the-as int (mod (the-as uint (+ arg2 arg3 (-> s3-0 vertex-count))) (-> s3-0 vertex-count)))) + ) + (let ((v1-12 (-> s3-0 adj-poly arg2))) + (cond + ((= v1-12 255) + (if (zero? arg3) + (set! arg2 (the-as int (mod (the-as uint (+ arg2 1)) (-> s3-0 vertex-count)))) + ) + (vector+! arg0 (-> s3-0 vertex arg2) (the-as vector (-> this bounds))) + (return #f) + ) + (else + (set! s3-0 (-> this poly-array v1-12)) + (when (= s3-0 sv-16) + (format 0 "ERROR: find-adjacent-bounds-one cur-poly = start-poly after step~%") + (return #f) + ) + (dotimes (s0-0 (the-as int (-> s3-0 vertex-count))) + (when (vector= (-> s3-0 vertex s0-0) s2-0) + (set! arg2 s0-0) + (goto cfg-21) + ) + ) + (format 0 "ERROR: find-adjacent-bounds-one couldn't match vertex~%") + (return #f) + ) + ) + ) + ) + ) + (format 0 "ERROR: find-adjacent-bounds-one took too many steps~%") + (none) + ) + +(defmethod set-normals-from-adjacent-bounds ((this nav-mesh) (arg0 clamp-travel-vector-to-mesh-return-info)) + (find-adjacent-bounds-one this (-> arg0 vert-prev) (-> arg0 poly) (-> arg0 edge) -1) + (find-adjacent-bounds-one this (-> arg0 vert-next) (-> arg0 poly) (-> arg0 edge) 0) + (vector-! (-> arg0 prev-normal) (-> arg0 vert-0) (-> arg0 vert-prev)) + (vector-! (-> arg0 next-normal) (-> arg0 vert-next) (-> arg0 vert-1)) + (vector-normalize! (-> arg0 prev-normal) 1.0) + (vector-normalize! (-> arg0 next-normal) 1.0) + (let ((f0-0 (-> arg0 prev-normal x))) + (set! (-> arg0 prev-normal x) (-> arg0 prev-normal z)) + (set! (-> arg0 prev-normal z) f0-0) + ) + (let ((f0-1 (-> arg0 next-normal x))) + (set! (-> arg0 next-normal x) (-> arg0 next-normal z)) + (set! (-> arg0 next-normal z) f0-1) + ) + (set! (-> arg0 prev-normal x) (- (-> arg0 prev-normal x))) + (set! (-> arg0 next-normal x) (- (-> arg0 next-normal x))) + 0 + (none) + ) + +(defmethod clamp-vector-to-mesh-cross-gaps ((this nav-mesh) + (arg0 vector) + (arg1 nav-poly) + (arg2 vector) + (arg3 float) + (arg4 symbol) + (arg5 clamp-travel-vector-to-mesh-return-info) + ) + (local-vars + (v1-11 symbol) + (v1-22 symbol) + (sv-96 nav-ray) + (sv-100 symbol) + (sv-104 int) + (sv-112 nav-mesh-work) + (sv-120 int) + (sv-128 int) + (sv-136 nav-mesh-work) + (sv-140 nav-poly) + (sv-144 uint) + (sv-148 (pointer int8)) + (sv-152 (pointer int8)) + (sv-156 float) + (sv-160 float) + (sv-164 vector) + (sv-168 vector) + (sv-172 float) + (sv-176 float) + (sv-180 uint) + (sv-184 vector) + (sv-188 vector) + (sv-192 float) + (sv-196 float) + (sv-200 float) + (sv-204 float) + ) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (when arg5 + (set! (-> arg5 found-boundary) #f) + (set! (-> arg5 gap-poly) #f) + ) + (set! sv-96 (new 'stack-no-clear 'nav-ray)) + (set! sv-100 (the-as symbol #f)) + (set! sv-104 0) + (set! sv-112 (-> this work)) + (set! (-> sv-96 current-poly) arg1) + (set! (-> sv-96 current-pos quad) (-> arg0 quad)) + (vector+! (-> sv-96 dest-pos) arg0 arg2) + (let* ((t6-0 this) + (t4-2 arg1) + (v1-10 (-> sv-96 dest-pos)) + (t3-3 (-> t4-2 vertex-count)) + (t4-3 (-> t4-2 vertex)) + (t5-1 (-> t6-0 work vert0-table)) + (t6-2 (-> t6-0 work vert1-table)) + ) + (dotimes (t7-0 (the-as int t3-3)) + (let* ((t8-3 (-> t4-3 (-> t5-1 t7-0))) + (t9-3 (-> t4-3 (-> t6-2 t7-0))) + (f0-1 (- (-> t8-3 z) (-> t9-3 z))) + (f1-2 (- (-> t9-3 x) (-> t8-3 x))) + (f2-2 (- (-> v1-10 x) (-> t8-3 x))) + (f3-2 (- (-> v1-10 z) (-> t8-3 z))) + (f0-3 (+ (* f2-2 f0-1) (* f3-2 f1-2))) + ) + (when (< 0.0 f0-3) + (set! v1-11 #f) + (goto cfg-9) + ) + ) + ) + ) + (set! v1-11 #t) + (label cfg-9) + (b! v1-11 cfg-62 :delay (nop!)) + (until sv-100 + (set! sv-120 0) + (let ((v1-15 sv-96)) + (vector-! (-> v1-15 dir) (-> v1-15 dest-pos) (-> v1-15 current-pos)) + (set! (-> v1-15 dir y) 0.0) + (let ((t3-5 (-> v1-15 dir))) + (let ((f0-5 1.0)) + (.lvf vf1 (&-> t3-5 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((t4-6 f0-5)) + (.mov vf3 t4-6) + ) + ) + (.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 (&-> t3-5 quad) vf1) + ) + (set! (-> v1-15 next-poly) #f) + (set! (-> v1-15 len) 0.0) + (set! (-> v1-15 last-edge) -1) + (set! (-> v1-15 terminated) #f) + (set! (-> v1-15 reached-dest) #f) + (set! (-> v1-15 hit-boundary) #f) + (set! (-> v1-15 hit-gap) #f) + (set! (-> v1-15 ignore) (the-as uint 3)) + ) + 0 + (until v1-22 + (set! sv-120 (+ sv-120 1)) + (let ((t3-8 this) + (v1-19 sv-96) + ) + (set! sv-128 -1) + (set! sv-136 (-> t3-8 work)) + (set! sv-140 (-> v1-19 current-poly)) + (set! sv-144 (-> v1-19 current-poly vertex-count)) + (set! sv-148 (-> t3-8 work vert0-table)) + (set! sv-152 (-> t3-8 work vert1-table)) + (set! sv-156 (- (-> v1-19 dest-pos x) (-> v1-19 current-pos x))) + (set! sv-160 (- (-> v1-19 dest-pos z) (-> v1-19 current-pos z))) + (dotimes (t4-16 (the-as int sv-144)) + (set! sv-164 (-> sv-140 vertex (-> sv-148 t4-16))) + (set! sv-168 (-> sv-140 vertex (-> sv-152 t4-16))) + (set! sv-172 (- (-> sv-164 z) (-> sv-168 z))) + (set! sv-176 (- (-> sv-168 x) (-> sv-164 x))) + (let ((f0-17 (+ (* sv-156 sv-172) (* sv-160 sv-176)))) + (when (< 0.0 f0-17) + (let ((f1-15 (+ (* sv-172 (- (-> sv-164 x) (-> v1-19 current-pos x))) + (* sv-176 (- (-> sv-164 z) (-> v1-19 current-pos z))) + ) + ) + ) + (when (< f1-15 f0-17) + (set! sv-128 t4-16) + (let ((f0-19 (fmax 0.0 (/ f1-15 f0-17)))) + (set! sv-156 (* sv-156 f0-19)) + (set! sv-160 (* sv-160 f0-19)) + ) + ) + ) + ) + ) + ) + (let ((f0-23 (+ (* sv-156 (-> v1-19 dir x)) (* sv-160 (-> v1-19 dir z))))) + (+! (-> v1-19 len) f0-23) + ) + 0 + (set! (-> v1-19 next-poly) #f) + (cond + ((= sv-128 -1) + (set! (-> v1-19 current-pos quad) (-> v1-19 dest-pos quad)) + (set! (-> v1-19 reached-dest) #t) + (set! (-> v1-19 terminated) #t) + ) + (else + (+! (-> v1-19 current-pos x) sv-156) + (+! (-> v1-19 current-pos z) sv-160) + (set! sv-180 (-> sv-140 adj-poly sv-128)) + (if (!= sv-180 255) + (set! (-> v1-19 next-poly) (-> t3-8 poly-array sv-180)) + ) + (cond + ((and (-> v1-19 next-poly) (not (logtest? (-> v1-19 next-poly pat) (-> v1-19 ignore)))) + (set! (-> v1-19 current-poly) (-> v1-19 next-poly)) + ) + (else + (set! (-> v1-19 last-edge) sv-128) + (if (-> v1-19 next-poly) + (set! (-> v1-19 hit-gap) #t) + (set! (-> v1-19 hit-boundary) #t) + ) + (set! (-> v1-19 terminated) #t) + ) + ) + ) + ) + ) + 0 + (set! v1-22 (or (>= sv-120 15) (or (>= (-> sv-96 len) (fmax 20480.0 arg3)) (-> sv-96 terminated)))) + ) + (cond + ((and (-> sv-96 hit-boundary) (and (< (-> sv-96 len) arg3) (!= (-> sv-96 last-edge) -1) (< sv-104 1))) + (set! sv-104 (+ sv-104 1)) + (set! sv-184 (-> arg1 vertex (-> sv-112 vert0-table (-> sv-96 last-edge)))) + (set! sv-188 (-> arg1 vertex (-> sv-112 vert1-table (-> sv-96 last-edge)))) + (set! sv-192 (- (-> sv-184 z) (-> sv-188 z))) + (set! sv-196 (- (-> sv-188 x) (-> sv-184 x))) + (set! sv-200 (-> arg2 x)) + (set! sv-204 (-> arg2 z)) + (let* ((f0-37 sv-192) + (f0-39 (* f0-37 f0-37)) + (f1-30 sv-196) + (f0-41 (sqrtf (+ f0-39 (* f1-30 f1-30)))) + (f0-43 (/ 1.0 f0-41)) + ) + (set! sv-192 (* sv-192 f0-43)) + (set! sv-196 (* sv-196 f0-43)) + ) + (when arg5 + (set! (-> arg5 found-boundary) #t) + (vector+! (-> arg5 intersection) (-> sv-96 current-pos) (the-as vector (-> this bounds))) + (set! (-> arg5 boundary-normal x) sv-192) + (set! (-> arg5 boundary-normal y) 0.0) + (set! (-> arg5 boundary-normal z) sv-196) + (set! (-> arg5 poly) (-> sv-96 current-poly)) + (set! (-> arg5 edge) (-> sv-96 last-edge)) + (vector+! (-> arg5 vert-0) sv-184 (the-as vector (-> this bounds))) + (vector+! (-> arg5 vert-1) sv-188 (the-as vector (-> this bounds))) + ) + (set! (-> sv-96 dest-pos quad) (-> sv-96 current-pos quad)) + (cond + (arg4 + (let ((f0-49 (* 1.01 (+ (* sv-192 sv-200) (* sv-196 sv-204))))) + (set! sv-200 (- sv-200 (* sv-192 f0-49))) + (set! sv-204 (- sv-204 (* sv-196 f0-49))) + ) + (+! (-> sv-96 dest-pos x) sv-200) + (+! (-> sv-96 dest-pos z) sv-204) + ) + (else + (set! sv-100 #t) + ) + ) + ) + ((-> sv-96 hit-gap) + (if arg5 + (set! (-> arg5 gap-poly) (-> sv-96 next-poly)) + ) + (set! sv-100 #t) + ) + (else + (set! sv-100 #t) + ) + ) + ) + (vector-! arg2 (-> sv-96 current-pos) arg0) + 0 + (label cfg-62) + 0 + (none) + ) + ) + +(defmethod find-first-sphere-and-update-avoid-params ((this nav-control) (arg0 vector) (arg1 nav-avoid-spheres-params)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (let ((s2-1 + (vector-! (new 'stack-no-clear 'vector) (-> this root-nav-sphere) (the-as vector (-> this state mesh bounds))) + ) + (f30-0 -1.0) + ) + (let ((s3-0 -1)) + (countdown (s1-0 (-> this sphere-count)) + (let* ((s0-0 (-> this sphere-array s1-0)) + (f0-2 (ray-circle-intersect s2-1 arg0 s0-0 (+ -409.6 (-> s0-0 r)))) + ) + (when (>= f0-2 0.0) + (let ((v1-5 (new 'stack-no-clear 'vector))) + (vector-! v1-5 (the-as vector s0-0) s2-1) + (when (>= (vector-dot v1-5 arg0) 0.0) + (when (or (< f30-0 0.0) (< f0-2 f30-0)) + (set! f30-0 f0-2) + (set! s3-0 s1-0) + ) + ) + ) + ) + ) + ) + (when arg1 + (set! (-> arg1 current-pos x) f30-0) + (when (>= f30-0 0.0) + (vector+float*! (-> arg1 travel) (-> this root-nav-sphere) arg0 f30-0) + (let ((a0-9 (-> this sphere-array s3-0)) + (v1-19 (new 'stack-no-clear 'vector)) + ) + (vector+! v1-19 (the-as vector a0-9) (the-as vector (-> this state mesh bounds))) + (vector-! (-> arg1 pref-dir) (-> arg1 travel) v1-19) + ) + (set! (-> arg1 pref-dir w) 1.0) + (let ((v1-21 (-> arg1 pref-dir))) + (let ((f0-6 1.0)) + (.lvf vf1 (&-> v1-21 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-12 f0-6)) + (.mov vf3 a0-12) + ) + ) + (.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-21 quad) vf1) + ) + ) + ) + ) + f30-0 + ) + ) + ) + +;; WARN: Return type mismatch none vs symbol. +(defmethod add-root-sphere-to-hash! ((this nav-control) (arg0 vector) (arg1 int)) + (the-as symbol (if (logtest? (-> this flags) (nav-control-flag output-sphere-hash)) + (find-nav-sphere-ids + (-> this state mesh sphere-hash) + (the-as find-nav-sphere-ids-params arg0) + (logand arg1 255) + (the-as int (-> this root-sphere-id)) + ) + ) + ) + ) + +(defmethod reset! ((this nav-state) (arg0 nav-control)) + (set! (-> this nav) arg0) + (set! (-> this flags) (nav-state-flag)) + (set! (-> this current-poly) #f) + (set! (-> this next-poly) #f) + (set! (-> this target-poly) #f) + (set! (-> this user-poly) #f) + 0 + (none) + ) + +(defmethod relocate ((this nav-state) (offset int)) + (break!) + (&+! (-> this nav) offset) + this + ) + +(defmethod get-velocity ((this nav-state) (arg0 vector)) + (set! (-> arg0 quad) (-> this velocity quad)) + arg0 + ) + +(defmethod get-heading ((this nav-state) (arg0 vector)) + (set! (-> arg0 quad) (-> this heading quad)) + arg0 + ) + +(defmethod get-target-pos ((this nav-state) (arg0 vector)) + (set! (-> arg0 quad) (-> this target-pos quad)) + arg0 + ) + +(defmethod get-current-poly ((this nav-state)) + (-> this current-poly) + ) + +(defmethod get-speed ((this nav-state)) + (-> this speed) + ) + +(defmethod get-rotation-rate ((this nav-state)) + (-> this rotation-rate) + ) + +(defmethod get-travel ((this nav-state) (arg0 vector)) + (set! (-> arg0 quad) (-> this travel quad)) + arg0 + ) + +(defmethod set-velocity! ((this nav-state) (arg0 vector)) + (set! (-> this velocity quad) (-> arg0 quad)) + 0 + (none) + ) + +(defmethod set-heading! ((this nav-state) (arg0 vector)) + (set! (-> this heading quad) (-> arg0 quad)) + 0 + (none) + ) + +(defmethod set-speed! ((this nav-state) (arg0 meters)) + (set! (-> this speed) arg0) + 0 + (none) + ) + +(defmethod set-target-pos! ((this nav-state) (arg0 vector)) + (logclear! (-> this flags) (nav-state-flag directional-mode)) + (logior! (-> this flags) (nav-state-flag target-poly-dirty)) + (set! (-> this target-pos quad) (-> arg0 quad)) + 0 + (none) + ) + +(defmethod set-virtual-cur-pos! ((this nav-state) (arg0 vector)) + (logior! (-> this flags) (nav-state-flag use-position)) + (set! (-> this virtual-current-pos-local quad) (-> arg0 quad)) + 0 + (none) + ) + +(defmethod set-travel! ((this nav-state) (arg0 vector)) + (logior! (-> this flags) (nav-state-flag directional-mode)) + (set! (-> this travel quad) (-> arg0 quad)) + 0 + (none) + ) + +(defmethod copy-nav-state! ((this nav-state) (arg0 (pointer nav-state))) + (mem-copy! (the-as pointer this) arg0 176) + 0 + (none) + ) + +(defmethod nav-state-method-10 ((this nav-state)) + 0 + (none) + ) + +(defmethod debug-draw ((this nav-state)) + (let ((s5-0 (-> this mesh))) + (if (-> this next-poly) + (debug-draw-poly s5-0 (-> this next-poly) *color-cyan*) + ) + (if (-> this target-poly) + (debug-draw-poly s5-0 (-> this target-poly) *color-yellow*) + ) + (if (-> this current-poly) + (debug-draw-poly s5-0 (-> this current-poly) *color-red*) + ) + ) + (add-debug-x #t (bucket-id debug-no-zbuf1) (-> this target-pos) *color-yellow*) + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + (-> this current-pos) + (-> this travel) + (meters 0.00024414062) + *color-white* + ) + (let ((s5-1 (new 'stack-no-clear 'vector))) + 0.0 + (-> this mesh work debug) + (set! (-> s5-1 quad) (-> this current-pos quad)) + (let ((f30-0 (-> s5-1 y))) + (set! (-> s5-1 y) (+ 2048.0 f30-0)) + (add-debug-vector #t (bucket-id debug-no-zbuf1) s5-1 (-> this heading) (meters 1) *color-yellow*) + (set! (-> s5-1 y) (+ 4096.0 f30-0)) + ) + ) + 0 + (add-debug-x + #t + (bucket-id debug-no-zbuf1) + (vector+! (new 'stack-no-clear 'vector) (-> this current-pos) (-> this travel)) + *color-white* + ) + 0 + (none) + ) + +(defmethod set-current-poly! ((this nav-state) (arg0 nav-poly)) + (set! (-> this current-poly) arg0) + 0 + (none) + ) + +(defmethod clamp-vector-to-mesh-cross-gaps ((this nav-state) (arg0 vector)) + (when (-> this current-poly) + (clamp-vector-to-mesh-cross-gaps + (-> this nav) + (-> this current-pos) + (-> this current-poly) + arg0 + 204.8 + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + #t + ) + ) + +(defmethod do-navigation-to-destination ((this nav-state) (arg0 vector)) + (local-vars (v1-15 symbol)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (cond + ((-> this current-poly) + (let ((s3-0 (-> this mesh)) + (s4-0 (new 'stack-no-clear 'nav-ray)) + ) + (let ((s2-0 0)) + (set! (-> s4-0 current-poly) (-> this current-poly)) + (vector-! (-> s4-0 current-pos) (-> this current-pos) (the-as vector (-> s3-0 bounds))) + (vector-! (-> s4-0 dest-pos) arg0 (the-as vector (-> s3-0 bounds))) + (b! (not (point-in-poly? s3-0 (-> this current-poly) (-> s4-0 dest-pos))) cfg-3 :delay (empty-form)) + (logior! (-> this flags) (nav-state-flag in-mesh)) + (set! (-> this current-pos quad) (-> arg0 quad)) + (b! #t cfg-17 :delay (nop!)) + (label cfg-3) + (let ((v1-10 s4-0)) + (vector-! (-> v1-10 dir) (-> v1-10 dest-pos) (-> v1-10 current-pos)) + (set! (-> v1-10 dir y) 0.0) + (let ((a0-6 (-> v1-10 dir))) + (let ((f0-1 1.0)) + (.lvf vf1 (&-> a0-6 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a1-8 f0-1)) + (.mov vf3 a1-8) + ) + ) + (.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 (&-> a0-6 quad) vf1) + ) + (set! (-> v1-10 next-poly) #f) + (set! (-> v1-10 len) 0.0) + (set! (-> v1-10 last-edge) -1) + (set! (-> v1-10 terminated) #f) + (set! (-> v1-10 reached-dest) #f) + (set! (-> v1-10 hit-boundary) #f) + (set! (-> v1-10 hit-gap) #f) + (set! (-> v1-10 ignore) (the-as uint 3)) + ) + 0 + (set! (-> s4-0 ignore) (the-as uint 1)) + (until v1-15 + (+! s2-0 1) + (advance-ray-to-nearest-poly-edge-or-dest! s3-0 s4-0) + (set! v1-15 (or (>= s2-0 15) (-> s4-0 terminated))) + ) + ) + (set! (-> this current-poly) (-> s4-0 current-poly)) + (when (-> s4-0 reached-dest) + (if (not (point-in-poly? s3-0 (-> this current-poly) (-> s4-0 dest-pos))) + (set! (-> s4-0 reached-dest) #f) + ) + ) + (cond + ((-> s4-0 reached-dest) + (logior! (-> this flags) (nav-state-flag in-mesh)) + (set! (-> this current-pos quad) (-> arg0 quad)) + ) + (else + (logclear! (-> this flags) (nav-state-flag in-mesh)) + (set! (-> this current-pos quad) (-> arg0 quad)) + (let ((s4-1 (new 'stack 'nav-find-poly-parms))) + (vector-! (-> s4-1 point) arg0 (the-as vector (-> this mesh bounds))) + (set! (-> s4-1 y-threshold) (-> this nav nearest-y-threshold)) + (set! (-> s4-1 ignore) (the-as uint 1)) + (nav-mesh-method-46 (-> this mesh) (the-as nav-poly s4-1)) + (set! (-> this current-poly) (-> s4-1 poly)) + ) + 0 + ) + ) + ) + ) + (else + (set! (-> this current-pos quad) (-> arg0 quad)) + (let ((s4-2 (new 'stack 'nav-find-poly-parms))) + (vector-! (-> s4-2 point) arg0 (the-as vector (-> this mesh bounds))) + (set! (-> s4-2 y-threshold) (-> this nav nearest-y-threshold)) + (set! (-> s4-2 ignore) (the-as uint 1)) + (nav-mesh-method-46 (-> this mesh) (the-as nav-poly s4-2)) + (set! (-> this current-poly) (-> s4-2 poly)) + (logclear! (-> this flags) (nav-state-flag in-mesh)) + (if (-> s4-2 point-inside?) + (logior! (-> this flags) (nav-state-flag in-mesh)) + ) + ) + ) + ) + (label cfg-17) + 0 + (none) + ) + ) + +(defmethod try-projecting-to-current-poly ((this nav-state) (arg0 vector) (arg1 vector) (arg2 vector)) + (cond + ((-> this current-poly) + (let ((s5-0 (-> this nav)) + (v1-1 (-> this current-poly)) + (gp-0 arg0) + ) + (let ((t1-0 arg1) + (a1-1 arg2) + ) + (project-point-onto-plane-of-poly-local + (-> s5-0 state mesh) + v1-1 + gp-0 + t1-0 + (vector-! (new 'stack-no-clear 'vector) a1-1 (the-as vector (-> s5-0 state mesh bounds))) + ) + ) + (vector+! gp-0 gp-0 (the-as vector (-> s5-0 state mesh bounds))) + ) + 0 + #t + ) + (else + #f + ) + ) + ) + +(defmethod clamp-vector-to-mesh-cross-gaps ((this nav-control) + (arg0 vector) + (arg1 nav-poly) + (arg2 vector) + (arg3 float) + (arg4 symbol) + (arg5 clamp-travel-vector-to-mesh-return-info) + ) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (vector-! v1-0 arg0 (the-as vector (-> this state mesh bounds))) + (clamp-vector-to-mesh-cross-gaps (-> this state mesh) v1-0 arg1 arg2 arg3 arg4 arg5) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch float vs nav-poly. +(defmethod closest-point-on-mesh ((this nav-control) (arg0 vector) (arg1 vector) (arg2 nav-poly)) + (local-vars (sv-16 vector)) + (set! sv-16 arg0) + (let ((gp-0 (new 'stack-no-clear 'nav-poly))) + (set! (-> gp-0 vertex1 z) (the-as float arg2)) + (vector-! (the-as vector (-> gp-0 vertex)) arg1 (the-as vector (-> this state mesh bounds))) + (when (or (not (-> gp-0 vertex1 z)) + (not (point-in-poly? (-> this state mesh) (the-as nav-poly (-> gp-0 vertex1 z)) (the-as vector (-> gp-0 vertex))) + ) + ) + (set! (-> gp-0 vertex1 x) (-> this nearest-y-threshold)) + (set! (-> gp-0 data 20) (the-as uint 3)) + (nav-mesh-method-46 (-> this state mesh) gp-0) + ) + (when (-> gp-0 vertex1 z) + (project-point-into-poly-2d + (-> this state mesh) + (the-as nav-poly (-> gp-0 vertex1 z)) + sv-16 + (the-as vector (-> gp-0 vertex)) + ) + (vector+! sv-16 sv-16 (the-as vector (-> this state mesh bounds))) + ) + (the-as nav-poly (-> gp-0 vertex1 z)) + ) + ) + +(defun vector-rotate-y-sincos! ((arg0 vector) (arg1 vector) (arg2 float) (arg3 float)) + (let ((f0-0 (-> arg1 x)) + (f1-0 (-> arg1 z)) + ) + (set! (-> arg0 x) (+ (* arg3 f0-0) (* arg2 f1-0))) + (set! (-> arg0 y) (-> arg1 y)) + (set! (-> arg0 z) (- (* arg3 f1-0) (* arg2 f0-0))) + ) + ) + +(defmethod-mips2c "(method 39 nav-state)" 39 nav-state) + +(defmethod nav-state-method-51 ((this nav-state)) + 0 + (none) + ) + +(defun test-xz-point-on-line-segment? ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 float)) + (local-vars (v1-2 float) (v1-4 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (let* ((f0-0 arg3) + (f0-2 (* f0-0 f0-0)) + ) + (let ((v1-1 arg0) + (t0-0 arg1) + ) + (.lvf vf2 (&-> v1-1 quad)) + (.lvf vf3 (&-> t0-0 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov v1-2 vf1) + (let ((f1-0 v1-2)) + (let ((v1-3 arg0) + (t0-1 arg2) + ) + (.lvf vf2 (&-> v1-3 quad)) + (.lvf vf3 (&-> t0-1 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov v1-4 vf1) + (let ((v0-0 (>= f0-2 (fmin f1-0 v1-4)))) + (when (not v0-0) + (let* ((f0-4 (- (-> arg2 x) (-> arg1 x))) + (f1-4 (- (-> arg2 z) (-> arg1 z))) + (f2-2 f0-4) + (f2-4 (* f2-2 f2-2)) + (f3-0 f1-4) + (f2-6 (sqrtf (+ f2-4 (* f3-0 f3-0)))) + (f3-3 f2-6) + (f3-5 (/ 1.0 f3-3)) + (f5-0 (* f3-5 (- f1-4))) + (f6-0 (* f3-5 f0-4)) + (f3-7 (- (-> arg0 x) (-> arg1 x))) + (f4-4 (- (-> arg0 z) (-> arg1 z))) + ) + (when (>= arg3 (fabs (+ (* f3-7 f5-0) (* f4-4 f6-0)))) + (let ((f0-6 (+ (* f3-7 f0-4) (* f4-4 f1-4)))) + (set! v0-0 (and (>= f0-6 0.0) (>= (* f2-6 f2-6) f0-6))) + ) + ) + ) + ) + v0-0 + ) + ) + ) + ) + ) + +(defmethod navigate-using-route-portals ((this nav-state)) + (local-vars + (v1-117 float) + (sv-112 vector) + (sv-116 nav-route-portal) + (sv-120 (inline-array vector)) + (sv-124 symbol) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set! (-> this virtual-current-poly) (-> this current-poly)) + (set! sv-112 (new 'stack-no-clear 'vector)) + (set! sv-116 (new 'stack-no-clear 'nav-route-portal)) + (set! sv-120 (new 'stack-no-clear 'inline-array 'vector 2)) + (set! sv-124 (the-as symbol #f)) + (vector-! (-> this current-pos-local) (-> this current-pos) (the-as vector (-> this mesh bounds))) + (set! (-> this virtual-current-pos-local quad) (-> this current-pos-local quad)) + (set! (-> sv-116 next-poly) #f) + (when (not (logtest? (-> this flags) (nav-state-flag directional-mode))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (let ((s4-0 (new 'stack-no-clear 'nav-poly))) + (vector-! s5-0 (-> this target-pos) (the-as vector (-> this mesh bounds))) + (when (or (logtest? (-> this flags) (nav-state-flag target-poly-dirty)) (not (-> this target-poly))) + (set! (-> s4-0 vertex 0 quad) (-> s5-0 quad)) + (set! (-> s4-0 vertex1 x) (-> this nav nearest-y-threshold)) + (set! (-> s4-0 data 20) (the-as uint 3)) + (nav-mesh-method-46 (-> this mesh) s4-0) + (set! (-> this target-poly) (the-as nav-poly (-> s4-0 vertex1 z))) + (if (not (-> this target-poly)) + (set! (-> this target-poly) (-> this current-poly)) + ) + (logclear! (-> this flags) (nav-state-flag target-poly-dirty)) + ) + ) + (project-point-into-poly-2d (-> this mesh) (-> this target-poly) sv-112 s5-0) + ) + (set! (-> sv-112 y) (-> this current-pos-local y)) + (vector-! (-> this travel) sv-112 (-> this current-pos-local)) + (set! (-> this travel y) 0.0) + (let* ((v1-32 (-> this travel)) + (f0-6 (+ (* (-> v1-32 x) (-> v1-32 x)) (* (-> v1-32 z) (-> v1-32 z)))) + (f1-3 4096.0) + ) + (if (< f0-6 (* f1-3 f1-3)) + (logior! (-> this flags) (nav-state-flag at-target)) + ) + ) + (get-route-portal (-> this mesh) (-> this current-poly) (-> this target-poly) sv-116) + ) + (cond + ((not (-> sv-116 next-poly)) + (set! (-> this next-poly) #f) + ) + (else + (set! (-> this next-poly) (-> sv-116 next-poly)) + (set! (-> sv-120 0 quad) (-> sv-116 vertex 0 quad)) + (set! (-> sv-120 1 quad) (-> sv-116 vertex 1 quad)) + (set! sv-124 #t) + (while (and sv-124 (-> sv-116 next-poly) (test-xz-point-on-line-segment? + (-> this current-pos-local) + (the-as vector (-> sv-116 vertex)) + (-> sv-116 vertex 1) + 409.59998 + ) + ) + (when #t + #t + (vector-segment-distance-point! + (-> this current-pos-local) + (the-as vector (-> sv-116 vertex)) + (-> sv-116 vertex 1) + (-> this virtual-current-pos-local) + ) + (vector-! (-> this travel) sv-112 (-> this virtual-current-pos-local)) + (set! (-> this travel y) 0.0) + 0 + ) + (set! (-> this virtual-current-poly) (-> sv-116 next-poly)) + (cond + ((get-route-portal (-> this mesh) (-> sv-116 next-poly) (-> this target-poly) sv-116) + (set! (-> this next-poly) (-> sv-116 next-poly)) + (set! (-> sv-120 0 quad) (-> sv-116 vertex 0 quad)) + (set! (-> sv-120 1 quad) (-> sv-116 vertex 1 quad)) + 0 + ) + (else + (set! (-> this next-poly) #f) + (set! sv-124 (the-as symbol #f)) + ) + ) + ) + ) + ) + (when sv-124 + (let ((s5-1 (new 'stack-no-clear 'matrix))) + (vector-! (-> s5-1 rvec) (-> sv-120 1) (-> sv-120 0)) + (vector-normalize! (-> s5-1 rvec) 409.6) + (vector+! (-> sv-120 0) (-> sv-120 0) (-> s5-1 rvec)) + (vector-! (-> sv-120 1) (-> sv-120 1) (-> s5-1 rvec)) + ) + (when (not (ray-ccw-line-segment-intersection? + (-> this virtual-current-pos-local) + (-> this travel) + (-> sv-120 0) + (-> sv-120 1) + ) + ) + (let ((s5-2 -1)) + (let* ((f0-8 (cos 8192.0)) + (f0-10 (* f0-8 f0-8)) + (v1-93 (new 'stack-no-clear 'vector)) + (a0-39 (-> this travel)) + (f1-9 (+ (* (-> a0-39 x) (-> a0-39 x)) (* (-> a0-39 z) (-> a0-39 z)))) + ) + (countdown (a0-41 2) + (vector-! v1-93 (-> sv-120 a0-41) (-> this virtual-current-pos-local)) + (let ((f2-5 (vector-dot (-> this travel) v1-93))) + (when (< 0.0 f2-5) + (let* ((f2-7 (* f2-5 f2-5)) + (a1-26 v1-93) + (f2-8 (/ f2-7 (* f1-9 (+ (* (-> a1-26 x) (-> a1-26 x)) (* (-> a1-26 z) (-> a1-26 z)))))) + ) + (when (< f0-10 f2-8) + (set! f0-10 f2-8) + (set! s5-2 a0-41) + ) + ) + ) + ) + ) + ) + (when (= s5-2 -1) + (let ((f30-0 (the-as float #x7f800000)) + (s3-0 (new 'stack-no-clear 'nav-route-portal)) + (s4-1 (new 'stack-no-clear 'vector)) + ) + (get-route-portal (-> this mesh) (-> sv-116 next-poly) (-> this target-poly) s3-0) + (cond + ((-> s3-0 next-poly) + (vector+! s4-1 (the-as vector (-> s3-0 vertex)) (the-as vector (-> s3-0 vertex 1))) + (vector-float*! s4-1 s4-1 0.5) + ) + (else + (set! (-> s4-1 quad) (-> sv-112 quad)) + ) + ) + (countdown (s3-1 2) + (let* ((s2-0 (-> sv-120 s3-1)) + (f0-13 (+ (vector-vector-xz-distance-squared (-> this virtual-current-pos-local) s2-0) + (vector-vector-xz-distance-squared s4-1 s2-0) + ) + ) + ) + (when (< f0-13 f30-0) + (set! f30-0 f0-13) + (set! s5-2 s3-1) + ) + ) + ) + ) + ) + (vector-! (-> this travel) (-> sv-120 s5-2) (-> this virtual-current-pos-local)) + ) + (set! (-> this travel y) 0.0) + ) + ) + (.lvf vf1 (&-> (-> this travel) 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-117 vf1) + (let ((f0-15 v1-117) + (f1-10 (-> this nav nav-cull-radius)) + ) + (if (< (* f1-10 f1-10) f0-15) + (vector-float*! (-> this travel) (-> this travel) (/ (-> this nav nav-cull-radius) (sqrtf f0-15))) + ) + ) + 0 + (none) + ) + ) + +(defmethod navigate-using-best-dir-use-existing-avoid-spheres ((this nav-state) (arg0 nav-avoid-spheres-params)) + (local-vars + (sv-96 int) + (sv-104 nav-mesh-work) + (sv-108 nav-poly) + (sv-112 uint) + (sv-116 (pointer int8)) + (sv-120 (pointer int8)) + (sv-124 float) + (sv-128 float) + (sv-132 vector) + (sv-136 vector) + (sv-140 float) + (sv-144 float) + (sv-148 uint) + ) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (when (-> arg0 avoiding-sphere?) + (logior! (-> this flags) (nav-state-flag avoiding-sphere)) + (let ((f0-0 (-> arg0 closest-sphere-dist2)) + (f1-0 512.0) + ) + (if (< f0-0 (* f1-0 f1-0)) + (logior! (-> this flags) (nav-state-flag touching-sphere)) + ) + ) + (set! (-> this travel quad) (-> arg0 out-travel 0 quad)) + (let ((v1-10 (new 'stack-no-clear 'nav-ray))) + (set! (-> v1-10 current-pos quad) (-> this virtual-current-pos-local quad)) + (set! (-> v1-10 current-poly) (-> this virtual-current-poly)) + (vector+! (-> v1-10 dest-pos) (-> this virtual-current-pos-local) (-> this travel)) + (let ((a2-5 0)) + (let ((a3-3 v1-10)) + (vector-! (-> a3-3 dir) (-> a3-3 dest-pos) (-> a3-3 current-pos)) + (set! (-> a3-3 dir y) 0.0) + (let ((t0-3 (-> a3-3 dir))) + (let ((f0-2 1.0)) + (.lvf vf1 (&-> t0-3 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((t1-2 f0-2)) + (.mov vf3 t1-2) + ) + ) + (.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 (&-> t0-3 quad) vf1) + ) + (set! (-> a3-3 next-poly) #f) + (set! (-> a3-3 len) 0.0) + (set! (-> a3-3 last-edge) -1) + (set! (-> a3-3 terminated) #f) + (set! (-> a3-3 reached-dest) #f) + (set! (-> a3-3 hit-boundary) #f) + (set! (-> a3-3 hit-gap) #f) + (set! (-> a3-3 ignore) (the-as uint 3)) + ) + 0 + (until (or (>= a2-5 15) (-> v1-10 terminated)) + (+! a2-5 1) + (let ((t0-6 (-> this mesh)) + (a3-5 v1-10) + ) + (set! sv-96 -1) + (set! sv-104 (-> t0-6 work)) + (set! sv-108 (-> a3-5 current-poly)) + (set! sv-112 (-> a3-5 current-poly vertex-count)) + (set! sv-116 (-> t0-6 work vert0-table)) + (set! sv-120 (-> t0-6 work vert1-table)) + (set! sv-124 (- (-> a3-5 dest-pos x) (-> a3-5 current-pos x))) + (set! sv-128 (- (-> a3-5 dest-pos z) (-> a3-5 current-pos z))) + (dotimes (t1-12 (the-as int sv-112)) + (set! sv-132 (-> sv-108 vertex (-> sv-116 t1-12))) + (set! sv-136 (-> sv-108 vertex (-> sv-120 t1-12))) + (set! sv-140 (- (-> sv-132 z) (-> sv-136 z))) + (set! sv-144 (- (-> sv-136 x) (-> sv-132 x))) + (let ((f0-14 (+ (* sv-124 sv-140) (* sv-128 sv-144)))) + (when (< 0.0 f0-14) + (let ((f1-13 + (+ (* sv-140 (- (-> sv-132 x) (-> a3-5 current-pos x))) (* sv-144 (- (-> sv-132 z) (-> a3-5 current-pos z)))) + ) + ) + (when (< f1-13 f0-14) + (set! sv-96 t1-12) + (let ((f0-16 (fmax 0.0 (/ f1-13 f0-14)))) + (set! sv-124 (* sv-124 f0-16)) + (set! sv-128 (* sv-128 f0-16)) + ) + ) + ) + ) + ) + ) + (let ((f0-20 (+ (* sv-124 (-> a3-5 dir x)) (* sv-128 (-> a3-5 dir z))))) + (+! (-> a3-5 len) f0-20) + ) + 0 + (set! (-> a3-5 next-poly) #f) + (cond + ((= sv-96 -1) + (set! (-> a3-5 current-pos quad) (-> a3-5 dest-pos quad)) + (set! (-> a3-5 reached-dest) #t) + (set! (-> a3-5 terminated) #t) + ) + (else + (+! (-> a3-5 current-pos x) sv-124) + (+! (-> a3-5 current-pos z) sv-128) + (set! sv-148 (-> sv-108 adj-poly sv-96)) + (if (!= sv-148 255) + (set! (-> a3-5 next-poly) (-> t0-6 poly-array sv-148)) + ) + (cond + ((and (-> a3-5 next-poly) (not (logtest? (-> a3-5 next-poly pat) (-> a3-5 ignore)))) + (set! (-> a3-5 current-poly) (-> a3-5 next-poly)) + ) + (else + (set! (-> a3-5 last-edge) sv-96) + (if (-> a3-5 next-poly) + (set! (-> a3-5 hit-gap) #t) + (set! (-> a3-5 hit-boundary) #t) + ) + (set! (-> a3-5 terminated) #t) + ) + ) + ) + ) + ) + 0 + ) + ) + (cond + ((or (-> v1-10 reached-dest) (-> v1-10 hit-gap) (>= (-> v1-10 len) 4096.0)) + (set! (-> this travel quad) (-> arg0 out-travel 0 quad)) + ) + (else + (set! (-> this travel quad) (-> arg0 out-travel 1 quad)) + (logior! (-> this flags) (nav-state-flag trapped-by-sphere)) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod navigate-using-best-dir-recompute-avoid-spheres-1 ((this nav-state)) + (local-vars + (sv-192 int) + (sv-200 nav-mesh-work) + (sv-204 nav-poly) + (sv-208 uint) + (sv-212 (pointer int8)) + (sv-216 (pointer int8)) + (sv-220 float) + (sv-224 float) + (sv-228 vector) + (sv-232 vector) + (sv-236 float) + (sv-240 float) + (sv-244 uint) + ) + (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 (new 'stack-no-clear 'nav-avoid-spheres-params))) + (set! (-> s5-0 current-pos quad) (-> this virtual-current-pos-local quad)) + (set! (-> s5-0 travel quad) (-> this travel quad)) + (set! (-> s5-0 pref-dir quad) (-> (if (logtest? (-> this flags) (nav-state-flag trapped-by-sphere)) + (-> this heading) + (-> this travel) + ) + quad + ) + ) + (avoid-spheres-1! (-> this nav) s5-0) + (when (-> s5-0 avoiding-sphere?) + (logior! (-> this flags) (nav-state-flag avoiding-sphere)) + (let ((f0-0 (-> s5-0 closest-sphere-dist2)) + (f1-0 512.0) + ) + (if (< f0-0 (* f1-0 f1-0)) + (logior! (-> this flags) (nav-state-flag touching-sphere)) + ) + ) + (set! (-> this travel quad) (-> s5-0 out-travel 0 quad)) + (let ((v1-15 (new 'stack-no-clear 'nav-ray))) + (set! (-> v1-15 current-pos quad) (-> this virtual-current-pos-local quad)) + (set! (-> v1-15 current-poly) (-> this virtual-current-poly)) + (vector+! (-> v1-15 dest-pos) (-> this virtual-current-pos-local) (-> this travel)) + (let ((a0-15 0)) + (let ((a1-4 v1-15)) + (vector-! (-> a1-4 dir) (-> a1-4 dest-pos) (-> a1-4 current-pos)) + (set! (-> a1-4 dir y) 0.0) + (let ((a2-3 (-> a1-4 dir))) + (let ((f0-2 1.0)) + (.lvf vf1 (&-> a2-3 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a3-2 f0-2)) + (.mov vf3 a3-2) + ) + ) + (.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-3 quad) vf1) + ) + (set! (-> a1-4 next-poly) #f) + (set! (-> a1-4 len) 0.0) + (set! (-> a1-4 last-edge) -1) + (set! (-> a1-4 terminated) #f) + (set! (-> a1-4 reached-dest) #f) + (set! (-> a1-4 hit-boundary) #f) + (set! (-> a1-4 hit-gap) #f) + (set! (-> a1-4 ignore) (the-as uint 3)) + ) + 0 + (until (or (>= a0-15 15) (-> v1-15 terminated)) + (+! a0-15 1) + (let ((a2-6 (-> this mesh)) + (a1-6 v1-15) + ) + (set! sv-192 -1) + (set! sv-200 (-> a2-6 work)) + (set! sv-204 (-> a1-6 current-poly)) + (set! sv-208 (-> a1-6 current-poly vertex-count)) + (set! sv-212 (-> a2-6 work vert0-table)) + (set! sv-216 (-> a2-6 work vert1-table)) + (set! sv-220 (- (-> a1-6 dest-pos x) (-> a1-6 current-pos x))) + (set! sv-224 (- (-> a1-6 dest-pos z) (-> a1-6 current-pos z))) + (dotimes (a3-12 (the-as int sv-208)) + (set! sv-228 (-> sv-204 vertex (-> sv-212 a3-12))) + (set! sv-232 (-> sv-204 vertex (-> sv-216 a3-12))) + (set! sv-236 (- (-> sv-228 z) (-> sv-232 z))) + (set! sv-240 (- (-> sv-232 x) (-> sv-228 x))) + (let ((f0-14 (+ (* sv-220 sv-236) (* sv-224 sv-240)))) + (when (< 0.0 f0-14) + (let ((f1-13 + (+ (* sv-236 (- (-> sv-228 x) (-> a1-6 current-pos x))) (* sv-240 (- (-> sv-228 z) (-> a1-6 current-pos z)))) + ) + ) + (when (< f1-13 f0-14) + (set! sv-192 a3-12) + (let ((f0-16 (fmax 0.0 (/ f1-13 f0-14)))) + (set! sv-220 (* sv-220 f0-16)) + (set! sv-224 (* sv-224 f0-16)) + ) + ) + ) + ) + ) + ) + (let ((f0-20 (+ (* sv-220 (-> a1-6 dir x)) (* sv-224 (-> a1-6 dir z))))) + (+! (-> a1-6 len) f0-20) + ) + 0 + (set! (-> a1-6 next-poly) #f) + (cond + ((= sv-192 -1) + (set! (-> a1-6 current-pos quad) (-> a1-6 dest-pos quad)) + (set! (-> a1-6 reached-dest) #t) + (set! (-> a1-6 terminated) #t) + ) + (else + (+! (-> a1-6 current-pos x) sv-220) + (+! (-> a1-6 current-pos z) sv-224) + (set! sv-244 (-> sv-204 adj-poly sv-192)) + (if (!= sv-244 255) + (set! (-> a1-6 next-poly) (-> a2-6 poly-array sv-244)) + ) + (cond + ((and (-> a1-6 next-poly) (not (logtest? (-> a1-6 next-poly pat) (-> a1-6 ignore)))) + (set! (-> a1-6 current-poly) (-> a1-6 next-poly)) + ) + (else + (set! (-> a1-6 last-edge) sv-192) + (if (-> a1-6 next-poly) + (set! (-> a1-6 hit-gap) #t) + (set! (-> a1-6 hit-boundary) #t) + ) + (set! (-> a1-6 terminated) #t) + ) + ) + ) + ) + ) + 0 + ) + ) + (cond + ((or (-> v1-15 reached-dest) (-> v1-15 hit-gap) (>= (-> v1-15 len) 4096.0)) + (set! (-> this travel quad) (-> s5-0 out-travel 0 quad)) + ) + (else + (set! (-> this travel quad) (-> s5-0 out-travel 1 quad)) + (logior! (-> this flags) (nav-state-flag trapped-by-sphere)) + ) + ) + ) + ) + ) + 0 + 0 + (none) + ) + ) + +(defmethod navigate-within-poly ((this nav-state)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (set! (-> this target-dir quad) (-> this travel quad)) + (let ((v1-1 (-> this target-dir))) + (let ((f0-0 1.0)) + (.lvf vf1 (&-> v1-1 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-4 f0-0)) + (.mov vf3 a0-4) + ) + ) + (.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-1 quad) vf1) + ) + (cond + ((logtest? (-> this nav flags) (nav-control-flag limit-rotation-rate)) + (let ((s5-0 (nav-state-method-39 this))) + (let* ((f0-1 40.96) + (f0-3 (* f0-1 f0-1)) + (v1-8 (-> this travel)) + ) + (when (< f0-3 (+ (* (-> v1-8 x) (-> v1-8 x)) (* (-> v1-8 z) (-> v1-8 z)))) + (set! (-> this heading quad) (-> this travel quad)) + (set! (-> this heading y) 0.0) + (let ((v1-12 (-> this heading))) + (let ((f0-5 1.0)) + (.lvf vf1 (&-> v1-12 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-9 f0-5)) + (.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-12 quad) vf1) + ) + ) + ) + (let ((f0-6 (find-first-sphere-and-update-avoid-params + (-> this nav) + (-> this travel) + (the-as nav-avoid-spheres-params #f) + ) + ) + ) + (when (>= f0-6 0.0) + (vector-float*! (-> this travel) (-> this travel) f0-6) + (let ((f0-7 (* f0-6 (-> this nav nav-cull-radius)))) + (if (and (not s5-0) (>= 40.96 f0-7)) + (logior! (-> this flags) (nav-state-flag blocked)) + ) + ) + ) + ) + ) + ) + (else + (let* ((f0-8 40.96) + (f0-10 (* f0-8 f0-8)) + (v1-26 (-> this travel)) + ) + (when (< f0-10 (+ (* (-> v1-26 x) (-> v1-26 x)) (* (-> v1-26 z) (-> v1-26 z)))) + (set! (-> this heading quad) (-> this travel quad)) + (set! (-> this heading y) 0.0) + (let ((v1-30 (-> this heading))) + (let ((f0-12 1.0)) + (.lvf vf1 (&-> v1-30 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-15 f0-12)) + (.mov vf3 a0-15) + ) + ) + (.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-30 quad) vf1) + ) + ) + ) + ) + ) + (if (not (logtest? (-> this flags) (nav-state-flag touching-sphere))) + (logclear! (-> this flags) (nav-state-flag trapped-by-sphere)) + ) + 0 + (none) + ) + ) + +(defmethod clamp-travel-vector ((this nav-state)) + (let ((s5-0 (new 'stack-no-clear 'clamp-travel-vector-to-mesh-return-info))) + (clamp-vector-to-mesh-cross-gaps + (-> this mesh) + (-> this virtual-current-pos-local) + (-> this virtual-current-poly) + (-> this travel) + (-> this mesh work nav-poly-min-dist) + (not (or (logtest? (-> this nav flags) (nav-control-flag no-redirect-in-clamp)) + (logtest? (-> this nav flags) (nav-control-flag limit-rotation-rate)) + ) + ) + s5-0 + ) + (when (-> s5-0 gap-poly) + (set! (-> this next-poly) (-> s5-0 gap-poly)) + (let* ((v1-12 (-> this travel)) + (f0-4 (+ (* (-> v1-12 x) (-> v1-12 x)) (* (-> v1-12 z) (-> v1-12 z)))) + (f1-3 1024.0) + ) + (if (< f0-4 (* f1-3 f1-3)) + (logior! (-> this flags) (nav-state-flag at-gap)) + ) + ) + ) + ) + (let ((v1-19 (new 'stack-no-clear 'vector))) + (vector-! v1-19 (-> this virtual-current-pos-local) (-> this current-pos-local)) + (vector+! (-> this travel) (-> this travel) v1-19) + ) + (set! (-> this travel y) 0.0) + 0 + (none) + ) + +(defmethod plan-over-pat1-polys-using-route ((this nav-state) (arg0 nav-gap-info)) + (local-vars (sv-48 vector) (sv-52 vector) (sv-56 number)) + (let ((a1-1 (-> this next-poly))) + (when (logtest? (-> a1-1 pat) 1) + (while (and a1-1 (logtest? (-> a1-1 pat) 1)) + (set! a1-1 (lookup-poly-on-route-to-target (-> this mesh) a1-1 (-> this target-poly))) + ) + (when (and a1-1 (!= a1-1 (-> this current-poly))) + (set! (-> arg0 poly) a1-1) + (-> this mesh) + (let ((s3-0 (-> arg0 poly)) + (s4-0 (-> arg0 dest)) + ) + (let ((s2-0 (-> this current-pos-local))) + (set! sv-48 (new 'stack-no-clear 'vector)) + (set! sv-52 (new 'stack-no-clear 'vector)) + (set! sv-56 10000000000000000000000000000000000000.0) + (let* ((s1-0 (-> s3-0 vertex-count)) + (v1-13 (the-as int (+ s1-0 -1))) + ) + (dotimes (s0-0 (the-as int s1-0)) + (let ((f0-1 (vector-segment-distance-point! s2-0 (-> s3-0 vertex v1-13) (-> s3-0 vertex s0-0) sv-48))) + (when (< f0-1 (the-as float sv-56)) + (set! sv-56 f0-1) + (set! (-> sv-52 quad) (-> sv-48 quad)) + ) + ) + (set! v1-13 s0-0) + ) + ) + ) + (set! (-> s4-0 quad) (-> sv-52 quad)) + ) + (vector+! (-> arg0 dest) (-> arg0 dest) (the-as vector (-> this mesh bounds))) + #t + ) + ) + ) + ) + +(defmethod turn-and-navigate-to-destination ((this nav-state)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (set! (-> this rotation-rate) (-> this nav max-rotation-rate)) + (if (< 0.0 (-> this speed)) + (set! (-> this rotation-rate) + (fmin + (-> this rotation-rate) + (* (/ (-> this nav turning-acceleration) (-> this speed)) (-> this mesh work rad-to-deg)) + ) + ) + ) + (when (logtest? (-> this nav flags) (nav-control-flag update-heading-from-facing)) + (vector-z-quaternion! (-> this heading) (-> this nav shape quat)) + (set! (-> this heading y) 0.0) + (let ((v1-12 (-> this heading))) + (let ((f0-5 1.0)) + (.lvf vf1 (&-> v1-12 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-3 f0-5)) + (.mov vf3 a0-3) + ) + ) + (.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-12 quad) vf1) + ) + ) + (let ((v1-13 (new 'stack-no-clear 'inline-array 'vector 1))) + (if (logtest? (-> this flags) (nav-state-flag use-position)) + (set! (-> v1-13 0 quad) (-> this virtual-current-pos-local quad)) + (set! (-> v1-13 0 quad) (-> this nav shape trans quad)) + ) + (if (or (not (-> this current-poly)) + (!= (-> this current-pos x) (-> v1-13 0 x)) + (!= (-> this current-pos z) (-> v1-13 0 z)) + ) + (do-navigation-to-destination this (-> v1-13 0)) + ) + ) + (logclear! + (-> this flags) + (nav-state-flag blocked in-target-poly at-target avoiding-sphere touching-sphere at-gap use-position) + ) + 0 + (none) + ) + ) + +(defmethod navigate-using-route-portals-wrapper ((this nav-state)) + (navigate-using-route-portals this) + 0 + (none) + ) + +(defmethod navigate-using-best-dir-recompute-avoid-spheres-1-wrapper ((this nav-state)) + (navigate-using-best-dir-recompute-avoid-spheres-1 this) + 0 + (none) + ) + +(defmethod navigate-within-poly-wrapper ((this nav-state)) + (navigate-within-poly this) + 0 + (none) + ) + +(defmethod compute-travel-speed ((this nav-state)) + (local-vars (sv-192 float) (sv-196 float) (sv-200 float) (sv-204 float) (sv-224 vector)) + (let ((s5-0 this)) + (let ((s4-0 (new 'stack-no-clear 'clamp-travel-vector-to-mesh-return-info))) + (clamp-vector-to-mesh-cross-gaps + (-> s5-0 mesh) + (-> s5-0 virtual-current-pos-local) + (-> s5-0 virtual-current-poly) + (-> s5-0 travel) + (-> s5-0 mesh work nav-poly-min-dist) + (not (or (logtest? (-> s5-0 nav flags) (nav-control-flag no-redirect-in-clamp)) + (logtest? (-> s5-0 nav flags) (nav-control-flag limit-rotation-rate)) + ) + ) + s4-0 + ) + (when (-> s4-0 gap-poly) + (set! (-> s5-0 next-poly) (-> s4-0 gap-poly)) + (let* ((v1-12 (-> s5-0 travel)) + (f0-4 (+ (* (-> v1-12 x) (-> v1-12 x)) (* (-> v1-12 z) (-> v1-12 z)))) + (f1-3 1024.0) + ) + (if (< f0-4 (* f1-3 f1-3)) + (logior! (-> s5-0 flags) (nav-state-flag at-gap)) + ) + ) + ) + ) + (let ((v1-19 (new 'stack-no-clear 'vector))) + (vector-! v1-19 (-> s5-0 virtual-current-pos-local) (-> s5-0 current-pos-local)) + (vector+! (-> s5-0 travel) (-> s5-0 travel) v1-19) + ) + (set! (-> s5-0 travel y) 0.0) + ) + 0 + (cond + ((logtest? (-> this nav flags) (nav-control-flag use-momentum)) + (set! sv-192 (-> this nav target-speed)) + (if (not (logtest? (-> this nav flags) (nav-control-flag momentum-ignore-heading))) + (set! sv-192 (* sv-192 (fmax 0.0 (vector-dot (-> this heading) (-> this target-dir))))) + ) + (set! sv-196 (- sv-192 (-> this speed))) + (set! sv-200 (* (-> this nav sec-per-frame) (-> this nav acceleration))) + (set! sv-204 (fmin sv-200 (fabs sv-196))) + (if (< sv-196 0.0) + (set! (-> this speed) (- (-> this speed) sv-204)) + (+! (-> this speed) sv-204) + ) + ) + (else + (set! (-> this speed) (-> this nav target-speed)) + ) + ) + (let* ((f0-22 (/ (vector-length (-> this travel)) (-> this nav sec-per-frame))) + (f1-18 (fmin (* (-> this nav speed-scale) (-> this speed)) f0-22)) + ) + (set! sv-224 (new 'stack-no-clear 'vector)) + (when (< f0-22 (-> this speed)) + (set! (-> this prev-speed) (-> this speed)) + (set! (-> this speed) (/ f0-22 (-> this nav speed-scale))) + ) + (vector-normalize-copy! sv-224 (-> this travel) f1-18) + ) + (set! (-> this velocity x) (-> sv-224 x)) + (set! (-> this velocity z) (-> sv-224 z)) + 0 + (none) + ) + +(defmethod navigate-v1! ((this nav-state)) + (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 this)) + (set! (-> s5-0 rotation-rate) (-> s5-0 nav max-rotation-rate)) + (if (< 0.0 (-> s5-0 speed)) + (set! (-> s5-0 rotation-rate) + (fmin + (-> s5-0 rotation-rate) + (* (/ (-> s5-0 nav turning-acceleration) (-> s5-0 speed)) (-> s5-0 mesh work rad-to-deg)) + ) + ) + ) + (when (logtest? (-> s5-0 nav flags) (nav-control-flag update-heading-from-facing)) + (vector-z-quaternion! (-> s5-0 heading) (-> s5-0 nav shape quat)) + (set! (-> s5-0 heading y) 0.0) + (let ((v1-12 (-> s5-0 heading))) + (let ((f0-5 1.0)) + (.lvf vf1 (&-> v1-12 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-3 f0-5)) + (.mov vf3 a0-3) + ) + ) + (.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-12 quad) vf1) + ) + ) + (let ((v1-13 (new 'stack-no-clear 'inline-array 'vector 1))) + (if (logtest? (-> s5-0 flags) (nav-state-flag use-position)) + (set! (-> v1-13 0 quad) (-> s5-0 virtual-current-pos-local quad)) + (set! (-> v1-13 0 quad) (-> s5-0 nav shape trans quad)) + ) + (if (or (not (-> s5-0 current-poly)) + (!= (-> s5-0 current-pos x) (-> v1-13 0 x)) + (!= (-> s5-0 current-pos z) (-> v1-13 0 z)) + ) + (do-navigation-to-destination s5-0 (-> v1-13 0)) + ) + ) + (logclear! + (-> s5-0 flags) + (nav-state-flag blocked in-target-poly at-target avoiding-sphere touching-sphere at-gap use-position) + ) + ) + 0 + (navigate-using-route-portals this) + 0 + (let* ((v1-20 (-> this nav)) + (a0-18 (-> v1-20 state mesh sphere-hash sphere-array)) + (a1-9 (-> v1-20 sphere-id-array)) + (a2-1 (-> v1-20 state mesh bounds)) + (a3-0 (-> v1-20 root-nav-sphere)) + (t0-0 (-> v1-20 sphere-count)) + ) + (dotimes (t1-0 t0-0) + (let ((t3-0 (-> a0-18 (-> a1-9 t1-0))) + (t2-4 (-> v1-20 sphere-array t1-0)) + ) + (vector-! (the-as vector t2-4) (the-as vector t3-0) (the-as vector a2-1)) + (set! (-> t2-4 r) (+ (-> t3-0 r) (-> a3-0 w))) + ) + ) + ) + 0 + (navigate-using-best-dir-recompute-avoid-spheres-1 this) + 0 + (navigate-within-poly this) + 0 + (compute-travel-speed this) + 0 + (none) + ) + ) + +(defmethod reset-target! ((this nav-state)) + (vector-reset! (-> this target-dir)) + 0 + (none) + ) + +(defmethod add-offset-to-target! ((this nav-state) (arg0 vector)) + (vector+! (-> this target-dir) (-> this target-dir) arg0) + 0 + (none) + ) + +(defmethod nav-state-method-29 ((this nav-state)) + 0 + (none) + ) + +(defmethod nav-state-method-30 ((this nav-state)) + 0 + (none) + ) + +(defmethod navigate-using-best-dir-recompute-avoid-spheres-2 ((this nav-state)) + (local-vars + (sv-192 int) + (sv-200 nav-mesh-work) + (sv-204 nav-poly) + (sv-208 uint) + (sv-212 (pointer int8)) + (sv-216 (pointer int8)) + (sv-220 float) + (sv-224 float) + (sv-228 vector) + (sv-232 vector) + (sv-236 float) + (sv-240 float) + (sv-244 uint) + ) + (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 (new 'stack-no-clear 'nav-avoid-spheres-params))) + (set! (-> s5-0 current-pos quad) (-> this virtual-current-pos-local quad)) + (set! (-> s5-0 travel quad) (-> this travel quad)) + (set! (-> s5-0 pref-dir quad) (-> (if (logtest? (-> this flags) (nav-state-flag trapped-by-sphere)) + (-> this heading) + (-> this travel) + ) + quad + ) + ) + (avoid-spheres-2! (-> this nav) s5-0) + (let ((v1-5 this)) + (when (-> s5-0 avoiding-sphere?) + (logior! (-> v1-5 flags) (nav-state-flag avoiding-sphere)) + (let ((f0-0 (-> s5-0 closest-sphere-dist2)) + (f1-0 512.0) + ) + (if (< f0-0 (* f1-0 f1-0)) + (logior! (-> v1-5 flags) (nav-state-flag touching-sphere)) + ) + ) + (set! (-> v1-5 travel quad) (-> s5-0 out-travel 0 quad)) + (let ((a0-20 (new 'stack-no-clear 'nav-ray))) + (set! (-> a0-20 current-pos quad) (-> v1-5 virtual-current-pos-local quad)) + (set! (-> a0-20 current-poly) (-> v1-5 virtual-current-poly)) + (vector+! (-> a0-20 dest-pos) (-> v1-5 virtual-current-pos-local) (-> v1-5 travel)) + (let ((a1-6 0)) + (let ((a2-3 a0-20)) + (vector-! (-> a2-3 dir) (-> a2-3 dest-pos) (-> a2-3 current-pos)) + (set! (-> a2-3 dir y) 0.0) + (let ((a3-3 (-> a2-3 dir))) + (let ((f0-2 1.0)) + (.lvf vf1 (&-> a3-3 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((t0-2 f0-2)) + (.mov vf3 t0-2) + ) + ) + (.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 (&-> a3-3 quad) vf1) + ) + (set! (-> a2-3 next-poly) #f) + (set! (-> a2-3 len) 0.0) + (set! (-> a2-3 last-edge) -1) + (set! (-> a2-3 terminated) #f) + (set! (-> a2-3 reached-dest) #f) + (set! (-> a2-3 hit-boundary) #f) + (set! (-> a2-3 hit-gap) #f) + (set! (-> a2-3 ignore) (the-as uint 3)) + ) + 0 + (until (or (>= a1-6 15) (-> a0-20 terminated)) + (+! a1-6 1) + (let ((a3-6 (-> v1-5 mesh)) + (a2-5 a0-20) + ) + (set! sv-192 -1) + (set! sv-200 (-> a3-6 work)) + (set! sv-204 (-> a2-5 current-poly)) + (set! sv-208 (-> a2-5 current-poly vertex-count)) + (set! sv-212 (-> a3-6 work vert0-table)) + (set! sv-216 (-> a3-6 work vert1-table)) + (set! sv-220 (- (-> a2-5 dest-pos x) (-> a2-5 current-pos x))) + (set! sv-224 (- (-> a2-5 dest-pos z) (-> a2-5 current-pos z))) + (dotimes (t0-12 (the-as int sv-208)) + (set! sv-228 (-> sv-204 vertex (-> sv-212 t0-12))) + (set! sv-232 (-> sv-204 vertex (-> sv-216 t0-12))) + (set! sv-236 (- (-> sv-228 z) (-> sv-232 z))) + (set! sv-240 (- (-> sv-232 x) (-> sv-228 x))) + (let ((f0-14 (+ (* sv-220 sv-236) (* sv-224 sv-240)))) + (when (< 0.0 f0-14) + (let ((f1-13 + (+ (* sv-236 (- (-> sv-228 x) (-> a2-5 current-pos x))) (* sv-240 (- (-> sv-228 z) (-> a2-5 current-pos z)))) + ) + ) + (when (< f1-13 f0-14) + (set! sv-192 t0-12) + (let ((f0-16 (fmax 0.0 (/ f1-13 f0-14)))) + (set! sv-220 (* sv-220 f0-16)) + (set! sv-224 (* sv-224 f0-16)) + ) + ) + ) + ) + ) + ) + (let ((f0-20 (+ (* sv-220 (-> a2-5 dir x)) (* sv-224 (-> a2-5 dir z))))) + (+! (-> a2-5 len) f0-20) + ) + 0 + (set! (-> a2-5 next-poly) #f) + (cond + ((= sv-192 -1) + (set! (-> a2-5 current-pos quad) (-> a2-5 dest-pos quad)) + (set! (-> a2-5 reached-dest) #t) + (set! (-> a2-5 terminated) #t) + ) + (else + (+! (-> a2-5 current-pos x) sv-220) + (+! (-> a2-5 current-pos z) sv-224) + (set! sv-244 (-> sv-204 adj-poly sv-192)) + (if (!= sv-244 255) + (set! (-> a2-5 next-poly) (-> a3-6 poly-array sv-244)) + ) + (cond + ((and (-> a2-5 next-poly) (not (logtest? (-> a2-5 next-poly pat) (-> a2-5 ignore)))) + (set! (-> a2-5 current-poly) (-> a2-5 next-poly)) + ) + (else + (set! (-> a2-5 last-edge) sv-192) + (if (-> a2-5 next-poly) + (set! (-> a2-5 hit-gap) #t) + (set! (-> a2-5 hit-boundary) #t) + ) + (set! (-> a2-5 terminated) #t) + ) + ) + ) + ) + ) + 0 + ) + ) + (cond + ((or (-> a0-20 reached-dest) (-> a0-20 hit-gap) (>= (-> a0-20 len) 4096.0)) + (set! (-> v1-5 travel quad) (-> s5-0 out-travel 0 quad)) + ) + (else + (set! (-> v1-5 travel quad) (-> s5-0 out-travel 1 quad)) + (logior! (-> v1-5 flags) (nav-state-flag trapped-by-sphere)) + ) + ) + ) + ) + ) + ) + 0 + (if (not (logtest? (-> this flags) (nav-state-flag touching-sphere))) + (logclear! (-> this flags) (nav-state-flag trapped-by-sphere)) + ) + 0 + (none) + ) + ) + +(defmethod update-travel-dir-from-spheres ((this nav-state)) + (local-vars (v1-11 float) (v1-25 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'nav-control-cfs-work))) + (vector-reset! (-> s5-0 in-dir)) + (set! (-> s5-0 best-dir 0 quad) (-> this travel quad)) + (set! (-> s5-0 best-dir 0 y) 0.0) + (vector-normalize! (the-as vector (-> s5-0 best-dir)) (-> this nav target-speed)) + (vector-! (-> s5-0 right-dir) (the-as vector (-> s5-0 best-dir)) (-> this velocity)) + (vector-float*! (-> s5-0 right-dir) (-> s5-0 right-dir) 4.0) + (vector+! (-> s5-0 in-dir) (-> s5-0 in-dir) (-> s5-0 right-dir)) + (dotimes (s4-0 (-> this nav sphere-count)) + (let ((s3-0 (-> this nav sphere-array s4-0))) + (vector-! (-> s5-0 right-dir) (-> this current-pos-local) (the-as vector s3-0)) + (.lvf vf1 (&-> (-> s5-0 right-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-11 vf1) + (let ((f30-0 v1-11)) + (vector-normalize! (-> s5-0 right-dir) 2.0) + (let* ((f0-4 (+ (-> this nav root-nav-sphere w) (-> s3-0 r))) + (f1-1 (* f0-4 f0-4)) + (f0-7 (fmax 0.0 (/ (- f1-1 f30-0) f1-1))) + ) + (vector-float*! (-> s5-0 right-dir) (-> s5-0 right-dir) (* 81920.0 f0-7)) + ) + ) + ) + (vector+! (-> s5-0 in-dir) (-> s5-0 in-dir) (-> s5-0 right-dir)) + ) + (vector+! (-> this target-dir) (-> this target-dir) (-> s5-0 in-dir)) + ) + (set! (-> this target-dir y) 0.0) + (vector+float*! (-> this velocity) (-> this velocity) (-> this target-dir) (-> this nav sec-per-frame)) + (.lvf vf1 (&-> (-> this 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) + (let ((f0-11 v1-25) + (f1-4 (-> this nav target-speed)) + ) + (if (< (* f1-4 f1-4) f0-11) + (vector-float*! (-> this velocity) (-> this velocity) (/ (-> this nav target-speed) (sqrtf f0-11))) + ) + ) + (vector-float*! (-> this travel) (-> this velocity) (-> this nav sec-per-frame)) + 0 + (none) + ) + ) + +(defmethod compute-speed-simple ((this nav-state)) + (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 (new 'stack-no-clear 'clamp-travel-vector-to-mesh-return-info))) + (clamp-vector-to-mesh-cross-gaps + (-> this mesh) + (-> this virtual-current-pos-local) + (-> this virtual-current-poly) + (-> this travel) + (-> this mesh work nav-poly-min-dist) + #t + s5-0 + ) + (if (-> s5-0 gap-poly) + (set! (-> this next-poly) (-> s5-0 gap-poly)) + ) + ) + (let* ((f0-1 40.96) + (f0-3 (* f0-1 f0-1)) + (v1-9 (-> this travel)) + ) + (when (< f0-3 (+ (* (-> v1-9 x) (-> v1-9 x)) (* (-> v1-9 z) (-> v1-9 z)))) + (set! (-> this heading quad) (-> this travel quad)) + (set! (-> this heading y) 0.0) + (let ((v1-13 (-> this heading))) + (let ((f0-5 1.0)) + (.lvf vf1 (&-> v1-13 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-5 f0-5)) + (.mov vf3 a0-5) + ) + ) + (.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-13 quad) vf1) + ) + ) + ) + (vector-float*! (-> this velocity) (-> this travel) (/ 1.0 (-> this nav sec-per-frame))) + (set! (-> this speed) (vector-length (-> this velocity))) + (vector-reset! (-> this target-dir)) + 0 + (none) + ) + ) + +(defmethod navigate-v2! ((this nav-state)) + (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 this)) + (set! (-> s5-0 rotation-rate) (-> s5-0 nav max-rotation-rate)) + (if (< 0.0 (-> s5-0 speed)) + (set! (-> s5-0 rotation-rate) + (fmin + (-> s5-0 rotation-rate) + (* (/ (-> s5-0 nav turning-acceleration) (-> s5-0 speed)) (-> s5-0 mesh work rad-to-deg)) + ) + ) + ) + (when (logtest? (-> s5-0 nav flags) (nav-control-flag update-heading-from-facing)) + (vector-z-quaternion! (-> s5-0 heading) (-> s5-0 nav shape quat)) + (set! (-> s5-0 heading y) 0.0) + (let ((v1-12 (-> s5-0 heading))) + (let ((f0-5 1.0)) + (.lvf vf1 (&-> v1-12 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-3 f0-5)) + (.mov vf3 a0-3) + ) + ) + (.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-12 quad) vf1) + ) + ) + (let ((v1-13 (new 'stack-no-clear 'inline-array 'vector 1))) + (if (logtest? (-> s5-0 flags) (nav-state-flag use-position)) + (set! (-> v1-13 0 quad) (-> s5-0 virtual-current-pos-local quad)) + (set! (-> v1-13 0 quad) (-> s5-0 nav shape trans quad)) + ) + (if (or (not (-> s5-0 current-poly)) + (!= (-> s5-0 current-pos x) (-> v1-13 0 x)) + (!= (-> s5-0 current-pos z) (-> v1-13 0 z)) + ) + (do-navigation-to-destination s5-0 (-> v1-13 0)) + ) + ) + (logclear! + (-> s5-0 flags) + (nav-state-flag blocked in-target-poly at-target avoiding-sphere touching-sphere at-gap use-position) + ) + ) + 0 + (navigate-using-route-portals this) + 0 + (let* ((v1-20 (-> this nav)) + (a0-18 (-> v1-20 state mesh sphere-hash sphere-array)) + (a1-9 (-> v1-20 sphere-id-array)) + (a2-1 (-> v1-20 state mesh bounds)) + (a3-0 (-> v1-20 root-nav-sphere)) + (t0-0 (-> v1-20 sphere-count)) + ) + (dotimes (t1-0 t0-0) + (let ((t3-0 (-> a0-18 (-> a1-9 t1-0))) + (t2-4 (-> v1-20 sphere-array t1-0)) + ) + (vector-! (the-as vector t2-4) (the-as vector t3-0) (the-as vector a2-1)) + (set! (-> t2-4 r) (+ (-> t3-0 r) (-> a3-0 w))) + ) + ) + ) + 0 + (navigate-using-best-dir-recompute-avoid-spheres-2 this) + (update-travel-dir-from-spheres this) + (compute-speed-simple this) + 0 + (none) + ) + ) + +(define *null-nav-callback-info* (new 'static 'nav-callback-info)) + +(define *default-nav-callback-info* + (new 'static 'nav-callback-info + :callback-count 5 + :callback-array (new 'static 'array (function object nav-control none) 10 + (lambda ((arg0 object) (arg1 nav-control)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (-> arg1 state))) + (set! (-> gp-0 rotation-rate) (-> gp-0 nav max-rotation-rate)) + (if (< 0.0 (-> gp-0 speed)) + (set! (-> gp-0 rotation-rate) + (fmin + (-> gp-0 rotation-rate) + (* (/ (-> gp-0 nav turning-acceleration) (-> gp-0 speed)) (-> gp-0 mesh work rad-to-deg)) + ) + ) + ) + (when (logtest? (-> gp-0 nav flags) (nav-control-flag update-heading-from-facing)) + (vector-z-quaternion! (-> gp-0 heading) (-> gp-0 nav shape quat)) + (set! (-> gp-0 heading y) 0.0) + (let ((v1-12 (-> gp-0 heading))) + (let ((f0-5 1.0)) + (.lvf vf1 (&-> v1-12 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-3 f0-5)) + (.mov vf3 a0-3) + ) + ) + (.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-12 quad) vf1) + ) + ) + (let ((v1-13 (new 'stack-no-clear 'inline-array 'vector 1))) + (if (logtest? (-> gp-0 flags) (nav-state-flag use-position)) + (set! (-> v1-13 0 quad) (-> gp-0 virtual-current-pos-local quad)) + (set! (-> v1-13 0 quad) (-> gp-0 nav shape trans quad)) + ) + (if (or (not (-> gp-0 current-poly)) + (!= (-> gp-0 current-pos x) (-> v1-13 0 x)) + (!= (-> gp-0 current-pos z) (-> v1-13 0 z)) + ) + (do-navigation-to-destination gp-0 (-> v1-13 0)) + ) + ) + (logclear! + (-> gp-0 flags) + (nav-state-flag blocked in-target-poly at-target avoiding-sphere touching-sphere at-gap use-position) + ) + ) + 0 + 0 + (none) + ) + ) + (lambda ((arg0 object) (arg1 nav-control)) (navigate-using-route-portals (-> arg1 state)) 0 0 (none)) + (lambda ((arg0 object) (arg1 nav-control)) + (let* ((v1-0 arg1) + (a0-3 (-> v1-0 state mesh sphere-hash sphere-array)) + (a2-0 (-> v1-0 sphere-id-array)) + (a3-1 (-> v1-0 state mesh bounds)) + (t0-0 (-> v1-0 root-nav-sphere)) + (t1-0 (-> v1-0 sphere-count)) + ) + (dotimes (t2-0 t1-0) + (let ((t4-0 (-> a0-3 (-> a2-0 t2-0))) + (t3-4 (-> v1-0 sphere-array t2-0)) + ) + (vector-! (the-as vector t3-4) (the-as vector t4-0) (the-as vector a3-1)) + (set! (-> t3-4 r) (+ (-> t4-0 r) (-> t0-0 w))) + ) + ) + ) + 0 + (navigate-using-best-dir-recompute-avoid-spheres-1 (-> arg1 state)) + 0 + (none) + ) + (lambda ((arg0 object) (arg1 nav-control)) + (let* ((v1-0 arg1) + (a0-3 (-> v1-0 state mesh sphere-hash sphere-array)) + (a2-0 (-> v1-0 sphere-id-array)) + (a3-1 (-> v1-0 state mesh bounds)) + (t0-0 (-> v1-0 root-nav-sphere)) + (t1-0 (-> v1-0 sphere-count)) + ) + (dotimes (t2-0 t1-0) + (let ((t4-0 (-> a0-3 (-> a2-0 t2-0))) + (t3-4 (-> v1-0 sphere-array t2-0)) + ) + (vector-! (the-as vector t3-4) (the-as vector t4-0) (the-as vector a3-1)) + (set! (-> t3-4 r) (+ (-> t4-0 r) (-> t0-0 w))) + ) + ) + ) + 0 + (navigate-within-poly (-> arg1 state)) + 0 + 0 + (none) + ) + (lambda ((arg0 object) (arg1 nav-control)) (compute-travel-speed (-> arg1 state)) 0 (none)) + ) + ) + ) + +(define *physics-nav-callback-info* + (new 'static 'nav-callback-info + :callback-count 5 + :callback-array (new 'static 'array (function object nav-control none) 10 + (lambda ((arg0 object) (arg1 nav-control)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (-> arg1 state))) + (set! (-> gp-0 rotation-rate) (-> gp-0 nav max-rotation-rate)) + (if (< 0.0 (-> gp-0 speed)) + (set! (-> gp-0 rotation-rate) + (fmin + (-> gp-0 rotation-rate) + (* (/ (-> gp-0 nav turning-acceleration) (-> gp-0 speed)) (-> gp-0 mesh work rad-to-deg)) + ) + ) + ) + (when (logtest? (-> gp-0 nav flags) (nav-control-flag update-heading-from-facing)) + (vector-z-quaternion! (-> gp-0 heading) (-> gp-0 nav shape quat)) + (set! (-> gp-0 heading y) 0.0) + (let ((v1-12 (-> gp-0 heading))) + (let ((f0-5 1.0)) + (.lvf vf1 (&-> v1-12 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-3 f0-5)) + (.mov vf3 a0-3) + ) + ) + (.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-12 quad) vf1) + ) + ) + (let ((v1-13 (new 'stack-no-clear 'inline-array 'vector 1))) + (if (logtest? (-> gp-0 flags) (nav-state-flag use-position)) + (set! (-> v1-13 0 quad) (-> gp-0 virtual-current-pos-local quad)) + (set! (-> v1-13 0 quad) (-> gp-0 nav shape trans quad)) + ) + (if (or (not (-> gp-0 current-poly)) + (!= (-> gp-0 current-pos x) (-> v1-13 0 x)) + (!= (-> gp-0 current-pos z) (-> v1-13 0 z)) + ) + (do-navigation-to-destination gp-0 (-> v1-13 0)) + ) + ) + (logclear! + (-> gp-0 flags) + (nav-state-flag blocked in-target-poly at-target avoiding-sphere touching-sphere at-gap use-position) + ) + ) + 0 + 0 + (none) + ) + ) + (lambda ((arg0 object) (arg1 nav-control)) (navigate-using-route-portals (-> arg1 state)) 0 0 (none)) + (lambda ((arg0 object) (arg1 nav-control)) + (let* ((v1-0 arg1) + (a0-3 (-> v1-0 state mesh sphere-hash sphere-array)) + (a2-0 (-> v1-0 sphere-id-array)) + (a3-1 (-> v1-0 state mesh bounds)) + (t0-0 (-> v1-0 root-nav-sphere)) + (t1-0 (-> v1-0 sphere-count)) + ) + (dotimes (t2-0 t1-0) + (let ((t4-0 (-> a0-3 (-> a2-0 t2-0))) + (t3-4 (-> v1-0 sphere-array t2-0)) + ) + (vector-! (the-as vector t3-4) (the-as vector t4-0) (the-as vector a3-1)) + (set! (-> t3-4 r) (+ (-> t4-0 r) (-> t0-0 w))) + ) + ) + ) + 0 + (navigate-using-best-dir-recompute-avoid-spheres-2 (-> arg1 state)) + 0 + (none) + ) + (lambda ((arg0 object) (arg1 nav-control)) + (let* ((v1-0 arg1) + (a0-3 (-> v1-0 state mesh sphere-hash sphere-array)) + (a2-0 (-> v1-0 sphere-id-array)) + (a3-1 (-> v1-0 state mesh bounds)) + (t0-0 (-> v1-0 root-nav-sphere)) + (t1-0 (-> v1-0 sphere-count)) + ) + (dotimes (t2-0 t1-0) + (let ((t4-0 (-> a0-3 (-> a2-0 t2-0))) + (t3-4 (-> v1-0 sphere-array t2-0)) + ) + (vector-! (the-as vector t3-4) (the-as vector t4-0) (the-as vector a3-1)) + (set! (-> t3-4 r) (+ (-> t4-0 r) (-> t0-0 w))) + ) + ) + ) + 0 + (update-travel-dir-from-spheres (-> arg1 state)) + 0 + (none) + ) + (lambda ((arg0 object) (arg1 nav-control)) (compute-speed-simple (-> arg1 state)) 0 (none)) + ) + ) + ) diff --git a/goal_src/jak3/engine/nav/nav-enemy-h.gc b/goal_src/jak3/engine/nav/nav-enemy-h.gc index fbfff86b92..b33cb8aad9 100644 --- a/goal_src/jak3/engine/nav/nav-enemy-h.gc +++ b/goal_src/jak3/engine/nav/nav-enemy-h.gc @@ -7,3 +7,93 @@ ;; DECOMP BEGINS +(deftype nav-enemy-info (enemy-info) + ((callback-info nav-callback-info) + (use-momentum symbol) + (use-frustration symbol) + (use-stop-chase symbol) + (use-circling symbol) + (use-pacing symbol) + (walk-anim int32) + (turn-anim int32) + (run-anim int32) + (taunt-anim int32) + (run-travel-speed meters) + (run-acceleration meters) + (run-turning-acceleration meters) + (walk-travel-speed meters) + (walk-acceleration meters) + (walk-turning-acceleration meters) + (maximum-rotation-rate degrees) + (notice-nav-radius meters) + (frustration-distance meters) + (frustration-time time-frame) + (blocked-time time-frame) + (circle-dist-lo float) + (circle-dist-hi float) + (nav-mesh nav-mesh) + ) + (:methods + (copy! (_type_ nav-enemy-info) none) + ) + ) + + +(deftype nav-enemy (enemy) + ((enemy-info nav-enemy-info :override) + (frustration-point vector :inline) + (move-dest vector :inline) + (frustration-time time-frame) + (blocked-start-time time-frame) + (restore-nav-radius-time time-frame) + (nav-radius-backup float) + (circle-radial-dist float :overlay-at desired-angle) + ) + (:state-methods + taunt + pacing + circling + stop-chase + debug-control + ) + (:methods + (normalize-heading! (_type_ nav-control) none) + (nav-enemy-method-161 (_type_ nav-control) none) + (nav-enemy-method-162 (_type_) none) + (nav-enemy-method-163 (_type_) none) + (nav-enemy-method-164 (_type_) none) + (nav-enemy-method-165 (_type_ vector vector) none) + (nav-enemy-method-166 (_type_ vector vector) vector) + (nav-enemy-method-167 (_type_) vector) + (nav-enemy-method-168 (_type_ vector) nav-poly) + (nav-enemy-method-169 (_type_ vector) object) + (is-notice-point-in-mesh? (_type_ vector) symbol) + (nav-enemy-method-171 (_type_) none) + (nav-enemy-method-172 (_type_) none) + (nav-enemy-method-173 (_type_) none) + (nav-enemy-method-174 (_type_) symbol) + (nav-enemy-method-175 (_type_) none) + (nav-enemy-method-176 (_type_) none) + (nav-enemy-method-177 (_type_) none) + (nav-enemy-method-178 (_type_) none) + (nav-enemy-method-179 (_type_) none) + (nav-enemy-method-180 (_type_ float float) none) + (nav-enemy-method-181 (_type_) none) + (nav-enemy-method-182 (_type_) none) + (nav-enemy-method-183 (_type_) none) + (nav-enemy-method-184 (_type_) none) + (nav-enemy-method-185 (_type_) symbol) + (nav-enemy-method-186 (_type_) symbol) + (nav-enemy-method-187 (_type_) none) + (nav-enemy-method-188 (_type_) none) + (copy-nav-state-vel! (_type_ vector) none) + ) + ) + + +(deftype nav-enemy-debug-control-info (basic) + ((enable symbol) + (steering float) + (throttle float) + ) + ) diff --git a/goal_src/jak3/engine/nav/nav-enemy.gc b/goal_src/jak3/engine/nav/nav-enemy.gc index 56ca6077d9..cf5df01ef1 100644 --- a/goal_src/jak3/engine/nav/nav-enemy.gc +++ b/goal_src/jak3/engine/nav/nav-enemy.gc @@ -7,3 +7,2412 @@ ;; DECOMP BEGINS +(defmethod copy! ((this nav-enemy-info) (arg0 nav-enemy-info)) + (mem-copy! (&-> this type) (&-> arg0 type) 524) + 0 + (none) + ) + +(defmethod get-enemy-aware ((this nav-enemy) (arg0 enemy-aware)) + (let* ((t9-0 (method-of-type enemy get-enemy-aware)) + (s5-0 (t9-0 this arg0)) + ) + (if (and (>= 1 (the-as int (-> this focus aware))) (< 1 (the-as int s5-0))) + (nav-enemy-method-172 this) + ) + s5-0 + ) + ) + +(defmethod event-handler ((this nav-enemy) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('nav-mesh-kill) + (deactivate this) + #t + ) + (('nav-mesh-new) + (set! (-> this water-max-height) (-> this nav state mesh water-max-height)) + #t + ) + (('change-nav-mesh) + (let ((a0-6 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor (the-as int (-> arg3 param 0))))) + (if a0-6 + (change-to a0-6 this) + ) + ) + ) + (('debug-control-on) + (go (method-of-object this debug-control)) + ) + (('debug-control-off) + (go-best-state this) + ) + (else + ((method-of-type enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(define *nav-enemy-dummy-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 4096.0) + :top-plane (new 'static 'plane :y 1.0 :w -4096.0) + ) + ) + ) + +(defmethod nav-enemy-method-164 ((this nav-enemy)) + (cond + ((zero? (-> this path)) + (go process-drawable-art-error "no path") + ) + (else + (let ((s4-0 (-> this path curve num-cverts))) + (if (<= s4-0 0) + (go process-drawable-art-error "no path") + ) + (let ((s2-0 (rnd-int this s4-0)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (countdown (s3-0 s4-0) + (get-point-in-path! (-> this path) s5-0 (the float s2-0) 'interp) + (if (< 4096.0 (vector-vector-xz-distance s5-0 (-> this root trans))) + (goto cfg-11) + ) + (set! s2-0 (mod (+ s2-0 1) s4-0)) + ) + (label cfg-11) + (let ((v1-19 (-> this nav state))) + (logclear! (-> v1-19 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-19 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-19 target-pos quad) (-> s5-0 quad)) + ) + ) + ) + 0 + ) + ) + 0 + (none) + ) + +(defmethod nav-enemy-method-165 ((this nav-enemy) (arg0 vector) (arg1 vector)) + (closest-point-on-mesh (-> this nav) arg0 arg1 (the-as nav-poly #f)) + 0 + (none) + ) + +(defmethod nav-enemy-method-166 ((this nav-enemy) (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 7) + (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-167 ((this nav-enemy)) + (let ((v1-2 (handle->process (-> this focus handle)))) + (if v1-2 + (nav-enemy-method-166 this (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable v1-2) 0)) + ) + ) + ) + +(defmethod enemy-method-109 ((this nav-enemy)) + (let ((gp-0 (-> this root)) + (s3-0 (-> this nav state)) + ) + (do-navigation-to-destination s3-0 (-> gp-0 trans)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (cond + ((logtest? (-> s3-0 flags) (nav-state-flag in-mesh)) + (set! (-> s5-0 quad) (-> gp-0 trans quad)) + ) + (else + (if (or (not (closest-point-on-mesh (-> this nav) s5-0 (-> gp-0 trans) (-> s3-0 current-poly))) + (let ((f0-0 32768.0)) + (< (* f0-0 f0-0) (vector-vector-xz-distance-squared s5-0 (-> gp-0 trans))) + ) + (< (- (-> gp-0 trans y) (-> s5-0 y)) -8192.0) + ) + (return #t) + ) + ) + ) + ) + ) + #f + ) + +(defmethod enemy-common-post ((this nav-enemy)) + (if (and (nonzero? (-> this draw)) (logtest? (-> this draw status) (draw-control-status on-screen))) + (set-time! (-> this last-draw-time)) + ) + (update-focus this) + (when *target* + (if *target* + (look-at! + (-> *target* neck) + (the-as vector (-> this root root-prim prim-core)) + (if (logtest? (-> this enemy-flags) (enemy-flag cam-attack-mode)) + 'attacking + ) + this + ) + ) + ) + (when (nonzero? (-> this neck)) + (cond + ((logtest? (-> this enemy-flags) (enemy-flag look-at-focus)) + (let ((a0-7 (handle->process (-> this focus handle)))) + (if a0-7 + (target-set! (-> this neck) (get-trans (the-as process-focusable a0-7) 2)) + ) + ) + ) + ((logtest? (-> this enemy-flags) (enemy-flag look-at-move-dest)) + (let ((s5-1 (-> this move-dest)) + (v1-39 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data (-> this enemy-info neck-joint))) + ) + (a1-6 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-6 x) (-> s5-1 x)) + (set! (-> a1-6 y) (-> v1-39 y)) + (set! (-> a1-6 z) (-> s5-1 z)) + (set! (-> a1-6 w) 1.0) + (target-set! (-> this neck) a1-6) + ) + ) + ) + ) + (when (and (logtest? (-> this enemy-flags) (enemy-flag auto-reset-penetrate)) + (time-elapsed? (-> this auto-reset-penetrate-time) (seconds 0.1)) + ) + (logclear! (-> this enemy-flags) (enemy-flag auto-reset-penetrate)) + (set! (-> this root penetrated-by) (get-penetrated-by this)) + (let ((v1-54 0)) + (if (logtest? (penetrate knocked) (-> this root penetrate-using)) + (set! v1-54 (logior (shl 2 32) v1-54)) + ) + (set! (-> this root penetrate-using) (the-as penetrate v1-54)) + ) + ) + (if (logtest? (-> this enemy-flags) (enemy-flag victory)) + (check-victory this) + ) + (if (logtest? (enemy-flag check-water checking-water) (-> this enemy-flags)) + (check-water this) + ) + (let ((v1-65 (-> this restore-nav-radius-time))) + (when (nonzero? v1-65) + (when (>= (current-time) v1-65) + (set! (-> this restore-nav-radius-time) 0) + (set! (-> this root nav-radius) (-> this nav-radius-backup)) + ) + ) + ) + (if (and *debug-segment* (-> this enemy-info debug-draw-neck) (nonzero? (-> this neck))) + (joint-mod-debug-draw (-> this neck)) + ) + (ja-post) + 0 + (none) + ) + +(defmethod move-above-ground! ((this nav-enemy) (arg0 vector) (arg1 move-above-ground-params)) + (let ((t9-0 (method-of-type enemy move-above-ground!))) + (t9-0 this arg0 arg1) + ) + (do-navigation-to-destination (-> this nav state) (-> this root trans)) + 0 + (none) + ) + +(defmethod nav-enemy-method-188 ((this nav-enemy)) + (let ((v1-2 (-> this nav state current-poly))) + (when (and v1-2 (logtest? (-> v1-2 pat) 4) (!= (-> v1-2 link) 255)) + (let ((v1-6 (-> this nav state mesh link-array (-> v1-2 link) dest-mesh))) + (if v1-6 + (change-to v1-6 this) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod nav-enemy-method-187 ((this nav-enemy)) + (nav-enemy-method-188 this) + (cond + ((nav-enemy-method-185 this) + (let ((s5-0 (-> this nav))) + (when (logtest? (-> s5-0 state flags) (nav-state-flag at-gap)) + (let ((s4-0 (new 'stack-no-clear 'nav-gap-info))) + (when (plan-over-pat1-polys-using-route (-> s5-0 state) s4-0) + (set! (-> this enemy-flags) + (the-as enemy-flag (logior (enemy-flag jump-check-blocked) (-> this enemy-flags))) + ) + (send-event this 'jump 1 (-> s4-0 dest)) + ) + ) + ) + (cond + ((logtest? (enemy-flag ef39) (-> this enemy-flags)) + (set! (-> this enemy-flags) (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag ef39)))) + ) + (else + (when (not (logtest? (enemy-flag ef43) (-> this enemy-flags))) + (normalize-heading! this s5-0) + (nav-enemy-method-161 this s5-0) + ) + ) + ) + (cond + ((logtest? (-> s5-0 state flags) (nav-state-flag blocked)) + (if (zero? (-> this blocked-start-time)) + (set-time! (-> this blocked-start-time)) + ) + ) + (else + (set! (-> this blocked-start-time) 0) + 0 + ) + ) + ) + ) + (else + (set! (-> this blocked-start-time) 0) + 0 + ) + ) + (enemy-common-post this) + (update-transforms (-> this root)) + 0 + (none) + ) + +(defmethod nav-enemy-method-163 ((this nav-enemy)) + (navigate-v1! (-> this nav state)) + 0 + (none) + ) + +(defmethod normalize-heading! ((this nav-enemy) (arg0 nav-control)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (let ((a1-1 (-> arg0 state))) + (set! (-> s5-0 quad) (-> a1-1 heading quad)) + ) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + ;; og:preserve-this modified for PC, see comment near definition in collide-shape-h.gc + (normalized-heading-to-quaternion! (-> this root quat) s5-0) + ) + (quaternion-normalize! (-> this root quat)) + 0 + (none) + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod copy-nav-state-vel! ((this nav-enemy) (arg0 vector)) + (set! (-> arg0 quad) (-> this nav state velocity quad)) + (none) + ) + +(defmethod nav-enemy-method-161 ((this nav-enemy) (arg0 nav-control)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (copy-nav-state-vel! this s5-0) + (let ((v1-3 (-> this root transv))) + (set! (-> v1-3 x) (-> s5-0 x)) + (set! (-> v1-3 z) (-> s5-0 z)) + ) + ) + (cond + ((should-move-to-ground? this) + (if (focus-test? this under-water) + (accelerate-fall! this (-> this root transv)) + (+! (-> this root transv y) (* (-> this enemy-info movement-gravity) (seconds-per-frame))) + ) + (let ((a2-0 (new 'stack-no-clear 'move-above-ground-params))) + (let ((v1-17 (-> this enemy-info))) + (set! (-> a2-0 gnd-collide-with) (-> this gnd-collide-with)) + (set! (-> a2-0 popup) 8192.0) + (set! (-> a2-0 dont-move-if-overlaps?) #t) + (set! (-> a2-0 hover-if-no-ground?) (-> v1-17 hover-if-no-ground)) + (set! (-> a2-0 overlaps-params options) (overlaps-others-options oo0 oo2)) + (set! (-> a2-0 overlaps-params collide-with-filter) (-> v1-17 overlaps-others-collide-with-filter)) + ) + (set! (-> a2-0 overlaps-params tlist) *touching-list*) + (-> a2-0 overlaps-params) + (move-above-ground! this (-> this root transv) a2-0) + ) + ) + (else + (let ((a2-1 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a2-1 options) (overlaps-others-options oo0)) + (set! (-> a2-1 collide-with-filter) (-> this enemy-info overlaps-others-collide-with-filter)) + (set! (-> a2-1 tlist) *touching-list*) + (integrate-for-enemy-no-mtg (-> this root) (-> this root transv) a2-1) + ) + ) + ) + 0 + (none) + ) + +(defmethod nav-enemy-method-181 ((this nav-enemy)) + (if (not (logtest? (enemy-flag ef37) (-> this enemy-flags))) + (set! (-> this enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> this enemy-flags)))) + ) + (set! (-> this enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> this enemy-flags)))) + (set! (-> this nav callback-info) (-> this enemy-info callback-info)) + 0 + (none) + ) + +(defmethod nav-enemy-method-182 ((this nav-enemy)) + (set! (-> this enemy-flags) (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag ef37)))) + (set! (-> this nav callback-info) *null-nav-callback-info*) + 0 + (none) + ) + +(defmethod nav-enemy-method-183 ((this nav-enemy)) + (set! (-> this enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> this enemy-flags)))) + 0 + (none) + ) + +(defmethod nav-enemy-method-184 ((this nav-enemy)) + (set! (-> this enemy-flags) (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag ef38)))) + 0 + (none) + ) + +(defmethod nav-enemy-method-185 ((this nav-enemy)) + (logtest? (enemy-flag ef37) (-> this enemy-flags)) + ) + +(defmethod nav-enemy-method-186 ((this nav-enemy)) + (logtest? (enemy-flag ef38) (-> this enemy-flags)) + ) + +(defmethod nav-enemy-method-168 ((this nav-enemy) (arg0 vector)) + (let ((v1-0 (-> this nav)) + (a0-1 arg0) + (a1-1 (new 'stack-no-clear 'nav-poly)) + ) + (vector-! (the-as vector (-> a1-1 vertex)) a0-1 (the-as vector (-> v1-0 state mesh bounds))) + (set! (-> a1-1 vertex1 x) (-> v1-0 nearest-y-threshold)) + (set! (-> a1-1 data 20) (the-as uint 2)) + (nav-mesh-method-45 (-> v1-0 state mesh) a1-1) + ) + ) + +(defmethod nav-enemy-method-169 ((this nav-enemy) (arg0 vector)) + (let ((f1-0 (-> this root trans y)) + (f0-0 (-> arg0 y)) + (v1-1 (-> this fact)) + ) + (and (< f0-0 (+ f1-0 (-> v1-1 notice-top))) + (and (< (- f1-0 (-> v1-1 notice-bottom)) f0-0) + (let ((v1-3 (-> this nav)) + (a0-1 arg0) + (a1-1 (new 'stack-no-clear 'nav-poly)) + ) + (vector-! (the-as vector (-> a1-1 vertex)) a0-1 (the-as vector (-> v1-3 state mesh bounds))) + (set! (-> a1-1 vertex1 x) (-> v1-3 nearest-y-threshold)) + (set! (-> a1-1 data 20) (the-as uint 2)) + (nav-mesh-method-45 (-> v1-3 state mesh) a1-1) + ) + ) + ) + ) + ) + +(defmethod is-notice-point-in-mesh? ((this nav-enemy) (arg0 vector)) + (let ((f1-0 (-> this root trans y)) + (f0-0 (-> arg0 y)) + (v1-1 (-> this fact)) + ) + (and (< f0-0 (+ f1-0 (-> v1-1 notice-top))) + (and (< (- f1-0 (-> v1-1 notice-bottom)) f0-0) + (is-in-mesh? (-> this nav) arg0 (-> this enemy-info notice-nav-radius)) + ) + ) + ) + ) + +(defmethod is-pfoc-in-mesh? ((this nav-enemy) (arg0 process-focusable) (arg1 vector)) + (if (and arg0 (not arg1)) + (set! arg1 (get-trans arg0 1)) + ) + (when arg1 + (let* ((f0-0 (-> arg1 y)) + (v1-4 (-> this root)) + (f1-0 (-> v1-4 trans y)) + (a0-2 (-> this fact)) + ) + (when (and (< f0-0 (+ f1-0 (-> a0-2 notice-top))) (< (- f1-0 (-> a0-2 notice-bottom)) f0-0)) + (let* ((f30-0 (-> this enemy-info notice-nav-radius)) + (f0-1 f30-0) + ) + (or (>= (* f0-1 f0-1) (vector-vector-xz-distance-squared (-> v1-4 trans) arg1)) + (is-in-mesh? (-> this nav) arg1 f30-0) + ) + ) + ) + ) + ) + ) + +(defmethod nav-enemy-method-172 ((this nav-enemy)) + (set! (-> this enemy-flags) (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag ef40)))) + (set-time! (-> this frustration-time)) + (let ((v1-7 (handle->process (-> this focus handle)))) + (if v1-7 + (set! (-> this frustration-point quad) (-> (get-trans (the-as process-focusable v1-7) 1) quad)) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod nav-enemy-method-171 ((this nav-enemy)) + (let ((s5-0 (handle->process (-> this focus handle)))) + (cond + ((or (not s5-0) + (< 6144.0 (vector-vector-distance (get-trans (the-as process-focusable s5-0) 1) (-> this frustration-point))) + (< (-> this enemy-info frustration-distance) + (vector-vector-xz-distance (get-trans (the-as process-focusable s5-0) 0) (-> this root trans)) + ) + ) + (nav-enemy-method-172 this) + ) + (else + (when (time-elapsed? (-> this frustration-time) (+ (-> this reaction-time) (-> this enemy-info frustration-time))) + (set! (-> this enemy-flags) (the-as enemy-flag (logior (enemy-flag ef40) (-> this enemy-flags)))) + 0 + ) + ) + ) + ) + (none) + ) + +(defmethod nav-enemy-method-173 ((this nav-enemy)) + (set! (-> this blocked-start-time) 0) + 0 + (none) + ) + +(defmethod nav-enemy-method-174 ((this nav-enemy)) + (let ((v1-0 (-> this blocked-start-time))) + (and (nonzero? v1-0) (time-elapsed? v1-0 (-> this enemy-info blocked-time))) + ) + ) + +(defmethod nav-enemy-method-175 ((this nav-enemy)) + (if (-> this enemy-info use-momentum) + (logior! (-> this nav flags) (nav-control-flag use-momentum)) + (logclear! (-> this nav flags) (nav-control-flag use-momentum)) + ) + 0 + (none) + ) + +(defmethod nav-enemy-method-178 ((this nav-enemy)) + (let ((v1-0 (-> this nav))) + (set! (-> v1-0 target-speed) 0.0) + ) + 0 + (let ((v1-3 (-> this nav state))) + (set! (-> v1-3 speed) 0.0) + ) + 0 + (let ((v1-5 (-> this nav))) + (set! (-> v1-5 acceleration) (-> this enemy-info walk-acceleration)) + ) + 0 + 0 + (none) + ) + +(defmethod nav-enemy-method-176 ((this nav-enemy)) + (let ((v1-0 (-> this nav))) + (set! (-> v1-0 target-speed) (-> this enemy-info walk-travel-speed)) + ) + 0 + (let ((v1-2 (-> this nav))) + (set! (-> v1-2 acceleration) (-> this enemy-info walk-acceleration)) + ) + 0 + (let ((v1-4 (-> this nav))) + (set! (-> v1-4 turning-acceleration) (-> this enemy-info walk-turning-acceleration)) + ) + 0 + 0 + (none) + ) + +(defmethod nav-enemy-method-177 ((this nav-enemy)) + (let ((v1-0 (-> this nav))) + (set! (-> v1-0 target-speed) (-> this enemy-info run-travel-speed)) + ) + 0 + (let ((v1-2 (-> this nav))) + (set! (-> v1-2 acceleration) (-> this enemy-info run-acceleration)) + ) + 0 + (let ((v1-4 (-> this nav))) + (set! (-> v1-4 turning-acceleration) (-> this enemy-info run-turning-acceleration)) + ) + 0 + 0 + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod init-enemy-info! ((this nav-enemy) (arg0 enemy-info)) + (set! (-> this enemy-info) (the-as nav-enemy-info arg0)) + (set! (-> (the-as nav-enemy-info arg0) callback-info) *default-nav-callback-info*) + (when (and (!= (-> this enemy-info neck-joint) -1) (zero? (-> this neck))) + (set! (-> this neck) + (new 'process 'joint-mod (joint-mod-mode flex-blend) this (-> this enemy-info neck-joint)) + ) + (set-vector! (-> this neck twist-max) 8192.0 8192.0 0.0 1.0) + (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 neck max-dist) 102400.0) + (set! (-> this neck ignore-angle) 16384.0) + ) + (none) + ) + +(defmethod init-enemy-defaults! ((this nav-enemy) (arg0 enemy-info)) + (local-vars (sv-16 res-tag)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (when (coin-flip? this) + (let ((a0-2 (-> this node-list data 2))) + (set! (-> a0-2 param0) (the-as (function cspace transformq none) cspace<-parented-matrix-joint-flip-z!)) + (set! (-> a0-2 param1) #f) + (set! (-> a0-2 param2) #f) + ) + (logior! (-> this enemy-flags) (enemy-flag drawn-mirrored)) + ) + (logior! (-> this mask) (process-mask enemy)) + (logior! (-> this mask) (process-mask actor-pause)) + (logior! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (set! (-> this nav-radius-backup) (-> this root nav-radius)) + (init-enemy-info! this arg0) + (set! (-> this enemy-info callback-info) *default-nav-callback-info*) + (set! (-> this ragdoll-proc) (the-as handle #f)) + (let ((a1-2 (-> this enemy-info idle-anim-script))) + (if a1-2 + (init! (-> this idle-anim-player) a1-2) + ) + ) + (if (-> this draw shadow) + (set! (-> this draw shadow-ctrl) (new + 'process + 'shadow-control + (-> this enemy-info shadow-min-y) + (-> this enemy-info shadow-max-y) + (-> this enemy-info shadow-locus-dist) + (the-as vector #f) + (shadow-flags shdf00 shdf04) + 245760.0 + ) + ) + (set! (-> this draw shadow-ctrl) *nav-enemy-dummy-shadow-control*) + ) + (get-nav-control this (-> (the-as nav-enemy-info arg0) nav-mesh)) + (set! (-> this water-max-height) (-> this nav state mesh water-max-height)) + (let ((v1-32 this)) + (set! (-> v1-32 enemy-flags) (the-as enemy-flag (logclear (-> v1-32 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-32 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let ((v1-35 this)) + (set! (-> v1-35 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-35 enemy-flags)))) + ) + 0 + (logior! (-> this nav flags) (nav-control-flag display-marks limit-rotation-rate)) + (logior! (-> this nav flags) (nav-control-flag update-heading-from-facing)) + (set! (-> this enemy-flags) (the-as enemy-flag (logior (enemy-flag ef44) (-> this enemy-flags)))) + (let ((v1-46 (-> this nav))) + (set! (-> v1-46 target-speed) 0.0) + ) + 0 + (let ((v1-48 (-> this nav))) + (set! (-> v1-48 acceleration) (-> this enemy-info walk-acceleration)) + ) + 0 + (let ((v1-50 (-> this nav))) + (set! (-> v1-50 turning-acceleration) (-> this enemy-info walk-turning-acceleration)) + ) + 0 + (let ((v1-52 (-> this nav))) + (set! (-> v1-52 max-rotation-rate) (-> this enemy-info maximum-rotation-rate)) + ) + 0 + (nav-enemy-method-175 this) + (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) 3) + (set! (-> this path curve cverts) (-> (new 'process 'vector-array 3) data)) + (logclear! (-> this path flags) (path-control-flag not-found)) + (let ((v1-69 (-> this path curve cverts 0))) + (let ((a0-33 (-> this entity trans))) + (let ((a1-9 *x-vector*)) + (let ((a2-4 6144.0)) + (.mov vf7 a2-4) + ) + (.lvf vf5 (&-> a1-9 quad)) + ) + (.lvf vf4 (&-> a0-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 (&-> v1-69 quad) vf6) + ) + (let ((v1-72 (-> this path curve cverts 1))) + (let ((a0-35 (-> this entity trans))) + (let ((a1-10 *x-vector*)) + (let ((a2-6 -6144.0)) + (.mov vf7 a2-6) + ) + (.lvf vf5 (&-> a1-10 quad)) + ) + (.lvf vf4 (&-> a0-35 quad)) + ) + (.add.x.vf 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-72 quad) vf6) + ) + (let ((v1-75 (-> this path curve cverts 2))) + (let ((a0-37 (-> this entity trans))) + (let ((a1-11 *z-vector*)) + (let ((a2-8 6144.0)) + (.mov vf7 a2-8) + ) + (.lvf vf5 (&-> a1-11 quad)) + ) + (.lvf vf4 (&-> a0-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 (&-> v1-75 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)) + ) + (if (logtest? (-> *game-info* secrets) (game-secrets hero-mode)) + (set! (-> this hit-points) (* 2.0 (-> this enemy-info default-hit-points))) + (set! (-> this hit-points) (-> this enemy-info default-hit-points)) + ) + (let* ((v1-91 *game-info*) + (a0-42 (+ (-> v1-91 attack-id) 1)) + ) + (set! (-> v1-91 attack-id) a0-42) + (set! (-> this attack-id) a0-42) + ) + (let* ((v1-92 *game-info*) + (a0-44 (+ (-> v1-92 attack-id) 1)) + ) + (set! (-> v1-92 attack-id) a0-44) + (set! (-> this persistent-attack-id) a0-44) + ) + (set! (-> this gnd-collide-with) (-> this enemy-info gnd-collide-with)) + (set! (-> this fact) (new 'process 'fact-info-enemy this (the-as (pointer float) (-> arg0 fact-defaults)))) + (let ((cspec (if (logtest? (enemy-option multi-focus) (-> this fact enemy-options)) + (the-as collide-spec (collide-spec jak bot player-list jak-vehicle)) + (the-as collide-spec (collide-spec jak player-list jak-vehicle)) + ) + ) + ) + (reset-to-collide-spec (-> this focus) (the-as collide-spec cspec)) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-101 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-101 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-101)) + (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 on-notice) (res-lump-struct (-> this entity) 'on-notice pair)) + (set! (-> this on-active) (res-lump-struct (-> this entity) 'on-active pair)) + (set! (-> this on-hostile) (res-lump-struct (-> this entity) 'on-hostile pair)) + (set! (-> this on-death) (res-lump-struct (-> this entity) 'on-death pair)) + (if (-> this on-notice) + (logior! (-> this enemy-flags) (enemy-flag enable-on-notice)) + ) + (if (-> this on-active) + (logior! (-> this enemy-flags) (enemy-flag enable-on-active)) + ) + (if (-> this on-hostile) + (logior! (-> this enemy-flags) (enemy-flag enable-on-hostile)) + ) + (set! (-> this incoming attacker-handle) (the-as handle #f)) + (let ((s4-0 (-> this root))) + (set! (-> this penetrated-by-all) (-> this root penetrated-by)) + (set! (-> this root penetrated-by) (get-penetrated-by this)) + (set! (-> s4-0 event-self) 'touched) + ) + (set! (-> this penetrate-flinch) (-> arg0 penetrate-flinch)) + (set! (-> this penetrate-knocked) (-> arg0 penetrate-knocked)) + (set! (-> this reaction-time) (set-reaction-time! this (seconds 0.1) (seconds 0.8))) + (let* ((v1-132 (-> this enemy-flags)) + (a0-61 (-> this fact enemy-options)) + (v1-133 + (logior (enemy-flag vulnerable vulnerable-backup use-notice-distance attackable-backup trackable trackable-backup) + v1-132 + ) + ) + ) + (if (logtest? (enemy-option multi-focus) a0-61) + (set! v1-133 (logior (enemy-flag multi-focus) v1-133)) + ) + (if (logtest? (enemy-option has-trigger) a0-61) + (set! v1-133 (logior (enemy-flag use-trigger) v1-133)) + ) + (set! (-> this enemy-flags) v1-133) + ) + (do-navigation-to-destination (-> this nav state) (-> this root trans)) + (if (and (should-move-to-ground? this) + (not (logtest? (enemy-flag no-initial-move-to-ground) (-> this enemy-flags))) + (not (logtest? (enemy-option ambush) (-> this fact enemy-options))) + ) + (try-locate-ground this (meters 10) (meters 10) #t (-> this gnd-collide-with)) + ) + (if (zero? (-> this draw light-index)) + (set! (-> this draw light-index) (the-as uint 10)) + ) + 0 + (none) + ) + ) + +;; WARN: Return type mismatch int vs object. +(defmethod init-from-entity! ((this nav-enemy) (arg0 entity-actor)) + (let ((a1-2 (res-lump-struct arg0 'art-level structure))) + (when a1-2 + (let ((a0-3 (level-get *level* (the-as symbol a1-2)))) + (if a0-3 + (set! (-> this level) a0-3) + ) + ) + ) + ) + (init-enemy-collision! this) + (process-drawable-from-entity! this arg0) + (init-enemy! this) + (enemy-setup-gem) + (let ((v1-10 (-> this fact enemy-options))) + (cond + ((logtest? (enemy-option spawner) v1-10) + (process-entity-status! this (entity-perm-status dead) #t) + (go (method-of-object this die-fast)) + ) + (*debug-view-anims* + (go (method-of-object this view-anims)) + ) + ((logtest? (enemy-option dormant) v1-10) + (let ((v1-18 (-> this root root-prim))) + (set! (-> v1-18 prim-core collide-as) (collide-spec)) + (set! (-> v1-18 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> this draw status) (draw-control-status no-draw)) + (go (method-of-object this dormant)) + ) + ((logtest? (enemy-option dormant-aware) v1-10) + (let ((v1-28 (-> this root root-prim))) + (set! (-> v1-28 prim-core collide-as) (collide-spec)) + (set! (-> v1-28 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> this draw status) (draw-control-status no-draw)) + (go (method-of-object this dormant-aware)) + ) + (else + (go-idle2 this) + ) + ) + ) + 0 + ) + +(defbehavior nav-enemy-simple-post nav-enemy () + (enemy-common-post self) + (update-transforms (-> self root)) + 0 + (none) + ) + +(defbehavior nav-enemy-die-falling-post nav-enemy () + (enemy-die-falling-post) + (none) + ) + +(defbehavior nav-enemy-travel-post nav-enemy () + (nav-enemy-method-187 self) + (none) + ) + +(defbehavior nav-enemy-patrol-post nav-enemy () + (when (or (logtest? (-> self nav state flags) (nav-state-flag at-target)) (nav-enemy-method-174 self)) + (nav-enemy-method-164 self) + (nav-enemy-method-173 self) + ) + (nav-enemy-method-187 self) + 0 + (none) + ) + +(defbehavior nav-enemy-chase-post nav-enemy () + (let ((a0-1 (handle->process (-> self focus handle)))) + (when a0-1 + (let ((gp-0 (-> self nav state)) + (v1-7 (get-trans (the-as process-focusable a0-1) 1)) + ) + (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-7 quad)) + ) + 0 + ) + ) + (nav-enemy-method-187 self) + 0 + (none) + ) + +(defbehavior nav-enemy-flee-post nav-enemy () + (let ((a0-1 (handle->process (-> self focus handle)))) + (when a0-1 + (let ((gp-0 (-> self move-dest))) + (if (or (not (nav-enemy-method-166 self gp-0 (get-trans (the-as process-focusable a0-1) 0))) + (nav-enemy-method-174 self) + ) + (go-stare2 self) + ) + (let ((a0-7 (-> self nav state)) + (a1-3 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-3 quad) (-> a0-7 target-pos quad)) + (when (< 2048.0 (vector-vector-xz-distance gp-0 a1-3)) + (let ((v1-18 (-> self nav state))) + (logclear! (-> v1-18 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-18 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-18 target-pos quad) (-> gp-0 quad)) + ) + 0 + ) + ) + ) + ) + ) + (nav-enemy-method-187 self) + 0 + (none) + ) + +(defbehavior nav-enemy-face-focus-post nav-enemy () + (let ((a0-0 self)) + (when (logtest? (enemy-flag ef38) (-> a0-0 enemy-flags)) + (let ((a0-4 (handle->process (-> self focus handle)))) + (if a0-4 + (seek-to-point-toward-point! + (-> self root) + (get-trans (the-as process-focusable a0-4) 0) + (-> self nav max-rotation-rate) + (seconds 0.02) + ) + ) + ) + ) + ) + (nav-enemy-simple-post) + 0 + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod nav-enemy-method-180 ((this nav-enemy) (arg0 float) (arg1 float)) + (if arg1 + (set! (-> this nav-radius-backup) arg0) + ) + (if (zero? (-> this restore-nav-radius-time)) + (set! (-> this root nav-radius) arg0) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod nav-enemy-method-179 ((this nav-enemy)) + (if (zero? (-> this restore-nav-radius-time)) + (set! (-> this root nav-radius) (-> this nav-radius-backup)) + ) + (none) + ) + +(defmethod nav-enemy-method-162 ((this nav-enemy)) + (set! (-> this root nav-radius) 4.096) + (set! (-> this restore-nav-radius-time) + (the-as + time-frame + (max (-> this restore-nav-radius-time) (+ (current-time) (set-reaction-time! this (seconds 5) (seconds 8)))) + ) + ) + (none) + ) + +(defbehavior nav-enemy-stare-post nav-enemy () + (let ((a0-0 self)) + (when (logtest? (enemy-flag ef38) (-> a0-0 enemy-flags)) + (let ((a0-4 (handle->process (-> self focus handle)))) + (if a0-4 + (seek-to-point-toward-point! + (-> self root) + (get-trans (the-as process-focusable a0-4) 0) + (-> self nav max-rotation-rate) + (seconds 0.02) + ) + ) + ) + ) + ) + (nav-enemy-method-187 self) + (if (and (nav-enemy-method-174 self) + (zero? (-> self restore-nav-radius-time)) + (time-elapsed? (-> self blocked-start-time) (seconds 4)) + ) + (nav-enemy-method-162 self) + ) + 0 + (none) + ) + +(defbehavior nav-enemy-falling-post nav-enemy () + (enemy-falling-post) + (none) + ) + +(defbehavior nav-enemy-turn-to-face-dir nav-enemy ((arg0 vector) (arg1 float)) + (local-vars (v1-18 symbol)) + (let ((s4-0 (current-time))) + (ja :group! (-> self draw art-group data (-> self enemy-info turn-anim))) + (ja :num-func num-func-identity :frame-num 0.0) + (until v1-18 + (seek-toward-heading-vec! (-> self root) arg0 (-> self nav max-rotation-rate) (seconds 0.02)) + (suspend) + (ja :num! (loop! 0.75)) + (set! v1-18 (or (time-elapsed? s4-0 (seconds 10)) (enemy-method-103 self arg0 arg1))) + ) + ) + (forward-up->quaternion (-> self root quat) arg0 *y-vector*) + 0 + (none) + ) + +(defbehavior nav-enemy-turn-to-face-point nav-enemy ((arg0 vector) (arg1 float)) + (let ((gp-1 (vector-! (new 'stack-no-clear 'vector) arg0 (-> self root trans)))) + (set! (-> gp-1 y) 0.0) + (when (< 0.0 (vector-length gp-1)) + (vector-normalize! gp-1 1.0) + (nav-enemy-turn-to-face-dir gp-1 arg1) + ) + ) + 0 + (none) + ) + +(defmethod go-stare2 ((this nav-enemy)) + (if (!= (-> this enemy-info taunt-anim) -1) + (go (method-of-object this taunt)) + ) + (go (method-of-object this stare)) + ) + +(defmethod go-stare ((this nav-enemy)) + (let ((s5-0 (-> this focus aware))) + (cond + ((or (and (-> this enemy-info use-frustration) (logtest? (enemy-flag ef40) (-> this enemy-flags))) + (nav-enemy-method-174 this) + ) + (go-stare2 this) + ) + ((and (= s5-0 (enemy-aware ea3)) (-> this enemy-info use-circling)) + (go (method-of-object this circling)) + ) + ((= s5-0 (enemy-aware ea4)) + (go-flee this) + ) + (else + (go-stare2 this) + ) + ) + ) + ) + +(defmethod go-hostile ((this nav-enemy)) + (if (or (and (-> this enemy-info use-frustration) (logtest? (enemy-flag ef40) (-> this enemy-flags))) + (nav-enemy-method-174 this) + ) + (go-stare2 this) + (go (method-of-object this hostile)) + ) + ) + +(defmethod go-flee ((this nav-enemy)) + (if (nav-enemy-method-167 this) + (go (method-of-object this flee)) + (go (method-of-object this stare)) + ) + ) + +(define *nav-enemy-debug-control-info* (new 'static 'nav-enemy-debug-control-info)) + +(defbehavior nav-enemy-debug-control-post nav-enemy () + (let ((gp-0 *nav-enemy-debug-control-info*)) + (let ((f30-0 (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 48.0 110.0 -1.0))) + (seek! (-> gp-0 steering) (fmax -1.0 (fmin 1.0 f30-0)) (seconds-per-frame)) + (if (cpad-hold? 0 x) + (set! (-> gp-0 throttle) 1.0) + (set! (-> gp-0 throttle) 0.0) + ) + (format *stdcon* "input-x ~f steering ~f throttle ~f~%" f30-0 (-> gp-0 steering) (-> gp-0 throttle)) + ) + (format *stdcon* "target-speed ~M, speed ~M~%" (-> self nav target-speed) (-> self nav state speed)) + (let ((v1-16 (-> self nav))) + (set! (-> v1-16 target-speed) (* 24576.0 (-> gp-0 throttle))) + ) + 0 + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (let ((a1-4 (-> self nav state))) + (set! (-> s4-0 quad) (-> a1-4 heading quad)) + ) + (vector-rotate-y! s4-0 s4-0 (* 1820.4445 (-> gp-0 steering))) + (vector-float*! s4-0 s4-0 20480.0) + (vector+! s5-0 (-> self root trans) s4-0) + (let ((v1-26 (-> self nav state))) + (logclear! (-> v1-26 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-26 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-26 target-pos quad) (-> s5-0 quad)) + ) + ) + ) + 0 + (nav-enemy-method-187 self) + (none) + ) + +(defstate idle (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy idle) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self state-timeout) (seconds 1)) + (let ((v1-5 self)) + (set! (-> v1-5 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-5 enemy-flags)))) + ) + 0 + (let ((v1-7 self)) + (set! (-> v1-7 enemy-flags) (the-as enemy-flag (logclear (-> v1-7 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-7 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + ) + ) + +(defstate dormant (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy dormant) 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 + (let ((v1-6 self)) + (set! (-> v1-6 enemy-flags) (the-as enemy-flag (logclear (-> v1-6 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-6 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + ) + ) + +(defstate dormant-aware (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (-> (method-of-type nav-enemy dormant) enter) + ) + +(defstate active (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self state-timeout) (seconds 1)) + (logior! (-> self nav state flags) (nav-state-flag at-target)) + (let ((v1-8 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-8 enemy-flags))) + (set! (-> v1-8 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-8 enemy-flags)))) + ) + (set! (-> v1-8 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-8 enemy-flags)))) + (set! (-> v1-8 nav callback-info) (-> v1-8 enemy-info callback-info)) + ) + 0 + (let ((v1-11 self)) + (set! (-> v1-11 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-11 enemy-flags)))) + ) + 0 + (nav-enemy-method-176 self) + ) + :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.6)) + (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.6)) + (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 + ) + :post nav-enemy-patrol-post + ) + +(defstate notice (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy notice) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((a0-1 (handle->process (-> self focus handle)))) + (when a0-1 + (let ((gp-0 (-> self nav state)) + (v1-11 (get-trans (the-as process-focusable a0-1) 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-11 quad)) + ) + 0 + ) + ) + (let ((v1-14 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-14 enemy-flags))) + (set! (-> v1-14 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-14 enemy-flags)))) + ) + (set! (-> v1-14 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-14 enemy-flags)))) + (set! (-> v1-14 nav callback-info) (-> v1-14 enemy-info callback-info)) + ) + 0 + (let ((v1-17 self)) + (set! (-> v1-17 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-17 enemy-flags)))) + ) + 0 + (let ((v1-19 (-> self nav))) + (set! (-> v1-19 target-speed) 0.0) + ) + 0 + ) + :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)) + ) + (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) + (let ((a1-9 (-> self nav state))) + (set! (-> gp-0 quad) (-> a1-9 travel quad)) + ) + (seek-toward-heading-vec! (-> self root) gp-0 (-> self nav max-rotation-rate) (seconds 0.02)) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (go-best-state self) + ) + :post nav-enemy-simple-post + ) + +(defstate hostile (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (nav-enemy-method-177 self) + (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 + (let ((v1-9 self)) + (set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-9 enemy-flags)))) + ) + 0 + ) + :trans (behavior () + (nav-enemy-method-171 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)) + (if (nav-enemy-method-174 self) + (go-stare2 self) + ) + (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) + ) + ) + ) + ) + :post nav-enemy-chase-post + ) + +(defstate stop-chase (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((a1-0 (new 'stack-no-clear 'vector))) + (let ((a2-0 (-> self nav state))) + (set! (-> a1-0 quad) (-> a2-0 target-pos quad)) + ) + (let ((f0-0 (vector-vector-distance (-> self root trans) a1-0))) + (set! (-> self state-timeout) + (the-as + time-frame + (the int (+ (lerp-scale 300.0 1200.0 f0-0 32768.0 122880.0) (rnd-float-range self 0.0 30.0))) + ) + ) + ) + ) + (nav-enemy-method-176 self) + (let ((v1-10 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-10 enemy-flags))) + (set! (-> v1-10 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-10 enemy-flags)))) + ) + (set! (-> v1-10 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-10 enemy-flags)))) + (set! (-> v1-10 nav callback-info) (-> v1-10 enemy-info callback-info)) + ) + 0 + (let ((v1-13 self)) + (set! (-> v1-13 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-13 enemy-flags)))) + ) + 0 + (logclear! (-> self mask) (process-mask actor-pause)) + ) + :trans (behavior () + (nav-enemy-method-171 self) + (if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory)) + (go-virtual victory) + ) + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (if (nav-enemy-method-174 self) + (go-stare2 self) + ) + (let ((gp-0 (-> self focus aware))) + (cond + ((>= 1 (the-as int gp-0)) + (if (time-elapsed? (-> self state-time) (-> self state-timeout)) + (go-virtual active) + ) + ) + ((and (= gp-0 (enemy-aware ea3)) (get-focus! self)) + (go-hostile self) + ) + ((= gp-0 (enemy-aware ea4)) + (go-flee self) + ) + (else + (if (time-elapsed? (-> self state-time) (-> self state-timeout)) + (go-stare self) + ) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data (-> self enemy-info walk-anim))) + (ja :num-func num-func-identity :frame-num 0.0) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (until #f + (suspend) + (ja :num! (loop! f30-0)) + ) + ) + #f + ) + :post nav-enemy-chase-post + ) + +(defstate stare (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy stare) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self enemy-flags) (the-as enemy-flag (logior (enemy-flag ef43) (-> self enemy-flags)))) + (logclear! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + (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 + (nav-enemy-method-178 self) + (vector-reset! (-> self root transv)) + (set-time! (-> self starting-time)) + ) + :exit (behavior () + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag ef43)))) + (let ((v1-4 (-> self nav state))) + (set! (-> v1-4 speed) 0.0) + ) + 0 + (vector-reset! (-> self root transv)) + (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)) + ) + (when (and (logtest? (-> self nav flags) (nav-control-flag update-heading-from-facing)) + (not (nav-enemy-method-174 self)) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-z-quaternion! gp-0 (-> self root quat)) + (set! (-> gp-0 y) 0.0) + (let ((v1-23 gp-0)) + (let ((f0-2 1.0)) + (.lvf vf1 (&-> v1-23 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-9 f0-2)) + (.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-23 quad) vf1) + ) + (set! (-> self nav state heading quad) (-> gp-0 quad)) + ) + 0 + ) + ) + ) + :trans (behavior () + (nav-enemy-method-171 self) + (if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory)) + (go-virtual victory) + ) + (let ((gp-0 (-> self focus aware))) + (if (< (the-as int gp-0) 2) + (set-time! (-> self starting-time)) + ) + (when (and (time-elapsed? (-> self state-time) (-> self reaction-time)) (not (nav-enemy-method-174 self))) + (cond + ((>= 1 (the-as int gp-0)) + (go-virtual active) + ) + ((= gp-0 (enemy-aware ea3)) + (if (and (get-focus! self) + (not (and (-> self enemy-info use-frustration) (logtest? (enemy-flag ef40) (-> self enemy-flags)))) + (time-elapsed? (-> self starting-time) (-> self reaction-time)) + ) + (go-hostile self) + ) + (if (-> self enemy-info use-circling) + (go-virtual circling) + ) + ) + ((and (= gp-0 (enemy-aware ea4)) (nav-enemy-method-167 self)) + (go-flee self) + ) + ((and (= gp-0 (enemy-aware ea2)) + (-> self enemy-info use-pacing) + (time-elapsed? (-> self starting-time) (-> self reaction-time)) + ) + (go-virtual pacing) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (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) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + #f + ) + :post nav-enemy-stare-post + ) + +(defstate taunt (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + ((-> (method-of-type nav-enemy stare) enter)) + (let ((gp-0 (handle->process (-> self focus handle)))) + (when (not gp-0) + (if (nav-enemy-method-174 self) + (go-virtual stare) + (go-virtual active) + ) + ) + (set! (-> self focus-pos quad) (-> (get-trans (the-as process-focusable gp-0) 0) quad)) + ) + ) + :exit (-> (method-of-type nav-enemy stare) exit) + :trans (behavior () + (when (and (time-elapsed? (-> self state-time) (-> self reaction-time)) (not (nav-enemy-method-174 self))) + (let ((v1-6 (-> self focus aware))) + (cond + ((>= 1 (the-as int v1-6)) + (go-virtual active) + ) + ((and (= v1-6 (enemy-aware ea3)) (get-focus! self)) + (go-virtual hostile) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (let ((gp-0 (set-reaction-time! self (seconds 0.2) (seconds 0.7))) + (s5-0 (current-time)) + (f28-0 f30-0) + ) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) + :num! (loop! f28-0) + :frame-num 0.0 + ) + (until (time-elapsed? s5-0 gp-0) + (suspend) + (ja :num! (loop! f28-0)) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info taunt-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (go-virtual stare) + ) + :post nav-enemy-stare-post + ) + +(defstate pacing (nav-enemy) + :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 + (let ((v1-9 self)) + (set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-9 enemy-flags)))) + ) + 0 + (nav-enemy-method-176 self) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self move-dest quad) (-> self root trans quad)) + (set! (-> self state-timeout) (set-reaction-time! self (seconds 7) (seconds 11))) + (set-time! (-> self starting-time)) + (if (zero? (rnd-int self 2)) + (set! (-> self enemy-flags) (the-as enemy-flag (logior (enemy-flag ef41) (-> self enemy-flags)))) + (set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag ef41)))) + ) + (let ((gp-0 (handle->process (-> self focus handle)))) + (if (not gp-0) + (go-virtual active) + ) + (set! (-> self focus-pos quad) (-> (get-trans (the-as process-focusable gp-0) 0) quad)) + ) + ) + :trans (behavior () + (let ((a0-1 (handle->process (-> self focus handle)))) + (if a0-1 + (set! (-> self focus-pos quad) (-> (get-trans (the-as process-focusable a0-1) 0) quad)) + ) + ) + (let ((gp-1 (-> self focus aware))) + (if (or (!= gp-1 3) (not (get-focus! self))) + (set-time! (-> self starting-time)) + ) + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (if (>= 1 (the-as int gp-1)) + (go-virtual active) + ) + (when (= gp-1 (enemy-aware ea3)) + (when (and (get-focus! self) (time-elapsed? (-> self starting-time) (-> self reaction-time))) + (nav-enemy-method-172 self) + (go-virtual hostile) + ) + (if (-> self enemy-info use-circling) + (go-virtual circling) + ) + ) + (if (nav-enemy-method-174 self) + (go-stare2 self) + ) + (when (time-elapsed? (-> self state-time) (-> self state-timeout)) + (nav-enemy-method-172 self) + (go-stare2 self) + ) + ) + ) + (when (>= 1024.0 (vector-vector-xz-distance (-> self root trans) (-> self move-dest))) + (when (and (time-elapsed? (-> self state-time) (-> self reaction-time)) (zero? (rnd-int self 3))) + (nav-enemy-method-172 self) + (go-stare2 self) + ) + (countdown (gp-4 2) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (f30-1 16384.0) + (v1-70 (-> self enemy-flags)) + (s5-0 (-> self move-dest)) + ) + (let ((v1-71 (logxor (shl 512 32) (the-as int v1-70)))) + (set! (-> self enemy-flags) (the-as enemy-flag v1-71)) + (if (logtest? (shl 512 32) v1-71) + (set! f30-1 (- f30-1)) + ) + ) + (set! (-> s5-0 quad) (-> self focus-pos quad)) + (vector-! s4-0 (-> self root trans) s5-0) + (set! (-> s4-0 y) 0.0) + (vector-normalize! s4-0 (rnd-float-range self 16384.0 49152.0)) + (vector-rotate-around-y! s4-0 s4-0 f30-1) + (vector+! s5-0 s5-0 s4-0) + (if (and (closest-point-on-mesh (-> self nav) s5-0 s5-0 (the-as nav-poly #f)) + (< 4096.0 (vector-vector-xz-distance s5-0 (-> self root trans))) + ) + (return #f) + ) + ) + ) + (go-stare2 self) + ) + ) + :code (behavior () + (let ((f30-0 (rnd-float-range self 0.9 1.1)) + (gp-0 (-> self draw art-group data (-> self enemy-info walk-anim))) + ) + (let ((v1-8 (ja-group))) + (if (not (and v1-8 (= v1-8 gp-0))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (until #f + (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)) + ) + ) + ) + #f + ) + :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 circling (nav-enemy) + :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)) + (let ((gp-0 (handle->process (-> self focus handle)))) + (if (not gp-0) + (go-virtual active) + ) + (set! (-> self focus-pos quad) (-> (get-trans (the-as process-focusable gp-0) 0) quad)) + ) + (let ((f30-0 (-> self enemy-info circle-dist-lo)) + (f28-0 (-> self enemy-info circle-dist-hi)) + ) + (if (zero? (rnd-int self 4)) + (set! (-> self desired-angle) (rnd-float-range self f30-0 f28-0)) + (set! (-> self desired-angle) + (fmax (fmin (vector-vector-xz-distance (-> self focus-pos) (-> self root trans)) f28-0) f30-0) + ) + ) + ) + (set! (-> self enemy-flags) (the-as enemy-flag (logxor (shl 512 32) (the-as int (-> self enemy-flags))))) + (set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag ef42)))) + (set-time! (-> self starting-time)) + ) + :trans (behavior () + (let ((a0-1 (handle->process (-> self focus handle)))) + (if a0-1 + (set! (-> self focus-pos quad) (-> (get-trans (the-as process-focusable a0-1) 0) quad)) + ) + ) + (let ((gp-1 (-> self focus aware))) + (if (or (!= gp-1 3) (not (get-focus! self))) + (set-time! (-> self starting-time)) + ) + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (cond + ((>= 1 (the-as int gp-1)) + (nav-enemy-method-172 self) + (if (-> self enemy-info use-stop-chase) + (go-virtual stop-chase) + (go-virtual active) + ) + ) + ((and (= gp-1 (enemy-aware ea3)) + (get-focus! self) + (time-elapsed? (-> self starting-time) (-> self reaction-time)) + ) + (nav-enemy-method-172 self) + (go-hostile self) + ) + ((= gp-1 (enemy-aware ea2)) + (go-stare self) + ) + ((= gp-1 (enemy-aware ea4)) + (go-flee self) + ) + ((or (nav-enemy-method-174 self) (logtest? (enemy-flag ef42) (-> self enemy-flags))) + (go-stare2 self) + ) + ) + ) + ) + ) + :code (behavior () + (let ((f30-0 (rnd-float-range self 0.9 1.1)) + (gp-0 (-> self draw art-group data (-> self enemy-info walk-anim))) + ) + (let ((v1-8 (ja-group))) + (if (not (and v1-8 (= v1-8 gp-0))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (until #f + (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)) + ) + ) + ) + #f + ) + :post (behavior () + (let ((a0-0 self)) + (when (logtest? (enemy-flag ef37) (-> a0-0 enemy-flags)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((f30-0 16384.0)) + (if (logtest? (enemy-flag ef41) (-> self enemy-flags)) + (set! f30-0 (- f30-0)) + ) + (set! (-> s5-0 quad) (-> self focus-pos quad)) + (vector-! gp-0 (-> self root trans) s5-0) + (set! (-> gp-0 y) 0.0) + (vector-normalize! gp-0 (-> self desired-angle)) + (vector+! s5-0 s5-0 gp-0) + (vector-rotate-around-y! gp-0 gp-0 f30-0) + ) + (vector-normalize! gp-0 16384.0) + (vector+! s5-0 s5-0 gp-0) + ) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set! (-> gp-1 quad) (-> self root trans quad)) + (closest-point-on-mesh (-> self nav) gp-1 s5-0 (the-as nav-poly #f)) + (if (< (vector-vector-xz-distance gp-1 (-> self root trans)) 409.6) + (set! (-> self enemy-flags) (the-as enemy-flag (logior (enemy-flag ef42) (-> self enemy-flags)))) + (set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag ef42)))) + ) + (let ((v1-28 (-> self nav state))) + (logclear! (-> v1-28 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-28 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-28 target-pos quad) (-> gp-1 quad)) + ) + ) + ) + 0 + ) + ) + (nav-enemy-travel-post) + ) + ) + +(defstate flee (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy flee) enter))) + (if t9-0 + (t9-0) + ) + ) + (nav-enemy-method-177 self) + (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 + (let ((v1-9 self)) + (set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-9 enemy-flags)))) + ) + 0 + (nav-enemy-method-173 self) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (let ((v1-3 (-> self focus aware))) + (if (!= v1-3 (enemy-aware ea4)) + (go-stare self) + ) + ) + (if (nav-enemy-method-174 self) + (go-stare2 self) + ) + ) + ) + :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)) + ) + ) + #f + ) + :post nav-enemy-flee-post + ) + +(defstate victory (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy victory) 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 ef37)))) + (set! (-> v1-4 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (let ((v1-9 self)) + (set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-9 enemy-flags)))) + ) + 0 + (vector-reset! (-> self root transv)) + ) + :post nav-enemy-simple-post + ) + +(defstate hit (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy hit) 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 ef37)))) + (set! (-> v1-4 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (let ((v1-9 self)) + (set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-9 enemy-flags)))) + ) + 0 + ) + :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-hostile self) + ) + :post nav-enemy-simple-post + ) + +(defstate knocked (nav-enemy) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy knocked) 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 ef37)))) + (set! (-> v1-4 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (let ((v1-9 self)) + (set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-9 enemy-flags)))) + ) + 0 + ) + :post nav-enemy-falling-post + ) + +(defstate die (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy die) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-4 self)) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-4 enemy-flags)))) + ) + 0 + (let ((v1-6 self)) + (set! (-> v1-6 enemy-flags) (the-as enemy-flag (logclear (-> v1-6 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-6 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + ) + :post nav-enemy-simple-post + ) + +(defstate die-falling (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy die-falling) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-4 self)) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-4 enemy-flags)))) + ) + 0 + (let ((v1-6 self)) + (set! (-> v1-6 enemy-flags) (the-as enemy-flag (logclear (-> v1-6 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-6 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + ) + :post nav-enemy-die-falling-post + ) + +;; WARN: Return type mismatch symbol vs object. +(defmethod enemy-method-91 ((this nav-enemy) (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 #x100068) + ) + ) + +;; WARN: Return type mismatch quaternion vs none. +(defmethod enemy-method-101 ((this nav-enemy) (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 ((a1-4 this)) + (if (logtest? (enemy-flag ef38) (-> a1-4 enemy-flags)) + (seek-to-point-toward-point! (-> this root) (-> arg1 dest-pos) (-> this nav max-rotation-rate) (seconds 0.02)) + ) + ) + ) + ) + (none) + ) + +(defstate jump (nav-enemy) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy jump) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-4 self)) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-4 enemy-flags)))) + ) + 0 + (let ((v1-6 self)) + (set! (-> v1-6 enemy-flags) (the-as enemy-flag (logclear (-> v1-6 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-6 nav callback-info) *null-nav-callback-info*) + ) + 0 + (logclear! (-> self nav state flags) (nav-state-flag at-gap)) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type enemy jump) exit))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-4 (-> self nav))) + (logclear! (-> v1-4 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + ) + :code (behavior () + (let ((gp-0 (new 'stack-no-clear 'enemy-jump-info))) + (let ((s5-0 0)) + (init-jump-info! self gp-0) + (if (and (-> self enemy-info use-jump-blocked) + (logtest? (enemy-flag jump-check-blocked) (-> self enemy-flags)) + (enemy-method-91 self gp-0) + ) + (go-virtual jump-blocked) + ) + (let* ((v1-13 (-> self nav)) + (a1-2 (-> gp-0 dest-pos)) + (f0-0 (-> v1-13 extra-nav-sphere w)) + ) + (set! (-> v1-13 extra-nav-sphere quad) (-> a1-2 quad)) + (set! (-> v1-13 extra-nav-sphere w) f0-0) + ) + 0 + (let ((v1-16 (-> self nav))) + (set! (-> v1-16 extra-nav-sphere w) (-> self nav-radius-backup)) + ) + 0 + (let ((v1-18 (-> self nav))) + (logior! (-> v1-18 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + (when (logtest? (-> gp-0 flags) (enemy-jump-flags ejf0)) + (until #f + (if (jump-anim-handler self s5-0 gp-0) + (goto cfg-12) + ) + (in-jump-handler self s5-0 gp-0) + (enemy-method-101 self s5-0 gp-0) + (suspend) + (set! s5-0 1) + ) + #f + ) + ) + (label cfg-12) + (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 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) + (enemy-method-101 self s5-1 gp-0) + (suspend) + (set! s5-1 3) + ) + ) + (logclear! (-> self focus-status) (focus-status in-air)) + (let ((v1-51 (-> self nav))) + (logclear! (-> v1-51 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + (let ((v1-55 (-> self nav state))) + (set! (-> v1-55 current-poly) (the-as nav-poly #f)) + ) + 0 + (logclear! (-> self nav state flags) (nav-state-flag at-target)) + (move-to-gspot! self) + (let ((s5-2 4)) + (until #f + (if (jump-anim-handler self s5-2 gp-0) + (goto cfg-19) + ) + (in-jump-handler self s5-2 gp-0) + (enemy-method-101 self s5-2 gp-0) + (suspend) + (set! s5-2 5) + ) + ) + #f + (label cfg-19) + (if (logtest? (enemy-flag directed) (-> self enemy-flags)) + ((lambda :behavior nav-enemy + ((arg0 enemy-jump-info)) + (send-event (ppointer->process (-> self parent)) 'child-jumped) + (none) + ) + gp-0 + ) + ) + ) + (go-directed2 self) + ) + :post (behavior () + (let ((a0-0 self)) + (cond + ((logtest? (enemy-flag ef37) (-> a0-0 enemy-flags)) + (nav-enemy-method-187 self) + ) + (else + (let ((a1-2 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-2 options) (overlaps-others-options)) + (set! (-> a1-2 collide-with-filter) (-> self enemy-info overlaps-others-collide-with-filter)) + (set! (-> a1-2 tlist) *touching-list*) + (find-overlapping-shapes (-> self root) a1-2) + ) + (nav-enemy-simple-post) + ) + ) + ) + ) + ) + +(defstate jump-blocked (nav-enemy) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy jump-blocked) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-4 self)) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-4 enemy-flags)))) + ) + 0 + (let ((v1-6 self)) + (set! (-> v1-6 enemy-flags) (the-as enemy-flag (logclear (-> v1-6 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-6 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + ) + :post nav-enemy-simple-post + ) + +(defstate directed (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logior! (-> self enemy-flags) (enemy-flag directed-ready)) + ((-> (method-of-type nav-enemy idle) enter)) + ) + :code (-> (method-of-type nav-enemy idle) code) + :post (-> (method-of-type nav-enemy idle) post) + ) + +(defstate view-anims (nav-enemy) + :virtual #t + :enter (behavior () + (when (-> self nav) + (let ((v1-1 self)) + (set! (-> v1-1 enemy-flags) (the-as enemy-flag (logclear (-> v1-1 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (let ((v1-3 self)) + (set! (-> v1-3 enemy-flags) (the-as enemy-flag (logclear (-> v1-3 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-3 nav callback-info) *null-nav-callback-info*) + ) + 0 + ) + ) + ) + +(defstate debug-control (nav-enemy) + :virtual #t + :event enemy-event-handler + :code (behavior () + (let ((v1-0 *nav-enemy-debug-control-info*)) + (set! (-> v1-0 steering) 0.0) + (set! (-> v1-0 throttle) 0.0) + ) + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info walk-anim)) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post nav-enemy-debug-control-post + ) diff --git a/goal_src/jak3/engine/nav/nav-engine.gc b/goal_src/jak3/engine/nav/nav-engine.gc index 358dc5dded..2bfd99957b 100644 --- a/goal_src/jak3/engine/nav/nav-engine.gc +++ b/goal_src/jak3/engine/nav/nav-engine.gc @@ -7,3 +7,532 @@ ;; DECOMP BEGINS +(deftype nav-engine-spr-buffer (structure) + ((mem-addr (pointer nav-mesh)) + (mem-nav uint32 :overlay-at mem-addr) + (spr-addr (inline-array nav-control)) + (spr-nav uint32 :overlay-at spr-addr) + (q-size uint32) + (i-nav uint8) + (done int8) + (nav-count int8) + (i-pass int8) + ) + :pack-me + ) + + +(deftype nav-engine (structure) + ((spr-addr uint32) + (nav-work-addr uint32) + (nav-mesh-addr nav-mesh) + (poly-array-addr uint32) + (hash-sphere-addr uint32) + (hash-buckets-addr uint32) + (buf-nav-control-count int8) + (max-pass-count int8) + (output-sphere-hash uint8) + (work-buf-array nav-engine-spr-buffer 3 :inline) + (spr-work nav-mesh-work :overlay-at nav-work-addr) + (mem-work nav-mesh-work) + (spr-mesh nav-mesh :overlay-at nav-mesh-addr) + (mem-mesh nav-mesh) + (spr-poly-array uint32 :overlay-at poly-array-addr) + (mem-poly-array (inline-array nav-poly)) + (hash-sphere-list uint32 :overlay-at hash-sphere-addr) + (hash-buckets uint32 :overlay-at hash-buckets-addr) + (to-spr-wait uint32) + (from-spr-wait uint32) + ) + (:methods + (inc-spr-addr! (_type_ uint) uint) + (lay-out-spad-memory (_type_ nav-mesh) none) + (set-up-mem-work (_type_) none) + (add-spheres-from-mesh-user-list (_type_ sphere-hash nav-mesh) none) + (add-all-spheres (_type_) none) + (do-sphere-lookups (_type_) none) + (update-nav-controls-pipelined-in-spr (_type_) none) + (update-nav-controls-in-spr (_type_) none) + (upload-nav-to-spr (_type_ nav-engine-spr-buffer) none) + (download-nav-from-spr (_type_ nav-engine-spr-buffer) none) + (do-callbacks (_type_ nav-engine-spr-buffer) none) + (reloc-ptrs-to-spad (_type_ nav-engine-spr-buffer) none) + (reloc-ptrs-to-mem (_type_ nav-engine-spr-buffer) none) + ) + ) + + +(defmethod inc-spr-addr! ((this nav-engine) (arg0 uint)) + (let ((v0-0 (-> this spr-addr))) + (+! (-> this spr-addr) arg0) + v0-0 + ) + ) + +(defmethod lay-out-spad-memory ((this nav-engine) (arg0 nav-mesh)) + (let ((s5-0 0)) + ;; og:preserve-this + (set! (-> this spr-addr) (scratchpad-object uint :offset #x60)) + (let* ((v1-1 this) + (a1-1 320) + (a0-1 (-> v1-1 spr-addr)) + ) + (+! (-> v1-1 spr-addr) a1-1) + (set! (-> this nav-work-addr) a0-1) + ) + (let* ((v1-2 this) + (a1-3 112) + (a0-2 (-> v1-2 spr-addr)) + ) + (+! (-> v1-2 spr-addr) a1-3) + (set! (-> this nav-mesh-addr) (the-as nav-mesh a0-2)) + ) + (if (and (= (-> arg0 work polys-in-scratch) 1) (< (-> arg0 poly-count) (the-as uint 64))) + (set! s5-0 (the-as int (-> arg0 poly-count))) + ) + (let* ((v1-10 this) + (a1-5 (* s5-0 64)) + (a0-4 (-> v1-10 spr-addr)) + ) + (+! (-> v1-10 spr-addr) a1-5) + (set! (-> this poly-array-addr) a0-4) + ) + (let* ((v1-11 this) + (a1-7 (* (-> arg0 sphere-hash max-object-count) 16)) + (a0-7 (-> v1-11 spr-addr)) + ) + (+! (-> v1-11 spr-addr) a1-7) + (set! (-> this hash-sphere-addr) a0-7) + ) + (let* ((v1-12 this) + (a1-9 0) + (a0-8 (-> v1-12 spr-addr)) + ) + (+! (-> v1-12 spr-addr) a1-9) + (set! (-> this hash-buckets-addr) a0-8) + ) + (set! (-> this buf-nav-control-count) 7) + (dotimes (v1-14 3) + (let ((a0-11 (-> this work-buf-array v1-14))) + (let* ((a1-11 this) + (a3-0 2048) + (a2-5 (-> a1-11 spr-addr)) + ) + (+! (-> a1-11 spr-addr) a3-0) + (set! (-> a0-11 spr-addr) (the-as (inline-array nav-control) a2-5)) + ) + (set! (-> a0-11 mem-addr) (the-as (pointer nav-mesh) 0)) + (set! (-> a0-11 q-size) (the-as uint 0)) + (set! (-> a0-11 nav-count) 0) + (set! (-> a0-11 i-pass) -1) + ) + ) + (set! (-> this output-sphere-hash) (the-as uint 0)) + (set! (-> this mem-mesh) arg0) + (cond + ((= (-> arg0 work mesh-struct-in-scratch) 1) + (set! (-> this nav-mesh-addr) (the-as nav-mesh (&-> (-> this nav-mesh-addr) poly-array))) + (mem-copy! (&-> (-> this nav-mesh-addr) type) (&-> arg0 type) 112) + ) + (else + (set! (-> this nav-mesh-addr) arg0) + ) + ) + (set! (-> this mem-work) (-> arg0 work)) + (if (= (-> arg0 work work-struct-in-scratch) 1) + (quad-copy! (the-as pointer (-> this nav-work-addr)) (the-as pointer (-> this mem-work)) 20) + (set! (-> this nav-work-addr) (the-as uint (-> arg0 work))) + ) + (set! (-> this nav-mesh-addr work) (the-as nav-mesh-work (-> this nav-work-addr))) + (set! (-> this mem-poly-array) (-> arg0 poly-array)) + (when (> s5-0 0) + (quad-copy! (the-as pointer (-> this poly-array-addr)) (the-as pointer (-> this mem-poly-array)) (* s5-0 4)) + (set! (-> this nav-mesh-addr poly-array) (the-as (inline-array nav-poly) (-> this poly-array-addr))) + ) + ) + 0 + (none) + ) + +(defmethod set-up-mem-work ((this nav-engine)) + (let ((v1-0 (-> this mem-mesh))) + (set! (-> v1-0 poly-array) (-> this mem-poly-array)) + (set! (-> v1-0 work) (-> this mem-work)) + ) + 0 + (none) + ) + +(defmethod add-spheres-from-mesh-user-list ((this nav-engine) (arg0 sphere-hash) (arg1 nav-mesh)) + (countdown (s3-0 (-> arg1 static-sphere-count)) + (add-a-sphere-with-flag arg0 (-> arg1 static-sphere s3-0) 64) + ) + (let* ((s4-1 (-> arg1 user-list)) + (v1-6 (-> s4-1 alive-list next0)) + (s3-1 (-> (the-as connection v1-6) next0)) + ) + (while (!= v1-6 (-> s4-1 alive-list-end)) + (let ((a0-4 (-> (the-as connection v1-6) param1)) + (s2-0 (the-as object (-> (the-as connection v1-6) param3))) + ) + (cond + ((-> (the-as connection v1-6) param2) + (let ((s1-0 (-> (the-as process-focusable a0-4) nav))) + (set! (-> s1-0 sec-per-frame) (-> (the-as process-focusable a0-4) clock seconds-per-frame)) + (set! (-> s1-0 root-nav-sphere quad) (-> (the-as collide-shape s2-0) trans quad)) + (set! (-> s1-0 root-nav-sphere w) (-> (the-as collide-shape s2-0) nav-radius)) + (if (logtest? (-> s1-0 flags) (nav-control-flag output-sphere-hash)) + (set! (-> this output-sphere-hash) (the-as uint 1)) + ) + (if (logtest? (-> (the-as collide-shape s2-0) nav-flags) (nav-flags has-root-sphere)) + (set! (-> s1-0 root-sphere-id) + (the-as uint (add-a-sphere-with-flag + arg0 + (-> s1-0 root-nav-sphere) + (the-as int (-> (the-as collide-shape s2-0) backup-collide-as)) + ) + ) + ) + ) + (if (logtest? (-> (the-as collide-shape s2-0) nav-flags) (nav-flags has-extra-sphere)) + (add-a-sphere-with-flag + arg0 + (-> s1-0 extra-nav-sphere) + (the-as int (-> (the-as collide-shape s2-0) backup-collide-as)) + ) + ) + ) + ) + (else + (when (logtest? (-> (the-as collide-shape s2-0) nav-flags) (nav-flags has-root-sphere)) + (let ((a1-5 (new 'stack-no-clear 'vector))) + (set! (-> a1-5 quad) (-> (the-as collide-shape s2-0) trans quad)) + (set! (-> a1-5 w) (-> (the-as collide-shape s2-0) nav-radius)) + (add-a-sphere-with-flag arg0 a1-5 (the-as int (-> (the-as collide-shape s2-0) backup-collide-as))) + ) + ) + ) + ) + (when (logtest? (-> (the-as collide-shape s2-0) nav-flags) (nav-flags has-child-spheres)) + (let ((s2-1 (-> (the-as collide-shape s2-0) root-prim)) + (s1-1 1) + ) + (when (zero? (-> s2-1 prim-core prim-type)) + (let ((v1-35 s2-1)) + (set! s2-1 (-> (the-as collide-shape-prim-group v1-35) child 0)) + (set! s1-1 (the-as int (-> v1-35 specific 0))) + ) + ) + (while (nonzero? s1-1) + (+! s1-1 -1) + (when (and (logtest? (collide-action nav-sphere) (-> s2-1 prim-core action)) (= (-> s2-1 prim-core prim-type) -1)) + (let ((a1-6 (new 'stack-no-clear 'vector))) + (set! (-> a1-6 quad) (-> s2-1 prim-core world-sphere quad)) + (set! (-> a1-6 w) (-> (the-as collide-shape-prim-sphere s2-1) nav-radius)) + (add-a-sphere-with-flag arg0 a1-6 (the-as int (-> s2-1 prim-core collide-as))) + ) + ) + (&+! s2-1 80) + ) + ) + ) + ) + (set! v1-6 s3-1) + (set! s3-1 (-> s3-1 next0)) + ) + ) + 0 + (none) + ) + +(defmethod add-all-spheres ((this nav-engine)) + (let ((s4-0 (-> this nav-mesh-addr)) + (gp-0 (-> this nav-mesh-addr sphere-hash)) + ) + (clear-objects! gp-0) + (set! (-> gp-0 bucket-array) (the-as (pointer grid-hash-word) (-> this hash-buckets-addr))) + (set! (-> gp-0 sphere-array) (the-as (inline-array sphere) (-> this hash-sphere-addr))) + (when *target* + (let ((a1-0 (new 'stack-no-clear 'vector))) + (let ((v1-8 (-> *target* control))) + (set! (-> a1-0 quad) (-> v1-8 trans quad)) + (set! (-> a1-0 w) (-> v1-8 nav-radius)) + ) + (add-a-sphere-with-flag gp-0 a1-0 2) + ) + ) + (add-spheres-from-mesh-user-list this gp-0 s4-0) + (let ((s3-0 (the-as nav-mesh (-> s4-0 next-nav-mesh)))) + (while (and s3-0 (nonzero? s3-0)) + (add-spheres-from-mesh-user-list this gp-0 s3-0) + (set! s3-0 (the-as nav-mesh (-> s3-0 next-nav-mesh))) + ) + ) + (let ((s4-1 (the-as nav-mesh (-> s4-0 prev-nav-mesh)))) + (while (and s4-1 (nonzero? s4-1)) + (add-spheres-from-mesh-user-list this gp-0 s4-1) + (set! s4-1 (the-as nav-mesh (-> s4-1 prev-nav-mesh))) + ) + ) + (update-from-spheres gp-0) + ) + 0 + (none) + ) + +(defmethod do-sphere-lookups ((this nav-engine)) + (let ((s5-0 (-> this nav-mesh-addr))) + (dotimes (s4-0 (the-as int (-> s5-0 nav-control-count))) + (let ((a0-3 (-> s5-0 nav-control-array s4-0))) + (when (-> a0-3 process) + (set! (-> a0-3 sphere-count) 0) + (set! (-> a0-3 state mesh) (-> this nav-mesh-addr)) + (set! (-> this mem-work nav) (the-as basic a0-3)) + (find-sphere-ids-from-sphere-hash a0-3 #f) + (set! (-> this mem-work nav) #f) + ) + ) + ) + ) + 0 + (none) + ) + +(def-mips2c nav-dma-send-to-spr-no-flush (function pointer pointer int none)) + +(def-mips2c nav-dma-send-from-spr-no-flush (function pointer pointer int none)) + +(defun inc-mod3 ((arg0 int)) + (local-vars (v0-1 int) (v1-1 int)) + (let ((v0-0 (+ arg0 1))) + (let ((v1-0 2)) + (set-on-less-than v1-1 v1-0 v0-0) + ) + (move-if-not-zero v0-1 0 v1-1 v0-0) + ) + v0-1 + ) + +(def-mips2c nav-state-patch-pointers (function nav-state int none)) + +(defmethod-mips2c "(method 17 nav-engine)" 17 nav-engine) + +(defmethod-mips2c "(method 18 nav-engine)" 18 nav-engine) + +(defmethod do-callbacks ((this nav-engine) (arg0 nav-engine-spr-buffer)) + (local-vars (sv-16 nav-callback-info)) + (with-pp + (dotimes (s4-0 (-> arg0 nav-count)) + (let* ((a1-1 (-> arg0 spr-addr s4-0)) + (a0-3 (-> a1-1 process)) + ) + (set! sv-16 (-> a1-1 callback-info)) + (when a0-3 + (set! (-> a1-1 state nav) a1-1) + (when (and (logtest? (-> a1-1 flags) (nav-control-flag kernel-run)) sv-16) + (let ((s3-0 pp)) + (set! pp a0-3) + (set! (-> this mem-mesh work nav) (the-as basic a1-1)) + (let ((v1-10 (-> sv-16 callback-count))) + (set! (-> this max-pass-count) (max (-> this max-pass-count) v1-10)) + (if (< (-> arg0 i-pass) v1-10) + ((-> sv-16 callback-array (-> arg0 i-pass)) a0-3 a1-1) + ) + ) + (set! pp s3-0) + ) + (set! (-> this mem-mesh work nav) #f) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod-mips2c "(method 20 nav-engine)" 20 nav-engine) + +(defmethod-mips2c "(method 21 nav-engine)" 21 nav-engine) + +(defmethod update-nav-controls-pipelined-in-spr ((this nav-engine)) + (local-vars + (v1-33 int) + (v1-45 int) + (v1-66 int) + (a0-14 int) + (a0-19 int) + (a0-26 int) + (sv-16 symbol) + (sv-24 int) + (sv-32 int) + (sv-40 uint) + (sv-44 (inline-array nav-control)) + (sv-48 nav-engine-spr-buffer) + ) + (flush-cache 0) + (set! (-> this max-pass-count) 3) + (set! sv-16 (the-as symbol #f)) + (set! sv-24 0) + (set! sv-32 0) + (set! sv-40 (-> this nav-mesh-addr nav-control-count)) + (set! sv-44 (-> this nav-mesh-addr nav-control-array)) + (let ((s5-0 2) + (s3-0 1) + (s4-0 0) + ) + (while (not sv-16) + (let ((s2-0 (-> this work-buf-array s5-0))) + (set! (-> s2-0 i-nav) (the-as uint sv-32)) + (set! (-> s2-0 nav-count) (min (-> this buf-nav-control-count) (the-as int (- sv-40 (the-as uint sv-32))))) + (set! (-> s2-0 i-pass) sv-24) + (set! (-> s2-0 mem-addr) (the-as (pointer nav-mesh) (-> sv-44 sv-32))) + (set! (-> s2-0 q-size) (the-as uint (* 18 (-> s2-0 nav-count)))) + (set! (-> s2-0 done) 0) + (when (>= sv-24 (-> this max-pass-count)) + (set! (-> s2-0 nav-count) 0) + 0 + ) + (if (> (-> s2-0 nav-count) 0) + (upload-nav-to-spr this s2-0) + (dma-sync (the-as pointer #x1000d400) 0 0) + ) + (set! sv-32 (+ sv-32 (-> s2-0 nav-count))) + (when (>= sv-32 (the-as int sv-40)) + (set! sv-32 0) + (set! sv-24 (+ sv-24 1)) + (if (= sv-24 (-> this max-pass-count)) + (set! (-> s2-0 done) 1) + ) + ) + ) + (let ((v1-32 (+ s5-0 1))) + (let ((a0-13 2)) + (set-on-less-than a0-14 a0-13 v1-32) + ) + (move-if-not-zero v1-33 0 a0-14 v1-32) + ) + (set! s5-0 v1-33) + (let ((s2-1 (-> this work-buf-array s4-0))) + (when (> (-> s2-1 nav-count) 0) + (download-nav-from-spr this s2-1) + (when (= (-> s2-1 done) 1) + (dma-sync (the-as pointer #x1000d000) 0 0) + (set! sv-16 #t) + ) + ) + ) + (let ((v1-44 (+ s4-0 1))) + (let ((a0-18 2)) + (set-on-less-than a0-19 a0-18 v1-44) + ) + (move-if-not-zero v1-45 0 a0-19 v1-44) + ) + (set! s4-0 v1-45) + (set! sv-48 (-> this work-buf-array s3-0)) + (when (> (-> sv-48 nav-count) 0) + (if (zero? (-> sv-48 i-pass)) + (reloc-ptrs-to-spad this sv-48) + ) + (do-callbacks this sv-48) + (if (= (-> sv-48 i-pass) (+ (-> this max-pass-count) -1)) + (reloc-ptrs-to-mem this sv-48) + ) + ) + (let ((v1-65 (+ s3-0 1))) + (let ((a0-25 2)) + (set-on-less-than a0-26 a0-25 v1-65) + ) + (move-if-not-zero v1-66 0 a0-26 v1-65) + ) + (set! s3-0 v1-66) + ) + ) + 0 + (none) + ) + +(defmethod update-nav-controls-in-spr ((this nav-engine)) + (flush-cache 0) + (set! (-> this max-pass-count) 1) + (let ((gp-0 (-> this work-buf-array))) + (set! (-> gp-0 0 i-nav) (the-as uint 0)) + (set! (-> gp-0 0 nav-count) (the-as int (-> this nav-mesh-addr nav-control-count))) + (set! (-> gp-0 0 i-pass) 0) + (set! (-> gp-0 0 mem-addr) (the-as (pointer nav-mesh) (-> this nav-mesh-addr nav-control-array))) + (set! (-> gp-0 0 q-size) (the-as uint (* 18 (-> gp-0 0 nav-count)))) + (set! (-> gp-0 0 done) 0) + (when (> (-> gp-0 0 nav-count) 0) + (upload-nav-to-spr this (the-as nav-engine-spr-buffer gp-0)) + (dma-sync (the-as pointer #x1000d400) 0 0) + (reloc-ptrs-to-spad this (the-as nav-engine-spr-buffer gp-0)) + (while (< (-> gp-0 0 i-pass) (-> this max-pass-count)) + (do-callbacks this (the-as nav-engine-spr-buffer gp-0)) + (+! (-> gp-0 0 i-pass) 1) + ) + (reloc-ptrs-to-mem this (the-as nav-engine-spr-buffer gp-0)) + (dotimes (s4-0 (-> gp-0 0 nav-count)) + (let ((a2-1 (-> gp-0 0 spr-addr s4-0 state mesh))) + ;; og:preserve-this + (when (in-scratchpad? a2-1) + (format 0 "nav-engine::update-nav-controls-in-spr: (pre-dma) bad mesh pointer found (#x0~x)~%" a2-1) + (break!) + 0 + ) + ) + ) + (download-nav-from-spr this (the-as nav-engine-spr-buffer gp-0)) + (dma-sync (the-as pointer #x1000d000) 0 0) + (dotimes (s5-1 (-> gp-0 0 nav-count)) + (let ((a2-3 (-> (&+ (-> gp-0 0 mem-addr) (* 288 s5-1)) 31))) + ;; og:preserve-this + (when (in-scratchpad? a2-3) + (format 0 "nav-engine::update-nav-controls-in-spr: (post-dma) bad mesh pointer found (#x0~x)~%" a2-3) + (break!) + 0 + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod update-navigation ((this nav-mesh)) + (local-vars (sp-0 int)) + (when (zero? (-> this next-nav-mesh)) + (set! (-> this next-nav-mesh) (the-as surface (nav-mesh-from-res-tag (-> this entity) 'next-actor 0))) + (set! (-> this prev-nav-mesh) (the-as surface (nav-mesh-from-res-tag (-> this entity) 'prev-actor 0))) + ) + (when (> (-> this nav-control-count) 0) + (the-as none sp-0) + (set! sp-0 #x70003fc0) + (set! (-> this work mesh) this) + ;; og:preserve-this + (let ((s4-0 (scratchpad-object nav-engine))) + (lay-out-spad-memory s4-0 this) + (add-all-spheres s4-0) + (do-sphere-lookups s4-0) + (when (nonzero? (-> s4-0 output-sphere-hash)) + (let ((s3-0 (-> s4-0 nav-mesh-addr sphere-hash))) + (quad-copy! (-> s3-0 mem-bucket-array) (-> s3-0 bucket-array) (/ (-> s3-0 bucket-memory-size) 16)) + (quad-copy! + (the-as pointer (-> s3-0 mem-sphere-array)) + (the-as pointer (-> s3-0 sphere-array)) + (-> s3-0 object-count) + ) + (set! (-> s3-0 bucket-array) (-> s3-0 mem-bucket-array)) + (set! (-> s3-0 sphere-array) (the-as (inline-array sphere) (-> s3-0 mem-sphere-array))) + ) + ) + (if (< (the-as uint (* 3 (-> s4-0 buf-nav-control-count))) (-> this nav-control-count)) + (update-nav-controls-pipelined-in-spr s4-0) + (update-nav-controls-in-spr s4-0) + ) + (set-up-mem-work s4-0) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/nav/nav-mesh-h.gc b/goal_src/jak3/engine/nav/nav-mesh-h.gc index fa343c5604..4951657847 100644 --- a/goal_src/jak3/engine/nav/nav-mesh-h.gc +++ b/goal_src/jak3/engine/nav/nav-mesh-h.gc @@ -7,6 +7,7 @@ (declare-type grid-hash structure) (declare-type sphere-hash structure) +(declare-type nav-mesh basic) (defenum nav-mesh-flag :type uint8 @@ -16,6 +17,19 @@ ) (define-extern nav-mesh-connect-from-ent (function process-drawable symbol)) +(define-extern find-nearest-nav-mesh (function vector float nav-mesh)) +(define-extern get-nav-mesh (function actor-id nav-mesh)) + +(deftype nav-stack-type2 (structure) + "nav-mesh::25" + ((float00 float :offset 0) + (float01 float :offset 8) + (word00 int32 :offset 16) + (word01 int32 :offset 20) + (word02 int32 :offset 24) + (word03 int32 :offset 28) + ) + ) ;; DECOMP BEGINS @@ -192,47 +206,47 @@ Based on the implementation of point-poly-intersection?, these should likely be (pad2 uint32 7) ) (:methods - (nav-mesh-method-9 () none) - (nav-mesh-method-10 () none) - (nav-mesh-method-11 () none) - (nav-mesh-method-12 () none) - (nav-mesh-method-13 () none) - (nav-mesh-method-14 () none) - (nav-mesh-method-15 () none) - (nav-mesh-method-16 () none) - (nav-mesh-method-17 () none) + (debug-draw (_type_) none) + (nav-mesh-method-10 (_type_ vector vector nav-poly) nav-poly) + (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) + (lookup-poly-on-route-to-target (_type_ nav-poly nav-poly) nav-poly) + (get-route-portal (_type_ nav-poly nav-poly nav-route-portal) (inline-array nav-vertex)) + (initialize-mesh! (_type_) none) (advance-ray-to-nearest-poly-edge-or-dest! (_type_ nav-ray) none) - (nav-mesh-method-19 () none) - (nav-mesh-method-20 () none) - (nav-mesh-method-21 () none) - (nav-mesh-method-22 () none) - (nav-mesh-method-23 () none) - (nav-mesh-method-24 () none) - (nav-mesh-method-25 () none) - (nav-mesh-method-26 () none) - (nav-mesh-method-27 () none) - (nav-mesh-method-28 () none) - (nav-mesh-method-29 () none) - (nav-mesh-method-30 () none) - (nav-mesh-method-31 () none) - (nav-mesh-method-32 () none) - (nav-mesh-method-33 () none) - (nav-mesh-method-34 () none) - (nav-mesh-method-35 () none) - (nav-mesh-method-36 () none) - (nav-mesh-method-37 () none) - (nav-mesh-method-38 () none) - (nav-mesh-method-39 () none) + (try-move-along-ray (_type_ nav-poly vector vector float) meters) + (clamp-vector-to-mesh-cross-gaps (_type_ vector nav-poly vector float symbol clamp-travel-vector-to-mesh-return-info) none) + (clamp-vector-to-mesh-no-gaps (_type_ vector nav-poly vector clamp-travel-vector-to-mesh-return-info) none) + (set-normals-from-adjacent-bounds (_type_ clamp-travel-vector-to-mesh-return-info) none) + (find-adjacent-bounds-one (_type_ vector nav-poly int int) none) + (compute-bounding-box-from-vertices (_type_ vector vector) none) + (init-from-entity (_type_ entity-nav-mesh) none) + (handle-birth (_type_) none) + (handle-kill (_type_) none) + (update-navigation (_type_) none) + (new-nav-control (_type_) nav-control) + (remove-nav-control (_type_ nav-control) none) + (add-process-drawable-to-nav-mesh (_type_ process-drawable symbol) none) + (remove-process-drawable (_type_ process-drawable) none) + (change-to (_type_ process-drawable) none) + (link-by-id (_type_ uint) symbol) + (unlink-by-id (_type_ uint) symbol) + (nav-mesh-method-36 (_type_ vector vector float) float) + (nav-mesh-method-37 (_type_ vector vector float) float) + (nav-mesh-method-38 (_type_ nav-poly) none) + (debug-draw-poly (_type_ nav-poly rgba) none) (point-in-poly? (_type_ nav-poly vector) symbol) - (nav-mesh-method-41 () none) + (nav-mesh-method-41 (_type_ nav-poly vector vector vector (pointer nav-poly)) vector) (closest-point-on-boundary (_type_ nav-poly vector vector) vector) - (nav-mesh-method-43 () none) + (project-point-onto-plane-of-poly-local (_type_ nav-poly vector vector vector) none) (project-point-into-poly-2d (_type_ nav-poly vector vector) vector) - (nav-mesh-method-45 () none) - (nav-mesh-method-46 () none) - (nav-mesh-method-47 () none) - (nav-mesh-method-48 () none) - (nav-mesh-method-49 () none) + (nav-mesh-method-45 (_type_ nav-poly) nav-poly) + (nav-mesh-method-46 (_type_ nav-poly) nav-poly) + (is-in-mesh-local? (_type_ vector float float) symbol) + (link-to-other-mesh (_type_ nav-mesh-link) symbol) + (unlink-mesh (_type_ nav-mesh-link) none) ) ) diff --git a/goal_src/jak3/engine/nav/nav-mesh.gc b/goal_src/jak3/engine/nav/nav-mesh.gc index cd7f7e83b0..4446d4e7df 100644 --- a/goal_src/jak3/engine/nav/nav-mesh.gc +++ b/goal_src/jak3/engine/nav/nav-mesh.gc @@ -7,3 +7,2145 @@ ;; DECOMP BEGINS +(rlet ((vf0 :class vf) (vf4 :class vf) (vf5 :class vf) (vf6 :class vf)) +(init-vf0-vector) + +(define *debug-nav-control-output* #f) + +(define *debug-nav-control* #f) + +(define *debug-nav-mesh-output* #f) + +(define *debug-nav-ray* (the-as nav-ray #f)) + +(define *debug-ray-offset* (new 'static 'vector)) + +(define *debug-offset* (new 'static 'vector :y 4096.0 :w 1.0)) + +(define *nav-mesh-work* (new 'static 'nav-mesh-work + :vert0-table (new 'static 'array int8 4 0 1 2 3) + :vert1-table (new 'static 'array int8 4 1 2 3 0) + :edge-mask-table (new 'static 'array uint8 3 #x1 #x2 #x4) + :deg-to-rad 0.000095873795 + :rad-to-deg 10430.379 + :nav-poly-min-dist 204.8 + :nav-poly-epsilon 40.96 + :debug (new 'static 'nav-mesh-work-debug) + :work-struct-in-scratch 1 + :mesh-struct-in-scratch 1 + :polys-in-scratch 1 + ) + ) + +(define *default-nav-mesh* (new 'static 'nav-mesh + :poly-array (new 'static 'inline-array nav-poly 1 + (new 'static 'nav-poly + :vertex (new 'static 'inline-array vector 4 + (new 'static 'vector :w -175458100000000000000000000000000000000.0) + (new 'static 'vector :w (the-as float #xffffffff)) + (new 'static 'vector) + (new 'static 'vector) + ) + ) + ) + :poly-count #x1 + :max-nav-control-count #x80 + :nav-control-array (new 'static 'inline-array nav-control 128 + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + ) + ) + ) + +(kmemopen global "nav-mesh") + +(let ((gp-0 *default-nav-mesh*)) + (set! (-> gp-0 work) *nav-mesh-work*) + (if (zero? (-> gp-0 user-list)) + (set! (-> gp-0 user-list) (new 'global 'engine 'nav-engine 128 connection)) + ) + (when (zero? (-> gp-0 poly-hash)) + (set! (-> gp-0 poly-hash) (new 'global 'grid-hash 16)) + (let ((v1-12 (new 'static 'inline-array vector 2 (new 'static 'vector) (new 'static 'vector)))) + (vector-reset! (-> v1-12 0)) + (vector-reset! (-> v1-12 1)) + (let ((a1-3 (-> v1-12 0))) + (let ((a0-5 (-> v1-12 0))) + (let ((a2-3 -4096.0)) + (.mov vf6 a2-3) + ) + (.lvf vf4 (&-> a0-5 quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> a1-3 quad) vf5) + ) + (let ((a1-4 (-> v1-12 1))) + (let ((a0-6 (-> v1-12 1))) + (let ((a2-5 4096.0)) + (.mov vf6 a2-5) + ) + (.lvf vf4 (&-> a0-6 quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> a1-4 quad) vf5) + ) + (update-grid-for-objects-in-box + (-> gp-0 poly-hash) + (the-as int (-> gp-0 poly-count)) + (-> v1-12 0) + (-> v1-12 1) + ) + ) + ) + ) + +(kmemclose) + +(defun nav-mesh-connect-from-ent ((arg0 process-drawable)) + (let ((s5-0 (nav-mesh-from-res-tag (-> arg0 entity) 'nav-mesh-actor 0))) + (cond + (s5-0 + (if (zero? (-> s5-0 user-list)) + (format 0 "nav-mesh-connect-from-ent: nav mesh not initialized!~%") + ) + (if (add-connection (-> s5-0 user-list) arg0 nothing arg0 #f (-> arg0 root)) + #t + ) + ) + (else + (if (-> arg0 entity) + (logior! (-> arg0 entity extra perm status) (entity-perm-status error)) + ) + #f + ) + ) + ) + ) + +(defun-debug connection-validate ((arg0 connection)) + (when (zero? arg0) + (break!) + 0 + ) + (when (zero? (-> arg0 next1)) + (break!) + 0 + ) + (when (zero? (-> arg0 prev1)) + (break!) + 0 + ) + (when (-> arg0 next1) + (when (!= arg0 (-> arg0 next1 prev1)) + (break!) + 0 + ) + ) + (when (-> arg0 prev1) + (when (!= arg0 (-> arg0 prev1 next1)) + (break!) + 0 + ) + ) + 0 + (none) + ) + +(defun-debug connection-list-validate ((arg0 (inline-array connection))) + (let ((gp-0 (the-as object (&-> arg0 3 prev1)))) + (while gp-0 + (connection-validate (the-as connection gp-0)) + (set! gp-0 (-> (the-as connection gp-0) next1)) + ) + ) + #f + ) + +(defun-debug nav-control-validate ((arg0 process-drawable)) + (let ((s5-0 (the-as object (-> arg0 nav)))) + (when (and (-> arg0 nav) (!= arg0 (-> arg0 nav process))) + (format 0 "process pointing to wrong nav-control!~%") + (break!) + 0 + ) + (let ((s4-0 (-> arg0 nav state mesh))) + (when (or (not s4-0) (zero? s4-0)) + (format 0 "nav control has invalid mesh~%") + (break!) + 0 + ) + (let ((v1-12 (- (the-as int s5-0) (the-as uint (the-as int (-> s4-0 nav-control-array 0)))))) + (when (or (< (the-as uint v1-12) 0) + (< (the-as uint (* (the-as uint 288) (-> s4-0 nav-control-count))) (the-as uint v1-12)) + ) + (format 0 "nav control (~,,8x) is not in the mesh's nav-control-array!~%" (the-as nav-control s5-0)) + (inspect s4-0) + (break!) + 0 + ) + ) + ) + ) + (connection-list-validate (the-as (inline-array connection) arg0)) + 0 + (none) + ) + +(defun-debug debug-validate-nav-poly ((arg0 nav-mesh-link) (arg1 nav-poly)) + (set! (-> *nav-mesh-work* poly1) (-> *nav-mesh-work* poly0)) + (set! (-> *nav-mesh-work* poly0) arg1) + (when arg1 + (let ((a2-1 arg1) + (a3-0 (+ (-> arg0 dest-mesh-id) 0)) + (t0-0 (+ (-> arg0 dest-mesh-id) (* (+ (-> arg0 src-switch-poly-id) -1) 64))) + ) + (when (or (< (the-as uint a2-1) a3-0) (< t0-0 (the-as uint a2-1))) + (format 0 "validate-nav-poly: bad poly pointer ~x range ~x ~x~%" a2-1 a3-0 t0-0) + (break!) + 0 + ) + ) + ) + 0 + (none) + ) + +(defmethod initialize-nav-mesh! ((this entity-nav-mesh)) + "Initialize the nav-mesh in this entity." + (let ((v1-0 (-> this nav-mesh))) + (if (nonzero? v1-0) + (init-from-entity v1-0 this) + ) + ) + 0 + (none) + ) + +(defmethod birth! ((this entity-nav-mesh)) + (let ((a0-1 (-> this nav-mesh))) + (if (nonzero? a0-1) + (handle-birth a0-1) + ) + ) + this + ) + +(defmethod kill! ((this entity-nav-mesh)) + (if (-> this nav-mesh) + (handle-kill (-> this nav-mesh)) + ) + this + ) + +(defmethod debug-draw ((this entity-nav-mesh)) + (add-debug-x + #t + (bucket-id debug-no-zbuf1) + (-> this nav-mesh bounds) + (new 'static 'rgba :r #x80 :g #xff :b #x80 :a #x80) + ) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this nav-mesh bounds quad)) + (let ((a0-6 (new 'stack 'random-generator))) + (set! (-> a0-6 seed) (-> this aid)) + (let* ((v1-4 (rand-uint31-gen a0-6)) + (f30-0 (* 182.04445 (the float (logand v1-4 #xffff)))) + ) + (+! (-> s5-0 x) (* 4096.0 (cos f30-0))) + (+! (-> s5-0 z) (* 4096.0 (sin f30-0))) + ) + ) + (add-debug-text-3d + #t + (bucket-id debug-no-zbuf1) + (res-lump-struct this 'name string) + s5-0 + (font-color white) + (new 'static 'vector2h :y 8) + ) + (let ((s4-1 add-debug-text-3d) + (s3-1 #t) + (s2-1 577) + ) + (format (clear *temp-string*) "aid ~D" (-> this aid)) + (s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* s5-0 (font-color white) (new 'static 'vector2h :y 16)) + ) + ) + (debug-draw (-> this nav-mesh)) + 0 + (none) + ) + +(defmethod get-simple-travel-vector ((this entity-actor) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 object) (arg4 float)) + (local-vars (at-0 int) (at-1 int)) + (with-pp + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (nav-mesh-from-res-tag this 'nav-mesh-actor 0))) + (cond + (gp-0 + (let ((v1-0 arg0)) + (.lvf vf1 (&-> arg2 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 (&-> v1-0 quad) vf1) + ) + (let ((s3-1 (new 'stack-no-clear 'nav-find-poly-parms))) + (vector-! (-> s3-1 point) arg1 (the-as vector (-> gp-0 bounds))) + (set! (-> s3-1 y-threshold) 40960.0) + (set! (-> s3-1 ignore) (the-as uint 3)) + (let ((a2-2 (nav-mesh-method-45 gp-0 (the-as nav-poly s3-1)))) + (cond + (a2-2 + (clamp-vector-to-mesh-cross-gaps + gp-0 + (-> s3-1 point) + a2-2 + arg0 + 2048.0 + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + (let ((v1-7 arg0)) + (.lvf vf1 (&-> arg0 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 (&-> v1-7 quad) vf1) + ) + ) + (else + (set! (-> arg0 x) (* (-> arg0 x) (- arg4))) + (set! (-> arg0 y) (* (-> arg0 y) (-> pp clock frames-per-second))) + (set! (-> arg0 z) (* (-> arg0 z) (- arg4))) + ) + ) + ) + ) + gp-0 + ) + (else + (set! (-> arg0 quad) (-> arg2 quad)) + (the-as nav-mesh #f) + ) + ) + ) + ) + ) + ) + +(defmethod project-point-to-nav-mesh ((this entity-actor) (arg0 vector) (arg1 vector) (arg2 nav-poly) (arg3 float)) + (local-vars (sv-16 vector)) + (let ((gp-0 (nav-mesh-from-res-tag this 'nav-mesh-actor 0))) + (cond + (gp-0 + (set! sv-16 arg0) + (let ((s5-1 (new 'stack-no-clear 'nav-find-poly-parms))) + (set! (-> s5-1 poly) arg2) + (vector-! (-> s5-1 point) arg1 (the-as vector (-> gp-0 bounds))) + (when (or (not (-> s5-1 poly)) (not (point-in-poly? gp-0 (-> s5-1 poly) (-> s5-1 point)))) + (set! (-> s5-1 y-threshold) arg3) + (set! (-> s5-1 ignore) (the-as uint 3)) + (nav-mesh-method-46 gp-0 (the-as nav-poly s5-1)) + (when (-> s5-1 poly) + (project-point-into-poly-2d gp-0 (-> s5-1 poly) sv-16 (-> s5-1 point)) + (vector+! sv-16 sv-16 (the-as vector (-> gp-0 bounds))) + ) + ) + (-> s5-1 poly) + ) + ) + (else + (set! (-> arg0 quad) (-> arg1 quad)) + (the-as nav-poly #f) + ) + ) + ) + ) + +;; WARN: Return type mismatch uint vs int. +(defmethod length ((this nav-mesh)) + (the-as int (-> this poly-count)) + ) + +(defmethod debug-draw-poly ((this nav-mesh) (arg0 nav-poly) (arg1 rgba)) + (let ((gp-0 (new 'stack-no-clear 'inline-array 'vector 3))) + (set! (-> gp-0 0 quad) (-> this bounds quad)) + (if (logtest? (-> arg0 pat) 15) + (+! (-> gp-0 0 y) 409.6) + ) + (let ((v1-7 (the-as int (+ (-> arg0 vertex-count) -1)))) + (dotimes (s2-0 (the-as int (-> arg0 vertex-count))) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (vector+! (-> gp-0 1) (-> gp-0 0) (-> arg0 vertex s2-0)) + (vector+! (-> gp-0 2) (-> gp-0 0) (-> arg0 vertex v1-7)) + arg1 + #f + (the-as rgba -1) + ) + (set! v1-7 s2-0) + ) + ) + (when (and (logtest? (-> arg0 pat) 4) (< (-> arg0 link) (-> this link-count))) + (poly-centroid this arg0 (-> gp-0 1)) + (let ((s5-1 (-> this link-array (-> arg0 link)))) + (add-debug-x #t (bucket-id debug-no-zbuf1) (-> gp-0 1) *color-magenta*) + (let ((s4-1 add-debug-text-3d) + (s3-1 #t) + (s2-1 577) + ) + (format (clear *temp-string*) "link ~D" (-> s5-1 id)) + (s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* (-> gp-0 1) (font-color pink) (new 'static 'vector2h :y 8)) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod new-nav-control ((this nav-mesh)) + (let ((gp-0 (the-as nav-control #f))) + (let ((v1-0 0)) + (b! #t cfg-4 :delay (nop!)) + (label cfg-1) + (let ((a1-1 (-> this nav-control-array v1-0))) + (b! (-> a1-1 process) cfg-3 :delay (empty-form)) + (set! gp-0 a1-1) + ) + (set! (-> gp-0 process) (the-as process 0)) + (set! (-> gp-0 state mesh) this) + (b! #t cfg-8 :delay (nop!)) + (label cfg-3) + (+! v1-0 1) + (label cfg-4) + (b! (< v1-0 (the-as int (-> this nav-control-count))) cfg-1) + ) + (let ((v1-3 (-> this nav-control-count))) + (cond + ((< v1-3 (-> this max-nav-control-count)) + (+! (-> this nav-control-count) 1) + (set! gp-0 (-> this nav-control-array v1-3)) + (set! (-> gp-0 state mesh) this) + ) + (else + (format + 0 + "nav-mesh::new-nav-control: too many users for nav-mesh ~s~%" + (res-lump-struct (-> this entity) 'name structure) + ) + ) + ) + ) + (label cfg-8) + gp-0 + ) + ) + +(defmethod remove-nav-control ((this nav-mesh) (arg0 nav-control)) + (set! (-> arg0 process) #f) + (let ((v1-1 (+ (-> this nav-control-count) -1))) + (while (and (>= v1-1 0) (not (-> this nav-control-array v1-1 process))) + (+! v1-1 -1) + ) + (set! (-> this nav-control-count) (+ v1-1 1)) + ) + 0 + (none) + ) + +(defmethod add-process-drawable-to-nav-mesh ((this nav-mesh) (arg0 process-drawable) (arg1 symbol)) + (if arg1 + (change-to this arg0) + (add-connection (-> this user-list) arg0 nothing arg0 #f (-> arg0 root)) + ) + 0 + (none) + ) + +(defmethod remove-process-drawable ((this nav-mesh) (arg0 process-drawable)) + (remove-from-process (-> this user-list) arg0) + (let ((a1-2 (-> arg0 nav))) + (when (nonzero? a1-2) + (remove-nav-control this a1-2) + (set! (-> arg0 nav) #f) + ) + ) + 0 + (none) + ) + +(defmethod change-to ((this nav-mesh) (arg0 process-drawable)) + (local-vars (s3-0 nav-control)) + (cond + ((zero? (-> this user-list)) + (go process-drawable-art-error "nav mesh not initialized") + ) + ((not arg0) + (go process-drawable-art-error "nav mesh proc pointer is #f") + ) + ((begin + (set! s3-0 (-> arg0 nav)) + (if (zero? s3-0) + (set! s3-0 (the-as nav-control #f)) + ) + (or (not s3-0) (!= this (-> s3-0 state mesh))) + ) + (let ((s4-0 (new-nav-control this))) + (b! s4-0 cfg-14 :delay (empty-form)) + (b! (not *debug-segment*) cfg-13 :delay (empty-form)) + (format 0 "ERROR: nav-mesh::change-to: unable to allocate nav-mesh for ~s~%" arg0) + (label cfg-13) + (b! #t cfg-20 :delay (nop!)) + (label cfg-14) + (cond + (s3-0 + (quad-copy! (the-as pointer s4-0) (the-as pointer s3-0) 18) + (set! (-> s4-0 state mesh) this) + (set! (-> s4-0 state nav) s4-0) + (set! (-> s4-0 state current-poly) #f) + (set! (-> s4-0 state virtual-current-poly) #f) + (set! (-> s4-0 state next-poly) #f) + (set! (-> s4-0 state user-poly) #f) + (set! (-> s4-0 state target-poly) #f) + (let ((s2-0 (-> s3-0 state mesh))) + (remove-nav-control s2-0 s3-0) + (remove-from-process (-> s2-0 user-list) arg0) + ) + ) + (else + (init! s4-0 (the-as collide-shape (-> arg0 root))) + ) + ) + (set-nearest-y-thres! s4-0 (-> this nearest-y-threshold)) + (set! (-> arg0 nav) s4-0) + ) + (add-connection (-> this user-list) arg0 nothing arg0 #t (-> arg0 root)) + (send-event arg0 'nav-mesh-new :from arg0) + ) + ) + (label cfg-20) + 0 + (none) + ) + +(defmethod link-to-other-mesh ((this nav-mesh) (arg0 nav-mesh-link)) + (when (not (-> arg0 dest-mesh)) + (let* ((s4-0 (entity-nav-mesh-by-aid (the-as actor-id (-> arg0 dest-mesh-id)))) + (v1-1 (if (type? s4-0 entity-nav-mesh) + s4-0 + ) + ) + ) + (when v1-1 + (let ((a0-3 (-> v1-1 nav-mesh)) + (v1-2 (the-as nav-mesh-link #f)) + ) + (let ((a1-2 0)) + (b! #t cfg-8 :delay (nop!)) + (label cfg-5) + (let ((a2-1 (-> a0-3 link-array a1-2))) + (let ((a3-1 (-> arg0 id))) + (b! (!= (-> a2-1 id) a3-1) cfg-7 :delay (empty-form)) + ) + (set! v1-2 a2-1) + ) + (b! #t cfg-10 :delay (nop!)) + (label cfg-7) + (+! a1-2 1) + (label cfg-8) + (b! (< a1-2 (the-as int (-> a0-3 link-count))) cfg-5) + ) + (label cfg-10) + (when v1-2 + (set! (-> arg0 dest-mesh) a0-3) + (set! (-> v1-2 dest-mesh) this) + (set! (-> arg0 dest-link-poly-id) (-> v1-2 src-switch-poly-id)) + (set! (-> arg0 dest-switch-poly-id) (-> v1-2 src-link-poly-id)) + (set! (-> v1-2 dest-link-poly-id) (-> arg0 src-switch-poly-id)) + (set! (-> v1-2 dest-switch-poly-id) (-> arg0 src-link-poly-id)) + #t + ) + ) + ) + ) + ) + ) + +(defmethod unlink-mesh ((this nav-mesh) (arg0 nav-mesh-link)) + (let ((a0-1 (-> arg0 dest-mesh))) + (b! (not a0-1) cfg-9 :delay (empty-form)) + (let ((v1-0 (the-as nav-mesh-link #f))) + (let ((a2-1 0)) + (b! #t cfg-5 :delay (nop!)) + (label cfg-2) + (let ((a3-1 (-> a0-1 link-array a2-1))) + (let ((t0-1 (-> arg0 id))) + (b! (!= (-> a3-1 id) t0-1) cfg-4 :delay (empty-form)) + ) + (set! v1-0 a3-1) + ) + (b! #t cfg-7 :delay (nop!)) + (label cfg-4) + (+! a2-1 1) + (label cfg-5) + (b! (< a2-1 (the-as int (-> a0-1 link-count))) cfg-2) + ) + (label cfg-7) + (when v1-0 + (set! (-> arg0 dest-mesh) #f) + (set! (-> v1-0 dest-mesh) #f) + ) + ) + ) + (label cfg-9) + 0 + (none) + ) + +(defmethod link-by-id ((this nav-mesh) (arg0 uint)) + (let ((v1-0 (the-as nav-mesh-link #f))) + (let ((a2-0 0)) + (b! #t cfg-4 :delay (nop!)) + (label cfg-1) + (let ((a3-1 (-> this link-array a2-0))) + (b! (!= (-> a3-1 id) arg0) cfg-3 :delay (empty-form)) + (set! v1-0 a3-1) + ) + (b! #t cfg-6 :delay (nop!)) + (label cfg-3) + (+! a2-0 1) + (label cfg-4) + (b! (< a2-0 (the-as int (-> this link-count))) cfg-1) + ) + (label cfg-6) + (if v1-0 + (link-to-other-mesh this v1-0) + ) + ) + ) + +(defmethod unlink-by-id ((this nav-mesh) (arg0 uint)) + (let ((v1-0 (the-as nav-mesh-link #f))) + (let ((a2-0 0)) + (b! #t cfg-4 :delay (nop!)) + (label cfg-1) + (let ((a3-1 (-> this link-array a2-0))) + (b! (!= (-> a3-1 id) arg0) cfg-3 :delay (empty-form)) + (set! v1-0 a3-1) + ) + (b! #t cfg-6 :delay (nop!)) + (label cfg-3) + (+! a2-0 1) + (label cfg-4) + (b! (< a2-0 (the-as int (-> this link-count))) cfg-1) + ) + (label cfg-6) + (when v1-0 + (unlink-mesh this v1-0) + #t + ) + ) + ) + +(defmethod init-from-entity ((this nav-mesh) (arg0 entity-nav-mesh)) + (local-vars (sv-16 res-tag)) + (set! (-> this entity) arg0) + (set! (-> this work) *nav-mesh-work*) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-2 (res-lump-data arg0 'nav-mesh-sphere (inline-array sphere) :tag-ptr (& sv-16)))) + (when v1-2 + (set! (-> this static-sphere-count) (-> sv-16 elt-count)) + (set! (-> this static-sphere) v1-2) + ) + ) + (set! (-> this nearest-y-threshold) (res-lump-float arg0 'nearest-y-threshold :default 40960.0)) + (set! (-> this flags) (res-lump-value arg0 'nav-mesh-flags nav-mesh-flag :time -1000000000.0)) + (set! (-> this water-max-height) (res-lump-float arg0 'water-max-height :default 8192.0)) + (if (nonzero? (-> this poly-hash)) + (set! (-> this poly-hash work) *grid-hash-work*) + ) + (let ((s5-0 (new 'stack-no-clear 'nav-stack-type2))) + (set! (-> s5-0 word00) + (res-lump-value arg0 'nav-max-users int :default (the-as uint128 64) :time -1000000000.0) + ) + (set! (-> this user-list) (new 'loading-level 'engine 'nav-engine (-> s5-0 word00) connection)) + (set! (-> this nav-control-array) + (the-as (inline-array nav-control) (malloc 'loading-level (* 288 (-> s5-0 word00)))) + ) + (set! (-> this nav-control-count) (the-as uint 0)) + (set! (-> this max-nav-control-count) (the-as uint (-> s5-0 word00))) + (set! (-> s5-0 word01) (/ (+ (-> s5-0 word00) 7) 8)) + (dotimes (v1-16 3) + (set! (-> (the-as (pointer float) (+ (* v1-16 4) (the-as int s5-0)))) + (- (-> this poly-hash box-max v1-16) (-> this poly-hash box-min v1-16)) + ) + ) + (set! (-> s5-0 word02) + (the int + (+ 1.0 (* (fmax 1.0 (* 0.000015258789 (-> s5-0 float00))) (fmax 1.0 (* 0.000015258789 (-> s5-0 float01))))) + ) + ) + (set! (-> s5-0 word03) (min 4096 (* (-> s5-0 word01) (-> s5-0 word02)))) + (set! (-> this sphere-hash) + (new 'loading-level 'sphere-hash (-> s5-0 word03) (+ (-> s5-0 word00) (-> this static-sphere-count))) + ) + ) + (initialize-mesh! this) + 0 + (none) + ) + +(defmethod handle-birth ((this nav-mesh)) + (dotimes (s5-0 (the-as int (-> this link-count))) + (let ((a1-0 (-> this link-array s5-0))) + (if (not (-> a1-0 dest-mesh)) + (link-to-other-mesh this a1-0) + ) + ) + ) + 0 + (none) + ) + +(defmethod handle-kill ((this nav-mesh)) + (when (nonzero? (-> this user-list)) + (countdown (s5-0 (-> this nav-control-count)) + (let* ((v1-3 (-> this nav-control-array s5-0)) + (s4-0 (-> v1-3 process)) + ) + (when s4-0 + (when (not (send-event (-> v1-3 process) 'nav-mesh-kill)) + (format 0 "ERROR: object ~A did not accept nav-mesh kill~%" s4-0) + (deactivate s4-0) + ) + ) + ) + ) + (remove-all (-> this user-list)) + (dotimes (s5-1 (the-as int (-> this link-count))) + (let ((a1-2 (-> this link-array s5-1))) + (if (-> a1-2 dest-mesh) + (unlink-mesh this a1-2) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod debug-draw ((this nav-mesh)) + (local-vars (sv-32 vector) (sv-36 int)) + (set! sv-32 (new 'stack-no-clear 'vector)) + (set! sv-36 16) + (add-debug-sphere + (logtest? sv-36 4) + (bucket-id debug) + (-> this bounds) + (-> this bounds r) + (new 'static 'rgba :r #xff :g #xff :a #x20) + ) + (add-debug-vector #t (bucket-id debug-no-zbuf1) (-> this bounds) *x-vector* (meters 1) *color-red*) + (add-debug-vector #t (bucket-id debug-no-zbuf1) (-> this bounds) *z-vector* (meters 1) *color-blue*) + (when (logtest? sv-36 16) + (dotimes (s5-0 (the-as int (-> this static-sphere-count))) + (add-debug-sphere + #t + (bucket-id debug) + (-> this static-sphere s5-0) + (-> this static-sphere s5-0 r) + *color-light-blue* + ) + (let ((s4-0 add-debug-text-3d) + (s3-0 #t) + (s2-0 577) + ) + (format (clear *temp-string*) "~D" s5-0) + (s4-0 + s3-0 + (the-as bucket-id s2-0) + *temp-string* + (-> this static-sphere s5-0) + (font-color cyan) + (the-as vector2h #f) + ) + ) + ) + (dotimes (s5-1 (the-as int (-> this poly-count))) + (let ((s4-1 (-> this poly-array s5-1))) + (debug-draw-poly this s4-1 (cond + ((logtest? (-> s4-1 pat) 1) + *color-black* + ) + ((logtest? (-> s4-1 pat) 2) + *color-gray* + ) + ((logtest? (-> s4-1 pat) 4) + (if (-> this link-array (-> s4-1 link) dest-mesh) + *color-green* + *color-light-red* + ) + ) + ((logtest? (-> s4-1 pat) 8) + *color-magenta* + ) + (else + *color-cyan* + ) + ) + ) + (when (logtest? sv-36 32) + (let ((s3-1 add-debug-text-3d) + (s2-1 #t) + (s1-1 577) + ) + (format (clear *temp-string*) "~D" (-> s4-1 id)) + (s3-1 + s2-1 + (the-as bucket-id s1-1) + *temp-string* + (poly-centroid this s4-1 sv-32) + (font-color cyan) + (the-as vector2h #f) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod poly-centroid-local ((this nav-mesh) (arg0 nav-poly) (arg1 vector)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (vector-reset! v1-0) + (dotimes (a0-2 (the-as int (-> arg0 vertex-count))) + (vector+! v1-0 v1-0 (-> arg0 vertex a0-2)) + ) + (vector-float*! arg1 v1-0 (/ 1.0 (the float (-> arg0 vertex-count)))) + ) + ) + +(defmethod poly-centroid ((this nav-mesh) (arg0 nav-poly) (arg1 vector)) + (poly-centroid-local this arg0 arg1) + (vector+! arg1 arg1 (the-as vector (-> this bounds))) + ) + +(defun vu-point-triangle-intersection? ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector)) + (local-vars (v1-0 float) (v1-1 int) (v1-3 int) (a0-1 float) (a0-2 int) (a0-4 int) (a1-1 float) (a1-2 int)) + (rlet ((acc :class vf) + (vf1 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf12 :class vf) + (vf13 :class vf) + (vf14 :class vf) + (vf15 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf9 :class vf) + ) + (.lvf vf1 (&-> arg1 quad)) + (.lvf vf2 (&-> arg2 quad)) + (.sub.vf vf1 vf1 vf1 :mask #b1010) + (.lvf vf3 (&-> arg3 quad)) + (.sub.vf vf2 vf2 vf2 :mask #b1010) + (.lvf vf12 (&-> arg0 quad)) + (.sub.vf vf3 vf3 vf3 :mask #b1010) + (.sub.vf vf4 vf2 vf1) + (.sub.vf vf9 vf1 vf12) + (.sub.vf vf5 vf3 vf2) + (.sub.vf vf10 vf2 vf12) + (.sub.vf vf6 vf1 vf3) + (.sub.vf vf11 vf3 vf12) + (.outer.product.a.vf acc vf9 vf4) + (.outer.product.b.vf vf13 vf4 vf9 acc) + (.outer.product.a.vf acc vf10 vf5) + (.outer.product.b.vf vf14 vf5 vf10 acc) + (.outer.product.a.vf acc vf11 vf6) + (.outer.product.b.vf vf15 vf6 vf11 acc) + (.mov v1-0 vf13) + (.mov a1-1 vf14) + (.mov a0-1 vf15) + (set-on-less-than v1-1 v1-0 0) + (set-on-less-than a1-2 a1-1 0) + (set-on-less-than a0-2 a0-1 0) + (let ((a0-3 (logxor a1-2 a0-2)) + (v1-2 (logxor v1-1 a1-2)) + ) + (set-on-less-than a0-4 a0-3 1) + (set-on-less-than v1-3 v1-2 1) + ) + (logtest? v1-3 a0-4) + ) + ) + +(defun poly-in-height-range? ((arg0 nav-poly) (arg1 float) (arg2 float)) + (and (>= (+ (-> arg0 vertex3 w) arg2) arg1) (>= arg1 (- (-> arg0 vertex2 w) arg2))) + ) + +(defmethod nav-mesh-method-45 ((this nav-mesh) (arg0 nav-poly)) + (local-vars (v1-15 int) (sv-16 nav-poly)) + (let ((s4-0 (search-for-point (-> this poly-hash) (the-as vector (-> arg0 vertex)))) + (s3-0 (-> this poly-hash bucket-size)) + (s2-0 0) + ) + (until (zero? v1-15) + (let ((s1-0 (* s2-0 8)) + (s0-0 (-> s4-0 0)) + ) + (b! (zero? s0-0) cfg-17 :delay (nop!)) + ;; og:preserve-this + (label cfg-2) + (let ((v1-2 (logand s0-0 1))) + (nop!) + (b! (zero? v1-2) cfg-16 :delay (nop!)) + ) + (set! sv-16 (-> this poly-array s1-0)) + (let ((v1-5 sv-16) + (f0-0 (-> arg0 vertex0 y)) + (f1-0 (-> arg0 vertex1 x)) + ) + (when (and (and (>= (+ (-> v1-5 vertex3 w) f1-0) f0-0) (>= f0-0 (- (-> v1-5 vertex2 w) f1-0))) + (not (logtest? (-> sv-16 pat) (-> arg0 data 20))) + ) + (if (point-in-poly? this sv-16 (the-as vector (-> arg0 vertex))) + (return sv-16) + ) + ) + ) + (label cfg-16) + ;; og:preserve-this cast + (set! s0-0 (the-as uint (/ (the-as int s0-0) 2))) + (nop!) + (b! (nonzero? s0-0) cfg-2 :delay (set! s1-0 (+ s1-0 1))) + ) + (label cfg-17) + (+! s2-0 1) + (set! s4-0 (&-> s4-0 1)) + (set-on-less-than v1-15 s2-0 s3-0) + (nop!) + ) + ) + 0 + (the-as nav-poly #f) + ) + +(defmethod is-in-mesh-local? ((this nav-mesh) (arg0 vector) (arg1 float) (arg2 float)) + (local-vars (sv-16 float) (sv-20 vector) (sv-24 float)) + (set! sv-16 arg2) + (set! sv-20 arg0) + (set! sv-24 arg1) + (let* ((f0-3 (+ sv-24 (-> this bounds r))) + (f0-5 (* f0-3 f0-3)) + (v1-1 sv-20) + ) + (when (>= f0-5 (+ (* (-> v1-1 x) (-> v1-1 x)) (* (-> v1-1 z) (-> v1-1 z)))) + (let ((s5-0 (new 'stack-no-clear 'nav-poly))) + (set! (-> s5-0 vertex 0 quad) (-> sv-20 quad)) + (set! (-> s5-0 vertex1 x) sv-16) + (set! (-> s5-0 data 20) (the-as uint 2)) + (nav-mesh-method-46 this s5-0) + (cond + ((-> s5-0 vertex2 x) + #t + ) + (else + (let ((s4-0 (new 'stack-no-clear 'vector))) + (project-point-into-poly-2d this (the-as nav-poly (-> s5-0 vertex1 z)) s4-0 sv-20) + (let ((f0-7 (vector-vector-xz-distance-squared s4-0 sv-20)) + (f1-5 sv-24) + ) + (< f0-7 (* f1-5 f1-5)) + ) + ) + ) + ) + ) + ) + ) + ) + +(defun init-ray-local ((arg0 nav-ray) (arg1 nav-poly) (arg2 vector) (arg3 vector)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (set! (-> arg0 current-pos quad) (-> arg2 quad)) + (set! (-> arg0 dest-pos quad) (-> arg3 quad)) + (set! (-> arg0 current-poly) arg1) + (let ((v1-2 arg0)) + (vector-! (-> v1-2 dir) (-> v1-2 dest-pos) (-> v1-2 current-pos)) + (set! (-> v1-2 dir y) 0.0) + (let ((a0-2 (-> v1-2 dir))) + (let ((f0-1 1.0)) + (.lvf vf1 (&-> a0-2 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a1-3 f0-1)) + (.mov vf3 a1-3) + ) + ) + (.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 (&-> a0-2 quad) vf1) + ) + (set! (-> v1-2 next-poly) #f) + (set! (-> v1-2 len) 0.0) + (set! (-> v1-2 last-edge) -1) + (set! (-> v1-2 terminated) #f) + (set! (-> v1-2 reached-dest) #f) + (set! (-> v1-2 hit-boundary) #f) + (set! (-> v1-2 hit-gap) #f) + (set! (-> v1-2 ignore) (the-as uint 3)) + ) + 0 + (none) + ) + ) + +(defun init-ray-dir-local ((arg0 nav-ray) (arg1 nav-poly) (arg2 vector) (arg3 vector) (arg4 float)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (set! (-> arg0 current-poly) arg1) + (set! (-> arg0 current-pos quad) (-> arg2 quad)) + (let ((a1-3 (-> arg0 dest-pos))) + (let ((v1-1 (-> arg0 current-pos))) + (let ((a2-1 arg3)) + (let ((a3-1 arg4)) + (.mov vf7 a3-1) + ) + (.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-3 quad) vf6) + ) + (let ((v1-2 arg0)) + (vector-! (-> v1-2 dir) (-> v1-2 dest-pos) (-> v1-2 current-pos)) + (set! (-> v1-2 dir y) 0.0) + (let ((a0-2 (-> v1-2 dir))) + (let ((f0-2 1.0)) + (.lvf vf1 (&-> a0-2 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a1-6 f0-2)) + (.mov vf3 a1-6) + ) + ) + (.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 (&-> a0-2 quad) vf1) + ) + (set! (-> v1-2 next-poly) #f) + (set! (-> v1-2 len) 0.0) + (set! (-> v1-2 last-edge) -1) + (set! (-> v1-2 terminated) #f) + (set! (-> v1-2 reached-dest) #f) + (set! (-> v1-2 hit-boundary) #f) + (set! (-> v1-2 hit-gap) #f) + (set! (-> v1-2 ignore) (the-as uint 3)) + ) + 0 + (none) + ) + ) + +(defmethod try-move-along-ray ((this nav-mesh) (arg0 nav-poly) (arg1 vector) (arg2 vector) (arg3 float)) + (local-vars (v1-2 symbol)) + (let ((gp-0 (new 'stack-no-clear 'nav-ray))) + (let ((s4-0 0)) + (init-ray-dir-local gp-0 arg0 arg1 arg2 arg3) + (until v1-2 + (+! s4-0 1) + (advance-ray-to-nearest-poly-edge-or-dest! this gp-0) + (set! v1-2 (or (>= s4-0 15) (-> gp-0 terminated))) + ) + ) + (-> gp-0 len) + ) + ) + +(defun nav-ray-test ((arg0 nav-mesh) (arg1 nav-poly) (arg2 vector) (arg3 vector)) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) arg2 (the-as vector (-> arg0 bounds)))) + (s3-1 (vector-! (new 'stack-no-clear 'vector) arg3 arg2)) + ) + 0.0 + (set! (-> s3-1 y) 0.0) + (let ((f30-0 (vector-vector-xz-distance arg2 arg3))) + (vector-xz-normalize! s3-1 1.0) + (try-move-along-ray arg0 arg1 s4-1 s3-1 f30-0) + ) + ) + ) + +(defun point-poly-distance-min ((arg0 nav-mesh-work) (arg1 nav-poly) (arg2 float) (arg3 nav-poly)) + (let ((t0-0 (-> arg3 vertex-count)) + (a3-1 (-> arg3 vertex)) + (f0-0 arg2) + ) + (let ((v1-0 0)) + (let ((f1-0 (-> arg1 vertex0 x)) + (f2-0 (-> arg1 vertex0 z)) + (a1-1 0) + ) + (b! #t cfg-10 :delay (nop!)) + (label cfg-1) + (let* ((t2-0 (-> a3-1 (-> arg0 vert0-table a1-1))) + (t1-6 (-> a3-1 (-> arg0 vert1-table a1-1))) + (f5-0 (- (-> t1-6 x) (-> t2-0 x))) + (f6-0 (- (-> t1-6 z) (-> t2-0 z))) + (f4-2 (- f1-0 (-> t2-0 x))) + (f3-4 (- f2-0 (-> t2-0 z))) + (f7-1 (- (* f5-0 f3-4) (* f6-0 f4-2))) + ) + (b! (>= 0.0 f7-1) cfg-9 :delay #f) + (+! v1-0 1) + (let* ((f8-2 f5-0) + (f8-4 (* f8-2 f8-2)) + (f9-0 f6-0) + (f8-5 (+ f8-4 (* f9-0 f9-0))) + ) + (let* ((f9-3 arg2) + (f9-6 (* f8-5 (* f9-3 f9-3))) + (f10-0 f7-1) + ) + (b! (< f9-6 (* f10-0 f10-0)) cfg-13) + ) + (let ((f5-2 (+ (* f5-0 f4-2) (* f6-0 f3-4)))) + arg2 + (b! (>= f5-2 0.0) cfg-5) + (let ((f3-8 (sqrtf (+ (* f4-2 f4-2) (* f3-4 f3-4))))) + (b! #t cfg-8 :delay (nop!)) + (label cfg-5) + (b! (>= f8-5 f5-2) cfg-7) + (let* ((f3-10 (- f1-0 (-> t1-6 x))) + (f3-12 (* f3-10 f3-10)) + (f4-6 (- f2-0 (-> t1-6 z))) + ) + (set! f3-8 (sqrtf (+ f3-12 (* f4-6 f4-6)))) + ) + (b! #t cfg-8 :delay (nop!)) + (label cfg-7) + (set! f0-0 (/ f7-1 (sqrtf f8-5))) + (b! #t cfg-13 :delay (nop!)) + (label cfg-8) + (set! f0-0 (fmin f0-0 f3-8)) + ) + ) + ) + ) + (label cfg-9) + (+! a1-1 1) + (label cfg-10) + (b! (< a1-1 (the-as int t0-0)) cfg-1) + ) + (if (zero? v1-0) + (set! f0-0 0.0) + ) + ) + (label cfg-13) + f0-0 + ) + ) + +(defmethod nav-mesh-method-46 ((this nav-mesh) (arg0 nav-poly)) + (local-vars + (v1-16 int) + (v1-31 int) + (sv-16 nav-poly) + (sv-20 (pointer uint8)) + (sv-24 nav-poly) + (sv-28 float) + (sv-32 int) + (sv-40 int) + (sv-48 nav-poly) + (sv-52 float) + ) + (set! sv-16 (the-as nav-poly #f)) + (set! sv-20 (search-for-sphere (-> this poly-hash) (the-as vector (-> arg0 vertex)) 12288.0)) + (set! (-> arg0 vertex2 x) (the-as float #f)) + (let ((s4-0 (-> this poly-hash bucket-size)) + (s3-0 sv-20) + (s2-0 0) + ) + (nop!) + (until (zero? v1-16) + (let ((s1-0 (* s2-0 8)) + (s0-0 (-> s3-0 0)) + ) + (b! (zero? s0-0) cfg-17 :delay (nop!)) + ;; og:preserve-this + (label cfg-2) + (let ((v1-3 (logand s0-0 1))) + (nop!) + (b! (zero? v1-3) cfg-16 :delay (nop!)) + ) + (set! sv-24 (-> this poly-array s1-0)) + (let ((v1-6 sv-24) + (f0-0 (-> arg0 vertex0 y)) + (f1-0 (-> arg0 vertex1 x)) + ) + (when (and (and (>= (+ (-> v1-6 vertex3 w) f1-0) f0-0) (>= f0-0 (- (-> v1-6 vertex2 w) f1-0))) + (not (logtest? (-> sv-24 pat) (-> arg0 data 20))) + ) + (when (point-in-poly? this sv-24 (the-as vector (-> arg0 vertex))) + (set! (-> arg0 vertex2 x) (the-as float #t)) + (set! (-> arg0 vertex1 w) 0.0) + (set! sv-16 sv-24) + (goto cfg-38) + ) + ) + ) + (label cfg-16) + ;; og:preserve-this cast + (set! s0-0 (the-as uint (/ (the-as int s0-0) 2))) + (nop!) + (b! (nonzero? s0-0) cfg-2 :delay (set! s1-0 (+ s1-0 1))) + ) + (label cfg-17) + (+! s2-0 1) + (set! s3-0 (&-> s3-0 1)) + (set-on-less-than v1-16 s2-0 s4-0) + (nop!) + ) + ) + (set! sv-28 (the-as float 10000000000000000000000000000000000000.0)) + (set! sv-32 0) + (set! sv-40 0) + (let ((s4-1 (-> this poly-hash bucket-size)) + (s3-1 sv-20) + (s2-1 0) + ) + (until (zero? v1-31) + (let ((s1-1 (* s2-1 8)) + (s0-1 (-> s3-1 0)) + ) + (b! (zero? s0-1) cfg-34 :delay (nop!)) + ;; og:preserve-this + (label cfg-20) + (let ((v1-19 (logand s0-1 1))) + (nop!) + (b! (zero? v1-19) cfg-33 :delay (nop!)) + ) + (set! sv-48 (-> this poly-array s1-1)) + (let ((v1-22 sv-48) + (f0-3 (-> arg0 vertex0 y)) + (f1-2 (-> arg0 vertex1 x)) + ) + (when (and (and (>= (+ (-> v1-22 vertex3 w) f1-2) f0-3) (>= f0-3 (- (-> v1-22 vertex2 w) f1-2))) + (not (logtest? (-> sv-48 pat) (-> arg0 data 20))) + ) + (set! sv-40 (+ sv-40 1)) + (set! sv-52 (point-poly-distance-min (-> this work) (the-as nav-poly (-> arg0 vertex)) sv-28 sv-48)) + (when (< sv-52 sv-28) + (set! sv-28 sv-52) + (set! sv-16 sv-48) + (nop!) + ) + ) + ) + (label cfg-33) + ;; og:preserve-this cast + (set! s0-1 (the-as uint (/ (the-as int s0-1) 2))) + (nop!) + (b! (nonzero? s0-1) cfg-20 :delay (set! s1-1 (+ s1-1 1))) + ) + (label cfg-34) + (+! s2-1 1) + (set! s3-1 (&-> s3-1 1)) + (set-on-less-than v1-31 s2-1 s4-1) + (nop!) + ) + ) + (if (not sv-16) + (set! sv-16 (-> this poly-array 0)) + ) + (set! (-> arg0 vertex1 w) sv-28) + (label cfg-38) + (set! (-> arg0 vertex1 z) (the-as float sv-16)) + arg0 + ) + +(defun nav-mesh-route-table-bit-index ((arg0 nav-mesh) (arg1 uint) (arg2 int)) + (* (+ arg2 (* arg1 (-> arg0 poly-count))) 2) + ) + +(defmethod get-route-portal ((this nav-mesh) (arg0 nav-poly) (arg1 nav-poly) (arg2 nav-route-portal)) + (set! (-> arg2 next-poly) #f) + (cond + ((and arg0 arg1 (!= arg0 arg1)) + (let* ((a1-1 this) + (v1-1 (-> arg0 id)) + (v1-4 (* (+ (-> arg1 id) (* v1-1 (-> a1-1 poly-count))) 2)) + (s3-0 + (logand (the-as int (ash (the-as int (-> this route (shr v1-4 3))) (- (the-as int (logand v1-4 7))))) 3) + ) + ) + (set! (-> arg2 edge-index) -1) + (let ((s2-0 (-> arg0 adj-poly s3-0))) + (when (= s2-0 255) + (format 0 "nav-mesh::get-route-portal: data error in nav mesh~%") + (break!) + 0 + ) + (set! (-> arg2 edge-index) s3-0) + (set! (-> arg2 next-poly) (-> this poly-array s2-0)) + ) + (let ((a0-7 s3-0) + (v1-16 (+ s3-0 1)) + ) + (if (>= (the-as uint v1-16) (-> arg0 vertex-count)) + (set! v1-16 0) + ) + (set! (-> arg2 vertex 1 quad) (-> arg0 vertex a0-7 quad)) + (let ((v0-1 (-> arg2 vertex))) + (set! (-> v0-1 0 quad) (-> arg0 vertex v1-16 quad)) + v0-1 + ) + ) + ) + ) + (else + (the-as (inline-array nav-vertex) #f) + ) + ) + ) + +(defmethod lookup-poly-on-route-to-target ((this nav-mesh) (arg0 nav-poly) (arg1 nav-poly)) + (cond + ((and arg0 arg1 (!= arg0 arg1)) + (let* ((a3-0 this) + (v1-1 (-> arg0 id)) + (v1-4 (* (+ (-> arg1 id) (* v1-1 (-> a3-0 poly-count))) 2)) + (v1-9 (logand (ash (the-as int (-> this route (shr v1-4 3))) (- (the-as int (logand v1-4 7)))) 3)) + (a2-5 (new 'stack-no-clear 'array 'int8 4)) + ) + (set! (-> a2-5 0) (the-as int (-> arg0 adj-poly0))) + (set! (-> a2-5 1) (the-as int (-> arg0 adj-poly1))) + (set! (-> a2-5 2) (the-as int (-> arg0 adj-poly2))) + (set! (-> a2-5 3) (the-as int (-> arg0 adj-poly3))) + (let ((v1-11 (-> (the-as (pointer uint8) (&+ a2-5 v1-9))))) + (if (= v1-11 255) + (the-as nav-poly #f) + (-> this poly-array v1-11) + ) + ) + ) + ) + (else + (the-as nav-poly #f) + ) + ) + ) + +(defmethod compute-bounding-box-from-vertices ((this nav-mesh) (arg0 vector) (arg1 vector)) + (let ((f0-0 10000000000000000000000000000000000000.0) + (f1-0 -10000000000000000000000000000000000000.0) + ) + (set! (-> arg0 x) f0-0) + (set! (-> arg0 y) f0-0) + (set! (-> arg0 z) f0-0) + (set! (-> arg1 x) f1-0) + (set! (-> arg1 y) f1-0) + (set! (-> arg1 z) f1-0) + ) + (dotimes (v1-3 (the-as int (-> this poly-count))) + (let ((a3-1 (-> this poly-array v1-3))) + (dotimes (t0-1 (the-as int (-> a3-1 vertex-count))) + (let ((t1-2 (-> a3-1 vertex t0-1))) + (set! (-> arg0 x) (fmin (-> arg0 x) (-> t1-2 x))) + (set! (-> arg0 y) (fmin (-> arg0 y) (-> t1-2 y))) + (set! (-> arg0 z) (fmin (-> arg0 z) (-> t1-2 z))) + (set! (-> arg1 x) (fmax (-> arg1 x) (-> t1-2 x))) + (set! (-> arg1 y) (fmax (-> arg1 y) (-> t1-2 y))) + (set! (-> arg1 z) (fmax (-> arg1 z) (-> t1-2 z))) + ) + ) + ) + ) + (vector+! arg0 arg0 (the-as vector (-> this bounds))) + (vector+! arg1 arg1 (the-as vector (-> this bounds))) + 0 + (none) + ) + +(defmethod initialize-mesh! ((this nav-mesh)) + (local-vars + (sv-32 vector) + (sv-36 uint) + (sv-40 int) + (sv-48 int) + (sv-56 int) + (sv-64 symbol) + (sv-68 (inline-array vector)) + (sv-72 vector) + (sv-76 vector) + ) + (with-pp + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (set! sv-32 (new 'stack-no-clear 'vector)) + (set! sv-36 (-> this poly-count)) + (set! sv-40 0) + (set! sv-48 0) + (set! sv-56 0) + (set! sv-64 (the-as symbol #f)) + (countdown (s5-0 sv-36) + (let ((v1-3 (-> this poly-array s5-0))) + (if (logtest? (-> v1-3 pat) 1) + (set! sv-56 (+ sv-56 1)) + ) + (set! sv-68 (-> v1-3 vertex)) + (set! sv-72 (-> v1-3 vertex1)) + (set! sv-76 (-> v1-3 vertex2)) + ) + (vector-3pt-cross! sv-32 (the-as vector sv-68) sv-72 sv-76) + (cond + ((= (vector-length sv-32) 0.0) + (set! sv-40 (+ sv-40 1)) + ) + (else + (let ((v1-9 sv-32)) + (let ((f0-1 1.0)) + (.lvf vf1 (&-> v1-9 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-11 f0-1)) + (.mov vf3 a0-11) + ) + ) + (.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-9 quad) vf1) + ) + (if (>= 0.0 (-> sv-32 y)) + (set! sv-48 (+ sv-48 1)) + ) + ) + ) + ) + (when (zero? sv-36) + (format #t "WARNING: nav-mesh has no triangles. ") + (set! sv-64 #t) + ) + (when (> sv-40 0) + (format #t "WARNING: nav-mesh has ~D triangles with zero area (out of ~D triangles). " sv-40 sv-36) + (set! sv-64 #t) + ) + (when (> sv-48 0) + (format #t "WARNING: nav-mesh has ~D triangles with inverted normals (out of ~D triangles). " sv-48 sv-36) + (set! sv-64 #t) + ) + (when (< (the-as uint 255) sv-36) + (format #t "WARNING: nav-mesh has ~D triangles (only up to ~D are allowed). " sv-36 255) + (set! sv-64 #t) + ) + (when (= sv-56 sv-36) + (format #t "WARNING: nav-mesh only contains gap triangles (~D triangles total). " sv-36) + (set! sv-64 #t) + ) + (when sv-64 + (if pp + (format #t "current process is ~A~%" (-> pp name)) + (format #t "(no current process).~%") + ) + ) + 0 + (none) + ) + ) + ) + +(defun ray-ccw-line-segment-intersection? ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector)) + (let ((f0-2 (- (* (-> arg2 x) (-> arg1 z)) (* (-> arg2 z) (-> arg1 x)))) + (f2-4 (- (* (-> arg3 x) (-> arg1 z)) (* (-> arg3 z) (-> arg1 x)))) + (f3-4 (- (* (-> arg0 x) (-> arg1 z)) (* (-> arg0 z) (-> arg1 x)))) + (v0-0 #f) + ) + (let ((f1-7 (- f2-4 f0-2)) + (f2-5 (- f2-4 f3-4)) + (f3-5 (- f3-4 f0-2)) + ) + (when (and (>= (fabs f1-7) (fmax (fabs f3-5) (fabs f2-5))) (!= f1-7 0.0)) + (let ((f0-7 (+ (* (-> arg1 x) (- (-> arg3 z) (-> arg2 z))) (* (-> arg1 z) (- (-> arg2 x) (-> arg3 x)))))) + (set! v0-0 (< 0.0 f0-7)) + ) + ) + ) + v0-0 + ) + ) + +(defun ray-line-segment-intersection? ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector)) + (let ((f1-3 (- (* (-> arg2 x) (-> arg1 z)) (* (-> arg2 z) (-> arg1 x)))) + (f0-4 (- (* (-> arg3 x) (-> arg1 z)) (* (-> arg3 z) (-> arg1 x)))) + (f2-6 (- (* (-> arg0 x) (-> arg1 z)) (* (-> arg0 z) (-> arg1 x)))) + (gp-0 #f) + ) + (let ((f30-0 (- f0-4 f1-3)) + (f0-5 (- f0-4 f2-6)) + (f1-4 (- f2-6 f1-3)) + ) + (when (and (>= (fabs f30-0) (fmax (fabs f1-4) (fabs f0-5))) (!= f30-0 0.0)) + (let ((f2-11 (+ (* (-> arg2 x) (-> arg1 x)) (* (-> arg2 z) (-> arg1 z)))) + (f3-11 (+ (* (-> arg3 x) (-> arg1 x)) (* (-> arg3 z) (-> arg1 z)))) + (f28-0 (+ (* (-> arg0 x) (-> arg1 x)) (* (-> arg0 z) (-> arg1 z)))) + ) + (if (>= (* (+ (* f2-11 f0-5) (* f3-11 f1-4)) (sign f30-0)) (* f28-0 (fabs f30-0))) + (set! gp-0 #t) + ) + ) + ) + ) + gp-0 + ) + ) + +(defmethod nav-mesh-method-41 ((this nav-mesh) (arg0 nav-poly) (arg1 vector) (arg2 vector) (arg3 vector) (arg4 (pointer nav-poly))) + (local-vars + (s1-0 vector) + (sv-16 int) + (sv-24 nav-mesh-work) + (sv-28 uint) + (sv-32 (pointer int8)) + (sv-36 (pointer int8)) + (sv-40 vector) + (sv-44 vector) + ) + (set! sv-16 -1) + (set! sv-24 (-> this work)) + (set! sv-28 (-> arg0 vertex-count)) + (set! sv-32 (-> sv-24 vert0-table)) + (set! sv-36 (-> sv-24 vert1-table)) + (set! (-> arg2 quad) (-> arg3 quad)) + (dotimes (v1-8 (the-as int sv-28)) + (set! sv-40 (-> arg0 vertex (-> sv-32 v1-8))) + (set! sv-44 (-> arg0 vertex (-> sv-36 v1-8))) + (let* ((f0-1 (- (-> sv-40 z) (-> sv-44 z))) + (f1-2 (- (-> sv-44 x) (-> sv-40 x))) + (f2-4 (+ (* f0-1 (- (-> sv-40 x) (-> arg1 x))) (* f1-2 (- (-> sv-40 z) (-> arg1 z))))) + (f0-3 (+ (* (-> arg2 x) f0-1) (* (-> arg2 z) f1-2))) + ) + (when (< f2-4 f0-3) + (set! sv-16 v1-8) + (let ((f0-4 (/ f2-4 f0-3))) + (set! (-> arg2 x) (* (-> arg2 x) f0-4)) + (set! (-> arg2 z) (* (-> arg2 z) f0-4)) + ) + ) + ) + ) + (when arg4 + (cond + ((= sv-16 -1) + (set! (-> arg4 0) #f) + ) + (else + (while (!= sv-16 -1) + (let ((v1-16 (-> arg0 adj-poly sv-16))) + (cond + ((!= v1-16 255) + (set! (-> arg4 0) (-> this poly-array v1-16)) + (set! sv-16 -1) + ) + ((let ((a1-1 (-> arg0 vertex (-> sv-32 sv-16)))) + (set! s1-0 (-> arg0 vertex (-> sv-36 sv-16))) + (< (vector-vector-xz-distance arg1 a1-1) (-> this work nav-poly-min-dist)) + ) + (set! sv-16 (+ sv-16 -1)) + (if (< sv-16 0) + (set! sv-16 (the-as int (+ sv-28 -1))) + ) + ) + ((< (vector-vector-xz-distance arg1 s1-0) (-> this work nav-poly-min-dist)) + (set! sv-16 (+ sv-16 1)) + (when (>= sv-16 (the-as int sv-28)) + (set! sv-16 0) + 0 + ) + ) + (else + (set! (-> arg4 0) #f) + (set! sv-16 -1) + ) + ) + ) + ) + ) + ) + ) + (set! (-> arg2 y) (-> arg1 y)) + arg2 + ) + +(defun plane-height-at-xz-point ((arg0 plane) (arg1 vector)) + (/ (- (+ (* (-> arg1 x) (-> arg0 x)) (* (-> arg1 z) (-> arg0 z)) (-> arg0 w))) (-> arg0 y)) + ) + +(defun nav-normal-from-3-points ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector)) + (normal-of-plane arg0 arg1 arg2 arg3) + 0 + (none) + ) + +(defmethod project-point-onto-plane-of-poly-local ((this nav-mesh) (arg0 nav-poly) (arg1 vector) (arg2 vector) (arg3 vector)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (cond + ((= (-> arg0 vertex-count) 3) + (nav-normal-from-3-points s4-0 (the-as vector (-> arg0 vertex)) (-> arg0 vertex1) (-> arg0 vertex2)) + ) + ((let* ((v1-2 (-> arg0 vertex2)) + (a0-3 (-> arg0 vertex)) + (f0-1 (- (-> a0-3 0 x) (-> v1-2 x))) + (f1-2 (- (-> a0-3 0 z) (-> v1-2 z))) + (f2-2 (- (-> arg3 x) (-> v1-2 x))) + (f0-3 (- (* f0-1 (- (-> arg3 z) (-> v1-2 z))) (* f1-2 f2-2))) + ) + (< 0.0 f0-3) + ) + (nav-normal-from-3-points s4-0 (the-as vector (-> arg0 vertex)) (-> arg0 vertex2) (-> arg0 vertex3)) + ) + (else + (nav-normal-from-3-points s4-0 (the-as vector (-> arg0 vertex)) (-> arg0 vertex1) (-> arg0 vertex2)) + ) + ) + (set! (-> arg2 quad) (-> s4-0 quad)) + (set! (-> s4-0 w) (- (vector-dot s4-0 (the-as vector (-> arg0 vertex))))) + (set! (-> s5-0 quad) (-> arg3 quad)) + (set! (-> s5-0 y) (/ (- (+ (* (-> arg3 x) (-> s4-0 x)) (* (-> arg3 z) (-> s4-0 z)) (-> s4-0 w))) (-> s4-0 y))) + ) + (set! (-> arg1 quad) (-> s5-0 quad)) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs nav-mesh. +(defmethod mem-usage ((this nav-mesh) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 47 (-> usage length))) + (set! (-> usage data 46 name) "nav-mesh") + (+! (-> usage data 46 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 46 used) v1-6) + (+! (-> usage data 46 total) (logand -16 (+ v1-6 15))) + ) + (set! (-> usage length) (max 47 (-> usage length))) + (set! (-> usage data 46 name) "nav-mesh") + (+! (-> usage data 46 count) 1) + (let ((v1-16 (* (-> this poly-count) 64))) + (+! (-> usage data 46 used) v1-16) + (+! (-> usage data 46 total) (logand -16 (+ v1-16 15))) + ) + (set! (-> usage length) (max 47 (-> usage length))) + (set! (-> usage data 46 name) "nav-mesh") + (+! (-> usage data 46 count) 1) + (let* ((v1-25 (-> this poly-count)) + (v1-27 (shr (* v1-25 v1-25) 2)) + ) + (+! (-> usage data 46 used) v1-27) + (+! (-> usage data 46 total) (logand -16 (+ v1-27 15))) + ) + (the-as nav-mesh 0) + ) + +(defun get-nav-mesh ((arg0 actor-id)) + (let ((gp-0 (the-as nav-mesh #f))) + (let* ((s5-0 (entity-nav-mesh-by-aid arg0)) + (v1-0 (if (type? s5-0 entity-nav-mesh) + s5-0 + ) + ) + ) + (if v1-0 + (set! gp-0 (-> v1-0 nav-mesh)) + ) + ) + gp-0 + ) + ) + +(defun find-nearest-nav-mesh ((arg0 vector) (arg1 float)) + (local-vars (v1-15 float) (sv-64 nav-find-poly-parms) (sv-68 nav-mesh) (sv-72 float) (sv-76 vector)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set! sv-64 (new 'stack-no-clear 'nav-find-poly-parms)) + (set! sv-68 (the-as nav-mesh #f)) + (set! sv-72 arg1) + (set! sv-76 arg0) + (set! (-> sv-64 ignore) (the-as uint 7)) + (dotimes (gp-0 (-> *level* length)) + (let ((v1-5 (-> *level* level gp-0))) + (when (= (-> v1-5 status) 'active) + (let ((s5-0 (-> v1-5 bsp nav-meshes))) + (when (nonzero? s5-0) + (dotimes (s4-0 (-> s5-0 length)) + (let ((s3-0 (-> s5-0 s4-0 nav-mesh))) + (when s3-0 + (vector-! (-> sv-64 point) sv-76 (the-as vector (-> s3-0 bounds))) + (.lvf vf1 (&-> (-> sv-64 point) quad)) + (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.mul.vf vf1 vf1 vf1) + (.mul.x.vf acc vf2 vf1 :mask #b1) + (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) + (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mov v1-15 vf1) + (let ((f0-1 v1-15) + (f1-0 (-> s3-0 bounds r)) + ) + (when (< f0-1 (* f1-0 f1-0)) + (set! (-> sv-64 y-threshold) (-> s3-0 nearest-y-threshold)) + (nav-mesh-method-46 s3-0 (the-as nav-poly sv-64)) + (when (>= sv-72 (-> sv-64 dist)) + (set! sv-72 (-> sv-64 dist)) + (set! sv-68 s3-0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + sv-68 + ) + ) + +(defmethod nav-mesh-method-10 ((this nav-mesh) (arg0 vector) (arg1 vector) (arg2 nav-poly)) + (local-vars (sv-16 vector)) + (set! sv-16 arg0) + (let ((gp-0 (new 'stack-no-clear 'nav-find-poly-parms))) + (set! (-> gp-0 poly) arg2) + (vector-! (-> gp-0 point) arg1 (the-as vector (-> this bounds))) + (when (or (not (-> gp-0 poly)) (not (point-in-poly? this (-> gp-0 poly) (-> gp-0 point)))) + (set! (-> gp-0 y-threshold) (-> this nearest-y-threshold)) + (set! (-> gp-0 ignore) (the-as uint 3)) + (nav-mesh-method-46 this (the-as nav-poly gp-0)) + (when (-> gp-0 poly) + (project-point-into-poly-2d this (-> gp-0 poly) sv-16 (-> gp-0 point)) + (vector+! sv-16 sv-16 (the-as vector (-> this bounds))) + ) + ) + (-> gp-0 poly) + ) + ) + +(defun point-to-poly-boundary ((arg0 nav-poly) (arg1 vector) (arg2 vector)) + (let ((gp-0 (new 'stack-no-clear 'inline-array 'vector 4))) + (set! (-> gp-0 4 x) (the-as float #x7f800000)) + (let* ((s2-0 (-> arg0 vertex-count)) + (v1-1 (the-as int (+ s2-0 -1))) + ) + (dotimes (s1-0 (the-as int s2-0)) + (when (= (-> arg0 adj-poly v1-1) 255) + (set! (-> gp-0 2 quad) (-> arg0 vertex v1-1 quad)) + (set! (-> gp-0 3 quad) (-> arg0 vertex s1-0 quad)) + (set! (-> gp-0 2 y) (-> arg2 y)) + (set! (-> gp-0 3 y) (-> arg2 y)) + (set! (-> gp-0 2 w) 1.0) + (set! (-> gp-0 3 w) 1.0) + (let ((f0-5 (vector-segment-distance-point! arg2 (-> gp-0 2) (-> gp-0 3) (-> gp-0 0)))) + (when (< f0-5 (-> gp-0 4 x)) + (set! (-> gp-0 4 x) f0-5) + (set! (-> gp-0 1 quad) (-> gp-0 0 quad)) + ) + ) + ) + (set! v1-1 s1-0) + ) + ) + (set! (-> arg1 quad) (-> gp-0 1 quad)) + (-> gp-0 4 x) + ) + ) + +(defmethod nav-mesh-method-36 ((this nav-mesh) (arg0 vector) (arg1 vector) (arg2 float)) + (local-vars (v1-13 int) (sv-80 vector) (sv-84 (pointer uint8))) + (let ((gp-0 (new 'stack-no-clear 'nav-poly))) + (set! sv-80 arg0) + (set! (-> gp-0 vertex3 y) (the-as float #x7f800000)) + (set! (-> gp-0 vertex3 x) arg2) + (set! (-> gp-0 vertex1 quad) (-> arg1 quad)) + (set! sv-84 (search-for-sphere (-> this poly-hash) (-> gp-0 vertex1) (-> gp-0 vertex3 x))) + (let ((s4-0 (-> this poly-hash bucket-size)) + (s3-0 sv-84) + (s2-0 0) + ) + (until (zero? v1-13) + (let ((s1-0 (* s2-0 8)) + (s0-0 (-> s3-0 0)) + ) + (b! (zero? s0-0) cfg-14 :delay (nop!)) + ;; og:preserve-this + (label cfg-2) + (let ((v1-5 (logand s0-0 1))) + (nop!) + (b! (zero? v1-5) cfg-13 :delay (nop!)) + ) + (let* ((a0-5 (-> this poly-array s1-0)) + (v1-7 a0-5) + (f0-3 (-> gp-0 vertex1 y)) + (f1-0 (-> this nearest-y-threshold)) + ) + (if (and (>= (+ (-> v1-7 vertex3 w) f1-0) f0-3) (>= f0-3 (- (-> v1-7 vertex2 w) f1-0))) + (set! (-> gp-0 vertex3 z) (point-to-poly-boundary a0-5 (-> gp-0 vertex2) (-> gp-0 vertex1))) + ) + ) + (when (< (-> gp-0 vertex3 z) (-> gp-0 vertex3 y)) + (set! (-> gp-0 vertex3 y) (-> gp-0 vertex3 z)) + (set! (-> gp-0 vertex 0 quad) (-> gp-0 vertex2 quad)) + (nop!) + ) + (label cfg-13) + ;; og:preserve-this cast + (set! s0-0 (the-as uint (/ (the-as int s0-0) 2))) + (nop!) + (b! (nonzero? s0-0) cfg-2 :delay (set! s1-0 (+ s1-0 1))) + ) + (label cfg-14) + (+! s2-0 1) + (set! s3-0 (&-> s3-0 1)) + (set-on-less-than v1-13 s2-0 s4-0) + (nop!) + ) + ) + 0 + (set! (-> sv-80 quad) (-> gp-0 vertex 0 quad)) + (-> gp-0 vertex3 y) + ) + ) + +;; WARN: new jak 2 until loop case, check carefully +(defmethod nav-mesh-method-37 ((this nav-mesh) (arg0 vector) (arg1 vector) (arg2 float)) + (let ((gp-0 (new 'stack-no-clear 'inline-array 'nav-poly 3))) + (set! (-> gp-0 2 vertex3 y) arg2) + (vector-! (the-as vector (-> gp-0 0)) arg0 (the-as vector (-> this bounds))) + (vector-! (-> gp-0 0 vertex1) arg1 (the-as vector (-> this bounds))) + (set! (-> gp-0 2 vertex1 quad) (-> gp-0 0 vertex0 quad)) + (set! (-> gp-0 2 vertex2 x) (-> this nearest-y-threshold)) + (set! (-> gp-0 2 data 36) (the-as uint 3)) + (let ((a1-4 (nav-mesh-method-45 this (the-as nav-poly (-> gp-0 2 vertex1))))) + (cond + (a1-4 + (init-ray-local (the-as nav-ray (-> gp-0 1)) a1-4 (the-as vector (-> gp-0 0)) (-> gp-0 0 vertex1)) + (until #f + (set! (-> gp-0 2 vertex3 z) + (nav-mesh-method-36 this (-> gp-0 0 vertex3) (the-as vector (-> gp-0 1)) (-> gp-0 2 vertex3 y)) + ) + (when (< (-> gp-0 2 vertex3 z) (-> gp-0 2 vertex3 y)) + (set! (-> gp-0 2 vertex3 y) (-> gp-0 2 vertex3 z)) + (set! (-> gp-0 0 vertex2 quad) (-> gp-0 0 vertex3 quad)) + ) + (b! (-> gp-0 2 vertex0 x) cfg-6 :delay (nop!)) + (advance-ray-to-nearest-poly-edge-or-dest! this (the-as nav-ray (-> gp-0 1))) + ) + #f + (label cfg-6) + (if (-> gp-0 2 vertex0 z) + (set! (-> gp-0 2 vertex3 y) (the-as float #xff800000)) + ) + ) + (else + (set! (-> gp-0 2 vertex3 y) (the-as float #xff800000)) + ) + ) + ) + (-> gp-0 2 vertex3 y) + ) + ) + +(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))) + (set! (-> v1-0 y-threshold) 4096000000.0) + (set! (-> v1-0 ignore) (the-as uint 2)) + (nav-mesh-method-45 this (the-as nav-poly (-> v1-0 point))) + ) + ) + +(deftype nav-find-clear-spot-work (structure) + ((id-array int8 16) + (sphere-array sphere 16 :inline) + ) + ) + +(defmethod inspect ((this nav-find-clear-spot-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'nav-find-clear-spot-work) + (format #t "~1Tid-array[16] @ #x~X~%" (-> this id-array)) + (format #t "~1Tsphere-array[16] @ #x~X~%" (-> this sphere-array)) + (label cfg-4) + this + ) + +(defmethod nav-mesh-method-12 ((this nav-mesh) (arg0 vector) (arg1 float) (arg2 nav-poly)) + (let ((gp-0 (new 'stack-no-clear 'nav-stack-type))) + (set! (-> gp-0 byte03) 0) + (set! (-> gp-0 byte04) 3) + (set! (-> gp-0 vec3 y) arg1) + (set! (-> gp-0 byte02) 0) + (set! (-> gp-0 vec1 quad) (-> arg0 quad)) + (b! #t cfg-9 :delay (nop!)) + (label cfg-1) + (set! (-> gp-0 nav-id-params bsphere quad) (-> gp-0 vec1 quad)) + (set! (-> gp-0 nav-id-params bsphere r) (-> gp-0 vec3 y)) + (set! (-> gp-0 nav-id-params max-len) 16) + (set! (-> gp-0 nav-id-params mask) (the-as uint 255)) + (set! (-> gp-0 nav-id-params array) (-> gp-0 byte-arr)) + (set! (-> gp-0 nav-id-params y-threshold) 4096000000.0) + (sphere-hash-method-29 (-> this sphere-hash) (-> gp-0 nav-id-params)) + (set! (-> gp-0 byte01) (-> gp-0 nav-id-params len)) + (b! (nonzero? (-> gp-0 byte01)) cfg-3 :delay (empty-form)) + (set! (-> arg2 vertex0 quad) (-> gp-0 vec1 quad)) + (set! (-> gp-0 byte03) 1) + (b! #t cfg-11 :delay (nop!)) + (label cfg-3) + (dotimes (v1-15 (-> gp-0 byte01)) + (let ((a1-2 (-> gp-0 byte-arr v1-15))) + (set! (-> gp-0 vec4 quad) (-> this sphere-hash sphere-array a1-2 quad)) + ) + (vector-! (-> gp-0 vec5) (-> gp-0 vec1) (-> gp-0 vec4)) + (set! (-> gp-0 vec5 y) 0.0) + (let ((a0-9 (-> gp-0 vec5))) + (set! (-> gp-0 vec3 z) (+ (* (-> a0-9 x) (-> a0-9 x)) (* (-> a0-9 z) (-> a0-9 z)))) + ) + (let ((f0-8 (-> gp-0 vec3 z)) + (f1-4 (+ (-> gp-0 vec3 y) (-> gp-0 vec4 w))) + ) + (when (< f0-8 (* f1-4 f1-4)) + (set! (-> gp-0 vec2 quad) (-> gp-0 vec1 quad)) + (set! (-> gp-0 vec3 w) (sqrtf (-> gp-0 vec3 z))) + (vector-float*! (-> gp-0 vec6) (-> gp-0 vec5) (/ 1.0 (-> gp-0 vec3 w))) + (vector+float*! + (-> gp-0 vec1) + (-> gp-0 vec1) + (-> gp-0 vec6) + (+ (- 410.0 (-> gp-0 vec3 w)) (-> gp-0 vec4 w) (-> gp-0 vec3 y)) + ) + 0 + ) + ) + ) + (+! (-> gp-0 byte02) 1) + (label cfg-9) + (b! (< (-> gp-0 byte02) (-> gp-0 byte04)) cfg-1) + (label cfg-11) + (= (-> gp-0 byte03) 1) + ) + ) + +(defmethod nav-mesh-method-38 ((this nav-mesh) (arg0 nav-poly)) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (the-as vector arg0) (the-as vector (-> this bounds))))) + (countdown (s3-0 (-> this nav-control-count)) + (let ((v1-2 (-> this nav-control-array s3-0))) + (if (-> v1-2 process) + (send-event (-> v1-2 process) 'nav-mesh-moved s4-1 arg0) + ) + ) + ) + ) + (set! (-> this bounds quad) (-> arg0 vertex0 quad)) + 0 + (none) + ) + +(none) + +) diff --git a/goal_src/jak3/engine/physics/chain-physics-h.gc b/goal_src/jak3/engine/physics/chain-physics-h.gc index 1d18e5319c..a37b67b84f 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 dad937217f..230476a39a 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/cloth-h.gc b/goal_src/jak3/engine/physics/cloth-h.gc index 1e6d288479..7666da53ca 100644 --- a/goal_src/jak3/engine/physics/cloth-h.gc +++ b/goal_src/jak3/engine/physics/cloth-h.gc @@ -13,6 +13,7 @@ (constraint-length-sqd float) (particle0 uint16) (particle1 uint16) + (vec vector :inline :overlay-at constraint-length-half) ) ) diff --git a/goal_src/jak3/engine/physics/cloth.gc b/goal_src/jak3/engine/physics/cloth.gc index 82b703bac2..5e15d1af31 100644 --- a/goal_src/jak3/engine/physics/cloth.gc +++ b/goal_src/jak3/engine/physics/cloth.gc @@ -7,3 +7,16 @@ ;; DECOMP BEGINS +(defmethod cloth-base-method-10 ((this cloth-base) (a cloth-params) (b handle)) + (format 0 "unimplemented cloth-base-method-10~%") + 0) + +(defmethod cloth-system-method-34 ((this cloth-system)) + (format 0 "unimplemented cloth-system-method-34~%") + (none) + ) + + +(defmethod init! ((this cloth-base)) + ;; this looks more like run! than init to me. + 0) \ No newline at end of file diff --git a/goal_src/jak3/engine/physics/ragdoll-edit.gc b/goal_src/jak3/engine/physics/ragdoll-edit.gc index 5001a96827..22f651890e 100644 --- a/goal_src/jak3/engine/physics/ragdoll-edit.gc +++ b/goal_src/jak3/engine/physics/ragdoll-edit.gc @@ -248,7 +248,7 @@ ) (let ((s3-0 (new 'stack-no-clear 'inline-array 'matrix 60))) (dotimes (v1-0 60) - (let ((a0-2 (the-as matrix (-> s3-0 v1-0 rvec)))) + (let ((a0-2 (-> s3-0 v1-0))) (set! (-> a0-2 rvec quad) (the-as uint128 0)) (set! (-> a0-2 uvec quad) (the-as uint128 0)) (set! (-> a0-2 fvec quad) (the-as uint128 0)) @@ -258,7 +258,7 @@ (dotimes (s2-0 (the-as int (-> arg0 num-joints))) (let ((s0-0 (-> arg0 ragdoll-joints s2-0))) (set! sv-4352 (get-parent-joint arg0 (the-as (inline-array ragdoll-joint) s0-0))) - (set! sv-4368 (the-as matrix (-> s3-0 s2-0 rvec))) + (set! sv-4368 (-> s3-0 s2-0)) (let ((s1-0 (new 'stack-no-clear 'matrix))) (cond (sv-4352 @@ -268,15 +268,11 @@ (set! sv-4432 (new 'stack-no-clear 'vector)) (let* ((v1-11 s1-0) (a3-0 - (the-as - matrix - (-> s3-0 - (/ (the-as uint (&- (the-as pointer sv-4352) (the-as uint (the-as pointer (-> arg0 ragdoll-joints))))) - (the-as uint 192) - ) - rvec - ) - ) + (-> s3-0 + (/ (the-as uint (&- (the-as pointer sv-4352) (the-as uint (the-as pointer (-> arg0 ragdoll-joints))))) + (the-as uint 192) + ) + ) ) (a0-9 (-> a3-0 rvec quad)) (a1-5 (-> a3-0 uvec quad)) diff --git a/goal_src/jak3/engine/physics/ragdoll-h.gc b/goal_src/jak3/engine/physics/ragdoll-h.gc index e149d05205..c7dee4d774 100644 --- a/goal_src/jak3/engine/physics/ragdoll-h.gc +++ b/goal_src/jak3/engine/physics/ragdoll-h.gc @@ -46,7 +46,7 @@ (rf5 5) (rf6 6) (rf7 7) - (rf8 8) + (mirror 8) (rf9 9) (rf10 10) (rf11 11) @@ -57,6 +57,7 @@ ) ;; ---ragdoll-flag +(define-extern ragdoll-other-joint-callback (function cspace transformq none :behavior ragdoll-proc)) ;; DECOMP BEGINS @@ -145,7 +146,7 @@ (num-children int8) (old-param0 basic) (hit-sound sound-name) - (ground-pat uint32) + (ground-pat pat-surface) (user0 int32) (original-speed float) ) @@ -186,25 +187,26 @@ (ragdoll-method-10 (_type_ process-drawable symbol vector symbol) none) (turn-off-for-duration! (_type_ time-frame) none) (get-parent-joint (_type_ (inline-array ragdoll-joint)) ragdoll-joint) - (ragdoll-method-13 (_type_ ragdoll-edit-info) none) - (ragdoll-method-14 (_type_) none) - (ragdoll-method-15 (_type_ process-drawable matrix) none) + (ragdoll-method-13 (_type_ ragdoll-edit-info ragdoll-joint matrix matrix) none) + (ragdoll-method-14 (_type_ process-drawable ragdoll-joint object matrix) none) + (ragdoll-method-15 (_type_ process-drawable ragdoll-edit-info) none) (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-20 (_type_ 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) (ragdoll-method-23 (_type_ vector vector float symbol) none) (ragdoll-method-24 (_type_ vector int) none) - (ragdoll-method-25 (_type_ process-drawable) none) + (enable-ragdoll! (_type_ process-drawable) none) ) ) (deftype ragdoll-proc (process) - ((parent (pointer process-drawable) :override) + ((self ragdoll-proc :override) + (parent (pointer process-drawable) :override) (ragdoll ragdoll) (last-attack-id uint32) ) @@ -213,9 +215,9 @@ ) (:methods (ragdoll-proc-method-15 (_type_ symbol vector symbol) none) - (ragdoll-proc-method-16 (_type_ int) none) - (ragdoll-proc-method-17 (_type_ matrix) none) - (ragdoll-proc-method-18 (_type_ ragdoll-edit-info process) none) + (disable-for-duration (_type_ time-frame) none) + (ragdoll-proc-method-17 (_type_ ragdoll-edit-info) none) + (ragdoll-proc-method-18 (_type_ ragdoll-edit-info) none) (ragdoll-proc-method-19 (_type_) none) ) ) diff --git a/goal_src/jak3/engine/physics/ragdoll.gc b/goal_src/jak3/engine/physics/ragdoll.gc index 3997b0cd9a..5c022c64c8 100644 --- a/goal_src/jak3/engine/physics/ragdoll.gc +++ b/goal_src/jak3/engine/physics/ragdoll.gc @@ -7,3 +7,1691 @@ ;; DECOMP BEGINS +(defmethod ragdoll-method-18 ((this ragdoll)) + (when *debug-segment* + (let ((s5-0 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-7 'ragdoll-setup) + (s4-0 *color-white*) + ) + (when (and *dproc* *debug-segment*) + (let ((s3-0 (-> s5-0 data (-> s5-0 count)))) + (let ((s2-0 (-> s5-0 base-time))) + (set! (-> s3-0 name) v1-7) + (set! (-> s3-0 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s2-0)))) + ) + (set! (-> s3-0 depth) (the-as uint (-> s5-0 depth))) + (set! (-> s3-0 color) s4-0) + (set! (-> s5-0 segment (-> s5-0 depth)) s3-0) + ) + (set! (-> s5-0 count) (min 1023 (+ (-> s5-0 count) 1))) + (+! (-> s5-0 depth) 1) + (set! (-> s5-0 max-depth) (max (-> s5-0 max-depth) (-> s5-0 depth))) + ) + ) + 0 + ) + (vector-seek-3d-smooth! (-> this gravity) (-> this gravity-target) 0.05 0.1) + (quaternion*! + (the-as quaternion (-> this ragdoll-joints)) + (-> this rotate-vel) + (the-as quaternion (-> this ragdoll-joints)) + ) + (quaternion-normalize! (the-as quaternion (-> this ragdoll-joints))) + (set! (-> this stable-joints) 0) + (when (logtest? (-> this ragdoll-flags) (ragdoll-flag rf0)) + (let ((s4-1 (new 'stack-no-clear 'collide-query)) + (s5-1 (new 'stack-no-clear 'bounding-box)) + ) + (set! (-> s5-1 min quad) (-> this ragdoll-joints 0 position quad)) + (set! (-> s5-1 max quad) (-> s5-1 min quad)) + (dotimes (v1-25 (the-as int (-> this num-joints))) + (let ((a2-2 (-> this ragdoll-joints v1-25)) + (a0-21 (new 'stack-no-clear 'vector)) + ) + (let ((a1-4 (new 'stack-no-clear 'vector))) + (set-vector! + a1-4 + (+ 2048.0 (-> a2-2 coll-rad)) + (+ 2048.0 (-> a2-2 coll-rad)) + (+ 2048.0 (-> a2-2 coll-rad)) + 1.0 + ) + (+! (-> a1-4 x) (fabs (-> a2-2 velocity x))) + (+! (-> a1-4 y) (fabs (-> a2-2 velocity y))) + (+! (-> a1-4 z) (fabs (-> a2-2 velocity z))) + (vector+! a0-21 (-> a2-2 position) a1-4) + (set! (-> s5-1 max x) (fmax (-> a0-21 x) (-> s5-1 max x))) + (set! (-> s5-1 max y) (fmax (-> a0-21 y) (-> s5-1 max y))) + (set! (-> s5-1 max z) (fmax (-> a0-21 z) (-> s5-1 max z))) + (vector-! a0-21 (-> a2-2 position) a1-4) + ) + (set! (-> s5-1 min x) (fmin (-> a0-21 x) (-> s5-1 min x))) + (set! (-> s5-1 min y) (fmin (-> a0-21 y) (-> s5-1 min y))) + (set! (-> s5-1 min z) (fmin (-> a0-21 z) (-> s5-1 min z))) + ) + ) + (set! (-> s4-1 collide-with) (the-as collide-spec (-> this bg-collide-with))) + (set! (-> s4-1 ignore-process0) #f) + (set! (-> s4-1 ignore-process1) #f) + (set! (-> s4-1 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> s4-1 action-mask) (collide-action solid)) + (mem-copy! (the-as pointer (-> s4-1 bbox)) (the-as pointer s5-1) 32) + (fill-using-bounding-box *collide-cache* s4-1) + (when (not (logtest? (-> this ragdoll-flags) (ragdoll-flag rf11))) + (let ((s4-2 (new 'stack-no-clear 'inline-array 'water-sphere 2))) + (dotimes (s3-1 2) + ((method-of-type water-sphere new) (the-as symbol (-> s4-2 s3-1)) water-sphere) + ) + (get-bounding-sphere s5-1 (the-as vector (-> s4-2 0))) + (set! (-> s4-2 0 flags) (water-flag)) + (set! (-> s4-2 1 sphere quad) (-> s4-2 0 sphere quad)) + (set! (-> s4-2 1 flags) (water-flag)) + (find-water-with-spheres s4-2 2 (-> this water-info)) + ) + ) + ) + ) + (when *debug-segment* + (let ((gp-1 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-55 (+ (-> gp-1 depth) -1)) + (s5-2 (-> gp-1 segment v1-55)) + (s4-3 (-> gp-1 base-time)) + ) + (when (>= v1-55 0) + (set! (-> s5-2 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-3)))) + (+! (-> gp-1 depth) -1) + ) + ) + ) + ) + 0 + ) + 0 + (none) + ) + +(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) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (vector-float*! arg0 (-> this gravity) (* 122.88 (-> pp clock time-adjust-ratio))) + (if (logtest? (-> this ragdoll-joints arg1 ragdoll-joint-flags) (ragdoll-joint-flag rjf2)) + (vector-float*! arg0 arg0 0.15) + ) + (cond + ((logtest? (-> this ragdoll-joints arg1 ragdoll-joint-flags) (ragdoll-joint-flag rjf0)) + (vector+float*! + arg0 + arg0 + (the-as vector (+ (the-as uint (-> this ragdoll-joints 0 bounce)) (* 192 arg1))) + 0.5 + ) + (vector+float*! + arg0 + arg0 + (the-as vector (+ (the-as uint (-> this ragdoll-joints 0 velocity)) (* 192 arg1))) + 0.7 + ) + ) + (else + (vector+float*! + arg0 + arg0 + (the-as vector (+ (the-as uint (-> this ragdoll-joints 0 velocity)) (* 192 arg1))) + 1.0 + ) + ) + ) + (.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-22 vf1) + (let ((f0-6 v1-22) + (f1-1 16384.0) + ) + (if (and (zero? arg1) + (not (logtest? (-> this ragdoll-joints arg1 ragdoll-joint-flags) (ragdoll-joint-flag rjf2))) + ) + (set! f1-1 24576.0) + ) + (let ((f2-0 f1-1)) + (if (< (* f2-0 f2-0) f0-6) + (vector-float*! arg0 arg0 (/ f1-1 (sqrtf f0-6))) + ) + ) + ) + (when (nonzero? (-> this rotate-adj-count)) + (quaternion-slerp! (-> this rotate-vel) (-> this rotate-vel) (-> this rotate-adj) 0.5) + (quaternion-identity! (-> this rotate-adj)) + (set! (-> this rotate-adj-count) 0) + 0 + ) + (if (< (-> this rotate-vel w) 0.0) + (quaternion-negate! (-> this rotate-vel) (-> this rotate-vel)) + ) + (when (< (-> this rotate-vel w) (cos 7281.778)) + (let ((a1-4 (vector-normalize! (the-as vector (-> this rotate-vel)) 1.0))) + (quaternion-vector-angle! (-> this rotate-vel) a1-4 7281.778) + ) + ) + 0 + (none) + ) + ) + ) + +(defmethod reset-vec! ((this ragdoll) (arg0 vector)) + (vector-reset! arg0) + 0 + (none) + ) + +(defmethod ragdoll-method-21 ((this ragdoll) (arg0 vector) (arg1 vector) (arg2 float)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-! gp-0 arg0 arg1) + (vector-normalize! gp-0 arg2) + (vector+! arg0 gp-0 arg1) + ) + ) + +(defmethod get-max-angle-for-joint-idx ((this ragdoll) (idx int)) + (-> this ragdoll-joints idx max-angle) + ) + +;; WARN: Function (method 23 ragdoll) has a return type of none, but the expression builder found a return statement. +(defmethod ragdoll-method-23 ((this ragdoll) (arg0 vector) (arg1 vector) (arg2 float) (arg3 symbol)) + (with-pp + (cond + (arg3 + (logclear! (-> this ragdoll-flags) (ragdoll-flag rf2)) + (set! (-> this allow-destabilize) (the-as uint (+ (current-time) (seconds 0.1)))) + ) + ((< (- (current-time) (the-as int (-> this allow-destabilize))) 0) + (return #f) + ) + ) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> this ragdoll-joints 0 position) arg0)) + (a0-4 (new 'stack-no-clear 'vector)) + ) + 0.0 + (set! (-> a0-4 quad) (-> s5-1 quad)) + (let ((f30-0 (vector-normalize-ret-len! a0-4 1.0))) + (if (< f30-0 0.1) + (return #f) + ) + (let ((s3-1 (vector-! (new 'stack-no-clear 'vector) arg1 (-> this ragdoll-joints 0 velocity))) + (s1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s1-1 quad) (-> s3-1 quad)) + (let ((f28-1 (* arg2 (vector-normalize-ret-len! s1-1 1.0) (/ 1.0 (-> pp clock time-adjust-ratio)))) + (a0-7 (vector+float*! (new 'stack-no-clear 'vector) arg0 s1-1 (vector-dot s5-1 s1-1))) + ) + 0.0 + (let* ((f1-2 (/ (vector-vector-distance a0-7 (-> this ragdoll-joints 0 position)) f30-0)) + (f26-0 (fmax 0.0 (+ -0.01 f1-2))) + ) + (when (< 0.0 f26-0) + (let ((s4-1 (new 'stack-no-clear 'vector))) + 0.0 + (let ((s2-1 (new 'stack-no-clear 'quaternion))) + (vector-cross! s4-1 s3-1 s5-1) + (vector-normalize! s4-1 1.0) + (let* ((f0-13 (* 10430.379 (/ f28-1 f30-0) f26-0)) + (f0-14 (fmin 9102.223 f0-13)) + ) + (quaternion-vector-angle! s2-1 s4-1 f0-14) + ) + (quaternion-normalize! (quaternion*! (-> this rotate-adj) s2-1 (-> this rotate-adj))) + ) + ) + (+! (-> this rotate-adj-count) 1) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod ragdoll-method-24 ((this ragdoll) (arg0 vector) (arg1 int)) + (local-vars (v1-85 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (when *debug-segment* + (let ((s3-0 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-7 'ragdoll-collision) + (s2-0 *color-white*) + ) + (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-7) + (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 ((s4-1 (-> this ragdoll-joints arg1))) + (when (and (logtest? (-> this ragdoll-flags) (ragdoll-flag rf0)) (!= (-> s4-1 coll-rad) 0.0)) + (when (logtest? (-> this ragdoll-flags) (ragdoll-flag mirror)) + (vector-matrix*! arg0 arg0 (-> this mirror)) + (vector-matrix*! (-> s4-1 position) (-> s4-1 position) (-> this mirror)) + ) + (let ((s2-1 (new 'stack-no-clear 'collide-query)) + (s3-2 (vector-! (new 'stack-no-clear 'vector) arg0 (-> s4-1 position))) + (s1-1 0) + ) + (logclear! (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf1 rjf3)) + (if (logtest? (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf0)) + (logior! (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf1)) + ) + (if (logtest? (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf2)) + (logior! (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf3)) + ) + (logclear! (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf0 rjf2)) + (set! (-> s4-1 original-speed) 0.0) + (set! (-> arg0 quad) (-> s4-1 position quad)) + (until (or (< 6 s1-1) (begin + (.lvf vf1 (&-> s3-2 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-85 vf1) + (let ((f0-13 v1-85) + (f1-4 409.6) + ) + (< f0-13 (* f1-4 f1-4)) + ) + ) + ) + (+! s1-1 1) + (set! (-> s2-1 start-pos quad) (-> arg0 quad)) + (set! (-> s2-1 move-dist quad) (-> s3-2 quad)) + (let ((v1-49 s2-1)) + (set! (-> v1-49 radius) (-> s4-1 coll-rad)) + (set! (-> v1-49 collide-with) (the-as collide-spec (-> this bg-collide-with))) + (set! (-> v1-49 ignore-process0) #f) + (set! (-> v1-49 ignore-process1) #f) + (set! (-> v1-49 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-49 action-mask) (collide-action solid)) + ) + (set! (-> s2-1 best-other-prim) #f) + (let ((f30-0 (probe-using-line-sphere *collide-cache* s2-1))) + (cond + ((>= f30-0 0.0) + (cond + ((logtest? (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf0)) + ) + ((logtest? (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf1)) + (set! (-> s4-1 original-speed) (vector-length s3-2)) + (ragdoll-method-23 this (-> s4-1 position) *zero-vector* 1.0 #f) + ) + (else + (set! (-> s4-1 original-speed) (vector-length s3-2)) + (ragdoll-method-23 this (-> s4-1 position) *zero-vector* 1.0 #f) + ) + ) + (set! (-> s4-1 ground-pat) (-> s2-1 best-other-tri pat)) + (let ((f0-7 (fmin 1.0 f30-0))) + (vector+float*! arg0 arg0 s3-2 f0-7) + (vector-float*! s3-2 s3-2 (- 1.0 f0-7)) + ) + (let ((f0-10 (vector-dot s3-2 (-> s2-1 best-other-tri normal)))) + (vector--float*! s3-2 s3-2 (-> s2-1 best-other-tri normal) (* 1.2 f0-10)) + ) + (logior! (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf0)) + (vector-float*! (-> s4-1 bounce) (-> s2-1 best-other-tri normal) (-> s4-1 original-speed)) + ) + (else + (vector+! arg0 arg0 s3-2) + (goto cfg-34) + ) + ) + ) + ) + ) + (label cfg-34) + (if (and (not (logtest? (-> this ragdoll-flags) (ragdoll-flag rf11))) + (logtest? (water-flag touch-water) (-> this water-info flags)) + (< (- (-> arg0 y) (-> s4-1 coll-rad)) (-> this water-info base-height)) + ) + (logior! (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf2)) + ) + (when (and (nonzero? (-> s4-1 hit-sound)) + (or (and (logtest? (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf0)) + (not (logtest? (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf1 rjf2))) + ) + (and (logtest? (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf2)) + (not (logtest? (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf3))) + ) + ) + ) + (let ((v1-107 (the int (lerp-scale 0.0 1024.0 (-> s4-1 original-speed) 409.6 2867.2))) + (s3-3 (new 'static 'sound-spec)) + ) + (when (nonzero? v1-107) + (set! (-> s3-3 sound-name) (-> s4-1 hit-sound)) + (set! (-> s3-3 volume) v1-107) + (set! (-> s3-3 reg 0) (the-as uint 0)) + (if (logtest? (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf2)) + (set! (-> s3-3 reg 0) (the-as uint 127)) + (set! (-> s3-3 reg 0) (the-as uint (-> s4-1 ground-pat material))) + ) + (sound-play-by-spec s3-3 (new-sound-id) (-> s4-1 position)) + ) + ) + ) + (when (logtest? (-> this ragdoll-flags) (ragdoll-flag mirror)) + (vector-matrix*! arg0 arg0 (-> this mirror)) + (vector-matrix*! (-> s4-1 position) (-> s4-1 position) (-> this mirror)) + ) + ) + ) + (when *debug-segment* + (let ((gp-1 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-129 (+ (-> gp-1 depth) -1)) + (s5-1 (-> gp-1 segment v1-129)) + (s4-2 (-> gp-1 base-time)) + ) + (when (>= v1-129 0) + (set! (-> s5-1 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-2)))) + (+! (-> gp-1 depth) -1) + ) + ) + ) + ) + 0 + ) + 0 + (none) + ) + ) + +(defmethod enable-ragdoll! ((this ragdoll) (proc process-drawable)) + (let ((s4-0 (-> this ragdoll-joints))) + (logior! (-> proc skel status) (joint-control-status no-joint-callbacks)) + (do-joint-math (-> proc draw) (-> proc node-list) (-> proc skel)) + (logclear! (-> proc skel status) (joint-control-status no-joint-callbacks)) + (let ((s2-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> proc node-list data (-> s4-0 0 joint-index)))) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 quad) (-> s4-0 0 position quad)) + (if (logtest? (-> this ragdoll-flags) (ragdoll-flag mirror)) + (vector-matrix*! s3-0 s3-0 (-> this mirror)) + ) + (vector-! s2-0 s3-0 s2-0) + (vector+! (-> proc root trans) s3-0 s2-0) + ) + ) + 0 + (none) + ) + +(defun ragdoll-matrix-interp ((arg0 matrix) (arg1 matrix) (arg2 matrix) (arg3 float)) + (local-vars (sv-208 matrix)) + (set! sv-208 arg1) + (let ((s5-0 arg2) + (s4-0 arg3) + (s1-0 (new 'stack-no-clear 'matrix)) + ) + (dotimes (v1-0 3) + (set! (-> s1-0 quad v1-0) (the-as uint128 0)) + ) + 0.0 + 0.0 + 0.0 + (let ((s3-0 (new-stack-vector0))) + 0.0 + (let ((s2-0 (new 'stack-no-clear 'matrix))) + (set! (-> s2-0 rvec quad) (the-as uint128 0)) + (set! (-> s2-0 uvec quad) (the-as uint128 0)) + (set! (-> s2-0 fvec quad) (the-as uint128 0)) + (set! (-> s2-0 trans quad) (the-as uint128 0)) + (let ((s0-0 (new 'stack-no-clear 'matrix))) + (set! (-> s0-0 rvec quad) (the-as uint128 0)) + (set! (-> s0-0 uvec quad) (the-as uint128 0)) + (set! (-> s0-0 fvec quad) (the-as uint128 0)) + (set! (-> s0-0 trans quad) (the-as uint128 0)) + (vector-normalize-copy! (-> s0-0 rvec) (-> sv-208 rvec) 1.0) + (vector-normalize-copy! (-> s0-0 uvec) (-> sv-208 uvec) 1.0) + (vector-normalize-copy! (-> s0-0 fvec) (-> sv-208 fvec) 1.0) + (set! (-> s0-0 rvec w) 1.0) + (set! (-> s0-0 uvec w) 1.0) + (set! (-> s0-0 fvec w) 1.0) + (set! (-> s0-0 trans w) 1.0) + (vector-! (-> s1-0 rvec) (-> s0-0 rvec) (-> s5-0 rvec)) + (vector-! (-> s1-0 uvec) (-> s0-0 uvec) (-> s5-0 uvec)) + (vector-! (-> s1-0 fvec) (-> s0-0 fvec) (-> s5-0 fvec)) + (let ((f0-8 (vector-length (-> s1-0 rvec))) + (f1-0 (vector-length (-> s1-0 uvec))) + (f2-0 (vector-length (-> s1-0 fvec))) + ) + (cond + ((and (< f0-8 f1-0) (< f0-8 f2-0)) + (vector-cross! s3-0 (-> s1-0 uvec) (-> s1-0 fvec)) + ) + ((and (< f1-0 f0-8) (< f1-0 f2-0)) + (vector-cross! s3-0 (-> s1-0 rvec) (-> s1-0 fvec)) + ) + (else + (vector-cross! s3-0 (-> s1-0 rvec) (-> s1-0 uvec)) + ) + ) + ) + (vector-normalize! s3-0 1.0) + (let ((f0-11 (fabs (vector-dot (-> s0-0 rvec) s3-0))) + (f1-3 (fabs (vector-dot (-> s0-0 uvec) s3-0))) + (f2-3 (fabs (vector-dot (-> s0-0 fvec) s3-0))) + ) + (cond + ((and (< f0-11 f1-3) (< f0-11 f2-3)) + (vector-flatten! (-> s1-0 rvec) (-> s0-0 rvec) s3-0) + (vector-flatten! (-> s1-0 uvec) (-> s5-0 rvec) s3-0) + ) + ((< f1-3 f2-3) + (vector-flatten! (-> s1-0 rvec) (-> s0-0 uvec) s3-0) + (vector-flatten! (-> s1-0 uvec) (-> s5-0 uvec) s3-0) + ) + (else + (vector-flatten! (-> s1-0 rvec) (-> s0-0 fvec) s3-0) + (vector-flatten! (-> s1-0 uvec) (-> s5-0 fvec) s3-0) + ) + ) + ) + ) + (vector-normalize! (-> s1-0 rvec) 1.0) + (vector-normalize! (-> s1-0 uvec) 1.0) + (vector-cross! (-> s1-0 fvec) (-> s1-0 rvec) (-> s1-0 uvec)) + (if (< (vector-dot (-> s1-0 fvec) s3-0) 0.0) + (vector-negate! s3-0 s3-0) + ) + (let ((f30-0 (* (acos (vector-dot (-> s1-0 rvec) (-> s1-0 uvec))) (- 1.0 s4-0)))) + (matrix-axis-sin-cos! s2-0 s3-0 (sin f30-0) (cos f30-0)) + ) + (matrix*! arg0 s5-0 s2-0) + ) + ) + ) + ) + +(defun ragdoll-joint-callback ((arg0 cspace) (arg1 transformq) (arg2 process-drawable) (arg3 ragdoll-proc)) + (local-vars (sv-240 int) (sv-256 quaternion) (sv-272 vector) (sv-288 matrix)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (when *debug-segment* + (let ((s2-0 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-7 'ragdoll-callback) + (s1-0 *color-white*) + ) + (when (and *dproc* *debug-segment*) + (let ((s0-0 (-> s2-0 data (-> s2-0 count)))) + (set! sv-240 (-> s2-0 base-time)) + (set! (-> s0-0 name) v1-7) + (set! (-> s0-0 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint sv-240)))) + (set! (-> s0-0 depth) (the-as uint (-> s2-0 depth))) + (set! (-> s0-0 color) s1-0) + (set! (-> s2-0 segment (-> s2-0 depth)) s0-0) + ) + (set! (-> s2-0 count) (min 1023 (+ (-> s2-0 count) 1))) + (+! (-> s2-0 depth) 1) + (set! (-> s2-0 max-depth) (max (-> s2-0 max-depth) (-> s2-0 depth))) + ) + ) + 0 + ) + (when arg3 + (let ((s3-1 (-> arg3 ragdoll))) + (when (and s3-1 + (and (< 0.0 (-> s3-1 flex-blend)) (!= (-> s3-1 ragdoll-joint-remap (+ (-> arg0 joint number) 1)) 255)) + ) + (let ((s1-1 (-> s3-1 ragdoll-joints (-> s3-1 ragdoll-joint-remap (+ (-> arg0 joint number) 1))))) + (when s1-1 + (if (and (-> s1-1 old-param0) (!= (-> s1-1 old-param0) ragdoll-other-joint-callback)) + ((the-as (function cspace transformq none) (-> s1-1 old-param0)) arg0 arg1) + (cspace<-parented-transformq-joint! arg0 arg1) + ) + (let ((s2-1 (new 'stack-no-clear 'matrix))) + (set! sv-256 + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) (-> s1-1 geo-tform) (-> s1-1 geo-tform w)) + ) + (quaternion-normalize! (quaternion*! sv-256 (-> s1-1 quat) sv-256)) + (quaternion->matrix s2-1 sv-256) + (when (logtest? (-> s3-1 ragdoll-flags) (ragdoll-flag rf10)) + (let ((v1-40 (&+ s1-1 188))) + (when (and (!= v1-40 (-> s3-1 ragdoll-joints (-> s3-1 num-joints))) (= (-> v1-40 parent-joint) -1)) + (let ((s0-3 (vector-! (new 'stack-no-clear 'vector) (-> v1-40 position) (-> s1-1 position)))) + (set! sv-272 (new 'stack-no-clear 'vector)) + (set! sv-288 (new 'stack-no-clear 'matrix)) + (vector-flatten! sv-272 s0-3 (-> s2-1 rvec)) + (vector-normalize! sv-272 1.0) + (matrix-from-two-vectors! sv-288 (-> s2-1 uvec) sv-272) + (matrix*! s2-1 s2-1 sv-288) + (vector-flatten! sv-272 s0-3 (-> s2-1 fvec)) + ) + (vector-normalize! sv-272 1.0) + (matrix-from-two-vectors! sv-288 (-> s2-1 uvec) sv-272) + (matrix*! s2-1 s2-1 sv-288) + ) + ) + ) + (set! (-> s2-1 trans quad) (-> s1-1 position quad)) + (set! (-> s2-1 trans w) 1.0) + (if (logtest? (-> s3-1 ragdoll-flags) (ragdoll-flag mirror)) + (matrix*! s2-1 s2-1 (-> s3-1 mirror)) + ) + (cond + ((>= (-> s3-1 flex-blend) 1.0) + (let ((a2-10 (-> arg0 bone transform)) + (v1-51 (-> s2-1 rvec quad)) + (a0-45 (-> s2-1 uvec quad)) + (a1-20 (-> s2-1 fvec quad)) + (a3-1 (-> s2-1 trans quad)) + ) + (set! (-> a2-10 rvec quad) v1-51) + (set! (-> a2-10 uvec quad) a0-45) + (set! (-> a2-10 fvec quad) a1-20) + (set! (-> a2-10 trans quad) a3-1) + ) + ) + (else + (let ((s1-3 (vector-lerp! + (new 'stack-no-clear 'vector) + (matrix->trans (-> arg0 bone transform) (new 'stack-no-clear 'vector)) + (-> s2-1 trans) + (-> s3-1 flex-blend) + ) + ) + ) + (ragdoll-matrix-interp (-> arg0 bone transform) (-> arg0 bone transform) s2-1 (-> s3-1 flex-blend)) + (set! (-> arg0 bone transform trans quad) (-> s1-3 quad)) + ) + (set! (-> arg0 bone transform trans w) 1.0) + ) + ) + ) + (let ((v1-60 (new 'stack-no-clear 'vector))) + (let ((a0-50 v1-60)) + (let ((a1-24 (-> s3-1 scale)) + (a2-14 (-> arg2 root scale)) + ) + (.lvf vf4 (&-> a1-24 quad)) + (.lvf vf5 (&-> a2-14 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> a0-50 quad) vf6) + ) + (let ((a1-25 v1-60)) + (let ((a0-51 v1-60) + (a2-15 (-> arg1 scale)) + ) + (.lvf vf4 (&-> a0-51 quad)) + (.lvf vf5 (&-> a2-15 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> a1-25 quad) vf6) + ) + (let ((a0-53 (-> arg0 bone transform))) + (let ((a1-27 (-> arg0 bone transform)) + (a2-16 v1-60) + ) + (.lvf vf4 (&-> a1-27 rvec quad)) + (.lvf vf5 (&-> a2-16 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> a0-53 rvec quad) vf6) + ) + (let ((a0-55 (-> arg0 bone transform uvec))) + (let ((a1-29 (-> arg0 bone transform uvec)) + (a2-17 v1-60) + ) + (.lvf vf4 (&-> a1-29 quad)) + (.lvf vf5 (&-> a2-17 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> a0-55 quad) vf6) + ) + (let ((a0-57 (-> arg0 bone transform fvec))) + (.lvf vf4 (&-> (-> arg0 bone transform fvec) quad)) + (.lvf vf5 (&-> v1-60 quad)) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> a0-57 quad) vf6) + ) + ) + (set! (-> arg0 bone transform rvec w) 0.0) + (set! (-> arg0 bone transform uvec w) 0.0) + (set! (-> arg0 bone transform fvec w) 0.0) + ) + ) + ) + ) + ) + (when *debug-segment* + (let ((gp-1 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-75 (+ (-> gp-1 depth) -1)) + (s5-1 (-> gp-1 segment v1-75)) + (s4-1 (-> gp-1 base-time)) + ) + (when (>= v1-75 0) + (set! (-> s5-1 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-1)))) + (+! (-> gp-1 depth) -1) + ) + ) + ) + ) + 0 + ) + (none) + ) + ) + +(defbehavior ragdoll-other-joint-callback ragdoll-proc ((arg0 cspace) (arg1 transformq)) + (local-vars (a3-0 process-tree)) + (let ((gp-0 ragdoll-joint-callback) + (s5-0 arg0) + (s4-0 arg1) + (s3-0 self) + ) + (let ((s2-0 (-> self child))) + (while s2-0 + (let ((s1-0 (ppointer->process s2-0))) + (when (type? s1-0 ragdoll-proc) + (set! a3-0 s1-0) + (goto cfg-9) + ) + ) + (set! s2-0 (-> s2-0 0 brother)) + ) + ) + (set! a3-0 (the-as process-tree #f)) + (label cfg-9) + (gp-0 s5-0 s4-0 (the-as process-drawable s3-0) (the-as ragdoll-proc a3-0)) + ) + (none) + ) + +(defun ragdoll-reflect-matrix ((arg0 matrix) (arg1 vector) (arg2 vector)) + (matrix-identity! arg0) + (let ((s4-1 (vector-float*! (new 'stack-no-clear 'vector) arg1 -2.0))) + (vector-float*! (-> arg0 rvec) s4-1 (-> arg1 x)) + (vector-float*! (-> arg0 uvec) s4-1 (-> arg1 y)) + (vector-float*! (-> arg0 fvec) s4-1 (-> arg1 z)) + (+! (-> arg0 rvec x) 1.0) + (+! (-> arg0 uvec y) 1.0) + (+! (-> arg0 fvec z) 1.0) + (set! (-> arg0 rvec w) 0.0) + (set! (-> arg0 uvec w) 0.0) + (set! (-> arg0 fvec w) 0.0) + (vector-negate! s4-1 arg2) + (vector-matrix*! (-> arg0 trans) s4-1 arg0) + ) + (vector+! (-> arg0 trans) (-> arg0 trans) arg2) + ) + +(defmethod ragdoll-method-9 ((this ragdoll) (arg0 matrix) (arg1 process-drawable)) + (cond + ((= (-> arg1 node-list data 2 param0) cspace<-parented-matrix-joint-flip-z!) + (logior! (-> this ragdoll-flags) (ragdoll-flag mirror)) + (let ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> arg1 node-list data 2))) + (a1-5 (vector-normalize-copy! + (new 'stack-no-clear 'vector) + (the-as vector (-> arg1 node-list data 2 bone transform)) + 1.0 + ) + ) + ) + (ragdoll-reflect-matrix arg0 a1-5 s4-0) + ) + ) + (else + (logclear! (-> this ragdoll-flags) (ragdoll-flag mirror)) + (matrix-identity! arg0) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch ragdoll-flag vs none. +(defmethod ragdoll-method-10 ((this ragdoll) (arg0 process-drawable) (arg1 symbol) (arg2 vector) (arg3 symbol)) + (local-vars (sv-144 vector)) + (with-pp + (set! (-> this turn-off-start) 0) + (logclear! (-> this ragdoll-flags) (ragdoll-flag rf2)) + (logior! (-> arg0 skel status) (joint-control-status force-math)) + (do-joint-math (-> arg0 draw) (-> arg0 node-list) (-> arg0 skel)) + (logclear! (-> arg0 skel status) (joint-control-status force-math)) + (ragdoll-method-9 this (-> this mirror) arg0) + (cond + ((and arg1 arg3) + (logior! (-> this ragdoll-flags) (ragdoll-flag rf5)) + (set-time! (-> this copy-velocity-start)) + (set! (-> this flex-blend) 0.0) + (dotimes (s4-1 (the-as int (-> this num-joints))) + (let ((s3-1 (-> this ragdoll-joints s4-1))) + (new 'stack-no-clear 'vector) + (vector<-cspace! (-> s3-1 position) (-> arg0 node-list data (-> s3-1 joint-index))) + (if (logtest? (-> this ragdoll-flags) (ragdoll-flag mirror)) + (vector-matrix*! (-> s3-1 position) (-> s3-1 position) (-> this mirror)) + ) + ) + ) + ) + ((or (not (logtest? (-> this ragdoll-flags) (ragdoll-flag rf5))) + (!= (current-time) (-> this copy-velocity-start)) + ) + (logior! (-> this ragdoll-flags) (ragdoll-flag rf1 rf7 rf9)) + (set! (-> this flex-blend) 1.0) + (when arg3 + (quaternion-identity! (-> this rotate-vel)) + (quaternion-identity! (-> this rotate-adj)) + (set! (-> this rotate-adj-count) 0) + 0 + ) + (set! (-> this stable-joints) 0) + (dotimes (s2-1 (the-as int (-> this num-joints))) + (let ((s1-0 (-> this ragdoll-joints s2-1)) + (s0-0 (new 'stack-no-clear 'vector)) + ) + (when (not (logtest? (-> this ragdoll-flags) (ragdoll-flag rf6))) + (when *debug-segment* + (when (= (-> arg0 node-list data (-> s1-0 joint-index) param0) ragdoll-other-joint-callback) + (break!) + 0 + ) + ) + (set! (-> s1-0 old-param0) (-> arg0 node-list data (-> s1-0 joint-index) param0)) + (let ((a0-19 (-> arg0 node-list data (-> s1-0 joint-index)))) + (set! (-> a0-19 param0) ragdoll-other-joint-callback) + ) + ) + (set! (-> s1-0 ragdoll-joint-flags) (ragdoll-joint-flag)) + (let ((a1-11 (matrix*! + (new 'stack-no-clear 'matrix) + (-> arg0 node-list data (-> s1-0 joint-index) bone transform) + (-> this mirror) + ) + ) + ) + (matrix->quaternion (-> s1-0 quat) a1-11) + ) + (let ((a2-6 + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) (-> s1-0 geo-tform) (- (-> s1-0 geo-tform w))) + ) + ) + (quaternion*! (-> s1-0 quat) (-> s1-0 quat) a2-6) + ) + (quaternion-normalize! (-> s1-0 quat)) + (cond + ((logtest? (-> this ragdoll-flags) (ragdoll-flag rf5)) + (logclear! (-> this ragdoll-flags) (ragdoll-flag rf5)) + (set! sv-144 (vector<-cspace! (new 'stack-no-clear 'vector) (-> arg0 node-list data (-> s1-0 joint-index)))) + (if (logtest? (-> this ragdoll-flags) (ragdoll-flag mirror)) + (vector-matrix*! sv-144 sv-144 (-> this mirror)) + ) + (vector-! (-> s1-0 velocity) sv-144 (-> s1-0 position)) + (vector-float*! (-> s1-0 velocity) (-> s1-0 velocity) (/ 1.0 (-> pp clock time-adjust-ratio))) + (set! (-> s1-0 position quad) (-> sv-144 quad)) + ) + (else + (vector<-cspace! (-> s1-0 position) (-> arg0 node-list data (-> s1-0 joint-index))) + (if (logtest? (-> this ragdoll-flags) (ragdoll-flag mirror)) + (vector-matrix*! (-> s1-0 position) (-> s1-0 position) (-> this mirror)) + ) + (cond + (arg2 + (vector-float*! (-> s1-0 velocity) arg2 (/ 1.0 (-> pp clock time-adjust-ratio))) + ) + ((not arg3) + ) + (else + (vector-reset! (-> s1-0 velocity)) + ) + ) + ) + ) + (when arg3 + (cond + ((>= (-> s1-0 parent-joint) 0) + (vector<-cspace! s0-0 (-> arg0 node-list data (-> s1-0 parent-joint))) + ) + ((> s2-1 0) + (vector<-cspace! s0-0 (-> arg0 node-list data (-> this ragdoll-joints (+ s2-1 -1) joint-index))) + ) + (else + (set! (-> s0-0 quad) (-> arg0 root trans quad)) + ) + ) + (if (logtest? (-> this ragdoll-flags) (ragdoll-flag mirror)) + (vector-matrix*! s0-0 s0-0 (-> this mirror)) + ) + (set! (-> s1-0 joint-length) (vector-vector-distance (-> s1-0 position) s0-0)) + (if (zero? s2-1) + (vector-! (-> this root-offset) (-> arg0 root trans) (-> s1-0 position)) + ) + ) + ) + ) + (logior! (-> this ragdoll-flags) (ragdoll-flag rf6)) + ) + ) + (none) + ) + ) + +(defmethod turn-off-for-duration! ((this ragdoll) (arg0 time-frame)) + (set-time! (-> this turn-off-start)) + (set! (-> this turn-off-duration) arg0) + 0 + (none) + ) + +(defmethod get-parent-joint ((this ragdoll) (arg0 (inline-array ragdoll-joint))) + (when (< (-> arg0 0 parent-joint) 0) + (if (!= arg0 (-> this ragdoll-joints)) + (return (-> arg0 -1)) + ) + (return (the-as ragdoll-joint #f)) + ) + (dotimes (v1-7 (the-as int (-> this num-joints))) + (if (= (-> this ragdoll-joints v1-7 joint-index) (-> arg0 0 parent-joint)) + (return (-> this ragdoll-joints v1-7)) + ) + ) + (the-as ragdoll-joint #f) + ) + +(defmethod ragdoll-method-13 ((this ragdoll) (arg0 ragdoll-edit-info) (arg1 ragdoll-joint) (arg2 matrix) (arg3 matrix)) + (when (and (nonzero? arg0) (let ((v1-1 (-> arg0 skel-visible))) + (if (or (zero? v1-1) (= v1-1 4)) + #t + ) + ) + ) + (if (or (not (logtest? (-> *display* real-frame-clock integral-frame-counter) 8)) + (!= (-> arg0 analog-func) 4) + (not (ragdoll-edit-info-method-10 arg0 this (the-as ragdoll-joint (-> arg1 joint-index)))) + ) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> arg3 trans) + (-> arg2 trans) + (new 'static 'rgba :r #xff :g #xff :a #x80) + #f + (the-as rgba -1) + ) + ) + (when (or (not (logtest? (-> *display* real-frame-clock integral-frame-counter) 8)) + (nonzero? (-> arg0 analog-func)) + (not (ragdoll-edit-info-method-10 arg0 this (the-as ragdoll-joint (-> arg1 joint-index)))) + ) + (let ((f30-0 0.25)) + (if (and (zero? (-> arg0 analog-func)) + (ragdoll-edit-info-method-10 arg0 this (the-as ragdoll-joint (-> arg1 joint-index))) + ) + (set! f30-0 0.35) + ) + (add-debug-matrix #t (bucket-id debug-no-zbuf1) arg3 (* 4096.0 f30-0)) + ) + ) + (when (or (not (logtest? (-> *display* real-frame-clock integral-frame-counter) 8)) + (zero? (-> arg0 analog-func)) + (not (ragdoll-edit-info-method-10 arg0 this (the-as ragdoll-joint (-> arg1 joint-index)))) + ) + (let ((f30-1 0.25)) + (if (and (nonzero? (-> arg0 analog-func)) + (ragdoll-edit-info-method-10 arg0 this (the-as ragdoll-joint (-> arg1 joint-index))) + ) + (set! f30-1 0.35) + ) + (add-debug-matrix #t (bucket-id debug-no-zbuf1) arg2 (* 4096.0 f30-1)) + ) + ) + ) + (when (and (nonzero? arg0) + (!= (-> arg0 skel-visible) 2) + (= arg1 (-> this ragdoll-joints)) + (not (logtest? (-> *display* real-frame-clock integral-frame-counter) 8)) + (= (-> arg0 analog-func) 7) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix))) + (matrix-axis-angle! s4-1 (-> this orient-tform) (- (-> this orient-tform w))) + (matrix*! s4-1 s4-1 arg2) + (set! (-> s4-1 trans quad) (-> arg2 trans quad)) + (add-debug-matrix #t (bucket-id debug-no-zbuf1) s4-1 (meters 2)) + ) + ) + 0 + (none) + ) + +(defmethod ragdoll-method-14 ((this ragdoll) (arg0 process-drawable) (arg1 ragdoll-joint) (arg2 object) (arg3 matrix)) + (cond + ((>= (-> arg1 parent-joint) 0) + (let ((s2-0 (get-parent-joint this (the-as (inline-array ragdoll-joint) arg1))) + (s3-0 (new 'stack-no-clear 'matrix)) + ) + (cond + (s2-0 + (quaternion->matrix arg3 (-> s2-0 quat)) + (matrix-axis-angle! s3-0 (-> arg1 pre-tform) (- (-> arg1 pre-tform w))) + (matrix*! arg3 s3-0 arg3) + (set! (-> arg3 trans quad) (-> s2-0 position quad)) + ) + (else + (matrix-axis-angle! s3-0 (-> arg1 pre-tform) (- (-> arg1 pre-tform w))) + (matrix*! arg3 s3-0 (-> arg0 node-list data (-> arg1 parent-joint) bone transform)) + (vector<-cspace! (-> arg3 trans) (-> arg0 node-list data (-> arg1 parent-joint))) + ) + ) + ) + ) + ((> (the-as int arg2) 0) + (let ((s3-1 (new 'stack-no-clear 'matrix)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> arg3 trans quad)) + (matrix-axis-angle! s3-1 (-> arg1 pre-tform) (- (-> arg1 pre-tform w))) + (matrix*! arg3 s3-1 arg3) + (set! (-> arg3 trans quad) (-> s5-1 quad)) + ) + ) + (else + (quaternion->matrix arg3 (-> arg0 root quat)) + (set! (-> arg3 trans quad) (-> arg0 root trans quad)) + ) + ) + 0 + (none) + ) + +(defmethod ragdoll-method-17 ((this ragdoll) (arg0 process-drawable)) + (logclear! (-> this ragdoll-flags) (ragdoll-flag rf1)) + (when (logtest? (-> this ragdoll-flags) (ragdoll-flag rf6)) + (logclear! (-> this ragdoll-flags) (ragdoll-flag rf6)) + (dotimes (v1-7 (the-as int (-> this num-joints))) + (let* ((a2-5 (-> this ragdoll-joints v1-7)) + (a3-3 (-> arg0 node-list data (-> a2-5 joint-index))) + ) + (set! (-> a3-3 param0) (the-as (function cspace transformq none) (-> a2-5 old-param0))) + ) + ) + ) + 0 + (none) + ) + +(defmethod ragdoll-method-15 ((this ragdoll) (arg0 process-drawable) (arg1 ragdoll-edit-info)) + (local-vars + (at-0 int) + (v1-156 float) + (f0-14 float) + (sv-320 vector) + (sv-336 vector) + (sv-352 (function vector float 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) + (sv-544 vector) + (sv-560 vector) + ) + (with-pp + (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) + (when *debug-segment* + (let ((s3-0 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-7 'ragdoll-overall) + (s2-0 *color-white*) + ) + (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-7) + (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 + ) + (if (logtest? (-> this ragdoll-flags) (ragdoll-flag rf9)) + (ragdoll-method-9 this (-> this mirror) arg0) + ) + (if (not arg1) + (set! arg1 (the-as ragdoll-edit-info 0)) + ) + (if (logtest? (-> this ragdoll-flags) (ragdoll-flag rf5)) + (ragdoll-method-10 this arg0 #f (the-as vector #f) #t) + ) + (cond + ((or (zero? (the-as object arg1)) + (and (= (-> arg1 single-step) 1) (cpad-pressed? 0 r2)) + (zero? (-> arg1 single-step)) + ) + (if (not (logtest? (-> this ragdoll-flags) (ragdoll-flag rf2))) + (ragdoll-method-18 this) + ) + ) + ((and (nonzero? (the-as object arg1)) (nonzero? (-> this turn-off-start)) (= (-> arg1 single-step) 1)) + (+! (-> this turn-off-start) (-> arg1 last-frame-dur)) + ) + ) + (let ((f30-0 1.0)) + (when (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)))) + ) + ) + ) + ) + (if (= f30-0 0.0) + (ragdoll-method-17 this arg0) + ) + ) + (set! (-> this flex-blend) f30-0) + ) + (when (and (not (logtest? (-> this ragdoll-flags) (ragdoll-flag rf2))) + (not (logtest? (-> this ragdoll-flags) (ragdoll-flag rf5))) + ) + (let ((s3-1 (new 'stack-no-clear 'matrix)) + (s2-1 (new 'stack-no-clear 'matrix)) + ) + (new 'stack-no-clear 'vector) + (dotimes (s1-1 (the-as int (-> this num-joints))) + (let ((s0-1 (-> this ragdoll-joints s1-1))) + (set! sv-560 (new 'stack-no-clear 'vector)) + (let ((v1-74 (-> s0-1 position quad))) + (set! (-> sv-560 quad) v1-74) + ) + (if (and (logtest? (-> s0-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf2)) + (not (logtest? (-> s0-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf3))) + ) + (vector-float*! (-> s0-1 velocity) (-> s0-1 velocity) 0.1) + ) + (ragdoll-method-14 this arg0 s0-1 s1-1 s2-1) + (cond + ((or (zero? (the-as object arg1)) + (and (= (-> arg1 single-step) 1) (cpad-pressed? 0 r2)) + (zero? (-> arg1 single-step)) + ) + (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 s2-1) + (let ((v1-93 sv-560)) + (let ((a0-39 sv-560)) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> a0-39 quad)) + ) + (.lvf vf5 (&-> sv-320 quad)) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-93 quad) vf6) + ) + ) + (when (and (< s1-1 (the-as int (+ (-> this num-joints) -1))) + (= (-> this ragdoll-joints (+ s1-1 1) parent-joint) -1) + ) + (set! sv-336 (new 'stack-no-clear 'vector)) + (reset-vec! this sv-336) + (let ((v1-104 sv-560)) + (let ((a0-45 sv-560)) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> a0-45 quad)) + ) + (.lvf vf5 (&-> sv-336 quad)) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-104 quad) vf6) + ) + ) + (when (or (> s1-1 0) (!= (-> s0-1 parent-joint) -1)) + (ragdoll-method-21 this sv-560 (-> s2-1 trans) (-> s0-1 joint-length)) + (set! sv-432 (new 'stack-no-clear 'vector)) + (let ((v1-110 sv-560) + (a0-50 (-> s2-1 trans)) + ) + (.lvf vf4 (&-> v1-110 quad)) + (.lvf vf5 (&-> a0-50 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-432 quad) vf6) + (let ((f30-2 (vector-normalize-ret-len! sv-432 1.0)) + (f26-0 (vector-dot sv-432 (-> s2-1 uvec))) + (f28-1 (get-max-angle-for-joint-idx this s1-1)) + ) + (when (< f26-0 (cos f28-1)) + (vector--float*! sv-432 sv-432 (-> s2-1 uvec) f26-0) + (set! sv-352 vector-normalize!) + (set! sv-368 sv-432) + (let ((a1-15 (sin f28-1))) + (sv-352 sv-368 a1-15) + ) + (set! sv-416 sv-432) + (set! sv-384 sv-432) + (set! sv-400 (-> s2-1 uvec)) + (let ((f0-9 (cos f28-1))) + (.lvf vf2 (&-> sv-400 quad)) + (.lvf vf1 (&-> sv-384 quad)) + (let ((v1-123 f0-9)) + (.mov vf3 v1-123) + ) + ) + (.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-416 quad) vf4) + (vector+float*! sv-560 (-> s2-1 trans) sv-432 f30-2) + ) + ) + ) + (if (or (zero? (the-as object arg1)) (-> arg1 collision)) + (ragdoll-method-24 this sv-560 s1-1) + ) + (cond + ((or (> s1-1 0) (!= (-> s0-1 parent-joint) -1)) + (set! sv-448 (new 'stack-no-clear 'vector)) + (let ((v1-134 (-> s2-1 trans)) + (a0-63 sv-560) + ) + (.lvf vf4 (&-> v1-134 quad)) + (.lvf vf5 (&-> a0-63 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-448 quad) vf6) + (vector-normalize-ret-len! sv-448 1.0) + (set! sv-464 (new 'stack-no-clear 'vector)) + (let ((v1-137 sv-560) + (a0-65 (-> s0-1 position)) + ) + (.lvf vf4 (&-> v1-137 quad)) + (.lvf vf5 (&-> a0-65 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-464 quad) vf6) + (let ((f30-3 (vector-dot sv-448 sv-464))) + (vector--float*! sv-464 sv-464 sv-448 f30-3) + (cond + ((< f30-3 0.0) + (set! f0-14 (* f30-3 (-> this compress-vel-parallel))) + (vector-float*! sv-464 sv-464 (-> this compress-vel)) + ) + (else + (set! f0-14 (* f30-3 (-> this stretch-vel-parallel))) + (vector-float*! sv-464 sv-464 (-> this stretch-vel)) + ) + ) + ) + (vector+float*! sv-464 sv-464 sv-448 f0-14) + (vector+! sv-560 (-> s0-1 position) sv-464) + (let ((f0-16 (-> this momentum))) + (if (logtest? (-> s0-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf2)) + (set! f0-16 0.1) + ) + (let ((t9-20 vector-lerp!) + (a0-72 (-> s0-1 velocity)) + (a1-23 (-> s0-1 velocity)) + (a3-6 f0-16) + ) + (t9-20 a0-72 a1-23 sv-464 a3-6) + ) + ) + (let ((a2-12 (vector-! (new 'stack-no-clear 'vector) (-> s2-1 trans) sv-560))) + (.lvf vf1 (&-> a2-12 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-156 vf1) + (let* ((f0-17 v1-156) + (f1-6 (* (-> this maximum-stretch) (-> s0-1 joint-length))) + (f2-3 f1-6) + ) + (if (< (* f2-3 f2-3) f0-17) + (vector--float*! sv-560 (-> s2-1 trans) a2-12 (/ f1-6 (sqrtf f0-17))) + ) + ) + ) + ) + (else + (let ((a2-14 (vector-! (new 'stack-no-clear 'vector) sv-560 (-> s0-1 position))) + (f0-20 (-> this momentum)) + ) + (if (logtest? (-> s0-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf2)) + (set! f0-20 0.1) + ) + (vector-lerp! (-> s0-1 velocity) (-> s0-1 velocity) a2-14 f0-20) + ) + ) + ) + (let ((f0-21 (vector-vector-distance-squared (-> s0-1 position) sv-560)) + (f1-7 40.96) + ) + (if (< f0-21 (* f1-7 f1-7)) + (+! (-> this stable-joints) 1) + ) + ) + (when (and (zero? s1-1) (< (-> s0-1 parent-joint) 0) (logtest? (-> this ragdoll-flags) (ragdoll-flag rf7))) + (let ((v1-176 (-> arg0 root transv))) + (.lvf vf1 (&-> (vector-! (new 'stack-no-clear 'vector) sv-560 (-> s0-1 position)) quad)) + (let ((f0-22 (-> pp clock frames-per-second))) + (.mov at-0 f0-22) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> v1-176 quad) vf1) + ) + ) + (set! (-> s0-1 position quad) (-> sv-560 quad)) + (cond + ((or (> s1-1 0) (!= (-> s0-1 parent-joint) -1)) + (vector-! (-> s3-1 uvec) sv-560 (-> s2-1 trans)) + (vector-normalize! (-> s3-1 uvec) 1.0) + (vector-cross! (-> s3-1 rvec) (-> s3-1 uvec) (-> s2-1 fvec)) + (vector-normalize! (-> s3-1 rvec) 1.0) + (set! sv-528 (new 'stack-no-clear 'vector)) + (let ((v1-183 (-> s0-1 old-x)) + (a0-91 (-> s3-1 rvec)) + ) + (.lvf vf1 (&-> v1-183 quad)) + (.lvf vf2 (&-> a0-91 quad)) + ) + (.outer.product.a.vf acc vf1 vf2) + (.outer.product.b.vf vf3 vf2 vf1 acc) + (.svf (&-> sv-528 quad) vf3) + (vector-flatten! sv-528 (-> s0-1 old-x) (-> s3-1 uvec)) + (vector-normalize! sv-528 1.0) + (cond + ((and (< (-> s0-1 axial-slop) 65536.0) (< (vector-dot (-> s3-1 rvec) sv-528) (cos (-> s0-1 axial-slop)))) + (vector-cross! sv-528 sv-528 (-> s3-1 rvec)) + (vector-cross! sv-528 (-> s3-1 rvec) sv-528) + (vector-normalize! sv-528 1.0) + (set! sv-496 (-> s3-1 rvec)) + (set! sv-480 (-> s3-1 rvec)) + (let ((f0-28 (cos (-> s0-1 axial-slop)))) + (.lvf vf1 (&-> sv-480 quad)) + (let ((v1-195 f0-28)) + (.mov vf2 v1-195) + ) + ) + (.add.x.vf vf1 vf0 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> sv-496 quad) vf1) + (set! sv-544 (-> s3-1 rvec)) + (set! sv-512 (-> s3-1 rvec)) + (let ((f0-30 (sin (-> s0-1 axial-slop)))) + (.lvf vf2 (&-> sv-528 quad)) + (.lvf vf1 (&-> sv-512 quad)) + (let ((v1-201 f0-30)) + (.mov vf3 v1-201) + ) + ) + (.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-544 quad) vf4) + (set! (-> s0-1 old-x quad) (-> s3-1 rvec quad)) + ) + (else + (set! (-> s3-1 rvec quad) (-> sv-528 quad)) + (set! (-> s0-1 old-x quad) (-> s3-1 rvec quad)) + ) + ) + (vector-cross! (-> s3-1 fvec) (-> s3-1 rvec) (-> s3-1 uvec)) + (matrix->quaternion (-> s0-1 quat) s3-1) + ) + (else + (quaternion->matrix s3-1 (-> s0-1 quat)) + ) + ) + ) + (else + (quaternion->matrix s3-1 (-> s0-1 quat)) + ) + ) + (set! (-> s3-1 trans quad) (-> sv-560 quad)) + (set! (-> s3-1 rvec w) 0.0) + (set! (-> s3-1 uvec w) 0.0) + (set! (-> s3-1 fvec w) 0.0) + (if (and (zero? s1-1) (< (-> s0-1 parent-joint) 0) (logtest? (-> this ragdoll-flags) (ragdoll-flag rf7))) + (set! (-> arg0 root trans quad) (-> s3-1 trans quad)) + ) + (ragdoll-method-13 this arg1 s0-1 s3-1 s2-1) + ) + (let* ((a2-19 s2-1) + (a3-10 s3-1) + (v1-216 (-> a3-10 rvec quad)) + (a0-119 (-> a3-10 uvec quad)) + (a1-47 (-> a3-10 fvec quad)) + (a3-11 (-> a3-10 trans quad)) + ) + (set! (-> a2-19 rvec quad) v1-216) + (set! (-> a2-19 uvec quad) a0-119) + (set! (-> a2-19 fvec quad) a1-47) + (set! (-> a2-19 trans quad) a3-11) + ) + ) + ) + (if (and (< (min (the-as int (-> this num-joints)) (max 2 (the int (* 0.9 (the float (-> this num-joints)))))) + (-> this stable-joints) + ) + (< (cos 18.204445) (-> this rotate-vel w)) + ) + (logior! (-> this ragdoll-flags) (ragdoll-flag rf2)) + ) + ) + (when *debug-segment* + (let ((gp-1 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-238 (+ (-> gp-1 depth) -1)) + (s5-1 (-> gp-1 segment v1-238)) + (s4-1 (-> gp-1 base-time)) + ) + (when (>= v1-238 0) + (set! (-> s5-1 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-1)))) + (+! (-> gp-1 depth) -1) + ) + ) + ) + ) + 0 + ) + 0 + (none) + ) + ) + ) + +(defmethod ragdoll-setup! ((this ragdoll) (proc process-drawable) (setup ragdoll-setup)) + "Set up this ragdoll with the given [[ragdoll-setup]]." + (set! (-> this num-joints) (the-as uint (min 60 (-> setup joint-setup length)))) + (if (and (< (-> this num-joints) (the-as uint (-> setup joint-setup length))) (zero? (-> this ragdoll-joints))) + (format 0 "ERROR: too many joints in ragdoll setup~%") + ) + (dotimes (v1-7 100) + (set! (-> this ragdoll-joint-remap 0) (the-as uint 255)) + ) + (dotimes (s3-0 (the-as int (-> this num-joints))) + (let ((s2-0 (-> this ragdoll-joints s3-0))) + (let ((v1-15 (-> setup joint-setup s3-0))) + (set! (-> s2-0 joint-type) (-> v1-15 joint-type)) + (set! (-> s2-0 joint-index) (-> v1-15 joint-index)) + (set! (-> s2-0 parent-joint) (-> v1-15 parent-joint)) + (set! (-> s2-0 pre-tform quad) (-> v1-15 pre-tform quad)) + (set! (-> s2-0 geo-tform quad) (-> v1-15 geo-tform quad)) + (set! (-> s2-0 axial-slop) (-> v1-15 axial-slop)) + (set! (-> s2-0 max-angle) (-> v1-15 max-angle)) + (set! (-> s2-0 coll-rad) (-> v1-15 coll-rad)) + (set! (-> s2-0 hit-sound) (-> v1-15 hit-sound)) + ) + (if (< 100 (-> s2-0 joint-index)) + (format 0 "ERROR: ~S joint index in ragdoll setup exceeds max of ~D~%" (-> proc name) 100) + (set! (-> this ragdoll-joint-remap (-> s2-0 joint-index)) (the-as uint s3-0)) + ) + (set! (-> s2-0 parent-index) -1) + (when (and (nonzero? s3-0) (= (-> s2-0 parent-joint) -1)) + (set! (-> s2-0 parent-index) (+ s3-0 -1)) + (+! (-> this ragdoll-joints (+ s3-0 -1) num-children) 1) + ) + (when (and (nonzero? s3-0) (>= (-> s2-0 parent-joint) 0)) + (dotimes (v1-35 (+ s3-0 -1)) + (when (= (-> this ragdoll-joints v1-35 joint-index) (-> s2-0 parent-joint)) + (set! (-> s2-0 parent-index) v1-35) + (+! (-> this ragdoll-joints v1-35 num-children) 1) + (goto cfg-28) + ) + ) + ) + (label cfg-28) + (set! (-> s2-0 num-children) 0) + ) + 0 + ) + (set! (-> this orient-tform quad) (-> setup orient-tform quad)) + (set! (-> this scale quad) (-> setup scale quad)) + (set! (-> this bg-collide-with) (the-as uint (-> setup bg-collide-with))) + (set-vector! (-> this gravity) 0.0 -1.0 0.0 1.0) + (set! (-> this gravity-target quad) (-> this gravity quad)) + (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.75) + (set! (-> this maximum-stretch) 1.5) + (set! (-> this turn-off-start) 0) + (set! (-> this ragdoll-flags) (ragdoll-flag rf0 rf7 rf9)) + (set! (-> this allow-destabilize) (the-as uint 0)) + 0 + (none) + ) + +(defmethod ragdoll-proc-method-15 ((this ragdoll-proc) (arg0 symbol) (arg1 vector) (arg2 symbol)) + (if (nonzero? (-> this ragdoll)) + (ragdoll-method-10 (-> this ragdoll) (ppointer->process (-> this parent)) arg0 arg1 arg2) + ) + 0 + (none) + ) + +(defmethod disable-for-duration ((this ragdoll-proc) (arg0 time-frame)) + (if (nonzero? (-> this ragdoll)) + (turn-off-for-duration! (-> this ragdoll) arg0) + ) + 0 + (none) + ) + +(defmethod ragdoll-proc-method-17 ((this ragdoll-proc) (arg0 ragdoll-edit-info)) + (if (nonzero? (-> this ragdoll)) + (ragdoll-method-15 (-> this ragdoll) (ppointer->process (-> this parent)) arg0) + ) + 0 + (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) (ppointer->process (-> this parent))) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod ragdoll-proc-method-19 ((this ragdoll-proc)) + (if (nonzero? (-> this ragdoll)) + (logtest? (-> this ragdoll ragdoll-flags) (ragdoll-flag rf2)) + #t + ) + (none) + ) + +(defstate idle (ragdoll-proc) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (when (nonzero? (-> self ragdoll)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-0 #f) + (gp-0 (the-as object (-> block param 1))) + ) + (let ((s2-0 (ppointer->process (-> self parent)))) + (cond + ((and (logtest? (-> (the-as attack-info gp-0) mask) (attack-mask id)) + (= (-> (the-as attack-info gp-0) id) (-> self last-attack-id)) + ) + ) + ((= proc *target*) + (set! (-> s4-0 quad) (-> (the-as process-drawable proc) root trans quad)) + (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? (-> 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 (-> s2-0 root)) + (the-as touching-shapes-entry a3-1) + ) + ) + (set! (-> s4-0 quad) (-> s5-0 quad)) + (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)) + (set! (-> s5-0 quad) (-> (the-as attack-info gp-0) attacker-velocity quad)) + (when (not s3-0) + (vector-! s4-0 (-> self ragdoll ragdoll-joints 0 position) s5-0) + (set! s3-0 #t) + ) + ) + ) + ) + ) + (when s3-0 + (vector-normalize! s5-0 2048.0) + (ragdoll-method-23 (-> self ragdoll) s4-0 s5-0 1.0 #t) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 409.6) + (+! (-> s5-0 y) 1024.0) + (set! (-> self ragdoll ragdoll-joints 0 velocity quad) (-> s5-0 quad)) + (if (logtest? (-> (the-as attack-info gp-0) mask) (attack-mask id)) + (set! (-> self last-attack-id) (-> (the-as attack-info gp-0) id)) + ) + #t + ) + ) + ) + ) + (('notice) + (if (= (-> block param 0) 'die) + (deactivate self) + ) + ) + ) + ) + :trans (behavior () + (+! (-> self clock ref-count) -1) + (+! (-> self parent 0 clock ref-count) 1) + (set! (-> self clock) (-> self parent 0 clock)) + (when (nonzero? (-> self ragdoll)) + (cond + ((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) (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)))) + ) + (deactivate self) + ) + ) + 0 + ) + ) + :code sleep-code + ) + +(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) (ppointer->process (-> this parent))) + ) + ((method-of-type process deactivate) this) + (none) + ) + +;; WARN: Return type mismatch process vs ragdoll-proc. +(defmethod relocate ((this ragdoll-proc) (offset int)) + (if (nonzero? (-> this ragdoll)) + (&+! (-> this ragdoll) offset) + ) + (the-as ragdoll-proc ((method-of-type process relocate) this offset)) + ) + +(defbehavior ragdoll-proc-init-by-other ragdoll-proc ((arg0 ragdoll-setup)) + (set! (-> self last-attack-id) (the-as uint 0)) + (set! (-> self ragdoll) (new 'process 'ragdoll)) + (if (nonzero? (-> self ragdoll)) + (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 38a77eaaa4..ce31d4f37e 100644 --- a/goal_src/jak3/engine/physics/rigid-body-h.gc +++ b/goal_src/jak3/engine/physics/rigid-body-h.gc @@ -70,6 +70,10 @@ ) ;; ---rigid-body-h:rigid-body-object-flag +(declare-type rigid-body-object basic) +(declare-type rigid-body-queue-manager process) +(define-extern *rigid-body-queue-manager* rigid-body-queue-manager) + ;; DECOMP BEGINS (deftype rigid-body-info (structure) @@ -86,7 +90,7 @@ (inertial-tensor-box meters 3) ) (:methods - (rigid-body-info-method-9 () none) + (rigid-body-info-method-9 (_type_) none) ) ) @@ -131,7 +135,7 @@ (velocity vector :inline) (impulse float) (pat pat-surface) - (process basic) + (process process) (prim-id uint32) ) ) @@ -140,9 +144,9 @@ (deftype rigid-body-control (basic) ((flags rigid-body-flag) (info rigid-body-info) - (force-callback basic) + (force-callback (function rigid-body-object float none)) (process process) - (blocked-by basic) + (blocked-by process-focusable) (time-remaining float) (step-count int16) (linear-damping float) @@ -162,92 +166,95 @@ (inv-i-world matrix :inline) ) (:methods - (new (symbol type) _type_) - (rigid-body-control-method-9 () none) - (rigid-body-control-method-10 () none) - (rigid-body-control-method-11 () none) - (rigid-body-control-method-12 () none) - (rigid-body-control-method-13 () none) - (rigid-body-control-method-14 () none) - (rigid-body-control-method-15 () none) - (rigid-body-control-method-16 () none) - (rigid-body-control-method-17 () none) - (rigid-body-control-method-18 () none) - (rigid-body-control-method-19 () none) - (rigid-body-control-method-20 () none) - (rigid-body-control-method-21 () none) - (rigid-body-control-method-22 () none) - (rigid-body-control-method-23 () none) - (rigid-body-control-method-24 () none) - (rigid-body-control-method-25 () none) - (rigid-body-control-method-26 () none) - (rigid-body-control-method-27 () none) - (rigid-body-control-method-28 () none) - (rigid-body-control-method-29 () none) - (rigid-body-control-method-30 () none) - (rigid-body-control-method-31 () none) - (rigid-body-control-method-32 () none) - (rigid-body-control-method-33 () none) + (new (symbol type process) _type_) + (rigid-body-control-method-9 (_type_ collide-shape-moving float) none) + (rigid-body-control-method-10 (_type_ rigid-body-object float float) object) + (update-rbody-transform! (_type_ collide-shape-moving) none) + (rigid-body-control-method-12 (_type_ float) none) + (init-velocities! (_type_) none) + (rigid-body-control-method-14 (_type_ float) none) + (rigid-body-control-method-15 (_type_) none) + (reset-force-and-torque! (_type_) none) + (reset-momentum! (_type_) none) + (apply-impact! (_type_ vector vector) none) + (rigid-body-control-method-19 (_type_ vector vector) none) + (add-force! (_type_ vector) none) + (rigid-body-control-method-21 (_type_ vector vector float) none) + (rigid-body-control-method-22 (_type_ vector vector) none) + (rigid-body-control-method-23 (_type_ vector vector) none) + (rigid-body-control-method-24 (_type_ vector vector) none) + (rigid-body-control-method-25 (_type_ vector) none) + (rigid-body-control-method-26 (_type_) none) + (init! (_type_ rigid-body-info vector quaternion (function rigid-body-object float)) none) + (rigid-body-control-method-28 (_type_ vector quaternion) none) + (debug-print-info (_type_ object) none) + (debug-print-force-torque (_type_ object) none) + (debug-print-pos-rot (_type_ object) none) + (debug-print-momentum (_type_ object) none) + (debug-print-velocity (_type_ object) none) ) ) (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 + active + ) (:methods - (rigid-body-object-method-28 () none) - (rigid-body-object-method-29 () none) - (rigid-body-object-method-30 () none) - (rigid-body-object-method-31 () none) - (rigid-body-object-method-32 () none) - (rigid-body-object-method-33 () none) - (rigid-body-object-method-34 () none) - (rigid-body-object-method-35 () none) - (rigid-body-object-method-36 () none) - (rigid-body-object-method-37 () none) - (rigid-body-object-method-38 () none) - (rigid-body-object-method-39 () none) - (rigid-body-object-method-40 () none) - (rigid-body-object-method-41 () none) - (rigid-body-object-method-42 () none) - (rigid-body-object-method-43 () none) - (rigid-body-object-method-44 () none) - (rigid-body-object-method-45 () none) - (rigid-body-object-method-46 () none) - (rigid-body-object-method-47 () none) - (rigid-body-object-method-48 () none) - (rigid-body-object-method-49 () none) - (rigid-body-object-method-50 () none) - (rigid-body-object-method-51 () none) - (rigid-body-object-method-52 () none) - (rigid-body-object-method-53 () none) - (rigid-body-object-method-54 () none) - (rigid-body-object-method-55 () none) + (rigid-body-object-method-30 (_type_) none) + (apply-gravity! (_type_ float) none) + (rigid-body-object-method-32 (_type_) none) + (alloc-rbody-control! (_type_ rigid-body-object-constants) none) + (init-collision! (_type_) none) + (init-rbody-control! (_type_) none) + (go-idle (_type_) object) + (rigid-body-object-method-37 (_type_) none) + (rigid-body-object-method-38 (_type_) none) + (rbody-post (_type_) none) + (apply-momentum! (_type_) none) + (disable-physics! (_type_) none) + (rigid-body-object-method-42 (_type_) none) + (rigid-body-object-method-43 (_type_) none) + (impulse-handler (_type_) none) + (go-active (_type_) object) + (apply-damage (_type_ float rigid-body-impact) none) + (impulse-force<-penetrate (_type_ rigid-body-impact attack-info penetrate) none) + (on-impact (_type_ rigid-body-impact) none) + (rbody-event-handler (_type_ process int symbol event-message-block) object) + (attack-handler (_type_ process-drawable attack-info touching-shapes-entry penetrate) symbol) + (touch-handler (_type_ process-focusable touching-shapes-entry) symbol) + (init-rbody-impact-from-tshape! (_type_ rigid-body-impact touching-shapes-entry) none) + (rigid-body-object-method-53 (_type_ float) none) + (rigid-body-object-method-54 (_type_) none) + (clear-impulse-force-flag! (_type_) none) ) ) (deftype rigid-body-queue (structure) ((count int8) - (manager uint64) + (manager handle) (array handle 128) ) (:methods - (rigid-body-queue-method-9 () none) - (rigid-body-queue-method-10 () none) - (rigid-body-queue-method-11 () none) - (rigid-body-queue-method-12 () none) - (rigid-body-queue-method-13 () none) - (rigid-body-queue-method-14 () none) - (rigid-body-queue-method-15 () none) - (rigid-body-queue-method-16 () none) + (init-queue! (_type_ process) none) + (rigid-body-queue-method-10 (_type_) none) + (rigid-body-queue-method-11 (_type_ process) none) + (rigid-body-queue-method-12 (_type_ int int) none) + (rigid-body-queue-method-13 (_type_ int process) none) + (rigid-body-queue-method-14 (_type_ int) none) + (rigid-body-queue-method-15 (_type_ process) none) + (rigid-body-queue-method-16 (_type_) none) ) ) diff --git a/goal_src/jak3/engine/physics/rigid-body-queue.gc b/goal_src/jak3/engine/physics/rigid-body-queue.gc index 10fa8dea23..21a2577ddd 100644 --- a/goal_src/jak3/engine/physics/rigid-body-queue.gc +++ b/goal_src/jak3/engine/physics/rigid-body-queue.gc @@ -5,5 +5,309 @@ ;; name in dgo: rigid-body-queue ;; dgos: GAME +(declare-type rigid-body-queue-manager process) + ;; DECOMP BEGINS +(define *rigid-body-queue-manager* (the-as rigid-body-queue-manager #f)) + +(defmethod init-queue! ((this rigid-body-queue) (arg0 process)) + (set! (-> this count) 0) + (set! (-> this manager) (process->handle arg0)) + (dotimes (v1-3 128) + (set! (-> this array v1-3) (the-as handle #f)) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod rigid-body-queue-method-16 ((this rigid-body-queue)) + (let ((gp-0 0)) + (dotimes (v1-0 (-> this count)) + (let ((a1-2 (-> this array v1-0)) + (a2-0 (+ v1-0 1)) + ) + (while (< a2-0 (-> this count)) + (if (= a1-2 (-> this array a2-0)) + (+! gp-0 1) + ) + (+! a2-0 1) + ) + ) + ) + (if (> gp-0 0) + (format 0 "rigid-body-queue::validate: duplicate count ~d~%" gp-0) + ) + (zero? gp-0) + ) + (none) + ) + +(defmethod rigid-body-queue-method-10 ((this rigid-body-queue)) + (with-pp + (let ((f0-0 (seconds-per-frame))) + (countdown (v1-1 (-> this count)) + (let ((a0-4 (handle->process (-> this array v1-1)))) + (cond + (a0-4 + (let ((a0-6 (-> (the-as process-focusable a0-4) rbody))) + (set! (-> a0-6 time-remaining) f0-0) + (set! (-> a0-6 blocked-by) #f) + (set! (-> a0-6 step-count) 0) + (logclear! (-> a0-6 flags) (rigid-body-flag blocker)) + ) + ) + (else + ) + ) + ) + ) + ) + (let ((s5-0 0)) + (let ((s4-0 (-> *kernel-context* prevent-from-run))) + (b! #t cfg-37 :delay (nop!)) + (label cfg-11) + (let ((s3-0 (handle->process (-> this array s5-0)))) + (when s3-0 + (let ((s2-0 (-> (the-as process-focusable s3-0) rbody))) + (when (and (logtest? (-> s2-0 flags) (rigid-body-flag enable-physics)) + (not (logtest? s4-0 (-> s3-0 mask))) + (and (< 0.001 (-> s2-0 time-remaining)) (< (-> s2-0 step-count) 4)) + ) + (let ((s1-0 pp)) + (set! pp s3-0) + (rigid-body-object-method-54 (the-as rigid-body-object s3-0)) + (set! pp s1-0) + ) + (+! (-> s2-0 step-count) 1) + (let ((a2-2 (-> s2-0 blocked-by))) + (when a2-2 + (when #t + (logior! (-> a2-2 rbody flags) (rigid-body-flag blocker)) + (rigid-body-queue-method-13 this s5-0 a2-2) + (let ((v1-34 (process->handle s3-0))) + (b! (!= (-> this array s5-0) v1-34) cfg-11 :delay (nop!)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (+! s5-0 1) + (label cfg-37) + (b! (< s5-0 (-> this count)) cfg-11) + ) + (let ((s5-1 (-> *kernel-context* prevent-from-run))) + (dotimes (s4-1 (-> this count)) + (let ((a0-20 (handle->process (-> this array s4-1)))) + (when (and a0-20 + (logtest? (-> (the-as process-focusable a0-20) rbody flags) (rigid-body-flag enable-physics)) + (not (logtest? s5-1 (-> a0-20 mask))) + ) + (let ((s3-1 pp)) + (set! pp a0-20) + (clear-impulse-force-flag! (the-as rigid-body-object a0-20)) + (set! pp s3-1) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod rigid-body-queue-method-11 ((this rigid-body-queue) (arg0 process)) + (let ((v1-0 -1)) + (let ((a2-0 0)) + (b! #t cfg-9 :delay (nop!)) + (label cfg-1) + (b! (handle->process (-> this array a2-0)) cfg-8 :delay (empty-form)) + (set! v1-0 a2-0) + (b! #t cfg-11 :delay (nop!)) + (label cfg-8) + (+! a2-0 1) + (label cfg-9) + (b! (< a2-0 (-> this count)) cfg-1) + ) + (label cfg-11) + (cond + ((!= v1-0 -1) + (set! (-> this array v1-0) (process->handle arg0)) + ) + (else + (when (< (-> this count) 128) + (set! (-> this array (-> this count)) (process->handle arg0)) + (+! (-> this count) 1) + ) + ) + ) + ) + 0 + 0 + (none) + ) + +(defmethod rigid-body-queue-method-12 ((this rigid-body-queue) (arg0 int) (arg1 int)) + (when (< arg0 arg1) + (let ((v1-1 arg1) + (a3-0 (+ arg1 -1)) + (a2-3 (-> this array arg1)) + ) + (while (>= a3-0 arg0) + (set! (-> this array v1-1) (-> this array a3-0)) + (+! a3-0 -1) + (+! v1-1 -1) + ) + (set! (-> this array arg0) a2-3) + ) + ) + 0 + (none) + ) + +(defmethod rigid-body-queue-method-13 ((this rigid-body-queue) (arg0 int) (arg1 process)) + (let ((v1-2 (process->handle arg1)) + (a2-4 (+ arg0 1)) + ) + (b! #t cfg-9 :delay (nop!)) + (label cfg-6) + (b! (!= (-> this array a2-4) v1-2) cfg-8 :delay (empty-form)) + (rigid-body-queue-method-12 this arg0 a2-4) + (b! #t cfg-11 :delay (nop!)) + (label cfg-8) + (+! a2-4 1) + (label cfg-9) + (b! (< a2-4 (-> this count)) cfg-6) + ) + (label cfg-11) + 0 + 0 + (none) + ) + +(defmethod rigid-body-queue-method-14 ((this rigid-body-queue) (arg0 int)) + (let ((v1-0 arg0) + (a1-1 (+ arg0 1)) + ) + (while (< a1-1 (-> this count)) + (set! (-> this array v1-0) (-> this array a1-1)) + (+! a1-1 1) + (+! v1-0 1) + ) + ) + (+! (-> this count) -1) + 0 + (none) + ) + +(defmethod rigid-body-queue-method-15 ((this rigid-body-queue) (arg0 process)) + (let ((v1-2 (process->handle arg0)) + (a1-4 0) + ) + (b! #t cfg-9 :delay (nop!)) + (label cfg-6) + (b! (!= (-> this array a1-4) v1-2) cfg-8 :delay (empty-form)) + (rigid-body-queue-method-14 this a1-4) + (b! #t cfg-11 :delay (nop!)) + (label cfg-8) + (+! a1-4 1) + (label cfg-9) + (b! (< a1-4 (-> this count)) cfg-6) + ) + (label cfg-11) + 0 + 0 + (none) + ) + +(deftype rigid-body-queue-manager (process) + ((queue rigid-body-queue) + ) + (:state-methods + idle + ) + ) + + +(defmethod deactivate ((this rigid-body-queue-manager)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set! *rigid-body-queue-manager* #f) + ((method-of-type process deactivate) this) + (none) + ) + +;; WARN: Return type mismatch process vs rigid-body-queue-manager. +(defmethod relocate ((this rigid-body-queue-manager) (offset int)) + (set! *rigid-body-queue-manager* this) + (if *rigid-body-queue-manager* + (set! *rigid-body-queue-manager* (&+ *rigid-body-queue-manager* offset)) + ) + (the-as rigid-body-queue-manager ((method-of-type process relocate) this offset)) + ) + +(defstate idle (rigid-body-queue-manager) + :virtual #t + :exit (behavior () + (set! (-> self queue count) 0) + 0 + ) + :code sleep-code + :post (behavior () + (local-vars (a0-3 int) (a0-5 int)) + (let* ((v1-1 (-> *perf-stats* data 17)) + (a0-0 (-> v1-1 ctrl)) + ) + (+! (-> v1-1 count) 1) + (b! (zero? a0-0) cfg-2 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-0) + ) + (.sync.l) + (.sync.p) + (label cfg-2) + 0 + (rigid-body-queue-method-10 (-> self queue)) + (let ((v1-6 (-> *perf-stats* data 17))) + (b! (zero? (-> v1-6 ctrl)) cfg-4 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-3 pcr0) + (+! (-> v1-6 accum0) a0-3) + (.mfpc a0-5 pcr1) + (+! (-> v1-6 accum1) a0-5) + ) + (label cfg-4) + 0 + ) + ) + +(defbehavior rigid-body-queue-manager-init-by-other rigid-body-queue-manager ((arg0 rigid-body-queue)) + (stack-size-set! (-> self main-thread) 128) + (set! (-> self queue) arg0) + (init-queue! (-> self queue) self) + (go-virtual idle) + ) + +(defun rigid-body-queue-manager-spawn ((arg0 rigid-body-queue) (arg1 process-tree)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn rigid-body-queue-manager arg0 :name "rigid-body-queue-manager" :to arg1))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + gp-0 + ) + ) diff --git a/goal_src/jak3/engine/physics/rigid-body.gc b/goal_src/jak3/engine/physics/rigid-body.gc index c4022d2f9b..4d6c61a8ed 100644 --- a/goal_src/jak3/engine/physics/rigid-body.gc +++ b/goal_src/jak3/engine/physics/rigid-body.gc @@ -7,3 +7,1416 @@ ;; DECOMP BEGINS +(deftype rigid-body-work (structure) + ((max-ang-momentum float) + (max-ang-velocity float) + ) + ) + + +(define *rigid-body-work* (new 'static 'rigid-body-work)) + +(defmethod new rigid-body-control ((allocation symbol) (type-to-make type) (arg0 process)) + (let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> v0-0 process) arg0) + v0-0 + ) + ) + +(defmethod relocate ((this rigid-body-control) (offset int)) + (&+! (-> this process) offset) + this + ) + +(defmethod rigid-body-info-method-9 ((this rigid-body-info)) + (let ((f24-0 (-> this mass)) + (f28-0 (-> this inertial-tensor-box 0)) + (f30-0 (-> this inertial-tensor-box 1)) + (f26-0 (-> this inertial-tensor-box 2)) + ) + (let ((f0-0 f24-0)) + (set! (-> this inv-mass) (/ 1.0 f0-0)) + ) + (matrix-identity! (-> this inertial-tensor)) + (matrix-identity! (-> this inv-inertial-tensor)) + (let ((f0-4 (* 0.083333336 f24-0))) + (let* ((f1-1 f30-0) + (f1-3 (* f1-1 f1-1)) + (f2-0 f26-0) + ) + (set! (-> this inertial-tensor rvec x) (* f0-4 (+ f1-3 (* f2-0 f2-0)))) + ) + (let ((f1-6 f28-0)) + (set! (-> this inertial-tensor uvec y) (* f0-4 (+ (* f1-6 f1-6) (* f26-0 f26-0)))) + ) + (set! (-> this inertial-tensor fvec z) (* f0-4 (+ (* f28-0 f28-0) (* f30-0 f30-0)))) + ) + ) + (let ((f0-6 (-> this inertial-tensor rvec x))) + (set! (-> this inv-inertial-tensor rvec x) (/ 1.0 f0-6)) + ) + (let ((f0-9 (-> this inertial-tensor uvec y))) + (set! (-> this inv-inertial-tensor uvec y) (/ 1.0 f0-9)) + ) + (let ((f0-12 (-> this inertial-tensor fvec z))) + (set! (-> this inv-inertial-tensor fvec z) (/ 1.0 f0-12)) + ) + 0 + (none) + ) + +(defmethod reset-force-and-torque! ((this rigid-body-control)) + (set! (-> this force quad) (the-as uint128 0)) + (set! (-> this torque quad) (the-as uint128 0)) + 0 + (none) + ) + +(defmethod reset-momentum! ((this rigid-body-control)) + (set! (-> this lin-momentum quad) (the-as uint128 0)) + (set! (-> this ang-momentum quad) (the-as uint128 0)) + 0 + (none) + ) + +(defmethod rigid-body-control-method-26 ((this rigid-body-control)) + (when #t + (quaternion->matrix (-> this matrix) (the-as quaternion (-> this rot))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-rotate*! s5-0 (-> this info cm-offset-joint) (-> this matrix)) + (vector-! (-> this matrix trans) (-> this position) s5-0) + ) + ) + 0 + (none) + ) + +(defmethod rigid-body-control-method-28 ((this rigid-body-control) (arg0 vector) (arg1 quaternion)) + (let ((s3-0 (new 'stack-no-clear 'rigid-body-impact))) + (quaternion->matrix (the-as matrix (-> s3-0 normal)) arg1) + (vector-rotate*! (-> s3-0 point) (-> this info cm-offset-joint) (the-as matrix (-> s3-0 normal))) + (vector+! (-> this position) arg0 (-> s3-0 point)) + ) + (quaternion-copy! (the-as quaternion (-> this rot)) arg1) + (quaternion-normalize! (the-as quaternion (-> this rot))) + (rigid-body-control-method-26 this) + 0 + (none) + ) + +(defmethod init! ((this rigid-body-control) + (arg0 rigid-body-info) + (arg1 vector) + (arg2 quaternion) + (arg3 (function rigid-body-object float)) + ) + (set! (-> this info) arg0) + (set! (-> this force-callback) (the-as (function rigid-body-object float none) arg3)) + (rigid-body-info-method-9 (-> this info)) + (let ((v1-2 this)) + (set! (-> v1-2 force quad) (the-as uint128 0)) + (set! (-> v1-2 torque quad) (the-as uint128 0)) + ) + 0 + (reset-momentum! this) + (rigid-body-control-method-28 this arg1 arg2) + (init-velocities! this) + (set! (-> this linear-damping) (-> arg0 linear-damping)) + (set! (-> this angular-damping) (-> arg0 angular-damping)) + (set! (-> this friction-factor) (-> arg0 friction-factor)) + (set! (-> this bounce-factor) (-> arg0 bounce-factor)) + 0 + (none) + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod rigid-body-control-method-23 ((this rigid-body-control) (arg0 vector) (arg1 vector)) + (let ((v1-0 (new 'stack-no-clear 'inline-array 'vector 2))) + (vector-! (-> v1-0 0) arg0 (-> this position)) + (vector-cross! (-> v1-0 1) (-> this ang-velocity) (-> v1-0 0)) + (vector+! arg1 (-> v1-0 1) (-> this lin-velocity)) + ) + (none) + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod rigid-body-control-method-24 ((this rigid-body-control) (arg0 vector) (arg1 vector)) + (local-vars (t0-5 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((v1-0 (new 'stack-no-clear 'inline-array 'vector 2))) + (vector-! (-> v1-0 0) arg0 (-> this position)) + (vector-cross! (-> v1-0 1) (-> this torque) (-> v1-0 0)) + (let ((a1-2 (-> v1-0 1)) + (a3-3 (-> v1-0 1)) + (f0-0 1.0) + ) + (.lvf vf1 (&-> (-> v1-0 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 t0-5 vf1) + (vector-float*! a1-2 a3-3 (/ f0-0 t0-5)) + ) + (vector+! arg1 (-> v1-0 1) (-> this force)) + ) + (none) + ) + ) + +(defun matrix-3x3-triple-transpose-product ((arg0 matrix) (arg1 matrix) (arg2 matrix)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'matrix 3))) + (let* ((v1-0 (-> s5-0 0)) + (a3-0 arg1) + (a0-1 (-> a3-0 rvec quad)) + (a1-1 (-> a3-0 uvec quad)) + (a2-1 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-0 rvec quad) a0-1) + (set! (-> v1-0 uvec quad) a1-1) + (set! (-> v1-0 fvec quad) a2-1) + (set! (-> v1-0 trans quad) a3-1) + ) + (vector-reset! (-> s5-0 0 trans)) + (matrix-transpose! (-> s5-0 1) (-> s5-0 0)) + (matrix*! (-> s5-0 2) arg2 (-> s5-0 0)) + (matrix*! arg0 (-> s5-0 1) (-> s5-0 2)) + ) + arg0 + ) + +(defmethod rigid-body-control-method-12 ((this rigid-body-control) (arg0 float)) + (local-vars (v1-6 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 ((a2-0 (-> this lin-momentum))) + (let ((v1-0 (-> this lin-momentum))) + (let ((a0-1 (-> this force))) + (let ((a3-0 arg0)) + (.mov vf7 a3-0) + ) + (.lvf vf5 (&-> a0-1 quad)) + ) + (.lvf vf4 (&-> v1-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 (&-> a2-0 quad) vf6) + ) + (let ((a2-1 (-> this ang-momentum))) + (let ((v1-1 (-> this ang-momentum))) + (let ((a0-2 (-> this torque))) + (let ((a1-1 arg0)) + (.mov vf7 a1-1) + ) + (.lvf vf5 (&-> a0-2 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 (&-> a2-1 quad) vf6) + ) + (let* ((f0-3 (* 500000000.0 (-> this info mass))) + (f1-1 f0-3) + (f1-3 (* f1-1 f1-1)) + ) + (.lvf vf1 (&-> (-> this ang-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-6 vf1) + (if (< f1-3 v1-6) + (vector-normalize! (-> this ang-momentum) f0-3) + ) + ) + (set! (-> this force quad) (the-as uint128 0)) + (set! (-> this torque quad) (the-as uint128 0)) + 0 + 0 + (none) + ) + ) + +(defmethod init-velocities! ((this rigid-body-control)) + (let ((v1-0 (-> this info))) + (vector-float*! (-> this lin-velocity) (-> this lin-momentum) (-> v1-0 inv-mass)) + (matrix-3x3-triple-transpose-product (-> this inv-i-world) (-> this matrix) (-> v1-0 inv-inertial-tensor)) + ) + (vector-rotate*! (-> this ang-velocity) (-> this ang-momentum) (-> this inv-i-world)) + 0 + (none) + ) + +(defmethod rigid-body-control-method-14 ((this rigid-body-control) (arg0 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((a1-1 (-> this position))) + (let ((v1-0 (-> this position))) + (let ((a0-1 (-> this lin-velocity))) + (let ((a2-0 arg0)) + (.mov vf7 a2-0) + ) + (.lvf vf5 (&-> a0-1 quad)) + ) + (.lvf vf4 (&-> v1-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 (&-> a1-1 quad) vf6) + ) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (set! (-> (the-as vector (&-> s4-0 x)) quad) (-> this ang-velocity quad)) + (set! (-> s4-0 w) 0.0) + (quaternion*! s4-0 s4-0 (the-as quaternion (-> this rot))) + (quaternion-float*! s4-0 s4-0 0.5) + (+! (-> this rot x) (* (-> s4-0 x) arg0)) + (+! (-> this rot y) (* (-> s4-0 y) arg0)) + (+! (-> this rot z) (* (-> s4-0 z) arg0)) + (+! (-> this rot w) (* (-> s4-0 w) arg0)) + ) + (quaternion-normalize! (the-as quaternion (-> this rot))) + (rigid-body-control-method-26 this) + 0 + (none) + ) + ) + +(defun damping-time-adjust ((arg0 float) (arg1 float)) + (let ((f0-0 0.0) + (f1-0 1.0) + (f2-2 (* -1.0 (- 1.0 arg0) arg1)) + (f3-3 0.016666668) + ) + (fmax f0-0 (+ f1-0 (* f2-2 (/ 1.0 f3-3)))) + ) + ) + +(defmethod rigid-body-control-method-9 ((this rigid-body-control) (arg0 collide-shape-moving) (arg1 float)) + (rigid-body-control-method-12 this arg1) + (-> this info) + (let* ((v1-3 (-> this lin-momentum)) + (a0-2 (-> this lin-momentum)) + (f3-0 (-> this linear-damping)) + (f2-0 arg1) + (f0-0 0.0) + (f1-0 1.0) + (f2-1 (* -1.0 (- 1.0 f3-0) f2-0)) + (f3-3 0.016666668) + ) + (vector-float*! v1-3 a0-2 (fmax f0-0 (+ f1-0 (* f2-1 (/ 1.0 f3-3))))) + ) + (let* ((v1-5 (-> this ang-momentum)) + (a0-3 (-> this ang-momentum)) + (f3-6 (-> this angular-damping)) + (f2-3 arg1) + (f0-3 0.0) + (f1-2 1.0) + (f2-4 (* -1.0 (- 1.0 f3-6) f2-3)) + (f3-9 0.016666668) + ) + (vector-float*! v1-5 a0-3 (fmax f0-3 (+ f1-2 (* f2-4 (/ 1.0 f3-9))))) + ) + (init-velocities! this) + (if (logtest? (-> this flags) (rigid-body-flag enable-collision)) + (rbody-collision arg0 this arg1) + (rigid-body-control-method-14 this arg1) + ) + 0 + (none) + ) + +(defmethod collide-with-all-collide-cache-prims ((this collide-shape-moving) (arg0 matrix) (arg1 collide-query)) + (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) + (vf7 :class vf) + (vf8 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 *collide-cache*) + (s3-0 (-> this root-prim)) + (s2-0 1) + ) + (when (zero? (-> s3-0 prim-core prim-type)) + (let ((v1-2 s3-0)) + (set! s3-0 (-> (the-as collide-shape-prim-group v1-2) child 0)) + (set! s2-0 (the-as int (-> v1-2 specific 0))) + ) + ) + (b! #t cfg-13 :delay (nop!)) + (label cfg-3) + (+! s2-0 -1) + (let ((v1-4 -1)) + (b! (!= (-> s3-0 prim-core prim-type) v1-4) cfg-12 :delay (nop!)) + ) + (.lvf vf5 (&-> s3-0 local-sphere quad)) + (.lvf vf1 (&-> arg0 rvec quad)) + (.lvf vf2 (&-> arg0 uvec quad)) + (.lvf vf3 (&-> arg0 fvec quad)) + (.lvf vf4 (&-> arg0 trans quad)) + (.lvf vf6 (&-> s3-0 prim-core world-sphere 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 vf7 vf4 vf0 acc :mask #b111) + (.sub.vf vf8 vf7 vf6 :mask #b111) + (.svf (&-> arg1 move-dist quad) vf8) + (let ((s1-0 (the-as collide-cache-prim (-> s4-0 prims)))) + (countdown (s0-0 (-> s4-0 num-prims)) + (when (logtest? (-> s3-0 prim-core collide-with) (-> s1-0 prim-core collide-as)) + (if (>= (-> s1-0 prim-core prim-type) 0) + (collide-with-collide-cache-prim-mesh s3-0 arg1 s1-0) + (collide-with-collide-cache-prim-sphere s3-0 arg1 s1-0) + ) + ) + (&+! s1-0 48) + ) + ) + (label cfg-12) + (&+! s3-0 80) + (label cfg-13) + (b! (nonzero? s2-0) cfg-3 :delay (nop!)) + ) + 0 + (none) + ) + ) + +(defun transform-rigid-body-prims ((arg0 collide-shape-prim) (arg1 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) + (let ((v1-0 arg0) + (a0-1 1) + ) + (when (zero? (-> v1-0 prim-core prim-type)) + (let ((a0-2 (the-as collide-shape-prim-group v1-0))) + (set! v1-0 (-> a0-2 child 0)) + (set! a0-1 (the-as int (-> a0-2 num-children))) + ) + ) + (while (nonzero? a0-1) + (+! a0-1 -1) + (.lvf vf5 (&-> v1-0 local-sphere quad)) + (.lvf vf1 (&-> arg1 rvec quad)) + (.lvf vf2 (&-> arg1 uvec quad)) + (.lvf vf3 (&-> arg1 fvec quad)) + (.lvf vf4 (&-> arg1 trans 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 :mask #b111) + (.svf (&-> v1-0 prim-core world-sphere quad) vf5) + (&+! v1-0 80) + ) + ) + #f + ) + ) + +(deftype rigid-body-move-work (structure) + ((cquery collide-query :inline) + (best-dist float :overlay-at (-> cquery best-u)) + (mat matrix :inline) + (impact-info rigid-body-impact :inline) + (impact-info2 rigid-body-impact :inline) + (orig-position vector :inline) + (orig-rotation quaternion :inline) + (force vector :inline) + (vel vector :inline) + (p-body vector :inline) + (tmp vector :inline) + (tangent-dir vector :inline) + (proc2 process-focusable) + (rbody2 rigid-body-control) + (vel-dot-norm float) + (denom float) + (denom2 float) + (time-step float) + (time-step-scale float) + (step-count int8) + ) + ) + + +(defmethod rbody-collision ((this collide-shape-moving) (arg0 rigid-body-control) (arg1 float)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf6 :class vf) + (vf7 :class vf) + (vf8 :class vf) + (vf9 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'rigid-body-move-work))) + (set! (-> s5-0 time-step) arg1) + (set! (-> s5-0 time-step-scale) 1.0) + (set! (-> s5-0 step-count) 0) + (until (not (and (< 0.05 (-> s5-0 time-step-scale)) (< (-> s5-0 step-count) (the-as int (-> this max-iteration-count)))) + ) + (set! (-> s5-0 cquery best-dist) -100000000.0) + (set! (-> s5-0 cquery best-my-prim) #f) + (set! (-> s5-0 cquery best-other-prim) #f) + (set! (-> s5-0 orig-position quad) (-> arg0 position quad)) + (quaternion-copy! (-> s5-0 orig-rotation) (the-as quaternion (-> arg0 rot))) + (rigid-body-control-method-14 arg0 (* (-> s5-0 time-step-scale) (-> s5-0 time-step))) + (mem-copy! (the-as pointer (-> s5-0 mat)) (the-as pointer (-> arg0 matrix)) 64) + (set! (-> arg0 position quad) (-> s5-0 orig-position quad)) + (quaternion-copy! (the-as quaternion (-> arg0 rot)) (-> s5-0 orig-rotation)) + (rigid-body-control-method-26 arg0) + (transform-rigid-body-prims (-> this root-prim) (-> arg0 matrix)) + (collide-with-all-collide-cache-prims this (-> s5-0 mat) (-> s5-0 cquery)) + (let ((f30-0 (-> s5-0 cquery best-dist))) + (b! (>= f30-0 0.0) cfg-3 :delay #f) + (rigid-body-control-method-14 arg0 (* (-> s5-0 time-step-scale) (-> s5-0 time-step))) + (init-velocities! arg0) + (transform-rigid-body-prims (-> this root-prim) (-> arg0 matrix)) + (set! (-> s5-0 time-step-scale) 0.0) + (b! #t cfg-55 :delay (nop!)) + (label cfg-3) + (update-from-step-size *touching-list* f30-0) + (rigid-body-control-method-14 arg0 (* (-> s5-0 time-step-scale) (-> s5-0 time-step) f30-0)) + ) + (init-velocities! arg0) + (transform-rigid-body-prims (-> this root-prim) (-> arg0 matrix)) + (let* ((a2-3 (-> s5-0 mat)) + (a3-0 (-> arg0 matrix)) + (v1-21 (-> a3-0 rvec quad)) + (a0-19 (-> a3-0 uvec quad)) + (a1-12 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> a2-3 rvec quad) v1-21) + (set! (-> a2-3 uvec quad) a0-19) + (set! (-> a2-3 fvec quad) a1-12) + (set! (-> a2-3 trans quad) a3-1) + ) + (set! (-> s5-0 rbody2) #f) + (set! (-> s5-0 proc2) #f) + (when (-> s5-0 cquery best-other-prim) + (set! (-> s5-0 proc2) (the-as process-focusable (-> s5-0 cquery best-other-prim cshape process))) + (let ((v1-28 (-> s5-0 proc2 rbody))) + (when (nonzero? v1-28) + (set! (-> s5-0 rbody2) v1-28) + (cond + ((logtest? (-> v1-28 flags) (rigid-body-flag active)) + (if (not (logtest? (-> v1-28 flags) (rigid-body-flag enable-physics))) + (send-event (-> s5-0 proc2) 'enable-physics) + ) + ) + (else + (set! (-> s5-0 rbody2) #f) + ) + ) + ) + ) + ) + (let ((v1-33 (-> s5-0 cquery best-my-prim))) + (.lvf vf7 (&-> (-> s5-0 cquery) best-other-tri intersect quad)) + (.lvf vf6 (&-> v1-33 prim-core world-sphere quad)) + (.sub.vf vf8 vf6 vf7) + (.mul.vf vf9 vf8 vf8 :mask #b111) + (.mul.x.vf acc vf0 vf9 :mask #b1000) + (.add.mul.y.vf acc vf0 vf9 acc :mask #b1000) + (.add.mul.z.vf vf9 vf0 vf9 acc :mask #b1000) + (.isqrt.vf Q vf0 vf9 :fsf #b11 :ftf #b11) + (.mov.vf vf8 vf0 :mask #b1000) + (.mov.vf vf7 vf0 :mask #b1000) + (.wait.vf) + (.mul.vf vf8 vf8 Q :mask #b111) + (.nop.vf) + (.nop.vf) + (.nop.vf) + (.svf (&-> s5-0 impact-info normal quad) vf8) + (.svf (&-> s5-0 impact-info point quad) vf7) + (set! (-> s5-0 impact-info prim-id) (-> v1-33 prim-id)) + ) + (set! (-> s5-0 impact-info pat) (-> s5-0 cquery best-other-tri pat)) + (rigid-body-control-method-23 arg0 (the-as vector (-> s5-0 impact-info)) (-> s5-0 impact-info velocity)) + (when (-> s5-0 rbody2) + (init-velocities! (-> s5-0 rbody2)) + (rigid-body-control-method-23 (-> s5-0 rbody2) (the-as vector (-> s5-0 impact-info)) (-> s5-0 vel)) + (vector-! (-> s5-0 impact-info velocity) (-> s5-0 impact-info velocity) (-> s5-0 vel)) + ) + (set! (-> s5-0 impact-info impulse) 0.0) + (set! (-> s5-0 vel-dot-norm) + (+ -409.6 (vector-dot (-> s5-0 impact-info velocity) (-> s5-0 impact-info normal))) + ) + (set! (-> s5-0 denom) 0.0) + (set! (-> s5-0 denom2) 0.0) + (b! (>= (-> s5-0 vel-dot-norm) 0.0) cfg-50) + (vector-! (-> s5-0 p-body) (the-as vector (-> s5-0 impact-info)) (-> arg0 position)) + (vector-cross! (-> s5-0 tmp) (-> s5-0 p-body) (-> s5-0 impact-info normal)) + (vector-rotate*! (-> s5-0 tmp) (-> s5-0 tmp) (-> arg0 inv-i-world)) + (vector-cross! (-> s5-0 tmp) (-> s5-0 tmp) (-> s5-0 p-body)) + (set! (-> s5-0 denom) (+ (-> arg0 info inv-mass) (vector-dot (-> s5-0 impact-info normal) (-> s5-0 tmp)))) + (let ((f30-1 (-> arg0 bounce-factor))) + (cond + ((-> s5-0 proc2) + (set! f30-1 + (cond + ((-> s5-0 rbody2) + (vector-! (-> s5-0 p-body) (the-as vector (-> s5-0 impact-info)) (-> s5-0 rbody2 position)) + (vector-cross! (-> s5-0 tmp) (-> s5-0 p-body) (-> s5-0 impact-info normal)) + (vector-rotate*! (-> s5-0 tmp) (-> s5-0 tmp) (-> s5-0 rbody2 inv-i-world)) + (vector-cross! (-> s5-0 tmp) (-> s5-0 tmp) (-> s5-0 p-body)) + (set! (-> s5-0 denom2) + (+ (-> s5-0 rbody2 info inv-mass) (vector-dot (-> s5-0 impact-info normal) (-> s5-0 tmp))) + ) + (fmax + (fmax f30-1 (-> s5-0 rbody2 bounce-factor)) + (* (-> arg0 info bounce-mult-factor) (-> s5-0 rbody2 info bounce-mult-factor)) + ) + ) + (else + (let* ((s3-0 (-> s5-0 proc2)) + (a0-46 (if (type? s3-0 process-focusable) + s3-0 + ) + ) + ) + (if a0-46 + (set! (-> s5-0 denom2) (get-inv-mass a0-46)) + ) + ) + f30-1 + ) + ) + ) + ) + (else + ) + ) + (set! (-> s5-0 impact-info impulse) + (* (+ 1.0 f30-1) (- (-> s5-0 vel-dot-norm)) (/ 1.0 (+ (-> s5-0 denom) (-> s5-0 denom2)))) + ) + ) + (set! (-> s5-0 impact-info process) (-> s5-0 proc2)) + (when (-> s5-0 proc2) + (set! (-> s5-0 impact-info2 point quad) (-> s5-0 impact-info point quad)) + (vector-float*! (-> s5-0 impact-info2 normal) (-> s5-0 impact-info normal) -1.0) + (vector-float*! (-> s5-0 impact-info2 velocity) (-> s5-0 impact-info velocity) -1.0) + (set! (-> s5-0 impact-info2 impulse) (-> s5-0 impact-info impulse)) + (set! (-> s5-0 impact-info2 pat) (-> s5-0 impact-info pat)) + (set! (-> s5-0 impact-info2 prim-id) (-> s5-0 cquery best-other-prim prim-id)) + (set! (-> s5-0 impact-info2 process) (-> arg0 process)) + (send-event (-> s5-0 proc2) 'impact-impulse :from (-> arg0 process) (-> s5-0 impact-info2)) + (if (or (-> s5-0 rbody2) (let ((a0-53 (-> s5-0 proc2 root))) + (logtest? (-> a0-53 penetrated-by) (penetrate vehicle)) + ) + ) + 0 + (set! (-> s5-0 impact-info impulse) + (* (-> s5-0 impact-info impulse) (/ (+ (-> s5-0 denom) (-> s5-0 denom2)) (-> s5-0 denom))) + ) + ) + ) + (send-event (-> arg0 process) 'impact-impulse :from (-> arg0 process) (-> s5-0 impact-info)) + (vector-float*! (-> s5-0 force) (-> s5-0 impact-info normal) (-> s5-0 impact-info impulse)) + (let ((f30-2 (-> arg0 info mass))) + (if (-> s5-0 rbody2) + (set! f30-2 (fmin f30-2 (-> s5-0 rbody2 info mass))) + ) + (vector+float*! + (-> s5-0 tangent-dir) + (-> s5-0 impact-info velocity) + (-> s5-0 impact-info normal) + (- (-> s5-0 vel-dot-norm)) + ) + (vector-normalize! (-> s5-0 tangent-dir) 1.0) + (let ((f0-39 (* -1.0 (fmin + (* (vector-dot (-> s5-0 tangent-dir) (-> s5-0 impact-info velocity)) f30-2) + (* (-> arg0 friction-factor) (-> s5-0 impact-info impulse)) + ) + ) + ) + ) + (vector+float*! (-> s5-0 force) (-> s5-0 force) (-> s5-0 tangent-dir) f0-39) + ) + ) + (apply-impact! arg0 (the-as vector (-> s5-0 impact-info)) (-> s5-0 force)) + (when (-> s5-0 rbody2) + (vector-float*! (-> s5-0 force) (-> s5-0 force) -1.0) + (apply-impact! (-> s5-0 rbody2) (the-as vector (-> s5-0 impact-info)) (-> s5-0 force)) + ) + (rigid-body-control-method-12 arg0 1.0) + (init-velocities! arg0) + (let ((f30-3 (-> s5-0 cquery best-dist))) + (when (< f30-3 0.0001) + (vector+float*! (-> arg0 position) (-> arg0 position) (-> s5-0 impact-info normal) 40.96) + (rigid-body-control-method-26 arg0) + ) + (set! (-> s5-0 time-step-scale) (- (-> s5-0 time-step-scale) (* f30-3 (-> s5-0 time-step-scale)))) + ) + (when (-> s5-0 rbody2) + (rigid-body-control-method-12 (-> s5-0 rbody2) 1.0) + (init-velocities! (-> s5-0 rbody2)) + 0 + ) + (+! (-> s5-0 step-count) 1) + ) + (b! #t cfg-53 :delay (nop!)) + (label cfg-50) + (when (-> s5-0 rbody2) + (set! (-> arg0 blocked-by) (the-as process-focusable (-> s5-0 cquery best-other-prim cshape process))) + 0 + ) + (vector+float*! (-> arg0 position) (-> arg0 position) (-> s5-0 impact-info normal) 40.96) + (rigid-body-control-method-26 arg0) + 0 + (label cfg-53) + (when (< 0.0 (-> s5-0 time-step-scale)) + (rigid-body-control-method-14 arg0 (* (-> s5-0 time-step-scale) (-> s5-0 time-step))) + (init-velocities! arg0) + (transform-rigid-body-prims (-> this root-prim) (-> arg0 matrix)) + (set! (-> s5-0 time-step-scale) 0.0) + ) + (label cfg-55) + (let ((f0-53 (* (- 1.0 (-> s5-0 time-step-scale)) (-> s5-0 time-step)))) + (set! (-> arg0 time-remaining) (- (-> arg0 time-remaining) f0-53)) + ) + ) + 0 + (none) + ) + ) + +(defmethod apply-impact! ((this rigid-body-control) (arg0 vector) (arg1 vector)) + (vector+! (-> this force) (-> this force) arg1) + (let ((v1-1 (new 'stack-no-clear 'inline-array 'vector 2))) + (vector-! (-> v1-1 0) arg0 (-> this position)) + (vector-cross! (-> v1-1 1) (-> v1-1 0) arg1) + (vector+! (-> this torque) (-> this torque) (-> v1-1 1)) + ) + 0 + (none) + ) + +(defmethod rigid-body-control-method-22 ((this rigid-body-control) (arg0 vector) (arg1 vector)) + (let ((v1-0 (new 'stack-no-clear 'inline-array 'vector 2))) + (vector-! (-> v1-0 0) arg0 (-> this position)) + (vector-cross! (-> v1-0 1) (-> v1-0 0) arg1) + (vector+! (-> this torque) (-> this torque) (-> v1-0 1)) + ) + 0 + (none) + ) + +(defmethod rigid-body-control-method-21 ((this rigid-body-control) (arg0 vector) (arg1 vector) (arg2 float)) + (vector+! (-> this force) (-> this force) arg1) + (let* ((t0-2 (vector-! (new 'stack-no-clear 'vector) arg0 (-> this position))) + (v1-3 (vector-cross! (new 'stack-no-clear 'vector) t0-2 arg1)) + ) + (let ((f0-0 (vector-length t0-2))) + (if (< arg2 f0-0) + (vector-float*! v1-3 v1-3 (/ arg2 f0-0)) + ) + ) + (vector+! (-> this torque) (-> this torque) v1-3) + ) + 0 + (none) + ) + +(defmethod rigid-body-control-method-19 ((this rigid-body-control) (arg0 vector) (arg1 vector)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (vector-rotate*! s4-0 arg1 (-> this matrix)) + (vector-rotate*! s5-0 arg0 (-> this matrix)) + (vector+! s5-0 s5-0 (-> this position)) + (apply-impact! this s5-0 s4-0) + ) + 0 + (none) + ) + +(defmethod add-force! ((this rigid-body-control) (arg0 vector)) + (vector+! (-> this force) (-> this force) arg0) + 0 + (none) + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod rigid-body-control-method-25 ((this rigid-body-control) (arg0 vector)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-rotate*! gp-0 (-> this info cm-offset-joint) (-> this matrix)) + (vector-! arg0 (-> this position) gp-0) + ) + (none) + ) + +(defmethod debug-print-force-torque ((this rigid-body-control) (arg0 object)) + (format arg0 " force ~M ~M ~M" (-> this force x) (-> this force y) (-> this force z)) + (format arg0 " torque ~M ~M ~M~%" (-> this torque x) (-> this torque y) (-> this torque z)) + 0 + (none) + ) + +(defmethod debug-print-momentum ((this rigid-body-control) (arg0 object)) + (format arg0 " lin-mom ~M ~M ~M" (-> this lin-momentum x) (-> this lin-momentum y) (-> this lin-momentum z)) + (format + arg0 + " ang-mom ~M ~M ~M~%" + (-> this ang-momentum x) + (-> this ang-momentum y) + (-> this ang-momentum z) + ) + 0 + (none) + ) + +(defmethod debug-print-velocity ((this rigid-body-control) (arg0 object)) + (format arg0 " lin-vel ~M ~M ~M" (-> this lin-velocity x) (-> this lin-velocity y) (-> this lin-velocity z)) + (format + arg0 + " ang-vel ~f ~f ~f~%" + (-> this ang-velocity x) + (-> this ang-velocity y) + (-> this ang-velocity z) + ) + 0 + (none) + ) + +(defmethod debug-print-pos-rot ((this rigid-body-control) (arg0 object)) + (format arg0 " position ~M ~M ~M" (-> this position x) (-> this position y) (-> this position z)) + (format arg0 " rotation ~f ~f ~f ~f~%" (-> this rot x) (-> this rot y) (-> this rot z) (-> this rot w)) + 0 + (none) + ) + +(defmethod debug-print-info ((this rigid-body-control) (arg0 object)) + (debug-print-force-torque this arg0) + (debug-print-pos-rot this arg0) + (debug-print-momentum this arg0) + (debug-print-velocity this arg0) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs object. +(defmethod rigid-body-control-method-10 ((this rigid-body-control) (arg0 rigid-body-object) (arg1 float) (arg2 float)) + (let* ((s4-1 (max 1 (min 4 (+ (the int (* 0.9999 (/ arg1 arg2))) 1)))) + (f30-0 (/ arg1 (the float s4-1))) + (s3-0 (-> this force-callback)) + ) + (while (nonzero? s4-1) + (+! s4-1 -1) + (s3-0 arg0 f30-0) + (rigid-body-control-method-9 this (-> arg0 root) f30-0) + ) + ) + 0 + ) + +(defmethod update-rbody-transform! ((this rigid-body-control) (arg0 collide-shape-moving)) + (quaternion-copy! (-> arg0 quat) (the-as quaternion (-> this rot))) + (rigid-body-control-method-25 this (-> arg0 trans)) + (set! (-> arg0 transv quad) (-> this lin-velocity quad)) + 0 + (none) + ) + +(defmethod get-inv-mass ((this rigid-body-object)) + (-> this info info inv-mass) + ) + +(defmethod rigid-body-object-method-37 ((this rigid-body-object)) + (let ((a0-1 (-> this info name))) + (when (nonzero? a0-1) + (set! (-> this info) (the-as rigid-body-object-constants (-> a0-1 value))) + (set! (-> this rbody info) (-> this info info)) + ) + ) + (rigid-body-info-method-9 (-> this info info)) + (set! (-> this rbody force-callback) (method-of-object this apply-gravity!)) + 0 + (none) + ) + +(defmethod rigid-body-object-method-53 ((this rigid-body-object) (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)) + ) + 0 + (none) + ) + +(defmethod apply-gravity! ((this rigid-body-object) (arg0 float)) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (vector-reset! a1-1) + (set! (-> a1-1 y) (* -1.0 (-> this info extra gravity) (-> this rbody info mass))) + (add-force! (-> this rbody) a1-1) + ) + 0 + (none) + ) + +(defmethod rigid-body-object-method-32 ((this rigid-body-object)) + (rigid-body-control-method-10 (-> this rbody) this (seconds-per-frame) (-> this max-time-step)) + (logclear! (-> this flags) (rigid-body-object-flag player-impulse-force player-contact-force)) + 0 + (none) + ) + +(defmethod rigid-body-object-method-54 ((this rigid-body-object)) + (rigid-body-control-method-10 (-> this rbody) this (-> this rbody time-remaining) (-> this max-time-step)) + 0 + (none) + ) + +(defmethod clear-impulse-force-flag! ((this rigid-body-object)) + (logclear! (-> this flags) (rigid-body-object-flag player-impulse-force player-contact-force)) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs object. +(defmethod go-idle ((this rigid-body-object)) + (go (method-of-object this idle)) + 0 + ) + +(defmethod alloc-rbody-control! ((this rigid-body-object) (arg0 rigid-body-object-constants)) + (set! (-> this info) arg0) + (set! (-> this rbody) (new 'process 'rigid-body-control this)) + (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!)) + ) + (rigid-body-object-method-37 this) + (set! (-> this max-time-step) (-> arg0 extra max-time-step)) + (set! (-> this root max-iteration-count) (the-as uint 4)) + (when (nonzero? (-> this skel)) + (let ((v1-16 (-> this skel root-channel 0))) + (set! (-> v1-16 num-func) num-func-identity) + (set! (-> v1-16 frame-num) 0.0) + ) + ) + 0 + (none) + ) + +(defmethod init-collision! ((this rigid-body-object)) + (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-sphere s5-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)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 12288.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) + ) + +(define *rigid-body-object-constants* (new 'static 'rigid-body-object-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-object-constants* + ) + ) + +(defmethod init-rbody-control! ((this rigid-body-object)) + (alloc-rbody-control! this *rigid-body-object-constants*) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs object. +(defmethod init-from-entity! ((this rigid-body-object) (arg0 entity-actor)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (init-rbody-control! this) + (go-idle this) + 0 + ) + +(defmethod rigid-body-object-method-38 ((this rigid-body-object)) + 0 + (none) + ) + +(defmethod rigid-body-object-method-30 ((this rigid-body-object)) + (ja-post) + 0 + (none) + ) + +(defmethod rbody-post ((this rigid-body-object)) + (rigid-body-object-method-32 this) + (rigid-body-object-method-38 this) + (update-rbody-transform! (-> this rbody) (-> this root)) + (rigid-body-object-method-30 this) + (update-transforms (-> this root)) + 0 + (none) + ) + +(defmethod rigid-body-object-method-42 ((this rigid-body-object)) + (logior! (-> this flags) (rigid-body-object-flag enable-collision)) + (let ((v1-3 (-> this root root-prim))) + (set! (-> v1-3 prim-core collide-as) (-> this root backup-collide-as)) + (set! (-> v1-3 prim-core collide-with) (-> this root backup-collide-with)) + ) + 0 + (none) + ) + +(defmethod rigid-body-object-method-43 ((this rigid-body-object)) + (logclear! (-> this flags) (rigid-body-object-flag enable-collision)) + (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 + 0 + (none) + ) + +(defmethod apply-momentum! ((this rigid-body-object)) + (when (not (logtest? (-> this rbody flags) (rigid-body-flag enable-physics))) + (logior! (-> this rbody flags) (rigid-body-flag enable-physics)) + (rigid-body-control-method-28 (-> this rbody) (-> this root trans) (-> this root quat)) + (vector-float*! (-> this rbody lin-momentum) (-> this root transv) (-> this info info mass)) + (vector-reset! (-> this rbody ang-momentum)) + ) + 0 + (none) + ) + +(defmethod disable-physics! ((this rigid-body-object)) + (logclear! (-> this rbody flags) (rigid-body-flag enable-physics)) + 0 + (none) + ) + +(defmethod impulse-handler ((this rigid-body-object)) + (logior! (-> this flags) (rigid-body-object-flag disturbed)) + (set-time! (-> this disturbed-time)) + (if (not (logtest? (-> this rbody flags) (rigid-body-flag enable-physics))) + (apply-momentum! this) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs object. +(defmethod go-active ((this rigid-body-object)) + (go (method-of-object this active)) + 0 + ) + +(defmethod apply-damage ((this rigid-body-object) (arg0 float) (arg1 rigid-body-impact)) + 0 + (none) + ) + +(defmethod on-impact ((this rigid-body-object) (arg0 rigid-body-impact)) + 0 + (none) + ) + +(defmethod init-rbody-impact-from-tshape! ((this rigid-body-object) (arg0 rigid-body-impact) (arg1 touching-shapes-entry)) + (set! (-> arg0 process) #f) + (set! (-> arg0 prim-id) (the-as uint 0)) + (vector-reset! (-> arg0 normal)) + (vector-reset! (-> arg0 velocity)) + (set! (-> arg0 point quad) (-> this root trans quad)) + (when arg1 + (let ((s3-0 (-> arg1 head))) + (when s3-0 + (get-intersect-point (-> arg0 point) s3-0 (-> this root) arg1) + (let ((s5-1 (get-touched-prim s3-0 (-> this root) arg1))) + (when s5-1 + (set! (-> arg0 prim-id) (-> s5-1 prim-id)) + (vector-! (-> arg0 normal) (-> arg0 point) (the-as vector (-> s5-1 prim-core))) + (vector-normalize! (-> arg0 normal) 1.0) + (vector+float*! + (-> arg0 point) + (the-as vector (-> s5-1 prim-core)) + (-> arg0 normal) + (-> s5-1 prim-core world-sphere w) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod impulse-force<-penetrate ((this rigid-body-object) (arg0 rigid-body-impact) (arg1 attack-info) (arg2 penetrate)) + (local-vars (f1-1 float)) + 0.0 + (let ((f0-1 0.0)) + (cond + ((logtest? (penetrate jak-red-shockwave) arg2) + (set! f0-1 (* 81920.0 (-> arg1 control))) + (set! f1-1 (-> arg1 damage)) + ) + ((logtest? arg2 (penetrate punch)) + (set! f0-1 40960.0) + (set! f1-1 4.0) + ) + ((logtest? arg2 (penetrate flop spin)) + (set! f0-1 20480.0) + (set! f1-1 2.0) + ) + ((logtest? (attack-mask vehicle-damage-factor) (-> arg1 mask)) + (set! f1-1 (* (-> arg1 damage) (-> arg1 vehicle-damage-factor))) + (if (logtest? (attack-mask vehicle-impulse-factor) (-> arg1 mask)) + (set! f0-1 (* 49152.0 (-> arg1 vehicle-impulse-factor) (-> arg1 damage))) + ) + 0 + ) + (else + (set! f0-1 8192.0) + (set! f1-1 2.0) + ) + ) + (set! (-> arg0 impulse) (* f0-1 (-> this info extra attack-force-scale))) + ) + (apply-damage this f1-1 arg0) + 0 + (none) + ) + +(defmethod attack-handler ((this rigid-body-object) + (arg0 process-drawable) + (arg1 attack-info) + (arg2 touching-shapes-entry) + (arg3 penetrate) + ) + (when arg2 + (let ((s5-0 (new 'stack-no-clear 'rigid-body-impact))) + (init-rbody-impact-from-tshape! this s5-0 arg2) + (if (logtest? (attack-mask attacker-velocity) (-> arg1 mask)) + (set! (-> s5-0 velocity quad) (-> arg1 attacker-velocity quad)) + (vector-! (-> s5-0 velocity) (-> s5-0 point) (-> arg0 root trans)) + ) + (impulse-force<-penetrate this s5-0 arg1 arg3) + (impulse-handler this) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (set! (-> s4-1 quad) (-> s5-0 velocity quad)) + (vector-normalize! s4-1 1.0) + (vector-float*! s4-1 s4-1 (-> s5-0 impulse)) + (apply-impact! (-> this rbody) (-> s5-0 point) s4-1) + (rigid-body-control-method-12 (-> this rbody) 1.0) + (init-velocities! (-> this rbody)) + (when #f + (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) s4-1 (meters 0.00024414062) *color-blue*) + ) + ) + (on-impact this s5-0) + ) + (if (and (-> this next-state) (= (-> this next-state name) 'idle)) + (go-active this) + ) + #t + ) + ) + +(defmethod touch-handler ((this rigid-body-object) (arg0 process-focusable) (arg1 touching-shapes-entry)) + (b! + (or (not (logtest? (process-mask target crate enemy) (-> arg0 mask))) + (and (logtest? (-> arg0 mask) (process-mask target)) (focus-test? arg0 dangerous pilot)) + ) + cfg-17 + :delay (nop!) + ) + (let ((s5-0 (new 'stack-no-clear 'rigid-body-impact)) + (s4-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! (-> s4-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) (/ f0-1 (+ f30-0 (-> this info info inv-mass)))) + (vector+float*! s4-0 s4-0 (-> s5-0 normal) (* -3.1 f30-0 (-> s5-0 impulse))) + (set! (-> s4-0 y) (fmax (* 49152.0 f30-0) (-> s4-0 y))) + (impulse-handler this) + (let ((a2-4 (new 'stack-no-clear 'vector))) + (vector-float*! a2-4 (-> s5-0 normal) (-> s5-0 impulse)) + (apply-impact! (-> this rbody) (-> s5-0 point) a2-4) + ) + (rigid-body-control-method-12 (-> this rbody) 1.0) + (init-velocities! (-> this rbody)) + (when #f + (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-active this) + ) + ) + ) + ) + (label cfg-17) + #t + ) + +(defmethod rbody-event-handler ((this rigid-body-object) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('impact-impulse) + (let ((s5-1 (-> arg3 param 0))) + (if (!= this arg0) + (impulse-handler this) + ) + (on-impact this (the-as rigid-body-impact s5-1)) + ) + (if (and (-> this next-state) (= (-> this next-state name) 'idle)) + (go-active this) + ) + #t + ) + (('touched) + (if (= this *debug-actor*) + (format *stdcon* "rigid-body-object got touched~%") + ) + (when (zero? (-> (the-as process-focusable arg0) rbody)) + (let ((s3-0 (if (type? arg0 process-focusable) + arg0 + ) + ) + ) + (when s3-0 + (when (logtest? (-> s3-0 mask) (process-mask target)) + (logior! (-> this flags) (rigid-body-object-flag player-touching)) + (set-time! (-> this player-touch-time)) + (impulse-handler this) + ) + (if (not (logtest? (-> s3-0 mask) (process-mask target))) + (touch-handler this (the-as process-focusable s3-0) (the-as touching-shapes-entry (-> arg3 param 0))) + ) + ) + ) + ) + ) + (('attack) + (let ((s3-1 (the-as object (-> arg3 param 1))) + (t0-1 (get-penetrate-using-from-attack-event (the-as process-drawable arg0) arg3)) + ) + (when (!= (-> (the-as attack-info s3-1) id) (-> this incoming-attack-id)) + (set! (-> this incoming-attack-id) (-> (the-as attack-info s3-1) id)) + (attack-handler + this + (the-as process-drawable arg0) + (the-as attack-info s3-1) + (the-as touching-shapes-entry (-> arg3 param 0)) + t0-1 + ) + ) + ) + ) + (('edge-grabbed 'pilot-edge-grab) + (let ((s5-2 (the-as object (-> arg3 param 0)))) + (when (not (logtest? (-> this flags) (rigid-body-object-flag player-impulse-force))) + (let ((a0-25 (if (type? arg0 process-focusable) + (the-as process-focusable arg0) + ) + ) + ) + (when a0-25 + (let ((f0-1 (/ 163840.0 (get-inv-mass a0-25)))) + (logior! (-> this flags) (rigid-body-object-flag player-touching player-edge-grabbing player-contact-force)) + (set! (-> this player-force-position quad) (-> (the-as attack-info s5-2) attacker-velocity quad)) + (vector-reset! (-> this player-force)) + (set! (-> this player-force y) (* -1.0 f0-1)) + ) + ) + ) + ) + ) + (not (logtest? (-> this focus-status) (focus-status dead inactive))) + ) + (('ridden) + (let ((v1-47 (the-as object (-> arg3 param 0)))) + (when (the-as uint v1-47) + (let* ((s5-3 (handle->process (-> (the-as focus v1-47) handle))) + (a0-34 (if (type? s5-3 process-focusable) + s5-3 + ) + ) + ) + (when (and a0-34 + (logtest? (-> a0-34 mask) (process-mask target)) + (not (logtest? (-> (the-as process-focusable a0-34) 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-touching player-standing-on player-contact-force)) + (set! (-> this player-force-position quad) (-> (the-as process-focusable a0-34) root trans quad)) + (vector-reset! (-> this player-force)) + (let ((f0-4 (/ 163840.0 (get-inv-mass (the-as process-focusable a0-34)))) + (f1-1 1.0) + ) + (set! (-> this player-force y) (* -1.0 f0-4 f1-1)) + ) + ) + ) + ) + ) + ) + ) + (('bonk) + (when #t + (let* ((s3-2 arg0) + (s4-1 (if (type? s3-2 process-focusable) + s3-2 + ) + ) + ) + (when s4-1 + (logior! (-> this flags) (rigid-body-object-flag player-touching player-impulse-force)) + (set-time! (-> this player-touch-time)) + (impulse-handler this) + (set! (-> this player-force-position quad) (-> (the-as process-focusable s4-1) root trans quad)) + (let ((f30-2 (* 0.00012207031 (the-as float (-> arg3 param 1)))) + (f0-9 (/ 163840.0 (get-inv-mass (the-as process-focusable s4-1)))) + ) + (vector-reset! (-> this player-force)) + (set! (-> this player-force y) (* -0.1 f0-9 f30-2)) + ) + ) + ) + ) + ) + (('enable-physics) + (impulse-handler this) + ) + ) + ) + +(defbehavior rigid-body-object-event-handler rigid-body-object ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (rbody-event-handler self arg0 arg1 arg2 arg3) + ) + +(defstate idle (rigid-body-object) + :virtual #t + :trans (behavior () + (if (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))) + ) + ) + (go-virtual active) + ) + ) + :code sleep-code + :post ja-post + ) + +(defstate active (rigid-body-object) + :virtual #t + :event rigid-body-object-event-handler + :trans (behavior () + (if (or (not *target*) (or (< (+ 4096.0 (-> self info extra idle-distance)) + (vector-vector-distance (-> self root trans) (-> *target* control trans)) + ) + (focus-test? *target* teleporting) + ) + ) + (go-virtual idle) + ) + ) + :code sleep-code + :post (behavior () + (rbody-post self) + ) + ) diff --git a/goal_src/jak3/engine/physics/trajectory.gc b/goal_src/jak3/engine/physics/trajectory.gc index 442d31f5c3..8d33df49c3 100644 --- a/goal_src/jak3/engine/physics/trajectory.gc +++ b/goal_src/jak3/engine/physics/trajectory.gc @@ -319,16 +319,19 @@ ) ) (when s4-1 - (cond - (((method-of-type nav-control find-poly-containing-point-1) (the-as nav-control s4-1) arg1) - (let ((t9-4 (method-of-type nav-control nav-control-method-20))) - #x45000000 - (t9-4) - ) - ) - (else - (set! (-> arg0 quad) (the-as uint128 0)) - ) + (let ((a2-3 ((method-of-type nav-control find-poly-containing-point-1) (the-as nav-control s4-1) arg1))) + (if a2-3 + ((method-of-type nav-control clamp-vector-to-mesh-cross-gaps) + (the-as nav-control s4-1) + arg1 + a2-3 + arg0 + 2048.0 + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + (set! (-> arg0 quad) (the-as uint128 0)) + ) ) ) ) diff --git a/goal_src/jak3/engine/process-drawable/focus.gc b/goal_src/jak3/engine/process-drawable/focus.gc index ec594ec8c9..febfac2ab4 100644 --- a/goal_src/jak3/engine/process-drawable/focus.gc +++ b/goal_src/jak3/engine/process-drawable/focus.gc @@ -14,7 +14,7 @@ ) (:methods (clear-focused (_type_) none) - (collide-check? (_type_ process-focusable) object) + (collide-spec-match? (_type_ process-focusable) object) (reset-to-collide-spec (_type_ collide-spec) none) (try-update-focus (_type_ process-focusable) symbol) ) @@ -29,7 +29,7 @@ (none) ) -(defmethod collide-check? ((this focus) (proc process-focusable)) +(defmethod collide-spec-match? ((this focus) (proc process-focusable)) "If the focused process is not dead, check that the [[collide-spec]] of the focus and the process match." (when (and proc (not (logtest? (-> proc focus-status) (focus-status disable dead)))) diff --git a/goal_src/jak3/engine/process-drawable/process-drawable-h.gc b/goal_src/jak3/engine/process-drawable/process-drawable-h.gc index 7cf6ba1e8c..79fe5aef5b 100644 --- a/goal_src/jak3/engine/process-drawable/process-drawable-h.gc +++ b/goal_src/jak3/engine/process-drawable/process-drawable-h.gc @@ -21,6 +21,8 @@ (define-extern ja-frame-num (function int float :behavior process-drawable)) (define-extern ja-aframe (function float int float :behavior process-drawable)) +(define-extern dma-add-process-drawable-hud (function process-drawable draw-control float dma-buffer none)) + ;; DECOMP BEGINS ;; WARN: Return type mismatch object vs cspace. @@ -208,9 +210,11 @@ &key (num! #f) &key (param0 #f) &key (param1 #f) + &key (param2 #f) &key (num-func #f) &key (frame-num #f) - &key (frame-interp #f) + &key (frame-interp0 #f) + &key (frame-interp1 #f) &key (dist #f) &key (eval? #t) ) @@ -223,8 +227,10 @@ num-func = sets the num-func field for the channel. this lets you change the function with eval'ing. param0 = 1st parameter for the playback function. ONLY USE THESE WITH num-func !! param1 = 2nd parameter for the playback function. ONLY USE THESE WITH num-func !! + param2 = 3rd parameter for the playback function. ONLY USE THESE WITH num-func !! frame-num = set the frame-num field. - frame-interp = set the frame-interp field. + frame-interp0 = set the first value of the frame-interp array. + frame-interp1 = set the second value of the frame-interp array. dist = set the dist field. available num! functions: - (+!) = advance anim. @@ -280,6 +286,10 @@ (cond ((eq? num! 'seek!) (if (or (null? num-args) (null? (cdr num-args))) 1.0 (cadr num-args))) ))) + (p2 (if param2 param2 + (cond + ((eq? num! 'seek!) (if (or (null? num-args) (null? (cdr num-args))) 1.0 (cadr num-args))) + ))) (frame-num (cond ((eq? 'max frame-num) (if group! `(the float (1- (-> (the art-joint-anim ,group!) frames num-frames))) @@ -290,11 +300,13 @@ (frame-group (if (or p0 p1 frame-num (not nf)) group! #f)) ) `(let ((ja-ch (-> self skel root-channel ,chan))) - ,(if frame-interp `(set! (-> ja-ch frame-interp) ,frame-interp) `(none)) + ,(if frame-interp0 `(set! (-> ja-ch frame-interp 0) ,frame-interp0) `(none)) + ,(if frame-interp1 `(set! (-> ja-ch frame-interp 1) ,frame-interp1) `(none)) ,(if dist `(set! (-> ja-ch dist) ,dist) `(none)) ,(if frame-group `(set! (-> ja-ch frame-group) (the art-joint-anim ,frame-group)) `(none)) ,(if p0 `(set! (-> ja-ch param 0) ,p0) `(none)) ,(if p1 `(set! (-> ja-ch param 1) ,p1) `(none)) + ,(if p2 `(set! (-> ja-ch param 2) ,p2) `(none)) ,(if num-func `(set! (-> ja-ch num-func) ,num-func) `(none)) ,(if frame-num `(set! (-> ja-ch frame-num) ,frame-num) `(none)) ,(if nf @@ -307,7 +319,7 @@ `(set! (-> ja-ch frame-num) (the float (1- (-> (the art-joint-anim ,group!) frames num-frames)))) `(set! (-> ja-ch frame-num) (the float (1- (-> ja-ch frame-group frames num-frames)))) )) - ((eq? num! 'identity) `(set! (-> ja-ch frame-num) ,(car num-args))) + ((and (eq? num! 'identity) (not (null? num-args))) `(set! (-> ja-ch frame-num) ,(car num-args))) (#t `(none)) ) )) @@ -318,10 +330,12 @@ &key (num! #f) &key (param0 #f) &key (param1 #f) + &key (param2 #f) &key (num-func #f) &key (frame-num #f) - &key (frame-interp #f) + &key (frame-interp0 #f) + &key (frame-interp1 #f) &key (dist #f) ) - `(ja :eval? #f :chan ,chan :group! ,group! :num! ,num! :param0 ,param0 :param1 ,param1 :num-func ,num-func :frame-num ,frame-num :frame-interp ,frame-interp :dist ,dist) + `(ja :eval? #f :chan ,chan :group! ,group! :num! ,num! :param0 ,param0 :param1 ,param1 :param2 ,param2 :num-func ,num-func :frame-num ,frame-num :frame-interp0 ,frame-interp0 :frame-interp1 ,frame-interp1 :dist ,dist) ) \ No newline at end of file diff --git a/goal_src/jak3/engine/process-drawable/process-drawable.gc b/goal_src/jak3/engine/process-drawable/process-drawable.gc index ed4e018d26..67b3a2a6ae 100644 --- a/goal_src/jak3/engine/process-drawable/process-drawable.gc +++ b/goal_src/jak3/engine/process-drawable/process-drawable.gc @@ -13,6 +13,36 @@ (define-extern birth-pickup-at-point (function vector pickup-type float symbol process-tree fact-info (pointer process) :behavior process)) +(#when PC_PORT + +(define *display-bones* #f) +(define *display-joint-names* #f) + +(defun draw-joint-spheres ((arg0 process-drawable)) + (dotimes (s5-0 (-> arg0 node-list length)) + (let ((a2-0 (vector<-cspace! (new-stack-vector0) (-> arg0 node-list data s5-0)))) + (add-debug-sphere #t (bucket-id debug) a2-0 (meters 0.2) (new 'static 'rgba :g #xff :a #x40)) + (#when PC_PORT + (add-debug-text-sphere (!= (-> arg0 node-list data s5-0 joint) #f) (bucket-id debug) a2-0 (meters 0.1) (the string (-> arg0 node-list data s5-0 joint name)) (static-rgba 0 #xff 0 #x40))) + ) + ) + #f + ) + +(defun-debug draw-bone-lines ((this process-drawable)) + "Added in PC port to debug bones" + (dotimes (i (-> this node-list length)) + (let ((parent (-> this node-list data i parent))) + (when (and parent (nonzero? parent) (-> parent joint) (-> parent parent)) + (let ((child (vector<-cspace! (new-stack-vector0) (-> this node-list data i))) + ) + (add-debug-line #t (bucket-id debug) child (vector<-cspace! (new-stack-vector0) parent) (new 'static 'rgba :r #xff :a #x40) #f (the rgba -1)) + ) + ) + ) + ) + )) + ;; DECOMP BEGINS (defmethod add-to-loading-level ((this skeleton-group)) @@ -68,6 +98,19 @@ (init-vf0-vector) (.lvf vf2 (&-> (-> arg1 bone) transform trans quad)) (.div.vf Q vf0 vf2 :fsf #b11 :ftf #b11) + + ;; og:preserve-this ADDED (also added in jak1) + ;; there's a bug in swamp-blimp where they vector<-cspace! + ;; on some default-initialized-to-zero bones + ;; we have to return 0s for this to avoid NaNs getting everywhere. + (let ((temp (new-stack-vector0))) + (.svf (&-> temp quad) vf2) + (when (= (-> temp w) 0.0) + (set-vector! arg0 0. 0. 0. 1.) + (return arg0) + ) + ) + (.wait.vf) (.mul.vf vf2 vf2 Q :mask #b111) (.nop.vf) @@ -391,28 +434,25 @@ ) ) (let ((s3-0 (+ s5-0 2))) - ((-> arg1 generate-frame-function) (the-as joint-anim-frame (+ 2400 #x70000000)) s3-0 arg1) + ;; og:preserve-this + ((-> arg1 generate-frame-function) (the-as joint-anim-frame (+ 2400 (scratchpad-object int))) s3-0 arg1) (if (-> arg1 prebind-function) - ((-> arg1 prebind-function) (the-as joint-anim-frame (+ 2400 #x70000000)) s3-0 arg1) + ((-> arg1 prebind-function) (the-as joint-anim-frame (+ 2400 (scratchpad-object int))) s3-0 arg1) ) ) (dotimes (s3-1 1) (let* ((v1-11 (-> arg0 data s3-1)) - (t9-2 (-> v1-11 param0)) + (t9-2 (the-as function (-> v1-11 param0))) ) - (when t9-2 - (let ((a0-6 v1-11) - (a1-3 (-> v1-11 param1)) - ) - (-> v1-11 param2) - (t9-2 a0-6 (the-as transformq a1-3)) + (if (the-as (function cspace transformq none) t9-2) + ((the-as (function object object object none) t9-2) v1-11 (-> v1-11 param1) (-> v1-11 param2)) ) - ) ) ) (dotimes (s3-2 2) (let* ((a0-8 (-> arg0 data (+ s3-2 1))) - (a1-5 (+ (* s3-2 64) 2400 #x70000000)) + ;; og:preserve-this + (a1-5 (+ (* s3-2 64) 2400 (scratchpad-object int))) (t9-3 (-> a0-8 param0)) ) (if t9-3 @@ -426,14 +466,16 @@ (dotimes (s4-1 s5-0) (cspace<-parented-transformq-joint! (-> arg0 data (+ s4-1 s3-3)) - (the-as transformq (+ (* 48 s4-1) 2528 #x70000000)) + ;; og:preserve-this + (the-as transformq (+ (* 48 s4-1) 2528 (scratchpad-object int))) ) ) ) (else (dotimes (s4-2 s5-0) (let ((a0-10 (-> arg0 data (+ s4-2 s3-3))) - (a1-9 (+ (* 48 s4-2) 2528 #x70000000)) + ;; og:preserve-this + (a1-9 (+ (* 48 s4-2) 2528 (scratchpad-object int))) ) (if (-> a0-10 param0) ((-> a0-10 param0) a0-10 (the-as transformq a1-9)) @@ -487,6 +529,13 @@ ) ) ) + ;; og:preserve-this + (#when PC_PORT (when *debug-segment* + (when *display-bones* + (draw-bone-lines (the-as process-drawable (-> this process)))) + (if *display-joint-names* + (draw-joint-spheres (the-as process-drawable (-> this process)))) + )) 0 (none) ) @@ -573,7 +622,7 @@ ) (let ((a0-3 (-> this nav))) (if (and a0-3 (nonzero? a0-3)) - ((method-of-type nav-control nav-control-method-41)) + (remove! a0-3) ) ) (let* ((s5-0 (-> this root)) @@ -1657,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 af75242a72..842f7b6b66 100644 --- a/goal_src/jak3/engine/process-drawable/process-focusable.gc +++ b/goal_src/jak3/engine/process-drawable/process-focusable.gc @@ -81,7 +81,8 @@ ;; DECOMP BEGINS (deftype process-focusable (process-drawable) - ((root collide-shape :override) + ((self process-focusable :override) + (root collide-shape :override) (focus-status focus-status) ) (:methods @@ -127,7 +128,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/process-taskable-h.gc b/goal_src/jak3/engine/process-drawable/process-taskable-h.gc index ff725e2964..a6b5c47e78 100644 --- a/goal_src/jak3/engine/process-drawable/process-taskable-h.gc +++ b/goal_src/jak3/engine/process-drawable/process-taskable-h.gc @@ -9,6 +9,15 @@ (defenum process-taskable-flags :type uint32 :bitfield #t + (ptf0 0) + (ptf1 1) + (ptf2 2) + (ptf3 3) + (ptf4 4) + (ptf5 5) + (ptf6 6) + (ptf7 7) + (ptf8 8) ) ;; ---process-taskable-flags @@ -37,12 +46,12 @@ (play-game game-task-event) ) (:methods - (process-taskable-method-33 () none) - (process-taskable-method-34 () none) - (process-taskable-method-35 () none) - (process-taskable-method-36 () none) - (process-taskable-method-37 () none) - (process-taskable-method-38 () none) - (process-taskable-method-39 () none) + (init-collision! (_type_) none) + (init-defaults! (_type_) none) + (init-skeleton! (_type_) none) + (process-taskable-method-36 (_type_) symbol) + (get-art-element (_type_) art-element) + (process-taskable-method-38 (_type_) none) + (update-cloth-and-shadow (_type_) none) ) ) diff --git a/goal_src/jak3/engine/process-drawable/process-taskable.gc b/goal_src/jak3/engine/process-drawable/process-taskable.gc index ba4dac591e..7e2ffee9a4 100644 --- a/goal_src/jak3/engine/process-drawable/process-taskable.gc +++ b/goal_src/jak3/engine/process-drawable/process-taskable.gc @@ -7,3 +7,522 @@ ;; DECOMP BEGINS +;; WARN: Return type mismatch process-focusable vs process-taskable. +(defmethod relocate ((this process-taskable) (offset int)) + (if (nonzero? (-> this task)) + (&+! (-> this task) offset) + ) + (the-as process-taskable ((method-of-type process-focusable relocate) this offset)) + ) + +(defbehavior process-taskable-anim-loop process-taskable ((arg0 (function process-taskable object))) + (while (arg0 self) + (let ((s5-0 (get-art-element self))) + (when (!= (ja-group) s5-0) + (ja-channel-push! 1 0) + (set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim s5-0)) + ) + ) + (suspend) + (if (ja-group) + (ja :num! (loop!)) + ) + (process-taskable-method-38 self) + ) + 0 + (none) + ) + +(defmethod process-taskable-method-36 ((this process-taskable)) + #t + ) + +;; WARN: Return type mismatch art-joint-anim vs art-element. +(defmethod get-art-element ((this process-taskable)) + (the-as art-element (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + +(defmethod process-taskable-method-38 ((this process-taskable)) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod update-cloth-and-shadow ((this process-taskable)) + (if (logtest? (-> this draw status) (draw-control-status no-draw)) + (process-drawable-show-all-cloth this #f) + (process-drawable-show-all-cloth this #t) + ) + (let ((a0-3 (-> this draw shadow-ctrl))) + (cond + ((and (-> this draw shadow) + (and (zero? (-> this draw cur-lod)) (logtest? (-> this draw status) (draw-control-status on-screen))) + ) + (probe-line-for-shadow a0-3 (-> this draw origin) -4096.0 4096.0 32768.0) + ) + (else + (let ((v1-14 a0-3)) + (logior! (-> v1-14 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + ) + (none) + ) + +(defstate hide (process-taskable) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('say) + (let ((v0-0 (current-time))) + (set! (-> self want-to-say) v0-0) + v0-0 + ) + ) + ) + ) + :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)) + ) + (process-drawable-show-all-cloth self #t) + ) + :trans (behavior () + (let ((v1-1 (get-current-task-event (-> self task)))) + (if (and (nonzero? (-> v1-1 action)) (or (not (logtest? (-> self draw status) (draw-control-status on-screen))) + (logtest? (-> v1-1 flags) (game-task-flags gatflag-01)) + (not (time-elapsed? (-> self birth-time) (seconds 0.1))) + ) + ) + (go-virtual idle) + ) + ) + ) + :code sleep-code + ) + +(defstate idle (process-taskable) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (cond + ((logtest? (-> self flags) (process-taskable-flags ptf4)) + (go-virtual die) + ) + ((logtest? (-> self flags) (process-taskable-flags ptf0)) + (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)) + ) + ) + ) + ) + ) + ) + (('touch) + (send-shoves (-> self root) proc (the-as touching-shapes-entry (-> block param 0)) 0.7 6144.0 16384.0) + ) + (('say) + (let ((v0-0 (the-as object (current-time)))) + (set! (-> self want-to-say) (the-as time-frame v0-0)) + v0-0 + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw)) + ) + :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)) + ) + (let ((gp-1 (get-current-task-event (-> self task)))) + (cond + ((= (-> gp-1 action) (game-task-action hide)) + (if (or (not (logtest? (-> self draw status) (draw-control-status on-screen))) + (logtest? (-> gp-1 flags) (game-task-flags gatflag-01)) + ) + (go-virtual hide) + ) + ) + ((or (not *target*) *scene-player*) + ) + ((not (logtest? (-> self flags) (process-taskable-flags ptf1))) + (if (>= (- (-> *display* game-clock frame-counter) (-> self last-talk)) (seconds 5)) + (logior! (-> self flags) (process-taskable-flags ptf1)) + ) + ) + ((and (-> gp-1 scene) + (begin + (when (not (or (= (-> gp-1 action) (game-task-action play)) + (-> *setting-control* user-current movie-name) + (name= (-> gp-1 scene) (-> *setting-control* user-current movie-name)) + ) + ) + (let ((v1-42 (scene-lookup (-> gp-1 scene)))) + (gui-control-method-12 + *gui-control* + self + (gui-channel art-load) + (gui-action queue) + (if v1-42 + (-> v1-42 anim) + (-> gp-1 scene) + ) + 0 + -99.0 + (new 'static 'sound-id) + ) + ) + ) + (and (not (logtest? (focus-status dead in-air in-head pole tube mech) (-> *target* focus-status))) + (and (or (and (< (-> (target-pos 0) y) (+ (-> self root root-prim prim-core world-sphere y) (-> self talk-height))) + (let ((s5-1 (get-trans self 2)) + (f30-0 (if (= (-> gp-1 distance) 0.0) + (-> self talk-distance) + (-> gp-1 distance) + ) + ) + ) + (< (vector-vector-distance (target-pos 0) s5-1) f30-0) + ) + ) + (not (time-elapsed? (-> self want-to-say) (seconds 4))) + ) + (or (not (load-in-progress? *level*)) (= (-> gp-1 action) (game-task-action say))) + (and (not (movie?)) + (or (not (logtest? (-> self flags) (process-taskable-flags ptf6))) (not (talker-displayed?))) + (none-reserved? *art-control*) + (not *progress-process*) + (not (-> *setting-control* user-current movie)) + ) + ) + ) + ) + ) + (when (and (or (= (-> gp-1 action) (game-task-action say)) + (= (-> gp-1 action) (game-task-action talk)) + (= (-> gp-1 action) (game-task-action trade)) + (= (-> gp-1 action) (game-task-action play)) + ) + (process-taskable-method-36 self) + ) + (when (or (= (-> gp-1 action) (game-task-action say)) (not (time-elapsed? (-> self want-to-say) (seconds 4)))) + (case (-> gp-1 action) + (((game-task-action play)) + (go-virtual play-game gp-1) + ) + (else + (go-virtual active gp-1) + ) + ) + ) + (kill-current-talker '() '(daxter voicebox ambient) 'exit) + (talker-surpress!) + (when (can-display-query? self "process-taskable" -99.0) + (let ((s5-2 + (new 'stack 'font-context *font-default-matrix* 32 280 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-96 s5-2)) + (set! (-> v1-96 width) (the float 340)) + ) + (let ((v1-97 s5-2)) + (set! (-> v1-97 height) (the float 80)) + ) + (let ((v1-98 s5-2) + (a0-39 (-> *setting-control* user-default language)) + ) + (set! (-> v1-98 scale) (if (or (= a0-39 (language-enum korean)) (= a0-39 (language-enum russian))) + 0.9 + 0.7 + ) + ) + ) + (set! (-> s5-2 flags) (font-flags shadow kerning middle-vert large)) + (print-game-text + (lookup-text! *common-text* (-> self talk-message) #f) + s5-2 + #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)) + (case (-> gp-1 action) + (((game-task-action play)) + (go-virtual play-game gp-1) + ) + (else + (go-virtual active gp-1) + ) + ) + ) + ) + ) + ) + ) + ) + (update-cloth-and-shadow self) + ) + :code (behavior () + (process-taskable-anim-loop (the-as (function process-taskable object) true-func)) + ) + :post (behavior () + (if (and (logtest? (-> self flags) (process-taskable-flags ptf3)) (movie?)) + (logior! (-> self draw status) (draw-control-status no-draw)) + (logclear! (-> self draw status) (draw-control-status no-draw)) + ) + (when (logtest? (-> self flags) (process-taskable-flags ptf2)) + (if *target* + (look-at! (-> *target* neck) (get-trans self 2) 'nothing-special self) + ) + ) + (transform-post) + ) + ) + +(defstate active (process-taskable) + :virtual #t + :event (-> (method-of-type process-taskable hide) event) + :enter (behavior ((arg0 game-task-event)) + (set! (-> self want-to-say) 0) + (process-entity-status! self (entity-perm-status no-kill) #t) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + :exit (behavior () + (set! (-> self last-talk) (-> *display* game-clock frame-counter)) + (if (not (time-elapsed? (-> self want-to-say) (seconds 4))) + (logior! (-> self flags) (process-taskable-flags ptf1)) + (logclear! (-> self flags) (process-taskable-flags ptf1)) + ) + (process-entity-status! self (entity-perm-status no-kill) #f) + (logior! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-15 (-> self root root-prim))) + (set! (-> v1-15 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-15 prim-core collide-with) (-> self root backup-collide-with)) + ) + ) + :code (behavior ((arg0 game-task-event)) + (when (-> arg0 scene) + (let ((gp-1 (ppointer->handle + (process-spawn scene-player :init scene-player-init (-> arg0 scene) #t #f :name "scene-player") + ) + ) + ) + (while (and (handle->process (the-as handle gp-1)) (not (movie?))) + (suspend) + ) + (process-drawable-show-all-cloth self #f) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-15 (-> self root root-prim))) + (set! (-> v1-15 prim-core collide-as) (collide-spec)) + (set! (-> v1-15 prim-core collide-with) (collide-spec)) + ) + 0 + (while (handle->process (the-as handle gp-1)) + (suspend) + ) + ) + ) + (go-virtual hide) + ) + ) + +(defstate die (process-taskable) + :virtual #t + :enter (behavior () + (set! (-> self want-to-say) 0) + (process-entity-status! self (entity-perm-status no-kill) #t) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + :exit (behavior () + (process-entity-status! self (entity-perm-status no-kill) #f) + (logior! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (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)) + ) + ) + :code (behavior () + (if (-> self skel effect) + (do-effect (-> self skel effect) "death-default" 0.0 -1) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (if (logtest? (-> self flags) (process-taskable-flags ptf5)) + (restart-mission) + ) + (cleanup-for-death self) + ) + :post (-> (method-of-type process-taskable idle) post) + ) + +(defstate play-game (process-taskable) + :virtual #t + :enter (-> (method-of-type process-taskable active) enter) + :exit (-> (method-of-type process-taskable active) exit) + :code (behavior ((arg0 game-task-event)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (suspend) + ) + ) + (go-virtual hide) + ) + :post (-> (method-of-type process-taskable idle) post) + ) + +(defmethod init-collision! ((this process-taskable)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 3) 0))) + (set! (-> s5-0 total-prims) (the-as uint 4)) + (set! (-> s4-0 prim-core collide-as) (collide-spec civilian)) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set! (-> s4-0 transform-index) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 -1024.0 0.0 7372.8) + (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 civilian)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set! (-> v1-7 transform-index) 0) + (set-vector! (-> v1-7 local-sphere) 0.0 -4096.0 0.0 4096.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 civilian)) + (set! (-> v1-9 prim-core action) (collide-action solid)) + (set! (-> v1-9 transform-index) 0) + (set-vector! (-> v1-9 local-sphere) 0.0 -1024.0 0.0 4096.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 civilian)) + (set! (-> v1-11 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-11 transform-index) 0) + (set-vector! (-> v1-11 local-sphere) 0.0 2048.0 0.0 4096.0) + ) + (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) + ) + +(defmethod init-defaults! ((this process-taskable)) + (logior! (-> this skel status) (joint-control-status eye-anim)) + (set! (-> this talk-message) (text-id press-triangle-to-talk)) + (set! (-> this flags) (process-taskable-flags ptf0 ptf1 ptf2 ptf3 ptf5)) + (set! (-> this neck-joint-index) -1) + (set! (-> this talk-distance) (res-lump-float (-> this entity) 'distance :default 32768.0)) + (set! (-> this talk-height) (res-lump-float (-> this entity) 'height :default 8192.0)) + (set! (-> this slave) (the-as handle #f)) + (set! (-> this 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 + ) + ) + (let ((s5-0 0)) + (let ((v1-12 (the-as joint (get-art-by-name-method (-> this draw jgeo) "main" (the-as type #f))))) + (if v1-12 + (set! s5-0 (+ (-> v1-12 number) 1)) + ) + ) + (let ((v1-16 (-> this root root-prim))) + (set! (-> v1-16 transform-index) s5-0) + (dotimes (a0-7 (the-as int (-> v1-16 specific 0))) + (set! (-> (the-as collide-shape-prim-group v1-16) child a0-7 transform-index) s5-0) + ) + ) + ) + 0 + (none) + ) + +(defmethod init-skeleton! ((this process-taskable)) + 0 + (none) + ) + +(defmethod init-from-entity! ((this process-taskable) (entity entity-actor)) + (stack-size-set! (-> this main-thread) 512) + (init-collision! this) + (process-drawable-from-entity! this entity) + (set! (-> this task) + (new 'process 'game-task-control (res-lump-value entity 'task-actor game-task-actor :time -1000000000.0)) + ) + (init-skeleton! this) + (init-defaults! this) + (logior! (-> this skel status) (joint-control-status blend-shape eye-anim)) + (when (logtest? #x1000000 (res-lump-value entity 'options uint128 :time -1000000000.0)) + (let* ((s5-1 *level*) + (s4-2 (method-of-object s5-1 art-group-get-by-name)) + ) + (format (clear *temp-string*) "skel-~S" (-> this draw art-group name)) + (let ((s4-3 (s4-2 s5-1 *temp-string* (the-as (pointer level) #f)))) + (when s4-3 + (let ((s5-2 (process-spawn + manipy + :init manipy-init + (-> this root trans) + (-> this entity) + s4-3 + #f + 0 + :name "manipy" + :to this + :stack-size #x20000 + ) + ) + ) + (send-event (ppointer->process s5-2) 'anim-mode 'mirror) + (send-event (ppointer->process s5-2) 'mirror #t) + ) + ) + ) + ) + ) + (set! (-> this event-hook) (-> (method-of-object this idle) event)) + (go (method-of-object this hide)) + ) diff --git a/goal_src/jak3/engine/process-drawable/simple-nav-sphere.gc b/goal_src/jak3/engine/process-drawable/simple-nav-sphere.gc index 316d7a0634..6e56b36c07 100644 --- a/goal_src/jak3/engine/process-drawable/simple-nav-sphere.gc +++ b/goal_src/jak3/engine/process-drawable/simple-nav-sphere.gc @@ -7,3 +7,124 @@ ;; DECOMP BEGINS +(deftype simple-nav-sphere (process-drawable) + ((first-time? symbol) + (track-joint int32) + ) + (:state-methods + idle + active + ) + ) + + +(defbehavior simple-nav-sphere-event-handler simple-nav-sphere ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('die-fast) + (go empty-state) + ) + (('move-trans) + (move-to-point! (the-as collide-shape (-> self root)) (the-as vector (-> arg3 param 0))) + #t + ) + (('set-radius) + (let ((f0-0 (the-as float (-> arg3 param 0))) + (a0-7 (-> self root)) + ) + (set! (-> a0-7 nav-radius) f0-0) + (set! (-> (the-as collide-shape a0-7) root-prim local-sphere w) f0-0) + (update-transforms (the-as collide-shape a0-7)) + ) + #t + ) + ) + ) + +(defmethod run-logic? ((this simple-nav-sphere)) + "Should this process be run? Checked by execute-process-tree." + (cond + (*display-nav-marks* + #t + ) + ((>= (-> this track-joint) 0) + #t + ) + ((-> this first-time?) + (set! (-> this first-time?) #f) + #t + ) + ) + ) + +(defstate idle (simple-nav-sphere) + :virtual #t + :event simple-nav-sphere-event-handler + :trans (behavior () + (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) + ) + ) + ) + :code sleep-code + ) + +(defstate active (simple-nav-sphere) + :virtual #t + :event simple-nav-sphere-event-handler + :trans (behavior () + (let ((v1-0 (ppointer->process (-> self parent))) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (vector<-cspace! gp-0 (-> (the-as process-drawable v1-0) node-list data (-> self track-joint))) + (move-to-point! (the-as collide-shape (-> self root)) gp-0) + ) + ) + :code sleep-code + ) + +(defbehavior simple-nav-sphere-init-by-other simple-nav-sphere ((arg0 float) (arg1 vector) (arg2 nav-mesh) (arg3 int)) + (set! (-> self track-joint) arg3) + (set! (-> self first-time?) #t) + (let ((s5-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (let ((v1-3 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-3 prim-core collide-as) (collide-spec obstacle)) + (set-vector! (-> v1-3 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-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! (-> s5-0 nav-radius) arg0) + (set! (-> s5-0 root-prim local-sphere w) arg0) + (if arg1 + (set! (-> s5-0 trans quad) (-> arg1 quad)) + ) + (vector-identity! (-> s5-0 scale)) + (quaternion-identity! (-> s5-0 quat)) + (let ((v1-11 (-> s5-0 root-prim))) + (set! (-> v1-11 prim-core collide-as) (collide-spec)) + (set! (-> v1-11 prim-core collide-with) (collide-spec)) + ) + 0 + (update-transforms s5-0) + (set! (-> self root) s5-0) + ) + (logclear! (-> self mask) (process-mask actor-pause enemy)) + (set! (-> self event-hook) simple-nav-sphere-event-handler) + (if arg2 + (add-process-drawable-to-nav-mesh arg2 self #f) + (nav-mesh-connect-from-ent self) + ) + (if (>= (-> self track-joint) 0) + (go-virtual active) + (go-virtual idle) + ) + ) diff --git a/goal_src/jak3/engine/ps2/pad.gc b/goal_src/jak3/engine/ps2/pad.gc index fe6244fbf8..3dae11b8ba 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/scene/scene-h.gc b/goal_src/jak3/engine/scene/scene-h.gc index 4229b805a1..a5af2ca009 100644 --- a/goal_src/jak3/engine/scene/scene-h.gc +++ b/goal_src/jak3/engine/scene/scene-h.gc @@ -5,10 +5,35 @@ ;; name in dgo: scene-h ;; dgos: GAME +;; +++scene-flags (defenum scene-flags :bitfield #t :type uint32 + (scf0 0) + (scf1 1) + (scf2 2) + (scf3 3) + (scf4 4) + (scf5 5) + (scf6 6) + (scf7 7) + (scf8 8) + (scf9 9) + (scf10 10) + (scf11 11) + (scf12 12) + (scf13 13) + (scf14 14) + (scf15 15) ) +;; ---scene-flags + + +(declare-type scene-player process-drawable) +(declare-type scene art-group) + +(define-extern scene-player-init (function object symbol string none :behavior scene-player)) +(define-extern scene-lookup (function basic scene)) ;; DECOMP BEGINS @@ -19,24 +44,24 @@ (prefix string) (draw-frames pair) (scissor-frames pair) - (shadow-frames basic) - (cloth-reset-frames basic) - (cloth-commands basic) + (shadow-frames pair) + (cloth-reset-frames pair) + (cloth-commands pair) (camera int16) (light-index uint8) (shadow-mask uint8) (shadow-values uint32) (flags uint32) - (command-list basic) + (command-list pair) (shadow-flags int32) (shadow-volume-joint basic) (draw-seg uint64) (no-draw-seg uint64) (last-frame float) - (process uint64) + (process handle) ) (:methods - (scene-actor-method-9 () none) + (setup-manipy-for-scene! (_type_ scene-player) (pointer process)) ) ) @@ -54,20 +79,20 @@ (wait-air-time time-frame) (wait-ground-time time-frame) (actor (array scene-actor)) - (load-point continue-point) - (end-point continue-point) + (load-point basic) + (end-point basic) (borrow pair) (sfx-volume float) (ambient-volume float) (music-volume float) (music-delay float) (scene-task uint16) - (on-running basic) - (on-complete basic) + (on-running pair) + (on-complete pair) ) (:methods - (scene-method-16 () none) - (scene-method-17 () none) + (init-spool-by-scene! (_type_ spool-anim) spool-anim) + (load-scene (_type_) scene) ) ) @@ -99,17 +124,19 @@ (last-frame float) (end-point basic) (blackout-end basic) - (new-trans-hook basic) - (cur-trans-hook basic) + (new-trans-hook (function none)) + (cur-trans-hook (function none)) (user-data uint64) ) + (:state-methods + (wait symbol) + release + play-anim + ) (:methods - (scene-player-method-20 () none) - (scene-player-method-21 () none) - (scene-player-method-22 () none) - (scene-player-method-23 () none) - (scene-player-method-24 () none) - (scene-player-method-25 () none) + (scene-player-method-23 (_type_ string symbol) none) + (scene-player-method-24 (_type_ scene symbol) scene) + (scene-player-method-25 (_type_ float float) none) ) ) diff --git a/goal_src/jak3/engine/scene/scene.gc b/goal_src/jak3/engine/scene/scene.gc index c05fd1ba28..8c8682a146 100644 --- a/goal_src/jak3/engine/scene/scene.gc +++ b/goal_src/jak3/engine/scene/scene.gc @@ -7,3 +7,1994 @@ ;; DECOMP BEGINS +(deftype scene-stage (process-hidden) + () + ) + + +(defmethod print ((this scene)) + (format #t "#" (-> this art-group) (-> this anim) this) + this + ) + +(defmethod init-spool-by-scene! ((this scene) (arg0 spool-anim)) + (set! (-> arg0 name) (-> this anim)) + (set! (-> arg0 anim-name) (-> this anim)) + (set! (-> arg0 parts) (-> this parts)) + (set! (-> arg0 command-list) (-> this command-list)) + arg0 + ) + +;; WARN: Return type mismatch basic vs continue-point. +(defun scene-decode-continue ((arg0 basic)) + (the-as continue-point (cond + ((not arg0) + (the-as basic #f) + ) + ((= (-> arg0 type) continue-point) + arg0 + ) + ((= (-> arg0 type) string) + (get-continue-by-name *game-info* (the-as string arg0)) + ) + (else + (the-as basic #f) + ) + ) + ) + ) + +(defmethod setup-manipy-for-scene! ((this scene-actor) (arg0 scene-player)) + (local-vars (s4-0 (pointer process)) (sv-96 process)) + (let ((s2-0 (if (-> this level) + (level-get *level* (-> this level)) + (-> *level* level-default) + ) + ) + ) + (cond + ((not s2-0) + (-> *level* level-default) + (set! s4-0 (the-as (pointer process) #f)) + (goto cfg-260) + ) + ((= (-> s2-0 status) 'reserved) + ) + ((!= (-> s2-0 status) 'active) + (set! s4-0 (the-as (pointer process) #f)) + (goto cfg-260) + ) + ) + (let* ((s4-1 (art-group-get-by-name *level* (-> this art-group) (the-as (pointer level) #f))) + (s3-0 (if (type? s4-1 skeleton-group) + s4-1 + ) + ) + (s0-0 (-> arg0 level)) + (s1-0 + (cond + ((or (string= (-> this name) "jak-highres") + (string= (-> this name) "jak-highres-prison") + (string= (-> this name) "darkjak-highres") + ) + 'jakb + ) + ((string= (-> this name) "jakc-highres") + 'jakc + ) + ) + ) + ) + (set! (-> arg0 level) #f) + (set! s4-0 + (when s3-0 + (let ((s2-1 (if (and (nonzero? (-> s2-0 entity)) (> (-> s2-0 entity length) 0)) + (-> s2-0 entity data 0 entity) + (-> arg0 entity) + ) + ) + ) + (set! sv-96 (get-process *default-dead-pool* manipy #x20000 0)) + (set! s4-0 (when sv-96 + (let ((t9-8 (method-of-type manipy activate))) + (t9-8 (the-as manipy sv-96) arg0 (-> this name) (the-as pointer #x70004000)) + ) + (run-now-in-process + sv-96 + manipy-init + (-> arg0 root trans) + s2-1 + s3-0 + #f + (if (and s1-0 (logtest? (game-secrets big-head little-head) (-> *game-info* secrets))) + 1 + 0 + ) + ) + (-> sv-96 ppointer) + ) + ) + (set! (-> arg0 level) s0-0) + (send-event (ppointer->process s4-0) 'anim-mode 'clone-anim) + (send-event (ppointer->process s4-0) 'blend-shape #t) + (send-event (ppointer->process s4-0) 'prefix (-> this prefix)) + (cond + ((zero? (-> this light-index)) + (if (zero? (-> (the-as skeleton-group s3-0) light-index)) + (send-event (ppointer->process s4-0) 'light-index 80) + ) + ) + (else + (send-event (ppointer->process s4-0) 'light-index (* (-> this light-index) 8)) + ) + ) + (send-event (ppointer->process s4-0) 'shadow-disable-smooth #t) + (if (nonzero? (-> this shadow-mask)) + (send-event (ppointer->process s4-0) 'shadow-mask (* (-> this shadow-mask) 8)) + ) + (if (nonzero? (-> this shadow-values)) + (send-event (ppointer->process s4-0) 'shadow-values (* (-> this shadow-values) 8)) + ) + (if (and s4-0 (not (logtest? (-> this flags) 1)) (nonzero? (-> (the-as process-drawable (-> s4-0 0)) draw))) + (logior! (-> (the-as process-drawable (-> s4-0 0)) draw status) (draw-control-status no-draw-bounds)) + ) + (if (-> this shadow-volume-joint) + (send-event (ppointer->process s4-0) 'shadow-volume (-> this shadow-volume-joint) (-> this shadow-flags)) + ) + (when (or (nonzero? (-> this draw-seg)) (nonzero? (-> this no-draw-seg))) + (send-event (ppointer->process s4-0) 'segment 0 (* (-> this no-draw-seg) 8)) + (send-event (ppointer->process s4-0) 'segment (* (-> this draw-seg) 8) 0) + ) + (when (and s1-0 s4-0 (nonzero? (-> (the-as process-drawable (-> s4-0 0)) draw))) + (cond + ((= s1-0 'jakb) + (if (not (-> *setting-control* user-current beard)) + (send-event (ppointer->process s4-0) 'segment 0 16) + ) + ) + ((= s1-0 'jakc) + (if (not (-> *setting-control* user-current beard)) + (send-event (ppointer->process s4-0) 'segment 0 32) + ) + (if (not (logtest? (game-feature armor0) (-> *game-info* features))) + (send-event (ppointer->process s4-0) 'segment 0 16) + ) + (if (not (logtest? (game-feature armor1) (-> *game-info* features))) + (send-event (ppointer->process s4-0) 'segment 0 256) + ) + (if (not (logtest? (game-feature armor2) (-> *game-info* features))) + (send-event (ppointer->process s4-0) 'segment 0 2048) + ) + (if (not (logtest? (game-feature armor3) (-> *game-info* features))) + (send-event (ppointer->process s4-0) 'segment 0 4096) + ) + (let ((v0-28 (log2 (the-as int (-> (the-as process-drawable (-> s4-0 0)) draw mgeo seg-table (log2 16)))))) + (logior! (-> (the-as process-drawable (-> s4-0 0)) draw mgeo effect v0-28 effect-usage) 8) + ) + ) + ) + (when (nonzero? (-> (the-as manipy (-> s4-0 0)) joint 0)) + (cond + ((logtest? (game-secrets little-head) (-> *game-info* secrets)) + (mode-set! (-> (the-as manipy (-> s4-0 0)) joint 0) (joint-mod-mode joint-set*)) + (trs-set! + (-> (the-as manipy (-> s4-0 0)) joint 0) + (the-as vector #f) + (the-as quaternion #f) + (new 'static 'vector :x 0.4 :y 0.4 :z 0.4 :w 1.0) + ) + ) + ((logtest? (game-secrets big-head) (-> *game-info* secrets)) + (mode-set! (-> (the-as manipy (-> s4-0 0)) joint 0) (joint-mod-mode joint-set*)) + (trs-set! + (-> (the-as manipy (-> s4-0 0)) joint 0) + (the-as vector #f) + (the-as quaternion #f) + (new 'static 'vector :x 2.0 :y 2.0 :z 2.0 :w 1.0) + ) + ) + ) + ) + ) + (when (and s4-0 (logtest? (-> this flags) 2)) + (let ((s1-2 (process-spawn + manipy + :init manipy-init + (-> arg0 root trans) + s2-1 + s3-0 + #f + 0 + :name (-> this name) + :to (ppointer->process s4-0) + :stack-size #x20000 + :unk 0 + ) + ) + ) + (send-event (ppointer->process s1-2) 'mirror #t) + (send-event (ppointer->process s1-2) 'anim-mode 'mirror) + (if (nonzero? (-> this light-index)) + (send-event (ppointer->process s1-2) 'light-index (* (-> this light-index) 8)) + ) + (send-event (ppointer->process s4-0) 'shadow-disable-smooth #t) + (if (nonzero? (-> this shadow-mask)) + (send-event (ppointer->process s1-2) 'shadow-mask (* (-> this shadow-mask) 8)) + ) + (if (nonzero? (-> this shadow-values)) + (send-event (ppointer->process s1-2) 'shadow-values (* (-> this shadow-values) 8)) + ) + (if (and s1-2 (not (logtest? (-> this flags) 1)) (nonzero? (-> (the-as process-drawable (-> s1-2 0)) draw))) + (logior! (-> (the-as process-drawable (-> s1-2 0)) draw status) (draw-control-status no-draw-bounds)) + ) + (if (-> this shadow-volume-joint) + (send-event (ppointer->process s1-2) 'shadow-volume (-> this shadow-volume-joint) (-> this shadow-flags)) + ) + (if (or (nonzero? (-> this draw-seg)) (nonzero? (-> this no-draw-seg))) + (send-event (ppointer->process s1-2) 'segment (* (-> this draw-seg) 8) (* (-> this no-draw-seg) 8)) + ) + ) + ) + ) + (when (and s4-0 (nonzero? (-> this camera))) + (cond + ((handle->process (-> arg0 camera)) + (change-parent (handle->process (-> arg0 camera)) (ppointer->process s4-0)) + (send-event (handle->process (-> arg0 camera)) 'target (ppointer->process s4-0)) + (send-event (handle->process (-> arg0 camera)) 'joint (* (-> this camera) 8)) + ) + (else + (let ((v1-341 (process-spawn + othercam + (ppointer->process s4-0) + (-> this camera) + #t + 'scene-player + :name "othercam" + :to (ppointer->process s4-0) + ) + ) + ) + (if v1-341 + (set! (-> arg0 camera) (ppointer->handle v1-341)) + ) + ) + ) + ) + ) + s4-0 + ) + ) + ) + ) + (label cfg-260) + s4-0 + ) + +(defmethod deactivate ((this scene-player)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set! *debug-menu-scene-play* (the-as object #f)) + (set! *scene-player* (the-as (pointer scene-player) #f)) + (kill-persister *setting-control* (the-as engine-pers 'blackout) 'bg-a-force) + (kill-persister *setting-control* (the-as engine-pers 'blur-a) 'blur-a) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; WARN: Return type mismatch process-drawable vs scene-player. +(defmethod relocate ((this scene-player) (offset int)) + (let ((v1-0 *kernel-context*)) + (set! (-> v1-0 relocating-process) this) + (set! (-> v1-0 relocating-min) (the-as int (&-> this type))) + (set! (-> v1-0 relocating-max) + (the-as int (+ (+ (-> this allocated-length) -4 (-> process size)) (the-as int this))) + ) + (set! (-> v1-0 relocating-offset) offset) + ) + (let ((v1-2 (-> this scene-list))) + (if (and (>= (the-as int v1-2) (-> *kernel-context* relocating-min)) + (< (the-as int v1-2) (-> *kernel-context* relocating-max)) + ) + (&+! (-> this scene-list) offset) + ) + ) + (the-as scene-player ((method-of-type process-drawable relocate) this offset)) + ) + +;; WARN: disable def twice: 288. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: disable def twice: 365. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod scene-player-method-25 ((this scene-player) (arg0 float) (arg1 float)) + (local-vars + (v1-12 symbol) + (v1-47 symbol) + (v1-73 symbol) + (v1-105 symbol) + (sv-96 object) + (sv-112 object) + (sv-128 object) + (sv-144 object) + (sv-160 object) + (sv-176 object) + (sv-192 object) + (sv-208 object) + (sv-224 object) + ) + (dotimes (s3-0 (-> this scene actor length)) + (let ((s2-0 (-> this scene actor s3-0))) + (let* ((s1-0 (-> s2-0 draw-frames)) + (s0-0 (car s1-0)) + ) + (while (not (null? s1-0)) + (when (and (pair? s0-0) + (let ((a0-4 (car s0-0))) + (set! sv-96 (car (cdr s0-0))) + (or (= a0-4 'min) (>= arg0 (command-get-float a0-4 0.0))) + ) + (or (= sv-96 'max) (< arg0 (command-get-float (car (cdr s0-0)) 0.0))) + ) + (set! v1-12 #t) + (goto cfg-20) + ) + (set! s1-0 (cdr s1-0)) + (set! s0-0 (car s1-0)) + ) + ) + (set! v1-12 #f) + (label cfg-20) + (cond + (v1-12 + (if (not (handle->process (-> s2-0 process))) + (set! (-> s2-0 process) (ppointer->handle (setup-manipy-for-scene! s2-0 this))) + ) + (let ((s1-1 (handle->process (-> s2-0 process)))) + (when (and s1-1 (nonzero? (-> (the-as process-drawable s1-1) draw))) + (let ((s0-1 (-> s2-0 scissor-frames))) + (set! sv-112 (car s0-1)) + (while (not (null? s0-1)) + (when (and (pair? sv-112) + (let ((a0-21 (car sv-112))) + (set! sv-128 (car (cdr sv-112))) + (or (= a0-21 'min) (>= arg0 (command-get-float a0-21 0.0))) + ) + (or (= sv-128 'max) (< arg0 (command-get-float (car (cdr sv-112)) 0.0))) + ) + (set! v1-47 #t) + (goto cfg-59) + ) + (set! s0-1 (cdr s0-1)) + (set! sv-112 (car s0-1)) + ) + ) + (set! v1-47 #f) + (label cfg-59) + (if v1-47 + (logclear! (-> (the-as process-drawable s1-1) draw status) (draw-control-status force-vu1)) + (logior! (-> (the-as process-drawable s1-1) draw status) (draw-control-status force-vu1)) + ) + (let ((s0-2 (-> s2-0 shadow-frames))) + (set! sv-144 (car s0-2)) + (while (not (null? s0-2)) + (when (and (pair? sv-144) + (let ((a0-30 (car sv-144))) + (set! sv-160 (car (cdr sv-144))) + (or (= a0-30 'min) (>= arg0 (command-get-float a0-30 0.0))) + ) + (or (= sv-160 'max) (< arg0 (command-get-float (car (cdr sv-144)) 0.0))) + ) + (set! v1-73 #t) + (goto cfg-81) + ) + (set! s0-2 (cdr s0-2)) + (set! sv-144 (car s0-2)) + ) + ) + (set! v1-73 #f) + (label cfg-81) + (if v1-73 + (send-event s1-1 'shadow #t) + (send-event s1-1 'shadow #f) + ) + (let ((s0-3 (-> s2-0 cloth-reset-frames))) + (set! sv-192 (car s0-3)) + (while (not (null? s0-3)) + (let ((v1-97 (cond + ((pair? sv-192) + (let ((a0-38 (car sv-192))) + (set! sv-176 (car (cdr sv-192))) + (and (or (= a0-38 'min) (>= arg0 (+ -1.0 (command-get-float a0-38 0.0)))) + (or (= sv-176 'max) (< arg0 (+ 1.0 (command-get-float (car (cdr sv-192)) 0.0)))) + ) + ) + ) + (else + (let* ((t9-11 command-get-float) + (a1-18 0.0) + (f0-10 (t9-11 sv-192 a1-18)) + ) + (and (< arg1 f0-10) (>= arg0 f0-10)) + ) + ) + ) + ) + ) + (when v1-97 + (set! v1-105 #t) + (goto cfg-113) + ) + ) + (set! s0-3 (cdr s0-3)) + (set! sv-192 (car s0-3)) + ) + ) + (set! v1-105 #f) + (label cfg-113) + (if v1-105 + (process-drawable-cloth-command (the-as process-drawable s1-1) '(scene-reset-frame)) + ) + (let* ((s2-1 (-> s2-0 cloth-commands)) + (s0-4 (car s2-1)) + ) + (while (not (null? s2-1)) + (when (pair? s0-4) + (set! sv-224 (car s0-4)) + (let ((v1-121 (cond + ((pair? sv-224) + (let ((a0-44 (car sv-224))) + (set! sv-208 (car (cdr sv-224))) + (and (or (= a0-44 'min) (>= arg0 (command-get-float a0-44 0.0))) + (or (= sv-208 'max) (< arg0 (command-get-float (car (cdr sv-224)) 0.0))) + ) + ) + ) + (else + (let* ((t9-15 command-get-float) + (a1-23 0.0) + (f0-13 (t9-15 sv-224 a1-23)) + ) + (and (< arg1 f0-13) (>= arg0 f0-13)) + ) + ) + ) + ) + ) + (if v1-121 + (process-drawable-cloth-command (the-as process-drawable s1-1) (cdr s0-4)) + ) + ) + ) + (set! s2-1 (cdr s2-1)) + (set! s0-4 (car s2-1)) + ) + ) + ) + ) + 0 + ) + ((handle->process (-> s2-0 process)) + (deactivate (handle->process (-> s2-0 process))) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch basic vs scene. +(defun scene-lookup ((arg0 basic)) + (the-as + scene + (case (-> arg0 type) + ((string) + (let ((s5-0 (art-group-get-by-name *level* (the-as string arg0) (the-as (pointer level) #f)))) + (when (type? s5-0 scene) + (let ((gp-0 (get-level-by-heap-ptr-and-status *level* (the-as pointer s5-0) 'active))) + (when (and s5-0 gp-0) + (let ((s4-0 (scene-decode-continue (-> s5-0 data 15)))) + (when s4-0 + (dotimes (s3-0 (-> s4-0 want-count)) + (if (= (-> gp-0 name) (-> s4-0 want s3-0 name)) + (goto cfg-25) + ) + (let ((v1-14 (lookup-level-info (-> s4-0 want s3-0 name)))) + (if (and v1-14 (-> v1-14 borrow) (-> v1-14 borrow alias) (member (-> gp-0 name) (-> v1-14 borrow alias))) + (goto cfg-25) + ) + ) + ) + (format + 0 + "WARNING: can not find scene level ~A in continue ~A, dropping scene until after load~%" + (-> gp-0 name) + (-> s4-0 name) + ) + (return (the-as scene #f)) + ) + ) + ) + ) + (label cfg-25) + s5-0 + ) + ) + ) + ((scene) + arg0 + ) + ) + ) + ) + +(defmethod scene-player-method-24 ((this scene-player) (arg0 scene) (arg1 symbol)) + (when (= (-> arg0 type) string) + (let ((v1-2 (scene-lookup arg0))) + (if v1-2 + (set! arg0 v1-2) + ) + ) + ) + (when (or (not arg0) (!= (-> arg0 type) scene)) + (format 0 "ERROR: SCENE: scene-player can not find scene ~A~%" arg0) + (go process-drawable-art-error "scene-list format") + ) + (when arg1 + (let ((s4-1 (get-level-by-heap-ptr-and-status *level* (the-as pointer arg0) 'active))) + (init-spool-by-scene! arg0 (-> this anim)) + (set! (-> this level) s4-1) + ) + (set! (-> this scene) arg0) + ) + arg0 + ) + +(defmethod scene-player-method-23 ((this scene-player) (arg0 string) (arg1 symbol)) + (let ((gp-0 (scene-player-method-24 this (the-as scene arg0) #t))) + (when (logtest? (-> gp-0 scene-flags) (scene-flags scf3)) + (let ((a0-2 *traffic-manager*)) + (send-event a0-2 'restore-default-settings) + ) + ) + (send-event *target* 'draw (logtest? (-> gp-0 scene-flags) (scene-flags scf0))) + (let ((s3-0 (entity-by-name (-> gp-0 entity)))) + (when (and (-> gp-0 entity) (not s3-0)) + (format 0 "ERROR: SCENE: scene ~A can not find entity ~A~%" (-> gp-0 name) (-> gp-0 entity)) + (go process-drawable-art-error (-> gp-0 entity)) + ) + (set! (-> this main-entity) (the-as entity-actor s3-0)) + (cond + (s3-0 + (process-drawable-from-entity! this (-> this main-entity)) + (logclear! (-> this mask) (process-mask actor-pause)) + ) + (else + (vector-reset! (-> this root trans)) + (quaternion-identity! (-> this root quat)) + ) + ) + ) + (let ((s3-1 (load-to-heap-by-name (-> *level* level-default art-group) (-> gp-0 art-group) 'load global 0))) + (when (not s3-1) + (format 0 "ERROR: SCENE: scene ~A can not find art-group ~A~%" (-> gp-0 name) (-> gp-0 art-group)) + (go process-drawable-art-error (-> gp-0 art-group)) + ) + (set! (-> this draw art-group) s3-1) + (countdown (v1-31 (-> s3-1 length)) + (when (-> s3-1 data v1-31) + (cond + ((= (-> s3-1 data v1-31 type) merc-ctrl) + (set! (-> this draw mgeo) (the-as merc-ctrl (-> s3-1 data v1-31))) + ) + ((= (-> s3-1 data v1-31 type) art-joint-geo) + (set! (-> this draw jgeo) (the-as art-joint-geo (-> s3-1 data v1-31))) + ) + ) + ) + ) + ) + (cond + ((< (+ (-> this scene-index) 1) (-> this scene-list length)) + (let ((a0-34 (scene-player-method-24 this (-> this scene-list (+ (-> this scene-index) 1)) #f))) + (cond + (a0-34 + (init-spool-by-scene! a0-34 (-> this next-anim)) + ) + (else + (set! (-> this next-anim anim-name) (the-as string 0)) + 0 + ) + ) + ) + ) + (else + (set! (-> this next-anim anim-name) (the-as string 0)) + 0 + ) + ) + (dotimes (s3-2 (-> gp-0 actor length)) + (let ((s2-0 (-> gp-0 actor s3-2))) + (set! (-> s2-0 process) (the-as handle #f)) + (let ((s1-0 (if (-> s2-0 level) + (level-get *level* (-> s2-0 level)) + (-> *level* level-default) + ) + ) + (v1-53 (when level + (let ((s0-0 (art-group-get-by-name *level* (-> s2-0 art-group) (the-as (pointer level) #f)))) + (if (type? s0-0 skeleton-group) + s0-0 + ) + ) + ) + ) + ) + (cond + ((or (not s1-0) (not (or (= (-> s1-0 status) 'active) (= (-> s1-0 status) 'reserved)))) + (format + 0 + "ERROR: SCENE: scene actor ~A can not find an active level ~A~%" + (-> s2-0 art-group) + (-> s2-0 level) + ) + ) + ((not v1-53) + (format + 0 + "ERROR: SCENE: scene actor ~A can not find skeleton-group ~A~%" + (-> s2-0 art-group) + (-> s2-0 art-group) + ) + ) + (else + (load-to-heap-by-name (-> s1-0 art-group) (the-as string (-> v1-53 data 0)) 'load global 0) + ) + ) + ) + ) + ) + (process-entity-status! this (entity-perm-status no-kill) #t) + (when arg1 + (kill-persister *setting-control* (the-as engine-pers 'fail-sfx-volume) 'sfx-volume) + (kill-persister *setting-control* (the-as engine-pers 'fail-dialog-volume) 'dialog-volume) + (kill-persister *setting-control* (the-as engine-pers 'fail-music-volume) 'music-volume) + (set-setting! 'region-mode #f 0.0 0) + (set-setting! 'process-mask 'set 0.0 (-> gp-0 mask-to-clear)) + (if (logtest? (-> gp-0 mask-to-clear) (process-mask movie)) + (set-setting! 'letterbox 'abs 1.0 0) + ) + (set-setting! 'sound-bank-load #f 0.0 0) + (set-setting! 'movie (process->ppointer this) 0.0 0) + (set-setting! 'movie-name (-> gp-0 name) 0.0 0) + (let ((f30-0 (if (>= (-> gp-0 music-volume) 0.0) + (-> gp-0 music-volume) + (-> *setting-control* user-current music-volume-movie) + ) + ) + ) + (set-setting! 'music-volume 'rel f30-0 0) + (set-setting! + 'sfx-volume + 'rel + (if (>= (-> gp-0 sfx-volume) 0.0) + (-> gp-0 sfx-volume) + (-> *setting-control* user-current sfx-volume-movie) + ) + 0 + ) + (set-setting! + 'ambient-volume + 'rel + (if (>= (-> gp-0 ambient-volume) 0.0) + (-> gp-0 ambient-volume) + (-> *setting-control* user-current ambient-volume-movie) + ) + 0 + ) + (when (nonzero? (the int (-> gp-0 music-delay))) + (set-setting! 'music-volume 'abs 0.0 0) + (set! f30-0 0.0) + ) + (remove-setting! 'music) + (if (= f30-0 0.0) + (set-setting! 'music #f 0.0 0) + ) + ) + (set-setting! 'gem #f 0.0 0) + (set-setting! 'citizen-fights #f 0.0 0) + (apply-settings *setting-control*) + ) + ) + 0 + (none) + ) + +(deftype subtitle-work (structure) + ((draw-tmpl dma-gif-packet :inline) + (color0 vector4w :inline) + (color1 vector4w :inline) + ) + ) + + +(define *subtitle-work* (new 'static 'subtitle-work + :draw-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) + ) + :gif (new 'static 'array uint64 2 #x50ab400000008001 #x53531) + ) + :color0 (new 'static 'vector4w :w #x80) + :color1 (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) + ) + ) + +;; WARN: Return type mismatch pointer vs none. +(defun draw-subtitle-image ((arg0 subtitle-image) (arg1 font-context)) + (local-vars (sv-16 pointer) (sv-32 int)) + (let ((gp-0 (-> arg0 width)) + (s5-0 (-> arg0 height)) + ) + (let ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf))) + (set! sv-16 (-> s4-0 base)) + (unpack-comp-rle (the-as (pointer int8) sv-16) (the-as (pointer int8) (-> arg0 data))) + (&+! (-> s4-0 base) (logand -16 (+ (shr (* gp-0 s5-0) 1) 15))) + ) + (with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-pris2) + ) + (upload-vram-data s3-0 0 (-> arg0 palette) 2 8) + (let ((s0-0 20)) + (dma-buffer-add-gs-set s3-0 + (bitbltbuf (new 'static 'gs-bitbltbuf :dbp #x1 :dbw (shr gp-0 6) :dpsm s0-0)) + (trxpos (new 'static 'gs-trxpos)) + (trxreg (new 'static 'gs-trxreg :rrw gp-0 :rrh s5-0)) + (trxdir (new 'static 'gs-trxdir)) + ) + (let ((t9-2 dma-buffer-add-ref-texture) + (a0-13 s3-0) + (a2-8 gp-0) + (a3-1 s5-0) + (t0-1 s0-0) + ) + (t9-2 a0-13 sv-16 (the-as int a2-8) (the-as int a3-1) (the-as gs-psm t0-1)) + ) + (set! sv-32 (+ (log2 (the-as int (+ gp-0 -1))) 1)) + (let ((v1-17 (+ (log2 (the-as int (+ s5-0 -1))) 1))) + (dma-buffer-add-gs-set s3-0 + (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)) + (tex0-1 (new 'static 'gs-tex0 :tbp0 #x1 :tcc #x1 :cld #x1 :psm s0-0 :th v1-17 :tw sv-32 :tbw (shr gp-0 6))) + (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-28 (-> s3-0 base)) + (a2-23 + (+ (- 1793 (the-as int (shr (-> arg0 width) 1))) (the int (+ (-> arg1 origin x) (* 0.5 (-> arg1 width))))) + ) + (a3-8 (+ (the int (-> arg1 origin y)) 1841)) + (a0-23 (+ a2-23 (-> arg0 width))) + (a1-33 (+ a3-8 (-> arg0 height))) + ) + (set! (-> (the-as (pointer uint128) v1-28) 0) (-> *subtitle-work* draw-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) v1-28) 1) (-> *subtitle-work* draw-tmpl quad 1)) + (set! (-> (the-as (pointer uint128) v1-28) 2) (-> *subtitle-work* color0 quad)) + (set-vector! (the-as vector4w (&+ v1-28 48)) 0 0 0 0) + (set-vector! (the-as vector4w (&+ v1-28 64)) (the-as int (* a2-23 16)) (* a3-8 16) 0 0) + (set-vector! (the-as vector4w (&+ v1-28 80)) (the-as int (* gp-0 16)) (the-as int (* s5-0 16)) 0 0) + (set-vector! (the-as vector4w (&+ v1-28 96)) (the-as int (* a0-23 16)) (* a1-33 16) 0 0) + ) + (&+! (-> s3-0 base) 112) + (let* ((v1-32 (-> s3-0 base)) + (a1-38 + (+ (- 1792 (the-as int (shr (-> arg0 width) 1))) (the int (+ (-> arg1 origin x) (* 0.5 (-> arg1 width))))) + ) + (a3-11 (+ (the int (-> arg1 origin y)) 1840)) + (a0-30 (+ a1-38 (-> arg0 width))) + (a2-28 (+ a3-11 (-> arg0 height))) + ) + (set! (-> (the-as (pointer uint128) v1-32) 0) (-> *subtitle-work* draw-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) v1-32) 1) (-> *subtitle-work* draw-tmpl quad 1)) + (set! (-> (the-as (pointer uint128) v1-32) 2) (-> *subtitle-work* color1 quad)) + (set-vector! (the-as vector4w (&+ v1-32 48)) 0 0 0 0) + (set-vector! (the-as vector4w (&+ v1-32 64)) (the-as int (* a1-38 16)) (* a3-11 16) 0 0) + (set-vector! (the-as vector4w (&+ v1-32 80)) (the-as int (* gp-0 16)) (the-as int (* s5-0 16)) 0 0) + (set-vector! (the-as vector4w (&+ v1-32 96)) (the-as int (* a0-30 16)) (* a2-28 16) 0 0) + ) + (&+! (-> s3-0 base) 112) + (set-dirty-mask! (-> *level* level-default) 8 (the-as int (* gp-0 s5-0)) 256) + ) + ) + (none) + ) + +(defbehavior process-drawable-draw-subtitles process-drawable () + (when (and (nonzero? (-> self skel)) + (> (-> self skel active-channels) 0) + (-> *setting-control* user-current subtitle) + ) + (let ((v1-9 (-> self skel root-channel 0 frame-group))) + (when v1-9 + (let ((gp-0 (res-lump-struct (-> v1-9 extra) 'subtitle-range (array subtitle-range)))) + (when gp-0 + (let ((f30-0 (ja-aframe-num 0)) + (s5-0 (the-as int (-> *setting-control* user-current subtitle-language))) + ) + (if (and (= (the-as language-enum s5-0) (language-enum english)) (= (scf-get-territory) 1)) + (set! s5-0 11) + ) + (dotimes (s4-0 (-> gp-0 length)) + (let ((v1-16 (-> gp-0 s4-0))) + (when (and (>= f30-0 (-> v1-16 start-frame)) (< f30-0 (-> v1-16 end-frame))) + (let ((s3-0 (-> v1-16 message s5-0))) + (when (and s3-0 (nonzero? s3-0)) + (let ((s2-0 + (new 'stack 'font-context *font-default-matrix* 20 290 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-20 s2-0)) + (set! (-> v1-20 width) (the float 465)) + ) + (let ((v1-21 s2-0)) + (set! (-> v1-21 height) (the float 70)) + ) + (let ((v1-22 s2-0)) + (set! (-> v1-22 scale) 0.5) + ) + (set! (-> s2-0 flags) (font-flags shadow kerning middle large)) + (case (-> s3-0 type) + ((string) + (when (= (-> *setting-control* user-default subtitle-language) (language-enum korean)) + (set! s3-0 (convert-korean-text (the-as string s3-0))) + (let ((v1-27 s2-0)) + (set! (-> v1-27 scale) 0.6) + ) + ) + (when (= (-> *setting-control* user-default subtitle-language) (language-enum russian)) + (let ((v1-30 s2-0)) + (set! (-> v1-30 scale) 0.75) + ) + ) + (set! (-> s2-0 flags) (font-flags kerning middle middle-vert large)) + (+! (-> s2-0 origin x) -1.0) + (+! (-> s2-0 origin y) -1.0) + (set! (-> s2-0 color) (font-color font-color-39)) + (+! (-> s2-0 origin x) 1.0) + (+! (-> s2-0 origin y) 1.0) + (set! (-> s2-0 color) (font-color default)) + (set! (-> s2-0 flags) (font-flags shadow kerning middle middle-vert large)) + (print-game-text (the-as string s3-0) s2-0 #f 44 (bucket-id hud-draw-pris2)) + (gui-control-method-12 + *gui-control* + self + (gui-channel subtitle) + (gui-action play) + "scene" + 0 + 81920.0 + (new 'static 'sound-id) + ) + ) + ((subtitle-image) + (draw-subtitle-image (the-as subtitle-image s3-0) s2-0) + ) + (else + (if *debug-segment* + (format *stdcon* "unknown message ~A~%" s3-0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defstate wait (scene-player) + :virtual #t + :enter (behavior ((arg0 symbol)) + (format 0 "scene-player: skipping scene~%") + (go-virtual release) + (set-time! (-> self state-time)) + (if (= (-> *game-info* demo-state) 101) + (set-setting! 'audio-language #f 0.0 5) + ) + (when (or (-> self scene) (-> self preload-continue)) + (let ((gp-0 (scene-decode-continue (if (-> self scene) + (-> self scene load-point) + (-> self preload-continue) + ) + ) + ) + ) + (when gp-0 + (when (-> self scene) + (set-setting! 'borrow (-> self scene borrow) 0.0 0) + (apply-settings *setting-control*) + ) + (cond + ((and *target* + (zero? (-> self scene-index)) + (or (not (-> self scene)) + (!= (status-of-level-and-borrows *level* (-> gp-0 vis-nick) #f) 'active) + (logtest? (-> self scene scene-flags) (scene-flags scf5)) + ) + ) + (send-event *target* 'continue gp-0) + ) + (else + (let ((a0-16 (lookup-level-info (-> gp-0 vis-nick)))) + (set! (-> *load-state* vis-nick) (if a0-16 + (-> a0-16 name) + ) + ) + ) + (dotimes (v1-28 10) + (cond + ((< v1-28 (-> gp-0 want-count)) + (set! (-> *load-state* want v1-28 name) (-> gp-0 want v1-28 name)) + (set! (-> *load-state* want v1-28 display?) (-> gp-0 want v1-28 display?)) + ) + (else + (set! (-> *load-state* want v1-28 name) #f) + (set! (-> *load-state* want v1-28 display?) #f) + ) + ) + (set! (-> *load-state* want v1-28 force-vis?) #f) + (set! (-> *load-state* want v1-28 force-inside?) #f) + ) + (update-task-masks 'event) + ) + ) + ) + ) + ) + ) + :trans (behavior () + (if (and (-> self scene) (nonzero? (-> self anim anim-name)) (not (load-in-progress? *level*))) + (gui-control-method-12 + *gui-control* + self + (gui-channel art-load) + (gui-action queue) + (-> self anim name) + 0 + -1.0 + (new 'static 'sound-id) + ) + ) + (set! (-> *ACTOR-bank* birth-max) 1000) + ) + :code (behavior ((arg0 symbol)) + (local-vars (v1-18 symbol) (v1-124 symbol)) + (when (and (-> self scene) (zero? (-> self scene wait-max-time))) + (while *progress-process* + (suspend) + ) + (set-setting! 'allow-progress #f 0.0 0) + (set-setting! 'bg-a-force 'abs 1.0 0) + (apply-settings *setting-control*) + ) + (if (or (not *target*) + (or (focus-test? *target* grabbed) + (begin + (dotimes (v1-17 10) + (when (and (-> *target* current-level) (= (-> *load-state* target v1-17 name) (-> *target* current-level name))) + (set! v1-18 #f) + (goto cfg-22) + ) + ) + #t + (set! v1-18 #t) + (label cfg-22) + (or v1-18 (not (-> self scene))) + ) + ) + ) + (set! arg0 #f) + ) + (while (and arg0 + (or (focus-test? *target* in-air) + (and (-> *target* next-state) (= (-> *target* next-state name) 'target-flop-hit-ground)) + ) + (-> self scene) + (not (time-elapsed? (-> self state-time) (-> self scene wait-air-time))) + ) + (suspend) + ) + (suspend) + (let ((s5-0 (current-time))) + (when (and *target* (not (logtest? (-> *target* focus-status) (focus-status grabbed)))) + (label cfg-47) + (send-event *target* 'end-mode 'freeze 'force) + (when (not (process-grab? *target* #f)) + (suspend) + (goto cfg-47) + ) + ) + (process-entity-status! self (entity-perm-status no-kill) #t) + (until (not (or (-> *setting-control* user-current talking) + (-> *setting-control* user-current spooling) + (-> *setting-control* user-current hint) + (-> *setting-control* user-current ambient) + ) + ) + (set-setting! 'allow-progress #f 0.0 0) + (apply-settings *setting-control*) + (dotimes (s4-0 2) + (while (or (-> *setting-control* user-current talking) + (-> *setting-control* user-current spooling) + (-> *setting-control* user-current hint) + (-> *setting-control* user-current ambient) + (or (and (-> *setting-control* user-current movie) + (!= (-> *setting-control* user-current movie) (process->ppointer self)) + ) + *progress-process* + (!= (get-status *gui-control* (-> self gui-id)) 3) + ) + ) + (suspend) + ) + ) + (when arg0 + (while (and (-> self scene) (not (or (time-elapsed? s5-0 (-> self scene wait-ground-time)) + (time-elapsed? (-> self state-time) (-> self scene wait-max-time)) + ) + ) + ) + (suspend) + ) + ) + (remove-setting! 'movie) + (remove-setting! 'sound-bank-load) + (remove-setting! 'movie-name) + (remove-setting! 'bg-a-force) + (apply-settings *setting-control*) + (set-blackout-frames (seconds 0.1)) + (suspend) + (set-blackout-frames (seconds 0.1)) + (suspend) + ) + ) + (send-event *target* 'trans 'save (-> self old-target-pos)) + (let ((gp-1 *load-state*)) + (when gp-1 + (dotimes (s5-1 2) + (while (begin + (dotimes (s4-1 10) + (when (not (or (not (-> gp-1 want s4-1 name)) + (not (-> gp-1 want s4-1 display?)) + (= (status-of-level-and-borrows *level* (-> gp-1 want s4-1 name) 'all) 'active) + ) + ) + (set! v1-124 #t) + (goto cfg-114) + ) + ) + (set! v1-124 #f) + (label cfg-114) + v1-124 + ) + (set-blackout-frames (seconds 0.1)) + (suspend) + ) + (when (and (zero? s5-1) (< (-> self scene-index) (-> self scene-list length))) + (scene-player-method-24 self (-> self scene-list (-> self scene-index)) #t) + (when (-> self scene) + (set-setting! 'borrow (-> self scene borrow) 0.0 0) + (apply-settings *setting-control*) + ) + ) + ) + ) + ) + (when (and *target* (focus-test? *target* in-head flut light board pilot mech dark)) + (send-event *target* 'change-mode 'normal) + (set-action! + *gui-control* + (gui-action stop) + (the-as sound-id 1) + (gui-channel jak) + (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 jak-mode) + (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 jak-effect-1) + (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 jak-effect-2) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (when (< (-> self scene-index) (-> self scene-list length)) + (scene-player-method-24 self (-> self scene-list (-> self scene-index)) #t) + (while (and (-> self scene) + (nonzero? (-> self anim anim-name)) + (let ((v1-175 (file-status *art-control* (-> self anim name) 0))) + (or (not (or (= v1-175 'active) (= v1-175 'locked))) + (let* ((a1-32 + (lookup-gui-connection-id *gui-control* (-> self anim anim-name) (gui-channel art-load) (gui-action none)) + ) + (v1-181 (get-status *gui-control* a1-32)) + ) + (not (or (= v1-181 (gui-status ready)) (= v1-181 (gui-status active)))) + ) + ) + ) + ) + (set-blackout-frames (seconds 0.1)) + (suspend) + ) + ) + (go-virtual play-anim) + ) + ) + +(defstate release (scene-player) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('user-data-set!) + (let ((v0-0 (-> block param 0))) + (set! (-> self user-data) v0-0) + v0-0 + ) + ) + (('user-data) + (-> self user-data) + ) + ) + ) + :code (behavior () + (remove-setting! 'borrow) + (when (scene-select?) + (remove-setting! 'audio-language) + (logclear! (-> self mask) (process-mask pause progress)) + (set-blackout-frames (seconds 0.05)) + (set-setting! 'music-volume 'abs 0.0 0) + (set-setting! 'sfx-volume 'abs 0.0 0) + (set-setting! 'ambient-volume 'abs 0.0 0) + (set-setting! 'allow-pause #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) + (setup + *screen-filter* + (new 'static 'vector) + (new 'static 'vector :w 128.0) + (* 30.0 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.05)) + (suspend) + ) + ) + (set! (-> *setting-control* user-current bg-a) 0.0) + (remove-setting! 'movie) + (remove-setting! 'movie-name) + (while (or (-> *setting-control* user-current movie) + (not *target*) + (or (!= (-> *setting-control* user-current bg-a) 0.0) (load-in-progress? *level*)) + ) + (suspend) + ) + (set! (-> *game-info* blackout-time) 0) + (set! (-> *game-info* demo-state) (the-as uint 1)) + (set! (-> *setting-control* user-current bg-a-force) 0.0) + (set-setting! 'allow-progress #t 0.0 0) + (remove-setting! 'process-mask) + (remove-setting! 'letterbox) + (apply-settings *setting-control*) + (send-event *target* 'draw #t) + (send-event *target* 'trans 'reset) + (send-event *target* 'change-mode 'normal) + (activate-progress *dproc* 'select-scene-special) + (dotimes (gp-1 5) + (suspend) + ) + (disable *screen-filter*) + (deactivate self) + ) + (when (< (-> self scene-index) (+ (-> self scene-list length) -1)) + (set! (-> self scene-index) (+ (-> self scene-list length) -1)) + (scene-player-method-24 self (-> self scene-list (-> self scene-index)) #t) + ) + (let ((gp-2 (or (not (-> self scene)) (if (= (-> self blackout-end) 'none) + (logtest? (-> self scene scene-flags) (scene-flags scf2)) + (-> self blackout-end) + ) + ) + ) + ) + (if gp-2 + (set-blackout-frames (seconds 0.1)) + ) + (send-event *target* 'draw #t) + (send-event *target* 'trans 'reset) + (suspend) + (while (not (process-release? *target*)) + (suspend) + (if gp-2 + (set-blackout-frames (seconds 0.1)) + ) + ) + (if gp-2 + (set-blackout-frames (seconds 0.1)) + ) + ) + (when (nonzero? (the int (-> self scene music-delay))) + (persist-with-delay + *setting-control* + 'music-volume-movie + (the-as time-frame (the int (-> self scene music-delay))) + 'music-volume + 'abs + 0.0 + 0 + ) + (persist-with-delay + *setting-control* + 'music-delay + (the-as time-frame (the int (-> self scene music-delay))) + 'music + #f + 0.0 + 0 + ) + ) + (cond + ((and *target* (-> self scene) (or (-> self end-point) (-> self scene end-point))) + (let ((t9-32 scene-decode-continue) + (a0-37 (-> self end-point)) + ) + (set! a0-37 (cond + (a0-37 + (empty) + a0-37 + ) + (else + (-> self scene end-point) + ) + ) + ) + (let ((gp-4 (t9-32 a0-37))) + (when gp-4 + (persist-with-delay + *setting-control* + 'fail-sfx-volume + (seconds 10) + 'sfx-volume + 'abs + (-> *setting-control* user-target sfx-volume) + 0 + ) + (persist-with-delay + *setting-control* + 'fail-music-volume + (seconds 10) + 'music-volume + 'abs + (-> *setting-control* user-target music-volume) + 0 + ) + (persist-with-delay + *setting-control* + 'fail-dialog-volume + (seconds 10) + 'dialog-volume + 'abs + (-> *setting-control* user-target dialog-volume) + 0 + ) + (set-continue! *game-info* gp-4 #f) + (send-event *target* 'continue gp-4) + ) + ) + ) + ) + (else + (send-event *target* 'trans 'restore (-> self old-target-pos)) + ) + ) + (if (and (-> self scene) (logtest? (-> self scene scene-flags) (scene-flags scf4))) + (auto-save-user) + ) + (when (and (-> self scene) (-> self scene on-complete)) + (while (and *target* (focus-test? *target* teleporting)) + (suspend) + ) + (script-eval (-> self scene on-complete)) + ) + ) + ) + +(defstate play-anim (scene-player) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 object)) + (case message + (('trans-hook) + (set! v0-0 (-> block param 0)) + (set! (-> self new-trans-hook) (the-as (function none) v0-0)) + v0-0 + ) + (('eval) + ((the-as (function scene-player none) (-> block param 0)) self) + ) + (('abort) + (set! (-> self aborted?) #t) + (set-blackout-frames (seconds 0.2)) + (let ((a0-9 (-> self anim))) + (when (and a0-9 (= (-> *setting-control* user-current spooling) (process->ppointer self))) + (ja-abort-spooled-anim a0-9 (the-as art-joint-anim #f) -1) + (ja-channel-set! 0) + ) + ) + (go-virtual release) + ) + (('change-entity) + (let ((v1-9 (entity-by-name (the-as string (-> block param 0))))) + (set! (-> self main-entity) (the-as entity-actor v1-9)) + (cond + (v1-9 + (process-drawable-from-entity! self (-> self main-entity)) + (set! v0-0 (logclear (-> self mask) (process-mask actor-pause))) + (set! (-> self mask) (the-as process-mask v0-0)) + v0-0 + ) + (else + (format 0 "ERROR: SCENE: scene ~A can not find entity ~A~%" (-> self scene name) (-> block param 0)) + (vector-reset! (-> self root trans)) + (quaternion-identity! (-> self root quat)) + ) + ) + ) + ) + (('user-data-set!) + (set! v0-0 (-> block param 0)) + (set! (-> self user-data) (the-as uint v0-0)) + v0-0 + ) + (('user-data) + (-> self user-data) + ) + ) + ) + :enter (behavior () + (set-setting! 'ambient-wind-scalar #f 0.0 0) + (if (and (logtest? (-> self scene scene-flags) (scene-flags scf6)) *rigid-body-queue-manager*) + (change-parent self *rigid-body-queue-manager*) + ) + ) + :exit (behavior () + (while (-> self child) + (deactivate (-> self child 0)) + ) + (kill-current-talker '() '(daxter voicebox message) 'exit) + (set! (-> *setting-control* user-current bg-a) 0.0) + (kill-persister *setting-control* (the-as engine-pers 'bg-a) 'bg-a) + (kill-persister *setting-control* (the-as engine-pers 'bg-a-speed) 'bg-a-speed) + (if (not (and (-> self next-state) (= (-> self next-state name) 'wait))) + (remove-setting! 'borrow) + ) + (remove-setting! 'gem) + (apply-settings *setting-control*) + ) + :trans (behavior () + (if (!= (-> self cur-trans-hook) (-> self new-trans-hook)) + (set! (-> self cur-trans-hook) (-> self new-trans-hook)) + ) + (cond + ((not (-> *setting-control* user-current spooling)) + (if (and (-> self scene) (nonzero? (-> self anim anim-name))) + (gui-control-method-12 + *gui-control* + self + (gui-channel art-load) + (gui-action queue) + (-> self anim name) + 0 + -1.0 + (new 'static 'sound-id) + ) + ) + ) + (else + (if (and (-> self scene) (nonzero? (-> self next-anim anim-name))) + (gui-control-method-12 + *gui-control* + self + (gui-channel art-load) + (gui-action queue) + (-> self next-anim name) + 0 + -1.0 + (new 'static 'sound-id) + ) + ) + ) + ) + (when (logtest? (-> self scene scene-flags) (scene-flags scf6)) + (let ((v1-26 (handle->process (-> *target* pilot vehicle)))) + (when v1-26 + (set! (-> self root trans quad) (-> (the-as process-drawable v1-26) root trans quad)) + (quaternion-copy! (-> self root quat) (-> (the-as process-drawable v1-26) root quat)) + ) + ) + ) + (if (and (-> self scene) (-> self scene on-running)) + (script-eval (-> self scene on-running)) + ) + (when (and (logtest? (-> self scene scene-flags) (scene-flags scf8)) + (not (-> self preload-sound)) + (-> self scene) + (-> self scene end-point) + (< 10.0 (ja-aframe-num 0)) + ) + (let ((t9-6 scene-decode-continue) + (a0-20 (-> self end-point)) + ) + (set! a0-20 (cond + (a0-20 + (empty) + a0-20 + ) + (else + (-> self scene end-point) + ) + ) + ) + (let ((v1-49 (t9-6 a0-20))) + (when v1-49 + (dotimes (a0-22 3) + (set! (-> *load-state* want-sound a0-22 name) (-> v1-49 want-sound a0-22)) + (set! (-> *load-state* want-sound a0-22 mode) (sound-bank-mode unknown)) + (set! (-> *backup-load-state* want-sound a0-22 name) (-> v1-49 want-sound a0-22)) + (set! (-> *backup-load-state* want-sound a0-22 mode) (sound-bank-mode unknown)) + ) + (remove-setting! 'sound-bank-load) + (add-borrow-levels *load-state*) + ) + ) + ) + (set! (-> self preload-sound) (the-as basic #t)) + ) + ((-> self cur-trans-hook)) + ) + :code (behavior () + (local-vars (a0-29 symbol)) + (when (or *debug-menu-scene-play* (and (scene-select?) (-> self scene) (nonzero? (-> self scene scene-task)))) + (task-node-open! (the-as game-task-node (-> self scene scene-task)) 'event) + (logior! (-> self mask) (process-mask no-kill)) + (if (not (logtest? (-> self scene scene-flags) (scene-flags scf6))) + (reset-actors 'debug) + ) + (logclear! (-> self mask) (process-mask no-kill)) + ) + (dotimes (gp-0 2) + (let ((v1-17 (-> *art-control* buffer gp-0))) + (if (= (-> v1-17 status) 'active) + (link-art-to-master (-> v1-17 art-group)) + ) + ) + ) + (while (and (< (-> self scene-index) (-> self scene-list length)) (not (-> self aborted?))) + (scene-player-method-23 self (the-as string (-> self scene-list (-> self scene-index))) #t) + (kill-persister *setting-control* (the-as engine-pers 'title-control-scene) 'render) + (set-blackout-frames (seconds 0.1)) + (suspend) + (set-blackout-frames (seconds 0.1)) + (suspend) + (when (not (-> *setting-control* user-current border-mode)) + (set! (-> *setting-control* user-default border-mode) #t) + (set! (-> *level* play?) (-> *setting-control* user-default border-mode)) + (apply-settings *setting-control*) + ) + (scene-player-method-25 self 0.0 -1.0) + (set! (-> self cur-speed) 0.0) + (set-time! (-> self scene-start-time)) + (ja-play-spooled-anim + (-> self anim) + (the-as art-joint-anim #f) + (the-as art-joint-anim #f) + (the-as + (function process-drawable symbol) + (if (logtest? (-> self scene scene-flags) (scene-flags scf1)) + (lambda :behavior scene-player + () + (when (cpad-pressed? 0 triangle) + (set! (-> self aborted?) #t) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) + #t + ) + (none) + ) + false-func + ) + ) + (if (logtest? (-> self scene scene-flags) (scene-flags scf7)) + (spooler-flags) + (spooler-flags blackout-on-stall) + ) + ) + (while (-> self child) + (deactivate (-> self child 0)) + ) + (+! (-> self scene-index) 1) + (when (and (< (-> self scene-index) (-> self scene-list length)) (not (-> self aborted?))) + (let ((v1-61 (scene-player-method-24 self (-> self scene-list (-> self scene-index)) #t))) + (when v1-61 + (let ((a0-26 (scene-decode-continue (-> v1-61 load-point)))) + (set! a0-29 (when (and a0-26 (logtest? (-> a0-26 flags) (continue-flags scene-wait))) + (go-virtual wait a0-29) + a0-29 + ) + ) + ) + ) + ) + ) + ) + (if (and (-> self wait) *target* (focus-test? *target* grabbed)) + (go-virtual release) + ) + ) + :post (behavior () + (when (-> self scene) + (let ((gp-0 (-> self scene cut-list)) + (s5-0 (-> self skel root-channel 0 frame-group)) + ) + (when (not (or (null? gp-0) (not s5-0) (zero? s5-0))) + (let ((v1-8 (the int (ja-frame-num 0))) + (a0-2 (car gp-0)) + ) + (while (not (null? gp-0)) + (let ((f0-5 (/ (- (the float (/ (the-as int a0-2) 8)) (-> s5-0 artist-base)) (-> s5-0 artist-step)))) + (when (= v1-8 (if (= f0-5 (the float (the int f0-5))) + (+ (the int f0-5) -1) + (the int f0-5) + ) + ) + (set! (-> self skel root-channel 0 frame-num) (the float (the int (-> self skel root-channel 0 frame-num)))) + (set! (-> self pre-cut-frame) (the-as basic #t)) + ) + ) + (set! gp-0 (cdr gp-0)) + (set! a0-2 (car gp-0)) + ) + ) + ) + ) + (if (-> self pre-cut-frame) + (set! (-> self pre-cut-frame) #f) + ) + ) + (when (and (-> self scene) (nonzero? (-> self skel active-channels))) + (when (and (< (ja-aframe-num 0) 2.0) + (< (-> *display* base-clock frame-counter) (-> *game-info* blackout-time)) + (logtest? (-> self skel status) (joint-control-status valid-spooled-frame)) + ) + (set-blackout-frames 0) + (set-blackout-frames (seconds 0.017)) + ) + (scene-player-method-25 self (ja-aframe-num 0) (-> self last-frame)) + (set! (-> self last-frame) (ja-aframe-num 0)) + (set! (-> self dma-max) + (the-as uint (max + (the-as int (-> self dma-max)) + (* (dma-buffer-length (-> *display* frames (-> *display* last-screen) global-buf)) 16) + ) + ) + ) + (let ((gp-4 *display-scene-control*)) + (when (nonzero? gp-4) + (if (logtest? gp-4 (scene-controls bounds-spheres)) + (debug-print-channels (-> self skel) (the-as symbol *stdcon*)) + ) + (if (logtest? gp-4 (scene-controls actors)) + (format *stdcon* "anim ~-30S " (-> self scene anim)) + ) + (if (logtest? gp-4 (scene-controls actor-marks)) + (format + *stdcon* + "dma ~DK / ~DK" + (shr (* (dma-buffer-length (-> *display* frames (-> *display* last-screen) global-buf)) 16) 10) + (shr (-> self dma-max) 10) + ) + ) + (if (logtest? gp-4 (scene-controls actors actor-marks)) + (format *stdcon* "~%") + ) + (when (logtest? gp-4 (scene-controls special-fma-spheres)) + (dotimes (s5-3 (-> self scene actor length)) + (let* ((s4-1 (handle->process (-> self scene actor s5-3 process))) + (v1-66 (if (type? s4-1 process-drawable) + (the-as process-drawable s4-1) + ) + ) + ) + (if (and v1-66 (nonzero? (-> v1-66 draw))) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> v1-66 draw origin) + (-> v1-66 draw bounds w) + (new 'static 'rgba :b #xff :a #x80) + ) + ) + ) + ) + ) + (when (logtest? gp-4 (scene-controls scene-controls-7)) + (dotimes (s5-4 (-> self scene actor length)) + (let* ((s4-2 (handle->process (-> self scene actor s5-4 process))) + (v1-82 (if (type? s4-2 process-drawable) + (the-as process-drawable s4-2) + ) + ) + ) + (if (and v1-82 (nonzero? (-> v1-82 draw))) + (format + *stdcon* + "~0K ~-30S ~S d:~4,,0m r:~4,,0m~1K~%" + (-> self scene actor s5-4 art-group) + (if (logtest? (-> v1-82 draw status) (draw-control-status on-screen)) + "os" + " " + ) + (-> v1-82 draw distance) + (-> v1-82 draw bounds w) + ) + ) + ) + ) + ) + (when (logtest? gp-4 (scene-controls scene-controls-8)) + (dotimes (gp-5 (-> self scene actor length)) + (let* ((s5-5 (handle->process (-> self scene actor gp-5 process))) + (v1-97 (if (type? s5-5 process-drawable) + (the-as process-drawable s5-5) + ) + ) + ) + (if (and v1-97 (nonzero? (-> v1-97 draw))) + (add-debug-text-3d + #t + (bucket-id debug-no-zbuf1) + (-> v1-97 name) + (-> v1-97 draw origin) + (font-color yellow) + (new 'static 'vector2h :y 8) + ) + ) + ) + ) + ) + ) + ) + ) + (when (cpad-pressed? 0 square) + (set! (-> *setting-control* user-default subtitle) (not (-> *setting-control* user-default subtitle))) + (set-time! (-> self subtitle-change-time)) + ) + (when (and (not (time-elapsed? (-> self subtitle-change-time) (seconds 2))) + (< (mod (- (current-time) (-> self subtitle-change-time)) 300) 210) + ) + (let ((gp-6 + (new 'stack 'font-context *font-default-matrix* 36 60 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-124 gp-6)) + (set! (-> v1-124 width) (the float 440)) + ) + (let ((v1-125 gp-6)) + (set! (-> v1-125 height) (the float 48)) + ) + (let ((v1-126 gp-6)) + (set! (-> v1-126 scale) 0.5) + ) + (set! (-> gp-6 flags) (font-flags shadow kerning middle large)) + (print-game-text + (lookup-text! + *common-text* + (if (-> *setting-control* user-default subtitle) + (text-id text-020b) + (text-id text-020c) + ) + #f + ) + gp-6 + #f + 44 + (bucket-id hud-draw-pris2) + ) + ) + ) + (process-drawable-draw-subtitles) + (when (-> self scene) + (let ((gp-7 + (lookup-gui-connection *gui-control* self (gui-channel art-load) (-> self scene anim) (new 'static 'sound-id)) + ) + ) + (when (and (= *cheat-mode* 'debug) (!= *external-cam-mode* 'pad-0)) + (cond + ((cpad-hold? 0 r1) + (if (cpad-pressed? 0 circle) + (set-time! (-> self speed-press-time)) + ) + (seek! + (-> self speed-change-speed) + 8.0 + (* (lerp-scale 0.01 0.3 (the float (- (current-time) (-> self speed-press-time))) 0.0 300.0) + (-> self clock time-adjust-ratio) + ) + ) + ) + ((cpad-hold? 0 l1) + (if (cpad-pressed? 0 square) + (set-time! (-> self speed-press-time)) + ) + (seek! + (-> self speed-change-speed) + -8.0 + (* (lerp-scale 0.01 0.3 (the float (- (current-time) (-> self speed-press-time))) 0.0 300.0) + (-> self clock time-adjust-ratio) + ) + ) + ) + ((cpad-hold? 0 x) + (when (cpad-pressed? 0 x) + (set-time! (-> self speed-press-time)) + (cond + ((= (-> self cur-speed) 0.0) + (set! (-> self speed-change-speed) -1000.0) + ) + (else + (set! (-> self targ-speed) 0.0) + (set! (-> self speed-change-speed) 0.0) + ) + ) + ) + ) + (else + (set! (-> self speed-change-speed) 0.0) + ) + ) + ) + (cond + ((not gp-7) + ) + ((= (-> self cur-speed) -1000.0) + (format *stdcon* "scene paused~%") + (when (!= (-> self targ-speed) -1000.0) + (sound-continue (-> gp-7 id)) + (when *sound-player-enable* + (let ((v1-190 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-190 command) (sound-command set-param)) + (set! (-> v1-190 id) (-> gp-7 id)) + (set! (-> v1-190 params pitch-mod) 0) + (set! (-> v1-190 params mask) (the-as uint 2)) + (-> v1-190 id) + ) + ) + (set! (-> self targ-speed) 0.0) + (set! (-> self cur-speed) 0.0) + (set-time! (-> self speed-change-time)) + ) + ) + ((= (-> self speed-change-speed) -1000.0) + (when (!= (-> self cur-speed) -1000.0) + (set-time! (-> self speed-change-time)) + (set! (-> self targ-speed) -1000.0) + (set! (-> self cur-speed) -1000.0) + (sound-pause (-> gp-7 id)) + ) + ) + (else + (set! (-> self targ-speed) + (fmax -10.0 (fmin 10.0 (+ (-> self targ-speed) (* (-> self speed-change-speed) (seconds-per-frame))))) + ) + (if (and (= *cheat-mode* 'debug) (not (time-elapsed? (-> self speed-change-time) (seconds 3)))) + (format + *stdcon* + "id ~d speed ~f~%" + (if gp-7 + (the-as int (-> gp-7 id)) + 0 + ) + (-> self targ-speed) + ) + ) + (cond + ((!= (-> self targ-speed) 0.0) + ) + ((logtest? (game-secrets fast-movie) (-> *game-info* secrets)) + (set! (-> self targ-speed) 0.2) + ) + ((logtest? (game-secrets slow-movie) (-> *game-info* secrets)) + (set! (-> self targ-speed) -0.2) + ) + ) + (when (and gp-7 (and (!= (-> self targ-speed) (-> self cur-speed)) + (< (-> self speed-change-time) (current-time)) + (time-elapsed? (-> self scene-start-time) (seconds 1)) + ) + ) + (when *sound-player-enable* + (let ((v1-229 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-229 command) (sound-command set-param)) + (set! (-> v1-229 id) (-> gp-7 id)) + (set! (-> v1-229 params pitch-mod) (the int (* 1524.0 (-> self targ-speed)))) + (set! (-> v1-229 params mask) (the-as uint 2)) + (-> v1-229 id) + ) + ) + (set! (-> self cur-speed) (-> self targ-speed)) + (set-time! (-> self speed-change-time)) + ) + ) + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior scene-player-init scene-player ((arg0 object) (arg1 symbol) (arg2 string)) + (process-entity-set! self (the-as entity #f)) + (stack-size-set! (-> self main-thread) 1024) + (set! (-> self root) (new 'process 'trsqv)) + (case (rtype-of arg0) + ((array) + (set! (-> self scene-list) (new 'process 'boxed-array scene (-> (the-as (array scene) arg0) length))) + (dotimes (v1-7 (-> self scene-list length)) + (set! (-> self scene-list v1-7) (-> (the-as (array scene) arg0) v1-7)) + ) + ) + ((pair) + (let ((s3-0 (method-of-type array new)) + (s2-0 'process) + (s1-0 array) + (s0-0 scene) + (a0-14 arg0) + ) + (set! (-> self scene-list) + (the-as (array scene) (s3-0 s2-0 s1-0 s0-0 ((method-of-type (rtype-of a0-14) length) a0-14))) + ) + ) + (dotimes (s3-1 (-> self scene-list length)) + (set! (-> self scene-list s3-1) (the-as scene (ref arg0 s3-1))) + ) + ) + (else + (set! (-> self scene-list) (new 'process 'boxed-array scene 1)) + (set! (-> self scene-list 0) (the-as scene arg0)) + ) + ) + (set! (-> self preload-continue) arg2) + (set! (-> self camera) (the-as handle #f)) + (set! (-> self wait) arg1) + (set! (-> self pre-cut-frame) #f) + (set! (-> self aborted?) #f) + (set! (-> self blackout-end) (the-as basic 'none)) + (set! (-> self end-point) #f) + (set! (-> self preload-sound) #f) + (set! (-> self draw) (new 'process 'draw-control self #f)) + (set! (-> self skel) (new 'process 'joint-control 48)) + (set! (-> self anim) (new 'static 'spool-anim)) + (set! (-> self next-anim) (new 'static 'spool-anim)) + (dotimes (s4-1 (-> self scene-list length)) + (let ((v1-30 (scene-lookup (-> self scene-list s4-1)))) + (if v1-30 + (set! (-> self scene-list s4-1) v1-30) + ) + ) + ) + (cond + ((= (-> self scene-list (-> self scene-index) type) scene) + (set! (-> self scene) (-> self scene-list (-> self scene-index))) + (if (-> self scene) + (init-spool-by-scene! (-> self scene) (-> self anim)) + ) + ) + (else + (set-blackout-frames (seconds 0.2)) + (set! (-> self scene) #f) + ) + ) + (set! (-> self gui-id) (add-process + *gui-control* + self + (gui-channel movie) + (gui-action play) + (the-as string (cond + ((= (rtype-of arg0) string) + (empty) + arg0 + ) + (else + "movie" + ) + ) + ) + -99.0 + 0 + ) + ) + (set! *scene-player* (the-as (pointer scene-player) (process->ppointer self))) + (set! *display-entity-errors* #f) + (set-setting! 'speech-control #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) + (if (or (= (cond + ((-> self scene) + (if (>= (-> self scene music-volume) 0.0) + (-> self scene music-volume) + (-> *setting-control* user-current music-volume-movie) + ) + ) + (else + 0.0 + ) + ) + 0.0 + ) + (not (-> *setting-control* user-current music)) + (!= (-> *setting-control* user-target music) (-> *setting-control* user-current music)) + ) + (set-setting! 'music #f 0.0 0) + ) + (apply-settings *setting-control*) + (set! (-> self new-trans-hook) nothing) + (set! (-> self cur-trans-hook) nothing) + (go-virtual wait arg1) + (none) + ) + +(defmethod load-scene ((this scene)) + (let ((v1-1 (-> *level* loading-level))) + (if v1-1 + (set-loaded-art (-> v1-1 art-group) this) + ) + ) + this + ) diff --git a/goal_src/jak3/engine/sound/gsound-h.gc b/goal_src/jak3/engine/sound/gsound-h.gc index cff51ed3f7..f346d2583f 100644 --- a/goal_src/jak3/engine/sound/gsound-h.gc +++ b/goal_src/jak3/engine/sound/gsound-h.gc @@ -60,6 +60,20 @@ (set-stereo-mode) ) +(defenum sound-bank-mode + :type uint32 + (none 0) + (unknown 1) + (common 2) + (mode 3) + (full 4) + (half 5) + (halfa 6) + (halfb 7) + (halfc 8) + (virtual 9) + ) + ;; +++sound-group (defenum sound-group :bitfield #t @@ -94,6 +108,7 @@ (reg1) (reg2) (unk) + (unk2) ) (defenum stream-status @@ -193,8 +208,8 @@ ) (deftype sound-name (uint128) - ((lo uint64 :offset 0) ;; added to help with cases where they access it by u64. - (hi uint64 :offset 64) + ((lo uint64 :offset 0 :size 64) + (hi uint64 :offset 64 :size 64) ) ) @@ -208,17 +223,17 @@ (deftype sound-play-params (structure) - ((mask uint16) - (pitch-mod int16) - (bend int16) - (fo-min int16) - (fo-max int16) - (fo-curve int8) - (priority int8) - (volume int32) - (trans int32 3) - (group uint8) - (reg uint8 3) + ((mask uint16) + (pitch-mod int16) + (bend int16) + (fo-min int16) + (fo-max int16) + (fo-curve int8) + (priority int8) + (volume int32) + (trans int32 3) + (group uint8) + (reg uint8 3) (group-and-reg uint32 :overlay-at group) ) :pack-me @@ -452,7 +467,7 @@ (deftype sound-bank-state (structure) ((name symbol) - (mode uint32) + (mode sound-bank-mode) ) :pack-me ) diff --git a/goal_src/jak3/engine/sound/gsound.gc b/goal_src/jak3/engine/sound/gsound.gc index 6f8fd4a5f9..3ad7bcfae2 100644 --- a/goal_src/jak3/engine/sound/gsound.gc +++ b/goal_src/jak3/engine/sound/gsound.gc @@ -1245,7 +1245,7 @@ (sound-bank-load (string->sound-name (symbol->string s5-0)) 4 10) (set! (-> *level* sound-bank (* gp-0 2) name) s5-0) ) - (set! (-> *level* sound-bank (* gp-0 2) mode) (the-as uint 4)) + (set! (-> *level* sound-bank (* gp-0 2) mode) (sound-bank-mode full)) ) (defun loader-test-command ((cmd sound-command) (param uint)) diff --git a/goal_src/jak3/engine/sound/speech.gc b/goal_src/jak3/engine/sound/speech.gc index 27cc278ab3..da425644af 100644 --- a/goal_src/jak3/engine/sound/speech.gc +++ b/goal_src/jak3/engine/sound/speech.gc @@ -244,7 +244,7 @@ (with-pp (logclear! (-> this flags) (speech-channel-flag disable)) (if (or (not (-> *setting-control* user-current speech-control)) - (level-group-method-28 *level*) + (load-in-progress? *level*) (nonzero? (-> this id)) ) (logior! (-> this flags) (speech-channel-flag disable)) diff --git a/goal_src/jak3/engine/spatial-hash/actor-hash-h.gc b/goal_src/jak3/engine/spatial-hash/actor-hash-h.gc index 73307c3da0..1537dbfa76 100644 --- a/goal_src/jak3/engine/spatial-hash/actor-hash-h.gc +++ b/goal_src/jak3/engine/spatial-hash/actor-hash-h.gc @@ -5,6 +5,8 @@ ;; name in dgo: actor-hash-h ;; dgos: GAME +(define-extern update-actor-hash (function none)) + ;; DECOMP BEGINS (define *actor-list* (the-as (pointer collide-shape) (malloc 'global 1024))) diff --git a/goal_src/jak3/engine/spatial-hash/actor-hash.gc b/goal_src/jak3/engine/spatial-hash/actor-hash.gc index 95d57281ba..5d1a6552d6 100644 --- a/goal_src/jak3/engine/spatial-hash/actor-hash.gc +++ b/goal_src/jak3/engine/spatial-hash/actor-hash.gc @@ -7,3 +7,1312 @@ ;; DECOMP BEGINS +(kmemopen global "actor-hash") + +(define *actor-hash* (new 'global 'spatial-hash 4096 256)) + +(kmemclose) + +(deftype actor-cshape-ptr (structure) + ((cshape collide-shape) + ) + ) + + +(deftype actor-hash-bucket (structure) + ((length int16) + (max-length int16) + (data (inline-array actor-cshape-ptr)) + ) + :allow-misaligned + (:methods + (add-actor-cshape (_type_ collide-shape) none) + ) + ) + + +(defmethod add-actor-cshape ((this actor-hash-bucket) (arg0 collide-shape)) + (let ((v1-0 (-> this length))) + (when (< v1-0 (-> this max-length)) + (set! (-> this data v1-0 cshape) arg0) + (set! (-> this length) (+ v1-0 1)) + ) + ) + 0 + (none) + ) + +(deftype actor-hash-buckets (structure) + ((hash spatial-hash) + (list engine) + (data actor-hash-bucket 4 :inline) + (tpos vector :inline) + ) + (:methods + (hash-actors (_type_) none) + ) + ) + + +(defmethod hash-actors ((this actor-hash-buckets)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (set! (-> this hash) *actor-hash*) + (set! (-> this list) *collide-hit-by-others-list*) + (clear-objects! (-> this hash)) + (cond + ((>= 256 (-> this list length)) + (let ((a0-4 (-> this list alive-list next0))) + (-> this list) + (let ((v1-8 (-> a0-4 next0))) + (while (!= a0-4 (-> this list alive-list-end)) + (let* ((a0-5 (-> (the-as connection a0-4) param1)) + (a1-0 (-> this hash)) + (t0-0 (-> (the-as collide-shape a0-5) root-prim prim-core)) + (a3-0 a0-5) + (a2-1 (-> a1-0 object-count)) + ) + (set! a2-1 (cond + ((< a2-1 (-> a1-0 max-object-count)) + (let ((t1-2 (-> a1-0 sphere-array a2-1)) + (t2-2 (-> a1-0 object-array a2-1)) + ) + (let ((t3-1 (new 'stack-no-clear 'inline-array 'vector 2))) + (let ((t5-0 (-> t3-1 0))) + (let ((t4-0 t0-0)) + (let ((t6-0 (- (-> t0-0 world-sphere w)))) + (.mov vf6 t6-0) + ) + (.lvf vf4 (&-> t4-0 world-sphere quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> t5-0 quad) vf5) + ) + (let ((t5-1 (-> t3-1 1))) + (let ((t4-1 t0-0)) + (let ((t6-1 (-> t0-0 world-sphere w))) + (.mov vf6 t6-1) + ) + (.lvf vf4 (&-> t4-1 world-sphere quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> t5-1 quad) vf5) + ) + (dotimes (t4-2 3) + (set! (-> a1-0 box-min t4-2) (fmin (-> a1-0 box-min t4-2) (-> (&-> t3-1 0 data t4-2) 0))) + (set! (-> a1-0 box-max t4-2) (fmax (-> a1-0 box-max t4-2) (-> (&-> t3-1 0 data t4-2) 4))) + ) + ) + (set! (-> t1-2 quad) (-> t0-0 world-sphere quad)) + (set! (-> t2-2 object) a3-0) + ) + (+! (-> a1-0 object-count) 1) + a2-1 + ) + (else + -1 + ) + ) + ) + (set! (-> (the-as collide-shape a0-5) actor-hash-index) a2-1) + ) + (set! a0-4 v1-8) + (-> this list) + (set! v1-8 (-> v1-8 next0)) + ) + ) + ) + ) + (else + (set! (-> this tpos quad) (-> (target-pos 0) quad)) + (dotimes (v1-13 4) + (set! (-> this data v1-13 length) 0) + ) + (let ((v1-17 (-> this list alive-list next0))) + (-> this list) + (let ((s5-1 (-> v1-17 next0))) + (while (!= v1-17 (-> this list alive-list-end)) + (let* ((s4-0 (-> (the-as connection v1-17) param1)) + (f0-7 (vector-vector-distance-squared (-> this tpos) (-> (the-as collide-shape s4-0) trans))) + (f1-2 102400.0) + ) + (cond + ((< f0-7 (* f1-2 f1-2)) + ((method-of-type actor-hash-bucket add-actor-cshape) + (the-as actor-hash-bucket (-> this data)) + (the-as collide-shape s4-0) + ) + ) + ((let ((f1-5 204800.0)) + (< f0-7 (* f1-5 f1-5)) + ) + (add-actor-cshape (-> this data 1) (the-as collide-shape s4-0)) + ) + ((let ((f1-8 307200.0)) + (< f0-7 (* f1-8 f1-8)) + ) + (add-actor-cshape (-> this data 2) (the-as collide-shape s4-0)) + ) + (else + (add-actor-cshape (-> this data 3) (the-as collide-shape s4-0)) + ) + ) + ) + (set! v1-17 s5-1) + (-> this list) + (set! s5-1 (-> s5-1 next0)) + ) + ) + ) + (dotimes (v1-34 4) + (let ((a0-22 (-> this data v1-34))) + (countdown (a1-10 (-> a0-22 length)) + (let* ((a2-4 (-> a0-22 data a1-10 cshape)) + (a3-4 (-> this hash)) + (t2-3 (-> a2-4 root-prim prim-core)) + (t1-3 a2-4) + (t0-3 (-> a3-4 object-count)) + ) + (set! t0-3 + (cond + ((< t0-3 (-> a3-4 max-object-count)) + (let ((t3-6 (-> a3-4 sphere-array t0-3)) + (t4-5 (-> a3-4 object-array t0-3)) + ) + (let ((t5-15 (new 'stack-no-clear 'inline-array 'vector 2))) + (let ((t7-0 (-> t5-15 0))) + (let ((t6-2 t2-3)) + (let ((t8-0 (- (-> t2-3 world-sphere w)))) + (.mov vf6 t8-0) + ) + (.lvf vf4 (&-> t6-2 world-sphere quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> t7-0 quad) vf5) + ) + (let ((t7-1 (-> t5-15 1))) + (let ((t6-3 t2-3)) + (let ((t8-1 (-> t2-3 world-sphere w))) + (.mov vf6 t8-1) + ) + (.lvf vf4 (&-> t6-3 world-sphere quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> t7-1 quad) vf5) + ) + (dotimes (t6-4 3) + (set! (-> a3-4 box-min t6-4) (fmin (-> a3-4 box-min t6-4) (-> (&-> t5-15 0 data t6-4) 0))) + (set! (-> a3-4 box-max t6-4) (fmax (-> a3-4 box-max t6-4) (-> (&-> t5-15 0 data t6-4) 4))) + ) + ) + (set! (-> t3-6 quad) (-> t2-3 world-sphere quad)) + (set! (-> t4-5 object) t1-3) + ) + (+! (-> a3-4 object-count) 1) + t0-3 + ) + (else + -1 + ) + ) + ) + (set! (-> a2-4 actor-hash-index) t0-3) + ) + ) + ) + ) + ) + ) + (update-from-spheres (-> this hash)) + 0 + (none) + ) + ) + +(define *actor-hash-buckets* + (new 'static 'actor-hash-buckets + :data (new 'static 'inline-array actor-hash-bucket 4 + (new 'static 'actor-hash-bucket :max-length #x100 :data (new 'static 'inline-array actor-cshape-ptr 256 + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + ) + ) + (new 'static 'actor-hash-bucket :max-length #x100 :data (new 'static 'inline-array actor-cshape-ptr 256 + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + ) + ) + (new 'static 'actor-hash-bucket :max-length #x100 :data (new 'static 'inline-array actor-cshape-ptr 256 + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + ) + ) + (new 'static 'actor-hash-bucket :max-length #x100 :data (new 'static 'inline-array actor-cshape-ptr 256 + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + ) + ) + ) + ) + ) + +(defun update-actor-hash () + (local-vars (a0-3 int) (a0-5 int)) + (let* ((v1-1 (-> *perf-stats* data 6)) + (a0-0 (-> v1-1 ctrl)) + ) + (+! (-> v1-1 count) 1) + (b! (zero? a0-0) cfg-2 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-0) + ) + (.sync.l) + (.sync.p) + (label cfg-2) + 0 + (hash-actors *actor-hash-buckets*) + (let ((v1-6 (-> *perf-stats* data 6))) + (b! (zero? (-> v1-6 ctrl)) cfg-4 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-3 pcr0) + (+! (-> v1-6 accum0) a0-3) + (.mfpc a0-5 pcr1) + (+! (-> v1-6 accum1) a0-5) + ) + (label cfg-4) + 0 + 0 + (none) + ) diff --git a/goal_src/jak3/engine/spatial-hash/collide-hash-h.gc b/goal_src/jak3/engine/spatial-hash/collide-hash-h.gc index e30484cb27..72d9820f57 100644 --- a/goal_src/jak3/engine/spatial-hash/collide-hash-h.gc +++ b/goal_src/jak3/engine/spatial-hash/collide-hash-h.gc @@ -43,6 +43,7 @@ and a pointer to the actual collide-hash-fragment, or possibly a TIE." ((id uint32) (collidable basic) ) + :pack-me ) diff --git a/goal_src/jak3/engine/spatial-hash/collide-hash.gc b/goal_src/jak3/engine/spatial-hash/collide-hash.gc index d56b497989..4a6fd9bd34 100644 --- a/goal_src/jak3/engine/spatial-hash/collide-hash.gc +++ b/goal_src/jak3/engine/spatial-hash/collide-hash.gc @@ -5,5 +5,673 @@ ;; name in dgo: collide-hash ;; dgos: GAME +(defmacro .sll (result in sa) + `(set! ,result (sext32 (the-as int (shl (logand ,in #xffffffff) ,sa)))) + ) + ;; DECOMP BEGINS +;; WARN: Return type mismatch symbol vs none. +(defun add-collide-debug-box ((arg0 vector) (arg1 rgba)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (let ((a3-0 (new 'stack-no-clear 'bounding-box))) + (nop!) + (.lvf vf1 (&-> arg0 quad)) + (.sub.w.vf vf2 vf1 vf1) + (nop!) + (.add.w.vf vf3 vf1 vf1) + (nop!) + (nop!) + (.svf (&-> a3-0 min quad) vf2) + (nop!) + (.svf (&-> a3-0 max quad) vf3) + (add-debug-box #t (bucket-id debug) (-> a3-0 min) (-> a3-0 max) arg1) + ) + (none) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defun-debug print-collide-cache-tri-count () + (let ((gp-0 0) + (s4-0 0) + (s5-0 0) + (s3-0 0) + ) + (let ((v1-0 *collide-cache*)) + (dotimes (a0-0 (-> v1-0 num-tris)) + (case (-> v1-0 tris a0-0 pat mode) + (((pat-mode ground)) + (+! gp-0 1) + ) + (((pat-mode wall)) + (+! s5-0 1) + ) + (((pat-mode obstacle)) + (+! s4-0 1) + ) + (else + (+! s3-0 1) + ) + ) + ) + (format *stdcon* "tris ~d (~4,,1f%) " (-> v1-0 num-tris) (* 0.2173913 (the float (-> v1-0 num-tris)))) + ) + (format *stdcon* "(ground ~d, wall ~d, obstacle ~d, other ~d)~%" gp-0 s5-0 s4-0 s3-0) + ) + (none) + ) + +(defun-debug print-exceeded-max-cache-tris () + (with-pp + (when (not (or *already-printed-exeeded-max-cache-tris* *display-capture-mode*)) + (set! *already-printed-exeeded-max-cache-tris* #t) + (if pp + (format *stdcon* "Exceeded collide cache max # of tris (~s)!~%" (-> pp name)) + (format *stdcon* "Exceeded collide cache max # of tris!~%") + ) + (print-collide-cache-tri-count) + ) + 0 + (none) + ) + ) + +(defmethod-mips2c "(method 11 collide-hash)" 11 collide-hash) + +(defmethod-mips2c "(method 12 collide-hash)" 12 collide-hash) + +(def-mips2c fill-bg-using-box-new (function collide-cache object collide-query none)) + +(def-mips2c fill-bg-using-line-sphere-new (function collide-cache object collide-query none)) + +(defun collide-list-fill-bg-using-box ((arg0 collide-cache) (arg1 collide-list) (arg2 collide-query)) + (local-vars + (v1-12 uint128) + (v1-14 uint128) + (v1-15 uint128) + (a0-10 uint128) + (a0-11 uint128) + (a1-3 uint128) + (a2-3 uint128) + (a2-4 uint128) + (sv-16 int) + (sv-20 collide-list) + (sv-640 int) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf12 :class vf) + (vf13 :class vf) + (vf14 :class vf) + (vf16 :class vf) + (vf17 :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) + (set! sv-16 (-> arg1 num-items)) + (set! sv-20 arg1) + (dotimes (s4-0 sv-16) + (let ((s3-0 (-> sv-20 items s4-0 mesh))) + (cond + ((= (-> s3-0 type) instance-tie) + (let* ((v1-4 s3-0) + (s1-0 (-> v1-4 bucket-ptr)) + ) + (when (not (or (logtest? (-> s1-0 flags) (prototype-flags no-collide)) + (logtest? (-> v1-4 flags) (instance-flags no-collide)) + ) + ) + (if *collide-list-boxes* + (add-collide-debug-box (-> s3-0 bsphere) (new 'static 'rgba :r #xff :a #x80)) + ) + (let ((s0-0 (new 'stack-no-clear 'matrix)) + (s2-0 (new 'stack-no-clear 'collide-query)) + ) + (mem-copy! (the-as pointer s2-0) (the-as pointer arg2) 540) + (nop!) + (nop!) + (let ((v1-11 (the-as uint128 (-> s3-0 origin long 3)))) + (nop!) + (let ((a2-2 (the-as uint128 (-> s3-0 origin long 0)))) + (.pextlh v1-12 v1-11 0) + (let ((a0-9 (the-as uint128 (-> s3-0 origin long 1)))) + (.pw.sra a1-3 v1-12 10) + (let ((v1-13 (the-as uint128 (-> s3-0 origin long 2)))) + (.pextlh a2-3 a2-2 0) + (nop!) + (.pw.sra a2-4 a2-3 16) + (nop!) + (.pextlh a0-10 a0-9 0) + (.mov vf4 a1-3) + (.pw.sra a0-11 a0-10 16) + (.mov vf1 a2-4) + (.pextlh v1-14 v1-13 0) + ) + ) + ) + ) + (.mov vf2 a0-11) + (.pw.sra v1-15 v1-14 16) + (.lvf vf5 (&-> s3-0 bsphere quad)) + (nop!) + (.mov vf3 v1-15) + (.itof.vf vf4 vf4) + (nop!) + (vitof12.xyzw vf1 vf1) + (nop!) + (vitof12.xyzw vf2 vf2) + (nop!) + (vitof12.xyzw vf3 vf3) + (nop!) + (.add.vf vf4 vf4 vf5 :mask #b111) + (nop!) + (nop!) + (.svf (&-> s2-0 instance-mat rvec quad) vf1) + (nop!) + (.svf (&-> s2-0 instance-mat uvec quad) vf2) + (nop!) + (.svf (&-> s2-0 instance-mat fvec quad) vf3) + (nop!) + (.svf (&-> s2-0 instance-mat trans quad) vf4) + (matrix-4x4-inverse! s0-0 (-> s2-0 instance-mat)) + (nop!) + (nop!) + (.lvf vf7 (&-> arg2 bbox min quad)) + (nop!) + (.lvf vf14 (&-> arg2 bbox max quad)) + (nop!) + (.lvf vf1 (&-> s0-0 rvec quad)) + (nop!) + (.lvf vf2 (&-> s0-0 uvec quad)) + (nop!) + (.lvf vf3 (&-> s0-0 fvec quad)) + (nop!) + (.lvf vf4 (&-> s0-0 trans quad)) + (.mul.w.vf acc vf4 vf0) + (nop!) + (.add.mul.x.vf acc vf1 vf7 acc) + (nop!) + (.add.mul.y.vf acc vf2 vf7 acc) + (nop!) + (.add.mul.z.vf vf8 vf3 vf14 acc) + (nop!) + (.mul.w.vf acc vf4 vf0) + (nop!) + (.add.mul.x.vf acc vf1 vf7 acc) + (nop!) + (.add.mul.y.vf acc vf2 vf14 acc) + (nop!) + (.add.mul.z.vf vf9 vf3 vf7 acc) + (nop!) + (.mul.w.vf acc vf4 vf0) + (nop!) + (.add.mul.x.vf acc vf1 vf7 acc) + (nop!) + (.add.mul.y.vf acc vf2 vf14 acc) + (nop!) + (.add.mul.z.vf vf10 vf3 vf14 acc) + (nop!) + (.min.vf vf5 vf8 vf9) + (nop!) + (.max.vf vf6 vf8 vf9) + (nop!) + (.mul.w.vf acc vf4 vf0) + (nop!) + (.add.mul.x.vf acc vf1 vf14 acc) + (nop!) + (.add.mul.y.vf acc vf2 vf7 acc) + (nop!) + (.add.mul.z.vf vf11 vf3 vf7 acc) + (nop!) + (.min.vf vf5 vf5 vf10) + (nop!) + (.max.vf vf6 vf6 vf10) + (nop!) + (.mul.w.vf acc vf4 vf0) + (nop!) + (.add.mul.x.vf acc vf1 vf14 acc) + (nop!) + (.add.mul.y.vf acc vf2 vf7 acc) + (nop!) + (.add.mul.z.vf vf12 vf3 vf14 acc) + (nop!) + (.min.vf vf5 vf5 vf11) + (nop!) + (.max.vf vf6 vf6 vf11) + (nop!) + (.mul.w.vf acc vf4 vf0) + (nop!) + (.add.mul.x.vf acc vf1 vf14 acc) + (nop!) + (.add.mul.y.vf acc vf2 vf14 acc) + (nop!) + (.add.mul.z.vf vf13 vf3 vf7 acc) + (nop!) + (.min.vf vf5 vf5 vf12) + (nop!) + (.max.vf vf6 vf6 vf12) + (nop!) + (.mul.w.vf acc vf4 vf0) + (nop!) + (.add.mul.x.vf acc vf1 vf14 acc) + (nop!) + (.add.mul.y.vf acc vf2 vf14 acc) + (nop!) + (.add.mul.z.vf vf14 vf3 vf14 acc) + (nop!) + (.min.vf vf5 vf5 vf13) + (nop!) + (.max.vf vf6 vf6 vf13) + (nop!) + (.mul.w.vf acc vf4 vf0) + (nop!) + (.add.mul.x.vf acc vf1 vf7 acc) + (nop!) + (.add.mul.y.vf acc vf2 vf7 acc) + (nop!) + (.add.mul.z.vf vf7 vf3 vf7 acc) + (nop!) + (.min.vf vf5 vf5 vf14) + (nop!) + (.max.vf vf6 vf6 vf14) + (nop!) + (.min.vf vf5 vf5 vf7) + (nop!) + (.max.vf vf6 vf6 vf7) + (nop!) + (.ftoi.vf vf16 vf5) + (nop!) + (.ftoi.vf vf17 vf6) + (nop!) + (nop!) + (.svf (&-> s2-0 bbox min quad) vf5) + (nop!) + (.svf (&-> s2-0 bbox max quad) vf6) + (nop!) + (.svf (&-> s2-0 bbox4w min quad) vf16) + (nop!) + (.svf (&-> s2-0 bbox4w max quad) vf17) + (let ((s1-1 (-> s1-0 collide-hash-fragment-array))) + (set! sv-640 (-> s1-1 length)) + (set! (-> s2-0 instance-ptr) s3-0) + (dotimes (s3-1 sv-640) + ;; og:preserve-this + (set! (-> (scratchpad-object collide-hash-scratch) collidable-bits 0) (the-as uint128 0)) + (set! (-> (scratchpad-object collide-hash-scratch) collidable-bits 1) (the-as uint128 0)) + (set! (-> (scratchpad-object collide-hash-scratch) tris) (the-as uint 0)) + (fill-bg-using-box-new arg0 (-> s1-1 fragments s3-1) s2-0) + (+! (-> *collide-stats* tris) (-> (scratchpad-object collide-hash-scratch) tris)) + ) + ) + ) + ) + ) + ) + (else + (if *collide-list-boxes* + (add-collide-debug-box (-> s3-0 bsphere) (new 'static 'rgba :r #xff :g #xff :a #x80)) + ) + ;; og:preserve-this + (set! (-> (scratchpad-object collide-hash-scratch) collidable-bits 0) (the-as uint128 0)) + (set! (-> (scratchpad-object collide-hash-scratch) collidable-bits 1) (the-as uint128 0)) + (set! (-> arg2 instance-ptr) #f) + (set! (-> (scratchpad-object collide-hash-scratch) tris) (the-as uint 0)) + (fill-bg-using-box-new arg0 s3-0 arg2) + (+! (-> *collide-stats* tris) (-> (scratchpad-object collide-hash-scratch) tris)) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; ERROR: Unsupported inline assembly instruction kind - [sll v1, v1, 16] +(defun collide-list-fill-bg-using-line-sphere ((arg0 collide-cache) (arg1 collide-list) (arg2 collide-query)) + (local-vars + (v1-12 uint128) + (v1-14 uint128) + (v1-15 uint128) + (v1-17 number) + (v1-26 float) + (a0-10 uint128) + (a0-11 uint128) + (a1-3 uint128) + (a2-3 uint128) + (a2-4 uint128) + (sv-16 int) + (sv-640 int) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf10 :class vf) + (vf11 :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) + (set! sv-16 (-> arg1 num-items)) + (dotimes (s3-0 sv-16) + (let ((s2-0 (-> arg1 items s3-0 mesh))) + (cond + ((= (-> s2-0 type) instance-tie) + (let ((v1-4 s2-0)) + (when (not (or (logtest? (-> v1-4 bucket-ptr flags) (prototype-flags no-collide)) + (logtest? (-> v1-4 flags) (instance-flags no-collide)) + ) + ) + (if *collide-list-boxes* + (add-collide-debug-box (-> s2-0 bsphere) (new 'static 'rgba :r #xff :a #x80)) + ) + (let ((s0-0 (new 'stack-no-clear 'matrix)) + (s1-0 (new 'stack-no-clear 'collide-query)) + ) + (mem-copy! (the-as pointer s1-0) (the-as pointer arg2) 540) + (nop!) + (let ((v1-11 (the-as uint128 (-> s2-0 origin long 3)))) + (nop!) + (let ((a2-2 (the-as uint128 (-> s2-0 origin long 0)))) + (.pextlh v1-12 v1-11 0) + (let ((a0-9 (the-as uint128 (-> s2-0 origin long 1)))) + (.pw.sra a1-3 v1-12 10) + (let ((v1-13 (the-as uint128 (-> s2-0 origin long 2)))) + (.pextlh a2-3 a2-2 0) + (nop!) + (.pw.sra a2-4 a2-3 16) + (nop!) + (.pextlh a0-10 a0-9 0) + (.mov vf4 a1-3) + (.pw.sra a0-11 a0-10 16) + (.mov vf1 a2-4) + (.pextlh v1-14 v1-13 0) + ) + ) + ) + ) + (.mov vf2 a0-11) + (.pw.sra v1-15 v1-14 16) + (.lvf vf5 (&-> s2-0 bsphere quad)) + (nop!) + (.mov vf3 v1-15) + (.itof.vf vf4 vf4) + (nop!) + (vitof12.xyzw vf1 vf1) + (nop!) + (vitof12.xyzw vf2 vf2) + (nop!) + (vitof12.xyzw vf3 vf3) + (nop!) + (.add.vf vf4 vf4 vf5 :mask #b111) + (nop!) + (nop!) + (.svf (&-> s1-0 instance-mat rvec quad) vf1) + (nop!) + (.svf (&-> s1-0 instance-mat uvec quad) vf2) + (nop!) + (.svf (&-> s1-0 instance-mat fvec quad) vf3) + (nop!) + (.svf (&-> s1-0 instance-mat trans quad) vf4) + (matrix-4x4-inverse! s0-0 (-> s1-0 instance-mat)) + (nop!) + (nop!) + (.lvf vf7 (&-> arg2 start-pos quad)) + (nop!) + (.lvf vf8 (&-> arg2 move-dist quad)) + (nop!) + (.lvf vf1 (&-> s0-0 rvec quad)) + (nop!) + (.lvf vf2 (&-> s0-0 uvec quad)) + (nop!) + (.lvf vf3 (&-> s0-0 fvec quad)) + (nop!) + (.lvf vf4 (&-> s0-0 trans quad)) + (.add.vf vf8 vf7 vf8) + (let ((v1-16 (-> s2-0 rmin-scale))) + (.mul.x.vf acc vf1 vf7) + (let ((f2-0 (-> arg2 radius))) + (.add.mul.y.vf acc vf2 vf7 acc) + (.sll v1-17 v1-16 16) + (.add.mul.z.vf acc vf3 vf7 acc) + (let ((f1-0 (the-as float v1-17))) + (.add.mul.w.vf vf7 vf4 vf0 acc) + (nop!) + (.mul.x.vf acc vf1 vf8) + (let ((f2-1 (* f2-0 f1-0))) + (.add.mul.y.vf acc vf2 vf8 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf8 acc) + (nop!) + (.add.mul.w.vf vf8 vf4 vf0 acc) + (nop!) + (nop!) + (.svf (&-> s1-0 start-pos quad) vf7) + (.min.vf vf5 vf7 vf8) + (set! (-> s1-0 radius) f2-1) + ) + ) + ) + ) + (.max.vf vf6 vf7 vf8) + (nop!) + (nop!) + (.lvf vf9 (&-> s1-0 exit-planes 0 quad)) + (.sub.vf vf8 vf8 vf7) + (nop!) + (.sub.w.vf vf5 vf5 vf9) + (nop!) + (.add.w.vf vf6 vf6 vf9) + (nop!) + (nop!) + (.svf (&-> s1-0 move-dist quad) vf8) + (.ftoi.vf vf10 vf5) + (nop!) + (.ftoi.vf vf11 vf6) + (nop!) + (nop!) + (.svf (&-> s1-0 bbox min quad) vf5) + (nop!) + (.svf (&-> s1-0 bbox max quad) vf6) + (nop!) + (.svf (&-> s1-0 bbox4w min quad) vf10) + (nop!) + (.svf (&-> s1-0 bbox4w max quad) vf11) + (set! (-> s1-0 rlength x) (if (= (-> s1-0 move-dist x) 0.0) + 0.0 + (/ 1.0 (-> s1-0 move-dist x)) + ) + ) + (set! (-> s1-0 rlength y) (if (= (-> s1-0 move-dist y) 0.0) + 0.0 + (/ 1.0 (-> s1-0 move-dist y)) + ) + ) + (set! (-> s1-0 rlength z) (if (= (-> s1-0 move-dist z) 0.0) + 0.0 + (/ 1.0 (-> s1-0 move-dist z)) + ) + ) + (let ((f0-12 1.0)) + (.lvf vf1 (&-> (-> s1-0 move-dist) 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) + (set! (-> s1-0 rlength w) (/ f0-12 v1-26)) + ) + (set! (-> s1-0 exit-planes 0 x) (if (< 0.0 (-> s1-0 move-dist x)) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (set! (-> s1-0 exit-planes 0 y) (if (< 0.0 (-> s1-0 move-dist y)) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (set! (-> s1-0 exit-planes 0 z) (if (< 0.0 (-> s1-0 move-dist z)) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (set! (-> s1-0 exit-planes 1 x) (if (< (-> s1-0 move-dist x) 0.0) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (set! (-> s1-0 exit-planes 1 y) (if (< (-> s1-0 move-dist y) 0.0) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (set! (-> s1-0 exit-planes 1 z) (if (< (-> s1-0 move-dist z) 0.0) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (let ((s0-1 (-> s2-0 bucket-ptr collide-hash-fragment-array))) + (set! sv-640 (-> s0-1 length)) + (set! (-> s1-0 instance-ptr) s2-0) + (dotimes (s2-1 sv-640) + ;; og:preserve-this + (set! (-> (scratchpad-object collide-hash-scratch) collidable-bits 0) (the-as uint128 0)) + (set! (-> (scratchpad-object collide-hash-scratch) collidable-bits 1) (the-as uint128 0)) + (set! (-> (scratchpad-object collide-hash-scratch) tris) (the-as uint 0)) + (fill-bg-using-line-sphere-new arg0 (-> s0-1 fragments s2-1) s1-0) + (+! (-> *collide-stats* tris) (-> (scratchpad-object collide-hash-scratch) tris)) + ) + ) + ) + ) + ) + ) + (else + (if *collide-list-boxes* + (add-collide-debug-box (-> s2-0 bsphere) (new 'static 'rgba :r #xff :g #xff :a #x80)) + ) + ;; og:preserve-this + (set! (-> (scratchpad-object collide-hash-scratch) collidable-bits 0) (the-as uint128 0)) + (set! (-> (scratchpad-object collide-hash-scratch) collidable-bits 1) (the-as uint128 0)) + (set! (-> arg2 instance-ptr) #f) + (set! (-> (scratchpad-object collide-hash-scratch) tris) (the-as uint 0)) + (fill-bg-using-line-sphere-new arg0 s2-0 arg2) + (+! (-> *collide-stats* tris) (-> (scratchpad-object collide-hash-scratch) tris)) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod mem-usage ((this collide-hash) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 52 (-> usage length))) + (set! (-> usage data 51 name) "collision") + (+! (-> usage data 51 count) 1) + (let ((v1-8 (+ (* (-> this num-items) 8) 96 (* (-> this num-buckets) 4)))) + (+! (-> usage data 51 used) v1-8) + (+! (-> usage data 51 total) (logand -16 (+ v1-8 15))) + ) + (dotimes (v1-12 (the-as int (-> this qwc-id-bits))) + (set! (-> (scratchpad-object collide-hash-scratch) collidable-bits v1-12) (the-as uint128 0)) + ) + (dotimes (s3-0 (the-as int (-> this num-items))) + (let* ((a0-11 (-> this item-array s3-0 id)) + (v1-17 (shr a0-11 5)) + ) + ;; og:preserve-this + (when (not (logtest? (->(scratchpad-object collide-hash-scratch) id-bits v1-17) (ash 1 (the-as int (logand a0-11 31)))) + ) + (logior! (-> (scratchpad-object collide-hash-scratch) id-bits v1-17) (ash 1 (the-as int (logand a0-11 31)))) + (if (= (-> this item-array s3-0 collidable type) collide-hash-fragment) + (mem-usage (-> this item-array s3-0 collidable) usage flags) + ) + ) + ) + ) + this + ) + +(defmethod mem-usage ((this collide-hash-fragment) (usage memory-usage-block) (flags int)) + (cond + ((logtest? flags 1) + (set! (-> usage length) (max 59 (-> usage length))) + (set! (-> usage data 56 name) "prototype-fragment") + (+! (-> usage data 56 count) 1) + (set! (-> usage data 57 name) "prototype-poly") + (+! (-> usage data 57 count) (-> this stats num-polys)) + (set! (-> usage data 58 name) "prototype-vertex") + (+! (-> usage data 58 count) (-> this stats num-verts)) + (let ((a3-0 (+ (-> this num-indices) 112 (* (-> this num-buckets) 4))) + (a2-6 (* (-> this stats num-polys) 4)) + (v1-16 (* (the-as uint 6) (-> this stats num-verts))) + ) + (+! (-> usage data 56 used) a3-0) + (+! (-> usage data 56 total) (- (logand -16 (+ v1-16 15 a2-6 a3-0)) (the-as int (+ a2-6 v1-16)))) + (+! (-> usage data 57 used) a2-6) + (+! (-> usage data 57 total) a2-6) + (+! (-> usage data 58 used) v1-16) + (+! (-> usage data 58 total) v1-16) + ) + ) + (else + (set! (-> usage length) (max 55 (-> usage length))) + (set! (-> usage data 52 name) "collision-fragment") + (+! (-> usage data 52 count) 1) + (set! (-> usage data 53 name) "collision-poly") + (+! (-> usage data 53 count) (-> this stats num-polys)) + (set! (-> usage data 54 name) "collision-vertex") + (+! (-> usage data 54 count) (-> this stats num-verts)) + (let ((a3-8 (+ (-> this num-indices) 112 (* (-> this num-buckets) 4))) + (a2-16 (* (-> this stats num-polys) 4)) + (v1-33 (* (the-as uint 6) (-> this stats num-verts))) + ) + (+! (-> usage data 52 used) a3-8) + (+! (-> usage data 52 total) (- (logand -16 (+ v1-33 15 a2-16 a3-8)) (the-as int (+ a2-16 v1-33)))) + (+! (-> usage data 53 used) a2-16) + (+! (-> usage data 53 total) a2-16) + (+! (-> usage data 54 used) v1-33) + (+! (-> usage data 54 total) v1-33) + ) + ) + ) + this + ) + +(defmethod mem-usage ((this collide-hash-fragment-array) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 56 (-> usage length))) + (set! (-> usage data 55 name) "prototype-collision") + (+! (-> usage data 55 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 55 used) v1-6) + (+! (-> usage data 55 total) (logand -16 (+ v1-6 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this fragments s3-0) usage flags) + ) + this + ) 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 8e69a1027f..713e8ae4fa 100644 --- a/goal_src/jak3/engine/spatial-hash/spatial-hash-h.gc +++ b/goal_src/jak3/engine/spatial-hash/spatial-hash-h.gc @@ -76,6 +76,24 @@ O(n^2) 'check everybody against everybody' collision loop." ) ) +;; og:preserve-this added +(deftype nav-stack-type (structure) + "nav-mesh::12" + ((nav-id-params find-nav-sphere-ids-params :inline :offset 0) + (vec1 vector :inline :offset 32) + (vec2 vector :inline :offset 48) + (vec3 vector :inline :offset 64) + (byte01 int8 :offset 64) + (byte02 int8 :offset 65) + (byte03 int8 :offset 66) + (byte04 int8 :offset 67) + (vec4 vector :inline :offset 80) + (vec5 vector :inline :offset 96) + (vec6 vector :inline :offset 112) + (byte-arr uint8 20 :offset 128) + ) + ) + (deftype sphere-hash (grid-hash) "An extension of grid hash that holds spheres inside of the grid." @@ -91,8 +109,8 @@ O(n^2) 'check everybody against everybody' collision loop." (add-a-sphere (_type_ vector) int) (add-a-sphere-with-flag (_type_ vector int) int) (update-from-spheres (_type_) none) - (sphere-hash-method-29 (_type_ find-nav-sphere-ids-params int int int) none) - (find-nav-sphere-ids (_type_ find-nav-sphere-ids-params) none) + (sphere-hash-method-29 (_type_ find-nav-sphere-ids-params) none) + (find-nav-sphere-ids (_type_ find-nav-sphere-ids-params int int) symbol) (add-sphere-with-mask-and-id (_type_ vector int int) symbol) (sphere-hash-method-32 (_type_ sphere int) symbol) ) @@ -113,10 +131,10 @@ O(n^2) 'check everybody against everybody' collision loop." ) (:methods (new (symbol type int int) _type_) - (spatial-hash-method-33 () none) - (add-an-object (_type_ vector hash-object-info) int) + (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-sphere (_type_ sphere (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) (spatial-hash-method-39 (_type_ object hash-object-info) int) diff --git a/goal_src/jak3/engine/spatial-hash/spatial-hash.gc b/goal_src/jak3/engine/spatial-hash/spatial-hash.gc index ae542e474d..d008573423 100644 --- a/goal_src/jak3/engine/spatial-hash/spatial-hash.gc +++ b/goal_src/jak3/engine/spatial-hash/spatial-hash.gc @@ -7,3 +7,898 @@ ;; DECOMP BEGINS +(deftype grid-hash-work (basic) + ((result-words uint8 32 :offset 16) + (result-bits uint8 32 :overlay-at (-> result-words 0)) + (object-id int32) + (temp-box-min vector :inline) + (temp-box-max vector :inline) + (visit-count int32) + (temp-time uint32) + (queue-object-time uint32) + (make-hash-time uint32) + (search-time uint32) + (add-object-time uint32) + ) + ) + + +(define *grid-hash-work* (new 'static 'grid-hash-work)) + +;; WARN: Return type mismatch object vs grid-hash. +(defmethod new grid-hash ((allocation symbol) (type-to-make type) (arg0 int)) + (let ((gp-0 (the-as object (object-new allocation type-to-make (the-as int (-> type-to-make size)))))) + (when (zero? (the-as grid-hash gp-0)) + (set! gp-0 0) + (goto cfg-4) + ) + (set! (-> (the-as grid-hash gp-0) work) *grid-hash-work*) + (set! (-> (the-as grid-hash gp-0) object-count) 0) + (set! (-> (the-as grid-hash gp-0) bucket-memory-size) arg0) + (set! (-> (the-as grid-hash gp-0) vertical-cell-count) 1) + (set! (-> (the-as grid-hash gp-0) min-cell-size) 16384.0) + (set! (-> (the-as grid-hash gp-0) mem-bucket-array) + (the-as (pointer grid-hash-word) (malloc allocation arg0)) + ) + (set! (-> (the-as grid-hash gp-0) spr-bucket-array) (the-as (pointer grid-hash-word) #x70000000)) + (set! (-> (the-as grid-hash gp-0) bucket-array) (-> (the-as grid-hash gp-0) mem-bucket-array)) + (set! (-> (the-as grid-hash gp-0) debug-draw) #f) + (set! (-> (the-as grid-hash gp-0) use-scratch-ram) #f) + (label cfg-4) + (the-as grid-hash gp-0) + ) + ) + +(defmethod verify-bits-in-bucket ((this grid-hash) (arg0 grid-hash-box) (arg1 grid-hash-box)) + (let ((s5-0 0)) + 0 + (let ((v1-1 8) + (a0-1 (-> this object-count)) + (a1-2 (* (-> this bucket-size) 8)) + ) + (while (< a0-1 a1-2) + (let ((a3-0 (- a0-1 (* (/ a0-1 v1-1) v1-1)))) + (set! s5-0 (logior s5-0 (ash 1 a3-0))) + ) + (+! a0-1 1) + ) + ) + (dotimes (s4-0 (-> this bucket-count)) + (let ((a3-2 (-> this bucket-array (+ (-> this bucket-size) -1 (* s4-0 (-> this bucket-size)))))) + (when (logtest? a3-2 s5-0) + (format 0 "bad bits in bucket ~d bucket-word ~8x test-word ~8x~%" s4-0 a3-2 s5-0) + (break!) + 0 + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod box-of-everything ((this grid-hash) (arg0 object) (arg1 grid-hash-box)) + (dotimes (v1-0 3) + (set! (-> arg1 min v1-0) (-> this dimension-array v1-0)) + (set! (-> arg1 max v1-0) -1) + ) + (let* ((v1-3 (-> this bucket-size)) + (a3-4 (* (-> this dimension-array 0) v1-3)) + (t0-3 (* (-> this dimension-array 2) a3-4)) + (t1-0 (-> this dimension-array 0)) + (t2-0 (-> this dimension-array 2)) + (t3-0 (-> this dimension-array 1)) + (a0-2 (&-> (-> this bucket-array) (/ (the-as int arg0) 8))) + (a1-2 (ash 1 (logand (the-as int arg0) 7))) + ) + (dotimes (t4-3 t3-0) + (let ((t5-0 a0-2)) + (dotimes (t6-0 t2-0) + (let ((t7-0 t5-0)) + (dotimes (t8-0 t1-0) + (when (logtest? (-> t7-0 0) a1-2) + (set! (-> arg1 min 0) (min (-> arg1 min 0) t8-0)) + (set! (-> arg1 min 1) (min (-> arg1 min 1) t4-3)) + (set! (-> arg1 min 2) (min (-> arg1 min 2) t6-0)) + (set! (-> arg1 max 0) (max (-> arg1 max 0) t8-0)) + (set! (-> arg1 max 1) (max (-> arg1 max 1) t4-3)) + (set! (-> arg1 max 2) (max (-> arg1 max 2) t6-0)) + ) + (&+! t7-0 v1-3) + ) + ) + (&+! t5-0 a3-4) + ) + ) + (&+! a0-2 t0-3) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs symbol. +(defun-debug validate-bucket-bits ((arg0 grid-hash) (arg1 (pointer grid-hash-word))) + (let ((s3-0 (-> arg0 object-count)) + (s2-0 (* (-> arg0 bucket-size) 8)) + (gp-0 0) + (s5-0 0) + ) + (while (< s3-0 s2-0) + (let* ((s1-0 (/ s3-0 8)) + (a0-1 (- s3-0 (* s1-0 8))) + ) + (when (logtest? (-> arg1 s1-0) (ash 1 a0-1)) + (format 0 "bit ~d, " s3-0) + (+! gp-0 1) + (set! s5-0 (the-as int (-> arg1 s1-0))) + ) + ) + (+! s3-0 1) + ) + (when (> gp-0 0) + (format 0 "~%~d bad bits found~%" gp-0) + (format 0 "bad-word ~x~%" s5-0) + (break!) + 0 + ) + ) + (the-as symbol 0) + ) + +(defmethod-mips2c "(method 18 grid-hash)" 18 grid-hash) + +(defmethod-mips2c "(method 19 grid-hash)" 19 grid-hash) + +(defmethod-mips2c "(method 20 grid-hash)" 20 grid-hash) + +(defmethod set-up-box ((this grid-hash) (arg0 grid-hash-box) (arg1 vector) (arg2 vector)) + (dotimes (v1-0 3) + (set! (-> arg0 min v1-0) + (the int + (fmax + 0.0 + (fmin + (* (- (-> arg1 data v1-0) (-> this box-min v1-0)) (-> this axis-scale v1-0)) + (the float (+ (-> this dimension-array v1-0) -1)) + ) + ) + ) + ) + (set! (-> arg0 max v1-0) + (the int (fmax 0.0 (fmin + (* (- (-> arg2 data v1-0) (-> this box-min v1-0)) (-> this axis-scale v1-0)) + (the float (+ (-> this dimension-array v1-0) -1)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod-mips2c "(method 22 grid-hash)" 22 grid-hash) + +(defmethod line-sphere-to-grid-box ((this grid-hash) (arg0 grid-hash-box) (arg1 vector) (arg2 vector) (arg3 float)) + (let ((s4-0 (new 'stack-no-clear 'grid-hash-box)) + (s5-0 (new 'stack-no-clear 'grid-hash-box)) + ) + (let ((v1-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-0 quad) (-> arg1 quad)) + (vector+! s2-0 arg1 arg2) + (set! (-> v1-0 w) arg3) + (set! (-> s2-0 w) arg3) + (sphere-to-grid-box this s4-0 (the-as sphere v1-0)) + (sphere-to-grid-box this s5-0 (the-as sphere s2-0)) + ) + (set! (-> arg0 min 0) (min (-> s4-0 min 0) (-> s5-0 min 0))) + (set! (-> arg0 min 1) (min (-> s4-0 min 1) (-> s5-0 min 1))) + (set! (-> arg0 min 2) (min (-> s4-0 min 2) (-> s5-0 min 2))) + (set! (-> arg0 max 0) (max (-> s4-0 max 0) (-> s5-0 max 0))) + (set! (-> arg0 max 1) (max (-> s4-0 max 1) (-> s5-0 max 1))) + (set! (-> arg0 max 2) (max (-> s4-0 max 2) (-> s5-0 max 2))) + ) + 0 + (none) + ) + +(defmethod clear-bucket-array ((this grid-hash)) + (let ((v1-5 (/ (+ (* (* (* (-> this dimension-array 0) (-> this dimension-array 1)) (-> this dimension-array 2)) + (-> this bucket-size) + ) + 15 + ) + 16 + ) + ) + (a0-1 (the-as (pointer uinteger) (-> this bucket-array))) + ) + (while (nonzero? v1-5) + (+! v1-5 -1) + (set! (-> (the-as (pointer uint128) a0-1) 0) (the-as uint128 0)) + (set! a0-1 (&-> (the-as (pointer grid-hash-word) a0-1) 16)) + ) + ) + 0 + (none) + ) + +(defmethod update-grid ((this grid-hash)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (dotimes (a0-1 3) + (set! (-> v1-0 data a0-1) (fmax (-> this min-cell-size) (- (-> this box-max a0-1) (-> this box-min a0-1)))) + ) + (b! + (and (> (-> this object-count) 0) (< 0.0 (-> v1-0 x)) (< 0.0 (-> v1-0 y)) (< 0.0 (-> v1-0 z))) + cfg-23 + :delay (empty-form) + ) + (set! (-> this bucket-count) 1) + (set! (-> this bucket-size) 1) + (dotimes (v1-3 3) + (set! (-> this box-min v1-3) 0.0) + (set! (-> this box-max v1-3) 0.0) + (set! (-> this axis-scale v1-3) 0.0) + (set! (-> this dimension-array v1-3) 1) + ) + (let ((v1-11 + (/ (+ (* (* (* (-> this dimension-array 0) (-> this dimension-array 1)) (-> this dimension-array 2)) + (-> this bucket-size) + ) + 15 + ) + 16 + ) + ) + (a0-19 (the-as (pointer uinteger) (-> this bucket-array))) + ) + (while (nonzero? v1-11) + (+! v1-11 -1) + (set! (-> (the-as (pointer uint128) a0-19) 0) (the-as uint128 0)) + (set! a0-19 (&-> (the-as (pointer grid-hash-word) a0-19) 16)) + ) + ) + 0 + (b! #t cfg-46 :delay (nop!)) + (label cfg-23) + (let ((a0-20 8)) + (set! (-> this bucket-size) (/ (+ a0-20 -1 (-> this object-count)) a0-20)) + ) + (set! (-> this bucket-count) + (min (* (-> this object-count) 16) (/ (-> this bucket-memory-size) (-> this bucket-size))) + ) + (let ((f0-11 + (sqrtf + (/ (the float (-> this bucket-count)) (* (-> v1-0 x) (-> v1-0 z) (the float (-> this vertical-cell-count)))) + ) + ) + ) + (let ((a0-29 (min 126 (+ (-> this bucket-count) -1)))) + (set! (-> this dimension-array 0) (max 1 (min (the int (* f0-11 (-> v1-0 x))) a0-29))) + (set! (-> this dimension-array 1) (-> this vertical-cell-count)) + (set! (-> this dimension-array 2) (max 1 (min (the int (* f0-11 (-> v1-0 z))) a0-29))) + ) + (let* ((f1-15 (* f0-11 (-> v1-0 z))) + (f1-17 (- f1-15 (the float (the int f1-15)))) + (f0-12 (* f0-11 (-> v1-0 x))) + ) + (cond + ((< f1-17 (- f0-12 (the float (the int f0-12)))) + (if (>= (-> this bucket-count) + (* (* (+ (-> this dimension-array 0) 1) (-> this dimension-array 1)) (-> this dimension-array 2)) + ) + (+! (-> this dimension-array 0) 1) + ) + ) + (else + (if (>= (-> this bucket-count) + (* (* (-> this dimension-array 0) (-> this dimension-array 1)) (+ (-> this dimension-array 2) 1)) + ) + (+! (-> this dimension-array 2) 1) + ) + ) + ) + ) + ) + (dotimes (a0-42 2) + (let* ((a1-26 (* a0-42 2)) + (a2-12 (max 1 (the int (/ (-> v1-0 data a1-26) (-> this min-cell-size))))) + ) + (set! (-> (the-as (pointer uint8) (+ a1-26 (the-as int this))) 24) + (the-as uint (min (-> (the-as (pointer int8) (+ a1-26 (the-as int this))) 24) a2-12)) + ) + ) + ) + (dotimes (a0-45 3) + (set! (-> this axis-scale a0-45) (/ (the float (-> this dimension-array a0-45)) (-> v1-0 data a0-45))) + ) + ) + (let ((a2-13 (* (* (-> this dimension-array 0) (-> this dimension-array 1)) (-> this dimension-array 2)))) + (b! (< (-> this bucket-count) a2-13) cfg-40) + (let* ((v1-20 this) + (a0-53 + (/ (+ (* (* (* (-> v1-20 dimension-array 0) (-> v1-20 dimension-array 1)) (-> v1-20 dimension-array 2)) + (-> v1-20 bucket-size) + ) + 15 + ) + 16 + ) + ) + (v1-21 (the-as (pointer uinteger) (-> v1-20 bucket-array))) + ) + (while (nonzero? a0-53) + (+! a0-53 -1) + (set! (-> (the-as (pointer uint128) v1-21) 0) (the-as uint128 0)) + (set! v1-21 (&-> (the-as (pointer grid-hash-word) v1-21) 16)) + ) + ) + 0 + (b! #t cfg-46 :delay (nop!)) + (label cfg-40) + (when *debug-segment* + (format + *stdcon* + "grid-hash::update-grid: bucket overflow! ~d dim ~d ~d ~d~%" + a2-13 + (-> this dimension-array 0) + (-> this dimension-array 1) + (-> this dimension-array 2) + ) + (break!) + 0 + ) + ) + (set! (-> this bucket-count) 1) + (set! (-> this bucket-size) 1) + (dotimes (v1-30 3) + (set! (-> this axis-scale v1-30) 0.0) + (set! (-> this dimension-array v1-30) 1) + ) + (label cfg-46) + 0 + (none) + ) + +(defmethod update-grid-for-objects-in-box ((this grid-hash) (arg0 int) (arg1 vector) (arg2 vector)) + (set! (-> this object-count) arg0) + (dotimes (v1-0 3) + (set! (-> this box-min v1-0) (-> arg1 data v1-0)) + (set! (-> this box-max v1-0) (-> arg2 data v1-0)) + ) + (update-grid this) + 0 + (none) + ) + +(defmethod setup-search-box ((this grid-hash) (arg0 int) (arg1 vector) (arg2 vector) (arg3 vector)) + (let ((v1-0 (new 'stack-no-clear 'vector)) + (t1-0 (new 'stack-no-clear 'vector)) + ) + (dotimes (t2-0 3) + (set! (-> v1-0 data t2-0) (fmin (fmin (-> arg1 data t2-0) (-> arg2 data t2-0)) (-> arg3 data t2-0))) + (set! (-> t1-0 data t2-0) (fmax (fmax (-> arg1 data t2-0) (-> arg2 data t2-0)) (-> arg3 data t2-0))) + ) + (let ((a2-3 this) + (a3-1 (-> this search-box)) + ) + (dotimes (t0-1 3) + (set! (-> a3-1 min t0-1) + (the int + (fmax + 0.0 + (fmin + (* (- (-> v1-0 data t0-1) (-> a2-3 box-min t0-1)) (-> a2-3 axis-scale t0-1)) + (the float (+ (-> a2-3 dimension-array t0-1) -1)) + ) + ) + ) + ) + (set! (-> a3-1 max t0-1) + (the int (fmax 0.0 (fmin + (* (- (-> t1-0 data t0-1) (-> a2-3 box-min t0-1)) (-> a2-3 axis-scale t0-1)) + (the float (+ (-> a2-3 dimension-array t0-1) -1)) + ) + ) + ) + ) + ) + ) + ) + 0 + (set! (-> this work object-id) arg0) + (let* ((t1-1 this) + (t2-21 (-> this search-box)) + (a3-2 arg0) + (v1-5 (-> t1-1 bucket-size)) + (a0-2 (* (-> t1-1 dimension-array 0) v1-5)) + (a1-2 (* (-> t1-1 dimension-array 2) a0-2)) + (a2-6 (+ (- 1 (-> t2-21 min 0)) (-> t2-21 max 0))) + (t0-6 (+ (- 1 (-> t2-21 min 2)) (-> t2-21 max 2))) + (t3-22 (+ (- 1 (-> t2-21 min 1)) (-> t2-21 max 1))) + (t1-3 (the-as + object + (+ (+ (* (-> t2-21 min 0) v1-5) (* (-> t2-21 min 1) a1-2) (* (-> t2-21 min 2) a0-2) (/ a3-2 8) 0) + (the-as int (the-as pointer (-> t1-1 bucket-array))) + ) + ) + ) + (a3-4 (ash 1 (logand a3-2 7))) + (t2-28 t3-22) + ) + (label cfg-10) + (let ((t3-23 t0-6) + (t4-6 t1-3) + ) + (label cfg-11) + (let ((t5-2 a2-6) + (t6-0 t4-6) + ) + (label cfg-12) + (nop!) + (let ((t7-0 (-> (the-as (pointer uint8) t6-0)))) + (nop!) + (let ((t7-1 (logior t7-0 a3-4))) + (+! t5-2 -1) + (set! (-> (the-as (pointer uint8) t6-0)) t7-1) + ) + ) + ;; og:preserve-this + (b! (nonzero? t5-2) cfg-12 :delay (set! t6-0 (&+ (the-as pointer t6-0) v1-5))) + ) + (+! t3-23 -1) + (nop!) + ;; og:preserve-this + (b! (nonzero? t3-23) cfg-11 :delay (set! t4-6 (&+ (the-as pointer t4-6) a0-2))) + ) + (+! t2-28 -1) + (nop!) + ;; og:preserve-this + (b! (nonzero? t2-28) cfg-10 :delay (set! t1-3 (&+ (the-as pointer t1-3) a1-2))) + ) + 0 + 0 + (none) + ) + +(defmethod search-for-point ((this grid-hash) (arg0 vector)) + (let ((v1-0 this) + (a0-1 (-> this search-box)) + (a2-0 arg0) + ) + (dotimes (a3-0 3) + (set! (-> a0-1 min a3-0) + (the int + (fmax + 0.0 + (fmin + (* (- (-> a2-0 data a3-0) (-> v1-0 box-min a3-0)) (-> v1-0 axis-scale a3-0)) + (the float (+ (-> v1-0 dimension-array a3-0) -1)) + ) + ) + ) + ) + (set! (-> a0-1 max a3-0) + (the int (fmax 0.0 (fmin + (* (- (-> arg0 data a3-0) (-> v1-0 box-min a3-0)) (-> v1-0 axis-scale a3-0)) + (the float (+ (-> v1-0 dimension-array a3-0) -1)) + ) + ) + ) + ) + ) + ) + 0 + (do-search! this (-> this search-box) (-> this work result-words)) + (-> this work result-words) + ) + +;; WARN: Found some very strange gotos. Check result carefully, this is not well tested. +(defmethod search-for-sphere ((this grid-hash) (arg0 vector) (arg1 float)) + (let ((v1-0 (new 'stack-no-clear 'sphere))) + (set! (-> v1-0 quad) (-> arg0 quad)) + (set! (-> v1-0 r) arg1) + (sphere-to-grid-box this (-> this search-box) v1-0) + ) + (let ((s5-0 (-> this work result-words)) + (s4-0 0) + ) + (label cfg-1) + (do-search! this (-> this search-box) s5-0) + (dotimes (v1-5 (-> this bucket-size)) + (set! s4-0 (logior s4-0 (-> s5-0 v1-5))) + ) + (when (zero? s4-0) + (when (or (> (-> this search-box min 0) 0) + (> (-> this search-box min 2) 0) + (< (-> this search-box max 0) (+ (-> this dimension-array 0) -1)) + (< (-> this search-box max 2) (+ (-> this dimension-array 2) -1)) + ) + (set! (-> this search-box min 0) (max 0 (+ (-> this search-box min 0) -1))) + (set! (-> this search-box min 2) (max 0 (+ (-> this search-box min 2) -1))) + (set! (-> this search-box max 0) (min (+ (-> this dimension-array 0) -1) (+ (-> this search-box max 0) 1))) + (set! (-> this search-box max 2) (min (+ (-> this dimension-array 2) -1) (+ (-> this search-box max 2) 1))) + (goto cfg-1) + ) + ) + ) + (-> this work result-words) + ) + +(defun-debug draw-grid ((arg0 vector) (arg1 vector) (arg2 (pointer int8)) (arg3 rgba)) + (local-vars (sv-64 vector) (sv-68 vector) (sv-72 vector)) + (set! sv-64 (new 'stack-no-clear 'vector)) + (set! sv-68 (new 'stack-no-clear 'vector)) + (set! sv-72 (new 'stack-no-clear 'vector)) + (dotimes (v1-3 3) + (set! (-> sv-64 data v1-3) (/ (- (-> arg1 data v1-3) (-> arg0 data v1-3)) (the float (-> arg2 v1-3)))) + ) + (set! (-> sv-68 x) (-> arg0 x)) + (set! (-> sv-72 x) (-> arg1 x)) + (dotimes (s2-0 (+ (-> arg2 1) 1)) + (set! (-> sv-68 y) (+ (-> arg0 y) (* (the float s2-0) (-> sv-64 y)))) + (set! (-> sv-72 y) (-> sv-68 y)) + (dotimes (s1-0 (+ (-> arg2 2) 1)) + (set! (-> sv-68 z) (+ (-> arg0 z) (* (the float s1-0) (-> sv-64 z)))) + (set! (-> sv-72 z) (-> sv-68 z)) + (add-debug-line #t (bucket-id debug) sv-68 sv-72 arg3 #f (the-as rgba -1)) + ) + ) + (set! (-> sv-68 z) (-> arg0 z)) + (set! (-> sv-72 z) (-> arg1 z)) + (dotimes (s2-1 (+ (-> arg2 1) 1)) + (set! (-> sv-68 y) (+ (-> arg0 y) (* (the float s2-1) (-> sv-64 y)))) + (set! (-> sv-72 y) (-> sv-68 y)) + (dotimes (s1-1 (+ (-> arg2 0) 1)) + (set! (-> sv-68 x) (+ (-> arg0 x) (* (the float s1-1) (-> sv-64 x)))) + (set! (-> sv-72 x) (-> sv-68 x)) + (add-debug-line #t (bucket-id debug) sv-68 sv-72 arg3 #f (the-as rgba -1)) + ) + ) + (set! (-> sv-68 y) (-> arg0 y)) + (set! (-> sv-72 y) (-> arg1 y)) + (dotimes (s3-1 (+ (-> arg2 0) 1)) + (set! (-> sv-68 x) (+ (-> arg0 x) (* (the float s3-1) (-> sv-64 x)))) + (set! (-> sv-72 x) (-> sv-68 x)) + (dotimes (s2-2 (+ (-> arg2 2) 1)) + (set! (-> sv-68 z) (+ (-> arg0 z) (* (the float s2-2) (-> sv-64 z)))) + (set! (-> sv-72 z) (-> sv-68 z)) + (add-debug-line #t (bucket-id debug) sv-68 sv-72 arg3 #f (the-as rgba -1)) + ) + ) + 0 + (none) + ) + +(defmethod draw ((this grid-hash) (arg0 rgba)) + (let ((v1-0 (new 'stack-no-clear 'vector)) + (t0-0 (new 'stack-no-clear 'vector)) + ) + (dotimes (a2-0 3) + (set! (-> v1-0 data a2-0) (-> this box-min a2-0)) + (set! (-> t0-0 data a2-0) (-> this box-max a2-0)) + ) + (draw-grid v1-0 t0-0 (-> this dimension-array) arg0) + ) + 0 + (none) + ) + +(defmethod dump-grid-info ((this grid-hash)) + (if (-> this debug-draw) + (draw this *color-light-blue*) + ) + (format + *stdcon* + "bucket memory ~d, bucket-size ~d, word-size ~d bits~%" + (-> this bucket-memory-size) + (-> this bucket-size) + 8 + ) + (format + *stdcon* + "bucket dimensions ~d ~d ~d~%" + (-> this dimension-array 0) + (-> this dimension-array 1) + (-> this dimension-array 2) + ) + (format *stdcon* "object-count ~d, bucket-count ~d~%" (-> this object-count) (-> this bucket-count)) + 0 + (none) + ) + +(defun-debug draw-sphere-box ((arg0 sphere) (arg1 rgba)) + (let ((a2-0 (new 'stack-no-clear 'vector)) + (a3-0 (new 'stack-no-clear 'vector)) + ) + (dotimes (v1-0 3) + (set! (-> a2-0 data v1-0) (- (-> arg0 data v1-0) (-> arg0 r))) + (set! (-> a3-0 data v1-0) (+ (-> arg0 data v1-0) (-> arg0 r))) + ) + (add-debug-box #t (bucket-id debug-no-zbuf1) a2-0 a3-0 arg1) + ) + 0 + (none) + ) + +(defun-debug draw-line-sphere ((arg0 vector) (arg1 vector) (arg2 float) (arg3 rgba)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector+! gp-0 arg0 arg1) + (add-debug-sphere #t (bucket-id debug-no-zbuf1) arg0 arg2 arg3) + (add-debug-sphere #t (bucket-id debug-no-zbuf1) gp-0 arg2 arg3) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs sphere-hash. +(defmethod new sphere-hash ((allocation symbol) (type-to-make type) (arg0 int) (arg1 int)) + (let ((s5-0 (the-as object (object-new allocation type-to-make (the-as int (-> type-to-make size)))))) + (when (zero? (the-as sphere-hash s5-0)) + (set! s5-0 0) + (goto cfg-4) + ) + (set! (-> (the-as sphere-hash s5-0) work) *grid-hash-work*) + (set! (-> (the-as sphere-hash s5-0) object-count) 0) + (set! (-> (the-as sphere-hash s5-0) bucket-memory-size) arg0) + (set! (-> (the-as sphere-hash s5-0) vertical-cell-count) 1) + (set! (-> (the-as sphere-hash s5-0) min-cell-size) 16384.0) + (set! (-> (the-as sphere-hash s5-0) mem-bucket-array) + (the-as (pointer grid-hash-word) (malloc allocation arg0)) + ) + (set! (-> (the-as sphere-hash s5-0) spr-bucket-array) (the-as (pointer grid-hash-word) #x70000000)) + (set! (-> (the-as sphere-hash s5-0) bucket-array) (-> (the-as sphere-hash s5-0) mem-bucket-array)) + (set! (-> (the-as sphere-hash s5-0) debug-draw) #f) + (set! (-> (the-as sphere-hash s5-0) use-scratch-ram) #f) + (set! (-> (the-as sphere-hash s5-0) max-object-count) arg1) + (set! (-> (the-as sphere-hash s5-0) mem-sphere-array) (the-as uint (malloc allocation (* arg1 16)))) + (set! (-> (the-as sphere-hash s5-0) spr-sphere-array) (the-as uint (+ #x70000000 arg0))) + (set! (-> (the-as sphere-hash s5-0) sphere-array) + (the-as (inline-array sphere) (-> (the-as sphere-hash s5-0) mem-sphere-array)) + ) + (label cfg-4) + (the-as sphere-hash s5-0) + ) + ) + +(defmethod clear-objects! ((this sphere-hash)) + (set! (-> this object-count) 0) + (dotimes (v1-0 3) + (set! (-> this box-min v1-0) 10000000000000000000000000000000000000.0) + (set! (-> this box-max v1-0) -10000000000000000000000000000000000000.0) + ) + (cond + ((-> this use-scratch-ram) + (set! (-> this sphere-array) (the-as (inline-array sphere) (-> this spr-sphere-array))) + (set! (-> this bucket-array) (-> this spr-bucket-array)) + ) + (else + (set! (-> this sphere-array) (the-as (inline-array sphere) (-> this mem-sphere-array))) + (set! (-> this bucket-array) (-> this mem-bucket-array)) + ) + ) + 0 + (none) + ) + +(defmethod-mips2c "(method 28 sphere-hash)" 28 sphere-hash) + +(defmethod add-a-sphere ((this sphere-hash) (arg0 vector)) + (let ((gp-0 (-> this object-count))) + (cond + ((< gp-0 (-> this max-object-count)) + (let ((a0-2 (-> this sphere-array gp-0))) + (mem-copy! (the-as pointer a0-2) (the-as pointer arg0) 16) + ) + (dotimes (v1-2 3) + (set! (-> this box-min v1-2) (fmin (-> this box-min v1-2) (- (-> arg0 data v1-2) (-> arg0 w)))) + (set! (-> this box-max v1-2) (fmax (-> this box-max v1-2) (+ (-> arg0 data v1-2) (-> arg0 w)))) + ) + (+! (-> this object-count) 1) + gp-0 + ) + (else + -1 + ) + ) + ) + ) + +(defmethod add-a-sphere-with-flag ((this sphere-hash) (arg0 vector) (arg1 int)) + (let ((gp-0 (-> this object-count))) + (cond + ((< gp-0 (-> this max-object-count)) + (let ((s2-0 (the-as object (-> this sphere-array gp-0)))) + (mem-copy! (the-as pointer s2-0) (the-as pointer arg0) 16) + (dotimes (v1-2 3) + (set! (-> this box-min v1-2) (fmin (-> this box-min v1-2) (- (-> arg0 data v1-2) (-> arg0 w)))) + (set! (-> this box-max v1-2) (fmax (-> this box-max v1-2) (+ (-> arg0 data v1-2) (-> arg0 w)))) + ) + (set! (-> (the-as (pointer int8) s2-0) 12) arg1) + ) + (+! (-> this object-count) 1) + gp-0 + ) + (else + -1 + ) + ) + ) + ) + +(defmethod-mips2c "(method 32 sphere-hash)" 32 sphere-hash) + +(defmethod-mips2c "(method 29 sphere-hash)" 29 sphere-hash) + +(defmethod-mips2c "(method 30 sphere-hash)" 30 sphere-hash) + +(defmethod-mips2c "(method 31 sphere-hash)" 31 sphere-hash) + +(defmethod dump-grid-info ((this sphere-hash)) + (call-parent-method this) + (new 'stack-no-clear 'vector) + (let ((f30-0 6144.0)) + (set! (-> this work temp-box-min quad) (-> (target-pos 0) quad)) + (+! (-> this work temp-box-min y) f30-0) + ) + (set! (-> this work temp-box-max quad) (-> this work temp-box-min quad)) + (set! (-> this work visit-count) 0) + (set! (-> this debug-draw) #t) + (set! (-> this work add-object-time) (the-as uint 0)) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs spatial-hash. +(defmethod new spatial-hash ((allocation symbol) (type-to-make type) (arg0 int) (arg1 int)) + (let ((gp-0 (the-as object (object-new allocation type-to-make (the-as int (-> type-to-make size)))))) + (when (zero? (the-as spatial-hash gp-0)) + (set! gp-0 0) + (goto cfg-4) + ) + (set! (-> (the-as spatial-hash gp-0) work) *grid-hash-work*) + (set! (-> (the-as spatial-hash gp-0) object-count) 0) + (set! (-> (the-as spatial-hash gp-0) bucket-memory-size) arg0) + (set! (-> (the-as spatial-hash gp-0) vertical-cell-count) 1) + (set! (-> (the-as spatial-hash gp-0) min-cell-size) 16384.0) + (set! (-> (the-as spatial-hash gp-0) mem-bucket-array) + (the-as (pointer grid-hash-word) (malloc allocation arg0)) + ) + (set! (-> (the-as spatial-hash gp-0) spr-bucket-array) (the-as (pointer grid-hash-word) #x70000000)) + (set! (-> (the-as spatial-hash gp-0) bucket-array) (-> (the-as spatial-hash gp-0) mem-bucket-array)) + (set! (-> (the-as spatial-hash gp-0) debug-draw) #f) + (set! (-> (the-as spatial-hash gp-0) use-scratch-ram) #f) + (set! (-> (the-as spatial-hash gp-0) max-object-count) arg1) + (set! (-> (the-as spatial-hash gp-0) mem-sphere-array) (the-as uint (malloc allocation (* arg1 16)))) + (set! (-> (the-as spatial-hash gp-0) mem-object-array) + (the-as (inline-array hash-object-info) (malloc allocation (* arg1 16))) + ) + (set! (-> (the-as spatial-hash gp-0) spr-sphere-array) (the-as uint (+ #x70000000 arg0))) + (set! (-> (the-as spatial-hash gp-0) spr-object-array) + (the-as (inline-array hash-object-info) (+ #x70000000 (* arg1 16) arg0)) + ) + (set! (-> (the-as spatial-hash gp-0) sphere-array) + (the-as (inline-array sphere) (-> (the-as spatial-hash gp-0) mem-sphere-array)) + ) + (set! (-> (the-as spatial-hash gp-0) object-array) (-> (the-as spatial-hash gp-0) mem-object-array)) + (label cfg-4) + (the-as spatial-hash gp-0) + ) + ) + +(defmethod clear-objects! ((this spatial-hash)) + (set! (-> this object-count) 0) + (dotimes (v1-0 3) + (set! (-> this box-min v1-0) 10000000000000000000000000000000000000.0) + (set! (-> this box-max v1-0) -10000000000000000000000000000000000000.0) + ) + (cond + ((-> this use-scratch-ram) + (set! (-> this sphere-array) (the-as (inline-array sphere) (-> this spr-sphere-array))) + (set! (-> this object-array) (-> this spr-object-array)) + (set! (-> this bucket-array) (-> this spr-bucket-array)) + ) + (else + (set! (-> this sphere-array) (the-as (inline-array sphere) (-> this mem-sphere-array))) + (set! (-> this object-array) (-> this mem-object-array)) + (set! (-> this bucket-array) (-> this mem-bucket-array)) + ) + ) + 0 + (none) + ) + +(defmethod-mips2c "(method 32 spatial-hash)" 32 spatial-hash) + +(defmethod spatial-hash-method-33 ((this spatial-hash) (arg0 vector) (arg1 hash-object-info)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (let ((v0-0 (-> this object-count))) + (cond + ((< v0-0 (-> this max-object-count)) + (let ((v1-2 (-> this sphere-array v0-0)) + (a3-2 (-> this object-array v0-0)) + ) + (let ((t0-1 (new 'stack-no-clear 'inline-array 'vector 2))) + (let ((t2-0 (-> t0-1 0))) + (let ((t1-0 arg0)) + (let ((t3-0 (- (-> arg0 w)))) + (.mov vf6 t3-0) + ) + (.lvf vf4 (&-> t1-0 quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> t2-0 quad) vf5) + ) + (let ((t2-1 (-> t0-1 1))) + (let ((t1-1 arg0)) + (let ((t3-1 (-> arg0 w))) + (.mov vf6 t3-1) + ) + (.lvf vf4 (&-> t1-1 quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> t2-1 quad) vf5) + ) + (dotimes (t1-2 3) + (set! (-> this box-min t1-2) (fmin (-> this box-min t1-2) (-> (&-> t0-1 0 data t1-2) 0))) + (set! (-> this box-max t1-2) (fmax (-> this box-max t1-2) (-> (&-> t0-1 0 data t1-2) 4))) + ) + ) + (set! (-> v1-2 quad) (-> arg0 quad)) + (set! (-> a3-2 object) (the-as basic arg1)) + ) + (+! (-> this object-count) 1) + ) + (else + -1 + ) + ) + ) + (none) + ) + ) + +(defmethod-mips2c "(method 38 spatial-hash)" 38 spatial-hash) + +(defmethod-mips2c "(method 35 spatial-hash)" 35 spatial-hash) + +(defmethod-mips2c "(method 36 spatial-hash)" 36 spatial-hash) + +(defmethod-mips2c "(method 34 spatial-hash)" 34 spatial-hash) + +(defmethod fill-actor-list-for-line-sphere ((this spatial-hash) + (arg0 vector) + (arg1 vector) + (arg2 float) + (arg3 (pointer collide-shape)) + (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) + (fill-actor-list-for-box this v1-0 (the-as (pointer collide-shape) arg1) (the-as int arg2)) + ) + ) + +(defmethod spatial-hash-method-39 ((this spatial-hash) (arg0 object) (arg1 hash-object-info)) + (dotimes (s5-0 (-> this object-count)) + (let ((a0-2 (-> this object-array s5-0 object))) + (when (not (valid? a0-2 basic "" #t 0)) + (break!) + 0 + ) + ) + ) + 0 + ) diff --git a/goal_src/jak3/engine/target/board/board-h.gc b/goal_src/jak3/engine/target/board/board-h.gc index 5c24f91557..170c671e40 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) @@ -321,7 +322,7 @@ (+! (-> s5-0 2 y) 16384.0) (set! (-> s5-0 2 r) 2867.2) (let ((v1-60 gp-0)) - (set! (-> v1-60 spheres) s5-0) + (set! (-> v1-60 best-dist) (the-as float s5-0)) (set! (-> v1-60 best-other-prim) (the-as collide-shape-prim 3)) (set! (-> v1-60 collide-with) (logclear @@ -352,8 +353,8 @@ ((board-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 3.5) :shadow board-shadow-mg - :shadow-joint-index 3 - :light-index 1 + :sort 1 + :origin-joint-index 3 ) (define *board-shadow-control* diff --git a/goal_src/jak3/engine/target/board/board-part.gc b/goal_src/jak3/engine/target/board/board-part.gc index 4cd776b410..675fe6d4f0 100644 --- a/goal_src/jak3/engine/target/board/board-part.gc +++ b/goal_src/jak3/engine/target/board/board-part.gc @@ -7,3 +7,415 @@ ;; DECOMP BEGINS +(defpartgroup group-board-land-straight + :id 189 + :duration (seconds 0.035) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 249)) + ) + +(defpartgroup group-board-quick-jump + :id 190 + :duration (seconds 0.035) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 249)) + ) + +(defpartgroup group-board-launch + :id 191 + :duration (seconds 0.035) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 666 :flags (sp3)) (sp-item 667 :flags (sp3)) (sp-item 668 :flags (sp3 sp7))) + ) + +(defpart 668 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (: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 -0.125)) + (: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 667 + :init-specs ((:texture (middot level-default-sprite)) + (:num 100.0) + (:scale-x (meters 0.05) (meters 0.05)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.1125)) + (:vel-y (meters 0.33333334) (meters 0.006666667)) + (:fade-r -0.85333335) + (:fade-g -0.85333335) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.9 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 666 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 30.0) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 32.0 32.0) + (:vel-y (meters 0.033333335) (meters 0.1)) + (:scalevel-x (meters 0.006666667) (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.85333335) + (:fade-g -0.85333335) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.93 0.02) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 60) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-target-board-duck-charge + :id 186 + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 669 :flags (is-3d sp7))) + ) + +(defpart 669 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 0.3) + (:y (meters 0.5)) + (:scale-x (meters 10) (meters 5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.85333335) + (:fade-g 0.85333335) + (:fade-a 0.85333335 0.85333335) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'board-charge-track) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 670 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.05)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-g -0.85 -1.7) + (:fade-b -8.0) + (:fade-a -0.16 -0.16) + (:accel-y (meters -0.0016666667) (meters -0.00066666666)) + (:friction 0.95) + (:timer (seconds 0.167) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 45) (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpartgroup group-target-board + :id 185 + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 671) (sp-item 672 :flags (is-3d)) (sp-item 673)) + ) + +(defpart 671 + :init-specs ((:num 3.0) + (:y (meters 0.25)) + (:rot-x 7) + (:r 2048.0) + (:g 1638.4) + (:b 1843.2) + (:fade-b -0.08533333) + (:timer (seconds 0.135)) + (:flags (distort)) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +(defpart 672 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-target-orient) + (:num 1.0) + (:y (meters 0.25)) + (:scale-x (meters 4) (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 64.0 128.0) + (:g :copy r) + (:b 255.0) + (:a 8.0 8.0) + (:scalevel-x (meters -0.02) (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.1) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + ) + ) + +(defpart 673 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.05)) + (:r 128.0 64.0) + (:g :copy r) + (:b 255.0) + (:a 64.0 32.0) + (:omega (degrees 0.05625)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-r -3.0) + (:fade-g -3.0) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.00033333333) (meters -0.00033333333)) + (:friction 0.95) + (:timer (seconds 0.167) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 80) (degrees 10)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +(defpart 674 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.0) + (:y (meters 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 32.0) + (:a 8.0 56.0) + (:vel-y (meters 0.13333334) (meters 0.16666667)) + (:scalevel-x (meters 0.013333334)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.4222223) + (:fade-a -0.35555556) + (:accel-y (meters 0.00008333333)) + (:friction 0.7) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpartgroup group-board-spin-attack + :id 184 + :duration (seconds 1) + :flags (sp0 sp6) + :bounds (static-bspherem 0 0 0 2) + :rotate ((degrees 90) (degrees 180) (degrees 90)) + :parts ((sp-item 675 :flags (is-3d sp3 sp6 sp7)) + (sp-item 676 :flags (is-3d sp3 sp6 sp7)) + (sp-item 677 :flags (sp3 sp6)) + ) + ) + +(defpart 677 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 0.5)) + (:rot-x (degrees 11.25)) + (:scale-y (meters 4) (meters 0.5)) + (:r 0.0) + (:g 128.0) + (:b 255.0) + (:a 64.0) + (:fade-a -0.4) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + (:func 'sparticle-track-root) + ) + ) + +(defpart 676 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 12)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 9)) + (:r 0.0) + (:g 128.0 128.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters -0.086666666)) + (:scalevel-y (meters -0.09)) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 675 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 1.4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 0.9)) + (:r 0.0) + (:g 128.0 128.0) + (:b 255.0) + (:a 255.0) + (:scalevel-x (meters 0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-a -3.1875) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-board-zap-attack + :id 188 + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 678 :flags (is-3d) :period (seconds 20) :length (seconds 0.335))) + ) + +(defpartgroup group-board-green-eco-zap-attack + :id 187 + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 679 :flags (is-3d) :period (seconds 20) :length (seconds 0.335))) + ) + +(defun board-charge-track ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((v1-0 *target*) + (a1-1 37) + ) + (when *target* + (let ((v1-2 (vector<-cspace! (new 'stack-no-clear 'vector) (-> v1-0 node-list data a1-1)))) + (set! (-> arg2 x) (-> v1-2 x)) + (set! (-> arg2 y) (-> v1-2 y)) + (set! (-> arg2 z) (-> v1-2 z)) + ) + ) + ) + 0 + (none) + ) + +(defun board-zap-track ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let* ((v1-2 (ppointer->process (-> arg1 key proc parent))) + (a1-1 (the int (-> arg1 user-float))) + (v1-5 (vector<-cspace! (new 'stack-no-clear 'vector) (-> (the-as process-drawable v1-2) node-list data a1-1))) + ) + (set! (-> arg2 x) (-> v1-5 x)) + (set! (-> arg2 y) (-> v1-5 y)) + (set! (-> arg2 z) (-> v1-5 z)) + ) + 0 + (none) + ) + +(defpart 678 + :init-specs ((:texture (laser-hit-rim level-default-sprite)) + (:num 0.25) + (:y (meters 0.5)) + (:scale-x (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 80.0) + (:b 255.0) + (:a 255.0) + (:scalevel-x (meters 0.16666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.6) + (:fade-g -1.6) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 37.0) + (:func 'board-zap-track) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 680 + :init-specs ((:func 'none)) + ) + +(defpart 679 + :init-specs ((:texture (laser-hit-rim level-default-sprite)) + (:num 0.25) + (:y (meters 0.5)) + (:scale-x (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 255.0) + (:b 80.0) + (:a 255.0) + (:scalevel-x (meters 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.6) + (:fade-b -1.6) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 37.0) + (:func 'board-zap-track) + (:rotate-y (degrees 0)) + ) + ) diff --git a/goal_src/jak3/engine/target/board/board-states.gc b/goal_src/jak3/engine/target/board/board-states.gc index eb12e03038..95babff9f6 100644 --- a/goal_src/jak3/engine/target/board/board-states.gc +++ b/goal_src/jak3/engine/target/board/board-states.gc @@ -430,50 +430,11 @@ (cond ((logtest? (-> *part-group-id-table* 189 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> gp-2 quad)) - (let ((s5-1 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-1 - (let ((t9-11 (method-of-type part-tracker-subsampler activate))) - (t9-11 (the-as part-tracker-subsampler s5-1) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-12 run-function-in-process) - (a0-15 s5-1) - (a1-9 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 189)) - (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-12) a0-15 a1-9 *part-tracker-subsampler-params-default*) - ) - (-> s5-1 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 189)) ) (else (set! (-> *launch-matrix* trans quad) (-> gp-2 quad)) - (let ((s5-2 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-2 - (let ((t9-14 (method-of-type part-tracker activate))) - (t9-14 (the-as part-tracker s5-2) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-15 run-function-in-process) - (a0-20 s5-2) - (a1-12 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 189)) - (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-15) a0-20 a1-12 *part-tracker-params-default*) - ) - (-> s5-2 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 189)) ) ) (let ((s5-3 (process-spawn @@ -887,53 +848,20 @@ ) (sound-play "board-launch") (when (!= (-> self board charge-progress) 0.0) - (cond - ((logtest? (-> *part-group-id-table* 191 flags) (sp-group-flag sp13)) - (let ((gp-2 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-2 - (let ((t9-8 (method-of-type part-tracker-subsampler activate))) - (t9-8 (the-as part-tracker-subsampler gp-2) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-9 run-function-in-process) - (a0-35 gp-2) - (a1-7 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 191)) - (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) (-> self node-list data 0 bone transform)) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-9) a0-35 a1-7 *part-tracker-subsampler-params-default*) - ) - (-> gp-2 ppointer) - ) - ) - ) - (else - (let ((gp-3 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-3 - (let ((t9-11 (method-of-type part-tracker activate))) - (t9-11 (the-as part-tracker gp-3) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-12 run-function-in-process) - (a0-38 gp-3) - (a1-10 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 191)) - (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) (-> self node-list data 0 bone transform)) - ((the-as (function object object object none) t9-12) a0-38 a1-10 *part-tracker-params-default*) - ) - (-> gp-3 ppointer) - ) + (if (logtest? (-> *part-group-id-table* 191 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 191) + :mat-joint (-> self node-list data 0 bone transform) + ) + (part-tracker-spawn + part-tracker + :to self + :group (-> *part-group-id-table* 191) + :mat-joint (-> self node-list data 0 bone transform) ) ) - ) ) (set-time! (-> self board halfpipe-jump-time)) (set! (-> self board charge-progress) 0.0) @@ -1031,53 +959,20 @@ (when (and (cpad-hold? (-> self control cpad number) l1) (!= (-> self board charge-progress) 0.0)) (+! f30-0 (* (-> self board charge-progress) (-> *TARGET_BOARD-bank* charge-jump-height))) (sound-play "board-launch") - (cond - ((logtest? (-> *part-group-id-table* 191 flags) (sp-group-flag sp13)) - (let ((s3-3 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s3-3 - (let ((t9-7 (method-of-type part-tracker-subsampler activate))) - (t9-7 (the-as part-tracker-subsampler s3-3) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-8 run-function-in-process) - (a0-14 s3-3) - (a1-8 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 191)) - (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) (-> self node-list data 0 bone transform)) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-8) a0-14 a1-8 *part-tracker-subsampler-params-default*) - ) - (-> s3-3 ppointer) - ) - ) - ) - (else - (let ((s3-4 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s3-4 - (let ((t9-10 (method-of-type part-tracker activate))) - (t9-10 (the-as part-tracker s3-4) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-11 run-function-in-process) - (a0-17 s3-4) - (a1-11 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 191)) - (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) (-> self node-list data 0 bone transform)) - ((the-as (function object object object none) t9-11) a0-17 a1-11 *part-tracker-params-default*) - ) - (-> s3-4 ppointer) - ) + (if (logtest? (-> *part-group-id-table* 191 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 191) + :mat-joint (-> self node-list data 0 bone transform) + ) + (part-tracker-spawn + part-tracker + :to self + :group (-> *part-group-id-table* 191) + :mat-joint (-> self node-list data 0 bone transform) ) ) - ) ) (set! (-> self board charge-progress) 0.0) (sound-stop (-> self board charge-sound-id)) @@ -1092,50 +987,11 @@ (cond ((logtest? (-> *part-group-id-table* 190 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> s3-5 quad)) - (let ((s2-2 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s2-2 - (let ((t9-14 (method-of-type part-tracker-subsampler activate))) - (t9-14 (the-as part-tracker-subsampler s2-2) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-15 run-function-in-process) - (a0-28 s2-2) - (a1-14 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 190)) - (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-15) a0-28 a1-14 *part-tracker-subsampler-params-default*) - ) - (-> s2-2 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 190)) ) (else (set! (-> *launch-matrix* trans quad) (-> s3-5 quad)) - (let ((s2-3 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s2-3 - (let ((t9-17 (method-of-type part-tracker activate))) - (t9-17 (the-as part-tracker s2-3) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-18 run-function-in-process) - (a0-33 s2-3) - (a1-17 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 190)) - (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-18) a0-33 a1-17 *part-tracker-params-default*) - ) - (-> s2-3 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 190)) ) ) (let* ((s1-1 (get-process *default-dead-pool* manipy #x20000 1)) @@ -2746,16 +2602,16 @@ (set! (-> self board ride-rot-old) (-> self board ride-rot)) (let ((gp-0 (new 'stack-no-clear 'vector))) (set! (-> gp-0 quad) (-> self control trans quad)) - (let* ((s5-0 (new 'stack-no-clear 'collide-query)) - (a0-16 (-> self control)) - (t9-2 (method-of-object a0-16 find-ground)) - (a1-0 s5-0) - (a2-3 (logclear (-> self control root-prim prim-core collide-with) (collide-spec water))) - (a3-0 8192.0) - (t0-0 81920.0) - (t1-0 1024.0) - ) - (if (t9-2 a0-16 a1-0 a2-3 a3-0 t0-0 t1-0) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (if (find-ground + (-> self control) + s5-0 + (logclear (-> self control root-prim prim-core collide-with) (collide-spec water)) + 8192.0 + 81920.0 + 1024.0 + (the-as process #f) + ) (set! (-> self control gspot-pat-surfce) (-> s5-0 best-other-tri pat)) ) ) @@ -2826,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)) @@ -2987,7 +2843,7 @@ (logclear! (-> gp-2 options) (projectile-options po14 po15 po16)) (set! (-> gp-2 notify-handle) (the-as handle #f)) (set! (-> gp-2 owner-handle) (the-as handle #f)) - (set! (-> gp-2 target-handle) (the-as uint #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-27 *game-info*) @@ -3504,7 +3360,7 @@ (set! (-> v1-8 invinc-time) (-> *TARGET-bank* hit-invulnerable-timeout)) (set! (-> v1-8 speed) 1.0) (set! (-> v1-8 damage) (-> *FACT-bank* health-default-inc)) - (set! (-> v1-8 knock) (knocked-type knocked-type-0)) + (set! (-> v1-8 knock) (knocked-type none)) ) (case arg0 (('shove) @@ -3602,7 +3458,7 @@ ) ) (when (not (and (= (-> self game mode) 'play) (>= 0.0 (-> self fact health)))) - (when (= (-> gp-0 knock) (knocked-type knocked-type-8)) + (when (= (-> gp-0 knock) (knocked-type knocked-off)) (set-quaternion! (-> self control) (-> self control dir-targ)) (set-forward-vel (* -3.0 (-> gp-0 shove-back))) (go target-board-get-off (the-as handle #f) 'hit) diff --git a/goal_src/jak3/engine/target/board/board-util.gc b/goal_src/jak3/engine/target/board/board-util.gc index 0b7254459f..cb9b5ed9d0 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 eb05ac67fe..6ad82995d8 100644 --- a/goal_src/jak3/engine/target/board/target-board.gc +++ b/goal_src/jak3/engine/target/board/target-board.gc @@ -688,53 +688,16 @@ ) (case (-> self control danger-mode) (('board-spin) - (cond - ((logtest? (-> *part-group-id-table* 184 flags) (sp-group-flag sp13)) - (let ((gp-2 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-2 - (let ((t9-12 (method-of-type part-tracker-subsampler activate))) - (t9-12 (the-as part-tracker-subsampler gp-2) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-13 run-function-in-process) - (a0-53 gp-2) - (a1-12 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 184)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 37) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-13) a0-53 a1-12 *part-tracker-subsampler-params-default*) - ) - (-> gp-2 ppointer) - ) - ) - ) - (else - (let ((gp-3 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-3 - (let ((t9-15 (method-of-type part-tracker activate))) - (t9-15 (the-as part-tracker gp-3) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-16 run-function-in-process) - (a0-56 gp-3) - (a1-15 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 184)) - (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) self) - (set! (-> *part-tracker-params-default* mat-joint) 37) - ((the-as (function object object object none) t9-16) a0-56 a1-15 *part-tracker-params-default*) - ) - (-> gp-3 ppointer) - ) + (if (logtest? (-> *part-group-id-table* 184 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 184) + :target self + :mat-joint 37 ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 184) :target self :mat-joint 37) ) - ) ) ) (target-timed-invulnerable (seconds 0.5) self 2) @@ -903,6 +866,7 @@ (none) ) +;; WARN: Return type mismatch connection vs none. (defbehavior target-board-init target () (target-lightjak-end-mode #t) (target-darkjak-end-mode #t) @@ -936,7 +900,7 @@ (set! (-> self board sound-air-knob) 0.0) (set! (-> self board sound-bank-knob) 0.0) (set! (-> self board turn-sound-id) (new 'static 'sound-id)) - (set! (-> self board mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modebord 0.0 0))) + (set! (-> self board mode-sound-bank) (add-setting! 'mode-sound-bank 'modebord 0.0 0)) (set-time! (-> self board board-get-on-time)) (set! (-> self board stick-lock) #f) (set! (-> self board stick-off) #f) @@ -1389,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)))) @@ -1409,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))) @@ -1453,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)) @@ -1496,9 +1460,9 @@ ) ) (spawn (-> self board effect-part) (-> self control trans)) - (do-effect (-> self skel effect) (the-as symbol "effect-board-poof") 0.0 -1) + (do-effect (-> self skel effect) "effect-board-poof" 0.0 -1) (if (< (-> self board shock-offset) -2048.0) - (do-effect (-> self skel effect) (the-as symbol "effect-board-poof") 0.0 -1) + (do-effect (-> self skel effect) "effect-board-poof" 0.0 -1) ) ) (vector-lerp! (-> self board slow-transv) (-> self board slow-transv) (-> self control transv) 0.2) @@ -1584,50 +1548,11 @@ (cond ((logtest? (-> *part-group-id-table* 23 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((gp-3 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-3 - (let ((t9-9 (method-of-type part-tracker-subsampler activate))) - (t9-9 (the-as part-tracker-subsampler gp-3) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-10 run-function-in-process) - (a0-31 gp-3) - (a1-8 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 23)) - (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-10) a0-31 a1-8 *part-tracker-subsampler-params-default*) - ) - (-> gp-3 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 23)) ) (else (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((gp-4 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-4 - (let ((t9-12 (method-of-type part-tracker activate))) - (t9-12 (the-as part-tracker gp-4) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-13 run-function-in-process) - (a0-37 gp-4) - (a1-11 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 23)) - (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-13) a0-37 a1-11 *part-tracker-params-default*) - ) - (-> gp-4 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 23)) ) ) ) @@ -2280,100 +2205,30 @@ (focus-test? self board) (< 0.0 (-> self fact eco-green)) ) - (cond - ((logtest? (-> *part-group-id-table* 187 flags) (sp-group-flag sp13)) - (let ((s5-7 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-7 - (let ((t9-52 (method-of-type part-tracker-subsampler activate))) - (t9-52 (the-as part-tracker-subsampler s5-7) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-53 run-function-in-process) - (a0-113 s5-7) - (a1-46 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 187)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 37) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-53) a0-113 a1-46 *part-tracker-subsampler-params-default*) - ) - (-> s5-7 ppointer) - ) - ) - ) - (else - (let ((s5-8 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-8 - (let ((t9-55 (method-of-type part-tracker activate))) - (t9-55 (the-as part-tracker s5-8) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-56 run-function-in-process) - (a0-116 s5-8) - (a1-49 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 187)) - (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) self) - (set! (-> *part-tracker-params-default* mat-joint) 37) - ((the-as (function object object object none) t9-56) a0-116 a1-49 *part-tracker-params-default*) - ) - (-> s5-8 ppointer) - ) + (if (logtest? (-> *part-group-id-table* 187 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 187) + :target self + :mat-joint 37 ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 187) :target self :mat-joint 37) ) - ) (target-board-green-eco-attack #t) (target-board-green-eco-use 5.0) ) ((logtest? (-> *part-group-id-table* 188 flags) (sp-group-flag sp13)) - (let ((s5-9 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-9 - (let ((t9-60 (method-of-type part-tracker-subsampler activate))) - (t9-60 (the-as part-tracker-subsampler s5-9) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-61 run-function-in-process) - (a0-121 s5-9) - (a1-52 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 188)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 37) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-61) a0-121 a1-52 *part-tracker-subsampler-params-default*) - ) - (-> s5-9 ppointer) - ) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 188) + :target self + :mat-joint 37 ) ) (else - (let ((s5-10 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-10 - (let ((t9-63 (method-of-type part-tracker activate))) - (t9-63 (the-as part-tracker s5-10) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-64 run-function-in-process) - (a0-124 s5-10) - (a1-55 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 188)) - (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) self) - (set! (-> *part-tracker-params-default* mat-joint) 37) - ((the-as (function object object object none) t9-64) a0-124 a1-55 *part-tracker-params-default*) - ) - (-> s5-10 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 188) :target self :mat-joint 37) ) ) (target-timed-invulnerable (-> *TARGET_BOARD-bank* zap-duration) self 2) diff --git a/goal_src/jak3/engine/target/collide-reaction-target.gc b/goal_src/jak3/engine/target/collide-reaction-target.gc index c1df80bd12..5d04729a83 100644 --- a/goal_src/jak3/engine/target/collide-reaction-target.gc +++ b/goal_src/jak3/engine/target/collide-reaction-target.gc @@ -46,36 +46,38 @@ (arg5 (pointer symbol)) ) (local-vars - (sv-16 vector) + (contact-normal vector) (sv-20 (pointer cshape-reaction-flags)) (sv-24 (pointer collide-status)) (sv-28 (pointer symbol)) (sv-32 cshape-reaction-flags) (sv-40 collide-status) (sv-48 symbol) - (sv-52 vector) - (sv-56 vector) + (tangent vector) + (overhang-nrm vector) ) - (set! sv-16 arg2) + (set! contact-normal arg2) (set! sv-20 arg3) (set! sv-24 arg4) (set! sv-28 arg5) (set! sv-32 (-> arg3 0)) (set! sv-40 (-> arg4 0)) (set! sv-48 (-> arg5 0)) - (set! sv-52 (-> arg0 low-coverage-tangent)) - (set! sv-56 (vector-cross! (-> arg0 low-coverage-overhang-plane-normal) (-> arg0 poly-normal) sv-16)) - (vector-normalize! sv-56 1.0) - (if (>= (fabs (vector-dot (-> arg0 dynam gravity-normal) sv-56)) 0.866) + (set! tangent (-> arg0 low-coverage-tangent)) + (set! overhang-nrm + (vector-cross! (-> arg0 low-coverage-overhang-plane-normal) (-> arg0 poly-normal) contact-normal) + ) + (vector-normalize! overhang-nrm 1.0) + (if (>= (fabs (vector-dot (-> arg0 dynam gravity-normal) overhang-nrm)) 0.866) (set! sv-32 (logior sv-32 (cshape-reaction-flags csrf09))) ) - (vector-cross! sv-52 sv-16 sv-56) - (if (< 0.0 (vector-dot (-> arg0 dynam gravity-normal) sv-52)) - (vector-negate! sv-52 sv-52) + (vector-cross! tangent contact-normal overhang-nrm) + (if (< 0.0 (vector-dot (-> arg0 dynam gravity-normal) tangent)) + (vector-negate! tangent tangent) ) - (vector-normalize! sv-52 1.0) + (vector-normalize! tangent 1.0) (let ((s4-0 (new 'stack-no-clear 'collide-query))) - (let ((s3-0 (vector-flatten! (-> arg0 low-coverage-tangent-xz) sv-52 (-> arg0 dynam gravity-normal)))) + (let ((s3-0 (vector-flatten! (-> arg0 low-coverage-tangent-xz) tangent (-> arg0 dynam gravity-normal)))) (let ((v1-19 s4-0)) (set! (-> v1-19 radius) 409.6) (set! (-> v1-19 collide-with) (-> arg1 best-my-prim prim-core collide-with)) @@ -85,7 +87,7 @@ (set! (-> v1-19 action-mask) (collide-action solid)) ) (vector-normalize! s3-0 1.0) - (if (< (vector-dot s3-0 sv-16) 0.0) + (if (< (vector-dot s3-0 contact-normal) 0.0) (vector-negate! s3-0 s3-0) ) (set! (-> arg0 low-coverage-slope-to-next1) 4095996000.0) @@ -133,7 +135,7 @@ (set-time! (-> arg0 time-of-last-lc-touch-edge)) (set! sv-40 (logior sv-40 (collide-status touch-edge))) (set-time! (-> arg0 time-of-last-lc)) - (let ((f30-0 (vector-dot sv-52 (-> arg0 turn-to-target))) + (let ((f30-0 (vector-dot tangent (-> arg0 turn-to-target))) (f0-27 (if (logtest? sv-32 (cshape-reaction-flags csrf01)) (cos (- 16384.0 (acos (-> arg0 coverage)))) (-> arg0 coverage) @@ -152,7 +154,7 @@ (and (logtest? sv-32 (cshape-reaction-flags csrf05)) (< f0-27 0.3)) (< f1-11 (* -0.25 (-> arg1 best-my-prim local-sphere w))) ) - (>= (vector-dot sv-52 sv-16) -0.000001) + (>= (vector-dot tangent contact-normal) -0.000001) ) (set! (-> arg0 surf) *edge-surface*) (set! sv-32 (logior sv-32 (cshape-reaction-flags csrf10))) @@ -221,7 +223,7 @@ (set! (-> sv-88 rvec quad) (-> arg3 quad)) (set! (-> sv-88 uvec quad) (-> arg3 quad)) (let ((a1-3 (new 'stack-no-clear 'vector))) - (vector-float*! a1-3 (-> arg1 move-dist) (the-as float (-> arg1 spheres))) + (vector-float*! a1-3 (-> arg1 move-dist) (-> arg1 best-dist)) (move-by-vector! arg0 a1-3) ) (set! sv-104 (logior sv-104 (react-to-pat! arg0 (-> arg1 best-other-tri pat)))) @@ -248,7 +250,7 @@ (let ((v1-35 (-> sv-80 quad))) (set! (-> sv-84 quad) v1-35) ) - (if (= (the-as float (-> arg1 spheres)) 0.0) + (if (= (-> arg1 best-dist) 0.0) (move-by-vector! arg0 (vector-normalize-copy! (new-stack-vector0) sv-84 3.0)) ) (set! (-> arg0 poly-normal quad) (-> arg1 best-other-tri normal quad)) diff --git a/goal_src/jak3/engine/target/darkjak-h.gc b/goal_src/jak3/engine/target/darkjak-h.gc index 9fb900b5c1..edb4ddf0dd 100644 --- a/goal_src/jak3/engine/target/darkjak-h.gc +++ b/goal_src/jak3/engine/target/darkjak-h.gc @@ -23,10 +23,10 @@ (clock-on symbol) (hud handle 1) (tone sound-id) - (bomb uint32) + (bomb (pointer process)) (mode-sound-bank connection) ) (:methods - (darkjak-info-method-9 () none) + (update-clock! (_type_ int) none) ) ) diff --git a/goal_src/jak3/engine/target/flut/flut-h.gc b/goal_src/jak3/engine/target/flut/flut-h.gc index 1a7dc171c7..b318e08495 100644 --- a/goal_src/jak3/engine/target/flut/flut-h.gc +++ b/goal_src/jak3/engine/target/flut/flut-h.gc @@ -9,6 +9,10 @@ (defenum flut-flag :type uint64 :bitfield #t + (ff0 0) + (ff1 1) + (ff2 2) + (ff3 3) ) ;; ---flut-flag @@ -37,26 +41,29 @@ (deftype flut (process-focusable) - ((extra-trans vector :inline) + ((root collide-shape-moving :override) + (extra-trans vector :inline) (condition int32) (shadow-backup shadow-geo) (rider handle) (nav-sphere-handle handle) (probe-time time-frame) - (count-lock basic) + (count-lock symbol) (flags flut-flag) - (mode basic) + (mode symbol) (color-index int32) (minimap connection-minimap) ) + (:state-methods + wait-for-start + idle + (pickup (state flut)) + wait-for-return + die + ) (:methods - (flut-method-28 () none) - (flut-method-29 () none) - (flut-method-30 () none) - (flut-method-31 () none) - (flut-method-32 () none) - (flut-method-33 () none) - (flut-method-34 () none) + (flut-method-33 (_type_) symbol) + (spawn-part-and-sound! (_type_) none) ) ) @@ -65,5 +72,5 @@ ((flut-saddle-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 3.5) :shadow flut-saddle-shadow-mg - :light-index 1 + :sort 1 ) diff --git a/goal_src/jak3/engine/target/flut/flut-part.gc b/goal_src/jak3/engine/target/flut/flut-part.gc index e56c16493a..e0e7a9a3b7 100644 --- a/goal_src/jak3/engine/target/flut/flut-part.gc +++ b/goal_src/jak3/engine/target/flut/flut-part.gc @@ -7,3 +7,126 @@ ;; DECOMP BEGINS +(defpartgroup group-flut-trans-pad + :id 237 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1059 :fade-after (meters 160)) + (sp-item 1060 :fade-after (meters 160)) + (sp-item 1061 :fade-after (meters 60) :falloff-to (meters 60) :flags (is-3d)) + ) + ) + +(defpart 1059 + :init-specs ((:texture (common-white common)) + (:num 0.5) + (:y (meters 7)) + (:scale-x (meters 14) (meters 1)) + (:scale-y (meters 14)) + (:r 40.0) + (:g 60.0 60.0) + (:b 128.0) + (:a 32.0 32.0) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 1060 + :init-specs ((:texture (common-white common)) + (:num 0.5) + (:y (meters 4)) + (:scale-x (meters 7) (meters 1)) + (:scale-y (meters 14)) + (:r 40.0) + (:g 60.0 60.0) + (:b 128.0) + (:a 64.0 64.0) + (:fade-a -8.533334) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 1061 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:y (meters 0.75) (meters 0.1)) + (:scale-x (meters 0)) + (:rot-x (degrees 0) (degrees 15)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 16.0) + (:g 0.0 127.0) + (:b 127.0) + (:a 127.0) + (:vel-y (meters 0)) + (:scalevel-x (meters 0.02)) + (:rotvel-y (degrees -0.6) (degrees 1.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:accel-y (meters -0.00015)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-flut-attack-strike-ground + :id 238 + :duration (seconds 0.035) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 1062) (sp-item 1063)) + ) + +(defpart 1062 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 24.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 8.0 56.0) + (:vel-y (meters 0.13333334) (meters 0.16666667)) + (:scalevel-x (meters 0.013333334)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.4222223) + (:fade-a -0.35555556) + (:accel-y (meters 0.00008333333)) + (:friction 0.7) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.3)) + (:next-launcher 1064) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 1063 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 32.0) + (:y (meters 1)) + (:scale-x (meters 1) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 8.0) + (:vel-y (meters 0.3)) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-g -2.8444445) + (:fade-a -0.82222223) + (:friction 0.7) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.15)) + (:next-launcher 1064) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) diff --git a/goal_src/jak3/engine/target/flut/flut-racer.gc b/goal_src/jak3/engine/target/flut/flut-racer.gc index 08ca6b7a6c..ed74068cf2 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* (the-as bounding-box 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 0ab4ed19ce..0c5a763420 100644 --- a/goal_src/jak3/engine/target/flut/flut.gc +++ b/goal_src/jak3/engine/target/flut/flut.gc @@ -7,3 +7,622 @@ ;; DECOMP BEGINS +(define *flut-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 81920.0) + :top-plane (new 'static 'plane :y 1.0 :w -2867.2) + ) + ) + ) + +(define *flut-color-table* (the-as (array rgbaf) (new 'static 'boxed-array :type vector + (new 'static 'vector :x 1.0 :y 1.0 :z 0.8 :w 1.0) + (new 'static 'vector :x 1.0 :y 1.0 :z 0.7 :w 1.0) + (new 'static 'vector :x 1.0 :y 1.0 :z 0.6 :w 1.0) + (new 'static 'vector :x 1.0 :y 1.0 :z 0.5 :w 1.0) + (new 'static 'vector :x 1.0 :y 1.0 :z 0.4 :w 1.0) + (new 'static 'vector :x 1.0 :y 0.9 :z 0.5 :w 1.0) + (new 'static 'vector :x 1.0 :y 0.8 :z 0.6 :w 1.0) + (new 'static 'vector :x 1.0 :y 0.8 :z 0.5 :w 1.0) + (new 'static 'vector :x 1.0 :y 0.8 :z 0.4 :w 1.0) + (new 'static 'vector :x 0.9 :y 0.9 :z 1.0 :w 1.0) + (new 'static 'vector :x 0.8 :y 0.9 :z 1.0 :w 1.0) + (new 'static 'vector :x 0.8 :y 1.0 :z 1.0 :w 1.0) + (new 'static 'vector :x 0.8 :y 1.0 :z 0.8 :w 1.0) + ) + ) + ) + +(defmethod spawn-part-and-sound! ((this flut)) + (if (nonzero? (-> this part)) + (spawn (-> this part) (-> this root trans)) + ) + (if (nonzero? (-> this sound)) + (update! (-> this sound)) + ) + 0 + (none) + ) + +(defmethod deactivate ((this flut)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (when (-> this count-lock) + (set! (-> this count-lock) #f) + (+! (-> *game-info* flut-count) -1) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +(defbehavior flut-color-from-index flut ((arg0 int)) + (set! (-> self draw color-mult quad) (-> *flut-color-table* (mod arg0 (-> *flut-color-table* length)) quad)) + 0 + (none) + ) + +(defun flut-random-color-index () + (rand-vu-int-range 0 (-> *flut-color-table* length)) + ) + +(defmethod flut-method-33 ((this flut)) + (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)) + ) + ) + (let* ((s5-1 (-> gp-0 length)) + (s4-0 0) + (v1-7 (-> gp-0 s4-0)) + ) + (while (< s4-0 s5-1) + (if (type? (-> v1-7 process) flut) + (return #f) + ) + (+! s4-0 1) + (set! v1-7 (-> gp-0 s4-0)) + ) + ) + ) + #t + ) + +(defstate wait-for-start (flut) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('bonk) + (send-event proc 'target-flut-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 + ) + (('attack) + (cond + ((and (-> self next-state) (= (-> self next-state name) 'wait-for-start)) + #f + ) + ((= (-> self mode) 'normal) + (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)) + ) + ) + ) + (go-virtual die) + ) + (else + (send-event proc 'target-flut-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)) + ) + ) + ) + ) + ) + ) + (('touch) + (send-event proc 'target-flut-get-off 90) + (send-shoves (-> self root) proc (the-as touching-shapes-entry (-> block param 0)) 0.7 6144.0 16384.0) + #f + ) + (('trans) + (vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans)) + ) + (('shadow) + (cond + ((-> block param 0) + (let ((v0-2 (the-as object (-> self shadow-backup)))) + (set! (-> self draw shadow) (the-as shadow-geo v0-2)) + v0-2 + ) + ) + (else + (set! (-> self draw shadow) #f) + #f + ) + ) + ) + ) + ) + :exit (behavior () + (set! (-> self root root-prim prim-core action) (collide-action)) + (set! (-> self root penetrated-by) (the-as penetrate -1)) + (set-vector! (-> self root root-prim local-sphere) 0.0 5734.4 0.0 7372.8) + ) + :code (behavior () + (ja-channel-set! 0) + (while (or (>= (-> *game-info* flut-count) 10) + (and (sphere-in-view-frustum? (sphere<-vector+r! (new 'stack 'sphere) (-> self root trans) 8192.0)) + (and (< (vector-vector-distance (-> self root trans) (camera-pos)) 409600.0) + *target* + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (not (flut-method-33 self)) + ) + (suspend) + ) + (go-virtual idle) + ) + ) + +(defstate idle (flut) + :virtual #t + :event (-> (method-of-type flut wait-for-start) event) + :enter (behavior () + (set! (-> self nav-sphere-handle) (the-as handle #f)) + (let ((s5-0 (find-nearest-nav-mesh (-> self root trans) 8192.0))) + (when s5-0 + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-z-quaternion! gp-0 (-> self root quat)) + (vector-normalize! gp-0 5120.0) + (vector+! gp-0 gp-0 (-> self root trans)) + (set! (-> self nav-sphere-handle) + (ppointer->handle + (process-spawn simple-nav-sphere #x46266666 gp-0 s5-0 -1 :name "simple-nav-sphere" :to self) + ) + ) + ) + ) + ) + ) + :exit (behavior () + (send-event (handle->process (-> self nav-sphere-handle)) 'die-fast) + ((-> (method-of-type flut wait-for-start) exit)) + ) + :code (behavior () + (when (not (-> self count-lock)) + (set! (-> self count-lock) #t) + (+! (-> *game-info* flut-count) 1) + ) + (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*) + (ja-channel-set! 1) + (ja :group! (-> self draw art-group data 3)) + (set! (-> self root root-prim prim-core action) (collide-action solid can-ride no-standon)) + (set! (-> self root penetrated-by) (penetrate)) + 0.0 + (let ((f30-0 20480.0)) + (until #f + (when (and (logtest? (-> self draw status) (draw-control-status on-screen)) + (time-elapsed? (-> self probe-time) (seconds 1)) + ) + (move-to-ground + (-> self root) + 8192.0 + 40960.0 + #t + (collide-spec backgnd obstacle hit-by-player-list hit-by-others-list pusher) + ) + (set-time! (-> self probe-time)) + ) + (when (and (and *target* (and (>= f30-0 (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (not (focus-test? *target* grabbed in-head pole flut light board dark)) + (can-display-query? self "flut" -99.0) + (-> *setting-control* user-current pilot) + (-> *target* current-level) + ) + (let ((gp-0 + (new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-43 gp-0)) + (set! (-> v1-43 width) (the float 340)) + ) + (let ((v1-44 gp-0)) + (set! (-> v1-44 height) (the float 80)) + ) + (let ((v1-45 gp-0) + (a0-21 (-> *setting-control* user-default language)) + ) + (set! (-> v1-45 scale) (if (or (= a0-21 (language-enum korean)) (= a0-21 (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) + ) + ) + (if (and (cpad-pressed? 0 triangle) + (send-event *target* 'change-mode 'flut self (-> self mode) (-> self color-index)) + ) + (go-virtual pickup (method-of-object self wait-for-return)) + ) + ) + (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 + ) + ) + (spawn-part-and-sound! self) + (suspend) + (ja :num! (loop!)) + ) + ) + #f + ) + :post ja-post + ) + +(defstate pickup (flut) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('draw) + (ja-channel-set! 1) + (ja :group! (-> self draw art-group data 3)) + (set! (-> self root root-prim prim-core action) (collide-action solid can-ride no-standon)) + (set! (-> self root penetrated-by) (penetrate)) + (transform-post) + ) + (('trans) + (vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans)) + ) + (('touch 'attack 'bonk) + #f + ) + (('shadow) + (cond + ((-> block param 0) + (let ((v0-1 (the-as object (-> self shadow-backup)))) + (set! (-> self draw shadow) (the-as shadow-geo v0-1)) + v0-1 + ) + ) + (else + (set! (-> self draw shadow) #f) + #f + ) + ) + ) + ) + ) + :enter (behavior ((arg0 (state flut))) + (talker-spawn-func (-> *talker-speech* 86) *entity-pool* (target-pos 0) (the-as region #f)) + (let ((t9-2 (-> arg0 enter))) + (if t9-2 + (t9-2) + ) + ) + ) + :code (behavior ((arg0 (state flut))) + (when (-> self count-lock) + (set! (-> self count-lock) #f) + (+! (-> *game-info* flut-count) -1) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (ja-channel-set! 0) + (ja-post) + (when (not (and (-> self entity) (= (-> self entity extra process) self))) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (seconds 0.1)) + (spawn-part-and-sound! self) + (suspend) + ) + ) + (deactivate self) + ) + (while (zero? (ja-group-size)) + (if (or (not *target*) (or (< 24576.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (focus-test? *target* teleporting) + ) + ) + (go arg0) + ) + (spawn-part-and-sound! self) + (suspend) + ) + (while (and *target* (focus-test? *target* flut)) + (spawn-part-and-sound! self) + (suspend) + ) + (let ((s5-1 (current-time))) + (until (time-elapsed? s5-1 (seconds 1)) + (spawn-part-and-sound! self) + (suspend) + ) + ) + (go arg0) + ) + ) + +(defstate wait-for-return (flut) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trans) + (vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans)) + ) + (('shadow) + (cond + ((-> block param 0) + (let ((v0-1 (the-as structure (-> self shadow-backup)))) + (set! (-> self draw shadow) (the-as shadow-geo v0-1)) + v0-1 + ) + ) + (else + (set! (-> self draw shadow) #f) + (the-as structure #f) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-set! 0) + (ja-post) + (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) + (sleep-code) + ) + ) + +(defstate die (flut) + :virtual #t + :enter (-> (method-of-type flut idle) enter) + :exit (-> (method-of-type flut idle) exit) + :code (behavior () + (change-parent self *entity-pool*) + (when (-> self count-lock) + (set! (-> self count-lock) #f) + (+! (-> *game-info* flut-count) -1) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (if (-> self skel effect) + (logior! (-> self skel effect flags) (effect-control-flag ecf1)) + ) + (when (logtest? (-> self flags) (flut-flag ff3)) + (set! (-> self root dynam gravity-max) 40960.0) + (set! (-> self root dynam gravity-length) 20480.0) + (vector-float*! + (-> self root dynam gravity) + (-> self root dynam gravity-normal) + (the-as float (-> self root dynam gravity-length)) + ) + ) + (cond + ((logtest? (-> self flags) (flut-flag ff1)) + (set! (-> self root root-prim prim-core action) (collide-action)) + (set! (-> self root penetrated-by) (the-as penetrate -1)) + ) + (else + (set-vector! (-> self root root-prim local-sphere) 0.0 1638.4 0.0 1638.4) + (set! (-> self root root-prim prim-core action) (collide-action solid can-ride no-standon)) + (logior! + (-> self root root-prim prim-core collide-with) + (collide-spec backgnd crate obstacle hit-by-others-list pusher) + ) + (set! (-> self root penetrated-by) (penetrate)) + 0 + ) + ) + (ja-channel-set! 1) + (cond + ((logtest? (-> self flags) (flut-flag ff3)) + (ja-no-eval :group! (-> self draw art-group data 29) + :num! (seek! (ja-aframe 65.0 0)) + :frame-num (ja-aframe 60.0 0) + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 65.0 0))) + ) + ) + (else + (ja-no-eval :group! (-> self draw art-group data 28) + :num! (seek! (ja-aframe 38.0 0)) + :frame-num (ja-aframe 25.0 0) + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 38.0 0))) + ) + ) + ) + (do-effect (-> self skel effect) "death-default" 0.0 -1) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (while (nonzero? (-> self draw death-timer)) + (suspend) + ) + (ja-channel-set! 0) + (ja-post) + (if (and (-> self entity) (= (-> self entity extra process) self)) + (go-virtual wait-for-start) + ) + ) + :post (behavior () + (vector-v++! (-> self root transv) (compute-acc-due-to-gravity (-> self root) (new-stack-vector0) 0.0)) + (if (< (-> self root dynam gravity-max) (vector-length (-> self root transv))) + (vector-normalize! (-> self root transv) (-> self root dynam gravity-max)) + ) + (let ((v1-12 (-> self root)) + (a2-1 (new 'stack-no-clear 'collide-query)) + ) + (set! (-> a2-1 collide-with) (collide-spec backgnd crate obstacle pusher)) + (set! (-> a2-1 ignore-process0) self) + (set! (-> a2-1 ignore-process1) #f) + (set! (-> a2-1 ignore-pat) (-> v1-12 pat-ignore-mask)) + (set! (-> a2-1 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide v1-12 (-> v1-12 transv) a2-1 (meters 0)) + ) + (transform-post) + ) + ) + +(defbehavior flut-init flut ((arg0 entity-actor) (arg1 transformq) (arg2 handle) (arg3 flut-flag) (arg4 symbol)) + (let ((s1-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player)))) + (set! (-> s1-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s1-0 reaction) cshape-reaction-default) + (set! (-> s1-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((v1-6 (new 'process 'collide-shape-prim-sphere s1-0 (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-6 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-6 prim-core action) (collide-action solid can-ride no-standon)) + (set! (-> v1-6 transform-index) 0) + (set-vector! (-> v1-6 local-sphere) 0.0 5734.4 0.0 7372.8) + (set! (-> s1-0 total-prims) (the-as uint 1)) + (set! (-> s1-0 root-prim) v1-6) + ) + (set! (-> s1-0 nav-radius) (* 0.75 (-> s1-0 root-prim local-sphere w))) + (let ((v1-9 (-> s1-0 root-prim))) + (set! (-> s1-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s1-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> self root) s1-0) + ) + (set! (-> self count-lock) #f) + (set! (-> self rider) arg2) + (set! (-> self flags) arg3) + (set! (-> self mode) arg4) + (set! (-> self minimap) #f) + (when arg0 + (process-entity-set! self arg0) + (if (logtest? (-> self entity extra kill-mask) (task-mask ctywide)) + (ctywide-entity-hack) + ) + (process-drawable-from-entity! self arg0) + (set-yaw-angle-clear-roll-pitch! (-> self root) (res-lump-float arg0 'rotoffset)) + ) + (when arg1 + (set! (-> self root trans quad) (-> arg1 trans quad)) + (quaternion-copy! (-> self root quat) (-> arg1 quat)) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-flut" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self shadow-backup) (-> self draw shadow)) + (set! (-> self draw shadow-ctrl) *flut-shadow-control*) + (let ((v1-33 (-> self node-list data))) + (set! (-> v1-33 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!)) + (set! (-> v1-33 0 param1) (the-as basic (-> self root trans))) + (set! (-> v1-33 0 param2) (the-as basic (-> self extra-trans))) + ) + (set! (-> self condition) (res-lump-value arg0 'index int :time -1000000000.0)) + (set! (-> self fact) + (new 'process 'fact-info self (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc)) + ) + (if (not (logtest? arg3 (flut-flag ff0))) + (setup-masks (-> self draw) 0 2) + ) + (set! (-> self nav-sphere-handle) (the-as handle #f)) + (set! (-> self color-index) (mod (the-as int (sar (the-as int arg3) 32)) (-> *flut-color-table* length))) + (flut-color-from-index (-> self color-index)) + (when (logtest? (-> self flags) (flut-flag ff1)) + (set! (-> self root root-prim prim-core action) (collide-action)) + (set! (-> self root penetrated-by) (the-as penetrate -1)) + ) + (if (and (-> self entity) (not (logtest? arg3 (flut-flag ff2)))) + (move-to-ground + (-> self root) + 8192.0 + 40960.0 + #t + (collide-spec backgnd obstacle hit-by-player-list hit-by-others-list pusher) + ) + ) + (set! (-> self sound) + (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)) + (cond + ((logtest? arg3 (flut-flag ff2)) + (go-virtual die) + ) + ((handle->process arg2) + (go-virtual idle) + ) + (else + (go-virtual wait-for-start) + ) + ) + ) + +(defmethod init-from-entity! ((this flut) (arg0 entity-actor)) + (flut-init + arg0 + (the-as transformq #f) + (the-as handle #f) + (the-as flut-flag (+ (shl (flut-random-color-index) 32) 1)) + 'normal + ) + ) diff --git a/goal_src/jak3/engine/target/flut/target-flut.gc b/goal_src/jak3/engine/target/flut/target-flut.gc index e9a5cb1aba..d89c16fd2e 100644 --- a/goal_src/jak3/engine/target/flut/target-flut.gc +++ b/goal_src/jak3/engine/target/flut/target-flut.gc @@ -7,3 +7,3750 @@ ;; DECOMP BEGINS +(deftype flut-bank (basic) + ((jump-height-min meters) + (jump-height-max meters) + (double-jump-height-min meters) + (double-jump-height-max meters) + (air-attack-speed meters) + (ground-timeout uint64) + ) + ) + + +(define *FLUT-bank* (new 'static 'flut-bank + :jump-height-min (meters 5) + :jump-height-max (meters 7) + :double-jump-height-min (meters 1) + :double-jump-height-max (meters 2) + :air-attack-speed (meters 20) + :ground-timeout #x96 + ) + ) + +(define *flut-walk-mods* (new 'static 'surface + :name 'run + :turnv 54613.332 + :turnvf 30.0 + :turnvv 524288.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 102400.0 + :target-speed 102400.0 + :seek0 1.5 + :seek90 3.0 + :seek180 2.0 + :fric 1.0 + :nonlin-fric-dist 0.1 + :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 no-turn-around gun-off) + ) + ) + +(define *flut-run-racer-mods* (new 'static 'surface + :name 'run + :turnv 54613.332 + :turnvf 30.0 + :turnvv 524288.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 122880.0 + :target-speed 122880.0 + :seek0 1.5 + :seek90 3.0 + :seek180 2.0 + :fric 1.0 + :nonlin-fric-dist 0.1 + :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 no-turn-around gun-off) + ) + ) + +(define *flut-run-wild-mods* (new 'static 'surface + :name 'run + :turnv 54613.332 + :turnvf 30.0 + :turnvv 32768.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 204800.0 + :target-speed 204800.0 + :seek0 1.5 + :seek90 3.0 + :seek180 1.0 + :nonlin-fric-dist 0.1 + :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 no-turn-around gun-off) + ) + ) + +(define *flut-jump-wild-mods* (new 'static 'surface + :name 'jump + :turnv 131072.0 + :turnvf 30.0 + :turnvv 16384.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 204800.0 + :target-speed 204800.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 + :mode 'air + :flags (surface-flag air gun-off) + ) + ) + +(define *flut-jump-mods* (new 'static 'surface + :name 'jump + :turnv 131072.0 + :turnvf 30.0 + :turnvv 54613.332 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 102400.0 + :target-speed 102400.0 + :seek0 0.9 + :seek90 1.5 + :seek180 1.5 + :fric 0.2 + :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 + :mode 'air + :flags (surface-flag air gun-off) + ) + ) + +(define *flut-jump-racer-mods* (new 'static 'surface + :name 'jump + :turnv 131072.0 + :turnvf 30.0 + :turnvv 54613.332 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 122880.0 + :target-speed 122880.0 + :seek0 0.9 + :seek90 1.5 + :seek180 1.5 + :fric 0.2 + :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 + :mode 'air + :flags (surface-flag air gun-off) + ) + ) + +(define *flut-double-jump-mods* (new 'static 'surface + :name 'jump-double + :turnv 131072.0 + :turnvf 30.0 + :turnvv 54613.332 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 102400.0 + :target-speed 102400.0 + :seek0 0.9 + :seek90 1.5 + :seek180 1.5 + :fric 0.1 + :nonlin-fric-dist 10.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 + :mode 'air + :flags (surface-flag air gun-off) + ) + ) + +(define *flut-double-jump-racer-mods* (new 'static 'surface + :name 'jump-double + :turnv 131072.0 + :turnvf 30.0 + :turnvv 54613.332 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 122880.0 + :target-speed 122880.0 + :seek0 0.9 + :seek90 1.5 + :seek180 1.5 + :fric 0.1 + :nonlin-fric-dist 10.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 + :mode 'air + :flags (surface-flag air gun-off) + ) + ) + +(define *flut-run-attack-mods* (new 'static 'surface + :name 'wheel-flip + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 122880.0 + :target-speed 143360.0 + :seek90 0.5 + :seek180 0.15 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 0.25 + :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 + :mode 'attack + :flags (surface-flag no-turn-around turn-to-pad attack gun-off) + ) + ) + +(define *flut-air-attack-mods* (new 'static 'surface + :name 'flop + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 122880.0 + :target-speed 122880.0 + :seek0 1.0 + :seek90 0.3 + :seek180 1.5 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 0.25 + :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 + :mode 'attack + :flags (surface-flag air attack gun-off) + ) + ) + +(defun flut-leg-ik-callback ((arg0 joint-mod-ik) (arg1 object) (arg2 object) (arg3 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 'vector))) + (set! (-> s5-0 quad) (-> arg3 quad)) + (let ((f0-1 (- (-> arg3 y) (-> (target-pos 0) y)))) + (if (< 6144.0 f0-1) + (set! f0-1 6144.0) + ) + (if (< f0-1 -6144.0) + (set! f0-1 -6144.0) + ) + (+! (-> arg0 user-position y) f0-1) + ) + (let ((f0-4 (- (-> arg3 y) (-> arg0 user-position y)))) + (seek! (-> arg0 user-float) f0-4 (* 40960.0 (seconds-per-frame))) + ) + (let* ((f28-0 (-> arg0 user-float)) + (f30-1 (lerp-scale 1.0 0.0 f28-0 0.0 12288.0)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-12 s5-0)) + (let ((a0-4 *up-vector*)) + (let ((a1-4 8192.0)) + (.mov vf7 a1-4) + ) + (.lvf vf5 (&-> a0-4 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 (&-> s3-0 quad) vf6) + (vector-float*! (new 'stack-no-clear 'vector) *up-vector* -16384.0) + (let ((s2-0 (new 'stack-no-clear 'vector))) + 0.0 + (let ((f0-11 (intersect-ray-plane s3-0 *up-vector* (-> arg0 user-position) *up-vector*)) + (a0-7 s2-0) + ) + (let ((v1-15 *up-vector*)) + (let ((a1-7 f0-11)) + (.mov vf7 a1-7) + ) + (.lvf vf5 (&-> v1-15 quad)) + ) + (.lvf vf4 (&-> s3-0 quad)) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf5 vf7 :mask #b111) + (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.svf (&-> a0-7 quad) vf6) + ) + (let ((a0-8 s2-0)) + (let ((v1-16 *up-vector*)) + (let ((a1-8 (- f28-0))) + (.mov vf7 a1-8) + ) + (.lvf vf5 (&-> v1-16 quad)) + ) + (.lvf vf4 (&-> arg3 quad)) + (.add.x.vf 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) + ) + (let ((a1-9 s5-0)) + (let ((v1-17 s5-0)) + (let ((a0-10 (vector-! (new 'stack-no-clear 'vector) s2-0 s5-0))) + (let ((a2-6 (fmin 1.0 (* (-> arg0 user-blend) f30-1)))) + (.mov vf7 a2-6) + ) + (.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-9 quad) vf6) + ) + ) + ) + (set-ik-target! arg0 s5-0) + ) + (none) + ) + ) + +;; WARN: Return type mismatch int vs object. +(defbehavior flut-update-ik target () + (local-vars (sv-720 vector)) + (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 'collide-query)) + (s5-0 (-> (the-as process-drawable (-> self parent 0)) root)) + ) + (let ((a1-0 (-> gp-0 bbox)) + (v1-2 (-> s5-0 trans)) + (a0-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-0 x) 10240.0) + (set! (-> a0-0 y) 10240.0) + (set! (-> a0-0 z) 10240.0) + (set! (-> a0-0 w) 1.0) + (vector-! (the-as vector a1-0) v1-2 a0-0) + ) + (let ((a1-2 (-> gp-0 bbox max)) + (v1-3 (-> s5-0 trans)) + (a0-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-1 x) 10240.0) + (set! (-> a0-1 y) 10240.0) + (set! (-> a0-1 z) 10240.0) + (set! (-> a0-1 w) 1.0) + (vector+! a1-2 v1-3 a0-1) + ) + (set! (-> gp-0 collide-with) (-> (the-as collide-shape s5-0) root-prim prim-core collide-with)) + (set! (-> gp-0 ignore-process0) #f) + (set! (-> gp-0 ignore-process1) #f) + (set! (-> gp-0 ignore-pat) (-> (the-as collide-shape s5-0) pat-ignore-mask)) + (fill-using-bounding-box *collide-cache* gp-0) + (dotimes (s4-0 2) + (let ((s3-0 (-> self mech-ik s4-0))) + #t + (set! (-> s3-0 callback) (the-as (function joint-mod-ik matrix matrix vector object) flut-leg-ik-callback)) + (let ((a1-6 (not (logtest? (target-flags lleg-no-ik rleg-no-ik) (-> *target* target-flags))))) + (enable-set! s3-0 a1-6) + ) + (-> s3-0 shoulder-matrix-no-ik) + (let ((v1-17 (-> s3-0 elbow-matrix-no-ik)) + (s0-0 (new 'stack-no-clear 'vector)) + ) + (set! sv-720 (new 'stack-no-clear 'vector)) + (let ((a0-8 (-> *y-vector* quad))) + (set! (-> sv-720 quad) a0-8) + ) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (let ((s1-0 (new 'stack-no-clear 'vector))) + (let ((a1-8 s0-0)) + (let ((a0-11 (-> v1-17 trans))) + (let ((v1-18 (-> v1-17 uvec))) + (let ((a2-8 (-> s3-0 hand-dist))) + (.mov vf7 a2-8) + ) + (.lvf vf5 (&-> v1-18 quad)) + ) + (.lvf vf4 (&-> a0-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 (&-> a1-8 quad) vf6) + ) + (let ((f0-11 + (lerp-scale 1.0 0.0 (- (-> s0-0 y) (-> (the-as collide-shape-moving s5-0) gspot-pos y)) 2048.0 12288.0) + ) + ) + (seek! (-> s3-0 user-blend) f0-11 (* 4.0 (seconds-per-frame))) + ) + (let ((a1-11 (-> gp-0 start-pos))) + (let ((v1-22 s0-0)) + (let ((a0-14 sv-720)) + (let ((a2-12 6144.0)) + (.mov vf7 a2-12) + ) + (.lvf vf5 (&-> a0-14 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 (&-> a1-11 quad) vf6) + ) + (let ((v1-23 (-> gp-0 move-dist)) + (f0-16 -20480.0) + ) + (vector-float*! v1-23 sv-720 f0-16) + ) + (let ((v1-25 gp-0)) + (set! (-> v1-25 radius) 4.096) + (set! (-> v1-25 collide-with) (-> gp-0 collide-with)) + (set! (-> v1-25 ignore-process0) #f) + (set! (-> v1-25 ignore-process1) #f) + (set! (-> v1-25 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-25 action-mask) (collide-action solid)) + ) + (let ((f30-0 (probe-using-line-sphere *collide-cache* gp-0))) + (cond + ((>= f30-0 0.0) + (set! (-> s1-0 quad) (-> gp-0 best-other-tri normal quad)) + (when (< 8192.0 (vector-vector-angle-safe *y-vector* s1-0)) + (let* ((a1-16 (vector-normalize! (vector-cross! (new 'stack-no-clear 'vector) *y-vector* s1-0) 1.0)) + (a2-14 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) a1-16 8192.0)) + ) + (vector-orient-by-quat! s1-0 *y-vector* a2-14) + ) + ) + (let ((a1-18 s2-0)) + (let ((v1-32 (-> gp-0 start-pos))) + (let ((a0-29 (-> gp-0 move-dist))) + (let ((a2-15 f30-0)) + (.mov vf7 a2-15) + ) + (.lvf vf5 (&-> a0-29 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-18 quad) vf6) + ) + (set! (-> s3-0 user-position quad) (-> s2-0 quad)) + (set! (-> s3-0 user-normal quad) (-> s1-0 quad)) + ) + (else + (set! (-> s0-0 y) (-> (target-pos 0) y)) + (set! (-> s3-0 user-position quad) (-> s0-0 quad)) + (set! (-> s3-0 user-normal quad) (-> *y-vector* quad)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + ) + ) + +(defbehavior target-flut-get-off? target () + (and (not (and (logtest? (-> self control mod-surface flags) (surface-flag air)) + (not (logtest? (-> self control status) (collide-status on-surface))) + ) + ) + (and (time-elapsed? (-> self control rider-time) (seconds 1)) (-> *setting-control* user-current pilot-exit)) + ) + ) + +(defbehavior target-flut-post-post target () + (vector+! (-> self flut flut-trans) (-> self control trans) (-> self control cspace-offset)) + (quaternion-copy! (the-as quaternion (-> self flut flut-quat)) (-> self control quat)) + (set! (-> self flut flut-scale quad) (-> self control scale quad)) + (let ((v1-8 (-> *target-shadow-control* settings shadow-dir quad))) + (set! (-> *flut-shadow-control* settings shadow-dir quad) v1-8) + ) + 0 + (none) + ) + +(defbehavior target-flut-wild-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) + ) + ) + (set-vector! + (-> self control transv-ctrl) + 0.0 + (-> self control transv-ctrl y) + (-> self control current-surface target-speed) + 1.0 + ) + (add-gravity) + (do-rotations2) + (reverse-conversions (-> self control transv)) + (pre-collide-setup) + (let ((a2-3 (new 'stack-no-clear 'collide-query))) + (let ((v1-33 (-> self control))) + (set! (-> a2-3 collide-with) (-> v1-33 root-prim prim-core collide-with)) + (set! (-> a2-3 ignore-process0) self) + (set! (-> a2-3 ignore-process1) #f) + (set! (-> a2-3 ignore-pat) (-> v1-33 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) + ) + (ja-post) + (joint-points) + (do-target-gspot) + (target-powerup-process) + (target-flut-post-post) + 0 + (none) + ) + +(defbehavior target-flut-post target () + (cond + ((and (= (-> self flut mode) 'wild) (not (logtest? (-> self focus-status) (focus-status dead hit)))) + (target-flut-wild-post) + ) + (else + (target-post) + (target-flut-post-post) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs object. +(defbehavior target-flut-falling-anim-trans target () + (cond + ((not (-> self flut as-daxter?)) + (let ((v1-4 (ja-group))) + (b! + (and v1-4 (or (= v1-4 jakb-flut-jump-loop-ja) (= v1-4 jakb-flut-jump-land-ja))) + cfg-10 + :delay (empty-form) + ) + ) + (ja-channel-push! 1 (seconds 0.33)) + (ja :group! jakb-flut-jump-loop-ja) + (b! #t cfg-35 :delay (nop!)) + (label cfg-10) + (cond + ((and (logtest? (-> self control status) (collide-status on-surface)) + (let ((v1-17 (ja-group))) + (not (and v1-17 (= v1-17 jakb-flut-jump-land-ja))) + ) + ) + (ja-channel-push! 1 (seconds 0.02)) + (ja :group! jakb-flut-jump-land-ja) + ) + ((let ((v1-26 (ja-group))) + (and v1-26 (= v1-26 jakb-flut-jump-loop-ja)) + ) + (ja :num! (loop!)) + ) + ((let ((v1-35 (ja-group))) + (and v1-35 (= v1-35 jakb-flut-jump-land-ja)) + ) + (ja :num! (seek!)) + ) + ) + (label cfg-35) + ) + (else + (let ((v1-47 (ja-group))) + (cond + ((not (and v1-47 (= v1-47 jakb-mech-death-a-ja))) + (ja-channel-push! 1 (seconds 0.33)) + (ja :group! jakb-mech-death-a-ja) + ) + ((let ((v1-56 (ja-group))) + (and v1-56 (= v1-56 jakb-mech-death-a-ja)) + ) + (ja :num! (loop!)) + ) + ) + ) + ) + ) + 0 + ) + +;; WARN: Return type mismatch symbol vs object. +(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)) + (if (!= (-> self skel root-channel 0) (-> self skel channel)) + (ja-channel-push! 2 (seconds 0.05)) + (ja-channel-set! 2) + ) + (ja :group! jakb-flut-jump-land-ja :num! min) + (ja :chan 1 :group! jakb-flut-jump-forward-land-ja :num! min) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + (ja :chan 1 :num! (chan 0)) + ) + #f + ) + ((let ((v1-33 (ja-group))) + (and v1-33 (or (= v1-33 jakb-flut-jump-ja) (= v1-33 jakb-flut-jump-land-ja))) + ) + #f + ) + ((let ((v1-39 (ja-group))) + (and v1-39 (= v1-39 jakb-flut-double-jump-ja)) + ) + (ja-channel-set! 1) + (ja-no-eval :group! jakb-flut-jump-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + #f + ) + ((let ((v1-68 (ja-group))) + (and v1-68 (or (= v1-68 jakb-flut-air-attack-ja) (= v1-68 jakb-flut-air-attack-loop-ja))) + ) + (ja-channel-set! 1) + (ja-no-eval :group! jakb-flut-air-attack-land-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!)) + ) + #f + ) + ) + ) + ) + +(defbehavior target-flut-standard-event-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (cond + ((and (= arg2 'query) (= (-> arg3 param 0) 'mode)) + 'flut + ) + (else + (case arg2 + (('event-step) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 127 (seconds 0.07)) + ) + (('end-mode) + (case (-> arg3 param 0) + (('flut) + (-> self flut mode) + (go target-flut-get-off (process->handle arg0)) + ) + ) + ) + (('touched) + (cond + ((= (-> self flut mode) 'racer) + (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) (-> arg3 param 0)) + (set! (-> a1-2 param 1) + (the-as + uint + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self flut attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'flut) + (penetrate-using (-> self control penetrate-using)) + ) + ) + ) + ) + (let ((s5-0 (send-event-function arg0 a1-2))) + (when s5-0 + (play-effect-sound + (-> self skel effect) + (the-as symbol "sound") + -1.0 + 28 + (the-as basic #f) + (static-sound-name "flut-punch-hit") + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.2)) + (let* ((v1-24 (-> self game)) + (a0-27 (+ (-> v1-24 attack-id) 1)) + ) + (set! (-> v1-24 attack-id) a0-27) + (set! (-> self flut attack-id) a0-27) + ) + ) + s5-0 + ) + ) + ) + (else + (target-generic-event-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-flut-hit + ) + ) + (('shove) + (when (not (and (-> self next-state) (= (-> self next-state name) '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-flut-hit 'shove (-> self attack-info-rec)) + ) + ) + (('falling) + (if (not (and (-> self next-state) (= (-> self next-state name) 'target-flut-death))) + (go target-flut-falling #f) + ) + ) + (('swim) + (send-event + self + '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 'drown)) + ) + ) + ) + (('change-mode) + (case (-> arg3 param 0) + (('grab) + (when (not (focus-test? self dead)) + (if (not (-> arg3 param 1)) + #t + (go target-flut-grab) + ) + ) + ) + (('kanga) + (go target-flut-kanga-catch (process->handle arg0) 'kanga) + ) + (('normal) + (go target-flut-get-off (process->handle arg0)) + ) + ) + ) + (('eject) + (go target-flut-eject #f) + ) + (('clone-anim) + (go target-flut-clone-anim (process->handle (the-as process (-> arg3 param 0)))) + ) + (('mode-time) + (- (current-time) (-> self flut flut-start-time)) + ) + (else + (target-generic-event-handler arg0 arg1 arg2 arg3) + ) + ) + ) + ) + ) + +(defbehavior target-flut-dangerous-event-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('touched) + (if ((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) + ) + (target-flut-standard-event-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-flut-hit + ) + ) + (else + (target-flut-standard-event-handler arg0 arg1 arg2 arg3) + ) + ) + ) + +(defbehavior target-fldax-enter target () + (ja-channel-set! 0) + (set! (-> self flut 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) + ) + +(defbehavior target-fldax-exit target () + (ja-channel-set! 0) + (set! (-> self draw art-group) (-> self flut art-group-backup)) + (logclear! (-> self draw status) (draw-control-status no-draw-bounds2)) + (send-event (ppointer->process (-> self sidekick)) 'matrix #f) + ) + +(defstate target-flut-start (target) + :event target-flut-standard-event-handler + :exit (behavior () + (when (not (and (-> self next-state) + (let ((v1-3 (-> self next-state name))) + (or (= v1-3 'target-flut-stance) + (= v1-3 'target-flut-walk) + (= v1-3 'target-flut-run-wild) + (= v1-3 'target-flut-jump) + (= v1-3 'target-flut-double-jump) + (= v1-3 'target-flut-hit-ground) + (= v1-3 'target-flut-falling) + (= v1-3 'target-flut-running-attack) + (= v1-3 'target-flut-air-attack) + (= v1-3 'target-flut-air-attack-hit-ground) + (= v1-3 'target-flut-hit) + (= v1-3 'target-flut-death) + (= v1-3 'target-flut-get-on) + (= v1-3 'target-flut-get-off) + (= v1-3 'target-flut-get-off-jump) + (= v1-3 'target-flut-eject) + (= v1-3 'target-flut-grab) + (= v1-3 'target-flut-clone-anim) + (= v1-3 'target-flut-kanga-catch) + ) + ) + ) + ) + (+! (-> *game-info* flut-count) -1) + (let ((v1-7 (-> self manipy))) + (when v1-7 + (deactivate (-> v1-7 0)) + (set! (-> self manipy) (the-as (pointer manipy) #f)) + ) + ) + (if (-> self flut as-daxter?) + (target-fldax-exit) + ) + (logclear! (-> self focus-status) (focus-status flut)) + (set! (-> self control mod-surface) *walk-mods*) + (logclear! (-> self target-flags) (target-flags tf6)) + (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-collide-set! 'normal 0.0) + (set! (-> self control reaction) target-collision-reaction) + (set! (-> self control cspace-offset quad) (the-as uint128 0)) + (remove-setting! 'sound-flava) + (setting-control-method-14 *setting-control* (-> self flut mode-sound-bank)) + (set! (-> self flut mode-sound-bank) #f) + (set! (-> self control pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :board #x1) + ) + (remove-setting! 'string-spline-accel) + (remove-setting! 'string-spline-max-move) + (remove-setting! 'string-spline-accel-player) + (remove-setting! 'string-spline-max-move-player) + (remove-setting! 'fov) + (remove-setting! 'string-min-length) + (remove-setting! 'string-max-length) + (remove-setting! 'string-min-height) + (remove-setting! 'string-max-height) + (target-exit) + ) + ) + :code (behavior ((arg0 handle) (arg1 symbol) (arg2 int)) + (local-vars + (sv-96 process) + (sv-112 (function vector entity-actor skeleton-group vector manipy-options none :behavior manipy)) + (sv-128 vector) + (sv-144 entity-actor) + ) + (target-exit) + (+! (-> *game-info* flut-count) 1) + (set-setting! 'string-spline-accel 'abs (meters 1) 0) + (set-setting! 'string-spline-max-move 'abs (meters 10) 0) + (set-setting! 'string-spline-accel-player 'abs (meters 1) 0) + (set-setting! 'string-spline-max-move-player 'abs (meters 10) 0) + (case arg1 + (('wild) + (set-setting! 'string-min-length 'abs (meters 5) 0) + (set-setting! 'string-max-length 'abs (meters 5) 0) + (set-setting! 'string-min-height 'abs (meters 3) 0) + (set-setting! 'string-max-height 'abs (meters 3) 0) + (set-setting! 'fov 'abs (degrees 95.0) 0) + ) + ) + (when (zero? (-> self flut)) + (set! (-> self flut) (new 'process 'flut-info)) + (set! (-> self flut mode-sound-bank) #f) + ) + (set! (-> self flut stick-lock) #f) + (set! arg2 (cond + ((>= arg2 0) + (empty) + arg2 + ) + (else + (flut-random-color-index) + ) + ) + ) + (set! (-> self flut color-index) arg2) + (case arg1 + ((#t) + (set! (-> self flut mode) (the-as basic 'normal)) + (set! (-> self flut as-daxter?) #f) + ) + (('racer) + (set! (-> self flut mode) (the-as basic arg1)) + (set! (-> self flut as-daxter?) #f) + ) + (('wild) + (set! (-> self flut mode) (the-as basic arg1)) + (set! (-> self flut as-daxter?) #t) + ) + (else + (set! (-> self flut mode) (the-as basic arg1)) + (set! (-> self flut as-daxter?) #f) + ) + ) + (if (-> self flut as-daxter?) + (target-fldax-enter) + ) + (let* ((v1-34 (-> self game)) + (a0-22 (+ (-> v1-34 attack-id) 1)) + ) + (set! (-> v1-34 attack-id) a0-22) + (set! (-> self flut attack-id) a0-22) + ) + (set! (-> self flut flap-sound-id) (the-as uint (new-sound-id))) + (set! (-> self flut mode-sound-bank) (add-setting! 'mode-sound-bank 'modeflut 0.0 0)) + (set! (-> self flut entity) #f) + (let ((v1-41 (handle->process arg0))) + (if v1-41 + (set! (-> self flut entity) (-> v1-41 entity)) + ) + ) + (when (not (and (-> self flut entity) (logtest? (-> self flut entity extra level info level-flags) (level-flags lf8))) + ) + (dotimes (v1-49 (-> *level* length)) + (let ((a0-40 (-> *level* level v1-49))) + (when (= (-> a0-40 status) 'active) + (when (logtest? (-> a0-40 info level-flags) (level-flags lf8)) + (let ((a0-42 (-> a0-40 entity data 0 entity))) + (when a0-42 + (set! (-> self flut entity) (the-as entity-actor a0-42)) + (goto cfg-36) + ) + ) + ) + ) + ) + ) + ) + (label cfg-36) + (target-collide-set! 'flut 0.0) + (set! (-> self control transv quad) (the-as uint128 0)) + (set! (-> self control ctrl-xz-vel) 0.0) + (logior! (-> self focus-status) (focus-status flut)) + (set-time! (-> self flut flut-start-time)) + (set! (-> self control pat-ignore-mask) (new 'static 'pat-surface :noentity #x1 :nomech #x1)) + (let ((s4-1 (current-time))) + (label cfg-37) + (let ((s3-0 (-> self entity)) + (s2-0 (-> self level)) + ) + (process-entity-set! self (-> self flut entity)) + (let ((s1-0 (get-process *8k-dead-pool* manipy #x20000 1))) + (set! (-> self manipy) + (the-as + (pointer manipy) + (when s1-0 + (let ((t9-18 (method-of-type manipy activate))) + (t9-18 (the-as manipy s1-0) self "manipy" (the-as pointer #x70004000)) + ) + (let ((s0-0 run-function-in-process)) + (set! sv-96 s1-0) + (set! sv-112 manipy-init) + (set! sv-128 (-> self control trans)) + (set! sv-144 (-> self entity)) + (let ((t0-10 (art-group-get-by-name *level* "skel-flut" (the-as (pointer level) #f))) + (t1-10 'collide-shape-moving) + (t2-0 0) + ) + ((the-as (function object object object object object object object none) s0-0) + sv-96 + sv-112 + sv-128 + sv-144 + t0-10 + t1-10 + t2-0 + ) + ) + ) + (-> s1-0 ppointer) + ) + ) + ) + ) + (set! (-> self entity) s3-0) + (set! (-> self level) s2-0) + ) + (when (not (or (-> self manipy) (time-elapsed? s4-1 (seconds 3)))) + (suspend) + (goto cfg-37) + ) + ) + (when (-> self manipy) + (send-event + (ppointer->process (-> self manipy)) + 'trans-hook + (lambda :behavior target + () + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (ppointer->process (-> self parent)))) + (set! (-> self control trans quad) (-> (the-as target gp-0) flut flut-trans quad)) + (let ((v1-5 (-> (the-as target gp-0) flut flut-quat quad))) + (set! (-> self control quat quad) v1-5) + ) + (set! (-> self control scale quad) (-> (the-as target gp-0) flut flut-scale quad)) + (set! (-> self control ground-pat material) + (the-as int (-> (the-as target gp-0) control ground-pat material)) + ) + (set! (-> self draw light-index) (-> (the-as target gp-0) draw light-index)) + (let ((t9-0 flut-color-from-index) + (v1-14 (-> self parent)) + ) + (t9-0 (-> (the-as target (if v1-14 + (the-as target (-> v1-14 0 self)) + ) + ) + flut + color-index + ) + ) + ) + (let ((v1-18 (-> self draw color-mult))) + (let ((a0-19 (-> self draw color-mult)) + (a1-1 (-> (the-as target gp-0) draw color-mult)) + ) + (.lvf vf4 (&-> a0-19 quad)) + (.lvf vf5 (&-> a1-1 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-18 quad) vf6) + ) + (let ((v0-1 (-> (the-as target gp-0) draw color-emissive quad))) + (set! (-> self draw color-emissive quad) v0-1) + v0-1 + ) + ) + ) + ) + ) + (send-event (ppointer->process (-> self manipy)) 'anim-mode 'loop) + (send-event (ppointer->process (-> self manipy)) 'art-joint-anim "flut-get-on" 0) + (send-event (ppointer->process (-> self manipy)) 'blend-shape #t) + (send-event + (ppointer->process (-> self manipy)) + 'eval + (lambda :behavior target + () + (set! (-> self state-hook) #f) + (let ((v1-1 (-> *target-shadow-control* settings shadow-dir quad))) + (set! (-> *flut-shadow-control* settings shadow-dir quad) v1-1) + ) + (set! (-> self draw shadow-ctrl) *flut-shadow-control*) + (set! (-> self mech-ik 0) (new 'process 'joint-mod-ik self 7 3104.768)) + (set! (-> self mech-ik 1) (new 'process 'joint-mod-ik self 15 3104.768)) + (dotimes (v1-5 2) + (let ((a0-6 (-> self mech-ik v1-5))) + (set! (-> a0-6 elbow-pole-vector-axis) (the-as uint 2)) + (set! (-> a0-6 elbow-rotation-axis) (the-as uint 0)) + (set! (-> a0-6 callback) (the-as (function joint-mod-ik matrix matrix vector object) flut-leg-ik-callback)) + (logior! (-> a0-6 flags) (joint-mod-ik-flags elbow-trans-neg)) + ) + ) + #f + ) + ) + (send-event (ppointer->process (-> self manipy)) 'post-hook (lambda () (flut-update-ik))) + (case (-> self flut mode) + (('wild) + (send-event (ppointer->process (-> self manipy)) 'segment 0 16) + (set! (-> self flut wild-turn-time) (+ (current-time) (rand-vu-int-range (seconds 1) (seconds 2)))) + (set! (-> self flut wild-turn-rate) (rand-vu-float-range -32768.0 32768.0)) + ) + ) + ) + (remove-exit) + (cond + ((or (= arg1 #t) (= arg1 'racer)) + (send-event (ppointer->process (-> self manipy)) 'anim-mode 'clone-anim) + (go target-flut-stance) + ) + (else + (go target-flut-get-on arg0) + ) + ) + ) + :post target-post + ) + +(defstate target-flut-stance (target) + :event target-flut-standard-event-handler + :enter (behavior () + (set! (-> self control mod-surface) *flut-walk-mods*) + ) + :exit (-> target-flut-start exit) + :trans (behavior () + (if (= (-> self flut mode) 'wild) + (go target-flut-run-wild) + ) + (if (move-legs?) + (go target-flut-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? 'flut) + ) + (go target-flut-jump (-> *FLUT-bank* jump-height-min) (-> *FLUT-bank* jump-height-max)) + ) + (if (and (cpad-pressed? (-> self control cpad number) square) (can-hands? #t)) + (go target-flut-running-attack) + ) + (if (and (not (logtest? (-> self control status) (collide-status on-surface))) + (time-elapsed? (-> self control last-time-on-surface) (the-as time-frame (-> *FLUT-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-flut-falling #f) + ) + (if (and (or (cpad-pressed? (-> self control cpad number) triangle) (not (-> *setting-control* user-current pilot))) + (target-flut-get-off?) + ) + (go target-flut-get-off (the-as handle #f)) + ) + ) + :code (behavior () + (let ((gp-0 22)) + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (or (= v1-2 jakb-flut-walk-ja) (= v1-2 jakb-flut-run-squash-ja))) + (set! gp-0 60) + ) + ((let ((v1-9 (ja-group))) + (and v1-9 (= v1-9 jakb-flut-get-on-ja)) + ) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ((let ((v1-24 (ja-group))) + (and v1-24 (= v1-24 jakb-flut-smack-surface-ja)) + ) + (ja-no-eval :group! jakb-flut-smack-surface-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((let ((v1-54 (ja-group))) + (and v1-54 (= v1-54 jakb-flut-hit-back-ja)) + ) + (ja-no-eval :group! jakb-flut-hit-back-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((let ((v1-84 (ja-group))) + (and v1-84 (= v1-84 jakb-flut-running-attack-ja)) + ) + (ja-no-eval :group! jakb-flut-running-attack-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + (cond + ((-> self flut as-daxter?) + (let ((v1-116 (ja-group))) + (if (not (and v1-116 (= v1-116 jakb-mech-pull-ja))) + (ja-channel-push! 1 (the-as time-frame gp-0)) + ) + ) + (ja :group! jakb-mech-pull-ja) + ) + (else + (let ((v1-126 (ja-group))) + (if (not (and v1-126 (= v1-126 jakb-flut-idle-ja))) + (ja-channel-push! 1 (the-as time-frame gp-0)) + ) + ) + (ja :group! jakb-flut-idle-ja) + ) + ) + ) + (until #f + (can-play-stance-amibent?) + (suspend) + (ja :num! (loop!)) + ) + #f + ) + :post target-flut-post + ) + +(defstate target-flut-walk (target) + :event target-flut-standard-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (case (-> self flut mode) + (('racer) + (set! (-> self control mod-surface) *flut-run-racer-mods*) + ) + (else + (set! (-> self control mod-surface) *flut-walk-mods*) + ) + ) + (set! (-> self control unknown-word04) (the-as uint (-> self control mod-surface turnv))) + (set! (-> self control did-move-to-pole-or-max-jump-height) (-> self control mod-surface target-speed)) + ) + :exit (behavior () + (set! (-> self control mod-surface turnv) (the-as float (-> self control unknown-word04))) + (set! (-> self control mod-surface target-speed) (-> self control did-move-to-pole-or-max-jump-height)) + (logclear! (-> self target-flags) (target-flags lleg-no-ik rleg-no-ik)) + (let ((v1-9 (-> self skel effect))) + (set! (-> v1-9 channel-offset) 0) + ) + 0 + ((-> target-flut-start exit)) + ) + :trans (behavior () + (if (= (-> self flut mode) 'wild) + (go target-flut-run-wild) + ) + (if (not (move-legs?)) + (go target-flut-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? 'flut) + ) + (go target-flut-jump (-> *FLUT-bank* jump-height-min) (-> *FLUT-bank* jump-height-max)) + ) + (if (and (cpad-pressed? (-> self control cpad number) square) (can-hands? #t)) + (go target-flut-running-attack) + ) + (if (and (not (logtest? (-> self control status) (collide-status on-surface))) + (time-elapsed? (-> self control last-time-on-surface) (the-as time-frame (-> *FLUT-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-flut-falling #f) + ) + (let ((f30-0 (fabs (deg-diff (quaternion-y-angle (-> self control dir-targ)) (y-angle (-> self control)))))) + (set! (-> self control mod-surface turnv) (lerp-scale + (the-as float (-> self control unknown-word04)) + (* 4.0 (the-as float (-> self control unknown-word04))) + f30-0 + 8192.0 + 21845.334 + ) + ) + (if (and (= (-> self control surf name) '*tar-surface*) (< 8192.0 f30-0)) + (seek! (-> self control mod-surface target-speed) 4096.0 (* 245760.0 (seconds-per-frame))) + (seek! + (-> self control mod-surface target-speed) + (-> self control did-move-to-pole-or-max-jump-height) + (* 81920.0 (seconds-per-frame)) + ) + ) + ) + (if (and (or (cpad-pressed? (-> self control cpad number) triangle) (not (-> *setting-control* user-current pilot))) + (target-flut-get-off?) + ) + (go target-flut-get-off (the-as handle #f)) + ) + ) + :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 jakb-flut-idle-ja)) + (set! gp-0 60) + ) + ((let ((v1-9 (ja-group))) + (and v1-9 + (or (= v1-9 jakb-flut-jump-ja) + (= v1-9 jakb-flut-jump-loop-ja) + (= v1-9 jakb-flut-air-attack-ja) + (= v1-9 jakb-flut-air-attack-land-ja) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.08)) + (ja-no-eval :group! jakb-flut-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 jakb-flut-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 jakb-flut-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! jakb-flut-walk-ja :num! (loop!) :dist 20480.0 :frame-num f26-0) + (ja-no-eval :chan 1 + :group! jakb-flut-jog-ja + :num! (identity f26-0) + :frame-interp0 f30-0 + :frame-interp1 f30-0 + :dist 47104.0 + ) + (ja-no-eval :chan 2 + :group! jakb-flut-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 control ctrl-xz-vel) 36864.0 40960.0)) + (f26-1 (lerp-scale 0.0 1.0 (-> self control ctrl-xz-vel) 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) + (cond + ((< 0.5 f28-0) + (let ((v1-97 (-> self skel effect))) + (set! (-> v1-97 channel-offset) 2) + ) + 0 + (logclear! (-> self target-flags) (target-flags lleg-no-ik rleg-no-ik)) + ) + ((< 0.9 f30-0) + (let ((v1-103 (-> self skel effect))) + (set! (-> v1-103 channel-offset) 1) + ) + 0 + (logclear! (-> self target-flags) (target-flags lleg-no-ik rleg-no-ik)) + ) + (else + (let ((v1-108 (-> self skel effect))) + (set! (-> v1-108 channel-offset) 0) + ) + 0 + (logior! (-> self target-flags) (target-flags lleg-no-ik rleg-no-ik)) + ) + ) + (let* ((f0-19 (* (current-cycle-distance (-> self skel)) (-> self control scale x))) + (f0-21 (/ (* 58.0 (-> self control ctrl-xz-vel)) (* 60.0 f0-19))) + ) + (ja :num! (loop! f0-21)) + ) + (ja :chan 1 :num! (chan 0)) + (ja :chan 2 :num! (chan 0)) + ) + ) + #f + ) + :post target-flut-post + ) + +(defstate target-flut-run-wild (target) + :parent target-flut-walk + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self control mod-surface) *flut-run-wild-mods*) + ) + :exit (behavior () + (logclear! (-> self target-flags) (target-flags lleg-no-ik rleg-no-ik)) + (let ((v1-3 (-> self skel effect))) + (set! (-> v1-3 channel-offset) 0) + ) + 0 + ((-> target-flut-start 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? 'flut) + ) + (go target-flut-jump (-> *FLUT-bank* jump-height-min) (-> *FLUT-bank* jump-height-max)) + ) + (when (and (logtest? (-> self control status) (collide-status touch-wall)) + (< 40960.0 (-> self control ctrl-xz-vel)) + (< 0.7 (-> self control touch-angle)) + (< (vector-dot (-> self control wall-contact-normal) (-> self control dynam gravity-normal)) 0.3) + ) + (if (logtest? (-> self control status) (collide-status touch-actor)) + (send-event self '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 10)) + (shove-up (meters 0.5)) + (angle 'shove) + ) + ) + ) + (send-event self '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-back (meters 10)) + (shove-up (meters 2)) + (angle 'shove) + (mode 'death) + ) + ) + ) + ) + ) + (when (time-elapsed? (-> self flut flut-start-time) (seconds 5)) + (if (and (< (target-move-dist (seconds 1)) 409.6) + (not (and *cheat-mode* (cpad-hold? (-> self control cpad number) r2))) + ) + (send-event + self + '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 'death)) + ) + ) + ) + ) + (if (and (not (logtest? (-> self control status) (collide-status on-surface))) + (time-elapsed? (-> self control last-time-on-surface) (the-as time-frame (-> *FLUT-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-flut-falling #f) + ) + ) + :code (behavior () + (local-vars (f0-17 float) (f1-2 float)) + (let ((f28-0 0.0) + (f30-0 0.0) + ) + (let ((f24-0 0.0) + (f26-0 0.0) + ) + 22 + (let ((gp-0 60) + (v1-3 (ja-group)) + ) + (cond + ((and v1-3 (= v1-3 jakb-mech-pull-ja)) + (set! f28-0 (ja-frame-num 0)) + (set! f24-0 (-> self skel root-channel 1 frame-interp (-> self skel active-frame-interp))) + (set! f26-0 (-> self skel root-channel 2 frame-interp (-> self skel active-frame-interp))) + ) + ((let ((v1-17 (ja-group))) + (and v1-17 (or (= v1-17 jakb-mech-get-on-ja) (= v1-17 jakb-mech-death-a-ja))) + ) + (ja-channel-push! 1 (seconds 0.08)) + (ja-no-eval :group! jakb-mech-dummy7-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 3 (the-as time-frame gp-0)) + ) + (else + (ja-channel-push! 3 (the-as time-frame gp-0)) + ) + ) + ) + (ja-no-eval :group! jakb-mech-pull-ja :num! (loop!) :dist 131072.0 :frame-num f28-0) + (ja-no-eval :chan 1 + :group! jakb-mech-dummy4-ja + :num! (identity f28-0) + :frame-interp0 f24-0 + :frame-interp1 f24-0 + :dist 131072.0 + ) + (ja-no-eval :chan 2 + :group! jakb-mech-dummy5-ja + :num! (identity f28-0) + :frame-interp0 f26-0 + :frame-interp1 f26-0 + :dist 131072.0 + ) + ) + (quaternion-copy! (-> self flut prev-quat) (-> self control quat)) + (until #f + (suspend) + (let* ((f0-12 (if (= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) + 0.0 + (deg-diff (y-angle (-> self control)) (vector-y-angle (-> self control to-target-pt-xz))) + ) + ) + (f0-13 (lerp-scale 1.0 -1.0 f0-12 -21845.334 21845.334)) + ) + (set! f30-0 (seek f30-0 f0-13 (* 2.0 (seconds-per-frame)))) + ) + (cond + ((>= f30-0 0.0) + (set! f0-17 f30-0) + (set! f1-2 0.0) + ) + (else + (set! f1-2 (- f30-0)) + (set! f0-17 0.0) + ) + ) + (ja :chan 1 :frame-interp0 f1-2 :frame-interp1 f1-2) + (ja :chan 2 :frame-interp0 f0-17 :frame-interp1 f0-17) + (quaternion-copy! (-> self flut prev-quat) (-> self control quat)) + (let ((v1-94 (-> self skel effect))) + (set! (-> v1-94 channel-offset) 0) + ) + 0 + (logior! (-> self target-flags) (target-flags lleg-no-ik rleg-no-ik)) + (let* ((f0-19 (* (current-cycle-distance (-> self skel)) (-> self control scale x))) + (f0-21 (/ (* 58.0 (-> self control ctrl-xz-vel)) (* 60.0 f0-19))) + ) + (ja :num! (loop! f0-21)) + ) + (ja :chan 1 :num! (chan 0)) + (ja :chan 2 :num! (chan 0)) + ) + ) + #f + ) + ) + +(defstate target-flut-falling (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (when (and (= message 'touched) + ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> block param 0)) + (-> self control) + (the-as uint 6) + ) + (< 0.0 (vector-dot + (-> self control dynam gravity-normal) + (vector-! (new 'stack-no-clear 'vector) (-> self control trans-old) (-> self control trans)) + ) + ) + ) + (send-event proc 'bonk (-> block param 0) (-> self control ground-impact-vel)) + (when (target-send-attack + proc + 'flut-bonk + (the-as touching-shapes-entry (-> block param 0)) + (the-as int (-> self control target-attack-id)) + (the-as int (-> self control attack-count)) + (-> self control penetrate-using) + ) + ) + ) + (case message + (('jump) + (go target-flut-jump (the-as float (-> block param 0)) (the-as float (-> block param 0))) + ) + (else + (target-flut-standard-event-handler proc argc message block) + ) + ) + ) + :enter (behavior ((arg0 object)) + (set! (-> self control mod-surface) *flut-jump-mods*) + (set-time! (-> self state-time)) + ) + :exit (-> target-flut-start exit) + :trans (behavior () + (when (or (logtest? (-> self control status) (collide-status on-surface)) + (if (and (< (target-move-dist (-> *TARGET-bank* stuck-time)) (-> *TARGET-bank* stuck-distance)) + (and (time-elapsed? (-> self state-time) (the-as time-frame (/ (the-as int (-> *TARGET-bank* stuck-time)) 2))) + (not (and *cheat-mode* (cpad-hold? (-> self control cpad number) r2))) + ) + ) + #t + ) + ) + (logior! (-> self control status) (collide-status on-surface)) + (go target-flut-hit-ground) + ) + (seek! + (-> self control unknown-float35) + (fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control ctrl-xz-vel))))) + (seconds-per-frame) + ) + ) + :code (behavior ((arg0 object)) + (cond + ((not (-> self flut as-daxter?)) + (let ((v1-4 (ja-group))) + (cond + ((and v1-4 (= v1-4 jakb-flut-jump-loop-ja)) + ) + (else + (let ((v1-10 (ja-group))) + (if (and v1-10 (= v1-10 jakb-flut-double-jump-ja)) + (ja-channel-push! 2 (seconds 0.2)) + (ja-channel-push! 2 (seconds 0.5)) + ) + ) + ) + ) + ) + (ja-no-eval :group! jakb-flut-jump-loop-ja :num! (loop!) :frame-num 0.0) + (let ((gp-0 (-> self skel root-channel 1))) + (let ((f0-2 (-> self control unknown-float35))) + (set! (-> gp-0 frame-interp 1) f0-2) + (set! (-> gp-0 frame-interp 0) f0-2) + ) + (joint-control-channel-group-eval! + gp-0 + (the-as art-joint-anim jakb-flut-jump-forward-loop-ja) + num-func-identity + ) + (set! (-> gp-0 frame-num) 0.0) + ) + ) + (else + (let ((v1-32 (ja-group))) + (cond + ((and v1-32 (= v1-32 jakb-mech-death-a-ja)) + ) + (else + (ja-channel-push! 1 (seconds 0.5)) + ) + ) + ) + (ja-no-eval :group! jakb-mech-death-a-ja :num! (loop!) :frame-num 0.0) + ) + ) + (until #f + (suspend) + (ja :num! (loop! max)) + (when (>= (ja-group-size) 2) + (let ((a0-20 (-> self skel root-channel 1))) + (let ((f0-8 (-> self control unknown-float35))) + (set! (-> a0-20 frame-interp 1) f0-8) + (set! (-> a0-20 frame-interp 0) f0-8) + ) + (set! (-> a0-20 param 0) 0.0) + (joint-control-channel-group-eval! a0-20 (the-as art-joint-anim #f) num-func-chan) + ) + ) + ) + #f + ) + :post target-flut-post + ) + +(defstate target-flut-jump (target) + :event (-> target-flut-falling event) + :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)) + (case (-> self flut mode) + (('wild) + (set! (-> self control mod-surface) *flut-jump-wild-mods*) + ) + (('racer) + (set! (-> self control mod-surface) *flut-jump-racer-mods*) + ) + (else + (set! (-> self control mod-surface) *flut-jump-mods*) + ) + ) + (set! (-> self control unknown-float36) + (fmax 0.0 (fmin 1.0 (* 0.00004359654 (+ -11468.8 (-> self control ctrl-xz-vel))))) + ) + (set! (-> self control unknown-float35) + (fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control ctrl-xz-vel))))) + ) + ) + :exit (behavior () + (target-exit) + ((-> target-flut-start 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))) + ) + ) + ((-> target-flut-falling trans)) + (case (-> self flut mode) + (('wild) + (when (and (logtest? (-> self control status) (collide-status touch-wall)) + (< 40960.0 (-> self control ctrl-xz-vel)) + (< 0.7 (-> self control touch-angle)) + (< (vector-dot (-> self control wall-contact-normal) (-> self control dynam gravity-normal)) 0.3) + ) + (if (logtest? (-> self control status) (collide-status touch-actor)) + (send-event self '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 10)) + (shove-up (meters 0.5)) + (angle 'shove) + ) + ) + ) + (send-event self '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-back (meters 10)) + (shove-up (meters 2)) + (angle 'shove) + (mode 'death) + ) + ) + ) + ) + ) + ) + (else + (if (and (cpad-pressed? (-> self control cpad number) x) + (< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 40960.0) + (not (logtest? (water-flag touch-water) (-> self water flags))) + (not (logtest? (target-flags prevent-jump prevent-double-jump) (-> self target-flags))) + (< 4096.0 (target-height-above-ground)) + ) + (go target-flut-double-jump (-> *FLUT-bank* double-jump-height-min) (-> *FLUT-bank* double-jump-height-max)) + ) + (if (and (cpad-pressed? (-> self control cpad number) square) + (< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 61440.0) + (and (< -61440.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + (time-elapsed? (-> self control last-time-of-stuck) (the-as time-frame (-> *TARGET-bank* stuck-timeout))) + (not (logtest? (-> self target-flags) (target-flags prevent-attack))) + (not (logtest? (-> self control current-surface flags) (surface-flag no-attack no-hands))) + ) + ) + (go target-flut-air-attack (-> *FLUT-bank* air-attack-speed)) + ) + ) + ) + (when (if (and (< (target-move-dist (-> *TARGET-bank* stuck-time)) (-> *TARGET-bank* stuck-distance)) + (and (time-elapsed? (-> self state-time) (seconds 0.1)) + (not (and *cheat-mode* (cpad-hold? (-> self control cpad number) r2))) + ) + ) + #t + ) + (logior! (-> self control status) (collide-status on-surface)) + enter-state + 'stuck + (go target-flut-hit-ground) + ) + (mod-var-jump #t #t (cpad-hold? (-> self control cpad number) x) (-> self control transv)) + ) + :code (behavior ((arg0 float) (arg1 float)) + (cond + ((not (-> self flut as-daxter?)) + (ja-channel-push! 2 (seconds 0.12)) + (ja :group! jakb-flut-jump-ja :num! min) + (let ((a0-3 (-> self skel root-channel 1))) + (let ((f0-1 (-> self control unknown-float35))) + (set! (-> a0-3 frame-interp 1) f0-1) + (set! (-> a0-3 frame-interp 0) f0-1) + ) + (set! (-> a0-3 frame-group) (the-as art-joint-anim jakb-flut-jump-forward-ja)) + (set! (-> a0-3 param 0) 0.0) + (joint-control-channel-group-eval! a0-3 (the-as art-joint-anim jakb-flut-jump-forward-ja) num-func-chan) + ) + (suspend) + (ja :group! jakb-flut-jump-ja :num! (+!)) + (let ((a0-5 (-> self skel root-channel 1))) + (let ((f0-4 (-> self control unknown-float35))) + (set! (-> a0-5 frame-interp 1) f0-4) + (set! (-> a0-5 frame-interp 0) f0-4) + ) + (set! (-> a0-5 frame-group) (the-as art-joint-anim jakb-flut-jump-forward-ja)) + (set! (-> a0-5 param 0) 0.0) + (joint-control-channel-group-eval! a0-5 (the-as art-joint-anim jakb-flut-jump-forward-ja) num-func-chan) + ) + (suspend) + 0 + ) + (else + (ja-channel-push! 1 (seconds 0.12)) + (ja :group! jakb-mech-get-on-ja :num! min) + (suspend) + (ja :group! jakb-mech-get-on-ja :num! (+!)) + (suspend) + 0 + ) + ) + (until (ja-done? 0) + (let ((f30-0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + (f0-12 (/ (- 10.0 (ja-aframe-num 0)) (* (ja-step 0) (ja-speed 0)))) + ) + (ja :num! (seek! max (if (and (< 0.0 f30-0) (< 0.0 f0-12)) + (fmin (fmin 3.0 f0-12) (/ (* 5.0 f0-12) (the float (time-to-apex f30-0 -245760.0)))) + 1.0 + ) + ) + ) + ) + (when (>= (ja-group-size) 2) + (let ((a0-15 (-> self skel root-channel 1))) + (let ((f0-18 (-> self control unknown-float35))) + (set! (-> a0-15 frame-interp 1) f0-18) + (set! (-> a0-15 frame-interp 0) f0-18) + ) + (set! (-> a0-15 param 0) 0.0) + (joint-control-channel-group-eval! a0-15 (the-as art-joint-anim #f) num-func-chan) + ) + ) + (suspend) + ) + (cond + ((not (-> self flut as-daxter?)) + (ja-no-eval :group! jakb-flut-jump-loop-ja :num! (loop!) :frame-num 0.0) + (let ((a0-18 (-> self skel root-channel 1))) + (let ((f0-22 (-> self control unknown-float35))) + (set! (-> a0-18 frame-interp 1) f0-22) + (set! (-> a0-18 frame-interp 0) f0-22) + ) + (set! (-> a0-18 frame-group) (the-as art-joint-anim jakb-flut-jump-forward-loop-ja)) + (set! (-> a0-18 param 0) 0.0) + (joint-control-channel-group-eval! a0-18 (the-as art-joint-anim jakb-flut-jump-forward-loop-ja) num-func-chan) + ) + (until #f + (suspend) + (ja :group! jakb-flut-jump-loop-ja :num! (loop!)) + (let ((a0-20 (-> self skel root-channel 1))) + (let ((f0-25 (-> self control unknown-float35))) + (set! (-> a0-20 frame-interp 1) f0-25) + (set! (-> a0-20 frame-interp 0) f0-25) + ) + (set! (-> a0-20 frame-group) (the-as art-joint-anim jakb-flut-jump-forward-loop-ja)) + (set! (-> a0-20 param 0) 0.0) + (joint-control-channel-group-eval! a0-20 (the-as art-joint-anim jakb-flut-jump-forward-loop-ja) num-func-chan) + ) + ) + #f + ) + (else + (ja-no-eval :group! jakb-mech-death-a-ja :num! (loop!) :frame-num 0.0) + (until #f + (suspend) + (ja :group! jakb-mech-death-a-ja :num! (loop!)) + ) + #f + ) + ) + ) + :post target-flut-post + ) + +(defstate target-flut-double-jump (target) + :event (-> target-flut-falling event) + :enter (behavior ((arg0 float) (arg1 float)) + (set-time! (-> self state-time)) + (init-var-jump arg0 arg1 #t #t (-> self control transv) 2.0) + (set! (-> self control dynam gravity-max) 40960.0) + (set! (-> self control dynam gravity-length) 245760.0) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (case (-> self flut mode) + (('racer) + (set! (-> self control mod-surface) *flut-double-jump-racer-mods*) + ) + (else + (set! (-> self control mod-surface) *flut-double-jump-mods*) + ) + ) + ) + :exit (behavior () + (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) + ((-> target-flut-start exit)) + ) + :trans (behavior () + ((-> target-flut-falling trans)) + (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) + ) + (not (logtest? (-> self target-flags) (target-flags prevent-attack))) + (not (logtest? (-> self control current-surface flags) (surface-flag no-attack no-hands))) + (time-elapsed? (-> self control last-time-of-stuck) (the-as time-frame (-> *TARGET-bank* stuck-timeout))) + (< 4096.0 (target-height-above-ground)) + ) + (go target-flut-air-attack (-> *FLUT-bank* air-attack-speed)) + ) + (if (!= (-> self state-time) (current-time)) + (mod-var-jump #t #t (cpad-hold? (-> self control cpad number) x) (-> self control transv)) + ) + (let ((v1-41 (ja-group))) + (if (and v1-41 (= v1-41 jakb-flut-double-jump-ja)) + (sound-play "flut-flap" :id (the-as sound-id (-> self flut flap-sound-id))) + ) + ) + ) + :code (behavior ((arg0 float) (arg1 float)) + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! jakb-flut-double-jump-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 0 3 (seconds 0.1)) + (suspend) + (ja :num! (seek!)) + ) + (set! (-> self control mod-surface) *flut-jump-mods*) + (current-time) + (ja-channel-push! 2 (seconds 0.2)) + (ja-no-eval :group! jakb-flut-jump-loop-ja :num! (loop!) :frame-num 0.0) + (let ((gp-0 (-> self skel root-channel 1))) + (let ((f0-9 (-> self control unknown-float35))) + (set! (-> gp-0 frame-interp 1) f0-9) + (set! (-> gp-0 frame-interp 0) f0-9) + ) + (joint-control-channel-group-eval! + gp-0 + (the-as art-joint-anim jakb-flut-jump-forward-loop-ja) + num-func-identity + ) + (set! (-> gp-0 frame-num) 0.0) + ) + (until #f + (suspend) + (seek! + (-> self control dynam gravity-max) + (-> self control standard-dynamics gravity-max) + (* 163840.0 (seconds-per-frame)) + ) + (seek! + (-> self control dynam gravity-length) + (-> self control standard-dynamics gravity-length) + (* 163840.0 (seconds-per-frame)) + ) + (ja :num! (loop! max)) + (let ((a0-13 (-> self skel root-channel 1))) + (let ((f0-23 (-> self control unknown-float35))) + (set! (-> a0-13 frame-interp 1) f0-23) + (set! (-> a0-13 frame-interp 0) f0-23) + ) + (set! (-> a0-13 param 0) 0.0) + (joint-control-channel-group-eval! a0-13 (the-as art-joint-anim #f) num-func-chan) + ) + ) + #f + ) + :post target-flut-post + ) + +(defstate target-flut-hit-ground (target) + :event target-flut-standard-event-handler + :enter (behavior () + (target-land-effect) + (when (< 40960.0 (-> self control ground-impact-vel)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 0 255 (seconds 0.1)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 178 (seconds 0.2)) + ) + (set! (-> self control last-running-attack-end-time) 0) + (set! (-> self control last-attack-end-time) 0) + (set! (-> self control mod-surface) *flut-walk-mods*) + ) + :exit (behavior () + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still)) + ((-> target-flut-start 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? 'flut) + ) + (go target-flut-jump (-> *FLUT-bank* jump-height-min) (-> *FLUT-bank* jump-height-max)) + ) + (if (or (move-legs?) (= (-> self flut mode) 'wild)) + (go target-flut-walk) + ) + (if (and (not (logtest? (-> self control status) (collide-status on-surface))) + (time-elapsed? (-> self control last-time-on-surface) (the-as time-frame (-> *FLUT-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-flut-falling #f) + ) + ) + :code (behavior () + (target-flut-hit-ground-anim #f) + (go target-flut-stance) + ) + :post target-flut-post + ) + +(defstate target-flut-running-attack (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (cond + (((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> block param 0)) + (-> self control) + (the-as uint 1920) + ) + (let ((gp-1 (target-send-attack + proc + (-> self control danger-mode) + (the-as touching-shapes-entry (-> block param 0)) + (the-as int (-> self control target-attack-id)) + (the-as int (-> self control attack-count)) + (-> self control penetrate-using) + ) + ) + ) + (when gp-1 + (set! (-> self control unknown-word04) (the-as uint (current-time))) + (let ((v1-9 (if (type? proc process-drawable) + proc + ) + ) + ) + (when v1-9 + (let* ((s5-1 (-> (the-as process-drawable v1-9) root)) + (v1-10 (if (type? s5-1 collide-shape) + (the-as collide-shape s5-1) + ) + ) + ) + (if (and v1-10 (or (logtest? (-> v1-10 root-prim prim-core collide-as) (collide-spec enemy)) + (logtest? (-> v1-10 root-prim prim-core action) (collide-action no-smack)) + ) + ) + (set! (-> self control unknown-symbol03) (the-as float #x1)) + ) + ) + ) + ) + (when (or (= gp-1 'die) (= gp-1 'push)) + (let ((v0-2 (the-as object (current-time)))) + (set! (-> self control did-move-to-pole-or-max-jump-height) (the-as float v0-2)) + v0-2 + ) + ) + ) + ) + ) + (else + (target-flut-dangerous-event-handler proc argc message block) + ) + ) + ) + (else + (target-flut-dangerous-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self control unknown-word04) (the-as uint 0)) + (set! (-> self control did-move-to-pole-or-max-jump-height) 0.0) + (set! (-> self control unknown-symbol03) 0.0) + (set! (-> self control mod-surface) *flut-run-attack-mods*) + (set! (-> *run-attack-mods* turnv) 655360.0) + (set! (-> *run-attack-mods* turnvv) 655360.0) + (target-start-attack) + (target-danger-set! 'flut-attack #f) + ) + :exit (behavior () + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) + (set! (-> *run-attack-mods* turnv) 0.0) + (set! (-> *run-attack-mods* turnvv) 0.0) + (set-time! (-> self control last-running-attack-end-time)) + (target-exit) + ((-> target-flut-start exit)) + ) + :trans (behavior () + (when (!= (-> self state-time) (current-time)) + (if (and (or (smack-surface? #t) + (and (>= (-> self control surface-slope-z) 0.7) + (not (logtest? (-> self control status) (collide-status touch-actor))) + ) + ) + (begin + (set! (-> self control did-move-to-pole-or-max-jump-height) (the-as float (current-time))) + (set! (-> self control bend-target) 0.0) + (let ((v1-11 (new-stack-vector0)) + (f0-3 (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-3)) + (let* ((f1-3 (vector-length v1-11)) + (f2-0 f1-3) + (f0-4 (fmin 0.0 f0-3)) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f0-4) + (vector-float*! v1-11 v1-11 (/ f1-3 f2-0)) + ) + ) + ) + #t + ) + (or (zero? (-> self control unknown-word04)) + (>= (the-as uint (- (current-time) (the-as int (-> self control unknown-word04)))) (the-as uint 12)) + ) + (!= (the-as int (-> self control unknown-symbol03)) 1) + ) + (target-shoved (meters 2) (-> *TARGET-bank* smack-surface-height) (the-as process #f) target-flut-hit) + ) + (if (and (logtest? (water-flag touch-water) (-> self water flags)) + (zero? (mod (- (current-time) (-> self state-time)) 21)) + ) + (spawn-ripples + (-> self water) + 0.6 + (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node jakb-lod0-jg neckB)) + 0 + (-> self control transv) + #f + ) + ) + ) + ) + :code (behavior () + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 127 (seconds 0.2)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 0 3 (seconds 0.4)) + (ja-channel-push! 1 (seconds 0.02)) + (ja :group! jakb-flut-running-attack-ja :num! min) + (set! (-> self control dynam gravity-max) 368640.0) + (set! (-> self control dynam gravity-length) 368640.0) + (let ((f28-0 0.0) + (f30-0 (if (= (-> self control yellow-eco-last-use-time) (current-time)) + 0.2 + 0.8 + ) + ) + ) + (until (or (ja-done? 0) (< f30-0 0.05)) + (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) (the-as time-frame (-> *FLUT-bank* ground-timeout))) + (>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + (>= (target-height-above-ground) (-> *TARGET-bank* fall-height)) + ) + (>= (the-as uint (- (current-time) (the-as int (-> self control unknown-word04)))) (the-as uint 12)) + ) + ) + (go target-flut-falling #f) + ) + ((and (nonzero? (-> self control did-move-to-pole-or-max-jump-height)) + (>= (the-as + uint + (- (current-time) (the-as int (the-as uint (-> self control did-move-to-pole-or-max-jump-height)))) + ) + (the-as uint 12) + ) + ) + (set-forward-vel 0.0) + (set! f30-0 0.0) + ) + ((ja-done? 0) + (set-forward-vel f28-0) + ) + (else + (set! f28-0 + (* f30-0 (target-align-vel-z-adjust (-> self align delta trans z)) (-> self clock frames-per-second)) + ) + (set-forward-vel f28-0) + ) + ) + ) + (let ((gp-1 (new-stack-vector0))) + (vector-matrix*! gp-1 (-> self control transv) (-> self control w-R-c)) + (set! (-> gp-1 y) 0.0) + (vector-matrix*! (-> self control align-xz-vel) gp-1 (-> self control c-R-w)) + ) + (suspend) + (ja :num! (seek! max (-> self control current-surface align-speed))) + (if (time-elapsed? (-> self state-time) (seconds 0.1)) + (set! (-> *flut-run-attack-mods* turnvv) 0.0) + ) + (if (time-elapsed? (-> self state-time) (seconds 0.1)) + (set! f30-0 (* f30-0 (fmin 1.0 (-> self control zx-vel-frac)))) + ) + ) + (if (and (not (logtest? (-> self control status) (collide-status on-surface))) + (time-elapsed? (-> self control last-time-on-surface) (the-as time-frame (-> *FLUT-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-flut-falling #f) + ) + (when (!= f30-0 0.0) + (set! (-> self trans-hook) (-> target-flut-hit-ground trans)) + (if (not (ja-done? 0)) + (ja-channel-push! 1 (seconds 0.05)) + ) + (ja-no-eval :group! jakb-flut-running-attack-end-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 f30-0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (go target-flut-stance) + ) + :post target-flut-post + ) + +(defstate target-flut-air-attack (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (if (and (= message 'touched) + ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> block param 0)) + (-> self control) + (the-as uint 6) + ) + (< 0.0 (vector-dot + (-> self control dynam gravity-normal) + (vector-! (new 'stack-no-clear 'vector) (-> self control trans-old) (-> self control trans)) + ) + ) + ) + (send-event proc 'bonk (-> block param 0) (-> self control ground-impact-vel)) + ) + (case message + (('jump) + (go target-flut-jump (the-as float (-> block param 0)) (the-as float (-> block param 0))) + ) + (else + (target-flut-dangerous-event-handler proc argc message block) + ) + ) + ) + :enter (behavior ((arg0 float)) + (set-forward-vel arg0) + (set-time! (-> self state-time)) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (set! (-> self control mod-surface) *flut-air-attack-mods*) + (target-start-attack) + (target-danger-set! 'flut-attack #f) + (let ((v1-5 (new-stack-vector0))) + (let ((f0-1 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-5 (-> self control transv) (vector-float*! v1-5 (-> self control dynam gravity-normal) f0-1)) + ) + (let* ((f0-2 (vector-length v1-5)) + (f1-1 f0-2) + (f2-0 0.0) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f2-0) + (vector-float*! v1-5 v1-5 (/ f0-2 f1-1)) + ) + ) + ) + ) + :exit (behavior () + (target-danger-set! 'harmless #f) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) + (set! (-> self control dynam gravity quad) (-> self control standard-dynamics gravity quad)) + ((-> target-flut-start exit)) + ) + :trans (behavior () + (let ((gp-0 (new-stack-vector0))) + (vector-z-quaternion! gp-0 (-> self control quat-for-control)) + (let ((v1-1 (new-stack-vector0)) + (f0-1 (vector-dot gp-0 (-> self control transv))) + ) + 0.0 + (vector-! v1-1 (-> self control transv) (vector-float*! v1-1 gp-0 f0-1)) + (let* ((f1-2 (vector-length v1-1)) + (f2-0 f1-2) + ) + (if (< f0-1 0.0) + (set! f0-1 0.0) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) gp-0 f0-1) + (vector-float*! v1-1 v1-1 (/ f1-2 f2-0)) + ) + ) + ) + ) + (when (logtest? (-> self control status) (collide-status on-surface)) + (logior! (-> self control status) (collide-status on-surface)) + (remove-exit) + (go target-flut-air-attack-hit-ground) + ) + (when (if (and (< (target-move-dist (-> *TARGET-bank* stuck-time)) 4096.0) + (and (time-elapsed? (-> self state-time) (seconds 0.5)) + (not (and *cheat-mode* (cpad-hold? (-> self control cpad number) r2))) + ) + ) + #t + ) + (logior! (-> self control status) (collide-status on-surface)) + (go target-flut-hit-ground) + ) + ) + :code (behavior ((arg0 float)) + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! jakb-flut-air-attack-ja :num! (seek! (ja-aframe 8.0 0)) :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 1.0) + (suspend) + (ja :num! (seek! (ja-aframe 8.0 0))) + ) + (ja-no-eval :group! jakb-flut-air-attack-ja :num! (seek!) :frame-num (ja-aframe 8.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 1.0) + (suspend) + (ja :num! (seek!)) + ) + (ja :group! jakb-flut-air-attack-loop-ja :num! min) + (until #f + (suspend) + ) + #f + ) + :post target-flut-post + ) + +(defstate target-flut-air-attack-hit-ground (target) + :event target-flut-standard-event-handler + :enter (behavior () + (target-land-effect) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.4)) + (set! (-> self control last-running-attack-end-time) 0) + (set! (-> self control last-attack-end-time) 0) + (set! (-> self control mod-surface) *flut-air-attack-mods*) + (sound-play "flop-land" :pitch -0.4) + (do-effect (-> self skel effect) "group-flut-attack-strike-ground" (ja-frame-num 0) 0) + (let ((gp-2 + (process-spawn + touch-tracker + :init touch-tracker-init + (-> self control trans) + #x45800000 + 30 + :name "touch-tracker" + :to self + ) + ) + ) + (send-event + (ppointer->process gp-2) + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (-> self control target-attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'flut-attack) + (count (-> self control target-attack-id)) + (penetrate-using (-> self control penetrate-using)) + ) + ) + ) + (send-event + (ppointer->process gp-2) + 'function + (lambda ((arg0 process-focusable)) + (seek! (-> arg0 root root-prim local-sphere w) 28672.0 (* 286720.0 (seconds-per-frame))) + (update-transforms (-> arg0 root)) + ) + ) + ) + ) + :exit (-> target-flut-air-attack exit) + :trans (-> target-flut-hit-ground trans) + :code (behavior () + (ja-channel-set! 1) + (ja-no-eval :group! jakb-flut-air-attack-land-ja :num! (seek! (ja-aframe 22.0 0)) :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-aframe 22.0 0))) + ) + (target-danger-set! 'harmless #f) + (ja-no-eval :group! jakb-flut-air-attack-land-ja :num! (seek!) :frame-num (ja-aframe 22.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!)) + ) + (go target-flut-stance) + ) + :post target-flut-post + ) + +(defstate target-flut-kanga-catch (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('end-mode) + (case (-> block param 0) + (('kanga) + (go target-jump 16384.0 16384.0 (the-as surface #f)) + ) + ) + ) + (else + (target-generic-event-handler proc argc message block) + ) + ) + ) + :enter (behavior ((arg0 handle) (arg1 symbol)) + (set-time! (-> self state-time)) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (set-setting! 'ignore-target #t 0.0 0) + ) + :exit (behavior () + (remove-setting! 'ignore-target) + ((-> target-flut-start exit)) + ) + :code (behavior ((arg0 handle) (arg1 symbol)) + (set! (-> (the-as target self) control unknown-handle02) (the-as handle #f)) + (let ((s5-0 jakb-flut-kanga-catch-ja)) + 0.0 + (let ((f30-0 0.0)) + (ja-channel-push! 1 (seconds 0.05)) + (set! (-> (the-as target self) control mod-surface) *empty-mods*) + (set! (-> (the-as target self) neck flex-blend) 0.0) + (sound-play "kanga-eat") + (set! (-> (the-as target self) control unknown-vector37 quad) (-> (the-as target self) control trans quad)) + (set! (-> (the-as target self) control unknown-vector38 quad) (-> (the-as target self) control trans quad)) + (set! (-> (the-as target self) control unknown-vector39 quad) (-> (the-as target self) control quat quad)) + (set! (-> (the-as target self) control unknown-vector40 quad) (-> (the-as target self) control quat quad)) + (ja :group! s5-0 :num! (seek!) :frame-num (ja-aframe 20.0 0)) + (while (< (ja-aframe-num 0) 93.0) + (let* ((s4-2 (handle->process arg0)) + (s5-1 (if (type? s4-2 process-focusable) + s4-2 + ) + ) + ) + (let ((f28-0 (ja-aframe-num 0))) + (send-event *camera* 'joystick -0.7 -1.0) + (cond + ((< f28-0 24.0) + (when s5-1 + (set! (-> (the-as target self) control unknown-vector38 quad) + (-> (get-trans (the-as process-focusable s5-1) 0) quad) + ) + (set! (-> (the-as target self) control unknown-vector40 quad) + (-> (get-quat (the-as process-focusable s5-1) 0) quad) + ) + ) + (let ((f28-1 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 20.0 23.0)))) + (let ((f26-0 f28-1)) + (vector-lerp! + (-> (the-as target self) control trans) + (-> (the-as target self) control unknown-vector37) + (-> (the-as target self) control unknown-vector38) + f28-1 + ) + (set! (-> (the-as target self) control trans y) (lerp + (-> (the-as target self) control unknown-vector37 y) + (-> (the-as target self) control unknown-vector38 y) + f26-0 + ) + ) + ) + (if s5-1 + (quaternion-slerp! + (-> (the-as process-focusable s5-1) root quat) + (-> (the-as target self) control quat) + (the-as quaternion (-> (the-as target self) control unknown-vector40)) + (- 1.0 f28-1) + ) + ) + ) + (rot->dir-targ! (-> (the-as target self) control)) + ) + (else + (set! (-> (the-as target self) control unknown-handle02) arg0) + (set! f30-0 (seek f30-0 0.0 (* 40960.0 (seconds-per-frame)))) + (set-forward-vel f30-0) + ) + ) + ) + (cond + (s5-1 + (let ((s4-6 (the-as target self))) + ;; og:preserve-this + (set! self (the target s5-1)) + (let ((f0-14 (ja-aframe-num 0))) + f0-14 + (set! self (the target s4-6)) + (ja :num-func num-func-identity :frame-num (ja-aframe f0-14 0)) + ) + ) + ) + (else + (go target-flut-stance) + ) + ) + ) + (suspend) + 0 + ) + ) + ) + (go target-flut-stance) + ) + :post (behavior () + (target-no-stick-post) + (target-flut-post-post) + (let* ((s5-0 (handle->process (-> (the-as target self) control unknown-handle02))) + (gp-0 (if (type? s5-0 process-focusable) + (the-as process-focusable s5-0) + ) + ) + ) + (when gp-0 + (quaternion-copy! (-> gp-0 root quat) (-> (the-as target self) control quat-for-control)) + (set! (-> gp-0 root trans quad) (-> (the-as target self) control trans quad)) + (let ((s5-1 (the-as target self))) + ;; og:preserve-this + (set! self (the target gp-0)) + (ja-post) + (set! self (the target s5-1)) + ) + ) + ) + ) + ) + +(defstate target-flut-hit (target) + :event target-flut-standard-event-handler + :exit (behavior () + (if (not (and (-> self next-state) (= (-> self next-state name) 'target-flut-death))) + (logclear! (-> self focus-status) (focus-status dead hit)) + ) + (target-exit) + ((-> target-flut-start 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-flut-stance) + ) + ) + ) + :code (behavior ((arg0 symbol) (arg1 attack-info)) + (set-time! (-> self state-time)) + (let ((s5-0 (-> self attack-info))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let ((v1-2 s5-0)) + (set! (-> v1-2 attacker) (the-as handle #f)) + (set! (-> v1-2 mode) 'generic) + (set! (-> v1-2 shove-back) 10240.0) + (set! (-> v1-2 shove-up) 9011.2) + (set! (-> v1-2 angle) #f) + (set! (-> v1-2 trans quad) (-> self control trans quad)) + (set! (-> v1-2 control) 0.0) + (set! (-> v1-2 invinc-time) (-> *TARGET-bank* hit-invulnerable-timeout)) + (set! (-> v1-2 damage) (-> *FACT-bank* health-default-inc)) + ) + (case arg0 + (('shove) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.2)) + (let ((v1-6 s5-0)) + (set! (-> v1-6 shove-back) (-> *TARGET-bank* smack-surface-dist)) + (set! (-> v1-6 shove-up) (-> *TARGET-bank* smack-surface-height)) + (set! (-> v1-6 angle) 'shove) + ) + ) + ) + (combine! s5-0 arg1 self) + (when (not (logtest? (-> s5-0 mask) (attack-mask vector))) + (vector-z-quaternion! (-> s5-0 vector) (-> self control quat-for-control)) + (vector-xz-normalize! (-> s5-0 vector) (- (fabs (-> s5-0 shove-back)))) + (set! (-> s5-0 vector y) (-> s5-0 shove-up)) + ) + (set! (-> s4-0 quad) (-> s5-0 vector quad)) + (let ((f0-11 (vector-dot + (vector-normalize-copy! (new 'stack-no-clear 'vector) s4-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-11) + 'front + 'back + ) + ) + ) + ) + (case arg0 + (('attack) + (logior! (-> self focus-status) (focus-status hit)) + (set-time! (-> self game hit-time)) + (case (-> s5-0 mode) + (('endlessfall) + (cond + ((= (-> self game mode) 'debug) + (let ((s3-2 (new-stack-vector0))) + (set! (-> s3-2 quad) (-> self control last-trans-on-ground quad)) + (ja-channel-set! 0) + (let ((s2-0 (current-time))) + (until (time-elapsed? s2-0 (seconds 1)) + (suspend) + ) + ) + (move-to-point! (-> self control) s3-2) + ) + (set! (-> self control camera-pos quad) (-> self control trans quad)) + (send-event *camera* 'teleport) + (go target-flut-stance) + ) + (else + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (go target-flut-death (-> s5-0 mode)) + ) + ) + ) + (('water-vol 'sharkey 'bot 'drown-death 'instant-death 'crush 'tentacle) + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (if (= (-> self game mode) 'play) + (go target-flut-death (-> s5-0 mode)) + ) + ) + (('lava 'melt 'fry 'slime) + (sound-play "death-melt") + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (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)) + ) + ) + (set! (-> s5-0 angle) 'lava) + (set! (-> s5-0 shove-up) 20480.0) + ) + (('death) + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + ) + (('cactus) + (cond + ((= (-> self flut mode) 'normal) + ) + (else + (go target-flut-death (-> s5-0 mode)) + ) + ) + ) + (('drown) + (if (= (-> self flut mode) 'normal) + (go target-flut-eject (-> s5-0 mode)) + (pickup-collectable! (-> self fact) (pickup-type health) (- (-> s5-0 damage)) (the-as handle #f)) + ) + ) + (else + (if (!= (-> self flut mode) 'normal) + (pickup-collectable! (-> self fact) (pickup-type health) (- (-> s5-0 damage)) (the-as handle #f)) + ) + ) + ) + (target-hit-effect s5-0) + (sound-play "flut-hit" :pitch -1) + ) + ) + (set! (-> self control mod-surface) *smack-mods*) + (let ((f30-0 1.0)) + (let ((v1-114 (-> s5-0 angle))) + (cond + ((= v1-114 'shove) + (cond + ((not (-> self flut as-daxter?)) + (let ((v1-119 (ja-group))) + (when (not (and v1-119 (= v1-119 jakb-flut-smack-surface-ja))) + (ja-channel-set! 1) + (ja :group! jakb-flut-smack-surface-ja :num! min) + ) + ) + ) + (else + (let ((v1-130 (ja-group))) + (when (not (and v1-130 (= v1-130 jakb-mech-drag-pickup-ja))) + (ja-channel-set! 1) + (ja :group! jakb-mech-drag-pickup-ja :num! min) + ) + ) + ) + ) + (sound-play "smack-surface") + (sound-play "flut-hit" :pitch 1) + ) + ((not (-> self flut as-daxter?)) + (let ((v1-148 (ja-group))) + (when (not (and v1-148 (= v1-148 jakb-flut-hit-back-ja))) + (ja-channel-push! 1 (seconds 0.075)) + (ja :group! jakb-flut-hit-back-ja :num! min) + ) + ) + ) + (else + (let ((v1-159 (ja-group))) + (when (not (and v1-159 (= v1-159 jakb-mech-drag-pickup-ja))) + (ja-channel-set! 1) + (ja :group! jakb-mech-drag-pickup-ja :num! min) + ) + ) + ) + ) + ) + (target-hit-move + s5-0 + (target-hit-orient s5-0 s4-0) + (the-as (function none :behavior target) target-flut-falling-anim-trans) + f30-0 + ) + ) + ) + (cond + ((and (= (-> self game mode) 'play) (>= 0.0 (-> self fact health))) + (go target-flut-death (-> s5-0 mode)) + ) + ((and (= (-> self flut mode) 'normal) (= arg0 'attack)) + (go target-flut-eject (-> s5-0 mode)) + ) + (else + (go target-flut-hit-ground) + ) + ) + ) + ) + :post target-flut-post + ) + +(defstate target-flut-death (target) + :event (-> target-death event) + :exit (behavior () + ((-> target-flut-start exit)) + ((-> 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) + ) + ) + +(defstate target-flut-get-on (target) + :event target-generic-event-handler + :exit (behavior () + (logclear! (-> self target-flags) (target-flags tf5)) + ((-> target-flut-start exit)) + ) + :code (behavior ((arg0 handle)) + (set! (-> self control mod-surface) *flut-walk-mods*) + (set! (-> self control transv quad) (the-as uint128 0)) + (set! (-> self alt-cam-pos quad) (-> self control camera-pos quad)) + (logior! (-> self target-flags) (target-flags tf5 tf6)) + (set-time! (-> self state-time)) + (when (handle->process arg0) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> self control trans quad)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> self control trans quad)) + (quaternion-copy! (the-as quaternion (-> self control unknown-vector39)) (-> self control quat)) + (quaternion-copy! (the-as quaternion (-> self control unknown-vector40)) (-> self control quat-for-control)) + (set! (-> self control unknown-word04) (the-as uint (-> self control draw-offset y))) + (let* ((s2-0 (handle->process arg0)) + (s3-0 (if (type? s2-0 process-drawable) + (the-as process-drawable s2-0) + ) + ) + ) + (when s3-0 + (set! (-> s5-0 quad) (-> s3-0 root trans quad)) + (quaternion-copy! (the-as quaternion (-> self control unknown-vector40)) (-> s3-0 root quat)) + (send-event s3-0 'trans (-> self flut flut-trans)) + (quaternion-copy! (the-as quaternion (-> self flut flut-quat)) (-> s3-0 root quat)) + (set! (-> self flut flut-scale quad) (-> s3-0 root scale quad)) + (set! (-> self control did-move-to-pole-or-max-jump-height) (-> self flut flut-trans y)) + ) + ) + (set! (-> self control unknown-vector37 quad) (-> s4-0 quad)) + (set! (-> self control unknown-vector38 quad) (-> s5-0 quad)) + (let ((s4-1 #f)) + (sound-play "uppercut") + (ja-channel-push! 1 (seconds 0.05)) + (let ((s3-2 (if (-> self flut as-daxter?) + jakb-gun-yellow-fire-twirl-ja + jakb-flut-get-on-ja + ) + ) + (f30-0 (if (-> self flut as-daxter?) + 20.0 + 24.0 + ) + ) + ) + (ja-no-eval :group! s3-2 :num! (seek! (ja-aframe f30-0 0)) :frame-num 0.0) + (until (ja-done? 0) + (let* ((s3-3 (handle->process arg0)) + (v1-66 (if (type? s3-3 process-drawable) + (the-as process-drawable s3-3) + ) + ) + ) + (when v1-66 + (set! (-> s5-0 quad) (-> v1-66 root trans quad)) + (set! (-> self control unknown-vector38 quad) (-> s5-0 quad)) + (quaternion-copy! (the-as quaternion (-> self control unknown-vector40)) (-> v1-66 root quat)) + ) + ) + (when (and (not s4-1) (= (-> self skel root-channel 0) (-> self skel channel))) + (send-event (ppointer->process (-> self manipy)) 'anim-mode 'clone-anim) + (set! s4-1 #t) + ) + (set! (-> self control transv quad) (the-as uint128 0)) + (suspend) + (ja :num! (seek! (ja-aframe f30-0 0))) + ) + ) + ) + ) + ) + (sound-play "flut-coo") + ) + (send-event (ppointer->process (-> self manipy)) 'anim-mode 'clone-anim) + (logclear! (-> self target-flags) (target-flags tf6)) + (set! (-> self control transv quad) (the-as uint128 0)) + (quaternion-copy! (-> self control quat) (-> self control quat-for-control)) + (rot->dir-targ! (-> self control)) + (send-event (handle->process arg0) 'die) + (case (-> self flut mode) + (('wild) + (set-forward-vel 204800.0) + (set! (-> self control ctrl-xz-vel) 204800.0) + (ja-channel-set! 0) + ) + ) + (go target-flut-stance) + ) + :post (behavior () + (let ((gp-0 (new 'stack-no-clear 'vector)) + (f30-0 (fmin 1.0 (* 0.0044444446 (the float (- (current-time) (-> self state-time)))))) + ) + (case (-> self flut mode) + (('wild) + (set! f30-0 (lerp-scale 0.0 1.0 (ja-frame-num 0) 0.0 (the float (+ (-> (ja-group) frames num-frames) -1)))) + ) + ) + (vector-lerp! gp-0 (-> self control unknown-vector37) (-> self control unknown-vector38) f30-0) + (set! (-> gp-0 y) + (lerp + (-> self control unknown-vector37 y) + (-> self control unknown-vector38 y) + (fmax 0.0 (fmin 1.0 (* 0.006666667 (the float (+ (- (the-as int (-> self state-time))) (current-time)))))) + ) + ) + (move-to-point! (-> self control) gp-0) + (quaternion-slerp! + (-> self control quat-for-control) + (the-as quaternion (-> self control unknown-vector39)) + (the-as quaternion (-> self control unknown-vector40)) + f30-0 + ) + ) + (target-no-move-post) + (let ((f30-1 (-> self alt-cam-pos y))) + (if (-> self flut as-daxter?) + (vector<-cspace! (-> self alt-cam-pos) (-> self sidekick 0 node-list data 3)) + (vector<-cspace! (-> self alt-cam-pos) (joint-node jakb-lod0-jg Rankle)) + ) + (set! (-> self alt-cam-pos y) f30-1) + ) + ) + ) + +(let ((v1-45 (copy *forward-jump-mods* 'loading-level))) + (set! (-> v1-45 fric) 0.0) + (set! (-> v1-45 nonlin-fric-dist) 0.0) + (set! (-> v1-45 turnv) 0.0) + (set! (-> v1-45 turnvv) 0.0) + (set! (-> v1-45 tiltv) 131072.0) + (set! (-> v1-45 tiltvf) 30.0) + (set! (-> v1-45 mult-hook) + (the-as + (function surface surface surface int none) + (lambda :behavior target + ((arg0 surface) (arg1 surface) (arg2 surface) (arg3 int)) + (case arg3 + ((1) + (persist-with-delay *setting-control* 'string-spline-accel (seconds 0.05) 'string-spline-accel 'abs 4096.0 0) + (persist-with-delay + *setting-control* + 'string-spline-max-move + (seconds 0.05) + 'string-spline-max-move + 'abs + 40960.0 + 0 + ) + (persist-with-delay + *setting-control* + 'string-spline-accel-player + (seconds 0.05) + 'string-spline-accel-player + 'abs + 4096.0 + 0 + ) + (persist-with-delay + *setting-control* + 'string-spline-max-move-player + (seconds 0.05) + 'string-spline-max-move-player + 'abs + 40960.0 + 0 + ) + ) + ) + ) + ) + ) + (set! *flut-get-off-mods* v1-45) + ) + +(defstate target-flut-get-off (target) + :event target-generic-event-handler + :exit (-> target-flut-get-on exit) + :code (behavior ((arg0 handle)) + (logior! (-> self target-flags) (target-flags tf5)) + (set-forward-vel 0.0) + (let ((s5-0 0)) + (while (and (not (logtest? (-> self control status) (collide-status on-surface))) + (not (if (and (< (target-move-dist (-> *TARGET-bank* stuck-time)) (-> *TARGET-bank* stuck-distance)) (< 30 s5-0)) + #t + ) + ) + ) + (target-flut-falling-anim-trans) + (+! s5-0 (- (current-time) (-> self clock old-frame-counter))) + (suspend) + ) + ) + (go target-flut-get-off-jump) + ) + :post (behavior () + (target-no-stick-post) + (target-flut-post-post) + ) + ) + +(defstate target-flut-get-off-jump (target) + :event target-generic-event-handler + :exit (-> target-flut-start exit) + :code (behavior () + (let ((gp-1 (mem-copy! (the-as pointer (new 'stack 'transformq)) (the-as pointer (-> self control trans)) 48))) + (logior! (-> self target-flags) (target-flags tf5)) + (set! (-> self control mod-surface) *empty-mods*) + (rot->dir-targ! (-> self control)) + (set! (-> self neck flex-blend) 0.0) + (logior! (-> self target-flags) (target-flags tf6)) + (set! (-> self alt-cam-pos quad) (-> self control camera-pos quad)) + (ja-channel-push! 1 (seconds 0.1)) + (let ((s5-0 (if (-> self flut as-daxter?) + jakb-mech-dummy3-ja + jakb-flut-get-off-ja + ) + ) + ) + (ja-no-eval :group! s5-0 :num! (seek! (ja-aframe 18.0 0)) :frame-num 0.0) + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 18.0 0))) + ) + (rot->dir-targ! (-> self control)) + (ja-post) + (let ((s5-2 (new 'stack-no-clear 'vector))) + (vector<-cspace! s5-2 (joint-node jakb-lod0-jg main)) + (move-to-point! (-> self control) s5-2) + ) + (send-event *camera* 'ease-in) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (set-forward-vel 32768.0) + (process-spawn + flut + :init flut-init + (-> self flut entity) + gp-1 + (process->handle self) + (+ (if (= (-> self flut mode) 'wild) + 0 + 1 + ) + (shl (-> self flut color-index) 32) + ) + (-> self flut mode) + :name "flut" + :to self + ) + ) + (go target-jump 10240.0 10240.0 *flut-get-off-mods*) + ) + :post (behavior () + (let ((f30-0 (-> self alt-cam-pos y))) + (vector<-cspace! (-> self alt-cam-pos) (joint-node jakb-lod0-jg Rankle)) + (set! (-> self alt-cam-pos y) f30-0) + ) + (target-no-move-post) + ) + ) + +(defstate target-flut-eject (target) + :event target-generic-event-handler + :exit (-> target-flut-start exit) + :code (behavior ((arg0 symbol)) + (let ((s5-1 (mem-copy! (the-as pointer (new 'stack 'transformq)) (the-as pointer (-> self control trans)) 48))) + (logior! (-> self target-flags) (target-flags tf5)) + (set! (-> self control mod-surface) *empty-mods*) + (rot->dir-targ! (-> self control)) + (set! (-> self neck flex-blend) 0.0) + (logior! (-> self target-flags) (target-flags tf6)) + (set! (-> self alt-cam-pos quad) (-> self control camera-pos quad)) + (ja-channel-push! 1 (seconds 0.1)) + (case arg0 + (('drown) + (ja-no-eval :group! jakb-flut-death-drown-ja :num! (seek! (ja-aframe 60.0 0)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 60.0 0))) + ) + ) + (else + (ja-no-eval :group! jakb-flut-deathb-ja :num! (seek! (ja-aframe 25.0 0)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 25.0 0))) + ) + ) + ) + (rot->dir-targ! (-> self control)) + (ja-post) + (let ((s4-4 (new 'stack-no-clear 'vector))) + (vector<-cspace! s4-4 (joint-node jakb-lod0-jg main)) + (+! (-> s4-4 y) -9011.2) + (let ((v1-45 (-> self water flags))) + (if (and (logtest? (water-flag touch-water) v1-45) + (logtest? (water-flag under-water swimming) v1-45) + (not (logtest? (focus-status mech) (-> self focus-status))) + ) + (set! (-> s4-4 y) (-> self water collide-height)) + ) + ) + (move-to-point! (-> self control) s4-4) + ) + (send-event *camera* 'ease-in) + (ja-channel-set! 0) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (let ((s4-5 (if (= (-> self flut mode) 'wild) + 4 + 5 + ) + ) + ) + (case arg0 + (('drown) + (set! s4-5 (logior s4-5 10)) + ) + ) + (process-spawn + flut + :init flut-init + (-> self flut entity) + s5-1 + (process->handle self) + (+ s4-5 (shl (-> self flut color-index) 32)) + (-> self flut mode) + :name "flut" + :to self + ) + ) + ) + (cond + ((= arg0 'drown) + (logior! (-> self water flags) (water-flag jump-out)) + (go target-swim-jump 20480.0 20480.0) + ) + (else + (go target-jump 14336.0 14336.0 *flut-get-off-mods*) + ) + ) + ) + :post (behavior () + (let ((f30-0 (-> self alt-cam-pos y))) + (vector<-cspace! (-> self alt-cam-pos) (joint-node jakb-lod0-jg Rankle)) + (set! (-> self alt-cam-pos y) f30-0) + ) + (target-no-move-post) + ) + ) + +(defstate target-flut-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-flut-stance) + ) + (('flut) + (go target-grab 'stance) + ) + ) + ) + (('clone-anim) + (go target-flut-clone-anim (process->handle (the-as process (-> block param 0)))) + ) + (else + (target-generic-event-handler proc argc message block) + ) + ) + ) + ) + ) + :enter (behavior () + (set! (-> self control mod-surface) *grab-mods*) + (set! (-> self neck flex-blend) 0.0) + (logior! (-> self target-flags) (target-flags tf2)) + (logior! (-> self focus-status) (focus-status grabbed)) + ) + :exit (behavior () + (logclear! (-> self target-flags) (target-flags tf2)) + (logclear! (-> self focus-status) (focus-status grabbed)) + (logclear! (-> self water flags) (water-flag jump-out)) + (target-exit) + ((-> target-flut-start exit)) + ) + :code (-> target-flut-stance code) + :post (behavior () + (target-no-stick-post) + (target-flut-post-post) + ) + ) + +(defstate target-flut-clone-anim (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (if (and (= message 'trans) (= (-> block param 0) 'restore)) + (set! (-> self control unknown-word04) (the-as uint #f)) + ) + ((-> target-flut-grab event) proc argc message block) + ) + :enter (-> target-clone-anim enter) + :exit (behavior () + (send-event (ppointer->process (-> self sidekick)) 'matrix #f) + ((-> target-clone-anim exit)) + ((-> target-flut-start exit)) + ) + :code (behavior ((arg0 handle)) + (send-event (ppointer->process (-> self sidekick)) 'matrix 'play-anim) + (clone-anim arg0 #t "") + (go target-flut-stance) + ) + :post (behavior () + (target-no-ja-move-post) + (target-flut-post-post) + ) + ) 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 43a991e904..4bf69f73de 100644 --- a/goal_src/jak3/engine/target/gun/gun-blue-shot.gc +++ b/goal_src/jak3/engine/target/gun/gun-blue-shot.gc @@ -5,5 +5,2758 @@ ;; name in dgo: gun-blue-shot ;; dgos: GAME +(declare-type gun-blue-shot projectile) +(declare-type gun-blue-shot-2 gun-blue-shot) +(declare-type gun-blue-2-target-info structure) +(define-extern *blue-shot-trail* light-trail-composition) +(define-extern *gun-blue-2-targets* (inline-array gun-blue-2-target-info)) +(define-extern *uv-loop-curve* curve2d-piecewise) +(define-extern *blue-light-test* lightning-appearance) +(define-extern *blue-light-test-end* lightning-appearance) +(define-extern *blue-light-test-big* lightning-appearance) +(define-extern *blue-light-test-big-intense* lightning-appearance) +(define-extern *blue-light-test-small-fade* lightning-appearance) + +;; +++gun-blue-lightning-cmd-msg +(defenum gun-blue-lightning-cmd-msg + :type uint64 + (active 0) + (inactive 1) + ) +;; ---gun-blue-lightning-cmd-msg + + ;; DECOMP BEGINS +(defun sparticle-fade-alpha-dist ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) + (let ((a0-1 (math-camera-pos)) + (v1-0 (new 'stack-no-clear 'vector)) + ) + 0.0 + (set! (-> v1-0 x) (- (-> arg2 rvec x) (-> a0-1 x))) + (set! (-> v1-0 y) (- (-> arg2 rvec y) (-> a0-1 y))) + (set! (-> v1-0 z) (- (-> arg2 rvec z) (-> a0-1 z))) + (let ((f1-3 (vector-length v1-0))) + (set! (-> arg2 fvec w) (* 128.0 (- 1.0 (* 0.0000024414062 f1-3)))) + ) + ) + 0 + (none) + ) + +(set! (-> *lightning-spec-id-table* 12) (new 'static 'lightning-spec + :name "lightning-blue-shot-attack-explode" + :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 1.0 + :fade-time 30.0 + :texture (new 'static 'texture-id :index #x8f :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 8192.0 + :merge-factor 0.6 + :merge-count 2 + :radius 3276.8 + :duration 45.0 + :duration-rand 60.0 + :sound #f + ) + ) + +(set! (-> *lightning-spec-id-table* 13) (new 'static 'lightning-spec + :name "lightning-blue-shot-terminal" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x10) + :end-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x10) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 1.0 + :fade-time 30.0 + :texture (new 'static 'texture-id :index #x8f :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 8192.0 + :merge-factor 0.6 + :merge-count 2 + :radius 3276.8 + :duration 75.0 + :sound #f + ) + ) + +;; WARN: Return type mismatch (pointer process) vs object. +(defbehavior gun-fire-blue-1 target () + (let ((gp-0 (-> self gun)) + (s4-0 (-> self gun laser-dir)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (let ((s3-0 (new 'stack-no-clear 'quaternion))) + (quaternion-vector-angle! s3-0 s4-0 (* 182.04445 (rand-vu-float-range 0.0 360.0))) + (vector-rotate-y! s5-0 s4-0 (* 182.04445 (rand-vu-float-range 0.0 1.1))) + (vector-orient-by-quat! s5-0 s5-0 s3-0) + ) + (let ((s4-1 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> s4-1 ent) (-> self entity)) + (set! (-> s4-1 charge) 1.0) + (set! (-> s4-1 options) (projectile-options po17)) + (logclear! (-> s4-1 options) (projectile-options po14 po15 po16)) + (set! (-> s4-1 pos quad) (-> gp-0 fire-point quad)) + (set! (-> s4-1 vel quad) (-> s5-0 quad)) + (set! (-> s4-1 notify-handle) (the-as handle #f)) + (set! (-> s4-1 owner-handle) (the-as handle #f)) + (set! (-> s4-1 target-handle) (the-as handle #f)) + (set! (-> s4-1 target-pos quad) (the-as uint128 0)) + (set! (-> s4-1 ignore-handle) (process->handle (send-event self 'get-vehicle))) + (let* ((v1-16 *game-info*) + (a0-16 (+ (-> v1-16 attack-id) 1)) + ) + (set! (-> v1-16 attack-id) a0-16) + (set! (-> s4-1 attack-id) a0-16) + ) + (set! (-> s4-1 timeout) (seconds 4)) + (spawn-projectile gun-blue-shot s4-1 (ppointer->process (-> gp-0 gun)) *default-dead-pool*) + ) + ) + ) + +(defun fmod-2 ((arg0 float) (arg1 float)) + (- arg0 (* (the float (the int (/ arg0 arg1))) arg1)) + ) + +(deftype gun-blue-shot-3 (projectile) + ((hit-actor? symbol) + (start-pos vector :inline) + (track-mode uint64) + (random-travel-distance float) + ) + ) + + +(deftype dist-dot-val (structure) + ((dot float) + (dist float) + (current-dir-vec vector :inline) + (vec-to-target vector :inline) + ) + ) + + +;; WARN: Return type mismatch float vs object. +(defun get-dist-and-dot ((arg0 gun-blue-shot) (arg1 dist-dot-val)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> arg0 desired-target-pos quad)) + (let ((s5-0 (vector-normalize-copy! (-> arg1 current-dir-vec) (-> arg0 root transv) 1.0))) + (let ((a0-2 (-> arg1 vec-to-target))) + (vector-! a0-2 s4-0 (-> arg0 root trans)) + (set! (-> arg1 dist) (vector-normalize-ret-len! a0-2 1.0)) + ) + (set! (-> arg1 dot) (vector-dot s5-0 (-> arg1 vec-to-target))) + ) + ) + ) + +(defun gun-blue-shot-3-move ((arg0 gun-blue-shot-3)) + (with-pp + (let ((v1-0 (-> arg0 track-mode))) + (cond + ((or (= v1-0 1) (zero? v1-0)) + (let ((s5-0 #f) + (a0-4 (the-as process #f)) + ) + (when (handle->process (-> arg0 desired-target)) + (let ((s4-0 (handle->process (-> arg0 desired-target)))) + (set! a0-4 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (if a0-4 + (set! s5-0 #t) + ) + ) + (cond + (s5-0 + (let ((a0-9 (get-trans (the-as process-focusable a0-4) 3))) + (set! (-> arg0 desired-target-pos quad) (-> a0-9 quad)) + ) + ) + ((= (-> arg0 track-mode) 1) + (set! (-> arg0 track-mode) (the-as uint 2)) + ) + ) + ) + ) + ((= v1-0 2) + (if (< (vector-vector-distance-squared (-> arg0 root trans) (-> arg0 desired-target-pos)) 1073741800.0) + (set! (-> arg0 track-mode) (the-as uint 3)) + ) + ) + ) + ) + (when (zero? (-> arg0 track-mode)) + (let ((f0-1 (vector-vector-distance (-> arg0 start-pos) (-> arg0 root trans)))) + (cond + ((< (-> arg0 random-travel-distance) f0-1) + (set! (-> arg0 track-mode) (the-as uint 1)) + (set-time! (-> arg0 state-time)) + ) + (else + (when (< (vector-vector-distance (-> arg0 root trans) (-> arg0 desired-target-pos)) 40960.0) + (set! (-> arg0 track-mode) (the-as uint 1)) + (set-time! (-> arg0 state-time)) + ) + ) + ) + ) + ) + (if (logtest? (-> arg0 root status) (collide-status touch-surface)) + (go (method-of-object arg0 impact)) + ) + (let ((v1-40 (-> arg0 track-mode))) + (cond + ((zero? v1-40) + (let ((s5-1 (new 'stack-no-clear 'dist-dot-val))) + (get-dist-and-dot (the-as gun-blue-shot arg0) s5-1) + (let* ((f0-4 (* 0.5 (+ 1.0 (-> s5-1 dot)))) + (f0-5 (* f0-4 f0-4)) + ) + (vector-normalize! (-> arg0 root transv) (lerp 122880.0 409600.0 f0-5)) + ) + ) + (let ((s5-3 (-> arg0 child))) + (while s5-3 + (send-event (ppointer->process s5-3) 'notice 'add-crumb) + (set! s5-3 (-> s5-3 0 brother)) + ) + ) + ) + ((or (= v1-40 1) (= v1-40 2)) + (let ((s5-4 (new 'stack-no-clear 'vector))) + (set! (-> s5-4 quad) (-> arg0 root trans quad)) + (let ((f30-0 2.0) + (f24-0 65536.0) + ) + 327680.0 + 0.0 + (let* ((f28-0 (/ (the float (- (current-time) (-> pp clock old-frame-counter))) f30-0)) + (f26-0 f28-0) + ) + (dotimes (s4-2 (the int f30-0)) + (let ((s3-0 (new 'stack-no-clear 'dist-dot-val))) + (get-dist-and-dot (the-as gun-blue-shot arg0) s3-0) + (when (< (-> s3-0 dist) 49152.0) + (let ((f0-12 (* 0.000020345053 (-> s3-0 dist))) + (f24-1 (* 0.5 (+ 1.0 (-> s3-0 dot)))) + ) + (set! f24-0 (* (lerp 65536.0 131072.0 f0-12) (- 2.0 f24-1))) + ) + (when (and (= (-> arg0 track-mode) 1) (time-elapsed? (-> arg0 state-time) (seconds 1))) + (let ((f0-15 (* 1.3333334 (+ -0.75 (* 0.0033333334 (the float (- (current-time) (-> arg0 state-time)))))))) + (set! f24-0 (* f24-0 (lerp 1.0 2.0 f0-15))) + ) + ) + ) + (cond + ((< 0.99 (-> s3-0 dot)) + (set! (-> s3-0 current-dir-vec quad) (-> s3-0 vec-to-target quad)) + ) + (else + (let* ((s2-0 (new 'stack-no-clear 'vector)) + (f22-0 0.0) + (f0-19 (acos (-> s3-0 dot))) + (f22-1 (deg-seek f22-0 f0-19 (/ (* f24-0 (seconds-per-frame)) f30-0))) + ) + (vector-cross! s2-0 (-> s3-0 vec-to-target) (-> s3-0 current-dir-vec)) + (vector-normalize! s2-0 1.0) + (vector-rotate-around-axis! + (-> s3-0 current-dir-vec) + (the-as quaternion (-> s3-0 current-dir-vec)) + (* -1.0 f22-1) + s2-0 + ) + ) + ) + ) + (set! (-> arg0 root transv quad) (-> s3-0 current-dir-vec quad)) + (let* ((f0-26 (* 0.5 (+ 1.0 (-> s3-0 dot)))) + (f0-27 (* f0-26 f0-26)) + (f0-28 (lerp 122880.0 409600.0 f0-27)) + ) + (vector-normalize! (-> arg0 root transv) f0-28) + ) + ) + (let ((a1-27 (vector-float*! (new 'stack-no-clear 'vector) (-> arg0 root transv) (/ 1.0 f30-0)))) + (vector-v++! (-> arg0 root trans) a1-27) + ) + (let ((s3-1 (-> arg0 child))) + (while s3-1 + (send-event (ppointer->process s3-1) 'notice 'add-crumb-elapsed f26-0) + (set! s3-1 (-> s3-1 0 brother)) + ) + ) + (when (< (vector-vector-distance (-> arg0 root trans) (-> arg0 desired-target-pos)) 8192.0) + 0 + (goto cfg-70) + ) + (+! f26-0 f28-0) + ) + ) + ) + (label cfg-70) + (vector-! (-> arg0 root transv) (-> arg0 root trans) s5-4) + (set! (-> arg0 root trans quad) (-> s5-4 quad)) + ) + (vector-float*! (-> arg0 root transv) (-> arg0 root transv) (/ 1.0 (seconds-per-frame))) + ) + ) + ) + (projectile-move-fill-line-sphere arg0) + (none) + ) + ) + +(deftype light-trail-tracker-blue-3 (light-trail-tracker-projectile) + () + ) + + +(defmethod light-trail-tracker-method-17 ((this light-trail-tracker-blue-3) (arg0 process-focusable)) + #f + ) + +(if (or (zero? *blue-shot-trail*) (!= loading-level global)) + (set! *blue-shot-trail* (new 'loading-level 'light-trail-composition)) + ) + +(set! (-> *blue-shot-trail* color-mode) (the-as uint 0)) + +(set! (-> *blue-shot-trail* color-repeat-dist) 40960.0) + +(set! (-> *blue-shot-trail* alpha-1-mode) (the-as uint 0)) + +(set! (-> *blue-shot-trail* alpha-2-mode) (the-as uint 6)) + +(set! (-> *blue-shot-trail* base-alpha) 1.0) + +(set! (-> *blue-shot-trail* alpha-repeat-dist) 94208.0) + +(set! (-> *blue-shot-trail* width-mode) (the-as uint 2)) + +(set! (-> *blue-shot-trail* base-width) 2048.0) + +(set! (-> *blue-shot-trail* width-repeat-dist) 12288.0) + +(set! (-> *blue-shot-trail* uv-mode) (the-as uint 0)) + +(set! (-> *blue-shot-trail* uv-repeat-dist) 163840.0) + +(set! (-> *blue-shot-trail* lie-mode) (the-as uint 0)) + +(set! (-> *blue-shot-trail* max-age) (seconds 0.5)) + +(if #f + (set! (-> *blue-shot-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *blue-shot-trail* tex-id) (the-as uint #x500f00)) + ) + +(set! (-> *blue-shot-trail* width-curve) (the-as curve2d-piecewise *curve-linear-up*)) + +(set! (-> *blue-shot-trail* color-curve) (the-as curve-color-piecewise *trail-color-curve-white*)) + +(set! (-> *blue-shot-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +(set! (-> *blue-shot-trail* alpha-curve-2) #f) + +(set! (-> *blue-shot-trail* zbuffer?) #f) + +(set! (-> *blue-shot-trail* lie-vector quad) (-> *up-vector* quad)) + +(set! (-> *blue-shot-trail* use-tape-mode?) #f) + +(set! (-> *blue-shot-trail* blend-mode) (the-as uint 1)) + +(set! (-> *blue-shot-trail* frame-stagger) (the-as uint 1)) + +(defmethod init-proj-settings! ((this gun-blue-shot-3)) + (+! (-> *game-info* shots-fired 2) 1.0) + (set! (-> this attack-mode) 'eco-blue) + (set! (-> this max-speed) 327680.0) + (set! (-> this move) gun-blue-shot-3-move) + (set! (-> this timeout) (seconds 3)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this damage) 1.0) + (set! (-> this vehicle-damage-factor) 2.0) + (set! (-> this vehicle-impulse-factor) 2.0) + (logior! (-> this options) (projectile-options po13)) + (set! (-> this track-mode) (the-as uint 0)) + (set! (-> this start-pos quad) (-> this root trans quad)) + (let* ((f30-0 12288.0) + (f28-0 28672.0) + (v1-16 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-17 (the-as number (logior #x3f800000 v1-16))) + ) + (set! (-> this random-travel-distance) (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-17))))) + ) + (let ((s5-0 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-0 tracked-obj) (process->handle this)) + (set! (-> s5-0 appearance) *blue-shot-trail*) + (set! (-> s5-0 max-num-crumbs) (the int (* 0.2 (the float (-> s5-0 appearance max-age))))) + (set! (-> s5-0 track-immediately?) #t) + (let* ((v1-30 (estimate-light-trail-mem-usage + (the-as uint (-> s5-0 max-num-crumbs)) + (the-as uint (= (-> s5-0 appearance lie-mode) 3)) + ) + ) + (s4-0 (get-process *default-dead-pool* light-trail-tracker-blue-3 (+ v1-30 8192) 1)) + ) + (when s4-0 + (let ((t9-4 (method-of-type process activate))) + (t9-4 s4-0 this "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-0 light-trail-tracker-init-by-other s5-0) + (-> s4-0 ppointer) + ) + ) + ) + 0 + (none) + ) + +(defmethod projectile-method-32 ((this gun-blue-shot-3)) + (if (not (do-fire-backcheck (-> this root trans) (-> this root transv))) + (go (method-of-object this impact)) + (call-parent-method this) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this gun-blue-shot-3) (arg0 projectile-options)) + (case arg0 + (((projectile-options po0)) + (sound-play "blue-gun3-ricco" :position (-> this root trans)) + ) + ) + (none) + ) + +(defmethod projectile-method-25 ((this gun-blue-shot-3)) + 0 + (none) + ) + +(deftype target-quality-info (structure) + ((targ handle) + (value float) + ) + ) + + +;; WARN: Return type mismatch (pointer process) vs object. +(defbehavior gun-fire-blue-3 target () + (local-vars + (sv-144 gun-info) + (sv-148 projectile-init-by-other-params) + (sv-1280 vector) + (sv-1284 (inline-array target-quality-info)) + (sv-1288 int) + (sv-1296 float) + (sv-1300 object) + ) + (set! sv-144 (-> self gun)) + (set! sv-148 (new 'stack-no-clear 'projectile-init-by-other-params)) + (draw-beam (-> *part-id-table* 364) (-> sv-144 fire-point) (-> sv-144 fire-dir-out) #f) + (set! sv-1280 (new 'stack-no-clear 'vector)) + (set! sv-1284 (new 'stack-no-clear 'inline-array 'target-quality-info 384)) + (set! sv-1288 0) + (set! sv-1296 (the-as float 0.0)) + (set! sv-1300 (send-event *target* 'get-vehicle)) + (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)) + (let* ((s4-0 (-> gp-0 s5-0)) + (v1-16 (if (type? s4-0 collide-shape) + s4-0 + ) + ) + ) + (when v1-16 + (let* ((s3-0 (-> v1-16 process)) + (s4-1 (if (type? s3-0 process-focusable) + s3-0 + ) + ) + ) + (when s4-1 + (when (and (!= *target* s4-1) + (!= sv-1300 s4-1) + (not (focus-test? (the-as process-focusable s4-1) disable dead inactive gun-no-target)) + (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?)) + ) + ) + (let ((s3-1 (new 'stack-no-clear 'collide-query))) + (vector+float*! (-> s3-1 start-pos) (-> sv-144 fire-point) (-> sv-144 fire-dir-out) 40960.0) + (+! (-> s3-1 start-pos y) 24576.0) + (vector-! (-> s3-1 move-dist) (get-trans (the-as process-focusable s4-1) 3) (-> sv-144 fire-point)) + (let ((v1-32 s3-1)) + (set! (-> v1-32 radius) 40.96) + (set! (-> v1-32 collide-with) (collide-spec backgnd)) + (set! (-> v1-32 ignore-process0) #f) + (set! (-> v1-32 ignore-process1) #f) + (set! (-> v1-32 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-32 action-mask) (collide-action solid)) + ) + (when (< (fill-and-probe-using-line-sphere *collide-cache* s3-1) 0.0) + (let ((s3-3 + (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable s4-1) 3) (-> self control trans)) + ) + ) + (vector-normalize! s3-3 1.0) + (when (< (-> s3-3 y) 0.5) + (set! (-> sv-1284 sv-1288 targ) (process->handle s4-1)) + (let ((f30-0 1.0)) + (if (and (nonzero? (-> s4-1 draw)) (logtest? (-> s4-1 draw status) (draw-control-status on-screen))) + (set! f30-0 (+ 2.0 f30-0)) + ) + (if (< (vector-vector-xz-distance-squared (-> sv-144 fire-point) (get-trans (the-as process-focusable s4-1) 3)) + 2415919000.0 + ) + (set! f30-0 (+ 4.0 f30-0)) + ) + (if (logtest? (process-mask enemy guard) (-> s4-1 mask)) + (set! f30-0 (+ 28.0 f30-0)) + ) + (if (logtest? (process-mask vehicle civilian) (-> s4-1 mask)) + (set! f30-0 (* 0.25 f30-0)) + ) + (set! (-> sv-1284 sv-1288 value) f30-0) + (set! sv-1296 (+ sv-1296 f30-0)) + ) + (set! sv-1288 (+ sv-1288 1)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (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)) + ) + ) + ) + ) + ) + ) + ) + (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)) + (s5-7 (the-as process #f)) + ) + (let ((f1-11 0.0) + (gp-2 (new 'stack-no-clear 'vector)) + ) + (dotimes (v1-136 sv-1288) + (+! f1-11 (-> sv-1284 v1-136 value)) + (when (< f0-32 f1-11) + (set! s5-7 (handle->process (-> sv-1284 v1-136 targ))) + 0 + (goto cfg-91) + ) + ) + (label cfg-91) + (let ((s4-5 (new 'stack-no-clear 'vector))) + (let ((s3-5 s4-5)) + (let* ((f30-2 -1.0) + (f28-0 2.0) + (v1-148 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-149 (the-as number (logior #x3f800000 v1-148))) + ) + (set! (-> s3-5 x) (+ f30-2 (* f28-0 (+ -1.0 (the-as float v1-149))))) + ) + (let* ((f30-3 -0.2) + (f28-1 0.7) + (v1-154 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-155 (the-as number (logior #x3f800000 v1-154))) + ) + (set! (-> s3-5 y) (+ f30-3 (* f28-1 (+ -1.0 (the-as float v1-155))))) + ) + (let* ((f30-4 -1.0) + (f28-2 2.0) + (v1-160 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-161 (the-as number (logior #x3f800000 v1-160))) + ) + (set! (-> s3-5 z) (+ f30-4 (* f28-2 (+ -1.0 (the-as float v1-161))))) + ) + (set! (-> s3-5 w) 1.0) + ) + (vector-normalize! s4-5 163840.0) + (vector+! gp-2 (-> sv-144 fire-point) s4-5) + ) + (let ((s4-6 (new 'stack-no-clear 'vector))) + (set! (-> s4-6 quad) (-> gp-2 quad)) + (when s5-7 + (let ((s3-6 s4-6) + (s2-3 s5-7) + ) + (set! (-> s3-6 quad) (-> (get-trans + (the-as process-focusable (if (type? s2-3 process-focusable) + (the-as process-focusable s2-3) + ) + ) + 3 + ) + quad + ) + ) + ) + ) + (let ((s3-7 (vector-rotate-y! (new 'stack-no-clear 'vector) (-> sv-144 fire-dir-out) 2730.6667)) + (v1-174 (vector-rotate-y! (new 'stack-no-clear 'vector) (-> sv-144 fire-dir-out) -2730.6667)) + (a0-114 (vector-! (new 'stack-no-clear 'vector) s4-6 (-> sv-144 fire-point))) + (s4-7 (new 'stack-no-clear 'vector)) + ) + (if (< (vector-dot s3-7 a0-114) (vector-dot v1-174 a0-114)) + (set! (-> s4-7 quad) (-> s3-7 quad)) + (set! (-> s4-7 quad) (-> v1-174 quad)) + ) + (vector-normalize! a0-114 1.0) + (let* ((s3-8 vector-rotate-y!) + (s2-4 s4-7) + (s1-0 s4-7) + (f30-5 -2730.6667) + (f28-3 5461.3335) + (v1-180 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-181 (the-as number (logior #x3f800000 v1-180))) + ) + (s3-8 s2-4 s1-0 (+ f30-5 (* f28-3 (+ -1.0 (the-as float v1-181))))) + ) + (let* ((f30-6 -0.1) + (f28-4 0.5) + (v1-186 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-187 (the-as number (logior #x3f800000 v1-186))) + ) + (set! (-> s4-7 y) (+ f30-6 (* f28-4 (+ -1.0 (the-as float v1-187))) (-> s4-7 y))) + ) + (vector-normalize! s4-7 1.0) + (set! (-> sv-148 ent) (-> self entity)) + (set! (-> sv-148 charge) 1.0) + (set! (-> sv-148 options) (projectile-options)) + (logclear! (-> sv-148 options) (projectile-options po14 po15 po16)) + (set! (-> sv-148 pos quad) (-> sv-144 fire-point quad)) + (set! (-> sv-148 notify-handle) (the-as handle #f)) + (set! (-> sv-148 owner-handle) (the-as handle #f)) + (set! (-> sv-148 target-handle) (process->handle s5-7)) + (set! (-> sv-148 target-pos quad) (-> gp-2 quad)) + (set! (-> sv-148 ignore-handle) (process->handle (send-event self 'get-vehicle))) + (let* ((v1-209 *game-info*) + (a0-143 (+ (-> v1-209 attack-id) 1)) + ) + (set! (-> v1-209 attack-id) a0-143) + (set! (-> sv-148 attack-id) a0-143) + ) + (set! (-> sv-148 timeout) (seconds 4)) + (vector-float*! (-> sv-148 vel) s4-7 327680.0) + ) + ) + ) + ) + (spawn-projectile gun-blue-shot-3 sv-148 (ppointer->process (-> sv-144 gun)) *default-dead-pool*) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun draw-beam-segment () + (none) + ) + +(define *found-objects* (the-as (pointer handle) (malloc 'global 112))) + +(define *gun-blue-2-last-attack-id* (the-as uint 0)) + +(deftype timeframe-wrapper (structure) + ((time time-frame) + ) + ) + + +(define *gun-blue-2-last-attack-id-time* (new 'static 'timeframe-wrapper)) + +;; WARN: Return type mismatch (pointer process) vs (pointer gun-blue-shot-2). +(defun fire-projectile-if-necessary ((arg0 vector) (arg1 vector) (arg2 handle)) + (let ((s5-0 (new 'stack-no-clear 'collide-query)) + (s3-0 #f) + ) + (vector-! (-> s5-0 move-dist) arg1 arg0) + (set! (-> s5-0 start-pos quad) (-> arg0 quad)) + (vector-float*! (-> s5-0 move-dist) (-> s5-0 move-dist) 2.0) + (let ((v1-5 s5-0)) + (set! (-> v1-5 radius) 12288.0) + (set! (-> v1-5 collide-with) (collide-spec crate civilian enemy obstacle vehicle-sphere hit-by-others-list)) + (set! (-> v1-5 ignore-process0) (handle->process arg2)) + (set! (-> v1-5 ignore-process1) #f) + (set! (-> v1-5 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-5 action-mask) (collide-action solid)) + ) + (let ((f0-2 (fill-and-probe-using-line-sphere *collide-cache* s5-0))) + (if (and (< f0-2 1.0) (!= f0-2 -100000000.0)) + (set! s3-0 #t) + ) + ) + (the-as + (pointer gun-blue-shot-2) + (when s3-0 + (when (>= (- (-> *display* game-clock frame-counter) (-> *gun-blue-2-last-attack-id-time* time)) (seconds 0.4)) + (let* ((v1-19 *game-info*) + (a0-16 (+ (-> v1-19 attack-id) 1)) + ) + (set! (-> v1-19 attack-id) a0-16) + (set! *gun-blue-2-last-attack-id* a0-16) + ) + (set! (-> *gun-blue-2-last-attack-id-time* time) (-> *display* game-clock frame-counter)) + ) + (let ((a1-8 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> a1-8 ent) (-> *target* entity)) + (set! (-> a1-8 charge) 1.0) + (set! (-> a1-8 options) (projectile-options)) + (logclear! (-> a1-8 options) (projectile-options po14 po15 po16)) + (set! (-> a1-8 pos quad) (-> arg0 quad)) + (set! (-> a1-8 vel quad) + (-> (vector-float*! (new 'stack-no-clear 'vector) (-> s5-0 move-dist) (/ 2.0 (seconds-per-frame))) quad) + ) + (set! (-> a1-8 notify-handle) (the-as handle #f)) + (set! (-> a1-8 owner-handle) (process->handle *target*)) + (set! (-> a1-8 target-handle) (the-as handle #f)) + (set! (-> a1-8 target-pos quad) (the-as uint128 0)) + (set! (-> a1-8 ignore-handle) (ppointer->handle (-> arg2 process))) + (set! (-> a1-8 attack-id) *gun-blue-2-last-attack-id*) + (set! (-> a1-8 timeout) (seconds 4)) + (spawn-projectile gun-blue-shot-2 a1-8 (ppointer->process (-> *target* gun gun)) *default-dead-pool*) + ) + ) + ) + ) + ) + +(deftype gun-blue-2-lightning-info (structure) + ((pts vector 32 :inline) + (num-pts int8) + (should-draw-terminal-sparks? symbol) + (terminal-spark-pos vector :inline) + (should-draw-extension? symbol) + (extension-end-point vector :inline) + ) + ) + + +(deftype gun-blue-lightning-command (structure) + ((msg gun-blue-lightning-cmd-msg) + (lightning-info gun-blue-2-lightning-info :inline) + ) + ) + + +(deftype gun-blue-2-lightning-tracker (process-drawable) + ((lt-array (array lightning-bolt)) + (should-draw-this-frame? symbol) + (last-spark-time time-frame :offset 216) + (spark-time-interval time-frame) + (last-deduct-ammo-time time-frame) + (snd-lightning sound-id) + (active-enter-time time-frame) + (revolve-angle float) + (sway-angle float) + (snd-spin sound-id) + (spin-intensity float) + (prev-targ-pos vector :inline) + (last-probe-index int16) + ) + (:state-methods + active + inactive + die + test + ) + (:methods + (setup-draw! (_type_ gun-blue-2-lightning-info) none) + (gun-blue-2-lightning-tracker-method-25 (_type_) object) + (gun-blue-2-lightning-tracker-method-26 (_type_ vector vector gun-blue-lightning-command) symbol) + ) + ) + + +(defmethod deactivate ((this gun-blue-2-lightning-tracker)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this snd-spin)) + (sound-stop (-> this snd-lightning)) + (call-parent-method this) + (none) + ) + +(deftype gun-blue-2-target-info (structure) + ((target handle) + (start-time time-frame) + ) + ) + + +(if (zero? *gun-blue-2-targets*) + (set! *gun-blue-2-targets* (the-as (inline-array gun-blue-2-target-info) (malloc 'global 192))) + ) + +(deftype constraint-knot (structure) + ((pt vector :inline) + (dir vector :inline) + (length float) + ) + ) + + +(deftype rope-constraint (structure) + ((constraints constraint-knot 12 :inline) + (num-knots uint8) + ) + (:methods + (rope-constraint-method-9 (_type_ int) symbol) + ) + ) + + +(defmethod rope-constraint-method-9 ((this rope-constraint) (arg0 int)) + (local-vars (sv-64 vector) (sv-80 vector) (sv-96 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) + (let ((s4-0 arg0) + (s3-0 (+ (-> this num-knots) -2)) + ) + (while (>= (the-as int s3-0) s4-0) + (dotimes (s2-0 1) + (set! sv-64 (the-as vector (+ (the-as uint (-> this constraints 0 dir)) (* 48 s4-0)))) + (let ((s1-0 (-> this constraints s4-0)) + (s0-0 (-> this constraints (+ s4-0 1))) + ) + (set! sv-96 (new 'stack-no-clear 'vector)) + (let ((v1-6 s0-0) + (a0-7 s1-0) + ) + (.lvf vf4 (&-> v1-6 pt quad)) + (.lvf vf5 (&-> a0-7 pt quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-96 quad) vf6) + 0.0 + (let ((f30-0 (vector-normalize-ret-len! sv-96 1.0))) + (vector-normalize! sv-64 1.0) + (let ((f0-2 (vector-dot sv-96 sv-64))) + (when (< f0-2 0.9999) + (set! sv-80 (new 'stack-no-clear 'vector)) + 0.0 + (let* ((f28-0 (acos f0-2)) + (f0-4 (* 0.000030517578 f28-0)) + ) + 0.0 + 0.0 + (- 32768.0 f28-0) + (let* ((f0-6 (fmax 0.0 (fmin 1.0 f0-4))) + (f0-7 (* f0-6 f0-6)) + (f28-1 + (fmin (fmin f28-0 (* (lerp 5461.3335 2184533.2 f0-7) (seconds-per-frame))) (* 131072.0 (seconds-per-frame))) + ) + ) + (let ((v1-20 sv-80)) + (.lvf vf1 (&-> sv-96 quad)) + (.lvf vf2 (&-> sv-64 quad)) + (.outer.product.a.vf acc vf1 vf2) + (.outer.product.b.vf vf3 vf2 vf1 acc) + (.svf (&-> v1-20 quad) vf3) + ) + (vector-normalize! sv-80 1.0) + (vector-rotate-around-axis! sv-96 (the-as quaternion sv-96) f28-1 sv-80) + ) + ) + (vector-normalize! sv-96 1.0) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this constraints 0 dir)) (* 48 (+ s4-0 1))))) + (-> sv-96 quad) + ) + (vector+float*! (the-as vector s0-0) (the-as vector s1-0) sv-96 f30-0) + ) + ) + ) + ) + ) + (+! s4-0 1) + ) + ) + (let ((s4-1 (+ (-> this num-knots) -2))) + (while (>= (the-as int s4-1) arg0) + (+ (the-as uint (-> this constraints 0 dir)) (* 48 arg0)) + (let* ((s3-1 (-> this constraints arg0)) + (s2-1 (-> this constraints (+ arg0 1))) + (s1-2 (vector-! (new 'stack-no-clear 'vector) (the-as vector s2-1) (the-as vector s3-1))) + ) + 0.0 + (vector-normalize-ret-len! s1-2 1.0) + (vector+float*! (the-as vector s2-1) (the-as vector s3-1) s1-2 (-> this constraints arg0 length)) + ) + (+! arg0 1) + ) + ) + #f + ) + ) + +(define *blue-2-lightning-shape* (new 'static 'rope-constraint)) + +(defstate die (gun-blue-2-lightning-tracker) + :virtual #t + :code (behavior () + '() + ) + ) + +(defstate inactive (gun-blue-2-lightning-tracker) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('gun-blue-lightning) + (when (= (-> (the-as gun-blue-lightning-command (-> block param 0)) msg) (gun-blue-lightning-cmd-msg active)) + (if (= (-> *target* gun using-gun-type) (pickup-type gun-blue-2)) + (go-virtual active) + ) + ) + ) + (('notice) + (case (-> block param 0) + (('die) + (go-virtual die) + ) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :exit (behavior () + (if (not (and (-> self next-state) (= (-> self next-state name) 'active))) + (sound-stop (-> self snd-spin)) + ) + ) + :trans (behavior () + (if (not (time-elapsed? (-> self state-time) (seconds 0.2))) + (sound-play-by-name + (static-sound-name "blue-gun2-loop") + (-> self snd-lightning) + 768 + (the int (* 1524.0 (lerp 0.0 -0.5 (* 0.016666668 (the float (- (current-time) (-> self state-time))))))) + 0 + (sound-group) + #t + ) + (sound-stop (-> self snd-lightning)) + ) + (let ((f0-6 (lerp-scale-clamp 0.0 1.0 (-> *target* gun fire-spinv) 0.0 218453.33))) + 0.0 + (seek! (-> self spin-intensity) f0-6 (* 2.0 (seconds-per-frame))) + ) + (if (< 0.001 (-> self spin-intensity)) + (sound-play-by-name + (static-sound-name "blue-gun2-spin") + (-> self snd-spin) + (the int (* 1024.0 (lerp 0.3 1.0 (-> self spin-intensity)))) + (the int (* 1524.0 (lerp -0.5 0.0 (-> self spin-intensity)))) + 0 + (sound-group) + #t + ) + (sound-stop (-> self snd-spin)) + ) + (if (!= (lightning-bolt-method-14 (-> self lt-array 0)) 3) + (gun-blue-2-lightning-tracker-method-25 self) + ) + (dotimes (gp-3 (-> self lt-array length)) + (let ((s5-2 (-> self lt-array gp-3))) + (lightning-bolt-method-11 s5-2) + (lightning-bolt-method-12 s5-2) + ) + ) + (if (time-elapsed? (-> self state-time) (seconds 8)) + (go-virtual die) + ) + ) + :code sleep-code + ) + +(when (or (zero? *uv-loop-curve*) (!= loading-level global)) + (set! *uv-loop-curve* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *uv-loop-curve* 2 'loading-level (the-as int #t)) + ) + +(set! (-> *uv-loop-curve* pts data 0 first) 0.0) + +(set! (-> *uv-loop-curve* pts data 0 second) 0.0) + +(set! (-> *uv-loop-curve* pts data 1 first) 1.0) + +(set! (-> *uv-loop-curve* pts data 1 second) 1.0) + +(if (or (zero? *blue-light-test*) (!= loading-level global)) + (set! *blue-light-test* (new 'loading-level 'lightning-appearance)) + ) + +(set! (-> *blue-light-test* base-alpha) 1.0) + +(set! (-> *blue-light-test* tex-id) (the-as uint #x408f00)) + +(set! (-> *blue-light-test* blend-mode) (the-as uint 1)) + +(set! (-> *blue-light-test* alpha-1-curve) *curve-linear-down*) + +(set! (-> *blue-light-test* alpha-1-mode) (the-as uint 0)) + +(set! (-> *blue-light-test* alpha-1-repeat-dist) 262144.0) + +(set! (-> *blue-light-test* alpha-2-curve) #f) + +(set! (-> *blue-light-test* alpha-2-mode) (the-as uint 3)) + +(set! (-> *blue-light-test* alpha-2-repeat-dist) 4096.0) + +(set! (-> *blue-light-test* width-curve) *curve-linear-down*) + +(set! (-> *blue-light-test* width-mode) (the-as uint 3)) + +(set! (-> *blue-light-test* width-repeat-dist) 4096.0) + +(set! (-> *blue-light-test* uv-repeat-dist) 28672.0) + +(set! (-> *blue-light-test* regenerate-time-start) (seconds 0.167)) + +(set! (-> *blue-light-test* regenerate-time-end) (seconds 0.25)) + +(set! (-> *blue-light-test* width-range-start) 1228.8) + +(set! (-> *blue-light-test* width-range-end) 2048.0) + +(set! (-> *blue-light-test* fade-time) (seconds 0.3)) + +(set! (-> *blue-light-test* uv-shift?) #t) + +(set! (-> *blue-light-test* uv-shift-speed) (seconds -0.5)) + +(set! (-> *blue-light-test* use-sprite-bucket?) #t) + +(set! (-> *blue-light-test* use-accurate-interp?) #t) + +(if (or (zero? *blue-light-test-end*) (!= loading-level global)) + (set! *blue-light-test-end* (new 'loading-level 'lightning-appearance)) + ) + +(set! (-> *blue-light-test-end* base-alpha) 1.0) + +(set! (-> *blue-light-test-end* tex-id) (the-as uint #x408f00)) + +(set! (-> *blue-light-test-end* blend-mode) (the-as uint 1)) + +(set! (-> *blue-light-test-end* alpha-1-curve) *curve-linear-down*) + +(set! (-> *blue-light-test-end* alpha-1-mode) (the-as uint 3)) + +(set! (-> *blue-light-test-end* alpha-1-repeat-dist) 4096.0) + +(set! (-> *blue-light-test-end* alpha-2-curve) #f) + +(set! (-> *blue-light-test-end* alpha-2-mode) (the-as uint 3)) + +(set! (-> *blue-light-test-end* alpha-2-repeat-dist) 4096.0) + +(set! (-> *blue-light-test-end* width-curve) *curve-linear-down*) + +(set! (-> *blue-light-test-end* width-mode) (the-as uint 3)) + +(set! (-> *blue-light-test-end* width-repeat-dist) 4096.0) + +(set! (-> *blue-light-test-end* uv-repeat-dist) 28672.0) + +(set! (-> *blue-light-test-end* regenerate-time-start) (seconds 0.085)) + +(set! (-> *blue-light-test-end* regenerate-time-end) (seconds 0.117)) + +(set! (-> *blue-light-test-end* width-range-start) 5324.8) + +(set! (-> *blue-light-test-end* width-range-end) 6144.0) + +(set! (-> *blue-light-test-end* fade-time) (seconds 0.3)) + +(set! (-> *blue-light-test-end* uv-shift?) #t) + +(set! (-> *blue-light-test-end* uv-shift-speed) (seconds -0.5)) + +(set! (-> *blue-light-test-end* use-sprite-bucket?) #t) + +(set! (-> *blue-light-test-end* use-accurate-interp?) #t) + +(if (or (zero? *blue-light-test-big*) (!= loading-level global)) + (set! *blue-light-test-big* (new 'loading-level 'lightning-appearance)) + ) + +(set! (-> *blue-light-test-big* base-alpha) 1.0) + +(set! (-> *blue-light-test-big* tex-id) (the-as uint #x403f00)) + +(set! (-> *blue-light-test-big* blend-mode) (the-as uint 1)) + +(set! (-> *blue-light-test-big* alpha-1-curve) *curve-linear-down*) + +(set! (-> *blue-light-test-big* alpha-1-mode) (the-as uint 0)) + +(set! (-> *blue-light-test-big* alpha-1-repeat-dist) 262144.0) + +(set! (-> *blue-light-test-big* alpha-2-curve) #f) + +(set! (-> *blue-light-test-big* alpha-2-mode) (the-as uint 3)) + +(set! (-> *blue-light-test-big* alpha-2-repeat-dist) 4096.0) + +(set! (-> *blue-light-test-big* width-curve) *curve-linear-down*) + +(set! (-> *blue-light-test-big* width-mode) (the-as uint 3)) + +(set! (-> *blue-light-test-big* width-repeat-dist) 4096.0) + +(set! (-> *blue-light-test-big* uv-repeat-dist) 28672.0) + +(set! (-> *blue-light-test-big* regenerate-time-start) (seconds 0.035)) + +(set! (-> *blue-light-test-big* regenerate-time-end) (seconds 0.067)) + +(set! (-> *blue-light-test-big* width-range-start) 8192.0) + +(set! (-> *blue-light-test-big* width-range-end) 8192.0) + +(set! (-> *blue-light-test-big* fade-time) (seconds 0.3)) + +(set! (-> *blue-light-test-big* uv-shift?) #t) + +(set! (-> *blue-light-test-big* uv-shift-speed) (seconds -0.5)) + +(set! (-> *blue-light-test-big* use-sprite-bucket?) #t) + +(set! (-> *blue-light-test-big* use-accurate-interp?) #t) + +(if (or (zero? *blue-light-test-big-intense*) (!= loading-level global)) + (set! *blue-light-test-big-intense* (new 'loading-level 'lightning-appearance)) + ) + +(set! (-> *blue-light-test-big-intense* base-alpha) 0.7) + +(set! (-> *blue-light-test-big-intense* tex-id) (the-as uint #x403f00)) + +(set! (-> *blue-light-test-big-intense* blend-mode) (the-as uint 1)) + +(set! (-> *blue-light-test-big-intense* alpha-1-curve) *curve-linear-down*) + +(set! (-> *blue-light-test-big-intense* alpha-1-mode) (the-as uint 0)) + +(set! (-> *blue-light-test-big-intense* alpha-1-repeat-dist) 409600.0) + +(set! (-> *blue-light-test-big-intense* alpha-2-curve) #f) + +(set! (-> *blue-light-test-big-intense* alpha-2-mode) (the-as uint 3)) + +(set! (-> *blue-light-test-big-intense* alpha-2-repeat-dist) 4096.0) + +(set! (-> *blue-light-test-big-intense* width-curve) *curve-linear-down*) + +(set! (-> *blue-light-test-big-intense* width-mode) (the-as uint 3)) + +(set! (-> *blue-light-test-big-intense* width-repeat-dist) 4096.0) + +(set! (-> *blue-light-test-big-intense* uv-repeat-dist) 28672.0) + +(set! (-> *blue-light-test-big-intense* regenerate-time-start) (seconds 0.035)) + +(set! (-> *blue-light-test-big-intense* regenerate-time-end) (seconds 0.067)) + +(set! (-> *blue-light-test-big-intense* width-range-start) 28672.0) + +(set! (-> *blue-light-test-big-intense* width-range-end) 28672.0) + +(set! (-> *blue-light-test-big-intense* fade-time) (seconds 0.3)) + +(set! (-> *blue-light-test-big-intense* uv-shift?) #t) + +(set! (-> *blue-light-test-big-intense* uv-shift-speed) (seconds -0.5)) + +(set! (-> *blue-light-test-big-intense* use-sprite-bucket?) #t) + +(set! (-> *blue-light-test-big-intense* use-accurate-interp?) #t) + +(if (or (zero? *blue-light-test-small-fade*) (!= loading-level global)) + (set! *blue-light-test-small-fade* (new 'loading-level 'lightning-appearance)) + ) + +(set! (-> *blue-light-test-small-fade* base-alpha) 1.0) + +(set! (-> *blue-light-test-small-fade* tex-id) (the-as uint #x408f00)) + +(set! (-> *blue-light-test-small-fade* blend-mode) (the-as uint 1)) + +(set! (-> *blue-light-test-small-fade* alpha-1-curve) *curve-linear-down*) + +(set! (-> *blue-light-test-small-fade* alpha-1-mode) (the-as uint 0)) + +(set! (-> *blue-light-test-small-fade* alpha-1-repeat-dist) 409600.0) + +(set! (-> *blue-light-test-small-fade* alpha-2-curve) #f) + +(set! (-> *blue-light-test-small-fade* alpha-2-mode) (the-as uint 3)) + +(set! (-> *blue-light-test-small-fade* alpha-2-repeat-dist) 4096.0) + +(set! (-> *blue-light-test-small-fade* width-curve) *curve-linear-down*) + +(set! (-> *blue-light-test-small-fade* width-mode) (the-as uint 3)) + +(set! (-> *blue-light-test-small-fade* width-repeat-dist) 4096.0) + +(set! (-> *blue-light-test-small-fade* uv-repeat-dist) 28672.0) + +(set! (-> *blue-light-test-small-fade* regenerate-time-start) (seconds 0.167)) + +(set! (-> *blue-light-test-small-fade* regenerate-time-end) (seconds 0.25)) + +(set! (-> *blue-light-test-small-fade* width-range-start) 32768.0) + +(set! (-> *blue-light-test-small-fade* width-range-end) 32768.0) + +(set! (-> *blue-light-test-small-fade* fade-time) (seconds 0.3)) + +(set! (-> *blue-light-test-small-fade* uv-shift?) #t) + +(set! (-> *blue-light-test-small-fade* uv-shift-speed) (seconds -0.5)) + +(set! (-> *blue-light-test-small-fade* use-sprite-bucket?) #t) + +(set! (-> *blue-light-test-small-fade* use-accurate-interp?) #t) + +(defmethod setup-draw! ((this gun-blue-2-lightning-tracker) (arg0 gun-blue-2-lightning-info)) + (cond + ((-> arg0 should-draw-extension?) + (set! (-> *blue-light-test-big* alpha-1-repeat-dist) 262144.0) + (set! (-> *blue-light-test* alpha-1-repeat-dist) 262144.0) + ) + ((> (-> arg0 num-pts) 0) + (let* ((f0-2 (vector-vector-distance (the-as vector (-> arg0 pts)) (-> arg0 pts (+ (-> arg0 num-pts) -1)))) + (f0-3 (+ 16384.0 f0-2)) + ) + (set! (-> *blue-light-test-big* alpha-1-repeat-dist) (fmin 262144.0 f0-3)) + (set! (-> *blue-light-test* alpha-1-repeat-dist) (fmin 262144.0 f0-3)) + ) + ) + ) + (dotimes (s4-0 4) + (let ((s3-0 (-> this lt-array s4-0))) + (set! (-> s3-0 inner-point-travel-time) (seconds 0.5)) + (set! (-> s3-0 snap-inner-points?) #t) + (set! (-> s3-0 appearance) *blue-light-test*) + (set! (-> s3-0 fractal-reduction) (/ (* 0.4 (logf 9.0)) (logf 12.0))) + (set! (-> s3-0 generate-mode) (the-as uint 1)) + (when (< 1 (-> arg0 num-pts)) + ) + (set! (-> s3-0 num-active-spans) (+ (-> arg0 num-pts) -1)) + (dotimes (v1-31 (-> s3-0 num-active-spans)) + (let ((a0-8 (-> s3-0 spans data v1-31))) + (let ((a1-5 (-> s3-0 spans-internal data v1-31))) + (set! (-> s3-0 span-pts-start data v1-31 quad) (-> arg0 pts v1-31 quad)) + (set! (-> a0-8 random-offset-size-start) 0.0) + (if (> v1-31 0) + (set! (-> a0-8 random-offset-size-start) 8192.0) + ) + (set! (-> a1-5 num-inner-points) 4) + ) + (set! (-> a0-8 inner-random-offset-size) 8192.0) + ) + ) + (let ((v1-37 (-> s3-0 spans data (-> s3-0 num-active-spans)))) + (set! (-> s3-0 span-pts-start data (-> s3-0 num-active-spans) quad) + (-> arg0 pts (-> s3-0 num-active-spans) quad) + ) + (set! (-> v1-37 random-offset-size-start) 0.0) + ) + (lightning-bolt-method-11 s3-0) + (lightning-bolt-method-12 s3-0) + ) + ) + (dotimes (s4-1 2) + (let ((s3-1 (-> this lt-array (+ s4-1 4)))) + (set! (-> s3-1 inner-point-travel-time) (seconds 0.085)) + (set! (-> s3-1 snap-inner-points?) #t) + (set! (-> s3-1 appearance) *blue-light-test-big*) + (set! (-> s3-1 fractal-reduction) (/ (* 0.4 (logf 9.0)) (logf 12.0))) + (set! (-> s3-1 generate-mode) (the-as uint 1)) + (when (< 1 (-> arg0 num-pts)) + ) + (set! (-> s3-1 num-active-spans) (+ (-> arg0 num-pts) -1)) + (dotimes (v1-58 (-> s3-1 num-active-spans)) + (let ((a0-24 (-> s3-1 spans data v1-58))) + (let ((a1-16 (-> s3-1 spans-internal data v1-58))) + (set! (-> s3-1 span-pts-start data v1-58 quad) (-> arg0 pts v1-58 quad)) + (set! (-> a0-24 random-offset-size-start) 0.0) + (if (> v1-58 0) + (set! (-> a0-24 random-offset-size-start) 4096.0) + ) + (set! (-> a1-16 num-inner-points) 3) + ) + (set! (-> a0-24 inner-random-offset-size) 4096.0) + ) + ) + (let ((v1-64 (-> s3-1 spans data (-> s3-1 num-active-spans)))) + (set! (-> s3-1 span-pts-start data (-> s3-1 num-active-spans) quad) + (-> arg0 pts (-> s3-1 num-active-spans) quad) + ) + (set! (-> v1-64 random-offset-size-start) 0.0) + ) + (lightning-bolt-method-11 s3-1) + (lightning-bolt-method-12 s3-1) + ) + ) + (set! (-> this root trans quad) (-> arg0 pts (+ (-> arg0 num-pts) -1) quad)) + (when (-> arg0 should-draw-terminal-sparks?) + (when (time-elapsed? (-> this last-spark-time) (-> this spark-time-interval)) + (set-time! (-> this last-spark-time)) + (set! (-> this spark-time-interval) + (the-as + time-frame + (the int (* 5.0000005 (the float (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 3) 3)))) + ) + ) + (let ((s4-2 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 3) 3))) + (let ((v1-90 (-> this lt-array 5))) + (-> v1-90 spans data (-> v1-90 num-active-spans)) + (set! (-> arg0 terminal-spark-pos quad) (-> v1-90 span-pts-start data (-> v1-90 num-active-spans) quad)) + ) + (set! (-> this root trans quad) (-> arg0 terminal-spark-pos quad)) + (dotimes (s5-1 s4-2) + (process-drawable-shock-effect-replace + this + (-> *lightning-spec-id-table* 13) + lightning-probe-callback + 256 + 0 + 40960.0 + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defstate active (gun-blue-2-lightning-tracker) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('notice) + (case (-> block param 0) + (('die) + (go-virtual die) + ) + ) + ) + (('gun-blue-lightning) + (case (-> (the-as gun-blue-lightning-command (-> block param 0)) msg) + (((gun-blue-lightning-cmd-msg inactive)) + (go-virtual inactive) + ) + ) + #t + ) + ) + ) + :enter (behavior () + (set! (-> self prev-targ-pos quad) (-> (target-pos 0) quad)) + (set-time! (-> self state-time)) + (set-time! (-> self active-enter-time)) + (set-time! (-> self last-deduct-ammo-time)) + (dotimes (gp-1 (-> self lt-array length)) + (lightning-bolt-method-13 (-> self lt-array gp-1) 0) + ) + (set! (-> *blue-2-lightning-shape* num-knots) (the-as uint 12)) + (let ((v1-17 (new 'stack-no-clear 'vector))) + (set! (-> v1-17 quad) (-> *target* gun fire-point quad)) + (let ((a0-9 (vector-float*! (new 'stack-no-clear 'vector) (-> *target* gun laser-dir) 24576.0))) + (dotimes (a1-4 (the-as int (-> *blue-2-lightning-shape* num-knots))) + (set! (-> *blue-2-lightning-shape* constraints a1-4 pt quad) (-> v1-17 quad)) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> *blue-2-lightning-shape* constraints 0 dir)) (* 48 a1-4)))) + (-> *target* gun laser-dir quad) + ) + (vector+! v1-17 v1-17 a0-9) + (set! (-> *blue-2-lightning-shape* constraints a1-4 length) 24576.0) + ) + ) + ) + (adjust-player-ammo -1.0 (pickup-type ammo-blue)) + (dotimes (v1-20 12) + (set! (-> *gun-blue-2-targets* v1-20 target) (the-as handle #f)) + (set! (-> *gun-blue-2-targets* v1-20 start-time) 0) + ) + (when (or (>= (- (-> *display* game-clock frame-counter) (-> *gun-blue-2-last-attack-id-time* time)) (seconds 0.4)) + (< (-> *display* game-clock frame-counter) (-> *gun-blue-2-last-attack-id-time* time)) + ) + (let* ((v1-31 *game-info*) + (a0-21 (+ (-> v1-31 attack-id) 1)) + ) + (set! (-> v1-31 attack-id) a0-21) + (set! *gun-blue-2-last-attack-id* a0-21) + ) + (set! (-> *gun-blue-2-last-attack-id-time* time) (-> *display* game-clock frame-counter)) + ) + ) + :exit (behavior () + (kill-particles (-> self part)) + (dotimes (gp-0 (-> self lt-array length)) + (let ((s5-0 (-> self lt-array gp-0))) + (when (zero? (lightning-bolt-method-14 s5-0)) + (lightning-bolt-method-13 s5-0 2) + (lightning-bolt-method-11 s5-0) + (lightning-bolt-method-12 s5-0) + ) + ) + ) + ) + :trans (behavior () + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 76 (seconds 0.5)) + (if (not (time-elapsed? (-> self active-enter-time) (seconds 0.2))) + (sound-play-by-name + (static-sound-name "blue-gun2-loop") + (-> self snd-lightning) + 768 + (the int (* 1524.0 (lerp -0.5 0.0 (* 0.016666668 (the float (- (current-time) (-> self state-time))))))) + 0 + (sound-group) + #t + ) + (sound-play "blue-gun2-loop" :id (-> self snd-lightning) :vol 75) + ) + (let ((f0-6 (lerp-scale-clamp 0.0 1.0 (-> *target* gun fire-spinv) 0.0 109226.664))) + 0.0 + (let ((f0-9 (- 1.0 (* (- 1.0 f0-6) (- 1.0 f0-6))))) + (seek! (-> self spin-intensity) f0-9 (* 2.0 (seconds-per-frame))) + ) + ) + (if (< 0.1 (-> self spin-intensity)) + (sound-play-by-name + (static-sound-name "blue-gun2-spin") + (-> self snd-spin) + (the int (* 1024.0 (lerp 0.75 1.0 (-> self spin-intensity)))) + (the int (* 1524.0 (lerp -0.5 0.0 (-> self spin-intensity)))) + 0 + (sound-group) + (-> self root trans) + ) + ) + (+! (-> self revolve-angle) (* 65536.0 (seconds-per-frame))) + (+! (-> self sway-angle) (* 65536.0 (seconds-per-frame))) + (gun-blue-2-lightning-tracker-method-25 self) + (when (time-elapsed? (-> self last-deduct-ammo-time) (seconds 0.1)) + (adjust-player-ammo-over-time + (the-as int (- (current-time) (-> self last-deduct-ammo-time))) + 7.5 + (pickup-type ammo-blue) + 10000.0 + ) + (set-time! (-> self last-deduct-ammo-time)) + ) + (spawn (-> self part) (-> *target* gun fire-point)) + (if (or (not (cpad-hold? 0 r1)) + (or (>= 0.0 (get-remaining-player-ammo (pickup-type ammo-blue))) + (!= (-> *target* gun using-gun-type) 33) + (not (-> *target* gun active?)) + (and (-> *target* next-state) (= (-> *target* next-state name) 'target-attack-air)) + ) + ) + (go-virtual inactive) + ) + ) + :code sleep-code + :post (behavior () + '() + ) + ) + +(defmethod relocate ((this gun-blue-2-lightning-tracker) (offset int)) + (dotimes (v1-0 (-> this lt-array length)) + (if (nonzero? (-> this lt-array v1-0)) + (&+! (-> this lt-array v1-0) offset) + ) + ) + (if (nonzero? (-> this lt-array)) + (&+! (-> this lt-array) offset) + ) + (call-parent-method this offset) + ) + +(deftype gun-blue-2-lightning-init-params (structure) + ((num-beams int8) + ) + ) + + +(defskelgroup skel-gun-blue-2-tracker scenecamera scenecamera-lod0-jg -1 + ((scenecamera-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :texture-level 10 + ) + +(defstate test (gun-blue-2-lightning-tracker) + :virtual #t + :code sleep-code + ) + +(defbehavior gun-blue-2-lightning-init-by-other gun-blue-2-lightning-tracker ((arg0 gun-blue-2-lightning-init-params)) + (set! (-> self root) (new 'process 'trsqv)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-gun-blue-2-tracker" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self lt-array) (new 'process 'boxed-array lightning-bolt (-> arg0 num-beams))) + (dotimes (v1-5 6) + (set! (-> self lt-array v1-5) (the-as lightning-bolt 0)) + ) + (dotimes (gp-1 4) + (set! (-> self lt-array gp-1) (new 'process 'lightning-bolt)) + (init! (-> self lt-array gp-1) 12 6 *blue-light-test*) + ) + (set! (-> self lt-array 4) (new 'process 'lightning-bolt)) + (init! (-> self lt-array 4) 12 5 *blue-light-test-big*) + (set! (-> self lt-array 5) (new 'process 'lightning-bolt)) + (init! (-> self lt-array 5) 12 5 *blue-light-test-big*) + (set! (-> self revolve-angle) 0.0) + (set! (-> self sway-angle) 0.0) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 107) self)) + (set! (-> self last-spark-time) 0) + (set! (-> self spark-time-interval) 0) + (set! (-> self snd-lightning) (new-sound-id)) + (set! (-> self snd-spin) (new-sound-id)) + (set! (-> self should-draw-this-frame?) #f) + (go-virtual active) + ) + +;; WARN: Return type mismatch int vs handle. +(defbehavior create-lightning-tracker-if-necessary target () + (the-as + handle + (when (or (not (handle->process (-> self gun gun 0 extra))) + (!= (-> (handle->process (-> self gun gun 0 extra)) type) gun-blue-2-lightning-tracker) + ) + (let ((gp-0 (new 'stack-no-clear 'gun-blue-2-lightning-init-params))) + (set! (-> gp-0 num-beams) 6) + (let ((v0-0 (ppointer->handle (process-spawn + gun-blue-2-lightning-tracker + :init gun-blue-2-lightning-init-by-other + gp-0 + :name "gun-blue-2-lightning-tracker" + :to self + :stack-size #x29400 + ) + ) + ) + ) + (set! (-> self gun gun 0 extra) (the-as handle v0-0)) + v0-0 + ) + ) + ) + ) + ) + +(defun is-valid-blue-2-target ((arg0 process-focusable) (arg1 int)) + (local-vars (v0-1 symbol)) + (with-pp + (when (and (!= *target* arg0) + (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) 'get-vehicle) + (and (!= (send-event-function *target* a1-1) arg0) + (not (focus-test? arg0 disable dead inactive gun-no-target)) + (or (logtest? (process-mask enemy vehicle civilian) (-> arg0 mask)) + (and (logtest? (process-mask guard) (-> arg0 mask)) (-> *setting-control* user-current gun-target-guards?)) + ) + ) + ) + ) + (let ((v1-16 (process->handle arg0))) + (dotimes (a0-11 arg1) + (if (= (-> *found-objects* a0-11) v1-16) + (return #f) + ) + ) + ) + (return #t) + ) + (return #f) + v0-1 + ) + ) + +(defun find-gun-blue-2-target ((arg0 vector) (arg1 int)) + (local-vars (sv-32 process-drawable) (sv-36 number) (sv-40 vector)) + (set! sv-32 (the-as process-drawable #f)) + (set! sv-36 4096000.0) + (let ((v1-1 (new 'stack-no-clear 'vector))) + (set! (-> v1-1 quad) (-> arg0 quad)) + (set! sv-40 v1-1) + ) + (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)) + (let* ((s2-0 (-> s4-0 s3-0)) + (a0-5 (if (type? s2-0 collide-shape) + s2-0 + ) + ) + ) + (when a0-5 + (let* ((s1-0 (-> a0-5 process)) + (s2-1 (if (type? s1-0 process-focusable) + s1-0 + ) + ) + ) + (when s2-1 + (when (is-valid-blue-2-target (the-as process-focusable s2-1) arg1) + (let* ((s1-2 (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable s2-1) 3) sv-40)) + (f0-2 (vector-normalize-ret-len! s1-2 1.0)) + ) + (when (< f0-2 (the-as float sv-36)) + (set! sv-32 s2-1) + (set! sv-36 f0-2) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (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) arg0) (-> arg0 w))) + (when (is-valid-blue-2-target s4-1 arg1) + (let* ((gp-2 (vector-! (new 'stack-no-clear 'vector) (get-trans s4-1 3) sv-40)) + (f0-4 (vector-normalize-ret-len! gp-2 1.0)) + ) + (when (< f0-4 (the-as float sv-36)) + (set! sv-32 s4-1) + (set! sv-36 f0-4) + ) + ) + ) + ) + ) + sv-32 + ) + +(defun find-gun-blue-2-target-old ((arg0 vector) (arg1 int) (arg2 vector)) + (local-vars (sv-32 process-drawable) (sv-36 number) (sv-40 vector)) + (set! sv-32 (the-as process-drawable #f)) + (set! sv-36 16384.0) + (let ((v1-1 (new 'stack-no-clear 'vector))) + (set! (-> v1-1 quad) (-> arg0 quad)) + (set! sv-40 v1-1) + ) + (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)) + (let* ((s1-0 (-> s3-0 s2-0)) + (a0-5 (if (type? s1-0 collide-shape) + s1-0 + ) + ) + ) + (when a0-5 + (let* ((s0-0 (-> a0-5 process)) + (s1-1 (if (type? s0-0 process-focusable) + s0-0 + ) + ) + ) + (when s1-1 + (when (is-valid-blue-2-target (the-as process-focusable s1-1) arg1) + (let* ((s0-2 (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable s1-1) 3) sv-40)) + (f0-3 (vector-normalize-ret-len! s0-2 1.0)) + (f1-1 (vector-dot s0-2 arg2)) + ) + (when (< f0-3 (the-as float sv-36)) + (when (< 0.6 f1-1) + (set! sv-32 s1-1) + (set! sv-36 f0-3) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (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) arg0) (-> arg0 w))) + (when (is-valid-blue-2-target s3-1 arg1) + (let* ((s5-2 (vector-! (new 'stack-no-clear 'vector) (get-trans s3-1 3) sv-40)) + (f0-5 (vector-normalize-ret-len! s5-2 1.0)) + (f1-4 (vector-dot s5-2 arg2)) + ) + (when (< f0-5 (the-as float sv-36)) + (when (< 0.6 f1-4) + (set! sv-32 s3-1) + (set! sv-36 f0-5) + ) + ) + ) + ) + ) + ) + sv-32 + ) + +(define *lightning-pts-cache* (new 'static 'inline-array vector 20 + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + ) + ) + +(defmethod gun-blue-2-lightning-tracker-method-26 ((this gun-blue-2-lightning-tracker) (arg0 vector) (arg1 vector) (arg2 gun-blue-lightning-command)) + (let ((s3-0 (new 'stack-no-clear 'collide-query)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (vector+float*! + (-> s3-0 start-pos) + arg1 + (vector-normalize-copy! (new 'stack-no-clear 'vector) arg0 1.0) + -7372.8 + ) + (vector-! (-> s3-0 move-dist) arg1 (-> s3-0 start-pos)) + (vector-float*! (-> s3-0 move-dist) (-> s3-0 move-dist) 1.2) + (let ((s2-1 s3-0)) + (set! (-> s2-1 radius) 409.6) + (set! (-> s2-1 collide-with) + (collide-spec backgnd obstacle vehicle-sphere hit-by-others-list pusher impenetrable-obj) + ) + (set! (-> s2-1 ignore-process0) (the-as process-tree (send-event *target* 'get-vehicle))) + (set! (-> s2-1 ignore-process1) #f) + (set! (-> s2-1 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> s2-1 action-mask) (collide-action solid)) + ) + (vector+! s4-0 (-> s3-0 start-pos) (-> s3-0 move-dist)) + (let ((f0-3 (fill-and-probe-using-line-sphere *collide-cache* s3-0))) + (when (>= f0-3 0.0) + (vector-float*! (-> s3-0 move-dist) (-> s3-0 move-dist) f0-3) + (vector+! s4-0 (-> s3-0 start-pos) (-> s3-0 move-dist)) + (set! (-> arg2 lightning-info terminal-spark-pos quad) (-> s4-0 quad)) + (set! (-> arg2 lightning-info num-pts) 1) + (set! (-> arg2 lightning-info pts 0 quad) (-> s4-0 quad)) + (set! (-> arg2 lightning-info should-draw-terminal-sparks?) #t) + (set! (-> arg2 lightning-info should-draw-extension?) #f) + (setup-draw! this (-> arg2 lightning-info)) + (return #f) + ) + ) + (let ((s5-1 fire-projectile-if-necessary) + (s3-1 (-> s3-0 start-pos)) + ) + (s5-1 s3-1 s4-0 (process->handle (send-event this 'get-vehicle))) + ) + ) + #t + ) + +(defmethod gun-blue-2-lightning-tracker-method-25 ((this gun-blue-2-lightning-tracker)) + (local-vars + (sv-624 gun-info) + (sv-628 vector) + (sv-632 gun-blue-lightning-command) + (sv-640 int) + (sv-648 int) + (sv-656 (pointer int32)) + (sv-1440 symbol) + (sv-1456 collide-query) + (sv-1472 collide-query) + ) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> this prev-targ-pos)))) + (set! (-> s5-1 y) 0.0) + (dotimes (v1-1 12) + (vector+! + (the-as vector (-> *blue-2-lightning-shape* constraints v1-1)) + (the-as vector (-> *blue-2-lightning-shape* constraints v1-1)) + s5-1 + ) + ) + ) + (set! (-> this prev-targ-pos quad) (-> (target-pos 0) quad)) + (set! sv-624 (-> *target* gun)) + (set! sv-628 (-> *target* gun laser-dir)) + (set! sv-632 (new 'stack-no-clear 'gun-blue-lightning-command)) + (set! sv-640 0) + (set! sv-648 -1) + (set! sv-656 (new 'static 'array int32 12 0 0 0 0 0 0 0 0 0 0 0 0)) + (vector-normalize! sv-628 1.0) + (set! (-> *blue-2-lightning-shape* constraints 0 pt quad) (-> sv-624 fire-point quad)) + (set! (-> *blue-2-lightning-shape* constraints 0 dir quad) (-> sv-628 quad)) + (rope-constraint-method-9 *blue-2-lightning-shape* 0) + (if (zero? (-> this last-probe-index)) + (+! (-> this last-probe-index) 1) + ) + (dotimes (v1-22 12) + (set! (-> *lightning-pts-cache* v1-22 quad) (-> *blue-2-lightning-shape* constraints v1-22 pt quad)) + ) + (if (not (gun-blue-2-lightning-tracker-method-26 this sv-628 (-> sv-624 fire-point) sv-632)) + (return 0) + ) + (set! (-> sv-632 msg) (gun-blue-lightning-cmd-msg active)) + (set! (-> sv-632 lightning-info num-pts) 1) + (set! (-> sv-632 lightning-info should-draw-terminal-sparks?) #f) + (set! (-> sv-632 lightning-info should-draw-extension?) #f) + (let ((s5-3 1) + (s4-0 (+ (-> *blue-2-lightning-shape* num-knots) -1)) + ) + (while (>= (the-as int s4-0) s5-3) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> *lightning-pts-cache* s5-3 quad)) + (let ((s2-0 (the-as process-drawable #f))) + (let ((a0-19 (new 'stack-no-clear 'vector))) + (new 'stack-no-clear 'vector) + (set! (-> a0-19 quad) (-> s3-0 quad)) + (set! (-> a0-19 w) 12288.0) + (if (not (the-as symbol s2-0)) + (set! s2-0 (find-gun-blue-2-target-old + a0-19 + sv-640 + (the-as vector (+ (the-as uint (-> *blue-2-lightning-shape* constraints 0 dir)) (* 48 s5-3))) + ) + ) + ) + ) + (cond + (s2-0 + (set! (-> *found-objects* sv-640) (process->handle s2-0)) + (set! (-> *gun-blue-2-targets* s5-3 target) (process->handle s2-0)) + (set! (-> sv-656 s5-3) 1) + (set! sv-640 (+ sv-640 1)) + (set! sv-648 s5-3) + (set! (-> s3-0 quad) (-> (get-trans (the-as process-focusable s2-0) 3) quad)) + (set! (-> *lightning-pts-cache* s5-3 quad) (-> s3-0 quad)) + (vector-! + (the-as vector (+ (the-as uint (-> *blue-2-lightning-shape* constraints 0 dir)) (* 48 s5-3))) + (-> *lightning-pts-cache* s5-3) + (the-as vector (-> *blue-2-lightning-shape* constraints (+ s5-3 -1))) + ) + (vector-normalize! + (the-as vector (+ (the-as uint (-> *blue-2-lightning-shape* constraints 0 dir)) (* 48 s5-3))) + 1.0 + ) + (dotimes (v1-65 1) + ) + ) + (else + (set! (-> sv-656 s5-3) 0) + 0 + ) + ) + (let ((s0-0 s3-0) + (s1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s1-1 quad) (-> *lightning-pts-cache* (+ s5-3 -1) quad)) + (set! sv-1440 (the-as symbol #f)) + (set! sv-1456 (new 'stack-no-clear 'collide-query)) + (set! (-> sv-1456 start-pos quad) (-> s1-1 quad)) + (vector-! (-> sv-1456 move-dist) s0-0 s1-1) + (set! sv-1472 sv-1456) + (set! (-> sv-1472 radius) 860.16) + (set! (-> sv-1472 collide-with) + (collide-spec backgnd obstacle vehicle-sphere hit-by-others-list pusher impenetrable-obj) + ) + (set! (-> sv-1472 ignore-process0) (the-as process-tree (send-event *target* 'get-vehicle))) + (set! (-> sv-1472 ignore-process1) #f) + (set! (-> sv-1472 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> sv-1472 action-mask) (collide-action solid)) + (let ((f0-3 (fill-and-probe-using-line-sphere *collide-cache* sv-1456))) + (when (>= f0-3 0.0) + (vector-float*! (-> sv-1456 move-dist) (-> sv-1456 move-dist) f0-3) + (vector+! s0-0 s1-1 (-> sv-1456 move-dist)) + (set! sv-1440 #t) + (set! (-> this last-probe-index) s5-3) + (cond + ((> s5-3 0) + (let ((v0-11 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> sv-1456 move-dist) 1.0))) + (vector+float*! (-> sv-632 lightning-info terminal-spark-pos) s0-0 v0-11 -6144.0) + ) + ) + (else + (set! (-> sv-632 lightning-info terminal-spark-pos quad) (-> s0-0 quad)) + ) + ) + ) + ) + (when (not s2-0) + ) + (set! (-> *lightning-pts-cache* s5-3 quad) (-> s3-0 quad)) + (+! (-> sv-632 lightning-info num-pts) 1) + (let ((s3-1 fire-projectile-if-necessary) + (a2-13 (if (< 1 sv-640) + (the-as int (-> *found-objects* (+ sv-640 -2))) + (process->handle (send-event this 'get-vehicle)) + ) + ) + ) + (s3-1 s1-1 s0-0 (the-as handle a2-13)) + ) + ) + ) + ) + (when sv-1440 + (set! (-> sv-632 lightning-info should-draw-terminal-sparks?) #t) + (set! (-> sv-632 lightning-info should-draw-extension?) #f) + 0 + (goto cfg-54) + ) + (+! s5-3 1) + ) + ) + (label cfg-54) + (if (and (= sv-648 (+ (-> sv-632 lightning-info num-pts) -2)) + (not (-> sv-632 lightning-info should-draw-extension?)) + ) + (set! (-> sv-632 lightning-info should-draw-terminal-sparks?) #f) + ) + (dotimes (s5-4 (-> sv-632 lightning-info num-pts)) + (set! (-> sv-632 lightning-info pts s5-4 quad) (-> *lightning-pts-cache* s5-4 quad)) + (when (and (> s5-4 0) (zero? (-> sv-656 s5-4))) + (let ((s4-1 + (matrix-f-u-compose + (new 'stack-no-clear 'matrix) + (the-as vector (+ (the-as uint (-> *blue-2-lightning-shape* constraints 0 dir)) (* 48 s5-4))) + *up-vector* + ) + ) + (f0-9 (the float (sar (shl (the int (+ (-> this revolve-angle) (* 6144.0 (the float s5-4)))) 48) 48))) + (s3-2 (-> sv-632 lightning-info pts s5-4)) + ) + (the float (sar (shl (the int (+ (-> this sway-angle) (* 5461.3335 (the float s5-4)))) 48) 48)) + (vector-rotate-around-axis! + (-> s4-1 uvec) + (the-as quaternion (-> s4-1 uvec)) + f0-9 + (the-as vector (+ (the-as uint (-> *blue-2-lightning-shape* constraints 0 dir)) (* 48 s5-4))) + ) + (vector-normalize! (-> s4-1 uvec) 1.0) + (vector+float*! s3-2 s3-2 (-> s4-1 uvec) 2048.0) + ) + ) + ) + (setup-draw! this (-> sv-632 lightning-info)) + ) + +;; WARN: Return type mismatch int vs object. +(defbehavior gun-fire-blue-2 target () + (if (and (-> *target* next-state) (= (-> *target* next-state name) 'target-attack-air)) + (return (the-as object 0)) + ) + (create-lightning-tracker-if-necessary) + (let ((v1-8 (new 'stack-no-clear 'gun-blue-lightning-command))) + (set! (-> v1-8 msg) (gun-blue-lightning-cmd-msg active)) + (send-event (handle->process (-> self gun gun 0 extra)) 'gun-blue-lightning v1-8) + ) + 0 + ) + +(defbehavior gun-fire-blue-2-old target () + (local-vars + (sv-608 gun-info) + (sv-612 vector) + (sv-616 gun-blue-lightning-command) + (sv-768 vector) + (sv-772 vector) + (sv-776 vector) + (sv-784 int) + (sv-792 int) + (sv-800 vector) + (sv-848 vector) + (sv-852 vector) + ) + (create-lightning-tracker-if-necessary) + (set! sv-608 (-> self gun)) + (set! sv-612 (-> self gun fire-dir-out)) + (set! sv-616 (new 'stack-no-clear 'gun-blue-lightning-command)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.1)) + (set! (-> sv-616 msg) (gun-blue-lightning-cmd-msg active)) + (set! (-> sv-616 lightning-info num-pts) 0) + (set! (-> sv-616 lightning-info should-draw-terminal-sparks?) #f) + (set! (-> sv-616 lightning-info should-draw-extension?) #t) + (vector-normalize! sv-612 1.0) + (when (not (do-fire-backcheck (-> sv-608 fire-point) sv-612)) + (let ((a0-5 (handle->process (-> sv-608 gun 0 extra)))) + (send-event a0-5 'gun-blue-lightning sv-616) + ) + (return 0) + ) + (let ((v1-23 (new 'stack-no-clear 'vector))) + (set! (-> v1-23 quad) (-> sv-608 fire-point quad)) + (set! sv-768 v1-23) + ) + (set! sv-772 (vector+float*! (new 'stack-no-clear 'vector) (-> sv-608 fire-point) sv-612 409600.0)) + (let ((v1-26 (new 'stack-no-clear 'vector))) + (set! (-> v1-26 quad) (-> sv-612 quad)) + (set! sv-776 v1-26) + ) + (set! sv-784 0) + (set! sv-792 -1) + (set! sv-800 (new 'stack-no-clear 'vector)) + (set! (-> sv-616 lightning-info pts (-> sv-616 lightning-info num-pts) quad) (-> sv-768 quad)) + (+! (-> sv-616 lightning-info num-pts) 1) + (vector-! sv-800 sv-772 sv-768) + (dotimes (gp-0 8) + (let ((f30-0 32768.0)) + (set! sv-848 (new 'stack-no-clear 'vector)) + (set! sv-852 (vector+float*! (new 'stack-no-clear 'vector) sv-768 sv-612 f30-0)) + (set! (-> sv-848 quad) (-> sv-852 quad)) + (set! (-> sv-848 w) 20480.0) + (let ((s5-0 (the-as process #f))) + (let ((s4-0 #f)) + (when (< gp-0 7) + (when (and (handle->process (-> *gun-blue-2-targets* gp-0 target)) + (not (time-elapsed? (-> *gun-blue-2-targets* gp-0 start-time) (seconds 0.5))) + ) + (let* ((s2-0 (handle->process (-> *gun-blue-2-targets* gp-0 target))) + (s3-0 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (when (is-valid-blue-2-target (the-as process-focusable s3-0) sv-784) + (let ((s2-2 (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable s3-0) 3) sv-852))) + (vector-normalize-ret-len! s2-2 1.0) + (let ((f0-5 (vector-dot s2-2 sv-776))) + (when (< 0.87 f0-5) + (set! s4-0 #t) + (set! s5-0 s3-0) + ) + ) + ) + ) + ) + ) + (when (not s4-0) + (set! (-> *gun-blue-2-targets* gp-0 target) (the-as handle #f)) + (set-time! (-> *gun-blue-2-targets* gp-0 start-time)) + ) + (if (not s5-0) + (set! s5-0 (find-gun-blue-2-target-old sv-848 sv-784 sv-776)) + ) + ) + ) + (cond + (s5-0 + (set! (-> *found-objects* sv-784) (process->handle s5-0)) + (set! (-> *gun-blue-2-targets* gp-0 target) (process->handle s5-0)) + (set! sv-784 (+ sv-784 1)) + (set! sv-792 gp-0) + (vector-! sv-800 (get-trans (the-as process-focusable s5-0) 3) sv-768) + (vector-normalize! sv-800 1.0) + ) + (else + (vector-normalize! sv-800 1.0) + (let ((f0-7 (vector-dot sv-800 sv-776))) + (when (< f0-7 0.866) + (let ((s5-1 (new 'stack-no-clear 'vector)) + (f28-0 0.0) + ) + (acos f0-7) + 5461.3335 + (vector-cross! s5-1 sv-800 sv-776) + (vector-normalize! s5-1 1.0) + (vector-rotate-around-axis! sv-800 (the-as quaternion sv-776) f28-0 s5-1) + ) + ) + ) + (vector-normalize! sv-800 1.0) + ) + ) + ) + (set! (-> sv-776 quad) (-> sv-800 quad)) + (let ((s5-3 (vector+float*! (new 'stack-no-clear 'vector) sv-768 sv-800 f30-0))) + (let ((s4-3 #f)) + (let ((s3-1 (new 'stack-no-clear 'collide-query))) + (set! (-> s3-1 start-pos quad) (-> sv-768 quad)) + (vector-! (-> s3-1 move-dist) s5-3 sv-768) + (let ((v1-99 s3-1)) + (set! (-> v1-99 radius) 40.96) + (set! (-> v1-99 collide-with) + (collide-spec backgnd vehicle-sphere hit-by-others-list pusher impenetrable-obj) + ) + (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-11 (fill-and-probe-using-line-sphere *collide-cache* s3-1))) + (when (>= f0-11 0.0) + (vector-float*! (-> s3-1 move-dist) (-> s3-1 move-dist) f0-11) + (vector+! s5-3 sv-768 (-> s3-1 move-dist)) + (set! s4-3 #t) + (cond + ((> gp-0 0) + (let ((a0-80 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s3-1 move-dist) 1.0))) + (vector+float*! (-> sv-616 lightning-info terminal-spark-pos) s5-3 a0-80 -12288.0) + ) + ) + (else + (set! (-> sv-616 lightning-info terminal-spark-pos quad) (-> s5-3 quad)) + ) + ) + ) + ) + ) + (set! (-> sv-616 lightning-info pts (-> sv-616 lightning-info num-pts) quad) (-> s5-3 quad)) + (+! (-> sv-616 lightning-info num-pts) 1) + (let ((s3-2 fire-projectile-if-necessary) + (s2-3 sv-768) + (s1-0 s5-3) + (a2-7 (if (< 1 sv-784) + (the-as int (-> *found-objects* (+ sv-784 -2))) + (process->handle (send-event self 'get-vehicle)) + ) + ) + ) + (s3-2 s2-3 s1-0 (the-as handle a2-7)) + ) + (set! (-> sv-768 quad) (-> s5-3 quad)) + (when s4-3 + (set! (-> sv-616 lightning-info should-draw-terminal-sparks?) #t) + (set! (-> sv-616 lightning-info should-draw-extension?) #f) + 0 + (goto cfg-70) + ) + ) + (set! (-> sv-616 lightning-info terminal-spark-pos quad) (-> s5-3 quad)) + ) + ) + ) + (label cfg-70) + (if (and (= sv-792 (+ (-> sv-616 lightning-info num-pts) -2)) + (not (-> sv-616 lightning-info should-draw-extension?)) + ) + (set! (-> sv-616 lightning-info should-draw-terminal-sparks?) #f) + ) + (let ((s5-4 (-> sv-616 lightning-info pts (+ (-> sv-616 lightning-info num-pts) -1)))) + (when (-> sv-616 lightning-info should-draw-extension?) + (let ((gp-2 (vector+float*! (new 'stack-no-clear 'vector) s5-4 sv-800 409600.0)) + (s4-4 (new 'stack-no-clear 'collide-query)) + ) + (set! (-> s4-4 start-pos quad) (-> s5-4 quad)) + (vector-! (-> s4-4 move-dist) gp-2 s5-4) + (let ((v1-154 s4-4)) + (set! (-> v1-154 radius) 40.96) + (set! (-> v1-154 collide-with) + (collide-spec backgnd vehicle-sphere hit-by-others-list pusher impenetrable-obj) + ) + (set! (-> v1-154 ignore-process0) #f) + (set! (-> v1-154 ignore-process1) #f) + (set! (-> v1-154 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-154 action-mask) (collide-action solid)) + ) + (let ((f0-15 (fill-and-probe-using-line-sphere *collide-cache* s4-4))) + (when (>= f0-15 0.0) + (vector-float*! (-> s4-4 move-dist) (-> s4-4 move-dist) f0-15) + (vector+! gp-2 s5-4 (-> s4-4 move-dist)) + ) + ) + (set! (-> sv-616 lightning-info extension-end-point quad) (-> gp-2 quad)) + (set! (-> sv-616 lightning-info should-draw-terminal-sparks?) #t) + (let ((a0-122 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s4-4 move-dist) 1.0))) + (vector+float*! (-> sv-616 lightning-info terminal-spark-pos) gp-2 a0-122 -12288.0) + ) + ) + ) + ) + (let ((a0-124 (handle->process (-> sv-608 gun 0 extra)))) + (send-event a0-124 'gun-blue-lightning sv-616) + ) + ) + +(defbehavior target-gun-can-fire-blue? target ((arg0 pickup-type)) + #t + ) + +(define *last-fire-blue-time* (the-as time-frame 0)) + +;; WARN: Return type mismatch object vs (pointer process). +(defbehavior target-gun-fire-blue target ((arg0 pickup-type)) + (the-as (pointer process) (case arg0 + (((pickup-type gun-blue-1)) + (gun-fire-blue-1) + ) + (((pickup-type gun-blue-2)) + (gun-fire-blue-2) + ) + (((pickup-type gun-blue-3)) + (let ((f0-0 -2.0)) + (if (logtest? (game-secrets gun-upgrade-blue-3) (-> *game-info* secrets)) + (set! f0-0 -1.5) + ) + (adjust-player-ammo f0-0 (pickup-type ammo-blue)) + ) + (when (time-elapsed? *last-fire-blue-time* (seconds 0.1)) + (sound-play "blue-gun3-shot") + (set! *last-fire-blue-time* (current-time)) + ) + (sound-play "blue-gun3-trace") + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 127 (seconds 0.1)) + (dotimes (s5-2 3) + (gun-fire-blue-3) + ) + #f + ) + ) + ) + ) + +(deftype gun-blue-shot (projectile) + ((init-pos vector :inline) + (init-dir vector :inline) + (collide-normal vector :inline) + ) + ) + + +(deftype gun-blue-shot-2 (gun-blue-shot) + () + ) + + +(set! (-> *lightning-spec-id-table* 14) (new 'static 'lightning-spec + :name "lightning-blue-2-impact-shot-attack-thick" + :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 1.0 + :fade-time 30.0 + :texture (new 'static 'texture-id :index #x3f :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 8192.0 + :merge-factor 0.6 + :merge-count 2 + :radius 3276.8 + :duration 60.0 + :sound (static-sound-spec "stretched-zap" :group 0) + ) + ) + +(defmethod deal-damage! ((this gun-blue-shot-2) (arg0 process) (arg1 event-message-block)) + (if (and (logtest? (process-mask guard) (-> arg0 mask)) + (not (-> *setting-control* user-current gun-target-guards?)) + ) + (set! (-> this damage) 0.0) + ) + (when (logtest? (game-secrets gun-upgrade-blue-2) (-> *game-info* secrets)) + (if (logtest? (process-mask kg-robot) (-> arg0 mask)) + (set! (-> this damage) (* 2.0 (-> this damage))) + ) + ) + (if (< (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 2) + (process-drawable-shock-effect + (the-as process-drawable arg0) + (-> *lightning-spec-id-table* 12) + lightning-probe-callback + (-> *part-id-table* 664) + 0 + 0 + 40960.0 + ) + ) + (call-parent-method this arg0 arg1) + ) + +(defmethod projectile-method-24 ((this gun-blue-shot)) + (with-pp + (let* ((s4-0 (-> *part-id-table* 236)) + (s3-0 (get-field-spec-by-id s4-0 (sp-field-id spt-omega))) + (a1-1 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-1 from) (process->ppointer pp)) + (set! (-> a1-1 num-params) 1) + (set! (-> a1-1 message) 'eject-point) + (set! (-> a1-1 param 0) (the-as uint (new 'stack-no-clear 'vector))) + (let ((s5-0 (the-as vector (send-event-function (ppointer->process (-> this parent)) a1-1)))) + (when s5-0 + (when s3-0 + (let ((s1-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this starting-dir) 1.0)) + (s2-0 (new 'stack-no-clear 'collide-query)) + ) + (vector-rotate-y! s1-0 s1-0 16384.0) + (vector+float*! s1-0 s5-0 s1-0 -8806.4) + (set! (-> s2-0 start-pos quad) (-> s1-0 quad)) + (vector-float*! (-> s2-0 move-dist) (-> this root dynam gravity-normal) -81920.0) + (let ((v1-15 s2-0)) + (set! (-> v1-15 radius) 1228.8) + (set! (-> v1-15 collide-with) (collide-spec backgnd obstacle hit-by-player-list hit-by-others-list)) + (set! (-> v1-15 ignore-process0) this) + (set! (-> v1-15 ignore-process1) (ppointer->process (-> this parent))) + (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)) + ) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* s2-0) 0.0) + (set! (-> s3-0 initial-valuef) + (fmin (+ 1638.4 (-> s2-0 best-other-tri intersect y)) (+ -1228.8 (-> this starting-pos y))) + ) + (set! (-> s3-0 initial-valuef) (+ -81920.0 (-> this starting-pos y))) + ) + ) + ) + (let ((s4-1 (get-field-spec-by-id s4-0 (sp-field-id spt-rotate-y)))) + (if s4-1 + (set! (-> s4-1 initial-valuef) (y-angle (-> this root))) + ) + ) + (launch-particles (-> *part-id-table* 236) s5-0) + (let ((s4-2 (get-field-spec-by-id (-> *part-id-table* 235) (sp-field-id spt-rotate-y)))) + (if s4-2 + (set! (-> s4-2 initial-valuef) (y-angle (-> this root))) + ) + ) + (launch-particles (-> *part-id-table* 235) s5-0) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod projectile-method-26 ((this gun-blue-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* 231) (-> this init-pos) s3-1 #t) + (draw-beam (-> *part-id-table* 234) (-> this init-pos) (-> this starting-dir) #f) + (let ((s5-0 (-> *part-id-table* 246)) + (s4-0 (-> *part-id-table* 245)) + ) + (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) + ) + ) + ) + ) + (let ((v1-24 (cond + ((logtest? (-> *part-group-id-table* 90 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* 90)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 90)) + ) + ) + ) + ) + (send-event (ppointer->process v1-24) 'clock this) + ) + 0 + (none) + ) + ) + +(defmethod deal-damage! ((this gun-blue-shot) (arg0 process) (arg1 event-message-block)) + (if (and (logtest? (process-mask guard) (-> arg0 mask)) + (not (-> *setting-control* user-current gun-target-guards?)) + ) + (set! (-> this damage) 0.0) + ) + (+! (-> *game-info* shots-hit 2) 1.0) + (call-parent-method this arg0 arg1) + ) + +(defmethod projectile-method-27 ((this gun-blue-shot)) + (draw-beam (-> *part-id-table* 231) (-> this init-pos) (-> this init-dir) #f) + (draw-beam (-> *part-id-table* 234) (-> this init-pos) (-> this starting-dir) #f) + 0 + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this gun-blue-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "blue-shot-fire") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "blue-shot-hit") + ) + ) + ) + (none) + ) + +(defmethod made-impact? ((this gun-blue-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) -12288.0 12697.6 -2048.0 t1-0) + ) + ) + +(defun gun-blue-shot-move ((arg0 gun-blue-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) + ) + +;; WARN: Return type mismatch int vs collide-status. +(defun cshape-reaction-blue-shot ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector)) + (vector-reset! arg2) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (vector-float*! a1-1 (-> arg1 move-dist) (-> arg1 best-dist)) + (move-by-vector! arg0 a1-1) + ) + (set! (-> (the-as gun-blue-shot (-> arg0 process)) collide-normal quad) (-> arg1 best-other-tri normal quad)) + (let ((v0-1 4)) + (logior! (-> arg0 status) v0-1) + (the-as collide-status v0-1) + ) + ) + +(defmethod setup-collision! ((this gun-blue-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-blue-shot) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate jak-blue-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 gun-blue-shot)) + (with-pp + (+! (-> *game-info* shots-fired 2) 1.0) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + (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) (* 327680.0 (-> pp clock frames-per-second))) + (set! (-> this attack-mode) 'eco-blue) + (set! (-> this max-speed) (* 327680.0 (-> pp clock frames-per-second))) + (set! (-> this timeout) 1) + (set! (-> this move) gun-blue-shot-move) + (vector-reset! (-> this collide-normal)) + (set! (-> this damage) 2.0) + (if (logtest? (game-secrets gun-upgrade-blue-1) (-> *game-info* secrets)) + (set! (-> this damage) 2.5) + ) + (logior! (-> this options) (projectile-options po13)) + 0 + (none) + ) + ) + +(defmethod init-proj-settings! ((this gun-blue-shot-2)) + (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) (* 327680.0 (-> pp clock frames-per-second))) + (set! (-> this attack-mode) 'eco-blue) + (set! (-> this max-speed) (* 327680.0 (-> pp clock frames-per-second))) + (set! (-> this timeout) 1) + (set! (-> this move) gun-blue-shot-move) + (vector-reset! (-> this collide-normal)) + (set! (-> this damage) 2.5) + (set! (-> this vehicle-damage-factor) 2.0) + (set! (-> this vehicle-impulse-factor) 0.5) + (logior! (-> this options) (projectile-options po13)) + (set! (-> this sound-id) (new-sound-id)) + 0 + (none) + ) + ) + +(defmethod projectile-method-24 ((this gun-blue-shot-2)) + 0 + (none) + ) + +(defmethod projectile-method-27 ((this gun-blue-shot-2)) + 0 + (none) + ) + +(defmethod projectile-method-25 ((this gun-blue-shot-2)) + 0 + (none) + ) + +(defmethod projectile-method-26 ((this gun-blue-shot-3)) + (let ((s5-0 sphere-in-view-frustum?) + (a0-2 (new 'stack 'sphere)) + ) + (set! (-> a0-2 quad) (-> this root trans quad)) + (set! (-> a0-2 r) 4096.0) + (when (s5-0 a0-2) + (let ((v1-11 + (cond + ((logtest? (-> *part-group-id-table* 108 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* 108)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 108)) + ) + ) + ) + ) + (send-event (ppointer->process v1-11) 'clock this) + ) + ) + ) + 0 + (none) + ) + +(defstate dissipate (gun-blue-shot-3) + :virtual #t + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (suspend) + ) + ) + (go-virtual die) + ) + ) + +(defstate impact (gun-blue-shot-3) + :virtual #t + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (suspend) + ) + ) + (go-virtual die) + ) + ) + +(defmethod deal-damage! ((this gun-blue-shot-3) (arg0 process) (arg1 event-message-block)) + (+! (-> *game-info* shots-hit 2) 1.0) + (if (and (logtest? (process-mask guard) (-> arg0 mask)) + (not (-> *setting-control* user-current gun-target-guards?)) + ) + (set! (-> this damage) 0.0) + ) + (call-parent-method this arg0 arg1) + ) + +(defmethod projectile-method-26 ((this gun-blue-shot-2)) + 0 + (none) + ) 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 5b681514fa..97bb1ab5cc 100644 --- a/goal_src/jak3/engine/target/gun/gun-dark-shot.gc +++ b/goal_src/jak3/engine/target/gun/gun-dark-shot.gc @@ -5,5 +5,3799 @@ ;; name in dgo: gun-dark-shot ;; dgos: GAME +(define-extern sparticle-lightning-2d-spline-align-plus-rotz (function object sparticle-cpuinfo sprite-vec-data-2d object none)) +(define-extern missile-bot type) +(define-extern market-object type) +(define-extern fruit-stand type) + ;; DECOMP BEGINS +(set! (-> *lightning-spec-id-table* 15) (new 'static 'lightning-spec + :name "lightning-dark-shot-attack" + :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 1.0 + :fade-time 30.0 + :texture (new 'static 'texture-id :index #x8f :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 8192.0 + :merge-factor 0.6 + :merge-count 2 + :radius 3276.8 + :duration 45.0 + :duration-rand 60.0 + :sound (static-sound-spec "stretched-zap" :group 0) + ) + ) + +(set! (-> *lightning-spec-id-table* 16) (new 'static 'lightning-spec + :name "lightning-dark-shot-attack-thick" + :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 1.0 + :fade-time 30.0 + :texture (new 'static 'texture-id :index #x3f :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 8192.0 + :merge-factor 0.6 + :merge-count 2 + :radius 3276.8 + :duration 60.0 + :sound (static-sound-spec "stretched-zap" :group 0) + ) + ) + +(defpartgroup group-lightning-dark-shot-tip-hit + :id 183 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 664)) + ) + +(defpart 664 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0 3.0) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 0.0 64.0) + (:g 64.0 64.0) + (:b 255.0) + (:a 255.0) + (:vel-z (meters 0.016666668) (meters 0.006666667)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.7) + (:friction 0.99) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-lightning-2d-spline-align-plus-rotz) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 665 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 4)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0 64.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 glow)) + (:userdata 4096.0) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-z (degrees 0) (degrees 3600)) + (:conerot-radius (meters -0.1) (meters 0.5)) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun sparticle-lightning-2d-spline-align-plus-rotz ((arg0 object) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d) (arg3 object)) + (sparticle-2d-spline-align-instant arg0 arg1 arg2) + (+! (-> arg2 flag-rot-sy z) (-> *part-id-table* 664 init-specs 4 initial-valuef)) + (none) + ) + +(deftype gun-dark-shot (projectile) + ((blast-radius float) + (core-position vector :inline) + (core-velocity vector :inline) + (spin-vector vector :inline) + (track-target handle) + (size-t float) + (result-array handle 16) + (result-count int8) + (charge-sound sound-id) + (fire-sound sound-id) + (trail-sound sound-id) + (explode-sound sound-id) + (start-pilot? symbol) + (spread-timer time-frame) + ) + (:state-methods + startup + fizzle + ) + ) + + +(defbehavior gun-fire-dark-1 target () + (set-last-fire-time 35) + (let ((s5-0 (-> self gun)) + (gp-0 (new 'stack-no-clear 'projectile-init-by-other-params)) + ) + (set! (-> gp-0 ent) (-> self entity)) + (set! (-> gp-0 charge) (-> s5-0 fire-charge)) + (set! (-> gp-0 options) (projectile-options)) + (logclear! (-> gp-0 options) (projectile-options po14 po15 po16)) + (set! (-> gp-0 pos quad) (-> s5-0 fire-point quad)) + (set! (-> gp-0 vel quad) (-> s5-0 fire-dir-out 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 (send-event self 'get-vehicle))) + (let* ((v1-11 *game-info*) + (a0-13 (+ (-> v1-11 attack-id) 1)) + ) + (set! (-> v1-11 attack-id) a0-13) + (set! (-> gp-0 attack-id) a0-13) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (let ((v0-2 (spawn-projectile gun-dark-shot gp-0 (ppointer->process (-> s5-0 gun)) *default-dead-pool*))) + (if v0-2 + (set! (-> self gun charge-active?) (ppointer->handle v0-2)) + ) + v0-2 + ) + ) + ) + +(defskelgroup skel-gun-dark-3-sphere gun gun-nuke-sphere-lod0-jg gun-nuke-sphere-idle-ja + ((gun-nuke-sphere-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 30) + :texture-level 10 + :sort 4 + ) + +(deftype gun-dark-3-sphere (process-drawable) + ((alpha-val float) + ) + (:state-methods + active + ) + ) + + +(deftype gun-dark-3-sphere-init-params (structure) + ((pos vector :inline) + (size-x float) + (size-y float) + (alpha-val float) + ) + ) + + +(defbehavior gun-dark-3-sphere-init-by-other gun-dark-3-sphere ((arg0 gun-dark-3-sphere-init-params)) + (set! (-> self root) (new 'process 'trsqv)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-gun-dark-3-sphere" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self root trans quad) (-> arg0 pos quad)) + (quaternion-identity! (-> self root quat)) + (set-vector! + (-> self root scale) + (* 0.00024414062 (-> arg0 size-x)) + (* 0.00024414062 (-> arg0 size-y)) + 1.0 + 1.0 + ) + (go-virtual active) + ) + +(defstate active (gun-dark-3-sphere) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('set-pos-and-size) + (let ((v1-2 (the-as gun-dark-3-sphere-init-params (-> block param 0)))) + (set! (-> self root trans quad) (-> v1-2 pos quad)) + (set-vector! + (-> self root scale) + (* 0.00024414062 (-> v1-2 size-x)) + (* 0.00024414062 (-> v1-2 size-y)) + 1.0 + 1.0 + ) + (vector-float*! (-> self root scale) (-> self root scale) 1.7) + (set! (-> self alpha-val) (-> v1-2 alpha-val)) + ) + ) + ) + #t + ) + :enter (behavior () + (set-time! (-> self state-time)) + (ja-channel-push! 1 0) + (ja :group! gun-nuke-sphere-fade-ja :num! zero) + (set! (-> self alpha-val) 1.0) + ) + :trans (behavior () + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (math-camera-pos)))) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (vector-float*! s5-1 s5-1 -1.0) + (matrix-fu-compose gp-0 s5-1 *up-vector*) + ) + (matrix->quat gp-0 (-> self root quat)) + ) + (ja :group! gun-nuke-sphere-fade-ja :num! (identity (- 1.0 (-> self alpha-val)))) + ) + :code sleep-code + :post (behavior () + (ja-post) + ) + ) + +(defskelgroup skel-gun-dark-3-nuke gun gun-nuke-lod0-jg gun-nuke-idle-ja + ((gun-nuke-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3) + :texture-level 10 + ) + +(deftype last-active-nuke-info (structure) + ((last-active-nuke handle) + ) + ) + + +(define *last-active-nuke* (new 'static 'last-active-nuke-info)) + +(set! (-> *last-active-nuke* last-active-nuke) (the-as handle #f)) + +(deftype gun-dark-3-nuke (projectile) + ((flash-time time-frame) + (blur-time time-frame) + (spawned-mushroom-cloud? symbol) + (strip prim-strip) + (mushroom-top-pos vector :inline) + (warp handle) + (initial-velocity vector :inline) + (start-y float) + (y-vel-adjust float) + (launch-speed float) + (launch-sin-region-start float) + (launch-sin-region-end float) + (launch-stay-state-time time-frame) + (launch-next-state (state gun-dark-3-nuke)) + (launch-impact-state (state gun-dark-3-nuke)) + (launch-y-scale float) + (launch-height-t float) + (expected-height float) + (total-fly-time time-frame) + (num-dying-vehicles uint8) + (num-dying-guards uint8) + (num-dying-civilians uint8) + (last-death-sound-play-time time-frame) + (blur-curve curve2d-piecewise) + (fade-curve curve-color-piecewise) + (num-blur-segments uint8) + (shook-camera? symbol) + (hit-wall? symbol) + (killed-everything? symbol :offset 696) + (explode-sound sound-id) + (explode-wall-sound sound-id) + (played-trail? symbol) + (smoke-trail sparticle-subsampler) + (killed-objects handle 64) + (num-killed-objects int32) + (last-kill-time time-frame) + ) + (:state-methods + undefined + launching-base-state + launch-0 + launch-1 + launch-2 + launch-3 + impact-small + impact-dud + impact-embedded + wait-for-alive + ) + (:methods + (set-launch-height! (_type_) none) + (do-blur-effect (_type_) none) + (do-white-screen-effect (_type_) none) + (count-casualties (_type_) none) + (send-attack! (_type_ process-focusable) none) + (play-death-sounds (_type_) none) + (do-camera-shake (_type_) none) + (do-vibration (_type_) none) + (check-for-impact (_type_) none) + ) + ) + + +;; WARN: Return type mismatch matrix vs none. +(defmethod projectile-method-25 ((this gun-dark-3-nuke)) + (when (not (logtest? (-> this draw status) (draw-control-status no-draw))) + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (matrix-f-u-compose s5-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)) *up-vector*) + (set! (-> s5-0 trans quad) (-> this root trans quad)) + (spawn-from-mat (-> this part) s5-0) + (init-with-mat! (-> this smoke-trail) s5-0) + ) + ) + (none) + ) + +(defun gun-dark-reaction ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector)) + (cshape-reaction-update-state arg0 arg1 arg3) + (set! (-> arg2 quad) (-> arg3 quad)) + (cond + ((logtest? (-> arg0 status) (collide-status touch-wall)) + (send-event (-> arg0 process) 'impact-small) + ) + ((let ((f0-1 (vector-dot (vector-normalize-copy! (new 'stack-no-clear 'vector) arg3 1.0) (-> arg0 surface-normal)))) + (< -0.3 f0-1) + ) + (let ((v1-9 (new 'stack-no-clear 'vector))) + (set! (-> v1-9 quad) (-> arg0 trans quad)) + (+ 1228.8 (-> v1-9 y)) + ) + (vector-flatten! arg2 arg3 (-> arg0 surface-normal)) + (send-event (-> arg0 process) 'slide-now (-> arg0 surface-normal)) + ) + (else + (send-event (-> arg0 process) 'impact) + ) + ) + (-> arg0 status) + ) + +(defmethod setup-collision! ((this gun-dark-3-nuke)) + (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) gun-dark-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 40.96) + (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 obstacle pusher impenetrable-obj)) + (set-collide-as! (-> this root) (collide-spec projectile)) + (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 gun-dark-3-nuke)) + (with-pp + (set! (-> *last-active-nuke* last-active-nuke) (process->handle this)) + (set! (-> this attack-mode) 'eco-dark) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-gun-dark-3-nuke" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this spawned-mushroom-cloud?) #f) + (set! (-> this strip) + (new 'process 'prim-strip 4 (new 'static 'texture-id :index #x1f :page #x5) (the-as string #f)) + ) + (set! (-> this played-trail?) #f) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 112) this)) + pp + (set! (-> this smoke-trail) + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 388) 8.0) + ) + (set-setting! 'allow-progress #f 0.0 0) + (set! (-> this explode-sound) + (add-process *gui-control* this (gui-channel gun) (gui-action queue) "pg3nxplo" -99.0 0) + ) + (set! (-> this explode-wall-sound) + (add-process *gui-control* this (gui-channel gun) (gui-action queue) "pg3wxplo" -99.0 0) + ) + (let* ((v1-19 *game-info*) + (a0-15 (+ (-> v1-19 attack-id) 1)) + ) + (set! (-> v1-19 attack-id) a0-15) + (set! (-> this attack-id) a0-15) + ) + (set! (-> this initial-velocity quad) (-> this root transv quad)) + (set! (-> this start-y) (-> this root trans y)) + (set! (-> this launch-impact-state) (method-of-object this impact-dud)) + (set! (-> this y-vel-adjust) 0.0) + (set! (-> this warp) (the-as handle #f)) + (set! (-> this shook-camera?) #f) + (set-vector! (-> this root scale) 2.5 2.5 2.5 1.0) + (set! (-> this killed-everything?) #f) + (let ((t9-8 (method-of-type projectile init-proj-settings!))) + (t9-8 this) + ) + (logior! (-> this options) (projectile-options po4)) + (set! (-> this total-fly-time) 0) + 0 + (none) + ) + ) + +(defmethod relocate ((this gun-dark-3-nuke) (offset int)) + (if (nonzero? (-> this strip)) + (&+! (-> this strip) offset) + ) + (if (nonzero? (-> this smoke-trail)) + (&+! (-> this smoke-trail) offset) + ) + (call-parent-method this offset) + ) + +;; WARN: Return type mismatch symbol vs object. +(defbehavior nuke-move gun-dark-3-nuke () + (let ((gp-0 (-> self root))) + (set! (-> self pre-move-transv quad) (-> gp-0 transv quad)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> gp-0 trans quad)) + ((-> self move) self) + (projectile-method-39 self) + (set! (-> self old-dist (-> self old-dist-count)) (* 0.0625 (vector-vector-distance s5-0 (-> gp-0 trans)))) + ) + ) + (set! (-> self old-dist-count) (logand (+ (-> self old-dist-count) 1) 15)) + (let ((f0-2 0.0)) + (countdown (v1-12 16) + (+! f0-2 (-> self old-dist v1-12)) + ) + ) + #f + ) + +;; WARN: Return type mismatch float vs none. +(defmethod set-launch-height! ((this gun-dark-3-nuke)) + (set! (-> this launch-height-t) + (/ (the float (- (current-time) (-> this state-time))) (the float (-> this launch-stay-state-time))) + ) + (set! (-> this launch-height-t) (fmax 0.0 (fmin 1.0 (-> this launch-height-t)))) + (none) + ) + +(defmethod proj-event-handler ((this gun-dark-3-nuke) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('impact) + (go (-> this launch-impact-state)) + ) + (('impact-small) + (go (method-of-object this impact-embedded)) + ) + (('slide-now) + (let ((a2-1 (-> arg3 param 0)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (vector-flatten! s5-1 (-> this initial-velocity) (the-as vector a2-1)) + (set! (-> this y-vel-adjust) (-> s5-1 y)) + ) + (set! (-> this start-y) (+ (-> this start-y) (* (-> this y-vel-adjust) (seconds-per-frame)))) + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defstate launching-base-state (gun-dark-3-nuke) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (proj-event-handler self proc argc message block) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self root transv y) 0.0) + ) + :trans (behavior () + (if *scene-player* + (go empty-state) + ) + (when (and (not (-> self played-trail?)) (>= (+ (current-time) (seconds -0.3)) (-> self total-fly-time))) + (sound-play "purple-3-trail" :position (-> self root trans)) + (set! (-> self played-trail?) #t) + ) + (when (time-elapsed? (-> self state-time) (-> self launch-stay-state-time)) + (set! (-> self start-y) (-> self root trans y)) + (go (-> self launch-next-state)) + ) + (+! (-> self start-y) (* (-> self y-vel-adjust) (seconds-per-frame))) + (let ((f0-3 (-> self launch-height-t))) + 0.0 + 0.0 + (let ((f0-4 (lerp (-> self launch-sin-region-start) (-> self launch-sin-region-end) f0-3))) + 0.0 + (let ((f30-1 (+ (- (* (sin (* 182.04445 f0-4)) (-> self launch-y-scale)) + (* (sin (* 182.04445 (-> self launch-sin-region-start))) (-> self launch-y-scale)) + ) + (-> self start-y) + ) + ) + ) + (set! (-> self expected-height) f30-1) + (vector-normalize-copy! (-> self root transv) (-> self initial-velocity) (-> self launch-speed)) + (set! (-> self root transv y) (- f30-1 (-> self root trans y))) + ) + ) + ) + (set! (-> self root transv y) (/ (-> self root transv y) (seconds-per-frame))) + (let ((t9-8 nuke-move)) + (-> self launch-impact-state) + (t9-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) + ) + (matrix->quaternion (-> self root quat) gp-1) + ) + (+! (-> self total-fly-time) (- (current-time) (-> self clock old-frame-counter))) + ) + :code sleep-code + :post (behavior () + (ja-post) + (projectile-method-25 self) + ) + ) + +(defstate launch-0 (gun-dark-3-nuke) + :virtual #t + :parent (gun-dark-3-nuke launching-base-state) + :enter (behavior () + (set! (-> self launch-impact-state) (method-of-object self impact-embedded)) + (set! (-> self launch-y-scale) 0.0) + (set! (-> self launch-stay-state-time) (seconds 0.2)) + (set! (-> self launch-next-state) (method-of-object self launch-1)) + (let ((v1-6 (-> self state parent))) + (when v1-6 + (let ((t9-0 (-> v1-6 enter))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + ) + :trans (behavior () + (set-launch-height! self) + (set! (-> self launch-speed) 32768.0) + (let ((v1-4 (-> self state parent))) + (when v1-4 + (let ((t9-1 (-> v1-4 trans))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + ) + ) + +(defstate launch-1 (gun-dark-3-nuke) + :virtual #t + :parent (gun-dark-3-nuke launching-base-state) + :enter (behavior () + (set! (-> self launch-y-scale) 0.0) + (set! (-> self launch-stay-state-time) (seconds 0.4)) + (set! (-> self launch-next-state) (method-of-object self launch-2)) + (let ((v1-4 (-> self state parent))) + (when v1-4 + (let ((t9-0 (-> v1-4 enter))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + ) + :trans (behavior () + (set-launch-height! self) + (let ((f0-1 (* 0.008333334 (the float (- (current-time) (-> self state-time)))))) + (set! (-> self launch-speed) (lerp 61440.0 204800.0 f0-1)) + ) + (let ((v1-8 (-> self state parent))) + (when v1-8 + (let ((t9-2 (-> v1-8 trans))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + ) + ) + +(defstate launch-2 (gun-dark-3-nuke) + :virtual #t + :parent (gun-dark-3-nuke launching-base-state) + :enter (behavior () + (set! (-> self launch-sin-region-start) 0.0) + (set! (-> self launch-sin-region-end) 270.0) + (set! (-> self launch-stay-state-time) (seconds 0.5)) + (set! (-> self launch-next-state) (method-of-object self launch-3)) + (set! (-> self launch-y-scale) 34816.0) + (let ((v1-6 (-> self state parent))) + (when v1-6 + (let ((t9-0 (-> v1-6 enter))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + ) + :trans (behavior () + (let ((f30-0 (* 0.006666667 (the float (- (current-time) (-> self state-time)))))) + (if (< 0.7 f30-0) + (set! (-> self launch-impact-state) (method-of-object self impact)) + ) + (set! (-> self launch-speed) (lerp 204800.0 552960.0 f30-0)) + (set! (-> self launch-height-t) (* f30-0 f30-0)) + ) + (let ((v1-10 (-> self state parent))) + (when v1-10 + (let ((t9-1 (-> v1-10 trans))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + ) + ) + +(defstate launch-3 (gun-dark-3-nuke) + :virtual #t + :parent (gun-dark-3-nuke launching-base-state) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (let ((t9-0 nuke-move)) + (-> self launch-impact-state) + (t9-0) + ) + (if (time-elapsed? (-> self state-time) (seconds 4)) + (go-virtual die) + ) + ) + ) + +(defmethod send-attack! ((this gun-dark-3-nuke) (arg0 process-focusable)) + (let* ((s3-0 (get-trans arg0 3)) + (v1-2 (get-trans arg0 1)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) s3-0 (-> this root trans))) + ) + (+! (-> v1-2 y) 409.6) + (let ((v1-5 (cond + ((logtest? (-> *part-group-id-table* 115 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* 115)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-2 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 115)) + ) + ) + ) + ) + (send-event (ppointer->process v1-5) 'clock this) + ) + (send-event + arg0 + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> this attack-id)) + (damage 32.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'eco-dark) + (attacker-velocity s5-1) + (penetrate-using (penetrate explode jak-dark-nuke)) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod count-casualties ((this gun-dark-3-nuke)) + (local-vars (sv-1568 vector)) + (set! (-> this num-dying-vehicles) (the-as uint 0)) + (set! (-> this num-dying-guards) (the-as uint 0)) + (set! (-> this num-dying-civilians) (the-as uint 0)) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s5-0 64) + ) + (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)) + (let* ((s1-0 (-> s3-0 s2-0)) + (v1-5 (if (type? s1-0 collide-shape) + s1-0 + ) + ) + ) + (when v1-5 + (let* ((s0-0 (-> v1-5 process)) + (s1-1 (if (type? s0-0 process-focusable) + s0-0 + ) + ) + ) + (when s1-1 + (when (and (!= *target* s1-1) + (not (focus-test? (the-as process-focusable s1-1) disable dead inactive)) + (or (logtest? (process-mask enemy guard vehicle civilian) (-> s1-1 mask)) + (and (logtest? (process-mask crate) (-> s1-1 mask)) (let ((s0-1 vector-vector-xz-distance)) + (set! sv-1568 (-> s1-1 root trans)) + (let ((a1-3 (camera-pos))) + (< (s0-1 sv-1568 a1-3) 204800.0) + ) + ) + ) + ) + ) + (when (> s5-0 0) + (+! s5-0 -1) + (send-attack! this (the-as process-focusable s1-1)) + (cond + ((logtest? (process-mask civilian) (-> s1-1 mask)) + (+! (-> this num-dying-civilians) 1) + ) + ((logtest? (process-mask guard) (-> s1-1 mask)) + (+! (-> this num-dying-guards) 1) + ) + ((logtest? (process-mask vehicle) (-> s1-1 mask)) + (+! (-> this num-dying-vehicles) 1) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (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) s4-0) (-> s4-0 w))) + (when (and (!= *target* s3-1) + (not (focus-test? s3-1 disable dead inactive)) + (or (logtest? (process-mask enemy guard vehicle civilian) (-> s3-1 mask)) + (and (logtest? (process-mask crate) (-> s3-1 mask)) + (< (vector-vector-xz-distance (-> s3-1 control trans) (camera-pos)) 204800.0) + ) + ) + ) + (when (> s5-0 0) + (+ s5-0 -1) + (send-attack! this s3-1) + (cond + ((logtest? (process-mask civilian) (-> s3-1 mask)) + (+! (-> this num-dying-civilians) 1) + ) + ((logtest? (process-mask guard) (-> s3-1 mask)) + (+! (-> this num-dying-guards) 1) + ) + ((logtest? (process-mask vehicle) (-> s3-1 mask)) + (+! (-> this num-dying-vehicles) 1) + ) + ) + ) + ) + ) + ) + ) + (set! (-> this num-dying-vehicles) (the-as uint (min 4 (the-as int (-> this num-dying-vehicles))))) + (set! (-> this num-dying-guards) (the-as uint (min 6 (the-as int (-> this num-dying-vehicles))))) + (set! (-> this num-dying-civilians) (the-as uint (min 6 (the-as int (-> this num-dying-vehicles))))) + 0 + (none) + ) + +(defmethod do-blur-effect ((this gun-dark-3-nuke)) + (when (= (process->handle this) (-> *last-active-nuke* last-active-nuke)) + 0.0 + (let* ((f0-3 (/ (the float (- (current-time) (-> this state-time))) (the float (-> this blur-time)))) + (f0-4 (curve2d-method-9 (-> this blur-curve) f0-3 3)) + (f0-5 (- 1.0 f0-4)) + ) + (blit-displays-work-method-17 + *blit-displays-work* + (-> this root trans) + (the-as int (-> this num-blur-segments)) + (fmin 1.0 f0-5) + #f + ) + ) + (set! (-> *display* force-sync) (the-as uint 2)) + ) + (none) + ) + +(defmethod do-white-screen-effect ((this gun-dark-3-nuke)) + (when (= (process->handle this) (-> *last-active-nuke* last-active-nuke)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + 0.0 + 0.0 + (let ((f0-4 (/ (the float (- (current-time) (-> this state-time))) (the float (-> this flash-time))))) + (curve-color-method-9 (-> this fade-curve) f0-4 (the-as rgbaf gp-0) 3) + ) + (set! (-> gp-0 x) (* 255.0 (-> gp-0 x))) + (set! (-> gp-0 y) (* 255.0 (-> gp-0 y))) + (set! (-> gp-0 z) (* 255.0 (-> gp-0 z))) + (set! (-> gp-0 w) (* 128.0 (-> gp-0 w))) + (setup *screen-filter* gp-0 gp-0 0.0 (bucket-id tex-hud-pris2) #x3fffff #x33001 #t) + ) + ) + (none) + ) + +(defstate impact-dud (gun-dark-3-nuke) + :virtual #t + :code (behavior () + (if *scene-player* + (go empty-state) + ) + (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) 0.0) + (set! (-> gp-0 scale) 1.0) + (set! (-> gp-0 group) (-> *part-group-id-table* 104)) + (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 self) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-20 (-> self root root-prim))) + (set! (-> v1-20 prim-core collide-as) (collide-spec)) + (set! (-> v1-20 prim-core collide-with) (collide-spec)) + ) + 0 + (ja-post) + (while (-> self child) + (suspend) + ) + ) + ) + +(defmethod projectile-method-40 ((this gun-dark-3-nuke)) + 256 + ) + +(defstate impact-embedded (gun-dark-3-nuke) + :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 + (set! (-> self root transv quad) (the-as uint128 0)) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (if *scene-player* + (go empty-state) + ) + (if (time-elapsed? (-> self state-time) (seconds 1.4)) + (go-virtual impact-small) + ) + ) + :code (behavior () + (until (time-elapsed? (-> self state-time) (seconds 0.3)) + (suspend) + ) + (sound-play "beep") + (until (time-elapsed? (-> self state-time) (seconds 0.5)) + (suspend) + ) + (sound-play "beep") + (until #f + (suspend) + ) + #f + ) + :post (behavior () + (ja-post) + (projectile-method-25 self) + ) + ) + +;; WARN: Return type mismatch uint vs none. +(defmethod play-death-sounds ((this gun-dark-3-nuke)) + (when (and (not (time-elapsed? (-> this state-time) (seconds 1.5))) + (time-elapsed? (-> this last-death-sound-play-time) (seconds 0.1)) + ) + (set-time! (-> this last-death-sound-play-time)) + (let* ((v1-11 (+ (-> this num-dying-vehicles) (-> this num-dying-guards) (-> this num-dying-civilians))) + (v1-12 (rand-vu-int-range 0 (the-as int (+ v1-11 -1)))) + ) + (when (> v1-12 0) + (cond + ((< v1-12 (the-as int (-> this num-dying-vehicles))) + (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)))) + (sound-play "guard-die") + (+! (-> this num-dying-guards) -1) + ) + (else + (sound-play "guard-hit") + (+! (-> this num-dying-civilians) -1) + ) + ) + ) + ) + ) + (none) + ) + +(defstate impact-small (gun-dark-3-nuke) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self draw status) (draw-control-status no-draw)) + (case (get-status *gui-control* (-> self explode-wall-sound)) + (((gui-status ready)) + (set-action! + *gui-control* + (gui-action play) + (-> self explode-wall-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (else + (set-action! + *gui-control* + (gui-action stop) + (-> self explode-wall-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (sound-play "explosion" :pitch 2.5) + ) + ) + (case (get-status *gui-control* (-> self explode-sound)) + (((gui-status ready)) + (set-action! + *gui-control* + (gui-action stop) + (-> self explode-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + (set-setting! 'music-volume 'abs 0.0 0) + (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 last-death-sound-play-time) 0) + (set! (-> self flash-time) *gun-dark-3-nuke-fade-time-small*) + (set! (-> self blur-time) *gun-dark-3-nuke-blur-time-small*) + (set! (-> self blur-curve) *gun-dark-3-nuke-blur-curve-small*) + (set! (-> self fade-curve) *gun-dark-3-nuke-fade-curve-small*) + (set! (-> self num-blur-segments) *gun-dark-3-nuke-blur-segs-small*) + ) + :exit (behavior () + (when (= (process->handle self) (-> *last-active-nuke* last-active-nuke)) + (disable *screen-filter*) + (blit-displays-work-method-17 *blit-displays-work* (-> self root trans) 0 1.0 #f) + ) + ) + :trans (behavior () + (if *scene-player* + (go empty-state) + ) + (do-blur-effect self) + (do-white-screen-effect self) + (if (time-elapsed? (-> self state-time) (seconds 1)) + (do-camera-shake self) + ) + (when (not (-> self spawned-mushroom-cloud?)) + (let ((v1-23 + (cond + ((logtest? (-> *part-group-id-table* 114 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* 114)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 114)) + ) + ) + ) + ) + (send-event (ppointer->process v1-23) 'clock self) + ) + (set! (-> self spawned-mushroom-cloud?) #t) + ) + (if (and (time-elapsed? (-> self state-time) (seconds 0.3)) + (not (time-elapsed? (-> self state-time) (seconds 6))) + ) + (set-setting! 'nuke-active? #t 0.0 0) + (remove-setting! 'nuke-active?) + ) + (when (and (time-elapsed? (-> self state-time) (seconds 0.3)) + (and (not (time-elapsed? (-> self state-time) (seconds 6))) + (time-elapsed? (-> self last-kill-time) (seconds 0.1)) + (not (-> self killed-everything?)) + ) + ) + (count-casualties self) + (set! (-> self killed-everything?) #t) + (set-time! (-> self last-kill-time)) + ) + (play-death-sounds self) + (ja-post) + ) + :code (behavior () + (until (time-elapsed? (-> self state-time) (seconds 8)) + (suspend) + ) + ) + ) + +(defstate wait-for-alive (gun-dark-3-nuke) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (remove-setting! 'allow-progress) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (if *scene-player* + (go empty-state) + ) + (let ((f0-1 (* 0.00066666666 (the float (- (current-time) (-> self clock old-frame-counter)))))) + (set-setting! 'music-volume 'abs f0-1 0) + ) + ) + :code (behavior () + (until (time-elapsed? (-> self state-time) (seconds 5)) + (suspend) + ) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod check-for-impact ((this gun-dark-3-nuke)) + (let ((a1-0 (new 'stack-no-clear 'collide-query))) + (vector+float*! (-> a1-0 start-pos) (-> this root trans) *up-vector* 2048.0) + (set-vector! (-> a1-0 move-dist) 0.0 49152.0 0.0 1.0) + (let ((v1-3 a1-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)) + ) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* a1-0) 0.0) + (go (method-of-object this impact-small)) + ) + ) + (none) + ) + +(defmethod do-vibration ((this gun-dark-3-nuke)) + (buzz-stop! 0) + (let* ((f1-2 (* 0.00055555557 (the float (- (current-time) (-> this state-time))))) + (f0-2 (fmax 0.0 (fmin 1.0 f1-2))) + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 (the int (* 255.0 (- 1.0 f0-2))) (seconds 1)) + ) + (none) + ) + +(defstate impact (gun-dark-3-nuke) + :virtual #t + :enter (behavior () + (check-for-impact self) + (set-setting! 'music-volume 'abs 0.0 0) + (case (get-status *gui-control* (-> self explode-wall-sound)) + (((gui-status ready)) + (set-action! + *gui-control* + (gui-action stop) + (-> self explode-wall-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + (case (get-status *gui-control* (-> self explode-sound)) + (((gui-status ready)) + (set-action! + *gui-control* + (gui-action play) + (-> self explode-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (else + (set-action! + *gui-control* + (gui-action stop) + (-> self explode-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (sound-play "explosion" :pitch 2.5) + ) + ) + (set-time! (-> self state-time)) + (logior! (-> self draw status) (draw-control-status no-draw)) + (vector+float*! (-> self mushroom-top-pos) (-> self root trans) *up-vector* 20480.0) + (let ((v1-25 (-> self root root-prim))) + (set! (-> v1-25 prim-core collide-as) (collide-spec)) + (set! (-> v1-25 prim-core collide-with) (collide-spec)) + ) + 0 + (set! (-> self flash-time) *gun-dark-3-nuke-fade-time*) + (set! (-> self blur-time) *gun-dark-3-nuke-blur-time*) + (set! (-> self blur-curve) *gun-dark-3-nuke-blur-curve*) + (set! (-> self fade-curve) *gun-dark-3-nuke-fade-curve*) + (set! (-> self num-blur-segments) *gun-dark-3-nuke-blur-segs*) + ) + :exit (behavior () + (when (= (process->handle self) (-> *last-active-nuke* last-active-nuke)) + (disable *screen-filter*) + (blit-displays-work-method-17 *blit-displays-work* (-> self root trans) 0 1.0 #f) + ) + ) + :trans (behavior () + (if *scene-player* + (go empty-state) + ) + (do-blur-effect self) + (do-white-screen-effect self) + (do-vibration self) + (if (time-elapsed? (-> self state-time) (seconds 1)) + (do-camera-shake self) + ) + (set! (-> self strip num-verts) (the-as uint 0)) + (when (time-elapsed? (-> self state-time) (seconds 0.035)) + (when (not (-> self spawned-mushroom-cloud?)) + (let ((v1-30 + (cond + ((logtest? (-> *part-group-id-table* 110 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* 110)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 110)) + ) + ) + ) + ) + (send-event (ppointer->process v1-30) 'clock self) + ) + (let ((v1-61 + (cond + ((logtest? (-> *part-group-id-table* 111 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* 111)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 111)) + ) + ) + ) + ) + (send-event (ppointer->process v1-61) 'clock self) + ) + (let ((gp-4 (new 'stack-no-clear 'gun-dark-3-sphere-init-params))) + (set! (-> gp-4 pos quad) (-> self root trans quad)) + (set! (-> gp-4 size-x) 1.0) + (set! (-> gp-4 size-y) 1.0) + (set! (-> self warp) + (ppointer->handle (process-spawn gun-dark-3-sphere gp-4 :name "gun-dark-3-sphere" :to self)) + ) + ) + (set! (-> self spawned-mushroom-cloud?) #t) + ) + (if (and (time-elapsed? (-> self state-time) (seconds 0.3)) + (not (time-elapsed? (-> self state-time) (seconds 6))) + ) + (set-setting! 'nuke-active? #t 0.0 0) + (remove-setting! 'nuke-active?) + ) + (when (and (time-elapsed? (-> self state-time) (seconds 0.3)) + (and (not (time-elapsed? (-> self state-time) (seconds 7))) + (time-elapsed? (-> self last-kill-time) (seconds 0.1)) + (not (-> self killed-everything?)) + ) + ) + (count-casualties self) + (set! (-> self killed-everything?) #t) + (set-time! (-> self last-kill-time)) + ) + (play-death-sounds self) + (+! (-> self mushroom-top-pos y) (* *gun-dark-3-mushroom-speed* (seconds-per-frame))) + (let ((f26-0 (/ (the float (- (current-time) (-> self state-time))) (the float *gun-dark-3-mushroom-size-time*)))) + 0.0 + 0.0 + (let ((f30-0 1.0) + (f28-0 (curve2d-method-9 *gun-dark-3-nuke-mushroom-size-curve-x* f26-0 3)) + (f26-1 (curve2d-method-9 *gun-dark-3-nuke-mushroom-size-curve-y* f26-0 3)) + ) + (when (time-elapsed? (-> self state-time) (seconds 5)) + (let ((f30-1 (* 0.00066666666 (the float (+ (- (seconds -5) (-> self state-time)) (current-time)))))) + 0.0 + (let ((f24-0 (* f30-1 f30-1))) + (set! f28-0 (* f28-0 (lerp 1.0 1.3 f24-0))) + (set! f26-1 (* f26-1 (lerp 1.0 1.3 f24-0))) + ) + (set! f30-0 (lerp 1.0 0.0 f30-1)) + ) + ) + (let ((v1-144 (new 'stack-no-clear 'gun-dark-3-sphere-init-params))) + (set! (-> v1-144 pos quad) (-> self mushroom-top-pos quad)) + (set! (-> v1-144 size-x) f28-0) + (set! (-> v1-144 size-y) f26-1) + (set! (-> v1-144 alpha-val) (* f30-0 f30-0)) + (send-event (handle->process (-> self warp)) 'set-pos-and-size v1-144) + ) + (let ((gp-6 (vector-float*! (new 'stack-no-clear 'vector) *up-vector* f26-1)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> self mushroom-top-pos) (math-camera-pos)))) + (set! (-> s4-1 y) 0.0) + (vector-cross! s5-1 *up-vector* s4-1) + ) + (vector-normalize! s5-1 f28-0) + (dotimes (v1-152 4) + (if (> (logand v1-152 1) 0) + (vector-float*! gp-6 gp-6 -1.0) + ) + (when (= v1-152 2) + (vector-float*! gp-6 gp-6 -1.0) + (vector-float*! s5-1 s5-1 -1.0) + ) + (vector+! (the-as vector (+ (the-as uint (-> self strip data 0 pos)) (* v1-152 32))) s5-1 gp-6) + (vector+! + (the-as vector (+ (the-as uint (-> self strip data 0 pos)) (* v1-152 32))) + (the-as vector (+ (the-as uint (-> self strip data 0 pos)) (* v1-152 32))) + (-> self mushroom-top-pos) + ) + (set! (-> self strip data v1-152 stq z) 0.0) + (set! (-> self strip data v1-152 col) *color-gray*) + (set! (-> self strip data v1-152 col a) (the int (* 127.0 f30-0))) + (set! (-> self strip data v1-152 col g) (the int (* 127.0 f30-0))) + (set! (-> self strip data v1-152 col b) (the int (* 127.0 f30-0))) + ) + ) + ) + ) + (set! (-> self strip alpha) (new 'static 'gs-alpha :b #x1 :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 #x32 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + (set! (-> self strip data 0 stq x) 1.0) + (set! (-> self strip data 0 stq y) 1.0) + (set! (-> self strip data 1 stq x) 1.0) + (set! (-> self strip data 1 stq y) 0.0) + (set! (-> self strip data 3 stq x) 0.0) + (set! (-> self strip data 3 stq y) 0.0) + (set! (-> self strip data 2 stq x) 0.0) + (set! (-> self strip data 2 stq y) 1.0) + (set! (-> self strip num-verts) (the-as uint 4)) + ) + (ja-post) + ) + :code (behavior () + (until (time-elapsed? (-> self state-time) (seconds 10)) + (suspend) + ) + (go-virtual wait-for-alive) + ) + ) + +(defmethod projectile-method-32 ((this gun-dark-3-nuke)) + (if (not (do-fire-backcheck (-> this root trans) (-> this root transv))) + (go (method-of-object this impact-dud)) + (go (method-of-object this launch-0)) + ) + 0 + (none) + ) + +(defbehavior target-gun-can-fire-dark? target ((arg0 pickup-type)) + (case arg0 + (((pickup-type gun-dark-2)) + (time-elapsed? (get-last-fire-time 36) (seconds 2)) + ) + (((pickup-type gun-dark-3)) + (time-elapsed? (get-last-fire-time 37) (seconds 9)) + ) + (else + #t + ) + ) + ) + +;; WARN: Return type mismatch int vs (pointer process). +(defbehavior gun-fire-dark-3 target () + (let ((gp-0 (-> self gun)) + (s5-0 (new 'stack-no-clear 'projectile-init-by-other-params)) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> self gun fire-dir-out quad)) + (set-last-fire-time 37) + (sound-play "purple-3-shot" :position (-> gp-0 fire-point)) + (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 pos quad) (-> gp-0 fire-point quad)) + (set! (-> s5-0 vel quad) (-> (vector-float*! (new 'stack-no-clear 'vector) s4-0 81920.0) quad)) + ) + (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 (send-event self 'get-vehicle))) + (let* ((v1-17 *game-info*) + (a0-17 (+ (-> v1-17 attack-id) 1)) + ) + (set! (-> v1-17 attack-id) a0-17) + (set! (-> s5-0 attack-id) a0-17) + ) + (set! (-> s5-0 timeout) (seconds 4)) + (let ((v0-7 (ppointer->handle (process-spawn + gun-dark-3-nuke + :init projectile-init-by-other + s5-0 + :name "projectile" + :to (ppointer->process (-> gp-0 gun)) + :stack *kernel-dram-stack* + ) + ) + ) + ) + (set! (-> gp-0 gun 0 extra) (the-as handle v0-7)) + (the-as (pointer process) v0-7) + ) + ) + ) + +(defmethod init-proj-settings! ((this gun-dark-shot)) + (+! (-> *game-info* shots-fired 3) 1.0) + (set! (-> this attack-mode) 'eco-dark) + (vector-normalize! (-> this root transv) (+ 225280.0 (* 225280.0 (-> this charge-level)))) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 94) this)) + (set! (-> this blast-radius) 40960.0) + (if (logtest? (game-secrets gun-upgrade-dark-1) (-> *game-info* secrets)) + (set! (-> this blast-radius) 81920.0) + ) + (set! (-> this size-t) 0.0) + (set! (-> this notify-handle) (process->handle this)) + (set! (-> this charge-sound) (new-sound-id)) + (set! (-> this fire-sound) (new-sound-id)) + (set! (-> this trail-sound) (new-sound-id)) + (set! (-> this explode-sound) + (add-process *gui-control* this (gui-channel gun) (gui-action queue) "pmkrxplo" -99.0 0) + ) + (sound-params-set! *gui-control* (-> this explode-sound) #t 50 150 11 -1.0) + (set! (-> this start-pilot?) (the-as symbol (and *target* (focus-test? *target* pilot)))) + (set! (-> this damage) 16.0) + (set! (-> this vehicle-damage-factor) 1.0) + (set! (-> this vehicle-impulse-factor) 2.0) + (when (logtest? (game-secrets gun-upgrade-dark-1) (-> *game-info* secrets)) + (set! (-> this vehicle-damage-factor) 6.0) + (set! (-> this vehicle-impulse-factor) 6.0) + ) + ((method-of-type projectile init-proj-settings!) this) + 0 + (none) + ) + +(defmethod projectile-method-25 ((this gun-dark-shot)) + (cond + ((and (and (-> this next-state) (= (-> this next-state name) 'startup)) + (and *target* (focus-test? *target* in-head)) + ) + (kill-particles (-> this part)) + ) + (else + (set! (-> *part-id-table* 260 init-specs 2 initial-valuef) (lerp 409.6 9216.0 (-> this size-t))) + (set! (-> *part-id-table* 260 init-specs 8 initial-valuef) (lerp 0.0 32.0 (-> this size-t))) + (set! (-> *part-id-table* 261 init-specs 2 initial-valuef) (lerp 409.6 32768.0 (-> this size-t))) + (set! (-> *part-id-table* 261 init-specs 8 initial-valuef) (lerp 0.0 16.0 (-> this size-t))) + (set! (-> *part-id-table* 259 init-specs 2 initial-valuef) (lerp 409.6 8192.0 (-> this size-t))) + (set! (-> *part-id-table* 258 init-specs 1 initial-valuef) (lerp 0.1 1.0 (-> this size-t))) + (set! (-> *part-id-table* 258 init-specs 2 initial-valuef) (lerp 409.6 3686.4 (-> this size-t))) + (spawn (-> this part) (-> this root trans)) + ) + ) + (ja-post) + (none) + ) + +(defmethod projectile-method-32 ((this gun-dark-shot)) + (go (method-of-object this startup)) + 0 + (none) + ) + +(defstate startup (gun-dark-shot) + :virtual #t + :exit (behavior () + (send-event (ppointer->process (-> self parent)) 'release) + (set! (-> self size-t) 1.0) + (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 charge-sound)) + (set! (-> v1-6 params volume) -4) + (set! (-> v1-6 auto-time) 24) + (set! (-> v1-6 auto-from) 2) + (set! (-> v1-6 params mask) (the-as uint 17)) + (-> v1-6 id) + ) + ) + :code (behavior () + (set-time! (-> self state-time)) + (until #f + (cond + ((or (and *target* + (focus-test? *target* dead grabbed under-water pole flut board mech dark carry indax teleporting) + ) + (and *target* (not (logtest? (focus-status in-head gun) (-> *target* focus-status)))) + (and *target* (!= (-> self start-pilot?) (focus-test? *target* pilot))) + (not (-> *setting-control* user-current gun)) + ) + (adjust-player-ammo 1.0 (pickup-type ammo-dark)) + (go-virtual dissipate) + ) + ((or (not (time-elapsed? (-> self state-time) (seconds 0.3))) (cpad-hold? 0 r1)) + (set! (-> self size-t) (fmin 1.0 (* 0.016666668 (the float (- (current-time) (-> self state-time)))))) + (let ((t9-2 vector<-cspace!) + (a0-14 (-> self root trans)) + (v1-28 (-> self parent)) + ) + (t9-2 a0-14 (-> (the-as process-focusable (if v1-28 + (the-as process-focusable (-> v1-28 0 self)) + ) + ) + node-list + data + 13 + ) + ) + ) + ) + ((and (logtest? (projectile-options po17) (-> self options)) (made-impact? self)) + (go-virtual impact) + ) + (else + (go-virtual moving) + ) + ) + (suspend) + ) + #f + ) + :post (behavior () + (sound-play "pmkr-charge" :id (-> self charge-sound) :position (-> self root trans)) + (projectile-method-25 self) + ) + ) + +(defstate moving (gun-dark-shot) + :virtual #t + :enter (behavior () + (if *target* + (set! (-> self track-target) (-> *target* gun track-target 0 handle)) + ) + (let ((t9-0 (-> (method-of-type projectile moving) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self core-position quad) (-> self root trans quad)) + (let ((v1-10 (-> self core-velocity)) + (a0-3 (-> self parent)) + ) + (set! (-> v1-10 quad) (-> (the-as process-focusable (if a0-3 + (the-as process-focusable (-> a0-3 0 self)) + ) + ) + node-list + data + 13 + bone + transform + fvec + quad + ) + ) + ) + (when (and *target* (focus-test? *target* in-head)) + (set! (-> self core-position quad) (-> (camera-pos) quad)) + (set! (-> self core-velocity quad) (-> (camera-matrix) fvec quad)) + ) + (set-vector! (-> self spin-vector) (-> self core-velocity z) 0.0 (- (-> self core-velocity x)) 1.0) + (let ((f0-5 (vector-length (-> self spin-vector)))) + (if (< f0-5 1.0) + (set-vector! (-> self spin-vector) 1.0 0.0 0.0 1.0) + (vector-float*! (-> self spin-vector) (-> self spin-vector) (/ 1.0 f0-5)) + ) + ) + (set-time! (-> self state-time)) + (let ((v1-35 (cond + ((logtest? (-> *part-group-id-table* 92 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* 92)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 92)) + ) + ) + ) + ) + (send-event (ppointer->process v1-35) 'clock self) + ) + (draw-beam (-> *part-id-table* 250) (-> self root trans) (-> self core-velocity) #f) + ) + :trans (behavior () + (local-vars (at-0 int)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-normalize-copy! s4-0 (-> self core-velocity) 1.0) + (let* ((s3-0 (handle->process (-> self track-target))) + (s2-0 (if (type? s3-0 process-drawable) + s3-0 + ) + ) + ) + (when s2-0 + (let ((s3-1 (new 'stack-no-clear 'vector))) + (set! (-> s3-1 quad) (-> (the-as process-focusable s2-0) root trans quad)) + (let ((a0-6 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (if a0-6 + (set! (-> s3-1 quad) (-> (get-trans (the-as process-focusable a0-6) 3) quad)) + ) + ) + (let* ((s2-3 (vector-! (new 'stack-no-clear 'vector) s3-1 (-> self core-position))) + (f0-0 (vector-normalize-ret-len! s2-3 1.0)) + (f0-1 (lerp-scale 182.04445 8192.0 f0-0 61440.0 4096.0)) + (s3-2 (new 'stack-no-clear 'matrix)) + ) + (matrix-from-two-vectors-max-angle! s3-2 s4-0 s2-3 f0-1) + (vector-matrix*! (-> self core-velocity) (-> self core-velocity) s3-2) + ) + ) + ) + ) + (+! (-> self spin-vector x) (-> s4-0 z)) + (set! (-> self spin-vector z) (- (-> self spin-vector z) (-> s4-0 x))) + (vector-flatten! (-> self spin-vector) (-> self spin-vector) s4-0) + (matrix-axis-angle! s5-0 s4-0 (* 2002.4889 (-> self clock time-adjust-ratio))) + (vector-matrix*! (-> self spin-vector) (-> self spin-vector) s5-0) + (let ((f0-9 (the float (- (current-time) (-> self state-time)))) + (f30-0 0.0) + ) + (cond + ((< 450.0 f0-9) + (go-virtual impact) + ) + ((< f0-9 90.0) + (set! f30-0 (lerp-scale 0.0 4096.0 f0-9 0.0 90.0)) + ) + (else + (set! f30-0 (lerp-scale 4096.0 1228.8 f0-9 30.0 300.0)) + ) + ) + (let ((f30-1 (* 0.5 f30-0))) + (vector-normalize! (-> self spin-vector) f30-1) + (vector-normalize! (-> self core-velocity) 7372.8) + (set! (-> s5-0 fvec quad) (-> s4-0 quad)) + (set! (-> s5-0 uvec quad) (-> self spin-vector quad)) + (vector-float*! (-> s5-0 uvec) (-> s5-0 uvec) (/ 1.0 f30-1)) + ) + ) + ) + (vector-cross! (-> s5-0 rvec) (-> s5-0 uvec) (-> s5-0 fvec)) + (matrix->quaternion (-> self root quat) s5-0) + ) + (vector+! (-> self core-position) (-> self core-position) (-> self core-velocity)) + (vector+! gp-0 (-> self core-position) (-> self spin-vector)) + (vector-! (-> self root transv) gp-0 (-> self root trans)) + ) + (let ((v1-39 (-> self root transv))) + (.lvf vf1 (&-> (-> self root transv) quad)) + (let ((f0-13 (-> self clock frames-per-second))) + (.mov at-0 f0-13) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> v1-39 quad) vf1) + ) + (projectile-move-fill-line-sphere self) + (if (logtest? (-> self root status) (collide-status touch-surface)) + (go-virtual impact) + ) + (sound-play "pmkr-fire" :id (-> self fire-sound) :position (-> self root trans)) + (sound-play "pmkr-trail" :id (-> self trail-sound) :position (-> self root trans)) + ) + ) + ) + +;; WARN: Check prologue - tricky store of a0 +(defun process-drawable-shock-effect-bullseye ((arg0 process-focusable) + (arg1 process-focusable) + (arg2 lightning-spec) + (arg3 (function lightning-tracker none)) + (arg4 sparticle-launcher) + (arg5 sparticle-launcher) + (arg6 sparticle-launcher) + ) + (local-vars (sv-16 process) (sv-32 lightning-spec) (sv-48 process-focusable)) + (set! sv-48 arg0) + (let ((s0-0 arg1)) + (set! sv-32 arg2) + (let ((gp-0 arg4) + (s1-0 arg5) + (s3-0 arg6) + (s4-0 (get-trans sv-48 3)) + (s5-0 (get-trans s0-0 3)) + ) + (set! sv-16 (get-process *default-dead-pool* lightning-tracker #x4000 0)) + (let ((s2-0 (when sv-16 + (let ((t9-3 (method-of-type lightning-tracker activate))) + (t9-3 (the-as lightning-tracker sv-16) s0-0 "lightning-tracker" (the-as pointer #x70004000)) + ) + (let ((t9-4 run-function-in-process) + (a0-5 sv-16) + (a1-5 lightning-tracker-init) + (a3-3 0) + (t0-1 lightning-probe-callback) + (t2-1 256) + (t3-0 256) + ) + ((the-as (function object object object object object object object object none) t9-4) + a0-5 + a1-5 + sv-32 + a3-3 + t0-1 + sv-48 + t2-1 + t3-0 + ) + ) + (-> sv-16 ppointer) + ) + ) + ) + (when s1-0 + (let ((t9-5 sp-launch-particles-var) + (a0-6 *sp-particle-system-2d*) + (a2-4 *launch-matrix*) + ) + (set! (-> a2-4 trans quad) (-> s4-0 quad)) + (t9-5 a0-6 s1-0 a2-4 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + (when s3-0 + (let ((t9-6 sp-launch-particles-var) + (a0-7 *sp-particle-system-2d*) + (a2-5 *launch-matrix*) + ) + (set! (-> a2-5 trans quad) (-> s4-0 quad)) + (t9-6 a0-7 s3-0 a2-5 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + (when (and gp-0 s2-0) + (let ((v1-13 (get-field-spec-by-id gp-0 (sp-field-id spt-timer)))) + (if v1-13 + (set! (-> v1-13 initial-valuef) (the-as float (-> (the-as lightning-tracker (-> s2-0 0)) duration))) + ) + ) + (let ((t9-8 sp-launch-particles-var) + (a0-12 *sp-particle-system-2d*) + (a1-13 gp-0) + (a2-6 *launch-matrix*) + ) + (set! (-> a2-6 trans quad) (-> s4-0 quad)) + (t9-8 a0-12 a1-13 a2-6 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (let ((t9-9 sp-launch-particles-var) + (a0-13 *sp-particle-system-2d*) + (a2-7 *launch-matrix*) + ) + (set! (-> a2-7 trans quad) (-> s5-0 quad)) + (t9-9 a0-13 gp-0 a2-7 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defstate fizzle (gun-dark-shot) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 1)) + (deactivate self) + ) + (process-drawable-shock-effect-replace + self + (-> *lightning-spec-id-table* 15) + lightning-probe-callback + 256 + 0 + 40960.0 + ) + (launch-particles (-> *part-id-table* 255) (-> self root trans)) + (launch-particles (-> *part-id-table* 257) (-> self root trans)) + (let ((gp-0 (-> *part-id-table* 665))) + (when gp-0 + (let ((v1-13 (get-field-spec-by-id gp-0 (sp-field-id spt-timer)))) + (if v1-13 + (set! (-> v1-13 initial-valuef) (the-as float #xf)) + ) + ) + (let ((t9-5 sp-launch-particles-var) + (a0-8 *sp-particle-system-2d*) + (a2-3 *launch-matrix*) + ) + (set! (-> a2-3 trans quad) (-> self root trans quad)) + (t9-5 a0-8 gp-0 a2-3 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ) + :code sleep-code + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior gun-dark-shot-init-fizzle gun-dark-shot ((arg0 vector)) + (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-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 crate civilian enemy obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set! (-> v1-6 prim-core action) (collide-action solid)) + (set-vector! (-> v1-6 local-sphere) 0.0 5324.8 0.0 5324.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! (-> s5-0 max-iteration-count) (the-as uint 2)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> self root) s5-0) + ) + (set! (-> self root trans quad) (-> arg0 quad)) + (let ((v1-16 (-> self root root-prim))) + (set! (-> v1-16 prim-core collide-as) (collide-spec)) + (set! (-> v1-16 prim-core collide-with) (collide-spec)) + ) + 0 + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual fizzle) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod do-camera-shake ((this gun-dark-3-nuke)) + (when (not (-> this shook-camera?)) + (activate! *camera-smush-control* 1228.8 45 1275 1.0 0.9 (-> *display* camera-clock)) + (set! (-> this shook-camera?) #t) + ) + (none) + ) + +(defmethod projectile-method-40 ((this gun-dark-shot)) + 512 + ) + +(defstate impact (gun-dark-shot) + :virtual #t + :enter (behavior () + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.2)) + (let ((t9-1 (-> (method-of-type projectile impact) enter))) + (if t9-1 + (t9-1) + ) + ) + (set! (-> self result-count) 0) + (set! (-> self spread-timer) 0) + (if (not (time-elapsed? (-> self spawn-time) (seconds 0.1))) + (send-event (ppointer->process (-> self parent)) 'release) + ) + (sound-stop (-> self trail-sound)) + (case (get-status *gui-control* (-> self explode-sound)) + (((gui-status ready)) + (set-action! + *gui-control* + (gui-action play) + (-> self explode-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (else + (set-action! + *gui-control* + (gui-action stop) + (-> self explode-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (sound-play "explosion" :pitch 2.5) + ) + ) + (let ((v1-23 (-> self root root-prim))) + (set! (-> v1-23 prim-core collide-as) (collide-spec)) + (set! (-> v1-23 prim-core collide-with) (collide-spec)) + ) + 0 + (cond + ((logtest? (-> *part-group-id-table* 93 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* 93)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 93)) + ) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> self root trans quad)) + (let ((gp-3 (the-as (array float) (new 'stack 'boxed-array float 16))) + (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) 'get-vehicle) + (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)) + (let* ((s1-0 (-> s3-0 s2-0)) + (v1-66 (if (type? s1-0 collide-shape) + s1-0 + ) + ) + ) + (when v1-66 + (let* ((s0-0 (-> v1-66 process)) + (s1-1 (if (type? s0-0 process-focusable) + s0-0 + ) + ) + ) + (when s1-1 + (when (and (nonzero? (-> (the-as process-focusable s1-1) root root-prim prim-core collide-as)) + (logtest? (process-mask crate enemy guard vehicle civilian kg-robot metalhead) (-> s1-1 mask)) + (not (focus-test? (the-as process-focusable s1-1) disable dead ignore)) + (!= s1-1 s5-1) + ) + (let* ((s0-1 (get-trans (the-as process-focusable s1-1) 3)) + (f0-2 (vector-vector-distance-squared (-> self root trans) s0-1)) + (f1-0 (-> s0-1 w)) + (f0-3 (- f0-2 (* f1-0 f1-0))) + (v1-80 (+ (-> self result-count) -1)) + ) + (while (and (>= v1-80 0) (< f0-3 (-> gp-3 v1-80))) + (when (< v1-80 15) + (set! (-> gp-3 (+ v1-80 1)) (-> gp-3 v1-80)) + (set! (-> self result-array (+ v1-80 1)) (-> self result-array v1-80)) + ) + (+! v1-80 -1) + ) + (when (< v1-80 15) + (let ((v1-81 (+ v1-80 1))) + (if (< (-> self result-count) 16) + (+! (-> self result-count) 1) + ) + (set! (-> gp-3 v1-81) f0-3) + (set! (-> self result-array v1-81) (process->handle s1-1)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (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) s4-0) (-> s4-0 w))) + (when (and (nonzero? (-> s3-1 control root-prim prim-core collide-as)) + (logtest? (process-mask crate enemy guard vehicle civilian kg-robot metalhead) (-> s3-1 mask)) + (not (focus-test? s3-1 disable dead ignore)) + (!= s3-1 s5-1) + ) + (let* ((s5-2 (get-trans s3-1 3)) + (f0-5 (vector-vector-distance-squared (-> self root trans) s5-2)) + (f1-6 (-> s5-2 w)) + (f0-6 (- f0-5 (* f1-6 f1-6))) + (v1-101 (+ (-> self result-count) -1)) + ) + (while (and (>= v1-101 0) (< f0-6 (-> gp-3 v1-101))) + (when (< v1-101 15) + (set! (-> gp-3 (+ v1-101 1)) (-> gp-3 v1-101)) + (set! (-> self result-array (+ v1-101 1)) (-> self result-array v1-101)) + ) + (+! v1-101 -1) + ) + (when (< v1-101 15) + (let ((v1-102 (+ v1-101 1))) + (if (< (-> self result-count) 16) + (+! (-> self result-count) 1) + ) + (set! (-> gp-3 v1-102) f0-6) + (set! (-> self result-array v1-102) (process->handle s3-1)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (if (zero? (-> self result-count)) + (go-virtual fizzle) + ) + (let ((gp-4 (handle->process (-> self result-array 0)))) + (deal-damage! self gp-4 (the-as event-message-block #f)) + (let ((s5-3 gp-4)) + (if (or (if (type? s5-3 crate) + s5-3 + ) + (let ((s5-4 gp-4)) + (if (type? s5-4 market-object) + s5-4 + ) + ) + (if (type? gp-4 fruit-stand) + gp-4 + ) + ) + (process-spawn gun-dark-shot :init gun-dark-shot-init-fizzle (-> self root trans) :name "gun-dark-shot") + ) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type projectile impact) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (and (> (-> self result-count) 0) (time-elapsed? (-> self spread-timer) (seconds 0.1))) + (set-time! (-> self spread-timer)) + (+! (-> self result-count) -1) + (while (and (>= (-> self result-count) 0) (not (handle->process (-> self result-array (-> self result-count))))) + (+! (-> self result-count) -1) + ) + (when (>= (-> self result-count) 0) + (let ((s5-0 (handle->process (-> self result-array (-> self result-count))))) + (if s5-0 + (process-spawn-function + process + (lambda :behavior process + ((arg0 handle) (arg1 float)) + (let* ((s3-0 (ppointer->process (-> self parent))) + (s5-0 (if (type? s3-0 process-focusable) + s3-0 + ) + ) + (s2-0 0) + (s1-0 (current-time)) + (s3-1 #f) + ) + (+! (-> self clock ref-count) -1) + (+! (-> s5-0 clock ref-count) 1) + (set! (-> self clock) (-> s5-0 clock)) + (while (and (nonzero? (-> (the-as process-focusable s5-0) skel)) + (or (focus-test? (the-as process-focusable s5-0) dead hit) + (and (-> (the-as process-focusable s5-0) next-state) + (= (-> (the-as process-focusable s5-0) next-state name) 'knocked) + ) + (not (time-elapsed? s1-0 (seconds 0.35))) + ) + (not (time-elapsed? s1-0 (seconds 5))) + (not (logtest? (-> (the-as process-focusable s5-0) draw status) (draw-control-status no-draw no-draw-temp))) + (or (not (and (-> (the-as process-focusable s5-0) next-state) + (= (-> (the-as process-focusable s5-0) next-state name) 'fizzle) + ) + ) + (not (type? s5-0 missile-bot)) + ) + ) + (when (time-elapsed? (the-as time-frame s2-0) (seconds 0.05)) + (set! s2-0 (the-as int (current-time))) + (let ((a0-5 (handle->process arg0))) + (if a0-5 + (process-drawable-shock-effect-bullseye + (the-as process-focusable a0-5) + (the-as process-focusable s5-0) + (-> *lightning-spec-id-table* 16) + lightning-probe-callback + (-> *part-id-table* 665) + (-> *part-id-table* 255) + (-> *part-id-table* 257) + ) + ) + ) + (process-drawable-shock-effect-replace + (the-as process-drawable s5-0) + (-> *lightning-spec-id-table* 15) + lightning-probe-callback + 0 + 0 + 40960.0 + ) + ) + (suspend) + (let ((s5-1 (ppointer->process (-> self parent)))) + (set! s5-0 (if (type? s5-1 process-focusable) + s5-1 + ) + ) + ) + (when (and (not s3-1) (time-elapsed? s1-0 (seconds 0.1)) (!= s5-0 (handle->process arg0))) + (set! s3-1 #t) + (send-event + s5-0 + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 16.0) (vehicle-damage-factor arg1) (vehicle-impulse-factor 1.0) (mode 'explode)) + ) + ) + ) + ) + (+! (-> *game-info* shots-hit 3) 1.0) + (when (and (not s3-1) (!= s5-0 (handle->process arg0))) + #t + (send-event + s5-0 + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 16.0) (vehicle-damage-factor arg1) (vehicle-impulse-factor 1.0) (mode 'explode)) + ) + ) + ) + ) + ) + (-> self result-array 0) + (-> self vehicle-damage-factor) + :to s5-0 + ) + ) + ) + ) + ) + (if (or (time-elapsed? (-> self spread-timer) (seconds 10)) + (and (not (-> self child)) + (= (get-status *gui-control* (-> self explode-sound)) (gui-status unknown)) + (< (-> self result-count) 0) + ) + ) + (deactivate self) + ) + ) + :code sleep-code + ) + +(deftype gravity-spinner (process) + ((cached-damage float) + (end-time time-frame) + (time-subtract time-frame) + (parent-hand handle) + (rotation-accel vector :inline) + (original-sphere-offset sphere :inline) + (obj-radius float) + (was-hit-previously? symbol) + (ground-height float) + (next-ground-probe-time time-frame) + ) + (:state-methods + zero-g + zero-g-vehicle + ) + (:methods + (gravity-spinner-method-16 (_type_ vector vector) none) + (update-rotation (_type_ symbol) none) + (gravity-spinner-method-18 (_type_ process) float) + (handle-impact (_type_ symbol) vector) + (probe-ground (_type_) none) + (get-float-speed (_type_) float) + (gravity-spinner-method-22 (_type_) none) + (spawn-part (_type_) none) + (rotate! (_type_ quaternion) none) + ) + ) + + +(defmethod relocate ((this gravity-spinner) (offset int)) + (call-parent-method this offset) + ) + +(defmethod deactivate ((this gravity-spinner)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (call-parent-method this) + (none) + ) + +(defmethod gravity-spinner-method-18 ((this gravity-spinner) (arg0 process)) + 1.0 + ) + +(defmethod spawn-part ((this gravity-spinner)) + (when (zero? (mod (the-as int (rand-uint31-gen *random-generator*)) 5)) + (let* ((s5-0 (handle->process (-> this parent-hand))) + (gp-1 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when gp-1 + (when (and (-> (the-as process-focusable gp-1) node-list) (nonzero? (-> (the-as process-focusable gp-1) node-list))) + (let* ((v1-12 + (+ (mod + (the-as int (rand-uint31-gen *random-generator*)) + (+ (-> (the-as process-focusable gp-1) node-list length) -2) + ) + 2 + ) + ) + (v1-15 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> (the-as process-focusable gp-1) node-list data v1-12)) + ) + (t9-4 sp-launch-particles-var) + (a0-9 *sp-particle-system-2d*) + (a1-5 (-> *part-id-table* 398)) + (a2-0 *launch-matrix*) + ) + (set! (-> a2-0 trans quad) (-> v1-15 quad)) + (t9-4 a0-9 a1-5 a2-0 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod gravity-spinner-method-22 ((this gravity-spinner)) + (local-vars (a1-11 float)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + ) + (init-vf0-vector) + (let* ((gp-0 (handle->process (-> this parent-hand))) + (s3-0 (if (type? gp-0 process-focusable) + gp-0 + ) + ) + ) + (when s3-0 + (let* ((gp-1 (-> (the-as process-focusable s3-0) root)) + (s5-0 (-> gp-1 root-prim)) + (s4-0 (-> gp-1 process node-list)) + (v1-5 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> (the-as process-focusable s3-0) root quat))) + ) + (set! (-> v1-5 trans quad) (-> (the-as process-focusable s3-0) root trans quad)) + (when (nonzero? s4-0) + (countdown (a0-7 (-> gp-1 total-prims)) + (when (and (= (-> s5-0 transform-index) -2) (!= s5-0 (-> gp-1 root-prim))) + (.lvf vf5 (&-> v1-5 trans quad)) + (.lvf vf1 (&-> s5-0 local-sphere quad)) + (.lvf vf2 (&-> v1-5 rvec quad)) + (.mul.w.vf acc vf5 vf0) + (.div.vf Q vf0 vf5 :fsf #b11 :ftf #b11) + (.lvf vf3 (&-> v1-5 uvec quad)) + (.add.mul.x.vf acc vf2 vf1 acc) + (.lvf vf4 (&-> v1-5 fvec quad)) + (.add.mul.y.vf acc vf3 vf1 acc) + (.add.mul.z.vf vf1 vf4 vf1 acc :mask #b111) + (.mul.vf vf1 vf1 Q :mask #b111) + (.svf (&-> s5-0 prim-core world-sphere quad) vf1) + (.mov a1-11 vf1) + ) + (&+! s5-0 80) + ) + ) + ) + ) + ) + (none) + ) + ) + +(defmethod get-float-speed ((this gravity-spinner)) + (let* ((s4-0 (handle->process (-> this parent-hand))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when s5-0 + (let ((f0-2 (- (- (-> (get-trans (the-as process-focusable s5-0) 3) y) + (-> (the-as process-focusable s5-0) root root-prim local-sphere w) + ) + (-> this ground-height) + ) + ) + ) + (cond + ((< f0-2 4096.0) + (* 10.0 (seconds-per-frame) (- 4096.0 f0-2)) + ) + ((< 14336.0 f0-2) + (let* ((f0-5 (+ -14336.0 f0-2)) + (f0-7 (* f0-5 f0-5)) + (f0-9 (* 0.00008138021 (- f0-7))) + (f0-10 (fmax -61440.0 f0-9)) + ) + (* 10.0 (seconds-per-frame) f0-10) + ) + ) + (else + 0.0 + ) + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod probe-ground ((this gravity-spinner)) + (let* ((s4-0 (handle->process (-> this parent-hand))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when s5-0 + (let ((s4-1 (get-trans (the-as process-focusable s5-0) 3)) + (s3-0 (new 'stack-no-clear 'collide-query)) + ) + 0.0 + (vector+float*! (-> s3-0 start-pos) s4-1 *up-vector* 24576.0) + (set! (-> s3-0 move-dist quad) (the-as uint128 0)) + (set! (-> s3-0 move-dist y) -81920.0) + (let ((v1-8 s3-0)) + (set! (-> v1-8 radius) 40.96) + (set! (-> v1-8 collide-with) (collide-spec backgnd)) + (set! (-> v1-8 ignore-process0) #f) + (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)) + ) + (set! (-> this ground-height) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* s3-0) 0.0) + (-> s3-0 best-other-tri intersect y) + (fmin + (- (-> s4-1 y) (-> (the-as process-focusable s5-0) root root-prim local-sphere w)) + (-> (target-pos 0) y) + ) + ) + ) + ) + ) + ) + (none) + ) + +(define *gravity-origin-pos* (new 'static 'vector)) + +(defbehavior gravity-spinner-init-by-other gravity-spinner ((arg0 handle) (arg1 object) (arg2 time-frame)) + (stack-size-set! (-> self main-thread) 512) + (set! (-> self parent-hand) arg0) + (set! (-> self time-subtract) arg2) + (set! (-> self cached-damage) 0.0) + (set! (-> self was-hit-previously?) #f) + (let* ((s5-1 (handle->process (-> self parent-hand))) + (gp-1 (if (type? s5-1 process-focusable) + s5-1 + ) + ) + ) + (when gp-1 + (set! (-> self original-sphere-offset quad) + (-> (the-as process-focusable gp-1) root root-prim local-sphere quad) + ) + (set! (-> *gravity-origin-pos* quad) (-> (get-trans (the-as process-focusable gp-1) 3) quad)) + (iterate-prims + (-> (the-as process-focusable gp-1) root) + (lambda :behavior gravity-spinner + ((arg0 collide-shape-prim)) + (case (-> arg0 prim-core prim-type) + ((-1) + (set! (-> self obj-radius) + (fmax + (-> self obj-radius) + (+ (vector-vector-distance (the-as vector (-> arg0 prim-core)) *gravity-origin-pos*) + (-> arg0 prim-core world-sphere w) + ) + ) + ) + ) + ) + (none) + ) + ) + (set! (-> self obj-radius) + (fmin (-> self obj-radius) (-> (the-as process-focusable gp-1) root root-prim local-sphere w)) + ) + (when (not (logtest? (process-mask vehicle) (-> gp-1 mask))) + (set! (-> self obj-radius) (* 0.75 (-> self obj-radius))) + (set! (-> (the-as process-focusable gp-1) root root-prim local-sphere w) (-> self obj-radius)) + (set! (-> (the-as process-focusable gp-1) root root-prim prim-core world-sphere w) (-> self obj-radius)) + ) + (let* ((v1-23 (get-trans (the-as process-focusable gp-1) 3)) + (s5-4 (vector-! (new 'stack-no-clear 'vector) v1-23 (the-as vector arg1))) + (s4-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-1 quad) (-> v1-23 quad)) + (let* ((f0-8 (- (-> s5-4 y))) + (f0-9 (if (< f0-8 0.0) + (fmax f0-8 (-> (the-as process-focusable gp-1) root root-prim local-sphere w)) + (fmin f0-8 (-> (the-as process-focusable gp-1) root root-prim local-sphere w)) + ) + ) + ) + (+! (-> s4-1 y) f0-9) + ) + (vector+! + s5-4 + s5-4 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> (the-as process-focusable gp-1) root transv) 1.0) + ) + (let ((a0-17 s5-4)) + (set! (-> a0-17 quad) (-> s5-4 quad)) + (set! (-> a0-17 y) 0.0) + (vector-normalize! a0-17 1.0) + ) + (let* ((s3-1 vector-rotate-around-axis!) + (s2-2 s5-4) + (s1-0 s5-4) + (f30-0 -1820.4445) + (f28-0 3640.889) + (v1-39 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-40 (the-as number (logior #x3f800000 v1-39))) + ) + (s3-1 s2-2 (the-as quaternion s1-0) (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-40)))) *up-vector*) + ) + (let ((f0-18 (* 0.000061035156 (-> self obj-radius)))) + 0.0 + (let* ((f30-1 (lerp 1.0 0.2 f0-18)) + (s3-2 s5-4) + (s2-3 s5-4) + (f28-1 12288.0) + (f26-0 8192.0) + (v1-46 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-47 (the-as number (logior #x3f800000 v1-46))) + ) + (vector-float*! s3-2 s2-3 (* f30-1 (+ f28-1 (* f26-0 (+ -1.0 (the-as float v1-47)))))) + ) + ) + (gravity-spinner-method-16 self s4-1 s5-4) + ) + (if (logtest? (process-mask vehicle) (-> gp-1 mask)) + (go-virtual zero-g-vehicle) + (go-virtual zero-g) + ) + ) + ) + ) + +(defmethod handle-impact ((this gravity-spinner) (arg0 symbol)) + (local-vars + (sv-144 sphere) + (sv-148 process) + (sv-152 vector) + (sv-156 float) + (sv-160 float) + (sv-164 vector) + (sv-168 symbol) + (sv-172 float) + (sv-1728 vector) + (sv-1732 vector) + (sv-1736 float) + (sv-2304 vector) + (sv-2308 vector) + (sv-2312 float) + ) + (let* ((s3-0 (handle->process (-> this parent-hand))) + (s5-0 (if (type? s3-0 process-focusable) + s3-0 + ) + ) + ) + (when s5-0 + (set! sv-144 (new 'stack 'sphere)) + (set! sv-148 (the-as process (send-event *target* 'get-vehicle))) + (let ((v1-7 (new 'stack-no-clear 'vector))) + (set! (-> v1-7 quad) (-> (the-as process-focusable s5-0) root transv quad)) + (set! sv-152 v1-7) + ) + (set! sv-156 (the-as float 0.0)) + (set! sv-160 (the-as float 102400.0)) + (set! sv-164 (new 'stack-no-clear 'vector)) + (set! sv-168 (the-as symbol #f)) + (set! sv-172 (the-as float 40960000.0)) + (if arg0 + (set! sv-160 (the-as float 163840.0)) + ) + (set! sv-156 (vector-normalize-ret-len! sv-152 1.0)) + (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)) + (let* ((s1-0 (-> s3-2 s2-0)) + (a0-15 (if (type? s1-0 collide-shape) + s1-0 + ) + ) + ) + (when a0-15 + (let* ((s1-1 (-> a0-15 process)) + (a0-17 (if (type? s1-1 process-focusable) + s1-1 + ) + ) + ) + (when a0-17 + (when (and (!= s5-0 a0-17) + (not (focus-test? (the-as process-focusable a0-17) disable dead inactive gun-no-target)) + (logtest? (process-mask enemy guard civilian) (-> a0-17 mask)) + (not (focus-test? (the-as process-focusable a0-17) no-gravity)) + (!= a0-17 sv-148) + ) + (set! sv-1728 (get-trans (the-as process-focusable a0-17) 3)) + (set! sv-1732 (new 'stack-no-clear 'vector)) + (set! sv-1736 (the-as float 0.0)) + (vector-! sv-1732 sv-1728 (the-as vector sv-144)) + (set! sv-1736 (vector-normalize-ret-len! sv-1732 1.0)) + (when (and (>= sv-160 sv-1736) (< sv-1736 sv-172) (< sv-1736 (* 4.5 sv-156))) + (let ((f30-0 (vector-dot sv-152 sv-1732)) + (f0-12 0.707) + ) + (if arg0 + (set! f0-12 0.5) + ) + (when (< f0-12 f30-0) + (let ((a1-19 (new 'stack 'collide-query))) + (set! (-> a1-19 start-pos quad) (-> sv-144 quad)) + (vector-! (-> a1-19 move-dist) sv-1728 (-> a1-19 start-pos)) + (let ((v1-53 a1-19)) + (set! (-> v1-53 radius) (* 0.8 (-> (the-as process-focusable s5-0) root root-prim prim-core world-sphere w))) + (set! (-> v1-53 collide-with) (collide-spec backgnd obstacle)) + (set! (-> v1-53 ignore-process0) #f) + (set! (-> v1-53 ignore-process1) #f) + (set! (-> v1-53 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-53 action-mask) (collide-action solid)) + ) + (when (< (fill-and-probe-using-line-sphere *collide-cache* a1-19) 0.0) + (set! sv-172 (* sv-1736 (* f30-0 f30-0))) + (set! sv-168 #t) + (let ((f0-18 sv-156)) + (when arg0 + (set! f0-18 (fmin (fmax sv-156 (* 1.5 sv-1736)) (* 3.0 sv-156))) + (if (-> this was-hit-previously?) + (set! f0-18 (fmin f0-18 (* 2.0 sv-156))) + ) + ) + (vector-normalize-copy! sv-164 sv-1732 f0-18) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let* ((s2-1 *target*) + (s3-3 (if (type? s2-1 process-focusable) + s2-1 + ) + ) + ) + (when (and s3-3 (< (vector-vector-distance (get-trans s3-3 0) sv-144) (-> sv-144 r))) + (when (and (!= s5-0 s3-3) + (not (focus-test? s3-3 disable dead inactive gun-no-target)) + (logtest? (process-mask enemy guard civilian) (-> s3-3 mask)) + (not (focus-test? s3-3 no-gravity)) + (!= s3-3 sv-148) + ) + (set! sv-2304 (get-trans s3-3 3)) + (set! sv-2308 (new 'stack-no-clear 'vector)) + (set! sv-2312 (the-as float 0.0)) + (vector-! sv-2308 sv-2304 (the-as vector sv-144)) + (set! sv-2312 (vector-normalize-ret-len! sv-2308 1.0)) + (when (and (>= sv-160 sv-2312) (< sv-2312 sv-172) (< sv-2312 (* 4.5 sv-156))) + (let ((f30-1 (vector-dot sv-152 sv-2308)) + (f0-28 0.707) + ) + (if arg0 + (set! f0-28 0.5) + ) + (when (< f0-28 f30-1) + (let ((a1-29 (new 'stack 'collide-query))) + (set! (-> a1-29 start-pos quad) (-> sv-144 quad)) + (vector-! (-> a1-29 move-dist) sv-2304 (-> a1-29 start-pos)) + (let ((v1-103 a1-29)) + (set! (-> v1-103 radius) (* 0.8 (-> (the-as process-focusable s5-0) root root-prim prim-core world-sphere w))) + (set! (-> v1-103 collide-with) (collide-spec backgnd obstacle)) + (set! (-> v1-103 ignore-process0) #f) + (set! (-> v1-103 ignore-process1) #f) + (set! (-> v1-103 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-103 action-mask) (collide-action solid)) + ) + (when (< (fill-and-probe-using-line-sphere *collide-cache* a1-29) 0.0) + (set! sv-172 (* sv-2312 (* f30-1 f30-1))) + (set! sv-168 #t) + (let ((f0-34 sv-156)) + (when arg0 + (set! f0-34 (fmin (fmax sv-156 (* 1.5 sv-2312)) (* 3.0 sv-156))) + (if (-> this was-hit-previously?) + (set! f0-34 (fmin f0-34 (* 2.0 sv-156))) + ) + ) + (vector-normalize-copy! sv-164 sv-2308 f0-34) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (when sv-168 + (let ((v0-1 (-> (the-as process-focusable s5-0) root transv))) + (set! (-> v0-1 quad) (-> sv-164 quad)) + v0-1 + ) + ) + ) + ) + ) + +(defmethod gravity-spinner-method-16 ((this gravity-spinner) (arg0 vector) (arg1 vector)) + (local-vars (sv-48 vector) (sv-52 vector) (sv-56 float)) + (let* ((s2-0 (handle->process (-> this parent-hand))) + (s4-0 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (when s4-0 + (set! sv-48 (vector-! (new 'stack-no-clear 'vector) arg0 (get-trans (the-as process-focusable s4-0) 3))) + (set! sv-52 (new 'stack-no-clear 'vector)) + (let ((f30-0 1.0) + (f0-0 (gravity-spinner-method-18 this s4-0)) + (f1-1 (fmin 12288.0 (-> (the-as process-focusable s4-0) root root-prim prim-core world-sphere w))) + ) + (set! sv-56 (/ f30-0 (* f0-0 (* f1-1 f1-1)))) + ) + (vector-cross! sv-52 sv-48 arg1) + (vector+float*! (-> this rotation-accel) (-> this rotation-accel) sv-52 sv-56) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch quaternion vs none. +(defmethod rotate! ((this gravity-spinner) (arg0 quaternion)) + (let* ((s4-0 (handle->process (-> this parent-hand))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when s5-0 + (let* ((s4-1 (get-trans (the-as process-focusable s5-0) 3)) + (s3-1 (vector-! (new 'stack-no-clear 'vector) (-> (the-as process-focusable s5-0) root trans) s4-1)) + ) + (let ((s2-0 (new 'stack-no-clear 'matrix))) + (quaternion->matrix s2-0 arg0) + (vector-matrix*! s3-1 s3-1 s2-0) + ) + (set! (-> (the-as process-focusable s5-0) root root-prim local-sphere x) (- (-> s3-1 x))) + (set! (-> (the-as process-focusable s5-0) root root-prim local-sphere y) (- (-> s3-1 y))) + (set! (-> (the-as process-focusable s5-0) root root-prim local-sphere z) (- (-> s3-1 z))) + (vector+! (-> (the-as process-focusable s5-0) root trans) s4-1 s3-1) + ) + (quaternion*! + (-> (the-as process-focusable s5-0) root quat) + arg0 + (-> (the-as process-focusable s5-0) root quat) + ) + (quaternion-normalize! (-> (the-as process-focusable s5-0) root quat)) + ) + ) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod update-rotation ((this gravity-spinner) (arg0 symbol)) + (cond + ((< (current-time) (+ (-> this end-time) (seconds -0.2))) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (set! (-> s5-1 quad) (-> this rotation-accel quad)) + 0.0 + (let* ((f0-1 (vector-normalize-ret-len! s5-1 1.0)) + (f0-2 (* 182.04445 f0-1)) + (f0-3 (* 360.0 f0-2)) + (f0-4 (* 0.2 f0-3)) + (f30-0 (fmin 116508.445 f0-4)) + (s4-0 (handle->process (-> this parent-hand))) + ) + (if (if (type? s4-0 process-focusable) + s4-0 + ) + (rotate! this (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) s5-1 (* f30-0 (seconds-per-frame)))) + ) + ) + ) + (if (< 0.2 (vector-length (-> this rotation-accel))) + (vector-float*! (-> this rotation-accel) (-> this rotation-accel) (- 1.0 (* 0.2 (seconds-per-frame)))) + ) + ) + (else + (let* ((s3-1 (handle->process (-> this parent-hand))) + (s4-2 (if (type? s3-1 process-focusable) + s3-1 + ) + ) + ) + (when s4-2 + (let ((s2-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> (the-as process-focusable s4-2) root quat))) + (s3-2 (new 'stack-no-clear 'quaternion)) + (f30-1 (* 4.0 (seconds-per-frame))) + ) + (let ((a0-18 s2-0)) + (set! (-> a0-18 quad) (-> s2-0 quad)) + (set! (-> a0-18 y) 0.0) + (vector-normalize! a0-18 1.0) + ) + (quaternion-look-at! s3-2 s2-0 *up-vector*) + (let ((s2-1 (quaternion-copy! (new 'stack-no-clear 'quaternion) (-> (the-as process-focusable s4-2) root quat)))) + (if arg0 + (quaternion-copy! s2-1 s3-2) + (quaternion-slerp! s2-1 s2-1 s3-2 f30-1) + ) + (let ((a1-16 + (quaternion*! + (new 'stack-no-clear 'quaternion) + s2-1 + (quaternion-inverse! (new 'stack-no-clear 'quaternion) (-> (the-as process-focusable s4-2) root quat)) + ) + ) + ) + (rotate! this a1-16) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +(defstate zero-g-vehicle (gravity-spinner) + :virtual #t + :enter (behavior () + (let* ((gp-0 (current-time)) + (f30-0 300.0) + (f28-0 6.0) + (f26-0 2.0) + (v1-5 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-6 (the-as number (logior #x3f800000 v1-5))) + ) + (set! (-> self end-time) + (+ gp-0 + (the int + (* f30-0 + (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-6)))) + (if (logtest? (game-secrets gun-upgrade-dark-2) (-> *game-info* secrets)) + 1.5 + 1.0 + ) + ) + ) + ) + ) + ) + (set! (-> self end-time) (- (-> self end-time) (-> self time-subtract))) + (set! (-> self end-time) (the-as time-frame (max (-> self end-time) (+ (current-time) (seconds 2))))) + (send-event + (handle->process (-> self parent-hand)) + 'attack + #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) + (mode 'eco-dark) + (attacker-velocity *zero-vector*) + (penetrate-using (penetrate explode jak-dark-blackhole)) + ) + ) + ) + ) + :code (behavior () + (until (< (-> self end-time) (current-time)) + (suspend) + ) + (let* ((f0-1 (+ 0.5 (* 0.0625 (-> self cached-damage)))) + (f0-2 (fmin 0.9 f0-1)) + ) + (send-event (handle->process (-> self parent-hand)) 'gun-dark-2-off f0-2) + ) + (let ((gp-0 (handle->process (-> self parent-hand)))) + (if (if (type? gp-0 process-focusable) + gp-0 + ) + (send-event + (handle->process (-> self parent-hand)) + 'attack + #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) + (penetrate-using (penetrate vehicle)) + (vector *zero-vector*) + (attacker-velocity *zero-vector*) + (mode 'gravity-end) + ) + ) + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch int vs object. +(defbehavior zero-g-wait-for-land gravity-spinner () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1.5)) + (let* ((s4-0 (handle->process (-> self parent-hand))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (cond + ((and s5-0 + (not (logtest? (-> (the-as process-focusable s5-0) focus-status) (focus-status disable dead inactive))) + ) + (if (or (< (- (-> (get-trans (the-as process-focusable s5-0) 3) y) + (-> (the-as process-focusable s5-0) root root-prim local-sphere w) + ) + (-> self ground-height) + ) + (let ((s4-1 (-> (the-as process-focusable s5-0) root))) + (and (if (type? s4-1 collide-shape-moving) + s4-1 + ) + (logtest? (-> (the-as collide-shape-moving (-> (the-as process-focusable s5-0) root)) status) + (collide-status on-surface touch-surface) + ) + ) + ) + ) + (return (the-as object 0)) + ) + (when (not (logtest? (process-mask vehicle) (-> (the-as process-focusable s5-0) mask))) + (let ((s4-2 (new 'stack 'sphere))) + (vector-lerp! + s4-2 + (-> (the-as process-focusable s5-0) root root-prim local-sphere) + (-> self original-sphere-offset) + (* 3.0 (seconds-per-frame)) + ) + (set! (-> s4-2 r) (lerp + (-> (the-as process-focusable s5-0) root root-prim local-sphere w) + (-> self original-sphere-offset r) + (* 3.0 (seconds-per-frame)) + ) + ) + (set! (-> (the-as process-focusable s5-0) root root-prim local-sphere quad) (-> s4-2 quad)) + ) + (if (>= (+ (current-time) (seconds -1)) gp-0) + (set! (-> (the-as process-focusable s5-0) root root-prim local-sphere quad) + (-> self original-sphere-offset quad) + ) + ) + ) + ) + (else + (return (the-as object 0)) + ) + ) + ) + (suspend) + ) + ) + (the-as int #f) + ) + +(define *zero-g-fake-attack-vec* (new 'static 'vector :y -0.001 :w 1.0)) + +(defstate zero-g (gravity-spinner) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (sv-32 vector) (sv-36 float) (sv-40 uint) (sv-48 uint)) + (case message + (('get-float-speed) + (get-float-speed self) + ) + (('update-rotation) + (update-rotation self #f) + ) + (('impact) + (handle-impact self #f) + (let ((s5-1 (handle->process (-> self parent-hand)))) + (when (if (type? s5-1 process-focusable) + s5-1 + ) + (let ((f0-0 (vector-length (the-as vector (-> block param 1))))) + 0.0 + (when (< 40960.0 f0-0) + (let ((f30-0 (* 0.000024414063 f0-0))) + (format 0 "Receving impact damage ~f~%" f30-0) + (+! (-> self cached-damage) f30-0) + ) + ) + ) + ) + ) + (gravity-spinner-method-16 self (the-as vector (-> block param 0)) (the-as vector (-> block param 1))) + ) + (('is-gravity) + #t + ) + (('attack-forward) + (if (!= proc (handle->process (-> self parent-hand))) + (return 0) + ) + (set! sv-32 (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> block param 0)) 1.0)) + (set! sv-36 (the-as float 0.0)) + (set! sv-40 (-> block param 2)) + (set! sv-48 (-> block param 3)) + (set! sv-36 (if (logtest? (attack-mask damage) (-> (the-as attack-info sv-40) mask)) + (-> (the-as attack-info sv-40) damage) + (penetrate-using->damage (the-as penetrate sv-48)) + ) + ) + (vector-float*! sv-32 sv-32 (fmin 184320.0 (vector-length (the-as vector (-> block param 4))))) + (if (!= sv-48 1024) + (vector-float*! sv-32 sv-32 (* 2.0 sv-36)) + ) + (set! (-> sv-32 y) (* 0.15 (-> sv-32 y))) + (+! (-> self cached-damage) sv-36) + (let ((s4-0 (if (type? proc process-focusable) + proc + ) + ) + ) + (when s4-0 + (vector-float*! sv-32 sv-32 (fmax 0.5 (gravity-spinner-method-18 self s4-0))) + (vector+float*! + (-> (the-as process-drawable s4-0) root transv) + (-> (the-as process-drawable s4-0) root transv) + sv-32 + 1.0 + ) + (let ((f0-17 (vector-normalize-ret-len! (-> (the-as process-drawable s4-0) root transv) 1.0))) + (vector-float*! + (-> (the-as process-drawable s4-0) root transv) + (-> (the-as process-drawable s4-0) root transv) + (fmin 143360.0 f0-17) + ) + ) + (handle-impact self #t) + (gravity-spinner-method-16 self (the-as vector (-> block param 5)) sv-32) + ) + ) + (when (< 0.0 sv-36) + (let ((v0-0 (the-as object #t))) + (set! (-> self was-hit-previously?) (the-as symbol v0-0)) + v0-0 + ) + ) + ) + ) + ) + :enter (behavior () + (let* ((gp-0 (current-time)) + (f30-0 300.0) + (f28-0 7.0) + (f26-0 2.0) + (v1-5 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-6 (the-as number (logior #x3f800000 v1-5))) + ) + (set! (-> self end-time) + (+ gp-0 + (the int + (* f30-0 + (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-6)))) + (if (logtest? (game-secrets gun-upgrade-dark-2) (-> *game-info* secrets)) + 1.5 + 1.0 + ) + ) + ) + ) + ) + ) + (set! (-> self end-time) (- (-> self end-time) (-> self time-subtract))) + (set! (-> self end-time) (the-as time-frame (max (-> self end-time) (+ (current-time) (seconds 2))))) + (send-event + (handle->process (-> self parent-hand)) + 'attack + #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) + (mode 'eco-dark) + (attacker (process->handle *target*)) + (attacker-velocity *zero-vector*) + (penetrate-using (penetrate explode jak-dark-blackhole)) + ) + ) + ) + ) + :code (behavior () + (until (< (-> self end-time) (current-time)) + (when (< (-> self next-ground-probe-time) (current-time)) + (probe-ground self) + (set! (-> self next-ground-probe-time) + (the-as time-frame (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 61) 60 (current-time))) + ) + ) + (suspend) + ) + (send-event (handle->process (-> self parent-hand)) 'gun-dark-2-off) + (let* ((s5-0 (handle->process (-> self parent-hand))) + (gp-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when gp-0 + (update-rotation self #t) + (quaternion-normalize! (-> (the-as process-focusable gp-0) root quat)) + (send-event + (handle->process (-> self parent-hand)) + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) + (damage 0.2) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (penetrate-using (penetrate vehicle)) + (vector (-> (the-as process-focusable gp-0) root transv)) + (attacker-velocity (-> (the-as process-focusable gp-0) root transv)) + (mode 'gravity-end) + (attacker (process->handle *target*)) + ) + ) + ) + (let ((f0-5 + (- (- (-> (get-trans (the-as process-focusable gp-0) 3) y) + (-> (the-as process-focusable gp-0) root root-prim local-sphere w) + ) + (-> self ground-height) + ) + ) + ) + 0.0 + (set! (-> self cached-damage) (* 2.0 (-> self cached-damage))) + (let* ((f0-6 (* 0.00012207031 f0-5)) + (f0-7 (fmax 1.0 f0-6)) + ) + (+! (-> self cached-damage) f0-7) + ) + ) + (let* ((gp-1 (-> (the-as process-focusable gp-0) root)) + (v1-37 (if (type? gp-1 collide-shape-moving) + gp-1 + ) + ) + ) + (if v1-37 + (logclear! (-> (the-as collide-shape-moving v1-37) status) (collide-status on-surface touch-surface)) + ) + ) + ) + ) + (probe-ground self) + (zero-g-wait-for-land) + (send-event + (handle->process (-> self parent-hand)) + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id)) + (damage (-> self cached-damage)) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (penetrate-using (penetrate vehicle)) + (vector *zero-g-fake-attack-vec*) + (attacker-velocity *zero-g-fake-attack-vec*) + (mode 'eco-dark) + (attacker (process->handle *target*)) + ) + ) + ) + (let* ((s5-1 (handle->process (-> self parent-hand))) + (gp-2 (if (type? s5-1 process-focusable) + s5-1 + ) + ) + ) + (when gp-2 + (set! (-> (the-as process-focusable gp-2) root root-prim local-sphere quad) + (-> self original-sphere-offset quad) + ) + (let ((s5-2 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> (the-as process-focusable gp-2) root quat)))) + (new 'stack-no-clear 'vector) + (let ((a0-67 s5-2)) + (set! (-> a0-67 quad) (-> s5-2 quad)) + (set! (-> a0-67 y) 0.0) + (vector-normalize! a0-67 1.0) + ) + (quaternion-look-at! (-> (the-as process-focusable gp-2) root quat) s5-2 *up-vector*) + ) + ) + ) + ) + :post (behavior () + (spawn-part self) + (if (>= (-> self end-time) (current-time)) + (gravity-spinner-method-22 self) + ) + ) + ) + +(defskelgroup skel-gun-dark-2-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 + ) + +(define *gun-gravity-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 614400.0) + :bot-plane (new 'static 'plane :y 1.0 :w 163840.0) + :top-plane (new 'static 'plane :y 1.0 :w -163840.0) + :shadow-type 2 + ) + ) + ) + +(deftype gravity-ring (process-drawable) + ((start-pos vector :inline) + (jmod-outer joint-mod-add-local :inline) + (jmod-inner joint-mod-add-local :inline) + (ring-scale-t float) + (current-radius float) + (max-radius float) + (reverse? symbol) + (total-time float) + (ring-width float) + (stop-time time-frame) + ) + (:state-methods + expand + ) + (:methods + (gravity-ring-method-21 (_type_) none) + ) + ) + + +(defbehavior gravity-ring-init-by-other gravity-ring ((arg0 vector) (arg1 symbol) (arg2 float) (arg3 float) (arg4 float) (arg5 time-frame)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-identity! (-> self root quat)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-gun-dark-2-ring" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self draw shadow-ctrl) *gun-gravity-shadow-control*) + (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)) + (let ((v1-13 (-> self draw shadow-ctrl))) + (logclear! (-> v1-13 settings flags) (shadow-flags disable-draw)) + ) + 0 + (logclear! (-> self draw status) (draw-control-status no-draw)) + (set! (-> self total-time) arg3) + (set! (-> self reverse?) arg1) + (set! (-> self max-radius) arg2) + (set! (-> self ring-width) arg4) + (+! (-> self root trans y) (-> self max-radius)) + (ja-post) + (setup-masks (-> self draw) 0 1) + (set-time! (-> self state-time)) + (set! (-> self stop-time) arg5) + (go-virtual expand) + ) + +(defstate expand (gravity-ring) + :virtual #t + :trans (behavior () + (gravity-ring-method-21 self) + ) + :code sleep-code + :post (behavior () + (ja-post) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod gravity-ring-method-21 ((this gravity-ring)) + (let* ((a0-1 *time-of-day-context*) + (v1-0 (-> a0-1 light-group)) + (s4-0 (-> v1-0 0 ambi color)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (-> a0-1 current-prt-color) + (-> a0-1 current-env-color) + (vector4-lerp! s5-0 (-> v1-0 0 dir0 color) (-> v1-0 0 dir1 color) (-> v1-0 0 dir1 extra x)) + (fmax (fmax (-> s4-0 x) (-> s4-0 y)) (-> s4-0 z)) + (fmax (fmax (-> s5-0 x) (-> s5-0 y)) (-> s5-0 z)) + (let* ((f0-10 (+ (* 0.2 (-> s4-0 x)) (* 0.75 (-> s4-0 y)) (* 0.05 (-> s4-0 z)))) + (f1-12 (+ (* 0.2 (-> s5-0 x)) (* 0.75 (-> s5-0 y)) (* 0.05 (-> s5-0 z)))) + (f0-12 (* 0.5 (+ f0-10 f1-12))) + (f30-0 (lerp-scale-clamp 0.0 1.0 f0-12 0.0 1.0)) + (s5-1 (new 'stack 'rgbaf)) + (s3-0 (new 'stack 'rgbaf)) + (s4-1 0) + ) + (cond + ((or (= (status-of-level-and-borrows *level* 'desert #f) 'active) + (= (status-of-level-and-borrows *level* 'waswide #f) 'active) + (= (status-of-level-and-borrows *level* 'wasdoors #f) 'active) + ) + (set-vector! s5-1 0.85 1.1 1.1 0.25) + ) + (else + (set-vector! s5-1 0.4 2.0 2.0 0.25) + (set-vector! s3-0 0.7 1.15 1.15 0.25) + (vector-lerp! s5-1 s5-1 s3-0 f30-0) + ) + ) + (set! (-> s5-1 w) 0.25) + (let ((t1-0 + (logior (logand (logior (logand (logior (logand (logior (logand s4-1 -256) (shr (shl (the int (* 127.5 (-> s5-1 x))) 56) 56)) -65281) + (shr (shl (the int (* 127.5 (-> s5-1 y))) 56) 48) + ) + -16711681 + ) + (shr (shl (the int (* 127.5 (-> s5-1 z))) 56) 40) + ) + (the-as uint #xffffffff00ffffff) + ) + (shr (shl (the int (* 127.5 (-> s5-1 w))) 56) 32) + ) + ) + ) + (set-setting! 'highlight-color #f 0.0 t1-0) + ) + ) + ) + (let* ((f0-38 (-> this total-time)) + (f24-0 (/ (* 0.0033333334 (the float (- (current-time) (-> this state-time)))) f0-38)) + ) + 0.0 + (let ((f30-1 (-> this ring-width)) + (f22-0 1.0) + ) + 1.0 + (let ((f26-0 1.1) + (f28-0 0.5) + ) + (set! (-> this max-radius) 102400.0) + (if (-> this reverse?) + (set! f24-0 (- 1.0 f24-0)) + ) + (if (time-elapsed? (-> this state-time) (the int (* 1800.0 f0-38))) + (set! f28-0 + (lerp + f28-0 + 0.0 + (fmax 0.0 (fmin 1.0 (- (* 0.0033333334 (the float (- (current-time) (-> this state-time)))) (* 6.0 f0-38)))) + ) + ) + ) + (if (= f28-0 0.0) + (go empty-state) + ) + (let ((f26-1 + (+ (-> this ring-scale-t) + (* (cond + ((time-elapsed? (-> this stop-time) (the int (* 300.0 f26-0))) + (let ((f1-27 1.0)) + (lerp + 0.5 + 0.05 + (fmax 0.0 (fmin 1.0 (/ (- (* 0.0033333334 (the float (- (current-time) (-> this stop-time)))) f26-0) f1-27))) + ) + ) + ) + ((>= f22-0 f24-0) + (lerp 2.3 0.4 (/ f24-0 f22-0)) + ) + (else + 0.4 + ) + ) + (seconds-per-frame) + ) + ) + ) + ) + (let ((f24-1 (* 0.00024414062 (* (-> this max-radius) f26-1)))) + 0.0 + 0.0 + 0.0 + (let* ((f0-56 f26-1) + (f0-57 (* f0-56 f0-56)) + (f1-33 (fmax (lerp f30-1 0.0 f0-57) f28-0)) + (f0-60 (fmax 0.0 (- f24-1 f1-33))) + ) + (set-vector! (-> this jmod-outer transform scale) f24-1 1.0 f24-1 1.0) + (set-vector! (-> this jmod-inner transform scale) f0-60 1.0 f0-60 1.0) + ) + ) + (set! (-> this ring-scale-t) f26-1) + ) + ) + ) + ) + (none) + ) + +(deftype gun-gravity (process-drawable) + ((current-radius float) + (max-radius float) + (lowest-y float) + (start-pos vector :inline) + (total-time float) + (ring-closest handle) + (ring-furthest handle) + (gravity-sound sound-id) + ) + (:state-methods + expand + ) + (:methods + (gun-gravity-method-21 (_type_) none) + (gun-gravity-method-22 (_type_ symbol) none) + (spawn-gravity-spinner (_type_ process) (pointer gravity-spinner)) + (gun-gravity-method-24 (_type_) none) + ) + ) + + +(defbehavior gun-gravity-init-by-other gun-gravity ((arg0 vector) (arg1 vector)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 quad)) + (let ((s4-0 (new 'stack-no-clear 'collide-query))) + 0.0 + (vector+float*! (-> s4-0 start-pos) (-> self root trans) *up-vector* 24576.0) + (set! (-> s4-0 move-dist quad) (the-as uint128 0)) + (set! (-> s4-0 move-dist y) -81920.0) + (let ((v1-7 s4-0)) + (set! (-> v1-7 radius) 40.96) + (set! (-> v1-7 collide-with) (collide-spec backgnd pusher)) + (set! (-> v1-7 ignore-process0) #f) + (set! (-> v1-7 ignore-process1) #f) + (set! (-> v1-7 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-7 action-mask) (collide-action solid)) + ) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* s4-0) 0.0) + (set! (-> self root trans y) (-> s4-0 best-other-tri intersect y)) + ) + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.2)) + (let ((s4-1 quaternion-look-at!) + (s3-0 (-> self root quat)) + (a0-12 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-12 quad) (-> arg1 quad)) + (set! (-> a0-12 y) 0.0) + (s4-1 s3-0 (vector-normalize! a0-12 1.0) *up-vector*) + ) + (set! (-> self max-radius) 122880.0) + (set! (-> self total-time) 1.0) + (if (logtest? (game-secrets gun-upgrade-dark-2) (-> *game-info* secrets)) + (set! (-> self total-time) (* 1.5 (-> self total-time))) + ) + (set! (-> self start-pos quad) (-> arg0 quad)) + (set! (-> self ring-closest) (the-as handle #f)) + (set! (-> self ring-furthest) (the-as handle #f)) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 118) self)) + (set! (-> self gravity-sound) (new-sound-id)) + (go-virtual expand) + ) + +(defmethod deactivate ((this gun-gravity)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this gravity-sound)) + (call-parent-method this) + (none) + ) + +(defstate expand (gun-gravity) + :virtual #t + :enter (behavior () + (set! (-> self lowest-y) (-> self root trans y)) + (set-time! (-> self state-time)) + (sound-play "grav-gun" :id (-> self gravity-sound) :position (-> self root trans)) + ) + :trans (behavior () + (cond + ((not (time-elapsed? (-> self state-time) (the int (* 300.0 (-> self total-time))))) + (let* ((f0-4 (* 0.0033333334 (the float (- (current-time) (-> self state-time))))) + (f1-3 (-> self total-time)) + (f0-6 (/ (- f0-4 (* (the float (the int (/ f0-4 f1-3))) f1-3)) (-> self total-time))) + ) + (set! (-> self current-radius) (* (-> self max-radius) f0-6)) + ) + (gun-gravity-method-22 self #f) + ) + (else + (if (not (time-elapsed? (-> self state-time) (the int (* 2025.0 (-> self total-time))))) + (gun-gravity-method-22 self #t) + ) + ) + ) + (cond + ((not (time-elapsed? (-> self state-time) (the int (* 2025.0 (-> self total-time))))) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> self root trans)))) + 0.0 + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((f0-16 (fmin (vector-normalize-ret-len! s5-1 1.0) (-> self current-radius)))) + (vector+float*! gp-0 (-> self root trans) s5-1 f0-16) + ) + (sound-play "grav-gun" :id (-> self gravity-sound) :position gp-0) + ) + ) + (dotimes (gp-1 6) + (let* ((s5-2 vector-rotate-around-y!) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-0 *x-vector*) + (f30-0 65536.0) + (v1-27 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-28 (the-as number (logior #x3f800000 v1-27))) + (s4-1 (s5-2 s4-0 s3-0 (* f30-0 (+ -1.0 (the-as float v1-28))))) + (s5-3 (new 'stack-no-clear 'vector)) + ) + 0.0 + 0.0 + (let* ((f30-1 (-> self current-radius)) + (f28-0 (fmax 0.0 (+ -40960.0 (-> self current-radius)))) + (s3-1 s5-3) + (s2-0 (-> self root trans)) + (v1-33 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-34 (the-as number (logior #x3f800000 v1-33))) + ) + (vector+float*! s3-1 s2-0 s4-1 (+ f28-0 (* (+ -1.0 (the-as float v1-34)) (- f30-1 f28-0)))) + ) + (let ((s4-2 (new 'stack-no-clear 'collide-query))) + 0.0 + (vector+float*! (-> s4-2 start-pos) s5-3 *up-vector* 24576.0) + (set! (-> s4-2 move-dist quad) (the-as uint128 0)) + (set! (-> s4-2 move-dist y) -81920.0) + (let ((v1-40 s4-2)) + (set! (-> v1-40 radius) 40.96) + (set! (-> v1-40 collide-with) (collide-spec backgnd pusher)) + (set! (-> v1-40 ignore-process0) #f) + (set! (-> v1-40 ignore-process1) #f) + (set! (-> v1-40 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-40 action-mask) (collide-action solid)) + ) + (when (>= (fill-and-probe-using-line-sphere *collide-cache* s4-2) 0.0) + (let ((f30-2 (-> s4-2 best-other-tri intersect y)) + (a1-7 (matrix-identity! (new 'stack-no-clear 'matrix))) + ) + (set! (-> a1-7 trans quad) (-> s4-2 start-pos quad)) + (set! (-> a1-7 trans y) f30-2) + (spawn-from-mat (-> self part) a1-7) + ) + ) + ) + ) + ) + ) + (else + (sound-stop (-> self gravity-sound)) + ) + ) + ) + :code (behavior () + (let ((f30-0 4.0) + (gp-0 (current-time)) + ) + (until #f + (dotimes (s5-0 5) + (let ((v1-7 (ppointer->handle (process-spawn + gravity-ring + (-> self root trans) + #f + (-> self max-radius) + (-> self total-time) + f30-0 + gp-0 + :name "gravity-ring" + :to self + ) + ) + ) + (a0-6 s5-0) + ) + (cond + ((zero? a0-6) + (set! (-> self ring-furthest) (the-as handle v1-7)) + ) + ((= a0-6 4) + (set! (-> self ring-closest) (the-as handle v1-7)) + ) + ) + ) + (set! f30-0 (+ -0.6 f30-0)) + (let ((s4-1 (current-time))) + (until (time-elapsed? s4-1 (seconds 0.15)) + (suspend) + ) + ) + ) + (let ((s5-1 (current-time))) + (until (time-elapsed? s5-1 (seconds 13.5)) + (suspend) + ) + ) + (go empty-state) + (set! f30-0 4.0) + ) + ) + #f + ) + ) + +;; WARN: Return type mismatch (pointer process) vs (pointer gravity-spinner). +(defmethod spawn-gravity-spinner ((this gun-gravity) (arg0 process)) + (process-spawn + gravity-spinner + (process->handle arg0) + (-> this root trans) + (- (current-time) (-> this state-time)) + :name "gravity-spinner" + :to arg0 + ) + ) + +;; WARN: Return type mismatch (pointer gravity-spinner) vs none. +(defmethod gun-gravity-method-22 ((this gun-gravity) (arg0 symbol)) + (local-vars (v1-29 symbol) (v1-49 symbol)) + (with-pp + (let ((s5-0 (new 'stack-no-clear 'vector)) + (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) 'get-vehicle) + (let ((s4-0 (the-as process (send-event-function *target* a1-1))) + (f30-0 0.0) + (f28-0 (-> this current-radius)) + ) + (set! (-> s5-0 quad) (-> this root trans quad)) + (when arg0 + (let ((v1-5 (handle->process (-> this ring-closest)))) + (if v1-5 + (set! f30-0 (* (-> (the-as gravity-ring v1-5) max-radius) (-> (the-as gravity-ring v1-5) ring-scale-t))) + ) + ) + (let ((v1-8 (handle->process (-> this ring-furthest)))) + (if v1-8 + (set! f28-0 (* (-> (the-as gravity-ring v1-8) max-radius) (-> (the-as gravity-ring v1-8) ring-scale-t))) + ) + ) + (set! f28-0 (* 0.85 f28-0)) + (set! f30-0 (* 0.85 f30-0)) + (set! (-> this current-radius) (* 0.5 (+ f30-0 f28-0))) + ) + (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)) + (let* ((s1-0 (-> s3-1 s2-0)) + (v1-17 (if (type? s1-0 collide-shape) + s1-0 + ) + ) + ) + (when v1-17 + (let* ((s0-0 (-> v1-17 process)) + (s1-1 (if (type? s0-0 process-focusable) + s0-0 + ) + ) + ) + (when s1-1 + (when (and (!= *target* s1-1) + (not (focus-test? (the-as process-focusable s1-1) disable dead inactive)) + (logtest? (process-mask crate enemy guard vehicle civilian) (-> s1-1 mask)) + (!= s4-0 s1-1) + ) + (let ((f0-6 (vector-vector-distance (get-trans (the-as process-focusable s1-1) 3) s5-0))) + (when (and (>= f28-0 f0-6) (>= f0-6 f30-0)) + (let ((v1-27 (-> s1-1 child))) + (while v1-27 + (when (= (-> v1-27 0 type) gravity-spinner) + (set! v1-29 #t) + (goto cfg-47) + ) + (set! v1-27 (-> v1-27 0 brother)) + ) + ) + (set! v1-29 #f) + (label cfg-47) + (if (not v1-29) + (spawn-gravity-spinner this s1-1) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let* ((s2-1 *target*) + (s3-2 (if (type? s2-1 process-focusable) + s2-1 + ) + ) + ) + (when (and s3-2 (< (vector-vector-distance (get-trans s3-2 0) s5-0) (-> s5-0 w))) + (when (and (!= *target* s3-2) + (not (focus-test? s3-2 disable dead inactive)) + (logtest? (process-mask crate enemy guard vehicle civilian) (-> s3-2 mask)) + (!= s4-0 s3-2) + ) + (let ((f0-8 (vector-vector-distance (get-trans s3-2 3) s5-0))) + (when (and (>= f28-0 f0-8) (>= f0-8 f30-0)) + (let ((v1-47 (-> s3-2 child))) + (while v1-47 + (when (= (-> v1-47 0 type) gravity-spinner) + (set! v1-49 #t) + (goto cfg-79) + ) + (set! v1-47 (-> v1-47 0 brother)) + ) + ) + (set! v1-49 #f) + (label cfg-79) + (if (not v1-49) + (spawn-gravity-spinner this s3-2) + ) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + ) + +(defbehavior gun-fire-dark-2 target () + (set-last-fire-time 36) + (cond + ((logtest? (-> *part-group-id-table* 120 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self gun fire-point quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 120)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self gun fire-point quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 120)) + ) + ) + (process-spawn + gun-gravity + (-> self gun fire-point) + (-> self gun fire-dir-out) + :name "gun-gravity" + :to (ppointer->process (-> self gun gun)) + ) + ) + +(defbehavior target-gun-fire-dark target ((arg0 pickup-type)) + (case arg0 + (((pickup-type gun-dark-1)) + (gun-fire-dark-1) + ) + (((pickup-type gun-dark-2)) + (gun-fire-dark-2) + ) + (((pickup-type gun-dark-3)) + (gun-fire-dark-3) + ) + ) + ) diff --git a/goal_src/jak3/engine/target/gun/gun-h.gc b/goal_src/jak3/engine/target/gun/gun-h.gc index 6f87ed9b72..7bd0ade369 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) @@ -246,8 +247,8 @@ ((gun-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 1.5) :shadow gun-shadow-mg - :shadow-joint-index 3 - :light-index 1 + :sort 1 + :origin-joint-index 3 ) (define *gun-shadow-control* @@ -264,28 +265,28 @@ ((gun-ammo-yellow-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 1) :texture-level 10 - :light-index 1 + :sort 1 ) (defskelgroup skel-ammo-red gun gun-ammo-red-lod0-jg gun-ammo-idle-ja ((gun-ammo-red-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 1) :texture-level 10 - :light-index 1 + :sort 1 ) (defskelgroup skel-ammo-blue gun gun-ammo-blue-lod0-jg gun-ammo-idle-ja ((gun-ammo-blue-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 1) :texture-level 10 - :light-index 1 + :sort 1 ) (defskelgroup skel-ammo-dark gun gun-ammo-dark-lod0-jg gun-ammo-idle-ja ((gun-ammo-dark-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 1) :texture-level 10 - :light-index 1 + :sort 1 ) (defskelgroup skel-gun-red-cone gun gun-red-cone-lod0-jg gun-red-cone-idle-ja diff --git a/goal_src/jak3/engine/target/gun/gun-part.gc b/goal_src/jak3/engine/target/gun/gun-part.gc index 83515aeec1..50658fcced 100644 --- a/goal_src/jak3/engine/target/gun/gun-part.gc +++ b/goal_src/jak3/engine/target/gun/gun-part.gc @@ -5,5 +5,4704 @@ ;; name in dgo: gun-part ;; dgos: GAME +(define-extern *yellow-shot-2-trail* light-trail-composition) +(define-extern *red-shot-3-trail* light-trail-composition) +(define-extern *last-player-pos* vector) +(define-extern *range-explo-dust-color* curve-color-fast) +(define-extern *range-explo-dust-alpha* curve2d-fast) +(define-extern *range-explo-dust-scale-x* curve2d-fast) +(define-extern *range-explo-dust-scale-y* curve2d-fast) +(define-extern *curve-explo-dust-alpha* curve2d-fast) +(define-extern *curve-explo-dust-scale-x* curve2d-fast) +(define-extern *curve-explo-dust-scale-y* curve2d-fast) +(define-extern *range-explo-color* curve-color-fast) +(define-extern *range-explo-alpha* curve2d-fast) +(define-extern *range-explo-scale-x* curve2d-fast) +(define-extern *range-explo-scale-y* curve2d-fast) +(define-extern *curve-explo-alpha* curve2d-fast) +(define-extern *curve-explo-scale-x* curve2d-fast) +(define-extern *curve-explo-scale-y* curve2d-fast) +(define-extern *curve-linear-up-red* curve2d-piecewise) +(define-extern *curve-yellow2-shot-alpha* curve2d-piecewise) +(define-extern *curve-yellow2-shot-color* curve-color-fast) +(define-extern *curve-linear-down-long* curve2d-fast) +(define-extern *gun-dark-3-nuke-fade-time-small* time-frame) +(define-extern *gun-dark-3-nuke-blur-time-small* time-frame) +(define-extern *gun-dark-3-nuke-blur-curve-small* curve2d-piecewise) +(define-extern *gun-dark-3-nuke-fade-curve-small* curve-color-piecewise) +(define-extern *gun-dark-3-nuke-blur-segs-small* uint) +(define-extern *gun-dark-3-mushroom-speed* float) +(define-extern *gun-dark-3-mushroom-size-time* time-frame) +(define-extern *gun-dark-3-nuke-mushroom-size-curve-x* curve2d-piecewise) +(define-extern *gun-dark-3-nuke-mushroom-size-curve-y* curve2d-piecewise) +(define-extern *gun-dark-3-nuke-fade-time* time-frame) +(define-extern *gun-dark-3-nuke-blur-time* time-frame) +(define-extern *gun-dark-3-nuke-blur-curve* curve2d-piecewise) +(define-extern *gun-dark-3-nuke-fade-curve* curve-color-piecewise) +(define-extern *gun-dark-3-nuke-blur-segs* uint) + ;; DECOMP BEGINS +gun + +(defpart 207 + :init-specs ((:texture (lasersmoke-00 level-default-sprite)) + (:birth-func 'birth-func-laser-pointer) + (:num 1.0) + (:scale-x (meters 0.075) (meters 0.05)) + (:scale-y (meters 40)) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 16.0 8.0) + (:fade-a -1.6) + (:timer (seconds 0.05)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x401a00 + #x401b00 + #x401c00 + #x401d00 + #x401e00 + #x401f00 + #x402000 + #x402100 + #x402200 + #x402300 + #x402400 + #x402500 + #x402600 + #x402700 + #x402800 + #x402900 + #x402a00 + #x402b00 + #x402c00 + #x402d00 + #x402e00 + #x402f00 + #x403000 + #x403100 + #x403200 + #x403300 + #x403400 + #x403500 + #x403600 + #x403700 + #x403800 + #x403900 + ) + ) + (:func 'sparticle-texture-animate) + ) + ) + +(defun sparticle-track-gun-joint ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (-> arg1 key) + (let ((v1-1 *target*) + (a1-1 36) + ) + (when v1-1 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> v1-1 node-list data a1-1)) + (set! (-> arg2 x) (-> *target* gun fire-point x)) + (set! (-> arg2 y) (-> *target* gun fire-point y)) + (set! (-> arg2 z) (-> *target* gun fire-point z)) + ) + ) + 0 + (none) + ) + +(defpartgroup group-laser-glow + :id 83 + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 208 :flags (sp6)) (sp-item 209 :flags (sp6))) + ) + +(defpart 209 + :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 255.0) + (:g 32.0 8.0) + (:b :copy g) + (:a 48.0 16.0) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1.0) + ) + ) + +(defpart 208 + :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.1)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b :copy g) + (:a 64.0 32.0) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 glow)) + (:userdata 1.0) + ) + ) + +(defpart 210 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.2) (meters 0.05)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0 128.0) + (:b :copy g) + (:a 100.0 28.0) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 glow)) + (:userdata 1.0) + ) + ) + +(defpart 211 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.2) (meters 0.1)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0 32.0) + (:b :copy g) + (:a 32.0 32.0) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 glow)) + (:userdata 1.0) + ) + ) + +(defpart 212 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.4) (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 32.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) + ) + ) + +(defpart 213 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 8)) + (:scale-y (meters 8)) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 128.0) + (:fade-a -2.56) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpartgroup group-gun-red-shot-fired + :id 84 + :duration (seconds 0.017) + :linger-duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 214) (sp-item 215)) + ) + +(defpart 214 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5) (meters 0.5)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 96.0) + (:scalevel-x (meters 0.053333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -12.75) + (:fade-a -2.4) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + ) + ) + +(defpart 215 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5) (meters 0.5)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 96.0) + (:scalevel-x (meters 0.21333334)) + (:scalevel-y :copy scalevel-x) + (:fade-g -12.8) + (:fade-b -3.2) + (:fade-a -4.8) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + ) + ) + +(defpartgroup group-gun-red-shot-reload + :id 85 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 216)) + ) + +(defpart 216 + :init-specs ((:texture (common-white common)) + (:num 2.0) + (:scale-x (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.08)) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.053333335) (meters 0.10666667)) + (:rotvel-z (degrees -1440) (degrees 2880)) + (:fade-a -0.42666668) + (:accel-y (meters -0.005) (meters -0.0016666667)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2)) + (:conerot-x (degrees -60) (degrees 120)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(define *red-shot-colors* (new 'static 'array rgba 36 + (new 'static 'rgba :r #xfe :g #xfe :b #xfe :a #x80) + (new 'static 'rgba :r #xfe :g #xfe :b #xfe) + (new 'static 'rgba :r #xfe :g #xfe :b #xfe) + (new 'static 'rgba :r #xfe :g #xfe :b #xfe) + (new 'static 'rgba :r #xfe :g #x80 :a #x40) + (new 'static 'rgba :r #xfe :g #xfe :b #xfe :a #x80) + (new 'static 'rgba :r #xfe :g #xfe :b #xfe) + (new 'static 'rgba :r #xfe :g #xfe :b #xfe) + (new 'static 'rgba :r #xfe :g #x80 :a #x20) + (new 'static 'rgba :r #xfe :g #x80 :a #x40) + (new 'static 'rgba :r #xfe :g #xfe :b #xfe :a #x80) + (new 'static 'rgba :r #xfe :g #xfe :b #xfe) + (new 'static 'rgba :r #xfe :g #x40 :a #x10) + (new 'static 'rgba :r #xfe :g #x80 :a #x20) + (new 'static 'rgba :r #xfe :g #x80 :a #x40) + (new 'static 'rgba :r #xfe :g #xfe :b #xfe :a #x80) + (new 'static 'rgba :r #xfe :a #x8) + (new 'static 'rgba :r #xfe :g #x40 :a #x10) + (new 'static 'rgba :r #xfe :g #x80 :a #x20) + (new 'static 'rgba :r #xfe :g #x80 :a #x40) + (new 'static 'rgba :r #xfe :a #x4) + (new 'static 'rgba :r #xfe :a #x8) + (new 'static 'rgba :r #xfe :g #x40 :a #x10) + (new 'static 'rgba :r #xfe :g #x80 :a #x20) + (new 'static 'rgba :r #xfe) + (new 'static 'rgba :r #xfe :a #x4) + (new 'static 'rgba :r #xfe :a #x8) + (new 'static 'rgba :r #xfe :g #x40 :a #x10) + (new 'static 'rgba :r #xfe) + (new 'static 'rgba :r #xfe) + (new 'static 'rgba :r #xfe :a #x4) + (new 'static 'rgba :r #xfe :a #x8) + (new 'static 'rgba :r #xfe :g #xfe :b #xfe) + (new 'static 'rgba :r #xfe) + (new 'static 'rgba :r #xfe) + (new 'static 'rgba :r #xfe :a #x4) + ) + ) + +(defpart 217 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 8)) + (:scale-y (meters 8)) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 128.0) + (:fade-a -2.56) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpartgroup group-gun-red3-shot-fired + :id 86 + :duration (seconds 0.017) + :linger-duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 214) (sp-item 215)) + ) + +(defpartgroup group-gun-red3-shot-glow + :id 87 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 218)) + ) + +(defpart 218 + :init-specs ((:texture (redpuff level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 0.8)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-gun-red3-shot-explode + :id 88 + :duration (seconds 5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 219 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 220 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 221 :period (seconds 30) :length (seconds 0.035)) + (sp-item 222 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 223 :period (seconds 30) :length (seconds 0.167)) + (sp-item 224 :period (seconds 30) :length (seconds 0.5)) + ) + ) + +(defpart 219 + :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 220 + :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 225 + :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 64.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 128.0) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.7) + (:timer (seconds 1)) + (: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 221 + :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-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 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-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-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-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-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-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 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-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 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-gun-red3-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* 221 init-specs 14 initial-valuef) + (the-as float *part-gun-red3-explosion-dust-in-curve-settings*) + ) + +(set! (-> *part-gun-red3-explosion-dust-in-curve-settings* color-start) *range-explo-dust-color*) + +(set! (-> *part-gun-red3-explosion-dust-in-curve-settings* alpha-start) *range-explo-dust-alpha*) + +(set! (-> *part-gun-red3-explosion-dust-in-curve-settings* scale-x-start) *range-explo-dust-scale-x*) + +(set! (-> *part-gun-red3-explosion-dust-in-curve-settings* scale-y-start) *range-explo-dust-scale-y*) + +(set! (-> *part-gun-red3-explosion-dust-in-curve-settings* r-scalar) #f) + +(set! (-> *part-gun-red3-explosion-dust-in-curve-settings* g-scalar) #f) + +(set! (-> *part-gun-red3-explosion-dust-in-curve-settings* b-scalar) #f) + +(set! (-> *part-gun-red3-explosion-dust-in-curve-settings* a-scalar) *curve-explo-dust-alpha*) + +(set! (-> *part-gun-red3-explosion-dust-in-curve-settings* scale-x-scalar) *curve-explo-dust-scale-x*) + +(set! (-> *part-gun-red3-explosion-dust-in-curve-settings* scale-y-scalar) *curve-explo-dust-scale-y*) + +(defpart 223 + :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 224 + :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-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-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-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-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-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-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-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-gun-red3-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* 224 init-specs 16 initial-valuef) + (the-as float *part-gun-red3-explosion-texture-curve-settings*) + ) + +(set! (-> *part-gun-red3-explosion-texture-curve-settings* color-start) *range-explo-color*) + +(set! (-> *part-gun-red3-explosion-texture-curve-settings* alpha-start) *range-explo-alpha*) + +(set! (-> *part-gun-red3-explosion-texture-curve-settings* scale-x-start) *range-explo-scale-x*) + +(set! (-> *part-gun-red3-explosion-texture-curve-settings* scale-y-start) *range-explo-scale-y*) + +(set! (-> *part-gun-red3-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-gun-red3-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-gun-red3-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-gun-red3-explosion-texture-curve-settings* a-scalar) *curve-explo-alpha*) + +(set! (-> *part-gun-red3-explosion-texture-curve-settings* scale-x-scalar) *curve-explo-scale-x*) + +(set! (-> *part-gun-red3-explosion-texture-curve-settings* scale-y-scalar) *curve-explo-scale-y*) + +(defpart 222 + :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-gun-red-3-scorched-earth + :id 89 + :flags (sp0 sp1) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 226 :flags (is-3d sp3 sp7))) + ) + +(defpart 226 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 2)) + (:scale-y (meters 5) (meters 5)) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:fade-a 0.85333335 0.85333335) + (:timer (seconds 3)) + (:flags (left-multiply-quat)) + (:next-time (seconds 0.25)) + (:next-launcher 227) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 227 + :init-specs ((:fade-a 0.0) (:next-time (seconds 0.75)) (:next-launcher 228)) + ) + +(defpart 228 + :init-specs ((:fade-a -0.21333334)) + ) + +(defpart 229 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (: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-3)) + ) + ) + +(defpart 230 + :init-specs ((:texture (laser-hit2-add level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 1.3333334)) + (:scalevel-y :copy scalevel-x) + (:fade-b -2.56) + (:fade-a -5.1) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(when (or (zero? *curve-linear-up-red*) (!= loading-level global)) + (set! *curve-linear-up-red* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *curve-linear-up-red* 2 'loading-level (the-as int #f)) + ) + +(set! (-> *curve-linear-up-red* pts data 0 first) 0.0) + +(set! (-> *curve-linear-up-red* pts data 0 second) 0.3) + +(set! (-> *curve-linear-up-red* pts data 1 first) 1.0) + +(set! (-> *curve-linear-up-red* pts data 1 second) 1.0) + +(if (or (zero? *red-shot-3-trail*) (!= loading-level global)) + (set! *red-shot-3-trail* (new 'loading-level 'light-trail-composition)) + ) + +(set! (-> *red-shot-3-trail* color-mode) (the-as uint 0)) + +(set! (-> *red-shot-3-trail* color-repeat-dist) 40960.0) + +(set! (-> *red-shot-3-trail* alpha-1-mode) (the-as uint 0)) + +(set! (-> *red-shot-3-trail* alpha-2-mode) (the-as uint 1)) + +(set! (-> *red-shot-3-trail* base-alpha) 0.5) + +(set! (-> *red-shot-3-trail* alpha-repeat-dist) 6144.0) + +(set! (-> *red-shot-3-trail* width-mode) (the-as uint 2)) + +(set! (-> *red-shot-3-trail* base-width) 2048.0) + +(set! (-> *red-shot-3-trail* width-repeat-dist) 20480.0) + +(set! (-> *red-shot-3-trail* uv-mode) (the-as uint 0)) + +(set! (-> *red-shot-3-trail* uv-repeat-dist) 16384000.0) + +(set! (-> *red-shot-3-trail* lie-mode) (the-as uint 0)) + +(set! (-> *red-shot-3-trail* max-age) (seconds 0.5)) + +(if #f + (set! (-> *red-shot-3-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *red-shot-3-trail* tex-id) (the-as uint #x100300)) + ) + +(set! (-> *red-shot-3-trail* width-curve) (the-as curve2d-piecewise *curve-linear-up*)) + +(set! (-> *red-shot-3-trail* color-curve) (the-as curve-color-piecewise *trail-color-curve-red*)) + +(set! (-> *red-shot-3-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +(set! (-> *red-shot-3-trail* alpha-curve-2) *curve-linear-up-red*) + +(set! (-> *red-shot-3-trail* zbuffer?) #f) + +(set! (-> *red-shot-3-trail* lie-vector quad) (-> *up-vector* quad)) + +(set! (-> *red-shot-3-trail* use-tape-mode?) #f) + +(set! (-> *red-shot-3-trail* blend-mode) (the-as uint 1)) + +(set! (-> *red-shot-3-trail* frame-stagger) (the-as uint 1)) + +(when (or (zero? *curve-yellow2-shot-alpha*) (!= loading-level global)) + (set! *curve-yellow2-shot-alpha* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *curve-yellow2-shot-alpha* 21 'loading-level (the-as int #f)) + ) + +(set! (-> *curve-yellow2-shot-alpha* pts data 0 first) 0.0) + +(set! (-> *curve-yellow2-shot-alpha* pts data 0 second) 0.0) + +(set! (-> *curve-yellow2-shot-alpha* pts data 1 first) 0.1) + +(set! (-> *curve-yellow2-shot-alpha* pts data 1 second) 1.0) + +(set! (-> *curve-yellow2-shot-alpha* pts data 2 first) 0.4) + +(set! (-> *curve-yellow2-shot-alpha* pts data 2 second) 1.0) + +(set! (-> *curve-yellow2-shot-alpha* pts data 3 first) 0.401) + +(set! (-> *curve-yellow2-shot-alpha* pts data 3 second) 0.0) + +(set! (-> *curve-yellow2-shot-alpha* pts data 4 first) 0.45) + +(set! (-> *curve-yellow2-shot-alpha* pts data 4 second) 0.0) + +(set! (-> *curve-yellow2-shot-alpha* pts data 5 first) 0.451) + +(set! (-> *curve-yellow2-shot-alpha* pts data 5 second) 1.0) + +(set! (-> *curve-yellow2-shot-alpha* pts data 6 first) 0.5) + +(set! (-> *curve-yellow2-shot-alpha* pts data 6 second) 1.0) + +(set! (-> *curve-yellow2-shot-alpha* pts data 7 first) 0.501) + +(set! (-> *curve-yellow2-shot-alpha* pts data 7 second) 0.0) + +(set! (-> *curve-yellow2-shot-alpha* pts data 8 first) 0.55) + +(set! (-> *curve-yellow2-shot-alpha* pts data 8 second) 0.0) + +(set! (-> *curve-yellow2-shot-alpha* pts data 9 first) 0.551) + +(set! (-> *curve-yellow2-shot-alpha* pts data 9 second) 1.0) + +(set! (-> *curve-yellow2-shot-alpha* pts data 10 first) 0.6) + +(set! (-> *curve-yellow2-shot-alpha* pts data 10 second) 1.0) + +(set! (-> *curve-yellow2-shot-alpha* pts data 11 first) 0.601) + +(set! (-> *curve-yellow2-shot-alpha* pts data 11 second) 0.0) + +(set! (-> *curve-yellow2-shot-alpha* pts data 12 first) 0.65) + +(set! (-> *curve-yellow2-shot-alpha* pts data 12 second) 0.0) + +(set! (-> *curve-yellow2-shot-alpha* pts data 13 first) 0.651) + +(set! (-> *curve-yellow2-shot-alpha* pts data 13 second) 1.0) + +(set! (-> *curve-yellow2-shot-alpha* pts data 14 first) 0.7) + +(set! (-> *curve-yellow2-shot-alpha* pts data 14 second) 1.0) + +(set! (-> *curve-yellow2-shot-alpha* pts data 15 first) 0.701) + +(set! (-> *curve-yellow2-shot-alpha* pts data 15 second) 0.0) + +(set! (-> *curve-yellow2-shot-alpha* pts data 16 first) 0.75) + +(set! (-> *curve-yellow2-shot-alpha* pts data 16 second) 0.0) + +(set! (-> *curve-yellow2-shot-alpha* pts data 17 first) 0.751) + +(set! (-> *curve-yellow2-shot-alpha* pts data 17 second) 1.0) + +(set! (-> *curve-yellow2-shot-alpha* pts data 18 first) 0.8) + +(set! (-> *curve-yellow2-shot-alpha* pts data 18 second) 1.0) + +(set! (-> *curve-yellow2-shot-alpha* pts data 19 first) 0.801) + +(set! (-> *curve-yellow2-shot-alpha* pts data 19 second) 0.0) + +(set! (-> *curve-yellow2-shot-alpha* pts data 20 first) 1.0) + +(set! (-> *curve-yellow2-shot-alpha* pts data 20 second) 0.0) + +(if #t + (set! *curve-yellow2-shot-color* (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 1.0 :z 1.0 :w 128.0) + (new 'static 'vector :x 1.0 :y 0.8 :z 0.8 :w 128.0) + (new 'static 'vector :x 1.0 :y 0.5 :z 0.5 :w 128.0) + (new 'static 'vector :x 1.0 :y 0.5 :z 0.5 :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-linear-down-long* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.9 :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.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +(if (or (zero? *yellow-shot-2-trail*) (!= loading-level global)) + (set! *yellow-shot-2-trail* (new 'loading-level 'light-trail-composition)) + ) + +(set! (-> *yellow-shot-2-trail* color-mode) (the-as uint 0)) + +(set! (-> *yellow-shot-2-trail* color-repeat-dist) 286720.0) + +(set! (-> *yellow-shot-2-trail* alpha-1-mode) (the-as uint 0)) + +(set! (-> *yellow-shot-2-trail* alpha-2-mode) (the-as uint 1)) + +(set! (-> *yellow-shot-2-trail* base-alpha) 1.0) + +(set! (-> *yellow-shot-2-trail* alpha-repeat-dist) 286720.0) + +(set! (-> *yellow-shot-2-trail* width-mode) (the-as uint 2)) + +(set! (-> *yellow-shot-2-trail* base-width) 2867.2) + +(set! (-> *yellow-shot-2-trail* width-repeat-dist) 163840.0) + +(set! (-> *yellow-shot-2-trail* uv-mode) (the-as uint 0)) + +(set! (-> *yellow-shot-2-trail* uv-repeat-dist) 20480.0) + +(set! (-> *yellow-shot-2-trail* lie-mode) (the-as uint 0)) + +(set! (-> *yellow-shot-2-trail* max-age) (seconds 0.5)) + +(if #f + (set! (-> *yellow-shot-2-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *yellow-shot-2-trail* tex-id) (the-as uint #x501e00)) + ) + +(set! (-> *yellow-shot-2-trail* width-curve) (the-as curve2d-piecewise *curve-linear-up*)) + +(set! (-> *yellow-shot-2-trail* color-curve) (the-as curve-color-piecewise *curve-yellow2-shot-color*)) + +(set! (-> *yellow-shot-2-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down-long*)) + +(set! (-> *yellow-shot-2-trail* alpha-curve-2) *curve-yellow2-shot-alpha*) + +(set! (-> *yellow-shot-2-trail* zbuffer?) #f) + +(set! (-> *yellow-shot-2-trail* lie-vector quad) (-> *up-vector* quad)) + +(set! (-> *yellow-shot-2-trail* use-tape-mode?) #f) + +(set! (-> *yellow-shot-2-trail* blend-mode) (the-as uint 1)) + +(set! (-> *yellow-shot-2-trail* frame-stagger) (the-as uint 1)) + +(defpart 231 + :init-specs ((:texture (gun-blue-beam level-default-sprite)) + (:birth-func 'birth-func-setup-beam) + (:num 1.0) + (:scale-x (meters 0.3) (meters 0.1)) + (:scale-y (meters 100) (meters 20)) + (:r 0.0) + (:g 255.0) + (:b 255.0) + (:a 32.0) + (:fade-a 3.2) + (:timer (seconds 2.167)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 30 0 0 #x401000 #x401200)) + (:func 'sparticle-texture-animate) + (:next-time (seconds 0.05)) + (:next-launcher 232) + ) + ) + +(defpart 232 + :init-specs ((:r 64.0) + (:g 128.0) + (:b 255.0) + (:a 48.0) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y (meters -0.016666668)) + (:fade-r 1.2) + (:fade-g 0.8) + (:fade-a -0.10666667 -0.2) + (:accel-y (meters 0.000033333334)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.5)) + (:next-launcher 233) + ) + ) + +(defpart 233 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0)) + ) + +(defpart 234 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1) (meters 1.5)) + (:scale-y (meters 10) (meters 0.6)) + (:r 0.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.08)) + (:fade-r 3.2) + (:fade-g 3.2) + (:fade-a -6.4) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpart 235 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 5.0) + (:y (meters 0.25)) + (:scale-x (meters 0.2) (meters 0.1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0 128.0) + (:a 32.0 16.0) + (:omega (degrees 0)) + (:vel-y (meters 0.053333335) (meters 0.026666667)) + (:scalevel-x (meters 0.01) (meters 0.006666667)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.4 -0.4) + (:friction 0.85 0.04) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:conerot-x (degrees -45) (degrees 10)) + (:conerot-y (degrees 85) (degrees 10)) + (:rotate-y (degrees 0)) + (:conerot-radius (meters 0) (meters 0.4)) + ) + ) + +(defpart 236 + :init-specs ((:texture (shell-casing-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:y (meters 0.25)) + (:scale-x (meters 0.35)) + (:rot-z (degrees 260) (degrees 20)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0)) + (:vel-y (meters 0.053333335) (meters 0.026666667)) + (:rotvel-z (degrees -4.8) (degrees 2.4)) + (:accel-y (meters -0.008333334) (meters -0.0016666667)) + (:friction 0.9 0.02) + (:timer (seconds 1.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 30 0 0 #x408700 #x408700 #x408700 #x408800)) + (:func 'check-shell-level1) + (:next-time (seconds 0.017) (seconds 0.53)) + (:next-launcher 237) + (:conerot-x (degrees -40) (degrees 20)) + (:conerot-y (degrees 80) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 237 + :init-specs ((:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:next-time (seconds 0.017) (seconds 0.015)) + (:next-launcher 238) + ) + ) + +(defpart 238 + :init-specs ((:r 128.0) (:g 128.0) (:b 255.0) (:a 128.0)) + ) + +(defpart 239 + :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 0)) + (:scale-x (meters 0.35)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0)) + (:vel-y (meters 0.026666667) (meters 0.016666668)) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:accel-y (meters -0.0026666666) (meters -0.00083333335)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 30 0 0 #x408700 #x408800 #x408900)) + (:func 'check-shell-level2) + (:next-time (seconds 0.017) (seconds 0.53)) + (:next-launcher 237) + (:conerot-x (degrees 0) (degrees 45)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 240 + :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 0)) + (:scale-x (meters 0.35)) + (:rot-z (degrees 30) (degrees 120)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:vel-x (meters 0) (meters 0.0033333334)) + (:vel-y (meters 0.016666668)) + (:vel-z (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:accel-y (meters -0.0016666667)) + (:friction 0.9) + (:timer (seconds 40)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 30 0 0 #x408800 #x408800 #x408900)) + (:next-time (seconds 0.25)) + (:next-launcher 241) + (:conerot-x (degrees 30) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 241 + :init-specs ((:sound (static-sound-spec "blue-gun-shell" :group 0)) + (:vel-x (meters 0)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:rotvel-z (degrees 0)) + (:accel-y (meters 0)) + (:next-time (seconds 2) (seconds 0.997)) + (:next-launcher 242) + ) + ) + +(defpart 242 + :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)) + (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) + (set! (-> *part-id-table* 239 init-specs 11 initial-valuef) (-> gp-0 y)) + (launch-particles (-> *part-id-table* 239) gp-0) + (launch-particles (-> *part-id-table* 243) gp-0) + ) + ) + 0 + (none) + ) + +(defun check-shell-level2 ((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) + (launch-particles (-> *part-id-table* 240) gp-0) + (launch-particles (-> *part-id-table* 243) gp-0) + ) + ) + 0 + (none) + ) + +(defpart 243 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 0.0 1 2.0) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.03) (meters 0.005)) + (:r 255.0) + (:g 128.0 128.0) + (:b 0.0 128.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.0045)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-g -2.55 -2.55) + (:fade-b -8.0) + (:fade-a -0.64 -0.64) + (:accel-y (meters -0.00033333333) (meters -0.00033333333)) + (:friction 0.8 0.02) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 60) (degrees 20)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-gun-blue-shot-hit + :id 90 + :duration (seconds 0.017) + :linger-duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 244 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 245 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 2) :length (seconds 0.017)) + (sp-item 246 :fade-after (meters 120) :falloff-to (meters 140) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +(defpart 246 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 1)) + (:rot-x 4) + (:scale-y (meters 0.02) (meters 0.02)) + (:r 0.0) + (:g 64.0 128.0) + (:b 255.0) + (:a 64.0 64.0) + (:omega (degrees 0.0225)) + (:vel-z (meters 0.06666667) (meters 0.2)) + (:fade-r -0.42666668) + (:fade-g -0.42666668) + (:accel-y (meters -0.0013333333) (meters -0.001)) + (:friction 0.875) + (:timer (seconds 0.167) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.017) (seconds 0.98)) + (:next-launcher 247) + (:conerot-x (degrees 80) (degrees 20)) + (:conerot-y (degrees 80) (degrees 20)) + (:conerot-z (degrees 80) (degrees 20)) + (:conerot-radius (meters 0) (meters 0.2)) + ) + ) + +(defpart 247 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.42666668)) + ) + +(defpart 245 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.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 g) + (:a 32.0 32.0) + (:vel-z (meters 0) (meters 0.016666668)) + (:scalevel-x (meters 0.0013333333) (meters 0.0033333334)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-b 0.21333334) + (:fade-a -0.32) + (:friction 0.95) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 90) (degrees 20)) + (:conerot-y (degrees 90) (degrees 20)) + (:conerot-z (degrees 90) (degrees 20)) + (:conerot-radius (meters 0) (meters 0.2)) + ) + ) + +(defpart 244 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (: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)) + (:scale-y (meters 2) (meters 2)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 96.0) + (:rotvel-z (degrees 0.3)) + (:fade-r -5.1) + (:fade-g -3.92) + (:fade-b 0.0) + (:fade-a -2.56) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:next-time (seconds 0.035)) + (:next-launcher 248) + ) + ) + +(defpart 248 + :init-specs ((:scale-x (meters 1)) (:scale-y :copy scale-x) (:scalevel-x (meters 0.06)) (:scalevel-y :copy scalevel-x)) + ) + +(defpartgroup group-gun-blue-shot-die + :id 91 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 249)) + ) + +(defpart 250 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 6)) + (:scale-y (meters 8)) + (:r 0.0) + (:g 0.0) + (:b 255.0) + (:a 128.0) + (:fade-a -2.56) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpartgroup group-gun-dark-shot-fired + :id 92 + :duration (seconds 0.017) + :linger-duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 251 :flags (sp3 sp6)) (sp-item 252)) + ) + +(defpart 251 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3.5) (meters 0.5)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -6.4) + (:fade-g -6.375) + (:fade-a -3.2) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 252 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 32.0) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.04) (meters 0.03)) + (:r 0.0) + (:g 0.0 128.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:vel-y (meters 0.1) (meters 0.3)) + (:fade-g -2.55 -2.55) + (:fade-a -0.256 -0.256) + (:accel-y (meters -0.0033333334)) + (:friction 0.8 0.02) + (:timer (seconds 0.335) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-z (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-jak-peacemaker-shot-hit + :id 93 + :duration (seconds 0.067) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 253 :flags (sp3 sp6)) + (sp-item 254 :flags (sp3 sp6)) + (sp-item 255 :fade-after (meters 160) :falloff-to (meters 160)) + (sp-item 256) + ) + ) + +(defpart 255 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.08) (meters 0.04)) + (:r 0.0) + (:g 0.0 128.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.005625) (degrees 0.005625)) + (:vel-y (meters 0.3) (meters 0.3)) + (:fade-g -0.85 -0.85) + (:fade-a -0.48 -0.10666667) + (:accel-y (meters -0.0033333334)) + (:friction 0.8 0.02) + (:timer (seconds 1) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 256 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 2)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 128.0) + (:a 16.0) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + ) + ) + +(defpart 257 + :init-specs ((:texture (laser-hit2-add level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 2)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 32.0 32.0) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + ) + ) + +(defpart 254 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 32)) + (:rot-x (degrees 22.5)) + (: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 -1.6)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + ) + ) + +(defpart 253 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (: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 32.0) + (:scalevel-x (meters 0.21333334) (meters 0.21333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -12.75) + (:fade-g -3.1875) + (:fade-a -0.4) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + ) + ) + +(defun sparticle-dark-shot-lightning ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((v1-3 (-> arg1 key proc root trans))) + (set! (-> arg2 x) (-> v1-3 x)) + (set! (-> arg2 y) (-> v1-3 y)) + (set! (-> arg2 z) (-> v1-3 z)) + ) + (sparticle-texture-animate arg0 arg1 arg2) + (none) + ) + +(defpartgroup group-gun-dark-shot-trail + :id 94 + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 258) (sp-item 259 :flags (sp6)) (sp-item 260 :flags (sp6)) (sp-item 261 :flags (sp6))) + ) + +(defpart 260 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.25) (meters 0.1)) + (:rot-x (degrees 2.25)) + (: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-3 glow)) + (:userdata 2048.0) + ) + ) + +(defpart 261 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 255.0) + (:a 16.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + ) + ) + +(defpart 259 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 0.0 32.0) + (:g :copy r) + (:b 128.0 128.0) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 258 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.9)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0)) + (:r 0.0) + (:g 0.0) + (:b 255.0) + (:a 0.0) + (:scalevel-y (meters 0.04)) + (:fade-r 6.4) + (:fade-g 6.4) + (:fade-a 6.4) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-dark-shot-lightning) + (:next-time (seconds 0.05) (seconds 0.015)) + (:next-launcher 262) + ) + ) + +(defpart 262 + :init-specs ((:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:scalevel-x (meters 0)) + (:scalevel-y (meters 0)) + (:fade-r -8.533334) + (:fade-g -8.533334) + (:fade-a -8.533334) + (:next-time (seconds 0.05) (seconds 0.015)) + (:next-launcher 263) + ) + ) + +(defpart 263 + :init-specs ((:scalevel-x (meters -0.00093750004) (meters -0.00093750004)) + (:scalevel-y (meters -0.00078125) (meters -0.00078125)) + (:fade-r -0.8) + (:fade-g -0.8) + (:fade-a -0.8) + ) + ) + +(defpart 264 + :init-specs ((:texture (gun-yellow-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.5)) + (:scale-y (meters 16)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 64.0) + (:scalevel-x (meters -0.005)) + (:fade-a -3.2) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpart 265 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 0.2)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 6.0) + (:omega (degrees 6763.5)) + (:fade-a -0.3) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + ) + ) + +(defpart 266 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 0.5 0.5) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.013333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -2.55 -1.28) + (:fade-b -1.28) + (:fade-a -0.64) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 267 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 4.0 8.0) + (:z (meters 0) (meters -4)) + (:scale-x (meters 0.25) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:scalevel-x (meters -0.0020833334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 1.6) + (:fade-g -1.6) + (:fade-b -3.2 -6.4) + (:accel-y (meters -0.000033333334) (meters -0.00033333333)) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defun sparticle-track-gun-joint-3d ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (-> arg1 key) + (let ((v1-1 *target*) + (a1-1 36) + ) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> v1-1 node-list data a1-1)) + ) + (set! (-> arg2 x) (-> *target* gun fire-point x)) + (set! (-> arg2 y) (-> *target* gun fire-point y)) + (set! (-> arg2 z) (-> *target* gun fire-point z)) + 0 + (none) + ) + +(defpart 268 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y (meters 4.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0.05)) + (: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 269 + :init-specs ((:texture (gun-yellow-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.5)) + (:scale-y (meters 16)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 64.0) + (:scalevel-x (meters -0.005)) + (:fade-a -3.2) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpart 270 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.01)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 6.0) + (:fade-a -0.3) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 271 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 4.0 8.0) + (:z (meters 0) (meters -4)) + (:scale-x (meters 0.55) (meters 0.1)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 64.0) + (:vel-z (meters -0.016666668) (meters -0.083333336)) + (:scalevel-x (meters -0.0020833334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 1.6) + (:fade-g -1.6) + (:fade-b -3.2 -6.4) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 272 + :init-specs ((:texture (hitspark level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 3598.0002)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -5.1) + (:timer (seconds 0.067) (seconds 0.015)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 273 + :init-specs ((:texture (laser-hit2-add level-default-sprite)) + (:num 2.0) + (:scale-x (meters 0.01) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 3598.0002)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 200.0) + (:b 30.0) + (:a 40.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.026666667) (meters 0.026666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.0) + (:fade-b -0.2) + (:fade-a -0.26666668) + (:timer (seconds 0.25) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 274 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y (meters 4.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0.05)) + (: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 275 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.15)) + (:scale-y (meters 0.8)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0.025)) + (: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 276 + :init-specs ((:texture (gun-yellow-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.2)) + (:scale-y (meters 16)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 64.0) + (:scalevel-x (meters -0.005)) + (:fade-a -3.2) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpart 277 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20) (meters 30.2)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 6763.5)) + (:fade-a -0.3) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + ) + ) + +(defpart 278 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 4.0 8.0) + (:z (meters 0) (meters -4)) + (:scale-x (meters 0.55) (meters 0.1)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 64.0) + (:vel-z (meters -0.016666668) (meters -0.083333336)) + (:scalevel-x (meters -0.0020833334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 1.6) + (:fade-g -1.6) + (:fade-b -3.2 -6.4) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-gun-yellow-saucer-lights + :id 95 + :linger-duration (seconds 4) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 279 :flags (sp6)) (sp-item 280 :flags (is-3d sp6 sp7)) (sp-item 281 :flags (is-3d sp6 sp7))) + ) + +(defpartgroup group-gun-yellow-saucer-lights-dark + :id 96 + :duration (seconds 2) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 282 :flags (sp3)) (sp-item 283 :flags (is-3d sp3 sp7)) (sp-item 284 :flags (is-3d sp3 sp7))) + ) + +(defpartgroup group-gun-yellow-saucer-fizz + :id 97 + :duration (seconds 30) + :linger-duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 285 :period (seconds 2) :length (seconds 0.017)) + (sp-item 286 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 287 :flags (sp3 sp7)) + ) + ) + +(defpart 287 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 15.0) + (:scale-x (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters 0.05) (meters 0.016666668)) + (:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.07111111) + (:accel-y (meters 0.00033333333)) + (:friction 0.9 0.02) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:next-time (seconds 0.167)) + (:next-launcher 288) + (:conerot-x (degrees 10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 288 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +(defpart 279 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.1)) + (:scale-y (meters 0.8)) + (:r 40.0) + (:g 40.0) + (:b 40.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + (:func 'sparticle-track-root) + ) + ) + +(defpart 280 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters -0.16)) + (:scale-x (meters 0.95)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 40.0) + (:b 40.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +(defpart 281 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters 0.16)) + (:scale-x (meters 0.95)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 40.0) + (:b 40.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +(defpart 282 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.1)) + (:scale-y (meters 0.8)) + (:r 10.0) + (:g 10.0) + (:b 10.0) + (:a 128.0) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 1.5)) + (:next-launcher 289) + ) + ) + +(defpart 283 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters -0.16)) + (:scale-x (meters 0.95)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 10.0) + (:b 10.0) + (:a 128.0) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 1.5)) + (:next-launcher 289) + ) + ) + +(defpart 284 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters 0.16)) + (:scale-x (meters 0.95)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 10.0) + (:b 10.0) + (:a 128.0) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 1.5)) + (:next-launcher 289) + ) + ) + +(defpart 289 + :init-specs ((:fade-a -0.85333335)) + ) + +(defpartgroup group-gun-yellow-shot-hit-3 + :id 98 + :duration (seconds 1.5) + :linger-duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 290 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 291 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +(defpart 290 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.1) (meters 1.2)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.1) (meters 1.2)) + (:r 255.0) + (:g 200.0 55.0) + (:b 128.0) + (:a 32.0 128.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-a -5.12) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 291 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.5) (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) (meters 0.016666668)) + (:scalevel-x (meters 0.0013333333) (meters 0.0033333334)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-gun-yellow-shot-hit-object-3 + :id 99 + :duration (seconds 1.5) + :linger-duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 292 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 293 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 2) :length (seconds 0.167)) + ) + ) + +(defpart 292 + :init-specs ((:texture (laser-hit2-add level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.4) (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 200.0 55.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (: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 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 293 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0 6.0) + (:scale-x (meters 0.1) (meters 0.4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.0033333334) (meters 0.013333334)) + (:fade-g -0.21333334 -0.21333334) + (:fade-a -0.42666668) + (:accel-y (meters -0.001)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-gun-yellow3-muzzle-smoke + :id 100 + :duration (seconds 0.067) + :linger-duration (seconds 1.667) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 294 :period (seconds 2) :length (seconds 0.017)) (sp-item 295 :flags (sp7))) + ) + +(defpart 294 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 200.0 55.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -3.2) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 295 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 30.0) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 28.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 64.0) + (:vel-z (meters 0.16666667) (meters 0.033333335)) + (:scalevel-x (meters 0.006666667) (meters 0.016666668)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:friction 0.95 0.04) + (:timer (seconds 1.667)) + (:flags (sp-cpuinfo-flag-13)) + (:next-time (seconds 0.667)) + (:next-launcher 296) + (:conerot-x (degrees 10) (degrees 10)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 296 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y :copy scalevel-x) (:fade-a -0.26666668) (:friction 0.99)) + ) + +(defpart 297 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 4)) + (:scale-y (meters 4.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0.05)) + (:fade-a -3.6571429) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpartgroup group-gun-yellow-shot-hit + :id 101 + :duration (seconds 1.5) + :linger-duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 299 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 300 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 301 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 1)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.667)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.5)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.417)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.335)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.25)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.185)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.15)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.117)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.085)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.05)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.035)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.017)) + (sp-item 303 :fade-after (meters 40) :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 304 :fade-after (meters 130) :falloff-to (meters 130) :period (seconds 2) :length (seconds 0.017) :binding 298) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + ) + ) + +(defpartgroup group-gun-yellow-shot-hit-object + :id 102 + :duration (seconds 1.5) + :linger-duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 305 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 306 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 301 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 303 :fade-after (meters 40) :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 304 :fade-after (meters 130) :falloff-to (meters 130) :period (seconds 2) :length (seconds 0.017) :binding 298) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + ) + ) + +(defpart 298 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.0 0.5) + (:scale-x (meters 0.15) (meters 0.1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 64.0) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:fade-g -3.4 -3.4) + (:fade-a -0.21333334 -1.28) + (:accel-y (meters -0.00033333333) (meters -0.00083333335)) + (:friction 0.95 0.02) + (:timer (seconds 0.667) (seconds 0.33)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 304 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 4.0 12.0) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.225) (meters 0.05)) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 64.0 32.0) + (:omega (degrees 0.016875) (degrees 0.03375)) + (:vel-y (meters 0.2)) + (:fade-g -1.7 -1.7) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.95 0.02) + (:timer (seconds 0.667) (seconds 0.33)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.335) (seconds 0.33)) + (:next-launcher 307) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 308 + :init-specs ((:fade-a -0.96 -0.96)) + ) + +(defpart 301 + :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 128.0 128.0) + (:b 0.0 32.0) + (:a 24.0) + (:scalevel-x (meters 0.33333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.6857143) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 303 + :init-specs ((:num 1.0) + (:rot-x 12) + (:r 4096.0) + (:g 2867.2) + (:b 1638.4) + (:fade-b 5.12) + (:timer (seconds 0.8)) + (:flags (distort)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 302 + :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.026666667) (meters 0.053333335)) + (:scalevel-x (meters -0.0005) (meters -0.0005)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.7) + (:fade-b -0.53333336) + (:accel-y (meters -0.00016666666) (meters -0.00033333333)) + (:friction 0.7) + (: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 309) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 309 + :init-specs ((:fade-r -1.28) (:fade-a -0.96)) + ) + +(defpart 300 + :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 255.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 1.335)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.117)) + (:next-launcher 310) + ) + ) + +(defpart 310 + :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 306 + :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 255.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 1.335)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.117)) + (:next-launcher 311) + ) + ) + +(defpart 311 + :init-specs ((:scale-x (meters 4.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.05)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.75) + (:fade-b 0.0) + (:fade-a -0.6) + ) + ) + +(defpart 299 + :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 255.0) + (:b 255.0) + (:a 64.0) + (:scalevel-x (meters 0.16666667)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.05)) + (:next-launcher 312) + ) + ) + +(defpart 312 + :init-specs ((:scale-x (meters 3.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.02)) + (:scalevel-y :copy scalevel-x) + (:fade-b -5.1) + (:next-time (seconds 0.167)) + (:next-launcher 313) + ) + ) + +(defpart 313 + :init-specs ((:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.0018691589)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.14222223) + (:fade-b 0.0) + (:next-time (seconds 1.5)) + (:next-launcher 314) + ) + ) + +(defpart 314 + :init-specs ((:fade-g -2.2588236) (:fade-a -0.7529412)) + ) + +(defpart 305 + :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 255.0) + (:b 255.0) + (:a 64.0) + (:scalevel-x (meters 0.16666667)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.05)) + (:next-launcher 315) + ) + ) + +(defpart 315 + :init-specs ((:scale-x (meters 3.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.04)) + (:scalevel-y :copy scalevel-x) + (:fade-b -5.1) + (:next-time (seconds 0.167)) + (:next-launcher 316) + ) + ) + +(defpart 316 + :init-specs ((:fade-g -4.8) (:fade-a -1.6)) + ) + +(defpartgroup group-gun-yellow-shot-die + :id 103 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 249)) + ) + +(defpartgroup group-gun-dark-shot-hit + :id 104 + :duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 317 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 318 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 319 :period (seconds 3) :length (seconds 0.05)) + (sp-item 320 :fade-after (meters 60) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 321 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 322 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 323 :fade-after (meters 150) :falloff-to (meters 150) :period (seconds 3) :length (seconds 0.067) :offset 30) + ) + ) + +(defpart 323 + :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 324) + (:conerot-x '*sp-temp*) + ) + ) + +(defpart 322 + :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 324) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +(defpart 324 + :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 325) + ) + ) + +(defpart 325 + :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 326) + ) + ) + +(defpart 326 + :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 327) + ) + ) + +(defpart 327 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.1125)) + ) + +(defpart 318 + :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 328) + ) + ) + +(defpart 328 + :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 317 + :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 329) + ) + ) + +(defpart 329 + :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 321 + :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 330) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +(defpart 330 + :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 331) + ) + ) + +(defpart 331 + :init-specs ((:fade-r 0.0) (:fade-g -0.08695652) (:fade-a -0.18478261)) + ) + +(defpart 319 + :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 332) + (:conerot-x (degrees -1440) (degrees 2880)) + ) + ) + +(defpart 332 + :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 333) + ) + ) + +(defpart 333 + :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 334)) + ) + +(defpart 334 + :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 320 + :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-gun-green-shot-hit + :id 105 + :duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 335 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 336 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 337 :period (seconds 3) :length (seconds 0.05)) + (sp-item 338 :fade-after (meters 60) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 339 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 340 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 341 :fade-after (meters 150) :falloff-to (meters 150) :period (seconds 3) :length (seconds 0.067) :offset 30) + ) + ) + +(defpart 341 + :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 -6.2) + (:fade-g 0.0) + (:fade-b -10.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 342) + (:conerot-x '*sp-temp*) + ) + ) + +(defpart 340 + :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 -6.2) + (:fade-g 0.0) + (:fade-b -10.2) + (:fade-a -0.1254902) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.085)) + (:next-launcher 342) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +(defpart 342 + :init-specs ((:fade-r -5.0) + (:fade-g -2.1666667) + (:fade-a -0.062068965 -0.72) + (:next-time (seconds 0.05) (seconds 0.047)) + (:next-launcher 343) + ) + ) + +(defpart 343 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -1.7) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 344) + ) + ) + +(defpart 344 + :init-specs ((:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.5833333) + (:next-time (seconds 0.5) (seconds 0.097)) + (:next-launcher 345) + ) + ) + +(defpart 345 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.1125)) + ) + +(defpart 336 + :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 -4.266667) + (:fade-g 0.0) + (:fade-b -8.5) + (: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 346) + ) + ) + +(defpart 346 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.7066667) + (:fade-g -0.85333335) + (:fade-a -0.64) + ) + ) + +(defpart 335 + :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 -4.266667) + (:fade-g 0.0) + (:fade-b -8.5) + (: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 347) + ) + ) + +(defpart 347 + :init-specs ((:scalevel-x (meters -0.2857143)) + (:scalevel-y :copy scalevel-x) + (:fade-r -3.6571429) + (:fade-g -1.8285714) + (:fade-a -1.3714286) + ) + ) + +(defpart 339 + :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 -3.1) + (:fade-g 0.0) + (:fade-b -5.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 348) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +(defpart 348 + :init-specs ((:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.33333334) + (:fade-g -0.14444445) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 349) + ) + ) + +(defpart 349 + :init-specs ((:fade-r -0.08695652) (:fade-g 0.0) (:fade-a -0.18478261)) + ) + +(defpart 337 + :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 1.2) + (:fade-g 3.3) + (:fade-b 0.4) + (: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 350) + (:conerot-x (degrees -1440) (degrees 2880)) + ) + ) + +(defpart 350 + :init-specs ((:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.1666667) + (:fade-g -1.0833334) + (:fade-b -2.1666667) + (:fade-a -0.46666667) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 351) + ) + ) + +(defpart 351 + :init-specs ((:fade-r 0.0) (:fade-g -1.7) (:fade-b -0.8) (:fade-a -1.0) (:next-time (seconds 0.167)) (:next-launcher 352)) + ) + +(defpart 352 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.17) + (:fade-b -0.3) + (:fade-a -0.1) + ) + ) + +(defpart 338 + :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 64.0) + (:g 192.0 64.0) + (:b 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)) + ) + ) + +(defpart 353 + :init-specs ((:texture (redpuff 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 20.0) + (:b 128.0) + (:a 0.0) + (:omega (degrees 0)) + (:vel-z (meters 0.13333334)) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a 3.4) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'sparticle-red-2-glow-trail-halt) + (:next-time (seconds 0.25)) + (:next-launcher 354) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 354 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:next-time (seconds 0.017) (seconds 0.247)) + (:next-launcher 355) + ) + ) + +(defpart 355 + :init-specs ((:scalevel-x (meters -0.0033333334) (meters -0.006666667)) (:scalevel-y :copy scalevel-x) (:fade-a -1.7)) + ) + +(defpart 356 + :init-specs ((:texture (blue-beam-dest level-default-water)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1.5)) + (:scale-y (meters 1)) + (:r 128.0 64.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpart 357 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 2.0) + (:scale-x (meters 1.5)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 40.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-fade-alpha-dist) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup gun-blue-muzzle-flare + :id 106 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 358) (sp-item 359)) + ) + +(defpartgroup group-gun-blue-2-muzzle-flare + :id 107 + :duration (seconds 1) + :linger-duration (seconds 1) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 360) (sp-item 361) (sp-item 362)) + ) + +(defpart 360 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 1)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3599)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 20.0 10.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 361 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 1.0 20.0) + (:scale-x (meters 0.1) (meters 0.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3598.0002)) + (:scale-y (meters 1) (meters 0.5)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:fade-a -1.6) + (:timer (seconds 0.3) (seconds 0.197)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.035)) + (:next-launcher 363) + ) + ) + +(defpart 362 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 5.0) + (:scale-x (meters 1) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3598.0002)) + (:scale-y (meters 1) (meters 0.5)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:fade-a -1.6) + (:timer (seconds 0.3) (seconds 0.197)) + (:flags (sp-cpuinfo-flag-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 363) + ) + ) + +(defpart 363 + :init-specs ((:r 64.0) (:g 64.0) (:fade-r -2.0) (:fade-g -0.8) (:fade-a -4.0)) + ) + +(defpart 364 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:scale-y (meters 3) (meters 0.6)) + (:r 40.0) + (:g 200.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.08)) + (:fade-r -4.0) + (:fade-g -3.2) + (:fade-a -6.4) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpartgroup group-gun-blue3-shot-impact + :id 108 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 285 :fade-after (meters 120) :falloff-to (meters 140) :period (seconds 2) :length (seconds 0.017)) + (sp-item 286 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +(defpart 285 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 2) (meters 2)) + (:rot-x 4) + (:scale-y (meters 0.05) (meters 0.05)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 128.0) + (:omega (degrees 0.0225)) + (:vel-y (meters 0.016666668) (meters 0.1)) + (:fade-r -10.2 -10.2) + (:fade-g -5.1 -5.1) + (:friction 0.85) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 286 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.1) (meters 0.4)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 200.0) + (:g 200.0 30.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -10.2) + (:fade-g -6.375) + (:fade-a -8.5 -8.5) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + ) + ) + +(defpart 358 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 40.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:fade-a -5.1) + (:timer (seconds 0.05) (seconds 0.097)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 4096.0) + (:func 'sparticle-track-gun-joint) + ) + ) + +(defpart 359 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.0 0.3) + (:scale-x (meters 0.2) (meters 1.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 50.0) + (:g 50.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0) (meters -0.006666667)) + (:rotvel-z (degrees -0.26666668) (degrees 0.53333336)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.017) (seconds 0.247)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-track-gun-joint) + ) + ) + +(defpart 365 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (: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-3 sp-cpuinfo-flag-14 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 366 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 4.0) + (:scale-x (meters 1) (meters 2)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 1) (meters 2)) + (:r 50.0) + (:g 50.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0) (meters 0.006666667)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.017) (seconds 0.065)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-texture-animate) + ) + ) + +(defpart 367 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 0.1 0.3) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 100.0) + (:b 255.0) + (:a 128.0 128.0) + (:scalevel-x (meters 0.016666668) (meters 0.033333335)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.64) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-texture-animate) + ) + ) + +(defpart 368 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.0 0.3) + (:scale-x (meters 0.2) (meters 1.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 50.0) + (:g 50.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0) (meters -0.006666667)) + (:rotvel-z (degrees -0.26666668) (degrees 0.53333336)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.017) (seconds 0.247)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-track-gun-joint) + ) + ) + +(defpartgroup group-red-2-charge + :id 109 + :duration (seconds 0) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 369 :flags (sp7)) + (sp-item 370 :flags (sp7)) + (sp-item 371 :flags (sp7)) + (sp-item 372 :flags (sp6)) + (sp-item 373 :flags (sp6)) + ) + ) + +(defpart 369 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-converge) + (:num 0.5 0.5) + (:x (meters 1)) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:scalevel-x (meters -0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.035555556) + (:accel-x (meters -0.00033333333)) + (:friction 0.98 0.01) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'sparticle-red-2-converge) + (:rotate-x (degrees 0) (degrees 36000)) + (:rotate-y (degrees 0) (degrees 36000)) + (:rotate-z (degrees 0) (degrees 36000)) + ) + ) + +(defpart 370 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-converge) + (:num 0.5 0.5) + (:x (meters 1)) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:scalevel-x (meters -0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.035555556) + (:accel-x (meters -0.00033333333)) + (:friction 0.98 0.01) + (:timer (seconds 1.5)) + (:flags (left-multiply-quat)) + (:func 'sparticle-red-2-converge) + (:rotate-x (degrees 0) (degrees 36000)) + (:rotate-y (degrees 0) (degrees 36000)) + (:rotate-z (degrees 0) (degrees 36000)) + ) + ) + +(defpart 371 + :init-specs ((:texture (specs level-default-sprite)) + (:num 0.1) + (:scale-x (meters 5) (meters 2)) + (: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-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-track-gun-joint-player-y) + (:next-time (seconds 0.335)) + (:next-launcher 374) + ) + ) + +(defpart 374 + :init-specs ((:fade-a 0.0)) + ) + +(defpart 372 + :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 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 'sparticle-track-gun-joint) + ) + ) + +(defpart 373 + :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 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) + (:func 'sparticle-track-gun-joint) + ) + ) + +(defun sparticle-track-gun-joint-player-y ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (-> arg1 key) + (let ((v1-1 *target*) + (a1-1 36) + ) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> v1-1 node-list data a1-1)) + ) + (set! (-> arg2 x) (-> *target* gun fire-point x)) + (set! (-> arg2 y) (+ 4096.0 (-> *target* control trans y))) + (set! (-> arg2 z) (-> *target* gun fire-point z)) + 0 + (none) + ) + +(define *last-player-pos* (new 'static 'vector)) + +(defun birth-func-converge ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (local-vars (v1-2 uint128) (v1-3 uint128)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + ) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack 'vector4w)) + ) + (set! (-> s3-0 quad) (-> *target* gun fire-point quad)) + (set! (-> s5-0 x) (- (-> arg2 x) (-> s3-0 x))) + (set! (-> s5-0 y) (- (-> arg2 y) (-> s3-0 y))) + (set! (-> s5-0 z) (- (-> arg2 z) (-> s3-0 z))) + (vector-normalize! s5-0 1.0) + (.lvf vf1 (&-> s5-0 quad)) + (vftoi12.xyzw vf2 vf1) + (.mov v1-2 vf2) + (.ppach v1-3 (the-as uint128 0) v1-2) + (set! (-> s4-0 quad) v1-3) + (vitof15.xyzw vf1 vf2) + (.svf (&-> s5-0 quad) vf1) + (set! (-> arg1 user-float) (the-as float (-> s4-0 x))) + (set! (-> arg1 omega) (the-as float (-> s4-0 y))) + ) + (none) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun sparticle-red-2-converge ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (local-vars (v1-4 uint128) (v1-5 uint128) (v1-6 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + ) + (-> arg1 key) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-2 (new 'stack 'vector4w))) + (set! (-> v1-2 x) (the-as int (-> arg1 user-float))) + (set! (-> v1-2 y) (the-as int (-> arg1 omega))) + (let ((v1-3 (-> v1-2 quad))) + (.pextlh v1-4 v1-3 0) + ) + ) + (.pw.sra v1-5 v1-4 16) + (.mov vf2 v1-5) + (vitof12.xyzw vf1 vf2) + (.svf (&-> s4-0 quad) vf1) + (.mov v1-6 vf1) + (-> arg1 timer) + 0.0 + 0.0 + (let* ((f0-3 (* 0.0022222223 (the float (-> arg1 timer)))) + (f0-4 (* f0-3 f0-3)) + (f0-5 (- 1.0 f0-4)) + ) + (vector-normalize! s4-0 (lerp 10240.0 0.0 f0-5)) + ) + (set! (-> s5-0 quad) (-> *target* gun fire-point quad)) + (set! (-> arg2 x) (+ (-> s4-0 x) (-> s5-0 x))) + (set! (-> arg2 y) (+ (-> s4-0 y) (-> s5-0 y))) + (set! (-> arg2 z) (+ (-> s4-0 z) (-> s5-0 z))) + ) + (none) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun sparticle-red-2-glow-trail-halt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((f30-0 (-> arg1 omega)) + (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* ((f0-4 (vector-normalize-ret-len! s5-0 1.0)) + (f0-6 (- (* 300.0 f0-4) (* f30-0 (seconds-per-frame)))) + (f0-7 (fmax 0.0 f0-6)) + (f0-8 (* 0.0033333334 f0-7)) + ) + (vector-normalize! s5-0 f0-8) + ) + (set! (-> arg1 vel-sxvel x) (-> s5-0 x)) + (set! (-> arg1 vel-sxvel y) (-> s5-0 y)) + (set! (-> arg1 vel-sxvel z) (-> s5-0 z)) + ) + (none) + ) + +(define *gun-dark-3-nuke-fade-time* (seconds 2)) + +(when (or (zero? *gun-dark-3-nuke-fade-curve*) (!= loading-level global)) + (set! *gun-dark-3-nuke-fade-curve* (new 'loading-level 'curve-color-piecewise)) + (curve-color-piecewise-method-10 *gun-dark-3-nuke-fade-curve* 5 'loading-level (the-as uint #f)) + ) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 0 first) 0.0) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 0 second x) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 0 second y) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 0 second z) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 0 second w) 0.0) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 1 first) 0.05) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 1 second x) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 1 second y) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 1 second z) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 1 second w) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 2 first) 0.2) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 2 second x) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 2 second y) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 2 second z) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 2 second w) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 3 first) 0.5) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 3 second x) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 3 second y) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 3 second z) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 3 second w) 0.78125) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 4 first) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 4 second x) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 4 second y) 0.78125) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 4 second z) 0.0) + +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 4 second w) 0.0) + +(define *gun-dark-3-nuke-blur-segs* (the-as uint 10)) + +(define *gun-dark-3-nuke-blur-time* (seconds 5)) + +(when (or (zero? *gun-dark-3-nuke-blur-curve*) (!= loading-level global)) + (set! *gun-dark-3-nuke-blur-curve* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *gun-dark-3-nuke-blur-curve* 4 'loading-level (the-as int #f)) + ) + +(set! (-> *gun-dark-3-nuke-blur-curve* pts data 0 first) 0.0) + +(set! (-> *gun-dark-3-nuke-blur-curve* pts data 0 second) 0.0) + +(set! (-> *gun-dark-3-nuke-blur-curve* pts data 1 first) 0.1) + +(set! (-> *gun-dark-3-nuke-blur-curve* pts data 1 second) 1.0) + +(set! (-> *gun-dark-3-nuke-blur-curve* pts data 2 first) 0.5) + +(set! (-> *gun-dark-3-nuke-blur-curve* pts data 2 second) 0.8) + +(set! (-> *gun-dark-3-nuke-blur-curve* pts data 3 first) 1.0) + +(set! (-> *gun-dark-3-nuke-blur-curve* pts data 3 second) 0.0) + +(define *gun-dark-3-mushroom-speed* 8192.0) + +(define *gun-dark-3-mushroom-size-time* (seconds 5)) + +(when (or (zero? *gun-dark-3-nuke-mushroom-size-curve-x*) (!= loading-level global)) + (set! *gun-dark-3-nuke-mushroom-size-curve-x* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *gun-dark-3-nuke-mushroom-size-curve-x* 2 'loading-level (the-as int #f)) + ) + +(set! (-> *gun-dark-3-nuke-mushroom-size-curve-x* pts data 0 first) 0.0) + +(set! (-> *gun-dark-3-nuke-mushroom-size-curve-x* pts data 0 second) 32768.0) + +(set! (-> *gun-dark-3-nuke-mushroom-size-curve-x* pts data 1 first) 1.0) + +(set! (-> *gun-dark-3-nuke-mushroom-size-curve-x* pts data 1 second) 49152.0) + +(when (or (zero? *gun-dark-3-nuke-mushroom-size-curve-y*) (!= loading-level global)) + (set! *gun-dark-3-nuke-mushroom-size-curve-y* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *gun-dark-3-nuke-mushroom-size-curve-y* 2 'loading-level (the-as int #f)) + ) + +(set! (-> *gun-dark-3-nuke-mushroom-size-curve-y* pts data 0 first) 0.0) + +(set! (-> *gun-dark-3-nuke-mushroom-size-curve-y* pts data 0 second) 16384.0) + +(set! (-> *gun-dark-3-nuke-mushroom-size-curve-y* pts data 1 first) 1.0) + +(set! (-> *gun-dark-3-nuke-mushroom-size-curve-y* pts data 1 second) 20480.0) + +(defpartgroup group-gun-dark3-stalk + :id 110 + :duration (seconds 0.085) + :linger-duration (seconds 8) + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 375 :flags (sp3)) (sp-item 376) (sp-item 377) (sp-item 378 :flags (sp3))) + ) + +(defpart 377 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:num 10.0) + (:x (meters 0.5) (meters 1)) + (:y (meters -4) (meters 8)) + (:scale-x (meters 1)) + (:rot-x 4) + (:rot-z (degrees -90)) + (:scale-y (meters 1)) + (:r 255.0) + (:g 120.0 40.0) + (:b 40.0 10.0) + (:a 128.0) + (:scalevel-x (meters 0.0016666667) (meters 0.0033333334)) + (:scalevel-y (meters 0.00066666666) (meters 0.00066666666)) + (:fade-r -0.042666666) + (:fade-g -0.042666666) + (:fade-b -0.042666666) + (:fade-a -0.042666666) + (:accel-y (meters 0.00033333333) (meters 0.0016666667)) + (:friction 0.82) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14)) + (:next-time (seconds 5)) + (:next-launcher 379) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 379 + :init-specs ((:fade-a -0.08533333)) + ) + +(defpart 376 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:x (meters 0.5) (meters 1)) + (:y (meters -4) (meters 8)) + (:scale-x (meters 1)) + (:rot-x 4) + (:rot-z (degrees -90)) + (:scale-y (meters 1)) + (:r 255.0) + (:g 160.0 40.0) + (:b 90.0 30.0) + (:a 255.0) + (:scalevel-x (meters 0.0016666667) (meters 0.0033333334)) + (:scalevel-y (meters 0.00066666666) (meters 0.00066666666)) + (:fade-a -0.1275 -0.1275) + (:accel-y (meters 0.00033333333) (meters 0.0016666667)) + (:friction 0.82) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 378 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 5.5)) + (:scale-x (meters 17)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 90)) + (:scale-y (meters 7.2)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:omega (degrees 6761.25)) + (:vel-y (meters 0.0056666667)) + (:fade-a -0.10333333) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 375 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 5)) + (:scale-x (meters 30)) + (:rot-x (degrees 22.5)) + (:scale-y (meters 50)) + (:r 255.0) + (:g 128.0) + (:b 40.0) + (:a 255.0) + (:omega (degrees 6761.25)) + (:fade-a -0.102) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpartgroup group-gun-dark3-ring + :id 111 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 380 :flags (is-3d sp3)) + (sp-item 381 :flags (is-3d sp3)) + (sp-item 382 :flags (is-3d sp3)) + (sp-item 383 :period (seconds 10) :length (seconds 3)) + (sp-item 384 :flags (sp7) :period (seconds 10) :length (seconds 6)) + ) + ) + +(defpart 380 + :init-specs ((:texture (ring level-default-sprite)) + (:num 5.0) + (:y (meters 7) (meters 0.3)) + (:scale-x (meters 6)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 50.0) + (:b 0.0) + (:a 1.0) + (:fade-a 0.000100000005) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 3.335)) + (:next-launcher 385) + ) + ) + +(defpart 385 + :init-specs ((:scalevel-x (meters 0.008333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.21333334) + (:next-time (seconds 2)) + (:next-launcher 386) + ) + ) + +(defpart 386 + :init-specs ((:fade-a -0.425)) + ) + +(defpart 381 + :init-specs ((:texture (ring level-default-sprite)) + (:num 3.0) + (:y (meters 8) (meters 0.3)) + (:scale-x (meters 10)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 50.0) + (:b 0.0) + (:a 1.0) + (:fade-a 0.000100000005) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 3.835)) + (:next-launcher 385) + ) + ) + +(defpart 382 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:y (meters 9) (meters 0.3)) + (:scale-x (meters 14)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 50.0) + (:b 0.0) + (:a 1.0) + (:fade-a 0.000100000005) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 4.335)) + (:next-launcher 385) + ) + ) + +(defpart 383 + :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 80.0) + (:b 30.0) + (:a 64.0 64.0) + (:vel-z (meters 0.026666667) (meters 0.026666667)) + (:scalevel-x (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.07111111 -0.07111111) + (:timer (seconds 6)) + (:flags (sp-cpuinfo-flag-3)) + (:conerot-x (degrees -2) (degrees 4)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 384 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 3)) + (:y (meters -2)) + (:scale-x (meters 6)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 30.0) + (:a 64.0) + (:vel-y (meters -0.006666667) (meters -0.01)) + (:scalevel-x (meters -0.006666667) (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 160) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(define *gun-dark-3-nuke-fade-time-small* (seconds 6)) + +(when (or (zero? *gun-dark-3-nuke-fade-curve-small*) (!= loading-level global)) + (set! *gun-dark-3-nuke-fade-curve-small* (new 'loading-level 'curve-color-piecewise)) + (curve-color-piecewise-method-10 *gun-dark-3-nuke-fade-curve-small* 5 'loading-level (the-as uint #f)) + ) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 0 first) 0.0) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 0 second x) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 0 second y) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 0 second z) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 0 second w) 0.0) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 1 first) 0.05) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 1 second x) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 1 second y) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 1 second z) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 1 second w) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 2 first) 0.2) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 2 second x) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 2 second y) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 2 second z) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 2 second w) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 3 first) 0.5) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 3 second x) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 3 second y) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 3 second z) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 3 second w) 0.78125) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 4 first) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 4 second x) 1.0) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 4 second y) 0.78125) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 4 second z) 0.0) + +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 4 second w) 0.0) + +(define *gun-dark-3-nuke-blur-segs-small* (the-as uint 10)) + +(define *gun-dark-3-nuke-blur-time-small* (seconds 6)) + +(when (or (zero? *gun-dark-3-nuke-blur-curve-small*) (!= loading-level global)) + (set! *gun-dark-3-nuke-blur-curve-small* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *gun-dark-3-nuke-blur-curve-small* 4 'loading-level (the-as int #f)) + ) + +(set! (-> *gun-dark-3-nuke-blur-curve-small* pts data 0 first) 0.0) + +(set! (-> *gun-dark-3-nuke-blur-curve-small* pts data 0 second) 0.0) + +(set! (-> *gun-dark-3-nuke-blur-curve-small* pts data 1 first) 0.1) + +(set! (-> *gun-dark-3-nuke-blur-curve-small* pts data 1 second) 1.0) + +(set! (-> *gun-dark-3-nuke-blur-curve-small* pts data 2 first) 0.5) + +(set! (-> *gun-dark-3-nuke-blur-curve-small* pts data 2 second) 0.8) + +(set! (-> *gun-dark-3-nuke-blur-curve-small* pts data 3 first) 1.0) + +(set! (-> *gun-dark-3-nuke-blur-curve-small* pts data 3 second) 0.0) + +(defpartgroup group-gun-dark3-missile-trail + :id 112 + :duration (seconds 3) + :linger-duration (seconds 3) + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 387)) + ) + +(defpartgroup group-gun-dark3-missile-trail-smoke + :id 113 + :duration (seconds 3) + :linger-duration (seconds 3) + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 388 :flags (sp7))) + ) + +(defpart 387 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.7) (meters 0.1)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 100.0) + (:b 30.0) + (:a 128.0 55.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 388 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (: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 24.0 32.0) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-gun-dark3-small + :id 114 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 389 :period (seconds 15) :length (seconds 6)) + (sp-item 390 :period (seconds 15) :length (seconds 3)) + (sp-item 391 :period (seconds 15) :length (seconds 0.035)) + (sp-item 392 :flags (sp3)) + ) + ) + +(defpart 389 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 8.0) + (:x (meters -10) (meters 20)) + (:y (meters -10) (meters 20)) + (:z (meters -10) (meters 20)) + (:scale-x (meters 0.04) (meters 0.04)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 20.0 40.0) + (:b 0.0) + (:a 128.0 128.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0) (meters 0.01)) + (:fade-a -0.2125 -0.2125) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.017)) + (:next-launcher 393) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 393 + :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 393) + ) + ) + +(defpart 390 + :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 60.0 20.0) + (:b 30.0) + (:a 64.0) + (:vel-z (meters 0.026666667) (meters 0.026666667)) + (:scalevel-x (meters 0.02)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.07111111 -0.07111111) + (:timer (seconds 6)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees -8) (degrees 16)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 391 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 20.0) + (:scale-x (meters 3)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0 20.0) + (:b 30.0) + (:a 255.0) + (:vel-y (meters 0.00033333333) (meters 0.0033333334)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.032) + (:fade-b -0.012) + (:fade-a -0.102 -0.102) + (:friction 0.999) + (:timer (seconds 10)) + (: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 392 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30)) + (:rot-x (degrees 22.5)) + (:scale-y (meters 50)) + (:r 255.0) + (:g 128.0) + (:b 40.0) + (:a 255.0) + (:omega (degrees 6761.25)) + (:fade-a -0.17) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpartgroup group-gun3-dark-scorched-earth + :id 115 + :flags (sp0 sp1) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 394 :flags (is-3d sp3 sp7))) + ) + +(defpart 394 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 3.0) + (:scale-x (meters 4) (meters 6)) + (:scale-y (meters 5) (meters 7)) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 64.0) + (:timer (seconds 10)) + (:flags (left-multiply-quat)) + (:next-time (seconds 6)) + (:next-launcher 395) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 395 + :init-specs ((:fade-a -0.21333334)) + ) + +(defpartgroup group-gun-dark2-black-hole + :id 116 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 396 :flags (sp6)) (sp-item 397 :flags (sp6))) + ) + +(defpartgroup group-gun-dark2-black-hole-glow + :id 117 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 396 :flags (sp6)) (sp-item 397 :flags (sp6))) + ) + +(defpart 396 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +(defpart 397 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 100.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-gravity-gun-rise + :id 118 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 398 :flags (sp7)) (sp-item 399 :flags (sp7))) + ) + +(defpartgroup group-gravity-gun-rise-no-flare + :id 119 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 398 :flags (sp7))) + ) + +(defpart 398 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters -0.3)) + (:scale-x (meters 0.05) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 200.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 0.1125)) + (:scalevel-y (meters -0.00006666667)) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters 0.0001) (meters 0.0001)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 399 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.06) + (:scale-x (meters 0)) + (:rot-x (degrees 45)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 100.0 50.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 glow)) + (:userdata 8192.0) + (:next-time (seconds 0.5) (seconds 0.497)) + (:next-launcher 400) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 400 + :init-specs ((:scalevel-x (meters -0.0033333334) (meters -0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +(defpartgroup group-gravity-gun-muzzle + :id 120 + :duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 401 :period (seconds 5) :length (seconds 0.017)) + (sp-item 402 :period (seconds 5) :length (seconds 0.017)) + ) + ) + +(defpart 401 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-x (degrees 22.5)) + (:scale-y (meters 10)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 6767.9995)) + (:scalevel-x (meters -0.033333335)) + (:scalevel-y (meters 0.4)) + (: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 402 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 22.5)) + (:scale-y (meters 15)) + (:r 32.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 6767.9995)) + (:scalevel-x (meters 0.1)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85333335) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpartgroup group-gun-dark-1-upgrade-shot + :id 121 + :duration (seconds 0) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 403 :flags (sp7)) (sp-item 404 :flags (sp7)) (sp-item 405 :flags (sp3 sp7))) + ) + +(defpart 403 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 0.5) + (:scale-x (meters 3) (meters 0.25)) + (: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 404 + :init-specs ((:texture (water-radiate level-default-sprite)) + (:num 2.0) + (:scale-x (meters 5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 1) (meters 1)) + (:r 16.0) + (:g 32.0 32.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters -0.016666668)) + (:scalevel-x (meters -0.016666668) (meters 0.033333335)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters -0.0016666667)) + (: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 406) + (:conerot-x (degrees -180) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 406 + :init-specs ((:a 255.0) (:fade-a -1.28)) + ) + +(defpart 405 + :init-specs ((:num 1.0) + (:rot-x 8) + (:r 16384.0) + (:g 1024.0) + (:b 4096.0) + (:timer (seconds 1.335)) + (:flags (distort)) + (:func 'sparticle-track-root) + (:rotate-y (degrees 0)) + ) + ) + +(defun spt-func-part-gun-dark-1-upgrade-shot-edges ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-track-root arg0 arg1 arg2) + (sparticle-2d-spline-align-instant arg0 arg1 (the-as sprite-vec-data-2d arg2)) + (none) + ) 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 00d7fcb465..f681b1562b 100644 --- a/goal_src/jak3/engine/target/gun/gun-red-shot.gc +++ b/goal_src/jak3/engine/target/gun/gun-red-shot.gc @@ -5,5 +5,2641 @@ ;; name in dgo: gun-red-shot ;; dgos: GAME +(define-extern *impact-blur* curve2d-piecewise) +(define-extern *shockwave-blur-red-2* curve2d-piecewise) +(declare-type gun-red-shot process-drawable) +(define-extern gun-red-shot-init-by-other (function vector vector object :behavior gun-red-shot)) + ;; DECOMP BEGINS +(deftype gun-red-shot (process-drawable) + ((parent (pointer gun) :override) + (root collide-shape-moving :override) + (probe-count int32) + (probe-mask uint32) + (actor-count int32) + (attack-id uint32) + (start-pos vector :inline) + (start-dir vector :inline) + (start-rot vector :inline) + (probe-dir vector 19 :inline) + ) + (:state-methods + blocked + debug-idle + idle + ) + (:methods + (init-probes! (_type_ collide-shape) none) + (check-blocked? (_type_) symbol) + (stub (_type_) none) + (find-targets (_type_) none) + (setup-probes (_type_) none) + (do-collision (_type_ vector) none) + (send-attack! (_type_ process-drawable touching-shapes-entry) none) + ) + ) + + +(deftype gun-red-3-grenade (projectile-bounce) + ((blast-radius float) + (should-explode-soon? symbol) + (explode-tick-time time-frame) + (birth-time time-frame) + (immediate-detonation? symbol) + (explode-delay-time time-frame) + ) + (:state-methods + impact-tiny + ) + (:methods + (check-should-explode (_type_) int) + (go-impact (_type_) object) + (find-and-damage-targets (_type_) object) + ) + ) + + +(defskelgroup skel-gun-red-3-grenade gun gun-grenade-lod0-jg gun-grenade-idle-ja + ((gun-grenade-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 0.2) + :texture-level 10 + ) + +(defmethod setup-collision! ((this gun-red-3-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 crate civilian enemy obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set-collide-as! (-> this root) (collide-spec projectile)) + (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 symbol vs object. +(defmethod handle-proj-hit! ((this gun-red-3-grenade) (arg0 process) (arg1 event-message-block)) + (go (method-of-object this impact)) + #t + ) + +(defmethod projectile-method-40 ((this gun-red-3-grenade)) + ;; og:preserve-this increased stack size from 256 + 512 + ) + +(defmethod init-proj-settings! ((this gun-red-3-grenade)) + (set! (-> this attack-mode) #f) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-gun-red-3-grenade" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((t9-2 (method-of-type projectile-bounce init-proj-settings!))) + (t9-2 this) + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.2)) + (sound-play "red3-fire") + (let* ((v1-6 *game-info*) + (a0-9 (+ (-> v1-6 attack-id) 1)) + ) + (set! (-> v1-6 attack-id) a0-9) + (set! (-> this attack-id) a0-9) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 87) this)) + (set! (-> this blast-radius) 81920.0) + (set! (-> this max-speed) 327680.0) + (set! (-> this timeout) (seconds 3)) + (set! (-> this should-explode-soon?) #f) + (set-time! (-> this birth-time)) + (let ((v1-15 (new 'stack-no-clear 'vector))) + (set! (-> v1-15 x) 2.5) + (set! (-> v1-15 y) 2.5) + (set! (-> v1-15 z) 2.5) + (set! (-> v1-15 w) 1.0) + (set! (-> this root scale quad) (-> v1-15 quad)) + ) + (set! (-> this immediate-detonation?) #f) + (let ((s5-2 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-2 tracked-obj) (process->handle this)) + (set! (-> s5-2 appearance) *red-shot-3-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-28 (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* light-trail-tracker-projectile (+ v1-28 8192) 1)) + ) + (when s4-2 + (let ((t9-9 (method-of-type process activate))) + (t9-9 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 + (none) + ) + +(defmethod projectile-method-32 ((this gun-red-3-grenade)) + (cond + ((not (do-fire-backcheck (-> this root trans) (-> this root transv))) + (let ((v1-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this root transv) 1.0))) + (vector+float*! (-> this root trans) (-> this root trans) v1-3 -14336.0) + ) + (set! (-> this immediate-detonation?) #t) + (go (method-of-object this impact)) + ) + (else + (call-parent-method this) + ) + ) + 0 + (none) + ) + +(defmethod go-impact ((this gun-red-3-grenade)) + (cond + ((-> this should-explode-soon?) + (if (time-elapsed? (-> this explode-tick-time) (-> this explode-delay-time)) + (go (method-of-object this impact)) + ) + ) + (else + (case (check-should-explode this) + ((1) + (set! (-> this should-explode-soon?) #t) + (let ((v0-0 (the-as object (current-time)))) + (set! (-> this explode-tick-time) (the-as time-frame v0-0)) + v0-0 + ) + ) + ((2) + (go (method-of-object this impact)) + ) + ) + ) + ) + ) + +(defmethod find-and-damage-targets ((this gun-red-3-grenade)) + (local-vars (v1-21 float) (v1-45 float)) + (with-pp + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (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-vehicle) + (let ((s4-0 (send-event-function *target* a1-0))) + (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)) + (let* ((s1-0 (-> s3-0 s2-0)) + (a0-8 (if (type? s1-0 collide-shape) + s1-0 + ) + ) + ) + (when a0-8 + (let* ((s0-0 (-> a0-8 process)) + (s1-1 (if (type? s0-0 process-focusable) + s0-0 + ) + ) + ) + (when s1-1 + (when (and (!= s4-0 s1-1) + (not (focus-test? (the-as process-focusable s1-1) disable dead inactive)) + (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)) + ) + (+! (-> *game-info* shots-hit 1) 1.0) + (let ((s0-2 + (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable s1-1) 3) (-> this root trans)) + ) + ) + 0.0 + (.lvf vf1 (&-> s0-2 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) + (let ((f0-4 v1-21) + (f1-1 (-> this blast-radius)) + ) + (if (>= (* f1-1 f1-1) f0-4) + (send-event + s1-1 + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> this attack-id)) + (damage 12.0) + (vehicle-damage-factor 3.0) + (vehicle-impulse-factor 1.0) + (mode 'explode) + (attacker-velocity s0-2) + (penetrate-using (penetrate explode)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (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) s5-0) (-> s5-0 w))) + (when (and (!= s4-0 s3-1) + (not (focus-test? s3-1 disable dead inactive)) + (logtest? (process-mask crate enemy guard vehicle civilian) (-> s3-1 mask)) + (nonzero? (-> s3-1 control root-prim prim-core collide-with)) + ) + (+! (-> *game-info* shots-hit 1) 1.0) + (let ((s5-2 (vector-! (new 'stack-no-clear 'vector) (get-trans s3-1 3) (-> this root trans)))) + 0.0 + (.lvf vf1 (&-> s5-2 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-45 vf1) + (let ((f0-12 v1-45) + (f1-6 (-> this blast-radius)) + ) + (if (>= (* f1-6 f1-6) f0-12) + (send-event + s3-1 + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> this attack-id)) + (damage 12.0) + (vehicle-damage-factor 3.0) + (vehicle-impulse-factor 1.0) + (mode 'explode) + (attacker-velocity s5-2) + (penetrate-using (penetrate explode)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + +(defmethod check-should-explode ((this gun-red-3-grenade)) + (local-vars + (sv-1680 vector) + (sv-1684 vector) + (sv-1688 float) + (sv-1692 float) + (sv-1696 symbol) + (sv-1744 vector) + (sv-1748 vector) + (sv-1752 float) + (sv-1756 float) + (sv-1760 symbol) + ) + (with-pp + (let ((s4-0 (new 'stack-no-clear 'vector)) + (gp-0 #f) + ) + (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-vehicle) + (let ((s3-0 (send-event-function *target* a1-0))) + (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)) + (let* ((s0-0 (-> s2-0 s1-0)) + (a0-8 (if (type? s0-0 collide-shape) + s0-0 + ) + ) + ) + (when a0-8 + (let* ((s0-1 (-> a0-8 process)) + (a0-10 (if (type? s0-1 process-focusable) + s0-1 + ) + ) + ) + (when a0-10 + (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)) + (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?)) + ) + ) + (set! sv-1680 + (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable a0-10) 3) (-> this root trans)) + ) + (set! sv-1684 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this root transv) 1.0)) + (set! sv-1688 (the-as float 0.0)) + (set! sv-1692 (the-as float 0.0)) + (set! sv-1696 (time-elapsed? (-> this birth-time) (seconds 0.05))) + (set! sv-1688 (vector-normalize-ret-len! sv-1680 1.0)) + (set! sv-1692 (vector-dot sv-1680 sv-1684)) + (when (< sv-1688 (-> s4-0 w)) + (cond + ((and (< 0.0 sv-1692) sv-1696) + (set! gp-0 #t) + (set! (-> this explode-delay-time) + (the-as time-frame (min 150 (the int (* 300.0 (/ sv-1688 (vector-length (-> this root transv))) sv-1692)))) + ) + ) + ((< sv-1688 8192.0) + (return 2) + ) + ((and (not sv-1696) (< (seconds 0.05) (- (current-time) (-> this birth-time)))) + (return 2) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let* ((s1-1 *target*) + (s2-1 (if (type? s1-1 process-focusable) + s1-1 + ) + ) + ) + (when (and s2-1 (< (vector-vector-distance (get-trans s2-1 0) s4-0) (-> s4-0 w))) + (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)) + (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?)) + ) + ) + (set! sv-1744 (vector-! (new 'stack-no-clear 'vector) (get-trans s2-1 3) (-> this root trans))) + (set! sv-1748 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this root transv) 1.0)) + (set! sv-1752 (the-as float 0.0)) + (set! sv-1756 (the-as float 0.0)) + (set! sv-1760 (time-elapsed? (-> this birth-time) (seconds 0.05))) + (set! sv-1752 (vector-normalize-ret-len! sv-1744 1.0)) + (set! sv-1756 (vector-dot sv-1744 sv-1748)) + (when (< sv-1752 (-> s4-0 w)) + (cond + ((and (< 0.0 sv-1756) sv-1760) + (set! gp-0 #t) + (set! (-> this explode-delay-time) + (the-as time-frame (min 150 (the int (* 300.0 (/ sv-1752 (vector-length (-> this root transv))) sv-1756)))) + ) + ) + ((< sv-1752 8192.0) + (return 2) + ) + ((and (not sv-1760) (< (seconds 0.05) (- (current-time) (-> this birth-time)))) + (return 2) + ) + ) + ) + ) + ) + ) + ) + ) + (if gp-0 + (return 1) + (return 0) + ) + ) + (the-as int 0) + ) + ) + +(defmethod projectile-method-25 ((this gun-red-3-grenade)) + (spawn (-> this part) (-> this root trans)) + (if (logtest? (-> this root status) (collide-status touch-surface)) + (sound-play "red3-bounce") + ) + (call-parent-method this) + (none) + ) + +(defmethod projectile-bounce-method-42 ((this gun-red-3-grenade)) + (spawn (-> this part) (-> this root trans)) + (call-parent-method this) + (none) + ) + +(deftype shockwave-collision-pt (structure) + ((collision-pt vector :inline) + (normal vector :inline) + (found? symbol) + (angle degrees) + ) + ) + + +(deftype gun-red-2-shockwave (process) + ((origin vector :inline) + (max-radius float) + (strength float) + (current-radius float) + (current-intensity float) + (state-time time-frame) + (alpha-scalar float) + (base-damage float) + (snd-charge sound-id) + (min-charge-radius float) + (max-charge-radius float) + (total-charge-time time-frame) + (total-explode-time time-frame) + (ring-expansion-time time-frame) + (burst-expansion-time time-frame) + (warp-expansion-time time-frame) + (previously-attacked-targets handle 64) + (num-previously-attacked-targets int8) + (start-pilot? symbol) + (explosion-0 handle) + (explosion-1 handle) + (generate-order-array uint8 127) + (current-stage-t float) + (ammo-drained float) + (eventual-collision-points shockwave-collision-pt 128 :inline) + (next-computed-collision-point int8) + (num-collision-pts-to-generate int8) + (show-scorch-marks? symbol) + (height-off-ground float) + (max-ground-radius float) + (current-ring-radius float) + (current-ring-alpha float) + (current-warp-radius float) + (current-warp-alpha float) + (current-burst-radius float) + (current-burst-alpha float) + (generating-marks? symbol) + (generated-particles? symbol) + (charge-part-tracker handle) + ) + (:state-methods + charging + explode + die + ) + (:methods + (find-targets-and-attack! (_type_) none) + (send-attack! (_type_ process-focusable symbol) none) + (find-collision-point! (_type_) int) + (generate-collision-points! (_type_) none) + (adjust-height-and-radius (_type_) none) + (gun-red-2-shockwave-method-22 (_type_ int int int int) none) + (generate-shockwave-particles (_type_) none) + (adjust-warp-radius-and-alpha (_type_) object) + (adjust-ring-radius-and-alpha (_type_) none) + (generate-order-array (_type_) none) + (spawn-ring (_type_) none) + ) + ) + + +(deftype gun-red-2-shockwave-init-params (structure) + ((pos vector :inline) + (max-radius float) + (strength float) + ) + ) + + +;; WARN: Return type mismatch float vs none. +(defun part-tracker-move-to-target-gun ((arg0 part-tracker)) + (when *target* + (set! (-> arg0 root trans quad) (-> *target* gun fire-point quad)) + (set! (-> arg0 root trans y) (+ 6553.6 (-> *target* control trans y))) + ) + (none) + ) + +(defbehavior gun-red-2-shockwave-init-by-other gun-red-2-shockwave ((arg0 gun-red-2-shockwave-init-params)) + (set! (-> self current-intensity) 0.0) + (set! (-> self current-radius) 0.0) + (set! (-> self current-warp-radius) 0.0) + (set! (-> self current-burst-radius) 0.0) + (set! (-> self height-off-ground) 0.0) + (set! (-> self current-ring-radius) 0.0) + (set! (-> self current-ring-alpha) 0.0) + (set! (-> self total-explode-time) (seconds 0.7)) + (set! (-> self min-charge-radius) 12288.0) + (set! (-> self max-charge-radius) 73728.0) + (set! (-> self total-charge-time) (seconds 1)) + (set! (-> self base-damage) 5.0) + (set! (-> self ring-expansion-time) (seconds 0.35)) + (set! (-> self burst-expansion-time) (seconds 0.3)) + (set! (-> self warp-expansion-time) (seconds 0.4)) + (set! (-> self explosion-0) (the-as handle #f)) + (set! (-> self explosion-1) (the-as handle #f)) + (set! (-> self ammo-drained) 0.0) + (set! (-> self snd-charge) (new-sound-id)) + (set! (-> self num-previously-attacked-targets) 0) + (set! (-> self start-pilot?) (the-as symbol (and *target* (focus-test? *target* pilot)))) + (set! (-> self charge-part-tracker) + (ppointer->handle (cond + ((logtest? (-> *part-group-id-table* 109 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self origin quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 109) + :callback (the-as (function part-tracker vector) part-tracker-move-to-target-gun) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self origin quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 109) + :callback (the-as (function part-tracker vector) part-tracker-move-to-target-gun) + ) + ) + ) + ) + ) + (send-event (handle->process (-> self charge-part-tracker)) 'clock self) + (dotimes (v1-49 64) + (set! (-> self eventual-collision-points v1-49 found?) #f) + ) + (set! (-> self next-computed-collision-point) 0) + (set! (-> self show-scorch-marks?) #f) + (set! (-> self generating-marks?) #f) + (set! (-> self generated-particles?) #f) + (go-virtual charging) + ) + +(defmethod find-targets-and-attack! ((this gun-red-2-shockwave)) + (local-vars + (sv-32 bounding-box) + (sv-2672 (function vector vector float)) + (sv-2688 vector) + (sv-2704 vector) + (sv-2720 collide-query) + ) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (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)) + (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)) + (v1-6 (if (type? s3-0 collide-shape) + s3-0 + ) + ) + ) + (when v1-6 + (let* ((s2-0 (-> v1-6 process)) + (s3-1 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (when s3-1 + (when (and (!= *target* s3-1) + (not (focus-test? (the-as process-focusable s3-1) disable dead inactive)) + (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?)) + ) + ) + (let ((s2-1 #f)) + (let ((s1-0 (process->handle s3-1))) + (dotimes (v1-18 (-> this num-previously-attacked-targets)) + (when (= (-> this previously-attacked-targets v1-18) s1-0) + (set! s2-1 #t) + 0 + (goto cfg-29) + ) + ) + (label cfg-29) + (when (not s2-1) + (let ((s0-0 #f)) + (set! sv-2672 vector-vector-xz-distance-squared) + (set! sv-2688 (-> this origin)) + (let* ((a1-4 (get-trans (the-as process-focusable s3-1) 3)) + (f0-1 (sv-2672 sv-2688 a1-4)) + (f1-0 24576.0) + ) + (cond + ((< f0-1 (* f1-0 f1-0)) + (set! s0-0 #t) + ) + (else + (set! sv-2720 (new 'stack-no-clear 'collide-query)) + (set! (-> sv-2720 start-pos quad) (-> this origin quad)) + (set! sv-2704 (-> sv-2720 move-dist)) + (let ((v1-35 (get-trans (the-as process-focusable s3-1) 3)) + (a0-26 (-> this origin)) + ) + (.lvf vf4 (&-> v1-35 quad)) + (.lvf vf5 (&-> a0-26 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-2704 quad) vf6) + (let ((v1-37 sv-2720)) + (set! (-> v1-37 radius) 40.96) + (set! (-> v1-37 collide-with) (collide-spec backgnd)) + (set! (-> v1-37 ignore-process0) #f) + (set! (-> v1-37 ignore-process1) #f) + (set! (-> v1-37 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-37 action-mask) (collide-action solid)) + ) + (if (= (fill-and-probe-using-line-sphere *collide-cache* sv-2720) -100000000.0) + (set! s0-0 #t) + ) + ) + ) + ) + (when s0-0 + (send-attack! this (the-as process-focusable s3-1) #t) + (set! (-> this previously-attacked-targets (-> this num-previously-attacked-targets)) (the-as handle s1-0)) + (+! (-> this num-previously-attacked-targets) 1) + ) + ) + ) + ) + (if (and s2-1 (logtest? (process-mask vehicle) (-> s3-1 mask))) + (send-attack! this (the-as process-focusable s3-1) #f) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (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) + ) + ) + ) + ) + ) + (none) + ) + ) + +(defmethod send-attack! ((this gun-red-2-shockwave) (arg0 process-focusable) (arg1 symbol)) + (let* ((a0-2 (get-trans arg0 3)) + (v1-2 (vector-! (new 'stack-no-clear 'vector) a0-2 (-> this origin))) + ) + 0.0 + (set! (-> v1-2 y) 0.0) + (let* ((f0-3 (* (-> this base-damage) (-> this current-intensity))) + (f0-4 (fmax 1.0 f0-3)) + (a0-4 'eco-red) + ) + (if (not arg1) + (set! a0-4 'eco-red-shove) + ) + (+! (-> *game-info* shots-hit 1) 1.0) + (send-event arg0 'attack #f (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) + (damage f0-4) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode a0-4) + (attacker-velocity v1-2) + (control (-> this current-intensity)) + (penetrate-using (penetrate jak-red-shot jak-red-shockwave)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defstate charging (gun-red-2-shockwave) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 float)) + (case message + (('charge) + (return (the-as object (-> self strength))) + v0-0 + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self ammo-drained) 0.0) + ) + :exit (behavior () + (send-event (ppointer->process (-> self parent)) 'release) + (send-event (handle->process (-> self charge-part-tracker)) 'die) + (sound-stop (-> self snd-charge)) + ) + :trans (behavior () + (let ((t9-0 vector<-cspace!) + (a0-0 (-> self origin)) + (v1-0 (-> self parent)) + ) + (t9-0 a0-0 (-> (the-as process-drawable (if v1-0 + (the-as process-drawable (-> v1-0 0 self)) + ) + ) + node-list + data + 13 + ) + ) + ) + (sound-play "red2-charge" :id (-> self snd-charge) :position (-> self origin)) + (let ((f0-0 (get-remaining-player-ammo (pickup-type ammo-red)))) + (if (< 0.0 f0-0) + (set! (-> self strength) + (fmin 1.0 (/ (the float (- (current-time) (-> self state-time))) (the float (-> self total-charge-time)))) + ) + ) + ) + (let ((f30-0 (cond + ((time-elapsed? (-> self state-time) (seconds 1)) + 5.0 + ) + ((time-elapsed? (-> self state-time) (seconds 0.75)) + 4.0 + ) + ((time-elapsed? (-> self state-time) (seconds 0.5)) + 3.0 + ) + ((time-elapsed? (-> self state-time) (seconds 0.25)) + 2.0 + ) + ((time-elapsed? (-> self state-time) (seconds 0.1)) + 1.0 + ) + (else + 0.0 + ) + ) + ) + ) + (when (< (-> self ammo-drained) f30-0) + (let ((f0-5 (- f30-0 (-> self ammo-drained)))) + (adjust-player-ammo (- f0-5) (pickup-type ammo-red)) + ) + (set! (-> self ammo-drained) f30-0) + ) + ) + (set! (-> *part-id-table* 372 init-specs 2 initial-valuef) (lerp 3276.8 8192.0 (-> self strength))) + (set! (-> *part-id-table* 373 init-specs 2 initial-valuef) (lerp 8192.0 14336.0 (-> self strength))) + (if (and (time-elapsed? (-> self state-time) (seconds 0.1)) + (or (not (cpad-hold? 0 r1)) + (and *target* + (focus-test? *target* dead grabbed under-water pole flut board mech dark carry indax teleporting) + ) + (and *target* (not (logtest? (focus-status in-head gun) (-> *target* focus-status)))) + (and *target* (!= (-> self start-pilot?) (focus-test? *target* pilot))) + (not (-> *setting-control* user-current gun)) + ) + ) + (go-virtual explode) + ) + ) + :code sleep-code + :post (behavior () + (set! (-> *last-player-pos* x) (-> *target* gun fire-point x)) + (set! (-> *last-player-pos* y) (+ 6553.6 (-> *target* control trans y))) + (set! (-> *last-player-pos* z) (-> *target* gun fire-point z)) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior generate-shockwave-scorch-marks-3 gun-red-2-shockwave ((arg0 int)) + (let ((s4-0 (-> self eventual-collision-points arg0)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 x) 0.0) + (set! (-> s5-0 y) 409.6) + (set! (-> s5-0 z) 0.0) + (set! (-> s5-0 w) 1.0) + (when (-> s4-0 found?) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (let ((s3-1 (vector-! (new 'stack-no-clear 'vector) (-> s4-0 collision-pt) (-> self origin)))) + (set! (-> s3-1 y) 0.0) + (vector-normalize! s3-1 1.0) + (matrix-u-f-compose gp-0 (-> s4-0 normal) s3-1) + ) + (vector+! (-> gp-0 trans) (-> s4-0 collision-pt) s5-0) + (let ((v1-14 + (if (logtest? (-> *part-group-id-table* 89 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 89) + :mat-joint gp-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 89) :mat-joint gp-0) + ) + ) + ) + (send-event (ppointer->process v1-14) 'clock self) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defbehavior generate-shockwave-scorch-marks-2 gun-red-2-shockwave () + (set! (-> self show-scorch-marks?) #t) + (set! (-> self generating-marks?) #t) + (let ((gp-0 0)) + (dotimes (s5-0 (-> self num-collision-pts-to-generate)) + (when (< 30 gp-0) + (set! gp-0 0) + (suspend) + 0 + ) + (+! gp-0 1) + (generate-shockwave-scorch-marks-3 s5-0) + ) + ) + (set! (-> self generating-marks?) #f) + (none) + ) + +(defstate die (gun-red-2-shockwave) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (when (not (-> self show-scorch-marks?)) + (generate-collision-points! self) + (generate-shockwave-scorch-marks-2) + ) + ) + ) + +(deftype gun-red-2-explosion (process-drawable) + () + (:methods + (gun-red-2-explosion-method-20 (_type_) none) + ) + ) + + +(defmethod gun-red-2-shockwave-method-22 ((this gun-red-2-shockwave) (arg0 int) (arg1 int) (arg2 int) (arg3 int)) + (when (< 1 (- arg1 arg0)) + (let ((s2-0 (/ (+ arg0 arg1) 2))) + (let ((a0-4 (+ arg3 -1 (ash 1 arg2)))) + (set! (-> this generate-order-array a0-4) (the-as uint (+ s2-0 -1))) + ) + (gun-red-2-shockwave-method-22 this arg0 s2-0 (+ arg2 1) (* arg3 2)) + (gun-red-2-shockwave-method-22 this s2-0 arg1 (+ arg2 1) (+ (* arg3 2) 1)) + ) + ) + (none) + ) + +(defmethod find-collision-point! ((this gun-red-2-shockwave)) + (local-vars (sv-560 collide-query) (sv-564 int) (sv-608 vector) (sv-612 vector) (sv-616 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (if (>= (-> this next-computed-collision-point) (-> this num-collision-pts-to-generate)) + (return 0) + ) + (set! sv-560 (new 'stack-no-clear 'collide-query)) + (set! sv-564 (-> this num-collision-pts-to-generate)) + (set! sv-608 (new 'stack-no-clear 'vector)) + (set! sv-612 (new 'stack-no-clear 'vector)) + (set! sv-616 (/ 65536.0 (the float (+ sv-564 -1)))) + (let ((f30-1 + (+ (* sv-616 (the float (-> this generate-order-array (-> this next-computed-collision-point)))) + (rand-vu-float-range (* -0.43478262 sv-616) (* 0.43478262 sv-616)) + ) + ) + ) + (set! (-> this eventual-collision-points (-> this next-computed-collision-point) angle) f30-1) + (set-vector! + sv-608 + (* (rand-vu-float-range 0.7 0.9) (-> this max-ground-radius) (cos f30-1)) + 32768.0 + (* (rand-vu-float-range 0.7 0.9) (-> this max-ground-radius) (sin f30-1)) + 1.0 + ) + ) + (vector+! (-> sv-560 start-pos) (-> this origin) sv-608) + (set! (-> sv-560 start-pos y) (- (-> sv-560 start-pos y) (-> this height-off-ground))) + (+! (-> sv-560 start-pos y) 20480.0) + (set-vector! (-> sv-560 move-dist) 0.0 -65536.0 0.0 1.0) + (let ((v1-29 sv-560)) + (set! (-> v1-29 radius) 40.96) + (set! (-> v1-29 collide-with) (collide-spec backgnd hit-by-others-list pusher impenetrable-obj)) + (set! (-> v1-29 ignore-process0) #f) + (set! (-> v1-29 ignore-process1) #f) + (set! (-> v1-29 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-29 action-mask) (collide-action solid)) + ) + (let ((f0-25 (fill-and-probe-using-line-sphere *collide-cache* sv-560))) + (when (>= f0-25 0.0) + (let ((v1-33 sv-612)) + (let ((a0-17 (-> sv-560 start-pos))) + (let ((a1-7 (-> sv-560 move-dist))) + (let ((a2-0 f0-25)) + (.mov vf7 a2-0) + ) + (.lvf vf5 (&-> a1-7 quad)) + ) + (.lvf vf4 (&-> a0-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 (&-> v1-33 quad) vf6) + ) + (set! (-> this eventual-collision-points (-> this next-computed-collision-point) collision-pt quad) + (-> sv-612 quad) + ) + (+! (-> this eventual-collision-points (-> this next-computed-collision-point) collision-pt y) 204.8) + (set! (-> this eventual-collision-points (-> this next-computed-collision-point) found?) #t) + (set! (-> (the-as + (pointer uint128) + (+ (the-as uint (-> this eventual-collision-points 0 normal)) (* 48 (-> this next-computed-collision-point))) + ) + ) + (-> sv-560 best-other-tri normal quad) + ) + (let ((s5-1 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-1 (vector-float*! (new 'stack-no-clear 'vector) (-> sv-560 best-other-tri normal) 3072.0)) + ) + (let ((s2-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> sv-560 best-other-tri normal) 1.0)) + (s1-0 (new 'stack-no-clear 'vector)) + ) + (vector-get-unique! s1-0 s2-0) + (vector-cross! s5-1 s2-0 s1-0) + ) + (vector-normalize! s5-1 1.0) + (dotimes (s2-1 4) + (vector-rotate-around-axis! + s4-0 + (the-as quaternion s5-1) + (* 16384.0 (the float s2-1)) + (-> sv-560 best-other-tri normal) + ) + (vector-normalize! s4-0 10240.0) + (vector+! s4-0 s4-0 s3-1) + (vector+! (-> sv-560 start-pos) sv-612 s4-0) + (vector-float*! (-> sv-560 move-dist) (-> sv-560 best-other-tri normal) -6144.0) + (let ((v1-59 sv-560)) + (set! (-> v1-59 radius) 40.96) + (set! (-> v1-59 collide-with) (collide-spec backgnd hit-by-others-list pusher impenetrable-obj)) + (set! (-> v1-59 ignore-process0) #f) + (set! (-> v1-59 ignore-process1) #f) + (set! (-> v1-59 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-59 action-mask) (collide-action solid)) + ) + (when (< (fill-and-probe-using-line-sphere *collide-cache* sv-560) 0.0) + (set! (-> this eventual-collision-points (-> this next-computed-collision-point) found?) #f) + 0 + (goto cfg-11) + ) + ) + ) + ) + ) + (label cfg-11) + (let ((v0-0 (+ (-> this next-computed-collision-point) 1))) + (set! (-> this next-computed-collision-point) v0-0) + v0-0 + ) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod generate-collision-points! ((this gun-red-2-shockwave)) + (while (< (-> this next-computed-collision-point) (-> this num-collision-pts-to-generate)) + (find-collision-point! this) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod adjust-height-and-radius ((this gun-red-2-shockwave)) + (let ((a1-0 (new 'stack-no-clear 'collide-query))) + (set! (-> a1-0 start-pos quad) (-> this origin quad)) + (set-vector! (-> a1-0 move-dist) 0.0 (* -1.0 (-> this max-radius)) 0.0 1.0) + (let ((v1-2 a1-0)) + (set! (-> v1-2 radius) 40.96) + (set! (-> v1-2 collide-with) (collide-spec backgnd hit-by-others-list pusher impenetrable-obj)) + (set! (-> v1-2 ignore-process0) #f) + (set! (-> v1-2 ignore-process1) #f) + (set! (-> v1-2 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-2 action-mask) (collide-action solid)) + ) + (let ((f0-6 (fill-and-probe-using-line-sphere *collide-cache* a1-0))) + (if (>= f0-6 0.0) + (set! (-> this height-off-ground) (* f0-6 (-> this max-radius))) + (set! (-> this height-off-ground) (-> this max-radius)) + ) + ) + ) + (set! (-> this max-ground-radius) (-> this max-radius)) + (none) + ) + +(defskelgroup skel-gun-red-sphere gun gun-red-sphere-lod0-jg gun-red-sphere-idle-ja + ((gun-red-sphere-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 30) + :texture-level 10 + :sort 4 + ) + +(deftype red-2-ring (process-drawable) + ((current-alpha float) + (pad uint8 12) + ) + (:state-methods + active + fading + ) + (:methods + (red-2-ring-method-22 () none) + ) + ) + + +(deftype red-2-ring-init-params (structure) + ((pos vector :inline) + ) + ) + + +(defbehavior red-2-ring-event-handler red-2-ring ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('scale) + (let ((v1-1 (the-as object (-> arg3 param 0))) + (v0-0 (the-as object (-> self root scale))) + ) + (set! (-> (the-as vector v0-0) quad) (-> (the-as vector v1-1) quad)) + v0-0 + ) + ) + (('alpha) + (set! (-> self current-alpha) (the-as float (-> arg3 param 0))) + ) + (('start-fade) + (if (not (and (-> self next-state) (= (-> self next-state name) 'fading))) + (go-virtual fading) + ) + ) + ) + ) + +(defbehavior red-2-ring-init-by-other red-2-ring ((arg0 red-2-ring-init-params)) + (set! (-> self root) (new 'process 'trsqv)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-generic-blast" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self root trans quad) (-> arg0 pos quad)) + (quaternion-identity! (-> self root quat)) + (go-virtual active) + ) + +(defstate active (red-2-ring) + :virtual #t + :event red-2-ring-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set-vector! (-> self root scale) 1.0 1.0 1.0 1.0) + ) + :trans (behavior () + '() + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja :group! (-> self draw art-group data 13) :num! zero) + (let ((gp-0 (ja-num-frames 0))) + (until #f + (ja :group! (-> self draw art-group data 13) + :num! (identity (lerp (the float gp-0) 0.0 (-> self current-alpha))) + ) + (suspend) + ) + ) + #f + ) + :post (behavior () + (ja-post) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod generate-shockwave-particles ((this gun-red-2-shockwave)) + (local-vars (sv-160 int) (sv-176 shockwave-collision-pt)) + (when (and (not (-> this generated-particles?)) (time-elapsed? (-> this state-time) (seconds 0.067))) + (set! (-> this generated-particles?) #t) + (dotimes (s5-0 150) + (let ((f26-0 (* 436.90668 (the float s5-0))) + (s3-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-0 quad) (-> this origin quad)) + (set-vector! s3-0 (cos f26-0) 0.0 (sin f26-0) 1.0) + (vector-normalize! s3-0 (* 0.9 (-> this max-ground-radius))) + (let ((f30-0 (-> this origin y)) + (f24-0 -32768.0) + (f28-0 (-> this origin y)) + (f22-0 32768.0) + ) + 0.0 + (let ((s0-0 0) + (s2-1 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'vector)) + ) + (set! sv-160 0) + (while (< sv-160 (-> this next-computed-collision-point)) + (set! sv-176 (-> this eventual-collision-points sv-160)) + (when (-> sv-176 found?) + (let ((f0-9 (deg- (-> sv-176 angle) f26-0))) + (cond + ((and (< f0-9 0.0) (< f24-0 f0-9)) + (set! f24-0 f0-9) + (set! f30-0 (-> sv-176 collision-pt y)) + (set! s0-0 (logior s0-0 1)) + (set! (-> s2-1 quad) (-> sv-176 normal quad)) + ) + ((and (>= f0-9 0.0) (< f0-9 f22-0)) + (set! f22-0 f0-9) + (set! f28-0 (-> sv-176 collision-pt y)) + (set! s0-0 (logior s0-0 2)) + (set! (-> s1-0 quad) (-> sv-176 normal quad)) + ) + ) + ) + ) + (set! sv-160 (+ sv-160 1)) + ) + (let ((f26-1 0.0)) + (cond + ((= s0-0 3) + (set! f26-1 (/ (* -1.0 f24-0) (- f22-0 f24-0))) + ) + ((= s0-0 2) + (set! f26-1 1.0) + ) + ((= s0-0 1) + (set! f26-1 0.0) + ) + ) + (when #t + (let ((f0-12 (lerp f30-0 f28-0 f26-1))) + (set! (-> s4-0 y) (- (-> s4-0 y) (-> this height-off-ground))) + (set! (-> s3-0 y) (- f0-12 (-> s4-0 y))) + ) + (let ((s2-2 (vector-lerp! (new 'stack-no-clear 'vector) s2-1 s1-0 f26-1))) + (vector-normalize! s2-2 2048.0) + (vector+! s3-0 s3-0 s2-2) + ) + (vector-normalize! s3-0 1.0) + (let ((s2-3 (new 'stack-no-clear 'matrix))) + (matrix-f-u-compose s2-3 s3-0 *up-vector*) + (set! (-> s2-3 trans quad) (-> s4-0 quad)) + (launch-particles (-> *part-id-table* 353) s2-3 :origin-is-matrix #t) + ) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +(defmethod adjust-warp-radius-and-alpha ((this gun-red-2-shockwave)) + (let* ((f0-1 (/ (-> this max-radius) (-> this max-charge-radius))) + (f0-3 + (/ (the float (- (current-time) (-> this state-time))) (* f0-1 (the float (-> this warp-expansion-time)))) + ) + (f0-4 (* f0-3 f0-3)) + ) + (set! (-> this current-warp-radius) (lerp (-> this min-charge-radius) (-> this max-radius) f0-4)) + ) + (let ((f0-7 (/ (-> this current-warp-radius) (-> this max-radius)))) + (if (< 1.0 f0-7) + (set! (-> this current-warp-alpha) (fmax 0.0 (- 2.0 f0-7))) + ) + ) + (let ((v1-8 (new 'stack-no-clear 'vector))) + (set! (-> v1-8 x) (* 0.00024414062 (-> this current-warp-radius))) + (set! (-> v1-8 y) 1.0) + (set! (-> v1-8 z) (* 0.00024414062 (-> this current-warp-radius))) + (set! (-> v1-8 w) 1.0) + (send-event (handle->process (-> this explosion-1)) 'scale v1-8) + ) + (send-event (handle->process (-> this explosion-1)) 'alpha (-> this current-warp-alpha)) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod adjust-ring-radius-and-alpha ((this gun-red-2-shockwave)) + (let ((f0-2 (/ (the float (- (current-time) (-> this state-time))) (the float (-> this ring-expansion-time))))) + (set! (-> this current-ring-radius) (lerp (-> this min-charge-radius) (-> this max-charge-radius) f0-2)) + ) + (let ((f0-5 (/ (-> this current-ring-radius) (-> this max-radius)))) + (if (< 1.0 f0-5) + (set! (-> this current-ring-alpha) (fmax 0.0 (- 1.7 f0-5))) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod generate-order-array ((this gun-red-2-shockwave)) + (gun-red-2-shockwave-method-22 this 0 (-> this num-collision-pts-to-generate) 0 0) + (let ((a0-3 (log2 (-> this num-collision-pts-to-generate)))) + (when (< (ash 1 a0-3) (-> this num-collision-pts-to-generate)) + (let ((v1-7 (+ (ash 1 (+ (log2 (-> this num-collision-pts-to-generate)) 1)) -1)) + (a0-7 0) + ) + (dotimes (a1-1 v1-7) + (set! (-> this generate-order-array a0-7) (-> this generate-order-array a1-1)) + (if (nonzero? (-> this generate-order-array a0-7)) + (+! a0-7 1) + ) + ) + ) + ) + ) + (none) + ) + +(when (or (zero? *impact-blur*) (!= loading-level global)) + (set! *impact-blur* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *impact-blur* 3 'loading-level (the-as int #f)) + ) + +(set! (-> *impact-blur* pts data 0 first) 0.0) + +(set! (-> *impact-blur* pts data 0 second) 0.0) + +(set! (-> *impact-blur* pts data 1 first) 0.2) + +(set! (-> *impact-blur* pts data 1 second) 1.0) + +(set! (-> *impact-blur* pts data 2 first) 1.0) + +(set! (-> *impact-blur* pts data 2 second) 0.0) + +(when (or (zero? *shockwave-blur-red-2*) (!= loading-level global)) + (set! *shockwave-blur-red-2* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *shockwave-blur-red-2* 5 'loading-level (the-as int #f)) + ) + +(set! (-> *shockwave-blur-red-2* pts data 0 first) 0.0) + +(set! (-> *shockwave-blur-red-2* pts data 0 second) 0.0) + +(set! (-> *shockwave-blur-red-2* pts data 1 first) 0.7) + +(set! (-> *shockwave-blur-red-2* pts data 1 second) 0.0) + +(set! (-> *shockwave-blur-red-2* pts data 2 first) 0.8) + +(set! (-> *shockwave-blur-red-2* pts data 2 second) 1.0) + +(set! (-> *shockwave-blur-red-2* pts data 3 first) 0.9) + +(set! (-> *shockwave-blur-red-2* pts data 3 second) 0.3) + +(set! (-> *shockwave-blur-red-2* pts data 4 first) 1.0) + +(set! (-> *shockwave-blur-red-2* pts data 4 second) 0.0) + +(defmethod spawn-ring ((this gun-red-2-shockwave)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 quad) (-> this origin quad)) + (set! (-> v1-0 y) (- (-> v1-0 y) (-> this height-off-ground))) + (+! (-> v1-0 y) 2048.0) + (+! (-> v1-0 y) -1433.6) + (let ((s5-0 (new 'stack-no-clear 'red-2-ring-init-params))) + (set! (-> s5-0 pos quad) (-> v1-0 quad)) + (let ((v1-3 (process-spawn red-2-ring s5-0 :name "red-2-ring" :to this))) + (if v1-3 + (set! (-> this explosion-1) (ppointer->handle v1-3)) + ) + ) + ) + ) + (none) + ) + +(defmethod deactivate ((this gun-red-2-shockwave)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (blit-displays-work-method-17 *blit-displays-work* (-> this origin) 0 1.0 #f) + (call-parent-method this) + (none) + ) + +(defstate explode (gun-red-2-shockwave) + :virtual #t + :enter (behavior () + (let ((f30-0 (lerp 0.3 0.8 (-> self strength))) + (a3-0 (the int (* 300.0 (lerp 0.1 0.4 (-> self strength))))) + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 (the int (* 255.0 f30-0)) (the-as time-frame a3-0)) + ) + (sound-play "red2-shot") + (set-time! (-> self state-time)) + (set! (-> self max-radius) (lerp (-> self min-charge-radius) (-> self max-charge-radius) (-> self strength))) + (/ (-> self max-radius) (-> self max-charge-radius)) + (let ((f0-15 (* 0.000012207031 (-> self max-radius)))) + 0.0 + (let ((f1-5 (/ (* 2.0 (- (* 163840.0 f0-15) (-> self max-radius))) (* f0-15 f0-15)))) + (set! (-> *part-id-table* 353 init-specs 9 initial-valuef) (* 1.2 f1-5)) + ) + (let ((v1-15 (the int (* 150.0 f0-15)))) + (set! (-> *part-id-table* 354 init-specs 3 initial-valuef) (the-as float (+ v1-15 -25))) + (set! (-> *part-id-table* 354 init-specs 3 random-rangef) (the-as float (+ v1-15 -5))) + ) + ) + (adjust-height-and-radius self) + (set! (-> self current-intensity) (-> self strength)) + (spawn-ring self) + (set! (-> self num-collision-pts-to-generate) + (the int (fmax 6.0 (fmin 64.0 (* 64.0 (/ (-> self max-ground-radius) (-> self max-charge-radius)))))) + ) + (generate-order-array self) + (set! (-> self current-ring-alpha) 1.0) + (set! (-> self current-burst-alpha) 1.0) + (set! (-> self current-warp-alpha) 1.0) + ) + :exit (behavior () + (blit-displays-work-method-17 *blit-displays-work* (-> self origin) 0 1.0 #f) + ) + :trans (behavior () + (let ((f0-1 + (fmin 1.0 (/ (the float (- (current-time) (-> self state-time))) (the float (-> self total-explode-time)))) + ) + ) + (set! (-> self current-radius) + (fmin (lerp (-> self min-charge-radius) (-> self max-charge-radius) f0-1) (-> self max-radius)) + ) + ) + (set! (-> self current-stage-t) + (/ (- (-> self current-radius) (-> self min-charge-radius)) + (- (-> self max-radius) (-> self min-charge-radius)) + ) + ) + (set! (-> self current-intensity) + (cond + ((logtest? (game-secrets gun-upgrade-red-2) (-> *game-info* secrets)) + (let ((f0-8 (fmin (-> self current-stage-t) (* 1.5 (-> self current-stage-t) (-> self current-stage-t))))) + (fmax 0.3 (lerp (-> self strength) 0.0 f0-8)) + ) + ) + (else + (lerp (-> self strength) 0.0 (-> self current-stage-t)) + ) + ) + ) + (generate-shockwave-particles self) + (adjust-ring-radius-and-alpha self) + (adjust-warp-radius-and-alpha self) + (let ((f0-14 (-> self current-stage-t))) + 0.0 + (let* ((f0-16 (- 1.0 (curve2d-method-9 *impact-blur* f0-14 3))) + (f0-19 (lerp f0-16 1.0 (fmax 0.0 (- 0.5 (-> self strength))))) + ) + (blit-displays-work-method-17 *blit-displays-work* (-> self origin) 2 (fmin 1.0 f0-19) #f) + ) + ) + (if (< (-> self current-stage-t) 1.0) + (find-targets-and-attack! self) + ) + (cond + ((and (not (-> self generating-marks?)) (-> self show-scorch-marks?) (>= 0.0 (-> self current-warp-alpha))) + (go-virtual die) + ) + ((and (not (-> self show-scorch-marks?)) + (< (-> self next-computed-collision-point) (-> self num-collision-pts-to-generate)) + ) + (find-collision-point! self) + (find-collision-point! self) + (find-collision-point! self) + ) + ) + (if (and (not (-> self show-scorch-marks?)) + (time-elapsed? (-> self state-time) (the int (* 0.0036621094 (-> self max-radius)))) + ) + (set! (-> self show-scorch-marks?) #t) + ) + ) + :code (behavior () + (while (not (-> self show-scorch-marks?)) + (suspend) + ) + (generate-collision-points! self) + (generate-shockwave-scorch-marks-2) + (sleep-code) + ) + :post (behavior () + (set-vector! (new 'stack-no-clear 'vector) 1.9 0.0 0.0 (-> self alpha-scalar)) + (set! (-> *part-id-table* 229 init-specs 2 initial-valuef) (* 2.0 (-> self current-ring-radius))) + (set! (-> *part-id-table* 229 init-specs 7 initial-valuef) (* 128.0 (-> self current-ring-alpha))) + (set! (-> *part-id-table* 226 init-specs 3 initial-valuef) + (lerp 20480.0 24576.0 (/ (-> self max-radius) (-> self max-charge-radius))) + ) + (set! (-> *part-id-table* 226 init-specs 3 initial-valuef) + (* 0.5 (-> *part-id-table* 226 init-specs 3 initial-valuef)) + ) + (set! (-> *part-id-table* 226 init-specs 3 random-rangef) + (lerp 0.0 20480.0 (/ (-> self max-radius) (-> self max-charge-radius))) + ) + (launch-particles (-> *part-id-table* 229) (-> self origin)) + ) + ) + +;; WARN: Return type mismatch int vs object. +(defbehavior gun-fire-red-2 target () + (let ((gp-0 (-> self gun)) + (v1-1 (-> self gun fire-point)) + ) + (set! (-> *last-player-pos* x) (-> *target* gun fire-point x)) + (set! (-> *last-player-pos* y) (+ 6553.6 (-> *target* control trans y))) + (set! (-> *last-player-pos* z) (-> *target* gun fire-point z)) + (when #t + (let ((s5-0 (new 'stack-no-clear 'gun-red-2-shockwave-init-params))) + (set! (-> s5-0 pos quad) (-> v1-1 quad)) + (let ((v1-4 (process-spawn + gun-red-2-shockwave + s5-0 + :name "gun-red-2-shockwave" + :to (ppointer->process (-> gp-0 gun)) + :stack *kernel-dram-stack* + ) + ) + ) + (set! (-> gp-0 gun 0 extra) (ppointer->handle v1-4)) + (let ((v0-0 (ppointer->handle v1-4))) + (set! (-> self gun charge-active?) (the-as handle v0-0)) + v0-0 + ) + ) + ) + ) + ) + ) + +(deftype red-3-sphere (process-drawable) + ((current-alpha float) + (pad uint8 12) + ) + (:state-methods + active + ) + (:methods + (red-3-sphere-method-21 (_type_) none) + (red-3-sphere-method-22 (_type_) none) + ) + ) + + +(deftype red-3-sphere-init-params (structure) + ((pos vector :inline) + ) + ) + + +(defbehavior red-3-sphere-init-by-other red-3-sphere ((arg0 red-3-sphere-init-params)) + (set! (-> self root) (new 'process 'trsqv)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-gun-red-sphere" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self root trans quad) (-> arg0 pos quad)) + (quaternion-identity! (-> self root quat)) + (go-virtual active) + ) + +(defstate active (red-3-sphere) + :virtual #t + :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) + ) + (-> gp-0 fvec) + (-> gp-0 rvec) + (matrix->quat gp-0 (-> self root quat)) + ) + (set! (-> self current-alpha) (* 0.008333334 (the float (- (current-time) (-> self state-time))))) + (let ((f0-3 (+ (-> self root scale x) (* 24.0 (seconds-per-frame))))) + (set-vector! (-> self root scale) f0-3 f0-3 f0-3 1.0) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! gun-red-sphere-burst-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-no-eval :group! gun-red-sphere-fade-ja :num! (seek! max 5.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 5.0)) + ) + (deactivate self) + ) + :post (behavior () + (ja-post) + ) + ) + +;; WARN: Return type mismatch (pointer process) vs gun-red-3-grenade. +;; ERROR: Unsupported inline assembly instruction kind - [mula.s f1, f4] +;; ERROR: Unsupported inline assembly instruction kind - [madda.s f2, f5] +;; ERROR: Unsupported inline assembly instruction kind - [madd.s f1, f3, f6] +(defbehavior gun-fire-red-3 target () + (local-vars + (f1-2 float) + (sv-16 gun-info) + (sv-20 vector) + (sv-24 vector) + (sv-28 float) + (sv-144 vector) + (sv-148 vector) + (sv-1952 vector) + (sv-1968 vector) + ) + (set! sv-16 (-> self gun)) + (set! sv-20 (-> self gun fire-dir-out)) + (set! sv-24 (-> self gun fire-point)) + (set! sv-28 (the-as float 266240.0)) + (draw-beam (-> *part-id-table* 217) sv-24 sv-20 #f) + (set! (-> sv-20 y) (fmax 0.3 (-> sv-20 y))) + (vector-normalize! sv-20 1.0) + (let ((v1-17 (cond + ((logtest? (-> *part-group-id-table* 86 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> sv-16 fire-point quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 86)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> sv-16 fire-point quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 86)) + ) + ) + ) + ) + (send-event (ppointer->process v1-17) 'clock self) + ) + (set! sv-144 (new 'stack-no-clear 'vector)) + (let ((v1-42 (new 'stack-no-clear 'vector))) + (set! (-> v1-42 quad) (-> sv-20 quad)) + (set! sv-148 v1-42) + ) + (set! (-> sv-148 y) 0.0) + (vector-normalize! sv-148 1.0) + (vector+float*! sv-144 sv-24 sv-148 143360.0) + (set! (-> sv-144 w) 143360.0) + (let ((f30-0 4096000.0) + (s5-0 #f) + (gp-2 (the-as process-focusable #f)) + ) + (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) '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)) + (let* ((s1-0 (-> s3-0 s2-0)) + (v1-54 (if (type? s1-0 collide-shape) + s1-0 + ) + ) + ) + (when v1-54 + (let* ((s0-0 (-> v1-54 process)) + (s1-1 (if (type? s0-0 process-focusable) + s0-0 + ) + ) + ) + (when s1-1 + (when (and (!= *target* s1-1) + (not (focus-test? (the-as process-focusable s1-1) disable dead inactive gun-no-target)) + (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?)) + ) + (!= s4-0 s1-1) + ) + (when (or (not s5-0) (logtest? (process-mask enemy guard) (-> s1-1 mask))) + (set! sv-1952 (new 'stack-no-clear 'vector)) + (let ((v1-71 (-> (get-trans (the-as process-focusable s1-1) 0) quad))) + (set! (-> sv-1952 quad) v1-71) + ) + (set! sv-1968 (vector-normalize-copy! (new 'stack-no-clear 'vector) sv-148 1.0)) + (let ((s0-1 (new 'stack-no-clear 'vector))) + (let ((a1-18 s0-1) + (v1-72 sv-24) + ) + (vector-! a1-18 sv-1952 v1-72) + ) + (let ((f0-7 (vector-normalize-ret-len! s0-1 1.0))) + (let* ((v1-73 s0-1) + ; (f1-1 (-> sv-1968 x)) + ; (f2-0 (-> sv-1968 y)) + ; (f3-0 (-> sv-1968 z)) + ; (f4-0 (-> v1-73 x)) + ; (f5-0 (-> v1-73 y)) + ; (f6-0 (-> v1-73 z)) + ) + ;; og:preserve-this vector-dot + ; (.mula.s f1-1 f4-0) + ; (.madda.s f2-0 f5-0) + ; (.madd.s f1-2 f3-0 f6-0) + (set! f1-2 (vector-dot sv-1968 v1-73)) + ) + (let ((f1-3 f1-2) + (v1-75 (and (not s5-0) (logtest? (process-mask enemy guard) (-> s1-1 mask)))) + ) + (when (and (< 0.707 f1-3) (< (fabs (-> s0-1 y)) 28672.0) (or v1-75 (< f0-7 f30-0))) + (set! s5-0 v1-75) + (set! f30-0 f0-7) + (set! gp-2 (the-as process-focusable s1-1)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (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) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (when gp-2 + (let ((s5-1 (new 'stack-no-clear 'vector))) + (set! (-> s5-1 quad) (-> (get-trans gp-2 3) quad)) + (let ((f0-10 (vector-vector-xz-distance s5-1 (-> sv-16 fire-point))) + (f1-13 (fabs (- (-> s5-1 y) (-> sv-16 fire-point y)))) + ) + 0.0 + (when (< f1-13 24576.0) + (let ((f0-14 (* 0.5 (asin (/ (* 184320.0 f0-10) (* sv-28 sv-28)))))) + (set! (-> sv-20 y) (sin f0-14)) + ) + (vector-normalize! sv-20 1.0) + ) + ) + ) + ) + ) + (let ((a1-33 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> a1-33 ent) (-> self entity)) + (set! (-> a1-33 charge) 1.0) + (set! (-> a1-33 options) (projectile-options)) + (logclear! (-> a1-33 options) (projectile-options po14 po15 po16)) + (set! (-> a1-33 pos quad) (-> sv-24 quad)) + (set! (-> a1-33 vel quad) (-> (vector-float*! (new 'stack-no-clear 'vector) sv-20 sv-28) quad)) + (set! (-> a1-33 notify-handle) (the-as handle #f)) + (set! (-> a1-33 owner-handle) (process->handle self)) + (set! (-> a1-33 target-handle) (the-as handle #f)) + (set! (-> a1-33 target-pos quad) (the-as uint128 0)) + (set! (-> a1-33 ignore-handle) (process->handle self)) + (let* ((v1-127 *game-info*) + (a0-100 (+ (-> v1-127 attack-id) 1)) + ) + (set! (-> v1-127 attack-id) a0-100) + (set! (-> a1-33 attack-id) a0-100) + ) + (set! (-> a1-33 timeout) (seconds 4)) + (the-as gun-red-3-grenade (spawn-projectile gun-red-3-grenade a1-33 self *default-dead-pool*)) + ) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod projectile-method-39 ((this gun-red-3-grenade)) + (let* ((a2-0 (-> this root)) + (v1-0 (-> a2-0 status)) + ) + (if (logtest? v1-0 (collide-status touch-surface)) + (vector-float*! (-> a2-0 transv) (-> a2-0 transv) 0.6) + ) + (when (and (logtest? v1-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 (gun-red-3-grenade) + :virtual #t + :trans (behavior () + (go-impact self) + (let ((t9-2 (-> (find-parent-state) trans))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +(defstate sitting (gun-red-3-grenade) + :virtual #t + :trans (behavior () + (go-impact self) + (let ((t9-2 (-> (find-parent-state) trans))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +(defstate impact-tiny (gun-red-3-grenade) + :virtual #t + :event projectile-event-handler + :enter (behavior () + '() + ) + :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) 0.0) + (set! (-> gp-0 scale) 1.0) + (set! (-> gp-0 group) (-> *part-group-id-table* 104)) + (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 self) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (while (-> self child) + (suspend) + ) + (deactivate self) + ) + ) + +(defmethod deactivate ((this gun-red-3-grenade)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (blit-displays-work-method-17 *blit-displays-work* *zero-vector* 0 1.0 #f) + (call-parent-method this) + (none) + ) + +(defstate impact (gun-red-3-grenade) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (when (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) + ) + ) + ) + (+! (-> *game-info* shots-hit 1) 1.0) + #t + ) + ) + ) + ) + :code (behavior () + (sound-play "red3-blast") + (find-and-damage-targets self) + (set-time! (-> self state-time)) + (when (not (-> self immediate-detonation?)) + (let ((gp-1 (new 'stack-no-clear 'red-3-sphere-init-params))) + (set! (-> gp-1 pos quad) (-> self root trans quad)) + (process-spawn red-3-sphere gp-1 :name "red-3-sphere" :to self) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 88 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* 88)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 88)) + ) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-49 (-> self root root-prim))) + (set! (-> v1-49 prim-core collide-as) (collide-spec)) + (set! (-> v1-49 prim-core collide-with) (collide-spec)) + ) + 0 + (let ((gp-4 (-> self child))) + (while gp-4 + (send-event (ppointer->process gp-4) 'notice 'die) + (set! gp-4 (-> gp-4 0 brother)) + ) + ) + (let ((gp-6 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (math-camera-pos)))) + 0.0 + (let* ((f0-2 (vector-length gp-6)) + (f30-0 (* 0.0000016276042 f0-2)) + ) + (cpad-set-buzz! + (-> *cpad-list* cpads 0) + 1 + (the int (* 255.0 (lerp-scale-clamp 1.0 0.3 f30-0 0.1 0.8))) + (the-as time-frame (the int (* 300.0 (lerp 0.3 0.1 f30-0)))) + ) + (let ((f30-1 (fmin 1.0 f30-0))) + (while (-> self child) + (let ((f0-11 (* 0.0044444446 (the float (- (current-time) (-> self state-time)))))) + 0.0 + (let* ((f0-13 (- 1.0 (curve2d-method-9 *impact-blur* f0-11 1))) + (f0-14 (lerp f0-13 1.0 f30-1)) + ) + (set! (-> *display* force-sync) (the-as uint 2)) + (blit-displays-work-method-17 *blit-displays-work* (-> self root trans) 2 (fmin 1.0 f0-14) #f) + ) + ) + (let ((gp-8 (-> self child))) + (while gp-8 + (send-event (ppointer->process gp-8) 'notice 'die) + (set! gp-8 (-> gp-8 0 brother)) + ) + ) + (suspend) + ) + ) + ) + ) + (blit-displays-work-method-17 *blit-displays-work* (-> self root trans) 15 1.0 #f) + (deactivate self) + ) + ) + +;; WARN: Return type mismatch (pointer process) vs object. +(defbehavior gun-fire-red-1 target () + (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 (-> self gun))) + (let ((s5-0 (-> *part-id-table* 216))) + (get-field-spec-by-id s5-0 (sp-field-id spt-omega)) + (let ((s5-1 (get-field-spec-by-id s5-0 (sp-field-id spt-rotate-y)))) + (if s5-1 + (set! (-> s5-1 initial-valuef) (y-angle (-> self control))) + ) + ) + ) + (launch-particles (-> *part-id-table* 216) (-> gp-0 fire-point)) + (let ((s5-2 (new 'stack-no-clear 'vector))) + (let ((v1-10 (-> gp-0 fire-point))) + (let ((a0-4 (-> gp-0 fire-dir-out))) + (let ((a1-4 24576.0)) + (.mov vf7 a1-4) + ) + (.lvf vf5 (&-> a0-4 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 (&-> s5-2 quad) vf6) + (set! (-> s5-2 w) 24576.0) + (when (and (sphere-in-view-frustum? (the-as sphere s5-2)) + (< 24576.0 (vector-vector-distance s5-2 (math-camera-pos))) + ) + (let ((s5-3 + (process-spawn + manipy + :init manipy-init + (-> gp-0 fire-point) + (-> self entity) + (art-group-get-by-name *level* "skel-gun-red-cone" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when s5-3 + (send-event (ppointer->process s5-3) 'anim-mode 'play1) + (send-event (ppointer->process s5-3) 'anim "idle") + (forward-up->quaternion (-> (the-as manipy (-> s5-3 0)) root quat) (-> gp-0 fire-dir-out) *up-vector*) + (let ((f30-1 + (vector-dot + (-> gp-0 fire-dir-out) + (vector-! (new 'stack-no-clear 'vector) (-> gp-0 fire-point) (math-camera-pos)) + ) + ) + (f0-5 (vector-vector-xz-distance (-> gp-0 fire-point) (math-camera-pos))) + ) + (when (and (< f30-1 0.0) (< f0-5 32768.0)) + (set! (-> (the-as manipy (-> s5-3 0)) root scale z) (lerp-scale 0.2 1.0 (fabs f0-5) 20480.0 32768.0)) + (set! (-> (the-as manipy (-> s5-3 0)) root scale x) (-> (the-as manipy (-> s5-3 0)) root scale z)) + ) + ) + ) + ) + ) + ) + (process-spawn + gun-red-shot + (-> gp-0 fire-point) + (-> gp-0 fire-dir-out) + :name "gun-red-shot" + :to (ppointer->process (-> gp-0 gun)) + ) + ) + ) + ) + +(defbehavior target-gun-can-fire-red? target ((arg0 pickup-type)) + #t + ) + +;; WARN: Return type mismatch object vs (pointer process). +(defbehavior target-gun-fire-red target ((arg0 pickup-type)) + (+! (-> *game-info* shots-fired 1) 1.0) + (the-as (pointer process) (case arg0 + (((pickup-type gun-red-1)) + (gun-fire-red-1) + ) + (((pickup-type gun-red-2)) + (gun-fire-red-2) + ) + (((pickup-type gun-red-3)) + (gun-fire-red-3) + ) + ) + ) + ) + +;; WARN: Return type mismatch none vs object. +(defbehavior gun-red-shot-event-handler gun-red-shot ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('touched) + (send-attack! self (the-as process-drawable arg0) (the-as touching-shapes-entry (-> arg3 param 0))) + ) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod send-attack! ((this gun-red-shot) (arg0 process-drawable) (arg1 touching-shapes-entry)) + (let* ((s5-0 arg0) + (v1-0 (if (type? s5-0 process-drawable) + s5-0 + ) + ) + ) + (when v1-0 + (let* ((s5-2 (vector-! (new 'stack-no-clear 'vector) (-> v1-0 root trans) (-> this start-pos))) + (f30-0 (* (if (< (vector-length s5-2) 24576.0) + 3.0 + 2.0 + ) + (if (logtest? (game-feature feature22) (-> *game-info* features)) + 2.0 + 1.0 + ) + ) + ) + ) + (if (and (logtest? (process-mask guard) (-> arg0 mask)) + (not (-> *setting-control* user-current gun-target-guards?)) + ) + (set! f30-0 0.0) + ) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (rot-zxy-from-vector! s2-0 s5-2) + (let ((f28-0 (deg- (-> s2-0 x) (-> this start-rot x))) + (f0-6 (deg- (-> s2-0 y) (-> this start-rot y))) + ) + (when (or (< 2730.6667 (fabs f28-0)) (< 8192.0 (fabs f0-6))) + (let ((f1-5 (fmax -2730.6667 (fmin 2730.6667 f28-0))) + (f0-8 (fmax -8192.0 (fmin 8192.0 f0-6))) + ) + (set! (-> s2-0 x) (+ (-> this start-rot x) f1-5)) + (set! (-> s2-0 y) (+ (-> this start-rot y) f0-8)) + ) + (set-vector! s5-2 0.0 0.0 1.0 1.0) + (vector-rotate-around-x! s5-2 s5-2 (-> s2-0 x)) + (vector-rotate-around-y! s5-2 s5-2 (-> s2-0 y)) + ) + ) + ) + (+! (-> *game-info* shots-hit 1) 1.0) + (send-event + arg0 + 'attack + arg1 + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> this attack-id)) + (damage f30-0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'eco-red) + (attacker-velocity s5-2) + (attacker (process->handle *target*)) + ) + ) + ) + ) + ) + ) + (none) + ) + +(defmethod stub ((this gun-red-shot)) + 0 + (none) + ) + +(defmethod init-probes! ((this gun-red-shot) (arg0 collide-shape)) + (let ((s5-0 (-> this probe-count))) + (when (< s5-0 19) + (let* ((s4-0 (-> arg0 process)) + (a0-2 (if (type? s4-0 process-focusable) + (the-as process-focusable s4-0) + ) + ) + (s4-1 (new 'stack-no-clear 'vector)) + ) + (if a0-2 + (set! (-> s4-1 quad) (-> (get-trans a0-2 3) quad)) + (set! (-> s4-1 quad) (-> arg0 root-prim prim-core world-sphere quad)) + ) + (vector-! s4-1 s4-1 (-> this start-pos)) + (vector-normalize! s4-1 1.0) + (let ((s3-2 (new 'stack-no-clear 'vector))) + (rot-zxy-from-vector! s3-2 s4-1) + (let ((f30-0 (deg- (-> s3-2 x) (-> this start-rot x))) + (f0-4 (deg- (-> s3-2 y) (-> this start-rot y))) + ) + (when (or (< 2730.6667 (fabs f30-0)) (< 8192.0 (fabs f0-4))) + (let ((f1-3 (fmax -2730.6667 (fmin 2730.6667 f30-0))) + (f0-6 (fmax -8192.0 (fmin 8192.0 f0-4))) + ) + (set! (-> s3-2 x) (+ (-> this start-rot x) f1-3)) + (set! (-> s3-2 y) (+ (-> this start-rot y) f0-6)) + ) + (set-vector! s4-1 0.0 0.0 1.0 1.0) + (vector-rotate-around-x! s4-1 s4-1 (-> s3-2 x)) + (vector-rotate-around-y! s4-1 s4-1 (-> s3-2 y)) + ) + ) + ) + (set! (-> this probe-dir s5-0 quad) (-> s4-1 quad)) + ) + (set! (-> this probe-count) (+ s5-0 1)) + ) + ) + (none) + ) + +(defmethod find-targets ((this gun-red-shot)) + (local-vars (a2-5 float) (a2-12 float)) + (rlet ((vf1 :class vf) + (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 ((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)) + (set! *actor-list-length* (fill-actor-list-for-box *actor-hash* s5-0 *actor-list* 256)) + ) + (when (logtest? s4-0 (collide-spec player-list)) + (let ((a0-6 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((v1-18 (-> a0-6 next0))) + (while (!= a0-6 (-> *collide-player-list* alive-list-end)) + (let* ((a0-7 (-> (the-as connection a0-6) param1)) + (a1-4 (-> (the-as collide-shape a0-7) root-prim)) + ) + (when (logtest? s4-0 (-> a1-4 prim-core collide-as)) + (let ((a1-5 (-> a1-4 prim-core))) + (let ((a2-4 a1-5) + (a3-1 s5-0) + ) + (.lvf vf2 (&-> a2-4 world-sphere quad)) + (.lvf vf3 (&-> a3-1 min 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-1 (+ (-> a1-5 world-sphere w) (-> s5-0 min w))) + ) + (when (< f0-2 (* f1-1 f1-1)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-7)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! a0-6 v1-18) + *collide-player-list* + (set! v1-18 (-> v1-18 next0)) + ) + ) + ) + ) + (when (logtest? s4-0 (collide-spec hit-by-player-list)) + (let ((a0-9 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((v1-26 (-> a0-9 next0))) + (while (!= a0-9 (-> *collide-hit-by-player-list* alive-list-end)) + (let* ((a0-10 (-> (the-as connection a0-9) param1)) + (a1-16 (-> (the-as collide-shape a0-10) root-prim)) + ) + (when (logtest? s4-0 (-> a1-16 prim-core collide-as)) + (let ((a1-17 (-> a1-16 prim-core))) + (let ((a2-11 a1-17) + (a3-2 s5-0) + ) + (.lvf vf2 (&-> a2-11 world-sphere quad)) + (.lvf vf3 (&-> a3-2 min 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-5 (+ (-> a1-17 world-sphere w) (-> s5-0 min w))) + ) + (when (< f0-3 (* f1-5 f1-5)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-10)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! a0-9 v1-26) + *collide-hit-by-player-list* + (set! v1-26 (-> v1-26 next0)) + ) + ) + ) + ) + (dotimes (s5-1 *actor-list-length*) + (let ((a1-28 (-> *actor-list* s5-1))) + (if (logtest? s4-0 (-> a1-28 root-prim prim-core collide-as)) + (init-probes! this a1-28) + ) + ) + ) + ) + ) + (set! (-> this actor-count) (-> this probe-count)) + 0 + (none) + ) + ) + +(defmethod setup-probes ((this gun-red-shot)) + (find-targets this) + (let ((s5-0 (-> this probe-count))) + (while (< s5-0 19) + (let ((f28-0 (rand-vu-float-range -2730.6667 2730.6667)) + (f30-0 (rand-vu-float-range -8192.0 8192.0)) + (s4-0 (-> this probe-dir s5-0)) + ) + (set-vector! s4-0 0.0 0.0 1.0 1.0) + (vector-rotate-around-x! s4-0 s4-0 (+ (-> this start-rot x) f28-0)) + (vector-rotate-around-y! s4-0 s4-0 (+ (-> this start-rot y) f30-0)) + ) + (+! s5-0 1) + ) + (set! (-> this probe-count) s5-0) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod do-collision ((this gun-red-shot) (arg0 vector)) + (local-vars (at-0 int)) + (with-pp + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (-> this root))) + (let ((v1-0 (new 'stack-no-clear 'collide-query))) + (set! (-> gp-0 trans quad) (-> this start-pos quad)) + (vector-float*! (-> gp-0 transv) arg0 61440.0) + (let ((a1-1 v1-0)) + (set! (-> a1-1 radius) (-> gp-0 root-prim local-sphere w)) + (set! (-> a1-1 collide-with) (-> gp-0 root-prim prim-core collide-with)) + (set! (-> a1-1 ignore-process0) this) + (set! (-> a1-1 ignore-process1) (ppointer->process (-> this parent))) + (set! (-> a1-1 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> a1-1 action-mask) (collide-action solid)) + ) + (set! (-> v1-0 start-pos quad) (-> gp-0 trans quad)) + (set! (-> v1-0 move-dist quad) (-> gp-0 transv quad)) + (fill-using-line-sphere *collide-cache* v1-0) + ) + (let ((v1-2 (-> gp-0 transv))) + (.lvf vf1 (&-> (-> gp-0 transv) quad)) + (let ((f0-2 (-> pp clock frames-per-second))) + (.mov at-0 f0-2) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> v1-2 quad) vf1) + ) + (integrate-and-collide! gp-0 (-> gp-0 transv)) + (if (logtest? (-> gp-0 status) (collide-status touch-surface touch-wall)) + (sound-play "red-shot-hit") + ) + ) + (none) + ) + ) + ) + +(defmethod check-blocked? ((this gun-red-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)) + ) + (if (fill-and-try-snap-to-surface v1-0 (-> v1-0 transv) -6144.0 0.0 -2048.0 t1-0) + #t + ) + ) + ) + +(defstate debug-idle (gun-red-shot) + :virtual #t + :code (behavior () + (set-time! (-> self state-time)) + (until (time-elapsed? (-> self state-time) (seconds 3)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (dotimes (s5-0 (-> self probe-count)) + (vector-float*! gp-0 (-> self probe-dir s5-0) 61440.0) + (vector+! gp-0 gp-0 (-> self start-pos)) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + gp-0 + (meters 0.5) + (if (< s5-0 (-> self actor-count)) + (new 'static 'rgba :r #xff :a #x80) + (new 'static 'rgba :r #xff :g #xff :a #x60) + ) + ) + ) + ) + (add-debug-vector + #t + (bucket-id debug) + (-> self start-pos) + (-> self start-dir) + (meters 6) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + ) + (suspend) + ) + ) + ) + +(defstate blocked (gun-red-shot) + :virtual #t + :event gun-red-shot-event-handler + :code (behavior () + (suspend) + 0 + ) + ) + +(defstate idle (gun-red-shot) + :virtual #t + :event gun-red-shot-event-handler + :code (behavior () + (let ((gp-0 0)) + (countdown (s5-0 3) + (countdown (s4-0 7) + (when (< gp-0 19) + (do-collision self (-> self probe-dir gp-0)) + (+! gp-0 1) + ) + ) + (suspend) + ) + ) + ) + ) + +(defbehavior gun-red-shot-init-by-other gun-red-shot ((arg0 vector) (arg1 vector)) + (set! (-> self start-pos quad) (-> arg0 quad)) + (set! (-> self start-dir quad) (-> arg1 quad)) + (rot-zxy-from-vector! (-> self start-rot) arg1) + (let* ((v1-2 *game-info*) + (a0-7 (+ (-> v1-2 attack-id) 1)) + ) + (set! (-> v1-2 attack-id) a0-7) + (set! (-> self attack-id) a0-7) + ) + (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) + (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-red-shot)) + (let ((v1-10 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-10 prim-core collide-with) + (collide-spec backgnd bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set-vector! (-> v1-10 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-10) + ) + (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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> self root) s5-0) + ) + (let ((s5-1 (-> self root))) + (set! (-> s5-1 trans quad) (-> arg0 quad)) + (quaternion-copy! (-> s5-1 quat) (-> self parent 0 root quat)) + (vector-identity! (-> s5-1 scale)) + ) + (update-transforms (-> self root)) + (set! (-> self event-hook) gun-red-shot-event-handler) + (logior! (-> self mask) (process-mask projectile)) + (logclear! (-> self mask) (process-mask enemy)) + (setup-probes self) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + (let ((v1-39 (cond + ((logtest? (-> *part-group-id-table* 84 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self start-pos quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 84)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self start-pos quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 84)) + ) + ) + ) + ) + (send-event (ppointer->process v1-39) 'clock self) + ) + (draw-beam (-> *part-id-table* 213) (-> self start-pos) (-> self start-dir) #f) + (sound-play "red-shot-fire") + (vector-float*! (-> self root transv) (-> self start-dir) 61440.0) + (if (check-blocked? self) + (go-virtual blocked) + (go-virtual idle) + ) + ) diff --git a/goal_src/jak3/engine/target/gun/gun-states.gc b/goal_src/jak3/engine/target/gun/gun-states.gc index 11eeea1608..8556b70c51 100644 --- a/goal_src/jak3/engine/target/gun/gun-states.gc +++ b/goal_src/jak3/engine/target/gun/gun-states.gc @@ -7,3 +7,476 @@ ;; DECOMP BEGINS +(defstate target-gun-stance (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('gun) + (let ((gp-0 (-> block param 0)) + (v0-0 (target-standard-event-handler proc argc message block)) + ) + (when v0-0 + (cond + ((= gp-0 26) + (if (logtest? (game-secrets gun-upgrade-red-1) (-> *game-info* secrets)) + (set! (-> self control unknown-word04) (the-as uint jakb-gun-red-fire-fast-ja)) + (set! (-> self control unknown-word04) (the-as uint jakb-gun-red-fire-ja)) + ) + ) + ((= gp-0 28) + (if (logtest? (game-secrets gun-upgrade-red-3) (-> *game-info* secrets)) + (set! (-> self control unknown-word04) (the-as uint jakb-gun-red-fire-fast-ja)) + (set! (-> self control unknown-word04) (the-as uint jakb-gun-red-fire-ja)) + ) + ) + ((= gp-0 27) + (set! (-> self control unknown-word04) (the-as uint jakb-gun-red-fire-2-ja)) + ) + ((or (= gp-0 35) (= gp-0 27) (= gp-0 36) (= gp-0 37)) + (set! (-> self control unknown-word04) (the-as uint jakb-gun-dark-fire-ja)) + ) + ((or (= gp-0 29) (= gp-0 30)) + (set! (-> self control unknown-word04) (the-as uint jakb-gun-yellow-fire-low-ja)) + ) + ((= gp-0 31) + (set! (-> self control unknown-word04) (the-as uint jakb-gun-yellow-fire-3-ja)) + ) + ((or (= gp-0 32) (= gp-0 34)) + (set! (-> self control unknown-word04) (the-as uint jakb-gun-blue-fire-single-ja)) + ) + ((= gp-0 33) + (set! (-> self control unknown-word04) (the-as uint jakb-gun-blue-fire-2-ja)) + ) + ) + ) + v0-0 + ) + ) + (('wade) + #f + ) + (else + (target-standard-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (logior! (-> self target-flags) (target-flags lleg-still rleg-still)) + (set! (-> self control mod-surface) *gun-walk-mods*) + (set! (-> self control unknown-word04) (the-as uint #f)) + (set-time! (-> self state-time)) + ) + :exit (behavior () + (set! (-> self control bend-target) 0.0) + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still)) + (target-state-hook-exit) + (target-gun-exit) + ) + :trans (behavior () + ((-> self state-hook)) + (when (= (-> self control ground-pat material) (pat-material ice)) + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still)) + (set! (-> self control bend-target) 0.0) + (remove-exit) + (go target-ice-stance) + ) + (when (or (move-legs?) (< 8192.0 (fabs (-> self gun gun-roty-rel)))) + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still)) + (set! (-> self control bend-target) 0.0) + (remove-exit) + (go target-gun-walk) + ) + (if (want-to-powerjak?) + (go target-powerjak-get-on) + ) + (when (and (cpad-hold? (-> self control cpad number) l1) (can-duck?)) + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still)) + (set! (-> self control bend-target) 0.0) + (remove-exit) + (go target-duck-stance #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 x) + ) + (can-jump? #f) + ) + (target-jump-go) + ) + (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-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 square) + ) + (can-hands? #t) + ) + (go target-running-attack) + ) + (when (and (and (focus-test? self light) (nonzero? (-> self lightjak))) + (and (cpad-pressed? (-> self control cpad number) triangle) + (logtest? (game-feature lightjak-regen) (-> self game features)) + (and (< (-> self fact health) (-> self fact health-max)) (zero? (-> self lightjak latch-out-time))) + ) + ) + (set! (-> self lightjak lightjak-before-powerjak) #t) + (go target-lightjak-regen 0) + ) + (slide-down-test) + (fall-test target-falling (-> *TARGET-bank* fall-height)) + ) + :code (behavior () + (local-vars (v1-344 object)) + (let ((gp-0 (-> self skel top-anim frame-targ))) + (cond + ((or (= gp-0 jakb-gun-red-takeout-ja) + (= gp-0 jakb-gun-yellow-takeout-ja) + (= gp-0 jakb-gun-blue-takeout-ja) + (= gp-0 jakb-gun-dark-takeout-ja) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! gp-0 :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((or (= gp-0 jakb-gun-red-fire-2-ja) (= gp-0 jakb-gun-dark-fire-ja) (= gp-0 jakb-gun-blue-fire-2-ja)) + (set! (-> self control unknown-word04) (the-as uint gp-0)) + ) + ) + ) + (let ((s5-0 (-> self game gun-type))) + (b! #t cfg-143 :delay (nop!)) + (label cfg-19) + (let* ((v1-47 (gun->eco (-> self gun gun-type))) + (gp-1 (cond + ((= v1-47 (pickup-type eco-blue)) + jakb-gun-stance-blue-ja + ) + ((= v1-47 (pickup-type eco-yellow)) + jakb-gun-stance-yellow-ja + ) + ((= v1-47 (pickup-type eco-dark)) + jakb-gun-stance-dark-ja + ) + (else + jakb-gun-stance-ja + ) + ) + ) + ) + (cond + ((and (ja-group? gp-1) (= s5-0 (-> self gun gun-type))) + ) + ((let ((v1-67 (ja-group))) + (and (and v1-67 (or (= v1-67 jakb-gun-stance-ja) (= v1-67 jakb-gun-stance-dark-ja))) + (or (= gp-1 jakb-gun-stance-ja) (= gp-1 jakb-gun-stance-dark-ja)) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-gun-transformation-twirl-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.1)) + (set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim gp-1)) + ) + ((let ((v1-106 (ja-group))) + (and (and v1-106 (or (= v1-106 jakb-gun-stance-ja) (= v1-106 jakb-gun-stance-dark-ja))) + (or (= gp-1 jakb-gun-stance-yellow-ja) (= gp-1 jakb-gun-stance-blue-ja)) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-gun-front-to-side-hop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.1)) + (set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim gp-1)) + ) + ((let ((v1-146 (ja-group))) + (and (and v1-146 (or (= v1-146 jakb-gun-stance-yellow-ja) (= v1-146 jakb-gun-stance-blue-ja))) + (or (= gp-1 jakb-gun-stance-ja) (= gp-1 jakb-gun-stance-dark-ja)) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-gun-side-to-front-hop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.1)) + (set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim gp-1)) + ) + ((let ((v1-186 (ja-group))) + (and (and v1-186 (or (= v1-186 jakb-gun-stance-yellow-ja) (= v1-186 jakb-gun-stance-blue-ja))) + (or (= gp-1 jakb-gun-stance-blue-ja) (= gp-1 jakb-gun-stance-yellow-ja)) + (!= (gun->eco s5-0) (gun->eco (-> self gun gun-type))) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-gun-blue-to-yellow-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.1)) + (set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim gp-1)) + ) + ((and (!= s5-0 (-> self gun gun-type)) (= (gun->eco s5-0) (gun->eco (-> self gun gun-type)))) + (ja-channel-push! 1 (seconds 0.1)) + (cond + ((= (-> self skel top-anim frame-targ) jakb-gun-side-to-side-hop-1-ja) + (ja-no-eval :group! jakb-gun-side-to-side-hop-1-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= (-> self skel top-anim frame-targ) jakb-gun-side-to-side-hop-2-ja) + (ja-no-eval :group! jakb-gun-side-to-side-hop-2-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= (gun->eco s5-0) (pickup-type eco-yellow)) + ) + (else + (ja-no-eval :group! jakb-gun-transformation-twirl-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim gp-1)) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim gp-1)) + ) + ) + ) + (set! s5-0 (-> self gun gun-type)) + (suspend) + (ja :num! (loop!)) + (when (can-play-stance-amibent?) + (set-time! (-> self ambient-time)) + (target-gun-end-mode #t) + ) + (cond + ((not (-> self control unknown-spool-anim00)) + ) + (else + (b! + (not (or (= (-> self control unknown-spool-anim00) jakb-gun-dark-fire-ja) + (= (-> self control unknown-spool-anim00) jakb-gun-red-fire-2-ja) + (= (-> self control unknown-spool-anim00) jakb-gun-blue-fire-2-ja) + ) + ) + cfg-140 + :delay (nop!) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self control unknown-spool-anim00)) + (suspend) + (b! #t cfg-131 :delay (nop!)) + (label cfg-130) + (suspend) + (label cfg-131) + (let ((v1-343 (get-channel (-> self skel top-anim) 0))) + (b! (not v1-343) cfg-138 :likely-delay (set! v1-344 v1-343)) + (let ((a1-37 (= (-> v1-343 frame-group) (-> self control unknown-spool-anim00)))) + (b! (not a1-37) cfg-138 :likely-delay (set! v1-344 a1-37)) + ) + (let ((a0-110 (-> self skel root-channel 0))) + (set! (-> a0-110 num-func) num-func-identity) + (let ((f0-57 (-> v1-343 frame-num))) + (set! (-> a0-110 frame-num) f0-57) + (let ((v1-345 f0-57)) + (b! (not (the int v1-345)) cfg-138 :likely-delay (set! v1-344 v1-345)) + ) + ) + ) + ) + (set! v1-344 (= s5-0 (-> self game gun-type))) + (label cfg-138) + (b! v1-344 cfg-130 :delay (nop!)) + (set! (-> self control unknown-word04) (the-as uint #f)) + (b! #t cfg-143 :delay (nop!)) + (label cfg-140) + (ja-channel-push! 1 0) + (ja-no-eval :group! (-> self control unknown-spool-anim00) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set! (-> self control unknown-word04) (the-as uint #f)) + ) + ) + ) + (label cfg-143) + (b! (using-gun? self) cfg-19 :delay (nop!)) + (let ((gp-2 (-> self skel top-anim frame-targ))) + (cond + ((or (= gp-2 jakb-gun-red-takeout-ja) (= gp-2 jakb-gun-yellow-takeout-ja) (= gp-2 jakb-gun-dark-takeout-ja)) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! gp-2 :num! (seek! 0.0) :frame-num max) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 0.0)) + ) + ) + ((= gp-2 jakb-gun-blue-takeout-ja) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! gp-2 :num! (seek! 0.0) :frame-num (ja-aframe -34.0 0)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 0.0)) + ) + ) + ) + ) + (go target-stance) + ) + :post target-gun-post + ) + +(defstate target-gun-walk (target) + :event target-standard-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self control mod-surface) *gun-walk-mods*) + (case (gun->eco (-> self gun gun-type)) + (((pickup-type eco-yellow) (pickup-type eco-blue)) + (set! (-> self control unknown-word04) (the-as uint 0)) + 0 + ) + (else + (set! (-> self control unknown-word04) (the-as uint 1)) + ) + ) + ) + :exit (behavior () + (target-effect-exit) + (target-state-hook-exit) + (target-gun-exit) + ) + :trans (behavior () + (cond + ((zero? (-> self control unknown-spool-anim00)) + (case (gun->eco (-> self gun gun-type)) + (((pickup-type eco-red) (pickup-type eco-dark)) + (remove-exit) + (go target-gun-walk) + ) + ) + ) + (else + (case (gun->eco (-> self gun gun-type)) + (((pickup-type eco-yellow) (pickup-type eco-blue)) + (remove-exit) + (go target-gun-walk) + ) + ) + ) + ) + ((-> self state-hook)) + (if (not (using-gun? self)) + (go target-walk) + ) + (if (logtest? (water-flag wading) (-> self water flags)) + (go target-wade-walk) + ) + (when (= (-> self control ground-pat material) (pat-material ice)) + (target-effect-exit) + (remove-exit) + (go target-ice-walk) + ) + (when (not (or (move-legs?) (< 182.04445 (fabs (-> self gun gun-roty-rel))))) + (target-effect-exit) + (remove-exit) + (go target-gun-stance) + ) + (if (want-to-powerjak?) + (go target-powerjak-get-on) + ) + (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 l1) + ) + (and (!= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) (can-roll?)) + ) + (go target-roll) + ) + (when (and (cpad-hold? (-> self control cpad number) l1) (can-duck?)) + (target-effect-exit) + (remove-exit) + (go target-duck-walk #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 x) + ) + (can-jump? #f) + ) + (target-jump-go) + ) + (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-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 square) + ) + (can-hands? #t) + ) + (go target-running-attack) + ) + (if (wall-hide?) + (go target-hide) + ) + (slide-down-test) + (fall-test target-falling (-> *TARGET-bank* fall-height)) + ) + :code (behavior () + (target-walk-anim -300) + ) + :post target-gun-post + ) diff --git a/goal_src/jak3/engine/target/gun/gun-util.gc b/goal_src/jak3/engine/target/gun/gun-util.gc index de5c72eac9..a5b2ea53e0 100644 --- a/goal_src/jak3/engine/target/gun/gun-util.gc +++ b/goal_src/jak3/engine/target/gun/gun-util.gc @@ -12,7 +12,7 @@ ) -(defmethod projectile-method-31 ((this gun-eject)) +(defmethod init-proj-settings! ((this gun-eject)) (initialize-skeleton this (the-as skeleton-group (art-group-get-by-name *level* "skel-gun" (the-as (pointer level) #f))) @@ -22,7 +22,7 @@ (let ((v1-5 (-> this skel root-channel 0))) (set! (-> v1-5 frame-group) (-> this parent 0 skel channel 0 frame-group)) ) - (let ((t9-3 (method-of-type projectile-bounce projectile-method-31))) + (let ((t9-3 (method-of-type projectile-bounce init-proj-settings!))) (t9-3 this) ) (quaternion-copy! (-> this root quat) (-> this parent 0 root quat)) @@ -38,13 +38,13 @@ ) -(defmethod projectile-method-31 ((this gun-mag-yellow)) +(defmethod init-proj-settings! ((this gun-mag-yellow)) (initialize-skeleton this (the-as skeleton-group (art-group-get-by-name *level* "skel-ammo-yellow" (the-as (pointer level) #f))) (the-as pair 0) ) - (let ((t9-2 (method-of-type projectile-bounce projectile-method-31))) + (let ((t9-2 (method-of-type projectile-bounce init-proj-settings!))) (t9-2 this) ) (set! (-> this timeout) (seconds 4)) @@ -58,13 +58,13 @@ ) -(defmethod projectile-method-31 ((this gun-mag-red)) +(defmethod init-proj-settings! ((this gun-mag-red)) (initialize-skeleton this (the-as skeleton-group (art-group-get-by-name *level* "skel-ammo-red" (the-as (pointer level) #f))) (the-as pair 0) ) - (let ((t9-2 (method-of-type projectile-bounce projectile-method-31))) + (let ((t9-2 (method-of-type projectile-bounce init-proj-settings!))) (t9-2 this) ) (set! (-> this timeout) (seconds 4)) @@ -78,13 +78,13 @@ ) -(defmethod projectile-method-31 ((this gun-mag-blue)) +(defmethod init-proj-settings! ((this gun-mag-blue)) (initialize-skeleton this (the-as skeleton-group (art-group-get-by-name *level* "skel-ammo-blue" (the-as (pointer level) #f))) (the-as pair 0) ) - (let ((t9-2 (method-of-type projectile-bounce projectile-method-31))) + (let ((t9-2 (method-of-type projectile-bounce init-proj-settings!))) (t9-2 this) ) (set! (-> this timeout) (seconds 4)) @@ -98,13 +98,13 @@ ) -(defmethod projectile-method-31 ((this gun-mag-dark)) +(defmethod init-proj-settings! ((this gun-mag-dark)) (initialize-skeleton this (the-as skeleton-group (art-group-get-by-name *level* "skel-ammo-dark" (the-as (pointer level) #f))) (the-as pair 0) ) - (let ((t9-2 (method-of-type projectile-bounce projectile-method-31))) + (let ((t9-2 (method-of-type projectile-bounce init-proj-settings!))) (t9-2 this) ) (set! (-> this timeout) (seconds 4)) @@ -362,7 +362,7 @@ ) (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 uint #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 self)) (let* ((v1-133 *game-info*) @@ -429,18 +429,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 +448,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 +504,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 +629,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 +777,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) @@ -899,7 +871,7 @@ ) (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 uint #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-16 *game-info*) @@ -1116,7 +1088,7 @@ ) ;; WARN: Return type mismatch object vs float. -(defun adjust-player-ammo ((arg0 int) (arg1 pickup-type)) +(defun adjust-player-ammo ((arg0 float) (arg1 pickup-type)) (if (and *target* (and (focus-test? *target* light) (nonzero? (-> *target* lightjak))) (not (logtest? (-> *target* lightjak stage) (lightjak-stage ls1))) @@ -1130,7 +1102,7 @@ (let* ((f0-2 (* 0.0033333334 (the float arg0) arg1)) (f30-0 (fmin (fmax 0.0 f0-2) arg3)) ) - (adjust-player-ammo (the-as int (- f30-0)) arg2) + (adjust-player-ammo (- f30-0) arg2) f30-0 ) ) @@ -1140,7 +1112,7 @@ (let* ((f0-0 (get-remaining-player-ammo arg0)) (f0-1 (- f0-0 (the float (the int f0-0)))) ) - (adjust-player-ammo (the-as int (- f0-1)) arg0) + (adjust-player-ammo (- f0-1) arg0) ) (none) ) 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 f72e294910..e01d22a319 100644 --- a/goal_src/jak3/engine/target/gun/gun-yellow-shot.gc +++ b/goal_src/jak3/engine/target/gun/gun-yellow-shot.gc @@ -7,3 +7,2151 @@ ;; DECOMP BEGINS +(deftype gun-yellow-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-launcher) + (main-shot-part sparticle-launcher) + (shot-aim-part sparticle-launcher) + (shot-ring-part sparticle-launcher) + ) + (:methods + (draw-main-shot (_type_ vector vector) none) + (gun-yellow-shot-method-42 (_type_ float float matrix) none) + (spawn-particles (_type_ vector) none) + ) + ) + + +(deftype gun-yellow-2-proc-ignore (structure) + ((hand handle) + (time time-frame) + ) + :pack-me + ) + + +(deftype gun-yellow-shot-2 (gun-yellow-shot) + ((last-collide-time time-frame) + (snd-trail sound-id) + (hit-yet? symbol) + (actor-deflect? symbol) + (max-actor-deflect-count int32) + (last-hit-enemy handle) + (delay-attack time-frame) + (delay-norm vector :inline) + (enemy-hit-count int32) + (ignore-list gun-yellow-2-proc-ignore 6 :inline) + (last-attack-time time-frame) + ) + (:methods + (on-impact (_type_ handle) object) + (handle-impact (_type_ handle) object) + (is-in-ignore-list? (_type_ handle) symbol) + (add-to-ignore-list! (_type_ handle) int) + ) + ) + + +(deftype gun-yellow-shot-3 (gun-yellow-shot) + () + ) + + +(deftype gun-yellow-3-saucer (projectile-bounce) + ((total-float-time time-frame) + (firing? symbol :offset 568) + (asleep? symbol) + (first-fire-time time-frame) + (activated? symbol) + (collided-with-surface? symbol) + (last-deflect-time time-frame) + (last-fire-time time-frame) + (spawn-part sparticle-launch-control) + (last-blink-time time-frame) + (finished? symbol) + (initial-fire-dir vector :inline) + (initial-fire-pos vector :inline) + (last-deduct-ammo-time time-frame) + (total-ammo-drained float) + (total-ammo-to-drain float) + (total-fire-time time-frame) + (snd-hum sound-id) + (snd-shoot sound-id) + ) + (:state-methods + undefined + navigating + spinning + impact-explode + falling-down + burnt-husk + ) + (:methods + (start-firing (_type_) none) + (init-antigrav (_type_) none) + (find-targets (_type_) int) + (spawn-shot (_type_ vector) (pointer gun-yellow-shot-3)) + ) + (:states + gun-yellow-3-saucer-base-state + ) + ) + + +(defmethod relocate ((this gun-yellow-3-saucer) (offset int)) + (call-parent-method this offset) + ) + +(deftype target-quality-info-saucer (structure) + ((targ handle) + (value float) + ) + ) + + +;; WARN: Return type mismatch (pointer process) vs (pointer gun-yellow-shot-3). +(defmethod spawn-shot ((this gun-yellow-3-saucer) (arg0 vector)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 x) (rand-vu-float-range -1.0 1.0)) + (set! (-> s5-0 y) (rand-vu-float-range -1.0 1.0)) + (set! (-> s5-0 z) (rand-vu-float-range -1.0 1.0)) + (set! (-> s5-0 w) 1.0) + (vector+float*! arg0 arg0 s5-0 4096.0) + ) + (let ((s5-2 (vector-! (new 'stack-no-clear 'vector) arg0 (-> this root trans))) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (vector-normalize! s5-2 1.0) + (set! (-> s3-0 quad) (-> s5-2 quad)) + (set! (-> s3-0 y) 0.0) + (vector-normalize! s3-0 1228.8) + (vector+! s3-0 (-> this root trans) s3-0) + (+! (-> s3-0 y) -819.2) + (let ((s4-1 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> s4-1 ent) (-> this entity)) + (set! (-> s4-1 charge) 1.0) + (set! (-> s4-1 options) (projectile-options)) + (logclear! (-> s4-1 options) (projectile-options po14 po15 po16)) + (set! (-> s4-1 pos quad) (-> s3-0 quad)) + (set! (-> s4-1 notify-handle) (the-as handle #f)) + (set! (-> s4-1 owner-handle) (the-as handle #f)) + (set! (-> s4-1 target-handle) (the-as handle #f)) + (set! (-> s4-1 target-pos quad) (the-as uint128 0)) + (set! (-> s4-1 ignore-handle) (process->handle (send-event *target* 'get-vehicle))) + (let* ((v1-20 *game-info*) + (a0-20 (+ (-> v1-20 attack-id) 1)) + ) + (set! (-> v1-20 attack-id) a0-20) + (set! (-> s4-1 attack-id) a0-20) + ) + (set! (-> s4-1 timeout) (seconds 4)) + (vector-float*! (-> s4-1 vel) s5-2 819200.0) + (the-as (pointer gun-yellow-shot-3) (spawn-projectile gun-yellow-shot-3 s4-1 this *default-dead-pool*)) + ) + ) + ) + +(defmethod projectile-method-32 ((this gun-yellow-3-saucer)) + (if (not (do-fire-backcheck (-> this root trans) (-> this root transv))) + (go (method-of-object this impact-explode)) + (call-parent-method this) + ) + 0 + (none) + ) + +(defmethod find-targets ((this gun-yellow-3-saucer)) + (local-vars + (sv-16 int) + (sv-1072 vector) + (sv-1076 (inline-array target-quality-info-saucer)) + (sv-1080 int) + (sv-1088 float) + (sv-3792 (pointer int8)) + (sv-3800 int) + (sv-3808 float) + (sv-3812 symbol) + ) + (if (not (-> this firing?)) + (return 0) + ) + (sound-play "yellow3-shot" :id (-> this snd-shoot)) + (if (not (time-elapsed? (-> this last-fire-time) (seconds 0.05))) + (return 0) + ) + (set-time! (-> this last-fire-time)) + (when (and (time-elapsed? (-> this last-deduct-ammo-time) (seconds 0.1)) (< (-> this total-ammo-drained) 50.0)) + (+! (-> this total-ammo-drained) (adjust-player-ammo-over-time + (the-as int (- (current-time) (-> this last-deduct-ammo-time))) + (/ 50.0 (* 0.0033333334 (the float (-> this total-fire-time)))) + (pickup-type ammo-yellow) + (- 50.0 (-> this total-ammo-drained)) + ) + ) + (set-time! (-> this last-deduct-ammo-time)) + ) + (set! sv-16 2) + (set! sv-1072 (new 'stack-no-clear 'vector)) + (set! sv-1076 (new 'stack-no-clear 'inline-array 'target-quality-info-saucer 66)) + (set! sv-1080 0) + (set! sv-1088 (the-as float 0.0)) + (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)) + (let* ((s3-0 (-> s5-0 s4-0)) + (v1-34 (if (type? s3-0 collide-shape) + s3-0 + ) + ) + ) + (when v1-34 + (let* ((s2-0 (-> v1-34 process)) + (s3-1 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (when s3-1 + (when (and (!= *target* s3-1) + (not (focus-test? (the-as process-focusable s3-1) disable dead inactive gun-no-target)) + (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?)) + ) + ) + (let ((s2-1 (new 'stack-no-clear 'collide-query))) + (set! (-> s2-1 start-pos quad) (-> this root trans quad)) + (vector-! (-> s2-1 move-dist) (get-trans (the-as process-focusable s3-1) 3) (-> this root trans)) + (let ((v1-47 s2-1)) + (set! (-> v1-47 radius) 40.96) + (set! (-> v1-47 collide-with) (collide-spec backgnd)) + (set! (-> v1-47 ignore-process0) #f) + (set! (-> v1-47 ignore-process1) #f) + (set! (-> v1-47 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-47 action-mask) (collide-action solid)) + ) + (when (< (fill-and-probe-using-line-sphere *collide-cache* s2-1) 0.0) + (set! (-> sv-1076 sv-1080 targ) (process->handle s3-1)) + (let ((f0-11 1.0)) + (if (and (nonzero? (-> s3-1 draw)) (logtest? (-> s3-1 draw status) (draw-control-status on-screen))) + (set! f0-11 (+ 2.0 f0-11)) + ) + (if (logtest? (process-mask enemy guard) (-> s3-1 mask)) + (set! f0-11 (+ 28.0 f0-11)) + ) + (if (logtest? (process-mask vehicle civilian) (-> s3-1 mask)) + (set! f0-11 (* 0.25 f0-11)) + ) + (set! (-> sv-1076 sv-1080 value) f0-11) + (set! sv-1088 (+ sv-1088 f0-11)) + ) + (set! sv-1080 (+ sv-1080 1)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (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)) + ) + ) + ) + ) + ) + (set! sv-3792 (new 'stack-no-clear 'array 'int8 100)) + (set! sv-3800 0) + (set! sv-3808 (the-as float 0.0)) + (set! sv-3812 (the-as symbol #f)) + (when (> sv-1080 0) + (dotimes (s5-2 sv-16) + (let ((f0-20 (rand-vu-float-range 0.0 sv-1088))) + (dotimes (v1-127 sv-1080) + (set! sv-3808 (+ sv-3808 (-> sv-1076 v1-127 value))) + (when (< f0-20 sv-3808) + (dotimes (a0-82 sv-3800) + (when (= (-> sv-3792 a0-82) v1-127) + 0 + (goto cfg-91) + ) + ) + (set! (-> sv-3792 sv-3800) v1-127) + (set! sv-3800 (+ sv-3800 1)) + 0 + (goto cfg-94) + ) + (label cfg-91) + ) + ) + (label cfg-94) + ) + ) + (dotimes (s5-3 sv-3800) + (let* ((s4-4 (handle->process (-> sv-1076 (-> sv-3792 s5-3) targ))) + (a0-95 (if (type? s4-4 process-focusable) + s4-4 + ) + ) + (s4-5 this) + (s3-4 (method-of-object s4-5 spawn-shot)) + (s2-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> s2-2 quad) (-> (get-trans (the-as process-focusable a0-95) 0) quad)) + (s3-4 s4-5 s2-2) + ) + ) + (let ((s5-4 sv-3800) + (s4-6 (+ sv-16 -1)) + ) + (while (>= s4-6 s5-4) + (let ((s3-5 (new 'stack-no-clear 'vector))) + (set! (-> s3-5 x) (rand-vu-float-range -1.0 1.0)) + (set! (-> s3-5 y) (rand-vu-float-range -0.85 -0.3)) + (set! (-> s3-5 z) (rand-vu-float-range -1.0 1.0)) + (vector+float*! s3-5 (-> this root trans) s3-5 40960.0) + (spawn-shot this s3-5) + ) + (+! s5-4 1) + ) + ) + (the-as int #f) + ) + +(defskelgroup skel-gun-yellow-3-saucer gun gun-saucer-lod0-jg gun-saucer-idle-ja + ((gun-saucer-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4096) + :texture-level 10 + :sort 1 + ) + +(defmethod setup-collision! ((this gun-yellow-3-saucer)) + (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 1638.4) + (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 crate vehicle-sphere hit-by-others-list pusher impenetrable-obj shield) + ) + (set-collide-as! (-> this root) (collide-spec projectile)) + (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 vector vs none. +(defmethod init-proj-settings! ((this gun-yellow-3-saucer)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-gun-yellow-3-saucer" (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) projectile-move-fill-line-sphere) + (set! (-> this total-float-time) (seconds 0.05)) + (quaternion-identity! (-> this root quat)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 95) this)) + (set! (-> this asleep?) #t) + (set! (-> this firing?) #f) + (set! (-> this first-fire-time) 0) + (set! (-> this timeout) (seconds 30)) + (set! (-> this activated?) #f) + (set! (-> this collided-with-surface?) #f) + (set! (-> this last-blink-time) 0) + (set! (-> this finished?) #f) + (set! (-> this snd-hum) (new-sound-id)) + (set! (-> this snd-shoot) (new-sound-id)) + (set! (-> this total-ammo-to-drain) 50.0) + (set! (-> this total-fire-time) (seconds 4)) + (when (logtest? (game-secrets gun-upgrade-yellow-3) (-> *game-info* secrets)) + (set! (-> this total-ammo-to-drain) 50.0) + (set! (-> this total-fire-time) (seconds 6)) + ) + (set-vector! (-> this root scale) 3.5 3.5 3.5 1.0) + (none) + ) + +(defmethod deactivate ((this gun-yellow-3-saucer)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this snd-hum)) + (sound-stop (-> this snd-shoot)) + (if (nonzero? (-> this spawn-part)) + (kill-particles (-> this spawn-part)) + ) + (call-parent-method this) + (none) + ) + +(deftype gun-yellow-3-event-msg (structure) + ((activated? symbol) + (finished? symbol) + ) + ) + + +;; WARN: Return type mismatch time-frame vs none. +(defmethod start-firing ((this gun-yellow-3-saucer)) + (set-time! (-> this first-fire-time)) + (set! (-> this firing?) #t) + (set! (-> this last-fire-time) 0) + (set-time! (-> this last-deduct-ammo-time)) + (none) + ) + +;; WARN: Return type mismatch time-frame vs none. +(defmethod init-antigrav ((this gun-yellow-3-saucer)) + (set! (-> this asleep?) #f) + (set! (-> this root dynam gravity y) 0.0) + (set! (-> this root dynam gravity-length) 0.0) + (set! (-> this root dynam gravity-max) 0.0) + (set-time! (-> this last-blink-time)) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod projectile-method-25 ((this gun-yellow-3-saucer)) + (if (nonzero? (-> this part)) + (spawn (-> this part) (-> this root trans)) + ) + (when (and (nonzero? (-> this part)) (not (-> this finished?))) + ) + (let ((v1-14 (if (< (mod (- (current-time) (-> this last-blink-time)) 300) 150) + 60 + 128 + ) + ) + ) + (set! (-> *part-id-table* 279 init-specs 4 initial-valuef) (the float v1-14)) + (set! (-> *part-id-table* 280 init-specs 5 initial-valuef) (the float v1-14)) + (set! (-> *part-id-table* 281 init-specs 5 initial-valuef) (the float v1-14)) + (set! (-> *part-id-table* 279 init-specs 5 initial-valuef) (the float v1-14)) + (set! (-> *part-id-table* 280 init-specs 6 initial-valuef) (the float v1-14)) + (set! (-> *part-id-table* 281 init-specs 6 initial-valuef) (the float v1-14)) + ) + (none) + ) + +(defmethod projectile-bounce-method-42 ((this gun-yellow-3-saucer)) + (projectile-method-25 this) + (none) + ) + +(defstate gun-yellow-3-saucer-base-state (gun-yellow-3-saucer) + :event projectile-event-handler + :trans (behavior () + (if (and (-> self firing?) + (not (and (-> self next-state) (let ((v1-5 (-> self next-state name))) + (or (= v1-5 'falling-down) (= v1-5 'impact-explode)) + ) + ) + ) + (or (< (get-remaining-player-ammo (pickup-type ammo-yellow)) 1.0) + (time-elapsed? (-> self first-fire-time) (-> self total-fire-time)) + ) + ) + (go-virtual falling-down) + ) + ) + :code sleep-code + :post (behavior () + (projectile-method-25 self) + (ja-post) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod projectile-bounce-method-43 ((this gun-yellow-3-saucer)) + (set! (-> this collided-with-surface?) #t) + (none) + ) + +(defun saucer-land-move ((arg0 gun-yellow-3-saucer)) + (seek-toward-heading-vec! (-> arg0 root) (-> arg0 root transv) 131072.0 (seconds 0.1)) + (new 'stack-no-clear 'vector) + (let ((a2-1 (quaternion-identity! (new 'stack-no-clear 'quaternion)))) + (fmin 1.0 (* 0.006666667 (the float (- (current-time) (-> arg0 state-time))))) + (quaternion-smooth-seek! (-> arg0 root quat) (-> arg0 root quat) a2-1 (* 3.5 (seconds-per-frame))) + ) + (projectile-move-fill-all-dirs arg0) + (none) + ) + +(defstate sitting (gun-yellow-3-saucer) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (until (time-elapsed? (-> self state-time) (seconds 1)) + (suspend) + ) + (go-virtual burnt-husk) + ) + ) + +(defstate burnt-husk (gun-yellow-3-saucer) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (cond + ((logtest? (-> *part-group-id-table* 97 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* 97)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 97)) + ) + ) + (let ((gp-2 sound-play-by-name) + (name (static-sound-name "yellow3-zap")) + (a1-6 (new-sound-id)) + (a2-10 1024) + (a3-4 0) + ) + (gp-2 (the-as sound-name name) a1-6 a2-10 a3-4 0 (sound-group) #t) + (set! (-> self draw color-mult quad) (the-as uint128 0)) + (set! (-> self draw color-mult x) 0.15) + (set! (-> self draw color-mult y) 0.15) + (set! (-> self draw color-mult z) 0.15) + (set! (-> self draw color-emissive quad) (the-as uint128 0)) + (let ((gp-3 (new 'stack-no-clear 'matrix))) + (matrix-u-compose + gp-3 + (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (the-as vector a2-10) + (the-as vector a3-4) + ) + (set! (-> gp-3 trans quad) (-> self root trans quad)) + (let ((gp-4 + (ppointer->handle + (if (logtest? (-> *part-group-id-table* 96 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to (-> self parent 0) + :group (-> *part-group-id-table* 96) + :mat-joint gp-3 + ) + (part-tracker-spawn part-tracker :to (-> self parent 0) :group (-> *part-group-id-table* 96) :mat-joint gp-3) + ) + ) + ) + ) + (process-spawn-function + process + (lambda :behavior process + ((arg0 handle)) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (seconds 0.2)) + (suspend) + ) + ) + (send-event (handle->process arg0) 'die) + ) + gp-4 + :to self + ) + ) + ) + ) + ) + :trans (behavior () + (let* ((f1-2 (* 0.016666668 (the float (- (current-time) (-> self state-time))))) + (f0-2 (fmax 0.0 (fmin 1.0 f1-2))) + ) + (set-vector! (-> self root scale) 3.5 (lerp 3.5 0.0 f0-2) 3.5 1.0) + ) + ) + :code (behavior () + (until (time-elapsed? (-> self state-time) (seconds 0.2)) + (suspend) + ) + (when (type? (-> self root) collide-shape) + (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)) + (transform-post) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (deactivate self) + ) + :post ja-post + ) + +(defstate falling-down (gun-yellow-3-saucer) + :virtual #t + :parent gun-yellow-3-saucer-base-state + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self finished?) #t) + (set! (-> self move) projectile-bounce-move) + (set! (-> self root dynam gravity y) 184320.0) + (set! (-> self root dynam gravity-length) 184320.0) + (set! (-> self root dynam gravity-max) 184320.0) + (set! (-> self root transv quad) (the-as uint128 0)) + (set-time! (-> self state-time)) + (set! (-> self activated?) #t) + (sound-stop (-> self snd-shoot)) + ) + :exit (behavior () + (set! (-> self move) saucer-land-move) + (sound-stop (-> self snd-hum)) + ) + :trans (behavior () + (if (not (time-elapsed? (-> self state-time) (seconds 0.4))) + (sound-play-by-name + (static-sound-name "yellow3-fire") + (-> self snd-hum) + 1024 + (the int (* 1524.0 (lerp 0.0 -0.5 (* 0.008333334 (the float (- (current-time) (-> self state-time))))))) + 0 + (sound-group) + #t + ) + (sound-stop (-> self snd-hum)) + ) + ((-> (method-of-type projectile moving) trans)) + (when (logtest? (-> self root status) (collide-status touch-surface)) + (sound-play "yellow3-bounce") + (set! (-> self move) saucer-land-move) + ) + (let ((v1-19 gun-yellow-3-saucer-base-state)) + (when v1-19 + (let ((t9-6 (-> v1-19 trans))) + (if t9-6 + (t9-6) + ) + ) + ) + ) + ) + ) + +(defstate impact-explode (gun-yellow-3-saucer) + :virtual #t + :event projectile-event-handler + :enter (behavior () + (set! (-> self activated?) #t) + (sound-stop (-> self snd-hum)) + ) + :code (behavior () + (set! (-> self firing?) #t) + (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) 0.0) + (set! (-> gp-0 scale) 1.0) + (set! (-> gp-0 group) (-> *part-group-id-table* 104)) + (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 self) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (while (-> self child) + (suspend) + ) + (deactivate self) + ) + ) + +;; WARN: Return type mismatch symbol vs object. +(defmethod proj-event-handler ((this gun-yellow-3-saucer) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('activate) + (go (method-of-object this spinning)) + ) + (('query) + (let ((v1-3 (the-as gun-yellow-3-event-msg (-> arg3 param 0)))) + (set! (-> v1-3 activated?) (-> this activated?)) + (set! (-> v1-3 finished?) (-> this finished?)) + ) + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + #t + ) + +;; WARN: Return type mismatch object vs none. +(defmethod projectile-method-39 ((this gun-yellow-3-saucer)) + (when (logtest? (-> this root status) (collide-status touch-surface)) + (if (-> this asleep?) + (go (method-of-object this impact-explode)) + (call-parent-method this) + ) + ) + (none) + ) + +(defstate moving (gun-yellow-3-saucer) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (-> self total-float-time)) + (not (and (-> self next-state) (= (-> self next-state name) 'navigating))) + ) + (go-virtual navigating) + ) + (sound-play "yellow3-fire" :id (-> self snd-hum)) + (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) (* 131072.0 (seconds-per-frame))) + (let ((a0-7 gun-yellow-3-saucer-base-state)) + (when a0-7 + (let ((t9-3 (-> a0-7 trans))) + (if t9-3 + (t9-3) + ) + ) + ) + ) + (let ((t9-5 (-> (find-parent-state) trans))) + (if t9-5 + (t9-5) + ) + ) + (ja-post) + ) + ) + +(defstate navigating (gun-yellow-3-saucer) + :virtual #t + :parent gun-yellow-3-saucer-base-state + :enter (behavior () + (init-antigrav self) + (set-time! (-> self state-time)) + (set! (-> self last-deflect-time) 0) + 0 + ) + :trans (behavior () + (sound-play "yellow3-fire" :id (-> self snd-hum)) + (let ((f0-1 (fmin 1.0 (* 0.033333335 (the float (- (current-time) (-> self state-time))))))) + 0.0 + (let ((f0-2 (lerp 409600.0 40960.0 f0-1))) + (vector-normalize! (-> self root transv) f0-2) + ) + ) + (let ((f0-4 (fmin 1.0 (* 0.004761905 (the float (- (current-time) (-> self state-time))))))) + (set! (-> self root transv y) (lerp (-> self root transv y) 0.0 f0-4)) + ) + (when (time-elapsed? (-> self last-deflect-time) (seconds 0.5)) + (let ((v1-19 (-> self root)) + (gp-0 (new 'stack-no-clear 'collide-query)) + ) + (-> v1-19 root-prim) + (set! (-> gp-0 start-pos quad) (-> v1-19 trans quad)) + (vector-normalize-copy! (-> gp-0 move-dist) (-> v1-19 transv) 40960.0) + (let ((v1-20 gp-0)) + (set! (-> v1-20 radius) 0.01) + (set! (-> v1-20 collide-with) (collide-spec backgnd)) + (set! (-> v1-20 ignore-process0) #f) + (set! (-> v1-20 ignore-process1) #f) + (set! (-> v1-20 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-20 action-mask) (collide-action solid)) + ) + (let ((f0-7 (fill-and-probe-using-line-sphere *collide-cache* gp-0))) + (when (and (>= f0-7 0.0) (< f0-7 1.0)) + (let ((s5-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> gp-0 best-other-tri normal) 1.0)) + (gp-1 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self root transv) 1.0)) + ) + 0.0 + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + (vector-dot s5-0 gp-1) + (cond + (#f + (vector-float*! (-> self root transv) (-> self root transv) -1.0) + ) + (else + (vector-reflect! gp-1 gp-1 s5-0) + (set! (-> gp-1 y) 0.0) + (vector-normalize-copy! (-> self root transv) gp-1 32768.0) + (set-time! (-> self last-deflect-time)) + ) + ) + ) + ) + ) + ) + ) + (when (not (-> self firing?)) + (cond + ((time-elapsed? (-> self state-time) (seconds 1)) + (start-firing self) + ) + (else + ) + ) + ) + (find-targets self) + ((-> self move) self) + (projectile-method-39 self) + (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) (* 131072.0 (seconds-per-frame))) + (let ((v1-52 gun-yellow-3-saucer-base-state)) + (when v1-52 + (let ((t9-16 (-> v1-52 trans))) + (if t9-16 + (t9-16) + ) + ) + ) + ) + ) + ) + +(defstate spinning (gun-yellow-3-saucer) + :virtual #t + :parent gun-yellow-3-saucer-base-state + :enter (behavior () + (set! (-> self activated?) #t) + (if (-> self asleep?) + (init-antigrav self) + ) + (if (not (-> self firing?)) + (start-firing self) + ) + (quaternion-identity! (-> self root quat)) + ) + :exit (behavior () + (let ((f0-0 (get-remaining-player-ammo (pickup-type ammo-yellow)))) + 0.0 + (when (< 1.0 f0-0) + (let* ((f0-1 (fmin f0-0 (- 50.0 (-> self total-ammo-drained)))) + (f0-2 (fmax 0.0 f0-1)) + ) + (adjust-player-ammo (- f0-2) (pickup-type ammo-yellow)) + ) + (truncate-player-ammo (pickup-type ammo-yellow)) + ) + ) + ) + :trans (behavior () + (sound-play "yellow3-fire" :id (-> self snd-hum)) + (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) (* 131072.0 (seconds-per-frame))) + (find-targets self) + (let ((v1-7 gun-yellow-3-saucer-base-state)) + (when v1-7 + (let ((t9-3 (-> v1-7 trans))) + (if t9-3 + (t9-3) + ) + ) + ) + ) + ) + ) + +(defbehavior gun-fire-yellow-3 target () + (let ((gp-0 (-> self gun))) + (let ((s5-0 (-> self gun fire-dir-out)) + (s4-0 (-> self gun fire-point)) + (f30-0 409600.0) + ) + (talker-spawn-func (-> *talker-speech* 364) *entity-pool* (target-pos 0) (the-as region #f)) + (set! (-> s5-0 y) 0.6) + (vector-normalize! s5-0 1.0) + (when (handle->process (-> gp-0 gun 0 extra)) + (let ((s3-1 (new 'stack-no-clear 'gun-yellow-3-event-msg))) + (send-event (handle->process (-> gp-0 gun 0 extra)) 'query s3-1) + (when (not (-> s3-1 activated?)) + (send-event (handle->process (-> gp-0 gun 0 extra)) 'activate) + (return 0) + ) + ) + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 229 (seconds 0.2)) + (let ((s3-2 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> s3-2 ent) (-> self entity)) + (set! (-> s3-2 charge) 1.0) + (set! (-> s3-2 options) (projectile-options po13)) + (logclear! (-> s3-2 options) (projectile-options po14 po15 po16)) + (set! (-> s3-2 pos quad) (-> s4-0 quad)) + (set! (-> s3-2 vel quad) (-> (vector-float*! (new 'stack-no-clear 'vector) s5-0 f30-0) quad)) + (set! (-> s3-2 notify-handle) (the-as handle #f)) + (set! (-> s3-2 owner-handle) (the-as handle #f)) + (set! (-> s3-2 target-handle) (the-as handle #f)) + (set! (-> s3-2 target-pos quad) (the-as uint128 0)) + (set! (-> s3-2 ignore-handle) (process->handle (send-event self 'get-vehicle))) + (let* ((v1-45 *game-info*) + (a0-30 (+ (-> v1-45 attack-id) 1)) + ) + (set! (-> v1-45 attack-id) a0-30) + (set! (-> s3-2 attack-id) a0-30) + ) + (set! (-> s3-2 timeout) (seconds 4)) + (set! (-> gp-0 gun 0 extra) + (ppointer->handle + (spawn-projectile gun-yellow-3-saucer s3-2 (ppointer->process (-> gp-0 gun)) *default-dead-pool*) + ) + ) + ) + ) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (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) + ) + ) + ) + (send-event (ppointer->process v1-62) 'clock self) + ) + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch (pointer process) vs (pointer gun-yellow-shot-2). +(defbehavior gun-fire-yellow-2 target () + (let ((s5-0 (-> self gun)) + (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 po17)) + (logclear! (-> gp-0 options) (projectile-options po14 po15 po16)) + (set! (-> gp-0 pos quad) (-> s5-0 fire-point 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 (send-event self 'get-vehicle))) + (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) (seconds 4)) + (vector-float*! (-> gp-0 vel) (-> s5-0 fire-dir-out) 819200.0) + (the-as + (pointer gun-yellow-shot-2) + (spawn-projectile gun-yellow-shot-2 gp-0 (ppointer->process (-> s5-0 gun)) *default-dead-pool*) + ) + ) + ) + +;; WARN: Return type mismatch (pointer process) vs (pointer gun-yellow-shot). +(defbehavior gun-fire-yellow-1 target () + (let ((s5-0 (-> self gun)) + (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 po17)) + (logclear! (-> gp-0 options) (projectile-options po14 po15 po16)) + (set! (-> gp-0 pos quad) (-> s5-0 fire-point 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 (send-event self 'get-vehicle))) + (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) (seconds 4)) + (vector-float*! (-> gp-0 vel) (-> s5-0 fire-dir-out) 819200.0) + (the-as + (pointer gun-yellow-shot) + (spawn-projectile gun-yellow-shot gp-0 (ppointer->process (-> s5-0 gun)) *default-dead-pool*) + ) + ) + ) + +;; WARN: disable def twice: 51. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defbehavior target-gun-can-fire-yellow? target ((arg0 pickup-type)) + (case arg0 + (((pickup-type gun-yellow-3)) + (cond + ((handle->process (-> self gun gun 0 extra)) + (let ((gp-0 (new 'stack-no-clear 'gun-yellow-3-event-msg))) + (set! (-> gp-0 finished?) #t) + (set! (-> gp-0 activated?) #f) + (send-event (handle->process (-> self gun gun 0 extra)) 'query gp-0) + (or (-> gp-0 finished?) (not (-> gp-0 activated?))) + ) + ) + (else + #t + ) + ) + ) + (else + #t + ) + ) + ) + +;; WARN: Return type mismatch object vs (pointer process). +(defbehavior target-gun-fire-yellow target ((arg0 pickup-type)) + (the-as (pointer process) (case arg0 + (((pickup-type gun-yellow-1)) + (gun-fire-yellow-1) + ) + (((pickup-type gun-yellow-2)) + (gun-fire-yellow-2) + ) + (((pickup-type gun-yellow-3)) + (gun-fire-yellow-3) + ) + ) + ) + ) + +(defun someone-fire-yellow ((arg0 process-drawable) (arg1 vector) (arg2 vector)) + (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 po13 po17)) + (logclear! (-> gp-0 options) (projectile-options po14 po15 po16)) + (set! (-> gp-0 pos quad) (-> arg1 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 arg0)) + (let* ((v1-10 *game-info*) + (a0-9 (+ (-> v1-10 attack-id) 1)) + ) + (set! (-> v1-10 attack-id) a0-9) + (set! (-> gp-0 attack-id) a0-9) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (vector-normalize-copy! (-> gp-0 vel) arg2 819200.0) + (spawn-projectile gun-yellow-shot-2 gp-0 arg0 *default-dead-pool*) + ) + ) + +(defmethod projectile-method-24 ((this gun-yellow-shot)) + (draw-beam (-> this muzzle-flash-part) (-> this tail-pos) (-> this starting-dir) #f) + 0 + (none) + ) + +(defmethod projectile-method-25 ((this gun-yellow-shot)) + (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 root trans)) + (a1-0 (-> this tail-pos)) + (gp-1 (vector-! (new 'stack-no-clear 'vector) s4-0 a1-0)) + ) + (let ((f30-0 (vector-length gp-1))) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (let ((v1-4 a1-0)) + (let ((a0-2 gp-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) + (draw-main-shot this a1-0 gp-1) + (vector-normalize! gp-1 1.0) + (spawn-particles this s3-0) + ) + (let ((s3-1 (new 'stack-no-clear 'matrix)) + (f30-1 (fmin 1.0 (* 0.000015258789 f30-0))) + (f28-0 (-> *part-id-table* 267 init-specs 3 initial-valuef)) + ) + (forward-up->inv-matrix s3-1 gp-1 *up-vector*) + (set! (-> s3-1 trans quad) (-> s4-0 quad)) + (gun-yellow-shot-method-42 this f30-1 f28-0 s3-1) + ) + ) + (let ((f0-3 (vector-dot gp-1 (-> (camera-matrix) fvec)))) + (when (< 0.0 f0-3) + (let ((f2-0 (* f0-3 f0-3)) + (f0-4 (-> *part-id-table* 266 init-specs 8 initial-valuef)) + (f1-3 (-> *part-id-table* 266 init-specs 8 random-rangef)) + ) + (set! (-> *part-id-table* 266 init-specs 8 initial-valuef) (* f0-4 f2-0)) + (set! (-> *part-id-table* 266 init-specs 8 random-rangef) (* f1-3 f2-0)) + (set! (-> *part-id-table* 266 init-specs 8 initial-valuef) f0-4) + (set! (-> *part-id-table* 266 init-specs 8 random-rangef) f1-3) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod deal-damage! ((this gun-yellow-shot) (arg0 process) (arg1 event-message-block)) + (if (and (logtest? (process-mask guard) (-> arg0 mask)) + (not (-> *setting-control* user-current gun-target-guards?)) + ) + (set! (-> this damage) 0.0) + ) + (let ((t9-0 (method-of-type projectile deal-damage!))) + (when (t9-0 this arg0 arg1) + (+! (-> *game-info* shots-hit 0) 1.0) + (set! (-> this hit-actor?) #t) + #t + ) + ) + ) + +(defmethod projectile-method-26 ((this gun-yellow-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 gun-yellow-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 play-impact-sound ((this gun-yellow-shot-3) (arg0 projectile-options)) + 0 + (none) + ) + +(defmethod play-impact-sound ((this gun-yellow-shot-2) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "yellow2-fire") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "yellow2-burn") + ) + ((= v1-0 (projectile-options po1)) + ) + ((not (-> this hit-yet?)) + (sound-play-by-name + (static-sound-name "yellow2-trail") + (-> this snd-trail) + 1024 + (the int + (* 1524.0 + (lerp 1.0 0.1 (fmax 0.0 (fmin 1.0 (* 0.011111111 (the float (- (current-time) (-> this last-hit-time))))))) + ) + ) + 0 + (sound-group) + #t + ) + ) + (else + (sound-play-by-name + (static-sound-name "yellow2-trail") + (-> this snd-trail) + 1024 + (the int (* 1524.0 (doppler-pitch-shift (-> this root trans) (-> this root transv)))) + 0 + (sound-group) + #t + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod made-impact? ((this gun-yellow-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) (handle->process (-> this ignore-handle))) + (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-yellow-shot-move ((arg0 gun-yellow-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) + ) + (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) + ) + +(define *last-hit-deflect-target-handle* (the-as (pointer process) #f)) + +;; WARN: Return type mismatch symbol vs none. +(defbehavior gun-yellow-shot-do-deflect gun-yellow-shot-2 ((arg0 gun-yellow-shot-2) (arg1 vector) (arg2 vector) (arg3 vector)) + (local-vars + (sv-32 vector) + (sv-36 gun-yellow-shot-2) + (sv-40 process) + (sv-80 vector) + (sv-84 vector) + (sv-112 vector) + (sv-116 number) + (sv-120 int) + (sv-128 symbol) + (sv-136 handle) + (sv-1680 vector) + (sv-1712 vector) + (sv-1716 float) + (sv-1720 float) + (sv-1724 vector) + (sv-1744 vector) + (sv-1748 float) + (sv-1752 float) + ) + (let ((f0-1 (vector-dot arg2 arg3))) + (set! sv-32 (vector-float*! (new 'stack-no-clear 'vector) arg3 (* -2.0 f0-1))) + ) + (vector+! arg1 arg2 sv-32) + (if (< 0.2 (-> arg1 y)) + (set! (-> arg1 y) (fmax 0.2 (-> arg2 y))) + ) + (let ((s4-0 arg0)) + (set! sv-36 s4-0) + (set! sv-40 (handle->process (-> sv-36 last-hit-enemy))) + (when (and (time-elapsed? (-> sv-36 last-collide-time) (seconds 0.05)) (rand-vu-percent? 0.75)) + (set! sv-80 (vector-normalize-copy! (new 'stack-no-clear 'vector) arg1 204800.0)) + (set! sv-84 (new 'stack-no-clear 'vector)) + (set! (-> sv-84 quad) (-> s4-0 root trans quad)) + (vector+! sv-84 sv-84 sv-80) + (set! (-> sv-84 w) 409600.0) + (set! (-> sv-80 y) 0.0) + (vector-normalize! sv-80 1.0) + (set! sv-112 (vector+! (new 'stack-no-clear 'vector) (-> s4-0 root trans) arg1)) + (set! sv-116 409600000000000000000000.0) + (set! sv-120 -55041728) + (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)) + (let* ((s1-0 (-> s3-0 s2-0)) + (v1-31 (if (type? s1-0 collide-shape) + s1-0 + ) + ) + ) + (when v1-31 + (let* ((s0-0 (-> v1-31 process)) + (s1-1 (if (type? s0-0 process-focusable) + s0-0 + ) + ) + ) + (when s1-1 + (when (and (!= s4-0 s1-1) + (!= s1-1 sv-40) + (not (focus-test? (the-as process-focusable s1-1) disable dead inactive gun-no-target)) + (or (logtest? (process-mask enemy civilian) (-> s1-1 mask)) + (and (logtest? (process-mask guard) (-> s1-1 mask)) (-> *setting-control* user-current gun-target-guards?)) + ) + ) + (when (or (not sv-128) + (logtest? (process-mask enemy guard) (-> s1-1 mask)) + (not (is-in-ignore-list? sv-36 (process->handle s1-1))) + ) + (set! sv-1680 (get-trans (the-as process-focusable s1-1) 3)) + (set! sv-1712 (vector-! (new 'stack-no-clear 'vector) sv-1680 (-> s4-0 root trans))) + (set! sv-1716 (the-as float 0.0)) + (set! (-> sv-1712 y) 0.0) + (set! sv-1720 (vector-normalize-ret-len! sv-1712 1.0)) + (set! sv-1716 (vector-dot sv-1712 sv-80)) + (when (or (< (the float sv-120) sv-1716) (and (< 0.707 sv-1716) (= sv-136 *last-hit-deflect-target-handle*))) + (set! sv-116 sv-1720) + (set! sv-120 (the int sv-1716)) + (set! (-> sv-112 quad) (-> sv-1680 quad)) + (set! sv-128 (logtest? (process-mask enemy) (-> s1-1 mask))) + (set! sv-136 (process->handle s1-1)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (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-84) (-> sv-84 w))) + (when (and (!= s4-0 s3-1) + (!= s3-1 sv-40) + (not (focus-test? s3-1 disable dead inactive gun-no-target)) + (or (logtest? (process-mask enemy civilian) (-> s3-1 mask)) + (and (logtest? (process-mask guard) (-> s3-1 mask)) (-> *setting-control* user-current gun-target-guards?)) + ) + ) + (when (or (not sv-128) + (logtest? (process-mask enemy guard) (-> s3-1 mask)) + (not (is-in-ignore-list? sv-36 (process->handle s3-1))) + ) + (set! sv-1724 (get-trans s3-1 3)) + (set! sv-1744 (vector-! (new 'stack-no-clear 'vector) sv-1724 (-> s4-0 root trans))) + (set! sv-1748 (the-as float 0.0)) + (set! (-> sv-1744 y) 0.0) + (set! sv-1752 (vector-normalize-ret-len! sv-1744 1.0)) + (set! sv-1748 (vector-dot sv-1744 sv-80)) + (when (or (< (the float sv-120) sv-1748) (and (< 0.707 sv-1748) (= sv-136 *last-hit-deflect-target-handle*))) + (set! sv-116 sv-1752) + (set! sv-120 (the int sv-1748)) + (set! (-> sv-112 quad) (-> sv-1724 quad)) + (set! sv-128 (logtest? (process-mask enemy) (-> s3-1 mask))) + (set! sv-136 (process->handle s3-1)) + ) + ) + ) + ) + ) + (vector-! arg1 sv-112 (-> s4-0 root trans)) + (set! *last-hit-deflect-target-handle* (the-as (pointer process) sv-136)) + ) + ) + (vector-normalize! arg1 546133.3) + (cond + ((time-elapsed? (-> arg0 last-hit-time) (seconds 0.3)) + ) + ((time-elapsed? (-> arg0 last-hit-time) (seconds 0.05)) + ) + ) + (sound-play "yellow2-ricco") + (set-time! (-> arg0 last-hit-time)) + (set! (-> arg0 hit-yet?) #t) + (none) + ) + +(defun gun-yellow-deflect-reaction ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector)) + (cshape-reaction-update-state arg0 arg1 arg3) + (let ((s3-0 (the-as handle #f))) + (when (and (nonzero? (-> arg1 best-other-tri collide-ptr)) + (-> arg1 best-other-tri collide-ptr) + (let ((s1-0 (-> arg1 best-other-tri collide-ptr))) + (if (type? s1-0 collide-shape-prim) + s1-0 + ) + ) + ) + (let* ((s2-1 (-> arg1 best-other-tri collide-ptr)) + (a0-4 (if (type? s2-1 collide-shape-prim) + s2-1 + ) + ) + (v1-4 a0-4) + ) + (when v1-4 + (set! s3-0 (process->handle (-> (the-as collide-shape-prim a0-4) cshape process))) + (when (and (logtest? (collide-spec obstacle pusher) (-> (the-as collide-shape-prim v1-4) prim-core collide-as)) + (not (logtest? (collide-spec civilian enemy vehicle-sphere vehicle-mesh-probeable) + (-> (the-as collide-shape-prim v1-4) prim-core collide-as) + ) + ) + ) + (let ((v1-7 (-> arg0 process))) + (set! (-> (the-as gun-yellow-shot-2 v1-7) actor-deflect?) #t) + ) + (set! s3-0 (the-as handle #f)) + ) + ) + ) + ) + (let ((s2-2 (the-as gun-yellow-shot-2 (-> arg0 process)))) + (on-impact s2-2 s3-0) + (set! (-> s2-2 delay-attack) 0) + ) + ) + 0 + (gun-yellow-shot-do-deflect (the-as gun-yellow-shot-2 (-> arg0 process)) arg2 arg3 (-> arg0 surface-normal)) + (-> arg0 status) + ) + +(defmethod setup-collision! ((this gun-yellow-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 deal-damage! ((this gun-yellow-shot-2) (arg0 process) (arg1 event-message-block)) + (if (> (-> this max-actor-deflect-count) 0) + ((method-of-type projectile deal-damage!) this arg0 arg1) + ) + ) + +(defun gun-yellow-shot-2-move ((arg0 gun-yellow-shot-2)) + (with-pp + (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 (not (handle->process (-> arg0 last-hit-enemy))) + (set! (-> arg0 delay-attack) 0) + 0 + ) + (if (and (> (-> arg0 delay-attack) 0) (time-elapsed? (-> arg0 delay-attack) (seconds 0.1))) + (logior! (-> s5-0 status) (collide-status touch-actor)) + ) + (when (or (logtest? (-> s5-0 status) (collide-status touch-surface)) + (logtest? (-> s5-0 status) (collide-status touch-actor)) + ) + (let ((s2-0 #f) + (s3-0 #f) + (s4-1 (the-as object #f)) + ) + (when (logtest? (-> s5-0 status) (collide-status touch-actor)) + (cond + ((-> arg0 actor-deflect?) + (set! (-> arg0 actor-deflect?) #f) + ) + ((> (-> arg0 max-actor-deflect-count) 0) + (let ((a0-16 (handle->process (-> arg0 last-hit-enemy)))) + (when a0-16 + (set! s2-0 #t) + (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) 'prevent-bounce?) + (set! s4-1 (send-event-function a0-16 a1-5)) + ) + ) + ) + ) + (else + (set! s4-1 #t) + ) + ) + ) + (when s2-0 + (when (> (-> arg0 delay-attack) 0) + ) + (handle-impact arg0 (-> arg0 last-hit-enemy)) + ) + (if (and (> (-> arg0 delay-attack) 0) (and (time-elapsed? (-> arg0 delay-attack) (seconds 0.1)) s2-0 (not s4-1))) + (set! s3-0 #t) + ) + (when s3-0 + (let ((t9-4 gun-yellow-shot-do-deflect) + (a0-23 arg0) + (a1-7 (-> arg0 root transv)) + (a2-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a2-1 quad) (-> arg0 root transv quad)) + (t9-4 a0-23 a1-7 a2-1 (-> arg0 delay-norm)) + ) + ) + (set! (-> arg0 hit-actor?) (the-as symbol s4-1)) + ) + (set! (-> arg0 delay-attack) 0) + (let ((v1-57 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> arg0 tail-pos) (-> s5-0 trans)) 2048.0)) + (a1-10 (-> arg0 hit-pos)) + ) + (set! (-> a1-10 quad) (-> s5-0 trans quad)) + (vector+! a1-10 a1-10 v1-57) + (move-to-point! (-> arg0 root) a1-10) + ) + (cond + ((-> arg0 hit-actor?) + (go (method-of-object arg0 impact)) + ) + (else + (set-time! (-> arg0 last-collide-time)) + (launch-particles (-> *part-id-table* 272) (-> arg0 hit-pos)) + (launch-particles (-> *part-id-table* 273) (-> arg0 hit-pos)) + (let ((a0-32 (new 'stack-no-clear 'vector))) + (set! (-> a0-32 quad) (-> arg0 root transv quad)) + (vector-normalize! a0-32 65536.0) + ) + (vector+! (-> arg0 tail-pos) (-> arg0 root trans) (-> arg0 root transv)) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod init-proj-settings! ((this gun-yellow-shot)) + (+! (-> *game-info* shots-fired 0) 1.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) 819200.0) + (set! (-> this move) gun-yellow-shot-move) + (set! (-> this timeout) (seconds 3)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this damage) 2.0) + (if (logtest? (game-secrets gun-upgrade-yellow-1) (-> *game-info* secrets)) + (set! (-> this damage) 3.0) + ) + (logior! (-> this options) (projectile-options po13)) + (set! (-> this muzzle-flash-part) (-> *part-id-table* 268)) + (set! (-> this main-shot-part) (-> *part-id-table* 264)) + (set! (-> this shot-aim-part) (-> *part-id-table* 267)) + (set! (-> this shot-ring-part) (-> *part-id-table* 266)) + 0 + (none) + ) + +;; WARN: Return type mismatch (pointer process) vs none. +(defmethod init-proj-settings! ((this gun-yellow-shot-2)) + (call-parent-method this) + (set! (-> this actor-deflect?) #f) + (set! (-> this last-hit-enemy) (the-as handle #f)) + (set! (-> this damage) 1.5) + (if (logtest? (game-secrets gun-upgrade-yellow-2) (-> *game-info* secrets)) + (set! (-> this damage) 2.0) + ) + (set! (-> this snd-trail) (new-sound-id)) + (set! (-> this hit-yet?) #f) + (sound-play "yellow2-trail" :id (-> this snd-trail) :pitch 1) + (set! (-> this last-collide-time) 0) + (set! (-> this move) gun-yellow-shot-2-move) + (set! (-> this snd-whoosh) (new-sound-id)) + (dotimes (v1-9 6) + (set! (-> this ignore-list v1-9 hand) (the-as handle #f)) + ) + (set! (-> this max-actor-deflect-count) 4) + (set! (-> this timeout) (seconds 3)) + (when (logtest? (game-secrets gun-upgrade-yellow-2) (-> *game-info* secrets)) + (set! (-> this max-actor-deflect-count) 7) + (set! (-> this timeout) (seconds 5)) + ) + (set! (-> this muzzle-flash-part) (-> *part-id-table* 274)) + (sound-play "yellow2-shot" :pitch 1) + (let ((s5-1 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-1 tracked-obj) (process->handle this)) + (set! (-> s5-1 appearance) *yellow-shot-2-trail*) + (set! (-> s5-1 max-num-crumbs) (the int (* 0.25 (the float (-> s5-1 appearance max-age))))) + (set! (-> s5-1 track-immediately?) #t) + (let* ((v1-34 (estimate-light-trail-mem-usage + (the-as uint (-> s5-1 max-num-crumbs)) + (the-as uint (= (-> s5-1 appearance lie-mode) 3)) + ) + ) + (gp-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-34 8192) 1)) + ) + (when gp-1 + (let ((t9-9 (method-of-type process activate))) + (t9-9 gp-1 *target* "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process gp-1 light-trail-tracker-init-by-other s5-1) + (-> gp-1 ppointer) + ) + ) + ) + (none) + ) + +(defmethod add-to-ignore-list! ((this gun-yellow-shot-2) (arg0 handle)) + (when (and arg0 (not (is-in-ignore-list? this arg0))) + (dotimes (v1-3 6) + (when (not (handle->process (-> this ignore-list v1-3 hand))) + (set! (-> this ignore-list v1-3 hand) arg0) + (set-time! (-> this ignore-list v1-3 time)) + (return 0) + ) + ) + (the-as int #f) + ) + ) + +(defmethod is-in-ignore-list? ((this gun-yellow-shot-2) (arg0 handle)) + (if (not arg0) + (return #f) + ) + (dotimes (v1-2 6) + (if (and (-> this ignore-list v1-2 hand) (time-elapsed? (-> this ignore-list v1-2 time) (seconds 0.15))) + (set! (-> this ignore-list v1-2 hand) (the-as handle #f)) + ) + ) + (dotimes (v1-5 6) + (if (= arg0 (-> this ignore-list v1-5 hand)) + (return #t) + ) + ) + #f + ) + +;; WARN: Return type mismatch int vs object. +(defmethod handle-impact ((this gun-yellow-shot-2) (arg0 handle)) + (when (> (-> this max-actor-deflect-count) 0) + (let ((s5-0 (handle->process arg0))) + (when s5-0 + (if (and (logtest? (process-mask guard) (-> s5-0 mask)) + (not (-> *setting-control* user-current gun-target-guards?)) + ) + (set! (-> this damage) 0.0) + ) + (when (time-elapsed? (-> this last-attack-time) (seconds 0.25)) + (let* ((v1-15 *game-info*) + (a0-7 (+ (-> v1-15 attack-id) 1)) + ) + (set! (-> v1-15 attack-id) a0-7) + (set! (-> this attack-id) a0-7) + ) + ) + (when (deal-damage! this s5-0 (the-as event-message-block #f)) + (set-time! (-> this last-attack-time)) + (+! (-> this enemy-hit-count) 1) + (when (and (< 1 (-> this enemy-hit-count)) (< (-> this enemy-hit-count) 4)) + (adjust-player-ammo -1.0 (pickup-type ammo-yellow)) + (when (>= 0.0 (get-remaining-player-ammo (pickup-type ammo-yellow))) + (set! (-> this timeout) 0) + 0 + ) + ) + (let ((v1-28 (-> this notify-handle))) + (send-event (handle->process v1-28) 'notify 'attack s5-0) + ) + (if (>= (-> this enemy-hit-count) 1) + (set! (-> this damage) 1.0) + ) + (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)) + ) + ) + (let ((v0-0 (+ (-> this max-actor-deflect-count) -1))) + (set! (-> this max-actor-deflect-count) v0-0) + v0-0 + ) + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch int vs object. +(defmethod on-impact ((this gun-yellow-shot-2) (arg0 handle)) + (let ((a1-1 (-> this last-hit-enemy))) + (set! (-> this last-hit-enemy) arg0) + (if (and (!= a1-1 arg0) (> (-> this delay-attack) 0)) + (handle-impact this a1-1) + ) + ) + (set! (-> this delay-attack) 0) + (add-to-ignore-list! this arg0) + ) + +(defmethod handle-proj-hit! ((this gun-yellow-shot-2) (arg0 process) (arg1 event-message-block)) + (cond + ((-> this hit-actor?) + (call-parent-method this arg0 arg1) + ) + (else + (let ((s4-1 (the-as object (-> arg1 param 0)))) + (when (and (!= arg0 (handle->process (-> this last-hit-enemy))) + (!= arg0 (send-event *target* 'get-vehicle)) + (not (is-in-ignore-list? this (process->handle arg0))) + ) + (new 'stack-no-clear 'vector) + (let ((s3-0 (-> this delay-norm)) + (s1-0 (-> (the-as touching-shapes-entry s4-1) head)) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (get-intersect-point s2-0 s1-0 (-> this root) (the-as touching-shapes-entry s4-1)) + (let ((v1-16 + (get-touched-prim + s1-0 + ((method-of-type touching-shapes-entry get-touched-shape) (the-as touching-shapes-entry s4-1) (-> this root)) + (the-as touching-shapes-entry s4-1) + ) + ) + ) + (when v1-16 + (vector-! s3-0 s2-0 (the-as vector (-> v1-16 prim-core))) + (vector-normalize! s3-0 1.0) + (on-impact this (process->handle arg0)) + (set-time! (-> this delay-attack)) + ) + ) + ) + ) + ) + #t + ) + ) + ) + +(defstate impact (gun-yellow-shot-2) + :virtual #t + :enter (behavior () + (sound-stop (-> self snd-trail)) + (let ((t9-2 (-> (find-parent-state) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +;; WARN: Return type mismatch sparticle-launcher vs none. +(defmethod init-proj-settings! ((this gun-yellow-shot-3)) + (+! (-> *game-info* shots-fired 0) 1.0) + (set! (-> this hit-actor?) #f) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (let ((f0-2 (vector-vector-xz-distance (target-pos 0) (-> this root trans)))) + (cpad-set-buzz! + (-> *cpad-list* cpads 0) + 1 + (the int (* 255.0 (lerp-scale-clamp 0.5 0.0 f0-2 40960.0 245760.0))) + (seconds 0.1) + ) + ) + (set! (-> this attack-mode) 'eco-yellow) + (set! (-> this max-speed) 819200.0) + (set! (-> this move) gun-yellow-shot-move) + (set! (-> this timeout) (seconds 3)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this damage) 2.0) + (when (logtest? (game-feature feature22) (-> *game-info* features)) + (set! (-> this damage) (* 2.0 (-> this damage))) + (set! (-> this vehicle-impulse-factor) (* 0.5 (-> this vehicle-impulse-factor))) + ) + (logior! (-> this options) (projectile-options po13)) + (set! (-> this muzzle-flash-part) (-> *part-id-table* 275)) + (set! (-> this main-shot-part) (-> *part-id-table* 276)) + (set! (-> this shot-aim-part) (-> *part-id-table* 278)) + (set! (-> this shot-ring-part) (-> *part-id-table* 266)) + (none) + ) + +(defmethod setup-collision! ((this gun-yellow-shot-2)) + (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) gun-yellow-deflect-reaction) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (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 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-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-12 prim-core collide-with) + (collide-spec backgnd bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set! (-> v1-12 prim-core action) (collide-action solid)) + (set-vector! (-> v1-12 local-sphere) 0.0 0.0 0.0 819.2) + ) + (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 bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set-vector! (-> v1-14 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-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 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 draw-main-shot ((this gun-yellow-shot) (arg0 vector) (arg1 vector)) + (let ((f30-0 (-> *part-id-table* 264 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 264 init-specs 4 initial-valuef) (fmin f30-0 (vector-length arg1))) + (draw-beam (-> this main-shot-part) arg0 arg1 #f) + (set! (-> *part-id-table* 264 init-specs 4 initial-valuef) f30-0) + ) + 0 + (none) + ) + +(defmethod draw-main-shot ((this gun-yellow-shot-2) (arg0 vector) (arg1 vector)) + 0 + (none) + ) + +(defmethod deactivate ((this gun-yellow-shot-2)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this snd-trail)) + (call-parent-method this) + (none) + ) + +(defmethod draw-main-shot ((this gun-yellow-shot-3) (arg0 vector) (arg1 vector)) + (let ((f30-0 (-> *part-id-table* 276 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 276 init-specs 4 initial-valuef) (fmin f30-0 (vector-length arg1))) + (draw-beam (-> this main-shot-part) arg0 arg1 #f) + (set! (-> *part-id-table* 276 init-specs 4 initial-valuef) f30-0) + ) + 0 + (none) + ) + +(defmethod gun-yellow-shot-method-42 ((this gun-yellow-shot) (arg0 float) (arg1 float) (arg2 matrix)) + (set! (-> *part-id-table* 267 init-specs 3 initial-valuef) (* arg0 arg1)) + (launch-particles (-> *part-id-table* 267) arg2 :origin-is-matrix #t) + (set! (-> *part-id-table* 267 init-specs 3 initial-valuef) arg1) + 0 + (none) + ) + +(defmethod gun-yellow-shot-method-42 ((this gun-yellow-shot-2) (arg0 float) (arg1 float) (arg2 matrix)) + 0 + (none) + ) + +(defmethod gun-yellow-shot-method-42 ((this gun-yellow-shot-3) (arg0 float) (arg1 float) (arg2 matrix)) + (set! (-> *part-id-table* 278 init-specs 3 initial-valuef) (* arg0 arg1)) + (set! (-> *part-id-table* 278 init-specs 3 initial-valuef) arg1) + 0 + (none) + ) + +(defmethod projectile-method-25 ((this gun-yellow-shot-2)) + (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) + (draw-main-shot this a1-0 s4-1) + (vector-normalize! s4-1 1.0) + (launch-particles (-> *part-id-table* 270) s3-0) + ) + (let ((s3-1 (new 'stack-no-clear 'matrix)) + (f30-1 (fmin 1.0 (* 0.000015258789 f30-0))) + (f28-0 (-> *part-id-table* 267 init-specs 3 initial-valuef)) + ) + (forward-up->inv-matrix s3-1 s4-1 *up-vector*) + (set! (-> s3-1 trans quad) (-> s5-0 quad)) + (gun-yellow-shot-method-42 this f30-1 f28-0 s3-1) + ) + ) + 0 + (none) + ) + ) + +(defmethod spawn-particles ((this gun-yellow-shot) (arg0 vector)) + (launch-particles (-> *part-id-table* 265) arg0) + 0 + (none) + ) + +(defmethod spawn-particles ((this gun-yellow-shot-2) (arg0 vector)) + (launch-particles (-> *part-id-table* 270) arg0) + 0 + (none) + ) + +(defmethod spawn-particles ((this gun-yellow-shot-3) (arg0 vector)) + 0 + (none) + ) + +(defmethod projectile-method-26 ((this gun-yellow-shot-3)) + (let ((v1-8 + (cond + ((-> this hit-actor?) + (cond + ((logtest? (-> *part-group-id-table* 99 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* 99)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 99)) + ) + ) + ) + ((logtest? (-> *part-group-id-table* 98 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* 98)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 98)) + ) + ) + ) + ) + (send-event (ppointer->process v1-8) 'clock this) + ) + 0 + (none) + ) 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 7e87b7aa00..df224177a3 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 c56f5fd0d6..f6aad4499c 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 caed9d4dd3..3a95ff3996 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 a5cf5619c7..3313b4e495 100644 --- a/goal_src/jak3/engine/target/lightjak-wings.gc +++ b/goal_src/jak3/engine/target/lightjak-wings.gc @@ -10,7 +10,7 @@ ;; DECOMP BEGINS (defpart 623 - :init-specs ((:texture (new 'static 'texture-id :index #xf :page #x4)) + :init-specs ((:texture (glow-soft level-default-sprite)) (:num 1.0) (:scale-x (meters 3)) (:rot-x (degrees 2.25)) @@ -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) @@ -538,33 +524,16 @@ :exit (behavior () (let ((a0-1 (handle->process (-> self ragdoll-proc)))) (if a0-1 - (ragdoll-proc-method-16 (the-as ragdoll-proc a0-1) 60) + (disable-for-duration (the-as ragdoll-proc a0-1) (seconds 0.2)) ) ) ) :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/logic-target.gc b/goal_src/jak3/engine/target/logic-target.gc index 3ea7267992..b30a04684e 100644 --- a/goal_src/jak3/engine/target/logic-target.gc +++ b/goal_src/jak3/engine/target/logic-target.gc @@ -860,7 +860,7 @@ (set! (-> gp-0 ignore-process0) self) (set! (-> gp-0 ignore-process1) #f) (set! (-> gp-0 ignore-pat) (-> self control pat-ignore-mask)) - ((method-of-object *collide-cache* collide-cache-method-12)) + (fill-using-bounding-box *collide-cache* gp-0) (dotimes (s5-0 3) (set! (-> gp-0 start-pos quad) (-> self control collision-spheres s5-0 prim-core world-sphere quad)) (vector-float*! (-> gp-0 move-dist) (-> self control wall-contact-normal) -8192.0) @@ -1534,7 +1534,7 @@ (set! (-> gp-0 ignore-process0) self) (set! (-> gp-0 ignore-process1) #f) (set! (-> gp-0 ignore-pat) (-> self control pat-ignore-mask)) - ((method-of-object *collide-cache* collide-cache-method-12)) + (fill-using-bounding-box *collide-cache* gp-0) (dotimes (s5-0 2) (let ((a1-4 (not (or (logtest? (target-flags lleg-no-ik rleg-no-ik) (-> self target-flags)) (and (logtest? (-> self control mod-surface flags) (surface-flag air)) @@ -2195,7 +2195,7 @@ (send-event self 'end-mode 'edge-grab) ) (if *display-edge-collision-marks* - ((method-of-type edge-grab-info edge-grab-info-method-10)) + (edge-grab-info-method-10 s5-0) ) (set! (-> self control ground-pat) (-> s5-0 edge-tri-pat)) (vector-normalize! @@ -2349,7 +2349,7 @@ (send-event self 'end-mode 'edge-grab) ) (if *display-edge-collision-marks* - ((method-of-type edge-grab-info edge-grab-info-method-10)) + (edge-grab-info-method-10 gp-0) ) (vector-normalize! (vector-! @@ -2412,7 +2412,7 @@ ) (add-debug-sphere #t - (bucket-id bucket583) + (bucket-id debug) (-> self control midpoint-of-hands) (meters 0.2) (the-as rgba (new 'static 'rgba :r #xff :a #x80)) @@ -2651,6 +2651,7 @@ (none) ) +;; WARN: disable def twice: 76. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. (defbehavior do-target-gspot target () (cond ((and (logtest? (-> self control status) (collide-status on-surface)) @@ -2676,15 +2677,13 @@ (a3-0 8192.0) (t0-0 81920.0) (t1-0 1024.0) + (t2-1 (if (nonzero? (-> self pilot)) + (handle->process (-> self pilot vehicle)) + (the-as process #f) + ) + ) ) - (cond - ((nonzero? (-> self pilot)) - (handle->process (-> self pilot vehicle)) - ) - (else - ) - ) - (if (t9-0 a0-15 a1-0 (the-as collide-spec a2-1) a3-0 t0-0 t1-0) + (if (t9-0 a0-15 a1-0 (the-as collide-spec a2-1) a3-0 t0-0 t1-0 t2-1) (set! (-> self control gspot-pat-surfce) (-> gp-0 best-other-tri pat)) ) ) @@ -3009,7 +3008,7 @@ (set! (-> this game) *game-info*) (set! (-> this ext-geo-control) *target-geo-control*) (set! (-> this pending-ext-geo) - (if (and (logtest? (game-feature feature56) (-> this game features)) + (if (and (logtest? (game-feature jakc) (-> this game features)) (not (logtest? (game-secrets commentary) (-> *game-info* secrets))) ) (target-geo jakc) diff --git a/goal_src/jak3/engine/target/mech/carry-h.gc b/goal_src/jak3/engine/target/mech/carry-h.gc index cc50642c17..0f1f4b137d 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-h.gc b/goal_src/jak3/engine/target/mech/mech-h.gc index 56b4769c2a..6b6b24c6f0 100644 --- a/goal_src/jak3/engine/target/mech/mech-h.gc +++ b/goal_src/jak3/engine/target/mech/mech-h.gc @@ -20,6 +20,7 @@ (drag-sound-id sound-id) (whine-sound-id sound-id) (shield-sound-id sound-id) + (mode-sound-bank connection) (mech-start-time time-frame) (mech-time time-frame) (no-get-off-time time-frame) @@ -49,7 +50,7 @@ (smoke-local-vel vector 2 :inline) (particle-system-2d basic) (particle-system-3d basic) - (part-thruster sparticle-launch-control) + (part-thruster sparticle-launcher) (part-thruster-scale-x sp-field-init-spec) (part-thruster-scale-y sp-field-init-spec) (part-quat quaternion) @@ -80,5 +81,5 @@ (defskelgroup skel-mech-explode mech mech-explode-lod0-jg mech-explode-idle-ja ((mech-explode-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 4.5) - :shadow-joint-index 3 + :origin-joint-index 3 ) diff --git a/goal_src/jak3/engine/target/mech/mech-part.gc b/goal_src/jak3/engine/target/mech/mech-part.gc index c6ad3ea5d0..0ce02fd1bc 100644 --- a/goal_src/jak3/engine/target/mech/mech-part.gc +++ b/goal_src/jak3/engine/target/mech/mech-part.gc @@ -7,3 +7,405 @@ ;; DECOMP BEGINS +(defpart 1037 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:y (meters 0)) + (:scale-x (meters 1)) + (:scale-y (meters 3)) + (: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)) + ) + ) + +(defpart 1038 + :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) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + ) + ) + +(defpart 1039 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 4.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 192.0) + (:g 64.0) + (:b 0.0) + (:a 0.0 16.0) + (:vel-y (meters -0.06666667) (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.0005)) + (:friction 0.94) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.085)) + (:next-launcher 1040) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 1040 + :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.128 -0.256) + ) + ) + +(defpart 1041 + :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 1042) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 1042 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y (meters 0))) + ) + +(defpart 1043 + :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 1044) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 1044 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b -4.096)) + ) + +(defun mech-spawn-thruster ((arg0 mech-info) (arg1 vector) (arg2 vector) (arg3 float) (arg4 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (set! (-> arg0 part-thruster) (-> *part-id-table* 1037)) + (set! (-> arg0 part-thruster-scale-x) (-> *part-id-table* 1037 init-specs 4)) + (set! (-> arg0 part-thruster-scale-y) (-> *part-id-table* 1037 init-specs 5)) + (let ((s1-0 (new 'stack-no-clear 'quaternion)) + (s0-0 (new 'stack-no-clear 'vector)) + ) + (forward-up->quaternion s1-0 arg2 (new 'static 'vector :y 1.0 :w 1.0)) + (quaternion-rotate-local-x! s1-0 s1-0 32768.0) + (let ((a0-3 s0-0)) + (let ((v1-10 arg1)) + (let ((a1-4 (* 0.5 arg4))) + (.mov vf7 a1-4) + ) + (.lvf vf5 (&-> arg2 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 (&-> a0-3 quad) vf6) + ) + (set! (-> arg0 part-thruster-scale-x initial-valuef) arg3) + (set! (-> arg0 part-thruster-scale-y initial-valuef) arg4) + (dotimes (s4-1 2) + (quaternion-rotate-local-z! s1-0 s1-0 16384.0) + (quaternion-copy! (-> arg0 part-quat) s1-0) + (let ((t9-4 sp-launch-particles-var) + (a0-6 (-> arg0 particle-system-3d)) + (a1-7 (-> arg0 part-thruster)) + (a2-4 *launch-matrix*) + ) + (set! (-> a2-4 trans quad) (-> s0-0 quad)) + (t9-4 + (the-as sparticle-system a0-6) + a1-7 + a2-4 + (the-as sparticle-launch-state #f) + (the-as sparticle-launch-control #f) + 1.0 + ) + ) + ) + ) + (launch-particles (-> *part-id-table* 1043) arg1) + (launch-particles (-> *part-id-table* 1038) arg1) + (cond + ((!= (-> *setting-control* user-current under-water-pitch-mod) 0.0) + (launch-particles (-> *part-id-table* 1043) arg1) + ) + (else + (launch-particles (-> *part-id-table* 1039) arg1) + (launch-particles (-> *part-id-table* 1041) arg1) + ) + ) + 0 + (none) + ) + ) + +(defpart 1045 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 3.0) + (:x (meters -16) (meters 32)) + (:y (meters 0) (meters 12)) + (:z (meters -16) (meters 32)) + (:scale-x (meters 0.1) (meters 0.3)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 0.0 64.0) + (:g 64.0 128.0) + (:b 64.0 196.0) + (:a 0.0) + (:vel-y (meters -0.0033333334) (meters 0.006666667)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:fade-a 0.21333334 0.21333334) + (:timer (seconds 2.5)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata 0.0) + (:func 'check-water-level-above-and-die) + (:next-time (seconds 0.5)) + (:next-launcher 1046) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters -3) (meters 8)) + ) + ) + +(defpart 1046 + :init-specs ((:fade-a 0.0) (:next-time (seconds 1)) (:next-launcher 1047)) + ) + +(defpart 1047 + :init-specs ((:fade-a -0.21333334 -0.21333334)) + ) + +(defpart 1048 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 0.2) + (:x (meters -24) (meters 48)) + (:y (meters -4) (meters 4)) + (:z (meters -24) (meters 48)) + (:scale-x (meters 0.15) (meters 0.15)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.008333334) (meters 0.005)) + (:fade-a 0.16) + (:timer (seconds 16)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'check-water-level-above-and-die) + (:next-time (seconds 0.33) (seconds 0.657)) + (:next-launcher 1049) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1049 + :init-specs ((:fade-a 0.0) (:next-time (seconds 1) (seconds 5.997)) (:next-launcher 1050)) + ) + +(defpart 1050 + :init-specs ((:scalevel-x (meters -0.00033333333) (meters -0.00066666666)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.16) + (:accel-y (meters -0.0001) (meters -0.0001)) + ) + ) + +(defpart 1051 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.15) (meters 0.15)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.008333334) (meters 0.005)) + (:fade-a 0.16) + (:accel-y (meters 0.0002)) + (:friction 0.97 0.01) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'check-water-level-above-and-die) + (:next-time (seconds 0.33) (seconds 0.657)) + (:next-launcher 1052) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +(defpart 1052 + :init-specs ((:fade-a 0.0) (:next-time (seconds 1) (seconds 0.997)) (:next-launcher 1050)) + ) + +(defpartgroup group-mech-explode-death + :id 236 + :duration (seconds 0.25) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 153) (sp-item 154)) + ) + +(defpart 1053 + :init-specs ((:num 4.0) + (:x (meters -1) (meters 3)) + (:y (meters 0) (meters 4)) + (:rot-x 6) + (:r 4096.0) + (:g 2662.4) + (:b 2867.2) + (:vel-y (meters 0.0033333334) (meters 0.01)) + (:accel-y (meters 0.0016666667) (meters 0.00033333333)) + (:friction 0.9) + (:timer (seconds 0.4)) + (:flags (distort)) + (:next-time (seconds 0.135) (seconds 0.13)) + (:next-launcher 1054) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1054 + :init-specs ((:fade-b -5.12)) + ) + +(defpart 1055 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 16.0 4.0) + (:x (meters -1) (meters 3)) + (:y (meters 0) (meters 4)) + (:scale-x (meters 0.5) (meters 0.25)) + (:scale-y (meters 1) (meters 0.25)) + (:r 255.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 32.0 32.0) + (:vel-y (meters 0.0033333334) (meters 0.01)) + (:scalevel-x (meters 0.013333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters 0.0016666667) (meters 0.00033333333)) + (:friction 0.9) + (:timer (seconds 0.367)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400f00 #x400f00)) + (:next-time (seconds 0.167)) + (:next-launcher 1056) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1056 + :init-specs ((:fade-a -0.53333336 -0.53333336)) + ) + +(defpart 1057 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.2) (meters 4)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 8)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 64.0 64.0) + (:b 255.0) + (:a 32.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters -0.1) (meters 0.5)) + ) + ) + +(defpart 1058 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 2.0 4.0) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.04) (meters 0.03)) + (:r 0.0) + (:g 64.0 64.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:vel-y (meters 0.1) (meters 0.2)) + (:fade-g -2.55 -2.55) + (:fade-b -2.0) + (:fade-a -0.64 -0.64) + (:accel-y (meters -0.0033333334) (meters -0.0033333334)) + (:friction 0.8 0.02) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) diff --git a/goal_src/jak3/engine/target/mech/mech-states.gc b/goal_src/jak3/engine/target/mech/mech-states.gc index cab081d7cf..e1e1e1c55f 100644 --- a/goal_src/jak3/engine/target/mech/mech-states.gc +++ b/goal_src/jak3/engine/target/mech/mech-states.gc @@ -7,3 +7,2750 @@ ;; DECOMP BEGINS +(define *mech-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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(defun check-turn-on-shield ((arg0 target)) + (when (cpad-hold? (-> arg0 control cpad number) circle) + (if (handle->process (-> arg0 mech shield-handle)) + (go target-mech-shield) + ) + ) + ) + +(defstate target-mech-start (target) + :event target-mech-handler + :exit target-mech-exit + :code target-mech-init + :post target-post + ) + +;; WARN: Return type mismatch object vs symbol. +(defbehavior mech-can-throw? target () + (let ((v1-1 (vector-float*! (new 'stack-no-clear 'vector) (-> self control local-normal) 0.0))) + (vector+float*! v1-1 v1-1 (-> self control c-R-w fvec) 20480.0) + (the-as symbol (send-event (handle->process (-> self carry other)) 'can-drop? v1-1)) + ) + ) + +(defstate target-mech-stance (target) + :event target-mech-handler + :enter (behavior () + (set! (-> self control mod-surface) *mech-stance-mods*) + (set! (-> self control mod-surface turnvv) 40049.777) + (set! (-> self control did-move-to-pole-or-max-jump-height) 0.0) + (rot->dir-targ! (-> self control)) + (set! (-> self mech jump-thrust-fuel) (-> *TARGET-bank* mech-jump-thrust-fuel)) + ) + :exit (behavior () + (target-effect-exit) + (target-mech-exit) + (rot->dir-targ! (-> self control)) + ) + :trans (behavior () + (check-turn-on-shield self) + (when (not (cpad-hold? (-> self control cpad number) circle)) + (if (and (move-legs?) + (and (< (fabs + (deg-diff (quaternion-y-angle (-> self control dir-targ)) (vector-y-angle (-> self control to-target-pt-xz))) + ) + 1820.4445 + ) + (time-elapsed? (-> self control time-of-last-zero-input) (seconds 0.05)) + ) + ) + (go target-mech-walk) + ) + (if (and (cpad-pressed? (-> self control cpad number) square) (can-hands? #t)) + (go target-mech-punch) + ) + (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-mech-jump + (-> *TARGET-bank* mech-jump-height-min) + (-> *TARGET-bank* mech-jump-height-max) + (the-as surface #f) + ) + ) + (if (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 r1) + ) + (go target-mech-carry-pickup) + ) + (if (and (or (cpad-pressed? (-> self control cpad number) triangle) (not (-> *setting-control* user-current pilot))) + (target-mech-get-off?) + ) + (go target-mech-shield) + ) + ) + (fall-test target-mech-falling (-> *TARGET-bank* fall-height)) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (when (not (and v1-2 (= v1-2 jakb-mech-turn90-ja))) + (let ((v1-8 (ja-group))) + (if (and v1-8 (= v1-8 jakb-mech-walk-ja)) + (sound-play "mech-stop") + ) + ) + (ja-channel-push! 3 (seconds 0.2)) + (ja :group! jakb-mech-turn90-ja :dist 16384.0) + (ja :chan 1 :group! jakb-mech-turn20-ja :dist 3640.889) + (ja :chan 2 :group! jakb-mech-stance-ja :dist 0.0) + ) + ) + (let ((f28-0 0.0) + (f30-0 0.0) + (gp-1 #f) + ) + (until #f + (let ((f26-0 (y-angle (-> self control)))) + (deg-diff f26-0 (quaternion-y-angle (-> self control dir-targ))) + (suspend) + (let ((f26-1 (* (deg-diff f26-0 (y-angle (-> self control))) (-> self clock frames-per-second)))) + (cond + ((< 910.2222 (fabs f26-1)) + (set! f28-0 (seek f28-0 1.0 (* 16.0 (seconds-per-frame)))) + (set! gp-1 #t) + ) + (else + (set! f28-0 (seek f28-0 0.0 (* 6.0 (seconds-per-frame)))) + (when (and gp-1 (= f28-0 0.0)) + (set! gp-1 #f) + (sound-play "mech-twitch") + ) + ) + ) + (set! f30-0 (seek f30-0 (lerp-scale 1.0 0.0 (fabs f26-1) 3640.889 16384.0) (* 10.0 (seconds-per-frame)))) + (let ((v1-41 (-> self skel effect))) + (set! (-> v1-41 channel-offset) (cond + ((< 0.8 (- 1.0 f28-0)) + 2 + ) + ((< 0.5 f30-0) + 1 + ) + (else + 0 + ) + ) + ) + ) + 0 + (ja :num! (loop! (/ f26-1 (current-cycle-distance (-> self skel))))) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + (ja-no-eval :chan 1 :num! (loop! (/ f26-1 (current-cycle-distance (-> self skel))))) + ) + ) + (let ((a0-44 (-> self skel root-channel 2))) + (let ((f0-22 (- 1.0 f28-0))) + (set! (-> a0-44 frame-interp 1) f0-22) + (set! (-> a0-44 frame-interp 0) f0-22) + ) + (set! (-> a0-44 param 0) 1.0) + (joint-control-channel-group-eval! a0-44 (the-as art-joint-anim #f) num-func-loop!) + ) + (can-play-stance-amibent?) + ) + ) + #f + ) + :post target-mech-post + ) + +(defstate target-mech-walk (target) + :event target-mech-handler + :enter (behavior () + (set! (-> self control mod-surface) *mech-walk-mods*) + (set! (-> self control unknown-word04) (the-as uint #f)) + (set! (-> self control unknown-word04) (the-as uint 0.0)) + (set! (-> self mech jump-thrust-fuel) (-> *TARGET-bank* mech-jump-thrust-fuel)) + ) + :exit (behavior () + (target-effect-exit) + (target-mech-exit) + ) + :trans (behavior () + (check-turn-on-shield self) + (if (and (cpad-pressed? (-> self control cpad number) square) (can-hands? #t)) + (go target-mech-punch) + ) + (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-mech-jump + (-> *TARGET-bank* mech-jump-height-min) + (-> *TARGET-bank* mech-jump-height-max) + (the-as surface #f) + ) + ) + (let ((gp-0 (ja-group)) + (f0-2 (ja-aframe-num 0)) + ) + (when (if (or (and (= gp-0 jakb-mech-walk-ja) (>= f0-2 5.5) (>= 9.5 f0-2)) + (and (= gp-0 jakb-mech-walk-ja) (>= f0-2 20.5) (>= 24.5 f0-2)) + ) + #t + ) + (case (-> self control unknown-spool-anim00) + (('punch) + (go target-mech-punch) + ) + (('jump) + (if (can-jump? #f) + (go + target-mech-jump + (-> *TARGET-bank* mech-jump-height-min) + (-> *TARGET-bank* mech-jump-height-max) + (the-as surface #f) + ) + (set! (-> self control unknown-word04) (the-as uint #f)) + ) + ) + ) + (when (and (< 5.0 (the-as float (-> self control unknown-word04))) + (= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) + ) + (set-forward-vel 0.0) + (go target-mech-stance) + ) + (if (and (or (cpad-pressed? (-> self control cpad number) triangle) (not (-> *setting-control* user-current pilot))) + (target-mech-get-off?) + ) + (go target-mech-shield) + ) + ) + ) + (if (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 r1) + ) + (go target-mech-carry-pickup) + ) + (fall-test target-mech-falling (-> *TARGET-bank* fall-height)) + ) + :code (behavior () + (let ((f30-0 0.0) + (f28-0 0.0) + ) + (let ((f26-0 (cond + ((zero? (-> self mech walk-anim-leg)) + (set! (-> self mech walk-anim-leg) 1) + 7.0 + ) + (else + (set! (-> self mech walk-anim-leg) 0) + 22.0 + ) + ) + ) + (v1-7 (ja-group)) + ) + (when (not (and v1-7 (= v1-7 jakb-mech-walk-ja))) + (ja-channel-push! 3 (seconds 0.1)) + (ja :group! jakb-mech-walk-ja + :num! (identity (ja-aframe f26-0 0)) + :dist (-> *TARGET-bank* mech-walk-cycle-dist) + ) + (ja :chan 1 :group! jakb-mech-run-ja :dist (-> *TARGET-bank* mech-run-cycle-dist)) + (ja :chan 2 :group! jakb-mech-stance-ja :dist 0.0) + ) + ) + (until #f + (if (< (-> self control ctrl-xz-vel) 8192.0) + (set-forward-vel 8192.0) + ) + (suspend) + (let* ((f0-5 (current-cycle-distance (-> self skel))) + (f26-1 (/ (-> self control ctrl-xz-vel) f0-5)) + ) + (set! (-> self control unknown-word04) + (the-as uint (+ (the-as float (-> self control unknown-word04)) f26-1)) + ) + (set! f30-0 + (seek f30-0 (lerp-scale 0.0 1.0 (-> self control ctrl-xz-vel) 16384.0 32768.0) (* 2.0 (seconds-per-frame))) + ) + (set! f28-0 + (seek f28-0 (lerp-scale 1.0 0.0 (-> self control ctrl-xz-vel) 0.0 12288.0) (* 2.0 (seconds-per-frame))) + ) + (let ((v1-39 (-> self skel effect))) + (set! (-> v1-39 channel-offset) (if (< 0.5 f30-0) + 1 + 0 + ) + ) + ) + 0 + (ja :num! (loop! f26-1)) + ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + (ja :chan 2 :num! (chan 0) :frame-interp0 f28-0 :frame-interp1 f28-0) + ) + ) + #f + ) + :post target-mech-post + ) + +(defbehavior target-mech-punch-pick target ((arg0 symbol)) + (local-vars (sv-144 control-info) (sv-160 float)) + (combo-tracker-method-12 + (-> self control unknown-combo-tracker00) + *null-vector* + *null-vector* + (the-as process #f) + (current-time) + ) + (let* ((s4-0 (get-trans self 3)) + (s2-0 (combo-tracker-method-13 + (-> self control unknown-combo-tracker00) + (-> self control send-attack-dest) + s4-0 + 32768.0 + (-> self control c-R-w fvec) + 65536.0 + ) + ) + (s5-0 (the-as art-element #f)) + ) + (when s2-0 + (let ((s3-0 (get-trans s2-0 3))) + (set! sv-144 (-> self control)) + (let ((s0-0 s3-0) + (s1-0 deg-diff) + ) + (set! sv-160 (y-angle sv-144)) + (let* ((a1-4 (vector-y-angle (vector-! (new 'stack-no-clear 'vector) s0-0 (-> sv-144 trans)))) + (f0-0 (s1-0 sv-160 a1-4)) + ) + (cond + ((>= f0-0 5461.3335) + (set! (-> self mech walk-anim-leg) 0) + 0 + ) + ((>= -5461.3335 f0-0) + (set! (-> self mech walk-anim-leg) 1) + ) + (else + (set! (-> self mech walk-anim-leg) 2) + ) + ) + ) + ) + (when (< (vector-vector-distance s3-0 s4-0) 32768.0) + (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) 'dont-face?) + (if (not (send-event-function s2-0 a1-6)) + (forward-up-nopitch->quaternion + (-> self control dir-targ) + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) s3-0 s4-0) 1.0) + (vector-y-quaternion! (new-stack-vector0) (-> self control dir-targ)) + ) + ) + ) + ) + ) + ) + (let ((v1-29 (-> self mech walk-anim-leg))) + (cond + ((zero? v1-29) + (set! (-> self mech walk-anim-leg) 1) + (set! s5-0 jakb-mech-punch-l-ja) + ((method-of-type impact-control initialize) + (the-as impact-control (-> self mech state-impact)) + (ppointer->process (-> self manipy)) + 7 + 6963.2 + (logior (collide-spec mech-punch) (-> self control root-prim prim-core collide-with)) + ) + ) + ((= v1-29 1) + (set! (-> self mech walk-anim-leg) 0) + (set! s5-0 jakb-mech-punch-r-ja) + ((method-of-type impact-control initialize) + (the-as impact-control (-> self mech state-impact)) + (ppointer->process (-> self manipy)) + 17 + 6963.2 + (logior (collide-spec mech-punch) (-> self control root-prim prim-core collide-with)) + ) + ) + ((= v1-29 2) + (set! (-> self mech walk-anim-leg) 0) + (set! s5-0 jakb-mech-punch-b-ja) + ((method-of-type impact-control initialize) + (the-as impact-control (-> self mech state-impact)) + (ppointer->process (-> self manipy)) + 39 + 11141.12 + (logior (collide-spec mech-punch) (-> self control root-prim prim-core collide-with)) + ) + ) + ((= v1-29 3) + (set! (-> self mech walk-anim-leg) 0) + (set! s5-0 jakb-mech-punch-u-ja) + ((method-of-type impact-control initialize) + (the-as impact-control (-> self mech state-impact)) + (ppointer->process (-> self manipy)) + 39 + 11141.12 + (logior (collide-spec mech-punch) (-> self control root-prim prim-core collide-with)) + ) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (if (zero? arg0) + (ja-no-eval :group! s5-0 :num! (seek!)) + (ja-no-eval :group! s5-0 :num! (seek!) :frame-num (ja-aframe 10.0 0)) + ) + ) + (-> self mech walk-anim-leg) + ) + +(defstate target-mech-punch (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (cond + ((focus-test? self dangerous) + (case message + (('touched) + (if ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> block param 0)) + (-> self control) + (the-as uint 1920) + ) + (target-send-attack + proc + (-> self control danger-mode) + (the-as touching-shapes-entry (-> block param 0)) + (the-as int (-> self control target-attack-id)) + (the-as int (-> self control attack-count)) + (-> self control penetrate-using) + ) + (target-mech-handler proc argc message block) + ) + ) + (('impact-control) + (when (-> self control danger-mode) + (-> block param 1) + (let* ((gp-1 (the-as object (-> block param 3))) + (s5-1 (-> (the-as collide-query gp-1) best-other-tri collide-ptr)) + (s4-1 (if (type? s5-1 collide-shape-prim) + s5-1 + ) + ) + (s3-1 (if s4-1 + (-> (the-as collide-shape-prim s4-1) cshape process) + (the-as process-drawable #f) + ) + ) + (s5-2 (if (type? s3-1 process-focusable) + s3-1 + ) + ) + ) + (if (and s4-1 (and (or (and s5-2 (focus-test? (the-as process-focusable s5-2) dead)) + (when (send-event + (-> (the-as collide-shape-prim s4-1) cshape process) + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (-> self control target-attack-id)) + (damage 200.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode (-> self control danger-mode)) + (count (-> self control attack-count)) + (penetrate-using (penetrate touch punch mech mech-punch)) + (intersection (-> (the-as collide-query gp-1) best-other-tri intersect)) + ) + ) + ) + (set! (-> self control send-attack-dest) (process->handle s5-2)) + (set-time! (-> self control send-attack-time)) + #t + ) + ) + s5-2 + (focus-test? (the-as process-focusable s5-2) dead) + ) + ) + (set! (-> self mech forward-vel) 0.0) + (set! (-> self mech forward-vel) -40960.0) + ) + (when (or (not s5-2) (= (-> self control send-attack-time) (current-time))) + (cond + ((logtest? (-> *part-group-id-table* 12 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> (the-as collide-query gp-1) best-other-tri intersect quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 12)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> (the-as collide-query gp-1) best-other-tri intersect quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 12)) + ) + ) + (sound-play "mech-punch-hit" :position (+ (the-as uint gp-1) 48)) + (activate! *camera-smush-control* 1638.4 15 75 1.0 0.9 (-> *display* camera-clock)) + ) + ) + ) + ) + (else + (target-mech-handler proc argc message block) + ) + ) + ) + (else + (target-mech-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self control mod-surface) *mech-punch-mods*) + (set! (-> self mech state-impact? 0) #f) + (rot->dir-targ! (-> self control)) + ) + :exit (behavior () + (set! (-> *mech-punch-mods* turnvv) 0.0) + (set! (-> self mech state-impact? 0) #f) + (set-time! (-> self control last-running-attack-end-time)) + (target-exit) + (target-mech-exit) + ) + :code (behavior () + (set! (-> self mech forward-vel) (-> self control ctrl-xz-vel)) + 1.0 + (let ((s5-0 #f) + (gp-0 0) + (s4-0 30) + ) + (target-mech-punch-pick (the-as symbol gp-0)) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (when (and (not (focus-test? self dangerous)) + (let ((v1-10 (ja-group))) + (and v1-10 (or (= v1-10 jakb-mech-punch-l-ja) + (= v1-10 jakb-mech-punch-r-ja) + (= v1-10 jakb-mech-punch-b-ja) + (= v1-10 jakb-mech-punch-u-ja) + ) + ) + ) + (>= (ja-aframe-num 0) 12.0) + ) + (target-start-attack) + (target-danger-set! 'mech-punch #f) + ) + (when (and (cpad-pressed? (-> self control cpad number) square) (< gp-0 2)) + (let ((s3-0 (ja-group)) + (f30-0 (ja-aframe-num 0)) + ) + (if (or (and (= s3-0 jakb-mech-punch-l-ja) + (>= f30-0 2.0) + (>= (the float (+ (-> (the-as art-joint-anim jakb-mech-punch-l-ja) frames num-frames) -1)) (ja-frame-num 0)) + ) + (and (= s3-0 jakb-mech-punch-r-ja) + (>= f30-0 2.0) + (>= (the float (+ (-> (the-as art-joint-anim jakb-mech-punch-r-ja) frames num-frames) -1)) (ja-frame-num 0)) + ) + (and (= s3-0 jakb-mech-punch-b-ja) + (>= f30-0 2.0) + (>= (the float (+ (-> (the-as art-joint-anim jakb-mech-punch-b-ja) frames num-frames) -1)) (ja-frame-num 0)) + ) + (and (= s3-0 jakb-mech-punch-u-ja) + (>= f30-0 2.0) + (>= (the float (+ (-> (the-as art-joint-anim jakb-mech-punch-u-ja) frames num-frames) -1)) (ja-frame-num 0)) + ) + ) + (set! s5-0 #t) + ) + ) + ) + (when s5-0 + (let ((s3-1 (ja-group)) + (f30-2 (ja-aframe-num 0)) + ) + (when (or (and (= s3-1 jakb-mech-punch-l-ja) + (>= f30-2 21.0) + (>= (the float (+ (-> (the-as art-joint-anim jakb-mech-punch-l-ja) frames num-frames) -1)) (ja-frame-num 0)) + ) + (and (= s3-1 jakb-mech-punch-r-ja) + (>= f30-2 21.0) + (>= (the float (+ (-> (the-as art-joint-anim jakb-mech-punch-r-ja) frames num-frames) -1)) (ja-frame-num 0)) + ) + (and (= s3-1 jakb-mech-punch-b-ja) + (>= f30-2 21.0) + (>= (the float (+ (-> (the-as art-joint-anim jakb-mech-punch-b-ja) frames num-frames) -1)) (ja-frame-num 0)) + ) + (and (= s3-1 jakb-mech-punch-u-ja) + (>= f30-2 21.0) + (>= (the float (+ (-> (the-as art-joint-anim jakb-mech-punch-u-ja) frames num-frames) -1)) (ja-frame-num 0)) + ) + ) + (+! gp-0 1) + (target-mech-punch-pick (the-as symbol gp-0)) + (set! (-> self state-time) (+ (current-time) (seconds -0.465))) + (set! (-> self mech forward-vel) (fmax 0.0 (-> self mech forward-vel))) + (set! s4-0 159) + (set! s5-0 #f) + ) + ) + ) + (let ((v1-142 (- (current-time) (-> self state-time))) + (s3-2 #t) + (f30-4 1.0) + ) + (cond + ((< (-> self mech forward-vel) 0.0) + (seek! (-> self mech forward-vel) -0.04096 (* 122880.0 (seconds-per-frame))) + ) + ((let ((a0-43 (ja-group))) + (and a0-43 (or (= a0-43 jakb-mech-punch-b-ja) (= a0-43 jakb-mech-punch-u-ja))) + ) + (cond + ((< v1-142 (seconds 0.465)) + (set! s3-2 #f) + ) + ((< v1-142 (seconds 0.53)) + (set! (-> self mech forward-vel) (lerp-scale 40960.0 81920.0 (the float v1-142) 139.8 159.98999)) + ) + (else + (set! (-> self mech forward-vel) (lerp-scale 81920.0 0.0 (the float v1-142) 159.98999 300.0)) + ) + ) + ) + (else + (let ((a0-50 (ja-group))) + (cond + ((and a0-50 (= a0-50 jakb-mech-punch-l-ja)) + (cond + ((< v1-142 (seconds 0.465)) + (seek! (-> self mech forward-vel) 0.0 (* 20480.0 (seconds-per-frame))) + (set! s3-2 #f) + ) + ((< v1-142 (seconds 0.53)) + (set! (-> self mech forward-vel) (lerp-scale 20480.0 40960.0 (the float v1-142) 139.8 159.98999)) + ) + (else + (set! (-> self mech forward-vel) (lerp-scale 40960.0 0.0 (the float v1-142) 159.98999 300.0)) + ) + ) + ) + ((< v1-142 (seconds 0.465)) + (seek! (-> self mech forward-vel) 0.0 (* 20480.0 (seconds-per-frame))) + (set! s3-2 #f) + ) + ((< v1-142 (seconds 0.53)) + (set! (-> self mech forward-vel) (lerp-scale 20480.0 40960.0 (the float v1-142) 139.8 159.98999)) + ) + (else + (set! (-> self mech forward-vel) (lerp-scale 40960.0 0.0 (the float v1-142) 159.98999 300.0)) + ) + ) + ) + ) + ) + (set! s3-2 (and (time-elapsed? (-> self state-time) s4-0) (and (>= (-> self mech forward-vel) 0.0) s3-2))) + (set! (-> self mech state-impact? 0) s3-2) + (set-forward-vel (-> self mech forward-vel)) + (when (< 20480.0 (vector-length (-> self control transv))) + (do-effect (-> self skel effect) "effect-slide-poof" (ja-frame-num 0) 49) + (do-effect (-> self skel effect) "effect-slide-poof" (ja-frame-num 0) 43) + ) + (suspend) + (ja :num! (seek! max (* (-> self control current-surface align-speed) f30-4))) + ) + ) + ) + (go target-mech-stance) + ) + :post target-mech-post + ) + +(defstate target-mech-falling (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (let ((v0-0 (target-mech-bonk-event-handler proc argc message block))) + (cond + (v0-0 + (empty) + v0-0 + ) + (else + (target-mech-handler proc argc message block) + ) + ) + ) + ) + :enter (behavior ((arg0 symbol)) + (set-time! (-> self state-time)) + (set! (-> self control mod-surface) *mech-jump-mods*) + (set! (-> self mech jump-thrust) 0.0) + (let* ((v1-4 *game-info*) + (v0-0 (+ (-> v1-4 attack-id) 1)) + ) + (set! (-> v1-4 attack-id) v0-0) + (set! (-> self control target-attack-id) v0-0) + ) + ) + :exit (behavior () + (set! (-> self mech jump-thrust) 0.0) + (set! (-> self mech thruster-flame-width) 0.0) + (set! (-> self mech thruster-flame-length) 0.0) + (target-exit) + (target-mech-exit) + ) + :trans (behavior () + (local-vars (a0-0 none)) + (if (logtest? (-> self control status) (collide-status on-surface)) + (go target-mech-hit-ground (the-as symbol a0-0)) + ) + (let ((f0-0 (target-move-dist (-> *TARGET-bank* stuck-time))) + (v1-9 (ja-group)) + ) + (when (if (and (and v1-9 (= v1-9 jakb-mech-jump-loop-ja)) + (< f0-0 (-> *TARGET-bank* stuck-distance)) + (and (time-elapsed? (-> self state-time) (seconds 2)) + (not (and *cheat-mode* (cpad-hold? (-> self control cpad number) r2))) + ) + ) + #t + ) + (logior! (-> self control status) (collide-status on-surface)) + (go target-mech-hit-ground 'stuck) + ) + ) + (let ((f30-0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + (let ((f0-2 (-> self mech jump-thrust-fuel))) + (cond + ((cpad-hold? (-> self control cpad number) x) + (cond + ((= f0-2 0.0) + (seek! (-> self mech jump-thrust) 0.0 (* 245760.0 (seconds-per-frame))) + ) + ((!= f0-2 (-> *TARGET-bank* mech-jump-thrust-fuel)) + (let ((f28-0 + (lerp-scale 122880.0 8192.0 (-> self mech jump-thrust-fuel) 600.0 (-> *TARGET-bank* mech-jump-thrust-fuel)) + ) + ) + (lerp-scale 409.6 8192.0 (-> self mech jump-thrust-fuel) 600.0 (-> *TARGET-bank* mech-jump-thrust-fuel)) + (seek! + (-> self mech jump-thrust) + (- (- (-> self control dynam gravity-length) f30-0) f28-0) + (* 8192000.0 (seconds-per-frame)) + ) + ) + ) + (else + (set! (-> self mech jump-thrust) 0.0) + ) + ) + (seek! (-> self mech jump-thrust-fuel) 0.0 (the float (- (current-time) (-> self clock old-frame-counter)))) + ) + (else + (seek! (-> self mech jump-thrust) 0.0 (* 491520.0 (seconds-per-frame))) + ) + ) + ) + (let ((v1-72 (new-stack-vector0))) + (let ((f0-29 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-72 (-> self control transv) (vector-float*! v1-72 (-> self control dynam gravity-normal) f0-29)) + ) + (let* ((f0-30 (vector-length v1-72)) + (f1-7 f0-30) + (f2-2 (+ f30-0 (* (-> self mech jump-thrust) (seconds-per-frame)))) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f2-2) + (vector-float*! v1-72 v1-72 (/ f0-30 f1-7)) + ) + ) + ) + ) + ) + :code (behavior ((arg0 symbol)) + (until #f + (cond + ((< 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + (let ((v1-7 (ja-group))) + (when (not (and v1-7 (= v1-7 jakb-mech-jump-thrust-ja))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! jakb-mech-jump-thrust-ja :num! min) + ) + ) + (suspend) + (ja :num! (loop! 0.75)) + ) + (else + (let ((v1-22 (ja-group))) + (when (not (and v1-22 (= v1-22 jakb-mech-jump-loop-ja))) + (ja-channel-push! 1 (seconds 0.5)) + (ja :group! jakb-mech-jump-loop-ja :num! min) + ) + ) + (suspend) + (ja :num! (loop!)) + ) + ) + ) + #f + ) + :post target-mech-post + ) + +(defstate target-mech-jump (target) + :event (-> target-mech-falling event) + :enter (behavior ((arg0 float) (arg1 float) (arg2 surface)) + (set-time! (-> self state-time)) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (let* ((v1-4 *game-info*) + (a2-5 (+ (-> v1-4 attack-id) 1)) + ) + (set! (-> v1-4 attack-id) a2-5) + (set! (-> self control target-attack-id) a2-5) + ) + (set! (-> self mech jump-thrust) 0.0) + (init-var-jump arg0 arg1 #t #f (-> self control transv) 2.0) + (sound-play "mech-jump") + (set! (-> self control unknown-symbol03) (the-as float arg2)) + (set! (-> self control mod-surface) *mech-jump-mods*) + ) + :exit (-> target-mech-falling exit) + :trans (-> target-mech-falling trans) + :code (behavior ((arg0 float) (arg1 float) (arg2 surface)) + (let ((v1-2 (ja-group))) + (if (and v1-2 (= v1-2 jakb-mech-jump-land-ja)) + (ja-channel-push! 1 (seconds 0.5)) + (ja-channel-push! 1 (seconds 0.05)) + ) + ) + ((the-as (function none) (-> target-mech-falling code))) + ) + :post target-mech-post + ) + +(defstate target-mech-hit-ground (target) + :event target-mech-handler + :enter (behavior ((arg0 symbol)) + (let ((v1-0 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-0 command) (sound-command set-param)) + (set! (-> v1-0 id) (-> self mech thrust-sound-id)) + (set! (-> v1-0 params volume) -4) + (set! (-> v1-0 auto-time) 48) + (set! (-> v1-0 auto-from) 2) + (set! (-> v1-0 params mask) (the-as uint 17)) + (-> v1-0 id) + ) + (set! (-> self mech jump-thrust-fuel) (-> *TARGET-bank* mech-jump-thrust-fuel)) + (set-time! (-> self state-time)) + (cond + ((= arg0 'stuck) + ) + (else + (target-land-effect) + ) + ) + (set! (-> self control last-running-attack-end-time) 0) + (set! (-> self control last-attack-end-time) 0) + (if (!= (-> self control ground-pat material) (pat-material ice)) + (delete-back-vel) + ) + (set! (-> self control mod-surface) *mech-stance-mods*) + (start-bobbing! + (-> self water) + (lerp-scale 0.0 4096.0 (-> self control ground-impact-vel) 40960.0 102400.0) + 600 + 1500 + ) + (activate! *camera-smush-control* 1638.4 15 75 1.0 0.9 (-> *display* camera-clock)) + ) + :exit (behavior () + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still)) + (target-mech-exit) + ) + :trans (behavior () + (if (and (cpad-pressed? (-> self control cpad number) square) (can-hands? #t)) + (go target-mech-punch) + ) + (when (time-elapsed? (-> self state-time) (seconds 0.25)) + (if (move-legs?) + (go target-mech-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-mech-jump + (-> *TARGET-bank* mech-jump-height-min) + (-> *TARGET-bank* mech-jump-height-max) + (the-as surface #f) + ) + ) + (if (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 r1) + ) + (go target-mech-carry-pickup) + ) + ) + (set-forward-vel 0.0) + ) + :code (behavior ((arg0 symbol)) + (target-hit-ground-anim #f (are-still?)) + (go target-mech-stance) + ) + :post target-mech-post + ) + +(defstate target-mech-hit (target) + :event target-mech-handler + :exit (behavior () + ((-> target-hit exit)) + (target-mech-exit) + ) + :trans (behavior () + (when (= *cheat-mode* 'debug) + (when (and (not *pause-lock*) (cpad-hold? (-> self control cpad number) r2)) + (set-time! (-> self control time-of-last-debug-heal)) + (pickup-collectable! (-> self fact) (pickup-type health) 100.0 (the-as handle #f)) + (go target-mech-stance) + ) + ) + ) + :code (behavior ((arg0 symbol) (arg1 attack-info)) + (logclear! (-> self water flags) (water-flag jump-out)) + (set-time! (-> self state-time)) + (let ((gp-0 (-> self attack-info)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-4 gp-0)) + (set! (-> v1-4 attacker) (the-as handle #f)) + (set! (-> v1-4 mode) 'generic) + (set! (-> v1-4 shove-back) 10240.0) + (set! (-> v1-4 shove-up) 6144.0) + (set! (-> v1-4 angle) #f) + (set! (-> v1-4 trans quad) (-> self control trans quad)) + (set! (-> v1-4 control) 0.0) + (set! (-> v1-4 invinc-time) (-> *TARGET-bank* hit-invulnerable-timeout)) + ) + (case arg0 + (('shove) + (let ((v1-7 gp-0)) + (set! (-> v1-7 shove-back) (-> *TARGET-bank* smack-surface-dist)) + (set! (-> v1-7 shove-up) (-> *TARGET-bank* smack-surface-height)) + (set! (-> v1-7 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-10 (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-10) + '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-mech-stance) + ) + (else + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (go target-mech-death (-> gp-0 mode)) + ) + ) + ) + ) + (target-hit-effect gp-0) + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (go target-mech-death (-> gp-0 mode)) + ) + (else + (case (-> gp-0 mode) + (('burn 'burnup) + (sound-play "get-burned") + ) + ) + ) + ) + (set! (-> self control mod-surface) *smack-mods*) + (let ((v1-63 (ja-group))) + (when (not (and v1-63 (= v1-63 jakb-mech-hit-front-ja))) + (ja-channel-push! 1 (seconds 0.075)) + (ja :group! jakb-mech-hit-front-ja :num! min) + ) + ) + (target-hit-move gp-0 (target-hit-orient gp-0 s5-0) target-mech-falling-anim-trans 1.0) + ) + (go target-mech-hit-ground #f) + ) + :post (behavior () + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) + (vector-float*! + (-> self control dynam gravity) + (-> self control dynam gravity-normal) + (the-as float (-> self control dynam gravity-length)) + ) + (target-mech-post) + ) + ) + +(defstate target-mech-death (target) + :event (-> target-death event) + :exit (behavior () + (set! (-> self mech stick-off) #f) + (target-mech-exit) + ((-> target-death exit)) + ) + :trans (-> target-mech-hit trans) + :code (behavior ((arg0 symbol)) + (set! (-> self mech stick-off) (the-as basic #t)) + (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) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (set-setting! 'process-mask 'set 0.0 (process-mask 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)) + ) + ) + (cond + ((or (= arg0 'none) (= arg0 'instant-death) (= arg0 'bot) (= arg0 'big-explosion)) + ) + ((= arg0 'grenade) + (sound-play "explosion") + ) + ((= arg0 'endlessfall) + (sound-play "mech-death-fall") + (set! (-> self control unknown-sound-id00) + (add-process *gui-control* *target* (gui-channel daxter) (gui-action play) "mechfall" -99.0 0) + ) + (sound-params-set! *gui-control* (-> self control unknown-sound-id00) #t -1 100 2 -1.0) + (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-58 (new-stack-vector0))) + (let ((f1-3 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-58 (-> self control transv) (vector-float*! v1-58 (-> self control dynam gravity-normal) f1-3)) + ) + (let* ((f1-4 (vector-length v1-58)) + (f2-1 f1-4) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f0-2) + (vector-float*! v1-58 v1-58 (/ f1-4 f2-1)) + ) + ) + ) + ) + (set! (-> self trans-hook) + (lambda :behavior target + () + (vector-seek! (-> self draw color-mult) *zero-vector* (seconds-per-frame)) + (let ((v1-2 (new-stack-vector0)) + (f0-2 (the-as number (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + ) + 0.0 + (vector-! + v1-2 + (-> self control transv) + (vector-float*! v1-2 (-> self control dynam gravity-normal) (the-as float f0-2)) + ) + (let* ((f1-2 (vector-length v1-2)) + (f2-0 f1-2) + ) + (if (< (the-as float (-> self control unknown-word04)) (the-as float f0-2)) + (set! f0-2 (-> self control unknown-word04)) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) (the-as float f0-2)) + (vector-float*! v1-2 v1-2 (/ f1-2 f2-0)) + ) + ) + ) + ((-> target-mech-hit trans)) + ) + ) + (ja-channel-push! 1 (seconds 0.3)) + (ja-no-eval :group! jakb-mech-jump-loop-ja :num! (loop! 0.5) :frame-num 0.0) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 0.8)) + (ja :group! jakb-mech-jump-loop-ja :num! (loop! 0.5)) + (suspend) + ) + ) + (remove-setting! 'mode-name) + ) + (else + (set! (-> self control mod-surface) *empty-mods*) + (rot->dir-targ! (-> self control)) + (remove-setting! 'slave-options) + (remove-setting! 'fov) + (remove-setting! 'head-offset) + (send-event *camera* 'set-dist #f #f) + (set! (-> self burn-proc) + (ppointer->handle + (process-spawn-function process process-drawable-burn-effect 1200 :to (ppointer->process (-> self manipy))) + ) + ) + (let ((gp-5 (if (zero? (rand-vu-int-count 2)) + jakb-mech-death-a-ja + jakb-mech-death-b-ja + ) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (let ((f30-0 (if (logtest? (-> self water flags) (water-flag under-water)) + 0.55 + 1.0 + ) + ) + ) + (ja-no-eval :group! gp-5 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (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 + (ppointer->process (-> self manipy)) + (-> *lightning-spec-id-table* 1) + lightning-probe-callback + (-> *part-id-table* 160) + 0 + 0 + 40960.0 + ) + ) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + (sound-play "mech-eject") + (cond + ((logtest? (-> *part-group-id-table* 236 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 236)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 236)) + ) + ) + (rot->dir-targ! (-> self control)) + (ja-post) + (let ((gp-9 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (cond + ((logtest? (-> self water flags) (water-flag under-water)) + (set! (-> gp-9 duration) (seconds 8)) + (set! (-> gp-9 gravity) -20480.0) + (set! (-> gp-9 rot-speed) 4.2) + (set-vector! (-> gp-9 fountain-rand-transv-lo) -20480.0 12288.0 -20480.0 1.0) + (set-vector! (-> gp-9 fountain-rand-transv-hi) 20480.0 24576.0 20480.0 1.0) + ) + (else + (set! (-> gp-9 gravity) -204800.0) + (set-vector! (-> gp-9 fountain-rand-transv-lo) -61440.0 12288.0 -61440.0 1.0) + (set-vector! (-> gp-9 fountain-rand-transv-hi) 61440.0 49152.0 61440.0 1.0) + ) + ) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-mech-explode" (the-as (pointer level) #f)) + 41 + gp-9 + *mech-exploder-params* + :name "joint-exploder" + :to (ppointer->process (-> self manipy)) + :unk 0 + ) + ) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (logior! (-> self target-flags) (target-flags tf6)) + (set! (-> self alt-cam-pos quad) (-> self control trans quad)) + (set! (-> self post-hook) target-no-move-post) + (ja-channel-set! 1) + (ja-no-eval :group! jakb-death-painful-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (set! (-> self control transv quad) (the-as uint128 0)) + (vector-seek! + (-> self draw color-mult) + (new 'static 'vector :x 0.5 :y 0.5 :z 0.5 :w 1.0) + (* 5.0 (seconds-per-frame)) + ) + (suspend) + (ja :num! (seek!)) + ) + (let ((gp-10 (current-time))) + (until (time-elapsed? gp-10 (seconds 2)) + (suspend) + ) + ) + ) + ) + (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)) + (if (!= (-> self game mode) 'play) + (go target-jump 16384.0 16384.0 (the-as surface #f)) + ) + (set-time! (-> self state-time)) + (sleep-code) + ) + :post target-mech-post + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior target-mech-carry-update target () + (carry-info-method-9 (-> self carry)) + (when (and (= (-> self control collide-mode) 'mech-carry) (< (-> self control collide-mode-transition) 1.0)) + (let ((gp-0 (new 'stack-no-clear 'collide-query)) + (s5-0 (new 'stack-no-clear 'inline-array 'sphere 1)) + ) + (dotimes (s4-0 1) + ((method-of-type sphere new) (the-as symbol (-> s5-0 s4-0)) sphere) + ) + (let ((f30-0 (seek (-> self control collide-mode-transition) 1.0 (* 0.1 (-> self clock time-adjust-ratio))))) + (set! (-> s5-0 0 quad) (-> self control collision-spheres 2 prim-core world-sphere quad)) + (set! (-> s5-0 0 r) (lerp-scale (-> *TARGET-bank* body-radius) 11468.8 f30-0 0.0 1.0)) + (let ((v1-17 gp-0)) + (set! (-> v1-17 best-dist) (the-as float s5-0)) + (set! (-> v1-17 best-other-prim) (the-as collide-shape-prim 1)) + (set! (-> v1-17 collide-with) (-> self control root-prim prim-core collide-with)) + (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 best-my-prim) (the-as collide-shape-prim #t)) + (set! (-> v1-17 action-mask) (collide-action solid)) + ) + (if (not (fill-and-probe-using-spheres *collide-cache* gp-0)) + (target-collide-set! 'mech-carry f30-0) + ) + ) + ) + ) + (send-event (handle->process (-> self carry other)) 'carry (-> self carry)) + (none) + ) + +(defbehavior target-mech-carry-post target () + (logior! (-> self focus-status) (focus-status carry)) + (target-mech-post) + (target-mech-carry-update) + (none) + ) + +(defstate target-mech-carry-pickup (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (cond + (((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> block param 0)) + (-> self control) + (the-as uint 1920) + ) + (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) 'carry?) + (let ((a1-3 (send-event-function proc a1-2))) + (when a1-3 + (let ((f0-0 (distance-from-destination (-> self carry) (the-as carry-info a1-3)))) + (when (and (>= f0-0 0.0) (< f0-0 (-> self carry other-value))) + (set! (-> self carry other) (process->handle proc)) + (set! (-> self carry other-value) f0-0) + ) + ) + ) + ) + ) + #f + ) + (else + (target-mech-handler proc argc message block) + ) + ) + ) + (('change-mode 'end-mode) + #f + ) + (else + (target-mech-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self control mod-surface) *mech-pickup-mods*) + (set! (-> self mech stick-off) (the-as basic #t)) + (set-time! (-> self state-time)) + (set-forward-vel 0.0) + (set! (-> self carry other) (the-as handle #f)) + (set! (-> self carry other-value) 100000000000.0) + (set! (-> self carry max-distance) 32768.0) + (set! (-> self carry mode) (carry-mode carry mech-carry mech-drag)) + (carry-info-method-9 (-> self carry)) + ) + :exit (behavior () + (when (not (and (-> self next-state) (let ((v1-3 (-> self next-state name))) + (or (= v1-3 'target-mech-carry-stance) + (= v1-3 'target-mech-carry-walk) + (= v1-3 'target-mech-carry-drop) + (= v1-3 'target-mech-carry-throw) + (= v1-3 'target-mech-carry-jump) + (= v1-3 'target-mech-carry-falling) + (= v1-3 'target-mech-carry-hit-ground) + (= v1-3 'target-mech-carry-throw) + (= v1-3 'target-mech-carry-drag) + (= v1-3 'target-mech-shield) + ) + ) + ) + ) + (logclear! (-> self focus-status) (focus-status carry)) + (send-event (handle->process (-> self carry other)) 'drop (-> self carry) *null-vector*) + (target-collide-set! 'mech 0.0) + (target-exit) + ) + (set! (-> self mech stick-off) #f) + (target-mech-exit) + ) + :code (behavior () + (let ((f30-0 0.0) + (f28-0 0.0) + (gp-0 #f) + ) + (ja-channel-push! 2 1) + (ja :group! jakb-mech-carry-pickup-high-ja :num! min) + (ja :chan 1 :group! jakb-mech-carry-pickup-low-ja :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + (suspend) + (ja :num! (seek!)) + (ja :chan 1 :num! (chan 0)) + (target-danger-set! 'carry? #f) + (suspend) + (ja :num! (seek!)) + (ja :chan 1 :num! (chan 0)) + (format #t "carry picked ~A~%" (handle->process (-> self carry other))) + (let ((a1-9 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-9 from) (process->ppointer self)) + (set! (-> a1-9 num-params) 0) + (set! (-> a1-9 message) 'carry-info) + (let ((s5-1 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-9)))) + (cond + (s5-1 + (let* ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> s5-1 point) (-> self control trans))) + (s3-0 (new-stack-vector0)) + (f26-0 (vector-dot (-> self control local-normal) s4-1)) + ) + 0.0 + (vector-! s3-0 s4-1 (vector-float*! s3-0 (-> self control local-normal) f26-0)) + (let* ((f24-0 (vector-length s3-0)) + (f22-0 f24-0) + ) + (set! f28-0 (lerp-scale 1.0 0.0 f26-0 3072.0 7168.0)) + (vector+! + s4-1 + (vector-float*! s4-1 (-> self control local-normal) f26-0) + (vector-float*! s3-0 s3-0 (/ f24-0 f22-0)) + ) + ) + ) + (cond + ((logtest? (-> s5-1 mode) (carry-mode mech-drag)) + (sound-play "mech-drag-pikup") + (let ((s4-5 (vector-! (new 'stack-no-clear 'vector) (-> self carry point) (-> s5-1 point)))) + (set! gp-0 #t) + (vector-xz-normalize! s4-5 (-> s5-1 max-pull)) + (vector+! s4-5 s4-5 (-> s5-1 point)) + ) + (let* ((f26-1 (y-angle (-> s5-1 process 0 control))) + (f0-15 (vector-y-angle (vector-! (new 'stack-no-clear 'vector) (-> s5-1 point) (-> self carry point)))) + (f0-21 (the float (the int (* 0.000061035156 (+ 73728.0 (deg- f0-15 f26-1)))))) + (s5-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> self carry face-dir) (the int f0-21)) + (let ((f24-2 (the float (sar (shl (the int (* 16384.0 f0-21)) 48) 48)))) + (set! (-> self control unknown-word04) (the-as uint (+ f26-1 f24-2))) + (set-vector! s5-2 (sin (+ f26-1 f24-2)) 0.0 (cos (+ f26-1 f24-2)) 1.0) + ) + (forward-up-nopitch->quaternion + (-> self control dir-targ) + s5-2 + (vector-y-quaternion! (new-stack-vector0) (-> self control dir-targ)) + ) + ) + ) + (else + (sound-play "mech-drag-pikup") + (forward-up-nopitch->quaternion + (-> self control dir-targ) + (vector-normalize! (vector-! (new-stack-vector0) (-> s5-1 point) (-> self control trans)) 1.0) + (vector-y-quaternion! (new-stack-vector0) (-> self control dir-targ)) + ) + ) + ) + ) + (else + (sound-play "mech-pickup-1") + ) + ) + ) + ) + (target-danger-set! 'harmless #f) + (cond + (gp-0 + (ja-channel-push! 1 (seconds 0.01)) + (ja-no-eval :group! jakb-mech-drag-pickup-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :num! (seek! (ja-aframe 8.0 0))) + (while (not (ja-done? 0)) + (set! f30-0 (seek f30-0 f28-0 (* 5.0 (seconds-per-frame)))) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) + (suspend) + (ja-eval) + ) + ) + ) + (let ((s4-11 (new 'stack-no-clear 'vector)) + (s5-6 (new 'stack-no-clear 'vector)) + ) + (when (send-event (handle->process (-> self carry other)) 'pickup (-> self carry) s4-11 s5-6) + (target-collide-set! 'mech-carry 0.0) + (when gp-0 + (sound-play "mech-drag-grab") + (let ((s3-6 (vector-! (new 'stack-no-clear 'vector) s4-11 (-> self control trans))) + (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) 'carry-info) + (let ((s4-12 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-37)))) + (vector-flatten! s3-6 s3-6 s5-6) + (let ((f0-43 (vector-length s3-6))) + (when (< 1228.8 f0-43) + (vector-normalize! s3-6 (+ -1228.8 f0-43)) + (move-by-vector! (-> self control) s3-6) + (vector+! (-> s4-12 hold-trans) (-> s4-12 hold-trans) s3-6) + ) + ) + ) + ) + (set-yaw-angle-clear-roll-pitch! (-> self control) (the-as float (-> self control unknown-word04))) + (rot->dir-targ! (-> self control)) + (go target-mech-carry-drag) + ) + (sound-play "mech-servo-up") + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (set! f30-0 (seek f30-0 f28-0 (* 5.0 (seconds-per-frame)))) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) + (suspend) + (ja-eval) + ) + (go target-mech-carry-stance) + ) + ) + (cond + (gp-0 + (ja-no-eval :num! (seek! 0.0)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + (else + (ja-no-eval :num! (seek! (ja-aframe 11.0 0))) + (while (not (ja-done? 0)) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) + (suspend) + (ja-eval) + ) + (suspend) + (ja-no-eval :num! (seek! 0.0)) + (while (not (ja-done? 0)) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) + (suspend) + (ja-eval) + ) + ) + ) + ) + (go target-mech-stance) + ) + :post (behavior () + (target-mech-post) + (carry-info-method-9 (-> self carry)) + (target-mech-carry-update) + ) + ) + +(defstate target-mech-carry-drop (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('change-mode 'end-mode) + #f + ) + (else + (target-mech-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self control mod-surface) *mech-walk-mods*) + (set-time! (-> self state-time)) + (set-forward-vel 0.0) + (set! (-> self mech stick-off) (the-as basic #t)) + ) + :exit (-> target-mech-carry-pickup exit) + :code (behavior () + (let ((f30-0 1.0) + (gp-1 (sound-play "mech-servo-down")) + ) + (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) 'carry-info) + (let ((a0-8 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-1)))) + (when a0-8 + (let ((s5-1 (new 'stack-no-clear 'vector))) + (set! (-> s5-1 quad) (-> a0-8 point quad)) + (set! (-> s5-1 y) (- (-> s5-1 y) (-> a0-8 process 0 control root-prim prim-core world-sphere w))) + (let ((s4-0 (new-stack-vector0)) + (f28-0 (vector-dot (-> self control local-normal) s5-1)) + ) + 0.0 + (vector-! s4-0 s5-1 (vector-float*! s4-0 (-> self control local-normal) f28-0)) + (let* ((f26-0 (vector-length s4-0)) + (f24-0 f26-0) + ) + (set! f30-0 (lerp-scale 1.0 0.0 f28-0 3072.0 7168.0)) + (vector+! + s5-1 + (vector-float*! s5-1 (-> self control local-normal) f28-0) + (vector-float*! s4-0 s4-0 (/ f26-0 f24-0)) + ) + ) + ) + ) + ) + ) + ) + (ja-channel-push! 2 (seconds 0.1)) + (ja :group! jakb-mech-carry-pickup-high-ja :num! max) + (ja :chan 1 :group! jakb-mech-carry-pickup-low-ja :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + (suspend) + (ja-no-eval :num! (seek! (ja-aframe 8.0 0))) + (while (not (ja-done? 0)) + (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) 'carry-info) + (let ((s5-5 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-10)))) + (when s5-5 + (if (< 20.0 (ja-aframe-num 0)) + (seek! (-> s5-5 grab-trans-blend) 1.0 (* 2.0 (seconds-per-frame))) + ) + (let ((s3-0 (-> s5-5 process 0 control)) + (s5-6 (new 'stack-no-clear 'collide-query)) + ) + (let ((s4-1 (new 'stack-no-clear 'inline-array 'sphere 1))) + (dotimes (s2-0 1) + ((method-of-type sphere new) (the-as symbol (-> s4-1 s2-0)) sphere) + ) + (set! (-> s4-1 0 quad) (-> s3-0 root-prim prim-core world-sphere quad)) + (let ((v1-66 s5-6)) + (set! (-> v1-66 best-dist) (the-as float s4-1)) + (set! (-> v1-66 best-other-prim) (the-as collide-shape-prim 1)) + (set! (-> v1-66 collide-with) (-> self control root-prim prim-core collide-with)) + (set! (-> v1-66 ignore-process0) #f) + (set! (-> v1-66 ignore-process1) #f) + (set! (-> v1-66 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-66 best-my-prim) (the-as collide-shape-prim #t)) + (set! (-> v1-66 action-mask) (collide-action solid)) + ) + ) + (format 0 "frame: ~f~%" (ja-frame-num 0)) + (when (and (fill-and-probe-using-spheres *collide-cache* s5-6) (< 12.5 (ja-frame-num 0))) + (sound-play "mech-setdown") + (let ((v1-73 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-73 command) (sound-command set-param)) + (set! (-> v1-73 id) gp-1) + (set! (-> v1-73 params volume) -4) + (set! (-> v1-73 auto-time) 48) + (set! (-> v1-73 auto-from) 2) + (set! (-> v1-73 params mask) (the-as uint 17)) + (-> v1-73 id) + ) + (set! gp-1 (sound-play "mech-servo-up")) + (let ((v1-77 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-77 command) (sound-command set-param)) + (set! (-> v1-77 id) gp-1) + (set! (-> v1-77 params volume) -4) + (set! (-> v1-77 auto-time) 192) + (set! (-> v1-77 auto-from) 2) + (set! (-> v1-77 params mask) (the-as uint 17)) + (-> v1-77 id) + ) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (go target-mech-carry-stance) + ) + ) + ) + ) + ) + (suspend) + (ja-eval) + ) + ) + (sound-play "mech-setdown") + (let ((v1-93 (vector-float*! (new 'stack-no-clear 'vector) (-> self control local-normal) 0.0))) + (vector+float*! v1-93 v1-93 (-> self control c-R-w fvec) 20480.0) + (send-event (handle->process (-> self carry other)) 'drop (-> self carry) v1-93) + ) + (target-collide-set! 'mech 0.0) + (ja-no-eval :num! (seek! 0.0)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (go target-mech-stance) + ) + :post (-> target-mech-carry-pickup post) + ) + +(defstate target-mech-carry-stance (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('change-mode) + (case (-> block param 0) + (('falling) + (if (and (-> self next-state) (= (-> self next-state name) 'target-mech-carry-drag)) + #f + (go target-mech-carry-falling) + ) + ) + (('grab) + (if (not (-> block param 1)) + #t + (go target-mech-grab) + ) + ) + ) + ) + (else + (target-mech-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self control mod-surface) *mech-stance-mods*) + (set! (-> self control mod-surface turnvv) 20024.889) + (set! (-> self control did-move-to-pole-or-max-jump-height) 0.0) + (rot->dir-targ! (-> self control)) + (set-time! (-> self state-time)) + ) + :exit (behavior () + ((-> target-mech-carry-pickup exit)) + (rot->dir-targ! (-> self control)) + ) + :trans (behavior () + (if (and (move-legs?) + (and (< (fabs + (deg-diff (quaternion-y-angle (-> self control dir-targ)) (vector-y-angle (-> self control to-target-pt-xz))) + ) + 1820.4445 + ) + (time-elapsed? (-> self control time-of-last-zero-input) (seconds 0.05)) + ) + ) + (go target-mech-carry-walk) + ) + (if (and (cpad-pressed? (-> self control cpad number) r1) + (time-elapsed? (-> self carry pickup-time) (seconds 0.1)) + ) + (go target-mech-carry-drop) + ) + (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) + ) + enter-state + (let ((a0-24 (-> *TARGET-bank* mech-carry-jump-height-min)) + (a1-3 (-> *TARGET-bank* mech-carry-jump-height-max)) + ) + (go target-mech-carry-jump a0-24 a1-3) + ) + ) + (if (and (cpad-pressed? (-> self control cpad number) square) (can-hands? #t) (mech-can-throw?)) + (go target-mech-carry-throw) + ) + (fall-test (the-as (state object target) target-mech-carry-falling) (-> *TARGET-bank* fall-height)) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (when (not (and v1-2 (= v1-2 jakb-mech-carry-turn45-ja))) + (ja-channel-push! 2 (seconds 0.2)) + (ja :group! jakb-mech-carry-turn45-ja :dist 8192.0) + (ja :chan 1 :group! jakb-mech-carry-stance-ja :dist 0.0) + ) + ) + (let ((f30-0 0.0)) + (until #f + (let ((f28-0 (y-angle (-> self control)))) + (deg-diff f28-0 (quaternion-y-angle (-> self control dir-targ))) + (suspend) + (let ((f28-1 (* (deg-diff f28-0 (y-angle (-> self control))) (-> self clock frames-per-second)))) + (set! f30-0 (if (< 910.2222 (fabs f28-1)) + (seek f30-0 1.0 (* 16.0 (seconds-per-frame))) + (seek f30-0 0.0 (* 6.0 (seconds-per-frame))) + ) + ) + (let* ((f0-9 (current-cycle-distance (-> self skel))) + (v1-26 (if (= f0-9 0.0) + 0.0 + (/ f28-1 f0-9) + ) + ) + (f0-11 v1-26) + ) + (ja :num! (loop! f0-11)) + ) + ) + ) + (let ((v1-32 (-> self skel root-channel 1)) + (f0-13 (- 1.0 f30-0)) + ) + (set! (-> v1-32 frame-interp 1) f0-13) + (set! (-> v1-32 frame-interp 0) f0-13) + ) + ) + ) + #f + ) + :post target-mech-carry-post + ) + +(defstate target-mech-carry-walk (target) + :event (-> target-mech-carry-stance event) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self control mod-surface) *mech-carry-walk-mods*) + (set! (-> self control unknown-word04) (the-as uint 0.0)) + ) + :exit (-> target-mech-carry-pickup exit) + :trans (behavior () + (let ((gp-0 (ja-group)) + (f0-0 (ja-aframe-num 0)) + ) + (when (if (or (and (= gp-0 jakb-mech-carry-walk-ja) (>= f0-0 5.5) (>= 9.5 f0-0)) + (and (= gp-0 jakb-mech-carry-walk-ja) (>= f0-0 20.5) (>= 24.5 f0-0)) + ) + #t + ) + (when (and (< 5.0 (the-as float (-> self control unknown-word04))) + (= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) + ) + (set-forward-vel 0.0) + (go target-mech-carry-stance) + ) + ) + ) + (if (and (cpad-pressed? (-> self control cpad number) r1) + (time-elapsed? (-> self carry pickup-time) (seconds 0.1)) + ) + (go target-mech-carry-drop) + ) + (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) + ) + enter-state + (let ((a0-24 (-> *TARGET-bank* mech-carry-jump-height-min)) + (a1-2 (-> *TARGET-bank* mech-carry-jump-height-max)) + ) + (go target-mech-carry-jump a0-24 a1-2) + ) + ) + (if (and (cpad-pressed? (-> self control cpad number) square) (can-hands? #t) (mech-can-throw?)) + (go target-mech-carry-throw) + ) + (fall-test (the-as (state object target) target-mech-carry-falling) (-> *TARGET-bank* fall-height)) + ) + :code (behavior () + (let ((f30-0 0.0)) + (let ((f28-0 (cond + ((zero? (-> self mech walk-anim-leg)) + (set! (-> self mech walk-anim-leg) 1) + 7.0 + ) + (else + (set! (-> self mech walk-anim-leg) 0) + 22.0 + ) + ) + ) + (v1-7 (ja-group)) + ) + (when (not (and v1-7 (= v1-7 jakb-mech-carry-walk-ja))) + (ja-channel-push! 2 (seconds 0.1)) + (ja :group! jakb-mech-carry-walk-ja + :num! (identity (ja-aframe f28-0 0)) + :dist (-> *TARGET-bank* mech-walk-carry-cycle-dist) + ) + (ja :chan 1 :group! jakb-mech-carry-stance-ja :dist 0.0) + ) + ) + (until #f + (if (< (-> self control ctrl-xz-vel) 4096.0) + (set-forward-vel 4096.0) + ) + (suspend) + (let* ((f0-4 (current-cycle-distance (-> self skel))) + (f28-1 (/ (-> self control ctrl-xz-vel) f0-4)) + ) + (set! (-> self control unknown-word04) + (the-as uint (+ (the-as float (-> self control unknown-word04)) f28-1)) + ) + (set! f30-0 + (seek f30-0 (lerp-scale 1.0 0.0 (-> self control ctrl-xz-vel) 0.0 8192.0) (* 2.0 (seconds-per-frame))) + ) + (ja :num! (loop! f28-1)) + ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + ) + ) + #f + ) + :post target-mech-carry-post + ) + +(defstate target-mech-carry-drag (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('push) + (when (zero? (-> self control sliding-start-time)) + (set! (-> self control sliding-start-time) (+ (current-time) (the-as time-frame (-> block param 0)))) + (let ((v0-0 (the-as object #t))) + (set! (-> self control unknown-word04) (the-as uint v0-0)) + v0-0 + ) + ) + ) + (('drop) + (logclear! (-> *cpad-list* cpads (-> self control cpad number) button0-abs 0) (pad-buttons r1)) + (logclear! (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) (pad-buttons r1)) + (send-event (handle->process (-> self carry other)) 'drop (-> self carry) *null-vector*) + (target-collide-set! 'mech 0.0) + (go target-mech-stance) + ) + (else + ((-> target-mech-carry-stance event) proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self control sliding-start-time) 0) + (set! (-> self control unknown-word04) (the-as uint #f)) + (set! (-> self control mod-surface) *mech-carry-drag-mods*) + (set-forward-vel 0.0) + ) + :exit (behavior () + (set! (-> self mech jump-thrust) 0.0) + (set! (-> self mech thruster-flame-width) 0.0) + (set! (-> self mech thruster-flame-length) 0.0) + (let ((v1-3 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-3 command) (sound-command set-param)) + (set! (-> v1-3 id) (-> self mech thrust-sound-id)) + (set! (-> v1-3 params volume) -4) + (set! (-> v1-3 auto-time) 48) + (set! (-> v1-3 auto-from) 2) + (set! (-> v1-3 params mask) (the-as uint 17)) + (-> v1-3 id) + ) + (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 mech drag-sound-id)) + (set! (-> v1-5 params volume) -4) + (set! (-> v1-5 auto-time) 48) + (set! (-> v1-5 auto-from) 2) + (set! (-> v1-5 params mask) (the-as uint 17)) + (-> v1-5 id) + ) + ((-> target-mech-carry-pickup exit)) + ) + :trans (behavior () + (when (and (not (cpad-hold? (-> self control cpad number) r1)) + (time-elapsed? (-> self carry pickup-time) (seconds 0.5)) + ) + (sound-play "mech-drag-off") + (if (or (and (>= (-> self mech back-touch-time) (-> self state-time)) + (< (vector-vector-distance (-> self control trans) (-> self mech back-touch-trans)) 4096.0) + ) + (let ((gp-1 (new 'stack-no-clear 'collide-query))) + (let ((s5-1 (new 'stack-no-clear 'inline-array 'sphere 1))) + (dotimes (s4-0 1) + ((method-of-type sphere new) (the-as symbol (-> s5-1 s4-0)) sphere) + ) + (set! (-> s5-1 0 quad) (-> self control collision-spheres 0 prim-core world-sphere quad)) + (vector+float*! (the-as vector (-> s5-1 0)) (the-as vector (-> s5-1 0)) (-> self control c-R-w fvec) -4096.0) + (set! (-> s5-1 0 r) (-> self control collision-spheres 0 prim-core world-sphere w)) + (let ((v1-30 gp-1)) + (set! (-> v1-30 best-dist) (the-as float s5-1)) + (set! (-> v1-30 best-other-prim) (the-as collide-shape-prim 1)) + (set! (-> v1-30 collide-with) (-> self control root-prim prim-core collide-with)) + (set! (-> v1-30 ignore-process0) #f) + (set! (-> v1-30 ignore-process1) #f) + (set! (-> v1-30 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-30 best-my-prim) (the-as collide-shape-prim #t)) + (set! (-> v1-30 action-mask) (collide-action solid)) + ) + ) + (fill-and-probe-using-spheres *collide-cache* gp-1) + ) + ) + (send-event self 'push (seconds 0.5)) + (send-event self 'drop) + ) + ) + ) + :code (behavior () + (let ((f28-0 0.0) + (f30-0 0.0) + ) + (until #f + (let ((f0-2 + (* (vector-dot (-> self control to-target-pt-xz) (-> self control c-R-w fvec)) + (-> self control turn-to-magnitude) + ) + ) + (f26-0 0.0) + ) + (if (and (nonzero? (-> self control sliding-start-time)) (< (-> self control sliding-start-time) (current-time))) + (send-event self 'drop) + (set! f28-0 (cond + ((nonzero? (-> self control sliding-start-time)) + (let ((v1-17 (ja-group))) + (when (not (and v1-17 (= v1-17 jakb-mech-push-ja))) + (let ((v1-23 (ja-group))) + (if (and v1-23 (= v1-23 jakb-mech-pull-ja)) + (set! f26-0 (ja-aframe-num 0)) + ) + ) + (sound-play "mech-drag-push") + (ja-channel-push! 1 (seconds 0.3)) + (ja :group! jakb-mech-push-ja :num! (identity (ja-aframe f26-0 0)) :dist 16384.0) + ) + ) + (when (-> self control unknown-spool-anim00) + (set! (-> self control unknown-word04) (the-as uint #f)) + (set! f28-0 32768.0) + ) + (seek f28-0 0.0 (* 65536.0 (seconds-per-frame))) + ) + ((< 0.0 f0-2) + (let ((v1-47 (ja-group))) + (when (not (and v1-47 (= v1-47 jakb-mech-push-ja))) + (let ((v1-53 (ja-group))) + (if (and v1-53 (= v1-53 jakb-mech-pull-ja)) + (set! f26-0 (ja-aframe-num 0)) + ) + ) + (sound-play "mech-drag-push") + (ja-channel-push! 1 (seconds 0.3)) + (ja :group! jakb-mech-push-ja :num! (identity (ja-aframe f26-0 0)) :dist 16384.0) + ) + ) + (seek f28-0 49152.0 (* 24576.0 (seconds-per-frame))) + ) + ((< f0-2 0.0) + (let ((v1-71 (ja-group))) + (when (not (and v1-71 (= v1-71 jakb-mech-pull-ja))) + (let ((v1-77 (ja-group))) + (if (and v1-77 (= v1-77 jakb-mech-push-ja)) + (set! f26-0 (ja-aframe-num 0)) + ) + ) + (sound-play "mech-drag-pull") + (ja-channel-push! 1 (seconds 0.3)) + (ja :group! jakb-mech-pull-ja :num! (identity (ja-aframe f26-0 0)) :dist 16384.0) + ) + ) + (seek f28-0 -49152.0 (* 24576.0 (seconds-per-frame))) + ) + (else + (seek f28-0 0.0 (* 32768.0 (seconds-per-frame))) + ) + ) + ) + ) + ) + (set! f30-0 + (seek + f30-0 + (lerp-scale + 0.0 + 1.0 + (* (vector-vector-distance (-> self control trans) (-> self control trans-old-old)) + (-> self clock frames-per-second) + ) + 0.0 + 49152.0 + ) + (* 2.0 (seconds-per-frame)) + ) + ) + (sound-play-by-name + (static-sound-name "mech-drag-grind") + (-> self mech drag-sound-id) + (the int (* 1024.0 f30-0)) + 0 + 0 + (sound-group) + #t + ) + (set-forward-vel f28-0) + (let* ((f0-24 (current-cycle-distance (-> self skel))) + (f26-1 (/ f28-0 (* 2.0 f0-24))) + ) + (seek! + (-> self mech jump-thrust) + (lerp-scale 0.0 245760.0 (fabs f28-0) 0.0 49152.0) + (* 491520.0 (seconds-per-frame)) + ) + (let ((v1-114 (ja-group))) + (if (and v1-114 (or (= v1-114 jakb-mech-push-ja) (= v1-114 jakb-mech-pull-ja))) + (ja :num! (loop! f26-1)) + ) + ) + ) + (suspend) + 0 + ) + ) + #f + ) + :post target-mech-carry-post + ) + +(defstate target-mech-carry-falling (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (let ((v0-0 (target-mech-bonk-event-handler proc argc message block))) + (cond + (v0-0 + (empty) + v0-0 + ) + (else + ((-> target-mech-carry-stance event) proc argc message block) + ) + ) + ) + ) + :enter (behavior () + (set! (-> self control mod-surface) *mech-carry-jump-mods*) + (set-time! (-> self state-time)) + ) + :exit (-> target-mech-carry-pickup exit) + :trans (behavior () + (if (logtest? (-> self control status) (collide-status on-surface)) + (go target-mech-carry-hit-ground #f) + ) + (when (if (and (< (target-move-dist (-> *TARGET-bank* stuck-time)) (-> *TARGET-bank* stuck-distance)) + (time-elapsed? (-> self state-time) (seconds 0.05)) + (not (and *cheat-mode* (cpad-hold? (-> self control cpad number) r2))) + ) + #t + ) + (logior! (-> self control status) (collide-status on-surface)) + (go target-mech-carry-hit-ground 'stuck) + ) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 jakb-mech-carry-jump-loop-ja)) + ) + (else + (ja-channel-push! 1 (seconds 0.33)) + (ja :group! jakb-mech-carry-jump-loop-ja) + (while (!= (-> self skel root-channel 0) (-> self skel channel)) + (suspend) + ) + ) + ) + ) + (ja-no-eval :group! jakb-mech-carry-jump-loop-ja :num! (loop!) :frame-num 0.0) + (until #f + (suspend) + (ja :group! jakb-mech-carry-jump-loop-ja :num! (loop!)) + ) + #f + ) + :post target-mech-carry-post + ) + +(defstate target-mech-carry-hit-ground (target) + :event (-> target-mech-carry-falling event) + :enter (behavior ((arg0 symbol)) + (let ((v1-0 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-0 command) (sound-command set-param)) + (set! (-> v1-0 id) (-> self mech thrust-sound-id)) + (set! (-> v1-0 params volume) -4) + (set! (-> v1-0 auto-time) 48) + (set! (-> v1-0 auto-from) 2) + (set! (-> v1-0 params mask) (the-as uint 17)) + (-> v1-0 id) + ) + (rot->dir-targ! (-> self control)) + (cond + ((= arg0 'stuck) + ) + (else + (target-land-effect) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.3)) + ) + ) + (set! (-> self control last-running-attack-end-time) 0) + (set! (-> self control last-attack-end-time) 0) + (if (!= (-> self control ground-pat material) (pat-material ice)) + (delete-back-vel) + ) + (set! (-> self control mod-surface) *mech-stance-mods*) + (set! (-> self control mod-surface turnvv) 0.0) + (start-bobbing! + (-> self water) + (lerp-scale 0.0 4096.0 (-> self control ground-impact-vel) 40960.0 102400.0) + 600 + 1500 + ) + ) + :exit (behavior () + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still)) + ((-> target-mech-carry-pickup exit)) + ) + :trans (behavior () + (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) + ) + enter-state + (let ((a0-16 (-> *TARGET-bank* mech-carry-jump-height-min)) + (a1-2 (-> *TARGET-bank* mech-carry-jump-height-max)) + ) + (go target-mech-carry-jump a0-16 a1-2) + ) + ) + (if (and (!= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) + (let ((v1-26 (ja-group))) + (and (and v1-26 (= v1-26 jakb-mech-carry-jump-land-ja)) (>= (ja-aframe-num 0) 30.0)) + ) + ) + (go target-mech-carry-walk) + ) + (fall-test (the-as (state object target) target-mech-carry-falling) (-> *TARGET-bank* fall-height)) + ) + :code (behavior ((arg0 symbol)) + (target-hit-ground-anim #f (are-still?)) + (go target-mech-carry-stance) + ) + :post target-mech-carry-post + ) + +(defstate target-mech-carry-jump (target) + :event (-> target-mech-carry-falling event) + :enter (behavior ((arg0 float) (arg1 float)) + (set-time! (-> self state-time)) + (init-var-jump arg0 arg1 #t #f (-> self control transv) 2.0) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (sound-play "mech-jump") + (set! (-> self control mod-surface) *mech-carry-jump-mods*) + (set! (-> self control unknown-float36) + (fmax 0.0 (fmin 1.0 (* 0.00004359654 (+ -11468.8 (-> self control ctrl-xz-vel))))) + ) + ) + :exit (behavior () + (rot->dir-targ! (-> self control)) + ((-> target-mech-carry-pickup exit)) + (set! (-> self mech jump-thrust) 0.0) + (set! (-> self mech thruster-flame-width) 0.0) + (set! (-> self mech thruster-flame-length) 0.0) + (target-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))) + ) + ) + ((-> target-mech-carry-falling trans)) + (mod-var-jump #t #f (cpad-hold? (-> self control cpad number) x) (-> self control transv)) + (cond + ((>= (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 0.0) + (set! (-> self mech jump-thrust) 0.0) + ) + (else + (set! (-> self mech jump-thrust) 0.0) + (set! (-> self mech thruster-flame-width) 0.0) + (set! (-> self mech thruster-flame-length) 0.0) + ) + ) + ) + :code (behavior ((arg0 float) (arg1 float)) + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! jakb-mech-carry-jump-ja :num! min) + (suspend) + (ja :group! jakb-mech-carry-jump-ja :num! (+!)) + (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-27 (and (< 0.0 f30-0) (< 0.0 f0-4)))) + (set! (-> gp-1 param 1) + (if v1-27 + (fmin (fmin 3.0 f0-4) (/ (* 5.0 f0-4) (the float (time-to-apex f30-0 -245760.0)))) + 1.8 + ) + ) + ) + (joint-control-channel-group-eval! gp-1 (the-as art-joint-anim #f) num-func-seek!) + ) + (suspend) + ) + (go target-mech-carry-falling) + ) + :post target-mech-carry-post + ) + +(defstate target-mech-carry-throw (target) + :event (-> target-mech-carry-drop event) + :enter (behavior () + (set! (-> self control mod-surface) *mech-walk-mods*) + (set-time! (-> self state-time)) + (set-forward-vel 0.0) + (set! (-> self mech stick-off) (the-as basic #t)) + ) + :exit (-> target-mech-carry-pickup exit) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-mech-carry-throw-ja :num! (seek! (ja-aframe 16.0 0)) :frame-num 0.0) + (until (ja-done? 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) 'carry-info) + (let ((gp-1 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-3)))) + (if gp-1 + (seek! (-> gp-1 grab-trans-blend) 1.0 (* 4.0 (seconds-per-frame))) + ) + ) + ) + (suspend) + (ja :num! (seek! (ja-aframe 16.0 0))) + ) + (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) 'carry-info) + (let ((v1-30 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-7)))) + (when v1-30 + (let ((s4-0 (-> v1-30 process 0 control)) + (gp-3 (new 'stack-no-clear 'collide-query)) + ) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'sphere 1))) + (dotimes (s3-0 1) + ((method-of-type sphere new) (the-as symbol (-> s5-0 s3-0)) sphere) + ) + (set! (-> s5-0 0 quad) (-> s4-0 root-prim prim-core world-sphere quad)) + (let ((v1-38 gp-3)) + (set! (-> v1-38 best-dist) (the-as float s5-0)) + (set! (-> v1-38 best-other-prim) (the-as collide-shape-prim 1)) + (set! (-> v1-38 collide-with) (-> self control root-prim prim-core collide-with)) + (set! (-> v1-38 ignore-process0) #f) + (set! (-> v1-38 ignore-process1) #f) + (set! (-> v1-38 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-38 best-my-prim) (the-as collide-shape-prim #t)) + (set! (-> v1-38 action-mask) (collide-action solid)) + ) + ) + (when (fill-and-probe-using-spheres *collide-cache* gp-3) + (ja-no-eval :num! (seek! 0.0)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (go target-mech-carry-stance) + ) + ) + ) + ) + ) + (let ((v1-48 (vector-float*! (new 'stack-no-clear 'vector) (-> self control local-normal) 2048.0))) + (vector+float*! v1-48 v1-48 (-> self control c-R-w fvec) 131072.0) + (send-event (handle->process (-> self carry other)) 'drop (-> self carry) v1-48) + ) + (target-collide-set! 'normal 0.0) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (go target-mech-stance) + ) + :post (-> target-mech-carry-pickup post) + ) + +(defstate target-mech-get-on (target) + :event target-generic-event-handler + :exit (behavior () + (target-mech-exit) + (set! (-> self mech stick-off) #f) + (set! (-> self neck flex-blend) 1.0) + (logclear! (-> self target-flags) (target-flags tf5)) + ) + :code (behavior ((arg0 handle)) + (logior! (-> self target-flags) (target-flags tf5)) + (ja-channel-set! 1) + (set! (-> self control mod-surface) *empty-mods*) + (send-event (ppointer->process (-> self manipy)) 'draw #t) + (set! (-> self neck flex-blend) 0.0) + (set! (-> self control unknown-vector37 quad) (-> self control trans quad)) + (set! (-> self control unknown-vector38 quad) (-> self control trans quad)) + (set! (-> self control unknown-vector39 quad) (-> self control quat quad)) + (set! (-> self control unknown-vector40 quad) (-> self control quat quad)) + (let* ((gp-1 (handle->process arg0)) + (v1-23 (if (type? gp-1 process-drawable) + gp-1 + ) + ) + ) + (when v1-23 + (set! (-> self control unknown-vector38 quad) (-> (the-as process-drawable v1-23) root trans quad)) + (set! (-> self control unknown-vector40 quad) (-> (the-as process-drawable v1-23) root quat quad)) + ) + ) + (set! (-> self mech mech-trans quad) (-> self control unknown-vector38 quad)) + (quaternion-copy! + (the-as quaternion (-> self mech mech-quat)) + (the-as quaternion (-> self control unknown-vector40)) + ) + (set! (-> self mech mech-scale quad) (-> self control scale quad)) + (set! (-> self mech stick-off) (the-as basic #t)) + (ja-no-eval :group! jakb-mech-get-on-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((f30-0 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 70.0 80.0)))) + (let ((f28-0 (lerp-scale 0.0 1.0 (ja-aframe-num 0) 70.0 80.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) + ) + ) + (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)) + (set! (-> self alt-cam-pos quad) (-> self control camera-pos quad)) + (suspend) + (ja :num! (seek!)) + ) + (go target-mech-stance) + ) + :post (behavior () + (target-no-move-post) + (target-mech-effect) + ) + ) + +(defstate target-mech-get-up (target) + :event target-generic-event-handler + :exit (behavior () + (target-mech-exit) + (set! (-> self mech stick-off) #f) + (set! (-> self neck flex-blend) 1.0) + (logclear! (-> self target-flags) (target-flags tf5)) + ) + :code (behavior ((arg0 handle)) + (logior! (-> self target-flags) (target-flags tf5)) + (ja-channel-set! 1) + (set! (-> self control mod-surface) *empty-mods*) + (send-event (ppointer->process (-> self manipy)) 'draw #t) + (set! (-> self neck flex-blend) 0.0) + (set! (-> self control unknown-vector37 quad) (-> self control trans quad)) + (set! (-> self control unknown-vector38 quad) (-> self control trans quad)) + (set! (-> self control unknown-vector39 quad) (-> self control quat quad)) + (set! (-> self control unknown-vector40 quad) (-> self control quat quad)) + (let* ((gp-1 (handle->process arg0)) + (v1-23 (if (type? gp-1 process-drawable) + gp-1 + ) + ) + ) + (when v1-23 + (set! (-> self control unknown-vector38 quad) (-> (the-as process-drawable v1-23) root trans quad)) + (set! (-> self control unknown-vector40 quad) (-> (the-as process-drawable v1-23) root quat quad)) + ) + ) + (set! (-> self mech mech-trans quad) (-> self control unknown-vector38 quad)) + (quaternion-copy! + (the-as quaternion (-> self mech mech-quat)) + (the-as quaternion (-> self control unknown-vector40)) + ) + (set! (-> self mech mech-scale quad) (-> self control scale quad)) + (set! (-> self mech stick-off) (the-as basic #t)) + (ja-no-eval :group! jakb-mech-get-on-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((f30-0 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 70.0 80.0)))) + (let ((f28-0 (lerp-scale 0.0 1.0 (ja-aframe-num 0) 70.0 80.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) + ) + ) + (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)) + (set! (-> self alt-cam-pos quad) (-> self control camera-pos quad)) + (suspend) + (ja :num! (seek!)) + ) + (go target-mech-stance) + ) + :post (behavior () + (target-no-move-post) + (target-mech-effect) + ) + ) + +(defstate target-mech-shield (target) + :event target-mech-handler + :enter (behavior () + (vector-reset! (-> self control transv)) + (set! (-> self mech stick-off) (the-as basic #t)) + (send-event (handle->process (-> self mech shield-handle)) 'enabled) + ) + :exit (behavior () + (set! (-> self mech stick-off) #f) + (send-event (handle->process (-> self mech shield-handle)) 'disabled) + (sound-stop (-> self mech shield-sound-id)) + ) + :trans (behavior () + (sound-play "mech-shieldloop" :id (-> self mech shield-sound-id)) + (if (or (not (handle->process (-> self mech shield-handle))) + (not (logtest? (-> *cpad-list* cpads (-> self control cpad number) button0-abs 0) (pad-buttons circle))) + ) + (go target-mech-stance) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-mech-get-off-ja :num! (seek! (ja-aframe 30.0 0)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 30.0 0))) + ) + (sleep-code) + ) + :post target-mech-post + ) + +(defstate target-mech-get-off (target) + :event target-generic-event-handler + :exit (behavior () + ((-> target-mech-start exit)) + (logclear! (-> self target-flags) (target-flags tf5)) + ) + :code (behavior () + (logior! (-> self target-flags) (target-flags tf5)) + (set! (-> self control mod-surface) *empty-mods*) + (rot->dir-targ! (-> self control)) + (set-setting! 'slave-options 'clear 0.0 (cam-slave-options BIKE_MODE)) + (remove-setting! 'fov) + (remove-setting! 'head-offset) + (send-event *camera* 'set-dist #f #f) + (set! (-> self neck flex-blend) 0.0) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-mech-get-off-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (when (< 51.0 (ja-aframe-num 0)) + (logior! (-> self target-flags) (target-flags tf6)) + (vector<-cspace! (-> self alt-cam-pos) (joint-node jakb-lod0-jg Rankle)) + ) + (suspend) + (ja :num! (seek!)) + ) + (process-spawn + mech + :init mech-init + (-> self mech entity) + (-> self control trans) + (process->handle self) + (-> self mech shield-value) + :name "mech" + :to self + ) + (rot->dir-targ! (-> self control)) + (ja-post) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (vector<-cspace! gp-1 (joint-node jakb-lod0-jg main)) + (+! (-> gp-1 y) -9011.2) + (move-to-point! (-> self control) gp-1) + ) + (send-event *camera* 'ease-in) + (ja-channel-set! 0) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (let ((v1-66 (new-stack-vector0))) + (let ((f0-13 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-66 (-> self control transv) (vector-float*! v1-66 (-> self control dynam gravity-normal) f0-13)) + ) + (let* ((f0-14 (vector-length v1-66)) + (f1-2 f0-14) + (f2-0 -49152.0) + (a0-36 (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f2-0) + (vector-float*! v1-66 v1-66 (/ f0-14 f1-2)) + ) + ) + ) + (go target-falling a0-36) + ) + ) + ) + :post (-> target-mech-get-on post) + ) + +(defstate target-mech-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-mech-stance) + ) + ) + ) + (('clone-anim) + (go target-mech-clone-anim (process->handle (the-as process (-> block param 0)))) + ) + (else + (target-generic-event-handler proc argc message block) + ) + ) + ) + ) + ) + :enter (behavior () + (set! (-> self control mod-surface) *grab-mods*) + (set! (-> self neck flex-blend) 0.0) + (logior! (-> self target-flags) (target-flags tf2)) + (logior! (-> self focus-status) (focus-status grabbed)) + (set! (-> self mech stick-off) (the-as basic #t)) + (sound-stop (-> self mech engine-sound-id)) + (sound-stop (-> self mech thrust-sound-id)) + (sound-stop (-> self mech drag-sound-id)) + (sound-stop (-> self mech whine-sound-id)) + ) + :exit (behavior () + (target-effect-exit) + (set! (-> self mech stick-off) #f) + (logclear! (-> self target-flags) (target-flags tf2)) + (logclear! (-> self focus-status) (focus-status grabbed)) + (logclear! (-> self water flags) (water-flag jump-out)) + ((-> target-mech-start exit)) + ) + :code (-> target-mech-stance code) + :post target-mech-post + ) + +(defstate target-mech-clone-anim (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (if (and (= message 'trans) (= (-> block param 0) 'restore)) + (set! (-> self control unknown-word04) (the-as uint #f)) + ) + ((-> target-mech-grab event) proc argc message block) + ) + :enter (-> target-clone-anim enter) + :exit (behavior () + (set! (-> self control draw-offset y) (the-as float (-> self control unknown-word04))) + (set! (-> self control cspace-offset y) (-> self control draw-offset y)) + (send-event (ppointer->process (-> self sidekick)) 'matrix #f) + ((-> target-clone-anim exit)) + ((-> target-mech-start exit)) + (vector-reset! (-> self control transv)) + ) + :code (behavior ((arg0 handle)) + (set! (-> self control unknown-word04) (the-as uint (-> self control draw-offset y))) + (set! (-> self control draw-offset y) 0.0) + (send-event (ppointer->process (-> self sidekick)) 'matrix 'play-anim) + (clone-anim arg0 #t "") + (go target-mech-stance) + ) + :post (behavior () + (vector+! (-> self mech mech-trans) (-> self control trans) (-> self control cspace-offset)) + (quaternion-copy! (the-as quaternion (-> self mech mech-quat)) (-> self control quat)) + (set! (-> self mech mech-scale quad) (-> self control scale quad)) + (target-no-ja-move-post) + ) + ) diff --git a/goal_src/jak3/engine/target/mech/mech.gc b/goal_src/jak3/engine/target/mech/mech.gc index 802e92e8e3..bccafdc98d 100644 --- a/goal_src/jak3/engine/target/mech/mech.gc +++ b/goal_src/jak3/engine/target/mech/mech.gc @@ -7,3 +7,482 @@ ;; DECOMP BEGINS +(deftype mech (process-drawable) + ((root collide-shape-moving :override) + (extra-trans vector :inline) + (condition int32) + (shadow-backup shadow-geo) + (rider handle) + (shield-value float) + (nav-sphere-handle handle) + (probe-time time-frame) + ) + (:state-methods + wait-for-start + idle + (pickup (state mech)) + wait-for-return + ) + (:methods + (mech-method-24 (_type_) none) + ) + ) + + +(defmethod mech-method-24 ((this mech)) + (if (nonzero? (-> this part)) + (spawn (-> this part) (-> this root trans)) + ) + (update! (-> this sound)) + 0 + (none) + ) + +(defstate wait-for-start (mech) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack 'bonk) + (send-event proc 'target-mech-get-off (seconds 0.3)) + (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)) + ) + ) + ) + (the-as structure #f) + ) + (('touch) + (send-event proc 'target-mech-get-off (seconds 0.3)) + (send-shoves (-> self root) proc (the-as touching-shapes-entry (-> block param 0)) 0.7 6144.0 16384.0) + (the-as structure #f) + ) + (('trans) + (vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans)) + ) + (('shadow) + (cond + ((-> block param 0) + (let ((v0-2 (the-as structure (-> self shadow-backup)))) + (set! (-> self draw shadow) (the-as shadow-geo v0-2)) + v0-2 + ) + ) + (else + (set! (-> self draw shadow) #f) + (the-as structure #f) + ) + ) + ) + ) + ) + :exit (behavior () + (set! (-> self root root-prim prim-core action) (collide-action)) + (set! (-> self root penetrated-by) (the-as penetrate -1)) + ) + :code (behavior () + (go-virtual idle) + ) + ) + +(defstate idle (mech) + :virtual #t + :event (-> (method-of-type mech wait-for-start) event) + :enter (behavior () + (set! (-> self nav-sphere-handle) (the-as handle #f)) + (let ((s5-0 (find-nearest-nav-mesh (-> self root trans) 8192.0))) + (when s5-0 + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-z-quaternion! gp-0 (-> self root quat)) + (vector-normalize! gp-0 5120.0) + (vector+! gp-0 gp-0 (-> self root trans)) + (set! (-> self nav-sphere-handle) + (ppointer->handle + (process-spawn simple-nav-sphere #x46266666 gp-0 s5-0 -1 :name "simple-nav-sphere" :to self) + ) + ) + ) + ) + ) + ) + :exit (behavior () + (send-event (handle->process (-> self nav-sphere-handle)) 'die-fast) + ((-> (method-of-type mech wait-for-start) exit)) + ) + :code (behavior () + (change-parent self *entity-pool*) + (ja-channel-set! 1) + (ja :group! mech-mech-idle-ja) + (set! (-> self root root-prim prim-core action) (collide-action solid can-ride no-standon)) + (set! (-> self root penetrated-by) (penetrate)) + 0.0 + (let ((f30-0 20480.0)) + (until #f + (when (and (logtest? (-> self draw status) (draw-control-status on-screen)) + (time-elapsed? (-> self probe-time) (seconds 1)) + ) + (move-to-ground + (-> self root) + 8192.0 + 40960.0 + #t + (collide-spec backgnd obstacle hit-by-player-list hit-by-others-list pusher) + ) + (set-time! (-> self probe-time)) + ) + (when (and (and *target* (and (>= f30-0 (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (not (focus-test? *target* in-head pole light board mech dark)) + (can-display-query? self "mech" -99.0) + (-> *setting-control* user-current pilot) + ) + (let ((gp-0 + (new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-31 gp-0)) + (set! (-> v1-31 width) (the float 340)) + ) + (let ((v1-32 gp-0)) + (set! (-> v1-32 height) (the float 80)) + ) + (let ((v1-33 gp-0) + (a0-19 (-> *setting-control* user-default language)) + ) + (set! (-> v1-33 scale) (if (or (= a0-19 (language-enum korean)) (= a0-19 (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) + ) + ) + (if (and (cpad-pressed? 0 triangle) (send-event *target* 'change-mode 'mech self (-> self shield-value))) + (go-virtual pickup (method-of-object self wait-for-return)) + ) + ) + (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 + ) + ) + (mech-method-24 self) + (suspend) + ) + ) + #f + ) + :post ja-post + ) + +(defstate pickup (mech) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('draw) + (ja-channel-set! 1) + (ja :group! mech-mech-idle-ja) + (set! (-> self root root-prim prim-core action) (collide-action solid can-ride no-standon)) + (set! (-> self root penetrated-by) (penetrate)) + (transform-post) + ) + (('trans) + (vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans)) + ) + (('touch 'attack 'bonk) + #f + ) + (('shadow) + (cond + ((-> block param 0) + (let ((v0-1 (the-as object (-> self shadow-backup)))) + (set! (-> self draw shadow) (the-as shadow-geo v0-1)) + v0-1 + ) + ) + (else + (set! (-> self draw shadow) #f) + #f + ) + ) + ) + ) + ) + :enter (behavior ((arg0 (state mech))) + (let ((t9-0 (-> arg0 enter))) + (if t9-0 + (t9-0) + ) + ) + ) + :code (behavior ((arg0 (state mech))) + (ja-channel-set! 0) + (ja-post) + (while (zero? (ja-group-size)) + (if (or (not *target*) (or (< 24576.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (focus-test? *target* teleporting) + ) + ) + (go arg0) + ) + (mech-method-24 self) + (suspend) + ) + (while (and *target* (focus-test? *target* mech)) + (mech-method-24 self) + (suspend) + ) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (seconds 1)) + (mech-method-24 self) + (suspend) + ) + ) + (go arg0) + ) + ) + +(defstate wait-for-return (mech) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trans) + (vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans)) + ) + (('shadow) + (cond + ((-> block param 0) + (let ((v0-1 (the-as structure (-> self shadow-backup)))) + (set! (-> self draw shadow) (the-as shadow-geo v0-1)) + v0-1 + ) + ) + (else + (set! (-> self draw shadow) #f) + (the-as structure #f) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-set! 0) + (ja-post) + (cleanup-for-death self) + ) + ) + +(defbehavior mech-init mech ((arg0 entity-actor) (arg1 matrix3) (arg2 handle) (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 ((v1-6 (new 'process 'collide-shape-prim-sphere s2-0 (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-6 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-6 prim-core action) (collide-action solid can-ride no-standon)) + (set! (-> v1-6 transform-index) 0) + (set-vector! (-> v1-6 local-sphere) 0.0 6553.6 5324.8 6553.6) + (set! (-> s2-0 total-prims) (the-as uint 1)) + (set! (-> s2-0 root-prim) v1-6) + ) + (set! (-> s2-0 nav-radius) (* 0.75 (-> s2-0 root-prim local-sphere w))) + (let ((v1-9 (-> s2-0 root-prim))) + (set! (-> s2-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s2-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> self root) s2-0) + ) + (set! (-> self rider) arg2) + (when arg0 + (process-entity-set! self arg0) + (process-drawable-from-entity! self arg0) + (set-yaw-angle-clear-roll-pitch! (-> self root) (res-lump-float arg0 'rotoffset)) + ) + (when arg1 + (set! (-> self root trans quad) (-> arg1 vector 0 quad)) + (quaternion-copy! (-> self root quat) (the-as quaternion (-> arg1 vector 1))) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-mech" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self shadow-backup) (-> self draw shadow)) + (set! (-> self draw shadow-ctrl) *mech-shadow-control*) + (let ((v1-27 (-> self node-list data))) + (set! (-> v1-27 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!)) + (set! (-> v1-27 0 param1) (the-as basic (-> self root trans))) + (set! (-> v1-27 0 param2) (the-as basic (-> self extra-trans))) + ) + (set! (-> self condition) (res-lump-value arg0 'index int :time -1000000000.0)) + (set! (-> self fact) + (new 'process 'fact-info self (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc)) + ) + (set! (-> self shield-value) arg3) + (set! (-> self nav-sphere-handle) (the-as handle #f)) + (if (-> self entity) + (move-to-ground + (-> self root) + 8192.0 + 40960.0 + #t + (collide-spec backgnd obstacle hit-by-player-list hit-by-others-list pusher) + ) + ) + (set! (-> self sound) + (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) + (go-virtual idle) + (go-virtual wait-for-start) + ) + ) + +(defmethod init-from-entity! ((this mech) (arg0 entity-actor)) + (mech-init arg0 (the-as matrix3 #f) (the-as handle #f) 100.0) + ) + +(deftype mech-target (process-drawable) + ((parent (pointer target) :override) + ) + (:state-methods + idle + active + ) + ) + + +(defskelgroup skel-mech-target mech mech-target-lod0-jg mech-target-idle-ja + ((mech-target-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defstate idle (mech-target) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('look-at-point) + (set-time! (-> self state-time)) + (go-virtual active) + ) + ) + ) + :trans (behavior () + (if (and (and *target* (and (>= 98304.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (focus-test? *target* mech) + ) + (go-virtual active) + ) + ) + :code (behavior () + (while (< 0.0 (-> self root scale x)) + (seek! (-> self root scale x) 0.0 (* 8.0 (seconds-per-frame))) + (set! (-> self root scale y) (-> self root scale x)) + (ja-post) + (suspend) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (ja-post) + (sleep-code) + ) + ) + +(defstate active (mech-target) + :virtual #t + :event (-> (method-of-type mech-target idle) event) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (and (or (or (not *target*) (or (< 106496.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (focus-test? *target* teleporting) + ) + ) + (not (logtest? (focus-status mech) (-> *target* focus-status))) + ) + (time-elapsed? (-> self state-time) (seconds 10)) + ) + (go-virtual idle) + ) + ) + :code (behavior () + (sound-play "mech-target") + (let ((f30-0 0.0)) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (while (< (-> self root scale x) 1.0) + (seek! (-> self root scale x) 1.0 (* 8.0 (seconds-per-frame))) + (set! (-> self root scale y) (-> self root scale x)) + (set! f30-0 (seek f30-0 1.0 (* 2.0 (seconds-per-frame)))) + (ja :num! (loop! f30-0)) + (ja-post) + (suspend) + ) + (until #f + (set! f30-0 (seek f30-0 1.0 (* 0.25 (seconds-per-frame)))) + (ja :num! (loop! f30-0)) + (ja-post) + (suspend) + ) + ) + #f + ) + ) + +(defbehavior mech-target-init mech ((arg0 vector) (arg1 quaternion) (arg2 entity-actor)) + (process-entity-set! self arg2) + (when (not (and (-> self level) (logtest? (level-flags lf16) (-> self level info level-flags)))) + (dotimes (v1-4 (-> *level* length)) + (let ((a0-7 (-> *level* level v1-4))) + (when (= (-> a0-7 status) 'active) + (when (logtest? (level-flags lf16) (-> a0-7 info level-flags)) + (set! (-> self level) a0-7) + (goto cfg-12) + ) + ) + ) + ) + ) + (label cfg-12) + (set! (-> self root) (the-as collide-shape-moving (new 'process 'trsqv))) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-copy! (-> self root quat) arg1) + (set! (-> self root scale x) 0.0) + (set! (-> self root scale y) 0.0) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-mech-target" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go-virtual wait-for-start) + ) + +;; WARN: Return type mismatch (pointer process) vs (pointer mech-target). +(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/goal_src/jak3/engine/target/mech/target-mech.gc b/goal_src/jak3/engine/target/mech/target-mech.gc index 301c646aee..e56322c416 100644 --- a/goal_src/jak3/engine/target/mech/target-mech.gc +++ b/goal_src/jak3/engine/target/mech/target-mech.gc @@ -7,3 +7,1811 @@ ;; DECOMP BEGINS +(deftype mech-shield (shield-sphere) + () + ) + + +(defbehavior mech-shield-init-by-other mech-shield ((arg0 shield-sphere-spawn-params)) + (set! (-> self level) (level-get *level* 'precura)) + (stack-size-set! (-> self main-thread) 128) + (set! (-> self sphere-size) (-> arg0 sphere-size)) + (set! (-> self owner) (-> arg0 owner)) + (set! (-> self track-joint) (-> arg0 track-joint)) + (set! (-> self offset-vec quad) (-> arg0 offset-vec quad)) + (init-collision! self) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-shield-sphere" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set-vector! (-> self root scale) (-> self sphere-size) (-> self sphere-size) (-> self sphere-size) 1.0) + (set! (-> self shield-type) (-> arg0 shield-type)) + (case (-> self shield-type) + (((shield-type shield-type-0)) + (set! (-> self heat-info damage-scalar) (/ 1.0 (the float (-> arg0 shield-strength)))) + (let ((s5-1 (new 'stack-no-clear 'shield-sphere-distort-spawn-params))) + (set! (-> s5-1 owner) (process->handle self)) + (set! (-> s5-1 sphere-size) (-> self sphere-size)) + (let ((s4-1 (the-as process #f))) + (let* ((s3-0 (get-process *default-dead-pool* shield-sphere-distort #x4000 1)) + (v1-22 (when s3-0 + (let ((t9-6 (method-of-type process activate))) + (t9-6 s3-0 self "process" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-0 shield-sphere-distort-init-by-other s5-1) + (-> s3-0 ppointer) + ) + ) + ) + (if v1-22 + (set! s4-1 (-> v1-22 0)) + ) + ) + (set! (-> self heat-info distort-handle) (process->handle s4-1)) + ) + ) + ) + (((shield-type shield-type-1)) + (set! (-> self toggle-info enable-time) (-> arg0 enable-time)) + (set! (-> self heat-info last-heat-time) (-> arg0 disable-time)) + ) + ) + (ja-no-eval :group! (ja-group) :num! (loop!) :frame-num 0.0) + (ja-post) + (logior! (-> self draw status) (draw-control-status disable-fog)) + (let ((gp-1 (handle->process (-> arg0 owner)))) + (when (if (type? gp-1 process-focusable) + gp-1 + ) + ) + ) + (set! (-> self event-hook) (-> (method-of-type shield-sphere shield-enabled) event)) + (init-and-go! self) + ) + +(defstate shield-disabled (mech-shield) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (shield-event-handler self proc argc message block) + ) + :enter (behavior () + (toggle-shield self #f) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (shield-enabled-trans self) + (if (and (= (-> self shield-type) (shield-type shield-type-1)) + (time-elapsed? (-> self state-time) (-> self heat-info last-heat-time)) + ) + (go-virtual shield-enabled) + ) + ) + :code sleep-code + :post (behavior () + (shield-post self) + ) + ) + +(defmethod init-collision! ((this mech-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)) + (let ((v1-6 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec obstacle impenetrable-obj)) + (set! (-> v1-6 prim-core action) (collide-action)) + (set-vector! (-> v1-6 local-sphere) 0.0 0.0 -4096.0 (+ 4096.0 (* 4096.0 (-> this sphere-size)))) + (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 draw ((this hud-heatmeter)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + 256 + (the int (+ 25.0 (* -100.0 (-> this offset)))) + ) + (set! (-> this sprites 0 pos z) #xfffff0) + (set-as-offset-from! + (-> this sprites 1) + (the-as vector4w (-> this sprites)) + (+ (the int (* 0.128 (the float (-> this values 0 current)))) -63) + 1 + ) + (set! (-> this sprites 1 pos z) #xfffff0) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-heatmeter)) + (set! (-> this values 0 target) (the int (* 1000.0 (-> *game-info* distance)))) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-heatmeter)) + (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 (lookup-texture-by-id (new 'static 'texture-id :index #x2 :page #xa76))) + ) + (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 (lookup-texture-by-id (new 'static 'texture-id :index #x3 :page #xa76))) + ) + (set! (-> this sprites 1 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 1 scale-x) 1.8) + (set! (-> this sprites 1 scale-y) 1.8) + 0 + (none) + ) + +(define *mech-stance-mods* + (new 'static 'surface + :name 'run + :turnv 18204262.0 + :turnvf 0.03 + :turnvv 40049.777 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :fric 0.3 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 4.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :slope-up-traction 1.0 + :mult-hook (lambda :behavior target + ((arg0 surface) (arg1 surface) (arg2 surface) (arg3 int)) + (case arg3 + ((1) + (if (= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) + (seek! (-> self control did-move-to-pole-or-max-jump-height) 0.0 (* 127431.11 (seconds-per-frame))) + (seek! + (-> self control did-move-to-pole-or-max-jump-height) + (* (-> self control turn-to-magnitude) (-> arg0 turnvv)) + (* 127431.11 (seconds-per-frame)) + ) + ) + (set! (-> arg0 turnvv) (-> self control did-move-to-pole-or-max-jump-height)) + (when (= (-> arg2 name) '*edge-surface*) + (set! (-> arg0 target-speed) 40960.0) + (set! (-> arg0 transv-max) 40960.0) + (set! (-> arg0 seek0) (* 1.6666 (-> arg2 seek0))) + (set! (-> arg0 seek90) (* 1.6666 (-> arg2 seek90))) + (set! (-> arg0 seek180) (* 1.6666 (-> arg2 seek180))) + ) + ) + ) + ) + :flags (surface-flag look-around no-turn-around) + ) + ) + +(define *mech-walk-mods* + (new 'static 'surface + :name 'run + :turnv 32768.0 + :turnvf 120.0 + :turnvv 524288.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :vel-turn -1.0 + :transv-max 40960.0 + :target-speed 40960.0 + :seek0 1.6666 + :seek90 1.6666 + :seek180 1.0 + :fric 0.1 + :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 + :mult-hook (lambda :behavior target + ((arg0 surface) (arg1 surface) (arg2 surface) (arg3 int)) + (case arg3 + ((1) + (when (= (-> arg2 name) '*edge-surface*) + (let ((v1-5 (vector-flatten! + (new 'stack-no-clear 'vector) + (vector-negate! (new-stack-vector0) (-> self control dynam gravity-normal)) + (-> self control local-normal) + ) + ) + ) + (set! (-> arg0 vel-turn) 0.0) + (vector+float*! (-> self control transv) (-> self control transv) v1-5 (* 409600.0 (seconds-per-frame))) + ) + ) + ) + ) + ) + :flags (surface-flag look-around no-turn-around) + ) + ) + +(define *mech-jump-mods* (new 'static 'surface + :name 'jump + :turnv 131072.0 + :turnvf 90.0 + :turnvv 18204.445 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 40960.0 + :target-speed 40960.0 + :seek0 0.3 + :seek90 0.3 + :seek180 0.3 + :fric 0.2 + :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 + :mode 'air + :flags (surface-flag no-turn-around air) + ) + ) + +(define *mech-punch-mods* (new 'static 'surface + :name 'punch + :turnv 131072.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 91750.4 + :target-speed 122880.0 + :seek90 0.5 + :seek180 0.15 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 0.25 + :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 + :mode 'attack + :flags (surface-flag no-turn-around turn-to-pad attack) + ) + ) + +(define *mech-pickup-mods* (new 'static 'surface + :name 'run + :turnv 16384.0 + :turnvf 240.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :vel-turn -1.0 + :transv-max 12288.0 + :target-speed 12288.0 + :seek0 1.0 + :seek90 1.0 + :seek180 1.0 + :fric 0.5 + :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 look-around no-turn-around) + ) + ) + +(define *mech-carry-walk-mods* (new 'static 'surface + :name 'run + :turnv 25486.223 + :turnvf 96.0 + :turnvv 524288.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :vel-turn -1.0 + :transv-max 12288.0 + :target-speed 36864.0 + :seek0 1.0 + :seek90 1.0 + :seek180 1.0 + :fric 0.5 + :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 look-around no-turn-around) + ) + ) + +(set! (-> *mech-carry-walk-mods* mult-hook) (-> *mech-walk-mods* mult-hook)) + +(define *mech-carry-drag-mods* (new 'static 'surface + :name 'run + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 12288.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 look-around no-turn-around) + ) + ) + +(define *mech-carry-jump-mods* (new 'static 'surface + :name 'jump + :turnv 131072.0 + :turnvf 90.0 + :turnvv 18204.445 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 36864.0 + :target-speed 36864.0 + :seek0 0.3 + :seek90 0.3 + :seek180 0.3 + :fric 0.2 + :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 + :mode 'air + :flags (surface-flag air) + ) + ) + +(defbehavior target-mech-falling-anim-trans target () + 0 + (none) + ) + +(defbehavior target-mech-mech-effect mech ((arg0 target)) + (when (!= (-> arg0 mech thruster-flame-length) 0.0) + (let ((f30-0 0.0)) + (if (!= (-> *setting-control* user-current under-water-pitch-mod) 0.0) + (set! f30-0 -2.0) + ) + (sound-play-by-name + (static-sound-name "mech-thrust") + (-> arg0 mech thrust-sound-id) + (the int (* 1024.0 (lerp-scale 0.3 1.0 (-> arg0 mech thruster-flame-length) 0.0 4096.0))) + (the int (* 1524.0 f30-0)) + 0 + (sound-group) + #t + ) + ) + (dotimes (s5-1 2) + (let* ((s3-1 (-> self node-list data (if (zero? s5-1) + 37 + 38 + ) + ) + ) + (s4-1 (vector<-cspace! (new 'stack-no-clear 'vector) s3-1)) + (a2-2 (vector-negate! (new 'stack-no-clear 'vector) (-> s3-1 bone transform uvec))) + ) + (mech-spawn-thruster + (-> arg0 mech) + s4-1 + a2-2 + (-> arg0 mech thruster-flame-width) + (-> arg0 mech thruster-flame-length) + ) + ) + ) + ) + (when (logtest? (water-flag touch-water) (-> arg0 water flags)) + (let ((f30-1 (-> arg0 water height))) + (let ((s5-2 (-> *part-id-table* 1045))) + (let ((v1-28 (get-field-spec-by-id s5-2 (sp-field-id spt-userdata)))) + (if v1-28 + (set! (-> v1-28 initial-valuef) f30-1) + ) + ) + (let ((t9-6 sp-launch-particles-var) + (a0-12 *sp-particle-system-2d*) + (a2-3 *launch-matrix*) + ) + (set! (-> a2-3 trans quad) (-> self root trans quad)) + (t9-6 a0-12 s5-2 a2-3 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + (let ((s5-3 (-> *part-id-table* 1048))) + (let ((v1-34 (get-field-spec-by-id s5-3 (sp-field-id spt-userdata)))) + (if v1-34 + (set! (-> v1-34 initial-valuef) f30-1) + ) + ) + (let ((t9-8 sp-launch-particles-var) + (a0-15 *sp-particle-system-2d*) + (a2-4 *launch-matrix*) + ) + (set! (-> a2-4 trans quad) (-> self root trans quad)) + (t9-8 a0-15 s5-3 a2-4 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + (let* ((s5-4 (-> *part-id-table* 1051)) + (v1-40 (get-field-spec-by-id s5-4 (sp-field-id spt-userdata))) + (s4-2 (new 'stack-no-clear 'vector)) + ) + (if v1-40 + (set! (-> v1-40 initial-valuef) f30-1) + ) + (let ((s3-2 (get-field-spec-by-id s5-4 (sp-field-id spt-num)))) + (if s3-2 + (set! (-> s3-2 initial-valuef) (lerp-scale 0.1 2.0 (-> arg0 control ctrl-xz-vel) 0.0 40960.0)) + ) + ) + (process-drawable-random-point! self s4-2) + (let ((t9-13 sp-launch-particles-var) + (a0-21 *sp-particle-system-2d*) + (a2-6 *launch-matrix*) + ) + (set! (-> a2-6 trans quad) (-> s4-2 quad)) + (t9-13 a0-21 s5-4 a2-6 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ) + 0 + (none) + ) + +(defbehavior mech-on-ground? target () + (logtest? (-> self control status) (collide-status on-surface)) + ) + +(defbehavior target-mech-get-off? target () + (when (and (mech-on-ground?) + (< (-> self mech no-get-off-time) (current-time)) + (-> *setting-control* user-current pilot-exit) + ) + (let ((gp-0 (new 'stack-no-clear 'collide-query)) + (s4-0 (new 'stack-no-clear 'inline-array 'sphere 1)) + ) + (dotimes (s5-0 1) + ((method-of-type sphere new) (the-as symbol (-> s4-0 s5-0)) sphere) + ) + (let ((s5-1 (-> self node-list data 0 bone transform))) + (vector-matrix*! (-> s4-0 0) (new 'static 'vector :y 14336.0 :z 12288.0 :w 1.0) s5-1) + (set! (-> s4-0 0 r) 10240.0) + (let ((v1-11 gp-0)) + (set! (-> v1-11 best-dist) (the-as float s4-0)) + (set! (-> v1-11 best-other-prim) (the-as collide-shape-prim 1)) + (set! (-> v1-11 collide-with) (-> self control root-prim prim-core collide-with)) + (set! (-> v1-11 ignore-process0) #f) + (set! (-> v1-11 ignore-process1) #f) + (set! (-> v1-11 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-11 best-my-prim) (the-as collide-shape-prim #t)) + (set! (-> v1-11 action-mask) (collide-action solid)) + ) + (let ((s4-1 (fill-and-probe-using-spheres *collide-cache* gp-0))) + (when (not s4-1) + (vector-matrix*! (-> gp-0 start-pos) (new 'static 'vector :y 8192.0 :z 4096.0 :w 1.0) s5-1) + (set-vector! (-> gp-0 move-dist) 0.0 -40960.0 0.0 0.0) + (let ((v1-15 gp-0)) + (set! (-> v1-15 radius) 409.6) + (set! (-> v1-15 collide-with) (collide-spec backgnd obstacle hit-by-others-list pusher)) + (set! (-> v1-15 ignore-process0) self) + (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)) + ) + (set! s4-1 (< (fill-and-probe-using-line-sphere *collide-cache* gp-0) 0.0)) + ) + (if (and s4-1 (-> *setting-control* user-current pilot)) + (talker-spawn-func (-> *talker-speech* 48) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (not s4-1) + ) + ) + ) + ) + ) + +(defbehavior target-mech-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object) (a0-19 symbol) (sv-96 target) (sv-112 process)) + (cond + ((and (= arg2 'query) (= (-> arg3 param 0) 'mode)) + 'mech + ) + (else + (case arg2 + (('end-mode) + (case (-> arg3 param 0) + (('mech) + enter-state + (process->handle arg0) + (go target-mech-get-off) + ) + ) + ) + (('change-mode) + (let ((v1-8 (-> arg3 param 0))) + (cond + ((= v1-8 'grab) + (when (not (focus-test? self dead)) + (if (not (-> arg3 param 1)) + #t + (go target-mech-grab) + ) + ) + ) + ((= v1-8 'normal) + enter-state + (process->handle arg0) + (go target-mech-get-off) + ) + ((begin (set! a0-19 'falling) (= v1-8 a0-19)) + (go target-mech-falling a0-19) + ) + ) + ) + ) + (('swim 'slide 'edge-grab) + #f + ) + (('clone-anim) + (go target-mech-clone-anim (process->handle (the-as process (-> arg3 param 0)))) + ) + (('touched) + (cond + ((logtest? (process-mask crate) (-> arg0 mask)) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 2) + (set! (-> a1-1 message) 'attack) + (set! (-> a1-1 param 0) (-> arg3 param 0)) + (set! (-> a1-1 param 1) + (the-as + uint + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self mech attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'mech) + (penetrate-using (-> self control penetrate-using)) + ) + ) + ) + ) + (set! v0-0 (send-event-function arg0 a1-1)) + ) + (when v0-0 + (let* ((v1-28 (-> self game)) + (a0-43 (+ (-> v1-28 attack-id) 1)) + ) + (set! (-> v1-28 attack-id) a0-43) + (set! (-> self mech attack-id) a0-43) + ) + ) + v0-0 + ) + (else + (target-standard-event-handler arg0 arg1 arg2 arg3) + ) + ) + ) + (('attack 'attack-or-shove 'attack-invinc) + (let ((s3-0 + (the-as object (mem-copy! (the-as pointer (-> self attack-info-rec)) (the-as pointer (-> arg3 param 1)) 168)) + ) + ) + (let ((s2-0 (the-as pointer s3-0)) + (s1-0 (method-of-type attack-info compute-intersect-info)) + (s0-0 (-> arg3 param 1)) + ) + (set! sv-96 self) + (set! sv-112 arg0) + (let ((a3-2 (if (type? sv-112 process-drawable) + sv-112 + ) + ) + (t0-0 (-> arg3 param 0)) + ) + (s1-0 (the-as attack-info s2-0) s0-0 sv-96 a3-2 (the-as touching-shapes-entry t0-0)) + ) + ) + (format 0 "info: ~A~%" (-> (the-as attack-info s3-0) mode)) + (let* ((v1-31 (-> (the-as attack-info s3-0) mode)) + (f30-0 (cond + ((= v1-31 'tar) + (set! (-> (the-as attack-info s3-0) id) (the-as uint 2)) + (* 100.0 (seconds-per-frame)) + ) + ((= v1-31 'melt) + (set! (-> (the-as attack-info s3-0) id) (the-as uint 2)) + (let ((s2-1 (if (logtest? (-> (the-as attack-info s3-0) mask) (attack-mask intersection)) + (-> (the-as attack-info s3-0) intersection) + (-> self control trans) + ) + ) + ) + (launch-particles (-> *part-id-table* 1053) s2-1) + (launch-particles (-> *part-id-table* 1055) s2-1) + ) + (* 100.0 (seconds-per-frame)) + ) + ((or (= v1-31 'burn) (= v1-31 'burnup)) + (set! (-> (the-as attack-info s3-0) id) (the-as uint 2)) + (if (logtest? (-> (the-as attack-info s3-0) mask) (attack-mask intersection)) + (-> (the-as attack-info s3-0) intersection) + (-> self control trans) + ) + (launch-particles (-> *part-id-table* 1053) (-> self control trans)) + (launch-particles (-> *part-id-table* 1055) (-> self control trans)) + (* 20.0 (seconds-per-frame)) + ) + ((= v1-31 'shock) + (let ((s2-2 (if (logtest? (-> (the-as attack-info s3-0) mask) (attack-mask intersection)) + (-> (the-as attack-info s3-0) intersection) + (-> self control trans) + ) + ) + ) + (launch-particles (-> *part-id-table* 1057) s2-2) + (launch-particles (-> *part-id-table* 1058) s2-2) + ) + (set! (-> (the-as attack-info s3-0) id) (the-as uint 2)) + 10.0 + ) + ((= v1-31 'explode) + (if (and (-> self next-state) (= (-> self next-state name) 'target-mech-shield)) + 0.0 + 4.0 + ) + ) + ((= v1-31 'grunt) + 1.0 + ) + ((= v1-31 'air) + 100.0 + ) + ((or (= v1-31 'endlessfall) (= v1-31 'crush) (= v1-31 'instant-death)) + 100.0 + ) + (else + (-> (the-as attack-info s3-0) damage) + ) + ) + ) + ) + (when (target-log-attack (the-as attack-info s3-0) 'background) + (case arg2 + (('attack 'attack-or-shove 'attack-invinc) + (if (not (or (logtest? (-> self target-flags) (target-flags tf2)) + (logtest? (game-secrets invulnerable) (-> self game secrets)) + ) + ) + (seek! (-> self mech shield-value) 0.0 f30-0) + ) + ) + ) + (if (and (= arg2 'attack-or-shove) (< 0.0 (-> self mech shield-value))) + (set! arg2 'shove) + ) + (if (= arg2 'attack-invinc) + (set! (-> self mech shield-value) 0.0) + ) + (if (or (= (-> self mech shield-value) 0.0) (= arg2 'shove)) + (target-attacked + arg2 + (the-as attack-info s3-0) + arg0 + (the-as touching-shapes-entry (-> arg3 param 0)) + target-mech-hit + ) + 'block + ) + ) + ) + ) + ) + (('shove) + (when (not (focus-test? self dead 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-mech-hit 'shove (-> self attack-info-rec)) + ) + ) + (('effect-control) + (if (string= (the-as string (-> arg3 param 0)) "target-mech-walk") + (sound-play-by-name + (static-sound-name "mech-walk") + (new-sound-id) + 1024 + (the int (* 1524.0 (lerp-scale -0.2 0.0 (-> self control ctrl-xz-vel) 12288.0 40960.0))) + 0 + (sound-group) + #t + ) + ) + ) + (('target-mech-get-off) + (set! v0-0 (+ (current-time) (the-as time-frame (-> arg3 param 0)))) + (set! (-> self mech no-get-off-time) (the-as time-frame v0-0)) + v0-0 + ) + (else + (target-standard-event-handler arg0 arg1 arg2 arg3) + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch symbol vs object. +(defbehavior target-mech-bonk-event-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (when (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) + ) + (>= 409.6 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + (begin + (vector-normalize! + (vector-! + s4-0 + (the-as vector (-> self control collision-spheres 0 prim-core)) + (-> self control actor-contact-pt) + ) + 1.0 + ) + (< 0.01 (-> s4-0 y)) + ) + ) + (if (< 0.75 (-> s4-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))) + ) + ) + ) + (when (and (= (target-send-attack + arg0 + 'bonk + (the-as touching-shapes-entry (-> arg3 param 0)) + (the-as int (-> self control target-attack-id)) + (the-as int (-> self control attack-count)) + (penetrate touch bonk mech-bonk) + ) + 'bounce + ) + (not (logtest? (-> self focus-status) (focus-status dead hit))) + ) + (set! (-> self control last-trans-any-surf quad) (-> self control trans quad)) + (target-timed-invulnerable (seconds 0.1) self 1) + (cond + ((focus-test? self carry) + enter-state + (let ((a0-19 (-> *TARGET-bank* mech-carry-jump-height-min)) + (a1-8 (-> *TARGET-bank* mech-carry-jump-height-max)) + ) + (go target-mech-carry-jump a0-19 a1-8) + ) + ) + (else + (go + target-mech-jump + (-> *TARGET-bank* mech-jump-height-min) + (-> *TARGET-bank* mech-jump-height-max) + (the-as surface #f) + ) + ) + ) + ) + #f + ) + ) + ) + +;; WARN: Return type mismatch none vs object. +(defbehavior mech-leg-ik-callback target ((arg0 joint-mod-ik) (arg1 matrix) (arg2 matrix) (arg3 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 'vector))) + (set! (-> s5-0 quad) (-> arg3 quad)) + (let ((f0-1 (- (-> arg3 y) (-> (target-pos 0) y)))) + (if (< 6144.0 f0-1) + (set! f0-1 6144.0) + ) + (if (< f0-1 -6144.0) + (set! f0-1 -6144.0) + ) + (+! (-> arg0 user-position y) f0-1) + ) + (let ((f0-4 (- (-> arg3 y) (-> arg0 user-position y)))) + (seek! (-> arg0 user-float) f0-4 (* 40960.0 (seconds-per-frame))) + ) + (let* ((f28-0 (-> arg0 user-float)) + (f30-1 (lerp-scale 1.0 0.0 f28-0 0.0 12288.0)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-12 s5-0)) + (let ((a0-4 *up-vector*)) + (let ((a1-4 8192.0)) + (.mov vf7 a1-4) + ) + (.lvf vf5 (&-> a0-4 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 (&-> s3-0 quad) vf6) + (vector-float*! (new 'stack-no-clear 'vector) *up-vector* -16384.0) + (let ((s2-0 (new 'stack-no-clear 'vector))) + 0.0 + (let ((f0-11 (intersect-ray-plane s3-0 *up-vector* (-> arg0 user-position) *up-vector*)) + (a0-7 s2-0) + ) + (let ((v1-15 *up-vector*)) + (let ((a1-7 f0-11)) + (.mov vf7 a1-7) + ) + (.lvf vf5 (&-> v1-15 quad)) + ) + (.lvf vf4 (&-> s3-0 quad)) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf5 vf7 :mask #b111) + (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.svf (&-> a0-7 quad) vf6) + ) + (let ((a0-8 s2-0)) + (let ((v1-16 *up-vector*)) + (let ((a1-8 (- f28-0))) + (.mov vf7 a1-8) + ) + (.lvf vf5 (&-> v1-16 quad)) + ) + (.lvf vf4 (&-> arg3 quad)) + (.add.x.vf 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) + ) + (let ((a1-9 s5-0)) + (let ((v1-17 s5-0)) + (let ((a0-10 (vector-! (new 'stack-no-clear 'vector) s2-0 s5-0))) + (let ((a2-6 (fmin 1.0 (* (-> arg0 user-blend) f30-1)))) + (.mov vf7 a2-6) + ) + (.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-9 quad) vf6) + ) + ) + ) + (set-ik-target! arg0 s5-0) + ) + ) + ) + +(defbehavior mech-update-ik target () + (local-vars (sv-720 vector)) + (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 'collide-query)) + (s5-0 (-> (the-as process-drawable (-> self parent 0)) root)) + ) + (let ((a1-0 (-> gp-0 bbox)) + (v1-2 (-> s5-0 trans)) + (a0-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-0 x) 10240.0) + (set! (-> a0-0 y) 10240.0) + (set! (-> a0-0 z) 10240.0) + (set! (-> a0-0 w) 1.0) + (vector-! (the-as vector a1-0) v1-2 a0-0) + ) + (let ((a1-2 (-> gp-0 bbox max)) + (v1-3 (-> s5-0 trans)) + (a0-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-1 x) 10240.0) + (set! (-> a0-1 y) 10240.0) + (set! (-> a0-1 z) 10240.0) + (set! (-> a0-1 w) 1.0) + (vector+! a1-2 v1-3 a0-1) + ) + (set! (-> gp-0 collide-with) (-> (the-as collide-shape s5-0) root-prim prim-core collide-with)) + (set! (-> gp-0 ignore-process0) #f) + (set! (-> gp-0 ignore-process1) #f) + (set! (-> gp-0 ignore-pat) (-> (the-as collide-shape s5-0) pat-ignore-mask)) + (fill-using-bounding-box *collide-cache* gp-0) + (dotimes (s4-0 2) + (let ((s3-0 (-> self mech-ik s4-0))) + #t + (set! (-> s3-0 callback) mech-leg-ik-callback) + (-> s3-0 shoulder-matrix-no-ik) + (let ((v1-13 (-> s3-0 elbow-matrix-no-ik)) + (s0-0 (new 'stack-no-clear 'vector)) + ) + (set! sv-720 (new 'stack-no-clear 'vector)) + (let ((a0-5 (-> *y-vector* quad))) + (set! (-> sv-720 quad) a0-5) + ) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (let ((s1-0 (new 'stack-no-clear 'vector))) + (let ((a1-6 s0-0)) + (let ((a0-8 (-> v1-13 trans))) + (let ((v1-14 (-> v1-13 uvec))) + (let ((a2-8 (-> s3-0 hand-dist))) + (.mov vf7 a2-8) + ) + (.lvf vf5 (&-> v1-14 quad)) + ) + (.lvf vf4 (&-> a0-8 quad)) + ) + (.add.x.vf 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) + ) + (let ((f0-11 + (lerp-scale 1.0 0.0 (- (-> s0-0 y) (-> (the-as collide-shape-moving s5-0) gspot-pos y)) 2048.0 12288.0) + ) + ) + (seek! (-> s3-0 user-blend) f0-11 (* 4.0 (seconds-per-frame))) + ) + (let ((a1-9 (-> gp-0 start-pos))) + (let ((v1-18 s0-0)) + (let ((a0-11 sv-720)) + (let ((a2-12 6144.0)) + (.mov vf7 a2-12) + ) + (.lvf vf5 (&-> a0-11 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) + ) + (let ((v1-19 (-> gp-0 move-dist)) + (f0-16 -20480.0) + ) + (vector-float*! v1-19 sv-720 f0-16) + ) + (let ((v1-21 gp-0)) + (set! (-> v1-21 radius) 4.096) + (set! (-> v1-21 collide-with) (-> gp-0 collide-with)) + (set! (-> v1-21 ignore-process0) #f) + (set! (-> v1-21 ignore-process1) #f) + (set! (-> v1-21 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-21 action-mask) (collide-action solid)) + ) + (let ((f30-0 (probe-using-line-sphere *collide-cache* gp-0))) + (cond + ((>= f30-0 0.0) + (set! (-> s1-0 quad) (-> gp-0 best-other-tri normal quad)) + (when (< 8192.0 (vector-vector-angle-safe *y-vector* s1-0)) + (let* ((a1-14 (vector-normalize! (vector-cross! (new 'stack-no-clear 'vector) *y-vector* s1-0) 1.0)) + (a2-14 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) a1-14 8192.0)) + ) + (vector-orient-by-quat! s1-0 *y-vector* a2-14) + ) + ) + (let ((a1-16 s2-0)) + (let ((v1-28 (-> gp-0 start-pos))) + (let ((a0-26 (-> gp-0 move-dist))) + (let ((a2-15 f30-0)) + (.mov vf7 a2-15) + ) + (.lvf vf5 (&-> a0-26 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-16 quad) vf6) + ) + (set! (-> s3-0 user-position quad) (-> s2-0 quad)) + (set! (-> s3-0 user-normal quad) (-> s1-0 quad)) + ) + (else + (set! (-> s0-0 y) (-> (target-pos 0) y)) + (set! (-> s3-0 user-position quad) (-> s0-0 quad)) + (set! (-> s3-0 user-normal quad) (-> *y-vector* quad)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior target-mech-init target ((arg0 handle) (arg1 float) (arg2 symbol)) + (local-vars + (sv-160 (function vector entity-actor skeleton-group vector manipy-options none :behavior manipy)) + (sv-176 vector) + (sv-192 entity-actor) + ) + (target-gun-end-mode #f) + (target-exit) + (when (zero? (-> self mech)) + (set! (-> self mech) (new 'process 'mech-info)) + (set! (-> self mech hud 0) (the-as handle #f)) + (set! (-> self mech shield-handle) (the-as handle #f)) + (set! (-> self mech engine-sound-id) (new-sound-id)) + (set! (-> self mech thrust-sound-id) (new-sound-id)) + (set! (-> self mech drag-sound-id) (new-sound-id)) + (set! (-> self mech whine-sound-id) (new-sound-id)) + (set! (-> self mech shield-sound-id) (new-sound-id)) + (set! (-> self mech mode-sound-bank) #f) + ) + (set! (-> self board latch?) #f) + (set! (-> self mech stick-lock) #f) + (set! (-> self mech stick-off) #f) + (set-time! (-> self mech unstuck-time)) + (set! (-> self mech stuck-count) 0) + (set-time! (-> self mech mech-start-time)) + (set! (-> self mech jump-thrust) 0.0) + (set! (-> self mech jump-thrust-fuel) (-> *TARGET-bank* mech-jump-thrust-fuel)) + (set! (-> self mech state-impact? 0) #f) + ((method-of-type impact-control initialize) + (the-as impact-control (-> self mech state-impact)) + self + -1 + 0.0 + (collide-spec) + ) + (set! (-> self mech shield-max) 100.0) + (set! (-> self mech shield-value) arg1) + (set! (-> self mech entity) (entity-by-type mech)) + (let ((v1-31 (handle->process arg0))) + (if v1-31 + (set! (-> self mech entity) (-> v1-31 entity)) + ) + ) + (when (not (and (-> self mech entity) (logtest? (level-flags lf16) (-> self mech entity extra level info level-flags))) + ) + (dotimes (v1-39 (-> *level* length)) + (let ((a0-18 (-> *level* level v1-39))) + (when (= (-> a0-18 status) 'active) + (when (logtest? (level-flags lf16) (-> a0-18 info level-flags)) + (let ((a0-20 (-> a0-18 entity data 0 entity))) + (when a0-20 + (set! (-> self mech entity) (the-as entity-actor a0-20)) + (goto cfg-22) + ) + ) + ) + ) + ) + ) + ) + (label cfg-22) + (let ((v1-44 (-> self mech))) + (set! (-> v1-44 particle-system-2d) *sp-particle-system-2d*) + (set! (-> v1-44 particle-system-3d) *sp-particle-system-3d*) + (set! (-> v1-44 part-quat) *particle-quat*) + (set! (-> v1-44 part-vel) *particle-vel*) + (set! (-> v1-44 part-thruster) (-> *part-id-table* 1037)) + (set! (-> v1-44 part-thruster-scale-x) (-> *part-id-table* 1037 init-specs 4)) + (set! (-> v1-44 part-thruster-scale-y) (-> *part-id-table* 1037 init-specs 5)) + (set! (-> v1-44 thruster-flame-width) 0.0) + (set! (-> v1-44 thruster-flame-length) 0.0) + ) + (set! (-> self control reaction) target-collision-reaction) + (set! (-> self control transv quad) (the-as uint128 0)) + (set! (-> self control ctrl-xz-vel) 0.0) + (logior! (-> self focus-status) (focus-status mech)) + (set! (-> self control bend-target) 0.0) + (let ((v1-54 (-> self node-list data))) + (set! (-> v1-54 0 param0) (the-as (function cspace transformq none) cspace<-transformq+world-trans!)) + (set! (-> v1-54 0 param1) (the-as basic (-> self control trans))) + (set! (-> v1-54 0 param2) (the-as basic (-> self control cspace-offset))) + ) + (target-collide-set! 'mech 0.0) + (set! (-> self control pat-ignore-mask) (new 'static 'pat-surface :noentity #x1 :nomech #x1)) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (set! (-> self draw shadow) #f) + (let ((s4-1 (-> self entity)) + (s3-0 (-> self level)) + ) + (process-entity-set! self (-> self mech entity)) + (let ((s2-0 (get-process *8k-dead-pool* manipy #x20000 1))) + (set! (-> self manipy) + (the-as + (pointer manipy) + (when s2-0 + (let ((t9-13 (method-of-type manipy activate))) + (t9-13 (the-as manipy s2-0) self "manipy" (the-as pointer #x70004000)) + ) + (let ((s1-0 run-function-in-process) + (s0-0 s2-0) + ) + (set! sv-160 manipy-init) + (set! sv-176 (-> self control trans)) + (set! sv-192 (-> self entity)) + (let ((t0-1 (art-group-get-by-name *level* "skel-mech" (the-as (pointer level) #f))) + (t1-0 #f) + (t2-0 0) + ) + ((the-as (function object object object object object object object none) s1-0) + s0-0 + sv-160 + sv-176 + sv-192 + t0-1 + t1-0 + t2-0 + ) + ) + ) + (-> s2-0 ppointer) + ) + ) + ) + ) + (set! (-> self entity) s4-1) + (set! (-> self level) s3-0) + ) + (when (-> self manipy) + (send-event + (ppointer->process (-> self manipy)) + 'trans-hook + (lambda :behavior target + () + (let ((v1-0 (ppointer->process (-> self parent)))) + (set! (-> self control trans quad) (-> (the-as target v1-0) mech mech-trans quad)) + (let ((a0-4 (-> (the-as target v1-0) mech mech-quat quad))) + (set! (-> self control quat quad) a0-4) + ) + (set! (-> self control scale quad) (-> (the-as target v1-0) mech mech-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 draw color-mult quad) a0-10) + ) + (let ((a0-12 (-> (the-as target v1-0) draw color-emissive quad))) + (set! (-> self draw color-emissive quad) a0-12) + ) + (let ((v0-0 (-> (the-as target v1-0) draw shadow-ctrl settings shadow-dir quad))) + (set! (-> self draw shadow-ctrl settings shadow-dir quad) v0-0) + v0-0 + ) + ) + ) + ) + (send-event + (ppointer->process (-> self manipy)) + 'post-hook + (lambda :behavior target + () + (let ((gp-0 (ppointer->process (-> self parent)))) + ((method-of-type impact-control update-from-cspace) + (the-as impact-control (-> (the-as target gp-0) mech state-impact)) + ) + (when (-> (the-as target gp-0) mech state-impact? 0) + (let ((a1-0 (new 'stack-no-clear 'collide-query))) + ((method-of-type impact-control impact-control-method-11) + (the-as impact-control (-> (the-as target gp-0) mech state-impact)) + a1-0 + (the-as process gp-0) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + ) + ) + (mech-update-ik) + (target-mech-mech-effect (the-as target gp-0)) + ) + ) + ) + (send-event (ppointer->process (-> self manipy)) 'anim-mode 'clone-anim) + (send-event (ppointer->process (-> self manipy)) 'sync #t) + (send-event + (ppointer->process (-> self manipy)) + 'eval + (lambda :behavior target + () + (set! (-> self state-hook) #f) + (set! (-> self draw shadow-ctrl) *mech-shadow-control*) + (set! (-> self mech-ik 0) (new 'process 'joint-mod-ik self 27 5283.84)) + (set! (-> self mech-ik 1) (new 'process 'joint-mod-ik self 33 5283.84)) + (dotimes (v1-3 2) + (let ((a0-5 (-> self mech-ik v1-3))) + (set! (-> a0-5 elbow-pole-vector-axis) (the-as uint 2)) + (set! (-> a0-5 elbow-rotation-axis) (the-as uint 0)) + (set! (-> a0-5 callback) mech-leg-ik-callback) + (logior! (-> a0-5 flags) (joint-mod-ik-flags elbow-trans-neg)) + ) + ) + (dotimes (gp-0 2) + (enable-set! (-> self mech-ik gp-0) #t) + ) + #f + ) + ) + ) + (logior! (-> self target-flags) (target-flags tf6)) + (set-setting! 'string-max-length 'low (meters 7) 0) + (set-setting! 'string-min-length 'low (meters 4) 0) + (set-setting! 'string-max-height 'low (meters 3.5) 0) + (set-setting! 'string-min-height 'low (meters 1.5) 0) + (set-setting! 'fov 'abs (degrees 75.0) 0) + (set-setting! 'head-offset 'abs (meters 4.5) 0) + (set! (-> self mech mode-sound-bank) (add-setting! 'mode-sound-bank 'modemech 0.0 0)) + (set! (-> self mech hud 0) + (ppointer->handle (process-spawn hud-heatmeter :init hud-init-by-other :name "hud-heatmeter" :to self)) + ) + (let ((s4-3 (new 'stack-no-clear 'shield-sphere-spawn-params))) + (set! (-> s4-3 owner) (process->handle self)) + (set! (-> s4-3 sphere-size) 3.75) + (set! (-> s4-3 track-joint) 3) + (set! (-> s4-3 enable-time) (seconds 0.1)) + (set! (-> s4-3 disable-time) (seconds 0.1)) + (set! (-> s4-3 shield-strength) 8) + (set! (-> s4-3 shield-type) (shield-type shield-type-0)) + (if (new 'static 'vector :z -4096.0 :w 1.0) + (set! (-> s4-3 offset-vec quad) (-> (new 'static 'vector :z -4096.0 :w 1.0) quad)) + (vector-reset! (-> s4-3 offset-vec)) + ) + (let ((s3-1 (the-as process #f))) + (let* ((s2-1 (get-process *default-dead-pool* mech-shield #x4000 1)) + (v1-129 (when s2-1 + (let ((t9-32 (method-of-type process activate))) + (t9-32 s2-1 self "process" (the-as pointer #x70004000)) + ) + (run-now-in-process s2-1 mech-shield-init-by-other s4-3) + (-> s2-1 ppointer) + ) + ) + ) + (if v1-129 + (set! s3-1 (-> v1-129 0)) + ) + ) + (cond + (s3-1 + (set! (-> self mech shield-handle) (process->handle s3-1)) + (send-event (handle->process (-> self mech shield-handle)) 'disabled) + ) + (else + ) + ) + ) + ) + (remove-exit) + (if arg2 + (go target-mech-stance) + (go target-mech-get-on arg0) + ) + (none) + ) + +(defbehavior target-mech-exit target () + (when (not (and (-> self next-state) + (let ((v1-3 (-> self next-state name))) + (or (= v1-3 'target-mech-stance) + (= v1-3 'target-mech-walk) + (= v1-3 'target-mech-jump) + (= v1-3 'target-mech-jump-jump) + (= v1-3 'target-mech-falling) + (= v1-3 'target-mech-hit-ground) + (= v1-3 'target-mech-punch) + (= v1-3 'target-mech-hit) + (= v1-3 'target-mech-death) + (= v1-3 'target-mech-carry-drag) + (= v1-3 'target-mech-carry-pickup) + (= v1-3 'target-mech-carry-drop) + (= v1-3 'target-mech-carry-stance) + (= v1-3 'target-mech-carry-walk) + (= v1-3 'target-mech-carry-jump) + (= v1-3 'target-mech-carry-falling) + (= v1-3 'target-mech-carry-hit-ground) + (= v1-3 'target-mech-carry-throw) + (= v1-3 'target-mech-get-off) + (= v1-3 'target-mech-get-off-jump) + (= v1-3 'target-mech-grab) + (= v1-3 'target-mech-clone-anim) + (= v1-3 'target-mech-shield) + ) + ) + ) + ) + (let ((v1-4 (-> self manipy))) + (when v1-4 + (deactivate (-> v1-4 0)) + (set! (-> self manipy) (the-as (pointer manipy) #f)) + ) + ) + (let ((a0-27 (handle->process (-> self mech shield-handle)))) + (if a0-27 + (deactivate a0-27) + ) + ) + (setting-control-method-14 *setting-control* (-> self mech mode-sound-bank)) + (set! (-> self mech mode-sound-bank) #f) + (logclear! (-> self draw status) (draw-control-status no-draw-bounds)) + (logclear! (-> self focus-status) (focus-status mech)) + (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)) + (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! 'sound-flava) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) + (let ((v1-50 (-> self node-list data))) + (set! (-> v1-50 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!)) + (set! (-> v1-50 0 param1) (the-as basic (-> self control trans))) + (set! (-> v1-50 0 param2) (the-as basic (-> self control cspace-offset))) + ) + (target-collide-set! 'normal 0.0) + (set! (-> self control reaction) target-collision-reaction) + (set! (-> self control pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :board #x1) + ) + (sound-stop (-> self mech engine-sound-id)) + (sound-stop (-> self mech thrust-sound-id)) + (sound-stop (-> self mech drag-sound-id)) + (sound-stop (-> self mech whine-sound-id)) + (send-event (handle->process (-> self mech hud 0)) 'hide-and-die) + (set! (-> self draw shadow) (-> self shadow-backup)) + (set! (-> self control cspace-offset quad) (the-as uint128 0)) + (remove-setting! 'sound-flava) + (target-exit) + ) + (none) + ) + +(defbehavior target-mech-effect target () + (sound-play "mech-pulse" :id (-> self mech engine-sound-id)) + (set! (-> self game distance) (/ (-> self mech shield-value) (-> self mech shield-max))) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defbehavior target-mech-add-thrust target () + (let ((s5-0 (-> self control target-transv)) + (gp-0 (-> self control transv-ctrl)) + ) + (set! (-> (new 'stack-no-clear 'vector) quad) (-> self control target-transv quad)) + (target-bend-vel-turn gp-0) + (target-add-slide-factor s5-0) + (let ((t9-2 vector-xz-normalize!) + (a0-5 (new-stack-vector0)) + ) + (set! (-> a0-5 quad) (-> s5-0 quad)) + (let ((s4-0 (t9-2 a0-5 1.0))) + (let ((t9-3 vector-xz-normalize!) + (a0-6 (new-stack-vector0)) + ) + (set! (-> a0-6 quad) (-> gp-0 quad)) + (let ((v1-7 (t9-3 a0-6 1.0))) + (set! (-> s4-0 y) 0.0) + (set! (-> v1-7 y) 0.0) + ) + ) + (let* ((f0-2 (-> s4-0 z)) + (v1-8 gp-0) + (f1-4 (sqrtf (+ (* (-> v1-8 x) (-> v1-8 x)) (* (-> v1-8 z) (-> v1-8 z))))) + (v1-10 s5-0) + (f0-11 + (cond + ((>= f1-4 (sqrtf (+ (* (-> v1-10 x) (-> v1-10 x)) (* (-> v1-10 z) (-> v1-10 z))))) + (let ((f0-3 (-> self control current-surface fric)) + (f1-5 1.0) + (v1-15 gp-0) + ) + (* f0-3 (fmax f1-5 (/ (sqrtf (+ (* (-> v1-15 x) (-> v1-15 x)) (* (-> v1-15 z) (-> v1-15 z)))) + (-> self control current-surface nonlin-fric-dist) + ) + ) + ) + ) + ) + ((>= f0-2 0.0) + (+ (* f0-2 (-> self control current-surface seek0)) (* (- 1.0 f0-2) (-> self control current-surface seek90))) + ) + (else + (+ (* (fabs f0-2) (-> self control current-surface seek180)) + (* (+ 1.0 f0-2) (-> self control current-surface seek90)) + ) + ) + ) + ) + (s4-1 vector-xz-normalize!) + (s3-0 gp-0) + (t9-4 seek) + (v1-30 gp-0) + ) + (s4-1 s3-0 (t9-4 + (sqrtf (+ (* (-> v1-30 x) (-> v1-30 x)) (* (-> v1-30 z) (-> v1-30 z)))) + (sqrtf (+ (* (-> s5-0 x) (-> s5-0 x)) (* (-> s5-0 z) (-> s5-0 z)))) + (* f0-11 (seconds-per-frame)) + ) + ) + ) + ) + ) + (set! (-> self control velocity-after-thrust) (vector-length gp-0)) + ) + (let ((gp-1 (new-stack-vector0))) + (vector-matrix*! gp-1 (-> self control transv-ctrl) (-> self control c-R-w)) + (vector-float*! gp-1 gp-1 0.5) + (vector+! gp-1 gp-1 (-> self control trans)) + (add-debug-text-sphere + *display-target-marks* + (bucket-id debug-no-zbuf1) + gp-1 + (meters 0.2) + "ltransv" + (new 'static 'rgba :g #xff :a #x80) + ) + ) + (none) + ) + +(defbehavior target-mech-collision target () + (cond + ((and (-> self next-state) (= (-> self next-state name) 'target-mech-carry-drag)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 2) + (set! (-> a1-0 message) 'move) + (set! (-> a1-0 param 0) (the-as uint (-> self control transv))) + (set! (-> a1-0 param 1) (the-as uint s5-0)) + (let ((s3-0 (send-event-function (handle->process (-> self carry other)) a1-0)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-0 quad) (-> self control trans quad)) + (set! (-> (new 'stack-no-clear 'vector) quad) (-> self control transv quad)) + (let ((a2-1 (new 'stack-no-clear 'collide-query)) + (v1-18 (-> self control)) + ) + (set! (-> a2-1 collide-with) (-> v1-18 root-prim prim-core collide-with)) + (set! (-> a2-1 ignore-process0) self) + (set! (-> a2-1 ignore-process1) #f) + (set! (-> a2-1 ignore-pat) (-> v1-18 pat-ignore-mask)) + (set! (-> a2-1 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide v1-18 (-> v1-18 transv) a2-1 (meters 1)) + ) + (vector-! gp-0 (-> self control trans) s4-0) + (let* ((s2-0 (-> self control dynam gravity-normal)) + (f30-0 (- (vector-dot s2-0 gp-0) (vector-dot s2-0 s5-0))) + (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) 'carry-info) + (let* ((s1-0 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-4))) + (f0-2 (distance-from-destination (-> self carry) s1-0)) + ) + (cond + ((not s3-0) + ) + ((>= f0-2 0.0) + (let ((v1-38 (vector-float*! (new 'stack-no-clear 'vector) s2-0 f30-0))) + (vector+! (-> s1-0 hold-trans) (-> s1-0 hold-trans) v1-38) + ) + (let ((v1-39 (new-stack-vector0))) + (let ((f0-4 (vector-dot (-> self control dynam gravity-normal) s5-0))) + 0.0 + (vector-! v1-39 s5-0 (vector-float*! v1-39 (-> self control dynam gravity-normal) f0-4)) + ) + (let ((f0-5 (vector-length v1-39))) + f0-5 + (let ((f0-6 f0-5) + (v1-42 (new-stack-vector0)) + ) + (let ((f1-6 (vector-dot (-> self control dynam gravity-normal) gp-0))) + 0.0 + (vector-! v1-42 gp-0 (vector-float*! v1-42 (-> self control dynam gravity-normal) f1-6)) + ) + (let ((f1-7 (vector-length v1-42))) + f1-7 + (when (< f0-6 f1-7) + (let ((v1-46 (new-stack-vector0)) + (f0-8 (vector-dot (-> self control dynam gravity-normal) gp-0)) + ) + 0.0 + (vector-! v1-46 gp-0 (vector-float*! v1-46 (-> self control dynam gravity-normal) f0-8)) + (let ((f1-11 (vector-length v1-46)) + (a0-43 (new-stack-vector0)) + ) + (let ((f2-3 (vector-dot (-> self control dynam gravity-normal) s5-0))) + 0.0 + (vector-! a0-43 s5-0 (vector-float*! a0-43 (-> self control dynam gravity-normal) f2-3)) + ) + (let ((f2-4 (vector-length a0-43))) + f2-4 + (let ((f2-5 f2-4)) + (vector+! + gp-0 + (vector-float*! gp-0 (-> self control dynam gravity-normal) f0-8) + (vector-float*! v1-46 v1-46 (/ f2-5 f1-11)) + ) + ) + ) + ) + ) + (let ((a1-25 (vector+! (new 'stack-no-clear 'vector) s4-0 gp-0))) + (move-to-point! (-> self control) a1-25) + ) + ) + ) + ) + ) + ) + ) + (else + (send-event self 'drop (seconds 0.5)) + ) + ) + ) + ) + ) + ) + ) + ) + (else + (let ((a2-17 (new 'stack-no-clear 'collide-query)) + (v1-54 (-> self control)) + ) + (set! (-> a2-17 collide-with) (-> v1-54 root-prim prim-core collide-with)) + (set! (-> a2-17 ignore-process0) self) + (set! (-> a2-17 ignore-process1) #f) + (set! (-> a2-17 ignore-pat) (-> v1-54 pat-ignore-mask)) + (set! (-> a2-17 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide v1-54 (-> v1-54 transv) a2-17 (meters 1)) + ) + ) + ) + (when (logtest? (-> self control status) (collide-status touch-wall)) + (let ((v1-61 (vector-! (new 'stack-no-clear 'vector) (-> self control wall-contact-pt) (-> self control trans)))) + (set! (-> v1-61 y) 0.0) + (when (< (vector-dot v1-61 (-> self control c-R-w fvec)) 0.0) + (set-time! (-> self mech back-touch-time)) + (set! (-> self mech back-touch-point quad) (-> self control wall-contact-pt quad)) + (set! (-> self mech back-touch-trans quad) (-> self control trans quad)) + ) + ) + ) + 0 + (none) + ) + +(defbehavior target-mech-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 (-> self control pad-magnitude))) + (if (or (and (< 0.0 f28-0) + (< 0.3 (-> self control pad-magnitude)) + (< (vector-dot (-> self control pad-xz-dir) (-> self control last-pad-xz-dir)) 0.2) + (< f28-0 0.7) + ) + (-> self mech stick-off) + ) + (set! f28-0 0.0) + ) + (when (!= (-> self control force-turn-to-strength) 0.0) + (let ((f0-15 (fmin 1.0 (-> self control force-turn-to-strength)))) + (set! (-> self control force-turn-to-strength) f0-15) + (let ((a1-2 (vector-float*! + (new 'stack-no-clear 'vector) + (if (= f28-0 0.0) + *zero-vector* + s5-0 + ) + f28-0 + ) + ) + (a2-1 (vector-float*! + (new 'stack-no-clear 'vector) + (-> self control force-turn-to-direction) + (-> self control force-turn-to-speed) + ) + ) + ) + (vector-lerp! s5-0 a1-2 a2-1 f0-15) + ) + ) + (set! f28-0 (vector-length s5-0)) + (vector-normalize! s5-0 1.0) + ) + (turn-to-vector s5-0 f28-0) + ) + ) + (cond + ((and (logtest? (-> self control mod-surface flags) (surface-flag air)) + (not (logtest? (-> self control status) (collide-status on-surface))) + ) + (add-thrust) + ) + (else + (let* ((v1-51 (-> self control target-transv)) + (f0-20 (sqrtf (+ (* (-> v1-51 x) (-> v1-51 x)) (* (-> v1-51 z) (-> v1-51 z))))) + ) + (set-vector! (-> self control target-transv) 0.0 0.0 f0-20 1.0) + ) + (target-mech-add-thrust) + ) + ) + (add-gravity) + (do-rotations2) + (reverse-conversions (-> self control transv)) + (pre-collide-setup) + (target-mech-collision) + (bend-gravity) + (post-flag-setup) + ) + ) + (update-rates! (-> self clock) f30-0) + ) + (ja-post) + (joint-points) + (do-target-gspot) + (target-powerup-process) + (vector+! (-> self mech mech-trans) (-> self control trans) (-> self control cspace-offset)) + (quaternion-copy! (the-as quaternion (-> self mech mech-quat)) (-> self control quat)) + (set! (-> self mech mech-scale quad) (-> self control scale quad)) + (vector+! (-> self alt-cam-pos) (-> self control camera-pos) (new 'static 'vector :y 4096.0 :w 1.0)) + (set-time! (-> self mech mech-time)) + (target-mech-effect) + 0 + (none) + ) + +(defbehavior target-mech-post target () + (target-mech-real-post) + (none) + ) diff --git a/goal_src/jak3/engine/target/pilot-states.gc b/goal_src/jak3/engine/target/pilot-states.gc index 93adbaed9d..3d33624e54 100644 --- a/goal_src/jak3/engine/target/pilot-states.gc +++ b/goal_src/jak3/engine/target/pilot-states.gc @@ -7,3 +7,1148 @@ ;; DECOMP BEGINS +(defstate target-pilot-start (target) + :event target-pilot-handler + :exit target-pilot-exit + :code (behavior ((arg0 handle) (arg1 symbol) (arg2 symbol)) + (target-pilot-init arg0 arg2) + (suspend) + (remove-exit) + (if arg1 + (go target-pilot-stance) + (go target-pilot-get-on) + ) + ) + :post target-post + ) + +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior target-pilot-bike-anim-loop target () + (ja-channel-push! 3 (seconds 0.1)) + (ja :group! jakb-pilot-bike-turn-back-ja) + (ja :chan 1 :group! jakb-pilot-bike-turn-front-ja) + (ja :chan 2 :group! jakb-pilot-bike-up-down-ja) + (until #f + (let ((gp-0 (-> self pilot))) + (let ((f30-0 (* 5.0 (- 1.0 (-> gp-0 left-right-interp))))) + (ja :num-func num-func-identity :frame-num (ja-aframe f30-0 0)) + (let ((f0-3 (fmax 0.0 (fmin 1.0 (* 0.5 (+ 1.0 (* 1.42 (+ -0.3 (-> gp-0 front-back-interp))))))))) + (ja :chan 1 + :frame-interp0 f0-3 + :frame-interp1 f0-3 + :num-func num-func-identity + :frame-num (ja-aframe f30-0 1) + ) + ) + ) + (let ((f0-6 (* 5.0 (- 1.0 (-> gp-0 up-down-interp)))) + (s5-2 (-> self skel root-channel 2)) + ) + (let ((f1-7 (fabs (-> gp-0 up-down-interp)))) + (set! (-> s5-2 frame-interp 1) f1-7) + (set! (-> s5-2 frame-interp 0) f1-7) + ) + (set! (-> s5-2 num-func) num-func-identity) + (set! (-> s5-2 frame-num) (ja-aframe f0-6 2)) + ) + ) + (can-play-stance-amibent?) + (suspend) + ) + #f + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior target-pilot-car-anim-loop target () + (ja-channel-push! 3 (seconds 0.1)) + (ja :group! jakb-pilot-car-turn-back-ja) + (ja :chan 1 :group! jakb-pilot-car-turn-front-ja) + (ja :chan 2 :group! jakb-pilot-car-up-down-ja) + (until #f + (let ((gp-0 (-> self pilot))) + (let ((f30-0 (* 5.0 (+ 1.0 (-> gp-0 left-right-interp))))) + (ja :num-func num-func-identity :frame-num (ja-aframe f30-0 0)) + (let ((s5-1 (-> self skel root-channel 1))) + (let ((f0-3 (* 0.5 (+ 1.0 (-> gp-0 front-back-interp))))) + (set! (-> s5-1 frame-interp 1) f0-3) + (set! (-> s5-1 frame-interp 0) f0-3) + ) + (set! (-> s5-1 num-func) num-func-identity) + (set! (-> s5-1 frame-num) (ja-aframe f30-0 1)) + ) + ) + (let ((f0-6 (* 10.0 (- 1.0 (-> gp-0 up-down-interp)))) + (s5-2 (-> self skel root-channel 2)) + ) + (let ((f1-7 (fabs (-> gp-0 up-down-interp)))) + (set! (-> s5-2 frame-interp 1) f1-7) + (set! (-> s5-2 frame-interp 0) f1-7) + ) + (set! (-> s5-2 num-func) num-func-identity) + (set! (-> s5-2 frame-num) (ja-aframe f0-6 2)) + ) + ) + (can-play-stance-amibent?) + (suspend) + ) + #f + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior target-pilot-wcar-anim-loop target () + (ja-channel-push! 3 (seconds 0.1)) + (ja :group! jakb-pilot-wcar-turn-back-ja) + (ja :chan 1 :group! jakb-pilot-wcar-turn-front-ja) + (ja :chan 2 :group! jakb-pilot-car-up-down-ja) + (until #f + (let ((gp-0 (-> self pilot))) + (let ((f30-0 (* 5.0 (+ 1.0 (-> gp-0 left-right-interp))))) + (ja :num-func num-func-identity :frame-num (ja-aframe f30-0 0)) + (let ((s5-1 (-> self skel root-channel 1))) + (let ((f0-3 (* 0.5 (+ 1.0 (-> gp-0 front-back-interp))))) + (set! (-> s5-1 frame-interp 1) f0-3) + (set! (-> s5-1 frame-interp 0) f0-3) + ) + (set! (-> s5-1 num-func) num-func-identity) + (set! (-> s5-1 frame-num) (ja-aframe f30-0 1)) + ) + ) + (let ((f0-6 (* 10.0 (- 1.0 (-> gp-0 up-down-interp)))) + (s5-2 (-> self skel root-channel 2)) + ) + (let ((f1-7 (fabs (-> gp-0 up-down-interp)))) + (set! (-> s5-2 frame-interp 1) f1-7) + (set! (-> s5-2 frame-interp 0) f1-7) + ) + (set! (-> s5-2 num-func) num-func-identity) + (set! (-> s5-2 frame-num) (ja-aframe f0-6 2)) + ) + ) + (can-play-stance-amibent?) + (suspend) + ) + #f + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior target-pilot-glider-anim-loop target () + (ja-channel-push! 2 (seconds 0.1)) + (ja :group! jakb-pilot-glider-turn-back-ja) + (ja :chan 1 :group! jakb-pilot-glider-turn-front-ja) + (until #f + (let* ((gp-0 (-> self pilot)) + (f30-0 (* 5.0 (- 1.0 (-> gp-0 left-right-interp)))) + ) + (ja :num-func num-func-identity :frame-num (ja-aframe f30-0 0)) + (let ((s5-1 (-> self skel root-channel 1))) + (let ((f0-3 (* 0.5 (+ 1.0 (-> gp-0 front-back-interp))))) + (set! (-> s5-1 frame-interp 1) f0-3) + (set! (-> s5-1 frame-interp 0) f0-3) + ) + (set! (-> s5-1 num-func) num-func-identity) + (set! (-> s5-1 frame-num) (ja-aframe f30-0 1)) + ) + ) + (can-play-stance-amibent?) + (suspend) + ) + #f + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior target-daxter-pilot-car-anim-loop target () + (ja-channel-push! 3 (seconds 0.1)) + (ja :group! jakb-wings-lightjak-stance-ja) + (ja :chan 1 :group! jakb-wings-lightjak-get-on-land-ja) + (ja :chan 2 :group! jakb-wings-lightjak-swoop-fall-loop-ja) + (until #f + (when (or (-> self pilot jumping?) (let ((v1-14 (ja-group))) + (and v1-14 (= v1-14 jakb-wings-lightjak-swoop1-ja)) + ) + ) + (let ((v1-20 (ja-group))) + (if (not (and v1-20 (= v1-20 jakb-wings-lightjak-swoop1-ja))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (ja :group! jakb-wings-lightjak-swoop1-ja :num! (seek!)) + (when (ja-done? 0) + (ja-channel-push! 3 (seconds 0.3)) + (ja :group! jakb-wings-lightjak-stance-ja) + (ja :chan 1 :group! jakb-wings-lightjak-get-on-land-ja) + (ja :chan 2 :group! jakb-wings-lightjak-swoop-fall-loop-ja) + (set! (-> self pilot jumping?) #f) + ) + ) + (when (and (not (-> self pilot jumping?)) (let ((v1-57 (ja-group))) + (not (and v1-57 (= v1-57 jakb-wings-lightjak-swoop1-ja))) + ) + ) + (let ((gp-0 (-> self pilot))) + (let ((f30-0 (* 5.0 (+ 1.0 (-> gp-0 left-right-interp))))) + (ja :num-func num-func-identity :frame-num (ja-aframe f30-0 0)) + (let ((s5-1 (-> self skel root-channel 1))) + (let ((f0-6 (* 0.5 (+ 1.0 (-> gp-0 front-back-interp))))) + (set! (-> s5-1 frame-interp 1) f0-6) + (set! (-> s5-1 frame-interp 0) f0-6) + ) + (set! (-> s5-1 num-func) num-func-identity) + (set! (-> s5-1 frame-num) (ja-aframe f30-0 1)) + ) + ) + (let* ((f30-1 (* 10.0 (- 1.0 (-> gp-0 up-down-interp)))) + (f0-9 (ja-aframe-num 2)) + (f28-0 (-> self skel root-channel 2 frame-interp 0)) + (f30-2 (seek f0-9 f30-1 (* 30.0 (seconds-per-frame)))) + (f0-16 (seek f28-0 (fabs (-> gp-0 up-down-interp)) (* 4.0 (seconds-per-frame)))) + ) + (ja :chan 2 + :frame-interp0 f0-16 + :frame-interp1 f0-16 + :num-func num-func-identity + :frame-num (ja-aframe f30-2 2) + ) + ) + ) + ) + (can-play-stance-amibent?) + (suspend) + ) + #f + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior target-pilot-trans target () + (let ((gp-0 (-> self pilot))) + (process-drawable-set-riding self #t) + ;; og:preserve-this + (let* ((v1-0 (-> gp-0 vehicle)) + (a0-1 v1-0) + (s5-0 (the vehicle (handle->process v1-0))) + ) + (cond + ((not s5-0) + (ja-channel-set! 0) + (go target-falling #f) + ) + (#t + (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)) + (set! (-> gp-0 accel-array 4 quad) (-> gp-0 accel-array 3 quad)) + (set! (-> gp-0 accel-array 3 quad) (-> gp-0 accel-array 2 quad)) + (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 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))))) + (s5-1 (-> gp-0 local-accel)) + ) + (let ((f1-6 + (+ (-> gp-0 controls steering) + (-> gp-0 left-right-bias) + (* 0.03 (sin f30-0)) + (* -1.0 (-> s5-1 x) (-> gp-0 left-right-accel-factor)) + ) + ) + ) + (set! (-> gp-0 left-right-interp) + (fmax + (fmin + (+ (-> gp-0 left-right-interp) (* 8.0 (- f1-6 (-> gp-0 left-right-interp)) (seconds-per-frame))) + (-> gp-0 left-right-max) + ) + (-> gp-0 left-right-min) + ) + ) + ) + (let ((f3-1 + (+ (-> gp-0 controls lean-z) (* 0.03 (cos f30-0)) (* -1.0 (-> s5-1 z) (-> gp-0 front-back-accel-factor))) + ) + ) + (set! (-> gp-0 front-back-interp) + (fmax + -1.0 + (fmin 1.0 (+ (-> gp-0 front-back-interp) (* 8.0 (- f3-1 (-> gp-0 front-back-interp)) (seconds-per-frame)))) + ) + ) + ) + (let ((f3-5 (+ (* 0.03 (cos f30-0)) (* -1.0 (-> s5-1 y) (-> gp-0 up-down-accel-factor))))) + (set! (-> gp-0 up-down-interp) + (fmax + -1.0 + (fmin 1.0 (+ (-> gp-0 up-down-interp) (* 8.0 (- f3-5 (-> gp-0 up-down-interp)) (seconds-per-frame)))) + ) + ) + ) + ) + (when (and (-> self next-state) (= (-> self next-state name) 'target-pilot-stance)) + (let* ((v1-65 (-> gp-0 accel-array)) + (f0-30 (+ (* (-> v1-65 0 x) (-> v1-65 0 x)) (* (-> v1-65 0 z) (-> v1-65 0 z)))) + ) + (if (or (and (-> self pilot as-daxter?) (let ((f1-25 1024000.0)) + (< (* f1-25 f1-25) f0-30) + ) + ) + (let ((f1-28 2048000.0)) + (< (* f1-28 f1-28) f0-30) + ) + ) + (go target-pilot-impact) + ) + ) + ) + ) + (else + (go target-pilot-get-off (the-as handle a0-1)) + ) + ) + ) + ) + (none) + ) + +(defbehavior target-pilot-signal-ready target () + (when (not (focus-test? self pilot-riding)) + (logior! (-> self focus-status) (focus-status pilot-riding)) + (let ((gp-0 (handle->process (-> self pilot vehicle)))) + (when gp-0 + (if (logtest? #x80000 (-> (the-as vehicle gp-0) info flags)) + (set-setting! 'cloth #f 0.0 0) + ) + (if (logtest? #x100000 (-> (the-as vehicle gp-0) info flags)) + (set-setting! 'armor #f 0.0 0) + ) + (send-event gp-0 'pilot-on (-> self pilot seat-index)) + ) + ) + ) + ) + +(defstate target-pilot-stance (target) + :event target-pilot-handler + :exit target-pilot-exit + :trans (behavior () + (target-pilot-trans) + ) + :code (behavior () + (local-vars (v1-9 uint)) + (target-pilot-signal-ready) + (logior! (-> self target-flags) (target-flags tf6)) + (set! (-> self control mod-surface) *pilot-mods*) + (logior! (-> self control status) (collide-status on-surface on-ground)) + (cond + ((-> self pilot as-daxter?) + (target-daxter-pilot-car-anim-loop) + ) + ((begin (set! v1-9 (-> self pilot stance)) (zero? v1-9)) + (target-pilot-bike-anim-loop) + ) + ((= v1-9 1) + (target-pilot-car-anim-loop) + ) + ((= v1-9 2) + (target-pilot-wcar-anim-loop) + ) + ((= v1-9 3) + (target-pilot-glider-anim-loop) + ) + (else + (until #f + (suspend) + ) + #f + ) + ) + ) + :post (behavior () + (target-pilot-post) + ) + ) + +(defstate target-pilot-impact (target) + :event target-pilot-handler + :exit target-pilot-exit + :trans target-pilot-trans + :code (behavior () + (local-vars (v1-1 float) (v1-196 int)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (-> self pilot))) + (.lvf vf1 (&-> (-> gp-0 local-accel) 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-1 vf1) + (let ((f0-0 v1-1) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> gp-0 local-accel quad)) + (set! (-> s5-0 x) (* 4.0 (-> s5-0 x))) + (vector-float*! s5-0 s5-0 (/ 1.0 (sqrtf f0-0))) + (let ((s4-0 (cond + ((< 0.707 (-> s5-0 x)) + 5 + ) + ((< (-> s5-0 x) -0.707) + 4 + ) + ((< 0.707 (-> s5-0 y)) + 3 + ) + ((< (-> s5-0 y) -0.707) + 2 + ) + ((< 0.707 (-> s5-0 z)) + 1 + ) + ((< (-> s5-0 z) -0.707) + 0 + ) + (else + 6 + ) + ) + ) + ) + (cond + ((-> self pilot as-daxter?) + (ja-channel-push! 1 (seconds 0.05)) + (when (and (not (or (= s4-0 4) (= s4-0 5))) (!= s4-0 6)) + (if (< 0.0 (-> s5-0 x)) + (set! s4-0 5) + (set! s4-0 4) + ) + ) + (cond + ((= s4-0 4) + (ja-no-eval :group! jakb-wings-lightjak-swoop-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= s4-0 5) + (ja-no-eval :group! jakb-shield-shield-lod0-jg :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + (else + (let ((v1-73 (-> self pilot stance))) + (cond + ((zero? v1-73) + (ja-channel-push! 1 (seconds 0.05)) + (let ((v1-74 s4-0)) + (cond + ((= v1-74 4) + (ja-no-eval :group! jakb-pilot-bike-smack-left-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= v1-74 5) + (ja-no-eval :group! jakb-pilot-bike-smack-right-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((zero? v1-74) + (ja-no-eval :group! jakb-pilot-bike-smack-front-ja :num! (seek!) :frame-num (ja-aframe 0.0 0)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= v1-74 1) + (ja-no-eval :group! jakb-pilot-bike-smack-back-ja :num! (seek!) :frame-num (ja-aframe 0.0 0)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :group! jakb-pilot-bike-smack-shock-ja :num! (seek!) :frame-num (ja-aframe 0.0 0)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + ) + ((= v1-73 3) + (suspend) + 0 + ) + ((begin (ja-channel-push! 1 (seconds 0.05)) (set! v1-196 s4-0) (= v1-196 4)) + (ja-no-eval :group! jakb-pilot-car-smack-left-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= v1-196 5) + (ja-no-eval :group! jakb-pilot-car-smack-right-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((zero? v1-196) + (ja-no-eval :group! jakb-pilot-car-smack-front-ja :num! (seek! max 1.3) :frame-num (ja-aframe 4.0 0)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.3)) + ) + ) + ((= v1-196 1) + (ja-no-eval :group! jakb-pilot-car-smack-back-ja :num! (seek!) :frame-num (ja-aframe 2.0 0)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :group! jakb-pilot-car-smack-shock-ja :num! (seek!) :frame-num (ja-aframe 0.0 0)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + ) + ) + ) + ) + (.svf (&-> (-> gp-0 accel-array) 0 quad) vf0) + ) + (go target-pilot-stance) + ) + ) + :post target-pilot-post + ) + +(defstate target-pilot-daxter-perch (target) + :event target-pilot-handler + :exit target-pilot-exit + :trans target-pilot-trans + :code (behavior () + (set! (-> self control unknown-word04) (the-as uint #f)) + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! jakb-pilot-wcar-snake-in-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (loop + (ja-no-eval :group! jakb-pilot-wcar-snake-loop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (if (-> self control unknown-spool-anim00) + (goto cfg-11) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + (label cfg-11) + (ja-no-eval :group! jakb-pilot-wcar-snake-out-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go target-pilot-stance) + ) + :post target-pilot-post + ) + +(let ((v1-12 (copy *empty-mods* 'loading-level))) + (set! (-> v1-12 flags) (surface-flag)) + (set! *pilot-get-on-mods* v1-12) + ) + +(defstate target-pilot-get-on (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('end-mode) + (let ((v1-1 (-> block param 0)) + (a0-1 'pilot) + ) + (when (= v1-1 a0-1) + (cond + ((focus-test? self pilot-riding) + (go target-pilot-get-off (the-as handle a0-1)) + ) + (else + (ja-channel-set! 0) + (go target-falling #f) + ) + ) + ) + ) + ) + (else + (target-standard-event-handler proc argc message block) + ) + ) + ) + :exit target-pilot-exit + :trans (behavior () + (let* ((s5-0 (handle->process (-> self pilot vehicle))) + (t9-0 type?) + (a0-3 s5-0) + (gp-0 (if (t9-0 a0-3 vehicle) + s5-0 + ) + ) + ) + (cond + ((not gp-0) + (ja-channel-set! 0) + (go target-falling #f) + ) + ((focus-test? (the-as process-focusable gp-0) dead) + (go target-pilot-get-off (the-as handle a0-3)) + ) + (else + (vehicle-method-66 (the-as vehicle gp-0) (-> self control unknown-vector38) (-> self pilot seat-index)) + (set! (-> self control unknown-vector40 quad) (-> (the-as vehicle gp-0) root quat quad)) + ) + ) + ) + ) + :code (behavior () + (logior! (-> self focus-status) (focus-status pilot)) + (logior! (-> self target-flags) (target-flags tf6)) + (set! (-> self alt-cam-pos quad) (-> self control camera-pos quad)) + (sound-play "jump") + (let ((gp-1 (if (zero? (-> self pilot stance)) + jakb-pilot-bike-get-on-ja + jakb-pilot-car-get-on-ja + ) + ) + ) + (ja-channel-set! 1) + (set! (-> self control mod-surface) *pilot-get-on-mods*) + (send-event (ppointer->process (-> self manipy)) 'draw #t) + (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) + ) + ) + (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)) + (if (>= (ja-aframe-num 0) 20.5) + (target-pilot-signal-ready) + ) + (suspend) + (let ((a1-8 (handle->process (-> self pilot vehicle)))) + (if a1-8 + (set! (-> self alt-cam-pos quad) (-> (the-as vehicle a1-8) rbody position quad)) + ) + ) + (ja :num! (seek!)) + ) + (go target-pilot-stance) + ) + :post target-no-move-post + ) + +(let ((v1-15 (copy *forward-jump-mods* 'loading-level))) + (set! (-> v1-15 fric) 0.0) + (set! (-> v1-15 nonlin-fric-dist) 0.0) + (set! (-> v1-15 turnv) 0.0) + (set! (-> v1-15 turnvv) 0.0) + (set! (-> v1-15 tiltv) 131072.0) + (set! (-> v1-15 tiltvf) 30.0) + (set! (-> v1-15 mult-hook) + (the-as + (function surface surface surface int none) + (lambda :behavior target + ((arg0 surface) (arg1 surface) (arg2 surface) (arg3 int)) + (case arg3 + ((1) + (persist-with-delay *setting-control* 'rapid-tracking (seconds 0.05) 'rapid-tracking #f 0.0 0) + ) + ) + ) + ) + ) + (set! *pilot-get-off-mods* v1-15) + ) + +(defstate target-pilot-get-off (target) + :event target-standard-event-handler + :exit target-pilot-exit + :trans (behavior () + (let ((gp-0 (handle->process (-> self pilot vehicle)))) + (when (not (if (type? gp-0 vehicle) + gp-0 + ) + ) + (ja-channel-set! 0) + (go target-falling #f) + ) + ) + ) + :code (behavior ((arg0 handle)) + (local-vars (f30-0 float)) + (let ((v1-1 (-> self control root-prim))) + (set! (-> v1-1 prim-core collide-as) (-> self control backup-collide-as)) + (set! (-> v1-1 prim-core collide-with) (-> self control backup-collide-with)) + ) + (logclear! (-> self focus-status) (focus-status pilot-riding)) + (set! (-> self control mod-surface) *pilot-get-off-mods*) + (rot->dir-targ! (-> self control)) + (send-event *camera* 'set-dist #f #f) + (set! (-> self neck flex-blend) 0.0) + (persist-with-delay *setting-control* 'mode-name (seconds 0.05) 'mode-name 'cam-decel 0.0 0) + (persist-with-delay *setting-control* 'interp-time (seconds 0.05) 'interp-time 'hi 0.0 0) + (persist-with-delay *setting-control* 'interp-time (seconds 0.1) 'interp-time 'lo 300.0 0) + (persist-with-delay + *setting-control* + 'immediate-string-min-max + (seconds 0.05) + 'immediate-string-min-max + #f + 0.0 + 0 + ) + 0.0 + (let ((gp-0 (cond + ((zero? (-> self pilot stance)) + (set! f30-0 7.2) + jakb-pilot-bike-get-off-ja + ) + (else + (set! f30-0 15.2) + jakb-pilot-car-get-off-ja + ) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! gp-0 :num! (seek! (ja-aframe f30-0 0) 2.0) :frame-num 0.0) + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe f30-0 0) 2.0)) + ) + (let ((v1-37 (camera-matrix)) + (gp-2 (new 'stack-no-clear 'matrix)) + ) + (set! (-> gp-2 rvec quad) (-> v1-37 rvec quad)) + (set! (-> gp-2 uvec quad) (-> v1-37 fvec quad)) + (set! (-> gp-2 uvec y) 0.0) + (vector-normalize! (-> gp-2 uvec) 1.0) + (vector-reset! (-> gp-2 fvec)) + (vector+float*! + (-> gp-2 fvec) + (-> gp-2 fvec) + (-> gp-2 rvec) + (* 16384.0 (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 48.0 110.0 -1.0)) + ) + (vector+float*! + (-> gp-2 fvec) + (-> gp-2 fvec) + (-> gp-2 uvec) + (* 16384.0 (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 48.0 110.0 -1.0)) + ) + (vector+! (-> self control transv) (-> self control transv) (-> gp-2 fvec)) + ) + (let* ((f0-12 (vector-normalize-ret-len! (-> self control transv) 1.0)) + (f0-13 (fmin 122880.0 f0-12)) + ) + (vector-float*! (-> self control transv) (-> self control transv) f0-13) + ) + (go target-jump 10240.0 10240.0 *pilot-get-off-mods*) + ) + :post target-pilot-post + ) + +(defstate target-pilot-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-pilot-stance) + ) + (('gun) + (target-gun-end-mode #t) + ) + ) + ) + (('clone-anim) + (go target-pilot-clone-anim (process->handle (the-as process (-> block param 0)))) + ) + (('vehicle-crash) + (go target-grab 'stance) + ) + (else + (target-generic-event-handler proc argc message block) + ) + ) + ) + ) + ) + :enter (behavior () + (set! (-> self control mod-surface) *grab-mods*) + (set! (-> self neck flex-blend) 0.0) + (logior! (-> self target-flags) (target-flags tf2)) + (logior! (-> self focus-status) (focus-status grabbed)) + ) + :exit (behavior () + (logclear! (-> self target-flags) (target-flags tf2)) + (logclear! (-> self focus-status) (focus-status grabbed)) + (logclear! (-> self water flags) (water-flag jump-out)) + ((-> target-pilot-start exit)) + ) + :code (behavior () + (until #f + (set-forward-vel 0.0) + (suspend) + ) + #f + ) + :post target-pilot-post + ) + +(defstate target-pilot-clone-anim (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (if (and (= message 'trans) (= (-> block param 0) 'restore)) + (set! (-> self control unknown-word04) (the-as uint #f)) + ) + ((-> target-pilot-grab event) proc argc message block) + ) + :enter (-> target-clone-anim enter) + :exit (behavior () + (set! (-> self control draw-offset y) (the-as float (-> self control unknown-word04))) + (set! (-> self control cspace-offset y) (-> self control draw-offset y)) + (send-event (ppointer->process (-> self sidekick)) 'matrix #f) + ((-> target-clone-anim exit)) + ((-> target-pilot-start exit)) + (vector-reset! (-> self control transv)) + ) + :code (behavior ((arg0 handle)) + (set! (-> self control unknown-word04) (the-as uint (-> self control draw-offset y))) + (set! (-> self control draw-offset y) 0.0) + (send-event (ppointer->process (-> self sidekick)) 'matrix 'play-anim) + (clone-anim arg0 #t "") + (go target-pilot-stance) + ) + :post (behavior () + (vector+! (-> self pilot pilot-trans) (-> self control trans) (-> self control cspace-offset)) + (quaternion-copy! (the-as quaternion (-> self pilot pilot-quat)) (-> self control quat)) + (set! (-> self pilot pilot-scale quad) (-> self control scale quad)) + (target-no-ja-move-post) + ) + ) + +(defstate target-pilot-edge-grab (target) + :event (-> target-edge-grab event) + :enter (behavior ((arg0 pilot-edge-grab-info)) + (set! (-> self control status) (collide-status)) + (let ((gp-0 *edge-grab-info*)) + (mem-copy! (the-as pointer (-> gp-0 pilot-edge-grab)) (the-as pointer arg0) 40) + (set! (-> gp-0 pilot-grab-interp) 0.0) + (set! (-> gp-0 pilot-start-grab-pos quad) (-> self control trans quad)) + (set! (-> gp-0 actor-handle) (-> arg0 handle)) + ((-> target-edge-grab enter)) + (let* ((s5-1 (handle->process (-> gp-0 actor-handle))) + (a0-9 (if (type? s5-1 process-focusable) + s5-1 + ) + ) + ) + (set! (-> gp-0 pilot-edge-grab?) + (if (and a0-9 + (< 24576.0 (fabs (- (-> (get-trans (the-as process-focusable a0-9) 0) y) (-> self control trans y)))) + ) + 'target-double-jump + 'target-jump + ) + ) + ) + ) + ) + :exit (-> target-edge-grab exit) + :trans (-> target-edge-grab trans) + :code (-> target-edge-grab code) + :post target-no-move-post + ) + +(defstate target-pilot-hit (target) + :event target-generic-event-handler + :exit (behavior () + (if (not (and (-> self next-state) (= (-> self next-state name) 'target-death))) + (logclear! (-> self focus-status) (focus-status dead hit)) + ) + ((-> target-pilot-start exit)) + ) + :code (behavior ((arg0 symbol) (arg1 attack-info)) + (local-vars (sv-16 attack-info)) + (set-time! (-> self state-time)) + (set! (-> self neck flex-blend) 0.0) + (set! sv-16 (-> self attack-info)) + (let ((v1-4 sv-16)) + (set! (-> v1-4 attacker) (the-as handle #f)) + (set! (-> v1-4 mode) 'generic) + (set! (-> v1-4 shove-back) 6144.0) + (set! (-> v1-4 shove-up) 4915.2) + (set! (-> v1-4 angle) #f) + (set! (-> v1-4 trans quad) (-> self control trans quad)) + (set! (-> v1-4 control) 0.0) + (set! (-> v1-4 invinc-time) (-> *TARGET-bank* hit-invulnerable-timeout)) + (set! (-> v1-4 damage) (-> *FACT-bank* health-default-inc)) + ) + (combine! sv-16 arg1 self) + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (go target-pilot-death (-> sv-16 mode)) + ) + :post target-no-stick-post + ) + +(defstate target-pilot-death (target) + :event (-> target-death event) + :exit (behavior () + ((-> target-pilot-start exit)) + ((-> target-death exit)) + ) + :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) + (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) + (case arg0 + (('bot) + (set-setting! 'process-mask 'set 0.0 (process-mask platform projectile death)) + ) + (('endlessfall 'instant-death 'lava 'dark-eco-pool 'melt 'explode 'grenade 'drown-death) + (set-setting! 'process-mask 'set 0.0 (process-mask enemy platform projectile death)) + ) + (else + (set-setting! 'process-mask 'set 0.0 (process-mask enemy platform projectile death)) + (when (using-gun? self) + (send-event (ppointer->process (-> self gun gun)) 'notice 'die) + (target-gun-end-mode #f) + ) + ) + ) + (set-setting! 'mode-name 'cam-fixed 0.0 0) + (set-setting! 'interp-time 'abs 0.0 0) + (apply-settings *setting-control*) + (set! (-> self control transv quad) (the-as uint128 0)) + (logior! (-> self focus-status) (focus-status dead)) + (case arg0 + (('melt 'grenade 'explode) + (let ((s5-1 (current-time))) + (until (time-elapsed? s5-1 (seconds 0.2)) + (suspend) + ) + ) + (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)) + ) + ) + ) + (('grenade 'explode) + (sound-play "explosion") + (cond + ((logtest? (-> *part-group-id-table* 65 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* 65)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 65)) + ) + ) + ) + (('lava 'melt) + (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-158 (-> self control root-prim))) + (set! (-> v1-158 prim-core collide-as) (collide-spec)) + (set! (-> v1-158 prim-core collide-with) (collide-spec)) + ) + 0 + (ja-channel-set! 0) + (let ((s5-11 (current-time))) + (until (time-elapsed? s5-11 (seconds 1.8)) + (suspend) + ) + ) + ) + (('endlessfall) + (sound-play "death-fall") + (if (not (-> self pilot as-daxter?)) + (set! (-> self control unknown-sound-id00) + (add-process *gui-control* *target* (gui-channel daxter) (gui-action play) "jakfall" -99.0 0) + ) + ) + (sound-params-set! *gui-control* (-> self control unknown-sound-id00) #t -1 100 2 -1.0) + (logclear! (-> self water flags) (water-flag swim-ground)) + (let ((f0-5 (fmin -4096.0 (- (-> self control ground-impact-vel))))) + (set! (-> self control unknown-word04) (the-as uint f0-5)) + (let ((v1-179 (new-stack-vector0))) + (let ((f1-3 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-179 (-> self control transv) (vector-float*! v1-179 (-> self control dynam gravity-normal) f1-3)) + ) + (let* ((f1-4 (vector-length v1-179)) + (f2-1 f1-4) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f0-5) + (vector-float*! v1-179 v1-179 (/ f1-4 f2-1)) + ) + ) + ) + ) + (let ((s5-13 (current-time))) + (until (time-elapsed? s5-13 (seconds 0.5)) + (suspend) + ) + ) + ) + (('drown-death) + (logclear! (-> self water flags) (water-flag swim-ground)) + (let ((f0-8 (fmin -4096.0 (- (-> self control ground-impact-vel))))) + (set! (-> self control unknown-word04) (the-as uint f0-8)) + (let ((v1-190 (new-stack-vector0))) + (let ((f1-8 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-190 (-> self control transv) (vector-float*! v1-190 (-> self control dynam gravity-normal) f1-8)) + ) + (let* ((f1-9 (vector-length v1-190)) + (f2-3 f1-9) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f0-8) + (vector-float*! v1-190 v1-190 (/ f1-9 f2-3)) + ) + ) + ) + ) + (let ((s5-14 (current-time))) + (until (time-elapsed? s5-14 (seconds 2)) + (suspend) + ) + ) + ) + (('bot) + (set! (-> self trans-hook) #f) + (while (not (-> self control unknown-spool-anim00)) + (set-forward-vel 0.0) + (suspend) + ) + ) + (('big-explosion) + (let ((s5-15 (current-time))) + (until (time-elapsed? s5-15 (seconds 2)) + (suspend) + ) + ) + ) + (else + ) + ) + (target-death-reset arg0 #f) + ) + :post target-pilot-post + ) diff --git a/goal_src/jak3/engine/target/sidekick.gc b/goal_src/jak3/engine/target/sidekick.gc index c0a5505c42..7db7ed2d7c 100644 --- a/goal_src/jak3/engine/target/sidekick.gc +++ b/goal_src/jak3/engine/target/sidekick.gc @@ -16,9 +16,9 @@ :longest-edge (meters 1) :shadow daxter-shadow-mg :texture-level 10 + :sort 1 :origin-joint-index 6 :shadow-joint-index 6 - :light-index 1 ) (defskelgroup skel-sidekick-highres daxter-highres daxter-highres-lod0-jg -1 @@ -26,9 +26,9 @@ :bounds (static-spherem 0 0 0 3) :longest-edge (meters 1) :shadow daxter-highres-shadow-mg + :sort 1 :origin-joint-index 6 :shadow-joint-index 6 - :light-index 1 ) (define *sidekick-remap* @@ -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)) - ) - (else - (logclear! (-> self draw global-effect) (draw-control-global-effect no-textures)) - ) - ) - (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)) + ((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) + (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)) ) - (else - (let ((a0-37 (-> self parent 0 draw color-emissive quad))) - (set! (-> self draw color-emissive quad) a0-37) - ) - ) + (set! gp-0 1) + ) + (else + (joint-control-copy! (-> self skel) (-> self parent 0 skel)) ) ) - (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)) - ) - (the-as vector #f) - ) - (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)) + ) + (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) - ) - (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))) + (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) ) - (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) + ) + ) + (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 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)) ) - (seek! - (-> self flap 1 twist-max z) - (lerp-scale 0.0 5461.3335 f30-0 4096.0 122880.0) - (* 65536.0 (seconds-per-frame)) + (the-as vector #f) + ) + (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)) ) - (seek! (-> self flap 1 twist-speed-x) (lerp-scale 1.0 8.0 f30-0 4096.0 122880.0) (* 10.0 (seconds-per-frame))) + (the-as vector #f) ) - (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))) + (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 1) + (-> 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 1 twist z))) (-> self flap 1 twist-max z)) + (* (sin (* 32768.0 (-> self flap 0 twist z))) (-> self flap 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 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/goal_src/jak3/engine/target/target-anim.gc b/goal_src/jak3/engine/target/target-anim.gc index 69184187e6..467551b964 100644 --- a/goal_src/jak3/engine/target/target-anim.gc +++ b/goal_src/jak3/engine/target/target-anim.gc @@ -1271,10 +1271,7 @@ ) ) ) - (let ((v1-257 (-> self skel root-channel 6))) - (set! (-> v1-257 frame-interp 1) f26-0) - (set! (-> v1-257 frame-interp 0) f26-0) - ) + (ja :chan 6 :frame-interp0 f26-0 :frame-interp1 f26-0) (let* ((f1-14 (* (current-cycle-distance (-> self skel)) (-> self control scale x))) (f0-70 (/ (-> self control ctrl-xz-vel) (* 60.0 (/ f1-14 (-> *TARGET-bank* run-cycle-length))))) ) diff --git a/goal_src/jak3/engine/target/target-darkjak.gc b/goal_src/jak3/engine/target/target-darkjak.gc index 38b1bb9270..f0647c4716 100644 --- a/goal_src/jak3/engine/target/target-darkjak.gc +++ b/goal_src/jak3/engine/target/target-darkjak.gc @@ -5,5 +5,2490 @@ ;; name in dgo: target-darkjak ;; dgos: GAME +(define-extern *darkjak-ball-lightning* lightning-appearance) + ;; DECOMP BEGINS +(deftype darkjak-ball (projectile) + ((impact? symbol) + (fire-point vector :inline) + (explode-sound uint32) + (bolts (array lightning-bolt)) + (ball-pos vector 2 :inline) + (trail sparticle-launch-control) + (ball1 sparticle-launch-control) + (last-ground-height float) + (fire-sound sound-id) + ) + (:methods + (setup-bolts! (_type_ vector vector) none) + ) + ) + + +(defmethod relocate ((this darkjak-ball) (offset int)) + (dotimes (v1-0 (-> this bolts length)) + (if (nonzero? (-> this bolts v1-0)) + (&+! (-> this bolts v1-0) offset) + ) + ) + (if (nonzero? (-> this bolts)) + (&+! (-> this bolts) offset) + ) + (if (nonzero? (-> this trail)) + (&+! (-> this trail) offset) + ) + (if (nonzero? (-> this ball1)) + (&+! (-> this ball1) offset) + ) + (call-parent-method this offset) + ) + +(defmethod deactivate ((this darkjak-ball)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this fire-sound)) + (if (nonzero? (-> this trail)) + (kill-particles (-> this trail)) + ) + (if (nonzero? (-> this ball1)) + (kill-particles (-> this ball1)) + ) + (call-parent-method this) + (none) + ) + +(defun darkjak-ball-slide-reaction ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector)) + (cshape-reaction-update-state arg0 arg1 arg3) + (let ((a0-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) arg3 1.0))) + 0.0 + (if (< (vector-dot a0-3 (-> arg0 surface-normal)) -0.3) + (set! (-> (the-as darkjak-ball (-> arg0 process)) impact?) #t) + ) + ) + (let ((f0-4 (vector-dot arg3 (-> arg0 surface-normal))) + (s3-0 (new 'stack-no-clear 'vector)) + (f30-0 (vector-length arg3)) + ) + (vector-float*! s3-0 (-> arg0 surface-normal) (* 1.2 f0-4)) + (vector-! s3-0 arg3 s3-0) + (vector-normalize! s3-0 1.0) + (set! (-> s3-0 y) (fmin 0.4 (-> s3-0 y))) + (set-vector! arg2 (-> arg3 x) (-> s3-0 y) (-> arg3 z) 1.0) + (vector-normalize! arg2 f30-0) + ) + (-> arg0 status) + ) + +;; WARN: Return type mismatch object vs symbol. +(defmethod deal-damage! ((this darkjak-ball) (arg0 process) (arg1 event-message-block)) + (local-vars (sv-288 process) (sv-304 vector)) + (let ((s4-0 (new 'stack 'attack-info))) + (let ((v1-1 s4-0)) + (set! (-> v1-1 mode) (-> this attack-mode)) + (set! (-> v1-1 id) (-> this attack-id)) + (set! (-> v1-1 mask) (attack-mask mode id)) + (set! (-> v1-1 penetrate-using) (penetrate dark-smack)) + ) + (when (!= (-> this owner-handle) #f) + (set! (-> s4-0 attacker) (-> this owner-handle)) + (logior! (-> s4-0 mask) (attack-mask attacker)) + ) + (when (logtest? (-> this options) (projectile-options po13)) + (set! (-> s4-0 attacker-velocity quad) (-> this pre-move-transv quad)) + (logior! (-> s4-0 mask) (attack-mask attacker-velocity)) + ) + (set! (-> s4-0 damage) (-> this damage)) + (set! (-> s4-0 vehicle-damage-factor) (-> this vehicle-damage-factor)) + (set! (-> s4-0 vehicle-impulse-factor) (-> this vehicle-impulse-factor)) + (logior! (-> s4-0 mask) (attack-mask damage vehicle-damage-factor vehicle-impulse-factor)) + (when (logtest? (projectile-options po18) (-> this options)) + (set! (-> s4-0 invinc-time) (-> this invinc-time)) + (logior! (-> s4-0 mask) (attack-mask invinc-time)) + ) + (when arg1 + (let ((s2-0 (new 'stack-no-clear 'vector)) + (s1-0 ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry arg1) + (-> this root) + (the-as uint -1) + ) + ) + ) + (set! sv-288 arg0) + (let ((s0-0 (if (type? sv-288 process-focusable) + sv-288 + ) + ) + ) + (when s0-0 + (set! sv-304 s2-0) + (let ((v1-27 (-> (get-trans (the-as process-focusable s0-0) 3) quad))) + (set! (-> sv-304 quad) v1-27) + ) + (when (not (focus-test? (the-as process-focusable s0-0) hit)) + (if s1-0 + (get-intersect-point s2-0 s1-0 (-> this root) (the-as touching-shapes-entry arg1)) + ) + (cond + ((logtest? (-> *part-group-id-table* 77 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> s2-0 quad)) + (part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 77)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> s2-0 quad)) + (part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 77)) + ) + ) + (sound-play "djak-strike-ko") + ) + ) + ) + ) + ) + (the-as symbol (send-event + arg0 + (if (logtest? (projectile-options po19) (-> this options)) + 'attack-invinc + 'attack + ) + arg1 + s4-0 + ) + ) + ) + ) + +(defmethod setup-collision! ((this darkjak-ball)) + (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) darkjak-ball-slide-reaction) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate dark-smack)) + (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 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 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 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) + ) + 0 + (none) + ) + +(defun darkjak-ball-move ((arg0 darkjak-ball)) + (projectile-move-fill-line-sphere arg0) + (sound-play "hadouken-loop" :id (-> arg0 fire-sound) :position (-> arg0 root trans)) + (seek! (-> arg0 root transv y) 0.0 (* 81920.0 (seconds-per-frame))) + (seek! (-> arg0 root root-prim local-sphere w) 24576.0 (* 24576.0 (seconds-per-frame))) + (let ((v1-16 (-> (the-as collide-shape-prim-group (-> arg0 root root-prim)) child 0)) + (a0-10 (-> (the-as collide-shape-prim-group (-> arg0 root root-prim)) child 1)) + ) + (set! (-> v1-16 local-sphere w) (* 0.1 (-> arg0 root root-prim local-sphere w))) + (set! (-> a0-10 local-sphere w) (-> arg0 root root-prim local-sphere w)) + ) + (let ((s5-0 (new 'stack-no-clear 'collide-query)) + (v1-20 (new 'stack-no-clear 'vector)) + (f30-0 (* 0.5 (-> arg0 root root-prim local-sphere w))) + ) + (set! (-> v1-20 quad) (-> arg0 root trans quad)) + (vector+float*! (-> s5-0 start-pos) v1-20 *up-vector* 0.0) + (set! (-> s5-0 move-dist quad) (the-as uint128 0)) + (set! (-> s5-0 move-dist y) (- f30-0)) + (let ((v1-22 s5-0)) + (set! (-> v1-22 radius) f30-0) + (set! (-> v1-22 collide-with) (collide-spec backgnd)) + (set! (-> v1-22 ignore-process0) #f) + (set! (-> v1-22 ignore-process1) #f) + (set! (-> v1-22 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-22 action-mask) (collide-action solid)) + ) + (when (!= (fill-and-probe-using-line-sphere *collide-cache* s5-0) -100000000.0) + (set! (-> arg0 last-ground-height) (-> s5-0 best-other-tri intersect y)) + (let ((f0-18 (- (+ (-> s5-0 best-other-tri intersect y) f30-0) (-> arg0 root trans y)))) + (if (< 0.0 f0-18) + (seek! (-> arg0 root trans y) (+ (-> s5-0 best-other-tri intersect y) f30-0) (* 40960.0 (seconds-per-frame))) + ) + ) + ) + ) + (if (and (< (fabs (- (-> arg0 root trans y) (-> arg0 fire-point y))) 6144.0) + (< 16384.0 (vector-length (-> arg0 root transv))) + ) + (set! (-> arg0 impact?) #f) + ) + (if (-> arg0 impact?) + (go (method-of-object arg0 impact)) + ) + (sound-play "djak-bolt-throw" :id (-> arg0 sound-id) :position (-> arg0 root trans)) + 0 + (none) + ) + +;; WARN: Return type mismatch smush-control vs none. +(defmethod projectile-method-26 ((this darkjak-ball)) + (sound-play "djak-strike-hit") + (cond + ((logtest? (-> *part-group-id-table* 76 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* 76)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 76)) + ) + ) + (activate! *camera-smush-control* 819.2 15 75 1.0 0.9 (-> *display* camera-clock)) + (none) + ) + +(defstate impact (darkjak-ball) + :virtual #t + :enter (behavior () + (sound-stop (-> self fire-sound)) + (dotimes (gp-0 (-> self bolts length)) + (lightning-bolt-method-13 (-> self bolts gp-0) 2) + ) + (when (nonzero? (-> self ball1)) + (kill-particles (-> self ball1)) + (set! (-> self ball1) (the-as sparticle-launch-control 0)) + 0 + ) + (when (nonzero? (-> self part)) + (kill-particles (-> self part)) + (set! (-> self part) (the-as sparticle-launch-control 0)) + 0 + ) + (let ((t9-5 (-> (find-parent-state) enter))) + (if t9-5 + (t9-5) + ) + ) + ) + :trans (behavior () + (dotimes (gp-0 (-> self bolts length)) + (lightning-bolt-method-11 (-> self bolts gp-0)) + (lightning-bolt-method-12 (-> self bolts gp-0)) + ) + ) + :code (behavior () + (set-time! (-> self state-time)) + (while (and (not (time-elapsed? (-> self state-time) (seconds 10))) (-> self child)) + (suspend) + ) + (go-virtual die) + ) + ) + +(if (or (zero? *darkjak-ball-lightning*) (!= loading-level global)) + (set! *darkjak-ball-lightning* (new 'loading-level 'lightning-appearance)) + ) + +(set! (-> *darkjak-ball-lightning* base-alpha) 1.0) + +(set! (-> *darkjak-ball-lightning* tex-id) (the-as uint #x403f00)) + +(set! (-> *darkjak-ball-lightning* blend-mode) (the-as uint 1)) + +(set! (-> *darkjak-ball-lightning* alpha-1-curve) *curve-linear-down*) + +(set! (-> *darkjak-ball-lightning* alpha-1-mode) (the-as uint 0)) + +(set! (-> *darkjak-ball-lightning* alpha-1-repeat-dist) 262144.0) + +(set! (-> *darkjak-ball-lightning* alpha-2-curve) #f) + +(set! (-> *darkjak-ball-lightning* alpha-2-mode) (the-as uint 3)) + +(set! (-> *darkjak-ball-lightning* alpha-2-repeat-dist) 4096.0) + +(set! (-> *darkjak-ball-lightning* width-curve) *curve-linear-down*) + +(set! (-> *darkjak-ball-lightning* width-mode) (the-as uint 3)) + +(set! (-> *darkjak-ball-lightning* width-repeat-dist) 4096.0) + +(set! (-> *darkjak-ball-lightning* uv-repeat-dist) 28672.0) + +(set! (-> *darkjak-ball-lightning* regenerate-time-start) (seconds 0.017)) + +(set! (-> *darkjak-ball-lightning* regenerate-time-end) (seconds 0.05)) + +(set! (-> *darkjak-ball-lightning* width-range-start) 12288.0) + +(set! (-> *darkjak-ball-lightning* width-range-end) 12288.0) + +(set! (-> *darkjak-ball-lightning* fade-time) (seconds 0.3)) + +(set! (-> *darkjak-ball-lightning* uv-shift?) #t) + +(set! (-> *darkjak-ball-lightning* uv-shift-speed) (seconds -0.5)) + +(set! (-> *darkjak-ball-lightning* use-sprite-bucket?) #t) + +(set! (-> *darkjak-ball-lightning* use-accurate-interp?) #t) + +(defpartgroup group-darkjak-hadouken + :id 172 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 624 :flags (sp7) :period (seconds 20) :length (seconds 4)) + (sp-item 625 :flags (sp7) :period (seconds 20) :length (seconds 4)) + (sp-item 626 :flags (sp7) :period (seconds 20) :length (seconds 4)) + (sp-item 627 :flags (sp3 sp7)) + ) + ) + +(defpartgroup group-darkjak-hadouken-trail + :id 173 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 628 :flags (sp7))) + ) + +(defpart 628 + :init-specs ((:texture (redpuff level-default-sprite)) + (:num 1.0) + (:x (meters -1) (meters 2)) + (:scale-x (meters 1) (meters 1)) + (:scale-y :copy scale-x) + (:r 0.0 64.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 32.0 32.0) + (:vel-x (meters -0.0016666667) 2.0 (meters 0.0033333334)) + (:scalevel-y (meters -0.001) (meters -0.006666667)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defmethod init-proj-settings! ((this darkjak-ball)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + (set! (-> this attack-mode) 'dark-smack) + (set! (-> this max-speed) 163840.0) + (set! (-> this move) darkjak-ball-move) + (set! (-> this timeout) (seconds 4)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this explode-sound) (the-as uint (new-sound-id))) + (set! (-> this damage) 8.0) + (set! (-> this vehicle-damage-factor) 2.0) + (set! (-> this vehicle-impulse-factor) 3.0) + (logior! (-> this options) (projectile-options po13)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 172) this)) + (set! (-> this ball1) (create-launch-control (-> *part-group-id-table* 172) this)) + (set! (-> this trail) (create-launch-control (-> *part-group-id-table* 173) this)) + (set! (-> this impact?) #f) + (set! (-> this max-hits) 1000) + (set! (-> this fire-point quad) (-> this root trans quad)) + (set! (-> this bolts) (new 'process 'boxed-array lightning-bolt 3)) + (dotimes (s5-0 (-> this bolts length)) + (set! (-> this bolts s5-0) (new 'process 'lightning-bolt)) + (init! (-> this bolts s5-0) 2 16 *darkjak-ball-lightning*) + ) + (set! (-> this fire-sound) (new-sound-id)) + (let ((a0-13 (-> this root transv))) + (set! (-> a0-13 quad) (-> this root transv quad)) + (set! (-> a0-13 y) 0.0) + (vector-normalize! a0-13 1.0) + ) + (vector-float*! (-> this root transv) (-> this root transv) 245760.0) + 0 + (none) + ) + +(define *darkjak-ball-lightning-colors* (new 'static 'boxed-array :type rgba + (new 'static 'rgba :r #xff :g #x20 :b #x80 :a #x80) + (new 'static 'rgba :r #x20 :g #x20 :b #xff :a #x80) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod setup-bolts! ((this darkjak-ball) (arg0 vector) (arg1 vector)) + (dotimes (s3-0 (-> this bolts length)) + (let ((s2-0 (-> this bolts s3-0))) + (set! (-> s2-0 base-color) (-> *darkjak-ball-lightning-colors* s3-0)) + (set! (-> s2-0 inner-point-travel-time) (seconds 0.085)) + (set! (-> s2-0 snap-inner-points?) #t) + (set! (-> s2-0 fractal-reduction) 0.7) + (set! (-> s2-0 generate-mode) (the-as uint 1)) + (set! (-> s2-0 appearance) *darkjak-ball-lightning*) + (set! (-> s2-0 num-active-spans) 2) + (set! (-> s2-0 spans data 0 random-offset-size-start) 2048.0) + (set! (-> s2-0 spans data 1 random-offset-size-start) 2048.0) + (set! (-> s2-0 spans-internal data 0 num-inner-points) 14) + (set! (-> s2-0 spans data 0 inner-random-offset-size) 8192.0) + (set! (-> s2-0 spans data 1 inner-random-offset-size) 8192.0) + (if arg0 + (set! (-> s2-0 span-pts-start data 0 quad) (-> arg0 quad)) + ) + (if arg1 + (set! (-> s2-0 span-pts-start data 1 quad) (-> arg1 quad)) + ) + (set! (-> s2-0 spans-internal data 1 num-inner-points) 0) + (lightning-bolt-method-11 s2-0) + (lightning-bolt-method-12 s2-0) + ) + ) + (none) + ) + +(defun sparticle-track-hadouken ((arg0 object) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((a3-0 (the-as darkjak-ball (-> arg1 key proc))) + (v1-1 (new 'stack-no-clear 'vector)) + ) + ;; og:preserve-this + (vector-copy! v1-1 (-> a3-0 ball-pos (-> arg1 user-int32))) + ;; (set! (-> v1-1 quad) + ;; (-> (the-as (pointer uint128) (+ (+ (* (-> arg1 user-float) 16) 556) (the-as int a3-0)))) + ;; ) + (set! (-> arg2 x) (-> v1-1 x)) + (set! (-> arg2 y) (-> v1-1 y)) + (set! (-> arg2 z) (-> v1-1 z)) + ) + 0 + (none) + ) + +(defpart 624 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 2.0) + (:scale-x (meters 1) (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.035)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'sparticle-track-hadouken) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 625 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.1) (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -5.12) + (:fade-g -10.2) + (:fade-a -2.56) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'sparticle-track-hadouken) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 626 + :init-specs ((:texture (water-radiate level-default-sprite)) + (:num 4.0) + (:scale-x (meters 4)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 2) (meters 2)) + (:r 0.0 16.0) + (:g 0.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-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:userdata 0.0) + (:func 'sparticle-track-hadouken) + (:next-time (seconds 0.017)) + (:next-launcher 629) + (:conerot-x (degrees -180) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 629 + :init-specs ((:a 255.0) (:fade-a -5.12)) + ) + +(defpart 627 + :init-specs ((:num 1.0) + (:rot-x 8) + (:r 32768.0) + (:g 2048.0) + (:b 8192.0) + (:timer (seconds 4)) + (:flags (distort)) + (:userdata 0.0) + (:func 'sparticle-track-hadouken) + (:rotate-y (degrees 0)) + ) + ) + +(defmethod projectile-method-25 ((this darkjak-ball)) + (let* ((f0-0 0.75) + (f1-0 65536.0) + (f2-1 (* 0.0033333334 (the float (current-time)))) + (f0-2 (* f1-0 (/ (- f2-1 (* (the float (the int (/ f2-1 f0-0))) f0-0)) f0-0))) + (s3-0 (vector-rotate-around-y! (new 'stack-no-clear 'vector) *x-vector* f0-2)) + (s5-0 (-> this ball-pos)) + (s4-0 (-> this ball-pos 1)) + ) + (vector-float*! s3-0 s3-0 (* 0.75 (-> this root root-prim local-sphere w))) + (vector+! (the-as vector s5-0) (-> this root trans) s3-0) + (set! (-> *part-id-table* 625 init-specs 16 initial-valuef) 0.0) + (set! (-> *part-id-table* 626 init-specs 16 initial-valuef) 0.0) + (set! (-> *part-id-table* 627 init-specs 7 initial-valuef) 0.0) + (set! (-> *part-id-table* 624 init-specs 11 initial-valuef) 0.0) + (spawn (-> this part) (the-as vector s5-0)) + (vector+float*! s4-0 (-> this root trans) s3-0 -1.0) + (set! (-> *part-id-table* 625 init-specs 16 initial-valuef) (the-as float #x1)) + (set! (-> *part-id-table* 626 init-specs 16 initial-valuef) (the-as float #x1)) + (set! (-> *part-id-table* 627 init-specs 7 initial-valuef) (the-as float #x1)) + (set! (-> *part-id-table* 624 init-specs 11 initial-valuef) (the-as float #x1)) + (spawn (-> this ball1) s4-0) + (let ((s3-1 (new 'stack-no-clear 'vector))) + (set! (-> s3-1 quad) (-> this root trans quad)) + (let ((s2-0 matrix-f-u-compose) + (s1-0 (new 'stack-no-clear 'matrix)) + (a0-21 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-21 quad) (-> this root transv quad)) + (set! (-> a0-21 y) 0.0) + (let ((a1-10 (s2-0 s1-0 (vector-normalize! a0-21 1.0) *up-vector*))) + (set! (-> s3-1 y) (-> this last-ground-height)) + (+! (-> s3-1 y) 1638.4) + (set! (-> a1-10 trans quad) (-> s3-1 quad)) + (spawn-from-mat (-> this trail) a1-10) + ) + ) + ) + (setup-bolts! this (the-as vector s5-0) s4-0) + ) + (none) + ) + +(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))) + (let* ((v1-4 (-> self game)) + (a0-5 (+ (-> v1-4 attack-id) 1)) + ) + (set! (-> v1-4 attack-id) a0-5) + (set! (-> self darkjak attack-id) a0-5) + ) + (set! (-> self darkjak hud 0) (the-as handle #f)) + (set! (-> self darkjak charge-effect) (the-as handle #f)) + (set! (-> self darkjak tone) (new-sound-id)) + (set! (-> self darkjak-giant-interp) 1.0) + (set! (-> self darkjak mode-sound-bank) #f) + (set! (-> self darkjak latch-out-time) 0) + 0 + ) + 0 + (none) + ) + +(defbehavior want-to-darkjak? target () + (and (not *pause-lock*) + (-> *setting-control* user-current darkjak) + (logtest? (the-as game-feature (logand (game-feature darkjak) (-> *setting-control* user-current features))) + (-> self game features) + ) + (not (focus-test? + self + dead + hit + grabbed + in-head + under-water + edge-grab + pole + flut + tube + light + board + pilot + mech + carry + indax + teleporting + ) + ) + (not (and (logtest? (-> self water flags) (water-flag under-water)) + (not (logtest? (-> self water flags) (water-flag swim-ground))) + ) + ) + (and (and (not (and (focus-test? self dark) (nonzero? (-> self darkjak)))) + (and (time-elapsed? (-> self fact darkjak-start-time) (seconds 0.05)) (< 0.0 (-> self game eco-pill-dark))) + ) + (zero? (-> self darkjak latch-out-time)) + ) + ) + ) + +(let ((v1-56 (copy *walk-mods* 'global))) + (set! (-> v1-56 name) 'darkjak) + (set! (-> v1-56 flags) (surface-flag gun-off)) + (set! *darkjak-trans-mods* v1-56) + ) + +(defbehavior target-darkjak-end-mode target ((arg0 symbol)) + (when (and (focus-test? self dark) (nonzero? (-> self darkjak))) + (cond + (arg0 + (set! (-> self lightjak get-off-lock) #f) + (set! (-> self darkjak lightning-count) 0) + (logclear! (-> self focus-status) (focus-status dark)) + (send-event self 'reset-collide) + (logclear! (-> self target-flags) (target-flags tf4)) + (remove-setting! 'sound-flava) + (remove-setting! 'string-min-length) + (remove-setting! 'string-max-length) + (remove-setting! 'string-spline-max-move) + (remove-setting! 'string-spline-accel) + (remove-setting! 'string-spline-max-move-player) + (remove-setting! 'string-spline-accel-player) + (setting-control-method-14 *setting-control* (-> self darkjak mode-sound-bank)) + (set! (-> self darkjak mode-sound-bank) #f) + (sound-stop (-> self darkjak tone)) + (set! (-> self pending-ext-anim) (target-anim default)) + (if (< (-> self game eco-pill-dark) 1.0) + (send-event self 'get-pickup (pickup-type eco-pill-dark) -1.0) + ) + (target-invisible-stop) + (let ((v1-45 (ja-group))) + (when (not (and (and v1-45 + (or (= v1-45 jakb-darkjak-get-off-ja) + (= v1-45 jakb-darkjak-get-off-end-ja) + (= v1-45 jakb-darkjak-get-on-fast-ja) + (= v1-45 (-> self draw art-group data 461)) + ) + ) + (= (-> self skel root-channel 0) (-> self skel channel)) + ) + ) + (sound-play "djak-off") + (countdown (v1-57 (+ (-> self skel active-channels) (-> self skel float-channels))) + (let ((a0-36 (-> self skel channel v1-57))) + (cond + ((= (-> a0-36 frame-group) (-> self draw art-group data 442)) + (set! (-> a0-36 frame-group) (the-as art-joint-anim jakb-walk-ja)) + ) + ((= (-> a0-36 frame-group) (-> self draw art-group data 443)) + (set! (-> a0-36 frame-group) (the-as art-joint-anim jakb-run-ja)) + ) + ) + ) + ) + (joint-control-cleanup + (-> self skel) + (-> self ext-anim-control heap) + (the-as art-joint-anim jakb-stance-loop-ja) + ) + (send-event (ppointer->process (-> self sidekick)) 'cleanup) + ) + ) + (set! (-> self darkjak latch-out-time) 0) + 0 + ) + ((zero? (-> self darkjak latch-out-time)) + (if (!= (-> self darkjak-interp) 0.0) + (set-time! (-> self darkjak latch-out-time)) + ) + ) + ) + ) + 0 + (none) + ) + +(defbehavior target-darkjak-process target () + (local-vars (a3-3 vector)) + (cond + ((nonzero? (-> self darkjak latch-out-time)) + (if (time-elapsed? (-> self darkjak latch-out-time) (seconds 0.4)) + (target-darkjak-end-mode #t) + ) + ) + ((and (focus-test? self dark) (nonzero? (-> self darkjak))) + (let ((a1-0 'eco-red)) + (target-danger-set! (-> self control danger-mode) a1-0) + ) + (update-transforms (-> self control)) + (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 control) a1-1) + ) + (target-danger-set! (-> self control danger-mode) #f) + (update-transforms (-> self control)) + (if (and (or (< (-> self game eco-pill-dark) 1.0) + (or (not (logtest? (the-as game-feature (logand (game-feature darkjak) (-> *setting-control* user-current features))) + (-> self game features) + ) + ) + (not (-> *setting-control* user-current darkjak)) + ) + ) + (not (focus-test? self dead dangerous hit grabbed)) + (not (and (-> self next-state) (let ((v1-37 (-> self next-state name))) + (or (= v1-37 'target-darkjak-get-on) (= v1-37 'target-darkjak-get-off)) + ) + ) + ) + (or (not (logtest? (-> self darkjak stage) (darkjak-stage force-on active))) + (not (-> *setting-control* user-current darkjak)) + (not (logtest? (the-as game-feature (logand (game-feature darkjak) (-> *setting-control* user-current features))) + (-> self game features) + ) + ) + ) + ) + (go target-darkjak-get-off) + ) + ) + (else + (seek! (-> self darkjak-interp) 0.0 (* 2.0 (seconds-per-frame))) + (if (= (-> self darkjak-interp) 0.0) + (set! (-> self darkjak-giant-interp) 1.0) + ) + ) + ) + (seekl! (-> self darkjak lightning-count) 0 1) + (let ((f30-0 (-> self darkjak-interp))) + (let ((f28-0 (lerp-scale 1.0 (* 1.05 (-> self darkjak-giant-interp)) f30-0 0.0 1.0)) + (f26-0 (lerp-scale 1.0 (* 0.20000002 (+ 5.0 (-> self darkjak-giant-interp))) f30-0 0.0 1.0)) + ) + (set-vector! (-> self control scale) f28-0 f28-0 f28-0 1.0) + (let ((a3-2 (new 'stack-no-clear 'vector))) + (set! (-> a3-2 x) f26-0) + (set! (-> a3-2 y) 1.0) + (set! (-> a3-2 z) f26-0) + (set! (-> a3-2 w) 1.0) + (trs-set! (-> self upper-body) (the-as vector #f) (the-as quaternion #f) a3-2) + ) + (let ((f0-15 (* 1.1 f26-0))) + (cond + ((= (-> self ext-geo) (target-geo jakb)) + (set! a3-3 (new 'stack-no-clear 'vector)) + (set! (-> a3-3 x) (/ f28-0 (* f28-0 f0-15))) + (set! (-> a3-3 y) (/ f28-0 f28-0)) + (set! (-> a3-3 z) (/ f28-0 (* f28-0 f0-15))) + (set! (-> a3-3 w) 1.0) + ) + (else + (set! a3-3 (new 'stack-no-clear 'vector)) + (set! (-> a3-3 x) (* 0.95 (/ f28-0 (* f28-0 f0-15)))) + (set! (-> a3-3 y) (* 0.92 (/ f28-0 f28-0))) + (set! (-> a3-3 z) (* 0.95 (/ f28-0 (* f28-0 f0-15)))) + (set! (-> a3-3 w) 1.0) + ) + ) + ) + ) + (cond + ((logtest? (game-secrets little-head) (-> self game secrets)) + (dotimes (v1-73 3) + (set! (-> a3-3 data v1-73) (* 0.4 (-> a3-3 data v1-73))) + ) + ) + ((logtest? (game-secrets big-head) (-> self game secrets)) + (dotimes (v1-79 3) + (set! (-> a3-3 data v1-79) (* 2.0 (-> a3-3 data v1-79))) + ) + ) + ) + (trs-set! (-> self neck) (the-as vector #f) (the-as quaternion #f) a3-3) + (let* ((a0-42 (-> self horns)) + (t9-13 (method-of-object a0-42 trs-set!)) + (a1-14 #f) + (a2-6 #f) + (a3-4 (new 'stack-no-clear 'vector)) + ) + (set! (-> a3-4 x) f30-0) + (set! (-> a3-4 y) f30-0) + (set! (-> a3-4 z) f30-0) + (set! (-> a3-4 w) 1.0) + (t9-13 a0-42 (the-as vector a1-14) (the-as quaternion a2-6) a3-4) + ) + (when (and (>= f30-0 0.5) (and (not (focus-test? self in-head)) + (not (logtest? (-> self draw status) (draw-control-status no-draw no-draw-temp))) + (not (movie?)) + ) + ) + (if (= (-> self invisible-interp) 0.0) + (launch-particles + (-> *part-id-table* 173) + (process-drawable-random-point! self (new 'stack-no-clear 'vector)) + ) + ) + (cond + ((!= (-> self invisible-interp) 0.0) + ) + ((rand-vu-percent? 0.25) + (when (>= (- (-> *display* game-clock frame-counter) (-> self shock-effect-time)) (seconds 0.02)) + (set! (-> self shock-effect-time) (-> *display* game-clock frame-counter)) + (process-drawable-shock-wall-effect + self + (-> *lightning-spec-id-table* 9) + lightning-probe-callback + (-> *part-id-table* 187) + ) + ) + ) + ((rand-vu-percent? 0.1) + (when (>= (- (-> *display* game-clock frame-counter) (-> self shock-effect-time)) (seconds 0.02)) + (set! (-> self shock-effect-time) (-> *display* game-clock frame-counter)) + (process-drawable-shock-effect + self + (-> *lightning-spec-id-table* 7) + lightning-probe-callback + (-> *part-id-table* 187) + 0 + 0 + 40960.0 + ) + ) + ) + ) + ) + (set-darkjak-texture-morph! (if (logtest? (-> self target-effect) 64) + 1.0 + f30-0 + ) + ) + ) + 0 + (none) + ) + +(defstate target-darkjak-get-on (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('darkjak) + (when (zero? (-> self darkjak want-stage)) + (set! (-> self darkjak want-stage) (the-as darkjak-stage (-> block param 0))) + #t + ) + ) + (('touched) + (if ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> block param 0)) + (-> self control) + (the-as uint 1920) + ) + (target-send-attack + proc + (-> self control danger-mode) + (the-as touching-shapes-entry (-> block param 0)) + (the-as int (-> self control target-attack-id)) + (the-as int (-> self control attack-count)) + (-> self control penetrate-using) + ) + (target-generic-event-handler proc argc message block) + ) + ) + (('attack-invinc) + (target-attacked + message + (the-as attack-info (-> block param 1)) + proc + (the-as touching-shapes-entry (-> block param 0)) + target-hit + ) + ) + (else + (target-generic-event-handler proc argc message block) + ) + ) + ) + :exit (behavior () + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still)) + (set! (-> self darkjak-interp) 1.0) + (remove-setting! 'bg-r) + (remove-setting! 'bg-g) + (remove-setting! 'bg-b) + (remove-setting! 'bg-a) + (persist-with-delay *setting-control* 'bg-a-speed (seconds 3) 'bg-a-speed 'abs 0.5 0) + (target-danger-set! 'harmless #f) + (remove-setting! 'gun) + (persist-with-delay *setting-control* 'gun (seconds 0.5) 'gun #f 0.0 0) + (apply-settings *setting-control*) + (target-gun-end-mode #t) + ) + :code (behavior ((arg0 darkjak-stage)) + (send-event (handle->process (-> self notify)) 'notify 'attack 19) + (set-setting! 'gun #f 0.0 0) + (apply-settings *setting-control*) + (target-lightjak-end-mode #t) + (set! (-> self darkjak latch-out-time) 0) + (set! (-> self lightjak get-off-lock) #f) + (set! (-> self darkjak stage) (logior arg0 (darkjak-stage bomb0))) + (if (logtest? (game-feature darkjak-bomb0) (-> self game features)) + (logior! (-> self darkjak stage) (darkjak-stage invinc)) + ) + (if (logtest? (game-feature darkjak-bomb1) (-> self game features)) + (logior! (-> self darkjak stage) (darkjak-stage giant)) + ) + (if (logtest? (game-feature feature45) (-> self game features)) + (logior! (-> self darkjak stage) (darkjak-stage disable-force-on)) + ) + (if (logtest? (game-feature feature44) (-> self game features)) + (logior! (-> self darkjak stage) (darkjak-stage no-anim)) + ) + (if (logtest? (game-feature darkjak-smack) (-> self game features)) + (logior! (-> self darkjak stage) (darkjak-stage bomb1)) + ) + (set! (-> self darkjak want-stage) (-> self darkjak stage)) + (set! (-> self neck flex-blend) 0.0) + (set! (-> self control mod-surface) *darkjak-trans-mods*) + (set-time! (-> self darkjak start-time)) + (set! (-> self darkjak attack-count) (the-as uint 0)) + (set! (-> self darkjak-giant-interp) 1.0) + (logior! (-> self focus-status) (focus-status dark)) + (set! (-> self pending-ext-anim) (target-anim dark)) + (set-time! (-> self fact darkjak-start-time)) + (set! (-> self fact darkjak-effect-time) (seconds 20)) + (set! (-> self darkjak mode-sound-bank) (add-setting! 'mode-sound-bank 'modedark 0.0 0)) + (set! (-> self darkjak lightning-count) 0) + (cond + ((logtest? (-> self darkjak stage) (darkjak-stage ds8)) + (logclear! (-> self target-flags) (target-flags tf4)) + (logclear! (-> self darkjak stage) (darkjak-stage bomb1 invinc giant no-anim disable-force-on)) + (target-invisible-start (-> *TARGET-bank* invisible-duration)) + (set! (-> self fact darkjak-effect-time) (-> *TARGET-bank* invisible-duration)) + ) + ((logtest? (-> self darkjak stage) (darkjak-stage disable-force-on)) + (logior! (-> self target-flags) (target-flags tf4)) + ) + (else + (logclear! (-> self target-flags) (target-flags tf4)) + ) + ) + (if (logtest? arg0 (darkjak-stage ds9)) + (go target-stance) + ) + (target-start-attack) + (target-danger-set! 'get-on #f) + (set-setting! 'bg-r 'abs 0.1 0) + (set-setting! 'bg-b 'abs 0.1 0) + (set-forward-vel 0.0) + (let ((gp-1 0)) + (while (not (logtest? (-> self control status) (collide-status on-surface))) + (target-falling-anim-trans) + (+! gp-1 (- (current-time) (-> self clock old-frame-counter))) + (if (>= gp-1 300) + (go target-falling #f) + ) + (suspend) + ) + ) + (sound-play "djak-transform") + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-darkjak-get-on-fast-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (set! (-> self darkjak-interp) (lerp-scale 0.0 1.0 (ja-aframe-num 0) 5.0 15.0)) + (set-setting! 'bg-a 'abs (* 0.45 (-> self darkjak-interp)) 0) + (suspend) + (ja :num! (seek!)) + ) + (while (!= (-> self ext-anim) (target-anim dark)) + (let ((v1-135 (ja-group))) + (when (not (and v1-135 (= v1-135 jakb-darkjak-get-on-fast-loop-ja))) + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! jakb-darkjak-get-on-fast-loop-ja :num! min) + ) + ) + (suspend) + (ja :num! (loop!)) + ) + (go target-stance) + ) + :post (-> target-grab post) + ) + +(defstate target-darkjak-get-off (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('pole-grab 'darkjak 'lightjak 'slide 'wade 'launch 'edge-grab) + #f + ) + (('change-mode) + (case (-> block param 0) + (('grab) + (when (not (focus-test? self dead)) + (if (not (-> block param 1)) + #t + (go target-grab 'stance) + ) + ) + ) + ) + ) + (('attack-invinc) + (target-attacked + message + (the-as attack-info (-> block param 1)) + proc + (the-as touching-shapes-entry (-> block param 0)) + target-hit + ) + ) + (else + (target-generic-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (logior! (-> self target-flags) (target-flags lleg-still rleg-still)) + (set! (-> self neck flex-blend) 0.0) + (set! (-> self control mod-surface) *darkjak-trans-mods*) + (kill-persister *setting-control* (the-as engine-pers 'bg-a-speed) 'bg-a-speed) + ) + :exit (behavior () + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still)) + (target-darkjak-end-mode #t) + ) + :trans (-> target-darkjak-get-on trans) + :code (behavior () + (let ((v1-1 (-> self water flags))) + (cond + ((and (logtest? (water-flag touch-water) v1-1) + (logtest? (water-flag under-water swimming) v1-1) + (not (logtest? (focus-status mech) (-> self focus-status))) + ) + (go target-swim-stance) + ) + ((let ((v1-10 (ja-group))) + (not (and v1-10 (= v1-10 jakb-darkjak-get-on-fast-ja))) + ) + (let ((gp-0 0)) + (while (not (logtest? (-> self control status) (collide-status on-surface))) + (target-falling-anim-trans) + (+! gp-0 (- (current-time) (-> self clock old-frame-counter))) + (if (>= gp-0 300) + (go target-falling #f) + ) + (suspend) + ) + ) + ) + ) + ) + (cond + ((logtest? (-> self control status) (collide-status on-water)) + ) + (else + (let ((v1-30 (ja-group))) + (cond + ((and v1-30 (= v1-30 jakb-darkjak-get-on-fast-ja)) + (ja-no-eval :num! (seek! 0.0)) + (while (not (ja-done? 0)) + (seek! (-> self darkjak-interp) 0.0 (* 2.0 (seconds-per-frame))) + (suspend) + (ja-eval) + ) + (ja-channel-push! 1 (seconds 0.1)) + ) + ((let ((v1-43 (ja-group))) + (and v1-43 (or (= v1-43 (-> self draw art-group data 451)) + (= v1-43 (-> self draw art-group data 466)) + (= v1-43 (-> self draw art-group data 467)) + (= v1-43 (-> self draw art-group data 468)) + ) + ) + ) + (sound-play "djak-off") + (ja-no-eval :group! (-> self draw art-group data 461) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (set! (-> self darkjak-interp) (lerp-scale 1.0 0.0 (ja-aframe-num 0) 90.0 115.0)) + (suspend) + (ja :num! (seek!)) + ) + ) + ((let ((v1-74 (ja-group))) + (and v1-74 (= v1-74 (-> self draw art-group data 461))) + ) + (sound-play "djak-off") + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (set! (-> self darkjak-interp) (lerp-scale 1.0 0.0 (ja-aframe-num 0) 90.0 115.0)) + (suspend) + (ja-eval) + ) + ) + (else + (sound-play "djak-off") + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! jakb-darkjak-get-off-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (set! (-> self darkjak-interp) (lerp-scale 1.0 0.0 (ja-aframe-num 0) 10.0 60.0)) + (if (and (>= (ja-aframe-num 0) 24.0) (!= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0)) + (goto cfg-79) + ) + (suspend) + (ja :num! (seek!)) + ) + (ja-no-eval :group! jakb-darkjak-get-off-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (set! (-> self darkjak-interp) (lerp-scale 1.0 0.0 (ja-aframe-num 0) 10.0 60.0)) + (if (and (>= (ja-aframe-num 0) 24.0) (!= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0)) + (goto cfg-79) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + ) + ) + (label cfg-79) + (vector-reset! (-> self control transv)) + ((-> target-darkjak-get-off exit)) + (go target-stance) + ) + :post (-> target-grab post) + ) + +(defstate target-darkjak-running-attack (target) + :event (-> target-running-attack event) + :enter (-> target-running-attack enter) + :exit (behavior () + (remove-setting! 'rapid-tracking) + ((-> target-running-attack exit)) + ) + :trans (-> target-running-attack trans) + :code (behavior () + (local-vars + (sv-16 float) + (sv-20 float) + (sv-24 int) + (sv-32 int) + (sv-40 int) + (sv-48 float) + (sv-56 handle) + (sv-64 int) + ) + (set-setting! 'rapid-tracking #f 0.0 0) + ((lambda :behavior target + () + (set! (-> self control bend-target) (* 0.5 (-> self control bend-target))) + (if (logtest? (water-flag touch-water) (-> self water flags)) + (sound-play "swim-stroke") + ) + (set! (-> self control dynam gravity-max) 368640.0) + (set! (-> self control dynam gravity-length) 368640.0) + (let ((gp-1 (cond + ((zero? (-> self control unknown-word000)) + (set! (-> self control unknown-word000) 1) + (-> self draw art-group data 452) + ) + (else + (set! (-> self control unknown-word000) 0) + (-> self draw art-group data 459) + ) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.02)) + (ja-no-eval :group! gp-1 :num! (seek!)) + ) + (target-start-attack) + (target-danger-set! 'punch #f) + (if (not (logtest? (-> self darkjak stage) (darkjak-stage force-on active))) + (send-event self 'get-pickup (pickup-type eco-pill-dark) (- (-> *FACT-bank* darkjak-punch-inc))) + ) + (let ((a0-11 (-> self control impact-ctrl)) + (t9-7 (method-of-type impact-control initialize)) + (a1-5 self) + (v1-44 (ja-group)) + ) + (t9-7 + a0-11 + a1-5 + (if (and v1-44 (= v1-44 (-> self draw art-group data 452))) + 28 + 19 + ) + 3276.8 + (-> self control root-prim prim-core collide-with) + ) + ) + ) + ) + (set! sv-16 (the-as float 0.0)) + (set! sv-20 (the-as float 1.0)) + (set! sv-24 0) + (set! sv-32 0) + (set! sv-40 0) + (set! sv-48 (the-as float 1.0)) + (set! sv-56 (the-as handle #f)) + (set! sv-64 0) + (until (ja-done? 0) + (if (and (cpad-pressed? (-> self control cpad number) square) + (not (logtest? (-> self target-flags) (target-flags prevent-jump prevent-attack))) + (not (logtest? (-> self control current-surface flags) (surface-flag no-attack))) + (and (focus-test? self dark) + (nonzero? (-> self darkjak)) + (logtest? (-> self darkjak stage) (darkjak-stage bomb0)) + ) + (< sv-32 2) + ) + (set! sv-40 (the-as int (current-time))) + ) + (when (time-elapsed? (the-as time-frame sv-40) (seconds 0.5)) + (set! sv-40 0) + 0 + ) + (if (and (nonzero? sv-40) + (< (- (the float (+ (-> (ja-group) frames num-frames) -1)) (/ 2.0 (-> (ja-group) artist-step))) + (ja-frame-num 0) + ) + ) + ((lambda :behavior target + ((arg0 (pointer float)) (arg1 (pointer int64)) (arg2 (pointer int64))) + (let ((s3-0 (if (and (focus-test? self dark) + (nonzero? (-> self darkjak)) + (logtest? (-> self darkjak stage) (darkjak-stage no-anim)) + ) + (combo-tracker-method-13 + (-> self control unknown-combo-tracker00) + (-> self control send-attack-dest) + (-> self control trans) + 24576.0 + (-> self control c-R-w fvec) + 65536.0 + ) + ) + ) + ) + (when #t + (+! (-> arg1 0) 1) + (if s3-0 + (combo-tracker-method-12 + (-> self control unknown-combo-tracker00) + (-> self control trans) + (get-trans s3-0 3) + s3-0 + (current-time) + ) + ) + (target-start-attack) + (target-danger-set! 'punch #f) + (if (not (logtest? (-> self darkjak stage) (darkjak-stage force-on active))) + (send-event self 'get-pickup (pickup-type eco-pill-dark) (- (-> *FACT-bank* darkjak-punch-inc))) + ) + (let ((v1-34 (ja-group))) + (cond + ((and v1-34 (or (= v1-34 (-> self draw art-group data 452)) (= v1-34 (-> self draw art-group data 459)))) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! (-> self draw art-group data 454) :num! (seek!)) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! (-> self draw art-group data 463) :num! (seek!)) + ) + ) + ) + (initialize (-> self control impact-ctrl) self 28 3276.8 (-> self control root-prim prim-core collide-with)) + (set! (-> arg0 0) (fmax 0.0 (-> arg0 0))) + ) + ) + (set! (-> arg2 0) 0) + 0 + ) + (& sv-16) + (the-as (pointer int64) (& sv-32)) + (the-as (pointer int64) (& sv-40)) + ) + ) + (compute-alignment! (-> self align)) + (when (not (ja-min? 0)) + (cond + ((and (>= (ja-frame-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-falling #f) + ) + ((and (nonzero? sv-32) + (>= sv-16 -40960.0) + (let ((v1-83 (ja-group))) + (not (and (and v1-83 (= v1-83 jakb-darkjak-attack-combo3-ja)) (>= (ja-aframe-num 0) 77.0))) + ) + (send-event (handle->process (-> self control unknown-combo-tracker00 target)) 'combo) + ) + (let* ((s5-0 (handle->process (-> self control unknown-combo-tracker00 target))) + (gp-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (let ((s5-1 (get-trans (the-as process-focusable gp-0) 3))) + (when (and (< 2048.0 (vector-vector-distance (-> self control trans) s5-1)) + (or (and (= gp-0 (handle->process sv-56)) (not (time-elapsed? (the-as time-frame sv-64) (seconds 0.1)))) + (time-elapsed? (the-as time-frame sv-64) (seconds 1)) + ) + ) + (forward-up-nopitch->quaternion + (-> self control dir-targ) + (vector-! (new 'stack-no-clear 'vector) s5-1 (-> self control trans)) + (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self control quat)) + ) + (let ((v1-124 + (point-tracker-method-11 + (-> self control unknown-combo-tracker00) + (new 'stack-no-clear 'vector) + (-> self control trans) + s5-1 + (* 0.009107469 (the float (- (current-time) (-> self control unknown-combo-tracker00 move-start-time)))) + ) + ) + ) + (set! sv-16 (fmin 163840.0 (sqrtf (+ (* (-> v1-124 x) (-> v1-124 x)) (* (-> v1-124 z) (-> v1-124 z)))))) + ) + (set-forward-vel sv-16) + ) + ) + (when (!= gp-0 (handle->process sv-56)) + (set! sv-56 (process->handle gp-0)) + (set! sv-64 (the-as int (current-time))) + ) + ) + ) + ((< sv-16 0.0) + (set! sv-16 (seek sv-16 -0.04096 (* 491520.0 (seconds-per-frame)))) + (set-forward-vel sv-16) + ) + ((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)) + (zero? sv-32) + (time-elapsed? (-> self control unknown-combo-tracker00 move-start-time) (seconds 0.2)) + ) + (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 sv-16) + ) + (else + (set! sv-16 + (* (target-align-vel-z-adjust (-> self align delta trans z)) (-> self clock frames-per-second) sv-20) + ) + (set-forward-vel sv-16) + ) + ) + ) + (let ((gp-1 (new-stack-vector0))) + (vector-matrix*! gp-1 (-> self control transv) (-> self control w-R-c)) + (set! (-> gp-1 y) 0.0) + (vector-matrix*! (-> self control align-xz-vel) gp-1 (-> 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! sv-16 (the-as float (-> self control unknown-word04))) + (set! (-> self control unknown-word04) (the-as uint 0.0)) + ) + (when (and (>= sv-16 0.0) + (let ((gp-2 (ja-group)) + (f30-2 (ja-aframe-num 0)) + ) + (if (or (and (= gp-2 (-> self draw art-group data 452)) + (>= f30-2 11.0) + (>= (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 452)) frames num-frames) -1)) + (ja-frame-num 0) + ) + ) + (and (= gp-2 (-> self draw art-group data 459)) + (>= f30-2 11.0) + (>= (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 459)) frames num-frames) -1)) + (ja-frame-num 0) + ) + ) + (and (= gp-2 (-> self draw art-group data 454)) + (>= f30-2 49.0) + (>= (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 454)) frames num-frames) -1)) + (ja-frame-num 0) + ) + ) + (and (= gp-2 jakb-darkjak-attack-combo3-ja) + (or (and (>= f30-2 62.0) (>= 77.0 f30-2)) + (and (>= f30-2 82.0) + (>= (the float (+ (-> (the-as art-joint-anim jakb-darkjak-attack-combo3-ja) frames num-frames) -1)) + (ja-frame-num 0) + ) + ) + ) + ) + (and (= gp-2 (-> self draw art-group data 463)) + (>= f30-2 62.0) + (>= (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 463)) frames num-frames) -1)) + (ja-frame-num 0) + ) + ) + ) + #t + ) + ) + ) + (let ((gp-3 (new 'stack-no-clear 'collide-query))) + (when (and (>= (impact-control-method-11 + (-> self control impact-ctrl) + gp-3 + (the-as process #f) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + 0.0 + ) + (>= 0.0 (vector-dot (-> gp-3 best-other-tri normal) (-> self control impact-ctrl dir))) + ) + (when (= (-> gp-3 best-other-tri pat mode) (pat-mode wall)) + (cond + ((logtest? (-> *part-group-id-table* 12 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> gp-3 best-other-tri intersect quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 12)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-3 best-other-tri intersect quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 12)) + ) + ) + (let ((name (static-sound-name "djak-punch-hit"))) + (play-effect-sound + (-> self skel effect) + (the-as symbol "punch") + -1.0 + (-> self control impact-ctrl joint) + (the-as basic #f) + (the-as sound-name name) + ) + ) + (activate! *camera-smush-control* 819.2 15 75 1.0 0.9 (-> *display* camera-clock)) + (set! sv-16 (the-as float -61440.0)) + ) + ) + ) + ) + (let ((gp-6 (ja-group)) + (f0-59 (ja-aframe-num 0)) + ) + (if (and (= gp-6 jakb-darkjak-attack-combo3-ja) + (>= f0-59 80.0) + (>= (the float (+ (-> (the-as art-joint-anim jakb-darkjak-attack-combo3-ja) frames num-frames) -1)) + (ja-frame-num 0) + ) + ) + (align! (-> self align) (align-opts adjust-y-vel) 1.0 1.6 1.0) + ) + ) + (suspend) + (ja :num! (seek! max (* (-> self control current-surface align-speed) sv-48))) + (if (time-elapsed? (-> self state-time) (seconds 0.1)) + (set! (-> *run-attack-mods* turnvv) 0.0) + ) + (if (< 2 sv-24) + (set! sv-20 (* sv-20 (fmin 1.0 (-> self control zx-vel-frac)))) + ) + (set! sv-24 (+ sv-24 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-falling #f) + ) + (go target-stance) + ) + :post target-post + ) + +(defstate target-darkjak-smack-charge (target) + :event target-standard-event-handler + :enter (-> (the-as (state target) target-duck-stance) enter) + :exit (behavior () + (remove-setting! 'bg-r) + (remove-setting! 'bg-g) + (remove-setting! 'bg-b) + (remove-setting! 'bg-a) + (update-rates! (-> *display* entity-clock) 1.0) + (persist-with-delay *setting-control* 'bg-a-speed (seconds 3) 'bg-a-speed 'abs 0.5 0) + (let ((gp-0 (handle->process (-> self darkjak charge-effect)))) + (when gp-0 + (let ((v1-18 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-18 command) (sound-command set-param)) + (set! (-> v1-18 id) (-> self control unknown-sound-id00)) + (set! (-> v1-18 params volume) -4) + (set! (-> v1-18 auto-time) 120) + (set! (-> v1-18 auto-from) 2) + (set! (-> v1-18 params mask) (the-as uint 17)) + (-> v1-18 id) + ) + (deactivate gp-0) + ) + ) + ((-> target-duck-stance exit)) + ) + :trans (behavior () + ((-> self state-hook)) + (if (and (not (cpad-hold? (-> self control cpad number) r1)) + (and (focus-test? self dark) (nonzero? (-> self darkjak))) + (= (-> self ext-anim) (target-anim dark)) + (zero? (-> self darkjak latch-out-time)) + (logtest? (the-as game-feature (logand (game-feature darkjak-smack) (-> *setting-control* user-current features))) + (-> self game features) + ) + (can-hands? #t) + ) + (go target-darkjak-smack) + ) + (if (or (or (not (cpad-hold? (-> self control cpad number) r1)) + (logtest? (-> self target-flags) (target-flags prevent-attack prevent-duck)) + ) + (!= (-> self ext-anim) 2) + ) + (go target-stance) + ) + (if (want-to-powerjak?) + (go target-powerjak-get-on) + ) + (fall-test target-falling (-> *TARGET-bank* fall-height)) + (slide-down-test) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and (and v1-2 (= v1-2 (-> self draw art-group data 478))) + (= (-> self skel root-channel 0) (-> self skel channel)) + ) + ) + ((and (and (focus-test? self dark) (nonzero? (-> self darkjak))) (= (-> self ext-anim) (target-anim dark))) + (ja-channel-push! 1 (seconds 0.2)) + ) + (else + (go target-stance) + ) + ) + ) + (until #f + (set-setting! 'bg-r 'abs 0.1 0) + (set-setting! 'bg-b 'abs 0.1 0) + (set-setting! 'bg-a 'abs 0.45 0) + (update-rates! (-> *display* entity-clock) 0.4) + (ja-no-eval :group! (-> self draw art-group data 478) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((v1-46 (and (= (-> self skel root-channel 0) (-> self skel channel)) + (not (handle->process (-> self darkjak charge-effect))) + ) + ) + ) + (when v1-46 + (set! (-> self control unknown-sound-id00) (sound-play "djak-bolt-charg")) + (set! (-> self darkjak charge-effect) + (ppointer->handle (if (logtest? (-> *part-group-id-table* 75 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 75) + :duration -1 + :target self + :mat-joint 59 + ) + (part-tracker-spawn + part-tracker + :to self + :group (-> *part-group-id-table* 75) + :duration -1 + :target self + :mat-joint 59 + ) + ) + ) + ) + ) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post target-post + ) + +(defstate target-darkjak-smack (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + ((-> target-running-attack event) proc argc message block) + ) + :enter (behavior () + ((-> target-running-attack enter)) + (set-setting! 'gun #f 0.0 0) + (apply-settings *setting-control*) + ) + :exit (behavior () + (update-rates! (-> *display* entity-clock) 1.0) + (update-rates! (-> *display* bg-clock) 1.0) + (update-rates! (-> *display* part-clock) 1.0) + (remove-setting! 'gun) + ((-> target-darkjak-running-attack exit)) + ) + :trans (-> target-running-attack trans) + :code (behavior () + (target-start-attack) + (target-danger-set! 'dark-smack #f) + (if (not (logtest? (-> self darkjak stage) (darkjak-stage force-on active))) + (send-event self 'get-pickup (pickup-type eco-pill-dark) (- (-> *FACT-bank* darkjak-smack-inc))) + ) + (set! (-> self control lightjak-sound-id) (sound-play "djak-pnch-swing")) + (set! (-> self control dynam gravity-max) 368640.0) + (set! (-> self control dynam gravity-length) 368640.0) + (let ((gp-1 (-> self draw art-group data 476))) + (ja-channel-push! 1 (seconds 0.02)) + (ja-no-eval :group! gp-1 :num! (seek!)) + ) + (initialize (-> self control impact-ctrl) self 28 3276.8 (-> self control root-prim prim-core collide-with)) + (let ((f28-0 (the-as number 0.0))) + 0.8 + (let ((gp-2 0) + (f30-0 1.0) + (s5-1 #f) + (f26-0 0.6) + ) + (until (ja-done? 0) + (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-falling #f) + ) + ((< (the-as float f28-0) 0.0) + (set! f28-0 (seek (the-as float f28-0) -0.04096 (* 491520.0 (seconds-per-frame)))) + (set-forward-vel (the-as float f28-0)) + ) + ((and (nonzero? (-> self control unknown-time-frame18)) + (time-elapsed? (-> self control unknown-time-frame18) (seconds 0.04)) + ) + ) + ((ja-done? 0) + (set-forward-vel (the-as float f28-0)) + ) + (else + (set-forward-vel (the-as float f28-0)) + ) + ) + ) + (set! f26-0 (seek f26-0 0.3 (* 2.0 (seconds-per-frame)))) + (update-rates! (-> *display* entity-clock) f26-0) + (update-rates! (-> *display* bg-clock) f26-0) + (update-rates! (-> *display* part-clock) f26-0) + (let ((s4-0 (new-stack-vector0))) + (vector-matrix*! s4-0 (-> self control transv) (-> self control w-R-c)) + (set! (-> s4-0 y) 0.0) + (vector-matrix*! (-> self control align-xz-vel) s4-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! f28-0 (-> self control unknown-word04)) + (set! (-> self control unknown-word04) (the-as uint (the-as float 0.0))) + ) + (let ((v1-96 + (and (not s5-1) + (let ((s4-1 (ja-group)) + (f0-19 (ja-aframe-num 0)) + ) + (if (and (= s4-1 (-> self draw art-group data 476)) + (>= f0-19 16.0) + (>= (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 476)) frames num-frames) -1)) + (ja-frame-num 0) + ) + ) + #t + ) + ) + ) + ) + ) + (when v1-96 + (set! s5-1 #t) + (let ((s4-2 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> s4-2 ent) (-> self entity)) + (set! (-> s4-2 charge) 1.0) + (set! (-> s4-2 options) (projectile-options)) + (logclear! (-> s4-2 options) (projectile-options po14 po15 po16)) + (set! (-> s4-2 pos quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node jakb-lod0-jg sk_rhand)) quad) + ) + (set! (-> s4-2 notify-handle) (the-as handle #f)) + (set! (-> s4-2 owner-handle) (the-as handle #f)) + (set! (-> s4-2 target-handle) (the-as handle #f)) + (set! (-> s4-2 target-pos quad) (the-as uint128 0)) + (set! (-> s4-2 ignore-handle) (process->handle self)) + (let* ((v1-125 *game-info*) + (a0-43 (+ (-> v1-125 attack-id) 1)) + ) + (set! (-> v1-125 attack-id) a0-43) + (set! (-> s4-2 attack-id) a0-43) + ) + (set! (-> s4-2 timeout) (seconds 4)) + (vector-float*! (-> s4-2 vel) (-> self control c-R-w fvec) 245760.0) + (let ((s3-1 (get-process *default-dead-pool* darkjak-ball #x8000 1))) + (when s3-1 + (let ((t9-28 (method-of-type process activate))) + (t9-28 s3-1 self "projectile" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-1 projectile-init-by-other s4-2) + (-> s3-1 ppointer) + ) + ) + ) + ) + ) + (suspend) + (ja :num! (seek! max f30-0)) + (if (time-elapsed? (-> self state-time) (seconds 0.1)) + (set! (-> *run-attack-mods* turnvv) 0.0) + ) + (+! gp-2 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-falling #f) + ) + (go target-stance) + ) + :post target-post + ) + +(defmethod update-clock! ((this darkjak-info) (arg0 int)) + (when (-> this clock-on) + (+! (-> this clock-pos) (* (-> this clock-vel) (seconds-per-frame))) + (+! (-> this clock-vel) (* 4.0 (seconds-per-frame))) + (cond + ((< 1.0 (-> this clock-pos)) + (set! (-> this clock-pos) 1.0) + (set! (-> this clock-vel) 0.0) + ) + ((< (-> this clock-pos) 0.05) + (set! (-> this clock-pos) 0.05) + (set! (-> this clock-vel) 1.0) + ) + ) + (update-rates! (-> *display* entity-clock) (-> this clock-pos)) + (update-rates! (-> *display* bg-clock) (-> this clock-pos)) + (if (= arg0 16) + (update-rates! (-> *display* target-clock) (-> this clock-pos)) + ) + (when *sound-player-enable* + (let ((v1-27 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-27 command) (sound-command set-param)) + (set! (-> v1-27 id) (-> this process 0 control unknown-sound-id00)) + (set! (-> v1-27 params pitch-mod) (the int (* 1524.0 (- (- 1.0 (-> this clock-pos)))))) + (set! (-> v1-27 params mask) (the-as uint 2)) + (-> v1-27 id) + ) + ) + ) + 0 + (none) + ) + +(defbehavior target-darkjak-bomb-collide target ((arg0 (pointer float)) (arg1 float)) + (seek! (-> arg0 0) arg1 (* 4.0 (seconds-per-frame))) + (set! (-> self control bomb-scale) (-> arg0 0)) + (target-danger-set! 'bomb #f) + (update-transforms (-> self control)) + (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 (-> self control) a1-2) + ) + (set! (-> self control bomb-scale) 0.0) + (target-danger-set! 'bomb #f) + (update-transforms (-> self control)) + 0 + (none) + ) + +(defstate target-darkjak-bomb0 (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('pole-grab 'darkjak 'slide 'wade 'launch 'edge-grab 'jump 'shove 'attack 'attack-or-shove) + #f + ) + (('hit) + (let ((v1-1 (the-as object (-> block param 1)))) + (when (and (= (-> block param 0) 'bomb) + (logtest? (process-mask enemy) (-> (the-as process v1-1) mask)) + (let ((v1-7 (ja-group))) + (and v1-7 (= v1-7 (-> self draw art-group data 468))) + ) + (>= (ja-aframe-num 0) 35.0) + (not (-> self darkjak clock-on)) + ) + (set! (-> self darkjak clock-vel) -8.0) + (let ((v0-0 (the-as object #t))) + (set! (-> self darkjak clock-on) (the-as symbol v0-0)) + v0-0 + ) + ) + ) + ) + (('change-mode) + #f + ) + (('attack 'attack-or-shove 'swim) + #f + ) + (else + (target-dangerous-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (logior! (-> self target-flags) (target-flags tf4)) + (set-setting! 'gun #f 0.0 0) + (apply-settings *setting-control*) + (set! (-> self darkjak clock-pos) 1.0) + (set! (-> self darkjak clock-vel) 0.0) + (set! (-> self darkjak clock-on) #f) + (set! (-> self control unknown-sound-id00) + (add-process *gui-control* self (gui-channel jak-effect-1) (gui-action queue) "darkbom0" -99.0 0) + ) + ) + :exit (behavior () + (set-action! + *gui-control* + (gui-action fade) + (-> self control unknown-sound-id00) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (logclear! (-> self target-flags) (target-flags tf6)) + (target-exit) + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) + (remove-setting! 'ambient-volume) + (remove-setting! 'gun) + (set! (-> self darkjak clock-pos) 1.0) + (set! (-> self darkjak clock-vel) 0.0) + (set! (-> self darkjak clock-on) #f) + (update-rates! (-> *display* entity-clock) 1.0) + (update-rates! (-> *display* bg-clock) 1.0) + (update-rates! (-> *display* target-clock) 1.0) + (if (not (and (-> self next-state) (= (-> self next-state name) 'target-darkjak-get-off))) + ((-> target-darkjak-get-off exit)) + ) + ) + :trans (behavior () + (update-clock! (-> self darkjak) 16) + ) + :code (behavior () + (local-vars + (v1-100 symbol) + (sv-16 float) + (sv-20 float) + (sv-160 vector) + (sv-164 (function object :behavior target)) + ) + (set! (-> self darkjak stage) (-> self darkjak want-stage)) + (set! (-> self neck flex-blend) 0.0) + (set! (-> self control mod-surface) *roll-flip-mods*) + (set! (-> self alt-cam-pos quad) (-> self control trans quad)) + (set! sv-16 (the-as float 0.0)) + (set! sv-20 (the-as float 1.0)) + (ja-channel-push! 1 (seconds 0.15)) + (when (jump-hit-ground-stuck?) + (ja-no-eval :group! (-> self draw art-group data 451) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (set! (-> self alt-cam-pos x) (-> self control trans x)) + (set! (-> self alt-cam-pos z) (-> self control trans z)) + (set-forward-vel (* 0.85 (-> self control ctrl-xz-vel))) + (suspend) + (ja :num! (seek!)) + ) + ) + (set-setting! 'music-volume 'rel 0.0 0) + (set-setting! 'sfx-volume 'rel 0.0 0) + (set-setting! 'ambient-volume 'rel 0.0 0) + (ja-no-eval :group! (-> self draw art-group data 466) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (align! (-> self align) (align-opts adjust-y-vel) 1.0 1.0 1.0) + (set! (-> self alt-cam-pos x) (-> self control trans x)) + (set! (-> self alt-cam-pos z) (-> self control trans z)) + (set-forward-vel (* 0.98 (-> self control ctrl-xz-vel))) + (suspend) + (ja :num! (seek!)) + ) + (ja-no-eval :group! (-> self draw art-group data 467) :num! (seek!) :frame-num 0.0) + (let ((f30-0 (the float (target-time-to-ground)))) + (until v1-100 + (set! (-> self alt-cam-pos x) (-> self control trans x)) + (set! (-> self alt-cam-pos z) (-> self control trans z)) + (set-forward-vel (* 0.98 (-> self control ctrl-xz-vel))) + (let ((v1-92 (new-stack-vector0)) + (f0-35 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + ) + 0.0 + (vector-! v1-92 (-> self control transv) (vector-float*! v1-92 (-> self control dynam gravity-normal) f0-35)) + (let* ((f1-5 (vector-length v1-92)) + (f2-0 f1-5) + (f0-36 (+ f0-35 (* -491520.0 (seconds-per-frame)))) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f0-36) + (vector-float*! v1-92 v1-92 (/ f1-5 f2-0)) + ) + ) + ) + (suspend) + (ja :num! (seek! max (lerp-scale 1.5 0.3 f30-0 30.0 210.0))) + (set! v1-100 (or (ja-done? 0) (logtest? (-> self control status) (collide-status on-surface)))) + ) + ) + (logclear! (-> self target-flags) (target-flags tf6)) + (while (not (jump-hit-ground-stuck?)) + (let ((v1-105 (new-stack-vector0)) + (f0-42 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + ) + 0.0 + (vector-! + v1-105 + (-> self control transv) + (vector-float*! v1-105 (-> self control dynam gravity-normal) f0-42) + ) + (let* ((f1-8 (vector-length v1-105)) + (f2-1 f1-8) + (f0-43 (+ f0-42 (* -491520.0 (seconds-per-frame)))) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f0-43) + (vector-float*! v1-105 v1-105 (/ f1-8 f2-1)) + ) + ) + ) + (ja :num! (seek! (ja-aframe 33.0 0))) + (suspend) + ) + (set-forward-vel 0.0) + (ja-no-eval :group! (-> self draw art-group data 468) :num! (seek! (ja-aframe 35.0 0)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 35.0 0))) + ) + (set-action! + *gui-control* + (gui-action play) + (-> self control unknown-sound-id00) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.5)) + (activate! *camera-smush-control* 819.2 15 75 1.0 0.9 (-> *display* camera-clock)) + (target-start-attack) + (target-danger-set! 'bomb #f) + (send-event self 'get-pickup (pickup-type eco-pill-dark) (- (-> *FACT-bank* darkjak-bomb0-inc))) + (set! sv-160 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node jakb-lod0-jg sk_lhand))) + (set! sv-164 (lambda :behavior target + () + (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) + ) + ) + ) + ) + ) + (set! (-> sv-160 y) (-> self control root-prim prim-core world-sphere y)) + (cond + ((logtest? (-> *part-group-id-table* 71 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> sv-160 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 71)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> sv-160 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 71)) + ) + ) + (let ((gp-6 (process-spawn + manipy + :init manipy-init + sv-160 + (-> self entity) + (art-group-get-by-name *level* "skel-bomb-blast" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-6 + (send-event (ppointer->process gp-6) 'anim-mode 'play1) + (send-event (ppointer->process gp-6) 'anim "idle") + (set-vector! (-> (the-as process-drawable (-> gp-6 0)) root scale) sv-20 1.0 sv-20 1.0) + (send-event (ppointer->process gp-6) 'trans-hook sv-164) + ) + ) + (let ((gp-8 (process-spawn + manipy + :init manipy-init + sv-160 + (-> 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 gp-8 + (send-event (ppointer->process gp-8) 'anim-mode 'play1) + (send-event (ppointer->process gp-8) 'anim "idle") + (set-vector! (-> (the-as manipy (-> gp-8 0)) root scale) sv-20 1.0 sv-20 1.0) + ) + ) + (ja-no-eval :num! (seek! (ja-aframe 38.0 0))) + (while (not (ja-done? 0)) + (target-darkjak-bomb-collide (& sv-16) sv-20) + (set-forward-vel 0.0) + (suspend) + (ja-eval) + ) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (target-darkjak-bomb-collide (& sv-16) sv-20) + (set-forward-vel 0.0) + (suspend) + (ja-eval) + ) + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) + (remove-setting! 'ambient-volume) + (ja-no-eval :group! (-> self draw art-group data 461) :num! (seek! (ja-aframe 90.0 0)) :frame-num 0.0) + (until (ja-done? 0) + (target-darkjak-bomb-collide (& sv-16) sv-20) + (suspend) + (ja :num! (seek! (ja-aframe 90.0 0))) + ) + (logior! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (send-event (handle->process (-> self notify)) 'notify 'attack 20) + (go target-darkjak-get-off) + ) + :post target-no-stick-post + ) + +(set! (-> *lightning-spec-id-table* 11) (new 'static 'lightning-spec + :name "lightning-darkjak-bomb1" + :flags (lightning-spec-flags lsf0 lsf4) + :adjust-distance #xa + :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 #x3a :page #x4) + :reduction 0.42 + :num-points 80 + :box-size 32768.0 + :merge-factor 0.2 + :merge-count 2 + :radius 2048.0 + :duration 300.0 + :duration-rand 90.0 + :sound (static-sound-spec "transform-zap" :group 0) + ) + ) + +(defbehavior target-bomb1-fire-shot target ((arg0 (array handle)) (arg1 int) (arg2 int)) + (local-vars (sv-128 target) (sv-144 int) (sv-160 vector) (sv-176 vector) (sv-192 vector)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (cond + ((and (>= arg1 0) (< arg1 (-> arg0 length))) + (let ((s5-0 (handle->process (-> arg0 arg1)))) + (when s5-0 + (get-trans (the-as process-focusable s5-0) 3) + (process-spawn + lightning-tracker + :init lightning-tracker-init + (-> *lightning-spec-id-table* 11) + 0 + lightning-probe-callback + s5-0 + 3 + 3 + :name "lightning-tracker" + :to self + :unk 0 + ) + (send-event + s5-0 + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (the-as uint arg2)) + (damage 15.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'ice) + (penetrate-using (penetrate touch dark-skin dark-bomb)) + ) + ) + ) + ) + ) + ) + (else + (let ((gp-1 (get-process *default-dead-pool* lightning-tracker #x4000 0))) + (when gp-1 + (let ((t9-6 (method-of-type lightning-tracker activate))) + (t9-6 (the-as lightning-tracker gp-1) self "lightning-tracker" (the-as pointer #x70004000)) + ) + (let ((s5-1 run-function-in-process) + (s4-1 gp-1) + (s3-0 lightning-tracker-init) + (s2-0 (-> *lightning-spec-id-table* 11)) + (s1-0 0) + (s0-0 lightning-probe-callback) + ) + (set! sv-128 self) + (set! sv-144 3) + (set! sv-192 (new 'stack-no-clear 'vector)) + (set! sv-160 (-> self control trans)) + (set! sv-176 (new 'stack-no-clear 'vector)) + (set! (-> sv-176 x) (rand-vu-float-range -40960.0 40960.0)) + (set! (-> sv-176 y) (rand-vu-float-range -8192.0 8192.0)) + (set! (-> sv-176 z) (rand-vu-float-range -40960.0 40960.0)) + (set! (-> sv-176 w) 1.0) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> sv-160 quad)) + (.lvf vf5 (&-> sv-176 quad)) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-192 quad) vf6) + ((the-as (function object object object object object object object object none) s5-1) + s4-1 + s3-0 + s2-0 + s1-0 + s0-0 + sv-128 + sv-144 + sv-192 + ) + ) + (-> gp-1 ppointer) + ) + ) + #f + ) + ) + ) + ) + +(defstate target-darkjak-bomb1 (target) + :event (-> target-darkjak-bomb0 event) + :enter (behavior ((arg0 float) (arg1 float)) + ((-> target-attack-uppercut-jump enter) arg0 arg1) + (set-setting! 'gun #f 0.0 0) + (apply-settings *setting-control*) + ) + :exit (-> target-darkjak-bomb0 exit) + :trans (behavior () + (if (logtest? (-> self control status) (collide-status on-surface)) + (go target-darkjak-get-off) + ) + (mod-var-jump #t #t (cpad-hold? (-> self control cpad number) x) (-> self control transv)) + (if (and (= (-> self control danger-mode) 'uppercut) + (< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) -8192.0) + ) + (target-danger-set! 'harmless #f) + ) + (slide-down-test) + (update-clock! (-> self darkjak) 32) + ) + :code (behavior ((arg0 float) (arg1 float)) + (local-vars + (sv-112 (array collide-shape)) + (sv-120 int) + (sv-128 vector) + (sv-132 (array handle)) + (sv-136 int) + (sv-144 time-frame) + (sv-152 time-frame) + (sv-160 float) + (sv-164 float) + (sv-168 time-frame) + (sv-176 uint) + ) + (logior! (-> self target-flags) (target-flags tf4)) + (set! (-> self neck flex-blend) 0.0) + (set-setting! 'music-volume 'rel 0.0 0) + (set-setting! 'ambient-volume 'rel 0.0 0) + (compute-alignment! (-> self align)) + (set-action! + *gui-control* + (gui-action play) + (-> self control unknown-sound-id00) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (let ((f0-1 0.9)) + (ja-no-eval :num! (seek! max f0-1)) + ) + (while (not (ja-done? 0)) + (compute-alignment! (-> self align)) + (set! (-> self control turn-go-the-long-way) 1.0) + (set! (-> self darkjak clock-vel) -4.0) + (set! (-> self darkjak clock-on) #t) + (align! (-> self align) (align-opts adjust-y-vel) 1.0 1.0 1.0) + (suspend) + (ja-eval) + ) + (send-event self 'get-pickup (pickup-type eco-pill-dark) (- (-> *FACT-bank* darkjak-bomb1-inc))) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.5)) + (activate! *camera-smush-control* 819.2 15 75 1.0 0.9 (-> *display* camera-clock)) + (let ((gp-0 (-> self post-hook))) + (set! (-> self post-hook) target-no-move-post) + (set! sv-112 (-> self focus-search)) + (set! sv-120 0) + (set! sv-128 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node jakb-lod0-jg main))) + (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-112 length) sv-120) + (countdown (s5-0 sv-120) + (let* ((s4-0 (-> sv-112 s5-0 process)) + (v1-56 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when (and v1-56 (logtest? (process-mask crate enemy guard vehicle) (-> v1-56 mask))) + (set! (-> sv-132 (-> sv-132 length)) (process->handle v1-56)) + (+! (-> sv-132 length) 1) + (if (< (-> sv-132 allocated-length) (-> sv-132 length)) + (set! (-> sv-132 length) (-> sv-132 allocated-length)) + ) + ) + ) + ) + (set! (-> self control mod-surface) (new 'static 'surface + :name 'uppercut + :turnv 524288.0 + :turnvf 15.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 32768.0 + :target-speed 32768.0 + :fric 0.2 + :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 + :mode 'air + :flags (surface-flag air attack spin gun-off laser-hide) + ) + ) + (set! sv-136 0) + (set! sv-144 (current-time)) + (set! sv-152 (current-time)) + (set! sv-160 (the-as float 0.0)) + (set! sv-164 (the-as float 0.0)) + (set! sv-168 (current-time)) + (let* ((v1-77 (-> self game)) + (a0-34 (+ (-> v1-77 attack-id) 1)) + ) + (set! (-> v1-77 attack-id) a0-34) + (set! sv-176 a0-34) + ) + (ja-channel-push! 2 (seconds 0.05)) + (ja :group! (-> self draw art-group data 469)) + (ja :chan 1 :group! (-> self draw art-group data 470)) + (while (or (< sv-136 (-> sv-132 length)) (not (time-elapsed? sv-152 (seconds 1.5)))) + (let ((v1-84 (new-stack-vector0))) + (let ((f0-10 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-84 (-> self control transv) (vector-float*! v1-84 (-> self control dynam gravity-normal) f0-10)) + ) + (let* ((f0-11 (vector-length v1-84)) + (f1-3 f0-11) + (f2-0 0.0) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f2-0) + (vector-float*! v1-84 v1-84 (/ f0-11 f1-3)) + ) + ) + ) + (set! (-> self darkjak clock-vel) -4.0) + (set! (-> self darkjak clock-on) #t) + (send-event *camera* 'joystick -0.25 1.0) + (when (time-elapsed? sv-144 (seconds 0.1)) + (set! sv-144 (current-time)) + (target-bomb1-fire-shot sv-132 sv-136 (the-as int sv-176)) + (set! sv-136 (+ sv-136 1)) + (if (time-elapsed? (-> self state-time) (seconds 1)) + (set! sv-164 (the-as float 1.0)) + ) + ) + (set! sv-160 (seek sv-160 sv-164 (* 6.0 (seconds-per-frame)))) + (ja :num! (loop!)) + (let ((a0-61 (-> self skel root-channel 1))) + (let ((f0-21 sv-160)) + (set! (-> a0-61 frame-interp 1) f0-21) + (set! (-> a0-61 frame-interp 0) f0-21) + ) + (set! (-> a0-61 param 0) 0.0) + (joint-control-channel-group-eval! a0-61 (the-as art-joint-anim #f) num-func-chan) + ) + (suspend) + ) + (set! (-> self post-hook) gp-0) + ) + (set! (-> self control mod-surface) *double-jump-mods*) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! (-> self draw art-group data 471) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (ja-blend-eval) + (compute-alignment! (-> self align)) + (set! (-> self control turn-go-the-long-way) 1.0) + (set! (-> self darkjak clock-vel) 4.0) + (suspend) + (ja :num! (seek!)) + ) + (set-time! (-> self gun surpress-time)) + (send-event (handle->process (-> self notify)) 'notify 'attack 21) + (go target-darkjak-get-off) + ) + :post target-post + ) diff --git a/goal_src/jak3/engine/target/target-death.gc b/goal_src/jak3/engine/target/target-death.gc index ec14863c6a..c1af68d886 100644 --- a/goal_src/jak3/engine/target/target-death.gc +++ b/goal_src/jak3/engine/target/target-death.gc @@ -71,7 +71,7 @@ (when a2-0 (set! (-> s5-1 quad) (-> a2-0 extra trans quad)) (+! (-> s5-1 y) 9011.2) - (go target-warp-in s5-1 (-> arg0 trans)) + (go target-warp-in s5-1 (-> arg0 trans) a2-0) ) ) ) @@ -650,20 +650,15 @@ ) (dotimes (v1-107 3) (set! (-> *load-state* want-sound v1-107 name) (-> arg0 want-sound v1-107)) - (set! (-> *load-state* want-sound v1-107 mode) (the-as uint 1)) + (set! (-> *load-state* want-sound v1-107 mode) (sound-bank-mode unknown)) ) - (load-state-method-21 *load-state*) + (add-borrow-levels *load-state*) (when (not (string= (-> arg0 name) "default")) (while (begin (dotimes (s5-0 (-> arg0 want-count)) (when (not (or (not (-> arg0 want s5-0 name)) (not (-> arg0 want s5-0 display?)) - (let* ((a0-73 *level*) - (t9-37 (method-of-object a0-73 level-group-method-26)) - (a1-44 (-> arg0 want s5-0 name)) - ) - (= (t9-37 a0-73 a1-44) 'active) - ) + (= (status-of-level-and-borrows *level* (-> arg0 want s5-0 name) #f) 'active) ) ) (set! v1-126 #t) @@ -674,12 +669,7 @@ (dotimes (s4-0 10) (when (not (or (not (-> s5-1 want s4-0 name)) (not (-> s5-1 want s4-0 display?)) - (let* ((a0-75 *level*) - (t9-38 (method-of-object a0-75 level-group-method-26)) - (a1-45 (-> s5-1 want s4-0 name)) - ) - (= (t9-38 a0-75 a1-45) 'active) - ) + (= (status-of-level-and-borrows *level* (-> s5-1 want s4-0 name) #f) 'active) ) ) (set! v1-126 #t) @@ -973,27 +963,7 @@ quad ) ) - (let ((s5-0 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-0 - (let ((t9-1 (method-of-type part-tracker-subsampler activate))) - (t9-1 (the-as part-tracker-subsampler s5-0) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-2 run-function-in-process) - (a0-9 s5-0) - (a1-2 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 10)) - (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-9 a1-2 *part-tracker-subsampler-params-default*) - ) - (-> s5-0 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 10)) ) (else (set! (-> *launch-matrix* trans quad) @@ -1005,26 +975,7 @@ quad ) ) - (let ((s5-1 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-1 - (let ((t9-4 (method-of-type part-tracker activate))) - (t9-4 (the-as part-tracker s5-1) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-5 run-function-in-process) - (a0-18 s5-1) - (a1-5 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 10)) - (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-18 a1-5 *part-tracker-params-default*) - ) - (-> s5-1 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 10)) ) ) (let ((v1-32 (-> arg0 mode))) @@ -1283,8 +1234,8 @@ (ja-no-eval :group! jakb-jump-ja :num! (seek!) :frame-num 0.0) (when (= (-> arg0 angle) 'air) (sound-play "smack-surface") - (do-effect (-> self skel effect) (the-as symbol "group-smack-surface") 0.0 6) - (do-effect (-> self skel effect) (the-as symbol "group-smack-surface-dizzy") 0.0 9) + (do-effect (-> self skel effect) "group-smack-surface" 0.0 6) + (do-effect (-> self skel effect) "group-smack-surface-dizzy" 0.0 9) ) ) ((= v1-0 'shove) @@ -1537,55 +1488,11 @@ (cond ((logtest? (-> *part-group-id-table* 64 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((gp-3 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-3 - (let ((t9-18 (method-of-type part-tracker-subsampler activate))) - (t9-18 - (the-as part-tracker-subsampler gp-3) - *entity-pool* - "part-tracker-subsampler" - (the-as pointer #x70004000) - ) - ) - (let ((t9-19 run-function-in-process) - (a0-66 gp-3) - (a1-13 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 64)) - (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-19) a0-66 a1-13 *part-tracker-subsampler-params-default*) - ) - (-> gp-3 ppointer) - ) - ) + (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)) - (let ((gp-4 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-4 - (let ((t9-21 (method-of-type part-tracker activate))) - (t9-21 (the-as part-tracker gp-4) *entity-pool* "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-22 run-function-in-process) - (a0-72 gp-4) - (a1-16 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 64)) - (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-22) a0-72 a1-16 *part-tracker-params-default*) - ) - (-> gp-4 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 64)) ) ) ) @@ -1602,55 +1509,11 @@ (cond ((logtest? (-> *part-group-id-table* 64 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((gp-6 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-6 - (let ((t9-28 (method-of-type part-tracker-subsampler activate))) - (t9-28 - (the-as part-tracker-subsampler gp-6) - *entity-pool* - "part-tracker-subsampler" - (the-as pointer #x70004000) - ) - ) - (let ((t9-29 run-function-in-process) - (a0-89 gp-6) - (a1-23 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 64)) - (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-29) a0-89 a1-23 *part-tracker-subsampler-params-default*) - ) - (-> gp-6 ppointer) - ) - ) + (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)) - (let ((gp-7 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-7 - (let ((t9-31 (method-of-type part-tracker activate))) - (t9-31 (the-as part-tracker gp-7) *entity-pool* "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-32 run-function-in-process) - (a0-95 gp-7) - (a1-26 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 64)) - (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-32) a0-95 a1-26 *part-tracker-params-default*) - ) - (-> gp-7 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 64)) ) ) ) @@ -1712,53 +1575,17 @@ ) ) ) - (cond - ((logtest? (-> gp-9 flags) (sp-group-flag sp13)) - (let ((s5-5 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-5 - (let ((t9-44 (method-of-type part-tracker-subsampler activate))) - (t9-44 (the-as part-tracker-subsampler s5-5) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-45 run-function-in-process) - (a0-133 s5-5) - (a1-49 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) gp-9) - (set! (-> *part-tracker-subsampler-params-default* duration) (seconds 1)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 6) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-45) a0-133 a1-49 *part-tracker-subsampler-params-default*) - ) - (-> s5-5 ppointer) - ) - ) - ) - (else - (let ((s5-6 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-6 - (let ((t9-47 (method-of-type part-tracker activate))) - (t9-47 (the-as part-tracker s5-6) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-48 run-function-in-process) - (a0-136 s5-6) - (a1-52 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) gp-9) - (set! (-> *part-tracker-params-default* duration) (seconds 1)) - (set! (-> *part-tracker-params-default* callback) #f) - (set! (-> *part-tracker-params-default* userdata) (the-as uint #f)) - (set! (-> *part-tracker-params-default* target) self) - (set! (-> *part-tracker-params-default* mat-joint) 6) - ((the-as (function object object object none) t9-48) a0-136 a1-52 *part-tracker-params-default*) - ) - (-> s5-6 ppointer) - ) + (if (logtest? (-> gp-9 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group gp-9 + :duration (seconds 1) + :target self + :mat-joint 6 ) + (part-tracker-spawn part-tracker :to self :group gp-9 :duration (seconds 1) :target self :mat-joint 6) ) - ) ) (let ((gp-10 (-> self post-hook))) (set! (-> self control mod-surface) *turn-around-mods*) @@ -2450,55 +2277,11 @@ (cond ((logtest? (-> *part-group-id-table* 62 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((s5-3 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-3 - (let ((t9-15 (method-of-type part-tracker-subsampler activate))) - (t9-15 - (the-as part-tracker-subsampler s5-3) - *entity-pool* - "part-tracker-subsampler" - (the-as pointer #x70004000) - ) - ) - (let ((t9-16 run-function-in-process) - (a0-66 s5-3) - (a1-29 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 62)) - (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-16) a0-66 a1-29 *part-tracker-subsampler-params-default*) - ) - (-> s5-3 ppointer) - ) - ) + (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)) - (let ((s5-4 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-4 - (let ((t9-18 (method-of-type part-tracker activate))) - (t9-18 (the-as part-tracker s5-4) *entity-pool* "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-19 run-function-in-process) - (a0-72 s5-4) - (a1-32 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 62)) - (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-19) a0-72 a1-32 *part-tracker-params-default*) - ) - (-> s5-4 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 62)) ) ) (let ((v1-110 (-> self control root-prim))) @@ -2535,55 +2318,11 @@ (cond ((logtest? (-> *part-group-id-table* 65 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((s5-8 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-8 - (let ((t9-27 (method-of-type part-tracker-subsampler activate))) - (t9-27 - (the-as part-tracker-subsampler s5-8) - *entity-pool* - "part-tracker-subsampler" - (the-as pointer #x70004000) - ) - ) - (let ((t9-28 run-function-in-process) - (a0-92 s5-8) - (a1-41 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 65)) - (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-28) a0-92 a1-41 *part-tracker-subsampler-params-default*) - ) - (-> s5-8 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 65)) ) (else (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((s5-9 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-9 - (let ((t9-30 (method-of-type part-tracker activate))) - (t9-30 (the-as part-tracker s5-9) *entity-pool* "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-31 run-function-in-process) - (a0-98 s5-9) - (a1-44 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 65)) - (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-31) a0-98 a1-44 *part-tracker-params-default*) - ) - (-> s5-9 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 65)) ) ) (set-vector! (-> self control transv) 0.0 65502.96 0.0 1.0) @@ -2768,55 +2507,11 @@ (cond ((logtest? (-> *part-group-id-table* 66 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((s5-12 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-12 - (let ((t9-45 (method-of-type part-tracker-subsampler activate))) - (t9-45 - (the-as part-tracker-subsampler s5-12) - *entity-pool* - "part-tracker-subsampler" - (the-as pointer #x70004000) - ) - ) - (let ((t9-46 run-function-in-process) - (a0-130 s5-12) - (a1-56 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 66)) - (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-46) a0-130 a1-56 *part-tracker-subsampler-params-default*) - ) - (-> s5-12 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 66)) ) (else (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((s5-13 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-13 - (let ((t9-48 (method-of-type part-tracker activate))) - (t9-48 (the-as part-tracker s5-13) *entity-pool* "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-49 run-function-in-process) - (a0-136 s5-13) - (a1-59 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 66)) - (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-49) a0-136 a1-59 *part-tracker-params-default*) - ) - (-> s5-13 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 66)) ) ) (target-death-anim (the-as spool-anim #f)) @@ -2835,55 +2530,11 @@ (cond ((logtest? (-> gp-1 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((s5-1 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-1 - (let ((t9-3 (method-of-type part-tracker-subsampler activate))) - (t9-3 - (the-as part-tracker-subsampler s5-1) - *entity-pool* - "part-tracker-subsampler" - (the-as pointer #x70004000) - ) - ) - (let ((t9-4 run-function-in-process) - (a0-9 s5-1) - (a1-3 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) gp-1) - (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-4) a0-9 a1-3 *part-tracker-subsampler-params-default*) - ) - (-> s5-1 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group gp-1) ) (else (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((s5-2 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-2 - (let ((t9-6 (method-of-type part-tracker activate))) - (t9-6 (the-as part-tracker s5-2) *entity-pool* "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-7 run-function-in-process) - (a0-15 s5-2) - (a1-6 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) gp-1) - (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-7) a0-15 a1-6 *part-tracker-params-default*) - ) - (-> s5-2 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to *entity-pool* :group gp-1) ) ) ) diff --git a/goal_src/jak3/engine/target/target-gun.gc b/goal_src/jak3/engine/target/target-gun.gc index c9621e86bd..05e9ddac49 100644 --- a/goal_src/jak3/engine/target/target-gun.gc +++ b/goal_src/jak3/engine/target/target-gun.gc @@ -720,40 +720,40 @@ ((arg0 pickup-type)) (case arg0 (((pickup-type gun-yellow-1)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modeguy1 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modeguy1 0.0 0)) ) (((pickup-type gun-yellow-2)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modeguy2 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modeguy2 0.0 0)) ) (((pickup-type gun-yellow-3)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modeguy3 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modeguy3 0.0 0)) ) (((pickup-type gun-red-1)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modegur1 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modegur1 0.0 0)) ) (((pickup-type gun-red-2)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modegur2 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modegur2 0.0 0)) ) (((pickup-type gun-red-3)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modegur3 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modegur3 0.0 0)) ) (((pickup-type gun-blue-1)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modegub1 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modegub1 0.0 0)) ) (((pickup-type gun-blue-2)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modegub2 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modegub2 0.0 0)) ) (((pickup-type gun-blue-3)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modegub3 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modegub3 0.0 0)) ) (((pickup-type gun-dark-1)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modegud1 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modegud1 0.0 0)) ) (((pickup-type gun-dark-2)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modegud2 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modegud2 0.0 0)) ) (((pickup-type gun-dark-3)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modegud3 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modegud3 0.0 0)) ) ) (none) @@ -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)) ) ) ) @@ -2088,7 +2088,7 @@ (set! (-> s5-2 0 quad) (-> self control collision-spheres 2 prim-core world-sphere quad)) (set! (-> s5-2 0 r) (lerp-scale (-> *TARGET-bank* body-radius) 7372.8 f30-1 0.0 1.0)) (let ((v1-214 gp-3)) - (set! (-> v1-214 spheres) s5-2) + (set! (-> v1-214 best-dist) (the-as float s5-2)) (set! (-> v1-214 best-other-prim) (the-as collide-shape-prim 1)) (set! (-> v1-214 collide-with) (-> self control root-prim prim-core collide-with)) (set! (-> v1-214 ignore-process0) #f) diff --git a/goal_src/jak3/engine/target/target-h.gc b/goal_src/jak3/engine/target/target-h.gc index 6edc52720b..1bfdca6815 100644 --- a/goal_src/jak3/engine/target/target-h.gc +++ b/goal_src/jak3/engine/target/target-h.gc @@ -84,7 +84,7 @@ (define-extern target-collide-set! (function symbol float int :behavior target)) (define-extern target-move-dist (function time-frame float :behavior target)) (define-extern get-intersect-point (function vector touching-prims-entry collide-shape touching-shapes-entry vector)) -(define-extern target-update-segs (function process-drawable none)) +(define-extern target-update-segs (function process-drawable float)) ;; logic-target (define-extern target-darkjak-setup (function symbol none :behavior target)) @@ -106,7 +106,7 @@ (define-extern target-gun-end-mode (function symbol symbol :behavior target)) (define-extern target-powerup-effect (function symbol none :behavior target)) (define-extern target-gun-type-set! (function pickup-type none :behavior target)) -(define-extern vehicle-spawn (function process type traffic-object-spawn-params process-drawable)) +(define-extern vehicle-spawn (function vehicle-type traffic-object-spawn-params process-drawable)) (define-extern target-gun-init (function pickup-type none :behavior target)) (define-extern target-invisible-stop (function none :behavior target)) (define-extern target-gun-fire (function pickup-type none :behavior target)) @@ -161,6 +161,54 @@ (define-extern target-gun-can-fire-dark? (function pickup-type symbol :behavior target)) (define-extern target-gun-fire-dark (function pickup-type (pointer process) :behavior target)) +;; powerups +(define-extern target-darkjak-process (function none :behavior target)) + +;; target-darkjak +(define-extern *darkjak-trans-mods* surface) + +;; target-ladder +(define-extern *ladder-mods* surface) + +;; target-tube +(define-extern *tube-mods* surface) +(define-extern *tube-jump-mods* surface) +(define-extern *tube-hit-mods* surface) +(define-extern *tube-surface* surface) + +;; target-flut +(define-extern *flut-walk-mods* surface) +(define-extern *flut-run-racer-mods* surface) +(define-extern *flut-run-wild-mods* surface) +(define-extern *flut-jump-wild-mods* surface) +(define-extern *flut-jump-mods* surface) +(define-extern *flut-jump-racer-mods* surface) +(define-extern *flut-double-jump-mods* surface) +(define-extern *flut-double-jump-racer-mods* surface) +(define-extern *flut-run-attack-mods* surface) +(define-extern *flut-air-attack-mods* surface) +(define-extern *flut-get-off-mods* surface) + +;; target-pilot +(define-extern *pilot-mods* surface) +(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 @@ -201,6 +249,7 @@ (defenum target-anim :type int32 (uninitialized -2) + (unknown -1) (default 0) (board 1) (dark 2) @@ -212,7 +261,8 @@ ;; DECOMP BEGINS (deftype target (process-focusable) - ((fact fact-info-target :override) + ((self target :override) + (fact fact-info-target :override) (control control-info :overlay-at root) (skel2 joint-control) (shadow-backup shadow-geo) @@ -227,7 +277,8 @@ (leg-ik joint-mod-ik 2) (foot joint-mod 2) (cloth symbol) - (init-time time-frame) + (mech-ik joint-mod-ik 2) + (init-time time-frame :overlay-at (-> mech-ik 0)) (teleport-time time-frame) (state-hook-time time-frame) (state-hook (function none :behavior target)) @@ -262,9 +313,9 @@ (mode-param1 handle) (mode-param2 uint64) (mode-param3 uint64) - (major-mode-exit-hook basic) - (major-mode-event-hook basic) - (sub-mode-exit-hook basic) + (major-mode-exit-hook (function none :behavior target)) + (major-mode-event-hook (function none :behavior target)) + (sub-mode-exit-hook (function none :behavior target)) (ext-geo-control external-art-buffer) (pending-ext-geo target-geo) (ext-geo target-geo) @@ -343,7 +394,7 @@ (target-continue continue-point) (target-credits int) target-darkjak-bomb0 - target-darkjak-bomb1 + (target-darkjak-bomb1 float float) target-darkjak-get-off (target-darkjak-get-on darkjak-stage) target-darkjak-running-attack @@ -360,25 +411,26 @@ target-edge-grab (target-edge-grab-jump float float symbol) target-edge-grab-off - (target-falling symbol) + (target-falling object) target-float (target-flop float float float object) (target-flop-hit-ground symbol) - target-flut-air-attack + (target-flut-air-attack float) target-flut-air-attack-hit-ground - target-flut-clone-anim - target-flut-death - target-flut-double-jump - target-flut-eject - target-flut-falling - target-flut-get-off + (target-flut-clone-anim handle) + (target-flut-death symbol) + (target-flut-double-jump float float) + (target-flut-eject symbol) + (target-flut-falling object) + (target-flut-get-off handle) target-flut-get-off-jump - target-flut-get-on + (target-flut-get-on handle) target-flut-grab - target-flut-hit + (target-flut-hit symbol attack-info) target-flut-hit-ground - target-flut-jump - target-flut-kanga-catch + (target-flut-jump float float) + (target-flut-kanga-catch handle symbol) + target-flut-run-wild target-flut-running-attack target-flut-stance (target-flut-start handle symbol int) @@ -395,16 +447,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) @@ -412,9 +469,15 @@ target-indax-walk (target-invisible-get-on handle time-frame) (target-jump float float surface) - (target-jump-forward float float) + (target-jump-forward float float symbol) target-ladder + target-ladder-jump-off + target-ladder-slide-down + target-ladder-stance (target-ladder-start handle) + target-ladder-switch + target-ladder-walk-down + target-ladder-walk-up (target-launch float symbol vector int) target-launch-dir target-lightjak-freeze @@ -430,35 +493,35 @@ target-mech-carry-drag target-mech-carry-drop target-mech-carry-falling - target-mech-carry-hit-ground - target-mech-carry-jump + (target-mech-carry-hit-ground symbol) + (target-mech-carry-jump float float) target-mech-carry-pickup target-mech-carry-stance target-mech-carry-throw target-mech-carry-walk - target-mech-clone-anim - target-mech-death - target-mech-falling + (target-mech-clone-anim handle) + (target-mech-death symbol) + (target-mech-falling symbol) target-mech-get-off - target-mech-get-on - target-mech-get-up + (target-mech-get-on handle) + (target-mech-get-up handle) target-mech-grab - target-mech-hit - target-mech-hit-ground - target-mech-jump + (target-mech-hit symbol attack-info) + (target-mech-hit-ground symbol) + (target-mech-jump float float surface) target-mech-punch target-mech-shield target-mech-stance (target-mech-start handle float symbol) target-mech-walk - target-pilot-clone-anim + (target-pilot-clone-anim handle) target-pilot-daxter-perch - target-pilot-death + (target-pilot-death symbol) (target-pilot-edge-grab pilot-edge-grab-info) - target-pilot-get-off + (target-pilot-get-off handle) target-pilot-get-on target-pilot-grab - target-pilot-hit + (target-pilot-hit symbol attack-info) target-pilot-impact target-pilot-stance (target-pilot-start handle symbol symbol) @@ -467,7 +530,7 @@ (target-pole-flip-forward float float float) (target-pole-flip-forward-jump float float) (target-pole-flip-up float float float) - (target-pole-flip-up-jump float float) + (target-pole-flip-up-jump float float symbol) target-powerjak-get-on (target-racing-start handle) target-roll @@ -488,7 +551,11 @@ target-swim-walk target-title target-tube + (target-tube-death symbol) + (target-tube-hit symbol attack-info) + (target-tube-jump float float) (target-tube-start handle) + target-tube-walk target-turn-around target-turret-get-off (target-turret-get-on handle) @@ -497,8 +564,8 @@ target-wade-stance target-wade-walk target-walk - (target-warp-in vector vector) - target-warp-out + (target-warp-in vector vector object) + (target-warp-out vector vector handle) target-yellow-jump-blast tobot-stance ) diff --git a/goal_src/jak3/engine/target/target-handler.gc b/goal_src/jak3/engine/target/target-handler.gc index 51bc9edadd..4093c6d3a5 100644 --- a/goal_src/jak3/engine/target/target-handler.gc +++ b/goal_src/jak3/engine/target/target-handler.gc @@ -153,27 +153,7 @@ quad ) ) - (let ((gp-1 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-1 - (let ((t9-7 (method-of-type part-tracker-subsampler activate))) - (t9-7 (the-as part-tracker-subsampler gp-1) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-8 run-function-in-process) - (a0-39 gp-1) - (a1-14 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 10)) - (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-8) a0-39 a1-14 *part-tracker-subsampler-params-default*) - ) - (-> gp-1 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 10)) ) (else (set! (-> *launch-matrix* trans quad) @@ -185,26 +165,7 @@ quad ) ) - (let ((gp-2 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-2 - (let ((t9-10 (method-of-type part-tracker activate))) - (t9-10 (the-as part-tracker gp-2) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-11 run-function-in-process) - (a0-48 gp-2) - (a1-17 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 10)) - (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-11) a0-48 a1-17 *part-tracker-params-default*) - ) - (-> gp-2 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 10)) ) ) (target-timed-invulnerable @@ -221,53 +182,24 @@ (sound-play "oof") ) (else - (cond - ((logtest? (-> *part-group-id-table* 67 flags) (sp-group-flag sp13)) - (let ((gp-4 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-4 - (let ((t9-17 (method-of-type part-tracker-subsampler activate))) - (t9-17 (the-as part-tracker-subsampler gp-4) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-18 run-function-in-process) - (a0-55 gp-4) - (a1-23 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 67)) - (set! (-> *part-tracker-subsampler-params-default* duration) (seconds 1)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 6) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-18) a0-55 a1-23 *part-tracker-subsampler-params-default*) - ) - (-> gp-4 ppointer) - ) - ) - ) - (else - (let ((gp-5 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-5 - (let ((t9-20 (method-of-type part-tracker activate))) - (t9-20 (the-as part-tracker gp-5) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-21 run-function-in-process) - (a0-58 gp-5) - (a1-26 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 67)) - (set! (-> *part-tracker-params-default* duration) (seconds 1)) - (set! (-> *part-tracker-params-default* callback) #f) - (set! (-> *part-tracker-params-default* userdata) (the-as uint #f)) - (set! (-> *part-tracker-params-default* target) self) - (set! (-> *part-tracker-params-default* mat-joint) 6) - ((the-as (function object object object none) t9-21) a0-58 a1-26 *part-tracker-params-default*) - ) - (-> gp-5 ppointer) - ) + (if (logtest? (-> *part-group-id-table* 67 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 67) + :duration (seconds 1) + :target self + :mat-joint 6 + ) + (part-tracker-spawn + part-tracker + :to self + :group (-> *part-group-id-table* 67) + :duration (seconds 1) + :target self + :mat-joint 6 ) ) - ) (process-spawn-function process (lambda :behavior target @@ -354,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) @@ -383,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) @@ -395,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) @@ -561,55 +486,16 @@ (cond ((logtest? (-> *part-group-id-table* 11 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> sv-128 quad)) - (let ((s5-1 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-1 - (let ((t9-13 (method-of-type part-tracker-subsampler activate))) - (t9-13 (the-as part-tracker-subsampler s5-1) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-14 run-function-in-process) - (a0-46 s5-1) - (a1-16 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 11)) - (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-14) a0-46 a1-16 *part-tracker-subsampler-params-default*) - ) - (-> s5-1 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 11)) ) (else (set! (-> *launch-matrix* trans quad) (-> sv-128 quad)) - (let ((s5-2 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-2 - (let ((t9-16 (method-of-type part-tracker activate))) - (t9-16 (the-as part-tracker s5-2) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-17 run-function-in-process) - (a0-51 s5-2) - (a1-19 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 11)) - (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-17) a0-51 a1-19 *part-tracker-params-default*) - ) - (-> s5-2 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 11)) ) ) ) (else - (do-effect (-> self skel effect) (the-as symbol "group-spin-hit") -1.0 49) + (do-effect (-> self skel effect) "group-spin-hit" -1.0 49) ) ) (play-effect-sound @@ -641,50 +527,11 @@ (cond ((logtest? (-> *part-group-id-table* 12 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> sv-128 quad)) - (let ((gp-1 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-1 - (let ((t9-23 (method-of-type part-tracker-subsampler activate))) - (t9-23 (the-as part-tracker-subsampler gp-1) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-24 run-function-in-process) - (a0-71 gp-1) - (a1-26 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 12)) - (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-24) a0-71 a1-26 *part-tracker-subsampler-params-default*) - ) - (-> gp-1 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 12)) ) (else (set! (-> *launch-matrix* trans quad) (-> sv-128 quad)) - (let ((gp-2 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-2 - (let ((t9-26 (method-of-type part-tracker activate))) - (t9-26 (the-as part-tracker gp-2) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-27 run-function-in-process) - (a0-76 gp-2) - (a1-29 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 12)) - (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-27) a0-76 a1-29 *part-tracker-params-default*) - ) - (-> gp-2 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 12)) ) ) ) @@ -714,50 +561,11 @@ (cond ((logtest? (-> *part-group-id-table* 12 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> sv-128 quad)) - (let ((s5-4 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-4 - (let ((t9-31 (method-of-type part-tracker-subsampler activate))) - (t9-31 (the-as part-tracker-subsampler s5-4) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-32 run-function-in-process) - (a0-91 s5-4) - (a1-36 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 12)) - (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-32) a0-91 a1-36 *part-tracker-subsampler-params-default*) - ) - (-> s5-4 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 12)) ) (else (set! (-> *launch-matrix* trans quad) (-> sv-128 quad)) - (let ((s5-5 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-5 - (let ((t9-34 (method-of-type part-tracker activate))) - (t9-34 (the-as part-tracker s5-5) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-35 run-function-in-process) - (a0-96 s5-5) - (a1-39 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 12)) - (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-35) a0-96 a1-39 *part-tracker-params-default*) - ) - (-> s5-5 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 12)) ) ) ) @@ -810,55 +618,16 @@ (cond ((logtest? (-> *part-group-id-table* 12 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> sv-128 quad)) - (let ((gp-3 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-3 - (let ((t9-43 (method-of-type part-tracker-subsampler activate))) - (t9-43 (the-as part-tracker-subsampler gp-3) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-44 run-function-in-process) - (a0-116 gp-3) - (a1-47 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 12)) - (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-44) a0-116 a1-47 *part-tracker-subsampler-params-default*) - ) - (-> gp-3 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 12)) ) (else (set! (-> *launch-matrix* trans quad) (-> sv-128 quad)) - (let ((gp-4 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-4 - (let ((t9-46 (method-of-type part-tracker activate))) - (t9-46 (the-as part-tracker gp-4) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-47 run-function-in-process) - (a0-121 gp-4) - (a1-50 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 12)) - (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-47) a0-121 a1-50 *part-tracker-params-default*) - ) - (-> gp-4 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 12)) ) ) ) ) - (do-effect (-> self skel effect) (the-as symbol "group-uppercut-hit") -1.0 28) + (do-effect (-> self skel effect) "group-uppercut-hit" -1.0 28) (play-effect-sound (-> self skel effect) (the-as symbol "sound") @@ -870,8 +639,8 @@ (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 178 (seconds 0.1)) ) ((or (= v1-57 'flop) (= v1-57 'flop-down)) - (do-effect (-> self skel effect) (the-as symbol "group-flop-hit") -1.0 28) - (do-effect (-> self skel effect) (the-as symbol "group-flop-hit") -1.0 19) + (do-effect (-> self skel effect) "group-flop-hit" -1.0 28) + (do-effect (-> self skel effect) "group-flop-hit" -1.0 19) (play-effect-sound (-> self skel effect) (the-as symbol "sound") @@ -1117,11 +886,11 @@ v0-0 ) (('do-effect) - (do-effect (-> self skel effect) (the-as symbol (-> arg3 param 0)) (the-as float (-> arg3 param 1)) -1) + (do-effect (-> self skel effect) (the-as string (-> arg3 param 0)) (the-as float (-> arg3 param 1)) -1) (if (-> self sidekick) (do-effect (-> self sidekick 0 skel effect) - (the-as symbol (-> arg3 param 0)) + (the-as string (-> arg3 param 0)) (the-as float (-> arg3 param 1)) -1 ) @@ -1385,7 +1154,7 @@ ) (defbehavior target-standard-event-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) - (local-vars (at-0 int) (v1-317 object) (a2-5 symbol)) + (local-vars (at-0 int) (v1-317 object)) (rlet ((vf0 :class vf) (vf1 :class vf) (vf2 :class vf) @@ -1554,12 +1323,7 @@ (go target-board-start (process->handle (the-as process (-> arg3 param 1)))) ) ) - ((begin (set! a2-5 (= v1-63 'pilot)) (or a2-5 - (begin (set! a2-5 (= v1-63 'pilot-race)) a2-5) - (begin (set! a2-5 (= v1-63 'pilot-daxter)) a2-5) - (= v1-63 'pilot-race-daxter) - ) - ) + ((or (= v1-63 'pilot) (= v1-63 'pilot-race) (= v1-63 'pilot-daxter) (= v1-63 'pilot-race-daxter)) (let ((s5-1 (the-as object (-> arg3 param 1)))) (when (not (the-as uint s5-1)) (let ((s4-0 (new 'stack 'traffic-object-spawn-params))) @@ -1578,13 +1342,7 @@ (set! (-> s4-0 position quad) (-> self control trans quad)) (quaternion-copy! (-> s4-0 rotation) (-> self control quat)) (set! (-> s4-0 id) (the-as uint 0)) - (let ((v1-101 (vehicle-spawn - (the-as process (-> arg3 param 2)) - (the-as type s4-0) - (the-as traffic-object-spawn-params a2-5) - ) - ) - ) + (let ((v1-101 (vehicle-spawn (the-as vehicle-type (-> arg3 param 2)) s4-0))) (if v1-101 (set! s5-1 v1-101) ) @@ -1593,13 +1351,13 @@ ) (when s5-1 (let* ((v1-102 (-> arg3 param 0)) - (a2-6 (if (or (= v1-102 'pilot-daxter) (= v1-102 'pilot-race-daxter)) + (a2-8 (if (or (= v1-102 'pilot-daxter) (= v1-102 'pilot-race-daxter)) #t #f ) ) ) - (go target-pilot-start (process->handle s5-1) (the-as symbol (-> arg3 param 3)) a2-6) + (go target-pilot-start (process->handle s5-1) (the-as symbol (-> arg3 param 3)) a2-8) ) ) ) diff --git a/goal_src/jak3/engine/target/target-invisible.gc b/goal_src/jak3/engine/target/target-invisible.gc index 634933ef51..718ac0d9d5 100644 --- a/goal_src/jak3/engine/target/target-invisible.gc +++ b/goal_src/jak3/engine/target/target-invisible.gc @@ -53,7 +53,7 @@ ) (defpart 661 - :init-specs ((:texture (new 'static 'texture-id :index #x4b :page #x4)) + :init-specs ((:texture (starflash level-default-sprite)) (:num 1.0) (:scale-x (meters 5)) (:rot-x (degrees 2250)) @@ -73,7 +73,7 @@ ) (defpart 662 - :init-specs ((:texture (new 'static 'texture-id :index #x3d :page #x4)) + :init-specs ((:texture (middot level-default-sprite)) (:num 200.0) (:scale-x (meters 0.05) (meters 0.05)) (:scale-y :copy scale-x) @@ -94,7 +94,7 @@ ) (defpart 663 - :init-specs ((:texture (new 'static 'texture-id :index #xa0 :page #x4)) + :init-specs ((:texture (big-cloud level-default-sprite)) (:num 30.0) (:scale-x (meters 1) (meters 2)) (:rot-z (degrees 0) (degrees 360)) @@ -325,7 +325,7 @@ (defskelgroup skel-dark-maker-idol dark-maker-idol dark-maker-idol-lod0-jg dark-maker-idol-idle-ja ((dark-maker-idol-lod0-mg (meters 999999))) :bounds (static-spherem 0 1 0 2) - :shadow-joint-index 3 + :origin-joint-index 3 ) (defstate idle (dark-maker-idol) @@ -422,7 +422,7 @@ ) (set! (-> a1-2 trans quad) (-> s5-1 quad)) (if (and (nonzero? (-> self part)) (not gp-0)) - (sparticle-launch-control-method-17 (-> self part) a1-2) + (spawn-from-mat (-> self part) a1-2) ) ) (update-vol! (-> self humming-sound) (if gp-0 @@ -450,50 +450,11 @@ (cond ((logtest? (-> *part-group-id-table* 182 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) - (let ((gp-1 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-1 - (let ((t9-1 (method-of-type part-tracker-subsampler activate))) - (t9-1 (the-as part-tracker-subsampler gp-1) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-2 run-function-in-process) - (a0-5 gp-1) - (a1-2 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 182)) - (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-5 a1-2 *part-tracker-subsampler-params-default*) - ) - (-> gp-1 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 182)) ) (else (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) - (let ((gp-2 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-2 - (let ((t9-4 (method-of-type part-tracker activate))) - (t9-4 (the-as part-tracker gp-2) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-5 run-function-in-process) - (a0-11 gp-2) - (a1-5 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 182)) - (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-11 a1-5 *part-tracker-params-default*) - ) - (-> gp-2 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 182)) ) ) (if *target* @@ -530,7 +491,7 @@ (a1-4 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat))) ) (set! (-> a1-4 trans quad) (-> gp-2 quad)) - (sparticle-launch-control-method-17 (-> self part) a1-4) + (spawn-from-mat (-> self part) a1-4) ) ) (ja-post) @@ -562,9 +523,9 @@ (the-as skeleton-group (art-group-get-by-name *level* "skel-dark-maker-idol" (the-as (pointer level) #f))) (the-as pair 0) ) - (if (task-node-closed? (game-task-node volcano-darkeco-resolution)) - (set! (-> this part) (create-launch-control (-> *part-group-id-table* 82) this)) - ) + ;; (if (task-node-closed? (game-task-node volcano-darkeco-resolution)) + ;; (set! (-> this part) (create-launch-control (-> *part-group-id-table* 82) this)) + ;; ) (set! (-> this humming-sound) (new 'process 'ambient-sound "dark-maker-amb" (-> this root trans) 0.0)) (set-falloff-far! (-> this humming-sound) 122880.0) (update-vol! (-> this humming-sound) 0.8) diff --git a/goal_src/jak3/engine/target/target-ladder.gc b/goal_src/jak3/engine/target/target-ladder.gc index e1c5929d3e..c7d6790c5d 100644 --- a/goal_src/jak3/engine/target/target-ladder.gc +++ b/goal_src/jak3/engine/target/target-ladder.gc @@ -5,5 +5,631 @@ ;; name in dgo: target-ladder ;; dgos: HALFPIPE, SED, WWD, VOCA +;; +++ladder-options +(defenum ladder-options + :type uint32 + :bitfield #t + (lo0 0) + (lo1 1) + (lo2 2) + (nodraw 3) + ) +;; ---ladder-options + + ;; DECOMP BEGINS +(deftype ladder-info (basic) + ((ladder handle) + (flip degrees) + (interp float) + (start-mat matrix :inline) + ) + ) + + +(let ((v1-2 (copy *walk-mods* 'global))) + (set! (-> v1-2 name) 'ladder) + (set! (-> v1-2 flags) (surface-flag turn-when-centered turn-to-alt gun-hide)) + (set! (-> v1-2 bend-factor) 1.0) + (set! (-> v1-2 bend-speed) 1.0) + (set! (-> v1-2 tiltv) 262144.0) + (set! (-> v1-2 tiltvf) 30.0) + (set! (-> v1-2 tiltvv) 1048576.0) + (set! (-> v1-2 tiltvvf) 30.0) + (set! *ladder-mods* v1-2) + ) + +(defstate target-ladder (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (if (and (= message 'query) (= (-> block param 0) 'mode)) + 'target-ladder + (target-standard-event-handler proc argc message block) + ) + ) + :exit (behavior () + (when (not (and (-> self next-state) (begin (-> self next-state name) (state-type? (-> self next-state) 'target-ladder))) + ) + (target-collide-set! 'normal 0.0) + (logclear! (-> self focus-status) (focus-status pole)) + (set! (-> self ladder ladder) (the-as handle #f)) + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still lleg-no-ik rleg-no-ik)) + ) + ) + :trans (behavior () + (local-vars (gp-0 symbol)) + (b! (not (cpad-pressed? (-> self control cpad number) x)) cfg-2 :delay (empty-form)) + (logclear! (-> *cpad-list* cpads (-> self control cpad number) button0-abs 0) (pad-buttons x)) + (logclear! (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) (pad-buttons x)) + (go target-ladder-jump-off) + (b! #t cfg-41 :delay (nop!)) + (label cfg-2) + (cond + ((and (cpad-hold? (-> self control cpad number) circle) + (not (and (-> self next-state) (let ((v1-26 (-> self next-state name))) + (or (= v1-26 'target-ladder-slide-down) (= v1-26 'target-ladder-switch)) + ) + ) + ) + (!= (send-event (handle->process (-> self ladder ladder)) 'move 0) 0.0) + ) + (go target-ladder-slide-down) + ) + ((and (cpad-pressed? (-> self control cpad number) square) + (not (and (-> self next-state) (let ((v1-49 (-> self next-state name))) + (or (= v1-49 'target-ladder-slide-down) (= v1-49 'target-ladder-switch)) + ) + ) + ) + (begin + (let ((gp-1 #t) + (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) 'options) + (let ((v1-57 + (the-as int (logand (the-as int (send-event-function (handle->process (-> self ladder ladder)) a1-7)) 3)) + ) + ) + (cmove-#f-nonzero gp-0 v1-57 gp-1) + ) + ) + gp-0 + ) + ) + (go target-ladder-switch) + ) + ) + (label cfg-41) + ) + :code nothing + :post (behavior () + (let ((gp-0 (handle->process (-> self ladder ladder)))) + (seek! (-> self ladder interp) 1.0 (* 10.0 (seconds-per-frame))) + (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) 'matrix) + (set! (-> a1-2 param 0) (the-as uint (new 'stack-no-clear 'matrix))) + (let ((gp-1 (the-as matrix (send-event-function gp-0 a1-2)))) + (if (= (-> self ladder flip) -1.0) + (set! (-> self ladder flip) + (if (< (vector-dot (-> gp-1 fvec) (vector-! (new 'stack-no-clear 'vector) (-> gp-1 trans) (-> self control trans))) + 0.0 + ) + 32768.0 + 0.0 + ) + ) + ) + (cond + (gp-1 + (set! (-> self control bend-amount) 1.0) + (let ((s4-0 (new 'stack-no-clear 'matrix))) + (let ((a1-5 (matrix-rotate-y! (new 'stack-no-clear 'matrix) (-> self ladder flip)))) + (matrix*! s4-0 a1-5 gp-1) + ) + (let ((s5-0 (new 'static 'vector :w 1.0)) + (gp-2 (matrix-lerp! (new 'stack-no-clear 'matrix) (-> self ladder start-mat) s4-0 (-> self ladder interp))) + ) + (set! (-> s5-0 z) (* -1597.44 (-> self ladder interp))) + (vector-matrix*! (-> self control trans) s5-0 gp-2) + (set! (-> self control turn-to-alt-heading quad) (-> gp-2 fvec quad)) + (set! (-> self control local-normal quad) (-> gp-2 uvec quad)) + (set! (-> self control bent-gravity-normal quad) (-> gp-2 uvec quad)) + (set! (-> self control gspot-normal quad) (-> gp-2 uvec quad)) + ) + ) + (update-transforms (-> self control)) + ) + (else + (go target-falling #f) + ) + ) + ) + ) + ) + (target-no-move-post) + ) + ) + +(defstate target-ladder-start (target) + :parent target-ladder + :enter (behavior ((arg0 handle)) + (when (zero? (-> self ladder)) + (set! (-> self ladder) (new 'process 'ladder-info)) + (set! (-> self ladder ladder) (the-as handle #f)) + ) + (set! (-> self ladder ladder) arg0) + (set! (-> self ladder flip) -1.0) + (set! (-> self ladder interp) 0.0) + (let* ((v1-10 (-> self ladder start-mat)) + (a3-0 (-> self node-list data 0 bone transform)) + (a0-4 (-> a3-0 rvec quad)) + (a1-1 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-10 rvec quad) a0-4) + (set! (-> v1-10 uvec quad) a1-1) + (set! (-> v1-10 fvec quad) a2-0) + (set! (-> v1-10 trans quad) a3-1) + ) + (set! (-> self control bend-target) 1.0) + (set-time! (-> self state-time)) + (set! (-> self control mod-surface) *ladder-mods*) + (logior! (-> self target-flags) (target-flags lleg-still rleg-still lleg-no-ik rleg-no-ik)) + (target-collide-set! 'pole 0.0) + (set! (-> self control unknown-vector37 quad) (-> self control transv quad)) + (set! (-> self control transv quad) (the-as uint128 0)) + ) + :code (behavior ((arg0 handle)) + (cond + ((time-elapsed? (-> self control last-time-on-surface) (seconds 0.05)) + (ja-channel-push! 1 (seconds 0.065)) + (ja-no-eval :group! jakb-ladder-jump-on-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.25)) + (ja-no-eval :group! jakb-ladder-get-on-ja :num! (seek! max 4.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 4.0)) + ) + ) + ) + (go target-ladder-stance) + ) + :post (behavior () + (send-event (handle->process (-> self ladder ladder)) 'stance) + (let ((v1-8 (-> self state parent))) + (when v1-8 + (let ((t9-1 (-> v1-8 post))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + ) + ) + +(defstate target-ladder-stance (target) + :parent target-ladder + :trans (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (if (!= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) + (go target-ladder-walk-up) + ) + (can-play-stance-amibent?) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (or (= v1-2 jakb-ladder-up-to-stance-ja) (= v1-2 jakb-ladder-slide-stop-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 jakb-ladder-slide-start-ja) (= v1-16 jakb-ladder-slide-loop-ja))) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-ladder-slide-stop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (let ((v1-45 (ja-group))) + (cond + ((and v1-45 (or (= v1-45 jakb-ladder-stance-to-up-ja) (= v1-45 jakb-ladder-stance-to-down-ja))) + (ja-no-eval :num! (seek! 0.0)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.25)) + ) + ) + ) + ) + ) + ) + (until #f + (ja-no-eval :group! jakb-ladder-stance-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (-> target-ladder-start post) + ) + +(defstate target-ladder-walk-up (target) + :parent target-ladder + :trans (behavior () + (local-vars (gp-0 symbol)) + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (cond + ((and (= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) + (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) 'move) + (set! (-> a1-0 param 0) (the-as uint 0)) + (let* ((f0-1 (the-as float (send-event-function (handle->process (-> self ladder ladder)) a1-0))) + (f0-2 (- f0-1 (* (the float (the int (/ f0-1 0.5))) 0.5))) + ) + (or (< 0.4 f0-2) (< f0-2 0.01)) + ) + ) + ) + (go target-ladder-stance) + ) + ((= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) + ) + ((< (the-as uint 128) (-> self control cpad lefty)) + (go target-ladder-walk-down) + ) + ((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) 'pos) + (set! (-> a1-1 param 0) (the-as uint (new 'stack-no-clear 'vector))) + (and (= (send-event-function (handle->process (-> self ladder ladder)) a1-1) 1.0) + (begin + (let ((gp-1 #t) + (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) 'options) + (let ((v1-56 + (the-as int (logand (the-as int (send-event-function (handle->process (-> self ladder ladder)) a1-2)) 4)) + ) + ) + (cmove-#f-nonzero gp-0 v1-56 gp-1) + ) + ) + gp-0 + ) + ) + ) + (go + target-edge-grab-jump + (-> *TARGET-bank* edge-grab-jump-height-min) + (-> *TARGET-bank* edge-grab-jump-height-max) + 'ladder + ) + ) + ) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 jakb-ladder-up-to-stance-ja)) + (ja-no-eval :num! (seek! 0.0)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ((let ((v1-13 (ja-group))) + (and v1-13 (= v1-13 jakb-ladder-stance-to-up-ja)) + ) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! jakb-ladder-up-ja) + (until #f + (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) 'move) + (set! (-> a1-3 param 0) + (the-as + uint + (* (-> *TARGET-bank* ladder-walk-up-speed) (fmax 0.4 (-> self control cpad stick0-speed)) (seconds-per-frame)) + ) + ) + (let ((f0-8 (the-as float (send-event-function (handle->process (-> self ladder ladder)) a1-3))) + (a0-20 (-> self skel root-channel 0)) + ) + (let ((f0-9 (- f0-8 (* (the float (the int (/ f0-8 1.0))) 1.0))) + (v1-49 (ja-group)) + ) + (set! (-> a0-20 param 0) (* f0-9 (the float (+ (-> v1-49 frames num-frames) -1)))) + ) + (set! (-> a0-20 param 1) 1000.0) + (joint-control-channel-group-eval! a0-20 (the-as art-joint-anim #f) num-func-seek!) + ) + ) + (suspend) + ) + #f + ) + ) + +(defstate target-ladder-walk-down (target) + :parent target-ladder + :trans (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (cond + ((and (= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) + (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) 'move) + (set! (-> a1-0 param 0) (the-as uint 0)) + (let* ((f0-1 (the-as float (send-event-function (handle->process (-> self ladder ladder)) a1-0))) + (f0-2 (- f0-1 (* (the float (the int (/ f0-1 0.5))) 0.5))) + ) + (or (< 0.49 f0-2) (< f0-2 0.1)) + ) + ) + ) + (go target-ladder-stance) + ) + ((= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) + ) + ((< (-> self control cpad lefty) (the-as uint 128)) + (go target-ladder-walk-up) + ) + ((= (the-as float (send-event (handle->process (-> self ladder ladder)) 'pos (new 'stack-no-clear 'vector))) + 0.0 + ) + (go target-stance) + ) + ) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (when (and v1-2 (= v1-2 jakb-ladder-stance-to-down-ja)) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! jakb-ladder-down-ja) + (until #f + (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) 'move) + (set! (-> a1-2 param 0) (the-as uint (* (- (-> *TARGET-bank* ladder-walk-down-speed)) + (fmax 0.4 (-> self control cpad stick0-speed)) + (seconds-per-frame) + ) + ) + ) + (let ((f0-7 (the-as float (send-event-function (handle->process (-> self ladder ladder)) a1-2))) + (a0-14 (-> self skel root-channel 0)) + ) + (let ((f0-9 (- 1.0 (- f0-7 (* (the float (the int (/ f0-7 1.0))) 1.0)))) + (v1-39 (ja-group)) + ) + (set! (-> a0-14 param 0) (* f0-9 (the float (+ (-> v1-39 frames num-frames) -1)))) + ) + (set! (-> a0-14 param 1) 1000.0) + (joint-control-channel-group-eval! a0-14 (the-as art-joint-anim #f) num-func-seek!) + ) + ) + (suspend) + ) + #f + ) + ) + +(defstate target-ladder-slide-down (target) + :parent target-ladder + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self control unknown-sound-id00) (new-sound-id)) + ) + :exit (behavior () + (let ((v1-0 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-0 command) (sound-command set-param)) + (set! (-> v1-0 id) (-> self control unknown-sound-id00)) + (set! (-> v1-0 params volume) -4) + (set! (-> v1-0 auto-time) 24) + (set! (-> v1-0 auto-from) 2) + (set! (-> v1-0 params mask) (the-as uint 17)) + (-> v1-0 id) + ) + (let ((v1-3 (-> self prev-state parent))) + (when v1-3 + (let ((t9-1 (-> v1-3 exit))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + ) + :trans (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (if (and (not (cpad-hold? (-> self control cpad number) circle)) + (time-elapsed? (-> self state-time) (seconds 0.25)) + ) + (go target-ladder-stance) + ) + (set! (-> self control unknown-sound-id00) + (sound-play "ladder-slide" :id (-> self control unknown-sound-id00)) + ) + ) + :code (behavior () + (set! (-> self control unknown-word04) (the-as uint 0.0)) + (let ((v1-3 (ja-group))) + (cond + ((and v1-3 (= v1-3 jakb-ladder-slide-start-ja)) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ((let ((v1-17 (ja-group))) + (and v1-17 (= v1-17 jakb-ladder-slide-loop-ja)) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-ladder-slide-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + (ja :group! jakb-ladder-slide-loop-ja) + (until #f + (ja :num! (loop!)) + (suspend) + ) + #f + ) + :post (behavior () + (set! (-> self control unknown-word04) + (the-as uint (seek + (the-as float (-> self control unknown-word04)) + (- (-> *TARGET-bank* ladder-slide-speed)) + (* 2.0 (seconds-per-frame) (-> *TARGET-bank* ladder-slide-speed)) + ) + ) + ) + (if (= (the-as float (send-event + (handle->process (-> self ladder ladder)) + 'move + (* (the-as float (-> self control unknown-word04)) (seconds-per-frame)) + ) + ) + 0.0 + ) + (go target-ladder-stance) + ) + (let ((v1-21 (-> self state parent))) + (when v1-21 + (let ((t9-3 (-> v1-21 post))) + (if t9-3 + ((the-as (function none) t9-3)) + ) + ) + ) + ) + ) + ) + +(defstate target-ladder-switch (target) + :parent target-ladder + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (let ((f30-0 (-> self ladder flip))) + (ja-no-eval :group! jakb-ladder-switch-ja :num! (seek! max 1.25) :frame-num 0.0) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (set! (-> self ladder flip) + (the float (sar (shl (the int (lerp-scale f30-0 (+ 32768.0 f30-0) (ja-aframe-num 0) 0.0 30.0)) 48) 48)) + ) + (suspend) + (ja :num! (seek! max 1.25)) + ) + (set! (-> self ladder flip) (the float (sar (shl (the int (+ 32768.0 f30-0)) 48) 48))) + ) + (go target-ladder-stance) + ) + :post (-> target-ladder-start post) + ) + +(defstate target-ladder-jump-off (target) + :parent target-ladder + :trans #f + :code (behavior () + (set! (-> self control mod-surface) *turn-around-mods*) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-ladder-jump-ja :num! (seek!) :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) + (suspend) + (ja :num! (seek!)) + ) + (rot->dir-targ! (-> self control)) + (set-forward-vel 16384.0) + (go target-jump-forward (-> *TARGET-bank* jump-height-max) (-> *TARGET-bank* jump-height-max) #f) + ) + ) diff --git a/goal_src/jak3/engine/target/target-launch.gc b/goal_src/jak3/engine/target/target-launch.gc index 985cfbd98b..0b42792e3a 100644 --- a/goal_src/jak3/engine/target/target-launch.gc +++ b/goal_src/jak3/engine/target/target-launch.gc @@ -7,3 +7,146 @@ ;; DECOMP BEGINS +(defstate target-launch-dir (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (cond + ((and (= message 'query) (= (-> block param 0) 'mode)) + 'target-launch-dir + ) + ((= message 'launch-dir) + #f + ) + (else + (target-standard-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self control did-move-to-pole-or-max-jump-height) 0.0) + (sound-play "jak-launch") + (set! (-> self control unknown-vector37 y) + (- (-> self control unknown-vector37 y) (* 0.5 (the-as float (-> self control unknown-word04)))) + ) + (set! (-> self control unknown-vector39 quad) (-> self control trans quad)) + ) + :exit (behavior () + (target-state-hook-exit) + ) + :trans (behavior () + (cond + ((not (time-elapsed? (-> self state-time) (-> self control sliding-start-time))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> self control unknown-vector37 quad)) + (let ((gp-0 (new 'stack-no-clear 'quaternion))) + (set! (-> gp-0 quad) (-> self control unknown-vector37 quad)) + (set! (-> gp-0 y) 0.0) + (vector-normalize! (the-as vector gp-0) 1.0) + (let ((f30-0 (vector-normalize-ret-len! s5-0 1.0))) + 0.0 + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self control quat)) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self control dir-targ)) + (quaternion-rotate-y-to-vector! (-> self control dir-targ) (-> self control dir-targ) gp-0 18204.445) + (set-quaternion! (-> self control) (-> self control dir-targ)) + (let* ((f0-4 + (/ (the float (- (current-time) (-> self state-time))) (the float (-> self control sliding-start-time))) + ) + (f0-5 (- 1.0 f0-4)) + ) + (let ((f1-5 (* 1.4 f0-5 (/ f30-0 (* 0.0033333334 (the float (-> self control sliding-start-time))))))) + (* 0.0033333334 f1-5 (the float (- (current-time) (-> self clock old-frame-counter)))) + ) + (let ((f0-6 (- 1.0 f0-5))) + (vector+float*! + (-> self control trans) + (-> self control unknown-vector39) + (-> self control unknown-vector37) + f0-6 + ) + (+! (-> self control trans y) (* 0.5 f0-6 f0-6 (the-as float (-> self control unknown-word04)))) + (set! (-> self control transv quad) (the-as uint128 0)) + (set! (-> self control transv quad) (-> self control unknown-vector37 quad)) + (+! (-> self control transv y) (* f0-6 (the-as float (-> self control unknown-word04)))) + ) + ) + ) + ) + ) + (+! (-> self control did-move-to-pole-or-max-jump-height) + (* (the float (-> self control sliding-start-time)) (seconds-per-frame)) + ) + ) + (else + (let ((v1-53 (logclear (-> self control status) (collide-status on-surface))) + (a0-19 (-> self control)) + ) + (set! (-> a0-19 status) v1-53) + (go target-falling a0-19) + ) + ) + ) + ) + :code (behavior () + (send-event self 'end-mode 'gun) + (ja-channel-push! 1 (seconds 0.15)) + (set-forward-vel 0.0) + (cond + ((and (focus-test? self dark) (nonzero? (-> self darkjak))) + (ja-no-eval :group! (-> self draw art-group data 474) :num! (seek! (ja-aframe 15.0 0) 3.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 15.0 0) 3.0)) + ) + ) + ((= (-> self ext-anim) (target-anim default)) + (ja-no-eval :group! jakb-duck-stance-ja :num! (seek! (ja-aframe 15.0 0) 3.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 15.0 0) 3.0)) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.2)) + (if (and (focus-test? self dark) (nonzero? (-> self darkjak))) + (ja :group! (-> self draw art-group data 444) :num! min) + (ja :group! jakb-jump-ja :num! min) + ) + (until #f + (ja-no-eval :group! jakb-launch-jump-loop-ja :num! (seek! max 0.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.5)) + ) + ) + #f + (until (time-elapsed? (-> self state-time) (-> self control sliding-start-time)) + (ja :num! (identity + (* 20.0 + (/ (the float (- (current-time) (-> self state-time))) (the float (-> self control sliding-start-time))) + ) + ) + ) + (suspend) + ) + (until #f + (suspend) + ) + #f + ) + :post (behavior () + (target-no-move-post) + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (let ((a2-0 (new 'stack-no-clear 'collide-query))) + (let ((v1-3 (-> self control))) + (set! (-> a2-0 collide-with) (-> v1-3 backup-collide-with)) + (set! (-> a2-0 ignore-process0) self) + (set! (-> a2-0 ignore-process1) #f) + (set! (-> a2-0 ignore-pat) (-> v1-3 pat-ignore-mask)) + ) + (set! (-> a2-0 action-mask) (collide-action solid)) + (fill-cache-for-shape (-> self control) (+ 4096.0 (vector-length (-> self control transv))) a2-0) + ) + (target-method-28 *target* *collide-cache* *collide-edge-spec*) + ) + ) + ) diff --git a/goal_src/jak3/engine/target/target-lightjak.gc b/goal_src/jak3/engine/target/target-lightjak.gc index 02e331c9a3..4d48dbece1 100644 --- a/goal_src/jak3/engine/target/target-lightjak.gc +++ b/goal_src/jak3/engine/target/target-lightjak.gc @@ -22,7 +22,7 @@ ) (defpart 630 - :init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4)) + :init-specs ((:texture (vol-light level-default-sprite)) (:num 1.0) (:x (meters 0)) (:y (meters 0)) @@ -45,7 +45,7 @@ ) (defpart 631 - :init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4)) + :init-specs ((:texture (vol-light level-default-sprite)) (:num 1.0) (:x (meters 0)) (:y (meters 0)) @@ -68,7 +68,7 @@ ) (defpart 632 - :init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4)) + :init-specs ((:texture (vol-light level-default-sprite)) (:num 1.0) (:x (meters 0)) (:y (meters 0)) @@ -91,7 +91,7 @@ ) (defpart 633 - :init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4)) + :init-specs ((:texture (vol-light level-default-sprite)) (:num 1.0) (:x (meters 0)) (:y (meters 0)) @@ -114,7 +114,7 @@ ) (defpart 634 - :init-specs ((:texture (new 'static 'texture-id :index #x96 :page #x4)) + :init-specs ((:texture (diamond-star level-default-sprite)) (:num 1.0) (:x (meters -0.5) (meters 1)) (:y (meters 0) (meters 8)) @@ -149,7 +149,7 @@ ) (defpart 636 - :init-specs ((:texture (new 'static 'texture-id :index #x93 :page #x4)) + :init-specs ((:texture (colorflash level-default-sprite)) (:num 1.0) (:scale-x (meters 20)) (:rot-x (degrees 22.5)) @@ -182,7 +182,7 @@ ) (defpart 637 - :init-specs ((:texture (new 'static 'texture-id :index #x93 :page #x4)) + :init-specs ((:texture (colorflash level-default-sprite)) (:num 1.0) (:scale-x (meters 20)) (:rot-x (degrees 22.5)) @@ -204,7 +204,7 @@ ) (defpart 638 - :init-specs ((:texture (new 'static 'texture-id :index #x94 :page #x4)) + :init-specs ((:texture (rainbow-halo level-default-sprite)) (:num 1.0) (:scale-x (meters 10)) (:rot-x (degrees 22.5)) @@ -226,7 +226,7 @@ ) (defpart 639 - :init-specs ((:texture (new 'static 'texture-id :index #x3d :page #x4)) + :init-specs ((:texture (middot level-default-sprite)) (:num 60.0) (:y (meters -1.5) (meters 3)) (:scale-x (meters 0.05) (meters 0.05)) @@ -283,7 +283,7 @@ ) (defpart 642 - :init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4)) + :init-specs ((:texture (vol-light level-default-sprite)) (:num 0.1 0.1) (:x (meters 0)) (:y (meters 0)) @@ -313,7 +313,7 @@ ) (defpart 643 - :init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4)) + :init-specs ((:texture (vol-light level-default-sprite)) (:num 0.1 0.1) (:x (meters 0)) (:y (meters 0)) @@ -339,7 +339,7 @@ ) (defpart 644 - :init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4)) + :init-specs ((:texture (vol-light level-default-sprite)) (:num 0.1 0.1) (:x (meters 0)) (:y (meters 0)) @@ -366,7 +366,7 @@ ) (defpart 645 - :init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4)) + :init-specs ((:texture (vol-light level-default-sprite)) (:num 0.1 0.1) (:x (meters 0)) (:y (meters 0)) @@ -393,7 +393,7 @@ ) (defpart 646 - :init-specs ((:texture (new 'static 'texture-id :index #x96 :page #x4)) + :init-specs ((:texture (diamond-star level-default-sprite)) (:num 0.5 0.5) (:x (meters -0.5) (meters 1)) (:y (meters 0) (meters 8)) @@ -420,7 +420,7 @@ ) (defpart 647 - :init-specs ((:texture (new 'static 'texture-id :index #x64 :page #x4)) + :init-specs ((:texture (laser-hit2 level-default-sprite)) (:num 1.0) (:y (meters 2)) (:scale-x (meters 10) (meters 5)) @@ -439,7 +439,7 @@ ) (defpart 650 - :init-specs ((:texture (new 'static 'texture-id :index #xf :page #x4)) + :init-specs ((:texture (glow-soft level-default-sprite)) (:num 1.0) (:y (meters -0.025)) (:scale-x (meters 0.2)) @@ -456,7 +456,7 @@ ) (defpart 651 - :init-specs ((:texture (new 'static 'texture-id :index #xd :page #x4)) + :init-specs ((:texture (glow level-default-sprite)) (:num 1.0) (:scale-x (meters 10.5) (meters 0.25)) (:rot-x (degrees 11.25)) @@ -502,7 +502,7 @@ ) (defpart 653 - :init-specs ((:texture (new 'static 'texture-id :index #x3d :page #x4)) + :init-specs ((:texture (middot level-default-sprite)) (:num 1.0) (:y (meters -1) (meters 2)) (:scale-x (meters 1)) @@ -517,7 +517,7 @@ ) (defpart 652 - :init-specs ((:texture (new 'static 'texture-id :index #x3d :page #x4)) + :init-specs ((:texture (middot level-default-sprite)) (:num 1.0 3.0) (:z (meters 2) (meters 1)) (:scale-x (meters 0.05) (meters 0.05)) @@ -545,7 +545,7 @@ ) (defpart 654 - :init-specs ((:texture (new 'static 'texture-id :index #x19 :page #x4)) + :init-specs ((:texture (lakedrop level-default-sprite)) (:num 1.0) (:scale-x (meters 6.1)) (:rot-x (degrees 11.25)) @@ -571,7 +571,7 @@ ) (defpart 655 - :init-specs ((:texture (new 'static 'texture-id :index #xe :page #x4)) + :init-specs ((:texture (glow-hotdot level-default-sprite)) (:num 1.0) (:scale-x (meters 1.5)) (:scale-y :copy scale-x) @@ -600,7 +600,7 @@ ) (defpart 658 - :init-specs ((:texture (new 'static 'texture-id :index #x4b :page #x4)) + :init-specs ((:texture (starflash level-default-sprite)) (:num 1.0) (:scale-x (meters 5)) (:rot-x (degrees 2250)) @@ -620,7 +620,7 @@ ) (defpart 657 - :init-specs ((:texture (new 'static 'texture-id :index #x3d :page #x4)) + :init-specs ((:texture (middot level-default-sprite)) (:num 100.0) (:scale-x (meters 0.1) (meters 0.1)) (:scale-y :copy scale-x) @@ -641,7 +641,7 @@ ) (defpart 656 - :init-specs ((:texture (new 'static 'texture-id :index #xa0 :page #x4)) + :init-specs ((:texture (big-cloud level-default-sprite)) (:num 30.0) (:scale-x (meters 1) (meters 2)) (:rot-z (degrees 0) (degrees 360)) @@ -1194,53 +1194,16 @@ ) ) ) - (cond - ((logtest? (-> *part-group-id-table* 176 flags) (sp-group-flag sp13)) - (let ((gp-1 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-1 - (let ((t9-10 (method-of-type part-tracker-subsampler activate))) - (t9-10 (the-as part-tracker-subsampler gp-1) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-11 run-function-in-process) - (a0-23 gp-1) - (a1-15 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 176)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 6) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-11) a0-23 a1-15 *part-tracker-subsampler-params-default*) - ) - (-> gp-1 ppointer) - ) - ) - ) - (else - (let ((gp-2 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-2 - (let ((t9-13 (method-of-type part-tracker activate))) - (t9-13 (the-as part-tracker gp-2) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-14 run-function-in-process) - (a0-26 gp-2) - (a1-18 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 176)) - (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) self) - (set! (-> *part-tracker-params-default* mat-joint) 6) - ((the-as (function object object object none) t9-14) a0-26 a1-18 *part-tracker-params-default*) - ) - (-> gp-2 ppointer) - ) + (if (logtest? (-> *part-group-id-table* 176 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 176) + :target self + :mat-joint 6 ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 176) :target self :mat-joint 6) ) - ) ) (logand! (-> self target-effect) -3) (logand! (-> self target-effect) -17) @@ -1608,7 +1571,7 @@ (set! (-> self pending-ext-anim) (target-anim light)) (set-time! (-> self fact lightjak-start-time)) (set! (-> self fact lightjak-effect-time) (seconds 20)) - (set! (-> self lightjak mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modelit 0.0 0))) + (set! (-> self lightjak mode-sound-bank) (add-setting! 'mode-sound-bank 'modelit 0.0 0)) (target-start-attack) (target-danger-set! 'get-on #f) (cond @@ -1659,53 +1622,16 @@ (set! (-> self control dynam gravity-length) 0.0) (set! (-> self control transv quad) (the-as uint128 0)) (let ((s5-2 - (cond - ((logtest? (-> *part-group-id-table* 174 flags) (sp-group-flag sp13)) - (let ((s4-1 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s4-1 - (let ((t9-24 (method-of-type part-tracker-subsampler activate))) - (t9-24 (the-as part-tracker-subsampler s4-1) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-25 run-function-in-process) - (a0-42 s4-1) - (a1-16 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 174)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 6) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-25) a0-42 a1-16 *part-tracker-subsampler-params-default*) - ) - (-> s4-1 ppointer) - ) - ) - ) - (else - (let ((s4-2 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s4-2 - (let ((t9-27 (method-of-type part-tracker activate))) - (t9-27 (the-as part-tracker s4-2) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-28 run-function-in-process) - (a0-45 s4-2) - (a1-19 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 174)) - (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) self) - (set! (-> *part-tracker-params-default* mat-joint) 6) - ((the-as (function object object object none) t9-28) a0-45 a1-19 *part-tracker-params-default*) - ) - (-> s4-2 ppointer) - ) + (if (logtest? (-> *part-group-id-table* 174 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 174) + :target self + :mat-joint 6 ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 174) :target self :mat-joint 6) ) - ) ) ) (while (!= (-> self ext-anim) (target-anim light)) @@ -1774,53 +1700,16 @@ (the-as (function gui-connection symbol) #f) (the-as process #f) ) - (cond - ((logtest? (-> *part-group-id-table* 175 flags) (sp-group-flag sp13)) - (let ((s5-4 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-4 - (let ((t9-41 (method-of-type part-tracker-subsampler activate))) - (t9-41 (the-as part-tracker-subsampler s5-4) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-42 run-function-in-process) - (a0-94 s5-4) - (a1-32 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 175)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 6) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-42) a0-94 a1-32 *part-tracker-subsampler-params-default*) - ) - (-> s5-4 ppointer) - ) - ) - ) - (else - (let ((s5-5 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-5 - (let ((t9-44 (method-of-type part-tracker activate))) - (t9-44 (the-as part-tracker s5-5) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-45 run-function-in-process) - (a0-97 s5-5) - (a1-35 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 175)) - (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) self) - (set! (-> *part-tracker-params-default* mat-joint) 6) - ((the-as (function object object object none) t9-45) a0-97 a1-35 *part-tracker-params-default*) - ) - (-> s5-5 ppointer) - ) + (if (logtest? (-> *part-group-id-table* 175 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 175) + :target self + :mat-joint 6 ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 175) :target self :mat-joint 6) ) - ) (cond ((logtest? arg0 (lightjak-stage regen)) (go target-lightjak-regen (the-as int (-> self control lightjak-sound-id))) @@ -2610,7 +2499,8 @@ ) (deftype freeze-watcher (process) - ((old-clock clock) + ((parent (pointer process-focusable) :override) + (old-clock clock) ) (:state-methods (active clock) @@ -2643,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))) ) @@ -2760,100 +2648,26 @@ (send-event (handle->process (-> self notify)) 'notify 'attack 27) (set! (-> self neck flex-blend) 0.0) (set! (-> self alt-cam-pos quad) (-> self control trans quad)) - (cond - ((logtest? (-> *part-group-id-table* 180 flags) (sp-group-flag sp13)) - (let ((gp-0 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-0 - (let ((t9-2 (method-of-type part-tracker-subsampler activate))) - (t9-2 (the-as part-tracker-subsampler gp-0) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-3 run-function-in-process) - (a0-10 gp-0) - (a1-3 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 180)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 19) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-3) a0-10 a1-3 *part-tracker-subsampler-params-default*) - ) - (-> gp-0 ppointer) - ) - ) - ) - (else - (let ((gp-1 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-1 - (let ((t9-5 (method-of-type part-tracker activate))) - (t9-5 (the-as part-tracker gp-1) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-6 run-function-in-process) - (a0-13 gp-1) - (a1-6 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 180)) - (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) self) - (set! (-> *part-tracker-params-default* mat-joint) 19) - ((the-as (function object object object none) t9-6) a0-13 a1-6 *part-tracker-params-default*) - ) - (-> gp-1 ppointer) - ) - ) - ) - ) - (cond - ((logtest? (-> *part-group-id-table* 180 flags) (sp-group-flag sp13)) - (let ((gp-2 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-2 - (let ((t9-8 (method-of-type part-tracker-subsampler activate))) - (t9-8 (the-as part-tracker-subsampler gp-2) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-9 run-function-in-process) - (a0-16 gp-2) - (a1-9 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 180)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 28) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-9) a0-16 a1-9 *part-tracker-subsampler-params-default*) - ) - (-> gp-2 ppointer) - ) - ) - ) - (else - (let ((gp-3 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-3 - (let ((t9-11 (method-of-type part-tracker activate))) - (t9-11 (the-as part-tracker gp-3) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-12 run-function-in-process) - (a0-19 gp-3) - (a1-12 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 180)) - (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) self) - (set! (-> *part-tracker-params-default* mat-joint) 28) - ((the-as (function object object object none) t9-12) a0-19 a1-12 *part-tracker-params-default*) - ) - (-> gp-3 ppointer) - ) - ) + (if (logtest? (-> *part-group-id-table* 180 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 180) + :target self + :mat-joint 19 + ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 180) :target self :mat-joint 19) + ) + (if (logtest? (-> *part-group-id-table* 180 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 180) + :target self + :mat-joint 28 + ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 180) :target self :mat-joint 28) ) - ) (set! (-> self control mod-surface) *roll-flip-mods*) (let ((f30-0 0.0)) (if (time-elapsed? (-> self fact lightjak-start-time) (seconds 2)) @@ -2871,52 +2685,13 @@ (set! (-> *launch-matrix* trans quad) (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node jakb-lod0-jg sk_lhand)) quad) ) - (let ((gp-7 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-7 - (let ((t9-22 (method-of-type part-tracker-subsampler activate))) - (t9-22 (the-as part-tracker-subsampler gp-7) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-23 run-function-in-process) - (a0-33 gp-7) - (a1-22 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 181)) - (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-23) a0-33 a1-22 *part-tracker-subsampler-params-default*) - ) - (-> gp-7 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 181)) ) (else (set! (-> *launch-matrix* trans quad) (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node jakb-lod0-jg sk_lhand)) quad) ) - (let ((gp-9 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-9 - (let ((t9-26 (method-of-type part-tracker activate))) - (t9-26 (the-as part-tracker gp-9) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-27 run-function-in-process) - (a0-37 gp-9) - (a1-26 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 181)) - (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-27) a0-37 a1-26 *part-tracker-params-default*) - ) - (-> gp-9 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 181)) ) ) (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.5)) @@ -3144,55 +2919,11 @@ (cond ((logtest? (-> *part-group-id-table* 177 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((s5-2 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-2 - (let ((t9-19 (method-of-type part-tracker-subsampler activate))) - (t9-19 - (the-as part-tracker-subsampler s5-2) - *entity-pool* - "part-tracker-subsampler" - (the-as pointer #x70004000) - ) - ) - (let ((t9-20 run-function-in-process) - (a0-46 s5-2) - (a1-12 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 177)) - (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-20) a0-46 a1-12 *part-tracker-subsampler-params-default*) - ) - (-> s5-2 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 177)) ) (else (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((s5-3 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-3 - (let ((t9-22 (method-of-type part-tracker activate))) - (t9-22 (the-as part-tracker s5-3) *entity-pool* "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-23 run-function-in-process) - (a0-52 s5-3) - (a1-15 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 177)) - (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-23) a0-52 a1-15 *part-tracker-params-default*) - ) - (-> s5-3 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 177)) ) ) ) @@ -3267,53 +2998,16 @@ ) ) :code (behavior () - (cond - ((logtest? (-> *part-group-id-table* 178 flags) (sp-group-flag sp13)) - (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) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-2 run-function-in-process) - (a0-2 gp-0) - (a1-2 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 178)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 3) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-2) a0-2 a1-2 *part-tracker-subsampler-params-default*) - ) - (-> gp-0 ppointer) - ) - ) - ) - (else - (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) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-5 run-function-in-process) - (a0-5 gp-1) - (a1-5 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 178)) - (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) self) - (set! (-> *part-tracker-params-default* mat-joint) 3) - ((the-as (function object object object none) t9-5) a0-5 a1-5 *part-tracker-params-default*) - ) - (-> gp-1 ppointer) - ) + (if (logtest? (-> *part-group-id-table* 178 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 178) + :target self + :mat-joint 3 ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 178) :target self :mat-joint 3) ) - ) (let ((v1-30 (ja-group))) (when (not (and v1-30 (= v1-30 jakb-shield-start-ja))) (ja-channel-push! 1 (seconds 0.1)) @@ -3346,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)) @@ -3433,53 +3127,16 @@ ) (sound-play "shield-hit") (ja-channel-push! 1 (seconds 0.05)) - (cond - ((logtest? (-> *part-group-id-table* 179 flags) (sp-group-flag sp13)) - (let ((gp-1 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-1 - (let ((t9-5 (method-of-type part-tracker-subsampler activate))) - (t9-5 (the-as part-tracker-subsampler gp-1) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-6 run-function-in-process) - (a0-8 gp-1) - (a1-5 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 179)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 3) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-6) a0-8 a1-5 *part-tracker-subsampler-params-default*) - ) - (-> gp-1 ppointer) - ) - ) - ) - (else - (let ((gp-2 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-2 - (let ((t9-8 (method-of-type part-tracker activate))) - (t9-8 (the-as part-tracker gp-2) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-9 run-function-in-process) - (a0-11 gp-2) - (a1-8 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 179)) - (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) self) - (set! (-> *part-tracker-params-default* mat-joint) 3) - ((the-as (function object object object none) t9-9) a0-11 a1-8 *part-tracker-params-default*) - ) - (-> gp-2 ppointer) - ) + (if (logtest? (-> *part-group-id-table* 179 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 179) + :target self + :mat-joint 3 ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 179) :target self :mat-joint 3) ) - ) (ja-no-eval :group! jakb-shield-hit-ja :num! (seek!) :frame-num 0.0) (until (ja-done? 0) (suspend) diff --git a/goal_src/jak3/engine/target/target-part.gc b/goal_src/jak3/engine/target/target-part.gc index 801dfdac08..a10197588e 100644 --- a/goal_src/jak3/engine/target/target-part.gc +++ b/goal_src/jak3/engine/target/target-part.gc @@ -9,3 +9,4290 @@ ;; DECOMP BEGINS +;; og:preserve-this this function was stubbed out +(defun process-drawable-shock-wall-effect ((arg0 process-drawable) + (arg1 lightning-spec) + (arg2 (function lightning-tracker none)) + (arg3 sparticle-launcher) + ) + #f + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-part-droppings-for ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d) (arg3 object) (arg4 object)) + (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 r-g-b-a x) (the float (- s5-0 s3-0))) + (set! (-> arg2 r-g-b-a y) (the float (- s5-0 s4-0))) + (set! (-> arg2 r-g-b-a z) (the float (- s5-0 v1-7))) + ) + (none) + ) + +(defun birth-func-copy-target-y-rot ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((v1-0 *target*)) + (when v1-0 + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (set! (-> s5-0 rvec quad) (the-as uint128 0)) + (set! (-> s5-0 uvec quad) (the-as uint128 0)) + (set! (-> s5-0 fvec quad) (the-as uint128 0)) + (set! (-> s5-0 trans quad) (the-as uint128 0)) + (let ((f0-1 (+ -16384.0 (y-angle (-> v1-0 control))))) + (matrix-rotate-y! s5-0 f0-1) + ) + (vector3s-rotate*! (the-as vector3s (-> arg1 vel-sxvel)) (the-as vector3s (-> arg1 vel-sxvel)) s5-0) + (vector3s-rotate*! (the-as vector3s (-> arg1 acc)) (the-as vector3s (-> arg1 acc)) s5-0) + ) + ) + ) + 0 + (none) + ) + +(defun birth-func-ground-orient ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (local-vars (v1-10 float) (v1-11 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 (new 'stack-no-clear 'collide-query)) + (s5-0 *target*) + ) + (set! (-> s4-0 start-pos quad) (-> arg2 launchrot quad)) + (set-vector! (-> s4-0 move-dist) 0.0 -20480.0 0.0 1.0) + (+! (-> s4-0 start-pos y) 4096.0) + (let ((v1-3 s4-0)) + (set! (-> v1-3 radius) 40.96) + (set! (-> v1-3 collide-with) + (collide-spec + backgnd + bot + crate + civilian + enemy + obstacle + hit-by-player-list + hit-by-others-list + player-list + water + collectable + blocking-plane + tobot + pusher + vehicle-mesh + obstacle-for-jak + shield + vehicle-mesh-no-block-use + ) + ) + (set! (-> v1-3 ignore-process0) s5-0) + (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* s4-0) 0.0) + (let ((s2-0 (new 'stack-no-clear 'vector)) + (s3-1 (new 'stack-no-clear 'quaternion)) + ) + (set! (-> s2-0 x) (-> s4-0 best-other-tri normal z)) + (set! (-> s2-0 y) 0.0) + (set! (-> s2-0 z) (- (-> s4-0 best-other-tri normal x))) + (vector-normalize! s2-0 1.0) + (quaternion-vector-angle! s3-1 s2-0 (acos (-> s4-0 best-other-tri normal y))) + (let ((s4-1 (new 'stack-no-clear 'quaternion))) + (quaternion-vector-angle! s4-1 *up-vector* (+ 32768.0 (y-angle (-> s5-0 control)))) + (quaternion-normalize! (quaternion*! s3-1 s4-1 s3-1)) + ) + (cond + ((< (-> s3-1 w) 0.0) + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s3-1 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-10 vf1) + ) + (else + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s3-1 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-11 vf1) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defun birth-func-target-orient ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (local-vars (v1-10 float) (v1-11 float) (sv-16 target)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set! sv-16 *target*) + (when sv-16 + (let ((s3-0 (new 'stack-no-clear 'vector))) + (new 'stack-no-clear 'vector) + (let ((s5-0 (new 'stack-no-clear 'quaternion))) + (let ((s2-0 (-> sv-16 control local-normal))) + (set! (-> s3-0 x) (-> s2-0 z)) + (set! (-> s3-0 y) 0.0) + (set! (-> s3-0 z) (- (-> s2-0 x))) + (vector-normalize! s3-0 1.0) + (quaternion-vector-angle! s5-0 s3-0 (acos (-> s2-0 y))) + ) + (let ((s3-1 (new 'stack-no-clear 'quaternion))) + (quaternion-vector-angle! s3-1 *up-vector* (+ 32768.0 (-> arg1 user-float) (y-angle (-> sv-16 control)))) + (quaternion-normalize! (quaternion*! s5-0 s5-0 s3-1)) + ) + (cond + ((< (-> s5-0 w) 0.0) + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-10 vf1) + ) + (else + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-11 vf1) + ) + ) + ) + ) + 0 + ) + (none) + ) + ) + +(defun birth-func-vector-orient ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (local-vars (v1-3 float) (v1-4 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (when *target* + (let ((s4-0 (new 'stack-no-clear 'vector))) + (new 'stack-no-clear 'vector) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s3-0 (the-as sprite-vec-data-2d (-> arg1 user-float))) + ) + (when (nonzero? s3-0) + (set! (-> s4-0 x) (-> s3-0 x-y-z-sx z)) + (set! (-> s4-0 y) 0.0) + (set! (-> s4-0 z) (- (-> s3-0 x-y-z-sx x))) + (vector-normalize! s4-0 1.0) + (quaternion-vector-angle! (the-as quaternion s5-0) s4-0 (acos (-> s3-0 x-y-z-sx y))) + (cond + ((< (-> s5-0 w) 0.0) + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-3 vf1) + ) + (else + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-4 vf1) + ) + ) + ) + ) + ) + 0 + ) + (none) + ) + ) + +(defun birth-func-set-alpha-from-userdata ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((f0-0 (-> arg1 user-float))) + (set! (-> arg2 coneradius) (* (-> arg2 coneradius) f0-0)) + ) + ) + +(defun part-tracker-track-target-joint ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let* ((v1-0 *target*) + (v1-2 (vector<-cspace! (new 'stack-no-clear 'vector) (-> v1-0 node-list data (the int (-> arg1 user-float))))) + ) + (set! (-> arg2 x) (-> v1-2 x)) + (set! (-> arg2 y) (-> v1-2 y)) + (set! (-> arg2 z) (-> v1-2 z)) + ) + 0 + (none) + ) + +(defpartgroup group-target-hit + :id 10 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 70 :period (seconds 0.5) :length (seconds 0.017)) + (sp-item 71 :period (seconds 0.5) :length (seconds 0.017)) + ) + ) + +(defpart 71 + :init-specs ((:texture (suckpart level-default-sprite)) + (:num 16.0) + (:scale-x (meters 6) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.005) (meters 0.005)) + (:r 128.0 128.0) + (:g 128.0 128.0) + (:b 128.0 128.0) + (:a 32.0 12.0) + (:scalevel-x (meters 0.3) (meters 0.2)) + (:scalevel-y (meters 0.00125)) + (:fade-a -0.8 -0.8) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + (:func 'sparticle-track-root) + ) + ) + +(defpart 70 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 64)) + (:rot-x (degrees 11.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.7)) + (:scalevel-y :copy scalevel-x) + (:fade-a -6.4) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 16384.0) + (:func 'sparticle-track-root) + ) + ) + +(defpartgroup group-spin-hit + :id 11 + :duration (seconds 0.017) + :linger-duration (seconds 0.167) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 72 :flags (sp6))) + ) + +(defpartgroup group-punch-hit + :id 12 + :duration (seconds 0.017) + :linger-duration (seconds 0.167) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 72 :flags (sp6))) + ) + +(defpart 72 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 1)) + (:scale-x (meters 5)) + (:rot-x (degrees 5.625)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 196.0) + (:g 196.0) + (:b 196.0) + (:a 12.0) + (:scalevel-x (meters 1)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.2) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + ) + ) + +(defpartgroup group-smack-surface + :id 13 + :duration (seconds 0.035) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 74) + (sp-item 75) + (sp-item 76 :binding 73) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + ) + ) + +(defpart 74 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-copy-target-y-rot) + (:num 16.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 96.0) + (:g 96.0 32.0) + (:b 96.0 32.0) + (:a 32.0 32.0) + (:vel-y (meters 0.04) (meters 0.02)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85333335) + (:accel-y (meters -0.00033333333)) + (:friction 0.95) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 75 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-copy-target-y-rot) + (:num 8.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 96.0) + (:g 96.0 32.0) + (:b 96.0 32.0) + (:a 32.0 32.0) + (:vel-y (meters 0.08) (meters 0.02)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85333335) + (:accel-y (meters -0.00033333333)) + (:friction 0.95) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 76 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 12.0 8.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:a 0.0) + (:timer (seconds 2.015)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 9.0) + (:func 'part-tracker-track-target-joint) + ) + ) + +(defpart 73 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters -1.3333334) (meters 2.6666667)) + (:z (meters 0.5) (meters 0.5)) + (:scale-x (meters 0.1) (meters 0.05)) + (:scale-y :copy scale-x) + (:r 32.0 92.0) + (:g 128.0 128.0) + (:b 0.0) + (:a 32.0 96.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.053333335) 1 (meters 0.10666667)) + (:vel-y (meters 0)) + (:vel-z (meters 0.0033333334)) + (:fade-a -0.30476192) + (:timer (seconds 2.015)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch)) + ) + ) + +(defpartgroup group-land-poof-san + :id 14 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 77) (sp-item 78) (sp-item 79)) + ) + +(defpart 77 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 16.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 78 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 12.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 79 + :init-specs ((:texture (rockbit12 level-default-sprite)) + (:num 32.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)) + (:rot-z (degrees 0) (degrees 360)) + (: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-land-poof-drt + :id 15 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 80) (sp-item 81) (sp-item 82)) + ) + +(defpart 80 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 16.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 81 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 12.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 82 + :init-specs ((:texture (rockbit07 level-default-sprite)) + (:num 32.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)) + (:rot-z (degrees 0) (degrees 360)) + (: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-land-poof-snw + :id 16 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 83) (sp-item 84) (sp-item 85)) + ) + +(defpart 83 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 16.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 196.0 64.0) + (:g 196.0 64.0) + (:b 196.0 64.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 84 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 12.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 196.0 64.0) + (:g 196.0 64.0) + (:b 196.0 64.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 85 + :init-specs ((:texture (middot level-default-sprite)) + (:num 32.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 196.0 1 64.0) + (:g 196.0 1 64.0) + (:b 196.0 1 64.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-land-poof-ice + :id 17 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 83) (sp-item 84) (sp-item 85)) + ) + +(defpartgroup group-land-poof-grs + :id 18 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 86) (sp-item 87) (sp-item 88)) + ) + +(defpart 86 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 16.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 32.0) + (:g 96.0 32.0) + (:b 0.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 87 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 12.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 32.0) + (:g 96.0 32.0) + (:b 0.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 88 + :init-specs ((:texture (woodchip level-default-sprite)) + (:num 32.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.15) (meters 0.35)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.15)) + (:r 0.0 2.0 64.0) + (:g 64.0 2 64.0) + (:a 64.0 64.0) + (:vel-y (meters 0.015) (meters 0.006666667)) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:fade-a -0.42666668) + (:accel-y (meters -0.0013333333) (meters 0.00083333335)) + (: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-land-poof-for + :id 19 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 89) (sp-item 90) (sp-item 91)) + ) + +(defpart 89 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 16.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 90 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 12.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 91 + :init-specs ((:texture (leaf1 level-default-sprite)) + (:birth-func 'spt-birth-func-part-land-droppings-for) + (:num 32.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.2) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0 2.0 64.0) + (:g 64.0 2 64.0) + (:a 64.0 64.0) + (:vel-y (meters 0.015) (meters 0.006666667)) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:accel-y (meters -0.0013333333) (meters 0.00083333335)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40b400 #x40b500 #x40b600)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +(defun spt-birth-func-part-land-droppings-for ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d) (arg3 object) (arg4 object)) + (spt-birth-func-brightness-part-droppings-for arg0 arg1 arg2 arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 (the-as sparticle-launchinfo arg2) arg3 arg4) + (none) + ) + +(defpartgroup group-land-poof-wod + :id 20 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 92) (sp-item 93)) + ) + +(defpart 92 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 16.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 96.0 32.0) + (:g 64.0) + (:b 0.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 93 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 12.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 96.0 32.0) + (:g 64.0) + (:b 0.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)) + ) + ) + +(defpartgroup group-land-poof-cwd + :id 21 + :duration (seconds 0.017) + :linger-duration (seconds 2.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 92) (sp-item 93) (sp-item 94) (sp-item 94)) + ) + +(when *debug-segment* +(defpartgroup group-land-poof-unk + :id 22 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 95) (sp-item 96)) + ) + +(defpart 95 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-clean) + (:num 16.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 96.0) + (:b 96.0) + (:a 255.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 96 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-clean) + (:num 12.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 96.0) + (:b 96.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)) + ) + ) + +) +(defpartgroup group-land-poof-stn + :id 23 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 97) (sp-item 98)) + ) + +(defpart 97 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 16.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 96.0 32.0) + (:g 96.0) + (:b 96.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 98 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 12.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 96.0 32.0) + (:g 96.0) + (:b 96.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)) + ) + ) + +(defpartgroup group-land-poof-pmt + :id 24 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 99) (sp-item 100)) + ) + +(defpart 99 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 16.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 70.0 32.0) + (:b 40.0 20.0) + (:a 24.0 24.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (: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 100 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 12.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 70.0 32.0) + (:b 40.0 20.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)) + ) + ) + +(when *debug-segment* +(defpartgroup group-run-poof-unk + :id 25 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 101)) + ) + +(defpartgroup group-just-poof-unk + :id 26 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 101)) + ) + +(defpart 101 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-clean) + (:num 8.0 16.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0) + (:b 32.0) + (:a 255.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:fade-a -0.45714286) + (:friction 0.965) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +) +(defpartgroup group-run-poof-stn + :id 27 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 102)) + ) + +(defpartgroup group-just-poof-stn + :id 28 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 102)) + ) + +(defpart 102 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 96.0 32.0) + (:g 96.0) + (:b 96.0) + (:a 16.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:fade-a -0.48) + (:friction 0.965) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpartgroup group-run-poof-snw + :id 29 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 103) (sp-item 104 :flags (is-3d))) + ) + +(defpartgroup group-just-poof-snw + :id 30 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 103)) + ) + +(defpartgroup group-just-footprint-snw + :id 31 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 104 :flags (is-3d))) + ) + +(defpart 104 + :init-specs ((:texture (footprntr level-default-sprite)) + (:birth-func 'birth-func-target-orient) + (:num 1.0) + (:x (meters -0.25)) + (:scale-x (meters 0.6)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0) + (:b 16.0) + (:a 64.0) + (:fade-a -0.07111111) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 103 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 196.0 64.0) + (:g 196.0 64.0) + (:b 196.0 64.0) + (:a 24.0 24.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:fade-a -0.48) + (:friction 0.965) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpartgroup group-run-poof-ice + :id 32 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 103)) + ) + +(defpartgroup group-just-poof-ice + :id 33 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 103)) + ) + +(defpartgroup group-run-poof-cwd + :id 34 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 105) (sp-item 105) (sp-item 94)) + ) + +(defpartgroup group-just-poof-cwd + :id 35 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 106)) + ) + +(defpart 94 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 8.0 16.0) + (:y (meters -1)) + (:scale-x (meters 1) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 64.0 32.0) + (:g 64.0) + (:b 0.0 32.0) + (:a 0.0) + (:vel-y (meters 0) (meters -0.0033333334)) + (:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.16) + (:accel-y (meters -0.00006666667)) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.25) (seconds 0.247)) + (:next-launcher 107) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 3)) + ) + ) + +(defpart 107 + :init-specs ((:fade-a 0.0) (:next-time (seconds 0.5) (seconds 0.497)) (:next-launcher 108)) + ) + +(defpart 108 + :init-specs ((:fade-a -0.08)) + ) + +(defpartgroup group-run-poof-wod + :id 36 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 105)) + ) + +(defpartgroup group-just-poof-wod + :id 37 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 105)) + ) + +(defpart 105 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 96.0 32.0) + (:g 64.0) + (:b 0.0 32.0) + (:a 16.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:fade-a -0.48) + (:friction 0.965) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpartgroup group-run-poof-pmt + :id 38 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 109)) + ) + +(defpartgroup group-just-poof-pmt + :id 39 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 109)) + ) + +(defpart 109 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 70.0 32.0) + (:b 40.0 20.0) + (:a 16.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:fade-a -0.48) + (:friction 0.965) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpartgroup group-run-poof-grs + :id 40 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 110) (sp-item 111 :flags (is-3d))) + ) + +(defpartgroup group-just-poof-grs + :id 41 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 110)) + ) + +(defpartgroup group-just-footprint-grs + :id 42 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 111 :flags (is-3d))) + ) + +(defpart 110 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 64.0 32.0) + (:g 96.0 32.0) + (:b 0.0 32.0) + (:a 16.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:fade-a -0.48) + (:friction 0.965) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 111 + :init-specs ((:texture (footprntr level-default-sprite)) + (:birth-func 'birth-func-target-orient) + (:num 1.0) + (:x (meters -0.25)) + (:scale-x (meters 0.6)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0) + (:b 16.0) + (:a 48.0) + (:fade-a -0.053333335) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +(defpartgroup group-run-poof-for + :id 43 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 112) (sp-item 113 :flags (is-3d))) + ) + +(defpartgroup group-just-poof-for + :id 44 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 110)) + ) + +(defpartgroup group-just-footprint-for + :id 45 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 111 :flags (is-3d))) + ) + +(defpart 112 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.5) (meters 0.5)) + (: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)) + (:fade-a -0.48) + (:friction 0.965) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 113 + :init-specs ((:texture (footprntr level-default-sprite)) + (:birth-func 'birth-func-target-orient) + (:num 1.0) + (:x (meters -0.25)) + (:scale-x (meters 0.6)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0) + (:b 16.0) + (:a 48.0) + (:fade-a -0.053333335) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +(defpartgroup group-run-poof-san + :id 46 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 106) (sp-item 114 :flags (is-3d))) + ) + +(defpartgroup group-just-poof-san + :id 47 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 106)) + ) + +(defpartgroup group-just-footprint-san + :id 48 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 114 :flags (is-3d))) + ) + +(defpart 106 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.5) (meters 0.5)) + (: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)) + (:fade-a -0.48) + (:friction 0.965) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 114 + :init-specs ((:texture (footprntr level-default-sprite)) + (:birth-func 'birth-func-target-orient) + (:num 1.0) + (:x (meters -0.25)) + (:scale-x (meters 0.6)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0) + (:b 16.0) + (:a 32.0) + (:fade-a -0.035555556) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +(defpartgroup group-run-poof-drt + :id 49 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 115)) + ) + +(defpartgroup group-just-poof-drt + :id 50 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 115)) + ) + +(defpartgroup group-just-footprint-drt + :id 51 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 116 :flags (is-3d))) + ) + +(defpart 115 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.5) (meters 0.5)) + (: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)) + (:fade-a -0.48) + (:friction 0.965) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 116 + :init-specs ((:texture (footprntr level-default-sprite)) + (:birth-func 'birth-func-target-orient) + (:num 1.0) + (:x (meters -0.25)) + (:scale-x (meters 0.6)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0) + (:b 16.0) + (:a 32.0) + (:fade-a -0.035555556) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 117 + :init-specs ((:texture (rockbit12 level-default-sprite)) + (:num 0.0 6.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-x (meters -0.00083333335) (meters 0.0016666667)) + (:vel-y (meters 0.005) (meters 0.006666667)) + (:vel-z (meters -0.00083333335) (meters 0.0016666667)) + (:fade-a -0.42666668) + (:accel-y (meters -0.00066666666) (meters 0.00033333333)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:rotate-z (degrees 0) (degrees 360)) + ) + ) + +(defpart 118 + :init-specs ((:texture (rockbit15 level-default-sprite)) + (:num 0.0 6.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-x (meters -0.00083333335) (meters 0.0016666667)) + (:vel-y (meters 0.005) (meters 0.006666667)) + (:vel-z (meters -0.00083333335) (meters 0.0016666667)) + (:fade-a -0.42666668) + (:accel-y (meters -0.00066666666) (meters 0.00033333333)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 119 + :init-specs ((:texture (woodchip level-default-sprite)) + (:num 0.0 2.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.2) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1)) + (:r 0.0 2.0 64.0) + (:g 64.0 2 64.0) + (:a 96.0 32.0) + (:vel-x (meters -0.00083333335) (meters 0.0016666667)) + (:vel-y (meters 0.005) (meters 0.006666667)) + (:vel-z (meters -0.00083333335) (meters 0.0016666667)) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:fade-a -0.42666668) + (:accel-y (meters -0.00066666666) (meters 0.00033333333)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 120 + :init-specs ((:texture (leaf1 level-default-sprite)) + (:birth-func 'spt-birth-func-part-droppings-for) + (:num 0.0 0.5) + (: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.2) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-x (meters -0.00083333335) (meters 0.0016666667)) + (:vel-y (meters 0.005) (meters 0.006666667)) + (:vel-z (meters -0.00083333335) (meters 0.0016666667)) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:accel-y (meters -0.00066666666) (meters 0.00033333333)) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 aux-list sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40b400 #x40b500 #x40b600)) + ) + ) + +(defun spt-birth-func-part-droppings-for ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (spt-birth-func-brightness-part-droppings-for arg0 arg1 (the-as sprite-vec-data-2d arg2) arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defpart 121 + :init-specs ((:texture (middot level-default-sprite)) + (:num 0.0 6.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 196.0 1 64.0) + (:g 196.0 1 64.0) + (:b 196.0 1 64.0) + (:a 64.0 64.0) + (:vel-x (meters -0.00083333335) (meters 0.0016666667)) + (:vel-y (meters 0.005) (meters 0.006666667)) + (:vel-z (meters -0.00083333335) (meters 0.0016666667)) + (:fade-a -0.42666668) + (:accel-y (meters -0.00066666666) (meters 0.00033333333)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +(defpartgroup group-slide-poof-san + :id 52 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 122) (sp-item 123)) + ) + +(defpart 122 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 6.0 6.0) + (:scale-x (meters 0.6) (meters 0.6)) + (: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.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.17777778) + (:accel-y (meters -0.00006666667)) + (:friction 0.94) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 123 + :init-specs ((:texture (rockbit12 level-default-sprite)) + (:num 0.0 8.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.008333334) (meters 0.0033333334)) + (:fade-a -0.42666668) + (:accel-y (meters -0.001) (meters 0.0005)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +(defpartgroup group-slide-poof-drt + :id 53 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 124) (sp-item 125)) + ) + +(defpart 124 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 6.0 6.0) + (:scale-x (meters 0.6) (meters 0.6)) + (: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.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.17777778) + (:accel-y (meters -0.00006666667)) + (:friction 0.94) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 125 + :init-specs ((:texture (rockbit15 level-default-sprite)) + (:num 0.0 8.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.008333334) (meters 0.0033333334)) + (:fade-a -0.42666668) + (:accel-y (meters -0.001) (meters 0.0005)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +(defpartgroup group-slide-poof-grs + :id 54 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 126) (sp-item 127)) + ) + +(defpart 126 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 6.0 6.0) + (:scale-x (meters 0.6) (meters 0.6)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 32.0) + (:g 96.0 32.0) + (:b 0.0 32.0) + (:a 16.0 16.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.17777778) + (:accel-y (meters -0.00006666667)) + (:friction 0.94) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 127 + :init-specs ((:texture (woodchip level-default-sprite)) + (:num 0.0 8.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.15) (meters 0.35)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.15)) + (:r 0.0 2.0 64.0) + (:g 64.0 2 64.0) + (:a 64.0 64.0) + (:vel-y (meters 0.008333334) (meters 0.0033333334)) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:fade-a -0.42666668) + (:accel-y (meters -0.001) (meters 0.0005)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +(defpartgroup group-slide-poof-for + :id 55 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 128) (sp-item 129)) + ) + +(defpart 128 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 6.0 6.0) + (:scale-x (meters 0.6) (meters 0.6)) + (: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.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.17777778) + (:accel-y (meters -0.00006666667)) + (:friction 0.94) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 129 + :init-specs ((:texture (leaf1 level-default-sprite)) + (:birth-func 'spt-birth-func-part-slide-droppings-for) + (:num 0.0 8.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.4) (meters 0.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.008333334) (meters 0.0033333334)) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:fade-a -0.42666668) + (:accel-y (meters -0.001) (meters 0.0005)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40b400 #x40b500 #x40b600)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +(defun spt-birth-func-part-slide-droppings-for ((arg0 int) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (spt-birth-func-brightness-part-droppings-for + (the-as sparticle-system arg0) + arg1 + (the-as sprite-vec-data-2d arg2) + arg3 + arg4 + ) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defpartgroup group-slide-poof-stn + :id 56 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 130)) + ) + +(defpart 130 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 6.0 6.0) + (:scale-x (meters 0.6) (meters 0.6)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 96.0 32.0) + (:g 96.0) + (:b 96.0) + (:a 16.0 16.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.17777778) + (:accel-y (meters -0.00006666667)) + (:friction 0.94) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpartgroup group-slide-poof-pmt + :id 57 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 131)) + ) + +(defpart 131 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 6.0 6.0) + (:scale-x (meters 0.6) (meters 0.6)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 70.0 32.0) + (:b 40.0 20.0) + (:a 16.0 16.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.17777778) + (:accel-y (meters -0.00006666667)) + (:friction 0.94) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpartgroup group-slide-poof-snw + :id 58 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 132)) + ) + +(defpart 132 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 6.0 6.0) + (:scale-x (meters 0.6) (meters 0.6)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 196.0 1 64.0) + (:g 196.0 1 64.0) + (:b 196.0 1 64.0) + (:a 16.0 16.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.17777778) + (:accel-y (meters -0.00006666667)) + (:friction 0.94) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpartgroup group-slide-poof-ice + :id 59 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 132)) + ) + +(defpartgroup group-slide-poof-wod + :id 60 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 133)) + ) + +(defpart 133 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 6.0 6.0) + (:scale-x (meters 0.6) (meters 0.6)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 96.0 32.0) + (:g 64.0) + (:b 0.0 32.0) + (:a 16.0 16.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.17777778) + (:accel-y (meters -0.00006666667)) + (:friction 0.94) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpartgroup group-slide-poof-cwd + :id 61 + :duration (seconds 0.017) + :linger-duration (seconds 2.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 133)) + ) + +(defpart 134 + :init-specs ((:texture (rockbit12 level-default-sprite)) + (:num 0.0 8.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) + (:fade-a -0.42666668) + (:accel-y (meters -0.0013333333) (meters 0.00083333335)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 135 + :init-specs ((:texture (rockbit15 level-default-sprite)) + (:num 0.0 8.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) + (:fade-a -0.42666668) + (:accel-y (meters -0.0013333333) (meters 0.00083333335)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 136 + :init-specs ((:texture (middot level-default-sprite)) + (:num 0.0 8.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 196.0 1 64.0) + (:g 196.0 1 64.0) + (:b 196.0 1 64.0) + (:a 64.0 64.0) + (:fade-a -0.42666668) + (:accel-y (meters -0.0013333333) (meters 0.00083333335)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 137 + :init-specs ((:texture (woodchip level-default-sprite)) + (:num 0.0 8.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.15) (meters 0.35)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.15)) + (:r 0.0 2.0 64.0) + (:g 64.0 2 64.0) + (:a 64.0 64.0) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:fade-a -0.42666668) + (:accel-y (meters -0.0013333333) (meters 0.00083333335)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 138 + :init-specs ((:texture (leaf1 level-default-sprite)) + (:birth-func 'spt-birth-func-part-jump-droppings-for) + (:num 0.0 8.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.15) (meters 0.35)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.15)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:fade-a -0.42666668) + (:accel-y (meters -0.0013333333) (meters 0.00083333335)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40b400 #x40b500 #x40b600)) + ) + ) + +(defun spt-birth-func-part-jump-droppings-for ((arg0 int) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (spt-birth-func-brightness-part-droppings-for + (the-as sparticle-system arg0) + arg1 + (the-as sprite-vec-data-2d arg2) + arg3 + arg4 + ) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defpart 139 + ) + +(defpart 140 + ) + +(defpart 141 + ) + +(defpart 142 + ) + +(defpartgroup group-dark-eco-death + :id 62 + :duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 145 :fade-after (meters 100) :period (seconds 2) :length (seconds 0.017) :binding 143) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 146 :period (seconds 2) :length (seconds 0.017)) + (sp-item 147 :fade-after (meters 80) :falloff-to (meters 80) :period (seconds 2) :length (seconds 0.135)) + (sp-item 148 :period (seconds 2) :length (seconds 0.067)) + ) + ) + +(defpartgroup group-slime-death + :id 63 + :linger-duration (seconds 3) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 149 :period (seconds 10) :length (seconds 1.667)) + (sp-item 150 :period (seconds 10) :length (seconds 3)) + ) + ) + +(defpart 149 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-flip-based-on-scale) + (:num 0.8) + (:scale-x (meters -1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 200.0) + (:g 200.0) + (:b 200.0) + (:a 0.0) + (:omega (degrees 0.225)) + (:vel-y (meters 0.06666667)) + (:scalevel-x (meters 0.01) (meters 0.02)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.32 0.32) + (:accel-y (meters 0.0016666667)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.167)) + (:next-launcher 151) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 151 + :init-specs ((:fade-a -0.10666667 -0.10666667) (:func 'none)) + ) + +(defpart 150 + :init-specs ((:texture (mud-bubble ctywide-sprite)) + (:num 4.0) + (:x (meters 0.2) (meters 1.5)) + (:y (meters 0)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 80.0 40.0) + (:g 110.0) + (:b 60.0) + (:a 128.0) + (:scalevel-x (meters 0.00066666666) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.167) (seconds 0.33)) + (:flags ()) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-lava-death + :id 64 + :duration (seconds 0.25) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 152) (sp-item 153) (sp-item 154) (sp-item 155)) + ) + +(defpartgroup group-explode-death + :id 65 + :duration (seconds 0.25) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 153) (sp-item 154)) + ) + +(defpartgroup group-burn-death + :id 66 + :duration (seconds 0.5) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 152)) + ) + +(defpart 155 + :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) + (: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.2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 60)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 1)) + ) + ) + +(defpart 152 + :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.023529412)) + (:rotvel-z (degrees -0.6) (degrees 1.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.5058824) + (:friction 0.98) + (:timer (seconds 0.27)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 153 + :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.04444444)) + (:rotvel-z (degrees -0.6) (degrees 1.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -2.8444443) + (:friction 0.98) + (:timer (seconds 0.14)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 154 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 8.0) + (:x (meters -1) (meters 2)) + (:y (meters 0) (meters 3)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 2) (meters 3)) + (: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.008888889)) + (: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.15) + (:friction 0.97) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.27) (seconds 0.267)) + (:next-launcher 156) + (:conerot-x (degrees 0) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 156 + :init-specs ((:fade-a -0.08)) + ) + +(defpart 157 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g 32.0 32.0) + (:b 32.0 32.0) + (:a 0.0) + (:vel-y (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.85333335) + (:friction 0.98) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.05) (seconds 0.197)) + (:next-launcher 158) + ) + ) + +(defpart 158 + :init-specs ((:fade-a -0.28444445)) + ) + +(defbehavior process-drawable-burn-effect target ((arg0 time-frame)) + (sound-play "get-burned") + (let ((s5-1 (new 'stack 'rgbaf)) + (s3-0 (current-time)) + (s4-1 (-> self parent)) + ) + (set! (-> s5-1 quad) (-> (the-as process-drawable (-> s4-1 0)) draw color-mult quad)) + (let ((s2-1 (vector-float*! (the-as vector (new 'stack 'rgbaf)) (the-as vector s5-1) 0.0))) + (while (not (time-elapsed? s3-0 arg0)) + (let ((v1-8 (- (current-time) s3-0))) + (if (< v1-8 (the-as time-frame (/ arg0 2))) + (vector-lerp! + (-> (the-as process-drawable (-> s4-1 0)) draw color-mult) + s5-1 + s2-1 + (/ (the float v1-8) (the float arg0)) + ) + (vector-lerp! + (-> (the-as process-drawable (-> s4-1 0)) draw color-mult) + s5-1 + s2-1 + (- 1.0 (/ (the float v1-8) (the float arg0))) + ) + ) + ) + (let ((v1-13 (process-drawable-random-point! + (the-as process-drawable (ppointer->process s4-1)) + (new 'stack-no-clear 'vector) + ) + ) + (t9-7 sp-launch-particles-var) + (a0-18 *sp-particle-system-2d*) + (a1-7 (-> *part-id-table* 157)) + (a2-3 *launch-matrix*) + ) + (set! (-> a2-3 trans quad) (-> v1-13 quad)) + (t9-7 a0-18 a1-7 a2-3 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (suspend) + 0 + ) + ) + (let ((v0-8 (-> (the-as process-drawable (-> s4-1 0)) draw color-mult))) + (set! (-> v0-8 quad) (-> s5-1 quad)) + v0-8 + ) + ) + ) + +(defpart 159 + :init-specs ((:texture (gun-blue-puffs level-default-sprite)) + (:birth-func 'birth-func-target-orient) + (:num 1.0) + (:y (meters 0.02)) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 110.0 32.0) + (:g 128.0 32.0) + (:b 96.0 32.0) + (:a 8.0 40.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.2) + (:timer (seconds 0.8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:userdata -8192.0) + ) + ) + +(defpart 160 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 128.0 64.0) + (:b 255.0) + (:a 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.017)) + (:next-launcher 161) + ) + ) + +(defpart 161 + :init-specs ((:scale-x (meters 0.2) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 128.0 64.0) + (:b 255.0) + (:a 24.0 32.0) + (:next-time (seconds 0.017)) + (:next-launcher 161) + ) + ) + +(defpartgroup group-lightning-glow + :id 67 + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 162 :flags (sp6)) (sp-item 163 :flags (sp6))) + ) + +(defpart 162 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 4)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 0.0 32.0) + (:g 32.0 96.0) + (:b 128.0 128.0) + (:a 4.0 8.0) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 2)) + ) + ) + +(defpart 163 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 2)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0 128.0) + (:b 255.0) + (:a 6.0 12.0) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 1)) + ) + ) + +(defpartgroup group-lightning-green-glow + :id 68 + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 164 :flags (sp6)) (sp-item 165 :flags (sp6))) + ) + +(defpart 164 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 4)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 0.0 32.0) + (:g 128.0 128.0) + (:b 32.0 96.0) + (:a 4.0 8.0) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 2)) + ) + ) + +(defpart 165 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 2)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 0.0 32.0) + (:g 128.0 128.0) + (:b 32.0 96.0) + (:a 4.0 8.0) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 1)) + ) + ) + +(defpartgroup group-lightning-red-glow + :id 69 + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 166 :flags (sp6)) (sp-item 167 :flags (sp6))) + ) + +(defpart 166 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 4)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 32.0 96.0) + (:b 0.0 32.0) + (:a 4.0 8.0) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 2)) + ) + ) + +(defpart 167 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 2)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 32.0 96.0) + (:b 0.0 32.0) + (:a 4.0 8.0) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 1)) + ) + ) + +(defun lightning-probe-callback ((arg0 lightning-tracker)) + (let ((v1-1 (+ (-> arg0 user-time 0) 1))) + (set! (-> arg0 user-time 0) v1-1) + (when (= v1-1 (seconds 0.007)) + (let* ((v1-2 (rand-vu-int-range 64 128)) + (v0-3 (logior (logior (logior #x800000 v1-2) (* v1-2 256)) (shl (rand-vu-int-range 32 64) 24))) + (v1-6 (-> arg0 lightning state)) + ) + (set! (-> v1-6 start-color) (the-as rgba v0-3)) + (set! (-> v1-6 end-color) (the-as rgba v0-3)) + ) + ) + ) + (none) + ) + +(set! (-> *lightning-spec-id-table* 1) (new 'static 'lightning-spec + :name "lightning-shock" + :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 16384.0 + :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* 2) (new 'static 'lightning-spec + :name "lightning-shock-dim" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x20) + :end-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x20) + :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 16384.0 + :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* 3) (new 'static 'lightning-spec + :name "lightning-shock-red" + :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 #x40 :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 16384.0 + :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* 4) (new 'static 'lightning-spec + :name "lightning-shock-green" + :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 #x3b :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 16384.0 + :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* 5) (new 'static 'lightning-spec + :name "lightning-dark" + :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 #x3a :page #x4) + :reduction 0.52 + :num-points 32 + :box-size 16384.0 + :merge-factor 0.5 + :merge-count 2 + :radius 1228.8 + :duration 30.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +(defpartgroup group-lightning-dark-shot-tip-hit-replace + :id 70 + :duration (seconds 0.017) + :linger-duration (seconds 0.085) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 168 :flags (sp7) :period (seconds 10) :length (seconds 0.017))) + ) + +(defpart 168 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0 3.0) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 0.0 64.0) + (:g 64.0 64.0) + (:b 255.0) + (:a 255.0) + (:vel-z (meters 0.01) (meters 0.0033333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.7) + (:friction 0.99) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-lightning-2d-spline-align-plus-rotz) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun process-drawable-shock-effect-replace ((arg0 process-drawable) + (arg1 lightning-spec) + (arg2 (function lightning-tracker none)) + (arg3 int) + (arg4 int) + (arg5 float) + ) + (local-vars + (sv-640 (pointer process)) + (sv-720 float) + (sv-736 int) + (sv-752 matrix) + (sv-768 collide-query) + (sv-784 symbol) + (sv-800 vector) + (sv-816 int) + (sv-832 process) + ) + (set! sv-720 arg5) + (let ((s5-0 *lightning-probe-vars*)) + (if (= arg3 256) + (set! sv-736 arg3) + (set! sv-736 (rand-vu-int-range 3 (/ (+ (-> arg0 node-list length) -1) 2))) + ) + (set! sv-752 (new 'stack-no-clear 'matrix)) + (set! sv-768 (new 'stack-no-clear 'collide-query)) + (set! sv-784 (the-as symbol #f)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> *up-vector* quad)) + (when (nonzero? arg3) + (set! sv-736 arg3) + sv-736 + ) + (if (= arg3 256) + (set! (-> sv-768 start-pos quad) (-> arg0 root trans quad)) + (vector<-cspace! (-> sv-768 start-pos) (-> arg0 node-list data sv-736)) + ) + (set! sv-800 (-> sv-768 move-dist)) + (set! (-> sv-800 x) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-800 y) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-800 z) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-800 w) 1.0) + (matrix-rotate-zyx! sv-752 (-> sv-768 move-dist)) + (set! sv-816 6) + (while (nonzero? sv-816) + (set! sv-816 (+ sv-816 -1)) + (vector-rotate*! (-> sv-768 move-dist) (-> s5-0 probe-dirs sv-816) sv-752) + (vector-normalize! (-> sv-768 move-dist) sv-720) + (let ((v1-31 sv-768)) + (set! (-> v1-31 radius) 409.6) + (set! (-> v1-31 collide-with) (collide-spec backgnd crate obstacle hit-by-others-list pusher)) + (set! (-> v1-31 ignore-process0) arg0) + (set! (-> v1-31 ignore-process1) #f) + (set! (-> v1-31 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-31 action-mask) (collide-action solid)) + ) + (when (>= (fill-and-probe-using-line-sphere *collide-cache* sv-768) 0.0) + (set-time! (-> s5-0 last-valid-time)) + (set! (-> s5-0 src-joint-index) (the-as uint sv-736)) + (set! (-> s5-0 end-pos quad) (-> sv-768 best-other-tri intersect quad)) + (when (< 8192.0 (vector-vector-distance (-> s5-0 end-pos) (-> sv-768 start-pos))) + (set! (-> gp-0 quad) (-> sv-768 best-other-tri normal quad)) + (set! sv-784 #t) + (goto cfg-15) + ) + ) + ) + (label cfg-15) + (when sv-784 + (let* ((a0-24 *default-dead-pool*) + (t9-10 (method-of-object a0-24 get-process)) + (a1-14 lightning-tracker) + (a2-2 (the-as object #x4000)) + (a3-1 0) + ) + (set! sv-832 (t9-10 a0-24 a1-14 (the-as int a2-2) a3-1)) + (set! sv-640 + (when sv-832 + (let ((t9-11 (method-of-type lightning-tracker activate))) + (t9-11 (the-as lightning-tracker sv-832) arg0 "lightning-tracker" (the-as pointer #x70004000)) + ) + (set! a2-2 arg1) + (set! a3-1 arg4) + (run-now-in-process + sv-832 + lightning-tracker-init + (the-as lightning-spec a2-2) + a3-1 + arg2 + arg0 + (if (= arg3 256) + (-> arg0 root trans) + (-> s5-0 src-joint-index) + ) + (-> s5-0 end-pos) + ) + (-> sv-832 ppointer) + ) + ) + (when sv-640 + (set! (-> (the-as lightning-tracker (-> sv-640 0)) user-time 0) 0) + (let ((v1-63 (get-field-spec-by-id (-> *part-id-table* 168) (sp-field-id spt-timer)))) + (if v1-63 + (set! (-> v1-63 initial-valuef) (the-as float (-> (the-as lightning-tracker (-> sv-640 0)) duration))) + ) + ) + (let ((s4-1 (matrix-u-compose (new 'stack-no-clear 'matrix) gp-0 (the-as vector a2-2) (the-as vector a3-1)))) + (set! (-> s4-1 trans quad) (-> s5-0 end-pos quad)) + (vector+float*! (-> s4-1 trans) (-> s4-1 trans) gp-0 409.6) + (if (logtest? (-> *part-group-id-table* 70 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 70) + :mat-joint s4-1 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 70) :mat-joint s4-1) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs object. +(defun process-drawable-shock-effect ((arg0 process-drawable) + (arg1 lightning-spec) + (arg2 (function lightning-tracker none)) + (arg3 sparticle-launcher) + (arg4 int) + (arg5 int) + (arg6 float) + ) + (local-vars + (sv-624 (pointer process)) + (sv-640 float) + (sv-656 int) + (sv-672 matrix) + (sv-688 collide-query) + (sv-704 symbol) + (sv-720 vector) + (sv-736 int) + (sv-752 process) + ) + (set! sv-640 arg6) + (when (or (= arg4 256) (and (nonzero? (-> arg0 node-list)) (> (-> arg0 node-list length) 0))) + (let ((s5-0 *lightning-probe-vars*)) + (if (= arg4 256) + (set! sv-656 arg4) + (set! sv-656 (rand-vu-int-range 3 (/ (+ (-> arg0 node-list length) -1) 2))) + ) + (set! sv-672 (new 'stack-no-clear 'matrix)) + (set! sv-688 (new 'stack-no-clear 'collide-query)) + (set! sv-704 (the-as symbol #f)) + (when (nonzero? arg4) + (set! sv-656 arg4) + sv-656 + ) + (if (= arg4 256) + (set! (-> sv-688 start-pos quad) (-> arg0 root trans quad)) + (vector<-cspace! (-> sv-688 start-pos) (-> arg0 node-list data sv-656)) + ) + (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-640) + (let ((v1-35 sv-688)) + (set! (-> v1-35 radius) 409.6) + (set! (-> v1-35 collide-with) (collide-spec backgnd crate obstacle hit-by-others-list pusher)) + (set! (-> v1-35 ignore-process0) arg0) + (set! (-> v1-35 ignore-process1) #f) + (set! (-> v1-35 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-35 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! (-> s5-0 src-joint-index) (the-as uint sv-656)) + (set! (-> s5-0 end-pos quad) (-> sv-688 best-other-tri intersect quad)) + (when (< 8192.0 (vector-vector-distance (-> s5-0 end-pos) (-> sv-688 start-pos))) + (set! sv-704 #t) + (goto cfg-21) + ) + ) + ) + (label cfg-21) + (when sv-704 + (set! sv-752 (get-process *default-dead-pool* lightning-tracker #x4000 0)) + (set! sv-624 + (when sv-752 + (let ((t9-11 (method-of-type lightning-tracker activate))) + (t9-11 (the-as lightning-tracker sv-752) arg0 "lightning-tracker" (the-as pointer #x70004000)) + ) + (run-now-in-process + sv-752 + lightning-tracker-init + arg1 + arg5 + arg2 + arg0 + (if (= arg4 256) + (-> arg0 root trans) + (-> s5-0 src-joint-index) + ) + (-> s5-0 end-pos) + ) + (-> sv-752 ppointer) + ) + ) + (when sv-624 + (set! (-> (the-as lightning-tracker (-> sv-624 0)) user-time 0) 0) + (when arg3 + (let ((v1-66 (get-field-spec-by-id arg3 (sp-field-id spt-timer)))) + (if v1-66 + (set! (-> v1-66 initial-valuef) (the-as float (-> (the-as lightning-tracker (-> sv-624 0)) duration))) + ) + ) + (let ((t9-14 sp-launch-particles-var) + (a0-30 *sp-particle-system-2d*) + (a2-5 *launch-matrix*) + ) + (set! (-> a2-5 trans quad) (-> s5-0 end-pos quad)) + (t9-14 a0-30 arg3 a2-5 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ) + ) + ) + 0 + ) + +;; ERROR: function was not converted to expressions. Cannot decompile. + +(defun process-drawable2-shock-effect ((arg0 process-drawable) + (arg1 process-drawable) + (arg2 lightning-spec) + (arg3 (function lightning-tracker none)) + (arg4 sparticle-launcher) + ) + (local-vars (sv-16 int) (sv-64 vector) (sv-68 vector) (sv-72 (pointer process))) + (when (and (nonzero? (-> arg0 skel)) (nonzero? (-> arg1 skel))) + (let* ((v1-7 (-> arg0 draw lod-set lod (-> arg0 draw lod-set max-lod) geo length)) + (s0-0 (-> arg1 draw lod-set lod (-> arg1 draw lod-set max-lod) geo length)) + (s1-0 (rand-vu-int-range 3 (+ v1-7 -1))) + ) + (set! sv-16 (rand-vu-int-range 3 (+ s0-0 -1))) + (set! sv-64 (vector<-cspace! (new 'stack-no-clear 'vector) (-> arg0 node-list data s1-0))) + (set! sv-68 (vector<-cspace! (new 'stack-no-clear 'vector) (-> arg1 node-list data sv-16))) + (set! sv-72 (process-spawn + lightning-tracker + :init lightning-tracker-init + arg2 + 0 + arg3 + arg0 + s1-0 + sv-16 + :name "lightning-tracker" + :to arg1 + :unk 0 + ) + ) + ) + (when (and arg4 sv-72) + (let ((v1-19 (get-field-spec-by-id arg4 (sp-field-id spt-timer)))) + (if v1-19 + (set! (-> v1-19 initial-valuef) (the-as float (-> (the-as lightning-tracker (-> sv-72 0)) duration))) + ) + ) + (let ((t9-8 sp-launch-particles-var) + (a0-20 *sp-particle-system-2d*) + (a1-14 arg4) + (a2-4 *launch-matrix*) + ) + (set! (-> a2-4 trans quad) (-> sv-64 quad)) + (t9-8 a0-20 a1-14 a2-4 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (let ((t9-9 sp-launch-particles-var) + (a0-21 *sp-particle-system-2d*) + (a2-5 *launch-matrix*) + ) + (set! (-> a2-5 trans quad) (-> sv-68 quad)) + (t9-9 a0-21 arg4 a2-5 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + 0 + (none) + ) + +(set! (-> *lightning-spec-id-table* 6) (new 'static 'lightning-spec + :name "lightning-shock-skel" + :flags (lightning-spec-flags lsf0) + :rand-func #x2 + :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 120.0 + :texture (new 'static 'texture-id :index #x3f :page #x4) + :reduction 0.5 + :num-points 32 + :box-size 6144.0 + :merge-factor 0.5 + :merge-count 2 + :radius 2048.0 + :duration 30.0 + :sound #f + ) + ) + +;; WARN: new jak 2 until loop case, check carefully +;; WARN: new jak 2 until loop case, check carefully +(defun process-drawable-shock-skel-effect ((arg0 process-drawable) + (arg1 lightning-spec) + (arg2 (function lightning-tracker none)) + (arg3 sparticle-launcher) + (arg4 float) + (arg5 int) + (arg6 int) + ) + (local-vars + (sv-416 int) + (sv-432 vector) + (sv-448 vector) + (sv-464 vector) + (sv-480 quaternion) + (sv-496 vector) + (sv-512 matrix) + (sv-528 vector) + (sv-544 vector) + (sv-560 process) + (sv-576 int) + (sv-592 (function lightning-control int vector none)) + (sv-608 lightning-control) + (sv-624 int) + (sv-640 vector) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s1-0 (-> arg0 draw lod-set lod (-> arg0 draw cur-lod) geo length))) + (set! sv-416 (rand-vu-int-range 4 (+ s1-0 -1))) + (let ((s1-1 (rand-vu-int-range 4 (+ s1-0 -1)))) + (when (!= arg5 -1) + (set! sv-416 arg5) + sv-416 + ) + (if (!= arg6 -1) + (set! s1-1 arg6) + ) + (-> arg0 node-list data sv-416) + (let ((s0-1 (-> arg0 node-list data sv-416)) + (a0-9 (-> arg0 node-list data s1-1)) + (v1-18 #t) + ) + (until #f + (let ((a1-3 a0-9)) + (until #f + (cond + ((and (-> a1-3 joint) (>= (-> a1-3 joint number) 2)) + (when (= s0-1 a1-3) + #t + (goto cfg-24) + ) + (set! a1-3 (-> a1-3 parent)) + ) + (else + (set! s0-1 (-> s0-1 parent)) + (when (or (not (-> s0-1 joint)) (< (-> s0-1 joint number) 2)) + (set! v1-18 #f) + (goto cfg-24) + ) + (goto cfg-23) + ) + ) + ) + ) + #f + (label cfg-23) + ) + #f + (label cfg-24) + (when v1-18 + (let ((s5-1 (the-as (array cspace) (new 'stack 'boxed-array cspace 32)))) + (let ((v1-21 0)) + (set! (-> s5-1 length) 0) + (let ((a1-12 (-> arg0 node-list data sv-416)) + (a0-19 (-> arg0 node-list data s1-1)) + ) + (set! (-> s5-1 (-> s5-1 length)) a1-12) + (+! (-> s5-1 length) 1) + (while (!= a1-12 s0-1) + (set! a1-12 (-> a1-12 parent)) + (set! (-> s5-1 (-> s5-1 length)) a1-12) + (+! (-> s5-1 length) 1) + ) + (while (!= a0-19 s0-1) + (set! a0-19 (-> a0-19 parent)) + (+! (-> s5-1 length) 1) + ) + ) + (let ((a0-23 (-> arg0 node-list data s1-1))) + (while (!= a0-23 s0-1) + (let ((a1-18 (-> a0-23 parent))) + (+! v1-21 1) + (set! (-> s5-1 (- (-> s5-1 length) v1-21)) a0-23) + (set! a0-23 a1-18) + ) + ) + ) + ) + (when (< 2 (-> s5-1 length)) + (let ((s1-2 (new 'stack-no-clear 'vector))) + (set! sv-512 (new 'stack-no-clear 'matrix)) + (let ((s0-2 (new 'stack-no-clear 'vector))) + (set! sv-432 (new 'stack-no-clear 'vector)) + (set! sv-448 (new 'stack-no-clear 'vector)) + (set! sv-464 (new 'stack-no-clear 'vector)) + (set! sv-480 (new 'stack-no-clear 'quaternion)) + (set! sv-496 s1-2) + (set! (-> sv-496 x) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-496 y) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-496 z) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-496 w) 1.0) + (matrix-rotate-zyx! sv-512 s1-2) + (vector-rotate*! sv-448 *up-vector* sv-512) + (vector<-cspace! sv-432 (-> s5-1 0)) + (set! sv-544 s0-2) + (set! sv-528 (vector<-cspace! (new 'stack-no-clear 'vector) (-> s5-1 0))) + (let ((v0-10 (vector<-cspace! (new 'stack-no-clear 'vector) (-> s5-1 1)))) + (.lvf vf4 (&-> sv-528 quad)) + (.lvf vf5 (&-> v0-10 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-544 quad) vf6) + (vector-normalize! s0-2 1.0) + (set! sv-560 (get-process *default-dead-pool* lightning-tracker #x4000 0)) + (let ((a0-35 (when sv-560 + (let ((t9-13 (method-of-type lightning-tracker activate))) + (t9-13 (the-as lightning-tracker sv-560) arg0 "lightning-tracker" (the-as pointer #x70004000)) + ) + (run-now-in-process sv-560 lightning-tracker-init arg1 0 arg2 arg0 #f #f) + (-> sv-560 ppointer) + ) + ) + ) + (when a0-35 + (set! (-> (the-as lightning-tracker (-> a0-35 0)) user-time 0) 0) + (let ((s4-1 (-> (the-as lightning-tracker (-> a0-35 0)) lightning)) + (s3-1 (new 'stack-no-clear 'vector)) + (s2-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-1 state points-to-draw) 0) + (let ((a1-32 s3-1)) + (let ((v1-44 sv-432)) + (let ((a0-38 sv-448)) + (let ((a2-30 arg4)) + (.mov vf7 a2-30) + ) + (.lvf vf5 (&-> a0-38 quad)) + ) + (.lvf vf4 (&-> v1-44 quad)) + ) + (.add.x.vf 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-32 quad) vf6) + ) + (set-point! s4-1 (-> s4-1 state points-to-draw) s3-1) + (+! (-> s4-1 state points-to-draw) 1) + (set! sv-576 0) + (while (< sv-576 (+ (-> s5-1 length) -1)) + (set! sv-640 (new 'stack-no-clear 'vector)) + (vector<-cspace! sv-640 (-> s5-1 (+ sv-576 1))) + (vector-! sv-464 sv-640 sv-432) + (vector-normalize! sv-464 1.0) + (quaternion-from-two-vectors! sv-480 s0-2 sv-464) + (vector-orient-by-quat! s1-2 sv-448 sv-480) + (set! (-> s1-2 quad) (-> sv-448 quad)) + (let ((a1-40 s2-1)) + (let ((v1-56 sv-640)) + (let ((a0-47 s1-2)) + (let ((a2-34 arg4)) + (.mov vf7 a2-34) + ) + (.lvf vf5 (&-> a0-47 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-40 quad) vf6) + ) + (set! sv-608 s4-1) + (set! sv-592 (method-of-object sv-608 set-point!)) + (set! sv-624 (-> s4-1 state points-to-draw)) + (let ((a2-36 (vector-average! (new 'stack-no-clear 'vector) s2-1 s3-1))) + (sv-592 sv-608 sv-624 a2-36) + ) + (+! (-> s4-1 state points-to-draw) 1) + (set-point! s4-1 (-> s4-1 state points-to-draw) s2-1) + (+! (-> s4-1 state points-to-draw) 1) + (set! (-> s3-1 quad) (-> s2-1 quad)) + (set! (-> s0-2 quad) (-> sv-464 quad)) + (set! (-> sv-448 quad) (-> s1-2 quad)) + (set! (-> sv-432 quad) (-> sv-640 quad)) + (set! sv-576 (+ sv-576 1)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defpartgroup group-darkjak-bomb + :id 71 + :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)) + (sp-item 170 :period (seconds 10) :length (seconds 0.017)) + (sp-item 171 :flags (sp6) :period (seconds 10) :length (seconds 0.017)) + ) + ) + +(defpart 169 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 3.0) + (:scale-x (meters 1)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 128.0 128.0) + (:a 16.0) + (:scalevel-x (meters 0.53333336) (meters 0.53333336)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.45714286) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 170 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 128.0 128.0) + (:a 24.0) + (:scalevel-x (meters 0.34285715)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-g -3.6571429) + (:fade-b -0.9142857) + (:timer (seconds 1.335)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.117)) + (:next-launcher 172) + ) + ) + +(defpart 172 + :init-specs ((:scale-x (meters 4.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.05625)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.875) + (:fade-b 0.0) + (:fade-a -0.15) + ) + ) + +(defpart 171 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 16)) + (: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) + (:scalevel-x (meters 1.6)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 glow)) + (:userdata 4096.0) + ) + ) + +(defpartgroup group-darkjak-transform + :id 72 + :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)) + (sp-item 170 :period (seconds 10) :length (seconds 0.017)) + (sp-item 171 :period (seconds 10) :length (seconds 0.017)) + ) + ) + +(set! (-> *lightning-spec-id-table* 7) (new 'static 'lightning-spec + :name "lightning-darkjak-transform" + :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 #x3a :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 8192.0 + :merge-factor 0.5 + :merge-count 2 + :radius 1638.4 + :duration 30.0 + :duration-rand 90.0 + :sound (static-sound-spec "transform-zap" :group 0) + ) + ) + +(set! (-> *lightning-spec-id-table* 8) (new 'static 'lightning-spec + :name "lightning-darkjak-pill" + :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 #x3a :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 8192.0 + :merge-factor 0.5 + :merge-count 2 + :radius 1638.4 + :duration 30.0 + :duration-rand 90.0 + :sound (static-sound-spec "transform-zap" :group 0) + :delay 60.0 + :delay-rand 120.0 + ) + ) + +(define *lightning-darkjak-pill* (-> *lightning-spec-id-table* 8)) + +(defpart 173 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.1) (meters 0.15)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 8.0 12.0) + (:omega (degrees 0.225)) + (:vel-y (meters 0.053333335) (meters 0.026666667)) + (:scalevel-x (meters -0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.26666668) + (:friction 0.99 0.005) + (:timer (seconds 0.25)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-darkjak-smack-trail + :id 73 + :flags (sp0 sp4 sp13) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 174 :flags (sp7))) + ) + +(defpart 174 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters -0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.21333334) + (:fade-g -0.64) + (:fade-b -0.85333335) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-darkjak-smack + :id 74 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 175 :flags (sp3 sp7) :period (seconds 10) :length (seconds 0.017))) + ) + +(defpart 175 + :init-specs ((:texture (redpuff level-default-sprite)) + (:num 50.0) + (:y (meters 0) (meters 2)) + (:z (meters -2) (meters 4)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0) + (:b 200.0) + (:a 1.0) + (:omega (degrees 0.1125)) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.006666667) + (:accel-z (meters 0.0026666666)) + (:friction 1.1) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -2) (degrees 4)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-darkjak-smack-charge + :id 75 + :flags (sp12) + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 176 :flags (sp6)) (sp-item 177 :flags (sp6)) (sp-item 178)) + ) + +(defpart 176 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 0.1)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.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 177 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.01)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 255.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 178 + :init-specs ((:texture (laser-hit2 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 0.0) + (:g 0.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.42666668) + (: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-darkjak-smack-wall-explode + :id 76 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 179 :flags (sp7) :period (seconds 20) :length (seconds 0.035)) + (sp-item 180 :flags (sp6 sp7) :period (seconds 20) :length (seconds 0.667)) + (sp-item 181 :flags (sp6 sp7) :period (seconds 20) :length (seconds 0.667)) + ) + ) + +(defpart 179 + :init-specs ((:texture (water-radiate level-default-sprite)) + (:num 100.0) + (:x (meters 0.1) (meters 0.1)) + (:scale-x (meters 4)) + (:scale-y :copy scale-x) + (:r 16.0 1 84.0) + (:g 0.0 1 100.0) + (:b 255.0) + (:a 255.0) + (:vel-z (meters 0.3) (meters 0.033333335)) + (:scalevel-x (meters 0.033333335)) + (:fade-r -0.16666667) + (:fade-g -0.6666667) + (:fade-a -0.85) + (:friction 0.83) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'sparticle-2d-spline-align-instant) + (:next-time (seconds 0.25)) + (:next-launcher 182) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 182 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.033333335) + (:fade-b -0.033333335) + (:friction 0.99) + ) + ) + +(defpart 180 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 1.0 5.0) + (:scale-x (meters 2) (meters 4)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 2) (meters 3)) + (:r 20.0 1 60.0) + (:g 0.0 1 80.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017) (seconds 0.33)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-texture-animate) + ) + ) + +(defpart 181 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 4) (meters 8)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 2) (meters 3)) + (:r 20.0 1 60.0) + (:g 0.0 1 80.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017) (seconds 0.33)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-texture-animate) + ) + ) + +(defpartgroup group-darkjak-smack-hit + :id 77 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 183 :flags (sp7) :period (seconds 20) :length (seconds 0.035)) + (sp-item 184 :flags (sp6 sp7) :period (seconds 20) :length (seconds 0.5)) + (sp-item 185 :flags (sp6 sp7) :period (seconds 20) :length (seconds 0.5)) + ) + ) + +(defpart 183 + :init-specs ((:texture (water-radiate level-default-sprite)) + (:num 50.0) + (:x (meters 0.1) (meters 0.1)) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 80.0 1 80.0) + (:g 0.0 1 64.0) + (:b 255.0) + (:a 255.0) + (:vel-z (meters 0.1)) + (:fade-g -2.6666667) + (:fade-b -0.6666667 -0.6666667) + (:fade-a -0.85 -0.85) + (:friction 0.83) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'sparticle-2d-spline-align-instant) + (:next-time (seconds 0.25)) + (:next-launcher 186) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 186 + :init-specs ((:fade-g -0.06666667) (:fade-b -0.06666667) (:friction 0.99)) + ) + +(defpart 184 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 1.0 10.0) + (:scale-x (meters 0.3) (meters 0.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 1) (meters 1)) + (:r 80.0 1 80.0) + (:g 0.0 1 64.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017) (seconds 0.165)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-texture-animate) + ) + ) + +(defpart 185 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1) (meters 3)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 1) (meters 1)) + (:r 80.0 1 80.0) + (:g 0.0 1 64.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017) (seconds 0.165)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-texture-animate) + ) + ) + +(set! (-> *lightning-spec-id-table* 9) (new 'static 'lightning-spec + :name "lightning-darkjak-local" + :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 #x3a :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 8192.0 + :merge-factor 0.6 + :merge-count 2 + :radius 1638.4 + :duration 30.0 + :duration-rand 150.0 + :sound (static-sound-spec "transform-zap" :group 0) + ) + ) + +(set! (-> *lightning-spec-id-table* 10) (new 'static 'lightning-spec + :name "lightning-darkjak-attack" + :flags (lightning-spec-flags lsf0 lsf4) + :adjust-distance #xa + :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 #x3a :page #x4) + :reduction 0.42 + :num-points 20 + :box-size 8192.0 + :merge-factor 0.6 + :merge-count 2 + :radius 1638.4 + :duration 30.0 + :duration-rand 150.0 + :sound (static-sound-spec "stretched-zap" :group 0) + ) + ) + +(defpart 187 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.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 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.017)) + (:next-launcher 188) + ) + ) + +(defpart 188 + :init-specs ((:scale-x (meters 0.2) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 200.0 55.0) + (:g 0.0 128.0) + (:b 200.0 55.0) + (:a 24.0 8.0) + (:next-time (seconds 0.017)) + (:next-launcher 188) + ) + ) + +(defpartgroup group-daxter-death-freeze + :id 78 + :flags (sp4) + :bounds (static-bspherem 0 -2 0 40) + :parts ((sp-item 189 :flags (is-3d)) (sp-item 190 :flags (is-3d))) + ) + +(defpart 189 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5)) + (:rot-x (degrees 90)) + (:scale-y (meters 1.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667)) + (:timer (seconds 5)) + (:func 'sparticle-track-root) + (:next-time (seconds 1.835)) + (:next-launcher 191) + ) + ) + +(defpart 191 + :init-specs ((:rot-x (degrees 90)) (:rotvel-x (degrees -0.6)) (:next-time (seconds 0.45)) (:next-launcher 192)) + ) + +(defpart 192 + :init-specs ((:rotvel-x (degrees 0))) + ) + +(defpart 190 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5)) + (:rot-x (degrees 0)) + (:scale-y (meters 0.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters -0.05)) + (:timer (seconds 5)) + (:func 'sparticle-track-root) + (:next-time (seconds 1.835)) + (:next-launcher 193) + ) + ) + +(defpart 193 + :init-specs ((:rot-x (degrees 0)) (:rotvel-x (degrees -0.6)) (:next-time (seconds 0.45)) (:next-launcher 194)) + ) + +(defpart 195 + :init-specs ((:rotvel-x (degrees 0))) + ) + +(defpartgroup group-daxter-death-zap + :id 79 + :flags (sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 196) (sp-item 197) (sp-item 198)) + ) + +(defpart 196 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 2)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3599)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 10.0 5.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 197 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 0.4 1.0) + (:scale-x (meters 0.1) (meters 0.3)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3598.0002)) + (:scale-y (meters 1) (meters 0.5)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:fade-a -1.92) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.035)) + (:next-launcher 199) + ) + ) + +(defpart 198 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.4 1.0) + (:scale-x (meters 0.3) (meters 1.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3598.0002)) + (:scale-y (meters 1) (meters 0.5)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:fade-a -1.92) + (:timer (seconds 0.167) (seconds 0.08)) + (: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 199) + ) + ) + +(defpart 199 + :init-specs ((:r 64.0) (:g 64.0) (:fade-r -1.2) (:fade-g -0.48) (:fade-a -2.4)) + ) + +(defpartgroup group-daxter-death-zap-smoke + :id 80 + :flags (sp4) + :bounds (static-bspherem 0 -2 0 24) + :parts ((sp-item 201 :binding 200) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + ) + ) + +(defpart 201 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.39) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0) + (:b 64.0) + (:a 0.0) + (:vel-y (meters 0.0033333334) (meters 0.00033333333)) + (:timer (seconds 2.5)) + (:flags ()) + ) + ) + +(defpart 200 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:z (meters 0.1)) + (:scale-x (meters 0.05) (meters 0.03)) + (:scale-y (meters 0.3) (meters 0.03)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:omega (degrees 0)) + (:vel-x (meters 0.029629631)) + (:fade-a -0.08533333) + (:timer (seconds 2.5)) + (:flags (ready-to-launch sp-cpuinfo-flag-13)) + ) + ) + +(defpartgroup group-daxter-death-limb-zap + :id 81 + :flags (sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 202) (sp-item 203 :flags (sp3))) + ) + +(defpart 202 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 6.7500005)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 10.0 5.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 203 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.3)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.2)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 6761.25)) + (:vel-y (meters 0.0033333334)) + (:rotvel-z (degrees 0.6)) + (:fade-a -1.28) + (:timer (seconds 0.085) (seconds 0.165)) + (:flags (glow)) + (:userdata 4096.0) + ) + ) + +(defpartgroup group-dark-maker-idol-eye-part + :id 82 + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 204 :flags (sp7)) (sp-item 205 :flags (sp7)) (sp-item 206 :flags (sp7))) + ) + +(defpart 204 + :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 206 + :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)) + (:next-time (seconds 0.835)) + (:rotate-x (degrees 0) (degrees 36000)) + (:rotate-y (degrees 0) (degrees 36000)) + (:rotate-z (degrees 0) (degrees 36000)) + ) + ) + +(defpart 205 + :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)) + ) + ) diff --git a/goal_src/jak3/engine/target/target-pilot.gc b/goal_src/jak3/engine/target/target-pilot.gc index 113c96039a..cbc06c910d 100644 --- a/goal_src/jak3/engine/target/target-pilot.gc +++ b/goal_src/jak3/engine/target/target-pilot.gc @@ -5,5 +5,508 @@ ;; name in dgo: target-pilot ;; dgos: HGA, LPATK, RAILA, LFACCAR, CWI, WASALL, LFACTORY, COMBA +(deftype cquery-with-5vec (structure) + "target-pilot-post" + ((cquery collide-query :inline) + (vec vector 5 :inline) + ) + ) + +(define-extern h-warf type) + ;; DECOMP BEGINS +(define *pilot-mods* (new 'static 'surface :name 'empty :seek0 1.0 :seek90 1.0 :seek180 1.0 :fric 1.0)) + +;; WARN: disable def twice: 203. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defbehavior target-pilot-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (cond + ((and (= arg2 'query) (= (-> arg3 param 0) 'mode)) + 'pilot + ) + (else + (case arg2 + (('end-mode) + (case (-> arg3 param 0) + (('pilot) + (let ((v1-5 (-> self pilot))) + (when (nonzero? v1-5) + (let ((a0-7 (handle->process (-> v1-5 vehicle)))) + (if a0-7 + (put-rider-in-seat (the-as vehicle a0-7) (-> v1-5 seat-index) (the-as process #f)) + ) + ) + ) + ) + (go target-pilot-get-off (process->handle arg0)) + ) + (('fldax) + (when (and (-> self next-state) (= (-> self next-state name) 'target-pilot-daxter-perch)) + (let ((v0-0 (the-as object #t))) + (set! (-> self control unknown-word04) (the-as uint v0-0)) + v0-0 + ) + ) + ) + (('gun) + (target-gun-end-mode #t) + ) + ) + ) + (('change-mode) + (case (-> arg3 param 0) + (('grab) + (when (not (focus-test? self dead)) + (if (not (-> arg3 param 1)) + #t + (go target-pilot-grab) + ) + ) + ) + (('flut) + (go + target-flut-start + (process->handle (the-as process (-> arg3 param 1))) + (the-as symbol (if (>= arg1 2) + (-> arg3 param 2) + 'normal + ) + ) + (if (>= arg1 4) + (the-as int (-> arg3 param 3)) + -1 + ) + ) + ) + (('normal) + (go target-pilot-get-off (process->handle arg0)) + ) + (('gun) + (when (logtest? (-> self game features) (game-feature gun)) + (let ((gp-1 (-> arg3 param 2))) + (cond + ((using-gun? self) + (when (nonzero? gp-1) + (set! (-> self gun using-gun-type) (the-as pickup-type gp-1)) + gp-1 + ) + ) + (else + (target-gun-init (the-as pickup-type gp-1)) + ) + ) + ) + ) + ) + (('fldax) + (if (and (-> self next-state) (let ((v1-33 (-> self next-state name))) + (or (= v1-33 'target-pilot-stance) (= v1-33 'target-pilot-impact)) + ) + ) + (go target-pilot-daxter-perch) + ) + ) + ) + ) + (('swim) + #f + ) + (('clone-anim) + (go target-pilot-clone-anim (process->handle (the-as process (-> arg3 param 0)))) + ) + (('get-vehicle) + (if (nonzero? (-> self pilot)) + (handle->process (-> self pilot vehicle)) + ) + ) + (('kill-vehicle) + (if (nonzero? (-> self pilot)) + (send-event (handle->process (-> self pilot vehicle)) 'go-die) + ) + ) + (('attack 'attack-or-shove 'attack-invinc) + (set-vector! (-> self draw color-mult) 0.25 0.25 0.25 1.0) + (target-attacked + arg2 + (the-as attack-info (-> arg3 param 1)) + arg0 + (the-as touching-shapes-entry (-> arg3 param 0)) + target-pilot-hit + ) + ) + (('vehicle-hit) + (speech-control-method-12 *speech-control* self (if (-> self pilot as-daxter?) + (speech-type race-daxter-hit) + (speech-type race-jak-hit) + ) + ) + ) + (('vehicle-got-hit) + (speech-control-method-12 *speech-control* self (if (-> self pilot as-daxter?) + (speech-type race-daxter-got-hit) + (speech-type race-jak-got-hit) + ) + ) + ) + (else + (target-standard-event-handler arg0 arg1 arg2 arg3) + ) + ) + ) + ) + ) + +(defbehavior target-pilot-pidax-enter target () + (set! (-> self pilot 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) + ) + +(defbehavior target-pilot-pidax-exit target () + (ja-channel-set! 0) + (set! (-> self draw art-group) (-> self pilot art-group-backup)) + (logclear! (-> self draw status) (draw-control-status no-draw-bounds2)) + (send-event (ppointer->process (-> self sidekick)) 'matrix #f) + ) + +;; WARN: Return type mismatch none vs object. +(defbehavior target-pilot-exit target () + (when (not (and (-> self next-state) (let ((v1-3 (-> self next-state name))) + (or (= v1-3 'target-pilot-stance) + (= v1-3 'target-pilot-impact) + (= v1-3 'target-pilot-daxter-perch) + (= v1-3 'target-pilot-get-off) + (= v1-3 'target-pilot-grab) + (= v1-3 'target-pilot-clone-anim) + (= v1-3 'target-pilot-hit) + (= v1-3 'target-pilot-death) + ) + ) + ) + ) + (let ((v1-4 (-> self manipy))) + (when v1-4 + (deactivate (-> v1-4 0)) + (set! (-> self manipy) (the-as (pointer manipy) #f)) + ) + ) + (process-drawable-set-riding self #f) + (when (-> self pilot as-daxter?) + (format 0 "Pidax exit~%") + (target-pilot-pidax-exit) + ) + (let ((gp-0 (-> self pilot))) + (when (nonzero? gp-0) + (set! (-> self control nav-radius) (-> gp-0 backup-nav-radius)) + (let ((s5-0 (handle->process (-> gp-0 vehicle)))) + (when s5-0 + (send-event *traffic-manager* 'player-exit-vehicle (-> (the-as vehicle s5-0) info object-type)) + (remove-riders (the-as vehicle s5-0) (the-as handle self)) + (send-event s5-0 'player-get-off) + (when (nonzero? (-> gp-0 hud-health)) + (send-event (handle->process (-> gp-0 hud-health)) 'hide-and-die) + (set! (-> gp-0 hud-health) (new 'static 'handle)) + 0 + ) + (when (nonzero? (-> gp-0 hud-turbo)) + (send-event (handle->process (-> gp-0 hud-turbo)) 'hide-and-die) + (set! (-> gp-0 hud-turbo) (new 'static 'handle)) + 0 + ) + ) + ) + ) + ) + (set! (-> self neck flex-blend) 1.0) + (let ((v1-49 (-> self control root-prim))) + (set! (-> v1-49 prim-core collide-as) (-> self control backup-collide-as)) + (set! (-> v1-49 prim-core collide-with) (-> self control backup-collide-with)) + ) + (logclear! (-> self focus-status) (focus-status pilot-riding pilot)) + (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)) + (remove-setting! 'cloth) + (remove-setting! 'armor) + (enable-set! (-> self arm-ik 0) #f) + (enable-set! (-> self arm-ik 1) #f) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) + (let ((v1-74 (-> self node-list data))) + (set! (-> v1-74 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!)) + (set! (-> v1-74 0 param1) (the-as basic (-> self control trans))) + (set! (-> v1-74 0 param2) (the-as basic (-> self control cspace-offset))) + ) + (target-collide-set! 'normal 0.0) + (set! (-> self control reaction) target-collision-reaction) + (vector-identity! (-> self draw color-mult)) + (set! (-> self control cspace-offset quad) (the-as uint128 0)) + (logior! (-> self water flags) (water-flag find-water)) + (target-exit) + ) + ) + +;; WARN: Return type mismatch water-flag vs object. +(defbehavior target-pilot-init target ((arg0 handle) (arg1 symbol)) + (target-exit) + (target-lightjak-end-mode #f) + (target-darkjak-end-mode #f) + (if (zero? (-> self pilot)) + (set! (-> self pilot) (new 'process 'pilot-info)) + ) + (let ((s5-0 (-> self pilot))) + (set! (-> s5-0 backup-nav-radius) (-> self control nav-radius)) + (set! (-> s5-0 gun?) #t) + (set! (-> s5-0 enable-cam-side-shift) #f) + (set! (-> s5-0 as-daxter?) arg1) + (set! (-> s5-0 entity) #f) + (set! (-> s5-0 cam-side-shift) 0.0) + (if (-> self pilot as-daxter?) + (target-pilot-pidax-enter) + ) + (cond + ((handle->process arg0) + (set! (-> s5-0 vehicle) arg0) + ) + (else + (break!) + 0 + ) + ) + (let ((s4-1 (handle->process (-> s5-0 vehicle)))) + (when s4-1 + (send-event *traffic-manager* 'player-enter-vehicle (-> (the-as vehicle s4-1) info object-type)) + (set! (-> self game current-vehicle) (the-as game-vehicle-u8 (-> (the-as vehicle s4-1) info vehicle-type))) + (set! (-> s5-0 entity) (-> (the-as vehicle s4-1) entity)) + (set! (-> s5-0 gun?) (logtest? (-> (the-as vehicle s4-1) info flags) 32)) + (set! (-> s5-0 enable-cam-side-shift) (logtest? (-> (the-as vehicle s4-1) info flags) 128)) + (if (logtest? (-> (the-as vehicle s4-1) info flags) 256) + (set! (-> s5-0 hud-health) (process->handle (hud-vehicle-health-spawn (the-as vehicle s4-1)))) + ) + (if (logtest? (-> (the-as vehicle s4-1) info flags) 512) + (set! (-> s5-0 hud-turbo) (process->handle (hud-vehicle-turbo-spawn (the-as vehicle s4-1)))) + ) + (set! (-> s5-0 left-right-bias) (-> (the-as vehicle s4-1) info handling player-turn-anim-bias)) + (set! (-> s5-0 left-right-min) (-> (the-as vehicle s4-1) info handling player-turn-anim-min)) + (set! (-> s5-0 left-right-max) (-> (the-as vehicle s4-1) info handling player-turn-anim-max)) + (send-event + (ppointer->process (-> (the-as vehicle s4-1) parent)) + 'player-got-on-vehicle-child + (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))) + (if (and a0-35 (send-event a0-35 'knocked-off)) + (put-rider-in-seat (the-as vehicle s4-1) s2-0 (the-as process #f)) + ) + ) + ) + ) + (let ((v1-68 (get-best-seat (the-as vehicle s4-1) (-> self control trans) (vehicle-seat-flag vsf0) 1))) + (set! (-> s5-0 seat-index) (max 0 v1-68)) + ) + (cond + ((-> s5-0 as-daxter?) + (set! (-> s5-0 left-right-accel-factor) 0.0000012207031) + (set! (-> s5-0 front-back-accel-factor) 0.0000012207031) + (set! (-> s5-0 up-down-accel-factor) 0.00000061035155) + ) + ((zero? (-> s5-0 stance)) + (set! (-> s5-0 left-right-accel-factor) 0.0000012207031) + (set! (-> s5-0 front-back-accel-factor) 0.0000012207031) + (set! (-> s5-0 up-down-accel-factor) 0.00000051879886) + ) + (else + (set! (-> s5-0 left-right-accel-factor) 0.0000012207031) + (set! (-> s5-0 front-back-accel-factor) 0.0000012207031) + (set! (-> s5-0 up-down-accel-factor) 0.00000061035155) + ) + ) + (set! (-> s5-0 left-right-accel-factor) + (* (-> s5-0 left-right-accel-factor) (-> (the-as vehicle s4-1) info handling pilot-x-accel-factor)) + ) + (set! (-> s5-0 up-down-accel-factor) + (* (-> s5-0 up-down-accel-factor) (-> (the-as vehicle s4-1) info handling pilot-y-accel-factor)) + ) + (set! (-> s5-0 front-back-accel-factor) + (* (-> s5-0 front-back-accel-factor) (-> (the-as vehicle s4-1) info handling pilot-z-accel-factor)) + ) + ) + ) + (when (not (-> s5-0 gun?)) + (if arg1 + (logior! (-> self control current-surface flags) (surface-flag gun-fast-exit)) + ) + (target-gun-end-mode arg1) + ) + ) + (set! (-> self board latch?) #f) + (set! (-> self control reaction) target-collision-reaction) + (set! (-> self control transv quad) (the-as uint128 0)) + (set! (-> self control ctrl-xz-vel) 0.0) + (logior! (-> self focus-status) (focus-status pilot)) + (set! (-> self control bend-target) 0.0) + (let ((v1-102 (-> self node-list data))) + (set! (-> v1-102 0 param0) (the-as (function cspace transformq none) cspace<-transformq+world-trans!)) + (set! (-> v1-102 0 param1) (the-as basic (-> self control trans))) + (set! (-> v1-102 0 param2) (the-as basic (-> self control cspace-offset))) + ) + (let ((v1-104 (-> self control root-prim))) + (set! (-> v1-104 prim-core collide-as) (collide-spec)) + (set! (-> v1-104 prim-core collide-with) (collide-spec)) + ) + 0 + (set! (-> self control root-prim prim-core collide-as) (collide-spec jak-vehicle)) + (set! (-> self control root-prim prim-core collide-with) + (collide-spec hit-by-player-list hit-by-others-list player-list collectable) + ) + (set! (-> self neck flex-blend) 0.0) + (set! (-> self control status) (collide-status)) + (let ((v0-16 (logclear (-> self water flags) (water-flag active find-water)))) + (set! (-> self water flags) v0-16) + v0-16 + ) + ) + +(defbehavior pilot-on-ground? target () + (logtest? (-> self control status) (collide-status on-surface)) + ) + +(defbehavior target-pilot-post target () + (local-vars (a0-45 int) (a0-47 int)) + (let* ((v1-1 (-> *perf-stats* data 17)) + (a0-0 (-> v1-1 ctrl)) + ) + (+! (-> v1-1 count) 1) + (b! (zero? a0-0) cfg-2 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-0) + ) + (.sync.l) + (.sync.p) + (label cfg-2) + 0 + (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) + (build-conversions (-> self control transv)) + (do-rotations1) + (do-rotations2) + (reverse-conversions (-> self control transv)) + (vector-! + (-> self control cspace-offset) + (-> self control draw-offset) + (-> self control anim-collide-offset-world) + ) + (let ((a1-5 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-5 options) (overlaps-others-options oo0)) + (set! (-> a1-5 collide-with-filter) (the-as collide-spec -1)) + (set! (-> a1-5 tlist) *touching-list*) + (find-overlapping-shapes (-> self control) a1-5) + ) + (post-flag-setup) + ) + ) + (update-rates! (-> self clock) f30-0) + ) + (let* ((gp-2 (-> self pilot)) + (s5-0 (handle->process (-> gp-2 vehicle))) + ) + (when s5-0 + (vehicle-method-66 (the-as vehicle s5-0) (-> self control trans) (-> gp-2 seat-index)) + (set! (-> self control transv quad) (-> (the-as vehicle s5-0) root transv quad)) + (quaternion-copy! (-> self control quat) (-> (the-as vehicle s5-0) root quat)) + (quaternion-copy! (-> self control quat-for-control) (-> self control quat)) + (quaternion-copy! (-> self control dir-targ) (-> self control quat)) + (let ((s4-0 (-> self alt-cam-pos))) + (when (not (focus-test? self dead)) + (let ((s3-0 (new 'stack-no-clear 'cquery-with-5vec))) + (set! (-> s3-0 vec 2 x) 0.0) + (set! (-> s3-0 vec 2 y) 20480.0) + (let ((a0-18 (-> self node-list data 0 bone transform))) + (set! (-> s3-0 vec 1 quad) (-> a0-18 fvec quad)) + ) + (set! (-> s3-0 vec 1 y) 0.0) + (vector-rotate90-around-y! (-> s3-0 vec 1) (-> s3-0 vec 1)) + (vector-normalize! (-> s3-0 vec 1) 1.0) + (set! (-> s3-0 vec 0 quad) (-> self control trans quad)) + (when (-> gp-2 enable-cam-side-shift) + (dotimes (s2-0 2) + (let ((v1-48 (-> s3-0 cquery))) + (set! (-> v1-48 radius) 2048.0) + (set! (-> v1-48 collide-with) (collide-spec backgnd)) + (set! (-> v1-48 ignore-process0) #f) + (set! (-> v1-48 ignore-process1) #f) + (set! (-> v1-48 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-48 action-mask) (collide-action solid)) + ) + (set! (-> s3-0 cquery start-pos quad) (-> s3-0 vec 0 quad)) + (vector-float*! (-> s3-0 cquery move-dist) (-> s3-0 vec 1) (-> s3-0 vec 2 y)) + (let ((f0-10 (fill-and-probe-using-line-sphere *collide-cache* (-> s3-0 cquery)))) + (when (and (>= f0-10 0.0) (= (-> s3-0 cquery best-other-tri pat mode) (pat-mode wall))) + (+! (-> s3-0 vec 2 x) (* -1.0 (-> s3-0 vec 2 y) (- 1.0 f0-10))) + 0 + ) + ) + (set! (-> s3-0 vec 2 y) (* -1.0 (-> s3-0 vec 2 y))) + ) + (set! (-> s3-0 vec 2 x) + (* (-> s3-0 vec 2 x) (fmax 0.25 (fmin 1.0 (* 0.000008138021 (vector-length (-> self control transv)))))) + ) + (seek! (-> gp-2 cam-side-shift) (-> s3-0 vec 2 x) (* 16384.0 (seconds-per-frame))) + ) + (set! (-> s4-0 x) (+ (-> s3-0 vec 0 x) (* (-> gp-2 cam-side-shift) (-> s3-0 vec 1 x)))) + (set! (-> s4-0 z) (+ (-> s3-0 vec 0 z) (* (-> gp-2 cam-side-shift) (-> s3-0 vec 1 z)))) + (if (type? s5-0 h-warf) + (set! (-> s4-0 y) (-> s3-0 vec 0 y)) + (set! (-> s4-0 y) (fmax (fmin (-> s4-0 y) (+ 2048.0 (-> s3-0 vec 0 y))) (+ -2048.0 (-> s3-0 vec 0 y)))) + ) + ) + 0 + ) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix))) + (vehicle-method-113 (the-as vehicle s5-0) (-> s4-1 rvec) (-> gp-2 seat-index) 0) + (vehicle-method-113 (the-as vehicle s5-0) (-> s4-1 uvec) (-> gp-2 seat-index) 1) + (enable-set! (-> self arm-ik 0) #t) + (enable-set! (-> self arm-ik 1) #t) + (set-ik-target! (-> self arm-ik 0) (-> s4-1 rvec)) + (set-ik-target! (-> self arm-ik 1) (-> s4-1 uvec)) + ) + ) + ) + (ja-post) + (joint-points) + (update-transforms (-> self control)) + (do-target-gspot) + (target-powerup-process) + (let ((v1-95 (-> *perf-stats* data 17))) + (b! (zero? (-> v1-95 ctrl)) cfg-31 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-45 pcr0) + (+! (-> v1-95 accum0) a0-45) + (.mfpc a0-47 pcr1) + (+! (-> v1-95 accum1) a0-47) + ) + (label cfg-31) + 0 + 0 + (none) + ) diff --git a/goal_src/jak3/engine/target/target-swim.gc b/goal_src/jak3/engine/target/target-swim.gc index 410ac2b8a1..e77969831e 100644 --- a/goal_src/jak3/engine/target/target-swim.gc +++ b/goal_src/jak3/engine/target/target-swim.gc @@ -270,10 +270,7 @@ (set! f30-1 (seek f30-1 (lerp-scale 1.0 0.0 (-> self control ctrl-xz-vel) 16384.0 32768.0) (* 4.0 (seconds-per-frame))) ) - (let ((v1-107 (-> self skel root-channel 1))) - (set! (-> v1-107 frame-interp 1) f24-1) - (set! (-> v1-107 frame-interp 0) f24-1) - ) + (ja :chan 1 :frame-interp0 f24-1 :frame-interp1 f24-1) (ja :num! (loop! (/ (-> self control ctrl-xz-vel) (* 60.0 diff --git a/goal_src/jak3/engine/target/target-tube.gc b/goal_src/jak3/engine/target/target-tube.gc index 4a9e82aef2..a17016f57a 100644 --- a/goal_src/jak3/engine/target/target-tube.gc +++ b/goal_src/jak3/engine/target/target-tube.gc @@ -7,3 +7,1160 @@ ;; DECOMP BEGINS +(define *tube-mods* (new 'static 'surface + :name 'tube + :turnv 21845.334 + :turnvv 524288.0 + :tiltv 5461.3335 + :tiltvv 131072.0 + :transv-max 1.0 + :target-speed 32768.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 + ) + ) + +(define *tube-jump-mods* (new 'static 'surface + :name 'tube + :turnv 21845.334 + :turnvv 262144.0 + :tiltv 5461.3335 + :tiltvv 131072.0 + :transv-max 1.0 + :seek0 0.8 + :seek90 0.7 + :seek180 0.8 + :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 + :mode 'air + :flags (surface-flag air) + ) + ) + +(define *tube-hit-mods* (new 'static 'surface + :name 'tube + :turnv 21845.334 + :turnvv 262144.0 + :tiltv 32768.0 + :tiltvv 131072.0 + :transv-max 1.0 + :target-speed 40960.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 + :mode 'air + ) + ) + +(let ((v1-3 (new 'static 'surface + :name '*tube-surface* + :turnv 1.0 + :turnvv 1.0 + :tiltv 1.0 + :tiltvv 1.0 + :transv-max 94208.0 + :target-speed 1.0 + :seek0 32768.0 + :seek90 94208.0 + :seek180 8192.0 + :fric 0.98 + :nonlin-fric-dist 4091904.0 + :slip-factor 0.7 + :slope-down-factor 81920.0 + :slope-slip-angle 16384.0 + :bend-speed 4.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :flags (surface-flag no-turn-around turn-to-vel) + ) + ) + ) + (set! *tube-surface* v1-3) + (set! (-> v1-3 mult-hook) (the-as (function surface surface surface int none) nothing)) + (set! (-> v1-3 touch-hook) nothing) + (set! (-> v1-3 active-hook) nothing) + ) + +(deftype tube-info (basic) + ((entity entity) + (tube handle) + (downhill vector :inline) + (centertube vector :inline) + (downtube vector :inline) + (sidetube vector :inline) + (foretube vector :inline) + (old-transv vector :inline) + (mod-x float) + (mod-y float) + (start-time time-frame) + (turn-anim-targ float) + (turn-anim-frame float) + (turn-anim-vel float) + (tube-sound-id sound-id) + (tube-sound-vol float) + (tube-sound-pitch float) + ) + ) + + +(deftype tube-bank (basic) + () + ) + + +(define *TUBE-bank* (new 'static 'tube-bank)) + +(defbehavior tube-sounds target () + (seek! + (-> self tube tube-sound-vol) + (if (logtest? (-> self control status) (collide-status on-surface)) + 1.0 + 0.0 + ) + (* 2.0 (seconds-per-frame)) + ) + (seek! + (-> self tube tube-sound-pitch) + (lerp-scale -0.15 0.15 (-> self control ctrl-xz-vel) 0.0 122880.0) + (* 0.5 (seconds-per-frame)) + ) + (let ((f1-2 (-> self tube tube-sound-vol)) + (f0-9 (-> self tube tube-sound-pitch)) + ) + (sound-play-by-name + (static-sound-name "slide-loop") + (-> self tube tube-sound-id) + (the int (* 1024.0 f1-2)) + (the int (* 1524.0 f0-9)) + 0 + (sound-group) + (-> self control trans) + ) + ) + ) + +(defbehavior tube-thrust target ((arg0 float) (arg1 float)) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> self tube foretube) (-> self control trans)))) + (vector-flatten! s4-1 s4-1 (-> self tube downtube)) + (vector-flatten! s4-1 s4-1 (-> self control local-normal)) + (add-debug-vector + *display-target-marks* + (bucket-id debug-no-zbuf1) + (-> self control trans) + s4-1 + (meters 0.00024414062) + (new 'static 'rgba :g #xff :a #x80) + ) + (vector-matrix*! s4-1 s4-1 (-> self control w-R-c)) + (vector-float*! s4-1 s4-1 2.0) + (if (< (-> self control current-surface target-speed) (vector-length s4-1)) + (vector-normalize! s4-1 (-> self control current-surface target-speed)) + ) + (vector-v++! (-> self control transv-ctrl) s4-1) + (when (logtest? (-> self control status) (collide-status touch-wall)) + (let ((s3-0 (-> self tube old-transv))) + (-> self control transv-ctrl y) + (vector-reflect! s4-1 s3-0 (-> self control wall-contact-poly-normal)) + (let ((f0-5 (vector-dot (-> self tube sidetube) (-> self tube old-transv))) + (v1-28 (new-stack-vector0)) + (f1-2 (vector-dot (-> self tube sidetube) s4-1)) + ) + 0.0 + (vector-! v1-28 s4-1 (vector-float*! v1-28 (-> self tube sidetube) f1-2)) + (let* ((f2-2 (vector-length v1-28)) + (f3-0 f2-2) + ) + (cond + ((< 0.0 f0-5) + (if (< f1-2 (- f0-5)) + (set! f1-2 (- f0-5)) + ) + ) + ((< f0-5 0.0) + (if (< (- f0-5) f1-2) + (set! f1-2 (- f0-5)) + ) + ) + ) + (vector+! s4-1 (vector-float*! s4-1 (-> self tube sidetube) f1-2) (vector-float*! v1-28 v1-28 (/ f2-2 f3-0))) + ) + ) + (vector-flatten! s4-1 s4-1 (-> self control local-normal)) + (let ((v1-30 (new-stack-vector0))) + (let ((f0-8 (vector-dot (-> self tube downtube) s4-1))) + 0.0 + (vector-! v1-30 s4-1 (vector-float*! v1-30 (-> self tube downtube) f0-8)) + ) + (let* ((f0-9 (vector-length v1-30)) + (f1-4 f0-9) + (f2-4 (fmax (-> self control ctrl-xz-vel) (vector-dot s3-0 (-> self tube downtube)))) + ) + (vector+! s4-1 (vector-float*! s4-1 (-> self tube downtube) f2-4) (vector-float*! v1-30 v1-30 (/ f0-9 f1-4))) + ) + ) + ) + (vector-matrix*! s4-1 s4-1 (-> self control w-R-c)) + (let ((f0-11 (-> self control transv-ctrl y))) + (set! (-> self control transv-ctrl quad) (-> s4-1 quad)) + (set! (-> self control transv-ctrl y) f0-11) + ) + ) + ) + (let ((s4-2 (new 'stack-no-clear 'vector))) + (set! (-> s4-2 quad) (-> self tube downtube quad)) + (let ((s3-1 (new 'stack-no-clear 'vector))) + (set! (-> s3-1 quad) (-> self tube sidetube quad)) + (vector-flatten! s3-1 s3-1 (-> self control local-normal)) + (add-debug-vector + *display-target-marks* + (bucket-id debug-no-zbuf1) + (-> self control trans) + s3-1 + (meters 2) + (new 'static 'rgba :r #xff :g #xff :a #x80) + ) + (vector-matrix*! s3-1 s3-1 (-> self control w-R-c)) + (vector-normalize! s3-1 (* arg0 (-> self control current-surface seek90))) + (vector-v++! (-> self control transv-ctrl) s3-1) + ) + (vector-flatten! s4-2 s4-2 (-> self control local-normal)) + (add-debug-vector + *display-target-marks* + (bucket-id debug-no-zbuf1) + (-> self control trans) + s4-2 + (meters 2) + (new 'static 'rgba :r #xff :g #x80 :b #x40 :a #x80) + ) + (vector-matrix*! s4-2 s4-2 (-> self control w-R-c)) + (vector-normalize! + s4-2 + (* (-> self control current-surface slope-down-factor) (fmax 0.2 (-> self control surface-angle))) + ) + (vector-v++! (-> self control transv-ctrl) s4-2) + ) + (let* ((f1-8 (-> self control current-surface fric)) + (f0-17 (- 1.0 (* 60.0 (seconds-per-frame) (- 1.0 f1-8)))) + (f0-19 (* 0.5 (+ 1.0 f0-17))) + ) + (set! (-> self control transv-ctrl x) (* (-> self control transv-ctrl x) f0-19)) + (set! (-> self control transv-ctrl z) (* (-> self control transv-ctrl z) f0-19)) + ) + (let ((f0-22 + (- (-> self control current-surface transv-max) (if (< arg1 0.0) + (* arg1 (-> self control current-surface seek0)) + (* arg1 (-> self control current-surface seek180)) + ) + ) + ) + (v1-78 (-> self control transv-ctrl)) + ) + (if (>= (sqrtf (+ (* (-> v1-78 x) (-> v1-78 x)) (* (-> v1-78 z) (-> v1-78 z)))) f0-22) + (vector-xz-normalize! (-> self control transv-ctrl) f0-22) + ) + ) + (let ((gp-1 (new-stack-vector0))) + (vector-matrix*! gp-1 (-> self control transv-ctrl) (-> self control c-R-w)) + (vector-float*! gp-1 gp-1 0.5) + (add-debug-vector + *display-target-marks* + (bucket-id debug-no-zbuf1) + (-> self control trans) + gp-1 + (meters 0.00024414062) + (new 'static 'rgba :g #xff :b #xff :a #x80) + ) + (vector+! gp-1 gp-1 (-> self control trans)) + (add-debug-text-sphere + *display-target-marks* + (bucket-id debug-no-zbuf1) + gp-1 + (meters 0.2) + "ltransv" + (new 'static 'rgba :g #xff :b #xff :a #x80) + ) + (vector-matrix*! gp-1 (new 'static 'vector :z 40960.0 :w 1.0) (-> self control c-R-w)) + (vector-float*! gp-1 gp-1 0.5) + (vector+! gp-1 gp-1 (-> self control trans)) + (add-debug-text-sphere + *display-target-marks* + (bucket-id debug-no-zbuf1) + gp-1 + (meters 0.2) + "nose" + (new 'static 'rgba :r #xff :g #xff :a #x80) + ) + ) + (tube-sounds) + 0 + (none) + ) + +(defbehavior target-tube-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 tube old-transv quad) (-> self control transv quad)) + (flag-setup) + (build-conversions (-> self control transv)) + (if (logtest? (-> self target-flags) (target-flags tinvuln1)) + (set! (-> self control current-surface turnv) (* 3.0 (-> self control current-surface turnv))) + ) + (forward-up-nopitch->quaternion + (-> self control dir-targ) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self control dir-targ)) + (-> self control local-normal) + ) + (do-rotations1) + (send-event + (handle->process (-> self tube tube)) + 'update + (-> self tube centertube) + (-> self tube downtube) + (-> self tube sidetube) + (-> self tube foretube) + ) + (vector-flatten! + (-> self tube downhill) + (vector-negate! (new-stack-vector0) (-> self control dynam gravity-normal)) + (-> self control local-normal) + ) + (vector-normalize! (-> self tube downhill) 1.0) + (set! (-> self control turn-to-magnitude) 1.0) + (let ((f28-0 (analog-input (the-as int (-> self control cpad leftx)) 128.0 32.0 110.0 1.0))) + (set! (-> self tube mod-x) f28-0) + (let ((f0-8 (analog-input (the-as int (-> self control cpad lefty)) 128.0 32.0 110.0 1.0))) + (set! (-> self tube mod-y) f0-8) + (tube-thrust f28-0 f0-8) + ) + ) + (add-gravity) + (do-rotations2) + (reverse-conversions (-> self control transv)) + (set! (-> self control reaction) target-collision-reaction) + (let ((a2-5 (new 'stack-no-clear 'collide-query))) + (let ((v1-52 (-> self control))) + (set! (-> a2-5 collide-with) (-> v1-52 root-prim prim-core collide-with)) + (set! (-> a2-5 ignore-process0) self) + (set! (-> a2-5 ignore-process1) #f) + (set! (-> a2-5 ignore-pat) (-> v1-52 pat-ignore-mask)) + ) + (set! (-> a2-5 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide (-> self control) (-> self control transv) a2-5 (meters 1)) + ) + (bend-gravity) + (post-flag-setup) + (set! (-> self control surf) *tube-surface*) + ) + ) + (update-rates! (-> self clock) f30-0) + ) + (ja-post) + (joint-points) + (do-target-gspot) + (target-powerup-process) + (none) + ) + +(defstate target-tube (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (cond + ((and (= message 'query) (= (-> block param 0) 'mode)) + 'tube + ) + (else + (let ((v1-3 message)) + (cond + ((= v1-3 'change-mode) + (case (-> block param 0) + (('grab) + (when (not (focus-test? self dead)) + (if (-> block param 1) + (logior! (-> self focus-status) (focus-status grabbed)) + ) + #t + ) + ) + ) + ) + ((= v1-3 'end-mode) + (case (-> block param 0) + (('grab) + (when (focus-test? self grabbed) + (logclear! (-> self focus-status) (focus-status grabbed)) + #t + ) + ) + (('tube) + (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) + (-> *TARGET-bank* tube-jump-height-max) + (the-as surface #f) + ) + ) + ) + ) + ) + ((= v1-3 'touched) + (send-event proc 'attack (-> block param 0) 'tube 0 0) + #f + ) + ((or (= v1-3 'attack) (= v1-3 'attack-or-shove) (= v1-3 'attack-invinc)) + (target-attacked + 'attack-or-shove + (the-as attack-info (-> block param 1)) + proc + (the-as touching-shapes-entry (-> block param 0)) + target-tube-hit + ) + ) + ((-> self major-mode-event-hook) + ((-> self major-mode-event-hook)) + ) + (else + (target-generic-event-handler proc argc message block) + ) + ) + ) + ) + ) + ) + :exit (behavior () + (when (not (and (-> self next-state) + (let ((v1-3 (-> self next-state name))) + (or (= v1-3 'target-tube-walk) (= v1-3 'target-tube-jump) (= v1-3 'target-tube-hit)) + ) + ) + ) + (logclear! (-> self focus-status) (focus-status tube)) + (set! (-> self control mod-surface) *walk-mods*) + (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-collide-set! 'normal 0.0) + (set! (-> self control reaction) target-collision-reaction) + (remove-setting! 'slave-options) + (sound-stop (-> self tube tube-sound-id)) + (set! (-> self tube tube-sound-id) (new 'static 'sound-id)) + (send-event (handle->process (-> self tube tube)) 'end-mode) + (when (focus-test? self indax) + (remove-setting! 'string-min-length) + (remove-setting! 'string-max-length) + (remove-setting! 'string-min-height) + (remove-setting! 'string-max-height) + (remove-setting! 'fov) + ) + (target-exit) + (let ((t9-10 (-> self sub-mode-exit-hook))) + (if t9-10 + (t9-10) + ) + ) + ) + (let ((t9-11 (-> self major-mode-exit-hook))) + (if t9-11 + (t9-11) + ) + ) + ) + :code nothing + :post (behavior () + (target-tube-post) + ) + ) + +(defstate target-tube-start (target) + :parent target-tube + :code (behavior ((arg0 handle)) + (set-setting! 'slave-options 'set 0.0 (cam-slave-options BIKE_MODE)) + (target-exit) + (set! (-> self control surf) *tube-surface*) + (if (zero? (-> self tube)) + (set! (-> self tube) (new 'process 'tube-info)) + ) + (set! (-> self tube tube) arg0) + (set! (-> self tube entity) #f) + (let ((a0-4 (handle->process arg0))) + (if a0-4 + (set! (-> self tube entity) (-> a0-4 entity)) + ) + ) + (set-time! (-> self tube start-time)) + (set! (-> self tube tube-sound-id) (new-sound-id)) + (set! (-> self tube tube-sound-vol) 0.0) + (set! (-> self tube tube-sound-pitch) 0.0) + (target-collide-set! 'tube 0.0) + (set! (-> self control transv quad) (the-as uint128 0)) + (set! (-> self control ctrl-xz-vel) 0.0) + (logior! (-> self focus-status) (focus-status tube)) + (when (focus-test? self indax) + (set-setting! 'string-min-length 'abs (meters 4) 0) + (set-setting! 'string-max-length 'abs (meters 4) 0) + (set-setting! 'string-min-height 'abs (meters 6) 0) + (set-setting! 'string-max-height 'abs (meters 6) 0) + (set-setting! 'fov 'abs (degrees 95.0) 0) + ) + (remove-exit) + (cond + ((< (the-as + float + (send-event + (handle->process (-> self tube tube)) + 'update + (-> self tube centertube) + (-> self tube downtube) + (-> self tube sidetube) + (-> self tube foretube) + ) + ) + 0.5 + ) + (vector-normalize-copy! (-> self control transv) (-> self tube downtube) 40960.0) + (forward-up-nopitch->quaternion + (-> self control dir-targ) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self control transv) 1.0) + (-> self control dynam gravity-normal) + ) + (go target-tube-jump (-> *TARGET-bank* tube-jump-height-min) (-> *TARGET-bank* tube-jump-height-max)) + ) + (else + (go target-tube-walk) + ) + ) + ) + :post target-post + ) + +(defbehavior target-tube-turn-anim 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 tube turn-anim-targ) (fmax -20.0 (fmin 20.0 (-> self tube turn-anim-targ)))) + (or (not (>= (* (-> self tube turn-anim-targ) (-> self tube turn-anim-frame)) 0.0)) + (< (fabs (-> self tube turn-anim-frame)) (fabs (-> self tube turn-anim-targ))) + ) + (+! (-> self tube turn-anim-vel) + (* (- (-> self tube turn-anim-targ) (-> self tube turn-anim-frame)) + (lerp-scale + 20.0 + (if (< (fabs (-> self tube turn-anim-frame)) (fabs (-> self tube turn-anim-targ))) + 30.0 + 60.0 + ) + (-> self control ctrl-xz-vel) + 0.0 + 36864.0 + ) + (seconds-per-frame) + ) + ) + (set! (-> self tube turn-anim-vel) + (fmax + -100.0 + (fmin 100.0 (* (-> self tube turn-anim-vel) (lerp-scale 0.96 0.9 (-> self control ctrl-xz-vel) 0.0 36864.0))) + ) + ) + (+! (-> self tube turn-anim-frame) (* (-> self tube turn-anim-vel) (seconds-per-frame))) + (set! (-> self tube turn-anim-frame) (fmax -20.0 (fmin 20.0 (-> self tube turn-anim-frame)))) + (cond + ((and (>= (-> self tube turn-anim-frame) 20.0) (>= (-> self tube turn-anim-vel) 0.0)) + (set! (-> self tube turn-anim-vel) 0.0) + ) + ((and (>= -20.0 (-> self tube turn-anim-frame)) (>= 0.0 (-> self tube turn-anim-vel))) + (set! (-> self tube turn-anim-vel) 0.0) + ) + ) + ) + ) + (update-rates! (-> self clock) f30-0) + ) + (let ((a1-4 (if (focus-test? self indax) + jakb-lightjak-shield-end-ja + jakb-tube-turn-ja + ) + ) + ) + (ja :group! a1-4 + :num! (identity (ja-aframe + (+ (-> self tube turn-anim-frame) + (* 5.0 (sin (* 145.63556 (the float (- (current-time) (-> self state-time)))))) + ) + 0 + ) + ) + ) + ) + 0 + (none) + ) + +(defstate target-tube-walk (target) + :parent target-tube + :enter (behavior () + (set! (-> self control mod-surface) *tube-mods*) + (set! (-> self control surf) *tube-surface*) + ) + :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-tube-jump (-> *TARGET-bank* tube-jump-height-min) (-> *TARGET-bank* tube-jump-height-max)) + ) + (when (and (not (logtest? (-> self control status) (collide-status on-surface))) + (time-elapsed? (-> self control last-time-on-surface) (seconds 0.2)) + (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))) + (if (focus-test? self indax) + (go target-indax-falling 'tube) + (go target-falling 'tube) + ) + ) + ) + :code (behavior () + (cond + ((and (not (focus-test? self indax)) + (let ((v1-5 (ja-group))) + (and v1-5 (or (= v1-5 jakb-jump-forward-ja) (= v1-5 jakb-duck-high-jump-ja) (= v1-5 jakb-jump-loop-ja))) + ) + ) + (ja-channel-push! 1 (seconds 0.04)) + (ja-no-eval :group! jakb-tube-jump-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set! (-> self tube turn-anim-frame) 0.0) + ) + ((and (focus-test? self indax) + (let ((v1-39 (ja-group))) + (and v1-39 (or (= v1-39 (-> self draw art-group data 476)) (= v1-39 (-> self draw art-group data 477)))) + ) + ) + (ja-channel-push! 1 (seconds 0.04)) + (ja-no-eval :group! jakb-lightjak-dummy21-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set! (-> self tube turn-anim-frame) 0.0) + ) + (else + (ja-channel-push! 1 (seconds 0.04)) + ) + ) + (until #f + (set! (-> self tube turn-anim-targ) (* 20.0 (-> self tube mod-x))) + (target-tube-turn-anim) + (suspend) + ) + #f + ) + ) + +(defstate target-tube-jump (target) + :parent target-tube + :enter (behavior ((arg0 float) (arg1 float)) + (set-time! (-> self state-time)) + (init-var-jump arg0 arg1 #t #f (-> self control transv) 2.0) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (set! (-> self control mod-surface) *tube-jump-mods*) + (set! (-> self control unknown-float0000) (+ -24576.0 (-> self tube centertube y))) + ) + :trans (behavior () + (if (logtest? (-> self control status) (collide-status on-surface)) + (go target-tube-walk) + ) + (mod-var-jump #t #t (cpad-hold? (-> self control cpad number) x) (-> self control transv)) + (seek! + (-> self control unknown-float35) + (fmax 0.0 (fmin 1.0 (* 0.00012207031 (+ -2048.0 (-> self control ctrl-xz-vel))))) + (seconds-per-frame) + ) + (if (and (< (-> self control trans y) (-> self control unknown-float0000)) + (and (< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 0.0) + (not (and (= *cheat-mode* 'debug) (cpad-hold? (-> self control cpad number) r2))) + (focus-test? self indax) + ) + ) + (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 float) (arg1 float)) + (let ((f28-0 35.0) + (f30-0 1.0) + ) + (ja-channel-push! 1 (seconds 0.05)) + (set! f28-0 (cond + ((focus-test? self indax) + (sound-play "dax-effort") + (ja :group! (-> self draw art-group data 476)) + 10.0 + ) + ((= (-> self ext-anim) (target-anim default)) + (ja :group! jakb-duck-high-jump-ja :num! (identity (ja-aframe 16.0 0))) + f28-0 + ) + (else + (ja :group! jakb-jump-forward-ja) + 10.0 + ) + ) + ) + (until (ja-done? 0) + (let* ((f24-0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + (f26-0 (- f28-0 (ja-aframe-num 0))) + (f0-8 (fmin (fmin 3.0 f26-0) (/ (* 5.0 f26-0) (the float (time-to-apex f24-0 -245760.0))))) + (a0-16 (-> self skel root-channel 0)) + ) + (set! (-> a0-16 param 0) (the float (+ (-> a0-16 frame-group frames num-frames) -1))) + (let ((v1-35 (and (< 0.0 f24-0) (< 0.0 f26-0)))) + (set! (-> a0-16 param 1) (if v1-35 + f0-8 + f30-0 + ) + ) + ) + (joint-control-channel-group-eval! a0-16 (the-as art-joint-anim #f) num-func-seek!) + ) + (suspend) + ) + ) + (if (focus-test? self indax) + (ja-no-eval :group! (-> self draw art-group data 477) :num! (loop!) :frame-num 0.0) + (ja-no-eval :group! jakb-jump-loop-ja :num! (loop!) :frame-num 0.0) + ) + (until #f + (suspend) + (ja :num! (loop!)) + ) + #f + ) + ) + +(defstate target-tube-hit (target) + :parent target-tube + :enter (behavior ((arg0 symbol) (arg1 attack-info)) + (send-event + (handle->process (-> self tube tube)) + 'update + (-> self tube centertube) + (-> self tube downtube) + (-> self tube sidetube) + (-> self tube foretube) + ) + ) + :exit (behavior () + (if (not (and (-> self next-state) (= (-> self next-state name) 'target-tube-death))) + (logclear! (-> self focus-status) (focus-status dead hit)) + ) + (logclear! (-> self focus-status) (focus-status grabbed in-head)) + (logclear! (-> self target-flags) (target-flags tf1 tf5)) + (let ((v1-12 (-> self prev-state parent))) + (when v1-12 + (let ((t9-0 (-> v1-12 exit))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + ) + :code (behavior ((arg0 symbol) (arg1 attack-info)) + (let ((gp-0 (-> self attack-info))) + (set-time! (-> self state-time)) + (logior! (-> self focus-status) (focus-status hit)) + (set-time! (-> self game hit-time)) + (when (not (logtest? (-> arg1 mask) (attack-mask vector))) + (vector-! + (-> arg1 vector) + (vector+float*! (new 'stack-no-clear 'vector) (-> self tube foretube) (-> self tube downtube) 20480.0) + (-> self control trans) + ) + (let ((v1-11 (new-stack-vector0)) + (f0-2 (vector-dot (-> self control wall-contact-poly-normal) (-> arg1 vector))) + ) + 0.0 + (vector-! v1-11 (-> arg1 vector) (vector-float*! v1-11 (-> self control wall-contact-poly-normal) f0-2)) + (let* ((f1-2 (vector-length v1-11)) + (f2-0 f1-2) + ) + (if (< f0-2 0.0) + (set! f0-2 (* 0.5 f0-2)) + ) + (vector+! + (-> arg1 vector) + (vector-float*! (-> arg1 vector) (-> self control wall-contact-poly-normal) f0-2) + (vector-float*! v1-11 v1-11 (/ f1-2 f2-0)) + ) + ) + ) + (logior! (-> arg1 mask) (attack-mask vector)) + ) + (when (and (logtest? (-> arg1 mask) (attack-mask mode)) + (= (-> arg1 mode) 'darkeco) + (not (logtest? (-> arg1 mask) (attack-mask shove-up))) + ) + (set! (-> arg1 shove-up) 12288.0) + (logior! (-> arg1 mask) (attack-mask shove-up)) + ) + (let ((v1-23 gp-0)) + (set! (-> v1-23 attacker) (the-as handle #f)) + (set! (-> v1-23 mode) 'generic) + (set! (-> v1-23 shove-back) 6144.0) + (set! (-> v1-23 shove-up) 12288.0) + (set! (-> v1-23 angle) #f) + (set! (-> v1-23 trans quad) (-> self control trans quad)) + (set! (-> v1-23 control) 0.0) + (set! (-> v1-23 invinc-time) (-> *TARGET-bank* hit-invulnerable-timeout)) + (set! (-> v1-23 damage) (-> *FACT-bank* health-default-inc)) + ) + (combine! gp-0 arg1 self) + (when (= arg0 'attack) + (send-event (handle->process (-> self notify)) 'notify 'hit (-> gp-0 mode)) + (logior! (-> self focus-status) (focus-status hit)) + (set-time! (-> self game hit-time)) + (case (-> gp-0 mode) + (('bot) + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (if (= (-> self game mode) 'play) + (go target-death (-> gp-0 mode)) + ) + ) + (('endlessfall) + (when (= (-> self game mode) 'play) + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (if (focus-test? self indax) + (go target-indax-death (-> gp-0 mode)) + (go target-death (-> gp-0 mode)) + ) + ) + ) + (('lava 'melt) + (when (= (-> self game mode) 'play) + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (go target-death (-> gp-0 mode)) + ) + ) + (else + (pickup-collectable! (-> self fact) (pickup-type health) (- (-> gp-0 damage)) (the-as handle #f)) + ) + ) + (target-hit-effect gp-0) + ) + (set! (-> self control mod-surface) *smack-mods*) + (target-hit-setup-anim gp-0) + (target-hit-move gp-0 (target-hit-orient gp-0 (-> gp-0 vector)) target-falling-anim-trans 1.0) + (let ((v1-69 (new-stack-vector0)) + (f0-12 (vector-dot (-> self tube downtube) (-> self control transv))) + ) + 0.0 + (vector-! v1-69 (-> self control transv) (vector-float*! v1-69 (-> self tube downtube) f0-12)) + (let ((f1-5 (vector-length v1-69)) + (f2-2 (fmax 40960.0 f0-12)) + (f0-13 0.0) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self tube downtube) f2-2) + (vector-float*! v1-69 v1-69 (/ f0-13 f1-5)) + ) + ) + ) + (let ((s5-2 forward-up-nopitch->quaternion) + (s4-1 (-> self control dir-targ)) + (t9-14 vector-normalize!) + (a0-71 (new-stack-vector0)) + ) + (set! (-> a0-71 quad) (-> self control transv quad)) + (s5-2 s4-1 (t9-14 a0-71 1.0) (vector-y-quaternion! (new-stack-vector0) (-> self control dir-targ))) + ) + (if (and (= (-> self game mode) 'play) (>= 0.0 (-> self fact health))) + (go target-tube-death (-> gp-0 mode)) + ) + ) + (go target-tube-walk) + ) + :post target-post + ) + +(defstate target-tube-death (target) + :parent target-tube + :event (-> target-death event) + :exit (behavior () + (logclear! (-> self focus-status) (focus-status dead hit)) + (target-exit) + (remove-setting! 'process-mask) + (apply-settings *setting-control*) + (let ((v1-7 (-> self prev-state parent))) + (when v1-7 + (let ((t9-3 (-> v1-7 exit))) + (if t9-3 + (t9-3) + ) + ) + ) + ) + ) + :code (behavior ((arg0 symbol)) + (local-vars (v1-53 symbol)) + (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)) + (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) + (set! (-> self control mod-surface) *neutral-mods*) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-deatha-ja :num! (seek! (ja-aframe 134.0 0)) :frame-num 0.0) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (let ((gp-2 (new 'stack-no-clear 'vector))) + (when (not (logtest? (-> self align flags) (align-flags disabled))) + (vector-matrix*! gp-2 (the-as vector (-> self align delta)) (-> self control c-R-w)) + (vector-float*! (-> self control transv) gp-2 (-> self clock frames-per-second)) + ) + ) + (suspend) + (ja :num! (seek! (ja-aframe 134.0 0))) + ) + (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)) + (until v1-53 + (suspend) + (set! v1-53 (and (time-elapsed? (-> self state-time) (seconds 1)) (not (movie?)))) + ) + (go target-tube-walk) + ) + :post target-no-stick-post + ) + +(deftype slide-control (process-drawable) + ((target handle) + (pos float) + (trans vector :inline) + (rot vector :inline) + (side vector :inline) + ) + (:state-methods + slide-control-watch + slide-control-ride + ) + ) + + +(defun distance-from-tangent ((arg0 path-control) (arg1 float) (arg2 vector) (arg3 vector) (arg4 vector) (arg5 vector)) + (get-point-in-path! arg0 arg2 arg1 'interp) + (displacement-between-two-points-normalized! arg0 arg3 arg1) + (set! (-> arg2 y) (-> arg5 y)) + (set! (-> arg3 y) 0.0) + (let ((s2-1 (new 'stack-no-clear 'vector))) + (vector-rotate-y! arg4 arg3 -16384.0) + (set! (-> arg4 y) 0.0) + (let* ((a2-5 (vector+! (new 'stack-no-clear 'vector) arg2 arg4)) + (f0-3 (vector-line-distance-point! arg5 arg2 a2-5 s2-1)) + ) + (if (< 0.0 (vector-dot arg3 (vector-! (new 'stack-no-clear 'vector) arg5 s2-1))) + (set! f0-3 (- f0-3)) + ) + f0-3 + ) + ) + ) + +(defbehavior find-target-point slide-control ((arg0 vector)) + (local-vars (f0-2 float)) + (let* ((s4-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'vector)) + (f28-0 (+ -0.1 (-> self pos))) + (f26-0 (distance-from-tangent (-> self path) f28-0 s4-0 s5-0 gp-0 arg0)) + ) + 0.0 + (let ((f30-0 f28-0)) + (until (or (and (< f26-0 f0-2) (>= f0-2 0.0)) (< (get-num-segments (-> self path)) f28-0)) + (set! f0-2 (distance-from-tangent (-> self path) f28-0 s4-0 s5-0 gp-0 arg0)) + (when (or (>= f26-0 f0-2) (< f26-0 0.0)) + (set! f26-0 f0-2) + (set! f30-0 f28-0) + ) + (set! f28-0 (+ 0.01 f28-0)) + ) + (distance-from-tangent (-> self path) f30-0 s4-0 s5-0 gp-0 arg0) + (set! (-> self trans quad) (-> s4-0 quad)) + (set! (-> self rot quad) (-> s5-0 quad)) + (set! (-> self side quad) (-> gp-0 quad)) + (set! (-> self pos) f30-0) + ) + ) + (-> self pos) + ) + +(defstate slide-control-watch (slide-control) + :virtual #t + :enter (behavior () + (get-point-in-path! (-> self path) (-> self trans) 0.2 'interp) + (get-point-in-path! (-> self path) (-> self root trans) 0.2 'interp) + (displacement-between-two-points-normalized! (-> self path) (-> self rot) 0.2) + (set! (-> self pos) 0.2) + ) + :trans (behavior () + (if (and (and *target* + (and (>= 81920.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (< 0.0 + (vector-dot + (vector-! (new 'stack-no-clear 'vector) (-> *target* control trans) (-> self trans)) + (-> self rot) + ) + ) + (and (not (focus-test? *target* in-air)) + (< (-> *target* control trans y) (+ 12288.0 (-> self root trans y))) + (send-event *target* 'change-mode 'tube self) + ) + ) + (go-virtual slide-control-ride) + ) + ) + :code sleep-code + ) + +(defstate slide-control-ride (slide-control) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('end-mode) + (go-virtual slide-control-watch) + ) + (('update) + (let* ((s4-0 proc) + (gp-0 (if (type? s4-0 process-drawable) + s4-0 + ) + ) + ) + (if gp-0 + (find-target-point (-> (the-as process-drawable gp-0) root trans)) + ) + (set! (-> (the-as vector (-> block param 0)) quad) (-> self trans quad)) + (set! (-> (the-as vector (-> block param 1)) quad) (-> self rot quad)) + (set! (-> (the-as vector (-> block param 2)) quad) (-> self side quad)) + (get-point-in-path! (-> self path) (the-as vector (-> block param 3)) (+ 0.2 (-> self pos)) 'interp) + (if (>= (-> self pos) (+ -0.2 (get-num-segments (-> self path)))) + (send-event gp-0 'end-mode 'tube) + ) + ) + (-> self pos) + ) + ) + ) + :enter (behavior () + (set! (-> self pos) 0.0) + (set! (-> self target) (process->handle *target*)) + (process-entity-status! self (entity-perm-status no-kill) #t) + ) + :exit (behavior () + (set! (-> self target) (the-as handle #f)) + (process-entity-status! self (entity-perm-status no-kill) #f) + ) + :trans (behavior () + (let ((gp-0 (handle->process (-> self target)))) + (cond + ((if (type? gp-0 process-drawable) + gp-0 + ) + ) + (else + (go-virtual slide-control-watch) + ) + ) + ) + ) + :code sleep-code + ) + +(defmethod init-from-entity! ((this slide-control) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (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 target) (the-as handle #f)) + (go (method-of-object this slide-control-watch)) + ) diff --git a/goal_src/jak3/engine/target/target-turret-shot.gc b/goal_src/jak3/engine/target/target-turret-shot.gc index e9a0024ee7..91582cc7a4 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 4390f0bbfe..d3ef6d4fe2 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/target-util.gc b/goal_src/jak3/engine/target/target-util.gc index 56f2aac4fe..546457ca76 100644 --- a/goal_src/jak3/engine/target/target-util.gc +++ b/goal_src/jak3/engine/target/target-util.gc @@ -12,9 +12,9 @@ :bounds (static-spherem 0 0 0 3.2) :longest-edge (meters 1) :texture-level 10 + :sort 1 :origin-joint-index 3 :shadow-joint-index 3 - :light-index 1 ) (defskelgroup skel-jchar-normal jakb jakb-lod0-jg -1 @@ -23,9 +23,9 @@ :longest-edge (meters 1) :shadow jak-ext-geo-c+0-jakclod0-sash-cg :texture-level 10 + :sort 1 :origin-joint-index 3 :shadow-joint-index 3 - :light-index 1 ) (defskelgroup skel-jchar-old jakb jakb-lod0-jg -1 @@ -33,9 +33,9 @@ :bounds (static-spherem 0 0 0 3.2) :longest-edge (meters 1) :texture-level 10 + :sort 1 :origin-joint-index 3 :shadow-joint-index 3 - :light-index 1 ) (defskelgroup skel-jchar-c jakb jakb-lod0-jg -1 @@ -44,9 +44,9 @@ :longest-edge (meters 1) :shadow jakb-c-shadow-mg :texture-level 10 + :sort 1 :origin-joint-index 3 :shadow-joint-index 3 - :light-index 1 :clothing (((mesh 10) (gravity-constant (meters 16)) (wind-constant 0.5) @@ -107,10 +107,9 @@ :longest-edge (meters 1) :shadow jakb-walk-down-ja :texture-level 10 - :sort 2 + :sort 4 :origin-joint-index 3 :shadow-joint-index 3 - :light-index 4 ) (defskelgroup skel-jchar-shield jakb jakb-shield-shield-lod0-jg -1 @@ -118,8 +117,8 @@ :bounds (static-spherem 0 0 0 3.2) :longest-edge (meters 1) :texture-level 10 - :shadow-joint-index 3 - :light-index 5 + :sort 5 + :origin-joint-index 3 ) (define *target-shadow-control* @@ -137,9 +136,9 @@ :bounds (static-spherem 0 0 0 3.2) :longest-edge (meters 1) :shadow jak-highres-shadow-mg + :sort 1 :origin-joint-index 3 :shadow-joint-index 3 - :light-index 1 ) (defskelgroup skel-jakc-highres jakc-highres jakc-highres-lod0-jg jakc-highres-idle-ja @@ -201,21 +200,21 @@ ((collectables-generic-blast-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 50) :texture-level 10 - :light-index 4 + :sort 4 ) (defskelgroup skel-generic-ripples collectables collectables-generic-ripples-lod0-jg collectables-generic-ripples-idle-ja ((collectables-generic-ripples-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 6) :texture-level 10 - :light-index 4 + :sort 4 ) (defskelgroup skel-bomb-blast collectables collectables-bomb-blast-lod0-jg collectables-bomb-blast-idle-ja ((collectables-bomb-blast-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 50) :texture-level 10 - :light-index 4 + :sort 4 ) (deftype target-bank (basic) @@ -1389,7 +1388,7 @@ ) ;; WARN: Return type mismatch object vs none. -(defbehavior fall-test target ((arg0 (state symbol target)) (arg1 float)) +(defbehavior fall-test target ((arg0 (state object target)) (arg1 float)) (when (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))) @@ -1479,7 +1478,7 @@ (set! (-> s4-0 1 y) (+ 2867.2 (-> *TARGET-bank* body-radius) (-> s4-0 1 y))) (set! (-> s4-0 1 r) (-> *TARGET-bank* body-radius)) (let ((v1-12 gp-0)) - (set! (-> v1-12 spheres) s4-0) + (set! (-> v1-12 best-dist) (the-as float s4-0)) (set! (-> v1-12 best-other-prim) (the-as collide-shape-prim 2)) (set! (-> v1-12 collide-with) (logclear @@ -1633,12 +1632,7 @@ (set! (-> arg1 control invul2-off-time) arg0) ) ) - (let ((t9-0 (method-of-object (-> arg1 control) collide-shape-method-49))) - 2 - #x8000 - 0 - (t9-0) - ) + (modify-collide-as! (-> arg1 control) 2 (collide-spec jak-vulnerable) (collide-spec)) (logior! (-> arg1 focus-status) (focus-status ignore)) 0 (none) @@ -1660,12 +1654,7 @@ ) (when (not (logtest? (target-flags tinvuln1 tinvuln2) (-> arg0 target-flags))) (logclear! (-> arg0 draw status) (draw-control-status no-draw-bounds)) - (let ((t9-0 (method-of-object (-> arg0 control) collide-shape-method-49))) - 2 - 0 - #x8000 - (t9-0) - ) + (modify-collide-as! (-> arg0 control) 2 (collide-spec) (collide-spec jak-vulnerable)) ) 0 (none) diff --git a/goal_src/jak3/engine/target/target.gc b/goal_src/jak3/engine/target/target.gc index 7249057c9b..ab3109f92c 100644 --- a/goal_src/jak3/engine/target/target.gc +++ b/goal_src/jak3/engine/target/target.gc @@ -1385,13 +1385,13 @@ (defstate target-jump-forward (target) :event target-jump-event-handler - :enter (behavior ((arg0 float) (arg1 float)) + :enter (behavior ((arg0 float) (arg1 float) (arg2 symbol)) ((-> target-jump enter) arg0 arg1 (the-as surface #f)) (set! (-> self control mod-surface) *forward-jump-mods*) ) :exit target-exit :trans (-> target-jump trans) - :code (behavior ((arg0 float) (arg1 float)) + :code (behavior ((arg0 float) (arg1 float) (arg2 symbol)) (when (and (using-gun? self) (not (-> self gun charge-active?))) (set! (-> self gun top-anim-low-high) 0.0) (case (gun->eco (-> self gun gun-type)) @@ -1843,7 +1843,7 @@ (defstate target-falling (target) :event target-jump-event-handler - :enter (behavior ((arg0 symbol)) + :enter (behavior ((arg0 object)) (case arg0 (('uppercut) (set! (-> self control mod-surface) *uppercut-jump-mods*) @@ -1866,7 +1866,7 @@ #t ) ) - :code (behavior ((arg0 symbol)) + :code (behavior ((arg0 object)) (case arg0 (('uppercut) (ja-no-eval :num! (seek!)) @@ -2354,7 +2354,7 @@ ) ) (when (and (= (-> self fact eco-type) 2) (>= (-> self fact eco-level) 1.0)) - (do-effect (-> self skel effect) (the-as symbol "group-red-eco-spinkick") (ja-frame-num 0) 49) + (do-effect (-> self skel effect) "group-red-eco-spinkick" (ja-frame-num 0) 49) (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.1)) (talker-spawn-func (-> *talker-speech* 47) *entity-pool* (target-pos 0) (the-as region #f)) ) @@ -2654,7 +2654,7 @@ ) ) (when (and (= (-> self fact eco-type) 2) (>= (-> self fact eco-level) 1.0)) - (do-effect (-> self skel effect) (the-as symbol "group-red-eco-spinkick") (ja-frame-num 0) 28) + (do-effect (-> self skel effect) "group-red-eco-spinkick" (ja-frame-num 0) 28) (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.1)) (talker-spawn-func (-> *talker-speech* 47) *entity-pool* (target-pos 0) (the-as region #f)) ) @@ -2821,50 +2821,11 @@ (cond ((logtest? (-> *part-group-id-table* 12 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> s5-3 best-other-tri intersect quad)) - (let ((s5-4 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-4 - (let ((t9-36 (method-of-type part-tracker-subsampler activate))) - (t9-36 (the-as part-tracker-subsampler s5-4) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-37 run-function-in-process) - (a0-72 s5-4) - (a1-16 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 12)) - (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-37) a0-72 a1-16 *part-tracker-subsampler-params-default*) - ) - (-> s5-4 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 12)) ) (else (set! (-> *launch-matrix* trans quad) (-> s5-3 best-other-tri intersect quad)) - (let ((s5-5 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-5 - (let ((t9-39 (method-of-type part-tracker activate))) - (t9-39 (the-as part-tracker s5-5) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-40 run-function-in-process) - (a0-77 s5-5) - (a1-19 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 12)) - (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-40) a0-77 a1-19 *part-tracker-params-default*) - ) - (-> s5-5 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 12)) ) ) (let ((name (if (using-gun? self) @@ -3114,7 +3075,7 @@ (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) ) (when (and (= (-> self fact eco-type) 2) (>= (-> self fact eco-level) 1.0)) - (do-effect (-> self skel effect) (the-as symbol "group-red-eco-spinkick") (ja-frame-num 0) 43) + (do-effect (-> self skel effect) "group-red-eco-spinkick" (ja-frame-num 0) 43) (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.1)) (talker-spawn-func (-> *talker-speech* 47) *entity-pool* (target-pos 0) (the-as region #f)) ) @@ -3314,7 +3275,7 @@ (suspend) (ja :num! (seek! (ja-aframe 7.0 0))) ) - (go target-darkjak-bomb1) + (go target-darkjak-bomb1 arg0 arg1) ) (else (ja-no-eval :group! jakb-attack-uppercut-ja :num! (seek! (ja-aframe 7.0 0)) :frame-num (ja-aframe f30-0 0)) @@ -3426,7 +3387,7 @@ ) (mod-var-jump #t #t (cpad-hold? (-> self control cpad number) x) (-> self control transv)) (when (and (= (-> self fact eco-type) 2) (>= (-> self fact eco-level) 1.0)) - (do-effect (-> self skel effect) (the-as symbol "group-red-eco-spinkick") (ja-frame-num 0) 28) + (do-effect (-> self skel effect) "group-red-eco-spinkick" (ja-frame-num 0) 28) (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.1)) ) (if (and (= (-> self control danger-mode) 'uppercut) @@ -3630,7 +3591,7 @@ ) (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.5)) (if (and (= (-> self fact eco-type) 2) (>= (-> self fact eco-level) 1.0)) - (do-effect (-> self skel effect) (the-as symbol "group-red-eco-strike-ground") (ja-frame-num 0) 0) + (do-effect (-> self skel effect) "group-red-eco-strike-ground" (ja-frame-num 0) 0) ) (let ((v1-56 (process-spawn @@ -3660,15 +3621,11 @@ ) ) (when (and (= (-> self fact eco-type) 2) (>= (-> self fact eco-level) 1.0)) - (do-effect - (-> self skel effect) - (the-as symbol "group-red-eco-spinkick") - (ja-frame-num 0) - (if (rand-vu-percent? 0.5) - 28 - 19 - ) - ) + (do-effect (-> self skel effect) "group-red-eco-spinkick" (ja-frame-num 0) (if (rand-vu-percent? 0.5) + 28 + 19 + ) + ) (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.1)) ) (when (and (not (-> self control danger-mode)) @@ -3864,15 +3821,11 @@ (when (and (and (= (-> self fact eco-type) 2) (>= (-> self fact eco-level) 1.0)) (not (time-elapsed? (-> self state-time) (seconds 0.25))) ) - (do-effect - (-> self skel effect) - (the-as symbol "group-red-eco-spinkick") - (ja-frame-num 0) - (if (rand-vu-percent? 0.5) - 28 - 19 - ) - ) + (do-effect (-> self skel effect) "group-red-eco-spinkick" (ja-frame-num 0) (if (rand-vu-percent? 0.5) + 28 + 19 + ) + ) (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.1)) ) (let ((v1-37 (ja-group))) diff --git a/goal_src/jak3/engine/target/target2.gc b/goal_src/jak3/engine/target/target2.gc index fd5466200e..6377bfea26 100644 --- a/goal_src/jak3/engine/target/target2.gc +++ b/goal_src/jak3/engine/target/target2.gc @@ -796,23 +796,33 @@ :event target-standard-event-handler :exit (-> target-pole-cycle exit) :code (behavior ((arg0 float) (arg1 float) (arg2 float)) + (local-vars (a2-2 (function joint-control-channel float float float float :behavior process))) (let ((f0-2 (+ 1.0 (fmin 17.0 (ja-aframe-num 0))))) (ja-no-eval :group! jakb-pole-flip-up-ja :num! (seek!) :frame-num (ja-aframe f0-2 0)) ) (until (ja-done? 0) (suspend) - (ja :num! (seek!)) + (let ((a0-4 (-> self skel root-channel 0))) + (set! (-> a0-4 param 0) (the float (+ (-> a0-4 frame-group frames num-frames) -1))) + (set! (-> a0-4 param 1) 1.0) + (let ((t9-3 joint-control-channel-group-eval!) + (a1-3 #f) + ) + (set! a2-2 num-func-seek!) + (t9-3 a0-4 (the-as art-joint-anim a1-3) a2-2) + ) + ) ) (set-forward-vel arg2) - (go target-pole-flip-up-jump arg0 arg1) + (go target-pole-flip-up-jump arg0 arg1 (the-as symbol a2-2)) ) :post target-no-move-post ) (defstate target-pole-flip-up-jump (target) :event target-standard-event-handler - :enter (behavior ((arg0 float) (arg1 float)) - ((-> target-jump-forward enter) arg0 arg1) + :enter (behavior ((arg0 float) (arg1 float) (arg2 symbol)) + ((-> target-jump-forward enter) arg0 arg1 arg2) (set! (-> self control mod-surface) *forward-pole-jump-mods*) ) :exit target-exit @@ -820,7 +830,7 @@ ((-> target-jump-forward trans)) (vector-flatten! (-> self control transv) (-> self control transv) (-> self control edge-grab-edge-dir)) ) - :code (behavior ((arg0 float) (arg1 float)) + :code (behavior ((arg0 float) (arg1 float) (arg2 symbol)) (send-event *camera* 'damp-up) (ja :group! jakb-pole-jump-loop-ja :num! min) (let ((f0-1 (target-height-above-ground)) @@ -946,7 +956,7 @@ ((or (< -0.2 (local-pad-angle)) (= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0)) (let ((a1-2 (new 'stack-no-clear 'collide-query))) (let ((v1-25 a1-2)) - (set! (-> v1-25 spheres) (-> *collide-edge-work* world-player-leap-up-spheres)) + (set! (-> v1-25 best-dist) (the-as float (-> *collide-edge-work* world-player-leap-up-spheres))) (set! (-> v1-25 best-other-prim) (the-as collide-shape-prim 6)) (set! (-> v1-25 collide-with) (-> self control root-prim prim-core collide-with)) (set! (-> v1-25 ignore-process0) #f) @@ -1085,6 +1095,7 @@ ) :exit (-> target-edge-grab exit) :code (behavior ((arg0 float) (arg1 float) (arg2 symbol)) + (local-vars (a2-4 (function joint-control-channel float float float float :behavior process))) (case arg2 (('ladder) (ja-channel-push! 1 (seconds 0.1)) @@ -1139,7 +1150,16 @@ (move-by-vector! (-> self control) s3-0) ) (suspend) - (ja :num! (seek!)) + (let ((a0-18 (-> self skel root-channel 0))) + (set! (-> a0-18 param 0) (the float (+ (-> a0-18 frame-group frames num-frames) -1))) + (set! (-> a0-18 param 1) 1.0) + (let ((t9-10 joint-control-channel-group-eval!) + (a1-7 #f) + ) + (set! a2-4 num-func-seek!) + (t9-10 a0-18 (the-as art-joint-anim a1-7) a2-4) + ) + ) ) ) (set! (-> self control transv quad) (the-as uint128 0)) @@ -1147,7 +1167,7 @@ (set-forward-vel 16384.0) (set! (-> self gun surpress-time) (+ (current-time) (seconds 0.2))) (send-event *camera* 'damp-up) - (go target-jump-forward arg0 arg1) + (go target-jump-forward arg0 arg1 (the-as symbol a2-4)) ) :post target-no-move-post ) @@ -1749,12 +1769,7 @@ :event target-generic-event-handler :enter (behavior ((arg0 string) (arg1 handle)) (set! (-> self control anim-handle) arg1) - (let ((t9-0 (method-of-object (-> self control) collide-shape-moving-method-60))) - #x47200000 - #x47200000 - (-> self control root-prim prim-core collide-with) - (t9-0) - ) + (move-to-ground (-> self control) 40960.0 40960.0 #f (-> self control root-prim prim-core collide-with)) (logior! (-> self focus-status) (focus-status grabbed)) (set! (-> self neck flex-blend) 0.0) ) @@ -1810,13 +1825,7 @@ (move-to-point! (-> self control) a1-2) (matrix->quaternion (-> self control quat-for-control) (-> gp-0 bone transform)) (quaternion-copy! (-> self control quat) (-> self control quat-for-control)) - (let ((t9-5 (method-of-object (-> self control) collide-shape-moving-method-60))) - #x45800000 - #x47200000 - #t - (-> self control root-prim prim-core collide-with) - (t9-5) - ) + (move-to-ground (-> self control) 4096.0 40960.0 #t (-> self control root-prim prim-core collide-with)) (when (logtest? (-> self control status) (collide-status on-water)) (let ((a1-6 (new-stack-vector0))) (set! (-> a1-6 x) (-> self control trans x)) @@ -1859,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))) @@ -1885,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/bigmap-h.gc b/goal_src/jak3/engine/ui/bigmap-h.gc index 1cef057d39..b220a59ff5 100644 --- a/goal_src/jak3/engine/ui/bigmap-h.gc +++ b/goal_src/jak3/engine/ui/bigmap-h.gc @@ -38,7 +38,7 @@ (tpage external-art-buffer) (tpage2 basic) (progress-minimap texture-page) - (progress-minimap2 basic) + (progress-minimap2 texture-page) (load-index uint32) (x0 int32) (y0 int32) @@ -61,12 +61,12 @@ (:methods (new (symbol type) _type_) (bigmap-method-9 () none) - (bigmap-method-10 () none) - (bigmap-method-11 () none) + (update (_type_) none) + (bigmap-method-11 (_type_) symbol) (bigmap-method-12 () none) (bigmap-method-13 () none) - (bigmap-method-14 () none) - (bigmap-method-15 () none) + (enable-drawing (_type_) none) + (disable-drawing (_type_) int) (bigmap-method-16 (_type_) none) (bigmap-method-17 () none) (bigmap-method-18 () none) diff --git a/goal_src/jak3/engine/ui/hud-classes.gc b/goal_src/jak3/engine/ui/hud-classes.gc index e2eb417f74..890117bcae 100644 --- a/goal_src/jak3/engine/ui/hud-classes.gc +++ b/goal_src/jak3/engine/ui/hud-classes.gc @@ -7,3 +7,1438 @@ ;; DECOMP BEGINS +(defmethod draw ((this hud-map)) + (set-hud-piece-position! + (-> this sprites 1) + (the int (+ (- 512.0 (* 20.0 (-> *video-params* relative-x-scale))) (* 140.0 (-> this offset)))) + (the int (+ 281.0 (* 140.0 (-> this offset)))) + ) + (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 1)) 11 -11) + (set! (-> this sprites 0 color w) + (the int (+ 70.0 (* 70.0 (sin (* 182.04445 (the float (-> this values 1 current))))))) + ) + (set! (-> *minimap* color y) + (the int (- 96.0 (* 32.0 (sin (* 182.04445 (the float (-> this values 1 current))))))) + ) + (set! (-> *minimap* color z) + (the int (- 96.0 (* 32.0 (sin (* 182.04445 (the float (-> this values 1 current))))))) + ) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (cond + ((>= (-> *setting-control* user-current race-minimap) 1) + (set! (-> this sprites 1 scale-x) 0.0) + (set! (-> this sprites 1 scale-y) 0.0) + ) + (else + (set! (-> this sprites 1 scale-x) 0.85) + (set! (-> this sprites 1 scale-y) 0.85) + ) + ) + (let ((t9-5 (method-of-type hud draw))) + (t9-5 this) + ) + (cond + ((zero? (-> *setting-control* user-current race-minimap)) + (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-hud-alpha) + ) + (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) 2 -3) + (draw-1 *minimap* s4-0 (the-as vector4w (-> this sprites 2)) #t) + ) + ) + ((= (-> *setting-control* user-current race-minimap) 1) + 0 + ) + ((= (-> *setting-control* user-current race-minimap) 2) + (let ((s5-1 (level-get *level* 'destrack))) + (when (and s5-1 (= (-> s5-1 status) 'active)) + (set-race-texture *minimap* (get-texture map-desert-race destrack-minimap) 32768.0 s5-1) + (set-race-corner *minimap* 11321344.0 -1261568.0) + (with-dma-buffer-add-bucket ((s4-2 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-hud-alpha) + ) + (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) 0 -20) + (draw-sprite2 *minimap* s4-2 (the-as vector4w (-> this sprites 2)) #t) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod update-values! ((this hud-map)) + (cond + ((update! *minimap*) + (logior! (-> this flags) (hud-flags show)) + (let ((t9-1 (method-of-type hud update-values!))) + (t9-1 this) + ) + ) + (else + (send-event this 'force-hide) + ) + ) + (when (not (paused?)) + (let ((v1-10 8)) + (if (and (< (-> this values 1 target) 270) (< 270 (+ (-> this values 1 target) v1-10))) + (set! (-> this values 1 target) 270) + ) + (if (or (-> *game-info* wanted-flash) (!= (-> this values 1 target) 270)) + (set! (-> this values 1 target) (mod (+ (-> this values 1 target) v1-10) 360)) + ) + ) + ) + 0 + (none) + ) + +(defmethod init-callback ((this hud-map)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-lower-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-mapring-alarm-01 level-default-minimap))) + (set! (-> this sprites 0 scale-x) 0.0) + (set! (-> this sprites 0 scale-y) 0.0) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 0 pos z) #xffff00) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-mapring-01 level-default-minimap))) + (set! (-> this sprites 1 scale-x) 0.85) + (set! (-> this sprites 1 scale-y) 0.85) + (set! (-> this sprites 1 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 1 pos z) #xffff00) + (set! (-> this values 0 current) 0) + (update! *minimap*) + 0 + (none) + ) + +(defmethod update-value-callback ((this hud-health) (arg0 int) (arg1 int)) + (if (and (= arg0 4) (> arg1 0)) + (sound-play "inc-pickup" :pitch 0.5) + ) + 0 + (none) + ) + +(defmethod draw ((this hud-health)) + (set-hud-piece-position! + (-> this sprites 3) + (the int (+ (* -130.0 (-> this offset)) (* 18.0 (-> *video-params* relative-x-scale)))) + (the int (+ 305.0 (* 130.0 (-> this offset)))) + ) + (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites 3)) 21 23) + (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 3)) 20 20) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 3)) 10 64) + (set! (-> this sprites 1 scale-y) (* -0.098000005 (the float (-> this values 5 current)))) + (cond + ((nonzero? (-> this values 5 current)) + (let ((f30-1 + (the float + (+ (the int (* 127.0 (sin (* 182.04445 (the float (-> *display* game-clock frame-counter)))))) 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))) + ) + ) + (else + (set! (-> this sprites 1 color x) 128) + (set! (-> this sprites 1 color y) 128) + (set! (-> this sprites 1 color z) 128) + ) + ) + (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 3)) 40 59) + (set! (-> this sprites 2 scale-y) (* -0.096999995 (the float (-> this values 2 current)))) + (cond + ((nonzero? (-> this values 2 current)) + (let ((f0-27 + (+ 0.5 + (* 0.5 + (sin + (* 182.04445 (the float (* (if (>= (-> this values 2 current) (the int (-> *FACT-bank* darkjak-bomb-min))) + 2 + 1 + ) + (-> *display* game-clock frame-counter) + ) + ) + ) + ) + ) + ) + ) + (f1-17 (if (>= (-> this values 2 current) (the int (-> *FACT-bank* darkjak-bomb-min))) + 255.0 + 128.0 + ) + ) + ) + (set! (-> this sprites 2 color x) (the int (* 0.35 f1-17 f0-27))) + (set! (-> this sprites 2 color y) (the int (* 0.1 f1-17 f0-27))) + (set! (-> this sprites 2 color z) (the int (* 0.8 f1-17 f0-27))) + ) + ) + (else + (set! (-> this sprites 2 color x) 44) + (set! (-> this sprites 2 color y) 12) + (set! (-> this sprites 2 color z) 102) + ) + ) + (let ((s5-0 (-> this values 4 current))) + (dotimes (s4-0 s5-0) + (let ((v1-38 + (-> (new 'static 'inline-array vector 16 + (new 'static 'vector :x 23.0 :y 5.0 :w 1.0) + (new 'static 'vector :x 36.0 :y 2.0 :w 1.0) + (new 'static 'vector :x 49.0 :y 5.0 :w 1.0) + (new 'static 'vector :x 60.0 :y 12.0 :w 1.0) + (new 'static 'vector :x 67.0 :y 23.0 :w 1.0) + (new 'static 'vector :x 70.0 :y 36.0 :w 1.0) + (new 'static 'vector :x 67.0 :y 49.0 :w 1.0) + (new 'static 'vector :x 60.0 :y 60.0 :w 1.0) + (new 'static 'vector :x 49.0 :y 67.0 :w 1.0) + (new 'static 'vector :x 36.0 :y 70.0 :w 1.0) + (new 'static 'vector :x 23.0 :y 67.0 :w 1.0) + (new 'static 'vector :x 12.0 :y 60.0 :w 1.0) + (new 'static 'vector :x 5.0 :y 49.0 :w 1.0) + (new 'static 'vector :x 2.0 :y 36.0 :w 1.0) + (new 'static 'vector :x 5.0 :y 23.0 :w 1.0) + (new 'static 'vector :x 12.0 :y 12.0 :w 1.0) + ) + (logand (+ (- 20 (/ s5-0 2)) s4-0) 15) + ) + ) + ) + (set-as-offset-from! + (-> this sprites (+ s4-0 7)) + (the-as vector4w (-> this sprites 3)) + (the int (-> v1-38 x)) + (+ (the int (-> v1-38 y)) 1) + ) + ) + (if (>= s4-0 (-> this values 0 current)) + (set! (-> this sprites (+ s4-0 7) tid) + (the-as texture-id (get-texture hud-newhud-reddot-01 level-default-minimap)) + ) + (set! (-> this sprites (+ s4-0 7) tid) + (the-as texture-id (get-texture hud-newhud-greendot-01 level-default-minimap)) + ) + ) + ) + (let ((s4-1 15)) + (while (>= s4-1 s5-0) + (set-as-offset-from! (-> this sprites (+ s5-0 7)) (the-as vector4w (-> this sprites 3)) -200 0) + (+! s5-0 1) + ) + ) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-health)) + (set! (-> this values 0 target) (the int (-> *target* fact health))) + (set! (-> this values 1 target) (the-as int (-> *target* fact health-pickup-time))) + (set! (-> this values 2 target) (min 100 (the int (+ 0.5 (-> *target* game eco-pill-dark))))) + (set! (-> this values 3 target) (the-as int (-> *target* fact eco-pill-dark-pickup-time))) + (set! (-> this values 4 target) (the int (-> *target* fact health-max))) + (set! (-> this values 5 target) (min 100 (the int (+ 0.5 (-> *target* game eco-pill-light))))) + (set! (-> this values 6 target) (the-as int (-> *target* fact eco-pill-light-pickup-time))) + (if (focus-test? *target* dark) + (+! (-> this values 7 target) 1) + ) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-health)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-lower-left-1) (gui-action hidden) (-> this name) 81920.0 0) + ) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture common-white common))) + (set! (-> this sprites 0 pos z) #xfffff1) + (set! (-> this sprites 0 scale-x) 11.0) + (set! (-> this sprites 0 scale-y) 11.0) + (set! (-> this sprites 0 color x) 30) + (set! (-> this sprites 0 color y) 30) + (set! (-> this sprites 0 color z) 20) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture common-white common))) + (set! (-> this sprites 1 pos z) #xfffff2) + (set! (-> this sprites 1 scale-x) 8.0) + (set! (-> this sprites 1 scale-y) 8.0) + (set! (-> this sprites 2 tid) (the-as texture-id (get-texture common-white common))) + (set! (-> this sprites 2 pos z) #xfffff3) + (set! (-> this sprites 2 scale-x) 8.0) + (set! (-> this sprites 2 scale-y) 8.0) + (set! (-> this sprites 3 tid) (the-as texture-id (get-texture hud-newhud-01 level-default-minimap))) + (set! (-> this sprites 4 tid) (the-as texture-id (get-texture hud-newhud-shine-01 level-default-minimap))) + (set! (-> this sprites 4 scale-x) 1.3) + (dotimes (s5-0 16) + (set! (-> this sprites (+ s5-0 7) tid) + (the-as texture-id (get-texture hud-newhud-greendot-01 level-default-minimap)) + ) + ) + (logior! (-> this values 2 flags) 1) + (set! (-> this values 2 inc-time) (the-as uint 3)) + (set! (-> this values 2 inc-unit) (the-as uint 1)) + (logior! (-> this values 5 flags) 1) + (set! (-> this values 5 inc-time) (the-as uint 3)) + (set! (-> this values 5 inc-unit) (the-as uint 1)) + (logior! (-> this values 4 flags) 1) + (set! (-> this values 4 inc-time) (the-as uint 300)) + (set! (-> this values 4 inc-unit) (the-as uint 1)) + 0 + (none) + ) + +(define *hud-skullgem* (the-as (pointer hud-skullgem) #f)) + +(defmethod draw ((this hud-skullgem)) + (set-hud-piece-position! + (the-as hud-sprite (-> this icons 0 pos)) + (the int (+ (* -130.0 (-> this offset)) (* 60.0 (-> *video-params* relative-x-scale)))) + 150 + ) + (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (-> this icons 0 pos) -28 20) + (set! (-> this sprites 0 scale-x) 0.86) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this icons 0 pos) 0 45) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-skullgem)) + (set! (-> this values 0 target) (the int (-> *target* game gem))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-skullgem)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-left) (gui-action hidden) (-> this name) 81920.0 0) + ) + (hud-create-icon this 0 (the-as int (art-group-get-by-name *level* "skel-gem" (the-as (pointer level) #f)))) + (set! (-> this icons 0 scale-x) 0.025) + (set! (-> this icons 0 scale-y) 0.035) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-egg-glow level-default-minimap))) + (set! (-> this sprites 0 scale-x) 0.86) + (set! (-> this sprites 0 scale-y) 1.05) + (set! (-> this sprites 0 pos z) #xfff9ff) + (logior! (-> this values 0 flags) 11) + (set! (-> this values 0 inc-time) (the-as uint 45)) + (set! (-> this values 0 inc-unit) (the-as uint 1)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + (set! (-> this strings 0 scale) 0.5) + 0 + (none) + ) + +(defmethod update-value-callback ((this hud-skullgem) (arg0 int) (arg1 int)) + (let ((v1-3 (- (-> this values arg0 target) (-> this values arg0 current)))) + (cond + ((< 20 v1-3) + (set! (-> this values arg0 current) (-> this values arg0 target)) + ) + ((> v1-3 0) + (sound-play "inc-pickup" :pitch 0.5) + ) + (else + (sound-play "gem-spawn" :vol 80 :pitch 0.4) + ) + ) + ) + 0 + (none) + ) + +(defmethod draw ((this hud-skill)) + (set-hud-piece-position! + (the-as hud-sprite (-> this icons 0 pos)) + (the int (+ (* -130.0 (-> this offset)) (* 60.0 (-> *video-params* relative-x-scale)))) + 270 + ) + (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (-> this icons 0 pos) -20 -39) + (set! (-> this sprites 0 scale-x) 0.62) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this icons 0 pos) 0 -5) + (when (not (paused?)) + (let ((s5-1 (new 'stack-no-clear 'quaternion))) + (quaternion-axis-angle! s5-1 0.0 1.0 0.0 364.0889) + (quaternion*! (-> this icons 0 icon 0 root quat) s5-1 (-> this icons 0 icon 0 root quat)) + ) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-skill)) + (set! (-> this values 0 target) (the int (-> *target* game skill))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-skill)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-middle-left) (gui-action hidden) (-> this name) 81920.0 0) + ) + (hud-create-icon this 0 (the-as int (art-group-get-by-name *level* "skel-skill" (the-as (pointer level) #f)))) + (set! (-> this icons 0 scale-x) 0.009) + (set! (-> this icons 0 scale-y) -0.018) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-egg-glow level-default-minimap))) + (set! (-> this sprites 0 scale-x) 0.62) + (set! (-> this sprites 0 scale-y) 1.34) + (set! (-> this sprites 0 pos z) #xfff9ff) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + (set! (-> this strings 0 scale) 0.5) + (logior! (-> this values 0 flags) 9) + (set! (-> this values 0 inc-time) (the-as uint 45)) + (set! (-> this values 0 inc-unit) (the-as uint 1)) + 0 + (none) + ) + +(defmethod update-value-callback ((this hud-skill) (arg0 int) (arg1 int)) + (if (> arg1 0) + (sound-play "inc-pickup" :pitch 0.5) + ) + 0 + (none) + ) + +(defmethod draw ((this hud-score)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ (- 512.0 (* 32.0 (-> *video-params* relative-x-scale))) (* 130.0 (-> this offset)))) + 140 + ) + (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)) -12 8) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-score)) + (set! (-> this values 0 target) (the int (-> *game-info* score))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-score)) + (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 hsf2)) + (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) + ) + +(defmethod draw ((this hud-timer)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (+ (the int (* 8.0 (-> *video-params* relative-x-scale))) 256) + (the int (+ 50.0 (* -100.0 (-> this offset)))) + ) + (format (clear (-> this strings 0 text)) "~1,'0D" (/ (-> this values 0 current) 10)) + (format (clear (-> this strings 1 text)) "~1,'0D" (mod (-> this values 0 current) 10)) + (format (clear (-> this strings 2 text)) ":") + (format (clear (-> this strings 3 text)) "~1,'0D" (/ (-> this values 1 current) 10)) + (format (clear (-> this strings 4 text)) "~1,'0D" (mod (-> this values 1 current) 10)) + (let ((s5-5 20) + (s4-0 -42) + ) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) s4-0 -24) + (let ((s4-1 (+ s4-0 s5-5))) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) s4-1 -24) + (let ((s4-2 (+ s4-1 16))) + (set-as-offset-from! (the-as hud-sprite (-> this strings 2 pos)) (the-as vector4w (-> this sprites)) s4-2 -24) + (let ((s4-3 (+ s4-2 16))) + (set-as-offset-from! (the-as hud-sprite (-> this strings 3 pos)) (the-as vector4w (-> this sprites)) s4-3 -24) + (let ((a2-13 (+ s4-3 s5-5))) + (set-as-offset-from! + (the-as hud-sprite (-> this strings 4 pos)) + (the-as vector4w (-> this sprites)) + a2-13 + -24 + ) + ) + ) + ) + ) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; WARN: Return type mismatch uint vs object. +(defmethod event-callback ((this hud-timer) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('alert) + (let ((v0-0 (-> arg3 param 0))) + (set! (-> this values 3 target) (the-as int v0-0)) + v0-0 + ) + ) + ) + ) + +(defmethod update-values! ((this hud-timer)) + (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) + (if (and (< (-> this values 0 target) 1) + (< (-> this values 1 target) (the-as int (-> *setting-control* user-current timer-warn-seconds))) + ) + (sound-play "timer-warn") + (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)) + (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 (get-texture hud-timerboard-01 level-default-minimap))) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 0 scale-x) 2.2) + (set! (-> this sprites 0 scale-y) 2.0) + (dotimes (s5-0 5) + (alloc-string-if-needed this s5-0) + (set! (-> this strings s5-0 scale) 0.8) + (set! (-> this strings s5-0 flags) (font-flags kerning middle large)) + (set! (-> this strings s5-0 color) (font-color green)) + ) + (set! (-> this values 2 target) (-> this values 1 target)) + (set! (-> this values 3 target) 0) + 0 + (none) + ) + +(defmethod draw ((this hud-big-score)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (+ (the int (* 8.0 (-> *video-params* relative-x-scale))) 256) + (the int (+ 50.0 (* -100.0 (-> this offset)))) + ) + (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)) -7 -24) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-big-score)) + (set! (-> this values 0 target) (the int (-> *game-info* score))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-big-score)) + (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 (get-texture hud-timerboard-01 level-default-minimap))) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 0 scale-x) 2.7) + (set! (-> this sprites 0 scale-y) 2.0) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.8) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + (set! (-> this strings 0 color) (font-color green)) + 0 + (none) + ) + +(defmethod draw ((this hud-goal)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ (* -130.0 (-> this offset)) (* 65.0 (-> *video-params* relative-x-scale)))) + 70 + ) + (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)) -40 -40) + (let ((v1-4 (-> *setting-control* user-default language))) + (set! (-> this strings 1 scale) (cond + ((= v1-4 (language-enum korean)) + 0.75 + ) + ((= v1-4 (language-enum russian)) + 0.75 + ) + (else + 0.65 + ) + ) + ) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-goal)) + (set! (-> this values 0 target) (the int (-> *game-info* goal))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-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.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.65) + (set! (-> this strings 1 flags) (font-flags kerning 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-0136) #f)) + (s5-0 gp-1 s4-0 *temp-string*) + ) + 0 + (none) + ) + +(defmethod draw ((this hud-miss)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 448.0 (* 130.0 (-> this offset)))) + 70 + ) + (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)) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 40 -40) + (let ((v1-3 (-> *setting-control* user-default language))) + (set! (-> this strings 1 scale) (cond + ((= v1-3 (language-enum korean)) + 0.75 + ) + ((= v1-3 (language-enum russian)) + 0.75 + ) + (else + 0.65 + ) + ) + ) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-miss)) + (set! (-> this values 0 target) (the int (-> *game-info* miss))) + (set! (-> this values 1 target) (the int (-> *game-info* miss-max))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-miss)) + (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 1) + (set! (-> this strings 1 scale) 0.65) + (set! (-> this strings 1 flags) (font-flags kerning right 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-0546) #f)) + (s5-0 gp-1 s4-0 *temp-string*) + ) + 0 + (none) + ) + +(defmethod draw ((this hud-progress)) + (with-pp + (let ((f0-0 (if (process-by-name "hud-timer" *active-pool*) + 65.0 + 35.0 + ) + ) + ) + (seek! (-> this sprites 2 scale-y) f0-0 (* 2.0 (-> pp clock time-adjust-ratio))) + ) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + 256 + (the int (+ (* -100.0 (-> this offset)) (-> this sprites 2 scale-y))) + ) + (set-as-offset-from! + (-> this sprites 1) + (the-as vector4w (-> this sprites)) + (+ (the int (* 0.09 (the float (-> this values 0 current)))) -42) + 0 + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + ) + +(defmethod update-values! ((this hud-progress)) + (set! (-> this values 0 target) (the int (* 1000.0 (-> *game-info* distance)))) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-progress)) + (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 (lookup-texture-by-id (new 'static 'texture-id)))) + (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 (lookup-texture-by-id (new 'static 'texture-id)))) + (set! (-> this sprites 1 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 1 scale-x) 1.8) + (set! (-> this sprites 1 scale-y) 1.8) + (set! (-> this sprites 2 scale-y) (if (process-by-name "hud-timer" *active-pool*) + 65.0 + 35.0 + ) + ) + 0 + (none) + ) + +(defmethod hud-sprite-method-11 ((this hud-sprite) (arg0 hud-sprite) (arg1 vector4w) (arg2 int) (arg3 int)) + (set! (-> this tid) (the-as texture-id (lookup-texture-by-id (-> arg0 tid)))) + (set! (-> this scale-x) (-> arg0 scale-x)) + (set! (-> this scale-y) (-> arg0 scale-y)) + (set-as-offset-from! + (the-as hud-sprite (-> this pos)) + arg1 + (+ arg2 (the int (-> arg0 offset-x))) + (+ arg3 (the int (-> arg0 offset-y))) + ) + 0 + (none) + ) + +(define *gun-arrow-table* (new 'static 'inline-array hud-sprite 24 + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1056964608 :y -1047003136) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x5 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1056964608 :y -1047003136) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x36 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1056964608 :y -1044381696) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x4d :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1056964608 :y -1044381696) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x4e :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1053818880 :y -1040187392) + :scale-x 1.21 + :scale-y 1.21 + :tid (new 'static 'texture-id :index #x4d :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1053818880 :y -1040187392) + :scale-x 1.21 + :scale-y 1.21 + :tid (new 'static 'texture-id :index #x4e :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1056964608 :y #x41980000) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x2 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1056964608 :y #x41980000) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x33 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1056964608 :y #x41c00000) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x47 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1056964608 :y #x41c00000) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x48 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1053818880 :y #x41e80000) + :scale-x 1.21 + :scale-y 1.21 + :tid (new 'static 'texture-id :index #x47 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1053818880 :y #x41e80000) + :scale-x 1.21 + :scale-y 1.21 + :tid (new 'static 'texture-id :index #x48 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1047003136 :y -1056964608) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x3 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1047003136 :y -1056964608) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x34 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1044381696 :y -1056964608) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x49 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1044381696 :y -1056964608) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x4a :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1040187392 :y -1053818880) + :scale-x 1.21 + :scale-y 1.21 + :tid (new 'static 'texture-id :index #x49 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1040187392 :y -1053818880) + :scale-x 1.21 + :scale-y 1.21 + :tid (new 'static 'texture-id :index #x4a :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x #x41980000 :y -1056964608) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x4 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x #x41980000 :y -1056964608) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x35 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x #x41c00000 :y -1056964608) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x4b :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x #x41c00000 :y -1056964608) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x4c :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x #x41e80000 :y -1053818880) + :scale-x 1.21 + :scale-y 1.21 + :tid (new 'static 'texture-id :index #x4b :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x #x41e80000 :y -1053818880) + :scale-x 1.21 + :scale-y 1.21 + :tid (new 'static 'texture-id :index #x4c :page #x9) + ) + ) + ) + +(defmethod draw ((this hud-gun)) + (local-vars + (sv-32 int) + (sv-40 int) + (sv-48 int) + (sv-56 int) + (sv-64 hud-sprite) + (sv-72 int) + (sv-80 int) + (sv-88 int) + (sv-96 int) + (sv-104 int) + (sv-112 int) + ) + (set! sv-32 0) + (set! sv-40 0) + (set! sv-48 0) + (set! sv-56 0) + (set! sv-64 (new 'stack-no-clear 'hud-sprite)) + (set! sv-72 (the int (get-max-ammo-for-gun *game-info* (the-as pickup-type (-> this values 0 current))))) + (set! sv-80 20) + (set! sv-88 -1) + (set! sv-96 -1) + (set! sv-104 -1) + (set! sv-112 -1) + (case (gun->eco (the-as pickup-type (-> this values 0 current))) + (((pickup-type eco-yellow)) + (let ((v1-10 (-> this sprites 15 color-ptr))) + (set! (-> v1-10 0) 128) + (set! (-> v1-10 1) 128) + (set! (-> v1-10 2) 96) + (set! (-> v1-10 3) 128) + ) + (set! sv-96 (+ (-> this values 0 current) -29)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-gunyellow-common-01 level-default-minimap))) + (set! (-> this sprites 14 tid) + (the-as texture-id (get-texture hud-gun-yellow-shell-01 level-default-minimap)) + ) + (set! (-> this sprites 0 scale-x) 1.8) + (set! (-> this sprites 0 scale-y) 1.8) + (set! (-> this sprites 1 scale-x) 1.8) + (set! (-> this sprites 1 scale-y) 1.8) + (set! sv-32 10) + (set! sv-40 7) + ) + (((pickup-type eco-dark)) + (let ((v1-19 (-> this sprites 15 color-ptr))) + (set! (-> v1-19 0) 128) + (set! (-> v1-19 1) 96) + (set! (-> v1-19 2) 128) + (set! (-> v1-19 3) 128) + ) + (set! sv-112 (+ (-> this values 0 current) -35)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-gunpurple-common-01 level-default-minimap))) + (set! (-> this sprites 14 tid) + (the-as texture-id (get-texture hud-gun-purple-shell-01 level-default-minimap)) + ) + (set! (-> this sprites 0 scale-x) 1.6) + (set! (-> this sprites 0 scale-y) 1.6) + (set! (-> this sprites 1 scale-x) 1.6) + (set! (-> this sprites 1 scale-y) 1.6) + (set! sv-32 23) + (set! sv-80 10) + ) + (((pickup-type eco-blue)) + (let ((v1-28 (-> this sprites 15 color-ptr))) + (set! (-> v1-28 0) 96) + (set! (-> v1-28 1) 128) + (set! (-> v1-28 2) 128) + (set! (-> v1-28 3) 128) + ) + (set! sv-104 (+ (-> this values 0 current) -32)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-gunblue-common-01 level-default-minimap))) + (set! (-> this sprites 14 tid) (the-as texture-id (get-texture hud-gun-blue-shell-01 level-default-minimap))) + (set! (-> this sprites 0 scale-x) 1.7) + (set! (-> this sprites 0 scale-y) 1.7) + (set! (-> this sprites 1 scale-x) 1.7) + (set! (-> this sprites 1 scale-y) 1.7) + (set! sv-32 6) + (set! sv-40 13) + ) + (else + (let ((v1-37 (-> this sprites 15 color-ptr))) + (set! (-> v1-37 0) 128) + (set! (-> v1-37 1) 64) + (set! (-> v1-37 2) 64) + (set! (-> v1-37 3) 128) + ) + (set! sv-88 (+ (-> this values 0 current) -26)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-gunred-common-01 level-default-minimap))) + (set! (-> this sprites 14 tid) (the-as texture-id (get-texture hud-gun-red-shell-01 level-default-minimap))) + (set! (-> this sprites 0 scale-x) 1.6) + (set! (-> this sprites 0 scale-y) 1.6) + (set! (-> this sprites 1 scale-x) 1.6) + (set! (-> this sprites 1 scale-y) 1.6) + (set! sv-32 23) + (set! sv-40 -2) + (set! sv-80 20) + ) + ) + (case (-> this values 0 current) + ((26) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunred-01a level-default-minimap))) + (set! sv-48 -102) + ) + ((27) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunred-02a level-default-minimap))) + (set! sv-48 -153) + ) + ((28) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunred-03a level-default-minimap))) + (set! sv-48 -153) + ) + ((29) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunyellow-01a level-default-minimap))) + (set! sv-48 -172) + ) + ((30) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunyellow-02a level-default-minimap))) + (set! sv-48 -172) + ) + ((31) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-gunyellow-03b level-default-minimap))) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunyellow-03a level-default-minimap))) + (set! sv-48 -172) + ) + ((32) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunblue-01a level-default-minimap))) + (set! sv-48 -135) + ) + ((33) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunblue-02a level-default-minimap))) + (set! sv-48 -162) + (set! sv-56 -49) + ) + ((34) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunblue-03a level-default-minimap))) + (set! sv-48 -162) + (set! sv-56 -49) + ) + ((35) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunpurple-01a level-default-minimap))) + (set! sv-48 -153) + ) + ((36) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunpurple-02a level-default-minimap))) + (set! sv-48 -153) + ) + ((37) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunpurple-03a level-default-minimap))) + (set! sv-48 -153) + ) + ) + (set-hud-piece-position! + sv-64 + (- (the int (+ 507.0 (* 130.0 (-> this offset)))) (the int (* 80.0 (-> *video-params* relative-x-scale)))) + (the int (+ 40.0 (* -100.0 (-> this offset)))) + ) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (- (the int (+ 507.0 (* 130.0 (-> this offset)))) + (the int (* (the float sv-32) (-> *video-params* relative-x-scale))) + ) + (the int (+ (- 25.0 (the float sv-40)) (* -100.0 (-> this offset)))) + ) + (let ((f30-0 1.0)) + (cond + ((zero? (-> this values 0 current)) + (set! f30-0 0.0) + (set! (-> this strings 0 pos x) 0) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -3 0) + ) + (else + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) sv-48 sv-56) + (set-as-offset-from! + (the-as hud-sprite (-> this strings 0 pos)) + (the-as vector4w (-> this sprites)) + (+ sv-32 -70) + (+ sv-40 61) + ) + (set-as-offset-from! + (-> this sprites 14) + (the-as vector4w (-> this sprites)) + (+ sv-32 -68) + (+ (if (= sv-80 20) + 122 + 97 + ) + sv-40 + ) + ) + (set! (-> this sprites 14 scale-x) 1.0) + (let ((s5-0 (the int (+ 0.1 (* (the float sv-80) (/ (the float (-> this values 1 current)) (the float sv-72))))))) + (if (and (zero? s5-0) (nonzero? (-> this values 1 current))) + (set! s5-0 1) + ) + (when (not (-> *setting-control* user-current gun-special-mode)) + (with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-hud-alpha) + ) + (dotimes (s2-0 sv-80) + (if (= s2-0 s5-0) + (set! (-> this sprites 14 tid) (the-as texture-id (get-texture hud-gun-empty-shell-01 level-default-minimap))) + ) + (draw (-> this sprites 14) s3-0 (-> this level) #f) + (+! (-> this sprites 14 pos y) -5) + (if (= s2-0 (+ (/ sv-80 2) -1)) + (set-as-offset-from! + (-> this sprites 14) + (the-as vector4w (-> this sprites)) + (+ sv-32 -83) + (+ (if (= sv-80 20) + 122 + 97 + ) + sv-40 + ) + ) + ) + ) + ) + ) + ) + ) + ) + (set! (-> this sprites 14 scale-x) 0.0) + (set-as-offset-from! (-> this sprites 15) (the-as vector4w sv-64) -4 -4) + (dotimes (v1-125 12) + (set! (-> this sprites (+ v1-125 2) scale-x) 0.0) + ) + (let ((s5-1 + (+ (if (and (logtest? (-> *target* game features) (game-feature gun)) + (and (-> *setting-control* user-current gun) + (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-red-1)) + (-> *target* game features) + ) + ) + ) + 1 + 0 + ) + (if (and (logtest? (-> *target* game features) (game-feature gun)) + (and (-> *setting-control* user-current gun) + (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-red-2)) + (-> *target* game features) + ) + ) + ) + 1 + 0 + ) + (if (and (logtest? (-> *target* game features) (game-feature gun)) + (and (-> *setting-control* user-current gun) + (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-red-3)) + (-> *target* game features) + ) + ) + ) + 1 + 0 + ) + ) + ) + ) + (dotimes (s4-1 s5-1) + (let ((s3-1 (- 10 s4-1))) + (hud-sprite-method-11 + (-> this sprites s3-1) + (if (>= sv-88 s4-1) + (-> *gun-arrow-table* (+ (* s4-1 2) 1)) + (-> *gun-arrow-table* (* s4-1 2)) + ) + (the-as vector4w sv-64) + 0 + 0 + ) + (if (= f30-0 0.0) + (set! (-> this sprites s3-1 scale-x) f30-0) + ) + ) + ) + ) + (let ((s5-2 + (+ (if (and (logtest? (-> *target* game features) (game-feature gun)) + (-> *setting-control* user-current gun) + (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-yellow-1)) + (-> *target* game features) + ) + ) + 1 + 0 + ) + (if (and (logtest? (-> *target* game features) (game-feature gun)) + (and (-> *setting-control* user-current gun) + (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-yellow-2)) + (-> *target* game features) + ) + ) + ) + 1 + 0 + ) + (if (and (logtest? (-> *target* game features) (game-feature gun)) + (and (-> *setting-control* user-current gun) + (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-yellow-3)) + (-> *target* game features) + ) + ) + ) + 1 + 0 + ) + ) + ) + ) + (dotimes (s4-2 s5-2) + (let ((s3-2 (- 13 s4-2))) + (hud-sprite-method-11 + (-> this sprites s3-2) + (if (>= sv-96 s4-2) + (-> *gun-arrow-table* (+ (* s4-2 2) 7)) + (-> *gun-arrow-table* (+ (* s4-2 2) 6)) + ) + (the-as vector4w sv-64) + 0 + 0 + ) + (if (= f30-0 0.0) + (set! (-> this sprites s3-2 scale-x) f30-0) + ) + ) + ) + ) + (let ((s5-3 + (+ (if (and (logtest? (-> *target* game features) (game-feature gun)) + (-> *setting-control* user-current gun) + (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-blue-1)) + (-> *target* game features) + ) + ) + 1 + 0 + ) + (if (and (logtest? (-> *target* game features) (game-feature gun)) + (and (-> *setting-control* user-current gun) + (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-blue-2)) + (-> *target* game features) + ) + ) + ) + 1 + 0 + ) + (if (and (logtest? (-> *target* game features) (game-feature gun)) + (and (-> *setting-control* user-current gun) + (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-blue-3)) + (-> *target* game features) + ) + ) + ) + 1 + 0 + ) + ) + ) + ) + (dotimes (s4-3 s5-3) + (let ((s3-3 (- 4 s4-3))) + (hud-sprite-method-11 + (-> this sprites s3-3) + (if (>= sv-104 s4-3) + (-> *gun-arrow-table* (+ (* s4-3 2) 13)) + (-> *gun-arrow-table* (+ (* s4-3 2) 12)) + ) + (the-as vector4w sv-64) + 0 + 0 + ) + (if (= f30-0 0.0) + (set! (-> this sprites s3-3 scale-x) f30-0) + ) + ) + ) + ) + (let ((s5-4 + (+ (if (and (logtest? (-> *target* game features) (game-feature gun)) + (-> *setting-control* user-current gun) + (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-dark-1)) + (-> *target* game features) + ) + ) + 1 + 0 + ) + (if (and (logtest? (-> *target* game features) (game-feature gun)) + (and (-> *setting-control* user-current gun) + (logtest? (logand (game-feature gun-dark-2) (-> *setting-control* user-current features)) + (-> *target* game features) + ) + ) + ) + 1 + 0 + ) + (if (and (logtest? (-> *target* game features) (game-feature gun)) + (and (-> *setting-control* user-current gun) + (logtest? (logand (game-feature gun-dark-3) (-> *setting-control* user-current features)) + (-> *target* game features) + ) + ) + ) + 1 + 0 + ) + ) + ) + ) + (dotimes (s4-4 s5-4) + (let ((s3-4 (- 7 s4-4))) + (hud-sprite-method-11 + (-> this sprites s3-4) + (if (>= sv-112 s4-4) + (-> *gun-arrow-table* (+ (* s4-4 2) 19)) + (-> *gun-arrow-table* (+ (* s4-4 2) 18)) + ) + (the-as vector4w sv-64) + 0 + 0 + ) + (if (= f30-0 0.0) + (set! (-> this sprites s3-4 scale-x) f30-0) + ) + ) + ) + ) + ) + (format (clear (-> this strings 0 text)) "~D/~D" (-> this values 1 current) sv-72) + (if (and *target* + (nonzero? (-> *target* gun)) + (< (-> this values 1 current) (the int (-> *target* gun ammo-required))) + ) + (set! (-> this strings 0 color) (font-color red)) + (set! (-> this strings 0 color) (font-color white)) + ) + (if (and (-> *setting-control* user-current gun-special-mode) (= (-> this values 0 current) 29)) + (clear (-> this strings 0 text)) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-gun)) + (cond + ((focus-test? *target* gun) + (let ((v1-2 (-> this values 0 target))) + (set! (-> this values 0 target) (the-as int (-> *target* gun using-gun-type))) + (if (!= v1-2 (-> this values 0 target)) + (sound-play "gun-switch") + ) + ) + (set! (-> this values 1 target) + (the int (-> *target* game gun-ammo (+ (gun->ammo (-> *target* gun using-gun-type)) -15))) + ) + (logclear! (-> this flags) (hud-flags disable)) + (logior! (-> this flags) (hud-flags show)) + ) + (else + (logior! (-> this flags) (hud-flags disable)) + (logclear! (-> this flags) (hud-flags show)) + (send-event this 'hide) + ) + ) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-gun)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + (set! (-> this strings 0 scale) 0.4) + (set! (-> this sprites 15 tid) (the-as texture-id (get-texture hud-gun-reticle level-default-minimap))) + (set! (-> this sprites 15 scale-x) 1.0) + (set! (-> this sprites 15 scale-y) 1.0) + (logior! (-> this flags) (hud-flags disable)) + 0 + (none) + ) + +(defun activate-hud ((arg0 target)) + (process-spawn hud-health :init hud-init-by-other :name "hud-health" :to arg0) + (process-spawn hud-map :init hud-init-by-other :name "hud-map" :to arg0) + (set! *hud-skullgem* (process-spawn hud-skullgem :init hud-init-by-other :name "hud-skullgem" :to arg0)) + (process-spawn hud-skill :init hud-init-by-other :name "hud-skill" :to arg0) + (process-spawn hud-gun :init hud-init-by-other :name "hud-gun" :to arg0) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/ui/hud-h.gc b/goal_src/jak3/engine/ui/hud-h.gc index 546b35a580..fa9c35235f 100644 --- a/goal_src/jak3/engine/ui/hud-h.gc +++ b/goal_src/jak3/engine/ui/hud-h.gc @@ -17,8 +17,33 @@ (define-extern hide-hud (function symbol none)) +(define-extern hide-hud-quick (function symbol none)) (define-extern show-hud (function object none)) +;; +++hud-sprite-flags +(defenum hud-sprite-flags + :type uint32 + :bitfield #t + (hsf0 0) + (hsf1 1) + (hsf2 2) + (hsf3 3) + (hsf4 4) + (hsf5 5) + (hsf6 6) + (hsf7 7) + (hsf8 8) + (hsf9 9) + (hsf10 10) + (hsf11 11) + (hsf12 12) + (hsf13 13) + (hsf14 14) + (hsf15 15) + ) +;; ---hud-sprite-flags + + ;; DECOMP BEGINS (deftype hud-string (structure) @@ -33,21 +58,22 @@ (deftype hud-sprite (structure) - ((pos vector4w :inline) - (offset-x float :overlay-at (-> pos data 0)) - (offset-y float :overlay-at (-> pos data 1)) - (color vector4w :inline) - (flags uint32) - (scale-x float) - (scale-y float) - (angle float) - (tex texture) - (tid uint32 :overlay-at tex) + ((pos vector4w :inline) + (offset-x float :overlay-at (-> pos data 0)) + (offset-y float :overlay-at (-> pos data 1)) + (color vector4w :inline) + (color-ptr int32 4 :overlay-at (-> color data 0)) + (flags hud-sprite-flags) + (scale-x float) + (scale-y float) + (angle float) + (tex texture) + (tid texture-id :overlay-at tex) ) (:methods - (draw (_type_ dma-buffer level) none) - (hud-sprite-method-10 () none) - (hud-sprite-method-11 () none) + (draw (_type_ dma-buffer level symbol) none) + (hud-sprite-method-10 (_type_ dma-buffer level int int int int) object) + (hud-sprite-method-11 (_type_ hud-sprite vector4w int int) none) ) ) @@ -59,11 +85,11 @@ (color vector4w :inline) ) (:methods - (hud-box-method-9 () none) - (hud-box-method-10 () none) - (hud-box-method-11 () none) - (hud-box-method-12 () none) - (hud-box-method-13 () none) + (draw-box-prim-only (_type_ dma-buffer) none) + (draw-box-alpha-1 (_type_ dma-buffer) none) + (draw-box-alpha-2 (_type_ dma-buffer) none) + (draw-box-alpha-3 (_type_ dma-buffer) none) + (draw-scan-and-line (_type_ dma-buffer float) int) ) ) @@ -102,25 +128,25 @@ (gui-id sound-id) ) (:methods - (hud-method-14 () none) - (hud-method-15 () none) - (hud-method-16 () none) - (hud-method-17 () none) - (hud-method-18 () none) - (hud-method-19 () none) - (hud-method-20 () none) - (hud-method-21 () none) - (hud-method-22 () none) - (hud-method-23 () none) - (hud-method-24 () none) - (hud-method-25 () none) - (hud-method-26 () none) + (hidden? (_type_) object) + (draw (_type_) none) + (update-values! (_type_) none) + (init-callback (_type_) none) + (event-callback (_type_ process int symbol event-message-block) object) + (hud-method-19 (_type_) none) + (hud-method-20 (_type_) none) + (hud-method-21 (_type_) none) + (hud-method-22 (_type_) none) + (hud-method-23 (_type_) none) + (check-ready-and-maybe-show (_type_ symbol) symbol) + (update-value-callback (_type_ int int) none) + (alloc-string-if-needed (_type_ int) none) ) (:states hud-arriving hud-hidden hud-in - hud-leaving + (hud-leaving float) ) ) @@ -268,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/hud.gc b/goal_src/jak3/engine/ui/hud.gc index e3aead8689..8c5916f58a 100644 --- a/goal_src/jak3/engine/ui/hud.gc +++ b/goal_src/jak3/engine/ui/hud.gc @@ -7,3 +7,1352 @@ ;; DECOMP BEGINS +(defmethod check-ready-and-maybe-show ((this hud) (arg0 symbol)) + (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 + ) + ) + ) + +(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) + (scanline uint32) + ) + ) + + +(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) + ) + :gif (new 'static 'array uint64 2 #x1000000000008005 #xe) + ) + :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) + ) + :gif (new 'static 'array uint64 2 #x502b400000008001 #x52521) + ) + :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) + ) + :gif (new 'static 'array uint64 2 #xc02a400000008001 #x521521521521) + ) + :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) + ) + :gif (new 'static 'array uint64 2 #x6021400000008001 #x555551) + ) + :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) + ) + :gif (new 'static 'array uint64 2 #x5022400000008001 #x55551) + ) + :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) + ) + :gif (new 'static 'array uint64 2 #x5022400000008001 #x55551) + ) + :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) + ) + :gif (new 'static 'array uint64 2 #x2020c00000008002 #x5555) + ) + :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) + ) + :gif (new 'static 'array uint64 2 #x5020c00000008020 #x55551) + ) + :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 :x 1 :y 1) + (new 'static 'vector4w :x 2 :y 1 :z 1) + (new 'static 'vector4w :x 3 :y 2 :z 1) + (new 'static 'vector4w :x 6 :y 4 :z 2) + (new 'static 'vector4w :x 8 :y 6 :z 2) + (new 'static 'vector4w :x 12 :y 10 :z 4) + (new 'static 'vector4w :x 12 :y 10 :z 4) + (new 'static 'vector4w :x 12 :y 10 :z 4) + (new 'static 'vector4w :x 16 :y 14 :z 6) + (new 'static 'vector4w :x 16 :y 14 :z 6) + (new 'static 'vector4w :x 16 :y 14 :z 6) + (new 'static 'vector4w :x 16 :y 14 :z 6) + (new 'static 'vector4w :x 22 :y 20 :z 10) + (new 'static 'vector4w :x 22 :y 20 :z 10) + (new 'static 'vector4w :x 22 :y 20 :z 10) + (new 'static 'vector4w :x 22 :y 20 :z 10) + (new 'static 'vector4w :x 28 :y 26 :z 12) + (new 'static 'vector4w :x 28 :y 26 :z 12) + (new 'static 'vector4w :x 28 :y 26 :z 12) + (new 'static 'vector4w :x 28 :y 26 :z 12) + (new 'static 'vector4w :x 40 :y 34 :z 18) + (new 'static 'vector4w :x 40 :y 34 :z 18) + (new 'static 'vector4w :x 40 :y 34 :z 18) + (new 'static 'vector4w :x 40 :y 34 :z 18) + (new 'static 'vector4w :x 54 :y 42 :z 26) + (new 'static 'vector4w :x 54 :y 42 :z 26) + (new 'static 'vector4w :x 54 :y 42 :z 26) + (new 'static 'vector4w :x 54 :y 42 :z 26) + (new 'static 'vector4w :x 72 :y 48 :z 34) + (new 'static 'vector4w :x 72 :y 48 :z 34) + (new 'static 'vector4w :x 90 :y 56 :z 44) + (new 'static 'vector4w :x #x7e :y 64 :z 64) + ) + :scanline #x60 + ) + ) + +(defmethod draw-scan-and-line ((this hud-box) (arg0 dma-buffer) (arg1 float)) + (let ((v1-0 *hud-sprite-work*)) + (set! (-> v1-0 line-color a) (the int (* 3.0 arg1))) + (let ((a2-1 (the int (* 64.0 arg1)))) + (dotimes (a3-4 15) + (set! (-> v1-0 scan-colors a3-4 w) a2-1) + ) + ) + (let* ((a2-6 (* (+ (the int (-> this box min x)) 1792) 16)) + (a3-7 (* (+ (the int (-> this box max x)) 1792) 16)) + (t0-9 (* (+ (the int (-> this box min y)) 1840) 16)) + (t2-0 (the int (- (-> this box max y) (-> this box 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)) + ) + ;; og:preserve-this divide by zero guard + (set! (-> v1-0 scanline) (mod-0-guard (+ (-> v1-0 scanline) 6) (the-as uint t2-0))) + (let ((t3-6 (the-as (inline-array vector4w) (-> arg0 base)))) + (set! (-> t3-6 0 quad) (-> v1-0 scan-tmpl dma-vif quad)) + (set! (-> t3-6 1 quad) (-> v1-0 scan-tmpl quad 1)) + ) + (&+! (-> arg0 base) 32) + (let ((a0-2 (+ (the int (-> this box min y)) 1840))) + (dotimes (t3-9 32) + (let ((t4-8 (the-as object (-> arg0 base))) + ;; og:preserve-this divide by zero guard + (t5-13 (* (+ a0-2 (mod-0-guard (+ (-> v1-0 scanline) (* t3-9 2)) (the-as uint t2-0))) 16)) + (t6-6 (* (+ a0-2 (mod-0-guard (the-as uint (+ (* t3-9 2) 1 (-> v1-0 scanline))) (the-as uint t2-0))) 16)) + ) + (set! (-> (the-as (pointer uint128) t4-8)) (-> v1-0 scan-colors t3-9 quad)) + (let ((t7-4 (the-as (inline-array vector4w) (-> (the-as (inline-array vector4w) t4-8) 1)))) + (set! (-> t7-4 0 x) a2-6) + (set! (-> t7-4 0 y) t5-13) + (set! (-> t7-4 0 z) 0) + (set! (-> t7-4 0 w) 0) + ) + (let ((t7-5 (the-as (inline-array vector4w) (-> (the-as (inline-array vector4w) t4-8) 2)))) + (set! (-> t7-5 0 x) a3-7) + (set! (-> t7-5 0 y) t5-13) + (set! (-> t7-5 0 z) 0) + (set! (-> t7-5 0 w) 0) + ) + (let ((t5-14 (the-as (inline-array vector4w) (-> (the-as (inline-array vector4w) t4-8) 3)))) + (set! (-> t5-14 0 x) a2-6) + (set! (-> t5-14 0 y) t6-6) + (set! (-> t5-14 0 z) 0) + (set! (-> t5-14 0 w) 0) + ) + (let ((t4-9 (the-as (inline-array vector4w) (-> (the-as (inline-array vector4w) t4-8) 4)))) + (set! (-> t4-9 0 x) a3-7) + (set! (-> t4-9 0 y) t6-6) + (set! (-> t4-9 0 z) 0) + (set! (-> t4-9 0 w) 0) + ) + ) + (set! (-> arg0 base) (the-as pointer (-> (the-as (inline-array vector4w) (-> arg0 base)) 5))) + ) + ) + (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 object (-> arg0 base)))) + (set! (-> (the-as (inline-array vector4w) t2-7) 0 quad) (-> v1-0 line-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) t2-7) 1 quad) (-> v1-0 line-tmpl quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) t2-7) 2) a2-6 t0-9 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) t2-7) 3) a3-7 t0-9 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) t2-7) 4) a2-6 (+ t0-9 16) #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) t2-7) 5) a3-7 (+ t0-9 16) #xffffff 0) + ) + (&+! (-> arg0 base) 96) + (+! t0-9 64) + ) + ) + ) + 0 + ) + +(defmethod draw ((this hud-sprite) (arg0 dma-buffer) (arg1 level) (arg2 symbol)) + (local-vars + (v1-9 uint128) + (a1-5 int) + (a2-13 int) + (a3-2 int) + (t0-0 int) + (t1-0 int) + (t2-0 int) + (t3-0 int) + (t4-0 int) + ) + (set! arg2 (or (not (get-screen-copied *blit-displays-work*)) arg2)) + (when arg2 + (let ((s4-1 *hud-sprite-work*) + (s3-0 (the-as object (-> this tid))) + (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 (the-as texture-id s3-0) + (when arg1 + (let ((v1-8 (-> arg1 texture-mask 8 mask quad)) + (a0-4 (-> (the-as texture s3-0) masks data 0 mask quad)) + ) + (.por v1-9 v1-8 a0-4) + ) + (set! (-> arg1 texture-mask 8 mask quad) v1-9) + ) + (let ((s2-1 (the-as object (-> arg0 base)))) + (set! (-> (the-as (inline-array vector4w) s2-1) 0 quad) (-> s4-1 adgif-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) s2-1) 1 quad) (-> s4-1 adgif-tmpl quad 1)) + (adgif-shader<-texture-simple! (the-as adgif-shader (&+ (the-as pointer s2-1) 32)) (the-as texture s3-0)) + (cond + ((logtest? (-> this flags) (hud-sprite-flags hsf4)) + (set! (-> (the-as (pointer uint64) (&+ (the-as pointer s2-1) 32)) 8) (the-as uint 72)) + ) + ((logtest? (-> this flags) (hud-sprite-flags hsf5)) + (set! (-> (the-as (pointer uint64) (&+ (the-as pointer s2-1) 32)) 8) (the-as uint 66)) + ) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-22 (the-as object (-> arg0 base))) + (a1-2 + (the int + (* f30-0 (the float (-> (the-as texture s3-0) w)) (-> this scale-x) (-> *video-params* relative-x-scale)) + ) + ) + (a3-1 (the int (* -1.0 (-> this scale-x) (the float (-> (the-as texture s3-0) w)) f28-0))) + (t5-0 + (the int + (* f28-0 (the float (-> (the-as texture s3-0) h)) (-> this scale-y) (-> *video-params* relative-x-scale)) + ) + ) + (t6-0 (the int (* f30-0 (the float (-> (the-as texture s3-0) h)) (-> this scale-y)))) + (a0-16 (if (nonzero? (-> this pos z)) + (-> this pos z) + #xffffff + ) + ) + ) + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + (cond + ((logtest? (-> this flags) (hud-sprite-flags hsf2)) + (set! t2-0 (+ (-> this pos x) 1792)) + (set! t3-0 (+ (-> this pos y) 1840)) + (set! a2-13 (- t2-0 a1-2)) + (set! t4-0 (- t3-0 a3-1)) + (set! t0-0 (+ (- t2-0 a1-2) t5-0)) + (set! t1-0 (+ (- t3-0 a3-1) t6-0)) + (set! a1-5 (+ t2-0 t5-0)) + (set! a3-2 (+ t3-0 t6-0)) + ) + ((logtest? (-> this flags) (hud-sprite-flags hsf3)) + (set! a2-13 (+ (- 1792 (the int (* 0.5 (the float (+ a1-2 t5-0))))) (-> this pos x))) + (set! t4-0 (+ (- 1840 (the int (* 0.5 (the float (+ a3-1 t6-0))))) (-> this pos y))) + (set! t2-0 (+ a2-13 a1-2)) + (set! t3-0 (+ t4-0 a3-1)) + (set! t0-0 (+ a2-13 t5-0)) + (set! t1-0 (+ t4-0 t6-0)) + (set! a1-5 (+ a2-13 a1-2 t5-0)) + (set! a3-2 (+ t4-0 a3-1 t6-0)) + ) + (else + (set! a2-13 (+ (-> this pos x) 1792)) + (set! t4-0 (+ (-> this pos y) 1840)) + (set! t2-0 (+ a2-13 a1-2)) + (set! t3-0 (+ t4-0 a3-1)) + (set! t0-0 (+ a2-13 t5-0)) + (set! t1-0 (+ t4-0 t6-0)) + (set! a1-5 (+ a2-13 a1-2 t5-0)) + (set! a3-2 (+ t4-0 a3-1 t6-0)) + ) + ) + (set! (-> (the-as (inline-array vector4w) v1-22) 0 quad) (-> s4-1 draw-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-22) 1 quad) (-> s4-1 draw-tmpl quad 1)) + (set! (-> (the-as (inline-array vector4w) v1-22) 2 quad) (-> this color quad)) + (set! (-> (the-as (inline-array vector4w) v1-22) 5 quad) (-> this color quad)) + (set! (-> (the-as (inline-array vector4w) v1-22) 8 quad) (-> this color quad)) + (set! (-> (the-as (inline-array vector4w) v1-22) 11 quad) (-> this color quad)) + (let ((f0-31 (if (logtest? (-> this flags) (hud-sprite-flags hsf0)) + 1.0 + 0.0 + ) + ) + (f1-13 (if (logtest? (-> this flags) (hud-sprite-flags hsf1)) + 1.0 + 0.0 + ) + ) + ) + (let ((t5-16 (the-as (inline-array vector) (&+ (the-as pointer v1-22) 48)))) + (set! (-> t5-16 0 x) f0-31) + (set! (-> t5-16 0 y) f1-13) + (set! (-> t5-16 0 z) 1.0) + (set! (-> t5-16 0 w) 0.0) + ) + (let ((t5-17 (the-as object (&+ (the-as pointer v1-22) 96)))) + (set! (-> (the-as (inline-array vector) t5-17) 0 x) (- 1.0 f0-31)) + (set! (-> (the-as (inline-array vector) t5-17) 0 y) f1-13) + (set! (-> (the-as (inline-array vector) t5-17) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) t5-17) 0 w) 0.0) + ) + (let ((t5-18 (the-as (inline-array vector) (&+ (the-as pointer v1-22) 144)))) + (set! (-> t5-18 0 x) f0-31) + (set! (-> t5-18 0 y) (- 1.0 f1-13)) + (set! (-> t5-18 0 z) 1.0) + (set! (-> t5-18 0 w) 0.0) + ) + (let ((t5-19 (the-as object (&+ (the-as pointer v1-22) 192)))) + (set! (-> (the-as (inline-array vector) t5-19) 0 x) (- 1.0 f0-31)) + (set! (-> (the-as (inline-array vector) t5-19) 0 y) (- 1.0 f1-13)) + (set! (-> (the-as (inline-array vector) t5-19) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) t5-19) 0 w) 0.0) + ) + ) + (let ((t5-20 (the-as object (&+ (the-as pointer v1-22) 64)))) + (set! (-> (the-as (inline-array vector4w) t5-20) 0 x) (* a2-13 16)) + (set! (-> (the-as (inline-array vector4w) t5-20) 0 y) (* t4-0 16)) + (set! (-> (the-as (inline-array vector4w) t5-20) 0 z) a0-16) + (set! (-> (the-as (inline-array vector4w) t5-20) 0 w) #x10000) + ) + (let ((a2-22 (the-as object (&+ (the-as pointer v1-22) 112)))) + (set! (-> (the-as (inline-array vector4w) a2-22) 0 x) (* t2-0 16)) + (set! (-> (the-as (inline-array vector4w) a2-22) 0 y) (* t3-0 16)) + (set! (-> (the-as (inline-array vector4w) a2-22) 0 z) a0-16) + (set! (-> (the-as (inline-array vector4w) a2-22) 0 w) #x10000) + ) + (let ((a2-23 (the-as object (&+ (the-as pointer v1-22) 160)))) + (set! (-> (the-as (inline-array vector4w) a2-23) 0 x) (* t0-0 16)) + (set! (-> (the-as (inline-array vector4w) a2-23) 0 y) (* t1-0 16)) + (set! (-> (the-as (inline-array vector4w) a2-23) 0 z) a0-16) + (set! (-> (the-as (inline-array vector4w) a2-23) 0 w) #x10000) + ) + (let ((v1-23 (the-as object (&+ (the-as pointer v1-22) 208)))) + (set! (-> (the-as (inline-array vector4w) v1-23) 0 x) (* a1-5 16)) + (set! (-> (the-as (inline-array vector4w) v1-23) 0 y) (* a3-2 16)) + (set! (-> (the-as (inline-array vector4w) v1-23) 0 z) a0-16) + (set! (-> (the-as (inline-array vector4w) v1-23) 0 w) #x10000) + ) + ) + (&+! (-> arg0 base) 224) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs object. +;; og:preserve-this +;; (defmethod hud-sprite-method-10 ((this hud-sprite) (arg0 dma-buffer) (arg1 level) (arg2 int) (arg3 int) (arg4 int) (arg5 int)) +;; (local-vars +;; (a0-4 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 (the-as object (-> this tid))) +;; (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 (the-as texture-id s0-0) +;; (when sv-16 +;; (let ((v1-8 (-> sv-16 texture-mask 8 mask quad)) +;; (a0-3 (-> (the-as texture s0-0) masks data 0 mask quad)) +;; ) +;; (.por a0-4 v1-8 a0-3) +;; ) +;; (set! (-> sv-16 texture-mask 8 mask quad) a0-4) +;; ) +;; (let ((v1-10 (the-as object (-> arg0 base)))) +;; (set! (-> (the-as (inline-array vector4w) v1-10) 0 quad) (-> sv-32 adgif-tmpl dma-vif quad)) +;; (set! (-> (the-as (inline-array vector4w) v1-10) 1 quad) (-> sv-32 adgif-tmpl quad 1)) +;; (adgif-shader<-texture-simple! +;; (the-as adgif-shader (-> (the-as (inline-array vector4w) v1-10) 2)) +;; (the-as texture s0-0) +;; ) +;; ) +;; (&+! (-> arg0 base) 112) +;; (let ((v1-13 (the-as object (-> 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) (hud-sprite-flags hsf2)) +;; (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) (hud-sprite-flags hsf3)) +;; (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 (inline-array vector4w) v1-13) 0 quad) (-> sv-32 draw-tmpl dma-vif quad)) +;; (set! (-> (the-as (inline-array vector4w) v1-13) 1 quad) (-> sv-32 draw-tmpl quad 1)) +;; (set! (-> (the-as (inline-array vector4w) v1-13) 2 quad) (-> this color quad)) +;; (set! (-> (the-as (inline-array vector4w) v1-13) 5 quad) (-> this color quad)) +;; (set! (-> (the-as (inline-array vector4w) v1-13) 8 quad) (-> this color quad)) +;; (set! (-> (the-as (inline-array vector4w) v1-13) 11 quad) (-> this color quad)) +;; (let* ((t5-3 (-> (the-as texture s0-0) w)) +;; (t4-13 (-> (the-as texture 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) (hud-sprite-flags hsf0)) +;; (let ((f4-0 f0-55)) +;; (set! f0-55 f1-28) +;; (set! f1-28 f4-0) +;; ) +;; ) +;; (when (logtest? (-> this flags) (hud-sprite-flags hsf1)) +;; (set! f2-3 (the-as float f3-2)) +;; (set! f3-2 (gpr->fpr t5-3)) +;; ) +;; (set-vector! (-> (the-as (inline-array vector) v1-13) 3) f0-55 (the-as float f3-2) 1.0 0.0) +;; (set-vector! (-> (the-as (inline-array vector) v1-13) 6) f1-28 (the-as float f3-2) 1.0 0.0) +;; (set-vector! (-> (the-as (inline-array vector) v1-13) 9) f0-55 f2-3 1.0 0.0) +;; (set-vector! (-> (the-as (inline-array vector) v1-13) 12) f1-28 f2-3 1.0 0.0) +;; ) +;; (set-vector! +;; (-> (the-as (inline-array vector) v1-13) 4) +;; (the-as float (* a1-14 16)) +;; (the-as float (* a2-1 16)) +;; (the-as float a0-14) +;; (the-as float #x10000) +;; ) +;; (set-vector! +;; (-> (the-as (inline-array vector) v1-13) 7) +;; (the-as float (* a3-1 16)) +;; (the-as float (* t2-1 16)) +;; (the-as float a0-14) +;; (the-as float #x10000) +;; ) +;; (set-vector! +;; (-> (the-as (inline-array vector) v1-13) 10) +;; (the-as float (* t3-0 16)) +;; (the-as float (* t6-0 16)) +;; (the-as float a0-14) +;; (the-as float #x10000) +;; ) +;; (set-vector! +;; (-> (the-as (inline-array vector) v1-13) 13) +;; (the-as float (* t1-3 16)) +;; (the-as float (* t0-3 16)) +;; (the-as float a0-14) +;; (the-as float #x10000) +;; ) +;; ) +;; (&+! (-> arg0 base) 224) +;; ) +;; ) +;; ) +;; 0 +;; ) + +(defmethod draw-box-prim-only ((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 ((t1-0 *hud-sprite-work*) + (v1-3 (the-as object (-> arg0 base))) + (a2-8 (* (+ (the int (-> this box min x)) 1792) 16)) + (t0-0 (* (+ (the int (-> this box max x)) 1792) 16)) + (a3-13 (* (+ (the int (-> this box min y)) 1840) 16)) + ) + (let ((t2-2 (* (+ (the int (-> this box max y)) 1840) 16))) + (set! (-> (the-as (inline-array vector4w) v1-3) 0 quad) (-> t1-0 box-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-3) 1 quad) (-> t1-0 box-tmpl quad 1)) + (set! (-> (the-as (inline-array vector4w) v1-3) 2 quad) (-> this color quad)) + (set-vector! (-> (the-as (inline-array vector4w) v1-3) 3) a2-8 a3-13 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) v1-3) 4) t0-0 a3-13 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) v1-3) 5) t0-0 t2-2 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) v1-3) 6) a2-8 t2-2 #xffffff 0) + ) + (let ((v1-4 (the-as object (-> (the-as (inline-array vector4w) v1-3) 7)))) + (set! (-> (the-as (inline-array vector4w) v1-4) 0 x) a2-8) + (set! (-> (the-as vector4w v1-4) y) a3-13) + (set! (-> (the-as vector4w v1-4) z) #xffffff) + (set! (-> (the-as vector4w v1-4) w) 0) + ) + ) + (&+! (-> arg0 base) 128) + 0 + (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 #x2 :d #x1)) + ) + (let ((t0-0 *hud-sprite-work*) + (v1-3 (the-as (inline-array vector4w) (-> arg0 base))) + (a2-8 (* (+ (the int (-> this box min x)) 1792) 16)) + (a3-11 (* (+ (the int (-> this box max x)) 1792) 16)) + (t2-0 (* (+ (the int (-> this box min y)) 1840) 16)) + (t1-4 (* (+ (the int (-> this box 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) + (dma-buffer-add-gs-set arg0 (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))) + 0 + (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 box min x)) 1792) 16)) + (a3-11 (* (+ (the int (-> this box max x)) 1792) 16)) + (t2-0 (* (+ (the int (-> this box min y)) 1840) 16)) + (t1-4 (* (+ (the int (-> this box 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) + (dma-buffer-add-gs-set arg0 (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))) + 0 + (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 box min x)) 1792) 16)) + (a3-11 (* (+ (the int (-> this box max x)) 1792) 16)) + (t2-0 (* (+ (the int (-> this box min y)) 1840) 16)) + (t1-4 (* (+ (the int (-> this box 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) + ) + +;; 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)) + ) + +(defmethod draw ((this hud)) + (when (not (hidden? this)) + (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-hud-alpha) + ) + (dotimes (s3-0 30) + (if (and (-> this sprites s3-0 tid) (!= (-> this sprites s3-0 scale-x) 0.0)) + (draw (-> this sprites s3-0) s4-0 (-> this level) #f) + ) + ) + (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 x))) + (set-vector! + (-> s3-1 origin) + (the float (-> this strings s2-0 pos x)) + (the float (-> this strings s2-0 pos y)) + (the float (-> this strings s2-0 pos z)) + 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)) + (set-context! *font-work* s3-1) + (draw-string (-> this strings s2-0 text) s4-0 s3-1) + ) + ) + ) + ) + (dotimes (s5-1 2) + (when (-> this icons s5-1 icon) + (set-vector! + (-> this icons s5-1 icon 0 root scale) + (* (-> this icons s5-1 scale-x) (-> *video-params* relative-x-scale)) + (-> this icons s5-1 scale-y) + (* (-> this icons s5-1 scale-x) (-> *video-params* relative-x-scale)) + 1.0 + ) + (if (get-horizontal-flip-flag *blit-displays-work*) + (set! (-> this icons s5-1 icon 0 root trans x) (the float (- 256 (-> this icons s5-1 pos x)))) + (set! (-> this icons s5-1 icon 0 root trans x) (the float (+ (-> this icons s5-1 pos x) -256))) + ) + (set! (-> this icons s5-1 icon 0 root trans y) (the float (* (+ (-> this icons s5-1 pos y) -208) 2))) + (set! (-> this icons s5-1 icon 0 root trans z) (the float (-> this icons s5-1 pos z))) + ) + ) + ) + 0 + (none) + ) + +(defmethod update-value-callback ((this hud) (arg0 int) (arg1 int)) + 0 + (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 (or (and (logtest? (-> this values s4-0 flags) 1) (< (-> this values s4-0 current) (-> this values s4-0 target))) + (and (logtest? (-> this values s4-0 flags) 2) (< (-> this values s4-0 target) (-> this values s4-0 current))) + ) + (!= (-> this values s4-0 current) -1) + ) + (when (not (hidden? this)) + (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-42 (abs (- (-> this values s4-0 current) (-> this values s4-0 target)))) + (s3-0 1) + ) + (cond + ((and (logtest? (-> this values s4-0 flags) 8) (>= v1-42 (* (the-as uint 100) (-> this values s4-0 inc-unit)))) + (set! s3-0 (the-as int (* (the-as uint (the-as int 100)) (-> this values s4-0 inc-unit)))) + ) + ((and (logtest? (-> this values s4-0 flags) 4) (>= v1-42 (* (the-as uint 10) (-> this values s4-0 inc-unit)))) + (set! s3-0 (the-as int (* (the-as uint (the-as int 10)) (-> this values s4-0 inc-unit)))) + ) + ((>= v1-42 (the-as int (-> this values s4-0 inc-unit))) + (set! s3-0 (the-as int (-> this values s4-0 inc-unit))) + ) + ) + (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) (-> this values s4-0 inc-time)) + ) + ) + ) + (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-63 (-> *cpad-list* cpads 0))) + (logtest? (logclear (pad-buttons l3) (-> a0-63 button0-abs 0)) + (logior (-> a0-63 button0-abs 2) (-> a0-63 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) + ) + ) + +(defmethod init-callback ((this hud)) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs object. +(defmethod event-callback ((this hud) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + #f + ) + +(defmethod hud-method-19 ((this hud)) + 0 + (none) + ) + +(defmethod hud-method-20 ((this hud)) + 0 + (none) + ) + +(defmethod hud-method-21 ((this hud)) + 0 + (none) + ) + +(defmethod hud-method-22 ((this hud)) + 0 + (none) + ) + +(defmethod hidden? ((this hud)) + (and (-> this next-state) (= (-> this next-state name) 'hud-hidden)) + ) + +;; 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 + :name "manipy" + :to arg0 + :stack-size #x20000 + ) + ) + ) + (the-as + (pointer manipy) + (when (and s4-0 (nonzero? (-> (the-as process-drawable (-> s4-0 0)) draw))) + (set! (-> (the-as manipy (-> 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 + ) + ) + ) + ) + +(defmethod alloc-string-if-needed ((this hud) (arg0 int)) + (if (not (-> this strings arg0 text)) + (set! (-> this strings arg0 text) (new 'process 'string 64 (the-as string #f))) + ) + 0 + (none) + ) + +(defbehavior hud-hidden-event-handler hud ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-1 object)) + (case arg2 + (('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 + ) + (('ready) + (dotimes (v1-27 8) + (if (and (logtest? (-> self values v1-27 flags) 3) + (or (zero? (-> self values v1-27 counter)) (= (-> self values v1-27 target) (-> self values v1-27 current))) + ) + (set! (-> self values v1-27 counter) (if (= (-> arg3 param 0) -1) + (-> self values v1-27 inc-time) + (-> arg3 param 0) + ) + ) + ) + ) + #f + ) + (else + (event-callback self arg0 arg1 arg2 arg3) + ) + ) + ) + +(defstate hud-hidden (hud) + :event hud-hidden-event-handler + :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) + ) + ) + +(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) + ) + ) + ) + +(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) + ) + +(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) + ) + +(defbehavior hud-init-by-other hud () + (add-connection *hud-engine* self #f self (-> self type symbol) #f) + (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 flags) (hud-flags)) + (set-time! (-> self last-hide-time)) + (set! (-> self offset) 1.0) + (dotimes (v1-16 14) + (set! (-> self strings v1-16 text) #f) + (set! (-> self strings v1-16 scale) 1.0) + (set! (-> self strings v1-16 color) (font-color white)) + (set! (-> self strings v1-16 flags) (font-flags shadow kerning large)) + (set! (-> self strings v1-16 pos x) 0) + (set! (-> self strings v1-16 pos z) #xfffffff) + (set! (-> self strings v1-16 pos w) 0) + ) + (dotimes (v1-19 30) + (let ((a0-17 (&+ (-> self sprites 0 color-ptr) (* v1-19 64)))) + (set! (-> a0-17 0) 128) + (set! (-> a0-17 1) 128) + (set! (-> a0-17 2) 128) + (set! (-> a0-17 3) 128) + ) + (set! (-> self sprites v1-19 pos z) #xffffff) + (set! (-> self sprites v1-19 pos w) 0) + (set! (-> self sprites v1-19 scale-x) 1.0) + (set! (-> self sprites v1-19 scale-y) 1.0) + (set! (-> self sprites v1-19 angle) 0.0) + (set! (-> self sprites v1-19 flags) (hud-sprite-flags)) + (set! (-> self sprites v1-19 tid) (the-as texture-id #f)) + ) + (dotimes (v1-22 2) + (set! (-> self icons v1-22 icon) (the-as (pointer manipy) #f)) + (set! (-> self icons v1-22 pos z) 1024) + (set! (-> self icons v1-22 scale-x) 1.0) + (set! (-> self icons v1-22 scale-y) 1.0) + ) + (dotimes (v1-25 8) + (set! (-> self values v1-25 current) -1) + (set! (-> self values v1-25 target) 0) + ) + (init-callback self) + (set! (-> self event-hook) hud-hidden-event-handler) + (go hud-hidden) + ) + +(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) + ) + +(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) + ) + +(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) + ) + +(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) + ) + +(defun ready-hud ((arg0 symbol) (arg1 int)) + (when (and *target* (or (not *progress-process*) (gone? (-> *progress-process* 0)))) + (let ((v1-7 (-> *hud-engine* alive-list next0))) + *hud-engine* + (let ((s4-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)) 'ready arg1) + ) + (set! v1-7 s4-0) + *hud-engine* + (set! s4-0 (-> s4-0 next0)) + ) + ) + ) + ) + 0 + (none) + ) + +(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 + ) + +(defun set-hud-piece-position! ((arg0 hud-sprite) (arg1 int) (arg2 int)) + (set! (-> arg0 pos x) arg1) + (set! (-> arg0 pos y) arg2) + 0 + (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/goal_src/jak3/engine/ui/minimap-h.gc b/goal_src/jak3/engine/ui/minimap-h.gc index 1a48d059a5..9762975aef 100644 --- a/goal_src/jak3/engine/ui/minimap-h.gc +++ b/goal_src/jak3/engine/ui/minimap-h.gc @@ -213,17 +213,20 @@ (palace-ruins 176) ) +(declare-type minimap-class-node structure) +(define-extern *minimap-class-list* (inline-array minimap-class-node)) + ;; DECOMP BEGINS (deftype minimap-table-entry (structure) ((corner vector :inline) - (level-name basic) - (tex-name basic) + (level-name symbol) + (tex-name string) (meters-per-texel float) (pos-scale float) (min-inv-scale float) (max-inv-scale float) - (switch-immediate basic) + (switch-immediate symbol) ) ) @@ -231,14 +234,14 @@ (deftype minimap-class-node (structure) ((default-position vector :inline) (flags minimap-flag) - (name basic) + (name string) (icon-xy vector2ub :inline) (class minimap-class) (scale float) (color rgba) ) (:methods - (minimap-class-node-method-9 () none) + (minimap-class-node-method-9 (_type_) symbol) ) ) @@ -277,7 +280,7 @@ ) (:methods (get-distance-with-path (_type_ vector vector) float) - (minimap-trail-method-10 () none) + (reset (_type_) none) ) ) @@ -329,25 +332,25 @@ (frustum-alpha float) ) (:methods - (minimap-method-9 () none) + (debug-draw (_type_) none) (get-trail-for-connection (_type_ connection-minimap symbol) minimap-trail) - (minimap-method-11 () none) + (get-icon-draw-pos (_type_ connection-minimap minimap-trail vector float vector) symbol) (add-icon! (_type_ process uint int vector int) connection-minimap) - (minimap-method-13 () none) - (minimap-method-14 () none) - (minimap-method-15 () none) - (minimap-method-16 () none) - (minimap-method-17 () none) - (minimap-method-18 () none) - (minimap-method-19 () none) - (minimap-method-20 () none) - (minimap-method-21 () none) - (minimap-method-22 () none) - (minimap-method-23 () none) - (minimap-method-24 () none) - (minimap-method-25 () none) - (minimap-method-26 () none) - (minimap-method-27 () none) + (free-trail-by-connection (_type_ connection-minimap) none) + (update-trails (_type_) none) + (draw-1 (_type_ dma-buffer vector4w symbol) none) + (draw-connection (_type_ minimap-draw-work connection-minimap) none) + (draw-frustum-1 (_type_ minimap-draw-work connection-minimap) none) + (draw-frustum-2 (_type_ minimap-draw-work connection-minimap) none) + (sub-draw-1-2 (_type_ minimap-draw-work) none) + (update! (_type_) symbol) + (sub-draw-1-1 (_type_ minimap-draw-work) none) + (set-color (_type_ vector) none) + (draw-racer-2 (_type_ minimap-draw-work connection-minimap) none) + (draw-sprite2 (_type_ dma-buffer vector4w symbol) none) + (set-race-texture (_type_ texture float level) none) + (draw-racer-1 (_type_ minimap-draw-work connection-minimap float float float) none) + (set-race-corner (_type_ float float) none) ) ) diff --git a/goal_src/jak3/engine/ui/minimap.gc b/goal_src/jak3/engine/ui/minimap.gc index eae3f77a1a..8c097f24d2 100644 --- a/goal_src/jak3/engine/ui/minimap.gc +++ b/goal_src/jak3/engine/ui/minimap.gc @@ -7,3 +7,3924 @@ ;; DECOMP BEGINS +(deftype minimap-texture-name-array (structure) + ((data string 35) + ) + ) + + +(deftype minimap-corner-array (structure) + ((data vector 35 :inline) + ) + ) + + +(define *minimap-texture-name-array* + (new 'static 'minimap-texture-name-array :data (new 'static 'array string 35 + #f + #f + "map-stadium" + "map-ctyslumc" + #f + #f + "map-ctygena" + "map-ctygenb" + "map-ctyslumb" + #f + #f + "map-ctyfarma" + "map-ctygenc" + #f + "map-ctysluma" + #f + "map-ctymarka" + "map-ctypala" + "map-ctymarkb" + "map-ctyindb" + #f + "map-ctyfarmb" + "map-ctypalb" + #f + "map-ctyinda" + #f + "map-ctyporta" + "map-ctyportb" + "map-ctyportc" + #f + #f + "map-ctyportd" + "map-ctyporte" + "map-ctyportf" + #f + ) + ) + ) + +(define *minimap-corner-array* + (new 'static 'minimap-corner-array :data (new 'static 'inline-array vector 35 + (new 'static 'vector :x -4456448.0 :z -4456448.0 :w 1.0) + (new 'static 'vector :x -2883584.0 :z -4456448.0 :w 1.0) + (new 'static 'vector :x -1310720.0 :z -4456448.0 :w 1.0) + (new 'static 'vector :x 262144.0 :z -4456448.0 :w 1.0) + (new 'static 'vector :x 1835008.0 :z -4456448.0 :w 1.0) + (new 'static 'vector :x -4456448.0 :z -2883584.0 :w 1.0) + (new 'static 'vector :x -2883584.0 :z -2883584.0 :w 1.0) + (new 'static 'vector :x -1310720.0 :z -2883584.0 :w 1.0) + (new 'static 'vector :x 262144.0 :z -2883584.0 :w 1.0) + (new 'static 'vector :x 1835008.0 :z -2883584.0 :w 1.0) + (new 'static 'vector :x -4456448.0 :z -1310720.0 :w 1.0) + (new 'static 'vector :x -2883584.0 :z -1310720.0 :w 1.0) + (new 'static 'vector :x -1310720.0 :z -1310720.0 :w 1.0) + (new 'static 'vector :x 262144.0 :z -1310720.0 :w 1.0) + (new 'static 'vector :x 1835008.0 :z -1310720.0 :w 1.0) + (new 'static 'vector :x -4456448.0 :z 262144.0 :w 1.0) + (new 'static 'vector :x -2883584.0 :z 262144.0 :w 1.0) + (new 'static 'vector :x -1310720.0 :z 262144.0 :w 1.0) + (new 'static 'vector :x 262144.0 :z 262144.0 :w 1.0) + (new 'static 'vector :x 1835008.0 :z 262144.0 :w 1.0) + (new 'static 'vector :x -4456448.0 :z 1835008.0 :w 1.0) + (new 'static 'vector :x -2883584.0 :z 1835008.0 :w 1.0) + (new 'static 'vector :x -1310720.0 :z 1835008.0 :w 1.0) + (new 'static 'vector :x 262144.0 :z 1835008.0 :w 1.0) + (new 'static 'vector :x 1835008.0 :z 1835008.0 :w 1.0) + (new 'static 'vector :x -4456448.0 :z 3407872.0 :w 1.0) + (new 'static 'vector :x -2883584.0 :z 3407872.0 :w 1.0) + (new 'static 'vector :x -1310720.0 :z 3407872.0 :w 1.0) + (new 'static 'vector :x 262144.0 :z 3407872.0 :w 1.0) + (new 'static 'vector :x 1835008.0 :z 3407872.0 :w 1.0) + (new 'static 'vector :x -4456448.0 :z 4980736.0 :w 1.0) + (new 'static 'vector :x -2883584.0 :z 4980736.0 :w 1.0) + (new 'static 'vector :x -1310720.0 :z 4980736.0 :w 1.0) + (new 'static 'vector :x 262144.0 :z 4980736.0 :w 1.0) + (new 'static 'vector :x 1835008.0 :z 4980736.0 :w 1.0) + ) + ) + ) + +(define *minimap* (new 'static 'minimap + :draw-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #xa :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x908a400000008001 #x535353531) + ) + :draw2-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #xa :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x900a400000008001 #x525252521) + ) + :draw3-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #xa :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x90aa400000008001 #x535353531) + ) + :draw4-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #xa :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x902a400000008001 #x525252521) + ) + :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) + ) + :gif (new 'static 'array uint64 2 #x50ab400000008001 #x53531) + ) + :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) + ) + :gif (new 'static 'array uint64 2 #x1000000000008005 #xe) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) + :offset (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :last-name #f + :last-tex #f + :engine #f + :engine-key #x800 + :race-tex #f + :race-scale 16384.0 + :race-level #f + :sprite2-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) + ) + :gif (new 'static 'array uint64 2 #x502b400000008001 #x52521) + ) + :frustum-alpha 1.0 + ) + ) + +(kmemopen global "minimap-engines") + +(define *minimap-class-list* (new 'static 'inline-array minimap-class-node 177 + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag trail bigmap) + :name "none" + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 3190784.0 :y 32768.0 :z 765952.0 :w 1.0) + :flags (minimap-flag trail bigmap) + :name "onintent" + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 4505600.0 :z 4505600.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "vinroom" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x5)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 4197499.0 :y -34734.08 :z 4187750.5 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "sewer-kg" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 775413.75 :y 32727.04 :z -1279795.2 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "sewer-genb" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 3148021.8 :y 8847.36 :z -1200209.9 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "sewer-slumb" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -282624.0 :y 45056.0 :z 5464064.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "hiphog" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x3 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1465712.6 :y 36085.76 :z 5251563.5 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "gungame" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x5 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1843200.0 :y 34816.0 :z 5275648.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "gun-yellow" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x2)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :b #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9143050.0 :y 89169.92 :z 9106391.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "desert-nest-entrance" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x3)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :name "guard" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :name "parking-spot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :g #x40 :b #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag trail bigmap goal) + :name "goal" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "goal-no-trail" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "goal-no-trail-bigmap" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 3906355.2 :y 100352.0 :z 3732922.2 :w 1.0) + :flags (minimap-flag trail bigmap goal ctywide) + :name "cty-sniper-vicinity" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x4c :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -2105467.0 :y 118906.88 :z 3788431.2 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "forest" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x3 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6583542.0 :y 262021.12 :z -1945067.5 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "wascity-gungame" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x3 #x2)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1523712.0 :z 7372800.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only ctywide) + :name "city-transport" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x2)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 839680.0 :z 3756032.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "wascity-leaper-race" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x2)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6039716.0 :y 109895.68 :z -1498153.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "wascity-pre-game" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x5 #x2)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 10678272.0 :z 524288.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "desert-transport" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x2)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 86016.0 :z 7151616.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "waspal" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1458176.0 :z -1499136.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "stadium" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x2)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2895872.0 :z -1855488.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "wasteland-arena" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x3)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag frustum) + :name "guard-frustum" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9286615.0 :y 125091.84 :z 653434.9 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "wasdoors" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x3)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1843200.0 :y 34816.0 :z 5275648.0 :w 1.0) + :flags (minimap-flag trail bigmap) + :name "gun-dark" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x2)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :b #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 3137536.0 :y 34324.48 :z -2962923.5 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport desert) + :name "spargus-city" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x3 #x3)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag racer) + :name "racer" + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag racer) + :name "racer-target" + :scale 1.0 + :color (new 'static 'rgba :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag racer) + :name "racer-errol" + :scale 1.0 + :color (new 'static 'rgba :r #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 166871.05 :y 49192.96 :z -2900009.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "monk-temple" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x5 #x3)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 15650816.0 :y 149913.6 :z 2943385.5 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desd" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 3550003.2 :y 321126.4 :z 5485773.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desc" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 5525913.5 :y 369049.6 :z 3343564.8 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desa" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 12869222.0 :y 158105.6 :z 10319053.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desg" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 12833587.0 :y 79052.8 :z 14444954.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desh" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6352077.0 :y 331366.4 :z 7294976.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desc-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2684108.8 :y 63488.0 :z 10600858.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-dese" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 11691622.0 :y 116326.4 :z 674611.2 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desb" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6981632.0 :y 56115.2 :z 378470.4 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desa-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 832307.2 :y 185958.4 :z 6533529.5 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desc-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 12394496.0 :y 206438.4 :z 12609126.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desg-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 8704819.0 :y 148684.8 :z 5840896.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desd-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 11052646.0 :y 106086.4 :z 11750605.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desg-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 876134.4 :y 251494.4 :z 12136038.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-dese-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 556646.4 :y 184320.0 :z 15724134.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-dese-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 16105472.0 :y 54886.4 :z 5789696.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desd-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 15939994.0 :y 135168.0 :z 1683456.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desb-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9377382.0 :y 93798.4 :z 92160.0 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasa-1" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9970483.0 :y 93388.8 :z 104448.0 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasa-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 10326016.0 :y 131481.6 :z -862208.0 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasa-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9631334.0 :y 88473.6 :z -1377075.2 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasa-4" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 7608729.5 :y 109772.8 :z -1456128.0 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasb-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 7272038.5 :y 371507.2 :z -410828.8 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasb-1" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 5833523.0 :y 110592.0 :z -1670758.4 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasb-4" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6916915.0 :y 389939.2 :z -420659.2 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasb-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 12718080.0 :y 141312.0 :z 10554573.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desg-4" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6378701.0 :y 364134.4 :z -371507.2 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasb-5" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6380749.0 :y 156876.8 :z -1238630.4 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasb-6" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2466611.2 :y 372326.4 :z 2169241.5 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desa-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 8616755.0 :y 108953.6 :z -924876.8 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasa-5" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 11712922.0 :y 240435.2 :z 3998105.5 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desd-4" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 10091315.0 :y 263782.4 :z 3800678.5 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desd-5" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 4193894.5 :y 33177.6 :z 858521.6 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-sluma-1" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 792576.0 :y 33177.6 :z -570982.4 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-genb-1" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1705984.0 :y 8192.0 :z -1542963.2 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-slumb-1" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2126643.2 :y 8192.0 :z -919552.0 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-slumb-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 4290560.0 :y 411238.4 :z 7154483.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desc-4" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 3999744.0 :y 45465.6 :z 4032512.0 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-inda-1" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2407219.2 :y 394035.2 :z 9599795.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-dese-4" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6369689.5 :y 128204.8 :z 7754137.5 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desc-5" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 11148493.0 :y 130662.4 :z 1211596.8 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desb-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9161114.0 :y 140492.8 :z 355532.8 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasa-6" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6171853.0 :y 226508.8 :z -1021132.8 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasb-7" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 4068556.8 :y 45465.6 :z 2008678.4 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-indb-1" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 4970496.0 :y 108953.6 :z 13683098.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desf" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 86016.0 :y 44236.8 :z 7160217.5 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-port-1" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1570406.4 :y 45875.2 :z -1356185.6 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-genb-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1308672.0 :y 45056.0 :z -833536.0 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-genb-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 505036.8 :y 45465.6 :z -144588.8 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-genb-4" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1736294.4 :y 20480.0 :z -799129.6 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-slumb-4" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2141388.8 :y 7782.4 :z -1939865.6 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-slumc-1" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2992128.0 :y 315801.6 :z 13929677.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-dese-5" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2893824.0 :y 188006.4 :z 14871757.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-post-game" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2445721.5 :y 20070.4 :z -2903654.5 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-slumc-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 4145152.0 :y 45056.0 :z 1143193.6 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-sluma-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 3572121.5 :y 45056.0 :z 1372160.0 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-sluma-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 3889152.0 :y 45056.0 :z 1889075.2 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-indb-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 4385997.0 :y 45056.0 :z 2440396.8 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-indb-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 3716710.5 :y 45056.0 :z 3579494.5 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-inda-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 4198809.5 :y 45056.0 :z 4518297.5 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-inda-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 4687462.5 :y 45056.0 :z 4294246.5 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-inda-4" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 3675750.5 :y 32768.0 :z 4731289.5 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-inda-5" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2622750.8 :y 43950.08 :z 6559170.5 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-port-4" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1377894.4 :y 45056.0 :z 7051264.0 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-port-5" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -1053491.2 :y 45056.0 :z 6554419.0 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-port-6" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -27852.8 :y 43827.2 :z 5318656.0 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-port-7" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1216512.0 :y 45056.0 :z 5433344.0 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-port-8" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9130394.0 :y 122060.8 :z 3092480.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desb-4" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1542847.2 :y 196168.9 :z -4314233.0 :w 1.0) + :flags (minimap-flag bigmap goal) + :name "atoll-valve" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2277804.5 :y 217672.9 :z -4571725.5 :w 1.0) + :flags (minimap-flag bigmap goal) + :name "atoll-ashelin" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -3100565.5 :y 547275.56 :z 1190112.5 :w 1.0) + :flags (minimap-flag bigmap goal) + :name "mountain-lens" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -2833539.0 :y 496445.44 :z 11345.101 :w 1.0) + :flags (minimap-flag bigmap goal) + :name "mountain-shard" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -3448408.5 :y 567047.8 :z 1029759.4 :w 1.0) + :flags (minimap-flag bigmap goal) + :name "mountain-gear" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 4357507.5 :y 205120.72 :z -2286701.2 :w 1.0) + :flags (minimap-flag bigmap goal) + :name "ruins-hut" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -2575550.8 :y 156067.02 :z 3728844.8 :w 1.0) + :flags (minimap-flag bigmap goal) + :name "forest-samos" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :name "metalhead" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :b #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9633792.0 :y 32768.0 :z -1470464.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "kleever-arena" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9181552.0 :y 28517.172 :z -227204.7 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "seem-wascitya" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x2)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6039716.0 :y 109895.68 :z -1498153.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "seem-wascityb" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x2)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9279857.0 :y 126115.84 :z 725073.94 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "kleever-wasdoors" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9344532.0 :y 126484.48 :z 712171.5 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "damus-wasdoors" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x3)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 8197611.5 :y 1009336.3 :z -1705738.2 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "damus-waspal" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x3)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9527296.0 :y 225280.0 :z -1642496.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "damus-arena" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x3)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6533816.5 :y 86671.36 :z -1681449.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "kleever-wascityb" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "red-clamped-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :name "tiny-red-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 0.5 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 16954164.0 :y 495984.62 :z 17066476.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "desert-temple" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x5 #x3)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2539761.8 :y 74191.26 :z 10381844.0 :w 1.0) + :flags (minimap-flag clamp bigmap local-only transport wasall) + :name "desert-oasis" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x2)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 12359188.0 :y 90439.68 :z 11306598.0 :w 1.0) + :flags (minimap-flag clamp bigmap local-only transport wasall) + :name "desert-corral" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9344532.0 :y 126484.48 :z 712171.5 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "sig-wasdoors" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x3)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2669486.0 :y 14131.2 :z -2278359.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "freehq" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x5)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "green-clamped-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp trail bigmap) + :name "nest-cocoon" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp trail bigmap) + :name "nest-bridge" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 0.8 + :color (new 'static 'rgba :g #x40 :b #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2866749.5 :y 10117.12 :z -2174484.5 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "factory" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "big-orange-flashing-clamped-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x33 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "big-red-flashing-clamped-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "big-green-flashing-clamped-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "big-purple-flashing-clamped-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :g #x27 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag bigmap) + :name "medium-purple-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :g #x27 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "parked-vehicle" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1603706.9 :y 32522.24 :z -194478.08 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "samos-genb" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp flash) + :name "projectile" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 11540444.0 :y 91835.19 :z 956374.6 :w 1.0) + :flags (minimap-flag trail bigmap goal local-only transport wasall) + :name "desertb-race" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag trail bigmap goal) + :name "big-red-flashing-trail-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag trail bigmap goal) + :name "big-green-flashing-trail-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag frustum) + :name "robot-frustum" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6036357.0 :y 99532.8 :z 12370657.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "desert-marauder-village" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x3 #x5)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "gray-clamped-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :g #x40 :b #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -898404.4 :y 450727.94 :z -570347.1 :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "volcano-monk" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :g #x27 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 226181.53 :y -85.1968 :z 239582.4 :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "volcano-collapsing-rock" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -377453.78 :y 83010.766 :z 401777.88 :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "volcano-stone-lid" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -364009.06 :y 4519.936 :z -1827779.0 :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "volcano-dark-maker-idol" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :g #x27 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag bigmap) + :name "medium-green-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag bigmap goal) + :name "big-red-flashing-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "factory-clamped-target" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "factory-clamped-tower" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "desglide-ring-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "desglide-thermal-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -338150.6 :y 344064.0 :z -341446.25 :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "mine-elevator" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -1054895.8 :y 279489.75 :z -77204.69 :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "mine-armor" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "mine-sign-up" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "mine-sign-down" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1078071.8 :y 418296.62 :z -450073.4 :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "mine-door" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "ruins-elec-gate" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 791688.4 :y 92675.27 :z 1785077.8 :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "ruins-goal" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp) + :name "dp-bipedal" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp) + :name "neo-wasp" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "dark-maker" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :b #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 17319976.0 :y 488816.62 :z 16711188.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "templea-door" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 16893830.0 :y 187146.23 :z 17766400.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "templeb-watchers" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 17029612.0 :y 189808.64 :z 19156910.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "templeb-regen" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 16982508.0 :y 180674.56 :z 19045868.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "templeb-warpgate" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 16956294.0 :y 504422.4 :z 16792166.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only) + :name "templex-darkmaker" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :b #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 16744653.0 :y 181903.36 :z 17680548.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "temple-tests-door" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 16833126.0 :y 189808.64 :z 19508510.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "templeb-freeze" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 17827010.0 :y 317647.66 :z 18464536.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "temple-elev" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 386252.8 :y 1760583.6 :z 207462.4 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "factoryc-vehicle" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 17238630.0 :y 189808.64 :z 19509616.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "templeb-defend" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 17585848.0 :y 389857.28 :z 18208850.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only) + :name "templeb-seem" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x2)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 16891248.0 :y 182435.84 :z 17934050.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "temple-defend-door-1" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 0.5 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 17123000.0 :y 199475.2 :z 18286838.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "temple-defend-door-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 0.5 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 17571308.0 :y 181125.12 :z 19067166.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "temple-defend-door-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 0.5 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -592445.44 :y 20111.36 :z -1443553.2 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "palace-ruins" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + ) + ) + +(let ((gp-0 *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) + ) + ) + +(kmemclose) + +(defmethod debug-draw ((this minimap)) + (when *trail-graph* + (dotimes (s5-0 6) + (let ((s4-0 (-> this trail s5-0))) + (when (and (-> s4-0 used-by) + (>= (-> s4-0 node-count) 0) + (not (time-elapsed? (the-as int (-> s4-0 last-updated)) (seconds 5))) + ) + (let* ((a3-0 (target-pos 0)) + (v1-12 s5-0) + (t1-0 (cond + ((zero? v1-12) + *color-green* + ) + ((= v1-12 1) + *color-blue* + ) + ((= v1-12 2) + *color-white* + ) + ((= v1-12 3) + *color-red* + ) + (else + *color-magenta* + ) + ) + ) + ) + (trail-graph-method-16 + *trail-graph* + (-> s4-0 node-count) + (-> s4-0 node-id) + a3-0 + (-> s4-0 cached-info orig-goal-pos) + t1-0 + (* 1024.0 (the float s5-0)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count] +(defmethod update-trails ((this minimap)) + (let ((s5-0 *trail-graph*)) + (when s5-0 + (.mtc0 Count 0) + (let ((v1-1 0)) + (while (< (the-as uint v1-1) (the-as uint #x605a)) + (let ((v1-2 (-> s5-0 mode))) + (cond + ((= v1-2 1) + (trail-graph-method-31 s5-0 #x605a) + ) + ((zero? v1-2) + (let ((v1-5 -1)) + (let ((a0-5 0)) + (countdown (a1-1 6) + (let* ((a2-3 (-> this trail a1-1)) + (a3-0 (-> a2-3 used-by)) + ) + (when (and a3-0 (and (< 0.0 (-> a3-0 alpha)) (or (< v1-5 0) (< (the-as int (-> a2-3 last-updated)) a0-5)))) + (set! v1-5 a1-1) + (set! a0-5 (the-as int (-> a2-3 last-updated))) + ) + ) + ) + (let ((a1-5 (current-time))) + (if (or (< v1-5 0) (= a0-5 a1-5)) + (goto cfg-68) + ) + ) + ) + (let ((s4-0 (-> this trail v1-5)) + (s3-0 (the-as vector #f)) + ) + (let* ((v1-9 (-> s4-0 used-by)) + (s2-0 (the-as structure (-> v1-9 position))) + ) + (set! s3-0 (cond + ((= (the-as vector s2-0) #t) + (let* ((s2-1 (handle->process (-> v1-9 handle))) + (v1-13 (if (type? s2-1 process-drawable) + s2-1 + ) + ) + ) + (if v1-13 + (set! s3-0 (-> (the-as process-drawable v1-13) root trans)) + ) + ) + s3-0 + ) + ((and (= (logand (the-as int s2-0) 7) 4) (= (-> (the-as basic s2-0) type) entity-actor)) + (let* ((v1-19 (the-as structure s2-0)) + (s3-1 (if (the-as vector v1-19) + (-> (the-as entity-actor v1-19) extra process) + ) + ) + (v1-21 (if (type? s3-1 process-drawable) + s3-1 + ) + ) + ) + (if v1-21 + (set! s3-0 (-> (the-as process-drawable v1-21) root trans)) + (set! s3-0 (-> (the-as entity-actor s2-0) extra trans)) + ) + ) + s3-0 + ) + (else + (the-as vector s2-0) + ) + ) + ) + ) + (when s3-0 + (let* ((s2-2 s5-0) + (s1-0 (method-of-object s2-2 trail-graph-method-29)) + ) + (target-pos 0) + (-> s4-0 cached-info) + (s1-0 s2-2) + ) + (set! (-> s4-0 search-id) (-> s5-0 search-id)) + ) + ) + ) + ) + ((or (= v1-2 3) (= v1-2 2)) + (countdown (v1-33 6) + (let ((s4-1 (-> this trail v1-33))) + (when (and (= (-> s4-1 search-id) (-> s5-0 search-id)) (-> s4-1 used-by)) + (let* ((a0-29 s5-0) + (t9-5 (method-of-object a0-29 trail-graph-method-21)) + ) + (-> s4-1 node-id) + 64 + (&-> s4-1 goal-node-id) + (&-> s4-1 node-path-dist) + (set! (-> s4-1 node-count) (the-as int (t9-5 a0-29))) + ) + (set! (-> s4-1 last-updated) (the-as uint (current-time))) + (goto cfg-64) + ) + ) + ) + (label cfg-64) + (trail-graph-method-26 s5-0) + ) + ) + ) + (.mfc0 v1-1 Count) + ) + ) + (label cfg-68) + 0 + ) + ) + 0 + (none) + ) + +(defmethod get-trail-for-connection ((this minimap) (arg0 connection-minimap) (arg1 symbol)) + (local-vars (gp-0 minimap-trail)) + (countdown (v1-0 6) + (let ((a3-3 (-> this trail v1-0))) + (when (= (-> a3-3 used-by) arg0) + (set! gp-0 a3-3) + (goto cfg-14) + ) + ) + ) + (when arg1 + (dotimes (v1-4 6) + (let ((a3-7 (-> this trail v1-4))) + (when (not (-> a3-7 used-by)) + (set! (-> a3-7 used-by) arg0) + (set! gp-0 a3-7) + (goto cfg-14) + ) + ) + ) + ) + (set! gp-0 (the-as minimap-trail #f)) + (label cfg-14) + (if (and gp-0 arg1) + (reset gp-0) + ) + gp-0 + ) + +;; WARN: Function (method 13 minimap) has a return type of none, but the expression builder found a return statement. +(defmethod free-trail-by-connection ((this minimap) (arg0 connection-minimap)) + (countdown (v1-0 6) + (let ((a2-3 (-> this trail v1-0))) + (when (= (-> a2-3 used-by) arg0) + (set! (-> a2-3 used-by) #f) + (reset a2-3) + (return #f) + ) + ) + ) + 0 + (none) + ) + +(defmethod reset ((this minimap-trail)) + (set! (-> this node-count) -1) + (set! (-> this search-id) (the-as uint 0)) + (set! (-> this last-updated) (the-as uint 0)) + (set! (-> this cached-info goal-conn-id) -1) + (none) + ) + +(defmethod get-icon-draw-pos ((this minimap) (arg0 connection-minimap) (arg1 minimap-trail) (arg2 vector) (arg3 float) (arg4 vector)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'vector 4))) + (vector-reset! (-> s5-0 2)) + (vector-reset! (-> s5-0 1)) + (let ((s1-0 0)) + (while (>= (-> arg1 node-count) s1-0) + (set! (-> s5-0 0 quad) (-> s5-0 1 quad)) + (cond + ((< s1-0 (-> arg1 node-count)) + (trail-graph-method-20 *trail-graph* (-> arg1 node-id s1-0) (-> s5-0 1)) + (+! s1-0 1) + (vector-! (-> s5-0 1) (-> s5-0 1) arg2) + (set! (-> s5-0 1 x) (* (-> s5-0 1 x) arg3)) + (set! (-> s5-0 1 z) (* (-> s5-0 1 z) arg3)) + (set! (-> s5-0 1 y) 0.0) + (set! (-> s5-0 1 w) 1.0) + ) + (else + (vector-negate! (-> s5-0 1) arg4) + (+! s1-0 1) + ) + ) + (let ((v1-12 (-> s5-0 1))) + (when (>= (sqrtf (+ (* (-> v1-12 x) (-> v1-12 x)) (* (-> v1-12 z) (-> v1-12 z)))) 50.0) + (vector-! (-> s5-0 3) (-> s5-0 0) (-> s5-0 1)) + (let* ((f1-6 (ray-sphere-intersect (-> s5-0 1) (-> s5-0 3) (-> s5-0 2) 50.0)) + (f0-12 (fmax 0.0 (fmin 1.0 f1-6))) + ) + (vector-float*! arg4 (-> s5-0 3) f0-12) + ) + (vector+! arg4 arg4 (-> s5-0 1)) + (vector-negate! arg4 arg4) + (return #t) + ) + ) + ) + ) + ) + #f + ) + +(defmethod get-distance-with-path ((this minimap-trail) (arg0 vector) (arg1 vector)) + (local-vars (f30-1 float)) + 0.0 + (let ((s5-0 *trail-graph*)) + (cond + ((and s5-0 (> (-> this node-count) 0)) + (let ((f30-0 (-> this node-path-dist)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (trail-graph-method-20 s5-0 (-> this node-id 0) s3-0) + (set! f30-1 (+ f30-0 (vector-vector-xz-distance arg0 s3-0))) + (trail-graph-method-20 s5-0 (the-as uint (-> this goal-node-id)) s3-0) + ) + ) + (else + (set! f30-1 (vector-vector-xz-distance arg0 arg1)) + ) + ) + ) + f30-1 + ) + +(defmethod print ((this connection-minimap)) + (format + #t + "#" + (-> this class name) + (-> this flags) + (handle->process (-> this handle)) + this + ) + this + ) + + +(defmethod run-pending-updates! ((this engine-minimap) (arg0 time-frame)) + "Run updates if they scheduled. If something is found that has no pending update, kill it. + Note that we won't kill things on this call if they fail to update their `update-time`. + They will survive until the next call to `run-pending-updates`! + (or you can modify their `update-time` before that to prevent them from being killed.)" + (let ((s2-0 (&-> this alive-list)) + (s3-0 (-> this alive-list)) + ) + (while s3-0 + (let ((s4-0 (-> s3-0 next))) + ;; og:preserve-this not-yet-implemented check + (when (or (and (nonzero? *bigmap*) (bigmap-method-11 *bigmap*)) (not (paused?))) + (cond + ((logtest? (-> s3-0 flags) (minimap-flag fade-out)) + (logclear! (-> s3-0 flags) (minimap-flag fade-in)) + (seek! (-> s3-0 alpha) 0.0 (seconds-per-frame)) + ) + ((and (logtest? (-> s3-0 flags) (minimap-flag task-graph)) + (not (logtest? (-> *setting-control* user-current minimap) 32)) + ) + (logior! (-> s3-0 flags) (minimap-flag fade-in)) + (seek! (-> s3-0 alpha) 0.0 (seconds-per-frame)) + ) + ((logtest? (-> s3-0 flags) (minimap-flag fade-in)) + (let ((f30-0 1.0)) + (when (logtest? (-> s3-0 class flags) (minimap-flag trail)) + (let ((v1-29 (get-trail-for-connection *minimap* s3-0 #f))) + (if (or (not v1-29) (time-elapsed? (the-as int (-> v1-29 last-updated)) (seconds 5))) + (set! f30-0 0.0001) + ) + ) + ) + (seek! (-> s3-0 alpha) f30-0 (seconds-per-frame)) + ) + (if (= (-> s3-0 alpha) 1.0) + (logclear! (-> s3-0 flags) (minimap-flag fade-in)) + ) + ) + ) + ) + (cond + ((and (logtest? (-> s3-0 flags) (minimap-flag fade-out)) (= (-> s3-0 alpha) 0.0)) + (kill-callback this s3-0) + (set! (-> s2-0 0) (-> s3-0 next)) + (set! (-> s3-0 next) (-> this dead-list)) + (set! (-> this dead-list) s3-0) + (+! (-> this length) -1) + ) + ((and (handle->process (-> s3-0 handle)) + (not (and (= (logand (the-as int (-> s3-0 position)) 7) 4) + (= (-> (the-as entity-actor (-> s3-0 position)) type) entity-actor) + (logtest? (-> (the-as entity-actor (-> s3-0 position)) extra perm status) + (entity-perm-status dead subtask-complete bit-12) + ) + ) + ) + ) + (update-callback this) + (set! s2-0 (&-> s3-0 next)) + ) + (else + (logior! (-> s3-0 flags) (minimap-flag fade-out)) + (update-callback this) + (set! s2-0 (&-> s3-0 next)) + ) + ) + (set! s3-0 s4-0) + ) + ) + ) + (set! (-> this execute-time) arg0) + 0 + (none) + ) + +(defmethod add-icon! ((this minimap) (arg0 process) (arg1 uint) (arg2 int) (arg3 vector) (arg4 int)) + (when (not arg2) + (let ((v1-3 (+ (-> *minimap* engine-key) 1))) + (set! (-> *minimap* engine-key) v1-3) + (set! arg2 (the-as int v1-3)) + ) + ) + (let ((s3-0 (the-as connection-minimap (schedule-callback (-> this engine) arg2 0)))) + (let ((s2-1 (-> *minimap-class-list* arg1))) + (when s3-0 + (when (not (logtest? (-> s3-0 flags) (minimap-flag active))) + (set! (-> s3-0 class) s2-1) + (set! (-> s3-0 last-world-pos quad) (-> s2-1 default-position quad)) + (vector-! (-> s3-0 last-relative-pos) (target-pos 0) (-> s3-0 last-world-pos)) + (set! (-> s3-0 edge-ry) -131072) + ) + (set! (-> s3-0 handle) (process->handle arg0)) + (set! arg3 (cond + (arg3 + (empty) + arg3 + ) + (else + (-> s2-1 default-position) + ) + ) + ) + (set! (-> s3-0 position) arg3) + (set! (-> s3-0 flags) (minimap-flag active fade-in)) + (set! (-> s3-0 node) (the-as uint arg4)) + ) + ) + s3-0 + ) + ) + +;; WARN: Function (method 10 engine-minimap) has a return type of none, but the expression builder found a return statement. +(defmethod kill-callback ((this engine-minimap) (arg0 connection-pers)) + "Called when a connection is removed." + (if (not arg0) + (return #f) + ) + (if (logtest? (-> (the-as connection-minimap arg0) class flags) (minimap-flag trail)) + (free-trail-by-connection *minimap* (the-as connection-minimap arg0)) + ) + (set! (-> arg0 update-time) (the-as time-frame #f)) + ((method-of-type engine-pers kill-callback) this arg0) + (none) + ) + +(defun lookup-minimap-texture-by-name ((arg0 string) (arg1 string) (arg2 (pointer texture-page))) + (local-vars (sv-16 texture-page)) + (dotimes (s3-0 11) + (let ((s2-0 (-> *level* level s3-0))) + (when (or (= (-> s2-0 status) 'active) (= (-> s2-0 status) 'reserved)) + (set! sv-16 (-> s2-0 texture-page 8)) + (when (and sv-16 (or (not arg1) (string= (-> sv-16 name) arg1))) + (dotimes (s1-0 (-> sv-16 length)) + (let ((s0-0 (-> sv-16 data s1-0))) + (when (and s0-0 (string= (-> s0-0 name) arg0)) + (if arg2 + (set! (-> arg2 0) sv-16) + ) + (set! (-> s2-0 texture-mask 8 mask quad) (-> s0-0 masks data 0 mask quad)) + (return s0-0) + ) + ) + ) + ) + ) + ) + ) + (the-as texture #f) + ) + +(define *minimap-table-entry-array* (new 'static 'boxed-array :type minimap-table-entry + (new 'static 'minimap-table-entry + :corner (new 'static 'vector :x 5270364.0 :z -3660800.0) + :level-name 'waswide + :tex-name "map-wascity" + :meters-per-texel 22118.4 + :pos-scale 5662310.5 + :min-inv-scale 0.5 + :max-inv-scale 1.0 + :switch-immediate #t + ) + (new 'static 'minimap-table-entry + :corner (new 'static 'vector :x -2048000.0 :z -2338816.0) + :level-name 'desert + :tex-name "map-desert" + :meters-per-texel 40960.0 + :pos-scale 20971520.0 + :min-inv-scale 1.0 + :max-inv-scale 1.0 + :switch-immediate #f + ) + (new 'static 'minimap-table-entry + :corner (new 'static 'vector :x 5270364.0 :z -3660800.0) + :level-name 'wasdoors + :tex-name "map-wasdoors" + :meters-per-texel 22118.4 + :pos-scale 5662310.5 + :min-inv-scale 0.5 + :max-inv-scale 0.5 + :switch-immediate #f + ) + (new 'static 'minimap-table-entry + :corner (new 'static 'vector :x 4505600.0 :z 3442688.0) + :level-name 'lwassig + :tex-name "map-nst-lower" + :meters-per-texel 25600.0 + :pos-scale 6553600.0 + :min-inv-scale 0.5 + :max-inv-scale 0.5 + :switch-immediate #f + ) + (new 'static 'minimap-table-entry + :corner (new 'static 'vector :x 1662976.0 :z 163840.0) + :level-name 'nsta + :tex-name "map-nst-upper" + :meters-per-texel 25600.0 + :pos-scale 6553600.0 + :min-inv-scale 0.5 + :max-inv-scale 0.5 + :switch-immediate #t + ) + (new 'static 'minimap-table-entry + :corner (new 'static 'vector :x -1433600.0 :z -1433600.0) + :level-name 'factoryb + :tex-name "map-factoryb" + :meters-per-texel 20480.0 + :pos-scale 5242880.0 + :min-inv-scale 0.4 + :max-inv-scale 0.4 + :switch-immediate #t + ) + (new 'static 'minimap-table-entry + :corner (new 'static 'vector :x -3909755.0 :z 3309977.5) + :level-name 'foresta + :tex-name "map-forest" + :meters-per-texel 8519.68 + :pos-scale 2181038.0 + :min-inv-scale 0.15 + :max-inv-scale 0.15 + :switch-immediate #t + ) + (new 'static 'minimap-table-entry + :corner (new 'static 'vector :x -2129920.0 :z -2338816.0) + :level-name 'jakx + :tex-name "map-desert" + :meters-per-texel 40960.0 + :pos-scale 20971520.0 + :min-inv-scale 1.0 + :max-inv-scale 1.0 + :switch-immediate #t + ) + ) + ) + +(defmethod update! ((this minimap)) + (set! (-> this map-bits) (the-as uint 0)) + (let* ((s5-0 (the-as level #f)) + (s4-0 *minimap-table-entry-array*) + (v1-0 (-> s4-0 length)) + (s3-0 99) + ) + (let ((a0-2 (-> *setting-control* user-current minimap-level))) + (dotimes (a1-0 (-> *level* length)) + (let ((a2-3 (-> *level* level a1-0))) + (when (= (-> a2-3 status) 'active) + ;; og:preserve-this + (set! (-> this map-bits) (logior (the-as uint (-> this map-bits)) (-> a2-3 info city-map-bits))) + (dotimes (a3-5 v1-0) + (cond + (a0-2 + (when (= a0-2 (-> s4-0 a3-5 level-name)) + (set! s3-0 a3-5) + (set! s5-0 a2-3) + ) + ) + ((and (= (-> a2-3 name) (-> s4-0 a3-5 level-name)) (< a3-5 s3-0)) + (set! s3-0 a3-5) + (set! s5-0 a2-3) + ) + ) + ) + ) + ) + ) + ) + (cond + (s5-0 + (when (not (paused?)) + (seek! (-> this min-inv-scale) (-> s4-0 s3-0 min-inv-scale) (* 0.5 (seconds-per-frame))) + (seek! (-> this max-inv-scale) (-> s4-0 s3-0 max-inv-scale) (* 0.5 (seconds-per-frame))) + ) + (when (or (-> s4-0 s3-0 switch-immediate) + (and (= (-> this min-inv-scale) (-> s4-0 s3-0 min-inv-scale)) + (= (-> this max-inv-scale) (-> s4-0 s3-0 max-inv-scale)) + ) + ) + (set! (-> this last-name) (-> s4-0 s3-0 tex-name)) + (set! (-> this minimap-corner quad) (-> s4-0 s3-0 corner quad)) + (set! (-> this meters-per-texel) (-> s4-0 s3-0 meters-per-texel)) + (set! (-> this pos-scale) (-> s4-0 s3-0 pos-scale)) + (set! (-> this level) s5-0) + (set! (-> this ctywide) s5-0) + (cond + ((= (-> this level name) 'lwassig) + (if (level-get *level* 'nsta) + (set! (-> this map-bits) (the-as uint 1)) + ) + ) + (else + (set! (-> this map-bits) (the-as uint 1)) + ) + ) + ) + ) + (else + (set! (-> this ctywide) (level-get *level* 'ctywide)) + (let ((s5-1 (the int (* 0.0000006357829 (+ 3145728.0 (-> (target-pos 0) x))))) + (s4-1 (the int (* 0.0000006357829 (+ 3145728.0 (-> (target-pos 0) z))))) + ) + (set! (-> this meters-per-texel) 16384.0) + (set! (-> this pos-scale) (* 256.0 (-> this meters-per-texel))) + (when (not (paused?)) + (seek! (-> this min-inv-scale) 0.25 (* 0.5 (seconds-per-frame))) + (seek! (-> this max-inv-scale) 0.5 (* 0.5 (seconds-per-frame))) + ) + (when (and (< s5-1 5) (< s4-1 7) (logtest? (-> this map-bits) (ash 1 (+ (* 5 s4-1) s5-1)))) + (let ((a0-23 (-> *minimap-texture-name-array* data (+ (* 5 s4-1) s5-1)))) + (when a0-23 + (set! (-> this last-name) a0-23) + (set! (-> this minimap-corner quad) (-> *minimap-corner-array* data (+ (* 5 s4-1) s5-1) quad)) + (dotimes (v1-69 (-> *level* length)) + (let ((a0-34 (-> *level* level v1-69))) + (when (= (-> a0-34 status) 'active) + (if (logtest? (-> a0-34 info city-map-bits) (ash 1 (+ (* 5 s4-1) s5-1))) + (set! (-> this level) a0-34) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (cond + ((string= (-> this last-name) "map-nst-upper") + (cond + ((or (and (task-node-closed? (game-task-node nest-eggs-introduction)) + (not (task-node-closed? (game-task-node nest-eggs-gas))) + ) + (and (task-node-closed? (game-task-node nest-hunt-introduction)) + (not (task-node-closed? (game-task-node nest-hunt-resolution))) + ) + ) + (if (task-node-closed? (game-task-node nest-eggs-resolution)) + (set! (-> this last-name) "map-nst-upper-2") + ) + ) + (else + (set! (-> this last-name) #f) + ) + ) + ) + ((string= (-> this last-name) "map-forest") + (if (not (or (and (task-node-closed? (game-task-node forest-kill-plants-introduction)) + (not (task-node-closed? (game-task-node forest-kill-plants-resolution))) + ) + (and (task-node-closed? (game-task-node forest-turn-on-machine-introduction)) + (not (task-node-closed? (game-task-node precursor-tour-introduction))) + ) + ) + ) + (set! (-> this last-name) #f) + ) + ) + ) + (set! (-> this last-tex) + (lookup-minimap-texture-by-name (-> this last-name) (the-as string #f) (the-as (pointer texture-page) #f)) + ) + (let ((f30-2 (seconds-per-frame))) + (let ((v1-84 (-> this last-tex))) + (cond + ((or (not (-> this level)) (zero? (-> this level)) (!= (-> this level status) 'active) (not v1-84)) + (set! (-> this offset w) 0.0) + ) + ((not (logtest? (-> *setting-control* user-current minimap) 128)) + (seek! (-> this offset w) 0.0 f30-2) + ) + ((and *target* (nonzero? (-> this map-bits))) + (set! (-> this offset w) (fmin 0.5 (+ (-> this offset w) f30-2))) + ) + (else + (set! (-> this offset w) 0.0) + ) + ) + ) + (cond + ((and *target* (or (focus-test? *target* board pilot) (= (-> this min-inv-scale) (-> this max-inv-scale)))) + (let ((f0-40 0.000008138021) + (f1-10 122880.0) + (v1-105 (-> *target* control transv)) + ) + (set! (-> this target-inv-scale) + (fmax + (fmin + (* f0-40 (fmin f1-10 (sqrtf (+ (* (-> v1-105 x) (-> v1-105 x)) (* (-> v1-105 z) (-> v1-105 z)))))) + (-> this max-inv-scale) + ) + (-> this min-inv-scale) + ) + ) + ) + ) + (else + (set! (-> this target-inv-scale) 0.5) + ) + ) + (seek! (-> this offset y) (-> this target-inv-scale) (* 0.5 f30-2)) + ) + (set! (-> this icon-inv-scale) (/ (* 32768.0 (-> this offset y)) (-> this meters-per-texel))) + (set! (-> this map-inv-scale) + (/ (* 256.0 (-> this meters-per-texel) (-> this icon-inv-scale)) (-> this pos-scale)) + ) + (set! (-> this icon-inv-scale) (* 1.1428572 (-> this icon-inv-scale))) + (run-pending-updates! (-> this engine) (-> *display* base-clock frame-counter)) + (when (and (-> this ctywide) (and (= (-> this ctywide status) 'active) (!= (-> this offset w) 0.0))) + (update-trails this) + (if *display-trail-graph* + (debug-draw this) + ) + #t + ) + ) + +;; WARN: Return type mismatch pointer vs none. +(defmethod draw-racer-2 ((this minimap) (arg0 minimap-draw-work) (arg1 connection-minimap)) + (local-vars + (sv-16 process) + (sv-20 dma-buffer) + (sv-208 pointer) + (sv-212 vector) + (sv-216 vector) + (sv-220 vector) + (sv-224 matrix) + (sv-228 matrix) + ) + (let ((s3-0 (handle->process (-> arg1 handle)))) + (set! sv-16 (if (type? s3-0 process-drawable) + s3-0 + ) + ) + ) + (set! sv-20 (-> arg0 buf)) + (when (and sv-16 (nonzero? (-> (the-as process-drawable sv-16) root))) + (set! sv-208 (-> sv-20 base)) + (set! sv-212 (new 'stack-no-clear 'vector)) + (set! sv-216 (new 'stack-no-clear 'vector)) + (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) (-> (#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)) + (vector-xz-normalize! sv-220 1.0) + (set! (-> sv-220 y) 0.0) + (set! (-> sv-220 w) 0.0) + (vector-! sv-212 (target-pos 0) (-> (the-as process-drawable sv-16) root trans)) + (let ((f0-4 (/ (-> sv-212 x) (* (-> this meters-per-texel) (-> this icon-inv-scale)))) + (f1-3 (/ (-> sv-212 z) (* (-> this meters-per-texel) (-> this icon-inv-scale)))) + ) + (set-vector! (-> sv-224 rvec) (-> sv-216 z) 0.0 (- (-> sv-216 x)) 0.0) + (set-vector! (-> sv-224 uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> sv-224 fvec) (-> sv-216 x) 0.0 (-> sv-216 z) 0.0) + (set-vector! (-> sv-224 trans) 164.0 0.0 164.0 1.0) + (set-vector! (-> sv-228 rvec) (-> sv-220 z) 0.0 (- (-> sv-220 x)) 0.0) + (set-vector! (-> sv-228 uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> sv-228 fvec) (-> sv-220 x) 0.0 (-> sv-220 z) 0.0) + (set-vector! (-> sv-228 trans) f0-4 0.0 f1-3 1.0) + ) + (let ((v1-42 (-> sv-228 trans))) + (when (< (sqrtf (+ (* (-> v1-42 x) (-> v1-42 x)) (* (-> v1-42 z) (-> v1-42 z)))) 50.0) + (matrix*! sv-228 sv-228 sv-224) + (let ((f0-12 7.0)) + (set-vector! (-> arg0 corner 0) 0.0 0.0 (- f0-12) 1.0) + (set-vector! (-> arg0 corner 1) f0-12 0.0 0.0 1.0) + (set-vector! (-> arg0 corner 2) (- f0-12) 0.0 0.0 1.0) + (set-vector! (-> arg0 corner 3) 0.0 0.0 f0-12 1.0) + ) + (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) sv-228) + (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) sv-228) + (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) sv-228) + (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) sv-228) + (let* ((a0-38 (-> arg1 class color)) + (a0-45 (copy-and-set-field a0-38 r (shr (* (-> a0-38 r) (the-as uint (-> this color x))) 7))) + (a0-52 (copy-and-set-field a0-45 g (shr (* (-> a0-45 g) (the-as uint (-> this color y))) 7))) + (v1-59 + (copy-and-set-field + (copy-and-set-field a0-52 b (shr (* (-> a0-52 b) (the-as uint (-> this color z))) 7)) + a + (the int (* 128.0 (-> arg1 alpha))) + ) + ) + ) + (let ((a0-65 (-> this draw4-tmpl dma-vif quad))) + (set! (-> (the-as (pointer uint128) sv-208)) a0-65) + ) + (let ((a0-66 (-> this draw4-tmpl quad 1))) + (set! (-> (the-as (pointer uint128) sv-208) 1) a0-66) + ) + (set-vector! + (-> (the-as (inline-array vector4w) sv-208) 2) + (the-as int (-> v1-59 r)) + (the-as int (-> v1-59 g)) + (the-as int (-> v1-59 b)) + (the-as int (-> v1-59 a)) + ) + ) + (let ((v1-62 (the-as object (&+ sv-208 48)))) + (set! (-> (the-as (inline-array vector) v1-62) 0 x) 0.0) + (set! (-> (the-as (inline-array vector) v1-62) 0 y) 0.0) + (set! (-> (the-as (inline-array vector) v1-62) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-62) 0 w) 0.0) + ) + (let ((v1-64 (the-as object (&+ sv-208 64)))) + (set! (-> (the-as (inline-array vector4w) v1-64) 0 x) (the int (* 16.0 (-> arg0 corner 0 x)))) + (set! (-> (the-as (inline-array vector4w) v1-64) 0 y) (the int (* 16.0 (-> arg0 corner 0 z)))) + (set! (-> (the-as (inline-array vector4w) v1-64) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-64) 0 w) 0) + ) + (let ((v1-66 (the-as object (&+ sv-208 80)))) + (set! (-> (the-as (inline-array vector) v1-66) 0 x) 1.0) + (set! (-> (the-as (inline-array vector) v1-66) 0 y) 0.0) + (set! (-> (the-as (inline-array vector) v1-66) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-66) 0 w) 0.0) + ) + (let ((v1-68 (the-as object (&+ sv-208 96)))) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 x) (the int (* 16.0 (-> arg0 corner 1 x)))) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 y) (the int (* 16.0 (-> arg0 corner 1 z)))) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 w) 0) + ) + (let ((v1-70 (the-as object (&+ sv-208 112)))) + (set! (-> (the-as (inline-array vector) v1-70) 0 x) 0.0) + (set! (-> (the-as (inline-array vector) v1-70) 0 y) 1.0) + (set! (-> (the-as (inline-array vector) v1-70) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-70) 0 w) 0.0) + ) + (let ((v1-72 (the-as object (&+ sv-208 128)))) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 x) (the int (* 16.0 (-> arg0 corner 2 x)))) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 y) (the int (* 16.0 (-> arg0 corner 2 z)))) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 w) 0) + ) + (let ((v1-74 (the-as object (&+ sv-208 144)))) + (set! (-> (the-as (inline-array vector) v1-74) 0 x) 1.0) + (set! (-> (the-as (inline-array vector) v1-74) 0 y) 1.0) + (set! (-> (the-as (inline-array vector) v1-74) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-74) 0 w) 0.0) + ) + (let ((v1-76 (the-as object (&+ sv-208 160)))) + (set! (-> (the-as (inline-array vector4w) v1-76) 0 x) (the int (* 16.0 (-> arg0 corner 3 x)))) + (set! (-> (the-as (inline-array vector4w) v1-76) 0 y) (the int (* 16.0 (-> arg0 corner 3 z)))) + (set! (-> (the-as (inline-array vector4w) v1-76) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-76) 0 w) 0) + ) + (&+! (-> sv-20 base) 176) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch pointer vs none. +(defmethod draw-racer-1 ((this minimap) (arg0 minimap-draw-work) (arg1 connection-minimap) (arg2 float) (arg3 float) (arg4 float)) + (local-vars + (sv-16 process) + (sv-20 float) + (sv-24 dma-buffer) + (sv-128 pointer) + (sv-132 vector) + (sv-136 vector) + (sv-140 matrix) + ) + (let ((s0-0 (handle->process (-> arg1 handle)))) + (set! sv-16 (if (type? s0-0 process-drawable) + s0-0 + ) + ) + ) + (set! sv-20 (-> *video-params* relative-x-scale)) + (set! sv-24 (-> arg0 buf)) + (when (and sv-16 (nonzero? (-> (the-as process-drawable sv-16) root))) + (set! sv-128 (-> sv-24 base)) + (set! sv-132 (new 'stack-no-clear 'vector)) + (set! sv-136 (new 'stack-no-clear 'vector)) + (set! sv-140 (new 'stack-no-clear 'matrix)) + (vector-z-quaternion! sv-136 (-> (the-as process-drawable sv-16) root quat)) + (vector-xz-normalize! sv-136 -1.0) + (set! (-> sv-136 y) 0.0) + (set! (-> sv-136 w) 0.0) + (vector-! sv-132 (-> (the-as process-drawable sv-16) root trans) (-> this race-corner)) + (cond + ((get-horizontal-flip-flag *blit-displays-work*) + (let ((f0-4 (+ arg3 (* (- 128.0 (/ (-> sv-132 x) arg2)) sv-20))) + (f1-4 (+ arg4 (/ (-> sv-132 z) arg2))) + ) + (set-vector! (-> sv-140 rvec) (-> sv-136 z) 0.0 (-> sv-136 x) 0.0) + (set-vector! (-> sv-140 uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> sv-140 fvec) (- (-> sv-136 x)) 0.0 (-> sv-136 z) 0.0) + (set-vector! (-> sv-140 trans) f0-4 0.0 f1-4 1.0) + ) + ) + (else + (let ((f0-8 (+ arg3 (* (/ (-> sv-132 x) arg2) sv-20))) + (f1-9 (+ arg4 (/ (-> sv-132 z) arg2))) + ) + (set-vector! (-> sv-140 rvec) (-> sv-136 z) 0.0 (- (-> sv-136 x)) 0.0) + (set-vector! (-> sv-140 uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> sv-140 fvec) (-> sv-136 x) 0.0 (-> sv-136 z) 0.0) + (set-vector! (-> sv-140 trans) f0-8 0.0 f1-9 1.0) + ) + ) + ) + (let ((f0-11 7.0)) + (set-vector! (-> arg0 corner 0) 0.0 0.0 (- f0-11) 1.0) + (set-vector! (-> arg0 corner 1) f0-11 0.0 0.0 1.0) + (set-vector! (-> arg0 corner 2) (- f0-11) 0.0 0.0 1.0) + (set-vector! (-> arg0 corner 3) 0.0 0.0 f0-11 1.0) + ) + (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) sv-140) + (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) sv-140) + (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) sv-140) + (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) sv-140) + (let* ((a0-33 (-> arg1 class color)) + (a0-40 (copy-and-set-field a0-33 r (shr (* (-> a0-33 r) (the-as uint (-> this color x))) 7))) + (a0-47 (copy-and-set-field a0-40 g (shr (* (-> a0-40 g) (the-as uint (-> this color y))) 7))) + (v1-57 (copy-and-set-field + (copy-and-set-field a0-47 b (shr (* (-> a0-47 b) (the-as uint (-> this color z))) 7)) + a + (the int (* 128.0 (-> arg1 alpha))) + ) + ) + ) + (let ((a0-60 (-> this draw4-tmpl dma-vif quad))) + (set! (-> (the-as (pointer uint128) sv-128)) a0-60) + ) + (let ((a0-61 (-> this draw4-tmpl quad 1))) + (set! (-> (the-as (pointer uint128) sv-128) 1) a0-61) + ) + (let ((a0-63 (the-as object (&+ sv-128 32)))) + (set! (-> (the-as (inline-array vector4w) a0-63) 0 x) (the-as int (-> v1-57 r))) + (set! (-> (the-as (inline-array vector4w) a0-63) 0 y) (the-as int (-> v1-57 g))) + (set! (-> (the-as (inline-array vector4w) a0-63) 0 z) (the-as int (-> v1-57 b))) + (set! (-> (the-as (inline-array vector4w) a0-63) 0 w) (the-as int (-> v1-57 a))) + ) + ) + (let ((v1-60 (the-as object (&+ sv-128 48)))) + (set! (-> (the-as (inline-array vector) v1-60) 0 x) 0.0) + (set! (-> (the-as (inline-array vector) v1-60) 0 y) 0.0) + (set! (-> (the-as (inline-array vector) v1-60) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-60) 0 w) 0.0) + ) + (let ((v1-62 (the-as object (&+ sv-128 64)))) + (set! (-> (the-as (inline-array vector4w) v1-62) 0 x) (the int (* 16.0 (-> arg0 corner 0 x)))) + (set! (-> (the-as (inline-array vector4w) v1-62) 0 y) (the int (* 16.0 (-> arg0 corner 0 z)))) + (set! (-> (the-as (inline-array vector4w) v1-62) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-62) 0 w) 0) + ) + (let ((v1-64 (the-as object (&+ sv-128 80)))) + (set! (-> (the-as (inline-array vector) v1-64) 0 x) 1.0) + (set! (-> (the-as (inline-array vector) v1-64) 0 y) 0.0) + (set! (-> (the-as (inline-array vector) v1-64) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-64) 0 w) 0.0) + ) + (let ((v1-66 (the-as object (&+ sv-128 96)))) + (set! (-> (the-as (inline-array vector4w) v1-66) 0 x) (the int (* 16.0 (-> arg0 corner 1 x)))) + (set! (-> (the-as (inline-array vector4w) v1-66) 0 y) (the int (* 16.0 (-> arg0 corner 1 z)))) + (set! (-> (the-as (inline-array vector4w) v1-66) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-66) 0 w) 0) + ) + (let ((v1-68 (the-as object (&+ sv-128 112)))) + (set! (-> (the-as (inline-array vector) v1-68) 0 x) 0.0) + (set! (-> (the-as (inline-array vector) v1-68) 0 y) 1.0) + (set! (-> (the-as (inline-array vector) v1-68) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-68) 0 w) 0.0) + ) + (let ((v1-70 (the-as object (&+ sv-128 128)))) + (set! (-> (the-as (inline-array vector4w) v1-70) 0 x) (the int (* 16.0 (-> arg0 corner 2 x)))) + (set! (-> (the-as (inline-array vector4w) v1-70) 0 y) (the int (* 16.0 (-> arg0 corner 2 z)))) + (set! (-> (the-as (inline-array vector4w) v1-70) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-70) 0 w) 0) + ) + (let ((v1-72 (the-as object (&+ sv-128 144)))) + (set! (-> (the-as (inline-array vector) v1-72) 0 x) 1.0) + (set! (-> (the-as (inline-array vector) v1-72) 0 y) 1.0) + (set! (-> (the-as (inline-array vector) v1-72) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-72) 0 w) 0.0) + ) + (let ((v1-74 (the-as object (&+ sv-128 160)))) + (set! (-> (the-as (inline-array vector4w) v1-74) 0 x) (the int (* 16.0 (-> arg0 corner 3 x)))) + (set! (-> (the-as (inline-array vector4w) v1-74) 0 y) (the int (* 16.0 (-> arg0 corner 3 z)))) + (set! (-> (the-as (inline-array vector4w) v1-74) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-74) 0 w) 0) + ) + (&+! (-> sv-24 base) 176) + ) + (none) + ) + +;; WARN: Return type mismatch pointer vs none. +(defmethod draw-frustum-1 ((this minimap) (arg0 minimap-draw-work) (arg1 connection-minimap)) + (local-vars + (sv-16 process) + (sv-20 dma-buffer) + (sv-208 pointer) + (sv-212 texture) + (sv-216 vector) + (sv-220 vector) + (sv-224 vector) + (sv-228 matrix) + (sv-232 matrix) + ) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (let ((s3-0 (handle->process (-> arg1 handle)))) + (set! sv-16 (if (type? s3-0 process-drawable) + s3-0 + ) + ) + ) + (set! sv-20 (-> arg0 buf)) + (when (and sv-16 (nonzero? (-> (the-as process-drawable sv-16) root))) + (set! sv-208 (-> sv-20 base)) + (set! sv-212 (get-texture map-guard-frustum level-default-minimap)) + (set! sv-216 (new 'stack-no-clear 'vector)) + (set! sv-220 (new 'stack-no-clear 'vector)) + (set! sv-224 (new 'stack-no-clear 'vector)) + (set! sv-228 (new 'stack-no-clear 'matrix)) + (set! sv-232 (new 'stack-no-clear 'matrix)) + (when sv-212 + (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)) + (vector-xz-normalize! sv-224 1.0) + (set! (-> sv-224 y) 0.0) + (set! (-> sv-224 w) 0.0) + (vector-! sv-216 (target-pos 0) (-> (the-as process-drawable sv-16) root trans)) + (let ((f0-4 (/ (-> sv-216 x) (* (-> this meters-per-texel) (-> this map-inv-scale)))) + (f1-3 (/ (-> sv-216 z) (* (-> this meters-per-texel) (-> this map-inv-scale)))) + ) + (set-vector! (-> sv-228 rvec) (-> sv-220 z) 0.0 (- (-> sv-220 x)) 0.0) + (set-vector! (-> sv-228 uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> sv-228 fvec) (-> sv-220 x) 0.0 (-> sv-220 z) 0.0) + (set-vector! (-> sv-228 trans) 164.0 0.0 164.0 1.0) + (set-vector! (-> sv-232 rvec) (-> sv-224 z) 0.0 (- (-> sv-224 x)) 0.0) + (set-vector! (-> sv-232 uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> sv-232 fvec) (-> sv-224 x) 0.0 (-> sv-224 z) 0.0) + (set-vector! (-> sv-232 trans) f0-4 0.0 f1-3 1.0) + ) + (matrix*! sv-232 sv-232 sv-228) + (let ((f0-8 (/ -10.0 (-> this map-inv-scale)))) + (set-vector! (-> arg0 corner 0) 0.0 0.0 0.0 1.0) + (set-vector! (-> arg0 corner 1) (- f0-8) 0.0 f0-8 1.0) + (set-vector! (-> arg0 corner 2) f0-8 0.0 f0-8 1.0) + (set-vector! (-> arg0 corner 3) 0.0 0.0 (* 2.0 f0-8) 1.0) + ) + (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) sv-232) + (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) sv-232) + (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) sv-232) + (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) sv-232) + (let ((v1-47 (new 'stack-no-clear 'vector)) + (a0-40 (new 'stack-no-clear 'vector)) + ) + (.lvf vf1 (&-> arg0 corner 0 quad)) + (.lvf vf2 (&-> arg0 corner 1 quad)) + (.lvf vf3 (&-> arg0 corner 2 quad)) + (.lvf vf4 (&-> arg0 corner 3 quad)) + (.min.vf vf5 vf1 vf2) + (.min.vf vf5 vf5 vf3) + (.min.vf vf5 vf5 vf4) + (.max.vf vf6 vf1 vf2) + (.max.vf vf6 vf6 vf3) + (.max.vf vf6 vf6 vf4) + (.svf (&-> v1-47 quad) vf5) + (.svf (&-> a0-40 quad) vf6) + (when (and (< (-> a0-40 x) 228.0) (< (-> a0-40 z) 228.0) (< 100.0 (-> v1-47 x)) (< 100.0 (-> v1-47 z))) + (let* ((a0-46 (-> arg1 class color)) + (a0-53 (copy-and-set-field a0-46 r (shr (* (-> a0-46 r) (the-as uint (-> this color x))) 7))) + (a0-60 (copy-and-set-field a0-53 g (shr (* (-> a0-53 g) (the-as uint (-> this color y))) 7))) + (s4-1 (copy-and-set-field + (copy-and-set-field a0-60 b (shr (* (-> a0-60 b) (the-as uint (-> this color z))) 7)) + a + (the int (* 128.0 (-> this frustum-alpha) (-> arg1 alpha))) + ) + ) + ) + (let ((v1-58 (-> this adgif-tmpl dma-vif quad))) + (set! (-> (the-as (pointer uint128) sv-208) 0) v1-58) + ) + (let ((v1-59 (-> this adgif-tmpl quad 1))) + (set! (-> (the-as (pointer uint128) sv-208) 1) v1-59) + ) + (adgif-shader<-texture-simple! (the-as adgif-shader (&+ sv-208 32)) sv-212) + (let ((v1-61 (-> this draw4-tmpl dma-vif quad))) + (set! (-> (the-as (pointer uint128) sv-208) 7) v1-61) + ) + (let ((v1-62 (-> this draw4-tmpl quad 1))) + (set! (-> (the-as (pointer uint128) sv-208) 8) v1-62) + ) + (let ((v1-64 (the-as object (&+ sv-208 144)))) + (set! (-> (the-as (inline-array vector4w) v1-64) 0 x) (the-as int (-> s4-1 r))) + (set! (-> (the-as (inline-array vector4w) v1-64) 0 y) (the-as int (-> s4-1 g))) + (set! (-> (the-as (inline-array vector4w) v1-64) 0 z) (the-as int (-> s4-1 b))) + (set! (-> (the-as (inline-array vector4w) v1-64) 0 w) (the-as int (-> s4-1 a))) + ) + ) + (let ((v1-66 (the-as object (&+ sv-208 160)))) + (set! (-> (the-as (inline-array vector) v1-66) 0 x) 0.0) + (set! (-> (the-as (inline-array vector) v1-66) 0 y) 0.0) + (set! (-> (the-as (inline-array vector) v1-66) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-66) 0 w) 0.0) + ) + (let ((v1-68 (the-as object (&+ sv-208 176)))) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 x) (the int (* 16.0 (-> arg0 corner 0 x)))) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 y) (the int (* 16.0 (-> arg0 corner 0 z)))) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 w) 0) + ) + (let ((v1-70 (the-as object (&+ sv-208 192)))) + (set! (-> (the-as (inline-array vector) v1-70) 0 x) 1.0) + (set! (-> (the-as (inline-array vector) v1-70) 0 y) 0.0) + (set! (-> (the-as (inline-array vector) v1-70) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-70) 0 w) 0.0) + ) + (let ((v1-72 (the-as object (&+ sv-208 208)))) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 x) (the int (* 16.0 (-> arg0 corner 1 x)))) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 y) (the int (* 16.0 (-> arg0 corner 1 z)))) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 w) 0) + ) + (let ((v1-74 (the-as object (&+ sv-208 224)))) + (set! (-> (the-as (inline-array vector) v1-74) 0 x) 0.0) + (set! (-> (the-as (inline-array vector) v1-74) 0 y) 1.0) + (set! (-> (the-as (inline-array vector) v1-74) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-74) 0 w) 0.0) + ) + (let ((v1-76 (the-as object (&+ sv-208 240)))) + (set! (-> (the-as (inline-array vector4w) v1-76) 0 x) (the int (* 16.0 (-> arg0 corner 2 x)))) + (set! (-> (the-as (inline-array vector4w) v1-76) 0 y) (the int (* 16.0 (-> arg0 corner 2 z)))) + (set! (-> (the-as (inline-array vector4w) v1-76) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) v1-76) 0 w) 0) + ) + (let ((v1-78 (the-as object (&+ sv-208 256)))) + (set! (-> (the-as (inline-array vector) v1-78) 0 x) 1.0) + (set! (-> (the-as (inline-array vector) v1-78) 0 y) 1.0) + (set! (-> (the-as (inline-array vector) v1-78) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-78) 0 w) 0.0) + ) + (let ((v1-80 (the-as object (&+ sv-208 272)))) + (set! (-> (the-as (inline-array vector4w) v1-80) 0 x) (the int (* 16.0 (-> arg0 corner 3 x)))) + (set! (-> (the-as (inline-array vector4w) v1-80) 0 y) (the int (* 16.0 (-> arg0 corner 3 z)))) + (set! (-> (the-as (inline-array vector4w) v1-80) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) v1-80) 0 w) 0) + ) + (&+! (-> sv-20 base) 288) + ) + ) + ) + ) + (none) + ) + ) + +;; WARN: Return type mismatch pointer vs none. +(defmethod draw-frustum-2 ((this minimap) (arg0 minimap-draw-work) (arg1 connection-minimap)) + (local-vars + (sv-16 process) + (sv-20 dma-buffer) + (sv-208 pointer) + (sv-212 texture) + (sv-216 vector) + (sv-220 vector) + (sv-224 vector) + (sv-228 matrix) + (sv-232 matrix) + ) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (let ((s3-0 (handle->process (-> arg1 handle)))) + (set! sv-16 (if (type? s3-0 process-drawable) + s3-0 + ) + ) + ) + (set! sv-20 (-> arg0 buf)) + (when (and sv-16 (nonzero? (-> (the-as process-drawable sv-16) root))) + (set! sv-208 (-> sv-20 base)) + (set! sv-212 (get-texture map-guard-frustum level-default-minimap)) + (set! sv-216 (new 'stack-no-clear 'vector)) + (set! sv-220 (new 'stack-no-clear 'vector)) + (set! sv-224 (new 'stack-no-clear 'vector)) + (set! sv-228 (new 'stack-no-clear 'matrix)) + (set! sv-232 (new 'stack-no-clear 'matrix)) + (when sv-212 + (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)) + (vector-xz-normalize! sv-224 1.0) + (set! (-> sv-224 y) 0.0) + (set! (-> sv-224 w) 0.0) + (vector-! sv-216 (target-pos 0) (-> (the-as process-drawable sv-16) root trans)) + (let ((f0-4 (/ (-> sv-216 x) (* (-> this meters-per-texel) (-> this map-inv-scale)))) + (f1-3 (/ (-> sv-216 z) (* (-> this meters-per-texel) (-> this map-inv-scale)))) + ) + (set-vector! (-> sv-228 rvec) (-> sv-220 z) 0.0 (- (-> sv-220 x)) 0.0) + (set-vector! (-> sv-228 uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> sv-228 fvec) (-> sv-220 x) 0.0 (-> sv-220 z) 0.0) + (set-vector! (-> sv-228 trans) 164.0 0.0 164.0 1.0) + (set-vector! (-> sv-232 rvec) (-> sv-224 z) 0.0 (- (-> sv-224 x)) 0.0) + (set-vector! (-> sv-232 uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> sv-232 fvec) (-> sv-224 x) 0.0 (-> sv-224 z) 0.0) + (set-vector! (-> sv-232 trans) f0-4 0.0 f1-3 1.0) + ) + (matrix*! sv-232 sv-232 sv-228) + (let ((f0-7 12.0)) + (set-vector! (-> arg0 corner 0) (- f0-7) 0.0 0.0 1.0) + (set-vector! (-> arg0 corner 1) 0.0 0.0 f0-7 1.0) + (set-vector! (-> arg0 corner 2) 0.0 0.0 (- f0-7) 1.0) + (set-vector! (-> arg0 corner 3) f0-7 0.0 0.0 1.0) + ) + (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) sv-232) + (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) sv-232) + (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) sv-232) + (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) sv-232) + (let ((v1-47 (new 'stack-no-clear 'vector)) + (a0-39 (new 'stack-no-clear 'vector)) + ) + (.lvf vf1 (&-> arg0 corner 0 quad)) + (.lvf vf2 (&-> arg0 corner 1 quad)) + (.lvf vf3 (&-> arg0 corner 2 quad)) + (.lvf vf4 (&-> arg0 corner 3 quad)) + (.min.vf vf5 vf1 vf2) + (.min.vf vf5 vf5 vf3) + (.min.vf vf5 vf5 vf4) + (.max.vf vf6 vf1 vf2) + (.max.vf vf6 vf6 vf3) + (.max.vf vf6 vf6 vf4) + (.svf (&-> v1-47 quad) vf5) + (.svf (&-> a0-39 quad) vf6) + (when (and (< (-> a0-39 x) 228.0) (< (-> a0-39 z) 228.0) (< 100.0 (-> v1-47 x)) (< 100.0 (-> v1-47 z))) + (let* ((a3-0 (-> arg1 class color)) + ;; og:preserve-this + (a2-6 (the int (+ (* (the-as uint 320) (-> arg1 class icon-xy x)) 8))) + (a1-14 (the int (+ (* (the-as uint 320) (-> arg1 class icon-xy y)) 8))) + (v1-54 (+ a2-6 304)) + (a0-49 (+ a1-14 304)) + ) + (let* ((t0-2 (copy-and-set-field a3-0 r (shr (* (-> a3-0 r) (the-as uint (-> this color x))) 7))) + (t0-9 (copy-and-set-field t0-2 g (shr (* (-> t0-2 g) (the-as uint (-> this color y))) 7))) + (a3-13 (copy-and-set-field + (copy-and-set-field t0-9 b (shr (* (-> t0-9 b) (the-as uint (-> this color z))) 7)) + a + (the int (* 128.0 (-> arg1 alpha))) + ) + ) + ) + (let ((t0-22 (-> this draw3-tmpl dma-vif quad))) + (set! (-> (the-as (pointer uint128) sv-208) 0) t0-22) + ) + (let ((t0-23 (-> this draw3-tmpl quad 1))) + (set! (-> (the-as (pointer uint128) sv-208) 1) t0-23) + ) + (let ((t0-25 (the-as (object object) (&-> (the-as (pointer uint128) sv-208) 2)))) + (set! (-> (the-as (inline-array vector4w) t0-25) 0 x) (the-as int (-> a3-13 r))) + (set! (-> (the-as (inline-array vector4w) t0-25) 0 y) (the-as int (-> a3-13 g))) + (set! (-> (the-as (inline-array vector4w) t0-25) 0 z) (the-as int (-> a3-13 b))) + (set! (-> (the-as (inline-array vector4w) t0-25) 0 w) (the-as int (-> a3-13 a))) + ) + ) + (let ((a3-16 (the-as (inline-array vector4w) (&+ sv-208 48)))) + (set! (-> a3-16 0 x) a2-6) + (set! (-> a3-16 0 y) a1-14) + (set! (-> a3-16 0 z) 0) + (set! (-> a3-16 0 w) 0) + ) + (let ((a3-18 (the-as object (&+ sv-208 64)))) + (set! (-> (the-as (inline-array vector4w) a3-18) 0 x) (the int (* 16.0 (-> arg0 corner 0 x)))) + (set! (-> (the-as (inline-array vector4w) a3-18) 0 y) (the int (* 16.0 (-> arg0 corner 0 z)))) + (set! (-> (the-as (inline-array vector4w) a3-18) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) a3-18) 0 w) 0) + ) + (let ((a3-20 (the-as (inline-array vector4w) (&+ sv-208 80)))) + (set! (-> a3-20 0 x) a2-6) + (set! (-> a3-20 0 y) a0-49) + (set! (-> a3-20 0 z) 0) + (set! (-> a3-20 0 w) 0) + ) + (let ((a2-8 (the-as object (&+ sv-208 96)))) + (set! (-> (the-as (inline-array vector4w) a2-8) 0 x) (the int (* 16.0 (-> arg0 corner 1 x)))) + (set! (-> (the-as (inline-array vector4w) a2-8) 0 y) (the int (* 16.0 (-> arg0 corner 1 z)))) + (set! (-> (the-as (inline-array vector4w) a2-8) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) a2-8) 0 w) 0) + ) + (let ((a2-10 (the-as (inline-array vector4w) (&+ sv-208 112)))) + (set! (-> a2-10 0 x) v1-54) + (set! (-> a2-10 0 y) a1-14) + (set! (-> a2-10 0 z) 0) + (set! (-> a2-10 0 w) 0) + ) + (let ((a1-16 (the-as object (&+ sv-208 128)))) + (set! (-> (the-as (inline-array vector4w) a1-16) 0 x) (the int (* 16.0 (-> arg0 corner 2 x)))) + (set! (-> (the-as (inline-array vector4w) a1-16) 0 y) (the int (* 16.0 (-> arg0 corner 2 z)))) + (set! (-> (the-as (inline-array vector4w) a1-16) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) a1-16) 0 w) 0) + ) + (let ((a1-18 (the-as (inline-array vector4w) (&+ sv-208 144)))) + (set! (-> a1-18 0 x) v1-54) + (set! (-> a1-18 0 y) a0-49) + (set! (-> a1-18 0 z) 0) + (set! (-> a1-18 0 w) 0) + ) + ) + (let ((v1-56 (the-as object (&+ sv-208 160)))) + (set! (-> (the-as (inline-array vector4w) v1-56) 0 x) (the int (* 16.0 (-> arg0 corner 3 x)))) + (set! (-> (the-as (inline-array vector4w) v1-56) 0 y) (the int (* 16.0 (-> arg0 corner 3 z)))) + (set! (-> (the-as (inline-array vector4w) v1-56) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) v1-56) 0 w) 0) + ) + (&+! (-> sv-20 base) 176) + ) + ) + ) + ) + (none) + ) + ) + +(defmethod sub-draw-1-1 ((this minimap) (arg0 minimap-draw-work)) + (let ((s5-0 (-> arg0 buf))) + (set-display-gs-state s5-0 (the-as int (-> *map-texture-base* vram-page)) 128 128 0 0) + (let ((s3-0 (-> s5-0 base))) + (set! (-> (the-as (pointer uint128) s3-0) 0) (-> this adgif-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) s3-0) 1) (-> this adgif-tmpl quad 1)) + (let ((a1-2 (-> this last-tex))) + (if (not a1-2) + (set! a1-2 (get-texture common-white common)) + ) + (adgif-shader<-texture-simple! (the-as adgif-shader (&+ s3-0 32)) (the-as texture a1-2)) + ) + ) + (&+! (-> s5-0 base) 112) + (dma-buffer-add-gs-set s5-0 + (clamp-1 (new 'static 'gs-clamp)) + (test-1 (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))) + (texa (new 'static 'gs-texa :ta1 #x80)) + ) + (let ((s3-1 (-> s5-0 base))) + ;; 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) (-> (#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))) + (set! (-> v1-16 rvec x) (* (-> s1-0 z) f30-0)) + (set! (-> v1-16 rvec y) 0.0) + (set! (-> v1-16 rvec z) (- (-> s1-0 x))) + (set! (-> v1-16 rvec w) 0.0) + ) + (set-vector! (-> arg0 mat uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> arg0 mat fvec) (* (-> s1-0 x) f30-0) 0.0 (-> s1-0 z) 0.0) + ) + (vector-! s2-0 (target-pos 0) (-> this minimap-corner)) + (set! (-> s2-0 x) (/ (-> s2-0 x) (-> this pos-scale))) + (set! (-> s2-0 z) (/ (-> s2-0 z) (-> this pos-scale))) + (vector+! (-> arg0 mat trans) s2-0 (-> this offset)) + ) + ) + (set! (-> arg0 mat trans y) 0.0) + (set! (-> arg0 corner 0 x) (* 0.25 (-> this map-inv-scale))) + (set! (-> arg0 corner 0 z) (* 0.25 (-> this map-inv-scale))) + (set! (-> arg0 corner 0 w) 1.0) + (set! (-> arg0 corner 1 x) (* -0.25 (-> this map-inv-scale))) + (set! (-> arg0 corner 1 z) (* 0.25 (-> this map-inv-scale))) + (set! (-> arg0 corner 1 w) 1.0) + (set! (-> arg0 corner 2 x) (* 0.25 (-> this map-inv-scale))) + (set! (-> arg0 corner 2 z) (* -0.25 (-> this map-inv-scale))) + (set! (-> arg0 corner 2 w) 1.0) + (set! (-> arg0 corner 3 x) (* -0.25 (-> this map-inv-scale))) + (set! (-> arg0 corner 3 z) (* -0.25 (-> this map-inv-scale))) + (set! (-> arg0 corner 3 w) 1.0) + (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) (-> arg0 mat)) + (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) (-> arg0 mat)) + (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) (-> arg0 mat)) + (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) (-> arg0 mat)) + (let ((v1-33 (the-as object (&+ s3-1 32)))) + (set! (-> (the-as (inline-array vector4w) v1-33) 0 x) 128) + (set! (-> (the-as (inline-array vector4w) v1-33) 0 y) 128) + (set! (-> (the-as (inline-array vector4w) v1-33) 0 z) 128) + (set! (-> (the-as (inline-array vector4w) v1-33) 0 w) 128) + ) + (let ((v1-34 (the-as object (&+ s3-1 48)))) + (set! (-> (the-as (inline-array vector) v1-34) 0 x) (-> arg0 corner 0 x)) + (set! (-> (the-as (inline-array vector) v1-34) 0 y) (-> arg0 corner 0 z)) + (set! (-> (the-as (inline-array vector) v1-34) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-34) 0 w) 1.0) + ) + (let ((v1-35 (the-as (inline-array vector4w) (&+ s3-1 64)))) + (set! (-> v1-35 0 x) 0) + (set! (-> v1-35 0 y) 0) + (set! (-> v1-35 0 z) #xffffff) + (set! (-> v1-35 0 w) 0) + ) + (let ((v1-36 (the-as object (&+ s3-1 80)))) + (set! (-> (the-as (inline-array vector) v1-36) 0 x) (-> arg0 corner 1 x)) + (set! (-> (the-as (inline-array vector) v1-36) 0 y) (-> arg0 corner 1 z)) + (set! (-> (the-as (inline-array vector) v1-36) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-36) 0 w) 1.0) + ) + (let ((v1-37 (the-as object (&+ s3-1 96)))) + (set! (-> (the-as (inline-array vector4w) v1-37) 0 x) 2048) + (set! (-> (the-as (inline-array vector4w) v1-37) 0 y) 0) + (set! (-> (the-as (inline-array vector4w) v1-37) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-37) 0 w) 0) + ) + (let ((v1-38 (the-as object (&+ s3-1 112)))) + (set! (-> (the-as (inline-array vector) v1-38) 0 x) (-> arg0 corner 2 x)) + (set! (-> (the-as (inline-array vector) v1-38) 0 y) (-> arg0 corner 2 z)) + (set! (-> (the-as (inline-array vector) v1-38) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-38) 0 w) 1.0) + ) + (let ((v1-39 (the-as (inline-array vector4w) (&+ s3-1 128)))) + (set! (-> v1-39 0 x) 0) + (set! (-> v1-39 0 y) 2048) + (set! (-> v1-39 0 z) #xffffff) + (set! (-> v1-39 0 w) 0) + ) + (let ((v1-40 (the-as object (&+ s3-1 144)))) + (set! (-> (the-as (inline-array vector) v1-40) 0 x) (-> arg0 corner 3 x)) + (set! (-> (the-as (inline-array vector) v1-40) 0 y) (-> arg0 corner 3 z)) + (set! (-> (the-as (inline-array vector) v1-40) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-40) 0 w) 1.0) + ) + (let ((v1-41 (the-as object (&+ s3-1 160)))) + (set! (-> (the-as (inline-array vector4w) v1-41) 0 x) 2048) + (set! (-> (the-as (inline-array vector4w) v1-41) 0 y) 2048) + (set! (-> (the-as (inline-array vector4w) v1-41) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-41) 0 w) 0) + ) + ) + (&+! (-> s5-0 base) 176) + (let ((f0-57 1.0)) + (when *target* + (if (focus-test? *target* pilot) + (set! f0-57 0.0) + ) + ) + (seek! (-> this frustum-alpha) f0-57 (seconds-per-frame)) + ) + (dma-buffer-add-gs-set s5-0 (xyoffset-1 (new 'static 'gs-xy-offset :ofx #x640 :ofy #x640))) + (when (!= (-> this frustum-alpha) 0.0) + (let ((s3-2 (-> *minimap* engine alive-list))) + (while s3-2 + (let ((a2-6 s3-2)) + (if (logtest? (-> a2-6 class flags) (minimap-flag frustum)) + (draw-frustum-1 this arg0 a2-6) + ) + ) + (set! s3-2 (-> s3-2 next)) + ) + ) + ) + (let ((s2-1 (-> arg0 buf base)) + (s3-3 (get-texture mini-map-icons level-default-minimap)) + ) + (when s3-3 + (set! (-> (the-as (pointer uint128) s2-1) 0) (-> this adgif-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) s2-1) 1) (-> this adgif-tmpl quad 1)) + (adgif-shader<-texture-simple! (the-as adgif-shader (&-> (the-as (pointer uint128) s2-1) 2)) s3-3) + (&+! (-> arg0 buf base) 112) + ) + (if (not s3-3) + (format *stdebug* "minimap: mini-map-icons texture is #f~%") + ) + ) + (let ((s3-4 (-> *minimap* engine alive-list))) + (while s3-4 + (let ((a2-7 s3-4)) + (if (logtest? (-> a2-7 class flags) (minimap-flag frustum)) + (draw-frustum-2 this arg0 a2-7) + ) + ) + (set! s3-4 (-> s3-4 next)) + ) + ) + (let ((s3-5 (-> arg0 buf base)) + (a1-37 (get-texture map-target-marker level-default-minimap)) + ) + (when a1-37 + (set! (-> (the-as (pointer uint128) s3-5) 0) (-> this adgif-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) s3-5) 1) (-> this adgif-tmpl quad 1)) + (adgif-shader<-texture-simple! (the-as adgif-shader (&-> (the-as (pointer uint128) s3-5) 2)) a1-37) + (&+! (-> arg0 buf base) 112) + ) + ) + (let ((s3-6 (-> *minimap* engine alive-list))) + (while s3-6 + (let ((a2-8 s3-6)) + (if (logtest? (-> a2-8 class flags) (minimap-flag racer)) + (draw-racer-2 this arg0 a2-8) + ) + ) + (set! s3-6 (-> s3-6 next)) + ) + ) + (dma-buffer-add-gs-set s5-0 + (frame-1 (new 'static 'gs-frame :fbw #x2 :fbmsk #xffffff :fbp (-> *map-texture-base* vram-page))) + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (xyoffset-1 (new 'static 'gs-xy-offset)) + ) + (let ((s3-7 (-> s5-0 base))) + (set! (-> (the-as (pointer uint128) s3-7) 0) (-> this adgif-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) s3-7) 1) (-> this adgif-tmpl quad 1)) + (adgif-shader<-texture-simple! + (the-as adgif-shader (&-> (the-as (pointer uint128) s3-7) 2)) + (get-texture minimap-mask level-default-minimap) + ) + (set! (-> (the-as (pointer uint128) s3-7) 7) (-> this sprite-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) s3-7) 8) (-> this sprite-tmpl quad 1)) + (let ((v1-110 (the-as object (&+ s3-7 144)))) + (set! (-> (the-as (inline-array vector4w) v1-110) 0 x) 128) + (set! (-> (the-as (inline-array vector4w) v1-110) 0 y) 128) + (set! (-> (the-as (inline-array vector4w) v1-110) 0 z) 128) + (set! (-> (the-as (inline-array vector4w) v1-110) 0 w) 128) + ) + (let ((v1-111 (the-as (inline-array vector4w) (&+ s3-7 160)))) + (set! (-> v1-111 0 x) 0) + (set! (-> v1-111 0 y) 0) + (set! (-> v1-111 0 z) 0) + (set! (-> v1-111 0 w) 0) + ) + (let ((v1-112 (the-as (inline-array vector4w) (&+ s3-7 176)))) + (set! (-> v1-112 0 x) 0) + (set! (-> v1-112 0 y) 0) + (set! (-> v1-112 0 z) #xffffff) + (set! (-> v1-112 0 w) 0) + ) + (let ((v1-113 (the-as object (&+ s3-7 192)))) + (set! (-> (the-as (inline-array vector4w) v1-113) 0 x) 1024) + (set! (-> (the-as (inline-array vector4w) v1-113) 0 y) 1024) + (set! (-> (the-as (inline-array vector4w) v1-113) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) v1-113) 0 w) 0) + ) + (let ((v1-114 (the-as object (&+ s3-7 208)))) + (set! (-> (the-as (inline-array vector4w) v1-114) 0 x) 2048) + (set! (-> (the-as (inline-array vector4w) v1-114) 0 y) 2048) + (set! (-> (the-as (inline-array vector4w) v1-114) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-114) 0 w) 0) + ) + ) + (&+! (-> s5-0 base) 224) + (set! (-> arg0 buf) s5-0) + ) + 0 + (none) + ) + +(defmethod sub-draw-1-2 ((this minimap) (arg0 minimap-draw-work)) + (local-vars (sv-48 vector) (sv-52 vector) (sv-56 vector) (sv-64 int) (sv-80 int)) + (let ((s5-0 (-> arg0 buf))) + (reset-display-gs-state *display* s5-0) + (dma-buffer-add-gs-set s5-0 + (test-1 (new 'static 'gs-test :zte #x1 :ztst (gs-ztest greater-equal))) + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (tex0-1 (new 'static 'gs-tex0 + :tbw #x2 + :tcc #x1 + :th (log2 128) + :tw (log2 128) + :tbp0 (-> *map-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))) + (texflush 0) + ) + (let ((f30-0 (-> *video-params* relative-x-scale))) + (let ((s3-1 (the-as object (-> s5-0 base))) + (v1-22 (the int (* 112.0 f30-0))) + ) + 0 + 0 + (let ((s0-0 (* (+ (-> arg0 draw-pos y) 1840) 16)) + (s2-1 (* (+ (-> arg0 draw-pos y) 1952) 16)) + (s1-2 (-> arg0 draw-pos z)) + ) + (cond + ((-> arg0 justify-right) + (set! sv-64 (* (+ (- 1792 v1-22) (-> arg0 draw-pos x)) 16)) + (set! sv-80 (* (+ (-> arg0 draw-pos x) 1792) 16)) + sv-80 + ) + (else + (set! sv-64 (* (+ (-> arg0 draw-pos x) 1792) 16)) + (set! sv-80 (* (+ v1-22 1792 (-> arg0 draw-pos x)) 16)) + sv-80 + ) + ) + (set! (-> (the-as (inline-array vector4w) s3-1) 0 quad) (-> this sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) s3-1) 1 quad) (-> this sprite-tmpl quad 1)) + (let ((v1-36 (-> this color quad))) + (set! (-> (the-as (inline-array vector4w) s3-1) 2 quad) v1-36) + ) + (cond + ((get-horizontal-flip-flag *blit-displays-work*) + (set-vector! (-> (the-as (inline-array vector4w) s3-1) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) s3-1) 4) sv-80 s0-0 s1-2 0) + (set-vector! (-> (the-as (inline-array vector4w) s3-1) 5) 2048 2048 0 0) + (set-vector! (-> (the-as (inline-array vector4w) s3-1) 6) sv-64 s2-1 s1-2 0) + ) + (else + (let ((v1-42 (the-as (inline-array vector4w) (&+ (the-as pointer s3-1) 48)))) + (set! (-> v1-42 0 x) 0) + (set! (-> v1-42 0 y) 0) + (set! (-> v1-42 0 z) 0) + (set! (-> v1-42 0 w) 0) + ) + (let ((a0-31 (the-as object (&+ (the-as pointer s3-1) 64)))) + (set! (-> (the-as (inline-array vector4w) a0-31) 0 x) sv-64) + (set! (-> (the-as (inline-array vector4w) a0-31) 0 y) s0-0) + (set! (-> (the-as (inline-array vector4w) a0-31) 0 z) s1-2) + (set! (-> (the-as (inline-array vector4w) a0-31) 0 w) 0) + ) + (let ((v1-44 (the-as object (&+ (the-as pointer s3-1) 80)))) + (set! (-> (the-as (inline-array vector4w) v1-44) 0 x) 2048) + (set! (-> (the-as (inline-array vector4w) v1-44) 0 y) 2048) + (set! (-> (the-as (inline-array vector4w) v1-44) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) v1-44) 0 w) 0) + ) + (let ((v1-45 (the-as object (&+ (the-as pointer s3-1) 96)))) + (set! (-> (the-as (inline-array vector4w) v1-45) 0 x) sv-80) + (set! (-> (the-as (inline-array vector4w) v1-45) 0 y) s2-1) + (set! (-> (the-as (inline-array vector4w) v1-45) 0 z) s1-2) + (set! (-> (the-as (inline-array vector4w) v1-45) 0 w) 0) + ) + ) + ) + ) + ) + (&+! (-> s5-0 base) 112) + (dma-buffer-add-gs-set s5-0 + (test-1 (new 'static 'gs-test :ate #x1 :atst (gs-atest greater) :zte #x1 :ztst (gs-ztest always))) + ) + (set! sv-48 (new-stack-vector0)) + (set! sv-52 (new-stack-vector0)) + (set! sv-56 (target-pos 0)) + (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))) + (set! (-> v1-57 rvec w) 0.0) + ) + (set-vector! (-> arg0 mat uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> arg0 mat fvec) (* (-> sv-52 x) (- f30-0)) 0.0 (-> sv-52 z) 0.0) + (set-vector! (-> arg0 mat trans) 0.0 0.0 (the float (+ (-> arg0 draw-pos y) 1896)) 1.0) + ) + (else + (let ((v1-61 (-> arg0 mat))) + (set! (-> v1-61 rvec x) (* (-> sv-52 z) f30-0)) + (set! (-> v1-61 rvec y) 0.0) + (set! (-> v1-61 rvec z) (- (-> sv-52 x))) + (set! (-> v1-61 rvec w) 0.0) + ) + (set-vector! (-> arg0 mat uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> arg0 mat fvec) (* (-> sv-52 x) f30-0) 0.0 (-> sv-52 z) 0.0) + (set-vector! (-> arg0 mat trans) 0.0 0.0 (the float (+ (-> arg0 draw-pos y) 1896)) 1.0) + ) + ) + (let ((v1-66 (the int (* 56.0 f30-0)))) + (if (-> arg0 justify-right) + (set! (-> arg0 mat trans x) (the float (+ (- 1792 v1-66) (-> arg0 draw-pos x)))) + (set! (-> arg0 mat trans x) (the float (+ v1-66 1792 (-> arg0 draw-pos x)))) + ) + ) + ) + (set! (-> arg0 buf) s5-0) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch pointer vs none. +(defmethod draw-connection ((this minimap) (arg0 minimap-draw-work) (arg1 connection-minimap)) + (let ((s1-0 (target-pos 0))) + (cond + ((= (-> arg1 position) #t) + (let* ((s3-0 (handle->process (-> arg1 handle))) + (v1-4 (if (type? s3-0 process-drawable) + s3-0 + ) + ) + ) + (when (and v1-4 (nonzero? (-> (the-as process-drawable v1-4) root))) + (set! (-> arg1 last-world-pos quad) (-> (the-as process-drawable v1-4) root trans quad)) + (vector-! (-> arg1 last-relative-pos) s1-0 (-> arg1 last-world-pos)) + ) + ) + ) + ((and (= (logand (the-as int (-> arg1 position)) 7) 4) + (= (-> (the-as entity-actor (-> arg1 position)) type) entity-actor) + ) + (let* ((v1-15 (the-as structure (-> arg1 position))) + (s3-1 (if (the-as vector v1-15) + (-> (the-as entity-actor v1-15) extra process) + ) + ) + (a0-16 (if (type? s3-1 process-drawable) + s3-1 + ) + ) + ) + (cond + (a0-16 + (set! (-> arg1 last-world-pos quad) (-> (the-as process-drawable a0-16) root trans quad)) + (vector-! (-> arg1 last-relative-pos) s1-0 (-> arg1 last-world-pos)) + ) + (else + (set! (-> arg1 last-world-pos quad) (-> (the-as entity-actor (-> arg1 position)) extra trans quad)) + (vector-! (-> arg1 last-relative-pos) s1-0 (-> arg1 last-world-pos)) + ) + ) + ) + ) + (else + (set! (-> arg1 last-world-pos quad) (-> arg1 position quad)) + (vector-! (-> arg1 last-relative-pos) s1-0 (-> arg1 last-world-pos)) + ) + ) + (let ((s3-2 (new 'stack-no-clear 'vector)) + (s2-0 #f) + ) + 1.0 + 0.0 + (let ((f30-0 (/ 1.0 (* (-> this icon-inv-scale) (-> this meters-per-texel))))) + (set! (-> s3-2 quad) (-> arg1 last-relative-pos quad)) + (set! (-> s3-2 x) (* (-> s3-2 x) f30-0)) + (set! (-> s3-2 z) (* (-> s3-2 z) f30-0)) + (set! (-> s3-2 y) 0.0) + (set! (-> s3-2 w) 1.0) + (let* ((v1-29 s3-2) + (f28-0 (sqrtf (+ (* (-> v1-29 x) (-> v1-29 x)) (* (-> v1-29 z) (-> v1-29 z))))) + ) + (if (or (and (logtest? (minimap-flag local-only) (-> arg1 class flags)) + (not (logtest? (the-as minimap-flag (logand #x3c0000 (-> arg0 global-flags))) (-> arg1 class flags))) + ) + (logtest? (-> arg1 class flags) (minimap-flag bigmap-only)) + ) + (set! s2-0 #t) + ) + (cond + ((logtest? (-> arg1 class flags) (minimap-flag trail)) + (cond + (*trail-graph* + (let ((a2-2 (get-trail-for-connection this arg1 #f))) + (cond + ((not a2-2) + (when (!= (-> arg1 alpha) 0.0) + (when (not (get-trail-for-connection this arg1 #t)) + (let ((s2-1 (-> *minimap* engine alive-list))) + (while s2-1 + (let ((a1-15 s2-1)) + (if (and (= (-> a1-15 alpha) 0.0) (logtest? (-> arg1 class flags) (minimap-flag trail))) + (free-trail-by-connection *minimap* a1-15) + ) + ) + (set! s2-1 (-> s2-1 next)) + ) + ) + ) + ) + (set! s2-0 #t) + (set! (-> arg1 edge-ry) -131072) + ) + ((time-elapsed? (the-as int (-> a2-2 last-updated)) (seconds 5)) + (set! s2-0 #t) + (set! (-> arg1 edge-ry) -131072) + ) + ((< 50.0 f28-0) + (let ((s0-0 (new 'stack-no-clear 'vector))) + (set! (-> s0-0 quad) (-> s3-2 quad)) + (let ((s1-1 (get-icon-draw-pos *minimap* arg1 a2-2 s1-0 f30-0 s3-2))) + (if (not s1-1) + (vector-normalize-copy! s3-2 s0-0 50.0) + ) + (let ((f30-1 (atan (-> s3-2 x) (-> s3-2 z)))) + (let ((f28-1 (the float (-> arg1 edge-ry)))) + (when (!= f28-1 -131072.0) + (let* ((f0-20 (deg- f30-1 f28-1)) + (f1-7 (fabs f0-20)) + (f2-3 (* 16384.0 (seconds-per-frame))) + ) + (when (< f2-3 f1-7) + (set! f30-1 (+ f28-1 (if (>= f0-20 0.0) + f2-3 + (- f2-3) + ) + ) + ) + (set-vector! s3-2 (sin f30-1) 0.0 (cos f30-1) 1.0) + (vector-normalize! s3-2 (if s1-1 + 50.0 + 66.0 + ) + ) + ) + ) + ) + ) + (set! (-> arg1 edge-ry) (the int f30-1)) + ) + ) + ) + ) + (else + (set! (-> arg1 edge-ry) (the int (atan (-> s3-2 x) (-> s3-2 z)))) + ) + ) + ) + ) + (else + (set! s2-0 #t) + (set! (-> arg1 edge-ry) -131072) + ) + ) + ) + ((logtest? (-> arg1 class flags) (minimap-flag clamp)) + (cond + ((< 50.0 f28-0) + (let ((a1-22 (new 'stack-no-clear 'vector))) + (set! (-> a1-22 quad) (-> s3-2 quad)) + (vector-normalize-copy! s3-2 a1-22 54.0) + ) + (let ((f30-2 (atan (-> s3-2 x) (-> s3-2 z)))) + (let ((f28-2 (the float (-> arg1 edge-ry)))) + (when (!= f28-2 -131072.0) + (let* ((f0-37 (deg- f30-2 f28-2)) + (f1-9 (fabs f0-37)) + (f2-5 (* 16384.0 (seconds-per-frame))) + ) + (when (< f2-5 f1-9) + (set! f30-2 (+ f28-2 (if (>= f0-37 0.0) + f2-5 + (- f2-5) + ) + ) + ) + (set-vector! s3-2 (sin f30-2) 0.0 (cos f30-2) 1.0) + (vector-normalize! s3-2 54.0) + ) + ) + ) + ) + (set! (-> arg1 edge-ry) (the int f30-2)) + ) + ) + (else + (set! (-> arg1 edge-ry) (the int (atan (-> s3-2 x) (-> s3-2 z)))) + ) + ) + ) + (else + (if (< 50.0 f28-0) + (set! s2-0 #t) + ) + ) + ) + ) + ) + (if (or (logtest? (-> arg1 class flags) (minimap-flag frustum)) + (logtest? (-> arg1 class flags) (minimap-flag racer)) + (and (logtest? (-> arg1 class flags) (minimap-flag flash)) + (< (logand (-> *display* base-clock integral-frame-counter) 15) (seconds 0.027)) + ) + ) + (set! s2-0 #t) + ) + (if (logtest? (-> arg1 class flags) (minimap-flag goal)) + (set! (-> arg1 class icon-xy x) (the-as uint (mod (the int (-> this goal-time)) 6))) + ) + (when (not s2-0) + (vector-matrix*! s3-2 s3-2 (-> arg0 mat)) + (let ((v1-122 (-> arg0 buf base))) + (let* ((f0-52 (-> arg1 class scale)) + (a1-28 (-> arg1 class color)) + (a1-35 (copy-and-set-field a1-28 r (shr (* (-> a1-28 r) (the-as uint (-> this color x))) 7))) + (a1-42 (copy-and-set-field a1-35 g (shr (* (-> a1-35 g) (the-as uint (-> this color y))) 7))) + (a0-78 (copy-and-set-field + (copy-and-set-field a1-42 b (shr (* (-> a1-42 b) (the-as uint (-> this color z))) 7)) + a + (the int (* 128.0 (-> arg1 alpha))) + ) + ) + ) + (let ((f1-16 (* 20.0 (-> *video-params* relative-x-scale) f0-52)) + (f0-53 (* 20.0 f0-52)) + ) + (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)) + ) + (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))) + (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)) + (let ((t1-3 (the-as object (&+ v1-122 32)))) + (set! (-> (the-as (inline-array vector4w) t1-3) 0 x) (the-as int (-> a0-78 r))) + (set! (-> (the-as (inline-array vector4w) t1-3) 0 y) (the-as int (-> a0-78 g))) + (set! (-> (the-as (inline-array vector4w) t1-3) 0 z) (the-as int (-> a0-78 b))) + (set! (-> (the-as (inline-array vector4w) t1-3) 0 w) (the-as int (-> a0-78 a))) + ) + (let ((a0-80 (the-as (inline-array vector4w) (&+ v1-122 48)))) + (set! (-> a0-80 0 x) a3-1) + (set! (-> a0-80 0 y) t0-1) + (set! (-> a0-80 0 z) 0) + (set! (-> a0-80 0 w) 0) + ) + (let ((a0-81 (the-as object (&+ v1-122 64)))) + (set! (-> (the-as (inline-array vector4w) a0-81) 0 x) (the int (* 16.0 (-> arg0 corner 0 x)))) + (set! (-> (the-as (inline-array vector4w) a0-81) 0 y) (the int (* 16.0 (-> arg0 corner 0 z)))) + (set! (-> (the-as (inline-array vector4w) a0-81) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) a0-81) 0 w) 0) + ) + (let ((a0-82 (the-as (inline-array vector4w) (&+ v1-122 80)))) + (set! (-> a0-82 0 x) a1-65) + (set! (-> a0-82 0 y) a2-14) + (set! (-> a0-82 0 z) 0) + (set! (-> a0-82 0 w) 0) + ) + ) + ) + (let ((v1-123 (the-as object (&+ v1-122 96)))) + (set! (-> (the-as (inline-array vector4w) v1-123) 0 x) (the int (* 16.0 (-> arg0 corner 1 x)))) + (set! (-> (the-as (inline-array vector4w) v1-123) 0 y) (the int (* 16.0 (-> arg0 corner 1 z)))) + (set! (-> (the-as (inline-array vector4w) v1-123) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-123) 0 w) 0) + ) + ) + (&+! (-> arg0 buf base) 112) + ) + ) + ) + (none) + ) + +(defmethod draw-1 ((this minimap) (arg0 dma-buffer) (arg1 vector4w) (arg2 symbol)) + (local-vars (v1-35 uint128)) + (let ((gp-0 (new 'stack-no-clear 'minimap-draw-work))) + (set! (-> gp-0 buf) arg0) + (set! (-> gp-0 draw-pos quad) (-> arg1 quad)) + (set! (-> gp-0 justify-right) arg2) + (set! (-> gp-0 global-flags) (the-as uint 0)) + (if (= (status-of-level-and-borrows *level* 'ctywide #f) 'active) + (logior! (-> gp-0 global-flags) #x40000) + ) + (if (= (status-of-level-and-borrows *level* 'waswide #f) 'active) + (logior! (-> gp-0 global-flags) #x100000) + ) + (if (= (status-of-level-and-borrows *level* 'wasall #f) 'active) + (logior! (-> gp-0 global-flags) #x80000) + ) + (if (= (status-of-level-and-borrows *level* 'desert #f) 'active) + (logior! (-> gp-0 global-flags) #x200000) + ) + (sub-draw-1-1 this gp-0) + (sub-draw-1-2 this gp-0) + (when #t + (let ((s1-0 (-> gp-0 buf base)) + (s3-4 (get-texture mini-map-icons level-default-minimap)) + (s2-0 (-> *level* level-default texture-mask 8)) + ) + (cond + (s3-4 + (set! (-> (the-as (pointer uint128) s1-0) 0) (-> this adgif-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) s1-0) 1) (-> this adgif-tmpl quad 1)) + (adgif-shader<-texture-simple! (the-as adgif-shader (&-> (the-as (pointer uint128) s1-0) 2)) s3-4) + (&+! (-> gp-0 buf base) 112) + (let ((v1-34 (-> s2-0 mask quad)) + (a0-15 (-> s3-4 masks data 0 mask quad)) + ) + (.por v1-35 v1-34 a0-15) + ) + (set! (-> s2-0 mask quad) v1-35) + ) + (else + (format *stdebug* "minimap: mini-map-icons texture is #f~%") + ) + ) + ) + ) + (let ((s3-5 (-> *minimap* engine alive-list))) + (while s3-5 + (let ((a2-5 s3-5)) + (draw-connection this gp-0 a2-5) + ) + (set! s3-5 (-> s3-5 next)) + ) + ) + (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) + (set! (-> s0-0 y) 0.0) + (set! (-> s0-0 w) 0.0) + (vector-matrix*! s0-0 s0-0 (-> gp-0 mat)) + (let ((s3-6 (-> arg0 base)) + (s2-1 (get-texture map-target-marker level-default-minimap)) + (s1-1 (new 'stack-no-clear 'matrix)) + (v1-48 (the int (* 56.0 f30-0))) + ) + (when s2-1 + (set-vector! (-> s1-1 rvec) (* (-> s0-0 z) f30-0) 0.0 (- (-> s0-0 x)) 0.0) + (set-vector! (-> s1-1 uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> s1-1 fvec) (* (-> s0-0 x) f30-0) 0.0 (-> s0-0 z) 1.0) + (set-vector! (-> s1-1 trans) 0.0 0.0 (the float (+ (-> gp-0 draw-pos y) 1896)) 1.0) + (if (-> gp-0 justify-right) + (set! (-> s1-1 trans x) (the float (+ (- 1792 v1-48) (-> gp-0 draw-pos x)))) + (set! (-> s1-1 trans x) (the float (+ v1-48 1792 (-> gp-0 draw-pos x)))) + ) + (let ((f0-29 7.0)) + (set-vector! (-> gp-0 corner 0) 0.0 0.0 (- f0-29) 1.0) + (set-vector! (-> gp-0 corner 1) f0-29 0.0 0.0 1.0) + (set-vector! (-> gp-0 corner 2) (- f0-29) 0.0 0.0 1.0) + (set-vector! (-> gp-0 corner 3) 0.0 0.0 f0-29 1.0) + ) + (vector-matrix*! (the-as vector (-> gp-0 corner)) (the-as vector (-> gp-0 corner)) s1-1) + (vector-matrix*! (-> gp-0 corner 1) (-> gp-0 corner 1) s1-1) + (vector-matrix*! (-> gp-0 corner 2) (-> gp-0 corner 2) s1-1) + (vector-matrix*! (-> gp-0 corner 3) (-> gp-0 corner 3) s1-1) + (set! (-> (the-as (pointer uint128) s3-6) 0) (-> this adgif-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) s3-6) 1) (-> this adgif-tmpl quad 1)) + (adgif-shader<-texture-simple! (the-as adgif-shader (&-> (the-as (pointer uint128) s3-6) 2)) s2-1) + (set! (-> (the-as (pointer uint128) s3-6) 7) (-> this draw-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) s3-6) 8) (-> this draw-tmpl quad 1)) + (let ((v1-64 (the-as (inline-array vector4w) (&+ s3-6 144)))) + (set! (-> v1-64 0 x) 0) + (set! (-> v1-64 0 y) 255) + (set! (-> v1-64 0 z) 255) + (set! (-> v1-64 0 w) 128) + ) + (let ((v1-65 (the-as (inline-array vector4w) (&+ s3-6 160)))) + (set! (-> v1-65 0 x) 0) + (set! (-> v1-65 0 y) 0) + (set! (-> v1-65 0 z) #xffffff) + (set! (-> v1-65 0 w) 0) + ) + (let ((v1-66 (the-as object (&+ s3-6 176)))) + (set! (-> (the-as (inline-array vector4w) v1-66) 0 x) (the int (* 16.0 (-> gp-0 corner 0 x)))) + (set! (-> (the-as (inline-array vector4w) v1-66) 0 y) (the int (* 16.0 (-> gp-0 corner 0 z)))) + (set! (-> (the-as (inline-array vector4w) v1-66) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) v1-66) 0 w) 0) + ) + (let ((v1-67 (the-as object (&+ s3-6 192)))) + (set! (-> (the-as (inline-array vector4w) v1-67) 0 x) 256) + (set! (-> (the-as (inline-array vector4w) v1-67) 0 y) 0) + (set! (-> (the-as (inline-array vector4w) v1-67) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-67) 0 w) 0) + ) + (let ((v1-68 (the-as object (&+ s3-6 208)))) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 x) (the int (* 16.0 (-> gp-0 corner 1 x)))) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 y) (the int (* 16.0 (-> gp-0 corner 1 z)))) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 w) 0) + ) + (let ((v1-69 (the-as (inline-array vector4w) (&+ s3-6 224)))) + (set! (-> v1-69 0 x) 0) + (set! (-> v1-69 0 y) 256) + (set! (-> v1-69 0 z) #xffffff) + (set! (-> v1-69 0 w) 0) + ) + (let ((v1-70 (the-as object (&+ s3-6 240)))) + (set! (-> (the-as (inline-array vector4w) v1-70) 0 x) (the int (* 16.0 (-> gp-0 corner 2 x)))) + (set! (-> (the-as (inline-array vector4w) v1-70) 0 y) (the int (* 16.0 (-> gp-0 corner 2 z)))) + (set! (-> (the-as (inline-array vector4w) v1-70) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) v1-70) 0 w) 0) + ) + (let ((v1-71 (the-as object (&+ s3-6 256)))) + (set! (-> (the-as (inline-array vector4w) v1-71) 0 x) 256) + (set! (-> (the-as (inline-array vector4w) v1-71) 0 y) 256) + (set! (-> (the-as (inline-array vector4w) v1-71) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-71) 0 w) 0) + ) + (let ((v1-72 (the-as object (&+ s3-6 272)))) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 x) (the int (* 16.0 (-> gp-0 corner 3 x)))) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 y) (the int (* 16.0 (-> gp-0 corner 3 z)))) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 w) 0) + ) + (&+! (-> arg0 base) 288) + ) + ) + ) + ;; 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))) + ) + (reset-display-gs-state *display* (-> gp-0 buf)) + ) + 0 + (none) + ) + +(defmethod draw-sprite2 ((this minimap) (arg0 dma-buffer) (arg1 vector4w) (arg2 symbol)) + (local-vars (v1-47 uint128) (a0-8 uint128) (sv-176 int) (sv-192 int)) + (when (-> this race-tex) + (let ((s5-0 (new 'stack-no-clear 'minimap-draw-work))) + (set! (-> s5-0 buf) arg0) + (set! (-> s5-0 draw-pos quad) (-> arg1 quad)) + (set! (-> s5-0 justify-right) arg2) + (let ((v1-4 (the-as object (-> s5-0 buf base))) + (s3-0 (-> this race-tex)) + (s2-0 (-> this race-level texture-mask 8)) + ) + (when s3-0 + (set! (-> (the-as adgif-shader v1-4) quad 0 quad) (-> this adgif-tmpl dma-vif quad)) + (set! (-> (the-as adgif-shader v1-4) quad 1 quad) (-> this adgif-tmpl quad 1)) + (adgif-shader<-texture-simple! (the-as adgif-shader (&-> (the-as adgif-shader v1-4) miptbp1)) s3-0) + (&+! (-> s5-0 buf base) 112) + (let ((v1-8 (-> s2-0 mask quad)) + (a0-7 (-> s3-0 masks data 0 mask quad)) + ) + (.por a0-8 v1-8 a0-7) + ) + (set! (-> s2-0 mask quad) a0-8) + ) + ) + (let* ((f0-0 (-> *video-params* relative-x-scale)) + (s3-1 (-> arg0 base)) + (v1-11 (the int (* 128.0 f0-0))) + ) + 0 + 0 + (let ((s0-0 (* (+ (-> s5-0 draw-pos y) 1840) 16)) + (s2-1 (* (+ (-> s5-0 draw-pos y) 1968) 16)) + (s1-0 (-> s5-0 draw-pos z)) + ) + (cond + ((-> s5-0 justify-right) + (set! sv-176 (* (+ (- 1792 v1-11) (-> s5-0 draw-pos x)) 16)) + (set! sv-192 (* (+ (-> s5-0 draw-pos x) 1792) 16)) + sv-192 + ) + (else + (set! sv-176 (* (+ (-> s5-0 draw-pos x) 1792) 16)) + (set! sv-192 (* (+ v1-11 1792 (-> s5-0 draw-pos x)) 16)) + sv-192 + ) + ) + (set! (-> s5-0 draw-pos x) sv-176) + (set! (-> s5-0 draw-pos y) s0-0) + (set! (-> (the-as (pointer uint128) s3-1) 0) (-> this sprite2-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) s3-1) 1) (-> this sprite2-tmpl quad 1)) + (let ((v1-26 (-> this color quad))) + (set! (-> (the-as (pointer uint128) (&+ s3-1 32))) v1-26) + ) + (cond + ((get-horizontal-flip-flag *blit-displays-work*) + (let ((v1-28 (the-as object (&+ s3-1 48)))) + (set! (-> (the-as (inline-array vector) v1-28) 0 x) 0.0) + (set! (-> (the-as (inline-array vector) v1-28) 0 y) 0.0) + (set! (-> (the-as (inline-array vector) v1-28) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-28) 0 w) 0.0) + ) + (let ((a0-25 (the-as object (&+ s3-1 64)))) + (set! (-> (the-as (inline-array vector4w) a0-25) 0 x) sv-192) + (set! (-> (the-as (inline-array vector4w) a0-25) 0 y) s0-0) + (set! (-> (the-as (inline-array vector4w) a0-25) 0 z) s1-0) + (set! (-> (the-as (inline-array vector4w) a0-25) 0 w) 0) + ) + (let ((v1-30 (the-as object (&+ s3-1 80)))) + (set! (-> (the-as (inline-array vector) v1-30) 0 x) 1.0) + (set! (-> (the-as (inline-array vector) v1-30) 0 y) 1.0) + (set! (-> (the-as (inline-array vector) v1-30) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-30) 0 w) 0.0) + ) + (let ((v1-31 (the-as object (&+ s3-1 96)))) + (set! (-> (the-as (inline-array vector4w) v1-31) 0 x) sv-176) + (set! (-> (the-as (inline-array vector4w) v1-31) 0 y) s2-1) + (set! (-> (the-as (inline-array vector4w) v1-31) 0 z) s1-0) + (set! (-> (the-as (inline-array vector4w) v1-31) 0 w) 0) + ) + ) + (else + (let ((v1-32 (the-as object (&+ s3-1 48)))) + (set! (-> (the-as (inline-array vector) v1-32) 0 x) 0.0) + (set! (-> (the-as (inline-array vector) v1-32) 0 y) 0.0) + (set! (-> (the-as (inline-array vector) v1-32) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-32) 0 w) 0.0) + ) + (let ((a0-31 (the-as object (&+ s3-1 64)))) + (set! (-> (the-as (inline-array vector4w) a0-31) 0 x) sv-176) + (set! (-> (the-as (inline-array vector4w) a0-31) 0 y) s0-0) + (set! (-> (the-as (inline-array vector4w) a0-31) 0 z) s1-0) + (set! (-> (the-as (inline-array vector4w) a0-31) 0 w) 0) + ) + (let ((v1-34 (the-as object (&+ s3-1 80)))) + (set! (-> (the-as (inline-array vector) v1-34) 0 x) 1.0) + (set! (-> (the-as (inline-array vector) v1-34) 0 y) 1.0) + (set! (-> (the-as (inline-array vector) v1-34) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-34) 0 w) 0.0) + ) + (let ((v1-35 (the-as object (&+ s3-1 96)))) + (set! (-> (the-as (inline-array vector4w) v1-35) 0 x) sv-192) + (set! (-> (the-as (inline-array vector4w) v1-35) 0 y) s2-1) + (set! (-> (the-as (inline-array vector4w) v1-35) 0 z) s1-0) + (set! (-> (the-as (inline-array vector4w) v1-35) 0 w) 0) + ) + ) + ) + ) + ) + (&+! (-> arg0 base) 112) + (let ((s2-2 (the-as object (-> s5-0 buf base))) + (s4-1 (get-texture map-target-marker level-default-minimap)) + (s3-2 (-> this ctywide texture-mask 8)) + ) + (when s4-1 + (set! (-> (the-as (pointer uint128) s2-2)) (-> this adgif-tmpl dma-vif quad)) + (set! (-> (the-as adgif-shader s2-2) quad 1 quad) (-> this adgif-tmpl quad 1)) + (adgif-shader<-texture-simple! (the-as adgif-shader (&-> (the-as adgif-shader s2-2) miptbp1)) s4-1) + (&+! (-> s5-0 buf base) 112) + (let ((v1-46 (-> s3-2 mask quad)) + (a0-39 (-> s4-1 masks data 0 mask quad)) + ) + (.por v1-47 v1-46 a0-39) + ) + (set! (-> s3-2 mask quad) v1-47) + ) + ) + (let ((f30-0 (the float (/ (-> s5-0 draw-pos x) 16))) + (f28-0 (the float (/ (-> s5-0 draw-pos y) 16))) + (s4-2 (the-as connection-minimap #f)) + ) + (let ((s3-3 (-> *minimap* engine alive-list))) + (while s3-3 + (let ((s2-3 s3-3)) + (when (logtest? (-> s2-3 class flags) (minimap-flag racer)) + (if (string= (-> s2-3 class name) "racer-target") + (set! s4-2 s2-3) + (draw-racer-1 this s5-0 s2-3 (-> this race-scale) f30-0 f28-0) + ) + ) + ) + (set! s3-3 (-> s3-3 next)) + ) + ) + (if s4-2 + (draw-racer-1 this s5-0 s4-2 (-> this race-scale) f30-0 f28-0) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod set-race-texture ((this minimap) (arg0 texture) (arg1 float) (arg2 level)) + (set! (-> this race-tex) arg0) + (set! (-> this race-scale) arg1) + (set! (-> this race-level) arg2) + 0 + (none) + ) + +(defmethod set-race-corner ((this minimap) (arg0 float) (arg1 float)) + (set! (-> this race-corner x) arg0) + (set! (-> this race-corner z) arg1) + 0 + (none) + ) + +(defmethod set-color ((this minimap) (arg0 vector)) + (set! (-> this color quad) (-> arg0 quad)) + 0 + (none) + ) + +(defmethod minimap-class-node-method-9 ((this minimap-class-node)) + (let ((gp-0 (-> this flags))) + (when (and (logtest? (minimap-flag local-only) gp-0) (not (logtest? (minimap-flag transport) gp-0))) + (cond + ((and (logtest? (minimap-flag ctywide) gp-0) + (!= (status-of-level-and-borrows *level* 'ctywide 'ignore-borrow) 'active) + ) + (return #f) + ) + ((and (logtest? (minimap-flag wasall) gp-0) + (!= (status-of-level-and-borrows *level* 'wasall 'ignore-borrow) 'active) + ) + (return #f) + ) + ((and (logtest? (minimap-flag waswide) gp-0) + (!= (status-of-level-and-borrows *level* 'waswide 'ignore-borrow) 'active) + ) + (return #f) + ) + ((and (logtest? (minimap-flag desert) gp-0) + (!= (status-of-level-and-borrows *level* 'desert 'ignore-borrow) 'active) + ) + (return #f) + ) + ) + ) + ) + #t + ) diff --git a/goal_src/jak3/engine/ui/progress/progress-draw.gc b/goal_src/jak3/engine/ui/progress/progress-draw.gc index bd2ea1cf23..dc91c0aee2 100644 --- a/goal_src/jak3/engine/ui/progress/progress-draw.gc +++ b/goal_src/jak3/engine/ui/progress/progress-draw.gc @@ -7,3 +7,5062 @@ ;; DECOMP BEGINS +(define *progress-list-level* (new 'global 'progress-list-level)) + +;; WARN: disable def twice: 28. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod length ((this progress-list-level)) + (let ((gp-0 0)) + (let* ((v1-0 (-> this act)) + (act (cond + ((= v1-0 1) + (the-as game-task-node-flag (game-task-node-flag act1)) + ) + ((= v1-0 2) + (the-as game-task-node-flag (game-task-node-flag act2)) + ) + ((= v1-0 3) + (the-as game-task-node-flag (game-task-node-flag act3)) + ) + (else + (the-as game-task-node-flag (game-task-node-flag act1 act2 act3)) + ) + ) + ) + ) + (dotimes (s3-0 (-> *game-info* play-list length)) + (let* ((v1-3 (-> *game-info* play-list s3-0)) + (a0-6 (-> this mode)) + (a0-8 (cond + ((= a0-6 'select-pre-start) + (or (-> v1-3 play-continue) (-> v1-3 pre-play-continue)) + ) + ((or (= a0-6 'select-kiosk-start) (= a0-6 'select-kiosk-start-special)) + (-> v1-3 kiosk-play-continue) + ) + (else + (-> v1-3 play-continue) + ) + ) + ) + ) + (if (and a0-8 (and (-> v1-3 play-continue) + (let ((a1-5 (-> *game-info* sub-task-list (-> v1-3 play-node) flags))) + (logtest? a1-5 (the-as int act)) + ) + (lookup-text! *common-text* (-> v1-3 text-name) #t) + ) + ) + (+! gp-0 1) + ) + ) + ) + ) + gp-0 + ) + ) + +;; WARN: disable def twice: 29. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod progress-list-method-9 ((this progress-list-level) (arg0 int)) + (let* ((s4-0 0) + (v1-0 (-> this act)) + (act (cond + ((= v1-0 1) + (the-as game-task-node-flag (game-task-node-flag act1)) + ) + ((= v1-0 2) + (the-as game-task-node-flag (game-task-node-flag act2)) + ) + ((= v1-0 3) + (the-as game-task-node-flag (game-task-node-flag act3)) + ) + (else + (the-as game-task-node-flag (game-task-node-flag act1 act2 act3)) + ) + ) + ) + ) + (dotimes (s2-0 (-> *game-info* play-list length)) + (let* ((s1-0 (-> *game-info* play-list s2-0)) + (v1-3 (-> this mode)) + (v1-5 (cond + ((= v1-3 'select-pre-start) + (or (-> s1-0 play-continue) (-> s1-0 pre-play-continue)) + ) + ((or (= v1-3 'select-kiosk-start) (= v1-3 'select-kiosk-start-special)) + (-> s1-0 kiosk-play-continue) + ) + (else + (-> s1-0 play-continue) + ) + ) + ) + ) + (when (and v1-5 (and (-> s1-0 play-continue) + (let ((a0-11 (-> *game-info* sub-task-list (-> s1-0 play-node) flags))) + (logtest? a0-11 (the-as int act)) + ) + (lookup-text! *common-text* (-> s1-0 text-name) #t) + ) + ) + (if (= s4-0 arg0) + (return s1-0) + ) + (+! s4-0 1) + ) + ) + ) + ) + (the-as game-task-info #f) + ) + +(defmethod progress-method-53 ((this progress) (arg0 font-context)) + (let ((v1-1 (get-scissor-stack-top this))) + (let ((a0-1 arg0) + (f0-0 (-> v1-1 x)) + (f1-0 (-> v1-1 y)) + ) + (set! (-> a0-1 origin x) f0-0) + (set! (-> a0-1 origin y) f1-0) + ) + (let ((a0-2 arg0)) + (set! (-> a0-2 width) (- (-> v1-1 z) (-> v1-1 x))) + ) + (set! (-> arg0 height) (- (-> v1-1 w) (-> v1-1 y))) + ) + 0 + (none) + ) + +(defmethod get-language-by-idx ((this progress) (arg0 int)) + (if (and (= (scf-get-territory) 1) (zero? (-> this languages arg0))) + 11 + (-> this languages arg0) + ) + ) + +(defmethod progress-method-38 ((this progress) (arg0 font-context) (arg1 float)) + (let ((v1-1 (get-scissor-stack-top this))) + (set! (-> arg0 origin y) (+ (-> v1-1 y) (* (- (-> v1-1 w) (-> v1-1 y)) arg1))) + ) + 0 + (none) + ) + +(defmethod progress-method-37 ((this progress)) + (with-pp + (let ((gp-0 33)) + (if (< (seconds 0.027) (logand (-> pp clock integral-frame-counter) 15)) + (set-font-color + (the-as font-color gp-0) + (the-as int (the-as uint #x80ffffff)) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + ) + (set-font-color + (the-as font-color gp-0) + (the-as int (the-as uint #x80606060)) + (new 'static 'rgba :r #x60 :g #x60 :b #x60 :a #x80) + (new 'static 'rgba :r #x60 :g #x60 :b #x60 :a #x80) + (new 'static 'rgba :r #x60 :g #x60 :b #x60 :a #x80) + ) + ) + ) + (none) + ) + ) + +(defmethod progress-method-44 ((this progress) (arg0 font-context) (arg1 string)) + (let ((f0-1 (- 1.0 (-> this menu-transition)))) + (let ((v1-1 arg0)) + (set! (-> v1-1 scale) 0.5) + ) + (set! (-> arg0 alpha) f0-1) + ) + (print-game-text arg1 arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + 0 + (none) + ) + +(defmethod progress-method-45 ((this progress) + (arg0 font-context) + (arg1 float) + (arg2 float) + (arg3 string) + (arg4 float) + (arg5 float) + (arg6 int) + ) + (local-vars (sv-16 (function string font-context draw-string-result)) (sv-32 (function _varargs_ object))) + (let ((v1-0 arg0)) + (set! (-> v1-0 width) 10000.0) + ) + (let ((v1-1 arg0)) + (set! (-> v1-1 scale) arg4) + ) + (set! sv-16 get-string-length) + (set! sv-32 format) + (let ((a0-3 (clear *temp-string*)) + (a1-1 "~S") + (a2-1 arg3) + ) + (sv-32 a0-3 a1-1 a2-1) + ) + (let* ((a0-4 *temp-string*) + (a1-2 arg0) + (f0-2 (-> (sv-16 a0-4 a1-2) length)) + ) + (let ((v1-5 arg0)) + (set! (-> v1-5 width) arg1) + ) + (cond + ((< arg1 f0-2) + (cond + ((< (/ arg1 f0-2) arg5) + (let ((v1-6 arg0)) + (set! (-> v1-6 scale) arg4) + ) + ) + (else + (let ((v1-7 arg0)) + (set! (-> v1-7 scale) (/ (* arg1 arg4) f0-2)) + ) + ) + ) + ) + (else + (let ((v1-8 arg0)) + (set! (-> v1-8 scale) arg4) + ) + ) + ) + ) + (let ((s2-1 print-game-text)) + (format (clear *temp-string*) "~S" arg3) + (let ((f30-0 (s2-1 *temp-string* arg0 #t arg6 (bucket-id hud-draw-hud-alpha)))) + (+! (-> arg0 origin y) (* 0.5 (- arg2 f30-0))) + (let ((f28-0 (-> arg0 origin y))) + (let ((s3-1 print-game-text)) + (format (clear *temp-string*) "~S" arg3) + (s3-1 *temp-string* arg0 #f arg6 (bucket-id hud-draw-hud-alpha)) + ) + (set! (-> arg0 origin y) f28-0) + ) + f30-0 + ) + ) + ) + +(defmethod progress-method-40 ((this progress) (arg0 font-context) (arg1 int) (arg2 int) (arg3 float)) + (let* ((v1-1 (get-scissor-stack-top this)) + (a1-1 (the int (-> v1-1 x))) + (a3-1 (the int (- (-> v1-1 z) (-> v1-1 x)))) + (f0-6 (- 1.0 (-> this menu-transition))) + ) + (with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id particles) + ) + (draw-sprite2d-xy + s3-0 + a1-1 + arg1 + a3-1 + arg2 + (new 'static 'rgba :r #x80 :g #x80 :b #x40 :a (the int (* 64.0 f0-6))) + #x3fffff + ) + ) + ) + 0 + (none) + ) + +(defmethod progress-method-41 ((this progress) (arg0 progress-box) (arg1 float)) + (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id particles) + ) + (case (get-aspect-ratio) + (('aspect4x3) + (set! (-> arg0 aspect4x3 color w) (the int arg1)) + (draw-box-prim-only (-> arg0 aspect4x3) s4-0) + ) + (('aspect16x9) + (set! (-> arg0 aspect16x9 color w) (the int arg1)) + (draw-box-prim-only (-> arg0 aspect16x9) s4-0) + ) + ) + ) + 0 + (none) + ) + +(defmethod progress-method-42 ((this progress) (arg0 progress-box) (arg1 float)) + (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id particles) + ) + (case (get-aspect-ratio) + (('aspect4x3) + (set! (-> arg0 aspect4x3 color w) (the int arg1)) + (draw-box-alpha-2 (-> arg0 aspect4x3) s4-0) + ) + (('aspect16x9) + (set! (-> arg0 aspect16x9 color w) (the int arg1)) + (draw-box-alpha-2 (-> arg0 aspect16x9) s4-0) + ) + ) + ) + 0 + (none) + ) + +(defmethod progress-method-43 ((this progress) (arg0 progress-box) (arg1 float)) + (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id bucket6) + ) + (case (get-aspect-ratio) + (('aspect4x3) + (set! (-> arg0 aspect4x3 color w) (the int arg1)) + (draw-box-alpha-1 (-> arg0 aspect4x3) s4-0) + ) + (('aspect16x9) + (set! (-> arg0 aspect16x9 color w) (the int arg1)) + (draw-box-alpha-1 (-> arg0 aspect16x9) s4-0) + ) + ) + ) + 0 + (none) + ) + +(defmethod progress-method-46 ((this progress) (arg0 font-context) (arg1 float) (arg2 int)) + (progress-method-33 this (-> *progress-work* header)) + (let ((s3-0 (get-scissor-stack-top this))) + (let ((s1-0 *progress-work*)) + (progress-method-42 this (-> s1-0 header) (* 64.0 arg1)) + (progress-method-41 this (-> s1-0 header) (* 128.0 arg1)) + ) + (let ((a0-5 arg0)) + (set! (-> a0-5 flags) (font-flags kerning middle large)) + ) + (let ((a0-6 arg0)) + (set! (-> a0-6 color) (font-color font-color-32)) + ) + (let ((v1-12 arg0) + (f0-5 (+ 10.0 (-> s3-0 x))) + (f1-3 (-> s3-0 y)) + ) + (set! (-> v1-12 origin x) f0-5) + (set! (-> v1-12 origin y) f1-3) + ) + (progress-method-45 + this + arg0 + (+ (- -20.0 (-> s3-0 x)) (-> s3-0 z)) + 45.0 + (lookup-text! *common-text* (the-as text-id arg2) #f) + 0.95 + 0.1 + 32 + ) + ) + (progress-method-34 this) + 0 + (none) + ) + +(defmethod progress-method-47 ((this progress) (arg0 font-context) (arg1 symbol) (arg2 symbol)) + (let ((v1-0 arg0)) + (set! (-> v1-0 scale) 0.5) + ) + (let ((a0-2 arg0)) + (set! (-> a0-2 flags) (font-flags kerning large)) + ) + (set! (-> arg0 origin x) 250.0) + (case (get-aspect-ratio) + (('aspect4x3) + (when arg1 + (set! (-> arg0 origin y) 104.0) + (let ((s4-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 160) + (s4-1 *temp-string* arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + (when arg2 + (set! (-> arg0 origin y) 305.0) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 162) + (s5-1 *temp-string* arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + (('aspect16x9) + (when arg1 + (set! (-> arg0 origin y) 70.0) + (let ((s4-3 print-game-text)) + (format (clear *temp-string*) "~33L~C" 160) + (s4-3 *temp-string* arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + (when arg2 + (set! (-> arg0 origin y) 338.0) + (let ((s5-2 print-game-text)) + (format (clear *temp-string*) "~33L~C" 162) + (s5-2 *temp-string* arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod draw-prev-next-footer ((this progress) (arg0 font-context) (arg1 float)) + (local-vars (sv-16 string)) + (let ((s3-0 *progress-work*)) + (progress-method-33 this (-> s3-0 footer)) + (progress-method-42 this (-> s3-0 footer) (* 64.0 arg1)) + (progress-method-41 this (-> s3-0 footer) (* 128.0 arg1)) + ) + (let ((a0-4 arg0)) + (set! (-> a0-4 color) (font-color font-color-33)) + ) + (let ((v1-6 arg0)) + (set! (-> v1-6 scale) 0.6) + ) + (let ((s4-1 (get-scissor-stack-top this))) + (let ((v1-8 arg0) + (f0-6 (+ 10.0 (-> s4-1 x))) + (f1-4 (+ (-> s4-1 y) (* 0.5 (- (- (-> s4-1 w) (-> s4-1 y)) (* 32.0 (-> arg0 scale)))))) + ) + (set! (-> v1-8 origin x) f0-6) + (set! (-> v1-8 origin y) f1-4) + ) + (let ((v1-9 arg0)) + (set! (-> v1-9 width) (+ (- -20.0 (-> s4-1 x)) (-> s4-1 z))) + ) + (let ((a0-11 arg0)) + (set! (-> a0-11 flags) (font-flags kerning large)) + ) + (let ((s3-1 print-game-text)) + (let ((s2-0 format) + (s1-0 (clear *temp-string*)) + (s0-0 "~S~S") + ) + (set! sv-16 (lookup-text! *common-text* (text-id progress-footer-prev-l1) #f)) + (let ((a3-0 (lookup-text! *common-text* (text-id progress-prev) #f))) + (s2-0 s1-0 s0-0 sv-16 a3-0) + ) + ) + (s3-1 *temp-string* arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (set! (-> arg0 origin x) (+ -10.0 (-> s4-1 z))) + ) + (let ((a0-17 arg0)) + (set! (-> a0-17 flags) (font-flags kerning right large)) + ) + (let ((s4-2 print-game-text)) + (format + (clear *temp-string*) + "~S~S" + (lookup-text! *common-text* (text-id progress-next) #f) + (lookup-text! *common-text* (text-id progress-footer-next-r1) #f) + ) + (s4-2 *temp-string* arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (progress-method-34 this) + 0 + (none) + ) + +(defmethod draw-yes-no-style-footer ((this progress) (arg0 font-context) (arg1 text-id) (arg2 text-id)) + (local-vars (a0-5 string)) + (cond + ((-> this yes-no-choice) + (format + (clear *temp-string*) + "~33L~S~44L ~S" + (lookup-text! *common-text* arg1 #f) + (lookup-text! *common-text* arg2 #f) + ) + (set! a0-5 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~44L~S ~33L~S" + (lookup-text! *common-text* arg1 #f) + (lookup-text! *common-text* arg2 #f) + ) + (set! a0-5 *temp-string*) + ) + ) + (print-game-text a0-5 arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + 0 + (none) + ) + +;; ERROR: Stack slot load at 80 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 160 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 176 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 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 160 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 176 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 160 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 176 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 160 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 176 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 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 160 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 176 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 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 160 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 176 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 160 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 176 mismatch: defined as size 4, got size 16 +(defmethod progress-method-50 ((this progress) + (arg0 font-context) + (arg1 text-id) + (arg2 text-id) + (arg3 text-id) + (arg4 symbol) + (arg5 symbol) + (arg6 float) + ) + (local-vars + (sv-16 float) + (sv-20 string) + (sv-24 vector) + (sv-32 symbol) + (sv-48 (function progress font-context float float string float float int float)) + (sv-64 font-context) + (sv-80 float) + (sv-96 float) + (sv-112 (function progress font-context float float string float float int float)) + (sv-128 progress) + (sv-144 font-context) + (sv-160 float) + (sv-176 float) + ) + (set! sv-32 arg5) + (let ((s1-0 arg6)) + (set! sv-16 (fmax 0.0 (* 2.0 (- 0.5 (-> this menu-transition))))) + (set! sv-20 (the-as string #f)) + (set! sv-24 (get-scissor-stack-top this)) + (set! (-> arg0 alpha) sv-16) + (let ((a0-2 arg0)) + (set! (-> a0-2 flags) (font-flags kerning middle large)) + ) + (let ((f30-0 0.0)) + (cond + (sv-32 + (let ((a0-3 arg0)) + (set! (-> a0-3 color) (font-color font-color-32)) + ) + (set! (-> arg0 origin x) (+ 10.0 (-> sv-24 x))) + (let ((s0-1 this)) + (set! sv-48 (method-of-object s0-1 progress-method-45)) + (set! sv-64 arg0) + (set! sv-80 (+ (- -20.0 (-> sv-24 x)) (-> sv-24 z))) + (set! sv-96 (the-as float 24.5)) + (let* ((t0-1 (lookup-text! *common-text* arg1 #f)) + (t2-1 0.75) + (t3-1 35) + (t1-1 s1-0) + (f28-0 (sv-48 s0-1 sv-64 sv-80 sv-96 t0-1 t1-1 t2-1 t3-1)) + ) + (set! f30-0 (* 0.5 f28-0)) + (let ((v1-17 arg0)) + (set! (-> v1-17 scale) (* 0.5 (-> arg0 scale))) + ) + (let* ((a0-7 this) + (t9-3 (method-of-object a0-7 progress-method-40)) + (a1-3 arg0) + (a2-3 (the int (+ -1.0 (-> arg0 origin y)))) + (a3-2 (the int (+ 2.0 f28-0))) + (t0-2 sv-16) + ) + (t9-3 a0-7 a1-3 a2-3 a3-2 t0-2) + (+! (-> arg0 origin y) f28-0) + (set! sv-20 (cond + ((-> this yes-no-choice) + (format + (clear *temp-string*) + "~33L~S ~44L~S" + (lookup-text! *common-text* arg2 #f) + (lookup-text! *common-text* arg3 #f) + (the-as none t0-2) + (the-as none t1-1) + ) + *temp-string* + ) + (else + (format + (clear *temp-string*) + "~44L~S~33L ~S" + (lookup-text! *common-text* arg2 #f) + (lookup-text! *common-text* arg3 #f) + (the-as none t0-2) + (the-as none t1-1) + ) + *temp-string* + ) + ) + ) + ) + ) + ) + ) + (else + (cond + (arg4 + (let ((a0-16 arg0)) + (set! (-> a0-16 color) (font-color font-color-33)) + ) + ) + (else + (let ((a0-17 arg0)) + (set! (-> a0-17 color) (font-color font-color-32)) + ) + ) + ) + (set! (-> arg0 origin x) (+ 10.0 (-> sv-24 x))) + (set! sv-128 this) + (set! sv-112 (method-of-object sv-128 progress-method-45)) + (set! sv-144 arg0) + (set! sv-160 (+ (- -20.0 (-> sv-24 x)) (-> sv-24 z))) + (set! sv-176 (the-as float 24.5)) + (let ((t0-3 (the-as object (lookup-text! *common-text* arg1 #f)))) + (let* ((t1-2 s1-0) + (t2-2 0.75) + (t3-2 35) + (f28-1 (sv-112 sv-128 sv-144 sv-160 sv-176 (the-as string t0-3) t1-2 t2-2 t3-2)) + ) + (when arg4 + (let* ((a0-20 this) + (t9-14 (method-of-object a0-20 progress-method-40)) + (a1-12 arg0) + (a2-12 (the int (+ -1.0 (-> arg0 origin y)))) + (a3-6 (the int (+ 1.0 f28-1))) + ) + (set! t0-3 sv-16) + (t9-14 a0-20 a1-12 a2-12 a3-6 (the-as float t0-3)) + ) + ) + (+! (-> arg0 origin y) f28-1) + ) + (set! sv-20 (cond + ((-> this yes-no-choice) + (format + (clear *temp-string*) + "~1L~S~44L ~S" + (lookup-text! *common-text* arg2 #f) + (lookup-text! *common-text* arg3 #f) + (the-as none t0-3) + ) + *temp-string* + ) + (else + (format + (clear *temp-string*) + "~44L~S ~1L~S~1L" + (lookup-text! *common-text* arg2 #f) + (lookup-text! *common-text* arg3 #f) + (the-as none t0-3) + ) + *temp-string* + ) + ) + ) + ) + ) + ) + (progress-method-44 this arg0 sv-20) + (+! (-> arg0 origin y) f30-0) + ) + ) + 0 + (none) + ) + +(defmethod progress-method-51 ((this progress) (arg0 font-context)) + (let ((v1-1 (get-scissor-stack-top this))) + (let ((a0-1 arg0) + (f0-0 (-> v1-1 x)) + (f1-1 (+ (-> v1-1 y) (* 0.5 (- (-> v1-1 w) (-> v1-1 y))))) + ) + (set! (-> a0-1 origin x) f0-0) + (set! (-> a0-1 origin y) f1-1) + ) + (let ((a0-2 arg0)) + (set! (-> a0-2 width) (- (-> v1-1 z) (-> v1-1 x))) + ) + ) + (let ((v1-2 arg0)) + (set! (-> v1-2 scale) 0.6) + ) + (let ((a0-4 arg0)) + (set! (-> a0-4 flags) (font-flags kerning middle large)) + ) + (if (< (mod (current-time) 300) 210) + (print-game-text + (lookup-text! *common-text* (text-id progress-memcard-loading) #f) + arg0 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + 0 + (none) + ) + +(defmethod progress-method-52 ((this progress) + (arg0 font-context) + (arg1 string) + (arg2 float) + (arg3 float) + (arg4 float) + (arg5 float) + (arg6 float) + ) + (local-vars + (sv-80 float) + (sv-96 float) + (sv-112 vector) + (sv-128 int) + (sv-144 rgba) + (sv-160 dma-buffer) + (sv-176 pointer) + ) + (set! sv-80 arg3) + (let ((s1-0 arg4) + (s5-0 arg5) + ) + (set! sv-96 arg6) + (set! sv-112 (get-scissor-stack-top this)) + (let ((s0-0 (new 'stack 'hud-sprite)) + (f30-0 (* (- (-> sv-112 z) (-> sv-112 x)) s1-0)) + ) + (let ((s1-1 (- (- 256 (if sv-96 + 10 + 0 + ) + ) + (the int (* 0.5 f30-0)) + ) + ) + ) + (set! sv-128 (the int (+ (-> sv-112 y) (* (- (-> sv-112 w) (-> sv-112 y)) sv-80)))) + 1.0 + (let ((f28-0 f30-0)) + (let ((f24-0 (-> *video-params* relative-x-scale-reciprical)) + (f26-0 (-> *video-params* relative-x-scale)) + ) + (set! sv-160 (-> *display* frames (-> *display* on-screen) global-buf)) + (set! sv-176 (-> sv-160 base)) + (set! (-> s0-0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x37 :page #x11))) + ) + (if (-> s0-0 tid) + (set! (-> s0-0 scale-x) (/ (* f30-0 f24-0) (the float (-> (the-as texture (-> s0-0 tid)) w)))) + ) + (set! (-> s0-0 scale-y) 0.7) + (let ((v1-28 (-> s0-0 color-ptr))) + (set! (-> v1-28 0) 128) + (set! (-> v1-28 1) 128) + (set! (-> v1-28 2) 128) + (set! (-> v1-28 3) (the int (* 128.0 arg2))) + ) + (set-vector! (-> s0-0 pos) s1-1 sv-128 #x3fffff 0) + (draw s0-0 sv-160 (-> *level* level-default) #t) + (let ((f24-1 0.2)) + (set! (-> s0-0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x38 :page #x11))) + ) + (set! (-> s0-0 scale-x) f24-1) + (set! (-> s0-0 scale-y) 1.33) + (if (-> s0-0 tid) + (set! f28-0 (- f30-0 (* f24-1 f26-0 (the float (-> (the-as texture (-> s0-0 tid)) w))))) + ) + ) + (let* ((v1-39 (the int (* f28-0 s5-0))) + (a1-3 (+ s1-1 (the int (* 18.0 f26-0)) v1-39)) + (a3-2 (the int (- f28-0 (the float v1-39)))) + (t1-1 (shr (shl (the int (* 128.0 arg2)) 56) 32)) + ) + (draw-sprite2d-xy sv-160 a1-3 (+ sv-128 7) a3-2 9 (the-as rgba t1-1) #x3fffff) + ) + ) + (set-vector! (-> s0-0 pos) (+ s1-1 (the int (* f28-0 s5-0))) (+ sv-128 -4) #x3fffff 0) + ) + (draw s0-0 sv-160 (-> *level* level-default) #t) + (when sv-96 + (set! sv-144 (-> *font-work* color-table 32 color 0)) + (set! (-> s0-0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x39 :page #x11))) + ) + (set! (-> s0-0 scale-x) 1.0) + (set! (-> s0-0 scale-y) 1.0) + (let ((v1-55 (-> s0-0 color-ptr))) + (set! (-> v1-55 0) (the-as int (-> sv-144 r))) + (set! (-> v1-55 1) (the-as int (-> sv-144 g))) + (set! (-> v1-55 2) (the-as int (-> sv-144 b))) + (set! (-> v1-55 3) (the int (* 128.0 arg2))) + ) + (set-vector! (-> s0-0 pos) (+ s1-1 -20) (+ sv-128 -5) #x3fffff 0) + (draw s0-0 sv-160 (-> *level* level-default) #t) + (set! (-> s0-0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x3a :page #x11))) + ) + (set! (-> s0-0 scale-x) 1.0) + (set! (-> s0-0 scale-y) 1.0) + (set-vector! (-> s0-0 pos) (+ (the int f30-0) 8 s1-1) (+ sv-128 -5) #x3fffff 0) + (draw s0-0 sv-160 (-> *level* level-default) #t) + ) + (let ((a3-6 (-> sv-160 base))) + (when (!= sv-176 a3-6) + (let ((v1-68 (the-as object (-> sv-160 base)))) + (set! (-> (the-as dma-packet v1-68) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-68) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-68) vif1) (new 'static 'vif-tag)) + (set! (-> sv-160 base) (&+ (the-as pointer v1-68) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id hud-draw-hud-alpha) + sv-176 + (the-as (pointer dma-tag) a3-6) + ) + ) + ) + (let ((f0-43 0.5)) + (let ((v1-77 arg0)) + (set! (-> v1-77 scale) f0-43) + ) + (let ((a0-56 arg0)) + (set! (-> a0-56 flags) (font-flags kerning large)) + ) + (let ((v1-79 arg0) + (f1-14 (the float s1-1)) + (f2-3 (+ -20.0 (the float sv-128))) + ) + (set! (-> v1-79 origin x) f1-14) + (set! (-> v1-79 origin y) f2-3) + ) + (let ((f0-44 (progress-method-45 this arg0 f30-0 (* 32.0 f0-43) arg1 f0-43 0.75 32))) + (if (= (-> this option-index) (-> this current-index)) + (progress-method-40 this arg0 (the int (+ -2.0 (-> arg0 origin y))) (the int (+ 4.0 f0-44)) arg2) + ) + ) + ) + ) + (+! (-> arg0 origin x) f30-0) + ) + (let ((a0-62 arg0)) + (set! (-> a0-62 flags) (font-flags kerning right large)) + ) + (let ((s4-1 print-game-text)) + (format (clear *temp-string*) "~D%" (the int (* 100.0 s5-0))) + (s4-1 *temp-string* arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + (set! (-> arg0 flags) (font-flags kerning large)) + 0 + (none) + ) + +(defmethod draw-icon-array! ((this progress-icon-array) (arg0 int) (arg1 int) (arg2 float) (arg3 float) (arg4 rgba) (arg5 float)) + (local-vars (sv-96 int) (sv-112 int) (sv-128 dma-buffer) (sv-144 pointer)) + (set! sv-96 arg0) + (set! sv-112 arg1) + (let ((s5-0 arg2) + (s4-0 arg3) + (s1-0 arg4) + (s0-0 arg5) + (s3-0 (new 'stack 'hud-sprite)) + (s2-0 (new 'stack 'vector4w)) + ) + (set-vector! s2-0 sv-96 sv-112 0 1) + (let ((v1-3 (-> s3-0 color-ptr))) + (set! (-> v1-3 0) (the-as int (-> s1-0 r))) + (set! (-> v1-3 1) (the-as int (-> s1-0 g))) + (set! (-> v1-3 2) (the-as int (-> s1-0 b))) + (set! (-> v1-3 3) (the int (* s0-0 (the float (-> s1-0 a))))) + ) + (set! (-> s3-0 pos z) #xffffff) + (set! (-> s3-0 pos w) 1) + (set! (-> s3-0 scale-x) s5-0) + (set! (-> s3-0 scale-y) s4-0) + (dotimes (s1-1 (-> this length)) + (let ((s0-1 (-> this icons s1-1))) + (set! (-> s3-0 tid) (the-as texture-id (lookup-texture-by-id (-> s0-1 tex-id)))) + (set! (-> s3-0 flags) (the-as hud-sprite-flags (-> s0-1 flags))) + (set-as-offset-from! + (the-as hud-sprite (-> s3-0 pos)) + s2-0 + (the int (* (the float (-> s0-1 offset x)) s5-0)) + (the int (* (the float (-> s0-1 offset y)) s4-0)) + ) + (set! sv-128 (-> *display* frames (-> *display* on-screen) global-buf)) + (set! sv-144 (-> sv-128 base)) + (draw s3-0 sv-128 (-> *level* level-default) #t) + (let ((a3-3 (-> sv-128 base))) + (when (!= sv-144 a3-3) + (let ((v1-24 (the-as object (-> sv-128 base)))) + (set! (-> (the-as dma-packet v1-24) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-24) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-24) vif1) (new 'static 'vif-tag)) + (set! (-> sv-128 base) (&+ (the-as pointer v1-24) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (-> s0-1 bucket) + sv-144 + (the-as (pointer dma-tag) a3-3) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + 0 + (none) + ) + +(defmethod draw-option ((this menu-bigmap-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun sort-task-node-result ((arg0 int)) + (let ((v1-1 (-> *game-info* mission-list)) + (a1-1 (max 0 (+ arg0 -1))) + ) + (let ((a0-3 0)) + (while (> a1-1 0) + (while (< a0-3 a1-1) + (when (and (logtest? (-> v1-1 a0-3 flags) (game-task-node-flag closed)) + (logtest? (-> v1-1 (+ a0-3 1) flags) (game-task-node-flag closed)) + (< (-> v1-1 a0-3 close-time) (-> v1-1 (+ a0-3 1) close-time)) + ) + (let ((a2-19 (-> v1-1 a0-3))) + (set! (-> v1-1 a0-3) (-> v1-1 (+ a0-3 1))) + (set! (-> v1-1 (+ a0-3 1)) a2-19) + ) + ) + (+! a0-3 1) + ) + (+! a1-1 -1) + (set! a0-3 0) + ) + ) + ) + (none) + ) + +(defun find-mission-text-at-index ((arg0 progress) (arg1 int)) + (local-vars (v1-74 symbol)) + (when (< arg1 (-> arg0 current-line-index)) + (set! (-> arg0 current-task-index) (length (-> *game-info* sub-task-list))) + (set! (-> arg0 current-line-index) -1) + (set! (-> arg0 current-task) (game-task unknown)) + (set! (-> arg0 first-closed-line-index) -1) + (set! (-> arg0 extra-text-state) -1) + (set! (-> arg0 num-open-tasks-found) 0) + (set! (-> arg0 num-closed-tasks-found) 0) + 0 + ) + (let ((s4-0 (-> *game-info* sub-task-list))) + 0 + (let ((s3-0 (the-as game-task-node-info #f))) + (while (and (> (-> arg0 current-task-index) 0) (!= (-> arg0 current-line-index) arg1)) + (cond + ((or (= (-> arg0 extra-text-state) -1) (= (-> arg0 extra-text-state) 3)) + (+! (-> arg0 current-task-index) -1) + (let ((s2-0 (-> s4-0 (-> arg0 current-task-index)))) + (when (and (!= (-> s2-0 task) (-> arg0 current-task)) (nonzero? (-> s2-0 description))) + (cond + ((and (>= (-> arg0 first-closed-line-index) 0) (game-task-node-info-method-12 s2-0)) + (set! (-> arg0 current-task) (-> s2-0 task)) + ) + ((or (and (>= (-> arg0 first-closed-line-index) 0) (logtest? (-> s2-0 flags) (game-task-node-flag closed))) + (and (< (-> arg0 first-closed-line-index) 0) (game-task-node-info-method-12 s2-0)) + ) + (set! (-> arg0 current-task) (-> s2-0 task)) + (set! s3-0 (-> s4-0 (-> arg0 current-task-index))) + (-> s4-0 (-> arg0 current-task-index) description) + (if (< (-> arg0 first-closed-line-index) 0) + (+! (-> arg0 num-open-tasks-found) 1) + (set! (-> arg0 num-closed-tasks-found) 1) + ) + (+! (-> arg0 current-line-index) 1) + ) + ) + ) + ) + (when (and (zero? (-> arg0 current-task-index)) (!= (-> arg0 current-line-index) arg1)) + (set! (-> arg0 current-task-index) (length (-> *game-info* sub-task-list))) + (cond + ((< (-> arg0 first-closed-line-index) 0) + (set! (-> arg0 first-closed-line-index) arg1) + (+! (-> arg0 extra-text-state) (if (nonzero? (-> arg0 num-open-tasks-found)) + 2 + 1 + ) + ) + ) + (else + (+! (-> arg0 extra-text-state) (if (nonzero? (-> arg0 num-closed-tasks-found)) + 2 + 1 + ) + ) + ) + ) + ) + ) + ((zero? (-> arg0 extra-text-state)) + 114 + (+! (-> arg0 extra-text-state) 1) + (+! (-> arg0 current-line-index) 1) + ) + ((= (-> arg0 extra-text-state) 1) + 968 + #t + (let ((v1-73 (the-as symbol (-> arg0 num-open-tasks-found)))) + (set! v1-73 v1-73) + (cmove-#f-zero v1-74 v1-73 v1-73) + ) + (+! (-> arg0 extra-text-state) 1) + (+! (-> arg0 current-line-index) 1) + ) + ((= (-> arg0 extra-text-state) 4) + 114 + (+! (-> arg0 extra-text-state) 1) + (+! (-> arg0 current-line-index) 1) + ) + ((= (-> arg0 extra-text-state) 5) + 969 + (+! (-> arg0 extra-text-state) 2) + (+! (-> arg0 current-line-index) 1) + ) + (else + 0 + (+! (-> arg0 extra-text-state) 1) + (+! (-> arg0 current-line-index) 1) + ) + ) + ) + (cond + ((= (-> arg0 current-line-index) arg1) + (empty) + s3-0 + ) + (else + (the-as game-task-node-info #f) + ) + ) + ) + ) + ) + +(defmethod draw-option ((this menu-missions-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars + (sv-176 float) + (sv-180 game-task-node-info) + (sv-184 game-task-node-info) + (sv-188 float) + (sv-192 int) + (sv-200 symbol) + (sv-208 int) + (sv-216 (array game-task-node-info)) + (sv-224 string) + (sv-240 (function _varargs_ object)) + (sv-256 string) + (sv-272 game-task-node-info) + (sv-288 text-id) + (sv-304 (function string font-context symbol int bucket-id float)) + (sv-320 (function _varargs_ object)) + (sv-336 string) + (sv-352 string) + (sv-368 (function string font-context symbol int bucket-id float)) + (sv-384 (function _varargs_ object)) + ) + (set! sv-176 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (set! sv-180 (new 'stack 'game-task-node-info)) + (set! sv-184 (new 'stack 'game-task-node-info)) + (set! (-> arg0 current-task-index) (length (-> *game-info* sub-task-list))) + (set! (-> arg0 current-line-index) -1) + (set! (-> arg0 current-task) (game-task unknown)) + (set! (-> arg0 first-closed-line-index) -1) + (set! (-> arg0 extra-text-state) -1) + (set! (-> arg0 num-open-tasks-found) 0) + (set! (-> arg0 num-closed-tasks-found) 0) + (set! (-> arg1 alpha) sv-176) + (set! (-> *game-info* mission-list 0) sv-180) + (set! (-> sv-180 description) (text-id progress-missions-todo)) + (set! (-> sv-184 description) (text-id progress-missions-completed)) + (progress-method-33 arg0 (-> *progress-work* body-footer)) + (let ((s3-0 (get-scissor-stack-top arg0))) + (set! sv-188 (- (-> s3-0 w) (-> s3-0 y))) + (set! sv-192 1) + (set! sv-200 #t) + (set! sv-208 (length (-> *game-info* sub-task-list))) + (set! sv-216 (-> *game-info* mission-list)) + (dotimes (s2-0 sv-208) + (let ((v0-6 (find-mission-text-at-index arg0 s2-0))) + (when v0-6 + (when (and (logtest? (-> v0-6 flags) (game-task-node-flag closed)) sv-200) + (set! sv-200 (the-as symbol #f)) + (set! (-> sv-216 sv-192) sv-184) + (set! sv-192 (+ sv-192 1)) + ) + (set! (-> sv-216 sv-192) v0-6) + (set! sv-192 (+ sv-192 1)) + ) + ) + ) + (set! (-> arg0 total-num-tasks) sv-192) + (sort-task-node-result (-> arg0 total-num-tasks)) + (let ((a0-17 arg1)) + (set! (-> a0-17 flags) (font-flags kerning large)) + ) + (let ((v1-40 arg1)) + (set! (-> v1-40 scale) 0.5) + ) + (let ((f30-0 14.0) + (s2-1 get-string-length) + ) + (let ((s1-0 format) + (s0-0 (clear *temp-string*)) + ) + (set! sv-224 "~S") + (let ((a2-2 (lookup-text! *common-text* (text-id progress-missions-complete-icon) #f))) + (s1-0 s0-0 sv-224 a2-2) + ) + ) + (let ((f30-1 (+ f30-0 (-> (s2-1 *temp-string* arg1) length)))) + (let ((v1-45 arg1)) + (set! (-> v1-45 width) (+ (- (- -10.0 f30-1) (-> s3-0 x)) (-> s3-0 z))) + ) + (let ((s2-2 (-> *game-info* mission-list)) + (s1-2 (max 0 (the int (-> this current-index)))) + ) + (let* ((s0-1 (-> s2-2 s1-2)) + (a1-10 + (if (and (logtest? (-> s0-1 flags) (game-task-node-flag closed)) (task-complete? *game-info* (-> s0-1 task))) + (-> *game-info* play-list (-> s0-1 task) text-name) + (-> s0-1 description) + ) + ) + ) + (set! sv-256 (lookup-text! *common-text* a1-10 #f)) + ) + (let ((s0-2 print-game-text)) + (set! sv-240 format) + (let ((a0-29 (clear *temp-string*)) + (a1-11 "~S") + ) + (sv-240 a0-29 a1-11 sv-256) + ) + (let ((f28-0 (s0-2 *temp-string* arg1 #t 44 (bucket-id hud-draw-hud-alpha)))) + (let* ((v1-60 arg1) + (f0-14 (+ 10.0 (-> s3-0 x))) + (f1-6 4.0) + (f2-2 (-> this current-index)) + (f1-8 (+ (- f1-6 (* f28-0 (- f2-2 (* (the float (the int (/ f2-2 1.0))) 1.0)))) (-> s3-0 y))) + ) + (set! (-> v1-60 origin x) f0-14) + (set! (-> v1-60 origin y) f1-8) + ) + (let ((v1-61 arg1)) + (set! (-> v1-61 height) sv-188) + ) + (while (and (< (-> arg1 origin y) (-> s3-0 w)) (< s1-2 (-> arg0 total-num-tasks))) + (set! sv-272 (-> s2-2 s1-2)) + (if (and (logtest? (-> sv-272 flags) (game-task-node-flag closed)) (task-complete? *game-info* (-> sv-272 task))) + (set! sv-288 (-> *game-info* play-list (-> sv-272 task) text-name)) + (set! sv-288 (-> sv-272 description)) + ) + (let ((s0-3 (lookup-text! *common-text* sv-288 #f))) + (set! (-> arg1 origin x) (+ 10.0 (-> s3-0 x))) + (cond + ((or (= sv-288 (text-id progress-missions-todo)) (= sv-288 (text-id progress-missions-completed))) + (let ((a0-41 arg1)) + (set! (-> a0-41 color) (font-color font-color-34)) + ) + ) + (else + (set! sv-304 print-game-text) + (set! sv-320 format) + (set! sv-336 (clear *temp-string*)) + (set! sv-352 "~S") + (let ((a2-8 (lookup-text! + *common-text* + (if (logtest? (-> sv-272 flags) (game-task-node-flag closed)) + (text-id progress-missions-complete-icon) + (text-id progress-missions-todo-icon) + ) + #f + ) + ) + ) + (sv-320 sv-336 sv-352 a2-8) + ) + (let ((a0-45 *temp-string*) + (a1-17 arg1) + (a2-9 #f) + (a3-2 44) + (t0-2 579) + ) + (sv-304 a0-45 a1-17 a2-9 a3-2 (the-as bucket-id t0-2)) + ) + (let ((a0-46 arg1)) + (set! (-> a0-46 color) (font-color font-color-32)) + ) + (set! (-> arg1 origin x) (+ (-> s3-0 x) f30-1)) + ) + ) + (let ((f26-0 (-> arg1 origin y))) + (set! sv-368 print-game-text) + (set! sv-384 format) + (let ((a0-48 (clear *temp-string*)) + (a1-18 "~S") + ) + (sv-384 a0-48 a1-18 s0-3) + ) + (let ((a0-49 *temp-string*) + (a1-19 arg1) + (a2-11 #f) + (a3-3 44) + (t0-3 579) + ) + (set! (-> arg1 origin y) (+ f26-0 (sv-368 a0-49 a1-19 a2-11 a3-3 (the-as bucket-id t0-3)))) + ) + ) + ) + (+! s1-2 1) + ) + (set! (-> this on-screen) (the-as basic (< (-> arg1 origin y) (-> s3-0 w)))) + (seek! + (-> this current-index) + (-> this target-index) + (* (/ (-> this scroll-speed) f28-0) (seconds-per-frame)) + ) + ) + ) + ) + ) + ) + ) + (progress-method-34 arg0) + (let ((s3-1 *progress-work*)) + (progress-method-46 arg0 arg1 sv-176 106) + (progress-method-42 arg0 (-> s3-1 footer) (* 64.0 sv-176)) + (progress-method-41 arg0 (-> s3-1 footer) (* 128.0 sv-176)) + ) + (progress-method-47 + arg0 + arg1 + (!= (-> this current-index) 0.0) + (and (not (-> this on-screen)) (!= (-> this current-index) (the float (+ (-> arg0 total-num-tasks) -1)))) + ) + 0 + (none) + ) + +(defmethod highscore-time->string ((this highscore-page-info) (arg0 float)) + 0 + 0 + 0 + (let* ((gp-0 (the int (* 0.016666668 arg0))) + (v1-5 (- arg0 (* 60.0 (the float gp-0)))) + (s5-0 (the int v1-5)) + (v1-6 (- v1-5 (the float s5-0))) + (s3-0 (the int (* 100.0 v1-6))) + ) + (format (clear *temp-string*) "~d:~2,'0,d:~2,'0,d" gp-0 s5-0 s3-0) + ) + *temp-string* + ) + +(defmethod highscore-page-info-method-10 ((this highscore-page-info) (arg0 font-context) (arg1 float) (arg2 float) (arg3 float)) + (let ((v1-3 (-> *highscore-info-array* (-> this game-score)))) + (let ((a1-2 arg0) + (f0-0 arg2) + (f1-0 arg3) + ) + (set! (-> a1-2 origin x) f0-0) + (set! (-> a1-2 origin y) f1-0) + ) + (cond + ((logtest? (-> v1-3 flags) (highscore-flags hf2)) + (print-game-text + (highscore-time->string this (* 0.0033333334 arg1)) + arg0 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + ((logtest? (-> v1-3 flags) (highscore-flags hf3)) + (let ((s4-1 print-game-text)) + (format (clear *temp-string*) "~,,1Mm" arg1) + (s4-1 *temp-string* arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + (else + (let ((s4-2 print-game-text)) + (format (clear *temp-string*) "~D" (the int arg1)) + (s4-2 *temp-string* arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod highscore-page-info-method-11 ((this highscore-page-info) (arg0 font-context) (arg1 int) (arg2 float) (arg3 float) (arg4 float)) + (local-vars (sv-16 string) (sv-32 string)) + (set! (-> arg0 origin x) arg3) + (let ((a0-1 arg0)) + (set! (-> a0-1 flags) (font-flags kerning large)) + ) + (let ((s1-0 print-game-text)) + (let ((s0-0 format)) + (set! sv-16 (clear *temp-string*)) + (set! sv-32 "~S") + (let ((a2-2 (lookup-text! *common-text* (the-as text-id arg1) #f))) + (s0-0 sv-16 sv-32 a2-2) + ) + ) + (s1-0 *temp-string* arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (let ((a0-6 arg0)) + (set! (-> a0-6 flags) (font-flags kerning right large)) + ) + (highscore-page-info-method-10 this arg0 arg2 arg4 (-> arg0 origin y)) + 0 + (none) + ) + +(defmethod highscore-page-info-method-9 ((this highscore-page-info) (arg0 progress) (arg1 font-context) (arg2 float) (arg3 float)) + (local-vars + (sv-16 highscore-info) + (sv-32 (function string font-context symbol int bucket-id float)) + (sv-48 (function _varargs_ object)) + (sv-64 string) + (sv-80 string) + (sv-96 int) + (sv-112 int) + ) + (let ((s3-0 (get-scissor-stack-top arg0))) + (let ((f28-0 (-> *video-params* relative-x-scale))) + (set! sv-16 (-> *highscore-info-array* (-> this game-score))) + (let ((f30-0 (- (-> s3-0 z) (-> s3-0 x))) + (s0-0 *progress-work*) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning large)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 scale) 0.675) + ) + (let ((a0-5 arg1)) + (set! (-> a0-5 color) (font-color font-color-32)) + ) + (set! (-> arg1 origin x) (+ 10.0 arg2 (-> s3-0 x))) + (progress-method-38 arg0 arg1 0.01) + (let ((v1-11 arg1)) + (set! (-> v1-11 width) (* 0.75 f30-0)) + ) + (set! sv-32 print-game-text) + (set! sv-48 format) + (set! sv-64 (clear *temp-string*)) + (set! sv-80 "~S") + (let ((a2-3 (lookup-text! *common-text* (-> this text) #f))) + (sv-48 sv-64 sv-80 a2-3) + ) + (let ((a0-11 *temp-string*) + (a1-4 arg1) + (a2-4 #f) + (a3-1 32) + (t0-1 579) + ) + (sv-32 a0-11 a1-4 a2-4 a3-1 (the-as bucket-id t0-1)) + ) + (draw-icon-array! + (-> *progress-icon-arrays* (-> this icon)) + (the int (+ (- (-> s3-0 z) (* (-> this icon-offsetx) f28-0)) arg2)) + (the int (+ (-> s3-0 y) (-> this icon-offsety))) + (-> this icon-scalex) + (-> this icon-scaley) + (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a (the int (* 128.0 arg3))) + arg3 + ) + (when (not (logtest? (-> sv-16 flags) (highscore-flags hf1))) + (let ((f28-1 (* 20.0 f28-0)) + (f26-0 (+ 50.0 (-> s3-0 y))) + ) + (set! sv-96 (the int (+ 48.0 (-> s3-0 y)))) + (set! sv-112 (logior #x808080 (shr (shl (the int (* 128.0 arg3)) 56) 32))) + (let ((f24-0 0.25) + (f22-0 (+ 10.0 arg2 (-> s3-0 x))) + ) + (let ((v1-33 arg1)) + (set! (-> v1-33 scale) 0.45) + ) + (let ((f20-0 f22-0)) + (draw-icon-array! (-> *progress-icon-arrays* 63) (the int f20-0) sv-96 f24-0 f24-0 (the-as rgba sv-112) arg3) + (highscore-page-info-method-10 this arg1 (-> sv-16 gold-score) (+ f20-0 f28-1) f26-0) + ) + (let ((f20-1 (+ f22-0 (* 0.333 f30-0)))) + (draw-icon-array! (-> *progress-icon-arrays* 64) (the int f20-1) sv-96 f24-0 f24-0 (the-as rgba sv-112) arg3) + (highscore-page-info-method-10 this arg1 (-> sv-16 silver-score) (+ f20-1 f28-1) f26-0) + ) + (let ((f30-1 (+ f22-0 (* 0.667 f30-0)))) + (let* ((a0-23 (-> *progress-icon-arrays* 65)) + (t9-11 (method-of-object a0-23 draw-icon-array!)) + (a1-10 (the int f30-1)) + (a3-7 f24-0) + (t0-7 f24-0) + (t2-3 arg3) + ) + (t9-11 a0-23 a1-10 sv-96 a3-7 t0-7 (the-as rgba sv-112) t2-3) + ) + (highscore-page-info-method-10 this arg1 (-> sv-16 bronze-score) (+ f30-1 f28-1) f26-0) + ) + ) + ) + ) + (progress-method-42 arg0 (-> s0-0 highscore-1) (* 16.0 arg3)) + (progress-method-41 arg0 (-> s0-0 highscore-1) (* 128.0 arg3)) + (progress-method-41 arg0 (-> s0-0 highscore-0) (* 128.0 arg3)) + (progress-method-33 arg0 (-> s0-0 highscore-body)) + ) + ) + (let ((f30-2 (+ 10.0 arg2 (-> s3-0 x))) + (f28-2 (+ -10.0 arg2 (-> s3-0 z))) + (s3-1 (get-game-score-ref *game-info* (the-as int (-> this game-score)))) + ) + (let ((v1-61 arg1)) + (set! (-> v1-61 scale) 0.6) + ) + (progress-method-38 arg0 arg1 0.03) + (highscore-page-info-method-11 this arg1 56 (-> s3-1 0) f30-2 f28-2) + (let ((v1-64 arg1)) + (set! (-> v1-64 scale) 0.5) + ) + (progress-method-38 arg0 arg1 0.18) + (highscore-page-info-method-11 this arg1 57 (-> s3-1 1) f30-2 f28-2) + (let ((v1-67 arg1)) + (set! (-> v1-67 scale) 0.45) + ) + (progress-method-38 arg0 arg1 0.31) + (highscore-page-info-method-11 this arg1 58 (-> s3-1 2) f30-2 f28-2) + (let ((v1-70 arg1)) + (set! (-> v1-70 scale) 0.425) + ) + (progress-method-38 arg0 arg1 0.43) + (highscore-page-info-method-11 this arg1 59 (-> s3-1 3) f30-2 f28-2) + (progress-method-38 arg0 arg1 0.545) + (highscore-page-info-method-11 this arg1 60 (-> s3-1 4) f30-2 f28-2) + (progress-method-38 arg0 arg1 0.66) + (highscore-page-info-method-11 this arg1 61 (-> s3-1 5) f30-2 f28-2) + (progress-method-38 arg0 arg1 0.775) + (highscore-page-info-method-11 this arg1 62 (-> s3-1 6) f30-2 f28-2) + (progress-method-38 arg0 arg1 0.89) + (highscore-page-info-method-11 this arg1 63 (-> s3-1 7) f30-2 f28-2) + ) + ) + (progress-method-34 arg0) + 0 + (none) + ) + +(defmethod draw-option ((this menu-highscores-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (s4-0 *progress-work*) + ) + (set! (-> arg1 alpha) f30-0) + (let ((a0-1 arg1)) + (set! (-> a0-1 flags) (font-flags kerning middle large)) + ) + (progress-method-33 arg0 (-> s4-0 body-footer)) + (progress-method-53 arg0 arg1) + (let ((f28-0 (the float (menu-highscores-option-method-12 this)))) + (let* ((f0-2 (-> this current-index)) + (f26-0 (- f0-2 (* (the float (the int (/ f0-2 f28-0))) f28-0))) + (f0-4 (+ 1.0 f26-0)) + (f0-5 (- f0-4 (* (the float (the int (/ f0-4 f28-0))) f28-0))) + (s2-0 (-> this pages (the int f26-0))) + (s3-1 (-> this pages (the int f0-5))) + (s1-0 (get-scissor-stack-top arg0)) + (f0-8 (- (-> s1-0 z) (-> s1-0 x))) + ) + (when (!= f28-0 0.0) + (let ((f26-1 (* (- 1.0 (- f26-0 (* (the float (the int (/ f26-0 1.0))) 1.0))) f0-8))) + (set! (-> arg1 origin x) (+ (- f26-1 f0-8) (-> s1-0 x))) + ((method-of-type highscore-page-info highscore-page-info-method-9) + (the-as highscore-page-info s2-0) + arg0 + arg1 + (- f26-1 f0-8) + f30-0 + ) + (when (< 1.0 f28-0) + (set! (-> arg1 origin x) (+ f26-1 (-> s1-0 x))) + ((method-of-type highscore-page-info highscore-page-info-method-9) + (the-as highscore-page-info s3-1) + arg0 + arg1 + f26-1 + f30-0 + ) + ) + ) + ) + ) + (progress-method-34 arg0) + (progress-method-46 arg0 arg1 f30-0 55) + (cond + ((< 1.0 f28-0) + (draw-prev-next-footer arg0 arg1 f30-0) + ) + (else + (progress-method-42 arg0 (-> s4-0 footer) (* 64.0 f30-0)) + (progress-method-41 arg0 (-> s4-0 footer) (* 128.0 f30-0)) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod inventory-item-method-10 ((this inventory-item) (arg0 progress) (arg1 font-context) (arg2 float) (arg3 float) (arg4 symbol)) + (let ((s5-0 #x20000000)) + (when (item-obtained? this) + (if arg4 + (set! s5-0 (the-as int (the-as uint #x80ffffff))) + (set! s5-0 (the-as int (the-as uint #x80808080))) + ) + ) + (let ((s3-1 (new 'stack 'vector2)) + (v1-9 (get-scissor-stack-top arg0)) + (f0-0 (-> this icon-scale)) + ) + (set! (-> s3-1 x) (+ (-> v1-9 x) (* (- (-> v1-9 z) (-> v1-9 x)) (-> this offset x)) arg2)) + (set! (-> s3-1 y) (+ (-> v1-9 y) (* (- (-> v1-9 w) (-> v1-9 y)) (-> this offset y)))) + (draw-icon-array! + (-> *progress-icon-arrays* (-> this icon)) + (the int (-> s3-1 x)) + (the int (-> s3-1 y)) + f0-0 + f0-0 + (the-as rgba s5-0) + arg3 + ) + ) + ) + 0 + (none) + ) + +(defmethod inventory-item-group-method-10 ((this inventory-item-group) (arg0 progress) (arg1 font-context) (arg2 float) (arg3 float) (arg4 int)) + (local-vars + (sv-16 (function string font-context symbol int bucket-id float)) + (sv-32 (function _varargs_ object)) + (sv-48 string) + (sv-64 string) + ) + (dotimes (s0-0 (-> this items length)) + (when (and arg4 (have-items? this)) + (let ((v1-3 arg1)) + (set! (-> v1-3 scale) 0.45) + ) + (progress-method-38 arg0 arg1 0.9) + (set! sv-16 print-game-text) + (set! sv-32 format) + (set! sv-48 (clear *temp-string*)) + (set! sv-64 "~S") + (let ((a2-3 (lookup-text! *common-text* (-> this name) #f))) + (sv-32 sv-48 sv-64 a2-3) + ) + (let ((a0-7 *temp-string*) + (a1-4 arg1) + (a2-4 #f) + (a3-1 44) + (t0-1 579) + ) + (sv-16 a0-7 a1-4 a2-4 a3-1 (the-as bucket-id t0-1)) + ) + ) + (inventory-item-method-10 (-> this items s0-0) arg0 arg1 arg2 arg3 (the-as symbol arg4)) + ) + 0 + (none) + ) + +(defmethod inventory-screen-method-9 ((this inventory-screen) (arg0 progress) (arg1 font-context) (arg2 float) (arg3 float)) + (local-vars (sv-16 string) (sv-32 string)) + (let ((v1-0 arg1)) + (set! (-> v1-0 scale) 0.45) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color font-color-32)) + ) + (progress-method-38 arg0 arg1 0.01) + (let ((s1-0 print-game-text)) + (let ((s0-0 format)) + (set! sv-16 (clear *temp-string*)) + (set! sv-32 "~S") + (let ((a2-3 (lookup-text! *common-text* (-> this name) #f))) + (s0-0 sv-16 sv-32 a2-3) + ) + ) + (s1-0 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (dotimes (s1-1 (-> this groups length)) + (inventory-item-group-method-10 + (-> this groups s1-1) + arg0 + arg1 + arg2 + arg3 + (the-as int (= s1-1 (-> this current-index))) + ) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-inventory) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (set! (-> arg1 alpha) f30-0) + (let ((a0-1 arg1)) + (set! (-> a0-1 flags) (font-flags kerning middle large)) + ) + (progress-method-33 arg0 (-> *progress-work* body-footer)) + (progress-method-53 arg0 arg1) + (let* ((f0-2 (the float (-> this screens length))) + (f28-0 (-> this current-index)) + (f1-3 (+ 1.0 f28-0)) + (f0-4 (- f1-3 (* (the float (the int (/ f1-3 f0-2))) f0-2))) + (s3-0 (-> this screens (the int f28-0))) + (s4-1 (-> this screens (the int f0-4))) + (s2-0 (get-scissor-stack-top arg0)) + (f0-7 (- (-> s2-0 z) (-> s2-0 x))) + (f28-1 (* (- 1.0 (- f28-0 (* (the float (the int (/ f28-0 1.0))) 1.0))) f0-7)) + ) + (set! (-> arg1 origin x) (+ (- f28-1 f0-7) (-> s2-0 x))) + (inventory-screen-method-9 s3-0 arg0 arg1 (- f28-1 f0-7) f30-0) + (set! (-> arg1 origin x) (+ f28-1 (-> s2-0 x))) + (inventory-screen-method-9 s4-1 arg0 arg1 f28-1 f30-0) + ) + (progress-method-34 arg0) + (progress-method-46 arg0 arg1 f30-0 1995) + (draw-prev-next-footer arg0 arg1 f30-0) + ) + 0 + (none) + ) + +(defmethod controls-string-info-method-9 ((this controls-string-info) + (arg0 progress) + (arg1 font-context) + (arg2 float) + (arg3 float) + (arg4 float) + (arg5 float) + (arg6 float) + ) + (local-vars + (sv-48 float) + (sv-64 (function string font-context symbol int bucket-id float)) + (sv-80 (function _varargs_ object)) + (sv-96 string) + (sv-112 string) + (sv-128 (function _varargs_ object)) + (sv-144 string) + (sv-160 string) + ) + (set! sv-48 arg4) + (let ((s0-0 arg5) + (s3-0 arg6) + (s2-0 (get-scissor-stack-top arg0)) + ) + 0.0 + 0.0 + (set! (-> arg1 origin x) (+ 10.0 arg2)) + (let ((v1-2 arg1)) + (set! (-> v1-2 width) (+ -20.0 sv-48)) + ) + (set! sv-64 print-game-text) + (set! sv-80 format) + (set! sv-96 (clear *temp-string*)) + (set! sv-112 "~S") + (let ((a2-2 (lookup-text! *common-text* (-> this action) #f))) + (sv-80 sv-96 sv-112 a2-2) + ) + (let* ((a0-7 *temp-string*) + (a1-3 arg1) + (a2-3 #f) + (a3-1 40) + (t0-1 579) + (f30-0 (sv-64 a0-7 a1-3 a2-3 a3-1 (the-as bucket-id t0-1))) + ) + (set! (-> arg1 origin x) (+ 10.0 arg3)) + (let ((v1-8 arg1)) + (set! (-> v1-8 width) (+ -20.0 s0-0)) + ) + (let ((s0-1 print-game-text)) + (set! sv-128 format) + (set! sv-144 (clear *temp-string*)) + (set! sv-160 "~S") + (let ((a2-5 (lookup-text! *common-text* (-> this button) #f))) + (sv-128 sv-144 sv-160 a2-5) + ) + (let* ((f0-11 (s0-1 *temp-string* arg1 #f 40 (bucket-id hud-draw-hud-alpha))) + (f30-1 (+ 8.0 (fmax f30-0 f0-11))) + ) + (let ((s1-1 (new 'stack 'hud-box)) + (f28-0 (+ arg3 (* 0.5 (- (-> s2-0 z) (-> s2-0 x))))) + ) + (set! (-> s1-1 box min y) (+ -6.0 (-> arg1 origin y))) + (set! (-> s1-1 box max y) (+ (-> s1-1 box min y) f30-1)) + (set-vector! (-> s1-1 color) 192 192 96 (the int (* 128.0 s3-0))) + (with-dma-buffer-add-bucket ((s2-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id particles) + ) + (set! (-> s1-1 box min x) arg2) + (set! (-> s1-1 box max x) arg3) + (draw-box-prim-only s1-1 s2-1) + (set! (-> s1-1 box min x) arg3) + (set! (-> s1-1 box max x) f28-0) + (draw-box-prim-only s1-1 s2-1) + ) + ) + (+! (-> arg1 origin y) f30-1) + ) + ) + ) + ) + 0 + (none) + ) + +;; ERROR: Stack slot load at 64 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 64 mismatch: defined as size 4, got size 16 +(defmethod controls-page-info-method-11 ((this controls-page-info) (arg0 progress) (arg1 font-context) (arg2 float) (arg3 float)) + (local-vars + (v1-28 int) + (v1-29 int) + (sv-16 float) + (sv-32 (function progress font-context float float string float float int float)) + (sv-48 font-context) + (sv-64 float) + (sv-80 int) + (sv-96 (function string font-context symbol int bucket-id float)) + (sv-112 (function _varargs_ object)) + (sv-128 string) + (sv-144 string) + (sv-160 (function string font-context symbol int bucket-id float)) + (sv-176 (function _varargs_ object)) + (sv-192 string) + (sv-208 string) + ) + (set! sv-16 arg2) + (let ((s2-0 arg3) + (s3-0 *progress-work*) + ) + (let ((s1-0 (get-scissor-stack-top arg0))) + (- (-> s1-0 z) (-> s1-0 x)) + (progress-method-33 arg0 (-> s3-0 sub-header)) + (progress-method-41 arg0 (-> s3-0 sub-header) (* 128.0 s2-0)) + (let ((a0-4 arg1)) + (set! (-> a0-4 flags) (font-flags kerning middle large)) + ) + (let ((v1-5 arg1) + (f0-7 (+ 10.0 sv-16 (-> s1-0 x))) + (f1-4 (-> s1-0 y)) + ) + (set! (-> v1-5 origin x) f0-7) + (set! (-> v1-5 origin y) f1-4) + ) + (let ((a0-7 arg1)) + (set! (-> a0-7 color) (font-color font-color-34)) + ) + (let ((s0-0 arg0)) + (set! sv-32 (method-of-object s0-0 progress-method-45)) + (set! sv-48 arg1) + (let ((s1-1 (+ (- -20.0 (-> s1-0 x)) (-> s1-0 z)))) + (set! sv-64 (the-as float 28.0)) + (let ((t0-1 (lookup-text! *common-text* (-> this title) #f)) + (t1-0 0.7) + (t2-0 0.5) + (t3-0 32) + ) + (sv-32 s0-0 sv-48 s1-1 sv-64 t0-1 t1-0 t2-0 t3-0) + ) + ) + ) + ) + (progress-method-34 arg0) + (progress-method-33 arg0 (-> s3-0 sub-body-footer)) + (progress-method-53 arg0 arg1) + (let ((a0-13 arg1)) + (set! (-> a0-13 flags) (font-flags kerning large)) + ) + (let ((v1-17 arg1)) + (set! (-> v1-17 scale) 0.425) + ) + (let ((a0-15 arg1)) + (set! (-> a0-15 color) (font-color font-color-32)) + ) + (let* ((s0-1 (get-scissor-stack-top arg0)) + (f28-0 (- (-> s0-1 z) (-> s0-1 x))) + (s1-2 (init-text! this)) + ) + (let* ((f30-0 (* 0.5 f28-0)) + (f28-1 (* 0.5 f28-0)) + (f26-0 (+ sv-16 (-> s0-1 x))) + (f24-0 (+ sv-16 (-> s0-1 x) f30-0)) + ) + (let ((v1-25 arg1)) + (set! (-> v1-25 width) (+ -20.0 f30-0)) + ) + (set! sv-80 0) + (let ((v1-27 sv-80) + (a0-20 (min (the int (-> this current-index)) s1-2)) + ) + (set-on-less-than v1-28 v1-27 a0-20) + (move-if-not-zero v1-29 a0-20 v1-28 v1-28) + ) + (set! sv-80 v1-29) + (set! sv-96 print-game-text) + (set! sv-112 format) + (set! sv-128 (clear *temp-string*)) + (set! sv-144 "~S") + (let ((a2-5 (lookup-text! *common-text* (the-as text-id (-> this text sv-80 text)) #f))) + (sv-112 sv-128 sv-144 a2-5) + ) + (let* ((a0-24 *temp-string*) + (a1-10 arg1) + (a2-6 #t) + (a3-2 40) + (t0-2 579) + (f22-0 (sv-96 a0-24 a1-10 a2-6 a3-2 (the-as bucket-id t0-2))) + ) + (set! sv-160 print-game-text) + (set! sv-176 format) + (set! sv-192 (clear *temp-string*)) + (set! sv-208 "~S") + (let ((a2-8 (lookup-text! *common-text* (-> this text sv-80 id) #f))) + (sv-176 sv-192 sv-208 a2-8) + ) + (let* ((a0-28 *temp-string*) + (a1-13 arg1) + (a2-9 #t) + (a3-3 40) + (t0-3 579) + (f0-23 (sv-160 a0-28 a1-13 a2-9 a3-3 (the-as bucket-id t0-3))) + (f22-1 (+ 8.0 (fmax f22-0 f0-23))) + ) + (let* ((v1-47 arg1) + (f0-26 (+ 10.0 (-> s0-1 x))) + (f1-12 4.0) + (f2-0 (-> this current-index)) + (f1-14 (+ (- f1-12 (* f22-1 (- f2-0 (* (the float (the int (/ f2-0 1.0))) 1.0)))) (-> s0-1 y))) + ) + (set! (-> v1-47 origin x) f0-26) + (set! (-> v1-47 origin y) f1-14) + ) + (while (and (< (-> arg1 origin y) (-> s0-1 w)) (< sv-80 s1-2)) + (when (= sv-80 3) + (nop!) + (nop!) + 0 + ) + ((method-of-type controls-string-info controls-string-info-method-9) + (the-as controls-string-info (-> this text sv-80)) + arg0 + arg1 + f26-0 + f24-0 + f30-0 + f28-1 + s2-0 + ) + (set! sv-80 (+ sv-80 1)) + ) + (set! (-> this on-screen) (< (-> arg1 origin y) (-> s0-1 w))) + (seek! (-> this current-index) (-> this target-index) (* (/ 300.0 f22-1) (seconds-per-frame))) + ) + ) + ) + (progress-method-34 arg0) + (progress-method-33 arg0 (-> s3-0 small-screen)) + (progress-method-47 + arg0 + arg1 + (!= (-> this current-index) 0.0) + (and (not (-> this on-screen)) (!= (-> this current-index) (the float s1-2))) + ) + ) + ) + (progress-method-34 arg0) + 0 + (none) + ) + +(defmethod draw-option ((this menu-controls-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (s2-0 *progress-work*) + ) + (set! (-> arg1 alpha) f30-0) + (progress-method-46 arg0 arg1 f30-0 1581) + (let ((a0-2 arg1)) + (set! (-> a0-2 flags) (font-flags kerning middle large)) + ) + (progress-method-53 arg0 arg1) + (let* ((f28-0 (the float (menu-controls-option-method-12 this))) + (f0-2 (-> this current-index)) + (f26-0 (- f0-2 (* (the float (the int (/ f0-2 f28-0))) f28-0))) + (f0-4 (+ 1.0 f26-0)) + (f0-5 (- f0-4 (* (the float (the int (/ f0-4 f28-0))) f28-0))) + (s0-0 (-> this pages (the int f26-0))) + (s3-0 (-> this pages (the int f0-5))) + (s1-0 (get-scissor-stack-top arg0)) + (f24-0 (- (-> s1-0 z) (-> s1-0 x))) + ) + (cond + ((< 1.0 f28-0) + (draw-prev-next-footer arg0 arg1 f30-0) + ) + (else + (progress-method-42 arg0 (-> s2-0 footer) (* 64.0 f30-0)) + (progress-method-41 arg0 (-> s2-0 footer) (* 128.0 f30-0)) + ) + ) + (progress-method-33 arg0 (-> s2-0 body-footer)) + (when (!= f28-0 0.0) + (let ((f26-1 (* (- 1.0 (- f26-0 (* (the float (the int (/ f26-0 1.0))) 1.0))) f24-0))) + (set! (-> arg1 origin x) (+ (- f26-1 f24-0) (-> s1-0 x))) + (controls-page-info-method-11 s0-0 arg0 arg1 (- f26-1 f24-0) f30-0) + (when (and (< 1.0 f28-0) (!= (-> this current-index) (-> this target-index))) + (set! (-> arg1 origin x) (+ f26-1 (-> s1-0 x))) + (controls-page-info-method-11 s3-0 arg0 arg1 f26-1 f30-0) + ) + ) + ) + ) + ) + (progress-method-34 arg0) + 0 + (none) + ) + +(defmethod draw-option ((this menu-language-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (set! (-> arg1 alpha) f30-0) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 1.0) + ) + (let ((a1-2 arg1)) + (set! (-> a1-2 flags) (font-flags kerning middle large)) + ) + (progress-method-38 arg0 arg1 (-> this offset-y)) + (progress-method-40 arg0 arg1 (the int (-> arg1 origin y)) 44 f30-0) + (+! (-> arg1 origin y) 8.0) + (let ((a0-3 arg1)) + (set! (-> a0-3 color) (font-color font-color-32)) + ) + (let ((v1-11 arg1)) + (set! (-> v1-11 scale) 1.0) + ) + (+! (-> arg1 origin x) -170.0) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) "~33L~C" 163) + (s4-0 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin x) 340.0) + (let ((s4-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 161) + (s4-1 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin x) -170.0) + (let ((a0-11 arg1)) + (set! (-> a0-11 color) (font-color font-color-33)) + ) + (print-game-text + (lookup-text! *common-text* (-> *language-name-remap* (get-language-by-idx arg0 1)) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (progress-method-46 arg0 arg1 f30-0 11) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-sub-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (set! (-> arg1 alpha) f30-0) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.85) + ) + (progress-method-38 arg0 arg1 (-> this offset-y)) + (cond + ((= (-> arg0 option-index) arg2) + (progress-method-40 arg0 arg1 (the int (+ -6.0 (-> arg1 origin y))) 35 f30-0) + (let ((a0-4 arg1)) + (set! (-> a0-4 color) (font-color font-color-33)) + ) + ) + (else + (let ((a0-5 arg1)) + (set! (-> a0-5 color) (font-color font-color-32)) + ) + ) + ) + ) + (print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + 0 + (none) + ) + +(defmethod draw-option ((this menu-on-off-game-vibrations-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg0 yes-no-choice) (-> arg0 vibrations)) + (progress-method-38 arg0 arg1 0.19) + (progress-method-50 + arg0 + arg1 + (-> this name) + (text-id progress-on) + (text-id progress-off) + (= (-> arg0 option-index) arg2) + arg3 + 0.65 + ) + (let ((f0-1 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (progress-method-46 arg0 arg1 f0-1 28) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-on-off-game-subtitles-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg0 yes-no-choice) (-> arg0 subtitles)) + (progress-method-38 arg0 arg1 0.34) + (progress-method-50 + arg0 + arg1 + (-> this name) + (text-id progress-on) + (text-id progress-off) + (= (-> arg0 option-index) arg2) + arg3 + 0.65 + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-language-game-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (sv-16 string) (sv-32 string)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.65) + ) + (progress-method-38 arg0 arg1 (-> this offset-y)) + (set! (-> arg1 alpha) f30-0) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle large)) + ) + (let ((s4-0 0)) + (let ((s5-0 *language-name-remap*)) + (case (-> this menu-option-type) + ((5) + (set! s4-0 (get-language-by-idx arg0 0)) + ) + ((6) + (set! s4-0 (get-language-by-idx arg0 1)) + ) + ((7) + (set! s4-0 (get-language-by-idx arg0 2)) + ) + ) + (cond + (arg3 + (let ((a0-12 arg1)) + (set! (-> a0-12 color) (font-color font-color-34)) + ) + (progress-method-40 arg0 arg1 (the int (-> arg1 origin y)) 42 f30-0) + (let ((s2-1 print-game-text)) + (let ((s1-1 format) + (s0-1 (clear *temp-string*)) + ) + (set! sv-16 "~S") + (let ((a2-4 (lookup-text! *common-text* (-> this name) #f))) + (s1-1 s0-1 sv-16 a2-4) + ) + ) + (s2-1 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin y) 24.0) + (let ((a0-18 arg1)) + (set! (-> a0-18 color) (font-color font-color-32)) + ) + (let ((v1-20 arg1)) + (set! (-> v1-20 scale) 0.5) + ) + (let ((a0-20 arg1)) + (set! (-> a0-20 color) (font-color font-color-32)) + ) + (+! (-> arg1 origin x) -70.0) + (let ((s3-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 163) + (s3-1 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin x) 70.0) + (+! (-> arg1 origin x) 70.0) + (let ((s3-2 print-game-text)) + (format (clear *temp-string*) "~33L~C" 161) + (s3-2 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin x) -70.0) + (let ((a0-27 arg1)) + (set! (-> a0-27 color) (font-color font-color-33)) + ) + (print-game-text (lookup-text! *common-text* (-> s5-0 s4-0) #f) arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (else + (cond + ((= (-> arg0 option-index) arg2) + (let ((a0-30 arg1)) + (set! (-> a0-30 color) (font-color font-color-33)) + ) + (progress-method-40 arg0 arg1 (the int (-> arg1 origin y)) 24 f30-0) + ) + (else + (let ((a0-32 arg1)) + (set! (-> a0-32 color) (font-color font-color-32)) + ) + ) + ) + (let ((v1-35 arg1)) + (set! (-> v1-35 scale) 0.65) + ) + (let ((s2-4 print-game-text)) + (let ((s1-2 format) + (s0-2 (clear *temp-string*)) + ) + (set! sv-32 "~S") + (let ((a2-14 (lookup-text! *common-text* (-> this name) #f))) + (s1-2 s0-2 sv-32 a2-14) + ) + ) + (s2-4 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (let ((v1-38 arg1)) + (set! (-> v1-38 scale) 0.5) + ) + (let ((a0-39 arg1)) + (set! (-> a0-39 color) (font-color font-color-32)) + ) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> s5-0 s4-0) #f)) + *temp-string* + (+! (-> arg1 origin y) 24.0) + (let ((a0-43 arg1)) + (set! (-> a0-43 flags) (font-flags kerning middle large)) + ) + (print-game-text (lookup-text! *common-text* (-> s5-0 s4-0) #f) arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; ERROR: Stack slot load at 16 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 16 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 48 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 48 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 48 mismatch: defined as size 4, got size 16 +(defmethod draw-option ((this menu-center-screen-graphic-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (sv-16 float) (sv-32 font-context) (sv-48 float)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (s4-0 (get-scissor-stack-top arg0)) + ) + (set! (-> arg1 alpha) f30-0) + (let ((a0-2 arg1)) + (set! (-> a0-2 flags) (font-flags kerning middle large)) + ) + (cond + (arg3 + (let ((a0-3 arg1)) + (set! (-> a0-3 color) (font-color font-color-34)) + ) + (progress-method-38 arg0 arg1 0.45) + (set! (-> arg1 origin x) (+ 30.0 (-> s4-0 x))) + (let* ((s3-1 arg0) + (s2-1 (method-of-object s3-1 progress-method-45)) + (s1-1 arg1) + (s0-0 (+ (- -60.0 (-> s4-0 x)) (-> s4-0 z))) + ) + (set! sv-16 (the-as float 16.0)) + (let* ((t0-1 (lookup-text! *common-text* (text-id progress-graphics-center-screen-dpad) #f)) + (t1-0 0.5) + (t2-0 0.95) + (t3-0 32) + (f0-7 (s2-1 s3-1 s1-1 s0-0 sv-16 t0-1 t1-0 t2-0 t3-0)) + (f1-6 (* 0.4 (-> arg1 max-x))) + (f2-4 (+ (-> s4-0 x) (* 0.5 (- (-> s4-0 z) (-> s4-0 x))))) + (f30-1 (+ f2-4 f1-6)) + (f28-0 (- f2-4 f1-6)) + (f26-0 (+ -8.0 (* 0.5 f0-7) (-> arg1 origin y))) + ) + (let ((f1-10 (+ -15.0 (-> arg1 origin y))) + (f24-0 (+ 3.0 f0-7 (-> arg1 origin y))) + ) + (let ((v1-17 arg1)) + (set! (-> v1-17 origin x) (-> s4-0 x)) + (set! (-> v1-17 origin y) f1-10) + ) + (let ((v1-18 arg1)) + (set! (-> v1-18 width) (- (-> s4-0 z) (-> s4-0 x))) + ) + (let ((s3-2 print-game-text)) + (format (clear *temp-string*) "~33L~C" 160) + (s3-2 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (set! (-> arg1 origin y) f24-0) + ) + (let ((s3-3 print-game-text)) + (format (clear *temp-string*) "~33L~C" 162) + (s3-3 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (let ((a0-13 arg1)) + (set! (-> a0-13 flags) (font-flags kerning right large)) + ) + (let ((v1-20 arg1) + (f0-12 f26-0) + ) + (set! (-> v1-20 origin x) f28-0) + (set! (-> v1-20 origin y) f0-12) + ) + (let ((s3-4 print-game-text)) + (format (clear *temp-string*) "~33L~C" 163) + (s3-4 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (let ((a0-17 arg1)) + (set! (-> a0-17 flags) (font-flags kerning large)) + ) + (let ((v1-22 arg1)) + (set! (-> v1-22 origin x) f30-1) + (set! (-> v1-22 origin y) f26-0) + ) + ) + ) + (let ((s3-5 print-game-text)) + (format (clear *temp-string*) "~33L~C" 161) + (s3-5 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (let ((a0-21 arg1)) + (set! (-> a0-21 flags) (font-flags kerning middle large)) + ) + (set! (-> arg1 origin x) (-> s4-0 x)) + (progress-method-38 arg0 arg1 0.85) + (let ((v1-26 arg1)) + (set! (-> v1-26 scale) 0.5) + ) + (let ((v1-27 arg1)) + (set! (-> v1-27 width) (- (-> s4-0 z) (-> s4-0 x))) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-graphics-center-screen-reset) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + (else + (let ((f28-1 0.7)) + (progress-method-38 arg0 arg1 (-> this offset-y)) + (cond + ((= (-> arg0 option-index) arg2) + (let ((a0-27 arg1)) + (set! (-> a0-27 color) (font-color font-color-33)) + ) + ) + (else + (let ((a0-28 arg1)) + (set! (-> a0-28 color) (font-color font-color-32)) + ) + ) + ) + (set! (-> arg1 origin x) (+ 10.0 (-> s4-0 x))) + (let* ((s1-2 arg0) + (s0-1 (method-of-object s1-2 progress-method-45)) + ) + (set! sv-32 arg1) + (let ((s4-1 (+ (- -20.0 (-> s4-0 x)) (-> s4-0 z)))) + (set! sv-48 (* 32.0 f28-1)) + (let* ((t0-7 (lookup-text! *common-text* (-> this name) #f)) + (t1-1 f28-1) + (t2-1 0.75) + (t3-1 32) + (f0-26 (s0-1 s1-2 sv-32 s4-1 sv-48 t0-7 t1-1 t2-1 t3-1)) + ) + (if (= (-> arg0 option-index) arg2) + (progress-method-40 arg0 arg1 (the int (+ -1.0 (-> arg1 origin y))) (the int (+ 4.0 f0-26)) f30-0) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-aspect-ratio-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (when (not (and (zero? (-> arg0 option-index)) (-> arg0 selected-option))) + (set! (-> arg0 yes-no-choice) (the-as basic (= (if arg3 + (-> arg0 aspect-ratio) + (get-aspect-ratio) + ) + 'aspect4x3 + ) + ) + ) + (progress-method-38 arg0 arg1 (-> this offset-y)) + (progress-method-50 + arg0 + arg1 + (-> this name) + (text-id progress-aspect-4x3) + (text-id progress-aspect-16x9) + (= (-> arg0 option-index) arg2) + arg3 + 0.7 + ) + ) + (let ((f0-2 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (progress-method-46 arg0 arg1 f0-2 29) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-on-off-progressive-scan-graphic-option) + (arg0 progress) + (arg1 font-context) + (arg2 int) + (arg3 symbol) + ) + (when (not (and (zero? (-> arg0 option-index)) (-> arg0 selected-option))) + (set! (-> arg0 yes-no-choice) (the-as basic (if arg3 + (-> arg0 progressive-scan) + (-> *setting-control* user-default set-video-mode) + ) + ) + ) + (progress-method-38 arg0 arg1 (-> this offset-y)) + (progress-method-50 + arg0 + arg1 + (-> this name) + (text-id progress-on) + (text-id progress-off) + (= (-> arg0 option-index) arg2) + arg3 + 0.7 + ) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-video-mode-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (when (not (and (zero? (-> arg0 option-index)) (-> arg0 selected-option))) + (set! (-> arg0 yes-no-choice) (the-as basic (= (if arg3 + (-> arg0 video-mode) + (get-video-mode) + ) + 'pal + ) + ) + ) + (progress-method-38 arg0 arg1 (-> this offset-y)) + (progress-method-50 + arg0 + arg1 + (-> this name) + (text-id progress-refresh-50hz) + (text-id progress-refresh-60hz) + (= (-> arg0 option-index) arg2) + arg3 + 0.7 + ) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-sound-slider-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (set! (-> arg1 alpha) f30-0) + (cond + ((not (bigmap-method-11 *bigmap*)) + (progress-method-51 arg0 arg1) + ) + (else + (let ((f28-0 (-> (the-as (pointer float) (&+ (the-as pointer *setting-control*) (-> this setting-offset)))))) + (progress-method-52 + arg0 + arg1 + (lookup-text! *common-text* (-> this name) #f) + f30-0 + (-> this offset-y) + 0.75 + f28-0 + (the-as float #t) + ) + ) + ) + ) + (if (zero? arg2) + (progress-method-46 arg0 arg1 f30-0 30) + ) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-stereo-mode-sound-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (s5-0 int)) + (let ((f28-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.65) + ) + (set! (-> arg1 alpha) f28-0) + (let ((a0-2 arg1)) + (set! (-> a0-2 flags) (font-flags kerning middle large)) + ) + (cond + ((not (bigmap-method-11 *bigmap*)) + (progress-method-51 arg0 arg1) + ) + ((begin + (progress-method-38 arg0 arg1 (-> this offset-y)) + (set! s5-0 (-> *setting-control* user-default stereo-mode)) + arg3 + ) + (let ((f30-2 + (fmax + (fmax + (-> (get-string-length (lookup-text! *common-text* (text-id progress-sound-mono) #f) arg1) length) + (-> (get-string-length (lookup-text! *common-text* (text-id progress-sound-stereo) #f) arg1) length) + ) + (-> (get-string-length (lookup-text! *common-text* (text-id progress-sound-surround) #f) arg1) length) + ) + ) + ) + (let ((a0-12 arg1)) + (set! (-> a0-12 color) (font-color font-color-34)) + ) + (progress-method-40 arg0 arg1 (the int (+ -1.0 (-> arg1 origin y))) 42 f28-0) + (let ((s3-1 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> this name) #f)) + (s3-1 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin y) 22.0) + (let ((v1-23 arg1)) + (set! (-> v1-23 scale) 0.5) + ) + (let ((a0-19 arg1)) + (set! (-> a0-19 color) (font-color font-color-33)) + ) + (let ((a0-20 arg1)) + (set! (-> a0-20 flags) (font-flags kerning middle large)) + ) + (print-game-text + (lookup-text! *common-text* (-> *stereo-mode-name-remap* s5-0) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (let ((a0-23 arg1)) + (set! (-> a0-23 color) (font-color font-color-32)) + ) + (set! (-> arg1 origin x) (- (-> arg1 origin x) (the float (the int (* 0.5 f30-2))))) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 163) + (s5-1 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin x) (the float (the int f30-2))) + ) + (let ((s5-2 print-game-text)) + (format (clear *temp-string*) "~33L~C" 161) + (s5-2 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + (else + (if (= (-> arg0 option-index) arg2) + (progress-method-40 arg0 arg1 (the int (-> arg1 origin y)) 21 f28-0) + ) + (let ((s3-2 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> this name) #f)) + (s3-2 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin y) 22.0) + (let ((v1-38 arg1)) + (set! (-> v1-38 scale) 0.5) + ) + (let ((a0-36 arg1)) + (set! (-> a0-36 color) (font-color font-color-32)) + ) + (let ((a0-37 arg1)) + (set! (-> a0-37 flags) (font-flags kerning middle large)) + ) + (print-game-text + (lookup-text! *common-text* (-> *stereo-mode-name-remap* s5-0) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-picture-slider-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (set! (-> arg1 alpha) f30-0) + (progress-method-33 arg0 (-> *progress-work* body)) + (cond + ((not (bigmap-method-11 *bigmap*)) + (progress-method-51 arg0 arg1) + ) + (else + (let ((f28-0 (-> (the-as (pointer float) (&+ (the-as pointer *setting-control*) (-> this setting-offset)))))) + (progress-method-52 + arg0 + arg1 + (lookup-text! *common-text* (-> this name) #f) + f30-0 + (-> this offset-y) + 0.9 + f28-0 + (the-as float #f) + ) + ) + ) + ) + (when (zero? arg2) + (let ((s4-1 (get-scissor-stack-top arg0))) + (progress-method-46 arg0 arg1 f30-0 1520) + (draw-icon-array! + (-> *progress-icon-arrays* 75) + 256 + (the int (+ (-> s4-1 y) (* 0.75 (- (-> s4-1 w) (-> s4-1 y))))) + (-> *video-params* relative-x-scale-reciprical) + 10.0 + (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + f30-0 + ) + ) + ) + ) + (progress-method-34 arg0) + 0 + (none) + ) + +(defmethod draw-option ((this menu-camera-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (progress-method-38 arg0 arg1 (-> this offset-y)) + (let* ((v1-2 (-> this menu-option-type)) + (v1-3 (cond + ((= v1-2 12) + (-> arg0 flip-horizontal) + ) + ((= v1-2 13) + (-> arg0 flip-vertical) + ) + ) + ) + ) + (set! (-> arg0 yes-no-choice) (the-as basic (not v1-3))) + ) + (progress-method-50 + arg0 + arg1 + (-> this name) + (text-id progress-camera-default) + (text-id progress-camera-flipped) + (= (-> arg0 option-index) arg2) + arg3 + 0.7 + ) + (when (zero? arg2) + (let ((f0-2 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (progress-method-46 arg0 arg1 f0-2 1534) + ) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-unlocked-sub-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((s2-0 (memcard-unlocked-secrets? arg0 #t)) + (f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (s1-0 "?????????") + ) + (progress-method-38 arg0 arg1 (-> this offset-y)) + (let ((v1-4 arg1)) + (set! (-> v1-4 scale) 0.5) + ) + (if (= arg2 (-> arg0 option-index)) + 33 + 32 + ) + (let ((f0-3 + (if (logtest? s2-0 (-> this mask)) + (print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + (print-game-text s1-0 arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + (if (= arg2 (-> arg0 option-index)) + (progress-method-40 arg0 arg1 (the int (+ 2.0 (-> arg1 origin y))) (the int (+ -1.0 f0-3)) f30-0) + ) + ) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-main-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (-> arg1 flags) + (when (and (nonzero? (-> this name)) (= arg2 (-> arg0 option-index))) + (let ((v1-5 arg1)) + (set! (-> v1-5 scale) 0.75) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color font-color-32)) + ) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags shadow kerning middle large)) + ) + (set! (-> arg1 width) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 235 + 175 + ) + ) + ) + (set! (-> arg1 height) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 80 + 80 + ) + ) + ) + (set! (-> arg1 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 140 + 170 + ) + ) + ) + (set! (-> arg1 origin y) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 180 + 175 + ) + ) + ) + (cond + ((= (-> this name) (text-id progress-bigmap)) + (when (= (-> *setting-control* user-default language) (language-enum french)) + (let ((v1-16 arg1)) + (set! (-> v1-16 scale) 0.7) + ) + ) + (print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + (set! (-> arg1 origin y) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 210 + 200 + ) + ) + ) + (set! (-> arg1 scale) 0.6) + ) + (else + (print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-memcard-slot-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars + (sv-48 (function string font-context symbol int bucket-id float)) + (sv-64 (function _varargs_ object)) + (sv-80 string) + (sv-96 string) + (sv-112 (function string font-context symbol int bucket-id float)) + (sv-128 dma-buffer) + (sv-144 pointer) + (sv-160 int) + (sv-176 (function string font-context symbol int bucket-id float)) + (sv-192 (function _varargs_ object)) + ) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (f28-0 (if (= (-> arg0 current) 'select-save-title) + 0.2 + 0.25 + ) + ) + (s3-0 *progress-work*) + (f24-0 (-> *video-params* relative-x-scale)) + ) + (cond + ((not (bigmap-method-11 *bigmap*)) + (progress-method-51 arg0 arg1) + ) + (else + (set! (-> arg1 alpha) f30-0) + (let ((v1-8 arg1)) + (set! (-> v1-8 scale) 0.6) + ) + (progress-method-33 arg0 (-> s3-0 body)) + (let* ((s3-1 (get-scissor-stack-top arg0)) + (s0-0 (new 'stack 'hud-box)) + (f0-4 (* (- (-> s3-1 w) (-> s3-1 y)) f28-0)) + (f26-0 (+ (-> s3-1 y) (* f0-4 (the float arg2)))) + (f28-1 (+ f26-0 f0-4)) + (s1-0 (the int (+ (-> s3-1 x) (* 0.7 (- (-> s3-1 z) (-> s3-1 x))) (* -48.0 f24-0)))) + ) + (set! sv-160 (the int (+ 32.0 (-> s3-1 y)))) + (let ((s2-0 *progress-save-info*)) + (let ((v1-16 arg1) + (f1-12 (+ 10.0 (-> s3-1 x))) + (f2-13 (+ f26-0 (* 0.5 (- f0-4 (* 32.0 (-> arg1 scale)))))) + ) + (set! (-> v1-16 origin x) f1-12) + (set! (-> v1-16 origin y) f2-13) + ) + (set! (-> arg1 height) f0-4) + (let ((a0-11 arg1)) + (set! (-> a0-11 flags) (font-flags kerning large)) + ) + (when (and s2-0 (= (-> s2-0 formatted) 1) (= (-> s2-0 inited) 1)) + (cond + ((= (-> s2-0 file arg2 present) 1) + (set! sv-48 print-game-text) + (set! sv-64 format) + (set! sv-80 (clear *temp-string*)) + (set! sv-96 "~S ~D") + (let ((a2-2 (lookup-text! *common-text* (text-id text-0073) #f)) + (a3-1 (+ arg2 1)) + ) + (sv-64 sv-80 sv-96 a2-2 a3-1) + ) + (let ((a0-21 *temp-string*) + (a1-6 arg1) + (a2-3 #f) + (a3-2 44) + (t0-1 579) + ) + (sv-48 a0-21 a1-6 a2-3 a3-2 (the-as bucket-id t0-1)) + ) + ) + ((zero? (-> s2-0 file arg2 present)) + (set! sv-112 print-game-text) + (let ((a0-23 (lookup-text! *common-text* (text-id progress-empty) #f)) + (a1-8 arg1) + (a2-5 #f) + (a3-3 44) + (t0-2 579) + ) + (sv-112 a0-23 a1-8 a2-5 a3-3 (the-as bucket-id t0-2)) + ) + ) + ) + (when (= arg2 (-> arg0 option-index)) + (let ((v1-39 arg1)) + (set! (-> v1-39 scale) 0.8) + ) + (set! sv-128 (-> *display* frames (-> *display* on-screen) global-buf)) + (set! sv-144 (-> sv-128 base)) + (let ((f24-1 (+ (-> s3-1 x) (* 0.4 (- (-> s3-1 z) (-> s3-1 x)))))) + (set-vector! (-> s0-0 color) 128 128 128 (the int (* 16.0 f30-0))) + (set! (-> (the-as vector (-> s0-0 box)) quad) (-> s3-1 quad)) + (set! (-> s0-0 box min x) f24-1) + (draw-box-alpha-1 s0-0 sv-128) + (set! (-> s0-0 box min x) (-> s3-1 x)) + (set! (-> s0-0 box max x) f24-1) + ) + (set! (-> s0-0 box min y) f26-0) + (set! (-> s0-0 box max y) f28-1) + (draw-box-alpha-1 s0-0 sv-128) + (set-vector! (-> s0-0 color) 128 128 64 (the int (* 128.0 f30-0))) + (when (!= f26-0 (-> s3-1 y)) + (set! (-> s0-0 box min y) (-> s3-1 y)) + (set! (-> s0-0 box max y) f26-0) + (draw-box-prim-only s0-0 sv-128) + ) + (when (!= f28-1 (-> s3-1 w)) + (set! (-> s0-0 box min y) f28-1) + (set! (-> s0-0 box max y) (-> s3-1 w)) + (draw-box-prim-only s0-0 sv-128) + ) + (let ((a3-4 (-> sv-128 base))) + (when (!= sv-144 a3-4) + (let ((v1-63 (the-as object (-> sv-128 base)))) + (set! (-> (the-as dma-packet v1-63) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-63) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-63) vif1) (new 'static 'vif-tag)) + (set! (-> sv-128 base) (&+ (the-as pointer v1-63) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id tex-hud-hud-alpha) + sv-144 + (the-as (pointer dma-tag) a3-4) + ) + ) + ) + ) + (when (= (-> s2-0 file arg2 present) 1) + (when (= arg2 (-> arg0 option-index)) + (let* ((a0-49 (-> *progress-icon-arrays* (-> s2-0 file arg2 level-index))) + (t9-16 (method-of-object a0-49 draw-icon-array!)) + (a3-5 1.0) + (t0-3 1.0) + (t1-0 (the-as uint #x80808080)) + (t2-0 f30-0) + ) + (t9-16 a0-49 s1-0 sv-160 a3-5 t0-3 (the-as rgba t1-0) t2-0) + ) + (let ((v1-84 arg1)) + (set! (-> v1-84 scale) 0.6) + ) + (let ((a0-51 arg1)) + (set! (-> a0-51 color) (font-color font-color-32)) + ) + (progress-method-38 arg0 arg1 0.675) + (let ((a0-53 arg1)) + (set! (-> a0-53 flags) (font-flags kerning right large)) + ) + (let* ((v1-91 (-> s2-0 file arg2 game-time0)) + (v1-92 (logior (shl (-> s2-0 file arg2 game-time1) 32) v1-91)) + (s1-1 (/ (the-as int v1-92) #x107ac0)) + (s0-1 (/ (mod (the-as int v1-92) #x107ac0) #x4650)) + ) + (set! (-> arg1 origin x) (+ (-> s3-1 x) (* 0.675 (- (-> s3-1 z) (-> s3-1 x))))) + (set! sv-176 print-game-text) + (set! sv-192 format) + (let ((a0-63 (clear *temp-string*)) + (a1-16 "~2,'0D:~2,'0D") + ) + (sv-192 a0-63 a1-16 s1-1 s0-1) + ) + ) + (let ((a0-64 *temp-string*) + (a1-17 arg1) + (a2-10 #f) + (a3-7 44) + (t0-4 579) + ) + (sv-176 a0-64 a1-17 a2-10 a3-7 (the-as bucket-id t0-4)) + ) + (draw-icon-array! + (-> *progress-icon-arrays* 66) + (the int (+ 10.0 (* 0.4 (- (-> s3-1 z) (-> s3-1 x))) (-> s3-1 x))) + (the int (-> arg1 origin y)) + 0.65 + 0.65 + (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + f30-0 + ) + (set! (-> arg1 origin x) (+ (- (+ -10.0 (-> s3-1 z)) (-> s3-1 x)) (-> s3-1 x))) + (let ((s1-2 print-game-text)) + (format (clear *temp-string*) "~D%" (the int (-> s2-0 file arg2 completion-percentage))) + (s1-2 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (draw-icon-array! + (-> *progress-icon-arrays* 67) + (the int (+ -8.0 (* 0.75 (- (-> s3-1 z) (-> s3-1 x))) (-> s3-1 x))) + (the int (-> arg1 origin y)) + 0.7 + 0.7 + (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + f30-0 + ) + (progress-method-38 arg0 arg1 0.83) + (set! (-> arg1 origin x) (+ (-> s3-1 x) (* 0.675 (- (-> s3-1 z) (-> s3-1 x))))) + (let ((s1-3 print-game-text)) + (format (clear *temp-string*) "~D" (the int (-> s2-0 file arg2 skill-count))) + (s1-3 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (draw-icon-array! + (-> *progress-icon-arrays* 68) + (the int (+ 10.0 (* 0.4 (- (-> s3-1 z) (-> s3-1 x))) (-> s3-1 x))) + (the int (+ -2.0 (-> arg1 origin y))) + 0.7 + 0.7 + (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + f30-0 + ) + (set! (-> arg1 origin x) (+ (- (+ -10.0 (-> s3-1 z)) (-> s3-1 x)) (-> s3-1 x))) + (let ((s1-4 print-game-text)) + (format (clear *temp-string*) "~D" (the int (-> s2-0 file arg2 gem-count))) + (s1-4 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (draw-icon-array! + (-> *progress-icon-arrays* 69) + (the int (+ -14.0 (* 0.75 (- (-> s3-1 z) (-> s3-1 x))) (-> s3-1 x))) + (the int (-> arg1 origin y)) + 0.5 + 0.5 + (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + f30-0 + ) + (when (logtest? (-> s2-0 file arg2 secrets) 1) + (let ((a0-79 arg1)) + (set! (-> a0-79 flags) (font-flags kerning middle large)) + ) + (set! (-> arg1 origin x) (+ (-> s3-1 x) (* 0.4 (- (-> s3-1 z) (-> s3-1 x))))) + (set! (-> arg1 origin y) (+ 8.0 (-> s3-1 y))) + (let ((v1-140 arg1)) + (set! (-> v1-140 width) (* 0.6 (- (-> s3-1 z) (-> s3-1 x)))) + ) + (let ((s3-2 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (text-id progress-secrets-hero-mode) #f)) + (s3-2 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + ) + ) + ) + (progress-method-34 arg0) + (when (zero? arg2) + (case (-> arg0 current) + (('select-load) + (progress-method-46 arg0 arg1 f30-0 45) + ) + (('select-save-hero) + (progress-method-46 arg0 arg1 f30-0 2198) + ) + (else + (progress-method-46 arg0 arg1 f30-0 44) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-save-sub-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (f28-0 0.2) + ) + (let ((v1-3 *progress-work*)) + (progress-method-33 arg0 (-> v1-3 body)) + ) + (let ((s2-0 (get-scissor-stack-top arg0)) + (s3-0 (new 'stack 'hud-box)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 width) (+ -10.0 (* 0.4 (- (-> s2-0 z) (-> s2-0 x))))) + ) + (let ((a0-6 arg1)) + (set! (-> a0-6 flags) (font-flags kerning large)) + ) + (let ((v1-9 arg1)) + (set! (-> v1-9 scale) 0.425) + ) + (let* ((f24-0 (* (- (-> s2-0 w) (-> s2-0 y)) f28-0)) + (f28-1 (+ (-> s2-0 y) (* f24-0 (the float arg2)))) + (f26-0 (+ f28-1 f24-0)) + ) + (let* ((f0-7 + (print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #t 44 (bucket-id hud-draw-hud-alpha)) + ) + (v1-11 arg1) + (f1-9 (+ 10.0 (-> s2-0 x))) + (f0-10 (+ f28-1 (* 0.5 (- f24-0 f0-7)))) + ) + (set! (-> v1-11 origin x) f1-9) + (set! (-> v1-11 origin y) f0-10) + ) + (set! (-> arg1 height) f24-0) + (when (= arg2 (-> arg0 option-index)) + (let ((v1-15 arg1)) + (set! (-> v1-15 scale) 0.45) + ) + (with-dma-buffer-add-bucket ((s0-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id tex-hud-hud-alpha) + ) + (let ((f0-13 (+ (-> s2-0 x) (* 0.4 (- (-> s2-0 z) (-> s2-0 x)))))) + (set-vector! (-> s3-0 color) 128 128 128 (the int (* 16.0 f30-0))) + (set! (-> s3-0 box min x) (-> s2-0 x)) + (set! (-> s3-0 box max x) f0-13) + ) + (set! (-> s3-0 box min y) f28-1) + (set! (-> s3-0 box max y) f26-0) + (draw-box-alpha-1 s3-0 s0-1) + (set-vector! (-> s3-0 color) 128 128 64 (the int (* 128.0 f30-0))) + (draw-box-prim-only s3-0 s0-1) + ) + ) + ) + ) + ) + (print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + (progress-method-34 arg0) + 0 + (none) + ) + +(defmethod draw-option ((this menu-loading-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((v1-3 arg1)) + (set! (-> v1-3 scale) 0.55) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color font-color-33)) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 120.0) + (set! (-> arg1 origin y) 110.0) + (let ((v1-8 arg1)) + (set! (-> v1-8 width) (the float 270)) + ) + (let ((v1-9 arg1)) + (set! (-> v1-9 height) (the float 35)) + ) + (when (or (< (mod (current-time) 300) 150) (!= (-> arg0 menu-transition) 0.0)) + (let ((v1-15 161)) + (case (-> arg0 current) + (('saving) + (set! v1-15 160) + ) + (('formatting) + (set! v1-15 162) + ) + (('creating) + (set! v1-15 163) + ) + ) + (print-game-text + (lookup-text! *common-text* (the-as text-id v1-15) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + ) + (+! (-> arg1 origin y) 45.0) + (let ((v1-18 arg1)) + (set! (-> v1-18 height) (the float 160)) + ) + (let ((a0-16 arg1)) + (set! (-> a0-16 color) (font-color font-color-32)) + ) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-remove-warn) #f) 1) + (s5-1 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-insufficient-space-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (when (!= (-> arg0 current) 'none) + (let ((v1-3 arg1)) + (set! (-> v1-3 scale) 0.5) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 color) (font-color font-color-32)) + ) + (let ((a0-4 arg1)) + (set! (-> a0-4 flags) (font-flags kerning middle middle-vert large)) + ) + (progress-method-53 arg0 arg1) + (+! (-> arg1 origin x) 10.0) + (set! (-> arg1 origin y) 80.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 width) (+ -20.0 (-> arg1 width))) + ) + (let ((v1-11 arg1)) + (set! (-> v1-11 height) (the float 80)) + ) + (let ((s4-0 155)) + (case (-> arg0 current) + (('insufficient-space) + (set! s4-0 153) + ) + (('no-memory-card) + (set! s4-0 154) + ) + ) + (let ((s3-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (the-as text-id s4-0) #f) 1) + (s3-0 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + (+! (-> arg1 origin y) 80.0) + (let ((v1-19 arg1)) + (set! (-> v1-19 height) (the float 50)) + ) + (let ((s4-1 print-game-text)) + (format + (clear *temp-string*) + (lookup-text! *common-text* (text-id progress-memcard-space-requirement) #f) + (if *progress-save-info* + (-> *progress-save-info* mem-required) + 0 + ) + ) + (s4-1 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin y) 55.0) + (let ((v1-24 arg1)) + (set! (-> v1-24 height) (the float 90)) + ) + (cond + ((and (!= (-> arg0 starting-state) 'insufficient-space) (!= (-> arg0 starting-state) 'no-memory-card)) + (print-game-text + (lookup-text! *common-text* (text-id progress-memcard-insert-with-free-space) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 60.0) + (let ((a0-26 arg1)) + (set! (-> a0-26 color) (font-color font-color-33)) + ) + (progress-method-40 arg0 arg1 (the int (+ 30.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-continue) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + (else + (let ((a0-30 arg1)) + (set! (-> a0-30 color) (font-color font-color-33)) + ) + (+! (-> arg1 origin y) 20.0) + (progress-method-40 arg0 arg1 (the int (+ 30.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (draw-yes-no-style-footer + arg0 + arg1 + (text-id progress-memcard-continue?) + (text-id progress-memcard-insufficient-space-retry?) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-hero-mode-message-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (s4-0 *progress-work*) + ) + (progress-method-33 arg0 (-> s4-0 body-footer)) + (progress-method-53 arg0 arg1) + (set! (-> arg1 alpha) f30-0) + (let ((v1-6 arg1)) + (set! (-> v1-6 scale) 0.5) + ) + (let ((a0-4 arg1)) + (set! (-> a0-4 color) (font-color font-color-32)) + ) + (let ((a0-5 arg1)) + (set! (-> a0-5 flags) (font-flags kerning middle middle-vert large)) + ) + (let ((s3-0 print-game-text)) + (let* ((s2-0 format) + (s1-0 (clear *temp-string*)) + (a0-7 *common-text*) + (t9-3 (method-of-object a0-7 lookup-text!)) + (a1-3 2199) + (a2-1 #f) + ) + (s2-0 s1-0 (t9-3 a0-7 (the-as text-id a1-3) a2-1) (the-as none a2-1)) + ) + (s3-0 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (progress-method-34 arg0) + (progress-method-33 arg0 (-> s4-0 footer)) + ) + (progress-method-53 arg0 arg1) + (let ((a0-13 arg1)) + (set! (-> a0-13 color) (font-color font-color-33)) + ) + (progress-method-38 arg0 arg1 0.1) + (progress-method-40 arg0 arg1 (the int (-> arg1 origin y)) 18 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-continue) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (progress-method-34 arg0) + 0 + (none) + ) + +(defmethod draw-option ((this menu-secrets-insufficient-space-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (s4-0 *progress-work*) + ) + (progress-method-33 arg0 (-> s4-0 body-footer)) + (progress-method-53 arg0 arg1) + (set! (-> arg1 alpha) f30-0) + (let ((v1-6 arg1)) + (set! (-> v1-6 scale) 0.5) + ) + (let ((a0-4 arg1)) + (set! (-> a0-4 color) (font-color font-color-32)) + ) + (let ((a0-5 arg1)) + (set! (-> a0-5 flags) (font-flags kerning middle middle-vert large)) + ) + (let ((s3-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-no-card-in-slot) #f) 1) + (s3-0 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (progress-method-34 arg0) + (progress-method-33 arg0 (-> s4-0 footer)) + ) + (progress-method-53 arg0 arg1) + (let ((a0-13 arg1)) + (set! (-> a0-13 color) (font-color font-color-33)) + ) + (progress-method-38 arg0 arg1 0.1) + (progress-method-40 arg0 arg1 (the int (-> arg1 origin y)) 18 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-continue) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (progress-method-34 arg0) + 0 + (none) + ) + +(defmethod draw-option ((this menu-insert-card-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((v1-1 arg1)) + (set! (-> v1-1 scale) 0.5) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color font-color-32)) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 90.0) + (set! (-> arg1 origin y) 130.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 330)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 95)) + ) + (let ((s4-0 print-game-text)) + (format + (clear *temp-string*) + (lookup-text! *common-text* (text-id progress-memcard-insert-with-jak3-data) #f) + 1 + ) + (s4-0 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin y) 115.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float 60)) + ) + (let ((a0-11 arg1)) + (set! (-> a0-11 color) (font-color font-color-33)) + ) + (progress-method-40 arg0 arg1 (the int (+ 17.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-memcard-go-back?) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-error-loading-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((v1-1 arg1)) + (set! (-> v1-1 scale) 0.5) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color font-color-32)) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 90.0) + (set! (-> arg1 origin y) 100.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 330)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 45)) + ) + (let ((s4-0 170)) + (case (-> arg0 current) + (('error-saving) + (set! s4-0 171) + ) + (('error-formatting) + (set! s4-0 172) + ) + (('error-creating) + (set! s4-0 173) + ) + ) + (let ((s3-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (the-as text-id s4-0) #f) 1) + (s3-0 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + (+! (-> arg1 origin y) 50.0) + (let ((v1-16 arg1)) + (set! (-> v1-16 height) (the float 105)) + ) + (let ((s4-1 print-game-text)) + (format + (clear *temp-string*) + (lookup-text! *common-text* (text-id progress-memcard-check-and-try-again) #f) + 1 + ) + (s4-1 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin y) 115.0) + (let ((v1-19 arg1)) + (set! (-> v1-19 height) (the float 45)) + ) + (let ((a0-21 arg1)) + (set! (-> a0-21 color) (font-color font-color-33)) + ) + (progress-method-40 arg0 arg1 (the int (+ 9.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-continue) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-error-auto-saving-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((v1-1 arg1)) + (set! (-> v1-1 scale) 0.5) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color font-color-32)) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 77.0) + (set! (-> arg1 origin y) 85.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 360)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 25)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-memcard-save-error) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 25.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float 60)) + ) + (let ((s4-1 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-check) #f) 1) + (s4-1 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin y) 60.0) + (let ((v1-13 arg1)) + (set! (-> v1-13 height) (the float 45)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-autosave-disabled) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 45.0) + (let ((v1-16 arg1)) + (set! (-> v1-16 height) (the float 95)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-autosave-reenable-info) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 90.0) + (let ((v1-19 arg1)) + (set! (-> v1-19 height) (the float 25)) + ) + (let ((a0-20 arg1)) + (set! (-> a0-20 color) (font-color font-color-33)) + ) + (progress-method-40 arg0 arg1 (the int (-> arg1 origin y)) 22 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-continue) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-card-removed-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((v1-1 arg1)) + (set! (-> v1-1 scale) 0.5) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color font-color-32)) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 80.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 360)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 70)) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-removed) #f) 1) + (s4-0 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin y) 65.0) + (print-game-text + (lookup-text! *common-text* (text-id progress-autosave-disabled) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 65.0) + (let ((v1-12 arg1)) + (set! (-> v1-12 height) (the float 90)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-autosave-reenable-info) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 85.0) + (let ((v1-15 arg1)) + (set! (-> v1-15 height) (the float 35)) + ) + (let ((a0-16 arg1)) + (set! (-> a0-16 color) (font-color font-color-33)) + ) + (progress-method-40 arg0 arg1 (the int (+ 5.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-continue) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-error-disc-removed-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color font-color-32)) + ) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.5) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 120.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 360)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 35)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-disc-removed-notice) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 45.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float 85)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-disc-removed-prompt) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (when (is-cd-in?) + (+! (-> arg1 origin y) 95.0) + (let ((v1-14 arg1)) + (set! (-> v1-14 height) (the float 50)) + ) + (let ((a0-12 arg1)) + (set! (-> a0-12 color) (font-color font-color-33)) + ) + (progress-method-40 arg0 arg1 (the int (+ 12.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-continue) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-error-reading-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color font-color-32)) + ) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.5) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 90.0) + (set! (-> arg1 origin y) 120.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 330)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 35)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-disc-read-error) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 55.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float 85)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-disc-read-error-prompt) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 105.0) + (let ((v1-13 arg1)) + (set! (-> v1-13 height) (the float 50)) + ) + (let ((a0-12 arg1)) + (set! (-> a0-12 color) (font-color font-color-33)) + ) + (progress-method-40 arg0 arg1 (the int (+ 12.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-continue) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-icon-info-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color font-color-32)) + ) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.5) + ) + (set! (-> *bigmap* auto-save-icon-flag) #t) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture checkpoint level-default-minimap))) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (let ((v1-6 (-> this sprites 0 color-ptr))) + (set! (-> v1-6 0) 128) + (set! (-> v1-6 1) 128) + (set! (-> v1-6 2) 128) + (set! (-> v1-6 3) (the int (* 128.0 (- 1.0 (-> arg0 menu-transition))))) + ) + (set! (-> this sprites 0 pos z) #xffffff) + (set! (-> this sprites 0 pos w) 0) + (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 240 160) + (with-dma-buffer-add-bucket ((s2-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-hud-alpha) + ) + ((method-of-type hud-sprite draw) (the-as hud-sprite (-> this sprites)) s2-0 (-> *level* level-default) #t) + ) + (let ((a0-16 arg1)) + (set! (-> a0-16 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 90.0) + (set! (-> arg1 origin y) 80.0) + (let ((v1-28 arg1)) + (set! (-> v1-28 width) (the float 330)) + ) + (let ((v1-29 arg1)) + (set! (-> v1-29 height) (the float 85)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-autosave-notice) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 115.0) + (let ((v1-32 arg1)) + (set! (-> v1-32 height) (the float 95)) + ) + (let ((s4-2 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-autosave-remove-warn) #f) 1) + (s4-2 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin y) 90.0) + (let ((v1-35 arg1)) + (set! (-> v1-35 height) (the float 50)) + ) + (let ((a0-27 arg1)) + (set! (-> a0-27 color) (font-color font-color-33)) + ) + (progress-method-40 arg0 arg1 (the int (+ 12.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-continue) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-format-card-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color font-color-32)) + ) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.5) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 80.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 360)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 85)) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-unformatted) #f) 1) + (s4-0 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin y) 95.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float 85)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-memcard-formatting-required-notice) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 95.0) + (let ((v1-13 arg1)) + (set! (-> v1-13 height) (the float 25)) + ) + (progress-method-40 arg0 arg1 (the int (-> arg1 origin y)) 44 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-memcard-format?) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 25.0) + (draw-yes-no-style-footer arg0 arg1 (text-id progress-yes) (text-id progress-no)) + 0 + (none) + ) + +(defmethod draw-option ((this menu-already-exists-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color font-color-32)) + ) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.5) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 120.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 360)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 85)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-memcard-overwrite-warning) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 105.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float 45)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-memcard-overwrite-confirm?) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 45.0) + (progress-method-40 arg0 arg1 (the int (+ 8.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (draw-yes-no-style-footer arg0 arg1 (text-id progress-yes) (text-id progress-no)) + 0 + (none) + ) + +(defmethod draw-option ((this menu-create-game-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color font-color-32)) + ) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.5) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 110.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 360)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 90)) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-no-save-data) #f) 1) + (s4-0 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin y) 95.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float 60)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-memcard-create-save-data?) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 70.0) + (progress-method-40 arg0 arg1 (the int (+ 18.0 (-> arg1 origin y))) 22 (-> arg1 alpha)) + (draw-yes-no-style-footer arg0 arg1 (text-id progress-yes) (text-id progress-no)) + 0 + (none) + ) + +(defmethod draw-option ((this menu-video-mode-warning-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color font-color-32)) + ) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.5) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 85.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 360)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 45)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-graphics-prog-scan-change-notice) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 50.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float 95)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-graphics-prog-scan-warn-2) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 85.0) + (let ((v1-13 arg1)) + (set! (-> v1-13 height) (the float 55)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-graphics-60hz-change-notice) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 60.0) + (let ((v1-16 arg1)) + (set! (-> v1-16 height) (the float 30)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-memcard-continue?) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 20.0) + (progress-method-40 arg0 arg1 (the int (-> arg1 origin y)) 24 (-> arg1 alpha)) + (draw-yes-no-style-footer arg0 arg1 (text-id progress-yes) (text-id progress-no)) + 0 + (none) + ) + +(defmethod draw-option ((this menu-video-mode-ok-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color font-color-32)) + ) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.5) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 130.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 360)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 50)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-graphics-60hz-change-complete) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 70.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float 50)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-graphics-prog-scan-keep) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 50.0) + (progress-method-40 arg0 arg1 (the int (+ 12.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (draw-yes-no-style-footer arg0 arg1 (text-id progress-yes) (text-id progress-no)) + 0 + (none) + ) + +(defmethod draw-option ((this menu-progressive-mode-warning-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color font-color-32)) + ) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.5) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 75.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 360)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 50)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-graphics-prog-scan-warn-1) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 50.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float 90)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-graphics-prog-scan-warn-2) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 85.0) + (let ((v1-13 arg1)) + (set! (-> v1-13 height) (the float 75)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-graphics-60hz-change-notice) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 70.0) + (let ((v1-16 arg1)) + (set! (-> v1-16 height) (the float 30)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-memcard-continue?) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 25.0) + (progress-method-40 arg0 arg1 (the int (-> arg1 origin y)) 24 (-> arg1 alpha)) + (draw-yes-no-style-footer arg0 arg1 (text-id progress-yes) (text-id progress-no)) + 0 + (none) + ) + +(defmethod draw-option ((this menu-progressive-mode-ok-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color font-color-32)) + ) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.55) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 90.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 360)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 80)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-graphics-prog-scan-change-complete) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 100.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float 75)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-graphics-prog-scan-keep) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 70.0) + (progress-method-40 arg0 arg1 (the int (+ 20.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (draw-yes-no-style-footer arg0 arg1 (text-id progress-yes) (text-id progress-no)) + 0 + (none) + ) + +(defmethod draw-option ((this menu-select-start-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars + (sv-16 string) + (sv-32 string) + (sv-48 (function game-text-info text-id symbol string)) + (sv-64 game-text-info) + (sv-80 (function _varargs_ object)) + (sv-96 string) + (sv-112 string) + (sv-128 (function game-text-info text-id symbol string)) + (sv-144 game-text-info) + ) + (set! (-> *progress-list-level* mode) (-> arg0 current)) + (set! (-> *progress-list-level* act) (-> *progress-work* selected-num)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (let ((s3-0 (length *progress-list-level*))) + (set! (-> arg1 alpha) f30-0) + (let ((a0-4 arg1)) + (set! (-> a0-4 flags) (font-flags kerning large)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 scale) 0.42) + ) + (progress-method-33 arg0 (-> *progress-work* body-footer)) + (let ((s2-1 (max 0 (the int (-> this current-index)))) + (s1-0 print-game-text) + ) + (let ((s0-0 format)) + (set! sv-16 (clear *temp-string*)) + (set! sv-32 "~S") + (set! sv-64 *common-text*) + (set! sv-48 (method-of-object sv-64 lookup-text!)) + (let* ((a1-3 (-> (progress-list-method-9 *progress-list-level* s2-1) text-name)) + (a2-1 #f) + (a2-2 (sv-48 sv-64 a1-3 a2-1)) + ) + (s0-0 sv-16 sv-32 a2-2) + ) + ) + (let ((f28-0 (s1-0 *temp-string* arg1 #t 44 (bucket-id hud-draw-hud-alpha)))) + (let ((s1-1 (get-scissor-stack-top arg0))) + (let ((f0-5 (- (-> s1-1 w) (-> s1-1 y)))) + (let* ((v1-18 arg1) + (f1-4 (+ 10.0 (-> s1-1 x))) + (f2-3 8.0) + (f3-1 (-> this current-index)) + (f2-5 (+ (- f2-3 (* f28-0 (- f3-1 (* (the float (the int (/ f3-1 1.0))) 1.0)))) (-> s1-1 y))) + ) + (set! (-> v1-18 origin x) f1-4) + (set! (-> v1-18 origin y) f2-5) + ) + (let ((v1-19 arg1)) + (set! (-> v1-19 width) (+ (- -20.0 (-> s1-1 x)) (-> s1-1 z))) + ) + (set! (-> arg1 height) f0-5) + ) + (while (and (< (-> arg1 origin y) (-> s1-1 w)) (< s2-1 s3-0)) + (cond + ((= s2-1 (-> this selected-index)) + (let ((a0-18 arg1)) + (set! (-> a0-18 color) (font-color font-color-34)) + ) + ) + (else + (let ((a0-19 arg1)) + (set! (-> a0-19 color) (font-color font-color-32)) + ) + ) + ) + (let ((s0-1 print-game-text)) + (set! sv-80 format) + (set! sv-96 (clear *temp-string*)) + (set! sv-112 "~S") + (set! sv-144 *common-text*) + (set! sv-128 (method-of-object sv-144 lookup-text!)) + (let* ((a1-7 (-> (progress-list-method-9 *progress-list-level* s2-1) text-name)) + (a2-4 #f) + (a2-5 (sv-128 sv-144 a1-7 a2-4)) + ) + (sv-80 sv-96 sv-112 a2-5) + ) + (let ((f26-0 (s0-1 *temp-string* arg1 #f 40 (bucket-id hud-draw-hud-alpha)))) + (if (= s2-1 (-> this selected-index)) + (progress-method-40 arg0 arg1 (the int (+ -2.0 (-> arg1 origin y))) (the int (+ 2.0 f26-0)) f30-0) + ) + (+! (-> arg1 origin y) f26-0) + ) + ) + (+! s2-1 1) + ) + ) + (seek! + (-> this current-index) + (-> this target-index) + (* (/ (-> this scroll-speed) f28-0) (seconds-per-frame)) + ) + ) + ) + ) + (progress-method-34 arg0) + (let ((s3-1 *progress-work*)) + (let* ((a0-28 arg0) + (t9-16 (method-of-object a0-28 progress-method-46)) + (a1-12 arg1) + (a2-9 f30-0) + (v1-46 (-> *progress-work* selected-num)) + ) + (t9-16 a0-28 a1-12 a2-9 (cond + ((zero? v1-46) + 54 + ) + ((= v1-46 1) + 2126 + ) + ((= v1-46 2) + 2127 + ) + (else + 2128 + ) + ) + ) + ) + (progress-method-42 arg0 (-> s3-1 footer) (* 64.0 f30-0)) + (progress-method-41 arg0 (-> s3-1 footer) (* 128.0 f30-0)) + ) + ) + (progress-method-47 + arg0 + arg1 + (!= (-> this current-index) 0.0) + (!= (-> this current-index) (the float (+ (-> arg0 total-num-tasks) -1))) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-select-scene-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars + (sv-16 (function _varargs_ object)) + (sv-32 string) + (sv-48 string) + (sv-64 (function string font-context symbol int bucket-id float)) + (sv-80 (function _varargs_ object)) + (sv-96 string) + (sv-112 string) + ) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (let* ((v1-3 (-> *progress-work* selected-num)) + (s3-0 (cond + ((zero? v1-3) + *hud-select-scene-act1* + ) + ((= v1-3 1) + *hud-select-scene-act2* + ) + ((= v1-3 2) + *hud-select-scene-act3* + ) + (else + *hud-select-scene-commentary* + ) + ) + ) + (s2-0 (-> s3-0 length)) + ) + (set! (-> arg1 alpha) f30-0) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning large)) + ) + (let ((v1-5 arg1)) + (set! (-> v1-5 scale) 0.42) + ) + (progress-method-33 arg0 (-> *progress-work* body-footer)) + (let ((s1-1 (max 0 (the int (-> this current-index)))) + (s0-0 print-game-text) + ) + (set! sv-16 format) + (set! sv-32 (clear *temp-string*)) + (set! sv-48 "~S") + (let ((a2-2 (lookup-text! *common-text* (-> s3-0 s1-1 text) #f))) + (sv-16 sv-32 sv-48 a2-2) + ) + (let ((f28-0 (s0-0 *temp-string* arg1 #t 44 (bucket-id hud-draw-hud-alpha)))) + (let ((s0-1 (get-scissor-stack-top arg0))) + (let ((f0-5 (- (-> s0-1 w) (-> s0-1 y)))) + (let* ((v1-16 arg1) + (f1-4 (+ 10.0 (-> s0-1 x))) + (f2-3 8.0) + (f3-1 (-> this current-index)) + (f2-5 (+ (- f2-3 (* f28-0 (- f3-1 (* (the float (the int (/ f3-1 1.0))) 1.0)))) (-> s0-1 y))) + ) + (set! (-> v1-16 origin x) f1-4) + (set! (-> v1-16 origin y) f2-5) + ) + (let ((v1-17 arg1)) + (set! (-> v1-17 width) (+ (- -20.0 (-> s0-1 x)) (-> s0-1 z))) + ) + (set! (-> arg1 height) f0-5) + ) + (while (and (< (-> arg1 origin y) (-> s0-1 w)) (< s1-1 s2-0)) + (cond + ((= s1-1 (-> this selected-index)) + (let ((a0-16 arg1)) + (set! (-> a0-16 color) (font-color font-color-34)) + ) + ) + (else + (let ((a0-17 arg1)) + (set! (-> a0-17 color) (font-color font-color-32)) + ) + ) + ) + (set! sv-64 print-game-text) + (set! sv-80 format) + (set! sv-96 (clear *temp-string*)) + (set! sv-112 "~S") + (let ((a2-5 (lookup-text! *common-text* (-> s3-0 s1-1 text) #f))) + (sv-80 sv-96 sv-112 a2-5) + ) + (let* ((a0-21 *temp-string*) + (a1-7 arg1) + (a2-6 #f) + (a3-2 40) + (t0-2 579) + (f26-0 (sv-64 a0-21 a1-7 a2-6 a3-2 (the-as bucket-id t0-2))) + ) + (if (= s1-1 (-> this selected-index)) + (progress-method-40 arg0 arg1 (the int (+ -2.0 (-> arg1 origin y))) (the int (+ 2.0 f26-0)) f30-0) + ) + (+! (-> arg1 origin y) f26-0) + ) + (+! s1-1 1) + ) + ) + (seek! + (-> this current-index) + (-> this target-index) + (* (/ (-> this scroll-speed) f28-0) (seconds-per-frame)) + ) + ) + ) + ) + (progress-method-34 arg0) + (let ((s3-1 *progress-work*)) + (let* ((a0-25 arg0) + (t9-13 (method-of-object a0-25 progress-method-46)) + (a1-10 arg1) + (a2-9 f30-0) + (v1-44 (-> *progress-work* selected-num)) + ) + (t9-13 a0-25 a1-10 a2-9 (cond + ((zero? v1-44) + 91 + ) + ((= v1-44 1) + 92 + ) + ((= v1-44 2) + 93 + ) + (else + 2002 + ) + ) + ) + ) + (progress-method-42 arg0 (-> s3-1 footer) (* 64.0 f30-0)) + (progress-method-41 arg0 (-> s3-1 footer) (* 128.0 f30-0)) + ) + ) + (progress-method-47 + arg0 + arg1 + (!= (-> this current-index) 0.0) + (!= (-> this current-index) (the float (+ (-> arg0 total-num-tasks) -1))) + ) + 0 + (none) + ) + +(defmethod draw-option ((this menu-qr-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (set! (-> arg1 alpha) f30-0) + (progress-method-38 arg0 arg1 (-> this offset-y)) + (cond + (arg3 + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color font-color-34)) + ) + ) + ((= (-> arg0 option-index) arg2) + (let ((v1-6 arg1)) + (set! (-> v1-6 color) (font-color font-color-33)) + ) + ) + (else + (let ((v1-7 arg1)) + (set! (-> v1-7 color) (font-color font-color-32)) + ) + ) + ) + (let ((v1-8 arg1)) + (set! (-> v1-8 scale) 0.75) + ) + (let ((f28-0 + (print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 24 (bucket-id hud-draw-hud-alpha)) + ) + ) + (when (= (-> arg0 option-index) arg2) + (progress-method-40 arg0 arg1 (the int (+ -2.0 (-> arg1 origin y))) (the int (+ 8.0 f28-0)) f30-0) + (set! (-> arg1 origin y) (+ 4.0 f28-0 (-> arg1 origin y))) + ) + ) + (when arg3 + (let ((v1-19 arg1)) + (set! (-> v1-19 scale) 0.6) + ) + (draw-yes-no-style-footer arg0 arg1 (text-id progress-yes) (text-id progress-no)) + ) + (if (zero? arg2) + (progress-method-46 arg0 arg1 f30-0 116) + ) + ) + 0 + (none) + ) + +(defun unlocked-secret-menu? ((arg0 game-secrets)) + (logtest? arg0 (game-secrets + scene-player-1 + scene-player-2 + scene-player-3 + title-commentary + level-select-1 + level-select-2 + level-select-3 + scrap-book-1 + scrap-book-2 + model-viewer-1 + model-viewer-2 + model-viewer-3 + ) + ) + ) + +;; WARN: Return type mismatch object vs game-secrets. +(defun memcard-unlocked-secrets? ((arg0 object) (arg1 symbol)) + (let ((v1-0 *progress-save-info*) + (s5-0 (the-as object 0)) + ) + (let ((a0-1 4) + (s4-0 *progress-work*) + ) + (when (and v1-0 (= (-> v1-0 formatted) 1) (= (-> v1-0 inited) 1)) + (dotimes (a1-6 a0-1) + (set! s5-0 (logior (the-as int s5-0) (-> v1-0 file a1-6 purchase-secrets))) + ) + ) + (if (or (nonzero? (-> *setting-control* user-current subtitle-language)) + (nonzero? (-> *setting-control* user-current language)) + (nonzero? (-> *setting-control* user-current audio-language)) + ) + (set! s5-0 (logand -17 (the-as int s5-0))) + ) + (cond + ((kiosk?) + (set! (-> s4-0 secrets-unlocked) (the-as basic #t)) + (set! s5-0 (logior (the-as int s5-0) 32)) + ) + ((unlocked-secret-menu? (the-as game-secrets s5-0)) + (set! (-> s4-0 secrets-unlocked) (the-as basic #t)) + ) + (else + (set! (-> s4-0 secrets-unlocked) #f) + ) + ) + (when *cheat-mode* + (set! (-> s4-0 secrets-unlocked) (the-as basic #t)) + (set! s5-0 (logior (the-as int s5-0) #x3bfe)) + ) + ) + (the-as game-secrets (cond + (arg1 + (empty) + s5-0 + ) + (else + (unlocked-secret-menu? (the-as game-secrets s5-0)) + ) + ) + ) + ) + ) + +(defun num-unlocked-secret? ((arg0 game-secrets)) + (let ((v0-0 0)) + (if (logtest? arg0 (game-secrets scene-player-1)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets scene-player-2)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets scene-player-3)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets title-commentary)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets level-select-1)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets level-select-2)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets level-select-3)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets scrap-book-1)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets scrap-book-2)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets model-viewer-1)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets model-viewer-2)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets model-viewer-3)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets hero-mode)) + (+! v0-0 1) + ) + v0-0 + ) + ) + +(defmethod secret-item-option-method-12 ((this secret-item-option)) + (cond + ((logtest? (-> this flags) (secret-item-option-flags sf0)) + 5 + ) + ((logtest? (-> *game-info* purchase-secrets) (-> this secret)) + (if (logtest? (-> *game-info* secrets) (-> this secret)) + 1 + 2 + ) + ) + ((and (not (task-node-closed? (-> this avail-after))) + (not (logtest? (-> *game-info* secrets) (game-secrets hero-mode))) + ) + 4 + ) + ((!= (logand (-> *game-info* purchase-secrets) (-> this required-secrets)) (-> this required-secrets)) + 3 + ) + (else + 0 + ) + ) + ) + +(defmethod secret-item-option-method-13 ((this secret-item-option)) + (local-vars (v0-1 game-vehicles)) + (when (zero? (secret-item-option-method-12 this)) + (case (-> this secret) + (((game-secrets hero-mode)) + (logior! (-> *game-info* purchase-secrets) (-> this secret)) + ) + (else + (logior! (-> *game-info* purchase-secrets) (-> this secret)) + (set! (-> *game-info* secrets) + (logclear (logior (-> *game-info* secrets) (-> this secret)) (-> this mask-secrets)) + ) + ) + ) + (case (-> this secret) + (((game-secrets vehicle-fox)) + (set! v0-1 (logior (-> *game-info* vehicles) (game-vehicles v-fox))) + (set! (-> *game-info* vehicles) v0-1) + v0-1 + ) + (((game-secrets vehicle-mirage)) + (set! v0-1 (logior (-> *game-info* vehicles) (game-vehicles v-mirage))) + (set! (-> *game-info* vehicles) v0-1) + v0-1 + ) + (((game-secrets vehicle-x-ride)) + (set! v0-1 (logior (-> *game-info* vehicles) (game-vehicles v-x-ride))) + (set! (-> *game-info* vehicles) v0-1) + v0-1 + ) + ) + ) + ) + +;; ERROR: Function may read a register that is not set: t1 +(defmethod draw-option ((this menu-secret-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars + (a0-19 string) + (t1-0 int) + (sv-16 float) + (sv-24 int) + (sv-96 int) + (sv-112 int) + (sv-128 int) + (sv-144 string) + (sv-160 string) + (sv-176 (function _varargs_ object)) + (sv-192 string) + (sv-208 text-id) + (sv-224 (function _varargs_ object)) + (sv-240 string) + (sv-256 (function string font-context symbol int bucket-id float)) + (sv-272 (function _varargs_ object)) + (sv-288 int) + (sv-304 (function string font-context symbol int bucket-id float)) + (sv-320 (function _varargs_ object)) + (sv-336 (function _varargs_ object)) + (sv-352 string) + (sv-368 string) + (sv-384 (function _varargs_ object)) + (sv-400 (function _varargs_ object)) + (sv-416 (function _varargs_ object)) + ) + (set! sv-16 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (set! sv-24 (the int (-> *game-info* skill))) + (set! (-> arg1 alpha) sv-16) + (cond + ((not (bigmap-method-11 *bigmap*)) + (progress-method-51 arg0 arg1) + ) + (else + (new 'stack 'hud-sprite) + (let ((s2-0 (lookup-texture-by-id (new 'static 'texture-id :index #x30 :page #x11)))) + (when (and s2-0 (not (-> this available-title))) + (progress-method-33 arg0 (-> *progress-work* sub-header)) + (let ((s3-0 (get-scissor-stack-top arg0))) + (let* ((f0-5 0.64) + (f30-0 (+ 10.0 (* (the float (-> s2-0 w)) f0-5 (-> *video-params* relative-x-scale)))) + ) + (let ((f1-5 (* (the float (-> s2-0 h)) f0-5))) + (+ (- (- -20.0 f30-0) (-> s3-0 x)) (-> s3-0 z)) + (set! t1-0 (logior #x808080 (shr (shl (the int (* 128.0 sv-16)) 56) 32))) + (draw-icon-array! + (-> *progress-icon-arrays* 68) + (the int (+ 10.0 (-> s3-0 x))) + (the int (+ (-> s3-0 y) (* 0.5 (- 28.0 f1-5)))) + f0-5 + f0-5 + (the-as rgba t1-0) + sv-16 + ) + ) + (let ((v1-26 arg1)) + (set! (-> v1-26 height) 28.0) + ) + (let ((a0-13 arg1)) + (set! (-> a0-13 flags) (font-flags kerning large)) + ) + (let ((f28-0 0.45)) + (let ((a0-14 arg1)) + (set! (-> a0-14 color) (font-color font-color-34)) + ) + (cond + ((-> this buy-menu) + (let ((s2-1 format) + (s1-0 (clear *temp-string*)) + (s0-0 "x~D ~S") + ) + (set! sv-96 (-> *menu-secrets-array* (-> this selected-index) cost)) + (let ((a3-2 (lookup-text! *common-text* (text-id progress-secrets-price) #f))) + (s2-1 s1-0 s0-0 sv-96 a3-2) + ) + ) + (set! a0-19 *temp-string*) + ) + (else + (let ((s2-2 format) + (s1-1 (clear *temp-string*)) + (s0-1 "x~D ~S") + ) + (set! sv-112 sv-24) + (let ((a3-3 (lookup-text! *common-text* (text-id progress-secrets-orbs-available) #f))) + (s2-2 s1-1 s0-1 sv-112 a3-3) + ) + ) + (set! a0-19 *temp-string*) + ) + ) + (let ((v1-42 arg1)) + (set! (-> v1-42 scale) f28-0) + ) + (let ((v1-43 arg1) + (f0-10 (+ (-> s3-0 x) f30-0)) + (f1-11 (+ (-> s3-0 y) (* 0.5 (- 28.0 (* 32.0 f28-0))))) + ) + (set! (-> v1-43 origin x) f0-10) + (set! (-> v1-43 origin y) f1-11) + ) + ) + ) + (print-game-text a0-19 arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + (let ((a0-23 arg1)) + (set! (-> a0-23 flags) (font-flags kerning right large)) + ) + (set! (-> arg1 origin x) (+ -10.0 (-> s3-0 z))) + ) + (let ((s3-1 print-game-text)) + (let ((s2-3 format) + (s1-2 (clear *temp-string*)) + (s0-2 "~D/600 ~S") + ) + (set! sv-128 (the int (-> *game-info* skill-total))) + (let ((a3-5 (lookup-text! *common-text* (text-id progress-secrets-orbs-collected) #f))) + (s2-3 s1-2 s0-2 sv-128 a3-5) + ) + ) + (let ((a0-27 *temp-string*) + (a1-15 arg1) + (a2-9 #f) + (a3-6 44) + ) + (set! arg3 (the-as symbol 579)) + (s3-1 a0-27 a1-15 a2-9 a3-6 (the-as bucket-id arg3)) + ) + ) + (progress-method-34 arg0) + ) + ) + (let ((v1-52 arg1)) + (set! (-> v1-52 scale) 0.42) + ) + (cond + ((-> this available-title) + (progress-method-33 arg0 (-> *progress-work* body-footer)) + (progress-method-53 arg0 arg1) + (let ((a0-32 arg1)) + (set! (-> a0-32 color) (font-color font-color-32)) + ) + (let ((a0-33 arg1)) + (set! (-> a0-33 flags) (font-flags kerning middle middle-vert large)) + ) + (let ((s4-1 print-game-text)) + (let* ((s3-2 format) + (s2-4 (clear *temp-string*)) + (a0-35 *common-text*) + (t9-22 (method-of-object a0-35 lookup-text!)) + (a1-18 128) + (a2-10 #f) + ) + (s3-2 s2-4 (t9-22 a0-35 (the-as text-id a1-18) a2-10) (the-as none a2-10)) + ) + (s4-1 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (progress-method-34 arg0) + (progress-method-33 arg0 (-> *progress-work* footer)) + (let ((a0-40 arg1)) + (set! (-> a0-40 flags) (font-flags kerning middle large)) + ) + (progress-method-38 arg0 arg1 0.1) + (let ((a0-42 arg1)) + (set! (-> a0-42 color) (font-color font-color-33)) + ) + (let ((f0-16 (print-game-text + (lookup-text! *common-text* (text-id progress-continue) #f) + arg1 + #f + 32 + (bucket-id hud-draw-hud-alpha) + ) + ) + ) + (progress-method-40 arg0 arg1 (the int (+ -2.0 (-> arg1 origin y))) (the int (+ 4.0 f0-16)) (-> arg1 alpha)) + ) + (progress-method-34 arg0) + ) + ((-> this buy-menu) + (progress-method-33 arg0 (-> *progress-work* body)) + (progress-method-38 arg0 arg1 0.45) + (progress-method-50 + arg0 + arg1 + (-> *menu-secrets-array* (-> this selected-index) name) + (text-id progress-secrets-buy) + (text-id progress-secrets-cancel) + #t + #t + 0.65 + ) + (let ((s4-3 *progress-work*)) + (progress-method-46 arg0 arg1 sv-16 84) + (progress-method-41 arg0 (-> s4-3 sub-header) (* 128.0 sv-16)) + ) + (progress-method-34 arg0) + ) + (else + (progress-method-33 arg0 (-> *progress-work* sub-body-footer)) + (let* ((s3-3 (get-scissor-stack-top arg0)) + (f22-0 (- (-> s3-3 w) (-> s3-3 y))) + (f30-1 (+ 10.0 (* 24.0 (-> *video-params* relative-x-scale) (-> arg1 scale)))) + (f28-1 (+ (- -10.0 (-> s3-3 x)) (-> s3-3 z))) + (s2-5 get-string-length) + ) + (let ((s1-3 format) + (s0-3 (clear *temp-string*)) + ) + (set! sv-144 "~32L~S~44L ~S") + (set! sv-160 (lookup-text! *common-text* (text-id progress-on) #f)) + (let ((a3-12 (lookup-text! *common-text* (text-id progress-off) #f))) + (s1-3 s0-3 sv-144 sv-160 a3-12 (the-as none arg3) (the-as none t1-0)) + ) + ) + (let* ((f0-27 (-> (s2-5 *temp-string* arg1) length)) + (f26-0 (- (- (- f28-1 f30-1) f0-27) f30-1)) + ) + (- f28-1 f26-0) + (let ((a0-60 arg1)) + (set! (-> a0-60 flags) (font-flags kerning large)) + ) + (let ((v1-100 arg1)) + (set! (-> v1-100 width) f26-0) + ) + (let ((s2-6 *menu-secrets-array*) + (s1-5 (max 0 (the int (-> this current-index)))) + ) + (let* ((a0-61 (-> s2-6 s1-5)) + (s0-4 (-> a0-61 name)) + ) + (case (secret-item-option-method-12 a0-61) + ((4) + (set! sv-192 "?????????") + ) + (else + (set! sv-192 (lookup-text! *common-text* s0-4 #f)) + ) + ) + ) + (let ((s0-5 print-game-text)) + (set! sv-176 format) + (let ((a0-65 (clear *temp-string*)) + (a1-37 "~S") + ) + (sv-176 a0-65 a1-37 sv-192) + ) + (let ((f24-0 (s0-5 *temp-string* arg1 #t 40 (bucket-id hud-draw-hud-alpha)))) + (let ((f0-33 4.0) + (f1-25 (-> this current-index)) + ) + (set! (-> arg1 origin y) + (+ (- f0-33 (* f24-0 (- f1-25 (* (the float (the int (/ f1-25 1.0))) 1.0)))) (-> s3-3 y)) + ) + ) + (set! (-> arg1 height) f22-0) + (while (and (< (-> arg1 origin y) (-> s3-3 w)) (< s1-5 (-> *menu-secrets-array* length))) + (let ((s0-6 (-> s2-6 s1-5))) + (set! sv-208 (-> s2-6 s1-5 name)) + (set! sv-288 (secret-item-option-method-12 s0-6)) + (case sv-288 + ((4) + (set! sv-240 "?????????") + ) + (else + (let* ((a0-69 *common-text*) + (t9-51 (method-of-object a0-69 lookup-text!)) + (a2-27 #f) + ) + (set! sv-240 (t9-51 a0-69 sv-208 a2-27)) + ) + ) + ) + (cond + ((logtest? (-> s2-6 s1-5 flags) (secret-item-option-flags sf0)) + (set! (-> arg1 origin x) (+ 10.0 (-> s3-3 x))) + (let ((v1-130 arg1)) + (set! (-> v1-130 width) f28-1) + ) + (let ((a0-70 arg1)) + (set! (-> a0-70 color) (font-color font-color-34)) + ) + (let ((a0-71 arg1)) + (set! (-> a0-71 flags) (font-flags kerning large)) + ) + (let ((f22-1 (-> arg1 origin y)) + (s0-7 print-game-text) + ) + (set! sv-224 format) + (let ((a0-73 (clear *temp-string*)) + (a1-40 "~S") + ) + (sv-224 a0-73 a1-40 sv-240) + ) + (set! (-> arg1 origin y) (+ f22-1 (s0-7 *temp-string* arg1 #f 40 (bucket-id hud-draw-hud-alpha)))) + ) + ) + ((not (and (logtest? (-> s2-6 s1-5 flags) (secret-item-option-flags sf4)) + (or (nonzero? (-> *setting-control* user-current subtitle-language)) + (nonzero? (-> *setting-control* user-current language)) + (nonzero? (-> *setting-control* user-current audio-language)) + ) + ) + ) + (set! (-> arg1 origin x) (+ (-> s3-3 x) f30-1)) + (let ((v1-147 arg1)) + (set! (-> v1-147 width) f26-0) + ) + (let ((v1-148 sv-288)) + (cond + ((or (= v1-148 4) (= v1-148 3)) + (let ((a0-79 arg1)) + (set! (-> a0-79 flags) (font-flags kerning large ff7)) + ) + (let ((v1-150 arg1)) + (set! (-> v1-150 color) (font-color font-color-44)) + ) + ) + ((zero? v1-148) + (let ((a0-81 arg1)) + (set! (-> a0-81 flags) (font-flags kerning large)) + ) + (let ((v1-152 arg1)) + (set! (-> v1-152 color) (font-color font-color-34)) + ) + ) + (else + (let ((a0-83 arg1)) + (set! (-> a0-83 flags) (font-flags kerning large)) + ) + (let ((v1-154 arg1)) + (set! (-> v1-154 color) (font-color font-color-32)) + ) + ) + ) + ) + (let ((f22-2 (-> arg1 origin y))) + (set! sv-256 print-game-text) + (set! sv-272 format) + (let ((a0-86 (clear *temp-string*)) + (a1-44 "~S") + (a2-30 sv-240) + ) + (sv-272 a0-86 a1-44 a2-30) + ) + (let* ((a0-87 *temp-string*) + (a1-45 arg1) + (a2-31 #f) + (a3-15 40) + (t0-9 579) + (f20-0 (sv-256 a0-87 a1-45 a2-31 a3-15 (the-as bucket-id t0-9))) + ) + (when (not (logtest? (-> s2-6 s1-5 flags) (secret-item-option-flags sf0))) + (set! (-> arg1 origin x) (+ (-> s3-3 x) f28-1)) + (let ((a0-88 arg1)) + (set! (-> a0-88 flags) (font-flags kerning right large)) + ) + (set! sv-352 (lookup-text! *common-text* (text-id progress-on) #f)) + (set! sv-368 (lookup-text! *common-text* (text-id progress-off) #f)) + (cond + ((or (zero? sv-288) (= sv-288 3)) + (set! sv-304 print-game-text) + (set! sv-320 format) + (let ((a0-93 (clear *temp-string*)) + (a1-48 "~d") + (a2-34 (-> s0-6 cost)) + ) + (sv-320 a0-93 a1-48 a2-34) + ) + (let ((a0-94 *temp-string*) + (a1-49 arg1) + (a2-35 #f) + (a3-16 40) + (t0-10 579) + ) + (sv-304 a0-94 a1-49 a2-35 a3-16 (the-as bucket-id t0-10)) + ) + ) + ((= sv-288 1) + (cond + ((logtest? (-> s2-6 s1-5 flags) (secret-item-option-flags sf1)) + (let ((s0-8 print-game-text)) + (set! sv-336 format) + (let ((a0-97 (clear *temp-string*)) + (a1-50 "~32L~S~44L ~S") + ) + (sv-336 a0-97 a1-50 sv-352 sv-368 (the-as none t0-9) (the-as none t1-0)) + ) + (s0-8 *temp-string* arg1 #f 40 (bucket-id hud-draw-hud-alpha)) + ) + ) + (else + (let ((s0-9 print-game-text)) + (set! sv-384 format) + (let ((a0-100 (clear *temp-string*)) + (a1-52 "~S") + (a2-38 sv-352) + ) + (sv-384 a0-100 a1-52 a2-38) + ) + (s0-9 *temp-string* arg1 #f 40 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + ((= sv-288 2) + (cond + ((logtest? (-> s2-6 s1-5 flags) (secret-item-option-flags sf1)) + (let ((s0-10 print-game-text)) + (set! sv-400 format) + (let ((a0-104 (clear *temp-string*)) + (a1-54 "~44L~S ~32L~S~1L") + (a2-40 sv-352) + (a3-20 sv-368) + ) + (sv-400 a0-104 a1-54 a2-40 a3-20 (the-as none t0-9) (the-as none t1-0)) + ) + (s0-10 *temp-string* arg1 #f 40 (bucket-id hud-draw-hud-alpha)) + ) + ) + (else + (let ((s0-11 print-game-text)) + (set! sv-416 format) + (let ((a0-107 (clear *temp-string*)) + (a1-56 "~S") + (a2-42 sv-368) + ) + (sv-416 a0-107 a1-56 a2-42) + ) + (s0-11 *temp-string* arg1 #f 40 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + ) + ) + (+! (-> arg1 origin y) f20-0) + (if (= s1-5 (-> this selected-index)) + (progress-method-40 arg0 arg1 (the int (+ -2.0 f22-2)) (the int (+ 3.0 f20-0)) sv-16) + ) + ) + ) + ) + ) + ) + (+! s1-5 1) + ) + (seek! (-> this current-index) (-> this target-index) (* (/ 600.0 f24-0) (seconds-per-frame))) + ) + ) + ) + ) + ) + (progress-method-34 arg0) + (let ((s3-4 *progress-work*)) + (progress-method-46 arg0 arg1 sv-16 84) + (progress-method-41 arg0 (-> s3-4 sub-header) (* 128.0 sv-16)) + (progress-method-42 arg0 (-> s3-4 footer) (* 64.0 sv-16)) + (progress-method-41 arg0 (-> s3-4 footer) (* 128.0 sv-16)) + ) + (progress-method-47 + arg0 + arg1 + (!= (-> this current-index) 0.0) + (!= (-> this current-index) (the float (+ (-> *menu-secrets-array* length) -1))) + ) + ) + ) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/ui/progress/progress-h.gc b/goal_src/jak3/engine/ui/progress/progress-h.gc index e71400beb4..b5a4c3fd8e 100644 --- a/goal_src/jak3/engine/ui/progress/progress-h.gc +++ b/goal_src/jak3/engine/ui/progress/progress-h.gc @@ -11,6 +11,9 @@ (define-extern activate-progress (function process symbol none)) (define-extern *progress-work* progress-work) (define-extern progress-allowed? (function symbol)) +(define-extern deactivate-progress (function none)) +(define-extern hide-progress-screen (function none)) +(define-extern menu-secrets-notify-task-node-close (function game-task-node none)) ;; +++progress-icon-flags (defenum progress-icon-flags @@ -146,7 +149,7 @@ (deftype progress-list (basic) () (:methods - (progress-list-method-9 () none) + (progress-list-method-9 (_type_ int) game-task-info) ) ) @@ -226,41 +229,43 @@ (progress-id uint32) (lock-tick-count int32) ) + (:state-methods + come-in + idle + go-away + gone + ) (:methods - (progress-method-20 () none) - (progress-method-21 () none) - (progress-method-22 () none) - (progress-method-23 () none) - (progress-method-24 () none) - (progress-method-25 () none) - (progress-method-26 () none) - (progress-method-27 () none) - (progress-method-28 () none) - (progress-method-29 () none) - (progress-method-30 () none) - (progress-method-31 () none) - (progress-method-32 () none) - (progress-method-33 () none) - (progress-method-34 () none) - (progress-method-35 () none) - (progress-method-36 () none) - (progress-method-37 () none) - (progress-method-38 () none) - (progress-method-39 () none) - (progress-method-40 () none) - (progress-method-41 () none) - (progress-method-42 () none) - (progress-method-43 () none) - (progress-method-44 () none) - (progress-method-45 () none) - (progress-method-46 () none) - (progress-method-47 () none) - (progress-method-48 () none) - (progress-method-49 () none) - (progress-method-50 () none) - (progress-method-51 () none) - (progress-method-52 () none) - (progress-method-53 () none) + (init-defaults (_type_) object) + (respond-to-cpad (_type_) none) + (gone? (_type_) object) + (can-go-back? (_type_) symbol) + (get-state-check-card (_type_ symbol) symbol) + (push-state (_type_) int) + (pop-state (_type_) int) + (set-next-state (_type_ symbol int) int) + (set-menu-options (_type_ symbol) int) + (progress-method-33 (_type_ progress-box) none) + (progress-method-34 (_type_) none) + (get-scissor-stack-top (_type_) vector) + (get-language-by-idx (_type_ int) int) + (progress-method-37 (_type_) none) + (progress-method-38 (_type_ font-context float) none) + (progress-method-39 (_type_) none) + (progress-method-40 (_type_ font-context int int float) none) + (progress-method-41 (_type_ progress-box float) none) + (progress-method-42 (_type_ progress-box float) none) + (progress-method-43 (_type_ progress-box float) none) + (progress-method-44 (_type_ font-context string) none) + (progress-method-45 (_type_ font-context float float string float float int) float) + (progress-method-46 (_type_ font-context float int) none) + (progress-method-47 (_type_ font-context symbol symbol) none) + (draw-prev-next-footer (_type_ font-context float) none) + (draw-yes-no-style-footer (_type_ font-context text-id text-id) none) + (progress-method-50 (_type_ font-context text-id text-id text-id symbol symbol float) none) + (progress-method-51 (_type_ font-context) none) + (progress-method-52 (_type_ font-context string float float float float float) none) + (progress-method-53 (_type_ font-context) none) ) ) @@ -307,7 +312,7 @@ ((icons progress-icon-part :dynamic :offset 16) ) (:methods - (progress-icon-array-method-9 () none) + (draw-icon-array! (_type_ int int float float rgba float) none) ) ) @@ -319,8 +324,8 @@ (box hud-box 1 :inline) ) (:methods - (menu-option-method-9 () none) - (menu-option-method-10 () none) + (respond-progress (_type_ progress symbol) int) + (draw-option (_type_ progress font-context int symbol) none) (menu-option-method-11 () none) ) ) @@ -521,10 +526,10 @@ (icon-offsety float) ) (:methods - (highscore-page-info-method-9 () none) - (highscore-page-info-method-10 () none) - (highscore-page-info-method-11 () none) - (highscore-page-info-method-12 () none) + (highscore-page-info-method-9 (_type_ progress font-context float float) none) + (highscore-page-info-method-10 (_type_ font-context float float float) none) + (highscore-page-info-method-11 (_type_ font-context int float float float) none) + (highscore-time->string (_type_ float) string) ) ) @@ -533,11 +538,11 @@ ((current-index float) (target-index float) (num-pages int32) - (pages highscore-page-info 16) - (info basic) + (pages paged-menu-option 16) + (info (array highscore-page-info)) ) (:methods - (menu-highscores-option-method-12 () none) + (menu-highscores-option-method-12 (_type_) int) ) ) @@ -550,7 +555,7 @@ (vehicle game-vehicles) ) (:methods - (controls-string-info-method-9 () none) + (controls-string-info-method-9 (_type_ progress font-context float float float float float) none) ) ) @@ -563,14 +568,14 @@ (current-index float) (target-index float) (num-text int32) - (on-screen basic) - (text text-id 9) + (on-screen symbol) + (text game-text 9) (strings (array controls-string-info)) ) (:methods - (controls-page-info-method-9 () none) - (controls-page-info-method-10 () none) - (controls-page-info-method-11 () none) + (init-text! (_type_) int) + (controls-page-info-method-10 (_type_) none) + (controls-page-info-method-11 (_type_ progress font-context float float) none) ) ) @@ -579,10 +584,10 @@ ((current-index float) (target-index float) (pages controls-page-info 7 :offset 76) - (info basic) + (info (array controls-page-info)) ) (:methods - (menu-controls-option-method-12 () none) + (menu-controls-option-method-12 (_type_) int) ) ) @@ -596,8 +601,8 @@ (flags secret-item-option-flags) ) (:methods - (secret-item-option-method-12 () none) - (secret-item-option-method-13 () none) + (secret-item-option-method-12 (_type_) int) + (secret-item-option-method-13 (_type_) game-vehicles) ) ) @@ -704,8 +709,8 @@ (item game-items) ) (:methods - (inventory-item-method-9 () none) - (inventory-item-method-10 () none) + (item-obtained? (_type_) symbol) + (inventory-item-method-10 (_type_ progress font-context float float symbol) none) ) ) @@ -719,8 +724,8 @@ (items (array inventory-item)) ) (:methods - (inventory-item-group-method-9 () none) - (inventory-item-group-method-10 () none) + (have-items? (_type_) symbol) + (inventory-item-group-method-10 (_type_ progress font-context float float int) none) ) ) @@ -731,7 +736,7 @@ (groups (array inventory-item-group)) ) (:methods - (inventory-screen-method-9 () none) + (inventory-screen-method-9 (_type_ progress font-context float float) none) ) ) diff --git a/goal_src/jak3/engine/ui/progress/progress-static.gc b/goal_src/jak3/engine/ui/progress/progress-static.gc index ee85d5f83a..e373177f69 100644 --- a/goal_src/jak3/engine/ui/progress/progress-static.gc +++ b/goal_src/jak3/engine/ui/progress/progress-static.gc @@ -1135,9 +1135,12 @@ (new 'static 'boxed-array :type uint8 #x0 #x1 #x2 #x3 #x4 #x5 #x0 #x0 #x0 #x0 #x0 #xb) ) -(define *stereo-mode-name-remap* - (new 'static 'boxed-array :type text-id (text-id text-0005) (text-id text-0006) (text-id text-0007)) - ) +(define *stereo-mode-name-remap* (new 'static 'boxed-array :type text-id + (text-id progress-sound-mono) + (text-id progress-sound-stereo) + (text-id progress-sound-surround) + ) + ) (define *hud-ring-graphic-remap* (new 'static 'boxed-array :type uint64 #x40 #x80 #x10 #x400 #x8 #x4 #x20 #x100 #x200 #x2) @@ -1152,7 +1155,7 @@ ) (define *hud-ring-demo-shared-graphic-remap* - (the-as array (new 'static 'boxed-array :type uint64 #x80 #x8 #x4 #x2 #x200 #x200 #x200 #x200 #x200 #x200)) + (new 'static 'boxed-array :type uint64 #x80 #x8 #x4 #x2 #x200 #x200 #x200 #x200 #x200 #x200) ) (deftype hud-scene-info (basic) @@ -3248,7 +3251,7 @@ :icon (inventory-icon pass-wascity) :icon-scale 1.0 :offset (new 'static 'vector2 :data (new 'static 'array float 2 0.225 0.05)) - :item (game-items pass-wascity) + :item (game-items pass-front-gate) ) ) ) @@ -3292,7 +3295,7 @@ :icon (inventory-icon pass-factory) :icon-scale 1.0 :offset (new 'static 'vector2 :data (new 'static 'array float 2 0.825 0.05)) - :item (game-items pass-factory) + :item (game-items cypher-gliph) ) ) ) @@ -3321,7 +3324,7 @@ :icon (inventory-icon artifact-beam-generator) :icon-scale 1.0 :offset (new 'static 'vector2 :data (new 'static 'array float 2 0.225 0.35)) - :item (game-items artifact-beam-generator) + :item (game-items artifact-av-generator) ) ) ) @@ -3336,7 +3339,7 @@ :icon (inventory-icon artifact-prism) :icon-scale 1.0 :offset (new 'static 'vector2 :data (new 'static 'array float 2 0.425 0.35)) - :item (game-items artifact-prism) + :item (game-items artifact-av-prism) ) ) ) @@ -3351,7 +3354,7 @@ :icon (inventory-icon artifact-quantum-reflector) :icon-scale 1.0 :offset (new 'static 'vector2 :data (new 'static 'array float 2 0.625 0.35)) - :item (game-items artifact-quantum-reflector) + :item (game-items artifact-av-reflector) ) ) ) @@ -3366,7 +3369,7 @@ :icon (inventory-icon artifact-time-map) :icon-scale 1.0 :offset (new 'static 'vector2 :data (new 'static 'array float 2 0.825 0.35)) - :item (game-items artifact-time-map) + :item (game-items artifact-av-map) ) ) ) diff --git a/goal_src/jak3/engine/ui/progress/progress.gc b/goal_src/jak3/engine/ui/progress/progress.gc index 34c59a8fdf..878e8ab4c5 100644 --- a/goal_src/jak3/engine/ui/progress/progress.gc +++ b/goal_src/jak3/engine/ui/progress/progress.gc @@ -5,5 +5,4143 @@ ;; name in dgo: progress ;; dgos: GAME +(define-extern memcard-unlocked-secrets? (function object symbol game-secrets)) +(define-extern *progress-list-level* progress-list-level) + ;; DECOMP BEGINS +(kmemopen global "progress-data") + +(define *progress-stack* (the-as (pointer uint8) (malloc 'global #x3800))) + +(define *progress-process* (the-as (pointer progress) #f)) + +(define *progress-save-info* (new 'global 'mc-slot-info)) + +(define *progress-work* + (new 'static 'progress-work + :full-screen (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 :max (new 'static 'vector2 :data (new 'static 'array float 2 512.0 416.0))) + :color (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 :max (new 'static 'vector2 :data (new 'static 'array float 2 512.0 416.0))) + :color (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) + ) + ) + :small-screen (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 70.0 72.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 444.0 329.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 79.0 38.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 434.0 362.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) + ) + ) + :header (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 70.0 72.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 444.0 117.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 79.0 38.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 434.0 83.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + ) + :body (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 70.0 117.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 444.0 329.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 79.0 83.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 434.0 362.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + ) + :body-footer (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 70.0 117.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 444.0 304.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 79.0 83.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 434.0 337.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + ) + :footer (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 70.0 304.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 444.0 329.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 79.0 337.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 434.0 362.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + ) + :sub-header (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 70.0 117.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 444.0 145.0)) + ) + :color (new 'static 'vector4w :x #xc0 :y #xc0 :z 96 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 79.0 83.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 434.0 111.0)) + ) + :color (new 'static 'vector4w :x #xc0 :y #xc0 :z 96 :w #x80) + ) + ) + :sub-body (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 70.0 145.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 444.0 329.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 79.0 111.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 434.0 362.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + ) + :sub-body-footer (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 70.0 145.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 444.0 304.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 79.0 111.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 434.0 337.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + ) + :highscore-0 (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 70.0 117.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 444.0 165.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 79.0 83.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 434.0 131.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + ) + :highscore-1 (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 70.0 165.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 444.0 181.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 79.0 131.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 434.0 147.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + ) + :highscore-body (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 70.0 181.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 444.0 304.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 79.0 147.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 434.0 337.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + ) + :last-slot-saved -1 + :secrets-unlocked #f + :hero-mode-save #f + ) + ) + +(kmemclose) + +(defun min-max-wrap-around ((arg0 int) (arg1 int) (arg2 int)) + (let ((v1-2 (+ (- 1 arg1) arg2))) + (while (< arg0 arg1) + (+! arg0 v1-2) + ) + (while (< arg2 arg0) + (set! arg0 (- arg0 v1-2)) + ) + ) + arg0 + ) + +(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) + 0 + ) + +;; WARN: Return type mismatch int vs object. +(defmethod init-defaults ((this progress)) + (local-vars (v0-3 int)) + (set! (-> this total-num-tasks) 0) + (set! (-> this clear-screen) #f) + (set! (-> this scanlines-alpha) 0.0) + (set-time! (-> this start-time)) + (set! (-> this which-slot) (-> *progress-work* last-slot-saved)) + (set! (-> this yes-no-choice) #f) + (set-time! (-> this time-out)) + (set-time! (-> this last-sound)) + (set-time! (-> this last-move)) + (set! (-> this center-x-backup) (-> *setting-control* user-default screenx)) + (set! (-> this center-y-backup) (-> *setting-control* user-default screeny)) + (set! (-> this flip-horizontal) (the-as basic (-> *setting-control* cam-default flip-horizontal))) + (set! (-> this flip-vertical) (the-as basic (-> *setting-control* cam-default flip-vertical))) + (set! (-> this progressive-scan) (the-as basic (-> *setting-control* user-default set-video-mode))) + (set! (-> this aspect-ratio) (the-as basic (get-aspect-ratio))) + (set! (-> this video-mode) (the-as basic (get-video-mode))) + (set! (-> this stereo-mode-backup) (-> *setting-control* user-default stereo-mode)) + (set! (-> this vibrations) (the-as basic (-> *setting-control* user-default vibration))) + (set! (-> this subtitles) (the-as basic (-> *setting-control* user-default subtitle))) + (set! (-> this language-index) (the-as int (-> *setting-control* user-default language))) + (set! (-> this subtitle-language-index) (the-as int (-> *setting-control* user-default subtitle-language))) + (set! (-> this audio-language-index) (the-as int (-> *setting-control* user-default audio-language))) + (set! (-> (the-as menu-missions-option (-> *missions-options* options 0)) current-index) 0.0) + (set! (-> (the-as menu-missions-option (-> *missions-options* options 0)) target-index) 0.0) + (set! (-> *progress-work* secrets-unlocked) #f) + (set! (-> *progress-work* hero-mode-save) #f) + (set-setting-by-param *setting-control* 'extra-bank '((force2 menu1)) 0 0) + (cond + ((or (nonzero? (-> *setting-control* user-current subtitle-language)) + (nonzero? (-> *setting-control* user-current language)) + (nonzero? (-> *setting-control* user-current audio-language)) + ) + (set! v0-3 11) + (set! (-> *unlocked-secrets* options length) v0-3) + ) + (else + (set! v0-3 12) + (set! (-> *unlocked-secrets* options length) v0-3) + ) + ) + v0-3 + ) + +(deftype hud-ring-cell (process-drawable) + ((parent (pointer progress) :override) + (joint-idx int32) + (init-angle float) + (graphic-index int32) + ) + (:state-methods + idle + ) + ) + + +(defun hud-ring-cell-remap ((arg0 hud-ring-cell)) + (let ((v1-0 *hud-ring-graphic-remap*)) + (when (not *cheat-mode*) + (case *kernel-boot-message* + (('quote 'kiosk) + (set! v1-0 *hud-ring-kiosk-graphic-remap*) + ) + (('quote 'demo) + (set! v1-0 *hud-ring-demo-graphic-remap*) + ) + (('quote 'demo-shared) + (set! v1-0 *hud-ring-demo-shared-graphic-remap*) + ) + ) + ) + (setup-masks + (-> arg0 draw) + (the-as int (-> v1-0 (mod (+ (-> arg0 graphic-index) (-> arg0 parent 0 graphic-index)) (-> v1-0 length)))) + 0 + ) + ) + (none) + ) + +(defbehavior hud-ring-cell-init-by-other hud-ring-cell ((arg0 int) (arg1 float) (arg2 int)) + (set! (-> self root) (new 'process 'trsqv)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-hud-ring-part" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self joint-idx) arg0) + (set! (-> self init-angle) arg1) + (set! (-> self graphic-index) arg2) + (set! (-> self root trans quad) (-> self parent 0 root trans quad)) + (quaternion-copy! (-> self root quat) (-> self parent 0 root quat)) + (quaternion-normalize! (-> self root quat)) + (set! (-> self root scale quad) (-> self parent 0 root scale quad)) + (let ((gp-1 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *z-vector* (-> self init-angle)))) + (quaternion-normalize! gp-1) + (quaternion*! (-> self root quat) (-> self root quat) gp-1) + ) + (quaternion-normalize! (-> self root quat)) + (set-vector! (-> self draw color-mult) 0.8 0.8 0.8 1.0) + (logior! (-> self draw global-effect) (draw-control-global-effect title-light)) + (logior! (-> self draw status) (draw-control-status hud)) + (setup-masks (-> self draw) 1 0) + (setup-masks (-> self draw) 0 2046) + (hud-ring-cell-remap self) + (go-virtual idle) + ) + +(defstate idle (hud-ring-cell) + :virtual #t + :code (behavior () + (ja :num-func num-func-identity :frame-num 0.0) + (sleep-code) + ) + :post (behavior () + (vector<-cspace! (-> self root trans) (-> self parent 0 node-list data (-> self joint-idx))) + (when (-> self parent 0 main-menu) + (setup-masks (-> self draw) 0 2046) + (hud-ring-cell-remap self) + ) + (when (= (-> self init-angle) 0.0) + (if (= (-> self parent 0 ring-angle) (-> self parent 0 ring-want-angle)) + (set-vector! (-> self draw color-mult) 1.2 1.2 1.2 1.0) + (set-vector! (-> self draw color-mult) 0.8 0.8 0.8 1.0) + ) + ) + (let* ((t9-3 quaternion-vector-angle!) + (a0-11 (new 'stack-no-clear 'quaternion)) + (a1-5 *z-vector*) + (f0-10 (-> self init-angle)) + (f1-2 (-> self parent 0 ring-angle)) + (gp-0 (t9-3 a0-11 a1-5 (+ f0-10 (- f1-2 (* (the float (the int (/ f1-2 6553.6))) 6553.6))))) + ) + (quaternion-normalize! gp-0) + (quaternion-copy! (-> self root quat) (-> self parent 0 root quat)) + (quaternion-normalize! (-> self root quat)) + (quaternion*! (-> self root quat) (-> self root quat) gp-0) + ) + (quaternion-normalize! (-> self root quat)) + (ja-post) + ) + ) + +(defbehavior progress-init-by-other progress ((arg0 symbol)) + (set! (-> self progress-id) + (the-as uint (add-process *gui-control* self (gui-channel progress) (gui-action play) "progress" -99.0 0)) + ) + (disable-level-text-file-loading) + (logclear! (-> self mask) (process-mask menu progress actor-pause)) + (add-setting! 'process-mask 'set 0.0 (process-mask progress)) + (+! (-> self clock ref-count) -1) + (+! (-> *display* real-clock ref-count) 1) + (set! (-> self clock) (-> *display* real-clock)) + (apply-settings *setting-control*) + (set-blackout-frames 0) + (set! *pause-lock* #f) + (set! (-> self root) (new 'process 'trsqv)) + (matrix->quaternion (-> self root quat) (-> *math-camera* inv-camera-rot)) + (let ((a2-3 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *y-vector* 32768.0))) + (quaternion*! (-> self root quat) (-> self root quat) a2-3) + ) + (quaternion-normalize! (-> self root quat)) + (quaternion-copy! (-> self init-quat) (-> self root quat)) + (set-vector! (-> self root scale) 0.09 0.09 0.09 1.0) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-hud-ring" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logior! (-> self draw global-effect) (draw-control-global-effect title-light)) + (logior! (-> self skel status) (joint-control-status sync-math)) + (set! (-> self state-pos) 0) + (set! (-> self menu-transition) 1.0) + (set! (-> self anim-frame) 0.0) + (set! (-> self pos-transition) 1.0) + (init-defaults self) + (set-next-state self arg0 0) + (set! (-> self starting-state) (the-as basic (-> self next))) + (set! (-> self current) (-> self next)) + (if (= arg0 'main) + (set! (-> self next) 'none) + ) + (set! (-> self ring-angle) 0.0) + (set! (-> self ring-want-angle) 0.0) + (set! (-> self want-option-index) 0) + (set! (-> self graphic-index) 0) + (set! (-> self swing) 0.0) + (set! (-> self main-menu) #f) + (set-menu-options self (-> self current)) + (logior! (-> self draw status) (draw-control-status hud)) + (set! (-> self option-index) 0) + (when (= (-> self current) 'title) + (mc-get-slot-info 0 *progress-save-info*) + (let ((v1-54 *progress-save-info*)) + (when (and v1-54 (= (-> v1-54 formatted) 1) (= (-> v1-54 inited) 1)) + (dotimes (a0-34 4) + (when (= (-> v1-54 file a0-34 present) 1) + (set! (-> self option-index) 1) + (set! (-> self next-option-index) 1) + ) + ) + ) + ) + ) + (let ((f30-0 -6571.804)) + (process-spawn hud-ring-cell 15 (* 0.0 f30-0) 0 :name "hud-ring-cell" :to self) + (process-spawn hud-ring-cell 9 f30-0 1 :name "hud-ring-cell" :to self) + (process-spawn hud-ring-cell 8 (* 2.0 f30-0) 2 :name "hud-ring-cell" :to self) + (process-spawn hud-ring-cell 7 (* 3.0 f30-0) 3 :name "hud-ring-cell" :to self) + (process-spawn hud-ring-cell 6 (* 4.0 f30-0) 4 :name "hud-ring-cell" :to self) + (process-spawn hud-ring-cell 16 (* -5.0 f30-0) 5 :name "hud-ring-cell" :to self) + (process-spawn hud-ring-cell 14 (* -4.0 f30-0) 6 :name "hud-ring-cell" :to self) + (process-spawn hud-ring-cell 13 (* -3.0 f30-0) 7 :name "hud-ring-cell" :to self) + (process-spawn hud-ring-cell 12 (* -2.0 f30-0) 8 :name "hud-ring-cell" :to self) + (process-spawn hud-ring-cell 11 (* -1.0 f30-0) 9 :name "hud-ring-cell" :to self) + ) + (clear *stdcon1*) + (if (nonzero? *bigmap*) + (enable-drawing *bigmap*) + ) + (set-setting! 'scanlines 'abs 0.0 0) + (go-virtual come-in) + ) + +(defun set-ring-position ((arg0 progress)) + (let ((s3-0 (new-stack-vector0)) + (s4-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (+! (-> s3-0 y) -8.0) + (case (get-aspect-ratio) + (('aspect4x3) + (position-in-front-of-screen! s4-0 12288.0 s3-0) + (position-in-front-of-screen! s5-0 -4096.0 s3-0) + ) + (else + (position-in-front-of-screen! s4-0 16384.0 s3-0) + (position-in-front-of-screen! s5-0 -18022.4 s3-0) + ) + ) + (vector-! s5-0 s5-0 s4-0) + (set! (-> arg0 root trans x) (+ (-> s4-0 x) (* (-> arg0 pos-transition) (-> s5-0 x)))) + (set! (-> arg0 root trans y) (+ (-> s4-0 y) (* (-> arg0 pos-transition) (-> s5-0 y)))) + (set! (-> arg0 root trans z) (+ (-> s4-0 z) (* (-> arg0 pos-transition) (-> s5-0 z)))) + ) + ) + +(defun activate-progress ((arg0 process) (arg1 symbol)) + (when *target* + (when (progress-allowed?) + (when *progress-process* + (deactivate (-> *progress-process* 0)) + (set-menu-mode *blit-displays-work* #t) + ) + (set! *progress-process* + (process-spawn progress arg1 :name "progress" :to arg0 :stack (&-> *progress-stack* 14336)) + ) + (set-master-mode 'progress) + ) + ) + 0 + (none) + ) + +(defmethod deactivate ((this progress)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set! (-> *progress-work* hero-mode-save) #f) + (remove-setting-by-arg0 *setting-control* 'extra-bank) + ;; og:preserve-this not-yet-implemented check + (if (nonzero? *bigmap*) (disable-drawing *bigmap*)) + (set-menu-mode *blit-displays-work* #f) + (set! *progress-process* (the-as (pointer progress) #f)) + (enable-level-text-file-loading) + (persist-with-delay *setting-control* 'allow-progress (seconds 0.1) 'allow-progress #f 0.0 0) + (persist-with-delay *setting-control* 'allow-pause (seconds 0.1) 'allow-pause #f 0.0 0) + (call-parent-method this) + (none) + ) + +(defun deactivate-progress () + (if *progress-process* + (deactivate (-> *progress-process* 0)) + ) + 0 + (none) + ) + +(defun hide-progress-screen () + (if (and *progress-process* (!= (-> *progress-process* 0 starting-state) 'title)) + (set-next-state (-> *progress-process* 0) 'go-away 0) + ) + 0 + (none) + ) + +(defmethod gone? ((this progress)) + (and *progress-process* + (-> *progress-process* 0 next-state) + (= (-> *progress-process* 0 next-state name) 'gone) + ) + ) + +(defun progress-allowed? () + (not (or (-> *setting-control* user-current talking) + (-> *setting-control* user-current movie) + (movie?) + (handle->process (-> *game-info* pov-camera-handle)) + (handle->process (-> *game-info* other-camera-handle)) + (< (-> *display* base-clock frame-counter) (-> *game-info* letterbox-time)) + (< (-> *display* base-clock frame-counter) (-> *game-info* blackout-time)) + (!= (-> *setting-control* user-current bg-a) 0.0) + (!= (-> *setting-control* user-current bg-a-force) 0.0) + (not (-> *setting-control* user-current allow-progress)) + (or (and (handle->process (-> *game-info* auto-save-proc)) + (not (send-event (handle->process (-> *game-info* auto-save-proc)) 'progress-allowed?)) + ) + (not *target*) + (= *cheat-mode* 'camera) + (= *master-mode* 'freeze) + *master-exit* + (not *common-text*) + (< (memory-free *nk-dead-pool*) #x8000) + ) + ) + ) + ) + +(defmethod can-go-back? ((this progress)) + (and (= (-> this menu-transition) 0.0) + (not (-> this selected-option)) + (!= (-> this current) 'loading) + (!= (-> this current) 'saving) + (!= (-> this current) 'formatting) + (!= (-> this current) 'creating) + (!= (-> this current) 'error-disc-removed) + (!= (-> this current) 'error-reading) + (!= (-> this current) 'card-removed) + (!= (-> this current) 'error-auto-saving) + (!= (-> this current) 'title) + (!= (-> this current) 'insufficient-space) + (!= (-> this current) 'secrets-insufficient-space) + (!= (-> this current) 'no-memory-card) + (!= (-> this current) 'icon-info) + (!= (-> this current) 'insert-card) + (!= (-> this current) 'progressive-mode-ok) + (!= (-> this current) 'video-mode-ok) + (!= (-> this current) 'progressive-mode-warning) + (!= (-> this current) 'video-mode-warning) + (!= (-> this current) 'select-kiosk-start-special) + (!= (-> this current) 'language-select) + ) + ) + +(defmethod get-state-check-card ((this progress) (arg0 symbol)) + (let ((v1-0 *progress-save-info*) + (v0-0 arg0) + ) + (when v1-0 + (when (and v1-0 (= (-> this menu-transition) 0.0)) + (case arg0 + (('insufficient-space 'no-memory-card 'unformatted-card) + (cond + ((zero? (-> v1-0 handle)) + (set! v0-0 'no-memory-card) + ) + ((zero? (-> v1-0 formatted)) + (cond + ((or (zero? (-> this state-pos)) (!= (-> this starting-state) 'title)) + (set! v0-0 'go-away) + ) + (else + (if (!= arg0 'unformatted-card) + (set! v0-0 'format-card) + ) + ) + ) + ) + ((and (zero? (-> v1-0 inited)) (< (-> v1-0 mem-actual) (-> v1-0 mem-required))) + (set! v0-0 'insufficient-space) + ) + ((or (zero? (-> this state-pos)) (!= (-> this starting-state) 'title)) + (set! v0-0 'go-away) + ) + ((-> *progress-work* hero-mode-save) + (set! v0-0 'select-save-hero) + ) + (else + (set! v0-0 'select-save) + ) + ) + ) + (('insert-card) + (if (= (-> v1-0 inited) 1) + (set! v0-0 'select-load) + ) + ) + ) + (cond + ((zero? (-> v1-0 handle)) + (cond + ((-> *setting-control* user-current auto-save) + (set! v0-0 'card-removed) + ) + (else + (case arg0 + (('select-load) + (set! v0-0 'insert-card) + ) + (('format-card + 'insufficient-space + 'unformatted-card + 'select-save + 'select-save-title + 'select-save-hero + 'create-game + 'already-exists + ) + (set! v0-0 'no-memory-card) + ) + ) + ) + ) + ) + ((zero? (-> v1-0 formatted)) + (case arg0 + (('select-load) + (set! v0-0 'insert-card) + ) + (('select-save 'select-save-title 'select-save-hero) + (set! v0-0 'format-card) + ) + ) + ) + ((zero? (-> v1-0 inited)) + (case arg0 + (('select-save 'select-save-title 'select-save-hero) + (if (>= (-> v1-0 mem-actual) (-> v1-0 mem-required)) + (set! v0-0 'create-game) + (set! v0-0 'insufficient-space) + ) + ) + (('select-load) + (set! v0-0 'insert-card) + ) + ) + ) + ) + ) + ) + v0-0 + ) + ) + +(defmethod push-state ((this progress)) + (let ((v1-0 (-> this state-pos))) + (cond + ((< v1-0 8) + (set! (-> this state-array v1-0) (-> this current)) + (set! (-> this option-index-stack v1-0) (-> this option-index)) + (set! (-> this state-pos) (+ v1-0 1)) + ) + (else + (format #t "ERROR: Can't push any more states on the state-array.~%") + ) + ) + ) + 0 + ) + +(defmethod pop-state ((this progress)) + (let ((v1-0 (-> this state-pos))) + (cond + ((> v1-0 0) + (let ((a2-0 (+ v1-0 -1))) + (set! (-> this state-pos) a2-0) + (set-next-state this (-> this state-array a2-0) (-> this option-index-stack a2-0)) + ) + ) + (else + (set-next-state this 'go-away 0) + ) + ) + ) + 0 + ) + +(defmethod set-next-state ((this progress) (arg0 symbol) (arg1 int)) + (set! (-> this clear-screen) #f) + (when (!= arg0 (-> this current)) + (set! (-> this selected-option) #f) + (set! (-> this yes-no-choice) #f) + (set! (-> this next-option-index) arg1) + (set! (-> this next) arg0) + (case (-> this next) + (('select-load 'select-save 'select-save-title 'select-save-hero) + (set! (-> this next) (get-state-check-card this (-> this next))) + ) + ) + (let ((v1-7 *progress-work*) + (a2-1 (-> this which-slot)) + ) + (case (-> this next) + (('main) + (set! (-> *progress-work* hero-mode-save) #f) + ) + (('creating) + (auto-save-command 'create-file 0 0 this #f) + ) + (('loading) + (set! (-> v1-7 last-slot-saved) a2-1) + (auto-save-command 'restore 0 a2-1 this #f) + (set! (-> (the-as menu-missions-option (-> *missions-options* options 0)) current-index) 0.0) + (set! (-> (the-as menu-missions-option (-> *missions-options* options 0)) target-index) 0.0) + ) + (('saving) + (set! (-> v1-7 last-slot-saved) a2-1) + (auto-save-command 'save 0 a2-1 this #f) + ) + (('formatting) + (auto-save-command 'format-card 0 0 this #f) + ) + (('select-save 'select-load) + (set! (-> this next-option-index) (max 0 (-> v1-7 last-slot-saved))) + ) + (('card-removed) + (set! (-> v1-7 last-slot-saved) 0) + 0 + ) + ) + ) + ) + 0 + ) + +(defmethod set-menu-options ((this progress) (arg0 symbol)) + (set! (-> this current-options) #f) + (case arg0 + (('go-away) + (go (method-of-object this go-away)) + ) + (('main) + (set! (-> this current-options) (cond + (*cheat-mode* + *main-options* + ) + ((kiosk?) + *main-kiosk-options* + ) + ((= *kernel-boot-message* 'demo) + *main-demo-options* + ) + ((= *kernel-boot-message* 'demo-shared) + *main-demo-shared-options* + ) + (else + *main-options* + ) + ) + ) + ) + (('options) + (set! (-> this current-options) *options-options*) + ) + (('controls) + (set! (-> (the-as paged-menu-option (-> *controls-options* options 0)) page-index) 0) + (set! (-> (the-as paged-menu-option (-> *controls-options* options 0)) prev-page-index) 0) + (set! (-> this current-options) *controls-options*) + ) + (('game-options) + (set! (-> this current-options) (cond + ((demo?) + (if (= (scf-get-territory) 1) + *game-options-demo* + *game-options-demo* + ) + ) + (else + *game-options* + ) + ) + ) + ) + (('graphic-options) + (set! (-> this current-options) + (if (or (= (scf-get-territory) 1) (and (= *progress-cheat* 'pal) (cpad-hold? 0 l2) (cpad-hold? 0 r2))) + *graphic-title-options-pal* + *graphic-options* + ) + ) + ) + (('sound-options) + (set! (-> this current-options) *sound-options*) + ) + (('picture-options) + (set! (-> this current-options) *picture-options*) + ) + (('camera-options) + (set! (-> this current-options) *camera-options*) + ) + (('select-load 'select-save) + (set! (-> this current-options) *load-save-options*) + ) + (('select-save-title) + (set! (-> this current-options) *save-options-title*) + ) + (('select-save-hero) + (logior! (-> *game-info* purchase-secrets) (game-secrets hero-mode)) + (set! (-> *progress-work* hero-mode-save) #t) + (set! (-> this current-options) *load-save-options*) + ) + (('hero-mode-message) + (set! (-> this current-options) *hero-mode-message-options*) + ) + (('loading 'saving 'creating 'formatting) + (set! (-> this current-options) *loading-options*) + ) + (('unformatted-card 'insufficient-space 'no-memory-card) + (set! (-> this current-options) *insufficient-space-options*) + ) + (('secrets-insufficient-space 'secrets-no-memory-card) + (set! (-> this current-options) *secrets-insufficient-space-options*) + ) + (('insert-card) + (set! (-> this current-options) *insert-card-options*) + ) + (('error-loading 'error-saving 'error-formatting 'error-creating) + (set! (-> this current-options) *error-loading-options*) + ) + (('error-auto-saving) + (set! (-> this current-options) *error-auto-saving-options*) + ) + (('card-removed) + (set! (-> this current-options) *card-removed-options*) + ) + (('error-disc-removed) + (set! (-> this current-options) *error-disc-removed-options*) + ) + (('error-reading) + (set! (-> this current-options) *error-reading-options*) + ) + (('icon-info) + (set! (-> this current-options) *icon-info-options*) + ) + (('format-card) + (set! (-> this current-options) *format-card-options*) + ) + (('already-exists) + (set! (-> this current-options) *already-exists-options*) + ) + (('create-game) + (set! (-> this current-options) *create-game-options*) + ) + (('video-mode-warning) + (set! (-> this current-options) *video-mode-warning-options*) + ) + (('video-mode-ok) + (set! (-> this current-options) *video-mode-ok-options*) + ) + (('progressive-mode-warning) + (set! (-> this current-options) *progressive-mode-warning-options*) + ) + (('progressive-mode-ok) + (set! (-> this current-options) *progressive-mode-ok-options*) + ) + (('language-select) + (set! (-> this current-options) *language-options*) + ) + (('title) + (set! (-> this current-options) *title*) + ) + (('title-options) + (set! (-> this current-options) *options-options*) + ) + (('select-start 'select-pre-start 'select-kiosk-start 'select-kiosk-start-special) + (set! (-> this current-options) *select-start-options*) + (set! (-> (the-as menu-select-start-option (-> *select-start-options* options 0)) current-index) 0.0) + (set! (-> (the-as menu-select-start-option (-> *select-start-options* options 0)) target-index) 0.0) + (set! (-> (the-as menu-select-start-option (-> *select-start-options* options 0)) selected-index) 0) + 0 + ) + (('select-scene) + (set! (-> this current-options) *select-scene-options*) + (set! (-> (the-as menu-select-scene-option (-> *select-scene-options* options 0)) current-index) 0.0) + (set! (-> (the-as menu-select-scene-option (-> *select-scene-options* options 0)) target-index) 0.0) + (set! (-> (the-as menu-select-scene-option (-> *select-scene-options* options 0)) selected-index) 0) + 0 + ) + (('select-scene-special) + (set! (-> this starting-state) (the-as basic 'title)) + (set! (-> this state-pos) 0) + (let ((v1-80 (-> this state-pos))) + (set! (-> this state-array v1-80) 'title) + (set! (-> this option-index-stack v1-80) 3) + (let ((v1-81 (+ v1-80 1))) + (set! (-> this state-array v1-81) 'unlocked-secrets) + (set! (-> this option-index-stack v1-81) (-> this option-index)) + (set! (-> this state-pos) (+ v1-81 1)) + ) + ) + (dotimes (s5-1 (-> this state-pos)) + (format #t "select-scene-special: ~S ~D~%" (-> this state-array s5-1) (-> this option-index-stack s5-1)) + ) + (set! (-> this current-options) *select-scene-options*) + ) + (('inventory) + (set! (-> this current-options) *inventory*) + ) + (('bigmap) + (set! (-> this current-options) *bigmap-options*) + ) + (('missions) + (set! (-> this missions-total-spacing) 0.0) + (set! (-> (the-as menu-missions-option (-> *missions-options* options 0)) current-index) 0.0) + (set! (-> (the-as menu-missions-option (-> *missions-options* options 0)) target-index) 0.0) + (set! (-> this current-options) *missions-options*) + ) + (('highscores) + (set! (-> this current-options) *highscores-options*) + ) + (('secret) + (set! (-> this secret-buying) #f) + (set! (-> this current-options) *secret-options*) + ) + (('quit-restart) + (set! (-> this current-options) *quit-restart-options*) + ) + (('unlocked-secrets) + (set! (-> this current-options) *unlocked-secrets*) + ) + ) + (when (= (-> this current-options) #f) + (format #t "Didn't find new menu settings!!~%") + (pop-state this) + ) + 0 + ) + +(defmethod respond-to-cpad ((this progress)) + (mc-get-slot-info 0 *progress-save-info*) + (memcard-unlocked-secrets? this #f) + (when (= (-> this current) 'title) + (cond + ((-> *progress-work* secrets-unlocked) + (set! (-> this current-options) *title-secret*) + ) + (else + (set! (-> this current-options) *title*) + (set! (-> this option-index) (min 2 (-> this option-index))) + ) + ) + ) + (when (-> this current-options) + (let ((s5-0 (-> this current-options options))) + (when (and s5-0 (and (= (-> this menu-transition) 0.0) (< (-> this option-index) (-> s5-0 length)))) + (respond-progress + (-> s5-0 (-> this option-index)) + this + (and (= (-> this menu-transition) 0.0) (-> this selected-option)) + ) + (cond + ((-> this selected-option) + (cond + ((cpad-pressed? 0 confirm) + (sound-play "generic-beep") + (set! (-> this selected-option) #f) + ) + ((cpad-pressed? 0 triangle) + (if (= (-> this current-options) *main-options*) + (sound-play "window-contract") + (sound-play "generic-beep") + ) + (set! (-> this selected-option) #f) + ) + ) + ) + (else + (cond + ((or (cpad-pressed? 0 up l-analog-up) + (and (cpad-hold? 0 up l-analog-up) (time-elapsed? (-> this last-move) (seconds 0.175))) + ) + (set-time! (-> this last-move)) + (cond + ((= (-> this current-options) *main-options*) + (sound-play "ring-select") + ) + ((!= (length s5-0) 1) + (sound-play "roll-over") + ) + ) + (if (and (= *title* (-> this current-options)) + (not (-> *progress-work* secrets-unlocked)) + (zero? (-> this option-index)) + ) + (set! (-> this option-index) 3) + ) + (cond + ((> (-> this want-option-index) 0) + (set! (-> this want-option-index) -1) + ) + ((< -2 (-> this want-option-index)) + (+! (-> this want-option-index) -1) + ) + ) + ) + ((or (cpad-pressed? 0 down l-analog-down) + (and (cpad-hold? 0 down l-analog-down) (time-elapsed? (-> this last-move) (seconds 0.175))) + ) + (set-time! (-> this last-move)) + (cond + ((= (-> this current-options) *main-options*) + (sound-play "ring-select") + ) + ((!= (length s5-0) 1) + (sound-play "roll-over") + ) + ) + (cond + ((< (-> this want-option-index) 0) + (set! (-> this want-option-index) 1) + ) + ((< (-> this want-option-index) 2) + (+! (-> this want-option-index) 1) + ) + ) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (if (not (-> this clear-screen)) + (sound-play "generic-beep") + ) + (set! (-> this selected-option) #t) + ) + ((cpad-pressed? 0 triangle) + (when (can-go-back? this) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) + (if (= (-> this state-pos) 1) + (sound-play "window-contract") + (sound-play "generic-beep") + ) + (pop-state this) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defbehavior progress-trans progress () + (cond + ((and (= (-> self next) 'none) (or (= (-> self starting-state) 'main) (= (-> self anim-frame) 1.0))) + (set! (-> self menu-transition) + (seek-ease + (-> self menu-transition) + 0.0 + (* 0.1 (-> self clock time-adjust-ratio)) + 0.4 + (* 0.01 (-> self clock time-adjust-ratio)) + ) + ) + ) + (else + (seek! (-> self menu-transition) 1.0 (* 0.1 (-> self clock time-adjust-ratio))) + (when (and (= (-> self menu-transition) 1.0) + (or (and (nonzero? (-> self state-pos)) (= (-> self anim-frame) 1.0)) + (or (and (zero? (-> self state-pos)) (= (-> self anim-frame) 0.0)) + (and (!= (-> self starting-state) 'main) (!= (-> self next) 'none)) + ) + ) + ) + (set! (-> self current) (-> self next)) + (set! (-> self next) 'none) + (set! (-> self option-index) (-> self next-option-index)) + (set! (-> self want-option-index) 0) + (set-menu-options self (-> self current)) + (set! (-> self scanlines-alpha) 0.0) + ) + ) + ) + (set! (-> self main-menu) + (and (zero? (-> self state-pos)) (and (= (-> self menu-transition) 0.0) + (= (-> self next) 'none) + (or (= (-> self state-array 0) 'main) (= (-> self current) 'main)) + ) + ) + ) + (when *cheat-mode* + (when (zero? (-> self state-pos)) + (cond + ((and (cpad-hold? 0 l2) (cpad-hold? 0 r1)) + (when (= (-> self current-options) *main-options*) + (set! (-> *progress-work* secrets-unlocked) (the-as basic #t)) + (set! (-> *progress-work* selected-num) 0) + (set! (-> self current-options) *main-options-debug*) + ) + ) + ((= (-> self current-options) *main-options-debug*) + (set! (-> self current-options) *main-options*) + ) + ) + ) + ) + (if (= (-> self ring-angle) (-> self ring-want-angle)) + (respond-to-cpad self) + ) + (let ((f30-0 (* 0.005 (-> self clock time-adjust-ratio)))) + (cond + ((= (-> self menu-transition) 1.0) + (if (and (zero? (-> self state-pos)) (= (-> self starting-state) 'main)) + (seek! (-> self anim-frame) 0.0 (* 0.02 (-> self clock time-adjust-ratio))) + (seek! (-> self anim-frame) 1.0 (* 0.02 (-> self clock time-adjust-ratio))) + ) + (let ((f0-27 (if (and (zero? (-> self state-pos)) (!= (-> self starting-state) 'title)) + 0.0 + 0.2 + ) + ) + ) + (when (= (-> self next) 'bigmap) + (set! f0-27 0.4) + (set! f30-0 (* 0.008 (-> self clock time-adjust-ratio))) + ) + (seek! (-> self pos-transition) f0-27 f30-0) + ) + ) + ((zero? (-> self state-pos)) + (if (= (-> self current) 'bigmap) + (set! f30-0 (* 0.05 (-> self clock time-adjust-ratio))) + ) + (if (!= (-> self starting-state) 'title) + (seek! (-> self pos-transition) 0.0 f30-0) + ) + ) + ) + ) + (if (!= (-> self starting-state) 'main) + (set! (-> self pos-transition) 0.2) + ) + (set-ring-position self) + (when (= (-> self ring-angle) (-> self ring-want-angle)) + (cond + ((< (-> self want-option-index) 0) + (cond + ((and (= *cheat-mode* #f) (or (demo?) (kiosk?))) + (if (> (-> self option-index) 0) + (+! (-> self option-index) -1) + ) + ) + (else + (set! (-> self option-index) + (min-max-wrap-around (+ (-> self option-index) -1) 0 (+ (length (-> self current-options options)) -1)) + ) + ) + ) + (set! (-> self graphic-index) (-> self option-index)) + (+! (-> self want-option-index) 1) + ) + ((> (-> self want-option-index) 0) + (cond + ((and (= *cheat-mode* #f) (or (demo?) (kiosk?))) + (if (< (-> self option-index) (+ (length (-> self current-options options)) -1)) + (+! (-> self option-index) 1) + ) + ) + (else + (set! (-> self option-index) + (min-max-wrap-around (+ (-> self option-index) 1) 0 (+ (length (-> self current-options options)) -1)) + ) + ) + ) + (+! (-> self want-option-index) -1) + ) + ) + ) + (if (= (-> self anim-frame) 0.0) + (set! (-> self swing) (seek-ease + (-> self swing) + 4.0 + (* 0.05 (-> self clock time-adjust-ratio)) + 0.5 + (* 0.005 (-> self clock time-adjust-ratio)) + ) + ) + (set! (-> self swing) (seek-ease + (-> self swing) + 0.0 + (* 0.07 (-> self clock time-adjust-ratio)) + 0.5 + (* 0.007 (-> self clock time-adjust-ratio)) + ) + ) + ) + (when (-> self main-menu) + (set! (-> self ring-want-angle) (ceil (* 182.04445 (* 36.0 (the float (-> self option-index)))))) + (if (and (= (-> self ring-want-angle) 0.0) (< 32768.0 (-> self ring-angle))) + (set! (-> self ring-want-angle) 65536.0) + ) + (let ((f0-54 (- (-> self ring-want-angle) (-> self ring-angle)))) + (when (< 32768.0 (fabs f0-54)) + (if (< 0.0 f0-54) + (+! (-> self ring-angle) 65536.0) + (+! (-> self ring-angle) -65536.0) + ) + ) + ) + (seek! (-> self ring-angle) (-> self ring-want-angle) (* 910.2222 (-> self clock time-adjust-ratio))) + ) + (let ((gp-4 (quaternion-vector-angle! + (new 'stack-no-clear 'quaternion) + *x-vector* + (* 182.04445 (* (-> self swing) (sin (the float (* 40 (current-time)))))) + ) + ) + (s5-4 (quaternion-vector-angle! + (new 'stack-no-clear 'quaternion) + *y-vector* + (* 182.04445 (* (-> self swing) (sin (the float (* 0 (current-time)))))) + ) + ) + ) + (quaternion*! (-> self root quat) (-> self init-quat) gp-4) + (quaternion*! (-> self root quat) (-> self root quat) s5-4) + ) + (quaternion-normalize! (-> self root quat)) + (if (= (-> self ring-angle) (-> self ring-want-angle)) + (set! (-> self graphic-index) (-> self option-index)) + ) + (case *kernel-boot-message* + (('kiosk) + (if (and (nonzero? (-> self start-time)) + (>= (- (-> *display* real-clock frame-counter) (-> self start-time)) (seconds 60)) + (>= (- (-> *display* real-clock frame-counter) (-> *cpad-list* cpads 0 real-change-time)) (seconds 60)) + (or (can-go-back? self) (= (-> self current) 'select-kiosk-start-special)) + (not (handle->process (-> *game-info* auto-save-proc))) + ) + (initialize! *game-info* 'game (the-as game-save #f) (the-as string #f) (the-as resetter-spec #f)) + ) + ) + ) + 0 + (none) + ) + +(defun begin-scan ((arg0 hud-box) (arg1 progress)) + (cond + ((or (= (-> arg1 current) 'bigmap) (= (-> arg1 next) 'bigmap)) + (set! (-> arg0 box min x) 0.0) + (set! (-> arg0 box min y) 0.0) + (set! (-> arg0 box max x) 512.0) + (set! (-> arg0 box max y) 416.0) + ) + ((= (get-aspect-ratio) 'aspect16x9) + (set! (-> arg0 box min x) 79.0) + (set! (-> arg0 box min y) 38.0) + (set! (-> arg0 box max x) 434.0) + (set! (-> arg0 box max y) 362.0) + ) + (else + (set! (-> arg0 box min x) 70.0) + (set! (-> arg0 box min y) 72.0) + (set! (-> arg0 box max x) 444.0) + (set! (-> arg0 box max y) 329.0) + ) + ) + 0 + ) + +(defun end-scan ((arg0 hud-box) (arg1 float)) + (with-dma-buffer-add-bucket ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id bucket582) + ) + (draw-scan-and-line arg0 s5-0 arg1) + ) + 0 + ) + +(defmethod progress-method-33 ((this progress) (arg0 progress-box)) + (set! (-> this scissor-count) (min 7 (+ (-> this scissor-count) 1))) + (let ((s5-0 (-> this scissor-stack (-> this scissor-count))) + (gp-1 (if (= (get-aspect-ratio) 'aspect4x3) + (-> arg0 aspect4x3) + (-> arg0 aspect16x9) + ) + ) + ) + (set! (-> s5-0 quad) (-> (the-as vector gp-1) quad)) + (with-dma-buffer-add-bucket ((v1-12 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-hud-alpha) + ) + (dma-buffer-add-gs-set v1-12 + (scissor-1 + (new 'static 'gs-scissor + :scax0 (the int (-> (the-as hud-box gp-1) box min x)) + :scay0 (the int (-> (the-as hud-box gp-1) box min y)) + :scax1 (the int (-> (the-as hud-box gp-1) box max x)) + :scay1 (the int (-> (the-as hud-box gp-1) box max y)) + ) + ) + ) + ) + (with-dma-buffer-add-bucket ((v1-23 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id particles) + ) + (dma-buffer-add-gs-set v1-23 + (scissor-1 + (new 'static 'gs-scissor + :scax0 (the int (-> (the-as hud-box gp-1) box min x)) + :scay0 (the int (-> (the-as hud-box gp-1) box min y)) + :scax1 (the int (-> (the-as hud-box gp-1) box max x)) + :scay1 (the int (-> (the-as hud-box gp-1) box max y)) + ) + ) + ) + ) + (with-dma-buffer-add-bucket ((v1-34 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-pris2) + ) + (dma-buffer-add-gs-set v1-34 (scissor-1 (new 'static 'gs-scissor + :scax0 (the int (-> (the-as hud-box gp-1) box min x)) + :scay0 (the int (-> (the-as hud-box gp-1) box min y)) + :scax1 (the int (-> (the-as hud-box gp-1) box max x)) + :scay1 (the int (-> (the-as hud-box gp-1) box max y)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod progress-method-34 ((this progress)) + (set! (-> this scissor-count) (max 0 (+ (-> this scissor-count) -1))) + (let ((gp-0 (-> this scissor-stack (-> this scissor-count)))) + (with-dma-buffer-add-bucket ((v1-10 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-hud-alpha) + ) + (dma-buffer-add-gs-set v1-10 + (scissor-1 + (new 'static 'gs-scissor + :scax0 (the int (-> gp-0 x)) + :scay0 (the int (-> gp-0 y)) + :scax1 (the int (-> gp-0 z)) + :scay1 (the int (-> gp-0 w)) + ) + ) + ) + ) + (with-dma-buffer-add-bucket ((v1-21 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id particles) + ) + (dma-buffer-add-gs-set v1-21 + (scissor-1 + (new 'static 'gs-scissor + :scax0 (the int (-> gp-0 x)) + :scay0 (the int (-> gp-0 y)) + :scax1 (the int (-> gp-0 z)) + :scay1 (the int (-> gp-0 w)) + ) + ) + ) + ) + (with-dma-buffer-add-bucket ((v1-32 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-pris2) + ) + (dma-buffer-add-gs-set v1-32 (scissor-1 (new 'static 'gs-scissor + :scax0 (the int (-> gp-0 x)) + :scay0 (the int (-> gp-0 y)) + :scax1 (the int (-> gp-0 z)) + :scay1 (the int (-> gp-0 w)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod get-scissor-stack-top ((this progress)) + (-> this scissor-stack (-> this scissor-count)) + ) + +(defbehavior progress-post progress () + (local-vars (sv-208 font-context) (sv-212 int) (sv-216 hud-box) (sv-220 symbol)) + (when (-> self current-options) + (progress-method-37 self) + (set! (-> self scissor-count) -1) + (progress-method-33 self (-> *progress-work* full-screen)) + (let ((gp-0 (-> self current-options options))) + (let ((s3-0 (-> self current-options y-center)) + (s5-0 (-> self current-options y-space)) + ) + (let ((s2-0 (new 'stack-no-clear 'matrix))) + (set! (-> s2-0 rvec quad) (the-as uint128 0)) + (set! (-> s2-0 uvec quad) (the-as uint128 0)) + (set! (-> s2-0 fvec quad) (the-as uint128 0)) + (set! (-> s2-0 trans quad) (the-as uint128 0)) + (let ((s4-0 *progress-work*)) + (mem-copy! (the-as pointer s2-0) (the-as pointer *font-default-matrix*) 64) + (set! sv-208 (new 'stack 'font-context s2-0 0 0 0.0 (font-color default) (font-flags shadow kerning))) + (set! sv-212 (- s3-0 (/ (* s5-0 (length gp-0)) 2))) + (set! sv-216 (new 'stack-no-clear 'hud-box)) + (set! sv-220 (and (!= (-> self current) 'main) (or (= (-> self next) 'none) (> (-> self state-pos) 0)))) + (progress-method-33 self (-> s4-0 small-screen)) + (when sv-220 + (begin-scan sv-216 self) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> self menu-transition)))))) + (when (not (or (= (-> self current) 'bigmap) (= (-> self next) 'bigmap))) + (progress-method-43 self (-> s4-0 small-screen) (* 144.0 f30-0)) + (progress-method-41 self (-> s4-0 small-screen) (* 128.0 f30-0)) + ) + ) + ) + ) + ) + (if (or (= (-> self current-options) *title*) (= (-> self current-options) *options-options*)) + (+ s5-0 20) + ) + ) + (dotimes (s5-1 (length gp-0)) + (set! (-> self current-index) s5-1) + (let ((v1-43 sv-208)) + (set! (-> v1-43 scale) 0.5) + ) + (set! (-> sv-208 origin x) 70.0) + (set! (-> sv-208 origin y) (the float sv-212)) + (let ((v1-48 sv-208)) + (set! (-> v1-48 width) (the float 375)) + ) + (let ((v1-49 sv-208)) + (set! (-> v1-49 height) (the float 30)) + ) + (set! (-> sv-208 flags) (font-flags kerning middle middle-vert large)) + (let ((v1-51 sv-208)) + (set! (-> v1-51 color) (if (and (= s5-1 (-> self option-index)) (= (-> self menu-transition) 0.0)) + (font-color font-color-33) + (font-color font-color-32) + ) + ) + ) + (draw-option + (-> gp-0 s5-1) + self + sv-208 + s5-1 + (and (= (-> self menu-transition) 0.0) (-> self selected-option) (= s5-1 (-> self option-index))) + ) + ) + ) + (if sv-220 + (set! (-> self scanlines-alpha) (seek-ease + (-> self scanlines-alpha) + (- 1.0 (-> self menu-transition)) + (* 0.05 (-> self clock time-adjust-ratio)) + 0.3 + (* 0.001 (-> self clock time-adjust-ratio)) + ) + ) + ) + (progress-method-34 self) + (end-scan sv-216 (-> self scanlines-alpha)) + ) + (when (and (< 0.8 (-> self anim-frame)) (or (= (-> self current) 'bigmap) (= (-> self next) 'bigmap))) + (progress-method-33 self (-> *progress-work* full-screen)) + (cond + ((>= (-> self pos-transition) 0.38) + (let ((t9-15 (method-of-object *bigmap* bigmap-method-12))) + 1792 + 1840 + 2304 + 2256 + (t9-15) + ) + ) + (else + (let ((s4-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 21))) + (s3-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 24))) + (gp-1 (new 'stack-no-clear 'vector4w)) + ) + (set! (-> gp-1 quad) (the-as uint128 0)) + (let ((s5-2 (new 'stack-no-clear 'vector4w))) + (set! (-> s5-2 quad) (the-as uint128 0)) + (when (and (transform-point-qword! gp-1 s4-1) (transform-point-qword! s5-2 s3-1)) + (let ((t9-20 (method-of-object *bigmap* bigmap-method-12))) + (/ (-> s5-2 x) 16) + (/ (-> s5-2 y) 16) + (/ (-> gp-1 x) 16) + (/ (-> gp-1 y) 16) + (t9-20) + ) + ) + ) + ) + ) + ) + (progress-method-34 self) + ) + (ja-post) + 0 + (none) + ) + +(defstate come-in (progress) + :virtual #t + :enter (behavior () + (set! (-> self pos-transition) 1.0) + (set! (-> self lock-tick-count) 0) + 0 + ) + :trans (behavior () + (let ((f30-0 (if (= (-> self starting-state) 'main) + 0.0 + 0.2 + ) + ) + ) + (when (hud-hidden?) + (set! (-> self pos-transition) (seek-ease + (-> self pos-transition) + f30-0 + (* 0.03 (-> self clock time-adjust-ratio)) + 0.4 + (* 0.003 (-> self clock time-adjust-ratio)) + ) + ) + (when (= (-> self lock-tick-count) 1) + (sound-play "ring-appear") + (set-menu-mode *blit-displays-work* #t) + ) + (+! (-> self lock-tick-count) 1) + ) + (set-ring-position self) + (when (= (-> self pos-transition) f30-0) + (set! (-> self start-time) (-> *display* real-clock frame-counter)) + (go-virtual idle) + ) + ) + ) + :code (behavior () + (until #f + (suspend) + (ja :num-func num-func-identity :frame-num 0.0) + (suspend) + ) + #f + ) + :post ja-post + ) + +(defstate idle (progress) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('notify) + (cond + ((= (-> block param 0) 'done) + (let ((t9-0 format) + (a0-3 #t) + (a1-1 "DONE NOTIFY: ~S ~S~%") + (v1-3 (-> block param 1)) + ) + (t9-0 + a0-3 + a1-1 + (cond + ((= v1-3 15) + "bad-version" + ) + ((= v1-3 13) + "no-save" + ) + ((= v1-3 10) + "no-last" + ) + ((= v1-3 14) + "no-space" + ) + ((= v1-3 4) + "internal-error" + ) + ((= v1-3 8) + "no-memory" + ) + ((= v1-3 2) + "bad-handle" + ) + ((zero? v1-3) + "busy" + ) + ((= v1-3 5) + "write-error" + ) + ((= v1-3 6) + "read-error" + ) + ((= v1-3 9) + "no-card" + ) + ((= v1-3 11) + "no-format" + ) + ((= v1-3 1) + "ok" + ) + ((= v1-3 16) + "no-process" + ) + ((= v1-3 17) + "no-auto-save" + ) + ((= v1-3 12) + "no-file" + ) + ((= v1-3 3) + "format-failed" + ) + ((= v1-3 7) + "new-game" + ) + (else + "*unknown*" + ) + ) + (-> self current) + ) + ) + (case (-> self current) + (('saving) + (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) + ) + ) + ) + (('formatting) + (set-next-state self 'creating 0) + ) + (('creating) + (cond + ((= (-> self state-array 0) 'title) + (set-next-state self 'select-save-title 0) + ) + ((-> *progress-work* hero-mode-save) + (set-next-state self 'select-save-hero 0) + ) + (else + (set-next-state self 'select-save 0) + ) + ) + ) + ) + ) + ((= (-> block param 0) 'error) + (let ((t9-9 format) + (a0-18 #t) + (a1-7 "ERROR NOTIFY: ~S ~S ~S~%") + (v1-20 (-> block param 1)) + ) + (t9-9 + a0-18 + a1-7 + (cond + ((= v1-20 15) + "bad-version" + ) + ((= v1-20 13) + "no-save" + ) + ((= v1-20 10) + "no-last" + ) + ((= v1-20 14) + "no-space" + ) + ((= v1-20 4) + "internal-error" + ) + ((= v1-20 8) + "no-memory" + ) + ((= v1-20 2) + "bad-handle" + ) + ((zero? v1-20) + "busy" + ) + ((= v1-20 5) + "write-error" + ) + ((= v1-20 6) + "read-error" + ) + ((= v1-20 9) + "no-card" + ) + ((= v1-20 11) + "no-format" + ) + ((= v1-20 1) + "ok" + ) + ((= v1-20 16) + "no-process" + ) + ((= v1-20 17) + "no-auto-save" + ) + ((= v1-20 12) + "no-file" + ) + ((= v1-20 3) + "format-failed" + ) + ((= v1-20 7) + "new-game" + ) + (else + "*unknown*" + ) + ) + (-> self current) + (-> self next) + ) + ) + (case (-> block param 1) + ((14) + (set-next-state self 'insufficient-space 0) + ) + (else + (case (-> self current) + (('formatting 'format-card) + (set-next-state self 'error-formatting 0) + ) + (('creating 'create-game) + (set-next-state self 'error-creating 0) + ) + (('saving 'select-save 'select-save-title 'select-save-hero 'already-exists) + (set-next-state self 'error-saving 0) + ) + (('loading 'select-load) + (set-next-state self 'error-loading 0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (set! (-> self menu-transition) 1.0) + ) + :trans progress-trans + :code (behavior () + (until #f + (ja :num-func num-func-identity :frame-num (* 12.0 (-> self anim-frame))) + (suspend) + ) + #f + ) + :post progress-post + ) + +(defstate go-away (progress) + :virtual #t + :enter (behavior () + (remove-setting-by-arg0 *setting-control* 'extra-bank) + (let ((v1-2 *blit-displays-work*)) + (set! (-> v1-2 progress-interp-dest) 0.0) + (set! (-> v1-2 progress-interp-speed) 0.022222223) + ) + ) + :trans (behavior () + (seek! (-> self anim-frame) 0.0 (* 0.02 (-> self clock time-adjust-ratio))) + (cond + ((= (-> self anim-frame) 0.0) + (seek! (-> self pos-transition) 1.0 (* 0.02 (-> self clock time-adjust-ratio))) + (if (= (-> self pos-transition) 1.0) + (go-virtual gone) + ) + ) + (else + (seek! (-> self pos-transition) 0.0 (* 0.02 (-> self clock time-adjust-ratio))) + ) + ) + (set-ring-position self) + ) + :code (behavior () + (let ((gp-0 #f)) + (until #f + (when (and (not gp-0) (= (-> self anim-frame) 0.0)) + (sound-play "ring-disappear") + (set! gp-0 #t) + ) + (ja :num-func num-func-identity :frame-num (* 12.0 (-> self anim-frame))) + (suspend) + ) + ) + #f + ) + :post ja-post + ) + +(defstate gone (progress) + :virtual #t + :code (behavior () + ;; og:preserve-this not-yet-implemented check + (if (nonzero? *bigmap*) (disable-drawing *bigmap*)) + (set-menu-mode *blit-displays-work* #f) + (while (or (-> *blit-displays-work* screen-copied) (nonzero? (-> *blit-displays-work* count-down))) + (suspend) + ) + (remove-setting! 'process-mask) + (set-master-mode *last-master-mode*) + (logior! (-> self mask) (process-mask sleep)) + (suspend) + 0 + ) + ) + +(defmethod respond-progress ((this menu-option) (arg0 progress) (arg1 symbol)) + 0 + ) + +(defmethod respond-progress ((this menu-slider-option) (arg0 progress) (arg1 symbol)) + (with-pp + (when (bigmap-method-11 *bigmap*) + (let ((s5-0 (&+ (the-as (pointer float) *setting-control*) (-> this setting-offset))) + (s3-0 #f) + ) + (let ((f30-0 (* 0.02 (-> pp clock time-adjust-ratio))) + (f28-0 0.0) + ) + (when (type? this menu-picture-slider-option) + (set! f30-0 (* 0.005 (-> pp clock time-adjust-ratio))) + (set! f28-0 0.25) + ) + (cond + ((cpad-hold? 0 left l-analog-left) + (seek! (-> s5-0 0) f28-0 f30-0) + (if (!= (-> s5-0 0) 0.0) + (set! s3-0 #t) + ) + ) + ((cpad-hold? 0 right l-analog-right) + (seek! (-> s5-0 0) 1.0 f30-0) + (if (!= (-> s5-0 0) 1.0) + (set! s3-0 #t) + ) + ) + ) + ) + (when s3-0 + (let ((f30-1 1.0)) + (case (-> this name) + (((text-id progress-music-volume) (text-id progress-speech-volume)) + (set! f30-1 (-> s5-0 0)) + ) + ) + (when (< (seconds 0.03) (- (current-time) (-> arg0 last-sound))) + (set-time! (-> arg0 last-sound)) + (sound-play-by-name + (static-sound-name "menu-slide") + (new-sound-id) + (the int (* 1024.0 f30-1)) + 0 + 0 + (sound-group) + #t + ) + ) + ) + ) + ) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + ) + 0 + ) + ) + +(defmethod respond-progress ((this menu-stereo-mode-sound-option) (arg0 progress) (arg1 symbol)) + (when (bigmap-method-11 *bigmap*) + (let ((a0-2 (-> *setting-control* user-default stereo-mode)) + (v1-4 #f) + ) + (let ((a2-1 2)) + (cond + (arg1 + (cond + ((cpad-pressed? 0 left l-analog-left) + (set! (-> *setting-control* user-default stereo-mode) (min-max-wrap-around (+ a0-2 -1) 0 a2-1)) + (set! v1-4 #t) + ) + ((cpad-pressed? 0 right l-analog-right) + (set! (-> *setting-control* user-default stereo-mode) (min-max-wrap-around (+ a0-2 1) 0 a2-1)) + (set! v1-4 #t) + ) + ((cpad-pressed? 0 triangle) + (set! (-> *setting-control* user-default stereo-mode) (-> arg0 stereo-mode-backup)) + ) + ) + ) + (else + (if (cpad-pressed? 0 confirm) + (set! (-> arg0 stereo-mode-backup) (-> *setting-control* user-default stereo-mode)) + ) + ) + ) + ) + (if v1-4 + (sound-play "generic-beep") + ) + ) + ) + 0 + ) + +(defmethod respond-progress ((this menu-main-menu-option) (arg0 progress) (arg1 symbol)) + (cond + ((cpad-pressed? 0 start) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) + (when (= (-> arg0 ring-angle) (-> arg0 ring-want-angle)) + (cond + ((= (-> this name) (text-id progress-exit-demo)) + (case *kernel-boot-message* + (('demo-shared) + (set! *master-exit* 'force) + (set-master-mode 'game) + ) + (('kiosk 'demo) + (set! (-> *game-info* mode) 'play) + (initialize! *game-info* 'game (the-as game-save #f) "title-restart" (the-as resetter-spec #f)) + ) + ) + ) + ((= (-> this name) (text-id progress-demo-return-to-title)) + (case *kernel-boot-message* + (('kiosk 'demo 'demo-shared) + (set! (-> *game-info* mode) 'play) + (initialize! *game-info* 'game (the-as game-save #f) "title-restart" (the-as resetter-spec #f)) + ) + ) + ) + ((or (= (-> this name) (text-id progress-scene-player-act-1)) + (= (-> this name) (text-id progress-scene-player-act-2)) + (= (-> this name) (text-id progress-scene-player-act-3)) + ) + (let ((v1-40 *progress-work*)) + (case (-> this name) + (((text-id progress-scene-player-act-2)) + (set! (-> v1-40 selected-num) 1) + ) + (((text-id progress-scene-player-act-3)) + (set! (-> v1-40 selected-num) 2) + ) + (else + (set! (-> v1-40 selected-num) 0) + 0 + ) + ) + ) + (sound-play "window-expand") + (push-state arg0) + (set-next-state arg0 (-> this next-state) 0) + ) + ((= (-> this next-state) 'back) + (pop-state arg0) + ) + ((= (-> this next-state) 'restart) + (sound-volume-off) + (restart-mission) + (pop-state arg0) + ) + (else + (sound-play "window-expand") + (push-state arg0) + (set-next-state arg0 (-> this next-state) 0) + ) + ) + ) + ) + ((not (-> arg0 selected-option)) + (let ((a0-59 (-> arg0 current-options options))) + (cond + ((or (cpad-pressed? 0 left l-analog-left) + (cpad-pressed? 0 l1) + (and (or (cpad-hold? 0 left l-analog-left) (cpad-hold? 0 l1)) + (time-elapsed? (-> arg0 last-move) (seconds 0.175)) + ) + ) + (set-time! (-> arg0 last-move)) + (if (!= (length a0-59) 1) + (sound-play "ring-select") + ) + (cond + ((> (-> arg0 want-option-index) 0) + (set! (-> arg0 want-option-index) -1) + ) + ((< -2 (-> arg0 want-option-index)) + (+! (-> arg0 want-option-index) -1) + ) + ) + ) + ((or (cpad-pressed? 0 right l-analog-right) + (and (cpad-pressed? 0 r1) (not (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons l2)))) + (and (or (cpad-hold? 0 right l-analog-right) + (and (cpad-hold? 0 r1) (not (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons l2)))) + ) + (time-elapsed? (-> arg0 last-move) (seconds 0.175)) + ) + ) + (set-time! (-> arg0 last-move)) + (if (!= (length a0-59) 1) + (sound-play "ring-select") + ) + (cond + ((< (-> arg0 want-option-index) 0) + (set! (-> arg0 want-option-index) 1) + ) + ((< (-> arg0 want-option-index) 2) + (+! (-> arg0 want-option-index) 1) + ) + ) + ) + ) + ) + ) + ) + 0 + ) + +(defmethod respond-progress ((this menu-sub-menu-option) (arg0 progress) (arg1 symbol)) + (let ((s4-0 *progress-work*)) + (when (and (not (-> s4-0 secrets-unlocked)) (or (= (-> arg0 current-options) *unlocked-secrets*) + (= (-> arg0 current-options) *select-scene-options*) + (= (-> arg0 current-options) *select-start-options*) + ) + ) + (set! (-> arg0 state-pos) 0) + (set-next-state arg0 'secrets-insufficient-space 0) + ) + (when (= (-> this name) (text-id progress-continue-without-save)) + (let ((a1-3 (get-state-check-card arg0 (-> arg0 current)))) + (set-next-state arg0 a1-3 0) + ) + ) + (when (and (= (-> this name) (text-id progress-secrets)) + (= *title* (-> arg0 current-options)) + (not (-> s4-0 secrets-unlocked)) + (= (-> arg0 option-index) 3) + ) + (set! (-> arg0 option-index) 0) + 0 + ) + ) + (when (cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (cond + ((= (-> this name) (text-id progress-exit-demo)) + (case *kernel-boot-message* + (('demo-shared) + (set! *master-exit* 'force) + (set-master-mode 'game) + ) + (('demo) + (set! (-> *game-info* mode) 'play) + (initialize! *game-info* 'game (the-as game-save #f) "title-restart" (the-as resetter-spec #f)) + ) + ) + ) + ((= (-> this name) (text-id progress-continue-without-save)) + (progress-intro-start) + ) + ((= (-> this next-state) 'back) + (pop-state arg0) + ) + (else + (sound-play "generic-beep") + (push-state arg0) + (set-next-state arg0 (-> this next-state) 0) + ) + ) + ) + 0 + ) + +(defmethod respond-progress ((this menu-unlocked-sub-menu-option) (arg0 progress) (arg1 symbol)) + (let ((s3-0 (memcard-unlocked-secrets? arg0 #t)) + (s4-0 *progress-work*) + ) + (when (not (-> s4-0 secrets-unlocked)) + (set! (-> arg0 state-pos) 0) + (set-next-state arg0 'secrets-insufficient-space 0) + ) + (when (cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (cond + ((logtest? s3-0 (-> this mask)) + (sound-play "generic-beep") + (cond + ((logtest? (-> this mask) 254) + (set! (-> s4-0 selected-num) (-> this value)) + (push-state arg0) + (set-next-state arg0 (-> this next-state) 0) + ) + ((logtest? (-> this mask) 2048) + (initialize! *game-info* 'game (the-as game-save #f) "title-museum1" (the-as resetter-spec #f)) + (set-master-mode 'game) + ) + ((logtest? (-> this mask) 4096) + (initialize! *game-info* 'game (the-as game-save #f) "title-museum2" (the-as resetter-spec #f)) + (set-master-mode 'game) + ) + ((logtest? (-> this mask) 8192) + (initialize! *game-info* 'game (the-as game-save #f) "title-museum3" (the-as resetter-spec #f)) + (set-master-mode 'game) + ) + (#t + (persist-with-delay *setting-control* 'fail-music-volume (seconds 5) 'music-volume 'abs 0.0 0) + (persist-with-delay *setting-control* 'fail-sfx-volume (seconds 5) 'sfx-volume 'abs 0.0 0) + (persist-with-delay *setting-control* 'fail-dialog-volume (seconds 5) 'dialog-volume 'abs 0.0 0) + (set! (-> *setting-control* user-current sfx-volume) 0.01) + (set! (-> *setting-control* user-current dialog-volume) 0.01) + (set! (-> *setting-control* user-current music-volume) 0.01) + (cond + ((send-event (handle->process (-> *game-info* controller 0)) 'scrap-book (-> this value)) + (set-next-state arg0 (-> this next-state) 0) + ) + (else + (set! (-> *game-info* demo-state) (the-as uint (+ (-> this value) 200))) + (initialize! *game-info* 'game (the-as game-save #f) "title-scrapbook" (the-as resetter-spec #f)) + ) + ) + ) + ) + ) + (else + (sound-play "generic-beep" :pitch -0.6) + ) + ) + ) + ) + 0 + ) + +(defmethod respond-progress ((this menu-memcard-slot-option) (arg0 progress) (arg1 symbol)) + (memcard-unlocked-secrets? arg0 #t) + (let ((a1-3 (get-state-check-card arg0 (-> arg0 current)))) + (set-next-state arg0 a1-3 0) + ) + (set! (-> arg0 selected-option) #f) + (when (bigmap-method-11 *bigmap*) + (cond + ((cpad-pressed? 0 triangle) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (let ((s5-0 #f)) + *progress-save-info* + (set! (-> arg0 which-slot) (-> arg0 option-index)) + (cond + ((= (-> arg0 current) 'select-load) + (when (= (-> *progress-save-info* file (-> arg0 option-index) present) 1) + (set! s5-0 #t) + (set-next-state arg0 'loading 0) + ) + ) + ((and (= (-> arg0 current) 'select-save-hero) + (-> *setting-control* user-default auto-save) + (= (-> *game-info* auto-save-card) (-> *progress-save-info* handle)) + (= (-> *game-info* auto-save-which) (-> arg0 which-slot)) + ) + (sound-play "generic-beep" :pitch -0.6) + ) + ((= (-> *progress-save-info* file (-> arg0 which-slot) present) 1) + (set! s5-0 #t) + (set-next-state arg0 'already-exists 0) + ) + (else + (set! s5-0 #t) + (set-next-state arg0 'saving 0) + ) + ) + (if s5-0 + (sound-play "generic-beep") + ) + ) + ) + ) + ) + 0 + ) + +(defmethod respond-progress ((this menu-already-exists-option) (arg0 progress) (arg1 symbol)) + (let ((a1-2 (get-state-check-card arg0 'select-save)) + (gp-0 (the-as object #f)) + ) + (if (!= a1-2 'select-save) + (set-next-state arg0 a1-2 0) + ) + (cond + ((cpad-pressed? 0 left l-analog-left) + (set! gp-0 (not (-> arg0 yes-no-choice))) + (set! (-> arg0 yes-no-choice) (the-as basic #t)) + ) + ((cpad-pressed? 0 right l-analog-right) + (set! gp-0 (-> arg0 yes-no-choice)) + (set! (-> arg0 yes-no-choice) #f) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (cond + ((-> arg0 yes-no-choice) + (sound-play "generic-beep") + (set-next-state arg0 'saving 0) + ) + ((begin (sound-play "generic-beep") (= (-> arg0 state-array 0) 'title)) + (set-next-state arg0 'select-save-title 0) + ) + ((-> *progress-work* hero-mode-save) + (set-next-state arg0 'select-save-hero 0) + ) + (else + (set-next-state arg0 'select-save 0) + ) + ) + ) + ) + (if gp-0 + (sound-play "generic-beep") + ) + ) + 0 + ) + +(defmethod respond-progress ((this menu-create-game-option) (arg0 progress) (arg1 symbol)) + (let ((s4-0 (&-> arg0 yes-no-choice)) + (gp-0 (the-as object #f)) + ) + (let ((a1-2 (get-state-check-card arg0 'select-save))) + (if (!= a1-2 'select-save) + (set-next-state arg0 a1-2 0) + ) + ) + (cond + ((cpad-pressed? 0 left l-analog-left) + (set! gp-0 (not (-> s4-0 0))) + (set! (-> s4-0 0) (the-as basic #t)) + ) + ((cpad-pressed? 0 right l-analog-right) + (set! gp-0 (-> s4-0 0)) + (set! (-> s4-0 0) #f) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (cond + ((-> arg0 yes-no-choice) + (set-next-state arg0 'creating 0) + ) + ((= (-> arg0 state-array 0) 'title) + (sound-play "generic-beep") + (sound-volume-off) + (progress-intro-start) + ) + (else + (sound-play "generic-beep") + (pop-state arg0) + ) + ) + ) + ) + (if gp-0 + (sound-play "generic-beep") + ) + ) + 0 + ) + +(defmethod respond-progress ((this menu-insufficient-space-option) (arg0 progress) (arg1 symbol)) + (let ((s5-0 (&-> arg0 yes-no-choice)) + (s4-0 (get-state-check-card arg0 'select-save)) + ) + (cond + ((or (= (-> arg0 starting-state) 'insufficient-space) (= (-> arg0 starting-state) 'no-memory-card)) + (cond + ((cpad-pressed? 0 left l-analog-left) + (when (and (not (-> s5-0 0)) (not (-> arg0 clear-screen))) + (sound-play "generic-beep") + (set! (-> s5-0 0) (the-as basic #t)) + ) + ) + ((cpad-pressed? 0 right l-analog-right) + (when (and (-> s5-0 0) (not (-> arg0 clear-screen))) + (sound-play "generic-beep") + (set! (-> s5-0 0) #f) + ) + ) + ((and (cpad-pressed? 0 confirm) (!= (-> arg0 current) 'none)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (set! (-> arg0 clear-screen) #t) + (cond + ((-> s5-0 0) + (sound-play "generic-beep") + (pop-state arg0) + ) + ((and (not (-> s5-0 0)) + (!= (get-state-check-card arg0 'select-save) 'insufficient-space) + (!= (get-state-check-card arg0 'select-save) 'no-memory-card) + ) + (pop-state arg0) + ) + (else + (sound-play "generic-beep") + (set-time! (-> arg0 last-move)) + (set! (-> arg0 current) 'none) + (set-next-state arg0 s4-0 0) + ) + ) + ) + ) + ) + (else + (let ((a1-9 'select-save)) + 'select-save + (cond + ((-> *progress-work* hero-mode-save) + (set! a1-9 'select-save-hero) + ) + ((and (= (-> arg0 starting-state) 'title) + (not (logtest? (-> *game-info* purchase-secrets) (game-secrets hero-mode))) + ) + (set! a1-9 'select-save-title) + ) + ) + (let ((a1-10 (get-state-check-card arg0 a1-9))) + (set-next-state arg0 a1-10 0) + ) + ) + (cond + ((and (cpad-pressed? 0 triangle) (or (= (-> arg0 starting-state) 'title) (= (-> arg0 starting-state) 'main))) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (cond + ((= (-> arg0 state-array 0) 'title) + (sound-play "generic-beep") + (sound-volume-off) + (progress-intro-start) + ) + (else + (sound-play "generic-beep") + (pop-state arg0) + ) + ) + ) + ) + ) + ) + ) + 0 + ) + +(defmethod respond-progress ((this menu-secrets-insufficient-space-option) (arg0 progress) (arg1 symbol)) + (&-> arg0 yes-no-choice) + (cond + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (sound-play "generic-beep") + (set-next-state arg0 'title 0) + ) + ((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)) + ) + ) + 0 + ) + +(defmethod respond-progress ((this menu-hero-mode-message-option) (arg0 progress) (arg1 symbol)) + (&-> arg0 yes-no-choice) + (cond + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (sound-play "generic-beep") + (pop-state arg0) + ) + ((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)) + ) + ) + 0 + ) + +(defmethod respond-progress ((this menu-video-mode-warning-option) (arg0 progress) (arg1 symbol)) + (let ((gp-0 (&-> arg0 yes-no-choice))) + (cond + ((and (cpad-pressed? 0 left l-analog-left) (not (-> gp-0 0))) + (sound-play "generic-beep") + (set! (-> gp-0 0) (the-as basic #t)) + ) + ((and (cpad-pressed? 0 right l-analog-right) (-> gp-0 0)) + (sound-play "generic-beep") + (set! (-> gp-0 0) #f) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (set! (-> arg0 time-out) 0) + (cond + ((-> arg0 yes-no-choice) + (set! (-> *setting-control* user-default video-mode) (the-as symbol (-> arg0 video-mode))) + (set-time! (-> arg0 time-out)) + (set-next-state arg0 'video-mode-ok 0) + ) + (else + (set! (-> arg0 video-mode) (the-as basic 'pal)) + (pop-state arg0) + ) + ) + ) + ) + ) + 0 + ) + +(defmethod respond-progress ((this menu-video-mode-ok-option) (arg0 progress) (arg1 symbol)) + (let ((s5-0 (&-> arg0 yes-no-choice))) + (cond + ((and (cpad-pressed? 0 left l-analog-left) (not (-> s5-0 0))) + (sound-play "generic-beep") + (set! (-> s5-0 0) (the-as basic #t)) + ) + ((and (cpad-pressed? 0 right l-analog-right) (-> s5-0 0)) + (sound-play "generic-beep") + (set! (-> s5-0 0) #f) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (cond + ((-> arg0 yes-no-choice) + (sound-play "generic-beep") + ) + (else + (set! (-> arg0 video-mode) (the-as basic 'pal)) + (set! (-> *setting-control* user-default video-mode) (the-as symbol (-> arg0 video-mode))) + (sound-play "generic-beep") + ) + ) + (set! (-> arg0 time-out) 0) + (pop-state arg0) + ) + ) + ) + (when (and (nonzero? (-> arg0 time-out)) (< (seconds 10) (- (current-time) (-> arg0 time-out)))) + (set! (-> arg0 time-out) 0) + (set! (-> arg0 video-mode) (the-as basic 'pal)) + (set! (-> *setting-control* user-default video-mode) (the-as symbol (-> arg0 video-mode))) + (pop-state arg0) + ) + 0 + ) + +(defmethod respond-progress ((this menu-progressive-mode-warning-option) (arg0 progress) (arg1 symbol)) + (let ((s5-0 (&-> arg0 yes-no-choice))) + (cond + ((and (cpad-pressed? 0 left l-analog-left) (not (-> s5-0 0))) + (sound-play "generic-beep") + (set! (-> arg0 progressive-scan) (the-as basic #t)) + (set! (-> s5-0 0) (the-as basic #t)) + ) + ((and (cpad-pressed? 0 right l-analog-right) (-> s5-0 0)) + (sound-play "generic-beep") + (set! (-> arg0 progressive-scan) #f) + (set! (-> s5-0 0) #f) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (set! (-> arg0 time-out) 0) + (cond + ((-> arg0 yes-no-choice) + (sound-play "generic-beep") + (set-progressive-scan #t) + (set! (-> arg0 progressive-scan) (the-as basic #t)) + (set-time! (-> arg0 time-out)) + (set-next-state arg0 'progressive-mode-ok 0) + ) + (else + (set! (-> arg0 progressive-scan) #f) + (set-progressive-scan #f) + (pop-state arg0) + ) + ) + ) + ) + ) + 0 + ) + +(defmethod respond-progress ((this menu-progressive-mode-ok-option) (arg0 progress) (arg1 symbol)) + (let ((s5-0 (&-> arg0 yes-no-choice))) + (cond + ((and (cpad-pressed? 0 left l-analog-left) (not (-> s5-0 0))) + (sound-play "generic-beep") + (set! (-> s5-0 0) (the-as basic #t)) + ) + ((and (cpad-pressed? 0 right l-analog-right) (-> s5-0 0)) + (sound-play "generic-beep") + (set! (-> s5-0 0) #f) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (cond + ((not (-> arg0 yes-no-choice)) + (set! (-> *setting-control* user-default set-video-mode) #f) + (set! (-> arg0 progressive-scan) #f) + (sound-play "generic-beep") + ) + (else + (sound-play "generic-beep") + (set! (-> arg0 progressive-scan) (the-as basic #t)) + ) + ) + (set! (-> arg0 time-out) 0) + (pop-state arg0) + ) + ) + ) + (when (and (nonzero? (-> arg0 time-out)) (< (seconds 10) (- (current-time) (-> arg0 time-out)))) + (set! (-> arg0 time-out) 0) + (set! (-> *setting-control* user-default set-video-mode) #f) + (set-progressive-scan #f) + (pop-state arg0) + ) + 0 + ) + +(defmethod respond-progress ((this menu-card-removed-option) (arg0 progress) (arg1 symbol)) + (when (cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (sound-play "generic-beep") + (pop-state arg0) + ) + 0 + ) + +(defmethod respond-progress ((this menu-insert-card-option) (arg0 progress) (arg1 symbol)) + *progress-save-info* + (cond + ((= (get-state-check-card arg0 'select-load) 'select-load) + (set-next-state arg0 'select-load 0) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (sound-play "generic-beep") + (pop-state arg0) + ) + ) + 0 + ) + +(defmethod respond-progress ((this menu-error-loading-option) (arg0 progress) (arg1 symbol)) + (when (cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (sound-play "generic-beep") + (pop-state arg0) + ) + 0 + ) + +(defmethod respond-progress ((this menu-error-auto-saving-option) (arg0 progress) (arg1 symbol)) + (when (cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (sound-play "generic-beep") + (pop-state arg0) + ) + 0 + ) + +(defmethod respond-progress ((this menu-error-disc-removed-option) (arg0 progress) (arg1 symbol)) + (when (cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (when (is-cd-in?) + (sound-play "generic-beep") + (pop-state arg0) + ) + ) + 0 + ) + +(defmethod respond-progress ((this menu-error-reading-option) (arg0 progress) (arg1 symbol)) + (when (cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (sound-play "generic-beep") + (pop-state arg0) + ) + 0 + ) + +(defmethod respond-progress ((this menu-icon-info-option) (arg0 progress) (arg1 symbol)) + (when (cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (sound-play "generic-beep") + (pop-state arg0) + ) + 0 + ) + +(defmethod respond-progress ((this menu-format-card-option) (arg0 progress) (arg1 symbol)) + (let ((s4-0 (&-> arg0 yes-no-choice)) + (gp-0 (the-as object #f)) + ) + (let ((a1-2 (get-state-check-card arg0 (-> arg0 current)))) + (set-next-state arg0 a1-2 0) + ) + (cond + ((cpad-pressed? 0 left l-analog-left) + (set! gp-0 (not (-> s4-0 0))) + (set! (-> s4-0 0) (the-as basic #t)) + ) + ((cpad-pressed? 0 right l-analog-right) + (set! gp-0 (-> s4-0 0)) + (set! (-> s4-0 0) #f) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (cond + ((-> arg0 yes-no-choice) + (sound-play "generic-beep") + (set-next-state arg0 'formatting 0) + ) + ((= (-> arg0 state-array 0) 'title) + (sound-play "generic-beep") + (sound-volume-off) + (progress-intro-start) + ) + (else + (sound-play "generic-beep") + (pop-state arg0) + ) + ) + ) + ) + (if gp-0 + (sound-play "generic-beep") + ) + ) + 0 + ) + +;; WARN: disable def twice: 259. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod respond-progress ((this menu-select-start-option) (arg0 progress) (arg1 symbol)) + (let ((gp-0 *progress-work*)) + (when (not (-> gp-0 secrets-unlocked)) + (set! (-> arg0 state-pos) 0) + (set-next-state arg0 'secrets-insufficient-space 0) + ) + (set! (-> *progress-list-level* mode) (-> arg0 current)) + (set! (-> *progress-list-level* act) (-> gp-0 selected-num)) + ) + (let ((gp-1 #f)) + (let ((v1-8 (+ (length *progress-list-level*) -1))) + (the float v1-8) + (cond + ((or (cpad-pressed? 0 up l-analog-up) + (and (cpad-hold? 0 up l-analog-up) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((v1-12 (max 0 (+ (-> this selected-index) -1)))) + (if (nonzero? (-> this selected-index)) + (set! gp-1 #t) + ) + (set! (-> this scroll-speed) 300.0) + (set! (-> this selected-index) v1-12) + (set! (-> this target-index) (fmin (-> this target-index) (the float (max 0 (+ v1-12 -1))))) + ) + ) + ((or (cpad-pressed? 0 down l-analog-down) + (and (cpad-hold? 0 down l-analog-down) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((a0-36 (min (+ (-> this selected-index) 1) v1-8))) + (if (!= (-> this selected-index) v1-8) + (set! gp-1 #t) + ) + (set! (-> this scroll-speed) 300.0) + (set! (-> this selected-index) a0-36) + (set! (-> this target-index) (fmax (-> this target-index) (the float (max 0 (+ a0-36 -4))))) + ) + ) + ((or (cpad-pressed? 0 left l-analog-left) + (and (cpad-hold? 0 left l-analog-left) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((v1-24 (max 0 (+ (-> this selected-index) -5)))) + (if (nonzero? (-> this selected-index)) + (set! gp-1 #t) + ) + (set! (-> this scroll-speed) 1000.0) + (set! (-> this selected-index) v1-24) + (set! (-> this target-index) (fmin (-> this target-index) (the float (max 0 (+ v1-24 -1))))) + ) + ) + ((or (cpad-pressed? 0 right l-analog-right) + (and (cpad-hold? 0 right l-analog-right) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((a0-69 (min (+ (-> this selected-index) 5) v1-8))) + (if (!= (-> this selected-index) v1-8) + (set! gp-1 #t) + ) + (set! (-> this scroll-speed) 1000.0) + (set! (-> this selected-index) a0-69) + (set! (-> this target-index) (fmax (-> this target-index) (the float (max 0 (+ a0-69 -4))))) + ) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (sound-play "generic-beep") + (let* ((s5-1 (progress-list-method-9 *progress-list-level* (-> this selected-index))) + (v1-42 (-> arg0 current)) + (s3-1 (cond + ((= v1-42 'select-pre-start) + (or (-> s5-1 play-continue) (-> s5-1 pre-play-continue)) + ) + ((or (= v1-42 'select-kiosk-start) (= v1-42 'select-kiosk-start-special)) + (-> s5-1 kiosk-play-continue) + ) + (else + (-> s5-1 play-continue) + ) + ) + ) + ) + (cond + ((and (or (demo?) (kiosk?)) + (or (= (-> arg0 current) 'select-kiosk-start) (= (-> arg0 current) 'select-kiosk-start-special)) + (= (status-of-level-and-borrows *level* 'title #f) 'active) + ) + (send-event (handle->process (-> *game-info* controller 0)) 'control-spec (get-play-list-idx s5-1)) + (set-master-mode 'game) + ) + (else + (let* ((s2-1 play-task) + (a0-104 (get-play-list-idx s5-1)) + (a1-40 'debug) + (v1-64 (-> arg0 current)) + (s4-2 (s2-1 + (the-as game-task a0-104) + a1-40 + (cond + ((= v1-64 'select-pre-start) + 'pre-play + ) + ((or (= v1-64 'select-kiosk-start) (= v1-64 'select-kiosk-start-special)) + 'kiosk + ) + (else + 'play + ) + ) + ) + ) + ) + (cond + ((pair? s3-1) + (start 'play (get-continue-by-name *game-info* s4-2)) + (process-spawn + scene-player + :init scene-player-init + (-> (the-as pair (-> (the-as pair s3-1) cdr)) car) + #t + s4-2 + :name "scene-player" + ) + ) + (else + (send-event (handle->process (-> *game-info* controller 0)) 'control-spec (get-play-list-idx s5-1)) + (start 'play (get-continue-by-name *game-info* s4-2)) + ) + ) + ) + (set-master-mode 'game) + ) + ) + ) + ) + ) + ) + (if gp-1 + (sound-play "secrets-scroll") + ) + ) + 0 + ) + +(defmethod respond-progress ((this menu-select-scene-option) (arg0 progress) (arg1 symbol)) + (let* ((s4-0 *progress-work*) + (v1-0 (-> s4-0 selected-num)) + (s3-0 (cond + ((zero? v1-0) + *hud-select-scene-act1* + ) + ((= v1-0 1) + *hud-select-scene-act2* + ) + ((= v1-0 2) + *hud-select-scene-act3* + ) + (else + *hud-select-scene-commentary* + ) + ) + ) + ) + (when (not (-> s4-0 secrets-unlocked)) + (set! (-> arg0 state-pos) 0) + (set-next-state arg0 'secrets-insufficient-space 0) + ) + (let ((gp-0 #f)) + (let ((v1-7 (+ (length s3-0) -1))) + (the float v1-7) + (cond + ((or (cpad-pressed? 0 up l-analog-up) + (and (cpad-hold? 0 up l-analog-up) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((v1-11 (max 0 (+ (-> this selected-index) -1)))) + (if (nonzero? (-> this selected-index)) + (set! gp-0 #t) + ) + (set! (-> this scroll-speed) 300.0) + (set! (-> this selected-index) v1-11) + (set! (-> this target-index) (fmin (-> this target-index) (the float (max 0 (+ v1-11 -1))))) + ) + ) + ((or (cpad-pressed? 0 down l-analog-down) + (and (cpad-hold? 0 down l-analog-down) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((a0-36 (min (+ (-> this selected-index) 1) v1-7))) + (if (!= (-> this selected-index) v1-7) + (set! gp-0 #t) + ) + (set! (-> this scroll-speed) 300.0) + (set! (-> this selected-index) a0-36) + (set! (-> this target-index) (fmax (-> this target-index) (the float (max 0 (+ a0-36 -4))))) + ) + ) + ((or (cpad-pressed? 0 left l-analog-left) + (and (cpad-hold? 0 left l-analog-left) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((v1-23 (max 0 (+ (-> this selected-index) -5)))) + (if (nonzero? (-> this selected-index)) + (set! gp-0 #t) + ) + (set! (-> this scroll-speed) 1000.0) + (set! (-> this selected-index) v1-23) + (set! (-> this target-index) (fmin (-> this target-index) (the float (max 0 (+ v1-23 -1))))) + ) + ) + ((or (cpad-pressed? 0 right l-analog-right) + (and (cpad-hold? 0 right l-analog-right) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((a0-69 (min (+ (-> this selected-index) 5) v1-7))) + (if (!= (-> this selected-index) v1-7) + (set! gp-0 #t) + ) + (set! (-> this scroll-speed) 1000.0) + (set! (-> this selected-index) a0-69) + (set! (-> this target-index) (fmax (-> this target-index) (the float (max 0 (+ a0-69 -4))))) + ) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (sound-play "generic-beep") + (let ((s2-2 *display-profile*)) + (play-clean 'debug) + (set! *display-profile* s2-2) + ) + (set! (-> *game-info* mode) 'play) + (let ((s5-1 (-> s3-0 (-> this selected-index)))) + (set! (-> *game-info* demo-state) (the-as uint 100)) + (let ((v1-46 (-> s4-0 selected-num))) + (cond + ((zero? v1-46) + (logior! (-> *game-info* secrets) (game-secrets scene-player-1)) + ) + ((= v1-46 1) + (logior! (-> *game-info* secrets) (game-secrets scene-player-2)) + ) + ((= v1-46 2) + (logior! (-> *game-info* secrets) (game-secrets scene-player-3)) + ) + ((= v1-46 3) + (set! (-> *game-info* demo-state) (the-as uint 101)) + (logior! (-> *game-info* secrets) (game-secrets title-commentary)) + ) + ) + ) + (persist-with-delay *setting-control* 'fail-music-volume (seconds 5) 'music-volume 'abs 0.0 0) + (persist-with-delay *setting-control* 'fail-sfx-volume (seconds 5) 'sfx-volume 'abs 0.0 0) + (persist-with-delay *setting-control* 'fail-dialog-volume (seconds 5) 'dialog-volume 'abs 0.0 0) + (set! (-> *setting-control* user-current sfx-volume) 0.01) + (set! (-> *setting-control* user-current dialog-volume) 0.01) + (set! (-> *setting-control* user-current music-volume) 0.01) + (process-spawn scene-player :init scene-player-init (-> s5-1 info) #t (-> s5-1 continue) :name "scene-player") + ) + (set-master-mode 'game) + ) + ) + ) + (if gp-0 + (sound-play "secrets-scroll") + ) + ) + ) + 0 + ) + +(defmethod respond-progress ((this menu-bigmap-option) (arg0 progress) (arg1 symbol)) + ((method-of-object *bigmap* bigmap-method-13)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + 0 + ) + +(defmethod respond-progress ((this menu-missions-option) (arg0 progress) (arg1 symbol)) + (let ((v1-0 #f)) + (let ((f0-1 (the float (+ (-> arg0 total-num-tasks) -1)))) + (cond + ((or (cpad-pressed? 0 up l-analog-up) + (and (cpad-hold? 0 up l-analog-up) (= (-> this current-index) (-> this target-index))) + ) + (if (!= (-> this target-index) 0.0) + (set! v1-0 #t) + ) + (set! (-> this scroll-speed) 300.0) + (set! (-> this target-index) (fmax 0.0 (+ -1.0 (-> this target-index)))) + ) + ((and (not (-> this on-screen)) + (or (cpad-pressed? 0 down l-analog-down) + (and (cpad-hold? 0 down l-analog-down) (= (-> this current-index) (-> this target-index))) + ) + ) + (if (!= (-> this target-index) f0-1) + (set! v1-0 #t) + ) + (set! (-> this scroll-speed) 300.0) + (set! (-> this target-index) (fmin (+ 1.0 (-> this target-index)) f0-1)) + ) + ((or (cpad-pressed? 0 left l-analog-left) + (and (cpad-hold? 0 left l-analog-left) (= (-> this current-index) (-> this target-index))) + ) + (if (!= (-> this target-index) 0.0) + (set! v1-0 #t) + ) + (set! (-> this scroll-speed) 1000.0) + (set! (-> this target-index) (fmax 0.0 (+ -5.0 (-> this target-index)))) + ) + ((and (not (-> this on-screen)) + (or (cpad-pressed? 0 right l-analog-right) + (and (cpad-hold? 0 right l-analog-right) (= (-> this current-index) (-> this target-index))) + ) + ) + (if (!= (-> this target-index) f0-1) + (set! v1-0 #t) + ) + (set! (-> this scroll-speed) 1000.0) + (set! (-> this target-index) (fmin (+ 5.0 (-> this target-index)) f0-1)) + ) + ) + ) + (if v1-0 + (sound-play "mission-scroll") + ) + ) + 0 + ) + +(defmethod menu-highscores-option-method-12 ((this menu-highscores-option)) + (let ((v0-0 0)) + (dotimes (v1-0 16) + (let ((a1-2 (-> this info v1-0))) + (when (or (zero? (-> a1-2 secret)) (logtest? (-> *game-info* secrets) (-> a1-2 secret))) + (set! (-> this pages v0-0) (the-as paged-menu-option a1-2)) + (+! v0-0 1) + ) + ) + ) + (set! (-> this num-pages) v0-0) + v0-0 + ) + ) + +(defmethod respond-progress ((this menu-highscores-option) (arg0 progress) (arg1 symbol)) + (let ((f30-0 (the float (menu-highscores-option-method-12 this))) + (gp-0 #f) + ) + (let ((f0-1 0.0)) + (let ((f1-0 (-> this target-index))) + (set! (-> this target-index) (- f1-0 (* (the float (the int (/ f1-0 f30-0))) f30-0))) + ) + (cond + ((and (cpad-hold? 0 r1) (= (-> this current-index) (-> this target-index))) + (set! gp-0 #t) + (let ((f0-3 (+ 1.0 (-> this target-index)))) + (set! (-> this target-index) (- f0-3 (* (the float (the int (/ f0-3 f30-0))) f30-0))) + ) + (set! f0-1 182.04445) + ) + ((and (cpad-hold? 0 l1) (= (-> this current-index) (-> this target-index))) + (set! gp-0 #t) + (let ((f0-7 (+ -1.0 f30-0 (-> this target-index)))) + (set! (-> this target-index) (- f0-7 (* (the float (the int (/ f0-7 f30-0))) f30-0))) + ) + (set! f0-1 -182.04445) + ) + ) + (let* ((f28-0 (/ 65536.0 f30-0)) + (f1-17 (* 3.0 (seconds-per-frame) f28-0)) + (f0-9 (+ (* (-> this current-index) f28-0) f0-1)) + (f2-10 (* (-> this target-index) f28-0)) + (f0-11 (+ 65536.0 (deg-seek f0-9 f2-10 f1-17))) + ) + (set! (-> this current-index) (/ (- f0-11 (* (the float (the int (/ f0-11 65536.0))) 65536.0)) f28-0)) + ) + ) + (when (< (fabs (- (-> this current-index) (-> this target-index))) 0.01) + (let ((f0-17 (-> this target-index))) + (set! (-> this current-index) (- f0-17 (* (the float (the int (/ f0-17 f30-0))) f30-0))) + ) + ) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (if gp-0 + (sound-play "score-slide") + ) + ) + 0 + ) + +(defmethod init-text! ((this controls-page-info)) + (let ((v0-0 0)) + (dotimes (v1-0 (-> this strings length)) + (let ((a1-2 (-> this strings v1-0))) + (when (or (logtest? (-> *game-info* features) (-> a1-2 feature)) + (logtest? (-> *game-info* secrets) (-> a1-2 secret)) + (logtest? (-> *game-info* vehicles) (-> a1-2 vehicle)) + (and (zero? (-> a1-2 feature)) (zero? (-> a1-2 secret)) (zero? (-> a1-2 vehicle))) + ) + (set! (-> this text v0-0) (the-as game-text a1-2)) + (+! v0-0 1) + ) + ) + ) + (set! (-> this num-text) v0-0) + v0-0 + ) + ) + +(defmethod controls-page-info-method-10 ((this controls-page-info)) + (let ((f0-1 (the float (max 0 (+ (init-text! this) -1)))) + (v1-3 #f) + ) + (set! (-> this target-index) (fmax 0.0 (fmin (-> this target-index) f0-1))) + (cond + ((and (not (-> this on-screen)) + (cpad-hold? 0 down l-analog-down) + (= (-> this current-index) (-> this target-index)) + ) + (if (!= (-> this target-index) f0-1) + (set! v1-3 #t) + ) + (set! (-> this target-index) (fmin (+ 1.0 (-> this target-index)) f0-1)) + ) + ((and (cpad-hold? 0 up l-analog-up) (= (-> this current-index) (-> this target-index))) + (if (!= (-> this target-index) 0.0) + (set! v1-3 #t) + ) + (set! (-> this target-index) (fmax 0.0 (+ -1.0 (-> this target-index)))) + ) + ) + (if v1-3 + (sound-play "score-slide") + ) + ) + 0 + (none) + ) + +(defmethod menu-controls-option-method-12 ((this menu-controls-option)) + (let ((v0-0 0)) + (dotimes (v1-0 7) + (let ((a1-2 (-> this info v1-0))) + (when (or (logtest? (-> *game-info* features) (-> a1-2 feature)) + (logtest? (-> *game-info* secrets) (-> a1-2 secret)) + (logtest? (-> *game-info* vehicles) (-> a1-2 vehicle)) + (and (zero? (-> a1-2 feature)) (zero? (-> a1-2 secret)) (zero? (-> a1-2 vehicle))) + ) + (set! (-> this pages v0-0) a1-2) + (+! v0-0 1) + ) + ) + ) + (set! (-> this num-pages) v0-0) + v0-0 + ) + ) + +(defmethod respond-progress ((this menu-controls-option) (arg0 progress) (arg1 symbol)) + (let ((f30-0 (the float (menu-controls-option-method-12 this))) + (s4-0 #f) + ) + (let ((f0-1 0.0)) + (let ((f1-0 (-> this target-index))) + (set! (-> this target-index) (- f1-0 (* (the float (the int (/ f1-0 f30-0))) f30-0))) + ) + (cond + ((and (cpad-hold? 0 r1) (= (-> this current-index) (-> this target-index))) + (let ((f0-3 (+ 1.0 (-> this target-index)))) + (set! (-> this target-index) (- f0-3 (* (the float (the int (/ f0-3 f30-0))) f30-0))) + ) + (set! f0-1 182.04445) + (set! s4-0 #t) + ) + ((and (cpad-hold? 0 l1) (= (-> this current-index) (-> this target-index))) + (let ((f0-7 (+ -1.0 f30-0 (-> this target-index)))) + (set! (-> this target-index) (- f0-7 (* (the float (the int (/ f0-7 f30-0))) f30-0))) + ) + (set! f0-1 -182.04445) + (set! s4-0 #t) + ) + ) + (let* ((f28-0 (/ 65536.0 f30-0)) + (f1-17 (* 3.0 (seconds-per-frame) f28-0)) + (f0-9 (+ (* (-> this current-index) f28-0) f0-1)) + (f2-10 (* (-> this target-index) f28-0)) + (f0-11 (+ 65536.0 (deg-seek f0-9 f2-10 f1-17))) + ) + (set! (-> this current-index) (/ (- f0-11 (* (the float (the int (/ f0-11 65536.0))) 65536.0)) f28-0)) + ) + ) + (when (< (fabs (- (-> this current-index) (-> this target-index))) 0.01) + (let ((f0-17 (-> this target-index))) + (set! (-> this current-index) (- f0-17 (* (the float (the int (/ f0-17 f30-0))) f30-0))) + ) + ) + (if (= (-> this current-index) (-> this target-index)) + (controls-page-info-method-10 (-> this pages (the int (-> this current-index)))) + ) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (if s4-0 + (sound-play "score-slide") + ) + ) + 0 + ) + +(defmethod respond-progress ((this menu-secret-option) (arg0 progress) (arg1 symbol)) + (let ((gp-0 (the-as object #f))) + (the float (+ (-> *menu-secrets-array* length) -1)) + (let ((a0-1 (+ (-> *menu-secrets-array* length) -1)) + (v1-5 *menu-secrets-array*) + (s2-0 (the int (-> *game-info* skill))) + (s3-0 (-> *menu-secrets-array* (-> this selected-index))) + ) + (if (or (nonzero? (-> *setting-control* user-current subtitle-language)) + (nonzero? (-> *setting-control* user-current language)) + (nonzero? (-> *setting-control* user-current audio-language)) + ) + (+! a0-1 -1) + ) + (set! (-> this selected-index) (min (-> this selected-index) a0-1)) + (cond + ((-> this available-title) + (when (or (cpad-pressed? 0 confirm) (cpad-pressed? 0 triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) + (set! (-> this available-title) #f) + ) + ) + ((-> this buy-menu) + (cond + ((cpad-pressed? 0 left l-analog-left) + (set! gp-0 (not (-> arg0 yes-no-choice))) + (set! (-> arg0 yes-no-choice) (the-as basic #t)) + ) + ((cpad-pressed? 0 right l-analog-right) + (set! gp-0 (-> arg0 yes-no-choice)) + (set! (-> arg0 yes-no-choice) #f) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (cond + ((-> arg0 yes-no-choice) + (secret-item-option-method-13 s3-0) + (set! (-> *game-info* skill) (- (-> *game-info* skill) (the float (-> s3-0 cost)))) + (sound-play "upgrade-buy") + (set! (-> this buy-menu) #f) + (cond + ((= (-> s3-0 secret) (game-secrets hero-mode)) + (set-next-state arg0 'select-save-hero 0) + ) + ((logtest? (-> s3-0 flags) (secret-item-option-flags sf2)) + (set! (-> this available-title) #t) + ) + ) + ) + (else + (sound-play "generic-beep") + (set! (-> this buy-menu) #f) + ) + ) + ) + ((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 "generic-beep") + (set! (-> this buy-menu) #f) + ) + ) + ) + (else + (cond + ((or (cpad-pressed? 0 up l-analog-up) + (and (cpad-hold? 0 up l-analog-up) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((a0-73 (max 1 (+ (-> this selected-index) -1)))) + (if (!= (-> this selected-index) 1) + (set! gp-0 #t) + ) + (if (logtest? (-> v1-5 a0-73 flags) (secret-item-option-flags sf0)) + (+! a0-73 -1) + ) + (set! (-> this selected-index) a0-73) + (set! (-> this target-index) (fmin (-> this target-index) (the float (max 0 (+ a0-73 -1))))) + ) + ) + ((or (cpad-pressed? 0 down l-analog-down) + (and (cpad-hold? 0 down l-analog-down) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((a1-51 (min (+ (-> this selected-index) 1) a0-1))) + (if (!= (-> this selected-index) a0-1) + (set! gp-0 #t) + ) + (if (logtest? (-> v1-5 a1-51 flags) (secret-item-option-flags sf0)) + (set! a1-51 (min (+ a1-51 1) a0-1)) + ) + (set! (-> this selected-index) a1-51) + (set! (-> this target-index) (fmax (-> this target-index) (the float (max 0 (+ a1-51 -3))))) + ) + ) + ((or (cpad-pressed? 0 left l-analog-left) + (and (cpad-hold? 0 left l-analog-left) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((a0-79 (max 1 (+ (-> this selected-index) -5)))) + (if (!= (-> this selected-index) 1) + (set! gp-0 #t) + ) + (if (logtest? (-> v1-5 a0-79 flags) (secret-item-option-flags sf0)) + (+! a0-79 -1) + ) + (set! (-> this selected-index) a0-79) + (set! (-> this target-index) (fmin (-> this target-index) (the float (max 0 (+ a0-79 -1))))) + ) + ) + ((or (cpad-pressed? 0 right l-analog-right) + (and (cpad-hold? 0 right l-analog-right) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((a1-82 (min (+ (-> this selected-index) 5) a0-1))) + (if (!= (-> this selected-index) a0-1) + (set! gp-0 #t) + ) + (if (logtest? (-> v1-5 a1-82 flags) (secret-item-option-flags sf0)) + (set! a1-82 (min (+ a1-82 1) a0-1)) + ) + (set! (-> this selected-index) a1-82) + (set! (-> this target-index) (fmax (-> this target-index) (the float (max 0 (+ a1-82 -3))))) + ) + ) + ((and (cpad-pressed? 0 confirm) (= (-> this current-index) (-> this target-index))) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (let ((v1-112 (secret-item-option-method-12 s3-0))) + (cond + ((zero? v1-112) + (cond + ((>= s2-0 (-> s3-0 cost)) + (sound-play "generic-beep") + (set! (-> arg0 yes-no-choice) #f) + (set! (-> this buy-menu) #t) + ) + (else + (sound-play "generic-beep" :pitch -0.6) + ) + ) + ) + ((or (= v1-112 1) (= v1-112 2)) + (cond + ((logtest? (-> s3-0 flags) (secret-item-option-flags sf1)) + (set! (-> *game-info* secrets) + (logclear (logxor (-> *game-info* secrets) (the-as uint (-> s3-0 secret))) (-> s3-0 mask-secrets)) + ) + (sound-play "generic-beep") + ) + ((and (= (-> s3-0 secret) 1) (not (logtest? (-> *game-info* secrets) (game-secrets hero-mode)))) + (set! (-> *progress-work* hero-mode-save) #t) + (set-next-state arg0 'select-save-hero 0) + ) + ((logtest? (-> s3-0 flags) (secret-item-option-flags sf2)) + (set! (-> this available-title) #t) + (sound-play "generic-beep") + ) + (else + (sound-play "generic-beep" :pitch -0.6) + ) + ) + ) + ((or (= v1-112 3) (= v1-112 4) (= v1-112 5)) + (sound-play "generic-beep" :pitch -0.6) + ) + ) + ) + ) + ) + ) + ) + ) + (if gp-0 + (sound-play "mission-scroll") + ) + ) + 0 + ) + +(defmethod respond-progress ((this menu-game-option) (arg0 progress) (arg1 symbol)) + (-> arg0 vibrations) + (-> arg0 subtitles) + (load-level-text-files (the-as int (-> *setting-control* user-current language))) + (cond + (arg1 + (cond + ((cpad-pressed? 0 left l-analog-left) + (sound-play "generic-beep") + (case (-> this menu-option-type) + ((3) + (when (not (-> arg0 vibrations)) + (set! (-> *cpad-list* cpads 0 buzz-pause-val 0) (the-as uint 255)) + (set! (-> *cpad-list* cpads 0 buzz-pause-time) (the-as uint 15)) + ) + (set! (-> arg0 vibrations) (the-as basic #t)) + ) + ((4) + (set! (-> arg0 subtitles) (the-as basic #t)) + ) + ((5) + (set! (-> arg0 subtitle-language-index) (mod (+ (-> arg0 subtitle-language-index) 9) 10)) + (if (and (= (-> arg0 subtitle-language-index) 7) + (or (= (scf-get-territory) 1) + (and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language)) + ) + ) + (+! (-> arg0 subtitle-language-index) -1) + ) + (if (= (-> arg0 subtitle-language-index) 6) + (+! (-> arg0 subtitle-language-index) -2) + ) + ) + ((6) + (set! (-> arg0 language-index) (mod (+ (-> arg0 language-index) 9) 10)) + (if (and (= (-> arg0 language-index) 7) + (or (= (scf-get-territory) 1) + (and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language)) + ) + ) + (+! (-> arg0 language-index) -1) + ) + (if (= (-> arg0 language-index) 6) + (+! (-> arg0 language-index) -2) + ) + ) + ((7) + (set! (-> arg0 audio-language-index) (mod (+ (-> arg0 audio-language-index) 4) 5)) + ) + ) + ) + ((cpad-pressed? 0 right l-analog-right) + (sound-play "generic-beep") + (case (-> this menu-option-type) + ((3) + (set! (-> arg0 vibrations) #f) + ) + ((4) + (set! (-> arg0 subtitles) #f) + ) + ((5) + (set! (-> arg0 subtitle-language-index) (mod (+ (-> arg0 subtitle-language-index) 1) 10)) + (if (= (-> arg0 subtitle-language-index) 5) + (+! (-> arg0 subtitle-language-index) 2) + ) + (if (and (= (-> arg0 subtitle-language-index) 7) + (or (= (scf-get-territory) 1) + (and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language)) + ) + ) + (+! (-> arg0 subtitle-language-index) 1) + ) + ) + ((6) + (set! (-> arg0 language-index) (mod (+ (-> arg0 language-index) 1) 10)) + (if (= (-> arg0 language-index) 5) + (+! (-> arg0 language-index) 2) + ) + (if (and (= (-> arg0 language-index) 7) + (or (= (scf-get-territory) 1) + (and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language)) + ) + ) + (+! (-> arg0 language-index) 1) + ) + ) + ((7) + (set! (-> arg0 audio-language-index) (mod (+ (-> arg0 audio-language-index) 1) 5)) + ) + ) + ) + ((cpad-pressed? 0 confirm) + (case (-> this menu-option-type) + ((3) + (set! (-> *setting-control* user-default vibration) (the-as symbol (-> arg0 vibrations))) + ) + ((4) + (set! (-> *setting-control* user-default subtitle) (the-as symbol (-> arg0 subtitles))) + ) + ((5) + (set! (-> *setting-control* user-default subtitle-language) + (the-as language-enum (-> arg0 subtitle-language-index)) + ) + ) + ((6) + (set! (-> *setting-control* user-default language) (the-as language-enum (-> arg0 language-index))) + (load-level-text-files (-> arg0 language-index)) + ) + ((7) + (set! (-> *setting-control* user-default audio-language) + (the-as language-enum (-> arg0 audio-language-index)) + ) + ) + ) + (if (or (nonzero? (-> *setting-control* user-default subtitle-language)) + (nonzero? (-> *setting-control* user-default language)) + (nonzero? (-> *setting-control* user-default audio-language)) + ) + (set! (-> *unlocked-secrets* options length) 11) + (set! (-> *unlocked-secrets* options length) 12) + ) + ) + ) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons up l-analog-up)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up l-analog-up)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons down l-analog-down)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down l-analog-down)) + ) + (else + (set! (-> arg0 vibrations) (the-as basic (-> *setting-control* user-default vibration))) + (set! (-> arg0 subtitles) (the-as basic (-> *setting-control* user-default subtitle))) + (set! (-> arg0 language-index) (the-as int (-> *setting-control* user-default language))) + (set! (-> arg0 subtitle-language-index) (the-as int (-> *setting-control* user-default subtitle-language))) + (set! (-> arg0 audio-language-index) (the-as int (-> *setting-control* user-default audio-language))) + ) + ) + 0 + ) + +(defmethod respond-progress ((this menu-language-option) (arg0 progress) (arg1 symbol)) + (enable-level-text-file-loading) + (set! (-> arg0 language-index) (the-as int (-> *setting-control* user-default language))) + (cond + ((cpad-pressed? 0 left l-analog-left) + (sound-play "generic-beep") + (set! (-> arg0 language-index) (mod (+ (-> arg0 language-index) 9) 10)) + (if (and (= (-> arg0 language-index) 7) + (or (= (scf-get-territory) 1) + (and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language)) + ) + ) + (+! (-> arg0 language-index) -1) + ) + (if (= (-> arg0 language-index) 6) + (+! (-> arg0 language-index) -2) + ) + (set! (-> *setting-control* user-default language) (the-as language-enum (-> arg0 language-index))) + (load-level-text-files (-> arg0 language-index)) + ) + ((cpad-pressed? 0 right l-analog-right) + (sound-play "generic-beep") + (set! (-> arg0 language-index) (mod (+ (-> arg0 language-index) 1) 10)) + (if (= (-> arg0 language-index) 5) + (+! (-> arg0 language-index) 2) + ) + (if (and (= (-> arg0 language-index) 7) + (or (= (scf-get-territory) 1) + (and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language)) + ) + ) + (+! (-> arg0 language-index) 1) + ) + (set! (-> *setting-control* user-default language) (the-as language-enum (-> arg0 language-index))) + (load-level-text-files (-> arg0 language-index)) + ) + ((cpad-pressed? 0 confirm) + (set! (-> *setting-control* user-default subtitle-language) (the-as language-enum (-> arg0 language-index))) + (set! (-> *setting-control* user-default audio-language) + (the-as language-enum (-> *audio-language-remap* (-> arg0 language-index))) + ) + (if (or (nonzero? (-> *setting-control* user-default subtitle-language)) + (nonzero? (-> *setting-control* user-default language)) + (nonzero? (-> *setting-control* user-default audio-language)) + ) + (set! (-> *unlocked-secrets* options length) 11) + (set! (-> *unlocked-secrets* options length) 12) + ) + (pop-state arg0) + ) + ) + 0 + ) + +(defmethod respond-progress ((this menu-graphic-option) (arg0 progress) (arg1 symbol)) + (cond + (arg1 + (case (-> this menu-option-type) + ((8) + (let ((v1-1 #f)) + (cond + ((cpad-hold? 0 left l-analog-left) + (set! (-> *setting-control* user-default screenx) + (min-max-wrap-around (+ (-> *setting-control* user-default screenx) -2) -96 96) + ) + (set! v1-1 #t) + ) + ((cpad-hold? 0 right l-analog-right) + (set! (-> *setting-control* user-default screenx) + (min-max-wrap-around (+ (-> *setting-control* user-default screenx) 2) -96 96) + ) + (set! v1-1 #t) + ) + ((cpad-hold? 0 up l-analog-up) + (set! (-> *setting-control* user-default screeny) + (min-max-wrap-around (+ (-> *setting-control* user-default screeny) -2) -48 48) + ) + (set! v1-1 #t) + ) + ((cpad-hold? 0 down l-analog-down) + (set! (-> *setting-control* user-default screeny) + (min-max-wrap-around (+ (-> *setting-control* user-default screeny) 2) -48 48) + ) + (set! v1-1 #t) + ) + ((cpad-pressed? 0 square) + (set! (-> *setting-control* user-default screenx) 0) + (set! (-> *setting-control* user-default screeny) 24) + ) + ((cpad-pressed? 0 triangle) + (set! (-> *setting-control* user-default screenx) (-> arg0 center-x-backup)) + (set! (-> *setting-control* user-default screeny) (-> arg0 center-y-backup)) + ) + ) + (when v1-1 + (when (< (seconds 0.1) (- (current-time) (-> arg0 last-sound))) + (set-time! (-> arg0 last-sound)) + (sound-play "roll-over") + ) + ) + ) + ) + ((9) + (cond + ((cpad-pressed? 0 left l-analog-left) + (sound-play "generic-beep") + (set! (-> arg0 aspect-ratio) (the-as basic 'aspect4x3)) + ) + ((cpad-pressed? 0 right l-analog-right) + (sound-play "generic-beep") + (set! (-> arg0 aspect-ratio) (the-as basic 'aspect16x9)) + ) + ((cpad-pressed? 0 triangle) + (set! (-> arg0 aspect-ratio) (the-as basic (get-aspect-ratio))) + ) + ((cpad-pressed? 0 confirm) + (set! (-> *setting-control* user-default aspect-ratio) (the-as symbol (-> arg0 aspect-ratio))) + ) + ) + ) + ((10) + (cond + ((cpad-pressed? 0 left l-analog-left) + (sound-play "generic-beep") + (set! (-> arg0 progressive-scan) (the-as basic #t)) + ) + ((cpad-pressed? 0 right l-analog-right) + (sound-play "generic-beep") + (set! (-> arg0 progressive-scan) #f) + (set! (-> *setting-control* user-default set-video-mode) #f) + ) + ((cpad-pressed? 0 triangle) + (set! (-> arg0 progressive-scan) (the-as basic (-> *setting-control* user-default set-video-mode))) + ) + ((cpad-pressed? 0 confirm) + (push-state arg0) + (set-next-state arg0 'progressive-mode-warning 0) + ) + ) + ) + ((11) + (cond + ((cpad-pressed? 0 left l-analog-left) + (sound-play "generic-beep") + (set! (-> arg0 video-mode) (the-as basic 'pal)) + ) + ((cpad-pressed? 0 right l-analog-right) + (sound-play "generic-beep") + (set! (-> arg0 video-mode) (the-as basic 'ntsc)) + ) + ((cpad-pressed? 0 triangle) + (set! (-> arg0 video-mode) (the-as basic (get-video-mode))) + ) + ((cpad-pressed? 0 confirm) + (when (!= (-> *setting-control* user-default video-mode) (-> arg0 video-mode)) + (let ((v1-88 (-> arg0 video-mode))) + (case v1-88 + (('pal) + (set! (-> *setting-control* user-default video-mode) (the-as symbol v1-88)) + ) + (('ntsc) + (push-state arg0) + (set-next-state arg0 'video-mode-warning 0) + ) + ) + ) + ) + ) + ) + ) + ) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons up l-analog-up)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up l-analog-up)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons down l-analog-down)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down l-analog-down)) + ) + (else + (when (cpad-pressed? 0 confirm) + (case (-> this menu-option-type) + ((8) + (set! (-> arg0 center-x-backup) (-> *setting-control* user-default screenx)) + (set! (-> arg0 center-y-backup) (-> *setting-control* user-default screeny)) + ) + ((9) + (set! (-> arg0 aspect-ratio) (the-as basic (-> *setting-control* user-default aspect-ratio))) + ) + ((10) + (set! (-> arg0 progressive-scan) (the-as basic (-> *setting-control* user-default set-video-mode))) + ) + ((11) + (set! (-> arg0 video-mode) (the-as basic (get-video-mode))) + ) + ) + ) + ) + ) + 0 + ) + +(defmethod respond-progress ((this menu-camera-option) (arg0 progress) (arg1 symbol)) + (cond + (arg1 + (case (-> this menu-option-type) + ((12) + (cond + ((cpad-pressed? 0 left l-analog-left) + (set! (-> arg0 flip-horizontal) #f) + (sound-play "generic-beep") + ) + ((cpad-pressed? 0 right l-analog-right) + (set! (-> arg0 flip-horizontal) (the-as basic #t)) + (sound-play "generic-beep") + ) + ((cpad-pressed? 0 confirm) + (set! (-> *setting-control* cam-default flip-horizontal) (the-as symbol (-> arg0 flip-horizontal))) + ) + ((cpad-pressed? 0 triangle) + (set! (-> arg0 flip-horizontal) (the-as basic (-> *setting-control* cam-current flip-horizontal))) + ) + ) + ) + ((13) + (cond + ((cpad-pressed? 0 left l-analog-left) + (set! (-> arg0 flip-vertical) #f) + (sound-play "generic-beep") + ) + ((cpad-pressed? 0 right l-analog-right) + (set! (-> arg0 flip-vertical) (the-as basic #t)) + (sound-play "generic-beep") + ) + ((cpad-pressed? 0 confirm) + (set! (-> *setting-control* cam-default flip-vertical) (the-as symbol (-> arg0 flip-vertical))) + ) + ((cpad-pressed? 0 triangle) + (set! (-> arg0 flip-vertical) (the-as basic (-> *setting-control* cam-current flip-vertical))) + ) + ) + ) + ) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons up l-analog-up)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up l-analog-up)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons down l-analog-down)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down l-analog-down)) + ) + (else + (cond + ((cpad-pressed? 0 confirm) + (set! (-> arg0 flip-horizontal) (the-as basic (-> *setting-control* cam-current flip-horizontal))) + (set! (-> arg0 flip-vertical) (the-as basic (-> *setting-control* cam-current flip-vertical))) + ) + ((cpad-pressed? 0 triangle) + (set! (-> arg0 flip-horizontal) (the-as basic (-> *setting-control* cam-current flip-horizontal))) + (set! (-> arg0 flip-vertical) (the-as basic (-> *setting-control* cam-current flip-vertical))) + ) + ) + ) + ) + 0 + ) + +(defmethod item-obtained? ((this inventory-item)) + (or (logtest? (-> *game-info* features) (-> this feature)) + (logtest? (-> *game-info* vehicles) (-> this vehicle)) + (logtest? (-> *game-info* items) (-> this item)) + ) + ) + +(defmethod have-items? ((this inventory-item-group)) + (let ((gp-0 #f)) + (dotimes (s4-0 (-> this items length)) + (if (item-obtained? (-> this items s4-0)) + (set! gp-0 #t) + ) + ) + gp-0 + ) + ) + +(defmethod respond-progress ((this menu-inventory) (arg0 progress) (arg1 symbol)) + (let* ((f30-0 (the float (-> this screens length))) + (s4-0 (-> this screens (min (the int (-> this current-index)) (-> this screens length)))) + (v1-9 (-> s4-0 groups (-> s4-0 current-index))) + (gp-0 #f) + ) + (let ((f28-0 0.0)) + (let ((f0-3 (-> this target-index))) + (set! (-> this target-index) (- f0-3 (* (the float (the int (/ f0-3 f30-0))) f30-0))) + ) + (cond + ((or (cpad-pressed? 0 left l-analog-left) + (and (cpad-hold? 0 left l-analog-left) (time-elapsed? (-> arg0 last-move) (seconds 0.2))) + ) + (set-time! (-> arg0 last-move)) + (let ((s3-0 (-> s4-0 current-index)) + (s2-0 (-> v1-9 index-left)) + ) + (let ((s0-0 (-> s4-0 groups s2-0)) + (s1-0 6) + ) + (while (and (not (have-items? s0-0)) (!= s3-0 s2-0) (nonzero? s1-0)) + (set! s2-0 (-> s0-0 index-left)) + (set! s0-0 (-> s4-0 groups s2-0)) + (+! s1-0 -1) + (if (zero? s1-0) + (set! s2-0 s3-0) + ) + ) + ) + (when (!= s3-0 s2-0) + (set! (-> s4-0 current-index) s2-0) + (sound-play "generic-beep") + ) + ) + ) + ((or (cpad-pressed? 0 right l-analog-right) + (and (cpad-hold? 0 right l-analog-right) (time-elapsed? (-> arg0 last-move) (seconds 0.2))) + ) + (set-time! (-> arg0 last-move)) + (let ((s3-2 (-> s4-0 current-index)) + (s2-1 (-> v1-9 index-right)) + ) + (let ((s0-1 (-> s4-0 groups s2-1)) + (s1-1 6) + ) + (while (and (not (have-items? s0-1)) (!= s3-2 s2-1) (nonzero? s1-1)) + (set! s2-1 (-> s0-1 index-right)) + (set! s0-1 (-> s4-0 groups s2-1)) + (+! s1-1 -1) + (if (zero? s1-1) + (set! s2-1 s3-2) + ) + ) + ) + (when (!= s3-2 s2-1) + (set! (-> s4-0 current-index) s2-1) + (sound-play "generic-beep") + ) + ) + ) + ((or (cpad-pressed? 0 up l-analog-up) + (and (cpad-hold? 0 up l-analog-up) (time-elapsed? (-> arg0 last-move) (seconds 0.2))) + ) + (set-time! (-> arg0 last-move)) + (let ((s3-4 (-> s4-0 current-index)) + (s2-2 (-> v1-9 index-up)) + ) + (let ((s0-2 (-> s4-0 groups s2-2)) + (s1-2 6) + ) + (while (and (not (have-items? s0-2)) (!= s3-4 s2-2) (nonzero? s1-2)) + (set! s2-2 (-> s0-2 index-up)) + (set! s0-2 (-> s4-0 groups s2-2)) + (+! s1-2 -1) + (if (zero? s1-2) + (set! s2-2 s3-4) + ) + ) + ) + (when (!= s3-4 s2-2) + (set! (-> s4-0 current-index) s2-2) + (sound-play "generic-beep") + ) + ) + ) + ((or (cpad-pressed? 0 down l-analog-down) + (and (cpad-hold? 0 down l-analog-down) (time-elapsed? (-> arg0 last-move) (seconds 0.2))) + ) + (set-time! (-> arg0 last-move)) + (let ((s3-6 (-> s4-0 current-index)) + (s2-3 (-> v1-9 index-down)) + ) + (let ((s0-3 (-> s4-0 groups s2-3)) + (s1-3 6) + ) + (while (and (not (have-items? s0-3)) (!= s3-6 s2-3) (nonzero? s1-3)) + (set! s2-3 (-> s0-3 index-down)) + (set! s0-3 (-> s4-0 groups s2-3)) + (+! s1-3 -1) + (if (zero? s1-3) + (set! s2-3 s3-6) + ) + ) + ) + (when (!= s3-6 s2-3) + (set! (-> s4-0 current-index) s2-3) + (sound-play "generic-beep") + ) + ) + ) + ((and (cpad-hold? 0 r1) (= (-> this current-index) (-> this target-index))) + (let ((f0-7 (+ 1.0 (-> this target-index)))) + (set! (-> this target-index) (- f0-7 (* (the float (the int (/ f0-7 f30-0))) f30-0))) + ) + (set! f28-0 182.04445) + (set! gp-0 #t) + ) + ((and (cpad-hold? 0 l1) (= (-> this current-index) (-> this target-index))) + (let ((f0-12 (+ -1.0 f30-0 (-> this target-index)))) + (set! (-> this target-index) (- f0-12 (* (the float (the int (/ f0-12 f30-0))) f30-0))) + ) + (set! f28-0 -182.04445) + (set! gp-0 #t) + ) + ) + (let* ((f26-0 (/ 65536.0 f30-0)) + (f0-17 (* 3.0 (seconds-per-frame) f26-0)) + (f1-19 (+ (* (-> this current-index) f26-0) f28-0)) + (f2-1 (* (-> this target-index) f26-0)) + (f0-19 (+ 65536.0 (deg-seek f1-19 f2-1 f0-17))) + ) + (set! (-> this current-index) (/ (- f0-19 (* (the float (the int (/ f0-19 65536.0))) 65536.0)) f26-0)) + ) + ) + (when (< (fabs (- (-> this current-index) (-> this target-index))) 0.01) + (let ((f0-25 (-> this target-index))) + (set! (-> this current-index) (- f0-25 (* (the float (the int (/ f0-25 f30-0))) f30-0))) + ) + ) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons up l-analog-up)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up l-analog-up)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons down l-analog-down)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down l-analog-down)) + (if gp-0 + (sound-play "score-slide") + ) + ) + 0 + ) + +(defmethod respond-progress ((this menu-qr-option) (arg0 progress) (arg1 symbol)) + (let ((s5-0 (&-> arg0 yes-no-choice))) + (cond + (arg1 + (cond + ((and (cpad-pressed? 0 left l-analog-left) (not (-> s5-0 0))) + (sound-play "generic-beep") + (set! (-> s5-0 0) (the-as basic #t)) + ) + ((and (cpad-pressed? 0 right l-analog-right) (-> s5-0 0)) + (sound-play "generic-beep") + (set! (-> s5-0 0) #f) + ) + ((and (cpad-pressed? 0 confirm) (-> s5-0 0)) + (case (-> this name) + (((text-id progress-restart-mission)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (restart-mission) + (set-next-state arg0 'go-away 0) + ) + (((text-id progress-quit-game)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (initialize! *game-info* 'game (the-as game-save #f) "title-restart" (the-as resetter-spec #f)) + ) + ) + ) + ) + ) + (else + (set! (-> s5-0 0) #f) + ) + ) + ) + 0 + ) + +(define *last-powerup-collect-amount* 0) + +;; WARN: Return type mismatch (pointer process) vs none. +(defun spawn-secret-notify-message ((arg0 int)) + (process-spawn-function + process + (lambda :behavior process + ((arg0 int)) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (seconds 2.5)) + (suspend) + ) + ) + (while (or (not (handle-command-list *gui-control* (gui-channel alert) (the-as gui-connection #f))) + (= (status-of-level-and-borrows *level* 'title #f) 'active) + ) + (suspend) + ) + (talker-spawn-func (-> *talker-speech* arg0) *entity-pool* (target-pos 0) (the-as region #f)) + (none) + ) + arg0 + :to *entity-pool* + ) + (none) + ) + +(defun menu-secrets-notify-task-node-close ((arg0 game-task-node)) + (local-vars (v1-3 symbol)) + (set! v1-3 + (and (not (logtest? (-> *game-info* secrets) (game-secrets hero-mode))) + (begin + (dotimes (v1-4 (-> *menu-secrets-array* length)) + (let ((a1-2 (-> *menu-secrets-array* v1-4))) + (when (and (= (-> *game-info* sub-task-list (-> a1-2 avail-after)) arg0) + (= (logand (-> *game-info* purchase-secrets) (-> a1-2 required-secrets)) (-> a1-2 required-secrets)) + (not (logtest? (-> a1-2 flags) (secret-item-option-flags sf3))) + ) + (set! v1-3 #t) + (goto cfg-14) + ) + ) + ) + #f + ) + ) + ) + (label cfg-14) + (when v1-3 + (set! *last-powerup-collect-amount* (the int (-> *game-info* skill-total))) + (spawn-secret-notify-message 136) + ) + 0 + (none) + ) + +(defun menu-secrets-notify-powerup-collect () + (when (>= (-> *game-info* skill-total) 600.0) + (spawn-secret-notify-message 138) + (return 0) + ) + (let ((gp-0 #f) + (s5-0 #f) + ) + (dotimes (s4-0 (-> *menu-secrets-array* length)) + (let ((s3-0 (-> *menu-secrets-array* s4-0))) + (when (zero? (secret-item-option-method-12 s3-0)) + (cond + ((and (>= (the int (-> *game-info* skill)) (-> s3-0 cost)) + (< (the int (-> *game-info* skill-high-watermark)) (-> s3-0 cost)) + (>= (the int (-> *game-info* skill-total)) (+ *last-powerup-collect-amount* 3)) + ) + (set! s5-0 #t) + (set! gp-0 #t) + ) + ((< (-> s3-0 cost) (the int (-> *game-info* skill))) + (set! gp-0 #t) + ) + ) + ) + ) + ) + (cond + (s5-0 + (spawn-secret-notify-message 135) + (set! *last-powerup-collect-amount* (the int (-> *game-info* skill-total))) + ) + (gp-0 + (let ((v1-31 (if (< (-> *game-info* skill-total) 25.0) + 10 + 25 + ) + ) + ) + (when (>= (the int (-> *game-info* skill-total)) (+ *last-powerup-collect-amount* v1-31)) + (set! *last-powerup-collect-amount* (the int (-> *game-info* skill-total))) + (spawn-secret-notify-message 137) + ) + ) + ) + ) + ) + 0 + ) diff --git a/goal_src/jak3/engine/ui/text-h.gc b/goal_src/jak3/engine/ui/text-h.gc index b9a1628346..d65b644a5d 100644 --- a/goal_src/jak3/engine/ui/text-h.gc +++ b/goal_src/jak3/engine/ui/text-h.gc @@ -9,23 +9,23 @@ (defenum text-id :type uint32 (null #x0) - (text-0001 #x0001) - (text-0002 #x0002) + (progress-quit #x0001) + (progress-pause #x0002) (progress-subtitle-language #x0003) (progress-sound-format #x0004) - (text-0005 #x0005) - (text-0006 #x0006) - (text-0007 #x0007) + (progress-sound-mono #x0005) + (progress-sound-stereo #x0006) + (progress-sound-surround #x0007) (progress-sfx-volume #x0008) (progress-music-volume #x0009) (progress-speech-volume #x000a) (progress-language #x000b) (progress-vibration #x000c) - (text-000d #x000d) + (progress-play-hints #x000d) (progress-graphics-center-screen #x000e) - (text-000f #x000f) - (text-0010 #x0010) - (text-0011 #x0011) + (progress-on #x000f) + (progress-off #x0010) + (progress-graphics-center-screen-dpad #x0011) (progress-language-english #x0012) (progress-language-french #x0013) (progress-language-german #x0014) @@ -39,39 +39,39 @@ (progress-game-options #x001c) (progress-graphic-options #x001d) (progress-sound-options #x001e) - (text-001f #x001f) - (text-0020 #x0020) - (text-0021 #x0021) - (text-0022 #x0022) - (text-0023 #x0023) + (progress-aspect-4x3 #x001f) + (progress-aspect-16x9 #x0020) + (progress-refresh-60hz #x0021) + (progress-refresh-50hz #x0022) + (progress-jak3 #x0023) (progress-exit-demo #x0024) - (text-0025 #x0025) - (text-0026 #x0026) + (progress-yes #x0025) + (progress-no #x0026) (progress-back #x0027) - (text-0028 #x0028) - (text-0029 #x0029) - (text-002a #x002a) + (progress-ok #x0028) + (progress-next #x0029) + (progress-prev #x002a) (progress-continue-without-save #x002b) - (text-002c #x002c) - (text-002d #x002d) + (progress-save-file-select #x002c) + (progress-load-file-select #x002d) (progress-load-save #x002e) (progress-save-game #x002f) - (text-0030 #x0030) + (progress-empty #x0030) (progress-options #x0031) (progress-title-new-game #x0032) - (text-0033 #x0033) + (progress-start-button #x0033) (progress-quit-game #x0034) (progress-bigmap #x0035) (progress-select-start #x0036) (progress-highscores #x0037) - (text-0038 #x0038) - (text-0039 #x0039) - (text-003a #x003a) - (text-003b #x003b) - (text-003c #x003c) - (text-003d #x003d) - (text-003e #x003e) - (text-003f #x003f) + (progress-highscores-first-place #x0038) + (progress-highscores-second-place #x0039) + (progress-highscores-third-place #x003a) + (progress-highscores-fourth-place #x003b) + (progress-highscores-fifth-place #x003c) + (progress-highscores-sixth-place #x003d) + (progress-highscores-seventh-place #x003e) + (progress-highscores-eighth-place #x003f) (text-0040 #x0040) (text-0041 #x0041) (text-0042 #x0042) @@ -103,8 +103,8 @@ (text-0065 #x0065) (progress-secrets-big-head #x0066) (progress-secrets-little-head #x0067) - (text-0068 #x0068) - (text-0069 #x0069) + (progress-secrets-orbs-available #x0068) + (progress-secrets-orbs-collected #x0069) (progress-missions #x006a) (progress-select-pre-start #x006b) (progress-select-kiosk-start #x006c) @@ -119,15 +119,15 @@ (text-0077 #x0077) (text-0078 #x0078) (text-0079 #x0079) - (text-007a #x007a) + (progress-graphics-center-screen-reset #x007a) (text-007b #x007b) (text-007c #x007c) - (text-007d #x007d) - (text-007e #x007e) - (text-007f #x007f) + (progress-missions-completed #x007d) + (progress-missions-todo #x007e) + (progress-memcard-insufficient-space-retry? #x007f) (text-0080 #x0080) (text-0081 #x0081) - (text-0082 #x0082) + (press-triangle-to-talk #x0082) (text-0083 #x0083) (text-0084 #x0084) (text-0085 #x0085) @@ -137,49 +137,49 @@ (text-0089 #x0089) (text-008a #x008a) (text-008b #x008b) - (text-008c #x008c) - (text-008d #x008d) - (text-008e #x008e) - (text-008f #x008f) - (text-0090 #x0090) - (text-0091 #x0091) - (text-0092 #x0092) - (text-0093 #x0093) - (text-0094 #x0094) - (text-0095 #x0095) - (text-0096 #x0096) + (progress-graphics-prog-scan-change-notice #x008c) + (progress-graphics-prog-scan-warn-1 #x008d) + (progress-graphics-prog-scan-warn-2 #x008e) + (progress-graphics-60hz-change-notice #x008f) + (progress-graphics-60hz-change-complete #x0090) + (progress-graphics-prog-scan-change-complete #x0091) + (progress-graphics-prog-scan-keep #x0092) + (progress-disc-removed-notice #x0093) + (progress-disc-removed-prompt #x0094) + (progress-disc-read-error #x0095) + (progress-disc-read-error-prompt #x0096) (text-0097 #x0097) (text-0098 #x0098) (text-0099 #x0099) - (text-009a #x009a) - (text-009b #x009b) - (text-009c #x009c) - (text-009d #x009d) - (text-009e #x009e) - (text-009f #x009f) - (text-00a0 #x00a0) - (text-00a1 #x00a1) - (text-00a2 #x00a2) - (text-00a3 #x00a3) - (text-00a4 #x00a4) - (text-00a5 #x00a5) - (text-00a6 #x00a6) - (text-00a7 #x00a7) - (text-00a8 #x00a8) - (text-00a9 #x00a9) - (text-00aa #x00aa) - (text-00ab #x00ab) - (text-00ac #x00ac) - (text-00ad #x00ad) - (text-00ae #x00ae) - (text-00af #x00af) - (text-00b0 #x00b0) - (text-00b1 #x00b1) - (text-00b2 #x00b2) - (text-00b3 #x00b3) - (text-00b4 #x00b4) - (text-00b5 #x00b5) - (text-00b6 #x00b6) + (progress-memcard-no-card-in-slot #x009a) + (progress-memcard-unformatted #x009b) + (progress-memcard-space-requirement #x009c) + (progress-memcard-insert-with-jak3-data #x009d) + (progress-memcard-insert-with-free-space #x009e) + (progress-memcard-formatting-required-notice #x009f) + (progress-memcard-saving #x00a0) + (progress-memcard-loading #x00a1) + (progress-memcard-formatting #x00a2) + (progress-memcard-creating-save-data #x00a3) + (progress-memcard-remove-warn #x00a4) + (progress-memcard-overwrite-warning #x00a5) + (progress-memcard-overwrite-confirm? #x00a6) + (progress-memcard-format? #x00a7) + (progress-memcard-continue? #x00a8) + (progress-memcard-go-back? #x00a9) + (progress-memcard-load-error #x00aa) + (progress-memcard-save-error #x00ab) + (progress-memcard-format-error #x00ac) + (progress-memcard-create-save-error #x00ad) + (progress-memcard-check #x00ae) + (progress-memcard-check-and-try-again #x00af) + (progress-memcard-removed #x00b0) + (progress-autosave-disabled #x00b1) + (progress-autosave-reenable-info #x00b2) + (progress-memcard-no-save-data #x00b3) + (progress-memcard-create-save-data? #x00b4) + (progress-autosave-notice #x00b5) + (progress-autosave-remove-warn #x00b6) (text-012c #x012c) (text-012d #x012d) (text-012e #x012e) @@ -218,7 +218,7 @@ (text-020b #x020b) (text-020c #x020c) (text-020d #x020d) - (text-020e #x020e) + (progress-continue #x020e) (text-03bf #x03bf) (text-03c0 #x03c0) (text-03c1 #x03c1) @@ -228,8 +228,8 @@ (text-03c5 #x03c5) (text-03c6 #x03c6) (text-03c7 #x03c7) - (text-03c8 #x03c8) - (text-03c9 #x03c9) + (progress-missions-todo-icon #x03c8) + (progress-missions-complete-icon #x03c9) (text-03d1 #x03d1) (text-0408 #x0408) (text-0409 #x0409) @@ -455,8 +455,8 @@ (text-05f9 #x05f9) (progress-camera-horizontal #x05fa) (progress-camera-vertical #x05fb) - (text-05fc #x05fc) - (text-05fd #x05fd) + (progress-camera-default #x05fc) + (progress-camera-flipped #x05fd) (progress-camera-options #x05fe) (text-05ff #x05ff) (text-0600 #x0600) @@ -741,8 +741,8 @@ (text-07cd #x07cd) (text-07ce #x07ce) (text-07cf #x07cf) - (text-07d0 #x07d0) - (text-07d1 #x07d1) + (progress-footer-next-r1 #x07d0) + (progress-footer-prev-l1 #x07d1) (progress-title-commentary #x07d2) (text-07d3 #x07d3) (text-07d4 #x07d4) @@ -852,9 +852,9 @@ (progress-title-level-select-act-2 #x084f) (progress-title-level-select-act-3 #x0850) (progress-secrets-button-invis #x0851) - (text-0852 #x0852) - (text-0853 #x0853) - (text-0856 #x0856) + (progress-secrets-cancel #x0852) + (progress-secrets-buy #x0853) + (progress-secrets-price #x0856) (text-0857 #x0857) (text-0858 #x0858) (text-085a #x085a) @@ -915,6 +915,9 @@ ;; ---text-id (define-extern print-game-text (function string font-context symbol int bucket-id float)) +(define-extern disable-level-text-file-loading (function none)) +(define-extern enable-level-text-file-loading (function none)) +(define-extern load-level-text-files (function int none)) ;; DECOMP BEGINS @@ -922,6 +925,7 @@ ((id text-id) (text string) ) + :pack-me ) @@ -929,7 +933,7 @@ ((length int32) (language-id int32) (group-name string) - (data game-text :dynamic) + (data game-text :inline :dynamic) ) (:methods (lookup-text! (_type_ text-id symbol) string) diff --git a/goal_src/jak3/engine/ui/text.gc b/goal_src/jak3/engine/ui/text.gc index 0ec4ede458..ef9cdc0464 100644 --- a/goal_src/jak3/engine/ui/text.gc +++ b/goal_src/jak3/engine/ui/text.gc @@ -7,3 +7,577 @@ ;; DECOMP BEGINS +(kmemopen global "text-buffers") + +(define *expand-buf-number* 0) + +(define *game-text-word* (new 'global 'string 256 (the-as string #f))) + +(define *game-text-line* (new 'global 'string 1024 (the-as string #f))) + +(define *expanded-text-line0* (new 'global 'string 1024 (the-as string #f))) + +(define *expanded-text-line1* (new 'global 'string 1024 (the-as string #f))) + +(define *level-text-file-load-flag* #t) + +(when (zero? (-> *common-text-heap* base)) + (let ((gp-0 *common-text-heap*)) + (set! (-> gp-0 base) (kmalloc global #x12000 (kmalloc-flags) "heap")) + (set! (-> gp-0 current) (-> gp-0 base)) + (set! (-> gp-0 top-base) (&+ (-> gp-0 base) #x12000)) + (set! (-> gp-0 top) (-> gp-0 top-base)) + ) + ) + +(kmemclose) + +(defmethod relocate ((this game-text-info) (offset int)) + (let ((v1-1 (-> *level* loading-level))) + (when v1-1 + (set! (-> v1-1 loaded-text-info (-> v1-1 loaded-text-info-count)) this) + (+! (-> v1-1 loaded-text-info-count) 1) + ) + ) + this + ) + +(defmethod length ((this game-text-info)) + (-> this length) + ) + +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this game-text-info)) + (the-as int (+ (-> this type size) (* (-> this length) 8))) + ) + + +(defmethod mem-usage ((this game-text-info) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 85 (-> usage length))) + (set! (-> usage data 84 name) "string") + (+! (-> usage data 84 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 84 used) v1-6) + (+! (-> usage data 84 total) (logand -16 (+ v1-6 15))) + ) + (dotimes (s4-0 (-> this length)) + (set! (-> usage length) (max 85 (-> usage length))) + (set! (-> usage data 84 name) "string") + (+! (-> usage data 84 count) 1) + (let ((v1-18 (asize-of (-> this data s4-0 text)))) + (+! (-> usage data 84 used) v1-18) + (+! (-> usage data 84 total) (logand -16 (+ v1-18 15))) + ) + ) + this + ) + +(defun convert-korean-text ((arg0 string)) + (local-vars (v1-21 int)) + (let ((gp-0 (-> arg0 data))) + *expanded-text-line0* + (let ((s4-0 0)) + 0 + (let ((s1-0 0) + (s5-0 (length arg0)) + ) + (set! *expand-buf-number* (logxor *expand-buf-number* 1)) + (let ((s3-0 (if (zero? *expand-buf-number*) + *expanded-text-line0* + *expanded-text-line1* + ) + ) + ) + (let ((s2-0 (+ (-> s3-0 allocated-length) -1))) + (clear s3-0) + (while (< s4-0 s5-0) + (cond + ((= (-> gp-0 s4-0) 3) + (+! s4-0 1) + (while (and (< s4-0 s5-0) (!= (-> gp-0 s4-0) 3) (!= (-> gp-0 s4-0) 4)) + (set! (-> s3-0 data s1-0) (-> gp-0 s4-0)) + (+! s4-0 1) + (+! s1-0 1) + ) + ) + (else + (let ((v1-17 (+ s4-0 1))) + (-> gp-0 v1-17) + (set! s4-0 (+ v1-17 1)) + ) + (set! (-> s3-0 data s1-0) (the-as uint 126)) + (let ((v1-19 (+ s1-0 1))) + (set! (-> s3-0 data v1-19) (the-as uint 89)) + (let ((v1-20 (+ v1-19 1))) + (while (and (< s4-0 s5-0) (< v1-20 s2-0) (!= (-> gp-0 s4-0) 3) (!= (-> gp-0 s4-0) 4)) + (cond + ((= (-> gp-0 s4-0) 5) + (set! (-> s3-0 data v1-20) (the-as uint 1)) + (+! s4-0 1) + (set! v1-21 (+ v1-20 1)) + ) + (else + (set! (-> s3-0 data v1-20) (the-as uint 3)) + (set! v1-21 (+ v1-20 1)) + ) + ) + (set! (-> s3-0 data v1-21) (-> gp-0 s4-0)) + (+! s4-0 1) + (let ((v1-22 (+ v1-21 1))) + (set! (-> s3-0 data v1-22) (the-as uint 126)) + (let ((v1-23 (+ v1-22 1))) + (set! (-> s3-0 data v1-23) (the-as uint 90)) + (set! v1-20 (+ v1-23 1)) + ) + ) + ) + (set! (-> s3-0 data v1-20) (the-as uint 126)) + (let ((v1-24 (+ v1-20 1))) + (set! (-> s3-0 data v1-24) (the-as uint 43)) + (let ((v1-25 (+ v1-24 1))) + (set! (-> s3-0 data v1-25) (the-as uint 50)) + (let ((v1-26 (+ v1-25 1))) + (set! (-> s3-0 data v1-26) (the-as uint 54)) + (let ((v1-27 (+ v1-26 1))) + (set! (-> s3-0 data v1-27) (the-as uint 72)) + (set! s1-0 (+ v1-27 1)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (set! (-> s3-0 data s1-0) (the-as uint 0)) + s3-0 + ) + ) + ) + ) + ) + +(defmethod lookup-text! ((this game-text-info) (arg0 text-id) (arg1 symbol)) + (cond + ((= this #f) + (cond + (arg1 + (the-as string #f) + ) + (else + (format (clear *temp-string*) "NO GAME TEXT") + *temp-string* + ) + ) + ) + (else + (let* ((a1-2 0) + (a3-0 (+ (-> this length) 1)) + (v1-2 (/ (+ a1-2 a3-0) 2)) + ) + (let ((t0-0 -1)) + (while (and (!= (-> this data v1-2 id) arg0) (!= v1-2 t0-0)) + (if (< (the-as uint arg0) (the-as uint (-> this data v1-2 id))) + (set! a3-0 v1-2) + (set! a1-2 v1-2) + ) + (set! t0-0 v1-2) + (set! v1-2 (/ (+ a1-2 a3-0) 2)) + ) + ) + (cond + ((!= (-> this data v1-2 id) arg0) + (cond + (arg1 + (the-as string #f) + ) + (else + (format (clear *temp-string*) "UNKNOWN ID ~X" arg0) + *temp-string* + ) + ) + ) + ((= (-> this language-id) 7) + (convert-korean-text (-> this data v1-2 text)) + ) + (else + (-> this data v1-2 text) + ) + ) + ) + ) + ) + ) + +(defmethod lookup-text ((this level) (arg0 text-id) (arg1 symbol)) + (let ((v1-0 *common-text*)) + (dotimes (a3-0 (-> this loaded-text-info-count)) + (if (= (-> this loaded-text-info a3-0 language-id) (-> *setting-control* user-current language)) + (set! v1-0 (-> this loaded-text-info a3-0)) + ) + ) + (lookup-text! v1-0 arg0 arg1) + ) + ) + +(define text-is-loading #f) + +;; WARN: Found some very strange gotos. Check result carefully, this is not well tested. +(defun load-game-text-info ((arg0 string) (arg1 (pointer object)) (arg2 kheap)) + (local-vars (v0-4 int) (sv-16 object) (sv-20 int) (sv-24 int) (sv-32 int)) + (set! sv-16 (-> arg1 0)) + (set! sv-20 (the-as int (-> *setting-control* user-current language))) + (set! sv-24 0) + (set! sv-32 (&- (-> arg2 top) (the-as uint (-> arg2 base)))) + (if (and (= (scf-get-territory) 1) (= sv-20 (language-enum english)) (not (demo?))) + (set! sv-20 11) + ) + (when (and (or (= sv-16 #f) + (!= (-> (the-as game-text-info sv-16) language-id) sv-20) + (not (string= (-> (the-as game-text-info sv-16) group-name) arg0)) + ) + (not (load-in-progress? *level*)) + ) + (let ((v1-19 arg2)) + (set! (-> v1-19 current) (-> v1-19 base)) + ) + (b! #t cfg-21 :delay (nop!)) + (label cfg-20) + (set! v0-4 0) + (b! #t cfg-34 :delay (nop!)) + (label cfg-21) + (let ((s3-0 str-load)) + (format (clear *temp-string*) "~D~S.TXT" sv-20 arg0) + (b! + (not (s3-0 + *temp-string* + -1 + (logand -64 (&+ (-> arg2 current) 63)) + (&- (-> arg2 top) (the-as uint (-> arg2 current))) + ) + ) + cfg-20 + :delay (nop!) + ) + ) + (label cfg-23) + (let ((v1-23 (str-load-status (the-as (pointer int32) (& sv-24))))) + (cond + ((= v1-23 'error) + (format 0 "Error loading text~%") + (return 0) + ) + ((>= sv-24 (+ sv-32 -300)) + (format 0 "Game text heap overrun!~%") + (return 0) + ) + ((= v1-23 'busy) + (nop!) + (nop!) + (nop!) + (nop!) + (nop!) + (nop!) + (goto cfg-23) + ) + ) + ) + (let ((s2-1 (logand -64 (&+ (-> arg2 current) 63)))) + (flush-cache 0) + (let ((s3-1 link)) + (format (clear *temp-string*) "~D~S.TXT" sv-20 arg0) + (set! (-> arg1 0) (s3-1 s2-1 (-> *temp-string* data) sv-24 arg2 0)) + ) + ) + (if (<= (the-as int (-> arg1 0)) 0) + (set! (-> arg1 0) (the-as object #f)) + ) + ) + (set! v0-4 0) + (label cfg-34) + v0-4 + ) + +(defun load-level-text-files ((arg0 int)) + (if (or *level-text-file-load-flag* (>= arg0 0)) + (load-game-text-info "common" (&-> '*common-text* value) *common-text-heap*) + ) + 0 + (none) + ) + +(defun draw-debug-text-box ((arg0 font-context)) + (when *cheat-mode* + (let ((s5-0 (new 'static 'vector4w)) + (gp-0 + (new 'static 'inline-array vector4w 4 + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + ) + ) + ) + (set-vector! (-> gp-0 0) (the int (+ -256.0 (-> arg0 origin x))) (the int (+ -208.0 (-> arg0 origin y))) 0 1) + (set-vector! + (-> gp-0 1) + (the int (+ -256.0 (-> arg0 width) (-> arg0 origin x))) + (the int (+ -208.0 (-> arg0 origin y))) + 0 + 1 + ) + (set-vector! + (-> gp-0 2) + (the int (+ -256.0 (-> arg0 width) (-> arg0 origin x))) + (the int (+ -208.0 (-> arg0 height) (-> arg0 origin y))) + 0 + 1 + ) + (set-vector! + (-> gp-0 3) + (the int (+ -256.0 (-> arg0 origin x))) + (the int (+ -208.0 (-> arg0 height) (-> arg0 origin y))) + 0 + 1 + ) + (set-vector! s5-0 128 128 128 128) + (add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 0) (-> gp-0 1) s5-0) + (add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 1) (-> gp-0 2) s5-0) + (add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 2) (-> gp-0 3) s5-0) + (add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 3) (-> gp-0 0) s5-0) + ) + ) + 0 + (none) + ) + +(defun print-game-text-scaled ((arg0 string) (arg1 float) (arg2 font-context) (arg3 bucket-id)) + (let ((f26-0 (-> arg2 width)) + (f30-0 (-> arg2 height)) + (f24-0 (-> arg2 origin x)) + (f22-0 (-> arg2 origin y)) + (f28-0 (-> arg2 scale)) + ) + (let ((f0-1 (* (-> arg2 width) arg1)) + (f1-2 (* (-> arg2 height) arg1)) + ) + (if (logtest? (-> arg2 flags) (font-flags middle)) + (+! (-> arg2 origin x) (* 0.5 (- f26-0 f0-1))) + ) + (if (logtest? (-> arg2 flags) (font-flags middle-vert)) + (+! (-> arg2 origin y) (* 0.5 (- f30-0 f1-2))) + ) + (let ((v1-10 arg2)) + (set! (-> v1-10 scale) (* f28-0 arg1)) + ) + (set! (-> arg2 width) f0-1) + (set! (-> arg2 height) f1-2) + ) + (print-game-text arg0 arg2 #f 44 (bucket-id hud-draw-hud-alpha)) + (set! (-> arg2 origin x) f24-0) + (set! (-> arg2 origin y) f22-0) + (set! (-> arg2 width) f26-0) + (set! (-> arg2 height) f30-0) + (set! (-> arg2 scale) f28-0) + ) + 0 + (none) + ) + +(defun print-game-text ((arg0 string) (arg1 font-context) (arg2 symbol) (arg3 int) (arg4 bucket-id)) + (local-vars + (sv-16 float) + (sv-20 float) + (sv-24 font-flags) + (sv-28 font-color) + (sv-32 (pointer uint8)) + (sv-36 float) + (sv-40 float) + (sv-44 float) + (sv-48 float) + (sv-52 float) + (sv-56 float) + (sv-64 int) + (sv-72 uint) + (sv-80 int) + (sv-88 int) + (sv-96 int) + (sv-104 uint) + (sv-108 symbol) + (sv-112 int) + (sv-120 int) + ) + (cond + ((< 0.1 (-> arg1 scale)) + (set! sv-16 (-> arg1 origin x)) + (set! sv-20 (-> arg1 origin y)) + (set! sv-24 (-> arg1 flags)) + (set! sv-28 (-> arg1 color)) + (set-context! *font-work* arg1) + (set! (-> arg1 max-x) sv-16) + (when (logtest? (-> arg1 flags) (font-flags middle-vert)) + (logclear! (-> arg1 flags) (font-flags middle-vert)) + (+! (-> arg1 origin y) + (the float + (the int (* 0.5 (- (-> arg1 height) (print-game-text arg0 arg1 #t 44 (bucket-id hud-draw-hud-alpha))))) + ) + ) + ) + (set! sv-32 (-> arg0 data)) + (set! sv-36 (-> arg1 origin x)) + (set! sv-40 (-> arg1 origin x)) + (set! sv-44 (+ (-> arg1 origin x) (-> arg1 width))) + (set! sv-48 (+ (-> arg1 origin y) (-> arg1 height))) + (set! sv-52 (-> (get-string-length " " arg1) length)) + (set! sv-56 (* (if (logtest? (-> arg1 flags) (font-flags large)) + (the float arg3) + 28.0 + ) + (-> arg1 scale) + ) + ) + (set! sv-64 0) + (if (logtest? (-> arg1 flags) (font-flags middle)) + (+! (-> arg1 origin x) (* 0.5 (-> arg1 width))) + ) + (set! sv-72 (-> sv-32 0)) + (set! sv-80 0) + (set! sv-88 0) + (set! sv-96 0) + (set! sv-104 (-> sv-32 1)) + (set! sv-108 (the-as symbol #f)) + (set! sv-112 0) + (set! sv-120 0) + (set! (-> *game-text-line* data 0) (the-as uint 0)) + (while (and (not (and (zero? sv-72) (zero? sv-80) (zero? sv-88))) (>= sv-48 (-> arg1 origin y))) + (set! sv-120 0) + (set! sv-32 (&-> sv-32 1)) + (set! sv-104 (-> sv-32 0)) + (set! sv-32 (&-> sv-32 -1)) + (cond + ((and (> sv-72 0) (< sv-72 (the-as uint 4))) + (set! (-> *game-text-word* data sv-80) sv-72) + (set! sv-80 (+ sv-80 1)) + (set! (-> *game-text-word* data sv-80) sv-104) + (set! sv-80 (+ sv-80 1)) + (set! sv-32 (&-> sv-32 1)) + ) + ((or (= sv-72 32) (= sv-72 47) (and (= sv-72 45) (!= (-> sv-32 -1) 126))) + (set! (-> *game-text-word* data sv-80) sv-72) + (set! sv-80 (+ sv-80 1)) + (set! sv-108 #t) + ) + ((zero? sv-72) + (if (nonzero? sv-80) + (set! sv-108 #t) + ) + (set! sv-112 (+ sv-112 1)) + ) + ((and (= sv-72 92) (= sv-104 92)) + (set! sv-32 (&-> sv-32 1)) + (if (nonzero? sv-80) + (set! sv-108 #t) + ) + (set! sv-112 (+ sv-112 1)) + ) + ((and (= sv-72 95) (= sv-104 95)) + (set! sv-32 (&-> sv-32 1)) + (set! (-> *game-text-word* data sv-80) (the-as uint 32)) + (set! sv-80 (+ sv-80 1)) + ) + (else + (set! (-> *game-text-word* data sv-80) sv-72) + (set! sv-80 (+ sv-80 1)) + ) + ) + (when sv-108 + (set! (-> *game-text-word* data sv-80) (the-as uint 0)) + (let ((f30-1 sv-36)) + (set! sv-120 (the int (-> (get-string-length *game-text-word* arg1) length))) + (let ((f0-27 (+ f30-1 (the float sv-120)))) + (if (= (-> *game-text-word* data (+ sv-80 -1)) 32) + (set! f0-27 (- f0-27 sv-52)) + ) + (cond + ((< sv-44 f0-27) + (set! (-> arg1 max-x) (fmax (-> arg1 max-x) sv-36)) + (set! sv-112 (+ sv-112 1)) + ) + (else + (copy-charp<-charp (&-> *game-text-line* data sv-88) (-> *game-text-word* data)) + (set! sv-88 (+ sv-88 sv-80)) + (set! sv-80 0) + (set! sv-36 (+ sv-36 (the float sv-120))) + (set! (-> arg1 max-x) (fmax (-> arg1 max-x) sv-36)) + (set! sv-108 (the-as symbol #f)) + ) + ) + ) + ) + ) + (while (> sv-112 0) + (let ((f30-2 (+ (-> arg1 origin y) sv-56))) + (when (and (>= sv-96 (the-as int (-> arg1 start-line))) #t) + (when (= (-> *game-text-line* data (+ sv-88 -1)) 32) + (set! (-> *game-text-line* data (+ sv-88 -1)) (the-as uint 0)) + 0 + ) + (if (nonzero? (-> *game-text-line* data 0)) + (set! sv-64 (+ sv-64 1)) + ) + (when (not arg2) + (with-dma-buffer-add-bucket ((s2-1 (-> *display* frames (-> *display* on-screen) global-buf)) + arg4 + ) + (draw-string *game-text-line* s2-1 arg1) + ) + ) + (set! (-> arg1 origin y) f30-2) + ) + ) + (set! sv-96 (+ sv-96 1)) + (set! (-> *game-text-line* data 0) (the-as uint 0)) + (set! sv-88 0) + (set! sv-112 (+ sv-112 -1)) + (set! sv-36 sv-40) + (when sv-108 + (copy-charp<-charp (&-> *game-text-line* data sv-88) (-> *game-text-word* data)) + (set! sv-88 (+ sv-88 sv-80)) + (set! sv-80 0) + (set! sv-108 (the-as symbol #f)) + (set! sv-36 (+ sv-36 (the float sv-120))) + ) + ) + (when (nonzero? sv-72) + (set! sv-32 (&-> sv-32 1)) + (set! sv-72 (-> sv-32 0)) + ) + ) + (set! (-> arg1 origin x) sv-16) + (set! (-> arg1 origin y) sv-20) + (set! (-> arg1 flags) sv-24) + (set! (-> arg1 color) sv-28) + (if (> sv-64 0) + (* sv-56 (the float sv-64)) + 0.0 + ) + ) + (else + 0.0 + ) + ) + ) + +(defun disable-level-text-file-loading () + (set! *level-text-file-load-flag* #f) + 0 + (none) + ) + +(defun enable-level-text-file-loading () + (set! *level-text-file-load-flag* #t) + 0 + (none) + ) diff --git a/goal_src/jak3/engine/util/capture-h.gc b/goal_src/jak3/engine/util/capture-h.gc index aa206048bc..d5201b1013 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/glist-h.gc b/goal_src/jak3/engine/util/glist-h.gc index 3e167b0b42..5c5ccc0f20 100644 --- a/goal_src/jak3/engine/util/glist-h.gc +++ b/goal_src/jak3/engine/util/glist-h.gc @@ -7,3 +7,72 @@ ;; DECOMP BEGINS +;; this file is debug only +(declare-file (debug)) + +(deftype glst-node (structure) + ((next glst-node) + (prev glst-node) + ) + ) + + +(deftype glst-named-node (glst-node) + ((privname string) + ) + ) + + +(deftype glst-list (structure) + ((head glst-node) + (tail glst-node) + (tailpred glst-node) + (numelem int32) + ) + :pack-me + ) + + +(defun glst-next ((arg0 glst-node)) + "return the next node in the list" + (-> arg0 next) + ) + +(defun glst-prev ((arg0 glst-node)) + "return the previous node in the list" + (-> arg0 prev) + ) + +(defun glst-head ((arg0 glst-list)) + "return the start of the list" + (-> arg0 head) + ) + +(defun glst-tail ((arg0 glst-list)) + "return the tail of the list" + (-> arg0 tailpred) + ) + +(defun glst-end-of-list? ((arg0 glst-node)) + "is this node the end of the list. #t = end" + (not (-> arg0 next)) + ) + +(defun glst-start-of-list? ((arg0 glst-node)) + "is this node the start of the list. #t = start" + (not (-> arg0 prev)) + ) + +(defun glst-empty? ((arg0 glst-list)) + "is the list empty, #t = empty" + (= (-> arg0 tailpred) arg0) + ) + +(defun glst-node-name ((arg0 glst-named-node)) + (-> arg0 privname) + ) + +(defun glst-set-name! ((arg0 glst-named-node) (arg1 string)) + (set! (-> arg0 privname) arg1) + arg1 + ) diff --git a/goal_src/jak3/engine/util/glist.gc b/goal_src/jak3/engine/util/glist.gc index 1903f6d33a..ba673d1d10 100644 --- a/goal_src/jak3/engine/util/glist.gc +++ b/goal_src/jak3/engine/util/glist.gc @@ -7,3 +7,182 @@ ;; DECOMP BEGINS +;; this file is debug only +(declare-file (debug)) + +(defun glst-num-elements ((arg0 glst-list)) + (-> arg0 numelem) + ) + +(defun glst-remove ((arg0 glst-list) (arg1 glst-node)) + (let ((v1-0 arg1)) + "return the previous node in the list" + (let ((v1-1 (-> v1-0 prev)) + (a2-1 arg1) + ) + "return the next node in the list" + (let ((a2-2 (-> a2-1 next))) + (set! (-> v1-1 next) a2-2) + (set! (-> a2-2 prev) v1-1) + ) + ) + ) + (+! (-> arg0 numelem) -1) + arg1 + ) + +(defun glst-remove-tail ((arg0 glst-list)) + (let ((v1-0 arg0)) + "return the tail of the list" + (let* ((a1-1 (-> v1-0 tailpred)) + (v1-1 a1-1) + ) + "is this node the start of the list. #t = start" + (if (not (not (-> v1-1 prev))) + (glst-remove arg0 a1-1) + (the-as glst-node #f) + ) + ) + ) + ) + +(defun glst-remove-head ((arg0 glst-list)) + (let ((v1-0 arg0)) + "return the start of the list" + (let* ((a1-1 (-> v1-0 head)) + (v1-1 a1-1) + ) + "is this node the end of the list. #t = end" + (if (not (not (-> v1-1 next))) + (glst-remove arg0 a1-1) + (the-as glst-node #f) + ) + ) + ) + ) + +(defun glst-insert-before ((arg0 glst-list) (arg1 glst-node) (arg2 glst-node)) + (let ((v1-0 arg1)) + "return the previous node in the list" + (let ((v1-1 (-> v1-0 prev))) + (set! (-> arg2 prev) v1-1) + (set! (-> arg2 next) arg1) + (set! (-> v1-1 next) arg2) + ) + ) + (set! (-> arg1 prev) arg2) + (+! (-> arg0 numelem) 1) + arg2 + ) + +(defun glst-insert-after ((arg0 glst-list) (arg1 glst-node) (arg2 glst-node)) + (let ((v1-0 arg1)) + "return the next node in the list" + (let ((v1-1 (-> v1-0 next))) + (set! (-> arg2 prev) arg1) + (set! (-> arg2 next) v1-1) + (set! (-> v1-1 prev) arg2) + ) + ) + (set! (-> arg1 next) arg2) + (+! (-> arg0 numelem) 1) + arg2 + ) + +(defun glst-add-tail ((arg0 glst-list) (arg1 glst-node)) + (glst-insert-before arg0 (the-as glst-node (&-> arg0 tail)) arg1) + arg1 + ) + +(defun glst-add-head ((arg0 glst-list) (arg1 glst-node)) + (glst-insert-after arg0 (the-as glst-node arg0) arg1) + arg1 + ) + +(defun glst-init-list! ((arg0 glst-list)) + (set! (-> arg0 head) (the-as glst-node (&-> arg0 tail))) + (set! (-> arg0 tail) #f) + (set! (-> arg0 tailpred) (the-as glst-node (&-> arg0 head))) + (set! (-> arg0 numelem) 0) + arg0 + ) + +(defun glst-find-node-by-name ((arg0 glst-list) (arg1 string)) + (let ((v1-0 arg0)) + "return the start of the list" + (let ((s5-0 (-> v1-0 head))) + (while (let ((v1-6 s5-0)) + "is this node the end of the list. #t = end" + (not (not (-> v1-6 next))) + ) + (if (name= (-> (the-as glst-named-node s5-0) privname) arg1) + (return s5-0) + ) + "return the next node in the list" + (set! s5-0 (-> s5-0 next)) + ) + ) + ) + (the-as glst-node #f) + ) + +(defun glst-get-node-by-index ((arg0 glst-list) (arg1 int)) + (when (and (< arg1 (glst-num-elements arg0)) (>= arg1 0)) + "return the start of the list" + (let ((v1-3 (-> arg0 head))) + (dotimes (a0-3 arg1) + (nop!) + (nop!) + (nop!) + (nop!) + "return the next node in the list" + (set! v1-3 (-> v1-3 next)) + ) + (return v1-3) + ) + ) + (the-as glst-node #f) + ) + +(defun glst-length-of-longest-name ((arg0 glst-list)) + (let ((gp-0 0)) + (let ((v1-0 arg0)) + "return the start of the list" + (let ((s5-0 (-> v1-0 head))) + (while (let ((v1-6 s5-0)) + "is this node the end of the list. #t = end" + (not (not (-> v1-6 next))) + ) + (let ((v1-3 (length (-> (the-as glst-named-node s5-0) privname)))) + (if (< gp-0 v1-3) + (set! gp-0 v1-3) + ) + ) + "return the next node in the list" + (set! s5-0 (-> s5-0 next)) + ) + ) + ) + gp-0 + ) + ) + +(defun glst-get-node-index ((arg0 glst-list) (arg1 glst-node)) + (let ((v1-0 0)) + "return the start of the list" + (let ((a0-1 (-> arg0 head))) + (while (let ((a2-3 a0-1)) + "is this node the end of the list. #t = end" + (not (not (-> a2-3 next))) + ) + (if (= a0-1 arg1) + (return v1-0) + ) + (+! v1-0 1) + "return the next node in the list" + (set! a0-1 (-> a0-1 next)) + ) + ) + ) + -1 + ) diff --git a/goal_src/jak3/engine/util/profile.gc b/goal_src/jak3/engine/util/profile.gc index 6651babc6d..2b829992cd 100644 --- a/goal_src/jak3/engine/util/profile.gc +++ b/goal_src/jak3/engine/util/profile.gc @@ -76,7 +76,8 @@ ) ) -(define *profile-translate-array* (new 'static 'array uint64 584 +;; the size of this is not quite right... +(define *profile-translate-array* (new 'static 'array uint64 587 #x0 #x0 #x0 @@ -661,6 +662,8 @@ #xc #xc #xc + 0 ;; hack... + 0 ;; another hack ) ) diff --git a/goal_src/jak3/engine/util/script-h.gc b/goal_src/jak3/engine/util/script-h.gc index e930320287..cdd5f9e86a 100644 --- a/goal_src/jak3/engine/util/script-h.gc +++ b/goal_src/jak3/engine/util/script-h.gc @@ -5,6 +5,9 @@ ;; name in dgo: script-h ;; dgos: GAME +(declare-type script-context structure) +(define-extern *syntax-context* script-context) +(define-extern *script-context* script-context) (declare-type script-context structure) (declare-type load-state structure) @@ -25,6 +28,7 @@ (spec pair) (func (function script-context object)) ) + :pack-me (:methods (script-form-method-9 () none) ) @@ -46,8 +50,8 @@ (:methods (new (symbol type object process vector) _type_) (eval! (_type_ pair) object) - (script-context-method-10 () none) - (script-context-method-11 () none) + (script-context-method-10 (_type_ object pair) object) + (script-context-method-11 (_type_ pair pair symbol) symbol) ) ) diff --git a/goal_src/jak3/engine/util/script.gc b/goal_src/jak3/engine/util/script.gc index 4c122a0826..f30468756e 100644 --- a/goal_src/jak3/engine/util/script.gc +++ b/goal_src/jak3/engine/util/script.gc @@ -5,5 +5,4061 @@ ;; name in dgo: script ;; dgos: GAME +(declare-type script-form structure) +(define-extern *script-form* (inline-array script-form)) + ;; DECOMP BEGINS +'script + +'idle + +'bigmap? + +(defun command-get-int ((arg0 object) (arg1 int)) + (cond + ((null? arg0) + (empty) + arg1 + ) + ((type? arg0 binteger) + (the-as int (/ (the-as int arg0) 8)) + ) + ((type? arg0 bfloat) + (the int (-> (the-as bfloat arg0) data)) + ) + (else + (empty) + arg1 + ) + ) + ) + +(defun command-get-float ((arg0 object) (arg1 float)) + (cond + ((null? arg0) + (empty) + arg1 + ) + ((type? arg0 binteger) + (the float (/ (the-as int arg0) 8)) + ) + ((type? arg0 bfloat) + (-> (the-as bfloat arg0) data) + ) + (else + (empty) + arg1 + ) + ) + ) + +;; WARN: Return type mismatch int vs time-frame. +(defun command-get-time ((arg0 object) (arg1 int)) + (the-as time-frame (cond + ((null? arg0) + (empty) + arg1 + ) + ((and (pair? arg0) (= (car arg0) 'seconds)) + (the int (* 300.0 (command-get-float (car (cdr arg0)) 0.0))) + ) + ((and (pair? arg0) (= (car arg0) 'frame-time)) + (the int (* 5.0000005 (command-get-float (car (cdr arg0)) 0.0))) + ) + ((and (pair? arg0) (= (car arg0) 'frame-time-30)) + (the int (* 10.000001 (command-get-float (car (cdr arg0)) 0.0))) + ) + ((and (pair? arg0) (= (car arg0) 'frame-range)) + (let ((f30-3 (command-get-float (car (cdr arg0)) 0.0)) + (f28-0 (command-get-float (car (cdr (cdr arg0))) 0.0)) + (f0-9 (command-get-float (car (cdr (cdr (cdr arg0)))) 0.0)) + ) + (if (= f0-9 0.0) + (set! f0-9 30.0) + ) + (the int (* 300.0 (/ (- f28-0 f30-3) f0-9))) + ) + ) + ((type? arg0 binteger) + (the-as int (/ (the-as int arg0) 8)) + ) + ((type? arg0 bfloat) + (the int (-> (the-as bfloat arg0) data)) + ) + (else + (empty) + arg1 + ) + ) + ) + ) + +(defun command-get-param ((arg0 object) (arg1 object)) + (cond + ((null? arg0) + arg1 + ) + ((and (pair? arg0) (= (car arg0) 'seconds)) + (the int (* 300.0 (command-get-float (car (cdr arg0)) 0.0))) + ) + ((and (pair? arg0) (= (car arg0) 'meters)) + (* 4096.0 (command-get-float (car (cdr arg0)) 0.0)) + ) + ((and (pair? arg0) (= (car arg0) 'deg)) + (* 182.04445 (command-get-float (car (cdr arg0)) 0.0)) + ) + ((and (pair? arg0) (= (car arg0) 'static-vectorm)) + (let ((s4-0 (the-as object (new 'static 'vector)))) + (set-vector! + (the-as vector s4-0) + (* 4096.0 (command-get-float (car (cdr arg0)) 0.0)) + (* 4096.0 (command-get-float (car (cdr (cdr arg0))) 0.0)) + (* 4096.0 (command-get-float (car (cdr (cdr (cdr arg0)))) 0.0)) + 1.0 + ) + s4-0 + ) + ) + ((type? arg0 binteger) + (/ (the-as int arg0) 8) + ) + ((type? arg0 bfloat) + (-> (the-as bfloat arg0) data) + ) + (else + arg0 + ) + ) + ) + +(defun command-get-quoted-param ((arg0 object) (arg1 object)) + (if (and (pair? arg0) (= (car arg0) 'quote)) + (command-get-param (car (cdr arg0)) arg1) + (command-get-param arg0 arg1) + ) + ) + +;; WARN: Return type mismatch object vs process. +;; ERROR: Failed load: (set! v1-30 (l.wu 0)) at op 111 +;; WARN: disable def twice: 125. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defun command-get-process ((arg0 object) (arg1 process)) + (with-pp + (set! arg1 + (cond + ((or (null? arg0) (not arg0)) + (empty) + arg1 + ) + ((or (type? arg0 process) (= (rtype-of arg0) actor-group)) + (the-as process arg0) + ) + ((type? arg0 entity-actor) + (-> (the-as entity-actor arg0) extra process) + ) + ((or (= arg0 'target) (= arg0 '*target*)) + *target* + ) + ((= arg0 'sidekick) + (when *target* + (let ((v1-13 (-> *target* sidekick))) + (if v1-13 + (the-as process (-> v1-13 0 self)) + ) + ) + ) + ) + ((= arg0 'parent) + (let ((v1-16 (-> pp parent))) + (if v1-16 + (the-as process (-> v1-16 0 self)) + ) + ) + ) + ((= arg0 'camera) + *camera* + ) + ((= arg0 '*task-manager*) + (when (nonzero? (-> *setting-control* user-current exclusive-task-count)) + (let ((v1-24 (-> *task-manager-engine* alive-list next0))) + *task-manager-engine* + (let ((a0-10 (-> v1-24 next0))) + (while (!= v1-24 (-> *task-manager-engine* alive-list-end)) + (when (= (-> (the-as game-task-node-info (-> (the-as connection v1-24) param2)) task) + (-> *setting-control* user-current exclusive-task 0) + ) + (set! arg1 (the-as process (-> (the-as connection v1-24) param1))) + (goto cfg-97) + ) + (set! v1-24 a0-10) + *task-manager-engine* + (set! a0-10 (-> a0-10 next0)) + ) + ) + ) + ) + (let ((v1-30 (-> *task-manager-engine* alive-list next0))) + *task-manager-engine* + (-> v1-30 next0) + (while (!= v1-30 (-> *task-manager-engine* alive-list-end)) + (set! arg1 (the-as process (-> (the-as connection v1-30) param1))) + (b! #t cfg-97 :delay (nop!)) + (the-as none 0) + (the-as none *task-manager-engine*) + (the-as none 0) + (the-as none 0) + (set! v1-30 (the-as connectable (l.wu 0))) + ) + ) + (the-as process #f) + ) + ((= arg0 '*desert-duststorm*) + (handle->process (-> *game-info* dust-storm)) + ) + ((type? arg0 string) + (set! arg1 (process-by-ename (the-as string arg0))) + (cond + (arg1 + (empty) + arg1 + ) + ((-> *setting-control* user-current movie) + (let ((s5-1 (ppointer->process (-> *setting-control* user-current movie 0 child)))) + (while s5-1 + (when (name= arg0 (-> s5-1 name)) + (set! arg1 (the-as process s5-1)) + (goto cfg-97) + ) + (set! s5-1 (ppointer->process (-> s5-1 brother))) + ) + ) + (let ((s5-2 (ppointer->process (-> *setting-control* user-current movie 0 child)))) + (while s5-2 + (let* ((s3-0 s5-2) + (s4-0 (if (type? s3-0 process-drawable) + s3-0 + ) + ) + ) + (format (clear *temp-string*) "~S-lod0" arg0) + (let ((s3-2 *temp-string*)) + (when (and s4-0 + (nonzero? (-> (the-as process-drawable s4-0) draw)) + (or (and (nonzero? (-> (the-as process-drawable s4-0) draw art-group)) + (string= (the-as string arg0) (-> (the-as process-drawable s4-0) draw art-group name)) + ) + (and (nonzero? (-> (the-as process-drawable s4-0) draw jgeo)) + (string= s3-2 (-> (the-as process-drawable s4-0) draw jgeo name)) + ) + ) + ) + (format 0 "WARNING: command-get-process returning art-group or jgeo named ~A~%" arg0) + (set! arg1 (the-as process s4-0)) + (goto cfg-97) + ) + ) + ) + (set! s5-2 (ppointer->process (-> s5-2 brother))) + ) + ) + (the-as process #f) + ) + (else + (let ((v1-76 (process-by-name (the-as string arg0) *active-pool*))) + (if v1-76 + v1-76 + ) + ) + ) + ) + ) + (else + (empty) + arg1 + ) + ) + ) + (label cfg-97) + (the-as process arg1) + ) + ) + +;; WARN: Return type mismatch object vs entity. +(defun command-get-entity ((arg0 object) (arg1 entity)) + (the-as entity (cond + ((null? arg0) + (empty) + arg1 + ) + ((type? arg0 process) + (-> (the-as process arg0) entity) + ) + ((type? arg0 entity) + (the-as entity arg0) + ) + ((type? arg0 string) + (entity-by-name (the-as string arg0)) + ) + (else + (empty) + arg1 + ) + ) + ) + ) + +(defun command-get-trans ((arg0 object) (arg1 vector)) + (cond + ((or (not arg0) (null? arg0)) + (empty) + arg1 + ) + ((= arg0 'null) + *null-vector* + ) + ((= arg0 'target) + (target-pos 0) + ) + ((= (rtype-of arg0) string) + (let ((v1-5 (command-get-process arg0 *target*))) + (cond + ((and v1-5 (nonzero? (-> (the-as process-drawable v1-5) root))) + (-> (the-as process-drawable v1-5) root trans) + ) + (else + (empty) + arg1 + ) + ) + ) + ) + ((pair? arg0) + (let* ((s3-0 (command-get-process (car arg0) *target*)) + (s4-0 (if (type? s3-0 process-drawable) + s3-0 + ) + ) + (a1-7 (car (cdr arg0))) + ) + (cond + ((and s4-0 + (nonzero? (-> (the-as process-drawable s4-0) draw)) + (nonzero? (-> (the-as process-drawable s4-0) node-list)) + ) + (let ((a0-12 + (the-as + joint + (get-art-by-name-method (-> (the-as process-drawable s4-0) draw jgeo) (the-as string a1-7) (the-as type #f)) + ) + ) + ) + (cond + (a0-12 + (-> (the-as process-drawable s4-0) node-list data (+ (-> a0-12 number) 1) bone transform trans) + ) + (else + (empty) + arg1 + ) + ) + ) + ) + (else + (empty) + arg1 + ) + ) + ) + ) + (else + (empty) + arg1 + ) + ) + ) + +(defmethod script-context-method-10 ((this script-context) (arg0 object) (arg1 pair)) + (let* ((s5-0 (rtype-of arg0)) + (s4-0 arg1) + (s3-0 (car s4-0)) + ) + (while (not (null? s4-0)) + (cond + ((not s3-0) + (if (not arg0) + (return 'symbol) + ) + ) + (else + (let ((a1-1 (-> (the-as symbol s3-0) value))) + (if (type-type? s5-0 (the-as type a1-1)) + (return s3-0) + ) + ) + ) + ) + (set! s4-0 (cdr s4-0)) + (set! s3-0 (car s4-0)) + ) + ) + #f + ) + +;; WARN: Return type mismatch object vs pair. +(defun key-assoc ((arg0 object) (arg1 pair) (arg2 vector4w)) + (set! (-> arg2 dword 0) (the-as uint 0)) + (let ((v1-0 arg1)) + (while (not (or (null? v1-0) (= (car (car v1-0)) arg0))) + (+! (-> arg2 dword 0) 1) + (set! v1-0 (cdr v1-0)) + ) + (the-as pair (if (not (null? v1-0)) + (car v1-0) + ) + ) + ) + ) + +(defmethod script-context-method-11 ((this script-context) (arg0 pair) (arg1 pair) (arg2 symbol)) + (local-vars (sv-16 symbol) (sv-20 pair) (sv-24 pair) (sv-28 int) (sv-32 int) (sv-40 pair)) + (let ((s3-0 (cdr arg1))) + (set! sv-16 (the-as symbol #f)) + (set! sv-20 arg0) + (set! sv-24 s3-0) + (set! (-> this param-count) 0) + (set! (-> this expr) arg0) + (let ((a1-1 (car sv-20)) + (s2-0 (car s3-0)) + ) + (while (not (and (null? sv-20) (null? sv-24))) + (cond + ((= s2-0 '&rest) + (let ((v1-2 (-> this param-count))) + (set! (-> this param v1-2) sv-20) + (set! (-> this param-type v1-2) 'pair) + (set! (-> this param-count) (+ v1-2 1)) + ) + (return (not sv-16)) + ) + ((= s2-0 '&key) + (set! sv-28 (-> this param-count)) + (set! sv-32 0) + (set! sv-24 (cdr sv-24)) + (let ((v1-11 sv-28)) + (let* ((a0-3 sv-24) + (a1-6 (car a0-3)) + ) + (while (not (null? a0-3)) + (set! (-> this param v1-11) (car (cdr (cdr (cdr a1-6))))) + (let ((a1-13 (-> this param v1-11))) + (set! (-> this param-type v1-11) (-> (rtype-of a1-13) symbol)) + ) + (+! v1-11 1) + (set! a0-3 (cdr a0-3)) + (set! a1-6 (car a0-3)) + ) + ) + (set! (-> this param-count) v1-11) + ) + (while (not (null? sv-20)) + (set! sv-40 (key-assoc (car sv-20) sv-24 (the-as vector4w (& sv-32)))) + (cond + (sv-40 + (set! sv-20 (cdr sv-20)) + (let* ((v1-18 (car (cdr sv-40))) + (s3-1 (if (= v1-18 'eval) + (eval! this (the-as pair (car sv-20))) + (car sv-20) + ) + ) + (s2-1 (+ sv-28 sv-32)) + ) + (set! (-> this param s2-1) s3-1) + (let ((v1-29 (script-context-method-10 this s3-1 (the-as pair (car (cdr (cdr sv-40))))))) + (set! (-> this param-type s2-1) v1-29) + (when (not v1-29) + (set! sv-16 #t) + (if arg2 + (format + 0 + "ERROR: SCRIPT: param ~A = ~A is type ~A, needed type ~A.~%" + (car sv-40) + s3-1 + (rtype-of s3-1) + (car (cdr (cdr sv-40))) + ) + ) + ) + ) + ) + ) + (else + (set! sv-16 #t) + (if arg2 + (format 0 "ERROR: SCRIPT: found unknown keyword ~A in expression ~A.~%" (car sv-20) arg0) + ) + (set! sv-20 (cdr sv-20)) + ) + ) + (set! sv-20 (cdr sv-20)) + ) + (return (not sv-16)) + ) + ((null? s2-0) + (if arg2 + (format 0 "ERROR: SCRIPT: got too many params matching ~A to ~A~%" arg0 s3-0) + ) + (return #f) + ) + ((null? a1-1) + (cond + ((null? (car (cdr (cdr (cdr s2-0))))) + (if arg2 + (format 0 "ERROR: SCRIPT: got too few params matching ~A to ~A~%" arg0 s3-0) + ) + (return #f) + ) + (else + (let ((v1-62 (-> this param-count))) + (set! (-> this param v1-62) (car (cdr (cdr (cdr s2-0))))) + (let ((a0-28 (-> this param v1-62))) + (set! (-> this param-type v1-62) (-> (rtype-of a0-28) symbol)) + ) + (set! (-> this param-count) (+ v1-62 1)) + ) + (set! sv-24 (cdr sv-24)) + ) + ) + ) + (else + (let* ((v1-67 (car (cdr s2-0))) + (s0-0 (if (= v1-67 'eval) + (eval! this (the-as pair a1-1)) + a1-1 + ) + ) + (s1-0 (-> this param-count)) + ) + (set! (-> this param s1-0) s0-0) + (let ((v1-74 (script-context-method-10 this s0-0 (the-as pair (car (cdr (cdr s2-0))))))) + (set! (-> this param-type s1-0) v1-74) + (when (not v1-74) + (set! sv-16 #t) + (if arg2 + (format + 0 + "ERROR: SCRIPT: param ~A = ~A is type ~A, needed type ~A.~%" + (car s2-0) + s0-0 + (rtype-of s0-0) + (car (cdr (cdr s2-0))) + ) + ) + ) + ) + (set! (-> this param-count) (+ s1-0 1)) + ) + (set! sv-20 (cdr sv-20)) + (set! sv-24 (cdr sv-24)) + ) + ) + (set! a1-1 (car sv-20)) + (set! s2-0 (car sv-24)) + ) + ) + ) + (not sv-16) + ) + +(defmethod eval! ((this script-context) (arg0 pair)) + (let ((s5-0 (the-as object #f))) + (set! (-> this expr) arg0) + (case (rtype-of arg0) + ((pair) + (let* ((s4-0 arg0) + (a2-0 (car s4-0)) + ) + (cond + ((null? s4-0) + (set! s5-0 '()) + ) + (else + (let ((s3-0 (-> *script-form* 0))) + (while (nonzero? (-> s3-0 name)) + (when (= a2-0 (-> s3-0 name)) + (let ((s2-0 (new 'stack-no-clear 'script-context))) + (set! (-> s2-0 load-state) (-> this load-state)) + (set! (-> s2-0 key) (-> this key)) + (set! (-> s2-0 process) (-> this process)) + (set! (-> s2-0 trans) (-> this trans)) + (set! (-> s2-0 side-effect?) (-> this side-effect?)) + (set! (-> s2-0 got-error?) #f) + (cond + ((script-context-method-11 s2-0 s4-0 (-> s3-0 spec) #t) + (set! (-> s2-0 expr) s4-0) + (set! s5-0 ((-> s3-0 func) s2-0)) + ) + (else + (set! (-> s2-0 got-error?) #t) + ) + ) + (set! (-> this got-error?) (or (-> this got-error?) (-> s2-0 got-error?))) + ) + (goto cfg-23) + ) + (&+! s3-0 12) + ) + ) + (format 0 "ERROR: SCRIPT: taking the value of unknown symbol ~A in ~A for application.~%" a2-0 s4-0) + (set! (-> this got-error?) #t) + ) + ) + ) + (label cfg-23) + s5-0 + ) + ((symbol) + (let ((a0-8 (the-as object arg0))) + (cond + ((= (the-as pair a0-8) 'MINIMAP_FLAG_MINIMAP) + (set! s5-0 1024) + ) + ((= (the-as pair a0-8) 'FACT_SUPER_SKILL_INC) + (set! s5-0 (* (the int (-> *FACT-bank* super-skill-inc)) 8)) + ) + ((= (the-as pair a0-8) 'self) + (set! s5-0 (-> this process)) + ) + ((= (the-as pair a0-8) 'key) + (set! s5-0 (-> this key)) + ) + ((= (the-as pair a0-8) '*target*) + (set! s5-0 (command-get-process (the-as pair a0-8) *target*)) + ) + ((= (the-as pair a0-8) '*time-of-day*) + (set! s5-0 (ppointer->process *time-of-day*)) + ) + ((= (the-as pair a0-8) '*task-manager*) + (set! s5-0 (command-get-process (the-as pair a0-8) *target*)) + ) + ((= (the-as pair a0-8) '*desert-duststorm*) + (set! s5-0 (command-get-process (the-as pair a0-8) *target*)) + ) + (else + (set! s5-0 (-> (the-as symbol a0-8) value)) + ) + ) + ) + s5-0 + ) + (else + arg0 + ) + ) + ) + ) + +(define *script-form* (the-as (inline-array script-form) (malloc 'global 1536))) + +(let ((v1-13 (-> *script-form* 0))) + (set! (-> v1-13 name) 'quote) + (set! (-> v1-13 spec) '((return macro (object)) (function macro (symbol)) (value macro (object)))) + (set! (-> v1-13 func) (lambda ((arg0 script-context)) (-> arg0 param 1))) + ) + +(let ((v1-15 (-> *script-form* 1))) + (set! (-> v1-15 name) 'meters) + (set! (-> v1-15 spec) '((return macro (float)) (function macro (symbol)) (value eval (bfloat binteger)))) + (set! (-> v1-15 func) (lambda ((arg0 script-context)) (* 4096.0 (command-get-float (-> arg0 param 1) 0.0)))) + ) + +(let ((v1-17 (-> *script-form* 2))) + (set! (-> v1-17 name) 'seconds) + (set! (-> v1-17 spec) '((return macro (integer)) (function macro (symbol)) (value eval (bfloat binteger)))) + (set! (-> v1-17 func) + (lambda ((arg0 script-context)) (the int (* 300.0 (command-get-float (-> arg0 param 1) 0.0)))) + ) + ) + +(let ((v1-19 (-> *script-form* 3))) + (set! (-> v1-19 name) 'secondsf) + (set! (-> v1-19 spec) '((return macro (integer)) (function macro (symbol)) (value eval (bfloat binteger)))) + (set! (-> v1-19 func) (lambda ((arg0 script-context)) (* 300.0 (command-get-float (-> arg0 param 1) 0.0)))) + ) + +(let ((v1-21 (-> *script-form* 4))) + (set! (-> v1-21 name) 'deg) + (set! (-> v1-21 spec) '((return macro (integer)) (function macro (symbol)) (value eval (bfloat binteger)))) + (set! (-> v1-21 func) + (lambda ((arg0 script-context)) (* 182.04445 (command-get-float (-> arg0 param 1) 0.0))) + ) + ) + +(let ((v1-23 (-> *script-form* 5))) + (set! (-> v1-23 name) 'float) + (set! (-> v1-23 spec) '((return macro (float)) (function macro (symbol)) (value eval (bfloat binteger)))) + (set! (-> v1-23 func) (lambda ((arg0 script-context)) (command-get-float (-> arg0 param 1) 0.0))) + ) + +(let ((v1-25 (-> *script-form* 6))) + (set! (-> v1-25 name) 'int) + (set! (-> v1-25 spec) '((return macro (integer)) (function macro (symbol)) (value eval (bfloat binteger)))) + (set! (-> v1-25 func) (lambda ((arg0 script-context)) (command-get-int (-> arg0 param 1) 0))) + ) + +(let ((v1-27 (-> *script-form* 7))) + (set! (-> v1-27 name) 'begin) + (set! (-> v1-27 spec) '((return macro (object)) (function macro (symbol)) &rest body)) + (set! (-> v1-27 func) (lambda ((arg0 script-context)) (let ((v0-0 (the-as object #f))) + (let* ((s5-0 (-> arg0 param 1)) + (a1-0 (-> (the-as pair s5-0) car)) + ) + (while (not (null? s5-0)) + (set! v0-0 (eval! arg0 (the-as pair a1-0))) + (set! s5-0 (-> (the-as pair s5-0) cdr)) + (set! a1-0 (-> (the-as pair s5-0) car)) + ) + ) + v0-0 + ) + ) + ) + ) + +(let ((v1-29 (-> *script-form* 8))) + (set! (-> v1-29 name) 'print) + (set! (-> v1-29 spec) '((return macro (object)) (function macro (symbol)) (value eval (object)))) + (set! (-> v1-29 func) (lambda ((arg0 script-context)) (if (-> arg0 side-effect?) + (printl (-> arg0 param 1)) + (-> arg0 param 1) + ) + ) + ) + ) + +(let ((v1-31 (-> *script-form* 9))) + (set! (-> v1-31 name) 'if) + (set! (-> v1-31 spec) '((return macro (object)) + (function macro (symbol)) + (condition eval (object)) + (if macro + (object) + ) + (else + macro + (object) + #f + ) + ) + ) + (set! (-> v1-31 func) (lambda ((arg0 script-context)) (if (-> arg0 param 1) + (eval! arg0 (the-as pair (-> arg0 param 2))) + (eval! arg0 (the-as pair (-> arg0 param 3))) + ) + ) + ) + ) + +(let ((v1-33 (-> *script-form* 10))) + (set! (-> v1-33 name) 'not) + (set! (-> v1-33 spec) '((return macro (object)) (function macro (symbol)) (condition eval (object)))) + (set! (-> v1-33 func) (lambda ((arg0 script-context)) (not (-> arg0 param 1)))) + ) + +(let ((v1-35 (-> *script-form* 11))) + (set! (-> v1-35 name) 'and) + (set! (-> v1-35 spec) '((return macro (object)) (function macro (symbol)) &rest body)) + (set! (-> v1-35 func) (lambda ((arg0 script-context)) (let ((s5-0 (-> arg0 param 1)) + (v0-0 (the-as object #f)) + ) + (let ((a1-0 (-> (the-as pair s5-0) car))) + (while (not (null? s5-0)) + (set! v0-0 (eval! arg0 (the-as pair a1-0))) + (if (not v0-0) + (return #f) + ) + (set! s5-0 (-> (the-as pair s5-0) cdr)) + (set! a1-0 (-> (the-as pair s5-0) car)) + ) + ) + v0-0 + ) + ) + ) + ) + +(let ((v1-37 (-> *script-form* 12))) + (set! (-> v1-37 name) 'or) + (set! (-> v1-37 spec) '((return macro (object)) (function macro (symbol)) &rest body)) + (set! (-> v1-37 func) (lambda ((arg0 script-context)) + (let ((s5-0 (-> arg0 param 1))) + (let ((a1-0 (-> (the-as pair s5-0) car))) + (while (not (null? s5-0)) + (let ((v1-2 (eval! arg0 (the-as pair a1-0)))) + (if v1-2 + (return v1-2) + ) + ) + (set! s5-0 (-> (the-as pair s5-0) cdr)) + (set! a1-0 (-> (the-as pair s5-0) car)) + ) + ) + ) + #f + ) + ) + ) + +(let ((v1-39 (-> *script-form* 13))) + (set! (-> v1-39 name) 'when) + (set! (-> v1-39 spec) + '((return macro (object)) (function macro (symbol)) (condition eval (object)) &rest body) + ) + (set! (-> v1-39 func) (lambda ((arg0 script-context)) (let ((v0-0 (the-as object #f))) + (when (-> arg0 param 1) + (let* ((s5-0 (-> arg0 param 2)) + (a1-0 (-> (the-as pair s5-0) car)) + ) + (while (not (null? s5-0)) + (set! v0-0 (eval! arg0 (the-as pair a1-0))) + (set! s5-0 (-> (the-as pair s5-0) cdr)) + (set! a1-0 (-> (the-as pair s5-0) car)) + ) + ) + ) + v0-0 + ) + ) + ) + ) + +(let ((v1-41 (-> *script-form* 14))) + (set! (-> v1-41 name) 'unless) + (set! (-> v1-41 spec) + '((return macro (object)) (function macro (symbol)) (condition eval (object)) &rest body) + ) + (set! (-> v1-41 func) (lambda ((arg0 script-context)) (let ((v0-0 (the-as object #f))) + (when (not (-> arg0 param 1)) + (let* ((s5-0 (-> arg0 param 2)) + (a1-0 (-> (the-as pair s5-0) car)) + ) + (while (not (null? s5-0)) + (set! v0-0 (eval! arg0 (the-as pair a1-0))) + (set! s5-0 (-> (the-as pair s5-0) cdr)) + (set! a1-0 (-> (the-as pair s5-0) car)) + ) + ) + ) + v0-0 + ) + ) + ) + ) + +(let ((v1-43 (-> *script-form* 15))) + (set! (-> v1-43 name) 'cond) + (set! (-> v1-43 spec) '((return macro (object)) (function macro (symbol)) &rest body)) + (set! (-> v1-43 func) + (lambda ((arg0 script-context)) (let ((gp-0 (the-as object #f))) + (let* ((s4-0 (-> arg0 param 1)) + (s3-0 (-> (the-as pair s4-0) car)) + ) + (while (not (null? s4-0)) + (when (pair? s3-0) + (let ((a1-0 (-> (the-as pair s3-0) car))) + (when (or (= a1-0 'else) (eval! arg0 (the-as pair a1-0))) + (let* ((s4-1 (-> (the-as pair s3-0) cdr)) + (a1-1 (-> (the-as pair s4-1) car)) + ) + (while (not (null? s4-1)) + (set! gp-0 (eval! arg0 (the-as pair a1-1))) + (set! s4-1 (-> (the-as pair s4-1) cdr)) + (set! a1-1 (-> (the-as pair s4-1) car)) + ) + ) + (set! gp-0 gp-0) + (goto cfg-14) + ) + ) + ) + (set! s4-0 (-> (the-as pair s4-0) cdr)) + (set! s3-0 (-> (the-as pair s4-0) car)) + ) + ) + (label cfg-14) + gp-0 + ) + ) + ) + ) + +(let ((v1-45 (-> *script-form* 16))) + (set! (-> v1-45 name) 'case) + (set! (-> v1-45 spec) '((return macro (object)) (function macro (symbol)) (value eval (object)) &rest body)) + (set! (-> v1-45 func) + (lambda ((arg0 script-context)) + (let ((gp-0 (the-as object #f))) + (let* ((s4-0 (-> arg0 param 1)) + (s3-0 (-> arg0 param 2)) + (s2-0 (-> (the-as pair s3-0) car)) + ) + (while (not (null? s3-0)) + (when (pair? s2-0) + (let ((s1-0 (-> (the-as pair s2-0) car))) + (when (or (= s1-0 'else) (and (pair? s1-0) (member s4-0 s1-0)) (= s1-0 s4-0)) + (let* ((s4-1 (-> (the-as pair s2-0) cdr)) + (a1-1 (-> (the-as pair s4-1) car)) + ) + (while (not (null? s4-1)) + (set! gp-0 (eval! arg0 (the-as pair a1-1))) + (set! s4-1 (-> (the-as pair s4-1) cdr)) + (set! a1-1 (-> (the-as pair s4-1) car)) + ) + ) + (set! gp-0 gp-0) + (goto cfg-19) + ) + ) + ) + (set! s3-0 (-> (the-as pair s3-0) cdr)) + (set! s2-0 (-> (the-as pair s3-0) car)) + ) + ) + (label cfg-19) + gp-0 + ) + ) + ) + ) + +(let ((v1-47 (-> *script-form* 17))) + (set! (-> v1-47 name) 'set!) + (set! (-> v1-47 spec) + '((return macro (object)) (function macro (symbol)) (symbol macro (symbol)) (value eval (object))) + ) + (set! (-> v1-47 func) + (lambda ((arg0 script-context)) (when (-> arg0 side-effect?) + (let ((v0-0 (-> arg0 param 2))) + (set! (-> (the-as symbol (-> arg0 param 1)) value) v0-0) + v0-0 + ) + ) + ) + ) + ) + +(let ((v1-49 (-> *script-form* 18))) + (set! (-> v1-49 name) 'eval) + (set! (-> v1-49 spec) '((return macro (object)) (function macro (symbol)) (value eval (object)))) + (set! (-> v1-49 func) (lambda ((arg0 script-context)) (if (-> arg0 side-effect?) + (eval! arg0 (the-as pair (-> arg0 param 1))) + ) + ) + ) + ) + +(let ((v1-51 (-> *script-form* 19))) + (set! (-> v1-51 name) 'apply) + (set! (-> v1-51 spec) '((return macro (object)) (function macro (symbol)) (value eval (function)))) + (set! (-> v1-51 func) (lambda ((arg0 script-context)) (if (-> arg0 side-effect?) + ((the-as (function none) (-> arg0 param 1))) + ) + ) + ) + ) + +(let ((v1-53 (-> *script-form* 20))) + (set! (-> v1-53 name) '=) + (set! (-> v1-53 spec) + '((return macro (object)) + (function macro (symbol)) + (test1 eval (bfloat binteger)) + (test2 eval (bfloat binteger)) + ) + ) + (set! (-> v1-53 func) + (lambda ((arg0 script-context)) + (= (command-get-float (-> arg0 param 1) 0.0) (command-get-float (-> arg0 param 2) 0.0)) + ) + ) + ) + +(let ((v1-55 (-> *script-form* 21))) + (set! (-> v1-55 name) '<=) + (set! (-> v1-55 spec) + '((return macro (object)) + (function macro (symbol)) + (test1 eval (bfloat binteger)) + (test2 eval (bfloat binteger)) + ) + ) + (set! (-> v1-55 func) + (lambda ((arg0 script-context)) + (>= (command-get-float (-> arg0 param 2) 0.0) (command-get-float (-> arg0 param 1) 0.0)) + ) + ) + ) + +(let ((v1-57 (-> *script-form* 22))) + (set! (-> v1-57 name) '<) + (set! (-> v1-57 spec) + '((return macro (object)) + (function macro (symbol)) + (test1 eval (bfloat binteger)) + (test2 eval (bfloat binteger)) + ) + ) + (set! (-> v1-57 func) + (lambda ((arg0 script-context)) + (< (command-get-float (-> arg0 param 1) 0.0) (command-get-float (-> arg0 param 2) 0.0)) + ) + ) + ) + +(let ((v1-59 (-> *script-form* 23))) + (set! (-> v1-59 name) 'eq?) + (set! (-> v1-59 spec) + '((return macro (object)) (function macro (symbol)) (test1 eval (object)) (test2 eval (object))) + ) + (set! (-> v1-59 func) + (lambda ((arg0 script-context)) (let ((gp-0 (-> arg0 param 1)) + (s5-0 (-> arg0 param 2)) + ) + (if (and (type? gp-0 string) (type? s5-0 string)) + (string= (the-as string gp-0) (the-as string s5-0)) + (= gp-0 s5-0) + ) + ) + ) + ) + ) + +(let ((v1-61 (-> *script-form* 24))) + (set! (-> v1-61 name) 'unbox) + (set! (-> v1-61 spec) '((return macro (object)) (function macro (symbol)) (value eval (bfloat binteger)))) + (set! (-> v1-61 func) + (lambda ((arg0 script-context)) (the-as meters (cond + ((not (logtest? (the-as int (-> arg0 param 1)) 7)) + (/ (the-as int (-> arg0 param 1)) 8) + ) + (else + (let ((v1-3 bfloat) + (a1-0 (-> arg0 param 1)) + ) + (if (= (rtype-of a1-0) v1-3) + (-> (the-as bfloat (-> arg0 param 1)) data) + (-> arg0 param 1) + ) + ) + ) + ) + ) + ) + ) + ) + +(let ((v1-63 (-> *script-form* 25))) + (set! (-> v1-63 name) 'static-vectorm) + (set! (-> v1-63 spec) + '((return macro (vector)) + (function macro (symbol)) + (x eval (bfloat binteger)) + (y eval (bfloat binteger)) + (z eval (bfloat binteger)) + ) + ) + (set! (-> v1-63 func) + (lambda ((arg0 script-context)) (let ((s5-0 (new 'static 'vector))) + (set-vector! + s5-0 + (* 4096.0 (command-get-float (-> arg0 param 1) 0.0)) + (* 4096.0 (command-get-float (-> arg0 param 2) 0.0)) + (* 4096.0 (command-get-float (-> arg0 param 3) 0.0)) + 1.0 + ) + s5-0 + ) + ) + ) + ) + +(defun level-from-heap ((arg0 int)) + (dotimes (v1-0 (-> *level* length)) + (let ((a1-3 (-> *level* level v1-0))) + (when (= (-> a1-3 status) 'active) + (let ((a3-1 (-> a1-3 heap base)) + (a2-3 (-> a1-3 heap top-base)) + ) + (if (and (>= arg0 (the-as int a3-1)) (< arg0 (the-as int a2-3))) + (return a1-3) + ) + ) + ) + ) + ) + (the-as level #f) + ) + +(let ((v1-66 (-> *script-form* 26))) + (set! (-> v1-66 name) 'level-status?) + (set! (-> v1-66 spec) '((return macro (symbol)) (function macro (symbol)) (level eval (symbol)))) + (set! (-> v1-66 func) + (lambda ((arg0 script-context)) (status-of-level-and-borrows *level* (the-as symbol (-> arg0 param 1)) #f)) + ) + ) + +(let ((v1-68 (-> *script-form* 27))) + (set! (-> v1-68 name) 'want-vis) + (set! (-> v1-68 spec) '((return macro (none)) (function macro (symbol)) (level eval (symbol)))) + (set! (-> v1-68 func) + (lambda ((arg0 script-context)) (if (and (-> arg0 side-effect?) (-> *level* border?)) + (want-vis-level (-> arg0 load-state) (the-as symbol (-> arg0 param 1))) + ) + ) + ) + ) + +(let ((v1-70 (-> *script-form* 28))) + (set! (-> v1-70 name) 'want-load) + (set! (-> v1-70 spec) '((return macro (none)) (function macro (symbol)) &rest levels)) + (set! (-> v1-70 func) + (lambda ((arg0 script-context)) + (let ((s5-0 10) + (a0-1 (-> arg0 param 1)) + ) + (cond + ((>= s5-0 ((method-of-type (rtype-of a0-1) length) a0-1)) + (when (and (-> arg0 side-effect?) + (-> *level* border?) + (is-load-allowed? *level* (the-as (pointer symbol) (level-from-heap (the-as int (-> arg0 key))))) + ) + (let ((s5-2 (new 'static 'boxed-array :type symbol :length 0 :allocated-length 10))) + (dotimes (s4-1 10) + (let ((a1-4 (ref (-> arg0 param 1) s4-1))) + (set! (-> s5-2 s4-1) (the-as symbol (if (not (null? a1-4)) + (eval! arg0 (the-as pair a1-4)) + ) + ) + ) + ) + ) + (want-levels (-> arg0 load-state) (-> s5-2 data)) + ) + ) + ) + (else + (format 0 "ERROR: SCRIPT: got too many params to want-load ~A~%" (-> arg0 param 1)) + (set! (-> arg0 got-error?) #t) + ) + ) + ) + 0 + ) + ) + ) + +(let ((v1-72 (-> *script-form* 29))) + (set! (-> v1-72 name) 'want-sound) + (set! (-> v1-72 spec) '((return macro (none)) (function macro (symbol)) &rest sounds)) + (set! (-> v1-72 func) + (lambda ((arg0 script-context)) + (let ((s5-0 3) + (a0-1 (-> arg0 param 1)) + ) + (cond + ((>= s5-0 ((method-of-type (rtype-of a0-1) length) a0-1)) + (when (and (-> arg0 side-effect?) + (-> *level* border?) + (is-load-allowed? *level* (the-as (pointer symbol) (level-from-heap (the-as int (-> arg0 key))))) + ) + (let ((s5-2 (new 'static 'boxed-array :type symbol :length 0 :allocated-length 3))) + (dotimes (s4-1 3) + (let ((a1-4 (ref (-> arg0 param 1) s4-1))) + (set! (-> s5-2 s4-1) (the-as symbol (if (not (null? a1-4)) + (eval! arg0 (the-as pair a1-4)) + ) + ) + ) + ) + ) + (want-sound-banks (-> arg0 load-state) (-> s5-2 data)) + ) + ) + ) + (else + (format 0 "ERROR: SCRIPT: got too many params to want-sound ~A~%" (-> arg0 param 1)) + (set! (-> arg0 got-error?) #t) + ) + ) + ) + 0 + ) + ) + ) + +(let ((v1-74 (-> *script-form* 30))) + (set! (-> v1-74 name) 'want-display) + (set! (-> v1-74 spec) + '((return macro (none)) (function macro (symbol)) (level eval (symbol)) (mode eval (symbol) display)) + ) + (set! (-> v1-74 func) + (lambda ((arg0 script-context)) + (if (and (-> arg0 side-effect?) + (-> *level* border?) + (is-load-allowed? *level* (the-as (pointer symbol) (level-from-heap (the-as int (-> arg0 key))))) + ) + (want-display-level (-> arg0 load-state) (the-as symbol (-> arg0 param 1)) (the-as symbol (-> arg0 param 2))) + ) + 0 + ) + ) + ) + +(let ((v1-76 (-> *script-form* 31))) + (set! (-> v1-76 name) 'want-force-vis) + (set! (-> v1-76 spec) + '((return macro (none)) (function macro (symbol)) (level eval (symbol)) (mode eval (symbol) #t)) + ) + (set! (-> v1-76 func) + (lambda ((arg0 script-context)) + (if (and (-> arg0 side-effect?) (-> *level* border?)) + (want-force-vis (-> arg0 load-state) (the-as symbol (-> arg0 param 1)) (the-as symbol (-> arg0 param 2))) + ) + 0 + ) + ) + ) + +(let ((v1-78 (-> *script-form* 32))) + (set! (-> v1-78 name) 'want-force-inside) + (set! (-> v1-78 spec) + '((return macro (none)) (function macro (symbol)) (level eval (symbol)) (mode eval (symbol) #t)) + ) + (set! (-> v1-78 func) + (lambda ((arg0 script-context)) + (if (and (-> arg0 side-effect?) (-> *level* border?)) + (want-force-inside (-> arg0 load-state) (the-as symbol (-> arg0 param 1)) (the-as symbol (-> arg0 param 2))) + ) + 0 + ) + ) + ) + +(let ((v1-80 (-> *script-form* 33))) + (set! (-> v1-80 name) 'want-continue) + (set! (-> v1-80 spec) '((return macro (none)) (function macro (symbol)) (continue-point eval (string)))) + (set! (-> v1-80 func) (lambda ((arg0 script-context)) + (when (and (-> arg0 side-effect?) (-> *setting-control* user-current allow-continue)) + (set-continue! *game-info* (the-as basic (-> arg0 param 1)) #f) + (send-event *target* 'want-continue (-> arg0 param 1)) + ) + 0 + ) + ) + ) + +(let ((v1-82 (-> *script-form* 34))) + (set! (-> v1-82 name) 'want-vehicle) + (set! (-> v1-82 spec) + '((return macro (none)) (function macro (symbol)) (vehicle eval (string)) &key (force eval (symbol) #t)) + ) + (set! (-> v1-82 func) + (lambda ((arg0 script-context)) + (when (-> arg0 side-effect?) + (if (and (not (-> arg0 param 2)) (= (-> *game-info* current-vehicle) 27)) + (return (the-as object 0)) + ) + (let ((gp-0 (-> arg0 param 1))) + (cond + ((string= (the-as string gp-0) "turtle") + (set! (-> *game-info* current-vehicle) (game-vehicle-u8 v-scorpion v-toad)) + ) + ((string= (the-as string gp-0) "scorpion") + (set! (-> *game-info* current-vehicle) (game-vehicle-u8 v-snake v-scorpion v-toad)) + ) + ((string= (the-as string gp-0) "toad") + (set! (-> *game-info* current-vehicle) (game-vehicle-u8 v-turtle v-snake v-scorpion v-toad)) + ) + ((string= (the-as string gp-0) "snake") + (set! (-> *game-info* current-vehicle) (game-vehicle-u8 v-turtle v-scorpion v-toad)) + ) + ((string= (the-as string gp-0) "rhino") + (set! (-> *game-info* current-vehicle) (game-vehicle-u8 v-turtle v-fox)) + ) + ((string= (the-as string gp-0) "fox") + (set! (-> *game-info* current-vehicle) (game-vehicle-u8 v-fox)) + ) + ((string= (the-as string gp-0) "mirage") + (set! (-> *game-info* current-vehicle) (game-vehicle-u8 v-snake v-fox)) + ) + ((string= (the-as string gp-0) "x-ride") + (set! (-> *game-info* current-vehicle) (game-vehicle-u8 v-turtle v-snake v-fox)) + ) + ) + ) + ) + 0 + ) + ) + ) + +(let ((v1-84 (-> *script-form* 35))) + (set! (-> v1-84 name) 'want-anim) + (set! (-> v1-84 spec) '((return macro (none)) (function macro (symbol)) (name eval (string)))) + (set! (-> v1-84 func) (lambda ((arg0 script-context)) + "we want to preload this anim." + (if (-> arg0 side-effect?) + (gui-control-method-12 + *gui-control* + (-> arg0 process) + (gui-channel art-load) + (gui-action queue) + (the-as string (-> arg0 param 1)) + 0 + -1.0 + (new 'static 'sound-id) + ) + ) + 0 + ) + ) + ) + +(let ((v1-86 (-> *script-form* 36))) + (set! (-> v1-86 name) 'send-event) + (set! (-> v1-86 spec) + '((return macro (object)) + (function macro (symbol)) + (target eval (string symbol process entity-actor actor-group #f binteger)) + (message eval (symbol)) + &rest + params + ) + ) + (set! (-> v1-86 func) + (lambda ((arg0 script-context)) + (local-vars (sv-96 (function script-context pair object))) + (when (-> arg0 side-effect?) + (let ((gp-0 (command-get-process (-> arg0 param 1) (the-as process #f))) + (s5-0 (new 'stack-no-clear 'event-message-block)) + (s2-0 (-> arg0 param 3)) + (s4-0 (the-as object #f)) + ) + (when gp-0 + (set! (-> s5-0 from) (process->ppointer (-> arg0 process))) + (set! (-> s5-0 message) (the-as symbol (-> arg0 param 2))) + (let ((a0-3 s2-0)) + (set! (-> s5-0 num-params) ((method-of-type (rtype-of a0-3) length) a0-3)) + ) + (dotimes (s1-0 (-> s5-0 num-params)) + (let ((s0-0 arg0)) + (set! sv-96 (method-of-type script-context eval!)) + (let ((a1-4 (ref s2-0 s1-0))) + (set! (-> s5-0 param s1-0) (the-as uint (sv-96 s0-0 (the-as pair a1-4)))) + ) + ) + ) + (cond + ((= (-> gp-0 type) actor-group) + (dotimes (s3-1 (the-as int (-> gp-0 name))) + (let ((t9-4 send-event-function) + (v1-18 (the-as object (-> (the-as (pointer uint32) (+ (+ (* s3-1 8) 12) (the-as int gp-0)))))) + ) + (set! s4-0 (t9-4 + (if (the-as uint v1-18) + (-> (the-as process v1-18) child 3) + ) + s5-0 + ) + ) + ) + ) + ) + (else + (set! s4-0 (send-event-function gp-0 s5-0)) + ) + ) + ) + s4-0 + ) + ) + ) + ) + ) + +(let ((v1-88 (-> *script-form* 37))) + (set! (-> v1-88 name) 'send-event-attack) + (set! (-> v1-88 spec) + '((return macro (object)) + (function macro (symbol)) + (target eval (string process entity-actor actor-group #f binteger)) + (none macro (object)) + &key + (mode eval (symbol) generic) + (message eval (symbol) attack) + ) + ) + (set! (-> v1-88 func) + (lambda ((arg0 script-context)) + (with-pp + (when (-> arg0 side-effect?) + (let ((s5-0 (command-get-process (-> arg0 param 1) (the-as process #f))) + (v0-0 (the-as object #f)) + ) + (when s5-0 + (cond + ((= (-> s5-0 type) actor-group) + (dotimes (s4-0 (the-as int (-> s5-0 name))) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer pp)) + (set! (-> a1-1 num-params) 2) + (set! (-> a1-1 message) (the-as symbol (-> arg0 param 4))) + (set! (-> a1-1 param 0) (the-as uint #f)) + (set! (-> a1-1 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) + (mode (the-as symbol (-> arg0 param 3))) + ) + ) + ) + ) + (let ((t9-1 send-event-function) + (v1-10 (the-as object (-> (the-as (pointer uint32) (+ (+ (* s4-0 8) 12) (the-as int s5-0)))))) + ) + (set! v0-0 (t9-1 + (if (the-as uint v1-10) + (-> (the-as process v1-10) child 3) + ) + a1-1 + ) + ) + ) + ) + ) + ) + (else + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer pp)) + (set! (-> a1-2 num-params) 2) + (set! (-> a1-2 message) (the-as symbol (-> arg0 param 4))) + (set! (-> a1-2 param 0) (the-as uint #f)) + (set! (-> a1-2 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) + (mode (the-as symbol (-> arg0 param 3))) + ) + ) + ) + ) + (set! v0-0 (send-event-function s5-0 a1-2)) + ) + ) + ) + ) + v0-0 + ) + ) + ) + ) + ) + ) + +(let ((v1-90 (-> *script-form* 38))) + (set! (-> v1-90 name) 'focus-test?) + (set! (-> v1-90 spec) + '((return macro (symbol)) + (function macro (symbol)) + (target eval (string process entity-actor actor-group #f binteger)) + &rest + params + ) + ) + (set! (-> v1-90 func) + (lambda ((arg0 script-context)) + (let* ((s4-0 (command-get-process (-> arg0 param 1) (the-as process #f))) + (gp-0 (if (type? s4-0 process-focusable) + (the-as process-focusable s4-0) + ) + ) + ) + (when gp-0 + (let* ((s5-1 (-> arg0 param 2)) + (v1-0 (-> (the-as pair s5-1) car)) + ) + (while (not (null? s5-1)) + (cond + ((logtest? (the-as int v1-0) 1) + (cond + ((= v1-0 'board) + (if (focus-test? gp-0 board) + (return #t) + ) + ) + ((= v1-0 'gun) + (if (focus-test? gp-0 gun) + (return #t) + ) + ) + ((= v1-0 'mech) + (if (focus-test? gp-0 mech) + (return #t) + ) + ) + ((= v1-0 'pilot) + (if (focus-test? gp-0 pilot) + (return #t) + ) + ) + ((= v1-0 'grabbed) + (if (focus-test? gp-0 grabbed) + (return #t) + ) + ) + ((= v1-0 'indax) + (if (focus-test? gp-0 indax) + (return #t) + ) + ) + ((= v1-0 'hang) + (if (and (= (-> gp-0 type) target) (logtest? (state-flags sf26) (-> gp-0 state-flags))) + (return #t) + ) + ) + ((= v1-0 'flut) + (if (focus-test? gp-0 flut) + (return #t) + ) + ) + ((= v1-0 'dark) + (if (focus-test? gp-0 dark) + (return #t) + ) + ) + ((= v1-0 'light) + (if (focus-test? gp-0 light) + (return #t) + ) + ) + ((= v1-0 'tube) + (if (focus-test? gp-0 tube) + (return #t) + ) + ) + ((= v1-0 'invisible) + (if (and (= (-> gp-0 type) target) (logtest? (state-flags sf28) (-> gp-0 state-flags))) + (return #t) + ) + ) + ) + ) + (else + (format 0 "ERROR: SCRIPT: param bit = ~A is type ~A, needed type ~A.~%" v1-0 (rtype-of v1-0) 'symbol) + ) + ) + (set! s5-1 (-> (the-as pair s5-1) cdr)) + (set! v1-0 (-> (the-as pair s5-1) car)) + ) + ) + #f + ) + ) + ) + ) + ) + +(let ((v1-92 (-> *script-form* 39))) + (set! (-> v1-92 name) 'game-feature!) + (set! (-> v1-92 spec) + '((return macro (none)) (function macro (symbol)) (feature macro (symbol)) (value eval (symbol))) + ) + (set! (-> v1-92 func) (lambda ((arg0 script-context)) + (case (-> arg0 param 1) + (('board) + (if (-> arg0 param 2) + (logior! (-> *game-info* features) (game-feature board)) + (logclear! (-> *game-info* features) (game-feature board)) + ) + ) + (else + (format 0 "ERROR: SCRIPT: unknown feature type ~A~%" (-> arg0 param 1)) + ) + ) + (the-as symbol 0) + ) + ) + ) + +(let ((v1-94 (-> *script-form* 40))) + (set! (-> v1-94 name) 'game-feature?) + (set! (-> v1-94 spec) '((return macro (boolean)) (function macro (symbol)) (feature macro (symbol)))) + (set! (-> v1-94 func) + (lambda ((arg0 script-context)) (case (-> arg0 param 1) + (('board) + (logtest? (game-feature board) (-> *game-info* features)) + ) + (else + (format 0 "ERROR: SCRIPT: unknown feature type ~A~%" (-> arg0 param 1)) + #f + ) + ) + ) + ) + ) + +(let ((v1-96 (-> *script-form* 41))) + (set! (-> v1-96 name) 'entity-status?) + (set! (-> v1-96 spec) + '((return macro (symbol)) + (function macro (symbol)) + (target eval (string process entity-actor actor-group #f binteger)) + &rest + params + ) + ) + (set! (-> v1-96 func) + (lambda ((arg0 script-context)) + (let ((v1-0 (command-get-entity (-> arg0 param 1) (the-as entity #f)))) + (when v1-0 + (let* ((gp-1 (-> arg0 param 2)) + (s5-0 (-> v1-0 extra perm status)) + (v1-2 (-> (the-as pair gp-1) car)) + ) + (while (not (null? gp-1)) + (cond + ((logtest? (the-as int v1-2) 1) + (cond + ((or (= v1-2 'no-birth) (= v1-2 'dead)) + (if (logtest? s5-0 (entity-perm-status dead)) + (return #t) + ) + ) + ((= v1-2 'subtask-complete) + (if (logtest? s5-0 (entity-perm-status subtask-complete bit-12)) + (return #t) + ) + ) + ) + ) + (else + (format 0 "ERROR: SCRIPT: param bit = ~A is type ~A, needed type ~A.~%" v1-2 (rtype-of v1-2) 'symbol) + ) + ) + (set! gp-1 (-> (the-as pair gp-1) cdr)) + (set! v1-2 (-> (the-as pair gp-1) car)) + ) + ) + #f + ) + ) + ) + ) + ) + +(let ((v1-98 (-> *script-form* 42))) + (set! (-> v1-98 name) 'entity-status!) + (set! (-> v1-98 spec) + '((return macro (none)) + (function macro (symbol)) + (target eval (string process entity-actor actor-group #f binteger)) + (value eval (symbol)) + &rest + params + ) + ) + (set! (-> v1-98 func) + (lambda ((arg0 script-context)) + (let ((s5-0 (command-get-entity (-> arg0 param 1) (the-as entity #f)))) + (when s5-0 + (let ((s4-0 (-> arg0 param 3))) + (-> s5-0 extra perm status) + (let ((v1-3 (-> (the-as pair s4-0) car))) + (while (not (null? s4-0)) + (cond + ((logtest? (the-as int v1-3) 1) + (if (= v1-3 'subtask-complete) + (toggle-status + (the-as entity-actor s5-0) + (entity-perm-status subtask-complete) + (the-as symbol (-> arg0 param 2)) + ) + ) + ) + (else + (format 0 "ERROR: SCRIPT: param bit = ~A is type ~A, needed type ~A.~%" v1-3 (rtype-of v1-3) 'symbol) + ) + ) + (set! s4-0 (-> (the-as pair s4-0) cdr)) + (set! v1-3 (-> (the-as pair s4-0) car)) + ) + ) + ) + ) + ) + 0 + ) + ) + ) + +(let ((v1-100 (-> *script-form* 43))) + (set! (-> v1-100 name) 'setting-set) + (set! (-> v1-100 spec) '((return macro (none)) + (function macro (symbol)) + (setting macro (symbol)) + &key + (mode eval (object)) + (value eval (bfloat)) + (mask eval (binteger)) + ) + ) + (set! (-> v1-100 func) (lambda ((arg0 script-context)) + " + '(setting-set bg-a :mode 'abs :value 1.0) + " + (if (-> arg0 side-effect?) + (add-setting + *setting-control* + (-> arg0 process) + (the-as symbol (-> arg0 param 1)) + (-> arg0 param 2) + (command-get-float (-> arg0 param 3) 0.0) + (command-get-int (-> arg0 param 4) 0) + ) + ) + ) + ) + ) + +(let ((v1-102 (-> *script-form* 44))) + (set! (-> v1-102 name) 'setting-reset) + (set! (-> v1-102 spec) '((return macro (none)) + (function macro (symbol)) + (setting macro (symbol)) + &key + (mode eval (object)) + (value eval (bfloat)) + (mask eval (binteger)) + ) + ) + (set! (-> v1-102 func) (lambda ((arg0 script-context)) (if (-> arg0 side-effect?) + (set-setting + *setting-control* + (-> arg0 process) + (the-as symbol (-> arg0 param 1)) + (-> arg0 param 2) + (command-get-float (-> arg0 param 3) 0.0) + (command-get-int (-> arg0 param 4) 0) + ) + ) + ) + ) + ) + +(let ((v1-104 (-> *script-form* 45))) + (set! (-> v1-104 name) 'setting-pers) + (set! (-> v1-104 spec) + '((return macro (none)) + (function macro (symbol)) + (setting macro (symbol)) + &key + (mode eval (object) #f) + (value macro (bfloat pair) (new 'static 'bfloat)) + (mask eval (binteger) 0) + (time macro (pair) 0) + ) + ) + (set! (-> v1-104 func) + (lambda ((arg0 script-context)) + " + (setting-pers ambient-volume :mode 'rel :value 0.5) + " + (local-vars (sv-16 pair) (sv-24 object) (sv-32 float) (sv-48 float)) + (when (-> arg0 side-effect?) + (set! sv-16 (-> arg0 expr)) + (set! sv-24 (eval! arg0 (the-as pair (-> arg0 param 5)))) + (set! sv-32 (the-as float (if (pair? (-> arg0 param 3)) + (eval! arg0 (the-as pair (-> arg0 param 3))) + (command-get-float (-> arg0 param 3) 0.0) + ) + ) + ) + (let* ((s5-0 *setting-control*) + (s4-0 (method-of-object s5-0 persist-with-delay)) + (s3-0 sv-16) + (s2-0 sv-24) + (s1-0 (-> arg0 param 1)) + (s0-0 (-> arg0 param 2)) + ) + (set! sv-48 sv-32) + (let ((t2-0 (command-get-int (-> arg0 param 4) 0))) + (s4-0 s5-0 (the-as symbol s3-0) (the-as time-frame s2-0) (the-as symbol s1-0) (the-as symbol s0-0) sv-48 t2-0) + ) + ) + ) + ) + ) + ) + +(let ((v1-106 (-> *script-form* 46))) + (set! (-> v1-106 name) 'setting-unset) + (set! (-> v1-106 spec) '((return macro (none)) (function macro (symbol)) (setting macro (symbol)))) + (set! (-> v1-106 func) + (lambda ((arg0 script-context)) + (if (-> arg0 side-effect?) + (remove-setting *setting-control* (-> arg0 process) (the-as symbol (-> arg0 param 1))) + ) + ) + ) + ) + +(let ((v1-108 (-> *script-form* 47))) + (set! (-> v1-108 name) 'setting-value) + (set! (-> v1-108 spec) + '((return macro (object)) + (function macro (symbol)) + (setting macro (symbol)) + &key + (min eval (bfloat binteger) (new 'static 'bfloat)) + (max eval (bfloat binteger) (new 'static 'bfloat :data 1.0)) + ) + ) + (set! (-> v1-108 func) + (lambda ((arg0 script-context)) + "return the value of a setting." + (case (-> arg0 param 1) + (('entity-name) + (-> *setting-control* cam-current entity-name) + ) + (('airlock) + (-> *setting-control* user-current airlock) + ) + (('dynamic-ambient-volume) + (let ((s5-0 (the-as object (new 'static 'bfloat)))) + (let ((f30-0 (-> *setting-control* user-current dynamic-ambient-volume))) + (set! (-> (the-as bfloat s5-0) data) + (lerp-scale (command-get-float (-> arg0 param 2) 0.0) (command-get-float (-> arg0 param 3) 0.0) f30-0 0.0 1.0) + ) + ) + s5-0 + ) + ) + (('exclusive-task) + (* (-> *setting-control* user-current exclusive-task 0) 8) + ) + ) + ) + ) + ) + +(let ((v1-110 (-> *script-form* 48))) + (set! (-> v1-110 name) 'setting-update) + (set! (-> v1-110 spec) '((return macro (none)) (function macro (symbol)))) + (set! (-> v1-110 func) (lambda ((arg0 script-context)) + "update settings" + (if (-> arg0 side-effect?) + (apply-settings *setting-control*) + ) + 0 + ) + ) + ) + +(let ((v1-112 (-> *script-form* 49))) + (set! (-> v1-112 name) 'sound-play) + (set! (-> v1-112 spec) '((return macro (none)) + (function macro (symbol)) + (name eval (string)) + &key + (volume eval (bfloat binteger) (new 'static 'bfloat :data 1.0)) + (pitch-mod eval (bfloat binteger) (new 'static 'bfloat)) + (bend eval (bfloat binteger) (new 'static 'bfloat)) + (trans eval (vector) #f) + (ground-effect (symbol) #t) + ) + ) + (set! (-> v1-112 func) (lambda ((arg0 script-context)) + (when (-> arg0 side-effect?) + (let ((s5-0 sound-play-by-name) + (s4-0 (string->sound-name (the-as string (-> arg0 param 1)))) + (s3-0 (new-sound-id)) + (s2-0 (the int (* 1024.0 (command-get-float (-> arg0 param 2) 0.0)))) + (s1-0 (the int (* 1524.0 (command-get-float (-> arg0 param 3) 0.0)))) + (t0-0 (the int (* 327.66998 (command-get-float (-> arg0 param 4) 0.0)))) + (t1-0 0) + (t2-0 (-> arg0 param 5)) + ) + (set! t2-0 (cond + (t2-0 + (empty) + t2-0 + ) + (else + (-> arg0 trans) + ) + ) + ) + (s5-0 s4-0 s3-0 s2-0 s1-0 t0-0 (the-as sound-group t1-0) t2-0) + ) + ) + ) + ) + ) + +(let ((v1-114 (-> *script-form* 50))) + (set! (-> v1-114 name) 'sound-play-loop) + (set! (-> v1-114 spec) + '((return macro (none)) + (function macro (symbol)) + (name eval (string)) + &key + (volume eval (bfloat binteger) (new 'static 'bfloat :data 1.0)) + (pitch-mod eval (bfloat binteger) (new 'static 'bfloat)) + (bend eval (bfloat binteger) (new 'static 'bfloat)) + (trans eval (vector) #f) + ) + ) + (set! (-> v1-114 func) + (lambda ((arg0 script-context)) + (when (-> arg0 side-effect?) + (let ((s3-0 (schedule-callback *sound-loop-engine* (-> arg0 expr) 0))) + (when s3-0 + (if (zero? (-> s3-0 param-int64 0)) + (set! (-> s3-0 param-int64 0) (the-as int (new-sound-id))) + ) + (let ((s5-0 sound-play-by-name) + (s4-0 (string->sound-name (the-as string (-> arg0 param 1)))) + (s3-1 (-> s3-0 param-int64 0)) + (s2-0 (the int (* 1024.0 (command-get-float (-> arg0 param 2) 0.0)))) + (a3-0 (the int (* 1524.0 (command-get-float (-> arg0 param 3) 0.0)))) + (t0-0 0) + (t1-0 0) + (t2-0 (-> arg0 param 5)) + ) + (set! t2-0 (cond + (t2-0 + (empty) + t2-0 + ) + (else + (-> arg0 trans) + ) + ) + ) + (s5-0 s4-0 (the-as sound-id s3-1) s2-0 a3-0 t0-0 (the-as sound-group t1-0) t2-0) + ) + ) + ) + ) + ) + ) + ) + +(let ((v1-116 (-> *script-form* 51))) + (set! (-> v1-116 name) 'blackout) + (set! (-> v1-116 spec) '((return macro (none)) (function macro (symbol)) (time macro (binteger bfloat pair)))) + (set! (-> v1-116 func) + (lambda ((arg0 script-context)) + (when (-> arg0 side-effect?) + (let ((a2-0 (if (pair? (-> arg0 param 1)) + (the-as int (command-get-time (-> arg0 param 1) 1)) + (the int (* 5.0000005 (the float (command-get-int (-> arg0 param 1) 0)))) + ) + ) + ) + (persist-with-delay *setting-control* 'blackout (the-as time-frame a2-0) 'bg-a-force 'abs 1.0 0) + ) + ) + ) + ) + ) + +(let ((v1-118 (-> *script-form* 52))) + (set! (-> v1-118 name) 'fadeout) + (set! (-> v1-118 spec) '((return macro (none)) (function macro (symbol)) (time macro (binteger bfloat pair)))) + (set! (-> v1-118 func) + (lambda ((arg0 script-context)) + (when (-> arg0 side-effect?) + (let ((gp-0 (command-get-time (-> arg0 param 1) 1))) + (persist-with-delay + *setting-control* + 'bg-a-speed + (+ gp-0 (seconds 1)) + 'bg-a-speed + 'abs + (/ 300.0 (the float gp-0)) + 0 + ) + (persist-with-delay *setting-control* 'bg-a (+ gp-0 (seconds 1)) 'bg-a 'abs 1.0 0) + ) + ) + 0 + ) + ) + ) + +(let ((v1-120 (-> *script-form* 53))) + (set! (-> v1-120 name) 'fadein) + (set! (-> v1-120 spec) '((return macro (none)) (function macro (symbol)) (time macro (binteger bfloat pair)))) + (set! (-> v1-120 func) (lambda ((arg0 script-context)) + (when (-> arg0 side-effect?) + (let ((gp-0 (command-get-time (-> arg0 param 1) 1))) + (set! (-> *setting-control* user-current bg-a) 1.0) + (apply-settings *setting-control*) + (persist-with-delay + *setting-control* + 'bg-a-speed + (+ gp-0 (seconds 1)) + 'bg-a-speed + 'abs + (/ 300.0 (the float gp-0)) + 0 + ) + ) + ) + 0 + ) + ) + ) + +(let ((v1-122 (-> *script-form* 54))) + (set! (-> v1-122 name) 'time-of-day) + (set! (-> v1-122 spec) '((return macro (none)) (function macro (symbol)) (value eval (binteger bfloat)))) + (set! (-> v1-122 func) + (lambda ((arg0 script-context)) (when (-> arg0 side-effect?) + (let ((v1-1 (command-get-int (-> arg0 param 1) 0))) + (cond + ((< v1-1 0) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 1.0) + ) + (else + (send-event (ppointer->process *time-of-day*) 'change 'hour v1-1) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + ) + ) + ) + ) + ) + ) + ) + +(let ((v1-124 (-> *script-form* 55))) + (set! (-> v1-124 name) 'time-of-day?) + (set! (-> v1-124 spec) '((return macro (boolean)) (function macro (symbol)) (value macro (symbol)))) + (set! (-> v1-124 func) + (lambda ((arg0 script-context)) + (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) 'hour) + (let ((v1-4 (send-event-function (ppointer->process *time-of-day*) a1-0))) + (case (-> arg0 param 1) + (('night) + (or (>= (the-as int v1-4) 18) (< (the-as int v1-4) 6)) + ) + (('day) + (and (>= (the-as int v1-4) 6) (< (the-as int v1-4) 18)) + ) + (('dawn) + (and (>= (the-as int v1-4) 4) (< (the-as int v1-4) 7)) + ) + (('dusk) + (and (>= (the-as int v1-4) 16) (< (the-as int v1-4) 19)) + ) + (else + (format 0 "ERROR: SCRIPT: unknown time-of-day? test '~A'~%" (-> arg0 param 1)) + ) + ) + ) + ) + ) + ) + ) + ) + +(let ((v1-126 (-> *script-form* 56))) + (set! (-> v1-126 name) 'region-prim) + (set! (-> v1-126 spec) + '((return macro (drawable-region-prim)) (function macro (symbol)) (id eval (binteger))) + ) + (set! (-> v1-126 func) (lambda ((arg0 script-context)) + "lookup a region by number and return the region-prim." + (region-prim-lookup-by-id (command-get-int (-> arg0 param 1) 0) #f 0) + ) + ) + ) + +(let ((v1-128 (-> *script-form* 57))) + (set! (-> v1-128 name) 'region) + (set! (-> v1-128 spec) + '((return macro (drawable-region-prim)) (function macro (symbol)) (id eval (binteger))) + ) + (set! (-> v1-128 func) (lambda ((arg0 script-context)) + "lookup a region by number and return the region-prim." + (region-lookup-by-id (command-get-int (-> arg0 param 1) 0)) + ) + ) + ) + +(let ((v1-130 (-> *script-form* 58))) + (set! (-> v1-130 name) 'part-tracker) + (set! (-> v1-130 spec) + '((return macro (none)) + (function macro (symbol)) + (name eval (string)) + &key + (entity eval (string process entity-actor drawable-region-prim #f) #f) + (joint eval (string) #f) + (track eval (symbol) #f) + (duration macro (object) 0) + (subsample-num eval (binteger bfloat) (new 'static 'bfloat)) + (parent eval (symbol) unknown) + ) + ) + (set! (-> v1-130 func) + (lambda ((arg0 script-context)) + " spawn a part tracker. If the :entity is given, do it at that process's location. Otherwise use the (-> context process), if not that then the (-> context trans). + " + (local-vars + (a1-17 process-tree) + (a1-21 process-tree) + (sv-80 sparticle-launch-group) + (sv-84 process) + (sv-88 entity) + (sv-92 drawable-region-prim) + (sv-96 matrix) + (sv-104 int) + (sv-112 object) + (sv-120 time-frame) + ) + (the-as + symbol + (when (-> arg0 side-effect?) + (if (not (-> arg0 param 2)) + (set! (-> arg0 param 2) (-> arg0 process)) + ) + (set! sv-80 (if (type? (-> arg0 param 1) string) + (lookup-part-group-by-name (the-as string (-> arg0 param 1))) + (the-as sparticle-launch-group #f) + ) + ) + (let ((gp-0 (command-get-process (-> arg0 param 2) (the-as process #f)))) + (set! sv-84 (if (type? gp-0 process-drawable) + gp-0 + ) + ) + ) + (set! sv-88 (the-as entity #f)) + (set! sv-92 (the-as drawable-region-prim #f)) + (set! sv-96 (matrix-identity! (new 'stack-no-clear 'matrix))) + (set! sv-104 0) + (set! sv-112 (-> arg0 param 4)) + (set! sv-120 (command-get-time (-> arg0 param 5) 1)) + (let* ((s4-0 sv-80) + (gp-1 (if (type? s4-0 sparticle-launch-group) + s4-0 + ) + ) + (v1-8 (-> arg0 param 2)) + (s4-1 (and (= (rtype-of v1-8) string) (string= (the-as string (-> arg0 param 2)) "zero"))) + ) + (cond + (gp-1 + (when (not sv-84) + (set! sv-112 #f) + (set! sv-88 (command-get-entity (-> arg0 param 2) (the-as entity #f))) + (when (not sv-88) + (let ((s3-0 (-> arg0 param 2))) + (set! sv-92 (if (type? s3-0 drawable-region-prim) + (the-as drawable-region-prim s3-0) + ) + ) + ) + ) + ) + (if (and (not sv-84) (and (not sv-88) (-> arg0 param 2) (not s4-1))) + (format 0 "ERROR: SCRIPT: part-tracker: unknown entity ~A in:~%~T~A~%" (-> arg0 param 2) (-> arg0 expr)) + ) + (when (or sv-84 sv-88 sv-92 (-> arg0 trans) s4-1) + (cond + ((and sv-84 (nonzero? (-> (the-as process-drawable sv-84) root))) + (let ((a1-10 (-> arg0 param 3))) + (cond + (a1-10 + (let ((v1-33 + (if (nonzero? (-> (the-as process-drawable sv-84) draw)) + (the-as + joint + (get-art-by-name-method (-> (the-as process-drawable sv-84) draw jgeo) (the-as string a1-10) (the-as type #f)) + ) + ) + ) + ) + (cond + (v1-33 + (set! sv-104 (+ (-> v1-33 number) 1)) + (let ((a1-11 (-> (the-as process-drawable sv-84) node-list data sv-104))) + (let* ((v1-42 sv-96) + (t0-0 (-> a1-11 bone transform)) + (a0-22 (-> t0-0 rvec quad)) + (a2-2 (-> t0-0 uvec quad)) + (a3-1 (-> t0-0 fvec quad)) + (t0-1 (-> t0-0 trans quad)) + ) + (set! (-> v1-42 rvec quad) a0-22) + (set! (-> v1-42 uvec quad) a2-2) + (set! (-> v1-42 fvec quad) a3-1) + (set! (-> v1-42 trans quad) t0-1) + ) + (vector<-cspace! (-> sv-96 trans) a1-11) + ) + ) + (else + (format 0 "ERROR: SCRIPT: part-tracker: unknown joint ~A in:~%~T~A~%" (-> arg0 param 3) (-> arg0 expr)) + (set! (-> sv-96 trans quad) (-> (the-as process-drawable sv-84) root trans quad)) + ) + ) + ) + ) + (else + (set! (-> sv-96 trans quad) (-> (the-as process-drawable sv-84) root trans quad)) + ) + ) + ) + ) + (sv-88 + (set! (-> sv-96 trans quad) (-> sv-88 extra trans quad)) + ) + (sv-92 + (set! (-> sv-96 trans quad) (-> sv-92 bsphere quad)) + ) + (s4-1 + (set! (-> sv-96 trans quad) (-> *null-vector* quad)) + ) + (else + (set! (-> sv-96 trans quad) (-> arg0 trans quad)) + ) + ) + ) + (when (logtest? (-> sv-80 flags) (sp-group-flag sp2)) + (let* ((a2-4 sv-96) + (a3-3 *identity-matrix*) + (v1-63 (-> a3-3 rvec quad)) + (a0-44 (-> a3-3 uvec quad)) + (a1-13 (-> a3-3 fvec quad)) + (a3-4 (-> a3-3 trans quad)) + ) + (set! (-> a2-4 rvec quad) v1-63) + (set! (-> a2-4 uvec quad) a0-44) + (set! (-> a2-4 fvec quad) a1-13) + (set! (-> a2-4 trans quad) a3-4) + ) + ) + (cond + ((logtest? (-> sv-80 flags) (sp-group-flag sp13)) + (let ((s4-2 (new 'stack-no-clear 'part-tracker-subsampler-init-params)) + (f30-0 (command-get-float (-> arg0 param 6) 0.0)) + (s3-1 (get-process *default-dead-pool* part-tracker-subsampler #x4000 1)) + ) + (when s3-1 + (let ((t9-16 (method-of-type part-tracker-subsampler activate)) + (a0-47 s3-1) + ) + (set! a1-17 (cond + ((or sv-112 (= (-> arg0 param 7) #t)) + sv-84 + ) + ((= (-> arg0 param 7) #f) + *entity-pool* + ) + (else + (set! a1-17 (ppointer->process (-> *setting-control* user-current movie))) + (cond + (a1-17 + (empty) + a1-17 + ) + (else + *entity-pool* + ) + ) + ) + ) + ) + (t9-16 (the-as part-tracker-subsampler a0-47) a1-17 "part-tracker-subsampler" (the-as pointer #x70004000)) + ) + (let ((t9-17 run-function-in-process) + (a0-48 s3-1) + (a1-18 part-tracker-subsampler-init) + ) + (set! (-> s4-2 group) gp-1) + (set! (-> s4-2 duration) sv-120) + (set! (-> s4-2 callback) #f) + (set! (-> s4-2 userdata) (the-as uint #f)) + (set! (-> s4-2 target) (the-as process-drawable (if sv-112 + sv-84 + (the-as process #f) + ) + ) + ) + (set! (-> s4-2 mat-joint) (if sv-112 + sv-104 + sv-96 + ) + ) + (set! (-> s4-2 subsample-num) f30-0) + ((the-as (function object object object none) t9-17) a0-48 a1-18 s4-2) + ) + (-> s3-1 ppointer) + ) + ) + ) + (else + (let ((s4-3 (new 'stack-no-clear 'part-tracker-init-params)) + (s3-2 (get-process *default-dead-pool* part-tracker #x4000 1)) + ) + (when s3-2 + (let ((t9-19 (method-of-type part-tracker activate)) + (a0-50 s3-2) + ) + (set! a1-21 (cond + ((or sv-112 (= (-> arg0 param 7) #t)) + sv-84 + ) + ((= (-> arg0 param 7) #f) + *entity-pool* + ) + (else + (set! a1-21 (ppointer->process (-> *setting-control* user-current movie))) + (cond + (a1-21 + (empty) + a1-21 + ) + (else + *entity-pool* + ) + ) + ) + ) + ) + (t9-19 (the-as part-tracker a0-50) a1-21 "part-tracker" (the-as pointer #x70004000)) + ) + (let ((t9-20 run-function-in-process) + (a0-51 s3-2) + (a1-22 part-tracker-init) + ) + (set! (-> s4-3 group) gp-1) + (set! (-> s4-3 duration) sv-120) + (set! (-> s4-3 callback) #f) + (set! (-> s4-3 userdata) (the-as uint #f)) + (set! (-> s4-3 target) (the-as process-drawable (if sv-112 + sv-84 + (the-as process #f) + ) + ) + ) + (set! (-> s4-3 mat-joint) (if sv-112 + sv-104 + sv-96 + ) + ) + ((the-as (function object object object none) t9-20) a0-51 a1-22 s4-3) + ) + (-> s3-2 ppointer) + ) + ) + ) + ) + ) + (else + (format + 0 + "ERROR: SCRIPT: part-tracker: unknown particle group \"~S\" in:~%~T~A~%" + (-> arg0 param 1) + (-> arg0 expr) + ) + ) + ) + ) + ) + ) + ) + ) + ) + +(let ((v1-132 (-> *script-form* 59))) + (set! (-> v1-132 name) 'lightning-tracker) + (set! (-> v1-132 spec) + '((return macro (none)) + (function macro (symbol)) + (name eval (string)) + &key + (from-entity eval (string process entity-actor drawable-region-prim #f) #f) + (to-entity eval (string process entity-actor drawable-region-prim #f) #f) + (from-joint eval (string) #f) + (to-joint eval (string) #f) + (duration macro (object) 0) + ) + ) + (set! (-> v1-132 func) + (lambda ((arg0 script-context)) + (local-vars (sv-48 vector) (sv-52 vector) (sv-56 int) (sv-64 int) (sv-72 time-frame) (sv-80 lightning-spec)) + (when (-> arg0 side-effect?) + (if (not (-> arg0 param 2)) + (set! (-> arg0 param 2) (-> arg0 process)) + ) + (if (type? (-> arg0 param 1) string) + (set! sv-80 (lookup-lightning-spec-by-name (the-as string (-> arg0 param 1)))) + (set! sv-80 (the-as lightning-spec #f)) + ) + (let* ((s5-0 (command-get-process (-> arg0 param 2) (the-as process #f))) + (gp-0 (if (type? s5-0 process-drawable) + s5-0 + ) + ) + (s5-1 (command-get-process (-> arg0 param 3) (the-as process #f))) + (s4-0 (if (type? s5-1 process-drawable) + s5-1 + ) + ) + (s0-0 (the-as entity #f)) + (s1-0 (the-as entity #f)) + (s5-2 #f) + ) + (set! sv-48 (vector-reset! (new 'stack-no-clear 'vector))) + (set! sv-52 (vector-reset! (new 'stack-no-clear 'vector))) + (set! sv-56 0) + (set! sv-64 0) + (set! sv-72 (command-get-time (-> arg0 param 6) 1)) + (let ((s3-0 (if (type? sv-80 lightning-spec) + sv-80 + ) + ) + ) + (when s3-0 + (if (not gp-0) + (set! s0-0 (command-get-entity (-> arg0 param 2) (the-as entity #f))) + ) + (if (not (the-as process s4-0)) + (set! s1-0 (command-get-entity (-> arg0 param 3) (the-as entity #f))) + ) + (when (or (and gp-0 (the-as process s4-0)) (and s0-0 s1-0)) + (cond + ((and gp-0 (the-as process s4-0)) + (set! s5-2 #t) + (let ((s0-1 (-> arg0 param 4)) + (s1-1 (-> arg0 param 5)) + ) + (cond + (s0-1 + (let ((v1-17 + (the-as + joint + (get-art-by-name-method (-> (the-as process-drawable gp-0) draw jgeo) (the-as string s0-1) (the-as type #f)) + ) + ) + ) + (cond + (v1-17 + (set! sv-56 (+ (-> v1-17 number) 1)) + (let ((a1-10 (-> (the-as process-drawable gp-0) node-list data sv-56))) + (vector<-cspace! sv-48 a1-10) + ) + ) + (else + (format 0 "ERROR: SCRIPT: lightning-tracker: unknown from-joint ~A in:~%~T~A~%" s0-1 (-> arg0 expr)) + (set! (-> sv-48 quad) (-> (the-as process-drawable gp-0) root trans quad)) + ) + ) + ) + ) + (else + (set! (-> sv-48 quad) (-> (the-as process-drawable gp-0) root trans quad)) + ) + ) + (cond + (s1-1 + (let ((v1-28 + (the-as + joint + (get-art-by-name-method (-> (the-as process-drawable s4-0) draw jgeo) (the-as string s1-1) (the-as type #f)) + ) + ) + ) + (cond + (v1-28 + (set! sv-64 (+ (-> v1-28 number) 1)) + (let ((a1-13 (-> (the-as process-drawable s4-0) node-list data sv-64))) + (vector<-cspace! sv-52 a1-13) + ) + ) + (else + (format 0 "ERROR: SCRIPT: lightning-tracker: unknown to-joint ~A in:~%~T~A~%" s1-1 (-> arg0 expr)) + (set! (-> sv-52 quad) (-> (the-as process-drawable s4-0) root trans quad)) + ) + ) + ) + ) + (else + (set! (-> sv-52 quad) (-> (the-as process-drawable s4-0) root trans quad)) + ) + ) + ) + ) + ((and s0-0 s1-0) + (set! (-> sv-48 quad) (-> s0-0 extra trans quad)) + (set! (-> sv-52 quad) (-> s1-0 extra trans quad)) + ) + ) + ) + (process-spawn + lightning-tracker + :init lightning-tracker-init + s3-0 + sv-72 + #f + (cond + (s5-2 + (empty) + gp-0 + ) + (else + (the-as process #f) + ) + ) + (if s5-2 + sv-56 + sv-48 + ) + (if s5-2 + sv-64 + sv-52 + ) + :name "lightning-tracker" + :to (cond + (s5-2 + (empty) + s4-0 + ) + (else + (set! s4-0 (ppointer->process (-> *setting-control* user-current movie))) + (cond + (s4-0 + (empty) + s4-0 + ) + (else + *entity-pool* + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + +(let ((v1-134 (-> *script-form* 60))) + (set! (-> v1-134 name) 'joint-eval) + (set! (-> v1-134 spec) + '((return macro (none)) + (function macro (symbol)) + (lambda eval (function)) + &key + (entity eval (string process entity-actor #f) #f) + (joint eval (string) #f) + ) + ) + (set! (-> v1-134 func) + (lambda ((arg0 script-context)) + " call a (lambda (process vector cspace)) on the specified location. + + e.g `(joint-eval ,(lambda ((proc process) (trans vector) (cs cspace)) (format #t \"~A ~`vector`P ~`cspace`P~%\" proc trans cs)) :entity *target* :joint \"neckB\") + + proc - the process or #f + trans - the position specified (will always be true) + cs - the cspace, or #f + + " + (when (-> arg0 side-effect?) + (if (not (-> arg0 param 2)) + (set! (-> arg0 param 2) (-> arg0 process)) + ) + (let* ((s4-0 (-> arg0 param 1)) + (gp-0 (if (type? s4-0 function) + s4-0 + ) + ) + (s3-0 (command-get-process (-> arg0 param 2) (the-as process #f))) + (s4-1 (if (type? s3-0 process-drawable) + s3-0 + ) + ) + (v1-5 (the-as entity #f)) + ) + (let ((s3-1 (the-as object #f))) + (if (not s4-1) + (set! v1-5 (command-get-entity (-> arg0 param 2) (the-as entity #f))) + ) + (if (or s4-1 v1-5 (-> arg0 trans)) + ((the-as (function process-drawable cspace none) gp-0) + (the-as process-drawable s4-1) + (the-as + cspace + (cond + ((and s4-1 + (nonzero? (-> (the-as process-drawable s4-1) draw)) + (nonzero? (-> (the-as process-drawable s4-1) node-list)) + ) + (let ((a1-5 (-> arg0 param 3))) + (cond + (a1-5 + (let ((v1-8 + (the-as + joint + (get-art-by-name-method (-> (the-as process-drawable s4-1) draw jgeo) (the-as string a1-5) (the-as type #f)) + ) + ) + ) + (cond + (v1-8 + (set! s3-1 (-> (the-as process-drawable s4-1) node-list data (+ (-> v1-8 number) 1))) + (vector<-cspace! (new 'stack-no-clear 'vector) (the-as cspace s3-1)) + ) + (else + (format 0 "ERROR: SCRIPT: joint-eval: unknown joint ~A in:~%~T~A~%" (-> arg0 param 3) (-> arg0 expr)) + (set! s3-1 (-> (the-as process-drawable s4-1) node-list data)) + (-> (the-as process-drawable s4-1) root trans) + ) + ) + ) + ) + (else + (set! s3-1 (-> (the-as process-drawable s4-1) node-list data)) + (-> (the-as process-drawable s4-1) root trans) + ) + ) + ) + ) + (v1-5 + (-> v1-5 extra trans) + ) + (else + (-> arg0 trans) + ) + ) + ) + ) + (format 0 "ERROR: SCRIPT: joint-eval: unknown entity ~A in:~%~T~A~%" (-> arg0 param 2) (-> arg0 expr)) + ) + ) + ) + ) + ) + ) + ) + +(let ((v1-136 (-> *script-form* 61))) + (set! (-> v1-136 name) 'auto-save) + (set! (-> v1-136 spec) '((return macro (none)) (function macro (symbol)) (value eval (symbol)))) + (set! (-> v1-136 func) (lambda ((arg0 script-context)) + (when (-> arg0 side-effect?) + (case *kernel-boot-message* + (('play 'preview) + (auto-save-command (the-as symbol (-> arg0 param 1)) 0 0 *default-pool* #f) + ) + ) + ) + ) + ) + ) + +(let ((v1-138 (-> *script-form* 62))) + (set! (-> v1-138 name) 'teleport) + (set! (-> v1-138 spec) '((return macro (none)) (function macro (symbol)))) + (set! (-> v1-138 func) (lambda ((arg0 script-context)) (when (-> arg0 side-effect?) + (set! *teleport* #t) + (let ((v0-0 1000)) + (set! (-> *ACTOR-bank* birth-max) v0-0) + v0-0 + ) + ) + ) + ) + ) + +(let ((v1-140 (-> *script-form* 63))) + (set! (-> v1-140 name) 'scene-play) + (set! (-> v1-140 spec) + '((return macro (none)) + (function macro (symbol)) + (name eval (string pair)) + &key + (continue eval (string #f) #f) + ) + ) + (set! (-> v1-140 func) + (lambda ((arg0 script-context)) (if (and (-> arg0 side-effect?) + *target* + (not *scene-player*) + (not (logtest? (-> *target* focus-status) (focus-status dead))) + ) + (process-spawn + scene-player + :init scene-player-init + (-> arg0 param 1) + #t + (-> arg0 param 2) + :name "scene-player" + ) + ) + ) + ) + ) + +(let ((v1-142 (-> *script-form* 64))) + (set! (-> v1-142 name) 'kill-by-type) + (set! (-> v1-142 spec) + '((return macro (none)) (function macro (symbol)) (type macro (symbol)) &key (store eval (symbol) #t)) + ) + (set! (-> v1-142 func) + (lambda ((arg0 script-context)) + "Kill all processes that are of type type." + (local-vars (v1-11 int) (s4-0 process)) + (when (-> arg0 side-effect?) + (let ((s5-0 (-> (the-as symbol (-> arg0 param 1)) value))) + (set! *global-search-name* (the-as basic (if (type? s5-0 type) + s5-0 + ) + ) + ) + ) + (when *global-search-name* + (let ((s5-1 (-> arg0 load-state))) + (while (begin + (set! s4-0 + (search-process-tree + *active-pool* + (the-as (function process-tree object) (lambda ((arg0 basic)) (= (-> arg0 type) *global-search-name*))) + ) + ) + s4-0 + ) + (let ((a0-3 (if (type? s4-0 process-drawable) + s4-0 + ) + ) + ) + (when a0-3 + (let* ((s3-0 (-> a0-3 entity)) + (s4-1 (if (type? s3-0 entity-actor) + s3-0 + ) + ) + ) + (when s4-1 + (let ((a0-6 (res-lump-struct s4-1 'name structure))) + (cond + ((-> arg0 param 2) + (dotimes (v1-10 256) + (when (not (-> s5-1 object-name v1-10)) + (set! (-> s5-1 object-name v1-10) (the-as string a0-6)) + (set! (-> s5-1 object-status v1-10) (the-as basic (-> s4-1 extra perm status))) + (set! v1-11 v1-10) + (goto cfg-19) + ) + ) + (set! v1-11 -1) + (label cfg-19) + (when (>= v1-11 0) + (if (-> s4-1 extra process) + (kill! s4-1) + ) + (logior! (-> s4-1 extra perm status) (entity-perm-status dead)) + ) + ) + (else + (if (-> s4-1 extra process) + (kill! s4-1) + ) + (logior! (-> s4-1 extra perm status) (entity-perm-status dead)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + #f + ) + ) + ) + ) + ) + +(let ((v1-144 (-> *script-form* 65))) + (set! (-> v1-144 name) 'kill) + (set! (-> v1-144 spec) + '((return macro (none)) + (function macro (symbol)) + (entity eval (string entity-actor process #f)) + &key + (store eval (symbol) #t) + ) + ) + (set! (-> v1-144 func) + (lambda ((arg0 script-context)) + "Store an entity's state in the load-state and then kill him and set him to be dead." + (local-vars (v0-0 entity-perm-status) (v1-5 int)) + (when (-> arg0 side-effect?) + (let* ((s5-0 (-> arg0 load-state)) + (s3-0 (command-get-entity (-> arg0 param 1) (the-as entity #f))) + (gp-0 (if (type? s3-0 entity-actor) + s3-0 + ) + ) + ) + (when gp-0 + (let ((a0-4 (res-lump-struct gp-0 'name structure))) + (cond + ((-> arg0 param 2) + (dotimes (v1-4 256) + (when (not (-> s5-0 object-name v1-4)) + (set! (-> s5-0 object-name v1-4) (the-as string a0-4)) + (set! (-> s5-0 object-status v1-4) (the-as basic (-> gp-0 extra perm status))) + (set! v1-5 v1-4) + (goto cfg-12) + ) + ) + (set! v1-5 -1) + (label cfg-12) + (when (>= v1-5 0) + (if (-> gp-0 extra process) + (kill! gp-0) + ) + (set! v0-0 (logior (-> gp-0 extra perm status) (entity-perm-status dead))) + (set! (-> gp-0 extra perm status) v0-0) + v0-0 + ) + ) + (else + (if (-> gp-0 extra process) + (kill! gp-0) + ) + (set! v0-0 (logior (-> gp-0 extra perm status) (entity-perm-status dead))) + (set! (-> gp-0 extra perm status) v0-0) + v0-0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + +(let ((v1-146 (-> *script-form* 66))) + (set! (-> v1-146 name) 'alive) + (set! (-> v1-146 spec) + '((return macro (none)) + (function macro (symbol)) + (entity eval (string entity-actor process #f)) + &key + (store eval (symbol) #t) + ) + ) + (set! (-> v1-146 func) + (lambda ((arg0 script-context)) + "Store an entity's state in the load-state and then force him to be alive." + (local-vars (v1-12 int)) + (when (-> arg0 side-effect?) + (let* ((s5-0 (-> arg0 load-state)) + (s3-0 (command-get-entity (-> arg0 param 1) (the-as entity #f))) + (gp-0 (if (type? s3-0 entity-actor) + s3-0 + ) + ) + ) + (when gp-0 + (cond + ((-> arg0 param 2) + (dotimes (s4-1 256) + (when (not (-> s5-0 object-name s4-1)) + (set! (-> s5-0 object-name s4-1) (res-lump-struct gp-0 'name string)) + (set! (-> s5-0 object-status s4-1) (the-as basic (-> gp-0 extra perm status))) + (set! v1-12 s4-1) + (goto cfg-12) + ) + ) + (set! v1-12 -1) + (label cfg-12) + (when (>= v1-12 0) + (entity-birth-no-kill gp-0) + (let ((v1-16 (-> gp-0 extra process))) + (when v1-16 + (logclear! (-> v1-16 mask) (process-mask actor-pause)) + (let ((v0-0 (the-as object (logclear (-> v1-16 mask) (-> *kernel-context* prevent-from-run))))) + (set! (-> v1-16 mask) (the-as process-mask v0-0)) + v0-0 + ) + ) + ) + ) + ) + (else + (entity-birth-no-kill gp-0) + ) + ) + ) + ) + ) + ) + ) + ) + +(let ((v1-148 (-> *script-form* 67))) + (set! (-> v1-148 name) 'restore) + (set! (-> v1-148 spec) + '((return macro (none)) (function macro (symbol)) (entity eval (string entity-actor process #f))) + ) + (set! (-> v1-148 func) + (lambda ((arg0 script-context)) + "restore an entity's state fromt he load-state storage. Will reset him if he is alive." + (when (-> arg0 side-effect?) + (let* ((gp-0 (-> arg0 load-state)) + (s4-0 (command-get-entity (-> arg0 param 1) (the-as entity #f))) + (s5-0 (if (type? s4-0 entity-actor) + s4-0 + ) + ) + ) + (when s5-0 + (let ((s3-0 (res-lump-struct s5-0 'name structure))) + (dotimes (s4-1 256) + (when (string= (-> gp-0 object-name s4-1) (the-as string s3-0)) + (set! (-> s5-0 extra perm status) (the-as entity-perm-status (-> gp-0 object-status s4-1))) + (if (-> s5-0 extra process) + (kill! s5-0) + ) + (set! (-> gp-0 object-name s4-1) #f) + (return #f) + ) + ) + ) + #f + ) + ) + ) + ) + ) + ) + +(let ((v1-150 (-> *script-form* 68))) + (set! (-> v1-150 name) 'special) + (set! (-> v1-150 spec) + '((return macro (none)) + (function macro (symbol)) + (entity eval (string entity-actor process #f)) + (value eval (symbol)) + ) + ) + (set! (-> v1-150 func) + (lambda ((arg0 script-context)) + "make a guy special or not." + (when (-> arg0 side-effect?) + (let* ((s5-0 (command-get-entity (-> arg0 param 1) (the-as entity #f))) + (a0-3 (if (type? s5-0 entity-actor) + s5-0 + ) + ) + ) + (if a0-3 + (toggle-status (the-as entity-actor a0-3) (entity-perm-status bit-7) (the-as symbol (-> arg0 param 2))) + ) + ) + ) + ) + ) + ) + +(let ((v1-152 (-> *script-form* 69))) + (set! (-> v1-152 name) 'save) + (set! (-> v1-152 spec) '((return macro (none)) (function macro (symbol)))) + (set! (-> v1-152 func) (lambda ((arg0 script-context)) + "make changes permanent." + (when (-> arg0 side-effect?) + (mem-copy! (&-> *backup-load-state* type) (&-> (-> arg0 load-state) type) 2664) + (set! (-> *backup-load-state* command-list) '()) + (dotimes (v1-5 256) + (if (-> *backup-load-state* object-name v1-5) + (set! (-> *backup-load-state* object-name v1-5) #f) + ) + ) + #f + ) + ) + ) + ) + +(let ((v1-154 (-> *script-form* 70))) + (set! (-> v1-154 name) 'task-close!) + (set! (-> v1-154 spec) '((return macro (none)) (function macro (symbol)) (task eval (binteger string)))) + (set! (-> v1-154 func) + (lambda ((arg0 script-context)) + "close a task stage." + (when (-> arg0 side-effect?) + (cond + ((not (logtest? (the-as int (-> arg0 param 1)) 7)) + (task-node-close! (the-as game-task-node (command-get-int (-> arg0 param 1) 0)) 'event) + ) + (else + (let ((s5-1 (-> arg0 param 1))) + (let ((s4-0 (-> *game-info* sub-task-list))) + (dotimes (s3-0 (-> s4-0 length)) + (when (nonzero? s3-0) + (let ((s2-0 (-> s4-0 s3-0))) + (when (string= (the-as string s5-1) (-> s2-0 name)) + (open! s2-0 'event) + (return 0) + ) + ) + ) + ) + ) + (format 0 "ERROR: SCRIPT: unknown task-node ~A in command ~A.~%" s5-1 (-> arg0 expr)) + ) + ) + ) + ) + ) + ) + ) + +(let ((v1-156 (-> *script-form* 71))) + (set! (-> v1-156 name) 'task-open!) + (set! (-> v1-156 spec) '((return macro (none)) (function macro (symbol)) (task eval (binteger string)))) + (set! (-> v1-156 func) + (lambda ((arg0 script-context)) + "close a task stage." + (when (-> arg0 side-effect?) + (cond + ((not (logtest? (the-as int (-> arg0 param 1)) 7)) + (task-node-open! (the-as game-task-node (command-get-int (-> arg0 param 1) 0)) 'event) + ) + (else + (let ((s4-0 (-> arg0 param 1))) + (let ((s3-0 (-> *game-info* sub-task-list))) + (dotimes (s2-0 (-> s3-0 length)) + (when (nonzero? s2-0) + (let ((gp-1 (-> s3-0 s2-0))) + (when (string= (the-as string s4-0) (-> gp-1 name)) + (dotimes (s5-1 4) + (if (nonzero? (-> gp-1 parent-node s5-1)) + (open! (-> *game-info* sub-task-list (-> gp-1 parent-node s5-1)) 'event) + ) + ) + (game-task-node-info-method-11 gp-1 'event) + (return 0) + ) + ) + ) + ) + ) + (format 0 "ERROR: SCRIPT: unknown task-node ~A in command ~A.~%" s4-0 (-> arg0 expr)) + ) + ) + ) + ) + ) + ) + ) + +(let ((v1-158 (-> *script-form* 72))) + (set! (-> v1-158 name) 'task-complete?) + (set! (-> v1-158 spec) '((return macro (none)) (function macro (symbol)) (task eval (binteger)))) + (set! (-> v1-158 func) + (lambda ((arg0 script-context)) + "test whether the need resolution stage of a task is closed (actually tests the bit array)" + (task-complete? *game-info* (the-as game-task (command-get-int (-> arg0 param 1) 0))) + ) + ) + ) + +(let ((v1-160 (-> *script-form* 73))) + (set! (-> v1-160 name) 'task-closed?) + (set! (-> v1-160 spec) '((return macro (boolean)) (function macro (symbol)) (task eval (binteger string)))) + (set! (-> v1-160 func) + (lambda ((arg0 script-context)) + "test whether the need resolution stage of a task is closed (actually tests the bit array)" + (cond + ((not (logtest? (the-as int (-> arg0 param 1)) 7)) + (task-node-closed? (the-as game-task-node (command-get-int (-> arg0 param 1) 0))) + ) + (else + (let ((s5-1 (-> arg0 param 1))) + (let ((s4-0 (-> *game-info* sub-task-list))) + (dotimes (s3-0 (-> s4-0 length)) + (when (nonzero? s3-0) + (let ((s2-0 (-> s4-0 s3-0))) + (if (string= (the-as string s5-1) (-> s2-0 name)) + (return (logtest? (-> s2-0 flags) (game-task-node-flag closed))) + ) + ) + ) + ) + ) + (format 0 "ERROR: SCRIPT: unknown task-node ~A in command ~A.~%" s5-1 (-> arg0 expr)) + ) + ) + ) + #f + ) + ) + ) + +(let ((v1-162 (-> *script-form* 74))) + (set! (-> v1-162 name) 'bigmap?) + (set! (-> v1-162 spec) '((return macro (boolean)) (function macro (symbol)) (task eval (binteger string)))) + (set! (-> v1-162 func) (lambda ((arg0 script-context)) + (cond + ((not *bigmap*) + (return #f) + ) + (else + (let ((a0-1 (-> arg0 param 1)) + (v1-3 (-> *bigmap* bigmap-index)) + ) + (cond + ((zero? v1-3) + (if (string= (the-as string a0-1) "city") + (return #t) + ) + ) + ((= v1-3 1) + (if (string= (the-as string a0-1) "comb") + (return #t) + ) + ) + ((= v1-3 2) + (if (string= (the-as string a0-1) "desert") + (return #t) + ) + ) + ((= v1-3 3) + (if (string= (the-as string a0-1) "factory") + (return #t) + ) + ) + ((= v1-3 4) + (if (string= (the-as string a0-1) "forest") + (return #t) + ) + ) + ((= v1-3 5) + (if (string= (the-as string a0-1) "metalhead-city") + (return #t) + ) + ) + ((= v1-3 6) + (if (string= (the-as string a0-1) "mine") + (return #t) + ) + ) + ((= v1-3 7) + (if (string= (the-as string a0-1) "nest") + (return #t) + ) + ) + ((= v1-3 8) + (if (string= (the-as string a0-1) "nest2") + (return #t) + ) + ) + ((= v1-3 9) + (if (string= (the-as string a0-1) "none") + (return #t) + ) + ) + ((= v1-3 10) + (if (string= (the-as string a0-1) "precursor1") + (return #t) + ) + ) + ((= v1-3 11) + (if (string= (the-as string a0-1) "precursor2") + (return #t) + ) + ) + ((= v1-3 12) + (if (string= (the-as string a0-1) "rubble") + (return #t) + ) + ) + ((= v1-3 13) + (if (string= (the-as string a0-1) "sewer-hum-kg") + (return #t) + ) + ) + ((= v1-3 14) + (if (string= (the-as string a0-1) "sewer-kg-met") + (return #t) + ) + ) + ((= v1-3 15) + (if (string= (the-as string a0-1) "sewer-met-hum") + (return #t) + ) + ) + ((= v1-3 16) + (if (string= (the-as string a0-1) "stadium") + (return #t) + ) + ) + ((= v1-3 17) + (if (string= (the-as string a0-1) "temple1") + (return #t) + ) + ) + ((= v1-3 18) + (if (string= (the-as string a0-1) "temple2") + (return #t) + ) + ) + ((= v1-3 19) + (if (string= (the-as string a0-1) "temple3") + (return #t) + ) + ) + ((= v1-3 20) + (if (string= (the-as string a0-1) "temple4") + (return #t) + ) + ) + ((= v1-3 21) + (if (string= (the-as string a0-1) "tower") + (return #t) + ) + ) + ((= v1-3 22) + (if (string= (the-as string a0-1) "volcano") + (return #t) + ) + ) + ((= v1-3 23) + (if (string= (the-as string a0-1) "wascity") + (return #t) + ) + ) + ) + ) + ) + ) + #f + ) + ) + ) + +(let ((v1-164 (-> *script-form* 75))) + (set! (-> v1-164 name) 'task-open?) + (set! (-> v1-164 spec) '((return macro (boolean)) (function macro (symbol)) (task eval (string)))) + (set! (-> v1-164 func) + (lambda ((arg0 script-context)) + "test whether the need resolution stage of a task is closed (actually tests the bit array)" + (let ((s5-0 (-> arg0 param 1))) + (let ((s4-0 (-> *game-info* sub-task-list)) + (s3-0 0) + ) + (while (< s3-0 (-> s4-0 length)) + (when (nonzero? s3-0) + (let ((v1-5 (-> s4-0 s3-0))) + (if (string= (the-as string s5-0) (-> v1-5 name)) + (return (the-as object (task-node-open? (the-as game-task-node s3-0)))) + ) + ) + ) + (set! s3-0 (+ s3-0 1)) + ) + ) + (format 0 "ERROR: SCRIPT: unknown task-node ~A in command ~A.~%" s5-0 (-> arg0 expr)) + ) + #f + ) + ) + ) + +(let ((v1-166 (-> *script-form* 76))) + (set! (-> v1-166 name) 'play-task) + (set! (-> v1-166 spec) '((return macro (none)) (function macro (symbol)) (task eval (binteger)))) + (set! (-> v1-166 func) (lambda ((arg0 script-context)) + "set the attributes for a task." + (if (-> arg0 side-effect?) + (play-task (the-as game-task (command-get-int (-> arg0 param 1) 0)) 'debug #f) + ) + ) + ) + ) + +(let ((v1-168 (-> *script-form* 77))) + (set! (-> v1-168 name) 'task-manager) + (set! (-> v1-168 spec) + '((return macro (process)) + (function macro (symbol)) + &key + (type macro (symbol) task-manager) + (level macro (symbol) #f) + ) + ) + (set! (-> v1-168 func) + (lambda ((arg0 script-context)) + "set the attributes for a task." + (the-as + symbol + (when (-> arg0 side-effect?) + (let* ((s4-0 (-> arg0 key)) + (gp-0 (if (type? s4-0 game-task-node-info) + (the-as game-task-node-info s4-0) + ) + ) + (s3-0 (-> (the-as symbol (-> arg0 param 1)) value)) + (s4-1 (if (type? s3-0 type) + s3-0 + ) + ) + (s5-1 (-> arg0 param 2)) + ) + (set! s5-1 (cond + (s5-1 + (empty) + s5-1 + ) + (else + (if (and gp-0 (-> gp-0 manager)) + (-> gp-0 manager level) + ) + ) + ) + ) + (cond + ((not (and gp-0 (-> gp-0 manager))) + (the-as int #f) + ) + ((begin + (when (= s4-1 task-manager) + (let ((s3-1 (-> gp-0 manager type-to-spawn value))) + (set! s4-1 (if (type? s3-1 type) + s3-1 + ) + ) + ) + ) + (and s4-1 (or (not s5-1) (= (status-of-level-and-borrows *level* (the-as symbol s5-1) #f) 'active))) + ) + (when (not (handle->process (-> gp-0 manager manager))) + (let* ((s4-2 (get-process *default-dead-pool* (the-as type s4-1) #x4000 1)) + (v0-0 (ppointer->handle (when s4-2 + (let ((t9-5 (method-of-type process activate))) + (t9-5 s4-2 *entity-pool* (-> gp-0 name) (the-as pointer #x70004000)) + ) + (run-now-in-process s4-2 task-manager-init-by-other gp-0 s5-1) + (-> s4-2 ppointer) + ) + ) + ) + ) + (set! (-> gp-0 manager manager) (the-as handle v0-0)) + v0-0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + +(let ((v1-170 (-> *script-form* 78))) + (set! (-> v1-170 name) 'water) + (set! (-> v1-170 spec) '((return macro (pair)) + (function macro (symbol)) + (mode macro (symbol)) + (data eval (object)) + (params macro (pair)) + ) + ) + (set! (-> v1-170 func) (lambda ((arg0 script-context)) + "define a water volume. command does nothing, just defines the syntax." + (-> arg0 expr) + ) + ) + ) + +(let ((v1-172 (-> *script-form* 79))) + (set! (-> v1-172 name) 'movie?) + (set! (-> v1-172 spec) '((return macro (boolean)) (function macro (symbol)))) + (set! (-> v1-172 func) (lambda ((arg0 script-context)) (movie?))) + ) + +(let ((v1-174 (-> *script-form* 80))) + (set! (-> v1-174 name) 'scene-select?) + (set! (-> v1-174 spec) '((return macro (boolean)) (function macro (symbol)))) + (set! (-> v1-174 func) (lambda ((arg0 script-context)) (scene-select?))) + ) + +(let ((v1-176 (-> *script-form* 81))) + (set! (-> v1-176 name) 'demo?) + (set! (-> v1-176 spec) '((return macro (boolean)) (function macro (symbol)))) + (set! (-> v1-176 func) (lambda ((arg0 script-context)) "are we in demo?" (demo?))) + ) + +(let ((v1-178 (-> *script-form* 82))) + (set! (-> v1-178 name) 'kiosk?) + (set! (-> v1-178 spec) '((return macro (boolean)) (function macro (symbol)))) + (set! (-> v1-178 func) (lambda ((arg0 script-context)) "are we in kiosk?" (kiosk?))) + ) + +(let ((v1-180 (-> *script-form* 83))) + (set! (-> v1-180 name) 'kiosk-complete) + (set! (-> v1-180 spec) '((return macro (none)) (function macro (symbol)))) + (set! (-> v1-180 func) + (lambda ((arg0 script-context)) + "are we in kiosk?" + (when (and (or (= *kernel-boot-message* 'kiosk) (= *kernel-boot-message* 'demo) (= *kernel-boot-message* 'demo-shared)) + (and (-> arg0 side-effect?) (!= *master-mode* 'kiosk) (not *progress-process*)) + ) + (remove-setting! 'allow-progress) + (apply-settings *setting-control*) + (set-blackout-frames 0) + (set! (-> *setting-control* user-current bg-a-force) 0.0) + (initialize! *game-info* 'game (the-as game-save #f) "title-restart" (the-as resetter-spec #f)) + ) + ) + ) + ) + +(let ((v1-182 (-> *script-form* 84))) + (set! (-> v1-182 name) 'restart-mission) + (set! (-> v1-182 spec) '((return macro (none)) (function macro (symbol)))) + (set! (-> v1-182 func) (lambda ((arg0 script-context)) "fail jak no mater what." (restart-mission) 0)) + ) + +(let ((v1-184 (-> *script-form* 85))) + (set! (-> v1-184 name) 'scene-player?) + (set! (-> v1-184 spec) '((return macro (boolean)) (function macro (symbol)))) + (set! (-> v1-184 func) + (lambda ((arg0 script-context)) + "test whether the need resolution stage of a task is closed (actually tests the bit array)" + (if *scene-player* + #t + #f + ) + ) + ) + ) + +(let ((v1-186 (-> *script-form* 86))) + (set! (-> v1-186 name) 'talker-spawn) + (set! (-> v1-186 spec) '((return macro (binteger)) (function macro (symbol)) (message eval (string)))) + (set! (-> v1-186 func) + (lambda ((arg0 script-context)) + (cond + ((-> arg0 side-effect?) + (let ((s5-0 (string->talker-speech (the-as string (-> arg0 param 1))))) + (if (= s5-0 (-> *talker-speech* 0)) + (format 0 "ERROR: talker-spawn could not find a speech named ~A.~%" (-> arg0 param 1)) + ) + ;; og:preserve-this + (* 8 + (talker-spawn-func s5-0 *entity-pool* (target-pos 0) (the-as region (-> arg0 key))) + ) + ) + ) + (else + 0 + ) + ) + ) + ) + ) + +(let ((v1-188 (-> *script-form* 87))) + (set! (-> v1-188 name) 'mark-played!) + (set! (-> v1-188 spec) '((return macro (none)) (function macro (symbol)) (message eval (string)))) + (set! (-> v1-188 func) (lambda ((arg0 script-context)) + (when (-> arg0 side-effect?) + (let ((a0-2 (string->talker-speech (the-as string (-> arg0 param 1))))) + (if a0-2 + (play-communicator-speech! a0-2) + ) + ) + ) + 0 + ) + ) + ) + +(let ((v1-190 (-> *script-form* 88))) + (set! (-> v1-190 name) 'yes-play!) + (set! (-> v1-190 spec) + '((return macro (none)) (function macro (symbol)) (message eval (string)) (count eval (binteger bfloat))) + ) + (set! (-> v1-190 func) (lambda ((arg0 script-context)) + (when (-> arg0 side-effect?) + (let ((s5-0 (string->talker-speech (the-as string (-> arg0 param 1)))) + (a1-1 (command-get-int (-> arg0 param 2) 0)) + ) + (if s5-0 + (talker-speech-class-method-12 s5-0 a1-1) + ) + ) + ) + 0 + ) + ) + ) + +(let ((v1-192 (-> *script-form* 89))) + (set! (-> v1-192 name) 'no-play!) + (set! (-> v1-192 spec) + '((return macro (none)) (function macro (symbol)) (message eval (string)) (count eval (binteger bfloat))) + ) + (set! (-> v1-192 func) (lambda ((arg0 script-context)) + (when (-> arg0 side-effect?) + (let ((s5-0 (string->talker-speech (the-as string (-> arg0 param 1)))) + (a1-1 (command-get-int (-> arg0 param 2) 0)) + ) + (if s5-0 + (talker-speech-class-method-13 s5-0 a1-1) + ) + ) + ) + 0 + ) + ) + ) + +(let ((v1-194 (-> *script-form* 90))) + (set! (-> v1-194 name) 'endlessfall) + (set! (-> v1-194 spec) '((return macro (object)) (function macro (symbol)))) + (set! (-> v1-194 func) + (lambda ((arg0 script-context)) + (if (-> arg0 side-effect?) + (send-event + *target* + 'attack-invinc + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (the-as uint 2)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'endlessfall) + ) + ) + ) + ) + ) + ) + ) + +(let ((v1-196 (-> *script-form* 91))) + (set! (-> v1-196 name) 'birth-pickup) + (set! (-> v1-196 spec) + '((return macro (process)) + (function macro (symbol)) + (trans macro (vector symbol string pair)) + (pickup macro (symbol)) + (amount eval (bfloat binteger)) + &key + (flags macro (pair) ('())) + ) + ) + (set! (-> v1-196 func) + (lambda ((arg0 script-context)) + (when (-> arg0 side-effect?) + (let* ((v1-1 (-> arg0 param 2)) + (s5-0 (cond + ((= v1-1 'board) + 38 + ) + ((= v1-1 'skill) + 24 + ) + (else + 0 + ) + ) + ) + ) + (cond + ((nonzero? s5-0) + (let ((s4-0 (new 'static 'fact-info))) + (set! (-> s4-0 options) (actor-option)) + (let* ((v1-2 (-> arg0 param 4)) + (a0-3 (-> (the-as pair v1-2) car)) + ) + (while (not (null? v1-2)) + (cond + ((= a0-3 'suck-in) + (logior! (-> s4-0 options) (actor-option suck-in)) + ) + ((= a0-3 'auto-pickup) + (logior! (-> s4-0 options) (actor-option auto-pickup)) + ) + ) + (set! v1-2 (-> (the-as pair v1-2) cdr)) + (set! a0-3 (-> (the-as pair v1-2) car)) + ) + ) + (ppointer->process (birth-pickup-at-point + (command-get-trans (-> arg0 param 1) (-> arg0 trans)) + (the-as pickup-type s5-0) + (command-get-float (-> arg0 param 3) 0.0) + #t + *entity-pool* + s4-0 + ) + ) + ) + ) + (else + (format 0 "ERROR: SCRIPT: could not spawn pickup, unknown type ~A~%" (-> arg0 param 2)) + ) + ) + ) + ) + ) + ) + ) + +(let ((v1-198 (-> *script-form* 92))) + (set! (-> v1-198 name) 'test-pickup) + (set! (-> v1-198 spec) '((return macro (binteger)) (function macro (symbol)) (pickup macro (symbol)))) + (set! (-> v1-198 func) (lambda ((arg0 script-context)) + (case (-> arg0 param 1) + (('gem) + (* (the int (the float (send-event *target* 'test-pickup (pickup-type gem)))) 8) + ) + (else + 0 + ) + ) + ) + ) + ) + +(let ((v1-200 (-> *script-form* 93))) + (set! (-> v1-200 name) 'get-alert-level) + (set! (-> v1-200 spec) '((return macro (binteger)) (function macro (symbol)))) + (set! (-> v1-200 func) (lambda ((arg0 script-context)) 0)) + ) + +(let ((v1-202 (-> *script-form* 94))) + (set! (-> v1-202 name) 'pause) + (set! (-> v1-202 spec) '((return macro (none)) (function macro (symbol)))) + (set! (-> v1-202 func) (lambda ((arg0 script-context)) (set-master-mode 'pause) 0)) + ) + +(let ((v1-204 (-> *script-form* 95))) + (set! (-> v1-204 name) 'camera-smush) + (set! (-> v1-204 spec) '((return macro (none)) + (function macro (symbol)) + &key + (size macro (binteger bfloat pair) (meters (new 'static 'bfloat :data 0.1))) + (duration macro (binteger bfloat pair) (seconds (new 'static 'bfloat :data 0.25))) + ) + ) + (set! (-> v1-204 func) (lambda ((arg0 script-context)) + (if (-> arg0 side-effect?) + (activate! + *camera-smush-control* + (the-as float (command-get-param (-> arg0 param 1) #f)) + 15 + (the-as int (command-get-time (-> arg0 param 2) 1)) + 1.0 + 0.98 + (-> *display* camera-clock) + ) + ) + 0 + ) + ) + ) + +(let ((v1-206 (-> *script-form* 96))) + (set! (-> v1-206 name) 'show-hud) + (set! (-> v1-206 spec) '((return macro (none)) (function macro (symbol)) (name eval (symbol)))) + (set! (-> v1-206 func) (lambda ((arg0 script-context)) + (if (-> arg0 side-effect?) + (show-hud (-> arg0 param 1)) + ) + 0 + ) + ) + ) + +(let ((v1-208 (-> *script-form* 97))) + (set! (-> v1-208 name) 'fma-sphere) + (set! (-> v1-208 spec) + '((return macro (none)) + (function macro (symbol)) + (mode macro (pair)) + &key + (entity eval (string process entity-actor #f) #f) + (joint eval (string) #f) + (duration macro (object) (frame-time 0)) + (sphere eval (binteger #f) #f) + (danger eval (binteger #f) #f) + ;; og:preserve-this + ;; (nav-mesh-id eval (binteger) (the integer 0)) + (nav-mesh-id eval (binteger) (integer 0)) + ) + ) + (set! (-> v1-208 func) + (lambda ((arg0 script-context)) + (local-vars + (a1-9 process-tree) + (sv-16 object) + (sv-20 int) + (sv-24 process) + (sv-32 int) + (sv-40 time-frame) + (sv-48 object) + (sv-52 object) + (sv-56 int) + ) + (when (-> arg0 side-effect?) + (set! sv-16 (-> arg0 param 1)) + (set! sv-20 0) + (let ((s5-0 (command-get-process (-> arg0 param 2) (the-as process #f)))) + (set! sv-24 (if (type? s5-0 process-drawable) + s5-0 + ) + ) + ) + (set! sv-32 -1) + (set! sv-40 (command-get-time (-> arg0 param 4) 1)) + (set! sv-48 (-> arg0 param 5)) + (set! sv-52 (-> arg0 param 6)) + (set! sv-56 (command-get-int (-> arg0 param 7) 0)) + (let* ((s5-1 sv-16) + (a2-0 (-> (the-as pair s5-1) car)) + ) + (while (not (null? s5-1)) + (case (the-as symbol a2-0) + (('nav) + (set! sv-20 (logior sv-20 1)) + ) + (('kill-once) + (set! sv-20 (logior sv-20 2)) + ) + (('danger) + (set! sv-20 (logior sv-20 4)) + ) + (('deadly-overlap) + (set! sv-20 (logior sv-20 8)) + ) + (else + (format 0 "ERROR: SCRIPT: unknown fma-sphere-mode ~A~%" a2-0) + ) + ) + (set! s5-1 (-> (the-as pair s5-1) cdr)) + (set! a2-0 (-> (the-as pair s5-1) car)) + ) + ) + (when (and sv-24 (and (nonzero? (-> (the-as process-drawable sv-24) draw)) + (nonzero? (-> (the-as process-drawable sv-24) node-list)) + ) + ) + (let ((a1-5 (-> arg0 param 3))) + (when a1-5 + (let ((v1-31 + (the-as + joint + (get-art-by-name-method (-> (the-as process-drawable sv-24) draw jgeo) (the-as string a1-5) (the-as type #f)) + ) + ) + ) + (if v1-31 + (set! sv-32 (+ (-> v1-31 number) 1)) + (format 0 "ERROR: SCRIPT: joint-eval: unknown joint ~A in:~%~T~A~%" (-> arg0 param 3) (-> arg0 expr)) + ) + ) + ) + ) + ) + (let ((gp-1 (new 'stack 'fma-sphere-params))) + (set! (-> gp-1 mode) (the-as fma-sphere-mode sv-20)) + (set! (-> gp-1 proc) (the-as process-focusable sv-24)) + (set! (-> gp-1 track-joint) sv-32) + (set! (-> gp-1 duration) sv-40) + (set! (-> gp-1 sphere) (the-as sphere sv-48)) + (set! (-> gp-1 danger) (the-as traffic-danger-info sv-52)) + (set! (-> gp-1 nav-mesh-id) (the-as uint sv-56)) + (let ((s5-2 (get-process *default-dead-pool* fma-sphere #x4000 1))) + (when s5-2 + (let ((t9-9 (method-of-type fma-sphere activate)) + (a0-16 s5-2) + ) + (set! a1-9 (cond + (sv-24 + sv-24 + ) + (else + (set! a1-9 (ppointer->process (-> *setting-control* user-current movie))) + (cond + (a1-9 + (empty) + a1-9 + ) + (else + *entity-pool* + ) + ) + ) + ) + ) + (t9-9 (the-as fma-sphere a0-16) a1-9 "fma-sphere" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-2 fma-sphere-init-by-other gp-1) + (-> s5-2 ppointer) + ) + ) + ) + ) + 0 + ) + ) + ) + +(let ((v1-210 (-> *script-form* 98))) + (set! (-> v1-210 name) 'reset-cloth) + (set! (-> v1-210 spec) '((return macro (none)) (function macro (symbol)) (manipy-name eval (string)))) + (set! (-> v1-210 func) + (lambda ((arg0 script-context)) (let ((a0-2 (command-get-process (-> arg0 param 1) *target*))) + (if (and (-> arg0 side-effect?) a0-2) + (process-drawable-reset-all-cloth (the-as process-drawable a0-2)) + ) + ) + ) + ) + ) + +(let ((v1-212 (-> *script-form* 99))) + (set! (-> v1-212 name) 'hide-cloth) + (set! (-> v1-212 spec) '((return macro (none)) (function macro (symbol)) (manipy-name eval (string)))) + (set! (-> v1-212 func) + (lambda ((arg0 script-context)) (let ((a0-2 (command-get-process (-> arg0 param 1) *target*))) + (if (and (-> arg0 side-effect?) a0-2) + (process-drawable-show-all-cloth (the-as process-drawable a0-2) #f) + ) + ) + ) + ) + ) + +(let ((v1-214 (-> *script-form* 100))) + (set! (-> v1-214 name) 'show-cloth) + (set! (-> v1-214 spec) '((return macro (none)) (function macro (symbol)) (manipy-name eval (string)))) + (set! (-> v1-214 func) + (lambda ((arg0 script-context)) (let ((a0-2 (command-get-process (-> arg0 param 1) *target*))) + (if (and (-> arg0 side-effect?) a0-2) + (process-drawable-show-all-cloth (the-as process-drawable a0-2) #t) + ) + ) + ) + ) + ) + +(let ((v1-216 (-> *script-form* 101))) + (set! (-> v1-216 name) 'cloth-slow-mo) + (set! (-> v1-216 spec) '((return macro (none)) (function macro (symbol)) (manipy-name eval (string)))) + (set! (-> v1-216 func) + (lambda ((arg0 script-context)) (let ((a0-2 (command-get-process (-> arg0 param 1) *target*))) + (if (and (-> arg0 side-effect?) a0-2) + (process-drawable-slow-mo-cloth (the-as process-drawable a0-2) #t) + ) + ) + ) + ) + ) + +(let ((v1-218 (-> *script-form* 102))) + (set! (-> v1-218 name) 'cloth-restore-mo) + (set! (-> v1-218 spec) '((return macro (none)) (function macro (symbol)) (manipy-name eval (string)))) + (set! (-> v1-218 func) + (lambda ((arg0 script-context)) (let ((a0-2 (command-get-process (-> arg0 param 1) *target*))) + (if (and (-> arg0 side-effect?) a0-2) + (process-drawable-slow-mo-cloth (the-as process-drawable a0-2) #f) + ) + ) + ) + ) + ) + +(let ((v1-220 (-> *script-form* 103))) + (set! (-> v1-220 name) 'set-cloth-ground-height) + (set! (-> v1-220 spec) '((return macro (none)) + (function macro (symbol)) + (manipy-name eval (string)) + (ground-height eval (binteger bfloat)) + ) + ) + (set! (-> v1-220 func) (lambda ((arg0 script-context)) + (let ((gp-0 (command-get-process (-> arg0 param 1) *target*)) + (f0-0 (command-get-float (-> arg0 param 2) 0.0)) + ) + (if (and (-> arg0 side-effect?) gp-0) + (process-drawable-set-cloth-ground-height (the-as process-drawable gp-0) f0-0) + ) + ) + ) + ) + ) + +(let ((v1-222 (-> *script-form* 104))) + (set! (-> v1-222 name) 'set-cloth-wind) + (set! (-> v1-222 spec) + '((return macro (none)) (function macro (symbol)) (manipy-name eval (string)) (wind eval (binteger bfloat))) + ) + (set! (-> v1-222 func) (lambda ((arg0 script-context)) + (let ((gp-0 (command-get-process (-> arg0 param 1) *target*)) + (f0-0 (command-get-float (-> arg0 param 2) 0.0)) + ) + (if (and (-> arg0 side-effect?) gp-0) + (process-drawable-set-wind-strength (the-as process-drawable gp-0) f0-0) + ) + ) + ) + ) + ) + +(let ((v1-224 (-> *script-form* 105))) + (set! (-> v1-224 name) 'los) + (set! (-> v1-224 spec) '((return macro (none)) (function macro (symbol)))) + (set! (-> v1-224 func) (lambda ((arg0 script-context)) 'los)) + ) + +;; og:preserve-this +(let ((v1-227 (new 'global 'script-context (process->ppointer PP) PP (the-as vector #f)))) + (set! (-> v1-227 side-effect?) #f) + (set! *syntax-context* v1-227) + ) + +(define *script-context* (new 'global 'script-context (process->ppointer PP) PP (the-as vector #f))) + +(let ((v0-6 (-> *script-form* 106))) + (set! (-> v0-6 name) 'beam-tracker) + (set! (-> v0-6 spec) + '((return macro (none)) + (function macro (symbol)) + &key + (entity1 eval (string process entity-actor drawable-region-prim #f) #f) + (entity2 eval (string process entity-actor drawable-region-prim #f) #f) + (joint1 eval (string) #f) + (joint2 eval (string) #f) + (duration macro (object) 0) + (beam-type eval (symbol) *default-prim-beam-appearance*) + ) + ) + (set! (-> v0-6 func) + (lambda ((arg0 script-context)) + (the-as + (pointer prim-beam-tracker) + (when (-> arg0 side-effect?) + (if (not (-> arg0 param 1)) + (set! (-> arg0 param 1) (-> arg0 process)) + ) + (if (not (-> arg0 param 2)) + (set! (-> arg0 param 2) (-> arg0 process)) + ) + (let* ((gp-0 (command-get-process (-> arg0 param 1) (the-as process #f))) + (s0-0 (if (type? gp-0 process-drawable) + gp-0 + ) + ) + (gp-1 (command-get-process (-> arg0 param 2) (the-as process #f))) + (s2-0 (if (type? gp-1 process-drawable) + gp-1 + ) + ) + (s4-0 0) + (s3-0 0) + (s5-0 (command-get-time (-> arg0 param 5) 1)) + (gp-2 (-> arg0 param 6)) + ) + (when (and s0-0 s2-0) + (when (and s0-0 (nonzero? (-> (the-as process-drawable s0-0) root))) + (let ((a1-5 (-> arg0 param 3))) + (when a1-5 + (let ((v1-12 + (if (nonzero? (-> (the-as process-drawable s0-0) draw)) + (the-as + joint + (get-art-by-name-method (-> (the-as process-drawable s0-0) draw jgeo) (the-as string a1-5) (the-as type #f)) + ) + ) + ) + ) + (if v1-12 + (set! s4-0 (+ (-> v1-12 number) 1)) + ) + ) + ) + ) + ) + (when (and s2-0 (nonzero? (-> (the-as process-drawable s2-0) root))) + (let ((a1-6 (-> arg0 param 4))) + (when a1-6 + (let ((v1-20 + (if (nonzero? (-> (the-as process-drawable s2-0) draw)) + (the-as + joint + (get-art-by-name-method (-> (the-as process-drawable s2-0) draw jgeo) (the-as string a1-6) (the-as type #f)) + ) + ) + ) + ) + (if v1-20 + (set! s3-0 (+ (-> v1-20 number) 1)) + ) + ) + ) + ) + ) + (let ((a0-16 (new 'stack-no-clear 'prim-beam-tracker-params))) + (set! (-> a0-16 track-obj1) (process->handle s0-0)) + (set! (-> a0-16 track-obj2) (process->handle s2-0)) + (set! (-> a0-16 track-joint1) s4-0) + (set! (-> a0-16 track-joint2) s3-0) + (set! (-> a0-16 pos0) #f) + (set! (-> a0-16 pos1) #f) + (set! (-> a0-16 appearance) #f) + (set! (-> a0-16 duration) s5-0) + (let ((a2-2 (if *scene-player* + (ppointer->process *scene-player*) + *entity-pool* + ) + ) + ) + (spawn-prim-beam-tracker a0-16 (the-as symbol gp-2) (the-as process a2-2)) + ) + ) + ) + ) + ) + ) + ) + ) + ) diff --git a/goal_src/jak3/engine/util/sync-info-h.gc b/goal_src/jak3/engine/util/sync-info-h.gc index 3831d582c0..dbc6c13f5e 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 05598460b7..93239a8bc1 100644 --- a/goal_src/jak3/game.gp +++ b/goal_src/jak3/game.gp @@ -96,286 +96,350 @@ ;; the case of a .o appearing in multiple dgos. But, if we depend on the last item in both lists, it ;; works out. -#| -(define common-dep '("$OUT/obj/cty-guard-turret-button.o" "$OUT/obj/default-menu-pc.o")) -(cgo-file "preca.gd" common-dep) -(cgo-file "outrocst.gd" common-dep) -(cgo-file "ltornsam.gd" common-dep) -(cgo-file "lnstcst.gd" common-dep) -(cgo-file "combx.gd" common-dep) -(cgo-file "lfreeout.gd" common-dep) -(cgo-file "lgunrnc.gd" common-dep) -(cgo-file "ctc.gd" common-dep) -(cgo-file "ltowcity.gd" common-dep) -(cgo-file "temc.gd" common-dep) -(cgo-file "loutro.gd" common-dep) -(cgo-file "railcst.gd" common-dep) -(cgo-file "sem.gd" common-dep) -(cgo-file "dese.gd" common-dep) -(cgo-file "ljkdxvin.gd" common-dep) -(cgo-file "waspgame.gd" common-dep) -(cgo-file "wascast.gd" common-dep) -(cgo-file "lbbsdrp1.gd" common-dep) -(cgo-file "raild.gd" common-dep) -(cgo-file "lwlandm.gd" common-dep) -(cgo-file "gungame2.gd" common-dep) -(cgo-file "railc.gd" common-dep) -(cgo-file "precd.gd" common-dep) -(cgo-file "combe.gd" common-dep) -(cgo-file "lctyhijk.gd" common-dep) -(cgo-file "desoasis.gd" common-dep) -(cgo-file "ctypesc.gd" common-dep) +(define common-dep '("$OUT/obj/default-menu-pc.o")) + +;; wascity +(cgo-file "waschase.gd" common-dep) +(cgo-file "wasdefen.gd" common-dep) +(cgo-file "waspala.gd" common-dep) (cgo-file "wasseem.gd" common-dep) -(cgo-file "towb.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) (cgo-file "wasstadc.gd" common-dep) -(cgo-file "gungame1.gd" common-dep) -(cgo-file "ljak.gd" common-dep) -(cgo-file "lwassig.gd" common-dep) +(cgo-file "arenacst.gd" common-dep) +; ;; desert +; (cgo-file "desa.gd" common-dep) +(cgo-file "desb.gd" common-dep) +(cgo-file "desbattl.gd" common-dep) +; (cgo-file "desbcst.gd" common-dep) +; (cgo-file "desc.gd" common-dep) +; (cgo-file "deschase.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 "desh.gd" common-dep) (cgo-file "deshover.gd" common-dep) -(cgo-file "wsd.gd" common-dep) -(cgo-file "lsamos.gd" common-dep) -(cgo-file "lfaccity.gd" common-dep) -(cgo-file "lblowtmh.gd" common-dep) -(cgo-file "ljaksig.gd" common-dep) -(cgo-file "ldmpckgn.gd" common-dep) -(cgo-file "lbbtcha1.gd" common-dep) -(cgo-file "railx.gd" common-dep) -(cgo-file "staa.gd" common-dep) -(cgo-file "wcaseem.gd" common-dep) -(cgo-file "dst.gd" common-dep) -(cgo-file "rubc.gd" common-dep) -(cgo-file "ipf.gd" common-dep) -(cgo-file "lnstoa.gd" common-dep) -(cgo-file "railf.gd" common-dep) -(cgo-file "deshunt.gd" common-dep) -(cgo-file "oasiscst.gd" common-dep) +; (cgo-file "deshunt.gd" common-dep) (cgo-file "desinter.gd" common-dep) -(cgo-file "ctypesa.gd" common-dep) -(cgo-file "seo.gd" common-dep) -(cgo-file "railb.gd" common-dep) -(cgo-file "lerrol.gd" common-dep) -(cgo-file "lbbsprt3.gd" common-dep) -(cgo-file "ltowa.gd" common-dep) -(cgo-file "comba.gd" common-dep) -(cgo-file "stb.gd" common-dep) -(cgo-file "desc.gd" common-dep) -(cgo-file "lctyprot.gd" common-dep) -(cgo-file "lctyblow.gd" common-dep) -(cgo-file "voca.gd" common-dep) -(cgo-file "lbbring3.gd" common-dep) -(cgo-file "ctb.gd" common-dep) -(cgo-file "lbbring4.gd" common-dep) -(cgo-file "mic.gd" common-dep) -(cgo-file "lnstobc.gd" common-dep) -(cgo-file "ctypesb.gd" common-dep) -(cgo-file "cia.gd" common-dep) -(cgo-file "ldampksm.gd" common-dep) -(cgo-file "ljndklev.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 "hhg.gd" common-dep) -(cgo-file "ljakc.gd" common-dep) -(cgo-file "lbombbot.gd" common-dep) -(cgo-file "loutro2.gd" common-dep) -(cgo-file "citycast.gd" common-dep) -(cgo-file "seb.gd" common-dep) -(cgo-file "combn.gd" common-dep) -(cgo-file "lprenme.gd" common-dep) -(cgo-file "rbct.gd" common-dep) -(cgo-file "lbbsdrp2.gd" common-dep) -(cgo-file "lbbring5.gd" common-dep) -(cgo-file "rubb.gd" common-dep) -(cgo-file "ltrtwhls.gd" common-dep) -(cgo-file "ctycarc.gd" common-dep) -(cgo-file "towera.gd" common-dep) -(cgo-file "desw.gd" common-dep) -(cgo-file "lpatk.gd" common-dep) -(cgo-file "ljkdmpk.gd" common-dep) -(cgo-file "ltowb.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 "slumbset.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 "combb.gd" common-dep) -(cgo-file "precc.gd" common-dep) -(cgo-file "desbcst.gd" common-dep) -(cgo-file "lctypalt.gd" common-dep) -(cgo-file "ltornjnx.gd" common-dep) -(cgo-file "factorya.gd" common-dep) -(cgo-file "ljakklev.gd" common-dep) -(cgo-file "sef.gd" common-dep) -(cgo-file "museum4.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) +; ;; temple (cgo-file "tema.gd" common-dep) -(cgo-file "lbbring1.gd" common-dep) -(cgo-file "ljakndax.gd" common-dep) -(cgo-file "vin.gd" common-dep) -(cgo-file "lfacb.gd" common-dep) -(cgo-file "lashelin.gd" common-dep) -(cgo-file "ljkcdmkl.gd" common-dep) -(cgo-file "lfacrm2.gd" common-dep) -(cgo-file "ljinx.gd" common-dep) -(cgo-file "lfactory.gd" common-dep) -(cgo-file "arenacst.gd" common-dep) -(cgo-file "lbbtcha3.gd" common-dep) -(cgo-file "wasdefen.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 "lmhcb.gd" common-dep) -(cgo-file "freecast.gd" common-dep) -(cgo-file "frstx.gd" common-dep) -(cgo-file "sek.gd" common-dep) -(cgo-file "lmhca.gd" common-dep) -(cgo-file "cwi.gd" common-dep) -(cgo-file "lprecc.gd" common-dep) +(cgo-file "temx.gd" common-dep) +; ;; hang +(cgo-file "hga.gd" common-dep) (cgo-file "hgb.gd" common-dep) -(cgo-file "desrace1.gd" common-dep) +; ;; volcano +(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) +(cgo-file "mic.gd" common-dep) +(cgo-file "mined.gd" common-dep) +(cgo-file "minee.gd" common-dep) +; ;; city +(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 +; (cgo-file "cia.gd" common-dep) ;; ctyind +; (cgo-file "cib.gd" common-dep) +; (cgo-file "cpo.gd" common-dep) ;; ctyport +; (cgo-file "cta.gd" common-dep) +; (cgo-file "ctb.gd" common-dep) +; (cgo-file "ctc.gd" common-dep) +; (cgo-file "ctypepa.gd" common-dep) ;; citizens +; (cgo-file "ctypepb.gd" common-dep) ;; predator +; (cgo-file "ctypepc.gd" common-dep) ;; empty +; (cgo-file "ctypesa.gd" common-dep) ;; guards +; (cgo-file "ctypesb.gd" common-dep) ;; metal heads +; (cgo-file "ctypesc.gd" common-dep) ;; kg +; (cgo-file "ctycara.gd" common-dep) ;; cars +; (cgo-file "ctycarb.gd" common-dep) ;; bikes +; (cgo-file "ctycarc.gd" common-dep) ;; hellcat +; (cgo-file "ctycarkg.gd" common-dep) ;; empty +; (cgo-file "onintent.gd" common-dep) +; (cgo-file "hhg.gd" common-dep) ;; hiphog +; (cgo-file "gga.gd" common-dep) ;; gungame +; (cgo-file "gungame1.gd" common-dep) +; (cgo-file "gungame2.gd" common-dep) +; (cgo-file "powergd.gd" common-dep) +; (cgo-file "freehq.gd" common-dep) +; (cgo-file "vin.gd" common-dep) +; (cgo-file "freecast.gd" common-dep) +; (cgo-file "citycast.gd" common-dep) +; (cgo-file "gridcst.gd" common-dep) ;; city-destroy-grid-res +; (cgo-file "slumbset.gd" common-dep) ;; sewer-met-hum-intro +; ;; sewer (cgo-file "sea.gd" common-dep) -(cgo-file "nsa.gd" common-dep) -(cgo-file "lbiped.gd" common-dep) -(cgo-file "wasall.gd" common-dep) -(cgo-file "waschase.gd" common-dep) -(cgo-file "desrescc.gd" common-dep) -(cgo-file "desf.gd" common-dep) -(cgo-file "deserrol.gd" common-dep) -(cgo-file "cfb.gd" common-dep) -(cgo-file "lgunnorm.gd" common-dep) -(cgo-file "outcast3.gd" common-dep) +; (cgo-file "seb.gd" common-dep) +; (cgo-file "sec.gd" common-dep) +; (cgo-file "sed.gd" common-dep) +; (cgo-file "see.gd" common-dep) +; (cgo-file "sef.gd" common-dep) +; (cgo-file "seg.gd" common-dep) +; (cgo-file "seh.gd" common-dep) +; (cgo-file "sei.gd" common-dep) +; (cgo-file "sej.gd" common-dep) +; (cgo-file "sek.gd" common-dep) +; (cgo-file "sel.gd" common-dep) +; (cgo-file "sem.gd" common-dep) +; (cgo-file "sen.gd" common-dep) +; (cgo-file "seo.gd" common-dep) +; ;; mhcity (cgo-file "mhca.gd" common-dep) -(cgo-file "ltnfxhip.gd" common-dep) -(cgo-file "introcst.gd" common-dep) -(cgo-file "cta.gd" common-dep) -(cgo-file "combc.gd" common-dep) -(cgo-file "seh.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) +; ;; 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) +; ;; stadium +(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) +; (cgo-file "ruba2.gd" common-dep) +; (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) +; ;; precursor +; (cgo-file "preca.gd" common-dep) +; (cgo-file "precb.gd" common-dep) +; (cgo-file "precc.gd" common-dep) +; (cgo-file "precd.gd" common-dep) +; ;; title/intro +; (cgo-file "win.gd" common-dep) ;; wasintro +; (cgo-file "title.gd" common-dep) +; (cgo-file "inttitle.gd" common-dep) +; (cgo-file "intpalrf.gd" common-dep) ;; intro-palace-roof +; (cgo-file "ipf.gd" common-dep) ;; intro-palace-fall +; (cgo-file "introcst.gd" common-dep) +; ;; outro +; (cgo-file "outcast3.gd" common-dep) +; (cgo-file "outrocst.gd" common-dep) +; ;; museum +; (cgo-file "museum.gd" common-dep) +; (cgo-file "museum2.gd" common-dep) +; (cgo-file "museum3.gd" common-dep) +; (cgo-file "museum3b.gd" common-dep) +; (cgo-file "museum4.gd" common-dep) +; (cgo-file "museum4b.gd" common-dep) +;; test +(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 "lbiped.gd" common-dep) +; (cgo-file "lblowcst.gd" common-dep) +; (cgo-file "lblowtkg.gd" common-dep) +; (cgo-file "lblowtmh.gd" common-dep) +; (cgo-file "lbombbot.gd" common-dep) +; (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 "lctyhijk.gd" common-dep) +; (cgo-file "lctypalt.gd" common-dep) +; (cgo-file "lctypatk.gd" common-dep) +; (cgo-file "lctyprot.gd" common-dep) +; (cgo-file "lctysnpr.gd" common-dep) +; (cgo-file "ldamklev.gd" common-dep) +; (cgo-file "ldampeck.gd" common-dep) +; (cgo-file "ldampksm.gd" common-dep) +; (cgo-file "ldamsig.gd" common-dep) +; (cgo-file "ldax.gd" common-dep) +; (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 "warpcast.gd" common-dep) -(cgo-file "lfacrm1.gd" common-dep) -(cgo-file "wca.gd" common-dep) -(cgo-file "lblowtkg.gd" common-dep) -(cgo-file "onintent.gd" common-dep) -(cgo-file "freehq.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 "towercst.gd" common-dep) -(cgo-file "lbbring2.gd" common-dep) -(cgo-file "ctypepc.gd" common-dep) -(cgo-file "lblowcst.gd" common-dep) -(cgo-file "see.gd" common-dep) -(cgo-file "lctysnpr.gd" common-dep) -(cgo-file "desrescg.gd" common-dep) -(cgo-file "mhctycst.gd" common-dep) -(cgo-file "ltorn.gd" common-dep) -(cgo-file "desg.gd" common-dep) -(cgo-file "facd.gd" common-dep) -(cgo-file "desboss1.gd" common-dep) (cgo-file "lforp.gd" common-dep) -(cgo-file "ljakcklv.gd" common-dep) -(cgo-file "ctycarkg.gd" common-dep) -(cgo-file "temp.gd" common-dep) -(cgo-file "lkeira.gd" common-dep) -(cgo-file "ctypepb.gd" common-dep) -(cgo-file "sej.gd" common-dep) -(cgo-file "desh.gd" common-dep) -(cgo-file "wasstadb.gd" common-dep) -(cgo-file "lbbsprt2.gd" common-dep) -(cgo-file "lbbsdrp3.gd" common-dep) -(cgo-file "museum.gd" common-dep) -(cgo-file "ldesgcst.gd" common-dep) -(cgo-file "ltnjxhip.gd" common-dep) -(cgo-file "ldax.gd" common-dep) -(cgo-file "intpalrf.gd" common-dep) -(cgo-file "lcitysml.gd" common-dep) -(cgo-file "title.gd" common-dep) -(cgo-file "desb.gd" common-dep) -(cgo-file "facb.gd" common-dep) -(cgo-file "mia.gd" common-dep) -(cgo-file "temx.gd" common-dep) -(cgo-file "ctycarb.gd" common-dep) -(cgo-file "hga.gd" common-dep) -(cgo-file "ctycara.gd" common-dep) -(cgo-file "lnstobb.gd" common-dep) -(cgo-file "lmech.gd" common-dep) -(cgo-file "gridcst.gd" common-dep) -(cgo-file "lbbtcha2.gd" common-dep) -(cgo-file "ljkfeet.gd" common-dep) -(cgo-file "mib.gd" common-dep) -(cgo-file "facc.gd" common-dep) -(cgo-file "raile.gd" common-dep) -(cgo-file "combd.gd" common-dep) -(cgo-file "lsigklv.gd" common-dep) -(cgo-file "ldampeck.gd" common-dep) -(cgo-file "deschase.gd" common-dep) -(cgo-file "museum3.gd" common-dep) -(cgo-file "minee.gd" common-dep) -(cgo-file "lctyass.gd" common-dep) -(cgo-file "wcb.gd" common-dep) -(cgo-file "lpatkcs.gd" common-dep) -(cgo-file "cfa.gd" common-dep) -(cgo-file "ruba2.gd" common-dep) -(cgo-file "ldamsig.gd" common-dep) -(cgo-file "precb.gd" common-dep) -(cgo-file "railb2.gd" common-dep) -(cgo-file "lbbspirt.gd" common-dep) -(cgo-file "temd.gd" common-dep) -(cgo-file "mined.gd" common-dep) -(cgo-file "wwd.gd" common-dep) -(cgo-file "loutro3.gd" common-dep) -(cgo-file "sec.gd" common-dep) -(cgo-file "lsnkwhls.gd" common-dep) -(cgo-file "loninsim.gd" common-dep) -(cgo-file "halfpipe.gd" common-dep) -(cgo-file "cib.gd" common-dep) -(cgo-file "inttitle.gd" common-dep) -(cgo-file "desresc.gd" common-dep) -(cgo-file "lwasbbv.gd" common-dep) -(cgo-file "lforring.gd" common-dep) -(cgo-file "museum3b.gd" common-dep) -(cgo-file "gga.gd" common-dep) -(cgo-file "desliz.gd" common-dep) -(cgo-file "desjump.gd" common-dep) -(cgo-file "raila.gd" common-dep) -(cgo-file "lseemwca.gd" common-dep) +; (cgo-file "lforring.gd" common-dep) +; (cgo-file "lfreeout.gd" common-dep) +; (cgo-file "lgunnorm.gd" common-dep) +; (cgo-file "lgunrnc.gd" common-dep) +; (cgo-file "ljak.gd" common-dep) +; (cgo-file "ljakc.gd" common-dep) +; (cgo-file "ljakcklv.gd" common-dep) +; (cgo-file "ljakklev.gd" common-dep) +; (cgo-file "ljakndax.gd" common-dep) +; (cgo-file "ljaksig.gd" common-dep) +; (cgo-file "ljinx.gd" common-dep) +; (cgo-file "ljkcdmkl.gd" common-dep) +; (cgo-file "ljkdmpk.gd" common-dep) +; (cgo-file "ljkdxvin.gd" common-dep) +; (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 "desd.gd" common-dep) -(cgo-file "lfaco.gd" common-dep) -(cgo-file "ldamklev.gd" common-dep) -(cgo-file "powergd.gd" common-dep) -(cgo-file "lptrl.gd" common-dep) -(cgo-file "lsig.gd" common-dep) -(cgo-file "ruba.gd" common-dep) -(cgo-file "win.gd" common-dep) -(cgo-file "wasstada.gd" common-dep) -(cgo-file "sei.gd" common-dep) -(cgo-file "cpo.gd" common-dep) -(cgo-file "waspala.gd" common-dep) -(cgo-file "museum4b.gd" common-dep) -(cgo-file "seg.gd" common-dep) -(cgo-file "frstb.gd" common-dep) -(cgo-file "nsb.gd" common-dep) -(cgo-file "cgb.gd" common-dep) -(cgo-file "lvincst.gd" common-dep) -(cgo-file "sel.gd" common-dep) -(cgo-file "lctydest.gd" common-dep) -(cgo-file "sta.gd" common-dep) -(cgo-file "wasleapr.gd" common-dep) -(cgo-file "desrally.gd" common-dep) -(cgo-file "temb.gd" common-dep) -(cgo-file "ctypepa.gd" common-dep) -(cgo-file "lwstdpck.gd" common-dep) -(cgo-file "museum2.gd" common-dep) -(cgo-file "sed.gd" common-dep) -(cgo-file "desa.gd" common-dep) -(cgo-file "towerc.gd" common-dep) -(cgo-file "desbattl.gd" common-dep) -(cgo-file "frsta.gd" common-dep) -(cgo-file "lsigjakc.gd" common-dep) -(cgo-file "vocx.gd" common-dep) -(cgo-file "lbbspid.gd" common-dep) -(cgo-file "sen.gd" common-dep) -(cgo-file "mhcb.gd" common-dep) -(cgo-file "lctypatk.gd" common-dep) -(cgo-file "lbbring6.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 "loninsim.gd" common-dep) +; (cgo-file "loutro.gd" common-dep) +; (cgo-file "loutro2.gd" common-dep) +; (cgo-file "loutro3.gd" common-dep) +; (cgo-file "lpatk.gd" common-dep) +; (cgo-file "lpatkcs.gd" common-dep) +; (cgo-file "lprecc.gd" common-dep) +; (cgo-file "lprenme.gd" common-dep) +; (cgo-file "lptrl.gd" common-dep) +; (cgo-file "lsamos.gd" common-dep) +; (cgo-file "lseemwca.gd" common-dep) +; (cgo-file "lsig.gd" common-dep) +; (cgo-file "lsigjakc.gd" common-dep) +; (cgo-file "lsigklv.gd" common-dep) +; (cgo-file "lsnkwhls.gd" common-dep) +; (cgo-file "ltnfxhip.gd" common-dep) +; (cgo-file "ltnjxhip.gd" common-dep) +; (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 "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 "lwlandm.gd" common-dep) +; (cgo-file "lwstdpck.gd" common-dep) + ;;;;;;;;;;;;;;;;;;;;; ;; ANIMATIONS ;;;;;;;;;;;;;;;;;;;;; -;; (copy-strs "") +(copy-strs + "ARF1INTR" "CIBBRES" "CIPFINTR" "DAD16" "DEAR1RES" "DEHRES" + "ARF1RES" "CIBTINTR" "CIPGINTR" "DAD17" "DEAR2INT" "DEJGOTA" + "ARF2INTR" "CIDGRES" "CIPGRES" "DAD18" "DEATIN" "DEJGOTB" + "ARF2RES" "CIFCEINT" "CIPHINTR" "DAD20" "DEATOUT" "DEJGOTC" + "ARF3INTR" "CIGC1RES" "CIPHRES" "DAD21" "DEBBINTR" "DEJMINTR" + "ARF3RES" "CIGC2INT" "CISFINTR" "DAD24" "DECLINTR" "DELC2" + "AROUTRO" "CIGC2RES" "COETEMPL" "DAD31" "DECRINTR" "DELC3" + "ART1INTR" "CIGCINTR" "COEXIT" "DAD35" "DECWIN" "DELCATCH" + "CAGSHIEL" "CIGDPUNC" "DAD06" "DAD38" "DEFBIA" "DEODRB" + "CATRES" "CIGTCINT" "DAD07" "DAD57" "DEFBINTR" "DEODRES" + "CAWRRES" "CIHVRES" "DAD10" "DAD58" "DEFBRB" "DERINTRO" + "CIATIDES" "CIPAIB" "DAD12" "DAD61" "DEFBRES" "DERRA" + "CIATOUT" "CIPAINTR" "DAD13" "DAMOLE" "DEGRES" "DESCREEN" + "CIBBINTR" "CIPARES" "DAD14" "DEAR1INT" "DEHINTRO" "DPBTURRE" + "FABINTRO" "INDROP" "JABOARD" "JAEGOLD" "JAPGLIDE" "KRWB3" + "FABRES" "INFFHQ" "JACARRY" "JAELIGHT" "JAPGUN" "MIBINTRO" + "FAI1INTR" "INLOST" "JAD1" "JAENORMA" "JAPHCAR" "MIBRES" + "FAI2INTR" "INPALACE" "JAD2" "JAEXTERN" "JAPIDAX" "MIERES" + "FAI3INTR" "INRESCUE" "JAD3" "JAFLDAX" "JAPILOT" "MIGEXIT" + "FAI4INTR" "INTIRED" "JAD4" "JAFLUT" "JAPOLE" "MITINTRO" + "FASBIB" "INTRAINI" "JAD5" "JAGUN" "JAPWCAR" "MITRES" + "FASBINTR" "JAA1" "JADARK" "JAICE" "JARACER" "MU2ANIMS" + "FASBRES" "JAA2" "JADON" "JAINDAX" "JASWIM" "MU3ANIMS" + "FORB" "JAA3" "JADUMMY" "JAKANGA" "JATENTAC" "MU4ANIMS" + "FORCRES" "JAA4" "JAEBOARD" "JALADDER" "JATUBE" "MUANIMS" + "FOTOMRES" "JAA5" "JAEDARK" "JALIGHT" "JATURRET" "NEDBARRI" + "FOTOWER" "JAA6" "JAEGC" "JAMECH" "KRWB1" "NEEINTRO" + "GRMANIMS" "JAA7" "JAEGNORM" "JAPEGASU" "KRWB2" "NEHINTRO" + "NEHRES" "PRHC" "SEMEXIT" "TEORES" "WADRES" "NSB1BREA" + "PRHFINAL" "SEMHINTR" "TETINTRO" "WAGINTRO" "NSB2BREA" "PRMINIMA" + "SEPEXIT" "TETRA" "WAGRES" "PARAINTR" "PRTRES" "SESGRUNT" + "TETRB" "WALRINTR" "PARARA" "RATA1INT" "SEWATERS" "TEWDESER" + "WALRRES" "PARARES" "RATA2INT" "TECINTRO" "TODINTRO" "WAPGINTR" + "PARPINTR" "SCBOOK" "TECRES" "TODRB" "WAPGRES" "PEFLY" + "SEEINTRO" "TEDINTRO" "TODRES" "WOMAP" "POAINTRO" "SEGENTRA" + "TEDRES" "VODRES" "PRDSERES" "SEHKENTR" "TEEANIMS" "VOI1INTR" + "PRDSLOSE" "SEHKRES" "TEELAANI" "VOI1RES" "PRDSRES" "SEKENTRA" + "TEELODS" "VOI2INTR" "PRHA" "SEKEXIT" "TEJGLGLI" "VOI2RES" + "PRHB" "SEKMINTR" "TEOINTRO" "WACINTRO") + + ;;;;;;;;;;;;;;;;;;;;; ;; MUSIC diff --git a/goal_src/jak3/kernel-defs.gc b/goal_src/jak3/kernel-defs.gc index 4c909711e8..8e8ad2cc14 100644 --- a/goal_src/jak3/kernel-defs.gc +++ b/goal_src/jak3/kernel-defs.gc @@ -132,10 +132,11 @@ (define-extern scf-get-aspect "Defined in the kernel" (function uint)) (define-extern scf-get-timeout (function int)) (define-extern scf-get-inactive-timeout (function int)) -(define-extern kernel-shutdown (function none)) +(define-extern kernel-shutdown (function int none)) (define-extern *boot-video-mode* "Defined in the kernel" int) (define-extern *kernel-boot-message* symbol) (define-extern *kernel-symbol-warnings* symbol) +(define-extern *kernel-boot-art-group* string) (define-extern symbol->string (function symbol string)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -183,7 +184,9 @@ (define-extern pc-waiting-for-bind? (function symbol)) (define-extern pc-set-waiting-for-bind! (function int symbol symbol int none)) (define-extern pc-stop-waiting-for-bind! (function none)) +(define-extern pc-get-controller-index (function int int)) (define-extern pc-set-controller! (function int int none)) +(define-extern pc-get-keyboard-enabled? (function symbol)) (define-extern pc-set-keyboard-enabled! (function symbol none)) (define-extern pc-set-mouse-options! (function symbol symbol symbol none)) (define-extern pc-set-mouse-camera-sens! (function float float none)) @@ -196,16 +199,18 @@ ;; Display Related Functions (define-extern pc-get-display-mode (function symbol)) -(define-extern pc-get-active-display-size (function (pointer int32) (pointer int32) none)) +(define-extern pc-get-active-display-size (function (pointer int64) (pointer int64) none)) (define-extern pc-get-active-display-refresh-rate (function int)) (define-extern pc-get-display-count (function int)) -(define-extern pc-get-display-name (function int string)) +(define-extern pc-get-display-name (function int string symbol)) (define-extern pc-get-os (function symbol)) -(define-extern pc-get-window-size (function (pointer int32) (pointer int32) none)) +(define-extern pc-get-window-size (function (pointer int64) (pointer int64) none)) (define-extern pc-get-window-scale (function (pointer float) (pointer float) none)) (define-extern pc-set-window-size (function int int none)) (define-extern pc-set-fullscreen-display (function int none)) (define-extern pc-set-display-mode (function symbol none)) +(define-extern pc-get-num-resolutions (function int)) +(define-extern pc-get-resolution (function int (pointer int64) (pointer int64) none)) (define-extern pc-set-frame-rate (function int none)) (define-extern pc-set-vsync (function symbol none)) @@ -230,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)) @@ -327,6 +335,8 @@ (define-extern __pc-texture-upload-now (function object object none)) (define-extern __pc-texture-relocate (function object object object none)) +(define-extern __pc-set-levels (function (pointer string) none)) +(define-extern __pc-set-active-levels (function (pointer string) none)) (define-extern link-resume (function int)) (define-extern unload (function string none)) diff --git a/goal_src/jak3/kernel/gkernel-h.gc b/goal_src/jak3/kernel/gkernel-h.gc index e9efa34d77..26947f288d 100644 --- a/goal_src/jak3/kernel/gkernel-h.gc +++ b/goal_src/jak3/kernel/gkernel-h.gc @@ -12,8 +12,8 @@ (defconstant *kernel-major-version* 2) (defconstant *kernel-minor-version* 0) -(defconstant DPROCESS_STACK_SIZE (#if PC_PORT #x8000 #x3800)) -(defconstant PROCESS_STACK_SIZE (#if PC_PORT #x4000 #x1c00)) +(defconstant DPROCESS_STACK_SIZE (#if PC_PORT #x10000 #x3800)) +(defconstant PROCESS_STACK_SIZE (#if PC_PORT #x8000 #x1c00)) (#if PC_BIG_MEMORY (defconstant PROCESS_HEAP_MULT 4) ;; 4x actors @@ -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)) diff --git a/goal_src/jak3/kernel/gkernel.gc b/goal_src/jak3/kernel/gkernel.gc index 3394420146..9bae25688b 100644 --- a/goal_src/jak3/kernel/gkernel.gc +++ b/goal_src/jak3/kernel/gkernel.gc @@ -106,7 +106,9 @@ ) ;; The stack for running user code. +(define *canary-1* (the-as (pointer uint64) (malloc 'global 8))) (define *dram-stack* (the-as (pointer uint8) (malloc 'global DPROCESS_STACK_SIZE))) +(define *canary-2* (the-as (pointer uint64) (malloc 'global 8))) (defconstant *kernel-dram-stack* (&+ *dram-stack* DPROCESS_STACK_SIZE)) ;; The kernel can also run code using the scratchpad as the stack. @@ -130,41 +132,47 @@ ;; DECOMP DEVIATION (#cond (PC_PORT + (define *canary-4* (the-as (pointer uint64) (malloc 'global 8))) ;; we'll create a fake scratchpad: ;; make sure the scratchpad is 64kb aligned, and make it 32 kB so we can big stacks on it. ;; some (partially buggy) code in generic tie relies on 64 kB alignment. - (let* ((mem (new 'global 'array 'uint8 (* 128 1024))) + (define *fake-scratchpad-size* (* 128 1024)) + (let* ((mem (new 'global 'array 'uint8 (* 2 *fake-scratchpad-size*))) ) - (define *fake-scratchpad-data* (the pointer (align-n mem (* 64 1024)))) + (define *fake-scratchpad-alloc* mem) + (define *fake-scratchpad-data* (the pointer (align-n mem *fake-scratchpad-size*))) ) ;; use the same memory for the scratchpad stacks. ;; defining it as a separate thing so we can split them for debugging stack corruption easily. (define *fake-scratchpad-stack* *fake-scratchpad-data*) - ;; (define *canary-3* (the-as (pointer uint64) (malloc 'global 8))) + (define *canary-3* (the-as (pointer uint64) (malloc 'global 8))) (defmacro scratchpad-start () "Get the start of the scratchpad. At least 64kB aligned." '*fake-scratchpad-data* ) + (defmacro scratchpad-end () + "Get the start of the scratchpad. At least 64kB aligned." + `(&+ (scratchpad-start) *fake-scratchpad-size*) + ) ) (else (defmacro scratchpad-start () #x70000000 ) + (defmacro scratchpad-end () + "Get the start of the scratchpad. At least 64kB aligned." + `(&+ (scratchpad-start) (* 16 1024)) + ) ) ) -(defmacro scratchpad-end () - "Get the end of the scratchpad memory" - `(&+ (scratchpad-start) (* 16 1024)) - ) - (defmacro in-scratchpad? (x) "Is the given address in the scratchpad?" `(and (>= (the-as int ,x) (scratchpad-start)) - (< (the-as int ,x) (scratchpad-end)) + (<= (the-as int ,x) (scratchpad-end)) ) ) @@ -362,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) ) ) @@ -1525,6 +1533,10 @@ (execute-process-tree *active-pool* (lambda ((arg0 process)) + ;; (+! (-> *canary-1*) 1) + ;; (+! (-> *canary-2*) 1) + ;; (+! (-> *canary-3*) 1) + ;; (+! (-> *canary-4*) 1) (let ((s5-0 *kernel-context*)) (case (-> arg0 status) (('waiting-to-run 'suspended) @@ -1539,6 +1551,8 @@ (set! *debug-draw-pauseable* #f) ) ) + ;; run the trans function. + ;; (format 0 "Trans | Proc ~A | C1: ~X C2: ~X C3: ~X C4: ~X~%" (-> arg0 name) (-> *canary-1*) (-> *canary-2*) (-> *canary-3*) (-> *canary-4*)) (when (-> arg0 trans-hook) (let ((s4-0 (new 'process 'cpu-thread arg0 'trans 256 (-> arg0 main-thread stack-top)))) (reset-and-call s4-0 (-> arg0 trans-hook)) @@ -1549,21 +1563,28 @@ (return 'dead) ) ) + ;; run the main thread! + ;; (format 0 "Code | Proc ~A | C1: ~X C2: ~X C3: ~X C4: ~X~%" (-> arg0 name) (-> *canary-1*) (-> *canary-2*) (-> *canary-3*) (-> *canary-4*)) (if (logtest? (-> arg0 mask) (process-mask sleep-code)) (set! (-> arg0 status) 'suspended) ((-> arg0 main-thread resume-hook) (-> arg0 main-thread)) ) + ;; (format 0 "Finished Code | Proc ~A | C1: ~X C2: ~X C3: ~X C4: ~X~%" (-> arg0 name) (-> *canary-1*) (-> *canary-2*) (-> *canary-3*) (-> *canary-4*)) (cond ((= (-> arg0 status) 'dead) (set! (-> s5-0 current-process) #f) 'dead ) (else + ;; run post. + ;; NOTE: post always runs on the dram stack, so you can use ja-post and use the scratchpad for anims. (when (-> arg0 post-hook) + ;; (format 0 "Post | Proc ~A | C1: ~X C2: ~X C3: ~X C4: ~X~%" (-> arg0 name) (-> *canary-1*) (-> *canary-2*) (-> *canary-3*) (-> *canary-4*)) (let ((s4-1 (new 'process 'cpu-thread arg0 'post 256 *kernel-dram-stack*))) (reset-and-call s4-1 (-> arg0 post-hook)) (delete s4-1) ) + ;; (format 0 "Finished Post | Proc ~A | C1: ~X C2: ~X C3: ~X C4: ~X~%" (-> arg0 name) (-> *canary-1*) (-> *canary-2*) (-> *canary-3*) (-> *canary-4*)) (when (= (-> arg0 status) 'dead) (set! (-> s5-0 current-process) #f) (return 'dead) @@ -2029,7 +2050,7 @@ ;; if we got the scratchpad stack, move to the fake scratchpad. (#when PC_PORT (when (= stack-pointer *scratch-memory-top*) - (set! stack-pointer (&+ *fake-scratchpad-stack* (* 32 1024))) + (set! stack-pointer (scratchpad-end)) ) ) (set! (-> this mask) diff --git a/goal_src/jak3/kernel/gstate.gc b/goal_src/jak3/kernel/gstate.gc index de0d382ffe..f6d54ca299 100644 --- a/goal_src/jak3/kernel/gstate.gc +++ b/goal_src/jak3/kernel/gstate.gc @@ -37,16 +37,17 @@ &key (stack-size #x4000) &key (stack *scratch-memory-top*) &key (unk 1) + &key (runtime #f) &rest args) "Start a new process and run an init function on it. Returns a pointer to the new process, or #f (or is it 0?) if something goes wrong." (with-gensyms (new-proc) - `(let ((,new-proc (the-as ,proc-type (get-process ,from ,proc-type ,stack-size ,unk)))) + `(let ((,new-proc (the-as ,(if runtime 'process proc-type) (get-process ,from ,proc-type ,stack-size ,unk)))) (when ,new-proc - ((method-of-type ,proc-type activate) ,new-proc ,to ,(if name name `(symbol->string ,proc-type)) ,stack) + ((method-of-type ,(if runtime 'process proc-type) activate) ,new-proc ,to ,(if name name `(symbol->string ,proc-type)) ,stack) (run-now-in-process ,new-proc ,(if init init (string->symbol (fmt #f "{}-init-by-other" proc-type))) ,@args) - (the (pointer ,proc-type) (-> ,new-proc ppointer)) + (the (pointer ,(if runtime 'process proc-type)) (-> ,new-proc ppointer)) ) ) ) @@ -185,8 +186,18 @@ ;; This way it can check the individual function types, make sure they make sense, and create ;; a state with the appropriate type. ,(cond + ((and virtual parent) + `(begin + (inherit-state ,new-state ,(if (pair? parent) `(method-of-type ,(car parent) ,(cadr parent)) `(the state ,parent))) + (set! (-> ,new-state parent) ,(if (pair? parent) `(method-of-type ,(car parent) ,(cadr parent)) `(the state ,parent))) + (define-virtual-state-hook ,state-name ,defstate-type ,new-state ,(eq? virtual 'override) :event ,event :enter ,enter :trans ,trans :exit ,exit :code ,code :post ,post) + ) + ) (virtual - `(define-virtual-state-hook ,state-name ,defstate-type ,new-state ,(eq? virtual 'override) :event ,event :enter ,enter :trans ,trans :exit ,exit :code ,code :post ,post) + `(begin + (set! (-> ,new-state parent) #f) + (define-virtual-state-hook ,state-name ,defstate-type ,new-state ,(eq? virtual 'override) :event ,event :enter ,enter :trans ,trans :exit ,exit :code ,code :post ,post) + ) ) (parent `(begin @@ -196,7 +207,10 @@ ) ) (#t - `(define-state-hook ,state-name ,defstate-type ,new-state :event ,event :enter ,enter :trans ,trans :exit ,exit :code ,code :post ,post) + `(begin + (set! (-> ,new-state parent) #f) + (define-state-hook ,state-name ,defstate-type ,new-state :event ,event :enter ,enter :trans ,trans :exit ,exit :code ,code :post ,post) + ) ) ) ) diff --git a/goal_src/jak3/kernel/gstring.gc b/goal_src/jak3/kernel/gstring.gc index 98c6cc32a7..af70c6fba2 100644 --- a/goal_src/jak3/kernel/gstring.gc +++ b/goal_src/jak3/kernel/gstring.gc @@ -447,6 +447,22 @@ ) ) +(defmacro is-whitespace-char? (c) + ;; 32 = space + ;; 9 = \t + ;; 13 = \r + ;; 10 = \n + `(or (= ,c 32) + (= ,c 9) + (= ,c 13) + (= ,c 10) + ) + ) + +(defmacro not-whitespace-char? (c) + `(not (is-whitespace-char? ,c)) + ) + (defun string-skip-whitespace ((arg0 (pointer uint8))) "Jump over whitespace chars." (while (and (nonzero? (-> arg0 0)) (or (= (-> arg0 0) 32) (= (-> arg0 0) 9) (= (-> arg0 0) 13) (= (-> arg0 0) 10))) @@ -799,4 +815,24 @@ (define *temp-string* (new 'global 'string 2048 (the-as string #f))) +(#when PC_PORT (define *pc-encoded-temp-string* (new 'global 'string 2048 (the-as string #f)))) + (kmemclose) + +(defmacro string-format (&rest args) + "Formats into *temp-string* and returns it, for in-place string formating. + DO NOT USE *temp-string* WITH THIS MACRO! It is read as input AFTER all of the args evaluate." + + `(begin + (format (clear *temp-string*) ,@args) + *temp-string* + ) + ) + +(defmacro temp-string-format (buf &rest args) + "Like [[string-format]], but takes a string as an argument." + `(begin + (format (clear ,buf) ,@args) + ,buf + ) + ) 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 1467bcba06..a7c627f619 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 6b99c10155..7b23a53d5f 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 6b5af2b48d..243580093e 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 92a60a8241..0e8842ebf1 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 31d472e017..66da253b34 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/common/trail-h.gc b/goal_src/jak3/levels/city/common/trail-h.gc index ab083fe78f..00254b93c3 100644 --- a/goal_src/jak3/levels/city/common/trail-h.gc +++ b/goal_src/jak3/levels/city/common/trail-h.gc @@ -10,6 +10,7 @@ :bitfield #t (tnf0 0) ;; unused?? (tnf1 1) + (tnf2 2) ) (defenum conn-flag @@ -21,6 +22,8 @@ (cf3 3) ) +(declare-type trail-graph basic) + ;; DECOMP BEGINS (deftype trail-node (structure) @@ -36,10 +39,11 @@ (flags trail-node-flag) (conn-count uint8) ) + :pack-me (:methods - (trail-node-method-9 () none) - (trail-node-method-10 () none) - (trail-node-method-11 () none) + (get-dist-score (_type_ vector) uint) + (debug-draw (_type_ int) none) + (get-position (_type_ vector) vector) ) ) @@ -67,8 +71,9 @@ (visgroup-id uint8) (cost uint16) ) + :pack-me (:methods - (trail-conn-method-9 () none) + (debug-draw (_type_ trail-graph int) none) ) ) @@ -79,6 +84,7 @@ (pov-count uint8) (first-pov uint16) ) + :pack-me ) @@ -158,31 +164,31 @@ (closed-bits vector16ub 2 :inline :overlay-at closed-quads) ) (:methods - (trail-graph-method-9 () none) - (trail-graph-method-10 () none) - (trail-graph-method-11 () none) - (trail-graph-method-12 () none) - (trail-graph-method-13 () none) - (trail-graph-method-14 () none) - (trail-graph-method-15 () none) - (trail-graph-method-16 () none) - (trail-graph-method-17 () none) - (trail-graph-method-18 () none) - (trail-graph-method-19 () none) - (trail-graph-method-20 () none) - (trail-graph-method-21 () none) - (trail-graph-method-22 () none) - (trail-graph-method-23 () none) - (trail-graph-method-24 () none) - (trail-graph-method-25 () none) - (trail-graph-method-26 () none) - (trail-graph-method-27 () none) - (trail-graph-method-28 () none) - (trail-graph-method-29 () none) - (trail-graph-method-30 () none) - (trail-graph-method-31 () none) - (trail-graph-method-32 () none) - (trail-graph-method-33 () none) + (trail-graph-method-9 (_type_ int) none) + (trail-graph-method-10 (_type_ int) none) + (trail-graph-method-11 (_type_ int int) trail-node) + (trail-graph-method-12 (_type_) none) + (trail-graph-method-13 (_type_ vector vector) none) + (debug-draw (_type_) none) + (trail-graph-method-15 (_type_ int) none) + (trail-graph-method-16 (_type_ int (pointer uint16) vector vector rgba float) none) + (trail-graph-method-17 (_type_) none) + (trail-graph-method-18 (_type_ vector) int) + (trail-graph-method-19 (_type_) none) + (trail-graph-method-20 (_type_ uint vector) none) + (trail-graph-method-21 (_type_) none) + (trail-graph-method-22 (_type_) none) + (trail-graph-method-23 (_type_) none) + (trail-graph-method-24 (_type_) none) + (trail-graph-method-25 (_type_ int) none) + (trail-graph-method-26 (_type_) none) + (trail-graph-method-27 (_type_) none) + (trail-graph-method-28 (_type_) none) + (trail-graph-method-29 (_type_) none) + (trail-graph-method-30 (_type_) none) + (trail-graph-method-31 (_type_ int) none) + (trail-graph-method-32 (_type_) none) + (trail-graph-method-33 (_type_) none) ) ) 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 9f6113ead3..4f92eb31b1 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 1e1932a1d9..ff6e0f376f 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 5ad96ca44d..7612aae52c 100644 --- a/goal_src/jak3/levels/city/traffic/traffic-manager.gc +++ b/goal_src/jak3/levels/city/traffic/traffic-manager.gc @@ -5,5 +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 +;; 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 0af02fe06e..72a4b94a34 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-effects.gc b/goal_src/jak3/levels/city/traffic/vehicle/vehicle-effects.gc index 985675f8d6..ece2e66243 100644 --- a/goal_src/jak3/levels/city/traffic/vehicle/vehicle-effects.gc +++ b/goal_src/jak3/levels/city/traffic/vehicle/vehicle-effects.gc @@ -7,3 +7,431 @@ ;; DECOMP BEGINS +(defmethod rigid-body-object-method-38 ((this vehicle)) + (cond + ((< 0.0 (-> this scrape-sound-envelope)) + (if (zero? (-> this scrape-sound-id)) + (set! (-> this scrape-sound-id) (new-sound-id)) + ) + (sound-play-by-name + (-> this info sound scrape-sound) + (-> this scrape-sound-id) + (the int (* 1024.0 (-> this scrape-sound-envelope))) + 0 + 0 + (sound-group) + (-> this impact-pos) + ) + ) + (else + (when (nonzero? (-> this scrape-sound-id)) + (sound-stop (-> this scrape-sound-id)) + (set! (-> this scrape-sound-id) (new 'static 'sound-id)) + 0 + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defun calc-fade-vals ((arg0 float)) + (let* ((f1-1 (* 0.00024414062 arg0)) + (f0-3 (- f1-1 (the float (the int f1-1)))) + (f1-3 (* 4096.0 (- f1-1 f0-3))) + (f1-5 (/ -1.0 (* (- 1.0 f0-3) f1-3))) + (f0-4 (/ f0-3 (- 1.0 f0-3))) + ) + (format #t ":fade-a ~,,10f~%:fade-b ~,,10f~%" f1-5 f0-4) + ) + (none) + ) + +(define *vehicle-headlight-glow-template* (new 'static 'sprite-glow-data + :position (new 'static 'vector :w 8192.0) + :size-probe 163.84 + :z-offset 819.2 + :size-y 8192.0 + :color (new 'static 'rgbaf :x 255.0 :y 128.0 :w 16.0) + :fade-a -0.0000122044 + :fade-b 8.997864 + :tex-id (new 'static 'texture-id :index #xd :page #x4) + ) + ) + +(define *vehicle-taillight-glow-template* (new 'static 'sprite-glow-data + :position (new 'static 'vector :w 3072.0) + :size-probe 122.88 + :z-offset 409.6 + :size-y 3072.0 + :color (new 'static 'rgbaf :x 255.0 :y 64.0 :w 16.0) + :fade-a -0.0000122044 + :fade-b 8.997864 + :tex-id (new 'static 'texture-id :index #xe :page #x4) + ) + ) + +(define *vehicle-thruster-glow-template* (new 'static 'sprite-glow-data + :position (new 'static 'vector :w 4096.0) + :size-probe 102.4 + :size-y 4096.0 + :color (new 'static 'rgbaf :x 255.0 :y 64.0 :w 16.0) + :fade-a -0.0000122044 + :fade-b 8.997864 + :tex-id (new 'static 'texture-id :index #xf :page #x4) + ) + ) + +(defmethod init! ((this vehicle-particle-common-info)) + (set! (-> this sp-system2d) *sp-particle-system-2d*) + (set! (-> this sp-system3d) *sp-particle-system-3d*) + (set! (-> this part-quat) *particle-quat*) + (set! (-> this part-vel) *particle-vel*) + (set! (-> this part-thruster) (-> *part-id-table* 922)) + (set! (-> this part-thruster-x) (-> *part-id-table* 922 init-specs 2)) + (set! (-> this part-spec2) (-> *part-id-table* 922 init-specs 3)) + (set! (-> this headlight-glow-template) *vehicle-headlight-glow-template*) + (set! (-> this taillight-glow-template) *vehicle-taillight-glow-template*) + (set! (-> this thruster-glow-template) *vehicle-thruster-glow-template*) + 0 + (none) + ) + +(define *vehicle-particle-common-info* (new 'static 'vehicle-particle-common-info)) + +(init! *vehicle-particle-common-info*) + +(defmethod vehicle-method-78 ((this vehicle)) + (local-vars (sv-224 sparticle-launcher) (sv-228 sparticle-launcher)) + (let ((a1-0 (-> this clock)) + (a0-1 (-> this traffic-priority-id)) + ) + (when (not (logtest? (logxor a0-1 (-> a1-0 integral-frame-counter)) 31)) + (let ((f0-1 + (+ (-> *time-of-day-context* time) (* 0.048387095 (the float (logand (-> this traffic-priority-id) 31)))) + ) + ) + (cond + ((and (logtest? (-> this v-flags) (vehicle-flag riding)) (or (< f0-1 7.0) (< 19.0 f0-1))) + (if (not (logtest? (vehicle-flag lights-on) (-> this v-flags))) + (vehicle-method-125 this) + ) + ) + (else + (if (logtest? (vehicle-flag lights-on) (-> this v-flags)) + (vehicle-method-126 this) + ) + ) + ) + ) + ) + ) + (when (logtest? (vehicle-flag lights-update) (-> this v-flags)) + (let ((f30-0 (if (logtest? (vehicle-flag lights-on) (-> this v-flags)) + 1.0 + 0.0 + ) + ) + ) + (seek! (-> this lights-factor) f30-0 (* 2.0 (seconds-per-frame))) + (if (= (-> this lights-factor) f30-0) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag lights-update)))) + ) + ) + ) + (let ((s5-0 (new 'stack-no-clear 'vehicle-stack-type3))) + (let* ((v1-38 (-> s5-0 mat0)) + (a3-0 (-> this node-list data 0 bone transform)) + (a0-14 (-> a3-0 rvec quad)) + (a1-3 (-> a3-0 uvec quad)) + (a2-1 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-38 rvec quad) a0-14) + (set! (-> v1-38 uvec quad) a1-3) + (set! (-> v1-38 fvec quad) a2-1) + (set! (-> v1-38 trans quad) a3-1) + ) + (set-vector! (-> s5-0 vec1) 0.0 0.0 -1.0 1.0) + (vector-rotate*! (-> s5-0 vec1) (-> s5-0 vec1) (-> s5-0 mat0)) + (set! (-> this fog-fade) (calc-fade-from-fog (-> this root trans))) + (set! (-> s5-0 float1) (* (-> this fog-fade) (-> this lights-factor))) + (when (< 0.0 (-> s5-0 float1)) + (dotimes (s4-0 (-> this info particles headlight-count)) + (quad-copy! + (the-as pointer (-> s5-0 glow)) + (the-as pointer (-> this info particle-common headlight-glow-template)) + 4 + ) + (vector-matrix*! (-> s5-0 vec0) (-> this info particles headlight-local-pos s4-0) (-> s5-0 mat0)) + (let* ((v1-46 (-> s5-0 glow)) + (a1-8 (-> s5-0 vec0)) + (f0-15 (-> v1-46 position w)) + ) + (set! (-> v1-46 position quad) (-> a1-8 quad)) + (set! (-> v1-46 position w) f0-15) + ) + 0 + (set! (-> s5-0 glow rot-angle) (* 182.04445 (rand-vu-float-range -17.0 -13.0))) + (set! (-> s5-0 glow color x) 255.0) + (set! (-> s5-0 glow color y) (rand-vu-float-range 192.0 255.0)) + (set! (-> s5-0 glow color w) (* (-> s5-0 float1) (rand-vu-float-range 16.0 18.0))) + (add! *simple-sprite-system* (-> s5-0 glow)) + (let ((f0-22 (-> this camera-dist2)) + (f1-7 245760.0) + ) + (when (< f0-22 (* f1-7 f1-7)) + (let ((f0-23 3276.8)) + (set! (-> s5-0 glow position w) f0-23) + (set! (-> s5-0 glow size-y) f0-23) + ) + (set! (-> s5-0 glow fade-a) -0.00001356) + (set! (-> s5-0 glow fade-b) 2.3332994) + (set! (-> s5-0 glow color z) (rand-vu-float-range 128.0 160.0)) + (set! (-> s5-0 glow color w) (* (-> s5-0 float1) (rand-vu-float-range 32.0 36.0))) + (add! *simple-sprite-system* (-> s5-0 glow)) + ) + ) + ) + (quad-copy! + (the-as pointer (-> s5-0 glow)) + (the-as pointer (-> this info particle-common taillight-glow-template)) + 4 + ) + (dotimes (s4-1 (-> this info particles taillight-count)) + (vector-matrix*! (-> s5-0 vec0) (-> this info particles taillight-local-pos s4-1) (-> s5-0 mat0)) + (let* ((v1-70 (-> s5-0 glow)) + (a1-20 (-> s5-0 vec0)) + (f0-29 (-> v1-70 position w)) + ) + (set! (-> v1-70 position quad) (-> a1-20 quad)) + (set! (-> v1-70 position w) f0-29) + ) + 0 + (set! (-> s5-0 glow rot-angle) (* 182.04445 (rand-vu-float-range -4.0 4.0))) + (set! (-> s5-0 glow color y) (* 64.0 (rand-vu))) + (set! (-> s5-0 glow color w) (* (-> s5-0 float1) (rand-vu-float-range 16.0 21.0))) + (add! *simple-sprite-system* (-> s5-0 glow)) + ) + ) + (when (logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (when (logtest? (vehicle-flag ignition) (-> this v-flags)) + (set! (-> *part-id-table* 923 init-specs 2 initial-valuef) + (* 6.0 (+ 0.25 (-> this engine-power-factor)) (rand-vu)) + ) + (let* ((f0-39 1.0) + (f1-12 (-> this engine-power-factor)) + (f0-40 (- f0-39 (* f1-12 f1-12))) + ) + (set! (-> *part-id-table* 923 init-specs 9 initial-valuef) (* 16.0 f0-40)) + (set! (-> *part-id-table* 923 init-specs 9 random-rangef) (* 48.0 f0-40)) + ) + (set! (-> s5-0 float0) + (* 0.2 (-> this info handling max-engine-thrust) (+ 0.5 (-> this engine-power-factor))) + ) + (let ((s4-2 (-> *part-id-table* 923))) + (dotimes (s3-0 2) + (vector-matrix*! (-> s5-0 vec0) (-> this info particles exhaust-local-pos s3-0) (-> s5-0 mat0)) + (vector-rotate*! (-> s5-0 vec1) (-> this info particles exhaust-local-dir s3-0) (-> s5-0 mat0)) + (vector+float*! (-> s5-0 vec2) (-> this rbody lin-velocity) (-> s5-0 vec1) (-> s5-0 float0)) + (let ((v1-116 (-> this info particle-common part-vel)) + (a0-40 (-> s5-0 vec2)) + (f0-46 300.0) + ) + (vector-float*! v1-116 a0-40 (/ 1.0 f0-46)) + ) + (set! (-> s4-2 birthaccum) (the-as float (-> this exhaust-part-accum s3-0))) + (let ((t9-23 sp-launch-particles-var) + (a0-41 (-> this info particle-common sp-system2d)) + (a1-33 s4-2) + (a2-9 *launch-matrix*) + ) + (set! (-> a2-9 trans quad) (-> s5-0 vec0 quad)) + (t9-23 a0-41 a1-33 a2-9 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (set! (-> this exhaust-part-accum s3-0) (the-as sparticle-launch-control (-> s4-2 birthaccum))) + ) + ) + ) + (when (< (-> this hit-points) 0.75) + (let* ((f28-1 (+ -32768.0 (* 32768.0 (rand-vu)))) + (f24-0 (* 65536.0 (rand-vu))) + (f30-10 (cos f28-1)) + (f28-2 (sin f28-1)) + (f26-0 (cos f24-0)) + ) + (set! (-> s5-0 vec3 x) (* f30-10 (sin f24-0))) + (set! (-> s5-0 vec3 y) f28-2) + (set! (-> s5-0 vec3 z) (* f30-10 f26-0)) + ) + (set! sv-224 (the-as sparticle-launcher #f)) + (set! sv-228 (the-as sparticle-launcher #f)) + (cond + ((< (-> this hit-points) 0.25) + (set! sv-224 (-> *part-id-table* 925)) + (set! sv-228 (-> *part-id-table* 921)) + ) + ((< (-> this hit-points) 0.5) + (set! sv-224 (-> *part-id-table* 928)) + ) + (else + (if (< (rand-vu) 0.05) + (set! sv-224 (-> *part-id-table* 930)) + ) + ) + ) + (when sv-224 + (set! (-> s5-0 byte0) 0) + (dotimes (s4-3 2) + (vector-matrix*! (-> s5-0 vec0) (-> this info particles smoke-local-pos s4-3) (-> s5-0 mat0)) + (vector-rotate*! (-> s5-0 vec2) (-> this info particles smoke-local-vel s4-3) (-> s5-0 mat0)) + (vector+! (-> s5-0 vec2) (-> s5-0 vec2) (-> this rbody lin-velocity)) + (vector+float*! (-> s5-0 vec2) (-> s5-0 vec2) (-> s5-0 vec3) (* 24576.0 (rand-vu))) + (let ((v1-155 (-> this info particle-common part-vel)) + (a0-50 (-> s5-0 vec2)) + (f0-63 300.0) + ) + (vector-float*! v1-155 a0-50 (/ 1.0 f0-63)) + ) + (when (and sv-228 (< (rand-vu) 0.005)) + (let ((t9-35 sp-launch-particles-var) + (a0-51 (-> this info particle-common sp-system2d)) + (a1-43 sv-228) + (a2-12 *launch-matrix*) + ) + (set! (-> a2-12 trans quad) (-> s5-0 vec0 quad)) + (t9-35 a0-51 a1-43 a2-12 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (+! (-> s5-0 byte0) 1) + ) + (set! (-> sv-224 birthaccum) (the-as float (-> this smoke-part-accum s4-3))) + (let ((t9-36 sp-launch-particles-var) + (a0-52 (-> this info particle-common sp-system2d)) + (a1-44 sv-224) + (a2-13 *launch-matrix*) + ) + (set! (-> a2-13 trans quad) (-> s5-0 vec0 quad)) + (t9-36 a0-52 a1-44 a2-13 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (set! (-> this smoke-part-accum s4-3) (the-as sparticle-launch-control (-> sv-224 birthaccum))) + ) + (if (> (-> s5-0 byte0) 0) + (sound-play "damage-zaps" :id (-> this damage-zap-sound-id)) + ) + ) + ) + (when (>= (-> this scrape-sound-envelope) 0.75) + (let ((a1-46 (-> *part-id-table* 920)) + (t9-38 sp-launch-particles-var) + (a0-55 (-> this info particle-common sp-system2d)) + (a2-15 *launch-matrix*) + ) + (set! (-> a2-15 trans quad) (-> this impact-pos quad)) + (t9-38 a0-55 a1-46 a2-15 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ) + 0 + (none) + ) + +(defun vehicle-draw-thruster ((arg0 vehicle-particle-common-info) (arg1 vehicle-draw-thruster-params)) + (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 'vehicle-thruster-work))) + (set! (-> s5-0 vec2 quad) (-> arg1 trans quad)) + (quaternion-copy! (-> s5-0 quat1) (-> arg1 quat)) + (quaternion-rotate-local-x! (-> s5-0 quat1) (-> s5-0 quat1) 32768.0) + (quaternion->matrix (the-as matrix (-> s5-0 quat0)) (-> s5-0 quat1)) + (set! (-> s5-0 vec4 quad) (-> s5-0 vec0 quad)) + (let ((f0-0 (rand-vu-float-range 1.0 1.33))) + (set! (-> s5-0 float0) (* f0-0 (-> arg1 length) (-> arg1 thrust))) + (set! (-> s5-0 float1) (fmin (* (-> arg1 width) f0-0) (* 0.5 (-> s5-0 float0)))) + ) + (let ((a1-5 (-> s5-0 vec3))) + (let ((v1-4 (-> arg1 trans))) + (let ((a0-9 (-> s5-0 vec4))) + (let ((a2-2 (* 0.25 (-> s5-0 float0)))) + (.mov vf7 a2-2) + ) + (.lvf vf5 (&-> a0-9 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-5 quad) vf6) + ) + (quad-copy! (the-as pointer (-> s5-0 glow)) (the-as pointer (-> arg0 thruster-glow-template)) 4) + (let* ((v1-5 (-> s5-0 glow)) + (a1-7 (-> s5-0 vec3)) + (f0-5 (-> v1-5 position w)) + ) + (set! (-> v1-5 position quad) (-> a1-7 quad)) + (set! (-> v1-5 position w) f0-5) + ) + 0 + (set! (-> s5-0 glow color y) (rand-vu-float-range 0.0 64.0)) + (set! (-> s5-0 glow color w) (* (-> arg1 fog-fade) (+ (* 16.0 (-> arg1 thrust)) (* 4.0 (rand-vu))))) + (let ((f0-13 (* 4.0 (-> s5-0 float1)))) + (set! (-> s5-0 glow position w) f0-13) + (set! (-> s5-0 glow size-y) f0-13) + (set! (-> s5-0 glow size-probe) (* 0.025 f0-13)) + ) + (add! *simple-sprite-system* (-> s5-0 glow)) + (let ((v1-15 (-> s5-0 vec3))) + (let ((a0-14 (-> arg1 trans))) + (let ((a1-11 (-> s5-0 vec4))) + (let ((a2-5 (* 0.5 (-> s5-0 float0)))) + (.mov vf7 a2-5) + ) + (.lvf vf5 (&-> a1-11 quad)) + ) + (.lvf vf4 (&-> a0-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 (&-> v1-15 quad) vf6) + ) + (set! (-> arg0 part-thruster-x initial-valuef) (-> s5-0 float1)) + (set! (-> arg0 part-spec2 initial-valuef) (-> s5-0 float0)) + (set! (-> s5-0 vec1 quad) (-> s5-0 vec3 quad)) + (launch-particles + :system (-> arg0 sp-system3d) + (-> arg0 part-thruster) + (the-as matrix (-> s5-0 quat0)) + :origin-is-matrix #t + ) + (quaternion-rotate-local-z! (-> s5-0 quat1) (-> s5-0 quat1) 10922.667) + (quaternion->matrix (the-as matrix (-> s5-0 quat0)) (-> s5-0 quat1)) + (set! (-> s5-0 vec1 quad) (-> s5-0 vec3 quad)) + (launch-particles + :system (-> arg0 sp-system3d) + (-> arg0 part-thruster) + (the-as matrix (-> s5-0 quat0)) + :origin-is-matrix #t + ) + (quaternion-rotate-local-z! (-> s5-0 quat1) (-> s5-0 quat1) 10922.667) + (quaternion->matrix (the-as matrix (-> s5-0 quat0)) (-> s5-0 quat1)) + (set! (-> s5-0 vec1 quad) (-> s5-0 vec3 quad)) + (launch-particles + :system (-> arg0 sp-system3d) + (-> arg0 part-thruster) + (the-as matrix (-> s5-0 quat0)) + :origin-is-matrix #t + ) + ) + 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 ee54c4c123..3208ade191 100644 --- a/goal_src/jak3/levels/city/traffic/vehicle/vehicle-h.gc +++ b/goal_src/jak3/levels/city/traffic/vehicle/vehicle-h.gc @@ -5,5 +5,782 @@ ;; name in dgo: vehicle-h ;; dgos: HGA, LPATK, RAILA, LFACCAR, CWI, WASALL, LFACTORY, COMBA +;; +++vehicle-wheel-flag +(defenum vehicle-wheel-flag + :type uint64 + :bitfield #t + (vwf0 0) + (vwf1 1) + (vwf2 2) + (vwf3 3) + (vwf4 4) + (vwf5 5) + ) +;; ---vehicle-wheel-flag + + +;; +++vehicle-seat-flag +(defenum vehicle-seat-flag + :type uint8 + :bitfield #t + (vsf0 0) + (vsf1 1) + (vsf2 2) + ) +;; ---vehicle-seat-flag + + +;; +++vehicle-flag +(defenum vehicle-flag + :type uint64 + :bitfield #t + (enable-collision 0) + (disturbed 1) + (damaged 2) + (dead 3) + (player-touching 4) + (player-edge-grabbing 5) + (player-standing-on 6) + (player-impulse-force 7) + (player-contact-force 8) + (persistent 9) + (impact 10) + (in-air 11) + (on-ground 12) + (on-flight-level 13) + (riding 14) + (player-grabbed 15) + (player-dismounting 16) + (player-driving 17) + (net-player-driving 18) + (ai-driving 19) + (waiting-for-player 20) + (ignition 21) + (nav-spheres 22) + (turbo-boost 23) + (reverse-gear 24) + (traffic-managed 25) + (flight-level-transition 26) + (flight-level-transition-ending 27) + (camera-bike-mode 28) + (camera-rapid-tracking-mode 29) + (camera 30) + (camera-inside-view 31) + (camera-look-mode 32) + (alert 33) + (in-pursuit 34) + (target-in-sight 35) + (rammed-target 36) + (sounds 37) + (particles 38) + (joints 39) + (lights-on 40) + (lights-update 41) + (lights-dead 42) + (no-hijack 43) + (unique 44) + (tracking-mode 45) + (overturned 46) + (gun-dark-2-zero-g 47) + (ignore-damage 48) + (ignore-impulse 49) + (player-killed 50) + (draw-marks 51) + (vf52 52) + (vf53 53) + (vf54 54) + (vf55 55) + (vf56 56) + ) +;; ---vehicle-flag + + +(deftype mystery-vehicle-type0 (structure) + "vehicle::check-player-get-on" + ((mat matrix 3 :inline :offset-assert 0) + (vec vector 2 :inline :offset-assert 192) + (proc handle 2 :offset-assert 224) + (cquery collide-query :inline :offset-assert 240) + (floats float 5 :offset-assert 780) + ) + ) + +(deftype mystery-vehicle-type1 (structure) + "vehicle::94" + ((vec0 vector :inline :offset 0) + (time uint32 :offset 0) + (word01 uint32 :offset 4) + (word00 uint32 :offset 8) + (float00 float :offset 16) + (word02 uint32 :offset 20) + ) + ) + +(deftype mystery-vehicle-type2 (structure) + "vehicle::93" + ((time uint32 :offset 0) + (word01 uint32 :offset 4) + (word00 uint32 :offset 8) + (float00 float :offset 16) + (word02 uint32 :offset 20) + ) + ) + +(deftype vehicle-thruster-work (structure) + ((quat0 quaternion :inline :offset 0) + (vec0 vector :inline :offset 32) + (vec1 vector :inline :offset 48) + (quat1 quaternion :inline :offset 64) + (vec2 vector :inline :offset 80) + (vec3 vector :inline :offset 96) + (vec4 vector :inline :offset 112) + (float0 float :offset 128) + (float1 float :offset 132) + (glow sprite-glow-data :inline :offset 144) + ) + ) + +(deftype vehicle-stack-type3 (structure) + ((vec0 vector :inline :offset 0) + (vec1 vector :inline :offset 16) + (vec2 vector :inline :offset 32) + (vec3 vector :inline :offset 48) + (mat0 matrix :inline :offset 64) + (glow sprite-glow-data :inline :offset 128) + (float0 float :offset 192) + (float1 float :offset 196) + (byte0 int8 :offset 200) + ) + ) + +(declare-type vehicle-physics-work structure) +(declare-type vehicle-wheel-state structure) + +;; +++vehicle-type-u8 +(defenum vehicle-type-u8 + :type uint8 + :copy-entries vehicle-type + ) +;; ---vehicle-type-u8 + + ;; DECOMP BEGINS +(deftype vehicle-info (structure) + ((handle-by-vehicle-type handle 44) + ) + ) + + +(deftype vehicle-lookup-info (structure) + ((turn-radius meters) + (throttle-turning float) + (throttle-straight float) + ) + ) + + +(deftype vehicle-control-point (structure) + ((local-pos vector :inline) + (normal vector :inline) + ) + ) + + +(deftype vehicle-attach-point (structure) + ((local-pos vector :inline) + (rot vector :inline) + ) + ) + + +(deftype vehicle-wheel-info (structure) + ((local-pos vector :inline) + (flags vehicle-wheel-flag) + (callback (function rigid-body-object vehicle-wheel-state vehicle-wheel-info none)) + (inertia float) + (radius float) + (susp-arm-length float) + (steer-arm-length float) + (scale float) + (travel float) + (probe-y-offset float) + (width float) + (suspension-spring float) + (suspension-damping float) + (forward-grip float) + (side-grip float) + (max-brake-torque float) + (camber float) + (settle-pos float) + (probe-radius float) + (tread-texture string) + (tread-tid texture-id) + ) + ) + + +(deftype vehicle-engine-info (structure) + ((max-torque float) + (inertia float) + (drag float) + (idle-rpm float) + (clutch-min-rpm float) + (clutch-max-rpm float) + (min-rpm float) + (max-rpm float) + (peak-torque-rpm float) + (powerband-width-rpm float) + ) + :pack-me + ) + + +(deftype vehicle-transmission-info (structure) + ((inertia float) + (upshift-rpm float) + (downshift-rpm float) + (final-drive-ratio float) + (gear-ratio-array float 8) + (gear-count int8) + ) + ) + + +(deftype vehicle-handling-info (structure) + ((max-engine-thrust meters) + (inv-max-engine-thrust float) + (engine-response-rate float) + (engine-intake-factor float) + (brake-factor float) + (turbo-boost-factor float) + (turbo-boost-duration uint16) + (max-xz-speed meters) + (player-turn-anim-bias float) + (player-turn-anim-min float) + (player-turn-anim-max float) + (pilot-x-accel-factor float) + (pilot-y-accel-factor float) + (pilot-z-accel-factor float) + (ground-probe-distance meters) + (ground-probe-offset meters) + (cos-ground-effect-angle float) + (spring-lift-factor float) + (air-steering-factor float) + (air-drag-factor float) + (steering-fin-angle float) + (steering-thruster-factor float) + (steering-thruster-max-gain float) + (steering-thruster-half-gain-speed meters) + (tire-steering-angle float) + (tire-steering-speed-factor float) + (tire-steering-speed-bias float) + (ackermann-factor float) + (tire-friction-factor float) + (tire-static-friction float) + (tire-static-friction-speed meters) + (tire-dynamic-friction float) + (tire-dynamic-friction-speed meters) + (tire-inv-max-friction-speed float) + (airfoil-factor float) + (drag-force-factor float) + (rolling-resistance float) + (speed-scrubbing-drag float) + (speed-limiting-drag float) + (pitch-control-factor float) + (roll-control-factor float) + (roll-angle float) + (jump-thrust-factor float) + (buoyancy-factor float) + (water-drag-factor float) + (player-weight float) + (player-shift-x meters) + (player-shift-z meters) + (air-roll-torque float) + (air-pitch-torque float) + (air-angular-damping float) + (hop-turn-torque float) + (ground-torque-scale float) + (ai-steering-factor float) + (ai-throttle-factor float) + ) + :pack-me + ) + + +(deftype vehicle-physics-model-info (structure) + ((lift-thruster-count int8) + (roll-thruster-count int8) + (stabilizer-count int8) + (inv-lift-thruster-count float) + (lift-thruster-array vehicle-attach-point 4 :inline) + (roll-thruster-array vehicle-attach-point 2 :inline) + (stabilizer-array vehicle-attach-point 6 :inline) + (engine-thrust-local-pos vector :inline) + (brake-local-pos vector :inline) + (wheel-count int8) + (drive-wheel-count int8) + (front-wheel vehicle-wheel-info :inline) + (rear-wheel vehicle-wheel-info :inline) + ) + ) + + +(deftype vehicle-camera-info (structure) + ((string-min-height meters) + (string-max-height meters) + (string-min-length meters) + (string-max-length meters) + (min-fov float) + (max-fov float) + (head-offset float) + (foot-offset float) + (normal-max-angle-offset float) + (air-max-angle-offset float) + (max-lookaround-speed float) + (look-pos-array vector 4 :inline) + (look-front vector :inline :overlay-at (-> look-pos-array 0)) + (look-left vector :inline :overlay-at (-> look-pos-array 1)) + (look-right vector :inline :overlay-at (-> look-pos-array 2)) + (look-rear vector :inline :overlay-at (-> look-pos-array 3)) + ) + ) + + +(deftype vehicle-sound-loop-info (structure) + ((sound sound-name) + (speed float) + (min-speed float) + (max-speed float) + (pitch-offset float) + (pitch-scale float) + (min-pitch float) + (max-pitch float) + ) + ) + + +(deftype vehicle-sound-info (structure) + ((engine-pitch-scale float) + (engine-pitch-offset float) + (engine-pitch-mod-amp float) + (engine-sound-select int8) + (thrust-sound sound-name :offset 16) + (scrape-sound sound-name) + (glance-sound sound-name) + (impact-sound sound-name) + (impact2-sound sound-name) + (explode-sound sound-name) + (explode2-sound sound-name) + (extra-sound sound-name) + (water-sound sound-name) + (jump-sound sound-name) + (turbo-sound sound-name) + (damage-sound sound-name) + (bank-replace pair) + (idle-rpm float) + (idle-pitch-scale float) + (idle-crossover-rpm float) + (engine-rpm float) + (engine-crossover-rpm float) + (start-sound sound-name :offset 240) + (stop-sound sound-name) + (idle-sound sound-name) + (engine-sound sound-name) + (engine-load-sound sound-name) + (susp-creak-sound sound-name) + (susp-bottom-out-sound sound-name) + (susp-speed-threshold float) + (tire-roll-sounds vehicle-sound-loop-info 4 :inline) + (tire-slide-sounds vehicle-sound-loop-info 2 :inline) + (tire-roll-hum-sound vehicle-sound-loop-info :inline :overlay-at (-> tire-roll-sounds 0)) + (tire-roll-dirt-sound vehicle-sound-loop-info :inline :offset 416) + (tire-roll-sand-sound vehicle-sound-loop-info :inline :offset 464) + (tire-roll-knobby-sound vehicle-sound-loop-info :inline :offset 512) + (tire-slide-road-sound vehicle-sound-loop-info :inline :overlay-at (-> tire-slide-sounds 0)) + (tire-slide-dirt-sound vehicle-sound-loop-info :inline :offset 608) + ) + ) + + +(deftype vehicle-particle-info (structure) + ((headlight-count int8) + (taillight-count int8) + (thruster-flame-width meters) + (thruster-flame-length meters) + (thruster-local-pos vector 2 :inline) + (exhaust-local-pos vector 2 :inline) + (exhaust-local-dir vector 2 :inline) + (smoke-local-pos vector 2 :inline) + (smoke-local-vel vector 2 :inline) + (headlight-local-pos vector 3 :inline) + (taillight-local-pos vector 2 :inline) + ) + ) + + +(deftype vehicle-section-info (structure) + ((damage-seg-array uint64 3) + (damage-seg-count int8) + ) + :pack-me + ) + + +(deftype vehicle-damage-info (structure) + ((inv-toughness-factor float) + (hit-points float) + (inv-hit-points float) + (hit-threshold float) + (hit-small float) + (hit-big float) + (hit-deadly float) + (impact-damage-factor float) + (section-count int8) + (section-array vehicle-section-info 4 :inline) + (section-bike-front vehicle-section-info :inline :overlay-at (-> section-array 0)) + (section-bike-rear vehicle-section-info :inline :offset 72) + (section-car-front-left vehicle-section-info :inline :overlay-at (-> section-array 0)) + (section-car-rear-left vehicle-section-info :inline :overlay-at section-bike-rear) + (section-car-front-right vehicle-section-info :inline :offset 104) + (section-car-rear-right vehicle-section-info :inline :offset 136) + ) + ) + + +(deftype vehicle-setup-info (structure) + ((settle-height float) + (settle-rot-x float) + (shadow-bot-clip float) + (shadow-locus-dist float) + (look-select uint8) + (color-option-count int8) + (color-option-select int8) + (color vector) + (gun-yaw-min float) + (gun-yaw-max float) + (gun-pitch-min float) + (gun-pitch-max float) + (gun-z-offset float) + ) + :pack-me + ) + + +(deftype vehicle-seat-info (structure) + ((data uint8 16) + (position vector :inline :overlay-at (-> data 0)) + (pos-x float :overlay-at (-> data 0)) + (pos-y float :overlay-at (-> data 4)) + (pos-z float :overlay-at (-> data 8)) + (angle int16 :overlay-at (-> data 12)) + (flags vehicle-seat-flag :overlay-at (-> data 14)) + ) + ) + + +(deftype vehicle-grab-rail-info (structure) + ((local-pos vector 2 :inline) + (normal vector :inline) + ) + ) + + +(deftype vehicle-rider-info (structure) + ((seat-count int8) + (rider-stance uint8) + (grab-rail-count int8) + (attach-point-count int8) + (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)) + ) + ) + + +(deftype vehicle-explosion-info (joint-exploder-static-params) + ((skel skeleton-group) + (skel-name string) + (anim int32) + ) + ) + + +(deftype vehicle-particle-common-info (structure) + ((sp-system2d sparticle-system) + (sp-system3d sparticle-system) + (part-thruster sparticle-launcher) + (part-thruster-x sp-field-init-spec) + (part-spec2 sp-field-init-spec) + (part-quat quaternion) + (part-vel vector) + (headlight-glow-template sprite-glow-data) + (taillight-glow-template sprite-glow-data) + (thruster-glow-template sprite-glow-data) + ) + (:methods + (init! (_type_) none) + ) + ) + + +(deftype rigid-body-vehicle-constants (rigid-body-object-constants) + ((flags uint32) + (object-type uint8) + (guard-type uint8) + (vehicle-type vehicle-type-u8) + (engine vehicle-engine-info :inline) + (transmission vehicle-transmission-info :inline) + (handling vehicle-handling-info :inline) + (target-speed-offset meters) + (turning-accel meters) + (camera vehicle-camera-info :inline) + (sound vehicle-sound-info :inline) + (particles vehicle-particle-info :inline) + (damage vehicle-damage-info :inline) + (physics-model vehicle-physics-model-info :inline) + (setup vehicle-setup-info :inline) + (rider vehicle-rider-info :inline) + (explosion vehicle-explosion-info) + (explosion-part int32) + (debris debris-static-params) + (name-text text-id) + (particle-common vehicle-particle-common-info) + ) + (:methods + (init-part! (_type_) none) + ) + ) + + +(deftype vehicle-section (structure) + ((damage float) + ) + :allow-misaligned + ) + + +(deftype vehicle (rigid-body-object) + ((info rigid-body-vehicle-constants :override) + (v-flags vehicle-flag :overlay-at flags) + (unknown-flags vehicle-flag :offset 296) + (squad squad-control) + (control-hook (function vehicle vehicle-controls)) + (controls vehicle-controls :inline) + (prev-controls vehicle-controls :inline) + (engine-power-factor float) + (force-scale float) + (target-distance2 meters) + (water-flags uint32) + (target-acceleration vector :inline) + (impact-pos vector :inline) + (impact-local-pos vector :inline) + (lin-acceleration vector :inline) + (hit-points float) + (damage-factor float) + (crash-level int8) + (force-level int8) + (traffic-hash-id int8) + (traffic-priority-id int8) + (power-fluctuation-factor float) + (power-level float) + (overlap-player-counter uint8) + (physics-counter uint8) + (cam-view int8) + (brake-factor float) + (cam-speed-interp float) + (camera-dist2 float) + (player-dist2 float) + (bound-radius float) + (rider-array handle 4) + (impact-proc handle) + (impact-pat uint32) + (impact-time uint32) + (prev-impact-time uint32) + (sent-attack-time uint32) + (air-time uint32) + (water-time uint32) + (offscreen-time uint32) + (crash-time uint32) + (turbo-boost-time uint32) + (player-dismount-time uint32) + (crash-duration uint16) + (turbo-boost-duration uint16) + (turbo-boost-factor float) + (crash-impulse float) + (water-height float) + (lights-factor float) + (outgoing-attack-id uint32) + (fog-fade float) + (scrape-sound-id sound-id) + (damage-zap-sound-id sound-id) + (scrape-sound-envelope float) + (exhaust-part-accum sparticle-launch-control 2) + (smoke-part-accum sparticle-launch-control 2) + (section-array vehicle-section 4 :inline) + ) + (:state-methods + inactive + waiting + player-control + crash + explode + die + ) + (:methods + (vehicle-method-62 (_type_) none) + (vehicle-method-63 (_type_) none) + (vehicle-method-64 (_type_) none) + (vehicle-method-65 (_type_) int) + (vehicle-method-66 (_type_ vector int) none) + (get-rider-in-seat (_type_ int) process) + (vehicle-method-68 (_type_) process) + (put-rider-in-seat (_type_ int process) 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) + (vehicle-method-74 (_type_ int time-frame) none) + (vehicle-method-75 (_type_) none) + (vehicle-method-76 (_type_) none) + (vehicle-method-77 (_type_) none) + (vehicle-method-78 (_type_) none) + (vehicle-method-79 (_type_) none) + (vehicle-method-80 (_type_) none) + (vehicle-method-81 (_type_) none) + (vehicle-method-82 (_type_) none) + (vehicle-method-83 (_type_) none) + (vehicle-method-84 (_type_) none) + (vehicle-method-85 (_type_) none) + (vehicle-method-86 (_type_) none) + (vehicle-method-87 (_type_) none) + (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) + (vehicle-method-92 (_type_ vehicle-controls) none) + (vehicle-method-93 (_type_) none) + (vehicle-method-94 (_type_) none) + (vehicle-method-95 (_type_ vector float) none) + (vehicle-method-96 (_type_ float) none) + (vehicle-method-97 (_type_ float vehicle-physics-work) none) + (vehicle-method-98 (_type_) none) + (vehicle-method-99 (_type_) none) + (vehicle-method-100 (_type_) none) + (vehicle-method-101 (_type_) none) + (vehicle-method-102 (_type_) symbol) + (vehicle-method-103 (_type_) none) + (vehicle-method-104 (_type_) none) + (vehicle-method-105 (_type_) none) + (vehicle-method-106 (_type_) none) + (vehicle-method-107 (_type_ int process) none) + (vehicle-method-108 (_type_ int) none) + (vehicle-method-109 (_type_) none) + (vehicle-method-110 (_type_) none) + (get-linear-accel! (_type_ vector) none) + (copy-vehicle-controls! (_type_ vehicle-controls) none) + (vehicle-method-113 (_type_ vector int int) none) + (vehicle-method-114 (_type_ int) none) + (vehicle-method-115 (_type_) none) + (vehicle-method-116 (_type_ symbol) none) + (vehicle-method-117 (_type_) none) + (vehicle-method-118 (_type_) none) + (vehicle-method-119 (_type_) none) + (apply-gravity (_type_ float) none) + (apply-gravity1 (_type_ float) none) + (vehicle-method-122 (_type_) none) + (vehicle-method-123 (_type_) none) + (vehicle-method-124 (_type_) none) + (vehicle-method-125 (_type_) none) + (vehicle-method-126 (_type_) none) + (check-player-get-on (_type_ process-focusable) symbol) + (vehicle-method-128 (_type_) symbol) + (vehicle-method-129 (_type_) none) + (vehicle-method-130 (_type_) none) + (vehicle-method-131 (_type_) none) + (vehicle-method-132 (_type_ traffic-object-spawn-params) 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) + (vehicle-method-137 (_type_) none) + (vehicle-method-138 (_type_) none) + (vehicle-method-139 (_type_) none) + (vehicle-method-140 (_type_) none) + (vehicle-method-141 (_type_) symbol) + (vehicle-method-142 (_type_) none) + (vehicle-method-143 (_type_ process) object) + (vehicle-method-144 (_type_) none) + (vehicle-method-145 (_type_) none) + (vehicle-method-146 (_type_ vector) none) + (vehicle-method-147 (_type_) none) + (vehicle-method-148 (_type_) none) + (vehicle-method-149 (_type_) none) + (vehicle-method-150 (_type_) none) + (set-hit-points (_type_ float) none) + ) + ) + + +(deftype vehicle-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) + (tire-force vector :inline) + (wheel-axis vector :inline) + ) + ) + + +(deftype vehicle-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) + (impulse float) + (vel-dot-norm float) + (friction-coef float) + (speed-factor float) + (probe-work-array vehicle-probe-work 4 :inline) + ) + ) + + +(deftype vehicle-draw-thruster-params (structure) + ((quat quaternion :inline) + (trans vector :inline) + (thrust float) + (width float) + (length float) + (fog-fade float) + ) + ) + + +(defun meters-per-sec->mph ((arg0 float)) + (* 0.00031568037 arg0) + ) + +(deftype debug-vehicle-work (basic) + ((impact-time time-frame) + (impact rigid-body-impact :inline) + (prim-sphere1 sphere :inline) + (prim-sphere2 sphere :inline) + ) + ) diff --git a/goal_src/jak3/levels/city/traffic/vehicle/vehicle-part.gc b/goal_src/jak3/levels/city/traffic/vehicle/vehicle-part.gc index 2436a1d341..1e34459e40 100644 --- a/goal_src/jak3/levels/city/traffic/vehicle/vehicle-part.gc +++ b/goal_src/jak3/levels/city/traffic/vehicle/vehicle-part.gc @@ -7,3 +7,709 @@ ;; DECOMP BEGINS +(defpart 916 + :init-specs ((:texture (common-white common)) + (:birth-func 'birth-func-laser-pointer) + (:num 1.0) + (:scale-x (meters 0.075) (meters 0.05)) + (:scale-y (meters 40)) + (:r 255.0) + (:g 0.0) + (:b :copy g) + (:a 20.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpart 917 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.2) (meters 0.15)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0 128.0) + (:b :copy g) + (:a 128.0) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 glow)) + (:userdata 1.0) + ) + ) + +(defpart 918 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0) + (:b :copy g) + (:a 48.0 16.0) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 glow)) + (:userdata 1.0) + ) + ) + +(defpart 919 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.2) (meters 0.025)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 32.0) + (:b :copy g) + (:a 128.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-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 920 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 1.0 2.0) + (:scale-x (meters 1.5)) + (:rot-x 4) + (:scale-y (meters 0.025) (meters 0.01)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 64.0) + (:omega (degrees 0.03375) (degrees 0.0225)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-r -0.85 -0.85) + (:fade-g -1.7 -1.7) + (:fade-b -8.0) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0016666667) (meters -0.00066666666)) + (:friction 0.96) + (:timer (seconds 0.167) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 921 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 5.0 2.0) + (:scale-x (meters 1.5)) + (:rot-x 4) + (:scale-y (meters 0.025) (meters 0.01)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 64.0) + (:omega (degrees 0.03375) (degrees 0.0225)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-r -0.85 -0.85) + (:fade-g -1.7 -1.7) + (:fade-b -8.0) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0016666667) (meters -0.00066666666)) + (:friction 0.96) + (:timer (seconds 0.167) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 922 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.4)) + (:scale-y (meters 3)) + (:r 128.0 128.0) + (:g 32.0 96.0) + (:b :copy g) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 923 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-set-vel) + (:num 0.1 0.2) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 196.0) + (:g 160.0) + (:b 96.0) + (:a 1.0 1.0) + (:scalevel-x (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:fade-a -0.64) + (:accel-y (meters 0.00016666666) (meters 0.0005)) + (:friction 0.94) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.167)) + (:next-launcher 924) + ) + ) + +(defpart 924 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0)) + ) + +(defpart 925 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-set-vel) + (:num 1.0 0.5) + (: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 128.0) + (:a 64.0 32.0) + (:vel-y (meters 0.00033333333) (meters 0.01)) + (:scalevel-x (meters 0.006666667) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -4.266667) + (:fade-b -4.266667) + (:accel-y (meters 0.00016666666) (meters 0.0005)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 0.1)) + (:next-launcher 926) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0.1)) + ) + ) + +(defpart 926 + :init-specs ((:scalevel-x (meters 0.005)) + (:scalevel-y :copy scalevel-x) + (:fade-r -8.5) + (:fade-g -4.266667) + (:fade-b 0.0) + (:next-time (seconds 0.1)) + (:next-launcher 927) + ) + ) + +(defpart 927 + :init-specs ((:r 0.0 64.0) + (:g :copy r) + (:b :copy g) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:fade-a -0.24615385 -0.64) + ) + ) + +(defpart 928 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-set-vel) + (:num 0.4) + (: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 255.0) + (:a 64.0 32.0) + (:vel-y (meters 0.00033333333) (meters 0.01)) + (:scalevel-x (meters 0.006666667) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r -4.266667 -4.266667) + (:fade-g :copy fade-r) + (:fade-b :copy fade-g) + (:accel-y (meters 0.00016666666) (meters 0.0005)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 0.1)) + (:next-launcher 929) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0.1)) + ) + ) + +(defpart 929 + :init-specs ((:r 0.0 128.0) + (:g :copy r) + (:b :copy g) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:fade-a -0.24615385 -0.64) + ) + ) + +(defpart 930 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-set-vel) + (:num 1.0 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 255.0) + (:a 64.0 32.0) + (:vel-y (meters 0.00033333333) (meters 0.01)) + (:scalevel-x (meters 0.006666667) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r -4.266667 -4.266667) + (:fade-g :copy fade-r) + (:fade-b :copy fade-g) + (:accel-y (meters 0.00016666666) (meters 0.0005)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 0.1)) + (:next-launcher 929) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0.1)) + ) + ) + +(defpartgroup group-vehicle-explosion + :id 224 + :duration (seconds 2) + :linger-duration (seconds 1) + :flags (sp0 sp5 sp6) + :bounds (static-bspherem 0 0 0 15) + :rotate ((degrees 0) (degrees 90) (degrees 0)) + :parts ((sp-item 931 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 932 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 933 :period (seconds 3) :length (seconds 0.05)) + (sp-item 934 :fade-after (meters 60) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 935 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 936 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 937 :fade-after (meters 150) :falloff-to (meters 150) :period (seconds 3) :length (seconds 0.067) :offset 30) + ) + ) + +(defpart 932 + :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 938) + ) + ) + +(defpart 938 + :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 937 + :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 939) + (:conerot-x '*sp-temp*) + ) + ) + +(defpart 936 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 0.2) + (: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 939) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +(defpart 939 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:next-time (seconds 0.017) (seconds 0.065)) (:next-launcher 940)) + ) + +(defpart 940 + :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 941) + ) + ) + +(defpart 941 + :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 942) + ) + ) + +(defpart 942 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.1125)) + ) + +(defpart 931 + :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 943) + ) + ) + +(defpart 943 + :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 935 + :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 944) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +(defpart 944 + :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 945) + ) + ) + +(defpart 945 + :init-specs ((:fade-r -0.5543478) (:fade-g -0.5543478) (:fade-a -0.13913043)) + ) + +(defpart 933 + :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 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 946) + (:conerot-x (degrees -1440) (degrees 2880)) + ) + ) + +(defpart 946 + :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 947) + ) + ) + +(defpart 947 + :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 934 + :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)) + ) + ) + +(defpartgroup group-vehicle-engine-start + :id 225 + :duration (seconds 0.535) + :linger-duration (seconds 1) + :flags (sp0 sp4 sp6) + :bounds (static-bspherem 0 0 0 15) + :rotate ((degrees 0) (degrees 90) (degrees 0)) + :parts ((sp-item 948 :flags (sp7) :period (seconds 1) :length (seconds 0.017)) + (sp-item 949 :flags (sp7) :period (seconds 1) :length (seconds 0.535)) + (sp-item 949 :flags (sp7) :period (seconds 1) :length (seconds 0.335)) + (sp-item 949 :flags (sp7) :period (seconds 1) :length (seconds 0.235)) + (sp-item 949 :flags (sp7) :period (seconds 1) :length (seconds 0.135)) + (sp-item 949 :flags (sp7) :period (seconds 1) :length (seconds 0.067)) + (sp-item 949 :flags (sp7) :period (seconds 1) :length (seconds 0.05)) + (sp-item 949 :flags (sp7) :period (seconds 1) :length (seconds 0.035)) + (sp-item 949 :flags (sp7) :period (seconds 1) :length (seconds 0.017)) + (sp-item 950 :flags (sp7) :period (seconds 1) :length (seconds 0.035)) + (sp-item 951 :period (seconds 1) :length (seconds 0.017)) + ) + ) + +(defpart 951 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0) + (:scalevel-x (meters 0.1)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -6.4) + (:fade-b -12.75) + (:fade-a -1.6) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpart 950 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 3.0 3.0) + (:scale-x (meters 1.5)) + (:rot-x 4) + (:scale-y (meters 0.025) (meters 0.01)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 64.0) + (:omega (degrees 0.03375) (degrees 0.0225)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-r -0.85 -0.85) + (:fade-g -1.7 -1.7) + (:fade-b -8.0) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0016666667) (meters -0.00066666666)) + (:friction 0.96) + (:timer (seconds 0.167) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 948 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 16.0) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 196.0) + (:g 160.0) + (:b 96.0) + (:a 64.0 64.0) + (:vel-y (meters 0.013333334) (meters 0.013333334)) + (:scalevel-x (meters 0.006666667)) + (:rotvel-z (degrees -0.6) (degrees 1.2)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.0) + (:fade-g -1.0) + (:fade-b 1.0) + (:fade-a -0.21333334 -0.85333335) + (:accel-y (meters 0.00033333333) (meters 0.0005)) + (:friction 0.92 0.02) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.085)) + (:next-launcher 952) + (:conerot-x (degrees -30) (degrees 30)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 952 + :init-specs ((:fade-r 0.0 -0.85333335) (:fade-g :copy fade-r) (:fade-b :copy fade-g)) + ) + +(defpart 949 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 196.0) + (:g 160.0) + (:b 96.0) + (:a 32.0 32.0) + (:vel-y (meters 0.006666667) (meters 0.013333334)) + (:scalevel-x (meters 0.0016666667)) + (:rotvel-z (degrees -0.6) (degrees 1.2)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.0) + (:fade-g -1.0) + (:fade-b 1.0) + (:fade-a -0.21333334 -0.85333335) + (:accel-y (meters 0.00033333333) (meters 0.0005)) + (:friction 0.92 0.02) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.085)) + (:next-launcher 952) + (:conerot-x (degrees -10) (degrees 20)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + ) + ) diff --git a/goal_src/jak3/levels/city/traffic/vehicle/vehicle-physics.gc b/goal_src/jak3/levels/city/traffic/vehicle/vehicle-physics.gc index d0408dc0ce..36b456d781 100644 --- a/goal_src/jak3/levels/city/traffic/vehicle/vehicle-physics.gc +++ b/goal_src/jak3/levels/city/traffic/vehicle/vehicle-physics.gc @@ -7,3 +7,81 @@ ;; DECOMP BEGINS +(defmethod vehicle-method-95 ((this vehicle) (arg0 vector) (arg1 float)) + (let ((f0-1 (- (-> arg0 y) (-> arg0 w)))) + (when (< f0-1 (-> this water-height)) + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (set! (-> s5-0 rvec quad) (-> arg0 quad)) + (let ((s3-0 (-> this info)) + (f1-3 (fmin (-> this water-height) (+ (-> arg0 y) (-> arg0 w)))) + ) + 0.0 + (let* ((f2-4 (fmax -1.0 (fmin 1.0 (/ (- (-> this water-height) (-> arg0 y)) (-> arg0 w))))) + (f30-0 (+ 0.5 (* -0.25 f2-4 f2-4 f2-4) (* 0.75 f2-4))) + ) + (set! (-> s5-0 rvec y) (* 0.5 (+ f0-1 f1-3))) + (rigid-body-control-method-23 (-> this rbody) (-> s5-0 rvec) (-> s5-0 fvec)) + (let* ((f0-8 + (* 0.025132721 (vector-length (-> s5-0 fvec)) (-> s3-0 handling water-drag-factor) (-> s3-0 info mass) f30-0) + ) + (f1-7 (-> arg0 w)) + (f0-9 (* f0-8 (* f1-7 f1-7))) + (f1-10 68719480000.0) + (f0-11 (fmin (* f0-9 (/ 1.0 f1-10)) (* 0.125 (/ 1.0 arg1) (-> s3-0 info mass)))) + ) + (vector-float*! (-> s5-0 uvec) (-> s5-0 fvec) (* -1.0 f0-11)) + ) + (apply-impact! (-> this rbody) (-> s5-0 rvec) (-> s5-0 uvec)) + (vector-reset! (-> s5-0 uvec)) + (let ((f0-18 (* 514718.12 (-> s3-0 handling buoyancy-factor) f30-0 (-> arg0 w) (-> arg0 w) (-> arg0 w))) + (f1-21 68719480000.0) + ) + (set! (-> s5-0 uvec y) (* f0-18 (/ 1.0 f1-21))) + ) + ) + ) + (apply-impact! (-> this rbody) (-> s5-0 rvec) (-> s5-0 uvec)) + ) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-96 ((this vehicle) (arg0 float)) + (let ((s4-0 (-> this root root-prim)) + (s3-0 1) + ) + (when (< (-> this rbody position y) (+ (-> this water-height) (-> s4-0 local-sphere w))) + (when (zero? (-> s4-0 prim-core prim-type)) + (let ((v1-5 s4-0)) + (set! s4-0 (-> (the-as collide-shape-prim-group v1-5) child 0)) + (set! s3-0 (the-as int (-> v1-5 specific 0))) + ) + ) + (while (nonzero? s3-0) + (+! s3-0 -1) + (when (= (-> s4-0 prim-core prim-type) -1) + (let ((a1-1 (-> s4-0 prim-core))) + (if (< (- (-> a1-1 world-sphere y) (-> a1-1 world-sphere w)) (-> this water-height)) + (vehicle-method-95 this (the-as vector a1-1) arg0) + ) + ) + ) + (&+! s4-0 80) + ) + ) + ) + 0 + (none) + ) + +(defmethod apply-gravity ((this vehicle) (arg0 float)) + (apply-gravity! this arg0) + (none) + ) + +(defmethod apply-gravity1 ((this vehicle) (arg0 float)) + (apply-gravity! this arg0) + (none) + ) diff --git a/goal_src/jak3/levels/city/traffic/vehicle/vehicle-states.gc b/goal_src/jak3/levels/city/traffic/vehicle/vehicle-states.gc index 453d920b32..6009f2b577 100644 --- a/goal_src/jak3/levels/city/traffic/vehicle/vehicle-states.gc +++ b/goal_src/jak3/levels/city/traffic/vehicle/vehicle-states.gc @@ -7,3 +7,370 @@ ;; DECOMP BEGINS +(defstate idle (vehicle) + :virtual #t + :event vehicle-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (disable-physics! self) + (go-virtual waiting) + ) + :code sleep-code + :post (behavior () + (ja-post) + ) + ) + +(defstate inactive (vehicle) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('nav-mesh-kill 'traffic-activate 'traffic-off-force 'traffic-off 'rider-on 'rider-off) + (rbody-event-handler self proc argc message block) + ) + ) + ) + :enter (behavior () + (logior! (-> self focus-status) (focus-status disable inactive)) + (disable-physics! self) + (rigid-body-object-method-43 self) + (vehicle-method-81 self) + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + :exit (behavior () + (rigid-body-object-method-42 self) + (logclear! (-> self focus-status) (focus-status disable inactive)) + (logclear! (-> self draw status) (draw-control-status no-draw)) + ) + :code sleep-code + ) + +(defstate waiting (vehicle) + :virtual #t + :event vehicle-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (vehicle-method-136 self) + (logior! (-> self v-flags) (vehicle-flag waiting-for-player nav-spheres)) + (logclear! (-> self v-flags) (vehicle-flag riding player-driving)) + (update-transforms (-> self root)) + (vehicle-method-140 self) + (let ((v1-13 (find-prim-by-id-logtest (-> self root) (the-as uint 32)))) + (when v1-13 + (set! (-> v1-13 prim-core collide-with) (collide-spec)) + (set! (-> v1-13 prim-core collide-as) (collide-spec)) + 0 + ) + ) + ) + :exit (behavior () + (logclear! (-> self v-flags) (vehicle-flag waiting-for-player)) + (let ((v1-3 (find-prim-by-id-logtest (-> self root) (the-as uint 32)))) + (when v1-3 + (set! (-> v1-3 prim-core collide-with) (collide-spec + backgnd + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> v1-3 prim-core collide-as) (collide-spec vehicle-sphere)) + ) + ) + ) + :trans #f + :code sleep-code + :post (behavior () + (vehicle-method-118 self) + ) + ) + +(defstate player-control (vehicle) + :virtual #t + :event vehicle-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (iterate-prims (-> self root) (lambda ((arg0 collide-shape-prim)) + (when (!= (-> arg0 prim-core prim-type) 1) + (logior! (-> arg0 prim-core collide-as) (collide-spec jak)) + (logior! (-> arg0 prim-core collide-with) (collide-spec blocking-plane)) + ) + (none) + ) + ) + (vehicle-method-135 self) + (logior! (-> self v-flags) (vehicle-flag riding player-driving nav-spheres)) + (set! (-> self v-flags) + (the-as + vehicle-flag + (logclear (-> self v-flags) (vehicle-flag reverse-gear camera-inside-view camera-look-mode)) + ) + ) + (set! (-> self unknown-flags) + (the-as vehicle-flag (logclear (-> self unknown-flags) (vehicle-flag camera-inside-view))) + ) + (set! (-> self controls flags) (vehicle-controls-flag)) + (set! (-> self controls prev-flags) (vehicle-controls-flag)) + (set! (-> self control-hook) + (the-as (function vehicle vehicle-controls) (method-of-object self control-hook-player)) + ) + (set! (-> self max-time-step) 0.02) + (apply-momentum! self) + (vehicle-method-99 self) + (vehicle-method-80 self) + (logior! (-> self root penetrated-by) (penetrate jak-yellow-shot jak-red-shot jak-blue-shot jak-dark-shot)) + 0 + ) + :exit (behavior () + (logclear! (-> self root penetrated-by) (penetrate jak-yellow-shot jak-red-shot jak-blue-shot jak-dark-shot)) + (iterate-prims (-> self root) (lambda ((arg0 collide-shape-prim)) + (when (!= (-> arg0 prim-core prim-type) 1) + (logclear! (-> arg0 prim-core collide-as) (collide-spec jak)) + (logclear! (-> arg0 prim-core collide-with) (collide-spec blocking-plane)) + ) + (none) + ) + ) + (if (and (not (logtest? (-> self info flags) 9216)) + (not (-> *setting-control* user-current pilot-death)) + (= (send-event *target* 'query 'mode) 'pilot) + ) + (send-event *target* 'end-mode 'pilot) + ) + (set! (-> self max-time-step) 0.033333335) + (vehicle-method-81 self) + (impulse-handler self) + (set! (-> self v-flags) + (the-as + vehicle-flag + (logclear (-> self v-flags) (vehicle-flag player-driving reverse-gear camera-inside-view camera-look-mode)) + ) + ) + (set! (-> self controls flags) (vehicle-controls-flag)) + (set! (-> self controls prev-flags) (vehicle-controls-flag)) + (remove-setting! 'sound-flava) + ) + :trans (behavior () + (set! (-> self v-flags) (the-as vehicle-flag (logclear (-> self v-flags) (vehicle-flag gun-dark-2-zero-g)))) + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (if (not *target*) + (go-virtual waiting) + ) + (when (and (cpad-pressed? 0 triangle) (and (not (logtest? (-> self info flags) 1024)) + (-> *setting-control* user-current pilot-exit) + (not (focus-test? *target* dead hit grabbed)) + (!= (-> self crash-level) 3) + (< (-> self water-height) (-> self rbody position y)) + ) + ) + (when (send-event *target* 'end-mode 'pilot) + (let ((v1-32 (find-prim-by-id-logtest (-> self root) (the-as uint 64)))) + (if v1-32 + (set! (-> v1-32 prim-core collide-as) (collide-spec vehicle-sphere)) + ) + ) + (logior! (-> self v-flags) (vehicle-flag player-dismounting)) + (set! (-> self player-dismount-time) (the-as uint (current-time))) + (go-virtual waiting) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (local-vars (a0-3 int) (a0-5 int)) + (let* ((v1-1 (-> *perf-stats* data 18)) + (a0-0 (-> v1-1 ctrl)) + ) + (+! (-> v1-1 count) 1) + (b! (zero? a0-0) cfg-2 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-0) + ) + (.sync.l) + (.sync.p) + (label cfg-2) + 0 + (vehicle-method-119 self) + (let ((v1-6 (-> *perf-stats* data 18))) + (b! (zero? (-> v1-6 ctrl)) cfg-4 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-3 pcr0) + (+! (-> v1-6 accum0) a0-3) + (.mfpc a0-5 pcr1) + (+! (-> v1-6 accum1) a0-5) + ) + (label cfg-4) + 0 + ) + ) + +(defstate crash (vehicle) + :virtual #t + :event vehicle-event-handler + :enter (behavior () + (logclear! (-> self v-flags) (vehicle-flag player-driving net-player-driving)) + (set-time! (-> self state-time)) + (vehicle-method-124 self) + (set! (-> self crash-level) 3) + (vehicle-method-81 self) + (dotimes (gp-0 (-> self info rider seat-count)) + (send-event (handle->process (-> self rider-array gp-0)) 'vehicle-crash) + ) + ) + :trans (behavior () + (set! (-> self hit-points) (- (-> self hit-points) (* 0.5 (seconds-per-frame)))) + (if (and (time-elapsed? (-> self state-time) 1) (< (-> self hit-points) -0.25)) + (go-virtual explode) + ) + ) + :code sleep-code + :post (behavior () + (vehicle-method-117 self) + ) + ) + +(defbehavior vehicle-explode-post vehicle () + (local-vars (v1-42 float) (v1-47 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set! (-> self camera-dist2) (vector-vector-distance-squared (-> self root trans) (camera-pos))) + (set! (-> self player-dist2) (vector-vector-distance-squared (-> self root trans) (target-pos 0))) + (cond + ((logtest? (-> self draw status) (draw-control-status on-screen)) + (set! (-> self offscreen-time) (the-as uint (current-time))) + ) + (else + (let ((v1-7 (new 'stack-no-clear 'array 'uint32 1))) + (set! (-> v1-7 0) (the-as uint (current-time))) + (if (or (>= (- (-> v1-7 0) (-> self offscreen-time)) (the-as uint 1500)) + (let ((f0-2 409600.0)) + (< (* f0-2 f0-2) (-> self camera-dist2)) + ) + ) + (go-virtual die) + ) + ) + ) + ) + (let ((f0-5 819200.0)) + (if (< (* f0-5 f0-5) (-> self camera-dist2)) + (go-virtual die) + ) + ) + (cond + ((logtest? (-> self rbody flags) (rigid-body-flag enable-physics)) + (vehicle-method-117 self) + (when (and (logtest? (-> self v-flags) (vehicle-flag disturbed)) (logtest? (-> self v-flags) (vehicle-flag impact))) + (let* ((f0-9 (* 0.0033333334 (the float (- (current-time) (-> self disturbed-time))))) + (f0-12 (* f0-9 f0-9 (-> self camera-dist2))) + (f1-5 0.000016276043) + (f0-13 (* f0-12 (* f1-5 f1-5))) + ) + (.lvf vf1 (&-> (-> self 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-42 vf1) + (if (and (< v1-42 f0-13) (begin + (.lvf vf1 (&-> (-> self 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-47 vf1) + (let ((f1-9 v1-47) + (f2-0 614.4) + ) + (< f1-9 (* f0-13 (* f2-0 f2-0))) + ) + ) + ) + (logclear! (-> self v-flags) (vehicle-flag disturbed)) + ) + ) + ) + (when (not (vehicle-method-102 self)) + (disable-physics! self) + (let ((gp-2 (-> self rbody))) + (logclear! (-> gp-2 flags) (rigid-body-flag enable-physics active)) + (vehicle-method-142 self) + (set! (-> gp-2 force quad) (the-as uint128 0)) + (set! (-> gp-2 torque quad) (the-as uint128 0)) + ) + 0 + (logior! (-> self v-flags) (vehicle-flag nav-spheres)) + (vehicle-method-140 self) + ) + ) + (else + (rigid-body-object-method-30 self) + ) + ) + 0 + (none) + ) + ) + +(defstate explode (vehicle) + :virtual #t + :event vehicle-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (vehicle-method-116 self 'big-explosion) + (logior! (-> self focus-status) (focus-status dead)) + (set! (-> self crash-level) 3) + (set! (-> self force-level) 3) + (logclear! (-> self v-flags) (vehicle-flag persistent player-driving net-player-driving)) + (set! (-> self v-flags) (the-as vehicle-flag (logior (vehicle-flag lights-dead) (-> self v-flags)))) + (vehicle-method-126 self) + (sound-play-by-name (-> self info sound explode-sound) (new-sound-id) 1024 0 0 (sound-group) #t) + (sound-play-by-name (-> self info sound explode2-sound) (new-sound-id) 1024 0 0 (sound-group) #t) + (vehicle-method-106 self) + (vehicle-method-136 self) + (vehicle-method-100 self) + ) + :code sleep-code + :post (behavior () + (vehicle-explode-post) + ) + ) + +(defstate die (vehicle) + :virtual #t + :code (behavior () + (cond + ((logtest? (vehicle-flag traffic-managed) (-> self v-flags)) + (send-event (ppointer->process (-> self parent)) 'child-killed) + (vehicle-method-109 self) + ) + (else + (cleanup-for-death self) + ) + ) + ) + ) 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 dadce99884..4d1ac7255e 100644 --- a/goal_src/jak3/levels/city/traffic/vehicle/vehicle-util.gc +++ b/goal_src/jak3/levels/city/traffic/vehicle/vehicle-util.gc @@ -7,3 +7,1254 @@ ;; DECOMP BEGINS +(defmethod init-part! ((this rigid-body-vehicle-constants)) + (set! (-> this particle-common) *vehicle-particle-common-info*) + (init! (-> this particle-common)) + 0 + (none) + ) + +(deftype vehicle-hud-request (structure) + ((handle handle) + (hack-handle-init symbol :overlay-at handle) + (priority float) + ) + :pack-me + ) + + +(deftype vehicle-hud-requests (structure) + ((time time-frame) + (requests vehicle-hud-request 4 :inline) + ) + :pack-me + (:methods + (vehicle-hud-requests-method-9 (_type_) none) + (vehicle-hud-requests-method-10 (_type_) vehicle-hud-request) + (vehicle-hud-requests-method-11 (_type_) vehicle-hud-request) + ) + ) + + +(defmethod vehicle-hud-requests-method-9 ((this vehicle-hud-requests)) + (dotimes (v1-0 4) + (let ((a1-2 (-> this requests v1-0))) + (set! (-> a1-2 handle) (the-as handle #f)) + (set! (-> a1-2 priority) 0.0) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-hud-requests-method-10 ((this vehicle-hud-requests)) + (let ((v1-0 0)) + (let ((f0-0 0.0)) + (countdown (a1-0 4) + (let ((a2-2 (-> this requests a1-0))) + (when (and (handle->process (-> a2-2 handle)) (< f0-0 (-> a2-2 priority))) + (set! v1-0 a1-0) + (set! f0-0 (-> a2-2 priority)) + ) + ) + ) + ) + (-> this requests v1-0) + ) + ) + +(defmethod vehicle-hud-requests-method-11 ((this vehicle-hud-requests)) + (let ((v1-0 0)) + (let ((f0-0 (the-as float #x7f800000)) + (a1-1 4) + ) + (b! #t cfg-10 :delay (nop!)) + (label cfg-1) + (+! a1-1 -1) + (let ((a2-2 (-> this requests a1-1))) + (b! (handle->process (-> a2-2 handle)) cfg-8 :delay (empty-form)) + (set! v1-0 a1-1) + (set! (-> a2-2 priority) 0.0) + (b! #t cfg-12 :delay (nop!)) + (label cfg-8) + (when (< (-> a2-2 priority) f0-0) + (set! v1-0 a1-1) + (set! f0-0 (-> a2-2 priority)) + ) + ) + (label cfg-10) + (b! (nonzero? a1-1) cfg-1 :delay (nop!)) + ) + (label cfg-12) + (-> this requests v1-0) + ) + ) + +(deftype vehicle-hud-chooser (structure) + ((cur vehicle-hud-requests :inline) + (last vehicle-hud-requests :inline) + ) + (:methods + (vehicle-hud-chooser-method-9 (_type_ handle float) symbol) + ) + ) + + +(defmethod vehicle-hud-chooser-method-9 ((this vehicle-hud-chooser) (arg0 handle) (arg1 float)) + (let ((s3-0 (current-time))) + (when (!= s3-0 (-> this cur time)) + (if (zero? (-> this cur time)) + (vehicle-hud-requests-method-9 (-> this cur)) + ) + (mem-copy! (the-as pointer (-> this last)) (the-as pointer (-> this cur)) 72) + (set! (-> this cur time) s3-0) + (vehicle-hud-requests-method-9 (-> this cur)) + ) + ) + (let ((v1-10 (vehicle-hud-requests-method-11 (-> this cur)))) + (when (< (-> v1-10 priority) arg1) + (set! (-> v1-10 handle) arg0) + (set! (-> v1-10 priority) arg1) + ) + ) + (let ((s4-1 #f)) + (let ((v1-12 (vehicle-hud-requests-method-10 (-> this last)))) + (if (and (handle->process arg0) (= (-> v1-12 handle) arg0)) + (set! s4-1 #t) + ) + ) + s4-1 + ) + ) + +(define *vehicle-hud-chooser* (new 'static 'vehicle-hud-chooser)) + +(define *pilot-edge-grab-info* (new 'static 'pilot-edge-grab-info)) + +(defmethod deactivate ((this vehicle)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (vehicle-method-106 this) + (call-parent-method this) + (none) + ) + +;; WARN: Return type mismatch entity-perm-status vs object. +(defmethod init-from-entity! ((this vehicle) (arg0 entity-actor)) + (process-entity-status! this (entity-perm-status dead) #t) + ) + +(defmethod rigid-body-object-method-37 ((this vehicle)) + (let ((t9-0 (method-of-type rigid-body-object rigid-body-object-method-37))) + (t9-0 this) + ) + (cond + ((logtest? #x10000 (-> this info flags)) + (set! (-> this rbody force-callback) (method-of-object this apply-gravity)) + ) + ((logtest? #x20000 (-> this info flags)) + (set! (-> this rbody force-callback) (method-of-object this apply-gravity1)) + ) + ) + (vehicle-method-62 this) + (init-part! (-> this info)) + (none) + ) + +(defmethod check-player-get-on ((this vehicle) (arg0 process-focusable)) + (with-pp + (and (not (focus-test? arg0 dead grabbed in-head under-water pole flut tube pilot)) + (or (not (focus-test? arg0 edge-grab)) (logtest? (-> this v-flags) (vehicle-flag player-edge-grabbing))) + (-> *setting-control* user-current pilot) + (let ((v1-8 (new 'stack-no-clear 'event-message-block))) + (set! (-> v1-8 from) (process->ppointer pp)) + (set! (-> v1-8 num-params) 1) + (set! (-> v1-8 message) 'query) + (set! (-> v1-8 param 0) (the-as uint 'mode)) + (let ((v1-9 (send-event-function arg0 v1-8))) + (and (or (= v1-9 #f) (= v1-9 'board)) (or (logtest? (vehicle-flag waiting-for-player) (-> this v-flags)) + (-> *setting-control* user-current vehicle-hijacking) + ) + ) + ) + ) + ) + ) + ) + +(defmethod vehicle-method-128 ((this vehicle)) + #t + ) + +(defmethod vehicle-method-129 ((this vehicle)) + (let ((f0-0 (-> this player-dist2)) + (f1-0 102400.0) + ) + (when (< f0-0 (* f1-0 f1-0)) + (let ((s5-0 (new 'stack-no-clear 'mystery-vehicle-type0))) + (set! (-> s5-0 floats 4) (+ 8192.0 (-> this root root-prim local-sphere w))) + (if (logtest? (vehicle-flag ai-driving) (-> this v-flags)) + (set! (-> s5-0 floats 4) (* 1.5 (-> s5-0 floats 4))) + ) + (set! (-> s5-0 mat 0 uvec quad) (-> (target-pos 0) quad)) + (+! (-> s5-0 mat 0 uvec y) 8192.0) + (let* ((v1-14 (-> s5-0 mat 1)) + (a3-0 (-> this node-list data 0 bone transform)) + (a0-5 (-> a3-0 rvec quad)) + (a1-0 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-14 rvec quad) a0-5) + (set! (-> v1-14 uvec quad) a1-0) + (set! (-> v1-14 fvec quad) a2-0) + (set! (-> v1-14 trans quad) a3-1) + ) + (set! (-> s5-0 mat 0 fvec quad) (-> s5-0 mat 1 trans quad)) + (set! (-> s5-0 floats 2) (- (-> s5-0 mat 0 uvec y) (-> s5-0 mat 0 fvec y))) + (let ((f0-9 (vector-vector-xz-distance-squared (-> s5-0 mat 0 uvec) (-> s5-0 mat 0 fvec))) + (f1-7 (-> s5-0 floats 4)) + ) + (when (and (< f0-9 (* f1-7 f1-7)) + (< -81920.0 (-> s5-0 floats 2)) + (and (< (-> s5-0 floats 2) 20480.0) *target* (check-player-get-on this *target*)) + ) + (let ((s2-0 #f) + (s4-1 #f) + (s3-0 #f) + ) + (let ((a2-2 (get-best-seat this (-> s5-0 mat 0 uvec) (vehicle-seat-flag vsf0) 0))) + (when (!= a2-2 -1) + (vehicle-method-66 this (-> s5-0 mat 0 fvec) a2-2) + (vector+float*! (-> s5-0 mat 0 fvec) (-> s5-0 mat 0 fvec) (-> s5-0 mat 1 uvec) 4096.0) + ) + ) + (set! (-> s5-0 floats 1) (vector-vector-distance-squared (-> s5-0 mat 0 fvec) (-> s5-0 mat 0 uvec))) + (let ((f0-14 (-> s5-0 floats 1)) + (f1-12 81920.0) + ) + (when (< f0-14 (* f1-12 f1-12)) + (set! (-> s5-0 cquery start-pos quad) (-> s5-0 mat 0 uvec quad)) + (vector-! (-> s5-0 cquery move-dist) (-> s5-0 mat 0 fvec) (-> s5-0 mat 0 uvec)) + (let ((v1-38 (-> s5-0 cquery))) + (set! (-> v1-38 radius) 4096.0) + (set! (-> v1-38 collide-with) + (collide-spec + backgnd + crate + civilian + enemy + obstacle + hit-by-player-list + hit-by-others-list + player-list + collectable + blocking-plane + tobot + pusher + vehicle-mesh + obstacle-for-jak + shield + ) + ) + (set! (-> v1-38 ignore-process0) this) + (set! (-> v1-38 ignore-process1) #f) + (set! (-> v1-38 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-38 action-mask) (collide-action solid)) + ) + (set! s2-0 (< (fill-and-probe-using-line-sphere *collide-cache* (-> s5-0 cquery)) 0.0)) + 0 + ) + ) + (when s2-0 + (when (and (or (< -14336.0 (-> s5-0 floats 2)) (logtest? (-> this v-flags) (vehicle-flag player-edge-grabbing))) + (not (logtest? (vehicle-flag no-hijack gun-dark-2-zero-g) (-> this v-flags))) + ) + (set! s4-1 #t) + (set! (-> s5-0 floats 3) (* (-> this hit-points) (/ 40960.0 (sqrtf (-> s5-0 floats 1))))) + ) + (when (and (not s4-1) + (and (< (-> s5-0 floats 2) -8192.0) (not (logtest? (-> *target* focus-status) (focus-status edge-grab)))) + ) + (matrix-4x4-inverse! (-> s5-0 mat 2) (-> s5-0 mat 1)) + (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 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 local-pos)) + (-> s1-0 local-pos 1) + (-> s5-0 mat 0 trans) + ) + ) + ) + (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) (-> 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))) + ) + ) + ) + ) + 0 + ) + ) + (set! s3-0 (or s4-1 s3-0)) + (when (and s3-0 (and (vehicle-hud-chooser-method-9 *vehicle-hud-chooser* (process->handle this) (-> s5-0 floats 3)) + (can-display-query? this "vehicle" (/ 1.0 (-> s5-0 floats 3))) + ) + ) + (cond + ((vehicle-method-128 this) + (vehicle-method-144 this) + (when (cpad-pressed? 0 triangle) + (cond + (s4-1 + (when (send-event *target* 'change-mode 'pilot this 0 #f) + (logior! (-> this v-flags) (vehicle-flag player-driving)) + (logclear! (-> this v-flags) (vehicle-flag ai-driving)) + (vehicle-method-80 this) + ) + ) + (else + (set! (-> s5-0 proc 0) (process->handle this)) + (mem-copy! (the-as pointer *pilot-edge-grab-info*) (the-as pointer (-> s5-0 vec)) 40) + (if (send-event *target* 'pilot-edge-grab *pilot-edge-grab-info*) + (format 0 "vehicle::check-player-get-on: (send-event *target* 'pilot-edge-grab self)~%") + ) + ) + ) + ) + ) + (else + (vehicle-method-145 this) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (cond + ((and (logtest? (vehicle-flag player-driving) (-> this v-flags)) *target* (!= (-> this crash-level) 3)) + (if (focus-test? *target* pilot-riding) + (vehicle-method-134 this) + ) + ) + (else + (vehicle-method-81 this) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-144 ((this vehicle)) + (let ((gp-0 + (new 'stack 'font-context *font-default-matrix* 22 320 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-1 gp-0)) + (set! (-> v1-1 width) (the float 350)) + ) + (let ((v1-2 gp-0)) + (set! (-> v1-2 height) (the float 80)) + ) + (let ((v1-3 gp-0) + (a0-5 (-> *setting-control* user-default language)) + ) + (set! (-> v1-3 scale) (if (or (= a0-5 (language-enum korean)) (= a0-5 (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) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-145 ((this vehicle)) + 0 + (none) + ) + +(defmethod vehicle-method-106 ((this vehicle)) + (sound-stop (-> this scrape-sound-id)) + (set! (-> this scrape-sound-envelope) 0.0) + 0 + (none) + ) + +(defmethod vehicle-method-63 ((this vehicle)) + 0 + (none) + ) + +(defmethod vehicle-method-64 ((this vehicle)) + 0 + (none) + ) + +(defmethod vehicle-method-65 ((this vehicle)) + (-> this info rider seat-count) + ) + +(defmethod vehicle-method-66 ((this vehicle) (arg0 vector) (arg1 int)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 quad) (-> this info rider seat-array arg1 position quad)) + (set! (-> v1-0 w) 1.0) + (vector-matrix*! arg0 v1-0 (-> this node-list data 0 bone transform)) + ) + 0 + (none) + ) + +(defmethod get-rider-in-seat ((this vehicle) (arg0 int)) + (let ((v0-0 (the-as process #f))) + (if (< arg0 (-> this info rider seat-count)) + (set! v0-0 (handle->process (-> this rider-array arg0))) + ) + v0-0 + ) + ) + +(defmethod vehicle-method-68 ((this vehicle)) + (let ((gp-0 (the-as process #f))) + (countdown (s4-0 (-> this info rider seat-count)) + (when (logtest? (-> this info rider seat-array s4-0 flags) (vehicle-seat-flag vsf0)) + (let ((v1-7 (get-rider-in-seat this s4-0))) + (if v1-7 + (set! gp-0 v1-7) + ) + ) + ) + ) + gp-0 + ) + ) + +(defmethod get-best-seat ((this vehicle) (arg0 vector) (arg1 vehicle-seat-flag) (arg2 int)) + (let ((gp-0 -1)) + (let ((f30-0 (the-as float #x7f800000)) + (s1-0 (new 'stack-no-clear 'vector)) + ) + (countdown (s0-0 (-> this info rider seat-count)) + (when (logtest? arg1 (-> this info rider seat-array s0-0 flags)) + (let ((v1-7 arg2)) + (when (cond + ((zero? v1-7) + #t + ) + ((= v1-7 1) + (not (get-rider-in-seat this s0-0)) + ) + ((= v1-7 2) + (get-rider-in-seat this s0-0) + ) + (else + #f + ) + ) + (vehicle-method-66 this s1-0 s0-0) + (let ((f0-0 (vector-vector-distance-squared arg0 s1-0))) + (when (< f0-0 f30-0) + (set! f30-0 f0-0) + (set! gp-0 s0-0) + ) + ) + ) + ) + ) + ) + ) + gp-0 + ) + ) + +(defmethod remove-riders ((this vehicle) (arg0 handle)) + (let ((v1-1 (-> this info rider seat-count))) + (dotimes (a2-0 v1-1) + (if (= arg0 (handle->process (-> this rider-array a2-0))) + (set! (-> this rider-array a2-0) (the-as handle #f)) + ) + ) + ) + 0 + (none) + ) + +(defmethod put-rider-in-seat ((this vehicle) (arg0 int) (arg1 process)) + (if (< arg0 (-> this info rider seat-count)) + (set! (-> this rider-array arg0) (process->handle arg1)) + ) + 0 + (none) + ) + +(defmethod vehicle-method-113 ((this vehicle) (arg0 vector) (arg1 int) (arg2 int)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (vector+! + v1-0 + (the-as vector (-> this info rider seat-array arg1)) + (-> this info rider rider-hand-offset arg2) + ) + (vector-matrix*! arg0 v1-0 (-> this node-list data 0 bone transform)) + ) + 0 + (none) + ) + +(defmethod vehicle-method-70 ((this vehicle)) + (-> this info rider rider-stance) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod vehicle-method-73 ((this vehicle)) + (-> this controls steering) + (none) + ) + +(defmethod get-linear-accel! ((this vehicle) (arg0 vector)) + (set! (-> arg0 quad) (-> this lin-acceleration quad)) + 0 + (none) + ) + +(defmethod copy-vehicle-controls! ((this vehicle) (arg0 vehicle-controls)) + (mem-copy! (the-as pointer arg0) (the-as pointer (-> this controls)) 24) + 0 + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod vehicle-method-150 ((this vehicle)) + (-> this hit-points) + (none) + ) + +(defmethod set-hit-points ((this vehicle) (arg0 float)) + (set! (-> this hit-points) arg0) + 0 + (none) + ) + +(defmethod apply-damage ((this vehicle) (arg0 float) (arg1 rigid-body-impact)) + (case (-> arg1 pat event) + (((pat-event melt)) + (set! arg0 (* 10.0 arg0)) + (format #t "vehicle::apply-damage: hit melt (damage ~f)~%" arg0) + ) + ) + (if (logtest? (vehicle-flag ignore-damage) (-> this v-flags)) + (set! arg0 0.0) + ) + (when (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (if (or (and (logtest? (game-secrets invulnerable) (-> *game-info* secrets)) (logtest? #x200000 (-> this info flags))) + *debug-player-vehicle-unkillable* + ) + (set! arg0 0.0) + ) + (if (logtest? (game-secrets vehicle-hit-points) (-> *game-info* secrets)) + (set! arg0 (* 0.5 arg0)) + ) + ) + (set! (-> this hit-points) (- (-> this hit-points) (* arg0 (-> this damage-factor)))) + (when (< (-> this hit-points) 0.0) + (logior! (-> this v-flags) (vehicle-flag dead)) + (set! (-> this crash-level) 3) + ) + (let ((s4-1 (-> arg1 prim-id)) + (s3-0 0) + ) + (while (nonzero? s4-1) + (when (and (logtest? s4-1 1) (< s3-0 (-> this info damage section-count))) + (let ((v1-37 (-> this section-array s3-0))) + (+! (-> v1-37 damage) (* 4.0 (-> this damage-factor) arg0)) + ) + (vehicle-method-114 this s3-0) + ) + (set! s4-1 (shr s4-1 1)) + (+! s3-0 1) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-114 ((this vehicle) (arg0 int)) + (let* ((v1-2 (-> this section-array arg0)) + (s4-0 (-> this info damage section-array arg0)) + (s5-1 + (max + 0 + (min (the int (* (-> v1-2 damage) (the float (-> s4-0 damage-seg-count)))) (+ (-> s4-0 damage-seg-count) -1)) + ) + ) + ) + (let ((a2-0 0)) + (dotimes (v1-6 (-> s4-0 damage-seg-count)) + (if (!= v1-6 s5-1) + (set! a2-0 (logior a2-0 (-> s4-0 damage-seg-array v1-6))) + ) + ) + (setup-masks (-> this draw) 0 a2-0) + ) + (setup-masks (-> this draw) (the-as int (-> s4-0 damage-seg-array s5-1)) 0) + (when (> s5-1 0) + (if (not (logtest? (vehicle-flag lights-dead) (-> this v-flags))) + (sound-play "headlight-pop") + ) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag lights-dead) (-> this v-flags)))) + (vehicle-method-126 this) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-76 ((this vehicle)) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag + disturbed + damaged + dead + player-touching + player-edge-grabbing + player-standing-on + persistent + impact + in-air + riding + player-driving + net-player-driving + ai-driving + waiting-for-player + ignition + turbo-boost + reverse-gear + flight-level-transition + alert + in-pursuit + target-in-sight + rammed-target + lights-on + lights-update + lights-dead + ) + ) + ) + ) + (set! (-> this unknown-flags) (-> this v-flags)) + (logior! (-> this rbody flags) (rigid-body-flag active)) + (logclear! (-> this focus-status) (focus-status disable dead inactive)) + (rigid-body-object-method-37 this) + (disable-physics! this) + (set! (-> this hit-points) 1.0) + (set! (-> this damage-factor) (-> this info damage inv-hit-points)) + (set! (-> this crash-level) 0) + (set! (-> this power-fluctuation-factor) 0.02) + (set! (-> this power-level) 1.0) + (set! (-> this lights-factor) 0.0) + (set-time! (-> this state-time)) + (let ((v1-19 (-> this info setup))) + (let ((a1-0 (-> v1-19 color-option-select))) + (set! (-> this draw color-mult quad) + (-> (the-as (pointer uint128) (+ (the-as uint (-> v1-19 color)) (* a1-0 16)))) + ) + ) + (+! (-> v1-19 color-option-select) 1) + (when (>= (-> v1-19 color-option-select) (-> v1-19 color-option-count)) + (set! (-> v1-19 color-option-select) 0) + 0 + ) + ) + (dotimes (s5-0 (-> this info damage section-count)) + (let ((v1-22 (-> this section-array s5-0))) + (set! (-> v1-22 damage) 0.0) + ) + (vehicle-method-114 this s5-0) + ) + 0 + (none) + ) + +(defmethod vehicle-method-98 ((this vehicle)) + (set! (-> this hit-points) 1.0) + 0 + (none) + ) + +(defmethod vehicle-method-130 ((this vehicle)) + 0 + (none) + ) + +(defmethod vehicle-method-74 ((this vehicle) (arg0 int) (arg1 time-frame)) + (when (< (-> this crash-level) arg0) + (set! (-> this crash-level) arg0) + (set! (-> this crash-duration) (the-as uint arg1)) + (set! (-> this crash-time) (the-as uint (current-time))) + (set! (-> this force-scale) 0.0) + ) + (when (and (>= 0.0 (-> this hit-points)) (!= (-> this crash-level) 3)) + (logior! (-> this v-flags) (vehicle-flag dead)) + (set! (-> this crash-level) 3) + (set! (-> this crash-duration) (the-as uint 1500)) + (set! (-> this crash-time) (the-as uint (current-time))) + ) + 0 + (none) + ) + +(defmethod vehicle-method-75 ((this vehicle)) + (set! (-> this crash-level) 0) + 0 + (none) + ) + +(defmethod vehicle-method-125 ((this vehicle)) + (if (not (logtest? (vehicle-flag lights-dead) (-> this v-flags))) + (set! (-> this v-flags) + (the-as vehicle-flag (logior (vehicle-flag lights-on lights-update) (-> this v-flags))) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-126 ((this vehicle)) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag lights-on)))) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag lights-update) (-> this v-flags)))) + 0 + (none) + ) + +(defmethod vehicle-method-135 ((this vehicle)) + (when (not (logtest? (vehicle-flag ignition) (-> this v-flags))) + (logior! (-> this v-flags) (vehicle-flag ignition)) + (sound-play-by-name (-> this info sound start-sound) (new-sound-id) 1024 0 0 (sound-group) #t) + (let ((s5-1 (-> this node-list data 0 bone transform)) + (s4-1 (new 'stack-no-clear 'inline-array 'matrix 2)) + ) + (set-vector! (-> s4-1 0 fvec) 0.0 1.0 0.0 1.0) + (mem-copy! (the-as pointer (-> s4-1 1)) (the-as pointer s5-1) 64) + (dotimes (s3-0 2) + (vector-matrix*! (the-as vector (-> s4-1 0)) (-> this info particles exhaust-local-pos s3-0) s5-1) + (vector-rotate*! (-> s4-1 0 uvec) (-> this info particles exhaust-local-dir s3-0) s5-1) + (vector-cross! (-> s4-1 0 trans) (-> s4-1 0 uvec) (-> s4-1 0 fvec)) + (vector-normalize! (-> s4-1 0 trans) 1.0) + (vector-cross! (-> s4-1 1 fvec) (-> s4-1 0 trans) (-> s4-1 0 uvec)) + (set! (-> s4-1 1 rvec quad) (-> s4-1 0 trans quad)) + (set! (-> s4-1 1 uvec quad) (-> s4-1 0 uvec quad)) + (set! (-> s4-1 1 fvec quad) (-> s4-1 0 fvec quad)) + (set! (-> s4-1 1 trans quad) (-> s4-1 0 rvec quad)) + (if (logtest? (-> *part-group-id-table* 225 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 225) + :mat-joint (-> s4-1 1) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 225) + :mat-joint (-> s4-1 1) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-136 ((this vehicle)) + (if (logtest? (vehicle-flag ignition) (-> this v-flags)) + (logclear! (-> this v-flags) (vehicle-flag ignition)) + ) + 0 + (none) + ) + +(defmethod vehicle-method-137 ((this vehicle)) + (let ((a0-2 (find-nearest-nav-mesh (-> this root trans) (the-as float #x7f800000)))) + (when a0-2 + (add-process-drawable-to-nav-mesh a0-2 this #t) + (vehicle-method-139 this) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-139 ((this vehicle)) + (logior! (-> this nav flags) (nav-control-flag display-marks)) + 0 + (none) + ) + +(defmethod vehicle-method-138 ((this vehicle)) + (let ((v1-0 (-> this nav))) + (when v1-0 + (remove-process-drawable (-> v1-0 state mesh) this) + (set! (-> this nav) #f) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-141 ((this vehicle)) + (or (logtest? (vehicle-flag dead waiting-for-player) (-> this v-flags)) + (and (logtest? (vehicle-flag player-driving net-player-driving ai-driving) (-> this v-flags)) + (not (logtest? (-> this v-flags) (vehicle-flag on-flight-level))) + ) + ) + ) + +(defmethod vehicle-method-140 ((this vehicle)) + (let ((v1-1 (vehicle-method-141 this)) + (s5-0 (-> this nav)) + ) + (cond + (v1-1 + (cond + (s5-0 + (do-navigation-to-destination (-> s5-0 state) (-> this root trans)) + (when (not (logtest? (-> s5-0 state flags) (nav-state-flag in-mesh))) + (let ((a0-4 (find-nearest-nav-mesh (-> this root trans) (the-as float #x7f800000)))) + (when (and a0-4 (!= a0-4 (-> s5-0 state mesh))) + (change-to a0-4 this) + (logclear! (-> this nav flags) (nav-control-flag output-sphere-hash)) + ) + ) + ) + ) + (else + (vehicle-method-137 this) + ) + ) + ) + (else + (if s5-0 + (vehicle-method-138 this) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-80 ((this vehicle)) + (when (not (logtest? (vehicle-flag camera) (-> this v-flags))) + (vehicle-method-82 this) + (logior! (-> this v-flags) (vehicle-flag camera)) + ) + 0 + (none) + ) + +(defmethod vehicle-method-81 ((this vehicle)) + (when (logtest? (vehicle-flag camera) (-> this v-flags)) + (vehicle-method-83 this) + (logclear! (-> this v-flags) (vehicle-flag camera)) + ) + 0 + (none) + ) + +(defmethod vehicle-method-82 ((this vehicle)) + (logclear! (-> this v-flags) (vehicle-flag camera-bike-mode camera-rapid-tracking-mode)) + (set! (-> this cam-speed-interp) 0.0) + (set-setting! 'string-min-height 'abs (-> this info camera string-min-height) 0) + (set-setting! 'string-max-height 'abs (-> this info camera string-max-height) 0) + (set-setting! 'head-offset 'abs (-> this info camera head-offset) 0) + (set-setting! 'foot-offset 'abs (-> this info camera foot-offset) 0) + (set-setting! 'target-height 'abs (meters 0) 0) + (persist-with-delay *setting-control* 'mode-name (seconds 0.2) 'mode-name 'cam-fixed 0.0 0) + (persist-with-delay *setting-control* 'interp-time (seconds 0.05) 'interp-time 'abs 0.0 0) + 0 + (none) + ) + +(defmethod vehicle-method-83 ((this vehicle)) + (remove-setting! 'bike-mode) + (remove-setting! 'rapid-tracking) + (remove-setting! 'fov) + (remove-setting! 'string-camera-ceiling) + (remove-setting! 'string-camera-floor) + (remove-setting! 'string-min-height) + (remove-setting! 'string-max-height) + (remove-setting! 'string-min-length) + (remove-setting! 'string-max-length) + (remove-setting! 'extra-follow-height) + (remove-setting! 'head-offset) + (remove-setting! 'foot-offset) + (remove-setting! 'target-height) + (remove-setting! 'slave-options) + (remove-setting! 'vertical-follow-matches-camera) + (remove-setting! 'mode-name) + (remove-setting! 'butt-handle) + (remove-setting! 'lock-sound-camera-to-target) + (remove-setting! 'interp-time) + (vehicle-method-148 this) + 0 + (none) + ) + +(defmethod vehicle-method-84 ((this vehicle)) + (when (not (logtest? (vehicle-flag camera-bike-mode) (-> this v-flags))) + (logior! (-> this v-flags) (vehicle-flag camera-bike-mode)) + (set-setting! 'bike-mode #f 0.0 0) + ) + 0 + (none) + ) + +(defmethod vehicle-method-85 ((this vehicle)) + (when (logtest? (vehicle-flag camera-bike-mode) (-> this v-flags)) + (logclear! (-> this v-flags) (vehicle-flag camera-bike-mode)) + (remove-setting! 'bike-mode) + ) + 0 + (none) + ) + +(defmethod vehicle-method-86 ((this vehicle)) + (when (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (logior! (-> this v-flags) (vehicle-flag camera-rapid-tracking-mode)) + (set-setting! 'rapid-tracking #f 0.0 0) + ) + 0 + (none) + ) + +(defmethod vehicle-method-87 ((this vehicle)) + (when (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (logclear! (-> this v-flags) (vehicle-flag camera-rapid-tracking-mode)) + (remove-setting! 'rapid-tracking) + ) + 0 + (none) + ) + +(defmethod rigid-body-object-method-42 ((this vehicle)) + (logior! (-> this v-flags) (vehicle-flag enable-collision)) + (let ((v1-3 (-> this root root-prim))) + (set! (-> v1-3 prim-core collide-as) (-> this root backup-collide-as)) + (set! (-> v1-3 prim-core collide-with) (-> this root backup-collide-with)) + ) + 0 + (none) + ) + +(defmethod rigid-body-object-method-43 ((this vehicle)) + (logclear! (-> this v-flags) (vehicle-flag enable-collision)) + (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 + 0 + (none) + ) + +(defmethod vehicle-method-99 ((this vehicle)) + (let ((v1-1 (-> this draw shadow-ctrl))) + (logclear! (-> v1-1 settings flags) (shadow-flags disable-draw)) + ) + 0 + 0 + (none) + ) + +(defmethod vehicle-method-100 ((this vehicle)) + (let ((v1-1 (-> this draw shadow-ctrl))) + (logior! (-> v1-1 settings flags) (shadow-flags disable-draw)) + ) + 0 + 0 + (none) + ) + +(defmethod vehicle-method-148 ((this vehicle)) + 0 + (none) + ) + +(defmethod vehicle-method-147 ((this vehicle)) + 0 + (none) + ) + +(defmethod apply-momentum! ((this vehicle)) + (let ((s5-0 (-> this rbody))) + (when (not (logtest? (-> s5-0 flags) (rigid-body-flag enable-physics))) + (logior! (-> s5-0 flags) (rigid-body-flag enable-physics)) + (rigid-body-control-method-28 s5-0 (-> this root trans) (-> this root quat)) + (set! (-> s5-0 lin-velocity quad) (-> this root transv quad)) + (vector-float*! (-> s5-0 lin-momentum) (-> s5-0 lin-velocity) (-> this info info mass)) + (vector-reset! (-> s5-0 ang-momentum)) + (vector-reset! (-> this lin-acceleration)) + ) + ) + 0 + (none) + ) + +(defmethod disable-physics! ((this vehicle)) + (set! (-> this force-scale) 1.0) + (logclear! (-> this rbody flags) (rigid-body-flag enable-physics)) + (vehicle-method-106 this) + 0 + (none) + ) + +(defmethod vehicle-method-107 ((this vehicle) (arg0 int) (arg1 process)) + (let ((a0-1 (-> this squad))) + (when (and a0-1 arg1) + (if #t + (squad-control-method-18 a0-1 arg0 arg1) + ) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-108 ((this vehicle) (arg0 int)) + (set-alert-level0 (-> this squad) arg0) + 0 + (none) + ) + +(defmethod impulse-handler ((this vehicle)) + (if (and (not (focus-test? this inactive)) + (not (and (-> this next-state) (= (-> this next-state name) 'explode))) + ) + ((method-of-type rigid-body-object impulse-handler) this) + ) + 0 + (none) + ) + +(defmethod vehicle-method-109 ((this vehicle)) + (vehicle-method-122 this) + (logior! (-> this focus-status) (focus-status inactive)) + (set! (-> this event-hook) (-> (method-of-object this inactive) event)) + (go (method-of-object this inactive)) + 0 + (none) + ) + +(defmethod vehicle-method-110 ((this vehicle)) + (if (focus-test? this inactive) + (vehicle-method-123 this) + ) + (go (method-of-object this active)) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs object. +(defmethod go-active ((this vehicle)) + (go (method-of-object this waiting)) + 0 + ) + +(defmethod vehicle-method-134 ((this vehicle)) + (go (method-of-object this player-control)) + 0 + (none) + ) + +(defmethod vehicle-method-132 ((this vehicle) (arg0 traffic-object-spawn-params)) + (let ((v1-0 (-> arg0 behavior))) + (cond + ((= v1-0 1) + (vehicle-method-131 this) + (vehicle-method-109 this) + ) + ((zero? v1-0) + (go (method-of-object this idle)) + ) + ((= v1-0 4) + (go (method-of-object this player-control)) + ) + (else + (go (method-of-object this idle)) + ) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-124 ((this vehicle)) + (if (= this *debug-actor*) + (format #t "hook-dead~%") + ) + (logior! (-> this focus-status) (focus-status dead)) + (vehicle-method-136 this) + (set! (-> this v-flags) + (the-as vehicle-flag (logclear + (-> this v-flags) + (vehicle-flag riding player-driving net-player-driving in-pursuit target-in-sight) + ) + ) + ) + (set! (-> this controls throttle) 0.0) + (set! (-> this controls steering) 0.0) + 0 + (none) + ) + +(defmethod vehicle-method-133 ((this vehicle) (arg0 traffic-object-spawn-params)) + 0 + (none) + ) + +(defmethod vehicle-method-102 ((this vehicle)) + (logtest? (vehicle-flag disturbed player-touching player-driving in-pursuit) (-> this v-flags)) + ) + +(defmethod vehicle-method-142 ((this vehicle)) + (reset-momentum! (-> this rbody)) + (none) + ) + +(defmethod vehicle-method-103 ((this vehicle)) + (local-vars (v1-8 float) (v1-13 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)) + (let* ((f0-0 (-> this camera-dist2)) + (f1-0 0.000024414063) + (f0-1 (* f0-0 (* f1-0 f1-0))) + ) + (.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-8 vf1) + (when (and (< v1-8 f0-1) (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-13 vf1) + (let ((f1-4 v1-13) + (f2-0 614.4) + ) + (< f1-4 (* f0-1 (* f2-0 f2-0))) + ) + ) + ) + (logclear! (-> this v-flags) (vehicle-flag disturbed)) + (vehicle-method-142 this) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod vehicle-method-79 ((this vehicle)) + 0 + (none) + ) + +(defmethod vehicle-method-115 ((this vehicle)) + (dotimes (s5-0 (-> this info rider seat-count)) + (let ((s4-0 (handle->process (-> this rider-array s5-0)))) + (when (and s4-0 (focus-test? (the-as process-focusable s4-0) pilot-riding)) + (vehicle-method-66 this (-> (the-as process-focusable s4-0) root trans) s5-0) + (set! (-> (the-as process-focusable s4-0) root transv quad) (-> this root transv quad)) + (let ((f0-1 (the float (-> this info rider seat-array s5-0 angle)))) + (quaternion-rotate-local-y! (-> (the-as process-focusable s4-0) root quat) (-> this root quat) f0-1) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-146 ((this vehicle) (arg0 vector)) + 0 + (none) + ) + +(defmethod vehicle-method-149 ((this vehicle)) + 0 + (none) + ) + +(defmethod vehicle-method-62 ((this vehicle)) + (let ((v1-1 (-> this root root-prim)) + (f0-0 0.0) + ) + (dotimes (a0-1 (the-as int (-> v1-1 specific 0))) + (let ((a1-3 (-> (the-as collide-shape-prim-group v1-1) child a0-1 local-sphere))) + (set! f0-0 (fmax f0-0 (+ (vector-length a1-3) (-> a1-3 w)))) + ) + ) + (vector-reset! (-> v1-1 local-sphere)) + (set! (-> v1-1 local-sphere w) f0-0) + ) + 0 + (none) + ) + +(defmethod vehicle-method-116 ((this vehicle) (arg0 symbol)) + (dotimes (s4-0 (-> this info rider seat-count)) + (let* ((s3-0 (handle->process (-> this rider-array s4-0))) + (a0-5 (if (type? s3-0 process-focusable) + s3-0 + ) + ) + ) + (send-event + a0-5 + '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 arg0)) + ) + ) + ) + (put-rider-in-seat this s4-0 (the-as process #f)) + ) + 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 ae58a54666..cb0652342a 100644 --- a/goal_src/jak3/levels/city/traffic/vehicle/vehicle.gc +++ b/goal_src/jak3/levels/city/traffic/vehicle/vehicle.gc @@ -7,3 +7,1354 @@ ;; DECOMP BEGINS +(define *debug-vehicle-work* (new 'static 'debug-vehicle-work)) + +(defskelgroup skel-vehicle-explosion vehicle-explosion vehicle-explosion-lod0-jg vehicle-explosion-idle-ja + ((vehicle-explosion-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 50) + ) + +(define *vehicle-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 163840.0) + :bot-plane (new 'static 'plane :y 1.0 :w 40960.0) + :top-plane (new 'static 'plane :y 1.0 :w 2048.0) + ) + ) + ) + +(define *vehicle-shadow-control-disabled* + (new 'static 'shadow-control :settings (new 'static 'shadow-settings + :center (new 'static 'vector :w (the-as float #x2a)) + :shadow-dir (new 'static 'vector :y -1.0 :w 163840.0) + :bot-plane (new 'static 'plane :y 1.0 :w 40960.0) + :top-plane (new 'static 'plane :y 1.0 :w 2048.0) + ) + ) + ) + +(defbehavior vehicle-event-handler vehicle ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (rbody-event-handler self arg0 arg1 arg2 arg3) + ) + +(defmethod on-impact ((this vehicle) (arg0 rigid-body-impact)) + (local-vars (v1-79 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (logior! (-> this v-flags) (vehicle-flag impact)) + (set! (-> this impact-pos quad) (-> arg0 point quad)) + (let ((s4-0 (new 'stack-no-clear 'matrix))) + (matrix-inverse-of-rot-trans! (the-as matrix (-> s4-0 rvec)) (-> this rbody matrix)) + (vector-matrix*! (-> this impact-local-pos) (-> this impact-pos) (the-as matrix (-> s4-0 rvec))) + ) + (set! (-> this prev-impact-time) (-> this impact-time)) + (set! (-> this impact-time) (the-as uint (current-time))) + (set! (-> this impact-pat) (the-as uint (-> arg0 pat))) + (set! (-> this impact-proc) (the-as handle #f)) + (let ((a0-5 (-> arg0 process))) + (if a0-5 + (set! (-> this impact-proc) (process->handle a0-5)) + ) + ) + (let ((s4-1 (-> this info)) + (f0-0 1.0) + ) + (let ((v1-14 (-> arg0 prim-id))) + (if (logtest? v1-14 512) + (set! f0-0 (* 1.5 f0-0)) + ) + (if (logtest? v1-14 1024) + (set! f0-0 (* 2.0 f0-0)) + ) + (if (logtest? v1-14 2048) + (set! f0-0 (* 4.0 f0-0)) + ) + (if (logtest? v1-14 256) + (set! f0-0 (/ 1.0 f0-0)) + ) + ) + (let ((f30-0 (* (-> arg0 impulse) f0-0 (-> s4-1 info inv-mass) (-> s4-1 damage inv-toughness-factor)))) + (set! (-> this crash-impulse) (-> arg0 impulse)) + (cond + ((< f30-0 (-> s4-1 damage hit-threshold)) + ) + ((>= f30-0 (-> s4-1 damage hit-deadly)) + (when (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 1)) + 0 + ) + (apply-damage this (* 2.0 (-> s4-1 damage hit-points)) arg0) + (vehicle-method-74 this 2 (seconds 1)) + ) + ((>= f30-0 (-> s4-1 damage hit-big)) + (when (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.5)) + 0 + ) + (apply-damage this (* 10.0 (-> s4-1 damage impact-damage-factor)) arg0) + (vehicle-method-74 this 1 (seconds 0.25)) + ) + ((>= f30-0 (-> s4-1 damage hit-small)) + (when (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.25)) + 0 + ) + (apply-damage this (* 5.0 (-> s4-1 damage impact-damage-factor)) arg0) + (vehicle-method-74 this 1 (seconds 0.25)) + ) + (else + (let* ((f0-14 0.0) + (f1-10 40.0) + (f2-0 16384000.0) + (f0-15 (fmax f0-14 (* f1-10 (/ 1.0 f2-0) (- f30-0 (-> s4-1 damage hit-threshold))))) + ) + (apply-damage this (* f0-15 (-> s4-1 damage impact-damage-factor)) arg0) + ) + (when (< 32768.0 f30-0) + (if (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.1)) + ) + ) + ) + ) + (let* ((f0-18 1.0) + (f1-14 61440.0) + (f28-0 (fmin f0-18 (* f30-0 (/ 1.0 f1-14)))) + ) + (cond + ((>= f30-0 (-> s4-1 damage hit-small)) + (sound-play-by-name + (-> this info sound impact-sound) + (new-sound-id) + (the int (* 1024.0 f28-0)) + 0 + 0 + (sound-group) + #t + ) + (logclear! (-> this v-flags) (vehicle-flag turbo-boost)) + ) + ((< 0.1 f28-0) + (sound-play-by-name + (-> this info sound glance-sound) + (new-sound-id) + (the int (* 1024.0 f28-0)) + 0 + 0 + (sound-group) + #t + ) + ) + ) + ) + ) + ) + (let ((a0-39 (new 'stack-no-clear 'vector))) + (vector+float*! + a0-39 + (-> arg0 velocity) + (-> arg0 normal) + (- (vector-dot (-> arg0 velocity) (-> arg0 normal))) + ) + (.lvf vf1 (&-> a0-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-79 vf1) + (let ((f0-30 v1-79) + (f1-18 12288.0) + ) + (when (< (* f1-18 f1-18) f0-30) + (set! (-> this scrape-sound-envelope) 1.0) + (if (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 0 255 (seconds 0.05)) + ) + ) + ) + (if (>= 0.0 (-> this hit-points)) + (vehicle-method-74 this 2 (seconds 1)) + ) + 0 + (none) + ) + ) + +(defmethod vehicle-method-92 ((this vehicle) (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))) + (+! (-> 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 vehicle-method-88 ((this vehicle) (arg0 vehicle-controls)) + 0 + (none) + ) + +(defmethod control-hook-player ((this vehicle) (arg0 vehicle-controls)) + (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)) + (-> *setting-control* user-current stop-vehicle?) + ) + (set! (-> gp-0 steering) 0.0) + (set! (-> gp-0 lean-z) 0.0) + (set! (-> gp-0 throttle) 0.0) + (set! (-> gp-0 brake) 1.0) + (set! (-> gp-0 handbrake) 0.0) + (set! (-> this v-flags) + (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag reverse-gear camera-look-mode))) + ) + ) + (else + (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-93 ((this vehicle)) + (let ((s5-0 (new 'stack-no-clear 'mystery-vehicle-type2))) + (set! (-> s5-0 time) (the-as uint (current-time))) + (when (and *target* (logtest? (vehicle-flag ignition) (-> this v-flags))) + (when (and (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (zero? (-> this root num-riders)) + (or (not *target*) (or (< 32768.0 (vector-vector-distance (-> this root trans) (-> *target* control trans))) + (focus-test? *target* teleporting) + ) + ) + ) + (set! (-> this controls throttle) 0.0) + (set! (-> this controls steering) 0.0) + (set! (-> this controls lean-z) 0.0) + (mem-copy! (the-as pointer (-> this prev-controls)) (the-as pointer (-> this controls)) 24) + ) + ) + (cond + ((zero? (-> this crash-level)) + (seek! (-> this force-scale) 1.0 (seconds-per-frame)) + ) + ((< (-> this crash-level) 3) + (set! (-> s5-0 word01) (- (-> s5-0 time) (-> this crash-time))) + (when (>= (-> s5-0 word01) (-> this crash-duration)) + (if (or (>= (-> this rbody matrix uvec y) (cos 18204.445)) (>= (-> s5-0 word01) (the-as uint 900))) + (vehicle-method-75 this) + ) + ) + ) + ) + (set! (-> this force-level) (-> this crash-level)) + (cond + ((>= (-> this hit-points) 0.9) + (set! (-> this power-fluctuation-factor) 0.01) + ) + ((>= (-> this hit-points) 0.75) + (set! (-> this power-fluctuation-factor) 0.02) + ) + ((>= (-> this hit-points) 0.5) + (set! (-> this power-fluctuation-factor) 0.04) + ) + ((>= (-> this hit-points) 0.3) + (set! (-> this power-fluctuation-factor) 0.08) + ) + ((>= (-> this hit-points) 0.15) + (set! (-> this power-fluctuation-factor) 0.16) + ) + ((>= (-> this hit-points) 0.05) + (set! (-> this power-fluctuation-factor) 0.32) + ) + (else + (set! (-> this power-fluctuation-factor) 0.5) + ) + ) + (let ((f1-6 0.0)) + (when (logtest? (vehicle-flag ignition) (-> this v-flags)) + (let ((f0-23 (- 1.0 (* (rand-vu) (-> this power-fluctuation-factor))))) + (set! f1-6 (* f0-23 f0-23)) + ) + (if (not (logtest? (-> this v-flags) (vehicle-flag riding))) + (set! f1-6 (* 0.5 f1-6)) + ) + ) + (+! (-> this power-level) + (* (- f1-6 (-> this power-level)) + (fmin 1.0 (* (+ 1.0 (* 50.0 (-> this power-fluctuation-factor))) (seconds-per-frame))) + ) + ) + ) + (when (logtest? (vehicle-flag turbo-boost) (-> this v-flags)) + (set! (-> s5-0 word00) (- (-> s5-0 time) (-> this turbo-boost-time))) + (if (or (>= (-> s5-0 word00) (-> this turbo-boost-duration)) + (and (>= (-> s5-0 word00) (the-as uint 30)) (>= (-> this controls brake) 0.75)) + ) + (logclear! (-> this v-flags) (vehicle-flag turbo-boost)) + ) + ) + ) + (if (logtest? (-> this v-flags) (vehicle-flag on-ground on-flight-level)) + (set! (-> this air-time) (the-as uint (current-time))) + ) + 0 + (none) + ) + +(defmethod vehicle-method-94 ((this vehicle)) + (let ((s5-0 (new 'stack-no-clear 'mystery-vehicle-type1))) + (set! (-> s5-0 word02) (the-as uint (current-time))) + (cond + ((logtest? (-> this v-flags) (vehicle-flag in-air)) + (when (or (< 55296.0 (-> this rbody lin-velocity y)) (>= (- (-> s5-0 word02) (-> this air-time)) (the-as uint 225))) + (set-setting! 'extra-follow-height 'abs (meters -4) 0) + (send-event *camera* 'set-max-angle-offset (-> this info camera air-max-angle-offset)) + ) + ) + (else + (remove-setting! 'extra-follow-height) + (send-event *camera* 'set-max-angle-offset (-> this info camera normal-max-angle-offset)) + ) + ) + (let ((f0-4 (vector-dot (-> this rbody lin-velocity) (-> this rbody matrix fvec)))) + (cond + ((= (-> this crash-level) 2) + (vehicle-method-85 this) + ) + ((< f0-4 (-> this info camera max-lookaround-speed)) + (vehicle-method-85 this) + ) + ((< (+ 4096.0 (-> this info camera max-lookaround-speed)) f0-4) + (vehicle-method-84 this) + ) + ) + ) + (when (not (logtest? (vehicle-flag flight-level-transition) (-> this v-flags))) + (let* ((f0-5 1.0) + (v1-49 (-> this rbody lin-velocity)) + (f0-6 (fmin f0-5 (/ (sqrtf (+ (* (-> v1-49 x) (-> v1-49 x)) (* (-> v1-49 z) (-> v1-49 z)))) + (-> this info handling max-xz-speed) + ) + ) + ) + ) + (seek! (-> this cam-speed-interp) f0-6 (* 0.1 (seconds-per-frame))) + ) + ) + (let ((f30-0 (-> this cam-speed-interp))) + (if #f + (set! f30-0 + (fmax 0.0 (fmin 1.0 (analog-input (the-as int (-> *cpad-list* cpads 1 righty)) 128.0 48.0 110.0 -1.0))) + ) + ) + (set! (-> s5-0 float00) + (lerp-scale (-> this info camera min-fov) (-> this info camera max-fov) f30-0 0.0 1.0) + ) + (set-setting! 'fov 'abs (-> s5-0 float00) 0) + (let ((f30-2 (lerp-scale 1.0 0.6 f30-0 0.0 1.0))) + (set-setting! 'string-min-length 'abs (* f30-2 (-> this info camera string-min-length)) 0) + (set-setting! 'string-max-length 'abs (* f30-2 (-> this info camera string-max-length)) 0) + ) + ) + (when *target* + (set! (-> s5-0 vec0 quad) (-> *target* draw shadow-ctrl settings shadow-dir quad)) + (let ((v1-75 (-> this draw shadow-ctrl settings shadow-dir))) + (set! (-> s5-0 vec0 w) (-> v1-75 w)) + (set! (-> v1-75 quad) (-> s5-0 vec0 quad)) + ) + ) + (let ((s4-0 (new 'stack-no-clear 'inline-array 'collide-query 2))) + (let* ((v1-76 (-> s4-0 1)) + (a3-7 (-> this rbody matrix)) + (a0-29 (-> a3-7 rvec quad)) + (a1-11 (-> a3-7 uvec quad)) + (a2-9 (-> a3-7 fvec quad)) + (a3-8 (-> a3-7 trans quad)) + ) + (set! (-> v1-76 best-other-tri vertex 0 quad) a0-29) + (set! (-> v1-76 best-other-tri vertex 1 quad) a1-11) + (set! (-> v1-76 best-other-tri vertex 2 quad) a2-9) + (set! (-> v1-76 best-other-tri intersect quad) a3-8) + ) + (cond + ((logtest? (vehicle-flag camera-look-mode) (-> this v-flags)) + (let ((a0-31 *camera*)) + (when a0-31 + (let ((s3-0 (-> a0-31 slave))) + (when s3-0 + (set! (-> s3-0 0 fov) (-> s5-0 float00)) + (let ((v1-83 (-> this cam-view))) + (cond + ((zero? v1-83) + (vector-matrix*! + (the-as vector (-> s4-0 1 bbox)) + (the-as vector (-> this info camera look-pos-array)) + (the-as matrix (-> s4-0 1)) + ) + ) + ((= v1-83 1) + (vector-matrix*! (the-as vector (-> s4-0 1 bbox)) (-> this info camera look-rear) (the-as matrix (-> s4-0 1))) + (matrix-rotate-yx! (the-as matrix (-> s4-0 1 best-other-tri normal)) 32768.0 3640.889) + (matrix*! + (the-as matrix (-> s4-0 1)) + (the-as matrix (-> s4-0 1 best-other-tri normal)) + (the-as matrix (-> s4-0 1)) + ) + ) + ((= v1-83 2) + (vector-matrix*! (the-as vector (-> s4-0 1 bbox)) (-> this info camera look-left) (the-as matrix (-> s4-0 1))) + (matrix-rotate-yx! (the-as matrix (-> s4-0 1 best-other-tri normal)) 16384.0 3640.889) + (matrix*! + (the-as matrix (-> s4-0 1)) + (the-as matrix (-> s4-0 1 best-other-tri normal)) + (the-as matrix (-> s4-0 1)) + ) + ) + ((= v1-83 3) + (vector-matrix*! + (the-as vector (-> s4-0 1 bbox)) + (-> this info camera look-right) + (the-as matrix (-> s4-0 1)) + ) + (matrix-rotate-yx! (the-as matrix (-> s4-0 1 best-other-tri normal)) -16384.0 3640.889) + (matrix*! + (the-as matrix (-> s4-0 1)) + (the-as matrix (-> s4-0 1 best-other-tri normal)) + (the-as matrix (-> s4-0 1)) + ) + ) + (else + (vector-matrix*! + (the-as vector (-> s4-0 1 bbox)) + (the-as vector (-> this info camera look-pos-array)) + (the-as matrix (-> s4-0 1)) + ) + ) + ) + ) + (when (nonzero? (-> this cam-view)) + (let ((v1-96 (-> s4-0 0))) + (set! (-> v1-96 radius) 2048.0) + (set! (-> v1-96 collide-with) + (collide-spec + backgnd + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> v1-96 ignore-process0) this) + (set! (-> v1-96 ignore-process1) #f) + (set! (-> v1-96 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-96 action-mask) (collide-action solid)) + ) + (set! (-> s4-0 0 start-pos quad) (-> this rbody position quad)) + (vector-! (-> s4-0 0 move-dist) (the-as vector (-> s4-0 1 bbox)) (-> s4-0 0 start-pos)) + (let ((f0-23 (fill-and-probe-using-line-sphere *collide-cache* (-> s4-0 0)))) + (if (>= f0-23 0.0) + (vector+float*! (the-as vector (-> s4-0 1 bbox)) (-> s4-0 0 start-pos) (-> s4-0 0 move-dist) f0-23) + ) + ) + ) + (set! (-> s3-0 0 saved-pt quad) (-> s4-0 1 bbox min quad)) + (let ((v1-107 (-> s3-0 0 tracking))) + (set! (-> v1-107 inv-mat rvec quad) (-> s4-0 1 best-other-tri vertex 0 quad)) + (set! (-> v1-107 inv-mat uvec quad) (-> s4-0 1 best-other-tri vertex 1 quad)) + (set! (-> v1-107 inv-mat fvec quad) (-> s4-0 1 best-other-tri vertex 2 quad)) + ) + ) + ) + ) + ) + (if (zero? (-> this cam-view)) + (vehicle-method-147 this) + (vehicle-method-148 this) + ) + (when (not (logtest? (vehicle-flag camera-look-mode) (-> this unknown-flags))) + (set-setting! 'interp-time 'abs 3.0 0) + (set-setting! 'mode-name 'cam-fixed 0.0 0) + (set-setting! 'lock-sound-camera-to-target #t 0.0 0) + ) + ) + (else + (when (logtest? (vehicle-flag camera-look-mode) (-> this unknown-flags)) + (vehicle-method-148 this) + (let ((v1-130 *camera*)) + (when v1-130 + (when (-> v1-130 slave) + (let ((s5-1 (new 'static 'vector))) + (let ((v1-132 (new 'stack-no-clear 'inline-array 'matrix 2))) + (let ((a0-72 (-> v1-132 1))) + (set! (-> a0-72 rvec x) 0.0) + (set! (-> a0-72 rvec y) 0.0) + (set! (-> a0-72 rvec z) -1.0) + (set! (-> a0-72 rvec w) 1.0) + ) + (let* ((a0-73 (-> v1-132 0)) + (t0-10 (-> this rbody matrix)) + (a1-37 (-> t0-10 rvec quad)) + (a2-24 (-> t0-10 uvec quad)) + (a3-12 (-> t0-10 fvec quad)) + (t0-11 (-> t0-10 trans quad)) + ) + (set! (-> a0-73 rvec quad) a1-37) + (set! (-> a0-73 uvec quad) a2-24) + (set! (-> a0-73 fvec quad) a3-12) + (set! (-> a0-73 trans quad) t0-11) + ) + (vector-rotate*! s5-1 (the-as vector (-> v1-132 1)) (-> v1-132 0)) + ) + (persist-with-delay + *setting-control* + 'string-startup-vector + (seconds 0.05) + 'string-startup-vector + 'abs + (the-as float s5-1) + 0 + ) + ) + ) + ) + ) + (set-setting! 'interp-time 'abs 0.0 0) + (remove-setting! 'mode-name) + (remove-setting! 'lock-sound-camera-to-target) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-101 ((this vehicle)) + 0 + (none) + ) + +(defmethod rigid-body-object-method-30 ((this vehicle)) + (cond + ((logtest? (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) + ) + ) + ) + (if (logtest? (vehicle-flag particles) (-> this v-flags)) + (vehicle-method-78 this) + ) + (if (logtest? (vehicle-flag joints) (-> this v-flags)) + (vehicle-method-79 this) + ) + (when (logtest? (vehicle-flag player-dismounting) (-> this v-flags)) + (let ((a0-10 (new 'stack-no-clear 'array 'uint32 1))) + (set! (-> a0-10 0) (the-as uint (current-time))) + (when (< (the-as uint 150) (- (-> a0-10 0) (-> this player-dismount-time))) + (logclear! (-> this v-flags) (vehicle-flag player-dismounting)) + (let ((v1-32 (find-prim-by-id-logtest (-> this root) (the-as uint 64)))) + (if v1-32 + (set! (-> v1-32 prim-core collide-as) (collide-spec vehicle-sphere vehicle-mesh)) + ) + ) + ) + ) + ) + (set! (-> this unknown-flags) (-> this v-flags)) + (ja-post) + 0 + (none) + ) + +(defmethod rigid-body-object-method-54 ((this vehicle)) + (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) + (water-info-init! (-> this root) (the-as water-info (-> s5-0 mat)) (collide-action solid semi-solid)) + (set! (-> this water-flags) (the-as uint (-> s5-0 mat trans x))) + (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)) + (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-15 (-> s5-0 cquery))) + (set! (-> v1-15 radius) (+ 4096.0 (-> this root root-prim local-sphere w))) + (set! (-> v1-15 collide-with) (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + player-list + collectable + blocking-plane + pusher + vehicle-mesh-probeable + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> v1-15 ignore-process0) this) + (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)) + ) + (if (focus-test? this dead) + (set! (-> s5-0 cquery ignore-pat) (new 'static 'pat-surface :noentity #x1 :nopilot #x1 :probe #x1)) + ) + (fill-using-line-sphere *collide-cache* (-> s5-0 cquery)) + ) + (rigid-body-control-method-10 (-> this rbody) this (-> this rbody time-remaining) (-> this max-time-step)) + 0 + (none) + ) + +(defmethod vehicle-method-77 ((this vehicle)) + (vehicle-method-115 this) + (if (logtest? (vehicle-flag camera) (-> this v-flags)) + (vehicle-method-94 this) + ) + (if (logtest? (vehicle-flag nav-spheres) (-> this v-flags)) + (vehicle-method-140 this) + ) + (when (< (-> this hit-points) 0.0) + (logior! (-> this v-flags) (vehicle-flag dead)) + (set! (-> this crash-level) 3) + ) + (if (and (logtest? (-> this v-flags) (vehicle-flag dead)) + (not (logtest? (-> this focus-status) (focus-status dead))) + ) + (go (method-of-object this crash)) + ) + 0 + (none) + ) + +(defmethod clear-impulse-force-flag! ((this vehicle)) + (with-pp + (let ((v1-0 (new 'stack-no-clear 'matrix))) + (set! (-> v1-0 rvec quad) (-> this root transv quad)) + (vector-! (-> v1-0 uvec) (-> this rbody lin-velocity) (-> v1-0 rvec)) + (vector-float*! (-> this lin-acceleration) (-> v1-0 uvec) (-> pp clock frames-per-second)) + ) + (set! (-> this root transv quad) (-> this rbody lin-velocity quad)) + (quaternion-copy! (-> this root quat) (the-as quaternion (-> this rbody rot))) + (rigid-body-control-method-25 (-> this rbody) (-> this root trans)) + (let* ((v1-11 (-> this node-list data 0 bone transform)) + (a3-0 (-> this rbody matrix)) + (a0-12 (-> a3-0 rvec quad)) + (a1-8 (-> a3-0 uvec quad)) + (a2-1 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-11 rvec quad) a0-12) + (set! (-> v1-11 uvec quad) a1-8) + (set! (-> v1-11 fvec quad) a2-1) + (set! (-> v1-11 trans quad) a3-1) + ) + (set! (-> this node-list data 0 bone transform trans quad) (-> this root trans quad)) + (vehicle-method-77 this) + (rigid-body-object-method-30 this) + (update-transforms (-> this root)) + (seek! (-> this scrape-sound-envelope) 0.0 (* 2.0 (seconds-per-frame))) + (mem-copy! (the-as pointer (-> this prev-controls)) (the-as pointer (-> this controls)) 24) + (logclear! (-> this v-flags) (vehicle-flag player-impulse-force player-contact-force)) + 0 + (none) + ) + ) + +(defmethod vehicle-method-117 ((this vehicle)) + (if (time-elapsed? (-> this player-touch-time) (seconds 0.1)) + (logclear! (-> this v-flags) (vehicle-flag player-touching player-edge-grabbing player-standing-on)) + ) + (when (logtest? (-> this v-flags) (vehicle-flag player-touching)) + (detect-riders! (-> this root)) + 0 + ) + (if (logtest? (vehicle-flag player-touching player-driving) (-> this v-flags)) + (logior! (-> this skel status) (joint-control-status sync-math)) + (logclear! (-> this skel status) (joint-control-status sync-math)) + ) + (vehicle-method-93 this) + 0 + (none) + ) + +(defmethod rbody-post ((this vehicle)) + (local-vars (a0-14 int) (a0-16 int) (a0-19 int) (a0-21 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))) + (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)) + (vehicle-method-117 this) + (vehicle-method-103 this) + ) + (else + (let* ((v1-26 (-> *perf-stats* data 20)) + (a0-11 (-> v1-26 ctrl)) + ) + (+! (-> v1-26 count) 1) + (b! (zero? a0-11) cfg-12 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-11) + ) + (.sync.l) + (.sync.p) + (label cfg-12) + 0 + (rigid-body-object-method-30 this) + (let ((v1-31 (-> *perf-stats* data 20))) + (b! (zero? (-> v1-31 ctrl)) cfg-14 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-14 pcr0) + (+! (-> v1-31 accum0) a0-14) + (.mfpc a0-16 pcr1) + (+! (-> v1-31 accum1) a0-16) + ) + (label cfg-14) + 0 + ) + ) + (let ((v1-34 (-> *perf-stats* data 37))) + (b! (zero? (-> v1-34 ctrl)) cfg-17 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-19 pcr0) + (+! (-> v1-34 accum0) a0-19) + (.mfpc a0-21 pcr1) + (+! (-> v1-34 accum1) a0-21) + ) + (label cfg-17) + 0 + 0 + (none) + ) + +(defmethod init-reverse ((this vehicle) (arg0 vehicle-controls)) + (set! (-> arg0 steering) 0.0) + (set! (-> arg0 lean-z) 0.0) + (set! (-> arg0 throttle) 0.0) + (set! (-> arg0 brake) 1.0) + (set! (-> arg0 handbrake) 1.0) + (logclear! (-> this v-flags) (vehicle-flag reverse-gear)) + 0 + (none) + ) + +(defmethod vehicle-method-118 ((this vehicle)) + (local-vars (a0-25 int) (a0-27 int)) + (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))) + (b! + (not (and (logtest? (vehicle-flag traffic-managed) (-> this v-flags)) + (not (logtest? (-> this v-flags) (vehicle-flag persistent))) + ) + ) + cfg-20 + :delay (empty-form) + ) + (let ((f0-3 (fmin (-> this player-dist2) (-> this camera-dist2)))) + (let ((f1-1 819200.0)) + (b! (>= (* f1-1 f1-1) f0-3) cfg-8) + ) + (let ((f1-4 819200.0)) + (if (< (* f1-4 f1-4) f0-3) + (vehicle-method-109 this) + ) + ) + (b! #t cfg-19 :delay (nop!)) + (label cfg-8) + (let ((f1-7 81920.0)) + (b! (>= (* f1-7 f1-7) f0-3) cfg-18) + ) + (b! (not (logtest? (-> this draw status) (draw-control-status on-screen))) cfg-11 :delay (nop!)) + (set-time! (-> this state-time)) + (b! #t cfg-17 :delay (nop!)) + (label cfg-11) + (if (or (time-elapsed? (-> this state-time) (seconds 10)) (let ((f1-10 409600.0)) + (< (* f1-10 f1-10) f0-3) + ) + ) + (vehicle-method-109 this) + ) + ) + (label cfg-17) + (b! #t cfg-19 :delay (nop!)) + (label cfg-18) + (set-time! (-> this state-time)) + (label cfg-19) + 0 + (label cfg-20) + (vehicle-method-129 this) + (cond + ((logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (when (not (vehicle-method-102 this)) + (disable-physics! this) + (vehicle-method-142 this) + ) + ) + (else + (if (vehicle-method-102 this) + (apply-momentum! this) + ) + ) + ) + (b! (not (logtest? (-> this rbody flags) (rigid-body-flag enable-physics))) cfg-31 :delay (nop!)) + (vector-reset! (-> this target-acceleration)) + (when (logtest? (-> this v-flags) (vehicle-flag disturbed)) + (if (logtest? (-> this v-flags) (vehicle-flag in-air)) + (set-time! (-> this disturbed-time)) + ) + ) + (let ((s5-2 (new 'stack-no-clear 'vehicle-controls))) + (mem-set32! (&-> s5-2 steering) 6 0) + (init-reverse this (the-as vehicle-controls (&-> s5-2 steering))) + (vehicle-method-92 this (the-as vehicle-controls (&-> s5-2 steering))) + ) + (vehicle-method-117 this) + (vehicle-method-103 this) + (b! #t cfg-36 :delay (nop!)) + (label cfg-31) + (let* ((v1-71 (-> *perf-stats* data 20)) + (a0-22 (-> v1-71 ctrl)) + ) + (+! (-> v1-71 count) 1) + (b! (zero? a0-22) cfg-33 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-22) + ) + (.sync.l) + (.sync.p) + (label cfg-33) + 0 + (rigid-body-object-method-30 this) + (let ((v1-76 (-> *perf-stats* data 20))) + (b! (zero? (-> v1-76 ctrl)) cfg-35 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-25 pcr0) + (+! (-> v1-76 accum0) a0-25) + (.mfpc a0-27 pcr1) + (+! (-> v1-76 accum1) a0-27) + ) + (label cfg-35) + 0 + (label cfg-36) + 0 + (none) + ) + +(defmethod vehicle-method-119 ((this vehicle)) + (set! (-> this player-dist2) 0.0) + (set! (-> this camera-dist2) 0.0) + ((-> this control-hook) this) + (vehicle-method-117 this) + 0 + (none) + ) + +(defmethod alloc-rbody-control! ((this vehicle) (arg0 rigid-body-object-constants)) + (if (logtest? (-> (the-as rigid-body-vehicle-constants arg0) flags) 8) + (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 + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> arg0 prim-core collide-as) (collide-spec vehicle-sphere)) + ) + ((= v1-0 1) + (set! (-> arg0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> arg0 prim-core collide-as) (collide-spec 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 vehicle-sphere vehicle-mesh)) + ) + ) + ) + (none) + ) + ) + (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 vehicle-sphere vehicle-mesh)) + (none) + ) + ) + ) + (set! (-> this bound-radius) (-> this draw bounds w)) + (set! (-> this draw shadow-ctrl) + (new 'process 'shadow-control -61440.0 -2048.0 69632.0 (-> this root trans) (shadow-flags shdf03) 245760.0) + ) + (logior! (-> this root root-prim prim-core action) (collide-action pull-rider-can-collide)) + (set! (-> this root pat-ignore-mask) (new 'static 'pat-surface :noentity #x1 :nopilot #x1 :probe #x1)) + (set! (-> this root event-self) 'touched) + (let ((t9-3 (method-of-type rigid-body-object alloc-rbody-control!))) + (t9-3 this (the-as rigid-body-vehicle-constants arg0)) + ) + (logior! (-> this rbody flags) (rigid-body-flag enable-collision)) + (set! (-> this root max-iteration-count) (the-as uint 8)) + (set! (-> this max-time-step) 0.033333335) + (logior! (-> this mask) (process-mask vehicle)) + (logclear! (-> this mask) (process-mask actor-pause movie)) + (logclear! (-> this skel status) (joint-control-status sync-math)) + (process-entity-status! this (entity-perm-status no-kill) #t) + (set! (-> this nav) #f) + (set! (-> this squad) #f) + (let ((v1-29 (-> this root root-prim))) + (set! (-> this root backup-collide-as) (-> v1-29 prim-core collide-as)) + (set! (-> this root backup-collide-with) (-> v1-29 prim-core collide-with)) + ) + (rigid-body-object-method-42 this) + (vehicle-method-76 this) + (set! (-> this power-level) 0.5) + (set! (-> this lights-factor) 0.0) + (set! (-> this turbo-boost-factor) 1.0) + (dotimes (v1-37 4) + (set! (-> this rider-array v1-37) (the-as handle #f)) + ) + (set! (-> this scrape-sound-id) (new 'static 'sound-id)) + (set! (-> this damage-zap-sound-id) (new-sound-id)) + (set! (-> this draw lod-set lod 0 dist) 122880.0) + (set! (-> this draw lod-set lod 1 dist) 204800.0) + (set! (-> this draw lod-set lod 2 dist) 819200.0) + (set! (-> this event-hook) vehicle-event-handler) + 0 + (none) + ) + +(defmethod attack-handler ((this vehicle) (arg0 process-drawable) (arg1 attack-info) (arg2 touching-shapes-entry) (arg3 penetrate)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'rigid-body-impact 2))) + (init-rbody-impact-from-tshape! this (-> s5-0 0) arg2) + (cond + ((logtest? (attack-mask attacker-velocity) (-> arg1 mask)) + (set! (-> s5-0 0 velocity quad) (-> arg1 attacker-velocity quad)) + ) + (else + (let ((s0-0 arg0)) + (cond + ((if (type? s0-0 process-focusable) + s0-0 + ) + (set! (-> s5-0 1 point quad) (-> (get-trans (the-as process-focusable arg0) 3) quad)) + (vector-! (-> s5-0 0 velocity) (the-as vector (-> s5-0 0)) (the-as vector (-> s5-0 1))) + ) + (else + (vector-! (-> s5-0 0 velocity) (the-as vector (-> s5-0 0)) (-> arg0 root trans)) + ) + ) + ) + ) + ) + (let ((f28-0 0.0)) + (let ((f30-0 0.0)) + (if (and (logtest? (penetrate jak-dark-nuke) arg3) + (not (logtest? (vehicle-flag ignore-damage) (-> this v-flags))) + ) + (send-event this 'traffic-off-force) + ) + (set! f28-0 + (cond + ((logtest? (penetrate jak-dark-blackhole) arg3) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag gun-dark-2-zero-g) (-> this v-flags)))) + f28-0 + ) + ((or (logtest? (penetrate dark-punch dark-bomb) arg3) + (and (logtest? (penetrate dark-skin) arg3) (logtest? arg3 (penetrate punch spin))) + ) + (set! f30-0 (* 204800.0 (-> this info info mass))) + (* 0.2 (-> this info damage hit-points)) + ) + ((logtest? (penetrate jak-red-shockwave) arg3) + (case (-> arg1 mode) + (('eco-red-shove) + (set! f30-0 (* (lerp 4096.0 8192.0 (-> arg1 control)) (-> this info info mass))) + (set! f28-0 0.0) + ) + (('eco-red) + (let ((f0-6 (* (lerp 20480.0 122880.0 (-> arg1 control)) (-> this info info mass)))) + (set! f30-0 (* 2.0 f0-6)) + ) + (set! f28-0 (* 8.0 (-> arg1 control))) + ) + ) + f28-0 + ) + (else + (cond + ((logtest? arg3 (penetrate punch)) + (set! f30-0 40960.0) + (set! f28-0 4.0) + ) + ((logtest? arg3 (penetrate flop spin)) + (set! f30-0 20480.0) + (set! f28-0 2.0) + ) + ((logtest? (attack-mask vehicle-damage-factor) (-> arg1 mask)) + (set! f28-0 (* (-> arg1 damage) (-> arg1 vehicle-damage-factor))) + (set! f30-0 (* 49152.0 (-> arg1 vehicle-impulse-factor) (-> arg1 damage))) + 0 + ) + (else + (set! f30-0 8192.0) + (set! f28-0 2.0) + ) + ) + f28-0 + ) + ) + ) + (set! (-> s5-0 0 impulse) f30-0) + ) + (apply-damage this f28-0 (-> s5-0 0)) + ) + (when (not (logtest? (vehicle-flag ignore-impulse) (-> this v-flags))) + (impulse-handler this) + (let ((s3-1 (new 'stack-no-clear 'vector))) + (set! (-> s3-1 quad) (-> s5-0 0 velocity quad)) + (vector-normalize! s3-1 1.0) + (vector-float*! s3-1 s3-1 (-> s5-0 0 impulse)) + (apply-impact! (-> this rbody) (the-as vector (-> s5-0 0)) s3-1) + (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 0)) 64) + (let ((v1-84 (-> arg2 head))) + (set! (-> *debug-vehicle-work* prim-sphere1 quad) (-> v1-84 prim1 cprim prim-core world-sphere quad)) + (set! (-> *debug-vehicle-work* prim-sphere2 quad) (-> v1-84 prim2 cprim prim-core world-sphere quad)) + ) + (add-debug-x #t (bucket-id debug-no-zbuf1) (the-as vector (-> s5-0 0)) *color-blue*) + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> s5-0 0)) + s3-1 + (meters 0.00024414062) + *color-blue* + ) + ) + ) + ) + ) + (if (and (-> this next-state) (= (-> this next-state name) 'idle)) + (go (method-of-object this waiting)) + ) + #t + ) + +(defmethod touch-handler ((this vehicle) (arg0 process-focusable) (arg1 touching-shapes-entry)) + #t + ) + +;; WARN: disable def twice: 317. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: disable def twice: 331. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod rbody-event-handler ((this vehicle) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-2 object)) + (when (and (= arg2 'touched) arg0 (logtest? (process-mask collectable) (-> arg0 mask))) + (dotimes (s1-0 4) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer arg0)) + (set! (-> a1-2 num-params) arg1) + (set! (-> a1-2 message) arg2) + (set! (-> a1-2 param 0) (-> arg3 param 0)) + (set! (-> a1-2 param 1) (-> arg3 param 1)) + (set! (-> a1-2 param 2) (-> arg3 param 2)) + (set! (-> a1-2 param 3) (-> arg3 param 3)) + (set! (-> a1-2 param 4) (-> arg3 param 4)) + (set! (-> a1-2 param 5) (-> arg3 param 5)) + (send-event-function (handle->process (-> this rider-array s1-0)) a1-2) + ) + ) + ) + (case arg2 + (('attack) + (let ((s3-1 (the-as object (-> arg3 param 1))) + (s2-1 (get-penetrate-using-from-attack-event (the-as process-drawable arg0) arg3)) + ) + (when (and (!= (-> (the-as attack-info s3-1) id) (-> this incoming-attack-id)) + (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (or (not (logtest? (vehicle-flag player-driving) (-> this v-flags))) + (not (logtest? (penetrate jak-yellow-shot jak-red-shot jak-blue-shot jak-dark-shot) s2-1)) + ) + ) + (set! (-> this incoming-attack-id) (-> (the-as attack-info s3-1) id)) + (when (and (logtest? (-> this info flags) 4) (logtest? (vehicle-flag ai-driving) (-> this v-flags))) + (let ((a1-6 (find-offending-process-focusable arg0 (the-as attack-info s3-1)))) + (if (and a1-6 (logtest? (-> a1-6 mask) (process-mask target))) + (vehicle-method-130 this) + ) + ) + ) + (attack-handler + this + (the-as process-drawable arg0) + (the-as attack-info s3-1) + (the-as touching-shapes-entry (-> arg3 param 0)) + s2-1 + ) + ) + ) + ) + (('apply-impulse) + (when (not (logtest? (vehicle-flag ignore-impulse) (-> this v-flags))) + (impulse-handler this) + (let ((a1-8 (-> arg3 param 0)) + (a2-3 (-> arg3 param 1)) + ) + (apply-impact! (-> this rbody) (the-as vector a1-8) (the-as vector a2-3)) + ) + (rigid-body-control-method-12 (-> this rbody) 1.0) + (init-velocities! (-> this rbody)) + ) + ) + (('get-offending-focusable) + (if (logtest? (vehicle-flag player-driving) (-> this v-flags)) + *target* + ) + ) + (('pilot-on) + (let* ((s3-2 (-> arg3 param 0)) + (s2-2 arg0) + (s5-1 (if (type? s2-2 process-focusable) + s2-2 + ) + ) + ) + (when s5-1 + (format #t "vehicle::event-handler: pilot-on (pid ~d) from pid ~d~%" (-> this pid) (-> arg0 pid)) + (logior! (-> this v-flags) (vehicle-flag riding)) + (put-rider-in-seat this (the-as int s3-2) s5-1) + (if (logtest? (-> s5-1 mask) (process-mask target)) + (logior! (-> this v-flags) (vehicle-flag player-driving)) + ) + #t + ) + ) + ) + (('player-get-off) + (if (and (logtest? (vehicle-flag player-driving) (-> this v-flags)) (!= (-> this crash-level) 3)) + (go (method-of-object this waiting)) + ) + ) + (('nav-mesh-kill) + (vehicle-method-138 this) + #t + ) + (('go-hostile) + (let ((a1-13 (-> arg3 param 0))) + (vehicle-method-143 this (the-as process a1-13)) + ) + ) + (('go-die) + (let ((v1-71 (-> this root root-prim))) + (set! (-> v1-71 prim-core collide-as) (collide-spec)) + (set! (-> v1-71 prim-core collide-with) (collide-spec)) + ) + 0 + (go (method-of-object this die)) + ) + (('scale-max-hit-points) + (let ((f1-0 (the-as float (-> arg3 param 0)))) + (set! (-> this damage-factor) (* (-> this damage-factor) (/ 1.0 f1-0))) + ) + 0 + ) + (('push-trans) + (let ((a1-14 (-> arg3 param 0))) + (vehicle-method-146 this (the-as vector a1-14)) + ) + #t + ) + (('gun-dark-2-off) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag gun-dark-2-zero-g)))) + (let* ((f1-2 (the-as float (-> arg3 param 0))) + (f30-0 (fmin (-> this hit-points) (- 1.0 f1-2))) + (a2-6 (new 'stack 'rigid-body-impact)) + ) + (apply-damage this (* (-> this info damage hit-points) (- (-> this hit-points) f30-0)) a2-6) + ) + ) + (('set-control-hook-ai) + (set! v0-2 (method-of-object this control-hook-ai)) + (set! (-> this control-hook) (the-as (function vehicle vehicle-controls) v0-2)) + v0-2 + ) + (('set-control-hook-player) + (set! v0-2 (method-of-object this control-hook-player)) + (set! (-> this control-hook) (the-as (function vehicle vehicle-controls) v0-2)) + v0-2 + ) + (('ignore-damage) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag ignore-damage)))) + (when (-> arg3 param 0) + (set! v0-2 (logior (vehicle-flag ignore-damage) (-> this v-flags))) + (set! (-> this v-flags) (the-as vehicle-flag v0-2)) + v0-2 + ) + ) + (('ignore-impulse) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag ignore-impulse)))) + (when (-> arg3 param 0) + (set! v0-2 (logior (vehicle-flag ignore-impulse) (-> this v-flags))) + (set! (-> this v-flags) (the-as vehicle-flag v0-2)) + v0-2 + ) + ) + (else + ((method-of-type rigid-body-object rbody-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod vehicle-method-131 ((this vehicle)) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs object. +(defmethod vehicle-method-143 ((this vehicle) (arg0 process)) + 0 + ) diff --git a/goal_src/jak3/levels/common-obs/ladder.gc b/goal_src/jak3/levels/common-obs/ladder.gc index b729bdac9f..174f0cf650 100644 --- a/goal_src/jak3/levels/common-obs/ladder.gc +++ b/goal_src/jak3/levels/common-obs/ladder.gc @@ -7,3 +7,219 @@ ;; DECOMP BEGINS +(deftype ladder (process-drawable) + ((root collide-shape :override) + (rider-unit float) + (rider-time time-frame) + (art-height meters) + (set-height meters) + (meters-per-unit meters) + (meters-per-rung meters) + (options ladder-options) + ) + (:state-methods + idle + (active handle) + ) + (:methods + (init-collision! (_type_) none) + (init-skel! (_type_) none) + (init-params! (_type_) none) + (ladder-method-25 (_type_ matrix float) matrix) + (nop (_type_) none) + ) + ) + + +(defskelgroup skel-ladder ladder ladder-lod0-jg ladder-idle-ja + ((ladder-lod0-mg (meters 999999))) + :bounds (static-spherem 0 8 0 16) + ) + +(defstate idle (ladder) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch 'attack) + (let* ((s4-0 proc) + (s2-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when s2-0 + (let ((s4-1 (ladder-method-25 self (new 'stack-no-clear 'matrix) 0.0)) + (s3-0 (ladder-method-25 self (new 'stack-no-clear 'matrix) 1.0)) + (s1-0 (get-trans (the-as process-focusable s2-0) 0)) + (s2-1 (new 'stack-no-clear 'vector)) + ) + (vector-segment-distance-point! s1-0 (-> s4-1 trans) (-> s3-0 trans) s2-1) + (when (and (time-elapsed? (-> self rider-time) (seconds 0.2)) + (if (< 0.0 (vector-dot (vector-! (new 'stack-no-clear 'vector) s1-0 s2-1) (-> s4-1 fvec))) + (not (logtest? (-> self options) (ladder-options lo0))) + (not (logtest? (-> self options) (ladder-options lo1))) + ) + (send-event proc 'ladder (-> block param 0)) + ) + (set! (-> self meters-per-unit) (vector-vector-distance (-> s4-1 trans) (-> s3-0 trans))) + (set! (-> self rider-unit) (/ (vector-vector-distance (-> s4-1 trans) s2-1) (-> self meters-per-unit))) + (set-time! (-> self rider-time)) + (go-virtual active (process->handle proc)) + ) + ) + (the-as ladder-options #f) + ) + ) + ) + (('options) + (-> self options) + ) + ) + ) + :code (behavior () + (until #f + (nop self) + (suspend) + ) + #f + ) + :post ja-post + ) + +(defstate active (ladder) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('matrix) + (let ((v0-0 (the-as object (ladder-method-25 self (the-as matrix (-> block param 0)) (-> self rider-unit))))) + (set-time! (-> self rider-time)) + v0-0 + ) + ) + (('move) + (set! (-> self rider-unit) + (fmax 0.0 (fmin 1.0 (+ (-> self rider-unit) (/ (the-as float (-> block param 0)) (-> self meters-per-unit))))) + ) + (* (-> self rider-unit) (/ (-> self meters-per-unit) (-> self meters-per-rung))) + ) + (('pos) + (if (> argc 0) + (set! (-> (the-as vector (-> block param 0)) quad) (-> self node-list data 5 bone transform uvec quad)) + ) + (-> self rider-unit) + ) + (('stance) + (let* ((f0-8 (/ (* 0.5 (-> self meters-per-rung)) (-> self meters-per-unit))) + (f1-12 (* (the float (the int (/ (+ (-> self rider-unit) (* 0.5 f0-8)) f0-8))) f0-8)) + ) + (+! (-> self rider-unit) (* 0.1 (- f1-12 (-> self rider-unit)))) + (set! (-> self rider-unit) (seek (-> self rider-unit) f1-12 (* 2.0 (seconds-per-frame) f0-8))) + ) + ) + (('options) + (-> self options) + ) + ) + ) + :code (behavior ((arg0 handle)) + (set-time! (-> self rider-time)) + (while (let ((s5-0 (handle->process arg0))) + (and (if (type? s5-0 process-focusable) + s5-0 + ) + (not (time-elapsed? (-> self rider-time) (seconds 0.1))) + ) + ) + (nop self) + (suspend) + ) + (go-virtual idle) + ) + ) + +(defmethod init-collision! ((this ladder)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate)) + (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 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 10240.0 0.0 12288.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) + ) + 0 + (none) + ) + +(defmethod init-skel! ((this ladder)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-ladder" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (none) + ) + +(defmethod init-params! ((this ladder)) + (set! (-> this meters-per-rung) 6144.0) + (set! (-> this art-height) 94208.0) + (set! (-> this set-height) (res-lump-float (-> this entity) 'height :default 94208.0)) + (set! (-> this options) (res-lump-value (-> this entity) 'options ladder-options :time -1000000000.0)) + 0 + (none) + ) + +(defmethod ladder-method-25 ((this ladder) (arg0 matrix) (arg1 float)) + (let ((s4-0 (-> this node-list data 4 bone transform)) + (s3-0 (new 'stack-no-clear 'matrix)) + ) + (let* ((a2-1 (-> this node-list data 5 bone transform)) + (v1-4 (-> a2-1 rvec quad)) + (a0-1 (-> a2-1 uvec quad)) + (a1-1 (-> a2-1 fvec quad)) + (a2-2 (-> a2-1 trans quad)) + ) + (set! (-> s3-0 rvec quad) v1-4) + (set! (-> s3-0 uvec quad) a0-1) + (set! (-> s3-0 fvec quad) a1-1) + (set! (-> s3-0 trans quad) a2-2) + ) + (vector+! + (-> s3-0 trans) + (-> s3-0 trans) + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> s4-0 trans) (-> s3-0 trans)) 9830.4) + ) + (matrix-lerp! arg0 s4-0 s3-0 arg1) + ) + ) + +(defmethod nop ((this ladder)) + 0 + (none) + ) + +(defmethod init-from-entity! ((this ladder) (arg0 entity-actor)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (init-skel! this) + (init-params! this) + (if (logtest? (-> this options) (ladder-options nodraw)) + (logior! (-> this draw status) (draw-control-status no-draw-bounds)) + ) + (set! (-> this root scale y) (/ (-> this set-height) (-> this art-height))) + (set! (-> this draw bounds y) (/ (* 0.5 (-> this set-height)) (-> this root scale y))) + (set! (-> this draw bounds w) (+ 2048.0 (* 0.5 (-> this set-height)))) + (set! (-> this root root-prim local-sphere y) (/ (* 0.5 (-> this set-height)) (-> this root scale y))) + (set! (-> this root root-prim local-sphere w) (+ 2048.0 (* 0.5 (-> this set-height)))) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/common/battle.gc b/goal_src/jak3/levels/common/battle.gc index 5b970cb776..68dbbc0f68 100644 --- a/goal_src/jak3/levels/common/battle.gc +++ b/goal_src/jak3/levels/common/battle.gc @@ -5,5 +5,1615 @@ ;; name in dgo: battle ;; dgos: TEMA, SEA, LFORM, LBIPED, TOWERA +;; +++battle-spawner-flags +(defenum battle-spawner-flags + :bitfield #t + :type int64 + (hit) + ) +;; ---battle-spawner-flags + + +;; +++battle-flags +(defenum battle-flags + :bitfield #t + :type uint8 + (noticed) + (active) + (beaten) + (no-spawner-block) + (battle-music-set) + ) +;; ---battle-flags + + ;; DECOMP BEGINS +(deftype battle-info (basic) + ((id int8) + (notice-spec uint64) + (pick-logic int8) + (notice-distance float) + (dont-spawn-initial-until-notice? symbol) + (play-battle-music symbol) + (min-battle-spawn-delay uint32) + (max-battle-spawn-delay uint32) + (min-spawner-notice-attack-delay uint32) + (max-spawner-notice-attack-delay uint32) + (spawner-blocked-by-player-xz float) + (spawner-blocked-by-collide-radius float) + (pick-spawner-max-dist float) + (max-count uint32) + (desired-alive-count uint8) + (spawner-collide-with collide-spec) + ) + ) + + +(deftype battle-ally (structure) + ((entity entity-actor) + ) + ) + + +(deftype battle-ally-array (inline-array-class) + ((data battle-ally :inline :dynamic) + ) + ) + + +(set! (-> battle-ally-array heap-base) (the-as uint 16)) + +(deftype battle-breed (structure) + ((breed-type type) + (percent float) + ) + ) + + +(deftype battle-breed-array (inline-array-class) + ((data battle-breed :inline :dynamic) + ) + ) + + +(set! (-> battle-breed-array heap-base) (the-as uint 16)) + +(deftype battle-spawner (structure) + ((flags battle-spawner-flags) + (entity entity-actor) + (breeds battle-breed-array) + (creature-index int8) + (ready-index int8) + (attack-index int8) + (mode uint8) + (intro-path path-control) + (notice-attack-delay uint32) + (creature handle) + (last-spawn-time time-frame) + (noticed-attack-time time-frame) + (attack-pos vector :inline) + ) + ) + + +(deftype battle-spawner-array (inline-array-class) + ((data battle-spawner :inline :dynamic) + ) + ) + + +(set! (-> battle-spawner-array heap-base) (the-as uint 80)) + +(deftype battle (process-drawable) + ((info battle-info) + (flags battle-flags) + (spawn-initial-creatures? symbol) + (next-spawn-delay uint32) + (on-notice basic) + (on-hostile basic) + (on-beaten basic) + (max-count uint32) + (count uint32) + (die-count uint32) + (stat-child-count uint16) + (cant-spawn-time time-frame) + (jammed-starting-time time-frame) + (spawners battle-spawner-array) + (allies battle-ally-array) + ) + (:state-methods + idle + undefined + notice + hostile + beaten + ) + (:methods + (spawner-blocked? (_type_ battle-spawner) symbol) + (spawner-blocked-by-collide? (_type_ battle-spawner) symbol) + (draw-battle-marks (_type_) none) + (initialize-enemy-lists (_type_) none) + (initialize-spawner-breeds (_type_ battle-spawner entity-actor) none) + (get-spawner-for-enemy (_type_ process) battle-spawner) + (initialize-ally (_type_ battle-ally entity-actor) none) + (initialize-spawner (_type_ battle-spawner entity-actor) none) + (initialize-battle (_type_) none) + (init-go (_type_) int) + (get-spawn-delay (_type_) int) + (get-best-spawner (_type_) battle-spawner) + (spawner-free? (_type_ battle-spawner) symbol) + (spawn-from-breed (_type_ battle-breed enemy-init-by-other-params) handle) + (spawn-from-spawner (_type_ battle-spawner symbol) none) + (spawn-initial-creatures (_type_) none) + (get-random-breed (_type_ battle-spawner) battle-breed) + (spawner-hit (_type_ battle-spawner process) symbol) + (spawner-try-jump (_type_ battle-spawner enemy) symbol) + (spawner-do-jump (_type_ battle-spawner) int) + (spawner-hittable? (_type_ battle-spawner) symbol) + (spawner-in-intro? (_type_ battle-spawner) symbol) + (set-battle-music (_type_) none) + (unset-battle-music (_type_) none) + (update-allies-list (_type_) int) + (beaten? (_type_) symbol) + (spawner-active? (_type_ battle-spawner symbol) symbol) + (spawner-active-count (_type_) int) + ) + ) + + +(define *battles* (new 'static 'boxed-array :type battle-info + (new 'static 'battle-info + :notice-spec #x2 + :notice-distance 163840.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x384 + :max-battle-spawn-delay #x708 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #xa + :desired-alive-count #x2 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 1 + :notice-spec #x2 + :notice-distance 163840.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x12c + :max-battle-spawn-delay #x4b0 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #xf + :desired-alive-count #x2 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 2 + :notice-spec #x2 + :notice-distance 204800.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x12c + :max-battle-spawn-delay #x4b0 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x11 + :desired-alive-count #x4 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 3 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x12c + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x1 + :desired-alive-count #x1 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 4 + :notice-spec #x2 + :notice-distance 245760.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x12c + :max-battle-spawn-delay #x4b0 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x14 + :desired-alive-count #x6 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 6 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x12c + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x1e + :desired-alive-count #xf + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 7 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x3c + :max-battle-spawn-delay #x96 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x32 + :desired-alive-count #xf + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 8 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x12c + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #xc + :desired-alive-count #x4 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 9 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x12c + :max-battle-spawn-delay #x258 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #xc + :desired-alive-count #x3 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 10 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x12c + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x8 + :desired-alive-count #x4 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 11 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x12c + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x32 + :desired-alive-count #x6 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 12 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x12c + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x1e + :desired-alive-count #x8 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 13 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x12c + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x20000000 + :desired-alive-count #x8 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 14 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x12c + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #xc + :desired-alive-count #x6 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 15 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x12c + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x28 + :desired-alive-count #xf + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 16 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x12c + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x4 + :desired-alive-count #x3 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 17 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x12c + :max-battle-spawn-delay #x258 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x7 + :desired-alive-count #x4 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 18 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x12c + :max-battle-spawn-delay #x258 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x8 + :desired-alive-count #x3 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 19 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x12c + :max-battle-spawn-delay #x258 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x22 + :desired-alive-count #x4 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 20 + :notice-spec #x1 + :pick-logic 1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x12c + :max-battle-spawn-delay #x258 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x14 + :desired-alive-count #x8 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 21 + :notice-spec #x2 + :notice-distance 1228800.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music 'wasfight + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x258 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x20000000 + :desired-alive-count #x6 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 22 + :notice-spec #x2 + :notice-distance 819200.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music 'wasfight + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x258 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x20000000 + :desired-alive-count #x6 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + ) + ) + +;; WARN: disable def twice: 9. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: disable def twice: 19. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: disable def twice: 29. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defbehavior battle-event-handler battle ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('query) + (case (-> arg3 param 0) + (('beaten) + (and (-> self next-state) (= (-> self next-state name) 'beaten)) + ) + (('hostile) + (and (-> self next-state) (= (-> self next-state name) 'hostile)) + ) + (('idle) + (and (-> self next-state) (= (-> self next-state name) 'idle)) + ) + (('die-count) + (-> self die-count) + ) + (else + #f + ) + ) + ) + (('child-die) + (+! (-> self die-count) 1) + (let ((v1-14 (get-spawner-for-enemy self arg0))) + (when v1-14 + (set! (-> v1-14 creature) (the-as handle #f)) + #f + ) + ) + ) + (('child-hit) + (let ((a1-3 (get-spawner-for-enemy self arg0))) + (when a1-3 + (logior! (-> a1-3 flags) (battle-spawner-flags hit)) + (spawner-hit self a1-3 arg0) + ) + ) + ) + (('child-jumped) + (let ((a1-5 (get-spawner-for-enemy self arg0))) + (if a1-5 + (spawner-do-jump self a1-5) + ) + ) + ) + (('trigger) + (if (and (-> self next-state) (= (-> self next-state name) 'idle)) + (go-virtual notice) + ) + ) + (('untrigger) + (if (not (and (-> self next-state) (= (-> self next-state name) 'idle))) + (go-virtual idle) + ) + ) + (('beaten) + (logior! (-> self flags) (battle-flags beaten)) + (if (and (-> self next-state) (= (-> self next-state name) 'idle)) + (go-virtual beaten) + ) + ) + (('resume) + (logclear! (-> self flags) (battle-flags beaten)) + (process-entity-status! self (entity-perm-status subtask-complete) #f) + (if (and (-> self next-state) (= (-> self next-state name) 'beaten)) + (go-virtual hostile) + ) + ) + ) + ) + +(defmethod draw-battle-marks ((this battle)) + (local-vars (sv-16 string) (sv-32 string)) + (let ((s4-0 (-> this root trans)) + (s5-0 (the-as int (-> this max-count))) + ) + (if (= (the-as uint s5-0) #x20000000) + (set! s5-0 0) + ) + (add-debug-x #t (bucket-id debug-no-zbuf1) s4-0 (new 'static 'rgba :g #xff :b #xff :a #x80)) + (let ((s3-0 add-debug-text-3d) + (s2-0 #t) + (s1-0 577) + ) + (format + (clear *temp-string*) + "~%~S~%count ~d/~d~%child ~d~%ally ~d~%die count ~d" + (-> this name) + (-> this count) + s5-0 + (-> this stat-child-count) + (-> this allies length) + (-> this die-count) + ) + (s3-0 s2-0 (the-as bucket-id s1-0) *temp-string* s4-0 (font-color orange) (the-as vector2h #f)) + ) + ) + (dotimes (s5-1 (-> this spawners length)) + (let ((s4-1 (-> this spawners data s5-1))) + (let ((a0-6 (-> s4-1 intro-path))) + (if a0-6 + (debug-draw a0-6) + ) + ) + (add-debug-x + #t + (bucket-id debug-no-zbuf1) + (-> s4-1 entity extra trans) + (new 'static 'rgba :g #xff :b #xff :a #x80) + ) + (let ((s3-1 add-debug-text-3d) + (s2-1 #t) + (s1-1 577) + ) + (let ((s0-1 format)) + (set! sv-16 (clear *temp-string*)) + (set! sv-32 "~%spawner~%~S") + (let ((a2-5 (res-lump-struct (-> s4-1 entity) 'name structure))) + (s0-1 sv-16 sv-32 a2-5) + ) + ) + (s3-1 + s2-1 + (the-as bucket-id s1-1) + *temp-string* + (-> s4-1 entity extra trans) + (font-color yellow) + (the-as vector2h #f) + ) + ) + ) + 0 + ) + 0 + (none) + ) + +(defmethod spawner-blocked-by-collide? ((this battle) (arg0 battle-spawner)) + (local-vars (a2-5 float) (a2-12 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (f0-0 (-> this info spawner-blocked-by-collide-radius)) + ) + (set! (-> gp-0 quad) (-> arg0 attack-pos quad)) + (set! (-> gp-0 w) f0-0) + (let ((s5-0 (-> this info spawner-collide-with)) + (f30-0 (* f0-0 f0-0)) + ) + (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)) + ) + (when (logtest? s5-0 (collide-spec player-list)) + (let ((a0-2 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((v1-15 (-> a0-2 next0))) + (while (!= a0-2 (-> *collide-player-list* alive-list-end)) + (let* ((a0-3 (-> (the-as connection a0-2) param1)) + (a1-4 (-> (the-as collide-shape a0-3) root-prim)) + ) + (when (logtest? s5-0 (-> a1-4 prim-core collide-as)) + (let ((a1-5 (-> a1-4 prim-core))) + (let ((a2-4 a1-5) + (a3-1 gp-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-1 (+ (-> a1-5 world-sphere w) (-> gp-0 w))) + ) + (when (< f0-2 (* 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-15) + *collide-player-list* + (set! v1-15 (-> v1-15 next0)) + ) + ) + ) + ) + (when (logtest? s5-0 (collide-spec hit-by-player-list)) + (let ((a0-5 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((v1-23 (-> a0-5 next0))) + (while (!= a0-5 (-> *collide-hit-by-player-list* alive-list-end)) + (let* ((a0-6 (-> (the-as connection a0-5) param1)) + (a1-16 (-> (the-as collide-shape a0-6) root-prim)) + ) + (when (logtest? s5-0 (-> a1-16 prim-core collide-as)) + (let ((a1-17 (-> a1-16 prim-core))) + (let ((a2-11 a1-17) + (a3-2 gp-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-5 (+ (-> a1-17 world-sphere w) (-> gp-0 w))) + ) + (when (< f0-3 (* 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-23) + *collide-hit-by-player-list* + (set! v1-23 (-> v1-23 next0)) + ) + ) + ) + ) + (dotimes (s4-0 *actor-list-length*) + (let ((v1-28 (-> *actor-list* s4-0))) + (when (logtest? s5-0 (-> v1-28 root-prim prim-core collide-as)) + (if (>= f30-0 (vector-vector-xz-distance-squared gp-0 (-> v1-28 trans))) + (return #t) + ) + ) + ) + ) + ) + ) + #f + ) + ) + +(defmethod spawner-blocked? ((this battle) (arg0 battle-spawner)) + (when (not (logtest? (-> this flags) (battle-flags no-spawner-block))) + (let ((f0-0 (-> this info spawner-blocked-by-player-xz))) + (if (and (< 0.0 f0-0) (>= (* f0-0 f0-0) (vector-vector-xz-distance-squared (target-pos 0) (-> arg0 attack-pos)))) + (return #t) + ) + ) + (let ((f0-3 (-> this info spawner-blocked-by-collide-radius))) + (if (and (< 0.0 f0-3) (spawner-blocked-by-collide? this arg0)) + (return #t) + ) + ) + ) + #f + ) + +(defmethod spawner-free? ((this battle) (arg0 battle-spawner)) + (and (not (handle->process (-> arg0 creature))) + (and (not (-> *setting-control* user-current nuke-active?)) + (or (>= (-> arg0 ready-index) 0) (not (spawner-blocked? this arg0))) + ) + ) + ) + +(defmethod get-best-spawner ((this battle)) + (if (-> *setting-control* user-current nuke-active?) + (return (the-as battle-spawner #f)) + ) + (let ((s5-0 (-> this spawners length)) + (v1-6 (-> this info pick-logic)) + ) + (if (not *target*) + (set! v1-6 0) + ) + (cond + ((zero? v1-6) + (let ((s3-0 (rand-vu-int-count s5-0))) + (dotimes (s4-0 s5-0) + (let ((s2-0 (-> this spawners data s3-0))) + (if (spawner-free? this s2-0) + (return s2-0) + ) + ) + (set! s3-0 (mod (+ s3-0 1) s5-0)) + ) + ) + ) + ((= v1-6 1) + (let ((s4-1 0) + (f30-0 -1.0) + ) + (while (nonzero? s5-0) + (+! s5-0 -1) + (let ((s3-1 (-> this spawners data s5-0))) + (when (spawner-free? this s3-1) + (let ((f0-0 (vector-vector-distance (target-pos 0) (-> s3-1 entity extra trans)))) + (when (and (>= (-> this info pick-spawner-max-dist) f0-0) (or (< f30-0 0.0) (< f0-0 f30-0))) + (set! s4-1 s5-0) + (set! f30-0 f0-0) + ) + ) + ) + ) + ) + (if (< 0.0 f30-0) + (return (-> this spawners data s4-1)) + ) + ) + ) + ) + ) + (the-as battle-spawner #f) + ) + +(defmethod get-random-breed ((this battle) (arg0 battle-spawner)) + (let ((f0-0 (rand-vu)) + (v1-0 0) + ) + (let ((a0-2 (-> arg0 breeds length))) + (dotimes (a1-1 a0-2) + (when (>= f0-0 0.0) + (set! f0-0 (- f0-0 (-> arg0 breeds data a1-1 percent))) + (if (< f0-0 0.0) + (set! v1-0 a1-1) + ) + ) + ) + ) + (-> arg0 breeds data v1-0) + ) + ) + +;; WARN: Return type mismatch int vs handle. +(defmethod spawn-from-breed ((this battle) (arg0 battle-breed) (arg1 enemy-init-by-other-params)) + (let* ((a1-1 (-> arg0 breed-type)) + (s4-0 (get-process *default-dead-pool* a1-1 #x4000 1)) + (v1-1 (when s4-0 + (let ((t9-1 (method-of-type process activate))) + (t9-1 s4-0 this "battle-slave" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-0 enemy-init-by-other this arg1) + (-> s4-0 ppointer) + ) + ) + ) + (if (not v1-1) + (return (the-as handle #f)) + ) + (+! (-> this count) 1) + (the-as handle (ppointer->handle v1-1)) + ) + ) + +;; WARN: Return type mismatch handle vs none. +(defmethod spawn-from-spawner ((this battle) (arg0 battle-spawner) (arg1 symbol)) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'quaternion)) + (s2-0 (-> arg0 intro-path)) + ) + (cond + (s2-0 + (let ((s1-0 0)) + (when arg1 + (set! s1-0 (-> arg0 ready-index)) + (set! s1-0 (cond + ((>= s1-0 0) + (empty) + s1-0 + ) + (else + (-> arg0 attack-index) + ) + ) + ) + ) + (set! (-> arg0 creature-index) s1-0) + (get-point-in-path! s2-0 s3-0 (the float s1-0) 'exact) + (let ((s0-0 (new 'stack-no-clear 'vector))) + (displacement-between-two-points-normalized! s2-0 s0-0 (the float s1-0)) + (set! (-> s0-0 y) 0.0) + (vector-normalize! s0-0 1.0) + (forward-up->quaternion s4-0 s0-0 *up-vector*) + ) + ) + ) + (else + (set! (-> arg0 creature-index) 0) + (let ((v1-7 (-> arg0 entity))) + (set! (-> s3-0 quad) (-> v1-7 extra trans quad)) + (quaternion-copy! s4-0 (-> v1-7 quat)) + ) + ) + ) + (let ((s1-1 (new 'stack-no-clear 'enemy-init-by-other-params)) + (s2-1 (!= s2-0 #f)) + (s0-1 (get-random-breed this arg0)) + ) + (set! (-> s1-1 trans quad) (-> s3-0 quad)) + (quaternion-copy! (-> s1-1 quat) s4-0) + (set! (-> s1-1 entity) (-> arg0 entity)) + (set! (-> s1-1 directed?) #t) + (set! (-> s1-1 no-initial-move-to-ground?) s2-1) + (set! (-> s1-1 art-level) #f) + (let ((v0-7 (spawn-from-breed this s0-1 s1-1))) + (when (handle->process v0-7) + (set! (-> arg0 creature) v0-7) + (set! (-> arg0 mode) (the-as uint 1)) + (set-time! (-> arg0 last-spawn-time)) + ) + ) + ) + ) + (none) + ) + +(defmethod get-spawner-for-enemy ((this battle) (arg0 process)) + (let ((v1-0 (if (type? arg0 nav-enemy) + (the-as nav-enemy arg0) + ) + ) + ) + (when v1-0 + (dotimes (a0-3 (-> this spawners length)) + (let* ((a1-5 (-> this spawners data a0-3)) + (a2-2 (handle->process (-> a1-5 creature))) + ) + (when (and a2-2 (= a2-2 v1-0)) + (when (not (logtest? (enemy-flag directed) (-> (the-as nav-enemy a2-2) enemy-flags))) + (set! (-> a1-5 creature) (the-as handle #f)) + (set! a1-5 (the-as battle-spawner #f)) + ) + (return a1-5) + ) + ) + ) + ) + ) + (the-as battle-spawner #f) + ) + +(defmethod spawner-active? ((this battle) (arg0 battle-spawner) (arg1 symbol)) + (when (and (logtest? (-> this flags) (battle-flags active)) (not (logtest? (-> this flags) (battle-flags beaten)))) + (let ((v1-5 (-> arg0 noticed-attack-time))) + (cond + ((zero? v1-5) + (set-time! (-> arg0 noticed-attack-time)) + ) + (else + (if (time-elapsed? v1-5 (the-as time-frame (-> arg0 notice-attack-delay))) + (logior! (-> arg0 flags) (battle-spawner-flags hit)) + ) + ) + ) + ) + ) + (let ((s4-0 (handle->process (-> arg0 creature)))) + (when s4-0 + (when (not (logtest? (enemy-flag directed) (-> (the-as nav-enemy s4-0) enemy-flags))) + (set! (-> arg0 creature) (the-as handle #f)) + (return #f) + ) + (let ((v1-20 (-> arg0 mode))) + (cond + ((= v1-20 1) + (set! (-> arg0 mode) (the-as uint 0)) + 0 + ) + ((zero? v1-20) + (when (or (logtest? (enemy-flag directed-ready) (-> (the-as nav-enemy s4-0) enemy-flags)) (not arg1)) + (cond + ((spawner-in-intro? this arg0) + (if (not (spawner-try-jump this arg0 (the-as enemy s4-0))) + (return #t) + ) + ) + ((spawner-hittable? this arg0) + (spawner-hit this arg0 s4-0) + ) + ) + ) + ) + ) + ) + ) + ) + #f + ) + +(defmethod spawner-in-intro? ((this battle) (arg0 battle-spawner)) + (when (-> arg0 intro-path) + (let ((v1-1 (-> arg0 creature-index)) + (a0-1 (-> arg0 attack-index)) + ) + (or (< v1-1 (-> arg0 ready-index)) (and (< v1-1 a0-1) (logtest? (-> arg0 flags) (battle-spawner-flags hit)))) + ) + ) + ) + +(defmethod spawner-try-jump ((this battle) (arg0 battle-spawner) (arg1 enemy)) + (let ((s3-0 (+ (-> arg0 creature-index) 1)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (if (and (= s3-0 (-> arg0 attack-index)) (spawner-blocked? this arg0)) + (return #f) + ) + (get-point-in-path! (-> arg0 intro-path) s4-0 (the float s3-0) 'exact) + (let ((s3-1 (-> arg0 mode))) + (set! (-> arg0 mode) (the-as uint 2)) + (set! (-> arg1 enemy-flags) + (the-as enemy-flag (logclear (-> arg1 enemy-flags) (enemy-flag jump-check-blocked))) + ) + (cond + ((send-event arg1 'jump 3 s4-0) + #t + ) + (else + (set! (-> arg0 mode) s3-1) + #f + ) + ) + ) + ) + ) + +(defmethod spawner-hittable? ((this battle) (arg0 battle-spawner)) + (when (logtest? (-> arg0 flags) (battle-spawner-flags hit)) + (if (-> arg0 intro-path) + (>= (-> arg0 creature-index) (-> arg0 attack-index)) + #t + ) + ) + ) + +(defmethod spawner-hit ((this battle) (arg0 battle-spawner) (arg1 process)) + (let ((s5-0 (-> arg0 creature))) + (set! (-> arg0 creature) (the-as handle #f)) + (cond + ((send-event arg1 'cue-chase) + #t + ) + (else + (set! (-> arg0 creature) s5-0) + #f + ) + ) + ) + ) + +(defmethod spawner-do-jump ((this battle) (arg0 battle-spawner)) + (when (= (-> arg0 mode) 2) + (+! (-> arg0 creature-index) 1) + (set! (-> arg0 mode) (the-as uint 0)) + (spawner-active? this arg0 #f) + ) + 0 + ) + +(defmethod spawner-active-count ((this battle)) + (let ((gp-0 0)) + (dotimes (s4-0 (-> this spawners length)) + (if (spawner-active? this (-> this spawners data s4-0) #t) + (+! gp-0 1) + ) + ) + gp-0 + ) + ) + +(defmethod spawn-initial-creatures ((this battle)) + (set! (-> this spawn-initial-creatures?) #f) + (let ((s5-0 (-> this spawners))) + (dotimes (s4-0 (-> s5-0 length)) + (let ((s3-0 (-> s5-0 data s4-0))) + (when (spawner-free? this s3-0) + (let ((v1-7 (res-lump-value (-> s3-0 entity) 'enemy-options uint128 :time -1000000000.0))) + (when (logtest? #x100000 v1-7) + (spawn-from-spawner this s3-0 #t) + (+! (-> this stat-child-count) 1) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod get-spawn-delay ((this battle)) + (let ((v1-0 (-> this info))) + (rand-vu-int-range + (the-as int (-> v1-0 min-battle-spawn-delay)) + (the-as int (-> v1-0 max-battle-spawn-delay)) + ) + ) + ) + +(defstate idle (battle) + :virtual #t + :event battle-event-handler + :enter (behavior () + (if (and (-> self spawn-initial-creatures?) (not (-> self info dont-spawn-initial-until-notice?))) + (spawn-initial-creatures self) + ) + (unset-battle-music self) + ) + :trans (behavior () + (let ((v1-1 (-> self info notice-spec))) + (when (not (logtest? v1-1 1)) + (let ((gp-0 #t)) + (if (and (logtest? v1-1 2) + (not (and *target* + (and (>= (-> self info notice-distance) (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + ) + ) + (set! gp-0 #f) + ) + (if gp-0 + (go-virtual notice) + ) + ) + ) + ) + (if *display-battle-marks* + (draw-battle-marks self) + ) + ) + :code sleep-code + ) + +(defstate notice (battle) + :virtual #t + :event battle-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((gp-0 (-> self on-notice))) + (if gp-0 + (script-eval (the-as pair gp-0) :vector (-> self root trans)) + ) + ) + (set-battle-music self) + (if (-> self spawn-initial-creatures?) + (spawn-initial-creatures self) + ) + (if (logtest? (-> self flags) (battle-flags noticed)) + (go-virtual hostile) + ) + (logior! (-> self flags) (battle-flags noticed)) + ) + :trans (behavior () + (if *display-battle-marks* + (draw-battle-marks self) + ) + ) + :code (behavior () + (go-virtual hostile) + ) + ) + +(defmethod update-allies-list ((this battle)) + (with-pp + (let ((v1-0 (-> this allies)) + (gp-0 (-> this allies length)) + ) + (when (> gp-0 0) + (let* ((a1-4 (mod (-> pp clock integral-frame-counter) gp-0)) + (a3-0 (-> v1-0 data a1-4)) + ) + (when (logtest? (-> a3-0 entity extra perm status) (entity-perm-status dead)) + (+! (-> this die-count) 1) + (+! gp-0 -1) + (set! (-> v1-0 length) gp-0) + (if (and (nonzero? gp-0) (!= a1-4 gp-0)) + (mem-copy! (the-as pointer a3-0) (the-as pointer (-> v1-0 data gp-0)) 4) + ) + ) + ) + ) + gp-0 + ) + ) + ) + +(defmethod beaten? ((this battle)) + (let ((s5-0 (spawner-active-count this)) + (v1-2 (update-allies-list this)) + (a1-0 (-> this child)) + (a0-3 0) + ) + (while a1-0 + (+! a0-3 1) + (set! a1-0 (-> a1-0 0 brother)) + (nop!) + (nop!) + ) + (set! (-> this stat-child-count) (the-as uint a0-3)) + (let ((a0-4 (+ v1-2 a0-3)) + (v1-4 (-> this max-count)) + ) + (if (>= (-> this die-count) v1-4) + (return #t) + ) + (logclear! (-> this flags) (battle-flags no-spawner-block)) + (cond + ((and (> s5-0 0) (>= s5-0 (the-as int (- v1-4 (-> this die-count))))) + (let ((a1-10 (-> this jammed-starting-time))) + (cond + ((zero? (-> this jammed-starting-time)) + (set-time! (-> this jammed-starting-time)) + ) + (else + (if (time-elapsed? a1-10 (seconds 3.5)) + (logior! (-> this flags) (battle-flags no-spawner-block)) + ) + ) + ) + ) + ) + (else + (set! (-> this jammed-starting-time) 0) + 0 + ) + ) + (cond + ((and (not (logtest? (-> this flags) (battle-flags beaten))) + (> (-> this spawners length) 0) + (< a0-4 (the-as int (-> this info desired-alive-count))) + (< (-> this count) v1-4) + ) + (when (time-elapsed? (-> this cant-spawn-time) (the-as time-frame (-> this next-spawn-delay))) + (let ((a1-25 (get-best-spawner this))) + (cond + (a1-25 + (spawn-from-spawner this a1-25 #f) + (set! (-> this next-spawn-delay) (the-as uint (get-spawn-delay this))) + (set-time! (-> this cant-spawn-time)) + ) + (else + (set-time! (-> this cant-spawn-time)) + ) + ) + ) + ) + ) + (else + (set-time! (-> this cant-spawn-time)) + ) + ) + ) + ) + #f + ) + +(defstate hostile (battle) + :virtual #t + :event battle-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self flags) (battle-flags active)) + (logclear! (-> self flags) (battle-flags no-spawner-block)) + (set! (-> self jammed-starting-time) 0) + (set! (-> self cant-spawn-time) 0) + (set! (-> self next-spawn-delay) (the-as uint 0)) + (set-battle-music self) + (let ((gp-0 (-> self on-hostile))) + (if gp-0 + (script-eval (the-as pair gp-0) :vector (-> self root trans)) + ) + ) + ) + :trans (behavior () + (if (beaten? self) + (go-virtual beaten) + ) + (if *display-battle-marks* + (draw-battle-marks self) + ) + ) + :code sleep-code + ) + +(defstate beaten (battle) + :virtual #t + :event battle-event-handler + :enter (behavior () + (when (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + ) + (let ((gp-0 (-> self on-beaten))) + (if gp-0 + (script-eval (the-as pair gp-0) :vector (-> self root trans)) + ) + ) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (unset-battle-music self) + ) + :code sleep-code + ) + +;; WARN: Return type mismatch battle-flags vs none. +(defmethod set-battle-music ((this battle)) + (let ((a3-0 (-> this info play-battle-music))) + (when (and a3-0 (not (logtest? (-> this flags) (battle-flags battle-music-set)))) + (case a3-0 + (('sound-mode) + (set-setting! 'sound-mode #f 0.0 1) + ) + (else + (set-setting! 'music a3-0 0.0 0) + ) + ) + (logior! (-> this flags) (battle-flags battle-music-set)) + ) + ) + (none) + ) + +(defmethod unset-battle-music ((this battle)) + (when (logtest? (-> this flags) (battle-flags battle-music-set)) + (remove-setting! 'sound-mode) + (remove-setting! 'music) + ) + 0 + (none) + ) + +(defmethod relocate ((this battle-spawner-array) (offset int)) + (dotimes (v1-0 (-> this length)) + (let ((a2-3 (-> this data v1-0))) + (&+! (-> a2-3 breeds) offset) + (if (-> a2-3 intro-path) + (&+! (-> a2-3 intro-path) offset) + ) + ) + ) + this + ) + +(defmethod relocate ((this battle) (offset int)) + (&+! (-> this spawners) offset) + (&+! (-> this allies) offset) + (call-parent-method this offset) + ) + +(defmethod initialize-spawner-breeds ((this battle) (arg0 battle-spawner) (arg1 entity-actor)) + (local-vars (sv-16 res-tag) (sv-32 res-tag)) + (let ((s2-0 0) + (s5-0 0) + (s4-0 0) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((s1-0 (res-lump-data arg1 'spawn-types pointer :tag-ptr (& sv-16)))) + (dotimes (s0-0 2) + (set! s2-0 0) + (when s1-0 + (set! s4-0 (the-as int (-> sv-16 elt-count))) + (dotimes (v1-5 s4-0) + (let ((a0-4 (-> (the-as (pointer uint32) (&+ s1-0 (* v1-5 4)))))) + (when (nonzero? a0-4) + (set! s5-0 (logior s5-0 (ash 1 v1-5))) + (+! s2-0 1) + (when (= s0-0 1) + (let ((a1-10 (-> arg0 breeds data (+ s2-0 -1)))) + (set! (-> a1-10 breed-type) (the-as type a0-4)) + (set! (-> a1-10 percent) 1.0) + ) + ) + ) + ) + ) + ) + (if (zero? s0-0) + (set! (-> arg0 breeds) (new 'process 'battle-breed-array (max 1 s2-0))) + ) + ) + ) + (cond + ((zero? s2-0) + (let ((v1-15 (-> arg0 breeds data))) + (set! (-> v1-15 0 breed-type) (-> arg1 etype)) + (set! (-> v1-15 0 percent) 1.0) + ) + ) + (else + (set! sv-32 (new 'static 'res-tag)) + (let ((v1-18 (res-lump-data arg1 'spawn-percs pointer :tag-ptr (& sv-32)))) + (when v1-18 + (let ((a0-16 (min (the-as int (-> sv-32 elt-count)) s4-0)) + (a1-14 0) + (a2-7 (-> arg0 breeds)) + ) + (dotimes (a3-2 a0-16) + (when (logtest? s5-0 (ash 1 a3-2)) + (let ((t0-8 (-> a2-7 data a1-14))) + (set! (-> t0-8 percent) (-> (the-as (pointer float) (&+ v1-18 (* a3-2 4))))) + ) + (+! a1-14 1) + ) + ) + ) + ) + ) + (let ((f30-0 0.0) + (s5-1 (-> arg0 breeds)) + ) + (dotimes (v1-20 (-> s5-1 length)) + (+! f30-0 (-> s5-1 data v1-20 percent)) + ) + (when (!= f30-0 1.0) + (format + 0 + "WARNING: battle spawner ~A has spawn percents that don't sum to 1.0.~%" + (res-lump-struct (-> arg0 entity) 'name structure) + ) + (dotimes (v1-26 (-> s5-1 length)) + (let ((a0-27 (-> s5-1 data v1-26))) + (set! (-> a0-27 percent) (/ (-> a0-27 percent) f30-0)) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod initialize-spawner ((this battle) (arg0 battle-spawner) (arg1 entity-actor)) + (set! (-> arg0 flags) (battle-spawner-flags)) + (set! (-> arg0 entity) arg1) + (set! (-> arg0 creature-index) 0) + (set! (-> arg0 ready-index) -1) + (set! (-> arg0 attack-index) 0) + (set! (-> arg0 intro-path) #f) + (set! (-> arg0 notice-attack-delay) + (the-as uint (rand-vu-int-range + (the-as int (-> this info min-spawner-notice-attack-delay)) + (the-as int (-> this info max-spawner-notice-attack-delay)) + ) + ) + ) + (set! (-> arg0 creature) (the-as handle #f)) + (set! (-> arg0 last-spawn-time) 0) + (set! (-> arg0 noticed-attack-time) 0) + (initialize-spawner-breeds this arg0 arg1) + (let ((a0-4 (new 'process 'path-control this 'intro 0.0 arg1 #t))) + (cond + ((nonzero? a0-4) + (set! (-> arg0 intro-path) a0-4) + (logior! (-> a0-4 flags) (path-control-flag display draw-line draw-point draw-text)) + (let ((s5-1 (-> a0-4 curve num-cverts))) + (let ((v1-9 (+ s5-1 -1))) + (set! (-> arg0 attack-index) v1-9) + (get-point-in-path! a0-4 (-> arg0 attack-pos) (the float v1-9) 'exact) + ) + (let ((v0-4 -1)) + (if (< 2 s5-1) + (set! v0-4 1) + ) + (set! (-> arg0 ready-index) v0-4) + ) + ) + ) + (else + (set! (-> arg0 attack-pos quad) (-> arg0 entity extra trans quad)) + ) + ) + ) + (none) + ) + +(defmethod initialize-ally ((this battle) (arg0 battle-ally) (arg1 entity-actor)) + (set! (-> arg0 entity) arg1) + 0 + (none) + ) + +(defmethod initialize-enemy-lists ((this battle)) + (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))) + (let* ((s5-0 (-> (the-as (pointer actor-group) v0-0) 0)) + (s4-0 (-> s5-0 length)) + ) + (dotimes (s3-0 2) + (let ((s1-0 0) + (s2-0 0) + ) + (dotimes (s0-0 s4-0) + (set! sv-32 (-> s5-0 data s0-0 actor)) + (when sv-32 + (let ((v0-1 (res-lump-value sv-32 'enemy-options uint128 :time -1000000000.0))) + (cond + ((logtest? #x80000 v0-1) + (+! s1-0 1) + (cond + ((zero? s3-0) + 0 + ) + (else + (let ((a1-2 (-> this spawners data (+ s1-0 -1)))) + (initialize-spawner this a1-2 sv-32) + ) + ) + ) + ) + (else + (when (not (logtest? (-> sv-32 extra perm status) (entity-perm-status dead))) + (+! s2-0 1) + (cond + ((zero? s3-0) + 0 + ) + (else + (let ((a1-3 (-> this allies data (+ s2-0 -1)))) + (initialize-ally this a1-3 sv-32) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (set! v0-4 (when (zero? s3-0) + (set! (-> this spawners) (new 'process 'battle-spawner-array s1-0)) + (set! v0-4 (new 'process 'battle-ally-array s2-0)) + (set! (-> this allies) v0-4) + v0-4 + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod initialize-battle ((this battle)) + (set! (-> this spawn-initial-creatures?) #t) + (set! (-> this count) (the-as uint 0)) + (set! (-> this die-count) (the-as uint 0)) + (set! (-> this stat-child-count) (the-as uint 0)) + (let ((v1-2 (res-lump-value (-> this entity) 'extra-id uint128 :default (the-as uint128 -1) :time -1000000000.0)) + (a0-2 *battles*) + ) + (dotimes (a1-1 (-> a0-2 length)) + (let ((a2-3 (-> a0-2 a1-1))) + (when (= (the-as uint v1-2) (-> a2-3 id)) + (set! (-> this info) a2-3) + (goto cfg-7) + ) + ) + ) + ) + (go process-drawable-art-error "bad battle id") + (label cfg-7) + (set! (-> this on-notice) (res-lump-struct (-> this entity) 'on-notice basic)) + (set! (-> this on-hostile) (res-lump-struct (-> this entity) 'on-hostile basic)) + (set! (-> this on-beaten) (res-lump-struct (-> this entity) 'on-beaten basic)) + (initialize-enemy-lists this) + (+! (-> this count) (-> this allies length)) + (let ((v1-16 (-> this info max-count))) + (cond + ((and (= v1-16 #x20000000) (zero? (-> this spawners length))) + (set! v1-16 (-> this count)) + ) + ((< v1-16 (-> this count)) + (set! v1-16 (-> this count)) + ) + ) + (set! (-> this max-count) v1-16) + ) + 0 + (none) + ) + +(defmethod init-go ((this battle)) + (if (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (go (method-of-object this beaten)) + (go (method-of-object this idle)) + ) + 0 + ) + +;; WARN: Return type mismatch int vs object. +(defmethod init-from-entity! ((this battle) (arg0 entity-actor)) + (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)) + ) + (initialize-battle this) + (init-go this) + ) diff --git a/goal_src/jak3/levels/common/elec-gate.gc b/goal_src/jak3/levels/common/elec-gate.gc index c531b249ab..db416c1488 100644 --- a/goal_src/jak3/levels/common/elec-gate.gc +++ b/goal_src/jak3/levels/common/elec-gate.gc @@ -5,5 +5,955 @@ ;; name in dgo: elec-gate ;; dgos: SEH, DESG, MIA, CIA, STAA +(define-extern set-sewg-electricity-scale! (function float int none)) +(define-extern set-sewh-electricity-scale! (function float int none)) + ;; DECOMP BEGINS +(deftype elec-gate-params (structure) + ((bolt-spec lightning-spec) + (ring-spec lightning-spec) + (ring-radius-min float) + (ring-radius-max float) + (speed-mult float) + (min-dist float) + (max-dist float) + (plane-expand-xz float) + (plane-expand-y float) + (plane-shift-z float) + ) + ) + + +(deftype elec-gate-bolt (structure) + ((ring lightning-control 2) + (bolt lightning-control) + (ring-radius float) + (pos float) + ) + ) + + +(deftype elec-wall (structure) + ((pos vector :inline) + (dir vector :inline) + ) + ) + + +(deftype elec-gate (process-drawable) + ((params elec-gate-params) + (path-l path-control :overlay-at path) + (path-r path-control) + (l-bolt elec-gate-bolt 5 :inline) + (part-on sparticle-launch-control :overlay-at part) + (part-off sparticle-launch-control) + (part-spawner-left part-spawner) + (part-spawner-right part-spawner) + (on-start pair) + (on-stop pair) + (on-shutdown pair) + (on-trigger pair) + (dividing-wall elec-wall :inline) + (plane elec-wall 2 :inline) + (wall-y float) + (wall-xz float) + (lightning-quality float) + (quality-enabled? symbol) + ) + (:state-methods + idle + active + shutdown-camera + shutdown + ) + (:methods + (get-params (_type_) elec-gate-params) + (elec-gate-method-25 (_type_) none) + (elec-gate-method-26 (_type_) none) + (go-initial-state (_type_) object) + (spawn-particles (_type_ sparticle-launch-control) none) + (set-elec-scale! (_type_ float) none) + (elec-gate-method-30 (_type_ float) none) + ) + ) + + +(define *default-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 (new 'static 'lightning-spec + :name #f + :flags (lightning-spec-flags lsf2) + :rand-func #x3 + :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 120.0 + :texture (new 'static 'texture-id :index #x3f :page #x4) + :reduction 0.42 + :num-points 12 + :box-size 3072.0 + :merge-factor 0.5 + :radius 2048.0 + :duration -1.0 + :sound #f + ) + :ring-radius-min 1638.4 + :ring-radius-max 2867.2 + :speed-mult 1.0 + :min-dist 163840.0 + :max-dist 491520.0 + :plane-expand-xz 8192.0 + :plane-expand-y 81920.0 + ) + ) + +(defbehavior elec-gate-post elec-gate () + (local-vars (sv-96 lightning-control) (sv-112 vector)) + (let ((gp-0 (-> self params))) + (dotimes (s5-0 5) + (let* ((s2-0 (-> self l-bolt s5-0)) + (s4-0 (get-point-at-percent-along-path! (-> self path) (new 'stack-no-clear 'vector) (-> s2-0 pos) 'interp)) + (s3-0 (get-point-at-percent-along-path! (-> self path-r) (new 'stack-no-clear 'vector) (-> s2-0 pos) 'interp)) + ) + (let ((a0-2 (-> s2-0 bolt)) + (v1-4 s4-0) + ) + (set! (-> a0-2 state meet data 0 quad) (-> v1-4 quad)) + ) + (let ((a0-5 (-> s2-0 bolt)) + (v1-6 s3-0) + ) + (set! (-> a0-5 state meet data (+ (-> a0-5 state points-to-draw) -1) quad) (-> v1-6 quad)) + ) + (when (-> gp-0 ring-spec) + (let ((s1-0 (-> gp-0 ring-spec num-points)) + (s0-0 (-> s2-0 ring 0)) + ) + (set! sv-96 (-> s2-0 ring 1)) + (set! sv-112 (new 'stack-no-clear 'vector)) + (set! (-> sv-112 x) 0.0) + (set! (-> sv-112 y) 0.0) + (set! (-> sv-112 z) (-> s2-0 ring-radius)) + (set! (-> sv-112 w) 0.0) + (let ((f30-0 (* 65536.0 (/ 1.0 (the float (+ s1-0 -1)))))) + (dotimes (s2-1 s1-0) + (set-point! s0-0 s2-1 (vector+! (new 'stack-no-clear 'vector) s4-0 sv-112)) + (set-point! sv-96 s2-1 (vector+! (new 'stack-no-clear 'vector) s3-0 sv-112)) + (vector-rotate-y! sv-112 sv-112 f30-0) + ) + ) + ) + ) + ) + ) + ) + (debug-draw (-> self path)) + (debug-draw (-> self path-r)) + (none) + ) + +(defstate idle (elec-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (let ((gp-0 (-> self on-trigger))) + (if gp-0 + (script-eval gp-0 :vector (-> self root trans)) + ) + ) + (go-virtual active) + ) + ) + ) + :enter (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (dotimes (v1-0 5) + (let ((a0-3 (-> self l-bolt v1-0 bolt)) + (a1-1 0) + ) + (let ((a2-2 (!= a1-1 (-> a0-3 state mode)))) + (case a1-1 + ((3) + (if a2-2 + (set! (-> a0-3 state counter) 0.0) + ) + ) + ((1) + (set! (-> a0-3 state start-color) (-> a0-3 spec start-color)) + (set! (-> a0-3 state end-color) (-> a0-3 spec end-color)) + ) + ) + ) + (set! (-> a0-3 state mode) (the-as uint a1-1)) + ) + (when (-> self params ring-spec) + (let ((a0-9 (-> self l-bolt v1-0 ring 0)) + (a1-2 0) + ) + (let ((a2-12 (!= a1-2 (-> a0-9 state mode)))) + (case a1-2 + ((3) + (if a2-12 + (set! (-> a0-9 state counter) 0.0) + ) + ) + ((1) + (set! (-> a0-9 state start-color) (-> a0-9 spec start-color)) + (set! (-> a0-9 state end-color) (-> a0-9 spec end-color)) + ) + ) + ) + (set! (-> a0-9 state mode) (the-as uint a1-2)) + ) + (let ((a0-12 (-> self l-bolt v1-0 ring 1)) + (a1-3 0) + ) + (let ((a2-22 (!= a1-3 (-> a0-12 state mode)))) + (case a1-3 + ((3) + (if a2-22 + (set! (-> a0-12 state counter) 0.0) + ) + ) + ((1) + (set! (-> a0-12 state start-color) (-> a0-12 spec start-color)) + (set! (-> a0-12 state end-color) (-> a0-12 spec end-color)) + ) + ) + ) + (set! (-> a0-12 state mode) (the-as uint a1-3)) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (set-elec-scale! self 0.0) + (if (nonzero? (-> self part-off)) + (spawn-particles self (-> self part-off)) + ) + ) + ) + +(defstate active (elec-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('shutdown) + (go-virtual shutdown-camera) + ) + ) + ) + :enter (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #f) + (if (-> self on-start) + (script-eval (-> self on-start) :vector (-> self root trans)) + ) + (dotimes (v1-7 5) + (set! (-> self l-bolt v1-7 pos) (+ -1.0 (* 0.2 (the float v1-7)))) + (let ((a0-9 (-> self l-bolt v1-7 bolt)) + (a1-3 0) + ) + (let ((a2-3 (!= a1-3 (-> a0-9 state mode)))) + (case a1-3 + ((3) + (if a2-3 + (set! (-> a0-9 state counter) 0.0) + ) + ) + ((1) + (set! (-> a0-9 state start-color) (-> a0-9 spec start-color)) + (set! (-> a0-9 state end-color) (-> a0-9 spec end-color)) + ) + ) + ) + (set! (-> a0-9 state mode) (the-as uint a1-3)) + ) + (when (-> self params ring-spec) + (let ((a0-15 (-> self l-bolt v1-7 ring 0)) + (a1-4 0) + ) + (let ((a2-13 (!= a1-4 (-> a0-15 state mode)))) + (case a1-4 + ((3) + (if a2-13 + (set! (-> a0-15 state counter) 0.0) + ) + ) + ((1) + (set! (-> a0-15 state start-color) (-> a0-15 spec start-color)) + (set! (-> a0-15 state end-color) (-> a0-15 spec end-color)) + ) + ) + ) + (set! (-> a0-15 state mode) (the-as uint a1-4)) + ) + (let ((a0-18 (-> self l-bolt v1-7 ring 1)) + (a1-5 0) + ) + (let ((a2-23 (!= a1-5 (-> a0-18 state mode)))) + (case a1-5 + ((3) + (if a2-23 + (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-5)) + ) + ) + ) + (let ((gp-0 (new 'stack-no-clear 'inline-array 'vector 2))) + (dotimes (v1-10 2) + (set! (-> gp-0 v1-10 quad) (the-as uint128 0)) + ) + (let ((s5-0 (new 'stack-no-clear 'vector))) + 0.0 + (get-point-in-path! (-> self path) (-> gp-0 0) 0.0 'interp) + (get-point-in-path! (-> self path-r) (-> gp-0 1) 0.0 'interp) + (vector-! s5-0 (-> gp-0 1) (-> gp-0 0)) + (vector-normalize! s5-0 (+ (-> self params plane-expand-xz) (res-lump-float (-> self entity) 'width))) + (vector+! (-> gp-0 1) (-> gp-0 1) s5-0) + (vector-negate! s5-0 s5-0) + (vector+! (-> gp-0 0) (-> gp-0 0) s5-0) + (vector-! s5-0 (-> gp-0 1) (-> gp-0 0)) + (vector-normalize! s5-0 -1.0) + (vector-cross! s5-0 s5-0 *y-vector*) + (vector+float*! (-> gp-0 0) (-> gp-0 0) s5-0 (-> self params plane-shift-z)) + (vector+float*! (-> gp-0 1) (-> gp-0 1) s5-0 (-> self params plane-shift-z)) + (vector-normalize-copy! s5-0 *up-vector* -8192.0) + (vector+! (-> gp-0 0) (-> gp-0 0) s5-0) + (vector+! (-> gp-0 1) (-> gp-0 1) s5-0) + ) + (let ((f0-12 + (+ (- (-> (get-point-in-path! (-> self path) (new 'stack-no-clear 'vector) (get-num-segments (-> self path)) 'interp) + y + ) + (-> (get-point-in-path! (-> self path) (new 'stack-no-clear 'vector) 0.0 'interp) y) + ) + (-> self params plane-expand-y) + ) + ) + ) + (blocking-plane-spawn (the-as curve-control #f) gp-0 f0-12) + ) + ) + ) + :trans (behavior () + (local-vars + (sv-176 lightning-spec) + (sv-192 int) + (sv-208 symbol) + (sv-224 symbol) + (sv-240 int) + (sv-256 symbol) + (sv-272 symbol) + ) + (let ((gp-0 *target*)) + (when gp-0 + (when (not (focus-test? gp-0 disable dead ignore grabbed pilot-riding pilot mech teleporting invulnerable)) + (let* ((v1-5 (get-trans gp-0 0)) + (a1-2 (vector-! (new 'stack-no-clear 'vector) v1-5 (the-as vector (-> self dividing-wall)))) + (s5-0 (-> self plane (if (< 0.0 (vector-dot a1-2 (-> self dividing-wall dir))) + 0 + 1 + ) + ) + ) + (s4-1 (vector-! (new 'stack-no-clear 'vector) v1-5 (-> s5-0 pos))) + ) + (when (and (< (vector-dot (vector-normalize-copy! (new 'stack-no-clear 'vector) s4-1 1.0) (-> s5-0 dir)) 0.0) + (let ((v1-10 s4-1)) + (< (sqrtf (+ (* (-> v1-10 x) (-> v1-10 x)) (* (-> v1-10 z) (-> v1-10 z)))) (-> self wall-xz)) + ) + (< (fabs (-> s4-1 y)) (-> self wall-y)) + ) + (send-event + gp-0 + '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) + (vector (-> s5-0 dir)) + (shove-back (meters 6)) + (shove-up (meters 3)) + (control (if (focus-test? gp-0 board) + 1.0 + 0.0 + ) + ) + ) + ) + ) + (let* ((s5-1 (-> self l-bolt)) + (s4-2 (get-point-at-percent-along-path! (-> self path) (new 'stack-no-clear 'vector) (-> s5-1 0 pos) 'interp)) + (s5-2 + (get-point-at-percent-along-path! (-> self path-r) (new 'stack-no-clear 'vector) (-> s5-1 0 pos) 'interp) + ) + ) + (let ((s3-0 (get-process *default-dead-pool* lightning-tracker #x4000 0))) + (when s3-0 + (let ((t9-6 (method-of-type lightning-tracker activate))) + (t9-6 (the-as lightning-tracker s3-0) *entity-pool* "lightning-tracker" (the-as pointer #x70004000)) + ) + (let ((s2-0 run-function-in-process) + (s1-0 s3-0) + (s0-0 lightning-tracker-init) + ) + (set! sv-176 (-> self params bolt-spec)) + (set! sv-192 15) + (set! sv-208 (the-as symbol #f)) + (set! sv-224 (the-as symbol #f)) + (let ((t3-0 (get-trans gp-0 3))) + ((the-as (function object object object object object object object object none) s2-0) + s1-0 + s0-0 + sv-176 + sv-192 + sv-208 + sv-224 + s4-2 + t3-0 + ) + ) + ) + (-> s3-0 ppointer) + ) + ) + (let ((s4-3 (get-process *default-dead-pool* lightning-tracker #x4000 0))) + (when s4-3 + (let ((t9-10 (method-of-type lightning-tracker activate))) + (t9-10 (the-as lightning-tracker s4-3) *entity-pool* "lightning-tracker" (the-as pointer #x70004000)) + ) + (let ((s3-1 run-function-in-process) + (s2-1 s4-3) + (s1-1 lightning-tracker-init) + (s0-1 (-> self params bolt-spec)) + ) + (set! sv-240 15) + (set! sv-256 (the-as symbol #f)) + (set! sv-272 (the-as symbol #f)) + (let ((t3-1 (get-trans gp-0 3))) + ((the-as (function object object object object object object object object none) s3-1) + s2-1 + s1-1 + s0-1 + sv-240 + sv-256 + sv-272 + s5-2 + t3-1 + ) + ) + ) + (-> s4-3 ppointer) + ) + ) + ) + ) + ) + ) + (set! (-> self lightning-quality) (lerp-scale + 0.0 + 1.0 + (vector-vector-distance (get-trans gp-0 0) (-> self root trans)) + (-> self params max-dist) + (-> self params min-dist) + ) + ) + ) + ) + (let ((gp-1 (+ (the int (* 5.0 (-> self lightning-quality))) 1))) + (dotimes (s5-4 5) + (let ((s3-3 (-> self l-bolt s5-4)) + (s2-3 (-> self params)) + (s4-5 (if (and (-> self quality-enabled?) (zero? (mod s5-4 gp-1))) + 0 + -1 + ) + ) + ) + (seek! (-> s3-3 pos) 1.5 (* (-> s2-3 speed-mult) (+ 0.2 (fabs (-> s3-3 pos))) (seconds-per-frame))) + (cond + ((>= (-> s3-3 pos) 1.5) + (set! (-> s3-3 ring-radius) (rand-vu-float-range (-> s2-3 ring-radius-min) (-> s2-3 ring-radius-max))) + (set! (-> s3-3 pos) 0.0) + ) + ((>= (-> s3-3 pos) 1.0) + (let ((v1-56 (-> self l-bolt s5-4 bolt)) + (a0-40 (logand 0 s4-5)) + ) + (let ((a1-21 (!= a0-40 (-> v1-56 state mode)))) + (case a0-40 + ((3) + (if a1-21 + (set! (-> v1-56 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-56 state start-color) (-> v1-56 spec start-color)) + (set! (-> v1-56 state end-color) (-> v1-56 spec end-color)) + ) + ) + ) + (set! (-> v1-56 state mode) (the-as uint a0-40)) + ) + (when (-> self params ring-spec) + (let ((v1-62 (-> self l-bolt s5-4 ring 0)) + (a0-41 (logand 0 s4-5)) + ) + (let ((a1-31 (!= a0-41 (-> v1-62 state mode)))) + (case a0-41 + ((3) + (if a1-31 + (set! (-> v1-62 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-62 state start-color) (-> v1-62 spec start-color)) + (set! (-> v1-62 state end-color) (-> v1-62 spec end-color)) + ) + ) + ) + (set! (-> v1-62 state mode) (the-as uint a0-41)) + ) + (let ((a0-42 (-> self l-bolt s5-4 ring 1)) + (v1-65 (logand 0 s4-5)) + ) + (let ((a1-41 (!= v1-65 (-> a0-42 state mode)))) + (case v1-65 + ((3) + (if a1-41 + (set! (-> a0-42 state counter) 0.0) + ) + ) + ((1) + (set! (-> a0-42 state start-color) (-> a0-42 spec start-color)) + (set! (-> a0-42 state end-color) (-> a0-42 spec end-color)) + ) + ) + ) + (set! (-> a0-42 state mode) (the-as uint v1-65)) + ) + ) + ) + ((< 0.0 (-> s3-3 pos)) + (when (zero? (-> self l-bolt s5-4 bolt state mode)) + (let ((v1-74 (-> self l-bolt s5-4 bolt)) + (a0-43 (logand s4-5 1)) + ) + (let ((a1-51 (!= a0-43 (-> v1-74 state mode)))) + (case a0-43 + ((3) + (if a1-51 + (set! (-> v1-74 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-74 state start-color) (-> v1-74 spec start-color)) + (set! (-> v1-74 state end-color) (-> v1-74 spec end-color)) + ) + ) + ) + (set! (-> v1-74 state mode) (the-as uint a0-43)) + ) + (when (-> self params ring-spec) + (let ((v1-80 (-> self l-bolt s5-4 ring 0)) + (a0-44 (logand s4-5 1)) + ) + (let ((a1-61 (!= a0-44 (-> v1-80 state mode)))) + (case a0-44 + ((3) + (if a1-61 + (set! (-> v1-80 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-80 state start-color) (-> v1-80 spec start-color)) + (set! (-> v1-80 state end-color) (-> v1-80 spec end-color)) + ) + ) + ) + (set! (-> v1-80 state mode) (the-as uint a0-44)) + ) + (let ((a0-45 (-> self l-bolt s5-4 ring 1)) + (v1-83 (logand s4-5 1)) + ) + (let ((a1-71 (!= v1-83 (-> a0-45 state mode)))) + (case v1-83 + ((3) + (if a1-71 + (set! (-> a0-45 state counter) 0.0) + ) + ) + ((1) + (set! (-> a0-45 state start-color) (-> a0-45 spec start-color)) + (set! (-> a0-45 state end-color) (-> a0-45 spec end-color)) + ) + ) + ) + (set! (-> a0-45 state mode) (the-as uint v1-83)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (set-elec-scale! self 1.0) + (if (nonzero? (-> self part)) + (spawn-particles self (-> self part)) + ) + (update! (-> self sound)) + (elec-gate-post) + ) + ) + +(defstate shutdown-camera (elec-gate) + :virtual #t + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (format 0 "~s~%" (-> self name)) + (if (res-lump-struct (-> self entity) 'camera-name structure) + (process-spawn + external-camera-controller + (-> self entity) + 600 + #f + :name "external-camera-controller" + :to *entity-pool* + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 1)) + (suspend) + ) + ) + (go-virtual shutdown) + ) + :post (behavior () + (elec-gate-post) + ) + ) + +(defstate shutdown (elec-gate) + :virtual #t + :enter (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (stop! (-> self sound)) + (sound-play "elec-gate-off") + (blocking-plane-destroy) + (if (-> self on-stop) + (script-eval (-> self on-stop) :vector (-> self root trans)) + ) + ) + :trans (behavior () + (let ((gp-0 #t)) + (dotimes (s5-0 5) + (let ((s4-0 (-> self l-bolt s5-0))) + (seek! (-> s4-0 pos) 0.0 (seconds-per-frame)) + (set! gp-0 (cond + ((or (< 1.0 (-> s4-0 pos)) (>= 0.0 (-> s4-0 pos))) + (when (= (-> self l-bolt s5-0 bolt state mode) 2) + (let ((v1-9 (-> self l-bolt s5-0 bolt)) + (a0-6 3) + ) + (let ((a1-2 (!= a0-6 (-> v1-9 state mode)))) + (case a0-6 + ((3) + (if a1-2 + (set! (-> v1-9 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-9 state start-color) (-> v1-9 spec start-color)) + (set! (-> v1-9 state end-color) (-> v1-9 spec end-color)) + ) + ) + ) + (set! (-> v1-9 state mode) (the-as uint a0-6)) + ) + (when (-> self params ring-spec) + (let ((v1-14 (-> self l-bolt s5-0 ring 0)) + (a0-8 3) + ) + (let ((a1-12 (!= a0-8 (-> v1-14 state mode)))) + (case a0-8 + ((3) + (if a1-12 + (set! (-> v1-14 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-14 state start-color) (-> v1-14 spec start-color)) + (set! (-> v1-14 state end-color) (-> v1-14 spec end-color)) + ) + ) + ) + (set! (-> v1-14 state mode) (the-as uint a0-8)) + ) + (let ((v1-17 (-> self l-bolt s5-0 ring 1)) + (a0-9 3) + ) + (let ((a1-22 (!= a0-9 (-> v1-17 state mode)))) + (case a0-9 + ((3) + (if a1-22 + (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-9)) + ) + ) + ) + gp-0 + ) + (else + #f + ) + ) + ) + ) + ) + (when gp-0 + (let ((gp-1 (-> self on-shutdown))) + (if gp-1 + (script-eval gp-1 :vector (-> self root trans)) + ) + ) + (go-virtual idle) + ) + ) + ) + :code sleep-code + :post (behavior () + (set-elec-scale! self 0.0) + (if (nonzero? (-> self part-off)) + (spawn-particles self (-> self part-off)) + ) + (elec-gate-post) + ) + ) + +(defmethod set-elec-scale! ((this elec-gate) (arg0 float)) + (if (< (vector-vector-distance (-> this root trans) (target-pos 0)) 327680.0) + (elec-gate-method-30 this arg0) + ) + 0 + (none) + ) + +(defmethod elec-gate-method-30 ((this elec-gate) (arg0 float)) + 0 + (none) + ) + +(defmethod spawn-particles ((this elec-gate) (arg0 sparticle-launch-control)) + (if (-> this part-spawner-left) + (spawn arg0 (the-as vector (&-> (-> this part-spawner-left child) 8))) + ) + (if (-> this part-spawner-right) + (spawn arg0 (the-as vector (&-> (-> this part-spawner-right child) 8))) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch process-drawable vs elec-gate. +(defmethod relocate ((this elec-gate) (offset int)) + (dotimes (v1-0 5) + (let ((a2-2 (-> this l-bolt v1-0))) + (if (nonzero? (-> a2-2 bolt)) + (&+! (-> a2-2 bolt) offset) + ) + (if (nonzero? (-> a2-2 ring 0)) + (&+! (-> a2-2 ring 0) offset) + ) + (if (nonzero? (-> a2-2 ring 1)) + (&+! (-> a2-2 ring 1) offset) + ) + ) + ) + (if (nonzero? (-> this path-r)) + (&+! (-> this path-r) offset) + ) + (when (nonzero? (-> this part-off)) + (if (nonzero? (-> this part-off)) + (&+! (-> this part-off) offset) + ) + ) + (the-as elec-gate ((method-of-type process-drawable relocate) this offset)) + ) + +(defmethod deactivate ((this elec-gate)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this root)) + (set-elec-scale! this 0.0) + ) + (if (nonzero? (-> this part-off)) + (kill-particles (-> this part-off)) + ) + (call-parent-method this) + (none) + ) + +(defmethod get-params ((this elec-gate)) + *default-elec-gate-params* + ) + +(defmethod elec-gate-method-25 ((this elec-gate)) + 0 + (none) + ) + +(defmethod elec-gate-method-26 ((this elec-gate)) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs object. +(defmethod go-initial-state ((this elec-gate)) + (if (or (logtest? (actor-option user17) (-> this fact options)) + (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 active)) + ) + 0 + ) + +(defmethod init-from-entity! ((this elec-gate) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (set! (-> this entity) arg0) + (set! (-> this fact) + (new 'process 'fact-info this (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc)) + ) + (set! (-> this params) (get-params this)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this path) (new 'process 'path-control this 'pathl 0.0 (the-as entity #f) #f)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (set! (-> this path-r) (new 'process 'path-control this 'pathr 0.0 (the-as entity #f) #f)) + (logior! (-> this path-r flags) (path-control-flag display draw-line draw-point draw-text)) + (set! (-> this part-spawner-left) (the-as part-spawner (entity-actor-lookup arg0 'alt-actor 0))) + (set! (-> this part-spawner-right) (the-as part-spawner (entity-actor-lookup arg0 'alt-actor 1))) + (let ((s5-1 (-> this params))) + (dotimes (s4-0 5) + (let ((s3-0 (-> this l-bolt s4-0))) + (set! (-> s3-0 bolt) (new 'process 'lightning-control (-> s5-1 bolt-spec) this 0.0)) + (when (-> s5-1 ring-spec) + (set! (-> s3-0 ring 0) (new 'process 'lightning-control (-> s5-1 ring-spec) this 0.0)) + (set! (-> s3-0 ring 1) (new 'process 'lightning-control (-> s5-1 ring-spec) this 0.0)) + ) + (set! (-> s3-0 ring-radius) (rand-vu-float-range (-> s5-1 ring-radius-min) (-> s5-1 ring-radius-max))) + (set! (-> s3-0 pos) (* 0.2 (the float s4-0))) + ) + ) + ) + (let* ((s4-1 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) 0.0 'interp)) + (v1-29 (get-point-in-path! (-> this path-r) (new 'stack-no-clear 'vector) 0.0 'interp)) + (a1-15 (vector-! (new 'stack-no-clear 'vector) v1-29 s4-1)) + (s5-3 (vector+float*! (new 'stack-no-clear 'vector) s4-1 a1-15 0.5)) + (v1-31 (vector-normalize-copy! (new 'stack-no-clear 'vector) a1-15 1.0)) + ) + (vector-cross! v1-31 v1-31 *up-vector*) + (set! (-> this dividing-wall pos quad) (-> s5-3 quad)) + (set! (-> this dividing-wall dir quad) (-> v1-31 quad)) + (vector+float*! (the-as vector (-> this plane)) s5-3 v1-31 12288.0) + (set! (-> this plane 0 dir quad) (-> v1-31 quad)) + (vector-float*! v1-31 v1-31 -1.0) + (vector+float*! (the-as vector (-> this plane 1)) s5-3 v1-31 12288.0) + (set! (-> this plane 1 dir quad) (-> v1-31 quad)) + ) + (set! (-> this wall-xz) + (vector-vector-distance + (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) 0.0 'interp) + (get-point-in-path! (-> this path-r) (new 'stack-no-clear 'vector) 0.0 'interp) + ) + ) + (set! (-> this wall-xz) (* 0.5 (-> this wall-xz))) + (+! (-> this wall-xz) 4096.0) + (set! (-> this wall-y) + (fabs + (- (-> (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) (get-num-segments (-> this path)) 'interp) + y + ) + (-> (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) 0.0 'interp) y) + ) + ) + ) + (+! (-> this wall-y) 4096.0) + (set! (-> this quality-enabled?) #t) + (set! (-> this lightning-quality) 1.0) + (set! (-> this sound) + (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)) + (set! (-> this on-shutdown) (res-lump-struct (-> this entity) 'on-shutdown pair)) + (set! (-> this on-trigger) (res-lump-struct (-> this entity) 'on-trigger pair)) + (elec-gate-method-25 this) + (elec-gate-method-26 this) + (go-initial-state this) + ) + +(deftype sewer-elec-gate (elec-gate) + ((gate-index int32) + ) + ) + + +(defmethod set-elec-scale! ((this sewer-elec-gate) (arg0 float)) + (set-sewh-electricity-scale! arg0 (-> this gate-index)) + (if (zero? (-> this gate-index)) + (set-sewg-electricity-scale! arg0 (-> this gate-index)) + ) + 0 + (none) + ) + +(defmethod init-from-entity! ((this sewer-elec-gate) (arg0 entity-actor)) + (set! (-> this gate-index) (res-lump-value (-> this entity) 'index int :time -1000000000.0)) + (call-parent-method this arg0) + ) 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 754a264790..b06757da8f 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 2f81297354..6938d1831c 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 2f8dfe16f6..732cedf604 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 'bounding-box)) + ) + (set! (-> a1-1 min quad) (-> self entity extra trans quad)) + (set! (-> a1-1 min 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 8d6dd3aa1d..e6c046cece 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 515c9072fb..05d5703fd5 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 890e4dccda..539700132f 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/grunt.gc b/goal_src/jak3/levels/common/enemy/grunt.gc index 5b14a2225e..3880431288 100644 --- a/goal_src/jak3/levels/common/enemy/grunt.gc +++ b/goal_src/jak3/levels/common/enemy/grunt.gc @@ -5,5 +5,1954 @@ ;; name in dgo: grunt ;; dgos: MIC +;; +++grunt-flags +(defenum grunt-flags + :type uint8 + :bitfield #t + (gf0 0) + (gf1 1) + (gf2 2) + ) +;; ---grunt-flags + + ;; DECOMP BEGINS +(defskelgroup skel-grunt grunt grunt-lod0-jg -1 + ((grunt-lod0-mg (meters 20)) (grunt-lod1-mg (meters 40)) (grunt-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :shadow grunt-shadow-mg + :origin-joint-index 18 + ) + +(deftype grunt-anim-info (structure) + ((anim-index int32) + (travel-speed meters) + ) + :pack-me + ) + + +(deftype grunt-global-info (basic) + ((patrol-anim grunt-anim-info 4 :inline) + (charge-anim grunt-anim-info 3 :inline) + (attack-anim grunt-anim-info 2 :inline) + ) + ) + + +(deftype grunt (nav-enemy) + ((patrol-anim grunt-anim-info) + (charge-anim grunt-anim-info) + (attack-anim grunt-anim-info) + (intro-path path-control) + (use-charge-anim-index int8 :offset 640) + (jumping-ambush-path-pt int8) + (grunt-flags grunt-flags) + (state-timeout2 time-frame) + (next-warn-time time-frame) + (dest vector :inline) + (minimap connection-minimap :offset 704) + ) + (:state-methods + attack + falling-ambush + jumping-ambush + jumping-ambush-cont + wait-for-focus + spin-attack + ) + (:methods + (grunt-method-196 (_type_ float) process-focusable) + (get-enemy-info (_type_) nav-enemy-info) + ) + ) + + +(define *grunt-global-info* (new 'static 'grunt-global-info + :patrol-anim (new 'static 'inline-array grunt-anim-info 4 + (new 'static 'grunt-anim-info :anim-index 11 :travel-speed (meters 4)) + (new 'static 'grunt-anim-info :anim-index 12 :travel-speed (meters 7)) + (new 'static 'grunt-anim-info :anim-index 14 :travel-speed (meters 7)) + (new 'static 'grunt-anim-info :anim-index 15 :travel-speed (meters 7)) + ) + :charge-anim (new 'static 'inline-array grunt-anim-info 3 + (new 'static 'grunt-anim-info :anim-index 14 :travel-speed (meters 7)) + (new 'static 'grunt-anim-info :anim-index 15 :travel-speed (meters 7)) + (new 'static 'grunt-anim-info :anim-index 16 :travel-speed (meters 7)) + ) + :attack-anim (new 'static 'inline-array grunt-anim-info 2 + (new 'static 'grunt-anim-info :anim-index 17 :travel-speed (meters 12)) + (new 'static 'grunt-anim-info :anim-index 18 :travel-speed (meters 12)) + ) + ) + ) + +(define *grunt-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 36 + (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 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 #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 30 + :param1 #x69 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 60) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 1 + :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 #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 30 + :param1 #x69 + :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 30 + :param1 #x69 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #xa + :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 push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 1 + :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 #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 30 + :param1 #x69 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #xa + :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 push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 1 + :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 #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 30 + :param1 #x69 + :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 30 + :param1 #x69 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #xa + :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 push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 1 + :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 #x14 + :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 push) :param0 60) + (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 13 + :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 22 + :jump-in-air-anim 23 + :jump-land-anim 24 + :neck-joint 5 + :look-at-joint 6 + :bullseye-joint 18 + :sound-hit (static-sound-name "grunt-hit") + :sound-die (static-sound-name "grunt-die") + :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.5) + :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.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 73728.0 + :knocked-red-vy-hi 114688.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 10625.897) + :scale (new 'static 'vector :x 0.6399 :y 0.6399 :z 0.6399) + :bg-collide-with (collide-spec backgnd crate 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 :w 1170.3455) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 2268.7744 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 4000.9365) + :geo-tform (new 'static 'vector :x 1.0 :w 12817.95) + :axial-slop 2169.078 + :max-angle 2296.8184 + :coll-rad 2867.2 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 10540.374) + :geo-tform (new 'static 'vector :x -1.0 :w 12551.108) + :axial-slop 2169.078 + :max-angle 2226.3489 + :coll-rad 2209.3823 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 13046.233) + :geo-tform (new 'static 'vector :x 1.0 :w 18078.088) + :axial-slop 2169.078 + :max-angle 3210.7178 + :coll-rad 1644.544 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 16901.771) + :geo-tform (new 'static 'vector :x 1.0 :w 359.3193) + :axial-slop 2169.078 + :max-angle 2605.129 + :coll-rad 1722.368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.4178 :z -0.9083 :w 11487.004) + :geo-tform (new 'static 'vector :x -0.5907 :y -0.4565 :z 0.665 :w 25388.248) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1641.6768 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1565 :z -0.9875 :w 12747.589) + :geo-tform (new 'static 'vector :x -0.0123 :y 0.7268 :z 0.6864 :w 28823.824) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1295.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.938 :z 0.3463 :w 15464.585) + :geo-tform (new 'static 'vector :x 0.0404 :y 0.9991 :z 0.0016 :w 26660.428) + :axial-slop 2169.078 + :max-angle 2671.921 + :coll-rad 1899.3152 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.938 :z 0.346 :w 14.381512) + :geo-tform (new 'static 'vector :x 0.5827 :y 0.8005 :z 0.1389 :w 27752.074) + :axial-slop 2169.078 + :max-angle 2077.3455 + :coll-rad 1787.904 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.418 :z 0.9082 :w 11484.565) + :geo-tform (new 'static 'vector :x 0.5908 :y -0.4564 :z 0.665 :w 40148.812) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1563.8528 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1563 :z 0.9875 :w 12751.085) + :geo-tform (new 'static 'vector :x 0.0122 :y 0.7266 :z 0.6866 :w 36713.688) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1127.6288 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.938 :z -0.3461 :w 15469.664) + :geo-tform (new 'static 'vector :x -0.0404 :y 0.9991 :z 0.0015 :w 38877.887) + :axial-slop 2169.078 + :max-angle 2330.5876 + :coll-rad 1610.1376 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9377 :z -0.3468 :w 16.074524) + :geo-tform (new 'static 'vector :x -0.2371 :y 0.2169 :z -0.9468 :w 20556.623) + :axial-slop 2169.078 + :max-angle 1879.882 + :coll-rad 1629.3888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 1.0 :w 42847.234) + :geo-tform (new 'static 'vector :x -1.0 :w 16468.232) + :axial-slop 2169.078 + :max-angle 2508.973 + :coll-rad 1812.0704 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 3567.2522) + :geo-tform (new 'static 'vector :x 1.0 :w 42973.14) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1858.3552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.2349 :z -0.9718 :w 18020.252) + :geo-tform (new 'static 'vector :x 0.3808 :y 0.3151 :z 0.8691 :w 29486.395) + :axial-slop 2169.078 + :max-angle 3698.87 + :coll-rad 877.3632 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9998 :z 0.0086 :w 4412.9214) + :geo-tform (new 'static 'vector :x 0.3995 :y -0.4805 :z 0.7804 :w 25729.781) + :axial-slop 2169.078 + :max-angle 3691.5154 + :coll-rad 1524.9408 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7835 :z 0.621 :w 14960.958) + :geo-tform (new 'static 'vector :x 0.2887 :y 0.6587 :z 0.6945 :w 40555.97) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1127.6288 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7644 :z -0.6445 :w 17272.176) + :geo-tform (new 'static 'vector :x 0.5513 :y 0.3614 :z 0.7516 :w 33063.24) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1127.6288 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9734 :z 0.2283 :w 7149.304) + :geo-tform (new 'static 'vector :x -0.7224 :y -0.6901 :z -0.0373 :w 15253.522) + :axial-slop 2169.078 + :max-angle 1294.1176 + :coll-rad 659.456 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint 22 + :pre-tform (new 'static 'vector :x 0.4934 :z 0.8696 :w 6514.1875) + :geo-tform (new 'static 'vector :x -0.0332 :y 0.8825 :z 0.4687 :w 37613.457) + :axial-slop 2169.078 + :max-angle 1411.5544 + :coll-rad 605.3888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint 18 + :pre-tform (new 'static 'vector :x -1.0 :w 9863.842) + :geo-tform (new 'static 'vector :x -1.0 :w 12698.965) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1488.0768 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 1462.5452) + :geo-tform (new 'static 'vector :x 0.9995 :y -0.0161 :z -0.0185 :w 7921.737) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1285.7344 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9958 :z -0.09 :w 1956.7229) + :geo-tform (new 'static 'vector :x 0.9998 :y 0.0041 :z 0.0071 :w 33050.805) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1801.8304 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :z 0.0159 :w 6114.891) + :geo-tform (new 'static 'vector :x 0.9998 :y -0.0127 :z 0.0043 :w 8018.73) + :axial-slop 2169.078 + :max-angle 2497.213 + :coll-rad 794.2144 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :z 0.0159 :w 6305.8555) + :geo-tform (new 'static 'vector :x 0.9998 :y -0.0172 :z 0.0018 :w 6908.7324) + :axial-slop 2169.078 + :max-angle 1846.1127 + :coll-rad 556.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :z 0.0159 :w 6830.7266) + :geo-tform (new 'static 'vector :x 0.9993 :y -0.0365 :z -0.006 :w 3790.2383) + :axial-slop 2169.078 + :max-angle 1491.563 + :coll-rad 542.3104 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint 18 + :pre-tform (new 'static 'vector :x -0.2352 :z 0.9718 :w 18022.729) + :geo-tform (new 'static 'vector :x -0.3537 :y 0.3542 :z 0.8654 :w 34566.508) + :axial-slop 2169.078 + :max-angle 3739.2292 + :coll-rad 1540.096 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8967 :z -0.4423 :w 5274.7744) + :geo-tform (new 'static 'vector :x -0.0105 :y 0.862 :z -0.5065 :w 24694.367) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1127.6288 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8194 :z -0.573 :w 13110.112) + :geo-tform (new 'static 'vector :x -0.2576 :y 0.7211 :z 0.6428 :w 24504.475) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1751.4496 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8027 :z 0.596 :w 15135.011) + :geo-tform (new 'static 'vector :x -0.5895 :y 0.2007 :z 0.7821 :w 36329.734) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1127.6288 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8262 :z 0.5632 :w 7707.525) + :geo-tform (new 'static 'vector :x -0.6943 :y 0.7184 :z -0.0381 :w 14762.858) + :axial-slop 2169.078 + :max-angle 2015.6871 + :coll-rad 573.0304 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 36 + :parent-joint 34 + :pre-tform (new 'static 'vector :x 0.9975 :z -0.0684 :w 3277.692) + :geo-tform (new 'static 'vector :x -0.2795 :y 0.7979 :z 0.5336 :w 35258.77) + :axial-slop 2169.078 + :max-angle 1851.9927 + :coll-rad 468.992 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 37 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.5769 :z -0.8166 :w 8297.695) + :geo-tform (new 'static 'vector :x -0.6954 :y -0.0651 :z 0.7153 :w 9511.8955) + :axial-slop 2169.078 + :max-angle 2863.5044 + :coll-rad 1868.5952 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 38 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.5774 :z 0.8162 :w 8293.489) + :geo-tform (new 'static 'vector :x 0.948 :y -0.2986 :z 0.1083 :w 34953.68) + :axial-slop 2169.078 + :max-angle 2569.885 + :coll-rad 1893.9904 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 39 + :parent-joint 12 + :pre-tform (new 'static 'vector :x 0.3449 :z -0.9384 :w 16372.404) + :geo-tform (new 'static 'vector :x 0.088 :y -0.8342 :z 0.5442 :w 20057.604) + :axial-slop 2169.078 + :max-angle 3185.0312 + :coll-rad 1327.9232 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 40 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6081 :z 0.7936 :w 10429.526) + :geo-tform (new 'static 'vector :x 0.213 :y -0.975 :z -0.061 :w 19499.654) + :axial-slop 2169.078 + :max-angle 2031.8344 + :coll-rad 423.1168 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 41 + :parent-joint 12 + :pre-tform (new 'static 'vector :x 0.9512 :z -0.3084 :w 2006.2573) + :geo-tform (new 'static 'vector :x -0.0464 :y 0.9956 :z 0.0799 :w 26746.152) + :axial-slop 2169.078 + :max-angle 2505.2957 + :coll-rad 533.7088 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 42 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7105 :z 0.7034 :w 3017.6597) + :geo-tform (new 'static 'vector :x 0.0381 :y 0.9847 :z -0.1692 :w 26846.422) + :axial-slop 2169.078 + :max-angle 2064.8572 + :coll-rad 408.3712 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 43 + :parent-joint 10 + :pre-tform (new 'static 'vector :x 0.9371 :z 0.3486 :w 15668.893) + :geo-tform (new 'static 'vector :x -0.2897 :y 0.1004 :z 0.9516 :w 31568.328) + :axial-slop 2169.078 + :max-angle 2784.2424 + :coll-rad 1593.7535 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 44 + :parent-joint 16 + :pre-tform (new 'static 'vector :x 0.3452 :z 0.9383 :w 16373.424) + :geo-tform (new 'static 'vector :x 0.1347 :y 0.823 :z -0.5515 :w 19233.342) + :axial-slop 2169.078 + :max-angle 2773.2288 + :coll-rad 1373.3888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 45 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.4593 :z -0.888 :w 10428.289) + :geo-tform (new 'static 'vector :x 0.1971 :y 0.977 :z 0.079 :w 17810.5) + :axial-slop 2169.078 + :max-angle 1984.8488 + :coll-rad 616.448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 46 + :parent-joint 16 + :pre-tform (new 'static 'vector :x 0.9998 :z -0.0063 :w 3668.4868) + :geo-tform (new 'static 'vector :x 0.0529 :y 0.9969 :z 0.056 :w 38759.062) + :axial-slop 2169.078 + :max-angle 1981.1897 + :coll-rad 1127.6288 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 47 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7207 :z -0.6929 :w 3011.8708) + :geo-tform (new 'static 'vector :x -0.0298 :y 0.9808 :z -0.1918 :w 38536.098) + :axial-slop 2169.078 + :max-angle 2276.2654 + :coll-rad 534.528 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 48 + :parent-joint 14 + :pre-tform (new 'static 'vector :x 0.9375 :z -0.3477 :w 15673.973) + :geo-tform (new 'static 'vector :x 0.2894 :y 0.1005 :z 0.9517 :w 33957.168) + :axial-slop 2169.078 + :max-angle 2685.1372 + :coll-rad 1853.0304 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 49 + :parent-joint 22 + :pre-tform (new 'static 'vector :x -0.9829 :z 0.1831 :w 2492.6619) + :geo-tform (new 'static 'vector :x 0.5546 :y 0.2592 :z 0.7904 :w 34067.453) + :axial-slop 2169.078 + :max-angle 1536.3458 + :coll-rad 525.9264 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 50 + :parent-joint 34 + :pre-tform (new 'static 'vector :x -0.275 :z 0.9613 :w 5964.5225) + :geo-tform (new 'static 'vector :x -0.5191 :y 0.2888 :z 0.8042 :w 30864.797) + :axial-slop 2169.078 + :max-angle 1445.3237 + :coll-rad 382.5664 + ) + ) + ) + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint 6 + :gem-seg #x2 + :gem-no-seg #x4 + :gem-offset (new 'static 'sphere :y 614.4 :z -3276.8 :r 327680.0) + :knocked-off #t + :callback-info #f + :use-momentum #t + :use-frustration #t + :use-stop-chase #t + :use-circling #t + :use-pacing #t + :walk-anim 11 + :turn-anim -1 + :run-anim 14 + :taunt-anim 19 + :run-travel-speed (meters 7) + :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! (-> *grunt-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defmethod event-handler ((this grunt) (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) + (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-31 (-> this next-state name))) + (or (= v1-31 'knocked) (= v1-31 'jump) (= v1-31 '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) + ) + ) + ) + +(defmethod go-ambush-delay ((this grunt)) + (cond + ((logtest? (-> this fact enemy-options) (enemy-option user10)) + (go (method-of-object this falling-ambush)) + ) + ((logtest? (-> this fact enemy-options) (enemy-option user11)) + (go (method-of-object this jumping-ambush)) + ) + (else + (format 0 "ERROR: ~A doesn't specify which ambush behavior to use.~%" (-> this name)) + (go-hostile this) + ) + ) + ) + +(defstate falling-ambush (grunt) + :virtual #t + :event enemy-event-handler + :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* ((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) + ) + ) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (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) + ) + (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 + ) + :exit (behavior () + (let ((v1-1 (-> self root root-prim))) + (set! (-> v1-1 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-1 prim-core collide-with) (-> self root backup-collide-with)) + ) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.2)) + (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 "grunt-notice") + (ja-channel-push! 1 0) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info notice-anim)) + :num! (seek! max 1.8) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.8)) + ) + (until (logtest? (-> self root status) (collide-status on-ground touch-surface touch-wall)) + (suspend) + ) + (go-virtual hostile) + ) + :post nav-enemy-falling-post + ) + +(defmethod go-directed2 ((this grunt)) + (case (-> this jump-why) + ((2) + (go (method-of-object this jumping-ambush-cont)) + ) + (else + ((method-of-type nav-enemy go-directed2) this) + ) + ) + ) + +(defstate jumping-ambush (grunt) + :virtual #t + :event enemy-event-handler + :enter (behavior () + ((-> (method-of-type nav-enemy ambush) enter)) + (when (zero? (-> self intro-path)) + (format 0 "ERROR: ~A has no intro path, skipping jumping-ambush~%" (-> self name)) + (go-virtual notice) + ) + (get-point-in-path! (-> self intro-path) (-> self root trans) 0.0 'interp) + ) + :code (behavior () + (set! (-> self jumping-ambush-path-pt) 1) + (until #f + (let ((gp-0 (new 'stack-no-clear 'vector))) + (get-point-in-path! (-> self intro-path) gp-0 1.0 'interp) + (set! (-> self enemy-flags) + (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked))) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (let ((v1-5 (process->ppointer self))) + (set! (-> a1-1 from) v1-5) + ) + (set! (-> a1-1 num-params) 2) + (set! (-> a1-1 message) 'jump) + (set! (-> a1-1 param 0) (the-as uint 2)) + (set! (-> a1-1 param 1) (the-as uint gp-0)) + (send-event-function self a1-1) + ) + ) + (suspend) + ) + #f + ) + ) + +(defstate jumping-ambush-cont (grunt) + :virtual #t + :event enemy-event-handler + :code (behavior () + (let ((a0-0 (-> self intro-path)) + (v1-1 (+ (-> self jumping-ambush-path-pt) 1)) + ) + (if (< v1-1 (-> a0-0 curve num-cverts)) + (set! (-> self jumping-ambush-path-pt) v1-1) + (go-best-state self) + ) + ) + (until #f + (let ((gp-0 (new 'stack-no-clear 'vector))) + (get-point-in-path! (-> self intro-path) gp-0 (the float (-> self jumping-ambush-path-pt)) 'interp) + (set! (-> self enemy-flags) + (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked))) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (let ((v1-9 (process->ppointer self))) + (set! (-> a1-1 from) v1-9) + ) + (set! (-> a1-1 num-params) 2) + (set! (-> a1-1 message) 'jump) + (set! (-> a1-1 param 0) (the-as uint 2)) + (set! (-> a1-1 param 1) (the-as uint gp-0)) + (send-event-function self a1-1) + ) + ) + (suspend) + ) + #f + ) + ) + +(defstate active (grunt) + :virtual #t + :code (behavior () + (let ((v1-2 (ja-group))) + (when (or (and v1-2 (or (= v1-2 grunt-charge0-ja) (= v1-2 grunt-charge1-ja) (= v1-2 grunt-charge2-ja))) + (let ((v1-8 (ja-group))) + (and v1-8 + (or (= v1-8 grunt-patrol0-ja) (= v1-8 grunt-patrol1-ja) (= v1-8 grunt-charge0-ja) (= v1-8 grunt-charge1-ja)) + ) + ) + ) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (until #f + (set! (-> self patrol-anim) (-> *grunt-global-info* patrol-anim (rnd-int self 4))) + (let ((v1-28 (-> self nav))) + (set! (-> v1-28 target-speed) (-> self patrol-anim travel-speed)) + ) + 0 + (let ((gp-0 (-> self draw art-group data (-> self patrol-anim anim-index))) + (s5-0 (set-reaction-time! self 1 (seconds 0.027))) + ) + (let ((v1-37 (ja-group))) + (if (not (and v1-37 (= v1-37 gp-0))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (dotimes (s4-0 s5-0) + (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)) + ) + ) + ) + (when (nonzero? (-> self patrol-anim anim-index)) + (ja-no-eval :num! (loop!)) + (ja-channel-push! 1 (seconds 0.2)) + (set! (-> self patrol-anim) (the-as grunt-anim-info (-> *grunt-global-info* patrol-anim))) + (let ((v1-67 (-> self nav))) + (set! (-> v1-67 target-speed) (-> self patrol-anim travel-speed)) + ) + 0 + (let ((gp-1 (-> self draw art-group data (-> self patrol-anim anim-index))) + (s5-1 (set-reaction-time! self (seconds 0.007) (seconds 0.017))) + ) + (ja-no-eval :group! gp-1 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (ja-blend-eval) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (dotimes (s4-1 s5-1) + (ja-no-eval :group! gp-1 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + ) + (when (zero? (rnd-int self 3)) + (let ((v1-107 self)) + (set! (-> v1-107 enemy-flags) (the-as enemy-flag (logclear (-> v1-107 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-107 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (ja-channel-push! 1 (seconds 0.3)) + (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)) + ) + (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-171 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-171 enemy-flags))) + (set! (-> v1-171 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-171 enemy-flags)))) + ) + (set! (-> v1-171 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-171 enemy-flags)))) + (set! (-> v1-171 nav callback-info) (-> v1-171 enemy-info callback-info)) + ) + 0 + ) + ) + ) + #f + ) + ) + +(defmethod grunt-method-196 ((this grunt) (arg0 float)) + (local-vars (v1-5 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (get-focus! this))) + (when gp-0 + (let ((v1-3 (get-trans gp-0 0)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (vector-! s4-0 v1-3 (-> this root trans)) + (.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-5 vf1) + (let* ((f30-0 v1-5) + (f0-0 arg0) + (f28-0 (* f0-0 f0-0)) + (f0-2 12288.0) + ) + (when (or (>= (* f0-2 f0-2) f30-0) (>= f28-0 f30-0)) + (let ((f26-0 (quaternion-y-angle (-> this root quat))) + (f0-7 (atan (-> s4-0 x) (-> s4-0 z))) + (f1-0 1228.8) + ) + (cond + ((and (< (* f1-0 f1-0) f30-0) (>= f28-0 f30-0) (>= 8192.0 (fabs (deg- f26-0 f0-7)))) + (go (method-of-object this attack)) + ) + ((let ((f0-10 12288.0)) + (< f30-0 (* f0-10 f0-10)) + ) + (go (method-of-object this spin-attack)) + ) + ) + ) + ) + ) + ) + ) + gp-0 + ) + ) + ) + +(defstate hostile (grunt) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (let ((a0-1 (grunt-method-196 self 13312.0)) + (gp-0 (current-time)) + ) + (when (and (>= gp-0 (-> self next-warn-time)) + (not (logtest? (-> self draw status) (draw-control-status on-screen))) + ) + (when (and a0-1 (let ((f0-0 65536.0)) + (>= (* f0-0 f0-0) (vector-vector-xz-distance-squared (get-trans a0-1 0) (-> self root trans))) + ) + ) + (sound-play "grunt-warn") + (set! (-> self next-warn-time) (+ gp-0 (set-reaction-time! self (seconds 1) (seconds 1.2)))) + ) + ) + ) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (when (and v1-2 (or (= v1-2 grunt-charge0-ja) (= v1-2 grunt-charge1-ja) (= v1-2 grunt-charge2-ja))) + (let ((v1-6 (-> self nav))) + (set! (-> v1-6 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (let ((v1-19 (-> self use-charge-anim-index))) + (cond + ((>= v1-19 0) + (set! (-> self charge-anim) (-> *grunt-global-info* charge-anim v1-19)) + (set! (-> self use-charge-anim-index) -1) + ) + (else + (set! (-> self charge-anim) (-> *grunt-global-info* charge-anim (rnd-int self 3))) + ) + ) + ) + (until #f + (grunt-method-196 self 22528.0) + (let ((gp-0 (-> self draw art-group data (-> self charge-anim anim-index)))) + (let ((v1-37 (ja-group))) + (when (not (and v1-37 (= v1-37 gp-0))) + (ja-channel-push! 1 (seconds 0.1)) + (let ((v1-41 (-> self nav))) + (set! (-> v1-41 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + ) + ) + (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)) + ) + ) + ) + #f + ) + :post nav-enemy-chase-post + ) + +(defstate attack (grunt) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((v1-1 (-> self nav state))) + (set! (-> v1-1 speed) (-> self enemy-info run-travel-speed)) + ) + 0 + (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-10 *game-info*) + (v0-1 (+ (-> v1-10 attack-id) 1)) + ) + (set! (-> v1-10 attack-id) v0-1) + (set! (-> self attack-id) v0-1) + ) + ) + :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)) + ) + ) + :trans (behavior () + (reset-penetrate! self) + (when (logtest? (-> self enemy-flags) (enemy-flag victory)) + (logclear! (-> self enemy-flags) (enemy-flag victory)) + (sound-play "grunt-hit") + ) + ) + :code (behavior () + (set! (-> self attack-anim) (-> *grunt-global-info* attack-anim (rnd-int self 2))) + (let ((v1-5 (-> self nav))) + (set! (-> v1-5 target-speed) (-> self attack-anim travel-speed)) + ) + 0 + (let ((v1-7 (-> self nav))) + (set! (-> v1-7 turning-acceleration) 49152.0) + ) + 0 + (let ((gp-0 (-> self draw art-group data (-> self attack-anim anim-index))) + (f30-0 (rnd-float-range self 0.9 1.1)) + ) + (let ((v1-17 (ja-group))) + (if (not (and v1-17 (= v1-17 gp-0))) + (ja-channel-push! 1 (seconds 0.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)) + ) + ) + (let ((v1-36 (-> self nav))) + (set! (-> v1-36 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + (let ((v1-38 (-> self nav))) + (set! (-> v1-38 turning-acceleration) (-> self enemy-info run-turning-acceleration)) + ) + 0 + (let ((gp-1 (-> self draw art-group data (-> self charge-anim anim-index)))) + (ja-channel-push! 1 (seconds 0.1)) + (set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim gp-1)) + ) + (ja :num-func num-func-identity :frame-num (ja-aframe 3.0 0)) + (let ((gp-3 (-> self focus aware))) + (if (or (not (get-focus! self)) (!= gp-3 3)) + (go-stare self) + ) + ) + (let ((v1-57 0)) + (let ((a0-22 (the-as object (-> *grunt-global-info* charge-anim))) + (a1-7 (-> self charge-anim)) + ) + (dotimes (a2-3 3) + (when (= a0-22 a1-7) + (set! v1-57 a2-3) + (goto cfg-21) + ) + (set! a0-22 (-> (the-as grunt-global-info a0-22) patrol-anim 1)) + ) + ) + (label cfg-21) + (set! (-> self use-charge-anim-index) v1-57) + ) + (go-virtual hostile) + ) + :post nav-enemy-chase-post + ) + +(defstate spin-attack (grunt) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (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 + (let ((gp-0 (handle->process (-> self focus handle)))) + (if (not gp-0) + (go-stare self) + ) + (set! (-> self focus-pos quad) (-> (get-trans (the-as process-focusable gp-0) 0) quad)) + ) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-21 *game-info*) + (v0-3 (+ (-> v1-21 attack-id) 1)) + ) + (set! (-> v1-21 attack-id) v0-3) + (set! (-> self attack-id) v0-3) + ) + ) + :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)) + ) + ) + :trans (behavior () + (when (logtest? (-> self enemy-flags) (enemy-flag victory)) + (logclear! (-> self enemy-flags) (enemy-flag victory)) + (sound-play "grunt-hit") + ) + ) + :code (behavior () + (set! (-> self attack-anim) (-> *grunt-global-info* attack-anim (rnd-int self 2))) + (let ((gp-0 (-> self draw art-group data (-> self attack-anim anim-index))) + (f30-0 (rnd-float-range self 0.9 1.1)) + ) + (let ((v1-13 (ja-group))) + (if (not (and v1-13 (= v1-13 gp-0))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (ja-no-eval :group! gp-0 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (let ((a0-9 (handle->process (-> self focus handle)))) + (if a0-9 + (set! (-> self focus-pos quad) (-> (get-trans (the-as process-focusable a0-9) 0) quad)) + ) + ) + (seek-to-point-toward-point! (-> self root) (-> self focus-pos) 546133.3 (seconds 0.1)) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (let ((gp-3 (-> self focus aware))) + (if (or (not (get-focus! self)) (!= gp-3 3)) + (go-stare self) + ) + ) + (go-virtual hostile) + ) + :post nav-enemy-simple-post + ) + +(defstate circling (grunt) + :virtual #t + :code (behavior () + (let ((v1-2 (ja-group))) + (when (and v1-2 (or (= v1-2 grunt-charge0-ja) (= v1-2 grunt-charge1-ja) (= v1-2 grunt-charge2-ja))) + (let ((v1-6 (-> self nav))) + (set! (-> v1-6 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (until #f + (set! (-> self charge-anim) (-> *grunt-global-info* charge-anim (rnd-int self 3))) + (let ((v1-22 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-22 enemy-flags))) + (set! (-> v1-22 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-22 enemy-flags)))) + ) + (set! (-> v1-22 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-22 enemy-flags)))) + (set! (-> v1-22 nav callback-info) (-> v1-22 enemy-info callback-info)) + ) + 0 + (let ((v1-25 self)) + (set! (-> v1-25 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-25 enemy-flags)))) + ) + 0 + (let ((v1-27 (-> self nav))) + (set! (-> v1-27 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + (let ((v1-29 (-> self nav))) + (set! (-> v1-29 acceleration) (-> self enemy-info run-acceleration)) + ) + 0 + (let ((v1-31 (-> self nav))) + (set! (-> v1-31 turning-acceleration) (-> self enemy-info run-turning-acceleration)) + ) + 0 + (let ((gp-0 (-> self draw art-group data (-> self charge-anim anim-index)))) + (let ((v1-39 (ja-group))) + (if (not (and v1-39 (= v1-39 gp-0))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (let ((s5-0 (rnd-int self 8)) + (f30-0 (rnd-float-range self 0.9 1.1)) + ) + (while (nonzero? s5-0) + (+! s5-0 -1) + (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)) + ) + ) + ) + ) + (when (< 20480.0 (vector-vector-xz-distance (-> self focus-pos) (-> self root trans))) + (let ((v1-66 self)) + (set! (-> v1-66 enemy-flags) (the-as enemy-flag (logclear (-> v1-66 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-66 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (let ((v1-71 self)) + (set! (-> v1-71 enemy-flags) (the-as enemy-flag (logclear (-> v1-71 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (vector-reset! (-> self root transv)) + (let ((v1-77 (ja-group))) + (if (not (and v1-77 (= v1-77 grunt-celebrate-start-ja))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (let ((f30-2 (rnd-float-range self 0.9 1.1))) + (ja-no-eval :group! grunt-celebrate-start-ja :num! (seek! max f30-2) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-2)) + ) + (ja-no-eval :group! grunt-celebrate-finish-ja :num! (seek! max f30-2) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-2)) + ) + ) + ) + ) + #f + ) + ) + +(defstate pacing (grunt) + :virtual #t + :code (behavior () + (let ((v1-2 (ja-group))) + (when (and v1-2 (or (= v1-2 grunt-charge0-ja) (= v1-2 grunt-charge1-ja) (= v1-2 grunt-charge2-ja))) + (let ((v1-6 (-> self nav))) + (set! (-> v1-6 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (set! (-> self patrol-anim) (-> *grunt-global-info* patrol-anim (rnd-int self 4))) + (let ((f30-0 (rnd-float-range self 0.9 1.1)) + (gp-0 (-> self draw art-group data (-> self patrol-anim anim-index))) + ) + (let ((v1-28 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-28 enemy-flags))) + (set! (-> v1-28 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-28 enemy-flags)))) + ) + (set! (-> v1-28 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-28 enemy-flags)))) + (set! (-> v1-28 nav callback-info) (-> v1-28 enemy-info callback-info)) + ) + 0 + (let ((v1-31 self)) + (set! (-> v1-31 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-31 enemy-flags)))) + ) + 0 + (let ((v1-33 (-> self nav))) + (set! (-> v1-33 target-speed) (-> self patrol-anim travel-speed)) + ) + 0 + (let ((v1-35 (-> self nav))) + (set! (-> v1-35 acceleration) (-> self enemy-info walk-acceleration)) + ) + 0 + (let ((v1-37 (-> self nav))) + (set! (-> v1-37 turning-acceleration) (-> self enemy-info walk-turning-acceleration)) + ) + 0 + (let ((v1-41 (ja-group))) + (if (not (and v1-41 (= v1-41 gp-0))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (until #f + (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)) + ) + ) + ) + #f + ) + ) + +(defstate stop-chase (grunt) + :virtual #t + :code (behavior () + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (set! (-> self patrol-anim) (-> *grunt-global-info* patrol-anim (rnd-int self 4))) + (let ((v1-14 (-> self nav))) + (set! (-> v1-14 target-speed) (-> self patrol-anim travel-speed)) + ) + 0 + (let ((f30-0 (rnd-float-range self 0.9 1.1)) + (gp-0 (-> self draw art-group data (-> self patrol-anim anim-index))) + ) + (let ((v1-24 (ja-group))) + (if (not (and v1-24 (= v1-24 gp-0))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (until #f + (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)) + ) + ) + ) + #f + ) + ) + +(defstate wait-for-focus (grunt) + :virtual #t + :event enemy-event-handler + :enter (-> (method-of-type nav-enemy idle) enter) + :trans (behavior () + (let ((s5-0 (handle->process (-> self focus handle)))) + (when s5-0 + (let ((gp-0 (get-trans (the-as process-focusable s5-0) 0))) + (when (and (or (not (logtest? (-> self enemy-flags) (enemy-flag use-notice-distance))) + (>= 163840.0 (vector-vector-distance (-> self root trans) gp-0)) + ) + (or (not (logtest? (-> self fact enemy-options) (enemy-option user8))) + (and (not (focus-test? (the-as process-focusable s5-0) in-air)) + (>= 4096.0 (fabs (- (-> gp-0 y) (-> self root trans y)))) + ) + ) + ) + (cond + ((and (logtest? (-> self fact enemy-options) (enemy-option user9)) + (logtest? (-> self enemy-flags) (enemy-flag use-notice-distance)) + ) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (vector-! s5-1 gp-0 (-> self root trans)) + (let ((f0-2 32768.0) + (v1-26 s5-1) + ) + (if (or (>= f0-2 (sqrtf (+ (* (-> v1-26 x) (-> v1-26 x)) (* (-> v1-26 z) (-> v1-26 z))))) + (>= 20024.889 (fabs (deg- (y-angle (-> self root)) (atan (-> s5-1 x) (-> s5-1 z))))) + ) + (go-virtual notice) + ) + ) + ) + ) + (else + (go-virtual notice) + ) + ) + ) + ) + ) + ) + ) + :code (-> (method-of-type nav-enemy idle) code) + :post (-> (method-of-type nav-enemy idle) post) + ) + +(defstate knocked-recover (grunt) + :virtual #t + :code (behavior () + (local-vars (v1-49 object)) + (ja-channel-push! 1 0) + (let ((gp-0 (-> (the-as ragdoll-proc (handle->process (-> self ragdoll-proc))) ragdoll))) + (when gp-0 + (let ((a0-5 (-> gp-0 ragdoll-joints))) + (if (< 0.0 (vector-dot (-> self node-list data (-> a0-5 0 joint-index) bone transform fvec) *y-vector*)) + (ja-no-eval :group! grunt-getup-front-ja :num! (seek!) :frame-num 0.0) + (ja-no-eval :group! grunt-getup-back-ja :num! (seek!) :frame-num 0.0) + ) + ) + (enable-ragdoll! gp-0 self) + ) + ) + (until v1-49 + (suspend) + (ja :num! (seek!)) + (set! v1-49 (and (ja-done? 0) (let ((a0-15 (handle->process (-> self ragdoll-proc)))) + (or (not a0-15) (ragdoll-proc-method-19 (the-as ragdoll-proc a0-15))) + ) + ) + ) + ) + (if (enemy-method-109 self) + (go-die self) + (go-hostile self) + ) + ) + ) + +(defmethod ragdoll-settled? ((this grunt)) + (let ((t9-0 (method-of-type nav-enemy ragdoll-settled?))) + (and (t9-0 this) (or (= (-> this root gspot-pos y) -40959590.0) + (< (- (-> this root trans y) (-> this root gspot-pos y)) 4096.0) + ) + ) + ) + ) + +(defmethod on-dying ((this grunt)) + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + (call-parent-method this) + (none) + ) + +;; WARN: Return type mismatch nav-enemy vs grunt. +(defmethod relocate ((this grunt) (offset int)) + (if (nonzero? (-> this intro-path)) + (&+! (-> this intro-path) offset) + ) + (the-as grunt ((method-of-type nav-enemy relocate) this offset)) + ) + +(defmethod init-enemy-collision! ((this grunt)) + (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-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-with) (collide-spec backgnd crate obstacle hit-by-others-list)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set-vector! (-> v1-15 local-sphere) 0.0 9830.4 0.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 collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-17 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-17 transform-index) 4) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 4915.2) + ) + (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 semi-solid deadly)) + (set! (-> v1-19 transform-index) 18) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 2252.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 jak bot player-list)) + (set! (-> v1-21 prim-core action) (collide-action deadly)) + (set! (-> v1-21 transform-index) 16) + (set-vector! (-> v1-21 local-sphere) 0.0 0.0 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 collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-23 prim-core action) (collide-action deadly)) + (set! (-> v1-23 transform-index) 12) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 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 collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-25 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-25 transform-index) 6) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (let ((v1-27 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-27 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-27 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 grunt)) + *grunt-nav-enemy-info* + ) + +(defmethod coin-flip? ((this grunt)) + #f + ) + +(defmethod init-enemy! ((this grunt)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-grunt" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this (get-enemy-info this)) + (let ((v1-6 (-> this neck))) + (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-vector! (-> v1-6 twist-max) 11832.889 11832.889 0.0 1.0) + (set! (-> v1-6 ignore-angle) 30947.555) + ) + (let ((v1-8 (-> this nav))) + (set! (-> v1-8 speed-scale) 1.0) + ) + 0 + (set-gravity-length (-> this root dynam) 573440.0) + (let ((s5-2 *grunt-global-info*)) + (set! (-> this patrol-anim) (-> s5-2 patrol-anim (rnd-int this 4))) + (set! (-> this charge-anim) (-> s5-2 charge-anim (rnd-int this 3))) + (set! (-> this attack-anim) (-> s5-2 attack-anim (rnd-int this 2))) + ) + (set! (-> this use-charge-anim-index) -1) + (if (zero? (rnd-int this 2)) + (logior! (-> this grunt-flags) (grunt-flags gf0)) + ) + (if (zero? (rnd-int this 2)) + (logior! (-> this grunt-flags) (grunt-flags gf2)) + ) + (set! (-> this intro-path) (new 'process 'path-control this 'intro 0.0 (the-as entity #f) #t)) + (add-connection + *part-engine* + this + 6 + this + 468 + (new 'static 'vector :x 1433.6 :y 2785.28 :z -1761.28 :w 163840.0) + ) + (add-connection + *part-engine* + this + 6 + this + 468 + (new 'static 'vector :x -1433.6 :y 2785.28 :z -1761.28 :w 163840.0) + ) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 108) (the-as int #f) (the-as vector #t) 0)) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs object. +(defmethod go-idle2 ((this grunt)) + (if (logtest? (-> this fact enemy-options) (enemy-option user9)) + (go (method-of-object this wait-for-focus)) + (go (method-of-object this idle)) + ) + 0 + ) 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 9aa3a5f037..6516b7cfce 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 19b35ad426..b738e48d32 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 28b22e5e94..0c2bebbb24 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 af9007eda0..503088e456 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 7188b89b6a..9c31c41f38 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_) + (nav-network-method-9 (_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 3e521c78ed..ccd3a6995c 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 nav-network-method-9 ((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 + (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) + ) + +(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 f7605c3e0c..d842dc0573 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/kg-grunt.gc b/goal_src/jak3/levels/common/enemy/kg-grunt.gc index 4b9aea188d..41e0146b17 100644 --- a/goal_src/jak3/levels/common/enemy/kg-grunt.gc +++ b/goal_src/jak3/levels/common/enemy/kg-grunt.gc @@ -7,3 +7,1925 @@ ;; DECOMP BEGINS +(defskelgroup skel-kg-grunt kg-grunt kg-grunt-lod0-jg -1 + ((kg-grunt-lod1-mg (meters 20)) (kg-grunt-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :shadow kg-grunt-shadow-mg + :origin-joint-index 18 + ) + +(defskelgroup skel-kg-grunt-lowres kg-grunt kg-grunt-lod0-jg -1 + ((kg-grunt-lod1-mg (meters 20)) (kg-grunt-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :shadow kg-grunt-shadow-mg + :origin-joint-index 18 + ) + +(define *kg-grunt-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-c") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-kg-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 12 :group "skel-kg-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 13 :group "skel-kg-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 14 :group "skel-kg-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 19 :group "skel-kg-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 20 :group "skel-kg-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 30 :group "skel-kg-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 31 :group "skel-kg-debris-d") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + ) + ) + +(define *kg-grunt-debris-elbow-shoulder-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 10 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 14 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 6 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 18 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + ) + ) + +(define *kg-grunt-debris-array-params* + (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 22 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 21 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 10 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 40 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 9 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 19 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 22 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 12 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 22 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 33 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 32 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 14 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 44 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 13 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 30 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 33 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 16 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 33 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 6 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 27 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + ) + ) + ) + +(define *kg-grunt-debris-knee-hip-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 9 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 13 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 20 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 31 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 26 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + ) + ) + +(deftype kg-grunt-anim-info (structure) + ((anim-index int32) + (travel-speed meters) + ) + :pack-me + ) + + +(deftype kg-grunt-global-info (basic) + ((prev-knocked-anim-index int32) + (prev-yellow-hit-anim-index int32) + (prev-blue-hit-anim-index int32) + (patrol-anim kg-grunt-anim-info 4 :inline) + (charge-anim kg-grunt-anim-info 3 :inline) + (attack-anim kg-grunt-anim-info 2 :inline) + (knocked-anim kg-grunt-anim-info 4 :inline) + (knocked-land-anim kg-grunt-anim-info 4 :inline) + (yellow-hit-anim kg-grunt-anim-info 4 :inline) + (blue-hit-anim kg-grunt-anim-info 6 :inline) + ) + ) + + +(deftype kg-grunt (nav-enemy) + ((patrol-anim kg-grunt-anim-info) + (charge-anim kg-grunt-anim-info) + (attack-anim kg-grunt-anim-info) + (knocked-anim kg-grunt-anim-info) + (yellow-hit-anim kg-grunt-anim-info) + (blue-hit-anim kg-grunt-anim-info) + (intro-path path-control) + (use-charge-anim-index int8 :offset 652) + (knocked-anim-index int8) + (jumping-ambush-path-pt int8) + (kg-grunt-flags uint8) + (state-timeout2 time-frame) + (next-warn-time time-frame) + (dest vector :inline) + (minimap connection-minimap :offset 704) + (debris-count uint32) + (debris-mask uint32) + ) + (:state-methods + attack + falling-ambush + jumping-ambush + jumping-ambush-cont + wait-for-focus + spin-attack + explode + ) + (:methods + (go-attack (_type_ float) process-focusable) + (get-nav-enemy-info (_type_) nav-enemy-info) + ) + ) + + +(define *kg-grunt-global-info* (new 'static 'kg-grunt-global-info + :patrol-anim (new 'static 'inline-array kg-grunt-anim-info 4 + (new 'static 'kg-grunt-anim-info :anim-index 11 :travel-speed (meters 4)) + (new 'static 'kg-grunt-anim-info :anim-index 12 :travel-speed (meters 7)) + (new 'static 'kg-grunt-anim-info :anim-index 14 :travel-speed (meters 7)) + (new 'static 'kg-grunt-anim-info :anim-index 15 :travel-speed (meters 7)) + ) + :charge-anim (new 'static 'inline-array kg-grunt-anim-info 3 + (new 'static 'kg-grunt-anim-info :anim-index 14 :travel-speed (meters 7)) + (new 'static 'kg-grunt-anim-info :anim-index 15 :travel-speed (meters 7)) + (new 'static 'kg-grunt-anim-info :anim-index 16 :travel-speed (meters 7)) + ) + :attack-anim (new 'static 'inline-array kg-grunt-anim-info 2 + (new 'static 'kg-grunt-anim-info :anim-index 17 :travel-speed (meters 12)) + (new 'static 'kg-grunt-anim-info :anim-index 18 :travel-speed (meters 12)) + ) + :knocked-anim (new 'static 'inline-array kg-grunt-anim-info 4 + (new 'static 'kg-grunt-anim-info :anim-index 22) + (new 'static 'kg-grunt-anim-info :anim-index 24) + (new 'static 'kg-grunt-anim-info :anim-index 26) + (new 'static 'kg-grunt-anim-info :anim-index 28) + ) + :knocked-land-anim (new 'static 'inline-array kg-grunt-anim-info 4 + (new 'static 'kg-grunt-anim-info :anim-index 23) + (new 'static 'kg-grunt-anim-info :anim-index 25) + (new 'static 'kg-grunt-anim-info :anim-index 27) + (new 'static 'kg-grunt-anim-info :anim-index 29) + ) + :yellow-hit-anim (new 'static 'inline-array kg-grunt-anim-info 4 + (new 'static 'kg-grunt-anim-info :anim-index 34) + (new 'static 'kg-grunt-anim-info :anim-index 35) + (new 'static 'kg-grunt-anim-info :anim-index 36) + (new 'static 'kg-grunt-anim-info :anim-index 37) + ) + :blue-hit-anim (new 'static 'inline-array kg-grunt-anim-info 6 + (new 'static 'kg-grunt-anim-info :anim-index 38) + (new 'static 'kg-grunt-anim-info :anim-index 39) + (new 'static 'kg-grunt-anim-info :anim-index 40) + (new 'static 'kg-grunt-anim-info :anim-index 41) + (new 'static 'kg-grunt-anim-info :anim-index 42) + (new 'static 'kg-grunt-anim-info :anim-index 43) + ) + ) + ) + +(define *fact-info-kg-grunt-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 48 :pickup-amount 10.0) + ) + +(define *kg-grunt-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 36 + (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 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 #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 30 + :param1 #x69 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 60) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 1 + :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 #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 30 + :param1 #x69 + :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 30 + :param1 #x69 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #xa + :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 push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 1 + :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 #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 30 + :param1 #x69 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #xa + :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 push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 1 + :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 #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 30 + :param1 #x69 + :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 30 + :param1 #x69 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #xa + :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 push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 1 + :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 #x1e + :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 push) :param0 60) + (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 13 + :hostile-anim -1 + :hit-anim 34 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim 19 + :die-falling-anim 32 + :victory-anim -1 + :jump-wind-up-anim 45 + :jump-in-air-anim 46 + :jump-land-anim 47 + :neck-joint 5 + :look-at-joint 6 + :bullseye-joint 18 + :sound-hit (static-sound-name "kg-impact") + :sound-die (static-sound-name "kg-explo") + :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 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.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 #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 #t + :use-circling #t + :use-pacing #t + :walk-anim 11 + :turn-anim -1 + :run-anim 14 + :taunt-anim 20 + :run-travel-speed (meters 7) + :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! (-> *kg-grunt-nav-enemy-info* fact-defaults) *fact-info-kg-grunt-defaults*) + +(defmethod get-inv-mass ((this kg-grunt)) + 2.0 + ) + +(defmethod event-handler ((this kg-grunt) (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) + (cond + ((= (-> this hit-points) 0.0) + (go (method-of-object this explode)) + ) + (else + (let ((s5-1 (new 'stack 'debris-tuning (the-as uint 1)))) + (set! (-> s5-1 hit-xz-reaction) 0.95) + (set! (-> s5-1 hit-y-reaction) 0.6) + (set! (-> s5-1 fountain-rand-transv-lo quad) (-> this incoming attack-position quad)) + (dotimes (s4-0 8) + (let ((v1-32 (rand-vu-int-count-excluding 18 (the-as int (-> this debris-mask))))) + (logior! (-> this debris-mask) (ash 1 v1-32)) + (debris-spawn this s5-1 (-> *kg-grunt-debris-array-params* v1-32) (the-as process-drawable #f)) + ) + ) + ) + (setup-masks (-> this draw) 0 (the-as int (* (-> this debris-mask) 2))) + (go (method-of-object this knocked)) + ) + ) + #t + ) + (('impact-impulse) + (let ((v1-44 (the-as object (-> arg3 param 0)))) + (when (< 4096.0 (-> (the-as rigid-body-impact v1-44) impulse)) + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.1)) + (set! (-> this hit-points) 0.0) + (send-event arg0 'lawsuit (-> this root trans)) + (go (method-of-object this explode)) + #t + ) + ) + ) + (('death-start) + (set! (-> this draw death-timer) (the-as uint 0)) + ((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 go-ambush-delay ((this kg-grunt)) + (cond + ((logtest? (-> this fact enemy-options) (enemy-option user10)) + (go (method-of-object this falling-ambush)) + ) + ((logtest? (-> this fact enemy-options) (enemy-option user11)) + (go (method-of-object this jumping-ambush)) + ) + (else + (format 0 "ERROR: ~A doesn't specify which ambush behavior to use.~%" (-> this name)) + (go-hostile this) + ) + ) + ) + +(defstate explode (kg-grunt) + :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-play "kg-explo") + (send-event self 'death-start) + ) + :code (behavior () + (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) (-> self incoming attack-position quad)) + (debris-spawn self a1-1 *kg-grunt-debris-params* (the-as process-drawable #f)) + ) + (let ((v1-6 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node kg-grunt-lod0-jg chest)))) + (cond + ((logtest? (-> *part-group-id-table* 220 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-6 quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 220)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-6 quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 220)) + ) + ) + ) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +(defstate falling-ambush (kg-grunt) + :virtual #t + :event enemy-event-handler + :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* ((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) + ) + ) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (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) + ) + (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 + ) + :exit (behavior () + (let ((v1-1 (-> self root root-prim))) + (set! (-> v1-1 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-1 prim-core collide-with) (-> self root backup-collide-with)) + ) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.2)) + (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 "kg-grunt-notice") + (ja-channel-push! 1 0) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info notice-anim)) + :num! (seek! max 1.8) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.8)) + ) + (until (logtest? (-> self root status) (collide-status on-ground touch-surface touch-wall)) + (suspend) + ) + (go-virtual hostile) + ) + :post nav-enemy-falling-post + ) + +(defmethod go-directed2 ((this kg-grunt)) + (case (-> this jump-why) + ((2) + (go (method-of-object this jumping-ambush-cont)) + ) + (else + ((method-of-type nav-enemy go-directed2) this) + ) + ) + ) + +(defstate jumping-ambush (kg-grunt) + :virtual #t + :event enemy-event-handler + :enter (behavior () + ((-> (method-of-type nav-enemy ambush) enter)) + (when (zero? (-> self intro-path)) + (format 0 "ERROR: ~A has no intro path, skipping jumping-ambush~%" (-> self name)) + (go-virtual notice) + ) + (get-point-in-path! (-> self intro-path) (-> self root trans) 0.0 'interp) + ) + :code (behavior () + (set! (-> self jumping-ambush-path-pt) 1) + (until #f + (let ((gp-0 (new 'stack-no-clear 'vector))) + (get-point-in-path! (-> self intro-path) gp-0 1.0 'interp) + (set! (-> self enemy-flags) + (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked))) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (let ((v1-5 (process->ppointer self))) + (set! (-> a1-1 from) v1-5) + ) + (set! (-> a1-1 num-params) 2) + (set! (-> a1-1 message) 'jump) + (set! (-> a1-1 param 0) (the-as uint 2)) + (set! (-> a1-1 param 1) (the-as uint gp-0)) + (send-event-function self a1-1) + ) + ) + (suspend) + ) + #f + ) + ) + +(defstate jumping-ambush-cont (kg-grunt) + :virtual #t + :event enemy-event-handler + :code (behavior () + (let ((a0-0 (-> self intro-path)) + (v1-1 (+ (-> self jumping-ambush-path-pt) 1)) + ) + (if (and (nonzero? a0-0) (< v1-1 (-> a0-0 curve num-cverts))) + (set! (-> self jumping-ambush-path-pt) v1-1) + (go-best-state self) + ) + ) + (until #f + (let ((gp-0 (new 'stack-no-clear 'vector))) + (get-point-in-path! (-> self intro-path) gp-0 (the float (-> self jumping-ambush-path-pt)) 'interp) + (set! (-> self enemy-flags) + (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked))) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (let ((v1-9 (process->ppointer self))) + (set! (-> a1-1 from) v1-9) + ) + (set! (-> a1-1 num-params) 2) + (set! (-> a1-1 message) 'jump) + (set! (-> a1-1 param 0) (the-as uint 2)) + (set! (-> a1-1 param 1) (the-as uint gp-0)) + (send-event-function self a1-1) + ) + ) + (suspend) + ) + #f + ) + ) + +(defstate active (kg-grunt) + :virtual #t + :code (behavior () + (let ((v1-2 (ja-group))) + (when (or (and v1-2 (or (= v1-2 kg-grunt-charge0-ja) (= v1-2 kg-grunt-charge1-ja) (= v1-2 kg-grunt-charge2-ja))) + (let ((v1-8 (ja-group))) + (and v1-8 (or (= v1-8 kg-grunt-patrol0-ja) + (= v1-8 kg-grunt-patrol1-ja) + (= v1-8 kg-grunt-charge0-ja) + (= v1-8 kg-grunt-charge1-ja) + ) + ) + ) + ) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (until #f + (set! (-> self patrol-anim) (-> *kg-grunt-global-info* patrol-anim (rnd-int self 4))) + (let ((v1-28 (-> self nav))) + (set! (-> v1-28 target-speed) (-> self patrol-anim travel-speed)) + ) + 0 + (let ((gp-0 (-> self draw art-group data (-> self patrol-anim anim-index))) + (s5-0 (set-reaction-time! self 1 (seconds 0.027))) + ) + (let ((v1-37 (ja-group))) + (if (not (and v1-37 (= v1-37 gp-0))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (dotimes (s4-0 s5-0) + (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)) + ) + ) + ) + (when (nonzero? (-> self patrol-anim anim-index)) + (ja-no-eval :num! (loop!)) + (ja-channel-push! 1 (seconds 0.2)) + (set! (-> self patrol-anim) (the-as kg-grunt-anim-info (-> *kg-grunt-global-info* patrol-anim))) + (let ((v1-67 (-> self nav))) + (set! (-> v1-67 target-speed) (-> self patrol-anim travel-speed)) + ) + 0 + (let ((gp-1 (-> self draw art-group data (-> self patrol-anim anim-index))) + (s5-1 (set-reaction-time! self (seconds 0.007) (seconds 0.017))) + ) + (ja-no-eval :group! gp-1 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (ja-blend-eval) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (dotimes (s4-1 s5-1) + (ja-no-eval :group! gp-1 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + ) + (when (zero? (rnd-int self 3)) + (let ((v1-107 self)) + (set! (-> v1-107 enemy-flags) (the-as enemy-flag (logclear (-> v1-107 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-107 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (ja-channel-push! 1 (seconds 0.3)) + (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)) + ) + (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-171 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-171 enemy-flags))) + (set! (-> v1-171 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-171 enemy-flags)))) + ) + (set! (-> v1-171 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-171 enemy-flags)))) + (set! (-> v1-171 nav callback-info) (-> v1-171 enemy-info callback-info)) + ) + 0 + ) + ) + ) + #f + ) + ) + +(defmethod go-attack ((this kg-grunt) (arg0 float)) + (local-vars (v1-5 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (get-focus! this))) + (when gp-0 + (let ((v1-3 (get-trans gp-0 0)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (vector-! s4-0 v1-3 (-> this root trans)) + (.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-5 vf1) + (let* ((f30-0 v1-5) + (f0-0 arg0) + (f28-0 (* f0-0 f0-0)) + (f0-2 12288.0) + ) + (when (or (>= (* f0-2 f0-2) f30-0) (>= f28-0 f30-0)) + (let ((f26-0 (quaternion-y-angle (-> this root quat))) + (f0-7 (atan (-> s4-0 x) (-> s4-0 z))) + (f1-0 1228.8) + ) + (cond + ((and (< (* f1-0 f1-0) f30-0) (>= f28-0 f30-0) (>= 8192.0 (fabs (deg- f26-0 f0-7)))) + (go (method-of-object this attack)) + ) + ((let ((f0-10 12288.0)) + (< f30-0 (* f0-10 f0-10)) + ) + (go (method-of-object this spin-attack)) + ) + ) + ) + ) + ) + ) + ) + gp-0 + ) + ) + ) + +(defstate hostile (kg-grunt) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (let ((a0-1 (go-attack self 13312.0)) + (gp-0 (current-time)) + ) + (when (and (>= gp-0 (-> self next-warn-time)) + (not (logtest? (-> self draw status) (draw-control-status on-screen))) + ) + (when (and a0-1 (let ((f0-0 65536.0)) + (>= (* f0-0 f0-0) (vector-vector-xz-distance-squared (get-trans a0-1 0) (-> self root trans))) + ) + ) + (sound-play "kg-grunt-warn") + (set! (-> self next-warn-time) (+ gp-0 (set-reaction-time! self (seconds 1) (seconds 1.2)))) + ) + ) + ) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (when (and v1-2 (or (= v1-2 kg-grunt-charge0-ja) (= v1-2 kg-grunt-charge1-ja) (= v1-2 kg-grunt-charge2-ja))) + (let ((v1-6 (-> self nav))) + (set! (-> v1-6 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (let ((v1-19 (-> self use-charge-anim-index))) + (cond + ((>= v1-19 0) + (set! (-> self charge-anim) (-> *kg-grunt-global-info* charge-anim v1-19)) + (set! (-> self use-charge-anim-index) -1) + ) + (else + (set! (-> self charge-anim) (-> *kg-grunt-global-info* charge-anim (rnd-int self 3))) + ) + ) + ) + (until #f + (go-attack self 22528.0) + (let ((gp-0 (-> self draw art-group data (-> self charge-anim anim-index)))) + (let ((v1-37 (ja-group))) + (when (not (and v1-37 (= v1-37 gp-0))) + (ja-channel-push! 1 (seconds 0.1)) + (let ((v1-41 (-> self nav))) + (set! (-> v1-41 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + ) + ) + (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)) + ) + ) + ) + #f + ) + :post nav-enemy-chase-post + ) + +(defstate attack (kg-grunt) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((v1-1 (-> self nav state))) + (set! (-> v1-1 speed) (-> self enemy-info run-travel-speed)) + ) + 0 + (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-10 *game-info*) + (v0-1 (+ (-> v1-10 attack-id) 1)) + ) + (set! (-> v1-10 attack-id) v0-1) + (set! (-> self attack-id) v0-1) + ) + ) + :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)) + ) + ) + :trans (behavior () + (reset-penetrate! self) + (when (logtest? (-> self enemy-flags) (enemy-flag victory)) + (logclear! (-> self enemy-flags) (enemy-flag victory)) + (sound-play "kg-grunt-hit") + ) + ) + :code (behavior () + (set! (-> self attack-anim) (-> *kg-grunt-global-info* attack-anim (rnd-int self 2))) + (let ((v1-5 (-> self nav))) + (set! (-> v1-5 target-speed) (-> self attack-anim travel-speed)) + ) + 0 + (let ((v1-7 (-> self nav))) + (set! (-> v1-7 turning-acceleration) 49152.0) + ) + 0 + (let ((gp-0 (-> self draw art-group data (-> self attack-anim anim-index))) + (f30-0 (rnd-float-range self 0.9 1.1)) + ) + (let ((v1-17 (ja-group))) + (if (not (and v1-17 (= v1-17 gp-0))) + (ja-channel-push! 1 (seconds 0.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)) + ) + ) + (let ((v1-36 (-> self nav))) + (set! (-> v1-36 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + (let ((v1-38 (-> self nav))) + (set! (-> v1-38 turning-acceleration) (-> self enemy-info run-turning-acceleration)) + ) + 0 + (let ((gp-1 (-> self draw art-group data (-> self charge-anim anim-index)))) + (ja-channel-push! 1 (seconds 0.1)) + (set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim gp-1)) + ) + (ja :num-func num-func-identity :frame-num (ja-aframe 3.0 0)) + (let ((gp-3 (-> self focus aware))) + (if (or (not (get-focus! self)) (!= gp-3 3)) + (go-stare self) + ) + ) + (let ((v1-57 0)) + (let ((a0-22 (the-as object (-> *kg-grunt-global-info* charge-anim))) + (a1-7 (-> self charge-anim)) + ) + (dotimes (a2-3 3) + (when (= (the-as kg-grunt-anim-info a0-22) a1-7) + (set! v1-57 a2-3) + (goto cfg-21) + ) + (set! a0-22 (&+ (the-as kg-grunt-anim-info a0-22) 8)) + ) + ) + (label cfg-21) + (set! (-> self use-charge-anim-index) v1-57) + ) + (go-virtual hostile) + ) + :post nav-enemy-chase-post + ) + +(defstate spin-attack (kg-grunt) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (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 + (let ((gp-0 (handle->process (-> self focus handle)))) + (if (not gp-0) + (go-stare self) + ) + (set! (-> self focus-pos quad) (-> (get-trans (the-as process-focusable gp-0) 0) quad)) + ) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-21 *game-info*) + (v0-3 (+ (-> v1-21 attack-id) 1)) + ) + (set! (-> v1-21 attack-id) v0-3) + (set! (-> self attack-id) v0-3) + ) + ) + :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)) + ) + ) + :trans (behavior () + (when (logtest? (-> self enemy-flags) (enemy-flag victory)) + (logclear! (-> self enemy-flags) (enemy-flag victory)) + (sound-play "kg-grunt-hit") + ) + ) + :code (behavior () + (set! (-> self attack-anim) (-> *kg-grunt-global-info* attack-anim (rnd-int self 2))) + (let ((gp-0 (-> self draw art-group data (-> self attack-anim anim-index))) + (f30-0 (rnd-float-range self 0.9 1.1)) + ) + (let ((v1-13 (ja-group))) + (if (not (and v1-13 (= v1-13 gp-0))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (ja-no-eval :group! gp-0 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (let ((a0-9 (handle->process (-> self focus handle)))) + (if a0-9 + (set! (-> self focus-pos quad) (-> (get-trans (the-as process-focusable a0-9) 0) quad)) + ) + ) + (seek-to-point-toward-point! (-> self root) (-> self focus-pos) 546133.3 (seconds 0.1)) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (let ((gp-3 (-> self focus aware))) + (if (or (not (get-focus! self)) (!= gp-3 3)) + (go-stare self) + ) + ) + (go-virtual hostile) + ) + :post nav-enemy-simple-post + ) + +(defstate circling (kg-grunt) + :virtual #t + :code (behavior () + (let ((v1-2 (ja-group))) + (when (and v1-2 (or (= v1-2 kg-grunt-charge0-ja) (= v1-2 kg-grunt-charge1-ja) (= v1-2 kg-grunt-charge2-ja))) + (let ((v1-6 (-> self nav))) + (set! (-> v1-6 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (until #f + (set! (-> self charge-anim) (-> *kg-grunt-global-info* charge-anim (rnd-int self 3))) + (let ((v1-22 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-22 enemy-flags))) + (set! (-> v1-22 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-22 enemy-flags)))) + ) + (set! (-> v1-22 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-22 enemy-flags)))) + (set! (-> v1-22 nav callback-info) (-> v1-22 enemy-info callback-info)) + ) + 0 + (let ((v1-25 self)) + (set! (-> v1-25 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-25 enemy-flags)))) + ) + 0 + (let ((v1-27 (-> self nav))) + (set! (-> v1-27 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + (let ((v1-29 (-> self nav))) + (set! (-> v1-29 acceleration) (-> self enemy-info run-acceleration)) + ) + 0 + (let ((v1-31 (-> self nav))) + (set! (-> v1-31 turning-acceleration) (-> self enemy-info run-turning-acceleration)) + ) + 0 + (let ((gp-0 (-> self draw art-group data (-> self charge-anim anim-index)))) + (let ((v1-39 (ja-group))) + (if (not (and v1-39 (= v1-39 gp-0))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (let ((s5-0 (rnd-int self 8)) + (f30-0 (rnd-float-range self 0.9 1.1)) + ) + (while (nonzero? s5-0) + (+! s5-0 -1) + (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)) + ) + ) + ) + ) + (when (< 20480.0 (vector-vector-xz-distance (-> self focus-pos) (-> self root trans))) + (let ((v1-66 self)) + (set! (-> v1-66 enemy-flags) (the-as enemy-flag (logclear (-> v1-66 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-66 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (let ((v1-71 self)) + (set! (-> v1-71 enemy-flags) (the-as enemy-flag (logclear (-> v1-71 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (vector-reset! (-> self root transv)) + (let ((v1-77 (ja-group))) + (if (not (and v1-77 (= v1-77 kg-grunt-celebrate-start-ja))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (let ((f30-2 (rnd-float-range self 0.9 1.1))) + (ja-no-eval :group! kg-grunt-celebrate-start-ja :num! (seek! max f30-2) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-2)) + ) + (ja-no-eval :group! kg-grunt-celebrate-finish-ja :num! (seek! max f30-2) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-2)) + ) + ) + ) + ) + #f + ) + ) + +(defstate pacing (kg-grunt) + :virtual #t + :code (behavior () + (let ((v1-2 (ja-group))) + (when (and v1-2 (or (= v1-2 kg-grunt-charge0-ja) (= v1-2 kg-grunt-charge1-ja) (= v1-2 kg-grunt-charge2-ja))) + (let ((v1-6 (-> self nav))) + (set! (-> v1-6 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (set! (-> self patrol-anim) (-> *kg-grunt-global-info* patrol-anim (rnd-int self 4))) + (let ((f30-0 (rnd-float-range self 0.9 1.1)) + (gp-0 (-> self draw art-group data (-> self patrol-anim anim-index))) + ) + (let ((v1-28 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-28 enemy-flags))) + (set! (-> v1-28 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-28 enemy-flags)))) + ) + (set! (-> v1-28 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-28 enemy-flags)))) + (set! (-> v1-28 nav callback-info) (-> v1-28 enemy-info callback-info)) + ) + 0 + (let ((v1-31 self)) + (set! (-> v1-31 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-31 enemy-flags)))) + ) + 0 + (let ((v1-33 (-> self nav))) + (set! (-> v1-33 target-speed) (-> self patrol-anim travel-speed)) + ) + 0 + (let ((v1-35 (-> self nav))) + (set! (-> v1-35 acceleration) (-> self enemy-info walk-acceleration)) + ) + 0 + (let ((v1-37 (-> self nav))) + (set! (-> v1-37 turning-acceleration) (-> self enemy-info walk-turning-acceleration)) + ) + 0 + (let ((v1-41 (ja-group))) + (if (not (and v1-41 (= v1-41 gp-0))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (until #f + (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)) + ) + ) + ) + #f + ) + ) + +(defstate stop-chase (kg-grunt) + :virtual #t + :code (behavior () + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (set! (-> self patrol-anim) (-> *kg-grunt-global-info* patrol-anim (rnd-int self 4))) + (let ((v1-14 (-> self nav))) + (set! (-> v1-14 target-speed) (-> self patrol-anim travel-speed)) + ) + 0 + (let ((f30-0 (rnd-float-range self 0.9 1.1)) + (gp-0 (-> self draw art-group data (-> self patrol-anim anim-index))) + ) + (let ((v1-24 (ja-group))) + (if (not (and v1-24 (= v1-24 gp-0))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (until #f + (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)) + ) + ) + ) + #f + ) + ) + +(defmethod knocked-anim ((this kg-grunt) (arg0 enemy-knocked-info)) + (local-vars (v1-72 int) (a2-3 int) (a2-5 int)) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot)) + (let ((v1-2 (ash 1 (-> *kg-grunt-global-info* prev-yellow-hit-anim-index))) + (a0-7 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (if (and a0-7 (or (= a0-7 (-> this draw art-group data 16)) + (= a0-7 (-> this draw art-group data 38)) + (= a0-7 (-> this draw art-group data 39)) + (= a0-7 (-> this draw art-group data 40)) + ) + ) + (set! a2-3 (logior v1-2 4)) + (set! a2-3 (logior v1-2 8)) + ) + ) + (let ((s4-0 (enemy-method-131 this 4 a2-3))) + (set! (-> *kg-grunt-global-info* prev-yellow-hit-anim-index) s4-0) + (set! (-> this yellow-hit-anim) (-> *kg-grunt-global-info* yellow-hit-anim s4-0)) + (let ((v1-11 (rnd-int this 3))) + (if (= s4-0 3) + (set! v1-11 2) + ) + (set! (-> this use-charge-anim-index) v1-11) + ) + ) + (let ((s4-1 (-> this draw art-group data (-> this yellow-hit-anim anim-index)))) + (ja-channel-push! 1 0) + (let ((a0-19 (-> this skel root-channel 0))) + (set! (-> a0-19 frame-group) (the-as art-joint-anim s4-1)) + (set! (-> a0-19 param 0) (the float (+ (-> (the-as art-joint-anim s4-1) frames num-frames) -1))) + (set! (-> a0-19 param 1) (-> arg0 anim-speed)) + (set! (-> a0-19 frame-num) 0.0) + (joint-control-channel-group! a0-19 (the-as art-joint-anim s4-1) num-func-seek!) + ) + ) + #t + ) + (((knocked-type blue-shot)) + (let* ((v1-24 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + (s4-2 (and v1-24 (or (= v1-24 (-> this draw art-group data 16)) + (= v1-24 (-> this draw art-group data 38)) + (= v1-24 (-> this draw art-group data 39)) + (= v1-24 (-> this draw art-group data 40)) + ) + ) + ) + ) + (if (>= (-> this incoming blue-juggle-count) (the-as uint 2)) + (logior! (-> this kg-grunt-flags) 2) + ) + (cond + ((and (not s4-2) (logtest? (-> this kg-grunt-flags) 2)) + (set! s4-2 #t) + (ja-channel-push! 1 (seconds 0.17)) + ) + (else + (let ((v1-36 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (if (and v1-36 (= v1-36 (-> this draw art-group data 44))) + (ja-channel-push! 1 (seconds 0.17)) + (ja-channel-push! 1 (seconds 0.02)) + ) + ) + ) + ) + (let ((v1-42 (ash 1 (-> *kg-grunt-global-info* prev-blue-hit-anim-index)))) + (if s4-2 + (set! a2-5 (logior v1-42 56)) + (set! a2-5 (logior v1-42 7)) + ) + ) + (let ((v1-46 (enemy-method-131 this 6 a2-5))) + (set! (-> *kg-grunt-global-info* prev-blue-hit-anim-index) v1-46) + (set! (-> this blue-hit-anim) (-> *kg-grunt-global-info* blue-hit-anim v1-46)) + ) + (let ((a2-6 0)) + (when (not (logtest? (-> this kg-grunt-flags) 2)) + (if s4-2 + (set! a2-6 (logior a2-6 3)) + (set! a2-6 (logior a2-6 4)) + ) + ) + (set! (-> this use-charge-anim-index) (enemy-method-131 this 3 a2-6)) + ) + ) + (let ((a1-26 (-> this draw art-group data (-> this blue-hit-anim anim-index))) + (a0-51 (-> this skel root-channel 0)) + ) + (set! (-> a0-51 frame-group) (the-as art-joint-anim a1-26)) + (set! (-> a0-51 param 0) (the float (+ (-> (the-as art-joint-anim a1-26) frames num-frames) -1))) + (set! (-> a0-51 param 1) (-> arg0 anim-speed)) + (set! (-> a0-51 frame-num) 0.0) + (joint-control-channel-group! a0-51 (the-as art-joint-anim a1-26) num-func-seek!) + ) + #t + ) + (else + 0 + (cond + ((or (= (-> this incoming knocked-type) (knocked-type explode-or-darkjak)) + (= (-> this incoming knocked-type) (knocked-type dark-shot)) + ) + (set! v1-72 3) + ) + (else + (let ((s4-3 (ash 1 (-> *kg-grunt-global-info* prev-knocked-anim-index)))) + (let ((s3-0 (-> this root))) + (if (>= 16384.0 (fabs (deg- (quaternion-y-angle (-> s3-0 quat)) (atan (-> s3-0 transv x) (-> s3-0 transv z))))) + (set! s4-3 (logior s4-3 4)) + ) + ) + (set! v1-72 (enemy-method-131 this 3 s4-3)) + ) + ) + ) + (set! (-> *kg-grunt-global-info* prev-knocked-anim-index) v1-72) + (set! (-> this knocked-anim-index) v1-72) + (set! (-> this knocked-anim) (-> *kg-grunt-global-info* knocked-anim v1-72)) + (let ((s4-4 (-> this draw art-group data (-> this knocked-anim anim-index)))) + (ja-channel-push! 1 0) + (let ((a0-68 (-> this skel root-channel 0))) + (set! (-> a0-68 frame-group) (the-as art-joint-anim s4-4)) + (set! (-> a0-68 param 0) (the float (+ (-> (the-as art-joint-anim s4-4) frames num-frames) -1))) + (set! (-> a0-68 param 1) (-> arg0 anim-speed)) + (set! (-> a0-68 frame-num) 0.0) + (joint-control-channel-group! a0-68 (the-as art-joint-anim s4-4) num-func-seek!) + ) + ) + #t + ) + ) + ) + +(defmethod knocked-land-anim ((this kg-grunt) (arg0 enemy-knocked-info)) + (cond + ((= (-> this incoming knocked-type) (knocked-type blue-shot)) + #f + ) + ((!= (-> this incoming knocked-type) (knocked-type yellow-shot)) + (let ((v1-8 (-> this + draw + art-group + data + (-> *kg-grunt-global-info* knocked-land-anim (-> this knocked-anim-index) anim-index) + ) + ) + (a0-3 (-> this skel root-channel 0)) + ) + (set! (-> a0-3 frame-group) (the-as art-joint-anim v1-8)) + (set! (-> a0-3 param 0) (the float (+ (-> (the-as art-joint-anim v1-8) 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-8) num-func-seek!) + ) + #t + ) + ) + ) + +(defmethod go-die ((this kg-grunt)) + (go (method-of-object this explode)) + ) + +(defstate wait-for-focus (kg-grunt) + :virtual #t + :event enemy-event-handler + :enter (-> (method-of-type nav-enemy idle) enter) + :trans (behavior () + (let ((s5-0 (handle->process (-> self focus handle)))) + (when s5-0 + (let ((gp-0 (get-trans (the-as process-focusable s5-0) 0))) + (when (and (or (not (logtest? (-> self enemy-flags) (enemy-flag use-notice-distance))) + (>= 163840.0 (vector-vector-distance (-> self root trans) gp-0)) + ) + (or (not (logtest? (-> self fact enemy-options) (enemy-option user8))) + (and (not (focus-test? (the-as process-focusable s5-0) in-air)) + (>= 4096.0 (fabs (- (-> gp-0 y) (-> self root trans y)))) + ) + ) + ) + (cond + ((and (logtest? (-> self fact enemy-options) (enemy-option user9)) + (logtest? (-> self enemy-flags) (enemy-flag use-notice-distance)) + ) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (vector-! s5-1 gp-0 (-> self root trans)) + (let ((f0-2 32768.0) + (v1-26 s5-1) + ) + (if (or (>= f0-2 (sqrtf (+ (* (-> v1-26 x) (-> v1-26 x)) (* (-> v1-26 z) (-> v1-26 z))))) + (>= 20024.889 (fabs (deg- (y-angle (-> self root)) (atan (-> s5-1 x) (-> s5-1 z))))) + ) + (go-virtual notice) + ) + ) + ) + ) + (else + (go-virtual notice) + ) + ) + ) + ) + ) + ) + ) + :code (-> (method-of-type nav-enemy idle) code) + :post (-> (method-of-type nav-enemy idle) post) + ) + +(defmethod on-dying ((this kg-grunt)) + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + (call-parent-method this) + (none) + ) + +;; WARN: Return type mismatch nav-enemy vs kg-grunt. +(defmethod relocate ((this kg-grunt) (offset int)) + (if (nonzero? (-> this intro-path)) + (&+! (-> this intro-path) offset) + ) + (the-as kg-grunt ((method-of-type nav-enemy relocate) this offset)) + ) + +(defmethod init-enemy-collision! ((this kg-grunt)) + (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-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-with) (collide-spec backgnd crate obstacle hit-by-others-list)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set-vector! (-> v1-15 local-sphere) 0.0 9830.4 0.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 collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-17 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-17 transform-index) 4) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 4915.2) + ) + (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 semi-solid deadly)) + (set! (-> v1-19 transform-index) 18) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 2252.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 jak bot player-list)) + (set! (-> v1-21 prim-core action) (collide-action deadly)) + (set! (-> v1-21 transform-index) 16) + (set-vector! (-> v1-21 local-sphere) 0.0 0.0 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 collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-23 prim-core action) (collide-action deadly)) + (set! (-> v1-23 transform-index) 12) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 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 collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-25 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-25 transform-index) 6) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (let ((v1-27 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-27 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-27 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod get-nav-enemy-info ((this kg-grunt)) + *kg-grunt-nav-enemy-info* + ) + +(defmethod init-enemy! ((this kg-grunt)) + (if (and (-> this entity) (= (-> this entity extra level name) 'factoryd)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-kg-grunt-lowres" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-kg-grunt" (the-as (pointer level) #f))) + (the-as pair 0) + ) + ) + (logior! (-> this mask) (process-mask kg-robot)) + (init-enemy-defaults! this (get-nav-enemy-info this)) + (let ((v1-17 (-> this neck))) + (set! (-> v1-17 up) (the-as uint 1)) + (set! (-> v1-17 nose) (the-as uint 2)) + (set! (-> v1-17 ear) (the-as uint 0)) + (set-vector! (-> v1-17 twist-max) 11832.889 11832.889 0.0 1.0) + (set! (-> v1-17 ignore-angle) 30947.555) + ) + (let ((v1-19 (-> this nav))) + (set! (-> v1-19 speed-scale) 1.0) + ) + 0 + (set-gravity-length (-> this root dynam) 573440.0) + (let ((s5-3 *kg-grunt-global-info*)) + (set! (-> this patrol-anim) (-> s5-3 patrol-anim (rnd-int this 4))) + (set! (-> this charge-anim) (-> s5-3 charge-anim (rnd-int this 3))) + (set! (-> this attack-anim) (-> s5-3 attack-anim (rnd-int this 2))) + ) + (set! (-> this use-charge-anim-index) -1) + (if (zero? (rnd-int this 2)) + (logior! (-> this kg-grunt-flags) 1) + ) + (if (zero? (rnd-int this 2)) + (logior! (-> this kg-grunt-flags) 4) + ) + (set! (-> this intro-path) (new 'process 'path-control this 'intro 0.0 (the-as entity #f) #t)) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 108) (the-as int #f) (the-as vector #t) 0)) + (set-vector! (-> this root scale) 1.25 1.25 1.25 1.0) + (setup-masks (-> this draw) -1 0) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs object. +(defmethod go-idle2 ((this kg-grunt)) + (if (logtest? (-> this fact enemy-options) (enemy-option user9)) + (go (method-of-object this wait-for-focus)) + (go (method-of-object this idle)) + ) + 0 + ) diff --git a/goal_src/jak3/levels/common/enemy/mantis.gc b/goal_src/jak3/levels/common/enemy/mantis.gc index 1bf467871a..7d3cc6ef94 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 ecc210c195..c4d6321a45 100644 --- a/goal_src/jak3/levels/common/enemy/prebot-eco-creature.gc +++ b/goal_src/jak3/levels/common/enemy/prebot-eco-creature.gc @@ -5,5 +5,3451 @@ ;; name in dgo: prebot-eco-creature ;; dgos: DESW, TOWERA, MINED +;; +++eco-creature-flag +(defenum eco-creature-flag + :type uint64 + :bitfield #t + (ecf0 0) + (ecf1 1) + (ecf2 2) + (ecf3 3) + (ecf4 4) + (ecf5 5) + ) +;; ---eco-creature-flag + +(declare-type prebot-large-eco-creature nav-enemy) +(define-extern prebot-medium-eco-creature type) +(define-extern prebot-small-eco-creature type) +(define-extern medium-eco-creature-launched type) +(define-extern small-eco-creature-launched type) +(define-extern large-eco-creature-split (function none :behavior prebot-large-eco-creature)) +(define-extern prebot-eco-creature-joint-callback (function cspace transformq none)) + + ;; DECOMP BEGINS +(defpartgroup group-prebot-critter-trail + :id 440 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1754 :fade-after (meters 120) :falloff-to (meters 120)) + (sp-item 1755 :flags (sp6)) + (sp-item 1756 :fade-after (meters 120) :falloff-to (meters 120)) + ) + ) + +(defpart 1756 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0 4.0) + (:scale-x (meters 0.3) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 48.0 16.0) + (:b 64.0) + (:a 128.0) + (:omega (degrees 6761.25)) + (:vel-y (meters 0) (meters 0.01)) + (:fade-a -0.10666667) + (:accel-y (meters -0.000033333334) (meters -0.000016666667)) + (:friction 0.96) + (:timer (seconds 0.5) (seconds 3.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.017) (seconds 0.497)) + (:next-launcher 1757) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +(defpart 1757 + :init-specs ((:r 32.0) (:g 128.0 128.0) (:b 255.0) (:next-time (seconds 0.017)) (:next-launcher 1758)) + ) + +(defpart 1758 + :init-specs ((:r 0.0) (:g 48.0 16.0) (:b 64.0) (:next-time (seconds 0.017) (seconds 0.497)) (:next-launcher 1757)) + ) + +(defpart 1755 + :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 0.0) + (:g 192.0 64.0) + (:b 255.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 1754 + :init-specs ((:texture (bigpuff 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 0.0) + (:g 128.0) + (:b 255.0) + (:a 64.0 8.0) + (:vel-y (meters -0.006666667) (meters -0.006666667)) + (:scalevel-x (meters 0.005) (meters 0.008333334)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-r 3.2) + (:fade-g 0.0) + (:fade-b -3.2) + (:fade-a -0.8) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.97) + (: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.135)) + (:next-launcher 1759) + ) + ) + +(defpart 1759 + :init-specs ((:r 128.0) + (:g 128.0) + (:b 128.0) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:fade-a -0.10666667 -0.21333334) + (:func 'nothing) + ) + ) + +(defskelgroup skel-cav-eco-lg cav-eco-lg cav-eco-lg-lod0-jg cav-eco-lg-idle-ja + ((cav-eco-lg-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +(deftype prebot-large-eco-creature (nav-enemy) + ((old-y-deg float) + (diff-angle float) + (attack-anims (array int32)) + (victory-anims (array int32)) + (turn-left-anim int32) + (turn-right-anim int32) + (split-type type) + (attack-stop-frame float) + (traj trajectory :inline) + (which-trajectory int8) + (x-rotate float) + (y-rotate float) + (launch-pos vector :inline) + (launch vector :inline) + (spin-jm joint-mod) + (trail-part sparticle-launch-control) + (trail-sound sound-id) + (flags eco-creature-flag) + ) + (:state-methods + unfold + fly-to-dest + attack + wait-for-children + ) + (:methods + (prebot-large-eco-creature-method-194 (_type_) none) + (prebot-large-eco-creature-method-195 (_type_) none) + ) + ) + + +(define *prebot-large-eco-creature-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 2 + :notice-anim 2 + :hostile-anim 3 + :hit-anim 2 + :knocked-anim 2 + :knocked-land-anim 2 + :die-anim 2 + :die-falling-anim 2 + :victory-anim 10 + :jump-wind-up-anim 2 + :jump-in-air-anim 2 + :jump-land-anim 2 + :neck-joint 5 + :look-at-joint 5 + :bullseye-joint 4 + :notice-distance (meters 200) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 20) + :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) + :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 16384.0 + :knocked-red-vxz-hi 40960.0 + :knocked-red-vy-lo 49152.0 + :knocked-red-vy-hi 61440.0 + :knocked-blue-vxz-lo 20480.0 + :knocked-blue-vxz-hi 28672.0 + :knocked-blue-vy-lo 16384.0 + :knocked-blue-vy-hi 40960.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 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 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 10.176285) + :geo-tform (new 'static 'vector :x 1.0 :w 35404.914) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 8223.438) + :geo-tform (new 'static 'vector :x 1.0 :w 27181.492) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 14248.819) + :geo-tform (new 'static 'vector :x -1.0 :w 10623.986) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 12262.859) + :geo-tform (new 'static 'vector :x 1.0 :w 33438.652) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.137 :z -0.9905 :w 11373.791) + :geo-tform (new 'static 'vector :x 0.2271 :y 0.9734 :z 0.0279 :w 36639.176) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5102 :z -0.86 :w 20530.754) + :geo-tform (new 'static 'vector :x 0.409 :y -0.0529 :z 0.9109 :w 32271.676) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6644 :z -0.7473 :w 1968.9199) + :geo-tform (new 'static 'vector :x 0.4093 :y 0.033 :z 0.9117 :w 33077.91) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9613 :z -0.2752 :w 2214.5525) + :geo-tform (new 'static 'vector :x 0.4059 :y -0.0481 :z 0.9126 :w 34502.54) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5153 :z 0.8569 :w 2080.0034) + :geo-tform (new 'static 'vector :x 0.4027 :y -0.0356 :z 0.9146 :w 32440.574) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint 10 + :pre-tform (new 'static 'vector :x 0.4859 :z 0.8739 :w 3273.5598) + :geo-tform (new 'static 'vector :x 0.414 :y 0.0464 :z 0.909 :w 29818.152) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8326 :z -0.5538 :w 3106.5886) + :geo-tform (new 'static 'vector :x 0.419 :y -0.032 :z 0.9073 :w 32459.652) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint 10 + :pre-tform (new 'static 'vector :x -0.9421 :z -0.3352 :w 6646.0605) + :geo-tform (new 'static 'vector :x 0.3914 :y -0.2 :z 0.8982 :w 37623.16) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3413 :z -0.9399 :w 1832.5868) + :geo-tform (new 'static 'vector :x 0.4204 :y -0.1424 :z 0.896 :w 38915.023) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.1371 :z 0.9905 :w 11369.786) + :geo-tform (new 'static 'vector :x -0.2272 :y 0.9734 :z 0.0279 :w 28896.426) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5101 :z 0.86 :w 20534.176) + :geo-tform (new 'static 'vector :x -0.026 :y 0.9979 :z 0.0579 :w 23979.531) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6645 :z 0.7472 :w 1958.0337) + :geo-tform (new 'static 'vector :x 0.016 :y 0.9992 :z -0.0358 :w 23969.791) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9615 :z 0.2744 :w 2230.645) + :geo-tform (new 'static 'vector :x 0.0911 :y 0.9943 :z 0.0536 :w 24079.475) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5098 :z -0.8602 :w 2098.3352) + :geo-tform (new 'static 'vector :x -0.0178 :y 0.999 :z 0.0406 :w 24125.459) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint 19 + :pre-tform (new 'static 'vector :x 0.4819 :z -0.8762 :w 3256.2107) + :geo-tform (new 'static 'vector :x -0.1538 :y 0.9868 :z -0.0491 :w 23956.574) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8364 :z 0.548 :w 3087.583) + :geo-tform (new 'static 'vector :x -0.017 :y 0.9991 :z 0.0369 :w 23745.531) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint 19 + :pre-tform (new 'static 'vector :x -0.9425 :z 0.3339 :w 6655.1807) + :geo-tform (new 'static 'vector :x 0.2492 :y 0.945 :z 0.2115 :w 24615.268) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3403 :z 0.9402 :w 1852.0657) + :geo-tform (new 'static 'vector :x 0.3178 :y 0.9363 :z 0.1493 :w 24121.836) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -1.0 :w 20948.764) + :geo-tform (new 'static 'vector :x -1.0 :w 9182.285) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9999 :z 0.0068 :w 7387.509) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.003 :z -0.0014 :w 16198.405) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9697 :z -0.244 :w 191.6382) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint -1 + :pre-tform (new 'static 'vector :y -1.0 :w 10.176285) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint -1 + :pre-tform (new 'static 'vector :y -1.0 :w 10.176285) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint -1 + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint 26 + :pre-tform (new 'static 'vector :x -0.4854 :z -0.8742 :w 21186.406) + :geo-tform (new 'static 'vector :x 0.6599 :y 0.6796 :z 0.3201 :w 35879.65) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9993 :z 0.0363 :w 2717.3774) + :geo-tform (new 'static 'vector :x 0.6708 :y 0.7057 :z 0.2277 :w 34044.242) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint 26 + :pre-tform (new 'static 'vector :x 0.3584 :z -0.9335 :w 11286.792) + :geo-tform (new 'static 'vector :x -0.4444 :y 0.7119 :z -0.5437 :w 28463.65) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1147 :z -0.9933 :w 2024.0066) + :geo-tform (new 'static 'vector :x -0.5154 :y 0.6809 :z -0.5201 :w 27281.908) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 36 + :parent-joint 26 + :pre-tform (new 'static 'vector :x -0.4859 :z 0.8739 :w 21191.012) + :geo-tform (new 'static 'vector :x 0.1968 :y 0.4177 :z -0.8869 :w 17933.508) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 37 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9993 :z -0.0361 :w 2729.0828) + :geo-tform (new 'static 'vector :x 0.0825 :y 0.3055 :z -0.9485 :w 17459.846) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 38 + :parent-joint 26 + :pre-tform (new 'static 'vector :x 0.3588 :z 0.9333 :w 11281.3125) + :geo-tform (new 'static 'vector :x 0.2273 :y 0.5912 :z 0.7738 :w 23386.34) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 39 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1145 :z 0.9934 :w 2026.6462) + :geo-tform (new 'static 'vector :x 0.2996 :y 0.5792 :z 0.758 :w 21904.426) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + ) + ) + :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 #t + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 3 + :turn-anim -1 + :run-anim 3 + :taunt-anim -1 + :run-travel-speed (meters 5) + :run-acceleration (meters 32) + :run-turning-acceleration (meters 40) + :walk-travel-speed (meters 5) + :walk-acceleration (meters 16) + :walk-turning-acceleration (meters 40) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 4) + :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! (-> *prebot-large-eco-creature-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defmethod go-ambush-delay ((this prebot-large-eco-creature)) + (if (type? (ppointer->process (-> this parent)) prebot-large-eco-creature) + (go-idle2 this) + ((method-of-type nav-enemy go-ambush-delay) this) + ) + ) + +(defmethod go-dormant ((this prebot-large-eco-creature)) + (if (type? (ppointer->process (-> this parent)) prebot-large-eco-creature) + (go-idle2 this) + ((method-of-type nav-enemy go-dormant) this) + ) + ) + +(defmethod go-dormant-aware ((this prebot-large-eco-creature)) + (if (type? (ppointer->process (-> this parent)) prebot-large-eco-creature) + (go-idle2 this) + ((method-of-type nav-enemy go-dormant-aware) this) + ) + ) + +(defmethod event-handler ((this prebot-large-eco-creature) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('attack) + (let ((s4-0 (the-as object (-> arg3 param 1)))) + (cond + ((or (not (logtest? (attack-mask penetrate-using) (-> (the-as attack-info s4-0) mask))) + (logand (penetrate + vehicle + dark-skin + dark-punch + dark-bomb + dark-smack + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + jak-red-shockwave + jak-dark-nuke + jak-dark-blackhole + ) + (-> (the-as attack-info s4-0) penetrate-using) + ) + ) + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + (else + (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)) + ) + ) + ) + (when (and (logtest? (-> (the-as attack-info s4-0) mask) (attack-mask id)) + (!= (-> (the-as attack-info s4-0) id) (-> this incoming attack-id)) + ) + (set! (-> this incoming attack-id) (-> (the-as attack-info s4-0) id)) + #t + ) + ) + ) + ) + ) + (('death-end) + (prebot-large-eco-creature-method-195 this) + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + (('eco-creature-died) + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer arg0)) + (set! (-> a1-4 num-params) arg1) + (set! (-> a1-4 message) arg2) + (set! (-> a1-4 param 0) (-> arg3 param 0)) + (set! (-> a1-4 param 1) (-> arg3 param 1)) + (set! (-> a1-4 param 2) (-> arg3 param 2)) + (set! (-> a1-4 param 3) (-> arg3 param 3)) + (set! (-> a1-4 param 4) (-> arg3 param 4)) + (set! (-> a1-4 param 5) (-> arg3 param 5)) + (send-event-function (ppointer->process (-> this parent)) a1-4) + ) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod coin-flip? ((this prebot-large-eco-creature)) + #f + ) + +(defmethod enemy-common-post ((this prebot-large-eco-creature)) + (let ((t9-0 (method-of-type nav-enemy enemy-common-post))) + (t9-0 this) + ) + (let ((f0-0 (quaternion-y-angle (-> this root quat)))) + (set! (-> this diff-angle) (- (-> this old-y-deg) f0-0)) + (cond + ((< 32768.0 (-> this diff-angle)) + (+! (-> this diff-angle) -65536.0) + ) + ((< (-> this diff-angle) -32768.0) + (+! (-> this diff-angle) 65536.0) + ) + ) + (set! (-> this old-y-deg) f0-0) + ) + (if (< (+ 0.5 (* 0.00024414062 (-> this nav state speed))) (* 0.005493164 (fabs (-> this diff-angle)))) + (logior! (-> this flags) (eco-creature-flag ecf0)) + (logclear! (-> this flags) (eco-creature-flag ecf0)) + ) + 0 + (none) + ) + +(defmethod prebot-large-eco-creature-method-194 ((this prebot-large-eco-creature)) + (cond + ((< 0.0 (-> this diff-angle)) + (let ((v1-2 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (cond + ((not (and v1-2 (= v1-2 (-> this draw art-group data (-> this turn-left-anim))))) + (ja-channel-push! 1 (seconds 0.1)) + (let ((s5-0 (-> this skel root-channel 0))) + (joint-control-channel-group-eval! + s5-0 + (the-as art-joint-anim (-> this draw art-group data (-> this turn-left-anim))) + num-func-identity + ) + (set! (-> s5-0 frame-num) 0.0) + ) + ) + (else + (let ((a0-8 (-> this skel root-channel 0))) + (set! (-> a0-8 param 0) (* 0.0019975142 (-> this diff-angle))) + (joint-control-channel-group-eval! a0-8 (the-as art-joint-anim #f) num-func-loop!) + ) + ) + ) + ) + ) + (else + (let ((v1-17 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (cond + ((not (and v1-17 (= v1-17 (-> this draw art-group data (-> this turn-right-anim))))) + (ja-channel-push! 1 (seconds 0.1)) + (let ((s5-1 (-> this skel root-channel 0))) + (joint-control-channel-group-eval! + s5-1 + (the-as art-joint-anim (-> this draw art-group data (-> this turn-right-anim))) + num-func-identity + ) + (set! (-> s5-1 frame-num) 0.0) + ) + ) + (else + (let ((a0-16 (-> this skel root-channel 0))) + (set! (-> a0-16 param 0) (* -0.0019975142 (-> this diff-angle))) + (joint-control-channel-group-eval! a0-16 (the-as art-joint-anim #f) num-func-loop!) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod prebot-large-eco-creature-method-195 ((this prebot-large-eco-creature)) + (when (not (logtest? (-> this flags) (eco-creature-flag ecf2))) + (logior! (-> this flags) (eco-creature-flag ecf2)) + (send-event (ppointer->process (-> this parent)) 'eco-creature-died (-> this root trans)) + ) + 0 + (none) + ) + +(defstate knocked (prebot-large-eco-creature) + :virtual #t + :enter (behavior () + (cond + ((and (-> self split-type) (or (= (-> self hit-points) 0.0) (nonzero? (-> self fated-time)))) + (large-eco-creature-split) + (go-virtual wait-for-children) + ) + (else + (let ((t9-2 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + ) + ) + +(defstate wait-for-children (prebot-large-eco-creature) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('eco-creature-died) + (let ((v1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> v1-1 from) (process->ppointer proc)) + (set! (-> v1-1 num-params) argc) + (set! (-> v1-1 message) message) + (set! (-> v1-1 param 0) (-> block param 0)) + (set! (-> v1-1 param 1) (-> block param 1)) + (set! (-> v1-1 param 2) (-> block param 2)) + (set! (-> v1-1 param 3) (-> block param 3)) + (set! (-> v1-1 param 4) (-> block param 4)) + (set! (-> v1-1 param 5) (-> block param 5)) + (send-event-function (ppointer->process (-> self parent)) v1-1) + ) + ) + ) + ) + :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)) + (let ((v1-6 (-> self nav))) + (logclear! (-> v1-6 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + (logclear! (-> self root nav-flags) (nav-flags has-root-sphere)) + ) + :code (behavior () + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + ) + ) + +(defstate attack (prebot-large-eco-creature) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logclear! (-> self flags) (eco-creature-flag ecf1)) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (set! (-> self root penetrate-using) (penetrate generic-attack lunge)) + (reset-penetrate! self) + (logior! (-> self focus-status) (focus-status dangerous)) + (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) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data (-> self attack-anims (rand-vu-int-count (-> self attack-anims length)))) + ) + ) + :exit (behavior () + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (nav-enemy-method-179 self) + (let ((v1-4 (-> self nav))) + (set! (-> v1-4 target-speed) (-> self enemy-info run-travel-speed)) + ) + 0 + (let ((v1-6 (-> self nav))) + (set! (-> v1-6 max-rotation-rate) (-> self enemy-info maximum-rotation-rate)) + ) + 0 + (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 () + (reset-penetrate! self) + nav-state + (if (logtest? (-> self enemy-flags) (enemy-flag victory)) + (logior! (-> self flags) (eco-creature-flag ecf1)) + ) + (cond + ((ja-group-in-array? (-> self attack-anims)) + (ja :num! (seek!)) + (when (>= (ja-aframe-num 0) (-> self attack-stop-frame)) + (let ((v1-17 (-> self nav))) + (set! (-> v1-17 target-speed) 0.0) + ) + 0 + (let ((v1-20 (-> self nav state))) + (set! (-> v1-20 speed) 0.0) + ) + 0 + (let ((v1-22 (-> self nav))) + (set! (-> v1-22 max-rotation-rate) 0.0) + ) + 0 + ) + (when (ja-done? 0) + (if (logtest? (-> self flags) (eco-creature-flag ecf1)) + (go-virtual victory) + (go-hostile self) + ) + ) + ) + ((logtest? (-> self flags) (eco-creature-flag ecf1)) + (go-virtual victory) + ) + (else + (go-hostile self) + ) + ) + ) + :code sleep-code + :post nav-enemy-chase-post + ) + +(defstate notice (prebot-large-eco-creature) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy notice) enter))) + (if t9-0 + (t9-0) + ) + ) + (go-best-state self) + ) + ) + +(defstate hostile (prebot-large-eco-creature) + :virtual #t + :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 (and a0-1 (time-elapsed? (-> self state-time) (seconds 0.1))) + (let ((gp-1 + (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable a0-1) 0) (-> self root trans)) + ) + ) + (if (and (< (vector-normalize-ret-len! gp-1 1.0) 18432.0) + (< (cos 5461.3335) (vector-dot gp-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + ) + (go-virtual attack) + ) + ) + ) + ) + (cond + ((not (logtest? (-> self flags) (eco-creature-flag ecf0))) + (let ((v1-29 (ja-group))) + (when (not (and v1-29 (= v1-29 (-> self draw art-group data (-> self enemy-info hostile-anim))))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data (-> self enemy-info hostile-anim)) :num! min) + ) + ) + (ja :num! (loop! (/ (-> self nav state speed) (* 0.5 (-> self enemy-info run-travel-speed))))) + ) + (else + (prebot-large-eco-creature-method-194 self) + ) + ) + ) + :code (behavior () + (until #f + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + #f + ) + ) + +(defstate circling (prebot-large-eco-creature) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy circling) trans))) + (if t9-0 + (t9-0) + ) + ) + (cond + ((not (logtest? (-> self flags) (eco-creature-flag ecf0))) + (let ((v1-8 (ja-group))) + (when (not (and v1-8 (= v1-8 (-> self draw art-group data (-> self enemy-info walk-anim))))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data (-> self enemy-info walk-anim)) :num! min) + ) + ) + (ja :num! (loop! (/ (-> self nav state speed) (* 0.5 (-> self enemy-info run-travel-speed))))) + ) + (else + (prebot-large-eco-creature-method-194 self) + ) + ) + ) + :code (behavior () + (nav-enemy-method-176 self) + (until #f + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + #f + ) + ) + +(defstate pacing (prebot-large-eco-creature) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy pacing) trans))) + (if t9-0 + (t9-0) + ) + ) + (cond + ((not (logtest? (-> self flags) (eco-creature-flag ecf0))) + (let ((v1-8 (ja-group))) + (when (not (and v1-8 (= v1-8 (-> self draw art-group data (-> self enemy-info walk-anim))))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data (-> self enemy-info walk-anim)) :num! min) + ) + ) + (ja :num! (loop! (/ (-> self nav state speed) (* 0.5 (-> self enemy-info run-travel-speed))))) + ) + (else + (prebot-large-eco-creature-method-194 self) + ) + ) + ) + :code (behavior () + (until #f + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + #f + ) + ) + +(defstate stare (prebot-large-eco-creature) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy stare) trans))) + (if t9-0 + (t9-0) + ) + ) + (cond + ((not (logtest? (-> self flags) (eco-creature-flag ecf0))) + (let ((v1-8 (ja-group))) + (when (not (and v1-8 (= v1-8 (-> self draw art-group data (-> self enemy-info idle-anim))))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data (-> self enemy-info idle-anim)) :num! min) + ) + ) + (ja :num! (loop!)) + ) + (else + (prebot-large-eco-creature-method-194 self) + ) + ) + ) + :code (behavior () + (until #f + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + #f + ) + ) + +(defstate victory (prebot-large-eco-creature) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (ja-no-eval :group! (-> self draw art-group data (-> self victory-anims (rand-vu-int-count (-> self victory-anims length)))) + :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 unfold (prebot-large-eco-creature) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (event-handler self proc argc message block) + ) + :enter (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data 13) :num! min) + ) + :trans (behavior () + (ja :num! (seek!)) + (if (ja-done? 0) + (go-best-state self) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defstate fly-to-dest (prebot-large-eco-creature) + :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)))) + (if (or (not (logtest? (attack-mask penetrate-using) (-> (the-as attack-info v1-1) mask))) + (logand (penetrate + vehicle + dark-skin + dark-punch + dark-bomb + dark-smack + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + jak-red-shockwave + jak-dark-nuke + jak-dark-blackhole + ) + (-> (the-as attack-info v1-1) penetrate-using) + ) + ) + (enemy-event-handler proc argc message block) + (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)) + ) + ) + ) + ) + ) + #f + ) + (('touch 'bonk) + (if (and (< (-> self which-trajectory) 2) (= proc *target*)) + (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)) + ) + ) + ) + (event-handler self proc argc message block) + ) + #t + ) + (('set-dest) + (let ((s5-0 (the-as object (-> block param 0))) + (gp-0 (the-as object (-> block param 1))) + ) + (let ((f30-0 (the-as float (-> block param 2))) + (f28-0 (the-as float (-> block param 3))) + ) + (if (< (-> (the-as vector s5-0) y) (-> (the-as vector gp-0) y)) + (+! f30-0 (- (-> (the-as vector gp-0) y) (-> (the-as vector s5-0) y))) + ) + (let ((f0-15 (* 0.0000061035157 (vector-vector-xz-distance (the-as vector s5-0) (the-as vector gp-0)) f28-0))) + (setup-from-to-duration-and-height! (-> self traj) (the-as vector s5-0) (the-as vector gp-0) f0-15 f30-0) + ) + ) + (let ((v1-27 (new 'stack-no-clear 'vector))) + (vector-! v1-27 (the-as vector gp-0) (the-as vector s5-0)) + (set! (-> v1-27 y) 0.0) + (let ((f30-1 (atan (-> v1-27 x) (-> v1-27 z)))) + (quaternion-set! (-> self root quat) 0.0 (sin (* 0.5 f30-1)) 0.0 (cos (* 0.5 f30-1))) + ) + ) + (set! (-> self which-trajectory) 0) + (set! (-> self x-rotate) 0.0) + (set! (-> self y-rotate) 0.0) + (set! (-> self root trans quad) (-> (the-as vector s5-0) quad)) + (set! (-> self launch-pos quad) (-> (the-as vector s5-0) quad)) + (set! (-> self launch quad) (-> (the-as vector s5-0) quad)) + (let* ((v1-36 (-> self nav)) + (f0-25 (-> v1-36 extra-nav-sphere w)) + ) + (set! (-> v1-36 extra-nav-sphere quad) (-> (the-as vector gp-0) quad)) + (set! (-> v1-36 extra-nav-sphere w) f0-25) + ) + ) + 0 + (let ((v1-39 (-> self nav))) + (set! (-> v1-39 extra-nav-sphere w) 16384.0) + ) + 0 + (let ((v1-41 (-> self nav))) + (logior! (-> v1-41 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + ) + (else + (if (> (-> self which-trajectory) 0) + (event-handler self proc argc message block) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (ja :group! (-> self draw art-group data 12) :num! min) + ) + :exit (behavior () + (quaternion-identity! (-> self spin-jm quat)) + (let ((v1-1 (-> self nav))) + (logclear! (-> v1-1 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + ) + :trans (behavior () + (let ((v1-0 (-> self which-trajectory))) + (cond + ((zero? v1-0) + (sound-play "launch-trail" :id (-> self trail-sound) :position (-> self root trans)) + (logior! (-> self flags) (eco-creature-flag ecf4)) + (+! (-> self x-rotate) 4369.067) + (+! (-> self y-rotate) 3458.8445) + ) + ((= v1-0 1) + (when (logtest? (-> self flags) (eco-creature-flag ecf4)) + (sound-stop (-> self trail-sound)) + (logclear! (-> self flags) (eco-creature-flag ecf4)) + ) + (+! (-> self x-rotate) 7281.778) + (set! (-> self y-rotate) 0.0) + ) + (else + (seek! (-> self x-rotate) 65353.957 7281.778) + ) + ) + ) + (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 spin-jm quat) gp-0 s5-0)) + ) + (cond + ((time-elapsed? (-> self state-time) (the int (-> self traj time))) + (let ((v1-34 (-> self which-trajectory))) + (cond + ((zero? v1-34) + (set! (-> self which-trajectory) 1) + (sound-play "caveco-land" :position (-> self root trans)) + (compute-trans-at-time + (-> self traj) + (fmin (-> self traj time) (the float (- (current-time) (-> self state-time)))) + (-> self root trans) + ) + (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)) + (setup-from-to-duration-and-height! (-> self traj) (-> self root trans) gp-3 75.0 4096.0) + ) + ) + ((= v1-34 1) + (set! (-> self which-trajectory) 2) + (compute-trans-at-time + (-> self traj) + (fmin (-> self traj time) (the float (- (current-time) (-> self state-time)))) + (-> self root trans) + ) + (set-time! (-> self state-time)) + (let ((gp-5 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (the-as vector (-> self traj))))) + (set! (-> gp-5 y) 0.0) + (vector-normalize! gp-5 4096.0) + (vector+! gp-5 gp-5 (-> self root trans)) + (setup-from-to-duration-and-height! (-> self traj) (-> self root trans) gp-5 37.5 1024.0) + ) + ) + ((= v1-34 2) + (compute-trans-at-time + (-> self traj) + (fmin (-> self traj time) (the float (- (current-time) (-> self state-time)))) + (-> self root trans) + ) + (set! (-> self which-trajectory) 3) + (let* ((gp-6 (-> self state-time)) + (f30-0 300.0) + (v1-76 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-77 (the-as number (logior #x3f800000 v1-76))) + ) + (set! (-> self state-time) (+ gp-6 (the int (* f30-0 (+ -1.0 (the-as float v1-77)))))) + ) + ) + (else + (go-virtual unfold) + ) + ) + ) + ) + ((< (-> self which-trajectory) 3) + (compute-trans-at-time + (-> self traj) + (fmin (-> self traj time) (the float (- (current-time) (-> self state-time)))) + (-> self root trans) + ) + (if (logtest? (-> self flags) (eco-creature-flag ecf3)) + (spawn-from-cspace (-> self trail-part) (-> self node-list data 3)) + ) + ) + ) + (ja :num! (loop! 0.2)) + ) + :code sleep-code + :post (behavior () + (transform-post) + (logior! (-> self flags) (eco-creature-flag ecf3)) + (do-push-aways (-> self root)) + ) + ) + +(defmethod go-idle2 ((this prebot-large-eco-creature)) + (set! (-> this event-hook) (-> (method-of-object this fly-to-dest) event)) + (go (method-of-object this fly-to-dest)) + ) + +(defmethod init-enemy-collision! ((this prebot-large-eco-creature)) + (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 16) 0))) + (set! (-> s5-0 total-prims) (the-as uint 17)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd jak bot hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid deadly)) + (set! (-> s4-0 transform-index) 26) + (set-vector! (-> s4-0 local-sphere) 1076.4288 -3118.6943 2700.0833 18061.312) + (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)) + (set! (-> v1-14 prim-core action) (collide-action solid)) + (set-vector! (-> v1-14 local-sphere) 0.0 5734.4 0.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 enemy)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid deadly)) + (set! (-> v1-16 transform-index) 3) + (set-vector! (-> v1-16 local-sphere) 0.0 0.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 bot hit-by-others-list player-list)) + (set! (-> v1-18 prim-core action) (collide-action solid deadly)) + (set! (-> v1-18 transform-index) 4) + (set-vector! (-> v1-18 local-sphere) -26.2144 -2495.2832 378.88 4096.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 hit-by-others-list player-list)) + (set! (-> v1-20 prim-core action) (collide-action solid deadly)) + (set! (-> v1-20 transform-index) 6) + (set-vector! (-> v1-20 local-sphere) -32.3584 281.8048 1412.7104 2940.109) + ) + (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 hit-by-others-list player-list)) + (set! (-> v1-22 prim-core action) (collide-action solid deadly)) + (set! (-> v1-22 transform-index) 9) + (set-vector! (-> v1-22 local-sphere) -12.288 84.3776 -2.4576 2387.5583) + ) + (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 hit-by-others-list player-list)) + (set! (-> v1-24 prim-core action) (collide-action solid deadly)) + (set! (-> v1-24 transform-index) 10) + (set-vector! (-> v1-24 local-sphere) 178.5856 -1004.3392 81.5104 2358.4768) + ) + (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 hit-by-others-list player-list)) + (set! (-> v1-26 prim-core action) (collide-action solid deadly)) + (set! (-> v1-26 transform-index) 18) + (set-vector! (-> v1-26 local-sphere) 0.0 0.0 0.0 2896.6912) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-28 prim-core action) (collide-action solid deadly)) + (set! (-> v1-28 transform-index) 19) + (set-vector! (-> v1-28 local-sphere) -130.2528 1489.7152 -119.1936 2784.8704) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-30 prim-core action) (collide-action solid deadly)) + (set! (-> v1-30 transform-index) 28) + (set-vector! (-> v1-30 local-sphere) 0.0 0.0 0.0 2600.5503) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-32 prim-core action) (collide-action solid deadly)) + (set! (-> v1-32 transform-index) 29) + (set-vector! (-> v1-32 local-sphere) 0.0 0.0 0.0 2296.6272) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-34 prim-core action) (collide-action solid deadly)) + (set! (-> v1-34 transform-index) 30) + (set-vector! (-> v1-34 local-sphere) 82.7392 -43.008 -394.0352 1869.824) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-36 prim-core action) (collide-action solid deadly)) + (set! (-> v1-36 transform-index) 31) + (set-vector! (-> v1-36 local-sphere) 151.9616 0.0 -608.256 1713.3568) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-38 prim-core action) (collide-action solid deadly)) + (set! (-> v1-38 transform-index) 33) + (set-vector! (-> v1-38 local-sphere) -1664.2048 -741.7856 -648.8064 3235.4304) + ) + (let ((v1-40 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-40 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-40 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-40 prim-core action) (collide-action solid deadly)) + (set! (-> v1-40 transform-index) 35) + (set-vector! (-> v1-40 local-sphere) 1078.4768 509.1328 511.1808 3509.8623) + ) + (let ((v1-42 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-42 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-42 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-42 prim-core action) (collide-action solid deadly)) + (set! (-> v1-42 transform-index) 37) + (set-vector! (-> v1-42 local-sphere) 791.7568 571.8016 355.9424 3460.3008) + ) + (let ((v1-44 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-44 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-44 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-44 prim-core action) (collide-action solid deadly)) + (set! (-> v1-44 transform-index) 39) + (set-vector! (-> v1-44 local-sphere) -593.1008 -499.712 -635.6992 3313.2544) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (let ((v1-46 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-46 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-46 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod relocate ((this prebot-large-eco-creature) (offset int)) + (if (nonzero? (-> this spin-jm)) + (&+! (-> this spin-jm) offset) + ) + (if (nonzero? (-> this trail-part)) + (&+! (-> this trail-part) offset) + ) + (call-parent-method this offset) + ) + +(defmethod deactivate ((this prebot-large-eco-creature)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this trail-part)) + (kill-particles (-> this trail-part)) + ) + (when (logtest? (-> this flags) (eco-creature-flag ecf4)) + (sound-stop (-> this trail-sound)) + (logclear! (-> this flags) (eco-creature-flag ecf4)) + ) + (call-parent-method this) + (none) + ) + +(defmethod init-enemy! ((this prebot-large-eco-creature)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-cav-eco-lg" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *prebot-large-eco-creature-nav-enemy-info*) + (logior! (-> this draw global-effect) (draw-control-global-effect rim-lights2)) + (let ((v1-8 (-> this neck))) + (set! (-> v1-8 up) (the-as uint 1)) + (set! (-> v1-8 nose) (the-as uint 2)) + (set! (-> v1-8 ear) (the-as uint 0)) + (set-vector! (-> v1-8 twist-max) 3640.889 11832.889 0.0 1.0) + (set! (-> v1-8 ignore-angle) 15473.777) + ) + (let ((v1-10 (-> this nav))) + (set! (-> v1-10 speed-scale) 1.0) + ) + 0 + (set-gravity-length (-> this root dynam) 573440.0) + (logior! (-> this nav flags) (nav-control-flag momentum-ignore-heading)) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (logior! (-> this focus-status) (focus-status dangerous)) + (logior! (-> this enemy-flags) (enemy-flag dangerous-backup)) + (set! (-> this attack-anims) (new 'static 'boxed-array :type int32 8 9)) + (set! (-> this victory-anims) (new 'static 'boxed-array :type int32 10 11)) + (set! (-> this turn-left-anim) 6) + (set! (-> this turn-right-anim) 7) + (set! (-> this split-type) prebot-medium-eco-creature) + (set! (-> this attack-stop-frame) 0.0) + (set! (-> this which-trajectory) 0) + (set! (-> this spin-jm) (new 'process 'joint-mod (joint-mod-mode joint-set*) this 3)) + (set! (-> this trail-part) (create-launch-control (-> *part-group-id-table* 440) this)) + (set! (-> this flags) (eco-creature-flag)) + (set! (-> this trail-sound) (new-sound-id)) + (send-event (ppointer->process (-> this parent)) 'start-critter) + 0 + (none) + ) + +(deftype prebot-medium-eco-creature (prebot-large-eco-creature) + ((is-top basic) + (is-bottom basic) + (initial-scale float) + (final-scale float) + ) + (:methods + (prebot-medium-eco-creature-method-196 (_type_) none) + (prebot-medium-eco-creature-method-197 (_type_) none) + ) + ) + + +(defbehavior large-eco-creature-split prebot-large-eco-creature () + (sound-play "caveco-spawn" :position (-> self root trans)) + (let ((gp-1 (new 'stack-no-clear 'enemy-init-by-other-params))) + (let ((v1-2 (new 'stack-no-clear 'vector))) + (-> self root transv) + (set! (-> v1-2 quad) (-> self root trans quad)) + (set! (-> gp-1 trans quad) (-> v1-2 quad)) + ) + (quaternion-copy! (-> gp-1 quat) (-> self root quat)) + (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) (-> 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))) + (t9-4 s5-1 self "eco-creature" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-1 enemy-init-by-other self gp-1) + (-> s5-1 ppointer) + ) + ) + ) + (when v1-9 + (set-vector! + (-> (the-as (pointer prebot-medium-eco-creature) v1-9) 0 incoming attack-direction) + (-> self incoming attack-direction z) + (-> self incoming attack-direction y) + (- (-> self incoming attack-direction x)) + 1.0 + ) + (set! (-> (the-as (pointer prebot-medium-eco-creature) v1-9) 0 incoming knocked-type) + (knocked-type blue-shot) + ) + (if (logtest? (-> self flags) (eco-creature-flag ecf2)) + (set! (-> (the-as prebot-medium-eco-creature (-> (the-as (pointer prebot-medium-eco-creature) v1-9) 0)) flags) + (logior (-> (the-as prebot-large-eco-creature (-> (the-as (pointer prebot-medium-eco-creature) v1-9) 0)) flags) + (eco-creature-flag ecf2) + ) + ) + (logclear! + (-> (the-as prebot-medium-eco-creature (-> (the-as (pointer prebot-medium-eco-creature) v1-9) 0)) flags) + (eco-creature-flag ecf2) + ) + ) + (prebot-medium-eco-creature-method-196 + (the-as prebot-medium-eco-creature (-> (the-as (pointer prebot-medium-eco-creature) v1-9) 0)) + ) + ) + ) + (let* ((s5-2 (get-process *default-dead-pool* (-> self split-type) #x4000 1)) + (v1-13 (when s5-2 + (let ((t9-8 (method-of-type process activate))) + (t9-8 s5-2 self "eco-creature" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-2 enemy-init-by-other self gp-1) + (-> s5-2 ppointer) + ) + ) + ) + (when v1-13 + (set-vector! + (-> (the-as (pointer prebot-medium-eco-creature) v1-13) 0 incoming attack-direction) + (- (-> self incoming attack-direction z)) + (-> self incoming attack-direction y) + (-> self incoming attack-direction x) + 1.0 + ) + (set! (-> (the-as (pointer prebot-medium-eco-creature) v1-13) 0 incoming knocked-type) + (knocked-type blue-shot) + ) + (if (logtest? (-> self flags) (eco-creature-flag ecf2)) + (logior! + (-> (the-as prebot-medium-eco-creature (-> (the-as (pointer prebot-medium-eco-creature) v1-13) 0)) flags) + (eco-creature-flag ecf2) + ) + (logclear! + (-> (the-as prebot-medium-eco-creature (-> (the-as (pointer prebot-medium-eco-creature) v1-13) 0)) flags) + (eco-creature-flag ecf2) + ) + ) + (prebot-medium-eco-creature-method-197 + (the-as prebot-medium-eco-creature (-> (the-as (pointer prebot-medium-eco-creature) v1-13) 0)) + ) + ) + ) + ) + (prebot-large-eco-creature-method-195 self) + 0 + (none) + ) + +(define *prebot-medium-eco-creature-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 2 + :notice-anim 2 + :hostile-anim 15 + :hit-anim 2 + :knocked-anim 2 + :knocked-land-anim 2 + :die-anim 2 + :die-falling-anim 2 + :victory-anim 2 + :jump-wind-up-anim 2 + :jump-in-air-anim 2 + :jump-land-anim 2 + :neck-joint 5 + :look-at-joint 5 + :bullseye-joint 4 + :notice-distance (meters 200) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 20) + :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) + :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 49152.0 + :knocked-red-vy-lo 57344.0 + :knocked-red-vy-hi 69632.0 + :knocked-blue-vxz-lo 32768.0 + :knocked-blue-vxz-hi 40960.0 + :knocked-blue-vy-lo 20480.0 + :knocked-blue-vy-hi 53248.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 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 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 10.176285) + :geo-tform (new 'static 'vector :x 1.0 :w 35404.914) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 8223.438) + :geo-tform (new 'static 'vector :x 1.0 :w 27181.492) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 14248.819) + :geo-tform (new 'static 'vector :x -1.0 :w 10623.986) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 12262.859) + :geo-tform (new 'static 'vector :x 1.0 :w 33438.652) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.137 :z -0.9905 :w 11373.791) + :geo-tform (new 'static 'vector :x 0.2271 :y 0.9734 :z 0.0279 :w 36639.176) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5102 :z -0.86 :w 20530.754) + :geo-tform (new 'static 'vector :x 0.409 :y -0.0529 :z 0.9109 :w 32271.676) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6644 :z -0.7473 :w 1968.9199) + :geo-tform (new 'static 'vector :x 0.4093 :y 0.033 :z 0.9117 :w 33077.91) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9613 :z -0.2752 :w 2214.5525) + :geo-tform (new 'static 'vector :x 0.4059 :y -0.0481 :z 0.9126 :w 34502.54) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5153 :z 0.8569 :w 2080.0034) + :geo-tform (new 'static 'vector :x 0.4027 :y -0.0356 :z 0.9146 :w 32440.574) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint 10 + :pre-tform (new 'static 'vector :x 0.4859 :z 0.8739 :w 3273.5598) + :geo-tform (new 'static 'vector :x 0.414 :y 0.0464 :z 0.909 :w 29818.152) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8326 :z -0.5538 :w 3106.5886) + :geo-tform (new 'static 'vector :x 0.419 :y -0.032 :z 0.9073 :w 32459.652) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint 10 + :pre-tform (new 'static 'vector :x -0.9421 :z -0.3352 :w 6646.0605) + :geo-tform (new 'static 'vector :x 0.3914 :y -0.2 :z 0.8982 :w 37623.16) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3413 :z -0.9399 :w 1832.5868) + :geo-tform (new 'static 'vector :x 0.4204 :y -0.1424 :z 0.896 :w 38915.023) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.1371 :z 0.9905 :w 11369.786) + :geo-tform (new 'static 'vector :x -0.2272 :y 0.9734 :z 0.0279 :w 28896.426) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5101 :z 0.86 :w 20534.176) + :geo-tform (new 'static 'vector :x -0.026 :y 0.9979 :z 0.0579 :w 23979.531) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6645 :z 0.7472 :w 1958.0337) + :geo-tform (new 'static 'vector :x 0.016 :y 0.9992 :z -0.0358 :w 23969.791) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9615 :z 0.2744 :w 2230.645) + :geo-tform (new 'static 'vector :x 0.0911 :y 0.9943 :z 0.0536 :w 24079.475) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5098 :z -0.8602 :w 2098.3352) + :geo-tform (new 'static 'vector :x -0.0178 :y 0.999 :z 0.0406 :w 24125.459) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint 19 + :pre-tform (new 'static 'vector :x 0.4819 :z -0.8762 :w 3256.2107) + :geo-tform (new 'static 'vector :x -0.1538 :y 0.9868 :z -0.0491 :w 23956.574) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8364 :z 0.548 :w 3087.583) + :geo-tform (new 'static 'vector :x -0.017 :y 0.9991 :z 0.0369 :w 23745.531) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint 19 + :pre-tform (new 'static 'vector :x -0.9425 :z 0.3339 :w 6655.1807) + :geo-tform (new 'static 'vector :x 0.2492 :y 0.945 :z 0.2115 :w 24615.268) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3403 :z 0.9402 :w 1852.0657) + :geo-tform (new 'static 'vector :x 0.3178 :y 0.9363 :z 0.1493 :w 24121.836) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -1.0 :w 20948.764) + :geo-tform (new 'static 'vector :x -1.0 :w 9182.285) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9999 :z 0.0068 :w 7387.509) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.003 :z -0.0014 :w 16198.405) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9697 :z -0.244 :w 191.6382) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint -1 + :pre-tform (new 'static 'vector :y -1.0 :w 10.176285) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint -1 + :pre-tform (new 'static 'vector :y -1.0 :w 10.176285) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint -1 + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint 26 + :pre-tform (new 'static 'vector :x -0.4854 :z -0.8742 :w 21186.406) + :geo-tform (new 'static 'vector :x 0.6599 :y 0.6796 :z 0.3201 :w 35879.65) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9993 :z 0.0363 :w 2717.3774) + :geo-tform (new 'static 'vector :x 0.6708 :y 0.7057 :z 0.2277 :w 34044.242) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint 26 + :pre-tform (new 'static 'vector :x 0.3584 :z -0.9335 :w 11286.792) + :geo-tform (new 'static 'vector :x -0.4444 :y 0.7119 :z -0.5437 :w 28463.65) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1147 :z -0.9933 :w 2024.0066) + :geo-tform (new 'static 'vector :x -0.5154 :y 0.6809 :z -0.5201 :w 27281.908) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 36 + :parent-joint 26 + :pre-tform (new 'static 'vector :x -0.4859 :z 0.8739 :w 21191.012) + :geo-tform (new 'static 'vector :x 0.1968 :y 0.4177 :z -0.8869 :w 17933.508) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 37 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9993 :z -0.0361 :w 2729.0828) + :geo-tform (new 'static 'vector :x 0.0825 :y 0.3055 :z -0.9485 :w 17459.846) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 38 + :parent-joint 26 + :pre-tform (new 'static 'vector :x 0.3588 :z 0.9333 :w 11281.3125) + :geo-tform (new 'static 'vector :x 0.2273 :y 0.5912 :z 0.7738 :w 23386.34) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 39 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1145 :z 0.9934 :w 2026.6462) + :geo-tform (new 'static 'vector :x 0.2996 :y 0.5792 :z 0.758 :w 21904.426) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + ) + ) + :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 #t + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 15 + :turn-anim -1 + :run-anim 15 + :taunt-anim -1 + :run-travel-speed (meters 5) + :run-acceleration (meters 32) + :run-turning-acceleration (meters 40) + :walk-travel-speed (meters 5) + :walk-acceleration (meters 16) + :walk-turning-acceleration (meters 40) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 3) + :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! (-> *prebot-medium-eco-creature-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defun prebot-eco-creature-joint-callback ((arg0 cspace) (arg1 transformq)) + (when (and (= (the-as float (-> arg0 param1)) 1.0) (= (-> arg0 param0) prebot-eco-creature-joint-callback)) + (let ((a2-1 arg0)) + (set! (-> a2-1 param0) cspace<-parented-transformq-joint!) + ) + ) + (set-vector! + (-> arg1 scale) + (the-as float (-> arg0 param1)) + (the-as float (-> arg0 param1)) + (the-as float (-> arg0 param1)) + 1.0 + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (none) + ) + +(defmethod prebot-medium-eco-creature-method-196 ((this prebot-medium-eco-creature)) + (set! (-> this is-top) (the-as basic #t)) + (let ((v1-2 (-> this node-list data 32))) + (set! (-> v1-2 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-2 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-4 (-> this node-list data 33))) + (set! (-> v1-4 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-4 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-6 (-> this node-list data 36))) + (set! (-> v1-6 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-6 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-8 (-> this node-list data 37))) + (set! (-> v1-8 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-8 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-10 (-> this node-list data 34))) + (set! (-> v1-10 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-10 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-12 (-> this node-list data 35))) + (set! (-> v1-12 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-12 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-14 (-> this node-list data 38))) + (set! (-> v1-14 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-14 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-16 (-> this node-list data 39))) + (set! (-> v1-16 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-16 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-18 (-> this node-list data 27))) + (set! (-> v1-18 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-18 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-20 (-> this node-list data 28))) + (set! (-> v1-20 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-20 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-22 (-> this node-list data 29))) + (set! (-> v1-22 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-22 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-24 (-> this node-list data 30))) + (set! (-> v1-24 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-24 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-26 (-> this node-list data 31))) + (set! (-> v1-26 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-26 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-28 (-> this node-list data 26))) + (set! (-> v1-28 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-28 param1) (the-as basic #x3e99999a)) + ) + 0 + (none) + ) + +(defmethod prebot-medium-eco-creature-method-197 ((this prebot-medium-eco-creature)) + (set! (-> this is-bottom) (the-as basic #t)) + (let ((v1-2 (-> this node-list data 4))) + (set! (-> v1-2 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-2 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-4 (-> this node-list data 5))) + (set! (-> v1-4 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-4 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-6 (-> this node-list data 6))) + (set! (-> v1-6 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-6 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-8 (-> this node-list data 7))) + (set! (-> v1-8 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-8 param1) (the-as basic #x3d23d70a)) + ) + 0 + (none) + ) + +(defmethod go-idle2 ((this prebot-medium-eco-creature)) + (set-vector! (-> this root scale) (-> this initial-scale) (-> this initial-scale) (-> this initial-scale) 1.0) + (go (method-of-object this knocked)) + ) + +(defmethod init-enemy-collision! ((this prebot-medium-eco-creature)) + (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 12) 0))) + (set! (-> s5-0 total-prims) (the-as uint 13)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd jak bot hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid deadly)) + (set! (-> s4-0 transform-index) 26) + (set-vector! (-> s4-0 local-sphere) 532.48 -1556.48 1310.72 9011.2) + (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)) + (set! (-> v1-14 prim-core action) (collide-action solid)) + (set-vector! (-> v1-14 local-sphere) 0.0 2867.2 0.0 4096.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 bot hit-by-others-list player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid deadly)) + (set! (-> v1-16 transform-index) 3) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 0.0 2048.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 hit-by-others-list player-list)) + (set! (-> v1-18 prim-core action) (collide-action solid deadly)) + (set! (-> v1-18 transform-index) 4) + (set-vector! (-> v1-18 local-sphere) 0.0 -1228.8 204.8 2048.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 hit-by-others-list player-list)) + (set! (-> v1-20 prim-core action) (collide-action solid deadly)) + (set! (-> v1-20 transform-index) 6) + (set-vector! (-> v1-20 local-sphere) 0.0 163.84 696.32 1474.56) + ) + (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 hit-by-others-list player-list)) + (set! (-> v1-22 prim-core action) (collide-action solid deadly)) + (set! (-> v1-22 transform-index) 28) + (set-vector! (-> v1-22 local-sphere) 0.0 0.0 0.0 1269.76) + ) + (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 hit-by-others-list player-list)) + (set! (-> v1-24 prim-core action) (collide-action solid deadly)) + (set! (-> v1-24 transform-index) 29) + (set-vector! (-> v1-24 local-sphere) 0.0 0.0 0.0 1146.88) + ) + (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 hit-by-others-list player-list)) + (set! (-> v1-26 prim-core action) (collide-action solid deadly)) + (set! (-> v1-26 transform-index) 30) + (set-vector! (-> v1-26 local-sphere) 40.96 0.0 -204.8 942.08) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-28 prim-core action) (collide-action solid deadly)) + (set! (-> v1-28 transform-index) 31) + (set-vector! (-> v1-28 local-sphere) 81.92 0.0 -286.72 860.16) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-30 prim-core action) (collide-action solid deadly)) + (set! (-> v1-30 transform-index) 33) + (set-vector! (-> v1-30 local-sphere) -819.2 -368.64 -327.68 1597.44) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-32 prim-core action) (collide-action solid deadly)) + (set! (-> v1-32 transform-index) 35) + (set-vector! (-> v1-32 local-sphere) 532.48 245.76 245.76 1761.28) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-34 prim-core action) (collide-action solid deadly)) + (set! (-> v1-34 transform-index) 37) + (set-vector! (-> v1-34 local-sphere) 368.64 286.72 163.84 1720.32) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-36 prim-core action) (collide-action solid deadly)) + (set! (-> v1-36 transform-index) 39) + (set-vector! (-> v1-36 local-sphere) -286.72 -245.76 -327.68 1638.4) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (let ((v1-38 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-38 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-38 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod init-enemy! ((this prebot-medium-eco-creature)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-cav-eco-lg" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *prebot-medium-eco-creature-nav-enemy-info*) + (logior! (-> this draw global-effect) (draw-control-global-effect rim-lights2)) + (let ((v1-8 (-> this neck))) + (set! (-> v1-8 up) (the-as uint 1)) + (set! (-> v1-8 nose) (the-as uint 2)) + (set! (-> v1-8 ear) (the-as uint 0)) + (set-vector! (-> v1-8 twist-max) 3640.889 11832.889 0.0 1.0) + (set! (-> v1-8 ignore-angle) 15473.777) + ) + (let ((v1-10 (-> this nav))) + (set! (-> v1-10 speed-scale) 1.0) + ) + 0 + (set-gravity-length (-> this root dynam) 573440.0) + (logior! (-> this nav flags) (nav-control-flag momentum-ignore-heading)) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (logior! (-> this focus-status) (focus-status dangerous)) + (logior! (-> this enemy-flags) (enemy-flag dangerous-backup)) + (set! (-> this attack-anims) (new 'static 'boxed-array :type int32 14)) + (set! (-> this victory-anims) (new 'static 'boxed-array :type int32 10 11)) + (set! (-> this turn-left-anim) 6) + (set! (-> this turn-right-anim) 7) + (setup-masks (-> this draw) 0 2) + (set! (-> this is-top) #f) + (set! (-> this is-bottom) #f) + (set! (-> this initial-scale) 1.0) + (set! (-> this final-scale) 0.6) + (set! (-> this split-type) prebot-small-eco-creature) + (set! (-> this attack-stop-frame) 7.0) + (when (type? this medium-eco-creature-launched) + (set! (-> this spin-jm) (new 'process 'joint-mod (joint-mod-mode joint-set*) this 3)) + (set! (-> this trail-part) (create-launch-control (-> *part-group-id-table* 440) this)) + (logclear! (-> this flags) (eco-creature-flag ecf3)) + ) + (set! (-> this flags) (eco-creature-flag)) + (send-event (ppointer->process (-> this parent)) 'start-critter) + 0 + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defbehavior adjust-split-joints prebot-medium-eco-creature () + (cond + ((-> self is-top) + (let ((f0-2 (lerp-scale (-> self initial-scale) (-> self final-scale) (ja-aframe-num 0) 3.0 8.0))) + (set-vector! (-> self root scale) f0-2 f0-2 f0-2 1.0) + ) + (let ((f0-4 (lerp-scale 0.04 1.0 (ja-aframe-num 0) 2.0 7.0))) + (set! (-> self node-list data 32 param1) (the-as basic f0-4)) + (set! (-> self node-list data 33 param1) (the-as basic f0-4)) + (set! (-> self node-list data 36 param1) (the-as basic f0-4)) + (set! (-> self node-list data 37 param1) (the-as basic f0-4)) + (set! (-> self node-list data 34 param1) (the-as basic f0-4)) + (set! (-> self node-list data 35 param1) (the-as basic f0-4)) + (set! (-> self node-list data 38 param1) (the-as basic f0-4)) + (set! (-> self node-list data 39 param1) (the-as basic f0-4)) + (set! (-> self node-list data 27 param1) (the-as basic f0-4)) + (set! (-> self node-list data 28 param1) (the-as basic f0-4)) + (set! (-> self node-list data 29 param1) (the-as basic f0-4)) + (set! (-> self node-list data 30 param1) (the-as basic f0-4)) + (set! (-> self node-list data 31 param1) (the-as basic f0-4)) + (set! (-> self node-list data 26 param1) (the-as basic f0-4)) + ) + ) + (else + (let ((f0-7 (lerp-scale (-> self initial-scale) (-> self final-scale) (ja-aframe-num 0) 4.0 8.0))) + (set-vector! (-> self root scale) f0-7 f0-7 f0-7 1.0) + ) + (let ((f0-9 (lerp-scale 0.04 1.0 (ja-aframe-num 0) 3.0 7.0))) + (set! (-> self node-list data 4 param1) (the-as basic f0-9)) + (set! (-> self node-list data 5 param1) (the-as basic f0-9)) + (set! (-> self node-list data 6 param1) (the-as basic f0-9)) + (set! (-> self node-list data 7 param1) (the-as basic f0-9)) + ) + ) + ) + (none) + ) + +(defstate knocked-recover (prebot-medium-eco-creature) + :virtual #t + :code (behavior () + (cond + ((or (-> self is-top) (-> self is-bottom)) + (let ((gp-0 (if (-> self is-top) + (-> self draw art-group data 4) + (-> self draw art-group data 5) + ) + ) + ) + (cond + ((handle->process (-> self ragdoll-proc)) + (ja-channel-push! 1 0) + (ja-no-eval :group! gp-0 :num! (seek!) :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!)) + (adjust-split-joints) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! gp-0 :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (adjust-split-joints) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + (set! (-> self is-top) #f) + (set! (-> self is-bottom) #f) + (if (enemy-method-109 self) + (go-die self) + (go-hostile self) + ) + ) + (else + (let ((t9-14 (-> (method-of-type prebot-large-eco-creature knocked-recover) code))) + (if t9-14 + ((the-as (function none) t9-14)) + ) + ) + ) + ) + ) + ) + +(deftype prebot-small-eco-creature (prebot-medium-eco-creature) + () + ) + + +(define *prebot-small-eco-creature-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 2 + :notice-anim 2 + :hostile-anim 19 + :hit-anim 2 + :knocked-anim 2 + :knocked-land-anim 2 + :die-anim 2 + :die-falling-anim 2 + :victory-anim 2 + :jump-wind-up-anim 2 + :jump-in-air-anim 2 + :jump-land-anim 2 + :neck-joint 5 + :look-at-joint 5 + :bullseye-joint 4 + :sound-die (static-sound-name "caveco-death") + :notice-distance (meters 200) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 20) + :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 32768.0 + :knocked-red-vxz-hi 57344.0 + :knocked-red-vy-lo 65536.0 + :knocked-red-vy-hi 77824.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 61440.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 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 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 10.176285) + :geo-tform (new 'static 'vector :x 1.0 :w 35404.914) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 8223.438) + :geo-tform (new 'static 'vector :x 1.0 :w 27181.492) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 14248.819) + :geo-tform (new 'static 'vector :x -1.0 :w 10623.986) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 12262.859) + :geo-tform (new 'static 'vector :x 1.0 :w 33438.652) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.137 :z -0.9905 :w 11373.791) + :geo-tform (new 'static 'vector :x 0.2271 :y 0.9734 :z 0.0279 :w 36639.176) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5102 :z -0.86 :w 20530.754) + :geo-tform (new 'static 'vector :x 0.409 :y -0.0529 :z 0.9109 :w 32271.676) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6644 :z -0.7473 :w 1968.9199) + :geo-tform (new 'static 'vector :x 0.4093 :y 0.033 :z 0.9117 :w 33077.91) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9613 :z -0.2752 :w 2214.5525) + :geo-tform (new 'static 'vector :x 0.4059 :y -0.0481 :z 0.9126 :w 34502.54) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5153 :z 0.8569 :w 2080.0034) + :geo-tform (new 'static 'vector :x 0.4027 :y -0.0356 :z 0.9146 :w 32440.574) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint 10 + :pre-tform (new 'static 'vector :x 0.4859 :z 0.8739 :w 3273.5598) + :geo-tform (new 'static 'vector :x 0.414 :y 0.0464 :z 0.909 :w 29818.152) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8326 :z -0.5538 :w 3106.5886) + :geo-tform (new 'static 'vector :x 0.419 :y -0.032 :z 0.9073 :w 32459.652) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint 10 + :pre-tform (new 'static 'vector :x -0.9421 :z -0.3352 :w 6646.0605) + :geo-tform (new 'static 'vector :x 0.3914 :y -0.2 :z 0.8982 :w 37623.16) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3413 :z -0.9399 :w 1832.5868) + :geo-tform (new 'static 'vector :x 0.4204 :y -0.1424 :z 0.896 :w 38915.023) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.1371 :z 0.9905 :w 11369.786) + :geo-tform (new 'static 'vector :x -0.2272 :y 0.9734 :z 0.0279 :w 28896.426) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5101 :z 0.86 :w 20534.176) + :geo-tform (new 'static 'vector :x -0.026 :y 0.9979 :z 0.0579 :w 23979.531) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6645 :z 0.7472 :w 1958.0337) + :geo-tform (new 'static 'vector :x 0.016 :y 0.9992 :z -0.0358 :w 23969.791) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9615 :z 0.2744 :w 2230.645) + :geo-tform (new 'static 'vector :x 0.0911 :y 0.9943 :z 0.0536 :w 24079.475) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5098 :z -0.8602 :w 2098.3352) + :geo-tform (new 'static 'vector :x -0.0178 :y 0.999 :z 0.0406 :w 24125.459) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint 19 + :pre-tform (new 'static 'vector :x 0.4819 :z -0.8762 :w 3256.2107) + :geo-tform (new 'static 'vector :x -0.1538 :y 0.9868 :z -0.0491 :w 23956.574) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8364 :z 0.548 :w 3087.583) + :geo-tform (new 'static 'vector :x -0.017 :y 0.9991 :z 0.0369 :w 23745.531) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint 19 + :pre-tform (new 'static 'vector :x -0.9425 :z 0.3339 :w 6655.1807) + :geo-tform (new 'static 'vector :x 0.2492 :y 0.945 :z 0.2115 :w 24615.268) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3403 :z 0.9402 :w 1852.0657) + :geo-tform (new 'static 'vector :x 0.3178 :y 0.9363 :z 0.1493 :w 24121.836) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -1.0 :w 20948.764) + :geo-tform (new 'static 'vector :x -1.0 :w 9182.285) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9999 :z 0.0068 :w 7387.509) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.003 :z -0.0014 :w 16198.405) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9697 :z -0.244 :w 191.6382) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint -1 + :pre-tform (new 'static 'vector :y -1.0 :w 10.176285) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint -1 + :pre-tform (new 'static 'vector :y -1.0 :w 10.176285) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint -1 + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint 26 + :pre-tform (new 'static 'vector :x -0.4854 :z -0.8742 :w 21186.406) + :geo-tform (new 'static 'vector :x 0.6599 :y 0.6796 :z 0.3201 :w 35879.65) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9993 :z 0.0363 :w 2717.3774) + :geo-tform (new 'static 'vector :x 0.6708 :y 0.7057 :z 0.2277 :w 34044.242) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint 26 + :pre-tform (new 'static 'vector :x 0.3584 :z -0.9335 :w 11286.792) + :geo-tform (new 'static 'vector :x -0.4444 :y 0.7119 :z -0.5437 :w 28463.65) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1147 :z -0.9933 :w 2024.0066) + :geo-tform (new 'static 'vector :x -0.5154 :y 0.6809 :z -0.5201 :w 27281.908) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 36 + :parent-joint 26 + :pre-tform (new 'static 'vector :x -0.4859 :z 0.8739 :w 21191.012) + :geo-tform (new 'static 'vector :x 0.1968 :y 0.4177 :z -0.8869 :w 17933.508) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 37 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9993 :z -0.0361 :w 2729.0828) + :geo-tform (new 'static 'vector :x 0.0825 :y 0.3055 :z -0.9485 :w 17459.846) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 38 + :parent-joint 26 + :pre-tform (new 'static 'vector :x 0.3588 :z 0.9333 :w 11281.3125) + :geo-tform (new 'static 'vector :x 0.2273 :y 0.5912 :z 0.7738 :w 23386.34) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 39 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1145 :z 0.9934 :w 2026.6462) + :geo-tform (new 'static 'vector :x 0.2996 :y 0.5792 :z 0.758 :w 21904.426) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + ) + ) + :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 #t + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 19 + :turn-anim -1 + :run-anim 19 + :taunt-anim -1 + :run-travel-speed (meters 6) + :run-acceleration (meters 32) + :run-turning-acceleration (meters 40) + :walk-travel-speed (meters 6) + :walk-acceleration (meters 16) + :walk-turning-acceleration (meters 40) + :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! (-> *prebot-small-eco-creature-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defmethod init-enemy-collision! ((this prebot-small-eco-creature)) + (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 12) 0))) + (set! (-> s5-0 total-prims) (the-as uint 13)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd jak bot hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid deadly)) + (set! (-> s4-0 transform-index) 26) + (set-vector! (-> s4-0 local-sphere) 532.48 -1556.48 1310.72 9011.2) + (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)) + (set! (-> v1-14 prim-core action) (collide-action solid)) + (set-vector! (-> v1-14 local-sphere) 0.0 2867.2 0.0 4096.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 bot hit-by-others-list player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid deadly)) + (set! (-> v1-16 transform-index) 3) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 0.0 2048.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 hit-by-others-list player-list)) + (set! (-> v1-18 prim-core action) (collide-action solid deadly)) + (set! (-> v1-18 transform-index) 4) + (set-vector! (-> v1-18 local-sphere) 0.0 -1228.8 204.8 2048.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 hit-by-others-list player-list)) + (set! (-> v1-20 prim-core action) (collide-action solid deadly)) + (set! (-> v1-20 transform-index) 6) + (set-vector! (-> v1-20 local-sphere) 0.0 163.84 696.32 1474.56) + ) + (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 hit-by-others-list player-list)) + (set! (-> v1-22 prim-core action) (collide-action solid deadly)) + (set! (-> v1-22 transform-index) 28) + (set-vector! (-> v1-22 local-sphere) 0.0 0.0 0.0 1269.76) + ) + (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 hit-by-others-list player-list)) + (set! (-> v1-24 prim-core action) (collide-action solid deadly)) + (set! (-> v1-24 transform-index) 29) + (set-vector! (-> v1-24 local-sphere) 0.0 0.0 0.0 1146.88) + ) + (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 hit-by-others-list player-list)) + (set! (-> v1-26 prim-core action) (collide-action solid deadly)) + (set! (-> v1-26 transform-index) 30) + (set-vector! (-> v1-26 local-sphere) 40.96 0.0 -204.8 942.08) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-28 prim-core action) (collide-action solid deadly)) + (set! (-> v1-28 transform-index) 31) + (set-vector! (-> v1-28 local-sphere) 81.92 0.0 -286.72 860.16) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-30 prim-core action) (collide-action solid deadly)) + (set! (-> v1-30 transform-index) 33) + (set-vector! (-> v1-30 local-sphere) -819.2 -368.64 -327.68 1597.44) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-32 prim-core action) (collide-action solid deadly)) + (set! (-> v1-32 transform-index) 35) + (set-vector! (-> v1-32 local-sphere) 532.48 245.76 245.76 1761.28) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-34 prim-core action) (collide-action solid deadly)) + (set! (-> v1-34 transform-index) 37) + (set-vector! (-> v1-34 local-sphere) 368.64 286.72 163.84 1720.32) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-36 prim-core action) (collide-action solid deadly)) + (set! (-> v1-36 transform-index) 39) + (set-vector! (-> v1-36 local-sphere) -286.72 -245.76 -327.68 1638.4) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (let ((v1-38 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-38 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-38 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod init-enemy! ((this prebot-small-eco-creature)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-cav-eco-lg" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *prebot-small-eco-creature-nav-enemy-info*) + (logior! (-> this draw global-effect) (draw-control-global-effect rim-lights2)) + (let ((v1-8 (-> this neck))) + (set! (-> v1-8 up) (the-as uint 1)) + (set! (-> v1-8 nose) (the-as uint 2)) + (set! (-> v1-8 ear) (the-as uint 0)) + (set-vector! (-> v1-8 twist-max) 3640.889 11832.889 0.0 1.0) + (set! (-> v1-8 ignore-angle) 15473.777) + ) + (let ((v1-10 (-> this nav))) + (set! (-> v1-10 speed-scale) 1.0) + ) + 0 + (set-gravity-length (-> this root dynam) 573440.0) + (logior! (-> this nav flags) (nav-control-flag momentum-ignore-heading)) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (logior! (-> this focus-status) (focus-status dangerous)) + (logior! (-> this enemy-flags) (enemy-flag dangerous-backup)) + (set! (-> this attack-anims) (new 'static 'boxed-array :type int32 18)) + (set! (-> this victory-anims) (new 'static 'boxed-array :type int32 10 11)) + (set! (-> this turn-left-anim) 16) + (set! (-> this turn-right-anim) 17) + (setup-masks (-> this draw) 0 2) + (set! (-> this is-top) #f) + (set! (-> this is-bottom) #f) + (set! (-> this initial-scale) 0.6) + (set! (-> this final-scale) 0.4) + (set! (-> this split-type) #f) + (set! (-> this attack-stop-frame) 10.0) + (when (type? this small-eco-creature-launched) + (set! (-> this spin-jm) (new 'process 'joint-mod (joint-mod-mode joint-set*) this 3)) + (set! (-> this trail-part) (create-launch-control (-> *part-group-id-table* 440) this)) + (logclear! (-> this flags) (eco-creature-flag ecf3)) + ) + (set! (-> this flags) (eco-creature-flag)) + (send-event (ppointer->process (-> this parent)) 'start-critter) + (let ((a0-21 (-> this skel root-channel 0))) + (set! (-> a0-21 frame-group) (the-as art-joint-anim (-> this draw art-group data 2))) + (set! (-> a0-21 frame-num) 0.0) + (joint-control-channel-group! a0-21 (the-as art-joint-anim (-> this draw art-group data 2)) num-func-identity) + ) + (transform-post) + 0 + (none) + ) + +(deftype medium-eco-creature-launched (prebot-medium-eco-creature) + () + ) + + +;; WARN: Return type mismatch vector vs none. +(defmethod init-enemy! ((this medium-eco-creature-launched)) + (call-parent-method this) + (set-vector! (-> this root scale) (-> this final-scale) (-> this final-scale) (-> this final-scale) 1.0) + (none) + ) + +(defmethod go-idle2 ((this medium-eco-creature-launched)) + ((method-of-type prebot-large-eco-creature go-idle2) this) + ) + +(deftype small-eco-creature-launched (prebot-small-eco-creature) + () + ) + + +;; WARN: Return type mismatch vector vs none. +(defmethod init-enemy! ((this small-eco-creature-launched)) + (call-parent-method this) + (set-vector! (-> this root scale) (-> this final-scale) (-> this final-scale) (-> this final-scale) 1.0) + (none) + ) + +(defmethod go-idle2 ((this small-eco-creature-launched)) + ((method-of-type prebot-large-eco-creature go-idle2) this) + ) + +(deftype large-eco-creature (prebot-large-eco-creature) + () + ) + + +(defmethod go-idle2 ((this large-eco-creature)) + ((method-of-type nav-enemy go-idle2) this) + ) + +;; WARN: Return type mismatch eco-creature-flag vs none. +(defmethod init-enemy! ((this large-eco-creature)) + (call-parent-method this) + (logior! (-> this flags) (eco-creature-flag ecf2)) + (none) + ) + +(deftype medium-eco-creature (prebot-medium-eco-creature) + () + ) + + +(defmethod go-idle2 ((this medium-eco-creature)) + ((method-of-type nav-enemy go-idle2) this) + ) + +;; WARN: Return type mismatch eco-creature-flag vs none. +(defmethod init-enemy! ((this medium-eco-creature)) + (call-parent-method this) + (set-vector! (-> this root scale) (-> this final-scale) (-> this final-scale) (-> this final-scale) 1.0) + (logior! (-> this flags) (eco-creature-flag ecf2)) + (none) + ) + +(deftype small-eco-creature (prebot-small-eco-creature) + () + ) + + +(defmethod go-idle2 ((this small-eco-creature)) + ((method-of-type nav-enemy go-idle2) this) + ) + +;; WARN: Return type mismatch eco-creature-flag vs none. +(defmethod init-enemy! ((this small-eco-creature)) + (call-parent-method this) + (set-vector! (-> this root scale) (-> this final-scale) (-> this final-scale) (-> this final-scale) 1.0) + (logior! (-> this flags) (eco-creature-flag ecf2)) + (none) + ) diff --git a/goal_src/jak3/levels/common/enemy/roboguard.gc b/goal_src/jak3/levels/common/enemy/roboguard.gc index 833775d056..0e424252f8 100644 --- a/goal_src/jak3/levels/common/enemy/roboguard.gc +++ b/goal_src/jak3/levels/common/enemy/roboguard.gc @@ -5,5 +5,1756 @@ ;; name in dgo: roboguard ;; dgos: SEA, FACC, FACD +;; +++roboguard-flag +(defenum roboguard-flag + :type uint16 + :bitfield #t + (rf0 0) + (rf1 1) + (rf2 2) + ) +;; ---roboguard-flag + + ;; DECOMP BEGINS +(defpartgroup group-roboguard-armor-explode + :id 223 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 810) (sp-item 812) (sp-item 814)) + ) + +(deftype roboguard (nav-enemy) + ((los los-control :inline) + (rotation-matrix matrix :inline) + (upper-rotation-matrix matrix :inline) + (fire-at-pos vector :inline) + (formation-position vector :inline) + (focus-formation-source vector :inline) + (me-to-focus-dir vector :inline) + (me-to-focus-angle float) + (flags roboguard-flag) + (torso-aim-blend float) + (torso-angle float) + (torso-seek-speed float) + (torso-to-focus-angle float) + (last-torso-frame-num float) + (stand-angle-threshold float) + (arm-rot-mult float 2) + (arm-rot degrees 2) + (fire-time time-frame) + (fire-count uint32) + (last-attack-time time-frame) + (update-focus-pos symbol) + (formation-angle-sign float) + (last-hit-points int32) + ) + (:state-methods + hostile-stand + close-attack + shoot-attack + explode + ) + (:methods + (roboguard-method-194 (_type_ vector float) symbol) + (roboguard-method-195 (_type_) none) + (roboguard-method-196 (_type_ int) none) + ) + ) + + +(defskelgroup skel-roboguard roboguard roboguard-lod0-jg roboguard-idle0-ja + ((roboguard-lod0-mg (meters 20)) (roboguard-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3) + :shadow roboguard-shadow-mg + :origin-joint-index 3 + ) + +(defskelgroup skel-roboguard-explode roboguard roboguard-explode-lod0-jg roboguard-explode-idle-ja + ((roboguard-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 80) + ) + +(define *roboguard-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 8 :parent-joint-index 15) + (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index 11) + (new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index 9) + (new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index 13) + (new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index 24) + (new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index 27) + (new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index 18) + (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index 21) + (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index 12) + (new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index 8) + (new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index 6) + (new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index 17) + (new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index 4) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(define *roboguard-explode-joints* (new 'static 'boxed-array :type int32 0 10 19 9 14 22 13 6)) + +(define *roboguard-debris-array-params* + (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 -1 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + :art-level 'sewg + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index -1 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + :art-level 'sewg + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index -1 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + :art-level 'sewg + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index -1 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + :art-level 'sewg + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index -1 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + :art-level 'sewg + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index -1 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + :art-level 'sewg + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index -1 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + :art-level 'sewg + ) + ) + ) + +(dotimes (v1-27 (-> *roboguard-debris-array-params* length)) + (set! (-> *roboguard-debris-array-params* v1-27 joints 0 parent-joint-index) + (-> *roboguard-explode-joints* (+ v1-27 1)) + ) + ) + +(set! (-> *lightning-spec-id-table* 17) (new 'static 'lightning-spec + :name "lightning-shock-roboguard" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + :end-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.2 + :fade-time 15.0 + :texture (new 'static 'texture-id :index #x3f :page #x4) + :reduction 0.42 + :num-points 8 + :box-size 8192.0 + :merge-factor 0.5 + :merge-count 2 + :radius 819.2 + :duration 90.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +(set! (-> *lightning-spec-id-table* 18) (new 'static 'lightning-spec + :name "lightning-awe-roboguard" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + :end-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.2 + :fade-time 15.0 + :texture (new 'static 'texture-id :index #x3f :page #x4) + :reduction 0.42 + :num-points 8 + :box-size 8192.0 + :merge-factor 0.5 + :merge-count 2 + :radius 2048.0 + :duration 90.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +(define *fact-info-roboguard-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 48 :pickup-amount 10.0) + ) + +(define *roboguard-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 #f + :idle-anim 5 + :notice-anim -1 + :hostile-anim 14 + :hit-anim 5 + :knocked-anim 27 + :knocked-land-anim 28 + :die-anim 18 + :die-falling-anim 29 + :victory-anim 5 + :jump-wind-up-anim 5 + :jump-in-air-anim 5 + :jump-land-anim 5 + :neck-joint -1 + :look-at-joint 6 + :bullseye-joint 4 + :notice-distance (meters 50) + :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 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.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 32768.0 + :knocked-soft-vxz-hi 61440.0 + :knocked-soft-vy-lo 49152.0 + :knocked-soft-vy-hi 65536.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 73728.0 + :knocked-hard-vxz-hi 114688.0 + :knocked-hard-vy-lo 49152.0 + :knocked-hard-vy-hi 73728.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 #t + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 13 + :turn-anim 4 + :run-anim 14 + :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! (-> *roboguard-nav-enemy-info* fact-defaults) *fact-info-roboguard-defaults*) + +(defpart 913 + :init-specs ((:texture (pal-lightning level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1)) + (: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)) + ) + ) + +(defpart 914 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 128.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-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 915 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 128.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-3 sp-cpuinfo-flag-14)) + ) + ) + +(defmethod init-enemy-collision! ((this roboguard)) + (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 4) 0))) + (set! (-> s5-0 total-prims) (the-as uint 5)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy camera-blocker los-blocker)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot enemy obstacle vehicle-sphere 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 enemy)) + (set! (-> v1-12 prim-core collide-with) + (collide-spec backgnd jak bot enemy obstacle vehicle-sphere hit-by-others-list player-list) + ) + (set! (-> v1-12 prim-core action) (collide-action solid)) + (set-vector! (-> v1-12 local-sphere) 0.0 6144.0 0.0 6144.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 enemy obstacle vehicle-sphere hit-by-others-list player-list) + ) + (set! (-> v1-14 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> v1-14 local-sphere) 0.0 12697.6 0.0 6144.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core action) (collide-action)) + (set! (-> v1-16 transform-index) 11) + (set-vector! (-> v1-16 local-sphere) 0.0 0.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 los-blocker)) + (set! (-> v1-18 prim-core action) (collide-action solid)) + (set-vector! (-> v1-18 local-sphere) 0.0 8192.0 0.0 11468.8) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (let ((v1-20 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-20 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-20 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defbehavior roboguard-turn-torso-post roboguard () + (seek! (-> self torso-aim-blend) 1.0 (* 5.0 (seconds-per-frame))) + (let ((v1-3 (joint-node roboguard-lod0-jg chest)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> gp-0 quad) (-> v1-3 bone transform fvec quad)) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> self focus-pos) (-> v1-3 bone transform trans)))) + (set! (-> gp-0 y) 0.0) + (set! (-> s5-1 y) 0.0) + (vector-xz-normalize! gp-0 1.0) + (vector-xz-normalize! s5-1 1.0) + (set! (-> self torso-to-focus-angle) (acos (vector-dot gp-0 s5-1))) + ) + ) + (if (>= 2730.6667 (-> self torso-to-focus-angle)) + (seek! (-> self torso-seek-speed) 0.0 (* 54613.332 (seconds-per-frame))) + (seek! (-> self torso-seek-speed) 43690.668 (* 72817.78 (seconds-per-frame))) + ) + (nav-enemy-simple-post) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior roboguard-turret-code roboguard () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! roboguard-idle-shoot0-loop-ja :num! zero) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.2)) + (suspend) + ) + ) + (let ((gp-1 + (lambda ((arg0 roboguard) (arg1 symbol)) + (quaternion-rotate-y! (-> arg0 root quat) (-> arg0 root quat) (* 20480.0 (seconds-per-frame) (if arg1 + 1.0 + -1.0 + ) + ) + ) + ) + ) + (f30-0 (-> self stand-angle-threshold)) + ) + (until #f + (when (< (fabs (-> self me-to-focus-angle)) f30-0) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (seconds 0.5)) + (suspend) + ) + ) + (while (< (fabs (-> self me-to-focus-angle)) f30-0) + (suspend) + ) + ) + (ja-channel-push! 1 0) + (let ((v1-20 (if (< 0.0 (-> self me-to-focus-angle)) + 7 + 9 + ) + ) + (s5-1 (< 0.0 (-> self me-to-focus-angle))) + ) + (ja-no-eval :group! (-> self draw art-group data v1-20) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (gp-1 self s5-1) + (suspend) + (ja :num! (seek!)) + ) + ) + (when (< (fabs (-> self me-to-focus-angle)) f30-0) + (let ((s5-2 (current-time))) + (until (time-elapsed? s5-2 (seconds 0.5)) + (suspend) + ) + ) + (while (< (fabs (-> self me-to-focus-angle)) f30-0) + (suspend) + ) + ) + (ja-channel-push! 1 0) + (let ((v1-40 (if (< 0.0 (-> self me-to-focus-angle)) + 8 + 10 + ) + ) + (s5-3 (< 0.0 (-> self me-to-focus-angle))) + ) + (ja-no-eval :group! (-> self draw art-group data v1-40) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (gp-1 self s5-3) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + #f + (none) + ) + +(defstate idle (roboguard) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (ja-no-eval :group! roboguard-idle0-ja :num! (seek! 2.0 (rand-vu-float-range 0.1 0.15)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 2.0 (rand-vu-float-range 0.1 0.15))) + ) + (ja-no-eval :group! roboguard-idle0-ja :num! (seek! 3.0 (rand-vu-float-range 0.1 0.15)) :frame-num 2.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 3.0 (rand-vu-float-range 0.1 0.15))) + ) + (ja-no-eval :group! roboguard-idle0-ja :num! (seek! 4.0 (rand-vu-float-range 0.1 0.15)) :frame-num 3.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 4.0 (rand-vu-float-range 0.1 0.15))) + ) + (ja-no-eval :group! roboguard-idle0-ja :num! (seek! 5.0 (rand-vu-float-range 0.1 0.15)) :frame-num 4.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 5.0 (rand-vu-float-range 0.1 0.15))) + ) + (ja-no-eval :group! roboguard-idle0-ja :num! (seek! 6.0 (rand-vu-float-range 0.1 0.15)) :frame-num 5.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 6.0 (rand-vu-float-range 0.1 0.15))) + ) + (ja-no-eval :group! roboguard-idle0-ja :num! (seek! 7.0 0.07) :frame-num 6.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 7.0 0.07)) + ) + (ja-no-eval :group! roboguard-idle0-ja :num! (seek! 8.0 0.07) :frame-num 7.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 8.0 0.07)) + ) + (ja-no-eval :group! roboguard-idle0-ja :num! (seek! 9.0 0.07) :frame-num 8.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 9.0 0.07)) + ) + (ja-no-eval :group! roboguard-idle0-ja :num! (seek! 10.0 (rand-vu-float-range 0.02 0.05)) :frame-num 9.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 10.0 (rand-vu-float-range 0.02 0.05))) + ) + ) + #f + ) + :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 notice (roboguard) + :virtual #t + :exit (behavior () + (set! (-> self formation-position quad) (-> self root trans quad)) + (let ((t9-0 (-> (method-of-type nav-enemy notice) exit))) + (if t9-0 + (t9-0) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (ja-no-eval :group! roboguard-notice-jump-ja :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 131072.0 (seconds 0.05)) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (ja-no-eval :group! roboguard-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 stare (roboguard) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy stare) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self stand-angle-threshold) 9102.223) + ) + :code roboguard-turret-code + :post roboguard-turn-torso-post + ) + +(defstate hostile (roboguard) + :virtual #t + :exit (behavior () + (let ((v1-0 (-> self nav))) + (logclear! (-> v1-0 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (cond + ((< (vector-vector-xz-distance (-> self root trans) (-> self formation-position)) 8192.0) + (go-virtual hostile-stand) + ) + ((and (< (fabs (-> self torso-to-focus-angle)) 3640.889) + (and (get-focus! self) (>= 24576.0 (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)))) + ) + (go-virtual close-attack) + ) + ) + ) + ) + :post (behavior () + (seek! (-> self torso-aim-blend) 0.0 (seconds-per-frame)) + (seek! (-> self arm-rot-mult 0) 0.0 (* 10.0 (seconds-per-frame))) + (seek! (-> self arm-rot-mult 1) 0.0 (* 10.0 (seconds-per-frame))) + (roboguard-method-195 self) + (let ((a0-4 (-> self nav state)) + (v1-8 (-> self formation-position)) + ) + (logclear! (-> a0-4 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-4 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-4 target-pos quad) (-> v1-8 quad)) + ) + 0 + (nav-enemy-method-187 self) + ) + ) + +(defstate hostile-stand (roboguard) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self stand-angle-threshold) 9102.223) + (nav-enemy-method-180 self 8192.0 (the-as float #f)) + ) + :exit (behavior () + (nav-enemy-method-179 self) + ) + :trans (behavior () + (when (and (time-elapsed? (-> self state-time) (-> self reaction-time)) (ja-done? 0)) + (if (or (and (< 65536.0 (vector-vector-xz-distance (-> self focus-pos) (-> self root trans))) + (< 2048.0 (vector-vector-xz-distance (-> self root trans) (-> self formation-position))) + ) + (< 14336.0 (vector-vector-xz-distance (-> self root trans) (-> self formation-position))) + ) + (go-virtual hostile) + ) + (when (and (time-elapsed? (-> self state-time) (seconds 0.3)) + (and (< (fabs (-> self torso-to-focus-angle)) 3640.889) (get-focus! self)) + ) + (cond + ((>= 24576.0 (vector-vector-xz-distance (-> self root trans) (-> self focus-pos))) + (go-virtual close-attack) + ) + ((should-check-los? (-> self los) (seconds 0.4)) + (go-virtual shoot-attack) + ) + ) + ) + ) + ) + :code roboguard-turret-code + :post (behavior () + (seek! (-> self arm-rot-mult 0) 0.0 (* 10.0 (seconds-per-frame))) + (seek! (-> self arm-rot-mult 1) 0.0 (* 10.0 (seconds-per-frame))) + (roboguard-method-195 self) + (roboguard-turn-torso-post) + ) + ) + +(defstate close-attack (roboguard) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set-time! (-> self fire-time)) + (nav-enemy-method-180 self 8192.0 (the-as float #f)) + ) + :exit (behavior () + (nav-enemy-method-179 self) + ) + :code (behavior () + (let ((f30-0 + (lerp-scale 0.0 1.0 (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) 12288.0 20480.0) + ) + ) + (ja-channel-push! 2 (seconds 0.3)) + (ja-no-eval :group! roboguard-punch-close-rotate-ja :num! (seek!) :frame-num 0.0) + (ja-no-eval :chan 1 :group! roboguard-punch-far-rotate-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + (seek-to-point-toward-point! + (-> self root) + (-> self focus-pos) + (* 1.2 (-> self nav max-rotation-rate)) + (seconds 0.02) + ) + (seek! (-> self torso-aim-blend) 0.0 (* 3.0 (seconds-per-frame))) + (suspend) + (ja :num! (seek!)) + ) + (let ((f28-0 8192.0)) + (let* ((a0-10 (-> self root root-prim)) + (v1-53 (-> (the-as collide-shape-prim-group a0-10) child 2)) + ) + (+! (-> a0-10 local-sphere w) f28-0) + (set! (-> v1-53 prim-core action) (collide-action solid deadly)) + (set! (-> v1-53 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-53 prim-core collide-with) (collide-spec jak bot obstacle player-list)) + ) + (logior! (-> self focus-status) (focus-status dangerous)) + (ja-no-eval :group! roboguard-punch-close-go-ja :num! (seek!) :frame-num 0.0) + (ja-no-eval :chan 1 :group! roboguard-punch-far-go-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + (suspend) + (ja :num! (seek! max 1.2)) + ) + (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! roboguard-punch-close-hold-ja :num! (seek!) :frame-num 0.0) + (ja-no-eval :chan 1 :group! roboguard-punch-far-hold-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + (suspend) + (ja :num! (seek! max 4.0)) + ) + (let* ((v1-147 (-> self root root-prim)) + (a0-26 (-> (the-as collide-shape-prim-group v1-147) child 2)) + ) + (set! (-> v1-147 local-sphere w) (- (-> v1-147 local-sphere w) f28-0)) + (set! (-> a0-26 prim-core action) (collide-action)) + (set! (-> a0-26 prim-core collide-as) (collide-spec)) + (set! (-> a0-26 prim-core collide-with) (collide-spec)) + ) + ) + ) + 0 + (go-virtual hostile-stand) + ) + :post (behavior () + (seek! (-> self arm-rot-mult 0) 0.0 (* 10.0 (seconds-per-frame))) + (seek! (-> self arm-rot-mult 1) 0.0 (* 10.0 (seconds-per-frame))) + (nav-enemy-simple-post) + ) + ) + +(defstate shoot-attack (roboguard) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self fire-time) (+ (current-time) (seconds -0.4))) + (set! (-> self fire-count) (the-as uint 0)) + (set! (-> self last-torso-frame-num) 0.0) + (set! (-> self stand-angle-threshold) 16384.0) + (set! (-> self update-focus-pos) #f) + (nav-enemy-method-180 self 8192.0 (the-as float #f)) + ) + :exit (behavior () + (when (> (-> self skel float-channels) 0) + (let ((a0-1 (joint-control-method-12 (-> self skel) 0))) + (joint-channel-float-delete! a0-1) + ) + ) + (set! (-> self update-focus-pos) #t) + (nav-enemy-method-179 self) + ) + :trans (behavior () + (when (and (time-elapsed? (-> self state-time) (seconds 0.2)) (zero? (-> self skel float-channels))) + (if (or (= (-> self fire-count) 8) (los-control-method-11 (-> self los) (seconds 0.1))) + (go-virtual hostile-stand) + ) + (let ((f0-0 (vector-vector-xz-distance (-> self focus-pos) (-> self root trans)))) + (if (>= 24576.0 f0-0) + (go-virtual close-attack) + ) + ) + (let ((v1-22 (ja-channel-float! (the-as art-joint-anim roboguard-idle-shoot0-loop-ja) 0.0 1.0 0.0))) + (when v1-22 + (set! (-> self skel interp-select 0) #x1bbf8) + (set! (-> self skel interp-select 1) 0) + (set! (-> v1-22 param 0) 1.0) + (set! (-> v1-22 param 1) 1.0) + (set! (-> v1-22 param 2) 2.0) + (set! (-> v1-22 num-func) num-func-interp1-play!) + ) + ) + (set-time! (-> self fire-time)) + ) + (let ((gp-0 (joint-control-method-12 (-> self skel) 0))) + (when gp-0 + (let ((f1-1 (-> gp-0 frame-num)) + (f0-4 (-> self last-torso-frame-num)) + ) + (cond + ((and (< 0.5 f1-1) (>= 0.5 f0-4)) + (roboguard-method-196 self 11) + ) + ((and (< 3.0 f1-1) (>= 3.0 f0-4)) + (roboguard-method-196 self 15) + ) + ) + ) + (set! (-> self last-torso-frame-num) (-> gp-0 frame-num)) + ) + ) + ) + :code roboguard-turret-code + :post (behavior () + (seek! (-> self arm-rot-mult 0) 1.0 (* 30.0 (seconds-per-frame))) + (seek! (-> self arm-rot-mult 1) 1.0 (* 30.0 (seconds-per-frame))) + (let ((gp-1 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (-> self focus-pos)))) + (let ((s5-0 vector-normalize!) + (s4-0 gp-1) + (f0-8 -8192.0) + (v1-7 gp-1) + ) + (s5-0 s4-0 (fmin + (+ f0-8 (sqrtf (+ (* (-> v1-7 x) (-> v1-7 x)) (* (-> v1-7 z) (-> v1-7 z))))) + (lerp-scale 0.0 32768.0 (the float (- (current-time) (-> self state-time))) 600.0 60.0) + ) + ) + ) + (vector+! (-> self fire-at-pos) (-> self focus-pos) gp-1) + ) + 0 + (let ((gp-2 + (lambda :behavior roboguard + ((arg0 int) (arg1 int) (arg2 float)) + (let* ((s5-0 (-> self node-list data arg0)) + (v1-2 (vector<-cspace! (new 'stack-no-clear 'vector) s5-0)) + ) + (vector-float*! (new 'stack-no-clear 'vector) (-> s5-0 bone transform uvec) -1.0) + (let ((s5-1 (new 'stack-no-clear 'matrix))) + (vector-! (-> s5-1 rvec) (-> self fire-at-pos) v1-2) + (set! (-> s5-1 uvec quad) (-> s5-1 rvec quad)) + (set! (-> s5-1 uvec y) 0.0) + (vector-normalize! (-> s5-1 uvec) 1.0) + (vector-normalize-copy! (-> s5-1 fvec) (-> s5-1 rvec) 1.0) + (vector-flatten! (-> s5-1 fvec) (-> s5-1 fvec) (the-as vector (-> self upper-rotation-matrix))) + (set! (-> self arm-rot-mult arg1) + (* (-> self arm-rot-mult arg1) (vector-dot (-> s5-1 uvec) (-> self upper-rotation-matrix fvec))) + ) + (let ((f0-6 (* arg2 (acos (vector-dot (-> s5-1 fvec) (-> self upper-rotation-matrix fvec)))))) + (set! (-> self arm-rot arg1) + (seek + (-> self arm-rot arg1) + (fmax -8192.0 (fmin 13653.333 (if (< 0.0 (vector-dot (-> s5-1 fvec) *y-vector*)) + (- f0-6) + f0-6 + ) + ) + ) + (* 65536.0 (seconds-per-frame)) + ) + ) + ) + ) + ) + ) + ) + ) + (gp-2 11 0 1.0) + (gp-2 15 1 1.0) + ) + (roboguard-turn-torso-post) + ) + ) + +(defstate knocked (roboguard) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-0 + (t9-0) + ) + ) + (dotimes (gp-0 (- (-> self last-hit-points) (the int (-> self hit-points)))) + (let ((s5-0 (enemy-method-131 self 8 (the-as int (logior (-> self draw seg-mask) 1))))) + (when (> s5-0 0) + (let ((a1-2 (new 'stack 'debris-tuning (the-as uint 1)))) + (set! (-> a1-2 hit-xz-reaction) 0.5) + (set! (-> a1-2 hit-y-reaction) 0.3) + (set! (-> a1-2 fountain-rand-transv-lo quad) (-> self root root-prim prim-core world-sphere quad)) + (let ((s3-0 (-> *roboguard-debris-array-params* (+ s5-0 -1)))) + (debris-spawn self a1-2 s3-0 (the-as process-drawable #f)) + (cond + ((logtest? (-> *part-group-id-table* 223 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> s3-0 joints 0 parent-joint-index))) + quad + ) + ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 223)) + ) + (else + (set! (-> *launch-matrix* trans quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> s3-0 joints 0 parent-joint-index))) + quad + ) + ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 223)) + ) + ) + ) + ) + (setup-masks (-> self draw) 0 (ash 1 s5-0)) + ) + ) + ) + (set! (-> self last-hit-points) (the int (-> self hit-points))) + ) + :post (behavior () + (seek! (-> self arm-rot-mult 0) 0.0 (* 10.0 (seconds-per-frame))) + (seek! (-> self arm-rot-mult 1) 0.0 (* 10.0 (seconds-per-frame))) + (let ((t9-2 (-> (method-of-type nav-enemy knocked) post))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + +(defstate knocked-recover (roboguard) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked-recover) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (enemy-method-109 self) + (go-die self) + (go-hostile self) + ) + ) + :post (behavior () + (seek! (-> self arm-rot-mult 0) 0.0 (* 10.0 (seconds-per-frame))) + (seek! (-> self arm-rot-mult 1) 0.0 (* 10.0 (seconds-per-frame))) + (let ((t9-2 (-> (method-of-type nav-enemy knocked-recover) post))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + +(defstate die (roboguard) + :virtual #t + :enter (behavior () + (on-dying self) + (set-time! (-> self state-time)) + (set! (-> self hit-points) 0.0) + ) + :code (behavior () + (when (!= (-> self incoming knocked-type) (knocked-type blue-shot)) + (ja-channel-push! 1 (seconds 0.075)) + (ja-no-eval :group! roboguard-death-standing-ja + :num! (seek! (ja-aframe 20.0 0) 1.5) + :frame-num (ja-aframe 13.0 0) + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 20.0 0) 1.5)) + ) + ) + (go-virtual explode) + ) + :post (behavior () + (seek! (-> self arm-rot-mult 0) 0.0 (* 10.0 (seconds-per-frame))) + (seek! (-> self arm-rot-mult 1) 0.0 (* 10.0 (seconds-per-frame))) + (let ((t9-2 (-> (method-of-type nav-enemy die) post))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + +(defstate explode (roboguard) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (sound-play "robo-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 + (logior! (-> self draw status) (draw-control-status no-draw)) + (set! (-> self root root-prim local-sphere w) 491520.0) + (send-event self 'death-start) + (let ((gp-1 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (let ((v1-14 (-> gp-1 fountain-rand-transv-lo))) + (let ((a0-8 (-> self root trans))) + (let ((a1-3 *up-vector*)) + (let ((a2-3 2048.0)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a1-3 quad)) + ) + (.lvf vf4 (&-> a0-8 quad)) + ) + (.add.x.vf 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-14 quad) vf6) + ) + (set! (-> s5-1 quad) (-> self incoming attack-direction quad)) + (vector-normalize-copy! (-> gp-1 fountain-rand-transv-lo) s5-1 -20480.0) + (vector-normalize-copy! (-> gp-1 fountain-rand-transv-hi) s5-1 122880.0) + ) + (set! (-> gp-1 fountain-rand-transv-lo y) 40960.0) + (set! (-> gp-1 fountain-rand-transv-hi y) 81920.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-roboguard-explode" (the-as (pointer level) #f)) + 35 + gp-1 + *roboguard-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (let ((v1-25 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node roboguard-lod0-jg chest)))) + (cond + ((logtest? (-> *part-group-id-table* 219 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-25 quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 219)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-25 quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 219)) + ) + ) + ) + ) + ) + :code (behavior () + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +(defmethod roboguard-method-194 ((this roboguard) (arg0 vector) (arg1 float)) + (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))) + (< (vector-x-angle a0-5) 5461.3335) + ) + (let ((s3-0 (-> this nav)) + (s2-0 (-> this focus-pos)) + (s4-0 (new 'stack 'nav-find-poly-parms)) + ) + (vector-! (-> s4-0 point) s2-0 (the-as vector (-> s3-0 state mesh bounds))) + (set! (-> s4-0 y-threshold) (-> s3-0 nearest-y-threshold)) + (set! (-> s4-0 ignore) (the-as uint 2)) + (nav-mesh-method-46 (-> s3-0 state mesh) (the-as nav-poly s4-0)) + (let ((s4-1 (-> s4-0 poly)) + (s3-2 (vector-! (new 'stack-no-clear 'vector) arg0 (-> this focus-pos))) + (s5-1 (new 'stack 'clamp-travel-vector-to-mesh-return-info)) + ) + (or (not s4-1) (begin + (clamp-vector-to-mesh-no-gaps (-> this nav) (-> this focus-pos) s4-1 s3-2 s5-1) + (not (-> s5-1 found-boundary)) + ) + ) + ) + ) + ) + ) + ) + +(define *roboguard-formation-table* (new 'static 'boxed-array :type float + 0.0 + 1820.4445 + 3640.889 + 5461.3335 + -1820.4445 + -3640.889 + -5461.3335 + 7281.778 + 9102.223 + 10922.667 + -7281.778 + -9102.223 + -10922.667 + 12743.111 + 14563.556 + 16384.0 + -12743.111 + -14563.556 + -16384.0 + 18204.445 + 20024.889 + 21845.334 + -18204.445 + -20024.889 + -21845.334 + 23665.777 + 25486.223 + 27306.666 + -23665.777 + -25486.223 + -27306.666 + 29127.111 + 30947.555 + 32768.0 + -29127.111 + -30947.555 + ) + ) + +(defmethod roboguard-method-195 ((this roboguard)) + (when (or (< 8192.0 (vector-vector-xz-distance (-> this focus-pos) (-> this focus-formation-source))) + (let ((f0-1 (vector-vector-distance (-> this formation-position) (-> this focus-formation-source))) + (f1-0 40960.0) + (f2-0 65536.0) + ) + (or (>= f1-0 f0-1) (>= f0-1 f2-0)) + ) + (not (roboguard-method-194 this (-> this formation-position) 9011.2)) + ) + (set! (-> this focus-formation-source quad) (-> this focus-pos quad)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this root trans quad)) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this formation-position) (-> this focus-formation-source))) + ) + (when (< 0.0 (vector-length s4-1)) + (set! (-> s4-1 y) 0.0) + (dotimes (s3-0 (-> *roboguard-formation-table* length)) + (let ((s1-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (vector-normalize-copy! s1-0 s4-1 1.0) + (vector-rotate-y! s1-0 s1-0 (* (-> this formation-angle-sign) (-> *roboguard-formation-table* s3-0))) + (vector-normalize! s1-0 53248.0) + (vector+! s2-0 (-> this focus-formation-source) s1-0) + (when (and (closest-point-on-mesh (-> this nav) s2-0 s2-0 (the-as nav-poly #f)) + (roboguard-method-194 this s2-0 9011.2) + ) + (set! (-> s5-0 quad) (-> s2-0 quad)) + #t + (goto cfg-26) + ) + ) + ) + ) + ) + (label cfg-26) + (set! (-> this formation-angle-sign) (* -1.0 (-> this formation-angle-sign))) + (set! (-> this formation-position quad) (-> s5-0 quad)) + ) + ) + 0 + (none) + ) + +(defmethod roboguard-method-196 ((this roboguard) (arg0 int)) + (let* ((s5-0 (-> this node-list data arg0)) + (v1-2 (vector<-cspace! (new 'stack-no-clear 'vector) s5-0)) + (a3-1 (vector-float*! (new 'stack-no-clear 'vector) (-> s5-0 bone transform uvec) -1.0)) + ) + (spawn-guard-projectile + this + v1-2 + (vector+! (new 'stack-no-clear 'vector) v1-2 a3-1) + 819200.0 + (the-as vector #f) + ) + ) + (sound-play "robo-fire" :position (-> this root trans)) + (+! (-> this fire-count) 1) + 0 + (none) + ) + +(defmethod knocked-anim ((this roboguard) (arg0 enemy-knocked-info)) + (ja-channel-push! 1 0) + (case (-> this incoming knocked-type) + (((knocked-type none) (knocked-type mech-punch) (knocked-type yellow-shot) (knocked-type blue-shot)) + (let ((a0-5 (-> this skel root-channel 0))) + (set! (-> a0-5 frame-group) (the-as art-joint-anim (-> this draw art-group data 27))) + (set! (-> a0-5 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 27)) 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 27)) num-func-seek!) + ) + ) + (else + (let ((a0-6 (-> this skel root-channel 0))) + (set! (-> a0-6 frame-group) (the-as art-joint-anim (-> this draw art-group data 29))) + (set! (-> a0-6 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 29)) frames num-frames) -1)) + ) + (set! (-> a0-6 param 1) (-> arg0 anim-speed)) + (set! (-> a0-6 frame-num) 0.0) + (joint-control-channel-group! a0-6 (the-as art-joint-anim (-> this draw art-group data 29)) num-func-seek!) + ) + ) + ) + #t + ) + +(defmethod knocked-land-anim ((this roboguard) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type none) (knocked-type mech-punch) (knocked-type yellow-shot) (knocked-type blue-shot)) + (let ((v1-4 (-> this skel root-channel 0))) + (set! (-> v1-4 frame-group) (the-as art-joint-anim (-> this draw art-group data 28))) + (set! (-> v1-4 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 28)) frames num-frames) -1)) + ) + (set! (-> v1-4 param 1) (-> arg0 anim-speed)) + (set! (-> v1-4 frame-num) 0.0) + (joint-control-channel-group! v1-4 (the-as art-joint-anim (-> this draw art-group data 28)) num-func-seek!) + ) + ) + (else + (let ((v1-8 (-> this skel root-channel 0))) + (set! (-> v1-8 frame-group) (the-as art-joint-anim (-> this draw art-group data 30))) + (set! (-> v1-8 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 30)) 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 30)) num-func-seek!) + ) + ) + ) + #t + ) + +;; WARN: Return type mismatch int vs penetrate. +(defmethod get-penetrated-by ((this roboguard)) + (the-as penetrate 0) + ) + +(defmethod get-inv-mass ((this roboguard)) + 2.0 + ) + +(defmethod enemy-method-109 ((this roboguard)) + (let ((gp-0 (-> this root)) + (s3-0 (-> this nav state)) + ) + (do-navigation-to-destination s3-0 (-> gp-0 trans)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (cond + ((logtest? (-> s3-0 flags) (nav-state-flag in-mesh)) + (set! (-> s5-0 quad) (-> gp-0 trans quad)) + ) + (else + (if (or (not (closest-point-on-mesh (-> this nav) s5-0 (-> gp-0 trans) (-> s3-0 current-poly))) + (let ((f0-0 8192.0)) + (< (* f0-0 f0-0) (vector-vector-xz-distance-squared s5-0 (-> gp-0 trans))) + ) + (< (- (-> gp-0 trans y) (-> s5-0 y)) -4096.0) + ) + (return #t) + ) + ) + ) + ) + ) + #f + ) + +(defmethod event-handler ((this roboguard) (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) + (cond + ((or (= (-> this hit-points) 0.0) + (and (>= 1.0 (-> this hit-points)) (= (-> this incoming knocked-type) (knocked-type blue-shot))) + ) + (on-dying this) + (go (method-of-object this explode)) + ) + (else + (go (method-of-object this knocked)) + ) + ) + #t + ) + (('impact-impulse) + (let ((v1-38 (the-as object (-> arg3 param 0)))) + (when (< 4096.0 (-> (the-as rigid-body-impact v1-38) impulse)) + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.1)) + (set! (-> this hit-points) 0.0) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 17) + lightning-probe-callback + (-> *part-id-table* 160) + 10 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 17) + lightning-probe-callback + (-> *part-id-table* 160) + 14 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 17) + lightning-probe-callback + (-> *part-id-table* 160) + 8 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 17) + lightning-probe-callback + (-> *part-id-table* 160) + 12 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 17) + lightning-probe-callback + (-> *part-id-table* 160) + 19 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 17) + lightning-probe-callback + (-> *part-id-table* 160) + 22 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 17) + lightning-probe-callback + (-> *part-id-table* 160) + 18 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 17) + lightning-probe-callback + (-> *part-id-table* 160) + 21 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 18) + lightning-probe-callback + (-> *part-id-table* 160) + 10 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 18) + lightning-probe-callback + (-> *part-id-table* 160) + 14 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 18) + lightning-probe-callback + (-> *part-id-table* 160) + 8 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 18) + lightning-probe-callback + (-> *part-id-table* 160) + 12 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 18) + lightning-probe-callback + (-> *part-id-table* 160) + 19 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 18) + lightning-probe-callback + (-> *part-id-table* 160) + 22 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 18) + lightning-probe-callback + (-> *part-id-table* 160) + 18 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 18) + lightning-probe-callback + (-> *part-id-table* 160) + 21 + 210 + 16384.0 + ) + (send-event arg0 'lawsuit (-> this root trans)) + (go (method-of-object this explode)) + #t + ) + ) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod enemy-common-post ((this roboguard)) + (quaternion->matrix (-> this rotation-matrix) (-> this root quat)) + (vector-rotate-around-y! + (the-as vector (-> this upper-rotation-matrix)) + (the-as vector (-> this rotation-matrix)) + (-> this torso-angle) + ) + (set! (-> this upper-rotation-matrix uvec quad) (-> this rotation-matrix uvec quad)) + (vector-rotate-around-y! + (-> this upper-rotation-matrix fvec) + (-> this rotation-matrix fvec) + (-> this torso-angle) + ) + (when (< 1 (the-as int (-> this focus aware))) + (when (-> this update-focus-pos) + (let ((s5-0 (handle->process (-> this focus handle)))) + (when s5-0 + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable s5-0) 5) quad)) + (los-control-method-9 (-> this los) (the-as process-focusable s5-0) (-> this focus-pos) 819.2 4096.0) + ) + ) + ) + (vector-! (-> this me-to-focus-dir) (-> this focus-pos) (-> this root trans)) + (set! (-> this me-to-focus-dir y) 0.0) + (vector-xz-normalize! (-> this me-to-focus-dir) 1.0) + (let* ((a1-9 (-> this rotation-matrix fvec)) + (s5-1 (-> this rotation-matrix)) + (f0-3 (vector-vector-angle-safe (-> this me-to-focus-dir) a1-9)) + ) + (if (< (vector-dot (-> this me-to-focus-dir) (the-as vector s5-1)) 0.0) + (set! f0-3 (* -1.0 f0-3)) + ) + (set! (-> this me-to-focus-angle) f0-3) + ) + ) + ((method-of-type nav-enemy enemy-common-post) this) + (none) + ) + +(defmethod coin-flip? ((this roboguard)) + #f + ) + +(defmethod init-enemy! ((this roboguard)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-roboguard" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logior! (-> this mask) (process-mask kg-robot)) + (set! (-> this enemy-flags) + (the-as enemy-flag (logior (enemy-flag no-initial-move-to-ground) (-> this enemy-flags))) + ) + (init-enemy-defaults! this *roboguard-nav-enemy-info*) + (init-los! + (-> this los) + this + (seconds 0.1) + 327680.0 + (collide-spec backgnd obstacle hit-by-others-list los-blocker) + ) + (set! (-> this torso-aim-blend) 0.0) + (set! (-> this torso-angle) 0.0) + (set! (-> this torso-seek-speed) 0.0) + (set! (-> this torso-to-focus-angle) 0.0) + (let ((v1-13 (-> this node-list data 4))) + (set! (-> v1-13 param0) + (lambda ((arg0 cspace) (arg1 transformq)) + (local-vars (sv-96 vector)) + (let ((s3-0 (the-as roboguard (-> arg0 param1))) + (gp-0 (new 'stack-no-clear 'quaternion)) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (set! (-> s2-0 quad) (-> s3-0 rotation-matrix rvec quad)) + (let ((s0-0 (new 'stack-no-clear 'vector))) + (set! (-> s0-0 quad) (-> s3-0 rotation-matrix fvec quad)) + (let ((s1-0 (new 'stack-no-clear 'vector))) + (set! sv-96 (-> s3-0 focus-pos)) + (let* ((v0-1 (vector<-cspace! (new 'stack-no-clear 'vector) arg0)) + (s1-1 (vector-! s1-0 sv-96 v0-1)) + ) + (set! (-> s1-1 y) 0.0) + (set! (-> s2-0 y) 0.0) + (set! (-> s0-0 y) 0.0) + (vector-xz-normalize! s1-1 1.0) + (vector-xz-normalize! s2-0 1.0) + (vector-xz-normalize! s0-0 1.0) + (let ((f0-5 (fmin 18204.445 (acos (vector-dot s0-0 s1-1))))) + (if (< (vector-dot s2-0 s1-1) 0.0) + (set! f0-5 (* -1.0 f0-5)) + ) + (seek! (-> s3-0 torso-angle) f0-5 (* (-> s3-0 torso-seek-speed) (seconds-per-frame))) + ) + ) + ) + ) + ) + (quaternion-vector-angle! gp-0 *y-vector* (* (-> s3-0 torso-angle) (-> s3-0 torso-aim-blend))) + (quaternion*! (-> arg1 quat) (-> arg1 quat) gp-0) + ) + (quaternion-normalize! (-> arg1 quat)) + (cspace<-parented-transformq-joint! arg0 arg1) + (none) + ) + ) + (set! (-> v1-13 param1) this) + ) + (let ((v1-14 (lambda ((arg0 cspace) (arg1 transformq)) + (let ((s3-0 (-> arg0 param1)) + (s2-0 (the-as object (-> arg0 param2))) + (s4-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (quaternion-vector-angle! + (the-as quaternion s4-0) + (the-as vector (-> (the-as roboguard s3-0) upper-rotation-matrix)) + (* (-> (the-as roboguard s3-0) arm-rot (the-as int s2-0)) + (-> (the-as roboguard s3-0) arm-rot-mult (the-as int s2-0)) + ) + ) + (matrix->trans (-> arg0 bone transform) gp-0) + (matrix*! + (-> arg0 bone transform) + (-> arg0 bone transform) + (quaternion->matrix (new 'stack-no-clear 'matrix) (the-as quaternion s4-0)) + ) + (matrix<-trans (-> arg0 bone transform) gp-0) + ) + (none) + ) + ) + ) + (let ((a0-9 (-> this node-list data 10))) + (set! (-> a0-9 param0) v1-14) + (set! (-> a0-9 param1) this) + (set! (-> a0-9 param2) (the-as basic 0)) + ) + (let ((a0-11 (-> this node-list data 14))) + (set! (-> a0-11 param0) v1-14) + (set! (-> a0-11 param1) this) + (set! (-> a0-11 param2) (the-as basic 1)) + ) + ) + (set! (-> this arm-rot-mult 0) 0.0) + (set! (-> this arm-rot-mult 1) 0.0) + (set! (-> this flags) (roboguard-flag)) + (set! (-> this last-attack-time) 0) + (set! (-> this update-focus-pos) #t) + (set! (-> this formation-angle-sign) (if (not (logtest? (-> this pid) 1)) + 1.0 + -1.0 + ) + ) + (set! (-> this last-hit-points) (the int (-> this enemy-info default-hit-points))) + (setup-masks (-> this draw) -1 0) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/common/enemy/spyder.gc b/goal_src/jak3/levels/common/enemy/spyder.gc index 141635fe69..fcee22180d 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/enemy/spydroid-orig.gc b/goal_src/jak3/levels/common/enemy/spydroid-orig.gc index 78c6020a5b..3035c0944d 100644 --- a/goal_src/jak3/levels/common/enemy/spydroid-orig.gc +++ b/goal_src/jak3/levels/common/enemy/spydroid-orig.gc @@ -5,5 +5,1708 @@ ;; name in dgo: spydroid-orig ;; dgos: SEA, FACTORYA +;; +++spydroid-orig-flag +(defenum spydroid-orig-flag + :type uint64 + :bitfield #t + (sof0 0) + (sof1 1) + (sof2 2) + ) +;; ---spydroid-orig-flag + + ;; DECOMP BEGINS +(defpartgroup group-spydroid-orig-trail + :id 1521 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4976 :fade-after (meters 120) :falloff-to (meters 160)) + (sp-item 4977 :flags (sp6)) + (sp-item 4978 :fade-after (meters 120) :falloff-to (meters 160)) + ) + ) + +(defpart 4977 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:scale-x (meters 1.7) (meters 1)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees -17) (degrees 17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 192.0 64.0) + (:b 255.0) + (:a 16.0) + (:omega (degrees 6761.25)) + (:fade-a -1.0666667) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 3072.0) + ) + ) + +(defpart 4978 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 2.0 2.0) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.033)) + (:r 128.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.03375)) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:fade-r -8.0) + (:fade-g -0.85 -0.85) + (:fade-a -0.10666667 -0.42666668) + (:accel-y (meters -0.0016666667) (meters -0.00066666666)) + (:friction 0.96) + (:timer (seconds 1) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 135) (degrees 90)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters -0.5)) + ) + ) + +(defpart 4976 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 2.5 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 128.0) + (:b 255.0) + (:a 64.0 8.0) + (:vel-x (meters -0.0033333334) (meters 0.006666667)) + (:vel-y (meters -0.006666667) (meters -0.006666667)) + (:vel-z (meters -0.0033333334) (meters 0.006666667)) + (:scalevel-x (meters 0.006666667) (meters 0.008333334)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-r 3.2) + (:fade-g 0.0) + (:fade-b -3.2) + (:fade-a -0.8) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.99) + (: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.135)) + (:next-launcher 4979) + ) + ) + +(defpart 4979 + :init-specs ((:r 128.0) + (:g 128.0) + (:b 128.0) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:fade-a -0.10666667 -0.21333334) + (:func 'nothing) + ) + ) + +(defpartgroup group-spydroid-orig-explode + :id 1522 + :duration (seconds 3) + :linger-duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4980 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 4981 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 4982 :period (seconds 3) :length (seconds 0.05)) + (sp-item 4983 :fade-after (meters 60) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 4984 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 4985 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 4986 :fade-after (meters 150) :falloff-to (meters 150) :period (seconds 3) :length (seconds 0.067) :offset 30) + ) + ) + +(defpart 4981 + :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 -8.5) + (: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 4987) + ) + ) + +(defpart 4987 + :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 4986 + :init-specs ((:texture (explosion-wave factoryc-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 4988) + (:conerot-x '*sp-temp*) + ) + ) + +(defpart 4985 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0 0.2) + (: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)) + (:next-time (seconds 0.085)) + (:next-launcher 4988) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +(defpart 4988 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:next-time (seconds 0.017) (seconds 0.065)) (:next-launcher 4989)) + ) + +(defpart 4989 + :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 4990) + ) + ) + +(defpart 4990 + :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 4991) + ) + ) + +(defpart 4991 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.1125)) + ) + +(defpart 4980 + :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 4992) + ) + ) + +(defpart 4992 + :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 4984 + :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 4993) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +(defpart 4993 + :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 4994) + ) + ) + +(defpart 4994 + :init-specs ((:fade-r -0.5543478) (:fade-g -0.5543478) (:fade-a -0.13913043)) + ) + +(defpart 4982 + :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 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 4995) + (:conerot-x (degrees -1440) (degrees 2880)) + ) + ) + +(defpart 4995 + :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 4996) + ) + ) + +(defpart 4996 + :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 4983 + :init-specs ((:texture (flamingstick factoryc-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)) + ) + ) + +(defpart 4997 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.75)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 16.0) + (:omega (degrees 1361.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + ) + ) + +(defpart 4998 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0 64.0) + (:b 255.0) + (:a 16.0 4.0) + (:omega (degrees 1361.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + ) + ) + +(defpart 4999 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 0.2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees -2) (degrees 4)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0 64.0) + (:b 255.0) + (:a 6.0 2.0) + (:omega (degrees 1811.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + ) + ) + +(defpart 5000 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.75) (meters 0.1)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees -2) (degrees 4)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 128.0 64.0) + (:b 255.0) + (:a 32.0 4.0) + (:omega (degrees 1811.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + ) + ) + +(defskelgroup skel-spydroid-orig spydroid-orig spydroid-orig-lod0-jg spydroid-orig-idle-ja + ((spydroid-orig-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :shadow spydroid-orig-shadow-mg + ) + +(defskelgroup skel-spydroid-orig-exploding spydroid-orig spydroid-orig-exploding-lod0-jg spydroid-orig-exploding-idle-ja + ((spydroid-orig-exploding-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 12) + ) + +(define *spydroid-orig-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 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 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 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 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 12 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 23 :parent-joint-index -1) + ) + :collide-spec (collide-spec backgnd obstacle hit-by-others-list) + ) + ) + +(deftype spydroid-orig (nav-enemy) + ((old-y-deg float) + (diff-angle float) + (flags spydroid-orig-flag) + (lightning lightning-control 4) + (floor float) + (explode-part sparticle-launch-control) + ) + (:state-methods + attack + explode + ) + ) + + +(define *fact-info-spydroid-orig-defaults* (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80))) + +(define *spydroid-orig-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 3 + :hostile-anim 5 + :hit-anim 15 + :knocked-anim 11 + :knocked-land-anim 12 + :die-anim 15 + :die-falling-anim 15 + :victory-anim -1 + :jump-wind-up-anim 8 + :jump-in-air-anim 9 + :jump-land-anim 10 + :neck-joint 4 + :look-at-joint 4 + :bullseye-joint 4 + :sound-hit (static-sound-name "spydroid-orig-h") + :sound-die (static-sound-name "droid-explode") + :notice-distance (meters 200) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 20) + :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 #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 #t + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 4 + :turn-anim -1 + :run-anim 5 + :taunt-anim -1 + :run-travel-speed (meters 8) + :run-acceleration (meters 32) + :run-turning-acceleration (meters 40) + :walk-travel-speed (meters 4) + :walk-acceleration (meters 16) + :walk-turning-acceleration (meters 40) + :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! (-> *spydroid-orig-nav-enemy-info* fact-defaults) *fact-info-spydroid-orig-defaults*) + +(defmethod enemy-common-post ((this spydroid-orig)) + (let ((t9-0 (method-of-type nav-enemy enemy-common-post))) + (t9-0 this) + ) + (when (< (-> this root scale x) 1.0) + (let ((f0-2 (fmin 1.0 (+ 0.025 (-> this root scale x))))) + (set-vector! (-> this root scale) f0-2 f0-2 f0-2 1.0) + ) + ) + (when (logtest? (-> this flags) (spydroid-orig-flag sof0)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (vector<-cspace! s5-0 (-> this node-list data 12)) + (dotimes (s3-0 4) + (let ((a0-4 (-> this lightning s3-0)) + (v1-15 s5-0) + ) + (set! (-> a0-4 state meet data 0 quad) (-> v1-15 quad)) + ) + (let ((v1-17 s3-0)) + (cond + ((zero? v1-17) + (vector<-cspace! s4-0 (-> this node-list data 16)) + ) + ((= v1-17 1) + (vector<-cspace! s4-0 (-> this node-list data 20)) + ) + ((= v1-17 2) + (vector<-cspace! s4-0 (-> this node-list data 28)) + ) + (else + (vector<-cspace! s4-0 (-> this node-list data 24)) + ) + ) + ) + (let ((a0-13 (-> this lightning s3-0)) + (v1-28 s4-0) + ) + (set! (-> a0-13 state meet data (+ (-> a0-13 state points-to-draw) -1) quad) (-> v1-28 quad)) + ) + (when (not (and (-> this next-state) (let ((v1-33 (-> this next-state name))) + (or (= v1-33 'die-falling) (= v1-33 'explode)) + ) + ) + ) + (let ((v1-38 (-> this lightning s3-0 state mode))) + (when (or (zero? v1-38) (= v1-38 3)) + (let ((v1-42 (-> this lightning s3-0)) + (a0-20 1) + ) + (let ((a1-11 (!= a0-20 (-> v1-42 state mode)))) + (case a0-20 + ((3) + (if a1-11 + (set! (-> v1-42 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-42 state start-color) (-> v1-42 spec start-color)) + (set! (-> v1-42 state end-color) (-> v1-42 spec end-color)) + ) + ) + ) + (set! (-> v1-42 state mode) (the-as uint a0-20)) + ) + ) + ) + ) + ) + ) + ) + (let ((f0-5 (quaternion-y-angle (-> this root quat)))) + (set! (-> this diff-angle) (- (-> this old-y-deg) f0-5)) + (cond + ((< 32768.0 (-> this diff-angle)) + (+! (-> this diff-angle) -65536.0) + ) + ((< (-> this diff-angle) -32768.0) + (+! (-> this diff-angle) 65536.0) + ) + ) + (set! (-> this old-y-deg) f0-5) + ) + (if (< (+ 0.5 (* 0.00024414062 (-> this nav state speed))) (* 0.005493164 (fabs (-> this diff-angle)))) + (logior! (-> this flags) (spydroid-orig-flag sof1)) + (logclear! (-> this flags) (spydroid-orig-flag sof1)) + ) + (if (and (< (-> this root trans y) (+ -122880.0 (-> this floor))) + (-> this next-state) + (= (-> this next-state name) 'jump) + ) + (deactivate this) + ) + (if (and (-> this next-state) (= (-> this next-state name) 'jump)) + (spawn (-> this part) (-> this root trans)) + ) + 0 + (none) + ) + +(defmethod event-handler ((this spydroid-orig) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v1-8 structure) (sv-144 vector)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (case arg2 + (('touch 'bonk 'attack) + (cond + ((logtest? (-> this flags) (spydroid-orig-flag sof0)) + (set! sv-144 (the-as vector (send-event (ppointer->process (-> this parent)) 'widow-get-center))) + (let* ((s1-0 arg0) + (s0-0 (if (type? s1-0 process-drawable) + s1-0 + ) + ) + ) + (let ((v1-7 sv-144)) + (b! (not v1-7) cfg-16 :likely-delay (set! v1-8 sv-144)) + ) + (set! v1-8 s0-0) + (label cfg-16) + (cond + (v1-8 + (let ((v1-12 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) sv-144)) + (s1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s1-1 x) (- (-> v1-12 z))) + (set! (-> s1-1 y) 0.0) + (set! (-> s1-1 z) (-> v1-12 x)) + (set! (-> s1-1 w) 1.0) + (let ((v1-15 + (vector-! (new 'stack-no-clear 'vector) (-> (the-as process-drawable s0-0) root trans) (-> this root trans)) + ) + ) + (set! (-> s1-1 y) 0.0) + (set! (-> v1-15 y) 0.0) + (if (< (vector-dot v1-15 s1-1) 0.0) + (vector-negate! s1-1 s1-1) + ) + ) + (vector-normalize! s1-1 16384.0) + (vector+! s1-1 s1-1 (-> (the-as process-drawable s0-0) root trans)) + (vector-! s1-1 s1-1 sv-144) + (set! (-> s1-1 y) 0.0) + (vector-normalize! s1-1 204800.0) + (let ((v1-20 s1-1)) + (let ((a0-19 s1-1)) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> a0-19 quad)) + ) + (.lvf vf5 (&-> sv-144 quad)) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-20 quad) vf6) + ) + (vector-! s1-1 s1-1 (-> (the-as process-drawable s0-0) root trans)) + (set! (-> s1-1 y) 8192.0) + (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) + (vector s1-1) + ) + ) + ) + ) + ) + ((and s0-0 (= (-> s0-0 type) target)) + (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)) + ) + ) + ) + ) + ) + ) + (let ((v1-36 (the-as object (-> arg3 param 1)))) + (if (or (!= arg0 *target*) + (and (= arg2 'attack) + (logtest? (attack-mask penetrate-using) (-> (the-as attack-info v1-36) mask)) + (logtest? (penetrate vehicle dark-bomb) (-> (the-as attack-info v1-36) penetrate-using)) + ) + ) + ((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) + ) + ) + ) + (('jump) + (set! (-> this floor) (-> (the-as vector (-> arg3 param 1)) y)) + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + (('use-lightning) + (cond + ((-> arg3 param 0) + (let ((v0-7 (the-as object (logior (-> this flags) (spydroid-orig-flag sof0))))) + (set! (-> this flags) (the-as spydroid-orig-flag v0-7)) + v0-7 + ) + ) + (else + (logclear! (-> this flags) (spydroid-orig-flag sof0)) + (dotimes (v1-47 4) + (let ((a0-56 (-> this lightning v1-47 state mode))) + (cond + ((or (zero? a0-56) (= a0-56 3)) + ) + (else + (let ((a0-60 (-> this lightning v1-47)) + (a1-28 3) + ) + (let ((a2-9 (!= a1-28 (-> a0-60 state mode)))) + (case a1-28 + ((3) + (if a2-9 + (set! (-> a0-60 state counter) 0.0) + ) + ) + ((1) + (set! (-> a0-60 state start-color) (-> a0-60 spec start-color)) + (set! (-> a0-60 state end-color) (-> a0-60 spec end-color)) + ) + ) + ) + (set! (-> a0-60 state mode) (the-as uint a1-28)) + ) + ) + ) + ) + ) + #f + ) + ) + ) + (('impact-impulse) + (let ((v1-49 (the-as object (-> arg3 param 0)))) + (when (< 4096.0 (-> (the-as rigid-body-impact v1-49) impulse)) + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.1)) + (set! (-> this hit-points) 0.0) + (send-event arg0 'lawsuit (-> this root trans)) + (go (method-of-object this explode)) + #t + ) + ) + ) + (('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 + ((or (= (-> this hit-points) 0.0) (nonzero? (-> this fated-time))) + (on-dying this) + (go (method-of-object this explode)) + ) + (else + (go (method-of-object this knocked)) + ) + ) + #t + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + ) + +(defstate explode (spydroid-orig) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (send-event self 'death-start) + (sound-play "droid-explode") + (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)) + (set! (-> self root root-prim local-sphere w) 491520.0) + (when (logtest? (-> self flags) (spydroid-orig-flag sof0)) + (dotimes (v1-16 4) + (let ((a0-7 (-> self lightning v1-16)) + (a1-2 3) + ) + (let ((a2-2 (!= a1-2 (-> a0-7 state mode)))) + (case a1-2 + ((3) + (if a2-2 + (set! (-> a0-7 state counter) 0.0) + ) + ) + ((1) + (set! (-> a0-7 state start-color) (-> a0-7 spec start-color)) + (set! (-> a0-7 state end-color) (-> a0-7 spec end-color)) + ) + ) + ) + (set! (-> a0-7 state mode) (the-as uint a1-2)) + ) + ) + ) + (let ((gp-1 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-spydroid-orig-exploding" (the-as (pointer level) #f)) + 20 + gp-1 + *spydroid-orig-exploder-params* + :name "joint-exploder" + :to self + ) + ) + (let ((v1-25 (new 'stack-no-clear 'vector))) + (set! (-> v1-25 quad) (-> self root trans quad)) + (cond + ((logtest? (-> *part-group-id-table* 219 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-25 quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 219)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-25 quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 219)) + ) + ) + ) + (let ((gp-4 (-> self child))) + (while gp-4 + (send-event (ppointer->process gp-4) 'notice 'die) + (set! gp-4 (-> gp-4 0 brother)) + ) + ) + ) + :trans (behavior () + (when (not (-> self child)) + (cleanup-for-death self) + (deactivate self) + ) + ) + :code sleep-code + ) + +(defstate die-falling (spydroid-orig) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy die-falling) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-time! (-> self state-time)) + (send-event self 'death-start) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy die-falling) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (not (time-elapsed? (-> self state-time) (seconds 2))) + (spawn (-> self explode-part) (-> self root trans)) + ) + ) + :code (behavior () + (when (logtest? (-> self flags) (spydroid-orig-flag sof0)) + (dotimes (v1-3 4) + (let ((a0-2 (-> self lightning v1-3)) + (a1-0 3) + ) + (let ((a2-1 (!= a1-0 (-> a0-2 state mode)))) + (case a1-0 + ((3) + (if a2-1 + (set! (-> a0-2 state counter) 0.0) + ) + ) + ((1) + (set! (-> a0-2 state start-color) (-> a0-2 spec start-color)) + (set! (-> a0-2 state end-color) (-> a0-2 spec end-color)) + ) + ) + ) + (set! (-> a0-2 state mode) (the-as uint a1-0)) + ) + ) + ) + (suspend) + (ja-channel-set! 0) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (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) + ) + ) + +(defstate attack (spydroid-orig) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logclear! (-> self flags) (spydroid-orig-flag sof2)) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (let ((v1-4 (-> self nav))) + (set! (-> v1-4 target-speed) (+ 8192.0 (-> self enemy-info run-travel-speed))) + ) + 0 + (let ((v1-7 (-> self nav state))) + (set! (-> v1-7 speed) (+ 8192.0 (-> self enemy-info run-travel-speed))) + ) + 0 + (let ((v1-9 (-> self nav))) + (set! (-> v1-9 turning-acceleration) (* 4.0 (-> self enemy-info run-turning-acceleration))) + ) + 0 + (set! (-> self root penetrate-using) (penetrate generic-attack lunge)) + (reset-penetrate! self) + (let* ((v1-14 *game-info*) + (a0-11 (+ (-> v1-14 attack-id) 1)) + ) + (set! (-> v1-14 attack-id) a0-11) + (set! (-> self attack-id) a0-11) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! spydroid-orig-attack-jump-ja :num! min) + ) + :exit (behavior () + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (nav-enemy-method-179 self) + (let ((v1-4 (-> self nav))) + (set! (-> v1-4 target-speed) (-> self enemy-info run-travel-speed)) + ) + 0 + (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 () + (reset-penetrate! self) + nav-state + (if (logtest? (-> self enemy-flags) (enemy-flag victory)) + (logior! (-> self flags) (spydroid-orig-flag sof2)) + ) + (let ((v1-10 (ja-group))) + (cond + ((and v1-10 (= v1-10 spydroid-orig-attack-jump-ja)) + (ja :num! (seek!)) + (if (and (< 4.0 (ja-aframe-num 0)) (not (logtest? (-> self flags) (spydroid-orig-flag sof0)))) + (logior! (-> self focus-status) (focus-status dangerous)) + ) + (when (ja-done? 0) + (let ((v1-28 (-> self nav))) + (set! (-> v1-28 target-speed) 0.0) + ) + 0 + (let ((v1-30 (-> self nav))) + (set! (-> v1-30 acceleration) 262144.0) + ) + 0 + (let ((v1-32 (-> self nav))) + (set! (-> v1-32 turning-acceleration) 0.0) + ) + 0 + (ja :group! spydroid-orig-attack-land-ja :num! min) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + ) + ) + (else + (let ((v1-45 (ja-group))) + (cond + ((and v1-45 (= v1-45 spydroid-orig-attack-land-ja)) + (ja :num! (seek!)) + (cond + ((ja-done? 0) + (go-hostile self) + ) + ((not (logtest? (-> self flags) (spydroid-orig-flag sof1))) + ) + ((< 0.0 (-> self diff-angle)) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! spydroid-orig-turn-left-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! spydroid-orig-turn-right-ja :num! min) + ) + ) + ) + ((let ((v1-69 (ja-group))) + (and (and v1-69 (= v1-69 spydroid-orig-turn-left-ja)) + (and (logtest? (-> self flags) (spydroid-orig-flag sof1)) (< 0.0 (-> self diff-angle))) + ) + ) + (ja :num! (loop! (* 0.0019975142 (-> self diff-angle)))) + ) + (else + (let ((v1-80 (ja-group))) + (if (and (and v1-80 (= v1-80 spydroid-orig-turn-right-ja)) + (and (logtest? (-> self flags) (spydroid-orig-flag sof1)) (< (-> self diff-angle) 0.0)) + ) + (ja :num! (loop! (* -0.0019975142 (-> self diff-angle)))) + (go-hostile self) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :code sleep-code + :post nav-enemy-chase-post + ) + +(defstate notice (spydroid-orig) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy notice) enter))) + (if t9-0 + (t9-0) + ) + ) + (go-best-state self) + ) + ) + +(defstate hostile (spydroid-orig) + :virtual #t + :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)))) + (if (and (time-elapsed? (-> self state-time) (-> self reaction-time)) + (and a0-1 + (let ((f0-0 (vector-vector-xz-distance-squared (get-trans (the-as process-focusable a0-1) 0) (-> self root trans))) + (f1-0 16384.0) + ) + (< f0-0 (* f1-0 f1-0)) + ) + ) + ) + (go-virtual attack) + ) + ) + (cond + ((not (logtest? (-> self flags) (spydroid-orig-flag sof1))) + (let ((v1-24 (ja-group))) + (when (not (and v1-24 (= v1-24 (-> self draw art-group data (-> self enemy-info hostile-anim))))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data (-> self enemy-info hostile-anim)) :num! min) + ) + ) + (ja :num! (loop! (/ (-> self nav state speed) (* 0.5 (-> self enemy-info run-travel-speed))))) + ) + ((< 0.0 (-> self diff-angle)) + (let ((v1-44 (ja-group))) + (cond + ((not (and v1-44 (= v1-44 spydroid-orig-turn-left-ja))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! spydroid-orig-turn-left-ja :num! min) + ) + (else + (ja :num! (loop! (* 0.0019975142 (-> self diff-angle)))) + ) + ) + ) + ) + (else + (let ((v1-56 (ja-group))) + (cond + ((not (and v1-56 (= v1-56 spydroid-orig-turn-right-ja))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! spydroid-orig-turn-right-ja :num! min) + ) + (else + (ja :num! (loop! (* -0.0019975142 (-> self diff-angle)))) + ) + ) + ) + ) + ) + ) + :code (behavior () + (until #f + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + #f + ) + ) + +(defstate circling (spydroid-orig) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy circling) trans))) + (if t9-0 + (t9-0) + ) + ) + (cond + ((not (logtest? (-> self flags) (spydroid-orig-flag sof1))) + (let ((v1-8 (ja-group))) + (when (not (and v1-8 (= v1-8 (-> self draw art-group data (-> self enemy-info walk-anim))))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data (-> self enemy-info walk-anim)) :num! min) + ) + ) + (ja :num! (loop! (/ (-> self nav state speed) (* 0.5 (-> self enemy-info run-travel-speed))))) + ) + ((< 0.0 (-> self diff-angle)) + (let ((v1-28 (ja-group))) + (cond + ((not (and v1-28 (= v1-28 spydroid-orig-turn-left-ja))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! spydroid-orig-turn-left-ja :num! min) + ) + (else + (ja :num! (loop! (* 0.0019975142 (-> self diff-angle)))) + ) + ) + ) + ) + (else + (let ((v1-40 (ja-group))) + (cond + ((not (and v1-40 (= v1-40 spydroid-orig-turn-right-ja))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! spydroid-orig-turn-right-ja :num! min) + ) + (else + (ja :num! (loop! (* -0.0019975142 (-> self diff-angle)))) + ) + ) + ) + ) + ) + ) + :code (behavior () + (nav-enemy-method-176 self) + (until #f + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + #f + ) + ) + +(defstate pacing (spydroid-orig) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy pacing) trans))) + (if t9-0 + (t9-0) + ) + ) + (cond + ((not (logtest? (-> self flags) (spydroid-orig-flag sof1))) + (let ((v1-8 (ja-group))) + (when (not (and v1-8 (= v1-8 (-> self draw art-group data (-> self enemy-info walk-anim))))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data (-> self enemy-info walk-anim)) :num! min) + ) + ) + (ja :num! (loop! (/ (-> self nav state speed) (* 0.5 (-> self enemy-info run-travel-speed))))) + ) + ((< 0.0 (-> self diff-angle)) + (let ((v1-28 (ja-group))) + (cond + ((not (and v1-28 (= v1-28 spydroid-orig-turn-left-ja))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! spydroid-orig-turn-left-ja :num! min) + ) + (else + (ja :num! (loop! (* 0.0019975142 (-> self diff-angle)))) + ) + ) + ) + ) + (else + (let ((v1-40 (ja-group))) + (cond + ((not (and v1-40 (= v1-40 spydroid-orig-turn-right-ja))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! spydroid-orig-turn-right-ja :num! min) + ) + (else + (ja :num! (loop! (* -0.0019975142 (-> self diff-angle)))) + ) + ) + ) + ) + ) + ) + :code (behavior () + (until #f + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + #f + ) + ) + +(defstate stare (spydroid-orig) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy stare) trans))) + (if t9-0 + (t9-0) + ) + ) + (cond + ((not (logtest? (-> self flags) (spydroid-orig-flag sof1))) + (let ((v1-8 (ja-group))) + (when (not (and v1-8 (= v1-8 (-> self draw art-group data (-> self enemy-info idle-anim))))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data (-> self enemy-info idle-anim)) :num! min) + ) + ) + (ja :num! (loop!)) + ) + ((< 0.0 (-> self diff-angle)) + (let ((v1-24 (ja-group))) + (cond + ((not (and v1-24 (= v1-24 spydroid-orig-turn-left-ja))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! spydroid-orig-turn-left-ja :num! min) + ) + (else + (ja :num! (loop! (* 0.0019975142 (-> self diff-angle)))) + ) + ) + ) + ) + (else + (let ((v1-36 (ja-group))) + (cond + ((not (and v1-36 (= v1-36 spydroid-orig-turn-right-ja))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! spydroid-orig-turn-right-ja :num! min) + ) + (else + (ja :num! (loop! (* -0.0019975142 (-> self diff-angle)))) + ) + ) + ) + ) + ) + ) + :code (behavior () + (until #f + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + #f + ) + ) + +(defmethod init-enemy-collision! ((this spydroid-orig)) + (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 obstacle hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid deadly)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 4300.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 jak bot player-list)) + (set! (-> v1-14 prim-core action) (collide-action deadly)) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 4096.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 obstacle hit-by-others-list 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 3686.4) + ) + (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! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod coin-flip? ((this spydroid-orig)) + #f + ) + +(defmethod get-inv-mass ((this spydroid-orig)) + 3.3333333 + ) + +(defmethod deactivate ((this spydroid-orig)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this explode-part)) + (kill-particles (-> this explode-part)) + ) + (call-parent-method this) + (none) + ) + +;; WARN: Return type mismatch nav-enemy vs spydroid-orig. +(defmethod relocate ((this spydroid-orig) (offset int)) + (dotimes (v1-0 4) + (if (nonzero? (-> this lightning v1-0)) + (&+! (-> this lightning v1-0) offset) + ) + ) + (when (nonzero? (-> this explode-part)) + (if (nonzero? (-> this explode-part)) + (&+! (-> this explode-part) offset) + ) + ) + (the-as spydroid-orig ((method-of-type nav-enemy relocate) this offset)) + ) + +(defmethod init-enemy! ((this spydroid-orig)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-spydroid-orig" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *spydroid-orig-nav-enemy-info*) + (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 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-10 (-> this lightning s5-1)) + (a0-5 0) + ) + (let ((a1-5 (!= a0-5 (-> v1-10 state mode)))) + (case a0-5 + ((3) + (if a1-5 + (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-5)) + ) + ) + (let ((v1-13 (-> this neck))) + (set! (-> v1-13 up) (the-as uint 1)) + (set! (-> v1-13 nose) (the-as uint 2)) + (set! (-> v1-13 ear) (the-as uint 0)) + (set-vector! (-> v1-13 twist-max) 3640.889 11832.889 0.0 1.0) + (set! (-> v1-13 ignore-angle) 15473.777) + ) + (set-vector! (-> this root scale) 0.5 0.5 0.5 1.0) + (let ((v1-17 (-> this nav))) + (set! (-> v1-17 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* 1521) this)) + (set! (-> this explode-part) (create-launch-control (-> *part-group-id-table* 1522) this)) + (add-connection + *part-engine* + this + 8 + this + 4997 + (new 'static 'vector :x -204.8 :y 122.88 :z 1720.32 :w 163840.0) + ) + (add-connection + *part-engine* + this + 10 + this + 4997 + (new 'static 'vector :x -245.76 :y -122.88 :z 901.12 :w 163840.0) + ) + (add-connection + *part-engine* + this + 4 + this + 4998 + (new 'static 'vector :x 819.2 :y -122.88 :z 3358.72 :w 163840.0) + ) + (add-connection *part-engine* this 6 this 4999 (new 'static 'vector :w 163840.0)) + (add-connection *part-engine* this 6 this 5000 (new 'static 'vector :w 163840.0)) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (set! (-> this flags) (spydroid-orig-flag)) + (if (-> this entity) + (set! (-> this flags) + (res-lump-value (-> this entity) 'spydroid-flags spydroid-orig-flag :time -1000000000.0) + ) + ) + (logclear! (-> this flags) (spydroid-orig-flag sof1 sof2)) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/common/hvehicle/squad-control-h.gc b/goal_src/jak3/levels/common/hvehicle/squad-control-h.gc index 7821ec0816..c94a3a63f7 100644 --- a/goal_src/jak3/levels/common/hvehicle/squad-control-h.gc +++ b/goal_src/jak3/levels/common/hvehicle/squad-control-h.gc @@ -5,5 +5,126 @@ ;; name in dgo: squad-control-h ;; dgos: HGA, LPATK, RAILA, LFACCAR, CWI, WASALL, LFACTORY, COMBA +;; +++squad-target-flag +(defenum squad-target-flag + :type uint8 + :bitfield #t + (visible-now) + (visible-recently) + (visible-ever) + (updated) + (force-visible) + ) +;; ---squad-target-flag + + +;; +++squad-alert-flag +(defenum squad-alert-flag + :type uint8 + :bitfield #t + (alert-ending) + (alarm-on) + (guard-multi-focus) + (sticky-guard-settings) + (disable-pursuit-control) + (update-target-search) + (war) + ) +;; ---squad-alert-flag + + ;; DECOMP BEGINS +(deftype squad-unit-settings (structure) + ((target-count int8) + (shot-count int8) + (rand-shot-count int8) + (inaccuracy float) + (acquire-delay uint16) + (shot-delay uint16) + (burst-delay uint16) + (rand-burst-delay uint16) + (rand-shot-delay uint16) + ) + ) + + +(deftype squad-target-status (structure) + ((flags squad-target-flag) + (handle handle) + (last-seen-time time-frame) + (position vector :inline) + (velocity vector :inline) + (threat-level float) + ) + ) + + +(deftype squad-alert-state (structure) + ((flags squad-alert-flag) + (level uint8) + (max-level uint8) + (guards-in-sight-of-target int8) + (guard-aim-count int8) + (guard-inaccuracy-factor float) + (guard-target-level float) + (duration uint32) + (start-time time-frame) + (notify-time time-frame) + (alarm-sound-id sound-id) + (target-status-array squad-target-status 3 :inline) + (target-status squad-target-status :inline :overlay-at (-> target-status-array 0)) + ) + (:methods + (init! (_type_) none) + ) + ) + + +(deftype primary-target-pos-vel (structure) + ((position vector :inline) + (velocity vector :inline) + (time uint32 :overlay-at (-> velocity data 3)) + ) + ) + + +(deftype squad-control (basic) + ((sync-clock uint8) + (sync-mask-8 uint8) + (sync-mask-16 uint16) + (sync-mask-32 uint32) + (alert-state squad-alert-state :inline) + (primary-target-history primary-target-pos-vel 16 :inline) + ) + (:methods + (initialize (_type_ process) none) + (squad-control-method-10 (_type_) none) + (stop-alarm-sound (_type_) none) + (init-alert (_type_) none) + (update (_type_) none) + (set-sync-mask (_type_) none) + (probe-backgnd-collision (_type_ vector vector) symbol) + (squad-control-method-16 (_type_ vector process-focusable squad-target-status) none) + (squad-control-method-17 (_type_ vector int squad-target-status) none) + (squad-control-method-18 (_type_ int process) int) + (set-alert-level0 (_type_ int) int) + (start-alert (_type_ int) none) + (set-alert-level (_type_ int) none) + (get-alert-level (_type_) int) + (set-alert-duration (_type_ time-frame) none) + (squad-control-method-24 (_type_) int) + (squad-control-method-25 (_type_ primary-target-pos-vel time-frame) none) + (set-pos-vel (_type_ primary-target-pos-vel) primary-target-pos-vel) + (squad-control-method-27 (_type_ process float) none) + (get-idx-in-status-arr (_type_ handle) int) + (valid-target-handle? (_type_ handle) symbol) + (get-target-focus (_type_) process-focusable) + (squad-control-method-31 (_type_ vector process-focusable handle float float) none) + (get-handle-pos (_type_ handle vector) vector) + (get-focus-in-range (_type_ process-focusable) process-focusable) + ) + ) + + +(define *waswide-squad-control* (the-as squad-control #f)) diff --git a/goal_src/jak3/levels/common/hvehicle/squad-control.gc b/goal_src/jak3/levels/common/hvehicle/squad-control.gc index bc850129b9..ff096269df 100644 --- a/goal_src/jak3/levels/common/hvehicle/squad-control.gc +++ b/goal_src/jak3/levels/common/hvehicle/squad-control.gc @@ -5,5 +5,523 @@ ;; name in dgo: squad-control ;; dgos: HGA, LPATK, RAILA, LFACCAR, CWI, WASALL, LFACTORY, COMBA +(deftype squad-control-stack-type0 (structure) + ((vec0 vector :inline :offset 0) + (vec1 vector :inline :offset 16) + (float0 float :offset 32) + (byte0 int8 :offset 36) + (mesh nav-mesh :offset 40) + (cquery collide-query :inline :offset 64) + (vec2 vector :inline :offset 272) + (vec3 vector :inline :offset 288) + (float1 float :offset 604) + (float2 float :offset 608) + (float3 float :offset 612) + ) + ) + ;; DECOMP BEGINS +(defmethod init! ((this squad-alert-state)) + (set! (-> this flags) (squad-alert-flag)) + (set! (-> this level) (the-as uint 0)) + (set! (-> this duration) (the-as uint 9000)) + (set! (-> this alarm-sound-id) (new-sound-id)) + (set! (-> this guard-inaccuracy-factor) 1.0) + (dotimes (v1-2 3) + (let ((a0-4 (-> this target-status-array v1-2))) + (set! (-> a0-4 flags) (squad-target-flag)) + (set! (-> a0-4 handle) (the-as handle #f)) + (vector-reset! (-> a0-4 position)) + (vector-reset! (-> a0-4 velocity)) + (set! (-> a0-4 threat-level) 0.0) + ) + ) + 0 + (none) + ) + +(defmethod initialize ((this squad-control) (arg0 process)) + 0 + (none) + ) + +(defmethod squad-control-method-10 ((this squad-control)) + (init! (-> this alert-state)) + (init-alert this) + 0 + (none) + ) + +(defmethod stop-alarm-sound ((this squad-control)) + (sound-stop (-> this alert-state alarm-sound-id)) + 0 + (none) + ) + +(defmethod init-alert ((this squad-control)) + (logclear! + (-> this alert-state flags) + (squad-alert-flag guard-multi-focus sticky-guard-settings disable-pursuit-control war) + ) + (let ((v1-2 (-> this alert-state target-status-array))) + (logclear! (-> v1-2 0 flags) (squad-target-flag force-visible)) + ) + (set-alert-duration this (seconds 30)) + (set-alert-level this 4) + 0 + (none) + ) + +(defmethod set-sync-mask ((this squad-control)) + (+! (-> this sync-clock) 1) + (let ((v1-2 (-> this sync-clock))) + (set! (-> this sync-mask-8) (the-as uint (ash 1 (the-as int (logand v1-2 7))))) + (set! (-> this sync-mask-16) (the-as uint (ash 1 (the-as int (logand v1-2 15))))) + (set! (-> this sync-mask-32) (the-as uint (ash 1 (the-as int (logand v1-2 31))))) + ) + 0 + (none) + ) + +(defmethod update ((this squad-control)) + (set-sync-mask this) + 0 + (none) + ) + +;; WARN: Return type mismatch squad-target-status vs none. +;; og:preserve-this +; (defmethod squad-control-method-17 ((this squad-control) (arg0 vector) (arg1 int) (arg2 squad-target-status)) +; (empty) +; (none) +; ) + +(defmethod squad-control-method-18 ((this squad-control) (arg0 int) (arg1 process)) + (if (logtest? (-> this alert-state flags) (squad-alert-flag war)) + (return 0) + ) + (when (valid-target-handle? this (process->handle arg1)) + (let ((v1-10 (min arg0 (the-as int (-> this alert-state max-level))))) + (if (< (-> this alert-state level) (the-as uint v1-10)) + (logior! (-> this alert-state flags) (squad-alert-flag update-target-search)) + ) + (set-time! (-> this alert-state start-time)) + (logclear! (-> this alert-state flags) (squad-alert-flag alert-ending)) + (set! (-> this alert-state level) (the-as uint (max (the-as int (-> this alert-state level)) v1-10))) + ) + ) + 0 + ) + +(defmethod set-alert-level0 ((this squad-control) (arg0 int)) + (if (logtest? (-> this alert-state flags) (squad-alert-flag war)) + (return 0) + ) + (set! (-> this alert-state level) (the-as uint (min (the-as int (-> this alert-state level)) arg0))) + 0 + ) + +(defmethod start-alert ((this squad-control) (arg0 int)) + (set! (-> this alert-state level) (the-as uint arg0)) + (set-time! (-> this alert-state start-time)) + (logclear! (-> this alert-state flags) (squad-alert-flag alert-ending)) + 0 + (none) + ) + +(defmethod set-alert-level ((this squad-control) (arg0 int)) + (set! (-> this alert-state max-level) (the-as uint arg0)) + (set! (-> this alert-state level) (the-as uint (min (the-as int (-> this alert-state level)) arg0))) + 0 + (none) + ) + +(defmethod get-alert-level ((this squad-control)) + (if (logtest? (-> this alert-state flags) (squad-alert-flag war)) + (return 0) + ) + (the-as int (-> this alert-state level)) + ) + +(defmethod set-alert-duration ((this squad-control) (arg0 time-frame)) + (set! (-> this alert-state duration) (the-as uint arg0)) + 0 + (none) + ) + +(defmethod probe-backgnd-collision ((this squad-control) (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-4 v1-0)) + (set! (-> a0-4 radius) 2048.0) + (set! (-> a0-4 collide-with) (collide-spec backgnd)) + (set! (-> a0-4 ignore-process0) #f) + (set! (-> a0-4 ignore-process1) #f) + (set! (-> a0-4 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> a0-4 action-mask) (collide-action solid)) + ) + (< (fill-and-probe-using-line-sphere *collide-cache* v1-0) 0.0) + ) + ) + +(defmethod squad-control-method-16 ((this squad-control) (arg0 vector) (arg1 process-focusable) (arg2 squad-target-status)) + (cond + ((zero? (get-idx-in-status-arr this (process->handle arg1))) + (let ((s5-1 (-> this alert-state target-status-array))) + (let ((s4-0 (new 'stack-no-clear 'inline-array 'primary-target-pos-vel 2))) + (set-pos-vel this (-> s4-0 0)) + (set! (-> s4-0 1 position quad) (-> s4-0 0 position quad)) + (logior! (-> s5-1 0 flags) (squad-target-flag updated)) + (cond + ((or (logtest? (-> s5-1 0 flags) (squad-target-flag force-visible)) + (probe-backgnd-collision this arg0 (the-as vector (-> s4-0 1))) + ) + (logior! (-> s5-1 0 flags) (squad-target-flag visible-now visible-recently visible-ever)) + (set-time! (-> s5-1 0 last-seen-time)) + (set! (-> s5-1 0 position quad) (-> s4-0 1 position quad)) + (set! (-> s5-1 0 velocity quad) (-> s4-0 0 velocity quad)) + ) + (else + (logclear! (-> s5-1 0 flags) (squad-target-flag visible-now)) + (if (time-elapsed? (-> s5-1 0 last-seen-time) (seconds 2)) + (logclear! (-> s5-1 0 flags) (squad-target-flag visible-recently)) + ) + ) + ) + ) + (mem-copy! (the-as pointer arg2) (the-as pointer s5-1) 68) + ) + 0 + ) + (else + (logior! (-> arg2 flags) (squad-target-flag visible-now visible-recently visible-ever)) + (set-time! (-> arg2 last-seen-time)) + (set! (-> arg2 position quad) (-> (get-trans arg1 3) quad)) + (set! (-> arg2 velocity quad) (-> (get-transv arg1) quad)) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs symbol. +(defmethod valid-target-handle? ((this squad-control) (arg0 handle)) + (the-as symbol (and (handle->process arg0) (= (get-idx-in-status-arr this arg0) 0))) + ) + +;; WARN: Return type mismatch squad-target-status vs none. +(defmethod squad-control-method-17 ((this squad-control) (arg0 vector) (arg1 int) (arg2 squad-target-status)) + (logclear! (-> arg2 flags) (squad-target-flag visible-now updated)) + (cond + ((or (= (-> this sync-mask-16) (ash 1 (logand arg1 15))) + (or (logtest? (-> this alert-state flags) (squad-alert-flag update-target-search)) + (< (get-idx-in-status-arr this (-> arg2 handle)) 0) + ) + ) + (logclear! (-> this alert-state flags) (squad-alert-flag update-target-search)) + (logior! (-> arg2 flags) (squad-target-flag updated)) + (let ((a2-1 (handle->process (-> arg2 handle)))) + (if a2-1 + (squad-control-method-16 this arg0 (the-as process-focusable a2-1) arg2) + ) + ) + ) + (else + (when (and (handle->process (-> arg2 handle)) (valid-target-handle? this (-> arg2 handle))) + (let ((s4-1 (-> this alert-state target-status-array))) + (when (logtest? (-> s4-1 0 flags) (squad-target-flag visible-recently)) + (let ((s3-0 (new 'stack-no-clear 'primary-target-pos-vel))) + (set-pos-vel this (the-as primary-target-pos-vel (-> s3-0 position))) + (set! (-> s4-1 0 position quad) (-> s3-0 position quad)) + (set! (-> s4-1 0 velocity quad) (-> s3-0 velocity quad)) + ) + ) + (mem-copy! (the-as pointer arg2) (the-as pointer s4-1) 68) + ) + ) + (logclear! (-> arg2 flags) (squad-target-flag updated)) + ) + ) + (none) + ) + +(defmethod squad-control-method-24 ((this squad-control)) + (if (not (handle->process (-> this alert-state target-status handle))) + (return 0) + ) + (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 'primary-target-pos-vel))) + (set! (-> s5-1 position quad) (-> (get-trans (the-as process-focusable s4-0) 3) quad)) + (set! (-> s5-1 velocity quad) (-> (get-transv (the-as process-focusable s4-0)) quad)) + (set! (-> s5-1 time) (the-as uint (current-time))) + (if (>= (- (-> s5-1 time) (-> this primary-target-history 1 time)) (the-as uint 30)) + (qmem-copy->! + (the-as pointer (-> this primary-target-history 1)) + (the-as pointer (-> this primary-target-history)) + 480 + ) + ) + (mem-copy! (the-as pointer (-> this primary-target-history)) (the-as pointer (-> s5-1 position)) 32) + ) + 0 + ) + ) + 0 + ) + +;; WARN: Return type mismatch primary-target-pos-vel vs none. +(defmethod squad-control-method-25 ((this squad-control) (arg0 primary-target-pos-vel) (arg1 time-frame)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'primary-target-pos-vel 2))) + (set! (-> s5-0 0 time) (the-as uint (- (current-time) arg1))) + (let ((v1-3 0)) + (let ((a1-1 0)) + (b! #t cfg-7 :delay (nop!)) + (label cfg-1) + (b! + (not (and (>= (-> this primary-target-history a1-1 time) (-> s5-0 0 time)) + (>= (-> s5-0 0 time) (-> this primary-target-history (+ a1-1 1) time)) + ) + ) + cfg-6 + :delay (empty-form) + ) + (set! v1-3 a1-1) + (b! #t cfg-9 :delay (nop!)) + (label cfg-6) + (+! a1-1 1) + (label cfg-7) + (b! (< a1-1 14) cfg-1) + ) + (set! (-> s5-0 0 time) (-> this primary-target-history 0 time)) + (label cfg-9) + (let ((s4-0 (-> this primary-target-history v1-3)) + (s3-0 (-> this primary-target-history (+ v1-3 1))) + ) + (set! (-> s5-0 1 position x) + (/ (the float (- (-> s5-0 0 time) (-> s4-0 time))) (the float (- (-> s3-0 time) (-> s4-0 time)))) + ) + (vector-lerp! (-> arg0 position) (-> s4-0 position) (-> s3-0 position) (-> s5-0 1 position x)) + (vector-lerp! (-> arg0 velocity) (-> s4-0 velocity) (-> s3-0 velocity) (-> s5-0 1 position x)) + ) + ) + (set! (-> arg0 time) (-> s5-0 0 time)) + ) + (none) + ) + +(defmethod set-pos-vel ((this squad-control) (arg0 primary-target-pos-vel)) + (let* ((s4-0 (handle->process (-> this alert-state target-status handle))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when s5-0 + (set! (-> arg0 position quad) (-> (get-trans (the-as process-focusable s5-0) 3) quad)) + (set! (-> arg0 velocity quad) (-> (get-transv (the-as process-focusable s5-0)) quad)) + ) + ) + arg0 + ) + +;; WARN: Return type mismatch float vs none. +(defmethod squad-control-method-27 ((this squad-control) (arg0 process) (arg1 float)) + (let ((a1-4 (process->handle arg0)) + (v1-2 (-> this alert-state target-status-array)) + ) + (when (!= (-> v1-2 0 handle) a1-4) + (set! (-> v1-2 0 handle) (the-as handle a1-4)) + (set! (-> v1-2 0 flags) (squad-target-flag)) + (vector-reset! (-> v1-2 0 position)) + (vector-reset! (-> v1-2 0 velocity)) + (set! (-> v1-2 0 threat-level) arg1) + ) + ) + (none) + ) + +(defmethod get-idx-in-status-arr ((this squad-control) (arg0 handle)) + (if (not (handle->process arg0)) + (return -1) + ) + (dotimes (v1-5 3) + (if (= (-> this alert-state target-status-array v1-5 handle) arg0) + (return v1-5) + ) + ) + -1 + ) + +;; WARN: Return type mismatch process vs process-focusable. +(defmethod get-target-focus ((this squad-control)) + (let ((gp-0 (handle->process (-> this alert-state target-status handle)))) + (the-as process-focusable (if (type? gp-0 process-focusable) + gp-0 + ) + ) + ) + ) + +;; WARN: Return type mismatch process vs process-focusable. +(defmethod get-focus-in-range ((this squad-control) (arg0 process-focusable)) + (let* ((f0-0 4915200.0) + (f30-0 (* f0-0 f0-0)) + (s4-0 (the-as process #f)) + ) + (dotimes (s3-0 3) + (let* ((s1-0 (handle->process (-> this alert-state target-status-array s3-0 handle))) + (s2-0 (if (type? s1-0 process-focusable) + s1-0 + ) + ) + ) + (when s2-0 + (let ((f0-2 (vector-vector-xz-distance-squared (-> arg0 root trans) (get-trans (the-as process-focusable s2-0) 0))) + ) + (when (< f0-2 f30-0) + (set! f30-0 f0-2) + (set! s4-0 s2-0) + ) + ) + ) + ) + ) + (the-as process-focusable s4-0) + ) + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod squad-control-method-31 ((this squad-control) (arg0 vector) (arg1 process-focusable) (arg2 handle) (arg3 float) (arg4 float)) + (local-vars (v1-40 float) (sv-672 float) (sv-688 vector) (sv-704 int)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (set! sv-672 arg4) + (let ((s5-0 (get-handle-pos this arg2 (new 'stack-no-clear 'vector)))) + (let ((s3-1 (vector-! (new 'stack-no-clear 'vector) s5-0 (-> arg1 root trans)))) + (set! sv-688 s5-0) + (set! (-> s3-1 y) 0.0) + (vector-normalize! s3-1 1.0) + (let ((s2-0 (new 'stack-no-clear 'squad-control-stack-type0)) + (s1-0 (the-as nav-mesh #f)) + (f30-0 sv-672) + ) + (if (and (nonzero? (-> arg1 nav)) (-> arg1 nav)) + (set! s1-0 (-> arg1 nav state mesh)) + ) + (if (not s1-0) + (set! s1-0 (find-nearest-nav-mesh sv-688 (the-as float #x7f800000))) + ) + (when s1-0 + (nav-mesh-method-10 s1-0 sv-688 sv-688 (the-as nav-poly #f)) + (set! (-> s2-0 float0) 40960.0) + (set! (-> s2-0 byte0) 2) + (vector-! (-> s2-0 vec1) sv-688 (the-as vector (-> s1-0 bounds))) + (nav-mesh-method-46 s1-0 (the-as nav-poly (-> s2-0 vec1))) + (let ((s0-1 (-> s2-0 mesh))) + (when s0-1 + (project-point-into-poly-2d s1-0 (the-as nav-poly s0-1) (-> s2-0 vec1) (-> s2-0 vec1)) + (let ((v1-18 (-> s2-0 vec1)) + (a0-9 (-> s1-0 bounds)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> v1-18 quad)) + (.lvf vf5 (&-> a0-9 quad)) + ) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-688 quad) vf6) + (set! sv-704 0) + (while (< sv-704 16) + (when #t + (set! (-> s2-0 float1) + (the float (sar (shl (the int (+ f30-0 (* 182.04445 (* 22.5 (the float sv-704))))) 48) 48)) + ) + (set! (-> s2-0 float2) arg3) + (vector-rotate-around-y! (-> s2-0 vec0) s3-1 (-> s2-0 float1)) + (vector-float*! (-> s2-0 vec0) (-> s2-0 vec0) (-> s2-0 float2)) + (clamp-vector-to-mesh-cross-gaps + s1-0 + (-> s2-0 vec1) + (the-as nav-poly s0-1) + (-> s2-0 vec0) + (-> s2-0 float2) + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + (set! (-> s2-0 cquery start-pos quad) (-> s5-0 quad)) + (set! (-> s2-0 cquery move-dist quad) (-> s2-0 vec0 quad)) + (let ((v1-34 (-> s2-0 cquery))) + (set! (-> v1-34 radius) 2048.0) + (set! (-> v1-34 collide-with) (collide-spec backgnd)) + (set! (-> v1-34 ignore-process0) #f) + (set! (-> v1-34 ignore-process1) #f) + (set! (-> v1-34 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-34 action-mask) (collide-action solid)) + ) + (set! (-> s2-0 float3) (fill-and-probe-using-line-sphere *collide-cache* (-> s2-0 cquery))) + (if (< 0.0 (-> s2-0 float3)) + (vector-float*! (-> s2-0 vec0) (-> s2-0 vec0) (-> s2-0 float3)) + ) + (.lvf vf1 (&-> (-> s2-0 vec0) 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-17 v1-40) + (f1-4 (* 0.5 arg3)) + ) + (when (< (* f1-4 f1-4) f0-17) + (vector+! s5-0 s5-0 (-> s2-0 vec0)) + 0 + (goto cfg-19) + ) + ) + ) + (set! sv-704 (+ sv-704 1)) + ) + ) + ) + ) + ) + ) + (label cfg-19) + (set! (-> arg0 quad) (-> s5-0 quad)) + ) + (none) + ) + ) + +(defmethod get-handle-pos ((this squad-control) (arg0 handle) (arg1 vector)) + (let* ((s5-0 (handle->process arg0)) + (a0-5 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (new 'stack-no-clear 'vector) + (if a0-5 + (set! (-> arg1 quad) (-> (get-trans (the-as process-focusable a0-5) 0) quad)) + ) + ) + arg1 + ) diff --git a/goal_src/jak3/levels/common/hvehicle/turret-control.gc b/goal_src/jak3/levels/common/hvehicle/turret-control.gc index 0ea29b1588..ec35aa78dd 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-hud.gc b/goal_src/jak3/levels/common/hvehicle/vehicle-hud.gc index cc2968bf90..2ed808186a 100644 --- a/goal_src/jak3/levels/common/hvehicle/vehicle-hud.gc +++ b/goal_src/jak3/levels/common/hvehicle/vehicle-hud.gc @@ -5,5 +5,76 @@ ;; name in dgo: vehicle-hud ;; dgos: HGA, LPATK, RAILA, LFACCAR, CWI, WASALL, LFACTORY, COMBA +(declare-type hud-vehicle-turbo hud) +(define-extern hud-vehicle-turbo-spawn (function process hud-vehicle-turbo)) + ;; DECOMP BEGINS +(deftype hud-vehicle-health (hud) + () + ) + + +(defmethod draw ((this hud-vehicle-health)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (+ (the int (* -100.0 (-> this offset))) 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-4 (fmax 0.0 (fmin 1.0 (-> *game-info* health-bar-vehicle))))) + (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) (* 20.5 f0-4)) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-vehicle-health)) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-vehicle-health)) + (vehicle-entity-hack 27) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-lower-left-2) (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-01" + (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) + ) + +;; WARN: Return type mismatch process vs hud-vehicle-health. +(defun hud-vehicle-health-spawn ((arg0 vehicle)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn hud-vehicle-health :init hud-init-by-other :name "hud-vehicle-health" :to arg0))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as hud-vehicle-health gp-0) + ) + ) diff --git a/goal_src/jak3/levels/common/hvehicle/vehicle-manager.gc b/goal_src/jak3/levels/common/hvehicle/vehicle-manager.gc index 04518a91e6..18b0d5ff3a 100644 --- a/goal_src/jak3/levels/common/hvehicle/vehicle-manager.gc +++ b/goal_src/jak3/levels/common/hvehicle/vehicle-manager.gc @@ -5,5 +5,351 @@ ;; name in dgo: vehicle-manager ;; dgos: HGA, LPATK, RAILA, LFACCAR, CWI, WASALL, LFACTORY, COMBA +(define-extern type-from-vehicle-type (function vehicle-type type)) + +(define-extern h-bike-a type) +(declare-type h-bike-a vehicle) +(define-extern h-bike-b type) +(declare-type h-bike-b vehicle) +(define-extern h-bike-c type) +(declare-type h-bike-c vehicle) +(define-extern h-bike-d type) +(declare-type h-bike-d vehicle) +(define-extern h-car-a type) +(declare-type h-car-a vehicle) +(define-extern h-car-b type) +(declare-type h-car-b vehicle) +(define-extern h-car-c type) +(declare-type h-car-c vehicle) +(define-extern h-car-d type) +(declare-type h-car-d vehicle) +(define-extern h-hellcat type) +(declare-type h-hellcat vehicle) +(define-extern h-warf type) +(declare-type h-warf vehicle) +(define-extern h-glider type) +(declare-type h-glider vehicle) +(define-extern h-sled type) +(declare-type h-sled vehicle) +(define-extern h-kg-pickup type) +(declare-type h-kg-pickup vehicle) +(define-extern v-turtle type) +(declare-type v-turtle vehicle) +(define-extern v-snake type) +(declare-type v-snake vehicle) +(define-extern v-scorpion type) +(declare-type v-scorpion vehicle) +(define-extern v-toad type) +(declare-type v-toad vehicle) +(define-extern v-fox type) +(declare-type v-fox vehicle) +(define-extern v-rhino type) +(declare-type v-rhino vehicle) +(define-extern v-mirage type) +(declare-type v-mirage vehicle) +(define-extern v-x-ride type) +(declare-type v-x-ride vehicle) +(declare-type v-marauder vehicle) +(define-extern v-faccar type) +(declare-type v-faccar vehicle) +(define-extern v-catapult type) +(declare-type v-catapult vehicle) +(define-extern v-marauder-b type) +(declare-type v-marauder-b vehicle) +(define-extern evan-test-bike type) +(declare-type evan-test-bike vehicle) +(define-extern wbike-test type) +(declare-type wbike-test vehicle) +(define-extern test-car type) +(declare-type test-car vehicle) + ;; DECOMP BEGINS +(define *vehicle-rigid-body-queue* (new 'static 'rigid-body-queue)) + +(define *vehicle-info* (new 'static 'vehicle-info)) + +(dotimes (v1-2 44) + (set! (-> *vehicle-info* handle-by-vehicle-type v1-2) (the-as handle #f)) + ) + +(defun vehicle-entity-hack ((arg0 int)) + (with-pp + (case arg0 + ((27) + (set! (-> pp level) (-> *traffic-info* vehicle-level)) + ) + (else + (set! (-> pp level) (level-get *level* (-> *traffic-info* vehicle-levels arg0))) + ) + ) + 0 + (none) + ) + ) + +(deftype vehicle-manager (process) + () + (:state-methods + idle + active + ) + (:methods + (vehicle-manager-method-16 (_type_) none) + (vehicle-manager-method-17 (_type_) none) + ) + ) + + +;; WARN: Return type mismatch process vs vehicle-manager. +(defmethod relocate ((this vehicle-manager) (offset int)) + (set! *vehicle-manager* this) + (if *vehicle-manager* + (set! *vehicle-manager* (&+ *vehicle-manager* offset)) + ) + (the-as vehicle-manager ((method-of-type process relocate) this offset)) + ) + +(defmethod deactivate ((this vehicle-manager)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set! *vehicle-manager* #f) + (remove-setting *setting-control* this 'task-mask) + (apply-settings *setting-control*) + ((method-of-type process deactivate) this) + (none) + ) + +(defmethod vehicle-manager-method-17 ((this vehicle-manager)) + 0 + (none) + ) + +(defbehavior vehicle-manager-event-handler vehicle-manager ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('no-extra-bank) + (remove-setting! 'extra-bank) + ) + (('extra-bank) + (let ((a3-1 (-> arg3 param 0))) + (set-setting! 'extra-bank a3-1 0.0 0) + ) + ) + ) + ) + +(defbehavior vehicle-manager-init-by-other vehicle-manager () + (stack-size-set! (-> self main-thread) 128) + (vehicle-entity-hack 27) + (set! *vehicle-manager* self) + (vehicle-manager-method-17 self) + (add-setting! 'task-mask 'clear 0.0 (task-mask vehicle)) + (set! (-> self event-hook) vehicle-manager-event-handler) + (set! *rigid-body-queue-manager* + (the-as rigid-body-queue-manager (rigid-body-queue-manager-spawn *vehicle-rigid-body-queue* self)) + ) + (go-virtual idle) + ) + +(defstate idle (vehicle-manager) + :virtual #t + :event vehicle-manager-event-handler + :code (behavior () + (suspend) + (suspend) + (go-virtual active) + ) + ) + +(defstate active (vehicle-manager) + :virtual #t + :event vehicle-manager-event-handler + :code sleep-code + ) + +(defun vehicle-manager-start ((arg0 process)) + (if *vehicle-manager* + (change-parent *vehicle-manager* arg0) + (process-spawn vehicle-manager :name "vehicle-manager" :to arg0) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun vehicle-manager-kill () + (kill-by-type vehicle-manager *active-pool*) + (none) + ) + +;; WARN: Return type mismatch none vs object. +(defbehavior vehicle-init-by-other vehicle ((arg0 int) (arg1 traffic-object-spawn-params)) + (stack-size-set! (-> self main-thread) 16) + (logior! (-> self mask) (process-mask vehicle)) + (init-collision! self) + (set! (-> self root trans quad) (-> arg1 position quad)) + (quaternion-copy! (-> self root quat) (-> arg1 rotation)) + (set! (-> self root transv quad) (-> arg1 velocity quad)) + (if (logtest? (-> arg1 flags) (traffic-spawn-flags tsf6)) + (vehicle-method-149 self) + ) + (if (not (logtest? (-> arg1 flags) (traffic-spawn-flags tsf0))) + (vehicle-entity-hack arg0) + ) + (init-rbody-control! self) + (rigid-body-queue-method-11 *vehicle-rigid-body-queue* self) + (if (logtest? (-> arg1 flags) (traffic-spawn-flags tsf5)) + (set! (-> self v-flags) (the-as vehicle-flag (logior (vehicle-flag unique) (-> self v-flags)))) + ) + (set! (-> self traffic-priority-id) (the-as int (-> arg1 id))) + (vehicle-method-132 self arg1) + ) + +;; WARN: Return type mismatch process vs vehicle. +(defun vehicle-spawn-hack ((arg0 type) (arg1 traffic-object-spawn-params) (arg2 process)) + (let ((gp-0 (the-as process #f))) + (let* ((s3-0 (get-process *default-dead-pool* arg0 #x4000 1)) + (v1-1 (when s3-0 + (let ((t9-1 (method-of-type process activate))) + (t9-1 s3-0 arg2 "vehicle" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-0 vehicle-init-by-other 27 arg1) + (-> s3-0 ppointer) + ) + ) + ) + (when v1-1 + (set! gp-0 (-> v1-1 0)) + (change-parent gp-0 *vehicle-manager*) + ) + ) + (if (and gp-0 (logtest? (-> arg1 flags) (traffic-spawn-flags tsf1))) + (vehicle-method-133 (the-as vehicle gp-0) arg1) + ) + (the-as vehicle gp-0) + ) + ) + +;; WARN: Return type mismatch process vs process-drawable. +(defun vehicle-spawn ((arg0 vehicle-type) (arg1 traffic-object-spawn-params)) + (let ((gp-0 (the-as process #f))) + (cond + ((level-get *level* (-> *traffic-info* vehicle-levels arg0)) + (let* ((a1-3 (type-from-vehicle-type arg0)) + (s3-0 (get-process *default-dead-pool* a1-3 #x4000 1)) + (a0-4 (when s3-0 + (let ((t9-3 (method-of-type process activate))) + (t9-3 s3-0 *vehicle-manager* "vehicle" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-0 vehicle-init-by-other arg0 arg1) + (-> s3-0 ppointer) + ) + ) + ) + (when a0-4 + (set! gp-0 (-> a0-4 0)) + (when (logtest? (-> arg1 flags) (traffic-spawn-flags tsf5)) + (send-event (handle->process (-> *vehicle-info* handle-by-vehicle-type arg0)) 'go-die) + (set! (-> *vehicle-info* handle-by-vehicle-type arg0) (process->handle gp-0)) + ) + ) + ) + ) + (else + 0 + ) + ) + (if (and gp-0 (logtest? (-> arg1 flags) (traffic-spawn-flags tsf1))) + (vehicle-method-133 (the-as vehicle gp-0) arg1) + ) + (the-as process-drawable gp-0) + ) + ) + +(defun type-from-vehicle-type ((arg0 vehicle-type)) + (case arg0 + (((vehicle-type h-bike-a)) + h-bike-a + ) + (((vehicle-type h-bike-b)) + h-bike-b + ) + (((vehicle-type h-bike-c)) + h-bike-c + ) + (((vehicle-type h-bike-d)) + h-bike-d + ) + (((vehicle-type h-car-a)) + h-car-a + ) + (((vehicle-type h-car-b)) + h-car-b + ) + (((vehicle-type h-car-c)) + h-car-c + ) + (((vehicle-type h-hellcat)) + h-hellcat + ) + (((vehicle-type h-warf)) + h-warf + ) + (((vehicle-type h-glider)) + h-glider + ) + (((vehicle-type h-sled)) + h-sled + ) + (((vehicle-type h-kg-pickup)) + h-kg-pickup + ) + (((vehicle-type v-turtle)) + v-turtle + ) + (((vehicle-type v-snake)) + v-snake + ) + (((vehicle-type v-scorpion)) + v-scorpion + ) + (((vehicle-type v-toad)) + v-toad + ) + (((vehicle-type v-fox)) + v-fox + ) + (((vehicle-type v-rhino)) + v-rhino + ) + (((vehicle-type v-mirage)) + v-mirage + ) + (((vehicle-type v-x-ride)) + v-x-ride + ) + (((vehicle-type v-marauder)) + v-marauder + ) + (((vehicle-type v-faccar)) + v-faccar + ) + (((vehicle-type v-catapult)) + v-catapult + ) + (((vehicle-type v-marauder-b)) + v-marauder-b + ) + (((vehicle-type evan-test-bike)) + evan-test-bike + ) + (((vehicle-type wbike-test)) + wbike-test + ) + (((vehicle-type test-car)) + test-car + ) + (else + (the-as type #f) + ) + ) + ) diff --git a/goal_src/jak3/levels/common/race/race-control.gc b/goal_src/jak3/levels/common/race/race-control.gc index 041a4a045b..b3371ae337 100644 --- a/goal_src/jak3/levels/common/race/race-control.gc +++ b/goal_src/jak3/levels/common/race/race-control.gc @@ -7,3 +7,108 @@ ;; DECOMP BEGINS +(deftype race-control (structure) + ((state race-state) + (mesh race-mesh) + (path-select int8) + (path-group race-path-group) + (path race-path) + (path-t float) + (racer-state racer-state) + (path-sample race-path-sample :inline) + (lin-velocity vector :inline) + (ang-velocity vector :inline) + ) + (:methods + (race-control-method-9 (_type_ int vector) none) + (race-control-method-10 (_type_ race-state racer-state) none) + (race-control-method-11 (_type_ float) none) + (race-control-method-12 (_type_ vector) none) + ) + ) + + +(defmethod race-control-method-12 ((this race-control) (arg0 vector)) + (let* ((f0-0 (-> this path-t)) + (f0-2 (race-path-method-12 (-> this path) arg0 (+ -1.0 f0-0) (+ 1.0 f0-0))) + ) + (set! (-> this path-t) f0-2) + (race-path-method-11 (-> this path) (-> this path-sample) (-> this lin-velocity) f0-2) + ) + 0 + (none) + ) + +(defmethod race-control-method-11 ((this race-control) (arg0 float)) + (let ((f0-1 (+ (-> this path-t) (* 15.0 arg0)))) + (set! f0-1 (cond + ((logtest? (-> this mesh flags) (race-mesh-flag rmf0)) + (let ((f1-3 (the float (-> this path sample-count)))) + (if (>= f0-1 f1-3) + (set! f0-1 (- f0-1 f1-3)) + ) + ) + f0-1 + ) + (else + (fmin f0-1 (the float (+ (-> this path sample-count) -1))) + ) + ) + ) + (set! (-> this path-t) f0-1) + (race-path-method-11 (-> this path) (-> this path-sample) (-> this lin-velocity) f0-1) + ) + (vector-reset! (-> this ang-velocity)) + 0 + (none) + ) + +(defmethod race-control-method-9 ((this race-control) (arg0 int) (arg1 vector)) + (let ((v1-1 (-> this path-group path-count))) + (if (>= arg0 v1-1) + (set! arg0 0) + ) + (set! (-> this path-select) arg0) + (cond + ((> v1-1 0) + (let ((s4-0 (-> this path-group paths arg0))) + (set! (-> this path) s4-0) + (let ((s3-0 (new 'stack-no-clear 'race-mesh-slice-query))) + (set! (-> s3-0 search-sphere quad) (-> arg1 quad)) + (set! (-> s3-0 search-sphere r) 61440.0) + (race-mesh-method-13 (-> this mesh) (the-as race-mesh-slice-query (&-> s3-0 slice-id))) + (when (!= (-> s3-0 slice-id) -1) + (let* ((v1-12 (-> this mesh slices (-> s3-0 slice-id))) + (f0-1 (-> (the-as (pointer float) (+ (* (-> v1-12 start-edge) 4) (the-as int (-> s4-0 edge-infos)))))) + (f1-0 (-> (the-as (pointer float) (+ (* (-> v1-12 end-edge) 4) (the-as int (-> s4-0 edge-infos)))))) + ) + (when (and (>= f0-1 0.0) (>= f1-0 0.0)) + (let ((f0-2 (race-path-method-12 s4-0 arg1 f0-1 f1-0))) + (set! (-> this path-t) f0-2) + (race-path-method-11 (-> this path) (-> this path-sample) (-> this lin-velocity) f0-2) + ) + ) + ) + ) + ) + ) + ) + (else + (set! (-> this path) #f) + ) + ) + ) + 0 + (none) + ) + +(defmethod race-control-method-10 ((this race-control) (arg0 race-state) (arg1 racer-state)) + (set! (-> this state) arg0) + (set! (-> this mesh) (-> arg0 info mesh)) + (if (-> this mesh) + (set! (-> this path-group) (-> this mesh path-groups 0)) + ) + (set! (-> this racer-state) arg1) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/common/race/race-h.gc b/goal_src/jak3/levels/common/race/race-h.gc index 0b3882ec92..a835535975 100644 --- a/goal_src/jak3/levels/common/race/race-h.gc +++ b/goal_src/jak3/levels/common/race/race-h.gc @@ -5,5 +5,287 @@ ;; name in dgo: race-h ;; dgos: WASLEAPR, DESRALLY, DESTRACK +;; +++racer-info-flag +(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 + + +;; +++race-info-flag +(defenum race-info-flag + :type uint8 + :bitfield #t + ) +;; ---race-info-flag + + +;; +++racer-state-flags +(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 + + +;; +++race-state-enum +(defenum race-state-enum + :type uint8 + (rs0) + (rs1) + (rs2) + (rs3) + (rs4) + (rs5) + (rs6) + (rs7) + (rs8) + ) +;; ---race-state-enum + + +;; +++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 + + +;; +++race-mesh-flag +(defenum race-mesh-flag + :type uint8 + :bitfield #t + (rmf0 0) + (rmf1 1) + ) +;; ---race-mesh-flag + + +(declare-type race-state structure) + ;; DECOMP BEGINS +(deftype race-turbo-pad (structure) + ((position vector :inline) + (handle handle) + ) + ) + + +(deftype race-decision-point (structure) + ((pos float) + (decision-type uint8) + (shortcuts uint8) + (safe-paths uint8) + ) + ) + + +(deftype race-racer-info (structure) + ((rider uint8) + (vehicle uint8) + (flags racer-info-flag) + (seek-offset int8) + ) + ) + + +(deftype race-info (basic) + ((race-mesh-name string) + (path-group-name string) + (task-node game-task-node) + (mesh race-mesh) + (ai-min-speed-factor float) + (ai-max-speed-factor float) + (ai-spread-factor float) + (start-sphere sphere :inline) + (start-dir vector :inline) + (finish-sphere sphere :inline) + (finish-dir vector :inline) + (player-intro-pos vector :inline) + (flags racer-info-flag) + (score uint8) + (lap-count int8) + (racer-count int8) + (turbo-pad-count int8) + (map-index int8) + (decision-point-count int8) + (safe-paths uint8) + (turbo-pad-array (inline-array race-turbo-pad)) + (racer-array (inline-array race-racer-info)) + (decision-point-array (inline-array race-decision-point)) + (level symbol) + (borrow-level symbol) + (borrow pair) + (manager handle) + (manager-handle-init-hack symbol :overlay-at manager) + (hatch-actor-name string) + (countdown-scene string) + (complete-continue string) + (start-camera string) + (go-speech uint16) + ) + (:methods + (init-by-mesh! (_type_) none) + ) + ) + + +(deftype racer-state (structure) + ((position vector :inline) + (racer handle) + (flags racer-state-flags) + (rank int8) + (finish-count int8) + (lap-count int8) + (lap-quadrant int8) + (rider uint8) + (lap-distance float) + (lap-distance-prev float) + (pos float) + (target-pos-offset float) + (speed-factor float) + (finish-time uint32) + (lap-start uint32) + (best-lap-time uint32) + (lap-time-array float 5) + (start-position vector :inline) + ) + (:methods + (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) + ) + ) + + +(deftype race-state (structure) + ((info race-info) + (flags race-flag) + (state race-state-enum) + (racer-count int8) + (finished-count int8) + (i-player int8) + (i-countdown int8) + (manager handle) + (scene-player handle) + (race-signal handle) + (arrow handle) + (hud-timer handle) + (hud-lap-counter handle) + (hud-turbo-counter handle) + (hud-position handle) + (current-time uint32) + (countdown-start-time uint32) + (race-start-time uint32) + (rankings int8 10) + (target-pos float) + (suck-factor float) + (player-win? symbol) + (new-score? symbol) + (racer-array racer-state 10 :inline) + (player-intro-curve cubic-curve :inline) + ) + (:methods + (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) + (setup-race (_type_) none) + (get-racer-count (_type_) int) + ) + ) + + +(deftype race-manager (process) + ((race-state race-state) + (state-time time-frame) + (player-on-track-time time-frame) + (message-id sound-id) + (finish-sound-id sound-id) + (show-stats? symbol) + ) + (:state-methods + idle + active + fail + win + lose + die + ) + (:methods + (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) + ) + ) + + +(deftype hud-race-timer (hud) + () + ) + + +(deftype hud-race-lap-counter (hud) + () + ) + + +(deftype hud-race-turbo-counter (hud) + () + ) + + +(deftype hud-race-position (hud) + () + ) + + +(define *race-manager* (the-as (pointer race-manager) #f)) diff --git a/goal_src/jak3/levels/common/race/race-hud.gc b/goal_src/jak3/levels/common/race/race-hud.gc index 0bf0e10fa1..b1b8aa122f 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 644f9f6b4a..b0a7e784e2 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 5fe6e2b2a6..e04a48debc 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/common/race/race-mesh.gc b/goal_src/jak3/levels/common/race/race-mesh.gc index 2aef51a2fc..637c294723 100644 --- a/goal_src/jak3/levels/common/race/race-mesh.gc +++ b/goal_src/jak3/levels/common/race/race-mesh.gc @@ -7,3 +7,781 @@ ;; DECOMP BEGINS +(deftype race-mesh-hash-search (structure) + ((best-dist float) + (debug-cells-searched int32) + (debug-slices-searched int32) + (bounds bounding-box4w :inline) + (cell-quads vector 2 :inline) + (slice-quads vector 4 :inline) + (cell-bits vector16ub 2 :inline :overlay-at cell-quads) + (slice-bits vector16ub 2 :inline :overlay-at slice-quads) + ) + ) + + +(deftype race-mesh-slice-query (structure) + ((slice-id int16) + (lap-dist float) + (pt-on-slice vector :inline) + (slice-corners vector 4 :inline) + (search-sphere sphere :inline) + ) + ) + + +(deftype race-path-edge-info (structure) + ((sample-t float) + ) + ) + + +(deftype race-path-sample (structure) + ((bytes uint8 32) + (pos vector :inline :overlay-at (-> bytes 0)) + (quat quaternion :inline :overlay-at (-> bytes 16)) + (stick-x int8 :overlay-at (-> bytes 12)) + (stick-y int8 :overlay-at (-> bytes 13)) + (throttle uint8 :overlay-at (-> bytes 14)) + (flags uint8 :overlay-at (-> bytes 15)) + ) + ) + + +(deftype race-path (structure) + ((sample-count uint16) + (record-id int8) + (pad uint8) + (samples (inline-array race-path-sample)) + (edge-infos (inline-array race-path-edge-info)) + ) + (:methods + (draw-path-debug (_type_ rgba rgba) none) + (race-path-method-10 (_type_ vector float float) none) + (race-path-method-11 (_type_ race-path-sample vector float) none) + (race-path-method-12 (_type_ vector float float) float) + ) + ) + + +(deftype race-path-group (structure) + ((name string) + (path-count int8) + (pad uint8 3) + (paths (inline-array race-path)) + ) + ) + + +(deftype race-mesh-edge (structure) + ((left vector :inline) + (right vector :inline) + (lap-dist float :overlay-at (-> left data 3)) + ) + ) + + +(deftype race-mesh-slice (structure) + ((edge-index-array uint16 2) + (start-edge int16 :overlay-at (-> edge-index-array 0)) + (end-edge int16 :overlay-at (-> edge-index-array 1)) + ) + :pack-me + ) + + +(deftype race-mesh-hash-cell (structure) + ((first-slice int16) + (slice-count uint8) + (pad uint8) + ) + ) + + +(deftype race-mesh-hash (structure) + ((cells-wide int8) + (cells-tall int8) + (cell-length float) + (cells (inline-array race-mesh-hash-cell)) + (slice-table (inline-array race-mesh-slice)) + (origin vector :inline) + ) + ) + + +(deftype race-mesh (basic) + ((version uint8) + (path-group-count uint8) + (flags race-mesh-flag) + (pad uint8 1) + (slice-count int16) + (edge-count int16) + (slices (inline-array race-mesh-slice)) + (edges (inline-array race-mesh-edge)) + (hash race-mesh-hash) + (path-groups (inline-array race-path-group)) + ) + (:methods + (debug-draw-path (_type_ int int rgba rgba) none) + (debug-draw-path-from-history (_type_ int int) symbol) + (debug-draw-slice (_type_ int) none) + (debug-draw-edges (_type_) none) + (race-mesh-method-13 (_type_ race-mesh-slice-query) none) + (race-mesh-method-14 (_type_ race-mesh-slice-query) none) + (race-mesh-method-15 (_type_ int race-mesh-slice-query) none) + (race-mesh-method-16 (_type_ race-mesh-slice-query) none) + (race-mesh-method-17 (_type_ race-mesh-slice-query) symbol) + (race-mesh-method-18 (_type_ race-mesh-hash-search int int race-mesh-slice-query) none) + (race-mesh-method-19 (_type_ int race-mesh-slice-query) symbol) + ) + ) + + +(defmethod race-path-method-10 ((this race-path) (arg0 vector) (arg1 float) (arg2 float)) + (let ((v1-0 (new 'stack-no-clear 'inline-array 'vector 4)) + (a3-1 (the int arg1)) + ) + (set! (-> v1-0 0 quad) (-> this samples a3-1 pos quad)) + (set! (-> v1-0 1 quad) (-> this samples (+ a3-1 1) pos quad)) + (let ((f0-3 (- arg1 (the float a3-1)))) + (vector-lerp! arg0 (-> v1-0 0) (-> v1-0 1) f0-3) + ) + ) + 0 + (none) + ) + +(defmethod race-path-method-11 ((this race-path) (arg0 race-path-sample) (arg1 vector) (arg2 float)) + (let ((gp-0 (new 'stack-no-clear 'inline-array 'race-path-sample 6))) + (let ((f0-1 (the float (-> this sample-count)))) + (if (< f0-1 arg2) + (set! arg2 (- arg2 f0-1)) + ) + (if (< arg2 0.0) + (set! arg2 (+ arg2 f0-1)) + ) + ) + (let ((s1-0 (the int arg2))) + (mem-copy! (the-as pointer (-> gp-0 0)) (the-as pointer (-> this samples s1-0)) 32) + (mem-copy! (the-as pointer (-> gp-0 1)) (the-as pointer (-> this samples (+ s1-0 1))) 32) + (let ((v1-7 (+ s1-0 2))) + (if (< (the-as int (-> this sample-count)) v1-7) + (set! v1-7 (- v1-7 (the-as int (-> this sample-count)))) + ) + (mem-copy! (the-as pointer (-> gp-0 2)) (the-as pointer (-> this samples v1-7)) 32) + ) + (let ((f30-0 (- arg2 (the float s1-0)))) + (vector-lerp! (-> arg0 pos) (the-as vector (-> gp-0 0)) (the-as vector (-> gp-0 1)) f30-0) + (quaternion-slerp! (-> arg0 quat) (-> gp-0 0 quat) (-> gp-0 1 quat) f30-0) + (set! (-> arg0 stick-x) + (the int (+ 0.5 (* (the float (-> gp-0 1 stick-x)) f30-0) (* (the float (-> gp-0 0 stick-x)) (- 1.0 f30-0)))) + ) + (set! (-> arg0 stick-y) (-> gp-0 0 stick-y)) + (set! (-> arg0 throttle) + (the-as + uint + (the int + (+ 0.5 (* (the float (-> gp-0 1 throttle)) f30-0) (* (the float (-> gp-0 0 throttle)) (- 1.0 f30-0))) + ) + ) + ) + (set! (-> arg0 flags) (-> gp-0 0 flags)) + (vector-! (the-as vector (-> gp-0 4)) (the-as vector (-> gp-0 1)) (the-as vector (-> gp-0 0))) + (vector-float*! (the-as vector (-> gp-0 3)) (the-as vector (-> gp-0 4)) 15.0) + (vector-! (the-as vector (-> gp-0 4)) (the-as vector (-> gp-0 2)) (the-as vector (-> gp-0 1))) + (vector-float*! (the-as vector (-> gp-0 3 quat)) (the-as vector (-> gp-0 4)) 15.0) + (vector-lerp! arg1 (the-as vector (-> gp-0 3)) (the-as vector (-> gp-0 3 quat)) f30-0) + ) + ) + ) + 0 + 0 + (none) + ) + +(defmethod race-path-method-12 ((this race-path) (arg0 vector) (arg1 float) (arg2 float)) + (local-vars (v1-15 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 arg2) + (s4-0 (new 'stack-no-clear 'matrix)) + (f30-0 (the float (-> this sample-count))) + ) + (if (< f30-0 gp-0) + (set! gp-0 (- gp-0 f30-0)) + ) + (if (< arg1 0.0) + (set! arg1 (+ arg1 f30-0)) + ) + (race-path-method-10 this (-> s4-0 rvec) arg1 arg2) + (race-path-method-10 this (-> s4-0 uvec) gp-0 arg2) + (vector-! (-> s4-0 fvec) (-> s4-0 uvec) (-> s4-0 rvec)) + (vector-! (-> s4-0 trans) arg0 (-> s4-0 rvec)) + (let ((f0-7 0.0) + (f1-1 1.0) + (f2-1 (vector-dot (-> s4-0 fvec) (-> s4-0 trans))) + ) + (.lvf vf1 (&-> (-> s4-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 v1-15 vf1) + (let ((f0-8 (fmax f0-7 (fmin f1-1 (/ f2-1 v1-15))))) + (if (< gp-0 arg1) + (set! gp-0 (+ gp-0 f30-0)) + ) + (let ((f0-10 (+ (* arg1 (- 1.0 f0-8)) (* gp-0 f0-8)))) + (if (< f30-0 f0-10) + (set! f0-10 (- f0-10 f30-0)) + ) + (if (< f0-10 0.0) + (+! f0-10 f30-0) + ) + f0-10 + ) + ) + ) + ) + ) + ) + +(defmethod draw-path-debug ((this race-path) (arg0 rgba) (arg1 rgba)) + (local-vars (sv-32 vector) (sv-48 race-path-sample)) + (let ((s0-0 0) + (s3-0 1) + (s2-0 (+ (-> this sample-count) -1)) + (s1-0 (new 'stack-no-clear 'vector)) + ) + (set! sv-32 s1-0) + (let ((v1-1 (-> (math-camera-pos) quad))) + (set! (-> sv-32 quad) v1-1) + ) + (while (< s0-0 (the-as int s2-0)) + (let ((s0-1 (-> this samples s0-0))) + (set! sv-48 (-> this samples s3-0)) + (let ((f0-0 (vector-vector-distance-squared (-> s0-1 pos) s1-0)) + (f1-0 819200.0) + ) + (if (< f0-0 (* f1-0 f1-0)) + (add-debug-line #t (bucket-id debug) (-> s0-1 pos) (-> sv-48 pos) arg0 #f arg1) + ) + ) + ) + (set! s0-0 s3-0) + (set! s3-0 (min (+ s3-0 1) (the-as int s2-0))) + ) + ) + (format + *stdcon* + "path ~d time ~5,,3f~%" + (-> this record-id) + (* 0.06666667 (the float (-> this sample-count))) + ) + 0 + (none) + ) + +(defmethod debug-draw-path ((this race-mesh) (arg0 int) (arg1 int) (arg2 rgba) (arg3 rgba)) + (when (< arg1 (the-as int (-> this path-group-count))) + (let ((v1-2 (-> this path-groups arg1))) + (if (< arg0 (-> v1-2 path-count)) + (draw-path-debug (-> v1-2 paths arg0) arg2 arg3) + ) + ) + ) + (none) + ) + +(defmethod debug-draw-path-from-history ((this race-mesh) (arg0 int) (arg1 int)) + (when (< arg1 (the-as int (-> this path-group-count))) + (let ((v1-2 (-> this path-groups arg1))) + (countdown (a2-1 (-> v1-2 path-count)) + (let ((a0-3 (-> v1-2 paths a2-1))) + (when (= (-> a0-3 record-id) arg0) + (let ((v1-3 (new 'static 'array rgba 16 + (new 'static 'rgba :r #x40 :a #x80) + (new 'static 'rgba :r #xff :g #x30 :b #x30 :a #x80) + (new 'static 'rgba :g #xff :a #x80) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + (new 'static 'rgba :b #xff :a #x80) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + (new 'static 'rgba :r #x60 :g #x60 :b #x60 :a #x80) + (new 'static 'rgba :r #xff :g #xff :a #x80) + (new 'static 'rgba :g #xff :b #xff :a #x80) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + (new 'static 'rgba :r #xff :b #xff :a #x80) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + (new 'static 'rgba :r #xff :g #x80 :b #x40 :a #x80) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + (new 'static 'rgba :a #x80) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + ) + ) + (a2-2 (* arg0 2)) + ) + (draw-path-debug a0-3 (-> v1-3 a2-2) (-> v1-3 (+ a2-2 1))) + ) + (return #f) + ) + ) + ) + ) + #f + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod debug-draw-slice ((this race-mesh) (arg0 int)) + (let* ((v1-1 (-> this slices arg0)) + (s3-0 (-> this edges (-> v1-1 start-edge))) + (s4-0 (-> this edges (-> v1-1 end-edge))) + ) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> s3-0 left) + (-> s3-0 right) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + #f + (the-as rgba -1) + ) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> s3-0 right) + (-> s4-0 right) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + #f + (the-as rgba -1) + ) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> s4-0 right) + (-> s4-0 left) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + #f + (the-as rgba -1) + ) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> s4-0 left) + (-> s3-0 left) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + #f + (the-as rgba -1) + ) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector+! s5-0 (-> s3-0 left) (-> s3-0 right)) + (vector+! s5-0 s5-0 (-> s4-0 left)) + (vector+! s5-0 s5-0 (-> s4-0 right)) + (vector-float*! s5-0 s5-0 0.25) + (let ((s4-1 add-debug-text-3d) + (s3-1 #t) + (s2-0 577) + ) + (format (clear *temp-string*) "~D" arg0) + (s4-1 s3-1 (the-as bucket-id s2-0) *temp-string* s5-0 (font-color white) (the-as vector2h #f)) + ) + ) + ) + (none) + ) + +(defmethod debug-draw-edges ((this race-mesh)) + (let ((s5-0 0) + (s4-0 (+ (-> this slice-count) -1)) + ) + (while (>= s4-0 s5-0) + (let* ((v1-2 (-> this slices s5-0)) + (s3-0 (-> this edges (-> v1-2 start-edge))) + (s2-0 (-> this edges (-> v1-2 end-edge))) + ) + (add-debug-line #t (bucket-id debug-no-zbuf1) (-> s3-0 left) (-> s2-0 left) *color-white* #f (the-as rgba -1)) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> s3-0 right) + (-> s2-0 right) + *color-white* + #f + (the-as rgba -1) + ) + (add-debug-line #t (bucket-id debug-no-zbuf1) (-> s2-0 left) (-> s2-0 right) *color-gray* #f (the-as rgba -1)) + ) + (+! s5-0 1) + ) + ) + (let ((v1-8 (-> this edges 0))) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> v1-8 left) + (-> v1-8 right) + *color-green* + #f + (the-as rgba -1) + ) + ) + (let ((s5-1 (+ (-> this edge-count) -1))) + (let ((v1-12 (-> this edges s5-1))) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> v1-12 left) + (-> v1-12 right) + *color-red* + #f + (the-as rgba -1) + ) + ) + (format *stdcon* "edge-count ~d last-edge ~d~%" (-> this edge-count) s5-1) + ) + 0 + (none) + ) + +(defmethod race-mesh-method-19 ((this race-mesh) (arg0 int) (arg1 race-mesh-slice-query)) + (set! (-> arg1 slice-id) -1) + (let* ((v1-2 (-> this slices arg0)) + (a1-3 (-> this edges (-> v1-2 start-edge))) + (v1-5 (-> this edges (-> v1-2 end-edge))) + ) + (set! (-> arg1 slice-corners 0 quad) (-> a1-3 left quad)) + (set! (-> arg1 slice-corners 1 quad) (-> a1-3 right quad)) + (set! (-> arg1 slice-corners 2 quad) (-> v1-5 right quad)) + (set! (-> arg1 slice-corners 3 quad) (-> v1-5 left quad)) + ) + (let ((v1-8 (new 'stack-no-clear 'vector)) + (a0-6 (new 'stack-no-clear 'vector)) + ) + (countdown (a1-8 4) + (vector-! a0-6 (-> arg1 slice-corners (logand (+ a1-8 1) 3)) (-> arg1 slice-corners a1-8)) + (vector-! v1-8 (the-as vector (-> arg1 search-sphere)) (-> arg1 slice-corners a1-8)) + (if (< (- (* (-> a0-6 z) (-> v1-8 x)) (* (-> a0-6 x) (-> v1-8 z))) 0.0) + (return #f) + ) + ) + ) + (let ((v1-11 (new 'stack-no-clear 'vector)) + (a0-7 (new 'stack-no-clear 'vector)) + ) + (vector-! v1-11 (-> arg1 slice-corners 2) (the-as vector (-> arg1 slice-corners))) + (vector-! a0-7 (the-as vector (-> arg1 search-sphere)) (the-as vector (-> arg1 slice-corners))) + (let ((f0-5 (- (* (-> v1-11 z) (-> a0-7 x)) (* (-> v1-11 x) (-> a0-7 z)))) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (cond + ((< f0-5 0.0) + (vector-! s4-0 (-> arg1 slice-corners 1) (the-as vector (-> arg1 slice-corners))) + (vector-cross! s3-0 s4-0 v1-11) + ) + (else + (vector-! s4-0 (-> arg1 slice-corners 3) (the-as vector (-> arg1 slice-corners))) + (vector-cross! s3-0 v1-11 s4-0) + ) + ) + (vector-normalize! s3-0 1.0) + (set-vector! s4-0 0.0 -1.0 0.0 1.0) + (let ((f0-10 (intersect-ray-plane (-> arg1 search-sphere) s4-0 (the-as vector (-> arg1 slice-corners)) s3-0))) + (vector+float*! (-> arg1 pt-on-slice) (the-as vector (-> arg1 search-sphere)) s4-0 f0-10) + ) + ) + ) + (if (< (- (-> arg1 search-sphere y) (-> arg1 pt-on-slice y)) -8192.0) + (return #f) + ) + (set! (-> arg1 slice-id) arg0) + #t + ) + +(defmethod race-mesh-method-17 ((this race-mesh) (arg0 race-mesh-slice-query)) + (set! (-> arg0 slice-id) -1) + (let* ((s4-0 (-> this hash)) + (v1-2 (max 0 (min + (the int (/ (- (-> arg0 search-sphere x) (-> s4-0 origin x)) (-> s4-0 cell-length))) + (+ (-> s4-0 cells-wide) -1) + ) + ) + ) + (a0-4 (max 0 (min + (the int (/ (- (-> arg0 search-sphere z) (-> s4-0 origin z)) (-> s4-0 cell-length))) + (+ (-> s4-0 cells-tall) -1) + ) + ) + ) + (s3-0 (the-as object (+ (the-as uint (-> s4-0 cells)) (* (+ (* a0-4 (-> s4-0 cells-wide)) v1-2) 4)))) + (s1-0 (-> (the-as race-mesh-hash-cell s3-0) slice-count)) + ) + (when (nonzero? s1-0) + (let ((s2-0 (new 'stack-no-clear 'race-mesh-slice-query))) + (mem-copy! (the-as pointer s2-0) (the-as pointer arg0) 112) + (while (nonzero? s1-0) + (+! s1-0 -1) + (let ((a1-7 (-> (&-> (-> s4-0 slice-table) 0 edge-index-array (+ (-> (the-as (pointer int16) s3-0)) s1-0)) 0))) + (when (race-mesh-method-19 this (the-as int a1-7) s2-0) + (if (or (= (-> arg0 slice-id) -1) + (< (vector-vector-distance-squared (-> s2-0 pt-on-slice) (-> arg0 search-sphere)) + (vector-vector-distance-squared (-> arg0 pt-on-slice) (-> arg0 search-sphere)) + ) + ) + (mem-copy! (the-as pointer arg0) (the-as pointer s2-0) 112) + ) + ) + ) + ) + ) + #f + ) + ) + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod race-mesh-method-15 ((this race-mesh) (arg0 int) (arg1 race-mesh-slice-query)) + (local-vars (v1-8 symbol)) + (set! (-> arg1 slice-id) arg0) + (let* ((v1-1 (-> this slices arg0)) + (a1-3 (-> this edges (-> v1-1 start-edge))) + (v1-4 (-> this edges (-> v1-1 end-edge))) + ) + (set! (-> arg1 slice-corners 0 quad) (-> a1-3 left quad)) + (set! (-> arg1 slice-corners 1 quad) (-> a1-3 right quad)) + (set! (-> arg1 slice-corners 2 quad) (-> v1-4 right quad)) + (set! (-> arg1 slice-corners 3 quad) (-> v1-4 left quad)) + ) + (let ((v1-7 (new 'stack-no-clear 'vector)) + (a0-6 (new 'stack-no-clear 'vector)) + ) + (countdown (a1-8 4) + (vector-! a0-6 (-> arg1 slice-corners (logand (+ a1-8 1) 3)) (-> arg1 slice-corners a1-8)) + (vector-! v1-7 (the-as vector (-> arg1 search-sphere)) (-> arg1 slice-corners a1-8)) + (when (< (- (* (-> a0-6 z) (-> v1-7 x)) (* (-> a0-6 x) (-> v1-7 z))) 0.0) + (set! v1-8 #f) + (goto cfg-6) + ) + ) + ) + (set! v1-8 #t) + (label cfg-6) + (cond + (v1-8 + (let ((v1-11 (new 'stack-no-clear 'vector)) + (a0-7 (new 'stack-no-clear 'vector)) + ) + (vector-! v1-11 (-> arg1 slice-corners 2) (the-as vector (-> arg1 slice-corners))) + (vector-! a0-7 (the-as vector (-> arg1 search-sphere)) (the-as vector (-> arg1 slice-corners))) + (let ((f0-5 (- (* (-> v1-11 z) (-> a0-7 x)) (* (-> v1-11 x) (-> a0-7 z)))) + (s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (cond + ((< f0-5 0.0) + (vector-! s5-0 (-> arg1 slice-corners 1) (the-as vector (-> arg1 slice-corners))) + (vector-cross! s4-0 s5-0 v1-11) + ) + (else + (vector-! s5-0 (-> arg1 slice-corners 3) (the-as vector (-> arg1 slice-corners))) + (vector-cross! s4-0 v1-11 s5-0) + ) + ) + (vector-normalize! s4-0 1.0) + (set-vector! s5-0 0.0 -1.0 0.0 1.0) + (let ((f0-10 (intersect-ray-plane (-> arg1 search-sphere) s5-0 (the-as vector (-> arg1 slice-corners)) s4-0))) + (vector+float*! (-> arg1 pt-on-slice) (the-as vector (-> arg1 search-sphere)) s5-0 f0-10) + ) + ) + ) + ) + (else + (let ((s5-1 (new 'stack-no-clear 'vector)) + (f30-0 -1.0) + ) + (countdown (s4-1 4) + (let ((f0-11 (vector-segment-distance-point! + (-> arg1 search-sphere) + (-> arg1 slice-corners s4-1) + (-> arg1 slice-corners (logand (+ s4-1 1) 3)) + s5-1 + ) + ) + ) + (when (or (< f30-0 0.0) (< f0-11 f30-0)) + (set! f30-0 f0-11) + (set! (-> arg1 pt-on-slice quad) (-> s5-1 quad)) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod race-mesh-method-18 ((this race-mesh) (arg0 race-mesh-hash-search) (arg1 int) (arg2 int) (arg3 race-mesh-slice-query)) + (let* ((v1-3 (+ (* arg2 (-> this hash cells-wide)) arg1)) + (a0-1 (/ v1-3 8)) + (a1-2 (ash 1 (logand v1-3 7))) + (a2-4 (-> (the-as race-mesh-hash-search (+ a0-1 (the-as int arg0))) cell-bits 0 data 0)) + ) + (when (not (logtest? a2-4 a1-2)) + (set! (-> arg0 cell-bits 0 data a0-1) (logior a2-4 a1-2)) + (let* ((v1-5 (the-as object (+ (the-as uint (-> this hash cells)) (* v1-3 4)))) + (s3-0 (&-> (-> this hash slice-table) 0 edge-index-array (-> (the-as (pointer int16) v1-5)))) + (s1-0 (-> (the-as race-mesh-hash-cell v1-5) slice-count)) + ) + (when (nonzero? s1-0) + (let ((s2-0 (new 'stack-no-clear 'race-mesh-slice-query))) + (mem-copy! (the-as pointer s2-0) (the-as pointer arg3) 112) + (while (nonzero? s1-0) + (+! s1-0 -1) + (let* ((a1-7 (-> s3-0 0)) + (v1-6 (shr a1-7 3)) + (a0-10 (ash 1 (the-as int (logand a1-7 7)))) + (a2-9 (-> arg0 slice-bits 0 data v1-6)) + ) + (when (not (logtest? a2-9 a0-10)) + (set! (-> arg0 slice-bits 0 data v1-6) (logior a2-9 a0-10)) + (race-mesh-method-15 this (the-as int a1-7) s2-0) + (let ((f0-0 (vector-vector-distance-squared (-> s2-0 pt-on-slice) (-> arg3 search-sphere)))) + (when (or (= (-> arg3 slice-id) -1) (< f0-0 (-> arg0 best-dist))) + (set! (-> arg0 best-dist) f0-0) + (mem-copy! (the-as pointer arg3) (the-as pointer s2-0) 112) + ) + ) + ) + ) + (set! s3-0 (&-> s3-0 1)) + ) + ) + ) + ) + ) + ) + (none) + ) + +(defmethod race-mesh-method-16 ((this race-mesh) (arg0 race-mesh-slice-query)) + (set! (-> arg0 slice-id) -1) + (let ((s4-0 (-> this hash)) + (s3-0 (new 'stack-no-clear 'race-mesh-hash-search)) + ) + (let ((v1-3 (/ (+ (-> this slice-count) 127) 128))) + (when (< 4 v1-3) + (break!) + 0 + ) + (while (nonzero? v1-3) + (+! v1-3 -1) + (set! (-> s3-0 slice-bits v1-3 quad) (the-as uint128 0)) + ) + ) + (set! (-> s3-0 cell-bits 0 quad) (the-as uint128 0)) + (set! (-> s3-0 cell-bits 1 quad) (the-as uint128 0)) + (let ((f0-1 (/ 1.0 (-> s4-0 cell-length))) + (f1-2 (fmin (-> arg0 search-sphere r) (* 0.5 (-> s4-0 cell-length)))) + ) + (let ((f3-1 (- (-> arg0 search-sphere x) f1-2)) + (f2-4 (- (-> arg0 search-sphere z) f1-2)) + ) + (set! (-> s3-0 bounds min x) + (max 0 (min (the int (* (- f3-1 (-> s4-0 origin x)) f0-1)) (+ (-> s4-0 cells-wide) -1))) + ) + (set! (-> s3-0 bounds min z) + (max 0 (min (the int (* (- f2-4 (-> s4-0 origin z)) f0-1)) (+ (-> s4-0 cells-tall) -1))) + ) + ) + (let ((f2-9 (+ (-> arg0 search-sphere x) f1-2)) + (f1-3 (+ (-> arg0 search-sphere z) f1-2)) + ) + (set! (-> s3-0 bounds max x) + (max 0 (min (the int (* (- f2-9 (-> s4-0 origin x)) f0-1)) (+ (-> s4-0 cells-wide) -1))) + ) + (set! (-> s3-0 bounds max z) + (max 0 (min (the int (* (- f1-3 (-> s4-0 origin z)) f0-1)) (+ (-> s4-0 cells-tall) -1))) + ) + ) + ) + (let ((s2-0 (-> s3-0 bounds min z))) + (until (< (-> s3-0 bounds max z) s2-0) + (let ((s1-0 (-> s3-0 bounds min x))) + (until (< (-> s3-0 bounds max x) s1-0) + (race-mesh-method-18 this s3-0 s1-0 s2-0 arg0) + (+! s1-0 1) + ) + ) + (+! s2-0 1) + ) + ) + (when (and (= (-> arg0 slice-id) -1) (< (* 0.5 (-> s4-0 cell-length)) (-> arg0 search-sphere r))) + (while (= (-> arg0 slice-id) -1) + (set! (-> s3-0 bounds min x) (max 0 (+ (-> s3-0 bounds min x) -1))) + (set! (-> s3-0 bounds min z) (max 0 (+ (-> s3-0 bounds min z) -1))) + (set! (-> s3-0 bounds max x) (min (+ (-> s3-0 bounds max x) 1) (+ (-> s4-0 cells-wide) -1))) + (set! (-> s3-0 bounds max z) (min (+ (-> s3-0 bounds max z) 1) (+ (-> s4-0 cells-tall) -1))) + (let ((s2-1 (-> s3-0 bounds min x))) + (until (< (-> s3-0 bounds max x) s2-1) + (race-mesh-method-18 this s3-0 s2-1 (-> s3-0 bounds min z) arg0) + (race-mesh-method-18 this s3-0 s2-1 (-> s3-0 bounds max z) arg0) + (+! s2-1 1) + ) + ) + (let ((s2-2 (-> s3-0 bounds min z))) + (until (< (-> s3-0 bounds max z) s2-2) + (race-mesh-method-18 this s3-0 (-> s3-0 bounds min x) s2-2 arg0) + (race-mesh-method-18 this s3-0 (-> s3-0 bounds max x) s2-2 arg0) + (+! s2-2 1) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defmethod race-mesh-method-14 ((this race-mesh) (arg0 race-mesh-slice-query)) + (let* ((f30-0 (vector-line-distance-point! + (-> arg0 pt-on-slice) + (the-as vector (-> arg0 slice-corners)) + (-> arg0 slice-corners 1) + (the-as vector #f) + ) + ) + (f1-0 (vector-line-distance-point! + (-> arg0 pt-on-slice) + (-> arg0 slice-corners 2) + (-> arg0 slice-corners 3) + (the-as vector #f) + ) + ) + (f0-0 (+ f30-0 f1-0)) + (v1-1 (-> this slices (-> arg0 slice-id))) + (f2-0 (-> this edges (-> v1-1 start-edge) left w)) + (f3-0 (-> this edges (-> v1-1 end-edge) left w)) + ) + (set! (-> arg0 lap-dist) (+ (* (/ f1-0 f0-0) f2-0) (* (/ f30-0 f0-0) f3-0))) + ) + (none) + ) + +(defmethod race-mesh-method-13 ((this race-mesh) (arg0 race-mesh-slice-query)) + (race-mesh-method-17 this arg0) + (if (and (= (-> arg0 slice-id) -1) (< 0.0 (-> arg0 search-sphere r))) + (race-mesh-method-16 this arg0) + ) + (when (!= (-> arg0 slice-id) -1) + (race-mesh-method-14 this arg0) + 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 9d6403937e..7dcbe11bc3 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 3aaa497277..77f914e6bb 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 cda8f2da45..d3b1b2385f 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 ec3d544dbd..732ef72ff6 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 18081ff6a4..cbefa1bd82 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 eb00b17eea..cbe8430df2 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 03a242988a..8418f5e1b9 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 997b76b37b..640fb947d2 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 08b0458b3d..88b4f41e6f 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-cactus.gc b/goal_src/jak3/levels/desert/des-cactus.gc index b3bea16da9..c2b70c525b 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 b4bb69864d..cc409ca030 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 1be2516853..eb1fdbc0a8 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 6a06b4de80..e1f00dc1ab 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 71e8351aff..a7a21d35cc 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 182d24df26..69d47778ea 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 c2e8485ac0..7d3a0145bf 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 2d2e106ca6..5135a838bc 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 dde71c0a0a..567d5d4f39 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 cde12f6133..a5e65b08f8 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 9d0a0b13ea..66bcb9bb9e 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 5aba179698..9914419cdb 100644 --- a/goal_src/jak3/levels/desert/hover/des-beast.gc +++ b/goal_src/jak3/levels/desert/hover/des-beast.gc @@ -5,5 +5,2542 @@ ;; 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_ bounding-box) 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 (the-as bounding-box 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 bounding-box)) + ;; 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 44bd5601ac..99a40eaa63 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 bd93bba66b..8531d89ac2 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 081d5f2be3..03c7906e1c 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 cfeb13a3d1..cf5a9a2ff2 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 8ac1ba4712..127520bac6 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* (the-as bounding-box 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 d0cb57c61f..965fb8b8ef 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 670eef3c4a..73b88b65cc 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 'bounding-box)) + (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 min 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 49689a3320..93b13639b0 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/race/course-race.gc b/goal_src/jak3/levels/desert/race/course-race.gc index f79d0e6381..320bdc0755 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 de3096b347..0ac0f5b87c 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 540840799b..e5d120cf56 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/w-parking-spot.gc b/goal_src/jak3/levels/desert/wvehicle/w-parking-spot.gc index 7b2e5fe4ad..38fdfb2072 100644 --- a/goal_src/jak3/levels/desert/wvehicle/w-parking-spot.gc +++ b/goal_src/jak3/levels/desert/wvehicle/w-parking-spot.gc @@ -7,3 +7,267 @@ ;; DECOMP BEGINS +(deftype w-parking-spot (process-drawable) + ((vehicle handle) + (should-spawn? symbol) + (should-cleanup? symbol) + (v-type game-vehicle-u8) + (minimap connection-minimap) + (test-sphere sphere :inline) + (arrow handle) + ) + (:state-methods + idle + ) + (:methods + (w-parking-spot-method-21 (_type_) none) + (w-parking-spot-method-22 (_type_) none) + (w-parking-spot-method-23 (_type_) none) + (w-parking-spot-method-24 (_type_) none) + (w-parking-spot-method-25 (_type_) symbol) + (w-parking-spot-method-26 (_type_) int) + ) + ) + + +(defmethod w-parking-spot-method-24 ((this w-parking-spot)) + (let ((gp-0 (new 'stack-no-clear 'cquery-with-5vec))) + (set! (-> gp-0 vec 0 quad) (-> this root trans quad)) + (set! (-> gp-0 cquery start-pos quad) (-> gp-0 vec 0 quad)) + (vector-reset! (-> gp-0 vec 1)) + (set! (-> gp-0 vec 1 y) 1.0) + (vector-z-quaternion! (-> gp-0 vec 2) (-> this root quat)) + (set! (-> gp-0 vec 2 y) 0.0) + (vector-normalize! (-> gp-0 vec 2) 1.0) + (set-vector! (-> gp-0 cquery move-dist) 0.0 -40960.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 ((f30-0 (fill-and-probe-using-line-sphere *collide-cache* (-> gp-0 cquery)))) + (when (>= f30-0 0.0) + (vector+float*! (the-as vector (-> gp-0 vec)) (-> gp-0 cquery start-pos) (-> gp-0 cquery move-dist) f30-0) + (set! (-> gp-0 vec 1 quad) (-> gp-0 cquery best-other-tri normal quad)) + (when (< (-> gp-0 vec 1 y) (cos 3640.889)) + (vector-reset! (-> gp-0 vec 1)) + (set! (-> gp-0 vec 1 y) 1.0) + ) + (set! (-> this root trans quad) (-> gp-0 vec 0 quad)) + (format #t "w-parking-spot::find-ground: ground y ~M~%" (-> gp-0 vec 0 y)) + ) + (if (< f30-0 0.0) + (format #t "w-parking-spot::find-ground: could not find ground~%") + ) + ) + (set! (-> this root trans quad) (-> gp-0 vec 0 quad)) + (forward-up-nopitch->quaternion (-> this root quat) (-> gp-0 vec 2) (-> gp-0 vec 1)) + ) + 0 + (none) + ) + +(defmethod w-parking-spot-method-25 ((this w-parking-spot)) + (let ((v1-1 (handle->process (-> this vehicle)))) + (if v1-1 + (or (focus-test? (the-as vehicle v1-1) dead inactive) + (not (logtest? (vehicle-flag waiting-for-player) (-> (the-as vehicle v1-1) v-flags))) + (let ((f0-0 (-> this test-sphere r))) + (< (* f0-0 f0-0) (vector-vector-distance-squared (-> (the-as vehicle v1-1) root trans) (-> this test-sphere))) + ) + (let ((v1-5 *target*)) + (when v1-5 + (if (focus-test? v1-5 pilot-riding) + (= (-> v1-5 pilot vehicle) (-> this vehicle)) + ) + ) + ) + ) + ) + ) + ) + +(defmethod w-parking-spot-method-21 ((this w-parking-spot)) + (let ((s5-0 (handle->process (-> this vehicle)))) + (cond + (s5-0 + (cond + ((w-parking-spot-method-25 this) + (logclear! (-> (the-as vehicle s5-0) v-flags) (vehicle-flag persistent)) + (set! (-> this vehicle) (the-as handle #f)) + ) + ((and (nonzero? (-> *setting-control* user-current vehicles)) + (have-vehicle-v-type? (the-as int (-> this v-type))) + ) + (when (not (handle->process (-> this arrow))) + (let ((s5-1 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> s5-1 pos quad) (-> this root trans quad)) + (quaternion-identity! (-> s5-1 quat)) + (set! (-> s5-1 flags) (task-arrow-flags taf8)) + (set! (-> s5-1 map-icon) (the-as uint 12)) + (set! (-> this arrow) (process->handle (task-arrow-spawn s5-1 this))) + ) + ) + ) + (else + (let ((a0-21 (handle->process (-> this arrow)))) + (if a0-21 + (send-event a0-21 'leave) + ) + ) + ) + ) + ) + (else + (let ((a0-25 (handle->process (-> this arrow)))) + (if a0-25 + (send-event a0-25 'leave) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod w-parking-spot-method-23 ((this w-parking-spot)) + (let ((v1-0 #t) + (s5-0 (-> this v-type)) + ) + (if (= s5-0 (game-vehicle-u8 v-scorpion v-toad v-fox)) + (set! s5-0 (-> *game-info* current-vehicle)) + ) + (when *target* + (let ((v1-3 (-> *vehicle-info* handle-by-vehicle-type s5-0))) + (-> *target* pilot) + (set! v1-0 (not (handle->process v1-3))) + ) + ) + (when (and v1-0 (!= s5-0 27) *vehicle-manager*) + (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) #f) + (vector-reset! (-> s4-0 velocity)) + (set! (-> s4-0 position quad) (-> this root trans quad)) + (quaternion-copy! (-> s4-0 rotation) (-> this root quat)) + (let ((a0-22 (vehicle-spawn (the-as vehicle-type s5-0) s4-0))) + (when a0-22 + (set! (-> this vehicle) (process->handle a0-22)) + (set! (-> this should-spawn?) #f) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod w-parking-spot-method-26 ((this w-parking-spot)) + (let ((gp-0 0)) + (let ((v1-1 + (res-lump-value (-> this entity) 'vehicle-type-mask int :default (the-as uint128 4096) :time -1000000000.0) + ) + ) + (while (not (logtest? v1-1 1)) + (+! gp-0 1) + (set! v1-1 (the-as int (/ v1-1 2))) + ) + ) + gp-0 + ) + ) + +(defmethod init-from-entity! ((this w-parking-spot) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (logclear! (-> this mask) (process-mask actor-pause movie)) + (set! (-> this minimap) #f) + (set! (-> this vehicle) (the-as handle #f)) + (set! (-> this arrow) (the-as handle #f)) + (set! (-> this should-spawn?) #t) + (set! (-> this should-cleanup?) (= (-> this level name) 'wasdoors)) + (set! (-> this v-type) (the-as game-vehicle-u8 (w-parking-spot-method-26 this))) + (let ((v1-9 (res-lump-struct arg0 'spawn-trans vector))) + (cond + (v1-9 + (set! (-> this root trans quad) (-> v1-9 quad)) + (let ((a1-5 (res-lump-struct arg0 'spawn-quat structure))) + (when a1-5 + (quaternion-copy! (-> this root quat) (the-as quaternion a1-5)) + 0 + ) + ) + ) + (else + (w-parking-spot-method-24 this) + ) + ) + ) + (let ((s5-1 (res-lump-struct (-> this entity) 'on-activate structure))) + (if s5-1 + (set! (-> this should-spawn?) (the-as symbol (script-eval (the-as pair s5-1)))) + ) + ) + (set! (-> this test-sphere quad) (-> this root trans quad)) + (set! (-> this test-sphere r) 24576.0) + (set-time! (-> this state-time)) + (go (method-of-object this idle)) + ) + +(defstate idle (w-parking-spot) + :virtual #t + :exit (behavior () + (w-parking-spot-method-21 self) + (if (and (-> self should-cleanup?) (not (w-parking-spot-method-25 self))) + (send-event (handle->process (-> self vehicle)) 'go-die) + ) + ) + :code (behavior () + (suspend) + (if (-> self should-spawn?) + (w-parking-spot-method-23 self) + ) + (until #f + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.25)) + (suspend) + ) + ) + (w-parking-spot-method-21 self) + (when (-> self should-spawn?) + (let ((f0-0 (vector-vector-distance-squared (camera-pos) (-> self test-sphere))) + (f1-0 327680.0) + ) + (when (< (* f1-0 f1-0) f0-0) + (let ((f1-3 614400.0)) + (if (or (< (* f1-3 f1-3) f0-0) (not (sphere-in-view-frustum? (-> self test-sphere)))) + (w-parking-spot-method-23 self) + ) + ) + ) + ) + ) + ) + #f + (sleep-code) + ) + :post (behavior () + 0 + ) + ) 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 1bc2ac1950..1dc6f22f02 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,550 @@ ;; 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) + ) + ) + +;; WARN: Return type mismatch (pointer process) vs none. +(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) + (none) + ) + +;; 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-fox.gc b/goal_src/jak3/levels/desert/wvehicle/wcar-fox.gc index c6bb24584b..80c2d6b1e9 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wcar-fox.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wcar-fox.gc @@ -7,3 +7,115 @@ ;; DECOMP BEGINS +(deftype v-fox (wcar-snake-base) + () + ) + + +(defmethod vehicle-method-62 ((this v-fox)) + (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 3317.76 :z 9011.2 :w 4915.2)) + 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 -14336.0 :w 6144.0)) + 16 + ) + (set! (-> (the-as collide-shape-prim-group s5-0) child 7 local-sphere w) 20889.6) + ) + ((method-of-type wcar-base vehicle-method-62) this) + 0 + (none) + ) + +(defmethod init-rbody-control! ((this v-fox)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-fox" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! this *v-fox-constants*) + (setup-masks (-> this draw) 0 -1) + (setup-masks (-> this draw) 1 0) + (setup-masks (-> this draw) 2 0) + (set! (-> this shoot-delay) (the-as uint 18)) + (set! (-> this local-gun-pos 0 quad) (-> (new 'static 'vector :x 2048.0 :y 3686.4 :z 14336.0 :w 1.0) quad)) + (set! (-> this local-gun-pos 1 quad) (-> (new 'static 'vector :x -2048.0 :y 3686.4 :z 14336.0 :w 1.0) quad)) + (set! (-> this rider-hand-joint-array 0) 8) + ((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 6) (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 7) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + this + (the-as uint 11) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-shock-tops 1) this (the-as uint 15) (joint-mod-base-flags attached)) + (init (-> this jmod-shock-tops 2) this (the-as uint 9) (joint-mod-base-flags attached)) + (init (-> this jmod-shock-tops 3) this (the-as uint 13) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-set-local init) + (the-as joint-mod-set-local (-> this jmod-shock-mids)) + this + (the-as uint 12) + (joint-mod-base-flags attached trans) + ) + (init (-> this jmod-shock-mids 1) this (the-as uint 16) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-mids 2) this (the-as uint 10) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-mids 3) this (the-as uint 14) (joint-mod-base-flags attached trans)) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this jmod-guns)) + this + (the-as uint 17) + (joint-mod-base-flags attached trans) + ) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this jmod-guns 1)) + this + (the-as uint 18) + (joint-mod-base-flags attached trans) + ) + (spawn-wheels! + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-toad-wheel" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-toad-wheel-blur" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-toad-wheel" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-toad-wheel-blur" (the-as (pointer level) #f))) + ) + 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 ec559bbd50..3694ce949e 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-mirage.gc b/goal_src/jak3/levels/desert/wvehicle/wcar-mirage.gc index 7d2342b3aa..45900b27d7 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wcar-mirage.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wcar-mirage.gc @@ -7,3 +7,219 @@ ;; DECOMP BEGINS +(deftype v-mirage (wcar-snake-base) + () + ) + + +;; WARN: Return type mismatch (pointer process) vs none. +(defmethod wvehicle-method-169 ((this v-mirage)) + (sound-play "toad-shot-fire") + (set! (-> this i-barrel) (logand (+ (-> this i-barrel) 1) 1)) + (let ((gp-1 (new 'stack-no-clear 'wcar-toad-stack-var0))) + (set! (-> gp-1 barrel-idx) (-> this i-barrel)) + (set! (-> gp-1 vec10 x) 61440.0) + (set! (-> gp-1 vec10 y) 204800.0) + (set! (-> gp-1 vec10 z) 409600.0) + (set! (-> gp-1 vec10 w) 163840.0) + (let* ((v1-9 (-> gp-1 mat0)) + (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-9 rvec quad) a0-4) + (set! (-> v1-9 uvec quad) a1-1) + (set! (-> v1-9 fvec quad) a2-1) + (set! (-> v1-9 trans quad) a3-2) + ) + (let ((v1-10 (new 'static 'vector :x 3686.4 :y 5324.8 :z 6144.0 :w 1.0))) + (vector-matrix*! + (-> gp-1 vec0) + (the-as vector (+ (the-as uint v1-10) (* (-> gp-1 barrel-idx) 16))) + (-> gp-1 mat0) + ) + ) + 0 + (vector-reset! (-> gp-1 vec4)) + (set! (-> gp-1 vec4 z) (-> gp-1 vec10 y)) + (set! (-> gp-1 vec4 y) (* 0.2678 (-> gp-1 vec10 y))) + (set! (-> gp-1 vec8 quad) (-> gp-1 mat0 fvec quad)) + (vector-float*! (-> gp-1 vec9) (-> gp-1 vec8) (- (-> gp-1 vec10 z) (-> gp-1 vec10 x))) + (vector+float*! (-> gp-1 vec3) (-> gp-1 vec0) (-> gp-1 vec8) (+ 32768.0 (-> gp-1 vec10 x))) + (let ((s4-1 (new 'stack 'boxed-array collide-shape 128))) + (set! (-> s4-1 length) (fill-actor-list-for-sphere + *actor-hash* + (-> gp-1 vec3) + (-> gp-1 vec9) + (-> gp-1 vec10 x) + (the-as (pointer collide-shape) (-> s4-1 data)) + (-> s4-1 allocated-length) + -1 + ) + ) + (let ((s4-2 (find-nearest-focusable + (the-as (array collide-shape) s4-1) + (-> gp-1 vec3) + (-> gp-1 vec10 z) + (search-info-flag attackable enemy attackable-priority high-priority) + (search-info-flag) + (-> gp-1 vec1) + (the-as vector #f) + 8192.0 + ) + ) + ) + (when s4-2 + (set! (-> gp-1 vec6 quad) (-> (get-trans s4-2 3) quad)) + (set! (-> gp-1 vec7 quad) (-> (get-transv s4-2) quad)) + (vector+float*! (-> gp-1 vec2) (-> this rbody lin-velocity) (-> gp-1 vec8) (-> gp-1 vec10 y)) + (vector-! (-> gp-1 vec5) (-> gp-1 vec6) (-> gp-1 vec0)) + (set! (-> gp-1 vec11 x) (vector-dot (-> gp-1 vec8) (-> gp-1 vec5))) + (vector-! (-> gp-1 vec5) (-> gp-1 vec7) (-> gp-1 vec2)) + (set! (-> gp-1 vec11 y) (vector-dot (-> gp-1 vec8) (-> gp-1 vec5))) + (set! (-> gp-1 vec11 w) (fmax 0.1 (/ (-> gp-1 vec11 x) (fmax 4096.0 (- (-> gp-1 vec11 y)))))) + (set! (-> gp-1 vec11 z) (+ (-> gp-1 vec6 y) (* (-> gp-1 vec11 w) (-> gp-1 vec7 y)))) + (set! (-> gp-1 vec4 y) (+ (* (/ 1.0 (-> gp-1 vec11 w)) (- (-> gp-1 vec11 z) (-> gp-1 vec0 y))) + (* 0.5 (-> gp-1 vec11 w) (-> gp-1 vec10 w)) + ) + ) + (set! (-> gp-1 vec4 y) (* (-> gp-1 vec4 y) (/ 1.0 (fmax 0.1 (-> gp-1 mat0 uvec y))))) + (set! (-> gp-1 vec4 y) (fmax (fmin (-> gp-1 vec4 y) (* 0.3638 (-> gp-1 vec10 y))) (* 0.0 (-> gp-1 vec10 y)))) + 0 + ) + ) + ) + (vector-rotate*! (-> gp-1 vec2) (-> gp-1 vec4) (-> gp-1 mat0)) + (vector+! (-> gp-1 vec2) (-> gp-1 vec2) (-> this rbody lin-velocity)) + (set! (-> gp-1 params ent) (-> this entity)) + (set! (-> gp-1 params charge) 1.0) + (set! (-> gp-1 params options) (projectile-options)) + (logclear! (-> gp-1 params options) (projectile-options po14 po15 po16)) + (set! (-> gp-1 params pos quad) (-> gp-1 vec0 quad)) + (set! (-> gp-1 params vel quad) (-> gp-1 vec2 quad)) + (set! (-> gp-1 params notify-handle) (the-as handle #f)) + (set! (-> gp-1 params owner-handle) (process->handle this)) + (set! (-> gp-1 params target-handle) (the-as handle #f)) + (set! (-> gp-1 params target-pos quad) (the-as uint128 0)) + (set! (-> gp-1 params ignore-handle) (process->handle this)) + (let* ((v1-60 *game-info*) + (a0-37 (+ (-> v1-60 attack-id) 1)) + ) + (set! (-> v1-60 attack-id) a0-37) + (set! (-> gp-1 params attack-id) a0-37) + ) + (set! (-> gp-1 params timeout) (seconds 4)) + (spawn-projectile v-toad-shot (-> gp-1 params) *rigid-body-queue-manager* *default-dead-pool*) + ) + (none) + ) + +(defmethod vehicle-method-62 ((this v-mirage)) + (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 + ) + (set! (-> (the-as collide-shape-prim-group s5-0) child 7 local-sphere w) 20889.6) + ) + ((method-of-type wcar-base vehicle-method-62) this) + 0 + (none) + ) + +(defmethod init-rbody-control! ((this v-mirage)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-mirage" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (setup-masks (-> this draw) 0 -1) + (setup-masks (-> this draw) 1 0) + (setup-masks (-> this draw) 2 0) + (alloc-rbody-control! this *v-mirage-constants*) + (set! (-> this shoot-delay) (the-as uint 240)) + (set! (-> this local-gun-pos 0 quad) (-> (new 'static 'vector :x 3686.4 :y 5324.8 :z 6144.0 :w 1.0) quad)) + (set! (-> this local-gun-pos 1 quad) (-> (new 'static 'vector :x -3686.4 :y 5324.8 :z 6144.0 :w 1.0) quad)) + (set! (-> this rider-hand-joint-array 0) 17) + ((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 6) (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 7) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + this + (the-as uint 11) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-shock-tops 1) this (the-as uint 15) (joint-mod-base-flags attached)) + (init (-> this jmod-shock-tops 2) this (the-as uint 9) (joint-mod-base-flags attached)) + (init (-> this jmod-shock-tops 3) this (the-as uint 13) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-set-local init) + (the-as joint-mod-set-local (-> this jmod-shock-mids)) + this + (the-as uint 12) + (joint-mod-base-flags attached trans) + ) + (init (-> this jmod-shock-mids 1) this (the-as uint 16) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-mids 2) this (the-as uint 10) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-mids 3) this (the-as uint 14) (joint-mod-base-flags attached trans)) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this jmod-guns)) + this + (the-as uint 18) + (joint-mod-base-flags attached trans) + ) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this jmod-guns 1)) + this + (the-as uint 19) + (joint-mod-base-flags attached trans) + ) + (spawn-wheels! + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-fox-wheel" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-fox-wheel-blur" (the-as (pointer level) #f))) + (the-as skeleton-group #f) + (the-as skeleton-group #f) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wcar-projectiles.gc b/goal_src/jak3/levels/desert/wvehicle/wcar-projectiles.gc index 513fb39f05..76c1e7989d 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wcar-projectiles.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wcar-projectiles.gc @@ -7,3 +7,625 @@ ;; DECOMP BEGINS +(deftype v-scorp-shot (projectile) + ((init-pos vector :inline) + (init-dir vector :inline) + (collide-normal vector :inline) + ) + ) + + +(defmethod projectile-method-24 ((this v-scorp-shot)) + 0 + (none) + ) + +(defmethod projectile-method-26 ((this v-scorp-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) + (when (not (logtest? (projectile-options po20) (-> this options))) + (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-15 s3-2)) + (let ((v1-19 s3-2)) + (let ((a1-10 -3640.889)) + (.mov vf6 a1-10) + ) + (.lvf vf4 (&-> v1-19 quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> a0-15 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 v-scorp-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 v-scorp-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 v-scorp-shot-move ((arg0 v-scorp-shot)) + (projectile-move-fill-line-sphere arg0) + (cond + ((logtest? (-> arg0 root status) (collide-status touch-actor)) + (projectile-method-26 arg0) + ) + ((logtest? (-> arg0 root status) (collide-status touch-surface)) + (go (method-of-object arg0 impact)) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs collide-status. +(defun cshape-reaction-scorp-shot ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector)) + (vector-reset! arg2) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (vector-float*! a1-1 (-> arg1 move-dist) (-> arg1 best-dist)) + (move-by-vector! arg0 a1-1) + ) + (set! (-> (the-as v-scorp-shot (-> arg0 process)) collide-normal quad) (-> arg1 best-other-tri normal quad)) + (let* ((s5-1 (-> arg1 best-other-tri collide-ptr)) + (v1-7 (if (type? s5-1 collide-shape-prim) + s5-1 + ) + ) + (v0-2 4) + ) + (cond + (v1-7 + (set! v0-2 32) + ) + (else + ) + ) + (logior! (-> arg0 status) v0-2) + (the-as collide-status v0-2) + ) + ) + +(defmethod setup-collision! ((this v-scorp-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 v-scorp-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) (* 491520.0 (-> pp clock frames-per-second))) + (set! (-> this attack-mode) 'eco-blue) + (set! (-> this max-speed) (* 491520.0 (-> pp clock frames-per-second))) + (set! (-> this timeout) 1) + (set! (-> this move) v-scorp-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 v-snake-shot (v-scorp-shot) + () + ) + + +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this v-snake-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "snake-gun-fire") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "blue-shot-hit") + ) + ) + ) + (none) + ) + +(defmethod deal-damage! ((this v-snake-shot) (arg0 process) (arg1 event-message-block)) + (let ((gp-0 ((method-of-type v-scorp-shot deal-damage!) this arg0 arg1))) + (when gp-0 + (if (logtest? (process-mask vehicle) (-> arg0 mask)) + (sound-play "snake-riccos") + ) + ) + gp-0 + ) + ) + +(deftype v-rhino-shot (guard-shot) + () + ) + + +(defmethod projectile-method-24 ((this v-rhino-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* 855)) + (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 v-rhino-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) + (set! (-> *part-id-table* 980 init-specs 4 initial-valuef) (vector-length s5-1)) + (draw-beam (-> *part-id-table* 980) a1-0 s5-1 #f) + (vector-normalize! s5-1 1.0) + (launch-particles (-> *part-id-table* 981) s4-0) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix)) + (f26-0 (* 0.000008138021 f30-0)) + (f30-1 (-> *part-id-table* 982 init-specs 3 initial-valuef)) + (f28-0 (-> *part-id-table* 982 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* 982 init-specs 3 initial-valuef) (* f26-0 f30-1)) + (set! (-> *part-id-table* 982 init-specs 5 initial-valuef) (* f26-0 f28-0)) + (launch-particles (-> *part-id-table* 982) s4-1 :origin-is-matrix #t) + (set! (-> *part-id-table* 982 init-specs 3 initial-valuef) f30-1) + (set! (-> *part-id-table* 982 init-specs 5 initial-valuef) f28-0) + ) + ) + 0 + (none) + ) + ) + +(defmethod projectile-method-26 ((this v-rhino-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?) + (cond + ((logtest? (-> *part-group-id-table* 211 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-1 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 211)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-1 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) (-> v1-1 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 212)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-1 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 play-impact-sound ((this v-rhino-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "rhino-gun-fire") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "blue-shot-hit") + ) + ) + ) + (none) + ) + +(defmethod deal-damage! ((this v-rhino-shot) (arg0 process) (arg1 event-message-block)) + (let ((gp-0 ((method-of-type v-scorp-shot deal-damage!) (the-as v-scorp-shot this) arg0 arg1))) + (when gp-0 + (if (logtest? (process-mask vehicle) (-> arg0 mask)) + (sound-play "rhino-riccos") + ) + ) + gp-0 + ) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod init-proj-settings! ((this v-rhino-shot)) + (let ((t9-0 (method-of-type guard-shot init-proj-settings!))) + (t9-0 this) + ) + (set! (-> this damage) 6.0) + (set! (-> this vehicle-damage-factor) 1.0) + (set! (-> this vehicle-impulse-factor) 0.5) + (set! (-> this timeout) (seconds 0.5)) + (set! (-> this sound-id) (new-sound-id)) + (none) + ) + +(deftype v-toad-shot (projectile) + ((trail-tracker handle) + (blast-radius float) + ) + (:methods + (set-y-vel (_type_) none) + ) + ) + + +(defskelgroup skel-v-toad-shot 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 v-toad-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + ) + ((= v1-0 (projectile-options po0)) + (sound-play "toad-shot-hit") + ) + ) + ) + 0 + (none) + ) + +(defmethod set-y-vel ((this v-toad-shot)) + (+! (-> this root transv y) (* -163840.0 (seconds-per-frame))) + 0 + (none) + ) + +(defmethod setup-collision! ((this v-toad-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-default) + (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 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set-collide-with! + (-> this root) + (collide-spec + backgnd + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set-collide-as! (-> this root) (collide-spec projectile)) + (set! (-> this root pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noproj #x1 :noendlessfall #x1 :board #x1) + ) + (none) + ) + +(defmethod projectile-method-40 ((this v-toad-shot)) + 256 + ) + +(defmethod init-proj-settings! ((this v-toad-shot)) + (set! (-> this attack-mode) 'explode) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-toad-shot" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((t9-2 (method-of-type projectile init-proj-settings!))) + (t9-2 this) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 213) this)) + (set! (-> this blast-radius) 102400.0) + (set! (-> this max-speed) 90112.0) + (set! (-> this timeout) (seconds 4)) + (set! (-> this update-velocity) (method-of-object this set-y-vel)) + (set! (-> this damage) 0.0) + (let ((v1-13 (new 'stack-no-clear 'vector))) + (set! (-> v1-13 x) 2.0) + (set! (-> v1-13 y) 2.0) + (set! (-> v1-13 z) 2.0) + (set! (-> v1-13 w) 1.0) + (set! (-> this root scale quad) (-> v1-13 quad)) + ) + (let ((s5-1 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-1 tracked-obj) (process->handle this)) + (set! (-> s5-1 appearance) *toad-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-26 + (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-26 8192) 1)) + ) + (set! (-> this trail-tracker) + (ppointer->handle (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) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod projectile-method-24 ((this v-toad-shot)) + (draw-beam (-> *part-id-table* 979) (-> this root trans) (-> this starting-dir) #f) + (none) + ) + +(defmethod projectile-method-25 ((this v-toad-shot)) + (spawn (-> this part) (-> this root trans)) + (ja-post) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod projectile-method-39 ((this v-toad-shot)) + (if (logtest? (-> this root status) (collide-status impact-surface)) + (go (method-of-object this impact)) + ) + (none) + ) + +(defstate impact (v-toad-shot) + :virtual #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) 2.0) + (set! (-> gp-0 group) (-> *part-group-id-table* 230)) + (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) 20.0) + (set! (-> gp-0 damage-scale) 3.0) + (set! (-> gp-0 vehicle-damage-factor) 1.0) + (set! (-> gp-0 vehicle-impulse-factor) 1.0) + (set! (-> gp-0 ignore-proc) (process->handle (handle->process (-> self ignore-handle)))) + (explosion-spawn gp-0 self) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-20 (-> self root root-prim))) + (set! (-> v1-20 prim-core collide-as) (collide-spec)) + (set! (-> v1-20 prim-core collide-with) (collide-spec)) + ) + 0 + (send-event (handle->process (-> self trail-tracker)) 'notice 'die) + (while (-> self child) + (suspend) + ) + (deactivate self) + ) + ) + +(deftype v-marauder-shot (guard-shot) + () + ) + + +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this v-marauder-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "inter-gun-fire") + ) + ((= 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 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 "guard-shot-hit") + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod init-proj-settings! ((this v-marauder-shot)) + (let ((t9-0 (method-of-type guard-shot init-proj-settings!))) + (t9-0 this) + ) + (set! (-> this vehicle-damage-factor) 0.333) + (set! (-> this vehicle-impulse-factor) 0.25) + (set! (-> this timeout) (seconds 1.25)) + (set! (-> this sound-id) (new-sound-id)) + (none) + ) + +(defmethod deal-damage! ((this v-marauder-shot) (arg0 process) (arg1 event-message-block)) + (when ((method-of-type guard-shot deal-damage!) this arg0 arg1) + (if (logtest? (process-mask vehicle) (-> arg0 mask)) + (sound-play "inter-riccos") + ) + #t + ) + ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wcar-rhino.gc b/goal_src/jak3/levels/desert/wvehicle/wcar-rhino.gc index ede80efbed..ad8e4d6977 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wcar-rhino.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wcar-rhino.gc @@ -7,3 +7,238 @@ ;; DECOMP BEGINS +(deftype v-rhino (wcar-base) + ((jmod-axles joint-mod-rotate-local 4 :inline) + (jmod-gun-kick joint-mod-add-local :inline) + (jmod-gun-turn joint-mod-rotate-local :inline) + ) + ) + + +(defmethod wvehicle-method-169 ((this v-rhino)) + (set! (-> this shoot-time) (the-as uint (current-time))) + (set! (-> this gun-kick) 1638.4) + (let ((gp-0 (new 'stack-no-clear 'wcar-rhino-proj-params))) + (let* ((v1-3 (-> gp-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-3 rvec quad) a0-3) + (set! (-> v1-3 uvec quad) a1-0) + (set! (-> v1-3 fvec quad) a2-0) + (set! (-> v1-3 trans quad) a3-1) + ) + (vector-matrix*! (-> gp-0 gun-local-pos) (-> this gun-local-pos) (-> gp-0 mat)) + (vector-rotate*! (-> gp-0 gun-local-dir) (-> this gun-local-dir) (-> gp-0 mat)) + (vector-float*! (-> gp-0 gun-dir) (-> gp-0 gun-local-dir) 409600.0) + (set! (-> gp-0 params ent) (-> this entity)) + (set! (-> gp-0 params charge) 1.0) + (set! (-> gp-0 params options) (projectile-options)) + (logclear! (-> gp-0 params options) (projectile-options po14 po15 po16)) + (set! (-> gp-0 params pos quad) (-> gp-0 gun-local-pos quad)) + (set! (-> gp-0 params vel quad) (-> gp-0 gun-dir quad)) + (set! (-> gp-0 params notify-handle) (the-as handle #f)) + (set! (-> gp-0 params owner-handle) (process->handle this)) + (set! (-> gp-0 params target-handle) (the-as handle #f)) + (set! (-> gp-0 params target-pos quad) (the-as uint128 0)) + (set! (-> gp-0 params ignore-handle) (process->handle this)) + (let* ((v1-19 *game-info*) + (a0-20 (+ (-> v1-19 attack-id) 1)) + ) + (set! (-> v1-19 attack-id) a0-20) + (set! (-> gp-0 params attack-id) a0-20) + ) + (set! (-> gp-0 params timeout) (seconds 4)) + (spawn-projectile v-rhino-shot (-> gp-0 params) *rigid-body-queue-manager* *default-dead-pool*) + ) + 0 + (none) + ) + +(defmethod init-collision! ((this v-rhino)) + (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 2305)))) + (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 2308)))) + (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 2309)))) + (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 1040)))) + (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 10)))) + (set! (-> a0-18 prim-core action) (collide-action solid)) + (set! (-> a0-18 transform-index) 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 28262.4) + ) + (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 v-rhino)) + (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 14336.0 :y -2867.2 :z 15769.6 :w 7372.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 -14336.0 :y -2867.2 :z 15769.6 :w 7372.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 15155.2 :y -2867.2 :z -12902.4 :w 7372.8)) + 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 -15155.2 :y -2867.2 :z -12902.4 :w 7372.8)) + 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 1638.4 :z 15769.6 :w 9830.4)) + 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 4505.6 :w 11878.4)) + 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 2457.6 :z -13516.8 :w 9830.4)) + 16 + ) + ) + (set! (-> this turret-local-pos quad) (-> (new 'static 'vector :y 6553.6 :z 14745.6 :w 1.0) quad)) + ((method-of-type wcar-base vehicle-method-62) this) + 0 + (none) + ) + +(defmethod vehicle-method-88 ((this v-rhino) (arg0 vehicle-controls)) + (let ((t9-0 (method-of-type wcar-base vehicle-method-88))) + (t9-0 this arg0) + ) + (wvehicle-method-199 this) + 0 + (none) + ) + +(defmethod vehicle-method-94 ((this v-rhino)) + (let ((f0-0 (vector-length (-> this lin-acceleration)))) + (if (and (< 327680.0 f0-0) (and (not (logtest? (-> this controls flags) (vehicle-controls-flag vcf0))) + (not (-> *setting-control* cam-current entity-name)) + ) + ) + (activate! *camera-smush-control* (fmin 1331.2 (* 0.5 f0-0)) 120 360 1.0 0.9 (-> *display* camera-clock)) + ) + ) + ((method-of-type wcar-base vehicle-method-94) this) + (none) + ) + +(defmethod vehicle-method-79 ((this v-rhino)) + (set! (-> this turbo-supply) 3.0) + (seek! (-> this gun-kick) 0.0 (* 32768.0 (seconds-per-frame))) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'quaternion 2))) + (set! (-> this jmod-gun-kick transform trans z) (-> this gun-kick)) + (quaternion-axis-angle! (-> s5-0 1) 1.0 0.0 0.0 (- (-> this gun-pitch))) + (quaternion-axis-angle! (-> s5-0 2) 0.0 1.0 0.0 (-> this gun-yaw)) + (quaternion*! (-> this jmod-gun-turn rotation) (-> s5-0 2) (-> s5-0 1)) + ) + 0 + (let ((s5-1 (new 'stack-no-clear 'inline-array 'quaternion 2))) + (set-vector! (-> s5-1 2) 0.0 0.0 0.0 0.0) + (dotimes (s4-0 (-> this info physics-model wheel-count)) + (let ((v1-8 (-> this wheel s4-0))) + (-> v1-8 info) + (quaternion-set! (-> s5-1 0) 0.0 0.0 (-> v1-8 sin-susp-ang) (+ 1.0 (-> v1-8 cos-susp-ang))) + ) + (quaternion-normalize! (-> s5-1 0)) + (quaternion-axis-angle! (-> s5-1 1) 0.0 1.0 0.0 (-> (&-> s5-1 0 data s4-0) 8)) + (let ((v1-13 (-> this jmod-axles s4-0))) + (quaternion*! (-> v1-13 rotation) (-> s5-1 0) (-> s5-1 1)) + ) + 0 + ) + ) + 0 + (none) + ) + +(defmethod init-rbody-control! ((this v-rhino)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-rhino" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! this *v-rhino-constants*) + (set! (-> this rider-hand-joint-array 0) 8) + (init (-> this jmod-gun-turn) this (the-as uint 9) (joint-mod-base-flags attached)) + (init (-> this jmod-gun-kick) this (the-as uint 10) (joint-mod-base-flags attached trans)) + (set! (-> this turret-local-pos quad) (-> (new 'static 'vector :y 10485.76 :z 12288.0 :w 1.0) quad)) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-axles)) + this + (the-as uint 4) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-axles 1) this (the-as uint 6) (joint-mod-base-flags attached)) + (init (-> this jmod-axles 2) this (the-as uint 5) (joint-mod-base-flags attached)) + (init (-> this jmod-axles 3) this (the-as uint 7) (joint-mod-base-flags attached)) + (spawn-wheels! + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-rhino-wheel" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-rhino-wheel" (the-as (pointer level) #f))) + (the-as skeleton-group #f) + (the-as skeleton-group #f) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wcar-scorpion.gc b/goal_src/jak3/levels/desert/wvehicle/wcar-scorpion.gc index 4092349eaa..bcb893e641 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wcar-scorpion.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wcar-scorpion.gc @@ -5,5 +5,384 @@ ;; name in dgo: wcar-scorpion ;; dgos: LPATK, LFACCAR, WASALL +(deftype wcar-rhino-proj-params (structure) + ((mat matrix :inline :offset 0) + (gun-local-pos vector :inline :offset 64) + (gun-local-dir vector :inline :offset 80) + (gun-dir vector :inline :offset 96) + (params projectile-init-by-other-params :inline :offset 128) + ) + ) + ;; DECOMP BEGINS +(deftype v-scorpion (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-shock-bots joint-mod-set-local 4 :inline) + (jmod-gun-kick joint-mod-add-local :inline) + (jmod-gun-tilt joint-mod-add-local :inline) + (jmod-gun-turn joint-mod-rotate-local :inline) + ) + ) + + +(defmethod init-collision! ((this v-scorpion)) + (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 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 10)))) + (set! (-> a0-18 prim-core action) (collide-action solid)) + (set! (-> a0-18 transform-index) 0) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (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 27033.6) + ) + (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 v-scorpion)) + (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 12697.6 :y -819.2 :z 14336.0 :w 7782.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 -12697.6 :y -819.2 :z 14336.0 :w 7782.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 12697.6 :y -819.2 :z -12492.8 :w 7782.4)) + 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 -12697.6 :y -819.2 :z -12492.8 :w 7782.4)) + 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 1638.4 :z 14336.0 :w 9830.4)) + 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 2457.6 :w 9830.4)) + 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 2457.6 :z -12492.8 :w 9830.4)) + 16 + ) + ) + ((method-of-type wcar-base vehicle-method-62) this) + 0 + (none) + ) + +;; WARN: Return type mismatch (pointer process) vs none. +(defmethod wvehicle-method-169 ((this v-scorpion)) + (set! (-> this shoot-time) (the-as uint (current-time))) + (set! (-> this gun-kick) 1638.4) + (let ((gp-0 (new 'stack-no-clear 'wcar-rhino-proj-params))) + (let* ((v1-3 (-> gp-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-3 rvec quad) a0-3) + (set! (-> v1-3 uvec quad) a1-0) + (set! (-> v1-3 fvec quad) a2-0) + (set! (-> v1-3 trans quad) a3-1) + ) + (vector-matrix*! (-> gp-0 gun-local-pos) (-> this gun-local-pos) (-> gp-0 mat)) + (vector-rotate*! (-> gp-0 gun-local-dir) (-> this gun-local-dir) (-> gp-0 mat)) + (vector-float*! (-> gp-0 gun-dir) (-> gp-0 gun-local-dir) 409600.0) + (set! (-> gp-0 params ent) (-> this entity)) + (set! (-> gp-0 params charge) 1.0) + (set! (-> gp-0 params options) (projectile-options)) + (logclear! (-> gp-0 params options) (projectile-options po14 po15 po16)) + (set! (-> gp-0 params pos quad) (-> gp-0 gun-local-pos quad)) + (set! (-> gp-0 params vel quad) (-> gp-0 gun-dir quad)) + (set! (-> gp-0 params notify-handle) (the-as handle #f)) + (set! (-> gp-0 params owner-handle) (process->handle this)) + (set! (-> gp-0 params target-handle) (the-as handle #f)) + (set! (-> gp-0 params target-pos quad) (the-as uint128 0)) + (set! (-> gp-0 params ignore-handle) (process->handle this)) + (let* ((v1-19 *game-info*) + (a0-20 (+ (-> v1-19 attack-id) 1)) + ) + (set! (-> v1-19 attack-id) a0-20) + (set! (-> gp-0 params attack-id) a0-20) + ) + (set! (-> gp-0 params timeout) (seconds 4)) + (spawn-projectile v-scorp-shot (-> gp-0 params) *rigid-body-queue-manager* *default-dead-pool*) + (let ((v1-23 (get-field-spec-by-id (-> *part-id-table* 967) (sp-field-id spt-omega)))) + (if v1-23 + (set! (-> v1-23 initial-valuef) (+ -20480.0 (-> gp-0 gun-local-pos y))) + ) + ) + (set! (-> gp-0 mat fvec quad) (-> gp-0 gun-local-dir quad)) + (vector-cross! (the-as vector (-> gp-0 mat)) (-> gp-0 mat uvec) (-> gp-0 mat fvec)) + (vector+float*! (-> gp-0 mat trans) (-> gp-0 gun-local-pos) (-> gp-0 gun-local-dir) -12288.0) + (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 (-> gp-0 mat) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 227) + :duration 1 + :mat-joint (-> gp-0 mat) + ) + ) + ) + (none) + ) + +(defmethod vehicle-method-88 ((this v-scorpion) (arg0 vehicle-controls)) + (let ((t9-0 (method-of-type wcar-base vehicle-method-88))) + (t9-0 this arg0) + ) + (wvehicle-method-199 this) + 0 + (none) + ) + +(defmethod vehicle-method-94 ((this v-scorpion)) + (let ((f0-0 (vector-length (-> this lin-acceleration)))) + (if (and (< 327680.0 f0-0) (not (logtest? (-> this controls flags) (vehicle-controls-flag vcf0)))) + (activate! *camera-smush-control* (fmin 2048.0 (* 0.5 f0-0)) 60 210 1.0 0.9 (-> *display* camera-clock)) + ) + ) + ((method-of-type wcar-base vehicle-method-94) this) + (none) + ) + +(defmethod vehicle-method-79 ((this v-scorpion)) + (seek! (-> this gun-kick) 0.0 (* 32768.0 (seconds-per-frame))) + (new 'stack-no-clear 'vector) + (set! (-> this jmod-gun-kick transform trans z) (-> this gun-kick)) + (set! (-> this jmod-gun-tilt transform trans z) (-> this gun-kick)) + (quaternion-axis-angle! (-> this jmod-gun-tilt transform quat) 1.0 0.0 0.0 (-> this gun-pitch)) + (quaternion-axis-angle! (-> this jmod-gun-turn rotation) 0.0 1.0 0.0 (+ 32768.0 (-> this gun-yaw))) + 0 + (let ((s5-0 (new 'stack-no-clear 'inline-array 'quaternion 2))) + (set-vector! (-> s5-0 2) -1638.4 -1638.4 1638.4 1638.4) + (dotimes (s4-0 (-> this info physics-model wheel-count)) + (let ((v1-9 (-> this wheel s4-0))) + (-> v1-9 info) + (quaternion-set! (-> s5-0 0) 0.0 0.0 (-> v1-9 sin-susp-ang) (+ 1.0 (-> v1-9 cos-susp-ang))) + ) + (quaternion-normalize! (-> s5-0 0)) + (quaternion-axis-angle! (-> s5-0 1) 0.0 1.0 0.0 (-> (&-> s5-0 0 data s4-0) 8)) + (let ((v1-14 (-> this jmod-axles s4-0))) + (quaternion*! (-> v1-14 rotation) (-> s5-0 0) (-> s5-0 1)) + ) + 0 + ) + ) + (let ((s5-1 (new 'stack-no-clear 'wvehicle-physics-work))) + (let* ((v1-20 (-> s5-1 mat)) + (a3-4 (-> this node-list data 0 bone transform)) + (a0-15 (-> a3-4 rvec quad)) + (a1-6 (-> a3-4 uvec quad)) + (a2-6 (-> a3-4 fvec quad)) + (a3-5 (-> a3-4 trans quad)) + ) + (set! (-> v1-20 rvec quad) a0-15) + (set! (-> v1-20 uvec quad) a1-6) + (set! (-> v1-20 fvec quad) a2-6) + (set! (-> v1-20 trans quad) a3-5) + ) + (set! (-> s5-1 force quad) (-> (new 'static 'vector :x 7905.28 :y 5324.8 :z 5120.0 :w 1.0) quad)) + (set! (-> s5-1 velocity quad) (-> (new 'static 'vector :x 7905.28 :y 5324.8 :z 5120.0 :w 1.0) quad)) + (set! (-> s5-1 world-pos quad) (-> (new 'static 'vector :x 7905.28 :y 5324.8 :z -6635.52 :w 1.0) quad)) + (set! (-> s5-1 world-normal quad) (-> (new 'static 'vector :x 7905.28 :y 5324.8 :z -6635.52 :w 1.0) quad)) + (set-vector! (-> s5-1 local-pos) 27670.756 27670.756 28398.934 28398.934) + (dotimes (s4-1 4) + (let ((s3-0 (-> this wheel s4-1))) + (let ((v1-29 (-> s3-0 info))) + (set! (-> s5-1 ground-pos x) (+ -3276.8 (-> v1-29 susp-arm-length))) + (set! (-> s5-1 tmp quad) (-> (the-as (pointer uint128) (+ (+ (* s4-1 16) 64) (the-as int s5-1))))) + (set! (-> s5-1 steering-axis quad) (-> v1-29 local-pos quad)) + ) + (+! (-> s5-1 steering-axis x) (* (-> s5-1 ground-pos x) (-> s3-0 cos-susp-ang))) + (+! (-> s5-1 steering-axis y) (* (-> s5-1 ground-pos x) (-> s3-0 sin-susp-ang))) + (set! (-> s5-1 p-body quad) (-> s5-1 steering-axis quad)) + (set! (-> s5-1 p-body x) (* (-> s5-1 p-body x) (-> s3-0 x-scale))) + (set! (-> s5-1 tmp x) (* (-> s5-1 tmp x) (-> s3-0 x-scale))) + (vector-! (-> s5-1 axis) (-> s5-1 p-body) (-> s5-1 tmp)) + (set! (-> s5-1 ground-pos z) (vector-length (-> s5-1 axis))) + (set! (-> s5-1 ground-pos y) + (- (-> s5-1 local-pos data s4-1) (* (atan (-> s5-1 axis x) (-> s5-1 axis y)) (-> s3-0 x-scale))) + ) + (let ((v1-40 (-> this jmod-shock-tops s4-1))) + (quaternion-axis-angle! (-> v1-40 rotation) 0.0 0.0 1.0 (-> s5-1 ground-pos y)) + ) + 0 + (let ((v1-44 (-> this jmod-shock-mids s4-1))) + (set! (-> v1-44 transform trans y) (* -0.5 (-> s5-1 ground-pos z) (-> s3-0 x-scale))) + ) + 0 + (let ((v1-48 (-> this jmod-shock-bots s4-1))) + (set! (-> v1-48 transform trans y) (* -1.0 (+ -2048.0 (* 0.5 (-> s5-1 ground-pos z))) (-> s3-0 x-scale))) + ) + ) + 0 + 0 + ) + ) + 0 + (none) + ) + +(defmethod init-rbody-control! ((this v-scorpion)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-scorpion" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! this *v-scorpion-constants*) + (set! (-> this rider-hand-joint-array 0) 3) + (init (-> this jmod-gun-turn) this (the-as uint 4) (joint-mod-base-flags attached)) + (init (-> this jmod-gun-tilt) this (the-as uint 5) (joint-mod-base-flags attached trans quat)) + (init (-> this jmod-gun-kick) this (the-as uint 6) (joint-mod-base-flags attached trans)) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-axles)) + this + (the-as uint 7) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-axles 1) this (the-as uint 15) (joint-mod-base-flags attached)) + (init (-> this jmod-axles 2) this (the-as uint 8) (joint-mod-base-flags attached)) + (init (-> this jmod-axles 3) this (the-as uint 16) (joint-mod-base-flags attached)) + (set! (-> this turret-local-pos quad) (-> (new 'static 'vector :y 10485.76 :z -10240.0 :w 1.0) quad)) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + this + (the-as uint 9) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-shock-tops 1) this (the-as uint 17) (joint-mod-base-flags attached)) + (init (-> this jmod-shock-tops 2) this (the-as uint 12) (joint-mod-base-flags attached)) + (init (-> this jmod-shock-tops 3) this (the-as uint 20) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-set-local init) + (the-as joint-mod-set-local (-> this jmod-shock-mids)) + this + (the-as uint 10) + (joint-mod-base-flags attached trans) + ) + (init (-> this jmod-shock-mids 1) this (the-as uint 18) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-mids 2) this (the-as uint 13) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-mids 3) this (the-as uint 21) (joint-mod-base-flags attached trans)) + ((method-of-type joint-mod-set-local init) + (the-as joint-mod-set-local (-> this jmod-shock-bots)) + this + (the-as uint 11) + (joint-mod-base-flags attached trans) + ) + (init (-> this jmod-shock-bots 1) this (the-as uint 19) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-bots 2) this (the-as uint 14) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-bots 3) this (the-as uint 22) (joint-mod-base-flags attached trans)) + (spawn-wheels! + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-scorpion-wheel" (the-as (pointer level) #f))) + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-v-scorpion-wheel-blur" (the-as (pointer level) #f)) + ) + (the-as skeleton-group #f) + (the-as skeleton-group #f) + ) + (set! (-> this gun-aim-yaw) 0.0) + (set! (-> this gun-aim-yaw-vel) 0.0) + (set! (-> this gun-yaw) 0.0) + (set! (-> this gun-pitch) 0.0) + (set! (-> this shoot-delay) (the-as uint 30)) + (set! (-> this lock-turret) #f) + 0 + (none) + ) + +(defmethod rbody-event-handler ((this v-scorpion) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('set-string-height) + (set-setting! 'string-min-height 'abs (-> arg3 param 0) 0) + (set-setting! 'string-max-height 'abs (-> arg3 param 0) 0) + #t + ) + (('draw-turret) + (if (-> arg3 param 0) + (setup-masks (-> this draw) 2 0) + (setup-masks (-> this draw) 0 2) + ) + ) + (('use-camera) + (if (-> arg3 param 0) + (vehicle-method-80 this) + (vehicle-method-81 this) + ) + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wcar-snake.gc b/goal_src/jak3/levels/desert/wvehicle/wcar-snake.gc index 30c1e24822..b4087d9f90 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wcar-snake.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wcar-snake.gc @@ -7,3 +7,115 @@ ;; DECOMP BEGINS +(deftype v-snake (wcar-snake-base) + () + ) + + +(defmethod vehicle-method-62 ((this v-snake)) + (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 + ) + (set! (-> (the-as collide-shape-prim-group s5-0) child 7 local-sphere w) 20889.6) + ) + ((method-of-type wcar-base vehicle-method-62) this) + 0 + (none) + ) + +(defmethod init-rbody-control! ((this v-snake)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-snake" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (setup-masks (-> this draw) 0 -1) + (setup-masks (-> this draw) 1 0) + (setup-masks (-> this draw) 4 0) + (alloc-rbody-control! this *v-snake-constants*) + (set! (-> this shoot-delay) (the-as uint 18)) + (set! (-> this local-gun-pos 0 quad) (-> (new 'static 'vector :x 3686.4 :y 5324.8 :z 6144.0 :w 1.0) quad)) + (set! (-> this local-gun-pos 1 quad) (-> (new 'static 'vector :x -3686.4 :y 5324.8 :z 6144.0 :w 1.0) quad)) + (set! (-> this rider-hand-joint-array 0) 17) + ((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 6) (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 7) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + this + (the-as uint 11) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-shock-tops 1) this (the-as uint 15) (joint-mod-base-flags attached)) + (init (-> this jmod-shock-tops 2) this (the-as uint 9) (joint-mod-base-flags attached)) + (init (-> this jmod-shock-tops 3) this (the-as uint 13) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-set-local init) + (the-as joint-mod-set-local (-> this jmod-shock-mids)) + this + (the-as uint 12) + (joint-mod-base-flags attached trans) + ) + (init (-> this jmod-shock-mids 1) this (the-as uint 16) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-mids 2) this (the-as uint 10) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-mids 3) this (the-as uint 14) (joint-mod-base-flags attached trans)) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this jmod-guns)) + this + (the-as uint 18) + (joint-mod-base-flags attached trans) + ) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this jmod-guns 1)) + this + (the-as uint 19) + (joint-mod-base-flags attached trans) + ) + (spawn-wheels! + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-snake-wheel" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-snake-wheel-blur" (the-as (pointer level) #f))) + (the-as skeleton-group #f) + (the-as skeleton-group #f) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wcar-toad.gc b/goal_src/jak3/levels/desert/wvehicle/wcar-toad.gc index 5dadeff6cf..9a68a3744a 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wcar-toad.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wcar-toad.gc @@ -5,5 +5,527 @@ ;; name in dgo: wcar-toad ;; dgos: LPATK, LFACCAR, WASALL +(deftype wcar-toad-stack-var0 (structure) + ((params projectile-init-by-other-params :inline :offset 0) + (mat0 matrix :inline :offset 128) + (vec0 vector :inline :offset 256) + (vec1 vector :inline :offset 272) + (vec2 vector :inline :offset 288) + (vec3 vector :inline :offset 304) + (vec4 vector :inline :offset 320) + (vec5 vector :inline :offset 336) + (vec6 vector :inline :offset 368) + (vec7 vector :inline :offset 384) + (vec8 vector :inline :offset 416) + (vec9 vector :inline :offset 432) + (vec10 vector :inline :offset 448) + (vec11 vector :inline :offset 464) + (barrel-idx int8 :offset 480) + ) + ) + ;; DECOMP BEGINS +(deftype v-toad (wcar-base) + ((jmod-axles joint-mod-rotate-local 4 :inline) + (jmod-shock-tops joint-mod-rotate-local 2 :inline) + (jmod-shock-bots joint-mod-set-local 2 :inline) + ) + (:methods + (v-toad-method-203 (_type_ vehicle-wheel-state vehicle-wheel-info) none) + ) + ) + + +;; WARN: Return type mismatch (pointer process) vs none. +(defmethod wvehicle-method-169 ((this v-toad)) + (sound-play "toad-shot-fire") + (set! (-> this i-barrel) (logand (+ (-> this i-barrel) 1) 1)) + (let ((gp-1 (new 'stack-no-clear 'wcar-toad-stack-var0))) + (set! (-> gp-1 barrel-idx) (-> this i-barrel)) + (set! (-> gp-1 vec10 x) 61440.0) + (set! (-> gp-1 vec10 y) 204800.0) + (set! (-> gp-1 vec10 z) 409600.0) + (set! (-> gp-1 vec10 w) 163840.0) + (let* ((v1-9 (-> gp-1 mat0)) + (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-9 rvec quad) a0-4) + (set! (-> v1-9 uvec quad) a1-1) + (set! (-> v1-9 fvec quad) a2-1) + (set! (-> v1-9 trans quad) a3-2) + ) + (let ((v1-10 (new 'static 'inline-array vector 2 + (new 'static 'vector :x 2048.0 :y 7372.8 :z 6144.0 :w 1.0) + (new 'static 'vector :x -2048.0 :y 7372.8 :z 6144.0 :w 1.0) + ) + ) + ) + (vector-matrix*! (-> gp-1 vec0) (-> v1-10 (-> gp-1 barrel-idx)) (-> gp-1 mat0)) + ) + 0 + (vector-reset! (-> gp-1 vec4)) + (set! (-> gp-1 vec4 z) (-> gp-1 vec10 y)) + (set! (-> gp-1 vec4 y) (* 0.2678 (-> gp-1 vec10 y))) + (set! (-> gp-1 vec8 quad) (-> gp-1 mat0 fvec quad)) + (vector-float*! (-> gp-1 vec9) (-> gp-1 vec8) (- (-> gp-1 vec10 z) (-> gp-1 vec10 x))) + (vector+float*! (-> gp-1 vec3) (-> gp-1 vec0) (-> gp-1 vec8) (+ 32768.0 (-> gp-1 vec10 x))) + (let ((s4-1 (new 'stack 'boxed-array collide-shape 128))) + (set! (-> s4-1 length) (fill-actor-list-for-sphere + *actor-hash* + (-> gp-1 vec3) + (-> gp-1 vec9) + (-> gp-1 vec10 x) + (the-as (pointer collide-shape) (-> s4-1 data)) + (-> s4-1 allocated-length) + -1 + ) + ) + (let ((s4-2 (find-nearest-focusable + (the-as (array collide-shape) s4-1) + (-> gp-1 vec3) + (-> gp-1 vec10 z) + (search-info-flag attackable enemy attackable-priority high-priority) + (search-info-flag) + (-> gp-1 vec1) + (the-as vector #f) + 8192.0 + ) + ) + ) + (when s4-2 + (set! (-> gp-1 vec6 quad) (-> (get-trans s4-2 3) quad)) + (set! (-> gp-1 vec7 quad) (-> (get-transv s4-2) quad)) + (vector+float*! (-> gp-1 vec2) (-> this rbody lin-velocity) (-> gp-1 vec8) (-> gp-1 vec10 y)) + (vector-! (-> gp-1 vec5) (-> gp-1 vec6) (-> gp-1 vec0)) + (set! (-> gp-1 vec11 x) (vector-dot (-> gp-1 vec8) (-> gp-1 vec5))) + (vector-! (-> gp-1 vec5) (-> gp-1 vec7) (-> gp-1 vec2)) + (set! (-> gp-1 vec11 y) (vector-dot (-> gp-1 vec8) (-> gp-1 vec5))) + (set! (-> gp-1 vec11 w) (fmax 0.1 (/ (-> gp-1 vec11 x) (fmax 4096.0 (- (-> gp-1 vec11 y)))))) + (set! (-> gp-1 vec11 z) (+ (-> gp-1 vec6 y) (* (-> gp-1 vec11 w) (-> gp-1 vec7 y)))) + (set! (-> gp-1 vec4 y) (+ (* (/ 1.0 (-> gp-1 vec11 w)) (- (-> gp-1 vec11 z) (-> gp-1 vec0 y))) + (* 0.5 (-> gp-1 vec11 w) (-> gp-1 vec10 w)) + ) + ) + (set! (-> gp-1 vec4 y) (* (-> gp-1 vec4 y) (/ 1.0 (fmax 0.1 (-> gp-1 mat0 uvec y))))) + (set! (-> gp-1 vec4 y) (fmax (fmin (-> gp-1 vec4 y) (* 0.3638 (-> gp-1 vec10 y))) (* 0.0 (-> gp-1 vec10 y)))) + 0 + ) + ) + ) + (vector-rotate*! (-> gp-1 vec2) (-> gp-1 vec4) (-> gp-1 mat0)) + (vector+! (-> gp-1 vec2) (-> gp-1 vec2) (-> this rbody lin-velocity)) + (set! (-> gp-1 params ent) (-> this entity)) + (set! (-> gp-1 params charge) 1.0) + (set! (-> gp-1 params options) (projectile-options)) + (logclear! (-> gp-1 params options) (projectile-options po14 po15 po16)) + (set! (-> gp-1 params pos quad) (-> gp-1 vec0 quad)) + (set! (-> gp-1 params vel quad) (-> gp-1 vec2 quad)) + (set! (-> gp-1 params notify-handle) (the-as handle #f)) + (set! (-> gp-1 params owner-handle) (process->handle this)) + (set! (-> gp-1 params target-handle) (the-as handle #f)) + (set! (-> gp-1 params target-pos quad) (the-as uint128 0)) + (set! (-> gp-1 params ignore-handle) (process->handle this)) + (let* ((v1-60 *game-info*) + (a0-37 (+ (-> v1-60 attack-id) 1)) + ) + (set! (-> v1-60 attack-id) a0-37) + (set! (-> gp-1 params attack-id) a0-37) + ) + (set! (-> gp-1 params timeout) (seconds 4)) + (spawn-projectile v-toad-shot (-> gp-1 params) *rigid-body-queue-manager* *default-dead-pool*) + ) + (none) + ) + +(defmethod vehicle-method-88 ((this v-toad) (arg0 vehicle-controls)) + ((method-of-type wcar-base vehicle-method-88) this arg0) + 0 + (none) + ) + +(defmethod on-impact ((this v-toad) (arg0 rigid-body-impact)) + (when (and (logtest? (vehicle-flag vf56) (-> this v-flags)) (-> arg0 process)) + (let ((a0-2 (-> arg0 process))) + (if a0-2 + (send-event + a0-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 (process->handle this)) + ) + ) + ) + ) + ) + ) + ((method-of-type wcar-base on-impact) this arg0) + (none) + ) + +(defmethod vehicle-method-93 ((this v-toad)) + (let ((t9-0 (method-of-type wcar-base vehicle-method-93))) + (t9-0 this) + ) + (if (logtest? (vehicle-flag vf56) (-> this v-flags)) + (set! (-> this rbody lin-momentum y) (* -409600.0 (-> this info info mass))) + ) + 0 + (none) + ) + +(defmethod init-collision! ((this v-toad)) + (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-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 18432.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((a0-6 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> a0-6 prim-core action) (collide-action solid)) + (set! (-> a0-6 transform-index) 0) + ) + (let ((a0-8 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 4)))) + (set! (-> a0-8 prim-core action) (collide-action solid)) + (set! (-> a0-8 transform-index) 0) + ) + (let ((a0-10 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> a0-10 prim-core action) (collide-action solid)) + (set! (-> a0-10 transform-index) 0) + ) + (let ((a0-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8)))) + (set! (-> a0-12 prim-core action) (collide-action solid)) + (set! (-> a0-12 transform-index) 0) + ) + (let ((a0-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 5)))) + (set! (-> a0-14 prim-core action) (collide-action solid)) + (set! (-> a0-14 transform-index) 0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1168)))) + (set! (-> v1-21 prim-core action) (collide-action solid nav-sphere)) + (set! (-> v1-21 transform-index) 0) + (set! (-> v1-21 nav-radius) 20480.0) + ) + (let ((a0-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 16)))) + (set! (-> a0-19 prim-core action) (collide-action solid)) + (set! (-> a0-19 transform-index) 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 action) (collide-action solid rideable)) + (set! (-> v1-25 transform-index) 3) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 28672.0) + ) + (set! (-> s5-0 nav-radius) 20480.0) + (let ((v1-27 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-27 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-27 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-toad)) + (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 11264.0 :y 2252.8 :z 20275.2 :w 5120.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 :x -11264.0 :y 2252.8 :z 20275.2 :w 5120.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 :x 12697.6 :y 3481.6 :z -12083.2 :w 6553.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 -12697.6 :y 3481.6 :z -12083.2 :w 6553.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 4096.0 :z 14336.0 :w 6963.2)) + 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 5324.8 :z 1228.8 :w 8192.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 5324.8 :z -10649.6 :w 6963.2)) + 16 + ) + ) + ((method-of-type wcar-base vehicle-method-62) this) + 0 + (none) + ) + +(defmethod v-toad-method-203 ((this v-toad) (arg0 vehicle-wheel-state) (arg1 vehicle-wheel-info)) + (let ((gp-0 (new 'stack-no-clear 'wvehicle-physics-work))) + (set-vector! (-> gp-0 p-body) 1.0 0.0 0.0 1.0) + (set-vector! (-> gp-0 axis) 0.0 1.0 0.0 1.0) + (quaternion-copy! (the-as quaternion (-> gp-0 world-normal)) (-> this root quat)) + (let* ((v1-3 (-> gp-0 mat)) + (a3-0 (-> this rbody matrix)) + (a0-7 (-> a3-0 rvec quad)) + (a1-2 (-> a3-0 uvec quad)) + (a2-1 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-3 rvec quad) a0-7) + (set! (-> v1-3 uvec quad) a1-2) + (set! (-> v1-3 fvec quad) a2-1) + (set! (-> v1-3 trans quad) a3-1) + ) + (set! (-> gp-0 wsphere y) (* (-> arg1 radius) (-> arg1 scale))) + (set! (-> gp-0 wsphere z) 13590.528) + (set! (-> gp-0 wsphere r) 0.0) + (set! (-> gp-0 friction-coef) + (+ (-> gp-0 wsphere r) (* 2.0 (asin (/ (* 0.5 (-> arg1 travel)) (-> gp-0 wsphere z))))) + ) + (set! (-> gp-0 steering-axis quad) (-> (new 'static 'vector :x 10649.6 :y 2662.4 :z 7618.56 :w 1.0) quad)) + (set-vector! + (-> gp-0 ground-pos) + 0.0 + (* -1.0 (- (sin (-> gp-0 friction-coef)) (sin (-> gp-0 wsphere r))) (-> gp-0 wsphere z)) + (* (- (cos (-> gp-0 friction-coef)) (cos (-> gp-0 wsphere r))) (-> gp-0 wsphere z)) + 1.0 + ) + (vector-normalize! (-> gp-0 ground-pos) 1.0) + (set! (-> gp-0 tmp quad) (-> gp-0 steering-axis quad)) + (+! (-> gp-0 tmp z) (* (-> gp-0 wsphere z) (cos (-> gp-0 wsphere r)))) + (+! (-> gp-0 tmp y) (* -1.0 (sin (-> gp-0 wsphere r)) (-> gp-0 wsphere z))) + (set! (-> gp-0 tmp y) (- (-> gp-0 tmp y) (-> gp-0 wsphere y))) + (set! (-> gp-0 tmp x) (* (-> gp-0 tmp x) (-> arg0 x-scale))) + (vector+float*! + (-> gp-0 tmp) + (-> gp-0 tmp) + (-> arg0 local-axis) + (* (-> arg1 steer-arm-length) (-> arg0 x-scale)) + ) + (set! (-> arg0 probe-local-pos quad) (-> gp-0 tmp quad)) + (set! (-> arg0 probe-local-dir quad) (-> gp-0 ground-pos quad)) + (vector-matrix*! (-> gp-0 side-dir) (-> gp-0 tmp) (-> gp-0 mat)) + (vector-rotate*! (-> gp-0 forward-dir) (-> gp-0 ground-pos) (-> gp-0 mat)) + (set! (-> gp-0 wsphere x) + (- (+ (-> arg0 probe-local-pos y) + (-> gp-0 wsphere y) + (* (-> arg0 probe-local-dir y) (-> arg0 pos2) (-> arg1 travel)) + ) + (-> gp-0 steering-axis y) + ) + ) + (set! (-> arg0 sin-susp-ang) (fmax -1.0 (fmin 1.0 (/ (- (-> gp-0 wsphere x)) (-> gp-0 wsphere z))))) + (let ((f0-52 1.0) + (f1-16 (-> arg0 sin-susp-ang)) + ) + (set! (-> arg0 cos-susp-ang) (sqrtf (- f0-52 (* f1-16 f1-16)))) + ) + (quaternion-identity! (the-as quaternion (-> gp-0 local-pos))) + (set! (-> gp-0 local-pos z) (* (sin (-> arg1 camber)) (-> arg0 x-scale))) + (set! (-> gp-0 local-pos w) (cos (-> arg1 camber))) + (when (logtest? (-> arg1 flags) (vehicle-wheel-flag vwf5)) + (quaternion-set! + (the-as quaternion (-> gp-0 force)) + 0.0 + 0.0 + (* (-> arg0 sin-susp-ang) (-> arg0 x-scale)) + (+ 1.0 (-> arg0 cos-susp-ang)) + ) + (quaternion-normalize! (the-as quaternion (-> gp-0 force))) + (quaternion*! + (the-as quaternion (-> gp-0 local-pos)) + (the-as quaternion (-> gp-0 local-pos)) + (the-as quaternion (-> gp-0 force)) + ) + ) + (set! (-> gp-0 dir quad) (-> gp-0 steering-axis quad)) + (+! (-> gp-0 dir z) (* (-> gp-0 wsphere z) (-> arg0 cos-susp-ang))) + (+! (-> gp-0 dir y) (* -1.0 (-> arg0 sin-susp-ang) (-> gp-0 wsphere z))) + (set! (-> gp-0 dir x) (* (-> gp-0 dir x) (-> arg0 x-scale))) + (vector+float*! + (-> gp-0 dir) + (-> gp-0 dir) + (-> arg0 local-axis) + (* (-> arg1 steer-arm-length) (-> arg0 x-scale)) + ) + (vector-matrix*! (-> gp-0 ground-normal-sum) (-> gp-0 dir) (-> gp-0 mat)) + (quaternion-vector-angle! (the-as quaternion (-> gp-0 world-pos)) (-> gp-0 axis) (-> arg0 steer-angle)) + (quaternion-vector-angle! (the-as quaternion (-> gp-0 velocity)) (-> gp-0 p-body) (-> arg0 angle)) + (quaternion*! + (the-as quaternion (-> gp-0 force)) + (the-as quaternion (-> gp-0 world-pos)) + (the-as quaternion (-> gp-0 local-pos)) + ) + (quaternion*! + (the-as quaternion (-> gp-0 force)) + (the-as quaternion (-> gp-0 force)) + (the-as quaternion (-> gp-0 velocity)) + ) + (quaternion*! (-> arg0 quat) (the-as quaternion (-> gp-0 world-normal)) (the-as quaternion (-> gp-0 force))) + (set! (-> arg0 trans quad) (-> gp-0 ground-normal-sum quad)) + ) + 0 + (none) + ) + +(defmethod vehicle-method-79 ((this v-toad)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'quaternion 2))) + (quaternion-axis-angle! (-> s5-0 1) 1.0 0.0 0.0 -5355.7476) + (dotimes (s4-0 2) + (let ((v1-3 (-> this wheel s4-0))) + (-> v1-3 info) + (quaternion-set! (-> s5-0 0) (-> v1-3 sin-susp-ang) 0.0 0.0 (+ 1.0 (-> v1-3 cos-susp-ang))) + ) + (quaternion-normalize! (-> s5-0 0)) + (let ((v1-6 (-> this jmod-axles s4-0))) + (quaternion*! (-> v1-6 rotation) (-> s5-0 1) (-> s5-0 0)) + ) + 0 + ) + ) + (let ((s5-1 (new 'stack-no-clear 'inline-array 'quaternion 1)) + (s4-1 2) + ) + (while (< s4-1 4) + (let ((v1-13 (-> this wheel s4-1))) + (-> v1-13 info) + (quaternion-set! + (-> s5-1 0) + 0.0 + 0.0 + (* (-> v1-13 sin-susp-ang) (-> v1-13 x-scale)) + (+ 1.0 (-> v1-13 cos-susp-ang)) + ) + ) + (quaternion-normalize! (-> s5-1 0)) + (let ((v1-16 (-> this jmod-axles s4-1))) + (quaternion-copy! (-> v1-16 rotation) (-> s5-1 0)) + ) + 0 + (+! s4-1 1) + ) + ) + (let ((s5-2 (new 'stack-no-clear 'wvehicle-physics-work))) + (let* ((v1-19 (-> s5-2 mat)) + (a3-3 (-> this node-list data 0 bone transform)) + (a0-12 (-> a3-3 rvec quad)) + (a1-5 (-> a3-3 uvec quad)) + (a2-4 (-> a3-3 fvec quad)) + (a3-4 (-> a3-3 trans quad)) + ) + (set! (-> v1-19 rvec quad) a0-12) + (set! (-> v1-19 uvec quad) a1-5) + (set! (-> v1-19 fvec quad) a2-4) + (set! (-> v1-19 trans quad) a3-4) + ) + (set! (-> s5-2 force quad) (-> (new 'static 'vector :x 8806.4 :y 5324.8 :z -11878.4 :w 1.0) quad)) + (set! (-> s5-2 velocity quad) (-> (new 'static 'vector :x 8806.4 :y 5324.8 :z -11878.4 :w 1.0) quad)) + (set-vector! (-> s5-2 local-pos) 32768.0 32768.0 0.0 0.0) + (dotimes (s4-2 2) + (let ((v1-26 (-> this wheel (+ s4-2 2)))) + (let ((a0-20 (-> v1-26 info))) + (set! (-> s5-2 ground-pos y) (+ -2048.0 (-> a0-20 susp-arm-length))) + (set! (-> s5-2 tmp quad) (-> (the-as (pointer uint128) (+ (+ (* s4-2 16) 64) (the-as int s5-2))))) + (set! (-> s5-2 steering-axis quad) (-> a0-20 local-pos quad)) + ) + (+! (-> s5-2 steering-axis x) (* (-> s5-2 ground-pos y) (-> v1-26 cos-susp-ang))) + (+! (-> s5-2 steering-axis y) (* (-> s5-2 ground-pos y) (-> v1-26 sin-susp-ang))) + (set! (-> s5-2 p-body quad) (-> s5-2 steering-axis quad)) + (set! (-> s5-2 p-body x) (* (-> s5-2 p-body x) (-> v1-26 x-scale))) + (set! (-> s5-2 tmp x) (* (-> s5-2 tmp x) (-> v1-26 x-scale))) + ) + (vector-! (-> s5-2 axis) (-> s5-2 p-body) (-> s5-2 tmp)) + (set! (-> s5-2 ground-pos x) (vector-length (-> s5-2 axis))) + (set! (-> s5-2 ground-pos z) (- (-> s5-2 local-pos data s4-2) (atan (-> s5-2 axis x) (-> s5-2 axis y)))) + (let ((v1-34 (-> this jmod-shock-tops s4-2))) + (quaternion-axis-angle! (-> v1-34 rotation) 0.0 0.0 1.0 (-> s5-2 ground-pos z)) + ) + 0 + (let ((v1-38 (-> this jmod-shock-bots s4-2))) + (set! (-> v1-38 transform trans y) (* -1.0 (+ -3686.4 (-> s5-2 ground-pos x)))) + ) + 0 + 0 + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch (function v-toad vehicle-wheel-state vehicle-wheel-info none) vs none. +(defmethod rigid-body-object-method-37 ((this v-toad)) + (let ((t9-0 (method-of-type wcar-base rigid-body-object-method-37))) + (t9-0 this) + ) + (set! (-> this info physics-model front-wheel callback) (method-of-object this v-toad-method-203)) + (none) + ) + +(defmethod init-rbody-control! ((this v-toad)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-toad" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! this *v-toad-constants*) + (set! (-> this rider-hand-joint-array 0) 14) + (set! (-> this shoot-delay) (the-as uint 300)) + ((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 6) (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 7) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + this + (the-as uint 10) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-shock-tops 1) this (the-as uint 12) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-set-local init) + (the-as joint-mod-set-local (-> this jmod-shock-bots)) + this + (the-as uint 11) + (joint-mod-base-flags attached trans) + ) + (init (-> this jmod-shock-bots 1) this (the-as uint 13) (joint-mod-base-flags attached trans)) + (spawn-wheels! + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-toad-wheel" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-toad-wheel-blur" (the-as (pointer level) #f))) + (the-as skeleton-group #f) + (the-as skeleton-group #f) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wcar-turtle.gc b/goal_src/jak3/levels/desert/wvehicle/wcar-turtle.gc index 860614140a..a965aebc7a 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wcar-turtle.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wcar-turtle.gc @@ -7,3 +7,264 @@ ;; DECOMP BEGINS +(deftype v-turtle (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) + (ant-tip-vel vector :inline) + (spring-pos vector :inline) + (spring-vel vector :inline) + ) + ) + + +(defmethod init-collision! ((this v-turtle)) + (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! (-> 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 ((v1-22 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-22 prim-core action) (collide-action solid rideable)) + (set! (-> v1-22 transform-index) 3) + (set-vector! (-> v1-22 local-sphere) 0.0 0.0 0.0 16384.0) + ) + (set! (-> s5-0 nav-radius) 20480.0) + (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! (-> s5-0 nav-flags) (nav-flags has-child-spheres)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod vehicle-method-62 ((this v-turtle)) + (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 7782.4 :y 1638.4 :z 7987.2 :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 -7782.4 :y 1638.4 :z 7987.2 :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 7372.8 :y 4096.0 :z -8601.6 :w 3686.4)) + 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 -8601.6 :w 3686.4)) + 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 4096.0 :w 6144.0)) + 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 5324.8 :z -6553.6 :w 6144.0)) + 16 + ) + ) + ((method-of-type wcar-base vehicle-method-62) this) + (none) + ) + +(defmethod vehicle-method-79 ((this v-turtle)) + (local-vars (v1-33 float) (v1-47 float) (v1-52 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set-vector! (-> this root scale) 1.0 1.0 1.07 1.0) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'quaternion 2))) + (set-vector! (-> s5-0 2) -3640.889 3640.889 3640.889 -3640.889) + (dotimes (s4-0 (-> this info physics-model wheel-count)) + (let ((v1-6 (-> this wheel s4-0))) + (-> v1-6 info) + (let ((s3-0 (-> this jmod-axles s4-0))) + (quaternion-set! + (-> s5-0 0) + 0.0 + 0.0 + (* (-> v1-6 sin-susp-ang) (-> v1-6 x-scale)) + (+ 1.0 (-> v1-6 cos-susp-ang)) + ) + (quaternion-normalize! (-> s5-0 0)) + (quaternion-axis-angle! (-> s5-0 1) 0.0 1.0 0.0 (-> (&-> s5-0 0 data s4-0) 8)) + (quaternion*! (-> s3-0 rotation) (-> s5-0 0) (-> s5-0 1)) + ) + ) + 0 + ) + ) + (let ((s5-1 (new 'stack-no-clear 'wvehicle-physics-work))) + (set! (-> s5-1 mat trans x) (seconds-per-frame)) + (vector-matrix*! (-> s5-1 mat uvec) (new 'static 'vector :y 20480.0 :z -8192.0 :w 1.0) (-> this rbody matrix)) + (rigid-body-control-method-23 (-> this rbody) (-> s5-1 mat uvec) (the-as vector (-> s5-1 mat))) + (vector-! (-> s5-1 mat fvec) (the-as vector (-> s5-1 mat)) (-> this ant-tip-vel)) + (set! (-> this ant-tip-vel quad) (-> s5-1 mat rvec quad)) + (vector-float*! (-> s5-1 mat fvec) (-> s5-1 mat fvec) (/ 1.0 (-> s5-1 mat trans x))) + (vector+float*! + (-> this spring-vel) + (-> this spring-vel) + (-> s5-1 mat fvec) + (* -0.00024414062 (-> s5-1 mat trans x)) + ) + (set! (-> s5-1 mat trans y) 500.0) + (set! (-> s5-1 mat trans z) 5.0) + (vector+float*! + (-> this spring-vel) + (-> this spring-vel) + (-> this spring-pos) + (* -1.0 (-> s5-1 mat trans x) (-> s5-1 mat trans y)) + ) + (vector-float*! + (-> this spring-vel) + (-> this spring-vel) + (fmax 0.0 (+ 1.0 (* -1.0 (-> s5-1 mat trans z) (-> s5-1 mat trans x)))) + ) + (vector+float*! (-> this spring-pos) (-> this spring-pos) (-> this spring-vel) (-> s5-1 mat trans 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-33 vf1) + (let ((f0-27 v1-33)) + (when (< 1.0 f0-27) + (vector-float*! (-> this spring-pos) (-> this spring-pos) (/ 1.0 (sqrtf f0-27))) + (vector-reset! (-> this spring-vel)) + ) + ) + (let ((s5-2 (new 'stack-no-clear 'wvehicle-jmod-work))) + (quaternion-conjugate! (-> s5-2 quat1) (-> this root quat)) + (quaternion->matrix (-> s5-2 mat0) (-> s5-2 quat1)) + (set! (-> s5-2 float0) 8192.0) + (set! (-> s5-2 float2) (sin (* 0.5 (-> s5-2 float0)))) + (set! (-> s5-2 float1) (cos (* 0.5 (-> s5-2 float0)))) + (vector-rotate90-around-y! (-> s5-2 vec0) (-> this spring-pos)) + (vector-float*! (-> s5-2 vec0) (-> s5-2 vec0) (* -1.0 (-> s5-2 float2))) + (vector-rotate*! (-> s5-2 vec0) (-> s5-2 vec0) (-> s5-2 mat0)) + (set! (-> s5-2 quat0 x) (-> s5-2 vec0 x)) + (set! (-> s5-2 quat0 y) (-> s5-2 vec0 y)) + (set! (-> s5-2 quat0 z) (-> s5-2 vec0 z)) + (let ((f0-42 1.0)) + (.lvf vf1 (&-> (-> s5-2 vec0) 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-47 vf1) + (set! (-> s5-2 quat0 w) (sqrtf (- f0-42 v1-47))) + ) + (quaternion-copy! (-> this jmod-antenna 0 rotation) (-> s5-2 quat0)) + (vector-float*! (-> s5-2 vec0) (-> s5-2 vec0) 1.0) + (set! (-> s5-2 quat0 x) (-> s5-2 vec0 x)) + (set! (-> s5-2 quat0 y) (-> s5-2 vec0 y)) + (set! (-> s5-2 quat0 z) (-> s5-2 vec0 z)) + (let ((f0-49 1.0)) + (.lvf vf1 (&-> (-> s5-2 vec0) 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-52 vf1) + (set! (-> s5-2 quat0 w) (sqrtf (- f0-49 v1-52))) + ) + (quaternion-copy! (-> this jmod-antenna 1 rotation) (-> s5-2 quat0)) + (quaternion-copy! (-> this jmod-antenna 2 rotation) (-> s5-2 quat0)) + (quaternion-copy! (-> this jmod-antenna 3 rotation) (-> s5-2 quat0)) + ) + 0 + (none) + ) + ) + +(defmethod init-rbody-control! ((this v-turtle)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-turtle" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! this *v-turtle-constants*) + (set! (-> this rider-hand-joint-array 0) 8) + ((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 6) (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 7) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-antenna)) + this + (the-as uint 9) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-antenna 1) this (the-as uint 10) (joint-mod-base-flags attached)) + (init (-> this jmod-antenna 2) this (the-as uint 11) (joint-mod-base-flags attached)) + (init (-> this jmod-antenna 3) this (the-as uint 12) (joint-mod-base-flags attached)) + (vector-reset! (-> this ant-tip-vel)) + (vector-reset! (-> this spring-pos)) + (vector-reset! (-> this spring-vel)) + (spawn-wheels! + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-turtle-wheel" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-turtle-wheel-blur" (the-as (pointer level) #f))) + (the-as skeleton-group #f) + (the-as skeleton-group #f) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wcar-x-ride.gc b/goal_src/jak3/levels/desert/wvehicle/wcar-x-ride.gc index 2b9dd1a280..1687bfb201 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wcar-x-ride.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wcar-x-ride.gc @@ -7,3 +7,115 @@ ;; DECOMP BEGINS +(deftype v-x-ride (wcar-snake-base) + () + ) + + +(defmethod vehicle-method-62 ((this v-x-ride)) + (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 3317.76 :z 9011.2 :w 4915.2)) + 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 -14336.0 :w 6144.0)) + 16 + ) + (set! (-> (the-as collide-shape-prim-group s5-0) child 7 local-sphere w) 20889.6) + ) + ((method-of-type wcar-base vehicle-method-62) this) + 0 + (none) + ) + +(defmethod init-rbody-control! ((this v-x-ride)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-x-ride" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (setup-masks (-> this draw) 0 -1) + (setup-masks (-> this draw) 1 0) + (setup-masks (-> this draw) 4 0) + (alloc-rbody-control! this *v-x-ride-constants*) + (set! (-> this shoot-delay) (the-as uint 18)) + (set! (-> this local-gun-pos 0 quad) (-> (new 'static 'vector :x 2048.0 :y 3686.4 :z 14336.0 :w 1.0) quad)) + (set! (-> this local-gun-pos 1 quad) (-> (new 'static 'vector :x -2048.0 :y 3686.4 :z 14336.0 :w 1.0) quad)) + (set! (-> this rider-hand-joint-array 0) 8) + ((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 6) (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 7) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + this + (the-as uint 11) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-shock-tops 1) this (the-as uint 15) (joint-mod-base-flags attached)) + (init (-> this jmod-shock-tops 2) this (the-as uint 9) (joint-mod-base-flags attached)) + (init (-> this jmod-shock-tops 3) this (the-as uint 13) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-set-local init) + (the-as joint-mod-set-local (-> this jmod-shock-mids)) + this + (the-as uint 12) + (joint-mod-base-flags attached trans) + ) + (init (-> this jmod-shock-mids 1) this (the-as uint 16) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-mids 2) this (the-as uint 10) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-mids 3) this (the-as uint 14) (joint-mod-base-flags attached trans)) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this jmod-guns)) + this + (the-as uint 17) + (joint-mod-base-flags attached trans) + ) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this jmod-guns 1)) + this + (the-as uint 18) + (joint-mod-base-flags attached trans) + ) + (spawn-wheels! + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-fox-wheel" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-fox-wheel-blur" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-snake-wheel" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-snake-wheel-blur" (the-as (pointer level) #f))) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wcar.gc b/goal_src/jak3/levels/desert/wvehicle/wcar.gc index 5e34049d5d..3418643c4d 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wcar.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wcar.gc @@ -5,5 +5,4256 @@ ;; name in dgo: wcar ;; dgos: LPATK, LFACCAR, WASALL +(deftype wcar-proj-init-by-other-params (structure) + ((params projectile-init-by-other-params :inline :offset 0) + (vec1 vector :inline :offset 32) + (mat0 matrix :inline :offset 128) + (mat1 matrix :inline :offset 192) + (vec0 vector 8 :inline :offset 256) + (barrel-idx int8 :offset 384) + ) + ) + +(deftype wcar-stack-type1 (structure) + ((vec0 vector 10 :inline :offset 0) + (vec1 vector 3 :inline :offset 176) + (float01 float :offset 252) + (float0 float :offset 256) + (float2 float :offset 260) + ) + ) + ;; DECOMP BEGINS +(define *v-turtle-constants* + (new 'static 'rigid-body-vehicle-constants + :info (new 'static 'rigid-body-info + :mass 3.0 + :inv-mass 0.33333334 + :linear-damping 1.0 + :angular-damping 1.0 + :bounce-factor 0.4 + :friction-factor 0.5 + :cm-offset-joint (new 'static 'vector :y 819.2 :z -409.6 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 3.5) (meters 2.5) (meters 5.5)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 40) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*v-turtle-constants* + :flags #x387318 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 v-turtle) + :engine (new 'static 'vehicle-engine-info + :max-torque 83886080.0 + :inertia 8192.0 + :drag 0.2 + :idle-rpm 900.0 + :clutch-min-rpm 2000.0 + :clutch-max-rpm 4000.0 + :min-rpm 700.0 + :max-rpm 6000.0 + :peak-torque-rpm 3200.0 + :powerband-width-rpm 4000.0 + ) + :transmission (new 'static 'vehicle-transmission-info + :inertia 4096.0 + :upshift-rpm 4500.0 + :downshift-rpm 2500.0 + :final-drive-ratio 9.0 + :gear-ratio-array (new 'static 'array float 8 -3.375 3.375 2.25 1.5 1.0 0.0 0.0 0.0) + :gear-count 5 + ) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 10.0 + :engine-intake-factor 1.0 + :brake-factor 5033165000.0 + :turbo-boost-factor 0.7 + :turbo-boost-duration (seconds 3.5) + :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 3) + :cos-ground-effect-angle 0.42261827 + :spring-lift-factor 1.0 + :air-drag-factor 1.0 + :steering-fin-angle 1820.4445 + :steering-thruster-factor 1.0 + :steering-thruster-max-gain 1.0 + :steering-thruster-half-gain-speed (meters 30) + :tire-steering-angle 4551.1113 + :tire-steering-speed-factor 34816.0 + :tire-steering-speed-bias 40960.0 + :ackermann-factor 0.3 + :tire-friction-factor 1.0 + :tire-static-friction 1.516 + :tire-static-friction-speed (meters 2) + :tire-dynamic-friction 0.98539996 + :tire-dynamic-friction-speed (meters 4) + :tire-inv-max-friction-speed 0.000024414063 + :airfoil-factor 1.0 + :drag-force-factor 0.35 + :rolling-resistance 0.08 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 1.0 + :pitch-control-factor 1.0 + :roll-control-factor 1.0 + :jump-thrust-factor 1.5 + :buoyancy-factor 0.03 + :water-drag-factor 0.25 + :player-weight 122880.0 + :air-roll-torque 40960.0 + :air-pitch-torque 81920.0 + :air-angular-damping 0.97 + :hop-turn-torque 225280.0 + :ground-torque-scale 0.45 + :ai-steering-factor 4.0 + :ai-throttle-factor 0.5 + ) + :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 9011.2 :z -4915.2 :w 1.0) + (new 'static 'vector :x -20480.0 :y 12288.0 :w 1.0) + (new 'static 'vector :x 20480.0 :y 12288.0 :w 1.0) + (new 'static 'vector :y 12288.0 :z 20480.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.5 + :engine-pitch-mod-amp 0.05 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "turt-scrape") + :glance-sound (static-sound-name "turt-glance") + :impact-sound (static-sound-name "turt-crash") + :explode-sound (static-sound-name "car-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "turt-flutter") + :water-sound (static-sound-name "turt-water") + :jump-sound (static-sound-name "turt-hop") + :turbo-sound (static-sound-name "turt-boost") + :bank-replace '((wasall1 wasturt)) + :idle-rpm 900.0 + :idle-pitch-scale 0.5 + :idle-crossover-rpm 1000.0 + :engine-rpm 3000.0 + :engine-crossover-rpm 4000.0 + :start-sound (static-sound-name "turt-start") + :stop-sound (static-sound-name "turt-stop") + :idle-sound (static-sound-name "turt-idle") + :engine-sound (static-sound-name "turt-steady") + :susp-creak-sound (static-sound-name "turt-bounce") + :susp-bottom-out-sound (static-sound-name "turt-bottom") + :susp-speed-threshold 81920.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "turt-road") + :speed 40960.0 + :min-speed 20480.0 + :max-speed 61440.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "turt-dirt") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "turt-sand") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "turt-knobby") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 40960.0 + :pitch-scale 0.125 + :min-pitch -0.2 + :max-pitch 0.2 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "turt-skid-road") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "turt-skid-dirt") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :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-flame-length (meters 2) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 5120.0 :y 3276.8 :z -12697.6 :w 1.0) + (new 'static 'vector :x -5120.0 :y 3276.8 :z -12697.6 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 5242.88 :y 3399.68 :z -12288.0 :w 1.0) + (new 'static 'vector :x -5242.88 :y 3399.68 :z -12288.0 :w 1.0) + ) + :exhaust-local-dir (new 'static 'inline-array vector 2 + (new 'static 'vector :x 0.4 :y 0.1 :z -1.0 :w 1.0) + (new 'static 'vector :x -0.4 :y 0.1 :z -1.0 :w 1.0) + ) + :smoke-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1024.0 :y 5120.0 :z -10240.0 :w 1.0) + (new 'static 'vector :x -1024.0 :y 5120.0 :z -10240.0 :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 1843.2 :y 2867.2 :z 8601.6 :w 1.0) + (new 'static 'vector :x -1843.2 :y 2867.2 :z 8601.6 :w 1.0) + (new 'static 'vector) + ) + :taillight-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 2457.6 :y 6758.4 :z -11264.0 :w 1.0) + (new 'static 'vector :x -2457.6 :y 6758.4 :z -11264.0 :w 1.0) + ) + ) + :damage (new 'static 'vehicle-damage-info + :inv-toughness-factor 0.8333333 + :hit-points 29.997 + :inv-hit-points 0.033336665 + :hit-threshold 8192.0 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 0.3333 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :inv-lift-thruster-count 1.0 + :engine-thrust-local-pos (new 'static 'vector :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 :x 4300.8 :y -491.52 :z 9420.8 :w 1.0) + :flags (vehicle-wheel-flag vwf1 vwf4) + :inertia 4300800.0 + :radius 2334.72 + :susp-arm-length 2867.2 + :steer-arm-length 1638.4 + :scale 1.4 + :travel 2867.2 + :probe-y-offset -2048.0 + :width 2867.2 + :suspension-spring 0.6 + :suspension-damping 0.4 + :forward-grip 1.0 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.79 + :probe-radius 2048.0 + :tread-texture "tread-turtle" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :x 3891.2 :y 409.6 :z -10035.199 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf2) + :inertia 4915200.0 + :radius 2334.72 + :susp-arm-length 3481.6 + :steer-arm-length 2048.0 + :scale 1.6 + :travel 3440.6401 + :probe-y-offset -1474.56 + :width 2867.2 + :suspension-spring 0.7 + :suspension-damping 0.4 + :forward-grip 1.15 + :side-grip 1.15 + :max-brake-torque 1.0 + :settle-pos 0.79 + :probe-radius 2457.6 + :tread-texture "tread-turtle" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 4341.76 + :settle-rot-x -546.13336 + :shadow-bot-clip -61440.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 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 1 + :rider-stance #x2 + :grab-rail-array #f + :seat-array (new 'static 'inline-array vehicle-seat-info 4 + (new 'static 'vehicle-seat-info :position (new 'static 'vector :y 2007.04 :z 819.2 :w (the-as float #x10000))) + (new 'static 'vehicle-seat-info) + (new 'static 'vehicle-seat-info) + (new 'static 'vehicle-seat-info) + ) + :rider-hand-offset (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1228.8 :y 614.4 :z -368.64 :w 1.0) + (new 'static 'vector :x -1228.8 :y 614.4 :z -368.64 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xda + :debris #f + :name-text (text-id progress-inventory-v-turtle) + ) + ) + +(define *v-snake-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.4 + :friction-factor 0.5 + :cm-offset-joint (new 'static 'vector :y 409.6 :z -2048.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 5) (meters 2.5) (meters 6.5)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 40) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*v-snake-constants* + :flags #x387318 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 v-snake) + :engine (new 'static 'vehicle-engine-info + :max-torque 167772160.0 + :inertia 16384.0 + :drag 0.2 + :idle-rpm 900.0 + :clutch-min-rpm 2000.0 + :clutch-max-rpm 5500.0 + :min-rpm 600.0 + :max-rpm 7500.0 + :peak-torque-rpm 3800.0 + :powerband-width-rpm 4100.0 + ) + :transmission (new 'static 'vehicle-transmission-info + :inertia 8192.0 + :upshift-rpm 5500.0 + :downshift-rpm 3200.0 + :final-drive-ratio 14.0 + :gear-ratio-array (new 'static 'array float 8 -2.25 3.375 2.25 1.5 1.0 0.0 0.0 0.0) + :gear-count 5 + ) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 10.0 + :engine-intake-factor 1.0 + :brake-factor 3355443200.0 + :turbo-boost-factor 0.75 + :turbo-boost-duration (seconds 2) + :max-xz-speed (meters 30) + :player-turn-anim-bias 0.5 + :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 1.0 + :air-drag-factor 1.0 + :steering-fin-angle 1820.4445 + :steering-thruster-factor 1.0 + :steering-thruster-max-gain 1.0 + :steering-thruster-half-gain-speed (meters 30) + :tire-steering-angle 4369.067 + :tire-steering-speed-factor 38912.0 + :tire-steering-speed-bias 36864.0 + :ackermann-factor 0.45 + :tire-friction-factor 1.0 + :tire-static-friction 2.178 + :tire-static-friction-speed (meters 2) + :tire-dynamic-friction 1.4157 + :tire-dynamic-friction-speed (meters 4) + :tire-inv-max-friction-speed 0.000024414063 + :airfoil-factor 1.0 + :drag-force-factor 0.35 + :rolling-resistance 0.08 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 1.0 + :pitch-control-factor 1.0 + :roll-control-factor 1.0 + :jump-thrust-factor 1.0 + :buoyancy-factor 0.03 + :water-drag-factor 0.25 + :player-weight 122880.0 + :air-roll-torque 81920.0 + :air-pitch-torque 163840.0 + :air-angular-damping 0.98 + :hop-turn-torque 737280.0 + :ground-torque-scale 0.55 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :turning-accel (meters 20) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 4.5) + :string-max-height (meters 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 :x -2048.0 :y 6144.0 :w 1.0) + (new 'static 'vector :x -20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :x 20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :y 19251.2 :z 20480.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.5 + :engine-pitch-mod-amp 0.05 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "snake-scrape") + :glance-sound (static-sound-name "snake-glance") + :impact-sound (static-sound-name "snake-crash") + :explode-sound (static-sound-name "car-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "snake-flutter") + :water-sound (static-sound-name "snake-water") + :jump-sound (static-sound-name "snake-hop") + :turbo-sound (static-sound-name "snake-boost") + :bank-replace '((wasall1 wassnake)) + :idle-rpm 1300.0 + :idle-pitch-scale 0.5 + :idle-crossover-rpm 1000.0 + :engine-rpm 4700.0 + :engine-crossover-rpm 2500.0 + :start-sound (static-sound-name "snake-start") + :stop-sound (static-sound-name "snake-stop") + :idle-sound (static-sound-name "snake-idle") + :engine-sound (static-sound-name "snake-steady") + :susp-creak-sound (static-sound-name "snake-bounce") + :susp-bottom-out-sound (static-sound-name "snake-bottom") + :susp-speed-threshold 61440.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-road") + :speed 40960.0 + :min-speed 20480.0 + :max-speed 61440.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-dirt") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-sand") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-knobby") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 40960.0 + :pitch-scale 0.125 + :min-pitch -0.2 + :max-pitch 0.2 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-skid-road") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-skid-dirt") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :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-flame-length (meters 2) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 4505.6 :z -15564.8 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4505.6 :z -15564.8 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 4096.0 :z -15974.4 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4096.0 :z -15974.4 :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 39.996 + :inv-hit-points 0.025002502 + :hit-threshold 8192.0 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 0.3333 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :inv-lift-thruster-count 1.0 + :engine-thrust-local-pos (new 'static 'vector :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 :x 1843.2 :y 901.12 :z 7864.32 :w 1.0) + :flags (vehicle-wheel-flag vwf1 vwf3 vwf4) + :inertia 6144000.0 + :radius 3399.68 + :susp-arm-length 5939.2 + :steer-arm-length 1638.4 + :scale 1.2 + :travel 4055.04 + :probe-y-offset -2580.48 + :width 3276.8 + :suspension-spring 0.6 + :suspension-damping 0.3 + :forward-grip 0.9 + :side-grip 1.0 + :max-brake-torque 1.0 + :camber 546.13336 + :settle-pos 0.78 + :probe-radius 2457.6 + :tread-texture "tread-snake" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :x 1351.68 :y 1638.4 :z -12083.2 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf2 vwf3 vwf5) + :inertia 10240000.0 + :radius 3399.68 + :susp-arm-length 8069.12 + :steer-arm-length 1638.4 + :scale 1.5 + :travel 4300.8 + :probe-y-offset -4710.4 + :width 3276.8 + :suspension-spring 0.5 + :suspension-damping 0.3 + :forward-grip 1.5 + :side-grip 1.0 + :max-brake-torque 1.0 + :camber 1820.4445 + :settle-pos 0.76 + :probe-radius 2867.2 + :tread-texture "tread-snake" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 5324.8 + :settle-rot-x 764.5866 + :shadow-bot-clip -61440.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 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 2 + :rider-stance #x2 + :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 819.2 :z -720.896 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x 2252.8 :y 819.2 :z -720.896 :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 1310.72 :y 409.6 :z -614.4 :w 1.0) + (new 'static 'vector :x -1310.72 :y 409.6 :z -409.6 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xda + :debris #f + :name-text (text-id progress-inventory-v-snake) + ) + ) + +(define *v-scorpion-constants* + (new 'static 'rigid-body-vehicle-constants + :info (new 'static 'rigid-body-info + :mass 24.0 + :inv-mass 0.041666668 + :linear-damping 1.0 + :angular-damping 1.0 + :bounce-factor 0.4 + :friction-factor 0.5 + :cm-offset-joint (new 'static 'vector :y -4096.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 8) (meters 4) (meters 8)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 40) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*v-scorpion-constants* + :flags #x387318 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 v-scorpion) + :engine (new 'static 'vehicle-engine-info + :max-torque 335544320.0 + :inertia 65536.0 + :drag 0.4 + :idle-rpm 500.0 + :clutch-min-rpm 800.0 + :clutch-max-rpm 5100.0 + :min-rpm 300.0 + :max-rpm 6500.0 + :peak-torque-rpm 3400.0 + :powerband-width-rpm 4180.0 + ) + :transmission (new 'static 'vehicle-transmission-info + :inertia 16384.0 + :upshift-rpm 5000.0 + :downshift-rpm 1000.0 + :final-drive-ratio 30.0 + :gear-ratio-array (new 'static 'array float 8 -1.35 1.8225001 1.35 1.0 0.0 0.0 0.0 0.0) + :gear-count 4 + ) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 10.0 + :engine-intake-factor 1.0 + :brake-factor 5033165000.0 + :turbo-boost-factor 0.5 + :turbo-boost-duration (seconds 2) + :max-xz-speed (meters 30) + :player-turn-anim-bias 0.2 + :player-turn-anim-min -0.2 + :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 1.0 + :air-drag-factor 1.0 + :steering-fin-angle 1820.4445 + :steering-thruster-factor 1.0 + :steering-thruster-max-gain 1.0 + :steering-thruster-half-gain-speed (meters 30) + :tire-steering-angle 2002.4889 + :tire-steering-speed-factor 40960.0 + :tire-steering-speed-bias 40960.0 + :ackermann-factor 0.8 + :tire-friction-factor 1.0 + :tire-static-friction 1.0 + :tire-static-friction-speed (meters 2) + :tire-dynamic-friction 0.65 + :tire-dynamic-friction-speed (meters 4) + :tire-inv-max-friction-speed 0.000024414063 + :airfoil-factor 1.0 + :drag-force-factor 0.4 + :rolling-resistance 0.16 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 1.0 + :pitch-control-factor 1.0 + :roll-control-factor 3.0 + :jump-thrust-factor 1.5 + :buoyancy-factor 0.03 + :water-drag-factor 0.25 + :player-weight 122880.0 + :air-roll-torque 512000.0 + :air-pitch-torque 1024000.0 + :air-angular-damping 0.98 + :hop-turn-torque 2580480.0 + :ground-torque-scale 0.75 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :turning-accel (meters 20) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 6.5) + :string-max-height (meters 6.5) + :string-min-length (meters 10.049999) + :string-max-length (meters 13.125) + :min-fov 16384.0 + :max-fov 18204.445 + :head-offset 4096.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 :x -2867.2 :y 6144.0 :z 8601.6 :w 1.0) + (new 'static 'vector :x -40960.0 :y 30720.0 :w 1.0) + (new 'static 'vector :x 40960.0 :y 30720.0 :w 1.0) + (new 'static 'vector :y 30720.0 :z 40960.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.5 + :engine-pitch-mod-amp 0.05 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "scorp-scrape") + :glance-sound (static-sound-name "scorp-glance") + :impact-sound (static-sound-name "scorp-crash") + :explode-sound (static-sound-name "car-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "scorp-flutter") + :water-sound (static-sound-name "scorp-water") + :jump-sound (static-sound-name "scorp-hop") + :turbo-sound (static-sound-name "scorp-boost") + :bank-replace '((wasall1 wasscorp)) + :idle-rpm 700.0 + :idle-pitch-scale 0.5 + :idle-crossover-rpm 800.0 + :engine-rpm 2500.0 + :engine-crossover-rpm 2500.0 + :start-sound (static-sound-name "scorp-start") + :stop-sound (static-sound-name "scorp-stop") + :idle-sound (static-sound-name "scorp-idle") + :engine-sound (static-sound-name "scorp-steady") + :susp-creak-sound (static-sound-name "scorp-bounce") + :susp-bottom-out-sound (static-sound-name "scorp-bottom") + :susp-speed-threshold 40960.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "scorp-road") + :speed 40960.0 + :min-speed 20480.0 + :max-speed 61440.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "scorp-dirt") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "scorp-sand") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "scorp-knobby") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 40960.0 + :pitch-scale 0.125 + :min-pitch -0.2 + :max-pitch 0.2 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "scorp-skid-road") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "scorp-skid-dirt") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :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-flame-length (meters 2) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 3686.4 :y 4096.0 :z -7372.8 :w 1.0) + (new 'static 'vector :x -3686.4 :y 4096.0 :z -7372.8 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 3686.4 :y 4915.2 :z -4096.0 :w 1.0) + (new 'static 'vector :x -3686.4 :y 4915.2 :z -4096.0 :w 1.0) + ) + :exhaust-local-dir (new 'static 'inline-array vector 2 (new 'static 'vector :y 1.0 :w 1.0) (new 'static 'vector :y 1.0 :w 1.0)) + :smoke-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 6144.0 :z -1638.4 :w 1.0) + (new 'static 'vector :x -6144.0 :z -1638.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 5939.2 :y -1228.8 :z 18841.6 :w 1.0) + (new 'static 'vector :x -5939.2 :y -1228.8 :z 18841.6 :w 1.0) + (new 'static 'vector) + ) + :taillight-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 7577.6 :y -2048.0 :z -18022.4 :w 1.0) + (new 'static 'vector :x -7577.6 :y -2048.0 :z -18022.4 :w 1.0) + ) + ) + :damage (new 'static 'vehicle-damage-info + :inv-toughness-factor 1.0 + :hit-points 79.992 + :inv-hit-points 0.012501251 + :hit-threshold 8192.0 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 0.3333 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :inv-lift-thruster-count 1.0 + :engine-thrust-local-pos (new 'static 'vector :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 :x 3686.4 :y -4096.0 :z 14336.0 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf4) + :inertia 32768000.0 + :radius 2048.0 + :susp-arm-length 12288.0 + :steer-arm-length 2048.0 + :scale 4.0 + :travel 7864.3203 + :probe-y-offset -4423.68 + :width 2048.0 + :suspension-spring 0.36 + :suspension-damping 0.2 + :forward-grip 1.3 + :side-grip 1.4 + :max-brake-torque 1.0 + :camber 546.13336 + :settle-pos 0.81 + :probe-radius 4096.0 + :tread-texture "tread-scorpion" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :x 3686.4 :y -4096.0 :z -12492.8 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf2 vwf4) + :inertia 32768000.0 + :radius 2048.0 + :susp-arm-length 12288.0 + :steer-arm-length 2048.0 + :scale 4.0 + :travel 7864.3203 + :probe-y-offset -4423.68 + :width 2048.0 + :suspension-spring 0.36 + :suspension-damping 0.2 + :forward-grip 1.3 + :side-grip 1.4 + :max-brake-torque 1.0 + :camber 546.13336 + :settle-pos 0.78 + :probe-radius 4096.0 + :tread-texture "tread-scorpion" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 13598.72 + :settle-rot-x -163.84 + :shadow-bot-clip -61440.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 -2730.6667 + :gun-pitch-max 5461.3335 + :gun-z-offset 11059.2 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 2 + :rider-stance #x2 + :attach-point-count 14 + :grab-rail-array #f + :seat-array (new 'static 'inline-array vehicle-seat-info 4 + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x -3072.0 :y 204.8 :z 12697.6 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x 3072.0 :y 204.8 :z 12697.6 :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 -1638.4 :y 6963.2 :z 13107.2 :w 1.0) + (new 'static 'vector :x -4300.8 :y 6963.2 :z 13107.2 :w 1.0) + ) + :attach-point-array (new 'static 'inline-array vehicle-attach-point 14 + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 2867.2 :z 16384.0 :w 1.0) + :rot (new 'static 'vector :x -3640.889 :y 32768.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -2867.2 :z 16384.0 :w 1.0) + :rot (new 'static 'vector :x -3640.889 :y 32768.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 6144.0 :y 2048.0 :z 14336.0 :w 1.0) + :rot (new 'static 'vector :x -7281.778 :y 32768.0 :z 7281.778 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -6144.0 :y 2048.0 :z 14336.0 :w 1.0) + :rot (new 'static 'vector :x -7281.778 :y 32768.0 :z -7281.778 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 8192.0 :z 4096.0 :w 1.0) + :rot (new 'static 'vector :x -12743.111 :y -16384.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -8192.0 :z 4096.0 :w 1.0) + :rot (new 'static 'vector :x -12743.111 :y 16384.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 7372.8 :z -2048.0 :w 1.0) + :rot (new 'static 'vector :x -12743.111 :y -16384.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -7372.8 :z -2048.0 :w 1.0) + :rot (new 'static 'vector :x -12743.111 :y 16384.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 2867.2 :y 4096.0 :z 2048.0 :w 1.0) + :rot (new 'static 'vector :x -1820.4445 :y -1820.4445 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -2867.2 :y 4096.0 :z 2048.0 :w 1.0) + :rot (new 'static 'vector :x -1820.4445 :y 1820.4445 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 2867.2 :y 2048.0 :z -16384.0 :w 1.0) + :rot (new 'static 'vector :x -12743.111 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -2867.2 :z -15155.2 :w 1.0) + :rot (new 'static 'vector :x -9102.223 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 6144.0 :y 2048.0 :z -14336.0 :w 1.0) + :rot (new 'static 'vector :x -8192.0 :z -7281.778 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -6144.0 :y 2048.0 :z -14336.0 :w 1.0) + :rot (new 'static 'vector :x -8192.0 :z 7281.778 :w 1.0) + ) + ) + ) + :explosion #f + :explosion-part #xda + :debris #f + :name-text (text-id progress-inventory-v-scorpion) + ) + ) + +(define *v-toad-constants* + (new 'static 'rigid-body-vehicle-constants + :info (new 'static 'rigid-body-info + :mass 16.0 + :inv-mass 0.0625 + :linear-damping 1.0 + :angular-damping 1.0 + :bounce-factor 0.4 + :friction-factor 0.5 + :cm-offset-joint (new 'static 'vector :y 819.2 :z 2048.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 6) (meters 4) (meters 10)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 40) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*v-toad-constants* + :flags #x386318 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 v-toad) + :engine (new 'static 'vehicle-engine-info + :max-torque 117440510.0 + :inertia 8192.0 + :drag 0.4 + :idle-rpm 500.0 + :clutch-min-rpm 800.0 + :clutch-max-rpm 5100.0 + :min-rpm 300.0 + :max-rpm 6500.0 + :peak-torque-rpm 3400.0 + :powerband-width-rpm 4180.0 + ) + :transmission (new 'static 'vehicle-transmission-info + :inertia 4096.0 + :upshift-rpm 5000.0 + :downshift-rpm 2000.0 + :final-drive-ratio 20.0 + :gear-ratio-array (new 'static 'array float 8 -1.8225001 2.4603753 1.8225001 1.35 1.0 0.0 0.0 0.0) + :gear-count 5 + ) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 60.0 + :engine-intake-factor 1.0 + :brake-factor 3355443200.0 + :turbo-boost-factor 0.8 + :turbo-boost-duration (seconds 2) + :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 3) + :cos-ground-effect-angle 0.42261827 + :spring-lift-factor 1.0 + :air-drag-factor 1.0 + :steering-fin-angle 1820.4445 + :steering-thruster-factor 1.0 + :steering-thruster-max-gain 1.0 + :steering-thruster-half-gain-speed (meters 30) + :tire-steering-angle 4551.1113 + :tire-steering-speed-factor 45056.0 + :tire-steering-speed-bias 36864.0 + :ackermann-factor 0.45 + :tire-friction-factor 1.0 + :tire-static-friction 1.694 + :tire-static-friction-speed (meters 2) + :tire-dynamic-friction 1.1011 + :tire-dynamic-friction-speed (meters 4) + :tire-inv-max-friction-speed 0.000024414063 + :airfoil-factor 1.0 + :drag-force-factor 0.3 + :rolling-resistance 0.08 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 1.0 + :pitch-control-factor 1.0 + :roll-control-factor 2.0 + :jump-thrust-factor 2.4 + :buoyancy-factor 0.03 + :water-drag-factor 0.25 + :player-weight 122880.0 + :air-roll-torque 151552.0 + :air-pitch-torque 307200.0 + :air-angular-damping 0.98 + :hop-turn-torque 614400.0 + :ground-torque-scale 0.4 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :turning-accel (meters 20) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 3) + :string-max-height (meters 4.5) + :string-min-length (meters 6) + :string-max-length (meters 9) + :min-fov 16384.0 + :max-fov 18204.445 + :head-offset 4096.0 + :foot-offset -4096.0 + :normal-max-angle-offset 21845.334 + :air-max-angle-offset 5461.3335 + :max-lookaround-speed 40960.0 + :look-pos-array (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2048.0 :y 10649.6 :z -4915.2 :w 1.0) + (new 'static 'vector :x -40960.0 :y 19251.2 :w 1.0) + (new 'static 'vector :x 40960.0 :y 19251.2 :w 1.0) + (new 'static 'vector :y 19251.2 :z 40960.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.5 + :engine-pitch-mod-amp 0.05 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "toad-scrape") + :glance-sound (static-sound-name "toad-glance") + :impact-sound (static-sound-name "toad-crash") + :explode-sound (static-sound-name "car-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "toad-flutter") + :water-sound (static-sound-name "toad-water") + :jump-sound (static-sound-name "toad-hop") + :turbo-sound (static-sound-name "toad-boost") + :bank-replace '((wasall1 wastoad)) + :idle-rpm 900.0 + :idle-pitch-scale 0.5 + :idle-crossover-rpm 700.0 + :engine-rpm 5300.0 + :engine-crossover-rpm 2500.0 + :start-sound (static-sound-name "toad-start") + :stop-sound (static-sound-name "toad-stop") + :idle-sound (static-sound-name "toad-idle") + :engine-sound (static-sound-name "toad-steady") + :susp-creak-sound (static-sound-name "toad-bounce") + :susp-bottom-out-sound (static-sound-name "toad-bottom") + :susp-speed-threshold 40960.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "toad-road") + :speed 40960.0 + :min-speed 20480.0 + :max-speed 61440.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "toad-dirt") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "toad-sand") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "toad-knobby") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 40960.0 + :pitch-scale 0.125 + :min-pitch -0.2 + :max-pitch 0.2 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "toad-skid-road") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "toad-skid-dirt") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + ) + ) + :particles (new 'static 'vehicle-particle-info + :taillight-count 2 + :thruster-flame-width (meters 1) + :thruster-flame-length (meters 6) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :y 5447.68 :z -14336.0 :w 1.0) + (new 'static 'vector :y 5447.68 :z -14336.0 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 2457.6 :y -1228.8 :z -5324.8 :w 1.0) + (new 'static 'vector :x -2457.6 :y -1228.8 :z -5324.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 3072.0 :z -1638.4 :w 1.0) + (new 'static 'vector :x -3072.0 :z -1638.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) + ) + :taillight-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 2457.6 :y 9830.4 :z -8192.0 :w 1.0) + (new 'static 'vector :x -2457.6 :y 9830.4 :z -8192.0 :w 1.0) + ) + ) + :damage (new 'static 'vehicle-damage-info + :inv-toughness-factor 0.6666667 + :hit-points 49.995 + :inv-hit-points 0.020002 + :hit-threshold 8192.0 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 0.3333 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :inv-lift-thruster-count 1.0 + :engine-thrust-local-pos (new 'static 'vector :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 :y -3686.4 :z 19456.0 :w 1.0) + :flags (vehicle-wheel-flag vwf1 vwf4) + :inertia 2048000.0 + :radius 4915.2 + :susp-arm-length 12288.0 + :steer-arm-length 2048.0 + :scale 1.0 + :travel 12288.0 + :width 4096.0 + :suspension-spring 0.3 + :suspension-damping 0.051 + :forward-grip 1.0 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.606 + :probe-radius 4096.0 + :tread-texture "tread-toad" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :x 2048.0 :y 819.2 :z -12083.2 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf2 vwf3 vwf5) + :inertia 10240000.0 + :radius 4915.2 + :susp-arm-length 13516.8 + :scale 1.5 + :travel 8601.6 + :probe-y-offset -3686.4001 + :width 2867.2 + :suspension-spring 0.65 + :suspension-damping 0.1 + :forward-grip 1.5 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.8 + :probe-radius 4096.0 + :tread-texture "tread-toad" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 9338.88 + :settle-rot-x 91.022224 + :shadow-bot-clip -61440.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 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 1 + :rider-stance #x2 + :grab-rail-array #f + :seat-array (new 'static 'inline-array vehicle-seat-info 4 + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x -2457.6 :y 3276.8 :z -1228.8 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info) + (new 'static 'vehicle-seat-info) + (new 'static 'vehicle-seat-info) + ) + :rider-hand-offset (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1228.8 :y 942.08 :z -860.16 :w 1.0) + (new 'static 'vector :x -1433.6 :y 942.08 :z -860.16 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xda + :debris #f + :name-text (text-id progress-inventory-v-toad) + ) + ) + +(define *v-fox-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.4 + :friction-factor 0.5 + :cm-offset-joint (new 'static 'vector :y 409.6 :z -2048.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 4) (meters 3) (meters 6.5)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 40) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*v-fox-constants* + :flags #x387318 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 v-fox) + :engine (new 'static 'vehicle-engine-info + :max-torque 218103800.0 + :inertia 16384.0 + :drag 0.2 + :idle-rpm 900.0 + :clutch-min-rpm 2000.0 + :clutch-max-rpm 5500.0 + :min-rpm 600.0 + :max-rpm 7500.0 + :peak-torque-rpm 3800.0 + :powerband-width-rpm 4100.0 + ) + :transmission (new 'static 'vehicle-transmission-info + :inertia 8192.0 + :upshift-rpm 5500.0 + :downshift-rpm 3200.0 + :final-drive-ratio 11.0 + :gear-ratio-array (new 'static 'array float 8 -2.25 3.375 2.25 1.5 1.0 0.0 0.0 0.0) + :gear-count 5 + ) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 10.0 + :engine-intake-factor 1.0 + :brake-factor 3355443200.0 + :turbo-boost-factor 0.9 + :turbo-boost-duration (seconds 2) + :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 3) + :cos-ground-effect-angle 0.42261827 + :spring-lift-factor 1.0 + :air-drag-factor 1.0 + :steering-fin-angle 1820.4445 + :steering-thruster-factor 1.0 + :steering-thruster-max-gain 1.0 + :steering-thruster-half-gain-speed (meters 30) + :tire-steering-angle 4369.067 + :tire-steering-speed-factor 38379.52 + :tire-steering-speed-bias 20480.0 + :ackermann-factor 0.45 + :tire-friction-factor 1.0 + :tire-static-friction 1.3310001 + :tire-static-friction-speed (meters 2) + :tire-dynamic-friction 0.86515 + :tire-dynamic-friction-speed (meters 4) + :tire-inv-max-friction-speed 0.000024414063 + :airfoil-factor 1.0 + :drag-force-factor 0.32 + :rolling-resistance 0.08 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 1.0 + :pitch-control-factor 1.0 + :roll-control-factor 1.0 + :jump-thrust-factor 1.5 + :buoyancy-factor 0.03 + :water-drag-factor 0.25 + :player-weight 122880.0 + :air-roll-torque 81920.0 + :air-pitch-torque 163840.0 + :air-angular-damping 0.98 + :hop-turn-torque 491520.0 + :ground-torque-scale 1.0 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :turning-accel (meters 20) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 4.5) + :string-max-height (meters 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 6144.0 :w 1.0) + (new 'static 'vector :x -20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :x 20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :y 19251.2 :z 20480.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.5 + :engine-pitch-mod-amp 0.05 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "snake-scrape") + :glance-sound (static-sound-name "snake-glance") + :impact-sound (static-sound-name "snake-crash") + :explode-sound (static-sound-name "car-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "snake-flutter") + :water-sound (static-sound-name "snake-water") + :jump-sound (static-sound-name "snake-hop") + :turbo-sound (static-sound-name "snake-boost") + :bank-replace '((wasall1 wassnake)) + :idle-rpm 1300.0 + :idle-pitch-scale 0.5 + :idle-crossover-rpm 1000.0 + :engine-rpm 4700.0 + :engine-crossover-rpm 2500.0 + :start-sound (static-sound-name "snake-start") + :stop-sound (static-sound-name "snake-stop") + :idle-sound (static-sound-name "snake-idle") + :engine-sound (static-sound-name "snake-steady") + :susp-creak-sound (static-sound-name "snake-bounce") + :susp-bottom-out-sound (static-sound-name "snake-bottom") + :susp-speed-threshold 61440.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-road") + :speed 40960.0 + :min-speed 20480.0 + :max-speed 61440.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-dirt") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-sand") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-knobby") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 40960.0 + :pitch-scale 0.125 + :min-pitch -0.2 + :max-pitch 0.2 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-skid-road") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-skid-dirt") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + ) + ) + :particles (new 'static 'vehicle-particle-info + :headlight-count 2 + :taillight-count 2 + :thruster-flame-width (meters 1) + :thruster-flame-length (meters 6) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :y 3686.4 :z -15564.8 :w 1.0) + (new 'static 'vector :y 3686.4 :z -15564.8 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 4096.0 :z -15974.4 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4096.0 :z -15974.4 :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 33.329998 + :inv-hit-points 0.030003002 + :hit-threshold 8192.0 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 0.3333 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :inv-lift-thruster-count 1.0 + :engine-thrust-local-pos (new 'static 'vector :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 :x 1843.2 :y 901.12 :z 7864.32 :w 1.0) + :flags (vehicle-wheel-flag vwf1 vwf3 vwf4) + :inertia 6144000.0 + :radius 4915.2 + :susp-arm-length 5939.2 + :steer-arm-length 1638.4 + :scale 0.83199996 + :travel 4055.04 + :probe-y-offset -2580.48 + :width 4096.0 + :suspension-spring 0.6 + :suspension-damping 0.3 + :forward-grip 0.9 + :side-grip 1.0 + :max-brake-torque 1.0 + :camber 546.13336 + :settle-pos 0.78 + :probe-radius 2457.6 + :tread-texture "tread-toad" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :x 1351.68 :y 1638.4 :z -12083.2 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf2 vwf3 vwf5) + :inertia 10240000.0 + :radius 4915.2 + :susp-arm-length 8069.12 + :steer-arm-length 1638.4 + :scale 1.04 + :travel 4300.8 + :probe-y-offset -4710.4 + :width 4096.0 + :suspension-spring 0.5 + :suspension-damping 0.3 + :forward-grip 1.5 + :side-grip 1.0 + :max-brake-torque 1.0 + :camber 1820.4445 + :settle-pos 0.76 + :probe-radius 2867.2 + :tread-texture "tread-toad" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 5324.8 + :settle-rot-x 764.5866 + :shadow-bot-clip -61440.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 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 1 + :rider-stance #x2 + :grab-rail-array #f + :seat-array (new 'static 'inline-array vehicle-seat-info 4 + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :y 1638.4 :z -5324.8 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info) + (new 'static 'vehicle-seat-info) + (new 'static 'vehicle-seat-info) + ) + :rider-hand-offset (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1310.72 :y 409.6 :z -614.4 :w 1.0) + (new 'static 'vector :x -1310.72 :y 409.6 :z -409.6 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xda + :debris #f + :name-text (text-id progress-inventory-v-fox) + ) + ) + +(define *v-rhino-constants* + (new 'static 'rigid-body-vehicle-constants + :info (new 'static 'rigid-body-info + :mass 30.0 + :inv-mass 0.033333335 + :linear-damping 1.0 + :angular-damping 1.0 + :bounce-factor 0.4 + :friction-factor 0.5 + :cm-offset-joint (new 'static 'vector :y -4096.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 7) (meters 4) (meters 8)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 40) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*v-rhino-constants* + :flags #x387318 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 v-rhino) + :engine (new 'static 'vehicle-engine-info + :max-torque 335544320.0 + :inertia 65536.0 + :drag 0.4 + :idle-rpm 500.0 + :clutch-min-rpm 800.0 + :clutch-max-rpm 5100.0 + :min-rpm 300.0 + :max-rpm 6500.0 + :peak-torque-rpm 3400.0 + :powerband-width-rpm 4180.0 + ) + :transmission (new 'static 'vehicle-transmission-info + :inertia 16384.0 + :upshift-rpm 5000.0 + :downshift-rpm 1000.0 + :final-drive-ratio 28.0 + :gear-ratio-array (new 'static 'array float 8 -1.35 2.4603753 1.8225001 1.35 1.0 0.0 0.0 0.0) + :gear-count 5 + ) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 10.0 + :engine-intake-factor 1.0 + :brake-factor 5033165000.0 + :turbo-boost-factor 4.0 + :turbo-boost-duration (seconds 0.25) + :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 3) + :cos-ground-effect-angle 0.42261827 + :spring-lift-factor 1.0 + :air-drag-factor 1.0 + :steering-fin-angle 1820.4445 + :steering-thruster-factor 1.0 + :steering-thruster-max-gain 1.0 + :steering-thruster-half-gain-speed (meters 30) + :tire-steering-angle 2002.4889 + :tire-steering-speed-factor 51200.0 + :tire-steering-speed-bias 40960.0 + :ackermann-factor 0.8 + :tire-friction-factor 1.0 + :tire-static-friction 0.9 + :tire-static-friction-speed (meters 2) + :tire-dynamic-friction 0.585 + :tire-dynamic-friction-speed (meters 4) + :tire-inv-max-friction-speed 0.000024414063 + :airfoil-factor 1.0 + :drag-force-factor 0.4 + :rolling-resistance 0.16 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 1.0 + :pitch-control-factor 1.0 + :roll-control-factor 3.0 + :jump-thrust-factor 1.5 + :buoyancy-factor 0.03 + :water-drag-factor 0.125 + :player-weight 122880.0 + :air-roll-torque 512000.0 + :air-pitch-torque 1024000.0 + :air-angular-damping 0.98 + :hop-turn-torque 4300800.0 + :ground-torque-scale 0.37 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :turning-accel (meters 20) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 5.655) + :string-max-height (meters 5.655) + :string-min-length (meters 10.049999) + :string-max-length (meters 13.125) + :min-fov 16384.0 + :max-fov 18204.445 + :head-offset 4096.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 :x -4915.2 :y 14336.0 :z -8192.0 :w 1.0) + (new 'static 'vector :x -40960.0 :y 30720.0 :w 1.0) + (new 'static 'vector :x 40960.0 :y 30720.0 :w 1.0) + (new 'static 'vector :y 30720.0 :z 40960.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.5 + :engine-pitch-mod-amp 0.05 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "rhino-scrape") + :glance-sound (static-sound-name "rhino-glance") + :impact-sound (static-sound-name "rhino-crash") + :explode-sound (static-sound-name "car-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "car-by-1") + :water-sound (static-sound-name "rhino-water") + :jump-sound (static-sound-name "rhino-hop") + :turbo-sound (static-sound-name "rhino-boost") + :bank-replace '((wasall1 wasrhino)) + :idle-rpm 500.0 + :idle-pitch-scale 0.5 + :idle-crossover-rpm 800.0 + :engine-rpm 3785.0 + :engine-crossover-rpm 1400.0 + :start-sound (static-sound-name "rhino-start") + :stop-sound (static-sound-name "rhino-stop") + :idle-sound (static-sound-name "rhino-idle") + :engine-sound (static-sound-name "rhino-steady") + :susp-creak-sound (static-sound-name "rhino-bounce") + :susp-bottom-out-sound (static-sound-name "rhino-bottom") + :susp-speed-threshold 40960.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "rhino-road") + :speed 40960.0 + :min-speed 20480.0 + :max-speed 61440.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "rhino-dirt") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "rhino-sand") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "rhino-knobby") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 40960.0 + :pitch-scale 0.125 + :min-pitch -0.2 + :max-pitch 0.2 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "rhino-skid-road") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "rhino-skid-dirt") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + ) + ) + :particles (new 'static 'vehicle-particle-info + :headlight-count 2 + :taillight-count 2 + :thruster-flame-width (meters 1.5) + :thruster-flame-length (meters 5) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 4915.2 :y 2744.32 :z -19660.8 :w 1.0) + (new 'static 'vector :x -4915.2 :y 2744.32 :z -19660.8 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 3686.4 :y 4915.2 :z -4096.0 :w 1.0) + (new 'static 'vector :x -3686.4 :y 4915.2 :z -4096.0 :w 1.0) + ) + :exhaust-local-dir (new 'static 'inline-array vector 2 (new 'static 'vector :y 1.0 :w 1.0) (new 'static 'vector :y 1.0 :w 1.0)) + :smoke-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 6144.0 :z -1638.4 :w 1.0) + (new 'static 'vector :x -6144.0 :z -1638.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 5939.2 :y -1228.8 :z 18841.6 :w 1.0) + (new 'static 'vector :x -5939.2 :y -1228.8 :z 18841.6 :w 1.0) + (new 'static 'vector) + ) + :taillight-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 7577.6 :y -2048.0 :z -18022.4 :w 1.0) + (new 'static 'vector :x -7577.6 :y -2048.0 :z -18022.4 :w 1.0) + ) + ) + :damage (new 'static 'vehicle-damage-info + :inv-toughness-factor 1.0 + :hit-points 79.992 + :inv-hit-points 0.012501251 + :hit-threshold 8192.0 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 0.3333 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :inv-lift-thruster-count 1.0 + :engine-thrust-local-pos (new 'static 'vector :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 :x 7372.8 :y -4096.0 :z 15769.6 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf4) + :inertia 32768000.0 + :radius 2048.0 + :susp-arm-length 7372.8 + :steer-arm-length 2048.0 + :scale 4.0 + :travel 7208.9604 + :probe-y-offset -5079.0396 + :width 1638.4 + :suspension-spring 0.55 + :suspension-damping 0.3 + :forward-grip 1.3 + :side-grip 1.4 + :max-brake-torque 1.0 + :camber 546.13336 + :settle-pos 0.81 + :probe-radius 4505.6 + :tread-texture "tread-interceptor-rhino" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :x 7372.8 :y -4096.0 :z -12902.4 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf2 vwf4) + :inertia 32768000.0 + :radius 2048.0 + :susp-arm-length 8192.0 + :steer-arm-length 2048.0 + :scale 4.0 + :travel 7208.9604 + :probe-y-offset -5079.0396 + :width 1638.4 + :suspension-spring 0.55 + :suspension-damping 0.3 + :forward-grip 1.3 + :side-grip 1.4 + :max-brake-torque 1.0 + :camber 546.13336 + :settle-pos 0.78 + :probe-radius 4505.6 + :tread-texture "tread-interceptor-rhino" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 14663.68 + :settle-rot-x -163.84 + :shadow-bot-clip -61440.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 -21845.334 + :gun-yaw-max 21845.334 + :gun-pitch-min -5461.3335 + :gun-pitch-max 8192.0 + :gun-z-offset 6963.2 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 2 + :rider-stance #x2 + :attach-point-count 14 + :grab-rail-array #f + :seat-array (new 'static 'inline-array vehicle-seat-info 4 + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x -4915.2 :y 4915.2 :z -4096.0 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x 4915.2 :y 4915.2 :z -4096.0 :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 1638.4 :y 614.4 :z -1024.0 :w 1.0) + (new 'static 'vector :x -1638.4 :y 614.4 :z -1024.0 :w 1.0) + ) + :attach-point-array (new 'static 'inline-array vehicle-attach-point 14 + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 2867.2 :z 16384.0 :w 1.0) + :rot (new 'static 'vector :x -3640.889 :y 32768.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -2867.2 :z 16384.0 :w 1.0) + :rot (new 'static 'vector :x -3640.889 :y 32768.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 6144.0 :y 2048.0 :z 14336.0 :w 1.0) + :rot (new 'static 'vector :x -7281.778 :y 32768.0 :z 7281.778 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -6144.0 :y 2048.0 :z 14336.0 :w 1.0) + :rot (new 'static 'vector :x -7281.778 :y 32768.0 :z -7281.778 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 8192.0 :z 4096.0 :w 1.0) + :rot (new 'static 'vector :x -12743.111 :y -16384.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -8192.0 :z 4096.0 :w 1.0) + :rot (new 'static 'vector :x -12743.111 :y 16384.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 7372.8 :z -2048.0 :w 1.0) + :rot (new 'static 'vector :x -12743.111 :y -16384.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -7372.8 :z -2048.0 :w 1.0) + :rot (new 'static 'vector :x -12743.111 :y 16384.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 2867.2 :y 4096.0 :z 2048.0 :w 1.0) + :rot (new 'static 'vector :x -1820.4445 :y -1820.4445 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -2867.2 :y 4096.0 :z 2048.0 :w 1.0) + :rot (new 'static 'vector :x -1820.4445 :y 1820.4445 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 2867.2 :y 2048.0 :z -16384.0 :w 1.0) + :rot (new 'static 'vector :x -12743.111 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -2867.2 :z -15155.2 :w 1.0) + :rot (new 'static 'vector :x -9102.223 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 6144.0 :y 2048.0 :z -14336.0 :w 1.0) + :rot (new 'static 'vector :x -8192.0 :z -7281.778 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -6144.0 :y 2048.0 :z -14336.0 :w 1.0) + :rot (new 'static 'vector :x -8192.0 :z 7281.778 :w 1.0) + ) + ) + ) + :explosion #f + :explosion-part #xda + :debris #f + :name-text (text-id progress-inventory-v-rhino) + ) + ) + +(define *v-mirage-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.5 + :cm-offset-joint (new 'static 'vector :y 409.6 :z -2048.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 5.5) (meters 3) (meters 7)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 40) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*v-mirage-constants* + :flags #x387318 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 v-mirage) + :engine (new 'static 'vehicle-engine-info + :max-torque 218103800.0 + :inertia 16384.0 + :drag 0.2 + :idle-rpm 900.0 + :clutch-min-rpm 2000.0 + :clutch-max-rpm 5500.0 + :min-rpm 600.0 + :max-rpm 7500.0 + :peak-torque-rpm 3800.0 + :powerband-width-rpm 4100.0 + ) + :transmission (new 'static 'vehicle-transmission-info + :inertia 8192.0 + :upshift-rpm 5500.0 + :downshift-rpm 3200.0 + :final-drive-ratio 12.5 + :gear-ratio-array (new 'static 'array float 8 -2.25 3.375 2.25 1.5 1.0 0.0 0.0 0.0) + :gear-count 5 + ) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 10.0 + :engine-intake-factor 1.0 + :brake-factor 3355443200.0 + :turbo-boost-factor 0.9 + :turbo-boost-duration (seconds 2) + :max-xz-speed (meters 30) + :player-turn-anim-bias 0.5 + :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 1.0 + :air-drag-factor 1.0 + :steering-fin-angle 1820.4445 + :steering-thruster-factor 1.0 + :steering-thruster-max-gain 1.0 + :steering-thruster-half-gain-speed (meters 30) + :tire-steering-angle 4369.067 + :tire-steering-speed-factor 38379.52 + :tire-steering-speed-bias 20480.0 + :ackermann-factor 0.45 + :tire-friction-factor 1.0 + :tire-static-friction 1.3310001 + :tire-static-friction-speed (meters 2) + :tire-dynamic-friction 0.86515 + :tire-dynamic-friction-speed (meters 4) + :tire-inv-max-friction-speed 0.000024414063 + :airfoil-factor 1.0 + :drag-force-factor 0.35 + :rolling-resistance 0.08 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 1.0 + :pitch-control-factor 1.0 + :roll-control-factor 2.0 + :jump-thrust-factor 1.0 + :buoyancy-factor 0.03 + :water-drag-factor 0.25 + :player-weight 122880.0 + :air-roll-torque 81920.0 + :air-pitch-torque 163840.0 + :air-angular-damping 0.98 + :hop-turn-torque 1392640.0 + :ground-torque-scale 1.0 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :turning-accel (meters 20) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 4.5) + :string-max-height (meters 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 :x -2048.0 :y 6144.0 :w 1.0) + (new 'static 'vector :x -20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :x 20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :y 19251.2 :z 20480.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.5 + :engine-pitch-mod-amp 0.05 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "mir-scrape") + :glance-sound (static-sound-name "mir-glance") + :impact-sound (static-sound-name "mir-crash") + :explode-sound (static-sound-name "car-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "mir-flutter") + :water-sound (static-sound-name "mir-water") + :jump-sound (static-sound-name "mir-hop") + :turbo-sound (static-sound-name "mir-boost") + :bank-replace '((wasall1 wasmir)) + :idle-rpm 1300.0 + :idle-pitch-scale 0.5 + :idle-crossover-rpm 1000.0 + :engine-rpm 4700.0 + :engine-crossover-rpm 2500.0 + :start-sound (static-sound-name "mir-start") + :stop-sound (static-sound-name "mir-stop") + :idle-sound (static-sound-name "mir-idle") + :engine-sound (static-sound-name "mir-steady") + :susp-creak-sound (static-sound-name "mir-bounce") + :susp-bottom-out-sound (static-sound-name "mir-bottom") + :susp-speed-threshold 61440.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "mir-road") + :speed 40960.0 + :min-speed 20480.0 + :max-speed 61440.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "mir-dirt") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "mir-sand") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "mir-knobby") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 40960.0 + :pitch-scale 0.125 + :min-pitch -0.2 + :max-pitch 0.2 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "mir-skid-road") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "mir-skid-dirt") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :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-flame-length (meters 2) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 4505.6 :z -15564.8 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4505.6 :z -15564.8 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 4096.0 :z -15974.4 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4096.0 :z -15974.4 :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 0.8 + :hit-points 46.662 + :inv-hit-points 0.021430716 + :hit-threshold 8192.0 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 0.3333 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :inv-lift-thruster-count 1.0 + :engine-thrust-local-pos (new 'static 'vector :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 :x 1843.2 :y 901.12 :z 7864.32 :w 1.0) + :flags (vehicle-wheel-flag vwf1 vwf3 vwf4) + :inertia 6144000.0 + :radius 3399.68 + :susp-arm-length 5939.2 + :steer-arm-length 1638.4 + :scale 1.1 + :travel 4055.04 + :probe-y-offset -2580.48 + :width 3276.8 + :suspension-spring 0.6 + :suspension-damping 0.3 + :forward-grip 0.9 + :side-grip 1.0 + :max-brake-torque 1.0 + :camber 546.13336 + :settle-pos 0.78 + :probe-radius 2457.6 + :tread-texture "tread-interceptor-rhino" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :x 1351.68 :y 1638.4 :z -12083.2 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf2 vwf3 vwf5) + :inertia 10240000.0 + :radius 3399.68 + :susp-arm-length 8069.12 + :steer-arm-length 1638.4 + :scale 1.5 + :travel 4300.8 + :probe-y-offset -4710.4 + :width 3276.8 + :suspension-spring 0.5 + :suspension-damping 0.3 + :forward-grip 1.5 + :side-grip 1.0 + :max-brake-torque 1.0 + :camber 1820.4445 + :settle-pos 0.76 + :probe-radius 2867.2 + :tread-texture "tread-interceptor-rhino" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 5324.8 + :settle-rot-x 764.5866 + :shadow-bot-clip -61440.0 + :shadow-locus-dist 204800.0 + :color-option-count 1 + :color (new 'static 'vector :x 0.75 :y 0.9 :z 1.05 :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 #x2 + :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 819.2 :z -720.896 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x 2252.8 :y 819.2 :z -720.896 :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 1310.72 :y 409.6 :z -614.4 :w 1.0) + (new 'static 'vector :x -1310.72 :y 409.6 :z -409.6 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xda + :debris #f + :name-text (text-id progress-inventory-v-mirage) + ) + ) + +(define *v-x-ride-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.4 + :friction-factor 0.5 + :cm-offset-joint (new 'static 'vector :y 409.6 :z -2048.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 4) (meters 3) (meters 6.5)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 40) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*v-x-ride-constants* + :flags #x387318 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 v-x-ride) + :engine (new 'static 'vehicle-engine-info + :max-torque 234881020.0 + :inertia 16384.0 + :drag 0.2 + :idle-rpm 900.0 + :clutch-min-rpm 2000.0 + :clutch-max-rpm 5500.0 + :min-rpm 600.0 + :max-rpm 7500.0 + :peak-torque-rpm 3800.0 + :powerband-width-rpm 4100.0 + ) + :transmission (new 'static 'vehicle-transmission-info + :inertia 8192.0 + :upshift-rpm 5500.0 + :downshift-rpm 3200.0 + :final-drive-ratio 10.0 + :gear-ratio-array (new 'static 'array float 8 -2.25 3.375 2.25 1.5 1.0 0.0 0.0 0.0) + :gear-count 5 + ) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 10.0 + :engine-intake-factor 1.0 + :brake-factor 3355443200.0 + :turbo-boost-factor 0.9 + :turbo-boost-duration (seconds 2) + :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 3) + :cos-ground-effect-angle 0.42261827 + :spring-lift-factor 1.0 + :air-drag-factor 1.0 + :steering-fin-angle 1820.4445 + :steering-thruster-factor 1.0 + :steering-thruster-max-gain 1.0 + :steering-thruster-half-gain-speed (meters 30) + :tire-steering-angle 4369.067 + :tire-steering-speed-factor 38379.52 + :tire-steering-speed-bias 20480.0 + :ackermann-factor 0.45 + :tire-friction-factor 1.0 + :tire-static-friction 1.694 + :tire-static-friction-speed (meters 2) + :tire-dynamic-friction 1.1011 + :tire-dynamic-friction-speed (meters 4) + :tire-inv-max-friction-speed 0.000024414063 + :airfoil-factor 1.0 + :drag-force-factor 0.3 + :rolling-resistance 0.08 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 1.0 + :pitch-control-factor 1.0 + :roll-control-factor 1.0 + :jump-thrust-factor 1.6 + :buoyancy-factor 0.03 + :water-drag-factor 0.25 + :player-weight 122880.0 + :air-roll-torque 81920.0 + :air-pitch-torque 163840.0 + :air-angular-damping 0.98 + :hop-turn-torque 491520.0 + :ground-torque-scale 0.75 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :turning-accel (meters 20) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 4.5) + :string-max-height (meters 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 6144.0 :w 1.0) + (new 'static 'vector :x -20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :x 20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :y 19251.2 :z 20480.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.5 + :engine-pitch-mod-amp 0.05 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "snake-scrape") + :glance-sound (static-sound-name "snake-glance") + :impact-sound (static-sound-name "snake-crash") + :explode-sound (static-sound-name "car-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "snake-flutter") + :water-sound (static-sound-name "snake-water") + :jump-sound (static-sound-name "snake-hop") + :turbo-sound (static-sound-name "snake-boost") + :bank-replace '((wasall1 wassnake)) + :idle-rpm 1300.0 + :idle-pitch-scale 0.5 + :idle-crossover-rpm 1000.0 + :engine-rpm 4700.0 + :engine-crossover-rpm 2500.0 + :start-sound (static-sound-name "snake-start") + :stop-sound (static-sound-name "snake-stop") + :idle-sound (static-sound-name "snake-idle") + :engine-sound (static-sound-name "snake-steady") + :susp-creak-sound (static-sound-name "snake-bounce") + :susp-bottom-out-sound (static-sound-name "snake-bottom") + :susp-speed-threshold 61440.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-road") + :speed 40960.0 + :min-speed 20480.0 + :max-speed 61440.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-dirt") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-sand") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-knobby") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 40960.0 + :pitch-scale 0.125 + :min-pitch -0.2 + :max-pitch 0.2 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-skid-road") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-skid-dirt") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + ) + ) + :particles (new 'static 'vehicle-particle-info + :headlight-count 2 + :taillight-count 2 + :thruster-flame-width (meters 1) + :thruster-flame-length (meters 6) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :y 3686.4 :z -15564.8 :w 1.0) + (new 'static 'vector :y 3686.4 :z -15564.8 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 4096.0 :z -15974.4 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4096.0 :z -15974.4 :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 39.996 + :inv-hit-points 0.025002502 + :hit-threshold 8192.0 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 0.3333 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :inv-lift-thruster-count 1.0 + :engine-thrust-local-pos (new 'static 'vector :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 :x 1843.2 :y 901.12 :z 7864.32 :w 1.0) + :flags (vehicle-wheel-flag vwf1 vwf3 vwf4) + :inertia 6144000.0 + :radius 3399.68 + :susp-arm-length 5939.2 + :steer-arm-length 1638.4 + :scale 1.2 + :travel 4055.04 + :probe-y-offset -2580.48 + :width 3276.8 + :suspension-spring 0.6 + :suspension-damping 0.3 + :forward-grip 0.9 + :side-grip 1.0 + :max-brake-torque 1.0 + :camber 546.13336 + :settle-pos 0.78 + :probe-radius 2457.6 + :tread-texture "tread-snake" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :x 1351.68 :y 1638.4 :z -12083.2 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf2 vwf3 vwf5) + :inertia 10240000.0 + :radius 3399.68 + :susp-arm-length 8069.12 + :steer-arm-length 1638.4 + :scale 1.5 + :travel 4300.8 + :probe-y-offset -4710.4 + :width 3276.8 + :suspension-spring 0.5 + :suspension-damping 0.3 + :forward-grip 1.5 + :side-grip 1.0 + :max-brake-torque 1.0 + :camber 1820.4445 + :settle-pos 0.76 + :probe-radius 2867.2 + :tread-texture "tread-snake" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 5324.8 + :settle-rot-x 764.5866 + :shadow-bot-clip -61440.0 + :shadow-locus-dist 204800.0 + :color-option-count 1 + :color (new 'static 'vector :x 0.9 :y 1.1 :z 0.9 :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 1 + :rider-stance #x2 + :grab-rail-array #f + :seat-array (new 'static 'inline-array vehicle-seat-info 4 + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :y 1638.4 :z -5324.8 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info) + (new 'static 'vehicle-seat-info) + (new 'static 'vehicle-seat-info) + ) + :rider-hand-offset (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1310.72 :y 409.6 :z -614.4 :w 1.0) + (new 'static 'vector :x -1310.72 :y 409.6 :z -409.6 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xda + :debris #f + :name-text (text-id progress-inventory-v-x-ride) + ) + ) + +(define *v-marauder-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.4 + :friction-factor 0.5 + :cm-offset-joint (new 'static 'vector :y 409.6 :z -2048.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 5) (meters 2.5) (meters 6.5)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 40) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*v-marauder-constants* + :flags #x81310 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 v-marauder) + :engine (new 'static 'vehicle-engine-info + :max-torque 117440510.0 + :inertia 16384.0 + :drag 0.4 + :idle-rpm 900.0 + :clutch-min-rpm 2000.0 + :clutch-max-rpm 5500.0 + :min-rpm 700.0 + :max-rpm 6500.0 + :peak-torque-rpm 3800.0 + :powerband-width-rpm 4100.0 + ) + :transmission (new 'static 'vehicle-transmission-info + :inertia 8192.0 + :upshift-rpm 5500.0 + :downshift-rpm 2000.0 + :final-drive-ratio 12.5 + :gear-ratio-array (new 'static 'array float 8 -2.25 3.375 2.25 1.5 1.0 0.0 0.0 0.0) + :gear-count 5 + ) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 10.0 + :engine-intake-factor 1.0 + :brake-factor 1677721600.0 + :turbo-boost-factor 0.9 + :turbo-boost-duration (seconds 2) + :max-xz-speed (meters 30) + :player-turn-anim-bias 0.5 + :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 1.0 + :air-drag-factor 1.0 + :steering-fin-angle 1820.4445 + :steering-thruster-factor 1.0 + :steering-thruster-max-gain 1.0 + :steering-thruster-half-gain-speed (meters 30) + :tire-steering-angle 4369.067 + :tire-steering-speed-factor 38379.52 + :tire-steering-speed-bias 20480.0 + :ackermann-factor 0.45 + :tire-friction-factor 1.0 + :tire-static-friction 1.3310001 + :tire-static-friction-speed (meters 2) + :tire-dynamic-friction 0.86515 + :tire-dynamic-friction-speed (meters 4) + :tire-inv-max-friction-speed 0.000024414063 + :airfoil-factor 1.0 + :drag-force-factor 0.35 + :rolling-resistance 0.08 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 1.0 + :pitch-control-factor 1.0 + :roll-control-factor 1.0 + :jump-thrust-factor 1.0 + :buoyancy-factor 0.03 + :water-drag-factor 0.25 + :player-weight 122880.0 + :air-roll-torque 81920.0 + :air-pitch-torque 163840.0 + :air-angular-damping 0.98 + :hop-turn-torque 1392640.0 + :ground-torque-scale 1.0 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :turning-accel (meters 20) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 4.5) + :string-max-height (meters 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 6963.2 :z -6144.0 :w 1.0) + (new 'static 'vector :x -20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :x 20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :y 19251.2 :z 20480.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.5 + :engine-pitch-mod-amp 0.05 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "inter-scrape") + :glance-sound (static-sound-name "inter-glance") + :impact-sound (static-sound-name "inter-crash") + :explode-sound (static-sound-name "car-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "inter-flutter") + :water-sound (static-sound-name "inter-water") + :jump-sound (static-sound-name "snake-hop") + :turbo-sound (static-sound-name "snake-boost") + :bank-replace '((wasall1 wassnake)) + :idle-rpm 1300.0 + :idle-pitch-scale 0.5 + :idle-crossover-rpm 1000.0 + :engine-rpm 4700.0 + :engine-crossover-rpm 2500.0 + :start-sound (static-sound-name "snake-start") + :stop-sound (static-sound-name "snake-stop") + :idle-sound (static-sound-name "inter-idle") + :engine-sound (static-sound-name "inter-steady") + :susp-creak-sound (static-sound-name "inter-bounce") + :susp-bottom-out-sound (static-sound-name "inter-bottom") + :susp-speed-threshold 61440.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-road") + :speed 40960.0 + :min-speed 20480.0 + :max-speed 61440.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-dirt") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-sand") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-knobby") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 40960.0 + :pitch-scale 0.125 + :min-pitch -0.2 + :max-pitch 0.2 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-skid-road") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-skid-dirt") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :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-flame-length (meters 2) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 4505.6 :z -15564.8 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4505.6 :z -15564.8 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 4096.0 :z -15974.4 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4096.0 :z -15974.4 :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 2.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 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :inv-lift-thruster-count 1.0 + :engine-thrust-local-pos (new 'static 'vector :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 :x 1843.2 :y 901.12 :z 7864.32 :w 1.0) + :flags (vehicle-wheel-flag vwf1 vwf3 vwf4) + :inertia 6144000.0 + :radius 3399.68 + :susp-arm-length 5939.2 + :steer-arm-length 1638.4 + :scale 1.2 + :travel 4055.04 + :probe-y-offset -2580.48 + :width 3276.8 + :suspension-spring 0.6 + :suspension-damping 0.3 + :forward-grip 0.9 + :side-grip 1.0 + :max-brake-torque 1.0 + :camber 546.13336 + :settle-pos 0.78 + :probe-radius 2457.6 + :tread-texture "tread-interceptor-rhino" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :x 1351.68 :y 1638.4 :z -12083.2 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf2 vwf3 vwf5) + :inertia 10240000.0 + :radius 3399.68 + :susp-arm-length 8069.12 + :steer-arm-length 1638.4 + :scale 1.5 + :travel 4300.8 + :probe-y-offset -4710.4 + :width 3276.8 + :suspension-spring 0.5 + :suspension-damping 0.3 + :forward-grip 1.5 + :side-grip 1.0 + :max-brake-torque 1.0 + :camber 1820.4445 + :settle-pos 0.8 + :probe-radius 2867.2 + :tread-texture "tread-interceptor-rhino" + ) + ) + :setup (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 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 2 + :rider-stance #x2 + :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 819.2 :z -720.896 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x 2252.8 :y 819.2 :z -720.896 :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 1310.72 :y 409.6 :z -614.4 :w 1.0) + (new 'static 'vector :x -1310.72 :y 409.6 :z -409.6 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xda + :debris #f + ) + ) + +(define *v-faccar-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.4 + :friction-factor 0.5 + :cm-offset-joint (new 'static 'vector :y 819.2 :z -409.6 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 6.5) (meters 3) (meters 8)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 40) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*v-faccar-constants* + :flags #x287318 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 v-faccar) + :engine (new 'static 'vehicle-engine-info + :max-torque 83886080.0 + :inertia 8192.0 + :drag 0.2 + :idle-rpm 900.0 + :clutch-min-rpm 2000.0 + :clutch-max-rpm 4000.0 + :min-rpm 700.0 + :max-rpm 6000.0 + :peak-torque-rpm 3200.0 + :powerband-width-rpm 4000.0 + ) + :transmission (new 'static 'vehicle-transmission-info + :inertia 4096.0 + :upshift-rpm 4500.0 + :downshift-rpm 2900.0 + :final-drive-ratio 9.0 + :gear-ratio-array (new 'static 'array float 8 -3.375 3.375 2.25 1.5 1.0 0.0 0.0 0.0) + :gear-count 5 + ) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 10.0 + :engine-intake-factor 1.0 + :brake-factor 5033165000.0 + :turbo-boost-factor 2.0 + :turbo-boost-duration (seconds 0.25) + :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 3) + :cos-ground-effect-angle 0.42261827 + :spring-lift-factor 1.0 + :air-drag-factor 1.0 + :steering-fin-angle 1820.4445 + :steering-thruster-factor 1.0 + :steering-thruster-max-gain 1.0 + :steering-thruster-half-gain-speed (meters 30) + :tire-steering-angle 4551.1113 + :tire-steering-speed-factor 34816.0 + :tire-steering-speed-bias 40960.0 + :ackermann-factor 0.3 + :tire-friction-factor 1.0 + :tire-static-friction 1.516 + :tire-static-friction-speed (meters 2) + :tire-dynamic-friction 0.98539996 + :tire-dynamic-friction-speed (meters 4) + :tire-inv-max-friction-speed 0.000024414063 + :airfoil-factor 1.0 + :drag-force-factor 0.35 + :rolling-resistance 0.08 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 1.0 + :pitch-control-factor 1.0 + :roll-control-factor 2.0 + :jump-thrust-factor 1.5 + :buoyancy-factor 0.03 + :water-drag-factor 0.25 + :player-weight 122880.0 + :air-roll-torque 40960.0 + :air-pitch-torque 81920.0 + :air-angular-damping 0.97 + :hop-turn-torque 1228800.0 + :ground-torque-scale 0.45 + :ai-steering-factor 4.0 + :ai-throttle-factor 0.5 + ) + :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 :x -2457.6 :y 9011.2 :z -4915.2 :w 1.0) + (new 'static 'vector :x -20480.0 :y 12288.0 :w 1.0) + (new 'static 'vector :x 20480.0 :y 12288.0 :w 1.0) + (new 'static 'vector :y 12288.0 :z 20480.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.25 + :engine-pitch-mod-amp 0.05 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "fac-scrape-mtl") + :glance-sound (static-sound-name "fac-glance") + :impact-sound (static-sound-name "fac-impact-hard") + :explode-sound (static-sound-name "fac-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "fac-flutter") + :water-sound (static-sound-name "fac-water") + :jump-sound (static-sound-name "fac-hop") + :turbo-sound (static-sound-name "fac-boost") + :bank-replace '((factory6 facveh)) + :idle-rpm 1400.0 + :idle-pitch-scale 0.25 + :idle-crossover-rpm 1500.0 + :engine-rpm 2500.0 + :engine-crossover-rpm 2500.0 + :start-sound (static-sound-name "fac-start") + :stop-sound (static-sound-name "fac-stop") + :idle-sound (static-sound-name "fac-idle") + :engine-sound (static-sound-name "fac-steady") + :susp-creak-sound (static-sound-name "fac-bounce") + :susp-bottom-out-sound (static-sound-name "fac-bottom") + :susp-speed-threshold 81920.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "fac-hum") + :speed 40960.0 + :min-speed 20480.0 + :max-speed 61440.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "fac-dirt") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "fac-sand") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "fac-knobby") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 40960.0 + :pitch-scale 0.125 + :min-pitch -0.2 + :max-pitch 0.2 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "fac-skid-road") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "fac-skid-dirt") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + ) + ) + :particles (new 'static 'vehicle-particle-info + :headlight-count 1 + :taillight-count 2 + :thruster-flame-width (meters 0.6) + :thruster-flame-length (meters 2) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 2048.0 :y 1843.2 :z -14336.0 :w 1.0) + (new 'static 'vector :x -2048.0 :y 1843.2 :z -14336.0 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 2048.0 :y 1843.2 :z -14336.0 :w 1.0) + (new 'static 'vector :x -2048.0 :y 1843.2 :z -14336.0 :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 1024.0 :y 5120.0 :z -10240.0 :w 1.0) + (new 'static 'vector :x -1024.0 :y 5120.0 :z -10240.0 :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 6963.2 :z 11059.2 :w 1.0) + (new 'static 'vector) + (new 'static 'vector) + ) + :taillight-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 7987.2 :z -12083.2 :w 1.0) + (new 'static 'vector :x -1638.4 :y 7987.2 :z -12083.2 :w 1.0) + ) + ) + :damage (new 'static 'vehicle-damage-info + :inv-toughness-factor 0.8333333 + :hit-points 29.997 + :inv-hit-points 0.033336665 + :hit-threshold 8192.0 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 0.3333 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :inv-lift-thruster-count 1.0 + :engine-thrust-local-pos (new 'static 'vector :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 :x 4464.64 :y -655.36 :z 7864.32 :w 1.0) + :flags (vehicle-wheel-flag vwf1 vwf4) + :inertia 4300800.0 + :radius 3481.6 + :susp-arm-length 4096.0 + :steer-arm-length 1638.4 + :scale 1.0 + :travel 2457.6 + :probe-y-offset -3276.8 + :width 4096.0 + :suspension-spring 0.4 + :suspension-damping 0.5 + :forward-grip 1.0 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.79 + :probe-radius 1720.32 + :tread-texture "tread-scorpion" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :x 4444.16 :y -532.48 :z -12083.2 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf2) + :inertia 4915200.0 + :radius 3481.6 + :susp-arm-length 4096.0 + :steer-arm-length 2048.0 + :scale 1.2 + :travel 2867.2 + :probe-y-offset -3276.8 + :width 4096.0 + :suspension-spring 0.7 + :suspension-damping 0.4 + :forward-grip 1.15 + :side-grip 1.15 + :max-brake-torque 1.0 + :settle-pos 0.79 + :probe-radius 2048.0 + :tread-texture "tread-scorpion" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 5693.44 + :settle-rot-x -691.76886 + :shadow-bot-clip -61440.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 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 1 + :rider-stance #x2 + :grab-rail-array #f + :seat-array (new 'static 'inline-array vehicle-seat-info 4 + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x -2457.6 :y 1187.84 :z -819.2 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info) + (new 'static 'vehicle-seat-info) + (new 'static 'vehicle-seat-info) + ) + :rider-hand-offset (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1228.8 :y 614.4 :z -368.64 :w 1.0) + (new 'static 'vector :x -1228.8 :y 614.4 :z -368.64 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xda + :debris #f + ) + ) + +(define *v-catapult-constants* + (new 'static 'rigid-body-vehicle-constants + :info (new 'static 'rigid-body-info + :mass 32.0 + :inv-mass 0.03125 + :linear-damping 1.0 + :angular-damping 1.0 + :bounce-factor 0.4 + :friction-factor 0.5 + :cm-offset-joint (new 'static 'vector :y 409.6 :z -2048.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 12) (meters 8) (meters 25)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 40) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*v-catapult-constants* + :flags #x80010 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 v-catapult) + :engine (new 'static 'vehicle-engine-info + :max-torque 117440510.0 + :inertia 16384.0 + :drag 0.4 + :idle-rpm 900.0 + :clutch-min-rpm 2000.0 + :clutch-max-rpm 5500.0 + :min-rpm 700.0 + :max-rpm 6500.0 + :peak-torque-rpm 3800.0 + :powerband-width-rpm 4100.0 + ) + :transmission (new 'static 'vehicle-transmission-info + :inertia 8192.0 + :upshift-rpm 5500.0 + :downshift-rpm 2000.0 + :final-drive-ratio 25.0 + :gear-ratio-array (new 'static 'array float 8 -2.25 3.375 2.25 1.5 1.0 0.0 0.0 0.0) + :gear-count 5 + ) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 10.0 + :engine-intake-factor 1.0 + :brake-factor 1677721600.0 + :turbo-boost-factor 0.9 + :turbo-boost-duration (seconds 2) + :max-xz-speed (meters 30) + :player-turn-anim-bias 0.5 + :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 1.0 + :air-drag-factor 1.0 + :steering-fin-angle 1820.4445 + :steering-thruster-factor 1.0 + :steering-thruster-max-gain 1.0 + :steering-thruster-half-gain-speed (meters 30) + :tire-steering-angle 4369.067 + :tire-steering-speed-factor 38379.52 + :tire-steering-speed-bias 20480.0 + :ackermann-factor 0.45 + :tire-friction-factor 1.0 + :tire-static-friction 1.3310001 + :tire-static-friction-speed (meters 2) + :tire-dynamic-friction 0.86515 + :tire-dynamic-friction-speed (meters 4) + :tire-inv-max-friction-speed 0.000024414063 + :airfoil-factor 1.0 + :drag-force-factor 0.35 + :rolling-resistance 0.08 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 1.0 + :pitch-control-factor 1.0 + :roll-control-factor 1.0 + :jump-thrust-factor 1.0 + :buoyancy-factor 0.03 + :water-drag-factor 0.25 + :player-weight 122880.0 + :air-roll-torque 81920.0 + :air-pitch-torque 163840.0 + :air-angular-damping 0.98 + :hop-turn-torque 1392640.0 + :ground-torque-scale 1.0 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :turning-accel (meters 20) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 4.5) + :string-max-height (meters 15) + :string-min-length (meters 5) + :string-max-length (meters 15.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 6963.2 :z -6144.0 :w 1.0) + (new 'static 'vector :x -20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :x 20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :y 19251.2 :z 20480.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.5 + :engine-pitch-mod-amp 0.05 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "inter-scrape") + :glance-sound (static-sound-name "inter-glance") + :impact-sound (static-sound-name "inter-crash") + :explode-sound (static-sound-name "car-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "inter-load") + :water-sound (static-sound-name "inter-water") + :jump-sound (static-sound-name "snake-hop") + :turbo-sound (static-sound-name "snake-boost") + :bank-replace '((wasall1 wassnake)) + :idle-rpm 1300.0 + :idle-pitch-scale 0.5 + :idle-crossover-rpm 1000.0 + :engine-rpm 4700.0 + :engine-crossover-rpm 2500.0 + :start-sound (static-sound-name "snake-start") + :stop-sound (static-sound-name "snake-stop") + :idle-sound (static-sound-name "inter-idle") + :engine-sound (static-sound-name "inter-steady") + :susp-creak-sound (static-sound-name "inter-bounce") + :susp-bottom-out-sound (static-sound-name "inter-bottom") + :susp-speed-threshold 61440.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-road") + :speed 40960.0 + :min-speed 20480.0 + :max-speed 61440.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-dirt") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-sand") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-knobby") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 40960.0 + :pitch-scale 0.125 + :min-pitch -0.2 + :max-pitch 0.2 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-skid-road") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-skid-dirt") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :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-flame-length (meters 2) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 4505.6 :z -15564.8 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4505.6 :z -15564.8 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 4096.0 :z -15974.4 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4096.0 :z -15974.4 :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 0.6666667 + :hit-points 80.0 + :inv-hit-points 0.0125 + :hit-threshold 8192.0 + :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 + :inv-lift-thruster-count 1.0 + :engine-thrust-local-pos (new 'static 'vector :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 :x 20480.0 :y -2048.0 :z 15687.68 :w 1.0) + :flags (vehicle-wheel-flag vwf1 vwf3 vwf4) + :inertia 6144000.0 + :radius 3399.68 + :susp-arm-length 9420.8 + :steer-arm-length 2457.6 + :scale 2.4 + :travel 9011.2 + :probe-y-offset -4096.0 + :width 4096.0 + :suspension-spring 0.6 + :suspension-damping 0.3 + :forward-grip 0.9 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.78 + :probe-radius 409.6 + :tread-texture "tread-interceptor-rhino" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :x 14336.0 :y -4096.0 :z -24166.4 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf2 vwf3 vwf5) + :inertia 10240000.0 + :radius 3399.68 + :susp-arm-length 10240.0 + :steer-arm-length 3276.8 + :scale 2.4 + :travel 8192.0 + :probe-y-offset -2867.2 + :width 4096.0 + :suspension-spring 0.6 + :suspension-damping 0.3 + :forward-grip 1.5 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.8 + :probe-radius 409.6 + :tread-texture "tread-interceptor-rhino" + ) + ) + :setup (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 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 2 + :rider-stance #x2 + :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 819.2 :z -720.896 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x 2252.8 :y 819.2 :z -720.896 :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 1310.72 :y 409.6 :z -614.4 :w 1.0) + (new 'static 'vector :x -1310.72 :y 409.6 :z -409.6 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xda + :debris #f + ) + ) + +(define *wcar-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 'wasall + :skel #f + :skel-name "skel-vehicle-explosion" + :anim 2 + ) + ) + +(set! (-> *v-turtle-constants* explosion) *wcar-explosion-info*) + +(set! (-> *v-snake-constants* explosion) *wcar-explosion-info*) + +(set! (-> *v-scorpion-constants* explosion) *wcar-explosion-info*) + +(set! (-> *v-toad-constants* explosion) *wcar-explosion-info*) + +(set! (-> *v-fox-constants* explosion) *wcar-explosion-info*) + +(set! (-> *v-rhino-constants* explosion) *wcar-explosion-info*) + +(set! (-> *v-mirage-constants* explosion) *wcar-explosion-info*) + +(set! (-> *v-x-ride-constants* explosion) *wcar-explosion-info*) + +(set! (-> *v-marauder-constants* explosion) *wcar-explosion-info*) + +(set! (-> *v-faccar-constants* explosion) *wcar-explosion-info*) + +(set! (-> *v-catapult-constants* explosion) *wcar-explosion-info*) + +(deftype wcar-base (wvehicle) + ((rider-hand-joint-array int8 2) + ) + ) + + +(defmethod vehicle-method-113 ((this wcar-base) (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) + ) + +(deftype wcar-snake-base (wcar-base) + ((local-gun-pos vector 2 :inline) + (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-guns joint-mod-set-local 2 :inline) + ) + ) + + +;; WARN: Return type mismatch float vs none. +(defmethod wvehicle-method-169 ((this wcar-snake-base)) + (set! (-> this i-barrel) (logand (+ (-> this i-barrel) 1) 1)) + (let ((s5-0 (new 'stack-no-clear 'wcar-proj-init-by-other-params))) + (set! (-> s5-0 barrel-idx) (-> this i-barrel)) + (set! (-> s5-0 vec0 7 x) 16384.0) + (set! (-> s5-0 vec0 7 y) 409600.0) + (set! (-> s5-0 vec0 7 w) 0.1736) + (set! (-> s5-0 vec0 7 z) 0.0) + (when (and (task-node-closed? (game-task-node desert-final-boss-introduction)) + (not (task-node-closed? (game-task-node desert-final-boss-resolution))) + ) + (set! (-> s5-0 vec0 7 x) 32768.0) + (set! (-> s5-0 vec0 7 w) 0.3419) + (set! (-> s5-0 vec0 7 z) -0.1736) + ) + (let* ((v1-13 (-> s5-0 mat0)) + (a3-0 (-> this rbody matrix)) + (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-13 rvec quad) a0-4) + (set! (-> v1-13 uvec quad) a1-0) + (set! (-> v1-13 fvec quad) a2-0) + (set! (-> v1-13 trans quad) a3-1) + ) + (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*! (the-as vector (-> s5-0 vec0)) (-> this local-gun-pos (-> s5-0 barrel-idx)) (-> s5-0 mat0)) + 0 + (set! (-> s5-0 vec0 2 quad) (-> (new 'static 'vector :y 0.0871 :z 0.9961 :w 1.0) quad)) + (vector-rotate*! (-> s5-0 vec0 3) (-> s5-0 vec0 2) (-> s5-0 mat0)) + (vector-float*! (-> s5-0 vec0 4) (-> s5-0 vec0 3) (- (-> s5-0 vec0 7 y) (-> s5-0 vec0 7 x))) + (vector+float*! + (-> s5-0 vec0 1) + (the-as vector (-> s5-0 vec0)) + (-> s5-0 vec0 3) + (+ 16384.0 (-> s5-0 vec0 7 x)) + ) + (let ((s4-0 (new 'stack 'boxed-array collide-shape 128))) + (set! (-> s4-0 length) (fill-actor-list-for-sphere + *actor-hash* + (-> s5-0 vec0 1) + (-> s5-0 vec0 4) + (-> s5-0 vec0 7 x) + (the-as (pointer collide-shape) (-> s4-0 data)) + (-> s4-0 allocated-length) + -1 + ) + ) + (let ((a0-14 (find-nearest-focusable + (the-as (array collide-shape) s4-0) + (-> s5-0 vec0 1) + (-> s5-0 vec0 7 y) + (search-info-flag attackable enemy attackable-priority high-priority) + (search-info-flag) + (-> s5-0 vec0 3) + (the-as vector #f) + 2730.6667 + ) + ) + ) + (when a0-14 + (set! (-> s5-0 vec0 6 quad) (-> (get-trans a0-14 3) quad)) + (vector-! (-> s5-0 vec0 5) (-> s5-0 vec0 6) (the-as vector (-> s5-0 vec0))) + (matrix-transpose! (-> s5-0 mat1) (-> s5-0 mat0)) + (vector-matrix*! (-> s5-0 vec0 2) (-> s5-0 vec0 5) (-> s5-0 mat1)) + (set! (-> s5-0 vec0 2 x) 0.0) + (vector-normalize! (-> s5-0 vec0 2) 1.0) + (cond + ((< (-> s5-0 vec0 7 w) (-> s5-0 vec0 2 y)) + (set! (-> s5-0 vec0 2 y) (-> s5-0 vec0 7 w)) + (let ((f0-16 1.0) + (f1-3 (-> s5-0 vec0 7 w)) + ) + (set! (-> s5-0 vec0 2 z) (sqrtf (- f0-16 (* f1-3 f1-3)))) + ) + ) + ((< (-> s5-0 vec0 2 y) (-> s5-0 vec0 7 z)) + (set! (-> s5-0 vec0 2 y) (-> s5-0 vec0 7 z)) + (let ((f0-21 1.0) + (f1-7 (-> s5-0 vec0 7 z)) + ) + (set! (-> s5-0 vec0 2 z) (sqrtf (- f0-21 (* f1-7 f1-7)))) + ) + ) + ) + (if (< 0.0 (-> s5-0 vec0 2 z)) + (vector-rotate*! (-> s5-0 vec0 3) (-> s5-0 vec0 2) (-> s5-0 mat0)) + ) + ) + ) + ) + (vector-float*! (-> s5-0 vec0 4) (-> s5-0 vec0 3) (-> s5-0 vec0 7 y)) + (set! (-> s5-0 params ent) (-> this 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) (-> s5-0 vec0 0 quad)) + (set! (-> s5-0 params vel quad) (-> s5-0 vec0 4 quad)) + (set! (-> s5-0 params notify-handle) (the-as handle #f)) + (set! (-> s5-0 params owner-handle) (process->handle this)) + (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 this)) + (let* ((v1-58 *game-info*) + (a0-35 (+ (-> v1-58 attack-id) 1)) + ) + (set! (-> v1-58 attack-id) a0-35) + (set! (-> s5-0 params attack-id) a0-35) + ) + (set! (-> s5-0 params timeout) (seconds 4)) + (spawn-projectile v-snake-shot (-> s5-0 params) *rigid-body-queue-manager* *default-dead-pool*) + (let ((v1-63 (-> this jmod-guns (-> s5-0 barrel-idx)))) + (set! (-> v1-63 transform trans z) -3276.8) + ) + ) + (none) + ) + +(defmethod init-collision! ((this wcar-snake-base)) + (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! (-> 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 wcar-snake-base)) + (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 3317.76 :z 9011.2 :w 4915.2)) + 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 -14336.0 :w 6144.0)) + 16 + ) + (set! (-> (the-as collide-shape-prim-group s5-0) child 7 local-sphere w) 20889.6) + ) + ((method-of-type wcar-base vehicle-method-62) this) + 0 + (none) + ) + +(defmethod vehicle-method-79 ((this wcar-snake-base)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'quaternion 2))) + (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 + ) + ) + (let ((s5-1 (new 'stack-no-clear 'wcar-stack-type1))) + (let* ((v1-16 (-> s5-1 vec0)) + (a3-2 (-> this node-list data 0 bone transform)) + (a0-9 (-> a3-2 rvec quad)) + (a1-3 (-> a3-2 uvec quad)) + (a2-3 (-> a3-2 fvec quad)) + (a3-3 (-> a3-2 trans quad)) + ) + (set! (-> v1-16 0 quad) a0-9) + (set! (-> v1-16 1 quad) a1-3) + (set! (-> v1-16 2 quad) a2-3) + (set! (-> v1-16 3 quad) a3-3) + ) + (set! (-> s5-1 vec0 4 quad) (-> (new 'static 'vector :x 3768.32 :y 3686.4 :z 6758.4 :w 1.0) quad)) + (set! (-> s5-1 vec0 5 quad) (-> (new 'static 'vector :x 3768.32 :y 3686.4 :z 6758.4 :w 1.0) quad)) + (set! (-> s5-1 vec0 6 quad) (-> (new 'static 'vector :x 5816.32 :y 5242.88 :z -11960.32 :w 1.0) quad)) + (set! (-> s5-1 vec0 7 quad) (-> (new 'static 'vector :x 5816.32 :y 5242.88 :z -11960.32 :w 1.0) quad)) + (set-vector! (-> s5-1 vec0 8) 25486.223 25486.223 29127.111 29127.111) + (dotimes (s4-1 4) + (let ((s3-1 (-> this wheel s4-1))) + (let ((v1-25 (-> s3-1 info))) + (set! (-> s5-1 float0) (+ -2048.0 (-> v1-25 susp-arm-length))) + (set! (-> s5-1 vec1 0 quad) (-> (the-as (pointer uint128) (+ (+ (* s4-1 16) 64) (the-as int s5-1))))) + (set! (-> s5-1 vec0 9 quad) (-> v1-25 local-pos quad)) + ) + (+! (-> s5-1 vec0 9 x) (* (-> s5-1 float0) (-> s3-1 cos-susp-ang))) + (+! (-> s5-1 vec0 9 y) (* (-> s5-1 float0) (-> s3-1 sin-susp-ang))) + (set! (-> s5-1 vec1 1 quad) (-> s5-1 vec0 9 quad)) + (set! (-> s5-1 vec1 1 x) (* (-> s5-1 vec1 1 x) (-> s3-1 x-scale))) + (set! (-> s5-1 vec1 0 x) (* (-> s5-1 vec1 0 x) (-> s3-1 x-scale))) + (vector-! (-> s5-1 vec1 2) (-> s5-1 vec1 1) (the-as vector (-> s5-1 vec1))) + (set! (-> s5-1 float2) + (- (-> s5-1 vec0 8 data s4-1) (* (atan (-> s5-1 vec1 2 x) (-> s5-1 vec1 2 y)) (-> s3-1 x-scale))) + ) + (let ((v1-34 (-> this jmod-shock-tops s4-1))) + (quaternion-axis-angle! (-> v1-34 rotation) 0.0 0.0 1.0 (-> s5-1 float2)) + ) + 0 + (let ((v1-38 (-> this jmod-shock-mids s4-1))) + (set! (-> v1-38 transform trans y) (* -1.0 (+ -3276.8 (vector-length (-> s5-1 vec1 2))) (-> s3-1 x-scale))) + ) + ) + 0 + 0 + ) + ) + (let ((f30-1 (seconds-per-frame))) + (dotimes (s5-2 2) + (let ((s4-2 (-> this jmod-guns s5-2))) + (seek! (-> s4-2 transform trans z) 0.0 (* 32768.0 f30-1)) + ) + ) + ) + 0 + (none) + ) + +(defskelgroup skel-v-turtle turtle turtle-lod0-jg turtle-idle-ja + ((turtle-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3.5) + :shadow turtle-shadow-mg + :origin-joint-index 3 + ) + +(defskelgroup skel-v-turtle-wheel turtle turtle-wheel-lod0-jg turtle-wheel-idle-ja + ((turtle-wheel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 0.75) + :shadow turtle-wheel-shadow-mg + ) + +(defskelgroup skel-v-turtle-wheel-blur turtle turtle-wheel-blur-lod0-jg turtle-wheel-blur-idle-ja + ((turtle-wheel-blur-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 0.75) + :shadow turtle-wheel-blur-shadow-mg + ) + +(defskelgroup skel-v-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 + ) + +(defskelgroup skel-v-snake-wheel snake snake-wheel-lod0-jg snake-wheel-idle-ja + ((snake-wheel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.15) + :shadow snake-wheel-shadow-mg + ) + +(defskelgroup skel-v-snake-wheel-blur snake snake-wheel-blur-lod0-jg snake-wheel-blur-idle-ja + ((snake-wheel-blur-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.15) + :shadow snake-wheel-blur-shadow-mg + ) + +(defskelgroup skel-v-scorpion scorpion scorpion-lod0-jg scorpion-idle-ja + ((scorpion-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 7) + :shadow scorpion-shadow-mg + :origin-joint-index 3 + ) + +(defskelgroup skel-v-scorpion-wheel scorpion scorpion-wheel-lod0-jg scorpion-wheel-idle-ja + ((scorpion-wheel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 0.55) + :shadow scorpion-wheel-shadow-mg + ) + +(defskelgroup skel-v-scorpion-wheel-blur scorpion scorpion-wheel-blur-lod0-jg scorpion-wheel-blur-idle-ja + ((scorpion-wheel-blur-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 0.55) + :shadow scorpion-wheel-blur-shadow-mg + ) + +(defskelgroup skel-v-toad toad toad-lod0-jg toad-idle-ja + ((toad-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + :shadow toad-shadow-mg + ) + +(defskelgroup skel-v-toad-wheel toad toad-wheel-lod0-jg toad-wheel-idle-ja + ((toad-wheel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.44) + :shadow toad-wheel-shadow-mg + ) + +(defskelgroup skel-v-toad-wheel-blur toad toad-wheel-blur-lod0-jg toad-wheel-blur-idle-ja + ((toad-wheel-blur-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.44) + :shadow toad-wheel-blur-shadow-mg + ) + +(defskelgroup skel-v-fox fox fox-lod0-jg fox-idle-ja + ((fox-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :shadow fox-shadow-mg + ) + +(defskelgroup skel-v-fox-wheel fox fox-wheel-lod0-jg fox-wheel-idle-ja + ((fox-wheel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.15) + :shadow fox-wheel-shadow-mg + ) + +(defskelgroup skel-v-fox-wheel-blur fox fox-wheel-blur-lod0-jg fox-wheel-blur-idle-ja + ((fox-wheel-blur-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.15) + :shadow fox-wheel-blur-shadow-mg + ) + +(defskelgroup skel-v-rhino rhino rhino-lod0-jg rhino-idle-ja + ((rhino-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + :shadow rhino-shadow-mg + ) + +(defskelgroup skel-v-rhino-wheel rhino rhino-wheel-lod0-jg rhino-wheel-idle-ja + ((rhino-wheel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 0.59) + :shadow rhino-wheel-shadow-mg + ) + +(defskelgroup skel-v-mirage snake snake-lod0-jg snake-idle-ja + ((snake-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :shadow snake-shadow-mg + ) + +(defskelgroup skel-v-mirage-wheel snake snake-wheel-lod0-jg snake-wheel-idle-ja + ((snake-wheel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.15) + :shadow snake-wheel-shadow-mg + ) + +(defskelgroup skel-v-mirage-wheel-blur snake snake-wheel-blur-lod0-jg snake-wheel-blur-idle-ja + ((snake-wheel-blur-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.15) + :shadow snake-wheel-blur-shadow-mg + ) + +(defskelgroup skel-v-x-ride fox fox-lod0-jg fox-idle-ja + ((fox-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :shadow fox-shadow-mg + ) + +(defskelgroup skel-v-x-ride-wheel fox fox-wheel-lod0-jg fox-wheel-idle-ja + ((fox-wheel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.15) + :shadow fox-wheel-shadow-mg + ) + +(defskelgroup skel-v-x-ride-wheel-blur fox fox-wheel-blur-lod0-jg fox-wheel-blur-idle-ja + ((fox-wheel-blur-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.15) + :shadow fox-wheel-blur-shadow-mg + ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-ai.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-ai.gc index 9bbe5b8a50..f3b08c0b83 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 d9fda5faf0..187a3254f4 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-effects.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-effects.gc @@ -5,5 +5,1179 @@ ;; name in dgo: wvehicle-effects ;; dgos: LPATK, LFACCAR, WASALL +(define-extern *wheel-trail-info* light-trail-composition) + ;; DECOMP BEGINS +(deftype wvehicle-wheel-launcher-spec (structure) + ((mat matrix) + (particle-system sparticle-system) + (launcher sparticle-launcher) + (num-spec sp-field-init-spec) + (r-spec sp-field-init-spec) + (g-spec sp-field-init-spec) + (b-spec sp-field-init-spec) + (a-spec sp-field-init-spec) + (scale-x-spec sp-field-init-spec) + (scale-y-spec sp-field-init-spec) + (fade-a-spec sp-field-init-spec) + (ptr-birth-accum (pointer sparticle-launch-control)) + (i-birth-accum int8) + ) + :pack-me + ) + + +(deftype wvehicle-part-work (structure) + ((local-mat matrix :inline) + (world-mat matrix :inline) + (velocity vector :inline) + (side-dir vector :inline) + (up-dir vector :inline) + (forward-dir vector :inline) + (wheel-axis vector :inline) + (surface-pos vector :inline) + (part-vel vector :inline) + (pos-l vector :inline) + (pos-r vector :inline) + (offset vector :inline) + (zero-offset vector :inline) + (prev-pos vector :inline) + (surface-type uint8) + (wheel-rev-speed float) + (wheel-speed float) + (wheel-radius float) + (wheel-width float) + (part-num float) + (rand-val float) + (scale float) + (slip float) + (up-force float) + (alpha float) + (alpha-range float) + (vel-scale float) + (cur-time uint32) + (ups float) + (dirt-launcher wvehicle-wheel-launcher-spec :inline) + (dust-launcher wvehicle-wheel-launcher-spec :inline) + (spray-launcher wvehicle-wheel-launcher-spec :inline) + (ripple-launcher wvehicle-wheel-launcher-spec :inline) + (dummy-spec sp-field-init-spec :inline) + ) + ) + + +(if (or (zero? *wheel-trail-info*) (!= loading-level global)) + (set! *wheel-trail-info* (new 'loading-level 'light-trail-composition)) + ) + +(set! (-> *wheel-trail-info* color-mode) (the-as uint 3)) + +(set! (-> *wheel-trail-info* color-repeat-dist) 73728.0) + +(set! (-> *wheel-trail-info* alpha-1-mode) (the-as uint 0)) + +(set! (-> *wheel-trail-info* alpha-2-mode) (the-as uint 6)) + +(set! (-> *wheel-trail-info* base-alpha) 0.1) + +(set! (-> *wheel-trail-info* alpha-repeat-dist) 12288.0) + +(set! (-> *wheel-trail-info* width-mode) (the-as uint 0)) + +(set! (-> *wheel-trail-info* base-width) 1.0) + +(set! (-> *wheel-trail-info* width-repeat-dist) 4096.0) + +(set! (-> *wheel-trail-info* uv-mode) (the-as uint 3)) + +(set! (-> *wheel-trail-info* uv-repeat-dist) 8192.0) + +(set! (-> *wheel-trail-info* lie-mode) (the-as uint 0)) + +(set! (-> *wheel-trail-info* max-age) (seconds 3)) + +(if #f + (set! (-> *wheel-trail-info* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *wheel-trail-info* tex-id) (the-as uint #x100300)) + ) + +(set! (-> *wheel-trail-info* width-curve) (the-as curve2d-piecewise *curve-unity*)) + +(set! (-> *wheel-trail-info* color-curve) (the-as curve-color-piecewise *trail-color-curve-white*)) + +(set! (-> *wheel-trail-info* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +(set! (-> *wheel-trail-info* alpha-curve-2) #f) + +(set! (-> *wheel-trail-info* zbuffer?) #f) + +(set! (-> *wheel-trail-info* lie-vector quad) (-> *up-vector* quad)) + +(set! (-> *wheel-trail-info* use-tape-mode?) #f) + +(set! (-> *wheel-trail-info* blend-mode) (the-as uint 2)) + +(set! (-> *wheel-trail-info* frame-stagger) (the-as uint 1)) + +(deftype tire-trail-crumb (light-trail-breadcrumb) + ((offset vector :inline) + (uu float :overlay-at (-> offset data 3)) + ) + ) + + +(deftype tire-trail (light-trail) + () + (:methods + (tire-trail-method-22 (_type_) none) + (tire-trail-method-23 (_type_) none) + ) + ) + + +;; WARN: Return type mismatch vector vs none. +(defmethod light-trail-method-18 ((this tire-trail) (arg0 light-trail-breadcrumb) (arg1 int) (arg2 vector) (arg3 vector)) + (set! (-> arg3 quad) (-> (&+ arg0 16) pos quad)) + (none) + ) + +(defmethod light-trail-method-9 ((this tire-trail) (arg0 light-trail-composition) (arg1 int)) + (set! (-> this crumb-size) (the-as uint 32)) + (call-parent-method this arg0 arg1) + (none) + ) + +(defmethod wvehicle-method-195 ((this wvehicle)) + ; TODO trail tracker stuff + ; (let ((s5-0 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + ; (set! (-> s5-0 tracked-obj) (process->handle this)) + ; (set! (-> s5-0 max-num-crumbs) 80) + ; (set! (-> s5-0 appearance) *wheel-trail-info*) + ; (dotimes (s4-0 (-> this info physics-model wheel-count)) + ; (when (not (handle->process (-> this wheel s4-0 tread-tracker))) + ; (set! (-> *wheel-trail-info* tex-id) (the-as uint (-> this wheel s4-0 info tread-tid))) + ; (set! (-> this wheel s4-0 tread-tracker) (process->handle (spawn-tire-trail-tracker this s5-0))) + ; ) + ; ) + ; ) + 0 + (none) + ) + +(defmethod wvehicle-method-196 ((this wvehicle)) + (dotimes (s5-0 (-> this info physics-model wheel-count)) + (send-event (handle->process (-> this wheel s5-0 tread-tracker)) 'die) + (set! (-> this wheel s5-0 tread-tracker) (the-as handle #f)) + ) + 0 + (none) + ) + +(defmethod wvehicle-method-189 ((this wvehicle) (arg0 vehicle-wheel-state) (arg1 wvehicle-part-work) (arg2 wvehicle-wheel-launcher-spec)) + (let ((s5-0 (-> arg2 mat))) + (let ((s3-0 (-> this info particle-common))) + (set! (-> s5-0 trans quad) (-> arg1 surface-pos quad)) + (set! (-> arg2 num-spec initial-valuef) (-> arg1 part-num)) + (set! (-> arg2 num-spec random-rangef) 0.0) + (set! (-> arg2 a-spec initial-valuef) (-> arg1 alpha)) + (set! (-> arg2 a-spec random-rangef) (-> arg1 alpha-range)) + (set! (-> arg2 scale-x-spec initial-valuef) (-> arg1 scale)) + (set! (-> arg2 scale-x-spec random-rangef) (* 0.5 (-> arg1 scale))) + (set! (-> arg2 scale-y-spec initial-valuef) (-> arg1 scale)) + (set! (-> arg2 scale-y-spec random-rangef) 0.0) + (rigid-body-control-method-23 (-> this rbody) (-> arg1 surface-pos) (-> arg1 velocity)) + (vector-float*! (-> arg1 velocity) (-> arg1 velocity) (-> arg1 vel-scale)) + (vector+float*! (-> arg1 velocity) (-> arg1 velocity) (-> arg1 forward-dir) (-> arg1 part-vel z)) + (vector+float*! (-> arg1 velocity) (-> arg1 velocity) (-> arg1 up-dir) (-> arg1 part-vel y)) + (vector+float*! (-> arg1 velocity) (-> arg1 velocity) (-> arg1 side-dir) (-> arg1 part-vel x)) + (let ((v1-21 (-> s3-0 part-vel)) + (a0-6 (-> arg1 velocity)) + (f0-13 300.0) + ) + (vector-float*! v1-21 a0-6 (/ 1.0 f0-13)) + ) + ) + (when (nonzero? (-> arg2 launcher)) + (let ((s4-1 (-> arg2 ptr-birth-accum))) + (set! (-> arg2 launcher birthaccum) (the-as float (-> s4-1 0))) + (launch-particles :system (-> arg2 particle-system) (-> arg2 launcher) s5-0 :origin-is-matrix #t) + (set! (-> s4-1 0) (the-as sparticle-launch-control (-> arg2 launcher birthaccum))) + (if (< 1.0 (the-as float (-> s4-1 0))) + (set! (-> s4-1 0) (the-as sparticle-launch-control 0.0)) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod wvehicle-method-190 ((this wvehicle) (arg0 vehicle-wheel-state) (arg1 wvehicle-part-work)) + (when (not (-> arg1 dirt-launcher particle-system)) + (set! (-> arg1 dirt-launcher particle-system) *sp-particle-system-2d*) + (set! (-> arg1 dirt-launcher launcher) (-> *part-id-table* 954)) + (set! (-> arg1 dirt-launcher num-spec) (-> *part-id-table* 954 init-specs 2)) + (set! (-> arg1 dirt-launcher a-spec) (-> *part-id-table* 954 init-specs 11)) + (set! (-> arg1 dirt-launcher scale-x-spec) (-> *part-id-table* 954 init-specs 5)) + (set! (-> arg1 dirt-launcher scale-y-spec) (-> *part-id-table* 954 init-specs 7)) + (set! (-> arg1 dirt-launcher mat) (-> arg1 local-mat)) + (set! (-> arg1 dirt-launcher i-birth-accum) 0) + 0 + ) + (set! (-> arg1 dirt-launcher ptr-birth-accum) (-> arg0 part-birth-accum)) + (set! (-> arg1 part-vel x) (-> arg0 side-vel)) + (set! (-> arg1 part-vel y) (* 0.7 (+ (fabs (-> arg1 wheel-rev-speed)) (* 2048.0 (-> arg1 slip))))) + (set! (-> arg1 rand-val) (rand-vu-float-range -1.0 0.5)) + (set! (-> arg1 part-vel z) (* (-> arg1 rand-val) (-> arg1 wheel-rev-speed))) + (set! (-> arg1 part-num) (fmin 20.0 (* 0.1 (-> arg1 up-force) (+ 1.0 (-> arg1 slip))))) + (set! (-> arg1 scale) (* 983.04 (fmin 1.0 (* 0.125 (-> arg1 up-force) (+ 1.0 (-> arg1 slip)))))) + (set! (-> arg1 vel-scale) 1.0) + (set! (-> arg1 alpha) 128.0) + (set! (-> arg1 alpha-range) 0.0) + (if (< 0.5 (-> arg1 part-num)) + (wvehicle-method-189 this arg0 arg1 (-> arg1 dirt-launcher)) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs symbol. +(defmethod wvehicle-method-191 ((this wvehicle) (arg0 vehicle-wheel-state) (arg1 wvehicle-part-work)) + (when (not (-> arg1 dust-launcher particle-system)) + (set! (-> arg1 dust-launcher particle-system) *sp-particle-system-2d*) + (set! (-> arg1 dust-launcher launcher) (-> *part-id-table* 964)) + (set! (-> arg1 dust-launcher num-spec) (-> *part-id-table* 964 init-specs 2)) + (set! (-> arg1 dust-launcher a-spec) (-> *part-id-table* 964 init-specs 9)) + (set! (-> arg1 dust-launcher scale-x-spec) (-> *part-id-table* 964 init-specs 3)) + (set! (-> arg1 dust-launcher scale-y-spec) (-> *part-id-table* 964 init-specs 5)) + (set! (-> arg1 dust-launcher mat) (-> arg1 local-mat)) + ) + (set! (-> arg1 dust-launcher i-birth-accum) 1) + (set! (-> arg1 dust-launcher ptr-birth-accum) (&-> arg0 part-birth-accum 1)) + (let* ((f0-0 (-> arg0 side-vel)) + (f0-2 (* f0-0 f0-0)) + (f1-0 (-> arg0 forward-vel)) + (f30-0 (sqrtf (+ f0-2 (* f1-0 f1-0)))) + ) + (vector-reset! (-> arg1 part-vel)) + (set! (-> arg1 rand-val) (rand-vu-float-range -1.0 1.0)) + (set! (-> arg1 part-vel y) 8192.0) + (set! (-> arg1 part-vel x) (* 4096.0 (-> arg1 rand-val))) + (set! (-> arg1 part-num) (fmin 1.0 (* 0.000016276043 (+ -40960.0 (fabs f30-0))))) + ) + (set! (-> arg1 scale) 8192.0) + (if (zero? (-> arg1 surface-type)) + (set! (-> arg1 part-num) (* 0.25 (-> arg1 part-num))) + ) + (set! (-> arg1 alpha) 32.0) + (set! (-> arg1 alpha-range) 32.0) + (set! (-> arg1 vel-scale) 0.0) + (if (< 0.05 (-> arg1 part-num)) + (wvehicle-method-189 this arg0 arg1 (-> arg1 dust-launcher)) + ) + (the-as symbol 0) + ) + +(defmethod wvehicle-method-192 ((this wvehicle) (arg0 vehicle-wheel-state) (arg1 wvehicle-part-work)) + (when (not (-> arg1 dust-launcher particle-system)) + (set! (-> arg1 dust-launcher particle-system) *sp-particle-system-2d*) + (set! (-> arg1 dust-launcher launcher) (-> *part-id-table* 964)) + (set! (-> arg1 dust-launcher num-spec) (-> *part-id-table* 964 init-specs 2)) + (set! (-> arg1 dust-launcher a-spec) (-> *part-id-table* 964 init-specs 9)) + (set! (-> arg1 dust-launcher scale-x-spec) (-> *part-id-table* 964 init-specs 3)) + (set! (-> arg1 dust-launcher scale-y-spec) (-> *part-id-table* 964 init-specs 5)) + (set! (-> arg1 dust-launcher mat) (-> arg1 local-mat)) + ) + (set! (-> arg1 dust-launcher i-birth-accum) 2) + (set! (-> arg1 dust-launcher ptr-birth-accum) (&-> arg0 part-birth-accum 2)) + (set! (-> arg1 part-vel x) (-> arg0 side-vel)) + (set! (-> arg1 part-vel y) 8192.0) + (set! (-> arg1 rand-val) (rand-vu-float-range -1.0 0.5)) + (set! (-> arg1 part-vel z) (* (-> arg1 rand-val) (-> arg1 wheel-rev-speed))) + (set! (-> arg1 rand-val) (* 0.5 (-> arg1 up-force) (-> arg1 slip))) + (set! (-> arg1 part-num) (fmin 0.4 (-> arg1 rand-val))) + (set! (-> arg1 alpha) (* 40.0 (fmin 1.0 (-> arg1 rand-val)))) + (set! (-> arg1 alpha-range) (* 0.25 (-> arg1 alpha))) + (set! (-> arg1 vel-scale) 0.75) + (set! (-> arg1 scale) 16384.0) + (if (< 0.05 (-> arg1 part-num)) + (wvehicle-method-189 this arg0 arg1 (-> arg1 dust-launcher)) + ) + 0 + (none) + ) + +(defmethod wvehicle-method-193 ((this wvehicle) (arg0 vehicle-wheel-state) (arg1 wvehicle-part-work)) + (when (not (-> arg1 spray-launcher particle-system)) + (set! (-> arg1 spray-launcher particle-system) *sp-particle-system-2d*) + (set! (-> arg1 spray-launcher launcher) (-> *part-id-table* 955)) + (set! (-> arg1 spray-launcher num-spec) (-> *part-id-table* 955 init-specs 2)) + (set! (-> arg1 spray-launcher r-spec) (-> *part-id-table* 955 init-specs 8)) + (set! (-> arg1 spray-launcher g-spec) (-> *part-id-table* 955 init-specs 9)) + (set! (-> arg1 spray-launcher b-spec) (-> *part-id-table* 955 init-specs 10)) + (set! (-> arg1 spray-launcher a-spec) (-> *part-id-table* 955 init-specs 11)) + (set! (-> arg1 spray-launcher scale-x-spec) (-> arg1 dummy-spec)) + (set! (-> arg1 spray-launcher scale-y-spec) (-> arg1 dummy-spec)) + (set! (-> arg1 spray-launcher mat) (-> arg1 local-mat)) + (set! (-> arg1 spray-launcher i-birth-accum) 2) + ) + (set! (-> arg1 spray-launcher ptr-birth-accum) (&-> arg0 part-birth-accum 2)) + (set! (-> arg1 part-vel x) (-> arg0 side-vel)) + (set! (-> arg1 part-vel y) + (* 0.75 (fmax (fmax (fabs (-> arg1 wheel-rev-speed)) (fabs (-> arg0 forward-vel))) (fabs (-> arg0 side-vel)))) + ) + (let ((f0-4 (fmin 1.0 (* 0.000008138021 (-> arg1 part-vel y))))) + (set! (-> this water-sound-envelope) (fmax (-> this water-sound-envelope) f0-4)) + ) + (set! (-> arg1 rand-val) (rand-vu-float-range -1.0 0.5)) + (set! (-> arg1 part-vel z) (* (-> arg1 rand-val) (-> arg1 wheel-rev-speed))) + (set! (-> arg1 part-num) (fmin 5.0 (* 0.000008138021 (-> arg1 part-vel y)))) + (set! (-> arg1 alpha-range) 0.0) + (set! (-> arg1 vel-scale) 1.0) + (set! (-> arg1 surface-pos y) (-> this water-height)) + (cond + ((logtest? (-> this water-flags) 128) + (let ((f0-16 (+ 1.0 (* -0.2222 (rand-vu))))) + (set! (-> arg1 spray-launcher r-spec initial-valuef) (* 105.0 f0-16)) + (set! (-> arg1 spray-launcher g-spec initial-valuef) (* 90.0 f0-16)) + (set! (-> arg1 spray-launcher b-spec initial-valuef) (* 60.0 f0-16)) + ) + (set! (-> arg1 alpha) 128.0) + ) + (else + (set! (-> arg1 spray-launcher r-spec initial-valuef) 255.0) + (set! (-> arg1 spray-launcher g-spec initial-valuef) 255.0) + (set! (-> arg1 spray-launcher b-spec initial-valuef) 255.0) + (set! (-> arg1 alpha) (* 102.4 (fmin 1.0 (* 0.0000040690106 (-> arg1 part-vel y))))) + ) + ) + (if (< 0.1 (-> arg1 part-num)) + (wvehicle-method-189 this arg0 arg1 (-> arg1 spray-launcher)) + ) + 0 + (none) + ) + +(defmethod wvehicle-method-194 ((this wvehicle) (arg0 vehicle-wheel-state) (arg1 wvehicle-part-work)) + (when (not (-> arg1 ripple-launcher particle-system)) + (set! (-> arg1 ripple-launcher particle-system) *sp-particle-system-3d*) + (set! (-> arg1 ripple-launcher launcher) (-> *part-id-table* 956)) + (set! (-> arg1 ripple-launcher num-spec) (-> *part-id-table* 956 init-specs 1)) + (set! (-> arg1 ripple-launcher r-spec) (-> *part-id-table* 956 init-specs 4)) + (set! (-> arg1 ripple-launcher g-spec) (-> *part-id-table* 956 init-specs 5)) + (set! (-> arg1 ripple-launcher b-spec) (-> *part-id-table* 956 init-specs 6)) + (set! (-> arg1 ripple-launcher a-spec) (-> *part-id-table* 956 init-specs 7)) + (set! (-> arg1 ripple-launcher scale-x-spec) (-> *part-id-table* 956 init-specs 2)) + (set! (-> arg1 ripple-launcher scale-y-spec) (-> *part-id-table* 956 init-specs 3)) + (set! (-> arg1 ripple-launcher fade-a-spec) (-> *part-id-table* 956 init-specs 10)) + (set! (-> arg1 ripple-launcher mat) (-> arg1 world-mat)) + (set! (-> arg1 ripple-launcher i-birth-accum) 3) + ) + (set! (-> arg1 ripple-launcher ptr-birth-accum) (&-> arg0 part-birth-accum 3)) + (let* ((f0-0 (-> arg0 forward-vel)) + (f0-2 (* f0-0 f0-0)) + (f1-0 (-> arg0 side-vel)) + ) + (set! (-> arg1 wheel-speed) (sqrtf (+ f0-2 (* f1-0 f1-0)))) + ) + (vector-reset! (-> arg1 part-vel)) + (set! (-> arg1 part-num) (fmax 0.1 (fmin 1.0 (* 0.0000048828124 (-> arg1 wheel-speed))))) + (set! (-> arg1 alpha) (* 32.0 (fmax 0.5 (-> arg1 part-num)))) + (set! (-> arg1 alpha-range) (-> arg1 alpha)) + (let* ((f0-10 -0.07111111) + (f0-11 (* 2.0 (fmax 0.5 (-> arg1 part-num)) f0-10)) + ) + (set! (-> arg1 ripple-launcher fade-a-spec initial-valuef) f0-11) + (set! (-> arg1 ripple-launcher fade-a-spec random-rangef) f0-11) + ) + (cond + ((logtest? (-> this water-flags) 128) + (let ((f0-14 (+ 2.0 (* 0.222 (rand-vu))))) + (set! (-> arg1 ripple-launcher r-spec initial-valuef) (* 45.0 f0-14)) + (set! (-> arg1 ripple-launcher g-spec initial-valuef) (* 30.0 f0-14)) + (set! (-> arg1 ripple-launcher b-spec initial-valuef) (* 20.0 f0-14)) + ) + ) + (else + (set! (-> arg1 ripple-launcher r-spec initial-valuef) 128.0) + (set! (-> arg1 ripple-launcher g-spec initial-valuef) 128.0) + (set! (-> arg1 ripple-launcher b-spec initial-valuef) 128.0) + ) + ) + (set! (-> arg1 scale) (-> arg1 wheel-radius)) + (set! (-> arg1 vel-scale) 0.0) + (set! (-> arg1 surface-pos y) (-> this water-height)) + (if #t + (wvehicle-method-189 this arg0 arg1 (-> arg1 ripple-launcher)) + ) + 0 + (none) + ) + +(defmethod wvehicle-method-200 ((this wvehicle) (arg0 vector) (arg1 wvehicle-part-work)) + (set! (-> arg1 ups) (seconds-per-frame)) + (set! (-> arg1 surface-pos quad) (-> arg0 quad)) + (set! (-> arg1 surface-pos y) (-> this water-height)) + (rigid-body-control-method-23 (-> this rbody) arg0 (-> arg1 velocity)) + (vector+float*! (-> arg1 prev-pos) arg0 (-> arg1 velocity) (* -1.0 (-> arg1 ups))) + (when (and (< (-> arg1 surface-pos y) (- (-> arg1 prev-pos y) (-> arg0 w))) (< (-> arg1 velocity y) -40960.0)) + (let ((s4-0 (new 'stack-no-clear 'wvehicle-physics-work))) + (set! (-> s4-0 mat uvec y) (* 0.0000000029802323 (fabs (-> arg1 velocity y)) (-> arg0 w))) + (set! (-> s4-0 mat uvec y) (fmin 4.0 (-> s4-0 mat uvec y))) + (vector-identity! (the-as vector (-> s4-0 mat))) + (vector-float*! (the-as vector (-> s4-0 mat)) (the-as vector (-> s4-0 mat)) (-> s4-0 mat uvec y)) + (matrix-scale! (-> arg1 world-mat) (the-as vector (-> s4-0 mat))) + (set! (-> arg1 world-mat trans quad) (-> arg1 surface-pos quad)) + (when (< (the-as uint 300) (- (-> arg1 cur-time) (-> this splash-time))) + (set! (-> this splash-time) (-> arg1 cur-time)) + (set! (-> s4-0 mat uvec x) (fmax 0.0 (fmin 1.0 (* 0.0000061035157 (fabs (-> arg1 velocity y)))))) + (sound-play-by-name + (static-sound-name "car-splash") + (new-sound-id) + (the int (* 1024.0 (-> s4-0 mat uvec x))) + 0 + 0 + (sound-group) + #t + ) + ) + ) + (if (logtest? (-> *part-group-id-table* 226 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 226) + :mat-joint (-> arg1 world-mat) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 226) + :mat-joint (-> arg1 world-mat) + ) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-78 ((this wvehicle)) + (let ((t9-0 (method-of-type vehicle vehicle-method-78))) + (t9-0 this) + ) + (let ((s5-0 (new 'stack-no-clear 'wvehicle-part-work))) + (set! (-> s5-0 dirt-launcher particle-system) #f) + (set! (-> s5-0 dust-launcher particle-system) #f) + (set! (-> s5-0 spray-launcher particle-system) #f) + (set! (-> s5-0 ripple-launcher particle-system) #f) + (set! (-> s5-0 cur-time) (the-as uint (current-time))) + (let* ((v1-3 (-> s5-0 local-mat)) + (a3-0 (-> this rbody matrix)) + (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-3 rvec quad) a0-3) + (set! (-> v1-3 uvec quad) a1-0) + (set! (-> v1-3 fvec quad) a2-0) + (set! (-> v1-3 trans quad) a3-1) + ) + (matrix-identity! (-> s5-0 world-mat)) + (vector-reset! (-> s5-0 zero-offset)) + (let ((s4-0 (-> this info))) + (set! (-> s5-0 surface-type) (the-as uint 7)) + (when (logtest? (vehicle-flag player-driving net-player-driving ai-driving) (-> this v-flags)) + (dotimes (s3-0 (-> this info physics-model wheel-count)) + (let ((s2-0 (-> this wheel s3-0))) + (let ((s1-0 (-> s2-0 info))) + (when (logtest? (-> s2-0 flags) 2) + (set! (-> s5-0 surface-pos quad) (-> s2-0 surface-pos quad)) + (set! (-> s5-0 slip) (* 0.00024414062 (+ (fabs (-> s2-0 forward-slip-vel)) (fabs (-> s2-0 side-vel))))) + (set! (-> s5-0 up-force) (/ (-> s2-0 up-force) (* 0.25 (-> s4-0 extra gravity) (-> s4-0 info mass)))) + (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)) + (if (< 0.0 (-> s2-0 sink-depth)) + (set! (-> s5-0 surface-type) (the-as uint 4)) + ) + (vector-rotate*! (-> s5-0 side-dir) (-> s2-0 local-axis) (-> s5-0 local-mat)) + (set! (-> s5-0 up-dir quad) (-> s2-0 ground-normal quad)) + (vector+float*! + (-> s5-0 side-dir) + (-> s5-0 side-dir) + (-> s5-0 up-dir) + (- (vector-dot (-> s5-0 side-dir) (-> s5-0 up-dir))) + ) + (vector-normalize! (-> s5-0 side-dir) 1.0) + (vector-cross! (-> s5-0 forward-dir) (-> s5-0 side-dir) (-> s5-0 up-dir)) + (vector-normalize! (-> s5-0 forward-dir) 1.0) + (let ((f0-14 (-> this camera-dist2)) + (f1-10 245760.0) + ) + (when (< f0-14 (* f1-10 f1-10)) + (let ((v1-29 (-> s5-0 surface-type))) + (cond + ((or (= v1-29 1) (= v1-29 2)) + (wvehicle-method-190 this s2-0 s5-0) + (wvehicle-method-191 this s2-0 s5-0) + (wvehicle-method-192 this s2-0 s5-0) + ) + ((zero? v1-29) + (wvehicle-method-191 this s2-0 s5-0) + ) + ((= v1-29 4) + (wvehicle-method-193 this s2-0 s5-0) + (wvehicle-method-194 this s2-0 s5-0) + ) + ) + ) + ) + ) + ) + (set! (-> *wheel-trail-info* tex-id) (the-as uint (-> s1-0 tread-tid))) + ) + (let ((s1-1 (handle->process (-> s2-0 tread-tracker)))) + (when s1-1 + (cond + ((logtest? (-> s2-0 flags) 2) + (set! (-> s5-0 surface-pos quad) (-> s2-0 surface-pos quad)) + (vector+float*! (-> s5-0 surface-pos) (-> s5-0 surface-pos) (-> s2-0 ground-normal) 204.8) + (vector-rotate*! (-> s5-0 wheel-axis) (-> s2-0 local-axis) (-> s5-0 local-mat)) + (vector+float*! + (-> s5-0 wheel-axis) + (-> s5-0 wheel-axis) + (-> s2-0 ground-normal) + (- (vector-dot (-> s5-0 wheel-axis) (-> s2-0 ground-normal))) + ) + (vector-normalize! (-> s5-0 wheel-axis) 1.0) + (vector-float*! (-> s5-0 offset) (-> s5-0 wheel-axis) (* 0.5 (-> s5-0 wheel-width))) + (vector+! (the-as vector (-> s2-0 trail-pos)) (-> s5-0 surface-pos) (-> s5-0 offset)) + (vector-! (-> s2-0 trail-pos 1) (-> s5-0 surface-pos) (-> s5-0 offset)) + ) + (else + (vector+! (-> s5-0 surface-pos) (the-as vector (-> s2-0 trail-pos)) (-> s2-0 trail-pos 1)) + (vector-float*! (-> s5-0 surface-pos) (-> s5-0 surface-pos) 0.5) + ) + ) + (cond + ((logtest? (-> s2-0 prev-flags) 2) + (cond + ((>= (- (-> s5-0 cur-time) (-> s2-0 tread-time)) (the-as uint 50)) + (set! (-> s2-0 tread-time) (-> s5-0 cur-time)) + (let* ((a0-42 (-> (the-as process-focusable s1-1) root)) + (t9-13 (method-of-object a0-42 y-angle)) + ) + (-> s5-0 surface-pos) + (-> s5-0 offset) + 0 + (t9-13 a0-42) + ) + ) + (else + (let* ((a0-43 (-> (the-as process-focusable s1-1) root)) + (t9-14 (method-of-object a0-43 global-y-angle-to-point)) + (a1-29 (-> s5-0 surface-pos)) + ) + (-> s5-0 offset) + 0 + (t9-14 a0-43 a1-29) + ) + ) + ) + (when (not (logtest? (-> s2-0 flags) 2)) + (+! (-> s5-0 surface-pos y) -2048.0) + (let* ((a0-44 (-> (the-as process-focusable s1-1) root)) + (t9-15 (method-of-object a0-44 y-angle)) + ) + (-> s5-0 surface-pos) + (-> s5-0 zero-offset) + 0 + (t9-15 a0-44) + ) + (set! (-> s2-0 tread-time) (+ (-> s5-0 cur-time) -50)) + ) + ) + (else + (when (logtest? (-> s2-0 flags) 2) + (set! (-> s2-0 tread-time) (-> s5-0 cur-time)) + (+! (-> s5-0 surface-pos y) -2048.0) + (let* ((a0-45 (-> (the-as process-focusable s1-1) root)) + (t9-16 (method-of-object a0-45 y-angle)) + ) + (-> s5-0 surface-pos) + (-> s5-0 zero-offset) + 0 + (t9-16 a0-45) + ) + (+! (-> s5-0 surface-pos y) 2048.0) + (let* ((a0-46 (-> (the-as process-focusable s1-1) root)) + (t9-17 (method-of-object a0-46 y-angle)) + ) + (-> s5-0 surface-pos) + (-> s5-0 offset) + 0 + (t9-17 a0-46) + ) + (set! (-> s2-0 tread-time) (+ (-> s5-0 cur-time) -50)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let ((f0-28 (-> this camera-dist2)) + (f1-17 245760.0) + ) + (when (< f0-28 (* f1-17 f1-17)) + (let ((s4-1 (-> this root root-prim)) + (s3-1 1) + ) + (when (< (-> this rbody position y) (+ (-> this water-height) (-> s4-1 local-sphere w))) + (when (zero? (-> s4-1 prim-core prim-type)) + (let ((v1-103 s4-1)) + (set! s4-1 (-> (the-as collide-shape-prim-group v1-103) child 0)) + (set! s3-1 (the-as int (-> v1-103 specific 0))) + ) + ) + (while (nonzero? s3-1) + (+! s3-1 -1) + (when (= (-> s4-1 prim-core prim-type) -1) + (let ((a1-33 (-> s4-1 prim-core))) + (if (< (- (-> a1-33 world-sphere y) (-> a1-33 world-sphere w)) (-> this water-height)) + (wvehicle-method-200 this (the-as vector a1-33) s5-0) + ) + ) + ) + (&+! s4-1 80) + ) + ) + ) + ) + ) + ) + (when (and (logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (logtest? (vehicle-flag turbo-boost) (-> this v-flags)) + ) + (let ((s5-1 (new 'stack-no-clear 'wvehicle-draw-thruster-params))) + (let* ((v1-118 (-> s5-1 mat)) + (a3-9 (-> this node-list data 0 bone transform)) + (a0-54 (-> a3-9 rvec quad)) + (a1-35 (-> a3-9 uvec quad)) + (a2-20 (-> a3-9 fvec quad)) + (a3-10 (-> a3-9 trans quad)) + ) + (set! (-> v1-118 rvec quad) a0-54) + (set! (-> v1-118 uvec quad) a1-35) + (set! (-> v1-118 fvec quad) a2-20) + (set! (-> v1-118 trans quad) a3-10) + ) + (set! (-> s5-1 width) (-> this info particles thruster-flame-width)) + (set! (-> s5-1 length) (-> this info particles thruster-flame-length)) + (set! (-> s5-1 thrust) 1.0) + (set! (-> s5-1 fog-fade) (-> this fog-fade)) + (quaternion-rotate-local-z! (-> s5-1 quat) (-> this root quat) 5461.3335) + (dotimes (s4-2 2) + (vector-matrix*! (-> s5-1 trans) (-> this info particles thruster-local-pos s4-2) (-> s5-1 mat)) + (vehicle-draw-thruster (-> this info particle-common) (the-as vehicle-draw-thruster-params (-> s5-1 quat))) + ) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-106 ((this wvehicle)) + (let ((t9-0 (method-of-type vehicle vehicle-method-106))) + (t9-0 this) + ) + (sound-stop (-> this engine1-sound-id)) + (sound-stop (-> this engine2-sound-id)) + (sound-stop (-> this engine3-sound-id)) + (set! (-> this eng1-vol) 0.0) + (set! (-> this eng2-vol) 0.0) + (set! (-> this eng3-vol) 0.0) + (set! (-> this engine1-sound-id) (new 'static 'sound-id)) + (set! (-> this engine2-sound-id) (new 'static 'sound-id)) + (set! (-> this engine3-sound-id) (new 'static 'sound-id)) + (dotimes (s5-0 4) + (let ((s4-0 (-> this tire-roll-loop-state s5-0))) + (sound-stop (-> s4-0 id)) + (set! (-> s4-0 vol) 0.0) + (set! (-> s4-0 id) (new 'static 'sound-id)) + ) + 0 + ) + (dotimes (s5-1 2) + (let ((s4-1 (-> this tire-slide-loop-state s5-1))) + (sound-stop (-> s4-1 id)) + (set! (-> s4-1 vol) 0.0) + (set! (-> s4-1 id) (new 'static 'sound-id)) + ) + 0 + ) + (set! (-> this water-sound-envelope) 0.0) + (sound-stop (-> this water-sound-id)) + (set! (-> this water-sound-id) (new 'static 'sound-id)) + (sound-stop (-> this turbo-sound-id)) + (set! (-> this turbo-sound-id) (new 'static 'sound-id)) + 0 + (none) + ) + +(defmethod vehicle-method-135 ((this wvehicle)) + (set! (-> this controls throttle) 1.0) + ((method-of-type vehicle vehicle-method-135) this) + (none) + ) + +(defmethod vehicle-method-136 ((this wvehicle)) + (when (logtest? (vehicle-flag ignition) (-> this v-flags)) + (logclear! (-> this v-flags) (vehicle-flag ignition)) + (if (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (sound-play-by-name (-> this info sound stop-sound) (new-sound-id) 1024 0 0 (sound-group) #t) + ) + (sound-stop (-> this engine1-sound-id)) + (sound-stop (-> this engine2-sound-id)) + (sound-stop (-> this engine3-sound-id)) + (sound-stop (-> this turbo-sound-id)) + (set! (-> this engine1-sound-id) (new 'static 'sound-id)) + (set! (-> this engine2-sound-id) (new 'static 'sound-id)) + (set! (-> this engine3-sound-id) (new 'static 'sound-id)) + (set! (-> this turbo-sound-id) (new 'static 'sound-id)) + 0 + ) + 0 + (none) + ) + +(deftype wvehicle-sound-loop-params (structure) + ((speed float) + (weight float) + ) + ) + + +(deftype wvehicle-sound-work (structure) + ((roll-basis-params wvehicle-sound-loop-params 4 :inline) + (slide-basis-params wvehicle-sound-loop-params 2 :inline) + ) + ) + +;; og:preserve-this added +(deftype wvehicle-stack-type7 (structure) + ((work wvehicle-sound-work :inline :offset 0) + (vec0 vector :inline :offset 96) + (float3 float :offset 116) + (float2 float :offset 120) + (float0 float :offset 124) + (vec1 vector :inline :offset 128) + (float1 float :offset 144) + ) + ) + +;; WARN: Return type mismatch number vs none. +(defmethod rigid-body-object-method-38 ((this wvehicle)) + (let ((t9-0 (method-of-type vehicle rigid-body-object-method-38))) + (t9-0 this) + ) + (let ((s5-0 (-> this info)) + (s4-1 (not (logtest? (vehicle-flag ai-driving) (-> this v-flags)))) + ) + (when (logtest? (vehicle-flag ignition) (-> this v-flags)) + (if (zero? (-> this engine1-sound-id)) + (set! (-> this engine1-sound-id) (new-sound-id)) + ) + (if (zero? (-> this engine2-sound-id)) + (set! (-> this engine2-sound-id) (new-sound-id)) + ) + (if (zero? (-> this engine3-sound-id)) + (set! (-> this engine3-sound-id) (new-sound-id)) + ) + (let ((s3-0 (new 'stack-no-clear 'wvehicle-stack-type5))) + (set! (-> s3-0 vec5 x) (seconds-per-frame)) + (seek! (-> this eng-pitch-variance) (-> this eng-pitch-variance-seek) (* 0.4 (-> s3-0 vec5 x))) + (if (= (-> this eng-pitch-variance) (-> this eng-pitch-variance-seek)) + (set! (-> this eng-pitch-variance-seek) (* 0.0 (+ -1.0 (rand-vu) (rand-vu)))) + ) + (seek! (-> this eng-vol-variance) (-> this eng-vol-variance-seek) (* 0.8 (-> s3-0 vec5 x))) + (if (= (-> this eng-vol-variance) (-> this eng-vol-variance-seek)) + (set! (-> this eng-vol-variance-seek) (* 0.0 (+ -1.0 (rand-vu) (rand-vu)))) + ) + (seek! (-> this eng-flutter-envelope) 0.0 (* 0.5 (-> s3-0 vec5 x))) + (seek! + (-> this sound-engine-rpm) + (-> this engine-rpm) + (* 3000.0 (+ 1.0 (* 10.0 (-> this clutch-grab))) (-> s3-0 vec5 x)) + ) + (set! (-> s3-0 vec3 z) (* (-> this sound-engine-rpm) (+ 1.0 (-> this eng-pitch-variance)))) + (set! (-> s3-0 vec3 y) 0.0) + (set! (-> s3-0 vec2 y) + (* (fmax + 0.5 + (fmin + 1.0 + (+ 0.7 + (/ (- (-> s3-0 vec3 z) (-> s5-0 engine idle-rpm)) (- (-> s5-0 engine max-rpm) (-> s5-0 engine idle-rpm))) + ) + ) + ) + (+ 1.0 (-> this eng-vol-variance)) + ) + ) + (set! (-> s3-0 vec2 z) (-> s5-0 sound idle-crossover-rpm)) + (set! (-> s3-0 vec2 w) (-> s5-0 sound engine-crossover-rpm)) + (set! (-> s3-0 vec3 x) + (fmax 0.0 (fmin 1.0 (/ (- (-> s3-0 vec3 z) (-> s3-0 vec2 z)) (- (-> s3-0 vec2 w) (-> s3-0 vec2 z))))) + ) + (set! (-> s3-0 vec0 x) (* (-> s3-0 vec2 y) (- 1.0 (-> s3-0 vec3 x)))) + (set! (-> s3-0 vec0 w) (* (-> s3-0 vec2 y) (-> s3-0 vec3 x) (- 1.0 (-> s3-0 vec3 y)))) + (set! (-> s3-0 vec1 z) (* (-> s3-0 vec2 y) (-> s3-0 vec3 x) (-> s3-0 vec3 y))) + (set! (-> s3-0 vec0 x) (cube-root (-> s3-0 vec0 x))) + (set! (-> s3-0 vec0 w) (cube-root (-> s3-0 vec0 w))) + (set! (-> s3-0 vec1 z) (cube-root (-> s3-0 vec1 z))) + (set! (-> s3-0 vec0 y) + (+ (-> this eng-pitch-offset) + (* (-> s5-0 sound idle-pitch-scale) (log2f (/ (-> s3-0 vec3 z) (-> s5-0 sound idle-rpm)))) + ) + ) + (set! (-> s3-0 vec1 x) + (+ (-> this eng-pitch-offset) + (* (-> s5-0 sound engine-pitch-scale) (log2f (/ (-> s3-0 vec3 z) (-> s5-0 sound engine-rpm)))) + ) + ) + (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)))) + (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)))) + (set! (-> s2-0 pitch-mod) (the int (* 1524.0 (-> s3-0 vec0 y)))) + (sound-play-by-spec s2-0 (-> this engine1-sound-id) (-> s3-0 vec4)) + (set! (-> s2-0 sound-name) (-> s5-0 sound engine-sound)) + (set! (-> s2-0 volume) (the int (* 1024.0 (-> s3-0 vec0 w)))) + (set! (-> s2-0 pitch-mod) (the int (* 1524.0 (-> s3-0 vec1 x)))) + (sound-play-by-spec s2-0 (-> this engine2-sound-id) (-> s3-0 vec4)) + ) + 0 + (when s4-1 + (cond + ((logtest? (vehicle-flag turbo-boost) (-> this v-flags)) + (if (zero? (-> this turbo-sound-id)) + (set! (-> this turbo-sound-id) (new-sound-id)) + ) + (sound-play-by-name + (-> s5-0 sound turbo-sound) + (-> this turbo-sound-id) + 1024 + 0 + 0 + (sound-group) + (-> s3-0 vec4) + ) + ) + (else + (when (nonzero? (-> this turbo-sound-id)) + (sound-stop (-> this turbo-sound-id)) + (set! (-> this turbo-sound-id) (new 'static 'sound-id)) + 0 + ) + ) + ) + ) + ) + ) + (when s4-1 + (let ((s3-1 (new 'stack-no-clear 'wvehicle-stack-type7))) + (set! (-> s3-1 float1) (seconds-per-frame)) + (set! (-> s3-1 vec0 quad) (-> this root trans quad)) + (dotimes (v1-59 4) + (let ((a0-26 (-> s3-1 work roll-basis-params v1-59))) + (set! (-> a0-26 speed) 0.0) + (set! (-> a0-26 weight) 0.0) + ) + ) + (dotimes (v1-62 2) + (let ((a0-30 (-> s3-1 work slide-basis-params v1-62))) + (set! (-> a0-30 speed) 0.0) + (set! (-> a0-30 weight) 0.0) + ) + ) + (dotimes (v1-65 4) + (let ((a0-35 (-> this wheel v1-65))) + (when (logtest? (-> a0-35 flags) 2) + (set! (-> s3-1 float3) (fabs (-> a0-35 forward-vel))) + (let* ((f0-85 (-> a0-35 side-vel)) + (f0-87 (* f0-85 f0-85)) + (f1-29 (-> a0-35 forward-slip-vel)) + ) + (set! (-> s3-1 float2) (sqrtf (+ f0-87 (* f1-29 f1-29)))) + ) + (let ((a0-36 (-> a0-35 surface))) + (dotimes (a1-12 4) + (let ((a2-9 (the-as structure (-> s3-1 work roll-basis-params a1-12))) + (f0-91 (* 0.25 (-> a0-36 tire-roll-mix a1-12))) + ) + (+! (-> (the-as vector a2-9) y) f0-91) + (+! (-> (the-as vector a2-9) x) (* f0-91 (-> s3-1 float3))) + ) + ) + (dotimes (a1-15 2) + (let ((a2-13 (the-as structure (-> s3-1 work slide-basis-params a1-15))) + (f0-95 (* 0.25 (-> a0-36 tire-slide-mix a1-15))) + ) + (+! (-> (the-as vector a2-13) y) f0-95) + (+! (-> (the-as vector a2-13) x) (* f0-95 (-> s3-1 float2))) + ) + ) + ) + ) + ) + ) + (set! (-> s3-1 vec1 x) 0.0) + (dotimes (s2-1 2) + (let ((v1-70 (the-as structure (-> s3-1 work slide-basis-params s2-1))) + (s0-0 (-> s5-0 sound tire-slide-sounds s2-1)) + (s1-0 (-> this tire-slide-loop-state s2-1)) + ) + (set! (-> s3-1 vec1 z) 0.0) + (when (< 0.0 (-> (the-as vector v1-70) y)) + (set! (-> s3-1 float2) (/ (-> (the-as vector v1-70) x) (-> (the-as vector v1-70) y))) + (set! (-> s3-1 vec1 z) + (* (-> (the-as vector v1-70) y) + (fmax 0.0 (fmin 1.0 (/ (- (-> s3-1 float2) (-> s0-0 min-speed)) (- (-> s0-0 max-speed) (-> s0-0 min-speed))))) + ) + ) + (set! (-> s3-1 vec1 w) + (fmax + (fmin + (+ (-> s0-0 pitch-offset) (* (-> s0-0 pitch-scale) (log2f (/ (-> s3-1 float2) (-> s0-0 speed))))) + (-> s0-0 max-pitch) + ) + (-> s0-0 min-pitch) + ) + ) + (+! (-> s3-1 vec1 x) (-> s3-1 vec1 z)) + (set! (-> s1-0 vol) (fmax (-> s3-1 vec1 z) (-> s1-0 vol))) + (set! (-> s1-0 pitch) (-> s3-1 vec1 w)) + ) + (seek! (-> s1-0 vol) (-> s3-1 vec1 z) (* 4.0 (-> s3-1 float1))) + ) + ) + (set! (-> s3-1 float0) (fmax 0.0 (- 1.0 (-> s3-1 vec1 x)))) + (dotimes (s2-2 4) + (let ((v1-80 (the-as structure (-> s3-1 work roll-basis-params s2-2))) + (s0-1 (-> s5-0 sound tire-roll-sounds s2-2)) + (s1-1 (-> this tire-roll-loop-state s2-2)) + ) + (set! (-> s3-1 vec1 z) 0.0) + (when (< 0.0 (-> (the-as vector v1-80) y)) + (set! (-> s3-1 vec1 y) (/ (-> (the-as vector v1-80) x) (-> (the-as vector v1-80) y))) + (set! (-> s3-1 vec1 z) + (* (-> (the-as vector v1-80) y) + (fmax + 0.0 + (fmin + 1.0 + (* (-> s3-1 float0) + (- (-> s3-1 vec1 y) (-> s0-1 min-speed)) + (/ 1.0 (- (-> s0-1 max-speed) (-> s0-1 min-speed))) + ) + ) + ) + ) + ) + (set! (-> s3-1 vec1 w) + (fmax + (fmin + (+ (-> s0-1 pitch-offset) (* (-> s0-1 pitch-scale) (log2f (/ (-> s3-1 vec1 y) (-> s0-1 speed))))) + (-> s0-1 max-pitch) + ) + (-> s0-1 min-pitch) + ) + ) + (set! (-> s1-1 vol) (fmax (-> s3-1 vec1 z) (-> s1-1 vol))) + (set! (-> s1-1 pitch) (-> s3-1 vec1 w)) + ) + (seek! (-> s1-1 vol) (-> s3-1 vec1 z) (* 4.0 (-> s3-1 float1))) + ) + ) + (dotimes (s2-3 4) + (let ((s0-2 (-> this tire-roll-loop-state s2-3)) + (s1-2 (-> s5-0 sound tire-roll-sounds s2-3)) + ) + (set! (-> s3-1 vec1 z) (-> s0-2 vol)) + (set! (-> s3-1 vec1 z) (cube-root (-> s3-1 vec1 z))) + (set! (-> s3-1 vec1 w) (-> s0-2 pitch)) + (cond + ((= s2-3 3) + (when (< 0.0 (-> s0-2 vol)) + (let ((v1-96 (the-as structure (-> s3-1 work roll-basis-params s2-3)))) + (when (< 0.0 (-> (the-as vector v1-96) y)) + (set! (-> s3-1 vec1 y) (/ (-> (the-as vector v1-96) x) (-> (the-as vector v1-96) y))) + (let ((f0-154 (/ 7720777.5 (* 14.0 (-> s3-1 vec1 y))))) + (when (>= (the-as uint (- (current-time) (the-as int (-> this knobby-time)))) (the-as uint (the int f0-154))) + (set! (-> this knobby-time) (the-as uint (current-time))) + (sound-play-by-name + (-> s1-2 sound) + (new-sound-id) + (the int (* 1024.0 (-> s3-1 vec1 z))) + (the int (* 1524.0 (-> s3-1 vec1 w))) + 0 + (sound-group) + (-> s3-1 vec0) + ) + ) + ) + ) + ) + ) + ) + ((< 0.0 (-> s3-1 vec1 z)) + (if (zero? (-> s0-2 id)) + (set! (-> s0-2 id) (new-sound-id)) + ) + (sound-play-by-name + (-> s1-2 sound) + (-> s0-2 id) + (the int (* 1024.0 (-> s3-1 vec1 z))) + (the int (* 1524.0 (-> s3-1 vec1 w))) + 0 + (sound-group) + (-> s3-1 vec0) + ) + ) + (else + (when (nonzero? (-> s0-2 id)) + (sound-stop (-> s0-2 id)) + (set! (-> s0-2 id) (new 'static 'sound-id)) + 0 + ) + ) + ) + ) + ) + (dotimes (s2-4 2) + (let ((s1-4 (-> this tire-slide-loop-state s2-4)) + (s0-4 (-> s5-0 sound tire-slide-sounds s2-4)) + ) + (set! (-> s3-1 vec1 z) (-> s1-4 vol)) + (set! (-> s3-1 vec1 z) (cube-root (-> s3-1 vec1 z))) + (cond + ((< 0.0 (-> s3-1 vec1 z)) + (if (zero? (-> s1-4 id)) + (set! (-> s1-4 id) (new-sound-id)) + ) + (sound-play-by-name + (-> s0-4 sound) + (-> s1-4 id) + (the int (* 1024.0 (-> s3-1 vec1 z))) + (the int (* 1524.0 (-> s1-4 pitch))) + 0 + (sound-group) + (-> s3-1 vec0) + ) + ) + (else + (when (nonzero? (-> s1-4 id)) + (sound-stop (-> s1-4 id)) + (set! (-> s1-4 id) (new 'static 'sound-id)) + 0 + ) + ) + ) + ) + ) + ) + ) + (when s4-1 + (let ((s3-2 (new 'stack-no-clear 'wvehicle-stack-type5))) + (set! (-> s3-2 vec0 quad) (-> this root trans quad)) + (set! (-> s3-2 vec1 x) 0.0) + (set! (-> s3-2 vec1 y) 0.0) + (when (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (dotimes (v1-135 4) + (let ((a0-76 (-> this wheel v1-135))) + (if (logtest? (-> a0-76 flags) 2) + (set! (-> s3-2 vec1 y) (fmax (-> s3-2 vec1 y) (- (-> a0-76 up-vel)))) + ) + ) + ) + ) + (set! (-> s3-2 vec1 x) (fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -409.6 (-> s3-2 vec1 y)))))) + (when (and (< 0.0 (-> s3-2 vec1 x)) + (>= (the-as uint (- (current-time) (the-as int (-> this susp-creak-time)))) (the-as uint 30)) + ) + (set! (-> this susp-creak-time) (the-as uint (current-time))) + (set! (-> s3-2 vec1 x) (cube-root (-> s3-2 vec1 x))) + (sound-play-by-name + (-> s5-0 sound susp-creak-sound) + (new-sound-id) + (the int (* 1024.0 (-> s3-2 vec1 x))) + 0 + 0 + (sound-group) + (-> s3-2 vec0) + ) + ) + (if (< (* 0.5 (-> s5-0 sound susp-speed-threshold)) (-> s3-2 vec1 y)) + (set! (-> this eng-flutter-envelope) 1.0) + ) + (when (< (-> s5-0 sound susp-speed-threshold) (-> s3-2 vec1 y)) + (set! (-> s3-2 vec1 x) + (fmax 0.0 (fmin 1.0 (* 0.000024414063 (- (-> s3-2 vec1 y) (-> s5-0 sound susp-speed-threshold))))) + ) + (set! (-> s3-2 vec1 x) (cube-root (-> s3-2 vec1 x))) + (sound-play-by-name + (-> s5-0 sound susp-bottom-out-sound) + (new-sound-id) + (the int (* 1024.0 (-> s3-2 vec1 x))) + 0 + 0 + (sound-group) + (-> s3-2 vec0) + ) + ) + ) + ) + (when s4-1 + (cond + ((< 0.0 (-> this water-sound-envelope)) + (if (zero? (-> this water-sound-id)) + (set! (-> this water-sound-id) (new-sound-id)) + ) + (let ((s4-2 (new 'stack-no-clear 'matrix))) + (set! (-> s4-2 rvec quad) (-> this root trans quad)) + (set! (-> s4-2 uvec x) (-> this water-sound-envelope)) + (set! (-> s4-2 uvec x) (cube-root (-> s4-2 uvec x))) + (sound-play-by-name + (-> s5-0 sound water-sound) + (-> this water-sound-id) + (the int (* 1024.0 (-> s4-2 uvec x))) + 0 + 0 + (sound-group) + (-> s4-2 rvec) + ) + ) + (seek! (-> this water-sound-envelope) 0.0 (* 2.0 (seconds-per-frame))) + ) + (else + (when (nonzero? (-> this water-sound-id)) + (sound-stop (-> this water-sound-id)) + (set! (-> this water-sound-id) (new 'static 'sound-id)) + 0 + ) + ) + ) + ) + ) + (none) + ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-h.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-h.gc index a2d030f42c..0c9d13c9d0 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-h.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-h.gc @@ -5,5 +5,443 @@ ;; name in dgo: wvehicle-h ;; dgos: LPATK, LFACCAR, WASALL +;; added +(deftype wvehicle-draw-thruster-params (structure) + ((quat quaternion :inline :offset-assert 0) + (trans vector :inline :offset-assert 16) + (mat matrix :inline :offset 48) + (thrust float :offset 32) + (width float :offset 36) + (length float :offset 40) + (fog-fade float :offset 44) + ) + ) + +(deftype wvehicle-stack-type0 (structure) + ((float-arr float 4 :offset 0) + (vec00 vector :inline :offset 96) + (float03326 float :offset 16) + (float0335 float :offset 20) + (float032 float :offset 24) + (float03623423 float :offset 28) + (word00 uint32 :offset 28 :score 1) + (float00 float :offset 80) + (float01 float :offset 96) + (float000 float :offset 116) + (float8 float :offset 120) + (float02 float :offset 124) + (float03 float :offset 128) + (float04 float :offset 132) + (float05 float :offset 136) + (float06 float :offset 140) + (float07 float :offset 144) + ) + ) + +(deftype wvehicle-stack-type1 (structure) + ((vec00 vector :inline :offset 0) + (float00 float :offset 16) + (float01 float :offset 20) + (byte00 int8 :offset 24) + ) + ) + +(deftype wvehicle-stack-type2 (structure) + ((cquery collide-query :inline :offset 0) + (mat0 matrix :inline :offset 544) + (vec0 vector :inline :offset 592) + (vec1 vector :inline :offset 624) + (vec2 vector :inline :offset 640) + (vec3 vector :inline :offset 656) + (float0 float :offset 672) + ) + ) + +(deftype wvehicle-stack-type3 (structure) + ((vec0 vector :inline :offset 0) + (mat0 matrix :inline :offset 16) + (float0 float :offset 80) + ) + ) + +(deftype wvehicle-stack-type4 (structure) + ((byte0 int8 :offset 0) + (float0 float :offset 4) + (float1 float :offset 8) + (float2 float :offset 12) + ) + ) + +;; added +(deftype wvehicle-stack-type5 (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) + ) + ) + +(deftype wvehicle-stack-type6 (structure) + ((mat0 matrix :inline :offset 0) + (quat0 quaternion :inline :offset 64) + (quat1 quaternion :inline :offset 80) + (quat2 quaternion :inline :offset 96) + (quat3 quaternion :inline :offset 112) + (quat4 quaternion :inline :offset 128) + (vec0 vector :inline :offset 144) + (vec1 vector :inline :offset 160) + (vec2 vector :inline :offset 176) + (vec3 vector :inline :offset 192) + (float0 float :offset 240) + ) + ) + +(deftype wvehicle-jmod-work (structure) + ((quat0 quaternion :inline :offset 0) + (quat1 quaternion :inline :offset 16) + (mat0 matrix :inline :offset 32) + (vec0 vector :inline :offset 96) + (float0 float :offset 112) + (float1 float :offset 116) + (float2 float :offset 120) + ) + ) + +;; +++vehicle-wheel-surface-flag +(defenum vehicle-wheel-surface-flag + :type uint8 + :bitfield #t + (moving) + ) +;; ---vehicle-wheel-surface-flag + + +(declare-type wvehicle-part-work structure) +(declare-type wvehicle-wheel-launcher-spec structure) +(declare-type vehicle-wheel-surface structure) +(define-extern *wvehicle-surfaces* (inline-array vehicle-wheel-surface)) + ;; DECOMP BEGINS +(deftype wvehicle-sound-loop-state (structure) + ((id sound-id) + (vol float) + (pitch float) + ) + :allow-misaligned + ) + + +(deftype vehicle-wheel-surface (structure) + ((flags vehicle-wheel-surface-flag) + (surface-type uint8) + (friction float) + (drag float) + (depth float) + (damage float) + (tire-roll-mix float 4) + (tire-roll-hum float :overlay-at (-> tire-roll-mix 0)) + (tire-roll-dirt float :overlay-at (-> tire-roll-mix 1)) + (tire-roll-sand float :overlay-at (-> tire-roll-mix 2)) + (tire-roll-knobby float :overlay-at (-> tire-roll-mix 3)) + (tire-slide-mix float 2) + (tire-slide-road float :overlay-at (-> tire-slide-mix 0)) + (tire-slide-dirt float :overlay-at (-> tire-slide-mix 1)) + ) + ) + + +(deftype vehicle-wheel-state (structure) + ((info vehicle-wheel-info) + (flags uint8) + (prev-flags uint8) + (handle handle) + (probe-local-pos vector :inline) + (probe-local-dir vector :inline) + (local-axis vector :inline) + (surface-pos vector :inline) + (ground-pos vector :inline) + (ground-normal vector :inline) + (trans vector :inline) + (quat quaternion :inline) + (trail-pos vector 2 :inline) + (surface vehicle-wheel-surface) + (pos float) + (pos2 float) + (inertia float) + (steer-angle float) + (angle float) + (rev float) + (x-scale float) + (torque float) + (braking-torque float) + (up-force float) + (drive-diff float) + (side-vel float) + (up-vel float) + (forward-vel float) + (forward-slip-vel float) + (friction-coef float) + (sink-depth float) + (sin-susp-ang float) + (cos-susp-ang float) + (part-birth-accum sparticle-launch-control 4) + (tread-time uint32) + (tread-tracker handle) + ) + ) + + +(deftype wvehicle-probe-work (structure) + ((local-pos vector :inline) + (local-normal vector :inline) + (world-pos vector :inline) + (world-normal vector :inline) + (wheel-axis vector :inline) + (side-dir vector :inline) + (forward-dir vector :inline) + (velocity vector :inline) + (probe-uu float) + ) + ) + + +(deftype wvehicle-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) + (probe-dir vector :inline) + (tmp vector :inline) + (p-body vector :inline) + (axis vector :inline) + (dir vector :inline) + (ground-normal-sum vector :inline) + (ground-pos vector :inline) + (forward-dir vector :inline) + (side-dir vector :inline) + (wheel-axis vector :inline) + (wsphere sphere :inline) + (friction-coef float) + (wheel-radius float) + (side-force float) + (forward-force float) + (max-forward-tire-grip float) + (max-side-tire-grip float) + (inertia-eff float) + (ground-torque float) + (braking-torque float) + (total-torque float) + (limit-braking-torque float) + (max-braking-torque float) + (surface-drag float) + (water-y float) + (cur-time uint32) + (surface-type uint8) + (surface-depth float) + (material uint64) + (probe-work-array wvehicle-probe-work 4 :inline) + (cquery collide-query :inline) + ) + ) + + +(deftype wvehicle (vehicle) + ((race race-control :inline) + (target-status squad-target-status :inline) + (ai-controls vehicle-controls :inline) + (minimap connection-minimap) + (net basic) + (engine-rev float) + (engine-inertia float) + (engine-torque float) + (engine-max-torque float) + (engine-rpm float) + (sound-engine-rpm float) + (wheel-rev float) + (wheel-inertia float) + (wheel-torque float) + (wheel-braking-torque float) + (wheel-ground-torque float) + (clutch-grab float) + (gear-ratio float) + (final-drive-ratio float) + (total-gear-ratio float) + (inv-total-gear-ratio float) + (avg-drive-wheel-radius float) + (drive-wheel-inertia float) + (clutch-inertia float) + (idle-throttle float) + (susp-spring-control float) + (jump-control float) + (ai-min-speed float) + (ai-max-speed float) + (shortcut-speed-factor float) + (path-deviation float) + (turbo-supply float) + (turbo-ready float) + (ai-state uint8) + (return-ai-state uint8) + (i-barrel int8) + (shift-state uint8) + (gear-select int8) + (next-gear-select int8) + (shift-time uint32) + (impact rigid-body-impact :inline) + (wheel vehicle-wheel-state 4 :inline) + (gravity-dir vector :inline) + (ai-target-point vector :inline) + (surface-velocity vector :inline) + (turret-local-pos vector :inline) + (gun-local-pos vector :inline) + (gun-local-dir vector :inline) + (gun-aim-yaw float) + (gun-aim-yaw-vel float) + (gun-targ-yaw float) + (gun-targ-pitch float) + (gun-yaw float) + (gun-pitch float) + (gun-yaw-vel float) + (gun-pitch-vel float) + (gun-kick float) + (lock-turret basic) + (tire-roll-loop-state wvehicle-sound-loop-state 4 :inline) + (tire-slide-loop-state wvehicle-sound-loop-state 2 :inline) + (engine1-sound-id sound-id :offset 2472) + (engine2-sound-id sound-id) + (engine3-sound-id sound-id) + (damage-sound-id sound-id) + (water-sound-id sound-id) + (turbo-sound-id sound-id) + (shortcut-time uint32) + (overturned-time uint32) + (splash-time uint32) + (knobby-time uint32) + (susp-creak-time uint32) + (shoot-time uint32) + (shoot-delay uint32) + (jump-time uint32) + (ground-time uint32) + (ram-time uint32) + (attached-array handle 16) + (eng1-vol float) + (eng2-vol float) + (eng3-vol float) + (eng-pitch-variance float) + (eng-pitch-variance-seek float) + (eng-vol-variance float) + (eng-vol-variance-seek float) + (eng-pitch-offset float) + (eng-flutter-envelope float) + (water-sound-envelope float) + (other-proc handle) + (other-pos vector :inline) + ) + :allow-misaligned + (:state-methods + hostile + undefined0 + race-waiting + race-racing + race-finished + undefined1 + explode-into-nothing + sink + ) + (:methods + (wvehicle-method-160 (_type_ wvehicle-physics-work) none) + (spawn-wheels! (_type_ skeleton-group skeleton-group skeleton-group skeleton-group) none) + (wvehicle-method-162 (_type_ float) none) + (wvehicle-method-163 (_type_) none) + (wvehicle-method-164 (_type_ vehicle-wheel-state vehicle-wheel-info) none) + (wvehicle-method-165 (_type_) none) + (wvehicle-method-166 (_type_ float float) float) + (wvehicle-method-167 (_type_) none) + (wvehicle-method-168 (_type_) none) + (wvehicle-method-169 (_type_) none) + (wvehicle-method-170 (_type_) none) + (wvehicle-method-171 (_type_ vector int) none) + (wvehicle-method-172 (_type_ quaternion int) none) + (wvehicle-method-173 (_type_ vector) int) + (get-attached-by-idx (_type_ int) process-focusable) + (add-attached-at-idx (_type_ int process-focusable) none) + (remove-attached-from-arr (_type_ process-focusable) symbol) + (wvehicle-method-177 (_type_ vehicle-controls) none) + (wvehicle-method-178 (_type_) none) + (wvehicle-method-179 (_type_) none) + (race-select-path-randomly-from-mask (_type_ uint) none) + (wvehicle-method-181 (_type_) none) + (wvehicle-method-182 (_type_) none) + (wvehicle-method-183 (_type_ vehicle-controls) none) + (wvehicle-method-184 (_type_) none) + (wvehicle-method-185 (_type_) none) + (wvehicle-method-186 (_type_) none) + (wvehicle-method-187 (_type_) none) + (wvehicle-method-188 (_type_) none) + (wvehicle-method-189 (_type_ vehicle-wheel-state wvehicle-part-work wvehicle-wheel-launcher-spec) none) + (wvehicle-method-190 (_type_ vehicle-wheel-state wvehicle-part-work) none) + (wvehicle-method-191 (_type_ vehicle-wheel-state wvehicle-part-work) symbol) + (wvehicle-method-192 (_type_ vehicle-wheel-state wvehicle-part-work) none) + (wvehicle-method-193 (_type_ vehicle-wheel-state wvehicle-part-work) none) + (wvehicle-method-194 (_type_ vehicle-wheel-state wvehicle-part-work) none) + (wvehicle-method-195 (_type_) none) + (wvehicle-method-196 (_type_) none) + (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_ float) none) + (wvehicle-method-202 (_type_ float) none) + ) + ) + + +;; WARN: Return type mismatch float vs degrees. +(defun rpm->radians-per-sec ((arg0 float)) + (the-as degrees (* 0.10471976 arg0)) + ) + +(defun radians-per-sec->rpm ((arg0 degrees)) + (* 9.549297 arg0) + ) + +(deftype wvehicle-ai-drop-off-params (structure) + ((dest vector :inline) + (proc process) + ) + ) + + +(defun wvehicle-surface-type-from-material ((arg0 int)) + (let ((v1-0 arg0)) + (cond + ((or (= v1-0 23) (= v1-0 6)) + 0 + ) + ((or (= v1-0 15) (zero? v1-0)) + 1 + ) + ((= v1-0 5) + 2 + ) + ((= v1-0 2) + 3 + ) + ((= v1-0 16) + 6 + ) + (else + 1 + ) + ) + ) + ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-hud.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-hud.gc index f89525ec9f..50c3032a42 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-hud.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-hud.gc @@ -7,3 +7,90 @@ ;; DECOMP BEGINS +(deftype hud-vehicle-turbo (hud) + ((tex-rim texture) + (tex-on texture) + (tex-off texture) + ) + ) + + +(defmethod draw ((this hud-vehicle-turbo)) + (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) (the int (* -100.0 (-> this offset))) 336) + (let* ((f0-5 (the float (the int (-> *game-info* vehicle-turbo-ready)))) + (f0-7 (* 120.0 (fmax 0.33 f0-5))) + (v1-5 (-> *game-info* race-number-turbos)) + ) + (dotimes (a0-2 3) + (let ((a1-3 (-> this sprites a0-2))) + (cond + ((< a0-2 v1-5) + (set! (-> a1-3 tid) (the-as texture-id (-> this tex-on))) + (set! (-> a1-3 color w) (the int f0-7)) + ) + (else + (set! (-> a1-3 tid) (the-as texture-id (-> this tex-off))) + (set! (-> a1-3 color w) (the int (* 0.5 f0-7))) + ) + ) + ) + ) + ) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 32 0) + (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) 32 0) + (dotimes (s5-0 3) + (set-as-offset-from! (-> this sprites (+ s5-0 3)) (the-as vector4w (-> this sprites s5-0)) 0 0) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-vehicle-turbo)) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-vehicle-turbo)) + (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) + ) + (set! (-> this tex-on) + (lookup-level-texture-by-name "hud-turbo-boost-on-01" (-> this level) (the-as (pointer texture-page) #f)) + ) + (set! (-> this tex-off) + (lookup-level-texture-by-name "hud-turbo-boost-off-01" (-> this level) (the-as (pointer texture-page) #f)) + ) + (set! (-> this tex-rim) + (lookup-level-texture-by-name "hud-turbo-boost-rim-01" (-> this level) (the-as (pointer texture-page) #f)) + ) + (logior! (-> this flags) (hud-flags show)) + (dotimes (v1-4 6) + (let ((a0-8 (-> this sprites v1-4))) + (set! (-> a0-8 scale-x) 1.0) + (set! (-> a0-8 scale-y) 1.0) + ) + ) + (dotimes (v1-7 3) + (let ((a0-13 (-> this sprites (+ v1-7 3)))) + (set! (-> a0-13 tid) (the-as texture-id (-> this tex-rim))) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch process vs hud-vehicle-turbo. +(defun hud-vehicle-turbo-spawn ((arg0 process)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn hud-vehicle-turbo :init hud-init-by-other :name "hud-vehicle-turbo" :to arg0))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as hud-vehicle-turbo gp-0) + ) + ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-obs.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-obs.gc index e14ba522a9..61b491a9cb 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-obs.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-obs.gc @@ -7,3 +7,461 @@ ;; DECOMP BEGINS +(defpartgroup group-turbo-pickup + :id 231 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 998 :flags (sp6 sp7)) + (sp-item 999 :flags (sp6 sp7)) + (sp-item 1000 :flags (sp6 sp7)) + (sp-item 1001 :flags (sp7)) + (sp-item 1002 :flags (sp3) :binding 994) + (sp-item 994 :flags (sp2 sp3) :binding 995) + (sp-item 1002 :flags (sp3) :binding 996) + (sp-item 996 :flags (sp2 sp3) :binding 995) + (sp-item 1002 :flags (sp3) :binding 997) + (sp-item 997 :flags (sp2 sp3) :binding 995) + (sp-item 995 :flags (sp2)) + (sp-item 995 :flags (sp2)) + (sp-item 995 :flags (sp2)) + ) + ) + +(defpart 998 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 100.0) + (:b 0.0) + (:a 200.0 2.0) + (:omega (degrees 18011.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 409.6) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 999 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 30.0) + (:omega (degrees 18011.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 409.6) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 1000 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 20.0 1.0) + (:omega (degrees 18011.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 409.6) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 1002 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 994 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters 2)) + (:z (meters 2)) + (:scale-x (meters 0.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 0)) + (:vel-x (meters 0.10666667)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 996 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters -2)) + (:z (meters 2)) + (:scale-x (meters 0.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 45)) + (:vel-x (meters -0.10666667)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 997 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:z (meters 2)) + (:scale-x (meters 0.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 90)) + (:vel-x (meters 0.10666667)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 995 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:fade-r 6.4) + (:fade-g -6.4) + (:fade-b -6.4) + (:fade-a -2.56) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpart 1001 + :init-specs ((:texture (light-burst level-default-sprite)) + (:num 0.06 0.06) + (:scale-x (meters 2) (meters 4)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.3) (meters 0.3)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters 0) (meters 0.0033333334)) + (:scalevel-y (meters -0.001) (meters 0.002)) + (:fade-a 0.42666668) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 1)) + (:next-launcher 1003) + ) + ) + +(defpart 1003 + :init-specs ((:scalevel-y (meters -0.0013333333) (meters 0.002)) (:fade-a -0.42666668)) + ) + +(defpartgroup group-turbo-pickup-explode + :id 232 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 1006 :period (seconds 20) :length (seconds 0.3)) + (sp-item 1007 :flags (sp3) :binding 1004) + (sp-item 1004 :flags (sp2) :period (seconds 20) :length (seconds 0.335) :binding 1005) + (sp-item 1004 :flags (sp2) :period (seconds 20) :length (seconds 0.335) :binding 1005) + (sp-item 1004 :flags (sp2) :period (seconds 20) :length (seconds 0.335) :binding 1005) + (sp-item 1004 :flags (sp2) :period (seconds 20) :length (seconds 0.335) :binding 1005) + (sp-item 1004 :flags (sp2) :period (seconds 20) :length (seconds 0.335) :binding 1005) + (sp-item 1005 :flags (sp2)) + (sp-item 1005 :flags (sp2)) + (sp-item 1005 :flags (sp2)) + (sp-item 1005 :flags (sp2)) + (sp-item 1005 :flags (sp2)) + ) + ) + +(defpart 1006 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 0.5) + (:scale-x (meters 20)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0 32.0) + (:b :copy g) + (:a 128.0) + (:scalevel-x (meters -0.16666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + ) + ) + +(defpart 1007 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.001)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 64.0) + (:a 128.0) + (:timer (seconds -0.005)) + (:func 'sparticle-track-root) + ) + ) + +(defpart 1004 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 4.0) + (:y (meters -4) (meters 16)) + (:scale-x (meters 1.3)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 0.0) + (:a 255.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.017777778) 1 (meters 0.035555556)) + (:vel-z (meters 0.16666667)) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:accel-z (meters -0.011333333)) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 ready-to-launch)) + ) + ) + +(defpart 1005 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters -0.05)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 0.0) + (:a 128.0) + (:scalevel-x (meters -0.002)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334 -0.13333334) + (:accel-y (meters -0.00066666666)) + (:friction 0.6 0.3) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + ) + ) + +(deftype turbo-pickup (process-drawable) + ((root collide-shape :override) + (available symbol) + (persistent symbol) + (birth-time time-frame) + (collector handle) + ) + (:state-methods + idle + die + ) + (:methods + (find-ground (_type_) symbol) + ) + ) + + +(defmethod find-ground ((this turbo-pickup)) + (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)) + (vector-reset! (-> gp-0 vec1)) + (set! (-> gp-0 vec1 y) 1.0) + (set-vector! (-> gp-0 cquery move-dist) 0.0 -40960.0 0.0 1.0) + (let ((v1-5 (-> gp-0 cquery))) + (set! (-> v1-5 radius) 1024.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)) + ) + (let ((f0-6 (fill-and-probe-using-line-sphere *collide-cache* (-> gp-0 cquery)))) + (when (>= f0-6 0.0) + (vector+float*! (-> gp-0 vec0) (-> gp-0 cquery start-pos) (-> gp-0 cquery move-dist) f0-6) + (set! (-> gp-0 vec1 quad) (-> gp-0 cquery best-other-tri normal quad)) + (+! (-> gp-0 vec0 y) 4915.2) + (set! s4-0 #t) + (format #t "turbo-pickup::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 + ) + ) + +(defstate idle (turbo-pickup) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (when (-> self available) + (set! (-> self collector) (process->handle proc)) + (when (send-event proc 'turbo-pickup) + (set! (-> self available) #f) + (go-virtual die) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (spawn (-> self part) (-> self root trans)) + (if (and (not (-> self persistent)) (time-elapsed? (-> self birth-time) (seconds 10))) + (go-virtual die) + ) + 0 + ) + ) + +(defstate die (turbo-pickup) + :virtual #t + :code (behavior () + (set-time! (-> self state-time)) + (let* ((s5-0 (handle->process (-> self collector))) + (gp-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when gp-0 + (if (logtest? (-> *part-group-id-table* 232 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 232) + :target (the-as process-drawable gp-0) + :mat-joint (the-as object 0) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 232) + :target (the-as process-drawable gp-0) + :mat-joint (the-as object 0) + ) + ) + ) + ) + (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 + (when (nonzero? (-> self part)) + (kill-particles (-> self part)) + (set! (-> self part) (the-as sparticle-launch-control 0)) + 0 + ) + (until (time-elapsed? (-> self state-time) (seconds 2)) + (suspend) + ) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior turbo-pickup-init-by-other turbo-pickup ((arg0 vector) (arg1 symbol)) + (let ((s4-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrate-using) (the-as penetrate -1)) + (set! (-> s4-0 penetrated-by) (the-as penetrate -1)) + (let ((v1-4 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-4 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-4 prim-core collide-with) (collide-spec vehicle-sphere hit-by-others-list)) + (set-vector! (-> v1-4 local-sphere) 0.0 0.0 0.0 14336.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! (-> s4-0 event-self) 'touched) + (set! (-> self root) s4-0) + ) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-identity! (-> self root quat)) + (update-transforms (-> self root)) + (set! (-> self available) #t) + (set! (-> self persistent) arg1) + (set-time! (-> self birth-time)) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 231) self)) + (set! (-> self collector) (the-as handle #f)) + (go-virtual idle) + (none) + ) + +;; WARN: Return type mismatch process vs turbo-pickup. +(defun race-turbo-pickup-spawn ((arg0 process) (arg1 vector)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn turbo-pickup arg1 #t :name "turbo-pickup" :to arg0))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as turbo-pickup gp-0) + ) + ) + +;; WARN: Return type mismatch process vs turbo-pickup. +(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 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as turbo-pickup gp-0) + ) + ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-part.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-part.gc index c693e98527..5feff8cf50 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-part.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-part.gc @@ -5,5 +5,1233 @@ ;; name in dgo: wvehicle-part ;; dgos: LPATK, LFACCAR, WASALL +(define-extern *range-wv-wsplash-color* curve-color-fast) +(define-extern *range-wv-wsplash-alpha* curve2d-fast) +(define-extern *range-wv-wsplash-scale-x* curve2d-fast) +(define-extern *range-wv-wsplash-scale-y* curve2d-fast) +(define-extern *curve-wv-wsplash-alpha* curve2d-fast) +(define-extern *curve-wv-wsplash-scale-x* curve2d-fast) +(define-extern *curve-wv-wsplash-scale-y* curve2d-fast) +(define-extern *range-wv-splash-color* curve-color-fast) +(define-extern *range-wv-splash-alpha* curve2d-fast) +(define-extern *range-wv-splash-scale-x* curve2d-fast) +(define-extern *range-wv-splash-scale-y* curve2d-fast) +(define-extern *curve-wv-splash-alpha* curve2d-fast) +(define-extern *curve-wv-splash-scale-x* curve2d-fast) +(define-extern *curve-wv-splash-scale-y* curve2d-fast) +(define-extern *curve-toad-linear-up-red* curve2d-piecewise) +(define-extern *trail-color-curve-toad-grenade* curve-color-fast) +(define-extern *curve-grenade-linear-toad-trail* curve2d-fast) +(define-extern *toad-grenade-trail* light-trail-composition) + ;; DECOMP BEGINS +(def-mips2c sparticle-motion-blur-dirt (function sparticle-system sparticle-cpuinfo vector none)) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-buggy-rocks ((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 953 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-buggy-rocks) + (:num 1.0) + (:x (meters 0) (meters 0.2)) + (:scale-x (meters 0.1) (meters 0.2)) + (: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.01)) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:accel-y (meters -0.001)) + (:timer (seconds 1.5)) + (: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 'sparticle-texture-animate) + (:conerot-x (degrees -5) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-buggy-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-buggy-rocks arg0 arg1 arg2) + (none) + ) + +(defpart 954 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-dbuggy-debris) + (:num 1.0) + (:x (meters -1) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 1)) + (:r 200.0) + (:g 200.0) + (:b 200.0) + (:a 128.0) + (:vel-y (meters 0.033333335)) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:accel-y (meters -0.0016666667) (meters -0.00066666666)) + (:friction 0.96) + (:timer (seconds 1)) + (: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 -5) (degrees 10)) + (:rotate-y (degrees 0)) + ) + ) + +(defun spt-birth-func-part-dbuggy-debris ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (birth-func-set-vel-2d arg0 arg1 arg2) + (spt-birth-func-brightness-buggy-rocks arg0 arg1 arg2) + (none) + ) + +(defpart 955 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-set-vel) + (:num 1.0) + (:x (meters -1) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:vel-y (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.0016666667) (meters -0.00066666666)) + (:friction 0.96) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-z (degrees -5) (degrees 10)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 956 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.05) + (:scale-x (meters 0.5)) + (:scale-y (meters 0.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 16.0) + (:scalevel-x (meters 0.008333334) (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.07111111 -0.07111111) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-part-wv-water-splash + :id 226 + :duration (seconds 5) + :flags (sp0) + :bounds (static-bspherem 0 -12 0 14) + :parts ((sp-item 957 :fade-after (meters 60) :flags (sp7) :period (seconds 10) :length (seconds 0.2)) + (sp-item 958 :fade-after (meters 60) :flags (sp7) :period (seconds 10) :length (seconds 0.067) :offset 125) + (sp-item 959 :fade-after (meters 60) :flags (is-3d sp7) :period (seconds 10) :length (seconds 0.067)) + (sp-item 960 :fade-after (meters 60) :flags (is-3d sp7) :period (seconds 10) :length (seconds 0.167) :offset 125) + ) + ) + +(defpart 957 + :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.016666668)) + (: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-wv-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-wv-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-wv-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 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-wv-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 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-wv-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-wv-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-wv-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-wv-water-splash-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.95) :lifetime-offset (seconds 0.1)) + ) + +(set! (-> *part-id-table* 957 init-specs 13 initial-valuef) + (the-as float *part-wv-water-splash-curve-settings*) + ) + +(set! (-> *part-wv-water-splash-curve-settings* color-start) *range-wv-wsplash-color*) + +(set! (-> *part-wv-water-splash-curve-settings* alpha-start) *range-wv-wsplash-alpha*) + +(set! (-> *part-wv-water-splash-curve-settings* scale-x-start) *range-wv-wsplash-scale-x*) + +(set! (-> *part-wv-water-splash-curve-settings* scale-y-start) *range-wv-wsplash-scale-y*) + +(set! (-> *part-wv-water-splash-curve-settings* r-scalar) #f) + +(set! (-> *part-wv-water-splash-curve-settings* g-scalar) #f) + +(set! (-> *part-wv-water-splash-curve-settings* b-scalar) #f) + +(set! (-> *part-wv-water-splash-curve-settings* a-scalar) *curve-wv-wsplash-alpha*) + +(set! (-> *part-wv-water-splash-curve-settings* scale-x-scalar) *curve-wv-wsplash-scale-x*) + +(set! (-> *part-wv-water-splash-curve-settings* scale-y-scalar) *curve-wv-wsplash-scale-y*) + +(defpart 958 + :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-wv-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-wv-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-wv-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 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 4.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-wv-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 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-wv-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-wv-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-wv-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-wv-water-splash-center-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.8) :lifetime-offset (seconds 0.4)) + ) + +(set! (-> *part-id-table* 958 init-specs 11 initial-valuef) + (the-as float *part-wv-water-splash-center-curve-settings*) + ) + +(set! (-> *part-wv-water-splash-center-curve-settings* color-start) *range-wv-splash-color*) + +(set! (-> *part-wv-water-splash-center-curve-settings* alpha-start) *range-wv-splash-alpha*) + +(set! (-> *part-wv-water-splash-center-curve-settings* scale-x-start) *range-wv-splash-scale-x*) + +(set! (-> *part-wv-water-splash-center-curve-settings* scale-y-start) *range-wv-splash-scale-y*) + +(set! (-> *part-wv-water-splash-center-curve-settings* r-scalar) #f) + +(set! (-> *part-wv-water-splash-center-curve-settings* g-scalar) #f) + +(set! (-> *part-wv-water-splash-center-curve-settings* b-scalar) #f) + +(set! (-> *part-wv-water-splash-center-curve-settings* a-scalar) *curve-wv-splash-alpha*) + +(set! (-> *part-wv-water-splash-center-curve-settings* scale-x-scalar) *curve-wv-splash-scale-x*) + +(set! (-> *part-wv-water-splash-center-curve-settings* scale-y-scalar) *curve-wv-splash-scale-y*) + +(defpart 959 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.4) + (:scale-x (meters 2) (meters 0.5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 2) (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 set-conerot)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 960 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.2) + (:scale-x (meters 0) (meters 0.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.00033333333) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (: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)) + ) + ) + +(defpart 961 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 5.0) + (:x (meters 0) (meters 1)) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-z (degrees 0) (degrees 3600)) + (: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)) + (: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 2)) + (:flags (sp-cpuinfo-flag-3 set-conerot)) + (:conerot-x (degrees -40) (degrees 80)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 962 + :init-specs ((:texture (ripples level-default-sprite)) + (: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 set-conerot)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 963 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 2.0 2.0) + (: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.026666667) (meters 0.026666667)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 set-conerot)) + (:func 'check-water-level-drop) + (:conerot-x (degrees -2) (degrees 4)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 964 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-set-vel) + (:num 0.4) + (:scale-x (meters 2)) + (:rot-z (degrees 0) (degrees 3598.0002)) + (:scale-y (meters 2)) + (:r 150.0) + (:g 120.0) + (:b 90.0) + (:a 20.0) + (:vel-y (meters 0) (meters 0.013333334)) + (:scalevel-x (meters 0.016666668)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.07111111 -0.07111111) + (:accel-y (meters 0) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:next-time (seconds 1)) + (:next-launcher 965) + (:launchrot-x (degrees -90)) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-x (degrees 30)) + (:rotate-z (degrees -20) (degrees 40)) + ) + ) + +(defpart 965 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +(defpartgroup group-gun-scorp-shells + :id 227 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 966 :flags (sp7)) (sp-item 967 :flags (sp7))) + ) + +(defpart 966 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 5.0) + (:y (meters 0.25)) + (:scale-x (meters 0.2) (meters 0.1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0 128.0) + (:a 32.0 16.0) + (:omega (degrees 0)) + (:vel-y (meters 0.053333335) (meters 0.026666667)) + (:scalevel-x (meters 0.01) (meters 0.006666667)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.4 -0.4) + (:friction 0.85 0.04) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:conerot-x (degrees -45) (degrees 10)) + (:conerot-y (degrees 85) (degrees 10)) + (:rotate-y (degrees 0)) + (:conerot-radius (meters 0) (meters 0.4)) + ) + ) + +(defpart 967 + :init-specs ((:texture (shell-casing-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:y (meters 0.25)) + (:scale-x (meters 0.35)) + (:rot-z (degrees 260) (degrees 20)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 20.0) + (:a 128.0) + (:omega (degrees 0)) + (:vel-y (meters 0.06666667) (meters 0.026666667)) + (:rotvel-z (degrees -4.8) (degrees 2.4)) + (:accel-y (meters -0.008333334) (meters -0.0016666667)) + (:timer (seconds 1.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 30 0 0 #x408700 #x408700 #x408700 #x408800)) + (:func 'check-scorp-shell-level1) + (:next-time (seconds 0.017) (seconds 0.53)) + (:next-launcher 968) + (:conerot-x (degrees -40) (degrees 20)) + (:conerot-y (degrees 80) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 968 + :init-specs ((:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:next-time (seconds 0.017) (seconds 0.015)) + (:next-launcher 969) + ) + ) + +(defpart 969 + :init-specs ((:r 128.0) (:g 128.0) (:b 20.0) (:a 128.0)) + ) + +(defpart 970 + :init-specs ((:texture (shell-casing-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:scale-x (meters 0.35)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 20.0) + (:a 128.0) + (:omega (degrees 0)) + (:vel-y (meters 0.026666667) (meters 0.016666668)) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:accel-y (meters -0.0026666666) (meters -0.00083333335)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 30 0 0 #x408700 #x408800 #x408900)) + (:func 'check-scorp-shell-level2) + (:next-time (seconds 0.017) (seconds 0.53)) + (:next-launcher 968) + (:conerot-x (degrees 0) (degrees 45)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 971 + :init-specs ((:texture (shell-casing-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:scale-x (meters 0.35)) + (:rot-z (degrees 30) (degrees 120)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 20.0) + (:a 128.0) + (:vel-x (meters 0) (meters 0.0033333334)) + (:vel-y (meters 0.016666668)) + (:vel-z (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:accel-y (meters -0.0016666667)) + (:friction 0.9) + (:timer (seconds 40)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 30 0 0 #x408800 #x408800 #x408900)) + (:next-time (seconds 0.25)) + (:next-launcher 972) + (:conerot-x (degrees 30) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 972 + :init-specs ((:vel-x (meters 0)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:rotvel-z (degrees 0)) + (:accel-y (meters 0)) + (:next-time (seconds 2) (seconds 0.997)) + (:next-launcher 973) + ) + ) + +(defpart 973 + :init-specs ((:fade-a -0.512)) + ) + +(defpart 974 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 0.0 1 2.0) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.03) (meters 0.005)) + (:r 255.0) + (:g 128.0 128.0) + (:b 0.0 128.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.0045)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-g -2.55 -2.55) + (:fade-b -8.0) + (:fade-a -0.64 -0.64) + (:accel-y (meters -0.00033333333) (meters -0.00033333333)) + (:friction 0.8 0.02) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 60) (degrees 20)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +(defun check-scorp-shell-level1 ((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) + (set! (-> *part-id-table* 970 init-specs 10 initial-valuef) (-> gp-0 y)) + (launch-particles (-> *part-id-table* 970) gp-0) + (launch-particles (-> *part-id-table* 974) gp-0) + ) + ) + 0 + (none) + ) + +(defun check-scorp-shell-level2 ((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) + (launch-particles (-> *part-id-table* 971) gp-0) + (launch-particles (-> *part-id-table* 974) gp-0) + ) + ) + 0 + (none) + ) + +(defpart 975 + :init-specs ((:texture (gun-blue-beam level-default-sprite)) + (:birth-func 'birth-func-setup-beam) + (:num 1.0) + (:scale-x (meters 0.3) (meters 0.1)) + (:scale-y (meters 100) (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0) + (:fade-a 0.8) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 30 0 0 #x401000 #x401200)) + (:func 'sparticle-texture-animate) + (:next-time (seconds 0.05)) + (:next-launcher 976) + ) + ) + +(defpart 976 + :init-specs ((:scalevel-x (meters 0.033333335)) + (:scalevel-y (meters -0.13333334)) + (:fade-r 0.85333335) + (:fade-g 0.85333335) + (:fade-b 0.85333335) + (:fade-a -0.21333334 -0.42666668) + (:accel-y (meters 0.000033333334)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.5)) + (:next-launcher 977) + ) + ) + +(defpart 977 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0)) + ) + +(defpart 978 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2) (meters 5)) + (:scale-y (meters 10) (meters 0.6)) + (:r 128.0) + (:g 110.0) + (:b 64.0) + (:a 128.0) + (:scalevel-x (meters 0.08)) + (:fade-r -3.2) + (:fade-g -3.2) + (:fade-b -6.4) + (:fade-a -6.4) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpart 979 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2) (meters 5)) + (:scale-y (meters 10) (meters 0.6)) + (:r 128.0) + (:g 110.0) + (:b 64.0) + (:a 128.0) + (:scalevel-x (meters 0.08)) + (:fade-r -3.2) + (:fade-g -3.2) + (:fade-b -6.4) + (:fade-a -6.4) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpart 980 + :init-specs ((:texture (gun-enemy-beam level-default-sprite)) + (:birth-func 'birth-func-setup-beam) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.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 981 + :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 0.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)) + ) + ) + +(defpart 982 + :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 0.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)) + ) + ) + +(when (or (zero? *curve-toad-linear-up-red*) (!= loading-level global)) + (set! *curve-toad-linear-up-red* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *curve-toad-linear-up-red* 2 'loading-level (the-as int #f)) + ) + +(set! (-> *curve-toad-linear-up-red* pts data 0 first) 0.0) + +(set! (-> *curve-toad-linear-up-red* pts data 0 second) 0.3) + +(set! (-> *curve-toad-linear-up-red* pts data 1 first) 1.0) + +(set! (-> *curve-toad-linear-up-red* pts data 1 second) 1.0) + +(if #t + (set! *trail-color-curve-toad-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.3 :w 128.0) + (new 'static 'vector :x 1.0 :w 128.0) + (new 'static 'vector :x 1.0 :w 128.0) + (new 'static 'vector :x 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-toad-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? *toad-grenade-trail*) (!= loading-level global)) + (set! *toad-grenade-trail* (new 'loading-level 'light-trail-composition)) + ) + +(set! (-> *toad-grenade-trail* color-mode) (the-as uint 0)) + +(set! (-> *toad-grenade-trail* color-repeat-dist) 40960.0) + +(set! (-> *toad-grenade-trail* alpha-1-mode) (the-as uint 0)) + +(set! (-> *toad-grenade-trail* alpha-2-mode) (the-as uint 1)) + +(set! (-> *toad-grenade-trail* base-alpha) 0.5) + +(set! (-> *toad-grenade-trail* alpha-repeat-dist) 6144.0) + +(set! (-> *toad-grenade-trail* width-mode) (the-as uint 2)) + +(set! (-> *toad-grenade-trail* base-width) 2048.0) + +(set! (-> *toad-grenade-trail* width-repeat-dist) 40960.0) + +(set! (-> *toad-grenade-trail* uv-mode) (the-as uint 0)) + +(set! (-> *toad-grenade-trail* uv-repeat-dist) 16384000.0) + +(set! (-> *toad-grenade-trail* lie-mode) (the-as uint 0)) + +(set! (-> *toad-grenade-trail* max-age) (seconds 0.5)) + +(if #f + (set! (-> *toad-grenade-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *toad-grenade-trail* tex-id) (the-as uint #x100300)) + ) + +(set! (-> *toad-grenade-trail* width-curve) (the-as curve2d-piecewise *curve-grenade-linear-toad-trail*)) + +(set! (-> *toad-grenade-trail* color-curve) (the-as curve-color-piecewise *trail-color-curve-toad-grenade*)) + +(set! (-> *toad-grenade-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +(set! (-> *toad-grenade-trail* alpha-curve-2) *curve-toad-linear-up-red*) + +(set! (-> *toad-grenade-trail* zbuffer?) #f) + +(set! (-> *toad-grenade-trail* lie-vector quad) (-> *up-vector* quad)) + +(set! (-> *toad-grenade-trail* use-tape-mode?) #f) + +(set! (-> *toad-grenade-trail* blend-mode) (the-as uint 1)) + +(set! (-> *toad-grenade-trail* frame-stagger) (the-as uint 1)) + +(defpart 983 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 5.0) + (:y (meters 0.25)) + (:scale-x (meters 18) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 16.0) + (:omega (degrees 0)) + (:vel-y (meters 0.053333335) (meters 0.026666667)) + (:scalevel-x (meters 0.01) (meters 0.006666667)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.2 -0.2) + (:friction 0.85 0.04) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:conerot-x (degrees -45) (degrees 10)) + (:conerot-y (degrees 85) (degrees 10)) + (:rotate-y (degrees 0)) + (:conerot-radius (meters 0) (meters 0.4)) + ) + ) + +(defpartgroup group-gun-scorp-shot-hit + :id 228 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 984 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 985 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 2) :length (seconds 0.017)) + (sp-item 986 :fade-after (meters 120) :falloff-to (meters 140) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +(defpart 986 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 1.5)) + (:rot-x 4) + (:scale-y (meters 0.05) (meters 0.05)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 64.0) + (:omega (degrees 0.0675)) + (:vel-z (meters 0.06666667) (meters 0.33333334)) + (:fade-r -0.053333335) + (:fade-g -2.55) + (:fade-b -5.1) + (:fade-a -0.42666668 -0.42666668) + (:accel-y (meters -0.0013333333) (meters -0.001)) + (:friction 0.875) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 80) (degrees 40)) + (:conerot-y (degrees 80) (degrees 40)) + (:conerot-z (degrees 80) (degrees 40)) + (:conerot-radius (meters 0) (meters 0.2)) + ) + ) + +(defpart 985 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.5) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 100.0) + (:b 80.0) + (:a 32.0 32.0) + (:vel-z (meters 0) (meters 0.016666668)) + (:scalevel-x (meters 0.0013333333) (meters 0.0033333334)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 90) (degrees 20)) + (:conerot-y (degrees 90) (degrees 20)) + (:conerot-z (degrees 90) (degrees 20)) + (:conerot-radius (meters 0) (meters 0.2)) + ) + ) + +(defpart 984 + :init-specs ((:texture (hitspark level-default-sprite)) + (:num 1.0) + (: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)) + (:scale-y :copy scale-x) + (:r 230.0 25.0) + (:g 230.0 25.0) + (:b 230.0 25.0) + (:a 128.0) + (:fade-a -5.12) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:next-time (seconds 0.035)) + (:next-launcher 987) + ) + ) + +(defpart 987 + :init-specs ((:scalevel-x (meters 0.12) (meters 0.12)) (:scalevel-y :copy scalevel-x)) + ) + +(defpartgroup group-gun-scorp-shot-die + :id 229 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 249)) + ) + +(defpartgroup group-toad-grenade-shot-explode + :id 230 + :duration (seconds 5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 988 :flags (sp3)) + (sp-item 989 :flags (sp3)) + (sp-item 990 :flags (sp3)) + (sp-item 991 :period (seconds 30) :length (seconds 0.167)) + (sp-item 992 :flags (sp3)) + ) + ) + +(defpart 988 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0.6666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 989 + :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 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 990 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 50)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 40.0) + (:a 255.0) + (:omega (degrees 6767.9995)) + (:scalevel-x (meters -0.6666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 991 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:birth-func 'birth-func-flip-based-on-scale) + (:num 10.0) + (:scale-x (meters -4) 2.0 (meters 8)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 200.0 20.0) + (:b 130.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.6666667)) + (:scalevel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.26666668) + (:fade-b -0.1) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.8) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 992 + :init-specs ((:texture (water-radiate level-default-sprite)) + (:birth-func 'birth-func-flip-based-on-scale) + (:num 100.0) + (:x (meters 0) (meters 0.1)) + (:scale-x (meters -4) 2.0 (meters 8)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 255.0) + (:vel-y (meters 0.6666667) (meters 0.033333335)) + (:scalevel-x (meters 0.033333335)) + (:fade-g -1.7) + (:fade-b -1.7) + (:fade-a -0.85) + (:friction 0.83) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'sparticle-2d-spline-align-instant) + (:next-time (seconds 0.25)) + (:next-launcher 993) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 993 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.33333334) + (:fade-b -0.6666667) + (:friction 0.99) + ) + ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-physics.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-physics.gc index 079f8f4be2..411929b3fb 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-physics.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-physics.gc @@ -7,3 +7,625 @@ ;; 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) + ) + ) + ) + +(defmethod wvehicle-method-160 ((this wvehicle) (arg0 wvehicle-physics-work)) + (let ((v1-0 (-> this rbody))) + (mem-copy! (the-as pointer (-> arg0 mat)) (the-as pointer (-> v1-0 matrix)) 64) + ) + (logior! (-> this v-flags) (vehicle-flag in-air)) + (logclear! (-> this v-flags) (vehicle-flag on-ground on-flight-level)) + (vector-reset! (-> arg0 ground-normal-sum)) + (let ((v1-6 (-> arg0 cquery))) + (set! (-> v1-6 radius) 1.0) + (set! (-> v1-6 collide-with) (collide-spec + backgnd + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + player-list + collectable + blocking-plane + pusher + vehicle-mesh-probeable + shield + ) + ) + (set! (-> v1-6 ignore-process0) #f) + (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)) + ) + (countdown (s4-0 (-> this info physics-model wheel-count)) + (let* ((s3-0 (-> this wheel s4-0)) + (s1-0 (-> s3-0 info)) + (s2-0 (-> arg0 probe-work-array s4-0)) + ) + (vector-matrix*! (-> arg0 world-pos) (-> s3-0 probe-local-pos) (-> arg0 mat)) + (vector-rotate*! (-> arg0 probe-dir) (-> s3-0 probe-local-dir) (-> arg0 mat)) + (vector-rotate*! (-> s2-0 wheel-axis) (-> s3-0 local-axis) (-> arg0 mat)) + (vector-float*! (-> arg0 cquery move-dist) (-> arg0 probe-dir) (-> s1-0 travel)) + (set! (-> arg0 cquery radius) (-> s1-0 probe-radius)) + (vector-reset! (-> s3-0 ground-normal)) + (vector+float*! + (-> arg0 cquery start-pos) + (-> arg0 world-pos) + (-> arg0 probe-dir) + (- (-> arg0 cquery radius)) + ) + (logand! (-> s3-0 flags) -7) + (set! (-> s3-0 sink-depth) 0.0) + (set! (-> arg0 surface-depth) 0.0) + (set! (-> s2-0 probe-uu) (probe-using-line-sphere *collide-cache* (-> arg0 cquery))) + (cond + ((>= (-> s2-0 probe-uu) 0.0) + (set! (-> arg0 material) (the-as uint (-> arg0 cquery best-other-tri pat material))) + (let ((v1-26 (-> arg0 material))) + (set! (-> arg0 surface-type) (the-as uint (cond + ((or (= v1-26 23) (= v1-26 6)) + 0 + ) + ((or (= v1-26 15) (zero? v1-26)) + 1 + ) + ((= v1-26 5) + 2 + ) + ((= v1-26 2) + 3 + ) + ((= v1-26 16) + 6 + ) + (else + 1 + ) + ) + ) + ) + ) + (if (or (= (-> arg0 cquery best-other-tri pat mode) (pat-mode wall)) + (= (-> arg0 cquery best-other-tri pat event) (pat-event slippery)) + ) + (set! (-> arg0 surface-type) (the-as uint 5)) + ) + (set! (-> s3-0 surface) (-> *wvehicle-surfaces* (-> arg0 surface-type))) + (logclear! (-> this v-flags) (vehicle-flag in-air)) + (logior! (-> this v-flags) (vehicle-flag on-ground)) + (logior! (-> s3-0 flags) 2) + (set! (-> arg0 surface-depth) (-> s3-0 surface depth)) + (vector+float*! (-> arg0 tmp) (-> arg0 cquery start-pos) (-> arg0 cquery move-dist) (-> s2-0 probe-uu)) + (vector-! (-> s3-0 ground-normal) (-> arg0 tmp) (-> arg0 cquery best-other-tri intersect)) + (vector-normalize! (-> s3-0 ground-normal) 1.0) + (vector+! (-> arg0 ground-normal-sum) (-> arg0 ground-normal-sum) (-> s3-0 ground-normal)) + 0 + ) + (else + (set! (-> s2-0 probe-uu) 1.0) + (set! (-> s3-0 surface) #f) + ) + ) + (vector+float*! + (-> s3-0 surface-pos) + (-> arg0 world-pos) + (-> arg0 probe-dir) + (* (-> s1-0 travel) (-> s2-0 probe-uu)) + ) + (+! (-> s2-0 probe-uu) (/ (-> arg0 surface-depth) (-> s1-0 travel))) + (set! (-> s2-0 probe-uu) (fmax 0.0 (fmin 1.0 (-> s2-0 probe-uu)))) + (vector+float*! (-> s3-0 ground-pos) (-> s3-0 surface-pos) (-> arg0 probe-dir) (-> arg0 surface-depth)) + (set! (-> s3-0 sink-depth) (fmax 0.0 (- (-> this water-height) (-> s3-0 ground-pos y)))) + (set! (-> s3-0 pos) (-> s2-0 probe-uu)) + ) + 0 + ) + 0 + (none) + ) + +(defmethod vehicle-method-97 ((this wvehicle) (arg0 float) (arg1 vehicle-physics-work)) + (local-vars (sv-16 rigid-body-control)) + (set! sv-16 (-> this rbody)) + (dotimes (s3-0 (-> this info physics-model wheel-count)) + (let* ((s2-0 (-> this wheel s3-0)) + (s1-0 (-> s2-0 info)) + (f30-0 + (fmax + 0.0 + (- 1.0 (-> (the-as wvehicle-physics-work (+ (the-as uint arg1) (* 144 s3-0))) probe-work-array 0 probe-uu)) + ) + ) + ) + (if (>= (-> this info handling cos-ground-effect-angle) (vector-dot (-> s2-0 ground-normal) (-> arg1 mat uvec))) + (set! f30-0 0.0) + ) + (set! (-> s2-0 up-force) 0.0) + (when (< 0.0 f30-0) + (rigid-body-control-method-23 sv-16 (-> s2-0 ground-pos) (-> arg1 velocity)) + (let* ((f0-4 0.0) + (f1-9 (* 2.0 + (-> this info info mass) + (-> this info extra gravity) + f30-0 + (-> this susp-spring-control) + (-> s1-0 suspension-spring) + ) + ) + (f2-5 0.25) + (f3-0 arg0) + (f0-5 (fmax f0-4 (+ f1-9 (* f2-5 + (/ 1.0 f3-0) + (-> this info info mass) + (-> s1-0 suspension-damping) + (fmax 0.0 (- (vector-dot (-> arg1 velocity) (-> s2-0 ground-normal)))) + ) + ) + ) + ) + ) + (set! (-> s2-0 up-force) f0-5) + (vector-float*! (-> arg1 force) (-> s2-0 ground-normal) f0-5) + ) + (apply-impact! sv-16 (-> s2-0 ground-pos) (-> arg1 force)) + ) + ) + ) + (dotimes (s3-1 (-> this info physics-model wheel-count)) + (let* ((s2-1 (-> this wheel s3-1)) + (s1-1 (-> s2-1 info)) + ) + (set! (-> arg1 probe-work-array 0 world-normal y) (* (-> s1-1 scale) (-> s1-1 radius))) + (set! (-> arg1 probe-work-array 0 ground-normal x) 1.0) + (when (< 0.0 (-> s2-1 up-force)) + (rigid-body-control-method-23 sv-16 (-> s2-1 ground-pos) (-> arg1 velocity)) + (if (logtest? (-> s2-1 surface flags) (vehicle-wheel-surface-flag moving)) + (vector-! (-> arg1 velocity) (-> arg1 velocity) (-> this surface-velocity)) + ) + (let ((s0-0 (the-as object (+ (+ (* 144 s3-1) 416) (the-as int arg1))))) + (set! (-> arg1 probe-work-array 0 local-normal quad) (-> (the-as wvehicle-physics-work s0-0) force quad)) + (vector+float*! + (-> (the-as wvehicle-physics-work s0-0) velocity) + (-> arg1 probe-work-array 0 local-normal) + (-> s2-1 ground-normal) + (- (vector-dot (-> arg1 probe-work-array 0 local-normal) (-> s2-1 ground-normal))) + ) + (vector-normalize! (the-as vector (+ (the-as int s0-0) 80)) 1.0) + (vector-cross! + (the-as vector (+ (the-as int s0-0) 96)) + (-> arg1 probe-work-array 0 local-normal) + (-> s2-1 ground-normal) + ) + (vector-normalize! (-> (the-as wvehicle-physics-work s0-0) world-pos) 1.0) + (set! (-> (the-as wvehicle-physics-work arg1) forward-dir quad) + (-> (the-as wvehicle-physics-work s0-0) world-pos quad) + ) + (set! (-> (the-as wvehicle-physics-work arg1) side-dir quad) + (-> (the-as wvehicle-physics-work s0-0) velocity quad) + ) + (set! (-> (the-as wvehicle-physics-work s0-0) world-normal quad) + (-> (the-as wvehicle-physics-work arg1) velocity quad) + ) + ) + (set! (-> s2-1 side-vel) + (vector-dot + (-> (the-as wvehicle-physics-work arg1) velocity) + (-> (the-as wvehicle-physics-work arg1) side-dir) + ) + ) + (set! (-> s2-1 forward-vel) (vector-dot (-> arg1 velocity) (the-as vector (&-> arg1 impulse)))) + (set! (-> s2-1 up-vel) (vector-dot (-> arg1 velocity) (-> s2-1 ground-normal))) + (set! (-> s2-1 forward-slip-vel) + (+ (-> s2-1 forward-vel) (* -1.0 (-> arg1 probe-work-array 0 world-normal y) (-> s2-1 rev))) + ) + (let* ((f0-21 (-> s2-1 side-vel)) + (f0-23 (* f0-21 f0-21)) + (f1-16 (-> s2-1 forward-slip-vel)) + (f0-25 (sqrtf (+ f0-23 (* f1-16 f1-16)))) + ) + (set! (-> s2-1 friction-coef) + (* (smooth-interp + (-> this info handling tire-static-friction) + (-> this info handling tire-dynamic-friction) + f0-25 + (-> this info handling tire-static-friction-speed) + (-> this info handling tire-dynamic-friction-speed) + ) + (-> s2-1 surface friction) + ) + ) + ) + (set! (-> arg1 probe-work-array 0 ground-normal x) (-> s2-1 surface drag)) + ) + (set! (-> arg1 probe-work-array 0 ground-pos y) (-> s2-1 torque)) + (when (< 0.0 (-> s2-1 up-force)) + (let ((f0-36 + (* (-> s2-1 up-force) + (-> s2-1 friction-coef) + (-> s1-1 forward-grip) + (-> arg1 probe-work-array 0 world-normal y) + ) + ) + (f1-29 + (/ (* 0.5 (-> s2-1 inertia) (-> s2-1 forward-slip-vel)) (* arg0 (-> arg1 probe-work-array 0 world-normal y))) + ) + ) + (if (logtest? (-> s1-1 flags) (vehicle-wheel-flag vwf0)) + (set! f1-29 (* f1-29 (/ 1.0 (the float (-> this info physics-model drive-wheel-count))))) + ) + (set! (-> arg1 probe-work-array 0 probe-pos w) (fmax (fmin f1-29 f0-36) (- f0-36))) + ) + (+! (-> arg1 probe-work-array 0 ground-pos y) (-> arg1 probe-work-array 0 probe-pos w)) + ) + (set! (-> arg1 probe-work-array 0 ground-pos z) + (- (* -0.25 (/ 1.0 arg0) (-> s2-1 rev) (-> s2-1 inertia)) (-> arg1 probe-work-array 0 ground-pos y)) + ) + (set! (-> arg1 probe-work-array 0 ground-pos w) (fabs (-> s2-1 braking-torque))) + (set! (-> arg1 probe-work-array 0 ground-pos x) + (fmax + (fmin (-> arg1 probe-work-array 0 ground-pos z) (-> arg1 probe-work-array 0 ground-pos w)) + (- (-> arg1 probe-work-array 0 ground-pos w)) + ) + ) + (+! (-> arg1 probe-work-array 0 ground-pos y) (-> arg1 probe-work-array 0 ground-pos x)) + (let ((f0-57 (* -1.0 + (-> s2-1 rev) + (-> s2-1 inertia) + (-> arg1 probe-work-array 0 ground-normal x) + (-> this info handling rolling-resistance) + ) + ) + ) + (if (logtest? (vehicle-flag turbo-boost) (-> this v-flags)) + (set! f0-57 (* 0.05 f0-57)) + ) + (+! (-> arg1 probe-work-array 0 ground-pos y) f0-57) + ) + (cond + ((logtest? (-> s1-1 flags) (vehicle-wheel-flag vwf0)) + (+! (-> this wheel-torque) (-> arg1 probe-work-array 0 ground-pos y)) + ) + (else + (let ((f0-61 (-> s2-1 rev)) + (f1-49 (* (-> arg1 probe-work-array 0 ground-pos y) arg0)) + (f2-20 (-> s2-1 inertia)) + ) + (set! (-> s2-1 rev) (+ f0-61 (* f1-49 (/ 1.0 f2-20)))) + ) + (set! (-> s2-1 rev) (fmax -125.6637 (fmin 125.6637 (-> s2-1 rev)))) + ) + ) + ) + 0 + ) + (let ((f0-65 (-> this wheel-rev)) + (f1-54 (* arg0 (-> this wheel-torque))) + (f2-25 (-> this wheel-inertia)) + ) + (set! (-> this wheel-rev) (+ f0-65 (* f1-54 (/ 1.0 f2-25)))) + ) + (set! (-> this wheel-rev) (fmax -125.6637 (fmin 125.6637 (-> this wheel-rev)))) + (dotimes (v1-110 (-> this info physics-model wheel-count)) + (let ((a0-28 (-> this wheel v1-110))) + (if (logtest? (-> a0-28 info flags) (vehicle-wheel-flag vwf0)) + (set! (-> a0-28 rev) (* (-> this wheel-rev) (-> a0-28 drive-diff))) + ) + ) + ) + (let* ((f0-71 (-> this info engine inertia)) + (f1-59 (-> this clutch-grab)) + (f2-29 (-> this clutch-inertia)) + (f3-12 (-> this gear-ratio)) + (f3-14 (/ 1.0 f3-12)) + (f3-16 (* f3-14 f3-14)) + (f4-5 (-> this info transmission inertia)) + (f5-0 (-> this final-drive-ratio)) + (f5-2 (/ 1.0 f5-0)) + ) + (set! (-> arg1 probe-work-array 0 probe-pos z) + (+ f0-71 (* f1-59 (+ f2-29 (* f3-16 (+ f4-5 (* f5-2 f5-2 (-> this drive-wheel-inertia))))))) + ) + ) + (let* ((f3-18 (- (* (- (fmax 0.0 (* (-> this total-gear-ratio) (-> this wheel-rev))) (-> this engine-rev)) + (-> arg1 probe-work-array 0 probe-pos z) + (/ 1.0 arg0) + ) + (-> this engine-torque) + ) + ) + (f0-78 (-> this engine-rev)) + (f1-69 (* arg0 (+ (-> this engine-torque) (* f3-18 (-> this clutch-grab))))) + (f2-35 (-> arg1 probe-work-array 0 probe-pos z)) + ) + (set! (-> this engine-rev) (+ f0-78 (* f1-69 (/ 1.0 f2-35)))) + ) + (let* ((f0-80 (-> this engine-rev)) + (f1-71 (-> this info engine max-rpm)) + (f0-81 (fmin f0-80 (* 0.10471976 f1-71))) + (f1-74 (-> this info engine min-rpm)) + ) + (set! (-> this engine-rev) (fmax f0-81 (* 0.10471976 f1-74))) + ) + (dotimes (s3-2 (-> this info physics-model wheel-count)) + (let* ((s1-2 (-> this wheel s3-2)) + (s2-2 (-> s1-2 info)) + ) + (when (< 0.0 (-> s1-2 up-force)) + (set! (-> arg1 probe-work-array 0 world-normal y) (* (-> s2-2 scale) (-> s2-2 radius))) + (let ((v1-138 (-> (the-as wvehicle-physics-work arg1) probe-work-array s3-2))) + (set! (-> (the-as wvehicle-physics-work arg1) forward-dir quad) (-> v1-138 forward-dir quad)) + (set! (-> (the-as wvehicle-physics-work arg1) side-dir quad) (-> v1-138 side-dir quad)) + (set! (-> (the-as wvehicle-physics-work arg1) velocity quad) (-> v1-138 velocity quad)) + ) + (set! (-> (the-as wvehicle-physics-work arg1) ground-pos quad) (-> s1-2 ground-pos quad)) + (vector-! + (-> (the-as wvehicle-physics-work arg1) p-body) + (-> (the-as wvehicle-physics-work arg1) ground-pos) + (-> sv-16 position) + ) + (vector-cross! (-> arg1 normal) (-> arg1 tmp) (the-as vector (-> arg1 probe-work-array))) + (vector-rotate*! (-> arg1 normal) (-> arg1 normal) (-> sv-16 inv-i-world)) + (vector-cross! (-> arg1 normal) (-> arg1 normal) (-> arg1 tmp)) + (set! (-> arg1 probe-work-array 0 world-normal z) + (/ (* -0.5 (-> s1-2 side-vel)) + (* arg0 (+ (-> sv-16 info inv-mass) (vector-dot (the-as vector (-> arg1 probe-work-array)) (-> arg1 normal)))) + ) + ) + (set! (-> arg1 probe-work-array 0 world-normal w) 0.0) + (set! (-> s1-2 forward-slip-vel) + (+ (-> s1-2 forward-vel) (* -1.0 (-> arg1 probe-work-array 0 world-normal y) (-> s1-2 rev))) + ) + (vector-cross! (-> arg1 normal) (-> arg1 tmp) (the-as vector (&-> arg1 impulse))) + (vector-rotate*! (-> arg1 normal) (-> arg1 normal) (-> sv-16 inv-i-world)) + (vector-cross! (-> arg1 normal) (-> arg1 normal) (-> arg1 tmp)) + (let ((f0-94 + (/ (* -0.25 (-> s1-2 forward-slip-vel)) + (* arg0 (+ (-> sv-16 info inv-mass) (vector-dot (the-as vector (&-> arg1 impulse)) (-> arg1 normal)))) + ) + ) + ) + (+! (-> arg1 probe-work-array 0 world-normal w) f0-94) + ) + (set! (-> arg1 probe-work-array 0 probe-pos y) + (* (-> s1-2 friction-coef) (-> s1-2 up-force) (-> s2-2 side-grip)) + ) + (set! (-> arg1 probe-work-array 0 probe-pos x) + (* (-> s1-2 friction-coef) (-> s1-2 up-force) (-> s2-2 forward-grip)) + ) + (let* ((f0-103 (/ (-> arg1 probe-work-array 0 world-normal z) (-> arg1 probe-work-array 0 probe-pos y))) + (f0-105 (* f0-103 f0-103)) + (f1-95 (/ (-> arg1 probe-work-array 0 world-normal w) (-> arg1 probe-work-array 0 probe-pos x))) + (f0-106 (+ f0-105 (* f1-95 f1-95))) + ) + (when (< 1.0 f0-106) + (let ((f0-108 (/ 1.0 (sqrtf f0-106)))) + (set! (-> arg1 probe-work-array 0 world-normal z) (* (-> arg1 probe-work-array 0 world-normal z) f0-108)) + (set! (-> arg1 probe-work-array 0 world-normal w) (* (-> arg1 probe-work-array 0 world-normal w) f0-108)) + ) + ) + ) + (vector-float*! + (-> arg1 force) + (the-as vector (-> arg1 probe-work-array)) + (-> arg1 probe-work-array 0 world-normal z) + ) + (vector+float*! + (-> arg1 force) + (-> arg1 force) + (the-as vector (&-> arg1 impulse)) + (-> arg1 probe-work-array 0 world-normal w) + ) + (let ((f0-114 + (* (vector-dot (-> arg1 tmp) (-> arg1 mat uvec)) (+ -1.0 (-> this info handling ground-torque-scale))) + ) + ) + (vector+float*! (-> arg1 ground-normal) (-> arg1 ground-normal) (-> arg1 mat uvec) f0-114) + ) + (apply-impact! sv-16 (-> arg1 ground-normal) (-> arg1 force)) + 0 + ) + ) + ) + 0 + (none) + ) + +(defmethod apply-gravity! ((this wvehicle) (arg0 float)) + (local-vars (v1-51 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (wvehicle-method-162 this arg0) + (wvehicle-method-163 this) + (let ((gp-0 (new 'stack-no-clear 'wvehicle-physics-work)) + (s5-0 (-> this rbody)) + (s4-0 (-> this info)) + ) + (set! (-> gp-0 cur-time) (the-as uint (current-time))) + (cond + ((logtest? (-> this v-flags) (vehicle-flag dead)) + (vector-reset! (-> gp-0 ground-normal-sum)) + ) + (else + (wvehicle-method-160 this gp-0) + (vector-reset! (-> gp-0 force)) + (set! (-> gp-0 force y) (* 2.0 (-> s4-0 info mass) (-> s4-0 extra gravity) (-> this jump-control))) + (add-force! s5-0 (-> gp-0 force)) + (vehicle-method-97 this arg0 (the-as vehicle-physics-work gp-0)) + ) + ) + (when (logtest? (vehicle-flag turbo-boost) (-> this v-flags)) + (let ((f0-6 (* (-> this turbo-boost-factor) (-> s4-0 info mass) (-> s4-0 extra gravity)))) + (vector-float*! (-> gp-0 force) (-> gp-0 mat fvec) f0-6) + ) + (add-force! s5-0 (-> gp-0 force)) + ) + (when (logtest? (-> this v-flags) (vehicle-flag in-air)) + (let* ((v1-29 (-> this rbody ang-momentum)) + (a0-10 (-> this rbody ang-momentum)) + (f3-0 (-> s4-0 handling air-angular-damping)) + (f2-0 arg0) + (f0-7 0.0) + (f1-5 1.0) + (f2-1 (* -1.0 (- 1.0 f3-0) f2-0)) + (f3-3 0.016666668) + ) + (vector-float*! v1-29 a0-10 (fmax f0-7 (+ f1-5 (* f2-1 (/ 1.0 f3-3))))) + ) + (let* ((v1-31 (-> s5-0 lin-velocity)) + (f0-13 (+ (* (-> v1-31 x) (-> v1-31 x)) (* (-> v1-31 z) (-> v1-31 z)))) + (f1-10 40960.0) + ) + (cond + ((< f0-13 (* f1-10 f1-10)) + (set! (-> gp-0 local-pos quad) (-> s4-0 info cm-offset-joint quad)) + (+! (-> gp-0 local-pos z) 4096.0) + (vector-matrix*! (-> gp-0 world-pos) (-> gp-0 local-pos) (-> gp-0 mat)) + (vector-reset! (-> gp-0 force)) + (set! (-> gp-0 force x) (* (-> s4-0 handling hop-turn-torque) (-> this controls steering))) + (set! (-> gp-0 force y) (* -1.0 (-> this controls lean-z) (-> s4-0 handling air-pitch-torque))) + (vector-rotate*! (-> gp-0 force) (-> gp-0 force) (-> gp-0 mat)) + (rigid-body-control-method-22 s5-0 (-> gp-0 world-pos) (-> gp-0 force)) + ) + (else + (set! (-> gp-0 local-pos quad) (-> s4-0 info cm-offset-joint quad)) + (+! (-> gp-0 local-pos y) 4096.0) + (vector-matrix*! (-> gp-0 world-pos) (-> gp-0 local-pos) (-> gp-0 mat)) + (vector-reset! (-> gp-0 force)) + (set! (-> gp-0 force x) (* (-> s4-0 handling air-roll-torque) (-> this controls steering))) + (set! (-> gp-0 force z) (* (-> s4-0 handling air-pitch-torque) (-> this controls lean-z))) + (vector-rotate*! (-> gp-0 force) (-> gp-0 force) (-> gp-0 mat)) + (rigid-body-control-method-22 s5-0 (-> gp-0 world-pos) (-> gp-0 force)) + ) + ) + ) + ) + (when (not (logtest? (vehicle-flag gun-dark-2-zero-g) (-> this v-flags))) + (let ((f0-27 0.0)) + (.lvf vf1 (&-> (-> gp-0 ground-normal-sum) 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-51 vf1) + (if (= f0-27 v1-51) + (set! (-> gp-0 ground-normal-sum y) 1.0) + ) + ) + (+! (-> gp-0 ground-normal-sum y) 6.0) + (vector-normalize! (-> gp-0 ground-normal-sum) 1.0) + (vector-float*! (-> this gravity-dir) (-> gp-0 ground-normal-sum) -1.0) + (vector-float*! (-> gp-0 force) (-> this gravity-dir) (* (-> s4-0 extra gravity) (-> s4-0 info mass))) + (add-force! s5-0 (-> gp-0 force)) + ) + (rigid-body-object-method-53 this arg0) + (vehicle-method-96 this arg0) + (countdown (s1-0 (-> s4-0 physics-model wheel-count)) + (let* ((a1-25 (-> this wheel s1-0)) + (v1-69 (-> a1-25 info)) + ) + (set! (-> gp-0 wsphere quad) (-> a1-25 trans quad)) + (set! (-> gp-0 wsphere r) (* (-> v1-69 scale) (-> v1-69 radius))) + ) + (vehicle-method-95 this (-> gp-0 wsphere) arg0) + 0 + ) + (let ((f0-38 (* -0.000012207031 (vector-length (-> s5-0 lin-velocity)) (-> s4-0 handling drag-force-factor)))) + (vector-float*! (-> gp-0 force) (-> s5-0 lin-velocity) f0-38) + ) + (add-force! s5-0 (-> gp-0 force)) + (when (or (and (logtest? (-> this v-flags) (vehicle-flag in-air)) + (and (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (and (< (-> s5-0 matrix uvec y) 0.0) (< (- (-> gp-0 cur-time) (-> this impact-time)) (the-as uint 10))) + ) + ) + (logtest? (vehicle-flag overturned) (-> this v-flags)) + ) + (vector-reset! (-> gp-0 local-pos)) + (set! (-> gp-0 local-pos y) -6144.0) + (when (logtest? (vehicle-flag overturned) (-> this v-flags)) + (let ((f0-42 (* 0.0033333334 (the float (- (current-time) (the-as int (-> this overturned-time))))))) + (set! (-> gp-0 local-pos y) (* (+ -32768.0 (* -16384.0 f0-42)) + (-> s4-0 handling roll-control-factor) + (fmax 0.1 (- (-> s5-0 matrix uvec y))) + ) + ) + ) + ) + (vector-matrix*! (-> gp-0 world-pos) (-> gp-0 local-pos) (-> gp-0 mat)) + (vector-reset! (-> gp-0 force)) + (set! (-> gp-0 force y) (* -0.5 (-> s4-0 extra gravity) (-> s4-0 info mass))) + (rigid-body-control-method-22 s5-0 (-> gp-0 world-pos) (-> gp-0 force)) + ) + ) + 0 + (none) + ) + ) + +(defmethod apply-gravity ((this wvehicle) (arg0 float)) + (apply-gravity! this arg0) + (none) + ) + +(defmethod apply-gravity1 ((this wvehicle) (arg0 float)) + (apply-gravity! this arg0) + (none) + ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-race.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-race.gc index 49a4400f57..ee0c07e673 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-states.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-states.gc index 985b062dee..d9bbe553bf 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-states.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-states.gc @@ -7,3 +7,409 @@ ;; DECOMP BEGINS +(defstate idle (wvehicle) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (go-virtual waiting) + ) + ) + +(defstate player-control (wvehicle) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type vehicle player-control) enter))) + (if t9-0 + (t9-0) + ) + ) + (send-event *vehicle-manager* 'extra-bank (-> self info sound bank-replace)) + (iterate-prims (-> self root) (lambda ((arg0 collide-shape-prim)) + (logclear! (-> arg0 prim-core collide-as) (collide-spec camera-blocker)) + (none) + ) + ) + (wvehicle-method-195 self) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type vehicle player-control) exit))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self sound-engine-rpm) 0.0) + (iterate-prims (-> self root) (lambda ((arg0 collide-shape-prim)) + (logior! (-> arg0 prim-core collide-as) (collide-spec camera-blocker)) + (none) + ) + ) + ) + ) + +(defstate crash (wvehicle) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type vehicle crash) enter))) + (if t9-0 + (t9-0) + ) + ) + (go-virtual explode) + ) + :code sleep-code + ) + +(defstate explode (wvehicle) + :virtual #t + :enter (behavior () + (rlet ((vf0 :class vf)) + (init-vf0-vector) + (let ((t9-0 (-> (method-of-type vehicle explode) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (dotimes (s5-0 (-> self info physics-model wheel-count)) + (let ((s4-0 (-> self wheel s5-0))) + (cond + ((or (not (logtest? (-> self info flags) #x4000)) (< (rand-vu) 0.6)) + (rigid-body-control-method-23 (-> self rbody) (-> s4-0 trans) (-> gp-0 rvec)) + (vector-! (-> gp-0 uvec) (-> s4-0 trans) (-> self rbody position)) + (vector+float*! (-> gp-0 rvec) (-> gp-0 rvec) (-> gp-0 uvec) 6.0) + (+! (-> gp-0 rvec y) 81920.0) + (send-event (handle->process (-> s4-0 handle)) 'explode (-> gp-0 rvec)) + (set! (-> s4-0 handle) (the-as handle #f)) + ) + (else + (send-event (handle->process (-> s4-0 handle)) 'explode #f) + ) + ) + ) + ) + ) + (if (not (logtest? (-> self info flags) #x4000)) + (go-virtual explode-into-nothing) + ) + (let ((a0-14 (-> self draw color-mult))) + (vector-float*! (the-as vector a0-14) (the-as vector a0-14) 0.25) + ) + (impulse-handler self) + (let ((s4-1 (new 'stack-no-clear 'vector)) + (s5-1 (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-1) + (set! (-> s4-1 y) (* 122880.0 (-> self info info mass))) + (dotimes (s3-0 3) + (set! (-> s5-1 data s3-0) (* 12288.0 (+ -1.0 (* 2.0 (rand-vu))))) + ) + (vector+! s5-1 s5-1 (-> gp-1 position)) + (apply-impact! gp-1 s5-1 s4-1) + (rigid-body-control-method-12 gp-1 1.0) + (init-velocities! gp-1) + ) + (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-100 + (process-spawn joint-exploder (-> gp-3 skel) (-> gp-3 anim) s5-2 gp-3 :name "joint-exploder" :to self :unk 0) + ) + ) + (when v1-100 + (let ((v1-103 (-> (the-as process-drawable (-> v1-100 0)) draw))) + (if v1-103 + (.svf (&-> (-> v1-103 color-mult) quad) vf0) + ) + ) + ) + ) + ) + ) + ) + (if (and (logtest? (vehicle-flag unique) (-> self v-flags)) + (not (logtest? (vehicle-flag player-killed) (-> self v-flags))) + (-> *setting-control* user-current unique-vehicle-mission-critical) + ) + (fail-mission) + ) + ) + ) + ) + +(defstate explode-into-nothing (wvehicle) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self v-flags) (the-as vehicle-flag (logclear (-> self v-flags) (vehicle-flag rammed-target)))) + (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) 4096.0) + (set! (-> gp-0 scale) (* 0.00008877841 (-> self draw bounds w))) + (set! (-> gp-0 group) (-> *part-group-id-table* (-> self info explosion-part))) + (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*)) + ) + (logior! (-> self focus-status) (focus-status disable inactive)) + (disable-physics! self) + (rigid-body-object-method-43 self) + ) + :code sleep-code + :post (behavior () + (when (and (not (logtest? (vehicle-flag rammed-target) (-> self v-flags))) + (time-elapsed? (-> self state-time) (seconds 0.035)) + ) + (set! (-> self v-flags) (the-as vehicle-flag (logior (vehicle-flag rammed-target) (-> self v-flags)))) + (let ((a1-1 (new 'stack 'debris-tuning (the-as uint 0))) + (a2-1 (-> self info debris)) + ) + (when a2-1 + (set! (-> a1-1 duration) (seconds 5)) + (set! (-> a1-1 hit-xz-reaction) 0.95) + (set! (-> a1-1 hit-y-reaction) 0.6) + (set! (-> a1-1 gravity) -163840.0) + (set! (-> a1-1 scale-rand-lo) 2.0) + (set! (-> a1-1 scale-rand-hi) (* 2.0 (-> a1-1 scale-rand-lo))) + (set! (-> a1-1 rot-speed) 1000.0) + (vector+! + (-> a1-1 fountain-rand-transv-lo) + (-> self root transv) + (new 'static 'vector :x -81920.0 :y 61440.0 :z -81920.0 :w 1.0) + ) + (vector+! + (-> a1-1 fountain-rand-transv-hi) + (-> self root transv) + (new 'static 'vector :x 81920.0 :y 131072.0 :z 81920.0 :w 1.0) + ) + (debris-spawn self a1-1 a2-1 (the-as process-drawable #f)) + ) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + (if (not (-> self child)) + (go-virtual die) + ) + ) + ) + +(defstate waiting (wvehicle) + :virtual #t + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :exit (behavior () + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (let ((t9-1 (-> (find-parent-state) exit))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + +(defstate hostile (wvehicle) + :virtual #t + :event vehicle-event-handler + :enter (behavior () + (wvehicle-method-195 self) + (if (not (-> self minimap)) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 10) (the-as int #f) (the-as vector #t) 0)) + ) + (set! (-> self control-hook) + (the-as (function vehicle vehicle-controls) (method-of-object self control-hook-ai)) + ) + (set! (-> self ai-state) (the-as uint 1)) + (logior! (-> self v-flags) (vehicle-flag ai-driving ignition)) + (set-time! (-> self state-time)) + ) + :exit (behavior () + (logclear! (-> self v-flags) (vehicle-flag ai-driving ignition)) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + :trans #f + :code sleep-code + :post (behavior () + (wvehicle-method-168 self) + ) + ) + +(defstate sink (wvehicle) + :virtual #t + :event vehicle-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (vehicle-method-116 self 'drown-death) + (set! (-> self crash-level) 3) + (set! (-> self force-level) 3) + (logior! (-> self focus-status) (focus-status dead)) + (logclear! (-> self v-flags) (vehicle-flag persistent player-driving net-player-driving)) + (set! (-> self v-flags) (the-as vehicle-flag (logior (vehicle-flag dead lights-dead) (-> self v-flags)))) + (vehicle-method-126 self) + (sound-play "car-bubbles") + (vehicle-method-106 self) + (vehicle-method-136 self) + (vehicle-method-100 self) + (let ((v1-21 (-> self rbody))) + (set! (-> v1-21 linear-damping) 0.95) + (set! (-> v1-21 angular-damping) 0.25) + ) + (if (and (logtest? (vehicle-flag unique) (-> self v-flags)) + (not (logtest? (vehicle-flag player-killed) (-> self v-flags))) + (-> *setting-control* user-current unique-vehicle-mission-critical) + ) + (fail-mission) + ) + ) + :code sleep-code + :post (behavior () + (let ((v1-1 (-> self draw color-mult))) + (let ((f0-1 (fmax 0.0 (- 1.0 (* 0.0033333334 (the float (- (current-time) (-> self state-time)))))))) + (set-vector! v1-1 f0-1 f0-1 f0-1 1.0) + ) + (dotimes (a0-6 (-> self info physics-model wheel-count)) + (let ((a1-6 (handle->process (-> self wheel a0-6 handle)))) + (if a1-6 + (set! (-> (the-as process-drawable a1-6) draw color-mult quad) (-> v1-1 quad)) + ) + ) + ) + ) + (vehicle-explode-post) + ) + ) + +(defstate race-waiting (wvehicle) + :virtual #t + :event vehicle-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (wvehicle-method-195 self) + (vehicle-method-140 self) + (logior! (-> self v-flags) (vehicle-flag ignition)) + ) + :code sleep-code + :post (behavior () + (vector-reset! (-> self target-acceleration)) + (logclear! (-> self v-flags) (vehicle-flag player-impulse-force player-contact-force)) + (let ((v1-3 (-> self rbody))) + (set! (-> v1-3 force quad) (the-as uint128 0)) + (set! (-> v1-3 torque quad) (the-as uint128 0)) + ) + 0 + (reset-momentum! (-> self rbody)) + (rigid-body-object-method-30 self) + (vehicle-method-115 self) + ) + ) + +(defstate race-racing (wvehicle) + :virtual #t + :event vehicle-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self v-flags) (vehicle-flag riding ai-driving ignition)) + (set! (-> self controls throttle) 0.0) + (set! (-> self controls brake) 0.0) + (set! (-> self controls steering) 0.0) + (set! (-> self control-hook) + (the-as (function vehicle vehicle-controls) (method-of-object self wvehicle-method-177)) + ) + ) + :exit (behavior () + (logclear! (-> self v-flags) (vehicle-flag waiting-for-player)) + (let ((v1-3 (find-prim-by-id-logtest (-> self root) (the-as uint 32)))) + (when v1-3 + (set! (-> v1-3 prim-core collide-with) (collide-spec + backgnd + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> v1-3 prim-core collide-as) (collide-spec vehicle-sphere)) + ) + ) + ) + :trans #f + :code sleep-code + :post (behavior () + (wvehicle-method-182 self) + ) + ) + +(defstate race-finished (wvehicle) + :virtual #t + :event vehicle-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self v-flags) (vehicle-flag persistent riding nav-spheres)) + (set! (-> self controls throttle) 0.0) + (set! (-> self controls brake) 0.0) + (set! (-> self controls steering) 0.0) + ) + :trans #f + :code sleep-code + :post (behavior () + (wvehicle-method-185 self) + ) + ) + +(defstate die (wvehicle) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle-util.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle-util.gc index 80a93b4f36..89d6e585bb 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-util.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-util.gc @@ -7,3 +7,953 @@ ;; DECOMP BEGINS +(defmethod wvehicle-method-167 ((this wvehicle)) + (let* ((v1-0 (-> this info)) + (f0-1 (* (-> v1-0 engine drag) (-> v1-0 engine idle-rpm))) + (f1-2 (* (-> v1-0 engine peak-torque-rpm) (+ 1.0 (-> v1-0 engine drag)))) + (f2-2 1.0) + (f3-3 (/ (- (-> v1-0 engine idle-rpm) (-> v1-0 engine peak-torque-rpm)) (-> v1-0 engine powerband-width-rpm))) + ) + (set! (-> this idle-throttle) (/ f0-1 (* f1-2 (- f2-2 (* f3-3 f3-3))))) + ) + (set! (-> this idle-throttle) (fmax 0.0 (fmin 1.0 (-> this idle-throttle)))) + 0 + (none) + ) + +(defmethod rigid-body-object-method-37 ((this wvehicle)) + (let ((t9-0 (method-of-type vehicle rigid-body-object-method-37))) + (t9-0 this) + ) + (set! (-> this wheel 0 info) (-> this info physics-model front-wheel)) + (set! (-> this wheel 1 info) (-> this info physics-model front-wheel)) + (set! (-> this wheel 2 info) (-> this info physics-model rear-wheel)) + (set! (-> this wheel 3 info) (-> this info physics-model rear-wheel)) + (dotimes (s5-0 (-> this info physics-model wheel-count)) + (let ((s4-0 (-> this wheel s5-0 info))) + (set! (-> s4-0 tread-tid) (lookup-texture-id-by-name (-> s4-0 tread-texture) (the-as string #f))) + ) + ) + (set! (-> this info physics-model front-wheel callback) (method-of-object this wvehicle-method-164)) + (set! (-> this info physics-model rear-wheel callback) (method-of-object this wvehicle-method-164)) + (let ((v1-22 (-> this draw shadow-ctrl))) + (set! (-> v1-22 settings shadow-dir w) (-> this info setup shadow-locus-dist)) + (set! (-> v1-22 settings top-plane w) 0.0) + (set! (-> v1-22 settings bot-plane w) (- (-> this info setup shadow-bot-clip))) + ) + (wvehicle-method-167 this) + (none) + ) + +(defun have-earned-vehicle-v-type? ((arg0 int)) + (case arg0 + ((12) + (let ((v1-2 (-> *game-info* vehicles))) + (logtest? v1-2 (game-vehicles v-turtle)) + ) + ) + ((13) + (let ((v1-5 (-> *game-info* vehicles))) + (logtest? v1-5 (game-vehicles v-snake)) + ) + ) + ((14) + (let ((v1-8 (-> *game-info* vehicles))) + (logtest? v1-8 (game-vehicles v-scorpion)) + ) + ) + ((15) + (let ((v1-11 (-> *game-info* vehicles))) + (logtest? v1-11 (game-vehicles v-toad)) + ) + ) + ((16) + (let ((v1-14 (-> *game-info* vehicles))) + (logtest? v1-14 (game-vehicles v-fox)) + ) + ) + ((17) + (let ((v1-17 (-> *game-info* vehicles))) + (logtest? v1-17 (game-vehicles v-rhino)) + ) + ) + ((18) + (let ((v1-20 (-> *game-info* vehicles))) + (logtest? v1-20 (game-vehicles v-mirage)) + ) + ) + ((19) + (let ((v1-23 (-> *game-info* vehicles))) + (logtest? v1-23 (game-vehicles v-x-ride)) + ) + ) + ((21) + #t + ) + (else + #f + ) + ) + ) + +(defun have-vehicle-v-type? ((arg0 int)) + (case arg0 + ((12) + (let ((v1-2 (-> *game-info* vehicles))) + (let ((a0-3 (-> *setting-control* user-current vehicles))) + (if (nonzero? a0-3) + (set! v1-2 (logand v1-2 a0-3)) + ) + ) + (logtest? v1-2 (game-vehicles v-turtle)) + ) + ) + ((13) + (let ((v1-5 (-> *game-info* vehicles))) + (let ((a0-6 (-> *setting-control* user-current vehicles))) + (if (nonzero? a0-6) + (set! v1-5 (logand v1-5 a0-6)) + ) + ) + (logtest? v1-5 (game-vehicles v-snake)) + ) + ) + ((14) + (let ((v1-8 (-> *game-info* vehicles))) + (let ((a0-9 (-> *setting-control* user-current vehicles))) + (if (nonzero? a0-9) + (set! v1-8 (logand v1-8 a0-9)) + ) + ) + (logtest? v1-8 (game-vehicles v-scorpion)) + ) + ) + ((15) + (let ((v1-11 (-> *game-info* vehicles))) + (let ((a0-12 (-> *setting-control* user-current vehicles))) + (if (nonzero? a0-12) + (set! v1-11 (logand v1-11 a0-12)) + ) + ) + (logtest? v1-11 (game-vehicles v-toad)) + ) + ) + ((16) + (let ((v1-14 (-> *game-info* vehicles))) + (let ((a0-15 (-> *setting-control* user-current vehicles))) + (if (nonzero? a0-15) + (set! v1-14 (logand v1-14 a0-15)) + ) + ) + (logtest? v1-14 (game-vehicles v-fox)) + ) + ) + ((17) + (let ((v1-17 (-> *game-info* vehicles))) + (let ((a0-18 (-> *setting-control* user-current vehicles))) + (if (nonzero? a0-18) + (set! v1-17 (logand v1-17 a0-18)) + ) + ) + (logtest? v1-17 (game-vehicles v-rhino)) + ) + ) + ((18) + (let ((v1-20 (-> *game-info* vehicles))) + (let ((a0-21 (-> *setting-control* user-current vehicles))) + (if (nonzero? a0-21) + (set! v1-20 (logand v1-20 a0-21)) + ) + ) + (logtest? v1-20 (game-vehicles v-mirage)) + ) + ) + ((19) + (let ((v1-23 (-> *game-info* vehicles))) + (let ((a0-24 (-> *setting-control* user-current vehicles))) + (if (nonzero? a0-24) + (set! v1-23 (logand v1-23 a0-24)) + ) + ) + (logtest? v1-23 (game-vehicles v-x-ride)) + ) + ) + ((21) + #t + ) + (else + #f + ) + ) + ) + +(defmethod vehicle-method-146 ((this wvehicle) (arg0 vector)) + (with-pp + (vector-float*! (-> this surface-velocity) arg0 (-> pp clock frames-per-second)) + 0 + (none) + ) + ) + +(defmethod rigid-body-object-method-54 ((this wvehicle)) + ((method-of-type vehicle rigid-body-object-method-54) this) + 0 + (none) + ) + +(defmethod vehicle-method-128 ((this wvehicle)) + (have-vehicle-v-type? (the-as int (-> this info vehicle-type))) + ) + +(defmethod vehicle-method-144 ((this wvehicle)) + (send-event *vehicle-manager* 'extra-bank (-> this info sound bank-replace)) + (let ((gp-0 + (new 'stack 'font-context *font-default-matrix* 22 320 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + 1.0 + (let* ((v1-9 (-> *setting-control* user-default language)) + (f30-0 (cond + ((= v1-9 (language-enum korean)) + 1.3 + ) + ((= v1-9 (language-enum russian)) + 1.3 + ) + (else + 1.0 + ) + ) + ) + ) + (let ((v1-11 gp-0)) + (set! (-> v1-11 width) (the float 350)) + ) + (let ((v1-12 gp-0)) + (set! (-> v1-12 height) (the float 80)) + ) + (let ((v1-13 gp-0)) + (set! (-> v1-13 scale) (* 0.7 f30-0)) + ) + (set! (-> gp-0 flags) (font-flags shadow kerning large)) + (print-game-text + (lookup-text! *common-text* (text-id text-0779) #f) + gp-0 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (let ((a1-4 (-> this info name-text))) + (when (nonzero? a1-4) + (let ((a0-11 gp-0)) + (set! (-> a0-11 color) (font-color cyan)) + ) + (+! (-> gp-0 origin y) (the float (the int (* 30.0 f30-0)))) + (let ((v1-20 gp-0)) + (set! (-> v1-20 scale) (* 0.6 f30-0)) + ) + (print-game-text (lookup-text! *common-text* a1-4 #f) gp-0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-145 ((this wvehicle)) + (when (not (have-earned-vehicle-v-type? (the-as int (-> this info vehicle-type)))) + (let ((gp-0 + (new 'stack 'font-context *font-default-matrix* 22 320 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + 1.0 + (let* ((v1-5 (-> *setting-control* user-default language)) + (f30-0 (cond + ((= v1-5 (language-enum korean)) + 1.3 + ) + ((= v1-5 (language-enum russian)) + 1.3 + ) + (else + 1.0 + ) + ) + ) + ) + (let ((v1-7 gp-0)) + (set! (-> v1-7 width) (the float 350)) + ) + (let ((v1-8 gp-0)) + (set! (-> v1-8 height) (the float 80)) + ) + (let ((v1-9 gp-0)) + (set! (-> v1-9 scale) (* 0.7 f30-0)) + ) + (set! (-> gp-0 flags) (font-flags shadow kerning large)) + (let ((a1-1 (-> this info name-text))) + (when (nonzero? a1-1) + (let ((a0-8 gp-0)) + (set! (-> a0-8 color) (font-color cyan)) + ) + (let ((v1-14 gp-0)) + (set! (-> v1-14 scale) (* 0.6 f30-0)) + ) + (print-game-text (lookup-text! *common-text* a1-1 #f) gp-0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + (+! (-> gp-0 origin y) (the float (the int (* 30.0 f30-0)))) + ) + (let ((a0-12 gp-0)) + (set! (-> a0-12 color) (font-color default)) + ) + (print-game-text + (lookup-text! *common-text* (text-id text-0887) #f) + gp-0 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + ) + 0 + (none) + ) + +(defmethod wvehicle-method-170 ((this wvehicle)) + (-> this info rider attach-point-count) + (none) + ) + +(defmethod wvehicle-method-171 ((this wvehicle) (arg0 vector) (arg1 int)) + (vector-matrix*! arg0 (the-as vector (-> this info rider attach-point-array arg1)) (-> this rbody matrix)) + 0 + (none) + ) + +(defmethod wvehicle-method-172 ((this wvehicle) (arg0 quaternion) (arg1 int)) + (let ((gp-0 (new 'stack-no-clear 'inline-array 'quaternion 2))) + (quaternion-zxy! (-> gp-0 0) (-> this info rider attach-point-array arg1 rot)) + (quaternion*! arg0 (the-as quaternion (-> this rbody rot)) (-> gp-0 0)) + ) + 0 + (none) + ) + +(defmethod wvehicle-method-173 ((this wvehicle) (arg0 vector)) + (let ((gp-0 (new 'stack-no-clear 'wvehicle-stack-type1))) + (set! (-> gp-0 float00) (the-as float #x7f800000)) + (set! (-> gp-0 byte00) -1) + (dotimes (s3-0 (-> this info rider attach-point-count)) + (let ((s2-0 (handle->process (-> this attached-array s3-0)))) + (when (not (if (type? s2-0 process-focusable) + s2-0 + ) + ) + (wvehicle-method-171 this (-> gp-0 vec00) s3-0) + (set! (-> gp-0 float01) (vector-vector-distance-squared arg0 (-> gp-0 vec00))) + (when (< (-> gp-0 float01) (-> gp-0 float00)) + (set! (-> gp-0 float00) (-> gp-0 float01)) + (set! (-> gp-0 byte00) s3-0) + ) + ) + ) + ) + (-> gp-0 byte00) + ) + ) + +;; WARN: Return type mismatch process vs process-focusable. +(defmethod get-attached-by-idx ((this wvehicle) (arg0 int)) + (let ((gp-0 (handle->process (-> this attached-array arg0)))) + (the-as process-focusable (if (type? gp-0 process-focusable) + gp-0 + ) + ) + ) + ) + +(defmethod add-attached-at-idx ((this wvehicle) (arg0 int) (arg1 process-focusable)) + (if arg1 + (set! (-> this attached-array arg0) (process->handle arg1)) + ) + 0 + (none) + ) + +(defmethod remove-attached-from-arr ((this wvehicle) (arg0 process-focusable)) + (let ((v1-2 (process->handle arg0))) + (dotimes (a1-4 (-> this info rider attach-point-count)) + (if (= v1-2 (-> this attached-array a1-4)) + (set! (-> this attached-array a1-4) (the-as handle #f)) + ) + ) + ) + #f + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod vehicle-method-142 ((this wvehicle)) + (reset-momentum! (-> this rbody)) + (set! (-> this wheel-rev) 0.0) + (dotimes (v1-2 (-> this info physics-model wheel-count)) + (let ((a0-5 (-> this wheel v1-2))) + (set! (-> a0-5 rev) 0.0) + (set! (-> a0-5 up-vel) 0.0) + (set! (-> a0-5 side-vel) 0.0) + (set! (-> a0-5 forward-vel) 0.0) + (set! (-> a0-5 forward-slip-vel) 0.0) + ) + ) + (none) + ) + +(defmethod apply-momentum! ((this wvehicle)) + (let ((t9-0 (method-of-type vehicle apply-momentum!))) + (t9-0 this) + ) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag particles joints) (-> this v-flags)))) + (none) + ) + +(defmethod disable-physics! ((this wvehicle)) + (let ((t9-0 (method-of-type vehicle disable-physics!))) + (t9-0 this) + ) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag particles joints) (-> this v-flags)))) + (none) + ) + +(defmethod vehicle-method-124 ((this wvehicle)) + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + ((method-of-type vehicle vehicle-method-124) this) + (none) + ) + +(defmethod wvehicle-method-169 ((this wvehicle)) + 0 + (none) + ) + +(defmethod vehicle-method-64 ((this wvehicle)) + (when (and (not (logtest? (vehicle-flag turbo-boost) (-> this v-flags))) (>= (-> this turbo-supply) 1.0)) + (cond + ((< (-> this turbo-supply) 1.0) + (if (not (logtest? (-> this controls prev-flags) (vehicle-controls-flag vcf2))) + (sound-play "turbo-dud") + ) + ) + ((< (-> this turbo-ready) 1.0) + (if (not (logtest? (-> this controls prev-flags) (vehicle-controls-flag vcf2))) + (sound-play "turbo-out") + ) + ) + (else + (set! (-> this turbo-ready) 0.0) + (+! (-> this turbo-supply) -1.0) + (set! (-> this turbo-boost-time) (the-as uint (current-time))) + (set! (-> this turbo-boost-factor) (-> this info handling turbo-boost-factor)) + (set! (-> this turbo-boost-duration) (-> this info handling turbo-boost-duration)) + (logior! (-> this v-flags) (vehicle-flag turbo-boost)) + ) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-143 ((this wvehicle) (arg0 process)) + (set! (-> this target-status handle) (process->handle arg0)) + (set! (-> this ai-state) (the-as uint 1)) + (go (method-of-object this hostile)) + ) + +(defmethod vehicle-method-132 ((this wvehicle) (arg0 traffic-object-spawn-params)) + (case (-> arg0 behavior) + ((3) + (set! (-> this target-status handle) (-> arg0 handle)) + (go (method-of-object this hostile)) + ) + ((10) + (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)) + ) + ) + ) + ((13) + (go (method-of-object this undefined1)) + ) + (else + ((method-of-type vehicle vehicle-method-132) this arg0) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-102 ((this wvehicle)) + (logtest? (vehicle-flag disturbed player-driving in-pursuit) (-> this v-flags)) + ) + +(defmethod vehicle-method-103 ((this wvehicle)) + (local-vars (v1-8 float) (v1-13 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)) + (let* ((f0-0 (-> this camera-dist2)) + (f1-0 0.000024414063) + (f0-1 (* f0-0 (* f1-0 f1-0))) + ) + (.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-8 vf1) + (when (and (< v1-8 f0-1) (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-13 vf1) + (let ((f1-4 v1-13) + (f2-0 614.4) + ) + (< f1-4 (* f0-1 (* f2-0 f2-0))) + ) + ) + ) + (logclear! (-> this v-flags) (vehicle-flag disturbed)) + (vehicle-method-142 this) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod spawn-wheels! ((this wvehicle) (arg0 skeleton-group) (arg1 skeleton-group) (arg2 skeleton-group) (arg3 skeleton-group)) + (local-vars (sv-96 vehicle-wheel-state)) + (let ((s1-0 (new 'stack-no-clear 'vehicle-wheel-init-params))) + (set! (-> s1-0 position quad) (-> this root trans quad)) + (quaternion-identity! (-> s1-0 rotation)) + (vector-identity! (-> s1-0 scale)) + (set! (-> s1-0 skel) arg0) + (set! (-> s1-0 skel-blur) arg1) + (set! (-> s1-0 level) (the-as symbol (-> this level))) + (set! (-> s1-0 radius) 4096.0) + (set! (-> s1-0 collision-mesh-index) -1) + (&-> s1-0 skel) + (dotimes (s0-0 (-> this info physics-model wheel-count)) + (cond + ((and arg2 (>= s0-0 2)) + (set! (-> s1-0 skel) arg2) + (set! (-> s1-0 skel-blur) arg3) + ) + (else + (set! (-> s1-0 skel) arg0) + (set! (-> s1-0 skel-blur) arg1) + ) + ) + (set! sv-96 (-> this wheel s0-0)) + (set! (-> s1-0 radius) (* 1.3 (-> sv-96 info scale) (-> sv-96 info radius))) + (vector-identity! (-> s1-0 scale)) + (set! (-> s1-0 scale x) (-> sv-96 x-scale)) + (vector-float*! (-> s1-0 scale) (-> s1-0 scale) (-> sv-96 info scale)) + (if (logtest? (-> this info flags) #x4000) + (set! (-> s1-0 collision-mesh-index) (if (>= (-> sv-96 x-scale) 0.0) + 0 + 1 + ) + ) + ) + (set! (-> sv-96 handle) + (process->handle (vehicle-wheel-spawn this (the-as vehicle-wheel-init-params (&-> s1-0 skel)))) + ) + (set! (-> sv-96 pos) (-> sv-96 info settle-pos)) + (set! (-> sv-96 pos2) (-> sv-96 pos)) + ) + ) + (wvehicle-method-165 this) + (vehicle-method-79 this) + 0 + (none) + ) + +(defmethod vehicle-method-82 ((this wvehicle)) + (call-parent-method this) + (set-setting! 'rapid-tracking #f 0.0 0) + (let ((v1-2 (process->ppointer this))) + (persist-with-delay + *setting-control* + 'butt-handle + (seconds 1.5) + 'butt-handle + (the-as symbol v1-2) + 32768.0 + (-> v1-2 0 pid) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-83 ((this wvehicle)) + (call-parent-method this) + (logclear! (-> this draw status) (draw-control-status force-vu1)) + 0 + (none) + ) + +(defmethod vehicle-method-148 ((this wvehicle)) + (send-event *target* 'draw #t) + 0 + (none) + ) + +(defmethod vehicle-method-147 ((this wvehicle)) + (send-event *target* 'draw #f) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this wvehicle)) + (let ((v0-0 0)) + (if (logtest? (vehicle-flag ai-driving) (-> this v-flags)) + (set! v0-0 (logior v0-0 40)) + ) + (if (logtest? (vehicle-flag dead ignore-damage ignore-impulse) (-> this v-flags)) + (set! v0-0 0) + ) + (the-as search-info-flag v0-0) + ) + ) + +(defmethod vehicle-method-149 ((this wvehicle)) + (let ((gp-0 (new 'stack-no-clear 'wvehicle-stack-type2))) + (set! (-> gp-0 float0) 4096.0) + (quaternion->matrix (-> gp-0 mat0) (-> this root quat)) + (set! (-> gp-0 mat0 trans quad) (-> this root trans quad)) + (set! (-> gp-0 vec3 quad) (-> gp-0 mat0 fvec quad)) + (set! (-> gp-0 vec1 quad) (-> this root trans quad)) + (set! (-> gp-0 cquery start-pos quad) (-> gp-0 vec1 quad)) + (+! (-> gp-0 cquery start-pos y) 4096.0) + (vector-reset! (-> gp-0 vec2)) + (set! (-> gp-0 vec2 y) 1.0) + (vector-z-quaternion! (-> gp-0 vec3) (-> this root quat)) + (set-vector! (-> gp-0 cquery move-dist) 0.0 -40960.0 0.0 1.0) + (let ((v1-11 (-> gp-0 cquery))) + (set! (-> v1-11 radius) (-> gp-0 float0)) + (set! (-> v1-11 collide-with) (collide-spec backgnd)) + (set! (-> v1-11 ignore-process0) #f) + (set! (-> v1-11 ignore-process1) #f) + (set! (-> v1-11 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-11 action-mask) (collide-action solid)) + ) + (let ((f30-0 (fill-and-probe-using-line-sphere *collide-cache* (-> gp-0 cquery)))) + (when (>= f30-0 0.0) + (vector+float*! (-> gp-0 vec1) (-> gp-0 cquery start-pos) (-> gp-0 cquery move-dist) f30-0) + (set! (-> gp-0 vec1 y) (- (-> gp-0 vec1 y) (-> gp-0 float0))) + (let* ((v1-19 (-> gp-0 cquery best-other-tri pat material)) + (a0-22 (cond + ((or (= v1-19 (pat-material stone)) (= v1-19 (pat-material wood))) + 0 + ) + ((or (= v1-19 (pat-material dirt)) (= v1-19 (pat-material unknown))) + 1 + ) + ((= v1-19 (pat-material sand)) + 2 + ) + ((= v1-19 (pat-material quicksand)) + 3 + ) + ((= v1-19 (pat-material metal)) + 6 + ) + (else + 1 + ) + ) + ) + (v1-21 (-> *wvehicle-surfaces* (the-as uint a0-22))) + ) + (set! (-> gp-0 vec1 y) (- (-> gp-0 vec1 y) (-> v1-21 depth))) + ) + (set! (-> gp-0 vec2 quad) (-> gp-0 cquery best-other-tri normal quad)) + (when (< (-> gp-0 vec2 y) (cos 3640.889)) + (vector-reset! (-> gp-0 vec2)) + (set! (-> gp-0 vec2 y) 1.0) + ) + (set! (-> this root trans quad) (-> gp-0 vec1 quad)) + 0 + ) + (if (< f30-0 0.0) + 0 + ) + ) + (set! (-> this root trans quad) (-> gp-0 vec1 quad)) + (forward-up-nopitch->quaternion (-> this root quat) (-> gp-0 vec3) (-> gp-0 vec2)) + ) + 0 + (none) + ) + +(defmethod wvehicle-method-198 ((this wvehicle)) + (let ((gp-0 (new 'stack-no-clear 'wvehicle-physics-work))) + (set! (-> gp-0 ground-pos z) (seconds-per-frame)) + (let ((v1-2 (-> this info setup))) + (set! (-> gp-0 ground-pos y) (fmax (fmin (-> this gun-aim-yaw) (-> v1-2 gun-yaw-max)) (-> v1-2 gun-yaw-min))) + ) + (let* ((v1-4 (-> gp-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-4 rvec quad) a0-3) + (set! (-> v1-4 uvec quad) a1-0) + (set! (-> v1-4 fvec quad) a2-0) + (set! (-> v1-4 trans quad) a3-1) + ) + (set! (-> gp-0 tmp quad) (-> this turret-local-pos quad)) + (set-vector! (-> gp-0 probe-dir) (sin (-> gp-0 ground-pos y)) 0.0 (cos (-> gp-0 ground-pos y)) 1.0) + (vector+float*! (-> gp-0 steering-axis) (-> gp-0 tmp) (-> gp-0 probe-dir) 204800.0) + (vector-matrix*! (-> gp-0 local-pos) (-> gp-0 tmp) (-> gp-0 mat)) + (set! (-> this gun-targ-pitch) 0.0) + (set! (-> this gun-targ-yaw) (-> gp-0 ground-pos y)) + (vector-matrix*! (-> gp-0 p-body) (-> gp-0 steering-axis) (-> gp-0 mat)) + (set! (-> gp-0 p-body w) 163840.0) + (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)) + (the-as (pointer collide-shape) (-> s4-1 data)) + (-> s4-1 allocated-length) + ) + ) + ) + (set! (-> s4-1 length) (the-as int (-> gp-0 ground-normal-sum x))) + (let ((a0-14 (find-nearest-focusable + (the-as (array collide-shape) s4-1) + (-> gp-0 p-body) + 655360.0 + (search-info-flag attackable enemy attackable-priority high-priority) + (search-info-flag) + (-> gp-0 mat fvec) + (-> gp-0 local-pos) + 27306.666 + ) + ) + ) + (when a0-14 + (vector-! (-> gp-0 axis) (get-trans a0-14 3) (-> gp-0 local-pos)) + (matrix-transpose! (the-as matrix (-> gp-0 force)) (-> gp-0 mat)) + (vector-matrix*! (-> gp-0 dir) (-> gp-0 axis) (the-as matrix (-> gp-0 force))) + (vector-normalize! (-> gp-0 dir) 1.0) + (set! (-> this gun-targ-yaw) (atan (-> gp-0 dir x) (-> gp-0 dir z))) + (set! (-> this gun-targ-pitch) (asin (-> gp-0 dir y))) + 0 + ) + ) + ) + (let ((s4-4 (-> this info setup))) + (set! (-> this gun-targ-yaw) (fmax (fmin (-> this gun-targ-yaw) (-> s4-4 gun-yaw-max)) (-> s4-4 gun-yaw-min))) + (set! (-> this gun-targ-pitch) + (fmax (fmin (-> this gun-targ-pitch) (-> s4-4 gun-pitch-max)) (-> s4-4 gun-pitch-min)) + ) + (if (>= (-> s4-4 gun-yaw-max) 65536.0) + (set! (-> this gun-yaw) + (deg-seek + (-> this gun-yaw) + (-> this gun-targ-yaw) + (* 10.0 (fabs (deg- (-> this gun-yaw) (-> this gun-targ-yaw))) (-> gp-0 ground-pos z)) + ) + ) + (+! (-> this gun-yaw) + (* (- (-> this gun-targ-yaw) (-> this gun-yaw)) (fmin 1.0 (* 10.0 (-> gp-0 ground-pos z)))) + ) + ) + (+! (-> this gun-pitch) + (* (- (-> this gun-targ-pitch) (-> this gun-pitch)) (fmin 1.0 (* 10.0 (-> gp-0 ground-pos z)))) + ) + (set! (-> gp-0 ground-normal-sum y) (sin (-> this gun-yaw))) + (set! (-> gp-0 ground-normal-sum z) (cos (-> this gun-yaw))) + (set! (-> gp-0 ground-normal-sum w) (sin (-> this gun-pitch))) + (set! (-> gp-0 ground-pos x) (cos (-> this gun-pitch))) + (set-vector! + (-> gp-0 probe-dir) + (* (-> gp-0 ground-pos x) (-> gp-0 ground-normal-sum y)) + (-> gp-0 ground-normal-sum w) + (* (-> gp-0 ground-pos x) (-> gp-0 ground-normal-sum z)) + 1.0 + ) + (vector+float*! (-> gp-0 steering-axis) (-> gp-0 tmp) (-> gp-0 probe-dir) (-> s4-4 gun-z-offset)) + ) + (set! (-> this gun-local-dir quad) (-> gp-0 probe-dir quad)) + (set! (-> this gun-local-pos quad) (-> gp-0 steering-axis quad)) + ) + 0 + (none) + ) + +(defmethod wvehicle-method-199 ((this wvehicle)) + (let ((s5-0 (new 'stack-no-clear 'wvehicle-stack-type3))) + (set! (-> s5-0 float0) (vector-dot (-> this rbody lin-velocity) (-> this rbody matrix fvec))) + (if (and (cpad-hold? 0 square) (< (-> s5-0 float0) -20480.0)) + (set! (-> this lock-turret) (the-as basic #t)) + ) + (if (or (< 0.0 (-> s5-0 float0)) + (or (< 0.25 (fabs (analog-input (the-as int (-> *cpad-list* cpads 0 rightx)) 128.0 48.0 110.0 1.0))) + (logtest? (vehicle-flag camera-look-mode) (-> this v-flags)) + ) + ) + (set! (-> this lock-turret) #f) + ) + (cond + ((-> this lock-turret) + (set! (-> this gun-aim-yaw) 0.0) + ) + (else + (matrix-transpose! (-> s5-0 mat0) (-> this rbody matrix)) + (matrix*! (-> s5-0 mat0) (camera-matrix) (-> s5-0 mat0)) + (set! (-> s5-0 vec0 quad) (-> s5-0 mat0 fvec quad)) + (set! (-> this gun-aim-yaw) (atan (-> s5-0 vec0 x) (-> s5-0 vec0 z))) + ) + ) + ) + 0 + (wvehicle-method-198 this) + (none) + ) + +(defmethod wvehicle-method-201 ((this wvehicle) (arg0 float)) + 0 + (none) + ) + +(defmethod wvehicle-method-202 ((this wvehicle) (arg0 float)) + 0 + (none) + ) + +(deftype kill-player-process (process) + ((player handle) + (mode symbol) + ) + (:state-methods + idle + die + ) + ) + + +(defstate idle (kill-player-process) + :virtual #t + :trans (behavior () + (let* ((s5-0 (handle->process (-> self player))) + (gp-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (if (not gp-0) + (go-virtual die) + ) + (if (focus-test? (the-as process-focusable gp-0) dead) + (go-virtual die) + ) + (when (not (focus-test? (the-as process-focusable gp-0) grabbed)) + (if (send-event + gp-0 + '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 (-> self mode)) + ) + ) + ) + (go-virtual die) + ) + ) + ) + ) + :code sleep-code + ) + +(defstate die (kill-player-process) + :virtual #t + :code (behavior () + '() + ) + ) + +(defbehavior kill-player-process-init-by-other kill-player-process ((arg0 process) (arg1 symbol)) + (set! (-> self player) (process->handle arg0)) + (set! (-> self mode) arg1) + (go-virtual idle) + ) + +;; WARN: Return type mismatch process vs kill-player-process. +(defun kill-player-process-spawn ((arg0 process) (arg1 process) (arg2 symbol)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn kill-player-process arg0 arg2 :name "kill-player-process" :to arg1))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as kill-player-process gp-0) + ) + ) + +(defmethod vehicle-method-116 ((this wvehicle) (arg0 symbol)) + (dotimes (s4-0 (-> this info rider seat-count)) + (let* ((s3-0 (handle->process (-> this rider-array s4-0))) + (a1-3 (if (type? s3-0 process-focusable) + s3-0 + ) + ) + ) + (when (and a1-3 (logtest? (-> a1-3 mask) (process-mask target))) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag player-killed) (-> this v-flags)))) + (kill-player-process-spawn a1-3 a1-3 arg0) + ) + ) + (put-rider-in-seat this s4-0 (the-as process #f)) + ) + 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 f4b64216e6..74c965eeab 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle-wheel.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle-wheel.gc @@ -7,3 +7,436 @@ ;; DECOMP BEGINS +(deftype vehicle-wheel-init-params (structure) + ((skel skeleton-group) + (skel-blur skeleton-group) + (level symbol) + (radius float) + (collision-mesh-index int8) + (position vector :inline) + (rotation quaternion :inline) + (scale vector :inline) + ) + ) + + +(define *vehicle-wheel-constants* (new 'static 'rigid-body-object-constants + :info (new 'static 'rigid-body-info + :mass 1.0 + :inv-mass 1.0 + :linear-damping 0.995 + :angular-damping 0.995 + :bounce-factor 0.5 + :friction-factor 0.5 + :bounce-mult-factor 1.22 + :cm-offset-joint (new 'static 'vector :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 2) (meters 3) (meters 3)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 50) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*vehicle-wheel-constants* + ) + ) + +(deftype vehicle-wheel (rigid-body-object) + ((collision-enable? symbol) + (normal-look lod-set :inline) + (blur-look lod-set :inline) + ) + (:state-methods + explode + fade-out + die + ) + (:methods + (init-collision! (_type_ vehicle-wheel-init-params) none :replace) + ) + ) + + +(defmethod init-collision! ((this vehicle-wheel) (arg0 vehicle-wheel-init-params)) + (cond + ((< (-> arg0 collision-mesh-index) 0) + (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-0 reaction) cshape-reaction-default) + (set! (-> s4-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s4-0 penetrate-using) (penetrate vehicle)) + (let ((v1-8 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (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 (-> arg0 radius)) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-8) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-11 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + ) + (else + (let ((s4-1 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-1 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-1 reaction) cshape-reaction-default) + (set! (-> s4-1 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s4-1 penetrate-using) (penetrate vehicle)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-1 (the-as uint 2) 0))) + (set! (-> s4-1 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 (-> arg0 radius)) + (set! (-> s4-1 root-prim) s3-0) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-sphere s4-1 (the-as uint 0)))) + (set! (-> v1-24 prim-core action) (collide-action solid)) + (set! (-> v1-24 transform-index) 0) + (set-vector! (-> v1-24 local-sphere) 0.0 0.0 0.0 (-> arg0 radius)) + ) + (let ((v1-26 + (new 'process 'collide-shape-prim-mesh s4-1 (the-as uint (-> arg0 collision-mesh-index)) (the-as uint 0)) + ) + ) + (set! (-> v1-26 prim-core action) (collide-action solid rideable)) + (set! (-> v1-26 transform-index) 3) + (set-vector! (-> v1-26 local-sphere) 0.0 0.0 0.0 (-> arg0 radius)) + ) + (set! (-> s4-1 nav-radius) (* 0.75 (-> s4-1 root-prim local-sphere w))) + (let ((v1-29 (-> s4-1 root-prim))) + (set! (-> s4-1 backup-collide-as) (-> v1-29 prim-core collide-as)) + (set! (-> s4-1 backup-collide-with) (-> v1-29 prim-core collide-with)) + ) + (set! (-> this root) s4-1) + ) + ) + ) + (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 + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> arg0 prim-core collide-as) (collide-spec vehicle-sphere-no-probe)) + ) + ((= v1-0 1) + (set! (-> arg0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> arg0 prim-core collide-as) (collide-spec vehicle-mesh-no-block-use)) + ) + ((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 vehicle-mesh-no-block-use vehicle-sphere-no-probe)) + ) + ) + ) + (none) + ) + ) + 0 + (none) + ) + +(defmethod init-rbody-control! ((this vehicle-wheel)) + (alloc-rbody-control! this *vehicle-wheel-constants*) + (logior! (-> this rbody flags) (rigid-body-flag enable-collision)) + (set! (-> this root max-iteration-count) (the-as uint 3)) + (set! (-> this max-time-step) 0.033333335) + (set! (-> this draw shadow-ctrl) + (new 'process 'shadow-control -43008.0 -2048.0 69632.0 (the-as vector #f) (shadow-flags) 245760.0) + ) + (set! (-> this focus-status) + (the-as focus-status (logior (focus-status gun-no-target) (-> this focus-status))) + ) + 0 + (none) + ) + +(defmethod rigid-body-object-method-30 ((this vehicle-wheel)) + (ja-post) + (if (logtest? (-> this rbody flags) (rigid-body-flag enable-collision)) + (update-transforms (-> this root)) + ) + 0 + (none) + ) + +(defmethod rbody-post ((this vehicle-wheel)) + (let ((v1-0 (new 'stack-no-clear 'rigid-body-move-work))) + (set! (-> v1-0 cquery start-pos quad) (-> this rbody position quad)) + (vector-float*! (-> v1-0 cquery move-dist) (-> this rbody lin-velocity) (seconds-per-frame)) + (let ((a0-4 (-> v1-0 cquery))) + (set! (-> a0-4 radius) (+ 4096.0 (-> this root root-prim local-sphere w))) + (set! (-> a0-4 collide-with) (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + player-list + collectable + blocking-plane + pusher + vehicle-mesh-probeable + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> a0-4 ignore-process0) this) + (set! (-> a0-4 ignore-process1) #f) + (set! (-> a0-4 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nopilot #x1 :probe #x1)) + (set! (-> a0-4 action-mask) (collide-action solid)) + ) + (fill-using-line-sphere *collide-cache* (-> v1-0 cquery)) + ) + (if *display-collide-cache* + (debug-draw *collide-cache*) + ) + (rigid-body-object-method-32 this) + (rigid-body-object-method-38 this) + (update-rbody-transform! (-> this rbody) (-> this root)) + (rigid-body-object-method-30 this) + 0 + (none) + ) + +(defstate idle (vehicle-wheel) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-2 object)) + (case message + (('explode) + (lods-assign! (-> self draw) (-> self normal-look)) + (let ((a0-4 (-> self draw color-mult))) + (vector-float*! (the-as vector a0-4) (the-as vector a0-4) 0.25) + ) + (set! (-> self rbody position quad) (-> self root trans quad)) + (quaternion-copy! (the-as quaternion (-> self rbody rot)) (-> self root quat)) + (let ((v1-10 (-> block param 0))) + (when v1-10 + (vector-float*! (-> self rbody lin-momentum) (the-as vector v1-10) (-> self info info mass)) + (go-virtual explode) + ) + ) + ) + (('enable-collision) + (set! v0-2 (logior (-> self rbody flags) (rigid-body-flag enable-collision))) + (set! (-> self rbody flags) (the-as rigid-body-flag v0-2)) + v0-2 + ) + (('disable-collision) + (set! v0-2 (logclear (-> self rbody flags) (rigid-body-flag enable-collision))) + (set! (-> self rbody flags) (the-as rigid-body-flag v0-2)) + v0-2 + ) + (('hide) + (set! v0-2 (logior (-> self draw status) (draw-control-status no-draw))) + (set! (-> self draw status) (the-as draw-control-status v0-2)) + v0-2 + ) + (('unhide) + (set! v0-2 (logclear (-> self draw status) (draw-control-status no-draw))) + (set! (-> self draw status) (the-as draw-control-status v0-2)) + v0-2 + ) + ) + ) + :enter (behavior () + (iterate-prims + (-> self 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)) + (set! (-> arg0 prim-core collide-as) (collide-spec)) + 0 + ) + ((or (= v1-0 1) (zero? v1-0)) + (set! (-> arg0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> arg0 prim-core collide-as) (collide-spec vehicle-mesh-no-block-use)) + ) + ) + ) + (none) + ) + ) + ) + :trans #f + :post (behavior () + (rigid-body-object-method-30 self) + ) + ) + +(defstate explode (vehicle-wheel) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('impact-impulse) + (logior! (-> self root penetrated-by) (penetrate vehicle)) + #t + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self rbody flags) (rigid-body-flag enable-physics)) + (iterate-prims + (-> self root) + (lambda ((arg0 collide-shape-prim)) + (let ((v1-0 (-> arg0 prim-core prim-type))) + (cond + ((or (= v1-0 -1) (zero? v1-0)) + (set! (-> arg0 prim-core collide-with) (collide-spec + backgnd + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> arg0 prim-core collide-as) (collide-spec vehicle-sphere-no-probe)) + ) + ((= v1-0 1) + (set! (-> arg0 prim-core collide-with) (collide-spec)) + (set! (-> arg0 prim-core collide-as) (collide-spec)) + 0 + ) + ) + ) + (none) + ) + ) + ) + :trans #f + :code sleep-code + :post (behavior () + (rbody-post self) + (if (time-elapsed? (-> self state-time) (seconds 4)) + (go-virtual fade-out) + ) + ) + ) + +(defstate fade-out (vehicle-wheel) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self draw status) (draw-control-status force-fade)) + ) + :code sleep-code + :post (behavior () + (set! (-> self draw force-fade) + (the-as + uint + (the int (fmax 0.0 (- 128.0 (* 0.42666668 (the float (- (current-time) (-> self state-time))))))) + ) + ) + (if (< (-> self draw force-fade) (the-as uint 2)) + (go-virtual die) + ) + (rbody-post self) + ) + ) + +(defstate die (vehicle-wheel) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + +(defbehavior vehicle-wheel-init-by-other vehicle-wheel ((arg0 vehicle-wheel-init-params)) + (logior! (-> self mask) (process-mask vehicle)) + (init-collision! self arg0) + (set! (-> self root trans quad) (-> arg0 position quad)) + (quaternion-copy! (-> self root quat) (-> arg0 rotation)) + (set! (-> self root scale quad) (-> arg0 scale quad)) + (set! (-> self level) (the-as level (-> arg0 level))) + (initialize-skeleton self (-> arg0 skel) (the-as pair 0)) + (setup-lods! (-> self normal-look) (-> arg0 skel) (-> self draw art-group) (-> self entity)) + (setup-lods! (-> self blur-look) (-> arg0 skel-blur) (-> self draw art-group) (-> self entity)) + (set! (-> self normal-look lod 0 dist) 819200.0) + (set! (-> self blur-look lod 0 dist) 819200.0) + (set! (-> self draw lod-set lod 0 dist) 819200.0) + (let ((f0-6 (fmax (fmax (fabs (-> arg0 scale x)) (fabs (-> arg0 scale y))) (fabs (-> arg0 scale z))))) + (set! (-> self draw bounds w) (* (-> arg0 skel bounds w) f0-6)) + (set! (-> self draw longest-edge) (* (-> arg0 skel longest-edge) f0-6)) + ) + (init-rbody-control! self) + (go-virtual idle) + ) + +;; WARN: Return type mismatch process vs vehicle-wheel. +(defun vehicle-wheel-spawn ((arg0 process) (arg1 vehicle-wheel-init-params)) + (let ((gp-0 (the-as process #f))) + (let* ((s3-0 (get-process *default-dead-pool* vehicle-wheel #x4000 1)) + (v1-1 (when s3-0 + (let ((t9-1 (method-of-type process activate))) + (t9-1 s3-0 arg0 "vehicle-wheel" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-0 vehicle-wheel-init-by-other arg1) + (-> s3-0 ppointer) + ) + ) + ) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as vehicle-wheel gp-0) + ) + ) diff --git a/goal_src/jak3/levels/desert/wvehicle/wvehicle.gc b/goal_src/jak3/levels/desert/wvehicle/wvehicle.gc index 79f5686336..4266766bff 100644 --- a/goal_src/jak3/levels/desert/wvehicle/wvehicle.gc +++ b/goal_src/jak3/levels/desert/wvehicle/wvehicle.gc @@ -7,3 +7,1285 @@ ;; DECOMP BEGINS +(defmethod wvehicle-method-166 ((this wvehicle) (arg0 float) (arg1 float)) + (let* ((v1-0 (-> this info)) + (f0-0 (-> this engine-max-torque)) + (f1-3 (* (+ 1.0 (-> v1-0 engine drag)) + (if (< arg0 (-> v1-0 engine max-rpm)) + 1.0 + 0.0 + ) + (fmax (-> this idle-throttle) arg1) + ) + ) + (f2-5 0.2) + (f3-2 1.0) + (f4-2 (/ (- arg0 (-> v1-0 engine peak-torque-rpm)) (-> v1-0 engine powerband-width-rpm))) + ) + (* f0-0 (+ (* f1-3 (fmax f2-5 (- f3-2 (* f4-2 f4-2)))) + (* -1.0 (/ arg0 (-> v1-0 engine peak-torque-rpm)) (-> v1-0 engine drag)) + ) + ) + ) + ) + +(defmethod wvehicle-method-164 ((this wvehicle) (arg0 vehicle-wheel-state) (arg1 vehicle-wheel-info)) + (let ((gp-0 (new 'stack-no-clear 'wvehicle-stack-type6))) + (set-vector! (-> gp-0 vec0) 1.0 0.0 0.0 1.0) + (set-vector! (-> gp-0 vec1) 0.0 1.0 0.0 1.0) + (quaternion-copy! (-> gp-0 quat3) (-> this root quat)) + (let* ((v1-3 (-> gp-0 mat0)) + (a3-0 (-> this rbody matrix)) + (a0-7 (-> a3-0 rvec quad)) + (a1-2 (-> a3-0 uvec quad)) + (a2-1 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-3 rvec quad) a0-7) + (set! (-> v1-3 uvec quad) a1-2) + (set! (-> v1-3 fvec quad) a2-1) + (set! (-> v1-3 trans quad) a3-1) + ) + (set! (-> gp-0 vec2 quad) (-> arg1 local-pos quad)) + (+! (-> gp-0 vec2 x) (-> arg1 susp-arm-length)) + (set! (-> gp-0 vec2 x) (* (-> gp-0 vec2 x) (-> arg0 x-scale))) + (+! (-> gp-0 vec2 y) (-> arg1 probe-y-offset)) + (vector+float*! + (-> arg0 probe-local-pos) + (-> gp-0 vec2) + (-> arg0 local-axis) + (* (-> arg1 steer-arm-length) (-> arg0 x-scale)) + ) + (set! (-> gp-0 float0) + (+ (-> arg1 probe-y-offset) (* (-> arg1 radius) (-> arg1 scale)) (* -1.0 (-> arg0 pos2) (-> arg1 travel))) + ) + (set! (-> arg0 sin-susp-ang) (fmax -1.0 (fmin 1.0 (/ (-> gp-0 float0) (-> arg1 susp-arm-length))))) + (let ((f0-21 1.0) + (f1-11 (-> arg0 sin-susp-ang)) + ) + (set! (-> arg0 cos-susp-ang) (sqrtf (- f0-21 (* f1-11 f1-11)))) + ) + (quaternion-identity! (-> gp-0 quat4)) + (set! (-> gp-0 quat4 z) (* (sin (-> arg1 camber)) (-> arg0 x-scale))) + (set! (-> gp-0 quat4 w) (cos (-> arg1 camber))) + (when (logtest? (-> arg1 flags) (vehicle-wheel-flag vwf5)) + (quaternion-set! + (-> gp-0 quat0) + 0.0 + 0.0 + (* (-> arg0 sin-susp-ang) (-> arg0 x-scale)) + (+ 1.0 (-> arg0 cos-susp-ang)) + ) + (quaternion-normalize! (-> gp-0 quat0)) + (quaternion*! (-> gp-0 quat4) (-> gp-0 quat4) (-> gp-0 quat0)) + ) + (set! (-> gp-0 vec2 quad) (-> arg1 local-pos quad)) + (+! (-> gp-0 vec2 x) (* (-> arg1 susp-arm-length) (-> arg0 cos-susp-ang))) + (set! (-> gp-0 vec2 x) (* (-> gp-0 vec2 x) (-> arg0 x-scale))) + (+! (-> gp-0 vec2 y) (-> gp-0 float0)) + (vector+float*! + (-> gp-0 vec2) + (-> gp-0 vec2) + (-> arg0 local-axis) + (* (-> arg1 steer-arm-length) (-> arg0 x-scale)) + ) + (vector-matrix*! (-> gp-0 vec3) (-> gp-0 vec2) (-> gp-0 mat0)) + (quaternion-vector-angle! (-> gp-0 quat2) (-> gp-0 vec1) (-> arg0 steer-angle)) + (quaternion-vector-angle! (-> gp-0 quat1) (-> gp-0 vec0) (-> arg0 angle)) + (quaternion*! (-> gp-0 quat0) (-> gp-0 quat2) (-> gp-0 quat4)) + (quaternion*! (-> gp-0 quat0) (-> gp-0 quat0) (-> gp-0 quat1)) + (quaternion*! (-> arg0 quat) (-> gp-0 quat3) (-> gp-0 quat0)) + (set! (-> arg0 trans quad) (-> gp-0 vec3 quad)) + ) + 0 + (none) + ) + +(defmethod wvehicle-method-165 ((this wvehicle)) + (let ((s5-0 (new 'stack-no-clear 'vehicle-controls))) + (set! (-> s5-0 steering) (seconds-per-frame)) + (dotimes (s4-0 (-> this info physics-model wheel-count)) + (let* ((a1-0 (-> this wheel s4-0)) + (a2-0 (-> a1-0 info)) + ) + (let* ((f0-1 (-> a1-0 pos2)) + (f1-1 (- (-> a1-0 pos) (-> a1-0 pos2))) + (f2-1 1.0) + (f3-0 (-> s5-0 steering)) + (f4-0 (-> a1-0 forward-vel)) + (f4-2 (* f4-0 f4-0)) + (f5-0 (-> a1-0 up-vel)) + (f4-3 (+ f4-2 (* f5-0 f5-0))) + (f5-3 8192.0) + (f3-1 (* f3-0 (fmin f4-3 (* f5-3 f5-3)))) + (f4-5 15.0) + (f5-6 8192.0) + ) + (set! (-> a1-0 pos2) (+ f0-1 (* f1-1 (fmin f2-1 (* f3-1 (/ f4-5 (* f5-6 f5-6))))))) + ) + (set! (-> a1-0 angle) + (the float (sar (shl (the int (+ (-> a1-0 angle) (* 10430.379 (-> a1-0 rev) (-> s5-0 steering)))) 48) 48)) + ) + ((-> a2-0 callback) this a1-0 a2-0) + ) + ) + ) + (let ((s5-1 (new 'stack-no-clear 'matrix))) + (let ((a2-1 (-> this draw shadow-ctrl settings))) + (vector+float*! (-> s5-1 rvec) (-> a2-1 center) (-> a2-1 shadow-dir) (-> a2-1 shadow-dir w)) + ) + 0 + (dotimes (s4-1 (-> this info physics-model wheel-count)) + (let ((s3-0 (-> this wheel s4-1))) + (-> s3-0 info) + (let ((s2-0 (handle->process (-> s3-0 handle)))) + (cond + (s2-0 + (let ((s1-0 (-> (the-as process-focusable s2-0) draw shadow-ctrl settings))) + (vector-! (-> s5-1 uvec) (-> s5-1 rvec) (-> s1-0 center)) + (vector-normalize! (-> s5-1 uvec) 1.0) + (mem-copy! (the-as pointer s1-0) (the-as pointer (-> this draw shadow-ctrl settings)) 80) + (set! (-> s5-1 uvec w) (-> s1-0 shadow-dir w)) + (set! (-> s1-0 shadow-dir quad) (-> s5-1 uvec quad)) + ) + (let ((v1-39 (-> (the-as process-focusable s2-0) root))) + (set! (-> v1-39 trans quad) (-> s3-0 trans quad)) + (quaternion-copy! (-> v1-39 quat) (-> s3-0 quat)) + ) + (logand! (-> s3-0 flags) -9) + (cond + ((< 11.780972 (fabs (-> s3-0 rev))) + (when (not (logtest? (-> s3-0 flags) 1)) + (logior! (-> s3-0 flags) 1) + (lods-assign! (-> (the-as process-focusable s2-0) draw) (the-as lod-set (&-> s2-0 stack 216))) + ) + ) + (else + (when (logtest? (-> s3-0 flags) 1) + (logand! (-> s3-0 flags) -2) + (lods-assign! (-> (the-as process-focusable s2-0) draw) (the-as lod-set (&-> s2-0 stack 164))) + ) + ) + ) + ) + (else + (logior! (-> s3-0 flags) 8) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod clear-impulse-force-flag! ((this wvehicle)) + (let ((t9-0 (method-of-type vehicle clear-impulse-force-flag!))) + (t9-0 this) + ) + (when (logtest? (vehicle-flag waiting-for-player) (-> this v-flags)) + (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-77 ((this wvehicle)) + (local-vars (a0-19 float) (a0-23 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (if (-> this nav) + (logior! (-> this nav flags) (nav-control-flag output-sphere-hash)) + ) + (if (not (logtest? (-> this rbody flags) (rigid-body-flag enable-physics))) + (vehicle-method-142 this) + ) + (if (logtest? (-> this v-flags) (vehicle-flag in-air)) + (set! (-> this ground-time) (the-as uint (current-time))) + ) + (let ((v1-16 (-> this rbody))) + (cond + ((logtest? (vehicle-flag overturned) (-> this v-flags)) + (if (and (not (logtest? (-> this v-flags) (vehicle-flag in-air))) (< 0.0 (-> v1-16 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-16 matrix uvec y) 0.0) + (let ((a0-18 (-> v1-16 lin-velocity)) + (f1-2 16384.0) + ) + (.lvf vf1 (&-> a0-18 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-19 vf1) + (< a0-19 (* f1-2 f1-2)) + ) + (let ((a0-22 (-> v1-16 ang-velocity)) + (f1-5 4.0) + ) + (.lvf vf1 (&-> a0-22 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-23 vf1) + (< a0-23 (* f1-5 f1-5)) + ) + ) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag overturned) (-> this v-flags)))) + (set! (-> this overturned-time) (the-as uint (current-time))) + ) + ) + ) + (if (and (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (< (+ 8192.0 (-> v1-16 position y)) (-> this water-height)) + ) + (go (method-of-object this sink)) + ) + ) + (when (logtest? (vehicle-flag player-driving net-player-driving) (-> this v-flags)) + (when (and (logtest? (-> this controls flags) (vehicle-controls-flag vcf1)) + (>= (the-as uint (- (current-time) (the-as int (-> this shoot-time)))) (-> this shoot-delay)) + ) + (set! (-> this shoot-time) (the-as uint (current-time))) + (wvehicle-method-169 this) + ) + ) + (when (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (let ((v1-39 *game-info*)) + (set! (-> v1-39 health-bar-vehicle) (-> this hit-points)) + (set! (-> v1-39 race-number-turbos) (the int (-> this turbo-supply))) + (set! (-> v1-39 vehicle-turbo-ready) (-> this turbo-ready)) + ) + (new 'stack-no-clear 'vector) + (dotimes (s5-0 (-> this info rider attach-point-count)) + (let* ((s3-0 (handle->process (-> this attached-array s5-0))) + (s4-0 (if (type? s3-0 process-focusable) + s3-0 + ) + ) + ) + (when (and s4-0 (focus-test? (the-as process-focusable s4-0) pilot-riding)) + (wvehicle-method-171 this (-> (the-as process-focusable s4-0) root trans) s5-0) + (wvehicle-method-172 this (-> (the-as process-focusable s4-0) root quat) s5-0) + ) + ) + ) + 0 + ) + ((method-of-type vehicle vehicle-method-77) this) + (none) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod rigid-body-object-method-30 ((this wvehicle)) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag sounds)))) + (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)))) + ) + ) + (let ((v1-8 (new 'stack-no-clear 'matrix))) + (set! (-> v1-8 fvec x) (seconds-per-frame)) + (set! (-> v1-8 uvec quad) (-> this draw color-emissive quad)) + (set! (-> v1-8 uvec x) (fmax 0.0 (+ (-> v1-8 uvec x) (* -2.0 (-> v1-8 fvec x))))) + (set! (-> this draw color-emissive quad) (-> v1-8 uvec quad)) + ) + (let ((t9-0 (method-of-type vehicle rigid-body-object-method-30))) + (t9-0 this) + ) + (wvehicle-method-165 this) + (vector-reset! (-> this surface-velocity)) + (dotimes (v1-15 (-> this info physics-model wheel-count)) + (let ((a0-13 (-> this wheel v1-15))) + (set! (-> a0-13 prev-flags) (-> a0-13 flags)) + ) + ) + (none) + ) + +(defmethod wvehicle-method-162 ((this wvehicle) (arg0 float)) + (let ((s5-0 (-> this info))) + (let ((s4-0 (new 'stack-no-clear 'wvehicle-physics-work))) + (let ((f0-0 (-> this engine-rev))) + (set! (-> s4-0 mat uvec x) (* 9.549297 f0-0)) + ) + (set! (-> s4-0 mat uvec z) 1.0) + (if (or (= 0.0 (-> this controls throttle)) + (and (logtest? (vehicle-flag turbo-boost) (-> this v-flags)) + (= (-> this gear-select) (+ (-> s5-0 transmission gear-count) -1)) + (< (-> s5-0 transmission upshift-rpm) (-> s4-0 mat uvec x)) + ) + ) + (set! (-> s4-0 mat uvec z) 0.0) + ) + (set! (-> this engine-rpm) (-> s4-0 mat uvec x)) + (set! (-> s4-0 mat uvec w) (the-as float (current-time))) + (vector-! (the-as vector (-> s4-0 mat)) (-> this rbody lin-velocity) (-> this surface-velocity)) + (when (not (logtest? (-> this v-flags) (vehicle-flag in-air))) + (let ((f0-12 (* (/ (fmax 0.0 (vector-dot (the-as vector (-> s4-0 mat)) (-> this rbody matrix fvec))) + (-> this avg-drive-wheel-radius) + ) + (-> this gear-ratio) + (-> this final-drive-ratio) + ) + ) + ) + (set! (-> s4-0 mat uvec y) (* 9.549297 f0-12)) + ) + (cond + ((logtest? (vehicle-flag reverse-gear) (-> this v-flags)) + (set! (-> this next-gear-select) 0) + 0 + ) + ((and (zero? (-> this gear-select)) (not (logtest? (vehicle-flag reverse-gear) (-> this v-flags)))) + (set! (-> this next-gear-select) 1) + ) + ((and (< (-> s5-0 transmission upshift-rpm) (-> s4-0 mat uvec y)) + (and (< (-> this gear-select) (+ (-> s5-0 transmission gear-count) -1)) + (> (-> this gear-select) 0) + (= (-> this clutch-grab) 1.0) + (< 0.5 (-> this controls throttle)) + ) + ) + (set! (-> this next-gear-select) (+ (-> this gear-select) 1)) + ) + ((and (< (-> s4-0 mat uvec y) (-> s5-0 transmission downshift-rpm)) (< 1 (-> this gear-select))) + (set! (-> this next-gear-select) (+ (-> this gear-select) -1)) + ) + ) + ) + (let ((v1-47 (-> this shift-state))) + (cond + ((zero? v1-47) + (cond + ((>= 1 (-> this gear-select)) + (cond + ((or (< (-> s4-0 mat uvec x) (-> s5-0 engine clutch-min-rpm)) (= (-> this controls throttle) 0.0)) + (seek! (-> this clutch-grab) 0.0 (* 16.0 arg0)) + ) + ((or (< (-> s5-0 engine clutch-max-rpm) (-> s4-0 mat uvec x)) + (and (< 0.0 (-> this clutch-grab)) (< (-> s5-0 engine peak-torque-rpm) (-> s4-0 mat uvec x))) + ) + (seek! (-> this clutch-grab) (-> s4-0 mat uvec z) (* 3.0 arg0)) + ) + (else + (seek! (-> this clutch-grab) 0.0 (* 3.0 arg0)) + ) + ) + ) + (else + (seek! (-> this clutch-grab) (-> s4-0 mat uvec z) (* 8.0 arg0)) + ) + ) + (when (!= (-> this next-gear-select) (-> this gear-select)) + (set! (-> this shift-state) (the-as uint 1)) + (set! (-> this shift-time) (the-as uint (-> s4-0 mat uvec w))) + ) + ) + ((= v1-47 1) + (seek! (-> this clutch-grab) 0.0 (* 16.0 arg0)) + (when (= (-> this clutch-grab) 0.0) + (set! (-> this shift-state) (the-as uint 2)) + (set! (-> this shift-time) (the-as uint (-> s4-0 mat uvec w))) + ) + ) + ((= v1-47 2) + (set! (-> this gear-select) (-> this next-gear-select)) + (when (< (the-as uint 15) (- (the-as uint (-> s4-0 mat uvec w)) (the-as uint (-> this shift-time)))) + (set! (-> this shift-state) (the-as uint 3)) + (set! (-> this shift-time) (the-as uint (-> s4-0 mat uvec w))) + ) + ) + ((= v1-47 3) + (seek! (-> this clutch-grab) (-> s4-0 mat uvec z) (* 8.0 arg0)) + (when (!= (-> this next-gear-select) (-> this gear-select)) + (set! (-> this shift-state) (the-as uint 1)) + (set! (-> this shift-time) (the-as uint (-> s4-0 mat uvec w))) + ) + (when (= (-> this clutch-grab) (-> s4-0 mat uvec z)) + (set! (-> this shift-state) (the-as uint 0)) + (set! (-> this shift-time) (the-as uint (-> s4-0 mat uvec w))) + ) + ) + ) + ) + ) + (set! (-> this gear-ratio) (-> s5-0 transmission gear-ratio-array (-> this gear-select))) + (set! (-> this final-drive-ratio) (-> s5-0 transmission final-drive-ratio)) + (set! (-> this total-gear-ratio) (* (-> this final-drive-ratio) (-> this gear-ratio))) + (set! (-> this inv-total-gear-ratio) (/ 1.0 (-> this total-gear-ratio))) + (set! (-> this engine-max-torque) (-> s5-0 engine max-torque)) + (set! (-> this clutch-inertia) (* 0.0 (-> s5-0 transmission inertia))) + ) + 0 + (none) + ) + +(defmethod wvehicle-method-163 ((this wvehicle)) + (let ((s5-0 (-> this info)) + (s4-0 (new 'stack-no-clear 'matrix)) + ) + (set! (-> s4-0 rvec z) (-> this controls throttle)) + (set! (-> s4-0 uvec x) (vector-dot (the-as vector (-> this rbody matrix)) (-> this rbody ang-velocity))) + (set! (-> s4-0 rvec w) (-> this rbody matrix fvec y)) + (set! (-> s4-0 uvec y) (+ (-> s4-0 rvec w) (* -1.0 (-> s4-0 uvec x)))) + (if (and (< (cos 12743.111) (-> s4-0 rvec w)) + (< (-> s4-0 uvec x) -0.1) + (and (< 1.0 (-> s4-0 uvec y)) + (not (logtest? (-> this wheel 0 flags) 2)) + (not (logtest? (-> this wheel 1 flags) 2)) + (logtest? (-> this wheel 2 flags) 2) + (logtest? (-> this wheel 3 flags) 2) + ) + ) + (set! (-> s4-0 rvec z) 0.0) + ) + (set! (-> this engine-torque) (wvehicle-method-166 this (-> this engine-rpm) (-> s4-0 rvec z))) + (let ((f0-13 0.0)) + (dotimes (v1-23 (-> s5-0 physics-model wheel-count)) + (let ((a0-9 (-> this wheel v1-23 info))) + (if (logtest? (-> a0-9 flags) (vehicle-wheel-flag vwf0)) + (+! f0-13 (-> a0-9 inertia)) + ) + ) + ) + (set! (-> this drive-wheel-inertia) f0-13) + (let* ((f1-6 (-> this final-drive-ratio)) + (f1-8 (* f1-6 f1-6)) + (f2-1 (-> s5-0 transmission inertia)) + (f3-0 (-> this gear-ratio)) + ) + (set! (-> this wheel-inertia) + (+ f0-13 + (* f1-8 + (+ f2-1 (* f3-0 f3-0 (+ (-> this clutch-inertia) (* (-> s5-0 engine inertia) (-> this clutch-grab))))) + ) + ) + ) + ) + ) + (set! (-> s4-0 rvec x) (* (/ 1.0 (the float (-> s5-0 physics-model drive-wheel-count))) + (-> this engine-torque) + (-> this clutch-grab) + (-> this total-gear-ratio) + ) + ) + (set! (-> this wheel-torque) 0.0) + (set! (-> this wheel-braking-torque) 0.0) + (set! (-> this wheel-ground-torque) 0.0) + (dotimes (v1-31 (-> s5-0 physics-model wheel-count)) + (let* ((a0-14 (-> this wheel v1-31)) + (a1-5 (-> a0-14 info)) + ) + (set! (-> a0-14 torque) 0.0) + (set! (-> a0-14 braking-torque) 0.0) + (set! (-> a0-14 inertia) (-> a1-5 inertia)) + (let ((f0-26 0.0)) + (if (logtest? (-> a1-5 flags) (vehicle-wheel-flag vwf1)) + (+! f0-26 (-> this controls brake)) + ) + (if (logtest? (-> a1-5 flags) (vehicle-wheel-flag vwf2)) + (+! f0-26 (-> this controls handbrake)) + ) + (+! (-> a0-14 braking-torque) (* (fmin 1.0 f0-26) (-> a1-5 max-brake-torque) (-> s5-0 handling brake-factor))) + ) + (+! (-> this wheel-braking-torque) (-> a0-14 braking-torque)) + (when (logtest? (-> a1-5 flags) (vehicle-wheel-flag vwf0)) + (set! (-> a0-14 inertia) (-> this wheel-inertia)) + (set! (-> a0-14 torque) (-> s4-0 rvec x)) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-92 ((this wvehicle) (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))) + (set! (-> this controls handbrake) (-> arg0 handbrake)) + (let ((f0-11 (-> arg0 throttle)) + (f30-0 (-> arg0 brake)) + ) + (set! f30-0 + (cond + ((< 0.0 f0-11) + (logclear! (-> this v-flags) (vehicle-flag reverse-gear)) + (if (< (-> this wheel-rev) -1.5) + (set! f30-0 1.0) + ) + f30-0 + ) + ((< 0.0 f30-0) + (cond + ((logtest? (vehicle-flag reverse-gear) (-> this v-flags)) + (set! f0-11 f30-0) + 0.0 + ) + (else + (let ((v1-13 (new 'stack-no-clear 'vector))) + (vector-! (the-as vector (&-> v1-13 x)) (-> this rbody lin-velocity) (-> this surface-velocity)) + (if (< (vector-dot (the-as vector (&-> v1-13 x)) (-> this rbody matrix fvec)) 40960.0) + (logior! (-> this v-flags) (vehicle-flag reverse-gear)) + ) + ) + f30-0 + ) + ) + ) + (else + (logclear! (-> this v-flags) (vehicle-flag reverse-gear)) + f30-0 + ) + ) + ) + (case (-> this shift-state) + ((1 2) + (set! f0-11 0.0) + ) + ) + (seek! (-> this controls throttle) f0-11 (* 8.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 vehicle-method-88 ((this wvehicle) (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))))) + (set! (-> arg0 handbrake) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton 5))))) + (cond + ((-> *setting-control* user-current jump) + (if (cpad-hold? 0 l1) + (logior! (-> arg0 flags) (vehicle-controls-flag vcf0)) + ) + ) + (else + (logclear! (-> this controls flags) (vehicle-controls-flag vcf0)) + (logclear! (-> this controls prev-flags) (vehicle-controls-flag vcf0)) + ) + ) + (if (and (cpad-hold? 0 r1) (-> *setting-control* user-current gun)) + (logior! (-> arg0 flags) (vehicle-controls-flag vcf1)) + ) + (if (and (cpad-hold? 0 r2) (-> *setting-control* user-current turbo)) + (logior! (-> arg0 flags) (vehicle-controls-flag vcf2)) + ) + (if (cpad-pressed? 0 r3) + (set! (-> this v-flags) (the-as vehicle-flag (logxor (shl #x8000 16) (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-inside-view)))) + ) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag camera-look-mode)))) + (if (logtest? (vehicle-flag camera-inside-view) (-> this v-flags)) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag camera-look-mode) (-> this v-flags)))) + ) + (if (cpad-pressed? 0 l2) + (set! (-> this cam-view) 1) + ) + (cond + ((cpad-hold? 0 l2) + (let ((f30-0 (analog-input (the-as int (-> *cpad-list* cpads 0 rightx)) 128.0 48.0 110.0 -1.0)) + (f0-8 (analog-input (the-as int (-> *cpad-list* cpads 0 righty)) 128.0 48.0 110.0 -1.0)) + ) + (cond + ((< (fabs f0-8) (fabs f30-0)) + (cond + ((< f30-0 -0.5) + (set! (-> this cam-view) 3) + ) + ((< 0.5 f30-0) + (set! (-> this cam-view) 2) + ) + ) + ) + (else + (cond + ((< 0.5 f0-8) + (set! (-> this cam-view) 0) + 0 + ) + ((< f0-8 -0.5) + (set! (-> this cam-view) 1) + ) + ) + ) + ) + ) + ) + (else + (set! (-> this cam-view) 0) + 0 + ) + ) + (if (nonzero? (-> this cam-view)) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag camera-look-mode) (-> this v-flags)))) + ) + 0 + (none) + ) + +(defmethod vehicle-method-94 ((this wvehicle)) + (let ((t9-0 (method-of-type vehicle vehicle-method-94))) + (t9-0 this) + ) + (set-setting! 'string-camera-floor 'abs (+ 12288.0 (-> this water-height)) 0) + (cond + ((logtest? (vehicle-flag reverse-gear) (-> this v-flags)) + (let ((v1-6 (process->ppointer this))) + (set-setting! 'butt-handle v1-6 32768.0 (-> v1-6 0 pid)) + ) + ) + (else + (remove-setting! 'butt-handle) + ) + ) + (let ((f0-2 (vector-vector-distance-squared (-> this draw origin) (math-camera-pos))) + (f1-1 (-> this draw origin w)) + ) + (if (< f0-2 (* f1-1 f1-1)) + (logclear! (-> this draw status) (draw-control-status force-vu1)) + (logior! (-> this draw status) (draw-control-status force-vu1)) + ) + ) + 0 + (none) + ) + +(defmethod vehicle-method-93 ((this wvehicle)) + (let ((t9-0 (method-of-type vehicle vehicle-method-93))) + (t9-0 this) + ) + (let ((s4-0 (-> this info)) + (s5-0 (new 'stack-no-clear 'inline-array 'matrix 2)) + ) + (set! (-> s5-0 0 trans z) (vector-dot (-> this rbody lin-velocity) (-> this rbody matrix fvec))) + (set! (-> s5-0 0 trans w) (vector-dot (-> this rbody lin-velocity) (the-as vector (-> this rbody matrix)))) + (set! (-> s5-0 0 trans y) (/ (* 2.0 (fabs (-> s5-0 0 trans w))) (fmax 409.6 (-> s5-0 0 trans z)))) + (set! (-> s5-0 0 trans x) + (/ (-> s4-0 handling tire-steering-speed-factor) + (fmax 409.6 (- (-> s5-0 0 trans z) (-> s4-0 handling tire-steering-speed-bias))) + ) + ) + (set! (-> s5-0 0 fvec y) (fmin 1.0 (fmax (-> s5-0 0 trans y) (-> s5-0 0 trans x)))) + (set! (-> s5-0 0 fvec x) (* (-> this controls steering) (-> s5-0 0 fvec y))) + (set! (-> s5-0 0 fvec z) (* (-> this info handling tire-steering-angle) (-> s5-0 0 fvec x))) + (set! (-> s5-0 0 fvec w) + (* (-> s5-0 0 fvec z) (+ 1.0 (* (-> this info handling ackermann-factor) (fabs (-> s5-0 0 fvec x))))) + ) + (set! (-> s5-0 1 uvec y) + (* 2.0 + (+ (-> s4-0 physics-model rear-wheel local-pos x) + (-> s4-0 physics-model rear-wheel susp-arm-length) + (-> s4-0 physics-model rear-wheel steer-arm-length) + ) + ) + ) + (set! (-> s5-0 1 uvec z) + (- (-> s4-0 physics-model front-wheel local-pos z) (-> s4-0 physics-model rear-wheel local-pos z)) + ) + (set! (-> s5-0 1 uvec w) 0.0) + (when (< 18.204445 (fabs (-> s5-0 0 fvec z))) + (cond + ((logtest? (-> s4-0 physics-model rear-wheel flags) (vehicle-wheel-flag vwf4)) + (set! (-> s5-0 1 rvec w) (/ (* 0.5 (-> s5-0 1 uvec z)) (sin (fabs (-> s5-0 0 fvec z))))) + (let ((f0-32 + (- (* (-> s5-0 1 rvec w) (cos (fabs (-> s5-0 0 fvec z)))) + (* 2.0 (+ (-> s4-0 physics-model rear-wheel local-pos x) (-> s4-0 physics-model rear-wheel susp-arm-length))) + ) + ) + (f1-22 (* 0.5 (-> s5-0 1 uvec z))) + ) + (set! (-> s5-0 1 rvec z) (sqrtf (+ (* f1-22 f1-22) (* f0-32 f0-32)))) + ) + (+! (-> s5-0 1 rvec w) (-> s4-0 physics-model rear-wheel steer-arm-length)) + (set! (-> s5-0 1 rvec z) (- (-> s5-0 1 rvec z) (-> s4-0 physics-model rear-wheel steer-arm-length))) + ) + (else + (set! (-> s5-0 1 rvec w) (/ (-> s5-0 1 uvec z) (tan (fabs (-> s5-0 0 fvec z))))) + (set! (-> s5-0 1 rvec w) + (- (-> s5-0 1 rvec w) + (+ (-> s4-0 physics-model front-wheel local-pos x) + (-> s4-0 physics-model front-wheel susp-arm-length) + (* -0.5 (-> s5-0 1 uvec y)) + ) + ) + ) + (set! (-> s5-0 1 rvec z) (- (-> s5-0 1 rvec w) (-> s5-0 1 uvec y))) + ) + ) + (set! (-> s5-0 1 uvec w) + (/ (- (-> s5-0 1 rvec w) (-> s5-0 1 rvec z)) (+ (-> s5-0 1 rvec w) (-> s5-0 1 rvec z))) + ) + ) + (set! (-> s5-0 1 rvec x) (- 1.0 (-> s5-0 1 uvec w))) + (set! (-> s5-0 1 rvec y) (+ 1.0 (-> s5-0 1 uvec w))) + (cond + ((< (-> s5-0 0 fvec z) 0.0) + (set! (-> s5-0 0 rvec x) (-> s5-0 0 fvec z)) + (set! (-> s5-0 0 rvec y) (-> s5-0 0 fvec w)) + (set! (-> s5-0 0 uvec x) (-> s5-0 1 rvec y)) + (set! (-> s5-0 0 uvec y) (-> s5-0 1 rvec x)) + ) + (else + (set! (-> s5-0 0 rvec x) (-> s5-0 0 fvec w)) + (set! (-> s5-0 0 rvec y) (-> s5-0 0 fvec z)) + (set! (-> s5-0 0 uvec x) (-> s5-0 1 rvec x)) + (set! (-> s5-0 0 uvec y) (-> s5-0 1 rvec y)) + ) + ) + (dotimes (s4-1 (-> this info physics-model wheel-count)) + (let* ((s3-0 (-> this wheel s4-1)) + (s2-0 (-> s3-0 info)) + ) + (if (logtest? (-> s2-0 flags) (vehicle-wheel-flag vwf4)) + (set! (-> s3-0 steer-angle) (* (-> (&-> s5-0 0 rvec data (logand s4-1 1)) 0) (sign (-> s2-0 local-pos z)))) + ) + (if (logtest? (-> s2-0 flags) (vehicle-wheel-flag vwf0)) + (set! (-> s3-0 drive-diff) (-> (&-> s5-0 0 rvec data (logand s4-1 1)) 4)) + ) + ) + ) + ) + (dotimes (s5-1 (-> this info physics-model wheel-count)) + (let ((s3-1 (-> this wheel s5-1))) + (set-vector! (-> s3-1 local-axis) (cos (-> s3-1 steer-angle)) 0.0 (- (sin (-> s3-1 steer-angle))) 1.0) + ) + ) + (let ((s5-2 (new 'stack-no-clear 'wvehicle-physics-work))) + (set! (-> s5-2 mat rvec x) (the-as float (current-time))) + (cond + ((logtest? (-> this info flags) 4096) + (when (and (logtest? (-> this controls flags) (vehicle-controls-flag vcf0)) + (not (logtest? (-> this controls prev-flags) (vehicle-controls-flag vcf0))) + (< (the-as uint 45) (- (the-as uint (-> s5-2 mat rvec x)) (the-as uint (-> this jump-time)))) + (< (the-as uint 45) (- (the-as uint (-> s5-2 mat rvec x)) (the-as uint (-> this ground-time)))) + ) + (let ((v1-77 0)) + (dotimes (a0-15 4) + (let ((a1-5 (-> this wheel a0-15))) + (if (and (logtest? (-> a1-5 flags) 2) (< 0.0 (-> a1-5 up-force))) + (+! v1-77 1) + ) + ) + ) + (when (>= v1-77 2) + (let ((v1-79 (new 'stack-no-clear 'matrix))) + (vector-float*! (-> v1-79 rvec) (-> this rbody matrix uvec) (* 0.3 + (-> this rbody matrix uvec y) + (-> this info info mass) + (-> this info extra gravity) + (-> this info handling jump-thrust-factor) + ) + ) + (add-force! (-> this rbody) (-> v1-79 rvec)) + ) + (rigid-body-control-method-12 (-> this rbody) 1.0) + (init-velocities! (-> this rbody)) + (set! (-> this jump-time) (the-as uint (-> s5-2 mat rvec x))) + (sound-play-by-name (-> this info sound jump-sound) (new-sound-id) 1024 0 0 (sound-group) #t) + ) + ) + ) + ) + ((logtest? (-> this controls flags) (vehicle-controls-flag vcf0)) + (set! (-> this susp-spring-control) 0.5) + (set! (-> this jump-control) 0.0) + (if (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 0 255 (seconds 0.05)) + ) + (if (and (not (logtest? (-> this controls prev-flags) (vehicle-controls-flag vcf0))) + (logtest? (-> this v-flags) (vehicle-flag on-ground)) + ) + (sound-play "toad-prehop") + ) + ) + (else + (set! (-> this susp-spring-control) 1.0) + (when (and (logtest? (-> this controls prev-flags) (vehicle-controls-flag vcf0)) + (< (the-as uint 300) (- (the-as uint (-> s5-2 mat rvec x)) (the-as uint (-> this jump-time)))) + (< (the-as uint 45) (- (the-as uint (-> s5-2 mat rvec x)) (the-as uint (-> this ground-time)))) + ) + 0 + (when (>= (-> this rbody matrix uvec y) 0.707) + (set! (-> this jump-time) (the-as uint (-> s5-2 mat rvec x))) + (set! (-> this jump-control) (-> this info handling jump-thrust-factor)) + (sound-play-by-name (-> this info sound jump-sound) (new-sound-id) 1024 0 0 (sound-group) #t) + ) + ) + (if (< (the-as uint 60) (- (the-as uint (-> s5-2 mat rvec x)) (the-as uint (-> this jump-time)))) + (set! (-> this jump-control) 0.0) + ) + ) + ) + ) + (if (not (logtest? (vehicle-flag turbo-boost) (-> this v-flags))) + (set! (-> this turbo-ready) (fmin 1.0 (+ (-> this turbo-ready) (* 0.5 (seconds-per-frame))))) + ) + (if (logtest? (-> this controls flags) (vehicle-controls-flag vcf2)) + (vehicle-method-64 this) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod alloc-rbody-control! ((this wvehicle) (arg0 rigid-body-object-constants)) + (let ((s4-0 (new 'stack-no-clear 'inline-array 'quaternion 2))) + (vector-y-quaternion! (the-as vector (-> s4-0 0)) (-> this root quat)) + (vector+float*! + (-> this root trans) + (-> this root trans) + (the-as vector (-> s4-0 0)) + (-> (the-as rigid-body-vehicle-constants arg0) setup settle-height) + ) + (quaternion-axis-angle! + (-> 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) (-> s4-0 1)) + ) + (let ((t9-3 (method-of-type vehicle alloc-rbody-control!))) + (t9-3 this (the-as rigid-body-vehicle-constants arg0)) + ) + (iterate-prims (-> this root) (lambda ((arg0 collide-shape-prim)) + (logior! (-> arg0 prim-core collide-as) (collide-spec camera-blocker)) + (none) + ) + ) + (set! (-> this control-hook) #f) + (set! (-> this ai-min-speed) 61440.0) + (set! (-> this ai-max-speed) 102400.0) + (set! (-> this minimap) #f) + (set! (-> this clutch-grab) 0.0) + (set! (-> this gear-select) 1) + (set! (-> this shoot-delay) (the-as uint 60)) + (wvehicle-method-167 this) + (set! (-> this info physics-model wheel-count) 4) + (set! (-> this susp-spring-control) 1.0) + (set! (-> this jump-control) 0.0) + (set! (-> this turbo-ready) 1.0) + (set! (-> this net) #f) + (let ((v1-19 (new 'stack-no-clear 'wvehicle-stack-type4))) + (set! (-> v1-19 float2) (vector-dot (-> this root transv) (-> this rbody matrix fvec))) + (set! (-> v1-19 byte0) 0) + (set! (-> v1-19 float0) 0.0) + (dotimes (a0-14 (-> this info physics-model wheel-count)) + (let ((a1-11 (-> this wheel a0-14))) + (let ((a2-2 (-> a1-11 info))) + (set! (-> a1-11 x-scale) (if (= (logand a0-14 1) 1) + -1.0 + 1.0 + ) + ) + (set! (-> a1-11 surface) #f) + (set! (-> v1-19 float1) (* (-> a2-2 radius) (-> a2-2 scale))) + (set! (-> a1-11 rev) (/ (-> v1-19 float2) (-> v1-19 float1))) + (when (logtest? (-> a2-2 flags) (vehicle-wheel-flag vwf0)) + (+! (-> v1-19 byte0) 1) + (+! (-> v1-19 float0) (-> v1-19 float1)) + (set! (-> a1-11 drive-diff) 1.0) + ) + (set! (-> a1-11 handle) (the-as handle #f)) + (set! (-> a1-11 tread-tracker) (the-as handle #f)) + (set! (-> a1-11 inertia) (-> a2-2 inertia)) + ) + (set! (-> a1-11 probe-local-dir quad) (-> (new 'static 'vector :y -1.0 :w 1.0) quad)) + (set! (-> a1-11 local-axis quad) (-> (new 'static 'vector :x 1.0 :w 1.0) quad)) + ) + ) + (set! (-> (the-as rigid-body-vehicle-constants arg0) physics-model drive-wheel-count) (-> v1-19 byte0)) + (set! (-> this avg-drive-wheel-radius) (/ (-> v1-19 float0) (the float (-> v1-19 byte0)))) + (set! (-> this wheel-rev) (/ (-> v1-19 float2) (-> this avg-drive-wheel-radius))) + (when (< 0.0 (-> v1-19 float2)) + (set! (-> this gear-select) (+ (-> (the-as rigid-body-vehicle-constants arg0) transmission gear-count) -1)) + (let ((f0-25 (-> (the-as rigid-body-vehicle-constants arg0) engine idle-rpm))) + (set! (-> this engine-rev) (* 0.10471976 f0-25)) + ) + ) + ) + (dotimes (v1-26 (-> this info rider attach-point-count)) + (set! (-> this attached-array v1-26) (the-as handle #f)) + ) + (vector-reset! (-> this surface-velocity)) + (set! (-> this draw light-index) (the-as uint 30)) + (set! (-> this draw lod-set lod 0 dist) 1228800.0) + (set! (-> this draw lod-set lod 1 dist) 1232896.0) + (set! (-> this draw lod-set lod 2 dist) 1236992.0) + (set! (-> this gun-aim-yaw) 0.0) + (set! (-> this gun-aim-yaw-vel) 0.0) + (set! (-> this gun-yaw) 0.0) + (set! (-> this gun-pitch) 0.0) + (set! (-> this shoot-delay) (the-as uint 30)) + (set! (-> this lock-turret) #f) + (none) + ) + +(defmethod vehicle-method-134 ((this wvehicle)) + (if (focus-test? this grabbed) + (go (method-of-object this race-waiting)) + (go (method-of-object this player-control)) + ) + 0 + (none) + ) + +(defmethod on-impact ((this wvehicle) (arg0 rigid-body-impact)) + (mem-copy! (the-as pointer (-> this impact)) (the-as pointer arg0) 64) + ((method-of-type vehicle on-impact) this arg0) + (none) + ) + +;; WARN: disable def twice: 12. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: disable def twice: 59. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod rbody-event-handler ((this wvehicle) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('test-ready) + (and (and (-> this next-state) (= (-> this next-state name) 'race-waiting)) + (logtest? (-> this v-flags) (vehicle-flag riding)) + ) + ) + (('repair) + (let ((f0-0 (the-as float (-> arg3 param 0))) + (f1-0 (-> this hit-points)) + ) + (if (< 0.0 f1-0) + (set! (-> this hit-points) (fmin 1.0 (+ f1-0 f0-0))) + ) + ) + ) + (('touched) + (when (zero? (-> (the-as process-drawable arg0) rbody)) + (let* ((s5-0 arg0) + (v1-10 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when (and v1-10 + (logtest? (-> v1-10 mask) (process-mask target)) + (logtest? (vehicle-flag waiting-for-player) (-> this v-flags)) + (logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + ) + (logior! (-> this v-flags) (vehicle-flag player-touching)) + (set! v0-0 (current-time)) + (set! (-> this player-touch-time) (the-as time-frame v0-0)) + v0-0 + ) + ) + ) + ) + (('begin-race) + (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 + ((logtest? (vehicle-flag player-driving) (-> this v-flags)) + (logclear! (-> this v-flags) (vehicle-flag player-grabbed)) + (go (method-of-object this player-control)) + ) + (else + (go (method-of-object this race-racing)) + ) + ) + ) + ) + (('turbo-pickup) + (when (< (-> this turbo-supply) 3.0) + (sound-play "turbo-pickup") + (if (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (sound-play "turbo-pickup") + ) + (+! (-> this turbo-supply) 1.0) + (set! (-> this turbo-supply) (fmin 3.0 (-> this turbo-supply))) + (let ((v1-47 (-> this draw color-emissive))) + (set! (-> v1-47 x) 2.0) + ) + ) + #t + ) + (('race-decision-point) + (when (logtest? (vehicle-flag ai-driving) (-> this v-flags)) + (let* ((v1-51 (the-as race-decision-point (-> arg3 param 0))) + (a0-25 (-> v1-51 decision-type)) + ) + (cond + ((zero? a0-25) + (cond + ((and (nonzero? (-> v1-51 shortcuts)) + (>= (-> this race racer-state speed-factor) (-> this race state info ai-max-speed-factor)) + (< 0.1 (- (+ (-> this race state target-pos) (-> this race racer-state target-pos-offset)) + (-> this race racer-state pos) + ) + ) + ) + (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 + (race-select-path-randomly-from-mask this (-> v1-51 safe-paths)) + (set! (-> this shortcut-speed-factor) 0.0) + ) + ) + ) + ((= a0-25 1) + (when (and (>= (-> this turbo-supply) 1.0) + (< (-> this path-deviation) 1.0) + (>= (-> this race racer-state speed-factor) (-> this race state info ai-max-speed-factor)) + ) + (apply-momentum! this) + (vehicle-method-64 this) + ) + ) + ) + ) + ) + ) + (('hide) + (logior! (-> this draw status) (draw-control-status no-draw)) + (dotimes (s5-3 (-> this info physics-model wheel-count)) + (send-event (handle->process (-> this wheel s5-3 handle)) 'hide) + ) + (let ((gp-1 (-> this child))) + (while gp-1 + (send-event (ppointer->process gp-1) 'hide) + (set! gp-1 (-> gp-1 0 brother)) + ) + ) + #f + ) + (('unhide) + (logclear! (-> this draw status) (draw-control-status no-draw)) + (dotimes (s5-4 (-> this info physics-model wheel-count)) + (send-event (handle->process (-> this wheel s5-4 handle)) 'unhide) + ) + (let ((gp-2 (-> this child))) + (while gp-2 + (send-event (ppointer->process gp-2) 'unhide) + (set! gp-2 (-> gp-2 0 brother)) + ) + ) + #f + ) + (('race-pass) + (send-event (vehicle-method-68 this) 'race-pass) + ) + (('race-got-passed) + (send-event (vehicle-method-68 this) 'race-got-passed) + ) + (('race-finished) + (-> arg3 param 0) + (cond + ((logtest? (vehicle-flag player-driving) (-> this v-flags)) + (set! (-> this damage-factor) 0.0) + (set! v0-0 (method-of-object this wvehicle-method-177)) + (set! (-> this control-hook) (the-as (function vehicle vehicle-controls) v0-0)) + v0-0 + ) + (else + (go (method-of-object this race-finished)) + ) + ) + ) + (('race-deactivate) + (set! (-> this damage-factor) (-> this info damage inv-hit-points)) + (set! (-> this race path) #f) + (cond + ((logtest? (vehicle-flag player-driving) (-> this v-flags)) + (logclear! (-> this v-flags) (vehicle-flag player-grabbed)) + (set! v0-0 (method-of-object this control-hook-player)) + (set! (-> this control-hook) (the-as (function vehicle vehicle-controls) v0-0)) + v0-0 + ) + (else + (go (method-of-object this die)) + ) + ) + ) + (('set-control-hook-race-ai) + (set! v0-0 (method-of-object this wvehicle-method-177)) + (set! (-> this control-hook) (the-as (function vehicle vehicle-controls) v0-0)) + v0-0 + ) + (('ai-set-target-speed) + (let ((f0-18 (the-as float (-> arg3 param 0)))) + (set! (-> this ai-min-speed) f0-18) + (set! (-> this ai-max-speed) f0-18) + f0-18 + ) + ) + (('ai-set-target-process) + (let* ((s5-7 (-> arg3 param 0)) + (a0-77 (if (type? s5-7 process-drawable) + s5-7 + ) + ) + ) + (cond + ((the-as uint a0-77) + (set! v0-0 (process->handle (the-as uint a0-77))) + (set! (-> this target-status handle) (the-as handle v0-0)) + v0-0 + ) + (else + (set! (-> this target-status handle) (the-as handle #f)) + #f + ) + ) + ) + ) + (('ai-set-target-position) + (let ((v1-138 (the-as object (-> arg3 param 0)))) + (set! (-> this ai-state) (the-as uint 2)) + (set! v0-0 (-> this ai-target-point)) + (set! (-> (the-as vector v0-0) quad) (-> (the-as vector v1-138) quad)) + ) + v0-0 + ) + (('ai-set-mode) + (set! v0-0 (-> arg3 param 0)) + (set! (-> this ai-state) (the-as uint v0-0)) + v0-0 + ) + (('ai-drop-off) + (let ((v1-140 (the-as object (-> arg3 param 0)))) + (set! (-> this other-pos quad) (-> (the-as wvehicle-ai-drop-off-params v1-140) dest quad)) + (set! (-> this other-proc) (process->handle (-> (the-as wvehicle-ai-drop-off-params v1-140) proc))) + ) + (set! v0-0 (logior (vehicle-flag vf53) (-> this v-flags))) + (set! (-> this v-flags) (the-as vehicle-flag v0-0)) + v0-0 + ) + (('ai-ignore-nav-mesh) + (cond + ((-> arg3 param 0) + (set! v0-0 (logior (vehicle-flag vf52) (-> this v-flags))) + (set! (-> this v-flags) (the-as vehicle-flag v0-0)) + ) + (else + (set! v0-0 (logclear (-> this v-flags) (vehicle-flag vf52))) + (set! (-> this v-flags) (the-as vehicle-flag v0-0)) + ) + ) + v0-0 + ) + (('ai-set-inaccuracy-factor) + (wvehicle-method-202 this (the-as float (-> arg3 param 0))) + ) + (('ai-set-attack-delay-factor) + (wvehicle-method-201 this (the-as float (-> arg3 param 0))) + ) + (('go-player-control) + (go (method-of-object this player-control)) + ) + (('set-rigid-body-info) + (set! (-> this info) (the-as rigid-body-vehicle-constants (-> arg3 param 0))) + (rigid-body-object-method-37 this) + ) + (('no-pickup) + (set! v0-0 (logior (vehicle-flag vf55) (-> this v-flags))) + (set! (-> this v-flags) (the-as vehicle-flag v0-0)) + v0-0 + ) + (else + ((method-of-type vehicle rbody-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod vehicle-method-119 ((this wvehicle)) + (cond + ((and (logtest? (-> this v-flags) (vehicle-flag player-grabbed)) (-> this race path)) + (wvehicle-method-185 this) + ) + (else + (let ((t9-1 (method-of-type vehicle vehicle-method-119))) + (t9-1 this) + ) + ) + ) + (if (logtest? (game-secrets unlimited-turbos) (-> *game-info* secrets)) + (set! (-> this turbo-supply) 3.0) + ) + 0 + (none) + ) + +(defmethod vehicle-method-118 ((this wvehicle)) + (when (not (logtest? (-> this rbody flags) (rigid-body-flag enable-physics))) + (if (handle->process (-> this wheel 0 tread-tracker)) + (wvehicle-method-196 this) + ) + ) + (cond + ((have-vehicle-v-type? (the-as int (-> this info vehicle-type))) + (if (not (-> this minimap)) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 133) (the-as int #f) (the-as vector #t) 0)) + ) + ) + (else + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + ) + ) + ((method-of-type vehicle vehicle-method-118) this) + (none) + ) diff --git a/goal_src/jak3/levels/factory/car/hvehicle-effects.gc b/goal_src/jak3/levels/factory/car/hvehicle-effects.gc index 66ac4d74d6..efb51e4da4 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 ad9fb10788..8537300133 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 aac30c4bc8..fd87d3658d 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 5a5f5b0362..9e9057021e 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 bfd2e6fc75..35992eac83 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) (arg0 vehicle-controls)) + (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/wcar-faccar.gc b/goal_src/jak3/levels/factory/car/wcar-faccar.gc index cfd50d9a97..71953fc443 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/forest/eco-green-collider.gc b/goal_src/jak3/levels/forest/eco-green-collider.gc index 377df6ffdf..547a233987 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 3ed37c1d39..c16e115185 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 8ce7ee4a8f..1905aa1790 100644 --- a/goal_src/jak3/levels/forest/for-turret.gc +++ b/goal_src/jak3/levels/forest/for-turret.gc @@ -7,3 +7,1596 @@ ;; 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)) + (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/goal_src/jak3/levels/forest/forest-bridges.gc b/goal_src/jak3/levels/forest/forest-bridges.gc index 17f873c2fa..b203802169 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 4a140e02e0..4e72dbc86b 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 6196ce8678..36a75c5f05 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-obs-h.gc b/goal_src/jak3/levels/forest/forest-obs-h.gc index 1729a4eb65..2e85d74bf3 100644 --- a/goal_src/jak3/levels/forest/forest-obs-h.gc +++ b/goal_src/jak3/levels/forest/forest-obs-h.gc @@ -7,3 +7,37 @@ ;; DECOMP BEGINS +(deftype shaker (structure) + ((axis vector :inline) + (start-time time-frame) + (decay-time float) + (amplitude float) + (freq float) + (y-decay-time float) + (y-amplitude float) + (y-freq float) + (shake float) + (y-shake float) + ) + (:methods + (shaker-method-9 (_type_) none) + ) + ) + + +;; WARN: Return type mismatch float vs none. +(defmethod shaker-method-9 ((this shaker)) + (let ((s5-0 (- (current-time) (-> this start-time)))) + (set! (-> this shake) (* (-> this amplitude) + (lerp-scale 1.0 0.0 (the float s5-0) 0.0 (-> this decay-time)) + (cos (* 65536.0 (/ (the float s5-0) (-> this freq)))) + ) + ) + (set! (-> this y-shake) (* (-> this y-amplitude) + (lerp-scale 1.0 0.0 (the float s5-0) 0.0 (-> this y-decay-time)) + (cos (* 65536.0 (/ (the float s5-0) (-> this y-freq)))) + ) + ) + ) + (none) + ) diff --git a/goal_src/jak3/levels/forest/forest-part.gc b/goal_src/jak3/levels/forest/forest-part.gc index bb619c2c54..99c76ed9a3 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 6fb079dec4..76e73f549b 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 b4cfb0b325..538ad06c55 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 5d5dea786a..d70bcdae49 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 b67f21daf7..6eab9acfab 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 9a23d0fd6b..9340815039 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 99bdeb84d6..475438c294 100644 --- a/goal_src/jak3/levels/forest/neo-spawner.gc +++ b/goal_src/jak3/levels/forest/neo-spawner.gc @@ -7,3 +7,841 @@ ;; DECOMP BEGINS +(defun foresta-login ((arg0 level)) + (set! *nav-network* (new 'loading-level 'nav-network)) + (nav-network-method-9 *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 () + (local-vars (a2-1 (function joint-control-channel float float float float :behavior process))) + (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) + (let ((a0-2 (-> self skel root-channel 0))) + (set! (-> a0-2 param 0) (the float (+ (-> a0-2 frame-group frames num-frames) -1))) + (set! (-> a0-2 param 1) 1.0) + (let ((t9-2 joint-control-channel-group-eval!) + (a1-2 #f) + ) + (set! a2-1 num-func-seek!) + (t9-2 a0-2 (the-as art-joint-anim a1-2) a2-1) + ) + ) + ) + (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 (the-as float a2-1)) + ) + (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 1b4c869f8c..0cf31c2ed3 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 4ae627265d..133f62f109 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 edb04cb3fc..4e1ea1abc0 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 6db401c1ca..51946f2fef 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 593f7463f7..bff26def1d 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 f981be219e..84779bed51 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 853317337e..a86c9d9ae9 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/mhcity-obs.gc b/goal_src/jak3/levels/mhcity/mhcity-obs.gc index a6b7caec24..ed882605f0 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 8819cf5413..401db8bdc0 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 3ec7db7a61..bbef08b6bb 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/gekko.gc b/goal_src/jak3/levels/mine/gekko.gc index e826bea9d5..ce7400ec98 100644 --- a/goal_src/jak3/levels/mine/gekko.gc +++ b/goal_src/jak3/levels/mine/gekko.gc @@ -5,5 +5,2949 @@ ;; name in dgo: gekko ;; dgos: MIA +;; +++gekko-flag +(defenum gekko-flag + :type uint16 + :bitfield #t + (update-foot-position?) + (follow-terrain) + (update-tilt) + (on-wall?) + (falling-off-wall?) + ) +;; ---gekko-flag + + ;; DECOMP BEGINS +(defskelgroup skel-gekko gekko gekko-lod0-jg -1 + ((gekko-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :shadow gekko-shadow-mg + :origin-joint-index 16 + ) + +(deftype gekko-foot-info (structure) + ((ground-pos vector :inline) + (ground-normal vector :inline) + (foot-transform transformq :inline) + (leg-ik joint-mod-ik) + ) + ) + + +(deftype gekko-ik-setup (structure) + ((elbow-index int32) + (hand-index int32) + (effector-index int32) + (hand-dist float) + ) + ) + + +(define *gekko-ik-setup* + (new 'static 'inline-array gekko-ik-setup 4 + (new 'static 'gekko-ik-setup :elbow-index 9 :hand-index 10 :effector-index 10 :hand-dist 1224.704) + (new 'static 'gekko-ik-setup :elbow-index 13 :hand-index 14 :effector-index 14 :hand-dist 1224.704) + (new 'static 'gekko-ik-setup :elbow-index 19 :hand-index 20 :effector-index 20 :hand-dist 1638.4) + (new 'static 'gekko-ik-setup :elbow-index 29 :hand-index 30 :effector-index 30 :hand-dist 1638.4) + ) + ) + +(define *gekko-foot-offset* + (the-as (array gekko-foot-info) (new 'static 'boxed-array :type vector + (new 'static 'vector :x 2281.472 :z 2424.832 :w 1.0) + (new 'static 'vector :x -2281.472 :z 2424.832 :w 1.0) + (new 'static 'vector :x 2301.952 :z -2424.832 :w 1.0) + (new 'static 'vector :x -2301.952 :z -2424.832 :w 1.0) + ) + ) + ) + +(deftype gekko-shadow-spot (structure) + ((position vector :inline) + (normal vector :inline) + (valid? symbol) + (pat uint32) + ) + ) + + +(deftype gekko (nav-enemy) + ((shadow-spot gekko-shadow-spot :inline) + (foot gekko-foot-info 4 :inline) + (rot-matrix matrix :inline) + (gspot-normal vector :inline) + (tilt-quat quaternion :inline) + (dest-to-me-dir vector :inline) + (turn-face-point vector :inline) + (flags gekko-flag) + (attack-time time-frame) + (last-turn-time time-frame) + (fade float) + (rot-mult float) + (move-speed float) + (move-decel float) + (turn-next-state (state gekko)) + (path-wall path-control) + (scared-timer time-frame) + (scale float) + (probe-len float) + ) + (:state-methods + active-wall + hostile-wall + turn-wall + attack-wall + knocked-wall + jump-off-wall + jump-off-wall-falling + jump-off-wall-recover + pre-attack + attack + turn + turn-quick + ) + (:methods + (gekko-method-202 (_type_) none) + (gekko-method-203 (_type_) none) + (gekko-method-204 (_type_) none) + (gekko-method-205 (_type_) none) + (gekko-method-206 (_type_) none) + (gekko-method-207 (_type_) none) + (gekko-method-208 (_type_) none) + ) + ) + + +(define *fact-info-gekko-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 140) :pickup-type 9) + ) + +(define *gekko-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 #x4 + :param0 5 + :param1 5 + :param2 '((new 'static 'bfloat :data 0.5) (new 'static 'bfloat :data 0.5)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 3 + :notice-anim 4 + :hostile-anim 14 + :hit-anim 3 + :knocked-anim 23 + :knocked-land-anim 18 + :die-anim 32 + :die-falling-anim 3 + :victory-anim -1 + :jump-wind-up-anim 33 + :jump-in-air-anim 34 + :jump-land-anim 35 + :neck-joint 6 + :look-at-joint 6 + :bullseye-joint 16 + :sound-hit (static-sound-name "gekko-get-hit") + :sound-die (static-sound-name "gekko-die") + :notice-distance (meters 80) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 5) + :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 7) + :attack-shove-up (meters 4) + :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.5 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp -1.0 + :knocked-soft-vxz-lo 113049.6 + :knocked-soft-vxz-hi 149094.4 + :knocked-soft-vy-lo 122880.0 + :knocked-soft-vy-hi 163840.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.9169 :y -0.314 :z 0.2441 :w 2358.841) + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :bg-collide-with (collide-spec backgnd jak obstacle player-list) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9998 :z -0.0145 :w 18690.63) + :geo-tform (new 'static 'vector :x 0.9998 :y -0.0109 :z 0.0086 :w 14092.443) + :axial-slop 426.98523 + :max-angle 1820.4445 + :coll-rad 2079.5393 + :hit-sound (static-sound-name "gekko-bf") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :z 0.0177 :w 29970.05) + :geo-tform (new 'static 'vector :x 0.9998 :z 0.0088 :w 32808.543) + :axial-slop 426.98523 + :max-angle 1456.3556 + :coll-rad 1224.2944 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :z 0.0185 :w 31347.709) + :geo-tform (new 'static 'vector :x 0.9998 :y -0.0016 :z 0.0092 :w 28653.906) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 1338.9824 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :z 0.0186 :w 6233.548) + :geo-tform (new 'static 'vector :x -0.9994 :y -0.0202 :z -0.0091 :w 8968.311) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 1183.3344 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.2363 :y -0.0265 :z -0.971 :w 16298.385) + :geo-tform (new 'static 'vector :x 0.7523 :y 0.6222 :z -0.2161 :w 22609.957) + :axial-slop 426.98523 + :max-angle 3640.889 + :coll-rad 1150.5664 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9842 :y 0.081 :z 0.1544 :w 6309.4785) + :geo-tform (new 'static 'vector :x -0.6984 :y 0.5454 :z 0.4627 :w 18388.328) + :axial-slop 426.98523 + :max-angle 4619.2505 + :coll-rad 1282.4576 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3794 :y -0.0126 :z 0.925 :w 14670.799) + :geo-tform (new 'static 'vector :x -0.2831 :y 0.9394 :z 0.1922 :w 13051.641) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 1127.2192 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3743 :y -0.0189 :z 0.9269 :w 4210.943) + :geo-tform (new 'static 'vector :x 0.8507 :y -0.4889 :z -0.1902 :w 19701.232) + :axial-slop 426.98523 + :max-angle 4029.8452 + :coll-rad 1333.248 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.3447 :y 0.1703 :z 0.9229 :w 16305.849) + :geo-tform (new 'static 'vector :x 0.7264 :y -0.5892 :z 0.3528 :w 20835.006) + :axial-slop 426.98523 + :max-angle 3640.889 + :coll-rad 1124.352 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9835 :y -0.1776 :z 0.0185 :w 3334.3625) + :geo-tform (new 'static 'vector :x -0.6955 :y -0.5474 :z -0.4643 :w 18426.193) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 1088.3073 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3701 :y 0.0165 :z -0.9283 :w 14670.671) + :geo-tform (new 'static 'vector :x -0.2795 :y -0.9402 :z -0.1922 :w 13170.697) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 1053.4912 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3607 :y 0.023 :z -0.932 :w 4213.7646) + :geo-tform (new 'static 'vector :x -0.8814 :y -0.119 :z 0.456 :w 16534.57) + :axial-slop 426.98523 + :max-angle 4029.8452 + :coll-rad 1327.104 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -0.9993 :y -0.005 :z -0.0354 :w 5877.141) + :geo-tform (new 'static 'vector :x -0.9998 :y -0.0126 :z -0.0087 :w 12748.154) + :axial-slop 426.98523 + :max-angle 1367.4814 + :coll-rad 1144.832 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9994 :z -0.0227 :w 17.585493) + :geo-tform (new 'static 'vector :x -0.9998 :y -0.0126 :z -0.0087 :w 12762.499) + :axial-slop 426.98523 + :max-angle 1537.784 + :coll-rad 1164.0833 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.514 :y 0.0096 :z -0.8572 :w 14720.624) + :geo-tform (new 'static 'vector :x -0.9145 :y -0.3788 :z 0.1386 :w 11441.111) + :axial-slop 426.98523 + :max-angle 2730.6667 + :coll-rad 924.0576 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9968 :y 0.0073 :z 0.075 :w 8037.281) + :geo-tform (new 'static 'vector :x 0.7911 :y -0.1717 :z 0.5867 :w 14446.993) + :axial-slop 426.98523 + :max-angle 3665.7927 + :coll-rad 924.0576 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7222 :y 0.0125 :z 0.6908 :w 14193.806) + :geo-tform (new 'static 'vector :x -0.9861 :y -0.1063 :z -0.1272 :w 19499.127) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 924.0576 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9636 :y 0.0018 :z -0.2657 :w 19342.15) + :geo-tform (new 'static 'vector :x 0.3582 :y -0.8755 :z -0.3234 :w 7445.891) + :axial-slop 426.98523 + :max-angle 4029.8452 + :coll-rad 924.0576 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9163 :y -0.0016 :z -0.3995 :w 3475.2285) + :geo-tform (new 'static 'vector :x -0.8003 :y -0.5296 :z -0.2795 :w 11328.59) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 1264.8448 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint 16 + :pre-tform (new 'static 'vector :x -0.9998 :y 0.0016 :z 0.0099 :w 1182.9977) + :geo-tform (new 'static 'vector :x 0.9958 :y -0.0876 :z 0.0087 :w 2150.4365) + :axial-slop 426.98523 + :max-angle 1456.3556 + :coll-rad 924.0576 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :y -0.0055 :z 0.0172 :w 2143.81) + :geo-tform (new 'static 'vector :x -0.0003 :y -1.0 :w 177.23846) + :axial-slop 426.98523 + :max-angle 2002.4889 + :coll-rad 924.0576 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.4534 :y -0.8907 :z -0.0071 :w 14.345102) + :geo-tform (new 'static 'vector :y -1.0 :w 167.15321) + :axial-slop 426.98523 + :max-angle 2730.6667 + :coll-rad 638.5664 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9993 :z 0.0309) + :geo-tform (new 'static 'vector :x -0.0002 :y -1.0 :w 167.15321) + :axial-slop 426.98523 + :max-angle 3458.8445 + :coll-rad 526.7456 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9993 :z 0.0309) + :geo-tform (new 'static 'vector :x -0.0003 :y -0.9998 :w 167.15321) + :axial-slop 426.98523 + :max-angle 4187.0225 + :coll-rad 355.5328 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint 16 + :pre-tform (new 'static 'vector :x -0.5197 :y 0.0089 :z 0.8538 :w 14715.818) + :geo-tform (new 'static 'vector :x -0.921 :y 0.3571 :z -0.1527 :w 11310.513) + :axial-slop 426.98523 + :max-angle 3640.889 + :coll-rad 935.936 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9975 :y 0.0082 :z -0.0651 :w 8052.2993) + :geo-tform (new 'static 'vector :x 0.8026 :y 0.1536 :z -0.5763 :w 14394.364) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 924.0576 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7269 :y 0.0057 :z -0.6861 :w 14192.44) + :geo-tform (new 'static 'vector :x -0.9887 :y 0.0952 :z 0.1121 :w 19467.068) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 924.0576 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9719 :y -0.0073 :z 0.2335 :w 19440.309) + :geo-tform (new 'static 'vector :x 0.3657 :y 0.866 :z 0.3398 :w 7188.9897) + :axial-slop 426.98523 + :max-angle 4029.8452 + :coll-rad 924.0576 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9024 :y 0.0007 :z 0.4302 :w 3461.2112) + :geo-tform (new 'static 'vector :x -0.8144 :y 0.5124 :z 0.2716 :w 11174.926) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 1215.2832 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint 10 + :pre-tform (new 'static 'vector :x -0.6151 :y -0.6097 :z -0.4993 :w 12937.025) + :geo-tform (new 'static 'vector :x -0.0868 :y -0.921 :z -0.3792 :w 8346.01) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 650.4448 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.921 :y 0.1397 :z -0.3634 :w 2869.6938) + :geo-tform (new 'static 'vector :x -0.319 :y -0.9406 :z -0.1124 :w 8966.345) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 489.8816 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint 10 + :pre-tform (new 'static 'vector :x 0.7723 :y 0.6006 :z -0.2057 :w 11225.279) + :geo-tform (new 'static 'vector :x 0.0707 :y 0.9922 :z -0.0988 :w 20417.65) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 575.0784 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3531 :y -0.0993 :z -0.9298 :w 2126.9346) + :geo-tform (new 'static 'vector :y 0.9937 :z 0.1082 :w 35917.625) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 545.9968 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 36 + :parent-joint 10 + :pre-tform (new 'static 'vector :x 0.9417 :y 0.2245 :z 0.2487 :w 15554.733) + :geo-tform (new 'static 'vector :x 0.07 :y 0.9965 :z 0.0389 :w 36169.848) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 541.4912 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 37 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3319 :y -0.0751 :z -0.9401 :w 1665.7977) + :geo-tform (new 'static 'vector :x 0.3686 :y 0.9253 :z -0.0855 :w 33224.6) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 489.0624 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 38 + :parent-joint 14 + :pre-tform (new 'static 'vector :x 0.9477 :y -0.2105 :z -0.239 :w 14735.951) + :geo-tform (new 'static 'vector :x 0.477 :y 0.0276 :z 0.8779 :w 34298.176) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 596.7872 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 39 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.1272 :y 0.0794 :z 0.9883 :w 1645.9913) + :geo-tform (new 'static 'vector :x 0.5577 :y 0.3476 :z 0.7531 :w 36094.316) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 496.4352 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 40 + :parent-joint 14 + :pre-tform (new 'static 'vector :x 0.7784 :y -0.6029 :z 0.1728 :w 8814.884) + :geo-tform (new 'static 'vector :x -0.3 :y 0.025 :z 0.9532 :w 34750.32) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 620.9536 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 41 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5386 :y 0.0881 :z 0.8378 :w 2062.2178) + :geo-tform (new 'static 'vector :x -0.2608 :y -0.1063 :z 0.9592 :w 33021.97) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 600.064 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 42 + :parent-joint 14 + :pre-tform (new 'static 'vector :x -0.6597 :y 0.605 :z 0.4453 :w 10974.531) + :geo-tform (new 'static 'vector :x 0.8782 :y 0.1516 :z -0.4526 :w 32356.781) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 614.4 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 43 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9724 :y -0.131 :z 0.1908 :w 2849.3416) + :geo-tform (new 'static 'vector :x 0.8708 :y 0.0597 :z -0.4875 :w 30132.617) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 458.752 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + ) + ) + :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 14 + :taunt-anim -1 + :run-travel-speed (meters 14) + :run-acceleration (meters 6) + :run-turning-acceleration (meters 60) + :walk-travel-speed (meters 5) + :walk-acceleration (meters 6) + :walk-turning-acceleration (meters 30) + :maximum-rotation-rate (degrees 450) + :notice-nav-radius (meters 40) + :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! (-> *gekko-nav-enemy-info* fact-defaults) *fact-info-gekko-defaults*) + +(defmethod init-enemy-collision! ((this gekko)) + (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 pusher) + ) + (set! (-> s4-0 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 4915.2 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-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list pusher) + ) + (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 action) (collide-action solid)) + (set! (-> v1-15 transform-index) 3) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (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 3276.8) + ) + (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 solid deadly)) + (set! (-> v1-19 transform-index) 6) + (set-vector! (-> v1-19 local-sphere) 0.0 -819.2 1638.4 1638.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 enemy)) + (set! (-> v1-21 prim-core action) (collide-action solid)) + (set! (-> v1-21 transform-index) 16) + (set-vector! (-> v1-21 local-sphere) 0.0 0.0 0.0 1638.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 enemy)) + (set! (-> v1-23 prim-core action) (collide-action solid)) + (set! (-> v1-23 transform-index) 24) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 1228.8) + ) + (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 solid deadly)) + (set! (-> v1-25 transform-index) 10) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 1228.8) + ) + (set-vector! + (-> (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)) local-sphere) + 0.0 + 4096.0 + 0.0 + 8192.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! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defstate idle (gekko) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy idle) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (time-elapsed? (-> self state-time) (seconds 0.5)) + (logclear! (-> self flags) (gekko-flag update-foot-position? follow-terrain update-tilt)) + ) + ) + ) + +(defstate active-wall (gekko) + :virtual #t + :enter (behavior () + ((-> (method-of-type nav-enemy active) enter)) + (let ((v1-3 (-> self draw shadow-ctrl))) + (logclear! (-> v1-3 settings flags) (shadow-flags disable-draw)) + ) + 0 + (dotimes (gp-0 4) + (enable-set! (-> self foot gp-0 leg-ik) #t) + ) + ) + :trans (-> (method-of-type nav-enemy active) trans) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (ja-no-eval :group! gekko-wall-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (nav-enemy-simple-post) + ) + ) + +(defstate notice (gekko) + :virtual #t + :enter (behavior () + (set! (-> self attack-time) (+ (current-time) (seconds -3.5))) + (set! (-> self last-turn-time) (+ (current-time) (seconds -100))) + (if (logtest? (-> self flags) (gekko-flag on-wall?)) + (gekko-method-206 self) + (go-virtual hostile) + ) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior hostile-wall-trans gekko () + (local-vars (gp-2 vector) (f0-0 float)) + (if (rnd-chance? self 0.75) + (sound-play "gekko-slither") + ) + (cond + ((and (time-elapsed? (-> self attack-time) (seconds 3)) + (and (get-focus! self) + (begin + (set! gp-2 (vector-! (new 'stack-no-clear 'vector) (-> self focus-pos) (-> self root trans))) + (set! f0-0 (vector-length gp-2)) + (< f0-0 163840.0) + ) + (or (< 20480.0 f0-0) (not (logtest? (-> self flags) (gekko-flag on-wall?)))) + (< (vector-dot + (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (vector-normalize-copy! (new 'stack-no-clear 'vector) gp-2 1.0) + ) + (cos 30.0) + ) + ) + ) + (gekko-method-207 self) + ) + ((or (< (vector-vector-planar-distance (-> self root trans) (-> self move-dest) (-> self rot-matrix uvec)) 8192.0) + (or (< (vector-dot + (-> self dest-to-me-dir) + (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (-> self move-dest)) + ) + 0.0 + ) + (time-elapsed? (-> self state-time) (seconds 5)) + ) + ) + (gekko-method-206 self) + ) + ((and (< (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) 61440.0) + (let ((gp-3 (new 'stack-no-clear 'vector))) + (and (closest-point-on-mesh (-> self nav) gp-3 (-> self focus-pos) (the-as nav-poly #f)) + (< (vector-vector-xz-distance gp-3 (-> self focus-pos)) 409.6) + ) + ) + ) + (go-virtual jump-off-wall) + ) + ) + (none) + ) + +(defstate hostile-wall (gekko) + :virtual #t + :event enemy-event-handler + :enter (behavior () + ((-> (method-of-type nav-enemy hostile) enter)) + (set-time! (-> self state-time)) + (logior! (-> self flags) (gekko-flag update-foot-position? follow-terrain update-tilt)) + (set-look-at-mode! self 2) + ) + :trans (behavior () + '() + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.017)) + (let ((f30-0 (/ 1.0 (-> self scale)))) + (until #f + (hostile-wall-trans) + (ja-no-eval :group! gekko-wall-run0-a-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (hostile-wall-trans) + (ja-no-eval :group! gekko-wall-run0-b-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + #f + ) + :post (behavior () + (let ((gp-0 (-> self root))) + (vector-normalize-copy! + (-> gp-0 transv) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> gp-0 quat)) + 40960.0 + ) + (vector-v++! (-> gp-0 trans) (-> gp-0 transv)) + ) + (nav-enemy-simple-post) + ) + ) + +(defstate turn-wall (gekko) + :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 + (logior! (-> self flags) (gekko-flag follow-terrain update-tilt)) + (logior! (-> self flags) (gekko-flag update-foot-position?)) + ) + :exit (behavior () + (set-time! (-> self last-turn-time)) + ) + :trans (behavior () + '() + ) + :code (behavior () + (when (!= (-> self turn-next-state) (method-of-type gekko attack-wall)) + (set-look-at-mode! self 1) + (let* ((v1-7 (ja-group)) + (gp-0 (if (and v1-7 (= v1-7 gekko-wall-run0-a-ja)) + 25 + 24 + ) + ) + ) + (ja-channel-push! 1 (seconds 0.03)) + (dotimes (s5-0 (if (time-elapsed? (-> self last-turn-time) (seconds 1)) + 1 + 6 + ) + ) + (ja-no-eval :group! (-> self draw art-group data gp-0) :num! (seek! max 0.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.5)) + ) + ) + ) + ) + (set-look-at-mode! self 2) + (let* ((f0-8 (vector-dot + (vector-cross! + (new 'stack-no-clear 'vector) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (vector-negate! (new 'stack-no-clear 'vector) (-> self dest-to-me-dir)) + ) + (-> self rot-matrix uvec) + ) + ) + (gp-3 (if (< f0-8 0.0) + 8 + 9 + ) + ) + ) + (set! (-> self rot-mult) (if (< f0-8 0.0) + 1.0 + -1.0 + ) + ) + (let ((v1-47 self)) + (set! (-> v1-47 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-47 enemy-flags)))) + ) + 0 + (logior! (-> self flags) (gekko-flag update-foot-position?)) + (if (rnd-chance? self 0.75) + (sound-play "gekko-slither") + ) + (ja-channel-push! 1 (seconds 0.017)) + (ja-no-eval :group! (-> self draw art-group data gp-3) :num! (loop!) :frame-num 0.0) + ) + (until (enemy-method-104 self (-> self turn-face-point) 910.2222) + (suspend) + (ja :num! (loop!)) + ) + (go (-> self turn-next-state)) + ) + :post (behavior () + (let ((a0-0 self)) + (if (logtest? (enemy-flag ef38) (-> a0-0 enemy-flags)) + (quaternion-rotate-local-y! + (-> self root quat) + (-> self root quat) + (* -81920.0 (seconds-per-frame) (-> self rot-mult)) + ) + ) + ) + (vector-float*! (-> self root transv) (-> self root transv) 0.6) + (vector-v++! (-> self root trans) (-> self root transv)) + (nav-enemy-simple-post) + ) + ) + +(defstate attack-wall (gekko) + :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 + (logior! (-> self flags) (gekko-flag follow-terrain update-tilt)) + (set-look-at-mode! self 1) + ) + :exit (behavior () + (set-time! (-> self attack-time)) + ) + :code (behavior () + (let* ((v1-2 (ja-group)) + (gp-0 (if (and v1-2 (= v1-2 gekko-wall-run0-a-ja)) + 25 + 24 + ) + ) + ) + (ja-channel-push! 1 (seconds 0.03)) + (let ((s5-0 (current-time)) + (s4-0 150) + (f30-0 0.5) + ) + (ja-no-eval :group! (-> self draw art-group data gp-0) :num! (loop! f30-0) :frame-num 0.0) + (until (time-elapsed? s5-0 s4-0) + (suspend) + (ja :num! (loop! f30-0)) + ) + ) + (let ((s5-1 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node gekko-lod0-jg head))) + (s4-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-1 quad) (-> self focus-pos quad)) + (set! (-> s4-1 y) (- (-> s4-1 y) (* 4096.0 (rnd-float-range self 0.0 10.0)))) + (sound-play "gekko-shot") + (spawn-metalhead-projectile (the-as metalhead-shot self) s5-1 s4-1 532480.0) + ) + (logclear! (-> self flags) (gekko-flag update-foot-position?)) + (ja-channel-push! 1 1) + (ja-no-eval :group! gekko-wall-shoot0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.06)) + (logior! (-> self flags) (gekko-flag update-foot-position?)) + (dotimes (s5-2 2) + (ja-no-eval :group! (-> self draw art-group data gp-0) :num! (seek! max 0.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.5)) + ) + ) + ) + (gekko-method-206 self) + ) + :post (behavior () + (seek! (-> self fade) 1.0 (seconds-per-frame)) + (set! (-> self draw force-fade) (the-as uint (the int (-> self fade)))) + (nav-enemy-simple-post) + ) + ) + +(defstate knocked-wall (gekko) + :virtual #t + :event enemy-event-handler + :enter (behavior () + ((-> (method-of-type nav-enemy knocked) enter)) + (dotimes (gp-0 4) + (enable-set! (-> self foot gp-0 leg-ik) #f) + ) + (logclear! (-> self flags) (gekko-flag follow-terrain update-tilt on-wall?)) + (logior! (-> self flags) (gekko-flag update-foot-position? falling-off-wall?)) + (set! (-> self probe-len) 18432.0) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) exit))) + (if t9-0 + (t9-0) + ) + ) + (logclear! (-> self flags) (gekko-flag falling-off-wall?)) + ) + :trans (behavior () + ((-> (method-of-type nav-enemy knocked) trans)) + (let ((a1-1 (quaternion-from-two-vectors-max-angle! + (new 'stack-no-clear 'quaternion) + (-> self rot-matrix uvec) + *y-vector* + (* 49152.0 (seconds-per-frame)) + ) + ) + (v1-4 (-> self root)) + ) + (quaternion*! (-> v1-4 quat) a1-1 (-> v1-4 quat)) + ) + ) + :code (-> (method-of-type nav-enemy knocked) code) + :post (behavior () + ((the-as (function none) (-> (method-of-type nav-enemy knocked) post))) + 0 + ) + ) + +(defstate jump-off-wall (gekko) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (stop-look-at! self) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self mask) (process-mask actor-pause)) + (let* ((v1-8 *game-info*) + (a0-4 (+ (-> v1-8 attack-id) 1)) + ) + (set! (-> v1-8 attack-id) a0-4) + (set! (-> self attack-id) a0-4) + ) + (set! (-> self root penetrate-using) (penetrate lunge vehicle knocked)) + (logclear! (-> self root status) (collide-status + on-surface + on-ground + touch-surface + touch-wall + touch-ceiling + touch-actor + on-special-surface + touch-edge + blocked + on-water + impact-surface + touch-background + stuck + glance + ) + ) + (when (not (logtest? (-> self root root-prim prim-core action) (collide-action no-normal-reset))) + (let ((v1-20 (-> self root dynam gravity-normal))) + (set! (-> self root local-normal quad) (-> v1-20 quad)) + (set! (-> self root surface-normal quad) (-> v1-20 quad)) + (set! (-> self root poly-normal quad) (-> v1-20 quad)) + ) + (set! (-> self root coverage) 0.0) + (set! (-> self root touch-angle) 0.0) + ) + (logior! (-> self focus-status) (focus-status dangerous)) + (enemy-method-50 self 3) + (dotimes (gp-0 4) + (enable-set! (-> self foot gp-0 leg-ik) #f) + ) + (set! (-> self probe-len) 18432.0) + (logclear! (-> self flags) (gekko-flag follow-terrain update-tilt on-wall?)) + (logior! (-> self flags) (gekko-flag update-foot-position?)) + ) + :trans (behavior () + '() + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! gekko-jump-to-ground-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual jump-off-wall-falling) + ) + :post (behavior () + (nav-enemy-simple-post) + ) + ) + +(defstate jump-off-wall-falling (gekko) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((v1-1 (vector-! (new 'stack-no-clear 'vector) (-> self focus-pos) (-> self root trans)))) + (set! (-> v1-1 y) 0.0) + (vector-float*! (-> self root transv) v1-1 1.5) + ) + (set-time! (-> self state-time)) + ) + :trans #f + :code (behavior () + (local-vars (s4-0 collide-shape-moving)) + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! gekko-jump-to-ground-in-air-ja :num! (seek!)) + (let ((gp-0 0) + (s5-0 0) + ) + (until (or (>= gp-0 3) + (and (logtest? (-> s4-0 status) (collide-status on-ground)) (>= 16384.0 (-> s4-0 transv y))) + (and (>= s5-0 3) + (let ((f0-7 40.96)) + (>= (* f0-7 f0-7) (vector-vector-distance-squared (-> s4-0 trans-old) (-> s4-0 trans-old-old))) + ) + (let ((f0-10 40.96)) + (>= (* f0-10 f0-10) (vector-vector-distance-squared (-> s4-0 trans-old-old) (-> s4-0 trans-old-old-old))) + ) + ) + ) + (if (time-elapsed? (-> self state-time) (seconds 2)) + (go-die self) + ) + (if (logtest? (-> self root status) (collide-status on-surface)) + (+! gp-0 1) + ) + (suspend) + (ja :num! (seek!)) + (+! s5-0 1) + (set! s4-0 (-> self root)) + ) + ) + (go-virtual jump-off-wall-recover) + ) + :post (behavior () + (let ((a1-1 (quaternion-from-two-vectors-max-angle! + (new 'stack-no-clear 'quaternion) + (-> self rot-matrix uvec) + *y-vector* + (* 49152.0 (seconds-per-frame)) + ) + ) + (v1-2 (-> self root)) + ) + (quaternion*! (-> v1-2 quat) a1-1 (-> v1-2 quat)) + ) + (nav-enemy-falling-post) + ) + ) + +(defstate jump-off-wall-recover (gekko) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (gekko-method-208 self) + (set! (-> self root penetrate-using) (penetrate)) + 0 + ) + :exit (behavior () + (local-vars (v1-9 enemy-flag) (v1-11 enemy-flag) (v1-13 enemy-flag)) + (enemy-method-50 self 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-8 (-> self enemy-flags))) + (if (logtest? v1-8 (enemy-flag vulnerable-backup)) + (set! v1-9 (logior v1-8 (enemy-flag vulnerable))) + (set! v1-9 (logclear v1-8 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-9) + (let ((v1-10 (-> self enemy-flags))) + (if (logtest? v1-10 (enemy-flag attackable-backup)) + (set! v1-11 (logior v1-10 (enemy-flag attackable))) + (set! v1-11 (logclear v1-10 (enemy-flag attackable))) + ) + ) + (set! (-> self enemy-flags) v1-11) + (let ((v1-12 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-12) + (set! v1-13 (logior (enemy-flag trackable) v1-12)) + (set! v1-13 (logclear v1-12 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-13) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (dotimes (gp-0 4) + (enable-set! (-> self foot gp-0 leg-ik) #t) + ) + (logior! (-> self flags) (gekko-flag follow-terrain update-tilt)) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (seconds 0.2)) (within-gspot-range? self)) + (go-die self) + ) + ) + :code (behavior () + (ja-channel-set! 1) + (ja-no-eval :group! gekko-jump-to-ground-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (dotimes (gp-0 2) + (ja-no-eval :group! gekko-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (if (enemy-method-109 self) + (go-die self) + (go-best-state self) + ) + ) + :post (behavior () + (nav-enemy-simple-post) + ) + ) + +(defstate active (gekko) + :virtual #t + :enter (behavior () + (if (logtest? (-> self flags) (gekko-flag on-wall?)) + (go-virtual active-wall) + ) + (let ((t9-1 (-> (method-of-type nav-enemy active) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :code (behavior () + (until #f + (let* ((f30-1 (* 0.5 (rnd-float-range self 0.9 1.1))) + (v1-5 (ja-group)) + (s5-0 (if (and v1-5 (= v1-5 gekko-run0-a-ja)) + 25 + 24 + ) + ) + (s4-0 (set-reaction-time! self (seconds 0.007) (seconds 0.017))) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (nav-enemy-method-164 self) + (let ((a1-2 (-> self nav state))) + (set! (-> gp-0 quad) (-> a1-2 target-pos quad)) + ) + (let ((v1-13 self)) + (set! (-> v1-13 enemy-flags) (the-as enemy-flag (logclear (-> v1-13 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-13 nav callback-info) *null-nav-callback-info*) + ) + 0 + (ja-channel-push! 1 (seconds 0.2)) + (dotimes (s3-0 s4-0) + (ja-no-eval :group! (-> self draw art-group data s5-0) :num! (seek! max f30-1) :frame-num 0.0) + (until (ja-done? 0) + (if (= (-> self skel root-channel 0) (-> self skel channel)) + (logclear! (-> self flags) (gekko-flag update-foot-position?)) + ) + (suspend) + (ja :num! (seek! max f30-1)) + ) + ) + (when (not (enemy-method-104 self gp-0 8192.0)) + (let ((v1-48 self)) + (set! (-> v1-48 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-48 enemy-flags)))) + ) + 0 + (logior! (-> self flags) (gekko-flag update-foot-position?)) + (ja-channel-push! 1 (seconds 0.06)) + (let ((a0-26 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (v1-54 (vector-! (new 'stack-no-clear 'vector) gp-0 (-> self root trans))) + (f30-2 0.5) + (f28-0 1.0) + ) + (cond + ((< 0.0 (vector-dot a0-26 v1-54)) + (ja-no-eval :group! gekko-turn-left0-ja :num! (loop! f30-2) :frame-num 0.0) + ) + (else + (ja-no-eval :group! gekko-turn-right0-ja :num! (loop! f30-2) :frame-num 0.0) + (set! f28-0 (* -1.0 f28-0)) + ) + ) + (until (enemy-method-104 self gp-0 6371.5557) + (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) (* -81920.0 (seconds-per-frame) f28-0)) + (suspend) + (ja :num! (loop! f30-2)) + ) + ) + ) + ) + (let* ((v1-86 (ja-group)) + (gp-1 (if (and v1-86 (= v1-86 gekko-idle0-ja)) + 14 + 15 + ) + ) + (v1-91 (ja-group)) + (s5-1 (if (and v1-91 (= v1-91 gekko-idle0-ja)) + 15 + 14 + ) + ) + (s4-1 (set-reaction-time! self (seconds 0.017) (seconds 0.027))) + ) + (let ((v1-95 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-95 enemy-flags))) + (set! (-> v1-95 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-95 enemy-flags)))) + ) + (set! (-> v1-95 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-95 enemy-flags)))) + (set! (-> v1-95 nav callback-info) (-> v1-95 enemy-info callback-info)) + ) + 0 + (ja-channel-push! 1 (seconds 0.2)) + (let ((f30-3 (/ 0.5 (-> self scale)))) + (dotimes (s3-1 s4-1) + (ja-no-eval :group! (-> self draw art-group data gp-1) :num! (seek! max f30-3) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-3)) + ) + (ja-no-eval :group! (-> self draw art-group data s5-1) :num! (seek! max f30-3) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-3)) + ) + ) + ) + ) + ) + #f + ) + ) + +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior gekko-stare-code gekko () + (let* ((f30-1 (* 0.5 (rnd-float-range self 0.9 1.1))) + (v1-5 (ja-group)) + (gp-0 (if (and v1-5 (= v1-5 gekko-run0-a-ja)) + 25 + 24 + ) + ) + ) + (until #f + (cond + ((enemy-method-104 self (-> self focus-pos) 8192.0) + (let ((v1-10 self)) + (set! (-> v1-10 enemy-flags) (the-as enemy-flag (logclear (-> v1-10 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (let ((v1-14 (ja-group))) + (if (not (and v1-14 (= v1-14 (-> self draw art-group data gp-0)))) + (ja-channel-push! 1 (seconds 0.12)) + ) + ) + (ja-no-eval :group! (-> self draw art-group data gp-0) :num! (seek! max f30-1) :frame-num 0.0) + (until (ja-done? 0) + (if (= (-> self skel root-channel 0) (-> self skel channel)) + (logclear! (-> self flags) (gekko-flag update-foot-position?)) + ) + (suspend) + (ja :num! (seek! max f30-1)) + ) + ) + ((or (enemy-method-104 self (-> self focus-pos) 30947.555) (rnd-chance? self 0.3)) + (let ((v1-50 self)) + (set! (-> v1-50 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-50 enemy-flags)))) + ) + 0 + (logior! (-> self flags) (gekko-flag update-foot-position?)) + (ja-channel-push! 1 (seconds 0.06)) + (let ((a0-28 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (v1-56 (vector-! (new 'stack-no-clear 'vector) (-> self focus-pos) (-> self root trans))) + (f28-0 0.5) + ) + (if (< 0.0 (vector-dot a0-28 v1-56)) + (ja-no-eval :group! gekko-turn-left0-ja :num! (loop! f28-0) :frame-num 0.0) + (ja-no-eval :group! gekko-turn-right0-ja :num! (loop! f28-0) :frame-num 0.0) + ) + (until (enemy-method-104 self (-> self focus-pos) 6371.5557) + (suspend) + (ja :num! (loop! f28-0)) + ) + ) + ) + (else + (go-virtual turn-quick) + ) + ) + ) + ) + #f + (none) + ) + +(defstate stare (gekko) + :virtual #t + :code gekko-stare-code + ) + +(defstate flee (gekko) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy flee) enter))) + (if t9-0 + (t9-0) + ) + ) + (dotimes (gp-0 4) + (enable-set! (-> self foot gp-0 leg-ik) #t) + ) + (logior! (-> self flags) (gekko-flag update-foot-position? follow-terrain update-tilt)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.015)) + (until #f + (let ((f30-0 (/ (rnd-float-range self 0.9 1.1) (-> self scale)))) + (ja-no-eval :group! gekko-run0-a-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! gekko-run0-b-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + #f + ) + ) + +(defstate hostile (gekko) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (dotimes (gp-0 4) + (enable-set! (-> self foot gp-0 leg-ik) #t) + ) + (logior! (-> self flags) (gekko-flag update-foot-position? follow-terrain update-tilt)) + (let ((v1-13 self)) + (set! (-> v1-13 enemy-flags) (the-as enemy-flag (logclear (-> v1-13 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + :trans (behavior () + '() + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.12)) + (until #f + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (ja-no-eval :group! gekko-run0-a-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (gekko-method-203 self) + (ja-no-eval :group! gekko-run0-b-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (gekko-method-203 self) + ) + #f + ) + :post (behavior () + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (-> self focus-pos))) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-1 y) 0.0) + (vector-xz-normalize! s4-1 24576.0) + (vector+! gp-0 (-> self focus-pos) s4-1) + (set! (-> s5-0 quad) (-> gp-0 quad)) + (closest-point-on-mesh (-> self nav) s5-0 gp-0 (the-as nav-poly #f)) + (set! (-> self move-dest quad) (-> s5-0 quad)) + ) + (let ((v1-8 (-> self nav state))) + (logclear! (-> v1-8 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-8 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-8 target-pos quad) (-> gp-0 quad)) + ) + ) + 0 + (nav-enemy-method-187 self) + ) + ) + +(defstate pre-attack (gekko) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set! (-> self move-speed) (vector-length (-> self root transv))) + (set! (-> self move-decel) (fmax 163840.0 (* 0.00012207031 (-> self move-speed) (-> self move-speed)))) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.3)) + (cond + ((and (get-focus! self) + (enemy-method-104 self (-> self focus-pos) 8192.0) + (let ((f0-0 (vector-vector-distance (-> self root trans) (-> self focus-pos)))) + (< f0-0 40960.0) + (and (< 4096.0 f0-0) (gekko-method-204 self)) + ) + ) + (go-virtual attack) + ) + (else + (set! (-> self scared-timer) (+ (current-time) (the int (* 300.0 (rnd-float-range self 0.8 2.1))))) + (go-best-state self) + ) + ) + ) + ) + :code gekko-stare-code + :post (behavior () + (seek! (-> self move-speed) 0.0 (* (-> self move-decel) (seconds-per-frame))) + (vector-normalize-copy! + (-> self root transv) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (-> self move-speed) + ) + (vector+! (-> self move-dest) (-> self root trans) (-> self root transv)) + (vector-v++! (-> self root trans) (-> self root transv)) + (nav-enemy-face-focus-post) + ) + ) + +(defstate attack (gekko) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (dotimes (gp-0 4) + (enable-set! (-> self foot gp-0 leg-ik) #f) + ) + (logclear! (-> self flags) (gekko-flag update-foot-position? update-tilt)) + (set-look-at-mode! self 1) + (logior! (-> self focus-status) (focus-status dangerous)) + (let ((v1-14 (-> self root root-prim))) + (let ((a0-4 (-> (the-as collide-shape-prim-group v1-14) child 6))) + (set! (-> a0-4 prim-core collide-as) (collide-spec enemy)) + (+! (-> a0-4 local-sphere w) 3276.8) + ) + (+! (-> v1-14 local-sphere w) 6144.0) + ) + (let ((v1-16 self)) + (set! (-> v1-16 enemy-flags) (the-as enemy-flag (logclear (-> v1-16 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-16 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let ((v1-19 self)) + (set! (-> v1-19 enemy-flags) (the-as enemy-flag (logclear (-> v1-19 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + :exit (behavior () + (dotimes (gp-0 4) + (enable-set! (-> self foot gp-0 leg-ik) #t) + ) + (logior! (-> self flags) (gekko-flag update-foot-position? follow-terrain update-tilt)) + (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-16 (-> self root root-prim))) + (let ((a0-3 (-> (the-as collide-shape-prim-group v1-16) child 6))) + (set! (-> a0-3 prim-core collide-as) (collide-spec)) + (+! (-> a0-3 local-sphere w) -3276.8) + ) + (+! (-> v1-16 local-sphere w) -6144.0) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! gekko-attack0-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((v1-24 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-24 enemy-flags))) + (set! (-> v1-24 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-24 enemy-flags)))) + ) + (set! (-> v1-24 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-24 enemy-flags)))) + (set! (-> v1-24 nav callback-info) (-> v1-24 enemy-info callback-info)) + ) + 0 + (let ((gp-0 (-> self nav))) + (set! (-> gp-0 target-speed) (lerp-scale + 24576.0 + 110592.0 + (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) + 4096.0 + 24576.0 + ) + ) + ) + 0 + (ja-no-eval :group! gekko-attack0-mid-ja :num! (seek! max (/ 1.0 (-> self scale))) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (/ 1.0 (-> self scale)))) + ) + (nav-enemy-method-177 self) + (let ((v1-55 self)) + (set! (-> v1-55 enemy-flags) (the-as enemy-flag (logclear (-> v1-55 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-55 nav callback-info) *null-nav-callback-info*) + ) + 0 + (set-time! (-> self attack-time)) + (ja-no-eval :group! gekko-attack0-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-best-state self) + ) + :post nav-enemy-chase-post + ) + +(defstate turn (gekko) + :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 + (logclear! (-> self flags) (gekko-flag follow-terrain)) + ) + :trans (behavior () + (if (enemy-method-104 self (-> self focus-pos) 2730.6667) + (go-best-state self) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (let ((a0-2 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (v1-2 (vector-! (new 'stack-no-clear 'vector) (-> self focus-pos) (-> self root trans))) + (f30-0 (/ 1.0 (-> self scale))) + ) + (cond + ((< 0.0 (vector-dot a0-2 v1-2)) + (ja-no-eval :group! gekko-turn-left0-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (else + (ja-no-eval :group! gekko-turn-right0-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + ) + ) + #f + ) + :post nav-enemy-face-focus-post + ) + +(defstate turn-quick (gekko) + :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 + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! gekko-turn-hop0-ja :num! (seek! max (/ 1.0 (-> self scale))) :frame-num 0.0) + (until (ja-done? 0) + (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) (* 98304.0 (seconds-per-frame))) + (suspend) + (ja :num! (seek! max (/ 1.0 (-> self scale)))) + ) + (ja-no-eval :group! gekko-turn-hop0-land-ja :num! (seek! max (/ 1.0 (-> self scale))) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (/ 1.0 (-> self scale)))) + ) + (if (nav-enemy-method-174 self) + (go-stare2 self) + ) + (go-best-state self) + ) + :post nav-enemy-simple-post + ) + +(defstate jump (gekko) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy jump) enter))) + (if t9-0 + (t9-0) + ) + ) + (dotimes (gp-0 4) + (enable-set! (-> self foot gp-0 leg-ik) #f) + ) + (logclear! (-> self flags) (gekko-flag follow-terrain update-tilt on-wall?)) + (logior! (-> self flags) (gekko-flag update-foot-position? falling-off-wall?)) + ) + ) + +(defstate knocked (gekko) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-0 + (t9-0) + ) + ) + (dotimes (gp-0 4) + (enable-set! (-> self foot gp-0 leg-ik) #f) + ) + (set! (-> self probe-len) 18432.0) + (logclear! (-> self flags) (gekko-flag follow-terrain update-tilt on-wall?)) + (logior! (-> self flags) (gekko-flag update-foot-position?)) + (set-vector! + (-> (the-as ragdoll-proc (handle->process (-> self ragdoll-proc))) ragdoll gravity-target) + 0.0 + -1.5 + 0.0 + 1.0 + ) + ) + :post (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + 0 + ) + ) + +(defstate knocked-recover (gekko) + :virtual #t + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked-recover) exit))) + (if t9-0 + (t9-0) + ) + ) + (dotimes (gp-0 4) + (enable-set! (-> self foot gp-0 leg-ik) #t) + ) + (logior! (-> self flags) (gekko-flag follow-terrain update-tilt)) + ) + :code (behavior () + (gekko-method-208 self) + (ja-channel-push! 1 (seconds 0.4)) + (ja-no-eval :group! gekko-run0-a-ja :num! (seek!) :frame-num 0.0) + (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.4)) + (suspend) + ) + ) + (if (enemy-method-109 self) + (go-die self) + (go-hostile self) + ) + ) + :post (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked-recover) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + +;; WARN: Return type mismatch matrix vs none. +(defun gekko-foot-rot-handler ((arg0 cspace) (arg1 transformq)) + (let ((v1-0 (-> arg0 param2))) + (cspace<-transformq! arg0 (the-as transformq (&-> (the-as gekko v1-0) pool))) + ) + (none) + ) + +(defun gekko-postbind ((arg0 draw-control) (arg1 cspace-array)) + (local-vars + (sv-560 float) + (sv-640 vector) + (sv-688 float) + (sv-692 vector) + (sv-696 vector) + (sv-976 cspace) + (sv-980 gekko-foot-info) + (sv-984 vector) + (sv-988 vector) + (sv-992 (function vector vector vector vector float)) + (sv-1008 vector) + (sv-1024 vector) + (sv-1040 vector) + (sv-1056 joint-mod-ik) + (sv-1072 vector) + (sv-1088 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) + (let ((gp-0 (the-as gekko (-> arg0 process)))) + (let ((s3-0 (-> gp-0 root))) + (let ((s2-0 (new 'stack-no-clear 'collide-query)) + (f30-0 (-> gp-0 probe-len)) + ) + (set! sv-560 (the-as float 2048.0)) + (quaternion->matrix (-> gp-0 rot-matrix) (-> gp-0 root quat)) + (let ((v1-2 1) + (a0-2 (new 'stack-no-clear 'inline-array 'vector 1)) + ) + (set! (-> a0-2 0 quad) (-> s3-0 trans quad)) + (set! (-> a0-2 0 w) + (+ 409.6 sv-560 (sqrtf (+ (* 25600.0 (-> gp-0 scale) (-> gp-0 scale)) (* 0.25 f30-0 f30-0)))) + ) + (let ((a1-6 s2-0)) + (set! (-> a1-6 best-dist) (the-as float a0-2)) + (set! (-> a1-6 best-other-prim) (the-as collide-shape-prim v1-2)) + (set! (-> a1-6 collide-with) (collide-spec backgnd)) + (set! (-> a1-6 ignore-process0) gp-0) + (set! (-> a1-6 ignore-process1) #f) + (set! (-> a1-6 ignore-pat) (-> gp-0 root pat-ignore-mask)) + (set! (-> a1-6 best-my-prim) (the-as collide-shape-prim #t)) + (set! (-> a1-6 action-mask) (collide-action solid)) + ) + ) + (fill-using-spheres *collide-cache* s2-0) + (dotimes (s1-0 4) + (let ((s0-0 (-> gp-0 foot s1-0))) + (set! sv-1056 (-> s0-0 leg-ik)) + (set! sv-1008 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> arg1 data (-> *gekko-ik-setup* s1-0 hand-index))) + ) + (let ((v0-3 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> arg1 data (-> *gekko-ik-setup* s1-0 effector-index))) + ) + ) + (set! sv-640 (vector-! (new 'stack-no-clear 'vector) v0-3 sv-1008)) + ) + (let ((v1-28 (if (logtest? (-> gp-0 flags) (gekko-flag on-wall?)) + (-> gp-0 rot-matrix uvec) + *y-vector* + ) + ) + ) + (vector+float*! (-> s2-0 start-pos) sv-1008 v1-28 (* 0.5 f30-0)) + (vector-float*! (-> s2-0 move-dist) v1-28 (- f30-0)) + ) + (let ((v1-29 s2-0)) + (set! (-> v1-29 radius) sv-560) + (set! (-> v1-29 collide-with) (collide-spec backgnd)) + (set! (-> v1-29 ignore-process0) #f) + (set! (-> v1-29 ignore-process1) #f) + (set! (-> v1-29 ignore-pat) (-> gp-0 root pat-ignore-mask)) + (set! (-> v1-29 action-mask) (collide-action solid)) + ) + (set! sv-688 (probe-using-line-sphere *collide-cache* s2-0)) + (set! sv-692 (new 'stack-no-clear 'vector)) + (set! sv-696 (new 'stack-no-clear 'vector)) + (cond + ((>= sv-688 0.0) + (let ((v0-5 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s2-0 move-dist) 1.0))) + (vector+float*! sv-692 (-> s2-0 start-pos) (-> s2-0 move-dist) sv-688) + (vector-! sv-696 sv-692 (-> s2-0 best-other-tri intersect)) + (vector+float*! sv-692 sv-692 v0-5 (-> s2-0 radius)) + ) + (vector-normalize! sv-696 1.0) + ) + (else + (set! (-> sv-692 quad) (-> sv-1008 quad)) + (set! (-> sv-692 y) (-> gp-0 root gspot-pos y)) + (set! (-> sv-696 quad) (-> gp-0 rot-matrix uvec quad)) + ) + ) + (if (logtest? (-> gp-0 flags) (gekko-flag on-wall?)) + (set! (-> s0-0 ground-normal quad) (-> sv-696 quad)) + (set! (-> s0-0 ground-normal quad) (-> *y-vector* quad)) + ) + (when (logtest? (-> gp-0 flags) (gekko-flag update-foot-position?)) + (set! sv-992 intersect-ray-plane) + (let* ((a1-22 (vector-negate! (new 'stack-no-clear 'vector) (-> gp-0 rot-matrix uvec))) + (a2-4 (-> gp-0 root trans)) + (a3-1 (-> gp-0 rot-matrix uvec)) + (f0-13 (sv-992 sv-1008 a1-22 a2-4 a3-1)) + ) + (vector+float*! sv-692 sv-692 (-> s0-0 ground-normal) f0-13) + ) + (vector+! sv-692 sv-692 sv-640) + ) + 0.0 + (let ((f28-0 (* 2457.6 (-> gp-0 scale))) + (v0-9 (vector<-cspace! (new 'stack-no-clear 'vector) (-> gp-0 node-list data 3))) + ) + (set! sv-1024 (new 'stack-no-clear 'vector)) + (set! sv-1040 (new 'stack-no-clear 'vector)) + (vector+float*! v0-9 v0-9 (-> gp-0 rot-matrix uvec) 3072.0) + (let ((f28-1 (+ 3072.0 f28-0))) + (when (< (vector-line-distance-point! + sv-692 + v0-9 + (vector+! (new 'stack-no-clear 'vector) v0-9 (-> gp-0 rot-matrix fvec)) + sv-1024 + ) + f28-1 + ) + (vector-! sv-1040 sv-692 sv-1024) + (vector-normalize! sv-1040 f28-1) + (let ((v1-64 sv-692)) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> sv-1024 quad)) + (.lvf vf5 (&-> sv-1040 quad)) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-64 quad) vf6) + ) + 0 + ) + ) + ) + (vector-seek! + (-> s0-0 ground-pos) + sv-692 + (* (fmax 61440.0 (* 1.2 (vector-length (-> s3-0 transv)))) (seconds-per-frame)) + ) + (let ((t9-13 (method-of-object sv-1056 set-ik-target!)) + (a1-33 (-> s0-0 ground-pos)) + ) + (t9-13 sv-1056 a1-33) + ) + ) + ) + ) + (let ((s2-1 (new 'stack-no-clear 'vector))) + (let ((s1-1 (new 'stack-no-clear 'vector))) + (vector-reset! s2-1) + (vector-reset! s1-1) + (dotimes (s0-1 4) + (vector+! s2-1 s2-1 (the-as vector (-> gp-0 foot s0-1))) + (when (> s0-1 0) + (set! sv-1072 + (vector-normalize! + (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> gp-0 foot s0-1)) (the-as vector (-> gp-0 foot))) + 1.0 + ) + ) + (set! sv-1088 (new 'stack-no-clear 'vector)) + (let ((v1-83 (-> gp-0 rot-matrix uvec)) + (a0-46 sv-1072) + ) + (.lvf vf1 (&-> v1-83 quad)) + (.lvf vf2 (&-> a0-46 quad)) + ) + (.outer.product.a.vf acc vf1 vf2) + (.outer.product.b.vf vf3 vf2 vf1 acc) + (.svf (&-> sv-1088 quad) vf3) + (vector-normalize! sv-1088 1.0) + (let ((a1-41 s1-1) + (v1-85 s1-1) + (a0-48 (new 'stack-no-clear 'vector)) + ) + (.lvf vf1 (&-> sv-1072 quad)) + (.lvf vf2 (&-> sv-1088 quad)) + (.outer.product.a.vf acc vf1 vf2) + (.outer.product.b.vf vf3 vf2 vf1 acc) + (.svf (&-> a0-48 quad) vf3) + (vector+! a1-41 v1-85 a0-48) + ) + ) + ) + (vector-float*! s2-1 s2-1 0.25) + (vector-normalize-copy! (-> gp-0 gspot-normal) s1-1 1.0) + ) + (when (logtest? (-> gp-0 flags) (gekko-flag follow-terrain)) + (set! (-> gp-0 root gspot-pos quad) (-> s2-1 quad)) + (let ((a2-15 (vector-! (new 'stack-no-clear 'vector) s2-1 (-> s3-0 trans)))) + (vector+float*! + (-> s3-0 trans) + (-> s3-0 trans) + (-> gp-0 rot-matrix uvec) + (* 0.9 (vector-dot a2-15 (-> gp-0 rot-matrix uvec))) + ) + ) + ) + ) + (when (logtest? (-> gp-0 flags) (gekko-flag update-tilt)) + (let ((s2-2 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> s3-0 quat))) + (a2-18 (quaternion-from-two-vectors-max-angle-partial! + (new 'stack-no-clear 'quaternion) + (-> gp-0 rot-matrix uvec) + (-> gp-0 gspot-normal) + 21845.334 + (* 8.0 (seconds-per-frame)) + ) + ) + (s1-2 (new 'stack-no-clear 'vector)) + ) + (quaternion-slerp! (-> gp-0 tilt-quat) (-> gp-0 tilt-quat) a2-18 1.0) + (vector-orient-by-quat! s1-2 (-> gp-0 rot-matrix uvec) (-> gp-0 tilt-quat)) + (forward-up-nopitch->quaternion (-> s3-0 quat) s2-2 s1-2) + ) + ) + ) + (dotimes (s3-1 4) + (set! sv-976 (-> arg1 data (-> *gekko-ik-setup* s3-1 effector-index))) + (set! sv-980 (the-as gekko-foot-info (+ (the-as uint (-> gp-0 foot 0 foot-transform)) (* 96 s3-1)))) + (set! sv-984 (new 'stack-no-clear 'vector)) + (set! sv-988 (new 'stack-no-clear 'vector)) + (quaternion-from-two-vectors! + (the-as quaternion sv-988) + (-> gp-0 rot-matrix uvec) + (the-as vector (+ (the-as uint (-> gp-0 foot 0 ground-normal)) (* 96 s3-1))) + ) + (vector<-cspace! (-> sv-980 ground-pos) sv-976) + (matrix->quaternion (the-as quaternion sv-984) (-> sv-976 bone transform)) + (quaternion*! + (the-as quaternion (-> sv-980 ground-normal)) + (the-as quaternion sv-988) + (the-as quaternion sv-984) + ) + ) + (logclear! (-> gp-0 skel status) (joint-control-status no-joint-callbacks)) + (draw-control-method-14 arg0 arg1 (-> gp-0 skel)) + (logior! (-> gp-0 skel status) (joint-control-status no-joint-callbacks)) + ) + 0 + 0 + (none) + ) + ) + +(defun gekko-postbind-callback ((arg0 draw-control) (arg1 cspace-array) (arg2 joint-control)) + (gekko-postbind arg0 arg1) + (none) + ) + +(defmethod gekko-method-203 ((this gekko)) + ((-> (method-of-type nav-enemy hostile) trans)) + (when (< (vector-vector-xz-distance (-> this root trans) (-> this move-dest)) 8192.0) + (let* ((s5-0 (-> this focus-pos)) + (v1-6 (vector-! (new 'stack-no-clear 'vector) s5-0 (-> this root trans))) + (f30-0 (sqrtf (+ (* (-> v1-6 x) (-> v1-6 x)) (* (-> v1-6 z) (-> v1-6 z))))) + ) + (cond + ((and (get-focus! this) (and (and (< f30-0 32768.0) (< 16384.0 f30-0)) (enemy-method-104 this s5-0 6371.5557))) + (go (method-of-object this pre-attack)) + ) + ((< 32768.0 f30-0) + (cond + ((not (enemy-method-104 this s5-0 29127.111)) + (go (method-of-object this turn-quick)) + ) + ((not (enemy-method-104 this s5-0 6371.5557)) + (go (method-of-object this turn)) + ) + ) + ) + ) + ) + (set! (-> this scared-timer) (+ (current-time) (the int (* 300.0 (rnd-float-range this 1.3 2.25))))) + (go-best-state this) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod gekko-method-204 ((this gekko)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> this root trans quad)) + (let* ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (closest-point-on-mesh (-> this nav) s5-0 s3-0 (the-as nav-poly #f))) + ) + (when (and s4-0 (< (vector-vector-xz-distance s5-0 s3-0) 4096.0)) + (let* ((s3-2 (vector-! (new 'stack-no-clear 'vector) (-> this focus-pos) s5-0)) + (f30-0 (vector-length s3-2)) + (s2-0 (new 'stack 'clamp-travel-vector-to-mesh-return-info)) + ) + (vector-float*! s3-2 s3-2 (/ (* 8192.0 (-> this scale)) f30-0)) + (clamp-vector-to-mesh-no-gaps (-> this nav) s5-0 s4-0 s3-2 s2-0) + (not (-> s2-0 found-boundary)) + ) + ) + ) + ) + (none) + ) + +(defmethod is-pfoc-in-mesh? ((this gekko) (arg0 process-focusable) (arg1 vector)) + (if (and arg0 (not arg1)) + (set! arg1 (get-trans arg0 1)) + ) + (when arg1 + (let* ((f0-0 (-> arg1 y)) + (v1-4 (-> this root)) + (f1-0 (-> v1-4 trans y)) + (a0-2 (-> this fact)) + ) + (when (and (< f0-0 (+ f1-0 (-> a0-2 notice-top))) (< (- f1-0 (-> a0-2 notice-bottom)) f0-0)) + (let* ((f30-0 (if (logtest? (-> this flags) (gekko-flag on-wall?)) + (-> this enemy-info notice-nav-radius) + 8192.0 + ) + ) + (f0-2 f30-0) + ) + (or (>= (* f0-2 f0-2) (vector-vector-xz-distance-squared (-> v1-4 trans) arg1)) + (is-in-mesh? (-> this nav) arg1 f30-0) + ) + ) + ) + ) + ) + ) + +(defmethod enemy-method-109 ((this gekko)) + (let ((gp-0 (-> this root)) + (s3-0 (-> this nav state)) + ) + (do-navigation-to-destination s3-0 (-> gp-0 trans)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (cond + ((logtest? (-> s3-0 flags) (nav-state-flag in-mesh)) + (set! (-> s5-0 quad) (-> gp-0 trans quad)) + ) + (else + (if (or (not (closest-point-on-mesh (-> this nav) s5-0 (-> gp-0 trans) (-> s3-0 current-poly))) + (let ((f0-0 16384.0)) + (< (* f0-0 f0-0) (vector-vector-xz-distance-squared s5-0 (-> gp-0 trans))) + ) + (and (and (-> this next-state) (= (-> this next-state name) 'knocked-recover)) + (< (-> gp-0 trans y) (+ -8192.0 (-> s5-0 y))) + (< (+ 12288.0 (-> s5-0 y)) (-> gp-0 trans y)) + ) + ) + (return #t) + ) + ) + ) + ) + ) + #f + ) + +;; WARN: Return type mismatch object vs none. +(defmethod gekko-method-206 ((this gekko)) + (set-look-at-mode! this 2) + (gekko-method-205 this) + (set! (-> this turn-next-state) (method-of-type gekko hostile-wall)) + (go (method-of-object this turn-wall)) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod gekko-method-207 ((this gekko)) + (set-look-at-mode! this 1) + (set! (-> this turn-face-point quad) (-> this focus-pos quad)) + (set! (-> this turn-next-state) (method-of-type gekko attack-wall)) + (go (method-of-object this turn-wall)) + (none) + ) + +(defmethod get-focus! ((this gekko)) + (let* ((t9-0 (method-of-type nav-enemy get-focus!)) + (v0-0 (t9-0 this)) + ) + (cond + ((and v0-0 + (or (logtest? (-> this flags) (gekko-flag on-wall?)) (time-elapsed? (-> this attack-time) (seconds 3))) + ) + (empty) + v0-0 + ) + (else + (the-as process-focusable #f) + ) + ) + ) + ) + +(defmethod gekko-method-205 ((this gekko)) + (cond + ((zero? (-> this path-wall)) + (go process-drawable-art-error "no path-wall") + ) + (else + (let ((s5-0 (-> this path-wall curve num-cverts))) + (if (<= s5-0 0) + (go process-drawable-art-error "no path-wall") + ) + (let ((s2-0 (rnd-int this s5-0)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (countdown (s3-0 s5-0) + (get-point-in-path! (-> this path-wall) s4-0 (the float s2-0) 'interp) + (if (< 8192.0 (vector-vector-xz-distance s4-0 (-> this root trans))) + (goto cfg-11) + ) + (set! s2-0 (mod (+ s2-0 1) s5-0)) + ) + (label cfg-11) + (set! (-> this move-dest quad) (-> s4-0 quad)) + (set! (-> this turn-face-point quad) (-> s4-0 quad)) + ) + ) + (vector-! (-> this dest-to-me-dir) (-> this root trans) (-> this move-dest)) + ) + ) + 0 + (none) + ) + +;; WARN: disable def twice: 33. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod enemy-method-108 ((this gekko) (arg0 process-focusable)) + (or (< (current-time) (-> this scared-timer)) + (let ((v1-4 (handle->process (-> this focus handle)))) + (if v1-4 + (and (or (focus-test? (the-as process-focusable v1-4) disable dead ignore grabbed) + (and (not (logtest? (-> this flags) (gekko-flag on-wall?))) + (not (time-elapsed? (-> this attack-time) (seconds 3))) + ) + ) + (< (vector-vector-distance (-> this focus-pos) (-> this root trans)) 49152.0) + ) + #f + ) + ) + ) + ) + +(defmethod knocked-anim ((this gekko) (arg0 enemy-knocked-info)) + (ja-channel-push! 1 0) + (cond + ((logtest? (-> this flags) (gekko-flag falling-off-wall?)) + (let ((a0-2 (-> this skel root-channel 0))) + (set! (-> a0-2 frame-group) (the-as art-joint-anim (-> this draw art-group data 23))) + (set! (-> a0-2 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 23)) 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 23)) 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 29))) + (set! (-> a0-3 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 29)) 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 29)) num-func-seek!) + ) + ) + ) + #t + ) + +(defmethod knocked-land-anim ((this gekko) (arg0 enemy-knocked-info)) + (let ((v1-2 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (cond + ((and v1-2 (= v1-2 (-> this draw art-group data 23))) + (let ((v1-7 (-> this skel root-channel 0))) + (set! (-> v1-7 frame-group) (the-as art-joint-anim (-> this draw art-group data 18))) + (set! (-> v1-7 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 18)) frames num-frames) -1)) + ) + (set! (-> v1-7 param 1) (-> arg0 anim-speed)) + (set! (-> v1-7 frame-num) 0.0) + (joint-control-channel-group! v1-7 (the-as art-joint-anim (-> this draw art-group data 18)) num-func-seek!) + ) + ) + ((= (-> this hit-points) 0.0) + (let ((v1-11 (-> this skel root-channel 0))) + (set! (-> v1-11 frame-group) (the-as art-joint-anim (-> this draw art-group data 31))) + (set! (-> v1-11 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 31)) 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 31)) num-func-seek!) + ) + ) + (else + (let ((v1-15 (-> this skel root-channel 0))) + (set! (-> v1-15 frame-group) (the-as art-joint-anim (-> this draw art-group data 30))) + (set! (-> v1-15 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 30)) frames num-frames) -1)) + ) + (set! (-> v1-15 param 1) (-> arg0 anim-speed)) + (set! (-> v1-15 frame-num) 0.0) + (joint-control-channel-group! v1-15 (the-as art-joint-anim (-> this draw art-group data 30)) num-func-seek!) + ) + ) + ) + ) + #t + ) + +(defmethod go-hostile ((this gekko)) + (if (logtest? (-> this flags) (gekko-flag on-wall?)) + (gekko-method-206 this) + (go (method-of-object this hostile)) + ) + ) + +(defmethod get-knockback-dir! ((this gekko) (arg0 vector)) + (local-vars (v1-2 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set! (-> arg0 quad) (-> this incoming attack-direction quad)) + (.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-2 vf1) + (when (= v1-2 0.0) + (vector-z-quaternion! arg0 (-> this root quat)) + (vector-negate-in-place! arg0) + ) + (vector-flatten! arg0 arg0 (-> this rot-matrix uvec)) + (vector-normalize! arg0 1.0) + ) + ) + +;; WARN: Return type mismatch vector vs object. +(defmethod knocked-handler ((this gekko) (arg0 vector)) + (get-knockback-dir! this arg0) + (let ((s4-0 (-> this enemy-info)) + (f28-0 0.0) + (f30-0 0.0) + ) + (let ((v1-2 (-> this incoming knocked-type))) + (set! f30-0 (cond + ((= v1-2 (knocked-type explode-or-darkjak)) + (let ((f30-1 (rnd-float-range this 0.0 1.0))) + (set! f28-0 (lerp (-> s4-0 knocked-hard-vxz-lo) (-> s4-0 knocked-hard-vxz-hi) f30-1)) + (lerp (-> s4-0 knocked-hard-vy-lo) (-> s4-0 knocked-hard-vy-hi) f30-1) + ) + ) + ((= v1-2 (knocked-type mech-punch)) + (let ((f30-2 (rnd-float-range this 0.0 1.0))) + (set! f28-0 (lerp (-> s4-0 knocked-medium-vxz-lo) (-> s4-0 knocked-medium-vxz-hi) f30-2)) + (lerp (-> s4-0 knocked-medium-vy-lo) (-> s4-0 knocked-medium-vy-hi) f30-2) + ) + ) + ((= v1-2 (knocked-type dark-shot)) + (let ((f30-3 (rnd-float-range this 0.0 1.0))) + (set! f28-0 (lerp (-> s4-0 knocked-huge-vxz-lo) (-> s4-0 knocked-huge-vxz-hi) f30-3)) + (lerp (-> s4-0 knocked-huge-vy-lo) (-> s4-0 knocked-huge-vy-hi) f30-3) + ) + ) + ((= v1-2 (knocked-type yellow-shot)) + (vector-rotate90-around-y! arg0 arg0) + (let ((v1-12 (new 'stack-no-clear 'vector))) + (vector-! v1-12 (-> this incoming attacker-pos) (-> this root trans)) + (set! (-> v1-12 y) 0.0) + (if (< 0.0 (vector-dot v1-12 arg0)) + (vector-negate! arg0 arg0) + ) + ) + (let ((f30-4 (rnd-float-range this 0.0 1.0))) + (set! f28-0 (lerp (-> s4-0 knocked-yellow-vxz-lo) (-> s4-0 knocked-yellow-vxz-hi) f30-4)) + (lerp (-> s4-0 knocked-yellow-vy-lo) (-> s4-0 knocked-yellow-vy-hi) f30-4) + ) + ) + ((= v1-2 (knocked-type red-shot)) + (let* ((f1-2 (vector-vector-xz-distance-squared (target-pos 0) (-> this root trans))) + (f0-18 1.0) + (f2-0 61440.0) + (f1-3 (fmin f1-2 (* f2-0 f2-0))) + (f2-3 61440.0) + (f30-6 (* (- f0-18 (/ f1-3 (* f2-3 f2-3))) (rnd-float-range this 0.8 1.0))) + ) + (set! f28-0 (lerp (-> s4-0 knocked-red-vxz-lo) (-> s4-0 knocked-red-vxz-hi) f30-6)) + (lerp (-> s4-0 knocked-red-vy-lo) (-> s4-0 knocked-red-vy-hi) f30-6) + ) + ) + ((= v1-2 (knocked-type blue-shot)) + (let* ((f1-5 (vector-vector-xz-distance-squared (target-pos 0) (-> this root trans))) + (f0-24 1.0) + (f2-6 122880.0) + (f1-6 (fmin f1-5 (* f2-6 f2-6))) + (f2-9 122880.0) + (f26-0 (* (- f0-24 (/ f1-6 (* f2-9 f2-9))) (rnd-float-range this 0.8 1.0))) + ) + (set! f28-0 (lerp (-> s4-0 knocked-blue-vxz-lo) (-> s4-0 knocked-blue-vxz-hi) f26-0)) + (cond + ((>= (the-as uint 4) (-> this incoming blue-juggle-count)) + (lerp (-> s4-0 knocked-blue-vy-lo) (-> s4-0 knocked-blue-vy-hi) f26-0) + ) + (else + (if (zero? (rnd-int this 3)) + (set! f30-0 40960.0) + ) + f30-0 + ) + ) + ) + ) + ((= v1-2 (knocked-type vehicle)) + (set! (-> arg0 quad) (-> this incoming attack-direction quad)) + f30-0 + ) + (else + (let ((f30-7 (rnd-float-range this 0.0 1.0))) + (set! f28-0 (lerp (-> s4-0 knocked-soft-vxz-lo) (-> s4-0 knocked-soft-vxz-hi) f30-7)) + (lerp (-> s4-0 knocked-soft-vy-lo) (-> s4-0 knocked-soft-vy-hi) f30-7) + ) + ) + ) + ) + ) + (vector-float*! arg0 arg0 f28-0) + (vector-flatten! arg0 arg0 (-> this rot-matrix uvec)) + (vector+float*! arg0 arg0 (-> this rot-matrix uvec) f30-0) + ) + ) + +(defmethod enemy-method-103 ((this gekko) (arg0 vector) (arg1 float)) + (let ((s4-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> arg0 quad)) + (vector-flatten! s4-0 s4-0 (-> this rot-matrix uvec)) + (vector-normalize! s4-0 1.0) + (vector-flatten! s5-0 s5-0 (-> this rot-matrix uvec)) + (vector-normalize! s5-0 1.0) + (>= (vector-dot s4-0 s5-0) (cos arg1)) + ) + ) + +(defmethod ragdoll-settled? ((this gekko)) + (local-vars (v1-18 gekko-shadow-spot)) + (let ((s5-0 (handle->process (-> this ragdoll-proc)))) + (or (not s5-0) + (or (ragdoll-proc-method-19 (the-as ragdoll-proc s5-0)) + (and (time-elapsed? (-> this state-time) (seconds 2)) + (< (vector-length (-> (the-as ragdoll-proc s5-0) ragdoll ragdoll-joints 0 velocity)) + (* 49152.0 (seconds-per-frame)) + ) + (< (cos (* 16384.0 (seconds-per-frame))) (-> (the-as ragdoll-proc s5-0) ragdoll rotate-vel w)) + (begin (set! v1-18 (-> this shadow-spot)) (< (- (-> this root trans y) (-> v1-18 position y)) 6144.0)) + (>= (fabs (vector-dot (-> v1-18 normal) *y-vector*)) + (-> *pat-mode-info* (shr (shl (-> v1-18 pat) 54) 61) wall-angle) + ) + ) + ) + ) + ) + ) + +(defmethod gekko-method-208 ((this gekko)) + (dotimes (s5-0 4) + (let ((s4-0 (-> this foot s5-0)) + (s3-0 (-> *gekko-ik-setup* s5-0)) + ) + (set! (-> s4-0 ground-normal quad) (-> this rot-matrix uvec quad)) + (vector<-cspace! (-> s4-0 ground-pos) (-> this node-list data (-> s3-0 hand-index))) + (vector+float*! (-> s4-0 ground-pos) (-> s4-0 ground-pos) (-> s4-0 ground-normal) (-> s3-0 hand-dist)) + ) + ) + 0 + (none) + ) + +(defmethod send-attack ((this gekko) (arg0 process) (arg1 touching-shapes-entry) (arg2 uint)) + (sound-play "gekko-impact") + ((method-of-type nav-enemy send-attack) this arg0 arg1 arg2) + ) + +(defmethod enemy-common-post ((this gekko)) + (let ((a0-2 (handle->process (-> this focus handle)))) + (if a0-2 + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable a0-2) 3) quad)) + ) + ) + (if (and (nonzero? (-> this path-wall)) (not (logtest? (-> this path-wall flags) (path-control-flag not-found)))) + (debug-draw (-> this path-wall)) + ) + (gekko-method-202 this) + ((method-of-type nav-enemy enemy-common-post) this) + (none) + ) + +(defmethod gekko-method-202 ((this gekko)) + (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)) + (s5-0 (vector-negate! (new 'stack-no-clear 'vector) (-> this rot-matrix uvec))) + (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-10 s4-0)) + (set! (-> v1-10 radius) 3276.8) + (set! (-> v1-10 collide-with) (collide-spec backgnd)) + (set! (-> v1-10 ignore-process0) this) + (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)) + ) + (let ((f28-0 (fill-and-probe-using-line-sphere *collide-cache* s4-0))) + (cond + ((>= f28-0 0.0) + (let ((v1-14 (-> this draw shadow-ctrl))) + (logclear! (-> v1-14 settings flags) (shadow-flags disable-draw)) + ) + 0 + (set! (-> this shadow-spot valid?) #t) + (let ((s3-0 (-> s4-0 best-other-tri))) + (let ((v1-18 (vector+float*! (new 'stack-no-clear 'vector) (-> s4-0 start-pos) (-> s4-0 move-dist) f28-0))) + (set! (-> this shadow-spot position quad) (-> s3-0 intersect quad)) + (vector-! (-> this shadow-spot normal) v1-18 (-> s3-0 intersect)) + ) + (vector-normalize! (-> this shadow-spot normal) 1.0) + (set! (-> this shadow-spot pat) (the-as uint (-> s3-0 pat))) + ) + (let ((a1-10 (-> this root trans)) + (f0-3 (* f28-0 f30-0)) + ) + (shadow-control-method-14 + (-> this draw shadow-ctrl) + a1-10 + s5-0 + (fmax 32768.0 (* 409600.0 f28-0)) + (+ -12288.0 f0-3) + (+ 12288.0 f0-3) + ) + ) + ) + (else + (let ((v1-29 (-> this draw shadow-ctrl))) + (logior! (-> v1-29 settings flags) (shadow-flags disable-draw)) + ) + 0 + (set! (-> this shadow-spot valid?) #f) + ) + ) + ) + ) + ) + (else + (let ((v1-33 (-> this draw shadow-ctrl))) + (logior! (-> v1-33 settings flags) (shadow-flags disable-draw)) + ) + 0 + (set! (-> this shadow-spot valid?) #f) + ) + ) + 0 + (none) + ) + +(defmethod enemy-method-50 ((this gekko) (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 0)) + (a0-4 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 7)) + ) + (set! (-> v1-4 prim-core action) (collide-action)) + (set! (-> a0-4 prim-core action) (collide-action)) + (set! (-> v1-4 prim-core collide-as) (collide-spec)) + (set! (-> a0-4 prim-core collide-as) (collide-spec)) + ) + 0 + ) + ((= v1-0 1) + (let ((v1-8 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 0))) + (set! (-> v1-8 prim-core action) (collide-action solid deadly)) + (set! (-> v1-8 prim-core collide-as) (collide-spec enemy)) + ) + ) + ((= v1-0 3) + (let ((v1-12 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 0)) + (a0-9 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 7)) + ) + (set! (-> v1-12 prim-core action) (collide-action solid deadly)) + (set! (-> a0-9 prim-core action) (collide-action solid deadly)) + (set! (-> v1-12 prim-core collide-as) (collide-spec enemy)) + (set! (-> a0-9 prim-core collide-as) (collide-spec enemy)) + ) + ) + ) + ) + (none) + ) + +(defmethod event-handler ((this gekko) (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 (logtest? (-> this flags) (gekko-flag on-wall?)) + (go (method-of-object this knocked-wall)) + (go (method-of-object this knocked)) + ) + #t + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod coin-flip? ((this gekko)) + #f + ) + +(defmethod relocate ((this gekko) (offset int)) + (dotimes (v1-0 4) + (if (nonzero? (-> this foot v1-0 leg-ik)) + (&+! (-> this foot v1-0 leg-ik) offset) + ) + ) + (if (nonzero? (-> this path-wall)) + (&+! (-> this path-wall) offset) + ) + (call-parent-method this offset) + ) + +(defmethod init-enemy! ((this gekko)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-gekko" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *gekko-nav-enemy-info*) + (set! (-> this scale) (rnd-float-range this 1.15 1.35)) + (let ((f0-1 (-> this scale))) + (set-vector! (-> this root scale) f0-1 f0-1 f0-1 1.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! (-> v1-9 max-dist) 167936.0) + (set-vector! (-> v1-9 twist-max) 11832.889 15473.777 0.0 1.0) + (set! (-> v1-9 ignore-angle) 16384.0) + ) + (set! (-> this align) (new 'process 'align-control this)) + (set! (-> this path-wall) (new 'process 'path-control this 'wall 0.0 (the-as entity #f) #t)) + (if (nonzero? (-> this path-wall)) + (logior! (-> this path-wall flags) (path-control-flag display draw-line draw-point draw-text)) + ) + (dotimes (s5-1 4) + (let ((s4-1 (-> this foot s5-1))) + (set! (-> s4-1 leg-ik) + (new 'process 'joint-mod-ik this (-> *gekko-ik-setup* s5-1 elbow-index) (-> *gekko-ik-setup* s5-1 hand-dist)) + ) + (set! (-> s4-1 leg-ik user-float) (the float s5-1)) + (set! (-> s4-1 leg-ik elbow-pole-vector-axis) (the-as uint 2)) + (set! (-> s4-1 leg-ik elbow-rotation-axis) (the-as uint 0)) + (let ((a0-18 (-> this node-list data (-> *gekko-ik-setup* s5-1 effector-index)))) + (set! (-> a0-18 param0) gekko-foot-rot-handler) + (set! (-> a0-18 param1) this) + (set! (-> a0-18 param2) (the-as basic s4-1)) + ) + (set! (-> s4-1 foot-transform scale quad) (-> *identity-vector* quad)) + ) + ) + (logior! (-> this foot 2 leg-ik flags) (joint-mod-ik-flags elbow-trans-neg)) + (logior! (-> this foot 3 leg-ik flags) (joint-mod-ik-flags elbow-trans-neg)) + (logior! (-> this foot 0 leg-ik flags) (joint-mod-ik-flags elbow-rot-neg)) + (logior! (-> this foot 1 leg-ik flags) (joint-mod-ik-flags elbow-rot-neg)) + (set! (-> this skel postbind-function) gekko-postbind-callback) + (logior! (-> this skel status) (joint-control-status no-joint-callbacks)) + (quaternion-rotate-local-y! + (-> this root quat) + (-> this root quat) + (* 182.04445 (rnd-float-range this 170.0 190.0)) + ) + (quaternion-copy! (-> this tilt-quat) *unity-quaternion*) + (set! (-> this scared-timer) 0) + (set! (-> this root pause-adjust-distance) 368640.0) + (let ((s5-3 (new 'stack-no-clear 'vector)) + (s4-3 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + ) + (dotimes (s3-1 4) + (vector-orient-by-quat! s5-3 (the-as vector (-> *gekko-foot-offset* s3-1)) (-> this root quat)) + (vector+float*! (the-as vector (-> this foot s3-1)) (-> this root trans) s5-3 (-> this scale)) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this foot 0 ground-normal)) (* 96 s3-1)))) + (-> s4-3 quad) + ) + ) + ) + (logior! (-> this flags) (gekko-flag update-foot-position? follow-terrain update-tilt on-wall?)) + (set! (-> this probe-len) 24576.0) + 0 + (none) + ) + +(defmethod within-gspot-range? ((this gekko)) + (let ((s5-0 (-> this root)) + (a1-0 (new 'stack-no-clear 'collide-query)) + (gp-0 #t) + ) + (when (find-ground + s5-0 + a1-0 + (-> this enemy-info recover-gnd-collide-with) + 8192.0 + 81920.0 + 1024.0 + (the-as process #f) + ) + (let ((f0-1 (- (-> s5-0 trans y) (-> s5-0 gspot-pos y)))) + (if (and (>= f0-1 -4096.0) (>= 8192.0 f0-1)) + (set! gp-0 #f) + ) + ) + ) + gp-0 + ) + ) + +(deftype gecko (gekko) + () + ) diff --git a/goal_src/jak3/levels/mine/manta.gc b/goal_src/jak3/levels/mine/manta.gc index 4e42bc8955..43c6f30212 100644 --- a/goal_src/jak3/levels/mine/manta.gc +++ b/goal_src/jak3/levels/mine/manta.gc @@ -5,5 +5,1962 @@ ;; name in dgo: manta ;; dgos: MIA +;; +++manta-flags +(defenum manta-flags + :type uint16 + :bitfield #t + (mf0 0) + (mf1 1) + ) +;; ---manta-flags + + ;; DECOMP BEGINS +(deftype manta (nav-enemy) + ((info rigid-body-object-constants) + (move-matrix matrix :inline) + (curve-matrix matrix :inline) + (move-vel vector :inline) + (move-u float) + (move-du float) + (move-force float) + (flags manta-flags) + (go-enable symbol) + (orbit-speed float) + (max-time-step float) + (gravity float) + (landed-pos vector :inline) + (dest-pos vector :inline) + (attack-pos vector :inline) + (up-dir vector :inline) + (forward-dir vector :inline) + (knocked-force vector :inline) + (knocked-force-mult float) + (default-y-offset float) + (y-offset float) + (last-attack-time time-frame) + (attack-y-offset float) + (attack-path-blocked-time time-frame) + (track-timer time-frame) + (angle-to-player float) + (offset-difference float) + (sound-volume float) + (restart-fly-anims symbol) + (fly-anim-speed float) + (hit-ground-count uint32) + (fade-level float) + (pad uint8 8) + ) + (:state-methods + land-approach + land + notice-to-fly + attack + attack-end + ) + (:methods + (manta-method-195 (_type_) none) + (manta-method-196 (_type_) symbol) + (manta-method-197 (_type_) none) + (manta-method-198 (_type_) none) + (manta-method-199 (_type_) none) + (manta-method-200 (_type_) none) + (manta-method-201 (_type_ float) none) + (do-impact (_type_) none) + (manta-method-203 (_type_ float) none) + (manta-method-204 (_type_) none) + (update-target-pos! (_type_) none) + (manta-method-206 (_type_) none) + (alloc-rbody! (_type_ rigid-body-object-constants) none) + (manta-method-208 (_type_) none) + ) + ) + + +(define *manta-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 '*manta-rigid-body-constants* + ) + ) + +(defskelgroup skel-manta manta manta-lod0-jg manta-idle0-ja + ((manta-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :shadow manta-shadow-mg + :shadow-joint-index 3 + ) + +(define *fact-info-manta-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9) + ) + +(define *manta-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 #t + :idle-anim-script #f + :idle-anim 3 + :notice-anim 5 + :hostile-anim 8 + :hit-anim 13 + :knocked-anim 13 + :knocked-land-anim 13 + :die-anim 19 + :die-falling-anim 17 + :victory-anim 3 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 6 + :look-at-joint 6 + :bullseye-joint 3 + :sound-hit (static-sound-name "manta-impact") + :notice-distance (meters 60) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 15) + :default-hit-points 3.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 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 81920.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 -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 8 + :turn-anim -1 + :run-anim -1 + :taunt-anim -1 + :run-travel-speed (meters 12) + :run-acceleration (meters 0.2) + :run-turning-acceleration (meters 8) + :walk-travel-speed (meters 4) + :walk-acceleration (meters 0.1) + :walk-turning-acceleration (meters 4) + :maximum-rotation-rate (degrees 1440) + :notice-nav-radius (meters 3) + :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! (-> *manta-nav-enemy-info* fact-defaults) *fact-info-manta-defaults*) + +(defmethod init-enemy-collision! ((this manta)) + (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)) + (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action semi-solid deadly)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 13107.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 enemy)) + (set! (-> v1-13 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-13 prim-core action) (collide-action semi-solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 4096.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 enemy)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot player-list)) + (set-vector! (-> v1-15 local-sphere) 0.0 -4096.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-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 0.0 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) 6) + (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 deadly)) + (set! (-> v1-21 transform-index) 10) + (set-vector! (-> v1-21 local-sphere) 0.0 0.0 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 deadly)) + (set! (-> v1-23 transform-index) 12) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (set! (-> s5-0 nav-radius) 6144.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! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defbehavior manta-hostile-post manta () + (update-target-pos! self) + (let* ((s4-0 (-> self root)) + (s3-0 (-> self focus-pos)) + (gp-1 (vector-! (new 'stack-no-clear 'vector) (-> s4-0 trans) s3-0)) + ) + (set! (-> gp-1 y) 0.0) + (vector-xz-normalize! gp-1 1.0) + (vector-rotate-y! gp-1 gp-1 (* (-> self orbit-speed) (seconds-per-frame))) + (vector-xz-normalize! gp-1 81920.0) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (set! (-> s2-0 quad) (-> s4-0 trans quad)) + (let ((s5-0 (-> self dest-pos))) + (closest-point-on-mesh (-> self nav) s2-0 (-> s4-0 trans) (the-as nav-poly #f)) + (cond + ((< (vector-vector-xz-distance (-> s4-0 trans) s2-0) 4096.0) + (vector+! s5-0 s3-0 gp-1) + (closest-point-on-mesh (-> self nav) s5-0 s5-0 (the-as nav-poly #f)) + ) + (else + (vector+! + s5-0 + (-> s4-0 trans) + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) s2-0 (-> s4-0 trans)) 32768.0) + ) + ) + ) + (let ((v1-15 (-> self nav state))) + (logclear! (-> v1-15 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-15 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-15 target-pos quad) (-> s5-0 quad)) + ) + ) + ) + 0 + (let ((s5-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (vector-normalize! gp-1 -1.0) + (set! (-> self angle-to-player) (acos (vector-dot s5-1 gp-1))) + ) + ) + 0 + (set! (-> self dest-pos y) (+ (-> self root gspot-pos y) (-> self y-offset))) + (set! (-> self offset-difference) (- (-> self dest-pos y) (-> self root trans y))) + (vector-! (-> self forward-dir) (-> self focus-pos) (-> self root trans)) + (vector-normalize! (-> self forward-dir) 1.0) + (set! (-> self up-dir quad) (-> *y-vector* quad)) + (manta-method-200 self) + (do-impact self) + (manta-method-203 self -4096.0) + (nav-enemy-travel-post) + (none) + ) + +(defbehavior manta-attack-post manta () + (update-target-pos! self) + (set! (-> self offset-difference) (- (-> self root trans y) (-> self attack-pos y))) + (if (time-elapsed? (-> self attack-path-blocked-time) (seconds 1)) + (manta-method-195 self) + ) + (when (logtest? (enemy-flag ef37) (-> self enemy-flags)) + (let ((s2-0 (-> self curve-matrix)) + (f0-2 (-> self move-u)) + (a1-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (a0-4 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 x) 0.0) + (set! (-> s5-0 y) 0.0) + (set! (-> s5-0 z) 4096.0) + (set! (-> s5-0 w) 1.0) + (set-vector! a1-0 (* f0-2 f0-2 f0-2) (* f0-2 f0-2) f0-2 1.0) + (set-vector! s3-0 (* 3.0 f0-2 f0-2) (* 2.0 f0-2) 1.0 0.0) + (vector-matrix*! a0-4 a1-0 s2-0) + (vector-matrix*! s4-0 s3-0 s2-0) + (let ((s3-1 (new 'stack-no-clear 'vector))) + (let ((f0-6 4.0)) + (vector-float*! gp-0 s4-0 f0-6) + ) + (vector-orient-by-quat! s3-1 s5-0 (-> self root quat)) + (vector+! s3-1 s3-1 (-> self root trans)) + (apply-impact! (-> self rbody) s3-1 gp-0) + ) + ) + (seek! (-> self move-u) 1.0 (* (-> self move-du) (seconds-per-frame))) + ) + (do-impact self) + (manta-method-203 self -4096.0) + (nav-enemy-simple-post) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior manta-fly-code manta () + (cond + ((-> self restart-fly-anims) + (ja-channel-push! 3 (seconds 0.2)) + (ja :group! manta-flap-ja) + (let ((v1-6 (-> self skel root-channel 1))) + (let ((f0-0 0.0)) + (set! (-> v1-6 frame-interp 1) f0-0) + (set! (-> v1-6 frame-interp 0) f0-0) + ) + (set! (-> v1-6 frame-group) (the-as art-joint-anim manta-flap-fast-ja)) + ) + (let ((v1-9 (-> self skel root-channel 2))) + (let ((f0-1 0.0)) + (set! (-> v1-9 frame-interp 1) f0-1) + (set! (-> v1-9 frame-interp 0) f0-1) + ) + (set! (-> v1-9 frame-group) (the-as art-joint-anim manta-flap-back-ja)) + ) + (set! (-> self restart-fly-anims) #f) + ) + (else + (ja :group! manta-flap-ja) + (let ((v1-16 (-> self skel root-channel 1))) + (let ((f0-2 0.0)) + (set! (-> v1-16 frame-interp 1) f0-2) + (set! (-> v1-16 frame-interp 0) f0-2) + ) + (set! (-> v1-16 frame-group) (the-as art-joint-anim manta-flap-fast-ja)) + ) + (let ((v1-19 (-> self skel root-channel 2))) + (let ((f0-3 0.0)) + (set! (-> v1-19 frame-interp 1) f0-3) + (set! (-> v1-19 frame-interp 0) f0-3) + ) + (set! (-> v1-19 frame-group) (the-as art-joint-anim manta-flap-back-ja)) + ) + ) + ) + (until #f + (until (ja-done? 0) + (set! (-> self go-enable) #t) + (suspend) + (set! (-> self go-enable) #f) + (let ((a0-19 (-> self skel root-channel 0))) + (let ((f0-4 1.0)) + (set! (-> a0-19 frame-interp 1) f0-4) + (set! (-> a0-19 frame-interp 0) f0-4) + ) + (set! (-> a0-19 param 0) (the float (+ (-> a0-19 frame-group frames num-frames) -1))) + (set! (-> a0-19 param 1) (-> self fly-anim-speed)) + (joint-control-channel-group-eval! a0-19 (the-as art-joint-anim #f) num-func-seek!) + ) + (let* ((f30-0 (lerp-scale 0.0 1.0 (-> self fly-anim-speed) 1.0 1.5)) + (gp-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self root transv) 1.0)) + (f28-0 (vector-dot (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) gp-0)) + ) + (let ((a0-23 (-> self skel root-channel 1))) + (let ((f0-11 (fmax 0.0 (* f28-0 f30-0)))) + (set! (-> a0-23 frame-interp 1) f0-11) + (set! (-> a0-23 frame-interp 0) f0-11) + ) + (set! (-> a0-23 param 0) 0.0) + (joint-control-channel-group-eval! a0-23 (the-as art-joint-anim #f) num-func-chan) + ) + (let ((a0-24 (-> self skel root-channel 2))) + (let ((f0-14 (fmax 0.0 (* (- 1.0 f28-0) f30-0)))) + (set! (-> a0-24 frame-interp 1) f0-14) + (set! (-> a0-24 frame-interp 0) f0-14) + ) + (set! (-> a0-24 param 0) 0.0) + (joint-control-channel-group-eval! a0-24 (the-as art-joint-anim #f) num-func-chan) + ) + ) + ) + (if (rnd-chance? self 0.5) + (ja-no-eval :group! manta-flap-ja :num! (seek! max (-> self fly-anim-speed)) :frame-num 0.0) + (ja-no-eval :group! manta-flap1-ja :num! (seek! max (-> self fly-anim-speed)) :frame-num 0.0) + ) + ) + #f + (none) + ) + +(defstate idle (manta) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy idle) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-5 (-> self draw shadow-ctrl))) + (logior! (-> v1-5 settings flags) (shadow-flags disable-draw)) + ) + 0 + (try-locate-ground self (meters 10) (meters 10) #t (collide-spec backgnd)) + (set! (-> self landed-pos quad) (-> self root trans quad)) + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + :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) (-> self state-timeout)) (< 1 (the-as int (-> self focus aware)))) + (go-virtual ambush) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (let ((s5-0 (set-reaction-time! self (seconds 0.007) (seconds 0.015))) + (f28-0 (rnd-float-range self 0.5 0.3)) + (gp-0 (set-reaction-time! self (seconds 0.007) (seconds 0.01))) + (f30-0 (rnd-float-range self 0.5 0.3)) + ) + (dotimes (s4-0 s5-0) + (ja-no-eval :group! manta-idle0-ja :num! (seek! max f28-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f28-0)) + ) + ) + (dotimes (s5-1 gp-0) + (ja-no-eval :group! manta-idle1-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + ) + #f + ) + :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 land-approach (manta) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logclear! (-> self flags) (manta-flags mf0)) + (set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag ef43)))) + (logclear! (-> self nav flags) (nav-control-flag limit-rotation-rate update-heading-from-facing)) + (set! (-> self dest-pos quad) (-> self landed-pos quad)) + (set! (-> self dest-pos y) (+ 8192.0 (-> self default-y-offset) (-> self landed-pos y))) + (let ((a0-7 (-> self nav state)) + (v1-9 (-> self dest-pos)) + ) + (logclear! (-> a0-7 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-7 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-7 target-pos quad) (-> v1-9 quad)) + ) + 0 + (set! (-> self go-enable) #t) + (let ((v1-13 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-13 enemy-flags))) + (set! (-> v1-13 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-13 enemy-flags)))) + ) + (set! (-> v1-13 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-13 enemy-flags)))) + (set! (-> v1-13 nav callback-info) (-> v1-13 enemy-info callback-info)) + ) + 0 + (let ((v1-16 (-> self nav))) + (set! (-> v1-16 target-speed) 24576.0) + ) + 0 + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (and (< (vector-vector-xz-distance (-> self root trans) (-> self dest-pos)) 8192.0) (-> self go-enable)) + (go-virtual land) + ) + (if (and (time-elapsed? (-> self state-time) (-> self state-timeout)) (< 1 (the-as int (-> self focus aware)))) + (go-virtual notice) + ) + (seek! (-> self fly-anim-speed) 1.0 (seconds-per-frame)) + (vector-! (-> self forward-dir) (-> self dest-pos) (-> self root trans)) + (vector-normalize! (-> self forward-dir) 1.0) + 0 + ) + :code manta-fly-code + :post (behavior () + (do-impact self) + (manta-method-203 self -4096.0) + (nav-enemy-travel-post) + ) + ) + +(defstate land (manta) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logclear! (-> self flags) (manta-flags mf0)) + (set! (-> self dest-pos quad) (-> self landed-pos quad)) + (set! (-> self dest-pos y) (+ (-> self landed-pos y) (-> self default-y-offset))) + (set! (-> self restart-fly-anims) #t) + ) + :exit (behavior () + (manta-method-206 self) + ) + :trans (behavior () + (seek! (-> self fly-anim-speed) 1.0 (seconds-per-frame)) + (vector-! (-> self forward-dir) (-> self dest-pos) (-> self root trans)) + (vector-normalize! (-> self forward-dir) 1.0) + 0 + ) + :code (behavior () + (ja-no-eval :num! (seek! max (-> self fly-anim-speed))) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (ja-channel-push! 1 0) + (while (< 2048.0 (vector-vector-distance (-> self root trans) (-> self landed-pos))) + (ja-no-eval :group! manta-flap-ja :num! (seek! max (-> self fly-anim-speed)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (-> self fly-anim-speed))) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! manta-land-ja :num! (seek! max 0.8) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.8)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! manta-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual dormant-aware) + ) + :post (behavior () + (let ((gp-0 (new 'stack-no-clear 'vector)) + (a1-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-0 x) 0.0) + (set! (-> a1-0 y) -819.2) + (set! (-> a1-0 z) 0.0) + (set! (-> a1-0 w) 1.0) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-! gp-0 (-> self landed-pos) (-> self root trans)) + (vector-float*! gp-0 gp-0 2.0) + (vector-orient-by-quat! s5-0 a1-0 (-> self root quat)) + (vector+! s5-0 s5-0 (-> self root trans)) + (apply-impact! (-> self rbody) s5-0 gp-0) + ) + ) + (vector-seek! (-> self dest-pos) (-> self landed-pos) (* 8192.0 (seconds-per-frame))) + (nav-enemy-simple-post) + ) + ) + +(defstate active (manta) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy active) enter))) + (if t9-0 + (t9-0) + ) + ) + (logior! (-> self flags) (manta-flags mf0)) + (set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag ef43)))) + (logclear! (-> self nav flags) (nav-control-flag limit-rotation-rate update-heading-from-facing)) + (set! (-> self y-offset) (-> self default-y-offset)) + (set! (-> self orbit-speed) (* 182.04445 (rnd-float-range self 0.5 2.0))) + (let ((v1-13 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-13 enemy-flags))) + (set! (-> v1-13 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-13 enemy-flags)))) + ) + (set! (-> v1-13 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-13 enemy-flags)))) + (set! (-> v1-13 nav callback-info) (-> v1-13 enemy-info callback-info)) + ) + 0 + (let ((v1-16 (-> self nav))) + (set! (-> v1-16 target-speed) 49152.0) + ) + 0 + ) + :code manta-fly-code + :post manta-hostile-post + ) + +(defstate ambush (manta) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy ambush) enter))) + (if t9-0 + (t9-0) + ) + ) + (try-locate-ground self (meters 10) (meters 10) #t (collide-spec backgnd)) + (set! (-> self landed-pos quad) (-> self root trans quad)) + (manta-method-206 self) + (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) + ) + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status force-fade)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (let ((f30-0 (rnd-float-range self 1.0 1.5))) + (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)) + ) + (ja-no-eval :group! manta-alert-idle-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (go-virtual notice-to-fly) + ) + :post (behavior () + (seek! (-> self fade-level) 128.0 (* 196.0 (seconds-per-frame))) + (set! (-> self draw force-fade) (the-as uint (the int (-> self fade-level)))) + (nav-enemy-simple-post) + ) + ) + +(defstate notice-to-fly (manta) + :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! (-> self fly-anim-speed) 1.5) + (set! (-> self y-offset) (-> self default-y-offset)) + (set! (-> self dest-pos quad) (-> self root trans quad)) + (set! (-> self dest-pos y) (+ (-> self root gspot-pos y) (-> self y-offset))) + ) + :exit (behavior () + (set-time! (-> self last-attack-time)) + (set! (-> self restart-fly-anims) #t) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (ja-no-eval :group! manta-alert-to-fly-ja :num! (seek! max (-> self fly-anim-speed)) :frame-num 0.0) + (until (ja-done? 0) + (cond + ((< 15.0 (ja-frame-num 0)) + (do-impact self) + (manta-method-203 self -4096.0) + (nav-enemy-simple-post) + ) + (else + (nav-enemy-simple-post) + ) + ) + (suspend) + (ja :num! (seek! max (-> self fly-anim-speed))) + ) + (ja-channel-push! 1 (seconds 0.075)) + (dotimes (gp-0 5) + (ja-no-eval :group! manta-flap-fast-ja :num! (seek! max (-> self fly-anim-speed)) :frame-num 0.0) + (until (ja-done? 0) + (seek! (-> self fly-anim-speed) 1.2 (* 0.5 (seconds-per-frame))) + (do-impact self) + (manta-method-203 self -4096.0) + (nav-enemy-simple-post) + (suspend) + (ja :num! (seek! max (-> self fly-anim-speed))) + ) + ) + (go-virtual hostile) + ) + ) + +(defstate stare (manta) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy stare) enter))) + (if t9-0 + (t9-0) + ) + ) + (logior! (-> self flags) (manta-flags mf0)) + (set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag ef43)))) + (logclear! (-> self nav flags) (nav-control-flag limit-rotation-rate update-heading-from-facing)) + (set! (-> self y-offset) (-> self default-y-offset)) + (set! (-> self orbit-speed) (* 182.04445 (rnd-float-range self 0.5 2.0))) + (let ((v1-13 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-13 enemy-flags))) + (set! (-> v1-13 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-13 enemy-flags)))) + ) + (set! (-> v1-13 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-13 enemy-flags)))) + (set! (-> v1-13 nav callback-info) (-> v1-13 enemy-info callback-info)) + ) + 0 + (let ((v1-16 (-> self nav))) + (set! (-> v1-16 target-speed) 49152.0) + ) + 0 + ) + :code manta-fly-code + :post manta-hostile-post + ) + +(defstate hostile (manta) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (logior! (-> self flags) (manta-flags mf0)) + (set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag ef43)))) + (logclear! (-> self nav flags) (nav-control-flag limit-rotation-rate update-heading-from-facing)) + (set! (-> self y-offset) (-> self default-y-offset)) + (set! (-> self orbit-speed) (* 182.04445 (rnd-float-range self 0.8 2.4))) + (set! (-> self go-enable) #t) + (let ((v1-14 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-14 enemy-flags))) + (set! (-> v1-14 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-14 enemy-flags)))) + ) + (set! (-> v1-14 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-14 enemy-flags)))) + (set! (-> v1-14 nav callback-info) (-> v1-14 enemy-info callback-info)) + ) + 0 + (let ((v1-17 (-> self nav))) + (set! (-> v1-17 target-speed) 49152.0) + ) + 0 + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (and (-> self go-enable) (< (fabs (- (-> self focus-pos y) (-> self root gspot-pos y))) 16384.0)) + (if (and (time-elapsed? (-> self last-attack-time) (seconds 3)) + (< (fabs (-> self angle-to-player)) 6371.5557) + (< (-> self offset-difference) 12288.0) + (< (vector-vector-xz-distance (-> self root trans) (-> self dest-pos)) 28672.0) + (< (vector-vector-distance (-> self root trans) (-> self focus-pos)) 110592.0) + (< (vector-length (-> self root transv)) 16384.0) + (let ((f0-10 (- (-> self root trans y) (-> self focus-pos y)))) + (and (and (< f0-10 24576.0) (< 0.0 f0-10)) (get-focus! self)) + ) + ) + (go-virtual attack) + ) + (if (and (time-elapsed? (-> self last-attack-time) (seconds 1)) + (< (fabs (-> self angle-to-player)) 8192.0) + (< (current-time) (+ (-> self track-timer) (seconds 0.5))) + (< (-> self offset-difference) 12288.0) + (< -4096.0 (-> self root transv y)) + ) + (go-virtual attack) + ) + ) + ) + :code manta-fly-code + :post manta-hostile-post + ) + +(defstate attack (manta) + :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 + (nav-enemy-method-177 self) + (logior! (-> self focus-status) (focus-status dangerous)) + (set-time! (-> self state-time)) + (set-look-at-mode! self 1) + (let ((f30-0 1.13)) + (cond + ((and (get-focus! self) (manta-method-197 self)) + (set! (-> self attack-y-offset) (+ (- 4096.0 (-> self root trans y)) (-> self focus-pos y))) + (logior! (-> self flags) (manta-flags mf1)) + ) + (else + (set! (-> self attack-y-offset) 14336.0) + ) + ) + (let* ((f0-4 (vector-vector-xz-distance (-> self focus-pos) (-> self root trans))) + (f0-7 (/ (fmin 69632.0 (/ f0-4 f30-0)) f30-0)) + ) + (set! (-> self move-force) (* (-> self info info mass) f0-7)) + ) + (set! (-> self move-u) 0.0) + (set! (-> self move-du) (* 0.94 f30-0)) + ) + (set! (-> self attack-pos quad) (-> self focus-pos quad)) + (set! (-> self y-offset) (+ 24576.0 (-> self default-y-offset))) + (set! (-> self move-matrix rvec quad) (-> self root trans quad)) + (manta-method-195 self) + (dotimes (gp-0 (-> self actor-group-count)) + (let ((s5-0 (-> self actor-group gp-0))) + (dotimes (s4-0 (-> s5-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) 'attacking) + (let ((t9-6 send-event-function) + (v1-38 (-> s5-0 data s4-0 actor)) + ) + (t9-6 + (if v1-38 + (-> v1-38 extra process) + ) + a1-3 + ) + ) + ) + ) + ) + ) + ) + :exit (behavior () + (logclear! (-> self flags) (manta-flags mf1)) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (-> self reaction-time)) (>= 2 (the-as int (-> self focus aware)))) + (go-stare self) + ) + (if (and (logtest? (-> self flags) (manta-flags mf1)) + (< (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) 36864.0) + (< (fabs (- (-> self root trans y) (-> self focus-pos y))) 7782.4) + ) + (go-virtual attack-end) + ) + ) + :code (behavior () + (let ((f28-0 (-> self fly-anim-speed)) + (f30-0 1.5) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! manta-flap-fast-ja :num! (seek! max f28-0) :frame-num 0.0) + (until (ja-done? 0) + (set! f28-0 (seek f28-0 f30-0 (seconds-per-frame))) + (suspend) + (ja :num! (seek! max f28-0)) + ) + (if (logtest? (-> self flags) (manta-flags mf1)) + (sound-play "manta-attack") + ) + (let ((v1-29 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-29 enemy-flags))) + (set! (-> v1-29 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-29 enemy-flags)))) + ) + (set! (-> v1-29 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-29 enemy-flags)))) + (set! (-> v1-29 nav callback-info) (-> v1-29 enemy-info callback-info)) + ) + 0 + (ja-no-eval :group! manta-flap-fast-ja :num! (seek! max f28-0) :frame-num 0.0) + (until (ja-done? 0) + (set! f28-0 (seek f28-0 f30-0 (seconds-per-frame))) + (suspend) + (ja :num! (seek! max f28-0)) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! manta-attack-start-ja :num! (seek! max 1.2) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.2)) + ) + (ja-no-eval :group! manta-glide-end-ja :num! (seek! max 1.1) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.1)) + ) + (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)) + ) + (set-time! (-> self last-attack-time)) + (go-virtual hostile) + ) + :post manta-attack-post + ) + +(defstate attack-end (manta) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((a0-0 (-> self root root-prim))) + (set! (-> (the-as collide-shape-prim-group a0-0) child 1 prim-core action) (collide-action deadly)) + ) + (sound-play "manta-hit-jak") + ) + :exit (behavior () + (set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1 prim-core action) + (collide-action) + ) + 0 + (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)) + ) + (set-time! (-> self last-attack-time)) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (-> self reaction-time)) (>= 2 (the-as int (-> self focus aware)))) + (go-stare self) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (let ((f30-0 1.0)) + (ja-no-eval :group! manta-attack-end-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (go-virtual hostile) + ) + :post manta-attack-post + ) + +(defstate knocked (manta) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-0 + (t9-0) + ) + ) + (logior! (-> self rbody flags) (rigid-body-flag enable-collision)) + (manta-method-206 self) + (set! (-> self restart-fly-anims) #t) + (set! (-> self gravity) 327680.0) + (set! (-> self hit-ground-count) (the-as uint 0)) + (set! (-> self knocked-force-mult) 1.0) + (knocked-handler self (-> self knocked-force)) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) exit))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self gravity) 81920.0) + ) + :trans (behavior () + (set-time! (-> self attack-path-blocked-time)) + (cond + ((!= (-> self hit-points) 0.0) + (if (and (zero? (-> self fated-time)) + (>= (-> self knocked-force-mult) 0.0) + (or (time-elapsed? (-> self state-time) (seconds 0.8)) + (and (< (-> self root trans y) (+ 8192.0 (-> self default-y-offset) (-> self root gspot-pos y))) + (< (-> self root transv y) 0.0) + ) + ) + ) + (go-virtual knocked-recover) + ) + ) + (else + (if (and (< (-> self root trans y) (+ -40960.0 (-> self default-y-offset) (-> self root gspot-pos y))) + (< (-> self root transv y) 0.0) + ) + (go-die self) + ) + ) + ) + ) + :post (behavior () + (seek! (-> self sound-volume) 0.0 (* 0.5 (seconds-per-frame))) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 x) (* 4096.0 (rnd-float-range self -0.3 0.3))) + (set! (-> s5-0 y) 0.0) + (set! (-> s5-0 z) (* 4096.0 (rnd-float-range self -0.2 0.2))) + (set! (-> s5-0 w) 1.0) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (f30-2 4.0) + ) + (vector-float*! gp-0 (-> self knocked-force) (* 2.0 (-> self knocked-force-mult) f30-2 f30-2)) + (vector-orient-by-quat! s4-0 s5-0 (-> self root quat)) + (vector+! s4-0 s4-0 (-> self root trans)) + (apply-impact! (-> self rbody) s4-0 gp-0) + (seek! (-> self knocked-force-mult) 0.0 (* f30-2 (seconds-per-frame))) + ) + ) + (let ((a1-9 (new 'stack-no-clear 'collide-query))) + (set! (-> a1-9 start-pos quad) (-> self rbody position quad)) + (vector-float*! (-> a1-9 move-dist) (-> self rbody lin-velocity) (seconds-per-frame)) + (let ((v1-21 a1-9)) + (set! (-> v1-21 radius) (+ 4096.0 (-> self root root-prim local-sphere w))) + (set! (-> v1-21 collide-with) (collide-spec backgnd jak bot obstacle player-list)) + (set! (-> v1-21 ignore-process0) self) + (set! (-> v1-21 ignore-process1) #f) + (set! (-> v1-21 ignore-pat) (-> self root pat-ignore-mask)) + (set! (-> v1-21 action-mask) (collide-action solid)) + ) + (fill-using-line-sphere *collide-cache* a1-9) + ) + (manta-method-203 self 0.0) + (nav-enemy-simple-post) + ) + ) + +(defstate knocked-recover (manta) + :virtual #t + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked-recover) exit))) + (if t9-0 + (t9-0) + ) + ) + (logclear! (-> self rbody flags) (rigid-body-flag enable-collision)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (dotimes (gp-0 2) + (ja-no-eval :group! manta-flap-fast-ja :num! (seek! max 1.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.5)) + ) + ) + (if (enemy-method-109 self) + (go-die self) + (go-hostile self) + ) + ) + :post (behavior () + (let ((a1-0 (new 'stack-no-clear 'collide-query))) + (set! (-> a1-0 start-pos quad) (-> self rbody position quad)) + (vector-float*! (-> a1-0 move-dist) (-> self rbody lin-velocity) (seconds-per-frame)) + (let ((v1-3 a1-0)) + (set! (-> v1-3 radius) (+ 4096.0 (-> self root root-prim local-sphere w))) + (set! (-> v1-3 collide-with) (collide-spec backgnd jak bot obstacle player-list)) + (set! (-> v1-3 ignore-process0) self) + (set! (-> v1-3 ignore-process1) #f) + (set! (-> v1-3 ignore-pat) (-> self root pat-ignore-mask)) + (set! (-> v1-3 action-mask) (collide-action solid)) + ) + (fill-using-line-sphere *collide-cache* a1-0) + ) + (manta-method-203 self 0.0) + (nav-enemy-simple-post) + ) + ) + +(defmethod go-best-state ((this manta)) + (let ((s5-0 (-> this focus aware))) + (cond + ((and (= s5-0 (enemy-aware ea3)) (get-focus! this)) + (go-hostile this) + ) + ((<= (the-as int s5-0) 0) + (go (method-of-object this land-approach)) + ) + ((>= 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) + ) + ) + ) + ) + +(defmethod manta-method-195 ((this manta)) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> this focus-pos) (the-as vector (-> this move-matrix))))) + (set! (-> s5-1 y) (-> this attack-y-offset)) + (vector-normalize! s5-1 (-> this move-force)) + (set! (-> this move-matrix fvec quad) (-> s5-1 quad)) + (vector+! (-> this move-matrix uvec) (the-as vector (-> this move-matrix)) s5-1) + ) + (vector-! (-> this move-matrix trans) (-> this focus-pos) (-> this move-matrix uvec)) + (vector-normalize! (-> this move-matrix trans) 24576.0) + (set! (-> this move-matrix trans y) (* -0.5 (-> this move-matrix trans y))) + (matrix*! (-> this curve-matrix) *hermite-matrix* (-> this move-matrix)) + 0 + (none) + ) + +(defmethod manta-method-196 ((this manta)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> this root trans quad)) + (let* ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (closest-point-on-mesh (-> this nav) s5-0 s3-0 (the-as nav-poly #f))) + ) + (when (and s4-0 (< (vector-vector-xz-distance s5-0 s3-0) 4096.0)) + (let ((s3-2 (vector-! (new 'stack-no-clear 'vector) (-> this focus-pos) s5-0))) + (vector-length s3-2) + (let ((s2-0 (new 'stack 'clamp-travel-vector-to-mesh-return-info))) + (vector-float*! s3-2 s3-2 1.3) + (clamp-vector-to-mesh-no-gaps (-> this nav) s5-0 s4-0 s3-2 s2-0) + (if (-> s2-0 found-boundary) + #f + #t + ) + ) + ) + ) + ) + ) + ) + +(defmethod get-focus! ((this manta)) + (let* ((t9-0 (method-of-type nav-enemy get-focus!)) + (v0-0 (t9-0 this)) + ) + (cond + ((and v0-0 (time-elapsed? (-> this attack-path-blocked-time) (seconds 1))) + (empty) + v0-0 + ) + (else + (the-as process-focusable #f) + ) + ) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod manta-method-197 ((this manta)) + (and (logtest? (-> this draw status) (draw-control-status on-screen)) + (let ((gp-0 (camera-matrix))) + (camera-pos) + (let* ((s4-0 (-> this focus-pos)) + (gp-1 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> gp-0 fvec) 1.0)) + (v1-6 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this root trans) s4-0) 1.0)) + ) + (< 0.0 (vector-dot gp-1 v1-6)) + ) + ) + ) + (none) + ) + +(defmethod within-gspot-range? ((this manta)) + #f + ) + +(defmethod enemy-method-88 ((this manta) (arg0 enemy-knocked-info)) + (let ((v1-0 (-> this root))) + (or (>= (-> arg0 on-surface-count) 3) + (>= (-> this hit-ground-count) (the-as uint 1)) + (and (logtest? (-> v1-0 status) (collide-status on-ground)) (>= 16384.0 (-> v1-0 transv y))) + ) + ) + ) + +(defmethod manta-method-198 ((this manta)) + (let ((a1-0 (-> this info name))) + (when (nonzero? a1-0) + (set! (-> this info) (the-as rigid-body-object-constants (-> a1-0 value))) + (set! (-> this rbody info) (-> this info info)) + ) + ) + (rigid-body-info-method-9 (-> this info info)) + 0 + (none) + ) + +(defmethod manta-method-199 ((this manta)) + 0 + (none) + ) + +(defmethod manta-method-200 ((this manta)) + (local-vars (a2-5 float) (a2-12 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s5-0 (-> this root root-prim prim-core)) + ) + (set! (-> s3-0 quad) (-> s5-0 world-sphere quad)) + (set! (-> s3-0 w) (-> s5-0 world-sphere w)) + (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)) + ) + (when (logtest? s4-0 1024) + (let ((a0-4 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((v1-14 (-> a0-4 next0))) + (while (!= a0-4 (-> *collide-player-list* alive-list-end)) + (let* ((a0-5 (-> (the-as connection a0-4) param1)) + (a1-1 (-> (the-as collide-shape a0-5) 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-1 a2-5) + (f1-1 (+ (-> a1-2 world-sphere w) (-> s3-0 w))) + ) + (when (< f0-1 (* f1-1 f1-1)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-5)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! a0-4 v1-14) + *collide-player-list* + (set! v1-14 (-> v1-14 next0)) + ) + ) + ) + ) + (when (logtest? s4-0 256) + (let ((a0-7 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((v1-22 (-> a0-7 next0))) + (while (!= a0-7 (-> *collide-hit-by-player-list* alive-list-end)) + (let* ((a0-8 (-> (the-as connection a0-7) param1)) + (a1-13 (-> (the-as collide-shape a0-8) 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-2 a2-12) + (f1-5 (+ (-> a1-14 world-sphere w) (-> s3-0 w))) + ) + (when (< f0-2 (* f1-5 f1-5)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-8)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! a0-7 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)) + (when (!= v1-27 (-> this root)) + (let* ((s2-1 + (vector-! (new 'stack-no-clear 'vector) (the-as vector s5-0) (the-as vector (-> v1-27 root-prim prim-core))) + ) + (f0-3 (vector-length s2-1)) + ) + (when (< 40.96 f0-3) + (let ((f0-6 (lerp-scale 131072.0 0.0 f0-3 2048.0 (* 1.5 (-> s5-0 world-sphere w))))) + (vector-normalize! s2-1 f0-6) + ) + (add-force! (-> this rbody) s2-1) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod manta-method-201 ((this manta) (arg0 float)) + (let ((gp-0 (new 'stack-no-clear 'inline-array 'matrix 2))) + (set! (-> gp-0 0 rvec quad) (-> this move-vel quad)) + (vector-normalize! + (the-as vector (-> gp-0 0)) + (vector-vector-distance (-> this dest-pos) (-> this root trans)) + ) + (let ((v1-2 (-> gp-0 1))) + (set! (-> v1-2 rvec x) 0.0) + (set! (-> v1-2 rvec y) 0.0) + (set! (-> v1-2 rvec z) 4096.0) + (set! (-> v1-2 rvec w) 1.0) + ) + (set-vector! (-> gp-0 1 uvec) 0.0 16384.0 0.0 1.0) + (set! (-> gp-0 0 uvec quad) (-> gp-0 0 rvec quad)) + (set! (-> gp-0 0 uvec y) 0.0) + (let* ((v1-5 (-> gp-0 0)) + (f30-0 (sqrtf (+ (* (-> v1-5 rvec x) (-> v1-5 rvec x)) (* (-> v1-5 rvec z) (-> v1-5 rvec z))))) + (f0-13 (lerp-scale 0.0 49152.0 f30-0 4096.0 61440.0)) + (f0-15 (/ (* (-> this info info mass) f0-13 f0-13) (* 2.0 f30-0))) + ) + (vector-normalize! (-> gp-0 0 uvec) (fmin arg0 f0-15)) + ) + (set! (-> this fly-anim-speed) (lerp-scale 1.0 1.5 (vector-length (-> gp-0 0 uvec)) 0.0 32768.0)) + (if (and (< (vector-dot (-> gp-0 0 uvec) (-> this forward-dir)) 0.0) + (let ((v1-15 (-> gp-0 0))) + (< (sqrtf (+ (* (-> v1-15 rvec x) (-> v1-15 rvec x)) (* (-> v1-15 rvec z) (-> v1-15 rvec z)))) 131072.0) + ) + ) + (set! (-> gp-0 1 rvec z) (* -1.0 (-> gp-0 1 rvec z))) + ) + (vector-float*! (-> gp-0 0 fvec) (-> gp-0 0 uvec) 4.0) + (vector-float*! (-> gp-0 0 trans) (-> gp-0 0 uvec) 0.5) + (vector-orient-by-quat! (-> gp-0 1 fvec) (the-as vector (-> gp-0 1)) (-> this root quat)) + (vector+! (-> gp-0 1 fvec) (-> gp-0 1 fvec) (-> this root trans)) + (apply-impact! (-> this rbody) (-> gp-0 1 fvec) (-> gp-0 0 fvec)) + (vector-orient-by-quat! (-> gp-0 1 fvec) (-> gp-0 1 uvec) (-> this root quat)) + (vector+! (-> gp-0 1 fvec) (-> gp-0 1 fvec) (-> this root trans)) + (apply-impact! (-> this rbody) (-> gp-0 1 fvec) (-> gp-0 0 trans)) + (when (logtest? (-> this flags) (manta-flags mf0)) + (let* ((s4-2 (vector-! (new 'stack-no-clear 'vector) (-> this focus-pos) (-> this root trans))) + (t9-9 lerp-scale) + (a0-27 32768.0) + (a1-16 0.0) + (v1-36 (-> gp-0 0)) + (f30-1 (t9-9 + a0-27 + a1-16 + (sqrtf (+ (* (-> v1-36 rvec x) (-> v1-36 rvec x)) (* (-> v1-36 rvec z) (-> v1-36 rvec z)))) + 4096.0 + 61440.0 + ) + ) + (s3-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-1 x) 0.0) + (set! (-> s3-1 y) 0.0) + (set! (-> s3-1 z) 10240.0) + (set! (-> s3-1 w) 1.0) + (let ((f30-2 + (* f30-1 + (lerp-scale + 0.5 + 1.0 + (vector-dot (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)) (-> this forward-dir)) + 1.0 + -1.0 + ) + ) + ) + ) + (vector-orient-by-quat! (-> gp-0 1 fvec) s3-1 (-> this root quat)) + (vector+! (-> gp-0 1 fvec) (-> gp-0 1 fvec) (-> this root trans)) + (apply-impact! + (-> this rbody) + (-> gp-0 1 fvec) + (vector-normalize-copy! (new 'stack-no-clear 'vector) s4-2 f30-2) + ) + ) + ) + ) + ) + (none) + ) + +(defmethod do-impact ((this manta)) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (f0-1 (* (-> this rbody info mass) (-> this gravity))) + (f1-2 (fmax 0.0 (fmin 1.0 (/ (- (-> this dest-pos y) (-> this root trans y)) (-> this y-offset))))) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-0 x) 0.0) + (set! (-> s4-0 y) 12288.0) + (set! (-> s4-0 z) 0.0) + (set! (-> s4-0 w) 1.0) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (vector-reset! gp-0) + (set! (-> gp-0 y) (fmax 0.0 (fmin 450560.0 (* 4.0 f0-1 f1-2)))) + (set! (-> this fly-anim-speed) (fmax (lerp-scale 1.0 1.5 f1-2 0.35 0.6) (-> this fly-anim-speed))) + (vector-orient-by-quat! s3-0 s4-0 (-> this root quat)) + (vector+! s3-0 s3-0 (-> this root trans)) + (apply-impact! (-> this rbody) s3-0 gp-0) + ) + ) + 0 + (none) + ) + +(defmethod manta-method-203 ((this manta) (arg0 float)) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (v1-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-0 x) 0.0) + (set! (-> v1-0 y) arg0) + (set! (-> v1-0 z) 0.0) + (set! (-> v1-0 w) 1.0) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-reset! gp-0) + (set! (-> gp-0 y) (* -1.0 (-> this gravity) (-> this rbody info mass))) + (vector-orient-by-quat! s4-0 v1-0 (-> this root quat)) + (vector+! s4-0 s4-0 (-> this root trans)) + (apply-impact! (-> this rbody) s4-0 gp-0) + ) + ) + 0 + (none) + ) + +(defmethod manta-method-204 ((this manta)) + (rigid-body-control-method-10 + (-> this rbody) + (the-as rigid-body-object this) + (seconds-per-frame) + (-> this max-time-step) + ) + 0 + (none) + ) + +(defmethod nav-enemy-method-161 ((this manta) (arg0 nav-control)) + (let ((a2-0 (-> arg0 state))) + (set! (-> this move-vel quad) (-> a2-0 velocity quad)) + ) + (manta-method-201 this 201326600.0) + (none) + ) + +(defmethod normalize-heading! ((this manta) (arg0 nav-control)) + 0 + (none) + ) + +(defmethod manta-method-208 ((this manta)) + (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 81920.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-28 (-> this draw shadow-ctrl))) + (logior! (-> v1-28 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + ) + ) + ) + (else + (let ((v1-31 (-> this draw shadow-ctrl))) + (logior! (-> v1-31 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + 0 + (none) + ) + +(defmethod enemy-common-post ((this manta)) + (set! (-> this root gspot-pos quad) (-> this root trans quad)) + (cond + ((and (-> this next-state) (= (-> this next-state name) 'knocked)) + (let ((a1-0 (new 'stack-no-clear 'collide-query))) + (set-ground-pat! + this + a1-0 + (-> this enemy-info recover-gnd-collide-with) + 8192.0 + 81920.0 + 1024.0 + (the-as process #f) + ) + ) + ) + (else + (let ((s5-0 (-> this nav)) + (s3-0 (-> this root trans)) + (s4-0 (new 'stack 'nav-find-poly-parms)) + ) + (vector-! (-> s4-0 point) s3-0 (the-as vector (-> s5-0 state mesh bounds))) + (set! (-> s4-0 y-threshold) (-> s5-0 nearest-y-threshold)) + (set! (-> s4-0 ignore) (the-as uint 2)) + (nav-mesh-method-46 (-> s5-0 state mesh) (the-as nav-poly s4-0)) + (let ((v1-16 (-> s4-0 poly))) + (if v1-16 + (set! (-> this root gspot-pos y) (+ (-> v1-16 vertex0 y) (-> this nav state mesh bounds y))) + ) + ) + ) + ) + ) + (manta-method-204 this) + (update-rbody-transform! (-> this rbody) (-> this root)) + (manta-method-208 this) + ((method-of-type nav-enemy enemy-common-post) this) + (none) + ) + +;; WARN: disable def twice: 150. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: disable def twice: 100. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod event-handler ((this manta) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-4 object)) + (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)) + ) + (('impact-impulse) + (let ((v1-27 (-> arg3 param 0))) + (when (and (< 0.8 (vector-dot (the-as vector (+ v1-27 16)) *y-vector*)) + (< (vector-dot (the-as vector (+ v1-27 16)) (the-as vector (+ v1-27 32))) -0.8) + ) + (set! v0-4 (+ (-> this hit-ground-count) 1)) + (set! (-> this hit-ground-count) (the-as uint v0-4)) + v0-4 + ) + ) + ) + (('tracked) + (set! v0-4 (current-time)) + (set! (-> this track-timer) (the-as time-frame v0-4)) + v0-4 + ) + (('cue-chase 'trigger) + (if (and (-> this next-state) (let ((v1-37 (-> this next-state name))) + (or (= v1-37 'idle) (= v1-37 'dormant-aware) (= v1-37 'dormant)) + ) + ) + (go (method-of-object this ambush)) + ) + ) + (('attacking) + (when (and (!= arg0 this) (time-elapsed? (-> this last-attack-time) (seconds 1))) + (set! v0-4 (+ (current-time) (seconds -1))) + (set! (-> this last-attack-time) (the-as time-frame v0-4)) + v0-4 + ) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod update-target-pos! ((this manta)) + (let ((a0-2 (handle->process (-> this focus handle)))) + (cond + (a0-2 + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable a0-2) 3) quad)) + (if (not (manta-method-196 this)) + (set-time! (-> this attack-path-blocked-time)) + ) + ) + (else + (set! (-> this focus-pos quad) (-> (target-pos 0) quad)) + (set! (-> this dest-pos quad) (-> this root trans quad)) + ) + ) + ) + (none) + ) + +(defmethod enemy-method-50 ((this manta) (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 ((v1-4 (-> (the-as collide-shape-prim-group v1-2) child 0))) + (set! (-> v1-4 prim-core action) (collide-action solid deadly)) + (set! (-> v1-4 prim-core collide-with) (collide-spec backgnd jak bot obstacle hit-by-others-list player-list)) + (set! (-> v1-4 local-sphere w) 6144.0) + ) + ) + ) + ((or (= v1-0 2) (zero? v1-0)) + (let ((v1-8 (-> this root root-prim))) + (let ((a0-5 v1-8)) + (set! (-> a0-5 prim-core action) (collide-action semi-solid deadly)) + (set! (-> a0-5 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + ) + (let ((v1-10 (-> (the-as collide-shape-prim-group v1-8) child 0))) + (set! (-> v1-10 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-10 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-10 local-sphere w) 2048.0) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod knocked-anim-handler ((this manta) (arg0 int) (arg1 enemy-knocked-info)) + (case arg0 + ((1) + (let ((s5-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 (and s5-0 (= (-> this hit-points) 0.0)) + (let ((a0-4 (-> this skel root-channel 0))) + (set! (-> a0-4 frame-group) (the-as art-joint-anim (-> this draw art-group data 16))) + (set! (-> a0-4 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 16)) frames num-frames) -1)) + ) + (set! (-> a0-4 param 1) (-> arg1 anim-speed)) + (set! (-> a0-4 frame-num) 8.0) + (joint-control-channel-group! a0-4 (the-as art-joint-anim (-> this draw art-group data 16)) num-func-seek!) + ) + ) + s5-0 + ) + ) + (else + ((method-of-type nav-enemy knocked-anim-handler) this arg0 arg1) + ) + ) + ) + +(defmethod knocked-anim ((this manta) (arg0 enemy-knocked-info)) + (cond + ((= (-> this hit-points) 0.0) + (ja-channel-push! 1 (seconds 0.1)) + (set! (-> arg0 anim-speed) 0.5) + (let ((a0-2 (-> this skel root-channel 0))) + (set! (-> a0-2 frame-group) (the-as art-joint-anim (-> this draw art-group data 16))) + (set! (-> a0-2 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 16)) 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 16)) num-func-seek!) + ) + #t + ) + ((let ((v1-15 (-> this incoming knocked-type))) + (= v1-15 (knocked-type blue-shot)) + ) + (ja-channel-push! 1 0) + (let ((a0-5 (-> this skel root-channel 0))) + (set! (-> a0-5 frame-group) (the-as art-joint-anim (-> this draw art-group data 14))) + (set! (-> a0-5 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 14)) 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 14)) num-func-seek!) + ) + #t + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (let ((a0-7 (-> this skel root-channel 0))) + (set! (-> a0-7 frame-group) (the-as art-joint-anim (-> this draw art-group data 13))) + (set! (-> a0-7 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 13)) 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 13)) num-func-seek!) + ) + #t + ) + ) + ) + +(defmethod knocked-land-anim ((this manta) (arg0 enemy-knocked-info)) + (set! (-> arg0 anim-speed) 0.5) + (ja-channel-push! 1 (seconds 0.1)) + (let ((a0-2 (-> this skel root-channel 0))) + (set! (-> a0-2 frame-group) (the-as art-joint-anim (-> this draw art-group data 18))) + (set! (-> a0-2 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 18)) 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 18)) num-func-seek!) + ) + #t + ) + +(defmethod manta-method-206 ((this manta)) + (rigid-body-control-method-28 (-> this rbody) (-> this root trans) (-> this root quat)) + (let ((v1-4 (-> this rbody))) + (set! (-> v1-4 force quad) (the-as uint128 0)) + (set! (-> v1-4 torque quad) (the-as uint128 0)) + ) + 0 + (reset-momentum! (-> this rbody)) + 0 + (none) + ) + +(defmethod alloc-rbody! ((this manta) (arg0 rigid-body-object-constants)) + (set! (-> this info) arg0) + (set! (-> this rbody) (new 'process 'rigid-body-control this)) + (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 manta-method-199)) + ) + (manta-method-198 this) + (set! (-> this max-time-step) (-> arg0 extra max-time-step)) + (set! (-> this root max-iteration-count) (the-as uint 4)) + 0 + (none) + ) + +(defmethod init-enemy! ((this manta)) + (local-vars (sv-16 res-tag)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-manta" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *manta-nav-enemy-info*) + (let ((f0-0 (res-lump-float (-> this entity) 'rotoffset))) + (quaternion-rotate-y! (-> this root quat) (-> this root quat) f0-0) + ) + (alloc-rbody! this *manta-rigid-body-constants*) + (set! (-> this flags) (manta-flags)) + (logclear! (-> this nav flags) (nav-control-flag limit-rotation-rate update-heading-from-facing use-momentum)) + (let ((v1-13 (-> this neck))) + (set! (-> v1-13 up) (the-as uint 1)) + (set! (-> v1-13 nose) (the-as uint 2)) + (set! (-> v1-13 ear) (the-as uint 0)) + (set-vector! (-> v1-13 twist-max) 11832.889 11832.889 0.0 1.0) + (set! (-> v1-13 ignore-angle) 30947.555) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-16 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-16 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-16)) + (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 default-y-offset) (res-lump-float (-> this entity) 'y-offset :default 32768.0)) + (set! (-> this root dynam gravity y) 81920.0) + (set! (-> this root dynam gravity-length) 81920.0) + (set! (-> this root dynam gravity-max) 81920.0) + (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)))) + (set! (-> this go-enable) #t) + (set! (-> this up-dir quad) (-> *y-vector* quad)) + (set! (-> this forward-dir quad) (-> *z-vector* quad)) + (set! (-> this last-attack-time) 0) + (set! (-> this attack-path-blocked-time) 0) + (set! (-> this track-timer) 0) + (set! (-> this gravity) 81920.0) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/mine/mine-mood.gc b/goal_src/jak3/levels/mine/mine-mood.gc index 7311065a00..4df3df34dc 100644 --- a/goal_src/jak3/levels/mine/mine-mood.gc +++ b/goal_src/jak3/levels/mine/mine-mood.gc @@ -7,3 +7,167 @@ ;; DECOMP BEGINS +(defun init-mood-minea ((arg0 mood-context)) + (let ((v1-0 (-> arg0 light-group 1))) + (let ((a1-0 (-> v1-0 dir0))) + (set! (-> a1-0 direction x) 0.0) + (set! (-> a1-0 direction y) 1.0) + (set! (-> a1-0 direction z) 0.0) + (set! (-> a1-0 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.25) + (set! (-> v1-0 dir1 extra x) 0.0) + (set! (-> v1-0 dir2 extra x) 0.0) + (set! (-> v1-0 ambi extra x) 0.25) + ) + (let ((v1-2 (-> arg0 light-group 2))) + (let ((a1-5 (-> v1-2 dir0))) + (set! (-> a1-5 direction x) 0.0) + (set! (-> a1-5 direction y) 1.0) + (set! (-> a1-5 direction z) 0.0) + (set! (-> a1-5 direction w) 0.0) + ) + (set-vector! (-> v1-2 dir0 color) 0.667 0.667 0.667 1.0) + (set-vector! (-> v1-2 ambi color) 0.333 0.333 0.333 1.0) + (set! (-> v1-2 dir0 extra x) 0.75) + (set! (-> v1-2 dir1 extra x) 0.0) + (set! (-> v1-2 dir2 extra x) 0.0) + (set! (-> v1-2 ambi extra x) 0.25) + ) + (let ((v1-4 (-> arg0 light-group 3))) + (let ((a0-1 (-> v1-4 dir0))) + (set! (-> a0-1 direction x) -0.2357) + (set! (-> a0-1 direction y) 0.9428) + (set! (-> a0-1 direction z) -0.2357) + (set! (-> a0-1 direction w) 0.0) + ) + (set-vector! (-> v1-4 dir0 color) 0.667 0.667 0.667 1.0) + (set-vector! (-> v1-4 ambi color) 0.3 0.25 0.4 1.0) + (set! (-> v1-4 dir0 extra x) 0.75) + (set! (-> v1-4 dir1 extra x) 0.0) + (set! (-> v1-4 dir2 extra x) 0.0) + (set! (-> v1-4 ambi extra x) 0.5) + ) + ) + +(defbehavior update-mood-minea time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (if (< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + (set! (-> arg0 times 0 w) 1.0) + ) + 0 + (none) + ) + +(deftype mineb-light-state (structure) + ((current float) + (target float) + ) + ) + + +(deftype mineb-states (structure) + ((lights mineb-light-state 3 :inline) + ) + ) + + +;; WARN: Return type mismatch symbol vs float. +(defun init-mood-mineb ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state))) + (dotimes (a0-1 3) + (set! (-> (&+ v1-0 (* a0-1 16)) 0) (the-as uint 0.0)) + (set! (-> (&+ v1-0 (* a0-1 16)) 1) (the-as uint 0.0)) + ) + ) + (the-as float #f) + ) + +(defbehavior update-mood-mineb time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (let ((v1-0 (-> arg0 light-group))) + (set! (-> v1-0 0 dir0 extra x) 0.8) + (set! (-> v1-0 0 ambi extra x) 0.8) + ) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (let ((gp-0 (-> arg0 state))) + (set! (-> arg0 times 0 w) 1.0) + (set! (-> arg0 times 1 w) (the-as float (-> gp-0 0))) + (set! (-> arg0 times 2 w) (the-as float (-> gp-0 4))) + (set! (-> arg0 times 3 w) (the-as float (-> gp-0 8))) + (when (not (paused?)) + (dotimes (s5-1 3) + (set! (-> (&+ gp-0 (* s5-1 16)) 0) + (the-as + uint + (seek (the-as float (-> (&+ gp-0 (* s5-1 16)) 0)) (the-as float (-> (&+ gp-0 (* s5-1 16)) 1)) 0.05) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun set-mineb-lights! ((arg0 int) (arg1 float)) + (let ((v1-1 (level-get *level* 'mineb))) + (when (and v1-1 (= (-> v1-1 status) 'active)) + (let ((v1-2 (-> v1-1 mood-context state))) + (set! (-> (&+ v1-2 (* arg0 16)) 1) (the-as uint arg1)) + (if (= arg1 0.0) + (set! (-> (&+ v1-2 (* arg0 16)) 0) (the-as uint arg1)) + ) + ) + ) + ) + (none) + ) + +(deftype minec-states (structure) + ((light light-state :inline) + (electricity electricity-state :inline) + ) + ) + + +(defun init-mood-minec ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state)) + (f0-0 0.0) + ) + (set! (-> v1-0 3) (the-as uint f0-0)) + f0-0 + ) + ) + +(defbehavior update-mood-minec 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 (-> arg0 state))) + (set! (-> arg0 times 6 w) 1.0) + (update-mood-light arg0 5 0 -1.0 0.0 arg1 0.0 2.0) + (cond + ((!= (the-as float (-> s4-1 3)) 0.0) + (update-mood-electricity arg0 7 8 1.2 1.7) + ) + ((or (>= arg1 18.0) (>= 6.0 arg1)) + (set! (-> arg0 times 7 w) 1.0) + ) + ) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/mine/mine-obs-h.gc b/goal_src/jak3/levels/mine/mine-obs-h.gc index 97fdecd22c..52842468b6 100644 --- a/goal_src/jak3/levels/mine/mine-obs-h.gc +++ b/goal_src/jak3/levels/mine/mine-obs-h.gc @@ -7,3 +7,4 @@ ;; DECOMP BEGINS +;; empty! \ No newline at end of file diff --git a/goal_src/jak3/levels/mine/mine-obs.gc b/goal_src/jak3/levels/mine/mine-obs.gc index 918b27e8b4..a967ad9a83 100644 --- a/goal_src/jak3/levels/mine/mine-obs.gc +++ b/goal_src/jak3/levels/mine/mine-obs.gc @@ -7,3 +7,2124 @@ ;; DECOMP BEGINS +(defun mineb-activate () + (local-vars (sv-16 res-tag)) + (let ((a0-1 (entity-by-name "minb-part-1"))) + (when a0-1 + (let ((gp-0 (the-as (pointer actor-group) #f)) + (s5-0 0) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-2 (res-lump-data a0-1 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))) + (when (and v1-2 (nonzero? (-> sv-16 elt-count))) + (set! gp-0 v1-2) + (set! s5-0 (the-as int (-> sv-16 elt-count))) + ) + ) + (when (> s5-0 0) + (dotimes (s5-1 (-> gp-0 0 length)) + (let ((a0-7 (-> gp-0 0 data s5-1 actor))) + (if a0-7 + (toggle-status a0-7 (entity-perm-status subtask-complete) #t) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(deftype rat-light-manager (process) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + ) + (:state-methods + idle + ) + (:methods + (rat-light-manager-method-15 (_type_ int int symbol) none) + (rat-light-manager-method-16 (_type_ int symbol) none) + ) + ) + + +(defstate idle (rat-light-manager) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('enter) + (rat-light-manager-method-16 self (command-get-int (-> block param 0) 0) #t) + ) + (('exit) + (rat-light-manager-method-16 self (command-get-int (-> block param 0) 0) #f) + ) + ) + ) + :code sleep-code + ) + +(defmethod run-logic? ((this rat-light-manager)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +(defmethod rat-light-manager-method-15 ((this rat-light-manager) (arg0 int) (arg1 int) (arg2 symbol)) + (let ((v1-5 (-> this actor-group 0 data arg0 actor extra perm))) + (logior! (-> v1-5 status) (entity-perm-status bit-5)) + (set! (-> v1-5 user-object 0) (if arg2 + 1 + 0 + ) + ) + (if arg2 + (set-mineb-lights! arg1 (if (logtest? (-> v1-5 status) (entity-perm-status subtask-complete)) + 1.0 + 0.0 + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod rat-light-manager-method-16 ((this rat-light-manager) (arg0 int) (arg1 symbol)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (if arg1 + (rat-light-manager-method-15 this 0 0 #t) + ) + ) + ((= v1-0 1) + (if arg1 + (rat-light-manager-method-15 this 1 1 #t) + ) + ) + ((= v1-0 2) + (if arg1 + (rat-light-manager-method-15 this 2 2 #t) + ) + ) + ((= v1-0 3) + (cond + (arg1 + (rat-light-manager-method-15 this 0 0 #f) + (rat-light-manager-method-15 this 3 0 #t) + ) + (else + (rat-light-manager-method-15 this 0 0 #t) + (rat-light-manager-method-15 this 3 0 #f) + ) + ) + ) + ((= v1-0 4) + (cond + (arg1 + (rat-light-manager-method-15 this 1 1 #f) + (rat-light-manager-method-15 this 4 1 #t) + ) + (else + (rat-light-manager-method-15 this 1 1 #t) + (rat-light-manager-method-15 this 4 1 #f) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod init-from-entity! ((this rat-light-manager) (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 + ) + ) + ) + (dotimes (s5-0 5) + (rat-light-manager-method-16 this s5-0 #f) + ) + (go (method-of-object this idle)) + ) + +(deftype min-rat-engine (process-drawable) + ((root collide-shape-moving :override) + (init-quat quaternion :inline) + (force-pos vector :inline) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (rot-speed float) + (ang-momentum float) + (rat-timer time-frame) + (notify-actor entity-actor) + (sound-id sound-id) + (rat-sound-id sound-id) + (rat-wheel-sound-id sound-id) + (light-index uint32) + (light-target float) + (wheel-angle float) + (wheel-sound-volume float) + (last-turn-time time-frame) + (rat-count uint32) + ) + (:state-methods + inactive + active + running + shutdown + ) + (:methods + (min-rat-engine-method-24 (_type_) none) + (min-rat-engine-method-25 (_type_) none) + (min-rat-engine-method-26 (_type_ float float float float) symbol) + (min-rat-engine-method-27 (_type_ process focus) none) + (min-rat-engine-method-28 (_type_) none) + ) + ) + + +(defskelgroup skel-min-rat-engine min-rat-engine min-rat-engine-lod0-jg min-rat-engine-idle-ja + ((min-rat-engine-lod0-mg (meters 20)) (min-rat-engine-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 3 11) + :origin-joint-index 5 + ) + +;; WARN: Return type mismatch collide-shape vs none. +(defmethod min-rat-engine-method-24 ((this min-rat-engine)) + (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 4) 0))) + (set! (-> s5-0 total-prims) (the-as uint 5)) + (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-vector! (-> s4-0 local-sphere) 0.0 4096.0 0.0 45056.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 bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid rideable)) + (set! (-> v1-8 transform-index) 6) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 9011.2 30720.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) -13516.8 6553.6 -16384.0 9830.4) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-12 prim-core action) (collide-action solid)) + (set! (-> v1-12 transform-index) 3) + (set-vector! (-> v1-12 local-sphere) -1638.4 13926.4 -13926.4 22118.4) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 13516.8 40960.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) (the-as collide-shape-moving s5-0)) + ) + (none) + ) + +(defbehavior min-rat-engine-handler min-rat-engine ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('ridden) + (min-rat-engine-method-27 self arg0 (the-as focus (-> arg3 param 0))) + ) + (('inside?) + (if (min-rat-engine-method-26 self (the-as float arg0) 25395.2 21299.2 8192.0) + #t + ) + ) + (('near?) + (if (min-rat-engine-method-26 self (the-as float arg0) 30720.0 24780.8 32768.0) + #t + ) + ) + (('wait-pos) + (let ((s5-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node min-rat-engine-lod0-jg ratrotation))) + (v1-7 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self init-quat))) + ) + (vector+float*! (the-as vector (-> arg3 param 0)) s5-0 v1-7 32768.0) + ) + ) + (('run-dir) + (vector-normalize! + (vector-cross! + (the-as vector (-> arg3 param 0)) + *y-vector* + (vector-z-quaternion! (the-as vector (-> arg3 param 0)) (-> self root quat)) + ) + 1.0 + ) + ) + (('run-pos) + (let* ((s2-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node min-rat-engine-lod0-jg ratrotation))) + (s1-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self init-quat))) + (s5-2 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self init-quat))) + (s3-2 (vector-flatten! + (new 'stack-no-clear 'vector) + (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> arg3 param 0)) s2-0) + s1-0 + ) + ) + (gp-0 (the-as object (-> arg3 param 1))) + ) + (let ((f30-0 2.0)) + (vector+float*! (the-as vector gp-0) s2-0 s1-0 12288.0) + (+! (-> s3-2 y) -8192.0) + (vector-normalize! s3-2 20480.0) + (vector+! (the-as vector gp-0) (the-as vector gp-0) s3-2) + (vector+float*! + (the-as vector gp-0) + (the-as vector gp-0) + s5-2 + (* 4096.0 + (+ 0.3 + (* 1.5 (sin (* 65536.0 (/ (the float (mod (current-time) (the int (* 300.0 f30-0)))) (* 300.0 f30-0))))) + ) + ) + ) + ) + gp-0 + ) + ) + (('run-up) + (let* ((a0-28 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node min-rat-engine-lod0-jg ratrotation))) + (a1-26 (vector-flatten! + (new 'stack-no-clear 'vector) + (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> arg3 param 0)) a0-28) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + ) + ) + ) + (vector-normalize-copy! (the-as vector (-> arg3 param 1)) a1-26 -1.0) + ) + ) + ) + ) + +(defbehavior min-rat-engine-post min-rat-engine () + (let ((v1-2 (-> self entity extra perm))) + (when (logtest? (-> v1-2 status) (entity-perm-status bit-5)) + (if (= (-> v1-2 user-object 0) 1) + (set-mineb-lights! (the-as int (-> self light-index)) (-> self light-target)) + ) + ) + ) + (min-rat-engine-method-28 self) + (min-rat-engine-method-25 self) + (rider-post) + (none) + ) + +(defstate inactive (min-rat-engine) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual running) + ) + (('turn) + (go-virtual running) + ) + (('claim-wheel?) + (let ((v1-6 (+ (-> self rat-count) 1))) + (set! (-> self rat-count) v1-6) + (= v1-6 1) + ) + ) + (else + (min-rat-engine-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self force-pos quad) (-> self root trans quad)) + ) + :trans (behavior () + (if (< (vector-vector-xz-distance (target-pos 0) (-> self root trans)) 204800.0) + (go-virtual active) + ) + ) + :code sleep-code + :post (behavior () + (min-rat-engine-method-28 self) + (if (< 0.0 (-> self ang-momentum)) + (ja-post) + ) + ) + ) + +(defstate active (min-rat-engine) + :virtual #t + :event (-> (method-of-type min-rat-engine inactive) event) + :trans (behavior () + (set! (-> self force-pos quad) (-> self root trans quad)) + (rider-trans) + (if (< 245760.0 (vector-vector-xz-distance (target-pos 0) (-> self root trans))) + (go-virtual inactive) + ) + ) + :code (behavior () + (sleep-code) + ) + :post (behavior () + (min-rat-engine-post) + ) + ) + +(defstate running (min-rat-engine) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('turn) + (let ((f0-0 2.0)) + (seek! + (-> self ang-momentum) + (* 8192.0 + (+ -91.68 + (* 16.68 (sin (* 65536.0 (/ (the float (mod (current-time) (the int (* 300.0 f0-0)))) (* 300.0 f0-0))))) + ) + ) + (* 409600.0 (seconds-per-frame)) + ) + ) + (let ((v0-2 (the-as object (current-time)))) + (set! (-> self last-turn-time) (the-as time-frame v0-2)) + v0-2 + ) + ) + (('running?) + #t + ) + (else + (min-rat-engine-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self rot-speed) 0.0) + (set-time! (-> self state-time)) + (set-time! (-> self last-turn-time)) + (logior! (-> self entity extra perm status) (entity-perm-status subtask-complete)) + (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-10 (-> self notify-actor)) + ) + (t9-0 + (if v1-10 + (-> v1-10 extra process) + ) + a1-0 + ) + ) + ) + (dotimes (gp-0 (+ (-> self actor-group-count) -1)) + (let ((s5-0 (-> self actor-group gp-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) 'trigger) + (let ((t9-1 send-event-function) + (v1-19 (-> s5-0 data s4-0 actor)) + ) + (t9-1 + (if v1-19 + (-> v1-19 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + ) + (let ((v1-32 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 3))) + (set! (-> v1-32 prim-core action) (collide-action solid)) + (set! (-> v1-32 prim-core collide-as) (collide-spec obstacle camera-blocker)) + ) + (sound-play "rat-wheel-raise") + (set! (-> self wheel-sound-volume) 0.0) + ) + :trans (behavior () + (rider-trans) + (if (time-elapsed? (-> self last-turn-time) (seconds 0.5)) + (go-virtual shutdown) + ) + ) + :code (behavior () + (ja-no-eval :group! min-rat-engine-raise-ja :num! (seek! max 0.04) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.04)) + ) + (when (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status bit-13)))) + (if (res-lump-struct (-> self entity) 'camera-name structure) + (process-spawn + external-camera-controller + (-> self entity) + 1200 + #f + :name "external-camera-controller" + :to *entity-pool* + ) + ) + (process-entity-status! self (entity-perm-status bit-13) #t) + ) + (let ((gp-1 (+ (-> self actor-group-count) -1))) + (dotimes (s5-0 (-> self actor-group gp-1 length)) + (toggle-status + (the-as entity-actor (-> self actor-group gp-1 data s5-0 actor)) + (entity-perm-status subtask-complete) + #f + ) + ) + ) + (until #f + (ja-no-eval :group! min-rat-engine-spin-ja :num! (seek! max 0.4) :frame-num 0.0) + (until (ja-done? 0) + (seek! (-> self light-target) 1.0 (seconds-per-frame)) + (let ((gp-2 (-> self actor-group (+ (-> self actor-group-count) -1)))) + (dotimes (s5-1 (-> gp-2 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) 'start) + (let ((t9-11 send-event-function) + (v1-70 (-> gp-2 data s5-1 actor)) + ) + (t9-11 + (if v1-70 + (-> v1-70 extra process) + ) + a1-10 + ) + ) + ) + ) + ) + (suspend) + (ja :num! (seek! max 0.4)) + ) + ) + #f + ) + :post (behavior () + (sound-play "rat-whl-squeak" :id (-> self rat-sound-id)) + (sound-play-by-name + (static-sound-name "rat-wheel-gear") + (-> self rat-wheel-sound-id) + (the int (* 1024.0 (-> self wheel-sound-volume))) + 0 + 0 + (sound-group) + #t + ) + (seek! (-> self wheel-sound-volume) 1.0 (* 2.0 (seconds-per-frame))) + (min-rat-engine-post) + ) + ) + +(defstate shutdown (min-rat-engine) + :virtual #t + :event min-rat-engine-handler + :enter (behavior () + (let ((v1-3 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 3))) + (set! (-> v1-3 prim-core action) (collide-action)) + (set! (-> v1-3 prim-core collide-as) (collide-spec)) + ) + 0 + ) + :trans rider-trans + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! min-rat-engine-lower-ja :num! (seek! max 0.03) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.03)) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (go-virtual inactive) + ) + :post (behavior () + (seek! (-> self wheel-sound-volume) 1.0 (* 2.0 (seconds-per-frame))) + (min-rat-engine-post) + ) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod min-rat-engine-method-25 ((this min-rat-engine)) + (if (!= (-> this ang-momentum) 0.0) + (sound-play-by-name + (static-sound-name "rat-wheel-loop") + (-> this sound-id) + (the int (* 1024.0 (lerp-scale 0.0 1.0 (fabs (-> this ang-momentum)) 0.0 409600.0))) + (the int (* 1524.0 (lerp-scale -1.0 0.0 (fabs (-> this ang-momentum)) 0.0 409600.0))) + 0 + (sound-group) + #t + ) + ) + (none) + ) + +(defmethod min-rat-engine-method-27 ((this min-rat-engine) (arg0 process) (arg1 focus)) + (when (= arg0 this) + (let ((a2-1 (handle->process (-> arg1 handle)))) + (if a2-1 + (set! (-> this force-pos quad) (-> (the-as process-focusable a2-1) root trans quad)) + ) + ) + ) + 0 + (none) + ) + +(defmethod min-rat-engine-method-28 ((this min-rat-engine)) + (let ((a0-2 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> this init-quat))) + (v1-1 (vector-! (new 'stack-no-clear 'vector) (-> this force-pos) (-> this root trans))) + ) + (+! (-> this ang-momentum) (* 10.0 (seconds-per-frame) (- (vector-dot a0-2 v1-1)))) + ) + (set! (-> this wheel-angle) + (the float + (sar + (shl + (the int (+ (-> this wheel-angle) (* 182.04445 (seconds-per-frame) (* 0.00024414062 (-> this ang-momentum))))) + 48 + ) + 48 + ) + ) + ) + (set! (-> this ang-momentum) (* 0.99 (-> this ang-momentum))) + 0 + (none) + ) + +(defmethod min-rat-engine-method-26 ((this min-rat-engine) (arg0 float) (arg1 float) (arg2 float) (arg3 float)) + (with-pp + (let ((v1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> v1-0 from) (process->ppointer pp)) + (set! (-> v1-0 num-params) 1) + (set! (-> v1-0 message) 'trans) + (set! (-> v1-0 param 0) (the-as uint (new 'stack-no-clear 'vector))) + (let ((s2-0 (send-event-function (the-as process-tree arg0) v1-0))) + (when s2-0 + (let* ((s1-0 (-> this root trans)) + (a2-2 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (a1-4 (vector-! (new 'stack-no-clear 'vector) (the-as vector s2-0) s1-0)) + (f30-0 (vector-dot a1-4 a2-2)) + (s3-1 (vector-flatten! (new 'stack-no-clear 'vector) a1-4 a2-2)) + ) + (and (< 0.0 f30-0) + (< f30-0 arg1) + (< (vector-length s3-1) arg2) + (< (cos arg3) (fabs (vector-dot s3-1 (vector-negate! (new 'stack-no-clear 'vector) *y-vector*)))) + ) + ) + ) + ) + ) + ) + ) + +(defmethod deactivate ((this min-rat-engine)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this sound-id)) + (sound-stop (-> this rat-sound-id)) + (sound-stop (-> this rat-wheel-sound-id)) + (call-parent-method this) + (none) + ) + +(defun joint-mod-rat-engine-callback ((arg0 cspace) (arg1 transformq)) + (let ((v1-0 (-> arg0 param1))) + (quaternion-rotate-z! (-> arg1 quat) (-> arg1 quat) (-> (the-as min-rat-engine v1-0) wheel-angle)) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (none) + ) + +(defmethod init-from-entity! ((this min-rat-engine) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (min-rat-engine-method-24 this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-min-rat-engine" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((a0-5 (-> this skel root-channel 0))) + (set! (-> a0-5 frame-group) (the-as art-joint-anim (-> this draw art-group data 3))) + (set! (-> a0-5 frame-num) 0.0) + (joint-control-channel-group! a0-5 (the-as art-joint-anim (-> this draw art-group data 3)) num-func-identity) + ) + (transform-post) + (set! (-> this notify-actor) (entity-actor-lookup (-> this entity) 'alt-actor 0)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-14 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-14 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-14)) + (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-10 (-> this node-list data 6))) + (set! (-> a0-10 param0) joint-mod-rat-engine-callback) + (set! (-> a0-10 param1) this) + ) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this rat-sound-id) (new-sound-id)) + (set! (-> this rat-wheel-sound-id) (new-sound-id)) + (set! (-> this light-index) (res-lump-value (-> this entity) 'extra-id uint :time -1000000000.0)) + (set! (-> this light-target) + (if (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + 1.0 + 0.0 + ) + ) + (set! (-> this wheel-angle) 0.0) + (set! (-> this rat-count) (the-as uint 0)) + (set! (-> this ang-momentum) 0.0) + (quaternion-copy! (-> this init-quat) (-> this root quat)) + (go (method-of-object this inactive)) + ) + +(deftype min-crane (process-drawable) + () + (:state-methods + idle + ) + (:methods + (min-crane-method-21 (_type_) none) + ) + ) + + +(defskelgroup skel-min-crane min-crane min-crane-lod0-jg min-crane-idle-ja + ((min-crane-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -2 0 12) + :origin-joint-index 3 + ) + +(defstate idle (min-crane) + :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 min-crane-method-21 ((this min-crane)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 9) 0))) + (set! (-> s5-0 total-prims) (the-as uint 10)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 82.7392 -16090.727 1494.6304 47322.727) + (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 action) (collide-action solid)) + (set! (-> v1-8 transform-index) 6) + (set-vector! (-> v1-8 local-sphere) 8350.516 3842.048 -22282.24 10069.197) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 6) + (set-vector! (-> v1-10 local-sphere) 8350.516 3842.048 -1823.9489 10069.197) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-mesh s5-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) 5) + (set-vector! (-> v1-12 local-sphere) 8362.394 -8660.173 -23385.293 18361.959) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 3) (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) 5) + (set-vector! (-> v1-14 local-sphere) 8362.394 -8660.173 -2926.592 18361.959) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 4) (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) 9) + (set-vector! (-> v1-16 local-sphere) -8350.516 -3841.2288 22282.24 10069.197) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 5) (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) 9) + (set-vector! (-> v1-18 local-sphere) -8350.516 -3841.2288 1823.9489 10069.197) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 6) (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) 8) + (set-vector! (-> v1-20 local-sphere) -8362.394 8660.173 23385.293 18361.959) + ) + (let ((v1-22 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 7) (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) 8) + (set-vector! (-> v1-22 local-sphere) -8362.394 8660.173 2926.592 18361.959) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 8) (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) 4) + (set-vector! (-> v1-24 local-sphere) 0.0 -4455.629 0.0 23633.51) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-27 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-27 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-27 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod init-from-entity! ((this min-crane) (arg0 entity-actor)) + (min-crane-method-21 this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-min-crane" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +(deftype min-target-sign (mine-platform-base) + ((off-part sparticle-launch-control) + (on-part sparticle-launch-control) + (track-pos vector :inline) + (alt-actor entity-actor) + (touched-train? symbol) + ) + (:state-methods + dormant + idle + lowering + idle-down + ) + (:methods + (spawn-on-off-part (_type_ symbol) object) + ) + ) + + +(defskelgroup skel-min-target-sign min-target-sign min-target-sign-lod0-jg min-target-sign-idle-ja + ((min-target-sign-lod0-mg (meters 999999))) + :bounds (static-spherem 0 3 3 22) + ) + +;; WARN: Return type mismatch symbol vs object. +(defbehavior target-sign-event-handler min-target-sign ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('down?) + (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete)) + ) + ) + ) + +(defstate dormant (min-target-sign) + :virtual #t + :event (the-as (function process int symbol event-message-block object) eco-door-event-handler) + :enter (behavior () + (setup-masks (-> self draw) 4 10) + ) + :trans (behavior () + (if (task-node-open? (game-task-node mine-blow-resolution)) + (go-virtual idle) + ) + ) + :code sleep-code + ) + +(defstate idle (min-target-sign) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (-> block param 1) + (let ((gp-0 (the-as touching-shapes-entry (-> block param 0)))) + (cond + (gp-0 + (let ((s5-0 (-> gp-0 head))) + (while s5-0 + (let ((v1-5 (get-touched-prim s5-0 (-> self root) gp-0))) + (when (= (-> v1-5 prim-id) #x7400e700) + (sound-play "target-hit") + (go-virtual lowering) + ) + ) + (set! s5-0 (-> s5-0 next)) + ) + ) + #f + ) + (else + (sound-play "target-hit") + (go-virtual lowering) + ) + ) + ) + ) + (('hit) + (logior! (-> self entity extra perm status) (entity-perm-status subtask-complete)) + (go-virtual lowering) + ) + (else + (target-sign-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (logior! (-> self mask) (process-mask enemy)) + (setup-masks (-> self draw) 8 6) + ) + :trans (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (spawn-on-off-part self #f) + ) + :code transform-and-sleep-code + ) + +(defstate lowering (min-target-sign) + :virtual #t + :parent (min-target-sign plat-base-state) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (when (send-event proc 'go-explode) + (let ((v0-1 (the-as object #t))) + (set! (-> self touched-train?) (the-as symbol v0-1)) + v0-1 + ) + ) + ) + (else + (target-sign-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (setup-masks (-> self draw) 2 12) + ) + :trans (behavior () + (when (>= 2.75 (ja-frame-num 0)) + (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) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (let ((gp-0 0)) + (ja-no-eval :group! min-target-sign-trackdown-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((f30-0 (ja-frame-num 0)) + (s5-0 (ja-num-frames 0)) + ) + (when (and (< 2.75 f30-0) + (not (-> self touched-train?)) + (not (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + ) + (logior! (-> self entity extra perm status) (entity-perm-status subtask-complete)) + (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) 'rail-down) + (let ((t9-4 send-event-function) + (v1-27 (-> self alt-actor)) + ) + (t9-4 + (if v1-27 + (-> v1-27 extra process) + ) + a1-2 + ) + ) + ) + ) + (when (< gp-0 (the int f30-0)) + (if (= (the int f30-0) (+ s5-0 -13)) + (sound-play "track-fall") + ) + ) + ) + (set! gp-0 (the int (ja-frame-num 0))) + (spawn-on-off-part self #t) + (suspend) + (ja :num! (seek!)) + ) + ) + (go-virtual idle-down) + ) + ) + +(defstate idle-down (min-target-sign) + :virtual #t + :parent (min-target-sign plat-base-state) + :event target-sign-event-handler + :trans (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (spawn-on-off-part self #t) + ) + :code (behavior () + (ja :group! min-target-sign-idleb-ja :num! none :frame-num 0.0) + (transform-and-sleep-code) + ) + ) + +(defmethod spawn-on-off-part ((this min-target-sign) (arg0 symbol)) + (spawn + (if arg0 + (-> this on-part) + (-> this off-part) + ) + (-> this node-list data 15 bone transform trans) + ) + (spawn + (if arg0 + (-> this on-part) + (-> this off-part) + ) + (-> this node-list data 16 bone transform trans) + ) + ) + +;; WARN: Return type mismatch mine-platform-base vs min-target-sign. +(defmethod relocate ((this min-target-sign) (offset int)) + (if (nonzero? (-> this off-part)) + (&+! (-> this off-part) offset) + ) + (if (nonzero? (-> this on-part)) + (&+! (-> this on-part) offset) + ) + (the-as min-target-sign ((method-of-type mine-platform-base relocate) this offset)) + ) + +(defmethod deactivate ((this min-target-sign)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this off-part)) + (kill-particles (-> this off-part)) + ) + (if (nonzero? (-> this on-part)) + (kill-particles (-> this on-part)) + ) + ((method-of-type mine-platform-base deactivate) this) + (none) + ) + +(defmethod get-skel ((this min-target-sign)) + (art-group-get-by-name *level* "skel-min-target-sign" (the-as (pointer level) #f)) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod init-collision! ((this min-target-sign)) + (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 5) 0))) + (set! (-> s5-0 total-prims) (the-as uint 6)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak obstacle hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable pull-rider-can-collide)) + (set! (-> s4-0 transform-index) 14) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 24576.0 69632.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (let ((v1-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-with) (collide-spec obstacle hit-by-others-list)) + (set! (-> v1-11 prim-core action) (collide-action)) + (set! (-> v1-11 transform-index) 14) + (set-vector! (-> v1-11 local-sphere) 0.0 0.0 49152.0 32768.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 camera-blocker pusher)) + (set! (-> v1-13 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-13 prim-core action) (collide-action solid rideable pull-rider-can-collide)) + (set! (-> v1-13 transform-index) 14) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 38912.0 53248.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)) + (set! (-> v1-15 transform-index) 3) + (set-vector! (-> v1-15 local-sphere) 0.0 -20480.0 4096.0 24576.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint #x7400e700)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-17 prim-core action) (collide-action)) + (set! (-> v1-17 transform-index) 3) + (set-vector! (-> v1-17 local-sphere) 10240.0 -23756.8 1228.8 10240.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint #x7400e700)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-19 prim-core action) (collide-action)) + (set! (-> v1-19 transform-index) 3) + (set-vector! (-> v1-19 local-sphere) -10240.0 -23756.8 1228.8 10240.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) + ) + (set! (-> this root event-self) 'touched) + (none) + ) + +;; WARN: Return type mismatch structure vs vector. +(defmethod get-trans ((this min-target-sign) (arg0 int)) + "Get the `trans` for this process." + (the-as vector (cond + ((= arg0 3) + (let* ((s4-0 (-> this root)) + (gp-0 (-> s4-0 root-prim)) + ) + (if (< 0.0 (vector-dot + (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> s4-0 trans)) + (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> s4-0 quat)) + ) + ) + (-> (the-as collide-shape-prim-group gp-0) child 3 prim-core) + (-> (the-as collide-shape-prim-group gp-0) child 4 prim-core) + ) + ) + ) + (else + ((method-of-type process-focusable get-trans) this arg0) + ) + ) + ) + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this min-target-sign)) + (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 init-from-entity! ((this min-target-sign) (arg0 entity-actor)) + (let ((t9-0 (method-of-type mine-platform-base init-from-entity!))) + (t9-0 this arg0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this off-part) (create-launch-control (-> *part-group-id-table* 598) this)) + (set! (-> this on-part) (create-launch-control (-> *part-group-id-table* 599) this)) + (set! (-> this alt-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (set! (-> this touched-train?) #f) + (let ((v1-11 (-> *game-info* sub-task-list (game-task-node mine-blow-resolution)))) + (when (and v1-11 (< (the-as uint 2) (-> v1-11 death-count))) + (let ((f0-1 (/ 1.0 (- 1.0 (* 0.04 (the float (max 0 (min 5 (the-as int (+ (-> v1-11 death-count) -2))))))))) + (v1-15 (the-as collide-shape-prim-group (-> this root root-prim))) + ) + (set! (-> v1-15 child 3 local-sphere w) (* (-> v1-15 child 3 local-sphere w) f0-1)) + (set! (-> v1-15 child 4 local-sphere w) (* (-> v1-15 child 4 local-sphere w) f0-1)) + ) + ) + ) + (cond + ((or (task-node-closed? (game-task-node mine-blow-resolution)) + (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + ) + (let ((a0-23 (-> this skel root-channel 0))) + (set! (-> a0-23 frame-group) (the-as art-joint-anim (-> this draw art-group data 5))) + (set! (-> a0-23 frame-num) 0.0) + (joint-control-channel-group-eval! + a0-23 + (the-as art-joint-anim (-> this draw art-group data 5)) + num-func-none + ) + ) + (ja-post) + (go (method-of-object this idle-down)) + ) + ((task-node-open? (game-task-node mine-blow-resolution)) + (let ((a0-25 (-> this skel root-channel 0))) + (set! (-> a0-25 frame-group) (the-as art-joint-anim (-> this draw art-group data 3))) + (set! (-> a0-25 frame-num) 1.0) + (joint-control-channel-group-eval! + a0-25 + (the-as art-joint-anim (-> this draw art-group data 3)) + num-func-none + ) + ) + (ja-post) + (go (method-of-object this idle)) + ) + (else + (let ((a0-26 (-> this skel root-channel 0))) + (set! (-> a0-26 frame-group) (the-as art-joint-anim (-> this draw art-group data 2))) + (set! (-> a0-26 frame-num) 0.0) + (joint-control-channel-group-eval! + a0-26 + (the-as art-joint-anim (-> this draw art-group data 2)) + num-func-none + ) + ) + (ja-post) + (go (method-of-object this dormant)) + ) + ) + ) + +(deftype min-bomb-elevator (elevator) + ((alt-actor entity-actor) + (bomb-train-offset float) + (wheel-angle float) + ) + ) + + +(defskelgroup skel-min-bomb-elevator min-bomb-elevator min-bomb-elevator-lod0-jg min-bomb-elevator-idle-ja + ((min-bomb-elevator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 50) + ) + +(defstate waiting (min-bomb-elevator) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (process-grab? *target* #f) + ) + ) + ((-> (method-of-type elevator waiting) event) proc argc message block) + ) + :post (behavior () + (let ((t9-0 (-> (method-of-type elevator waiting) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (when (task-node-closed? (game-task-node mine-blow-elevator)) + (send-event self 'jump-to 'top) + (go-virtual dormant) + ) + ) + ) + +(defstate running (min-bomb-elevator) + :virtual #t + :enter (behavior () + (set-setting! 'music #f 0.0 0) + (let ((t9-1 (-> (method-of-type elevator running) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :post (behavior () + (let ((t9-0 (-> (method-of-type elevator running) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (let* ((a0-0 (-> self alt-actor)) + (v1-4 (if a0-0 + (-> a0-0 extra process) + ) + ) + ) + (if v1-4 + (set! (-> (the-as process-drawable v1-4) root trans y) (+ (-> self root trans y) (-> self bomb-train-offset))) + ) + ) + ) + ) + +(defstate arrived (min-bomb-elevator) + :virtual #t + :enter (behavior () + (remove-setting! 'music) + (let ((t9-1 (-> (method-of-type elevator arrived) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (let ((a1-0 (new 'stack-no-clear 'array 'symbol 3))) + (set! (-> a1-0 2) 'mine6) + (set! (-> a1-0 1) 'mine5) + (set! (-> a1-0 0) 'mine4) + (want-sound-banks *load-state* a1-0) + ) + (go-virtual dormant) + ) + ) + +(defun min-bomb-elevator-callback ((arg0 cspace) (arg1 transformq)) + (let ((v1-0 (the-as min-bomb-elevator (-> arg0 param1)))) + (when (and (-> v1-0 next-state) (= (-> v1-0 next-state name) 'running)) + (set! (-> v1-0 wheel-angle) + (the float + (sar (shl (the int (+ (-> v1-0 wheel-angle) (* -0.52040726 (seconds-per-frame) (-> v1-0 speed)))) 48) 48) + ) + ) + (quaternion-rotate-local-x! (-> arg1 quat) (-> arg1 quat) (-> v1-0 wheel-angle)) + (cspace<-parented-transformq-joint! arg0 arg1) + ) + ) + 0 + (none) + ) + +(defmethod get-art-group ((this min-bomb-elevator)) + (art-group-get-by-name *level* "skel-min-bomb-elevator" (the-as (pointer level) #f)) + ) + +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-collision! ((this min-bomb-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 11) 0))) + (set! (-> s5-0 total-prims) (the-as uint 12)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list pusher)) + (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 204800.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 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-13 prim-core collide-with) (collide-spec jak bot player-list pusher)) + (set! (-> v1-13 prim-core action) (collide-action solid rideable)) + (set! (-> v1-13 transform-index) 3) + (set-vector! (-> v1-13 local-sphere) 61.0304 4443.7505 -46.6944 153172.38) + ) + (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 bot player-list pusher)) + (set! (-> v1-15 prim-core action) (collide-action solid rideable)) + (set! (-> v1-15 transform-index) 3) + (set-vector! (-> v1-15 local-sphere) 30.72 13204.275 -46.6944 137356.9) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak bot player-list pusher)) + (set! (-> v1-17 prim-core action) (collide-action solid rideable)) + (set! (-> v1-17 transform-index) 3) + (set-vector! (-> v1-17 local-sphere) -7494.0415 18259.148 -1234.1248 130382.234) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak bot player-list pusher)) + (set! (-> v1-19 prim-core action) (collide-action solid rideable)) + (set! (-> v1-19 transform-index) 3) + (set-vector! (-> v1-19 local-sphere) 13039.616 18259.148 -1234.1248 130382.234) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 4) (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak bot player-list pusher)) + (set! (-> v1-21 prim-core action) (collide-action solid rideable)) + (set! (-> v1-21 transform-index) 3) + (set-vector! (-> v1-21 local-sphere) -51408.895 58564.61 -18715.443 124619.984) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 5) (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-23 prim-core collide-with) (collide-spec jak bot player-list pusher)) + (set! (-> v1-23 prim-core action) (collide-action solid rideable)) + (set! (-> v1-23 transform-index) 3) + (set-vector! (-> v1-23 local-sphere) 51921.305 58564.61 -18715.443 124619.984) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 6) (the-as uint 0)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-25 prim-core collide-with) (collide-spec jak bot player-list pusher)) + (set! (-> v1-25 prim-core action) (collide-action solid rideable)) + (set! (-> v1-25 transform-index) 3) + (set-vector! (-> v1-25 local-sphere) 56478.926 37066.344 -122880.0 32969.113) + ) + (let ((v1-27 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 7) (the-as uint 0)))) + (set! (-> v1-27 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-27 prim-core collide-with) (collide-spec jak bot player-list pusher)) + (set! (-> v1-27 prim-core action) (collide-action solid rideable)) + (set! (-> v1-27 transform-index) 3) + (set-vector! (-> v1-27 local-sphere) -56412.98 37066.344 -122880.0 32969.113) + ) + (let ((v1-29 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 8) (the-as uint 0)))) + (set! (-> v1-29 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-29 prim-core collide-with) (collide-spec jak bot player-list pusher)) + (set! (-> v1-29 prim-core action) (collide-action solid rideable)) + (set! (-> v1-29 transform-index) 3) + (set-vector! (-> v1-29 local-sphere) -78.2336 100379.03 -123167.945 81738.14) + ) + (let ((v1-31 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 9) (the-as uint 0)))) + (set! (-> v1-31 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-31 prim-core collide-with) (collide-spec jak bot player-list pusher)) + (set! (-> v1-31 prim-core action) (collide-action solid rideable)) + (set! (-> v1-31 transform-index) 3) + (set-vector! (-> v1-31 local-sphere) -78.2336 39539.918 -123167.945 50748.62) + ) + (let ((v1-34 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 10) (the-as uint (shl #xfe00 16))))) + (set! (-> v1-34 prim-core action) (collide-action solid)) + (set! (-> v1-34 transform-index) 3) + (set-vector! (-> v1-34 local-sphere) 0.0 0.0 0.0 204800.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-37 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-37 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-37 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (none) + ) + +;; WARN: Return type mismatch sound-spec vs none. +(defmethod base-plat-method-34 ((this min-bomb-elevator)) + (set! (-> this bounce-scale) 0.0) + (set! (-> this alt-actor) (entity-actor-lookup (-> this entity) 'alt-actor 0)) + (if (-> this alt-actor) + (set! (-> this bomb-train-offset) (- (-> this alt-actor extra trans y) (-> this entity extra trans y))) + ) + (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) + (let ((a0-7 (-> this node-list data 4))) + (set! (-> a0-7 param0) min-bomb-elevator-callback) + (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 0)) + (set! (-> this sound-arrived) (static-sound-spec "mine-elev-stop" :group 0)) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod go-arrived-or-waiting ((this min-bomb-elevator)) + (if (task-node-closed? (game-task-node mine-blow-introduction)) + (go (method-of-object this waiting)) + ) + (go (method-of-object this dormant)) + (none) + ) + +(deftype min-elev-doors (process-drawable) + () + (:state-methods + idle + open + opened + ) + (:methods + (min-elev-doors-method-23 (_type_) none) + ) + ) + + +(defskelgroup skel-min-elev-doors min-elev-doors min-elev-doors-lod0-jg min-elev-doors-idle-ja + ((min-elev-doors-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 50) + ) + +(defstate idle (min-elev-doors) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual open) + ) + (('open?) + #f + ) + ) + ) + :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 open (min-elev-doors) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('open?) + #t + ) + ) + ) + :code (behavior () + (sound-play "mine-door") + (ja-no-eval :group! min-elev-doors-open-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) + (go-virtual opened) + ) + :post transform-post + ) + +(defstate opened (min-elev-doors) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('open?) + #t + ) + ) + ) + :code (behavior () + (ja-channel-set! 1) + (ja :group! min-elev-doors-open-ja :num! (identity (the float (ja-num-frames 0)))) + (transform-post) + (sleep-code) + ) + ) + +(defmethod min-elev-doors-method-23 ((this min-elev-doors)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) + (set! (-> s5-0 total-prims) (the-as uint 3)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 409600.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 -40960.0 184320.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 4) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 40960.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) + ) + +(defmethod init-from-entity! ((this min-elev-doors) (arg0 entity-actor)) + (min-elev-doors-method-23 this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-min-elev-doors" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (if (or (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (task-node-open? (game-task-node mine-blow-resolution)) + ) + (go (method-of-object this opened)) + ) + (go (method-of-object this idle)) + ) + +(deftype min-crane-switch (basebutton) + ((rog handle) + ) + ) + + +(defskelgroup skel-min-crane-switch min-crane-switch min-crane-switch-lod0-jg min-crane-switch-idle-ja + ((min-crane-switch-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defstate down-idle (min-crane-switch) + :virtual #t + :code (behavior () + (sound-play "floor-switch") + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 0.5)) + (suspend) + ) + ) + (when (not (task-node-closed? (game-task-node mine-blow-introduction))) + (let ((a1-1 (new 'stack-no-clear 'array 'symbol 3))) + (set! (-> a1-1 2) 'mine6) + (set! (-> a1-1 1) 'mine5) + (set! (-> a1-1 0) 'mine10) + (want-sound-banks *load-state* a1-1) + ) + (suspend) + (process-spawn scene-player :init scene-player-init "mine-train-intro" #t #f :name "scene-player") + ) + (sleep-code) + ) + ) + +(defstate up-idle (min-crane-switch) + :virtual #t + :exit (behavior () + (send-event (handle->process (-> self rog)) 'leave) + (let ((t9-1 (-> (method-of-type basebutton up-idle) exit))) + (if t9-1 + (t9-1) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type basebutton up-idle) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (and (or (task-node-closed? (game-task-node mine-explore-armor)) + (and (kiosk?) (task-node-open? (game-task-node mine-explore-armor))) + ) + (= (-> self rog) #f) + ) + (let ((gp-0 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-0 pos quad) (-> self root trans 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 rog) (process->handle (task-arrow-spawn gp-0 self))) + ) + ) + ) + ) + +(defmethod init-collision! ((this min-crane-switch)) + (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 obstacle)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 4096.0 0.0 8192.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 3072.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 4) + (set-vector! (-> v1-10 local-sphere) 0.0 3686.4 1843.2 5324.8) + ) + (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) + ) + +(defmethod init-skel-and-ja! ((this min-crane-switch)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-min-crane-switch" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (ja-channel-set! 1) + (cond + ((logtest? (-> this button-status) (button-status pressed)) + (let ((s5-1 (-> this skel root-channel 0))) + (joint-control-channel-group-eval! + s5-1 + (the-as art-joint-anim (-> this draw art-group data 2)) + num-func-identity + ) + (set! (-> s5-1 frame-num) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 2)) frames num-frames) -1)) + ) + ) + ) + (else + (let ((s5-2 (-> this skel root-channel 0))) + (joint-control-channel-group-eval! + s5-2 + (the-as art-joint-anim (-> this draw art-group data 2)) + num-func-identity + ) + (set! (-> s5-2 frame-num) 0.0) + ) + ) + ) + (set! (-> this anim-speed) 2.0) + (set! (-> this rog) (the-as handle #f)) + (transform-post) + (none) + ) + +(defmethod prepare-trigger-event! ((this min-crane-switch)) + (logior! (-> this button-status) (button-status button-status-3)) + 0 + (none) + ) + +(deftype min-door (process-drawable) + () + (:state-methods + idle + exploded + ) + (:methods + (min-door-method-22 (_type_) none) + (min-door-method-23 (_type_) none) + ) + ) + + +(defskelgroup skel-min-door min-door min-door-lod0-jg min-door-idle-ja + ((min-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 25) + ) + +(defskelgroup skel-min-door-break min-door-break min-door-break-lod0-jg min-door-break-idle-ja + ((min-door-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 100) + :origin-joint-index 3 + ) + +(defstate idle (min-door) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('subtask-complete) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + ) + ) + ) + :code (behavior () + (ja :group! (ja-group) :num! min) + (transform-and-sleep) + ) + ) + +(defstate exploded (min-door) + :virtual #t + :code (behavior () + (ja :group! (ja-group) :num! min) + (transform-and-sleep) + ) + ) + +(defmethod min-door-method-22 ((this min-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 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 action) (collide-action solid)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 143360.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 143360.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 81920.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) + ) + +(defmethod min-door-method-23 ((this min-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 4) 0))) + (set! (-> s5-0 total-prims) (the-as uint 5)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 163840.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 38912.0 0.0 102400.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) -71680.0 -51200.0 71680.0 40960.0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-12 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-12 prim-core action) (collide-action solid)) + (set! (-> v1-12 transform-index) 3) + (set-vector! (-> v1-12 local-sphere) -61440.0 -51200.0 0.0 61440.0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec obstacle)) + (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) 40960.0 -40960.0 20480.0 81920.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 init-from-entity! ((this min-door) (arg0 entity-actor)) + (cond + ((or (task-node-closed? (game-task-node mine-blow-resolution)) + (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + ) + (min-door-method-23 this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-min-door-break" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this exploded)) + ) + (else + (min-door-method-22 this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-min-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + ) + ) + +(deftype min-elec-gate (elec-gate) + () + ) + + +(defmethod elec-gate-method-30 ((this min-elec-gate) (arg0 float)) + (let ((v1-1 (level-get *level* 'minec))) + (when v1-1 + (let ((v1-2 (-> v1-1 mood-context state))) + (set! (-> v1-2 3) (the-as uint arg0)) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch int vs object. +(defmethod go-initial-state ((this min-elec-gate)) + (if (task-node-closed? (game-task-node mine-blow-elevator)) + ((method-of-type elec-gate go-initial-state) this) + (go (method-of-object this idle)) + ) + 0 + ) + +(deftype min-boss-elev (elevator) + ((going-down? symbol) + (sound-rotating-loop sound-spec) + ) + ) + + +(defskelgroup skel-min-boss-elev min-boss-elev min-boss-elev-lod0-jg min-boss-elev-idle-ja + ((min-boss-elev-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +(defstate dormant (min-boss-elev) + :virtual #t + :enter (behavior () + (quaternion-copy! (-> self root quat) (-> self entity quat)) + ) + ) + +(defstate running (min-boss-elev) + :virtual #t + :post (behavior () + (let ((gp-0 (-> self root quat)) + (s5-0 (-> self entity quat)) + ) + (quaternion-pseudo-seek gp-0 gp-0 s5-0 0.005) + (if (nonzero? (-> self sound-rotating-loop)) + (sound-play-by-spec (-> self sound-rotating-loop) (-> self sound-id) (-> self root trans)) + ) + (cond + ((< 0.9999976 (fabs (-> (quaternion*! + (new 'stack-no-clear 'quaternion) + (quaternion-inverse! (new 'stack-no-clear 'quaternion) gp-0) + s5-0 + ) + w + ) + ) + ) + (when (not (-> self going-down?)) + (set! (-> self going-down?) #t) + (sound-stop (-> self sound-id)) + (set! (-> self sound-id) (new-sound-id)) + ) + (let ((t9-6 (-> (method-of-type elevator running) post))) + (if t9-6 + ((the-as (function none) t9-6)) + ) + ) + ) + (else + (move-post) + ) + ) + ) + ) + ) + +(defmethod get-art-group ((this min-boss-elev)) + (art-group-get-by-name *level* "skel-min-boss-elev" (the-as (pointer level) #f)) + ) + +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-collision! ((this min-boss-elev)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) cshape-reaction-default) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 1) 0))) + (set! (-> s5-0 total-prims) (the-as uint 2)) + (set! (-> s4-0 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 61440.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 61440.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-18 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-18 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-18 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (none) + ) + +;; WARN: Return type mismatch sound-spec vs none. +(defmethod base-plat-method-34 ((this min-boss-elev)) + (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 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) + ) + +(defskelgroup skel-min-airlock-door min-airlock-door min-airlock-door-lod0-jg min-airlock-door-idle-ja + ((min-airlock-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 10 0 20) + ) + +(deftype min-airlock-door (com-airlock) + () + ) + + +(defmethod init-from-entity! ((this min-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 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) 4) + (set-vector! (-> v1-8 local-sphere) 51200.0 40960.0 0.0 61440.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 5) + (set-vector! (-> v1-10 local-sphere) -51200.0 40960.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-min-airlock-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this open-frame) 30.0) + (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) + ) + +(deftype mine-music-manager (task-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/goal_src/jak3/levels/mine/mine-ocean.gc b/goal_src/jak3/levels/mine/mine-ocean.gc index e64b3bf01a..c804b2bf55 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-part.gc b/goal_src/jak3/levels/mine/mine-part.gc index 5e7be111af..a8d1cd544e 100644 --- a/goal_src/jak3/levels/mine/mine-part.gc +++ b/goal_src/jak3/levels/mine/mine-part.gc @@ -7,3 +7,1670 @@ ;; DECOMP BEGINS +(defpartgroup group-minb-light-glow + :id 597 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2310 :fade-after (meters 120) :flags (sp6)) + (sp-item 2311 :fade-after (meters 120) :flags (sp6)) + (sp-item 2312 :fade-after (meters 120) :flags (sp6)) + ) + ) + +(defpart 2310 + :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 2311 + :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 2312 + :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-min-target-sign-off + :id 598 + :bounds (static-bspherem 0 0 0 2.5) + :parts ((sp-item 2313 :flags (sp6))) + ) + +(defpart 2313 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 9)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 16.0) + (:b 16.0) + (:a 28.0 2.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-min-target-sign-on + :id 599 + :bounds (static-bspherem 0 0 0 2.5) + :parts ((sp-item 2314 :flags (sp6))) + ) + +(defpart 2314 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 9)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 16.0) + (:g 16.0) + (:b 255.0) + (:a 28.0 2.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2315 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0 1.0) + (:scale-x (meters 0.3) (meters 0.1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.3) (meters 0.1)) + (:r 120.0 5.0) + (:g 120.0 5.0) + (:b 80.0 5.0) + (:a 128.0) + (:vel-z (meters -0.016666668) (meters -0.083333336)) + (:scalevel-x (meters -0.00066666666)) + (:rotvel-z (degrees -0.6666667) (degrees 1.3333334)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667) (meters -0.00033333333)) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x408b00 #x40a200 #x40a600 #x40aa00)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -40) (degrees 80)) + (:conerot-y (degrees -40) (degrees 80)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 2316 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 0.4) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 60.0) + (:g 70.0) + (:b 50.0) + (:a 40.0 40.0) + (:vel-z (meters -0.033333335) (meters -0.06666667)) + (:scalevel-x (meters 0.016666668)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.94) + (:timer (seconds 2.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees -40) (degrees 80)) + (:conerot-y (degrees -40) (degrees 80)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-minc-round-light-glow-always-on + :id 600 + :flags (sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2317 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2318 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2319 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2320 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2321 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2322 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2323 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2324 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2325 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2326 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2327 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2328 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2329 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + ) + ) + +(defpartgroup group-minc-round-light-glow + :id 601 + :flags (sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2317 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2318 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2319 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2320 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2321 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2322 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2323 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2324 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2325 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2326 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2327 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2328 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2329 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + ) + ) + +(defpart 2317 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters -0.1)) + (:y (meters 0)) + (:z (meters -0.2)) + (:scale-x (meters 10)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 30.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2318 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters 1.55)) + (:y (meters -0.05)) + (:z (meters -1.1)) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 20.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2319 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters -0.2)) + (:y (meters -1.7)) + (:z (meters -1.15)) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 20.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2320 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters -2)) + (:y (meters 0.1)) + (:z (meters -1.13)) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 20.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2321 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters -0.1)) + (:y (meters 1.7)) + (:z (meters -1.05)) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 20.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2322 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters 1.2)) + (:y (meters 1.2)) + (:z (meters -1)) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 20.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2323 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters -1.25)) + (:y (meters 1.1)) + (:z (meters -1)) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 20.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2324 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters -1.4)) + (:y (meters -1.1)) + (:z (meters -1.1)) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 20.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2325 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters 1.05)) + (:y (meters -1.3)) + (:z (meters -1)) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 20.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2326 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 9.8)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2327 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 9.8)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 45)) + ) + ) + +(defpart 2328 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 9.8)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees -45)) + ) + ) + +(defpart 2329 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 9)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 90)) + ) + ) + +(defpartgroup group-minc-t-light-glow-always-on + :id 602 + :flags (sp4) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 2330 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2331 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2332 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2333 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2334 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2335 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2336 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2337 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2338 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2339 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2340 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2341 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2342 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2343 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2344 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2345 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2346 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2347 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2348 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2349 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2350 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2351 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2352 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2353 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2354 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + ) + ) + +(defpartgroup group-minc-t-light-glow + :id 603 + :flags (sp4) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 2330 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2331 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2332 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2333 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2334 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2335 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2336 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2337 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2338 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2339 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2340 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2341 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2342 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2343 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2344 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2345 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2346 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2347 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2348 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2349 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2350 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2351 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2352 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2353 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2354 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + ) + ) + +(defpart 2330 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters -0.2)) + (:scale-x (meters 3)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 30.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2331 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters -2.12)) + (:z (meters 0)) + (:scale-x (meters 3)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 30.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2332 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters -4)) + (:y (meters -2.2)) + (:z (meters -0.78)) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 30.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2333 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters 3.65)) + (:y (meters -2.2)) + (:z (meters -0.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 30.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2334 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters -0.07)) + (:y (meters -3.6)) + (:z (meters -0.2)) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 30.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2335 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2336 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 45)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2337 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -45)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2338 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 9)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2339 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters -2.12)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2340 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters -2.12)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 45)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2341 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters -2.12)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -45)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2342 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters -2.12)) + (:z (meters 9)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2343 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -4)) + (:y (meters -2.2)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2344 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -4)) + (:y (meters -2.2)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 45)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2345 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -4)) + (:y (meters -2.2)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -45)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2346 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -4)) + (:y (meters -2.2)) + (:z (meters 9)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2347 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 3.65)) + (:y (meters -2.2)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2348 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 3.65)) + (:y (meters -2.2)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 45)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2349 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 3.65)) + (:y (meters -2.2)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -45)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2350 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 3.65)) + (:y (meters -2.2)) + (:z (meters 9)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2351 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -0.07)) + (:y (meters -3.6)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2352 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -0.07)) + (:y (meters -3.6)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 45)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2353 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -0.07)) + (:y (meters -3.6)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -45)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 2354 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -0.07)) + (:y (meters -3.6)) + (:z (meters 9)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0)) + ) + ) + +(defpartgroup group-bomb-train-explode + :id 604 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 80) + :parts ((sp-item 2355 :flags (sp3) :period (seconds 30) :length (seconds 0.035)) + (sp-item 2356 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2357 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2358 :period (seconds 30) :length (seconds 0.5)) + (sp-item 2359 :period (seconds 30) :length (seconds 0.5)) + (sp-item 2360 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + ) + ) + +(defpart 2355 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 60)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 100.0) + (:a 128.0) + (:omega (degrees 18011.25)) + (:fade-a -0.85333335) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 40960.0) + ) + ) + +(defpart 2361 + :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 255.0) + (:g 160.0) + (:b 40.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.13333334)) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.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 2362 + :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 64.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 128.0) + (:vel-y (meters 0.6666667) (meters 0.26666668)) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.7) + (:timer (seconds 1)) + (: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 2356 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 30.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 1.0) + (:g 1.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.1)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13 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-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 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-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-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 16.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 4.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-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 16.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 4.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-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-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 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-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 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-bomb-train-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* 2356 init-specs 14 initial-valuef) + (the-as float *part-bomb-train-explosion-dust-in-curve-settings*) + ) + +(set! (-> *part-bomb-train-explosion-dust-in-curve-settings* color-start) *range-explo-dust-color*) + +(set! (-> *part-bomb-train-explosion-dust-in-curve-settings* alpha-start) *range-explo-dust-alpha*) + +(set! (-> *part-bomb-train-explosion-dust-in-curve-settings* scale-x-start) *range-explo-dust-scale-x*) + +(set! (-> *part-bomb-train-explosion-dust-in-curve-settings* scale-y-start) *range-explo-dust-scale-y*) + +(set! (-> *part-bomb-train-explosion-dust-in-curve-settings* r-scalar) #f) + +(set! (-> *part-bomb-train-explosion-dust-in-curve-settings* g-scalar) #f) + +(set! (-> *part-bomb-train-explosion-dust-in-curve-settings* b-scalar) #f) + +(set! (-> *part-bomb-train-explosion-dust-in-curve-settings* a-scalar) *curve-explo-dust-alpha*) + +(set! (-> *part-bomb-train-explosion-dust-in-curve-settings* scale-x-scalar) *curve-explo-dust-scale-x*) + +(set! (-> *part-bomb-train-explosion-dust-in-curve-settings* scale-y-scalar) *curve-explo-dust-scale-y*) + +(defpart 2358 + :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 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.85) + (: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 2359 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 8.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.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-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-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-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 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! *range-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 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! *curve-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-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-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-bomb-train-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* 2359 init-specs 16 initial-valuef) + (the-as float *part-bomb-train-explosion-texture-curve-settings*) + ) + +(set! (-> *part-bomb-train-explosion-texture-curve-settings* color-start) *range-explo-color*) + +(set! (-> *part-bomb-train-explosion-texture-curve-settings* alpha-start) *range-explo-alpha*) + +(set! (-> *part-bomb-train-explosion-texture-curve-settings* scale-x-start) *range-explo-scale-x*) + +(set! (-> *part-bomb-train-explosion-texture-curve-settings* scale-y-start) *range-explo-scale-y*) + +(set! (-> *part-bomb-train-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-bomb-train-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-bomb-train-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-bomb-train-explosion-texture-curve-settings* a-scalar) *curve-explo-alpha*) + +(set! (-> *part-bomb-train-explosion-texture-curve-settings* scale-x-scalar) *curve-explo-scale-x*) + +(set! (-> *part-bomb-train-explosion-texture-curve-settings* scale-y-scalar) *curve-explo-scale-y*) + +(defpart 2357 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 100)) + (:rot-x (degrees 225)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 100.0) + (:a 128.0) + (:omega (degrees 18011.25)) + (:scalevel-x (meters -2)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +(defpart 2360 + :init-specs ((:texture (laser-hit2-add level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (: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 128.0) + (:omega (degrees 18011.25)) + (:scalevel-x (meters 1.3333334)) + (:scalevel-y :copy scalevel-x) + (:fade-b -1.7066667) + (:fade-a -1.7066667) + (:timer (seconds 0.25)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +(defpartgroup group-bomb-train-sparks + :id 605 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2363 :flags (sp7)) (sp-item 2364 :flags (sp7))) + ) + +(defpart 2363 + :init-specs ((:texture (hitspark level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (: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)) + ) + ) + +(defpart 2364 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 0.5 0.5) + (:scale-x (meters 0.05) (meters 0.05)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:omega (degrees 0.0225)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-g -0.64) + (:fade-b -2.56) + (:fade-a -1.28 -1.28) + (:accel-y (meters -0.0013333333)) + (:friction 0.9) + (:timer (seconds 0.335)) + (: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)) + ) + ) + +(defpartgroup group-bomb-train-smoke + :id 606 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2365 :flags (sp7))) + ) + +(defpart 2365 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:x (meters -1) (meters 2)) + (:y (meters -1) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 128.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a 1.28 1.28) + (:accel-y (meters 0.0016666667)) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 2366) + ) + ) + +(defpart 2366 + :init-specs ((:fade-a -0.23272727 -0.23272727)) + ) + +(defpartgroup group-bomb-train-light + :id 607 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2367 :flags (sp7))) + ) + +(defpart 2367 + :init-specs ((:texture (glow level-default-sprite)) + (:num 4.0) + (:scale-x (meters 1)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 200.0) + (:g 200.0) + (:b 128.0) + (:a 32.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 409.6) + ) + ) + +(defpartgroup group-min-elec-gate + :id 608 + :bounds (static-bspherem 0 -3.5 0 4) + :parts ((sp-item 2368 :fade-after (meters 160) :flags (sp6) :period (seconds 0.1) :length (seconds 0.05)) + (sp-item 2369 :fade-after (meters 160) :flags (sp6)) + ) + ) + +(defpart 2369 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 2.0) + (:y (meters -1.2) 6 (meters -1)) + (:scale-x (meters 1.6) (meters 0.1)) + (:rot-x (degrees 1.125)) + (:scale-y (meters 3.6) (meters 0.1)) + (:r 0.0) + (:g 128.0 64.0) + (:b 255.0) + (:a 32.0 4.0) + (:omega (degrees 3615.75)) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2368 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.6) (meters 0.1)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 32.0 4.0) + (:omega (degrees 3615.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1024.0) + (:rotate-y (degrees 0)) + ) + ) diff --git a/goal_src/jak3/levels/mine/mine-platforms.gc b/goal_src/jak3/levels/mine/mine-platforms.gc index e3ac3ac485..854e312086 100644 --- a/goal_src/jak3/levels/mine/mine-platforms.gc +++ b/goal_src/jak3/levels/mine/mine-platforms.gc @@ -5,5 +5,1987 @@ ;; name in dgo: mine-platforms ;; dgos: MIA +(define-extern *drill-loop-mid-curve* curve2d-piecewise) + ;; DECOMP BEGINS +(deftype mine-platform-base (base-plat) + () + (:state-methods + plat-base-state + ) + (:methods + (get-skel (_type_) art-group) + (alloc-path! (_type_ entity) none) + ) + ) + + +(defstate plat-base-state (mine-platform-base) + :virtual #t + :event plat-event + :trans plat-trans + :code sleep-code + :post plat-post + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod alloc-path! ((this mine-platform-base) (arg0 entity)) + (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)) + (not (logtest? (-> this path flags) (path-control-flag not-found))) + (none) + ) + +;; WARN: Return type mismatch none vs object. +(defmethod init-from-entity! ((this mine-platform-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)) + (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) + ) + +(deftype min-moving-plat-spooler (process-drawable) + ((spool-sound sound-id) + ) + (:state-methods + active + ) + (:methods + (queue-drill-sound (_type_) none) + ) + ) + + +(defbehavior min-moving-plat-spooler-init-by-other min-moving-plat-spooler ((arg0 vector)) + (stack-size-set! (-> self main-thread) 32) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self spool-sound) (new-sound-id)) + (set! (-> self root trans quad) (-> arg0 quad)) + (queue-drill-sound self) + (go-virtual active) + ) + +;; WARN: Return type mismatch gui-connection vs none. +(defmethod queue-drill-sound ((this min-moving-plat-spooler)) + (remove-process *gui-control* this (gui-channel guard)) + (set! (-> this spool-sound) + (add-process *gui-control* this (gui-channel guard) (gui-action queue) "lng-dril" -99.0 0) + ) + (sound-params-set! + *gui-control* + (-> this spool-sound) + #t + 35 + 70 + 9 + (-> *setting-control* user-current sfx-volume) + ) + (none) + ) + +(defmethod deactivate ((this min-moving-plat-spooler)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set-action! + *gui-control* + (gui-action stop) + (-> this spool-sound) + (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) + (none) + ) + +(defstate active (min-moving-plat-spooler) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('play-sound) + (set-action! + *gui-control* + (gui-action play) + (-> self spool-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (('queue-sound) + (set-action! + *gui-control* + (gui-action stop) + (-> self spool-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (queue-drill-sound self) + ) + ) + ) + :trans (behavior () + (case (get-status *gui-control* (-> self spool-sound)) + (((gui-status active)) + (when *sound-player-enable* + (let ((v1-3 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-3 command) (sound-command set-param)) + (set! (-> v1-3 id) (-> self spool-sound)) + (set! (-> v1-3 params volume) (the int (* 1024.0 (-> *setting-control* user-current sfx-volume)))) + (set! (-> v1-3 params mask) (the-as uint 1)) + (-> v1-3 id) + ) + ) + ) + ) + ) + :code sleep-code + ) + +(deftype min-moving-plat (mine-platform-base) + ((animation-speed float) + (sync sync-linear :inline) + (min-frame-num float) + (max-frame-num float) + (sound-drill-spool uint32) + (sound-loop uint32) + (sound-bit uint32) + (sound-gear uint32) + (last-frame float) + (spooler handle) + (sync-offset float) + ) + (:state-methods + idle + active + ) + ) + + +(defskelgroup skel-min-moving-plat min-moving-plat min-moving-plat-lod0-jg min-moving-plat-idle-ja + ((min-moving-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 24) + ) + +(defmethod init-collision! ((this min-moving-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 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 98304.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (let ((v1-11 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec pusher)) + (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) 5) + (set-vector! (-> v1-11 local-sphere) 0.0 0.0 0.0 43008.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 pusher)) + (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 12288.0 81920.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 player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 3) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 43008.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 get-skel ((this min-moving-plat)) + (art-group-get-by-name *level* "skel-min-moving-plat" (the-as (pointer level) #f)) + ) + +(defmethod init-from-entity! ((this min-moving-plat) (arg0 entity-actor)) + (let ((t9-0 (method-of-type mine-platform-base init-from-entity!))) + (t9-0 this arg0) + ) + (let ((a1-2 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-1 0)) + (if #f + (set! v1-1 (logior v1-1 1)) + ) + (set! (-> a1-2 sync-type) 'sync-linear) + (set! (-> a1-2 sync-flags) (the-as sync-flags v1-1)) + ) + (set! (-> a1-2 entity) arg0) + (set! (-> a1-2 period) (the-as uint 3000)) + (set! (-> a1-2 percent) 0.0) + (initialize! (-> this sync) a1-2) + ) + (let ((f0-1 (res-lump-float (-> this entity) 'scale :default 1.0))) + (set! (-> this root scale x) f0-1) + (set! (-> this root scale y) f0-1) + (set! (-> this root scale z) f0-1) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (ja-channel-push! 1 0) + (let ((s5-1 (-> this skel root-channel 0))) + (joint-control-channel-group! s5-1 (the-as art-joint-anim (-> this draw art-group data 3)) num-func-identity) + (set! (-> s5-1 frame-num) 0.0) + ) + (sync-now! (-> this sync) 0.6) + (let ((f0-5 (* (get-norm! (-> this sync) 0) (the float (ja-num-frames 0)))) + (v1-24 (-> this skel root-channel 0)) + ) + (set! (-> v1-24 num-func) num-func-identity) + (set! (-> v1-24 frame-num) f0-5) + ) + (ja-post) + (set! (-> this sound-drill-spool) (the-as uint (new-sound-id))) + (set! (-> this sound-loop) (the-as uint (new-sound-id))) + (set! (-> this sound-bit) (the-as uint (new-sound-id))) + (set! (-> this sound-gear) (the-as uint (new-sound-id))) + (set! (-> this spooler) (the-as handle #f)) + (when (string= (-> this name) "min-moving-plat-2") + (let ((s5-2 (get-process *default-dead-pool* min-moving-plat-spooler #x4000 1))) + (set! (-> this spooler) + (process->handle + (-> (when s5-2 + (let ((t9-15 (method-of-type min-moving-plat-spooler activate))) + (t9-15 (the-as min-moving-plat-spooler s5-2) this "min-moving-plat-spooler" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-2 min-moving-plat-spooler-init-by-other (-> this root trans)) + (-> s5-2 ppointer) + ) + 0 + ) + ) + ) + ) + ) + (if (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this active)) + ) + (go (method-of-object this idle)) + ) + +(defmethod deactivate ((this min-moving-plat)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (the-as sound-id (-> this sound-loop))) + (sound-stop (the-as sound-id (-> this sound-bit))) + (sound-stop (the-as sound-id (-> this sound-gear))) + (set-action! + *gui-control* + (gui-action stop) + (the-as sound-id (-> this sound-drill-spool)) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ((method-of-type mine-platform-base deactivate) this) + (none) + ) + +(defstate idle (min-moving-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (sync-now! (-> self sync) 0.6) + (go-virtual active) + ) + ) + (plat-event proc argc message block) + ) + :trans plat-trans + :code sleep-code + :post plat-post + ) + +(when (or (zero? *drill-loop-mid-curve*) (!= loading-level global)) + (set! *drill-loop-mid-curve* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *drill-loop-mid-curve* 3 'loading-level (the-as int #t)) + ) + +(set! (-> *drill-loop-mid-curve* pts data 0 first) 0.0) + +(set! (-> *drill-loop-mid-curve* pts data 0 second) 0.0) + +(set! (-> *drill-loop-mid-curve* pts data 1 first) 0.5) + +(set! (-> *drill-loop-mid-curve* pts data 1 second) 1.0) + +(set! (-> *drill-loop-mid-curve* pts data 2 first) 1.0) + +(set! (-> *drill-loop-mid-curve* pts data 2 second) 0.0) + +(defstate active (min-moving-plat) + :virtual #t + :event plat-event + :trans (behavior () + (sound-play "mine-drill-bit" :id (the-as sound-id (-> self sound-bit))) + (let ((f30-0 (ja-frame-num 0))) + (cond + ((and (< 15.0 f30-0) (< f30-0 28.0)) + (let ((f0-3 (* 0.07692308 (+ -15.0 f30-0)))) + 0.0 + 0.0 + (let* ((f26-0 (curve2d-method-9 *drill-loop-mid-curve* f0-3 3)) + (f28-0 (lerp -0.5 0.25 f26-0)) + ) + (sound-play-by-name + (static-sound-name "mine-drill-loop") + (the-as sound-id (-> self sound-loop)) + (the int (* 1024.0 f26-0)) + 0 + 0 + (sound-group) + #t + ) + (sound-play-by-name + (static-sound-name "mine-drill-gear") + (the-as sound-id (-> self sound-gear)) + (the int (* 1024.0 f26-0)) + (the int (* 1524.0 f28-0)) + 0 + (sound-group) + #t + ) + ) + ) + ) + ((< f30-0 46.0) + (let ((f0-15 (* 0.055555556 (+ -28.0 f30-0)))) + 0.0 + 0.0 + (let* ((f26-1 (curve2d-method-9 *drill-loop-mid-curve* f0-15 3)) + (f28-1 (lerp -0.5 0.25 f26-1)) + ) + (sound-play-by-name + (static-sound-name "mine-drill-loop") + (the-as sound-id (-> self sound-loop)) + (the int (* 1024.0 f26-1)) + 0 + 0 + (sound-group) + #t + ) + (sound-play-by-name + (static-sound-name "mine-drill-gear") + (the-as sound-id (-> self sound-gear)) + (the int (* 1024.0 f26-1)) + (the int (* 1524.0 f28-1)) + 0 + (sound-group) + #t + ) + ) + ) + ) + (else + (sound-play "mine-drill-loop" :id (the-as sound-id (-> self sound-loop)) :vol 0) + (sound-play "mine-drill-gear" :id (the-as sound-id (-> self sound-gear)) :vol 0) + ) + ) + (if (or (and (< (-> self last-frame) 50.0) (>= f30-0 50.0)) (and (< (-> self last-frame) 8.75) (>= f30-0 8.75))) + (sound-play "drill-arm-snap") + ) + (if (and (< (-> self last-frame) 50.0) (>= f30-0 50.0)) + (send-event (handle->process (-> self spooler)) 'play-sound) + ) + (if (and (< (-> self last-frame) 12.0) (>= f30-0 12.0)) + (send-event (handle->process (-> self spooler)) 'queue-sound) + ) + (set! (-> self last-frame) f30-0) + ) + (plat-trans) + ) + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 2)) + (suspend) + ) + ) + (let ((gp-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (s5-0 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (s4-0 #t) + ) + (ja-channel-push! 1 0) + (ja-no-eval :group! min-moving-plat-idle-ja :num! min) + (sync-now! (-> self sync) 0.6) + (until #f + (let ((f30-1 (* (get-norm! (-> self sync) 0) (the float (ja-num-frames 0))))) + (let ((a0-8 (-> self skel root-channel 0))) + (set! (-> a0-8 param 0) f30-1) + (joint-control-channel-group-eval! a0-8 (the-as art-joint-anim #f) num-func-loop-set!) + ) + (cond + ((or (< 55.0 f30-1) (< f30-1 5.0)) + (if s4-0 + (set! s4-0 #f) + ) + (let ((s3-1 (new 'stack-no-clear 'matrix))) + (vector+float*! (-> s3-1 trans) (-> self root trans) *up-vector* (* 40960.0 (-> self root scale x))) + (vector+float*! (-> s3-1 trans) (-> s3-1 trans) gp-1 (* 106496.0 (-> self root scale x))) + (vector+float*! (-> s3-1 trans) (-> s3-1 trans) s5-0 (* -8192.0 (-> self root scale x))) + (vector-float*! (-> s3-1 fvec) gp-1 1.0) + (set! (-> s3-1 uvec quad) (-> *up-vector* quad)) + (set! (-> s3-1 rvec quad) (-> s5-0 quad)) + (launch-particles (-> *part-id-table* 2316) s3-1 :origin-is-matrix #t) + (launch-particles (-> *part-id-table* 2315) s3-1 :origin-is-matrix #t) + ) + ) + (else + (set! s4-0 #t) + ) + ) + ) + (suspend) + ) + ) + #f + ) + :post plat-post + ) + +(deftype min-rotating-plat (mine-platform-base) + ((animation-speed float) + (sync sync-linear :inline) + (sound-loop-id sound-id) + ) + (:state-methods + idle + active + ) + ) + + +(defskelgroup skel-min-rotating-plat min-rotating-plat min-rotating-plat-lod0-jg min-rotating-plat-idle-ja + ((min-rotating-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 24) + ) + +(defmethod init-collision! ((this min-rotating-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 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 81920.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (let ((v1-11 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec pusher)) + (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) 0.0 0.0 12288.0 81920.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 pusher)) + (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) 4) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 43008.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 player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid rideable)) + (set! (-> v1-15 transform-index) 5) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 43008.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 get-skel ((this min-rotating-plat)) + (art-group-get-by-name *level* "skel-min-rotating-plat" (the-as (pointer level) #f)) + ) + +(defmethod init-from-entity! ((this min-rotating-plat) (arg0 entity-actor)) + (let ((t9-0 (method-of-type mine-platform-base init-from-entity!))) + (t9-0 this arg0) + ) + (set! (-> this bounce-scale) 0.0) + (let ((a1-2 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-1 0)) + (if #f + (set! v1-1 (logior v1-1 1)) + ) + (set! (-> a1-2 sync-type) 'sync-linear) + (set! (-> a1-2 sync-flags) (the-as sync-flags v1-1)) + ) + (set! (-> a1-2 entity) arg0) + (set! (-> a1-2 period) (the-as uint 4500)) + (set! (-> a1-2 percent) 0.0) + (initialize! (-> this sync) a1-2) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (ja-channel-push! 1 0) + (let ((s5-1 (-> this skel root-channel 0))) + (joint-control-channel-group! s5-1 (the-as art-joint-anim (-> this draw art-group data 2)) num-func-identity) + (set! (-> s5-1 frame-num) 0.0) + ) + (sync-now! (-> this sync) 0.0) + (let ((f0-5 (* (get-norm! (-> this sync) 0) (the float (ja-num-frames 0)))) + (a0-12 (-> this skel root-channel 0)) + ) + (set! (-> a0-12 param 0) f0-5) + (joint-control-channel-group! a0-12 (the-as art-joint-anim #f) num-func-loop-set!) + ) + (ja-post) + (set! (-> this sound-loop-id) (new-sound-id)) + (if (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this active)) + ) + (go (method-of-object this idle)) + ) + +(defstate idle (min-rotating-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 (min-rotating-plat) + :virtual #t + :event plat-event + :exit (behavior () + (if (nonzero? (-> self sound-loop-id)) + (sound-stop (-> self sound-loop-id)) + ) + ) + :trans plat-trans + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 2)) + (suspend) + ) + ) + (ja-channel-push! 1 0) + (ja-no-eval :group! min-rotating-plat-idle-ja :num! min) + (sync-now! (-> self sync) 0.0) + (until #f + (let ((f0-3 (* (get-norm! (-> self sync) 0) (the float (ja-num-frames 0)))) + (a0-6 (-> self skel root-channel 0)) + ) + (set! (-> a0-6 param 0) f0-3) + (joint-control-channel-group-eval! a0-6 (the-as art-joint-anim #f) num-func-loop-set!) + ) + (if (nonzero? (-> self sound-loop-id)) + (sound-play "min-rotate-plat" :id (-> self sound-loop-id)) + ) + (suspend) + ) + #f + ) + :post plat-post + ) + +(deftype min-falling-elevator (elevator) + ((wheel-angle float) + (stop-sound symbol) + (pad uint8 4) + ) + (:state-methods + unstable + falling + resetting + ) + ) + + +(defskelgroup skel-min-falling-elevator min-falling-elevator min-falling-elevator-lod0-jg min-falling-elevator-idle-ja + ((min-falling-elevator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 5 10) + ) + +(defun min-falling-elevator-callback ((arg0 cspace) (arg1 transformq)) + (let ((v1-0 (the-as min-falling-elevator (-> arg0 param1)))) + (when (and (-> v1-0 next-state) (= (-> v1-0 next-state name) 'running)) + (set! (-> v1-0 wheel-angle) + (the float + (sar (shl (the int (+ (-> v1-0 wheel-angle) (* -4.956458 (seconds-per-frame) (-> v1-0 speed)))) 48) 48) + ) + ) + (quaternion-rotate-local-x! (-> arg1 quat) (-> arg1 quat) (-> v1-0 wheel-angle)) + (cspace<-parented-transformq-joint! arg0 arg1) + ) + ) + 0 + (none) + ) + +;; 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 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) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (ja-post) + (let ((v0-1 (-> this node-list data 4))) + (set! (-> v0-1 param0) min-falling-elevator-callback) + (set! (-> v0-1 param1) this) + (set! (-> v0-1 param2) (the-as basic 0)) + ) + (none) + ) + +(defmethod init-collision! ((this min-falling-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 20480.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 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 20480.0 40960.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak 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 16384.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-20 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-20 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-20 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod get-art-group ((this min-falling-elevator)) + (art-group-get-by-name *level* "skel-min-falling-elevator" (the-as (pointer level) #f)) + ) + +(defstate running (min-falling-elevator) + :virtual #t + :enter (behavior () + (if (task-node-closed? (game-task-node mine-blow-resolution)) + (go-virtual dormant) + ) + (let ((t9-2 (-> (method-of-type elevator running) enter))) + (if t9-2 + (t9-2) + ) + ) + (set! (-> self sound-id) + (add-process *gui-control* self (gui-channel background) (gui-action queue) "mfal-end" -99.0 0) + ) + (set! (-> self stop-sound) #t) + ) + :post (behavior () + (let ((t9-0 (-> (method-of-type elevator running) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (if (not (send-event self 'query 'player-standing-on?)) + (send-event self 'use-camera #f) + ) + ) + ) + +(defstate arrived (min-falling-elevator) + :virtual #t + :post (behavior () + (let ((t9-0 (-> (method-of-type elevator arrived) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (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) 'query) + (set! (-> a1-0 param 0) (the-as uint 'player-standing-on?)) + (cond + ((and (send-event-function self a1-0) (!= (-> self prev-state name) 'resetting)) + (go-virtual unstable) + ) + (else + (send-event self 'use-camera #f) + (if (-> self stop-sound) + (set-action! + *gui-control* + (gui-action stop) + (-> self sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + ) + ) + ) + ) + +(defstate unstable (min-falling-elevator) + :virtual #t + :parent (min-falling-elevator dormant) + :event elevator-event + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 2)) + (go-virtual falling) + ) + (if (not (send-event self 'query 'player-standing-on?)) + (send-event self 'use-camera #f) + ) + (let ((v1-18 (-> self state parent))) + (when v1-18 + (let ((t9-3 (-> v1-18 trans))) + (if t9-3 + (t9-3) + ) + ) + ) + ) + ) + :code (behavior () + (when (-> self stop-sound) + (set! (-> self stop-sound) #f) + (sound-params-set! *gui-control* (-> self sound-id) #t -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) + ) + ) + (ja-no-eval :group! min-falling-elevator-start-unstable-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (until #f + (ja-no-eval :group! min-falling-elevator-unstable-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + ) + +(defstate falling (min-falling-elevator) + :virtual #t + :parent (min-falling-elevator dormant) + :event elevator-event + :enter (behavior () + (send-event self 'use-camera #f) + (set-time! (-> self state-time)) + ) + :code (behavior () + (ja-no-eval :group! min-falling-elevator-drop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (until (time-elapsed? (-> self state-time) (seconds 2)) + (suspend) + ) + (go-virtual resetting) + ) + :post transform-post + ) + +(defstate resetting (min-falling-elevator) + :virtual #t + :parent (min-falling-elevator dormant) + :event elevator-event + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (sound-play "falling-step-up") + (ja-no-eval :group! min-falling-elevator-reset-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (until (time-elapsed? (-> self state-time) (seconds 2)) + (suspend) + ) + (go-virtual arrived) + ) + ) + +(deftype min-falling-step (mine-platform-base) + ((should-fall symbol) + (actor-group (pointer actor-group)) + (actor-group-count int32) + ) + (:state-methods + idle + lowering + lowered + ) + ) + + +(defskelgroup skel-min-falling-step min-falling-step min-falling-step-lod0-jg min-falling-step-idle-ja + ((min-falling-step-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 4 20) + :origin-joint-index 4 + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this min-falling-step)) + (let ((v0-0 0)) + (cond + ((and (-> this next-state) (= (-> this next-state name) 'idle)) + (set! v0-0 (logior v0-0 32)) + ) + ((and (-> this next-state) (= (-> this next-state name) 'lowering)) + (set! v0-0 (logior v0-0 1)) + ) + ) + (the-as search-info-flag v0-0) + ) + ) + +(defmethod get-trans ((this min-falling-step) (arg0 int)) + "Get the `trans` for this process." + (cond + ((= arg0 3) + (let ((a2-0 (-> this node-list data 4 bone transform)) + (gp-0 (new 'static 'vector)) + ) + (set-vector! gp-0 0.0 0.0 24576.0 1.0) + (vector-matrix*! gp-0 gp-0 a2-0) + (set! (-> gp-0 w) 16384.0) + gp-0 + ) + ) + (else + ((method-of-type process-focusable get-trans) this arg0) + ) + ) + ) + +(defmethod init-collision! ((this min-falling-step)) + (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 projectile)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable pull-rider-can-collide)) + (set! (-> s4-0 transform-index) 4) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 16384.0 81920.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 get-skel ((this min-falling-step)) + (art-group-get-by-name *level* "skel-min-falling-step" (the-as (pointer level) #f)) + ) + +(defstate idle (min-falling-step) + :virtual #t + :parent (min-falling-step plat-base-state) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (go-virtual lowering) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :trans (behavior () + (let ((v1-1 (-> self state parent))) + (when v1-1 + (let ((t9-0 (-> v1-1 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (if (not (and v1-2 (= v1-2 min-falling-step-idle-ja))) + (ja-channel-push! 1 0) + ) + ) + (until #f + (ja-no-eval :group! min-falling-step-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + ) + +(defstate lowering (min-falling-step) + :virtual #t + :parent (min-falling-step plat-base-state) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (plat-event proc argc message block) + ) + :code (behavior () + (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-6 (-> s5-0 data s4-0 actor)) + ) + (t9-0 + (if v1-6 + (-> v1-6 extra process) + ) + a1-0 + ) + ) + ) + ) + ) + ) + (ja-channel-push! 1 0) + (sound-play "fall-step-hinge") + (let ((gp-2 0)) + (ja-no-eval :group! min-falling-step-falling-a-ja :num! (seek! max 0.6) :frame-num 0.0) + (until (ja-done? 0) + (let ((f30-0 (ja-frame-num 0)) + (v1-31 (ja-num-frames 0)) + ) + (when (< gp-2 (the int f30-0)) + (if (= (the int f30-0) (+ v1-31 -17)) + (sound-play "falling-step") + ) + ) + ) + (set! gp-2 (the int (ja-frame-num 0))) + (suspend) + (ja :num! (seek! max 0.6)) + ) + ) + (go-virtual lowered) + ) + ) + +(defstate lowered (min-falling-step) + :virtual #t + :parent (min-falling-step plat-base-state) + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (ja :group! min-falling-step-falling-a-ja :num! max) + (transform-post) + (sleep-code) + ) + ) + +(defmethod init-from-entity! ((this min-falling-step) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (let ((t9-0 (method-of-type mine-platform-base init-from-entity!))) + (t9-0 this arg0) + ) + (set! (-> this bounce-scale) 204.8) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-3 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-3 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-3)) + (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 (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (go (method-of-object this lowered)) + (go (method-of-object this idle)) + ) + ) + +(deftype min-elev-track (elevator) + () + ) + + +(defskelgroup skel-min-elev-track min-elev-track min-elev-track-lod0-jg min-elev-track-idle-ja + ((min-elev-track-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 4 8) + ) + +(defmethod get-art-group ((this min-elev-track)) + (art-group-get-by-name *level* "skel-min-elev-track" (the-as (pointer level) #f)) + ) + +;; WARN: Return type mismatch collide-shape vs none. +(defmethod init-collision! ((this min-elev-track)) + (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 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! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 -8192.0 16384.0 28672.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (let ((v1-11 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-11 prim-core collide-with) (collide-spec jak bot 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 -8192.0 16384.0 28672.0) + ) + (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) + ) + (none) + ) + +(defmethod start-bounce! ((this min-elev-track)) + 0 + (none) + ) + +;; 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 0)) + (set! (-> this sound-arrived) (static-sound-spec "min-elev-end" :group 0)) + (none) + ) + +(deftype min-folding-plat (process-drawable) + ((root collide-shape-moving :override) + (stop-sound symbol) + (sound-id sound-id) + ) + (:state-methods + idle + extend + extended + ) + (:methods + (set-bounds! (_type_) none) + ) + ) + + +(defskelgroup skel-min-folding-plat min-folding-plat min-folding-plat-lod0-jg min-folding-plat-idle-ja + ((min-folding-plat-lod0-mg (meters 20)) (min-folding-plat-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 4 10) + :origin-joint-index 5 + ) + +(defstate idle (min-folding-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual extend) + ) + ) + ) + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #f) + (ja-channel-set! 1) + (ja-no-eval :group! min-folding-plat-idle-ja :num! zero) + (transform-post) + (sleep-code) + ) + ) + +(defstate extend (min-folding-plat) + :virtual #t + :enter (behavior () + (set! (-> self stop-sound) #t) + (set! (-> self sound-id) + (add-process *gui-control* self (gui-channel background) (gui-action queue) "minbridg" -99.0 0) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (set-bounds! self) + ) + :exit (behavior () + (if (-> self stop-sound) + (set-action! + *gui-control* + (gui-action stop) + (-> self sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + :trans rider-trans + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1.5)) + (suspend) + ) + ) + (when (-> self stop-sound) + (set! (-> self stop-sound) #f) + (sound-params-set! *gui-control* (-> self sound-id) #t -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) + ) + ) + (ja-no-eval :group! min-folding-plat-extend-ja :num! (seek! max 0.1) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.1)) + ) + (go-virtual extended) + ) + :post rider-post + ) + +(defstate extended (min-folding-plat) + :virtual #t + :code (behavior () + (set-bounds! self) + (ja-no-eval :group! min-folding-plat-extend-ja + :num! (identity (the float (+ (-> (the-as art-joint-anim min-folding-plat-extend-ja) frames num-frames) -1))) + ) + (transform-post) + (sleep-code) + ) + ) + +(defmethod set-bounds! ((this min-folding-plat)) + (set! (-> this root root-prim local-sphere w) 69632.0) + (set! (-> this draw bounds w) 71680.0) + 0 + (none) + ) + +(defmethod init-from-entity! ((this min-folding-plat) (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 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) 5) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 16384.0 32768.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 2) (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 8192.0 32768.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 bot 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 8192.0 32768.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid rideable)) + (set! (-> v1-19 transform-index) 7) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 8192.0 32768.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 sound-id) (new-sound-id)) + (set! (-> this stop-sound) #f) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-min-folding-plat" (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 extended)) + (go (method-of-object this idle)) + ) + ) + +(deftype min-ramp (process-drawable) + ((angle degrees) + (play-anim? symbol) + (play-ramp-sound? symbol) + (stop-ramp-sound symbol) + (ramp-sound sound-id) + ) + (:state-methods + idle + rotating + rotated + ) + ) + + +(defskelgroup skel-min-ramp min-ramp min-ramp-lod0-jg min-ramp-idle-ja + ((min-ramp-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 2 5.5) + :origin-joint-index 4 + ) + +(defstate idle (min-ramp) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual rotating) + ) + ) + ) + :code (behavior () + (ja-no-eval :group! min-ramp-idle-ja :num! zero) + (transform-post) + (sleep-code) + ) + ) + +(defstate rotating (min-ramp) + :virtual #t + :enter (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (when (-> self play-ramp-sound?) + (set! (-> self stop-ramp-sound) #t) + (set! (-> self ramp-sound) + (add-process *gui-control* self (gui-channel background) (gui-action queue) "min-ramp" -99.0 0) + ) + ) + ) + :exit (behavior () + (if (and (-> self play-ramp-sound?) (-> self stop-ramp-sound)) + (set-action! + *gui-control* + (gui-action stop) + (-> self ramp-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + :trans (behavior () + (when (-> self play-anim?) + (when (time-elapsed? (-> self state-time) (seconds 0.75)) + (let ((gp-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> gp-0 from) (process->ppointer self)) + (set! (-> gp-0 num-params) 0) + (set! (-> gp-0 message) 'trigger) + (let ((s5-0 send-event-function) + (v1-7 (entity-actor-lookup (-> self entity) 'alt-actor 0)) + ) + (s5-0 + (if v1-7 + (-> v1-7 extra process) + ) + gp-0 + ) + ) + ) + ) + (if (= (-> self angle) 0.0) + (go-virtual rotated) + ) + (set! (-> self angle) + (seek-ease (-> self angle) 0.0 (* 8192.0 (seconds-per-frame)) 3640.889 (* 2048.0 (seconds-per-frame))) + ) + (rider-trans) + ) + ) + :code (behavior () + (when (-> self play-ramp-sound?) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 3)) + (suspend) + ) + ) + (until (= (get-status *gui-control* (-> self ramp-sound)) (gui-status ready)) + (suspend) + ) + (when (-> self stop-ramp-sound) + (set! (-> self stop-ramp-sound) #f) + (sound-params-set! *gui-control* (-> self ramp-sound) #t -1 150 2 -1.0) + (set-action! + *gui-control* + (gui-action play) + (-> self ramp-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + (set-time! (-> self state-time)) + (set! (-> self play-anim?) #t) + (sleep-code) + ) + :post rider-post + ) + +(defstate rotated (min-ramp) + :virtual #t + :code (behavior () + (set! (-> self angle) 0.0) + (transform-post) + (sleep-code) + ) + ) + +(defun min-ramp-callback ((arg0 cspace) (arg1 transformq)) + (quaternion-rotate-local-x! (-> arg1 quat) (-> arg1 quat) (-> (the-as min-ramp (-> arg0 param1)) angle)) + (cspace<-parented-transformq-joint! arg0 arg1) + 0 + (none) + ) + +(defmethod init-from-entity! ((this min-ramp) (arg0 entity-actor)) + (local-vars (s5-3 symbol)) + (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 pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak enemy hit-by-others-list 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 8192.0 20480.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-min-ramp" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this play-anim?) #f) + (let* ((s5-2 #t) + (a0-10 (-> this entity)) + (v1-18 (the-as uint128 ((method-of-object a0-10 get-property-value) + a0-10 + 'play-sound + 'interp + -1000000000.0 + (the-as uint128 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + ) + (cmove-#f-zero s5-3 v1-18 s5-2) + ) + (set! (-> this play-ramp-sound?) s5-3) + (set! (-> this ramp-sound) (new-sound-id)) + (set! (-> this stop-ramp-sound) #f) + (set! (-> this angle) 8192.0) + (let ((a0-11 (-> this node-list data 4))) + (set! (-> a0-11 param0) min-ramp-callback) + (set! (-> a0-11 param1) this) + (set! (-> a0-11 param2) (the-as basic 0)) + ) + (if (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this rotated)) + ) + (go (method-of-object this idle)) + ) + +(deftype min-bridge (process-drawable) + ((stop-bridge-sound symbol) + (bridge-sound sound-id) + ) + (:state-methods + idle + extend + extended + ) + (:methods + (init-collision! (_type_) none) + ) + ) + + +(defskelgroup skel-min-bridge min-bridge min-bridge-lod0-jg min-bridge-idle-ja + ((min-bridge-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 10 25) + :origin-joint-index 3 + ) + +(defstate idle (min-bridge) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual extend) + ) + ) + ) + :code (behavior () + (ja-no-eval :group! min-bridge-idle-ja :num! zero) + (transform-post) + (sleep-code) + ) + ) + +(defstate extend (min-bridge) + :virtual #t + :enter (behavior () + (set! (-> self stop-bridge-sound) #t) + (set! (-> self bridge-sound) + (add-process *gui-control* self (gui-channel background) (gui-action queue) "minbridg" -99.0 0) + ) + ) + :exit (behavior () + (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) + ) + ) + ) + :trans rider-trans + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1.5)) + (suspend) + ) + ) + (when (-> self stop-bridge-sound) + (set! (-> self stop-bridge-sound) #f) + (sound-params-set! *gui-control* (-> self bridge-sound) #t -1 150 2 -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-no-eval :group! min-bridge-move-ja :num! (seek! max 0.1) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.1)) + ) + (go-virtual extended) + ) + :post rider-post + ) + +(defstate extended (min-bridge) + :virtual #t + :code (behavior () + (ja-no-eval :group! min-bridge-move-ja + :num! (identity (the float (+ (-> (the-as art-joint-anim min-bridge-move-ja) frames num-frames) -1))) + ) + (transform-post) + (sleep-code) + ) + ) + +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-collision! ((this min-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-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 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 0.0 61440.0 122880.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 enemy 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 32768.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak enemy 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 32768.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak enemy hit-by-others-list player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid rideable)) + (set! (-> v1-19 transform-index) 8) + (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 2) (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak enemy 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 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) + ) + (none) + ) + +(defmethod init-from-entity! ((this min-bridge) (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-min-bridge" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this bridge-sound) (new-sound-id)) + (set! (-> this stop-bridge-sound) #f) + (if (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this extended)) + ) + (go (method-of-object this idle)) + ) + +(deftype min-plat-updown (base-plat) + ((sync sync-eased :inline) + (path-pos float) + ) + (:state-methods + idle + active + ) + (:methods + (get-skel (_type_) art-group) + ) + ) + + +(defstate idle (min-plat-updown) + :virtual #t + :event (the-as (function process int symbol event-message-block object) eco-door-event-handler) + :code sleep-code + :post ja-post + ) + +(defstate active (min-plat-updown) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (plat-event proc argc message block) + ) + :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) + (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 + ) + +;; WARN: Return type mismatch object vs none. +(defmethod base-plat-method-34 ((this min-plat-updown)) + (cond + ((logtest? (-> this path flags) (path-control-flag not-found)) + (go (method-of-object this idle)) + ) + ((> (-> this sync period) 0) + (go (method-of-object this active)) + ) + (else + (go (method-of-object this idle)) + ) + ) + (none) + ) + +;; WARN: Return type mismatch none vs object. +(defmethod init-from-entity! ((this min-plat-updown) (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)) + (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) + (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)) + (set! (-> this fact) + (new 'process 'fact-info this (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc)) + ) + (let ((a1-6 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-24 0)) + (if (not (logtest? (-> this fact options) (actor-option loop))) + (set! v1-24 (logior v1-24 1)) + ) + (set! (-> a1-6 sync-type) 'sync-eased) + (set! (-> a1-6 sync-flags) (the-as sync-flags v1-24)) + ) + (set! (-> a1-6 period) (the-as uint 1500)) + (set! (-> a1-6 entity) arg0) + (set! (-> a1-6 percent) 0.0) + (set! (-> a1-6 ease-in) 0.15) + (set! (-> a1-6 ease-out) 0.15) + (set! (-> a1-6 pause-in) 0.1) + (set! (-> a1-6 pause-out) 0.0) + (initialize! (-> this sync) a1-6) + ) + (base-plat-method-34 this) + ) + +(deftype min-moving-step (min-plat-updown) + ((holding? basic) + ) + (:state-methods + dormant + ) + ) + + +(defskelgroup skel-min-moving-step min-moving-step min-moving-step-lod0-jg min-moving-step-idle-ja + ((min-moving-step-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 3 8) + ) + +(defstate dormant (min-moving-step) + :virtual #t + :event (the-as (function process int symbol event-message-block object) eco-door-event-handler) + :code (behavior () + (set! (-> self path-pos) 0.0) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) (-> self path-pos) 'interp) + (plat-trans) + (sleep-code) + ) + ) + +(defstate active (min-moving-step) + :virtual #t + :trans (behavior () + (if (and (not (-> self holding?)) (or (= (-> self path-pos) 0.0) (= (-> self path-pos) 1.0))) + (set! (-> self holding?) (the-as basic #t)) + ) + (when (and (and (< 0.0 (-> self path-pos)) (< (-> self path-pos) 1.0)) (-> self holding?)) + (set! (-> self holding?) #f) + (sound-play "min-moving-step") + ) + (let ((t9-2 (-> (method-of-type min-plat-updown active) trans))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +(defmethod get-skel ((this min-moving-step)) + (art-group-get-by-name *level* "skel-min-moving-step" (the-as (pointer level) #f)) + ) + +(defmethod init-collision! ((this min-moving-step)) + (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 player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> s4-0 transform-index) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 12288.0 32768.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-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) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod base-plat-method-34 ((this min-moving-step)) + (set! (-> this holding?) #f) + (cond + ((logtest? (-> this path flags) (path-control-flag not-found)) + (go (method-of-object this idle)) + ) + ((and (or (task-node-open? (game-task-node mine-blow-resolution)) + (task-node-closed? (game-task-node mine-blow-resolution)) + ) + (> (-> this sync period) 0) + ) + (go (method-of-object this active)) + ) + (else + (go (method-of-object this dormant)) + ) + ) + (none) + ) + +(deftype min-elevator (elevator) + () + ) + + +(defskelgroup skel-min-elevator min-elevator min-elevator-lod0-jg min-elevator-idle-ja + ((min-elevator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 11) + :origin-joint-index 3 + ) + +(defstate running (min-elevator) + :virtual #t + :enter (behavior () + (setup-masks (-> self draw) 3 0) + (let ((t9-1 (-> (method-of-type elevator running) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :exit (behavior () + (setup-masks (-> self draw) 1 2) + (let ((t9-1 (-> (method-of-type elevator running) exit))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + +(defmethod get-art-group ((this min-elevator)) + (art-group-get-by-name *level* "skel-min-elevator" (the-as (pointer level) #f)) + ) + +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-collision! ((this min-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 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! (-> 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 obstacle 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 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 0)) + (set! (-> this draw light-index) (the-as uint 2)) + (none) + ) diff --git a/goal_src/jak3/levels/mine/mine-scenes.gc b/goal_src/jak3/levels/mine/mine-scenes.gc index 5216f661ca..7f613b310a 100644 --- a/goal_src/jak3/levels/mine/mine-scenes.gc +++ b/goal_src/jak3/levels/mine/mine-scenes.gc @@ -5,5 +5,1498 @@ ;; name in dgo: mine-scenes ;; dgos: MIA +(define-extern *range-explo-door-dust-color* curve-color-fast) +(define-extern *range-explo-door-dust-alpha* curve2d-fast) +(define-extern *range-explo-door-dust-scale-x* curve2d-fast) +(define-extern *range-explo-door-dust-scale-y* curve2d-fast) +(define-extern *curve-explo-door-dust-alpha* curve2d-fast) +(define-extern *curve-explo-door-dust-scale-x* curve2d-fast) +(define-extern *curve-explo-door-dust-scale-y* curve2d-fast) +(define-extern *part-bomb-door-explosion-dust-in-curve-settings* particle-curve-settings) +(define-extern *range-explo-door-color* curve-color-fast) +(define-extern *range-explo-door-alpha* curve2d-fast) +(define-extern *range-explo-door-scale-x* curve2d-fast) +(define-extern *range-explo-door-scale-y* curve2d-fast) +(define-extern *curve-explo-door-alpha* curve2d-fast) +(define-extern *curve-explo-door-scale-x* curve2d-fast) +(define-extern *curve-explo-door-scale-y* curve2d-fast) +(define-extern *part-bomb-door-explosion-texture-curve-settings* particle-curve-settings) + ;; DECOMP BEGINS +(defskelgroup skel-leggings-fma leggings-fma leggings-fma-lod0-jg leggings-fma-idle-ja + ((leggings-fma-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +(defskelgroup skel-min-elevator-movie min-elevator min-elevator-lod0-jg min-elevator-idle-ja + ((min-elevator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 11) + :origin-joint-index 3 + ) + +(defpartgroup group-min-door-explode + :id 609 + :duration (seconds 3) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2370 :flags (sp3) :period (seconds 30) :length (seconds 0.035)) + (sp-item 2371 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2372 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2373 :period (seconds 30) :length (seconds 0.667)) + (sp-item 2374 :period (seconds 30) :length (seconds 0.667)) + (sp-item 2375 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + ) + ) + +(defpart 2370 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 60)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 100.0) + (:a 128.0) + (:omega (degrees 18011.25)) + (:fade-a -0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 40960.0) + ) + ) + +(defpart 2371 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 30.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 1.0) + (:g 1.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.1)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13 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-explo-door-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 90.0 :y 90.0 :z 90.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-explo-door-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-explo-door-dust-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 16.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 4.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-explo-door-dust-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 16.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 4.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-explo-door-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -2.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-explo-door-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-explo-door-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-bomb-door-explosion-dust-in-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 1) + :lifetime-offset (seconds 4) + :flags (particle-curve-flags pcf0) + ) + ) + +(set! (-> *part-id-table* 2371 init-specs 14 initial-valuef) + (the-as float *part-bomb-door-explosion-dust-in-curve-settings*) + ) + +(set! (-> *part-bomb-door-explosion-dust-in-curve-settings* color-start) *range-explo-door-dust-color*) + +(set! (-> *part-bomb-door-explosion-dust-in-curve-settings* alpha-start) *range-explo-door-dust-alpha*) + +(set! (-> *part-bomb-door-explosion-dust-in-curve-settings* scale-x-start) *range-explo-door-dust-scale-x*) + +(set! (-> *part-bomb-door-explosion-dust-in-curve-settings* scale-y-start) *range-explo-door-dust-scale-y*) + +(set! (-> *part-bomb-door-explosion-dust-in-curve-settings* r-scalar) #f) + +(set! (-> *part-bomb-door-explosion-dust-in-curve-settings* g-scalar) #f) + +(set! (-> *part-bomb-door-explosion-dust-in-curve-settings* b-scalar) #f) + +(set! (-> *part-bomb-door-explosion-dust-in-curve-settings* a-scalar) *curve-explo-door-dust-alpha*) + +(set! (-> *part-bomb-door-explosion-dust-in-curve-settings* scale-x-scalar) *curve-explo-door-dust-scale-x*) + +(set! (-> *part-bomb-door-explosion-dust-in-curve-settings* scale-y-scalar) *curve-explo-door-dust-scale-y*) + +(defpart 2373 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 10.0) + (:scale-x (meters 6) (meters 4)) + (: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.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.85 0.05) + (: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 2374 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 10.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.033333335)) + (:friction 0.99) + (: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-explo-door-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-explo-door-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-explo-door-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 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! *range-explo-door-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 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! *curve-explo-door-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-explo-door-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.8 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 0.9 :z 1.0 :w 2.0) + :one-over-x-deltas (new 'static 'vector :x 1.125 :y 0.5000002 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-explo-door-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.8 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 0.9 :z 1.0 :w 2.0) + :one-over-x-deltas (new 'static 'vector :x 1.125 :y 0.5000002 :z 1.0 :w 1.0) + ) + ) + ) + +(define *part-bomb-door-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* 2374 init-specs 16 initial-valuef) + (the-as float *part-bomb-door-explosion-texture-curve-settings*) + ) + +(set! (-> *part-bomb-door-explosion-texture-curve-settings* color-start) *range-explo-door-color*) + +(set! (-> *part-bomb-door-explosion-texture-curve-settings* alpha-start) *range-explo-door-alpha*) + +(set! (-> *part-bomb-door-explosion-texture-curve-settings* scale-x-start) *range-explo-door-scale-x*) + +(set! (-> *part-bomb-door-explosion-texture-curve-settings* scale-y-start) *range-explo-door-scale-y*) + +(set! (-> *part-bomb-door-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-bomb-door-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-bomb-door-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-bomb-door-explosion-texture-curve-settings* a-scalar) *curve-explo-door-alpha*) + +(set! (-> *part-bomb-door-explosion-texture-curve-settings* scale-x-scalar) *curve-explo-door-scale-x*) + +(set! (-> *part-bomb-door-explosion-texture-curve-settings* scale-y-scalar) *curve-explo-door-scale-y*) + +(defpart 2372 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 100)) + (:rot-x (degrees 225)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 100.0) + (:a 128.0) + (:omega (degrees 18011.25)) + (:scalevel-x (meters -2)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +(defpart 2375 + :init-specs ((:texture (laser-hit2-add level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (: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 128.0) + (:omega (degrees 18011.25)) + (:scalevel-x (meters 1.3333334)) + (:scalevel-y :copy scalevel-x) + (:fade-b -1.7066667) + (:fade-a -1.7066667) + (:timer (seconds 0.25)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +(defpart 2376 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 16.0 10.0) + (:y (meters -2.5)) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0)) + (:scale-y (meters 3.4) (meters 0.6)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:vel-y (meters 0) (meters 0.13333334)) + (:scalevel-x (meters 0.06666667) (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.32) + (:friction 0.94) + (: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 2377) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 90)) + (:conerot-radius (meters 0) (meters 8)) + ) + ) + +(defpart 2377 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:next-time (seconds 0.017) (seconds 0.065)) (:next-launcher 2378)) + ) + +(defpart 2378 + :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 2379) + ) + ) + +(defpart 2379 + :init-specs ((:scalevel-x (meters 0.008333334) (meters 0.008333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.2) + (:fade-g -0.7111111) + (:fade-b -0.2) + (:fade-a -0.06545454 -0.06545454) + (:next-time (seconds 0.5) (seconds 0.097)) + (:next-launcher 2380) + ) + ) + +(defpart 2380 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.1125)) + ) + +(defpart 2381 + :init-specs ((:texture (specs level-default-sprite)) + (:num 6.0 8.0) + (:x (meters 0.25)) + (:y (meters -2.5)) + (:scale-x (meters 3) (meters 5)) + (: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.06666667) (meters 0.4)) + (:scalevel-x (meters 0.013333334) (meters 0.013333334)) + (: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.00033333333) (meters -0.0023333333)) + (:friction 0.88 0.02) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 2382) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 90)) + (:conerot-radius (meters 3) (meters 5)) + ) + ) + +(defpart 2382 + :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 2383) + ) + ) + +(defpart 2383 + :init-specs ((:fade-r -0.5543478) (:fade-g -0.5543478) (:fade-b -0.5543478) (:fade-a -0.10666667 -0.10666667)) + ) + +(defpart 2384 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 4.0 8.0) + (:x (meters 0) (meters 0.6)) + (:y (meters -2.5)) + (:scale-x (meters 8.5) (meters 8)) + (: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.2)) + (:scalevel-x (meters 0.033333335) (meters 0.086666666)) + (: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.89) + (:timer (seconds 2.367)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 2385) + (:conerot-x (degrees -1440) (degrees 2880)) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 2385 + :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 2386) + ) + ) + +(defpart 2386 + :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 2387 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 9.0) + (:y (meters -2.5)) + (:scale-x (meters 4) (meters 8)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 1) (meters 0.5)) + (:r 128.0 128.0) + (:g 96.0) + (:b 64.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.13333334) (meters 0.4)) + (:fade-g 1.6) + (:fade-b 3.2) + (:fade-a -1.6) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2)) + ) + ) + +(defpartgroup group-min-door-trailer + :id 610 + :duration (seconds 3) + :linger-duration (seconds 2) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2388 :flags (sp7) :period (seconds 30) :length (seconds 0.5))) + ) + +(defpart 2388 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.28) + (:fade-b -2.56) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 2389) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 2389 + :init-specs ((:fade-g 0.0) (:fade-b 0.0)) + ) + +(load-scene (new 'static 'scene + :name "catacombs-travel-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-140" + :art-group "scenecamera" + :anim "catacombs-travel-res" + :parts 6 + :command-list '((0 (fadein (frame-time-30 10)) (send-event "pecker-ingame-1" 'die)) + (620 (fadeout (frame-time-30 10))) + (10000 (task-close! "mine-explore-introduction")) + ) + :cut-list '(40 122 255 301 440 491) + :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 'minea + :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 'minea + :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-ingame" + :level 'minea + :art-group "skel-pecker-ingame" + :prefix "" + :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 "minec-start" + :end-point "minec-intro" + :borrow '() + :sfx-volume -1.0 + :music-delay 1500.0 + :on-running '(sound-play-loop "mine-amb-mov") + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "mine-explore-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-195" + :art-group "scenecamera" + :anim "mine-explore-res" + :parts 3 + :command-list '((0 (fadein (frame-time-30 10)) (kill "leggings-2")) + (140 (send-event "jakc-highres" 'segment 32 0)) + (290 (fadeout (frame-time-30 10))) + (10000 + (send-event self 'user-data-set! (task-closed? "mine-explore-resolution")) + (task-close! "mine-explore-resolution") + ) + ) + :cut-list '(80 140) + :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 'minea + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(140) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #xa0 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'minea + :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 "leggings-fma" + :level 'minea + :art-group "skel-leggings-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 "mineb-elevator-room" + :end-point "mineb-after-armor" + :borrow '() + :sfx-volume -1.0 + :music-delay 1500.0 + :scene-task #x72 + :on-running '(sound-play-loop "mine-amb-mov") + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup005")) + ) + ) + +(load-scene (new 'static 'scene + :name "mine-train-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-109" + :art-group "scenecamera" + :anim "mine-train-intro" + :parts 3 + :command-list '((0 (kill "min-crane-8") (kill "min-bomb-train-1")) + (335 (fadeout (frame-time-30 15))) + (10000 (task-close! "mine-blow-introduction") (send-event "min-bomb-elevator-1" 'trigger)) + ) + :cut-list '(95 208) + :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 'minea + :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 'minea + :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 "min-crane" + :level 'mineb + :art-group "skel-min-crane" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "min-bomb-train" + :level 'minea + :art-group "skel-min-bomb-train" + :prefix "" + :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 "mineb-elevator-room" + :end-point "mineb-on-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 "comb-exit" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-171" + :art-group "scenecamera" + :anim "comb-exit" + :parts 6 + :command-list '((0 + (kill "comb-elevator-1") + (kill "min-elevator-7") + (send-event "pecker-ingame-2" 'die) + (send-event "min-elevator-movie" 'segment 1 2) + (want-display 'minea 'display) + ) + (105 (send-event "min-elevator-movie" 'segment 3)) + (155 (want-load 'minea 'minec)) + (526 (want-display 'minec 'display)) + (609 (send-event "min-elevator-movie" 'segment 1 2)) + (10000 (restore "comb-elevator-1") (restore "min-elevator-7") (save) (task-close! "comb-travel-resolution")) + ) + :cut-list '(155 526 571) + :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 'minea + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '((145 575)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'minea + :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 "min-elevator-movie" + :level 'minea + :art-group "skel-min-elevator-movie" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x2 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "pecker-ingame" + :level 'minea + :art-group "skel-pecker-ingame" + :prefix "" + :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 "combn-start" + :end-point "minec-start" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(sound-play-loop "tunnel-amb-mov") + :on-complete #f + ) + ) + +(load-scene (new 'static 'scene + :name "mine-train-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-113" + :art-group "scenecamera" + :anim "mine-train-res" + :parts 2 + :command-list '((0 + (send-event "min-door-1" 'subtask-complete) + (kill "min-door-1") + (kill "manta-1") + (kill "manta-3") + (kill "manta-4") + (part-tracker + "group-bomb-train-sparks" + entity + "min-bomb-train" + joint + "sparks" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-bomb-train-smoke" + entity + "min-bomb-train" + joint + "sparks1" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-bomb-train-sparks" + entity + "min-bomb-train" + joint + "sparks2" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-bomb-train-smoke" + entity + "min-bomb-train" + joint + "sparks3" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-bomb-train-sparks" + entity + "min-bomb-train" + joint + "sparks4" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-bomb-train-light" + entity + "min-bomb-train" + joint + "light" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-bomb-train-light" + entity + "min-bomb-train" + joint + "light1" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-bomb-train-light" + entity + "min-bomb-train" + joint + "light2" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + ) + (78 + (part-tracker + "group-min-door-explode" + entity + "min-bomb-train" + joint + "main" + track + #f + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (send-event "min-bomb-train-3" 'doors-exploded) + ) + (80 + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "h" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "i" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "k" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "l" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "n" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "o" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "s" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "t" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "u" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "v" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "x" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "y" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "ad" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "ag" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + ) + (81 + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "m" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "w" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "z" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + ) + (82 + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "g" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "zz" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + ) + (83 (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "d" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + ) + (88 (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "aa" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + ) + (93 (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "ab" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + ) + (95 + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "f" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "ac" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + ) + (98 (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "e" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + ) + (10000 (kill "min-boss-elev-1") (task-close! "mine-blow-resolution")) + ) + :cut-list '(95 208) + :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 "min-door-break" + :level 'minec + :art-group "skel-min-door-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 "min-bomb-train" + :level 'minea + :art-group "skel-min-bomb-train" + :prefix "" + :draw-frames '((min 88)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "minec-train" + :end-point "minec-resolution" + :borrow '() + :sfx-volume 1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete #f + ) + ) + +(deftype leggings (process-drawable) + ((alt-actor entity-actor) + ) + (:state-methods + idle + die + ) + ) + + +(defskelgroup skel-leggings leggings leggings-lod0-jg leggings-idle-ja + ((leggings-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defstate idle (leggings) + :virtual #t + :code (behavior () + (ja :group! (ja-group) :num! min) + (ja-post) + (sleep-code) + ) + ) + +(defstate die (leggings) + :virtual #t + :code (behavior () + (suspend) + 0 + ) + ) + +(defmethod init-from-entity! ((this leggings) (arg0 entity-actor)) + (when (task-node-closed? (game-task-node mine-explore-resolution)) + (cleanup-for-death this) + (return #f) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (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-leggings" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this alt-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (if (or (kiosk?) (demo?)) + (go (method-of-object this die)) + (go (method-of-object this idle)) + ) + ) diff --git a/goal_src/jak3/levels/mine/mine-train.gc b/goal_src/jak3/levels/mine/mine-train.gc index 8f0b7654ef..e3404eb0b1 100644 --- a/goal_src/jak3/levels/mine/mine-train.gc +++ b/goal_src/jak3/levels/mine/mine-train.gc @@ -7,3 +7,927 @@ ;; DECOMP BEGINS +(define *min-bomb-train-times* + (new 'static 'boxed-array :type float 12.0 15.0 27.0 33.0 55.0 59.0 90.0 92.0 106.0 127.0 131.0 143.0 146.0) + ) + +(deftype min-bomb-train (process-focusable) + ((path-pos float) + (path-length float) + (speed float) + (fall-travel-time float) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (wheel-angle degrees) + (sound-loop-id sound-id) + (attack-id uint32) + (spark-part sparticle-launch-control) + (smoke-part sparticle-launch-control) + (light-part sparticle-launch-control) + (doors-exploded? symbol) + (taskman handle) + (current-rail uint8) + (suck-level float) + (minimap (array connection-minimap)) + ) + (:state-methods + idle + wait + active + explode + fall + die + explode-doors + ) + (:methods + (alloc-path! (_type_) symbol) + (init-collision! (_type_) none) + (get-path-progress (_type_ float float) float) + (update-task-manager (_type_) object) + (spawn-debris (_type_) none) + (explode-sound (_type_) none) + ) + ) + + +(defskelgroup skel-min-bomb-train min-bomb-train min-bomb-train-lod0-jg min-bomb-train-idle-ja + ((min-bomb-train-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 18) + :shadow min-bomb-train-shadow-mg + :origin-joint-index 3 + ) + +(defskelgroup skel-min-bomb-train-debris-a min-bomb-train-debris min-bomb-train-debris-a-lod0-jg -1 + ((min-bomb-train-debris-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +(defskelgroup skel-min-bomb-train-debris-b min-bomb-train-debris min-bomb-train-debris-b-lod0-jg -1 + ((min-bomb-train-debris-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-min-bomb-train-debris-c min-bomb-train-debris min-bomb-train-debris-c-lod0-jg -1 + ((min-bomb-train-debris-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-min-bomb-train-debris-d min-bomb-train-debris min-bomb-train-debris-d-lod0-jg -1 + ((min-bomb-train-debris-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(define *min-bomb-train-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-min-bomb-train-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 13 :group "skel-min-bomb-train-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 14 :group "skel-min-bomb-train-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 15 :group "skel-min-bomb-train-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 16 :group "skel-min-bomb-train-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-min-bomb-train-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-min-bomb-train-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 6 :group "skel-min-bomb-train-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 7 :group "skel-min-bomb-train-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 12 :group "skel-min-bomb-train-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 8 :group "skel-min-bomb-train-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-min-bomb-train-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-min-bomb-train-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 11 :group "skel-min-bomb-train-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 3 :group "skel-min-bomb-train-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 3 :group "skel-min-bomb-train-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 3 :group "skel-min-bomb-train-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 3 :group "skel-min-bomb-train-debris-c") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "train-pieces") + ) + ) + +(defmethod init-collision! ((this min-bomb-train)) + (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)) + (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 0.0 40960.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 action) (collide-action solid no-standon)) + (set! (-> v1-12 transform-index) 3) + (set-vector! (-> v1-12 local-sphere) 0.0 0.0 0.0 40960.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 action) (collide-action solid no-standon)) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 4096.0 28672.0 12288.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 action) (collide-action solid no-standon)) + (set! (-> v1-16 transform-index) 3) + (set-vector! (-> v1-16 local-sphere) 0.0 12288.0 0.0 20480.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 spawn-debris ((this min-bomb-train)) + (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.5) + (set-vector! (-> a1-1 fountain-rand-transv-lo) -327680.0 163840.0 -327680.0 1.0) + (set-vector! (-> a1-1 fountain-rand-transv-hi) 327680.0 163840.0 327680.0 1.0) + (debris-spawn this a1-1 *min-bomb-train-debris-params* (the-as process-drawable #f)) + ) + 0 + (none) + ) + +(defmethod explode-sound ((this min-bomb-train)) + (set-setting! 'music #f 0.0 0) + (sound-play "train-explode") + 0 + (none) + ) + +(defstate idle (min-bomb-train) + :virtual #t + :trans (behavior () + (if (and (task-node-open? (game-task-node mine-blow-resolution)) + (not (logtest? (-> self path flags) (path-control-flag not-found))) + ) + (go-virtual active) + ) + (when (task-node-closed? (game-task-node mine-blow-resolution)) + (cleanup-for-death self) + (deactivate self) + ) + ) + :code sleep-code + :post ja-post + ) + +(defstate wait (min-bomb-train) + :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 + ) + :exit (behavior () + (let ((v1-1 (-> self root root-prim))) + (set! (-> v1-1 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-1 prim-core collide-with) (-> self root backup-collide-with)) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + ) + :trans (behavior () + (if (or (task-open? (the-as string ((method-of-type res-lump get-property-struct) + (-> self entity) + 'task-name + 'interp + -1000000000.0 + "mine-blow-resolution" + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (task-node-open? (game-task-node mine-blow-resolution)) + ) + (go-virtual idle) + ) + ) + :code sleep-code + :post ja-post + ) + +(defstate active (min-bomb-train) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch 'attack) + (let ((s4-0 (the-as object (-> block param 0))) + (s3-0 (if (= message 'attack) + (-> block param 1) + #f + ) + ) + (s2-0 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1)) + ) + (when (the-as touching-shapes-entry s4-0) + (let ((s1-0 (-> (the-as touching-shapes-entry s4-0) head))) + (while s1-0 + (when (= (get-touched-prim s1-0 (-> self root) (the-as touching-shapes-entry s4-0)) s2-0) + (let ((s4-1 (if (type? proc process-focusable) + (the-as process-focusable proc) + ) + ) + ) + (when (and s4-1 + (= (-> s4-1 type) target) + (or (not (the-as uint s3-0)) + (not (logtest? (penetrate dark-bomb dark-smack) (-> (the-as attack-info s3-0) penetrate-using))) + ) + ) + (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 + (send-event + s4-1 + 'attack-invinc + (the-as touching-shapes-entry (-> block param 0)) + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (-> self attack-id)) + (damage 1000.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'smush) + (vector (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (angle 'back) + ) + ) + ) + ) + ) + (return #f) + ) + (set! s1-0 (-> s1-0 next)) + ) + ) + #f + ) + ) + ) + (('rail-down) + (when (>= (-> self actor-group-count) 3) + (dotimes (s5-2 (-> self actor-group 3 length)) + (let ((s4-2 (-> self actor-group 3 data s5-2 actor))) + (cond + ((and s4-2 (not (logtest? (-> s4-2 extra perm status) (entity-perm-status subtask-complete)))) + (let* ((s4-3 (handle->process (-> self taskman))) + (v1-42 (if (type? s4-3 task-manager) + s4-3 + ) + ) + ) + (when v1-42 + (set! (-> self current-rail) (the-as uint s5-2)) + (let ((f0-3 (-> *min-bomb-train-times* s5-2))) + (if (< 0.0 (-> self suck-level)) + (set! f0-3 (* f0-3 (/ 1.0 (-> self suck-level)))) + ) + (set! (-> (the-as task-manager v1-42) time-limit) (the-as time-frame (the int (* 300.0 f0-3)))) + ) + (return #t) + ) + ) + ) + ((= s4-2 (-> proc entity)) + (when (and (nonzero? (-> self minimap s5-2)) *minimap*) + (kill-callback (-> *minimap* engine) (-> self minimap s5-2)) + (set! (-> self minimap s5-2) + (add-icon! *minimap* self (the-as uint 155) (the-as int #f) (-> s4-2 extra trans) 0) + ) + ) + ) + ) + ) + ) + #f + ) + ) + (('go-explode) + (go-virtual explode) + ) + (('go-explode-doors) + (go-virtual explode-doors) + ) + ) + ) + :enter (behavior () + (set-setting! 'music 'mineblow 0.0 0) + (when (not (handle->process (-> self taskman))) + (let ((v1-8 (-> *game-info* sub-task-list (game-task-node mine-blow-resolution)))) + (set! (-> self taskman) (if (-> v1-8 manager) + (-> v1-8 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (let ((v1-13 (-> *game-info* sub-task-list (game-task-node mine-blow-resolution)))) + (if (and v1-13 (< (the-as uint 2) (-> v1-13 death-count))) + (set! (-> self suck-level) + (- 1.0 (* 0.04 (the float (max 0 (min 5 (the-as int (+ (-> v1-13 death-count) -2))))))) + ) + ) + ) + (add-icon! *minimap* self (the-as uint 129) (the-as int #f) (the-as vector #t) 0) + 0 + ) + :trans (behavior () + (if (not (task-node-open? (game-task-node mine-blow-resolution))) + (go-virtual idle) + ) + (set! (-> self path-pos) (get-path-progress self (-> self path-pos) (* (-> self speed) (seconds-per-frame)))) + (spawn-from-cspace (-> self spark-part) (joint-node min-bomb-train-lod0-jg sparks)) + (spawn-from-cspace (-> self smoke-part) (joint-node min-bomb-train-lod0-jg sparks1)) + (spawn-from-cspace (-> self spark-part) (joint-node min-bomb-train-lod0-jg sparks2)) + (spawn-from-cspace (-> self smoke-part) (joint-node min-bomb-train-lod0-jg sparks3)) + (spawn-from-cspace (-> self spark-part) (joint-node min-bomb-train-lod0-jg sparks4)) + (spawn-from-cspace (-> self light-part) (joint-node min-bomb-train-lod0-jg light)) + (spawn-from-cspace (-> self light-part) (joint-node min-bomb-train-lod0-jg light1)) + (spawn-from-cspace (-> self light-part) (joint-node min-bomb-train-lod0-jg light2)) + (spawn-from-cspace (-> self light-part) (joint-node min-bomb-train-lod0-jg light3)) + (if (nonzero? (-> self sound-loop-id)) + (sound-play-by-name + (static-sound-name "bomb-train") + (-> self sound-loop-id) + 1024 + (the int (* 1524.0 (lerp-scale -0.25 0.0 (-> self speed) 28672.0 57344.0))) + 0 + (sound-group) + #t + ) + ) + (let ((f1-1 (* 28672.0 ((method-of-type res-lump get-property-value-float) + (-> self entity) + 'speed + 'interp + (-> self path-pos) + 1.0 + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (f0-10 1.0) + ) + (when (< 0.0 (-> self suck-level)) + (set! f0-10 (-> self suck-level)) + (set! f1-1 (* f1-1 f0-10)) + ) + (let ((f0-14 (seek (-> self speed) f1-1 (* 7168.0 (seconds-per-frame) (* f0-10 f0-10))))) + (set! (-> self speed) f0-14) + (set! (-> self speed) f0-14) + ) + ) + 0 + (update-task-manager self) + ) + :code (behavior () + (local-vars (v1-8 process)) + (let* ((s5-0 (handle->process (-> self taskman))) + (gp-0 (if (type? s5-0 task-manager) + (the-as task-manager s5-0) + ) + ) + ) + (when gp-0 + (logior! (-> gp-0 info mask) (task-manager-mask time-limit)) + (until v1-8 + (suspend) + (set! v1-8 (handle->process (-> gp-0 hud-timer))) + ) + (let ((f0-0 (-> *min-bomb-train-times* 0))) + (if (< 0.0 (-> self suck-level)) + (set! f0-0 (* f0-0 (/ 1.0 (-> self suck-level)))) + ) + (set! (-> gp-0 time-limit) (the-as time-frame (the int (* 300.0 f0-0)))) + ) + ) + ) + (sleep-code) + ) + :post transform-post + ) + +(defstate die (min-bomb-train) + :virtual #t + :code (behavior () + (cleanup-for-death self) + (send-event (handle->process (-> self taskman)) 'fail) + ) + ) + +(defstate fall (min-bomb-train) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('go-explode) + (go-virtual explode) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self root transv quad) (the-as uint128 0)) + (if (nonzero? (-> self sound-loop-id)) + (sound-stop (-> self sound-loop-id)) + ) + (set! (-> self fall-travel-time) (/ 2764800.0 (-> self speed))) + ) + :trans (behavior () + (cond + ((not (time-elapsed? (-> self state-time) (the int (-> self fall-travel-time)))) + (set! (-> self path-pos) + (path-control-method-26 (-> self path) (-> self path-pos) (* (-> self speed) (seconds-per-frame))) + ) + (get-point-at-percent-along-path! (-> self path) (-> self root trans) (-> self path-pos) 'interp) + ) + (else + (let ((gp-0 (displacement-between-points-at-percent-normalized! + (-> self path) + (new 'stack-no-clear 'vector) + (-> self path-pos) + ) + ) + ) + (vector-normalize! gp-0 (-> self speed)) + (set! (-> self root transv y) (- (-> self root transv y) (* 3.3333333 (seconds-per-frame) (-> self speed)))) + (+! (-> gp-0 y) (-> self root transv y)) + (vector+float*! (-> self root trans) (-> self root trans) gp-0 (seconds-per-frame)) + ) + ) + ) + (let ((a1-6 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (gp-1 (new 'stack-no-clear 'quaternion)) + ) + (quaternion-vector-angle! gp-1 a1-6 (* 0.26666668 (seconds-per-frame) (-> self speed))) + (quaternion*! (-> self root quat) gp-1 (-> self root quat)) + ) + (quaternion-normalize! (-> self root quat)) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (when (type? (-> self root) collide-shape) + (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)) + (transform-post) + (spawn-debris self) + (explode-sound self) + (cond + ((logtest? (-> *part-group-id-table* 604 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* 604)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 604)) + ) + ) + (activate! *camera-smush-control* 819.2 36 210 0.5 1.0 (-> self clock)) + (activate! *camera-smush-control-horizontal* 3276.8 24 210 0.5 1.0 (-> self clock)) + (while (-> self child) + (suspend) + ) + (go-virtual die) + ) + :post transform-post + ) + +(defstate explode (min-bomb-train) + :virtual #t + :enter (behavior () + (set-setting! 'allow-progress #f 0.0 0) + (if (nonzero? (-> self sound-loop-id)) + (sound-stop (-> self sound-loop-id)) + ) + ) + :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) + (spawn-debris self) + (explode-sound self) + (cond + ((logtest? (-> *part-group-id-table* 604 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* 604)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 604)) + ) + ) + (activate! *camera-smush-control* 819.2 36 210 0.5 1.0 (-> self clock)) + (activate! *camera-smush-control-horizontal* 3276.8 24 210 0.5 1.0 (-> self clock)) + (while (-> self child) + (suspend) + ) + (go-virtual die) + ) + ) + +(defstate explode-doors (min-bomb-train) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('doors-exploded) + (let ((v0-0 #t)) + (set! (-> self doors-exploded?) v0-0) + v0-0 + ) + ) + ) + ) + :exit (behavior () + (if (nonzero? (-> self sound-loop-id)) + (sound-stop (-> self sound-loop-id)) + ) + ) + :trans (behavior () + (if (nonzero? (-> self sound-loop-id)) + (sound-play "bomb-train" :id (-> self sound-loop-id)) + ) + ) + :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) + (get-point-at-percent-along-path! (-> self path) (-> self root trans) 1.0 'interp) + (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) 'complete) + (let ((t9-3 send-event-function) + (v1-14 (-> *game-info* sub-task-list (game-task-node mine-blow-resolution))) + ) + (t9-3 + (handle->process (if (-> v1-14 manager) + (-> v1-14 manager manager) + (the-as handle #f) + ) + ) + a1-2 + ) + ) + ) + (until (-> self doors-exploded?) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; WARN: Return type mismatch process-focusable vs min-bomb-train. +(defmethod relocate ((this min-bomb-train) (offset int)) + (if (nonzero? (-> this minimap)) + (&+! (-> this minimap) offset) + ) + (if (nonzero? (-> this spark-part)) + (&+! (-> this spark-part) offset) + ) + (if (nonzero? (-> this smoke-part)) + (&+! (-> this smoke-part) offset) + ) + (if (nonzero? (-> this light-part)) + (&+! (-> this light-part) offset) + ) + (the-as min-bomb-train ((method-of-type process-focusable relocate) this offset)) + ) + +(defmethod alloc-path! ((this min-bomb-train)) + (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)) + (not (logtest? (-> this path flags) (path-control-flag not-found))) + ) + +;; WARN: Return type mismatch int vs object. +(defmethod update-task-manager ((this min-bomb-train)) + (if (or (< (-> this actor-group-count) 3) (not (handle->process (-> this taskman)))) + (return (the-as object 0)) + ) + (let ((s4-0 0) + (s5-0 #t) + ) + (let ((v1-10 (-> this actor-group 3 data (-> this current-rail) actor))) + (when v1-10 + (dotimes (a0-9 2) + (let ((f28-0 (if (zero? a0-9) + 94208.0 + 40960.0 + ) + ) + (s3-0 (if (zero? a0-9) + (method-of-object this fall) + (method-of-object this explode) + ) + ) + ) + (dotimes (a1-4 (-> this actor-group a0-9 length)) + (let ((a2-4 (-> this actor-group a0-9 data a1-4 actor))) + (when (and a2-4 (= v1-10 a2-4) (not (logtest? (-> a2-4 extra perm status) (entity-perm-status subtask-complete)))) + (set! s5-0 #f) + 0.0 + (let* ((s2-0 (-> a2-4 extra trans)) + (f1-0 (path-control-method-23 (-> this path) s2-0)) + (f30-0 (* (-> this path-length) (- f1-0 (-> this path-pos)))) + ) + (when (and (< f30-0 f28-0) (< (vector-vector-distance (-> this root trans) s2-0) f28-0)) + (let ((v1-19 (handle->process (-> this taskman)))) + (when (and v1-19 (handle->process (-> (the-as task-manager v1-19) hud-timer))) + (logclear! (-> (the-as task-manager v1-19) info mask) (task-manager-mask time-limit)) + (send-event (handle->process (-> (the-as task-manager v1-19) hud-timer)) 'hide-and-die) + ) + ) + (go s3-0) + ) + (cond + ((and (< s4-0 3) (< f30-0 163840.0)) + (set! s4-0 3) + ) + ((and (< s4-0 2) (< f30-0 286720.0)) + (set! s4-0 2) + ) + ((and (< s4-0 1) (< f30-0 409600.0)) + (set! s4-0 1) + ) + ) + ) + #t + (goto cfg-81) + ) + ) + ) + ) + ) + ) + ) + (label cfg-81) + (let ((v1-42 (handle->process (-> this taskman)))) + (if (and v1-42 (handle->process (-> (the-as task-manager v1-42) hud-timer))) + (send-event (handle->process (-> (the-as task-manager v1-42) hud-timer)) 'alert s4-0) + ) + ) + (let ((a0-48 (-> this actor-group 2 data 0 actor))) + (if (and a0-48 s5-0 (logtest? (-> a0-48 extra perm status) (entity-perm-status subtask-complete))) + (go (method-of-object this explode-doors)) + ) + ) + ) + 0 + ) + +(defmethod get-path-progress ((this min-bomb-train) (arg0 float) (arg1 float)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (when (nonzero? (-> this path)) + (/ 28672.0 (-> this path-length)) + 0.0 + 0.0 + (let ((f30-0 (path-control-method-26 (-> this path) arg0 arg1))) + (let ((f28-0 (path-control-method-26 (-> this path) arg0 -28672.0)) + (f26-0 (path-control-method-26 (-> this path) arg0 28672.0)) + (s5-1 (get-point-at-percent-along-path! (-> this path) (new 'stack-no-clear 'vector) f30-0 'interp)) + ) + (let ((s4-0 (get-point-at-percent-along-path! (-> this path) (new 'stack-no-clear 'vector) f28-0 'interp)) + (a2-6 (get-point-at-percent-along-path! (-> this path) (new 'stack-no-clear 'vector) f26-0 'interp)) + (v1-11 (new 'stack-no-clear 'vector)) + (a1-7 (new 'stack-no-clear 'matrix)) + ) + (let ((a0-7 (new 'stack-no-clear 'vector))) + (set! (-> a0-7 quad) (-> *up-vector* quad)) + (vector-! v1-11 a2-6 s4-0) + (let ((a2-7 v1-11)) + (let ((f0-4 1.0)) + (.lvf vf1 (&-> a2-7 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a3-8 f0-4)) + (.mov vf3 a3-8) + ) + ) + (.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-7 quad) vf1) + ) + (let ((a2-8 a1-7)) + (set! (-> a2-8 fvec quad) (-> v1-11 quad)) + (set! (-> a2-8 uvec quad) (-> a0-7 quad)) + (vector-cross! (-> a2-8 rvec) (-> a2-8 uvec) v1-11) + ) + ) + (matrix->quaternion (-> this root quat) a1-7) + ) + (set! (-> this root trans quad) (-> s5-1 quad)) + ) + f30-0 + ) + ) + ) + ) + +(defun min-bomb-train-callback ((arg0 cspace) (arg1 transformq)) + (let ((v1-0 (the-as min-bomb-train (-> arg0 param1)))) + (when (and (-> v1-0 next-state) (= (-> v1-0 next-state name) 'active)) + (set! (-> v1-0 wheel-angle) + (the float + (sar (shl (the int (+ (-> v1-0 wheel-angle) (* -8.439792 (seconds-per-frame) (-> v1-0 speed)))) 48) 48) + ) + ) + (quaternion-rotate-local-x! (-> arg1 quat) (-> arg1 quat) (-> v1-0 wheel-angle)) + ) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + 0 + (none) + ) + +(defmethod deactivate ((this min-bomb-train)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this sound-loop-id)) + (sound-stop (-> this sound-loop-id)) + ) + (if (nonzero? (-> this spark-part)) + (kill-particles (-> this spark-part)) + ) + (if (nonzero? (-> this smoke-part)) + (kill-particles (-> this smoke-part)) + ) + (if (nonzero? (-> this light-part)) + (kill-particles (-> this light-part)) + ) + ((method-of-type process-focusable deactivate) this) + (none) + ) + +(defmethod run-logic? ((this min-bomb-train)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +(defmethod init-from-entity! ((this min-bomb-train) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (when (task-node-closed? (game-task-node mine-blow-resolution)) + (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-min-bomb-train" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (if (not (alloc-path! this)) + (go (method-of-object this idle)) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((a0-9 (-> this skel root-channel 0))) + (set! (-> a0-9 frame-group) (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + (set! (-> a0-9 param 0) 1.0) + (set! (-> a0-9 frame-num) 0.0) + (joint-control-channel-group! + a0-9 + (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + num-func-loop! + ) + ) + (ja-post) + (let ((a0-10 (-> this node-list data 13))) + (set! (-> a0-10 param0) min-bomb-train-callback) + (set! (-> a0-10 param1) this) + (set! (-> a0-10 param2) (the-as basic 0)) + ) + (let ((a0-11 (-> this node-list data 14))) + (set! (-> a0-11 param0) min-bomb-train-callback) + (set! (-> a0-11 param1) this) + (set! (-> a0-11 param2) (the-as basic 0)) + ) + (let ((a0-12 (-> this node-list data 15))) + (set! (-> a0-12 param0) min-bomb-train-callback) + (set! (-> a0-12 param1) this) + (set! (-> a0-12 param2) (the-as basic 0)) + ) + (let ((a0-13 (-> this node-list data 16))) + (set! (-> a0-13 param0) min-bomb-train-callback) + (set! (-> a0-13 param1) this) + (set! (-> a0-13 param2) (the-as basic 0)) + ) + (set! (-> this speed) 0.0) + (if (nonzero? (-> this path)) + (set! (-> this path-length) (total-distance (-> this path))) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-44 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-44 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-44)) + (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count))) + (when (>= (-> this actor-group-count) 3) + (let ((s5-1 (-> this actor-group 3 length))) + (set! (-> this minimap) (new 'process 'boxed-array connection-minimap s5-1)) + (dotimes (s4-1 s5-1) + (let ((v1-57 (-> this actor-group 3 data s4-1 actor))) + (if v1-57 + (set! (-> this minimap s4-1) + (add-icon! *minimap* this (the-as uint 154) (the-as int #f) (-> v1-57 extra trans) 0) + ) + ) + ) + ) + ) + ) + ) + (else + (set! (-> this actor-group) (the-as (pointer actor-group) #f)) + (set! (-> this actor-group-count) 0) + 0 + ) + ) + ) + (set! (-> this sound-loop-id) (new-sound-id)) + (let* ((v1-64 *game-info*) + (a0-24 (+ (-> v1-64 attack-id) 1)) + ) + (set! (-> v1-64 attack-id) a0-24) + (set! (-> this attack-id) a0-24) + ) + (set! (-> this spark-part) (create-launch-control (-> *part-group-id-table* 605) this)) + (set! (-> this smoke-part) (create-launch-control (-> *part-group-id-table* 606) this)) + (set! (-> this light-part) (create-launch-control (-> *part-group-id-table* 607) this)) + (set! (-> this doors-exploded?) #f) + (set! (-> this taskman) (the-as handle #f)) + (when (not (task-open? (the-as string ((method-of-type res-lump get-property-struct) + (-> this entity) + 'task-name + 'interp + -1000000000.0 + "mine-blow-resolution" + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + ) + (logior! (-> this draw status) (draw-control-status no-draw)) + (go (method-of-object this wait)) + ) + (if (task-node-open? (game-task-node mine-explore-resolution)) + (go (method-of-object this idle)) + ) + (go (method-of-object this active)) + ) diff --git a/goal_src/jak3/levels/mine/mined-mood.gc b/goal_src/jak3/levels/mine/mined-mood.gc index 79b57a384a..8424237dbb 100644 --- a/goal_src/jak3/levels/mine/mined-mood.gc +++ b/goal_src/jak3/levels/mine/mined-mood.gc @@ -7,3 +7,72 @@ ;; DECOMP BEGINS +(deftype mined-states (structure) + ((filter vector 2 :inline) + (light light-sphere 2) + ) + ) + + +(defun set-mined-filter-light! ((arg0 string) (arg1 light-hash) (arg2 vector) (arg3 light-sphere)) + (cond + ((and arg3 (nonzero? arg3)) + (let ((v1-1 (-> arg3 color))) + (set! (-> v1-1 x) (-> arg2 x)) + (set! (-> v1-1 y) (-> arg2 y)) + (set! (-> v1-1 z) (-> arg2 z)) + ) + (set! (-> arg3 brightness) (-> arg2 w)) + arg3 + ) + (else + (lookup-light-sphere-by-name arg0 arg1) + ) + ) + ) + +(defun init-mood-mined ((arg0 mood-context)) + (let ((v1-0 (-> arg0 light-group 1))) + (set-vector! (-> v1-0 ambi color) 0.333 0.333 0.333 1.0) + (set! (-> v1-0 dir0 extra x) 0.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) + ) + ) + +(defbehavior update-mood-mined 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 + (let ((s5-0 (the-as mined-states (-> arg0 state)))) + (let ((s4-1 (-> *level* level arg2 bsp light-hash))) + (set! (-> s5-0 light 0) + (set-mined-filter-light! "light-3802" s4-1 (the-as vector (-> s5-0 filter)) (-> s5-0 light 0)) + ) + (set! (-> s5-0 light 1) (set-mined-filter-light! "light-3803" s4-1 (-> s5-0 filter 1) (-> s5-0 light 1))) + ) + (set! (-> arg0 times 0 w) 1.0) + (set! (-> arg0 times 1 quad) (-> s5-0 filter 0 quad)) + (set! (-> arg0 times 2 quad) (-> s5-0 filter 1 quad)) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch vector vs none. +(defun set-mined-filter! ((arg0 vector) (arg1 int)) + (let ((v1-1 (level-get *level* 'mined))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as mined-states v1-2) filter arg1 quad) (-> arg0 quad)) + ) + ) + ) + (none) + ) diff --git a/goal_src/jak3/levels/mine/mined-scenes.gc b/goal_src/jak3/levels/mine/mined-scenes.gc index 634b4f81b6..6c35854662 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/mined-texture.gc b/goal_src/jak3/levels/mine/mined-texture.gc index b3a335a0ec..12bc2a6014 100644 --- a/goal_src/jak3/levels/mine/mined-texture.gc +++ b/goal_src/jak3/levels/mine/mined-texture.gc @@ -7,3 +7,7 @@ ;; DECOMP BEGINS +;; stub +(defun set-mined-pillar-texture! ((arg0 float)) + (none) + ) \ No newline at end of file diff --git a/goal_src/jak3/levels/mine/minee-scenes.gc b/goal_src/jak3/levels/mine/minee-scenes.gc index 53d7fd8b5b..eb1d171a28 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/monster-frog.gc b/goal_src/jak3/levels/mine/monster-frog.gc index c692ac280c..2b2ec1ad70 100644 --- a/goal_src/jak3/levels/mine/monster-frog.gc +++ b/goal_src/jak3/levels/mine/monster-frog.gc @@ -7,3 +7,951 @@ ;; DECOMP BEGINS +(defskelgroup skel-monster-frog monster-frog monster-frog-lod0-jg monster-frog-idle0-ja + ((monster-frog-lod0-mg (meters 20)) (monster-frog-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :shadow monster-frog-shadow-mg + :origin-joint-index 12 + ) + +(deftype monster-frog (nav-enemy) + () + (:state-methods + (attack vector) + attack-recover + turn + ) + ) + + +(define *fact-info-monster-frog-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9) + ) + +(define *monster-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 8 + :hostile-anim 18 + :hit-anim 30 + :knocked-anim 30 + :knocked-land-anim 31 + :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 5 + :look-at-joint 5 + :bullseye-joint 4 + :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.25) + :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 #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 #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 16 + :turn-anim 16 + :run-anim 18 + :taunt-anim -1 + :run-travel-speed (meters 18) + :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! (-> *monster-frog-nav-enemy-info* fact-defaults) *fact-info-monster-frog-defaults*) + +;; WARN: new jak 2 until loop case, check carefully +(defbehavior monster-frog-hop-slow-code monster-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 monster-frog-idle0-ja))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (ja-no-eval :group! monster-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 monster-frog-idle1-ja))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (ja-no-eval :group! monster-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! monster-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! monster-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 + ) + +;; WARN: new jak 2 until loop case, check carefully +(defbehavior monster-frog-hop-fast-code monster-frog () + (until #f + (nav-enemy-method-177 self) + (ja-no-eval :group! monster-frog-hop-slow-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (nav-enemy-method-178 self) + (ja-no-eval :group! monster-frog-hop-slow-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + +(defstate ambush (monster-frog) + :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)) + ) + :code (behavior () + (update-focus self) + (let ((a0-2 (handle->process (-> self focus handle)))) + (when a0-2 + (let* ((gp-0 (-> self root)) + (s3-0 + (vector-normalize! + (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable a0-2) 0) (-> gp-0 trans)) + 1.0 + ) + ) + (f0-0 (deg-diff (quaternion-y-angle (-> gp-0 quat)) (vector-y-angle s3-0))) + ) + (quaternion-rotate-y! (-> gp-0 quat) (-> gp-0 quat) f0-0) + ) + ) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (ja-no-eval :group! monster-frog-popup0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((v1-37 (-> self root root-prim))) + (set! (-> v1-37 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-37 prim-core collide-with) (-> self root backup-collide-with)) + ) + (go-best-state self) + ) + :post nav-enemy-simple-post + ) + +(defstate notice (monster-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! monster-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! monster-frog-notice0-jump-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (let ((a0-7 (handle->process (-> self focus handle)))) + (if a0-7 + (seek-to-point-toward-point! + (-> self root) + (get-trans (the-as process-focusable a0-7) 0) + (* 98304.0 f30-0) + (seconds 0.02) + ) + ) + ) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (ja-no-eval :group! monster-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 (monster-frog) + :virtual #t + :code (behavior () + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (until #f + (nav-enemy-method-176 self) + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! monster-frog-hop-slow-start-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (nav-enemy-method-178 self) + (ja-no-eval :group! monster-frog-hop-slow-end-ja :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.6)) + (let ((v1-57 self)) + (set! (-> v1-57 enemy-flags) (the-as enemy-flag (logclear (-> v1-57 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-57 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-121 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-121 enemy-flags))) + (set! (-> v1-121 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-121 enemy-flags)))) + ) + (set! (-> v1-121 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-121 enemy-flags)))) + (set! (-> v1-121 nav callback-info) (-> v1-121 enemy-info callback-info)) + ) + 0 + (nav-enemy-method-176 self) + (ja-no-eval :num! (loop!)) + (ja-channel-push! 1 (seconds 0.6)) + (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 pacing (monster-frog) + :virtual #t + :code monster-frog-hop-slow-code + ) + +(defstate circling (monster-frog) + :virtual #t + :code monster-frog-hop-slow-code + ) + +(defstate stare (monster-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 + ) + ) + +(defstate hostile (monster-frog) + :virtual #t + :enter (behavior () + (logclear! (-> self enemy-flags) (enemy-flag alert)) + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-6 self)) + (set! (-> v1-6 enemy-flags) (the-as enemy-flag (logclear (-> v1-6 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + :trans (behavior () + (nav-enemy-method-171 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)) + (if (nav-enemy-method-174 self) + (go-stare2 self) + ) + (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) + ) + ) + ) + ) + :code (behavior () + (until #f + (let* ((gp-0 (handle->process (-> self focus handle))) + (a0-4 (if (type? gp-0 process-focusable) + (the-as process-focusable gp-0) + ) + ) + ) + (cond + (a0-4 + (let* ((s5-0 (get-trans a0-4 0)) + (a1-4 (vector-! (new 'stack-no-clear 'vector) s5-0 (-> self root trans))) + (f30-0 (vector-length a1-4)) + (gp-1 (-> self enemy-info)) + ) + (let ((a1-5 (vector-normalize-copy! (new 'stack-no-clear 'vector) a1-4 1.0))) + (if (not (enemy-method-103 self a1-5 6371.5557)) + (go-virtual turn) + ) + ) + (if (< f30-0 32768.0) + (go-virtual attack s5-0) + ) + (let* ((f28-0 (fmax 0.0 (fmin 1.0 (* 0.000034877234 (+ -32768.0 f30-0))))) + (f26-0 (lerp 0.5 1.0 f28-0)) + (f30-1 (lerp 0.0 1.0 f28-0)) + (f28-1 (lerp 1.4 1.0 f28-0)) + ) + (let ((v1-21 (-> self nav))) + (set! (-> v1-21 target-speed) (/ (* f26-0 (-> gp-1 run-travel-speed)) f28-1)) + ) + 0 + (let ((v1-23 (-> self nav))) + (set! (-> v1-23 acceleration) (-> gp-1 run-acceleration)) + ) + 0 + (let ((v1-25 (-> self nav))) + (set! (-> v1-25 turning-acceleration) (-> gp-1 run-turning-acceleration)) + ) + 0 + (ja-channel-push! 2 (seconds 0.01)) + (ja-no-eval :group! monster-frog-hop-small-start-ja :num! (seek! max f28-1) :frame-num 0.0) + (ja-no-eval :chan 1 + :group! monster-frog-hop-slow-start-ja + :num! (chan 0) + :frame-interp0 f30-1 + :frame-interp1 f30-1 + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f28-1)) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-1 :frame-interp1 f30-1) + ) + (nav-enemy-method-178 self) + (ja-no-eval :group! monster-frog-hop-small-end-ja :num! (seek! max f28-1) :frame-num 0.0) + (ja-no-eval :chan 1 + :group! monster-frog-hop-slow-end-ja + :num! (chan 0) + :frame-interp0 f30-1 + :frame-interp1 f30-1 + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f28-1)) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-1 :frame-interp1 f30-1) + ) + ) + ) + ) + (else + (suspend) + 0 + ) + ) + ) + ) + #f + ) + ) + +(defstate turn (monster-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! monster-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! monster-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)) + (when (logtest? (enemy-flag ef38) (-> a0-0 enemy-flags)) + (let ((a0-4 (handle->process (-> self focus handle)))) + (if a0-4 + (seek-to-point-toward-point! + (-> self root) + (get-trans (the-as process-focusable a0-4) 0) + 81920.0 + (seconds 0.02) + ) + ) + ) + ) + ) + (nav-enemy-simple-post) + ) + ) + +(defstate attack (monster-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! monster-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 (monster-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! monster-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 monster-frog-idle0-ja))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (ja-no-eval :group! monster-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 monster-frog-idle1-ja))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (ja-no-eval :group! monster-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 + ) + +(defmethod knocked-anim ((this monster-frog) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot)) + (ja-channel-push! 1 0) + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 26))) + (set! (-> a0-3 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 26)) 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 26)) num-func-seek!) + ) + #t + ) + (((knocked-type blue-shot)) + (ja-channel-push! 1 0) + (let ((a0-6 (-> this skel root-channel 0))) + (set! (-> a0-6 frame-group) (the-as art-joint-anim (-> this draw art-group data 22))) + (set! (-> a0-6 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 22)) frames num-frames) -1)) + ) + (set! (-> a0-6 param 1) (-> arg0 anim-speed)) + (set! (-> a0-6 frame-num) 0.0) + (joint-control-channel-group! a0-6 (the-as art-joint-anim (-> this draw art-group data 22)) num-func-seek!) + ) + #t + ) + (else + (cond + ((= (-> this incoming knocked-type) (knocked-type none)) + (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 30))) + (set! (-> a0-8 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 30)) 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 30)) num-func-seek!) + ) + ) + (else + (ja-channel-push! 1 0) + (let ((a0-10 (-> this skel root-channel 0))) + (set! (-> a0-10 frame-group) (the-as art-joint-anim (-> this draw art-group data 32))) + (set! (-> a0-10 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 32)) frames num-frames) -1)) + ) + (set! (-> a0-10 param 1) (-> arg0 anim-speed)) + (set! (-> a0-10 frame-num) 0.0) + (joint-control-channel-group! a0-10 (the-as art-joint-anim (-> this draw art-group data 32)) num-func-seek!) + ) + ) + ) + #t + ) + ) + ) + +(defmethod knocked-land-anim ((this monster-frog) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot)) + (ja-channel-push! 1 (seconds 0.17)) + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 27))) + (set! (-> a0-3 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 27)) 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 27)) num-func-seek!) + ) + #t + ) + (((knocked-type blue-shot)) + (ja-channel-push! 1 (seconds 0.17)) + (let ((a0-6 (-> this skel root-channel 0))) + (set! (-> a0-6 frame-group) (the-as art-joint-anim (-> this draw art-group data 23))) + (set! (-> a0-6 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 23)) frames num-frames) -1)) + ) + (set! (-> a0-6 param 1) (-> arg0 anim-speed)) + (set! (-> a0-6 frame-num) 0.0) + (joint-control-channel-group! a0-6 (the-as art-joint-anim (-> this draw art-group data 23)) num-func-seek!) + ) + #t + ) + (else + (cond + ((= (-> this incoming knocked-type) (knocked-type none)) + (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 31))) + (set! (-> a0-8 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 31)) 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 31)) num-func-seek!) + ) + ) + (else + (ja-channel-push! 1 0) + (let ((a0-10 (-> this skel root-channel 0))) + (set! (-> a0-10 frame-group) (the-as art-joint-anim (-> this draw art-group data 33))) + (set! (-> a0-10 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 33)) frames num-frames) -1)) + ) + (set! (-> a0-10 param 1) (-> arg0 anim-speed)) + (set! (-> a0-10 frame-num) 0.0) + (joint-control-channel-group! a0-10 (the-as art-joint-anim (-> this draw art-group data 33)) num-func-seek!) + ) + ) + ) + #t + ) + ) + ) + +(defmethod enemy-common-post ((this monster-frog)) + (water-control-method-10 (-> this water)) + ((method-of-type nav-enemy enemy-common-post) this) + (none) + ) + +(defmethod init-enemy-collision! ((this monster-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 4096.0 1638.4 3276.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 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) 5) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 2048.0 2662.4) + ) + (set! (-> s5-0 nav-radius) 4915.2) + (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) + ) + +(defmethod init-enemy! ((this monster-frog)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-monster-frog" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *monster-frog-nav-enemy-info*) + (set! (-> this water) (new 'process 'water-control this 5 0.0 8192.0 2048.0)) + (set! (-> this water flags) + (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)) + (set! (-> this water ripple-size) 12288.0) + (set! (-> this water wake-size) 6144.0) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/mine/prebot-extras.gc b/goal_src/jak3/levels/mine/prebot-extras.gc index d1b3a27788..c37d130ccf 100644 --- a/goal_src/jak3/levels/mine/prebot-extras.gc +++ b/goal_src/jak3/levels/mine/prebot-extras.gc @@ -7,3 +7,1299 @@ ;; DECOMP BEGINS +(deftype cav-break-bridge (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defstate idle (cav-break-bridge) + :virtual #t + :enter (behavior () + (transform-post) + ) + :code sleep-code + ) + +(defmethod init-from-entity! ((this cav-break-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 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) 4) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 49152.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) 3) + (set-vector! (-> v1-9 local-sphere) 21.7088 769.2288 5129.8306 14745.19) + ) + (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) 4) + (set-vector! (-> v1-11 local-sphere) -10593.075 -778.24 26691.584 37455.87) + ) + (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-cav-break-bridge" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (when (task-node-closed? (game-task-node mine-boss-introduction)) + (cleanup-for-death this) + (deactivate this) + ) + (go (method-of-object this idle)) + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this cav-railblocker)) + (the-as search-info-flag (if (-> this trackable) + 24 + 1 + ) + ) + ) + +;; WARN: Return type mismatch connection vs none. +(defmethod cav-railblocker-method-30 ((this cav-railblocker) (arg0 symbol)) + (when (>= (- (current-time) (-> this red-tip-change-time)) 0) + (set! (-> this alt-red-tip-on) (not (-> this alt-red-tip-on))) + (let* ((f30-0 37.5) + (v1-8 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-9 (the-as number (logior #x3f800000 v1-8))) + ) + (set! (-> this red-tip-change-time) + (the-as time-frame (+ (the int (* f30-0 (+ -1.0 (the-as float v1-9)))) 150 (current-time))) + ) + ) + (set! arg0 #t) + ) + (when arg0 + (remove-from-process *part-engine* this) + (if (-> this alt-red-tip-on) + (add-connection *part-engine* this 5 this 4490 (new 'static 'vector :w 819200.0)) + (add-connection *part-engine* this 6 this 4490 (new 'static 'vector :w 819200.0)) + ) + (add-connection *part-engine* this 7 this 4489 (new 'static 'vector :w 819200.0)) + ) + (none) + ) + +(defstate idle (cav-railblocker) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (when (or (not (-> self notify-on-die)) (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) 'railblocker-hittable?) + (set! (-> a1-1 param 0) (the-as uint #t)) + (let ((t9-0 send-event-function) + (v1-7 (-> self notify-on-die)) + ) + (t9-0 + (if v1-7 + (-> v1-7 extra process) + ) + a1-1 + ) + ) + ) + ) + (let ((f0-0 1.0) + (v1-11 (the-as attack-info (-> block param 1))) + ) + (when (and (or (not (logtest? (-> v1-11 mask) (attack-mask id))) (!= (-> self incoming-attack-id) (-> v1-11 id))) + (!= (-> self hit-points) 0.0) + ) + (if (logtest? (-> v1-11 mask) (attack-mask id)) + (set! (-> self incoming-attack-id) (-> v1-11 id)) + ) + (if (logtest? (attack-mask damage) (-> v1-11 mask)) + (set! f0-0 (-> v1-11 damage)) + ) + (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))) + (cond + ((= (-> self hit-points) 0.0) + (go-virtual fall) + ) + ((< (-> self hit-points) 5.0) + (setup-masks (-> self draw) 8 22) + ) + ((< (-> self hit-points) 10.0) + (setup-masks (-> self draw) 6 24) + ) + (else + (setup-masks (-> self draw) 0 12) + ) + ) + ) + ) + ) + #t + ) + ) + ) + :enter (behavior () + (transform-post) + (cav-railblocker-method-30 self #t) + ) + :trans (behavior () + (set! (-> self trackable) + (the-as symbol (or (not (-> self notify-on-die)) (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) 'railblocker-hittable?) + (set! (-> a1-0 param 0) (the-as uint #f)) + (let ((t9-0 send-event-function) + (v1-5 (-> self notify-on-die)) + ) + (t9-0 + (if v1-5 + (-> v1-5 extra process) + ) + a1-0 + ) + ) + ) + ) + ) + ) + (cav-railblocker-method-30 self #f) + ) + :code sleep-code + ) + +(defstate fall (cav-railblocker) + :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-cav-railblocker-explode" (the-as (pointer level) #f)) + 5 + gp-0 + *cav-railblocker-exploder-params* + :name "joint-exploder" + :to self + :unk 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* 218)) + (set! (-> gp-1 collide-with) (collide-spec)) + (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 (the-as process-drawable *default-pool*)) + ) + (set-time! (-> self state-time)) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let ((v1-22 (-> self root root-prim))) + (set! (-> v1-22 prim-core collide-as) (collide-spec)) + (set! (-> v1-22 prim-core collide-with) (collide-spec)) + ) + 0 + ) + :trans (behavior () + (when (+ (current-time) -1) + (ja-channel-set! 0) + (ja-post) + ) + (let ((gp-0 (res-lump-value (-> self entity) 'animation-select uint128 :time -1000000000.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) 'blocker-died) + (set! (-> a1-1 param 0) (the-as uint gp-0)) + (let ((t9-3 send-event-function) + (v1-9 (-> self notify-on-die)) + ) + (t9-3 + (if v1-9 + (-> v1-9 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) 'blocker-died) + (set! (-> a1-2 param 0) (the-as uint gp-0)) + (let ((t9-4 send-event-function) + (v1-15 (-> self notify-on-die-2)) + ) + (t9-4 + (if v1-15 + (-> v1-15 extra process) + ) + a1-2 + ) + ) + ) + ) + (when (time-elapsed? (-> self state-time) (seconds 1)) + (cleanup-for-death self) + (deactivate self) + ) + ) + :code sleep-code + ) + +(defmethod init-from-entity! ((this cav-railblocker) (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-vector! (-> v1-2 local-sphere) 0.0 8192.0 0.0 12288.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-cav-railblocker" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this root pause-adjust-distance) 409600.0) + (set! (-> this draw light-index) (the-as uint 10)) + (set! (-> this incoming-attack-id) (the-as uint 0)) + (set! (-> this hit-points) 10.0) + (set! (-> this trackable) #t) + (set! (-> this notify-on-die) #f) + (set! (-> this notify-on-die-2) #f) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-17 (res-lump-data arg0 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))) + (when (and v1-17 (nonzero? (-> sv-16 elt-count))) + (let ((v1-18 (-> v1-17 0))) + (if (> (-> v1-18 length) 0) + (set! (-> this notify-on-die) (-> v1-18 data 0 actor)) + ) + (if (< 1 (-> v1-18 length)) + (set! (-> this notify-on-die-2) (-> v1-18 data 1 actor)) + ) + ) + ) + ) + (set! (-> this red-tip-change-time) 0) + (set! (-> this alt-red-tip-on) #f) + (setup-masks (-> this draw) 0 12) + (when (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (cleanup-for-death this) + (deactivate this) + ) + (go (method-of-object this idle)) + ) + +(defstate idle (cav-minecar) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('blocker-died) + (cleanup-for-death self) + (deactivate self) + ) + ) + ) + :enter (behavior () + (transform-post) + ) + :code sleep-code + ) + +(defmethod init-from-entity! ((this cav-minecar) (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 bot player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set-vector! (-> v1-2 local-sphere) 0.0 8192.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! (-> 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-cav-minecar" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this draw light-index) (the-as uint 10)) + (when (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (cleanup-for-death this) + (deactivate this) + ) + (go (method-of-object this idle)) + ) + +(defstate idle (prebot-sword) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-1 object)) + (case message + (('touch 'bonk 'attack) + (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) 'attack) + (set! (-> a1-3 param 0) (the-as uint #f)) + (set! (-> a1-3 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)) + ) + ) + ) + ) + (if (and (send-event-function proc a1-3) (= proc *target*)) + (sound-play "sword-hit-jak" :position (-> (the-as process-drawable proc) root trans)) + ) + ) + ) + (('scale) + (set! (-> self blade-scale target) (the-as float (-> block param 0))) + ) + (('use-pos-pitch) + (set! v0-1 (-> block param 0)) + (set! (-> self use-pos-pitch) (the-as symbol v0-1)) + v0-1 + ) + (('whoosh-lead) + (set! (-> self whoosh-lead) (the-as float (-> block param 0))) + (set! v0-1 #t) + (set! (-> self allow-whoosh) (the-as symbol v0-1)) + v0-1 + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (local-vars (at-0 int)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (clone-anim-once (ppointer->handle (-> self parent)) #t (-> self prefix)) + (update! (-> self blade-scale) 0.0) + (set-vector! (-> self blade-jm scale) 1.0 (-> self blade-scale value) 1.0 1.0) + (let ((gp-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node prebot-sword-lod0-jg blade))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + 0.0 + (vector-float*! gp-0 gp-0 0.5) + (vector+float*! + gp-0 + gp-0 + (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node prebot-sword-lod0-jg tip)) + 0.5 + ) + (vector-! s5-0 gp-0 (-> self prev-position)) + (set! (-> self prev-position quad) (-> gp-0 quad)) + (let ((v1-13 s5-0)) + (.lvf vf1 (&-> s5-0 quad)) + (let ((f0-7 (-> self clock frames-per-second))) + (.mov at-0 f0-7) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> v1-13 quad) vf1) + ) + (let ((f30-1 (fabs (- (-> gp-0 x) (-> (target-pos 0) x))))) + (when (time-elapsed? (-> self state-time) (seconds 0.05)) + (set! (-> self sword-sound-playing) #t) + (let* ((s2-0 (new 'stack-no-clear 'vector)) + (v1-19 gp-0) + (a0-19 (-> self parent)) + (s2-1 (vector-! s2-0 v1-19 (-> (the-as prebot (if a0-19 + (the-as prebot (-> a0-19 0 self)) + ) + ) + entity + extra + trans + ) + ) + ) + (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 0 :volume 0.0 :mask (pitch reg0)) + (static-sound-spec "boss-sword" :group 0 :volume 0.0 :mask (pitch reg0)) + ) + ) + ) + 1.0 + (let ((f26-0 (lerp-scale + 0.0 + 1.0 + f30-1 + (if (< f30-1 (-> self old-target-dist)) + 40960.0 + 20480.0 + ) + 0.0 + ) + ) + ) + (let ((f0-13 (* 0.002 f28-0))) + (fmin 0.1 f0-13) + ) + (let ((f28-4 (+ 0.0 + (lerp-scale 0.0 0.1 (-> s2-1 y) 20480.0 122880.0) + (lerp-scale 0.0 0.1 (-> s5-0 y) 204800.0 1024000.0) + (lerp-scale 0.0 -0.2 (-> s5-0 y) -204800.0 -1024000.0) + ) + ) + ) + (when (-> self use-pos-pitch) + (+! f28-4 (* 0.2 f26-0)) + (when (and (-> self allow-whoosh) (< (fabs (-> s3-2 x)) (-> self whoosh-lead))) + (set! (-> self allow-whoosh) #f) + (sound-play "sword-whoosh-by" :position gp-0) + ) + ) + (seek! (-> self current-volume) (lerp-scale 1.0 1.5 (vector-length s5-0) 204800.0 1024000.0) 0.02) + (set! (-> s4-3 volume) (the int (* 1024.0 (-> self current-volume)))) + (set! (-> s4-3 pitch-mod) (the int (* 1524.0 f28-4))) + ) + ) + (sound-play-by-spec s4-3 (-> self sword-sound) gp-0) + ) + ) + (set! (-> self old-target-dist) f30-1) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + ) + ) + +(defmethod relocate ((this prebot-sword) (offset int)) + (if (nonzero? (-> this blade-jm)) + (&+! (-> this blade-jm) offset) + ) + (call-parent-method this offset) + ) + +(defmethod deactivate ((this prebot-sword)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (-> this sword-sound-playing) + (sound-stop (-> this sword-sound)) + ) + ((method-of-type process-focusable deactivate) (the-as process-focusable this)) + (none) + ) + +(deftype prebot-shockwave-joint-position (structure) + ((joint-index int8) + (position vector :inline) + ) + ) + + +(defstate idle (prebot-shockwave) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch 'bonk) + (if (= proc *target*) + (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)) + ) + ) + ) + ) + ) + ) + ) + :trans (behavior () + (ja :num! (seek!)) + (if (ja-done? 0) + (deactivate self) + ) + (let ((gp-0 (new 'stack-no-clear 'collide-query)) + (s4-0 (new 'stack-no-clear 'bounding-box)) + (s5-0 + (new 'static 'boxed-array :type prebot-shockwave-joint-position + (new 'static 'prebot-shockwave-joint-position :joint-index 33) + (new 'static 'prebot-shockwave-joint-position :joint-index 15) + (new 'static 'prebot-shockwave-joint-position :joint-index 29) + (new 'static 'prebot-shockwave-joint-position :joint-index 13) + (new 'static 'prebot-shockwave-joint-position :joint-index 27) + (new 'static 'prebot-shockwave-joint-position :joint-index 11) + (new 'static 'prebot-shockwave-joint-position :joint-index 25) + (new 'static 'prebot-shockwave-joint-position :joint-index 19) + (new 'static 'prebot-shockwave-joint-position :joint-index 31) + (new 'static 'prebot-shockwave-joint-position :joint-index 17) + (new 'static 'prebot-shockwave-joint-position :joint-index 36) + ) + ) + ) + (vector<-cspace! (-> s4-0 min) (-> self node-list data (-> s5-0 (+ (-> s5-0 length) -1) joint-index))) + (set! (-> s4-0 max quad) (-> s4-0 min quad)) + (set! (-> s5-0 (+ (-> s5-0 length) -1) position quad) (-> s4-0 min quad)) + (dotimes (s3-0 (+ (-> s5-0 length) -1)) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (vector<-cspace! (-> s5-0 s3-0 position) (-> self node-list data (-> s5-0 s3-0 joint-index))) + (vector+! s2-0 (-> s5-0 s3-0 position) (new 'static 'vector :x 2048.0 :y 2048.0 :z 2048.0)) + (set! (-> s4-0 max x) (fmax (-> s2-0 x) (-> s4-0 max x))) + (set! (-> s4-0 max y) (fmax (-> s2-0 y) (-> s4-0 max y))) + (set! (-> s4-0 max z) (fmax (-> s2-0 z) (-> s4-0 max z))) + (vector-! s2-0 (-> s5-0 s3-0 position) (new 'static 'vector :x 2048.0 :y 2048.0 :z 2048.0)) + (set! (-> s4-0 min x) (fmin (-> s2-0 x) (-> s4-0 min x))) + (set! (-> s4-0 min y) (fmin (-> s2-0 y) (-> s4-0 min y))) + (set! (-> s4-0 min z) (fmin (-> s2-0 z) (-> s4-0 min z))) + ) + ) + (set! (-> gp-0 collide-with) (collide-spec jak player-list)) + (set! (-> gp-0 ignore-process0) #f) + (set! (-> gp-0 ignore-process1) #f) + (set! (-> gp-0 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> gp-0 action-mask) (collide-action solid)) + (mem-copy! (the-as pointer (-> gp-0 bbox)) (the-as pointer s4-0) 32) + (fill-using-bounding-box *collide-cache* gp-0) + (dotimes (s4-1 (+ (-> s5-0 length) -1)) + (set! (-> gp-0 start-pos quad) (-> s5-0 s4-1 position quad)) + (vector-! (-> gp-0 move-dist) (-> s5-0 (+ s4-1 1) position) (-> gp-0 start-pos)) + (let ((v1-52 gp-0)) + (set! (-> v1-52 radius) 2048.0) + (set! (-> v1-52 collide-with) (collide-spec jak player-list)) + (set! (-> v1-52 ignore-process0) #f) + (set! (-> v1-52 ignore-process1) #f) + (set! (-> v1-52 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-52 action-mask) (collide-action solid)) + ) + (if (>= (probe-using-line-sphere *collide-cache* gp-0) 0.0) + (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)) + ) + ) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + ) + ) + +(deftype prebot-gun-shot (projectile) + ((whoosh-sound uint32) + ) + ) + + +(defmethod projectile-method-40 ((this prebot-gun-shot)) + 256 + ) + +(defmethod setup-collision! ((this prebot-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-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 prebot-gun-shot)) + (set! (-> this attack-mode) 'eco-dark) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1335) this)) + (set! (-> this sound-id) (new-sound-id)) + ((method-of-type projectile init-proj-settings!) this) + 0 + (none) + ) + +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this prebot-gun-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "launch-bomb" :position (-> this root trans)) + (set! (-> this whoosh-sound) (the-as uint (sound-play "bomb-whoosh" :position (-> this root trans)))) + ) + ((= v1-0 (projectile-options po0)) + (sound-stop (the-as sound-id (-> this whoosh-sound))) + (sound-play "bomb-explode" :position (-> this root trans)) + ) + ((= 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 0 :volume 0.0 :mask (pitch reg0))) + ) + (set! (-> a0-16 volume) 1024) + (set! (-> a0-16 pitch-mod) (the int (* 1524.0 f0-0))) + (sound-play-by-spec a0-16 (-> this sound-id) (-> this root trans)) + ) + ) + ) + ) + (none) + ) + +(defstate moving (prebot-gun-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 (prebot-gun-shot) + :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 + (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) 8192.0) + (set! (-> gp-0 scale) 1.0) + (set! (-> gp-0 group) (-> *part-group-id-table* 1343)) + (set! (-> gp-0 collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher shield) + ) + (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 (ppointer->process (-> self parent))) + ) + (send-event (ppointer->process (-> self parent)) 'shot-hit (-> self root trans)) + (let ((gp-1 (current-time))) + (while (or (-> self child) (not (time-elapsed? gp-1 (seconds 10)))) + (suspend) + ) + ) + (deactivate self) + ) + ) + +(defstate idle (prebot-gun) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('fire) + (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 pos quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node prebot-gun-lod0-jg gunTip)) quad) + ) + (set! (-> gp-0 vel quad) (-> (vector-normalize-copy! + (new 'stack-no-clear 'vector) + (-> self node-list data 7 bone transform uvec) + (* 4096.0 (-> self clock frames-per-second)) + ) + 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-18 *game-info*) + (a0-10 (+ (-> v1-18 attack-id) 1)) + ) + (set! (-> v1-18 attack-id) a0-10) + (set! (-> gp-0 attack-id) a0-10) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (spawn-projectile prebot-gun-shot gp-0 (ppointer->process (-> self parent)) *default-dead-pool*) + ) + (if (logtest? (-> *part-group-id-table* 1334 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 1334) + :duration (seconds 1) + :mat-joint (-> self node-list data 7 bone transform) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 1334) + :duration (seconds 1) + :mat-joint (-> self node-list data 7 bone transform) + ) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (clone-anim-once (ppointer->handle (-> self parent)) #t (-> self prefix)) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defmethod relocate ((this prebot-tentacle) (offset int)) + (if (nonzero? (-> this aim-jm)) + (&+! (-> this aim-jm) offset) + ) + (if (nonzero? (-> this half-aim-jm)) + (&+! (-> this half-aim-jm) offset) + ) + (call-parent-method this offset) + ) + +(defmethod deactivate ((this prebot-tentacle)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (-> this laser-sound-playing) + (sound-stop (-> this laser-sound)) + ) + (call-parent-method this) + (none) + ) + +(defstate idle (prebot-tentacle) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('look-at) + (cond + ((-> block param 0) + (let ((s5-0 (-> block param 0))) + (blend-on! (-> self aim-jm) (seconds 0.25) 1.0 #f) + (set-target! (-> self aim-jm) (the-as vector s5-0)) + (blend-on! (-> self half-aim-jm) (seconds 0.25) 0.5 #f) + (set-target! (-> self half-aim-jm) (the-as vector s5-0)) + ) + ) + (else + (blend-to-off! (-> self aim-jm) (seconds 0.25) #f) + (blend-to-off! (-> self half-aim-jm) (seconds 0.25) #f) + ) + ) + (cond + ((-> block param 1) + (let ((t2-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node prebot-tentacle-lod0-jg gun)))) + (sound-play "prebot-laser" :id (-> self laser-sound) :position t2-0) + ) + (let ((v0-0 #t)) + (set! (-> self laser-sound-playing) v0-0) + v0-0 + ) + ) + ((-> self laser-sound-playing) + (sound-stop (-> self laser-sound)) + (set! (-> self laser-sound-playing) #f) + #f + ) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (clone-anim-once (ppointer->handle (-> self parent)) #t (-> self prefix)) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(define *prebot-eco-pillar-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-cav-molten-pil-debris-a") + (new 'static 'debris-static-joint-params + :parent-joint-index 3 + :group "skel-cav-molten-pil-debris-b" + :offset (new 'static 'vector :y -4096.0 :w 1.0) + ) + (new 'static 'debris-static-joint-params + :parent-joint-index 3 + :group "skel-cav-molten-pil-debris-c" + :offset (new 'static 'vector :y -20480.0 :w 1.0) + ) + (new 'static 'debris-static-joint-params + :parent-joint-index 3 + :group "skel-cav-molten-pil-debris-d" + :offset (new 'static 'vector :y -36864.0 :w 1.0) + ) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(defmethod relocate ((this prebot-eco-pillar) (offset int)) + (if (nonzero? (-> this heat-part)) + (&+! (-> this heat-part) offset) + ) + (if (nonzero? (-> this cool-part)) + (&+! (-> this cool-part) offset) + ) + (call-parent-method this offset) + ) + +(defmethod deactivate ((this prebot-eco-pillar)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this heat-part)) + (kill-particles (-> this heat-part)) + ) + (if (nonzero? (-> this cool-part)) + (kill-particles (-> this cool-part)) + ) + (call-parent-method this) + (none) + ) + +;; WARN: Return type mismatch symbol vs object. +(defbehavior prebot-eco-pillar-handler prebot-eco-pillar ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('touch 'bonk) + (when (and (= arg0 *target*) (-> self hot)) + (if (send-event + *target* + 'attack-or-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-up (meters 1)) + (shove-back (meters 3)) + ) + ) + ) + (send-event (ppointer->process (-> self parent)) 'touched-hot-pillar) + ) + ) + #t + ) + (('vulnerable) + (let ((v0-2 #t)) + (set! (-> self vulnerable) v0-2) + v0-2 + ) + ) + (('attack) + (when (and (-> self vulnerable) (type? arg0 prebot-gun-shot)) + (let ((a1-12 (new 'stack 'debris-tuning (the-as uint 1)))) + (set! (-> a1-12 hit-xz-reaction) 0.95) + (set! (-> a1-12 hit-y-reaction) 0.6) + (set! (-> a1-12 fountain-rand-transv-lo quad) (-> self root trans quad)) + (+! (-> a1-12 fountain-rand-transv-lo z) 4096.0) + (debris-spawn + (the-as process-drawable (ppointer->process (-> self parent))) + a1-12 + *prebot-eco-pillar-debris-params* + self + ) + ) + (sound-play "columns-break" :position (-> self root trans)) + (cond + ((logtest? (-> *part-group-id-table* 1344 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* 1344)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1344)) + ) + ) + (go-virtual wait-to-die) + ) + #f + ) + ) + ) + +(defstate wait-to-die (prebot-eco-pillar) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (+ (current-time) -1) + (deactivate self) + ) + ) + :code sleep-code + ) + +(defstate idle (prebot-eco-pillar) + :virtual #t + :event prebot-eco-pillar-handler + :code sleep-code + :post (behavior () + (do-push-aways (-> self root)) + ) + ) + +(defstate cool-down (prebot-eco-pillar) + :virtual #t + :event prebot-eco-pillar-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :exit (behavior () + (set! (-> self hot) #f) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 1)) + (go-virtual idle) + ) + (let ((f30-0 (lerp-scale 0.0 1.0 (the float (- (current-time) (-> self state-time))) 0.0 300.0))) + (let ((f28-0 (lerp-scale 1.0 0.0 f30-0 0.5 1.0))) + (set-mined-pillar-texture! f30-0) + (set-vector! (-> self draw color-emissive) f28-0 f28-0 f28-0 1.0) + ) + (set-vector! (-> self draw color-mult) f30-0 f30-0 f30-0 1.0) + ) + (let ((a1-2 (new 'stack-no-clear 'vector))) + (set! (-> a1-2 quad) (-> self root trans quad)) + (set! (-> a1-2 y) (-> self start-y)) + (spawn (-> self cool-part) a1-2) + ) + ) + :code sleep-code + :post (behavior () + (do-push-aways (-> self root)) + ) + ) + +(defstate wait-to-cool (prebot-eco-pillar) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('cool-down) + (go-virtual cool-down) + ) + (else + (prebot-eco-pillar-handler proc argc message block) + ) + ) + ) + :trans (behavior () + (let ((a1-0 (new 'stack-no-clear 'vector))) + (set! (-> a1-0 quad) (-> self root trans quad)) + (set! (-> a1-0 y) (-> self start-y)) + (spawn (-> self part) a1-0) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defstate grow (prebot-eco-pillar) + :virtual #t + :event prebot-eco-pillar-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set-zero! *camera-smush-control*) + (activate! *camera-smush-control* 819.2 37 600 1.0 1.1 (-> *display* camera-clock)) + (sound-play "columns-raise" :position (-> self root trans)) + ) + :exit (behavior () + (set-zero! *camera-smush-control*) + (activate! *camera-smush-control* 819.2 37 300 1.0 1.1 (-> *display* camera-clock)) + ) + :trans (behavior () + (set! (-> self root trans y) (lerp-scale + (+ 4300.8 (-> self start-y)) + (-> self end-y) + (the float (- (current-time) (-> self state-time))) + 0.0 + 75.0 + ) + ) + (if (time-elapsed? (-> self state-time) (seconds 0.25)) + (go-virtual wait-to-cool) + ) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (set! (-> a1-1 quad) (-> self root trans quad)) + (set! (-> a1-1 y) (-> self start-y)) + (spawn (-> self part) a1-1) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defstate heat-up (prebot-eco-pillar) + :virtual #t + :event prebot-eco-pillar-handler + :enter (behavior () + (ja :num-func num-func-identity :frame-num max) + (set-time! (-> self state-time)) + (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 1.0) + ) + :exit (behavior () + (set! (-> self hot) #t) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 0.5)) + (set! (-> self hot) #t) + ) + (if (time-elapsed? (-> self state-time) (seconds 5)) + (go-virtual grow) + ) + (let ((a1-0 (new 'stack-no-clear 'vector))) + (set! (-> a1-0 quad) (-> self root trans quad)) + (set! (-> a1-0 y) (-> self start-y)) + (spawn (-> self heat-part) a1-0) + ) + (set! (-> self root trans y) (lerp-scale + (-> self start-y) + (+ 4300.8 (-> self start-y)) + (the float (- (current-time) (-> self state-time))) + 0.0 + 300.0 + ) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(deftype cav-exit-door (process-drawable) + ((initial-y float) + ) + (:state-methods + idle + rise + ) + ) + + +(defstate rise (cav-exit-door) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (sound-play "mb-door-open") + ) + :trans (behavior () + (set! (-> self root trans y) + (+ (-> self initial-y) (lerp-scale 0.0 32768.0 (the float (- (current-time) (-> self state-time))) 0.0 300.0)) + ) + (when (time-elapsed? (-> self state-time) (seconds 1)) + (sound-play "mb-door-hit") + (cleanup-for-death self) + (deactivate self) + ) + ) + :code sleep-code + :post transform-post + ) + +(defstate idle (cav-exit-door) + :virtual #t + :enter (behavior () + (transform-post) + ) + :trans (behavior () + (let ((f0-0 (vector-vector-distance-squared (-> self root trans) (target-pos 0))) + (f1-0 16384.0) + ) + (if (< f0-0 (* f1-0 f1-0)) + (go-virtual rise) + ) + ) + ) + :code sleep-code + ) + +(defmethod init-from-entity! ((this cav-exit-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)) + (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 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 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) 74.1376 13979.238 -22.528 20222.771) + ) + (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-cav-exit-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this initial-y) (-> this root trans y)) + (set! (-> this draw light-index) (the-as uint 10)) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/mine/prebot-part.gc b/goal_src/jak3/levels/mine/prebot-part.gc index ae9cf82e1b..e84bcee9f0 100644 --- a/goal_src/jak3/levels/mine/prebot-part.gc +++ b/goal_src/jak3/levels/mine/prebot-part.gc @@ -5,5 +5,1600 @@ ;; name in dgo: prebot-part ;; dgos: MINED +(define-extern *range-mine-boss-stuck-flame-color* curve-color-fast) +(define-extern *range-mine-boss-stuck-flame-alpha* curve2d-fast) +(define-extern *range-mine-boss-stuck-flame-scale-x* curve2d-fast) +(define-extern *range-mine-boss-stuck-flame-scale-y* curve2d-fast) +(define-extern *r-curve-mine-boss-stuck-flame* curve2d-fast) +(define-extern *g-curve-mine-boss-stuck-flame* curve2d-fast) +(define-extern *b-curve-mine-boss-stuck-flame* curve2d-fast) +(define-extern *curve-mine-boss-stuck-flame-alpha* curve2d-fast) +(define-extern *curve-mine-boss-stuck-flame-scale-x* curve2d-fast) +(define-extern *curve-mine-boss-stuck-flame-scale-y* curve2d-fast) +(define-extern *part-prebot-stuck-flame-curve-settings* particle-curve-settings) +(define-extern *range-mine-boss-explo-color* curve-color-fast) +(define-extern *range-mine-boss-explo-alpha* curve2d-fast) +(define-extern *range-mine-boss-explo-scale-x* curve2d-fast) +(define-extern *range-mine-boss-explo-scale-y* curve2d-fast) +(define-extern *curve-mine-boss-explo-alpha* curve2d-fast) +(define-extern *curve-mine-boss-explo-scale-x* curve2d-fast) +(define-extern *curve-mine-boss-explo-scale-y* curve2d-fast) +(define-extern *part-prebot-chasm-explosion-texture-curve-settings* particle-curve-settings) +(define-extern *range-final-mine-boss-explo-color* curve-color-fast) +(define-extern *range-final-mine-boss-explo-alpha* curve2d-fast) +(define-extern *range-final-mine-boss-explo-scale-x* curve2d-fast) +(define-extern *range-final-mine-boss-explo-scale-y* curve2d-fast) +(define-extern *curve-final-mine-boss-explo-alpha* curve2d-fast) +(define-extern *curve-final-mine-boss-explo-scale-x* curve2d-fast) +(define-extern *curve-final-mine-boss-explo-scale-y* curve2d-fast) +(define-extern *part-final-prebot-chasm-explosion-texture-curve-settings* particle-curve-settings) + ;; DECOMP BEGINS +;; WARN: Return type mismatch float vs none. +(defun birth-func-pillar-rocks-bounce ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (set! (-> arg1 omega) (-> arg2 launchrot y)) + (none) + ) + +(defun spt-func-pillar-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (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* 4464) s4-0) + ) + ) + (none) + ) + +(defun spt-func-pillar-rocks-bounce2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (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* 4465) s4-0) + ) + ) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defun spt-func-pillar-rocks-bounce3 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (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) + ) + +(defpartgroup group-prebot-launch-critter + :id 1334 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4466 :flags (sp7) :period (seconds 2) :length (seconds 0.017)) + (sp-item 4467 :flags (sp7) :period (seconds 2) :length (seconds 0.017)) + (sp-item 4468 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +(defpart 4466 + :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 4467 + :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 4468 + :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) + ) + ) + +(defpart 4469 + :init-specs ((:texture (pal-lightning-red level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1) (meters 2)) + (: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 4470 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (: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 4511.25)) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 4471 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:y (meters 1)) + (:scale-x (meters 1) (meters 3)) + (: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)) + ) + ) + +(defpartgroup group-prebot-gun-shot-trail + :id 1335 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4472 :flags (sp6)) + (sp-item 4473 :fade-after (meters 120) :falloff-to (meters 120)) + (sp-item 4474 :flags (sp6)) + (sp-item 4475 :fade-after (meters 120) :falloff-to (meters 120)) + ) + ) + +(defpart 4472 + :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 10.0 30.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpart 4475 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0 6.0) + (:scale-x (meters 0.3) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 30.0 30.0) + (:g :copy r) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.016666668)) + (:fade-a -0.42666668) + (:accel-y (meters -0.000033333334) (meters -0.000016666667)) + (:friction 0.96 0.01) + (:timer (seconds 0.5) (seconds 3.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.017) (seconds 0.497)) + (:next-launcher 4476) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4476 + :init-specs ((:r 255.0) (:g 255.0) (:b 255.0) (:next-time (seconds 0.017)) (:next-launcher 4477)) + ) + +(defpart 4477 + :init-specs ((:r 30.0 30.0) (:g :copy r) (:b 255.0) (:next-time (seconds 0.017) (seconds 0.497)) (:next-launcher 4476)) + ) + +(defpart 4474 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 3072.0) + (:next-time (seconds 0.035)) + (:next-launcher 4478) + ) + ) + +(defpart 4478 + :init-specs ((:scale-x (meters 2.5)) (:scale-y :copy scale-x) (:r 0.0) (:g 0.0) (:b 255.0) (:a 16.0) (:fade-a -1.6)) + ) + +(defpart 4473 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (: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 0.0) + (:g 0.0) + (:b 255.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.005) (meters 0.008333334)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-r 3.2) + (:fade-g 3.2) + (:fade-b -3.2) + (:fade-a -0.10666667 -0.10666667) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x400000 #x405c00)) + (:next-time (seconds 0.135)) + (:next-launcher 4479) + ) + ) + +(defpart 4479 + :init-specs ((:r 128.0) (:g 128.0) (:b 128.0) (:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0)) + ) + +(defpartgroup group-prebot-eco-pillar-heat-up + :id 1336 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4480) (sp-item 4481) (sp-item 4482 :flags (is-3d sp7))) + ) + +(defpart 4480 + :init-specs ((:texture (lava-drop-01 mined-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:x (meters 1) (meters 0.2)) + (:scale-x (meters 0.1) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0 60.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:rotvel-z (degrees -2) (degrees 4)) + (:accel-y (meters -0.0023333333)) + (:timer (seconds 1)) + (:flags (launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 -1384120320 -1384120064 -1384119808 -1384119552)) + (:func 'check-drop-group-center) + (:next-time (seconds 0.167) (seconds 0.165)) + (:next-launcher 4483) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4483 + :init-specs ((:fade-r -1.275) (:fade-g -0.7) (:fade-b 0.05)) + ) + +(defpart 4481 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 1.0) + (:x (meters -1) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0 60.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.016666668)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0023333333)) + (:timer (seconds 1)) + (:flags (launch-along-z)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4482 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 0.1) + (:y (meters 1)) + (:scale-x (meters 10) (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0 60.0) + (:b 0.0) + (:a 0.0) + (:fade-a 1.7066667) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3)) + (:next-time (seconds 0.25)) + (:next-launcher 4484) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4484 + :init-specs ((:fade-a -1.7066667)) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-prebot-eco-pillar-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 160)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 60)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 100)) + ) + (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-prebot-eco-pillar-rocks2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (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*)) 31) 60)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 80)) + ) + (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-prebot-eco-pillar-rocks3 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 70)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 40)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 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-prebot-eco-pillar-grow + :id 1337 + :duration (seconds 0.017) + :linger-duration (seconds 10) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4485) + (sp-item 4486 :flags (is-3d sp3 sp7)) + (sp-item 4487 :period (seconds 20) :length (seconds 0.167)) + ) + ) + +(defpart 4485 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 0.3) + (:x (meters 1) (meters 1)) + (:scale-x (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 0.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-g 0.14166667) + (:fade-b 0.20833333) + (:fade-a -0.053333335) + (:accel-y (meters 0.00033333333) (meters 0.00033333333)) + (:friction 0.95 0.01) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4486 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 1)) + (:scale-x (meters 11)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0 60.0) + (:b 0.0) + (:a 128.0) + (:fade-a -0.08533333) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4487 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-prebot-eco-pillar-rocks) + (:num 3.0) + (:x (meters 1) (meters 0.5)) + (:y (meters 0.5)) + (:scale-x (meters 0.3) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.3) (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.023333333) (meters 0.06666667)) + (:rotvel-z (degrees -1) (degrees 2)) + (:fade-r -0.33333334) + (:fade-g -0.33333334) + (:fade-b -0.33333334) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0)) + (: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-prebot-eco-pillar-rocks) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-prebot-eco-pillar-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-pillar-rocks-bounce arg0 arg1 arg2) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-prebot-eco-pillar-rocks arg0 arg1 arg2) + (none) + ) + +(defun spt-func-part-prebot-eco-pillar-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-pillar-rocks-bounce1 arg0 arg1 arg2) + (none) + ) + +(defpart 4464 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-prebot-eco-pillar-rocks-bounce1) + (:num 0.5) + (:scale-x (meters 0.3) (meters 1) :store) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.3) (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)) + (:fade-r -0.33333334) + (:fade-g -0.33333334) + (:fade-b -0.33333334) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0)) + (: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-prebot-eco-pillar-rocks-bounce1) + (:conerot-x (degrees 5) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-prebot-eco-pillar-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-pillar-rocks-bounce arg0 arg1 arg2) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-prebot-eco-pillar-rocks2 arg0 arg1 arg2) + (none) + ) + +(defun spt-func-part-prebot-eco-pillar-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-pillar-rocks-bounce2 arg0 arg1 arg2) + (none) + ) + +(defpart 4465 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-prebot-eco-pillar-rocks-bounce2) + (:num 0.5) + (:scale-x '*sp-temp*) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.3) (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.01) (meters 0.016666668)) + (:scalevel-x (meters -0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.33333334) + (:fade-g -0.33333334) + (:fade-b -0.33333334) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-0)) + (: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-pillar-rocks-bounce3) + (:conerot-x (degrees 5) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-prebot-eco-pillar-rocks-bounce2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-pillar-rocks-bounce arg0 arg1 arg2) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-prebot-eco-pillar-rocks3 arg0 arg1 arg2) + (none) + ) + +(defpartgroup group-prebot-eco-pillar-cool-down + :id 1338 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4488)) + ) + +(defpart 4488 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 0.3) + (:x (meters 1) (meters 1)) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 0.0) + (:a 16.0 16.0) + (:scalevel-x (meters 0.0016666667) (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g 0.14166667) + (:fade-b 0.20833333) + (:fade-a -0.026666667) + (:accel-y (meters 0.00033333333) (meters 0.00033333333)) + (:friction 0.95 0.01) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4489 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 1)) + (:rot-x (degrees 22.725)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 150.0) + (:b 60.0) + (:a 100.0 30.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 4490 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5)) + (: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 16.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpartgroup group-prebot-stuck-flame + :id 1339 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 4491)) + ) + +(defpart 4491 + :init-specs ((:texture (flame01 level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0) + (:scale-x (meters 1)) + (: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)) + (:friction 0.99 0.01) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'live-func-curve) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-mine-boss-stuck-flame-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 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-mine-boss-stuck-flame-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 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-mine-boss-stuck-flame-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 6.0 :y 3.0 :z 4.0 :w 5.0) + :one-over-x-deltas (new 'static 'vector :x -3.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-mine-boss-stuck-flame-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 6.0 :y 3.0 :z 4.0 :w 5.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-mine-boss-stuck-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :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 2.6666665 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-mine-boss-stuck-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.4 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.5 :w 0.3) + :one-over-x-deltas (new 'static 'vector :x 3.3333333 :y -5.0000005 :z -0.3333333 :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-mine-boss-stuck-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x -3.3333333 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-mine-boss-stuck-flame-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-mine-boss-stuck-flame-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 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! *curve-mine-boss-stuck-flame-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 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) + ) + ) + ) + +(define *part-prebot-stuck-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* 4491 init-specs 13 initial-valuef) + (the-as float *part-prebot-stuck-flame-curve-settings*) + ) + +(set! (-> *part-prebot-stuck-flame-curve-settings* color-start) *range-mine-boss-stuck-flame-color*) + +(set! (-> *part-prebot-stuck-flame-curve-settings* alpha-start) *range-mine-boss-stuck-flame-alpha*) + +(set! (-> *part-prebot-stuck-flame-curve-settings* scale-x-start) *range-mine-boss-stuck-flame-scale-x*) + +(set! (-> *part-prebot-stuck-flame-curve-settings* scale-y-start) *range-mine-boss-stuck-flame-scale-y*) + +(set! (-> *part-prebot-stuck-flame-curve-settings* r-scalar) *r-curve-mine-boss-stuck-flame*) + +(set! (-> *part-prebot-stuck-flame-curve-settings* g-scalar) *g-curve-mine-boss-stuck-flame*) + +(set! (-> *part-prebot-stuck-flame-curve-settings* b-scalar) *b-curve-mine-boss-stuck-flame*) + +(set! (-> *part-prebot-stuck-flame-curve-settings* a-scalar) *curve-mine-boss-stuck-flame-alpha*) + +(set! (-> *part-prebot-stuck-flame-curve-settings* scale-x-scalar) *curve-mine-boss-stuck-flame-scale-x*) + +(set! (-> *part-prebot-stuck-flame-curve-settings* scale-y-scalar) *curve-mine-boss-stuck-flame-scale-y*) + +(defpartgroup group-prebot-chasm-explosion + :id 1340 + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 4492 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4493 :period (seconds 30) :length (seconds 1)) + (sp-item 4494 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4495 :period (seconds 30) :length (seconds 0.5)) + (sp-item 4496 :period (seconds 30) :length (seconds 0.5)) + ) + ) + +(defpart 4494 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 100)) + (:rot-x (degrees 450)) + (: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 -1.3333334)) + (:scalevel-y :copy scalevel-x) + (:fade-g -2.56) + (:fade-b -5.1) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 4492 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 150)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 40.0) + (:a 64.0) + (:fade-a -0.14222223) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +(defpart 4493 + :init-specs ((:texture (middot level-default-sprite)) + (:num 10.0) + (:scale-x (meters 0.05) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 0.00225)) + (:vel-y (meters 0.33333334) (meters 1.6666666)) + (:fade-g -0.128) + (:fade-b -0.42666668) + (:friction 0.95) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.335)) + (:next-launcher 4497) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-z (degrees -20) (degrees 40)) + ) + ) + +(defpart 4497 + :init-specs ((:omega (degrees 0.0225)) (:friction 0.97)) + ) + +(defpart 4495 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 10.0) + (:scale-x (meters 5) (meters 5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0 20.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 1) (meters 0.33333334)) + (:scalevel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-y (meters 0.06666667) (meters 0.06666667)) + (:fade-g -0.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4496 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 10.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.6666667) (meters 0.33333334)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags ()) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-mine-boss-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-mine-boss-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-mine-boss-explo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 10.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-mine-boss-explo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 10.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-mine-boss-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-mine-boss-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-mine-boss-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-prebot-chasm-explosion-texture-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.6) + :flags (particle-curve-flags pcf0) + ) + ) + +(set! (-> *part-id-table* 4496 init-specs 16 initial-valuef) + (the-as float *part-prebot-chasm-explosion-texture-curve-settings*) + ) + +(set! (-> *part-prebot-chasm-explosion-texture-curve-settings* color-start) *range-mine-boss-explo-color*) + +(set! (-> *part-prebot-chasm-explosion-texture-curve-settings* alpha-start) *range-mine-boss-explo-alpha*) + +(set! (-> *part-prebot-chasm-explosion-texture-curve-settings* scale-x-start) *range-mine-boss-explo-scale-x*) + +(set! (-> *part-prebot-chasm-explosion-texture-curve-settings* scale-y-start) *range-mine-boss-explo-scale-y*) + +(set! (-> *part-prebot-chasm-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-prebot-chasm-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-prebot-chasm-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-prebot-chasm-explosion-texture-curve-settings* a-scalar) *curve-mine-boss-explo-alpha*) + +(set! (-> *part-prebot-chasm-explosion-texture-curve-settings* scale-x-scalar) + *curve-mine-boss-explo-scale-x* + ) + +(set! (-> *part-prebot-chasm-explosion-texture-curve-settings* scale-y-scalar) + *curve-mine-boss-explo-scale-y* + ) + +(defpartgroup group-final-prebot-chasm-explosion + :id 1341 + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 4498 :flags (sp3) :period (seconds 10) :length (seconds 0.017)) + (sp-item 4499 :flags (sp3) :period (seconds 10) :length (seconds 0.017)) + (sp-item 4500 :period (seconds 10) :length (seconds 0.085)) + (sp-item 4501 :period (seconds 10) :length (seconds 1)) + (sp-item 4502 :period (seconds 10) :length (seconds 1)) + ) + ) + +(defpart 4498 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30)) + (:rot-x (degrees 450)) + (: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.6666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -2.56) + (:fade-b -5.1) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 4499 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 120)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 40.0) + (:a 64.0) + (:fade-a -0.14222223) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +(defpart 4500 + :init-specs ((:texture (middot level-default-sprite)) + (:num 50.0) + (:scale-x (meters 0.05) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 0.0225)) + (:vel-y (meters 0.06666667) (meters 0.33333334)) + (:fade-g -1.28) + (:fade-b -2.56) + (:friction 0.9) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -130) (degrees 260)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4501 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 1) (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0 20.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 0.2) (meters 0.16666667)) + (:scalevel-x (meters 0.006666667) (meters 0.016666668)) + (:scalevel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-g -0.26666668) + (:fade-b -0.1) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.8) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4502 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 3.0) + (:x (meters -1) (meters 2)) + (:y (meters 0) (meters 1)) + (: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)) + (:friction 0.85 0.05) + (:timer (seconds 1)) + (:flags ()) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-final-mine-boss-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-final-mine-boss-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-final-mine-boss-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-final-mine-boss-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-final-mine-boss-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-final-mine-boss-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-final-mine-boss-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-final-prebot-chasm-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* 4502 init-specs 16 initial-valuef) + (the-as float *part-final-prebot-chasm-explosion-texture-curve-settings*) + ) + +(set! (-> *part-final-prebot-chasm-explosion-texture-curve-settings* color-start) + *range-final-mine-boss-explo-color* + ) + +(set! (-> *part-final-prebot-chasm-explosion-texture-curve-settings* alpha-start) + *range-final-mine-boss-explo-alpha* + ) + +(set! (-> *part-final-prebot-chasm-explosion-texture-curve-settings* scale-x-start) + *range-final-mine-boss-explo-scale-x* + ) + +(set! (-> *part-final-prebot-chasm-explosion-texture-curve-settings* scale-y-start) + *range-final-mine-boss-explo-scale-y* + ) + +(set! (-> *part-final-prebot-chasm-explosion-texture-curve-settings* r-scalar) #f) + +(set! (-> *part-final-prebot-chasm-explosion-texture-curve-settings* g-scalar) #f) + +(set! (-> *part-final-prebot-chasm-explosion-texture-curve-settings* b-scalar) #f) + +(set! (-> *part-final-prebot-chasm-explosion-texture-curve-settings* a-scalar) + *curve-final-mine-boss-explo-alpha* + ) + +(set! (-> *part-final-prebot-chasm-explosion-texture-curve-settings* scale-x-scalar) + *curve-final-mine-boss-explo-scale-x* + ) + +(set! (-> *part-final-prebot-chasm-explosion-texture-curve-settings* scale-y-scalar) + *curve-final-mine-boss-explo-scale-y* + ) + +(defpartgroup group-prebot-chasm-explosion-comets + :id 1342 + :flags (sp0) + :bounds (static-bspherem 0 0 0 600) + :parts ((sp-item 4504 :flags (sp3) :binding 4503) + (sp-item 4504 :flags (sp3) :binding 4503) + (sp-item 4504 :flags (sp3) :binding 4503) + (sp-item 4503 :flags (sp2)) + (sp-item 4503 :flags (sp2)) + (sp-item 4503 :flags (sp2)) + ) + ) + +(defpart 4504 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:scale-x (meters 30)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 100.0) + (:a 1.0) + (:vel-y (meters 0.53333336) (meters 0.06666667)) + (:scalevel-x (meters -0.083333336)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.1 -0.1) + (:fade-b -0.05 -0.05) + (:accel-y (meters -0.00066666666)) + (:friction 0.99) + (:timer (seconds 6.667)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x405c00 #x406500 #x400000 #x400700)) + (:conerot-x (degrees 10) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4503 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-inherit-size) + (:num 1.2) + (:scale-x (meters 0.00024414062) (meters 0.00012207031)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 130.0) + (:g 60.0 20.0) + (:b 20.0 10.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.01)) + (:rotvel-z (degrees -0.13333334) (degrees 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.1 -0.1) + (:fade-b -0.05 -0.05) + (:fade-a -0.016666668 -0.1) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-prebot-gun-shot-explosion + :id 1343 + :duration (seconds 2) + :linger-duration (seconds 1) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4505 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4506 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4507 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4508 :period (seconds 30) :length (seconds 0.335)) + ) + ) + +(defpart 4505 + :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 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 4506 + :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 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 4507 + :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 4508 + :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 :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)) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-prebot-pillar-shatter-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) 90)) + (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) 40)) + ) + (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-prebot-pillar-shatter + :id 1344 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4509 :period (seconds 20) :length (seconds 0.035))) + ) + +(defpart 4509 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-prebot-eco-pillar-shatter) + (:num 30.0) + (:x (meters 0) (meters 1)) + (:y (meters 0) (meters -10)) + (:scale-x (meters 0.1) (meters 1.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.06666667)) + (:scalevel-x (meters 0) (meters 0.06666667)) + (:rotvel-z (degrees -2) (degrees 4)) + (:scalevel-y (meters 0) (meters 0.06666667)) + (:fade-r -0.06666667) + (:fade-g -0.06666667) + (:fade-b -0.06666667) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 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 'spt-func-part-prebot-eco-pillar-shatter) + (:next-time (seconds 0.017)) + (:next-launcher 4510) + (:conerot-x (degrees 0) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4510 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y (meters 0))) + ) + +(defun spt-birth-func-part-prebot-eco-pillar-shatter ((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-prebot-pillar-shatter-rocks arg0 arg1 arg2 arg3 arg4) + (none) + ) + +(defun spt-func-part-prebot-eco-pillar-shatter ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (none) + ) diff --git a/goal_src/jak3/levels/mine/prebot-setup.gc b/goal_src/jak3/levels/mine/prebot-setup.gc index f1acce1523..42c47138b2 100644 --- a/goal_src/jak3/levels/mine/prebot-setup.gc +++ b/goal_src/jak3/levels/mine/prebot-setup.gc @@ -5,5 +5,1098 @@ ;; name in dgo: prebot-setup ;; dgos: MINED + +;; +++prebot-flag +(defenum prebot-flag + :type uint32 + :bitfield #t + (pf0 0) + (pf1 1) + (pf2 2) + (pf3 3) + (pf4 4) + (pf5 5) + (pf6 6) + (pf7 7) + (pf8 8) + ) +;; ---prebot-flag + + +(declare-type prebot process-focusable) +(define-extern *prebot-sword-color-curve* curve-color-piecewise) +(define-extern *prebot-sword-white-red-curve* curve-color-piecewise) +(define-extern *prebot-sword-width-curve* curve2d-fast) +(define-extern *prebot-sword-color-array* light-trail-composition) +(define-extern prebot-neck-callback (function cspace transformq none :behavior prebot)) +(define-extern prebot-light-pulse-off (function none :behavior prebot)) +(define-extern prebot-go-next-stage (function object :behavior prebot)) + + ;; DECOMP BEGINS +(defskelgroup skel-prebot-camera prebot-camera prebot-camera-lod0-jg -1 + ((prebot-camera-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +(defskelgroup skel-cav-exit-door cav-exit-door cav-exit-door-lod0-jg cav-exit-door-idle-ja + ((cav-exit-door-lod0-mg (meters 20)) (cav-exit-door-lod1-mg (meters 999999))) + :bounds (static-spherem 0 10 0 20) + :origin-joint-index 3 + ) + +(defskelgroup skel-cav-break-bridge cav-break-bridge cav-break-bridge-lod0-jg cav-break-bridge-idle-ja + ((cav-break-bridge-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -20 0 50) + :origin-joint-index 3 + ) + +(defskelgroup skel-cav-molten-pil cav-pillar cav-pillar-lod0-jg cav-pillar-idle-ja + ((cav-pillar-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -10 0 10) + :origin-joint-index 3 + ) + +(defskelgroup skel-cav-molten-pil-b cav-pillar cav-pillar-b-lod0-jg cav-pillar-b-idle-ja + ((cav-pillar-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -10 0 10) + :origin-joint-index 3 + ) + +(defskelgroup skel-cav-molten-pil-c cav-pillar cav-pillar-c-lod0-jg cav-pillar-c-idle-ja + ((cav-pillar-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -10 0 10) + :origin-joint-index 3 + ) + +(defskelgroup skel-cav-molten-pil-d cav-pillar cav-pillar-d-lod0-jg cav-pillar-d-idle-ja + ((cav-pillar-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -10 0 10) + :origin-joint-index 3 + ) + +(defskelgroup skel-cav-molten-pil-debris-a cav-pillar cav-pillar-debris-a-lod0-jg cav-pillar-debris-a-idle-ja + ((cav-pillar-debris-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-cav-molten-pil-debris-b cav-pillar cav-pillar-debris-b-lod0-jg cav-pillar-debris-b-idle-ja + ((cav-pillar-debris-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-cav-molten-pil-debris-c cav-pillar cav-pillar-debris-c-lod0-jg cav-pillar-debris-c-idle-ja + ((cav-pillar-debris-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-cav-molten-pil-debris-d cav-pillar cav-pillar-debris-d-lod0-jg cav-pillar-debris-d-idle-ja + ((cav-pillar-debris-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +(defskelgroup skel-cav-railblocker cav-railblocker cav-railblocker-lod0-jg cav-railblocker-idle-ja + ((cav-railblocker-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +(defskelgroup skel-cav-railblocker-explode cav-railblocker cav-railblocker-explode-lod0-jg cav-railblocker-explode-idle-ja + ((cav-railblocker-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +(define *cav-railblocker-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 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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +(defskelgroup skel-cav-minecar min-bomb-train min-bomb-train-lod0-jg min-bomb-train-idle-ja + ((min-bomb-train-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +(defskelgroup skel-prebot-tentacle prebot-tentacle prebot-tentacle-lod0-jg prebot-tentacle-idle-ja + ((prebot-tentacle-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +(defskelgroup skel-prebot-shockwave prebot-shockwave prebot-shockwave-lod0-jg prebot-shockwave-shockwave-ja + ((prebot-shockwave-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 62) + :origin-joint-index 3 + ) + +(defskelgroup skel-prebot-sword prebot 80 prebot-sword-shadow-mg + ((prebot-sword-lod0-jg (meters 999999))) + :bounds (static-spherem 0 20 0 20) + :origin-joint-index 4 + ) + +(defskelgroup skel-prebot-gun prebot prebot-sword-r-swords-horizontal-L2R-complete-ja prebot-gun-shadow-mg + ((prebot-gun-lod0-jg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +(defskelgroup skel-prebot prebot prebot-lod0-jg prebot-idle-ja + ((prebot-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -2 0 13.5) + :shadow prebot-shadow-mg + :origin-joint-index 3 + ) + +(deftype prebot-eco-pillar-launch-spec (structure) + ((offset vector) + (height float) + (style int8) + ) + ) + + +(deftype prebot-eco-pillar (process-drawable) + ((root collide-shape-moving :override) + (vulnerable symbol) + (hot symbol) + (start-y float) + (end-y float) + (heat-part sparticle-launch-control) + (cool-part sparticle-launch-control) + ) + (:state-methods + wait-to-die + heat-up + grow + cool-down + wait-to-cool + idle + ) + ) + + +(deftype cav-railblocker (process-focusable) + ((incoming-attack-id uint32) + (hit-points float) + (notify-on-die entity) + (notify-on-die-2 entity) + (trackable symbol) + (red-tip-change-time time-frame) + (alt-red-tip-on symbol) + ) + (:state-methods + idle + fall + ) + (:methods + (cav-railblocker-method-30 (_type_ symbol) none) + ) + ) + + +(deftype cav-minecar (process-drawable) + () + (:state-methods + idle + ) + ) + + +(deftype prebot-sword (process-drawable) + ((parent (pointer prebot) :override) + (root collide-shape-moving :override) + (prefix string) + (blade-scale cam-float-seeker :inline) + (blade-jm joint-mod) + (sword-sound sound-id) + (sword-sound-playing symbol) + (prev-position vector :inline) + (use-pos-pitch symbol) + (old-target-dist float) + (alternate-sound sound-spec) + (whoosh-lead float) + (allow-whoosh symbol) + (current-volume float) + ) + (:state-methods + idle + ) + ) + + +(deftype prebot-shockwave (process-drawable) + () + (:state-methods + idle + ) + ) + + +(deftype prebot-gun (process-drawable) + ((parent (pointer prebot) :override) + (root collide-shape-moving :override) + (prefix string) + ) + (:state-methods + idle + ) + ) + + +(deftype prebot-tentacle (process-drawable) + ((parent (pointer prebot) :override) + (root collide-shape-moving :override) + (prefix string) + (aim-jm joint-mod-polar-look-at) + (half-aim-jm joint-mod-polar-look-at) + (laser-sound sound-id) + (laser-sound-playing symbol) + ) + (:state-methods + idle + ) + ) + + +(deftype prebot-ammo-tracker (structure) + ((handle handle) + (where vector :inline) + (birth-next-time symbol) + (timer time-frame) + ) + ) + + +(deftype prebot (process-focusable) + ((critters handle 28) + (critters-to-launch int8) + (gun handle) + (swords handle 2) + (tentacles handle 5) + (beam-projectile handle) + (pillars handle 5) + (original-position vector :inline) + (position cam-vector-seeker :inline) + (stage int8) + (stage-hit-points float) + (last-attack-id uint32) + (neck-angle cam-float-seeker :inline) + (no-collision-timer time-frame) + (num-attacks uint8) + (shoulder-aim-jm joint-mod-polar-look-at) + (shot-extra-y float) + (shot-extra-xz float) + (which-movie int8) + (light-flash cam-vector-seeker :inline) + (light-pulse oscillating-vector :inline) + (light-pulse-flicker delayed-rand-vector :inline) + (laugh-played symbol) + (grunt-played symbol) + (trythis-played symbol) + (laugh-timer time-frame) + (blocker handle) + (flags prebot-flag) + (pillar-hint-timer time-frame) + (minecar-hint-timer time-frame) + (ammo prebot-ammo-tracker 20 :inline) + ) + (:state-methods + beaten + play-fma + play-hit-movie + destroy-pillars + watch-pillars + create-pillars + activate-tentacles + watch-critters + launch-critters + sweep-done + sweep + slam-done + slam + pre-slam + jump-to-hover + hidden + test + ) + (:methods + (prebot-method-45 (_type_) none) + (prebot-method-46 (_type_) none) + ) + ) + + +(defbehavior prebot-eco-pillar-init-by-other prebot-eco-pillar ((arg0 vector) (arg1 prebot-eco-pillar-launch-spec)) + (let ((v1-0 (-> arg1 style))) + (cond + ((zero? v1-0) + (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) + ) + (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 hit-by-others-list player-list)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set! (-> v1-7 transform-index) 3) + (set-vector! (-> v1-7 local-sphere) 1337.7535 -32947.812 542.3104 36864.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! (-> self root) s4-0) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-cav-molten-pil" (the-as (pointer level) #f))) + (the-as pair 0) + ) + ) + ((= v1-0 1) + (let ((s4-2 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-2 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-2 reaction) cshape-reaction-default) + (set! (-> s4-2 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-mesh s4-2 (the-as uint 0) (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)) + (set! (-> v1-21 transform-index) 3) + (set-vector! (-> v1-21 local-sphere) 1337.7535 -32947.812 542.3104 36864.0) + (set! (-> s4-2 total-prims) (the-as uint 1)) + (set! (-> s4-2 root-prim) v1-21) + ) + (set! (-> s4-2 nav-radius) (* 0.75 (-> s4-2 root-prim local-sphere w))) + (let ((v1-24 (-> s4-2 root-prim))) + (set! (-> s4-2 backup-collide-as) (-> v1-24 prim-core collide-as)) + (set! (-> s4-2 backup-collide-with) (-> v1-24 prim-core collide-with)) + ) + (set! (-> self root) s4-2) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-cav-molten-pil-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + ) + ((= v1-0 2) + (let ((s4-4 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-4 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-4 reaction) cshape-reaction-default) + (set! (-> s4-4 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((v1-35 (new 'process 'collide-shape-prim-mesh s4-4 (the-as uint 0) (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)) + (set! (-> v1-35 transform-index) 3) + (set-vector! (-> v1-35 local-sphere) 1337.7535 -32947.812 542.3104 36864.0) + (set! (-> s4-4 total-prims) (the-as uint 1)) + (set! (-> s4-4 root-prim) v1-35) + ) + (set! (-> s4-4 nav-radius) (* 0.75 (-> s4-4 root-prim local-sphere w))) + (let ((v1-38 (-> s4-4 root-prim))) + (set! (-> s4-4 backup-collide-as) (-> v1-38 prim-core collide-as)) + (set! (-> s4-4 backup-collide-with) (-> v1-38 prim-core collide-with)) + ) + (set! (-> self root) s4-4) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-cav-molten-pil-c" (the-as (pointer level) #f))) + (the-as pair 0) + ) + ) + (else + (let ((s4-6 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-6 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-6 reaction) cshape-reaction-default) + (set! (-> s4-6 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((v1-49 (new 'process 'collide-shape-prim-mesh s4-6 (the-as uint 0) (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)) + (set! (-> v1-49 transform-index) 3) + (set-vector! (-> v1-49 local-sphere) 1337.7535 -32947.812 542.3104 36864.0) + (set! (-> s4-6 total-prims) (the-as uint 1)) + (set! (-> s4-6 root-prim) v1-49) + ) + (set! (-> s4-6 nav-radius) (* 0.75 (-> s4-6 root-prim local-sphere w))) + (let ((v1-52 (-> s4-6 root-prim))) + (set! (-> s4-6 backup-collide-as) (-> v1-52 prim-core collide-as)) + (set! (-> s4-6 backup-collide-with) (-> v1-52 prim-core collide-with)) + ) + (set! (-> self root) s4-6) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-cav-molten-pil-d" (the-as (pointer level) #f))) + (the-as pair 0) + ) + ) + ) + ) + (set! (-> self root event-self) 'touched) + (let ((s4-8 (new 'stack-no-clear 'vector))) + (let* ((s3-4 sincos!) + (s2-0 s4-8) + (f30-0 -16384.0) + (f28-0 32768.0) + (v1-61 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-62 (the-as number (logior #x3f800000 v1-61))) + ) + (s3-4 s2-0 (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-62))))) + ) + (quaternion-set! (-> self root quat) 0.0 (-> s4-8 x) 0.0 (-> s4-8 y)) + ) + (set! (-> self root trans quad) (-> arg0 quad)) + (set! (-> self start-y) (-> self root trans y)) + (set! (-> self end-y) (+ (-> arg0 y) (-> arg1 height))) + (set! (-> self vulnerable) #f) + (set! (-> self hot) #f) + (set! (-> self heat-part) (create-launch-control (-> *part-group-id-table* 1336) self)) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1337) self)) + (set! (-> self cool-part) (create-launch-control (-> *part-group-id-table* 1338) self)) + (go-virtual heat-up) + ) + +(when (or (zero? *prebot-sword-color-curve*) (!= loading-level global)) + (set! *prebot-sword-color-curve* (new 'loading-level 'curve-color-piecewise)) + (curve-color-piecewise-method-10 *prebot-sword-color-curve* 2 'loading-level (the-as uint #t)) + ) + +(set! (-> *prebot-sword-color-curve* pts data 0 first) 0.0) + +(set! (-> *prebot-sword-color-curve* pts data 0 second x) 1.0) + +(set! (-> *prebot-sword-color-curve* pts data 0 second y) 0.0) + +(set! (-> *prebot-sword-color-curve* pts data 0 second z) 0.0) + +(set! (-> *prebot-sword-color-curve* pts data 0 second w) 1.0) + +(set! (-> *prebot-sword-color-curve* pts data 1 first) 1.0) + +(set! (-> *prebot-sword-color-curve* pts data 1 second x) 1.0) + +(set! (-> *prebot-sword-color-curve* pts data 1 second y) 1.0) + +(set! (-> *prebot-sword-color-curve* pts data 1 second z) 0.0) + +(set! (-> *prebot-sword-color-curve* pts data 1 second w) 1.0) + +(when (or (zero? *prebot-sword-white-red-curve*) (!= loading-level global)) + (set! *prebot-sword-white-red-curve* (new 'loading-level 'curve-color-piecewise)) + (curve-color-piecewise-method-10 *prebot-sword-white-red-curve* 3 'loading-level (the-as uint #t)) + ) + +(set! (-> *prebot-sword-white-red-curve* pts data 0 first) 0.0) + +(set! (-> *prebot-sword-white-red-curve* pts data 0 second x) 1.0) + +(set! (-> *prebot-sword-white-red-curve* pts data 0 second y) 0.3125) + +(set! (-> *prebot-sword-white-red-curve* pts data 0 second z) 0.3125) + +(set! (-> *prebot-sword-white-red-curve* pts data 0 second w) 1.0) + +(set! (-> *prebot-sword-white-red-curve* pts data 1 first) 0.5) + +(set! (-> *prebot-sword-white-red-curve* pts data 1 second x) 1.0) + +(set! (-> *prebot-sword-white-red-curve* pts data 1 second y) 0.078125) + +(set! (-> *prebot-sword-white-red-curve* pts data 1 second z) 0.078125) + +(set! (-> *prebot-sword-white-red-curve* pts data 1 second w) 1.0) + +(set! (-> *prebot-sword-white-red-curve* pts data 2 first) 1.0) + +(set! (-> *prebot-sword-white-red-curve* pts data 2 second x) 1.0) + +(set! (-> *prebot-sword-white-red-curve* pts data 2 second y) 0.0) + +(set! (-> *prebot-sword-white-red-curve* pts data 2 second z) 0.0) + +(set! (-> *prebot-sword-white-red-curve* pts data 2 second w) 1.0) + +(if #t + (set! *prebot-sword-width-curve* (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 (or (zero? *prebot-sword-color-array*) (!= loading-level global)) + (set! *prebot-sword-color-array* (new 'loading-level 'light-trail-composition)) + ) + +(set! (-> *prebot-sword-color-array* color-mode) (the-as uint 0)) + +(set! (-> *prebot-sword-color-array* color-repeat-dist) 4096.0) + +(set! (-> *prebot-sword-color-array* alpha-1-mode) (the-as uint 0)) + +(set! (-> *prebot-sword-color-array* alpha-2-mode) (the-as uint 6)) + +(set! (-> *prebot-sword-color-array* base-alpha) 1.0) + +(set! (-> *prebot-sword-color-array* alpha-repeat-dist) 4096.0) + +(set! (-> *prebot-sword-color-array* width-mode) (the-as uint 0)) + +(set! (-> *prebot-sword-color-array* base-width) 1.0) + +(set! (-> *prebot-sword-color-array* width-repeat-dist) 4096.0) + +(set! (-> *prebot-sword-color-array* uv-mode) (the-as uint 3)) + +(set! (-> *prebot-sword-color-array* uv-repeat-dist) 40960.0) + +(set! (-> *prebot-sword-color-array* lie-mode) (the-as uint 0)) + +(set! (-> *prebot-sword-color-array* max-age) (seconds 0.3)) + +(if #f + (set! (-> *prebot-sword-color-array* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *prebot-sword-color-array* tex-id) (the-as uint #x100300)) + ) + +(set! (-> *prebot-sword-color-array* width-curve) (the-as curve2d-piecewise *prebot-sword-width-curve*)) + +(set! (-> *prebot-sword-color-array* color-curve) *prebot-sword-white-red-curve*) + +(set! (-> *prebot-sword-color-array* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +(set! (-> *prebot-sword-color-array* alpha-curve-2) #f) + +(set! (-> *prebot-sword-color-array* zbuffer?) #t) + +(set! (-> *prebot-sword-color-array* lie-vector quad) (-> *up-vector* quad)) + +(set! (-> *prebot-sword-color-array* use-tape-mode?) #t) + +(set! (-> *prebot-sword-color-array* blend-mode) (the-as uint 1)) + +(set! (-> *prebot-sword-color-array* frame-stagger) (the-as uint 1)) + +(defbehavior prebot-sword-init-by-other prebot-sword ((arg0 string) (arg1 vector) (arg2 basic) (arg3 sound-spec)) + (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 ((v1-6 (new 'process 'collide-shape-prim-mesh s2-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 bot hit-by-others-list player-list)) + (set! (-> v1-6 prim-core action) (collide-action solid)) + (set! (-> v1-6 transform-index) 4) + (set-vector! (-> v1-6 local-sphere) 0.0 45056.0 0.0 49152.0) + (set! (-> s2-0 total-prims) (the-as uint 1)) + (set! (-> s2-0 root-prim) v1-6) + ) + (set! (-> s2-0 nav-radius) (* 0.75 (-> s2-0 root-prim local-sphere w))) + (let ((v1-9 (-> s2-0 root-prim))) + (set! (-> s2-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s2-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> s2-0 event-self) 'touched) + (set! (-> self root) s2-0) + ) + (set! (-> self root pause-adjust-distance) 409600.0) + (set! (-> self root trans quad) (-> arg1 quad)) + (set! (-> self prev-position quad) (-> arg1 quad)) + (set! (-> self old-target-dist) 204800.0) + (set! (-> self prefix) arg0) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-prebot-sword" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((v1-21 (-> self parent))) + (set! (-> self draw light-index) (-> (the-as prebot (if v1-21 + (the-as prebot (-> v1-21 0 self)) + ) + ) + draw + light-index + ) + ) + ) + (logior! (-> self mask) (process-mask enemy)) + (let ((v1-28 (-> self node-list data))) + (set! (-> v1-28 0 param0) (the-as (function cspace transformq none) cspace<-parent-joint!)) + (set! (-> v1-28 0 param1) (the-as basic (-> self parent))) + (set! (-> v1-28 0 param2) arg2) + ) + (set! (-> self event-hook) (-> (method-of-object self idle) event)) + (let ((s5-1 (new 'stack-no-clear 'weapon-trail-tracker-spawn-params))) + (set! (-> s5-1 tracked-obj) (process->handle self)) + (set! (-> s5-1 max-num-crumbs) 200) + (set! (-> s5-1 joint0) 3) + (set! (-> s5-1 joint1) 5) + (set! (-> s5-1 appearance) *prebot-sword-color-array*) + (set! (-> *prebot-sword-color-array* tex-id) + (the-as uint (lookup-texture-id-by-name "sword-trail-low" (the-as string #f))) + ) + (let* ((v1-43 (estimate-light-trail-mem-usage + (the-as uint (-> s5-1 max-num-crumbs)) + (the-as uint (= (-> s5-1 appearance lie-mode) 3)) + ) + ) + (s4-2 (get-process *default-dead-pool* weapon-trail-tracker (+ v1-43 8192) 1)) + (s5-2 (-> (when s4-2 + (let ((t9-8 (method-of-type process activate))) + (t9-8 s4-2 (ppointer->process (-> self parent)) "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-2 weapon-trail-tracker-init-by-other s5-1) + (-> s4-2 ppointer) + ) + 0 + ) + ) + (s3-2 (-> (level-get *level* 'mined) draw-index)) + (s4-3 (vu1-bucket-map s3-2 4 (merc-mode mercneric2))) + (v1-50 (vu1-bucket-map s3-2 4 (merc-mode mm5))) + ) + (set! (-> (the-as weapon-trail-tracker s5-2) trail strip bucket) s4-3) + (set! (-> (the-as weapon-trail-tracker s5-2) trail strip sink) (the-as uint v1-50)) + ) + ) + (init (-> self blade-scale) 1.0 0.03 0.2 0.9) + (set! (-> self blade-jm) (new 'process 'joint-mod (joint-mod-mode joint-set*) self 4)) + (set! (-> self blade-jm track-mode) (track-mode no-trans no-rotate)) + (set-vector! (-> self blade-jm scale) 1.0 1.0 1.0 1.0) + (set! (-> self sword-sound) (new-sound-id)) + (set! (-> self sword-sound-playing) #f) + (set! (-> self use-pos-pitch) #f) + (set! (-> self alternate-sound) arg3) + (set! (-> self allow-whoosh) #f) + (set! (-> self whoosh-lead) 20480.0) + (set! (-> self current-volume) 1.0) + (go-virtual idle) + ) + +(defbehavior prebot-shockwave-init-by-other prebot-shockwave ((arg0 vector) (arg1 quaternion)) + (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) + ) + (let ((v1-6 (new 'process 'collide-shape-prim-sphere s4-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 bot hit-by-others-list 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 4096.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! (-> s4-0 event-self) 'touched) + (set! (-> self root) s4-0) + ) + (set! (-> self root pause-adjust-distance) 409600.0) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-copy! (-> self root quat) arg1) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-prebot-shockwave" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self event-hook) (-> (method-of-object self idle) event)) + (go-virtual idle) + ) + +(defbehavior prebot-gun-init-by-other prebot-gun ((arg0 string) (arg1 vector)) + (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) + ) + (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)) + (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 -32768.0 0.0 49152.0) + (set! (-> s4-0 root-prim) s3-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 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) 3) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 4096.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! (-> s4-0 event-self) 'touched) + (set! (-> self root) s4-0) + ) + (set! (-> self root pause-adjust-distance) 409600.0) + (set! (-> self root trans quad) (-> arg1 quad)) + (set! (-> self prefix) arg0) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-prebot-gun" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((v1-26 (-> self parent))) + (set! (-> self draw light-index) (-> (the-as prebot (if v1-26 + (the-as prebot (-> v1-26 0 self)) + ) + ) + draw + light-index + ) + ) + ) + (logior! (-> self mask) (process-mask enemy)) + (let ((v1-33 (-> self node-list data))) + (set! (-> v1-33 0 param0) (the-as (function cspace transformq none) cspace<-parent-joint!)) + (set! (-> v1-33 0 param1) (the-as basic (-> self parent))) + (set! (-> v1-33 0 param2) (the-as basic 44)) + ) + (set! (-> self event-hook) (-> (method-of-object self idle) event)) + (go-virtual idle) + ) + +(defbehavior prebot-tentacle-init-by-other prebot-tentacle ((arg0 string) (arg1 vector) (arg2 int)) + (let ((s3-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player)))) + (set! (-> s3-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s3-0 reaction) cshape-reaction-default) + (set! (-> s3-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((s2-0 (new 'process 'collide-shape-prim-group s3-0 (the-as uint 1) 0))) + (set! (-> s3-0 total-prims) (the-as uint 2)) + (set! (-> s2-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s2-0 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> s2-0 prim-core action) (collide-action solid)) + (set! (-> s2-0 transform-index) 4) + (set-vector! (-> s2-0 local-sphere) 0.0 -32768.0 0.0 49152.0) + (set! (-> s3-0 root-prim) s2-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s3-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)) + (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 4096.0) + ) + (set! (-> s3-0 nav-radius) (* 0.75 (-> s3-0 root-prim local-sphere w))) + (let ((v1-16 (-> s3-0 root-prim))) + (set! (-> s3-0 backup-collide-as) (-> v1-16 prim-core collide-as)) + (set! (-> s3-0 backup-collide-with) (-> v1-16 prim-core collide-with)) + ) + (set! (-> s3-0 event-self) 'touched) + (set! (-> self root) s3-0) + ) + (set! (-> self root pause-adjust-distance) 409600.0) + (set! (-> self root trans quad) (-> arg1 quad)) + (set! (-> self prefix) arg0) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-prebot-tentacle" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((v1-26 (-> self parent))) + (set! (-> self draw light-index) (-> (the-as prebot (if v1-26 + (the-as prebot (-> v1-26 0 self)) + ) + ) + draw + light-index + ) + ) + ) + (logior! (-> self mask) (process-mask enemy)) + (let ((v1-33 (-> self node-list data))) + (set! (-> v1-33 0 param0) (the-as (function cspace transformq none) cspace<-parent-joint!)) + (set! (-> v1-33 0 param1) (the-as basic (-> self parent))) + (set! (-> v1-33 0 param2) (the-as basic arg2)) + ) + (set! (-> self aim-jm) (new 'process 'joint-mod-polar-look-at)) + (initialize (-> self aim-jm) self 13) + (set! (-> self aim-jm ear) 2) + (set! (-> self aim-jm up) 0) + (set! (-> self aim-jm nose) 1) + (set! (-> self half-aim-jm) (new 'process 'joint-mod-polar-look-at)) + (initialize (-> self half-aim-jm) self 12) + (set! (-> self half-aim-jm ear) 2) + (set! (-> self half-aim-jm up) 0) + (set! (-> self half-aim-jm nose) 1) + (set! (-> self laser-sound) (new-sound-id)) + (set! (-> self laser-sound-playing) #f) + (set! (-> self event-hook) (-> (method-of-object self idle) event)) + (go-virtual idle) + ) + +(defmethod init-from-entity! ((this prebot) (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 18) 0))) + (set! (-> s4-0 total-prims) (the-as uint 19)) + (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 projectile)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set! (-> s3-0 transform-index) 8) + (set-vector! (-> s3-0 local-sphere) 0.0 -20480.0 0.0 61440.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 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) 10) + (set-vector! (-> v1-13 local-sphere) 0.0 2957.7217 3380.8384 20891.238) + ) + (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 enemy)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 15) + (set-vector! (-> v1-15 local-sphere) 0.0 7224.115 0.0 16506.88) + ) + (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 enemy)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 13) + (set-vector! (-> v1-17 local-sphere) 423.5264 3772.0063 0.0 10656.973) + ) + (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 enemy)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-19 prim-core action) (collide-action solid)) + (set! (-> v1-19 transform-index) 12) + (set-vector! (-> v1-19 local-sphere) -0.4096 0.0 0.0 11988.992) + ) + (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 enemy)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-21 prim-core action) (collide-action solid)) + (set! (-> v1-21 transform-index) 31) + (set-vector! (-> v1-21 local-sphere) 0.0 7223.7056 0.0 16506.88) + ) + (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 enemy)) + (set! (-> v1-23 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-23 prim-core action) (collide-action solid)) + (set! (-> v1-23 transform-index) 29) + (set-vector! (-> v1-23 local-sphere) -423.5264 3772.0063 0.0 10656.973) + ) + (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 enemy)) + (set! (-> v1-25 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-25 prim-core action) (collide-action solid)) + (set! (-> v1-25 transform-index) 28) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 11988.992) + ) + (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 enemy)) + (set! (-> v1-27 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-27 prim-core action) (collide-action solid)) + (set! (-> v1-27 transform-index) 8) + (set-vector! (-> v1-27 local-sphere) 0.0 1914.0608 1339.392 24913.51) + ) + (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 enemy)) + (set! (-> v1-29 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-29 prim-core action) (collide-action solid)) + (set! (-> v1-29 transform-index) 5) + (set-vector! (-> v1-29 local-sphere) 0.0 0.0 0.0 13063.373) + ) + (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 enemy)) + (set! (-> v1-31 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-31 prim-core action) (collide-action solid)) + (set! (-> v1-31 transform-index) 56) + (set-vector! (-> v1-31 local-sphere) 791.3472 14204.108 -1401.6512 12302.336) + ) + (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 enemy)) + (set! (-> v1-33 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-33 prim-core action) (collide-action solid)) + (set! (-> v1-33 transform-index) 57) + (set-vector! (-> v1-33 local-sphere) 120.0128 13062.144 1252.1472 11315.609) + ) + (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 enemy)) + (set! (-> v1-35 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-35 prim-core action) (collide-action solid)) + (set! (-> v1-35 transform-index) 54) + (set-vector! (-> v1-35 local-sphere) 557.056 12469.043 1004.3392 23741.234) + ) + (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 enemy)) + (set! (-> v1-37 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-37 prim-core action) (collide-action solid)) + (set! (-> v1-37 transform-index) 52) + (set-vector! (-> v1-37 local-sphere) 1070.2848 7083.6226 264.6016 14952.857) + ) + (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 enemy)) + (set! (-> v1-39 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-39 prim-core action) (collide-action solid)) + (set! (-> v1-39 transform-index) 63) + (set-vector! (-> v1-39 local-sphere) -790.528 14204.519 -1401.6512 12301.927) + ) + (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 enemy)) + (set! (-> v1-41 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-41 prim-core action) (collide-action solid)) + (set! (-> v1-41 transform-index) 64) + (set-vector! (-> v1-41 local-sphere) -120.4224 13062.963 1252.5568 11315.2) + ) + (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 enemy)) + (set! (-> v1-43 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-43 prim-core action) (collide-action solid)) + (set! (-> v1-43 transform-index) 61) + (set-vector! (-> v1-43 local-sphere) -556.6464 12469.453 1004.3392 23741.645) + ) + (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 enemy)) + (set! (-> v1-45 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-45 prim-core action) (collide-action solid)) + (set! (-> v1-45 transform-index) 59) + (set-vector! (-> v1-45 local-sphere) -1069.8752 7083.6226 264.192 14952.448) + ) + (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 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) 50) + (set-vector! (-> v1-47 local-sphere) 0.0 -3032.2688 430.08 11688.755) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-50 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-50 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-50 prim-core collide-with)) + ) + (set! (-> s4-0 event-self) 'touched) + (set! (-> this root) s4-0) + ) + (set! (-> this root pause-adjust-distance) 409600.0) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-prebot" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logior! (-> this mask) (process-mask enemy)) + (set! (-> this original-position quad) (-> this root trans quad)) + (init (-> this position) (-> this original-position) 0.004096 2048.0 0.125) + (set! (-> this draw light-index) (the-as uint 10)) + (dotimes (v1-64 28) + (set! (-> this critters v1-64) (the-as handle #f)) + ) + (set! (-> this gun) (the-as handle #f)) + (dotimes (v1-67 2) + (set! (-> this swords v1-67) (the-as handle #f)) + ) + (dotimes (v1-70 5) + (set! (-> this tentacles v1-70) (the-as handle #f)) + ) + (set! (-> this beam-projectile) (the-as handle #f)) + (dotimes (v1-73 5) + (set! (-> this pillars v1-73) (the-as handle #f)) + ) + (set! (-> this last-attack-id) (the-as uint 0)) + (let ((a0-133 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor 0))) + (if a0-133 + (change-to a0-133 this) + ) + ) + (init (-> this neck-angle) 0.0 0.01 0.1 0.9) + (let ((a0-135 (-> this node-list data 9))) + (set! (-> a0-135 param0) prebot-neck-callback) + ) + (prebot-method-45 this) + (set! (-> this shoulder-aim-jm) (new 'process 'joint-mod-polar-look-at)) + (initialize (-> this shoulder-aim-jm) this 28) + (set! (-> this shoulder-aim-jm ear) 2) + (set! (-> this shoulder-aim-jm up) 0) + (set! (-> this shoulder-aim-jm nose) 1) + (let ((v1-92 (-> this root root-prim))) + (set! (-> this root backup-collide-as) (-> v1-92 prim-core collide-as)) + (set! (-> this root backup-collide-with) (-> v1-92 prim-core collide-with)) + ) + (set! (-> this no-collision-timer) 0) + (init (-> this light-flash) (the-as vector #f) 0.01 0.1 0.9) + (set-params! (-> this light-pulse) (the-as vector #f) 0.01 0.1 0.9) + (prebot-light-pulse-off) + (set-params! (-> this light-pulse-flicker) 15 120 0.1 0.1) + (set! (-> this laugh-timer) 0) + (set! (-> this blocker) (the-as handle #f)) + (let ((v1-102 (-> this entity extra perm))) + (logior! (-> v1-102 status) (entity-perm-status bit-5)) + (set! (-> this flags) (the-as prebot-flag (-> v1-102 user-object 0))) + ) + (dotimes (v1-104 20) + (set! (-> this ammo v1-104 handle) (the-as handle #f)) + (set! (-> this ammo v1-104 birth-next-time) #f) + ) + (prebot-go-next-stage) + ) diff --git a/goal_src/jak3/levels/mine/prebot-states.gc b/goal_src/jak3/levels/mine/prebot-states.gc index b568327377..fc0e581337 100644 --- a/goal_src/jak3/levels/mine/prebot-states.gc +++ b/goal_src/jak3/levels/mine/prebot-states.gc @@ -7,3 +7,2523 @@ ;; DECOMP BEGINS +(defbehavior prebot-neck-callback prebot ((arg0 cspace) (arg1 transformq)) + (cspace<-parented-transformq-joint! arg0 arg1) + (let* ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) arg0)) + (s5-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> arg0 bone transform fvec) 1.0)) + (s2-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> arg0 bone transform uvec) 1.0)) + (s3-1 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) s4-0)) + (f28-0 (vector-normalize-ret-len! s3-1 1.0)) + ) + (vector-flatten! s3-1 s3-1 s5-0) + (vector-normalize! s3-1 1.0) + (let ((s4-1 self)) + (let ((f30-0 (vector-dot s3-1 s2-0))) + (cond + ((or (< 163840.0 f28-0) + (and (< 143360.0 f28-0) (= (fabs (-> s4-1 neck-angle target)) 0.0)) + (< f30-0 (cos 15473.777)) + (and (< f30-0 (cos 8192.0)) (= (fabs (-> s4-1 neck-angle target)) 0.0)) + (not (-> arg0 param1)) + ) + (set! (-> s4-1 neck-angle target) 0.0) + ) + (else + (set! (-> s4-1 neck-angle target) (fmin 1.0 (* 0.00012207031 (acos f30-0)))) + (if (< (vector-dot s3-1 (the-as vector (-> arg0 bone transform))) 0.0) + (set! (-> s4-1 neck-angle target) (- (-> s4-1 neck-angle target))) + ) + ) + ) + ) + (update! (-> s4-1 neck-angle) 0.0) + (let ((a1-9 (matrix-axis-angle! (new 'stack-no-clear 'matrix) s5-0 (* 8192.0 (-> s4-1 neck-angle value)))) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> arg0 bone transform trans quad)) + (vector-reset! (-> arg0 bone transform trans)) + (matrix*! (-> arg0 bone transform) a1-9 (-> arg0 bone transform)) + (set! (-> arg0 bone transform trans quad) (-> s5-1 quad)) + ) + ) + ) + 0 + (none) + ) + +(defbehavior prebot-light-pulse-off prebot () + (set! (-> self light-pulse target quad) (the-as uint128 0)) + (set! (-> self light-pulse value quad) (the-as uint128 0)) + (set! (-> self light-pulse vel quad) (the-as uint128 0)) + 0 + (none) + ) + +(defbehavior prebot-light-pulse-on prebot ((arg0 float) (arg1 float) (arg2 float)) + (let ((v0-0 (-> self light-pulse target))) + (set! (-> v0-0 x) arg0) + (set! (-> v0-0 y) arg1) + (set! (-> v0-0 z) arg2) + (set! (-> v0-0 w) 1.0) + v0-0 + ) + ) + +(defbehavior prebot-light-flash prebot ((arg0 float) (arg1 float) (arg2 float)) + (local-vars (v1-1 float) (a3-2 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) arg0) + (set! (-> v1-0 y) arg1) + (set! (-> v1-0 z) arg2) + (set! (-> v1-0 w) 1.0) + (.lvf vf1 (&-> (-> self light-flash value) 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 a3-2 vf1) + (let ((f0-4 a3-2)) + (.lvf vf1 (&-> v1-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-1 vf1) + (when (< f0-4 v1-1) + (set-vector! (-> self light-flash value) arg0 arg1 arg2 1.0) + (let ((v0-0 (-> self light-flash vel))) + (set! (-> v0-0 quad) (the-as uint128 0)) + v0-0 + ) + ) + ) + ) + ) + ) + +(defbehavior prebot-prespool prebot () + (case (-> self stage) + ((1) + (script-eval '(want-anim "prebot-hit-a")) + ) + ((2) + (script-eval '(want-anim "prebot-hit-b")) + ) + (else + (script-eval '(want-anim "mine-boss-res")) + ) + ) + ) + +;; WARN: Return type mismatch none vs object. +(defbehavior prebot-common prebot () + (dotimes (gp-0 20) + (cond + ((handle->process (-> self ammo gp-0 handle)) + (if (and (nonzero? (-> self ammo gp-0 timer)) (time-elapsed? (-> self ammo gp-0 timer) (seconds 20))) + (send-event (handle->process (-> self ammo gp-0 handle)) 'die) + ) + ) + ((-> self ammo gp-0 birth-next-time) + (set! (-> self ammo gp-0 birth-next-time) #f) + (set-time! (-> self ammo gp-0 timer)) + (let ((a0-16 (new 'static 'fact-info))) + (set-vector! (new 'stack-no-clear 'vector) 0.0 57001.605 0.0 1.0) + (set! (-> a0-16 options) (actor-option fade-out fall no-distance-check-fadeout)) + (set! (-> a0-16 fade-time) (seconds 10)) + (set! (-> a0-16 pickup-spawn-amount) 1.0) + (set! (-> a0-16 pickup-type) (pickup-type ammo-random)) + (set! (-> a0-16 pickup-amount) 10.0) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> self root trans quad)) + (set! (-> self root trans quad) + (-> (the-as (pointer uint128) (+ (the-as uint (-> self ammo 0 where)) (* 48 gp-0)))) + ) + (set! (-> a0-16 process) self) + (set! (-> self ammo gp-0 handle) + (ppointer->handle (drop-pickup a0-16 #t *entity-pool* (the-as fact-info #f) 0 #t)) + ) + (set! (-> self root trans quad) (-> s5-0 quad)) + ) + ) + ) + ) + ) + (update! (-> self light-flash) (the-as vector #f)) + (when (!= (-> self light-pulse target w) 0.0) + (update-with-delay! (-> self light-pulse-flicker)) + (update! (-> self light-pulse) (-> self light-pulse-flicker value)) + ) + (let ((a0-27 (new 'stack-no-clear 'vector))) + (vector+! a0-27 (-> self light-flash value) (the-as vector (-> self light-pulse))) + (set! (-> a0-27 x) (fmax 0.0 (-> a0-27 x))) + (set! (-> a0-27 y) (fmax 0.0 (-> a0-27 y))) + (set! (-> a0-27 z) (fmax 0.0 (-> a0-27 z))) + (set! (-> a0-27 w) 1.0) + (set-mined-filter! a0-27 0) + ) + (set! (-> *game-info* counter) (the float (-> self stage))) + (prebot-prespool) + (update! (-> self position) (the-as vector #f)) + (set! (-> self root trans quad) (-> self position value quad)) + (let* ((f0-17 (* 54.613335 (the float (current-time)))) + (f0-18 (- f0-17 (* (the float (the int (/ f0-17 65536.0))) 65536.0))) + ) + (+! (-> self root trans y) (* 2048.0 (cos f0-18))) + ) + (cond + ((and (-> self next-state) (= (-> self next-state name) 'watch-critters)) + (remove-setting! 'point-of-interest) + ) + (else + (let ((t0-1 (new 'static 'vector))) + (set! (-> t0-1 quad) (-> self root trans quad)) + (+! (-> t0-1 y) 16384.0) + (set-setting! 'point-of-interest 'abs t0-1 0) + ) + ) + ) + ) + +(defmethod deactivate ((this prebot)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set-mined-filter! *zero-vector* 0) + ((method-of-type process-focusable deactivate) this) + (none) + ) + +;; WARN: Return type mismatch process-focusable vs prebot. +(defmethod relocate ((this prebot) (offset int)) + (if (nonzero? (-> this shoulder-aim-jm)) + (&+! (-> this shoulder-aim-jm) offset) + ) + (the-as prebot ((method-of-type process-focusable relocate) this offset)) + ) + +;; WARN: Return type mismatch int vs object. +(defbehavior prebot-go-next-stage prebot () + (local-vars (v1-4 (pointer actor-group)) (sv-16 res-tag)) + (cond + ((not (task-node-closed? (game-task-node mine-boss-introduction))) + (set! (-> self stage) 0) + 0 + ) + ((task-node-closed? (game-task-node mine-boss-resolution)) + (set! (-> self stage) 4) + ) + ((begin + (set! (-> self stage) 1) + (set! sv-16 (new 'static 'res-tag)) + (set! v1-4 (res-lump-data (-> self entity) 'actor-groups (pointer actor-group) :tag-ptr (& sv-16))) + (and v1-4 (nonzero? (-> sv-16 elt-count))) + ) + (let ((v1-5 (-> v1-4 0))) + (dotimes (a0-5 (-> v1-5 length)) + (let ((a1-7 (-> v1-5 data a0-5 actor))) + (when a1-7 + (if (logtest? (-> a1-7 extra perm status) (entity-perm-status subtask-complete)) + (+! (-> self stage) 1) + ) + ) + ) + ) + ) + ) + (else + (format #t "ERROR: could not find actor-group for ~S~%" (-> self name)) + ) + ) + (set! (-> self stage-hit-points) 1.0) + (remove-setting! 'entity-name) + (when (and (< (-> self stage) 4) (not (handle->process (-> self blocker)))) + (let ((gp-0 (new 'static 'inline-array vector 2 (new 'static 'vector) (new 'static 'vector)))) + (set! (-> gp-0 0 quad) (-> self entity extra trans quad)) + (+! (-> gp-0 0 x) 163840.0) + (+! (-> gp-0 0 y) -81920.0) + (+! (-> gp-0 0 z) 4096.0) + (set! (-> gp-0 1 quad) (-> self entity extra trans quad)) + (+! (-> gp-0 1 x) -163840.0) + (+! (-> gp-0 1 y) -81920.0) + (+! (-> gp-0 1 z) 4096.0) + (set! (-> self blocker) + (ppointer->handle (process-spawn blocking-plane gp-0 #x48c80000 :name "blocking-plane" :to self)) + ) + ) + (send-event (handle->process (-> self blocker)) 'collide-as #x4000000) + ) + (let ((v1-39 (-> self stage))) + (cond + ((zero? v1-39) + (go-virtual hidden) + ) + ((= v1-39 1) + (set-setting! 'entity-name "camera-308" 0.0 0) + (set! (-> self laugh-played) #f) + (go-virtual jump-to-hover) + ) + ((or (= v1-39 2) (= v1-39 3)) + (set-setting! 'entity-name "camera-308" 0.0 0) + (set! (-> self laugh-played) #f) + (go-virtual pre-slam) + ) + (else + (go-virtual beaten) + ) + ) + ) + 0 + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this prebot)) + (the-as search-info-flag 0) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod prebot-method-45 ((this prebot)) + (set! (-> this node-list data 9 param1) (the-as basic #t)) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod prebot-method-46 ((this prebot)) + (set! (-> this node-list data 9 param1) #f) + (none) + ) + +(defbehavior prebot-handler prebot ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('touched-hot-pillar) + (when (not (logtest? (-> self flags) (prebot-flag pf0))) + (logior! (-> self flags) (prebot-flag pf0)) + (let ((v1-7 (-> self entity extra perm))) + (logior! (-> v1-7 status) (entity-perm-status bit-5)) + (set! (-> v1-7 user-object 0) (-> self flags)) + ) + (talker-spawn-func (-> *talker-speech* 331) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + (('shot-hit) + (if (line-in-view-frustum? (the-as vector (-> arg3 param 0)) (the-as vector (-> arg3 param 0))) + (prebot-light-flash 0.0 0.4 1.0) + ) + ) + (('skip 'blocker-died) + (if (= arg2 'blocker-died) + (prebot-light-flash 1.0 0.4 0.0) + ) + (set! (-> self which-movie) (the-as int (-> arg3 param 0))) + (go-virtual play-hit-movie) + ) + (('railblocker-hittable?) + (when (-> arg3 param 0) + (set! (-> self minecar-hint-timer) 0) + 0 + ) + (and (and (-> self next-state) (let ((v1-21 (-> self next-state name))) + (or (= v1-21 'watch-pillars) (= v1-21 'destroy-pillars)) + ) + ) + (< (+ 32358.4 (-> self entity extra trans y)) (-> (target-pos 0) y)) + ) + ) + (('attack) + (when (>= (+ (current-time) (seconds -5.1)) (-> self laugh-timer)) + (set-time! (-> self laugh-timer)) + (sound-play "prebot-laugh" :position (-> self root trans)) + ) + #t + ) + (('start-critter) + (dotimes (v1-34 28) + (when (not (handle->process (-> self critters v1-34))) + (set! (-> self critters v1-34) (process->handle arg0)) + (set! v0-0 #f) + (goto cfg-50) + ) + ) + (set! v0-0 #f) + (label cfg-50) + v0-0 + ) + (('eco-creature-died) + (dotimes (v1-38 20) + (when (and (not (-> self ammo v1-38 birth-next-time)) (not (handle->process (-> self ammo v1-38 handle)))) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> self ammo 0 where)) (* 48 v1-38)))) + (-> (the-as vector (-> arg3 param 0)) quad) + ) + (set! (-> self ammo v1-38 birth-next-time) #t) + (return 0) + ) + ) + #f + ) + ) + ) + +(defstate beaten (prebot) + :virtual #t + :enter (behavior () + (ja-channel-set! 0) + (ja-post) + (let ((a0-2 (handle->process (-> self blocker)))) + (if a0-2 + (deactivate a0-2) + ) + ) + (remove-setting! 'point-of-interest) + ) + :exit (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! prebot-idle-ja :num! min) + ) + :code sleep-code + ) + +(defstate play-fma (prebot) + :virtual #t + :enter (behavior () + (set-blackout-frames (seconds 0.007)) + (set-time! (-> self state-time)) + (case (-> self stage) + ((1) + (process-spawn scene-player :init scene-player-init "prebot-hit-a" #t #f :name "scene-player") + ) + ((2) + (process-spawn scene-player :init scene-player-init "prebot-hit-b" #t #f :name "scene-player") + ) + (else + (let* ((v1-13 (-> *game-info* sub-task-list (game-task-node mine-boss-resolution))) + (v1-15 (if (-> v1-13 manager) + (-> v1-13 manager manager) + (the-as handle #f) + ) + ) + ) + (send-event (handle->process v1-15) 'complete) + ) + ) + ) + (deactivate self) + ) + :trans (behavior () + (remove-setting! 'point-of-interest) + (if (time-elapsed? (-> self state-time) (seconds 0.5)) + (deactivate self) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defstate play-hit-movie (prebot) + :virtual #t + :enter (behavior () + (kill-by-type eco-pill *active-pool*) + (kill-by-type ammo-collectable *active-pool*) + (prebot-light-pulse-off) + ) + :exit (behavior () + (process-release? *target*) + ) + :trans (behavior () + (remove-setting! 'point-of-interest) + (prebot-prespool) + (set-letterbox-frames (seconds 0.007)) + (let ((v1-4 (ja-group))) + (cond + ((and v1-4 (or (= v1-4 prebot-mine-boss-train-1-ja) + (= v1-4 prebot-mine-boss-train-2-ja) + (= v1-4 prebot-mine-boss-train-3-ja) + ) + ) + (process-grab? *target* #f) + (ja :num! (seek!)) + (when (ja-done? 0) + (set! (-> self root trans quad) (-> self entity extra trans quad)) + (process-release? *target*) + (go-virtual play-fma) + ) + ) + (else + (let ((gp-0 (quaternion-identity! (new 'stack-no-clear 'quaternion)))) + (let ((v1-19 (the-as entity-actor (entity-by-name "scene-stage-133")))) + (when v1-19 + (set! (-> self root trans quad) (-> v1-19 extra trans quad)) + (quaternion-copy! gp-0 (-> v1-19 quat)) + ) + ) + (ja-channel-push! 1 0) + (let ((v1-20 (-> self which-movie))) + (cond + ((zero? v1-20) + (ja :group! prebot-mine-boss-train-1-ja :num! min) + ) + ((= v1-20 1) + (ja :group! prebot-mine-boss-train-2-ja :num! min) + ) + (else + (ja :group! prebot-mine-boss-train-3-ja :num! min) + ) + ) + ) + (process-grab? *target* #f) + (let ((s5-3 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-cav-minecar" (the-as (pointer level) #f)) + #f + 0 + :name "cav-minecar" + :to self + :stack-size #x20000 + ) + ) + ) + (when s5-3 + (send-event (ppointer->process s5-3) 'anim-mode 'clone-anim) + (send-event (ppointer->process s5-3) 'clone-copy-trans #f) + (send-event (ppointer->process s5-3) 'rot-quat gp-0) + ) + ) + (let ((s5-5 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-prebot-camera" (the-as (pointer level) #f)) + #f + 0 + :name "prebot-camera" + :to self + :stack-size #x20000 + ) + ) + ) + (when s5-5 + (send-event (ppointer->process s5-5) 'anim-mode 'clone-anim) + (send-event (ppointer->process s5-5) 'clone-copy-trans #f) + (send-event (ppointer->process s5-5) 'rot-quat gp-0) + (let ((v1-83 + (process-spawn othercam (ppointer->process s5-5) 4 #f #f :name "othercam" :to (ppointer->process s5-5)) + ) + ) + (if v1-83 + (send-event (ppointer->process v1-83) 'mask 0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defbehavior prebot-set-cam-slave-fov prebot ((arg0 float)) + (let ((v1-1 (-> *camera* slave))) + (if v1-1 + (set! (-> v1-1 0 fov) arg0) + ) + ) + ) + +(defstate destroy-pillars (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (set! (-> self state-time) 0) + (set! (-> self num-attacks) (the-as uint 0)) + (set-setting! 'entity-name "camera-312" 0.0 0) + (dotimes (gp-0 5) + (send-event (handle->process (-> self pillars gp-0)) 'vulnerable) + ) + ) + :exit (behavior () + (prebot-set-cam-slave-fov 11650.845) + (set-setting! 'entity-name "camera-308" 0.0 0) + (blend-to-off! (-> self shoulder-aim-jm) (seconds 0.1) #f) + ) + :trans (behavior () + (if (= (get-aspect-ratio) 'aspect16x9) + (prebot-set-cam-slave-fov 13653.333) + (prebot-set-cam-slave-fov 11650.845) + ) + (let ((v1-4 (ja-group))) + (cond + ((and v1-4 (= v1-4 prebot-gun-stow-again-ja)) + (ja :num! (seek!)) + (when (and (= (-> self stage) 1) (not (-> self laugh-played)) (>= (ja-aframe-num 0) 280.0)) + (set-time! (-> self laugh-timer)) + (set! (-> self laugh-played) #t) + (sound-play "prebot-laugh" :position (-> self root trans)) + ) + (when (ja-done? 0) + (let ((a0-14 (handle->process (-> self gun)))) + (if a0-14 + (deactivate a0-14) + ) + ) + (go-virtual slam) + ) + ) + ((let ((v1-39 (ja-group))) + (and v1-39 (= v1-39 prebot-gun-fire-ja)) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-gun-target-ja :num! min) + (set-time! (-> self state-time)) + ) + ) + ((let ((v1-60 (ja-group))) + (and v1-60 (= v1-60 prebot-gun-target-ja)) + ) + (ja :num! (loop!)) + (while (and (< (-> self num-attacks) (the-as uint 4)) + (not (handle->process (-> self pillars (-> self num-attacks)))) + ) + (+! (-> self num-attacks) 1) + ) + (let ((gp-3 (handle->process (-> self pillars (-> self num-attacks))))) + (when gp-3 + (blend-on! (-> self shoulder-aim-jm) (seconds 0.25) 1.0 #f) + (let ((a1-10 (new 'stack-no-clear 'vector))) + (set! (-> a1-10 quad) (-> (the-as process-drawable gp-3) root trans quad)) + (+! (-> a1-10 y) -14336.0) + (set-target! (-> self shoulder-aim-jm) a1-10) + ) + ) + ) + (when (time-elapsed? (-> self state-time) (seconds 1)) + (set-time! (-> self state-time)) + (blend-to-off! (-> self shoulder-aim-jm) (seconds 0.1) #f) + (ja-channel-push! 1 (seconds 0.1)) + (cond + ((and (>= (-> self num-attacks) (the-as uint 4)) + (not (handle->process (-> self pillars (-> self num-attacks)))) + ) + (ja :group! prebot-gun-stow-again-ja :num! min) + (set! (-> self laugh-played) #f) + ) + (else + (ja :group! prebot-gun-fire-ja :num! min) + (send-event (handle->process (-> self gun)) 'fire) + (prebot-light-flash 1.0 0.4 0.0) + ) + ) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-gun-target-ja :num! min) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; WARN: Return type mismatch float vs object. +(defbehavior prebot-setup-shot-offsets prebot () + (let* ((f30-0 -2048.0) + (f28-0 12288.0) + (v1-3 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-4 (the-as number (logior #x3f800000 v1-3))) + ) + (set! (-> self shot-extra-y) (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-4))))) + ) + (let* ((f30-1 12288.0) + (f28-1 8192.0) + (v1-9 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-10 (the-as number (logior #x3f800000 v1-9))) + ) + (set! (-> self shot-extra-xz) (+ f30-1 (* f28-1 (+ -1.0 (the-as float v1-10))))) + ) + (let* ((v1-13 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-14 (the-as number (logior #x3f800000 v1-13))) + ) + (if (< (+ -1.0 (the-as float v1-14)) 0.5) + (set! (-> self shot-extra-xz) (- (-> self shot-extra-xz))) + ) + ) + ) + +(defstate watch-pillars (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (set-time! (-> self state-time)) + (cond + ((and (logtest? (-> self flags) (prebot-flag pf1)) (logtest? (-> self flags) (prebot-flag pf2))) + (set! (-> self pillar-hint-timer) 0) + 0 + ) + (else + (set-time! (-> self pillar-hint-timer)) + ) + ) + (set-time! (-> self minecar-hint-timer)) + (case (-> self stage) + ((1) + (set! (-> self num-attacks) (the-as uint 20)) + ) + ((2) + (set! (-> self num-attacks) (the-as uint 15)) + ) + (else + (set! (-> self num-attacks) (the-as uint 10)) + ) + ) + (prebot-setup-shot-offsets) + (set-setting! 'entity-name "camera-312" 0.0 0) + ) + :exit (behavior () + (blend-to-off! (-> self shoulder-aim-jm) (seconds 0.1) #f) + (prebot-set-cam-slave-fov 11650.845) + (set-setting! 'entity-name "camera-308" 0.0 0) + ) + :trans (behavior () + (when (send-event self 'railblocker-hittable? #f) + (set! (-> self pillar-hint-timer) 0) + 0 + ) + (when (nonzero? (-> self pillar-hint-timer)) + (set! (-> self minecar-hint-timer) (+ (current-time) (seconds -4))) + (when (time-elapsed? (-> self pillar-hint-timer) (seconds 10)) + (set! (-> self pillar-hint-timer) 0) + (cond + ((not (logtest? (-> self flags) (prebot-flag pf1))) + (talker-spawn-func (-> *talker-speech* 328) *entity-pool* (target-pos 0) (the-as region #f)) + (logior! (-> self flags) (prebot-flag pf1)) + ) + ((not (logtest? (-> self flags) (prebot-flag pf2))) + (talker-spawn-func (-> *talker-speech* 330) *entity-pool* (target-pos 0) (the-as region #f)) + (logior! (-> self flags) (prebot-flag pf2)) + ) + ) + (let ((v1-28 (-> self entity extra perm))) + (logior! (-> v1-28 status) (entity-perm-status bit-5)) + (set! (-> v1-28 user-object 0) (-> self flags)) + ) + ) + ) + (when (and (nonzero? (-> self minecar-hint-timer)) (time-elapsed? (-> self minecar-hint-timer) (seconds 10))) + (set! (-> self minecar-hint-timer) 0) + (cond + ((< 1 (-> self stage)) + (when (not (logtest? (-> self flags) (prebot-flag pf6))) + (talker-spawn-func (-> *talker-speech* 333) *entity-pool* (target-pos 0) (the-as region #f)) + (logior! (-> self flags) (prebot-flag pf6)) + ) + ) + ((not (logtest? (-> self flags) (prebot-flag pf3))) + (talker-spawn-func (-> *talker-speech* 327) *entity-pool* (target-pos 0) (the-as region #f)) + (logior! (-> self flags) (prebot-flag pf3)) + ) + ((not (logtest? (-> self flags) (prebot-flag pf4))) + (talker-spawn-func (-> *talker-speech* 329) *entity-pool* (target-pos 0) (the-as region #f)) + (logior! (-> self flags) (prebot-flag pf4)) + ) + ((not (logtest? (-> self flags) (prebot-flag pf5))) + (talker-spawn-func (-> *talker-speech* 332) *entity-pool* (target-pos 0) (the-as region #f)) + (logior! (-> self flags) (prebot-flag pf5)) + ) + ) + (let ((v1-63 (-> self entity extra perm))) + (logior! (-> v1-63 status) (entity-perm-status bit-5)) + (set! (-> v1-63 user-object 0) (-> self flags)) + ) + ) + (if (= (get-aspect-ratio) 'aspect16x9) + (prebot-set-cam-slave-fov 13653.333) + (prebot-set-cam-slave-fov 11650.845) + ) + (let ((v1-68 (ja-group))) + (cond + ((and v1-68 (= v1-68 prebot-gun-from-tentacle-ja)) + (ja :num! (seek!)) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-gun-target-ja :num! min) + (set-time! (-> self state-time)) + (prebot-setup-shot-offsets) + ) + ) + ((let ((v1-90 (ja-group))) + (and v1-90 (= v1-90 prebot-gun-fire-ja)) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (if (>= (the-as uint 1) (-> self num-attacks)) + (go-virtual destroy-pillars) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-gun-target-ja :num! min) + (set-time! (-> self state-time)) + (prebot-setup-shot-offsets) + ) + ) + ((let ((v1-117 (ja-group))) + (and v1-117 (= v1-117 prebot-gun-target-ja)) + ) + (ja :num! (loop!)) + (cond + ((time-elapsed? (-> self state-time) (seconds 1)) + (send-event (handle->process (-> self gun)) 'fire) + (prebot-light-flash 1.0 0.4 0.0) + (+! (-> self num-attacks) -1) + (set-time! (-> self state-time)) + (blend-to-off! (-> self shoulder-aim-jm) (seconds 0.1) #f) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! prebot-gun-fire-ja :num! min) + ) + (else + (blend-on! (-> self shoulder-aim-jm) (seconds 0.25) 1.0 #f) + (let ((gp-10 (new 'stack-no-clear 'vector))) + (set! (-> gp-10 quad) (-> (target-pos 0) quad)) + (let ((s5-6 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node prebot-lod0-jg shoulderL)))) + (+! (-> gp-10 y) (-> self shot-extra-y)) + (set! (-> s5-6 y) (-> s5-6 x)) + (set! (-> s5-6 x) (-> s5-6 z)) + (set! (-> s5-6 z) (- (-> s5-6 y))) + (set! (-> s5-6 y) 0.0) + (vector-normalize! s5-6 (-> self shot-extra-xz)) + (vector+! gp-10 gp-10 s5-6) + ) + (set-target! (-> self shoulder-aim-jm) gp-10) + ) + ) + ) + ) + ((let ((v1-154 (ja-group))) + (and v1-154 (= v1-154 prebot-tentacle-stow-ja)) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-gun-from-tentacle-ja :num! min) + (set! (-> self gun) + (ppointer->handle (process-spawn prebot-gun "gun-" (-> self root trans) :name "prebot-gun" :to self)) + ) + (setup-masks (-> self draw) 0 0) + (dotimes (gp-13 5) + (let ((a0-81 (handle->process (-> self tentacles gp-13)))) + (if a0-81 + (deactivate a0-81) + ) + ) + ) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-tentacle-stow-ja :num! min) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; WARN: Return type mismatch none vs object. +(defbehavior prebot-fire-tentacle prebot ((arg0 handle) (arg1 vector)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> self root trans quad)) + (let ((v1-2 (handle->process arg0))) + (if v1-2 + (vector<-cspace! s5-0 (-> (the-as prebot-tentacle v1-2) node-list data 14)) + ) + ) + (let ((a2-0 (new 'stack-no-clear 'vector))) + (vector-! a2-0 arg1 s5-0) + (set! (-> *part-id-table* 4469 init-specs 4 initial-valuef) (vector-length a2-0)) + (draw-beam (-> *part-id-table* 4469) s5-0 a2-0 #f) + ) + (launch-particles (-> *part-id-table* 4470) s5-0) + ) + (launch-particles (-> *part-id-table* 4471) arg1) + ) + +(defstate create-pillars (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self num-attacks) (the-as uint 0)) + (set-setting! 'entity-name "camera-309" 0.0 0) + (set-mined-pillar-texture! 0.0) + ) + :exit (behavior () + (set-setting! 'entity-name "camera-312" 0.0 0) + (set-mined-pillar-texture! 1.0) + (let ((a0-3 (handle->process (-> self beam-projectile)))) + (when a0-3 + (deactivate a0-3) + (set! (-> self beam-projectile) (the-as handle #f)) + ) + ) + ) + :trans (behavior () + (let* ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (v1-0 (-> self stage)) + (gp-0 (cond + ((= v1-0 1) + (new 'static 'boxed-array :type prebot-eco-pillar-launch-spec + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x 40960.0 :z 163840.0 :w 1.0) + :height 12288.0 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x 20480.0 :z 204800.0 :w 1.0) + :height 22528.0 + :style 1 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x -20480.0 :z 204800.0 :w 1.0) + :height 32768.0 + :style 2 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :z 184320.0 :w 1.0) + :height 43008.0 + :style 3 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x -40960.0 :z 163840.0 :w 1.0) + :height 53248.0 + ) + ) + ) + ((= v1-0 2) + (new 'static 'boxed-array :type prebot-eco-pillar-launch-spec + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x 12288.0 :z 184320.0 :w 1.0) + :height 12288.0 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x -40960.0 :z 204800.0 :w 1.0) + :height 22528.0 + :style 1 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x -32768.0 :z 163840.0 :w 1.0) + :height 32768.0 + :style 2 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :z 131072.0 :w 1.0) + :height 43008.0 + :style 3 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x 49152.0 :z 143360.0 :w 1.0) + :height 53248.0 + ) + ) + ) + (else + (new 'static 'boxed-array :type prebot-eco-pillar-launch-spec + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x -73728.0 :z 163840.0 :w 1.0) + :height 12288.0 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x -40960.0 :z 204800.0 :w 1.0) + :height 22528.0 + :style 1 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x -20480.0 :z 163840.0 :w 1.0) + :height 32768.0 + :style 2 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x 24576.0 :z 163840.0 :w 1.0) + :height 43008.0 + :style 3 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x 8192.0 :z 204800.0 :w 1.0) + :height 53248.0 + ) + ) + ) + ) + ) + ) + (let ((f30-0 0.0)) + (set! (-> self num-attacks) (the-as uint 0)) + (dotimes (s3-0 (min 5 (-> gp-0 length))) + (vector+! s5-0 (-> gp-0 s3-0 offset) (-> self original-position)) + (set! (-> s4-0 quad) (-> s5-0 quad)) + (+! (-> s4-0 x) + (* 4096.0 (cos (* 1747.6267 (the float (+ (* 30 s3-0) (- (current-time) (-> self state-time))))))) + ) + (cond + ((not (time-elapsed? (-> self state-time) (+ (* 240 s3-0) 75))) + (send-event (handle->process (-> self tentacles s3-0)) 'look-at s5-0 #f) + ) + ((not (handle->process (-> self pillars s3-0))) + (let ((v1-27 (process-spawn prebot-eco-pillar s5-0 (-> gp-0 s3-0) :name "prebot-eco-pillar" :to self))) + (if v1-27 + (set! (-> self pillars s3-0) (ppointer->handle v1-27)) + ) + ) + (send-event (handle->process (-> self tentacles s3-0)) 'look-at s5-0 #t) + ) + (else + (set! f30-0 (cond + ((not (time-elapsed? (-> self state-time) (+ (* 240 s3-0) 1575))) + (prebot-fire-tentacle (-> self tentacles s3-0) s4-0) + (+ 1.0 f30-0) + ) + (else + (send-event (handle->process (-> self tentacles s3-0)) 'look-at #f #f) + f30-0 + ) + ) + ) + ) + ) + (let ((v1-63 (handle->process (-> self pillars s3-0)))) + (when v1-63 + (if (and (-> v1-63 next-state) (= (-> v1-63 next-state name) 'wait-to-cool)) + (+! (-> self num-attacks) 1) + ) + ) + ) + ) + (if (= f30-0 0.0) + (prebot-light-pulse-off) + (prebot-light-pulse-on (+ 0.2 (* 0.1 f30-0)) (+ 0.1 (* 0.04 f30-0)) 0.0) + ) + ) + (when (>= (-> self num-attacks) (the-as uint (min 5 (-> gp-0 length)))) + (dotimes (s5-1 (min 5 (-> gp-0 length))) + (send-event (handle->process (-> self pillars s5-1)) 'cool-down) + ) + (sound-play "pillar-cool") + (go-virtual watch-pillars) + ) + ) + (ja :num! (loop!)) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defstate activate-tentacles (prebot) + :virtual #t + :event prebot-handler + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 prebot-tentacle-launch-ja)) + (ja :num! (seek!)) + (when (and (not (-> self grunt-played)) (or (and (= (-> self stage) 1) (>= (ja-aframe-num 0) 165.0)) + (and (= (-> self stage) 2) (>= (ja-aframe-num 0) 167.0)) + (and (= (-> self stage) 3) (>= (ja-aframe-num 0) 178.0)) + ) + ) + (set! (-> self grunt-played) #t) + (case (-> self stage) + ((1) + (sound-play "prebot-grunts" :position (-> self root trans)) + ) + ((2) + (sound-play "prebot-trythis" :position (-> self root trans)) + ) + ((3) + (sound-play "prebot-greeting" :position (-> self root trans)) + ) + ) + ) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-hatch-hover-ja :num! min) + (go-virtual create-pillars) + ) + ) + (else + (let ((v1-53 (ja-group))) + (cond + ((and v1-53 (= v1-53 prebot-tentacle-launch-pre-ja)) + (ja :num! (seek!)) + (when (ja-done? 0) + (set! (-> self tentacles 0) + (ppointer->handle + (process-spawn prebot-tentacle "a-" (-> self root trans) 47 :name "prebot-tentacle" :to self) + ) + ) + (set! (-> self tentacles 1) + (ppointer->handle + (process-spawn prebot-tentacle "b-" (-> self root trans) 48 :name "prebot-tentacle" :to self) + ) + ) + (set! (-> self tentacles 2) + (ppointer->handle + (process-spawn prebot-tentacle "c-" (-> self root trans) 49 :name "prebot-tentacle" :to self) + ) + ) + (set! (-> self tentacles 3) + (ppointer->handle + (process-spawn prebot-tentacle "d-" (-> self root trans) 45 :name "prebot-tentacle" :to self) + ) + ) + (set! (-> self tentacles 4) + (ppointer->handle + (process-spawn prebot-tentacle "e-" (-> self root trans) 46 :name "prebot-tentacle" :to self) + ) + ) + (ja-channel-push! 1 0) + (ja :group! prebot-tentacle-launch-ja :num! min) + (set! (-> self grunt-played) #f) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-tentacle-launch-pre-ja :num! min) + (setup-masks (-> self draw) 0 0) + ) + ) + ) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defstate watch-critters (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 prebot-idle-ja)) + (ja :num! (loop!)) + (dotimes (gp-0 28) + (let ((a0-6 (handle->process (-> self critters gp-0)))) + (when a0-6 + (if (or (time-elapsed? (-> self state-time) (seconds 45)) + (< (-> (the-as process-drawable a0-6) root trans y) (+ -40960.0 (-> self entity extra trans y))) + ) + (send-event a0-6 'instant-death) + (goto cfg-26) + ) + ) + ) + ) + (go-virtual activate-tentacles) + (label cfg-26) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-idle-ja :num! min) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; WARN: Return type mismatch int vs object. +(defbehavior prebot-launch-critter prebot () + (cond + ((zero? (-> self nav)) + (format #t "ERROR: ~s nav mesh not found~%" (-> self name)) + (set! (-> self critters-to-launch) 0) + 0 + ) + (else + (let ((s4-0 (new 'stack-no-clear 'enemy-init-by-other-params)) + (gp-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (let ((s3-0 (handle->process (-> self gun)))) + (cond + (s3-0 + (vector<-cspace! gp-0 (-> (the-as process-drawable s3-0) node-list data 7)) + (if (logtest? (-> *part-group-id-table* 1334 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 1334) + :duration (seconds 1) + :mat-joint (-> (the-as process-drawable s3-0) node-list data 7 bone transform) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 1334) + :duration (seconds 1) + :mat-joint (-> (the-as process-drawable s3-0) node-list data 7 bone transform) + ) + ) + ) + (else + (vector<-cspace! gp-0 (joint-node prebot-lod0-jg head)) + ) + ) + ) + (set! (-> s5-0 quad) (-> self nav state mesh bounds quad)) + (case (-> self stage) + ((1) + (+! (-> s5-0 x) 61440.0) + (set! (-> s5-0 x) (- (-> s5-0 x) (* 32768.0 (the float (-> self critters-to-launch))))) + ) + (else + (+! (-> s5-0 x) 61440.0) + (set! (-> s5-0 x) (- (-> s5-0 x) (* 28672.0 (the float (-> self critters-to-launch))))) + ) + ) + (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) #f) + (let ((v1-53 (process-spawn + prebot-large-eco-creature + :init enemy-init-by-other + self + s4-0 + :name "prebot-large-eco-creature" + :to self + ) + ) + ) + (when v1-53 + (send-event (ppointer->process v1-53) 'set-dest gp-0 s5-0 #x46c00000 #x44160000) + (+! (-> self critters-to-launch) -1) + (prebot-light-flash 1.0 0.4 0.0) + (sound-play "launch-cav-eco" :position gp-0) + (the-as int (sound-play "launch-whoosh" :position gp-0)) + ) + ) + ) + ) + ) + ) + +(defstate launch-critters (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (case (-> self stage) + ((1) + (set! (-> self critters-to-launch) 2) + ) + (else + (set! (-> self critters-to-launch) 3) + ) + ) + ) + :exit (behavior () + (sound-play "boss-win-vox" :position (-> self root trans)) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 prebot-gun-stow-ja)) + (ja :num! (seek!)) + (when (ja-done? 0) + (let ((a0-7 (handle->process (-> self gun)))) + (if a0-7 + (deactivate a0-7) + ) + ) + (go-virtual watch-critters) + ) + ) + (else + (let ((v1-25 (ja-group))) + (cond + ((and v1-25 (= v1-25 prebot-gun-launch-ja)) + (ja :num! (seek!)) + (when (ja-done? 0) + (cond + ((= (-> self critters-to-launch) 1) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-gun-stow-ja :num! min) + ) + (else + (ja :num-func num-func-identity :frame-num 0.0) + ) + ) + (prebot-launch-critter) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-gun-launch-ja :num! min) + (prebot-launch-critter) + ) + ) + ) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defstate sweep-done (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (set! (-> self position target quad) (-> self original-position quad)) + (set! (-> self position target y) (-> self original-position y)) + ) + :exit (behavior () + (dotimes (gp-0 2) + (let ((a0-1 (handle->process (-> self swords gp-0)))) + (if a0-1 + (deactivate a0-1) + ) + ) + ) + (prebot-light-pulse-off) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 prebot-swords-horizontal-R2L-hold-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-horizontal-R2L-complete-ja :num! min) + ) + ((let ((v1-12 (ja-group))) + (and v1-12 (= v1-12 prebot-sword-R-horizontal-R2L-hold-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-horizontal-R2L-complete-ja :num! min) + ) + ((let ((v1-22 (ja-group))) + (and v1-22 (= v1-22 prebot-sword-R-horizontal-L2R-hold-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-horizontal-L2R-complete-ja :num! min) + ) + ((let ((v1-32 (ja-group))) + (and v1-32 (= v1-32 prebot-swords-horizontal-R2L-hold-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-horizontal-R2L-complete-ja :num! min) + ) + ((let ((v1-42 (ja-group))) + (and v1-42 (= v1-42 prebot-sword-L-horizontal-R2L-hold-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-horizontal-R2L-complete-ja :num! min) + ) + ((let ((v1-52 (ja-group))) + (and v1-52 (= v1-52 prebot-sword-L-horizontal-L2R-hold-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-horizontal-L2R-complete-ja :num! min) + ) + ((let ((v1-62 (ja-group))) + (and v1-62 (or (= v1-62 prebot-sword-R-horizontal-L2R-complete-ja) + (= v1-62 prebot-sword-R-horizontal-R2L-complete-ja) + (= v1-62 prebot-sword-L-horizontal-L2R-complete-ja) + (= v1-62 prebot-sword-L-horizontal-R2L-complete-ja) + (= v1-62 prebot-swords-horizontal-L2R-complete-ja) + (= v1-62 prebot-swords-horizontal-R2L-complete-ja) + ) + ) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (dotimes (gp-6 2) + (let ((a0-58 (handle->process (-> self swords gp-6)))) + (if a0-58 + (deactivate a0-58) + ) + ) + ) + (setup-masks (-> self draw) 28 0) + (prebot-light-pulse-off) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-gun-from-sword-R-ja :num! min) + (set! (-> self gun) + (ppointer->handle (process-spawn prebot-gun "gun-" (-> self root trans) :name "prebot-gun" :to self)) + ) + ) + ) + (else + (let ((v1-99 (ja-group))) + (cond + ((and v1-99 (= v1-99 prebot-gun-from-sword-R-ja)) + (ja :num! (seek!)) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-gun-aim-ja :num! min) + ) + ) + (else + (let ((f0-14 (vector-vector-distance-squared (the-as vector (-> self position)) (-> self position value))) + (f1-0 1024.0) + ) + (if (< f0-14 (* f1-0 f1-0)) + (go-virtual launch-critters) + ) + ) + (ja :num! (loop!)) + ) + ) + ) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defstate sweep (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (prebot-method-46 self) + (case (-> self stage) + ((1) + (set! (-> self num-attacks) (the-as uint 2)) + (set! (-> self position max-vel) 1638.4) + ) + ((2) + (set! (-> self num-attacks) (the-as uint 3)) + (set! (-> self position max-vel) 2048.0) + ) + (else + (set! (-> self num-attacks) (the-as uint 3)) + (set! (-> self position max-vel) 2457.6) + ) + ) + (set! (-> self position accel) 409.6) + (set! (-> self position max-partial) 0.99) + (dotimes (gp-0 2) + (send-event (handle->process (-> self swords gp-0)) 'whoosh-lead (* 15.0 (-> self position max-vel))) + (send-event (handle->process (-> self swords gp-0)) 'use-pos-pitch #t) + ) + ) + :exit (behavior () + (prebot-method-45 self) + (set! (-> self position accel) 0.004096) + (set! (-> self position max-vel) 2048.0) + (set! (-> self position max-partial) 0.125) + (dotimes (gp-0 2) + (send-event (handle->process (-> self swords gp-0)) 'scale #x3f800000) + (send-event (handle->process (-> self swords gp-0)) 'use-pos-pitch #f) + ) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 prebot-swords-horizontal-R2L-strike-ja)) + (ja :num! (seek!)) + (cond + ((>= (ja-aframe-num 0) 195.0) + (set! (-> self position target x) (+ -94208.0 (-> self original-position x))) + ) + ((>= (ja-aframe-num 0) 190.0) + (dotimes (gp-0 2) + (send-event (handle->process (-> self swords gp-0)) 'scale #x3ff33333) + ) + ) + ) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-horizontal-R2L-hold-ja :num! min) + ) + ) + ((let ((v1-39 (ja-group))) + (and v1-39 (= v1-39 prebot-swords-horizontal-L2R-strike-ja)) + ) + (ja :num! (seek!)) + (when (>= (ja-aframe-num 0) 231.0) + (set! (-> self position target x) (+ 94208.0 (-> self original-position x))) + (dotimes (gp-2 2) + (send-event (handle->process (-> self swords gp-2)) 'scale #x3ff33333) + ) + ) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-horizontal-L2R-hold-ja :num! min) + ) + ) + ((let ((v1-73 (ja-group))) + (and v1-73 (= v1-73 prebot-sword-R-horizontal-R2L-strike-ja)) + ) + (ja :num! (seek!)) + (cond + ((>= (ja-aframe-num 0) 252.0) + (set! (-> self position target x) (+ -94208.0 (-> self original-position x))) + ) + ((>= (ja-aframe-num 0) 248.0) + (dotimes (gp-4 2) + (send-event (handle->process (-> self swords gp-4)) 'scale #x3ff33333) + ) + ) + ) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-horizontal-R2L-hold-ja :num! min) + ) + ) + ((let ((v1-110 (ja-group))) + (and v1-110 (= v1-110 prebot-sword-R-horizontal-L2R-strike-ja)) + ) + (ja :num! (seek!)) + (when (>= (ja-aframe-num 0) 207.0) + (set! (-> self position target x) (+ 94208.0 (-> self original-position x))) + (dotimes (gp-6 2) + (send-event (handle->process (-> self swords gp-6)) 'scale #x3ff33333) + ) + ) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-horizontal-L2R-hold-ja :num! min) + ) + ) + ((let ((v1-144 (ja-group))) + (and v1-144 (= v1-144 prebot-sword-L-horizontal-R2L-strike-ja)) + ) + (ja :num! (seek!)) + (when (>= (ja-aframe-num 0) 207.0) + (set! (-> self position target x) (+ -94208.0 (-> self original-position x))) + (dotimes (gp-8 2) + (send-event (handle->process (-> self swords gp-8)) 'scale #x3ff33333) + ) + ) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-horizontal-R2L-hold-ja :num! min) + ) + ) + ((let ((v1-178 (ja-group))) + (and v1-178 (= v1-178 prebot-sword-L-horizontal-L2R-strike-ja)) + ) + (ja :num! (seek!)) + (cond + ((>= (ja-aframe-num 0) 252.0) + (set! (-> self position target x) (+ 94208.0 (-> self original-position x))) + ) + ((>= (ja-aframe-num 0) 248.0) + (dotimes (gp-10 2) + (send-event (handle->process (-> self swords gp-10)) 'scale #x3ff33333) + ) + ) + ) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-horizontal-L2R-hold-ja :num! min) + ) + ) + ((let ((v1-215 (ja-group))) + (and v1-215 (or (= v1-215 prebot-sword-R-horizontal-R2L-hold-ja) + (= v1-215 prebot-sword-R-horizontal-L2R-hold-ja) + (= v1-215 prebot-sword-L-horizontal-R2L-hold-ja) + (= v1-215 prebot-sword-L-horizontal-L2R-hold-ja) + (= v1-215 prebot-swords-horizontal-R2L-hold-ja) + (= v1-215 prebot-swords-horizontal-L2R-hold-ja) + ) + ) + ) + (ja :num! (loop!)) + (dotimes (gp-12 2) + (send-event (handle->process (-> self swords gp-12)) 'scale #x3ff33333) + ) + (let ((f0-46 (vector-vector-distance-squared (the-as vector (-> self position)) (-> self position value))) + (f1-15 1024.0) + ) + (when (< f0-46 (* f1-15 f1-15)) + (dotimes (gp-13 2) + (send-event (handle->process (-> self swords gp-13)) 'scale #x3f800000) + ) + (+! (-> self num-attacks) -1) + (if (<= (-> self num-attacks) 0) + (go-virtual sweep-done) + ) + (let ((v1-258 (ja-group))) + (cond + ((and v1-258 (= v1-258 prebot-swords-horizontal-R2L-hold-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-horizontal-R2L-return-ja :num! min) + (set! (-> self position target y) (+ -34816.0 (-> self original-position y))) + ) + ((let ((v1-270 (ja-group))) + (and v1-270 (= v1-270 prebot-swords-horizontal-L2R-hold-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-horizontal-L2R-return-ja :num! min) + (set! (-> self position target y) (+ -34816.0 (-> self original-position y))) + ) + ((let ((v1-282 (ja-group))) + (and v1-282 (= v1-282 prebot-sword-R-horizontal-R2L-hold-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-horizontal-R2L-return-ja :num! min) + (set! (-> self position target y) (+ -36864.0 (-> self original-position y))) + ) + ((let ((v1-294 (ja-group))) + (and v1-294 (= v1-294 prebot-sword-R-horizontal-L2R-hold-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-horizontal-L2R-return-ja :num! min) + (set! (-> self position target y) (+ -36864.0 (-> self original-position y))) + ) + (else + (let ((v1-306 (ja-group))) + (cond + ((and v1-306 (= v1-306 prebot-sword-L-horizontal-R2L-hold-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-horizontal-R2L-return-ja :num! min) + (set! (-> self position target y) (+ -36864.0 (-> self original-position y))) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-horizontal-L2R-return-ja :num! min) + (set! (-> self position target y) (+ -36864.0 (-> self original-position y))) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ((let ((v1-325 (ja-group))) + (and v1-325 (or (= v1-325 prebot-sword-R-horizontal-R2L-return-ja) + (= v1-325 prebot-sword-L-horizontal-R2L-return-ja) + (= v1-325 prebot-swords-horizontal-R2L-return-ja) + ) + ) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (dotimes (gp-20 2) + (send-event (handle->process (-> self swords gp-20)) 'whoosh-lead (* 15.0 (-> self position max-vel))) + ) + (let ((v1-352 (ja-group))) + (cond + ((and v1-352 (= v1-352 prebot-swords-horizontal-R2L-return-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-horizontal-L2R-strike-ja :num! min) + ) + (else + (let ((v1-362 (ja-group))) + (cond + ((and v1-362 (= v1-362 prebot-sword-R-horizontal-R2L-return-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-horizontal-L2R-strike-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-horizontal-L2R-strike-ja :num! min) + ) + ) + ) + ) + ) + ) + ) + ) + ((let ((v1-377 (ja-group))) + (and v1-377 (or (= v1-377 prebot-sword-R-horizontal-L2R-return-ja) + (= v1-377 prebot-sword-L-horizontal-L2R-return-ja) + (= v1-377 prebot-swords-horizontal-L2R-return-ja) + ) + ) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (dotimes (gp-24 2) + (send-event (handle->process (-> self swords gp-24)) 'whoosh-lead (* 15.0 (-> self position max-vel))) + ) + (let ((v1-404 (ja-group))) + (cond + ((and v1-404 (= v1-404 prebot-swords-horizontal-L2R-return-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-horizontal-R2L-strike-ja :num! min) + ) + (else + (let ((v1-414 (ja-group))) + (cond + ((and v1-414 (= v1-414 prebot-sword-R-horizontal-L2R-return-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-horizontal-R2L-strike-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-horizontal-R2L-strike-ja :num! min) + ) + ) + ) + ) + ) + ) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-horizontal-L2R-strike-ja :num! min) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defstate slam-done (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (case (-> self stage) + ((1) + (set! (-> self position target x) (+ -94208.0 (-> self original-position x))) + (set! (-> self position target y) (+ -36864.0 (-> self original-position y))) + ) + ((2) + (set! (-> self position target x) (+ 94208.0 (-> self original-position x))) + (set! (-> self position target y) (+ -36864.0 (-> self original-position y))) + ) + (else + (set! (-> self position target x) (+ 94208.0 (-> self original-position x))) + (set! (-> self position target y) (+ -34816.0 (-> self original-position y))) + ) + ) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (or (= v1-2 prebot-sword-R-strike2pose-ja) + (= v1-2 prebot-sword-L-strike2pose-ja) + (= v1-2 prebot-swords-strike2pose-ja) + ) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (set! (-> self trythis-played) #f) + (let ((v1-16 (ja-group))) + (cond + ((and v1-16 (= v1-16 prebot-swords-strike2pose-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-pose-ja :num! min) + ) + (else + (let ((v1-26 (ja-group))) + (cond + ((and v1-26 (= v1-26 prebot-sword-R-strike2pose-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-pose-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-pose-ja :num! min) + ) + ) + ) + ) + ) + ) + ) + ) + ((let ((v1-41 (ja-group))) + (and v1-41 + (or (= v1-41 prebot-sword-R-pose-ja) (= v1-41 prebot-sword-L-pose-ja) (= v1-41 prebot-swords-pose-ja)) + ) + ) + (ja :num! (seek!)) + (when (and (not (-> self trythis-played)) (or (and (= (-> self stage) 1) + (let ((v1-59 (ja-group))) + (and v1-59 (= v1-59 prebot-sword-R-pose-ja)) + ) + (>= (ja-aframe-num 0) 162.0) + ) + (and (= (-> self stage) 2) + (let ((v1-68 (ja-group))) + (and v1-68 (= v1-68 prebot-sword-L-pose-ja)) + ) + (>= (ja-aframe-num 0) 156.0) + ) + (and (= (-> self stage) 3) + (let ((v1-76 (ja-group))) + (and v1-76 (= v1-76 prebot-swords-pose-ja)) + ) + (>= (ja-aframe-num 0) 166.0) + ) + ) + ) + (set! (-> self trythis-played) #t) + (case (-> self stage) + ((1) + (sound-play "prebot-trythis" :position (-> self root trans)) + ) + ((2) + (sound-play "prebot-grunts" :position (-> self root trans)) + ) + ((2) + (sound-play "prebot-harumph" :position (-> self root trans)) + ) + ) + ) + (when (ja-done? 0) + (let ((v1-99 (ja-group))) + (cond + ((and v1-99 (= v1-99 prebot-swords-pose-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-horizontal-R2L-pre-ja :num! min) + ) + (else + (let ((v1-109 (ja-group))) + (cond + ((and v1-109 (= v1-109 prebot-sword-R-pose-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-horizontal-L2R-pre-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-horizontal-R2L-pre-ja :num! min) + ) + ) + ) + ) + ) + ) + ) + ) + (else + (let ((v1-124 (ja-group))) + (cond + ((and v1-124 (or (= v1-124 prebot-sword-R-horizontal-L2R-pre-ja) + (= v1-124 prebot-sword-L-horizontal-R2L-pre-ja) + (= v1-124 prebot-swords-horizontal-R2L-pre-ja) + ) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (let ((v1-138 (ja-group))) + (cond + ((and v1-138 (= v1-138 prebot-swords-horizontal-R2L-pre-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-horizontal-R2L-strike-ja :num! min) + ) + (else + (let ((v1-148 (ja-group))) + (cond + ((and v1-148 (= v1-148 prebot-sword-R-horizontal-L2R-pre-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-horizontal-L2R-strike-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-horizontal-R2L-strike-ja :num! min) + ) + ) + ) + ) + ) + ) + (go-virtual sweep) + ) + ) + ((let ((v1-166 (ja-group))) + (and v1-166 (= v1-166 prebot-swords-L-vertical-strike-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-strike2pose-ja :num! min) + ) + (else + (let ((v1-176 (ja-group))) + (cond + ((and v1-176 (= v1-176 prebot-sword-R-vertical-strike-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-strike2pose-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-strike2pose-ja :num! min) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; WARN: Return type mismatch int vs object. +(defbehavior prebot-spawn-shockwave prebot () + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self root trans quad)) + (let ((s5-0 (quaternion-identity! (new 'stack-no-clear 'quaternion)))) + ;; og:preserve-this unused lambda? + ;; L162 + (let* ((v1-6 (ja-group)) + (v1-13 (handle->process (-> self swords (if (and v1-6 (= v1-6 prebot-swords-R-vertical-strike-ja)) + 1 + 0 + ) + ) + ) + ) + ) + (when v1-13 + (vector<-cspace! gp-0 (-> (the-as process-drawable v1-13) node-list data 5)) + (+! (-> gp-0 z) -90112.0) + (set! (-> gp-0 y) (+ 4096.0 (-> self original-position y))) + ) + ) + (quaternion-set! s5-0 0.0 1.0 0.0 0.0) + (process-spawn prebot-shockwave gp-0 s5-0 :name "prebot-shockwave" :to self) + ) + (set-zero! *camera-smush-control*) + (activate! *camera-smush-control* 819.2 37 300 1.0 1.1 (-> *display* camera-clock)) + (prebot-light-flash 1.0 0.0 0.0) + (sound-play "shockwave" :position gp-0) + (sound-play "sword-hit" :position gp-0) + ) + 0 + ) + +(defstate slam (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (set! (-> self position target x) (-> self original-position x)) + (set! (-> self position target y) (+ 6144.0 (-> self original-position y))) + (set! (-> self position target z) (+ 61440.0 (-> self original-position z))) + (case (-> self stage) + ((1) + (set! (-> self num-attacks) (the-as uint 2)) + ) + ((2) + (set! (-> self num-attacks) (the-as uint 3)) + ) + (else + (set! (-> self num-attacks) (the-as uint 4)) + ) + ) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 prebot-sword-grab-both-ja)) + (ja :num! (seek!)) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.02)) + (ja :group! prebot-swords-vertical-pre-ja :num! min) + (setup-masks (-> self draw) 0 24) + (prebot-light-pulse-on 0.7 0.2 0.0) + (set! (-> self swords 0) + (ppointer->handle + (process-spawn prebot-sword "sword-l-" (-> self root trans) 43 #f :name "prebot-sword" :to self) + ) + ) + (set! (-> self swords 1) + (ppointer->handle + (process-spawn prebot-sword "sword-r-" (-> self root trans) 27 #t :name "prebot-sword" :to self) + ) + ) + ) + ) + (else + (let ((v1-35 (ja-group))) + (cond + ((and v1-35 (= v1-35 prebot-sword-grab-AR-ja)) + (ja :num! (seek!)) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.02)) + (ja :group! prebot-sword-R-vertical-pre-ja :num! min) + (setup-masks (-> self draw) 0 4) + (prebot-light-pulse-on 0.7 0.2 0.0) + (set! (-> self swords 0) + (ppointer->handle + (process-spawn prebot-sword "sword-" (-> self root trans) 27 #f :name "prebot-sword" :to self) + ) + ) + ) + ) + ((let ((v1-62 (ja-group))) + (and v1-62 (= v1-62 prebot-sword-grab-AL-ja)) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.02)) + (ja :group! prebot-sword-L-vertical-pre-ja :num! min) + (setup-masks (-> self draw) 0 2) + (prebot-light-pulse-on 0.7 0.2 0.0) + (set! (-> self swords 0) + (ppointer->handle + (process-spawn prebot-sword "sword-" (-> self root trans) 43 #f :name "prebot-sword" :to self) + ) + ) + ) + ) + ((not (handle->process (-> self swords 0))) + (case (-> self stage) + ((1) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-grab-AR-ja :num! min) + ) + ((2) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-grab-AL-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-grab-both-ja :num! min) + ) + ) + ) + ((let ((v1-108 (ja-group))) + (and v1-108 (or (= v1-108 prebot-sword-R-vertical-pre-ja) + (= v1-108 prebot-sword-L-vertical-pre-ja) + (= v1-108 prebot-swords-vertical-pre-ja) + ) + ) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (let ((f0-18 (vector-vector-distance-squared (the-as vector (-> self position)) (-> self position value))) + (f1-0 1024.0) + ) + (cond + ((< f0-18 (* f1-0 f1-0)) + (let ((v1-124 (ja-group))) + (cond + ((and v1-124 (= v1-124 prebot-swords-vertical-pre-ja)) + (ja-channel-push! 1 (seconds 0.02)) + (ja :group! prebot-swords-R-vertical-strike-ja :num! min) + ) + (else + (let ((v1-134 (ja-group))) + (cond + ((and v1-134 (= v1-134 prebot-sword-R-vertical-pre-ja)) + (ja-channel-push! 1 (seconds 0.02)) + (ja :group! prebot-sword-R-vertical-strike-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.02)) + (ja :group! prebot-sword-L-vertical-strike-ja :num! min) + ) + ) + ) + ) + ) + ) + ) + ((let ((v1-149 (ja-group))) + (and v1-149 (= v1-149 prebot-swords-vertical-pre-ja)) + ) + (ja-channel-push! 1 (seconds 0.02)) + (ja :group! prebot-swords-vertical-hold-ja :num! min) + ) + (else + (let ((v1-159 (ja-group))) + (cond + ((and v1-159 (= v1-159 prebot-sword-R-vertical-pre-ja)) + (ja-channel-push! 1 (seconds 0.02)) + (ja :group! prebot-sword-R-vertical-hold-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.02)) + (ja :group! prebot-sword-R-vertical-hold-ja :num! min) + ) + ) + ) + ) + ) + ) + ) + ) + ((let ((v1-174 (ja-group))) + (and (and v1-174 (or (= v1-174 prebot-sword-R-vertical-hold-ja) + (= v1-174 prebot-sword-L-vertical-hold-ja) + (= v1-174 prebot-swords-vertical-hold-ja) + ) + ) + (let ((f0-25 (vector-vector-distance-squared (the-as vector (-> self position)) (-> self position value))) + (f1-3 1024.0) + ) + (< f0-25 (* f1-3 f1-3)) + ) + ) + ) + (let ((v1-182 (ja-group))) + (cond + ((and v1-182 (= v1-182 prebot-swords-vertical-hold-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-R-vertical-strike-ja :num! min) + ) + (else + (let ((v1-192 (ja-group))) + (cond + ((and v1-192 (= v1-192 prebot-sword-R-vertical-hold-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-vertical-strike-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-vertical-strike-ja :num! min) + ) + ) + ) + ) + ) + ) + ) + ((let ((v1-207 (ja-group))) + (and v1-207 (or (= v1-207 prebot-sword-R-vertical-strike-ja) + (= v1-207 prebot-sword-L-vertical-strike-ja) + (= v1-207 prebot-swords-L-vertical-strike-ja) + (= v1-207 prebot-swords-R-vertical-strike-ja) + ) + ) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (prebot-spawn-shockwave) + (+! (-> self num-attacks) -1) + (cond + ((zero? (-> self num-attacks)) + (go-virtual slam-done) + ) + ((let ((v1-227 (ja-group))) + (and v1-227 (= v1-227 prebot-swords-R-vertical-strike-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-R-vertical-between-ja :num! min) + ) + ((let ((v1-237 (ja-group))) + (and v1-237 (= v1-237 prebot-swords-L-vertical-strike-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-L-vertical-between-ja :num! min) + ) + (else + (let ((v1-247 (ja-group))) + (cond + ((and v1-247 (= v1-247 prebot-sword-R-vertical-strike-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-vertical-between-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-vertical-between-ja :num! min) + ) + ) + ) + ) + ) + ) + ) + ((let ((v1-262 (ja-group))) + (and v1-262 (or (= v1-262 prebot-sword-R-vertical-between-ja) + (= v1-262 prebot-sword-L-vertical-between-ja) + (= v1-262 prebot-swords-R-vertical-between-ja) + (= v1-262 prebot-swords-L-vertical-between-ja) + ) + ) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (let ((v1-276 (ja-group))) + (cond + ((and v1-276 (= v1-276 prebot-swords-R-vertical-between-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-L-vertical-strike-ja :num! min) + ) + ((let ((v1-286 (ja-group))) + (and v1-286 (= v1-286 prebot-swords-L-vertical-between-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-R-vertical-strike-ja :num! min) + ) + (else + (let ((v1-296 (ja-group))) + (cond + ((and v1-296 (= v1-296 prebot-sword-R-vertical-between-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-vertical-strike-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-vertical-strike-ja :num! min) + ) + ) + ) + ) + ) + ) + ) + ) + (else + (ja :num! (loop!)) + ) + ) + ) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defstate pre-slam (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self laugh-played) #f) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 prebot-idle-ja)) + (ja :num! (loop!)) + (when (and (not (-> self laugh-played)) (or (and (= (-> self stage) 1) (>= (ja-aframe-num 0) 3.0)) + (and (= (-> self stage) 2) (>= (ja-aframe-num 0) 4.0)) + (and (= (-> self stage) 3) (>= (ja-aframe-num 0) 5.0)) + ) + ) + (set-time! (-> self laugh-timer)) + (set! (-> self laugh-played) #t) + (sound-play "prebot-laugh" :position (-> self root trans)) + ) + (if (or (-> self laugh-played) (time-elapsed? (-> self state-time) (seconds 0.25))) + (go-virtual slam) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-idle-ja :num! min) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defstate jump-to-hover (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (when (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status bit-13)))) + (talker-spawn-func (-> *talker-speech* 326) *entity-pool* (target-pos 0) (the-as region #f)) + (process-entity-status! self (entity-perm-status bit-13) #t) + ) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 prebot-jump-to-hover-ja)) + (ja :num! (seek!)) + (if (or (ja-done? 0) (< -40.0 (ja-aframe-num 0))) + (go-virtual pre-slam) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-jump-to-hover-ja :num! min) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defstate hidden (prebot) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (remove-setting! 'point-of-interest) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (if (task-node-closed? (game-task-node mine-boss-introduction)) + (prebot-go-next-stage) + ) + (set-time! (-> self state-time)) + ) + ) + :code sleep-code + ) + +(defstate test (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (set-time! (-> self state-time)) + (cond + ((zero? (-> self nav)) + (format #t "ERROR: ~s nav mesh not found~%" (-> self name)) + ) + (else + (let ((gp-0 (new 'stack-no-clear 'enemy-init-by-other-params))) + (let ((v1-4 (new 'stack-no-clear 'vector))) + (set! (-> v1-4 quad) (-> self nav state mesh bounds quad)) + (set! (-> gp-0 trans quad) (-> v1-4 quad)) + ) + (quaternion-copy! (-> gp-0 quat) (-> self root quat)) + (set! (-> gp-0 entity) (-> self entity)) + (set! (-> gp-0 directed?) #f) + (set! (-> gp-0 no-initial-move-to-ground?) #f) + (set! (-> gp-0 art-level) #f) + (process-spawn + prebot-large-eco-creature + :init enemy-init-by-other + self + gp-0 + :name "prebot-large-eco-creature" + :to self + ) + ) + ) + ) + (ja-channel-push! 1 0) + (ja :group! prebot-idle-ja :num! min) + (set! (-> self position target z) (+ -61440.0 (-> self original-position z))) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (seconds 0.017)) (cpad-pressed? 1 x)) + (go-virtual test) + ) + (ja :num! (loop!)) + (show-maya-skeleton self -1 #x45800000) + (let ((gp-0 (handle->process (-> self gun)))) + (cond + ((>= (ja-aframe-num 0) 60.0) + (if (not gp-0) + (set! (-> self gun) + (ppointer->handle (process-spawn prebot-gun "gun-" (-> self root trans) :name "prebot-gun" :to self)) + ) + ) + ) + (gp-0 + (deactivate gp-0) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +(defmethod draw ((this hud-prebot)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 472.0 (* 130.0 (-> this offset)))) + 150 + ) + (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) -9 70) + (case (-> this values 0 current) + ((1) + (set! (-> this sprites 4 scale-x) 6.0) + (set! (-> this sprites 4 color x) 0) + (set! (-> this sprites 4 color y) 255) + (set! (-> this sprites 4 color z) 0) + 0 + ) + ((2) + (set! (-> this sprites 4 scale-x) 4.0) + (set! (-> this sprites 4 color x) 128) + (set! (-> this sprites 4 color y) 128) + (set! (-> this sprites 4 color z) 0) + 0 + ) + (else + (set! (-> this sprites 4 scale-x) 2.0) + (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)) -8 68) + (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) -51 68) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -12 68) + ((method-of-type hud draw) this) + 0 + (none) + ) + +(defmethod update-values! ((this hud-prebot)) + (set! (-> this values 0 target) (the int (-> *game-info* counter))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +(defmethod init-callback ((this hud-prebot)) + (set! (-> this level) (level-get *level* 'mined)) + (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-caveboss-01 mined-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-caveboss-health-01 mined-minimap))) + (set! (-> this sprites 4 scale-x) 1.0) + (set! (-> this sprites 4 scale-y) 0.5) + (set! (-> this sprites 4 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 3 tid) (the-as texture-id (get-texture hud-small-frame-01 mined-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 mined-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 mined-minimap))) + (set! (-> this sprites 1 scale-x) 10.0) + (set! (-> this sprites 1 scale-y) 1.0) + (set! (-> this sprites 1 flags) (hud-sprite-flags hsf2)) + 0 + (none) + ) + +(deftype task-manager-prebot (task-manager) + ((manager-entity entity) + (check-timer time-frame) + ) + ) + + +(defstate active (task-manager-prebot) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self check-timer) 0) + 0 + ) + ) + +;; WARN: Return type mismatch time-frame vs none. +(defmethod task-manager-method-26 ((this task-manager-prebot)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (when (and (not (-> this manager-entity)) (time-elapsed? (-> this check-timer) (seconds 0.1))) + (let* ((a0-3 "prebot-2") + (v1-6 (entity-by-name a0-3)) + ) + (when v1-6 + (set! (-> this manager-entity) v1-6) + (set! (-> this hud-counter) + (ppointer->handle (process-spawn hud-prebot :init hud-init-by-other :name "hud-prebot" :to this)) + ) + ) + ) + (set-time! (-> this check-timer)) + ) + (none) + ) + +(defmethod set-time-limit ((this task-manager-prebot)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this manager-entity) #f) + (set-setting! 'music 'mineboss 0.0 0) + (none) + ) diff --git a/goal_src/jak3/levels/mine/rat.gc b/goal_src/jak3/levels/mine/rat.gc index 6c8d984d50..7c4a954c9b 100644 --- a/goal_src/jak3/levels/mine/rat.gc +++ b/goal_src/jak3/levels/mine/rat.gc @@ -7,3 +7,2034 @@ ;; DECOMP BEGINS +(defskelgroup skel-rat rat rat-lod0-jg -1 + ((rat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :shadow rat-shadow-mg + :origin-joint-index 18 + ) + +(deftype rat (nav-enemy) + ((init-quat quaternion :inline) + (roll-transform transformq :inline) + (face-dir vector :inline) + (flee-focus-pos vector :inline) + (wheel-actor entity-actor) + (permanently-scared symbol) + (slide-sound-id uint32) + (scared-timer time-frame) + (scared-interval time-frame) + (return-to-nav-mesh? symbol) + ) + (:state-methods + wait-by-wheel-seek + wait-by-wheel-wait + active-turn + attack + flee-stare + undefined + running-in-wheel + wheel-die + ) + ) + + +(define *fact-info-rat-defaults* (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80))) + +(define *rat-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 7 + (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 3 + :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 3 + :param2 '((new 'static 'bfloat :data 0.75) (new 'static 'bfloat :data 1.5)) + ) + (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 + :command (idle-control-cmd play) + :anim #x3 + :param0 2 + :param1 5 + :param2 '((new 'static 'bfloat :data 0.75) (new 'static 'bfloat :data 1.5)) + ) + (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 6 + :notice-anim 5 + :hostile-anim 11 + :hit-anim 6 + :knocked-anim 16 + :knocked-land-anim 17 + :die-anim 24 + :die-falling-anim 24 + :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 6 + :sound-hit (static-sound-name "rat-squeal") + :sound-die (static-sound-name "rat-die") + :notice-distance (meters 40) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 5) + :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.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 49152.0 + :knocked-soft-vxz-hi 77824.0 + :knocked-soft-vy-lo 65536.0 + :knocked-soft-vy-hi 102400.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.9898 :y 0.0756 :z 0.1191 :w 16871.352) + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :bg-collide-with (collide-spec backgnd obstacle hit-by-others-list pusher) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9975 :y 0.0623 :z -0.0291 :w 23209.137) + :geo-tform (new 'static 'vector :x 1.0 :w 12952.898) + :axial-slop 1800.5653 + :max-angle 3301.7039 + :coll-rad 2231.0913 + :hit-sound (static-sound-name "rat-bf") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9999 :z 0.0004 :w 32758.518) + :geo-tform (new 'static 'vector :x 1.0 :z 0.0004 :w 32768.02) + :axial-slop 1800.5653 + :max-angle 3299.4827 + :coll-rad 1563.4432 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7428 :y -0.0498 :z 0.6675 :w 33924.785) + :geo-tform (new 'static 'vector :x 0.6487 :y 0.4895 :z 0.5825 :w 43181.707) + :axial-slop 1800.5653 + :max-angle 4193.594 + :coll-rad 1294.7456 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.1409 :y -0.1438 :z 0.9794 :w 5063.1294) + :geo-tform (new 'static 'vector :x 0.7137 :y 0.3672 :z 0.5963 :w 41407.32) + :axial-slop 1800.5653 + :max-angle 4537.8584 + :coll-rad 1197.6704 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.4227 :y 0.5005 :z 0.7554 :w 43021.234) + :geo-tform (new 'static 'vector :x -0.48 :y -0.8771 :z 0.0154 :w 16837.107) + :axial-slop 1800.5653 + :max-angle 4537.8584 + :coll-rad 1030.144 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint 6 + :pre-tform (new 'static 'vector :x -0.4637 :y -0.5607 :z 0.6859 :w 24477.533) + :geo-tform (new 'static 'vector :x -0.5132 :y -0.0929 :z 0.8532 :w 39898.88) + :axial-slop 1800.5653 + :max-angle 4806.5015 + :coll-rad 991.6416 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.5308 :y -0.0302 :z -0.8469 :w 9008.215) + :geo-tform (new 'static 'vector :x 0.8575 :y 0.4582 :z -0.2339 :w 23058.24) + :axial-slop 1800.5653 + :max-angle 3692.2073 + :coll-rad 1030.144 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9113 :y 0.3345 :z -0.2396 :w 9324.316) + :geo-tform (new 'static 'vector :x -0.6075 :y 0.6787 :z 0.4125 :w 11790.964) + :axial-slop 1800.5653 + :max-angle 3223.1514 + :coll-rad 1030.144 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5485 :y 0.0296 :z 0.8355 :w 8436.723) + :geo-tform (new 'static 'vector :x -0.5367 :y 0.8135 :z 0.2236 :w 9872.307) + :axial-slop 1800.5653 + :max-angle 2035.4388 + :coll-rad 697.5488 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7012 :y -0.0152 :z 0.7127 :w 6800.543) + :geo-tform (new 'static 'vector :x 0.7478 :y -0.0492 :z 0.662 :w 16398.764) + :axial-slop 1800.5653 + :max-angle 3487.4438 + :coll-rad 556.2368 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.4697 :y 0.169 :z 0.8664 :w 9123.412) + :geo-tform (new 'static 'vector :x 0.8284 :y -0.482 :z 0.2849 :w 23692.027) + :axial-slop 1800.5653 + :max-angle 3475.6653 + :coll-rad 1030.144 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8702 :y -0.3516 :z 0.3448 :w 9364.0205) + :geo-tform (new 'static 'vector :x -0.5482 :y -0.7233 :z -0.4196 :w 12565.746) + :axial-slop 1800.5653 + :max-angle 3745.783 + :coll-rad 1030.144 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5319 :y -0.3084 :z -0.7885 :w 8845.867) + :geo-tform (new 'static 'vector :x -0.6153 :y -0.7608 :z -0.2061 :w 8654.2295) + :axial-slop 1800.5653 + :max-angle 2274.791 + :coll-rad 757.76 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8155 :y -0.1199 :z -0.5661 :w 6821.0957) + :geo-tform (new 'static 'vector :x 0.7005 :y 0.2295 :z -0.6757 :w 16967.252) + :axial-slop 1800.5653 + :max-angle 3639.3962 + :coll-rad 397.7216 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -0.9985 :y -0.0463 :z 0.0288 :w 11897.897) + :geo-tform (new 'static 'vector :x -0.997 :y 0.0705 :z 0.0292 :w 8203.996) + :axial-slop 1800.5653 + :max-angle 3417.666 + :coll-rad 1127.2192 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3436 :y -0.9382 :z 0.0401 :w 1372.5969) + :geo-tform (new 'static 'vector :x -0.984 :y 0.1534 :z 0.0897 :w 11190.399) + :axial-slop 1800.5653 + :max-angle 3380.966 + :coll-rad 1597.8496 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3309 :y 0.0632 :z -0.9415 :w 15700.951) + :geo-tform (new 'static 'vector :x 0.7557 :y 0.568 :z 0.3258 :w 34107.156) + :axial-slop 1800.5653 + :max-angle 3795.7178 + :coll-rad 1286.144 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9673 :y -0.2207 :z 0.1243 :w 10359.821) + :geo-tform (new 'static 'vector :x 0.7738 :y -0.299 :z 0.5583 :w 23514.645) + :axial-slop 1800.5653 + :max-angle 3626.18 + :coll-rad 1030.144 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.4253 :y -0.0324 :z 0.9044 :w 21694.164) + :geo-tform (new 'static 'vector :x -0.816 :y -0.3366 :z -0.4697 :w 21449.367) + :axial-slop 1800.5653 + :max-angle 3774.4185 + :coll-rad 591.4624 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5431 :y -0.0261 :z -0.8392 :w 19577.861) + :geo-tform (new 'static 'vector :x 0.4968 :y -0.8225 :z 0.2766 :w 11542.782) + :axial-slop 1800.5653 + :max-angle 2293.8694 + :coll-rad 626.2784 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5367 :y 0.0778 :z 0.8401 :w 6345.687) + :geo-tform (new 'static 'vector :x -0.62 :y -0.7018 :z -0.3505 :w 13527.996) + :axial-slop 1800.5653 + :max-angle 2710.7876 + :coll-rad 445.2352 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint 18 + :pre-tform (new 'static 'vector :x 0.9719 :y -0.1118 :z -0.2067 :w 4947.2944) + :geo-tform (new 'static 'vector :x 0.9852 :y 0.1266 :z -0.1151 :w 13674.414) + :axial-slop 1800.5653 + :max-angle 1986.9968 + :coll-rad 1030.144 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3961 :y -0.884 :z -0.248 :w 1440.9546) + :geo-tform (new 'static 'vector :x -0.4417 :y 0.8968 :z 0.0222 :w 3241.5017) + :axial-slop 1800.5653 + :max-angle 2815.7542 + :coll-rad 791.3472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7521 :y -0.6312 :z 0.1891 :w 1846.6588) + :geo-tform (new 'static 'vector :x 0.1732 :y 0.9842 :z -0.0343 :w 4142.276) + :axial-slop 1800.5653 + :max-angle 3795.7178 + :coll-rad 760.2176 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5148 :y -0.8218 :z -0.2441 :w 1278.8622) + :geo-tform (new 'static 'vector :x 0.0427 :y 0.999 :z -0.0107 :w 5133.7627) + :axial-slop 1800.5653 + :max-angle 4537.8584 + :coll-rad 575.0784 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.1457 :y -0.9851 :z -0.0908 :w 1308.1167) + :geo-tform (new 'static 'vector :x -0.0891 :y 0.9956 :z 0.0283 :w 6443.0444) + :axial-slop 1800.5653 + :max-angle 5359.261 + :coll-rad 513.2288 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint 18 + :pre-tform (new 'static 'vector :x -0.084 :y 0.0546 :z 0.9949 :w 15687.553) + :geo-tform (new 'static 'vector :x 0.7291 :y -0.57 :z -0.3786 :w 33257.48) + :axial-slop 1800.5653 + :max-angle 3678.281 + :coll-rad 1030.144 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7243 :y 0.6445 :z -0.2448 :w 13605.893) + :geo-tform (new 'static 'vector :x 0.9233 :y 0.1682 :z -0.345 :w 22198.062) + :axial-slop 1800.5653 + :max-angle 3652.5945 + :coll-rad 931.0208 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8853 :y 0.1044 :z -0.4529 :w 21871.893) + :geo-tform (new 'static 'vector :x -0.9877 :y 0.0861 :z 0.1303 :w 19674.363) + :axial-slop 1800.5653 + :max-angle 3709.101 + :coll-rad 675.4304 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9484 :y -0.0508 :z 0.3126 :w 19602.928) + :geo-tform (new 'static 'vector :x 0.8427 :y 0.5037 :z -0.1896 :w 7369.013) + :axial-slop 1800.5653 + :max-angle 3767.8103 + :coll-rad 740.5568 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8652 :y -0.2236 :z -0.4486 :w 6495.9824) + :geo-tform (new 'static 'vector :x -0.854 :y 0.4607 :z 0.2416 :w 10556.411) + :axial-slop 1800.5653 + :max-angle 2548.5496 + :coll-rad 1030.144 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint 6 + :pre-tform (new 'static 'vector :x 0.5956 :y -0.5418 :z 0.5929 :w 18988.164) + :geo-tform (new 'static 'vector :x -0.75 :y -0.6581 :z -0.0655 :w 2752.0388) + :axial-slop 1800.5653 + :max-angle 4537.8584 + :coll-rad 1277.1328 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint 7 + :pre-tform (new 'static 'vector :x -0.8792 :y 0.2318 :z -0.4161 :w 7033.5786) + :geo-tform (new 'static 'vector :x -0.0562 :y -0.9874 :z -0.1475 :w 16494.428) + :axial-slop 1800.5653 + :max-angle 4537.8584 + :coll-rad 744.2432 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 36 + :parent-joint 8 + :pre-tform (new 'static 'vector :x -0.5619 :y -0.0979 :z 0.8213 :w 6875.181) + :geo-tform (new 'static 'vector :x -0.5163 :y -0.1113 :z 0.8491 :w 33034.82) + :axial-slop 1800.5653 + :max-angle 4537.8584 + :coll-rad 645.5296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 37 + :parent-joint 6 + :pre-tform (new 'static 'vector :x 0.8388 :y -0.5396 :z -0.0716 :w 22881.477) + :geo-tform (new 'static 'vector :x -0.0691 :y 0.6797 :z 0.7301 :w 12063.759) + :axial-slop 1800.5653 + :max-angle 4537.8584 + :coll-rad 1030.144 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 38 + :parent-joint 6 + :pre-tform (new 'static 'vector :x 0.2823 :y -0.5464 :z 0.7884 :w 23099.492) + :geo-tform (new 'static 'vector :x 0.9118 :y -0.3801 :z 0.1549 :w 29933.094) + :axial-slop 1800.5653 + :max-angle 4537.8584 + :coll-rad 1030.144 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 39 + :parent-joint 12 + :pre-tform (new 'static 'vector :x -0.7122 :y 0.0482 :z 0.7002 :w 7344.5103) + :geo-tform (new 'static 'vector :x 0.5743 :y 0.7856 :z -0.2297 :w 9826.541) + :axial-slop 1800.5653 + :max-angle 4537.8584 + :coll-rad 1135.8208 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 40 + :parent-joint 16 + :pre-tform (new 'static 'vector :x -0.755 :y 0.3048 :z -0.5805 :w 6001.295) + :geo-tform (new 'static 'vector :x 0.9264 :y 0.104 :z 0.3618 :w 38196.477) + :axial-slop 1800.5653 + :max-angle 4537.8584 + :coll-rad 1147.6992 + ) + ) + ) + :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 10 + :turn-anim -1 + :run-anim 11 + :taunt-anim -1 + :run-travel-speed (meters 8) + :run-acceleration (meters 6) + :run-turning-acceleration (meters 60) + :walk-travel-speed (meters 3) + :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! (-> *rat-nav-enemy-info* fact-defaults) *fact-info-rat-defaults*) + +(defmethod init-enemy-collision! ((this rat)) + (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)) + (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 can-ride deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 4915.2 0.0 10240.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 can-ride)) + (set-vector! (-> v1-13 local-sphere) 0.0 819.2 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-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list pusher) + ) + (set-vector! (-> v1-15 local-sphere) 0.0 4956.16 0.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 solid no-standon)) + (set! (-> v1-17 transform-index) 4) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 1228.8 3276.8) + ) + (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 solid deadly no-standon)) + (set! (-> v1-19 transform-index) 34) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 1228.8 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 action) (collide-action solid no-standon)) + (set! (-> v1-21 transform-index) 18) + (set-vector! (-> v1-21 local-sphere) 0.0 0.0 0.0 2867.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 enemy)) + (set! (-> v1-23 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-23 transform-index) 25) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 1638.4) + ) + (set! (-> s5-0 nav-radius) 8192.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 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior rat-run-code rat () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! rat-run0-ja + :num! (seek! max (lerp-scale 0.5 1.333 (vector-length (-> self root transv)) 0.0 32768.0)) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (lerp-scale 0.5 1.333 (vector-length (-> self root transv)) 0.0 32768.0))) + ) + ) + #f + (none) + ) + +(defbehavior rat-falling-post rat () + (nav-enemy-falling-post) + (none) + ) + +(defstate idle (rat) + :virtual #t + :enter (behavior () + (if (enemy-method-109 self) + (go-virtual die) + ) + (let ((t9-3 (-> (find-parent-state) enter))) + (if t9-3 + (t9-3) + ) + ) + ) + ) + +(defstate ambush (rat) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy ambush) enter))) + (if t9-0 + (t9-0) + ) + ) + (logior! (-> self focus-status) (focus-status dangerous)) + (set-vector! (-> self draw color-mult) 0.0 0.0 0.0 1.0) + (let ((v1-8 self)) + (set! (-> v1-8 enemy-flags) (the-as enemy-flag (logclear (-> v1-8 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-8 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let ((v1-11 self)) + (set! (-> v1-11 enemy-flags) (the-as enemy-flag (logclear (-> v1-11 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (set-time! (-> self state-time)) + (logclear! (-> self enemy-flags) (enemy-flag alert)) + (let ((s5-0 (new 'stack-no-clear 'collide-query)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (let ((a0-8 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (vector+float*! gp-0 (-> self root trans) a0-8 32768.0) + ) + (if (enemy-above-ground? self s5-0 gp-0 (collide-spec backgnd) 8192.0 81920.0 1024.0) + (set! (-> gp-0 y) (-> s5-0 best-other-tri intersect y)) + ) + (set! (-> self root gspot-pos quad) (-> gp-0 quad)) + ) + (sound-play "rat-spawner") + ) + :exit (behavior () + (set-vector! (-> self draw color-mult) 1.0 1.0 1.0 1.0) + (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* ((v1-2 (- (current-time) (-> self state-time))) + (f0-1 (fmin 1.0 (* 0.0016666667 (the float v1-2)))) + ) + (set-vector! (-> self draw color-mult) f0-1 f0-1 f0-1 1.0) + ) + 0 + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! rat-pipe-jump0-start-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 1.0) + (vector-v++! (-> self root trans) (-> self root transv)) + (suspend) + (ja :num! (seek!)) + ) + (ja-no-eval :group! rat-pipe-jump0-end-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) + (cond + ((>= (-> self root gspot-pos y) (-> self root trans y)) + (set! (-> self root trans y) (-> self root gspot-pos y)) + ) + (else + (vector-v++! + (-> self root transv) + (compute-acc-due-to-gravity (-> self root) (new 'stack-no-clear 'vector) (-> self enemy-info slip-factor)) + ) + (vector-v++! (-> self root trans) (-> self root transv)) + ) + ) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! rat-idle-stand-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-hostile self) + ) + :post (behavior () + (nav-enemy-simple-post) + ) + ) + +(defstate active (rat) + :virtual #t + :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 + (nav-enemy-method-176 self) + (set-look-at-mode! self 2) + (let ((gp-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (f0-1 (* 4096.0 (rnd-float-range self 8.0 20.0))) + ) + (vector+float*! (-> self move-dest) (-> self root trans) gp-0 f0-1) + ) + (closest-point-on-mesh (-> self nav) (-> self move-dest) (-> self move-dest) (the-as nav-poly #f)) + (let ((a0-22 (-> self nav state)) + (v1-18 (-> self move-dest)) + ) + (logclear! (-> a0-22 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-22 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-22 target-pos quad) (-> v1-18 quad)) + ) + 0 + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (if (< (vector-vector-distance (-> self root trans) (-> self move-dest)) 8192.0) + (go-virtual active-turn) + ) + (ja-no-eval :group! rat-walk0-ja + :num! (seek! max (lerp-scale 0.0 1.0 (vector-length (-> self root transv)) 0.0 12288.0)) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (lerp-scale 0.0 1.0 (vector-length (-> self root transv)) 0.0 12288.0))) + ) + ) + #f + ) + :post (behavior () + (nav-enemy-travel-post) + ) + ) + +(defstate active-turn (rat) + :virtual #t + :parent (rat active) + :enter (behavior () + (local-vars (v1-20 symbol)) + (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 + (nav-enemy-method-176 self) + (set-look-at-mode! self 2) + (let ((gp-0 (-> self root trans))) + (let ((s5-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + (f30-0 0.0) + ) + (until v1-20 + (+! f30-0 (* 182.04445 (rnd-float-range self 42.0 198.0))) + (vector-rotate-around-y! s4-0 s5-0 f30-0) + (vector+float*! s3-0 gp-0 s4-0 24576.0) + (closest-point-on-mesh (-> self nav) s2-0 s3-0 (the-as nav-poly #f)) + (set! v1-20 (or (>= 2048.0 (vector-vector-distance s2-0 s3-0)) (>= f30-0 65536.0))) + ) + (vector-rotate-around-y! (-> self face-dir) s5-0 f30-0) + ) + (vector+float*! (-> self move-dest) gp-0 (-> self face-dir) 24576.0) + ) + ) + :trans (behavior () + (let ((a0-0 (method-of-type nav-enemy active))) + (when a0-0 + (let ((t9-0 (-> a0-0 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (if (enemy-method-103 self (-> self face-dir) 1820.4445) + (go-virtual active) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (until #f + (cond + ((< 0.0 (deg-diff (quaternion-y-angle (-> self root quat)) (vector-y-angle (-> self face-dir)))) + (ja-no-eval :group! rat-turn-left-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :group! rat-turn-right-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + #f + ) + :post (behavior () + (seek-toward-heading-vec! + (-> self root) + (-> self face-dir) + (* 0.5 (-> self nav max-rotation-rate)) + (seconds 0.02) + ) + (nav-enemy-simple-post) + ) + ) + +(defstate notice (rat) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy notice) enter))) + (if t9-0 + (t9-0) + ) + ) + (stop-look-at! 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! rat-walk-to-sit-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (seek-to-point-toward-point! + (-> self root) + (-> self focus-pos) + (-> self nav max-rotation-rate) + (seconds 0.02) + ) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (ja-no-eval :group! rat-sit-to-alert-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set-look-at-mode! self 1) + (dotimes (gp-0 (set-reaction-time! self (seconds 0.007) (seconds 0.015))) + (ja-no-eval :group! rat-sit-alert-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (ja-no-eval :group! rat-sit-to-run-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-best-state self) + ) + ) + +(defstate wait-by-wheel-seek (rat) + :virtual #t + :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 + (nav-enemy-method-177 self) + (set-time! (-> self state-time)) + (let ((v1-9 (-> self nav))) + (set! (-> v1-9 sphere-mask) (the-as uint #x1000fe)) + ) + 0 + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (if (< (vector-vector-xz-distance (-> self root trans) (-> self move-dest)) 8192.0) + (go-virtual wait-by-wheel-wait) + ) + ) + ) + :code rat-run-code + :post (behavior () + (let ((gp-0 (new 'stack-no-clear 'vector))) + (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) 'wait-pos) + (set! (-> a1-0 param 0) (the-as uint gp-0)) + (let ((t9-0 send-event-function) + (v1-3 (-> self wheel-actor)) + ) + (if (not (t9-0 + (if v1-3 + (-> v1-3 extra process) + ) + a1-0 + ) + ) + (set! (-> gp-0 quad) (-> self wheel-actor extra trans quad)) + ) + ) + ) + (closest-point-on-mesh (-> self nav) (-> self move-dest) gp-0 (the-as nav-poly #f)) + ) + (let ((a0-7 (-> self nav state)) + (v1-11 (-> self move-dest)) + ) + (logclear! (-> a0-7 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-7 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-7 target-pos quad) (-> v1-11 quad)) + ) + 0 + (nav-enemy-method-187 self) + ) + ) + +(defstate wait-by-wheel-wait (rat) + :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 + (nav-enemy-method-178 self) + (vector-reset! (-> self root transv)) + (set-look-at-mode! self 1) + ) + :code (behavior () + (until #f + (when (not (enemy-method-105 self 4551.1113 #t)) + (let ((v1-3 self)) + (set! (-> v1-3 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-3 enemy-flags)))) + ) + 0 + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! rat-turn-left-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!)) + ) + (let ((v1-19 self)) + (set! (-> v1-19 enemy-flags) (the-as enemy-flag (logclear (-> v1-19 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + (let ((v1-23 (ja-group))) + (if (not (and v1-23 (= v1-23 rat-idle-stand-ja))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (ja-no-eval :group! rat-idle-stand-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post nav-enemy-stare-post + ) + +(defstate hostile (rat) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (and (time-elapsed? (-> self state-time) (-> self reaction-time)) + (and (< (vector-vector-xz-distance (-> self focus-pos) (-> self root trans)) 20480.0) (get-focus! self)) + ) + (go-virtual attack) + ) + ) + :code rat-run-code + ) + +(defstate attack (rat) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self focus-status) (focus-status dangerous)) + (set-time! (-> self scared-timer)) + (set! (-> self scared-interval) (seconds 3)) + ) + :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)) + (ja-no-eval :group! rat-run0-ja :num! (seek! max 1.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.5)) + ) + (go-best-state self) + ) + :post nav-enemy-chase-post + ) + +(defstate flee (rat) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy flee) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-look-at-mode! self 2) + ) + :code rat-run-code + ) + +(defstate flee-stare (rat) + :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 ef38)))) + ) + 0 + (set-look-at-mode! self 1) + (set! (-> self flee-focus-pos quad) (-> self focus-pos quad)) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 1)) + (if (and (handle->process (-> self focus handle)) + (< 12288.0 (vector-vector-distance (-> self flee-focus-pos) (-> self focus-pos))) + ) + (go-virtual flee) + ) + ) + ) + :code (behavior () + (until #f + (when (not (enemy-method-105 self 4551.1113 #t)) + (let ((v1-3 self)) + (set! (-> v1-3 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-3 enemy-flags)))) + ) + 0 + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! rat-turn-left-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!)) + ) + (let ((v1-19 self)) + (set! (-> v1-19 enemy-flags) (the-as enemy-flag (logclear (-> v1-19 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + (let ((v1-23 (ja-group))) + (if (not (and v1-23 (= v1-23 rat-idle-stand-ja))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (ja-no-eval :group! rat-idle-stand-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post nav-enemy-face-focus-post + ) + +(defstate stare (rat) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy stare) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-look-at-mode! self 1) + ) + :code (behavior () + (until #f + (when (not (enemy-method-105 self 4551.1113 #t)) + (let ((v1-3 self)) + (set! (-> v1-3 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-3 enemy-flags)))) + ) + 0 + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! rat-turn-left-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!)) + ) + (let ((v1-19 self)) + (set! (-> v1-19 enemy-flags) (the-as enemy-flag (logclear (-> v1-19 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + (let ((v1-23 (ja-group))) + (if (not (and v1-23 (= v1-23 rat-idle-stand-ja))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (ja-no-eval :group! rat-idle-stand-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + ) + +(defstate knocked (rat) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-0 + (t9-0) + ) + ) + (if (nonzero? (-> self slide-sound-id)) + (sound-stop (the-as sound-id (-> self slide-sound-id))) + ) + ) + :post (behavior () + (nav-enemy-simple-post) + ) + ) + +(defstate knocked-recover (rat) + :virtual #t + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked-recover) exit))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self return-to-nav-mesh?) #t) + ) + :trans #f + :code (behavior () + (cond + ((handle->process (-> self ragdoll-proc)) + (vector-reset! (-> self root transv)) + (try-locate-ground self (meters 10) (meters 10) #t (collide-spec backgnd)) + (ja-channel-push! 1 0) + (ja-no-eval :group! rat-ground-to-run-ja :num! (seek!) :frame-num 0.0) + (let ((gp-0 (-> (the-as ragdoll-proc (-> self ragdoll-proc process 0)) ragdoll))) + (enable-ragdoll! gp-0 self) + (quaternion-copy! (-> self root quat) (the-as quaternion (-> gp-0 ragdoll-joints))) + ) + (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) 'inside?) + (let ((t9-5 send-event-function) + (v1-31 (-> self wheel-actor)) + ) + (when (t9-5 + (if v1-31 + (-> v1-31 extra process) + ) + a1-6 + ) + (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) 'claim-wheel?) + (let ((t9-6 send-event-function) + (v1-37 (-> self wheel-actor)) + ) + (if (t9-6 + (if v1-37 + (-> v1-37 extra process) + ) + a1-7 + ) + (go-virtual running-in-wheel) + (go-virtual die) + ) + ) + ) + ) + ) + ) + (let ((f30-0 0.12)) + (ja-channel-push! 1 (the-as time-frame (the int (* 300.0 f30-0)))) + (ja-no-eval :group! rat-ground-to-run-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((gp-1 (new 'stack-no-clear 'quaternion)) + (f28-0 (lerp-scale 0.0 1.0 (the float (- (current-time) (-> self state-time))) 0.0 (* 300.0 f30-0))) + ) + (forward-up-nopitch->quaternion + gp-1 + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + *y-vector* + ) + (quaternion-slerp! (-> self root quat) (-> self root quat) gp-1 f28-0) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! rat-on-back-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (if (enemy-method-109 self) + (go-die self) + (go-virtual flee) + ) + ) + :post rat-falling-post + ) + +(defstate running-in-wheel (rat) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (logclear! (-> self enemy-flags) (enemy-flag trackable)) + (logclear! (-> self enemy-flags) (enemy-flag vulnerable)) + (let ((gp-0 (-> self parent 0 child))) + (while gp-0 + (if (!= gp-0 self) + (send-event (ppointer->process gp-0) 'scared) + ) + (set! gp-0 (-> gp-0 0 brother)) + ) + ) + (let ((v1-18 (-> self root root-prim))) + (logclear! (-> v1-18 prim-core action) (collide-action can-ride)) + (dotimes (a0-6 (the-as int (-> v1-18 specific 0))) + (logclear! (-> (the-as collide-shape-prim-group v1-18) child a0-6 prim-core action) (collide-action can-ride)) + ) + ) + ) + :trans (behavior () + (let ((v1-0 (-> self wheel-actor))) + (if (not (if v1-0 + (-> v1-0 extra process) + ) + ) + (go empty-state) + ) + ) + (if (and (time-elapsed? (-> self state-time) (seconds 8)) + (< 204800.0 (vector-vector-xz-distance (-> self root trans) (target-pos 0))) + ) + (go-virtual wheel-die) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! rat-ground-to-run-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.1)) + (let ((f30-0 2.0)) + (until #f + (ja-no-eval :group! rat-run-wheel0-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (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) 'turn) + (let* ((t9-6 send-event-function) + (v1-41 (-> self wheel-actor)) + (a0-6 (if v1-41 + (-> v1-41 extra process) + ) + ) + ) + (t9-6 a0-6 a1-5) + ) + ) + (set! f30-0 (seek f30-0 1.5 (* 0.1 (seconds-per-frame)))) + (suspend) + (ja :num! (seek! max f30-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) 1) + (set! (-> a1-0 message) 'run-dir) + (set! (-> a1-0 param 0) (the-as uint (new 'stack-no-clear 'vector))) + (let* ((t9-0 send-event-function) + (v1-4 (-> self wheel-actor)) + (a1-1 (t9-0 + (if v1-4 + (-> v1-4 extra process) + ) + a1-0 + ) + ) + ) + (seek-toward-heading-vec! (-> self root) (the-as vector a1-1) (-> self nav max-rotation-rate) (seconds 0.02)) + ) + ) + (let ((gp-0 (-> self root)) + (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) 'run-pos) + (set! (-> a1-2 param 0) (the-as uint (-> gp-0 trans))) + (set! (-> a1-2 param 1) (the-as uint (new 'stack-no-clear 'vector))) + (let* ((t9-2 send-event-function) + (v1-14 (-> self wheel-actor)) + (s5-0 (t9-2 + (if v1-14 + (-> v1-14 extra process) + ) + a1-2 + ) + ) + (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) 'run-up) + (set! (-> a1-3 param 0) (the-as uint (-> gp-0 trans))) + (set! (-> a1-3 param 1) (the-as uint (new 'stack-no-clear 'vector))) + (let* ((t9-3 send-event-function) + (v1-21 (-> self wheel-actor)) + (s4-0 (t9-3 + (if v1-21 + (-> v1-21 extra process) + ) + a1-3 + ) + ) + ) + (vector-seek! (-> gp-0 trans) (the-as vector s5-0) (* 10240.0 (seconds-per-frame))) + (let ((s5-1 (new 'stack-no-clear 'quaternion))) + (forward-up-nopitch->quaternion + s5-1 + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> gp-0 quat)) + (the-as vector s4-0) + ) + (quaternion-slerp! (-> gp-0 quat) (-> gp-0 quat) s5-1 (* 4.0 (seconds-per-frame))) + ) + ) + ) + ) + 0 + (transform-post) + ) + ) + +(defstate wheel-die (rat) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logclear! (-> self enemy-flags) (enemy-flag vulnerable vulnerable-backup)) + (logclear! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logclear! (-> self enemy-flags) (enemy-flag attackable attackable-backup)) + (logclear! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self enemy-flags) (enemy-flag actor-pause-backup)) + (logior! (-> self focus-status) (focus-status dead)) + (if (-> self skel effect) + (logior! (-> self skel effect flags) (effect-control-flag ecf1)) + ) + (stop-look-at! self) + (let ((v1-24 (-> self root root-prim))) + (set! (-> v1-24 prim-core collide-as) (collide-spec)) + (set! (-> v1-24 prim-core collide-with) (collide-spec)) + ) + 0 + (set-time! (-> self state-time)) + (send-event (ppointer->process (-> self parent)) 'die) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! rat-run-wheel0-die-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (send-event self 'death-end) + (cleanup-for-death self) + ) + :post nav-enemy-simple-post + ) + +;; WARN: Return type mismatch vector vs none. +(defun rat-joint-mod-roll ((arg0 cspace) (arg1 transformq)) + (let ((gp-0 (-> arg0 param1))) + (cspace<-parented-transformq-joint! arg0 arg1) + (vector+! + (-> arg0 bone transform trans) + (-> arg0 bone transform trans) + (the-as vector (-> (the-as rat gp-0) roll-transform)) + ) + ) + (none) + ) + +(defmethod enemy-method-108 ((this rat) (arg0 process-focusable)) + (or (not (time-elapsed? (-> this scared-timer) (-> this scared-interval))) (-> this permanently-scared)) + ) + +(defmethod enemy-method-109 ((this rat)) + (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) 'near?) + (let ((t9-0 send-event-function) + (v1-2 (-> this wheel-actor)) + ) + (when (not (t9-0 + (if v1-2 + (-> v1-2 extra process) + ) + a1-0 + ) + ) + (let ((s5-0 (-> this root)) + (gp-0 (new 'stack-no-clear 'vector)) + (v1-6 (-> this nav state)) + ) + (new 'stack-no-clear 'vector) + (or (not (closest-point-on-mesh (-> v1-6 nav) gp-0 (-> s5-0 trans) (the-as nav-poly #f))) + (< 24576.0 (vector-vector-xz-distance (-> s5-0 trans) gp-0)) + (< (-> s5-0 trans y) (+ -16384.0 (-> gp-0 y))) + ) + ) + ) + ) + ) + ) + ) + +(defmethod within-gspot-range? ((this rat)) + (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) 'near?) + (let ((t9-0 send-event-function) + (v1-2 (-> this wheel-actor)) + ) + (if (not (t9-0 + (if v1-2 + (-> v1-2 extra process) + ) + a1-0 + ) + ) + ((method-of-type nav-enemy within-gspot-range?) this) + ) + ) + ) + ) + ) + +(defmethod ragdoll-settled? ((this rat)) + (with-pp + (and (or (time-elapsed? (-> this state-time) (seconds 3)) (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) 'inside?) + (let ((t9-0 send-event-function) + (v1-6 (-> this wheel-actor)) + ) + (t9-0 + (if v1-6 + (-> v1-6 extra process) + ) + a1-0 + ) + ) + ) + ) + (call-parent-method this) + ) + ) + ) + +;; WARN: Return type mismatch float vs object. +(defmethod knocked-handler ((this rat) (arg0 vector)) + (get-knockback-dir! this arg0) + (let ((f30-0 (rnd-float-range this 0.9 1.0))) + (let ((f0-0 0.0) + (f1-0 98304.0) + ) + (vector-float*! arg0 arg0 (lerp f0-0 f1-0 f30-0)) + ) + (set! (-> arg0 y) (lerp 0.0 73728.0 f30-0)) + ) + ) + +(defmethod enemy-method-63 ((this rat) (arg0 float)) + (if (= (-> this hit-points) (-> this enemy-info default-hit-points)) + 1.0 + 0.0 + ) + ) + +;; WARN: Return type mismatch int vs knocked-type. +(defmethod penetrate->knocked-type ((this rat) (arg0 penetrate)) + (the-as knocked-type (cond + ((logtest? arg0 (penetrate vehicle)) + 7 + ) + ((logtest? (penetrate jak-blue-shot) arg0) + 6 + ) + ((logtest? (penetrate dark-bomb dark-smack) arg0) + 3 + ) + ((logtest? (penetrate explode jak-dark-shot enemy-dark-shot) arg0) + 2 + ) + (else + 0 + ) + ) + ) + ) + +(defmethod go-hostile ((this rat)) + (if (logtest? (-> this fact enemy-options) (enemy-option user8)) + (go (method-of-object this wait-by-wheel-seek)) + (go (method-of-object this hostile)) + ) + ) + +(defmethod coin-flip? ((this rat)) + #f + ) + +(defmethod enemy-common-post ((this rat)) + (let ((a0-2 (handle->process (-> this focus handle)))) + (if a0-2 + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable a0-2) 3) quad)) + ) + ) + (when (-> this return-to-nav-mesh?) + (format *stdebug* "~s ~d off nav-mesh~%" (-> this name) (-> this pid)) + (when (enemy-method-109 this) + (set! (-> this return-to-nav-mesh?) #f) + (go-die this) + ) + (let ((s5-2 (new 'stack-no-clear 'vector)) + (s4-0 (-> this root)) + ) + (if (and (closest-point-on-mesh (-> this nav state nav) s5-2 (-> s4-0 trans) (the-as nav-poly #f)) + (< (vector-vector-xz-distance (-> s4-0 trans) s5-2) 409.6) + (< (fabs (- (-> s4-0 trans y) (-> s5-2 y))) 8192.0) + ) + (set! (-> this return-to-nav-mesh?) #f) + ) + ) + ) + ((method-of-type nav-enemy enemy-common-post) this) + (none) + ) + +(defmethod enemy-method-50 ((this rat) (arg0 int)) + (let ((v1-0 arg0)) + (cond + ((= v1-0 1) + (let ((v1-4 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 1))) + (set! (-> v1-4 prim-core action) (collide-action solid)) + (set! (-> v1-4 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list pusher) + ) + ) + ) + ((or (= v1-0 2) (zero? v1-0)) + (let ((v1-8 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 1))) + (set! (-> v1-8 prim-core action) (collide-action)) + (set! (-> v1-8 prim-core collide-with) (collide-spec)) + ) + 0 + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this rat)) + (the-as search-info-flag 8) + ) + +(defmethod event-handler ((this rat) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-5 object)) + (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) + (go (method-of-object this knocked)) + #t + ) + (('rat?) + #t + ) + (('scared) + (set! v0-5 #t) + (set! (-> this permanently-scared) (the-as symbol v0-5)) + v0-5 + ) + (('trans) + (set! v0-5 (-> arg3 param 0)) + (set! (-> (the-as vector v0-5) quad) (-> this root trans quad)) + v0-5 + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod deactivate ((this rat)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this slide-sound-id)) + (sound-stop (the-as sound-id (-> this slide-sound-id))) + ) + (call-parent-method this) + (none) + ) + +(defmethod init-enemy! ((this rat)) + (with-pp + (rlet ((vf0 :class vf)) + (init-vf0-vector) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-rat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *rat-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 15473.777 0.0 1.0) + (set! (-> v1-5 ignore-angle) 30947.555) + ) + (set! (-> this align) (new 'process 'align-control this)) + (set! (-> this slide-sound-id) (the-as uint (new-sound-id))) + (set! (-> this wheel-actor) (entity-actor-lookup (-> this entity) 'alt-actor 0)) + (.svf (&-> (-> this roll-transform) trans quad) vf0) + (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) 'running?) + (let ((t9-6 send-event-function) + (v1-11 (-> this wheel-actor)) + ) + (set! (-> this permanently-scared) (the-as symbol (t9-6 + (if v1-11 + (-> v1-11 extra process) + ) + a1-8 + ) + ) + ) + ) + ) + (set! (-> this scared-timer) 0) + (set! (-> this scared-interval) 0) + (set! (-> this return-to-nav-mesh?) #f) + 0 + (none) + ) + ) + ) + +(deftype rat-spawner (process) + ((rats-spawned uint32) + (wheel-entity entity-actor) + (state-time time-frame) + (active? symbol) + (rats-to-spawn uint32) + (actor-group (pointer actor-group)) + (actor-group-count int32) + ) + (:state-methods + idle + die + ) + ) + + +(defstate idle (rat-spawner) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('die) + (go-virtual die) + ) + (('child-die) + (let ((v0-0 (the-as object (max 0 (the-as int (+ (-> self rats-spawned) -1)))))) + (set! (-> self rats-spawned) (the-as uint v0-0)) + v0-0 + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self active?) #f) + ) + :code sleep-code + :post (behavior () + (local-vars (v1-19 symbol) (v1-37 symbol)) + (when (and (time-elapsed? (-> self state-time) (seconds 0.5)) + (< (-> self rats-spawned) (-> self rats-to-spawn)) + (or (-> self active?) (< (vector-vector-xz-distance (-> self entity extra trans) (target-pos 0)) 163840.0)) + ) + (set! (-> self active?) #t) + (if (logtest? (-> self wheel-entity extra perm status) (entity-perm-status subtask-complete)) + (go-virtual die) + ) + (dotimes (v1-18 (-> self actor-group-count)) + (dotimes (a0-6 (-> self actor-group v1-18 length)) + (let ((a1-4 (-> self actor-group v1-18 data a0-6 actor))) + (when (if a1-4 + (-> a1-4 extra process) + ) + (set! v1-19 #f) + (goto cfg-23) + ) + ) + ) + ) + (set! v1-19 #t) + (label cfg-23) + (when (and v1-19 + (begin + (let ((gp-1 (-> self entity extra trans)) + (s5-1 (-> self child)) + ) + (while s5-1 + (let ((a1-11 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-11 from) (process->ppointer self)) + (set! (-> a1-11 num-params) 1) + (set! (-> a1-11 message) 'trans) + (set! (-> a1-11 param 0) (the-as uint (new 'stack-no-clear 'vector))) + (let ((s4-0 (the-as vector (send-event-function (ppointer->process s5-1) a1-11)))) + (when (and s4-0 (< (vector-vector-xz-distance gp-1 s4-0) 40960.0) (< (fabs (- (-> s4-0 y) (-> gp-1 y))) 16384.0)) + (set! v1-37 #t) + (goto cfg-44) + ) + ) + ) + (set! s5-1 (-> s5-1 0 brother)) + ) + ) + (set! v1-37 #f) + (label cfg-44) + (not v1-37) + ) + ) + (let ((s5-2 (-> self entity)) + (gp-2 (new 'stack-no-clear 'enemy-init-by-other-params)) + ) + (set! (-> gp-2 trans quad) (-> s5-2 extra trans quad)) + (quaternion-copy! (-> gp-2 quat) (-> s5-2 quat)) + (set! (-> gp-2 entity) s5-2) + (set! (-> gp-2 directed?) #f) + (set! (-> gp-2 no-initial-move-to-ground?) #f) + (set! (-> gp-2 art-level) #f) + (let ((s5-3 (get-process *default-dead-pool* rat #x4000 1))) + (if (ppointer->handle (when s5-3 + (let ((t9-7 (method-of-type process activate))) + (t9-7 s5-3 self "rat" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-3 enemy-init-by-other self gp-2) + (-> s5-3 ppointer) + ) + ) + (+! (-> self rats-spawned) 1) + ) + ) + ) + ) + (set-time! (-> self state-time)) + ) + ) + ) + +(defstate die (rat-spawner) + :virtual #t + :enter (behavior () + (logior! (-> self entity extra perm status) (entity-perm-status subtask-complete)) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (while (-> self child) + (suspend) + ) + (process-entity-status! self (entity-perm-status dead) #t) + ) + ) + +(defmethod init-from-entity! ((this rat-spawner) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (set! (-> this wheel-entity) (entity-actor-lookup (-> this entity) 'alt-actor 0)) + (set! (-> this rats-spawned) (the-as uint 0)) + (set! (-> this rats-to-spawn) + (res-lump-value (-> this entity) 'extra-id uint :default (the-as uint128 1) :time -1000000000.0) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-2 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-2 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-2)) + (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 (logtest? (-> arg0 extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this die)) + (go (method-of-object this idle)) + ) + ) diff --git a/goal_src/jak3/levels/nest/egg-spider.gc b/goal_src/jak3/levels/nest/egg-spider.gc index 63d2fc2644..b4faaecc28 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/nest-scenes.gc b/goal_src/jak3/levels/nest/nest-scenes.gc index ef7ab32008..d0cf5fcab3 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 37feda120c..8c61162203 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 42fa6a4d4b..4830f53e52 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 91ba3dfc2f..8d53acc5ca 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 f263b98a85..852cbe6499 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 e1ead406da..63755454f0 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 b08643d98f..4d3006bc14 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 b75f431439..e1b826a2e0 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 d85af5d8bf..1d02b99b5e 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 38bc6d8cd2..9e1c4753d2 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/jump-pad.gc b/goal_src/jak3/levels/sewer/jump-pad.gc index c98b6b4254..2996542cc3 100644 --- a/goal_src/jak3/levels/sewer/jump-pad.gc +++ b/goal_src/jak3/levels/sewer/jump-pad.gc @@ -7,3 +7,147 @@ ;; DECOMP BEGINS +(deftype jump-pad (bouncer) + ((fan-quat quaternion :inline) + (rot-vel float) + (fan-loop-sound-id sound-id) + (fan-loop-sound sound-spec) + (jump-sound sound-spec) + ) + (:methods + (get-skel (_type_) art-group) + (get-fan-joint-idx (_type_) int) + (init-sounds (_type_) none) + ) + ) + + +(defstate idle (jump-pad) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual fire) + ) + (('attack) + (let ((v1-3 (the-as object (-> block param 1))) + (a0-3 (-> block param 0)) + (a2-1 0) + ) + 0.0 + (let ((f30-0 (-> self spring-height))) + (cond + ((= (-> (the-as attack-info v1-3) mode) 'flop) + (set! a2-1 1) + ) + ((= (-> (the-as attack-info v1-3) mode) 'board) + (set! a2-1 9) + ) + ) + (when (and (nonzero? a2-1) (and ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry a0-3) + (-> self root) + (the-as uint a2-1) + ) + (send-event proc 'jump f30-0 f30-0 (-> self mods)) + ) + ) + (sound-play "trampoline") + (go-virtual fire) + #f + ) + ) + ) + ) + (else + ((-> (method-of-type bouncer idle) event) proc argc message block) + ) + ) + ) + :trans (behavior () + (seek! (-> self rot-vel) 10922.667 (* 21845.334 (seconds-per-frame))) + ) + :code (behavior () + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! min) + (transform-post) + (sleep-code) + ) + :post (behavior () + (when (-> self fan-loop-sound) + (set! (-> self fan-loop-sound pitch-mod) + (the int (* 1524.0 (lerp-scale -0.9 0.6 (-> self rot-vel) 10922.667 87381.336))) + ) + (sound-play-by-spec (-> self fan-loop-sound) (-> self fan-loop-sound-id) (-> self root trans)) + ) + (ja-post) + ) + ) + +(defstate fire (jump-pad) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (seek! (-> self rot-vel) 87381.336 (* 87381.336 (seconds-per-frame))) + ) + :code (behavior () + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 178 (seconds 0.1)) + (if (-> self jump-sound) + (sound-play-by-spec (-> self jump-sound) (new-sound-id) (the-as vector #t)) + ) + (until (time-elapsed? (-> self state-time) (seconds 2)) + (suspend) + ) + (go-virtual idle) + ) + :post (behavior () + (when (-> self fan-loop-sound) + (set! (-> self fan-loop-sound pitch-mod) + (the int (* 1524.0 (lerp-scale -0.9 0.6 (-> self rot-vel) 10922.667 87381.336))) + ) + (sound-play-by-spec (-> self fan-loop-sound) (-> self fan-loop-sound-id) (-> self root trans)) + ) + (let ((t9-2 (-> (method-of-type bouncer fire) post))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + +(defun jump-pad-joint-fan ((arg0 cspace) (arg1 quaternion)) + (let ((gp-0 (-> arg0 param1))) + (quaternion-rotate-local-y! + (-> (the-as jump-pad gp-0) fan-quat) + (-> (the-as jump-pad gp-0) fan-quat) + (* (-> (the-as jump-pad gp-0) rot-vel) (seconds-per-frame)) + ) + (quaternion-copy! (&+ arg1 16) (-> (the-as jump-pad gp-0) fan-quat)) + ) + (cspace<-parented-transformq-joint! arg0 (the-as transformq arg1)) + 0 + (none) + ) + +(defmethod bouncer-method-23 ((this jump-pad)) + (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) + (quaternion-copy! (-> this fan-quat) (-> this root quat)) + (let ((a0-6 (-> this node-list data (get-fan-joint-idx this)))) + (set! (-> a0-6 param0) (the-as (function cspace transformq none) jump-pad-joint-fan)) + (set! (-> a0-6 param1) this) + (set! (-> a0-6 param2) (the-as basic 0)) + ) + 0 + (none) + ) + +(defmethod init-from-entity! ((this jump-pad) (arg0 entity-actor)) + (set! (-> this fan-loop-sound) #f) + (set! (-> this jump-sound) #f) + (init-sounds this) + (if (-> this fan-loop-sound) + (set! (-> this fan-loop-sound-id) (new-sound-id)) + ) + (call-parent-method this arg0) + ) diff --git a/goal_src/jak3/levels/sewer/kg-hopper.gc b/goal_src/jak3/levels/sewer/kg-hopper.gc index 5a7f1ede39..45c915d87d 100644 --- a/goal_src/jak3/levels/sewer/kg-hopper.gc +++ b/goal_src/jak3/levels/sewer/kg-hopper.gc @@ -7,3 +7,1091 @@ ;; DECOMP BEGINS +(deftype kg-hopper (nav-enemy) + ((speed-y float) + (accel-y float) + (next-jump-time int32) + (path-intro path-control) + (can-go-knocked? symbol) + (land-anim-index int32) + (step-num int32) + (best-point vector :inline) + (best-score float) + (origin vector :inline) + (direction vector :inline) + (jump-dist float) + (side float) + (jump-start-anim uint32) + (jump-air-anim uint32) + (jump-land-anim uint32) + (jump-height-min float) + (jump-anim-start-frame float) + (minimap connection-minimap) + ) + (:state-methods + explode + ) + (:methods + (kg-hopper-method-191 (_type_) symbol) + (kg-hopper-method-192 () none) + (get-skel (_type_) art-group) + ) + ) + + +(defskelgroup skel-kg-hopper kg-hopper kg-hopper-lod0-jg kg-hopper-idle-ja + ((kg-hopper-lod0-mg (meters 20)) (kg-hopper-lod1-mg (meters 999999))) + :bounds (static-spherem 0 1 0 3.5) + :shadow kg-hopper-shadow-mg + ) + +(define *kg-hopper-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 5 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 6 :group "skel-kg-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 7 :group "skel-kg-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 8 :group "skel-kg-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-kg-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 11 :group "skel-kg-debris-d") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + ) + ) + +(deftype kg-hopper-anim-info (structure) + ((hit-anim-index int32) + (land-anim-index int32) + ) + :pack-me + ) + + +(deftype kg-hopper-global-info (basic) + ((prev-yellow-hit int8) + (prev-blue-hit int8) + (yellow-hit-anim kg-hopper-anim-info 3 :inline) + (blue-hit-anim kg-hopper-anim-info 3 :inline) + ) + ) + + +(define *kg-hopper-global-info* (new 'static 'kg-hopper-global-info + :yellow-hit-anim (new 'static 'inline-array kg-hopper-anim-info 3 + (new 'static 'kg-hopper-anim-info :hit-anim-index 25 :land-anim-index 26) + (new 'static 'kg-hopper-anim-info :hit-anim-index 27 :land-anim-index 28) + (new 'static 'kg-hopper-anim-info :hit-anim-index 29 :land-anim-index 30) + ) + :blue-hit-anim (new 'static 'inline-array kg-hopper-anim-info 3 + (new 'static 'kg-hopper-anim-info :hit-anim-index 21 :land-anim-index 24) + (new 'static 'kg-hopper-anim-info :hit-anim-index 22 :land-anim-index 24) + (new 'static 'kg-hopper-anim-info :hit-anim-index 23 :land-anim-index 24) + ) + ) + ) + +(defmethod knocked-anim ((this kg-hopper) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type blue-shot)) + (let* ((a2-0 (ash 1 (-> *kg-hopper-global-info* prev-blue-hit))) + (v1-3 (enemy-method-131 this 3 a2-0)) + (a1-5 (-> this draw art-group data (-> *kg-hopper-global-info* blue-hit-anim v1-3 hit-anim-index))) + ) + (set! (-> *kg-hopper-global-info* prev-blue-hit) v1-3) + (let ((a0-12 (-> this skel root-channel 0))) + (set! (-> a0-12 frame-group) (the-as art-joint-anim a1-5)) + (set! (-> a0-12 param 0) (the float (+ (-> (the-as art-joint-anim a1-5) frames num-frames) -1))) + (set! (-> a0-12 param 1) 1.0) + (set! (-> a0-12 frame-num) 0.0) + (joint-control-channel-group! a0-12 (the-as art-joint-anim a1-5) num-func-seek!) + ) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (let* ((a2-2 (ash 1 (-> *kg-hopper-global-info* prev-yellow-hit))) + (v1-13 (enemy-method-131 this 3 a2-2)) + (a1-11 (-> this draw art-group data (-> *kg-hopper-global-info* yellow-hit-anim v1-13 hit-anim-index))) + ) + (set! (-> this land-anim-index) (-> *kg-hopper-global-info* yellow-hit-anim v1-13 land-anim-index)) + (set! (-> *kg-hopper-global-info* prev-yellow-hit) v1-13) + (let ((a0-27 (-> this skel root-channel 0))) + (set! (-> a0-27 frame-group) (the-as art-joint-anim a1-11)) + (set! (-> a0-27 param 0) (the float (+ (-> (the-as art-joint-anim a1-11) frames num-frames) -1))) + (set! (-> a0-27 param 1) (-> arg0 anim-speed)) + (set! (-> a0-27 frame-num) 0.0) + (joint-control-channel-group! a0-27 (the-as art-joint-anim a1-11) num-func-seek!) + ) + ) + ) + ) + #t + ) + +(defmethod knocked-land-anim ((this kg-hopper) (arg0 enemy-knocked-info)) + (cond + ((= (-> this incoming knocked-type) (knocked-type blue-shot)) + #f + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data (-> this land-anim-index)))) + (set! (-> a0-3 param 0) + (the float + (+ (-> (the-as art-joint-anim (-> this draw art-group data (-> this land-anim-index))) 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 (-> this land-anim-index))) + num-func-seek! + ) + ) + #t + ) + ) + ) + +(define *kg-hopper-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 5 + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x4 + :param0 1 + :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 #x5 + :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 #x4 + :param0 1 + :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 #x6 + :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 7 + :hostile-anim 4 + :hit-anim 4 + :knocked-anim 25 + :knocked-land-anim 26 + :die-anim 19 + :die-falling-anim 20 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 5 + :look-at-joint 5 + :bullseye-joint 4 + :sound-hit (static-sound-name "kg-impact") + :sound-die (static-sound-name "kg-explo") + :notice-distance (meters 40) + :notice-distance-delta (meters 40) + :proximity-notice-distance (meters 4) + :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.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 4551.1113 + :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 #t + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 4 + :turn-anim 9 + :run-anim 13 + :taunt-anim -1 + :run-travel-speed (meters 1) + :run-acceleration (meters 1) + :run-turning-acceleration (meters 2) + :walk-travel-speed (meters 1) + :walk-acceleration (meters 1) + :walk-turning-acceleration (meters 3) + :maximum-rotation-rate (degrees 720) + :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! (-> *kg-hopper-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defmethod go-die ((this kg-hopper)) + (go (method-of-object this explode)) + ) + +(defstate explode (kg-hopper) + :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 "kg-explo") + ) + :code (behavior () + (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 scale-rand-lo) 0.5) + (set! (-> a1-1 scale-rand-hi) 1.2) + (set! (-> a1-1 fountain-rand-transv-lo quad) (-> self incoming attack-position quad)) + (debris-spawn self a1-1 *kg-hopper-debris-params* (the-as process-drawable #f)) + ) + (let ((v1-8 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node kg-hopper-lod0-jg chest)))) + (cond + ((logtest? (-> *part-group-id-table* 221 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-8 quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 221)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-8 quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 221)) + ) + ) + ) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +(defmethod event-handler ((this kg-hopper) (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 explode)) + (go (method-of-object this knocked)) + ) + #t + ) + (('death-start) + (set! (-> this draw death-timer) (the-as uint 0)) + ((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 jump-anim-handler ((this kg-hopper) (arg0 int) (arg1 enemy-jump-info)) + (when (= (-> this jump-why) 2) + (cond + ((zero? arg0) + (logior! (-> this focus-status) (focus-status touch-water under-water)) + ) + (else + (when (focus-test? this touch-water) + (let ((s3-0 (new 'stack-no-clear 'water-info))) + (water-info-init! (-> this root) s3-0 (collide-action solid semi-solid)) + (let ((v1-7 #f)) + (cond + ((not (logtest? (water-flag touch-water) (-> s3-0 flags))) + (if (focus-test? this under-water) + (set! v1-7 #t) + ) + (logclear! (-> this focus-status) (focus-status touch-water under-water)) + ) + ((focus-test? this under-water) + (let ((f0-1 (+ 11264.0 (-> this root trans y)))) + (if (< (-> s3-0 trans y) f0-1) + (set! v1-7 #t) + ) + ) + ) + ) + (when v1-7 + (logclear! (-> this focus-status) (focus-status under-water)) + (let ((v1-10 (new 'stack-no-clear 'vector))) + (set! (-> v1-10 quad) (-> this root trans quad)) + (when (logtest? (water-flag touch-water) (-> s3-0 flags)) + (set! (-> v1-10 y) (-> s3-0 trans y)) + (cond + ((logtest? (-> *part-group-id-table* 192 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-10 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 192)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-10 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 192)) + ) + ) + (sound-play "splash-out") + ) + ) + ) + ) + ) + ) + ) + ) + ) + ((method-of-type nav-enemy jump-anim-handler) this arg0 arg1) + ) + +(defmethod jump-wind-up-anim ((this kg-hopper) (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 kg-hopper) (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 + ) + +(defmethod jump-land-anim ((this kg-hopper) (arg0 enemy-jump-info)) + (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 + ) + +(defstate jump (kg-hopper) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy jump) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy jump) exit))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-5 (-> self draw shadow-ctrl))) + (logclear! (-> v1-5 settings flags) (shadow-flags shdf03)) + (let ((a0-2 v1-5)) + (set! (-> a0-2 settings top-plane w) (- 4096.0)) + ) + 0 + (set! (-> v1-5 settings bot-plane w) (- -4096.0)) + ) + 0 + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy jump) trans))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-5 (-> self draw shadow-ctrl))) + (logior! (-> v1-5 settings flags) (shadow-flags shdf03)) + (let ((a0-2 v1-5)) + (set! (-> a0-2 settings bot-plane w) (- (+ (- -4096.0 (-> self root trans y)) (-> self root gspot-pos y)))) + ) + 0 + (set! (-> v1-5 settings top-plane w) (- (+ (- 8192.0 (-> self root trans y)) (-> self root gspot-pos y)))) + ) + 0 + ) + ) + +(defmethod kg-hopper-method-191 ((this kg-hopper)) + (local-vars (sv-752 collide-query)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (+! (-> this step-num) -1) + (cond + ((>= (-> this step-num) 0) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (vector-rotate-around-y! + s3-0 + (-> this direction) + (* 182.04445 (the float (+ (* (-> this step-num) 16) -135))) + ) + (let ((a1-1 s5-0)) + (let ((v1-7 (-> this origin))) + (let ((a0-2 s3-0)) + (let ((a2-1 (-> this jump-dist))) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-2 quad)) + ) + (.lvf vf4 (&-> v1-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 (&-> a1-1 quad) vf6) + ) + (let ((v1-8 (-> this nav)) + (a0-3 s5-0) + (a1-2 (new 'stack-no-clear 'nav-poly)) + ) + (vector-! (the-as vector (-> a1-2 vertex)) a0-3 (the-as vector (-> v1-8 state mesh bounds))) + (set! (-> a1-2 vertex1 x) (-> v1-8 nearest-y-threshold)) + (set! (-> a1-2 data 20) (the-as uint 2)) + (let ((s4-0 (nav-mesh-method-45 (-> v1-8 state mesh) a1-2))) + (when s4-0 + (let ((f30-0 (vector-dot s3-0 (-> this direction)))) + (new 'stack-no-clear 'vector) + (let ((a1-3 (new 'stack-no-clear 'vector))) + (set! (-> a1-3 quad) (-> s5-0 quad)) + (set! (-> a1-3 w) 6144.0) + (when (not (add-root-sphere-to-hash! (-> this nav) a1-3 #x10006c)) + (when (< (-> this best-score) f30-0) + (set! (-> this best-score) f30-0) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (set! sv-752 (new 'stack-no-clear 'collide-query)) + (let ((s3-1 (new 'stack 'collide-query))) + (let ((s0-0 (-> this nav)) + (s1-0 s2-0) + ) + (let* ((v1-21 s5-0) + (a0-10 (-> s0-0 state mesh)) + (t9-4 (method-of-object a0-10 project-point-onto-plane-of-poly-local)) + (a2-5 s1-0) + (t0-1 (vector-! (new 'stack-no-clear 'vector) v1-21 (the-as vector (-> s0-0 state mesh bounds)))) + ) + (t9-4 a0-10 s4-0 a2-5 (the-as vector sv-752) t0-1) + ) + (vector+! s1-0 s1-0 (the-as vector (-> s0-0 state mesh bounds))) + ) + 0 + (set! (-> s5-0 y) (-> s2-0 y)) + (if (enemy-above-ground? this s3-1 s5-0 (collide-spec backgnd) 8192.0 81920.0 1024.0) + (set! (-> s5-0 y) (-> s3-1 best-other-tri intersect y)) + ) + ) + ) + (set! (-> this best-point quad) (-> s5-0 quad)) + ) + ) + ) + ) + ) + ) + ) + ) + #t + ) + (else + #f + ) + ) + ) + ) + +(defstate stare (kg-hopper) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy stare) enter))) + (if t9-0 + (t9-0) + ) + ) + (nav-enemy-method-184 self) + ) + ) + +(define *kg-hopper-next-jump-time* (the-as time-frame 0)) + +(defstate hostile (kg-hopper) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (nav-enemy-method-182 self) + (nav-enemy-method-183 self) + (set! (-> self speed-y) 0.0) + (set! (-> self accel-y) 0.0) + (set! (-> self next-jump-time) (the-as int (+ (current-time) (set-reaction-time! self 0 (seconds 0.4))))) + (set! (-> self step-num) 0) + (set! (-> self best-score) -2.0) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) exit))) + (if t9-0 + (t9-0) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (< *kg-hopper-next-jump-time* (current-time)) + (let ((gp-0 (handle->process (-> self focus handle)))) + (when gp-0 + (let ((s4-1 + (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable gp-0) 0) (-> self root trans)) + ) + ) + 0.0 + (let ((s5-0 (rnd-int self 2))) + (set! (-> self direction y) 0.0) + (let* ((v1-12 s4-1) + (f30-0 (sqrtf (+ (* (-> v1-12 x) (-> v1-12 x)) (* (-> v1-12 z) (-> v1-12 z))))) + ) + (set! (-> self step-num) 16) + (set! (-> self direction quad) (-> s4-1 quad)) + 0.0 + (let ((s4-2 (new 'stack-no-clear 'vector)) + (f28-0 (if (zero? s5-0) + (rnd-float-range self 4096.0 8192.0) + (rnd-float-range self 8192.0 (fmin 40960.0 (fmax 16384.0 (* 0.5 f30-0)))) + ) + ) + ) + (vector-rotate90-around-y! s4-2 (-> self direction)) + (vector-normalize! (-> self direction) 1.0) + (if (< (+ -2048.0 f30-0) f28-0) + (set! f28-0 (+ -2048.0 f30-0)) + ) + (if (< f28-0 6144.0) + (set! s5-0 0) + ) + (set! (-> self jump-dist) f28-0) + ) + ) + (set! (-> self best-score) -2.0) + (set! (-> self origin quad) (-> self root trans quad)) + ;; og:preserve-this + ;; (b! #t cfg-17) + (until (not (kg-hopper-method-191 self)) + (empty) + ) + (when (!= (-> self best-score) -2.0) + (let* ((s4-4 (vector-! (new 'stack-no-clear 'vector) (-> self best-point) (-> self root trans))) + (f30-1 (deg-diff (quaternion-y-angle (-> self root quat)) (vector-y-angle s4-4))) + ) + (cond + ((< (vector-vector-xz-distance (-> self best-point) (get-trans (the-as process-focusable gp-0) 0)) 8192.0) + (when (get-focus! self) + (cond + ((zero? s5-0) + (set! (-> self jump-start-anim) (the-as uint 34)) + (set! (-> self jump-air-anim) (the-as uint 35)) + (set! (-> self jump-land-anim) (the-as uint 36)) + (set! (-> self jump-height-min) 4096.0) + (set! (-> self jump-anim-start-frame) 2.0) + ) + (else + (if (< 2730.6667 (fabs f30-1)) + (set! (-> self jump-start-anim) (the-as uint (if (< 0.0 f30-1) + 11 + 12 + ) + ) + ) + (set! (-> self jump-start-anim) (the-as uint 10)) + ) + (cond + ((zero? (rnd-int self 2)) + (set! (-> self jump-air-anim) (the-as uint 15)) + (set! (-> self jump-land-anim) (the-as uint 16)) + (set! (-> self jump-height-min) 12288.0) + (set! (-> self jump-anim-start-frame) 8.0) + ) + (else + (set! (-> self jump-air-anim) (the-as uint 17)) + (set! (-> self jump-land-anim) (the-as uint 18)) + (set! (-> self jump-height-min) 12288.0) + (set! (-> self jump-anim-start-frame) 8.0) + ) + ) + ) + ) + (set! *kg-hopper-next-jump-time* (+ (current-time) (set-reaction-time! self (seconds 0.015) (seconds 0.075)))) + (set! (-> self enemy-flags) + (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked))) + ) + (send-event self 'jump 0 (-> self best-point)) + ) + ) + (else + (cond + ((zero? s5-0) + (set! (-> self jump-start-anim) (the-as uint 31)) + (set! (-> self jump-air-anim) (the-as uint 32)) + (set! (-> self jump-land-anim) (the-as uint 33)) + (set! (-> self jump-height-min) 4096.0) + (set! (-> self jump-anim-start-frame) 2.0) + ) + (else + (if (< 2730.6667 (fabs f30-1)) + (set! (-> self jump-start-anim) (the-as uint (if (< 0.0 f30-1) + 11 + 12 + ) + ) + ) + (set! (-> self jump-start-anim) (the-as uint 10)) + ) + (set! (-> self jump-air-anim) (the-as uint 13)) + (set! (-> self jump-land-anim) (the-as uint 14)) + (set! (-> self jump-height-min) 12288.0) + (set! (-> self jump-anim-start-frame) 8.0) + ) + ) + (set! *kg-hopper-next-jump-time* (+ (current-time) (set-reaction-time! self (seconds 0.015) (seconds 0.075)))) + (set! (-> self enemy-flags) + (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked))) + ) + (send-event self 'jump 0 (-> self best-point)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :post nav-enemy-simple-post + ) + +(defstate active (kg-hopper) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy active) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + :code (behavior () + (nav-enemy-method-164 self) + (let ((v1-2 (new 'stack-no-clear 'vector))) + (let ((a2-0 (-> self nav state))) + (set! (-> v1-2 quad) (-> a2-0 target-pos quad)) + ) + (set! (-> self enemy-flags) + (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked))) + ) + (send-event self 'jump 2 v1-2) + ) + ) + :post nav-enemy-simple-post + ) + +(defstate notice (kg-hopper) + :virtual #t + :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)) + ) + (if (zero? (rnd-int self 2)) + (ja :group! kg-hopper-notice-ja) + (ja :group! kg-hopper-notice-alt-ja) + ) + (ja-no-eval :group! (ja-group) :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (let ((a1-4 (-> self nav state))) + (set! (-> gp-0 quad) (-> a1-4 travel quad)) + ) + (seek-toward-heading-vec! (-> self root) gp-0 (-> self nav max-rotation-rate) (seconds 0.02)) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (go-best-state self) + ) + ) + +(defstate ambush (kg-hopper) + :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! (-> self root backup-collide-as) (-> v1-12 prim-core collide-as)) + (set! (-> self root backup-collide-with) (-> v1-12 prim-core collide-with)) + ) + (let ((v1-15 (-> self root root-prim))) + (set! (-> v1-15 prim-core collide-as) (collide-spec)) + (set! (-> v1-15 prim-core collide-with) (collide-spec)) + ) + 0 + (when (handle->process (-> self focus handle)) + (let ((gp-1 (-> self root)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + 0.0 + (get-point-in-path! (-> self path-intro) s5-0 0.0 'exact) + (+! (-> s5-0 y) -16384.0) + (get-point-in-path! (-> self path-intro) s4-0 1.0 'exact) + (let ((f0-3 (deg-diff + (quaternion-y-angle (-> gp-1 quat)) + (vector-y-angle (vector-normalize! (vector-! (new 'stack-no-clear 'vector) s4-0 s5-0) 1.0)) + ) + ) + ) + (quaternion-rotate-y! (-> gp-1 quat) (-> gp-1 quat) f0-3) + ) + ) + (set! (-> gp-1 trans quad) (-> s5-0 quad)) + ) + ) + ) + :exit (behavior () + (let ((v1-1 (-> self root root-prim))) + (set! (-> v1-1 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-1 prim-core collide-with) (-> self root backup-collide-with)) + ) + ) + :trans (behavior () + '() + ) + :code (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((s5-0 (new 'stack 'collide-query))) + (get-point-in-path! (-> self path-intro) gp-0 1.0 'exact) + (if (enemy-above-ground? self s5-0 gp-0 (collide-spec backgnd) 8192.0 81920.0 1024.0) + (set! (-> gp-0 y) (-> s5-0 best-other-tri intersect y)) + ) + ) + (set! (-> self enemy-flags) + (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked))) + ) + (send-event self 'jump 2 gp-0) + ) + (go-virtual hostile) + ) + ) + +(defmethod on-dying ((this kg-hopper)) + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + (call-parent-method this) + (none) + ) + +(defmethod relocate ((this kg-hopper) (offset int)) + (if (nonzero? (-> this path-intro)) + (&+! (-> this path-intro) offset) + ) + (call-parent-method this offset) + ) + +(defmethod init-enemy-collision! ((this kg-hopper)) + (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! (-> s4-0 transform-index) 12) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 9216.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 no-standon)) + (set-vector! (-> v1-14 local-sphere) 0.0 3686.4 0.0 3686.4) + ) + (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) 5) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 819.2 3276.8) + ) + (set! (-> s5-0 nav-radius) 4096.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 get-skel ((this kg-hopper)) + (art-group-get-by-name *level* "skel-kg-hopper" (the-as (pointer level) #f)) + ) + +(defmethod init-enemy! ((this kg-hopper)) + (stack-size-set! (-> this main-thread) 256) + (logior! (-> this mask) (process-mask kg-robot)) + (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) + (set! (-> this skel generate-frame-function) create-interpolated2-joint-animation-frame) + (init-enemy-defaults! this *kg-hopper-nav-enemy-info*) + (set! (-> this can-go-knocked?) #t) + (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) 10922.667 12743.111 0.0 1.0) + (set! (-> v1-11 ignore-angle) 18204.445) + ) + (set! (-> this jump-start-anim) (the-as uint 10)) + (set! (-> this jump-air-anim) (the-as uint 13)) + (set! (-> this jump-land-anim) (the-as uint 14)) + (set! (-> this jump-height-min) 12288.0) + (set! (-> this jump-anim-start-frame) 8.0) + (set! (-> this land-anim-index) 26) + (set! (-> this side) (rnd-float-range this -1.5 1.5)) + (when (logtest? (enemy-option ambush) (-> this fact enemy-options)) + (set! (-> this path-intro) (new 'process 'path-control this 'intro 0.0 (-> this entity) #f)) + (if (-> this path-intro) + (logior! (-> this path-intro flags) (path-control-flag display draw-line draw-point draw-text)) + ) + ) + (logior! (-> this nav flags) (nav-control-flag output-sphere-hash)) + (let ((v1-32 (-> this nav))) + (set! (-> v1-32 speed-scale) 1.0) + ) + 0 + (set-gravity-length (-> this root dynam) 327680.0) + (let ((v1-37 (-> this nav))) + (set! (-> v1-37 nav-cull-radius) 61440.0) + ) + 0 + (set! (-> this fact pickup-type) (pickup-type ammo-light-random)) + (set! (-> this fact pickup-amount) 5.0) + (set! (-> this fact pickup-spawn-amount) 1.0) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 108) (the-as int #f) (the-as vector #t) 0)) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/sewer/neo-grenadier.gc b/goal_src/jak3/levels/sewer/neo-grenadier.gc index db25b5589e..19740a1327 100644 --- a/goal_src/jak3/levels/sewer/neo-grenadier.gc +++ b/goal_src/jak3/levels/sewer/neo-grenadier.gc @@ -5,5 +5,1401 @@ ;; name in dgo: neo-grenadier ;; dgos: SEA +;; +++grenadier-status-flag +(defenum grenadier-status-flag + :type uint64 + :bitfield #t + (gsf0 0) + (gsf1 1) + (gsf2 2) + (gsf3 3) + ) +;; ---grenadier-status-flag + + ;; DECOMP BEGINS +(defpartgroup group-neo-grenadier-drip + :id 1523 + :duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 5001 :fade-after (meters 140) :falloff-to (meters 140))) + ) + +(defpart 5002 + :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)) + ) + ) + +(defskelgroup skel-neo-grenadier neo-grenadier neo-grenadier-lod0-jg -1 + ((neo-grenadier-lod0-mg (meters 20)) + (neo-grenadier-lod1-mg (meters 40)) + (neo-grenadier-lod2-mg (meters 999999)) + ) + :bounds (static-spherem 0 0 0 5) + :shadow neo-grenadier-shadow-mg + :origin-joint-index 4 + ) + +(deftype bank-info (structure) + ((circle sphere :inline) + (tangent-pos vector :inline) + (final-pos vector :inline) + (final-dir vector :inline) + ) + ) + + +(deftype neo-grenadier (nav-enemy) + ((shot-trajectory trajectory :inline) + (hostile-path path-control) + (bank bank-info :inline) + (joint joint-mod-blend-world) + (heading symbol) + (move-pos vector :inline) + (move-angle float) + (status-flags grenadier-status-flag) + (suppress-knockaside-timer time-frame) + ) + (:state-methods + attack + backup + spin-kick + ) + (:methods + (neo-grenadier-method-193 (_type_) none) + (set-bank-info! (_type_ vector) none) + (neo-grenadier-method-195 (_type_) none) + ) + ) + + +(define *fact-info-neo-grenadier-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9) + ) + +(define *neo-grenadier-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 17 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 39) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 4 + :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 39) + (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 push) :param0 39) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 4 + :param1 6 + :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 + :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 push) :param0 39) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 4 + :param1 8 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 39) + (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 push) :param0 39) + (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) + ) + :idle-anim 5 + :notice-anim 11 + :hostile-anim 13 + :hit-anim 23 + :knocked-anim 31 + :knocked-land-anim 32 + :die-anim 33 + :die-falling-anim 34 + :victory-anim 22 + :jump-wind-up-anim 5 + :jump-in-air-anim 5 + :jump-land-anim 5 + :neck-joint 24 + :look-at-joint 24 + :bullseye-joint 18 + :sound-hit (static-sound-name "grenadier-hit") + :sound-die (static-sound-name "grenadier-die") + :notice-distance (meters 80) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 20) + :default-hit-points 14.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 0.18204445 + :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 24 + :gem-seg #x2 + :gem-no-seg #x4 + :gem-offset (new 'static 'sphere :y 1802.24 :z 286.72 :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 9 + :turn-anim -1 + :run-anim 13 + :taunt-anim -1 + :run-travel-speed (meters 12) + :run-acceleration (meters 1) + :run-turning-acceleration (meters 50) + :walk-travel-speed (meters 2) + :walk-acceleration (meters 1) + :walk-turning-acceleration (meters 3) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 80) + :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! (-> *neo-grenadier-nav-enemy-info* fact-defaults) *fact-info-neo-grenadier-defaults*) + +(defmethod event-handler ((this neo-grenadier) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit-knocked) + (when (= (-> this incoming knocked-type) (knocked-type yellow-shot)) + (if (and (not (time-elapsed? (-> this suppress-knockaside-timer) (seconds 0.6))) + (and (-> this next-state) (= (-> this next-state name) 'attack)) + (!= (-> this hit-points) 0.0) + ) + (return #t) + ) + (logior! (-> this status-flags) (grenadier-status-flag gsf0)) + (set-time! (-> this suppress-knockaside-timer)) + ) + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + (('notify) + (cond + ((and (= (-> arg3 param 0) 'attack) (= (-> arg3 param 1) *target*)) + (let ((v1-22 (new 'stack-no-clear 'event-message-block))) + (set! (-> v1-22 from) (process->ppointer arg0)) + (set! (-> v1-22 num-params) arg1) + (set! (-> v1-22 message) 'victory) + (set! (-> v1-22 param 0) (-> arg3 param 0)) + (set! (-> v1-22 param 1) (-> arg3 param 1)) + (set! (-> v1-22 param 2) (-> arg3 param 2)) + (set! (-> v1-22 param 3) (-> arg3 param 3)) + (set! (-> v1-22 param 4) (-> arg3 param 4)) + (set! (-> v1-22 param 5) (-> arg3 param 5)) + (send-event-function this v1-22) + ) + ) + (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) + ) + ) + ) + +(defun pos-rotate-y<-vector+vector ((arg0 vector) (arg1 vector)) + (let ((f0-0 (rotate-y<-vector+vector arg0 arg1))) + (if (< f0-0 0.0) + (+ 65536.0 f0-0) + f0-0 + ) + ) + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod set-bank-info! ((this neo-grenadier) (arg0 vector)) + (closest-point-on-mesh (-> this nav) arg0 arg0 (the-as nav-poly #f)) + (set! (-> this bank final-pos quad) (-> arg0 quad)) + (set! (-> this bank tangent-pos quad) (-> arg0 quad)) + (set! (-> this move-pos quad) (-> this bank tangent-pos quad)) + (none) + ) + +(defmethod neo-grenadier-method-193 ((this neo-grenadier)) + (let ((s5-0 (handle->process (-> this focus handle)))) + (when s5-0 + (cond + ((-> this hostile-path) + (let* ((s4-0 (-> this hostile-path)) + (f30-0 (path-control-method-23 s4-0 (get-trans (the-as process-focusable s5-0) 0))) + (s3-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> this heading) (not (-> this heading))) + (let* ((f0-0 (rand-vu-float-range 0.2 0.45)) + (f0-1 (if (-> this heading) + (+ f30-0 f0-0) + (- f30-0 f0-0) + ) + ) + ) + (if (< f0-1 0.0) + (set! f0-1 (+ 1.0 f0-1)) + ) + (if (< 1.0 f0-1) + (set! f0-1 (+ -1.0 f0-1)) + ) + (get-point-at-percent-along-path! s4-0 s3-1 f0-1 'interp) + ) + (set-bank-info! this s3-1) + ) + ) + (else + (let* ((s4-1 (-> this root)) + (a0-10 (get-trans (the-as process-focusable s5-0) 0)) + (v1-27 (vector-! (new 'stack-no-clear 'vector) a0-10 (-> s4-1 trans))) + ) + (vector-length v1-27) + (let ((s3-2 (new 'stack-no-clear 'vector)) + (s2-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> this heading) (not (-> this heading))) + (if (-> this heading) + (set-vector! s3-2 (-> v1-27 z) (-> v1-27 y) (- (-> v1-27 x)) 1.0) + (set-vector! s3-2 (- (-> v1-27 z)) (-> v1-27 y) (-> v1-27 x) 1.0) + ) + (vector-normalize! s3-2 (* 4096.0 (rand-vu-float-range 14.0 18.0))) + (set-bank-info! this (vector+! s2-1 (-> s4-1 trans) s3-2)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defstate active (neo-grenadier) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let* ((f30-0 (rnd-float-range self 0.9 1.1)) + (a0-2 '((neo-grenadier-patrol-ja) (neo-grenadier-patrol1-ja))) + (gp-0 ((method-of-type (rtype-of a0-2) length) a0-2)) + (s5-0 (new 'static 'array uint64 2 #x9 #xa)) + (s4-0 (-> (the-as (pointer int32) (+ (* (rnd-int self gp-0) 8) (the-as int s5-0))))) + ) + (until #f + (ja-no-eval :group! (-> self draw art-group data s4-0) :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.6)) + (nav-enemy-method-182 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)) + ) + ) + (nav-enemy-method-181 self) + (ja-no-eval :num! (loop!)) + (set! s4-0 (-> (the-as (pointer int32) (+ (* (rnd-int self gp-0) 8) (the-as int s5-0))))) + (ja-channel-push! 1 (seconds 0.6)) + (ja-no-eval :group! (-> self draw art-group data s4-0) :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 (neo-grenadier) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy notice) enter))) + (if t9-0 + (t9-0) + ) + ) + (vector-reset! (-> self root transv)) + ) + ) + +(defstate hostile (neo-grenadier) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (neo-grenadier-method-193 self) + (set-look-at-mode! self 2) + (logclear! (-> self status-flags) (grenadier-status-flag gsf0)) + ) + :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* ((s5-0 (get-trans (the-as process-focusable a0-1) 0)) + (gp-0 (-> self root trans)) + (f30-0 (vector-vector-distance gp-0 s5-0)) + ) + (cond + ((and (< f30-0 12288.0) (get-focus! self)) + (go-virtual spin-kick) + ) + ((< f30-0 40960.0) + (let ((s3-1 (vector-! (new 'stack-no-clear 'vector) gp-0 s5-0)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-0 quad) (-> self root trans quad)) + (new 'stack-no-clear 'vector) + (vector-normalize! s3-1 49152.0) + (closest-point-on-mesh (-> self nav) s4-0 (vector+! s4-0 s5-0 s3-1) (the-as nav-poly #f)) + (when (< 32768.0 (vector-vector-distance gp-0 s4-0)) + (set! (-> self move-pos quad) (-> s4-0 quad)) + (let ((a0-11 (-> self nav state)) + (v1-32 (-> self move-pos)) + ) + (logclear! (-> a0-11 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-11 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-11 target-pos quad) (-> v1-32 quad)) + ) + 0 + (go-virtual backup) + ) + ) + ) + ) + ) + ) + ) + (when (or (time-elapsed? (-> self state-time) (rand-vu-int-range (seconds 3) (seconds 9))) + (>= 8192.0 (vector-vector-xz-distance (-> self root trans) (-> self bank final-pos))) + ) + (if (and (handle->process (-> self focus handle)) + (not (logtest? (-> (the-as process-focusable (handle->process (-> self focus handle))) focus-status) + (focus-status disable dead ignore grabbed) + ) + ) + ) + (go-virtual attack) + (go-stare self) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (let* ((a0-1 '((neo-grenadier-run-ja) (neo-grenadier-run1-ja))) + (a1-3 ((method-of-type (rtype-of a0-1) length) a0-1)) + (gp-0 (new 'static 'array uint64 2 #xd #xe)) + (gp-1 + (-> self draw art-group data (-> (the-as (pointer int32) (+ (* (rnd-int self a1-3) 8) (the-as int gp-0))))) + ) + (f30-0 (rnd-float-range self 0.9 1.1)) + ) + (until #f + (ja-no-eval :group! gp-1 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + #f + ) + :post (behavior () + (let ((gp-0 (-> self bank))) + (if (< (vector-vector-xz-distance (-> self root trans) (-> gp-0 tangent-pos)) 9830.4) + (set! (-> self move-pos quad) (-> gp-0 final-pos quad)) + ) + ) + (let ((a0-3 (-> self nav state)) + (v1-5 (-> self move-pos)) + ) + (logclear! (-> a0-3 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-3 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-3 target-pos quad) (-> v1-5 quad)) + ) + 0 + (nav-enemy-travel-post) + ) + ) + +(defstate backup (neo-grenadier) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (nav-enemy-method-181 self) + ) + :trans (behavior () + (let ((f0-0 (vector-vector-xz-distance (-> self root trans) (-> self move-pos)))) + (if (or (>= 12288.0 f0-0) (time-elapsed? (-> self state-time) (seconds 6))) + (go-hostile self) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! neo-grenadier-run-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (let ((a0-0 (-> self nav state)) + (v1-1 (-> self move-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 spin-kick (neo-grenadier) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (nav-enemy-method-182 self) + (nav-enemy-method-183 self) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-8 *game-info*) + (a0-3 (+ (-> v1-8 attack-id) 1)) + ) + (set! (-> v1-8 attack-id) a0-3) + (set! (-> self attack-id) a0-3) + ) + (let ((v1-12 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1))) + (set! (-> v1-12 prim-core action) (collide-action deadly)) + (set! (-> v1-12 local-sphere w) 7372.8) + ) + ) + :exit (behavior () + (let ((v1-3 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1))) + (set! (-> v1-3 prim-core action) (collide-action)) + (set! (-> v1-3 local-sphere w) 4096.0) + ) + (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.135)) + (ja-no-eval :group! neo-grenadier-spin-kick-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-hostile self) + ) + :post (behavior () + (when (nav-enemy-method-186 self) + (let ((a0-2 (handle->process (-> self focus handle)))) + (if a0-2 + (seek-to-point-toward-point! + (-> self root) + (get-trans (the-as process-focusable a0-2) 0) + (-> self nav max-rotation-rate) + (seconds 0.02) + ) + ) + ) + ) + (nav-enemy-simple-post) + ) + ) + +(defmethod knocked-anim ((this neo-grenadier) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot) (knocked-type none)) + (let ((s4-1 (-> this + draw + art-group + data + (cond + ((= (-> this hit-points) 0.0) + (-> this enemy-info knocked-anim) + ) + ((= (-> this incoming knocked-type) (knocked-type yellow-shot)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> this root transv quad)) + (let* ((s3-0 quaternion-rotate-y-to-vector!) + (s2-0 (new 'stack-no-clear 'quaternion)) + (s1-0 (-> this root quat)) + (a1-3 (get-knockback-dir! this (new 'stack-no-clear 'vector))) + (s3-1 (s3-0 s2-0 s1-0 (the-as quaternion (vector-negate! a1-3 a1-3)) 32768.0)) + ) + (set! (-> s4-0 y) 0.0) + (vector-normalize! s4-0 1.0) + (vector-inv-orient-by-quat! s4-0 s4-0 s3-1) + ) + (if (< 0.0 (-> s4-0 x)) + 24 + 25 + ) + ) + ) + (else + (-> this enemy-info knocked-anim) + ) + ) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.067)) + (let ((a0-12 (-> this skel root-channel 0))) + (set! (-> a0-12 frame-group) (the-as art-joint-anim s4-1)) + (set! (-> a0-12 param 0) (the float (+ (-> (the-as art-joint-anim s4-1) 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 s4-1) num-func-seek!) + ) + ) + #t + ) + (((knocked-type blue-shot)) + (let* ((a0-14 '((neo-grenadier-blue-hit0-ja) (neo-grenadier-blue-hit1-ja) (neo-grenadier-blue-hit2-ja))) + (a1-11 ((method-of-type (rtype-of a0-14) length) a0-14)) + (s5-1 (new 'static 'array uint64 3 #x1b #x1c #x1d)) + (s4-2 (new 'static 'array int32 4 0 0 0 0)) + (a2-3 (ash 1 (-> s4-2 0))) + (v1-23 (enemy-method-131 this a1-11 a2-3)) + (s5-2 (-> this draw art-group data (-> (the-as (pointer int32) (+ (* v1-23 8) (the-as int s5-1)))))) + ) + (set! (-> s4-2 0) v1-23) + (let ((v1-26 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (if (and v1-26 (= v1-26 (-> this draw art-group data 30))) + (ja-channel-push! 1 (seconds 0.17)) + (ja-channel-push! 1 (seconds 0.067)) + ) + ) + (let ((a0-29 (-> this skel root-channel 0))) + (set! (-> a0-29 frame-group) (the-as art-joint-anim s5-2)) + (set! (-> a0-29 param 0) (the float (+ (-> (the-as art-joint-anim s5-2) frames num-frames) -1))) + (set! (-> a0-29 param 1) 1.0) + (set! (-> a0-29 frame-num) 0.0) + (joint-control-channel-group! a0-29 (the-as art-joint-anim s5-2) num-func-seek!) + ) + ) + #t + ) + (else + ((method-of-type nav-enemy knocked-anim) this arg0) + ) + ) + ) + +(defmethod knocked-land-anim ((this neo-grenadier) (arg0 enemy-knocked-info)) + (cond + ((= (-> this incoming knocked-type) (knocked-type blue-shot)) + (when (>= (-> this incoming blue-juggle-count) (the-as uint 2)) + (let ((s4-0 (-> this draw art-group data 30))) + (ja-channel-push! 1 (seconds 0.067)) + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim s4-0)) + (set! (-> a0-3 param 0) (the float (+ (-> (the-as art-joint-anim s4-0) 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 s4-0) num-func-seek!) + ) + ) + ) + #t + ) + ((or (= (-> this incoming knocked-type) (knocked-type yellow-shot)) (zero? (-> this incoming knocked-type))) + #f + ) + ((< 0.0 (-> this hit-points)) + (ja-channel-push! 1 (seconds 0.067)) + (let ((a1-4 (-> this draw art-group data (-> this enemy-info knocked-land-anim))) + (a0-9 (-> this skel root-channel 0)) + ) + (set! (-> a0-9 frame-group) (the-as art-joint-anim a1-4)) + (set! (-> a0-9 param 0) (the float (+ (-> (the-as art-joint-anim a1-4) frames num-frames) -1))) + (set! (-> a0-9 param 1) (-> arg0 anim-speed)) + (set! (-> a0-9 frame-num) 0.0) + (joint-control-channel-group! a0-9 (the-as art-joint-anim a1-4) num-func-seek!) + ) + #t + ) + (else + (ja-channel-push! 1 (seconds 0.067)) + (let ((a0-11 (-> this skel root-channel 0))) + (set! (-> a0-11 frame-group) (the-as art-joint-anim (-> this draw art-group data 33))) + (set! (-> a0-11 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 33)) 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 33)) num-func-seek!) + ) + #t + ) + ) + ) + +(defstate attack (neo-grenadier) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('event-attack) + (let ((s4-0 (handle->process (-> self focus handle)))) + (when s4-0 + (let ((gp-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node neo-grenadier-lod0-jg bomb)))) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable s4-0) 0) gp-0))) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (let ((f0-0 (vector-length s5-1))) + 0.0 + (let ((f0-1 (fmin 245760.0 f0-0))) + (vector-normalize! s5-1 f0-1) + ) + ) + (vector+! s4-1 gp-0 s5-1) + (let ((f0-2 122880.0)) + (setup-from-to-xz-vel! (-> self shot-trajectory) gp-0 s4-1 f0-2 -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-9 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> a1-9 ent) (-> self entity)) + (set! (-> a1-9 charge) 1.0) + (set! (-> a1-9 options) (projectile-options)) + (logclear! (-> a1-9 options) (projectile-options po14 po15 po16)) + (set! (-> a1-9 pos quad) (-> gp-0 quad)) + (set! (-> a1-9 vel quad) (-> self shot-trajectory initial-velocity quad)) + (set! (-> a1-9 notify-handle) (process->handle self)) + (set! (-> a1-9 owner-handle) (the-as handle #f)) + (set! (-> a1-9 target-handle) (the-as handle #f)) + (set! (-> a1-9 target-pos quad) (the-as uint128 0)) + (set! (-> a1-9 ignore-handle) (process->handle self)) + (let* ((v1-30 *game-info*) + (a0-28 (+ (-> v1-30 attack-id) 1)) + ) + (set! (-> v1-30 attack-id) a0-28) + (set! (-> a1-9 attack-id) a0-28) + ) + (set! (-> a1-9 timeout) (seconds 4)) + (let ((v1-32 (-> (spawn-projectile metalhead-grenade-shot a1-9 self *default-dead-pool*) 0)) + (v0-0 (the-as object 'neo-grenadier-shot)) + ) + (set! (-> (the-as metalhead-grenade-shot v1-32) attack-mode) (the-as symbol v0-0)) + v0-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 + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-10 *game-info*) + (a0-6 (+ (-> v1-10 attack-id) 1)) + ) + (set! (-> v1-10 attack-id) a0-6) + (set! (-> self attack-id) a0-6) + ) + (set-look-at-mode! self 1) + ) + :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)) + ) + (logclear! (-> self status-flags) (grenadier-status-flag gsf1)) + (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 ((f30-0 (rnd-float-range self 0.9 1.1))) + (let ((f28-0 (vector-length (-> self root transv)))) + (ja-channel-push! 1 (seconds 0.2)) + (when (< 4096.0 f28-0) + (let* ((v1-8 (vector-float*! (new 'stack-no-clear 'vector) (-> self root transv) 0.3)) + (a2-2 (vector+! (new 'stack-no-clear 'vector) (-> self root trans) v1-8)) + ) + (set! (-> self move-pos quad) (-> self root trans quad)) + (closest-point-on-mesh (-> self nav) (-> self move-pos) a2-2 (the-as nav-poly #f)) + ) + (let ((a0-10 (-> self nav state)) + (v1-13 (-> self move-pos)) + ) + (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-13 quad)) + ) + 0 + (logclear! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + (logior! (-> self status-flags) (grenadier-status-flag gsf1)) + (ja-no-eval :group! neo-grenadier-run-to-throw-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (ja-channel-push! 1 (seconds 0.067)) + (logclear! (-> self status-flags) (grenadier-status-flag gsf1)) + (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)) + ) + ) + ) + (nav-enemy-method-182 self) + (cond + ((logtest? (-> self status-flags) (grenadier-status-flag gsf0)) + (ja-channel-push! 1 (seconds 0.135)) + (ja-no-eval :group! neo-grenadier-throw-quick-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (logclear! (-> self status-flags) (grenadier-status-flag gsf0)) + ) + (else + (when (not (enemy-method-105 self 1820.4445 #t)) + (nav-enemy-method-183 self) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! neo-grenadier-throw-turn-in-place-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)) + ) + (nav-enemy-method-184 self) + ) + (nav-enemy-method-184 self) + (ja-channel-push! 1 (seconds 0.067)) + (let ((a0-44 (handle->process (-> self focus handle)))) + (when a0-44 + (let ((f0-14 (vector-vector-distance (-> self root trans) (get-trans (the-as process-focusable a0-44) 0)))) + (cond + ((< 102400.0 f0-14) + (ja-no-eval :group! neo-grenadier-throw-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (else + (ja-no-eval :group! neo-grenadier-throw1-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (go-hostile self) + ) + :post (behavior () + (when (nav-enemy-method-186 self) + (let ((a0-2 (handle->process (-> self focus handle)))) + (if a0-2 + (seek-to-point-toward-point! + (-> self root) + (get-trans (the-as process-focusable a0-2) 0) + (-> self nav max-rotation-rate) + (seconds 0.02) + ) + ) + ) + ) + (nav-enemy-travel-post) + ) + ) + +(defstate hit (neo-grenadier) + :virtual #t + :code (behavior () + (local-vars (v1-10 int) (v1-44 enemy-flag) (v1-46 enemy-flag) (v1-48 enemy-flag)) + (let ((gp-0 (get-knockback-dir! self (new 'stack-no-clear 'vector)))) + 0 + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + (-> self root trans) + gp-0 + (meters 6) + (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (add-debug-quaternion #t (bucket-id debug-no-zbuf1) (-> self root trans) (-> self root quat)) + (let ((f0-0 (quaternion-vector-y-angle (-> self root quat) gp-0))) + (cond + ((and (< -8192.0 f0-0) (>= 8192.0 f0-0)) + (set! v1-10 26) + ) + ((and (< 8192.0 f0-0) (>= 24576.0 f0-0)) + (set! v1-10 24) + ) + ((and (< -24576.0 f0-0) (>= -8192.0 f0-0)) + (set! v1-10 25) + ) + (else + (set! v1-10 23) + ) + ) + ) + ) + (let ((gp-1 (-> self draw art-group data v1-10))) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! gp-1 :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-43 (-> self enemy-flags))) + (if (logtest? v1-43 (enemy-flag vulnerable-backup)) + (set! v1-44 (logior v1-43 (enemy-flag vulnerable))) + (set! v1-44 (logclear v1-43 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-44) + (let ((v1-45 (-> self enemy-flags))) + (if (logtest? v1-45 (enemy-flag attackable-backup)) + (set! v1-46 (logior v1-45 (enemy-flag attackable))) + (set! v1-46 (logclear v1-45 (enemy-flag attackable))) + ) + ) + (set! (-> self enemy-flags) v1-46) + (let ((v1-47 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-47) + (set! v1-48 (logior (enemy-flag trackable) v1-47)) + (set! v1-48 (logclear v1-47 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-48) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self focus-status) (focus-status hit)) + (cond + ((= (-> self focus aware) (enemy-aware ea3)) + (if (and (handle->process (-> self focus handle)) + (not (logtest? (-> (the-as process-focusable (handle->process (-> self focus handle))) focus-status) + (focus-status disable dead ignore grabbed) + ) + ) + ) + (go-virtual attack) + ) + (go-hostile self) + ) + (else + (go-stare self) + ) + ) + ) + ) + +(defmethod go-hostile ((this neo-grenadier)) + (if (and (and (-> this next-state) (= (-> this next-state name) 'knocked)) + (and (logtest? (-> this status-flags) (grenadier-status-flag gsf0)) + (handle->process (-> this focus handle)) + (not (logtest? (-> (the-as process-focusable (handle->process (-> this focus handle))) focus-status) + (focus-status disable dead ignore grabbed) + ) + ) + ) + ) + (go (method-of-object this attack)) + ) + ((method-of-type nav-enemy go-hostile) this) + ) + +(defstate victory (neo-grenadier) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (cond + ((zero? (rand-vu-int-range 0 1)) + (ja-no-eval :group! neo-grenadier-victory-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (else + (ja-no-eval :group! neo-grenadier-notice-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) + ) + ) + +(defmethod normalize-heading! ((this neo-grenadier) (arg0 nav-control)) + (local-vars (a0-4 int) (a0-6 int)) + (when (not (logtest? (-> this status-flags) (grenadier-status-flag gsf1))) + (let ((v1-3 (new 'stack-no-clear 'vector)) + (a2-0 (new 'stack-no-clear 'vector)) + ) + (vector-reset! a2-0) + (set! (-> a2-0 y) 1.0) + (let ((t0-0 (-> arg0 state))) + (set! (-> v1-3 quad) (-> t0-0 heading quad)) + ) + (let* ((a1-3 (-> *perf-stats* data 33)) + (a3-3 (-> a1-3 ctrl)) + ) + (+! (-> a1-3 count) 1) + (b! (zero? a3-3) cfg-3 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a3-3) + ) + (.sync.l) + (.sync.p) + (label cfg-3) + 0 + (forward-up-nopitch->quaternion (-> this root quat) v1-3 a2-0) + ) + (let ((v1-5 (-> *perf-stats* data 33))) + (b! (zero? (-> v1-5 ctrl)) cfg-5 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-4 pcr0) + (+! (-> v1-5 accum0) a0-4) + (.mfpc a0-6 pcr1) + (+! (-> v1-5 accum1) a0-6) + ) + (label cfg-5) + 0 + ) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod enemy-common-post ((this neo-grenadier)) + (let ((t9-0 (method-of-type nav-enemy enemy-common-post))) + (t9-0 this) + ) + (let ((a1-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 34)))) + (spawn (-> this part) a1-1) + ) + (none) + ) + +(defmethod init-enemy-collision! ((this neo-grenadier)) + (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)) + (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 no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 12288.0 0.0 22528.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 crate hit-by-others-list player-list)) + (set! (-> v1-13 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> v1-13 local-sphere) 0.0 6553.6 0.0 6553.6) + ) + (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)) + (set! (-> v1-15 transform-index) 31) + (set-vector! (-> v1-15 local-sphere) 0.0 0.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-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 deadly)) + (set! (-> v1-17 transform-index) 34) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 4096.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 deadly)) + (set! (-> v1-19 transform-index) 23) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 4096.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 deadly)) + (set! (-> v1-21 transform-index) 16) + (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-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> v1-23 prim-core action) (collide-action solid)) + (set-vector! (-> v1-23 local-sphere) 0.0 12288.0 0.0 12288.0) + ) + (set! (-> s5-0 nav-radius) 8192.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 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defmethod relocate ((this neo-grenadier) (offset int)) + (when (-> this hostile-path) + (if (nonzero? (-> this hostile-path)) + (&+! (-> this hostile-path) offset) + ) + ) + (call-parent-method this offset) + ) + +(defmethod init-enemy! ((this neo-grenadier)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-neo-grenadier" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *neo-grenadier-nav-enemy-info*) + (let ((v1-5 (-> this neck))) + (when v1-5 + (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-6 (-> this nav))) + (set! (-> v1-6 speed-scale) 1.0) + ) + 0 + (set-gravity-length (-> this root dynam) 573440.0) + (set! (-> this heading) (if (rand-vu-percent? 0.5) + #t + #f + ) + ) + (set! (-> this move-angle) 5461.3335) + (set! (-> this status-flags) (grenadier-status-flag)) + (set! (-> this suppress-knockaside-timer) 0) + (set-vector! (-> this root scale) 1.5 1.5 1.5 1.0) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1523) this)) + (set! (-> this hostile-path) (new 'process 'path-control this 'hostile 0.0 (-> this entity) #t)) + (if (zero? (-> this hostile-path)) + (set! (-> this hostile-path) #f) + ) + (if (-> this hostile-path) + (logior! (-> this hostile-path flags) (path-control-flag display draw-line draw-point draw-text)) + ) + (add-connection + *part-engine* + this + 24 + this + 468 + (new 'static 'vector :x 532.48 :y -81.92 :z 1515.52 :w 163840.0) + ) + (add-connection + *part-engine* + this + 24 + this + 468 + (new 'static 'vector :x -532.48 :y -81.92 :z 1515.52 :w 163840.0) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/sewer/neo-juicer.gc b/goal_src/jak3/levels/sewer/neo-juicer.gc index b8e87ad10e..adf9776699 100644 --- a/goal_src/jak3/levels/sewer/neo-juicer.gc +++ b/goal_src/jak3/levels/sewer/neo-juicer.gc @@ -7,3 +7,1722 @@ ;; DECOMP BEGINS +(defpartgroup group-neo-juicer-shot-hit + :id 1524 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 5003)) + ) + +(defpart 5003 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 96.0 64.0) + (:g 64.0 32.0) + (:b 96.0 64.0) + (:a 64.0) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:fade-r -0.35555556) + (:fade-g -0.35555556) + (:fade-b 0.0) + (:fade-a -0.30476192) + (:accel-y (meters -0.00016666666) (meters 0.00016666666)) + (:timer (seconds 0.7)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.2)) + (:next-launcher 5004) + (:rotate-y (degrees 0) (degrees 180)) + ) + ) + +(defpart 5005 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3.5)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 16.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpart 5006 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5) (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 48.0 16.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpart 5007 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5) (meters 0.5)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 16)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 16.0 16.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(defpart 5008 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.2)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 196.0 128.0) + (:b 64.0 64.0) + (:a 32.0 16.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +(deftype neo-juicer-shot (projectile) + ((lightning lightning-control 5) + (victim handle) + ) + ) + + +(defmethod proj-event-handler ((this neo-juicer-shot) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('reset) + (let ((v1-1 (the-as object (-> arg3 param 0)))) + (set! (-> this root trans quad) (-> (the-as (inline-array vector) v1-1) 0 quad)) + (set! (-> this starting-pos quad) (-> (the-as (inline-array vector) v1-1) 0 quad)) + (set! (-> this root transv quad) (-> (the-as (inline-array vector) v1-1) 1 quad)) + (set! (-> this pre-move-transv quad) (-> (the-as (inline-array vector) v1-1) 1 quad)) + ) + (set! (-> this hits) 0) + (set-time! (-> this spawn-time)) + (if (made-impact? this) + (go (method-of-object this impact)) + (go (method-of-object this moving)) + ) + #t + ) + (else + ((method-of-type projectile proj-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defstate dissipate (neo-juicer-shot) + :virtual #t + :enter (behavior () + (go-virtual impact) + ) + ) + +(defmethod deal-damage! ((this neo-juicer-shot) (arg0 process) (arg1 event-message-block)) + (let ((a0-2 (if (type? arg0 process-focusable) + arg0 + ) + ) + ) + (when a0-2 + (set! (-> this victim) (process->handle a0-2)) + #t + ) + ) + ) + +(defmethod projectile-method-25 ((this neo-juicer-shot)) + (let ((s5-0 (-> this starting-pos)) + (s4-0 (-> this root trans)) + ) + (when (line-in-view-frustum? s5-0 s4-0) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'matrix)) + ) + (launch-particles (-> *part-id-table* 5007) s5-0) + (launch-particles (-> *part-id-table* 5008) s5-0) + (when (not (handle->process (-> this victim))) + (launch-particles (-> *part-id-table* 5007) s4-0) + (launch-particles (-> *part-id-table* 5008) s4-0) + ) + (vector-! s2-0 s4-0 s5-0) + (vector-normalize! s2-0 1.0) + (matrix-axis-angle! s1-0 s2-0 13107.2) + (vector-reset! (-> s1-0 trans)) + (set-vector! s3-0 (-> s2-0 z) 0.0 (- (-> s2-0 x)) 1.0) + (vector-normalize! s3-0 409.6) + (dotimes (s0-0 5) + (vector-matrix*! s3-0 s3-0 s1-0) + (vector+! s2-0 s3-0 s5-0) + (let ((a0-17 (-> this lightning s0-0)) + (v1-21 s2-0) + ) + (set! (-> a0-17 state meet data 0 quad) (-> v1-21 quad)) + ) + (let ((a0-20 (-> this lightning s0-0)) + (v1-25 s4-0) + ) + (set! (-> a0-20 state meet data (+ (-> a0-20 state points-to-draw) -1) quad) (-> v1-25 quad)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod projectile-method-26 ((this neo-juicer-shot)) + (projectile-method-25 this) + (cond + ((logtest? (-> *part-group-id-table* 1524 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* 1524)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1524)) + ) + ) + 0 + (none) + ) + +(defmethod made-impact? ((this neo-juicer-shot)) + (let ((gp-0 (-> this root)) + (s5-0 (new 'stack-no-clear 'collide-query)) + ) + (let ((v1-0 s5-0)) + (set! (-> v1-0 radius) (-> gp-0 root-prim prim-core world-sphere w)) + (set! (-> v1-0 collide-with) (-> gp-0 root-prim prim-core collide-with)) + (set! (-> v1-0 ignore-process0) this) + (set! (-> v1-0 ignore-process1) (ppointer->process (-> this parent))) + (set! (-> v1-0 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-0 action-mask) (collide-action solid)) + ) + (let ((a0-2 (handle->process (-> this notify-handle)))) + (when a0-2 + (let* ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> gp-0 trans) (get-trans (the-as process-focusable a0-2) 3))) + (f0-2 (- (vector-length s4-1))) + ) + (fill-and-try-snap-to-surface gp-0 s4-1 f0-2 0.0 -3072.0 s5-0) + ) + ) + ) + ) + ) + +(defun neo-juicer-proj-move ((arg0 neo-juicer-shot)) + (let ((s5-0 (handle->process (-> arg0 victim)))) + (cond + (s5-0 + (set! (-> arg0 root trans quad) (-> (get-trans (the-as process-focusable s5-0) 3) quad)) + ((method-of-type projectile deal-damage!) arg0 s5-0 (the-as event-message-block #f)) + ) + (else + (projectile-move-fill-line-sphere arg0) + (if (logtest? (-> arg0 root status) (collide-status touch-surface)) + (go (method-of-object arg0 impact)) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod setup-collision! ((this neo-juicer-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-default) + (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 ((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 backgnd jak bot crate civilian enemy vehicle-sphere hit-by-others-list player-list) + ) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 1228.8) + (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 event-self) 'touched) + (set! (-> s5-0 max-iteration-count) (the-as uint 1)) + (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 projectile vs neo-juicer-shot. +(defmethod relocate ((this neo-juicer-shot) (offset int)) + (dotimes (v1-0 5) + (if (nonzero? (-> this lightning v1-0)) + (&+! (-> this lightning v1-0) offset) + ) + ) + (the-as neo-juicer-shot ((method-of-type projectile relocate) this offset)) + ) + +(defmethod init-proj-settings! ((this neo-juicer-shot)) + (logior! (-> this options) (projectile-options po17)) + (set! (-> this move) neo-juicer-proj-move) + (set! (-> this root dynam gravity y) 0.0) + (set! (-> this root dynam gravity-length) 0.0) + (set! (-> this root dynam gravity-max) 0.0) + (set! (-> this attack-mode) 'neo-juicer-shot) + (dotimes (s5-0 5) + (set! (-> this lightning s5-0) (new + 'process + 'lightning-control + (new 'static 'lightning-spec + :name #f + :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 120.0 + :texture (new 'static 'texture-id :index #x40 :page #x4) + :reduction 0.42 + :num-points 8 + :box-size 8192.0 + :merge-factor 0.5 + :merge-count 2 + :radius 1433.6 + :duration -1.0 + :sound #f + ) + this + 0.0 + ) + ) + ) + (set! (-> this victim) (the-as handle #f)) + 0 + (none) + ) + +(defskelgroup skel-neo-juicer neo-juicer neo-juicer-lod0-jg -1 + ((neo-juicer-lod0-mg (meters 20)) (neo-juicer-lod1-mg (meters 40)) (neo-juicer-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5.3) + :shadow neo-juicer-shadow-mg + :origin-joint-index 21 + ) + +(deftype neo-juicer-anim-info (structure) + ((anim-index int32) + ) + :pack-me + ) + + +(deftype neo-juicer-global-info (basic) + ((prev-yellow-hit int8) + (prev-blue-hit int8) + (idle-anim neo-juicer-anim-info 3 :inline) + (patrol-anim neo-juicer-anim-info 2 :inline) + (notice-anim neo-juicer-anim-info 2 :inline) + (charge-anim neo-juicer-anim-info 2 :inline) + (knocked-anim neo-juicer-anim-info 2 :inline) + (celebrate-anim neo-juicer-anim-info 2 :inline) + (yellow-hit-anim neo-juicer-anim-info 4 :inline) + (blue-hit-anim neo-juicer-anim-info 6 :inline) + ) + ) + + +(deftype neo-juicer (nav-enemy) + ((los los-control :inline) + (intro-path path-control) + (joint joint-mod) + (joint-enable symbol) + (joint-blend float) + (last-fire-time time-frame) + (heading symbol) + (move-angle float) + (torso-track-player joint-mod) + (circle-backward? symbol :offset 832) + (using-turn-anim symbol) + (hit-focus focus) + (ambush-path-pt int8) + (charge-index int8) + (hostile-dest vector :inline) + (current-projectile handle) + ) + (:state-methods + ambush-cont + attack + ) + (:methods + (go-die-or-knocked (_type_) object) + (spawn-proj! (_type_ process-focusable uint) none) + (track-focus! (_type_) none) + (start-tracking (_type_) none) + (toggle-deadly-flag (_type_ symbol) none) + ) + ) + + +(define *neo-juicer-global-info* (new 'static 'neo-juicer-global-info + :idle-anim (new 'static 'inline-array neo-juicer-anim-info 3 + (new 'static 'neo-juicer-anim-info :anim-index 5) + (new 'static 'neo-juicer-anim-info :anim-index 6) + (new 'static 'neo-juicer-anim-info :anim-index 7) + ) + :patrol-anim (new 'static 'inline-array neo-juicer-anim-info 2 + (new 'static 'neo-juicer-anim-info :anim-index 8) + (new 'static 'neo-juicer-anim-info :anim-index 23) + ) + :notice-anim (new 'static 'inline-array neo-juicer-anim-info 2 + (new 'static 'neo-juicer-anim-info :anim-index 21) + (new 'static 'neo-juicer-anim-info :anim-index 22) + ) + :charge-anim (new 'static 'inline-array neo-juicer-anim-info 2 + (new 'static 'neo-juicer-anim-info :anim-index 9) + (new 'static 'neo-juicer-anim-info :anim-index 20) + ) + :knocked-anim (new 'static 'inline-array neo-juicer-anim-info 2 + (new 'static 'neo-juicer-anim-info :anim-index 16) + (new 'static 'neo-juicer-anim-info :anim-index 18) + ) + :celebrate-anim (new 'static 'inline-array neo-juicer-anim-info 2 + (new 'static 'neo-juicer-anim-info :anim-index 24) + (new 'static 'neo-juicer-anim-info :anim-index 25) + ) + :yellow-hit-anim (new 'static 'inline-array neo-juicer-anim-info 4 + (new 'static 'neo-juicer-anim-info :anim-index 33) + (new 'static 'neo-juicer-anim-info :anim-index 34) + (new 'static 'neo-juicer-anim-info :anim-index 35) + (new 'static 'neo-juicer-anim-info :anim-index 36) + ) + :blue-hit-anim (new 'static 'inline-array neo-juicer-anim-info 6 + (new 'static 'neo-juicer-anim-info :anim-index 26) + (new 'static 'neo-juicer-anim-info :anim-index 27) + (new 'static 'neo-juicer-anim-info :anim-index 28) + (new 'static 'neo-juicer-anim-info :anim-index 29) + (new 'static 'neo-juicer-anim-info :anim-index 30) + (new 'static 'neo-juicer-anim-info :anim-index 31) + ) + ) + ) + +(define *fact-info-neo-juicer-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9) + ) + +(define *neo-juicer-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 #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 21 + :hostile-anim 9 + :hit-anim 11 + :knocked-anim 18 + :knocked-land-anim 19 + :die-anim 40 + :die-falling-anim 41 + :victory-anim 24 + :jump-wind-up-anim 37 + :jump-in-air-anim 38 + :jump-land-anim 39 + :neck-joint 34 + :look-at-joint 34 + :bullseye-joint 6 + :sound-hit (static-sound-name "juicer-hit") + :sound-die (static-sound-name "juicer-die") + :notice-distance (meters 30) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 24) + :default-hit-points 9.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.9 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'shock-red + :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 65536.0 + :knocked-soft-vxz-hi 94208.0 + :knocked-soft-vy-lo 77824.0 + :knocked-soft-vy-hi 98304.0 + :knocked-medium-vxz-lo 81920.0 + :knocked-medium-vxz-hi 98304.0 + :knocked-medium-vy-lo 81920.0 + :knocked-medium-vy-hi 122880.0 + :knocked-hard-vxz-lo 65536.0 + :knocked-hard-vxz-hi 95846.4 + :knocked-hard-vy-lo 122880.0 + :knocked-hard-vy-hi 163840.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 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 98304.0 + :knocked-red-vy-lo 90112.0 + :knocked-red-vy-hi 131072.0 + :knocked-blue-vxz-lo 24576.0 + :knocked-blue-vxz-hi 32768.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 73728.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 34 + :gem-seg #x2 + :gem-no-seg #x4 + :gem-offset (new 'static 'sphere :y 942.08 :z 40.96 :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 8 + :turn-anim 10 + :run-anim 9 + :taunt-anim -1 + :run-travel-speed (meters 8) + :run-acceleration (meters 8) + :run-turning-acceleration (meters 20) + :walk-travel-speed (meters 2) + :walk-acceleration (meters 2) + :walk-turning-acceleration (meters 3) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 7.5) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 28672.0 + :circle-dist-hi 53248.0 + :nav-mesh #f + ) + ) + +(set! (-> *neo-juicer-nav-enemy-info* fact-defaults) *fact-info-neo-juicer-defaults*) + +(defmethod track-focus! ((this neo-juicer)) + (let ((s3-0 (handle->process (-> this focus handle)))) + (when s3-0 + (let ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 4))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> (get-trans (the-as process-focusable s3-0) 3) quad)) + (let ((s3-1 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data 4 bone transform fvec) 1.0) + ) + ) + (vector-! s5-0 s5-0 s4-0) + (vector-normalize! s5-0 1.0) + (quaternion-from-two-vectors-partial! (-> this joint quat) s3-1 s5-0 (-> this joint-blend)) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod start-tracking ((this neo-juicer)) + (cond + ((-> this torso-track-player) + (set! (-> this joint-enable) #t) + (seek! (-> this joint-blend) 1.0 (* 2.0 (seconds-per-frame))) + (track-focus! this) + ) + ((-> this joint-enable) + (seek! (-> this joint-blend) 0.0 (* 4.0 (seconds-per-frame))) + (track-focus! this) + (if (= (-> this joint-blend) 0.0) + (set! (-> this joint-enable) #f) + ) + ) + ) + 0 + (none) + ) + +(defmethod enemy-common-post ((this neo-juicer)) + (let ((t9-0 (method-of-type nav-enemy enemy-common-post))) + (t9-0 this) + ) + (los-control-method-9 + (-> this los) + (the-as process-focusable (handle->process (-> this focus handle))) + (the-as vector #f) + 819.2 + 4096.0 + ) + (start-tracking this) + (none) + ) + +(defmethod go-die-or-knocked ((this neo-juicer)) + (if (and (= (-> this incoming knocked-type) (knocked-type yellow-shot)) + (not (and (-> this next-state) (let ((v1-6 (-> this next-state name))) + (or (= v1-6 'knocked) (= v1-6 'jump) (= v1-6 'jump-land)) + ) + ) + ) + (zero? (rnd-int this 3)) + (let ((f0-0 (vector-vector-distance-squared (-> this root trans) (target-pos 0))) + (f1-0 32768.0) + ) + (>= f0-0 (* f1-0 f1-0)) + ) + ) + (go-die this) + (go (method-of-object this knocked)) + ) + ) + +(defmethod event-handler ((this neo-juicer) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit-flinch) + (cond + ((= (-> this hit-points) 0.0) + (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-die-or-knocked this) + ) + (else + (let ((v1-29 (ja-channel-float! (the-as art-joint-anim (-> this draw art-group data 11)) 0.0 0.0 0.0))) + (when v1-29 + (set! (-> v1-29 param 0) 1.0) + (set! (-> v1-29 param 1) 0.75) + (set! (-> v1-29 param 2) 2.0) + (set! (-> v1-29 num-func) num-func-interp-play!) + ) + ) + ) + ) + #t + ) + (('hit) + (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-die-or-knocked this) + (go (method-of-object this hit)) + ) + #t + ) + (('instant-death) + (when (< 0.0 (-> this hit-points)) + (set! (-> this hit-points) 0.0) + (set! (-> this root penetrated-by) (get-penetrated-by this)) + (let ((s4-0 (get-knockback-dir! this (new 'stack-no-clear 'vector)))) + (vector-z-quaternion! s4-0 (-> this root quat)) + (vector-float*! s4-0 s4-0 -1.0) + (vector-normalize! s4-0 1.0) + ) + (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-die-or-knocked this) + ) + #t + ) + (('notify) + (if (and (= (-> arg3 param 0) 'attack) (= (-> arg3 param 1) (handle->process (-> this focus handle)))) + (set! (-> this hit-focus) (the-as focus #t)) + ) + ((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) + ) + ) + ) + +(defstate active (neo-juicer) + :virtual #t + :code (behavior () + (let ((v1-2 (ja-group))) + (when (or (and v1-2 (or (= v1-2 neo-juicer-charge0-ja) (= v1-2 neo-juicer-charge1-ja))) + (let ((v1-8 (ja-group))) + (and v1-8 (or (= v1-8 neo-juicer-patrol0-ja) (= v1-8 neo-juicer-patrol1-ja))) + ) + ) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (until #f + (let ((gp-0 (-> self draw art-group data (-> *neo-juicer-global-info* patrol-anim (rnd-int self 2) anim-index))) + (s5-0 (set-reaction-time! self 1 (seconds 0.027))) + ) + (let ((v1-34 (ja-group))) + (if (not (and v1-34 (= v1-34 gp-0))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (dotimes (s4-0 s5-0) + (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)) + ) + ) + ) + (when (zero? (rnd-int self 2)) + (nav-enemy-method-182 self) + (ja-channel-push! 1 (seconds 0.3)) + (let ((gp-1 0)) + (until (not (enemy-method-134 self 0.4)) + (let* ((v1-61 (enemy-method-131 self 3 gp-1)) + (a1-15 (-> self draw art-group data (-> *neo-juicer-global-info* idle-anim v1-61 anim-index))) + ) + (set! gp-1 (ash 1 v1-61)) + (ja-no-eval :group! a1-15 :num! (seek! max f30-0) :frame-num 0.0) + ) + (ja-no-eval :group! (ja-group) :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + (nav-enemy-method-181 self) + ) + ) + ) + #f + ) + ) + +(defmethod setup-jump! ((this neo-juicer) (arg0 enemy-jump-info)) + ((method-of-type nav-enemy setup-jump!) this arg0) + (none) + ) + +(defmethod go-directed2 ((this neo-juicer)) + (case (-> this jump-why) + ((2) + (go (method-of-object this ambush-cont)) + ) + (else + ((method-of-type nav-enemy go-directed2) this) + ) + ) + ) + +(defstate ambush (neo-juicer) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy ambush) enter))) + (if t9-0 + (t9-0) + ) + ) + (when (zero? (-> self intro-path)) + (format 0 "ERROR: ~A has no intro path, skipping ambush~%" (-> self name)) + (go-virtual notice) + ) + (get-point-in-path! (-> self intro-path) (-> self root trans) 0.0 'interp) + ) + :code (behavior () + (set! (-> self ambush-path-pt) 1) + (until #f + (let ((gp-0 (new 'stack-no-clear 'vector))) + (get-point-in-path! (-> self intro-path) gp-0 1.0 'interp) + (set! (-> self enemy-flags) + (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked))) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (let ((v1-5 (process->ppointer self))) + (set! (-> a1-1 from) v1-5) + ) + (set! (-> a1-1 num-params) 2) + (set! (-> a1-1 message) 'jump) + (set! (-> a1-1 param 0) (the-as uint 2)) + (set! (-> a1-1 param 1) (the-as uint gp-0)) + (send-event-function self a1-1) + ) + ) + (suspend) + ) + #f + ) + ) + +(defstate ambush-cont (neo-juicer) + :virtual #t + :event enemy-event-handler + :code (behavior () + (let ((a0-0 (-> self intro-path)) + (v1-1 (+ (-> self ambush-path-pt) 1)) + ) + (if (< v1-1 (-> a0-0 curve num-cverts)) + (set! (-> self ambush-path-pt) v1-1) + (go-best-state self) + ) + ) + (until #f + (let ((gp-0 (new 'stack-no-clear 'vector))) + (get-point-in-path! (-> self intro-path) gp-0 (the float (-> self ambush-path-pt)) 'interp) + (set! (-> self enemy-flags) + (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked))) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (let ((v1-9 (process->ppointer self))) + (set! (-> a1-1 from) v1-9) + ) + (set! (-> a1-1 num-params) 2) + (set! (-> a1-1 message) 'jump) + (set! (-> a1-1 param 0) (the-as uint 2)) + (set! (-> a1-1 param 1) (the-as uint gp-0)) + (send-event-function self a1-1) + ) + ) + (suspend) + ) + #f + ) + ) + +(defstate notice (neo-juicer) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (let ((s5-0 0)) + (let ((s4-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat))) + (gp-1 (vector-! + (new 'stack-no-clear 'vector) + (get-trans (the-as process-focusable (handle->process (-> self focus handle))) 0) + (-> self root trans) + ) + ) + ) + (vector-flatten! gp-1 gp-1 (-> s4-0 uvec)) + (vector-normalize! gp-1 1.0) + (cond + ((< (vector-dot gp-1 (-> s4-0 fvec)) (cos 8192.0)) + ) + (else + (set! s5-0 (logior s5-0 1)) + ) + ) + ) + (let ((f30-1 (rnd-float-range self 0.8 1.2)) + (gp-2 (new 'stack-no-clear 'vector)) + ) + (let* ((a0-13 (enemy-method-131 self 2 s5-0)) + (a1-8 (-> self draw art-group data (-> *neo-juicer-global-info* notice-anim a0-13 anim-index))) + ) + (ja-no-eval :group! a1-8 :num! (seek! max f30-1) :frame-num 0.0) + ) + (until (ja-done? 0) + (let ((a1-9 (-> self nav state))) + (set! (-> gp-2 quad) (-> a1-9 travel quad)) + ) + (seek-toward-heading-vec! (-> self root) gp-2 (-> self nav max-rotation-rate) (seconds 0.02)) + (suspend) + (ja :num! (seek! max f30-1)) + ) + ) + ) + (go-best-state self) + ) + ) + +(defstate victory (neo-juicer) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.15)) + (let ((gp-1 (-> self draw art-group data (-> *neo-juicer-global-info* celebrate-anim (rnd-int self 2) anim-index))) + (f30-0 (rnd-float-range self 0.9 1.1)) + ) + (ja-no-eval :group! gp-1 :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 (neo-juicer) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) exit))) + (if t9-0 + (t9-0) + ) + ) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (when (and v1-2 (or (= v1-2 neo-juicer-charge0-ja) (= v1-2 neo-juicer-charge1-ja))) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (let* ((v1-16 (rnd-int self 2)) + (gp-0 (-> self draw art-group data (-> *neo-juicer-global-info* charge-anim v1-16 anim-index))) + ) + (set! (-> self charge-index) v1-16) + (let ((v1-19 (ja-group))) + (if (not (and v1-19 (= v1-19 gp-0))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim gp-0)) + ) + (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)) + ) + ) + #f + ) + :post (behavior () + (let ((a0-1 (handle->process (-> self focus handle)))) + (when a0-1 + (let* ((gp-0 (get-trans (the-as process-focusable a0-1) 1)) + (f0-0 (vector-vector-xz-distance (-> self root trans) gp-0)) + ) + (let ((v1-8 (-> self nav state))) + (logclear! (-> v1-8 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-8 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-8 target-pos quad) (-> gp-0 quad)) + ) + 0 + (if (and (>= 53248.0 f0-0) (should-check-los? (-> self los) 0) (get-focus! self)) + (go-virtual attack) + ) + ) + ) + ) + (nav-enemy-travel-post) + ) + ) + +(defmethod get-focus! ((this neo-juicer)) + (let* ((t9-0 (method-of-type nav-enemy get-focus!)) + (v1-1 (t9-0 this)) + ) + (if (and v1-1 (time-elapsed? (-> this last-fire-time) (seconds 7))) + v1-1 + ) + ) + ) + +(defbehavior neo-juicer-face-player-post neo-juicer () + (let ((gp-0 (handle->process (-> self focus handle)))) + (when (and (nav-enemy-method-186 self) gp-0) + (let ((f0-1 + (fabs + (deg-diff + (quaternion-y-angle (-> self root quat)) + (vector-y-angle + (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable gp-0) 0) (-> self root trans)) + ) + ) + ) + ) + ) + (cond + ((or (< 5461.3335 f0-1) (and (-> self using-turn-anim) (< 910.2222 f0-1))) + (set! (-> self using-turn-anim) #t) + (seek-to-point-toward-point! + (-> self root) + (get-trans (the-as process-focusable gp-0) 0) + (-> self nav max-rotation-rate) + (seconds 0.2) + ) + ) + (else + (set! (-> self using-turn-anim) #f) + ) + ) + ) + ) + ) + (nav-enemy-simple-post) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod spawn-proj! ((this neo-juicer) (arg0 process-focusable) (arg1 uint)) + (with-pp + (let ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 20))) + (s5-0 (new 'stack-no-clear 'projectile-init-by-other-params)) + ) + (when (not (handle->process (-> this current-projectile))) + (set! (-> s5-0 ent) (-> this 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 this)) + (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 this)) + (set! (-> s5-0 attack-id) arg1) + (set! (-> s5-0 timeout) (seconds 4)) + ) + (vector-normalize! (vector-! (-> s5-0 pos) (get-trans arg0 3) s4-0) 1.0) + (vector-float*! (-> s5-0 vel) (-> s5-0 pos) (* 24576.0 (-> pp clock frames-per-second))) + (vector+float*! (-> s5-0 pos) s4-0 (-> s5-0 pos) -1024.0) + (let ((a0-21 (handle->process (-> this current-projectile)))) + (if a0-21 + (send-event a0-21 'reset s5-0) + (set! (-> this current-projectile) + (ppointer->handle (spawn-projectile neo-juicer-shot s5-0 this *default-dead-pool*)) + ) + ) + ) + ) + (none) + ) + ) + +(defstate attack (neo-juicer) + :virtual #t + :event enemy-event-handler + :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 + (set! (-> self torso-track-player) (the-as joint-mod #t)) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (set! (-> self hit-focus) #f) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-9 *game-info*) + (v0-0 (+ (-> v1-9 attack-id) 1)) + ) + (set! (-> v1-9 attack-id) v0-0) + (set! (-> self attack-id) v0-0) + ) + ) + :exit (behavior () + (set! (-> self torso-track-player) #f) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (toggle-deadly-flag self #f) + (set-time! (-> self last-fire-time)) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (send-event (handle->process (-> self current-projectile)) 'die) + ) + :trans (behavior () + '() + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! neo-juicer-attack0-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (if (< 11.0 (ja-aframe-num 0)) + (toggle-deadly-flag self #t) + ) + (suspend) + (ja :num! (seek!)) + ) + 0 + (let* ((gp-0 #f) + (v1-29 *game-info*) + (s5-0 (+ (-> v1-29 attack-id) 1)) + ) + (set! (-> v1-29 attack-id) s5-0) + (let ((s4-0 (current-time))) + (until (time-elapsed? s4-0 (seconds 0.25)) + (ja-no-eval :group! neo-juicer-attack0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((s3-0 (handle->process (-> self focus handle)))) + (when s3-0 + (when (< 28672.0 (vector-vector-distance (-> self root trans) (get-trans (the-as process-focusable s3-0) 0))) + (spawn-proj! self (the-as process-focusable s3-0) s5-0) + (current-time) + (if (not gp-0) + (set! gp-0 #t) + ) + ) + ) + ) + (if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory)) + (go-virtual victory) + ) + (b! + (not (and (-> self using-turn-anim) (let ((v1-73 (ja-group))) + (not (and v1-73 (= v1-73 neo-juicer-attack-turn-ja))) + ) + ) + ) + cfg-31 + :delay (empty-form) + ) + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! neo-juicer-attack-turn-ja) + (b! #t cfg-42 :delay (nop!)) + (label cfg-31) + (when (and (not (-> self using-turn-anim)) (let ((v1-84 (ja-group))) + (not (and v1-84 (= v1-84 neo-juicer-attack0-ja))) + ) + ) + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! neo-juicer-attack0-ja) + ) + (label cfg-42) + (suspend) + (ja :num! (seek!)) + ) + (send-event (handle->process (-> self current-projectile)) 'die) + (let ((a0-37 (handle->process (-> self focus handle)))) + (when a0-37 + (if (>= 28672.0 (vector-vector-distance (-> self root trans) (get-trans (the-as process-focusable a0-37) 0))) + (go-virtual circling) + ) + ) + ) + (suspend) + ) + ) + ) + (if (-> self hit-focus) + (go-virtual victory) + ) + (go-hostile self) + ) + :post neo-juicer-face-player-post + ) + +(defstate circling (neo-juicer) + :virtual #t + :code (behavior () + (let ((v1-2 (ja-group))) + (when (and v1-2 (or (= v1-2 neo-juicer-charge0-ja) (= v1-2 neo-juicer-charge1-ja))) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (until #f + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (nav-enemy-method-177 self) + (let* ((v1-22 (rnd-int self 2)) + (gp-0 (-> self draw art-group data (-> *neo-juicer-global-info* charge-anim v1-22 anim-index))) + ) + (set! (-> self charge-index) v1-22) + (let ((v1-25 (ja-group))) + (if (not (and v1-25 (= v1-25 gp-0))) + (ja-channel-push! 1 (seconds 0.15)) + ) + ) + (let ((s5-0 (+ (rnd-int self 6) 2)) + (f30-0 (rnd-float-range self 0.9 1.1)) + ) + (while (nonzero? s5-0) + (+! s5-0 -1) + (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)) + ) + ) + ) + ) + (when (< 20480.0 (vector-vector-xz-distance (-> self focus-pos) (-> self root trans))) + (nav-enemy-method-182 self) + (nav-enemy-method-184 self) + (vector-reset! (-> self root transv)) + (ja-channel-push! 1 (seconds 0.1)) + (let ((gp-2 (-> self draw art-group data (-> *neo-juicer-global-info* celebrate-anim (rnd-int self 2) anim-index))) + (f30-2 (rnd-float-range self 0.9 1.1)) + ) + (ja-no-eval :group! gp-2 :num! (seek! max f30-2) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-2)) + ) + ) + ) + ) + #f + ) + ) + +(defstate hit (neo-juicer) + :virtual #t + :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-virtual hostile) + ) + ) + +(defstate stare (neo-juicer) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 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) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + #f + ) + ) + +(defstate taunt (neo-juicer) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.6)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (let ((gp-0 (set-reaction-time! self (seconds 0.2) (seconds 0.7))) + (s5-0 (current-time)) + (f28-0 f30-0) + ) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) + :num! (loop! f28-0) + :frame-num 0.0 + ) + (until (time-elapsed? s5-0 gp-0) + (suspend) + (ja :num! (loop! f28-0)) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info taunt-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (go-virtual stare) + ) + ) + +(defmethod knocked-anim ((this neo-juicer) (arg0 enemy-knocked-info)) + (local-vars (a2-2 int)) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot)) + (ja-channel-push! 1 0) + (let* ((a2-0 (ash 1 (-> *neo-juicer-global-info* prev-yellow-hit))) + (v1-3 (enemy-method-131 this 4 a2-0)) + (a1-6 (-> this draw art-group data (-> *neo-juicer-global-info* yellow-hit-anim v1-3 anim-index))) + ) + (set! (-> *neo-juicer-global-info* prev-yellow-hit) v1-3) + (let ((a0-13 (-> this skel root-channel 0))) + (set! (-> a0-13 frame-group) (the-as art-joint-anim a1-6)) + (set! (-> a0-13 param 0) (the float (+ (-> (the-as art-joint-anim a1-6) frames num-frames) -1))) + (set! (-> a0-13 param 1) (-> arg0 anim-speed)) + (set! (-> a0-13 frame-num) 0.0) + (joint-control-channel-group! a0-13 (the-as art-joint-anim a1-6) num-func-seek!) + ) + ) + ) + (((knocked-type blue-shot)) + (let ((v1-11 (ash 1 (-> *neo-juicer-global-info* prev-blue-hit)))) + (if (zero? (-> this charge-index)) + (set! a2-2 (logior v1-11 56)) + (set! a2-2 (logior v1-11 7)) + ) + ) + (let* ((v1-15 (enemy-method-131 this 6 a2-2)) + (s5-1 (-> this draw art-group data (-> *neo-juicer-global-info* blue-hit-anim v1-15 anim-index))) + ) + (set! (-> *neo-juicer-global-info* prev-blue-hit) v1-15) + (let ((v1-18 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (if (and v1-18 (= v1-18 (-> this draw art-group data 32))) + (ja-channel-push! 1 (seconds 0.17)) + (ja-channel-push! 1 (seconds 0.02)) + ) + ) + (let ((a0-32 (-> this skel root-channel 0))) + (set! (-> a0-32 frame-group) (the-as art-joint-anim s5-1)) + (set! (-> a0-32 param 0) (the float (+ (-> (the-as art-joint-anim s5-1) frames num-frames) -1))) + (set! (-> a0-32 param 1) 1.0) + (set! (-> a0-32 frame-num) 0.0) + (joint-control-channel-group! a0-32 (the-as art-joint-anim s5-1) num-func-seek!) + ) + ) + ) + (else + (let ((s4-1 (-> this draw art-group data (-> *neo-juicer-global-info* knocked-anim (rnd-int this 2) anim-index)))) + (ja-channel-push! 1 (seconds 0.17)) + (let ((a0-37 (-> this skel root-channel 0))) + (set! (-> a0-37 frame-group) (the-as art-joint-anim s4-1)) + (set! (-> a0-37 param 0) (the float (+ (-> (the-as art-joint-anim s4-1) frames num-frames) -1))) + (set! (-> a0-37 param 1) (-> arg0 anim-speed)) + (set! (-> a0-37 frame-num) 0.0) + (joint-control-channel-group! a0-37 (the-as art-joint-anim s4-1) num-func-seek!) + ) + ) + ) + ) + #t + ) + +(defmethod knocked-land-anim ((this neo-juicer) (arg0 enemy-knocked-info)) + (cond + ((= (-> this incoming knocked-type) (knocked-type blue-shot)) + (when (>= (-> this incoming blue-juggle-count) (the-as uint 2)) + (let ((s4-0 (-> this draw art-group data 32))) + (ja-channel-push! 1 (seconds 0.17)) + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim s4-0)) + (set! (-> a0-3 param 0) (the float (+ (-> (the-as art-joint-anim s4-0) 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 s4-0) num-func-seek!) + ) + ) + #t + ) + ) + ((!= (-> this incoming knocked-type) (knocked-type yellow-shot)) + (let* ((v1-14 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + (s4-1 (if (and v1-14 (= v1-14 (-> this draw art-group data 18))) + (-> this draw art-group data 19) + (-> this draw art-group data 17) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.17)) + (let ((a0-10 (-> this skel root-channel 0))) + (set! (-> a0-10 frame-group) (the-as art-joint-anim s4-1)) + (set! (-> a0-10 param 0) (the float (+ (-> (the-as art-joint-anim s4-1) frames num-frames) -1))) + (set! (-> a0-10 param 1) (-> arg0 anim-speed)) + (set! (-> a0-10 frame-num) 0.0) + (joint-control-channel-group! a0-10 (the-as art-joint-anim s4-1) num-func-seek!) + ) + ) + #t + ) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod toggle-deadly-flag ((this neo-juicer) (arg0 symbol)) + (let ((v1-1 (-> this root root-prim))) + (dotimes (a0-1 (the-as int (-> v1-1 specific 0))) + (let ((a2-1 (-> (the-as collide-shape-prim-group v1-1) child a0-1))) + (if arg0 + (logior! (-> a2-1 prim-core action) (collide-action deadly)) + (logclear! (-> a2-1 prim-core action) (collide-action deadly)) + ) + ) + ) + ) + (none) + ) + +(defmethod enemy-method-108 ((this neo-juicer) (arg0 process-focusable)) + (focus-test? arg0 invulnerable) + ) + +(defmethod init-enemy-collision! ((this neo-juicer)) + (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 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 deadly no-standon)) + (set! (-> s4-0 transform-index) 21) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 -4096.0 18432.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 no-standon)) + (set-vector! (-> v1-14 local-sphere) 0.0 6144.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 enemy)) + (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) 6) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 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 solid)) + (set! (-> v1-18 transform-index) 16) + (set-vector! (-> v1-18 local-sphere) 0.0 0.0 0.0 2048.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 solid)) + (set! (-> v1-20 transform-index) 11) + (set-vector! (-> v1-20 local-sphere) 0.0 0.0 0.0 2048.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 bot player-list)) + (set! (-> v1-22 prim-core action) (collide-action solid)) + (set! (-> v1-22 transform-index) 34) + (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 solid)) + (set! (-> v1-24 transform-index) 20) + (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 los-blocker)) + (set! (-> v1-26 prim-core action) (collide-action solid)) + (set-vector! (-> v1-26 local-sphere) 0.0 8192.0 0.0 8192.0) + ) + (set! (-> s5-0 nav-radius) 8192.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 neo-juicer) (offset int)) + (if (nonzero? (-> this intro-path)) + (&+! (-> this intro-path) offset) + ) + (if (nonzero? (-> this joint)) + (&+! (-> this joint) offset) + ) + (call-parent-method this offset) + ) + +(defmethod init-enemy! ((this neo-juicer)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-neo-juicer" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *neo-juicer-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! (-> this last-fire-time) 0) + (set! (-> this heading) (if (rand-vu-percent? 0.5) + #t + #f + ) + ) + (set! (-> this move-angle) 5461.3335) + (set! (-> this torso-track-player) #f) + (init-los! (-> this los) this (seconds 0.2) 327680.0 (collide-spec backgnd hit-by-others-list los-blocker)) + (set! (-> this joint) (new 'process 'joint-mod (joint-mod-mode polar-look-at) this 5)) + (set! (-> this using-turn-anim) #f) + (let ((v1-18 (new 'process 'path-control this 'intro 0.0 (the-as entity #f) #t))) + (set! (-> this intro-path) v1-18) + (if (nonzero? v1-18) + (logior! (-> v1-18 flags) (path-control-flag display draw-line draw-point draw-text)) + ) + ) + (add-connection + *part-engine* + this + 34 + this + 468 + (new 'static 'vector :x 901.12 :y -1146.88 :z 1269.76 :w 163840.0) + ) + (add-connection + *part-engine* + this + 34 + this + 468 + (new 'static 'vector :x -901.12 :y -1146.88 :z 1269.76 :w 163840.0) + ) + (add-connection *part-engine* this 20 this 5005 (new 'static 'vector :w 163840.0)) + (set! (-> this root pause-adjust-distance) 81920.0) + (set! (-> this current-projectile) (the-as handle #f)) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/sewer/saberfish-spawner.gc b/goal_src/jak3/levels/sewer/saberfish-spawner.gc index 3b01cc4bc5..1ff114ba9b 100644 --- a/goal_src/jak3/levels/sewer/saberfish-spawner.gc +++ b/goal_src/jak3/levels/sewer/saberfish-spawner.gc @@ -7,3 +7,1525 @@ ;; DECOMP BEGINS +(deftype path-index-array (inline-array-class) + ((data int8 :dynamic) + ) + ) + + +(set! (-> path-index-array heap-base) (the-as uint 1)) + +(deftype nav-mesh-jump (structure) + ((mesh nav-mesh) + (paths path-index-array) + (in-water? symbol) + ) + ) + + +(deftype nav-mesh-jump-array (inline-array-class) + ((data nav-mesh-jump :inline :dynamic) + ) + ) + + +(set! (-> nav-mesh-jump-array heap-base) (the-as uint 16)) + +(deftype saberfish-spawner-command (structure) + ((command symbol) + (message symbol) + (initial-state symbol) + (parent handle) + ) + ) + + +(deftype saberfish-spawn-query (structure) + ((alive-count int16) + ) + ) + + +(deftype saberfish-spawner (process-drawable) + ((jump-paths (array path-control)) + (nav-mesh-jumps nav-mesh-jump-array) + (live-count int8) + (last-spawned-process handle) + (mgr-parent handle) + (spawned-saberfish handle 128) + (num-spawned-saberfish int32) + ) + (:state-methods + saberfish-spawner-base-state + ) + (:methods + (saberfish-spawner-method-21 (_type_) none) + (saberfish-spawner-method-22 (_type_ vector saberfish-find-behavior) int) + (draw-paths (_type_) none) + (saberfish-spawner-method-24 (_type_ saberfish) int) + (spawn-saberfish (_type_ symbol symbol process) none) + (saberfish-spawner-method-26 (_type_ process int symbol event-message-block) object) + ) + ) + + +(defmethod init-from-entity! ((this saberfish-spawner) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (process-entity-set! this arg0) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (set! (-> this num-spawned-saberfish) 0) + (set! (-> this last-spawned-process) (the-as handle #f)) + (let ((s5-1 0)) + (let ((s4-0 (-> ((method-of-type res-lump lookup-tag-idx) (-> this entity) 'path 'base -1000000000.0) lo))) + (when (>= (the-as int s4-0) 0) + (let ((s3-0 (the-as int s4-0)) + (v1-6 (-> this entity tag s4-0)) + ) + 0 + (while (= (-> v1-6 name) (-> this entity tag s4-0 name)) + (make-property-data (-> this entity) 0.0 (the-as res-tag-pair s3-0) (the-as pointer #f)) + (+! s5-1 1) + (+! s3-0 1) + (set! v1-6 (-> this entity tag s3-0)) + ) + ) + ) + ) + (let ((a3-2 (* (/ s5-1 2) 2))) + (set! (-> this jump-paths) (new 'process 'boxed-array path-control a3-2)) + ) + ) + 0.0 + (dotimes (s5-2 (-> this jump-paths length)) + (set! (-> this jump-paths s5-2) + (new 'process 'path-control this 'path (the float s5-2) (the-as entity #f) #f) + ) + (logior! (-> this jump-paths s5-2 flags) (path-control-flag display draw-line draw-point draw-text)) + ) + 0 + (set! sv-16 (new 'static 'res-tag)) + (res-lump-struct (-> this entity) 'nav-mesh-actor structure :tag-ptr (& sv-16)) + (let ((s5-3 (-> sv-16 elt-count))) + (set! (-> this nav-mesh-jumps) (new 'process 'nav-mesh-jump-array (the-as int s5-3))) + (dotimes (s4-1 (the-as int s5-3)) + (let ((v1-38 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor s4-1))) + (if v1-38 + (set! (-> this nav-mesh-jumps data s4-1 mesh) v1-38) + ) + ) + ) + ) + (saberfish-spawner-method-21 this) + (let ((f0-3 (res-lump-float (-> this entity) 'rotoffset))) + (quaternion-rotate-y! (-> this root quat) (-> this root quat) f0-3) + ) + (let ((t9-13 (method-of-type res-lump get-property-struct)) + (a0-32 (-> this entity)) + (a1-16 'trans-offset) + (a2-9 'interp) + (a3-6 -1000000000.0) + (t0-3 (new 'stack-no-clear 'vector)) + ) + (set! (-> t0-3 x) 0.0) + (set! (-> t0-3 y) 0.0) + (set! (-> t0-3 z) 0.0) + (set! (-> t0-3 w) 1.0) + (let ((v1-49 (the-as vector (t9-13 a0-32 a1-16 a2-9 a3-6 t0-3 (the-as (pointer res-tag) #f) *res-static-buf*)))) + (vector+! (-> this root trans) (-> this root trans) v1-49) + ) + ) + (go (method-of-object this saberfish-spawner-base-state)) + ) + +(defstate saberfish-spawner-base-state (saberfish-spawner) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (saberfish-spawner-method-26 self proc argc message block) + ) + :enter (behavior () + '() + ) + :trans (behavior () + (draw-paths self) + ) + :code sleep-code + ) + +(define *temporary-closest-nav-mesh-indices* (new 'static 'array int8 64 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ) + ) + +(define *temporary-num-paths-per-nav-mesh-count* (the-as (pointer uint8) (new 'static 'array int8 64 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod saberfish-spawner-method-21 ((this saberfish-spawner)) + (dotimes (v1-0 64) + (set! (-> *temporary-closest-nav-mesh-indices* v1-0) -1) + (set! (-> *temporary-num-paths-per-nav-mesh-count* v1-0) (the-as uint 0)) + ) + (dotimes (s5-0 (-> this jump-paths length)) + (let ((a0-5 (-> this jump-paths s5-0))) + -1 + (let ((s4-0 (new 'stack-no-clear 'vector))) + (get-point-at-percent-along-path! a0-5 s4-0 0.5 'interp) + (let ((v1-9 (saberfish-spawner-method-22 this s4-0 (saberfish-find-behavior none)))) + (set! (-> *temporary-closest-nav-mesh-indices* s5-0) v1-9) + (cond + ((>= v1-9 0) + (+! (-> *temporary-num-paths-per-nav-mesh-count* v1-9) 1) + ) + (else + ) + ) + ) + ) + ) + ) + (dotimes (s5-1 (-> this nav-mesh-jumps length)) + (let* ((s4-1 (-> this nav-mesh-jumps data s5-1)) + (s3-0 s5-1) + (a2-2 (-> *temporary-num-paths-per-nav-mesh-count* s3-0)) + (s2-0 0) + ) + (set! (-> s4-1 paths) (new 'process 'path-index-array (the-as int a2-2))) + (dotimes (v1-20 (-> this jump-paths length)) + (when (= (-> *temporary-closest-nav-mesh-indices* v1-20) s3-0) + (set! (-> s4-1 paths data s2-0) v1-20) + (set! (-> s4-1 in-water?) (= (logand v1-20 1) 1)) + (+! s2-0 1) + ) + ) + ) + ) + (none) + ) + +(defmethod saberfish-spawner-method-22 ((this saberfish-spawner) (arg0 vector) (arg1 saberfish-find-behavior)) + (local-vars (v1-16 float) (sv-64 nav-poly) (sv-72 int) (sv-80 number) (sv-84 vector) (sv-88 symbol)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set! sv-64 (new 'stack-no-clear 'nav-poly)) + (set! sv-72 -1) + (set! sv-80 24576.0) + (set! sv-84 arg0) + (set! sv-88 (in-water<-find-behavior arg1)) + (set! (-> sv-64 data 20) (the-as uint 7)) + (dotimes (s4-0 (-> this nav-mesh-jumps length)) + (let ((a0-4 (-> this nav-mesh-jumps data s4-0 mesh))) + (when a0-4 + (when (or (= arg1 (saberfish-find-behavior none)) (= (-> this nav-mesh-jumps data s4-0 in-water?) sv-88)) + (vector-! (the-as vector (-> sv-64 vertex)) sv-84 (the-as vector (-> a0-4 bounds))) + (.lvf vf1 (&-> (-> sv-64 vertex) 0 quad)) + (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.mul.vf vf1 vf1 vf1) + (.mul.x.vf acc vf2 vf1 :mask #b1) + (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) + (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mov v1-16 vf1) + (let ((f0-1 v1-16) + (f1-0 (-> a0-4 bounds r)) + ) + (when (< f0-1 (* f1-0 f1-0)) + (set! (-> sv-64 vertex1 x) 409600.0) + (nav-mesh-method-46 a0-4 sv-64) + (when (>= (the-as float sv-80) (-> sv-64 vertex1 w)) + (set! sv-80 (-> sv-64 vertex1 w)) + (set! sv-72 s4-0) + ) + ) + ) + ) + ) + ) + ) + sv-72 + ) + ) + +(defmethod relocate ((this saberfish-spawner) (offset int)) + (when (nonzero? (-> this jump-paths)) + (dotimes (v1-2 (-> this jump-paths length)) + (if (nonzero? (-> this jump-paths v1-2)) + (&+! (-> this jump-paths v1-2) offset) + ) + ) + ) + (when (nonzero? (-> this nav-mesh-jumps)) + (dotimes (v1-7 (-> this nav-mesh-jumps length)) + (if (nonzero? (-> this nav-mesh-jumps data v1-7 paths)) + (&+! (-> this nav-mesh-jumps data v1-7 paths) offset) + ) + ) + ) + (if (nonzero? (-> this jump-paths)) + (&+! (-> this jump-paths) offset) + ) + (if (nonzero? (-> this nav-mesh-jumps)) + (&+! (-> this nav-mesh-jumps) offset) + ) + (call-parent-method this offset) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod draw-paths ((this saberfish-spawner)) + (dotimes (s5-0 (-> this jump-paths length)) + (debug-draw (-> this jump-paths s5-0)) + ) + (none) + ) + +(defmethod saberfish-spawner-method-24 ((this saberfish-spawner) (arg0 saberfish)) + (local-vars + (sv-48 float) + (sv-56 int) + (sv-64 number) + (sv-68 vector) + (sv-72 vector) + (sv-160 (function path-control vector vector symbol float)) + (sv-176 vector) + (sv-192 vector) + (sv-208 vector) + ) + (set! (-> arg0 dest-nav-mesh-index) (-> arg0 desired-dest-mesh-index)) + (set! sv-48 (the-as float -1.0)) + (set! sv-56 -1) + (set! sv-64 40960000000.0) + (let ((v1-4 (new 'stack-no-clear 'vector))) + (set! (-> v1-4 quad) (-> arg0 root trans quad)) + (set! sv-68 v1-4) + ) + (set! sv-72 (new 'stack-no-clear 'vector)) + (cond + ((saberfish-method-243 arg0) + (vector-! sv-72 (-> arg0 desired-dest-nav-point) (-> arg0 root trans)) + (set! (-> sv-72 y) 0.0) + ) + (else + (vector-z-quaternion! sv-72 (-> arg0 root quat)) + (set! (-> sv-72 y) 0.0) + (vector-normalize! sv-72 61440.0) + ) + ) + (set! sv-56 -1) + (when (>= (-> arg0 current-nav-mesh-index) 0) + (let ((s4-0 (-> this nav-mesh-jumps data (-> arg0 current-nav-mesh-index)))) + (dotimes (s3-0 (-> s4-0 paths length)) + (let* ((s2-0 (-> s4-0 paths data s3-0)) + (s1-0 (-> this jump-paths s2-0)) + ) + 0.0 + 0.0 + (let* ((f0-6 (cond + (#f + (path-control-method-23 s1-0 sv-68) + ) + (else + (let ((s0-0 s1-0)) + (set! sv-160 (method-of-object s0-0 path-control-method-28)) + (set! sv-176 sv-68) + (set! sv-192 sv-72) + (let ((a3-0 (not (saberfish-method-243 arg0)))) + (sv-160 s0-0 sv-176 sv-192 a3-0) + ) + ) + ) + ) + ) + (f30-0 (fmax 0.0 (fmin 1.0 f0-6))) + (s0-1 vector-vector-xz-distance) + ) + (set! sv-208 sv-68) + (let* ((a1-8 (get-point-at-percent-along-path! s1-0 (new 'stack-no-clear 'vector) f30-0 'interp)) + (f0-8 (s0-1 sv-208 a1-8)) + ) + (when (< f0-8 (the-as float sv-64)) + (set! sv-64 f0-8) + (set! sv-56 s2-0) + (set! sv-48 f30-0) + ) + ) + ) + ) + ) + ) + ) + (cond + ((>= sv-56 0) + (let* ((v1-41 (if (saberfish-method-243 arg0) + -1 + 1 + ) + ) + (s3-1 (-> this jump-paths sv-56)) + (s4-1 (-> this jump-paths (+ sv-56 v1-41))) + ) + (if (or (< (+ sv-56 v1-41) 0) (>= (+ sv-56 v1-41) (-> this jump-paths length))) + (return 0) + ) + (let ((s2-1 (new 'stack-no-clear 'vector)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (let ((s0-2 (new 'stack-no-clear 'vector)) + (s1-1 (new 'stack-no-clear 'vector)) + (f30-1 0.4) + ) + (get-point-at-percent-along-path! s3-1 (-> arg0 jump-point-start) sv-48 'interp) + (if (saberfish-method-243 arg0) + (set! f30-1 0.24) + ) + (vector-! s5-1 (-> arg0 jump-point-start) (-> arg0 root trans)) + (get-point-at-percent-along-path! s3-1 s0-2 (+ -0.05 sv-48) 'interp) + (get-point-at-percent-along-path! s3-1 s1-1 (+ 0.05 sv-48) 'interp) + (vector-! s2-1 s1-1 s0-2) + (vector-normalize! s2-1 1.0) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (when (< f30-1 (fabs (vector-dot s5-1 s2-1))) + (set! sv-48 (path-control-method-23 s3-1 sv-68)) + (get-point-at-percent-along-path! s3-1 (-> arg0 jump-point-start) sv-48 'interp) + ) + ) + (cond + ((saberfish-method-243 arg0) + (let ((f0-20 (path-control-method-28 s4-1 (-> arg0 jump-point-start) sv-72 #f))) + (get-point-at-percent-along-path! s4-1 (-> arg0 jump-point-end) f0-20 'interp) + ) + ) + (else + (let ((f0-21 (path-control-method-23 s4-1 (-> arg0 jump-point-start)))) + (get-point-at-percent-along-path! s4-1 (-> arg0 jump-point-end) f0-21 'interp) + ) + ) + ) + (vector-! s5-1 (-> arg0 jump-point-end) (-> arg0 jump-point-start)) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + ) + ) + (let ((v1-74 (-> arg0 nav state)) + (a0-46 (-> arg0 jump-point-start)) + ) + (logclear! (-> v1-74 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-74 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-74 target-pos quad) (-> a0-46 quad)) + ) + 0 + ) + (else + ) + ) + 0 + ) + +(defmethod saberfish-spawner-method-26 ((this saberfish-spawner) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('transition-terrain-begin) + (saberfish-spawner-method-24 this (the-as saberfish arg0)) + ) + (('saberfish-query) + (let ((gp-0 (the-as saberfish-spawner-query-msg (-> arg3 param 0)))) + (case (-> gp-0 query-type) + (((saberfish-query-type set-nav-idx)) + (set! v0-0 (saberfish-spawner-method-22 this (the-as vector (&-> gp-0 mesh)) (-> gp-0 behavior))) + (set! (-> gp-0 closest-nav-mesh-index) (the-as int v0-0)) + v0-0 + ) + (((saberfish-query-type set-mesh)) + (set! v0-0 (-> this nav-mesh-jumps data (-> gp-0 closest-nav-mesh-index) mesh)) + (set! (-> gp-0 mesh) (the-as nav-mesh v0-0)) + v0-0 + ) + (((saberfish-query-type set-in-water)) + (set! v0-0 (-> this nav-mesh-jumps data (-> gp-0 closest-nav-mesh-index) in-water?)) + (set! (-> gp-0 in-water?) (the-as symbol v0-0)) + v0-0 + ) + (((saberfish-query-type can-go-to-ground?)) + (send-event (handle->process (-> this mgr-parent)) 'query-can-go-to-ground? gp-0) + ) + ) + ) + ) + (('spawn-command) + (set! (-> this mgr-parent) (process->handle arg0)) + (let ((v1-17 (the-as saberfish-spawner-command (-> arg3 param 0)))) + (case (-> v1-17 command) + (('spawn-enemy) + (spawn-saberfish this (-> v1-17 message) (-> v1-17 initial-state) (handle->process (-> v1-17 parent))) + ) + ) + ) + ) + (('child-die) + (set! v0-0 (+ (-> this live-count) -1)) + (set! (-> this live-count) (the-as int v0-0)) + v0-0 + ) + (('saberfish-spawn-query) + (let ((v1-22 (the-as saberfish-spawn-query (-> arg3 param 0)))) + (set! v0-0 (-> this live-count)) + (set! (-> v1-22 alive-count) (the-as int v0-0)) + ) + v0-0 + ) + (('saberfish-ground-query) + (let ((v1-23 (the-as saberfish-spawn-query (-> arg3 param 0)))) + (set! (-> v1-23 alive-count) 0) + (dotimes (a1-21 (-> this num-spawned-saberfish)) + (let ((a2-14 (-> this spawned-saberfish a1-21))) + (when (handle->process a2-14) + (let ((a2-15 (the-as saberfish (handle->process a2-14)))) + (if (or (= (-> a2-15 ground-state) 4) + (and (-> a2-15 next-state) (let ((a2-19 (-> a2-15 next-state name))) + (or (= a2-19 'transition-terrain-move-towards-initial-jump) + (= a2-19 'jump) + (= a2-19 'transition-terrain-jump-from-water) + ) + ) + ) + ) + (+! (-> v1-23 alive-count) 1) + ) + ) + ) + ) + ) + ) + #f + ) + (('forward-event) + (send-event + (handle->process (-> this last-spawned-process)) + (the-as symbol (-> arg3 param 0)) + (-> arg3 param 1) + ) + ) + ) + ) + +(defmethod spawn-saberfish ((this saberfish-spawner) (arg0 symbol) (arg1 symbol) (arg2 process)) + (if (not arg2) + (set! arg2 this) + ) + (let ((s4-0 (new 'stack-no-clear 'saberfish-init-by-other-params))) + (if (= arg1 'saberfish-crawl-out-of-tube) + (sound-play "sf-spawner") + ) + (set! (-> s4-0 trans quad) (-> this entity extra trans quad)) + (quaternion-copy! (-> s4-0 quat) (-> this entity quat)) + (set! (-> s4-0 entity) (-> this entity)) + (set! (-> s4-0 directed?) #f) + (set! (-> s4-0 no-initial-move-to-ground?) #f) + (set! (-> s4-0 art-level) #f) + (set! (-> s4-0 spawn-parent) (process->handle this)) + (set! (-> s4-0 message) arg0) + (set! (-> s4-0 initial-state) arg1) + (set! (-> s4-0 pos quad) (-> this root trans quad)) + (quaternion-copy! (-> s4-0 orient) (-> this root quat)) + (set! (-> this last-spawned-process) + (ppointer->handle (process-spawn saberfish this s4-0 :name "saberfish" :to arg2)) + ) + ) + (+! (-> this live-count) 1) + (set! (-> this spawned-saberfish (-> this num-spawned-saberfish)) (-> this last-spawned-process)) + (+! (-> this num-spawned-saberfish) 1) + (when (>= (-> this num-spawned-saberfish) 128) + (set! (-> this num-spawned-saberfish) 0) + 0 + ) + 0 + (none) + ) + +(deftype saberfish-spawn-manager-base (process) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (total-num-spawned int32) + (total-alive int32) + (spawn-timer time-frame) + (state-time time-frame) + (allowed-on-land-count int8) + ) + (:state-methods + active + idle + ) + (:methods + (go-active (_type_) object) + (get-alive-count (_type_) int) + (get-alive-count-grounded (_type_ int) int) + ) + ) + + +(defmethod init-from-entity! ((this saberfish-spawn-manager-base) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + ;; og:preserve-this added + (stack-size-set! (-> this main-thread) 2048) + (set-setting! 'gem-pool-index #f 0.0 2) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-3 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-3 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-3)) + (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 allowed-on-land-count) 2) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this total-num-spawned) 0) + (set! (-> this total-alive) 0) + (set! (-> this spawn-timer) 0) + (go-active this) + ) + +(defmethod get-alive-count-grounded ((this saberfish-spawn-manager-base) (arg0 int)) + (with-pp + (let ((s4-0 (new 'stack-no-clear 'saberfish-spawn-query)) + (gp-0 0) + ) + (dotimes (s3-0 (-> this actor-group-count)) + (dotimes (s2-0 (-> this actor-group s3-0 length)) + (set! (-> s4-0 alive-count) 0) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer pp)) + (set! (-> a1-1 num-params) 1) + (set! (-> a1-1 message) 'saberfish-ground-query) + (set! (-> a1-1 param 0) (the-as uint s4-0)) + (let ((t9-0 send-event-function) + (v1-7 (-> this actor-group s3-0 data s2-0 actor)) + ) + (t9-0 + (if v1-7 + (-> v1-7 extra process) + ) + a1-1 + ) + ) + ) + (+! gp-0 (-> s4-0 alive-count)) + ) + ) + gp-0 + ) + ) + ) + +(defmethod get-alive-count ((this saberfish-spawn-manager-base)) + (with-pp + (let ((s4-0 (new 'stack-no-clear 'saberfish-spawn-query)) + (gp-0 0) + ) + (dotimes (s3-0 (-> this actor-group-count)) + (dotimes (s2-0 (-> this actor-group s3-0 length)) + (set! (-> s4-0 alive-count) 0) + (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) 'saberfish-spawn-query) + (set! (-> a1-0 param 0) (the-as uint s4-0)) + (let ((t9-0 send-event-function) + (v1-7 (-> this actor-group s3-0 data s2-0 actor)) + ) + (t9-0 + (if v1-7 + (-> v1-7 extra process) + ) + a1-0 + ) + ) + ) + (+! gp-0 (-> s4-0 alive-count)) + ) + ) + gp-0 + ) + ) + ) + +(defstate active (saberfish-spawn-manager-base) + :virtual #t + :trans (behavior () + '() + ) + :code (behavior () + (until #f + (suspend) + ) + #f + ) + ) + +(defstate idle (saberfish-spawn-manager-base) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual active) + ) + ) + ) + :code sleep-code + ) + +(defbehavior saberfish-mgr-event-handler saberfish-spawn-manager-base ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('trigger) + (if (and (-> self next-state) (= (-> self next-state name) 'idle)) + (go-virtual active) + ) + ) + (('query-can-go-to-ground?) + (let ((gp-0 (the-as saberfish-spawner-query-msg (-> arg3 param 0))) + (v0-0 (the-as object (< (get-alive-count-grounded self arg1) (-> self allowed-on-land-count)))) + ) + (set! (-> gp-0 in-water?) (the-as symbol v0-0)) + v0-0 + ) + ) + ) + ) + +(defmethod go-active ((this saberfish-spawn-manager-base)) + (go (method-of-object this active)) + ) + +(deftype saberfish-mgr-room1 (saberfish-spawn-manager-base) + () + ) + + +(defstate active (saberfish-mgr-room1) + :virtual #t + :event saberfish-mgr-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + '() + ) + :code (behavior () + (let ((gp-0 (new 'stack-no-clear 'saberfish-spawner-command)) + (s4-0 (-> self actor-group 0 data)) + (s5-0 (-> self actor-group 0 data 1)) + ) + (set! (-> gp-0 parent) (process->handle self)) + (set! (-> gp-0 command) 'spawn-enemy) + (set! (-> gp-0 initial-state) 'saberfish-crawl-out-of-tube) + (set! (-> self allowed-on-land-count) 2) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.1)) + (suspend) + ) + (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) 'spawn-command) + (set! (-> a1-0 param 0) (the-as uint gp-0)) + (let ((t9-0 send-event-function) + (v1-20 (-> s4-0 0 actor)) + ) + (t9-0 + (if v1-20 + (-> v1-20 extra process) + ) + a1-0 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.5)) + (suspend) + ) + (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) 'spawn-command) + (set! (-> a1-1 param 0) (the-as uint gp-0)) + (let ((t9-1 send-event-function) + (v1-33 (-> s5-0 actor)) + ) + (t9-1 + (if v1-33 + (-> v1-33 extra process) + ) + a1-1 + ) + ) + ) + (until (>= 1 (get-alive-count self)) + (suspend) + ) + (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) 'spawn-command) + (set! (-> a1-2 param 0) (the-as uint gp-0)) + (let ((t9-3 send-event-function) + (v1-43 (-> s4-0 0 actor)) + ) + (t9-3 + (if v1-43 + (-> v1-43 extra process) + ) + a1-2 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 1.5)) + (suspend) + ) + (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) 'spawn-command) + (set! (-> a1-3 param 0) (the-as uint gp-0)) + (let ((t9-4 send-event-function) + (v1-56 (-> s5-0 actor)) + ) + (t9-4 + (if v1-56 + (-> v1-56 extra process) + ) + a1-3 + ) + ) + ) + (until (>= 2 (get-alive-count self)) + (suspend) + ) + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer self)) + (set! (-> a1-4 num-params) 1) + (set! (-> a1-4 message) 'spawn-command) + (set! (-> a1-4 param 0) (the-as uint gp-0)) + (let ((t9-6 send-event-function) + (v1-66 (-> s4-0 0 actor)) + ) + (t9-6 + (if v1-66 + (-> v1-66 extra process) + ) + a1-4 + ) + ) + ) + (set! (-> self allowed-on-land-count) 3) + (until (>= 1 (get-alive-count self)) + (suspend) + ) + (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) 'spawn-command) + (set! (-> a1-5 param 0) (the-as uint gp-0)) + (let ((t9-8 send-event-function) + (v1-77 (-> s5-0 actor)) + ) + (t9-8 + (if v1-77 + (-> v1-77 extra process) + ) + a1-5 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.3)) + (suspend) + ) + (let ((a1-6 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-6 from) (process->ppointer self)) + (set! (-> a1-6 num-params) 1) + (set! (-> a1-6 message) 'spawn-command) + (set! (-> a1-6 param 0) (the-as uint gp-0)) + (let ((t9-9 send-event-function) + (v1-90 (-> s4-0 0 actor)) + ) + (t9-9 + (if v1-90 + (-> v1-90 extra process) + ) + a1-6 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.7)) + (suspend) + ) + (let ((a1-7 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-7 from) (process->ppointer self)) + (set! (-> a1-7 num-params) 1) + (set! (-> a1-7 message) 'spawn-command) + (set! (-> a1-7 param 0) (the-as uint gp-0)) + (let ((t9-10 send-event-function) + (v1-102 (-> s4-0 0 actor)) + ) + (t9-10 + (if v1-102 + (-> v1-102 extra process) + ) + a1-7 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 2.5)) + (suspend) + ) + (let ((a1-8 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-8 from) (process->ppointer self)) + (set! (-> a1-8 num-params) 1) + (set! (-> a1-8 message) 'spawn-command) + (set! (-> a1-8 param 0) (the-as uint gp-0)) + (let ((t9-11 send-event-function) + (v1-115 (-> s5-0 actor)) + ) + (t9-11 + (if v1-115 + (-> v1-115 extra process) + ) + a1-8 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 1)) + (suspend) + ) + (until (>= 3 (get-alive-count self)) + (suspend) + ) + (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) 'spawn-command) + (set! (-> a1-9 param 0) (the-as uint gp-0)) + (let ((t9-13 send-event-function) + (v1-130 (-> s5-0 actor)) + ) + (t9-13 + (if v1-130 + (-> v1-130 extra process) + ) + a1-9 + ) + ) + ) + ) + (until #f + (suspend) + ) + #f + ) + ) + +(defmethod go-active ((this saberfish-mgr-room1)) + (go (method-of-object this idle)) + ) + +(deftype saberfish-mgr-room2 (saberfish-spawn-manager-base) + () + (:state-methods + stage-0 + stage-1 + stage-2 + ) + ) + + +(defmethod go-active ((this saberfish-mgr-room2)) + (cond + ((task-node-closed? (game-task-node sewer-kg-met-button0-pressed)) + (process-entity-status! this (entity-perm-status dead) #t) + (go empty-state) + ) + (else + (go (method-of-object this stage-0)) + ) + ) + ) + +(defstate stage-0 (saberfish-mgr-room2) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger-start) + (go-virtual stage-1) + ) + (else + (saberfish-mgr-event-handler proc argc message block) + ) + ) + ) + :code (behavior () + (let ((gp-0 (new 'stack-no-clear 'saberfish-spawner-command))) + (set! (-> gp-0 parent) (process->handle self)) + (set! (-> gp-0 command) 'spawn-enemy) + (set! (-> gp-0 initial-state) 'saberfish-sitting-on-land) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.1)) + (suspend) + ) + (set! (-> self allowed-on-land-count) 3) + (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) 'spawn-command) + (set! (-> a1-0 param 0) (the-as uint gp-0)) + (let ((t9-0 send-event-function) + (v1-18 (-> self actor-group 1 data 0 actor)) + ) + (t9-0 + (if v1-18 + (-> v1-18 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) 'spawn-command) + (set! (-> a1-1 param 0) (the-as uint gp-0)) + (let ((t9-1 send-event-function) + (v1-27 (-> self actor-group 1 data 1 actor)) + ) + (t9-1 + (if v1-27 + (-> v1-27 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) 'spawn-command) + (set! (-> a1-2 param 0) (the-as uint gp-0)) + (let ((t9-2 send-event-function) + (v1-36 (-> self actor-group 1 data 2 actor)) + ) + (t9-2 + (if v1-36 + (-> v1-36 extra process) + ) + a1-2 + ) + ) + ) + ) + (sleep-code) + ) + ) + +(defstate stage-1 (saberfish-mgr-room2) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual stage-2) + ) + (else + (saberfish-mgr-event-handler proc argc message block) + ) + ) + ) + :code (behavior () + (let ((v1-0 (new 'stack-no-clear 'saberfish-spawner-command))) + (set! (-> v1-0 parent) (process->handle self)) + ) + (set! (-> self allowed-on-land-count) 4) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.7)) + (suspend) + ) + (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) 'forward-event) + (set! (-> a1-4 param 0) (the-as uint 'saberfish-command)) + (set! (-> a1-4 param 1) (the-as uint 'go-alive)) + (let ((t9-0 send-event-function) + (v1-16 (-> self actor-group 1 data 0 actor)) + ) + (t9-0 + (if v1-16 + (-> v1-16 extra process) + ) + a1-4 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.7)) + (suspend) + ) + (let ((a1-5 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-5 from) (process->ppointer self)) + (set! (-> a1-5 num-params) 2) + (set! (-> a1-5 message) 'forward-event) + (set! (-> a1-5 param 0) (the-as uint 'saberfish-command)) + (set! (-> a1-5 param 1) (the-as uint 'go-alive)) + (let ((t9-1 send-event-function) + (v1-33 (-> self actor-group 1 data 1 actor)) + ) + (t9-1 + (if v1-33 + (-> v1-33 extra process) + ) + a1-5 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.7)) + (suspend) + ) + (let ((a1-6 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-6 from) (process->ppointer self)) + (set! (-> a1-6 num-params) 2) + (set! (-> a1-6 message) 'forward-event) + (set! (-> a1-6 param 0) (the-as uint 'saberfish-command)) + (set! (-> a1-6 param 1) (the-as uint 'go-alive)) + (let ((t9-2 send-event-function) + (v1-50 (-> self actor-group 1 data 2 actor)) + ) + (t9-2 + (if v1-50 + (-> v1-50 extra process) + ) + a1-6 + ) + ) + ) + (sleep-code) + ) + ) + +(defstate stage-2 (saberfish-mgr-room2) + :virtual #t + :event saberfish-mgr-event-handler + :enter (behavior () + '() + ) + :code (behavior () + (let ((gp-0 (new 'stack-no-clear 'saberfish-spawner-command))) + (set! (-> gp-0 parent) (process->handle self)) + (set! (-> gp-0 command) 'spawn-enemy) + (set! (-> gp-0 initial-state) 'saberfish-swimming) + (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) 'spawn-command) + (set! (-> a1-0 param 0) (the-as uint gp-0)) + (let ((t9-0 send-event-function) + (v1-11 (-> self actor-group 2 data 0 actor)) + ) + (t9-0 + (if v1-11 + (-> v1-11 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) 'spawn-command) + (set! (-> a1-1 param 0) (the-as uint gp-0)) + (let ((t9-1 send-event-function) + (v1-20 (-> self actor-group 2 data 1 actor)) + ) + (t9-1 + (if v1-20 + (-> v1-20 extra process) + ) + a1-1 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 1)) + (suspend) + ) + (until (>= 3 (get-alive-count self)) + (suspend) + ) + (set! (-> gp-0 initial-state) 'saberfish-crawl-out-of-tube) + (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) 'spawn-command) + (set! (-> a1-2 param 0) (the-as uint gp-0)) + (let ((t9-3 send-event-function) + (v1-39 (-> self actor-group 0 data 1 actor)) + ) + (t9-3 + (if v1-39 + (-> v1-39 extra process) + ) + a1-2 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.5)) + (suspend) + ) + (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) 'spawn-command) + (set! (-> a1-3 param 0) (the-as uint gp-0)) + (let ((t9-4 send-event-function) + (v1-54 (-> self actor-group 0 data 0 actor)) + ) + (t9-4 + (if v1-54 + (-> v1-54 extra process) + ) + a1-3 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 1)) + (suspend) + ) + (until (>= 3 (get-alive-count self)) + (suspend) + ) + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer self)) + (set! (-> a1-4 num-params) 1) + (set! (-> a1-4 message) 'spawn-command) + (set! (-> a1-4 param 0) (the-as uint gp-0)) + (let ((t9-6 send-event-function) + (v1-72 (-> self actor-group 0 data 0 actor)) + ) + (t9-6 + (if v1-72 + (-> v1-72 extra process) + ) + a1-4 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.5)) + (suspend) + ) + (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) 'spawn-command) + (set! (-> a1-5 param 0) (the-as uint gp-0)) + (let ((t9-7 send-event-function) + (v1-87 (-> self actor-group 0 data 1 actor)) + ) + (t9-7 + (if v1-87 + (-> v1-87 extra process) + ) + a1-5 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.5)) + (suspend) + ) + (until (>= 4 (get-alive-count self)) + (suspend) + ) + (let ((a1-6 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-6 from) (process->ppointer self)) + (set! (-> a1-6 num-params) 1) + (set! (-> a1-6 message) 'spawn-command) + (set! (-> a1-6 param 0) (the-as uint gp-0)) + (let ((t9-9 send-event-function) + (v1-105 (-> self actor-group 0 data 0 actor)) + ) + (t9-9 + (if v1-105 + (-> v1-105 extra process) + ) + a1-6 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 1)) + (suspend) + ) + (until (>= 2 (get-alive-count self)) + (suspend) + ) + (let ((a1-7 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-7 from) (process->ppointer self)) + (set! (-> a1-7 num-params) 1) + (set! (-> a1-7 message) 'spawn-command) + (set! (-> a1-7 param 0) (the-as uint gp-0)) + (let ((t9-11 send-event-function) + (v1-123 (-> self actor-group 0 data 0 actor)) + ) + (t9-11 + (if v1-123 + (-> v1-123 extra process) + ) + a1-7 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.5)) + (suspend) + ) + (let ((a1-8 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-8 from) (process->ppointer self)) + (set! (-> a1-8 num-params) 1) + (set! (-> a1-8 message) 'spawn-command) + (set! (-> a1-8 param 0) (the-as uint gp-0)) + (let ((t9-12 send-event-function) + (v1-138 (-> self actor-group 0 data 0 actor)) + ) + (t9-12 + (if v1-138 + (-> v1-138 extra process) + ) + a1-8 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 1.5)) + (suspend) + ) + (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) 'spawn-command) + (set! (-> a1-9 param 0) (the-as uint gp-0)) + (let ((t9-13 send-event-function) + (v1-153 (-> self actor-group 0 data 1 actor)) + ) + (t9-13 + (if v1-153 + (-> v1-153 extra process) + ) + a1-9 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 1)) + (suspend) + ) + (let ((a1-10 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-10 from) (process->ppointer self)) + (set! (-> a1-10 num-params) 1) + (set! (-> a1-10 message) 'spawn-command) + (set! (-> a1-10 param 0) (the-as uint gp-0)) + (let ((t9-14 send-event-function) + (v1-168 (-> self actor-group 0 data 0 actor)) + ) + (t9-14 + (if v1-168 + (-> v1-168 extra process) + ) + a1-10 + ) + ) + ) + (until (>= 3 (get-alive-count self)) + (suspend) + ) + (let ((a1-11 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-11 from) (process->ppointer self)) + (set! (-> a1-11 num-params) 1) + (set! (-> a1-11 message) 'spawn-command) + (set! (-> a1-11 param 0) (the-as uint gp-0)) + (let ((t9-16 send-event-function) + (v1-180 (-> self actor-group 0 data 1 actor)) + ) + (t9-16 + (if v1-180 + (-> v1-180 extra process) + ) + a1-11 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 1)) + (suspend) + ) + (let ((a1-12 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-12 from) (process->ppointer self)) + (set! (-> a1-12 num-params) 1) + (set! (-> a1-12 message) 'spawn-command) + (set! (-> a1-12 param 0) (the-as uint gp-0)) + (let ((t9-17 send-event-function) + (v1-195 (-> self actor-group 0 data 1 actor)) + ) + (t9-17 + (if v1-195 + (-> v1-195 extra process) + ) + a1-12 + ) + ) + ) + ) + (sleep-code) + ) + ) diff --git a/goal_src/jak3/levels/sewer/saberfish.gc b/goal_src/jak3/levels/sewer/saberfish.gc index 884fc7df38..c875528628 100644 --- a/goal_src/jak3/levels/sewer/saberfish.gc +++ b/goal_src/jak3/levels/sewer/saberfish.gc @@ -5,5 +5,3687 @@ ;; name in dgo: saberfish ;; dgos: SEA +(define-extern find-ground-for-obj (function process-focusable int)) + +;; +++saberfish-query-type +(defenum saberfish-query-type + :type uint64 + (set-nav-idx) + (set-mesh) + (set-in-water) + (can-go-to-ground?) + ) +;; ---saberfish-query-type + + +;; +++saberfish-find-behavior +(defenum saberfish-find-behavior + :type uint64 + (none) + (behavior1) + (behavior2) + ) +;; ---saberfish-find-behavior + + +;; +++saberfish-command +(defenum saberfish-command + :type int32 + (attack 0) + (hostile-orient 1) + (hostile 2) + (spin-attack 3) + (stare 4) + (start-terrain-transition 5) + ) +;; ---saberfish-command + + ;; DECOMP BEGINS +(defskelgroup skel-saberfish saberfish saberfish-lod0-jg saberfish-idle-ja + ((saberfish-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + :shadow saberfish-shadow-mg + ) + +(deftype saberfish-jump-info (structure) + ((windup-anim uint32) + (air-anim uint32) + (land-anim uint32) + ) + :pack-me + ) + + +(deftype saberfish-init-by-other-params (enemy-init-by-other-params) + ((spawn-parent handle) + (message symbol) + (pos vector :inline) + (orient quaternion :inline) + (initial-state symbol) + ) + ) + + +(deftype saberfish-spawner-query-msg (structure) + ((query-type saberfish-query-type) + (closest-nav-mesh-index int8) + (pos vector :inline) + (behavior saberfish-find-behavior) + (nav-mesh-index int8 :overlay-at closest-nav-mesh-index) + (mesh nav-mesh :overlay-at (-> pos data 0)) + (in-water? symbol :offset 40) + (can-go-to-ground? symbol :overlay-at in-water?) + ) + ) + + +;; WARN: Return type mismatch int vs saberfish-find-behavior. +(defun find-behavior<-in-water? ((arg0 symbol)) + (the-as saberfish-find-behavior (if arg0 + (the-as saberfish-find-behavior (saberfish-find-behavior behavior1)) + (the-as saberfish-find-behavior (saberfish-find-behavior behavior2)) + ) + ) + ) + +(defun in-water<-find-behavior ((arg0 saberfish-find-behavior)) + (case arg0 + (((saberfish-find-behavior behavior1)) + #t + ) + (((saberfish-find-behavior behavior2)) + #f + ) + (else + #f + ) + ) + ) + +(deftype saberfish (nav-enemy) + ((initial-y-angle float) + (last-attack-time time-frame) + (in-pursuit? symbol) + (flee-to-readjust? symbol) + (use-stored-flee-point? symbol) + (scare-start-time time-frame) + (scare-time time-frame) + (jump-point-start vector :inline) + (jump-point-end vector :inline) + (jump saberfish-jump-info :inline :offset 708) + (flee-point-temp vector :inline) + (last-land-check-time time-frame) + (last-target-check-time time-frame) + (is-submerged? symbol) + (current-nav-mesh-index int8) + (dest-nav-mesh-index int8) + (desired-dest-nav-point vector :inline) + (desired-dest-mesh-index int8) + (flee-point vector :inline) + (spawn-parent handle) + (pos-start vector :inline) + (quat-start quaternion :inline) + (move-to-ground? symbol) + (swim-final-rotate-deg float) + (swim-travel-anim int8) + (swim-speed float) + (swim-rotate-last-dot float) + (swim-anim-last-dot float) + (last-swim-flip-time time-frame) + (saberfish-y-rotate float) + (doing-180-spin? symbol) + (adjusted-y-yet? symbol) + (attack-dir vector :inline) + (rotate-anim-quat quaternion :inline) + (post-spinflip-expected-heading vector :inline) + (nav-velocity vector :inline) + (nav-dir vector :inline) + (initial-state symbol) + (knocked-under-water? symbol) + (ground-state uint8) + (jump-start-ground-state uint8) + (ground-only? symbol) + ) + (:state-methods + attack + hostile-orient + swimming-hostile + spin-attack + stare-idle + undefined0 + transition-terrain-move-towards-initial-jump + transition-terrain-orient-towards-initial-jump + transition-terrain-jump + undefined1 + water-land + undefined2 + undefined3 + base-saberfish-state + diving-into-water + water-impact + command-mode + swim-180-spin + swimming-base + saberfish-crawl-out-of-tube + undefined4 + saberfish-sitting-on-land + knocked-recover-water + saberfish-swimming + ) + (:methods + (saberfish-method-214 (_type_ vector) float) + (saberfish-method-215 (_type_) float) + (get-cmd (_type_) saberfish-command) + (saberfish-method-217 (_type_) none) + (saberfish-method-218 (_type_) none) + (saberfish-method-219 (_type_) none) + (saberfish-method-220 (_type_) none) + (handle-cmd (_type_ saberfish-command) object) + (attack-delay-elapsed? (_type_) symbol) + (saberfish-method-223 (_type_) none) + (go-terrain-transition (_type_ symbol) object) + (get-nav-mesh-idx (_type_ vector saberfish-find-behavior) int) + (start-terrain-transition (_type_) object) + (desired-nav-idx-valid? (_type_) symbol) + (saberfish-method-228 (_type_) symbol) + (set-dest-nav! (_type_ vector saberfish-find-behavior) none) + (change-nav-mesh (_type_) none) + (saberfish-method-231 (_type_ vector float symbol vector) symbol) + (do-jump (_type_) object) + (saberfish-method-233 (_type_) nav-poly) + (saberfish-method-234 (_type_ vector) none) + (on-submerged (_type_ symbol) none) + (saberfish-method-236 (_type_ int) nav-mesh) + (saberfish-method-237 (_type_ int) symbol) + (saberfish-method-238 (_type_ symbol float float) object) + (saberfish-method-239 (_type_ vector) float) + (saberfish-method-240 (_type_ time-frame) none) + (saberfish-method-241 (_type_) symbol) + (get-ground-state (_type_) int) + (saberfish-method-243 (_type_) symbol) + (set-should-move-to-ground (_type_) none) + ) + (:states + transition-terrain-jump-from-land + transition-terrain-jump-from-water + ) + ) + + +(defstate base-saberfish-state (saberfish) + :virtual #t + :event enemy-event-handler + :code sleep-code + :post (behavior () + (enemy-common-post self) + (update-transforms (-> self root)) + ) + ) + +(define *saberfish-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 4 + (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 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 #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 5 + :hit-anim 3 + :knocked-anim 11 + :knocked-land-anim 12 + :die-anim 11 + :die-falling-anim -1 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 13 + :look-at-joint 14 + :bullseye-joint 20 + :notice-distance (meters 40) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 5) + :default-hit-points 6.0 + :gnd-collide-with (collide-spec backgnd water) + :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 water 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 61440.0 + :knocked-medium-vxz-hi 61440.0 + :knocked-medium-vy-lo 49152.0 + :knocked-medium-vy-hi 69632.0 + :knocked-hard-vxz-lo 61440.0 + :knocked-hard-vxz-hi 90112.0 + :knocked-hard-vy-lo 49152.0 + :knocked-hard-vy-hi 73728.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 61440.0 + :knocked-yellow-vxz-hi 61440.0 + :knocked-yellow-vy-lo 49152.0 + :knocked-yellow-vy-hi 69632.0 + :knocked-red-vxz-lo 61440.0 + :knocked-red-vxz-hi 90112.0 + :knocked-red-vy-lo 49152.0 + :knocked-red-vy-hi 73728.0 + :knocked-blue-vxz-lo 20480.0 + :knocked-blue-vxz-hi 28672.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.9983 :y -0.0558 :z 0.0132 :w 27913.42) + :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 + :pre-tform (new 'static 'vector :x 0.9155 :y 0.3114 :z -0.2546 :w 18151.014) + :geo-tform (new 'static 'vector :x -1.0 :w 10.176285) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 27209.91) + :geo-tform (new 'static 'vector :x -0.9985 :y 0.0536 :z -0.0019 :w 20896.482) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.0165 :z -0.9998 :w 19429.002) + :geo-tform (new 'static 'vector :x 0.2521 :y 0.9606 :z -0.1166 :w 20369.662) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.2289 :z -0.9734 :w 4466.9336) + :geo-tform (new 'static 'vector :x 0.2309 :y 0.4174 :z 0.8788 :w 26025.31) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9134 :z 0.407 :w 21663.545) + :geo-tform (new 'static 'vector :x -0.4328 :y 0.8967 :z 0.0917 :w 27352.541) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.21 :z 0.9776 :w 14450.142) + :geo-tform (new 'static 'vector :x 0.6331 :y -0.6641 :z 0.3975 :w 19916.846) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.262 :z 0.965 :w 13256.131) + :geo-tform (new 'static 'vector :x -0.0466 :y 0.5681 :z 0.8215 :w 40370.1) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8605 :z -0.5094 :w 18296.832) + :geo-tform (new 'static 'vector :x 0.3835 :y -0.2752 :z 0.8815 :w 26565.291) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.8653 :z -0.5012 :w 1296.8118) + :geo-tform (new 'static 'vector :x -0.9994 :y 0.0297 :z 0.015 :w 17863.275) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3818 :z -0.9242 :w 259.39514) + :geo-tform (new 'static 'vector :x -0.9903 :y -0.0926 :z 0.1029 :w 15323.264) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint 14 + :pre-tform (new 'static 'vector :x 0.5325 :z 0.8464 :w 2252.818) + :geo-tform (new 'static 'vector :x -0.9999 :y 0.0039 :z 0.0062 :w 16416.531) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 1966.4896 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.794 :z 0.6078 :w 42.30713) + :geo-tform (new 'static 'vector :x -0.9999 :y 0.005 :z 0.005 :w 16384.236) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 1553.6128 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -1.0 :w 862.1079) + :geo-tform (new 'static 'vector :x -0.9972 :y -0.006 :z -0.0739 :w 5204.942) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2452.6848 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9971 :z -0.0754 :w 5204.851) + :geo-tform (new 'static 'vector :x -0.4775 :y -0.1888 :z -0.858 :w 1142.2561) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7479 :z -0.6637 :w 1560.7944) + :geo-tform (new 'static 'vector :x -0.7484 :y -0.1026 :z -0.6552 :w 1775.261) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7465 :z -0.6652 :w 1765.8129) + :geo-tform (new 'static 'vector :x -0.9932 :y -0.107 :z -0.0452 :w 16973.86) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.119 :z -0.9928 :w 16093.275) + :geo-tform (new 'static 'vector :x 0.5242 :y 0.8508 :z 0.035 :w 33237.656) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3382 :z -0.941 :w 11515.366) + :geo-tform (new 'static 'vector :x -0.2239 :y -0.4468 :z 0.8661 :w 25938.275) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9222 :z 0.3865 :w 21078.58) + :geo-tform (new 'static 'vector :x 0.4237 :y 0.5776 :z 0.6976 :w 37524.24) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5995 :z -0.8003 :w 19175.633) + :geo-tform (new 'static 'vector :x 0.0961 :y 0.9634 :z 0.2499 :w 40414.94) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2235.5967 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint 20 + :pre-tform (new 'static 'vector :x -0.9723 :z 0.2333 :w 1824.8136) + :geo-tform (new 'static 'vector :x -0.9803 :y -0.1799 :z -0.0811 :w 15291.715) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8223 :z 0.5689 :w 2307.7227) + :geo-tform (new 'static 'vector :x 0.2202 :y -0.8918 :z 0.3952 :w 3410.111) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3544 :z 0.935 :w 1537.347) + :geo-tform (new 'static 'vector :x -0.0081 :y -0.9942 :z 0.1065 :w 2835.7427) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 1642.0864 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.2096 :z 0.9777 :w 302.33942) + :geo-tform (new 'static 'vector :x -0.6496 :y -0.7587 :z 0.0484 :w 5384.1646) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 1437.2864 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint 20 + :pre-tform (new 'static 'vector :x -0.1904 :z 0.9817 :w 17496.0) + :geo-tform (new 'static 'vector :x -0.6922 :y 0.5601 :z -0.455 :w 15608.09) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9013 :z -0.4331 :w 10963.08) + :geo-tform (new 'static 'vector :x 0.7074 :y -0.0914 :z -0.7007 :w 22558.492) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8192 :z -0.5734 :w 22395.672) + :geo-tform (new 'static 'vector :x 0.9857 :y -0.1663 :z -0.0232 :w 40309.043) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9055 :z -0.4242 :w 41043.812) + :geo-tform (new 'static 'vector :x -0.4884 :y 0.8434 :z 0.2236 :w 10095.093) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + ) + ) + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint 14 + :gem-seg #x2 + :gem-offset (new 'static 'sphere :y 1511.424 :z 700.416 :r 327680.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 6 + :turn-anim -1 + :run-anim 5 + :taunt-anim -1 + :run-travel-speed (meters 6) + :run-acceleration (meters 6) + :run-turning-acceleration (meters 60) + :walk-travel-speed (meters 3) + :walk-acceleration (meters 6) + :walk-turning-acceleration (meters 1) + :maximum-rotation-rate (degrees 180) + :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! (-> *saberfish-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defmethod init-enemy-collision! ((this saberfish)) + (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 player-list water)) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 8192.0 0.0 24576.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 water)) + (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 -4096.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 water)) + (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 4096.0 0.0 6144.0) + ) + (set-vector! + (-> (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)) local-sphere) + 0.0 + 4505.6 + 0.0 + 4505.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 collide-with) (collide-spec jak player-list)) + (set! (-> v1-19 prim-core action) (collide-action semi-solid deadly no-standon)) + (set! (-> v1-19 transform-index) 14) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 6144.0 4505.6) + ) + (set! (-> s5-0 nav-radius) 10240.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) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + ) + (set! (-> this root penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + 0 + (none) + ) + +(defbehavior get-spawn-parent saberfish () + (handle->process (-> self spawn-parent)) + ) + +(defmethod init-enemy! ((this saberfish)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-saberfish" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *saberfish-nav-enemy-info*) + (set! (-> this last-attack-time) 0) + (set! (-> this scare-start-time) 0) + (set! (-> this scare-time) 0) + (set! (-> this water) (new 'process 'water-control this 0 0.0 8192.0 2048.0)) + (set! (-> this water flags) (water-flag part-splash part-water find-water)) + (water-control-method-10 (-> this water)) + (set! (-> this last-swim-flip-time) 0) + (set! (-> this doing-180-spin?) #f) + (set! (-> this fact pickup-type) (pickup-type eco-pill-dark)) + (if (zero? (mod (the-as int (rand-uint31-gen *random-generator*)) 11)) + (set! (-> this fact pickup-type) (pickup-type eco-pill-light)) + ) + (set! (-> this fact pickup-amount) 1.0) + (set! (-> this fact pickup-spawn-amount) 1.0) + (when (nonzero? (-> this neck)) + (let ((v1-20 (-> this neck))) + (set! (-> v1-20 ear) (the-as uint 0)) + (set! (-> v1-20 up) (the-as uint 1)) + (set! (-> v1-20 nose) (the-as uint 2)) + (set-vector! (-> v1-20 twist-max) 8192.0 11832.889 0.0 1.0) + (set! (-> v1-20 ignore-angle) 30947.555) + ) + ) + (set! (-> this current-nav-mesh-index) -1) + (cond + ((not (-> this ground-only?)) + (change-nav-mesh this) + ) + (else + (set! (-> this current-nav-mesh-index) 0) + (change-to (-> *saberfish-nav-enemy-info* nav-mesh) this) + ) + ) + (set! (-> *saberfish-nav-enemy-info* nav-mesh) #f) + (set-should-move-to-ground this) + (set! (-> this align) (new 'process 'align-control this)) + (set! (-> this in-pursuit?) #t) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (set! (-> this scare-time) 0) + (set! (-> this desired-dest-mesh-index) (-> this current-nav-mesh-index)) + (set! (-> this is-submerged?) #f) + (set! (-> this root trans quad) (-> this pos-start quad)) + (quaternion-copy! (-> this root quat) (-> this quat-start)) + (set! (-> this move-to-ground?) #f) + (let ((s5-1 (-> this skel root-channel 0))) + (joint-control-channel-group-eval! + s5-1 + (the-as art-joint-anim (-> this draw art-group data 3)) + num-func-identity + ) + (set! (-> s5-1 frame-num) 0.0) + ) + (ja-post) + (logior! (-> this fact options) (actor-option suck-in)) + 0 + (none) + ) + +(defmethod saberfish-method-220 ((this saberfish)) + (when (< 2 (the-as int (-> this focus aware))) + (let ((s4-0 (handle->process (-> this focus handle)))) + (when s4-0 + (let ((s5-0 (or (focus-test? (the-as process-focusable s4-0) touch-water on-water under-water) + (and (-> (the-as process-focusable s4-0) water) + (logtest? (water-flag touch-water) (-> (the-as process-focusable s4-0) water flags)) + ) + ) + ) + ) + (when (not s5-0) + (case (find-ground-for-obj (the-as process-focusable s4-0)) + ((3 1) + (set! s5-0 #t) + ) + ) + ) + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable s4-0) 0) quad)) + (set-dest-nav! this (-> this focus-pos) (find-behavior<-in-water? (the-as symbol s5-0))) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defmethod saberfish-method-217 ((this saberfish)) + (cond + ((and (< (vector-vector-distance (-> this focus-pos) (-> this root trans)) 28672.0) + (get-focus! this) + (time-elapsed? (-> this last-attack-time) (seconds 1)) + ) + #t + ) + (else + ) + ) + (none) + ) + +;; WARN: Return type mismatch int vs saberfish-command. +(defmethod get-cmd ((this saberfish)) + (saberfish-method-220 this) + (let ((f30-0 (vector-vector-distance (-> this focus-pos) (-> this root trans))) + (f28-0 28672.0) + (gp-0 #f) + ) + (if (not (and (-> this next-state) (= (-> this next-state name) 'hostile))) + (set! f28-0 (* 1.5 f28-0)) + ) + (let ((s4-1 + (cond + ((and (-> this ground-only?) (!= (find-nearest-nav-mesh (target-pos 0) 8192.0) (-> this nav state mesh))) + (the-as saberfish-command (saberfish-command stare)) + ) + ((and (not (-> this ground-only?)) (or (saberfish-method-228 this) (nav-enemy-method-174 this))) + (the-as saberfish-command (saberfish-command start-terrain-transition)) + ) + (else + (the-as + saberfish-command + (cond + ((< 61440.0 f30-0) + (saberfish-command hostile) + ) + (else + (let ((f0-2 (saberfish-method-215 this))) + 0.0 + (if (and (!= (* 20480.0 (the float (the int (* 0.000048828126 (+ 10240.0 (fabs f0-2)))))) 0.0) + (not (logtest? (-> this nav state flags) (nav-state-flag avoiding-sphere))) + ) + (set! gp-0 #t) + ) + (cond + ((and (>= 8192.0 (fabs f0-2)) (>= f28-0 f30-0) (< 16384.0 f30-0)) + (the-as saberfish-command (saberfish-command attack)) + ) + ((>= 28672.0 f30-0) + (the-as saberfish-command (saberfish-command spin-attack)) + ) + ((and (>= 10922.667 (fabs f0-2)) (< f28-0 f30-0)) + (the-as saberfish-command (saberfish-command hostile)) + ) + (else + (the-as saberfish-command (saberfish-command stare)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let ((v1-43 (handle->process (-> this focus handle)))) + (when (or (not v1-43) + (or (not (and v1-43 + (not (logtest? (-> (the-as process-focusable v1-43) focus-status) (focus-status disable dead ignore grabbed))) + ) + ) + (not (attack-delay-elapsed? this)) + ) + ) + (let ((v1-51 (the-as int s4-1))) + (if (or (zero? v1-51) (= v1-51 3)) + (set! s4-1 (saberfish-command stare)) + ) + ) + ) + ) + (set! gp-0 (and (= (the-as int s4-1) 4) gp-0)) + (if gp-0 + (set! s4-1 (saberfish-command hostile-orient)) + ) + (the-as saberfish-command s4-1) + ) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +(defbehavior saberfish-water-post saberfish () + (none) + ) + +(defbehavior saberfish-chase-post saberfish () + (local-vars (v1-10 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((a0-1 (handle->process (-> self focus handle)))) + (when a0-1 + (let ((gp-0 (get-trans (the-as process-focusable a0-1) 1))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-! s5-0 (-> self root trans) gp-0) + (let ((f0-0 16384.0)) + (.lvf vf1 (&-> s5-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-10 vf1) + (if (< f0-0 v1-10) + (vector-normalize! s5-0 16384.0) + ) + ) + (vector+! gp-0 gp-0 s5-0) + ) + (let ((v1-15 (-> self nav state))) + (logclear! (-> v1-15 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-15 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-15 target-pos quad) (-> gp-0 quad)) + ) + ) + 0 + ) + ) + (nav-enemy-method-187 self) + 0 + (none) + ) + ) + +(defstate hit (saberfish) + :virtual #t + :enter (behavior () + (sound-play "sabfish-gethit") + (let ((t9-3 (-> (find-parent-state) enter))) + (if t9-3 + (t9-3) + ) + ) + ) + ) + +(defstate hostile (saberfish) + :virtual #t + :enter (behavior () + (if (saberfish-method-243 self) + (go-virtual swimming-hostile) + ) + (let ((t9-3 (-> (find-parent-state) enter))) + (if t9-3 + (t9-3) + ) + ) + ) + :trans (behavior () + (let ((a0-1 (handle->process (-> self focus handle)))) + (if a0-1 + (set! (-> self focus-pos quad) (-> (get-trans (the-as process-focusable a0-1) 0) quad)) + ) + ) + (let ((a1-2 (get-cmd self))) + (if (or (not (and (-> self next-state) (= (-> self next-state name) 'hostile))) (!= a1-2 2)) + (handle-cmd self a1-2) + ) + ) + (let ((t9-4 (-> (find-parent-state) trans))) + (if t9-4 + (t9-4) + ) + ) + ) + :post saberfish-chase-post + ) + +(defmethod handle-cmd ((this saberfish) (arg0 saberfish-command)) + (case arg0 + (((saberfish-command start-terrain-transition)) + (start-terrain-transition this) + ) + (((saberfish-command attack)) + (go (method-of-object this attack)) + ) + (((saberfish-command hostile)) + (if (not (and (-> this next-state) (= (-> this next-state name) 'hostile))) + (go (method-of-object this hostile)) + ) + ) + (((saberfish-command spin-attack)) + (go (method-of-object this spin-attack)) + ) + (((saberfish-command hostile-orient)) + (if (not (and (-> this next-state) (= (-> this next-state name) 'hostile-orient))) + (go (method-of-object this hostile-orient)) + ) + ) + (((saberfish-command stare)) + (if (and (not (and (-> this next-state) (= (-> this next-state name) 'stare))) + (not (and (-> this next-state) (= (-> this next-state name) 'stare-idle))) + ) + (go (method-of-object this stare)) + ) + ) + ) + ) + +(defmethod saberfish-method-215 ((this saberfish)) + (let ((a0-2 (handle->process (-> this focus handle)))) + (when a0-2 + (let ((a1-2 (get-trans (the-as process-focusable a0-2) 0))) + (saberfish-method-214 this a1-2) + ) + ) + ) + ) + +(defmethod saberfish-method-214 ((this saberfish) (arg0 vector)) + (let ((gp-0 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (s5-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + ) + 0.0 + 0.0 + (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 3 prim-core) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) arg0 (-> this root trans)))) + 0.0 + (set! (-> s4-1 y) 0.0) + (set! (-> gp-0 y) 0.0) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s4-1 1.0) + (vector-normalize! gp-0 1.0) + (vector-normalize! s5-0 1.0) + (let ((f0-7 (acos (vector-dot s4-1 s5-0)))) + (if (< (vector-dot s4-1 gp-0) 0.0) + (set! f0-7 (* -1.0 f0-7)) + ) + f0-7 + ) + ) + ) + ) + +(defbehavior saberfish-orient-code-setup saberfish () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! saberfish-turn-ja :num! (loop!) :frame-num 0.0) + (none) + ) + +;; WARN: new jak 2 until loop case, check carefully +(defbehavior saberfish-orient-code-single-pass saberfish ((arg0 float)) + (* 0.00006510417 (the float (ja-num-frames 0))) + (let ((f30-1 (if (< arg0 0.0) + -1.0 + 1.0 + ) + ) + (f24-0 (ja-frame-num 0)) + (f28-0 1.3333333) + ) + 0.0 + (let ((f26-0 (if (logtest? (enemy-flag drawn-mirrored) (-> self enemy-flags)) + -1.0 + 1.0 + ) + ) + (gp-1 (* 20480.0 (the float (the int (* 0.000048828126 (+ arg0 (* 10240.0 f30-1))))))) + ) + (when (!= gp-1 0.0) + (until #f + (let ((f22-0 (ja-frame-num 0))) + 0.0 + (let ((f0-10 (* f30-1 f26-0))) + (when (or (and (< f0-10 0.0) (< f24-0 f22-0)) (and (< 0.0 f0-10) (< f22-0 f24-0))) + 0 + (goto cfg-25) + ) + ) + (let ((f0-15 (* (fmin (* 15360.0 (seconds-per-frame) f28-0) (fabs gp-1)) f30-1))) + (quaternion-rotate-y! (-> self root quat) (-> self root quat) f0-15) + ) + (ja :num! (loop! (* f28-0 f30-1 f26-0))) + (set! f24-0 f22-0) + ) + (suspend) + 0 + ) + #f + ) + (label cfg-25) + gp-1 + ) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior saberfish-orient-code saberfish () + (saberfish-orient-code-setup) + (until #f + (let ((f0-0 (saberfish-method-215 self))) + (saberfish-orient-code-single-pass f0-0) + ) + (let ((a1-0 (get-cmd self))) + (handle-cmd self a1-0) + ) + ) + #f + (none) + ) + +(defstate hostile-orient (saberfish) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (stop-look-at! self) + ) + :exit (behavior () + (set-look-at-mode! self 1) + ) + :code saberfish-orient-code + :post (behavior () + (enemy-common-post self) + (update-transforms (-> self root)) + ) + ) + +(defstate stare-idle (saberfish) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-182 self) + (set-look-at-mode! self 1) + ) + :trans (behavior () + (let ((a1-0 (get-cmd self))) + (if (!= a1-0 (saberfish-command stare)) + (handle-cmd self a1-0) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (ja-no-eval :group! saberfish-idle-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + #f + ) + :post (behavior () + (enemy-common-post self) + (update-transforms (-> self root)) + ) + ) + +(defstate stare (saberfish) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (if (saberfish-method-243 self) + (go-virtual swimming-hostile) + ) + (nav-enemy-method-182 self) + (stop-look-at! self) + ) + :exit (behavior () + (set-look-at-mode! self 1) + ) + :trans (behavior () + '() + ) + :code (behavior () + (saberfish-orient-code-setup) + (until #f + (let ((f0-0 (saberfish-method-215 self))) + (saberfish-orient-code-single-pass f0-0) + ) + (let ((a1-0 (get-cmd self))) + (case a1-0 + (((saberfish-command stare)) + (go-virtual stare-idle) + ) + (else + (handle-cmd self a1-0) + ) + ) + ) + ) + #f + ) + :post (behavior () + (enemy-common-post self) + (update-transforms (-> self root)) + ) + ) + +(defstate attack (saberfish) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-182 self) + (stop-look-at! self) + ) + :exit (behavior () + (set-look-at-mode! self 1) + (set-time! (-> self last-attack-time)) + ) + :trans (behavior () + '() + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (logior! (-> self focus-status) (focus-status dangerous)) + (ja-no-eval :group! saberfish-attack-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((gp-0 5)) + 0.0 + (let ((f0-5 (saberfish-method-215 self))) + 0.0 + (let ((f30-0 (* 0.06666667 (the float gp-0)))) + (let ((f1-5 (fmin (* (/ 8192.0 f30-0) (seconds-per-frame)) (fabs f0-5)))) + (if (< f0-5 0.0) + (set! f1-5 (* -1.0 f1-5)) + ) + (quaternion-rotate-y! (-> self root quat) (-> self root quat) f1-5) + ) + (when (>= 5.0 (ja-frame-num 0)) + (let ((v1-29 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (vector+float*! (-> self root trans) (-> self root trans) v1-29 (* (/ 8192.0 f30-0) (seconds-per-frame))) + ) + ) + ) + ) + ) + (suspend) + (ja :num! (seek!)) + ) + (dotimes (gp-1 1) + (ja-no-eval :group! saberfish-attack-loop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (logclear! (-> self focus-status) (focus-status dangerous)) + (ja-no-eval :group! saberfish-attack-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((gp-2 (ja-num-frames 0)) + (v1-83 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + ) + (vector+float*! + (-> self root trans) + (-> self root trans) + v1-83 + (* -8192.0 (seconds-per-frame) (/ 15.0 (the float gp-2))) + ) + ) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual hostile) + ) + :post (behavior () + (enemy-common-post self) + (update-transforms (-> self root)) + ) + ) + +(defmethod saberfish-method-218 ((this saberfish)) + 0 + (none) + ) + +(defmethod saberfish-method-234 ((this saberfish) (arg0 vector)) + (let ((s4-0 (saberfish-method-233 this)) + (a0-3 (saberfish-method-236 this (-> this current-nav-mesh-index))) + (t0-0 (new 'stack-no-clear 'clamp-travel-vector-to-mesh-return-info)) + ) + (vector-! (new 'stack-no-clear 'vector) (-> this focus-pos) (-> this root trans)) + (when a0-3 + (set! (-> arg0 y) 0.0) + (clamp-vector-to-mesh-no-gaps a0-3 (-> this root trans) s4-0 arg0 t0-0) + ) + ) + 0 + (none) + ) + +(defstate water-land (saberfish) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-181 self) + (on-submerged self #f) + (let ((s5-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + (vector+float*! gp-0 (-> self root trans) s5-0 81920.0) + (let ((v1-8 (-> self nav state))) + (logclear! (-> v1-8 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-8 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-8 target-pos quad) (-> gp-0 quad)) + ) + ) + 0 + ) + :exit (behavior () + (logclear! (-> self nav flags) (nav-control-flag use-momentum)) + ) + :trans (behavior () + (vector+float*! + (-> self root trans) + (-> self root trans) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (* 81920.0 (seconds-per-frame)) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (dotimes (gp-0 1) + (ja-no-eval :group! saberfish-swim-burst-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (go-virtual swimming-hostile) + ) + :post (behavior () + (nav-enemy-method-187 self) + ) + ) + +(defstate swim-180-spin (saberfish) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set! (-> self saberfish-y-rotate) 0.0) + (logclear! (-> self nav flags) (nav-control-flag limit-rotation-rate update-heading-from-facing)) + (set! (-> self swim-final-rotate-deg) 0.0) + (set! (-> self swim-travel-anim) 0) + (stop-look-at! self) + (set! (-> self swim-speed) 57344.0) + (set-time! (-> self state-time)) + (let ((a1-0 (-> self nav state)) + (v1-8 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-8 quad) (-> a1-0 target-pos quad)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + 0.0 + (vector-! gp-0 (-> self root trans) v1-8) + (set! (-> gp-0 y) 0.0) + (when (< (vector-normalize-ret-len! gp-0 1.0) 20480.0) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (saberfish-method-231 self s5-0 4551.1113 #t gp-0) + (let ((v1-13 (-> self nav state))) + (logclear! (-> v1-13 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-13 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-13 target-pos quad) (-> s5-0 quad)) + ) + ) + 0 + ) + ) + ) + ) + :exit (behavior () + (set! (-> self root transv y) 0.0) + (set! (-> self adjusted-y-yet?) #f) + (set! (-> self saberfish-y-rotate) 0.0) + (vector-z-quaternion! (-> self nav-velocity) (-> self root quat)) + (set! (-> self nav-velocity y) 0.0) + (vector-normalize! (-> self nav-velocity) 1.0) + (set! (-> self nav-dir quad) (-> self nav-velocity quad)) + (set! (-> self doing-180-spin?) #f) + (set-time! (-> self last-swim-flip-time)) + (set! (-> self saberfish-y-rotate) 0.0) + ) + :code (behavior () + (local-vars (sv-144 vector)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! saberfish-swim-180-turn-ja) + (set! (-> self doing-180-spin?) #t) + (quaternion-copy! (-> self rotate-anim-quat) (-> self root quat)) + (vector-z-quaternion! (-> self post-spinflip-expected-heading) (-> self root quat)) + (set! (-> self post-spinflip-expected-heading y) 0.0) + (vector-normalize! (-> self post-spinflip-expected-heading) 1.0) + (vector-float*! (-> self post-spinflip-expected-heading) (-> self post-spinflip-expected-heading) -1.0) + (let ((gp-0 #f)) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (set! (-> self root transv quad) (the-as uint128 0)) + (vector-float*! (-> self root transv) (-> self root transv) -1.0) + (vector-v++! (-> self root trans) (-> self root transv)) + (set! (-> self root transv quad) (the-as uint128 0)) + (when (not (logtest? (-> self align flags) (align-flags disabled))) + (quaternion-normalize! + (quaternion*! (-> self rotate-anim-quat) (-> self rotate-anim-quat) (-> self align delta quat)) + ) + (quaternion-copy! (-> self root quat) (-> self rotate-anim-quat)) + (when (< 3.0 (ja-frame-num 0)) + (let ((a0-16 (-> self nav state)) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s2-0 quad) (-> a0-16 travel quad)) + (let ((s3-0 (new 'stack-no-clear 'quaternion)) + (s5-1 (new 'stack-no-clear 'quaternion)) + ) + (let ((s4-0 (quaternion-identity! (new 'stack-no-clear 'quaternion)))) + 0.0 + (vector-normalize! s2-0 1.0) + (when (< 4.0 (ja-frame-num 0)) + (when (not gp-0) + (set! gp-0 #t) + (let ((a1-10 (new 'stack-no-clear 'vector))) + (set! (-> a1-10 quad) (-> self root trans quad)) + (splash-spawn 0.0 a1-10 1) + ) + ) + ) + (when (< 5.0 (ja-frame-num 0)) + (let ((s1-0 (new 'stack-no-clear 'vector)) + (f30-5 (/ (+ -5.0 (ja-frame-num 0)) (+ -5.0 (the float (ja-num-frames 0))))) + ) + (let ((s0-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (set! (-> s0-0 y) 0.0) + (vector-normalize! s0-0 1.0) + (vector-lerp! s1-0 s0-0 s2-0 f30-5) + ) + (let ((s1-1 (-> self root trans)) + (s0-1 (-> self root trans)) + ) + (set! sv-144 s2-0) + (let ((f0-13 (* (lerp 0.0 57344.0 f30-5) (seconds-per-frame)))) + (vector+float*! s1-1 s0-1 sv-144 f0-13) + ) + ) + ) + ) + (let ((f30-6 (vector-dot (-> self post-spinflip-expected-heading) s2-0))) + (cond + ((< 0.9999 f30-6) + (quaternion-identity! s3-0) + ) + (else + (let ((s1-4 (vector-cross! (new 'stack-no-clear 'vector) (-> self post-spinflip-expected-heading) s2-0))) + (vector-normalize! s1-4 1.0) + (quaternion-vector-angle! s3-0 s1-4 (acos f30-6)) + ) + ) + ) + ) + (let ((f0-20 (/ (+ -3.0 (ja-frame-num 0)) (+ -3.0 (the float (ja-num-frames 0)))))) + (quaternion-slerp! s5-1 s4-0 s3-0 f0-20) + ) + ) + (quaternion*! (-> self root quat) (-> self rotate-anim-quat) s5-1) + ) + ) + ) + ) + (ja :num! (seek!)) + (suspend) + ) + ) + (go-virtual swimming-hostile) + ) + :post (behavior () + (enemy-common-post self) + (update-transforms (-> self root)) + ) + ) + +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior saberfish-swim-code saberfish () + (let ((v1-2 (ja-group))) + (when (not (and v1-2 (= v1-2 saberfish-swim-burst-ja))) + (ja-channel-push! 3 (seconds 0.2)) + (ja :group! saberfish-swim-burst-ja) + (ja :chan 1 :group! saberfish-swim-turn-left-ja) + (ja :chan 2 :group! saberfish-swim-turn-right-ja) + ) + ) + (until #f + (let* ((f0-1 (* 0.000061035156 (-> self swim-final-rotate-deg))) + (f0-2 (fmin 1.0 f0-1)) + ) + (let ((v1-19 (-> self skel root-channel 0)) + (f1-3 (- 1.0 f0-2)) + ) + (set! (-> v1-19 frame-interp 1) f1-3) + (set! (-> v1-19 frame-interp 0) f1-3) + ) + (ja :chan (-> self swim-travel-anim) :frame-interp0 f0-2 :frame-interp1 f0-2) + ) + (let ((v1-27 (-> self skel root-channel (- 3 (-> self swim-travel-anim)))) + (f0-3 0.0) + ) + (set! (-> v1-27 frame-interp 1) f0-3) + (set! (-> v1-27 frame-interp 0) f0-3) + ) + (ja :num! (loop!)) + (ja :chan 1 :num! (chan 0)) + (ja :chan 2 :num! (chan 0)) + (suspend) + ) + #f + (none) + ) + +(defmethod saberfish-method-239 ((this saberfish) (arg0 vector)) + (when (logtest? (enemy-flag ef37) (-> this enemy-flags)) + (let ((v1-3 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (let ((f0-0 (-> this swim-speed))) + 0.0 + 0.0 + (set! (-> v1-3 quad) (-> arg0 quad)) + (set! (-> v1-3 y) (fmin (-> v1-3 y) (+ -8192.0 (-> this water surface-height)))) + (vector-! s5-0 v1-3 (-> this root trans)) + (let ((f1-4 (-> s5-0 y)) + (v1-4 s5-0) + ) + (set! (-> this root transv y) + (/ f1-4 (/ (sqrtf (+ (* (-> v1-4 x) (-> v1-4 x)) (* (-> v1-4 z) (-> v1-4 z)))) f0-0)) + ) + ) + ) + (set! (-> this root transv y) (fmin 16384.0 (-> this root transv y))) + (vector-normalize! s5-0 1.0) + (set! (-> this saberfish-y-rotate) + (deg-seek (-> this saberfish-y-rotate) (* -16384.0 (-> s5-0 y)) (* 16384.0 (seconds-per-frame))) + ) + ) + ) + ) + +(defmethod nav-enemy-method-161 ((this saberfish) (arg0 nav-control)) + (if (and (not (-> this doing-180-spin?)) + (not (and (-> this next-state) (= (-> this next-state name) 'hostile-orient))) + ) + (call-parent-method this arg0) + ) + (none) + ) + +;; WARN: Return type mismatch vector vs none. +(defbehavior saberfish-swim-travel-trans saberfish () + (local-vars (f26-0 float) (f28-0 float)) + (when (not (-> self doing-180-spin?)) + (let ((a0-0 (-> self nav state)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> a0-0 travel quad)) + (let ((gp-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (let ((f30-0 (-> self swim-speed))) + (let ((s4-0 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + 0.0 + 0.0 + (let ((v1-6 (-> self nav state))) + (set! (-> v1-6 speed) f30-0) + ) + 0 + (set! (-> gp-0 y) 0.0) + (set! (-> s4-0 y) 0.0) + (vector-normalize! s4-0 1.0) + (vector-normalize! gp-0 1.0) + (vector-normalize! s5-0 1.0) + (cond + (#f + (set! f26-0 (-> self swim-anim-last-dot)) + (set! f28-0 (-> self swim-rotate-last-dot)) + (set! (-> s5-0 quad) (-> gp-0 quad)) + ) + (else + (let ((f0-6 (vector-dot s4-0 s5-0))) + (if (logtest? (enemy-flag drawn-mirrored) (-> self enemy-flags)) + (set! f0-6 (* -1.0 f0-6)) + ) + (let ((f0-7 (* -1.0 f0-6))) + (set! f26-0 (seek (-> self swim-anim-last-dot) f0-7 (* 4.0 (seconds-per-frame)))) + ) + ) + (set! (-> self swim-anim-last-dot) f26-0) + (let ((f0-11 (vector-dot gp-0 s5-0))) + (set! f28-0 (seek (-> self swim-rotate-last-dot) f0-11 (* 2.0 (seconds-per-frame)))) + ) + (set! (-> self swim-rotate-last-dot) f28-0) + (set! (-> self swim-rotate-last-dot) f28-0) + ) + ) + ) + (set! (-> self swim-final-rotate-deg) (- 16384.0 (acos (fabs f26-0)))) + (if (>= f26-0 0.0) + (set! (-> self swim-travel-anim) 2) + (set! (-> self swim-travel-anim) 1) + ) + (cond + ((and (< f28-0 -0.1) + (let ((f26-1 61440.0) + (t9-8 vector-vector-xz-distance) + (a0-15 (-> self root trans)) + (a2-2 (-> self nav state)) + (a1-7 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-7 quad) (-> a2-2 target-pos quad)) + (< f26-1 (t9-8 a0-15 a1-7)) + ) + (let ((v1-37 (ja-group))) + (and (not (and v1-37 (= v1-37 saberfish-swim-180-turn-ja))) #f) + ) + ) + (set! (-> self swim-travel-anim) -1) + ) + ((< 0.99999 f28-0) + (set! (-> gp-0 quad) (-> s5-0 quad)) + ) + (else + (let ((s4-1 (new 'stack-no-clear 'vector))) + 0.0 + (let ((f30-1 (fmin (acos f28-0) (* 0.53333336 (seconds-per-frame) f30-0)))) + (vector-cross! s4-1 gp-0 s5-0) + (vector-normalize! s4-1 1.0) + (vector-rotate-around-axis! gp-0 (the-as quaternion gp-0) f30-1 s4-1) + ) + ) + (set! (-> gp-0 y) 0.0) + (vector-normalize! gp-0 1.0) + ) + ) + ) + (let ((a0-27 (-> self nav state)) + (v1-48 gp-0) + ) + (set! (-> a0-27 heading quad) (-> v1-48 quad)) + ) + 0 + (set! (-> self nav-dir quad) (-> gp-0 quad)) + (vector-normalize! gp-0 (-> self swim-speed)) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (set! (-> s5-1 quad) (-> gp-0 quad)) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 24576.0) + (saberfish-method-234 self s5-1) + (when (< (vector-length s5-1) 6144.0) + (set! (-> self swim-travel-anim) -1) + (set! (-> gp-0 quad) (the-as uint128 0)) + (go-virtual swim-180-spin) + ) + ) + (let ((a0-34 (-> self nav state)) + (v1-65 gp-0) + ) + (set! (-> a0-34 velocity quad) (-> v1-65 quad)) + ) + 0 + (set! (-> self nav-velocity quad) (-> gp-0 quad)) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defbehavior swimming-base-exit saberfish () + (set! (-> self root transv y) 0.0) + (set! (-> self saberfish-y-rotate) 0.0) + (set! (-> self doing-180-spin?) #f) + (none) + ) + +(defstate swimming-base (saberfish) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-181 self) + (set! (-> self saberfish-y-rotate) 0.0) + (logclear! (-> self nav flags) (nav-control-flag limit-rotation-rate update-heading-from-facing)) + (set! (-> self swim-final-rotate-deg) 0.0) + (set! (-> self swim-travel-anim) 0) + (stop-look-at! self) + (set! (-> self swim-speed) 57344.0) + (set-time! (-> self state-time)) + ) + :exit swimming-base-exit + :trans (behavior () + (saberfish-method-220 self) + (saberfish-swim-travel-trans) + (if (saberfish-method-228 self) + (start-terrain-transition self) + ) + ) + :code saberfish-swim-code + :post (behavior () + (nav-enemy-method-187 self) + ) + ) + +(defstate swimming-hostile (saberfish) + :virtual #t + :parent (saberfish swimming-base) + :enter (behavior () + (logior! (-> self focus-status) (focus-status dangerous)) + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 enter))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + (let ((a0-2 (handle->process (-> self focus handle)))) + (when a0-2 + (vector-! (-> self attack-dir) (get-trans (the-as process-focusable a0-2) 1) (-> self root trans)) + (set! (-> self attack-dir y) 0.0) + (vector-normalize! (-> self attack-dir) 1.0) + ) + ) + ) + :exit (behavior () + (logclear! (-> self focus-status) (focus-status dangerous)) + (let ((a0-1 (-> self prev-state parent))) + (when a0-1 + (let ((t9-0 (-> a0-1 exit))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (set! (-> self root transv y) 0.0) + ) + :trans (behavior () + (let ((s5-0 (handle->process (-> self focus handle))) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (when #t + (let ((s4-0 #f)) + (let ((s3-0 #f)) + (when s5-0 + (set! (-> gp-0 quad) (-> (get-trans (the-as process-focusable s5-0) 3) quad)) + (let ((f0-2 (- (vector-dot (-> self root trans) (-> self attack-dir)) (vector-dot gp-0 (-> self attack-dir))))) + (if (< -61440.0 f0-2) + (set! s3-0 #t) + ) + (when (< 0.0 f0-2) + #t + (vector+float*! gp-0 gp-0 (-> self attack-dir) 32768.0) + (if (< 12288.0 f0-2) + (set! s4-0 #t) + ) + ) + ) + ) + (let ((a0-7 (-> self nav state)) + (v1-27 gp-0) + ) + (logclear! (-> a0-7 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-7 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-7 target-pos quad) (-> v1-27 quad)) + ) + 0 + (when (or (not (-> self adjusted-y-yet?)) (not s3-0)) + (saberfish-method-239 self gp-0) + (set! (-> self adjusted-y-yet?) #t) + ) + ) + (when (or (not s5-0) + (or s4-0 + (not (and (handle->process (-> self focus handle)) + (not (logtest? (-> (the-as process-focusable (handle->process (-> self focus handle))) focus-status) + (focus-status disable dead ignore grabbed) + ) + ) + ) + ) + ) + ) + (set! (-> self flee-to-readjust?) #f) + (set! (-> self use-stored-flee-point?) #f) + (set-time! (-> self scare-start-time)) + (let* ((f30-0 300.0) + (f28-0 2.5) + (f26-0 1.5) + (v1-50 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-51 (the-as number (logior #x3f800000 v1-50))) + ) + (set! (-> self scare-time) + (the-as time-frame (the int (* f30-0 (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-51))))))) + ) + ) + (saberfish-method-231 + self + (-> self flee-point-temp) + 4551.1113 + #t + (vector-! (new 'stack-no-clear 'vector) (-> self root trans) gp-0) + ) + (go-flee self) + ) + ) + ) + ) + (let ((v1-61 (-> self state parent))) + (when v1-61 + (let ((t9-5 (-> v1-61 trans))) + (if t9-5 + (t9-5) + ) + ) + ) + ) + ) + ) + +(defmethod saberfish-method-219 ((this saberfish)) + (set! (-> this enemy-info idle-anim) 3) + (set! (-> this enemy-info walk-anim) 6) + (set! (-> this enemy-info run-anim) 5) + (set! (-> this enemy-info hostile-anim) 5) + 0 + (none) + ) + +(defstate active (saberfish) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (if (saberfish-method-243 self) + (set! f30-0 (* 0.65 f30-0)) + ) + (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)) + ) + ) + ) + #f + ) + ) + +(defstate spin-attack (saberfish) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-182 self) + (stop-look-at! self) + (logior! (-> self focus-status) (focus-status dangerous)) + (set-time! (-> self last-attack-time)) + ) + :exit (behavior () + (set-look-at-mode! self 1) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + :code (behavior () + (local-vars (f22-0 float) (f28-0 float) (f30-0 float)) + (let ((f24-0 (saberfish-method-215 self)) + (f26-0 1.0) + ) + 0.0 + 0.0 + 0.0 + 0.0 + (let ((f0-4 f24-0)) + (if (logtest? (enemy-flag drawn-mirrored) (-> self enemy-flags)) + (set! f0-4 (* -1.0 f0-4)) + ) + (cond + ((< 0.0 f0-4) + (ja-channel-push! 1 (seconds 0.2)) + (set! f30-0 3.0) + (set! f28-0 9.0) + (set! f22-0 6.0) + (ja-no-eval :group! saberfish-spin-attack-right-ja :num! (loop!) :frame-num 0.0) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (set! f30-0 3.0) + (set! f28-0 9.0) + (set! f22-0 6.0) + (ja-no-eval :group! saberfish-spin-attack-left-ja :num! (loop!) :frame-num 0.0) + ) + ) + ) + (if (< f24-0 0.0) + (set! f26-0 -1.0) + ) + (let* ((f0-10 (fabs f24-0)) + (f0-11 (+ 16384.0 f0-10)) + (f26-1 (* (fmax 16384.0 (fmin 32768.0 f0-11)) f26-0 (/ 15.0 f22-0))) + ) + (until (ja-done? 0) + (let ((f0-15 (ja-frame-num 0))) + (if (and (>= f0-15 f30-0) (>= f28-0 f0-15)) + (quaternion-rotate-y! (-> self root quat) (-> self root quat) (* f26-1 (seconds-per-frame))) + ) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (go-virtual hostile) + ) + :post (behavior () + (enemy-common-post self) + (update-transforms (-> self root)) + ) + ) + +(defmethod attack-delay-elapsed? ((this saberfish)) + (time-elapsed? (-> this last-attack-time) (seconds 1)) + ) + +(defmethod coin-flip? ((this saberfish)) + #f + ) + +(defmethod enemy-method-108 ((this saberfish) (arg0 process-focusable)) + (not (time-elapsed? (-> this scare-start-time) (-> this scare-time))) + ) + +(defmethod go-stare2 ((this saberfish)) + (if (not (and (-> this next-state) (let ((v1-3 (-> this next-state name))) + (or (= v1-3 'swimming-hostile) (= v1-3 'flee)) + ) + ) + ) + (call-parent-method this) + ) + ) + +;; WARN: Return type mismatch enemy-jump-flags vs none. +(defmethod init-jump-info! ((this saberfish) (arg0 enemy-jump-info)) + (call-parent-method this arg0) + (if (saberfish-method-243 this) + (logior! (-> arg0 flags) (enemy-jump-flags ejf0)) + (logclear! (-> arg0 flags) (enemy-jump-flags ejf0)) + ) + (logclear! (-> arg0 flags) (enemy-jump-flags ejf0)) + (none) + ) + +(defmethod do-jump ((this saberfish)) + (stop-look-at! this) + (cond + ((saberfish-method-243 this) + (set! (-> this jump windup-anim) (the-as uint 18)) + (set! (-> this jump air-anim) (the-as uint 19)) + (set! (-> this jump land-anim) (the-as uint 20)) + (set! (-> this move-to-ground?) #t) + ) + (else + (set! (-> this jump air-anim) (the-as uint 21)) + (set! (-> this jump land-anim) (the-as uint 22)) + (set! (-> this move-to-ground?) #f) + ) + ) + (let ((s3-1 (vector-! (new 'stack-no-clear 'vector) (-> this jump-point-end) (-> this jump-point-start))) + (s4-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + 0.0 + (+ (vector-length s3-1) (if (saberfish-method-243 this) + 49152.0 + 20480.0 + ) + ) + (set! (-> s4-0 y) 0.0) + (vector-normalize! s4-0 (if (saberfish-method-243 this) + 49152.0 + 20480.0 + ) + ) + (vector+! s5-0 (-> this jump-point-start) s4-0) + (set! (-> s5-0 y) (-> this jump-point-end y)) + (set! (-> this jump-start-ground-state) (the-as uint (get-ground-state this))) + (set! (-> this enemy-flags) + (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag jump-check-blocked))) + ) + (send-event this 'jump 0 s5-0) + ) + ) + +(defstate water-impact (saberfish) + :virtual #t + :parent (saberfish base-saberfish-state) + :enter (behavior () + (let ((v1-1 (-> self state parent))) + (when v1-1 + (let ((t9-0 (-> v1-1 enter))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + ) + :code (behavior () + (ja-no-eval :group! (-> self draw art-group data (-> self jump land-anim)) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (set! (-> self root transv quad) (the-as uint128 0)) + (compute-alignment! (-> self align)) + (align! (-> self align) (align-opts adjust-x-vel adjust-y-vel adjust-xz-vel) 1.0 1.0 1.0) + (vector-v++! (-> self root trans) (-> self root transv)) + (set! (-> self root transv quad) (the-as uint128 0)) + (vector+float*! + (-> self root trans) + (-> self root trans) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (* (lerp 40960.0 40960.0 (/ (ja-frame-num 0) (the float (ja-num-frames 0)))) (seconds-per-frame)) + ) + (set! (-> self root trans y) + (- (-> self root trans y) (* (lerp 83968.0 0.0 (* 0.2 (ja-frame-num 0))) (seconds-per-frame))) + ) + (suspend) + (ja :num! (seek!)) + ) + (logior! (-> self root root-prim prim-core collide-with) (collide-spec backgnd)) + (go-virtual swimming-hostile) + ) + ) + +(defstate diving-into-water (saberfish) + :virtual #t + :parent (saberfish base-saberfish-state) + :enter (behavior () + (set! (-> self state-time) (+ (current-time) (seconds 8))) + (logclear! (-> self root status) (collide-status touch-surface)) + (set! (-> self root transv quad) (the-as uint128 0)) + (set! (-> self root transv y) -61440.0) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (water-control-method-10 (-> self water)) + (vector+float*! + (-> self root trans) + (-> self root trans) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (* 40960.0 (seconds-per-frame)) + ) + (set! (-> self root trans y) (- (-> self root trans y) (* 81920.0 (seconds-per-frame)))) + (set! (-> self root transv quad) (the-as uint128 0)) + (if (or (< (-> self root trans y) (+ -8192.0 (-> self water surface-height))) + (logtest? (-> self root status) (collide-status touch-surface)) + (time-elapsed? (-> self state-time) (seconds 0.05)) + ) + (go-virtual water-impact) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (let ((gp-0 (-> self draw art-group data (-> self jump air-anim))) + (s5-0 #f) + ) + (ja-no-eval :group! gp-0 + :num! (identity (the float (+ (-> (the-as art-joint-anim gp-0) frames num-frames) -1))) + ) + (until #f + (ja :group! gp-0 :num! (identity (the float (+ (-> (the-as art-joint-anim gp-0) frames num-frames) -1)))) + (suspend) + (when (and (not s5-0) (< (-> self root trans y) (-> self water surface-height))) + (set! s5-0 #t) + (set-time! (-> self state-time)) + ) + ) + ) + #f + ) + :post enemy-falling-post + ) + +(defstate transition-terrain-jump-from-water (saberfish) + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-182 self) + (set! (-> self saberfish-y-rotate) 0.0) + (quaternion-look-at! + (-> self root quat) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + *up-vector* + ) + ) + :exit (behavior () + (logior! (-> self enemy-flags) (enemy-flag vulnerable vulnerable-backup)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! saberfish-jump-to-land-windup-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((gp-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (f30-0 (ja-frame-num 0)) + ) + (set! (-> gp-0 y) 0.0) + (vector-normalize! gp-0 (-> self swim-speed)) + (vector-v++! (-> self root trans) gp-0) + (compute-alignment! (-> self align)) + (align! (-> self align) (align-opts adjust-y-vel) 1.0 1.0 1.0) + (set! (-> self root transv x) 0.0) + (set! (-> self root transv z) 0.0) + (vector-v++! (-> self root trans) (-> self root transv)) + (set! (-> self root transv quad) (the-as uint128 0)) + (if (>= f30-0 6.0) + (do-jump self) + ) + ) + (suspend) + (ja :num! (seek!)) + ) + (do-jump self) + ) + :post (behavior () + (enemy-common-post self) + (update-transforms (-> self root)) + ) + ) + +(defbehavior jump-from-land-dive-anim saberfish () + (let ((f30-0 1.0)) + (compute-alignment! (-> self align)) + (cond + ((< (ja-frame-num 0) 4.5) + (align! (-> self align) (align-opts adjust-x-vel adjust-y-vel adjust-xz-vel) 1.0 1.0 1.0) + (vector-v++! (-> self root trans) (-> self root transv)) + ) + ((< 4.5 (ja-frame-num 0)) + (vector+float*! + (-> self root trans) + (-> self root trans) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (* (lerp 81920.0 40960.0 (* 0.22222222 (+ -4.5 (ja-frame-num 0)))) (seconds-per-frame)) + ) + (set! (-> self root trans y) + (- (-> self root trans y) + (* (lerp 2048.0 81920.0 (* 0.22222222 (+ -4.5 (ja-frame-num 0)))) (seconds-per-frame)) + ) + ) + ) + ) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (none) + ) + +(defstate transition-terrain-jump-from-land (saberfish) + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-182 self) + ) + :exit (behavior () + '() + ) + :code (behavior () + (logclear! (-> self water flags) (water-flag swim-ground)) + (ja-channel-push! 1 (seconds 0.2)) + (stop-look-at! self) + (logclear! (-> self root root-prim prim-core collide-with) (collide-spec backgnd)) + (set! (-> self jump air-anim) (the-as uint 21)) + (set! (-> self jump land-anim) (the-as uint 22)) + (ja-no-eval :group! (-> self draw art-group data (-> self jump air-anim)) :num! (seek!) :frame-num 0.0) + (set! (-> self root transv quad) (the-as uint128 0)) + (until (ja-done? 0) + (jump-from-land-dive-anim) + ) + (set! (-> self move-to-ground?) #f) + (go-virtual diving-into-water) + ) + :post (behavior () + (enemy-common-post self) + (update-transforms (-> self root)) + ) + ) + +(defstate transition-terrain-jump (saberfish) + :virtual #t + :enter (behavior () + (if (saberfish-method-243 self) + (go transition-terrain-jump-from-water) + (go transition-terrain-jump-from-land) + ) + ) + :code sleep-code + ) + +(defbehavior transition-pursue-behavior saberfish () + (when (-> self in-pursuit?) + (saberfish-method-220 self) + (if (desired-nav-idx-valid? self) + (go-virtual hostile) + ) + ) + (nav-enemy-method-187 self) + (none) + ) + +(defstate transition-terrain-orient-towards-initial-jump (saberfish) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-182 self) + ) + :trans (behavior () + (if (< (fabs (saberfish-method-214 self (-> self jump-point-end))) 2730.6667) + (go transition-terrain-jump-from-land) + ) + ) + :code (behavior () + (saberfish-orient-code-setup) + (until #f + (let ((f0-0 (saberfish-method-214 self (-> self jump-point-end)))) + (if (= (saberfish-orient-code-single-pass f0-0) 0.0) + (go transition-terrain-jump-from-land) + ) + ) + ) + #f + ) + :post (behavior () + (enemy-common-post self) + (update-transforms (-> self root)) + ) + ) + +;; WARN: new jak 2 until loop case, check carefully +(defbehavior turbo-swim saberfish () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! saberfish-swim-burst-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + +(defstate transition-terrain-move-towards-initial-jump (saberfish) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (set! (-> self swim-speed) 57344.0) + (when (saberfish-method-243 self) + (set! (-> self saberfish-y-rotate) 0.0) + (logclear! (-> self nav flags) (nav-control-flag limit-rotation-rate update-heading-from-facing)) + (set! (-> self swim-final-rotate-deg) 0.0) + (set! (-> self swim-travel-anim) 0) + 0 + ) + ) + :exit (behavior () + (if (saberfish-method-243 self) + (swimming-base-exit) + ) + ) + :trans (behavior () + (go-terrain-transition self #f) + (if (saberfish-method-243 self) + (saberfish-swim-travel-trans) + ) + ) + :code (behavior () + (cond + ((saberfish-method-243 self) + (saberfish-swim-code) + ) + (else + (let ((v1-3 (method-of-type enemy hostile))) + (when v1-3 + (let ((t9-2 (-> v1-3 code))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + ) + ) + ) + :post transition-pursue-behavior + ) + +;; ERROR: Unsupported inline assembly instruction kind - [mula.s f1, f4] +;; ERROR: Unsupported inline assembly instruction kind - [madda.s f2, f5] +;; ERROR: Unsupported inline assembly instruction kind - [madd.s f1, f3, f6] +(defmethod saberfish-method-238 ((this saberfish) (arg0 symbol) (arg1 float) (arg2 float)) + (local-vars + (f1-5 float) + (sv-192 vector) + (sv-196 float) + (sv-200 vector) + (sv-204 vector) + (sv-240 vector) + (sv-244 vector) + (sv-248 vector) + (sv-252 float) + (sv-256 float) + (sv-512 vector) + (sv-516 vector) + (sv-520 vector) + (sv-524 vector) + (sv-528 float) + (sv-532 float) + (sv-536 vector) + (sv-540 vector) + (sv-592 vector) + (sv-608 vector) + ) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (-> this swim-speed) + #t + (let ((s3-0 (new 'stack-no-clear 'saberfish-spawner-query-msg))) + (set! (-> s3-0 query-type) (saberfish-query-type can-go-to-ground?)) + (set! (-> s3-0 in-water?) #f) + (send-event (get-spawn-parent) 'saberfish-query s3-0) + (let ((v1-6 (-> s3-0 in-water?)) + (s3-1 #f) + ) + (cond + ((and arg0 (not v1-6)) + (set! s3-1 #t) + ) + (arg0 + (set! s3-1 #t) + (set! sv-192 (new 'stack-no-clear 'vector)) + (set! sv-196 (the-as float 30720.0)) + (set! sv-200 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (set! sv-204 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (set! (-> sv-204 y) 0.0) + (vector-normalize! sv-204 1.0) + (set! sv-240 (vector-! (new 'stack-no-clear 'vector) (-> this jump-point-start) (-> this root trans))) + (set! sv-244 sv-204) + (set! sv-248 (vector-float*! (new 'stack-no-clear 'vector) sv-204 -1.0)) + (set! sv-252 (the-as float 0.0)) + (set! sv-256 (the-as float 0.0)) + (set! (-> sv-240 y) 0.0) + (vector-normalize! sv-240 1.0) + (set! sv-252 (vector-dot sv-244 sv-240)) + (set! sv-256 (vector-dot sv-248 sv-240)) + (cond + ((< sv-256 sv-252) + (vector+float*! sv-192 (-> this root trans) sv-244 sv-196) + (set! (-> sv-204 quad) (-> sv-244 quad)) + ) + (else + (vector+float*! sv-192 (-> this root trans) sv-248 sv-196) + (set! (-> sv-204 quad) (-> sv-248 quad)) + ) + ) + (when (< (* sv-196 sv-196) (vector-vector-xz-distance-squared sv-192 (-> this jump-point-start))) + (set! sv-592 (new 'stack-no-clear 'vector)) + (let ((v1-33 (-> this jump-point-start)) + (a0-22 sv-192) + ) + (.lvf vf4 (&-> v1-33 quad)) + (.lvf vf5 (&-> a0-22 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-592 quad) vf6) + (set! sv-608 (new 'stack-no-clear 'vector)) + (let ((s0-1 (new 'stack-no-clear 'vector)) + (s2-1 (new 'stack-no-clear 'vector)) + ) + (let ((s3-2 (new 'stack-no-clear 'vector)) + (s1-1 (new 'stack-no-clear 'vector)) + ) + 0.0 + 0.0 + (set! (-> sv-592 y) 0.0) + (let* ((f0-19 (vector-length sv-592)) + (f30-1 (sqrtf (- (* f0-19 f0-19) (* sv-196 sv-196)))) + ) + (let ((f28-0 (atan sv-196 f30-1))) + (vector-normalize! sv-592 -1.0) + (vector-rotate-y! sv-608 sv-592 f28-0) + (let ((t9-10 vector-rotate-y!) + (a0-26 s0-1) + (a2-2 (- f28-0)) + ) + (t9-10 a0-26 sv-592 a2-2) + ) + ) + (vector-normalize! sv-608 f30-1) + (vector-normalize! s0-1 f30-1) + ) + (vector+float*! s3-2 (-> this jump-point-start) sv-608 1.0) + (vector+float*! s1-1 (-> this jump-point-start) s0-1 1.0) + (vector-! sv-608 s3-2 (-> this root trans)) + (vector-! s0-1 s1-1 (-> this root trans)) + (set! (-> sv-608 y) 0.0) + (set! (-> s0-1 y) 0.0) + (let ((f30-2 (vector-normalize-ret-len! sv-608 1.0)) + (f0-28 (vector-normalize-ret-len! s0-1 1.0)) + ) + (let* ((v1-47 sv-200) + ; (f1-4 (-> sv-608 x)) + ; (f2-1 (-> sv-608 y)) + ; (f3-0 (-> sv-608 z)) + ; (f4-0 (-> v1-47 x)) + ; (f5-0 (-> v1-47 y)) + ; (f6-0 (-> v1-47 z)) + ) + ;; og:preserve-this + ; (.mula.s f1-4 f4-0) + ; (.madda.s f2-1 f5-0) + ; (.madd.s f1-5 f3-0 f6-0) + (set! f1-5 (vector-dot sv-608 v1-47)) + ) + (set! sv-252 f1-5) + (set! sv-256 (vector-dot s0-1 sv-200)) + (cond + ((< f30-2 40.96) + (set! (-> s2-1 quad) (-> s3-2 quad)) + ) + ((< f0-28 40.96) + (set! (-> s2-1 quad) (-> s1-1 quad)) + ) + ((< sv-256 sv-252) + (set! (-> s2-1 quad) (-> s3-2 quad)) + ) + (else + (set! (-> s2-1 quad) (-> s1-1 quad)) + ) + ) + ) + ) + (set! (-> s2-1 y) (-> this root trans y)) + (cond + ((< (vector-vector-xz-distance-squared (-> this jump-point-start) s2-1) 822083600.0) + (if (< 8192.0 arg1) + (set! s3-1 #t) + (set! s3-1 #f) + ) + ) + ((begin + (let ((s3-4 (vector-! (new 'stack-no-clear 'vector) (-> this jump-point-start) (-> this jump-point-end))) + (s0-2 (new 'stack-no-clear 'vector)) + (s1-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-4 y) 0.0) + (vector-normalize! s3-4 1.0) + (vector-rotate-y! s0-2 s3-4 -8192.0) + (vector-rotate-y! s1-2 s3-4 8192.0) + (vector-normalize! s0-2 arg2) + (vector-normalize! s1-2 arg2) + (set! s3-1 #f) + (set! sv-512 (vector+! (new 'stack-no-clear 'vector) (-> this jump-point-start) s0-2)) + (set! sv-516 (vector+! (new 'stack-no-clear 'vector) (-> this jump-point-start) s1-2)) + (set! sv-520 (new 'stack-no-clear 'vector)) + (set! sv-524 (new 'stack-no-clear 'vector)) + (set! sv-528 (the-as float 0.0)) + (set! sv-532 (the-as float 0.0)) + (set! sv-536 (new 'stack-no-clear 'vector)) + (set! sv-540 (new 'stack-no-clear 'vector)) + (set! (-> sv-536 quad) (-> this root trans quad)) + (set! (-> sv-540 quad) (-> s2-1 quad)) + (set! (-> sv-536 y) (-> sv-512 y)) + (set! (-> sv-540 y) (-> sv-512 y)) + (let ((a1-37 (vector-! (new 'stack-no-clear 'vector) sv-516 sv-512)) + (a0-60 (new 'stack-no-clear 'vector)) + (v1-76 (new 'stack-no-clear 'vector)) + ) + (set-vector! a0-60 (-> s0-2 z) 0.0 (- (-> s0-2 x)) 1.0) + (set-vector! v1-76 (- (-> s0-2 z)) 0.0 (-> s0-2 x) 1.0) + (set! sv-252 (vector-dot a0-60 a1-37)) + (if (< 0.0 sv-252) + (set! (-> sv-520 quad) (-> a0-60 quad)) + (set! (-> sv-520 quad) (-> v1-76 quad)) + ) + (set-vector! a0-60 (-> s1-2 z) 0.0 (- (-> s1-2 x)) 1.0) + (set-vector! v1-76 (- (-> s1-2 z)) 0.0 (-> s1-2 x) 1.0) + (set! sv-252 (vector-dot a0-60 a1-37)) + (if (< 0.0 sv-252) + (set! (-> sv-524 quad) (-> v1-76 quad)) + (set! (-> sv-524 quad) (-> a0-60 quad)) + ) + ) + ) + (vector-normalize! sv-520 1.0) + (vector-normalize! sv-524 1.0) + (set! sv-528 (vector-dot sv-520 sv-512)) + (set! sv-252 (vector-dot sv-520 sv-536)) + (set! sv-256 (vector-dot sv-520 sv-540)) + (or (< sv-252 sv-528) (< sv-256 sv-528)) + ) + (set! s3-1 #t) + ) + (else + (set! sv-532 (vector-dot sv-524 sv-516)) + (set! sv-252 (vector-dot sv-524 sv-536)) + (set! sv-256 (vector-dot sv-524 sv-540)) + (if (or (< sv-252 sv-532) (< sv-256 sv-532)) + (set! s3-1 #t) + ) + ) + ) + ) + ) + ) + ) + (when (< 26624.0 (- (-> this water surface-height) (-> this root trans y))) + ) + (cond + (s3-1 + (set-time! (-> this scare-start-time)) + (set! (-> this scare-time) (seconds 12.5)) + (set! (-> this flee-to-readjust?) #t) + (set! (-> this use-stored-flee-point?) #t) + (saberfish-method-231 this (-> this flee-point-temp) 1820.4445 #f (the-as vector #f)) + (set-time! (-> this last-land-check-time)) + (let* ((a0-70 this) + (t9-24 (method-of-object a0-70 saberfish-method-218)) + ) + #t + (t9-24 a0-70) + ) + (if (not (and (-> this next-state) (= (-> this next-state name) 'flee))) + (go-flee this) + ) + ) + ((and (< arg2 49152.0) (< arg1 8192.0)) + (go transition-terrain-jump-from-water) + ) + ((not (and (-> this next-state) (= (-> this next-state name) 'transition-terrain-move-towards-initial-jump))) + (go (method-of-object this transition-terrain-move-towards-initial-jump)) + ) + ) + ) + ) + ) + ) + +(defmethod go-terrain-transition ((this saberfish) (arg0 symbol)) + (let ((f30-0 (vector-vector-xz-distance (-> this root trans) (-> this jump-point-start))) + (s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this jump-point-end) (-> this jump-point-start))) + (s3-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + ) + (set! (-> s4-1 y) 0.0) + (vector-normalize! s4-1 1.0) + (let* ((f0-2 (vector-dot s3-0 s4-1)) + (f28-0 (acos f0-2)) + ) + (cond + ((saberfish-method-243 this) + (saberfish-method-238 this arg0 f28-0 f30-0) + ) + (else + (cond + ((and (< f30-0 4096.0) (< f28-0 2730.6667)) + (go transition-terrain-jump-from-land) + ) + ((< f30-0 8192.0) + (nav-enemy-method-176 this) + (go (method-of-object this transition-terrain-orient-towards-initial-jump)) + ) + ((not (and (-> this next-state) (= (-> this next-state name) 'transition-terrain-move-towards-initial-jump))) + (nav-enemy-method-177 this) + (go (method-of-object this transition-terrain-move-towards-initial-jump)) + ) + ) + ) + ) + ) + ) + ) + +(defmethod saberfish-method-233 ((this saberfish)) + (let ((gp-0 (new 'stack-no-clear 'nav-poly)) + (a0-2 (saberfish-method-236 this (-> this current-nav-mesh-index))) + ) + (if (not a0-2) + (return (the-as nav-poly #f)) + ) + (vector-! (the-as vector (-> gp-0 vertex)) (-> this root trans) (the-as vector (-> a0-2 bounds))) + (set! (-> gp-0 vertex1 x) 40960.0) + (set! (-> gp-0 data 20) (the-as uint 3)) + (nav-mesh-method-45 a0-2 gp-0) + ) + ) + +(defmethod saberfish-method-231 ((this saberfish) (arg0 vector) (arg1 float) (arg2 symbol) (arg3 vector)) + (local-vars (sv-64 vector) (sv-68 vector) (sv-72 float) (sv-76 float) (sv-80 vector) (sv-84 float)) + (set! sv-64 (new 'stack-no-clear 'vector)) + (set! sv-68 (new 'stack-no-clear 'vector)) + (set! sv-72 (the-as float 0.0)) + (set! sv-76 (the-as float 0.0)) + (set! sv-80 (new 'stack-no-clear 'vector)) + (set! sv-84 (the-as float -1.0)) + (if arg2 + (set! (-> sv-64 quad) (-> arg3 quad)) + (vector-! sv-64 (-> this jump-point-start) (-> this jump-point-end)) + ) + (set! (-> sv-64 y) 0.0) + (set! sv-76 arg1) + (vector-normalize-copy! sv-68 sv-64 1.0) + (let ((s3-0 (saberfish-method-236 this (-> this current-nav-mesh-index))) + (s2-0 (new 'stack-no-clear 'clamp-travel-vector-to-mesh-return-info)) + (s1-0 (saberfish-method-233 this)) + ) + 0.0 + (when s1-0 + (dotimes (s0-0 13) + (vector-rotate-y! sv-64 sv-68 sv-72) + (vector-normalize! sv-64 94208.0) + (clamp-vector-to-mesh-no-gaps s3-0 (-> this root trans) s1-0 sv-64 s2-0) + (vector+! arg0 (-> this root trans) sv-64) + (let ((f0-7 (vector-length sv-64))) + (when (< 84787.195 f0-7) + (set! (-> arg0 y) (-> this water surface-height)) + (return #t) + ) + (when (< sv-84 f0-7) + (set! sv-84 f0-7) + (set! (-> sv-80 quad) (-> arg0 quad)) + ) + ) + (if (= (logand s0-0 1) 1) + (set! sv-72 (+ sv-72 sv-76)) + (set! sv-72 (- sv-72 sv-76)) + ) + (set! sv-76 (+ sv-76 arg1)) + ) + (set! (-> arg0 quad) (-> sv-80 quad)) + (set! (-> arg0 y) (-> this water surface-height)) + (return #t) + ) + ) + #f + ) + +(defmethod change-nav-mesh ((this saberfish)) + (let* ((s5-0 (get-nav-mesh-idx this (-> this root trans) (saberfish-find-behavior none))) + (a0-3 (saberfish-method-236 this s5-0)) + ) + (when (and (>= s5-0 0) (or (!= s5-0 (-> this current-nav-mesh-index)) (!= (-> this nav state mesh) a0-3))) + (set! (-> this current-nav-mesh-index) s5-0) + (change-to a0-3 this) + ) + ) + (none) + ) + +(defmethod desired-nav-idx-valid? ((this saberfish)) + (!= (-> this desired-dest-mesh-index) (-> this dest-nav-mesh-index)) + ) + +(defmethod set-dest-nav! ((this saberfish) (arg0 vector) (arg1 saberfish-find-behavior)) + (set! (-> this desired-dest-nav-point quad) (-> arg0 quad)) + (set! (-> this desired-dest-mesh-index) (get-nav-mesh-idx this arg0 arg1)) + (when (= (-> this desired-dest-mesh-index) -1) + ) + 0 + (none) + ) + +(defmethod saberfish-method-228 ((this saberfish)) + (and (not (-> this ground-only?)) + (>= (+ (current-time) (seconds -0.1)) (-> this last-swim-flip-time)) + (!= (-> this desired-dest-mesh-index) (-> this current-nav-mesh-index)) + (!= (-> this current-nav-mesh-index) -1) + ) + ) + +(defmethod start-terrain-transition ((this saberfish)) + (set-should-move-to-ground this) + (send-event (get-spawn-parent) 'transition-terrain-begin) + (go-terrain-transition this #t) + ) + +(defmethod normalize-heading! ((this saberfish) (arg0 nav-control)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (cond + ((and (not (and (-> this next-state) (= (-> this next-state name) 'transition-terrain-orient-towards-initial-jump))) + (and (logtest? (enemy-flag ef37) (-> this enemy-flags)) + (not (logtest? (enemy-flag ef39) (-> this enemy-flags))) + ) + ) + (cond + ((or (saberfish-method-243 this) (not (logtest? (enemy-flag ef37) (-> this enemy-flags)))) + (set! (-> s5-0 quad) (-> this nav-dir quad)) + ) + (else + (let ((a1-3 (-> this nav state))) + (set! (-> s5-0 quad) (-> a1-3 heading quad)) + ) + ) + ) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (quaternion-set! s4-0 0.0 (-> s5-0 x) 0.0 (+ 1.0 (-> s5-0 z))) + (quaternion-normalize! s4-0) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)) + (vector-z-quaternion! (new 'stack-no-clear 'vector) s4-0) + (if (>= (+ (current-time) (seconds -0.6)) (-> this last-swim-flip-time)) + (quaternion-copy! (-> this root quat) s4-0) + (quaternion-slerp! (-> this root quat) (-> this root quat) s4-0 (* 4.0 (seconds-per-frame))) + ) + ) + ) + (else + ) + ) + ) + (if (saberfish-method-243 this) + (quaternion-rotate-local-x! (-> this root quat) (-> this root quat) (-> this saberfish-y-rotate)) + ) + 0 + (none) + ) + +(defmethod jump-wind-up-anim ((this saberfish) (arg0 enemy-jump-info)) + (when (not (saberfish-method-243 this)) + (ja-channel-push! 1 (seconds 0.1)) + (let ((a1-2 (-> this draw art-group data (-> this jump windup-anim))) + (a0-5 (-> this skel root-channel 0)) + ) + (set! (-> a0-5 frame-group) (the-as art-joint-anim a1-2)) + (set! (-> a0-5 param 0) (the float (+ (-> (the-as art-joint-anim a1-2) 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-2) num-func-seek!) + ) + ) + #t + ) + +(defmethod jump-in-air-anim ((this saberfish) (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 + ) + +(defmethod jump-land-anim ((this saberfish) (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 + ) + ) + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod setup-jump! ((this saberfish) (arg0 enemy-jump-info)) + (let ((f0-0 (vector-vector-xz-distance (-> arg0 start-pos) (-> arg0 dest-pos)))) + (fmax (-> this enemy-info jump-height-min) (* (-> this enemy-info jump-height-factor) f0-0)) + ) + (let ((f0-4 (- (-> arg0 dest-pos y) (-> arg0 start-pos y))) + (v1-3 (vector-! (new 'stack-no-clear 'vector) (-> arg0 dest-pos) (-> arg0 start-pos))) + ) + (set! (-> v1-3 y) 0.0) + (let ((f0-6 (* (/ f0-4 (vector-length v1-3)) (if (saberfish-method-243 this) + 49152.0 + 20480.0 + ) + ) + ) + ) + (+ 2048.0 f0-6) + ) + ) + (let ((s4-0 (new 'stack-no-clear 'traj3d-params))) + (set! (-> s4-0 dest quad) (-> arg0 dest-pos quad)) + (set! (-> s4-0 src quad) (-> arg0 start-pos quad)) + (let ((f30-1 11832.889)) + (if (not (saberfish-method-243 this)) + (set! f30-1 8192.0) + ) + (set! (-> s4-0 initial-tilt) f30-1) + ) + (set! (-> s4-0 gravity) 4.551111) + (traj3d-calc-initial-velocity-using-tilt s4-0) + (set! (-> arg0 traj initial-position quad) (-> arg0 start-pos quad)) + (set! (-> arg0 traj gravity) -4.551111) + (set! (-> arg0 traj time) (-> s4-0 time)) + (set! (-> arg0 traj initial-velocity quad) (-> s4-0 initial-velocity quad)) + ) + (none) + ) + +(defmethod get-nav-mesh-idx ((this saberfish) (arg0 vector) (arg1 saberfish-find-behavior)) + (let ((gp-0 (new 'stack-no-clear 'saberfish-spawner-query-msg))) + (set! (-> gp-0 query-type) (saberfish-query-type set-nav-idx)) + (set! (-> gp-0 behavior) arg1) + (set! (-> (the-as vector (&-> gp-0 mesh)) quad) (-> arg0 quad)) + (send-event (get-spawn-parent) 'saberfish-query gp-0) + (-> gp-0 closest-nav-mesh-index) + ) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod nav-enemy-method-164 ((this saberfish)) + (call-parent-method this) + (let* ((a0-3 this) + (t9-2 (method-of-object a0-3 set-dest-nav!)) + (a2-0 (-> this nav state)) + (a1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-1 quad) (-> a2-0 target-pos quad)) + (t9-2 a0-3 a1-1 (saberfish-find-behavior none)) + ) + (if (saberfish-method-228 this) + (start-terrain-transition this) + ) + (none) + ) + +;; WARN: Return type mismatch symbol vs vector. +(defmethod nav-enemy-method-166 ((this saberfish) (arg0 vector) (arg1 vector)) + (cond + (#t + (set! (-> arg0 quad) (-> this flee-point-temp quad)) + #t + ) + (else + (call-parent-method this arg0 arg1) + ) + ) + (if (saberfish-method-243 this) + (set! (-> arg0 y) (-> this water surface-height)) + ) + (the-as vector #t) + ) + +(defstate flee (saberfish) + :virtual #t + :enter (behavior () + (set! (-> self swim-speed) 57344.0) + (when (saberfish-method-243 self) + (set! (-> self saberfish-y-rotate) 0.0) + (logclear! (-> self nav flags) (nav-control-flag limit-rotation-rate update-heading-from-facing)) + (set! (-> self swim-final-rotate-deg) 0.0) + (set! (-> self swim-travel-anim) 0) + 0 + ) + (let ((t9-2 (-> (find-parent-state) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + :exit (behavior () + (set! (-> self scare-time) 0) + (if (saberfish-method-243 self) + (swimming-base-exit) + ) + (let ((t9-3 (-> (find-parent-state) exit))) + (if t9-3 + (t9-3) + ) + ) + ) + :trans (behavior () + (when (-> self flee-to-readjust?) + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (when (time-elapsed? (-> self last-target-check-time) (seconds 0.2)) + (set-time! (-> self last-target-check-time)) + (saberfish-method-220 self) + (when (desired-nav-idx-valid? self) + (set! (-> self scare-time) 0) + 0 + ) + ) + (saberfish-method-239 self (-> self flee-point-temp)) + ) + ) + (when (< (vector-vector-xz-distance (-> self root trans) (-> self flee-point-temp)) 16384.0) + (set! (-> self scare-time) 0) + 0 + ) + (when (time-elapsed? (-> self last-land-check-time) (seconds 2.5)) + (saberfish-method-220 self) + (set-time! (-> self last-land-check-time)) + (if (saberfish-method-228 self) + (start-terrain-transition self) + ) + ) + (saberfish-swim-travel-trans) + (when (>= (the-as int (-> self focus aware)) 2) + (let ((t9-9 (-> (find-parent-state) trans))) + (if t9-9 + (t9-9) + ) + ) + ) + ) + :code (behavior () + (saberfish-swim-code) + ) + ) + +(defmethod is-pfoc-in-mesh? ((this saberfish) (arg0 process-focusable) (arg1 vector)) + (if (and arg0 (not arg1)) + (set! arg1 (get-trans arg0 1)) + ) + (when arg1 + (let* ((f0-0 (-> arg1 y)) + (v1-4 (-> this root)) + (f1-0 (-> v1-4 trans y)) + (a0-2 (-> this fact)) + ) + (when (and (< f0-0 (+ f1-0 (-> a0-2 notice-top))) (< (- f1-0 (-> a0-2 notice-bottom)) f0-0)) + (let ((f0-1 (-> this enemy-info notice-nav-radius))) + (or (>= (* f0-1 f0-1) (vector-vector-xz-distance-squared (-> v1-4 trans) arg1)) + (>= (get-nav-mesh-idx this arg1 (saberfish-find-behavior none)) 0) + ) + ) + ) + ) + ) + ) + +(defmethod enemy-common-post ((this saberfish)) + (if (not (handle->process (-> this spawn-parent))) + (go (method-of-object this die)) + ) + (water-control-method-10 (-> this water)) + (let ((a1-1 (-> this nav state)) + (a0-6 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-6 quad) (-> a1-1 heading quad)) + (set! (-> a0-6 y) 0.0) + (vector-normalize! a0-6 1.0) + ) + (when (= (-> this pid) 275) + ) + (set-should-move-to-ground this) + (if (and (-> this next-state) + (let ((v1-19 (-> this next-state name))) + (or (= v1-19 'diving-into-water) (= v1-19 'water-impact) (= v1-19 'jump) (= v1-19 'knocked)) + ) + ) + (change-nav-mesh this) + ) + (let ((a1-8 (-> this nav state)) + (a0-14 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-14 quad) (-> a1-8 travel quad)) + (set! (-> a0-14 y) 0.0) + (vector-normalize! a0-14 1.0) + ) + (cond + ((saberfish-method-243 this) + (logclear! (-> this nav flags) (nav-control-flag limit-rotation-rate update-heading-from-facing)) + (stop-look-at! this) + ) + ((= (-> this ground-state) 4) + (logior! (-> this nav flags) (nav-control-flag limit-rotation-rate update-heading-from-facing)) + ) + ) + (call-parent-method this) + (none) + ) + +(defmethod jump-anim-handler ((this saberfish) (arg0 int) (arg1 enemy-jump-info)) + (when (saberfish-method-243 this) + (case arg0 + ((5) + (compute-alignment! (-> this align)) + (align! (-> this align) (align-opts adjust-x-vel adjust-y-vel adjust-xz-vel) 1.0 1.0 1.0) + (vector-v++! (-> this root trans) (-> this root transv)) + (when (< (ja-frame-num 0) 8.0) + (let ((f0-1 (vector-length (-> this root transv)))) + (let ((v1-17 (-> this nav state))) + (set! (-> v1-17 speed) f0-1) + ) + 0 + (let ((v1-19 (-> this nav))) + (set! (-> v1-19 target-speed) f0-1) + ) + 0 + (set! (-> this swim-speed) f0-1) + ) + ) + (set! (-> this root transv quad) (the-as uint128 0)) + ) + ) + ) + (call-parent-method this arg0 arg1) + ) + +(defmethod go-directed2 ((this saberfish)) + (if (saberfish-method-243 this) + (go (method-of-object this water-land)) + (call-parent-method this) + ) + ) + +(defmethod enemy-method-50 ((this saberfish) (arg0 int)) + (let ((v1-0 arg0)) + (cond + ((= v1-0 1) + (let ((v1-4 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 2))) + (set! (-> v1-4 prim-core action) (collide-action solid)) + (set! (-> v1-4 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list water pusher) + ) + ) + ) + ((or (= v1-0 2) (zero? v1-0)) + (let ((v1-8 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 2))) + (set! (-> v1-8 prim-core action) (collide-action)) + (set! (-> v1-8 prim-core collide-with) (collide-spec)) + ) + 0 + ) + ) + ) + (none) + ) + +(defstate knocked (saberfish) + :virtual #t + :enter (behavior () + (set! (-> self knocked-under-water?) #f) + (set! (-> self move-to-ground?) #f) + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + +(defstate knocked-recover-water (saberfish) + :virtual #t + :parent (saberfish knocked-recover) + :enter (behavior () + '() + ) + :code (behavior () + (when (handle->process (-> self ragdoll-proc)) + (enable-ragdoll! (-> (the-as ragdoll-proc (handle->process (-> self ragdoll-proc))) ragdoll) self) + (saberfish-method-240 self (seconds 1)) + ) + (ja-channel-push! 1 0) + (ja-no-eval :group! saberfish-swim-180-turn-ja :num! (seek!) :frame-num 0.0) + (let ((gp-0 (current-time))) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (go-virtual swimming-hostile) + ) + :post (behavior () + (enemy-simple-post) + ) + ) + +(defstate knocked-recover (saberfish) + :virtual #t + :enter (behavior () + (set-should-move-to-ground self) + (if (saberfish-method-243 self) + (go-virtual knocked-recover-water) + ) + (let ((t9-4 (-> (find-parent-state) enter))) + (if t9-4 + (t9-4) + ) + ) + ) + :code (behavior () + (if (handle->process (-> self ragdoll-proc)) + (enable-ragdoll! (-> (the-as ragdoll-proc (handle->process (-> self ragdoll-proc))) ragdoll) self) + ) + (ja-channel-push! 1 0) + (ja-no-eval :group! saberfish-flip-up-start-ja :num! (seek!) :frame-num 0.0) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.4)) + (suspend) + ) + ) + (ja-channel-push! 1 0) + (ja-no-eval :group! saberfish-flip-up-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (change-nav-mesh self) + (water-control-method-10 (-> self water)) + (if (enemy-method-109 self) + (go-die self) + (go-hostile self) + ) + ) + ) + +(defmethod go-die ((this saberfish)) + (sound-play "sabfish-death") + (send-event (handle->process (-> this spawn-parent)) 'child-die) + (call-parent-method this) + ) + +(defmethod process-mask->search-info-flag ((this saberfish)) + (let ((v0-1 (call-parent-method this))) + (if (-> this is-submerged?) + (set! v0-1 (logior v0-1 (search-info-flag abort))) + ) + v0-1 + ) + ) + +(defmethod on-submerged ((this saberfish) (arg0 symbol)) + (if arg0 + (logclear! (-> this enemy-flags) (enemy-flag vulnerable vulnerable-backup)) + (logior! (-> this enemy-flags) (enemy-flag vulnerable vulnerable-backup)) + ) + (set! (-> this is-submerged?) arg0) + 0 + (none) + ) + +(defstate idle (saberfish) + :virtual #t + :trans (behavior () + (when (time-elapsed? (-> self state-time) (-> self state-timeout)) + (cond + ((= (-> self focus aware) (enemy-aware ea1)) + (go-virtual active) + ) + ((< 1 (the-as int (-> self focus aware))) + (go-virtual notice) + ) + ) + ) + ) + ) + +(defstate notice (saberfish) + :virtual #t + :enter (behavior () + (go-virtual hostile) + ) + ) + +(defbehavior saberfish-command-event-handler saberfish ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('saberfish-command) + (case (-> arg3 param 0) + (('go-alive) + (go-virtual idle) + ) + ) + ) + (else + (event-handler self arg0 arg1 arg2 arg3) + ) + ) + ) + +(defstate command-mode (saberfish) + :virtual #t + :event saberfish-command-event-handler + :trans (behavior () + '() + ) + :code sleep-code + ) + +(defstate saberfish-swimming (saberfish) + :virtual #t + :parent (saberfish command-mode) + :enter (behavior () + (set! (-> self swim-travel-anim) 0) + (set! (-> self saberfish-y-rotate) 0.0) + (set! (-> self swim-final-rotate-deg) 0.0) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (vector+float*! + (-> self root trans) + (-> self root trans) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (* 57344.0 (seconds-per-frame)) + ) + (when (time-elapsed? (-> self state-time) (seconds 1)) + (set! (-> self current-nav-mesh-index) -1) + (change-nav-mesh self) + (go-virtual swimming-hostile) + ) + (let ((v1-15 (-> self state parent))) + (when v1-15 + (let ((t9-3 (-> v1-15 trans))) + (if t9-3 + (t9-3) + ) + ) + ) + ) + ) + :code (behavior () + (saberfish-swim-code) + ) + ) + +(defstate saberfish-crawl-out-of-tube (saberfish) + :virtual #t + :parent (saberfish command-mode) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (logclear! (-> self water flags) (water-flag swim-ground)) + (ja-channel-push! 1 0) + (stop-look-at! self) + (logclear! (-> self root root-prim prim-core collide-with) (collide-spec backgnd)) + (set! (-> self jump air-anim) (the-as uint 21)) + (set! (-> self jump land-anim) (the-as uint 22)) + (ja-no-eval :group! saberfish-crawl-out-of-tube-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (vector+float*! + (-> self root trans) + (-> self root trans) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (* 40960.0 (seconds-per-frame)) + ) + (suspend) + (ja :num! (seek!)) + ) + (set! (-> self root transv quad) (the-as uint128 0)) + (ja-channel-push! 1 0) + (ja :group! saberfish-jump-to-water-air-ja :num! (identity 5.0)) + (until (ja-done? 0) + (jump-from-land-dive-anim) + ) + (set! (-> self move-to-ground?) #f) + (go-virtual diving-into-water) + ) + :post (behavior () + (ja-post) + ) + ) + +(defstate saberfish-sitting-on-land (saberfish) + :virtual #t + :parent (saberfish command-mode) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('saberfish-command) + (case (-> block param 0) + (('go-alive) + (go transition-terrain-jump-from-land) + ) + ) + ) + (else + (event-handler self proc argc message block) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! saberfish-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (ja-post) + ) + ) + +(defmethod go-idle2 ((this saberfish)) + (case (-> this initial-state) + (('saberfish-crawl-out-of-tube) + (go (method-of-object this saberfish-crawl-out-of-tube)) + ) + (('saberfish-sitting-on-land) + (go (method-of-object this saberfish-sitting-on-land)) + ) + (('saberfish-swimming) + (go (method-of-object this saberfish-swimming)) + ) + (('idle) + (go (method-of-object this hostile)) + ) + ) + ) + +(defmethod init-from-entity! ((this saberfish) (arg0 entity-actor)) + (set! (-> this ground-only?) #t) + (set! (-> this spawn-parent) (process->handle this)) + (set! (-> *saberfish-nav-enemy-info* nav-mesh) + (find-nearest-nav-mesh (-> arg0 extra trans) (the-as float #x7f800000)) + ) + (set! (-> this initial-state) 'idle) + (set! (-> this pos-start quad) (-> arg0 extra trans quad)) + (quaternion-copy! (-> this quat-start) (-> arg0 quat)) + (call-parent-method this arg0) + ) + +(defbehavior saberfish-init-by-other saberfish ((arg0 process-drawable) (arg1 saberfish-init-by-other-params)) + (set! (-> self pos-start quad) (-> arg1 pos quad)) + (quaternion-copy! (-> self quat-start) (-> arg1 orient)) + (set! (-> self spawn-parent) (-> arg1 spawn-parent)) + (set! (-> self initial-state) (-> arg1 initial-state)) + (stack-size-set! (-> self main-thread) 512) + (set! (-> self ground-only?) #f) + (enemy-init-by-other arg0 arg1) + ) + +(defmethod saberfish-method-236 ((this saberfish) (arg0 int)) + (let ((gp-0 (new 'stack-no-clear 'saberfish-spawner-query-msg))) + (set! (-> gp-0 query-type) (saberfish-query-type set-mesh)) + (set! (-> gp-0 closest-nav-mesh-index) arg0) + (set! (-> gp-0 mesh) #f) + (send-event (get-spawn-parent) 'saberfish-query gp-0) + (-> gp-0 mesh) + ) + ) + +(defmethod saberfish-method-237 ((this saberfish) (arg0 int)) + (let ((gp-0 (new 'stack-no-clear 'saberfish-spawner-query-msg))) + (set! (-> gp-0 query-type) (saberfish-query-type set-in-water)) + (set! (-> gp-0 closest-nav-mesh-index) arg0) + (send-event (get-spawn-parent) 'saberfish-query gp-0) + (-> gp-0 in-water?) + ) + ) + +(defmethod should-move-to-ground? ((this saberfish)) + (-> this move-to-ground?) + ) + +;; WARN: Return type mismatch vector vs none. +(defmethod copy-nav-state-vel! ((this saberfish) (arg0 vector)) + (cond + ((saberfish-method-243 this) + (set! (-> arg0 quad) (-> this nav-velocity quad)) + ) + (else + (let ((a0-2 (-> this nav state))) + (set! (-> arg0 quad) (-> a0-2 velocity quad)) + ) + ) + ) + (none) + ) + +(defmethod go-flee ((this saberfish)) + (go (method-of-object this flee)) + ) + +(defmethod saberfish-method-240 ((this saberfish) (arg0 time-frame)) + (let ((s5-0 (handle->process (-> this ragdoll-proc)))) + (when s5-0 + (disable-for-duration (the-as ragdoll-proc s5-0) arg0) + (logclear! (-> (the-as ragdoll-proc s5-0) ragdoll ragdoll-flags) (ragdoll-flag rf9)) + (enemy-method-90 this (the-as ragdoll-proc s5-0)) + ) + ) + 0 + (none) + ) + +(defmethod saberfish-method-241 ((this saberfish)) + (let ((a1-4 (-> (the-as ragdoll-proc (handle->process (-> this ragdoll-proc))) ragdoll)) + (v1-3 0) + ) + (dotimes (a2-1 (the-as int (-> a1-4 num-joints))) + (if (logtest? (-> a1-4 ragdoll-joints a2-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf2)) + (+! v1-3 1) + ) + ) + (set! (-> this knocked-under-water?) (>= v1-3 (the-as int (shr (-> a1-4 num-joints) 1)))) + (>= v1-3 (the int (* 0.6666667 (the float (-> a1-4 num-joints))))) + ) + ) + +(defmethod ragdoll-settled? ((this saberfish)) + (let* ((s5-0 (handle->process (-> this ragdoll-proc))) + (v0-0 + (or (not s5-0) + (or (ragdoll-proc-method-19 (the-as ragdoll-proc s5-0)) + (and (not (saberfish-method-243 this)) + (time-elapsed? (-> this state-time) (seconds 0.1)) + (< (vector-length (-> (the-as ragdoll-proc s5-0) ragdoll ragdoll-joints 0 velocity)) + (* 49152.0 (seconds-per-frame)) + ) + (< (cos (* 16384.0 (seconds-per-frame))) (-> (the-as ragdoll-proc 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) + ) + ) + ) + ) + ) + ) + (if (not v0-0) + (set! v0-0 (saberfish-method-241 this)) + ) + v0-0 + ) + ) + +(defmethod within-gspot-range? ((this saberfish)) + (if (-> this knocked-under-water?) + #f + (call-parent-method this) + ) + ) + +(defun find-ground-for-obj ((arg0 process-focusable)) + (let ((gp-0 (new 'stack-no-clear 'water-info))) + (water-info-init! (-> arg0 root) gp-0 (collide-action solid semi-solid)) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (let ((v1-5 (above-ground? (-> arg0 root) s5-0 (-> arg0 root trans) (collide-spec backgnd) 8192.0 81920.0 1024.0))) + (cond + ((and (logtest? (water-flag touch-water) (-> gp-0 flags)) + v1-5 + (>= (+ 819.2 (-> s5-0 best-other-tri intersect y)) (-> arg0 root trans y)) + ) + (if (< (-> gp-0 base-height) (-> s5-0 best-other-tri intersect y)) + 4 + 3 + ) + ) + ((logtest? (water-flag touch-water) (-> gp-0 flags)) + 3 + ) + ((and v1-5 (>= (+ 819.2 (-> s5-0 best-other-tri intersect y)) (-> arg0 root trans y))) + 4 + ) + ((and v1-5 (logtest? (water-flag over-water) (-> gp-0 flags))) + (if (< (-> gp-0 base-height) (-> s5-0 best-other-tri intersect y)) + 2 + 1 + ) + ) + (v1-5 + 2 + ) + ((logtest? (water-flag over-water) (-> gp-0 flags)) + 1 + ) + (else + 0 + ) + ) + ) + ) + ) + ) + +(defmethod get-ground-state ((this saberfish)) + (if (-> this ground-only?) + (return 4) + ) + (when (and (and (-> this next-state) (let ((v1-6 (-> this next-state name))) + (or (= v1-6 'knocked) (= v1-6 'knocked-recover)) + ) + ) + (handle->process (-> this ragdoll-proc)) + ) + (let ((v1-11 0) + (a1-6 0) + ) + (let ((a2-5 (-> (the-as ragdoll-proc (handle->process (-> this ragdoll-proc))) ragdoll))) + 0 + (dotimes (a3-5 (the-as int (-> a2-5 num-joints))) + (if (logtest? (-> a2-5 ragdoll-joints a3-5 ragdoll-joint-flags) (ragdoll-joint-flag rjf2)) + (+! a1-6 1) + ) + (if (logtest? (-> a2-5 ragdoll-joints a3-5 ragdoll-joint-flags) (ragdoll-joint-flag rjf0)) + (+! v1-11 1) + ) + ) + ) + (when (or (> v1-11 0) (> a1-6 0)) + (if (< a1-6 v1-11) + (return 4) + (return 3) + ) + (the-as none 0) + ) + ) + ) + (find-ground-for-obj this) + ) + +(defmethod saberfish-method-243 ((this saberfish)) + (= (-> this ground-state) 3) + ) + +;; WARN: Return type mismatch nav-flags vs none. +(defmethod set-should-move-to-ground ((this saberfish)) + (set! (-> this ground-state) (the-as uint (get-ground-state this))) + (when #t + (case (-> this ground-state) + ((4 1 2) + (set! (-> this move-to-ground?) #t) + ) + (else + (set! (-> this move-to-ground?) #f) + ) + ) + ) + (cond + ((= (-> this ground-state) 3) + (logclear! (-> this root nav-flags) (nav-flags has-root-sphere)) + ) + (else + (set! (-> this root nav-radius) 8192.0) + (logior! (-> this root nav-flags) (nav-flags has-root-sphere)) + ) + ) + (none) + ) + +(defmethod nav-enemy-method-181 ((this saberfish)) + (call-parent-method this) + (none) + ) + +(defmethod relocate ((this saberfish) (offset int)) + (call-parent-method this offset) + ) + +(defmethod go-stare ((this saberfish)) + (if (and (-> this next-state) (= (-> this next-state name) 'flee)) + (go (method-of-object this swimming-hostile)) + (call-parent-method this) + ) + ) + +(defmethod event-handler ((this saberfish) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('saberfish-query) + (let ((s5-1 (the-as saberfish-spawner-query-msg (-> arg3 param 0)))) + (case (-> s5-1 query-type) + (((saberfish-query-type set-nav-idx)) + (set! (-> s5-1 closest-nav-mesh-index) 0) + 0 + ) + (((saberfish-query-type set-mesh)) + (set! (-> s5-1 mesh) (find-nearest-nav-mesh (-> this entity extra trans) (the-as float #x7f800000))) + (nop!) + 0 + ) + (((saberfish-query-type set-in-water)) + (set! (-> s5-1 in-water?) #f) + #f + ) + (((saberfish-query-type can-go-to-ground?)) + (break!) + 0 + ) + ) + ) + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) diff --git a/goal_src/jak3/levels/sewer/sew-laser-guard.gc b/goal_src/jak3/levels/sewer/sew-laser-guard.gc index 3cc8b265ff..607e2eaf8f 100644 --- a/goal_src/jak3/levels/sewer/sew-laser-guard.gc +++ b/goal_src/jak3/levels/sewer/sew-laser-guard.gc @@ -7,3 +7,720 @@ ;; 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-guard (enemy) + ((params gun-turret-params) + (aim-pos vector :inline) + (smoke-part sparticle-launch-control) + (casing-part sparticle-launch-control) + (sync-orient sync-linear :inline) + (start-orient quaternion :inline) + (end-orient quaternion :inline) + (last-play-sweep-dir-positive? symbol) + (last-play-sweep-sync float) + (sound-hum sound-id) + (sound-scorch sound-id) + ) + (:methods + (sew-laser-guard-method-155 (_type_) none) + (sew-laser-guard-method-156 (_type_) none) + ) + ) + + +(defpart 4935 + :init-specs ((:texture (pal-lightning level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0 64.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +(defpart 4936 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.2)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 64.0 64.0) + (:omega (degrees 4511.25)) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + ) + ) + +(defpart 4937 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.4) (meters 0.1)) + (:rot-x (degrees 6.7500005)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0 30.0) + (:b 128.0) + (:a 128.0 128.0) + (:omega (degrees 4511.25)) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + ) + ) + +(defpart 4938 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 2.0 6.0) + (:z (meters 0.1)) + (:scale-x (meters 0.05) (meters 0.1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 1 128.0) + (:g :copy r) + (:b 255.0) + (:a 255.0) + (:omega (degrees 0.03375)) + (:vel-y (meters 0.02) (meters 0.02)) + (:fade-a -2.56 -2.56) + (:friction 0.9) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4939 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 64.0 64.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + ) + ) + +(defpartgroup group-sew-laser-guard-hit + :id 1505 + :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)) + ) + ) + +(deftype sew-laser-shot (projectile) + () + ) + + +(defstate dissipate (sew-laser-shot) + :virtual #t + :enter (behavior () + (go-virtual impact) + ) + ) + +(defmethod made-impact? ((this sew-laser-shot)) + (let ((gp-0 (-> this root)) + (s5-0 (new 'stack-no-clear 'collide-query)) + ) + (let ((v1-0 s5-0)) + (set! (-> v1-0 radius) (-> gp-0 root-prim prim-core world-sphere w)) + (set! (-> v1-0 collide-with) (-> gp-0 root-prim prim-core collide-with)) + (set! (-> v1-0 ignore-process0) this) + (set! (-> v1-0 ignore-process1) (ppointer->process (-> this parent))) + (set! (-> v1-0 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-0 action-mask) (collide-action solid)) + ) + (let ((a0-2 (handle->process (-> this notify-handle)))) + (when a0-2 + (let* ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> gp-0 trans) (get-trans (the-as process-focusable a0-2) 3))) + (f0-2 (- (vector-length s4-1))) + ) + (fill-and-try-snap-to-surface gp-0 s4-1 f0-2 0.0 -3072.0 s5-0) + ) + ) + ) + ) + ) + +(defun sew-laser-shot-move ((arg0 sew-laser-shot)) + (projectile-move-fill-line-sphere arg0) + (if (logtest? (-> arg0 root status) (collide-status touch-surface)) + (go (method-of-object arg0 impact)) + ) + 0 + (none) + ) + +(defmethod setup-collision! ((this sew-laser-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-default) + (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 ((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 + backgnd + jak + bot + 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 1228.8) + (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 init-proj-settings! ((this sew-laser-shot)) + (set! (-> this attack-mode) 'shock) + (set! (-> this max-speed) 131072.0) + (set! (-> this timeout) (seconds 0.125)) + (set! (-> this move) sew-laser-shot-move) + (set! (-> this root dynam gravity y) 0.0) + (set! (-> this root dynam gravity-length) 0.0) + (set! (-> this root dynam gravity-max) 0.0) + (set! (-> this vehicle-damage-factor) 0.5) + (logior! (-> this options) (projectile-options po13)) + 0 + (none) + ) + +(defskelgroup skel-sew-laser-guard sew-laser-guard sew-laser-guard-lod0-jg sew-laser-guard-idle-ja + ((sew-laser-guard-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 30) + ) + +(define *sew-laser-guard-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 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! (-> *sew-laser-guard-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(defun fire-laser! ((arg0 vector) (arg1 vector) (arg2 sew-laser-guard) (arg3 float)) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (set! (-> s5-0 start-pos quad) (-> arg0 quad)) + (vector-float*! (-> s5-0 move-dist) arg1 arg3) + (let ((v1-3 s5-0)) + (set! (-> v1-3 radius) 40.96) + (set! (-> v1-3 collide-with) (collide-spec backgnd jak enemy obstacle hit-by-others-list player-list)) + (set! (-> v1-3 ignore-process0) arg2) + (set! (-> v1-3 ignore-process1) #f) + (set! (-> v1-3 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-3 action-mask) (collide-action solid)) + ) + (let ((f0-2 (fill-and-probe-using-line-sphere *collide-cache* s5-0))) + (if (>= f0-2 0.0) + (vector-float*! (-> s5-0 move-dist) (-> s5-0 move-dist) f0-2) + (set! (-> s5-0 best-other-tri collide-ptr) #f) + ) + ) + (cond + ((and (-> s5-0 best-other-tri collide-ptr) (let ((s3-0 (-> s5-0 best-other-tri collide-ptr))) + (if (type? s3-0 collide-shape-prim-sphere) + s3-0 + ) + ) + ) + (let ((s3-1 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> s3-1 ent) (-> arg2 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 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 arg2)) + (let* ((v1-19 *game-info*) + (a0-17 (+ (-> v1-19 attack-id) 1)) + ) + (set! (-> v1-19 attack-id) a0-17) + (set! (-> s3-1 attack-id) a0-17) + ) + (set! (-> s3-1 timeout) (seconds 4)) + (set! (-> s3-1 pos quad) (-> s5-0 start-pos quad)) + (vector-normalize-copy! (-> s3-1 vel) (-> s5-0 move-dist) 4096000.0) + (spawn-projectile sew-laser-shot s3-1 arg2 *default-dead-pool*) + ) + (sound-play + "laser-hit-jak" + :position (vector+! (new 'stack-no-clear 'vector) (-> s5-0 start-pos) (-> s5-0 move-dist)) + ) + (vector-normalize! (-> s5-0 move-dist) (+ 2048.0 (vector-length (-> s5-0 move-dist)))) + ) + (else + (when arg2 + (let ((v1-30 arg2)) + (sound-play + "laser-sizzle" + :id (-> v1-30 sound-scorch) + :position (vector+! (new 'stack-no-clear 'vector) (-> s5-0 start-pos) (-> s5-0 move-dist)) + ) + ) + ) + ) + ) + (set! (-> *part-id-table* 4935 init-specs 4 initial-valuef) (vector-length (-> s5-0 move-dist))) + (draw-beam (-> *part-id-table* 4935) arg0 (-> s5-0 move-dist) #f) + (launch-particles (-> *part-id-table* 4936) arg0) + (launch-particles (-> *part-id-table* 4937) arg0) + (launch-particles (-> *part-id-table* 4938) (vector+! (new 'stack-no-clear 'vector) (-> s5-0 move-dist) arg0)) + (launch-particles (-> *part-id-table* 4939) (vector+! (new 'stack-no-clear 'vector) (-> s5-0 move-dist) arg0)) + ) + (none) + ) + +(defmethod sew-laser-guard-method-155 ((this sew-laser-guard)) + (let ((s5-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 5)))) + (new 'stack-no-clear 'vector) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-z-quaternion! s4-0 (-> this root quat)) + (vector-normalize! s4-0 1.0) + (fire-laser! s5-0 s4-0 this 491520.0) + ) + ) + (none) + ) + +(defstate hostile (sew-laser-guard) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (if (= proc *target*) + (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)) + ) + ) + ) + ) + ) + ) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type enemy hostile) exit))) + (if t9-0 + (t9-0) + ) + ) + (ja :group! sew-laser-guard-idle-ja) + ) + :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 + (let ((f30-0 (get-norm! (-> self sync-orient) 0))) + (cond + ((-> self last-play-sweep-dir-positive?) + (when (and (< (- f30-0 (-> self last-play-sweep-sync)) 0.0) (< 0.8 f30-0)) + (sound-play "laser-sweep") + (set! (-> self last-play-sweep-dir-positive?) #f) + ) + ) + (else + (when (and (< 0.0 (- f30-0 (-> self last-play-sweep-sync))) (< f30-0 0.2)) + (sound-play "laser-sweep") + (set! (-> self last-play-sweep-dir-positive?) #t) + ) + ) + ) + (quaternion-slerp! (-> self root quat) (-> self start-orient) (-> self end-orient) f30-0) + (quaternion-normalize! (-> self root quat)) + (set! (-> self last-play-sweep-sync) f30-0) + ) + (sound-play "laser-guard" :id (-> self sound-hum)) + (let ((t9-8 (method-of-object self sew-laser-guard-method-155)) + (a0-9 self) + ) + #t + (t9-8 a0-9) + ) + (suspend) + ) + #f + ) + ) + +(defstate stare (sew-laser-guard) + :virtual #t + :trans (behavior () + (go-hostile self) + ) + :code sleep-code + ) + +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this sew-laser-guard)) + (the-as search-info-flag 1) + ) + +(defmethod event-handler ((this sew-laser-guard) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('start) + #f + ) + (('attack) + #f + ) + (('touched 'touch) + #f + ) + (('stop) + #f + ) + (('bonk) + (when (= (-> arg0 type) target) + (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 + ) + (else + ((method-of-type enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defstate die (sew-laser-guard) + :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) + ) + :code (behavior () + (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock)) + (sound-play "turret-explode") + (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-guard)) + (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-sphere s5-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 no-standon)) + (set! (-> v1-6 transform-index) 3) + (set-vector! (-> v1-6 local-sphere) 0.0 3686.4 0.0 7372.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) + ) + +(defmethod deactivate ((this sew-laser-guard)) + "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)) + ) + ((method-of-type enemy deactivate) this) + (none) + ) + +(defmethod coin-flip? ((this sew-laser-guard)) + #f + ) + +;; WARN: Return type mismatch enemy vs sew-laser-guard. +(defmethod relocate ((this sew-laser-guard) (offset int)) + (the-as sew-laser-guard ((method-of-type enemy relocate) this offset)) + ) + +(defmethod sew-laser-guard-method-156 ((this sew-laser-guard)) + 0 + (none) + ) + +(defmethod init-enemy! ((this sew-laser-guard)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-sew-laser-guard" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *sew-laser-guard-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* 1505) this)) + (let ((f30-0 (res-lump-float (-> this entity) 'rotoffset)) + (f28-0 (res-lump-float (-> this entity) 'rotmax :default 8192.0)) + (f26-0 (res-lump-float (-> this entity) 'rotmin :default -8192.0)) + (s5-1 (new 'stack-no-clear 'sync-info-params)) + ) + (if (!= f30-0 0.0) + (quaternion-rotate-y! (-> this root quat) (-> this root quat) f30-0) + ) + (quaternion-rotate-y! (-> this start-orient) (-> this root quat) f26-0) + (quaternion-rotate-y! (-> this end-orient) (-> this start-orient) (- f28-0 f26-0)) + (let ((v1-20 0)) + (if #t + (set! v1-20 (logior v1-20 1)) + ) + (set! (-> s5-1 sync-type) 'sync-linear) + (set! (-> s5-1 sync-flags) (the-as sync-flags v1-20)) + ) + (set! (-> s5-1 entity) (-> this entity)) + (set! (-> s5-1 period) (the-as uint 1200)) + (set! (-> s5-1 percent) 0.0) + (initialize! (-> this sync-orient) s5-1) + ) + (set! (-> this last-play-sweep-dir-positive?) #t) + (set! (-> this last-play-sweep-sync) (get-norm! (-> this sync-orient) 0)) + (set! (-> this sound-hum) (new-sound-id)) + (set! (-> this sound-scorch) (new-sound-id)) + (logclear! (-> this mask) (process-mask enemy)) + 0 + (none) + ) + +(defmethod go-idle2 ((this sew-laser-guard)) + (go (method-of-object this hostile)) + ) + +(defmethod damage-enemy! ((this sew-laser-guard) (arg0 object) (arg1 event-message-block)) + (send-event + (the-as process-tree 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)) + ) + ) + ) + 0.0 + ) + +(defstate hit (sew-laser-guard) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (go-hostile self) + ) + :code sleep-code + ) diff --git a/goal_src/jak3/levels/sewer/sew-platforms.gc b/goal_src/jak3/levels/sewer/sew-platforms.gc index ea3064cd91..9873ec4afd 100644 --- a/goal_src/jak3/levels/sewer/sew-platforms.gc +++ b/goal_src/jak3/levels/sewer/sew-platforms.gc @@ -7,3 +7,828 @@ ;; DECOMP BEGINS +(deftype sew-plat-updown (base-plat) + ((sync sync-eased :inline) + (path-pos float) + ) + (:state-methods + idle + active + ) + (:methods + (get-skel (_type_) art-group) + ) + ) + + +(defstate idle (sew-plat-updown) + :virtual #t + :event (the-as (function process int symbol event-message-block object) eco-door-event-handler) + :code sleep-code + :post ja-post + ) + +(defstate active (sew-plat-updown) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (plat-event proc argc message block) + ) + :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) + (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 + ) + +(defmethod base-plat-method-34 ((this sew-plat-updown)) + 0 + (none) + ) + +(defmethod init-from-entity! ((this sew-plat-updown) (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)) + (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) + (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)) + (set! (-> this fact) + (new 'process 'fact-info this (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc)) + ) + (let ((a1-6 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-24 0)) + (if (not (logtest? (-> this fact options) (actor-option loop))) + (set! v1-24 (logior v1-24 1)) + ) + (set! (-> a1-6 sync-type) 'sync-eased) + (set! (-> a1-6 sync-flags) (the-as sync-flags v1-24)) + ) + (set! (-> a1-6 period) (the-as uint 1800)) + (set! (-> a1-6 entity) arg0) + (set! (-> a1-6 percent) 0.0) + (set! (-> a1-6 ease-in) 0.15) + (set! (-> a1-6 ease-out) 0.15) + (set! (-> a1-6 pause-in) 0.2) + (set! (-> a1-6 pause-out) 0.0) + (initialize! (-> this sync) a1-6) + ) + (base-plat-method-34 this) + (cond + ((logtest? (-> this path flags) (path-control-flag not-found)) + (go (method-of-object this idle)) + ) + ((> (-> this sync period) 0) + (go (method-of-object this active)) + ) + (else + (go (method-of-object this idle)) + ) + ) + ) + +(defskelgroup skel-sew-slide-step sew-slide-step sew-slide-step-lod0-jg sew-slide-step-idle-ja + ((sew-slide-step-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 9) + ) + +(deftype sew-slide-step (sew-plat-updown) + ((last-played-start? symbol) + ) + ) + + +(defmethod get-skel ((this sew-slide-step)) + (art-group-get-by-name *level* "skel-sew-slide-step" (the-as (pointer level) #f)) + ) + +(defstate active (sew-slide-step) + :virtual #t + :enter (behavior () + (set! (-> self last-played-start?) #f) + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + (cond + ((and (-> self last-played-start?) (< 0.9 (-> self path-pos))) + (sound-play "moving-step-out") + (set! (-> self last-played-start?) #f) + ) + ((and (not (-> self last-played-start?)) (< (-> self path-pos) 0.1)) + (set! (-> self last-played-start?) #t) + (sound-play "moving-step-in") + ) + ) + ) + ) + +(defmethod init-collision! ((this sew-slide-step)) + (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 player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> s4-0 transform-index) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 32768.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-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) + ) + +(defskelgroup skel-sew-moving-step-a sew-moving-step-a sew-moving-step-a-lod0-jg sew-moving-step-a-idle-ja + ((sew-moving-step-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6 0 4) + ) + +(deftype sew-moving-step-a (sew-plat-updown) + ((last-played-start? symbol) + (last-val float) + ) + ) + + +;; WARN: Return type mismatch sparticle-launch-control vs none. +(defmethod base-plat-method-34 ((this sew-moving-step-a)) + (call-parent-method this) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1496) this)) + (none) + ) + +(defmethod update-part-and-sfx! ((this sew-moving-step-a)) + 0 + (none) + ) + +(defstate active (sew-moving-step-a) + :virtual #t + :enter (behavior () + (set! (-> self last-played-start?) #f) + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (set! (-> self last-val) -1.0) + ) + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + (when (< (-> self path-pos) 0.5) + (new 'stack-no-clear 'vector) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (let ((s5-0 (new 'stack-no-clear 'quaternion))) + (quaternion-copy! s5-0 (-> self entity quat)) + (quaternion->matrix gp-0 s5-0) + ) + (set! (-> gp-0 trans quad) (-> self entity extra trans quad)) + (+! (-> gp-0 trans y) 20480.0) + (spawn-from-mat (-> self part) gp-0) + ) + ) + (if (and (< 0.65 (-> self last-val)) (>= 0.65 (-> self path-pos))) + (sound-play "mv-stp-a-splash") + ) + (if (and (< (-> self last-val) 0.95) (>= (-> self path-pos) 0.95)) + (sound-play "move-step-a-hit") + ) + (set! (-> self last-val) (-> self path-pos)) + ) + ) + +(defmethod get-skel ((this sew-moving-step-a)) + (art-group-get-by-name *level* "skel-sew-moving-step-a" (the-as (pointer level) #f)) + ) + +(defmethod init-collision! ((this sew-moving-step-a)) + (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 player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable pull-rider-can-collide)) + (set! (-> s4-0 transform-index) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 24576.0 0.0 16384.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-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) + ) + +(deftype sew-moving-step-b (process-drawable) + ((sync sync-linear :inline) + (num-steps int8) + (step-delay time-frame) + (start-step-pos vector :inline) + (end-step-pos vector :inline) + (last-sync-val float) + (sound-idle sound-id) + ) + (:state-methods + idle + active + ) + (:methods + (sew-moving-step-b-method-22 (_type_ float) int) + (sew-moving-step-b-method-23 (_type_) float) + (sew-moving-step-b-method-24 (_type_) int) + (alloc-trsqv! (_type_) none) + (sew-moving-step-b-method-26 (_type_ int float) float) + ) + ) + + +(defmethod alloc-trsqv! ((this sew-moving-step-b)) + (set! (-> this root) (new 'process 'trsqv)) + 0 + (none) + ) + +(defmethod init-from-entity! ((this sew-moving-step-b) (arg0 entity-actor)) + (alloc-trsqv! this) + (process-drawable-from-entity! this arg0) + (set! (-> this sound-idle) (new-sound-id)) + (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)) + (let ((a1-3 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-6 0)) + (if #f + (set! v1-6 (logior v1-6 1)) + ) + (set! (-> a1-3 sync-type) 'sync-linear) + (set! (-> a1-3 sync-flags) (the-as sync-flags v1-6)) + ) + (set! (-> a1-3 entity) arg0) + (set! (-> a1-3 period) (the-as uint 4800)) + (set! (-> a1-3 percent) 0.0) + (initialize! (-> this sync) a1-3) + ) + (set! (-> this num-steps) + (res-lump-value (-> this entity) 'sesc-num-steps int :default (the-as uint128 4) :time -1000000000.0) + ) + (set! (-> this step-delay) + (the-as time-frame (the int (* 300.0 (res-lump-float (-> this entity) 'sesc-step-delay :default 4.0)))) + ) + (set! (-> this num-steps) (min (-> this num-steps) (sew-moving-step-b-method-24 this))) + (set! (-> this last-sync-val) (- 1.0 (* 0.5 (sew-moving-step-b-method-23 this)))) + (cond + ((logtest? (-> this path flags) (path-control-flag not-found)) + (go (method-of-object this idle)) + ) + ((> (-> this sync period) 0) + (let ((s4-0 (get-point-at-percent-along-path! (-> this path) (new 'stack-no-clear 'vector) 0.0 'interp)) + (s5-3 (get-point-at-percent-along-path! (-> this path) (new 'stack-no-clear 'vector) 1.0 'interp)) + ) + (let ((s3-1 (vector-! (new 'stack-no-clear 'vector) s5-3 s4-0))) + (set! (-> s3-1 y) 0.0) + (vector-normalize! s3-1 16384.0) + (vector-! s4-0 s4-0 s3-1) + (vector-! s5-3 s5-3 s3-1) + ) + (set! (-> this start-step-pos quad) (-> s4-0 quad)) + (set! (-> this end-step-pos quad) (-> s5-3 quad)) + ) + (go (method-of-object this active)) + ) + (else + (go (method-of-object this idle)) + ) + ) + ) + +(defstate idle (sew-moving-step-b) + :virtual #t + :code sleep-code + :post ja-post + ) + +(defmethod sew-moving-step-b-method-24 ((this sew-moving-step-b)) + (the int (/ (the float (-> this sync period)) (the float (-> this step-delay)))) + ) + +(defmethod sew-moving-step-b-method-23 ((this sew-moving-step-b)) + (/ (the float (-> this step-delay)) (the float (-> this sync period))) + ) + +(defmethod sew-moving-step-b-method-22 ((this sew-moving-step-b) (arg0 float)) + (the int (/ arg0 (sew-moving-step-b-method-23 this))) + ) + +(defmethod sew-moving-step-b-method-26 ((this sew-moving-step-b) (arg0 int) (arg1 float)) + (let ((f30-1 (- arg1 (* (the float arg0) (sew-moving-step-b-method-23 this))))) + (if (< f30-1 0.0) + (+! f30-1 (* (the float (-> this num-steps)) (sew-moving-step-b-method-23 this))) + ) + f30-1 + ) + ) + +(deftype sew-moving-step-b-step (base-plat) + ((start-pos vector :inline) + (end-pos vector :inline) + (start-path-pos vector :inline) + (end-path-pos vector :inline) + (sync sync-linear :inline) + (path-pos float) + (last-t-val float) + ) + (:state-methods + active + die + ) + ) + + +(deftype sew-moving-step-b-step-param (structure) + ((start-pos vector :inline) + (end-pos vector :inline) + (ent entity-actor) + (period time-frame) + (offset float) + ) + ) + + +(defskelgroup skel-sew-moving-step-b sew-moving-step-b sew-moving-step-b-lod0-jg sew-moving-step-b-idle-ja + ((sew-moving-step-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + ) + +(defbehavior sew-moving-step-b-step-init-by-other sew-moving-step-b-step ((arg0 sew-moving-step-b-step-param)) + (process-entity-set! self (-> arg0 ent)) + (init-collision! self) + (set! (-> self root trans quad) (-> arg0 start-pos quad)) + (set! (-> self start-pos quad) (-> arg0 start-pos quad)) + (set! (-> self end-pos quad) (-> arg0 end-pos quad)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-sew-moving-step-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (quaternion-rotate-y! (-> self root quat) (-> self root quat) 16384.0) + (set! (-> self path) (new 'process 'path-control self 'path 0.0 (-> arg0 ent) #f)) + (get-point-at-percent-along-path! (-> self path) (-> self start-path-pos) 0.0 'interp) + (get-point-at-percent-along-path! (-> self path) (-> self end-path-pos) 1.0 'interp) + (let ((a1-7 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-16 0)) + (if #f + (set! v1-16 (logior v1-16 1)) + ) + (set! (-> a1-7 sync-type) 'sync-linear) + (set! (-> a1-7 sync-flags) (the-as sync-flags v1-16)) + ) + (set! (-> a1-7 entity) #f) + (set! (-> a1-7 period) (the-as uint (-> arg0 period))) + (set! (-> a1-7 percent) 0.0) + (initialize! (-> self sync) a1-7) + ) + (sync-now! (-> self sync) (-> arg0 offset)) + (set! (-> self last-t-val) -1.0) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1497) self)) + (go-virtual active) + ) + +(defun fmod ((arg0 float) (arg1 float)) + (- arg0 (* (the float (the int (/ arg0 arg1))) arg1)) + ) + +;; WARN: Return type mismatch process vs sew-moving-step-b-step. +(defun spawn-moving-step-b-step ((arg0 sew-moving-step-b) (arg1 float)) + (let ((gp-0 (new 'stack-no-clear 'sew-moving-step-b-step-param))) + (set! (-> gp-0 start-pos quad) (-> arg0 start-step-pos quad)) + (set! (-> gp-0 end-pos quad) (-> arg0 end-step-pos quad)) + (set! (-> gp-0 ent) (-> arg0 entity)) + (set! (-> gp-0 period) (the-as time-frame (-> arg0 sync period))) + (set! (-> gp-0 offset) arg1) + (let ((s5-0 (the-as process #f))) + (let ((v1-5 (process-spawn sew-moving-step-b-step gp-0 :name "sew-moving-step-b-step"))) + (if v1-5 + (set! s5-0 (-> v1-5 0)) + ) + ) + (the-as sew-moving-step-b-step s5-0) + ) + ) + ) + +(defmethod deactivate ((this sew-moving-step-b)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this sound-idle)) + (sound-stop (-> this sound-idle)) + ) + (call-parent-method this) + (none) + ) + +(defstate active (sew-moving-step-b) + :virtual #t + :enter (behavior () + '() + ) + :trans (behavior () + (sound-play "move-step-b-lp" :id (-> self sound-idle)) + (let ((f30-0 (get-norm! (-> self sync) 0))) + (let* ((s5-0 (sew-moving-step-b-method-22 self (-> self last-sync-val))) + (gp-0 (- (sew-moving-step-b-method-22 self f30-0) s5-0)) + (f28-1 (fmod f30-0 (* (the float (-> self num-steps)) (sew-moving-step-b-method-23 self)))) + ) + (if (< gp-0 0) + (+! gp-0 (sew-moving-step-b-method-24 self)) + ) + (dotimes (s4-1 gp-0) + (set! s5-0 (mod (+ s5-0 1) (sew-moving-step-b-method-24 self))) + (if (< s5-0 (-> self num-steps)) + (spawn-moving-step-b-step self (sew-moving-step-b-method-26 self s5-0 f28-1)) + ) + ) + ) + (set! (-> self last-sync-val) f30-0) + ) + ) + :code sleep-code + ) + +(defmethod init-collision! ((this sew-moving-step-b-step)) + (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 player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> s4-0 transform-index) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 61440.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-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 update-part-and-sfx! ((this sew-moving-step-b-step)) + 0 + (none) + ) + +(defstate die (sew-moving-step-b-step) + :virtual #t + :event (the-as (function process int symbol event-message-block object) eco-door-event-handler) + :code (behavior () + '() + ) + ) + +(defstate active (sew-moving-step-b-step) + :virtual #t + :event plat-event + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (the-as time-frame (-> self sync period))) + (go-virtual die) + ) + (let ((f30-0 (get-norm! (-> self sync) 0))) + (if (< f30-0 (-> self last-t-val)) + (go-virtual die) + ) + (if (and (< (-> self last-t-val) 0.5) (>= f30-0 0.5)) + (sound-play "move-step-b-hit") + ) + (set! (-> self last-t-val) f30-0) + (cond + ((< f30-0 0.2) + (let ((f0-5 (* 5.0 f30-0))) + (vector-lerp! (-> self basetrans) (-> self start-pos) (-> self start-path-pos) f0-5) + ) + (spawn (-> self part) (-> self start-path-pos)) + ) + ((< 0.8 f30-0) + (let ((f0-8 (* 5.0 (+ -0.8 f30-0)))) + (vector-lerp! (-> self basetrans) (-> self end-path-pos) (-> self end-pos) f0-8) + ) + ) + (else + (let ((f28-0 (* 1.6666666 (+ -0.2 f30-0)))) + (set! (-> self path-pos) f28-0) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) (-> self path-pos) 'interp) + (let ((f0-12 (fmax 0.25 (fmin 1.0 (* 2.0 (- 1.0 f28-0)))))) + (set-vector! (-> self draw color-mult) f0-12 f0-12 f0-12 1.0) + ) + ) + (if (< f30-0 0.48) + (spawn (-> self part) (-> self basetrans)) + ) + ) + ) + ) + (plat-trans) + ) + :code (behavior () + (until #f + (suspend) + ) + #f + ) + :post plat-post + ) + +(defskelgroup skel-sew-rove-plat sew-rove-plat sew-rove-plat-lod0-jg sew-rove-plat-idle-ja + ((sew-rove-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6.5) + ) + +(deftype sew-rove-plat (sew-plat-updown) + ((sound-id sound-id) + ) + ) + + +(defmethod get-skel ((this sew-rove-plat)) + (art-group-get-by-name *level* "skel-sew-rove-plat" (the-as (pointer level) #f)) + ) + +(defmethod run-logic? ((this sew-rove-plat)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +(defmethod deactivate ((this sew-rove-plat)) + "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-collision! ((this sew-rove-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 pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) -15.5648 -3650.3552 0.8192 29212.262) + (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 sound-id) (new-sound-id)) + 0 + (none) + ) + +(defstate active (sew-rove-plat) + :virtual #t + :trans (behavior () + (sound-play "rove-plat-loop" :id (-> self sound-id)) + (set! (-> self path-pos) (get-norm! (-> self sync) 0)) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) (-> self path-pos) 'interp) + (plat-trans) + ) + ) + +(defskelgroup skel-sew-move-plat sew-move-plat sew-move-plat-lod0-jg sew-move-plat-idle-ja + ((sew-move-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +(deftype sew-move-plat (base-plat) + ((sound-id sound-id) + (positions vector 2 :inline) + (current-pos-index int8) + (dest-pos-index int8) + (speed float) + ) + (:state-methods + waiting + active + ) + (:methods + (sew-move-plat-method-37 (_type_) int) + ) + ) + + +(defstate waiting (sew-move-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('bonk) + (go-virtual active) + ) + ) + (plat-event proc argc message block) + ) + :enter (behavior () + (set! (-> self basetrans quad) (-> self positions (-> self current-pos-index) quad)) + ) + :trans (behavior () + (plat-trans) + (if (> (-> self root num-riders) 0) + (go-virtual active) + ) + ) + :code sleep-code + :post (behavior () + (plat-post) + ) + ) + +(defmethod sew-move-plat-method-37 ((this sew-move-plat)) + (let ((f30-0 (vector-vector-xz-distance-squared (target-pos 0) (the-as vector (-> this positions))))) + (logand (+ (-> this dest-pos-index) 1) 1) + (if (< f30-0 (vector-vector-xz-distance-squared (target-pos 0) (-> this positions 1))) + 0 + 1 + ) + ) + ) + +(defstate active (sew-move-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('foo) + (format 0 "FOo~%") + ) + ) + ) + :enter (behavior () + (set! (-> self dest-pos-index) (logand (+ (-> self current-pos-index) 1) 1)) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (sound-play "move-plat-loop" :id (-> self sound-id)) + (when (time-elapsed? (-> self state-time) (seconds 2)) + (if (>= (vector-vector-xz-distance (-> self basetrans) (target-pos 0)) 40960.0) + (set! (-> self dest-pos-index) (sew-move-plat-method-37 self)) + ) + (set-time! (-> self state-time)) + ) + (let ((gp-2 + (vector-! (new 'stack-no-clear 'vector) (-> self positions (-> self dest-pos-index)) (-> self basetrans)) + ) + ) + 0.0 + (let ((f0-2 (vector-normalize-ret-len! gp-2 1.0)) + (f1-2 (* 20480.0 (seconds-per-frame))) + ) + (cond + ((< f0-2 f1-2) + (set! (-> self current-pos-index) (-> self dest-pos-index)) + (sound-stop (-> self sound-id)) + (sound-play "move-plat-hit") + (go-virtual waiting) + ) + (else + (vector+float*! (-> self basetrans) (-> self basetrans) gp-2 f1-2) + (set! (-> self root trans quad) (-> self basetrans quad)) + ) + ) + ) + ) + (plat-trans) + ) + :code sleep-code + :post plat-post + ) + +(defmethod init-collision! ((this sew-move-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 pusher)) + (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) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 24576.0 0.0 32768.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-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) + ) + (set! (-> this sound-id) (new-sound-id)) + 0 + (none) + ) + +(defmethod init-from-entity! ((this sew-move-plat) (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-move-plat" (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) + (set! (-> this current-pos-index) 0) + (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)) + (get-point-at-percent-along-path! (-> this path) (the-as vector (-> this positions)) 0.0 'interp) + (get-point-at-percent-along-path! (-> this path) (-> this positions 1) 1.0 'interp) + (set! (-> this basetrans quad) (-> this root trans quad)) + (set! (-> this current-pos-index) (sew-move-plat-method-37 this)) + (logclear! (-> this mask) (process-mask actor-pause)) + (go (method-of-object this waiting)) + ) + +(defmethod deactivate ((this sew-move-plat)) + "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) + ) + +(defmethod run-logic? ((this sew-move-plat)) + "Should this process be run? Checked by execute-process-tree." + #t + ) diff --git a/goal_src/jak3/levels/sewer/sew-whirlpool.gc b/goal_src/jak3/levels/sewer/sew-whirlpool.gc index cb57e88cc8..74c9e15315 100644 --- a/goal_src/jak3/levels/sewer/sew-whirlpool.gc +++ b/goal_src/jak3/levels/sewer/sew-whirlpool.gc @@ -7,3 +7,102 @@ ;; DECOMP BEGINS +(deftype sew-whirlpool (process-drawable) + ((spool-sound-id sound-id) + ) + (:state-methods + idle + ) + ) + + +(defstate idle (sew-whirlpool) + :virtual #t + :trans (behavior () + (when (and *target* + (or (logtest? (water-flag touch-water) (-> *target* water flags)) + (logtest? (-> *target* control status) (collide-status on-water)) + ) + (not (logtest? (-> *target* focus-status) (focus-status grabbed))) + ) + (let* ((gp-0 (target-pos 0)) + (f30-0 (vector-vector-xz-distance (-> self root trans) gp-0)) + ) + (when (< f30-0 61440.0) + (let* ((f26-0 (* 0.000016276043 (- 61440.0 f30-0))) + (f24-0 98304.0) + (f0-6 (atan (- (-> gp-0 x) (-> self root trans x)) (- (-> gp-0 z) (-> self root trans z)))) + (f28-0 (* 0.5 f26-0 f24-0 (seconds-per-frame))) + (f22-0 (+ f0-6 f28-0)) + (f26-1 (- f30-0 (fmin f30-0 (* 0.16874999 f26-0 (fabs f24-0) (seconds-per-frame))))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set-vector! s5-0 (* (sin f22-0) f26-1) 0.0 (* (cos f22-0) f26-1) 1.0) + (vector+! s5-0 s5-0 (-> self root trans)) + (set! (-> s5-0 x) (* (- (-> s5-0 x) (-> gp-0 x)) (-> self clock frames-per-second))) + (set! (-> s5-0 y) 0.0) + (set! (-> s5-0 z) (* (- (-> s5-0 z) (-> gp-0 z)) (-> self clock frames-per-second))) + (let ((gp-1 (-> *target* control))) + (let ((s4-1 (new 'stack-no-clear 'collide-query))) + (send-event (-> gp-1 process) 'rotate-y-angle f28-0) + (set! (-> s4-1 collide-with) (-> gp-1 root-prim prim-core collide-with)) + (set! (-> s4-1 ignore-process0) self) + (set! (-> s4-1 ignore-process1) #f) + (set! (-> s4-1 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> s4-1 action-mask) (collide-action solid)) + (fill-cache-for-shape gp-1 8192.0 s4-1) + ) + (let ((s4-2 (-> gp-1 status))) + (integrate-and-collide! gp-1 s5-0) + (set! (-> gp-1 status) s4-2) + ) + ) + ) + (when (and (< f30-0 4096.0) (not (logtest? (-> *target* focus-status) (focus-status dead)))) + (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) + ) + (sound-params-set! *gui-control* (-> self spool-sound-id) #f -1 -1 -1 0.5) + (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 'drown-death) + ) + ) + ) + ) + ) + ) + ) + ) + :code sleep-code + ) + +(defmethod deactivate ((this sew-whirlpool)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + ((method-of-type process-drawable deactivate) this) + (none) + ) + +(defmethod init-from-entity! ((this sew-whirlpool) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (set! (-> this spool-sound-id) + (add-process *gui-control* this (gui-channel gun) (gui-action queue) "whrlpool" -99.0 0) + ) + (go (method-of-object this idle)) + ) diff --git a/goal_src/jak3/levels/sewer/sewer-frog.gc b/goal_src/jak3/levels/sewer/sewer-frog.gc index f0f55c5345..92f6ca6764 100644 --- a/goal_src/jak3/levels/sewer/sewer-frog.gc +++ b/goal_src/jak3/levels/sewer/sewer-frog.gc @@ -7,3 +7,1110 @@ ;; DECOMP BEGINS +(defskelgroup skel-sewer-frog sewer-frog sewer-frog-lod0-jg -1 + ((sewer-frog-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :shadow sewer-frog-shadow-mg + :origin-joint-index 19 + ) + +(deftype sewer-frog (nav-enemy) + ((scared-timer time-frame) + ) + (:state-methods + attack + turn-to-face-focus + ) + (:methods + (sewer-frog-method-192 (_type_) none) + ) + ) + + +(define *fact-info-sewer-frog-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9) + ) + +(define *sewer-frog-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 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 9 + :hostile-anim 5 + :hit-anim 17 + :knocked-anim 17 + :knocked-land-anim 3 + :die-anim 17 + :die-falling-anim 17 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 13 + :look-at-joint 14 + :bullseye-joint 4 + :sound-hit (static-sound-name "frog-hit") + :sound-die (static-sound-name "frog-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 + 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 (new 'static 'ragdoll-setup + :orient-tform (new 'static 'vector :x 0.0676 :y -0.6016 :z 0.7959 :w 30666.041) + :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 + :pre-tform (new 'static 'vector :x 0.1444 :z 0.9894 :w 28642.4) + :geo-tform (new 'static 'vector :x 0.0925 :y -0.3416 :z 0.9349 :w 31829.453) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 1984.512 + :hit-sound (static-sound-name "frog-bf") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9735 :z -0.2274 :w 40103.246) + :geo-tform (new 'static 'vector :x 0.6954 :y -0.5427 :z 0.4701 :w 20942.34) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 2285.9775 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9656 :z -0.2587 :w 9536.927) + :geo-tform (new 'static 'vector :x 0.1274 :y -0.3552 :z 0.9257 :w 31935.02) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 2165.5552 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9743 :z -0.2249 :w 4085.8784) + :geo-tform (new 'static 'vector :x 0.1327 :y -0.1756 :z 0.9751 :w 32268.125) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 1615.4624 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5322 :z 0.8462 :w 9507.29) + :geo-tform (new 'static 'vector :x 0.2871 :y 0.8561 :z 0.4289 :w 28150.988) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 806.5024 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9435 :z -0.3305 :w 10984.38) + :geo-tform (new 'static 'vector :x -0.1293 :y 0.9912 :z -0.0126 :w 27502.092) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 318.6688 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint 13 + :pre-tform (new 'static 'vector :x -0.9599 :z 0.2795 :w 8485.092) + :geo-tform (new 'static 'vector :x 0.0847 :y 0.7561 :z 0.6485 :w 34826.777) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 1267.3024 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.2587 :z 0.9657 :w 16383.618) + :geo-tform (new 'static 'vector :x -0.0125 :y -0.0002 :z 0.9998 :w 15964.989) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 806.5024 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9998 :z -0.0125 :w 16512.342) + :geo-tform (new 'static 'vector :x -0.4189 :y -0.8113 :z -0.4067 :w 18265.03) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 806.5024 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.0273 :z -0.9994 :w 9645.098) + :geo-tform (new 'static 'vector :x 0.3147 :y -0.9196 :z 0.2348 :w 17491.832) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 1064.96 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.0536 :z -0.9983 :w 10284.383) + :geo-tform (new 'static 'vector :y 1.0 :w 16905.375) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 363.3152 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.2587 :z -0.9657 :w 16384.346) + :geo-tform (new 'static 'vector :x -0.3909 :y 0.397 :z -0.8299 :w 18671.133) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 806.5024 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7246 :z 0.6887 :w 16217.065) + :geo-tform (new 'static 'vector :x -0.1156 :y 0.9519 :z 0.2825 :w 24950.34) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 806.5024 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7086 :z 0.7052 :w 5922.1064) + :geo-tform (new 'static 'vector :x -0.3934 :y 0.2208 :z 0.8921 :w 31601.842) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 1087.488 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.66 :z 0.7508 :w 11664.098) + :geo-tform (new 'static 'vector :y -1.0 :w 8004.1665) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 452.608 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 0.9763 :z -0.2153 :w 10854.364) + :geo-tform (new 'static 'vector :x -0.0517 :y 0.8422 :z -0.536 :w 34465.51) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 1393.4592 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9814 :z -0.1916 :w 12053.145) + :geo-tform (new 'static 'vector :x 0.0117 :y 0.992 :z 0.1236 :w 34765.535) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 1039.9744 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.2473 :z 0.9686 :w 14074.312) + :geo-tform (new 'static 'vector :x 0.4625 :y 0.8439 :z 0.2713 :w 24201.445) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 806.5024 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8453 :z -0.5342 :w 10724.566) + :geo-tform (new 'static 'vector :x -0.4236 :y -0.3812 :z 0.8213 :w 36821.477) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 806.5024 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5795 :z 0.8146 :w 41836.6) + :geo-tform (new 'static 'vector :x -0.3352 :y 0.2062 :z 0.9189 :w 30666.19) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 1061.6832 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6926 :z 0.721 :w 27957.91) + :geo-tform (new 'static 'vector :x -0.148 :y 0.9414 :z 0.302 :w 23747.88) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 562.7904 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint 19 + :pre-tform (new 'static 'vector :x -0.1352 :z -0.9905 :w 14070.961) + :geo-tform (new 'static 'vector :x 0.304 :y -0.8482 :z -0.4328 :w 20045.35) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 806.5024 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9968 :z -0.0763 :w 9360.489) + :geo-tform (new 'static 'vector :x 0.5934 :y -0.3585 :z 0.7204 :w 26778.32) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 806.5024 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1915 :z 0.9814 :w 23136.174) + :geo-tform (new 'static 'vector :x 0.4151 :y 0.3163 :z 0.8526 :w 36129.96) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 1043.2512 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5995 :z 0.8 :w 40254.598) + :geo-tform (new 'static 'vector :x 0.1548 :y 0.9404 :z 0.3018 :w 42156.035) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 652.0832 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint 14 + :pre-tform (new 'static 'vector :x 0.0201 :z -0.9995 :w 9496.604) + :geo-tform (new 'static 'vector :x 0.4419 :y -0.494 :z 0.7483 :w 35945.93) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 547.6352 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9733 :z -0.2282 :w 11187.232) + :geo-tform (new 'static 'vector :x 0.5046 :y 0.0354 :z 0.8622 :w 30183.021) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 349.3888 + :hit-sound (static-sound-name "frog-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 7 + :turn-anim -1 + :run-anim 5 + :taunt-anim 3 + :run-travel-speed (meters 11.6667) + :run-acceleration (meters 6) + :run-turning-acceleration (meters 0.5) + :walk-travel-speed (meters 5) + :walk-acceleration (meters 6) + :walk-turning-acceleration (meters 0.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! (-> *sewer-frog-nav-enemy-info* fact-defaults) *fact-info-sewer-frog-defaults*) + +(defmethod init-enemy-collision! ((this sewer-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 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 pusher) + ) + (set! (-> s4-0 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 4915.2 0.0 10240.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 obstacle hit-by-others-list player-list pusher) + ) + (set! (-> v1-13 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-13 transform-index) 4) + (set-vector! (-> v1-13 local-sphere) 0.0 0.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 obstacle hit-by-others-list player-list pusher) + ) + (set! (-> v1-15 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-15 transform-index) 18) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 1228.8) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> v1-17 transform-index) 14) + (set-vector! (-> v1-17 local-sphere) 0.0 409.6 1228.8 4096.0) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (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 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defbehavior sewer-frog-hop sewer-frog () + (let ((a1-0 (-> self nav state)) + (a0-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-0 quad) (-> a1-0 target-pos quad)) + (let* ((f0-0 (vector-vector-xz-distance a0-0 (-> self root trans))) + (gp-0 (-> self enemy-info)) + (f30-0 (lerp-scale 0.0 1.0 f0-0 12288.0 28672.0)) + (f28-0 1.0) + ) + (let ((s5-0 (-> self nav))) + (set! (-> s5-0 target-speed) (lerp (-> gp-0 walk-travel-speed) (-> gp-0 run-travel-speed) f30-0)) + ) + 0 + (let ((s5-1 (-> self nav))) + (set! (-> s5-1 acceleration) (lerp (-> gp-0 walk-acceleration) (-> gp-0 run-acceleration) f30-0)) + ) + 0 + (let ((v1-6 (-> self nav))) + (set! (-> v1-6 turning-acceleration) (-> gp-0 run-turning-acceleration)) + ) + 0 + (ja-channel-push! 2 (seconds 0.01)) + (ja-no-eval :group! sewer-frog-hop-small-start-ja :num! (seek! max f28-0) :frame-num 0.0) + (ja-no-eval :chan 1 + :group! sewer-frog-hop0-start-ja + :num! (chan 0) + :frame-interp0 f30-0 + :frame-interp1 f30-0 + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (let ((a0-7 (-> self skel root-channel 0))) + (let ((f0-14 (- 1.0 f30-0))) + (set! (-> a0-7 frame-interp 1) f0-14) + (set! (-> a0-7 frame-interp 0) f0-14) + ) + (set! (-> a0-7 param 0) (the float (+ (-> a0-7 frame-group frames num-frames) -1))) + (set! (-> a0-7 param 1) f28-0) + (joint-control-channel-group-eval! a0-7 (the-as art-joint-anim #f) num-func-seek!) + ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + ) + (nav-enemy-method-178 self) + (ja-no-eval :group! sewer-frog-hop-small-end-ja :num! (seek! max f28-0) :frame-num 0.0) + (ja-no-eval :chan 1 + :group! sewer-frog-hop0-end-ja + :num! (chan 0) + :frame-interp0 f30-0 + :frame-interp1 f30-0 + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (let ((a0-13 (-> self skel root-channel 0))) + (let ((f0-24 (- 1.0 f30-0))) + (set! (-> a0-13 frame-interp 1) f0-24) + (set! (-> a0-13 frame-interp 0) f0-24) + ) + (set! (-> a0-13 param 0) (the float (+ (-> a0-13 frame-group frames num-frames) -1))) + (set! (-> a0-13 param 1) f28-0) + (joint-control-channel-group-eval! a0-13 (the-as art-joint-anim #f) num-func-seek!) + ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + ) + ) + ) + 0 + (none) + ) + +(defbehavior sewer-frog-turn-to-face sewer-frog ((arg0 vector)) + (let ((s2-1 (vector-! (new 'stack-no-clear 'vector) arg0 (-> self root trans))) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (gp-0 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + ) + (vector-normalize-copy! s4-0 s2-1 1.0) + (let* ((f0-1 (vector-dot s4-0 s3-0)) + (f30-0 (vector-dot s4-0 gp-0)) + (gp-1 (the int (+ 0.5 (* 0.00012207031 (acos f0-1))))) + ) + (cond + ((>= (the-as uint gp-1) (the-as uint 3)) + (ja-channel-push! 1 (seconds 0.08)) + (dotimes (s4-1 (+ (shr gp-1 2) 1)) + (cond + ((< 0.0 f30-0) + (ja-no-eval :group! sewer-frog-turn-left-180-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (seek-to-point-toward-point! (-> self root) arg0 49152.0 (seconds 0.02)) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :group! sewer-frog-turn-right-180-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (seek-to-point-toward-point! (-> self root) arg0 49152.0 (seconds 0.02)) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + ) + ((> (the-as uint gp-1) 0) + (ja-channel-push! 1 (seconds 0.1)) + (dotimes (s5-1 (+ gp-1 1)) + (cond + ((< 0.0 f30-0) + (ja-no-eval :group! sewer-frog-turn-left-45-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (quaternion-rotate-y! (-> self root quat) (-> self root quat) (* 20480.0 (seconds-per-frame))) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :group! sewer-frog-turn-right-45-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (quaternion-rotate-y! (-> self root quat) (-> self root quat) (* -20480.0 (seconds-per-frame))) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defstate turn-to-face-focus (sewer-frog) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-182 self) + (nav-enemy-method-184 self) + (set-look-at-mode! self 1) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (sewer-frog-turn-to-face (-> self focus-pos)) + (go-stare self) + ) + :post nav-enemy-simple-post + ) + +(defstate active (sewer-frog) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy active) enter))) + (if t9-0 + (t9-0) + ) + ) + (nav-enemy-method-182 self) + ) + :trans #f + :code (behavior () + (until #f + (when (or (logtest? (-> self nav state flags) (nav-state-flag at-target)) (nav-enemy-method-174 self)) + (nav-enemy-method-164 self) + (nav-enemy-method-173 self) + ) + (let ((t9-3 sewer-frog-turn-to-face) + (a1-0 (-> self nav state)) + (a0-3 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-3 quad) (-> a1-0 target-pos quad)) + (t9-3 a0-3) + ) + ((-> (method-of-type nav-enemy active) trans)) + (nav-enemy-method-181 self) + (sewer-frog-hop) + (nav-enemy-method-182 self) + (let ((gp-0 (the int (* 300.0 (rnd-float-range self 1.0 3.0))))) + (ja-channel-push! 1 (seconds 0.2)) + (let ((s5-0 (current-time)) + (f30-1 1.0) + ) + (ja-no-eval :group! sewer-frog-idle0-ja :num! (loop! f30-1) :frame-num 0.0) + (until (time-elapsed? s5-0 gp-0) + ((-> (method-of-type nav-enemy active) trans)) + (suspend) + (ja :num! (loop! f30-1)) + ) + ) + ) + ) + #f + ) + :post (behavior () + (nav-enemy-travel-post) + ) + ) + +(defstate stare (sewer-frog) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy stare) enter))) + (if t9-0 + (t9-0) + ) + ) + (nav-enemy-method-184 self) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy stare) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (and (time-elapsed? (-> self state-time) (-> self reaction-time)) + (not (enemy-method-104 self (-> self focus-pos) 10012.444)) + ) + (go-virtual turn-to-face-focus) + ) + ) + ) + +(defstate hostile (sewer-frog) + :virtual #t + :enter (behavior () + (logclear! (-> self enemy-flags) (enemy-flag alert)) + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (nav-enemy-method-184 self) + (nav-enemy-method-182 self) + ) + :trans (behavior () + '() + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.12)) + (let ((gp-0 (current-time)) + (s5-0 60) + (f30-0 1.0) + ) + (ja-no-eval :group! sewer-frog-idle0-ja :num! (loop! f30-0) :frame-num 0.0) + (until (time-elapsed? gp-0 s5-0) + (suspend) + (ja :num! (loop! f30-0)) + ) + ) + (sewer-frog-method-192 self) + (until #f + (let ((t9-4 sewer-frog-turn-to-face) + (a1-3 (-> self nav state)) + (a0-4 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-4 quad) (-> a1-3 target-pos quad)) + (t9-4 a0-4) + ) + (sewer-frog-method-192 self) + (nav-enemy-method-181 self) + (sewer-frog-hop) + (nav-enemy-method-182 self) + ) + #f + ) + ) + +(defstate attack (sewer-frog) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-181 self) + (nav-enemy-method-184 self) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((gp-0 (-> self enemy-info))) + (nav-enemy-method-178 self) + (ja-no-eval :group! sewer-frog-attack0-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((v1-26 (-> self nav))) + (set! (-> v1-26 target-speed) 122880.0) + ) + 0 + (let ((v1-28 (-> self nav))) + (set! (-> v1-28 acceleration) (-> gp-0 run-acceleration)) + ) + 0 + (let ((v1-30 (-> self nav))) + (set! (-> v1-30 turning-acceleration) (-> gp-0 run-turning-acceleration)) + ) + ) + 0 + (let* ((a0-6 (-> self root root-prim)) + (v1-34 (-> (the-as collide-shape-prim-group a0-6) child 2)) + ) + (+! (-> a0-6 local-sphere w) 4096.0) + (set! (-> v1-34 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-34 prim-core collide-with) (collide-spec jak bot player-list)) + ) + (logior! (-> self focus-status) (focus-status dangerous)) + (ja-no-eval :group! sewer-frog-attack0-mid-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (if (logtest? (-> self water flags) (water-flag active)) + (spawn-ripples (-> self water) 1.0 (-> self root trans) 1 *null-vector* #f) + ) + (let* ((v1-69 (-> self root root-prim)) + (a0-14 (-> (the-as collide-shape-prim-group v1-69) child 2)) + ) + (+! (-> v1-69 local-sphere w) -4096.0) + (set! (-> a0-14 prim-core collide-as) (collide-spec)) + (set! (-> a0-14 prim-core collide-with) (collide-spec)) + ) + 0 + (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-178 self) + (ja-no-eval :group! sewer-frog-attack0-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set! (-> self scared-timer) (+ (current-time) (the int (* 300.0 (rnd-float-range self 3.8 5.6))))) + (go-best-state self) + ) + :post nav-enemy-chase-post + ) + +;; WARN: Return type mismatch object vs none. +(defbehavior sewer-frog-check-hop sewer-frog () + (let ((a1-0 (new 'stack-no-clear 'vector))) + (set! (-> a1-0 quad) (-> self move-dest quad)) + (set! (-> a1-0 w) (-> self nav-radius-backup)) + (if (add-root-sphere-to-hash! (-> self nav) a1-0 #x100068) + (go-virtual stare) + ) + ) + (none) + ) + +(defstate flee (sewer-frog) + :virtual #t + :trans (behavior () + '() + ) + :code (behavior () + (nav-enemy-method-182 self) + (ja-channel-push! 1 (seconds 0.12)) + (let ((gp-0 (current-time)) + (s5-0 60) + (f30-0 1.0) + ) + (ja-no-eval :group! sewer-frog-idle0-ja :num! (loop! f30-0) :frame-num 0.0) + (until (time-elapsed? gp-0 s5-0) + (suspend) + (ja :num! (loop! f30-0)) + ) + ) + ((-> (method-of-type nav-enemy flee) trans)) + (until #f + (let ((t9-5 sewer-frog-turn-to-face) + (a1-3 (-> self nav state)) + (a0-4 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-4 quad) (-> a1-3 target-pos quad)) + (t9-5 a0-4) + ) + ((-> (method-of-type nav-enemy flee) trans)) + (sewer-frog-check-hop) + (nav-enemy-method-181 self) + (sewer-frog-hop) + (nav-enemy-method-182 self) + ) + #f + ) + ) + +(defstate knocked (sewer-frog) + :virtual #t + :post (behavior () + (let ((v1-1 (handle->process (-> self ragdoll-proc)))) + (when v1-1 + (if (< 0.0 (-> self root transv y)) + (logior! (-> (the-as ragdoll-proc v1-1) ragdoll ragdoll-flags) (ragdoll-flag rf11)) + (logtest? (-> (the-as ragdoll-proc v1-1) ragdoll ragdoll-flags) (ragdoll-flag rf11)) + ) + ) + ) + (let ((t9-0 (-> (method-of-type nav-enemy knocked) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + +;; WARN: Return type mismatch symbol vs vector. +(defmethod nav-enemy-method-167 ((this sewer-frog)) + (let ((a0-2 (handle->process (-> this focus handle))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (the-as + vector + (when (and a0-2 (nav-enemy-method-166 this s5-0 (get-trans (the-as process-focusable a0-2) 0))) + (set! (-> s5-0 w) (-> this nav-radius-backup)) + (not (add-root-sphere-to-hash! (-> this nav) s5-0 #x100068)) + ) + ) + ) + ) + +(defmethod go-stare2 ((this sewer-frog)) + (if (not (enemy-method-104 this (-> this focus-pos) 6371.5557)) + (go (method-of-object this turn-to-face-focus)) + (go (method-of-object this stare)) + ) + ) + +(defmethod sewer-frog-method-192 ((this sewer-frog)) + ((-> (method-of-type nav-enemy hostile) trans)) + (let* ((a0-1 (-> this focus-pos)) + (v1-3 (vector-! (new 'stack-no-clear 'vector) a0-1 (-> this root trans))) + (f0-4 (sqrtf (+ (* (-> v1-3 x) (-> v1-3 x)) (* (-> v1-3 z) (-> v1-3 z))))) + ) + (when (< f0-4 40960.0) + (if (< 12288.0 f0-4) + (go (method-of-object this attack)) + (set! (-> this scared-timer) (+ (current-time) (the int (* 300.0 (rnd-float-range this 1.8 3.6))))) + ) + ) + ) + 0 + (none) + ) + +(defmethod ragdoll-settled? ((this sewer-frog)) + (let ((a0-2 (handle->process (-> this ragdoll-proc)))) + (or (not a0-2) + (ragdoll-proc-method-19 (the-as ragdoll-proc a0-2)) + (time-elapsed? (-> this state-time) (seconds 5)) + ) + ) + ) + +;; WARN: disable def twice: 22. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod enemy-method-108 ((this sewer-frog) (arg0 process-focusable)) + (or (< (current-time) (-> this scared-timer)) + (let ((v1-4 (handle->process (-> this focus handle)))) + (if v1-4 + (and (focus-test? (the-as process-focusable v1-4) disable dead ignore grabbed) + (< (vector-vector-xz-distance (-> this focus-pos) (-> this root trans)) 163840.0) + ) + #f + ) + ) + ) + ) + +(defmethod play-damage-sound ((this sewer-frog) (arg0 int)) + (case arg0 + ((2) + (if (and (-> this next-state) (= (-> this next-state name) 'knocked)) + (sound-play "frog-splash") + (sound-play "frog-waterhop") + ) + ) + (else + ((method-of-type nav-enemy play-damage-sound) this arg0) + ) + ) + ) + +(defmethod enemy-common-post ((this sewer-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) 3) quad)) + ) + ) + ) + (water-control-method-10 (-> this water)) + ((method-of-type nav-enemy enemy-common-post) this) + (none) + ) + +(defmethod event-handler ((this sewer-frog) (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)) + #t + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +(defmethod init-enemy! ((this sewer-frog)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-sewer-frog" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *sewer-frog-nav-enemy-info*) + (set! (-> this water) (new 'process 'water-control this 0 4096.0 8192.0 2048.0)) + (set! (-> this water flags) + (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 ((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)) + (set! (-> v1-11 nose) (the-as uint 2)) + (set! (-> v1-11 ear) (the-as uint 0)) + (set-vector! (-> v1-11 twist-max) 11832.889 15473.777 0.0 1.0) + (set! (-> v1-11 ignore-angle) 30947.555) + ) + (set! (-> this scared-timer) 0) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/sewer/sewer-mood.gc b/goal_src/jak3/levels/sewer/sewer-mood.gc index ef2dd5da62..f388c29e2b 100644 --- a/goal_src/jak3/levels/sewer/sewer-mood.gc +++ b/goal_src/jak3/levels/sewer/sewer-mood.gc @@ -7,3 +7,368 @@ ;; DECOMP BEGINS +(deftype sewa-states (structure) + () + ) + + +;; WARN: Return type mismatch vector vs none. +(defun update-sewer-lights ((arg0 mood-context)) + (let ((v1-0 (-> arg0 light-group))) + (let ((a1-0 (-> v1-0 0))) + (set! (-> a1-0 dir0 direction x) -0.372) + (set! (-> a1-0 dir0 direction y) 0.853) + (set! (-> a1-0 dir0 direction z) 0.363) + (set! (-> a1-0 dir0 direction w) 0.0) + ) + (set-vector! (-> v1-0 0 dir0 color) 0.65 0.855 0.82 1.0) + (let ((a1-2 (-> v1-0 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 0 dir1 color) 0.65 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) 0.85) + (set! (-> v1-0 0 dir1 extra x) 0.3) + (set! (-> v1-0 0 dir2 extra x) 0.0) + (set! (-> v1-0 0 ambi extra x) 0.3) + ) + (let ((v1-2 (-> arg0 current-fog))) + (set! (-> v1-2 fog-color x) 150.0) + (set! (-> v1-2 fog-color y) 165.0) + (set! (-> v1-2 fog-color z) 220.0) + (set! (-> v1-2 fog-color w) 128.0) + ) + (set-vector! (-> arg0 current-fog fog-dists) 2048000.0 12288000.0 255.0 150.0) + (none) + ) + +(defbehavior update-mood-sewa time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-sewer-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) + (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 sewb-states (structure) + ((pulse pulse-state :inline) + ) + ) + + +(defun init-mood-sewb ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state))) + (set! (-> v1-0 1) (the-as uint 1.0)) + (set! (-> v1-0 2) (the-as uint 1.0)) + (let ((f0-2 1.0)) + (set! (-> v1-0 3) (the-as uint f0-2)) + f0-2 + ) + ) + ) + +(defbehavior update-mood-sewb time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-sewer-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) + (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) + (update-mood-pulse arg0 7 0 1.0 0.25 (* 65536.0 (seconds-per-frame)) 0.0) + ) + ) + 0 + (none) + ) + +(deftype sewc-states (structure) + ((pulse pulse-state :inline) + (electricity electricity-state :inline) + (rot float) + ) + ) + + +(defun init-mood-sewc ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state))) + (set! (-> v1-0 5) (the-as uint 1.0)) + (set! (-> v1-0 1) (the-as uint 1.0)) + (set! (-> v1-0 2) (the-as uint 1.0)) + (let ((f0-3 1.0)) + (set! (-> v1-0 3) (the-as uint f0-3)) + f0-3 + ) + ) + ) + +(defbehavior update-mood-sewc time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-sewer-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 sewc-states (-> arg0 state)))) + (set! (-> arg0 times 0 w) 1.0) + (set! (-> arg0 times 1 w) 1.0) + (update-mood-electricity arg0 2 16 0.8 1.0) + (update-mood-pulse arg0 3 0 1.0 0.25 (* 87381.336 (seconds-per-frame)) 0.0) + (set! (-> arg0 times 4 w) 1.0) + (update-mood-caustics arg0 5 (-> gp-0 rot) 0.0 0.66 0.4) + (update-mood-caustics arg0 6 (-> gp-0 rot) 21845.334 0.66 0.4) + (update-mood-caustics arg0 7 (-> gp-0 rot) 43690.668 0.66 0.4) + (if (not (paused?)) + (+! (-> gp-0 rot) (* 65536.0 (seconds-per-frame))) + ) + ) + ) + ) + 0 + (none) + ) + +(deftype sewd-states (structure) + ((pulse pulse-state :inline) + (electricity electricity-state :inline) + (rot float) + ) + ) + + +(defun init-mood-sewd ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state))) + (set! (-> v1-0 5) (the-as uint 0.0)) + (set! (-> v1-0 1) (the-as uint 1.0)) + (set! (-> v1-0 2) (the-as uint 1.0)) + (let ((f0-3 1.0)) + (set! (-> v1-0 3) (the-as uint f0-3)) + f0-3 + ) + ) + ) + +(defbehavior update-mood-sewd time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-sewer-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 sewd-states (-> arg0 state)))) + (set! (-> arg0 times 0 w) 1.0) + (set! (-> arg0 times 1 w) 1.0) + (update-mood-electricity arg0 2 16 0.8 1.0) + (update-mood-pulse arg0 3 0 1.0 0.25 (* 87381.336 (seconds-per-frame)) 0.0) + (set! (-> arg0 times 4 w) 1.0) + (update-mood-caustics arg0 5 (-> gp-0 rot) 0.0 0.66 0.4) + (update-mood-caustics arg0 6 (-> gp-0 rot) 21845.334 0.66 0.4) + (update-mood-caustics arg0 7 (-> gp-0 rot) 43690.668 0.66 0.4) + (if (not (paused?)) + (+! (-> gp-0 rot) (* 65536.0 (seconds-per-frame))) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun set-sewd-light! ((arg0 float)) + (let ((v1-1 (level-get *level* 'sewd))) + (when (and v1-1 (= (-> v1-1 status) 'active)) + (let ((v1-2 (-> v1-1 mood-context state))) + (set! (-> v1-2 5) (the-as uint arg0)) + ) + ) + ) + (none) + ) + +(deftype sewg-states (structure) + ((electricity electricity-state 2 :inline) + (rot float :offset 32) + ) + ) + + +(defun init-mood-sewg ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state))) + (set! (-> v1-0 1) (the-as uint 1.0)) + (let ((f0-1 1.0)) + (set! (-> v1-0 5) (the-as uint f0-1)) + f0-1 + ) + ) + ) + +(defbehavior update-mood-sewg time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-sewer-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 sewg-states (-> arg0 state)))) + (set! (-> arg0 times 0 w) 1.0) + (set! (-> arg0 times 1 w) 1.0) + (set! (-> arg0 times 4 w) 1.0) + (update-mood-electricity arg0 2 0 1.2 1.7) + (update-mood-electricity arg0 3 16 1.2 1.7) + (update-mood-caustics arg0 5 (-> gp-0 rot) 0.0 0.66 0.4) + (update-mood-caustics arg0 6 (-> gp-0 rot) 21845.334 0.66 0.4) + (update-mood-caustics arg0 7 (-> gp-0 rot) 43690.668 0.66 0.4) + (if (not (paused?)) + (+! (-> gp-0 rot) (* 65536.0 (seconds-per-frame))) + ) + ) + ) + ) + 0 + (none) + ) + +(defun set-sewg-electricity-scale! ((arg0 float) (arg1 int)) + (let ((v1-1 (level-get *level* 'sewg))) + (when v1-1 + (let ((v1-2 (the-as sewg-states (-> v1-1 mood-context state)))) + (set! (-> (the-as sewg-states (+ (the-as uint v1-2) (* arg1 16))) electricity 0 scale) arg0) + ) + ) + ) + 0 + (none) + ) + +(deftype sewh-states (structure) + ((electricity electricity-state 5 :inline) + (turret-value float :offset 80) + ) + ) + + +(defun init-mood-sewh ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state))) + (set! (-> v1-0 1) (the-as uint 1.0)) + (set! (-> v1-0 5) (the-as uint 1.0)) + (set! (-> v1-0 9) (the-as uint 1.0)) + (set! (-> v1-0 13) (the-as uint 1.0)) + (let ((f0-4 1.0)) + (set! (-> v1-0 17) (the-as uint f0-4)) + f0-4 + ) + ) + ) + +(defbehavior update-mood-sewh time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-sewer-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 sewh-states (-> arg0 state)))) + (set! (-> arg0 times 0 w) 1.0) + (set! (-> arg0 times 1 w) 1.0) + (update-mood-electricity arg0 2 0 1.2 1.7) + (update-mood-electricity arg0 3 16 1.2 1.7) + (update-mood-electricity arg0 5 48 1.2 1.7) + (update-mood-electricity arg0 6 64 1.2 1.7) + (set! (-> arg0 times 7 w) (-> gp-0 turret-value)) + (if (not (paused?)) + (set! (-> gp-0 turret-value) (fmax 0.0 (+ -0.1 (-> gp-0 turret-value)))) + ) + ) + ) + ) + 0 + (none) + ) + +(defun set-sewh-electricity-scale! ((arg0 float) (arg1 int)) + (let ((v1-1 (level-get *level* 'sewh))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as sewh-states (+ (the-as uint v1-2) (* arg1 16))) electricity 0 scale) arg0) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun set-sewh-turret-flash! () + (let ((v1-1 (level-get *level* 'sewh))) + (when v1-1 + (let ((v1-2 (-> v1-1 mood-context state))) + (set! (-> v1-2 20) (the-as uint 1.2)) + ) + ) + ) + (none) + ) + +(deftype sewj-states (structure) + ((rot float) + ) + ) + + +(defbehavior update-mood-sewj time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-sewer-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 sewj-states (-> arg0 state)))) + (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) + (update-mood-caustics arg0 5 (-> gp-0 rot) 0.0 0.66 0.4) + (update-mood-caustics arg0 6 (-> gp-0 rot) 21845.334 0.66 0.4) + (update-mood-caustics arg0 7 (-> gp-0 rot) 43690.668 0.66 0.4) + (if (not (paused?)) + (+! (-> gp-0 rot) (* 65536.0 (seconds-per-frame))) + ) + ) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak3/levels/sewer/sewer-move-turret.gc b/goal_src/jak3/levels/sewer/sewer-move-turret.gc index 14b258bf6d..0de2b21437 100644 --- a/goal_src/jak3/levels/sewer/sewer-move-turret.gc +++ b/goal_src/jak3/levels/sewer/sewer-move-turret.gc @@ -5,5 +5,536 @@ ;; name in dgo: sewer-move-turret ;; dgos: SEA +(declare-type sew-move-turret process-drawable) +(declare-type sew-move-turret-shot projectile) +(define-extern spawn-sew-move-turret-projectile (function sew-move-turret vector vector float vector (pointer sew-move-turret-shot))) + ;; DECOMP BEGINS +(deftype sew-move-turret (process-drawable) + ((sound-id sound-id) + (use-doppler? symbol) + ) + (:state-methods + idle + active + ) + (:methods + (sew-move-turret-method-22 (_type_ int) none) + ) + ) + + +(defskelgroup skel-sew-move-turret sew-move-turret sew-move-turret-lod0-jg sew-move-turret-idle-ja + ((sew-move-turret-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 20) + ) + +(defstate idle (sew-move-turret) + :virtual #t + :trans (behavior () + (let ((f30-0 (vector-vector-distance (-> self root trans) (target-pos 0))) + (gp-1 (new 'stack-no-clear 'vector)) + ) + (vector-! gp-1 (target-pos 0) (-> self root trans)) + (let ((f0-1 (vector-dot gp-1 (-> self node-list data 5 bone transform fvec))) + (f1-2 (fabs (vector-dot gp-1 (the-as vector (-> self node-list data 5 bone transform))))) + ) + (if (and (< 4096.0 f0-1) (>= 81920.0 f1-2) (< f30-0 450560.0)) + (go-virtual active) + ) + ) + ) + ) + :code sleep-code + :post ja-post + ) + +(defstate active (sew-move-turret) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('use-doppler?) + (-> self use-doppler?) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self use-doppler?) #f) + ) + :trans (behavior () + (let ((f30-0 (vector-vector-distance (-> self root trans) (target-pos 0))) + (gp-1 (new 'stack-no-clear 'vector)) + ) + (vector-! gp-1 (target-pos 0) (-> self root trans)) + (let ((f0-1 (vector-dot gp-1 (-> self node-list data 5 bone transform fvec))) + (f1-2 (fabs (vector-dot gp-1 (the-as vector (-> self node-list data 5 bone transform))))) + ) + (when (or (>= 0.0 f0-1) (< 81920.0 f1-2) (>= f30-0 450560.0)) + (if (nonzero? (-> self sound-id)) + (sound-stop (-> self sound-id)) + ) + (go-virtual idle) + ) + ) + ) + (logior! (-> self skel status) (joint-control-status sync-math)) + ) + :code (behavior () + (until #f + (sound-play "turret-move-lp" :id (-> self sound-id)) + (let ((f30-0 -10.0)) + (until (ja-done? 0) + (when (time-elapsed? (-> self state-time) (seconds 0.05)) + (let ((f28-0 (ja-frame-num 0))) + (let ((v1-6 #f)) + (if (or (and (< f30-0 23.0) (>= f28-0 23.0)) (and (< f30-0 67.0) (>= f28-0 67.0))) + (set! v1-6 #t) + ) + (set! (-> self use-doppler?) v1-6) + ) + (set-time! (-> self state-time)) + (sound-play "turret-gun-fire") + (sew-move-turret-method-22 self 5) + (set! f30-0 f28-0) + ) + ) + (suspend) + (ja :num! (seek! max 2.0)) + ) + ) + (ja-no-eval :group! sew-move-turret-move-shoot-ja :num! (seek!) :frame-num 0.0) + ) + #f + ) + :post transform-post + ) + +(defmethod sew-move-turret-method-22 ((this sew-move-turret) (arg0 int)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this node-list data arg0 bone transform fvec quad)) + (let ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data arg0)))) + (let ((f0-0 (ja-frame-num 0))) + (cond + ((< f0-0 45.0) + (let ((f1-1 1228.8)) + (cond + ((< f0-0 5.0) + (set! f1-1 (* 0.2 f0-0 f1-1)) + ) + ((< 40.0 f0-0) + (set! f1-1 (* 0.2 (- 45.0 f0-0) f1-1)) + ) + ) + (vector+float*! s4-0 s4-0 (the-as vector (-> this node-list data arg0 bone transform)) f1-1) + ) + ) + (else + (let ((f1-2 -1228.8)) + (cond + ((< f0-0 50.0) + (set! f1-2 (* 0.2 (+ -45.0 f0-0) f1-2)) + ) + ((< 85.0 f0-0) + (set! f1-2 (* 0.2 (- 90.0 f0-0) f1-2)) + ) + ) + (vector+float*! s4-0 s4-0 (the-as vector (-> this node-list data arg0 bone transform)) f1-2) + ) + ) + ) + ) + (vector-normalize! s5-0 40960.0) + (spawn-sew-move-turret-projectile + this + s4-0 + (vector+! (new 'stack-no-clear 'vector) s4-0 s5-0) + 122880.0 + (the-as vector #f) + ) + ) + ) + 0 + (none) + ) + +(defmethod init-from-entity! ((this sew-move-turret) (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 no-standon)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 12288.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 1)))) + (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 no-standon)) + (set! (-> v1-9 transform-index) 4) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 1)))) + (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 no-standon)) + (set! (-> v1-11 transform-index) 3) + (set-vector! (-> v1-11 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-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! (-> s4-0 penetrated-by) (penetrate)) + (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-move-turret" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((v1-23 (-> this skel root-channel 0))) + (set! (-> v1-23 frame-group) (the-as art-joint-anim (-> this draw art-group data 3))) + ) + (set! (-> this sound-id) (new-sound-id)) + (transform-post) + (go (method-of-object this idle)) + ) + +(defmethod deactivate ((this sew-move-turret)) + "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) + ) + +(deftype sew-move-turret-shot (guard-shot) + ((doppler-sound sound-id) + (use-doppler? symbol) + ) + ) + + +(defun sew-turret-shot-move ((arg0 sew-move-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 (< 16384.0 f0-0) + (vector-normalize! s4-0 16384.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) + ) + +(defpart 4940 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.9)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 32.0) + (:b 0.0) + (:a 255.0) + (:scalevel-x (meters -0.013333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 4941 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0.3)) + (:scale-x (meters 0.9)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 32.0) + (:b 0.0) + (:a 255.0) + (:scalevel-x (meters -0.013333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +(defpart 4942 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2) (meters 1)) + (:scale-y (meters 1) (meters 0.5)) + (:r 128.0) + (:g 64.0 128.0) + (:b 32.0) + (:a 128.0) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpart 4943 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 1.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 255.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-sew-move-turret-hit-object + :id 1506 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4944 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 4945 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +(defpartgroup group-sew-move-turret-hit + :id 1507 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4944 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 4945 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 4946 :period (seconds 2) :length (seconds 0.017)) + ) + ) + +(defpart 4946 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.75) (meters 0.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 16.0 48.0) + (:vel-y (meters 0.013333334) (meters 0.013333334)) + (: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 4944 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3)) + (: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.026666667)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-g -3.2) + (:fade-b -6.375) + (:fade-a -2.4) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defmethod projectile-method-25 ((this sew-move-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* ((a1-0 (-> this root trans)) + (v1-1 (-> this tail-pos)) + (a0-2 (vector-! (new 'stack-no-clear 'vector) a1-0 v1-1)) + ) + (vector-length a0-2) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((a1-4 0.8)) + (.mov vf7 a1-4) + ) + (.lvf vf5 (&-> a0-2 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 (&-> gp-0 quad) vf6) + (launch-particles (-> *part-id-table* 4940) gp-0) + (launch-particles (-> *part-id-table* 4941) gp-0) + ) + ) + 0 + (none) + ) + ) + +(defmethod projectile-method-24 ((this sew-move-turret-shot)) + (draw-beam (-> *part-id-table* 4942) (-> this tail-pos) (-> this starting-dir) #f) + (let* ((v1-1 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this starting-dir) 2048.0)) + (gp-1 (vector+! (new 'stack-no-clear 'vector) (-> this tail-pos) v1-1)) + ) + (set-sewh-turret-flash!) + (launch-particles (-> *part-id-table* 4943) gp-1) + ) + 0 + (none) + ) + +(defmethod projectile-method-26 ((this sew-move-turret-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 "bullet-hit-jak") + (cond + ((logtest? (-> *part-group-id-table* 1506 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* 1506)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-0 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1506)) + ) + ) + ) + ((begin (sound-play "bullet-ricco") (logtest? (-> *part-group-id-table* 1507 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* 1507)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-0 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1507)) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch (pointer process) vs (pointer sew-move-turret-shot). +(defun spawn-sew-move-turret-projectile ((arg0 sew-move-turret) (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 40960.0) + ) + (the-as (pointer sew-move-turret-shot) (spawn-projectile sew-move-turret-shot gp-0 arg0 *default-dead-pool*)) + ) + ) + +;; WARN: Return type mismatch (function sew-move-turret-shot none) vs none. +(defmethod init-proj-settings! ((this sew-move-turret-shot)) + (call-parent-method this) + (set! (-> this doppler-sound) (new-sound-id)) + (set! (-> this use-doppler?) (the-as symbol (send-event (ppointer->process (-> this parent)) 'use-doppler?))) + (set! (-> this max-speed) 163840.0) + (set! (-> this timeout) (the-as time-frame (the int (* 300.0 (/ 819200.0 (-> this max-speed)))))) + (set! (-> this move) sew-turret-shot-move) + (none) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod play-impact-sound ((this sew-move-turret-shot) (arg0 projectile-options)) + (cond + ((and (= arg0 3) (-> this use-doppler?)) + (let ((s5-2 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (target-pos 0)))) + 0.0 + (let ((s4-1 (< 0.0 (vector-dot s5-2 (-> this root transv)))) + (f0-2 (vector-normalize-ret-len! s5-2 1.0)) + ) + (if (or (and s4-1 (< f0-2 40960.0)) (and (not s4-1) (< f0-2 102400.0))) + (sound-play-by-name + (static-sound-name "bullet-by-loop") + (-> this doppler-sound) + 1024 + (the int + (* 1524.0 (fmax -0.08 (fmin 1.0 (* 0.5 (doppler-pitch-shift (-> this root trans) (-> this root transv)))))) + ) + 0 + (sound-group) + (-> this root trans) + ) + (sound-stop (-> this doppler-sound)) + ) + ) + ) + ) + (else + (call-parent-method this arg0) + ) + ) + (none) + ) + +(defmethod deactivate ((this sew-move-turret-shot)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this doppler-sound)) + (call-parent-method this) + (none) + ) diff --git a/goal_src/jak3/levels/sewer/sewer-obs.gc b/goal_src/jak3/levels/sewer/sewer-obs.gc index 14a6417469..269a8ab1a1 100644 --- a/goal_src/jak3/levels/sewer/sewer-obs.gc +++ b/goal_src/jak3/levels/sewer/sewer-obs.gc @@ -7,3 +7,1980 @@ ;; DECOMP BEGINS +(defun sewer-login ((arg0 level)) + (set! *nav-network* (new 'loading-level 'nav-network)) + (nav-network-method-9 *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) + ) + +(deftype sew-curved-door (com-airlock) + () + ) + + +(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) + ) + +(deftype sew-floating-plat (elevator) + () + ) + + +(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) + ) + +(defmethod get-art-group ((this sew-floating-plat)) + (art-group-get-by-name *level* "skel-sew-floating-plat" (the-as (pointer level) #f)) + ) + +;; WARN: Return type mismatch object vs none. +(defmethod go-arrived-or-waiting ((this sew-floating-plat)) + (go (method-of-object this dormant)) + (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) + ) + +;; 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) + ) + +(deftype sew-cam-sequencer (process) + ((activate-script pair :offset 132) + (enter-script pair) + (exit-script pair) + (timeout time-frame) + (offset uint64) + ) + (:state-methods + active + ) + ) + + +(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) + ) + +(defun sew-cam-eval-script ((arg0 pair)) + (script-eval arg0) + ) + +(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) + ) + ) + ) + +(deftype sew-floor-switch (process-drawable) + () + (:state-methods + idle-up + going-down + idle-down + ) + ) + + +(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) + ) + +(defmethod run-logic? ((this sew-floor-switch)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +(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 + ) + +(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) + ) + ) + +(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) + ) + ) + +(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)) + ) + ) + ) + +(deftype sew-jump-pad (jump-pad) + () + ) + + +(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) + ) + +(defmethod get-fan-joint-idx ((this sew-jump-pad)) + 4 + ) + +(defmethod get-skel ((this sew-jump-pad)) + (art-group-get-by-name *level* "skel-sew-jump-pad" (the-as (pointer level) #f)) + ) + +(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) + ) + +(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) + ) + +(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) + ) + ) + + +(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) + ) + +(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 + ) + ) + +(set! (-> *sew-fan-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +(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) + ) + +(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) + ) + ) + +(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))))))) + ) + +(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) + ) + +;; 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) + ) + +(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)) + ) + ) + +(defstate notice (sew-fan) + :virtual #t + :code (behavior () + (go-best-state self) + ) + ) + +(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)) + ) + ) + +(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)) + ) + ) + +(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) + ) + ) + +(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) + ) + ) + ) + +(defmethod go-stare ((this sew-fan)) + (go (method-of-object this idle)) + ) + +(defmethod go-stare2 ((this sew-fan)) + (go (method-of-object this idle)) + ) + +(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) + ) + +(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) + ) + +(defmethod coin-flip? ((this sew-fan)) + #f + ) + +(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)) + ) + ) + +(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 + ) + ) + ) + ) + ) + +(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) + ) + +;; 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)) + ) + +(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) + ) + +;; 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) + ) + +(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) + ) + +(defmethod go-idle2 ((this sew-fan)) + (go (method-of-object this idle)) + ) + +(deftype sew-elevator (process-drawable) + () + (:state-methods + idle + ) + (:methods + (init-collision! (_type_) none) + ) + ) + + +(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 + ) + +(defstate idle (sew-elevator) + :virtual #t + :code (behavior () + (ja :group! (ja-group) :num! min) + (transform-and-sleep) + ) + ) + +;; 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) + ) + +(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)) + ) + +(deftype sew-gate (process-drawable) + ((play-time time-frame) + (sound-played1 symbol) + (sound-played2 symbol) + ) + (:state-methods + idle + open + opened + ) + ) + + +(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) + ) + +(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 + ) + +(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 + ) + +(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 + ) + +(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)) + ) + ) + +(deftype sew-wall-switch (process-drawable) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (minimap connection-minimap) + ) + (:state-methods + idle + open + opened + ) + ) + + +(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) + ) + +(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 + ) + +(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 + ) + +(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 + ) + +(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)) + ) + ) + ) + +(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) + ) + +(deftype sew-fence-gate (process-drawable) + () + (:state-methods + closed + open + opening + closing + ) + ) + + +(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)) + ) + ) + ) + +(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) + ) + ) + +(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) + ) + ) + +(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) + ) + ) + +(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) + ) + ) + +(deftype sew-vent (process-drawable) + ((sync sync-linear :inline) + (attack-id int32) + (last-sync-val float) + (vent-sound sound-id) + ) + (:state-methods + idle + ) + ) + + +(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 + ) + +(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) + ) + +(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)) + ) + +(deftype sew-power-switch (process-drawable) + () + (:state-methods + idle + turned-off + ) + ) + + +(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) + ) + +(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) + ) + ) + +(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) + ) + ) + +(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)) + ) + ) + +(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 + ) + ) + + +(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) + ) + +(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)) + ) + +(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 + ) + +(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) + ) + +(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/goal_src/jak3/levels/sewer/sewer-obs2.gc b/goal_src/jak3/levels/sewer/sewer-obs2.gc index 6201acacc9..08db43d3bd 100644 --- a/goal_src/jak3/levels/sewer/sewer-obs2.gc +++ b/goal_src/jak3/levels/sewer/sewer-obs2.gc @@ -7,3 +7,569 @@ ;; DECOMP BEGINS +(deftype sew-laser-beam (process-drawable) + ((sync sync-linear :inline) + (sound-id sound-id) + ) + (:state-methods + idle + ) + ) + + +(defskelgroup skel-sew-laser-beam sew-laser-beam sew-laser-beam-lod0-jg sew-laser-beam-idle-ja + ((sew-laser-beam-lod0-mg (meters 20)) (sew-laser-beam-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 5.75 12) + :shadow sew-laser-beam-shadow-mg + :shadow-joint-index 4 + ) + +(defun fire-sew-laser-beam! ((arg0 vector) (arg1 vector) (arg2 sew-laser-beam)) + (let ((s4-0 (new 'stack-no-clear 'collide-query)) + (f30-0 47104.0) + ) + (set! (-> s4-0 start-pos quad) (-> arg0 quad)) + (vector-normalize-copy! (-> s4-0 move-dist) arg1 f30-0) + (let ((v1-2 s4-0)) + (set! (-> v1-2 radius) 40.96) + (set! (-> v1-2 collide-with) (collide-spec backgnd jak enemy obstacle hit-by-others-list player-list)) + (set! (-> v1-2 ignore-process0) arg2) + (set! (-> v1-2 ignore-process1) #f) + (set! (-> v1-2 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-2 action-mask) (collide-action solid)) + ) + (let ((f0-1 (fill-and-probe-using-line-sphere *collide-cache* s4-0))) + (if (>= f0-1 0.0) + (vector-float*! (-> s4-0 move-dist) (-> s4-0 move-dist) f0-1) + (set! (-> s4-0 best-other-tri collide-ptr) #f) + ) + ) + (when (and (-> s4-0 best-other-tri collide-ptr) (let ((s2-0 (-> s4-0 best-other-tri collide-ptr))) + (if (type? s2-0 collide-shape-prim-sphere) + s2-0 + ) + ) + ) + (let ((s2-1 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> s2-1 ent) (-> arg2 entity)) + (set! (-> s2-1 charge) 1.0) + (set! (-> s2-1 options) (projectile-options)) + (logclear! (-> s2-1 options) (projectile-options po14 po15 po16)) + (set! (-> s2-1 notify-handle) (the-as handle #f)) + (set! (-> s2-1 owner-handle) (the-as handle #f)) + (set! (-> s2-1 target-handle) (the-as handle #f)) + (set! (-> s2-1 target-pos quad) (the-as uint128 0)) + (set! (-> s2-1 ignore-handle) (process->handle arg2)) + (let* ((v1-19 *game-info*) + (a0-17 (+ (-> v1-19 attack-id) 1)) + ) + (set! (-> v1-19 attack-id) a0-17) + (set! (-> s2-1 attack-id) a0-17) + ) + (set! (-> s2-1 timeout) (seconds 4)) + (set! (-> s2-1 pos quad) (-> s4-0 start-pos quad)) + (vector-normalize-copy! (-> s2-1 vel) (-> s4-0 move-dist) 491520.0) + (sound-play "laser-hit-jak") + (spawn-projectile sew-laser-shot s2-1 arg2 *default-dead-pool*) + ) + (vector-normalize! (-> s4-0 move-dist) (+ 2048.0 (vector-length (-> s4-0 move-dist)))) + ) + (set! (-> *part-id-table* 4935 init-specs 4 initial-valuef) f30-0) + (let ((a2-5 (new 'stack-no-clear 'vector))) + (vector-float*! a2-5 arg1 f30-0) + (draw-beam (-> *part-id-table* 4935) arg0 a2-5 #t) + ) + ) + (none) + ) + +(defstate idle (sew-laser-beam) + :virtual #t + :trans (behavior () + (sound-play "laser-beam-loop" :id (-> self sound-id)) + (let ((gp-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node sew-laser-beam-lod0-jg laser)))) + (new 'stack-no-clear 'vector) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-z-quaternion! s5-0 (-> self root quat)) + (vector-normalize! s5-0 1.0) + (fire-sew-laser-beam! gp-0 s5-0 self) + ) + ) + ) + :code (behavior () + (until #f + (let ((f0-2 (* (get-norm! (-> self sync) 0) (the float (ja-num-frames 0)))) + (a0-2 (-> self skel root-channel 0)) + ) + (set! (-> a0-2 param 0) f0-2) + (joint-control-channel-group-eval! a0-2 (the-as art-joint-anim #f) num-func-loop-set!) + ) + (suspend) + ) + #f + ) + :post ja-post + ) + +(define *sew-laser-beam-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 614400.0) + :bot-plane (new 'static 'plane :y 1.0 :w 163840.0) + :top-plane (new 'static 'plane :y 1.0 :w -163840.0) + :shadow-type 1 + ) + ) + ) + +(defmethod init-from-entity! ((this sew-laser-beam) (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-sew-laser-beam" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((a1-5 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-4 0)) + (if #f + (set! v1-4 (logior v1-4 1)) + ) + (set! (-> a1-5 sync-type) 'sync-linear) + (set! (-> a1-5 sync-flags) (the-as sync-flags v1-4)) + ) + (set! (-> a1-5 entity) arg0) + (set! (-> a1-5 period) (the-as uint 2700)) + (set! (-> a1-5 percent) 0.0) + (initialize! (-> this sync) a1-5) + ) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this draw shadow-ctrl) *sew-laser-beam-shadow-control*) + (set-setting! 'spotlight-color #f 0.0 (the-as uint #x80ffc000)) + (go (method-of-object this idle)) + ) + +(defmethod deactivate ((this sew-laser-beam)) + "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) + ) + +(deftype sew-m-gate (process-drawable) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + ) + (:state-methods + idle + open + raised + ) + ) + + +(defskelgroup skel-sew-m-gate sew-m-gate sew-m-gate-lod0-jg sew-m-gate-idle-ja + ((sew-m-gate-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -0.5 0 6.5) + ) + +(defstate idle (sew-m-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual open) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (local-vars (v1-6 symbol)) + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (when (> (-> self actor-group-count) 0) + (dotimes (v1-5 (-> self actor-group 0 length)) + (let ((a1-1 (-> self actor-group 0 data v1-5 actor))) + (when (or (not a1-1) (not (logtest? (-> a1-1 extra perm status) (entity-perm-status subtask-complete)))) + (set! v1-6 #f) + (goto cfg-13) + ) + ) + ) + ) + (set! v1-6 #t) + (label cfg-13) + (if v1-6 + (go-virtual open) + ) + ) + ) + :code sleep-code + :post #f + ) + +(defstate open (sew-m-gate) + :virtual #t + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (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-353" 0.0 0) + (process-grab? *target* #f) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 2)) + (suspend) + ) + ) + (sound-play "gate-open") + (ja-no-eval :group! sew-m-gate-gate-open-ja :num! (seek! max 0.1) :frame-num 0.0) + (until (ja-done? 0) + (transform-post) + (suspend) + (ja :num! (seek! max 0.1)) + ) + (remove-setting! 'mode-name) + (remove-setting! 'interp-time) + (remove-setting! 'entity-name) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 0.5)) + (suspend) + ) + ) + (process-release? *target*) + (go-virtual raised) + ) + :post #f + ) + +(defstate raised (sew-m-gate) + :virtual #t + :enter (behavior () + (ja :group! sew-m-gate-gate-open-ja :num! max) + (transform-post) + ) + :code sleep-code + :post #f + ) + +(defmethod init-from-entity! ((this sew-m-gate) (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-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) 0.0 -2048.0 0.0 26624.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-m-gate" (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-13 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-13 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-13)) + (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 ((v1-21 (-> this skel root-channel 0))) + (set! (-> v1-21 frame-group) (the-as art-joint-anim (-> this draw art-group data 2))) + ) + (transform-post) + (if (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this raised)) + (go (method-of-object this idle)) + ) + ) + +(deftype sew-pipe (process-drawable) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + ) + (:state-methods + idle + lower + down + ) + ) + + +(defskelgroup skel-sew-pipe sew-pipe sew-pipe-lod0-jg sew-pipe-idle-ja + ((sew-pipe-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -7.5 0 27) + ) + +(defstate idle (sew-pipe) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual lower) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (local-vars (v1-6 symbol)) + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (when (> (-> self actor-group-count) 0) + (dotimes (v1-5 (-> self actor-group 0 length)) + (let ((a1-1 (-> self actor-group 0 data v1-5 actor))) + (when (or (not a1-1) (not (logtest? (-> a1-1 extra perm status) (entity-perm-status subtask-complete)))) + (set! v1-6 #f) + (goto cfg-13) + ) + ) + ) + ) + (set! v1-6 #t) + (label cfg-13) + (if v1-6 + (go-virtual lower) + ) + ) + ) + :code sleep-code + :post ja-post + ) + +(defstate lower (sew-pipe) + :virtual #t + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (set-setting! 'mode-name 'cam-fixed 0.0 0) + (set-setting! 'interp-time 'abs 0.0 0) + (set-setting! 'entity-name "camera-352" 0.0 0) + (process-grab? *target* #f) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (suspend) + ) + ) + (sound-play "pipe-lower") + (set-time! (-> self state-time)) + (ja-no-eval :group! sew-pipe-down-ja :num! (seek! max 0.1) :frame-num 0.0) + (until (ja-done? 0) + (if (time-elapsed? (-> self state-time) (seconds 1.557)) + (sound-play "pipe-lower-hit") + ) + (transform-post) + (suspend) + (ja :num! (seek! max 0.1)) + ) + (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 down) + ) + :post #f + ) + +(defstate down (sew-pipe) + :virtual #t + :enter (behavior () + (ja :group! sew-pipe-down-ja :num! max) + (transform-post) + ) + :code sleep-code + :post #f + ) + +(defmethod init-from-entity! ((this sew-pipe) (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-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) 0.0 -30720.0 0.0 110592.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-pipe" (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-13 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-13 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-13)) + (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 (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this down)) + (go (method-of-object this idle)) + ) + ) + +(deftype sew-grate-plat (process-drawable) + ((test-pos vector :inline) + (closed-x float) + (opened-x float) + ) + (:state-methods + closed + open + opened + close + ) + ) + + +(defskelgroup skel-sew-grate-plat sew-grate-plat sew-grate-plat-lod0-jg sew-grate-plat-idle-ja + ((sew-grate-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + ) + +(defstate closed (sew-grate-plat) + :virtual #t + :trans (behavior () + (let ((gp-0 (-> self test-pos)) + (a0-1 (target-pos 0)) + ) + (if (and (< 0.0 (- (-> a0-1 y) (-> gp-0 y))) (< (vector-vector-xz-distance a0-1 gp-0) 61440.0)) + (go-virtual open) + ) + ) + ) + :code sleep-code + :post ja-post + ) + +(defstate open (sew-grate-plat) + :virtual #t + :enter (behavior () + (sound-play "sew-grate-slide") + ) + :trans (behavior () + (seek! (-> self root trans x) (-> self opened-x) (* 327680.0 (seconds-per-frame))) + (if (= (-> self root trans x) (-> self opened-x)) + (go-virtual opened) + ) + ) + :code sleep-code + :post transform-post + ) + +(defstate opened (sew-grate-plat) + :virtual #t + :trans (behavior () + (let ((gp-0 (-> self test-pos)) + (a0-1 (target-pos 0)) + ) + (if (not (and (< 0.0 (- (-> a0-1 y) (-> gp-0 y))) (< (vector-vector-xz-distance a0-1 gp-0) 61440.0))) + (go-virtual close) + ) + ) + ) + :code sleep-code + :post ja-post + ) + +(defstate close (sew-grate-plat) + :virtual #t + :enter (behavior () + (sound-play "sew-grate-slide" :pitch -0.25) + ) + :trans (behavior () + (seek! (-> self root trans x) (-> self closed-x) (* 327680.0 (seconds-per-frame))) + (if (= (-> self root trans x) (-> self closed-x)) + (go-virtual closed) + ) + ) + :code sleep-code + :post transform-post + ) + +(defmethod init-from-entity! ((this sew-grate-plat) (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) 0.0 0.0 0.0 40960.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-grate-plat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this test-pos quad) (-> this root trans quad)) + (+! (-> this test-pos x) -40960.0) + (set! (-> this closed-x) (-> this root trans x)) + (set! (-> this opened-x) (+ -32768.0 (-> this root trans x))) + (go (method-of-object this closed)) + ) diff --git a/goal_src/jak3/levels/sewer/sewer-part.gc b/goal_src/jak3/levels/sewer/sewer-part.gc index f81162aac7..99f25ff048 100644 --- a/goal_src/jak3/levels/sewer/sewer-part.gc +++ b/goal_src/jak3/levels/sewer/sewer-part.gc @@ -5,5 +5,2039 @@ ;; name in dgo: sewer-part ;; dgos: SEA +(define-extern *range-color-sewer-gas* curve-color-fast) +(define-extern *range-alpha-sewer-gas* curve2d-fast) +(define-extern *range-scale-sewer-gas-x* curve2d-fast) +(define-extern *range-scale-sewer-gas-y* curve2d-fast) +(define-extern *r-curve-sewer-gas* curve2d-fast) +(define-extern *g-curve-sewer-gas* curve2d-fast) +(define-extern *b-curve-sewer-gas* curve2d-fast) +(define-extern *curve-alpha-sewer-gas* curve2d-fast) +(define-extern *curve-sewer-gas-x* curve2d-fast) +(define-extern *curve-sewer-gas-y* curve2d-fast) + ;; DECOMP BEGINS +(defpartgroup group-sewer-gas + :id 1470 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4856 :fade-after (meters 200) :falloff-to (meters 300) :flags (is-3d))) + ) + +(defpart 4856 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.15) + (:x (meters 10) (meters 50)) + (:y (meters 20) (meters 40)) + (:scale-x (meters 20) (meters 20)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0 128.0) + (:b 128.0 64.0) + (:a 0.0) + (:vel-x (meters -0.016666668) (meters 0.033333335)) + (:vel-y (meters 0) (meters 0.0033333334)) + (:scalevel-x (meters 0) (meters 0.033333335)) + (:scalevel-y (meters 0) (meters 0.033333335)) + (:fade-a 0.053333335) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 4)) + (:next-launcher 4857) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4857 + :init-specs ((:fade-a -0.053333335)) + ) + +(defpartgroup group-sewer-steamvent + :id 1471 + :flags (sp1 sp4) + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 4858 :fade-after (meters 200) :falloff-to (meters 300) :flags (sp7))) + ) + +(defpart 4858 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 0.15) + (:x (meters -1) (meters 2)) + (:y (meters -2) (meters 4)) + (:z (meters 2)) + (:scale-x (meters 4) (meters 8)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 255.0) + (:b 20.0) + (:a 0.0) + (:vel-y (meters 0.0033333334) (meters 0.0016666667)) + (:vel-z (meters 0.006666667) (meters 0.02)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters 0.000033333334)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:launchrot-x (degrees -5) (degrees 10)) + (:launchrot-y (degrees -5) (degrees 10)) + ) + ) + +(if #t + (set! *range-color-sewer-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 8.0 :y 8.0 :z 8.0 :w 128.0) + (new 'static 'vector :x 64.0 :y 64.0 :z 64.0 :w 128.0) + (new 'static 'vector :x 64.0 :y 64.0 :z 64.0 :w 128.0) + (new 'static 'vector :x 64.0 :y 64.0 :z 64.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-sewer-gas* (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-sewer-gas-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 4.0 :z 5.0 :w 6.0) + :one-over-x-deltas (new 'static 'vector :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *range-scale-sewer-gas-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 4.0 :z 5.0 :w 6.0) + :one-over-x-deltas (new 'static 'vector :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *r-curve-sewer-gas* (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 0.5 :z 0.3) + :one-over-x-deltas (new 'static 'vector :x -1.0 :y -1.0 :z -1.0 :w 1.0) + ) + ) + ) + +(if #t + (set! *g-curve-sewer-gas* (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 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :w 1.0) + ) + ) + ) + +(if #t + (set! *b-curve-sewer-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-sewer-gas* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 0.5 :z 1.0) + :one-over-x-deltas (new 'static 'vector :x 2.5 :y 1.0 :z -3.3333333 :w 1.0) + ) + ) + ) + +(if #t + (set! *curve-sewer-gas-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 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-sewer-gas-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) + ) + ) + ) + +(define *part-sewer-steam-puff-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 3) + :lifetime-offset (seconds 2) + :flags (particle-curve-flags pcf0 pcf1) + ) + ) + +(set! (-> *part-id-table* 4858 init-specs 21 initial-valuef) + (the-as float *part-sewer-steam-puff-curve-settings*) + ) + +(set! (-> *part-sewer-steam-puff-curve-settings* color-start) *range-color-sewer-gas*) + +(set! (-> *part-sewer-steam-puff-curve-settings* alpha-start) *range-alpha-sewer-gas*) + +(set! (-> *part-sewer-steam-puff-curve-settings* scale-x-start) *range-scale-sewer-gas-x*) + +(set! (-> *part-sewer-steam-puff-curve-settings* scale-y-start) *range-scale-sewer-gas-y*) + +(set! (-> *part-sewer-steam-puff-curve-settings* r-scalar) *r-curve-sewer-gas*) + +(set! (-> *part-sewer-steam-puff-curve-settings* g-scalar) *g-curve-sewer-gas*) + +(set! (-> *part-sewer-steam-puff-curve-settings* b-scalar) *b-curve-sewer-gas*) + +(set! (-> *part-sewer-steam-puff-curve-settings* a-scalar) *curve-alpha-sewer-gas*) + +(set! (-> *part-sewer-steam-puff-curve-settings* scale-x-scalar) *curve-sewer-gas-x*) + +(set! (-> *part-sewer-steam-puff-curve-settings* scale-y-scalar) *curve-sewer-gas-y*) + +(defpartgroup group-sewer-hard-blowing-steam + :id 1472 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 4859 :flags (sp7))) + ) + +(define *steam-particle-list* (new 'static 'boxed-array :type int32 #x405c00 #x400000)) + +(defun birth-func-texture-group-steam ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (particle-adgif-callback + (-> arg1 adgif) + (the-as + texture-id + (-> *steam-particle-list* + (mod (the-as int (rand-uint31-gen *random-generator*)) (-> *steam-particle-list* length)) + ) + ) + ) + 0 + (none) + ) + +(defpart 4859 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group-steam) + (:num 2.0) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:omega (degrees 0.1575)) + (:vel-z (meters 0.2) (meters 0.033333335)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.16) + (:friction 0.92) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-13 left-multiply-quat)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.335)) + (:next-launcher 4860) + (:conerot-x (degrees 0) (degrees 10)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4860 + :init-specs ((:fade-a -0.32)) + ) + +(defpartgroup group-sewer-green-steam + :id 1473 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 4861 :flags (sp7))) + ) + +(defpart 4861 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group-steam) + (:num 2.0) + (:x (meters 0) (meters 2)) + (:scale-x (meters 1) (meters 2)) + (:scale-y :copy scale-x) + (:r 90.0 30.0) + (:g 130.0) + (:b 32.0) + (:a 0.0) + (:omega (degrees 0.1575)) + (:vel-y (meters 0.2) (meters 0.033333335)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.32) + (:friction 0.92 0.02) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-13 left-multiply-quat)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.167)) + (:next-launcher 4862) + (:conerot-x (degrees 0) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4862 + :init-specs ((:fade-a -0.16)) + ) + +(defpartgroup group-sewer-deadly-mist + :id 1474 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4863 :flags (sp7))) + ) + +(defpart 4863 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.5) + (:x (meters 0) (meters 2)) + (:scale-x (meters 1) (meters 2)) + (:scale-y :copy scale-x) + (:r 90.0 30.0) + (:g 130.0) + (:b 32.0) + (:a 0.0) + (:vel-y (meters 0.0033333334) (meters 0.016666668)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.32) + (:accel-y (meters 0.00033333333)) + (:friction 0.98) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4864) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4864 + :init-specs ((:fade-a -0.018823529)) + ) + +(defpartgroup group-sewer-light-glow + :id 1475 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4865 :fade-after (meters 200) :flags (sp6))) + ) + +(defpart 4865 + :init-specs ((:texture (glow 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 255.0) + (:b 64.0) + (:a 12.0 4.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + ) + ) + +(defpartgroup group-sewer-panel-light-glow + :id 1476 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4866 :fade-after (meters 200) :flags (sp6))) + ) + +(defpart 4866 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 7) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 255.0) + (:b 255.0) + (:a 12.0 4.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + ) + ) + +(defpartgroup group-sew-little-ridge-wake + :id 1477 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 4867 :flags (sp7))) + ) + +(defpart 4867 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 0.3 0.8) + (:scale-x (meters 0.5) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.001)) + (:accel-z (meters 0.001)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-13)) + (:conerot-x (degrees -5) (degrees 10)) + (:conerot-z (degrees -5) (degrees 10)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-sew-fan-lasersight + :id 1478 + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 4868 :flags (sp6 sp7)) (sp-item 4869 :flags (sp6 sp7))) + ) + +(defpart 4868 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5)) + (: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 64.0 1.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4869 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:z (meters -1)) + (:scale-x (meters 1.5)) + (: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 64.0 1.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-sew-fan-lasersight-hostile + :id 1479 + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 4870 :flags (sp6 sp7)) (sp-item 4871 :flags (sp6 sp7))) + ) + +(defpart 4870 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 112.0) + (:g 16.0) + (:b 10.0) + (:a 64.0 1.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4871 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:z (meters -1)) + (:scale-x (meters 1.5)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 112.0) + (:g 16.0) + (:b 10.0) + (:a 64.0 1.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 1228.8) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4872 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:z (meters -1)) + (:scale-x (meters 3) (meters 0.1)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 30.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 4873 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:z (meters -1)) + (:scale-x (meters 3) (meters 0.1)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 64.0) + (:b 0.0) + (:a 30.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpartgroup group-sew-wake-small + :id 1480 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 4874 :flags (is-3d sp7))) + ) + +(defpart 4874 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.2) + (:scale-x (meters 1) (meters 1)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:scalevel-x (meters 0.008333334) (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.07111111 -0.07111111) + (:accel-z (meters 0.00033333333)) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpartgroup group-sew-grate-wake + :id 1481 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 4875 :flags (is-3d sp7))) + ) + +(defpart 4875 + :init-specs ((:texture (water-wake sewa-sprite)) + (:num 0.5) + (:x (meters 0)) + (:z (meters -6) 6 (meters 2.1)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-x (degrees 0) 1 (degrees 180)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:scalevel-x (meters 0.016666668) (meters 0.0016666667)) + (:scalevel-y (meters 0.006666667) (meters 0.0016666667)) + (:fade-a -0.10666667 -0.10666667) + (:accel-z (meters 0.00033333333)) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:rotate-y (degrees 90)) + ) + ) + +(defpartgroup group-sew-yellow-grate-wake + :id 1482 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 4876 :flags (is-3d sp7))) + ) + +(defpart 4876 + :init-specs ((:texture (water-wake sewa-sprite)) + (:num 1.0) + (:x (meters 0)) + (:z (meters -7.6) 4 (meters 3)) + (:scale-x (meters 0.5) (meters 0.3)) + (:rot-x (degrees 0) 1 (degrees 180)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.016666668) (meters 0.0016666667)) + (:scalevel-y (meters 0.013333334) (meters 0.0016666667)) + (:fade-a -0.21333334 -0.21333334) + (:accel-x (meters 0.00033333333)) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:rotate-y (degrees 90)) + ) + ) + +(defpartgroup group-sewer-falls-froth + :id 1483 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 4877 :flags (is-3d sp7)) + (sp-item 4878 :fade-after (meters 60) :falloff-to (meters 100) :flags (sp7)) + ) + ) + +(defpart 4877 + :init-specs ((:texture (water-froth sewa-sprite)) + (:num 0.02 0.02) + (:x (meters -4) (meters 8)) + (:z (meters -10)) + (:scale-x (meters 5) (meters 20)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 110.0) + (:b 60.0 20.0) + (:a 32.0 32.0) + (:vel-z (meters 0.02) (meters 0.006666667)) + (:rotvel-y (degrees -0.010000001) (degrees 0.020000001)) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 launch-along-z left-multiply-quat)) + (:next-time (seconds 5)) + (:next-launcher 4879) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4879 + :init-specs ((:fade-a -0.042666666)) + ) + +(defpart 4878 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters -5) (meters 10)) + (:y (meters 0)) + (:z (meters -0.3) (meters 0.6)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters -0.01)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.256) + (:accel-y (meters 0.00033333333)) + (:accel-z (meters 0.00016666666)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-sewer-whirlpool-center + :id 1484 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 4880 :fade-after (meters 60) :falloff-to (meters 100) :flags (sp7)) + (sp-item 4881 :fade-after (meters 60) :falloff-to (meters 100) :flags (sp7)) + ) + ) + +(defpart 4881 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 0.5) + (:x (meters 0) (meters 1)) + (:y (meters -0.5)) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 16.0) + (:vel-y (meters 0.016666668)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335) + (:accel-y (meters -0.00033333333)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 2)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 4880 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.5) + (:x (meters 0) (meters 2)) + (:y (meters 1)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 0.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.32) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.95) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4882) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4882 + :init-specs ((:fade-a -0.018823529)) + ) + +(defpartgroup group-sewer-falls-tilt + :id 1485 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 4883 :fade-after (meters 60) :falloff-to (meters 100) :flags (sp7))) + ) + +(defpart 4883 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 6.0) + (:x (meters -9) (meters 18)) + (:y (meters 0.4)) + (:z (meters -0.3) (meters 0.6)) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters -0.01)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.256) + (:accel-x (meters -0.00066666666)) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-sewer-waterfall-base + :id 1486 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 4884 :fade-after (meters 60) :falloff-to (meters 100) :flags (is-3d sp7)) + (sp-item 4885 :fade-after (meters 60) :falloff-to (meters 100) :flags (sp7)) + ) + ) + +(defpart 4884 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5) + (:z (meters 1)) + (:scale-x (meters 3) (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 16.0) + (:scalevel-x (meters 0.006666667) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:accel-z (meters 0.00033333333)) + (: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 0 0 #x406400 #x408200)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4885 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters -1.5) (meters 3)) + (:y (meters 0)) + (:z (meters -0.3) (meters 0.6)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters -0.01)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.256) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-sewer-waterfall-base-big + :id 1487 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4886 :fade-after (meters 100) :falloff-to (meters 400) :flags (sp7)) + (sp-item 4887 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + ) + ) + +(defpart 4886 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.3 0.3) + (:x (meters -10) (meters 15)) + (:y (meters -0.4)) + (:z (meters 0)) + (:scale-x (meters 1) (meters 4)) + (: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-z (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.021333333 0.021333333) + (:accel-y (meters 0.000033333334) (meters 0.000033333334)) + (:friction 0.95) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 2.5)) + (:next-launcher 4888) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4888 + :init-specs ((:fade-a -0.042666666 -0.042666666)) + ) + +(defpart 4889 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1) + (:z (meters 1)) + (:scale-x (meters 12) (meters 0.5)) + (:rot-y (degrees 0) 1 (degrees 180)) + (:scale-y (meters 3) (meters 0.5)) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:scalevel-x (meters 0.013333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:accel-z (meters 0.00033333333)) + (:friction 0.9) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406400 #x408200)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4890 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1) + (:z (meters 1)) + (:scale-x (meters 3) (meters 0.5)) + (:rot-y (degrees 90) 1 (degrees 180)) + (:scale-y (meters 12) (meters 0.5)) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:scalevel-x (meters 0.013333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:accel-z (meters 0.00033333333)) + (:friction 0.9) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406400 #x408200)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4887 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters -6) (meters 12)) + (:y (meters 0)) + (:z (meters -0.3) (meters 0.6)) + (:scale-x (meters 1) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters -0.01)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.256) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-sewer-waterfall-base-tube + :id 1488 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4891 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7))) + ) + +(defpart 4891 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters -6) (meters 12)) + (:y (meters 0)) + (:z (meters -0.3) (meters 0.6)) + (:scale-x (meters 1) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 50.0 50.0) + (:b 40.0) + (:a 32.0 32.0) + (:vel-y (meters -0.01)) + (:vel-z (meters 0.0033333334) (meters 0.02)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.256) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-sew-wake-medium + :id 1489 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 4892 :flags (sp7)) (sp-item 4893 :flags (sp7)) (sp-item 4894 :flags (is-3d sp7))) + ) + +(defpart 4892 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 5.0) + (:x (meters -3.5)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 100.0 28.0) + (:vel-y (meters 0.0033333334) (meters 0.026666667)) + (:scalevel-x (meters 0.01)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85333335) + (:accel-y (meters -0.001)) + (:accel-z (meters 0.0016666667)) + (:friction 0.96) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-drop-group-center) + (:conerot-z (degrees -5) (degrees 10)) + (:rotate-y (degrees -10) (degrees -90)) + ) + ) + +(defpart 4893 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 5.0) + (:x (meters -3.5)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 100.0 28.0) + (:vel-y (meters 0.0033333334) (meters 0.026666667)) + (:scalevel-x (meters 0.01)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85333335) + (:accel-y (meters -0.001)) + (:accel-z (meters -0.0016666667)) + (:friction 0.96) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-drop-group-center) + (:conerot-z (degrees -5) (degrees 10)) + (:rotate-y (degrees 180) (degrees 100.00001)) + ) + ) + +(defpart 4894 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.5) + (:scale-x (meters 8) (meters 1)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-z (meters 0.02)) + (:scalevel-x (meters -0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.07111111) + (:accel-x (meters -0.00013333333)) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-sew-wake-large + :id 1490 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 4895 :flags (is-3d sp7))) + ) + +(defpart 4895 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1) + (:scale-x (meters 3.3)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 64.0) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667) + (:accel-x (meters 0.00066666666)) + (:friction 0.98) + (: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 0 0 #x406500 #x408200)) + (:next-time (seconds 0.335)) + (:next-launcher 4896) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 4896 + :init-specs ((:scalevel-x (meters -0.006666667)) (:scalevel-y :copy scalevel-x)) + ) + +(defpartgroup group-sew-wake-tiny + :id 1491 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 4897 :flags (is-3d sp7))) + ) + +(defpart 4897 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.2) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 64.0) + (:scalevel-x (meters -0.0026666666)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667) + (:accel-x (meters 0.00066666666)) + (: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 5 0 0 #x406500 #x408200)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpartgroup group-sewer-deep-mist + :id 1492 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 200) + :parts ((sp-item 4898 :flags (sp7))) + ) + +(defpart 4898 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0) (meters 10)) + (:scale-x (meters 10) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 20.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-x (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.008 0.008) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.99) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 6.667)) + (:next-launcher 4899) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 4899 + :init-specs ((:fade-a -0.032 -0.032)) + ) + +(defpartgroup group-sewer-waterfall-base-huge + :id 1493 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 4900 :fade-after (meters 50) :falloff-to (meters 100) :flags (sp7)) + (sp-item 4901 :fade-after (meters 50) :falloff-to (meters 100) :flags (sp7)) + (sp-item 4902 :fade-after (meters 50) :falloff-to (meters 100) :flags (sp7)) + ) + ) + +(defpart 4900 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.3 0.3) + (:x (meters 0)) + (:y (meters -0.4)) + (:z (meters -40) (meters 80)) + (:scale-x (meters 1) (meters 4)) + (: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-x (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.013333334) (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.021333333 0.021333333) + (:accel-y (meters 0.000033333334) (meters 0.000033333334)) + (:friction 0.95) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 2.5)) + (:next-launcher 4903) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4903 + :init-specs ((:fade-a -0.042666666 -0.042666666)) + ) + +(defpart 4901 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:x (meters -0.3) (meters 0.6)) + (:y (meters 0)) + (:z (meters -40) (meters 40)) + (:scale-x (meters 1) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters -0.01)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.256) + (:accel-x (meters 0.00033333333) (meters 0.00066666666)) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4902 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:x (meters -0.3) (meters 0.6)) + (:y (meters 0)) + (:z (meters 0) (meters 40)) + (:scale-x (meters 1) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters -0.01)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.256) + (:accel-x (meters 0.00033333333) (meters 0.00066666666)) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-sewer-waterfall-base-top + :id 1494 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 4904 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 4905 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + ) + ) + +(defpart 4904 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.3 0.3) + (:x (meters 0)) + (:y (meters -0.4)) + (:z (meters -30) (meters 60)) + (:scale-x (meters 1) (meters 4)) + (: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-x (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.013333334) (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.021333333 0.021333333) + (:accel-y (meters 0.000033333334) (meters 0.000033333334)) + (:friction 0.95) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 2.5)) + (:next-launcher 4903) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4905 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 20.0) + (:x (meters -0.3) (meters 0.6)) + (:y (meters 0)) + (:z (meters -30) (meters 60)) + (:scale-x (meters 1) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters -0.01)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.256) + (:accel-x (meters 0.00033333333) (meters 0.00066666666)) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-sew-4-waterfalls + :id 1495 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4906 :fade-after (meters 60) :falloff-to (meters 100) :flags (sp7)) + (sp-item 4907 :fade-after (meters 60) :falloff-to (meters 100) :flags (is-3d sp7)) + (sp-item 4908 :fade-after (meters 60) :falloff-to (meters 100) :flags (sp7)) + (sp-item 4909 :fade-after (meters 60) :falloff-to (meters 100) :flags (is-3d sp7)) + (sp-item 4910 :fade-after (meters 60) :falloff-to (meters 100) :flags (sp7)) + (sp-item 4911 :fade-after (meters 60) :falloff-to (meters 100) :flags (is-3d sp7)) + (sp-item 4912 :fade-after (meters 60) :falloff-to (meters 100) :flags (sp7)) + (sp-item 4913 :fade-after (meters 60) :falloff-to (meters 100) :flags (is-3d sp7)) + (sp-item 4914 :fade-after (meters 60) :falloff-to (meters 100) :flags (sp7)) + ) + ) + +(defpart 4906 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.5 0.5) + (:x (meters 0)) + (:y (meters -0.4)) + (:z (meters -20) (meters 35)) + (:scale-x (meters 1) (meters 4)) + (: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-x (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.021333333 0.021333333) + (:accel-y (meters 0.000033333334) (meters 0.000033333334)) + (:friction 0.95) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 2.5)) + (:next-launcher 4915) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4915 + :init-specs ((:fade-a -0.042666666 -0.042666666)) + ) + +(defpart 4907 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5) + (:x (meters 1)) + (:z (meters 13)) + (:scale-x (meters 6) (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 16.0) + (:scalevel-x (meters 0.006666667) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:accel-x (meters 0.00066666666)) + (: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 0 0 #x406500 #x408200)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4908 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters -0.5) (meters 1)) + (:y (meters 0)) + (:z (meters 10) (meters 6)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:vel-y (meters -0.013333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.4 -0.4) + (:accel-x (meters 0.00033333333) (meters 0.00033333333)) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4909 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5) + (:x (meters 1)) + (:z (meters 4.6)) + (:scale-x (meters 6) (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 16.0) + (:scalevel-x (meters 0.006666667) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:accel-x (meters 0.00066666666)) + (: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 0 0 #x406500 #x408200)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4910 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters -0.5) (meters 1)) + (:y (meters 0)) + (:z (meters 1.4) (meters 6)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:vel-y (meters -0.013333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.4 -0.4) + (:accel-x (meters 0.00033333333) (meters 0.00033333333)) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4911 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5) + (:x (meters 1)) + (:z (meters -3)) + (:scale-x (meters 6) (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 16.0) + (:scalevel-x (meters 0.006666667) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:accel-x (meters 0.00066666666)) + (: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 0 0 #x406500 #x408200)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4912 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters -0.5) (meters 1)) + (:y (meters 0)) + (:z (meters -6.5) (meters 6)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:vel-y (meters -0.013333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.4 -0.4) + (:accel-x (meters 0.00033333333) (meters 0.00033333333)) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4913 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5) + (:x (meters 1)) + (:z (meters -11.5)) + (:scale-x (meters 6) (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 16.0) + (:scalevel-x (meters 0.006666667) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:accel-x (meters 0.00066666666)) + (: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 0 0 #x406500 #x408200)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4914 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters -0.5) (meters 1)) + (:y (meters 0)) + (:z (meters -15) (meters 6)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:vel-y (meters -0.013333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.4 -0.4) + (:accel-x (meters 0.00033333333) (meters 0.00033333333)) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-sew-moving-step-a-wake + :id 1496 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 4916 :flags (sp7)) (sp-item 4917 :flags (sp7)) (sp-item 4918 :flags (is-3d sp7))) + ) + +(defpart 4916 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 2.0) + (:x (meters -3.5)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 100.0 28.0) + (:vel-y (meters 0.0033333334) (meters 0.026666667)) + (:scalevel-x (meters 0.01)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85333335) + (:accel-y (meters -0.001)) + (:accel-z (meters 0.0016666667)) + (:friction 0.96) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-drop-group-center) + (:conerot-z (degrees -5) (degrees 10)) + (:rotate-y (degrees 80) (degrees -90)) + ) + ) + +(defpart 4917 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 2.0) + (:x (meters -3.5)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 100.0 28.0) + (:vel-y (meters 0.0033333334) (meters 0.026666667)) + (:scalevel-x (meters 0.01)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85333335) + (:accel-y (meters -0.001)) + (:accel-z (meters -0.0016666667)) + (:friction 0.96) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-drop-group-center) + (:conerot-z (degrees -5) (degrees 10)) + (:rotate-y (degrees 260) (degrees 100.00001)) + ) + ) + +(defpart 4918 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1) + (:scale-x (meters 6.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 64.0) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667) + (:accel-x (meters 0.00066666666)) + (:friction 0.98) + (: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 0 0 #x406500 #x408200)) + (:next-time (seconds 0.335)) + (:next-launcher 4919) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +(defpart 4919 + :init-specs ((:scalevel-x (meters -0.006666667)) (:scalevel-y :copy scalevel-x)) + ) + +(defpartgroup group-sew-moving-step-b-wake + :id 1497 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 4920 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp7)) + (sp-item 4921 :fade-after (meters 80) :falloff-to (meters 100) :flags (is-3d sp7)) + ) + ) + +(defpart 4920 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 3.0) + (:x (meters -4.2) (meters 8.4)) + (:z (meters 1.2)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 100.0 28.0) + (:vel-y (meters 0.0033333334) (meters 0.013333334)) + (:scalevel-x (meters 0.01)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668) + (:accel-y (meters -0.0016666667)) + (:accel-z (meters 0.001)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-drop-group-center) + (:conerot-z (degrees -5) (degrees 10)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4921 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.4) + (:y (meters 0.8)) + (:z (meters 1.5)) + (:scale-x (meters 9) (meters 1)) + (:rot-y (degrees 0)) + (:scale-y (meters 1) (meters 1)) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:scalevel-y (meters 0.013333334)) + (:fade-a -0.21333334) + (:accel-z (meters 0.001)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406500 #x408200)) + (:rotate-x (degrees 55)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-sew-grate-bubbles + :id 1498 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4922 :fade-after (meters 80) :falloff-to (meters 100) :flags (is-3d sp7))) + ) + +(defpart 4922 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.2) + (:z (meters -1)) + (:scale-x (meters 4) (meters 0.5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 16.0) + (:vel-z (meters 0.033333335)) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.017777778 -0.017777778) + (:accel-z (meters 0.00066666666)) + (:friction 0.9) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406500 #x408200)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-sewer-slide-froth + :id 1499 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4923 :fade-after (meters 80) :falloff-to (meters 100) :flags (is-3d sp7))) + ) + +(defpart 4923 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5) + (:x (meters -2) (meters 4)) + (:z (meters -1)) + (:scale-x (meters 4) (meters 0.5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-z (meters 0.033333335)) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.32) + (:accel-z (meters 0.00066666666)) + (:friction 0.9 0.03) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406500 #x58300600)) + (:next-time (seconds 0.335)) + (:next-launcher 4924) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4924 + :init-specs ((:fade-a -0.04)) + ) + +(defpartgroup group-flyingsaw-sparks + :id 1500 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 4925 :flags (sp7)) (sp-item 4926 :flags (sp7))) + ) + +(defpart 4925 + :init-specs ((:texture (hitspark level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (: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)) + ) + ) + +(defpart 4926 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 0.5 0.5) + (:scale-x (meters 0.05) (meters 0.05)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:omega (degrees 0.0225)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-g -0.64) + (:fade-b -2.56) + (:fade-a -1.28 -1.28) + (:accel-y (meters -0.0013333333)) + (:friction 0.9) + (:timer (seconds 0.335)) + (: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)) + ) + ) + +(defpartgroup group-sew-fan-gust + :id 1501 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4927 :flags (sp7))) + ) + +(defpart 4927 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 6.0) + (:y (meters 1) (meters 0.5)) + (: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 8.0 8.0) + (:vel-z (meters 0.1)) + (:scalevel-x (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.064) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2)) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-sewer-rising-bubbles + :id 1502 + :flags (sp0) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 4928 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7))) + ) + +(defpart 4928 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 0.01 0.5) + (:x (meters 0) (meters 2)) + (:y (meters 0)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:accel-y (meters 0.00083333335)) + (:timer (seconds 3.667)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'spt-func-birth-on-bubble-pop) + (:next-time (seconds 0.017)) + (:next-launcher 4929) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 4929 + :init-specs ((:scale-x (meters 0.2) (meters 0.2)) + (:scale-y :copy scale-x) + (:fade-a -0.04 0.16) + (:accel-x (meters -0.00033333333) 1 (meters 0.00066666666)) + (:accel-z (meters -0.00033333333) 1 (meters 0.00066666666)) + (:friction 0.9) + (:next-time (seconds 0.1) (seconds 0.03)) + (:next-launcher 4929) + ) + ) + +;; WARN: Return type mismatch (pointer process) vs none. +(defun spt-func-birth-on-bubble-pop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (when (zero? (-> arg1 timer)) + (cond + ((logtest? (-> *part-group-id-table* 1503 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* 1503)) + ) + (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* 1503)) + ) + ) + ) + (none) + ) + +(defpartgroup group-sewer-rising-bubbles-pop + :id 1503 + :duration (seconds 1.5) + :linger-duration (seconds 0) + :flags (sp0) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 4930 :fade-after (meters 100) :falloff-to (meters 200) :flags (is-3d sp7) :period (seconds 20) :length (seconds 0.035)) + ) + ) + +(defpart 4930 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-sewer-abyss-waterfall-mist + :id 1504 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4931 :fade-after (meters 200) :falloff-to (meters 400) :flags (sp7)) + (sp-item 4932 :fade-after (meters 200) :falloff-to (meters 400) :flags (sp7)) + ) + ) + +(defpart 4932 + :init-specs ((:texture (ceiling-dust sewa-sprite)) + (:num 0.04 0.02) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 4) (meters 2)) + (:scale-y :copy scale-x) + (:r 180.0 70.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-z (meters 0.046666667)) + (:scalevel-x (meters 0.00033333333) (meters 0.0016666667)) + (:scalevel-y (meters 0.0033333334) (meters 0.0033333334)) + (:fade-a 0.021333333 0.021333333) + (:accel-y (meters -0.0005)) + (:friction 0.99) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 2.5)) + (:next-launcher 4933) + (:conerot-y (degrees -20) (degrees 40)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4933 + :init-specs ((:fade-a -0.042666666 -0.042666666)) + ) + +(defpart 4931 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.2 0.2) + (:x (meters -5) (meters 10)) + (:y (meters 1)) + (:z (meters -10)) + (:scale-x (meters 6) (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 0.0) + (:vel-z (meters 0.046666667)) + (:scalevel-x (meters 0.006666667) (meters 0.026666667)) + (:rotvel-z (degrees -0.13333334) (degrees 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.064 0.064) + (:accel-y (meters -0.00006666667) (meters -0.00006666667)) + (:friction 0.99) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.835)) + (:next-launcher 4934) + (:conerot-y (degrees -30) (degrees 60)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 4934 + :init-specs ((:fade-a -0.032 -0.032)) + ) diff --git a/goal_src/jak3/levels/sewer/sewer-scenes.gc b/goal_src/jak3/levels/sewer/sewer-scenes.gc index 41599ea77f..eac0512925 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 9061d29aa6..26aa9996de 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 a52503e4a6..f78fb86668 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 4b13a39193..0432bcf4d0 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 22770249a8..54b9c0d955 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 ba5d5ec426..938fc9f504 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 6a543c4cd6..afc43160ab 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 f9ad150a6b..35e911170c 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 8344ede34a..5c6d4c6710 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 aff2749fd0..d2e21a2c98 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 046280b129..861af18549 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 a401865bdb..0502080d35 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 5fe3c2fab0..9c48c85131 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)) + (nav-network-method-9 *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 6e624cc9a8..6c7e56a528 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 9e6416cce9..ecd1e4afc4 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 655d9a0b3d..77e2562e83 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 2b7f5d9406..891919ab90 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 c8b2240baa..dc2887b5b9 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 ef9db5507f..eb5153f674 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 7b195572f2..353ba3e14c 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 dbf40478d5..14f68b198b 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 0a564d03cf..d95517241b 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 2bdf8123fd..15abb1569c 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 12d82937aa..0774098391 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 ebe66179f8..7a19f4a8e8 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)) + (nav-network-method-9 *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 'bounding-box)) + (s4-0 (the-as (array collide-shape) (new 'stack 'boxed-array collide-shape 8))) + ) + (set! (-> s3-0 min quad) (-> arg0 quad)) + (set! (-> s3-0 min 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 fb2cced2d1..633f9743ff 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 e90922207d..1a7e16c3ce 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 bd2d8e3a84..93d2f2aa3b 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 b23d6c0fb9..ca6a674ad9 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 359f510063..3dd82d20ea 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 a8c1ee86fc..768f6d6f75 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 cb7e431821..5989a7dd3a 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 9e33c8c3aa..039763985a 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 02b5e7d705..a187772d6a 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 38279da106..f656207fef 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 8fa830aed9..2d6dd41a78 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 968275c594..52dba41f2d 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 ee417a088c..eec1220d93 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/chase/kanga-lizard.gc b/goal_src/jak3/levels/wascity/chase/kanga-lizard.gc index 5696ee23b8..1a8354b95a 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/cty-attack-controller.gc b/goal_src/jak3/levels/wascity/cty-attack-controller.gc index 14509865fd..170496e3b8 100644 --- a/goal_src/jak3/levels/wascity/cty-attack-controller.gc +++ b/goal_src/jak3/levels/wascity/cty-attack-controller.gc @@ -7,3 +7,8 @@ ;; DECOMP BEGINS +;; stub +(defun cty-attack-reset ((arg0 symbol) (arg1 symbol) (arg2 symbol)) + (format 0 "skipping (cty-attack-reset ~A ~A ~A)~%" arg0 arg1 arg2) + (none) + ) \ No newline at end of file diff --git a/goal_src/jak3/levels/wascity/cty-faction.gc b/goal_src/jak3/levels/wascity/cty-faction.gc index f6b7bca5f7..eff871f52f 100644 --- a/goal_src/jak3/levels/wascity/cty-faction.gc +++ b/goal_src/jak3/levels/wascity/cty-faction.gc @@ -7,3 +7,13 @@ ;; DECOMP BEGINS +;; stub +(defun setup-city-task-faction () + (format 0 "skipping setup-city-task-faction~%") + 0 + ) + +(defun cty-faction-evaluate-commands ((arg0 pair)) + (format 0 "skipping (cty-faction-evaluate-commands ~A)~%" arg0) + 0 + ) \ No newline at end of file diff --git a/goal_src/jak3/levels/wascity/ctymark-obs-h.gc b/goal_src/jak3/levels/wascity/ctymark-obs-h.gc index 860d944a35..cbc9941621 100644 --- a/goal_src/jak3/levels/wascity/ctymark-obs-h.gc +++ b/goal_src/jak3/levels/wascity/ctymark-obs-h.gc @@ -7,3 +7,186 @@ ;; DECOMP BEGINS +(deftype market-object (crate) + ((sound-explode sound-spec) + (part-explode sparticle-launch-group) + (explode-matrix matrix :inline) + ) + ) + + +(defmethod init-collision! ((this market-object)) + (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 crate)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 7372.8 0.0 8192.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 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + knocked + ) + ) + (set! (-> this root) (the-as collide-shape-moving s5-0)) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch market-object vs none. +(defmethod init-skel! ((this market-object)) + (set! (-> this draw light-index) (the-as uint 10)) + (set! (-> this look) (-> this type symbol)) + (when (= (-> this fact pickup-type) (pickup-type eco-pill-random)) + (set! (-> this fact pickup-type) (pickup-type none)) + 0 + ) + (set! (-> this base quad) (-> this root trans quad)) + (crate-post) + (nav-mesh-connect-from-ent this) + (none) + ) + +(defstate idle (market-object) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((a1-1 (the-as object (-> block param 1))) + (a0-2 proc) + ) + (-> (the-as attack-info a1-1) id) + (let ((gp-0 (-> (the-as attack-info a1-1) count))) + (cond + ((and (logtest? (attack-mask penetrate-using) (-> (the-as attack-info a1-1) mask)) + (logtest? (penetrate jak-dark-nuke) (-> (the-as attack-info a1-1) penetrate-using)) + ) + (go-virtual die #t 0) + ) + (else + (when a0-2 + (let ((v1-9 (find-offending-process-focusable a0-2 (the-as attack-info a1-1)))) + (when v1-9 + (forward-up-nopitch->inv-matrix + (-> self explode-matrix) + (vector-! (new 'stack-no-clear 'vector) (-> v1-9 root trans) (-> self root trans)) + *up-vector* + ) + (set! (-> self explode-matrix trans quad) (-> self root trans quad)) + ) + ) + ) + (send-event proc 'get-attack-count 1) + (process-contact-action proc) + (set! (-> self target) (process->handle proc)) + (go-virtual die #f (the-as int gp-0)) + ) + ) + ) + ) + ) + (else + (crate-standard-event-handler proc argc message block) + ) + ) + ) + ) + +(defstate die (market-object) + :virtual #t + :enter (behavior ((arg0 symbol) (arg1 int)) + (when (not arg0) + (when (and (logtest? (-> self draw status) (draw-control-status on-screen)) + (< (vector-vector-xz-distance (-> self root trans) (camera-pos)) 409600.0) + ) + (if (logtest? (-> self part-explode flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> self part-explode) + :mat-joint (-> self explode-matrix) + ) + (part-tracker-spawn part-tracker :to self :group (-> self part-explode) :mat-joint (-> self explode-matrix)) + ) + ) + (if (nonzero? (-> self sound-explode)) + (sound-play-by-spec (-> self sound-explode) (new-sound-id) (the-as vector #t)) + ) + ) + (let* ((t9-10 find-parent-method) + (a0-9 market-object) + (a1-9 30) + (t9-11 (-> (the-as (state symbol int market-object) (t9-10 a0-9 a1-9)) enter)) + ) + (if t9-11 + (t9-11 (the-as symbol a0-9) a1-9) + ) + ) + ) + ) + +(deftype market-basket-a (market-object) + () + ) + + +(deftype market-basket-b (market-object) + () + ) + + +(deftype market-crate (market-object) + () + ) + + +(deftype market-sack-a (market-object) + () + ) + + +(deftype market-sack-b (market-object) + () + ) + + +(deftype fruit-stand (process-focusable) + ((incoming-attack-id uint32) + (hack-counter uint32) + (count-sparts uint32) + (first-sparts uint32) + (num-sparts uint32) + (sparts-index uint32 4) + (sparts-pos vector 4 :inline) + (parts-alive? symbol) + ) + (:state-methods + idle + ) + (:methods + (fruit-stand-method-29 (_type_) none) + (fruit-stand-method-30 (_type_) none) + ) + ) diff --git a/goal_src/jak3/levels/wascity/ctymark-obs.gc b/goal_src/jak3/levels/wascity/ctymark-obs.gc index 7cc3595937..090c849536 100644 --- a/goal_src/jak3/levels/wascity/ctymark-obs.gc +++ b/goal_src/jak3/levels/wascity/ctymark-obs.gc @@ -7,3 +7,1544 @@ ;; DECOMP BEGINS +(defpartgroup group-mcrate-explode + :id 248 + :duration (seconds 3.335) + :flags (sp0 sp6) + :bounds (static-bspherem 0 0 0 12) + :rotate ((degrees 0) (degrees 90) (degrees 0)) + :parts ((sp-item 1117 :fade-after (meters 40) :falloff-to (meters 80) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.035)) + (sp-item 1118 :fade-after (meters 100) :falloff-to (meters 120) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1119 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp7) :period (seconds 4) :length (seconds 0.135)) + (sp-item 1120 :fade-after (meters 60) :falloff-to (meters 90) :flags (sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1121 :fade-after (meters 50) :period (seconds 4) :length (seconds 0.017)) + ) + ) + +(defpart 1119 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 16.0 3.0) + (:y (meters 0) (meters 1)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 2) (meters 2)) + (:r 128.0) + (:g 64.0 32.0) + (:b 0.0 32.0) + (:a 16.0 8.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:scalevel-x (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters 0) (meters 0.0033333334)) + (:fade-a -0.02 -0.02) + (:accel-y (meters -0.00033333333) (meters -0.00083333335)) + (:friction 0.82 0.07) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1120 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 8.0 3.0) + (:y (meters 0) (meters 1)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 2) (meters 2)) + (:r 0.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 16.0 8.0) + (:vel-y (meters 0.05) (meters 0.033333335)) + (:scalevel-x (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters 0) (meters 0.0033333334)) + (:fade-a -0.02 -0.02) + (:accel-y (meters -0.00033333333) (meters -0.00083333335)) + (:friction 0.82 0.07) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1121 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 1)) + (:scale-x (meters 4)) + (:rot-x (degrees 0.675)) + (:scale-y (meters 6)) + (:r 255.0) + (:g 196.0) + (:b 128.0) + (:a 64.0) + (:omega (degrees 1136.25)) + (:scalevel-x (meters 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -2.56) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1024.0) + ) + ) + +(defpart 1118 + :init-specs ((:texture (new 'static 'texture-id :index #x15 :page #xc1)) + (:num 12.0 6.0) + (:y (meters 0) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 0.1) (meters 0.5)) + (: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.5)) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.083333336) (meters 0.05)) + (:scalevel-x (meters -0.00022222222)) + (:rotvel-x (degrees -4.8) (degrees 9.6)) + (:rotvel-y (degrees -4.8) (degrees 9.6)) + (:rotvel-z (degrees -4.8) (degrees 9.6)) + (:scalevel-y (meters -0.00022222222)) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.92 0.07) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-market-piece-ground) + (:next-time (seconds 4)) + (:next-launcher 1122) + (:conerot-x (degrees 0) (degrees 110)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1117 + :init-specs ((:texture (new 'static 'texture-id :index #x15 :page #xc1)) + (:num 6.0 3.0) + (:y (meters 0) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 0.3) (meters 2)) + (:rot-x (degrees 0) (degrees 3600)) + (:rot-y (degrees 0) (degrees 3600)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.3) (meters 0.6)) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.1) (meters 0.06666667)) + (:rotvel-x (degrees -4.8) (degrees 9.6)) + (:rotvel-y (degrees -4.8) (degrees 9.6)) + (:rotvel-z (degrees -4.8) (degrees 9.6)) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.92 0.07) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-market-piece-ground) + (:next-time (seconds 0.4)) + (:next-launcher 1122) + (:conerot-x (degrees 0) (degrees 110)) + (:conerot-y (degrees 15) (degrees 150)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-mbasket-a-explode + :id 249 + :duration (seconds 3.335) + :flags (sp0 sp6) + :bounds (static-bspherem 0 0 0 12) + :rotate ((degrees 0) (degrees 90) (degrees 0)) + :parts ((sp-item 1123 :fade-after (meters 40) :falloff-to (meters 80) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.035)) + (sp-item 1124 :fade-after (meters 100) :falloff-to (meters 120) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1125 :fade-after (meters 40) :falloff-to (meters 60) :flags (sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1126 :fade-after (meters 100) :falloff-to (meters 120) :flags (sp7) :period (seconds 4) :length (seconds 0.1)) + (sp-item 1127 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp7) :period (seconds 4) :length (seconds 0.135)) + (sp-item 1128 :fade-after (meters 60) :falloff-to (meters 90) :flags (sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1129 :fade-after (meters 50) :period (seconds 4) :length (seconds 0.017)) + ) + ) + +(defpart 1126 + :init-specs ((:texture (specs level-default-sprite)) + (:num 32.0) + (:y (meters 0) (meters 3)) + (:z (meters -1.5) (meters 3)) + (:scale-x (meters 2) (meters 0.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g :copy r) + (:b 128.0 64.0) + (:a 92.0 32.0) + (:vel-y (meters 0.033333335) (meters 0.06666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:fade-a -0.16 -0.16) + (:accel-y (meters -0.0016666667) (meters -0.00083333335)) + (:friction 0.95 0.03) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1125 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 32.0) + (:y (meters 0.5) (meters 1)) + (:scale-x (meters 0.1) (meters 0.05)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g :copy r) + (:b 64.0 32.0) + (:a 128.0) + (:omega (degrees 0.01575) (degrees 0.009)) + (:vel-y (meters 0.033333335) (meters 0.083333336)) + (:accel-y (meters -0.003) (meters -0.00066666666)) + (:friction 0.96 0.02) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 set-conerot)) + (:userdata 30720.0) + (:func 'check-water-level-drop-motion) + (:next-time (seconds 0) (seconds 0.58)) + (:next-launcher 41) + (:conerot-x (degrees 0) (degrees 85)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + (:conerot-radius (meters 0) (meters 1)) + ) + ) + +(defpart 1127 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 6.0 2.0) + (:y (meters 0) (meters 2)) + (:z (meters -1.5) (meters 3)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 2) (meters 2)) + (:r 64.0 64.0) + (:g 128.0 128.0) + (:b 255.0) + (:a 16.0 8.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:scalevel-x (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters 0) (meters 0.0033333334)) + (:fade-a -0.02 -0.02) + (:accel-y (meters -0.00083333335) (meters -0.00083333335)) + (:friction 0.82 0.07) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1128 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 4.0 3.0) + (:y (meters 0) (meters 4)) + (:z (meters -1.5) (meters 3)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 2) (meters 2)) + (:r 0.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 16.0 8.0) + (:vel-y (meters 0.05) (meters 0.033333335)) + (:scalevel-x (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters 0) (meters 0.0033333334)) + (:fade-a -0.02 -0.02) + (:accel-y (meters -0.00033333333) (meters -0.00083333335)) + (:friction 0.82 0.07) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1129 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 2)) + (:scale-x (meters 7)) + (:rot-x (degrees 0.675)) + (:scale-y (meters 5)) + (:r 64.0) + (:g 196.0) + (:b 255.0) + (:a 64.0) + (:omega (degrees 1136.25)) + (:scalevel-x (meters 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -2.56) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1024.0) + ) + ) + +(defpart 1124 + :init-specs ((:texture (new 'static 'texture-id :index #x2 :page #xc1)) + (:birth-func 'birth-func-texture-group) + (:num 12.0 6.0) + (:y (meters 0.5) (meters 4)) + (:z (meters -1.5) 1 (meters 3)) + (:scale-x (meters 0.2) (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.2) (meters 0.3)) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.083333336) (meters 0.05)) + (:scalevel-x (meters -0.00022222222)) + (:rotvel-x (degrees -4.8) (degrees 9.6)) + (:rotvel-y (degrees -4.8) (degrees 9.6)) + (:rotvel-z (degrees -4.8) (degrees 9.6)) + (:scalevel-y (meters -0.00022222222)) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.92 0.07) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #xc100200 #xc100c00)) + (:func 'check-market-piece-ground) + (:next-time (seconds 4)) + (:next-launcher 1122) + (:conerot-x (degrees 0) (degrees 110)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1123 + :init-specs ((:texture (new 'static 'texture-id :index #x2 :page #xc1)) + (:birth-func 'birth-func-texture-group) + (:num 6.0 3.0) + (:y (meters 0.5) (meters 4)) + (:z (meters -1.5) 1 (meters 3)) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-x (degrees 0) (degrees 3600)) + (:rot-y (degrees 0) (degrees 3600)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.5) (meters 0.5)) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.1) (meters 0.06666667)) + (:rotvel-x (degrees -4.8) (degrees 9.6)) + (:rotvel-y (degrees -4.8) (degrees 9.6)) + (:rotvel-z (degrees -4.8) (degrees 9.6)) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.92 0.07) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #xc100200 #xc100c00)) + (:func 'check-market-piece-ground) + (:next-time (seconds 0.4)) + (:next-launcher 1122) + (:conerot-x (degrees 0) (degrees 110)) + (:conerot-y (degrees 15) (degrees 150)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-mbasket-b-explode + :id 250 + :duration (seconds 3.335) + :flags (sp0 sp6) + :bounds (static-bspherem 0 0 0 12) + :rotate ((degrees 0) (degrees 90) (degrees 0)) + :parts ((sp-item 1130 :fade-after (meters 40) :falloff-to (meters 80) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.035)) + (sp-item 1131 :fade-after (meters 100) :falloff-to (meters 120) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1132 :fade-after (meters 60) :falloff-to (meters 90) :flags (sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1133 :fade-after (meters 60) :falloff-to (meters 90) :flags (sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1134 :fade-after (meters 100) :falloff-to (meters 120) :flags (sp7) :period (seconds 4) :length (seconds 0.1)) + (sp-item 1135 :fade-after (meters 30) :falloff-to (meters 40) :flags (is-3d) :period (seconds 4) :length (seconds 0.335)) + (sp-item 1136 :fade-after (meters 50) :period (seconds 4) :length (seconds 0.017)) + ) + ) + +(defpart 1134 + :init-specs ((:texture (specs level-default-sprite)) + (:num 32.0) + (:y (meters 0) (meters 1)) + (:z (meters -1.5) (meters 3)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 1) (meters 1)) + (:r 255.0) + (:g :copy r) + (:b :copy g) + (:a 92.0 32.0) + (:vel-y (meters 0.033333335) (meters 0.06666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:fade-a -0.16 -0.16) + (:accel-y (meters -0.0016666667) (meters -0.00083333335)) + (:friction 0.95 0.03) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1135 + :init-specs ((:texture (specs level-default-sprite)) + (:num 2.0) + (:x (meters -3) (meters 6)) + (:y (meters 0.05)) + (:z (meters -3) (meters 6)) + (:scale-x (meters 1.5) (meters 1)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 1.5) (meters 1)) + (:r 255.0) + (:g :copy r) + (:b :copy g) + (:a 0.0) + (:fade-a 3.2) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 0.135)) + (:next-launcher 1137) + ) + ) + +(defpart 1137 + :init-specs ((:fade-a 0.0) (:next-time (seconds 1) (seconds 0.997)) (:next-launcher 1138)) + ) + +(defpart 1138 + :init-specs ((:fade-a -0.21333334 -0.21333334)) + ) + +(defpart 1132 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 6.0 3.0) + (:y (meters 0) (meters 1)) + (:z (meters -1.5) (meters 3)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 2) (meters 2)) + (:r 192.0 64.0) + (:g :copy r) + (:b :copy g) + (:a 16.0 8.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:scalevel-x (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters 0) (meters 0.0033333334)) + (:fade-a -0.02 -0.02) + (:accel-y (meters -0.00033333333) (meters -0.00083333335)) + (:friction 0.82 0.07) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1133 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 12.0 3.0) + (:y (meters 0) (meters 1)) + (:z (meters -1.5) (meters 3)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 2) (meters 2)) + (:r 0.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 16.0 8.0) + (:vel-y (meters 0.05) (meters 0.033333335)) + (:scalevel-x (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters 0) (meters 0.0033333334)) + (:fade-a -0.02 -0.02) + (:accel-y (meters -0.00033333333) (meters -0.00083333335)) + (:friction 0.82 0.07) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1136 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:scale-x (meters 3)) + (:rot-x (degrees 0.675)) + (:scale-y (meters 7)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0) + (:omega (degrees 1136.25)) + (:scalevel-x (meters 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -2.56) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1024.0) + ) + ) + +(defpart 1131 + :init-specs ((:texture (new 'static 'texture-id :page #xc1)) + (:num 6.0 3.0) + (:y (meters 0.5) (meters 0.5)) + (:z (meters -1.5) 1 (meters 3)) + (:scale-x (meters 0.2) (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.2) (meters 0.3)) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.083333336) (meters 0.05)) + (:scalevel-x (meters -0.00022222222)) + (:rotvel-x (degrees -4.8) (degrees 9.6)) + (:rotvel-y (degrees -4.8) (degrees 9.6)) + (:rotvel-z (degrees -4.8) (degrees 9.6)) + (:scalevel-y (meters -0.00022222222)) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.92 0.07) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-market-piece-ground) + (:next-time (seconds 4)) + (:next-launcher 1122) + (:conerot-x (degrees 0) (degrees 110)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1130 + :init-specs ((:texture (new 'static 'texture-id :page #xc1)) + (:num 4.0 2.0) + (:y (meters 0.5) (meters 0.5)) + (:z (meters -1.5) 1 (meters 3)) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-x (degrees 0) (degrees 3600)) + (:rot-y (degrees 0) (degrees 3600)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.5) (meters 0.5)) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.1) (meters 0.06666667)) + (:rotvel-x (degrees -4.8) (degrees 9.6)) + (:rotvel-y (degrees -4.8) (degrees 9.6)) + (:rotvel-z (degrees -4.8) (degrees 9.6)) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.92 0.07) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-market-piece-ground) + (:next-time (seconds 0.4)) + (:next-launcher 1122) + (:conerot-x (degrees 0) (degrees 110)) + (:conerot-y (degrees 15) (degrees 150)) + (:rotate-y (degrees 0)) + ) + ) + +;; WARN: Return type mismatch number vs none. +(defun check-market-piece-ground ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (if (and (>= 35225.6 (-> arg2 launchrot y)) (>= 0.0 (-> arg1 vel-sxvel y))) + (set! (-> arg2 launchrot y) 35225.6) + (set! (-> arg1 next-time) + (the-as uint (* (max 1 (the-as int (-> *display* clock (-> arg1 clock-index) sparticle-data x))) 2)) + ) + ) + (none) + ) + +(defpart 1122 + :init-specs ((:rot-x (degrees 0)) + (:rot-y (degrees 0) (degrees 3600)) + (:rot-z (degrees 0)) + (:vel-y (meters 0)) + (:rotvel-x (degrees 0)) + (:rotvel-y (degrees 0)) + (:rotvel-z (degrees 0)) + (:accel-y (meters 0)) + (:friction 0.8 0.1) + (:timer (seconds 4)) + (:next-time (seconds 0.5) (seconds 0.997)) + (:next-launcher 1139) + ) + ) + +(defpart 1139 + :init-specs ((:fade-a -0.21333334 -0.21333334) (:flags (sp-cpuinfo-flag-2 left-multiply-quat))) + ) + +(defpartgroup group-msack-a-explode + :id 251 + :duration (seconds 3.335) + :flags (sp0 sp6) + :bounds (static-bspherem 0 0 0 12) + :rotate ((degrees 0) (degrees 90) (degrees 0)) + :parts ((sp-item 1140 :fade-after (meters 40) :falloff-to (meters 80) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.035)) + (sp-item 1141 :fade-after (meters 100) :falloff-to (meters 120) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1142 :fade-after (meters 100) :falloff-to (meters 120) :flags (sp7) :period (seconds 4) :length (seconds 0.1)) + (sp-item 1143 :fade-after (meters 30) :falloff-to (meters 40) :flags (is-3d) :period (seconds 4) :length (seconds 0.335)) + (sp-item 1144 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp7) :period (seconds 4) :length (seconds 0.135)) + (sp-item 1145 :fade-after (meters 60) :falloff-to (meters 90) :flags (sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1146 :fade-after (meters 50) :period (seconds 4) :length (seconds 0.017)) + ) + ) + +(defpart 1142 + :init-specs ((:texture (new 'static 'texture-id :index #x10 :page #xc1)) + (:num 32.0) + (:y (meters 0) (meters 1)) + (:z (meters -1.5) (meters 3)) + (:scale-x (meters 0.1) (meters 0.05)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.3) (meters 0.6)) + (:r 128.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 96.0 32.0) + (:vel-y (meters 0.033333335) (meters 0.06666667)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:scalevel-y (meters 0.00033333333)) + (:fade-a -0.16 -0.16) + (:accel-y (meters -0.0016666667) (meters -0.00083333335)) + (:friction 0.95 0.03) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1143 + :init-specs ((:texture (new 'static 'texture-id :index #x11 :page #xc1)) + (:num 1.0 1.0) + (:x (meters -3) (meters 6)) + (:y (meters 0.05)) + (:z (meters -3) (meters 6)) + (:scale-x (meters 1.5) (meters 1.5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 1.5) (meters 1.5)) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 0.0) + (:fade-a 1.6) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 0.2) (seconds 0.065)) + (:next-launcher 1137) + ) + ) + +(defpart 1144 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 8.0 3.0) + (:y (meters 0) (meters 3)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 2) (meters 2)) + (:r 150.0 60.0) + (:g 96.0 64.0) + (:b 0.0 32.0) + (:a 16.0 8.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:scalevel-x (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters 0) (meters 0.0033333334)) + (:fade-a -0.02 -0.02) + (:accel-y (meters -0.00033333333) (meters -0.00083333335)) + (:friction 0.82 0.07) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1145 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 6.0 3.0) + (:y (meters 0) (meters 3)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 2) (meters 2)) + (:r 0.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 16.0 8.0) + (:vel-y (meters 0.05) (meters 0.033333335)) + (:scalevel-x (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters 0) (meters 0.0033333334)) + (:fade-a -0.02 -0.02) + (:accel-y (meters -0.00033333333) (meters -0.00083333335)) + (:friction 0.82 0.07) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1146 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 1)) + (:scale-x (meters 5)) + (:rot-x (degrees 0.675)) + (:scale-y (meters 4.5)) + (:r 255.0) + (:g 255.0) + (:b 32.0) + (:a 64.0) + (:omega (degrees 1136.25)) + (:scalevel-x (meters 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -2.56) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1024.0) + ) + ) + +(defpart 1141 + :init-specs ((:texture (new 'static 'texture-id :index #x3 :page #xc1)) + (:num 8.0 3.0) + (:y (meters 0) (meters 3)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 0.2) (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.2) (meters 0.3)) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.083333336) (meters 0.05)) + (:scalevel-x (meters -0.00022222222)) + (:rotvel-x (degrees -4.8) (degrees 9.6)) + (:rotvel-y (degrees -4.8) (degrees 9.6)) + (:rotvel-z (degrees -4.8) (degrees 9.6)) + (:scalevel-y (meters -0.00022222222)) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.92 0.07) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-market-piece-ground) + (:next-time (seconds 4)) + (:next-launcher 1122) + (:conerot-x (degrees 0) (degrees 110)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1140 + :init-specs ((:texture (new 'static 'texture-id :index #x3 :page #xc1)) + (:num 4.0 2.0) + (:y (meters 0) (meters 3)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-x (degrees 0) (degrees 3600)) + (:rot-y (degrees 0) (degrees 3600)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.5) (meters 0.5)) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.1) (meters 0.06666667)) + (:rotvel-x (degrees -4.8) (degrees 9.6)) + (:rotvel-y (degrees -4.8) (degrees 9.6)) + (:rotvel-z (degrees -4.8) (degrees 9.6)) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.92 0.07) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-market-piece-ground) + (:next-time (seconds 0.4)) + (:next-launcher 1122) + (:conerot-x (degrees 0) (degrees 110)) + (:conerot-y (degrees 15) (degrees 150)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-msack-b-explode + :id 252 + :duration (seconds 3.335) + :flags (sp0 sp6) + :bounds (static-bspherem 0 0 0 12) + :rotate ((degrees 0) (degrees 90) (degrees 0)) + :parts ((sp-item 1147 :fade-after (meters 100) :falloff-to (meters 120) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1148 :fade-after (meters 100) :falloff-to (meters 120) :flags (sp7) :period (seconds 4) :length (seconds 0.1)) + (sp-item 1149 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp7) :period (seconds 4) :length (seconds 0.135)) + (sp-item 1150 :fade-after (meters 60) :falloff-to (meters 90) :flags (sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1151 :fade-after (meters 50) :period (seconds 4) :length (seconds 0.017)) + ) + ) + +(defpart 1148 + :init-specs ((:texture (new 'static 'texture-id :index #x1 :page #xc1)) + (:num 32.0) + (:y (meters 0) (meters 1)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 0.2) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:fade-a -0.16 -0.16) + (:accel-y (meters -0.0033333334) (meters -0.00083333335)) + (:friction 0.95 0.03) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-market-piece-ground) + (:next-time (seconds 3.335)) + (:next-launcher 1152) + (:conerot-x (degrees 0) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1152 + :init-specs ((:vel-y (meters 0)) + (:rotvel-z (degrees 0)) + (:accel-y (meters 0)) + (:friction 0.8 0.1) + (:timer (seconds 5.667)) + (:next-time (seconds 1.5) (seconds 0.997)) + (:next-launcher 1139) + ) + ) + +(defpart 1149 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 6.0 2.0) + (:y (meters 0) (meters 1)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 1) (meters 1)) + (:r 150.0 60.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 16.0 8.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:scalevel-x (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters 0) (meters 0.0033333334)) + (:fade-a -0.02 -0.02) + (:accel-y (meters -0.00033333333) (meters -0.00083333335)) + (:friction 0.82 0.07) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1150 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 5.0 2.0) + (:y (meters 0) (meters 1)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 1) (meters 1)) + (:r 0.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 16.0 8.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:scalevel-x (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters 0) (meters 0.0033333334)) + (:fade-a -0.02 -0.02) + (:accel-y (meters -0.00033333333) (meters -0.00083333335)) + (:friction 0.82 0.07) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1151 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 1)) + (:scale-x (meters 3)) + (:rot-x (degrees 0.675)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0) + (:b 64.0) + (:a 64.0) + (:omega (degrees 1136.25)) + (:scalevel-x (meters 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -2.56) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1024.0) + ) + ) + +(defpart 1147 + :init-specs ((:texture (new 'static 'texture-id :index #x3 :page #xc1)) + (:num 6.0 2.0) + (:y (meters 0) (meters 3)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 0.1) (meters 0.2)) + (: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.2)) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.083333336) (meters 0.05)) + (:scalevel-x (meters -0.00022222222)) + (:rotvel-x (degrees -4.8) (degrees 9.6)) + (:rotvel-y (degrees -4.8) (degrees 9.6)) + (:rotvel-z (degrees -4.8) (degrees 9.6)) + (:scalevel-y (meters -0.00022222222)) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.92 0.07) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-market-piece-ground) + (:next-time (seconds 4)) + (:next-launcher 1122) + (:conerot-x (degrees 0) (degrees 110)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +(defskelgroup skel-market-basket-a market-basket-a market-basket-a-lod0-jg market-basket-a-idle-ja + ((market-basket-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 2.5) + ) + +;; WARN: Return type mismatch market-basket-a vs none. +(defmethod init-skel! ((this market-basket-a)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-market-basket-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part-explode) (-> *part-group-id-table* 249)) + (set! (-> this sound-explode) (static-sound-spec "break-vase" :group 0)) + (call-parent-method this) + (none) + ) + +(defskelgroup skel-market-basket-b market-basket-b market-basket-b-lod0-jg market-basket-b-idle-ja + ((market-basket-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; WARN: Return type mismatch market-basket-b vs none. +(defmethod init-skel! ((this market-basket-b)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-market-basket-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part-explode) (-> *part-group-id-table* 250)) + (set! (-> this sound-explode) (static-sound-spec "break-flour" :group 0)) + (call-parent-method this) + (none) + ) + +(defskelgroup skel-market-crate market-crate market-crate-lod0-jg market-crate-idle-ja + ((market-crate-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; WARN: Return type mismatch market-crate vs none. +(defmethod init-skel! ((this market-crate)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-market-crate" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part-explode) (-> *part-group-id-table* 248)) + (set! (-> this sound-explode) (static-sound-spec "break-crate" :group 0)) + (call-parent-method this) + (none) + ) + +(defskelgroup skel-market-sack-a market-sack-a market-sack-a-lod0-jg market-sack-a-idle-ja + ((market-sack-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1 0 2) + ) + +;; WARN: Return type mismatch market-sack-a vs none. +(defmethod init-skel! ((this market-sack-a)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-market-sack-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part-explode) (-> *part-group-id-table* 251)) + (set! (-> this sound-explode) (static-sound-spec "break-crate" :group 0)) + (call-parent-method this) + (none) + ) + +(defskelgroup skel-market-sack-b market-sack-b market-sack-b-lod0-jg market-sack-b-idle-ja + ((market-sack-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1 0 2) + ) + +;; WARN: Return type mismatch market-sack-b vs none. +(defmethod init-skel! ((this market-sack-b)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-market-sack-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part-explode) (-> *part-group-id-table* 252)) + (set! (-> this sound-explode) (static-sound-spec "break-veg-straw" :group 0)) + (call-parent-method this) + (none) + ) + +(defun market-activate ((arg0 level)) + (let* ((v1-0 (-> arg0 name)) + (gp-0 (cond + ((= v1-0 'ctymarka) + (new 'static 'boxed-array :type int32 5 0 0 #xc100200 #xc100c00) + ) + ((= v1-0 'ctymarkb) + (new 'static 'boxed-array :type int32 5 0 0 #xcd00200 #xcd00c00) + ) + ((= v1-0 'waswide) + (new 'static 'boxed-array :type int32 5 0 0 #x29a01400 #x29a01500) + ) + (else + (format 0 "ERROR: market-activate called for unknown level ~A~%" (-> arg0 name)) + ) + ) + ) + ) + (set! (-> (get-field-spec-by-id (-> *part-id-table* 1124) (sp-field-id spt-userdata)) initial-valuef) + (the-as float gp-0) + ) + (set! (-> (get-field-spec-by-id (-> *part-id-table* 1123) (sp-field-id spt-userdata)) initial-valuef) + (the-as float gp-0) + ) + ) + (setup-special-textures (-> *part-id-table* 1118) "wood-plain-debris") + (setup-special-textures (-> *part-id-table* 1117) "wood-plain-debris") + (setup-special-textures (-> *part-id-table* 1124) "clay-pot-debris-01") + (setup-special-textures (-> *part-id-table* 1123) "clay-pot-debris-01") + (setup-special-textures (-> *part-id-table* 1131) "basket-debris-01") + (setup-special-textures (-> *part-id-table* 1130) "basket-debris-01") + (setup-special-textures (-> *part-id-table* 1141) "cotton-wrap-debris") + (setup-special-textures (-> *part-id-table* 1140) "cotton-wrap-debris") + (setup-special-textures (-> *part-id-table* 1147) "basket-debris-01") + (setup-special-textures (-> *part-id-table* 1142) "straw-bit") + (setup-special-textures (-> *part-id-table* 1143) "straw-ground") + (setup-special-textures (-> *part-id-table* 1148) "cherry") + 0 + (none) + ) + +(define *fruit-check-ground-counter* 0) + +(defun fruit-check-ground-bounce ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 matrix)) + (let ((v1-1 (-> arg1 key proc)) + (f0-0 (-> arg1 user-float)) + ) + (set! (-> (the-as fruit-stand (+ (* (-> (the-as fruit-stand v1-1) num-sparts) 4) (the-as uint v1-1))) + sparts-index + 0 + ) + (the-as uint arg3) + ) + (when (and (>= (-> (the-as fruit-stand v1-1) count-sparts) (-> (the-as fruit-stand v1-1) first-sparts)) + (nonzero? (-> (the-as fruit-stand v1-1) hack-counter)) + ) + (set-vector! + (-> (the-as fruit-stand v1-1) sparts-pos (-> (the-as fruit-stand v1-1) num-sparts)) + (-> arg2 launchrot x) + (-> arg2 launchrot y) + (-> arg2 launchrot z) + 1.0 + ) + (+! (-> (the-as fruit-stand v1-1) num-sparts) 1) + (+! (-> (the-as fruit-stand v1-1) hack-counter) -1) + ) + (+! (-> (the-as fruit-stand v1-1) count-sparts) 1) + (when (and (< (-> arg2 launchrot y) f0-0) (< (-> arg1 vel-sxvel y) 0.0)) + (set! (-> arg2 launchrot y) f0-0) + (if (and (< (-> arg1 vel-sxvel y) -122.88) (< (rand-vu-int-count 10) 3)) + (set-vector! + (new 'stack-no-clear 'vector) + (-> arg2 launchrot x) + (-> arg2 launchrot y) + (-> arg2 launchrot z) + 1.0 + ) + ) + (set! (-> arg1 vel-sxvel y) (* (-> arg1 vel-sxvel y) (- (rand-vu-float-range 0.6 0.8)))) + ) + ) + ) + +(defun fruit-sparticle-next-on-mode-1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (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 (-> arg1 key))) + (cond + ((zero? (-> s5-0 state-mode 0)) + (set! (-> arg1 next-time) + (the-as uint (* (max 1 (the-as int (-> *display* clock (-> arg1 clock-index) sparticle-data x))) 2)) + ) + ) + (else + (let ((s4-0 (new 'stack-no-clear 'vector))) + 0.0 + 0.0 + 0.0 + (let* ((f28-0 (/ 1.0 (* 0.00024414062 (-> arg1 omega)))) + (f26-0 (* (rand-vu-float-range -136.53334 136.53334) f28-0)) + (f30-0 (* (rand-vu-float-range 0.0 136.53334) f28-0)) + (f0-8 (* (rand-vu-float-range -13.653334 54.613335) f28-0)) + ) + (vector-float*! s4-0 (the-as vector (-> s5-0 origin)) f26-0) + (let ((a1-5 s4-0)) + (let ((v1-8 s4-0)) + (let ((a0-10 (-> s5-0 origin uvec))) + (let ((a2-1 f30-0)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-10 quad)) + ) + (.lvf vf4 (&-> v1-8 quad)) + ) + (.add.x.vf 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 ((a1-6 s4-0)) + (let ((v1-9 s4-0)) + (let ((a0-11 (-> s5-0 origin fvec))) + (let ((a2-2 f0-8)) + (.mov vf7 a2-2) + ) + (.lvf vf5 (&-> a0-11 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 (&-> a1-6 quad) vf6) + ) + ) + (set! (-> arg1 vel-sxvel x) (-> s4-0 x)) + (set! (-> arg1 vel-sxvel y) (-> s4-0 y)) + (set! (-> arg1 vel-sxvel z) (-> s4-0 z)) + ) + (-> arg1 vel-sxvel) + (set! (-> arg1 user-float) (+ (-> s5-0 origin trans y) (-> arg1 omega))) + ) + ) + ) + 0.0 + ) + ) + +(defpartgroup group-ctywide-fruit + :id 253 + :flags (sp0 sp6) + :bounds (static-bspherem 0 0 0 6) + :rotate ((degrees 30) (degrees 0) (degrees 0)) + :parts ((sp-item 1153 :flags (sp3 sp7)) + (sp-item 1154 :flags (sp3 sp7)) + (sp-item 1155 :flags (sp3 sp7)) + (sp-item 1156 :flags (sp3 sp7)) + (sp-item 1157 :flags (sp3 sp7)) + ) + ) + +(defpart 1153 + :init-specs ((:texture (fruit1 waswide-sprite)) + (:num 8.0 2.0) + (:x (meters 2.2) 2 (meters 0.75)) + (:y (meters 1.1)) + (:z (meters -1.25) 2 (meters 0.75)) + (:scale-x (meters 0.6) (meters 0.15)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0 40.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 9)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 aux-list sp-cpuinfo-flag-13 launch-along-z)) + (:userdata 1638.4) + (:func 'fruit-sparticle-next-on-mode-1) + (:next-launcher 1158) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1158 + :init-specs ((:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.96 0.02) + (:func 'fruit-check-ground-bounce) + (:next-time (seconds 2) (seconds 3.997)) + (:next-launcher 1159) + ) + ) + +(defpart 1157 + :init-specs ((:texture (fruit1 waswide-sprite)) + (:num 40.0) + (:x (meters -3.7) 7 (meters 0.25)) + (:y (meters 1.1)) + (:z (meters -1.1) 7 (meters 0.25)) + (:scale-x (meters 0.25) (meters 0.1)) + (:scale-y (meters 0.35) (meters 0.1)) + (:r 0.0 1 120.0) + (:g 90.0 20.0) + (:b 0.0 1 80.0) + (:a 128.0) + (:omega (degrees 4.5)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 aux-list sp-cpuinfo-flag-13 launch-along-z)) + (:userdata 819.2) + (:func 'fruit-sparticle-next-on-mode-1) + (:next-launcher 1160) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1156 + :init-specs ((:texture (fruit1 waswide-sprite)) + (:num 24.0) + (:x (meters -3.6) 7 (meters 0.25)) + (:y (meters 1.25)) + (:z (meters -1.075) 6 (meters 0.25)) + (:scale-x (meters 0.25) (meters 0.1)) + (:scale-y (meters 0.35) (meters 0.1)) + (:r 0.0 1 120.0) + (:g 90.0 20.0) + (:b 0.0 1 80.0) + (:a 128.0) + (:omega (degrees 4.5)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 aux-list sp-cpuinfo-flag-13 launch-along-z)) + (:userdata 819.2) + (:func 'fruit-sparticle-next-on-mode-1) + (:next-launcher 1160) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1160 + :init-specs ((:rot-z (degrees 0) (degrees 360)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.97 0.02) + (:func 'fruit-check-ground-bounce) + (:next-time (seconds 1.5) (seconds 2.997)) + (:next-launcher 1161) + ) + ) + +(defpart 1161 + :init-specs ((:rotvel-z (degrees 0)) (:fade-a -0.42666668)) + ) + +(defpart 1155 + :init-specs ((:texture (fruit1 waswide-sprite)) + (:num 32.0) + (:x (meters -0.8) 3 (meters 0.5)) + (:y (meters 1)) + (:z (meters -1) 3 (meters 0.5)) + (:scale-x (meters 0.4) (meters 0.15)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 100.0) + (:b 100.0) + (:a 128.0) + (:omega (degrees 6.7500005)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 aux-list sp-cpuinfo-flag-13 launch-along-z)) + (:userdata 1228.8) + (:func 'fruit-sparticle-next-on-mode-1) + (:next-launcher 1162) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1154 + :init-specs ((:texture (fruit1 waswide-sprite)) + (:num 32.0) + (:x (meters -0.55) 2 (meters 0.5)) + (:y (meters 1.25)) + (:z (meters -0.8) 2 (meters 0.5)) + (:scale-x (meters 0.4) (meters 0.15)) + (:scale-y :copy scale-x) + (:r 140.0 64.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 6.7500005)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 aux-list sp-cpuinfo-flag-13 launch-along-z)) + (:userdata 1228.8) + (:func 'fruit-sparticle-next-on-mode-1) + (:next-launcher 1162) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1162 + :init-specs ((:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.97 0.02) + (:func 'fruit-check-ground-bounce) + (:next-time (seconds 2) (seconds 3.997)) + (:next-launcher 1159) + ) + ) + +(defpart 1159 + :init-specs ((:fade-a -0.42666668)) + ) + +(defskelgroup skel-fruit-stand cty-fruit-stand cty-fruit-stand-lod0-jg cty-fruit-stand-idle-ja + ((cty-fruit-stand-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +;; WARN: Return type mismatch none vs object. +(defbehavior fruit-stand-event-handler fruit-stand ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('attack) + (let ((gp-0 (the-as attack-info (-> arg3 param 1)))) + (when (and (!= (-> gp-0 id) (-> self incoming-attack-id)) + (nonzero? (-> self part)) + (zero? (-> self part state-mode 0)) + ) + (sound-play "break-veg-wood") + (set! (-> self incoming-attack-id) (-> gp-0 id)) + (set! (-> self part state-mode 0) (the-as uint 1)) + (when (not (run-logic? self)) + (format 0 "Killing self!~%") + (when (-> self parts-alive?) + (set! (-> self parts-alive?) #f) + (kill-particles (-> self part)) + ) + ) + ) + ) + ) + ) + ) + +(defmethod run-logic? ((this fruit-stand)) + "Should this process be run? Checked by execute-process-tree." + (if (-> this parts-alive?) + (call-parent-method this) + #t + ) + ) + +(defstate idle (fruit-stand) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (fruit-stand-event-handler proc argc message block) + ) + :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 () + (when (-> self parts-alive?) + (dotimes (gp-0 (the-as int (-> self num-sparts))) + (let ((s5-0 (new 'stack-no-clear 'collide-query)) + (s4-0 (-> *sp-particle-system-2d* cpuinfo-table (-> self sparts-index gp-0))) + ) + (when (and (nonzero? (-> s4-0 key)) (= (-> s4-0 key group) (lookup-part-group-by-name "group-ctywide-fruit"))) + (set! (-> s5-0 start-pos quad) (-> self sparts-pos gp-0 quad)) + (+! (-> s5-0 start-pos y) 4096.0) + (set-vector! (-> s5-0 move-dist) 0.0 -40960.0 0.0 1.0) + (let ((v1-11 s5-0)) + (set! (-> v1-11 radius) (-> s4-0 omega)) + (set! (-> v1-11 collide-with) (collide-spec backgnd)) + (set! (-> v1-11 ignore-process0) #f) + (set! (-> v1-11 ignore-process1) #f) + (set! (-> v1-11 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-11 action-mask) (collide-action solid)) + ) + (let ((f0-7 (fill-and-probe-using-line-sphere *collide-cache* s5-0))) + (if (>= f0-7 0.0) + (set! (-> s4-0 user-float) (+ (-> s5-0 start-pos y) (* (-> s5-0 move-dist y) f0-7))) + ) + (when (< f0-7 0.0) + ) + ) + ) + ) + ) + (+! (-> self first-sparts) (-> self num-sparts)) + (when (>= (-> self first-sparts) (-> self count-sparts)) + (set! (-> self first-sparts) (the-as uint 0)) + 0 + ) + (set! (-> self num-sparts) (the-as uint 0)) + (set! (-> self hack-counter) (the-as uint 4)) + (set! (-> self count-sparts) (the-as uint 0)) + 0 + ) + (let ((a0-16 (new 'stack 'sphere))) + (set! (-> a0-16 quad) (-> self root trans quad)) + (set! (-> a0-16 r) (-> self root root-prim local-sphere w)) + (cond + ((or (= (-> self part state-mode 0) 1) + (and (sphere-in-view-frustum? a0-16) + (< (vector-vector-distance (-> self root trans) (math-camera-pos)) 491520.0) + ) + ) + (when (not (-> self parts-alive?)) + (initialize (-> self part) (-> *part-group-id-table* 253) self) + (set! (-> self parts-alive?) #t) + ) + (spawn-from-cspace (-> self part) (the-as cspace (-> self node-list data))) + ) + (else + (when (-> self parts-alive?) + (set! (-> self parts-alive?) #f) + (kill-particles (-> self part)) + ) + ) + ) + ) + (ja-post) + ) + ) + +(defmethod fruit-stand-method-29 ((this fruit-stand)) + (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 fruit-stand-method-30 ((this fruit-stand)) + (logior! (-> this mask) (process-mask crate)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 253) this)) + (set! (-> this parts-alive?) #t) + 0 + (none) + ) + +(defmethod init-from-entity! ((this fruit-stand) (arg0 entity-actor)) + (fruit-stand-method-29 this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-fruit-stand" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (fruit-stand-method-30 this) + (go (method-of-object this idle)) + ) 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 0652d8ed54..e86243dd8d 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 9cceb505a6..ac2f6a1c69 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/dogat.gc b/goal_src/jak3/levels/wascity/dogat.gc index 8a0f431e72..4c70e37aaa 100644 --- a/goal_src/jak3/levels/wascity/dogat.gc +++ b/goal_src/jak3/levels/wascity/dogat.gc @@ -7,3 +7,524 @@ ;; DECOMP BEGINS +(deftype dogat (nav-enemy) + ((rotation-matrix matrix :inline) + (scared-timer time-frame) + ) + (:state-methods + sit-idle + ) + (:methods + (dogat-method-191 (_type_) none) + ) + ) + + +(defskelgroup skel-dogat dogat dogat-lod0-jg dogat-idle-ja + ((dogat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :shadow dogat-shadow-mg + ) + +(define *dogat-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 7 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 15) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x4 + :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 15) + (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 15) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x6 + :param0 2 + :param1 4 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 4 + :notice-anim 3 + :hostile-anim 7 + :hit-anim -1 + :knocked-anim 8 + :knocked-land-anim 9 + :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 + :look-at-joint 23 + :bullseye-joint 3 + :sound-hit (static-sound-name "dogat-hit") + :sound-die (static-sound-name "dogat-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 + 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 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 #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 #f + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 7 + :turn-anim -1 + :run-anim 7 + :taunt-anim -1 + :run-travel-speed (meters 15) + :run-acceleration (meters 6) + :run-turning-acceleration (meters 50) + :walk-travel-speed (meters 7.5) + :walk-acceleration (meters 6) + :walk-turning-acceleration (meters 25) + :maximum-rotation-rate (degrees 1440) + :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! (-> *dogat-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; WARN: Return type mismatch symbol vs none. +(defbehavior dogat-travel-post dogat () + (none) + ) + +(defstate idle (dogat) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy idle) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self scared-timer) 0) + 0 + ) + ) + +(defstate sit-idle (dogat) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self state-timeout) (the-as time-frame (the int (* 300.0 (rand-vu-float-range 0.6 2.1))))) + (let ((v1-4 self)) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logclear (-> v1-4 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-4 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let ((v1-7 self)) + (set! (-> v1-7 enemy-flags) (the-as enemy-flag (logclear (-> v1-7 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + :trans (behavior () + (let ((v1-0 (-> self focus aware))) + (cond + ((= v1-0 (enemy-aware ea4)) + (go-flee self) + ) + ((< (the-as int v1-0) 1) + (go-virtual idle) + ) + ) + ) + (if (time-elapsed? (-> self state-time) (-> self state-timeout)) + (go-virtual active) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (let ((gp-0 (rand-vu-int-range 2 4))) + (dotimes (s5-0 gp-0) + (ja-no-eval :group! dogat-idle-sit-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.02)) + (let ((gp-1 (rand-vu-int-range 2 4))) + (dotimes (s5-1 gp-1) + (ja-no-eval :group! dogat-idle-situp-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.02)) + (let ((gp-2 (rand-vu-int-range 2 4))) + (dotimes (s5-2 gp-2) + (ja-no-eval :group! dogat-idle-eat-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.02)) + ) + #f + ) + :post (behavior () + (nav-enemy-simple-post) + ) + ) + +(defstate active (dogat) + :virtual #t + :enter (behavior () + (local-vars (v1-12 symbol) (v1-15 vector) (f0-4 float)) + (let ((t9-0 (-> (method-of-type nav-enemy active) enter))) + (if t9-0 + (t9-0) + ) + ) + (let* ((a2-0 (-> self root trans)) + (gp-0 (new 'stack-no-clear 'vector)) + (s4-0 (closest-point-on-mesh (-> self nav) gp-0 a2-0 (the-as nav-poly #f))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (let ((s3-0 0)) + (until (< f0-4 (sqrtf (+ (* (-> v1-15 x) (-> v1-15 x)) (* (-> v1-15 z) (-> v1-15 z))))) + (vector-rotate-around-y! s5-0 (-> self rotation-matrix fvec) (* 182.04445 (rand-vu-float-range -175.0 175.0))) + (vector-normalize! s5-0 (* 4096.0 (rand-vu-float-range 10.0 24.0))) + (clamp-vector-to-mesh-cross-gaps + (-> self nav) + gp-0 + s4-0 + s5-0 + 204.8 + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + (+! s3-0 1) + (when (< 6 s3-0) + (set! v1-12 #f) + (goto cfg-8) + ) + (set! f0-4 16384.0) + (set! v1-15 s5-0) + ) + ) + (set! v1-12 #t) + (label cfg-8) + (if v1-12 + (vector+! (-> self move-dest) gp-0 s5-0) + (set! (-> self move-dest quad) (-> gp-0 quad)) + ) + ) + ) + :trans (behavior () + '() + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! dogat-run0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ((-> (method-of-type nav-enemy active) trans)) + (if (< (vector-vector-xz-distance (-> self move-dest) (-> self root trans)) 8192.0) + (go-virtual sit-idle) + ) + ) + #f + ) + :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-method-187 self) + ) + ) + +(defstate notice (dogat) + :virtual #t + :enter (behavior () + (go-virtual flee) + ) + ) + +(defstate flee (dogat) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! (-> self draw art-group data (-> self enemy-info hostile-anim))) + (ja :num-func num-func-identity :frame-num 0.0) + (until #f + (suspend) + (ja :num! (loop! 2.0)) + ) + #f + ) + ) + +(defmethod go-hostile ((this dogat)) + (set-time! (-> this scared-timer)) + (go (method-of-object this flee)) + ) + +(defmethod enemy-method-108 ((this dogat) (arg0 process-focusable)) + (or (< (vector-vector-xz-distance (-> this root trans) (get-trans arg0 0)) 143360.0) + (not (time-elapsed? (-> this scared-timer) (seconds 4))) + ) + ) + +(defmethod send-attack-to-all-tshapes ((this dogat) (arg0 process-focusable) (arg1 event-message-block)) + 0 + ) + +(defmethod init-enemy-collision! ((this dogat)) + (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 projectile) + ) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 8192.0 0.0 9011.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 enemy)) + (set! (-> v1-13 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> v1-13 local-sphere) 0.0 4915.2 0.0 4915.2) + ) + (set! (-> s5-0 nav-radius) 4096.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) + ) + 0 + (none) + ) + +(defmethod enemy-method-50 ((this dogat) (arg0 int)) + (let ((v1-0 arg0)) + (cond + ((= v1-0 1) + (let ((v1-4 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 0))) + (set! (-> v1-4 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + ) + ) + ((or (= v1-0 2) (zero? v1-0)) + (set! (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 0 prim-core collide-with) + (collide-spec) + ) + 0 + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch shadow-control vs none. +(defmethod init-enemy! ((this dogat)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-dogat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *dogat-nav-enemy-info*) + (set-vector! (-> this root scale) 2.5 2.5 2.5 1.0) + (quaternion->matrix (-> this rotation-matrix) (-> this root quat)) + (logior! (-> this skel status) (joint-control-status sync-math)) + (logclear! (-> this mask) (process-mask enemy)) + (logior! (-> this mask) (process-mask civilian)) + (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 + ) + ) + (none) + ) diff --git a/goal_src/jak3/levels/wascity/doors/wasdoors-init.gc b/goal_src/jak3/levels/wascity/doors/wasdoors-init.gc index b737875637..a59d457a35 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 3c90f75457..895a3481cd 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 222b5d0b75..92e36db234 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 f1a9056031..07ec2b416c 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 cb08cf4186..3e8ea8e3b2 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/palace/throne-scenes.gc b/goal_src/jak3/levels/wascity/palace/throne-scenes.gc index a014d45916..bd883856ef 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 ecbe7fc195..ae47081448 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 2d8c83c323..046171720e 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 0ee8927176..48c2c23bca 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 ad637fdccd..ca1cf03f39 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 f5ae024e44..dde0eeaa56 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 6afb301438..9f4a840da5 100644 --- a/goal_src/jak3/levels/wascity/wasall-init.gc +++ b/goal_src/jak3/levels/wascity/wasall-init.gc @@ -7,3 +7,90 @@ ;; DECOMP BEGINS +(define *wasall-reserve* #f) + +(defun wasall-login ((arg0 level)) + (let ((gp-0 (the-as int (-> *game-info* current-vehicle)))) + (when (or (< (the-as uint gp-0) (the-as uint 12)) + (< (the-as uint 19) (the-as uint gp-0)) + (not (have-vehicle-v-type? gp-0)) + ) + (let ((s5-0 12)) + (countdown (s4-0 8) + (if (have-vehicle-v-type? s5-0) + (set! gp-0 s5-0) + ) + (+! s5-0 1) + ) + ) + (set! (-> *game-info* current-vehicle) (the-as game-vehicle-u8 gp-0)) + ) + ) + 0 + (none) + ) + +(defun wasall-logout ((arg0 level)) + (set! *trail-graph* #f) + 0 + (none) + ) + +(defun wasall-activate ((arg0 level)) + (let ((v1-0 *traffic-info*) + (a1-0 (-> arg0 name)) + ) + (set! (-> v1-0 vehicle-level) arg0) + (set! (-> v1-0 vehicle-levels 12) a1-0) + (set! (-> v1-0 vehicle-levels 13) a1-0) + (set! (-> v1-0 vehicle-levels 14) a1-0) + (set! (-> v1-0 vehicle-levels 15) a1-0) + (set! (-> v1-0 vehicle-levels 16) a1-0) + (set! (-> v1-0 vehicle-levels 17) a1-0) + (set! (-> v1-0 vehicle-levels 18) a1-0) + (set! (-> v1-0 vehicle-levels 19) a1-0) + ) + (vehicle-manager-start (the-as process *entity-pool*)) + 0 + (none) + ) + +(defun wasall-deactivate ((arg0 level)) + (let ((v1-0 *traffic-info*)) + (set! (-> v1-0 vehicle-level) (the-as level #f)) + ) + (vehicle-manager-kill) + 0 + (none) + ) + +(defun desert-game-activate ((arg0 level)) + (let ((v1-0 *traffic-info*) + (a0-1 (-> arg0 name)) + ) + (set! (-> v1-0 vehicle-levels 20) a0-1) + (set! (-> v1-0 vehicle-levels 22) a0-1) + (set! (-> v1-0 vehicle-levels 23) a0-1) + ) + 0 + (none) + ) + +(defun desert-race-level-activate ((arg0 level)) + (let ((v1-0 *traffic-info*) + (a1-0 (-> arg0 name)) + ) + (set! (-> v1-0 race-vehicle-level) arg0) + (set! (-> v1-0 vehicle-levels 20) a1-0) + ) + 0 + (none) + ) + +(defun desert-race-level-deactivate ((arg0 level)) + (let ((v1-0 *traffic-info*)) + (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 2661850f5b..9a66ee5905 100644 --- a/goal_src/jak3/levels/wascity/wasall-obs.gc +++ b/goal_src/jak3/levels/wascity/wasall-obs.gc @@ -7,3 +7,1673 @@ ;; DECOMP BEGINS +(defskelgroup skel-wascity-airlock wascity-airlock wascity-airlock-lod0-jg wascity-airlock-idle-ja + ((wascity-airlock-lod0-mg (meters 999999))) + :bounds (static-spherem 0 12 0 40) + ) + +(deftype wascity-airlock (com-airlock) + () + ) + + +(defmethod init-from-entity! ((this wascity-airlock) (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 49152.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)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 4) + (set-vector! (-> v1-8 local-sphere) 81920.0 40960.0 0.0 81920.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 5) + (set-vector! (-> v1-10 local-sphere) -81920.0 40960.0 0.0 81920.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-wascity-airlock" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this allow-pilot?) #t) + (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 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) + ) + +(defskelgroup skel-wascity-airlock-small wascity-airlock-small wascity-airlock-small-lod0-jg wascity-airlock-small-idle-ja + ((wascity-airlock-small-lod0-mg (meters 999999))) + :bounds (static-spherem 0 10 0 20) + ) + +(deftype wascity-airlock-small (com-airlock) + () + ) + + +(defmethod init-from-entity! ((this wascity-airlock-small) (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 3) 0))) + (set! (-> s5-0 total-prims) (the-as uint 4)) + (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 81920.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) 6) + (set-vector! (-> v1-8 local-sphere) 32768.0 0.0 0.0 40960.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (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) 7) + (set-vector! (-> v1-10 local-sphere) -32768.0 0.0 0.0 40960.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 jak bot player-list)) + (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 40960.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) + ) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-wascity-airlock-small" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (init-airlock! this) + (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 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) + ) + +(defskelgroup skel-wascity-elevator-door wascity-elevator-door wascity-elevator-door-lod0-jg wascity-elevator-door-idle-ja + ((wascity-elevator-door-lod0-mg (meters 20)) + (wascity-elevator-door-lod1-mg (meters 40)) + (wascity-elevator-door-lod2-mg (meters 999999)) + ) + :bounds (static-spherem 0 10 0 20) + ) + +(deftype wascity-elevator-door (com-airlock) + () + ) + + +(defstate open (wascity-elevator-door) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (let ((v1-0 message) + (a0-1 'front) + ) + (cond + ((= v1-0 a0-1) + (let ((f30-0 (check-crossing-distance self (target-pos 0) #f)) + (f0-0 (check-crossing-distance self (camera-pos) #f)) + ) + (and (logtest? (-> self draw status) (draw-control-status on-screen)) + (< 2048.0 f30-0) + (>= (* f30-0 f0-0) 0.0) + ) + ) + ) + (else + (let ((t9-4 (-> (method-of-type com-airlock open) event))) + (if t9-4 + (t9-4 (the-as process a0-1) argc message block) + ) + ) + ) + ) + ) + ) + ) + +(defmethod init-from-entity! ((this wascity-elevator-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 0.0 0.0 53248.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-wascity-elevator-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 "ver-open-hit" :group 0)) + (go (method-of-object this close) #t) + ) + +(deftype tentacle (process-drawable) + ((init-pos vector :inline) + (focus-pos vector :inline) + (nav-mesh nav-mesh) + (active-timer time-frame) + (fade-level float) + (sound-id-loop sound-id) + (sound-id-attack sound-id) + ) + (:state-methods + dormant + un-dive-player + attacking-0 + attacking-1 + kill-player + wait + ) + ) + + +(defskelgroup skel-tentacle tentacle tentacle-lod0-jg tentacle-emerge-ja + ((tentacle-lod0-mg (meters 999999))) + :bounds (static-spherem 0 20 0 20) + ) + +(defbehavior tentacle-follow-post tentacle () + (let ((a0-0 *target*)) + (when a0-0 + (set! (-> self focus-pos quad) (-> (get-trans a0-0 0) quad)) + (set-vector! (-> self root trans) (-> self focus-pos x) (-> self root trans y) (-> self focus-pos z) 1.0) + ) + ) + (ja-post) + (none) + ) + +(defbehavior tentacle-attack-handler tentacle ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('target) + (case (-> arg3 param 0) + (('die) + (when (= (-> arg3 param 1) 'tentacle) + (go-virtual kill-player) + #t + ) + ) + ) + ) + (('joint) + 3 + ) + ) + ) + +(defstate dormant (tentacle) + :virtual #t + :enter (behavior () + (set! (-> self active-timer) 0) + 0 + ) + :exit (behavior () + (set-setting! 'dive #f 0.0 0) + (set-setting! 'board #f 0.0 0) + (set-setting! 'gun #f 0.0 0) + (set-setting! 'jump #f 0.0 0) + (set-setting! 'double-jump #f 0.0 0) + (logior! (-> self draw status) (draw-control-status force-fade)) + (set! (-> self fade-level) 0.0) + (set! (-> self draw force-fade) (the-as uint (the int (* 128.0 (-> self fade-level))))) + ) + :trans (behavior () + (local-vars (v1-13 target)) + (if (not (-> self nav-mesh)) + (set! (-> self nav-mesh) (nav-mesh-from-res-tag (-> self entity) 'nav-mesh-actor 0)) + ) + (let ((gp-0 *target*)) + (if (not (and gp-0 + (not (focus-test? *target* dead flut)) + (-> self nav-mesh) + (= (-> *game-info* mode) 'play) + (nav-mesh-method-11 (-> self nav-mesh) (get-trans gp-0 0)) + (begin (set! v1-13 gp-0) v1-13) + (or (focus-test? v1-13 on-water under-water) + (= (-> v1-13 control ground-pat material) (pat-material waterbottom)) + ) + ) + ) + (set-time! (-> self active-timer)) + ) + (when (and gp-0 (time-elapsed? (-> self active-timer) (seconds 0.1))) + (set! (-> self root trans quad) (-> (get-trans gp-0 0) quad)) + (set! (-> self root trans y) (+ -114688.0 (get-base-height *ocean-map*))) + (set! (-> self init-pos quad) (-> self root trans quad)) + (if (focus-test? gp-0 under-water) + (go-virtual un-dive-player) + (go-virtual attacking-0) + ) + ) + ) + ) + :code sleep-code + :post #f + ) + +(defstate un-dive-player (tentacle) + :virtual #t + :trans (behavior () + (let ((v1-0 *target*)) + (cond + ((not v1-0) + (go empty-state) + ) + ((not (focus-test? v1-0 under-water)) + (go-virtual attacking-0) + ) + ) + ) + ) + :code sleep-code + :post tentacle-follow-post + ) + +(defstate attacking-0 (tentacle) + :virtual #t + :event tentacle-attack-handler + :trans (behavior () + (set! (-> self sound-id-attack) + (add-process *gui-control* self (gui-channel background) (gui-action queue) "tentacle" -99.0 0) + ) + (sound-play "tentacle-loop" :id (-> self sound-id-loop)) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! tentacle-emerge-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual attacking-1) + ) + :post (behavior () + (set! (-> self fade-level) (/ (ja-frame-num 0) (the float (ja-num-frames 0)))) + (set! (-> self draw force-fade) (the-as uint (the int (* 128.0 (-> self fade-level))))) + (let ((f30-2 (fmax 0.0 (fmin 1.0 (/ (ja-frame-num 0) (the float (ja-num-frames 0))))))) + (set! (-> *part-id-table* 1644 init-specs 11 initial-valuef) (lerp 6.826667 54.613335 f30-2)) + (set! (-> *part-id-table* 1644 init-specs 11 random-rangef) + (the-as float (the int (lerp 6.826667 54.613335 f30-2))) + ) + (set! (-> *part-id-table* 1644 init-specs 10 initial-valuef) (the-as float (the int (lerp 4.0 16.0 f30-2)))) + (set! (-> *part-id-table* 1644 init-specs 10 random-rangef) (the-as float (the int (lerp 4.0 16.0 f30-2)))) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((s4-0 (-> self root))) + (set-vector! gp-0 (-> s4-0 trans x) (get-base-height *ocean-map*) (-> s4-0 trans z) 1.0) + ) + (spawn (-> self part) gp-0) + ) + (tentacle-follow-post) + ) + ) + +(defstate attacking-1 (tentacle) + :virtual #t + :event tentacle-attack-handler + :exit (behavior () + (sound-stop (-> self sound-id-loop)) + ) + :trans (behavior () + (while (and *target* (not (logtest? (-> *target* focus-status) (focus-status dead)))) + (send-event + *target* + '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 'tentacle)) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((s4-0 (-> self root))) + (set-vector! gp-0 (-> s4-0 trans x) (get-base-height *ocean-map*) (-> s4-0 trans z) 1.0) + ) + (cond + ((logtest? (-> *part-group-id-table* 409 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* 409)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-0 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 409)) + ) + ) + ) + (tentacle-follow-post) + ) + ) + +(defstate kill-player (tentacle) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('joint) + 3 + ) + ) + ) + :enter (behavior () + (sound-params-set! *gui-control* (-> self sound-id-attack) #f -1 -1 -1 1.0) + (set-action! + *gui-control* + (gui-action play) + (-> self sound-id-attack) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + :exit (behavior () + (if *target* + (send-event *target* 'end-mode 'bot) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! tentacle-tentacle-attack-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual wait) + ) + :post ja-post + ) + +(defstate wait (tentacle) + :virtual #t + :code sleep-code + ) + +(defmethod init-from-entity! ((this tentacle) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 64) + (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-tentacle" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 408) this)) + (set! (-> this nav-mesh) #f) + (set! (-> this sound-id-loop) (new-sound-id)) + (set! (-> this sound-id-attack) (new-sound-id)) + (go (method-of-object this dormant)) + ) + +(defskelgroup skel-terraformer-des-fma-2 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 + ) + +(load-scene (new 'static 'scene + :name "desert-final-boss-intro" + :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-intro" + :parts 24 + :command-list '((0 + (kill "terraformer-1") + (apply ,(lambda () + (set! (-> *sky-work* disable-day-star) (the-as basic #t)) + (set-cloud-and-fog-interp! *mood-control* 0.0 0.5 0.0 0.0) + (set-cloud-and-fog-interp! *mood-control* 0.0 0.5 1.0 1.0) + (set-time-for-random-weather! *mood-control* 180.0 180.0) + ) + ) + (apply ,(lambda () + (set-setting! 'fog-special-interp-targ #f 0.15 0) + (set-setting! 'dust-storm-fog-scalar #f 0.5 0) + (set-setting! 'fog-special-interp-rate #f 1000.0 0) + ) + ) + ) + (1 (part-tracker + "group-cloud-spread" + entity + "particleman" + joint + "particleK" + track + #t + duration + (frame-range 1 2000) + ) + ) + (10 (part-tracker + "group-desert-final-boss-gate" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 10 20) + ) + ) + (21 (part-tracker + "group-desert-boss-slide-dust" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 21 22) + ) + ) + (25 (part-tracker + "group-desert-boss-slide-dust" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 25 26) + ) + ) + (26 (part-tracker + "group-desert-boss-slide-dust" + entity + "particleman" + joint + "particleF" + track + #t + duration + (frame-range 26 27) + ) + ) + (27 (part-tracker + "group-desert-boss-slide-dust" + entity + "particleman" + joint + "particleG" + track + #t + duration + (frame-range 27 28) + ) + ) + (41 (part-tracker + "group-desert-final-boss-gate" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 41 51) + ) + ) + (57 (part-tracker + "group-desert-boss-slide-dust" + entity + "particleman" + joint + "particleH" + track + #t + duration + (frame-range 57 58) + ) + ) + (59 (part-tracker + "group-desert-boss-slide-dust" + entity + "particleman" + joint + "particleI" + track + #t + duration + (frame-range 59 75) + ) + ) + (125 + (part-tracker + "group-desert-fireball-shot" + entity + "particleman" + joint + "particleJ" + track + #t + duration + (frame-range 125 260) + ) + (part-tracker + "group-desert-fireball-shot-trail" + entity + "particleman" + joint + "particleJ" + track + #t + duration + (frame-range 125 260) + subsample-num + (new 'static 'bfloat :data 5.0) + ) + ) + (192 (part-tracker + "group-desert-fireball-explosion" + entity + "particleman" + joint + "particleJ" + track + #f + duration + (frame-range 192 193) + ) + ) + (275 (apply ,(lambda () + (set-setting! 'fog-special-interp-targ #f 0.4 0) + (set-setting! 'dust-storm-fog-scalar #f 0.4 0) + (set-setting! 'fog-special-interp-rate #f 0.03 0) + ) + ) + ) + (696 (apply ,(lambda () + (set-setting! 'fog-special-interp-targ #f 0.15 0) + (set-setting! 'dust-storm-fog-scalar #f 1.0 0) + (set-setting! 'fog-special-interp-rate #f 1000.1 0) + ) + ) + ) + (1066 (fadeout (frame-time-30 10))) + (10000 (task-close! "desert-final-boss-introduction")) + ) + :cut-list '(0 87 136 260 696 768 875 1013) + :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 'desboss1 + :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 'desboss1 + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((16 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(1013) + :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 '((50 max)) + :scissor-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 'deserrol + :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 "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 '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 + ) + (new 'static 'scene-actor + :name "terraformer-des-fma-2" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-2" + :prefix "" + :draw-frames '((260 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 "terraformer-des-fma-leg-a" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-a" + :prefix "lf-" + :draw-frames '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 'desboss1 + :art-group "skel-terraformer-head" + :prefix "" + :draw-frames '((260 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "wasall-final-boss-intro-movie" + :end-point "desertb-final-boss-start" + :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 + ) + ) + +(load-scene + (new 'static 'scene + :name "arena-outro" + :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-outro" + :parts #xb4 + :command-list '((0 (fadein (frame-time-30 10)) (send-event *time-of-day* 'change 'hour (int 14))) + (10 + (part-tracker + "group-precursor-staff-shot-glow" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 10 5300) + ) + ) + (2744 + (part-tracker + "group-precursor-staff-shot" + entity + "particleman" + joint + "particleA" + track + #f + duration + (frame-range 2744 2750) + ) + ) + (2763 + (part-tracker + "group-precursor-staff-hit" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 2763 2764) + ) + ) + (2985 + (part-tracker + "group-precursor-staff-shot" + entity + "particleman" + joint + "particleA" + track + #f + duration + (frame-range 2985 2996) + ) + ) + (3009 + (part-tracker + "group-precursor-staff-hit" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 3009 3010) + ) + ) + (3320 + (part-tracker + "group-ship-door-light" + entity + "precursor-ship" + joint + "door_glow" + track + #t + duration + (frame-range 3320 4385) + ) + ) + (4371 + (part-tracker + "group-mothership-thrusters" + entity + "precursor-ship" + joint + "thruster_a" + track + #t + duration + (frame-range 4371 4577) + ) + (part-tracker + "group-mothership-thrusters" + entity + "precursor-ship" + joint + "thruster_b" + track + #t + duration + (frame-range 4371 4577) + ) + (part-tracker + "group-mothership-thrusters" + entity + "precursor-ship" + joint + "thruster_c" + track + #t + duration + (frame-range 4371 4577) + ) + ) + (5380) + (5390 (fadeout (frame-time-30 10))) + (10000) + (10000 (task-close! "city-win-introduction")) + ) + :cut-list '(208 + 327 + 495 + 672 + 786 + 916 + 1061 + 1168 + 1245 + 1300 + 1387 + 1526 + 1678 + 1749 + 1803 + 1883 + 1954 + 2276 + 2385 + 2557 + 2722 + 2750 + 2918 + 2996 + 3225 + 3292 + 3380 + 3453 + 3598 + 3689 + 3827 + 3894 + 4028 + 4169 + 4318 + 4371 + 4513 + 4578 + 4629 + 4683 + 4857 + 5020 + 5300 + ) + :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 'outrocst + :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 'outrocst + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((0 208) (786 916) (1300 1678) (1803 1954) (3292 3380) (3598 3689) (4169 4399) (4683 5401)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(4371 5020) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x3a2 + ) + (new 'static 'scene-actor + :name "precursor-ship" + :level 'loutro + :art-group "skel-precursor-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 "sidekick-highres" + :level 'loutro + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((0 208) (786 916) (1803 2276) (2385 2722) (2749 2764)) + :scissor-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 'loutro + :art-group "skel-ottsel-leader" + :prefix "" + :draw-frames '((0 327) + (786 1061) + (1168 1300) + (1387 1526) + (1803 1883) + (2276 2557) + (2722 2750) + (2918 2996) + (3292 3380) + (3598 3689) + (4169 4371) + ) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(2276) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "ottsel-surfer" + :level 'loutro + :art-group "skel-ottsel-surfer" + :prefix "" + :draw-frames '((208 327) (786 1245) (1387 1526) (2722 2750) (2918 2996) (3292 3380) (3598 3689)) + :scissor-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 'loutro + :art-group "skel-ottsel-veger" + :prefix "" + :draw-frames '((3689 4169)) + :scissor-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-tess" + :level 'loutro2 + :art-group "skel-ottsel-tess" + :prefix "" + :draw-frames '((3010 3380) (3453 3598) (4371 4513) (4683 5300)) + :scissor-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 'loutro2 + :art-group "skel-sig-highres" + :prefix "" + :draw-frames '((0 208) (327 672) (4371 4629)) + :scissor-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-daxpants" + :level 'loutro2 + :art-group "skel-ottsel-daxpants" + :prefix "" + :draw-frames '((2764 2918) (2996 3380) (3453 3598) (4371 4513) (4683 5401)) + :scissor-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-outro" + :level 'loutro2 + :art-group "skel-ottsel-dummy-outro" + :prefix "" + :draw-frames '((0 327) (786 1061) (1168 1245) (1387 1526) (1803 1883) (3292 3380) (3598 3689)) + :scissor-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 'outrocst + :art-group "skel-ashelin-highres" + :prefix "" + :draw-frames '((1300 1387) (1526 1890) (3380 3453) (4371 4513) (4629 4683)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "tess-highres" + :level 'outrocst + :art-group "skel-tess-highres" + :prefix "" + :draw-frames '((0 208) (786 916) (1803 2276) (2385 2722) (2749 2918) (2996 3010)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "samos-highres" + :level 'outrocst + :art-group "skel-samos-highres" + :prefix "" + :draw-frames '((0 208) (327 672) (4371 4513) (4578 4629)) + :scissor-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 'outrocst + :art-group "skel-seem-highres" + :prefix "" + :draw-frames '((1300 1387) (1526 1890) (3380 3453) (4371 4513) (4629 4683)) + :scissor-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 'outrocst + :art-group "skel-kleever-highres" + :prefix "" + :draw-frames '((0 208) (786 916) (3689 4169) (4371 4513) (4513 4578)) + :scissor-frames '((3535 4169)) + :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 'outrocst + :art-group "skel-pecker-highres" + :prefix "" + :draw-frames '((327 786) (4371 4513) (4578 4629) (5020 5300)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "onin-simple" + :level 'loutro3 + :art-group "skel-onin-simple" + :prefix "" + :draw-frames '((327 495) (4371 4629)) + :scissor-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-ship-door" + :level 'loutro3 + :art-group "skel-precursor-ship-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 "torn-simple" + :level 'outcast3 + :art-group "skel-torn-simple" + :prefix "" + :draw-frames '((1300 1387) (1526 1890) (3380 3453) (4371 4513) (4629 4683)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "keira-simple" + :level 'outcast3 + :art-group "skel-keira-simple" + :prefix "" + :draw-frames '((327 672) (4371 4513) (4578 4629)) + :scissor-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-arena-plat" + :level 'wasstada + :art-group "skel-wstd-arena-plat" + :prefix "" + :draw-frames '((0 208) (786 916) (3689 4169) (4371 4513) (4513 4578)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "wasstada-outro" + :end-point "title-credits" + :borrow '((wasstada 0 loutro special) (outrocst 0 loutro2 special) (wasall 0 loutro3 special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x10f + :on-running #f + :on-complete #f + ) + ) diff --git a/goal_src/jak3/levels/wascity/wasall-part.gc b/goal_src/jak3/levels/wascity/wasall-part.gc index bd45fbaebf..c3008e001a 100644 --- a/goal_src/jak3/levels/wascity/wasall-part.gc +++ b/goal_src/jak3/levels/wascity/wasall-part.gc @@ -5,5 +5,1758 @@ ;; name in dgo: wasall-part ;; dgos: WASALL +(define-extern *wasdoors-range-color-flame* curve-color-fast) +(define-extern *wasdoors-range-alpha-flame* curve2d-fast) +(define-extern *wasdoors-range-scale-flame-x* curve2d-fast) +(define-extern *wasdoors-range-scale-flame-y* curve2d-fast) +(define-extern *r-wasdoors-curve-flame* curve2d-fast) +(define-extern *g-wasdoors-curve-flame* curve2d-fast) +(define-extern *b-wasdoors-curve-flame* curve2d-fast) +(define-extern *wasdoors-curve-alpha-flame* curve2d-fast) +(define-extern *wasdoors-curve-flame-x* curve2d-fast) +(define-extern *wasdoors-curve-flame-y* curve2d-fast) + ;; DECOMP BEGINS +(defpartgroup group-desert-buggy-dust + :id 383 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1587 :flags (sp7))) + ) + +(defpart 1587 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 0.2) + (: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-y (meters 0.06666667)) + (:scalevel-x (meters 0.016666668)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.044444446 -0.044444446) + (:accel-y (meters 0.00016666666) (meters 0.00016666666)) + (:friction 0.9) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + ) + ) + +(defpartgroup group-desert-buggy-dust-stop + :id 384 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1588 :flags (sp7)) (sp-item 1589 :flags (sp7))) + ) + +(defpart 1588 + :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.13333334)) + (:scalevel-x (meters 0.016666668)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.016666668 -0.016666668) + (:accel-y (meters 0) (meters 0.0001)) + (:friction 0.95) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:next-time (seconds 0.335)) + (:next-launcher 1590) + (:conerot-x (degrees 0) (degrees -10)) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1590 + :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-dirt-bits ((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 1589 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-buggy-dirt-bits) + (:num 1.0 2.0) + (:scale-x (meters 0.1) (meters 0.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-z (meters 0.06666667) (meters 0.06666667)) + (: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 -20)) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +(defun spt-birth-func-part-buggy-dirt-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-dirt-bits arg0 arg1 arg2) + (none) + ) + +(defpartgroup group-desert-buggy-dust-skid + :id 385 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1591 :flags (sp7)) (sp-item 1592 :flags (sp7))) + ) + +(defpart 1591 + :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 1593) + (:conerot-x (degrees 10) (degrees 30)) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1593 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +(defpart 1592 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-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-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-dirt-bits arg0 arg1 arg2) + (none) + ) + +(defpartgroup group-part-wascity-door-steam + :id 386 + :duration (seconds 1.335) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1594 :flags (sp7) :period (seconds 30) :length (seconds 1.335))) + ) + +(defpart 1594 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:scale-x (meters 0.5) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 16.0) + (:vel-z (meters 0.01) (meters 0.013333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x405c00)) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-part-wascity-door-pre-steam1 + :id 387 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1595 :period (seconds 20) :length (seconds 1) :offset 200)) + ) + +(defpart 1595 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 1.0) + (:x (meters -3) (meters 8)) + (:y (meters -6)) + (:scale-x (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 120.0 10.0) + (:b 80.0 20.0) + (:a 0.0) + (:vel-z (meters -0.06666667) (meters 0.13333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.10666667) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.96) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:next-time (seconds 0.5)) + (:next-launcher 1596) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1596 + :init-specs ((:fade-a -0.011428571)) + ) + +(defpartgroup group-part-wascity-door-pre-steam2 + :id 388 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1597 :period (seconds 20) :length (seconds 1) :offset 200)) + ) + +(defpart 1597 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 1.0) + (:x (meters -3) (meters 8)) + (:y (meters -6)) + (:scale-x (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 120.0 10.0) + (:b 80.0 20.0) + (:a 0.0) + (:vel-z (meters -0.06666667) (meters 0.13333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.10666667) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.96) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:next-time (seconds 0.5)) + (:next-launcher 1596) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-part-wascity-door-big-steam1 + :id 389 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1598 :period (seconds 30) :length (seconds 2))) + ) + +(defpart 1598 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 2.0) + (:x (meters -27)) + (:y (meters 8)) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 16.0) + (:vel-x (meters -0.05) (meters -0.033333335)) + (:vel-y (meters -0.05) (meters -0.033333335)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.93 0.03) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13)) + ) + ) + +(defpartgroup group-part-wascity-door-big-steam2 + :id 390 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1599 :period (seconds 30) :length (seconds 2))) + ) + +(defpart 1599 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 2.0) + (:x (meters 27)) + (:y (meters 8)) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 16.0) + (:vel-x (meters 0.05) (meters 0.033333335)) + (:vel-y (meters -0.05) (meters -0.033333335)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.93 0.03) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13)) + ) + ) + +(defpartgroup group-part-wascity-door-big-pre-steam1 + :id 391 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1600 :period (seconds 20) :length (seconds 1))) + ) + +(defpart 1600 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 1.0) + (:x (meters -10) (meters -20)) + (:y (meters 0)) + (:scale-x (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 120.0 10.0) + (:b 80.0 20.0) + (:a 0.0) + (:vel-z (meters -0.13333334) (meters 0.26666668)) + (:scalevel-x (meters 0.01) (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.10666667) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.96) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:next-time (seconds 0.5)) + (:next-launcher 1601) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1601 + :init-specs ((:fade-a -0.011428571)) + ) + +(defpartgroup group-part-wascity-door-big-pre-steam2 + :id 392 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1602 :period (seconds 20) :length (seconds 1))) + ) + +(defpart 1602 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 1.0) + (:x (meters 10) (meters 20)) + (:y (meters 0)) + (:scale-x (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 120.0 10.0) + (:b 80.0 20.0) + (:a 0.0) + (:vel-z (meters -0.13333334) (meters 0.26666668)) + (:scalevel-x (meters 0.01) (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.10666667) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.96) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:next-time (seconds 0.5)) + (:next-launcher 1601) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-wasdoors-gaslamp + :id 393 + :flags (sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1603 :fade-after (meters 200) :falloff-to (meters 300) :flags (sp7)) + (sp-item 1604 :fade-after (meters 200) :falloff-to (meters 300) :flags (sp7)) + (sp-item 1605 :fade-after (meters 200) :falloff-to (meters 300) :flags (sp7)) + (sp-item 1606 :fade-after (meters 200) :falloff-to (meters 300) :flags (sp7)) + (sp-item 1607 :fade-after (meters 20) :falloff-to (meters 30) :flags (sp7)) + ) + ) + +(defpart 1603 + :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 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-z (meters -0.0016666667) (meters 0.0016666667)) + (:scalevel-x (meters -0.016666668)) + (:accel-x (meters -0.001)) + (:accel-z (meters 0.0013333333) (meters 0.0013333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 0)) + (:conerot-y (degrees 0)) + ) + ) + +(if #t + (set! *wasdoors-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! *wasdoors-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! *wasdoors-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! *wasdoors-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-wasdoors-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-wasdoors-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-wasdoors-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! *wasdoors-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! *wasdoors-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! *wasdoors-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-wasdoors-gas-lamp-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* 1603 init-specs 17 initial-valuef) + (the-as float *part-wasdoors-gas-lamp-flame-curve-settings*) + ) + +(set! (-> *part-wasdoors-gas-lamp-flame-curve-settings* color-start) *wasdoors-range-color-flame*) + +(set! (-> *part-wasdoors-gas-lamp-flame-curve-settings* alpha-start) *wasdoors-range-alpha-flame*) + +(set! (-> *part-wasdoors-gas-lamp-flame-curve-settings* scale-x-start) *wasdoors-range-scale-flame-x*) + +(set! (-> *part-wasdoors-gas-lamp-flame-curve-settings* scale-y-start) *wasdoors-range-scale-flame-y*) + +(set! (-> *part-wasdoors-gas-lamp-flame-curve-settings* r-scalar) *r-wasdoors-curve-flame*) + +(set! (-> *part-wasdoors-gas-lamp-flame-curve-settings* g-scalar) *g-wasdoors-curve-flame*) + +(set! (-> *part-wasdoors-gas-lamp-flame-curve-settings* b-scalar) *b-wasdoors-curve-flame*) + +(set! (-> *part-wasdoors-gas-lamp-flame-curve-settings* a-scalar) *wasdoors-curve-alpha-flame*) + +(set! (-> *part-wasdoors-gas-lamp-flame-curve-settings* scale-x-scalar) *wasdoors-curve-flame-x*) + +(set! (-> *part-wasdoors-gas-lamp-flame-curve-settings* scale-y-scalar) *wasdoors-curve-flame-y*) + +(defpart 1604 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 1.0 1.0) + (:x (meters -0.3) (meters 0.6)) + (:y (meters -0.3) (meters 0.6)) + (:z (meters 0.3)) + (: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) + (:scalevel-x (meters -0.00033333333)) + (:fade-a -0.64) + (:accel-x (meters -0.001)) + (:accel-z (meters 0.0013333333) (meters 0.0013333333)) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1605 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:x (meters -1)) + (:z (meters 2.5)) + (: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 1606 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.01 0.05) + (:scale-x (meters 0.3) (meters 0.3)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-z (meters 0.06666667) (meters 0.016666668)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:accel-x (meters 0.0016666667)) + (:friction 0.95) + (:timer (seconds 2) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-y (degrees -20) (degrees 40)) + (:rotate-y (degrees -40)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 1607 + :init-specs ((:num 0.2) + (:x (meters 0) (meters 2)) + (:y (meters -0.5) (meters 1)) + (:z (meters 6)) + (:rot-x 8) + (:r 8192.0) + (:g 1228.8) + (:b 1024.0) + (:accel-x (meters 0.001)) + (:accel-z (meters 0.0016666667)) + (:timer (seconds 0.335)) + (:flags (distort)) + (:rotate-y (degrees -30)) + ) + ) + +(defpartgroup group-wasdoors-red-lights + :id 394 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1608 :fade-after (meters 120) :flags (sp6))) + ) + +(defpart 1608 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 0.1)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 32.0) + (:b 0.0) + (:a 16.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1024.0) + ) + ) + +(defpartgroup group-elevator-palace-door + :id 395 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1609 :flags (sp7) :period (seconds 20) :length (seconds 2))) + ) + +(defpart 1609 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 1.0 1.0) + (:x (meters -5) (meters 10)) + (:y (meters -7)) + (:z (meters -2) (meters 4)) + (:scale-x (meters 4) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 90.0) + (:g 70.0) + (:b 50.0) + (:a 32.0 32.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:accel-y (meters 0.00016666666) (meters 0.00016666666)) + (:friction 0.93) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2)) + (:conerot-x (degrees -60) (degrees 120)) + (:conerot-z (degrees -30) (degrees 60)) + ) + ) + +(defpartgroup group-elevator-palace-door-close + :id 396 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1610 :flags (sp7) :period (seconds 20) :length (seconds 0.035))) + ) + +(defpart 1610 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 30.0 10.0) + (:x (meters -5) (meters 10)) + (:y (meters -20)) + (:z (meters -5) (meters 10)) + (:scale-x (meters 4) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 90.0) + (:g 70.0) + (:b 50.0) + (:a 32.0 32.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:accel-y (meters 0.00016666666) (meters 0.00016666666)) + (:friction 0.93) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2)) + (:conerot-x (degrees -60) (degrees 120)) + ) + ) + +(defpartgroup group-desert-fireball-shot + :id 397 + :flags (sp0) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 1611 :flags (sp6)) (sp-item 1612)) + ) + +(defpart 1611 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 100) (meters 20)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 180.0) + (:b 0.0) + (:a 20.0 40.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +(defpart 1612 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 40) (meters 4)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:scalevel-x (meters -1)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +(defpartgroup group-desert-fireball-shot-trail + :id 398 + :flags (sp0 sp13) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 1613)) + ) + +(defpart 1613 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 10)) + (:scale-x (meters 30) (meters 10)) + (:scale-y (meters 20) (meters 5)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:scalevel-x (meters -0.06666667) (meters -0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -2.6666667) + (:fade-b -3.4) + (:accel-y (meters -0.0033333334) (meters -0.016666668)) + (:friction 0.99) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:next-time (seconds 0.25)) + (:next-launcher 1614) + (:rotate-y (degrees 0) (degrees 3600)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1614 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.48 -0.48)) + ) + +(defpartgroup group-desert-fireball-explosion + :id 399 + :flags (sp0) + :bounds (static-bspherem 0 0 0 1000) + :parts ((sp-item 1615 :flags (sp3))) + ) + +(defpart 1615 + :init-specs ((:texture (middot level-default-sprite)) + (:num 2.0) + (:scale-x (meters 2500)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters -6.6666665)) + (:scalevel-y :copy scalevel-x) + (:fade-b -0.10666667) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.167)) + (:next-launcher 1616) + ) + ) + +(defpart 1616 + :init-specs ((:scalevel-x (meters -3.3333333)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:next-time (seconds 0.335)) + (:next-launcher 1617) + ) + ) + +(defpart 1617 + :init-specs ((:scalevel-x (meters -2.6666667)) + (:scalevel-y :copy scalevel-x) + (:next-time (seconds 0.5)) + (:next-launcher 1618) + ) + ) + +(defpart 1618 + :init-specs ((:scalevel-x (meters -2.3333333)) + (:scalevel-y :copy scalevel-x) + (:next-time (seconds 0.667)) + (:next-launcher 1619) + ) + ) + +(defpart 1619 + :init-specs ((:scalevel-x (meters -2)) (:scalevel-y :copy scalevel-x)) + ) + +(defpartgroup group-cloud-spread + :id 400 + :duration (seconds 200) + :linger-duration (seconds 20) + :flags (sp0 sp1 sp4) + :bounds (static-bspherem 0 0 0 1000) + :parts ((sp-item 1620 :flags (is-3d sp7) :period (seconds 200) :length (seconds 0.017))) + ) + +(defpart 1620 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 100.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0) (meters 2000)) + (:scale-x (meters 100) (meters 300)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:accel-z (meters 0.033333335)) + (:friction 0.3) + (:timer (seconds 20)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 6.4)) + (:next-launcher 1621) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1621 + :init-specs ((:fade-a 0.21333334) (:friction 0.0)) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-part-desert-boss-slide-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*)) 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-3))) + ) + (none) + ) + +(defpartgroup group-desert-boss-slide-dust + :id 401 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 1622)) + ) + +(defpart 1622 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-part-desert-boss-slide-dust) + (:num 0.5) + (: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-z (meters 0) (meters -0.01)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:accel-y (meters 0) (meters 0.000033333334)) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-y (degrees -20) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-desert-final-boss-gate + :id 402 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1623 :flags (sp6 sp7)) + (sp-item 1624 :flags (sp6 sp7)) + (sp-item 1625 :flags (sp7)) + (sp-item 1626 :flags (sp7)) + ) + ) + +(defpart 1623 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 3)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 60.0 10.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +(defpart 1624 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 3)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 0.0) + (:b 255.0) + (:a 60.0 10.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +(defpart 1625 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 20.0) + (:scale-x (meters 0.5)) + (:scale-y :copy scale-x) + (:r 32.0 64.0) + (:g 32.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.1125)) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:friction 0.9) + (:timer (seconds 0.5) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1626 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 100.0) + (:b 255.0) + (:a 128.0 128.0) + (:scalevel-x (meters -0.006666667) (meters 0.013333334)) + (:rotvel-z (degrees -0.53333336) (degrees 1.0666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.017) (seconds 0.13)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x405700 #x405800 #x405900)) + ) + ) + +(defpartgroup group-precursor-staff-shot-glow + :id 403 + :flags (sp0 sp12) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1627)) + ) + +(defpart 1627 + :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 1628) + ) + ) + +(defpart 1628 + :init-specs ((:fade-a -0.6)) + ) + +(defpartgroup group-precursor-staff-shot + :id 404 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1629 :flags (sp7))) + ) + +(defpart 1629 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 20.0) + (:y (meters 0) (meters 0.03)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 64.0) + (:a 32.0 32.0) + (:omega (degrees 0.0225)) + (:vel-z (meters 0.03) (meters 0.0033333334)) + (:timer (seconds 0.835) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.635)) + (:next-launcher 1630) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1630 + :init-specs ((:scalevel-x (meters -0.00066666666) (meters 0.0013333333)) + (:scalevel-y :copy scalevel-x) + (:accel-x (meters -0.013333334) (meters 0.026666667)) + (:accel-y (meters -0.013333334) (meters 0.026666667)) + (:friction 0.5 0.1) + ) + ) + +(defpartgroup group-precursor-staff-hit + :id 405 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1631 :flags (sp3 sp7))) + ) + +(defpart 1631 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters -0.033333335)) + (:scalevel-y (meters -0.06666667)) + (:fade-a -0.85333335) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpartgroup group-ship-door-light + :id 406 + :duration (seconds 1) + :linger-duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1632 :flags (sp6)) + (sp-item 1633 :flags (is-3d)) + (sp-item 1634 :flags (is-3d)) + (sp-item 1635 :flags (is-3d)) + ) + ) + +(defpart 1632 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 16)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 6.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1636 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 6) (meters 1)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 20)) + (: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 1637) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 20)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 1637 + :init-specs ((:fade-a -2.56)) + ) + +(defpart 1633 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 6) (meters 1)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 45)) + (:scale-y (meters 20)) + (: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 1637) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 20)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 1634 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 6) (meters 1)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -45)) + (:scale-y (meters 20)) + (: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 1637) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 20)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 1635 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 6) (meters 1)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 20)) + (: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 1638) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 20)) + (:rotate-z (degrees 90)) + ) + ) + +(defpart 1638 + :init-specs ((:fade-a -1.28)) + ) + +(defpartgroup group-mothership-thrusters + :id 407 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1639 :flags (sp6)) (sp-item 1640 :flags (sp6)) (sp-item 1641 :flags (sp7))) + ) + +(defpart 1640 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 1)) + (: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 255.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +(defpart 1639 + :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 0.0) + (:g 100.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) + ) + ) + +(defpart 1641 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:x (meters 0) (meters 4)) + (:scale-x (meters 6) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-x (meters -0.0033333334) (meters 0.006666667)) + (:vel-y (meters -0.033333335) (meters -0.016666668)) + (:vel-z (meters -0.0033333334) (meters 0.006666667)) + (:scalevel-x (meters 0.02) (meters 0.04)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 2.56) + (:friction 0.99) + (:timer (seconds 3)) + (: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.085)) + (:next-launcher 1642) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1642 + :init-specs ((:fade-a -0.07314286 -0.14628571)) + ) + +(defpartgroup group-tentacle-warn + :id 408 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1643 :flags (sp7)) (sp-item 1644 :flags (sp7)) (sp-item 1645 :flags (is-3d sp7))) + ) + +(defpart 1643 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 3.0) + (:x (meters 0) (meters 6)) + (:y (meters -3) (meters -5)) + (:scale-x (meters 0.1) (meters 0.3)) + (:scale-y :copy scale-x) + (:r 130.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-y (meters 0.013333334) (meters 0.006666667)) + (:fade-a 0.10666667) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'check-bubble-height) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1644 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 3.0) + (:x (meters 0) (meters 3)) + (:y (meters 0)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 130.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.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.21333334) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1645 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.3) + (:x (meters 0)) + (:y (meters 0)) + (:scale-x (meters 3)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 130.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 40.0 40.0) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.17777778) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-tentacle-attack + :id 409 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1646 :flags (sp7) :period (seconds 10) :length (seconds 0.067)) + (sp-item 1647 :flags (sp7) :period (seconds 10) :length (seconds 0.067)) + (sp-item 1648 :flags (sp7) :period (seconds 10) :length (seconds 0.067) :offset 325) + ) + ) + +(defpart 1646 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:x (meters 0) (meters 1)) + (:y (meters 0)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 130.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:vel-y (meters 0.013333334) (meters 0.026666667)) + (:scalevel-x (meters 0.001) (meters 0.001)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 3)) + (: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 1647 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 100.0) + (:x (meters 0) (meters 1)) + (:y (meters 0)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 130.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:vel-y (meters 0.013333334)) + (: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 -0.21333334) + (:accel-y (meters -0.000033333334)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 78) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1648 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:x (meters 0) (meters 2)) + (:y (meters 0)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 130.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:vel-y (meters 0.013333334) (meters 0.026666667)) + (:scalevel-x (meters 0.001) (meters 0.001)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 13.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 0) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-wascity-burning-bush-holo-on + :id 381 + :flags (sp4) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 1649 :flags (is-3d sp6 sp7)) + (sp-item 1650 :flags (is-3d sp6 sp7)) + (sp-item 1651 :flags (is-3d sp6 sp7)) + ) + ) + +(defpart 1652 + :init-specs ((:texture (green-lightning level-default-sprite)) + (:num 2.0 4.0) + (:x (meters -2.25) (meters 4.5)) + (:y (meters 6.1)) + (:scale-x (meters 1)) + (:rot-z (degrees 0) 1 (degrees 180)) + (:scale-y (meters 6)) + (:r 128.0 1 128.0) + (:g 255.0) + (:b 32.0) + (:a 0.0) + (:fade-a 1.6) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.067)) + (:next-launcher 1653) + (:rotate-y (degrees 0) 1 (degrees 180)) + ) + ) + +(defpart 1653 + :init-specs ((:fade-a -1.6)) + ) + +(defpart 1649 + :init-specs ((:texture (kleever-fist-logo desert-sprite)) + (:num 1.0) + (:y (meters 6)) + (:z (meters -0.02)) + (:scale-x (meters 4.5) (meters 0.1)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 55.0) + (:g 55.0) + (:b 55.0) + (:a 160.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1651 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters 6)) + (:z (meters 0.05)) + (:scale-x (meters 7)) + (:rot-x (degrees 90)) + (:rot-y (degrees 90)) + (:rot-z (degrees 90)) + (:scale-y (meters 8)) + (:r 255.0) + (:g 60.0) + (:b 10.0) + (:a 64.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1650 + :init-specs ((:texture (kleever-fist-logo desert-sprite)) + (:num 1.0) + (:y (meters 6)) + (:z (meters 0.02)) + (:scale-x (meters 4.8) (meters 0.1)) + (:rot-x (degrees 90)) + (:rot-y (degrees 90)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 16.0 16.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-4 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpartgroup group-wascity-burning-bush-holo-off + :id 382 + :flags (sp4) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 1654 :flags (is-3d sp6 sp7)) + (sp-item 1655 :flags (is-3d sp6 sp7)) + (sp-item 1656 :flags (is-3d sp6 sp7)) + ) + ) + +(defpart 1654 + :init-specs ((:texture (burning-bush-off desert-sprite)) + (:num 1.0) + (:y (meters 6)) + (:z (meters -0.02)) + (:scale-x (meters 4.5) (meters 0.1)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1656 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters 6)) + (:z (meters 0.05)) + (:scale-x (meters 7)) + (:rot-x (degrees 90)) + (:rot-y (degrees 90)) + (:rot-z (degrees 90)) + (:scale-y (meters 8)) + (:r 64.0 64.0) + (:g 128.0 128.0) + (:b 255.0) + (:a 32.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1657 + :init-specs ((:texture (common-white common)) + (:num 1.0) + (:y (meters 6)) + (:z (meters -0.05)) + (:scale-x (meters 5)) + (:rot-x (degrees -90)) + (:rot-y (degrees 90)) + (:rot-z (degrees 90)) + (:scale-y (meters 6)) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 0.0 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-4 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1655 + :init-specs ((:texture (burning-bush-off desert-sprite)) + (:num 1.0) + (:y (meters 6)) + (:z (meters 0.02)) + (:scale-x (meters 5) (meters 0.1)) + (:rot-x (degrees 90)) + (:rot-y (degrees 90)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 16.0 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-4 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) diff --git a/goal_src/jak3/levels/wascity/wasall-tasks.gc b/goal_src/jak3/levels/wascity/wasall-tasks.gc index decc777b62..12476a2337 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 9f2e8fce86..b583c278be 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 6c33df40bf..94077c34d0 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 b365d347af..c43c44dc85 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 'bounding-box)) + (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*! (the-as vector s3-0) (-> s5-0 trans) (-> this aim-dir) 2457600.0) + (set! (-> s3-0 min 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 0e45a8200d..20808ff3b8 100644 --- a/goal_src/jak3/levels/wascity/wascitya-obs.gc +++ b/goal_src/jak3/levels/wascity/wascitya-obs.gc @@ -7,3 +7,117 @@ ;; DECOMP BEGINS +(defskelgroup skel-wascity-stad-door wascity-stad-door wascity-stad-door-lod0-jg wascity-stad-door-idle-ja + ((wascity-stad-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 8 0 20) + ) + +(deftype wascity-stad-door (com-airlock) + () + ) + + +(defmethod init-from-entity! ((this wascity-stad-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 0.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 0.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-wascity-stad-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) + (set! (-> this allow-pilot?) #t) + (go (method-of-object this close) #t) + ) + +(deftype waspala-elevator (elevator) + () + ) + + +(defskelgroup skel-waspala-elevator waspala-elevator waspala-elevator-lod0-jg waspala-elevator-idle-ja + ((waspala-elevator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 20 0 30) + ) + +(defmethod elevator-method-47 ((this waspala-elevator)) + (if *target* + (< (vector-vector-xz-distance (target-pos 0) (-> this root trans)) + (* 0.4 (-> this root root-prim prim-core world-sphere w)) + ) + #f + ) + ) + +(defmethod get-art-group ((this waspala-elevator)) + (art-group-get-by-name *level* "skel-waspala-elevator" (the-as (pointer level) #f)) + ) + +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-collision! ((this waspala-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 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 8192.0 0.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 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 8192.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) + ) + (none) + ) + +;; 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 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 d5331e848a..c94f29314b 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 0fce3c9e16..f50017292e 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 34c0222740..a88255745a 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 5cd5a9817f..7d296fa864 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 2680669de3..c42407c9cb 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 23acf78a86..e1d509a998 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 ec95431943..a6d4322700 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 f5e008ac77..1983b4fc81 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 19a79ec10c..de47169a8f 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 ab8585f19a..a59c05c554 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 bfc7326f80..0cbc149b64 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 f15f40b444..ad590cf888 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 b6f6f9e3cd..db7d9f001c 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 d85a04b49d..e13c9e7294 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 47c394e87e..5b0e8c0e74 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 2736806d68..b98ae889f1 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* (the-as bounding-box 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 b23b188c0b..4fb102e073 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 1f6c6118f0..6f884b266b 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 1303663c35..24c9966ff7 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 e9916cbbc0..5355fe30ec 100644 --- a/goal_src/jak3/levels/wascity/waswide-obs.gc +++ b/goal_src/jak3/levels/wascity/waswide-obs.gc @@ -7,3 +7,834 @@ ;; DECOMP BEGINS +(deftype wascity-windmill (process-drawable) + ((quat quaternion :inline) + ) + (:state-methods + idle + ) + ) + + +(defskelgroup skel-wascity-windmill wascity-windmill wascity-windmill-lod0-jg wascity-windmill-idle-ja + ((wascity-windmill-lod0-mg (meters 20)) (wascity-windmill-lod1-mg (meters 999999))) + :bounds (static-spherem 0 5 0 20) + ) + +(defstate idle (wascity-windmill) + :virtual #t + :trans (behavior () + (quaternion-rotate-local-y! + (-> self root quat) + (-> self quat) + (lerp-scale -16384.0 16384.0 (sin (* 5.0 (the float (current-time)))) -1.0 1.0) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +(defun wascity-windmill-callback ((arg0 cspace) (arg1 transformq)) + (quaternion-rotate-local-z! (-> arg1 quat) (-> arg1 quat) (* 109.22667 (the float (current-time)))) + (cspace<-parented-transformq-joint! arg0 arg1) + 0 + (none) + ) + +(defmethod init-from-entity! ((this wascity-windmill) (arg0 entity-actor)) + (ctywide-entity-hack) + (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-wascity-windmill" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (quaternion-copy! (-> this quat) (-> this root quat)) + (let ((a0-7 (-> this node-list data 4))) + (set! (-> a0-7 param0) wascity-windmill-callback) + (set! (-> a0-7 param1) this) + (set! (-> a0-7 param2) (the-as basic 0)) + ) + (go (method-of-object this idle)) + ) + +(deftype wascity-flag-base (process-drawable) + () + (:state-methods + idle + ) + (:methods + (get-skel (_type_) art-group) + (wascity-flag-base-method-22 (_type_) none) + ) + ) + + +(defstate idle (wascity-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) + (wascity-flag-base-method-22 self) + ) + ) + :code sleep-code + :post ja-post + ) + +(defmethod wascity-flag-base-method-22 ((this wascity-flag-base)) + 0 + (none) + ) + +(defmethod init-from-entity! ((this wascity-flag-base) (arg0 entity-actor)) + (ctywide-entity-hack) + (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 wascity-flag-a (wascity-flag-base) + () + ) + + +(defskelgroup skel-wascity-flag-a wascity-flag-a wascity-flag-a-lod0-jg wascity-flag-a-flap-ja + ((wascity-flag-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6 0 12) + ) + +(defmethod get-skel ((this wascity-flag-a)) + (art-group-get-by-name *level* "skel-wascity-flag-a" (the-as (pointer level) #f)) + ) + +(deftype wascity-flag-b (wascity-flag-base) + () + ) + + +(defskelgroup skel-wascity-flag-b wascity-flag-b wascity-flag-b-lod0-jg wascity-flag-b-flap-ja + ((wascity-flag-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6 0 12) + ) + +(defmethod get-skel ((this wascity-flag-b)) + (art-group-get-by-name *level* "skel-wascity-flag-b" (the-as (pointer level) #f)) + ) + +(deftype wascity-flag-c (wascity-flag-base) + () + ) + + +(defskelgroup skel-wascity-flag-c wascity-flag-c wascity-flag-c-lod0-jg wascity-flag-c-flap-ja + ((wascity-flag-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 7 0 10) + ) + +(defmethod get-skel ((this wascity-flag-c)) + (art-group-get-by-name *level* "skel-wascity-flag-c" (the-as (pointer level) #f)) + ) + +(deftype wascity-flag-d (wascity-flag-base) + () + ) + + +(defskelgroup skel-wascity-flag-d wascity-flag-d wascity-flag-d-lod0-jg wascity-flag-d-flap-ja + ((wascity-flag-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 25) + ) + +(defmethod get-skel ((this wascity-flag-d)) + (art-group-get-by-name *level* "skel-wascity-flag-d" (the-as (pointer level) #f)) + ) + +(deftype wascity-wind-fan (process-drawable) + ((quat quaternion :inline) + ) + (:state-methods + idle + ) + ) + + +(defskelgroup skel-wascity-wind-fan wascity-wind-fan wascity-wind-fan-lod0-jg wascity-wind-fan-idle-ja + ((wascity-wind-fan-lod0-mg (meters 20)) (wascity-wind-fan-lod1-mg (meters 999999))) + :bounds (static-spherem 0 5 0 15) + ) + +(defstate idle (wascity-wind-fan) + :virtual #t + :trans (behavior () + (quaternion-rotate-local-y! (-> self root quat) (-> self quat) (* 18.204445 (the float (current-time)))) + ) + :code (behavior () + (ja :group! wascity-wind-fan-idle-ja :num! none :frame-num 0.0) + (sleep-code) + ) + :post ja-post + ) + +(defmethod init-from-entity! ((this wascity-wind-fan) (arg0 entity-actor)) + (ctywide-entity-hack) + (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-wascity-wind-fan" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (quaternion-copy! (-> this quat) (-> this root quat)) + (go (method-of-object this idle)) + ) + +(deftype shaker (structure) + ((axis vector :inline) + (start-time time-frame) + (decay-time float) + (amplitude float) + (freq float) + (y-decay-time float) + (y-amplitude float) + (y-freq float) + (shake float) + (y-shake float) + ) + (:methods + (shaker-method-9 (_type_) none) + ) + ) + + +;; WARN: Return type mismatch float vs none. +(defmethod shaker-method-9 ((this shaker)) + (let ((s5-0 (- (current-time) (-> this start-time)))) + (set! (-> this shake) (* (-> this amplitude) + (lerp-scale 1.0 0.0 (the float s5-0) 0.0 (-> this decay-time)) + (cos (* 65536.0 (/ (the float s5-0) (-> this freq)))) + ) + ) + (set! (-> this y-shake) (* (-> this y-amplitude) + (lerp-scale 1.0 0.0 (the float s5-0) 0.0 (-> this y-decay-time)) + (cos (* 65536.0 (/ (the float s5-0) (-> this y-freq)))) + ) + ) + ) + (none) + ) + +(defskelgroup skel-wascity-cactus wascity-cactus wascity-cactus-lod0-jg wascity-cactus-idle-ja + ((wascity-cactus-lod0-mg (meters 999999))) + :bounds (static-spherem 0 4 0 7) + ) + +(defskelgroup skel-wascity-cactus-explode wascity-cactus wascity-cactus-explode-lod0-jg wascity-cactus-explode-idle-ja + ((wascity-cactus-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 80) + ) + +(define *wascity-cactus-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) + ) + ) + +(deftype wascity-cactus (process-focusable) + ((shakers shaker 6 :inline) + (incoming-attack-id uint32) + (incoming-attack-time time-frame) + (hit-points float) + ) + (:state-methods + idle + die + ) + (:methods + (wascity-cactus-method-30 (_type_) none) + (wascity-cactus-method-31 (_type_) none) + ) + ) + + +(defun wascity-cactus-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 wascity-cactus s4-0) shakers (the-as int s3-0))) + (-> (the-as wascity-cactus s4-0) shakers (the-as int s3-0) shake) + ) + ) + (quaternion-rotate-local-y! + (-> arg1 quat) + (-> arg1 quat) + (-> (the-as wascity-cactus s4-0) shakers (the-as int s3-0) y-shake) + ) + (if (< (the int (-> (the-as wascity-cactus s4-0) shakers (the-as int s3-0) decay-time)) + (- (current-time) (-> (the-as wascity-cactus s4-0) shakers (the-as int s3-0) start-time)) + ) + (set! (-> arg0 param0) #f) + ) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + 0 + (none) + ) + +(defstate die (wascity-cactus) + :virtual #t + :enter #f + :exit #f + :trans #f + :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)) + (drop-pickup (-> self fact) #t *entity-pool* (the-as fact-info #f) 0 #t) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + :post #f + ) + +(defstate idle (wascity-cactus) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((a1-1 (the-as object (-> block param 1))) + (a0-2 proc) + ) + (when (and (!= (-> (the-as attack-info a1-1) id) (-> self incoming-attack-id)) + (!= (-> (the-as attack-info a1-1) mode) 'flut) + ) + (set! (-> self incoming-attack-id) (-> (the-as attack-info a1-1) id)) + (when a0-2 + (let ((s5-0 (find-offending-process-focusable a0-2 (the-as attack-info a1-1)))) + (when s5-0 + (let ((a0-4 (get-penetrate-using-from-attack-event (the-as process-drawable proc) block))) + (cond + ((and (not (logtest? (penetrate dark-skin) a0-4)) + (= (pu->knocked-type a0-4) (knocked-type none)) + (< 0.0 (-> self hit-points)) + ) + (if (not (time-elapsed? (-> self incoming-attack-time) (seconds 0.6))) + (return #f) + ) + (sound-play "cactus-hit") + (seek! (-> self hit-points) 0.0 0.1) + (set-time! (-> self incoming-attack-time)) + (let ((gp-2 (new 'stack-no-clear 'vector))) + (vector-inv-orient-by-quat! + gp-2 + (vector-cross! + (new 'stack-no-clear 'vector) + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> s5-0 root trans) (-> self root trans)) 1.0) + *up-vector* + ) + (-> self root quat) + ) + (let ((v1-20 (-> self shakers))) + (set! (-> v1-20 0 axis quad) (-> gp-2 quad)) + (set-time! (-> v1-20 0 start-time)) + (set! (-> v1-20 0 decay-time) 300.0) + (set! (-> v1-20 0 freq) 150.0) + (set! (-> v1-20 0 amplitude) 1820.4445) + (set! (-> v1-20 0 y-amplitude) 0.0) + ) + (let ((a0-19 (joint-node wascity-cactus-lod0-jg main))) + (set! (-> a0-19 param0) wascity-cactus-callback) + (set! (-> a0-19 param1) self) + (set! (-> a0-19 param2) (the-as basic 0)) + ) + (let ((v1-23 (-> self shakers 1))) + (set! (-> v1-23 axis quad) (-> gp-2 quad)) + (set! (-> v1-23 start-time) (+ (current-time) (seconds -0.06))) + (set! (-> v1-23 decay-time) 600.0) + (set! (-> v1-23 freq) 150.0) + (set! (-> v1-23 amplitude) 364.0889) + (set! (-> v1-23 y-amplitude) 0.0) + (set! (-> v1-23 y-decay-time) 450.0) + (set! (-> v1-23 y-freq) 150.0) + (set! (-> v1-23 y-amplitude) 3640.889) + ) + (let ((v1-25 (joint-node wascity-cactus-lod0-jg a))) + (set! (-> v1-25 param0) wascity-cactus-callback) + (set! (-> v1-25 param1) self) + (set! (-> v1-25 param2) (the-as basic 1)) + ) + (let ((v1-26 (-> self shakers 2))) + (set! (-> v1-26 axis quad) (-> gp-2 quad)) + (set! (-> v1-26 start-time) (+ (current-time) (seconds -0.2))) + (set! (-> v1-26 decay-time) 600.0) + (set! (-> v1-26 freq) 150.0) + (set! (-> v1-26 amplitude) 364.0889) + (set! (-> v1-26 y-decay-time) 450.0) + (set! (-> v1-26 y-freq) 150.0) + (set! (-> v1-26 y-amplitude) 3640.889) + ) + (let ((v1-28 (joint-node wascity-cactus-lod0-jg b))) + (set! (-> v1-28 param0) wascity-cactus-callback) + (set! (-> v1-28 param1) self) + (set! (-> v1-28 param2) (the-as basic 2)) + ) + (let ((v1-29 (-> self shakers 3))) + (set! (-> v1-29 axis quad) (-> gp-2 quad)) + (set! (-> v1-29 start-time) (+ (current-time) (seconds -0.2))) + (set! (-> v1-29 decay-time) 600.0) + (set! (-> v1-29 freq) 150.0) + (set! (-> v1-29 amplitude) 364.0889) + (set! (-> v1-29 y-decay-time) 450.0) + (set! (-> v1-29 y-freq) 150.0) + (set! (-> v1-29 y-amplitude) 3640.889) + ) + (let ((v1-31 (joint-node wascity-cactus-lod0-jg c))) + (set! (-> v1-31 param0) wascity-cactus-callback) + (set! (-> v1-31 param1) self) + (set! (-> v1-31 param2) (the-as basic 2)) + ) + (let ((v1-32 (-> self shakers 4))) + (set! (-> v1-32 axis quad) (-> gp-2 quad)) + (set! (-> v1-32 start-time) (+ (current-time) (seconds -0.2))) + (set! (-> v1-32 decay-time) 600.0) + (set! (-> v1-32 freq) 150.0) + (set! (-> v1-32 amplitude) 364.0889) + (set! (-> v1-32 y-decay-time) 450.0) + (set! (-> v1-32 y-freq) 150.0) + (set! (-> v1-32 y-amplitude) 3640.889) + ) + (let ((v1-34 (joint-node wascity-cactus-lod0-jg d))) + (set! (-> v1-34 param0) wascity-cactus-callback) + (set! (-> v1-34 param1) self) + (set! (-> v1-34 param2) (the-as basic 2)) + ) + (let ((v1-35 (-> self shakers 5))) + (set! (-> v1-35 axis quad) (-> gp-2 quad)) + (set! (-> v1-35 start-time) (+ (current-time) (seconds -0.4))) + (set! (-> v1-35 decay-time) 600.0) + (set! (-> v1-35 freq) 150.0) + (set! (-> v1-35 amplitude) 364.0889) + (set! (-> v1-35 y-decay-time) 450.0) + (set! (-> v1-35 y-freq) 150.0) + (set! (-> v1-35 y-amplitude) 3640.889) + ) + ) + (let ((v0-0 (the-as object (joint-node wascity-cactus-lod0-jg e)))) + (set! (-> (the-as cspace v0-0) param0) wascity-cactus-callback) + (set! (-> (the-as cspace v0-0) param1) self) + (set! (-> (the-as cspace v0-0) param2) (the-as basic 2)) + v0-0 + ) + ) + (else + (sound-play "cactus-burst") + (let ((gp-4 (new 'stack 'joint-exploder-tuning (the-as uint 1)))) + (set! (-> gp-4 fountain-rand-transv-lo quad) (-> s5-0 root trans quad)) + (set! (-> gp-4 fountain-rand-transv-hi x) 4096.0) + (set! (-> gp-4 fountain-rand-transv-hi y) 122880.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-wascity-cactus-explode" (the-as (pointer level) #f)) + 7 + gp-4 + *wascity-cactus-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (go-virtual die) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :exit #f + :code sleep-code + :post (behavior () + (dotimes (gp-0 6) + (shaker-method-9 (-> self shakers gp-0)) + ) + (transform-post) + ) + ) + +(defmethod wascity-cactus-method-30 ((this wascity-cactus)) + (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 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 16384.0 0.0 28672.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 wascity-cactus-method-31 ((this wascity-cactus)) + (logior! (-> this mask) (process-mask crate)) + 0 + (none) + ) + +(defmethod init-from-entity! ((this wascity-cactus) (arg0 entity-actor)) + (ctywide-entity-hack) + (wascity-cactus-method-30 this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-wascity-cactus" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (wascity-cactus-method-31 this) + (set! (-> this fact) + (new 'process 'fact-info this (pickup-type none) (-> *FACT-bank* default-eco-pill-green-inc)) + ) + (set! (-> this hit-points) 1.0) + (quaternion-vector-angle! (-> this root quat) *up-vector* (* 182.04445 (rand-vu-float-range 0.0 360.0))) + (let ((f0-4 (rand-vu-float-range 0.9 1.1))) + (set-vector! (-> this root scale) f0-4 f0-4 f0-4 1.0) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +(deftype wascity-market-crate (market-crate) + () + ) + + +(deftype wascity-market-basket-a (market-basket-a) + () + ) + + +(deftype wascity-market-basket-b (market-basket-b) + () + ) + + +(deftype wascity-market-sack-a (market-sack-a) + () + ) + + +(deftype wascity-market-sack-b (market-sack-b) + () + ) + + +(deftype wascity-fruit-stand (fruit-stand) + () + ) + + +(deftype wascity-water-pump (process-drawable) + () + (:state-methods + idle + ) + ) + + +(defskelgroup skel-wascity-water-pump wascity-water-pump wascity-water-pump-lod0-jg wascity-water-pump-idle-ja + ((wascity-water-pump-lod0-mg (meters 20)) (wascity-water-pump-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + ) + +(defstate idle (wascity-water-pump) + :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 wascity-water-pump) (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 player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable no-standon)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 49152.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)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-8 transform-index) 6) + (set-vector! (-> v1-8 local-sphere) 10240.0 0.0 8192.0 16384.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 1)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-10 transform-index) 8) + (set-vector! (-> v1-10 local-sphere) -8192.0 0.0 0.0 12288.0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (the-as uint 1)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-12 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-12 prim-core action) (collide-action solid rideable)) + (set! (-> v1-12 transform-index) 3) + (set-vector! (-> v1-12 local-sphere) 0.0 0.0 0.0 49152.0) + ) + (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-wascity-water-pump" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +(defskelgroup skel-wascity-awning-a wascity-awning-a wascity-awning-a-lod0-jg wascity-awning-a-idle-ja + ((wascity-awning-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -2.5 5 10) + ) + +(deftype wascity-awning-a (bouncer) + () + ) + + +(defmethod play-sound ((this wascity-awning-a)) + (sound-play "tarp-bounce") + 0 + (none) + ) + +(defmethod bouncer-method-26 ((this wascity-awning-a)) + (sound-play "bounce-whoosh") + 0 + (none) + ) + +(defmethod bouncer-method-23 ((this wascity-awning-a)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-wascity-awning-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (none) + ) + +(defmethod bouncer-method-24 ((this wascity-awning-a)) + (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) 0.0 -16384.0 16384.0 32768.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) + ) + 0 + (none) + ) + +(defskelgroup skel-wascity-awning-b wascity-awning-b wascity-awning-b-lod0-jg wascity-awning-b-idle-ja + ((wascity-awning-b-lod0-mg (meters 20)) (wascity-awning-b-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +(deftype wascity-awning-b (bouncer) + () + ) + + +(defmethod play-sound ((this wascity-awning-b)) + (sound-play "tarp-bounce") + 0 + (none) + ) + +(defmethod bouncer-method-26 ((this wascity-awning-b)) + (sound-play "bounce-whoosh") + 0 + (none) + ) + +(defmethod bouncer-method-23 ((this wascity-awning-b)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-wascity-awning-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (none) + ) + +(defmethod bouncer-method-24 ((this wascity-awning-b)) + (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) 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! (-> this root) s5-0) + ) + 0 + (none) + ) + +(defskelgroup skel-monk-npc monk monk-lod0-jg monk-standing-idle-1-ja + ((monk-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0.2 0 1.6) + :shadow monk-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +(deftype monk-npc (process-taskable) + () + ) + + +(defmethod init-skeleton! ((this monk-npc)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-monk-npc" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (let* ((v1-8 (mod + (+ (the-as int (-> this root trans x)) + (the-as int (-> this root trans y)) + (the-as int (-> this root trans z)) + ) + 6 + ) + ) + (s5-1 (cond + ((zero? v1-8) + 4171 + ) + ((= v1-8 1) + 8357 + ) + ((= v1-8 2) + #x4113 + ) + ((= v1-8 3) + #x8225 + ) + ((= v1-8 4) + #x10407 + ) + ((= v1-8 5) + #x20825 + ) + ) + ) + ) + (setup-masks (-> this draw) 0 -1) + (setup-masks (-> this draw) s5-1 0) + ) + 0 + (none) + ) + +(defmethod get-art-element ((this monk-npc)) + (if (not (logtest? (+ (the-as int (-> this root trans x)) + (the-as int (-> this root trans y)) + (the-as int (-> this root trans z)) + ) + 1 + ) + ) + (-> this draw art-group data 9) + (-> this draw art-group data 10) + ) + ) diff --git a/goal_src/jak3/levels/wascity/waswide-part.gc b/goal_src/jak3/levels/wascity/waswide-part.gc index c15e6d3d7b..16bd38261a 100644 --- a/goal_src/jak3/levels/wascity/waswide-part.gc +++ b/goal_src/jak3/levels/wascity/waswide-part.gc @@ -5,5 +5,4240 @@ ;; name in dgo: waswide-part ;; dgos: WWD +(define-extern *range-sat-explo-scene-color* curve-color-fast) +(define-extern *range-sat-explo-scene-alpha* curve2d-fast) +(define-extern *range-sat-explo-scene-scale-x* curve2d-fast) +(define-extern *range-sat-explo-scene-scale-y* curve2d-fast) +(define-extern *curve-sat-explo-scene-alpha* curve2d-fast) +(define-extern *curve-sat-explo-scene-scale-x* curve2d-fast) +(define-extern *curve-sat-explo-scene-scale-y* curve2d-fast) +(define-extern *part-neo-satellite-explosion-texture-scene-curve-settings* particle-curve-settings) +(define-extern *range-color-wascity-palace-fire-beacon-flame* curve-color-fast) +(define-extern *range-alpha-wascity-palace-fire-beacon-flame* curve2d-fast) +(define-extern *range-scale-wascity-palace-fire-beacon-flame-x* curve2d-fast) +(define-extern *range-scale-wascity-palace-fire-beacon-flame-y* curve2d-fast) +(define-extern *r-curve-wascity-palace-fire-beacon-flame* curve2d-fast) +(define-extern *g-curve-wascity-palace-fire-beacon-flame* curve2d-fast) +(define-extern *b-curve-wascity-palace-fire-beacon-flame* curve2d-fast) +(define-extern *curve-alpha-wascity-palace-fire-beacon-flame* curve2d-fast) +(define-extern *curve-wascity-palace-fire-beacon-flame-x* curve2d-fast) +(define-extern *curve-wascity-palace-fire-beacon-flame-y* curve2d-fast) +(define-extern *part-wascity-palace-fire-beacon-flame-curve-settings* particle-curve-settings) +(define-extern *range-wrsplash-color* curve-color-fast) +(define-extern *range-wrsplash-alpha* curve2d-fast) +(define-extern *range-wrsplash-scale-x* curve2d-fast) +(define-extern *range-wrsplash-scale-y* curve2d-fast) +(define-extern *curve-wrsplash-alpha* curve2d-fast) +(define-extern *curve-wrsplash-scale-x* curve2d-fast) +(define-extern *curve-wrsplash-scale-y* curve2d-fast) +(define-extern *part-water-rocks-splash-curve-settings* particle-curve-settings) +(define-extern *range-color-flame* curve-color-fast) +(define-extern *range-alpha-flame* curve2d-fast) +(define-extern *range-scale-flame-x* curve2d-fast) +(define-extern *range-scale-flame-y* curve2d-fast) +(define-extern *r-curve-flame* curve2d-fast) +(define-extern *g-curve-flame* curve2d-fast) +(define-extern *b-curve-flame* curve2d-fast) +(define-extern *curve-alpha-flame* curve2d-fast) +(define-extern *curve-flame-x* curve2d-fast) +(define-extern *curve-flame-y* curve2d-fast) +(define-extern *part-gas-lamp-flame-curve-settings* particle-curve-settings) +(define-extern *part-talltorch-flame-curve-settings* particle-curve-settings) + ;; DECOMP BEGINS +(defpartgroup group-wascity-pre-game-sat-sparks + :id 460 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1815 :flags (sp7)) (sp-item 1816 :flags (sp7))) + ) + +(defpart 1815 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.8)) + (: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.02) (meters 0.033333335)) + (:friction 0.96) + (:timer (seconds 0.5) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1816 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5 3.0) + (:scale-x (meters 1) (meters 1)) + (:rot-x 4) + (: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.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.53333336) (degrees 1.0666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.017) (seconds 0.13)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x405700 #x405800 #x405900)) + ) + ) + +(defpartgroup group-daxter-slide-dust + :id 461 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1817 :flags (sp7))) + ) + +(defpart 1817 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0) + (:scale-x (meters 0.3) (meters 0.3)) + (: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) (meters 0.0013333333)) + (:scalevel-x (meters 0.001)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:accel-y (meters 0) (meters 0.000033333334)) + (: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 #x405c00 #x409b00)) + (:conerot-x (degrees 80) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-sat-scrape-dirt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 120)) + (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-sat-scrape-dust + :id 462 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1818 :flags (sp7))) + ) + +(defpart 1818 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 4.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 32.0 64.0) + (:vel-y (meters 0) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.07111111 -0.07111111) + (:accel-y (meters 0) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x405c00 #x409b00)) + (:conerot-x (degrees 80) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpartgroup group-sat-scrape-dirt + :id 463 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1819 :flags (sp7)) (sp-item 1820 :flags (sp7))) + ) + +(defpart 1819 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'spt-birth-func-part-sat-scrape-dirt) + (:num 10.0) + (:x (meters 0) (meters 1)) + (: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-y (meters 0.01) (meters 0.01)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (: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 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-sat-scrape-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-sat-scrape-dirt arg0 arg1 arg2) + (none) + ) + +(defpart 1820 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-sat-scrape-rocks) + (:num 8.0) + (: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.016666668) (meters 0.033333335)) + (: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 'sparticle-texture-animate) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defun spt-birth-func-part-sat-scrape-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-sat-scrape-dirt arg0 arg1 arg2) + (none) + ) + +(defpartgroup group-neo-satellite-buildup-scene + :id 464 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1821 :flags (is-3d sp7) :period (seconds 10) :length (seconds 1)) + (sp-item 1822 :flags (sp7) :period (seconds 10) :length (seconds 0.035)) + ) + ) + +(defpart 1821 + :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 2)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.167)) + (:next-launcher 1823) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1823 + :init-specs ((:scalevel-y (meters 0))) + ) + +(defpart 1822 + :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 128.0) + (:g 32.0) + (:b 255.0) + (:a 0.0) + (:fade-a 0.21333334) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + (:func 'sparticle-track-root) + ) + ) + +(defpartgroup group-neo-satellite-explode-scene + :id 465 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1824 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1825 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1826 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 1827 :period (seconds 30) :length (seconds 0.167)) + (sp-item 1828 :period (seconds 30) :length (seconds 0.335)) + (sp-item 1829 :period (seconds 30) :length (seconds 0.667) :offset 300) + (sp-item 1830 :period (seconds 30) :length (seconds 0.117)) + ) + ) + +(defpart 1830 + :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 1829 + :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 1831) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1831 + :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 1831) + ) + ) + +(defpart 1824 + :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 1825 + :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 1827 + :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 1828 + :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-scene-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-scene-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-scene-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-scene-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-scene-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-scene-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-scene-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-neo-satellite-explosion-texture-scene-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* 1828 init-specs 16 initial-valuef) + (the-as float *part-neo-satellite-explosion-texture-scene-curve-settings*) + ) + +(set! (-> *part-neo-satellite-explosion-texture-scene-curve-settings* color-start) + *range-sat-explo-scene-color* + ) + +(set! (-> *part-neo-satellite-explosion-texture-scene-curve-settings* alpha-start) + *range-sat-explo-scene-alpha* + ) + +(set! (-> *part-neo-satellite-explosion-texture-scene-curve-settings* scale-x-start) + *range-sat-explo-scene-scale-x* + ) + +(set! (-> *part-neo-satellite-explosion-texture-scene-curve-settings* scale-y-start) + *range-sat-explo-scene-scale-y* + ) + +(set! (-> *part-neo-satellite-explosion-texture-scene-curve-settings* r-scalar) #f) + +(set! (-> *part-neo-satellite-explosion-texture-scene-curve-settings* g-scalar) #f) + +(set! (-> *part-neo-satellite-explosion-texture-scene-curve-settings* b-scalar) #f) + +(set! (-> *part-neo-satellite-explosion-texture-scene-curve-settings* a-scalar) *curve-sat-explo-scene-alpha*) + +(set! (-> *part-neo-satellite-explosion-texture-scene-curve-settings* scale-x-scalar) + *curve-sat-explo-scene-scale-x* + ) + +(set! (-> *part-neo-satellite-explosion-texture-scene-curve-settings* scale-y-scalar) + *curve-sat-explo-scene-scale-y* + ) + +(defpart 1826 + :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-wascity-pre-game-crystal-glow + :id 466 + :flags (sp0 sp4 sp12) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1832 :flags (sp6 sp7))) + ) + +(defpart 1832 + :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 1833) + ) + ) + +(defpart 1833 + :init-specs ((:fade-a -0.42666668)) + ) + +(defpartgroup group-wascity-pre-game-crystal-creation + :id 467 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1834 :flags (sp6 sp7)) + (sp-item 1835 :flags (sp6 sp7)) + (sp-item 1836 :flags (sp7)) + (sp-item 1837 :flags (sp7)) + ) + ) + +(defpart 1834 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.4) (meters 0.3)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 60.0 10.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +(defpart 1835 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.3)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 0.0) + (:b 255.0) + (:a 60.0 10.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +(defpart 1836 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 10.0) + (:scale-x (meters 0.2)) + (:scale-y :copy scale-x) + (:r 32.0 64.0) + (:g 32.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.1125)) + (:vel-y (meters 0.006666667) (meters 0.006666667)) + (:friction 0.96) + (:timer (seconds 0.5) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(defpart 1837 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.0 2.0) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 100.0) + (:b 255.0) + (:a 128.0 128.0) + (:scalevel-x (meters -0.006666667) (meters 0.013333334)) + (:rotvel-z (degrees -0.53333336) (degrees 1.0666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.017) (seconds 0.13)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x405700 #x405800 #x405900)) + ) + ) + +(defpartgroup group-wascity-pre-game-res-text + :id 468 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1838 :flags (is-3d sp7) :period (seconds 0.335) :length (seconds 0.017)) + (sp-item 1839 :flags (is-3d sp7) :period (seconds 0.335) :length (seconds 0.017) :offset 5) + (sp-item 1840 :flags (is-3d sp7) :period (seconds 0.335) :length (seconds 0.017) :offset 10) + (sp-item 1841 :flags (is-3d sp7) :period (seconds 0.335) :length (seconds 0.017) :offset 15) + (sp-item 1842 :flags (is-3d sp7) :period (seconds 0.335) :length (seconds 0.017) :offset 20) + (sp-item 1843 :flags (is-3d sp7) :period (seconds 0.335) :length (seconds 0.017) :offset 20) + (sp-item 1844 :flags (is-3d sp7) :period (seconds 0.335) :length (seconds 0.017) :offset 15) + (sp-item 1845 :flags (is-3d sp7) :period (seconds 0.335) :length (seconds 0.017) :offset 10) + (sp-item 1846 :flags (is-3d sp7) :period (seconds 0.335) :length (seconds 0.017) :offset 5) + (sp-item 1847 :flags (is-3d sp7) :period (seconds 0.335) :length (seconds 0.017)) + (sp-item 1848 :flags (is-3d sp7) :period (seconds 0.335) :length (seconds 0.017) :offset 5) + (sp-item 1849 :flags (is-3d sp7) :period (seconds 0.335) :length (seconds 0.017) :offset 10) + (sp-item 1850 :flags (is-3d sp7) :period (seconds 0.335) :length (seconds 0.017) :offset 15) + (sp-item 1851 :flags (is-3d sp7) :period (seconds 0.335) :length (seconds 0.017) :offset 20) + (sp-item 1852 :flags (is-3d sp7) :period (seconds 0.335) :length (seconds 0.017)) + ) + ) + +(defpart 1838 + :init-specs ((:texture (dp-text-01 wasseem-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:x (meters -0.4)) + (:y (meters 0.25)) + (:z (meters 0.02)) + (:scale-x (meters 0.2)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x7b700000 + #x7b700100 + #x7b700200 + #x7b700300 + #x7b700400 + #x7b700500 + #x7b700600 + #x7b700700 + #x7b700800 + #x7b700900 + #x7b700a00 + #x7b700b00 + #x7b700c00 + #x7b700d00 + #x7b700e00 + #x7b700f00 + ) + ) + (:next-time (seconds 0.017)) + (:next-launcher 1853) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 1853 + :init-specs ((:a 16.0 64.0) (:next-time (seconds 0.017)) (:next-launcher 1853)) + ) + +(defpart 1839 + :init-specs ((:texture (dp-text-01 wasseem-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:x (meters -0.2)) + (:y (meters 0.25)) + (:z (meters 0.02)) + (:scale-x (meters 0.2)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x7b700000 + #x7b700100 + #x7b700200 + #x7b700300 + #x7b700400 + #x7b700500 + #x7b700600 + #x7b700700 + #x7b700800 + #x7b700900 + #x7b700a00 + #x7b700b00 + #x7b700c00 + #x7b700d00 + #x7b700e00 + #x7b700f00 + ) + ) + (:next-time (seconds 0.017)) + (:next-launcher 1853) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 1840 + :init-specs ((:texture (dp-text-01 wasseem-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0.25)) + (:z (meters 0.02)) + (:scale-x (meters 0.2)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x7b700000 + #x7b700100 + #x7b700200 + #x7b700300 + #x7b700400 + #x7b700500 + #x7b700600 + #x7b700700 + #x7b700800 + #x7b700900 + #x7b700a00 + #x7b700b00 + #x7b700c00 + #x7b700d00 + #x7b700e00 + #x7b700f00 + ) + ) + (:next-time (seconds 0.017)) + (:next-launcher 1853) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 1841 + :init-specs ((:texture (dp-text-01 wasseem-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:x (meters 0.2)) + (:y (meters 0.25)) + (:z (meters 0.02)) + (:scale-x (meters 0.2)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x7b700000 + #x7b700100 + #x7b700200 + #x7b700300 + #x7b700400 + #x7b700500 + #x7b700600 + #x7b700700 + #x7b700800 + #x7b700900 + #x7b700a00 + #x7b700b00 + #x7b700c00 + #x7b700d00 + #x7b700e00 + #x7b700f00 + ) + ) + (:next-time (seconds 0.017)) + (:next-launcher 1853) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 1842 + :init-specs ((:texture (dp-text-01 wasseem-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:x (meters 0.4)) + (:y (meters 0.25)) + (:z (meters 0.02)) + (:scale-x (meters 0.2)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x7b700000 + #x7b700100 + #x7b700200 + #x7b700300 + #x7b700400 + #x7b700500 + #x7b700600 + #x7b700700 + #x7b700800 + #x7b700900 + #x7b700a00 + #x7b700b00 + #x7b700c00 + #x7b700d00 + #x7b700e00 + #x7b700f00 + ) + ) + (:next-time (seconds 0.017)) + (:next-launcher 1853) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 1843 + :init-specs ((:texture (dp-text-01 wasseem-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:x (meters -0.4)) + (:y (meters 0)) + (:z (meters 0.02)) + (:scale-x (meters 0.2)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x7b700000 + #x7b700100 + #x7b700200 + #x7b700300 + #x7b700400 + #x7b700500 + #x7b700600 + #x7b700700 + #x7b700800 + #x7b700900 + #x7b700a00 + #x7b700b00 + #x7b700c00 + #x7b700d00 + #x7b700e00 + #x7b700f00 + ) + ) + (:next-time (seconds 0.017)) + (:next-launcher 1853) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 1844 + :init-specs ((:texture (dp-text-01 wasseem-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:x (meters -0.2)) + (:y (meters 0)) + (:z (meters 0.02)) + (:scale-x (meters 0.2)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x7b700000 + #x7b700100 + #x7b700200 + #x7b700300 + #x7b700400 + #x7b700500 + #x7b700600 + #x7b700700 + #x7b700800 + #x7b700900 + #x7b700a00 + #x7b700b00 + #x7b700c00 + #x7b700d00 + #x7b700e00 + #x7b700f00 + ) + ) + (:next-time (seconds 0.017)) + (:next-launcher 1853) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 1845 + :init-specs ((:texture (dp-text-01 wasseem-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0.02)) + (:scale-x (meters 0.2)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x7b700000 + #x7b700100 + #x7b700200 + #x7b700300 + #x7b700400 + #x7b700500 + #x7b700600 + #x7b700700 + #x7b700800 + #x7b700900 + #x7b700a00 + #x7b700b00 + #x7b700c00 + #x7b700d00 + #x7b700e00 + #x7b700f00 + ) + ) + (:next-time (seconds 0.017)) + (:next-launcher 1853) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 1846 + :init-specs ((:texture (dp-text-01 wasseem-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:x (meters 0.2)) + (:y (meters 0)) + (:z (meters 0.02)) + (:scale-x (meters 0.2)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x7b700000 + #x7b700100 + #x7b700200 + #x7b700300 + #x7b700400 + #x7b700500 + #x7b700600 + #x7b700700 + #x7b700800 + #x7b700900 + #x7b700a00 + #x7b700b00 + #x7b700c00 + #x7b700d00 + #x7b700e00 + #x7b700f00 + ) + ) + (:next-time (seconds 0.017)) + (:next-launcher 1853) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 1847 + :init-specs ((:texture (dp-text-01 wasseem-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:x (meters 0.4)) + (:y (meters 0)) + (:z (meters 0.02)) + (:scale-x (meters 0.2)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x7b700000 + #x7b700100 + #x7b700200 + #x7b700300 + #x7b700400 + #x7b700500 + #x7b700600 + #x7b700700 + #x7b700800 + #x7b700900 + #x7b700a00 + #x7b700b00 + #x7b700c00 + #x7b700d00 + #x7b700e00 + #x7b700f00 + ) + ) + (:next-time (seconds 0.017)) + (:next-launcher 1853) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 1848 + :init-specs ((:texture (dp-text-01 wasseem-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:x (meters -0.4)) + (:y (meters -0.25)) + (:z (meters 0.02)) + (:scale-x (meters 0.2)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x7b700000 + #x7b700100 + #x7b700200 + #x7b700300 + #x7b700400 + #x7b700500 + #x7b700600 + #x7b700700 + #x7b700800 + #x7b700900 + #x7b700a00 + #x7b700b00 + #x7b700c00 + #x7b700d00 + #x7b700e00 + #x7b700f00 + ) + ) + (:next-time (seconds 0.017)) + (:next-launcher 1853) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 1849 + :init-specs ((:texture (dp-text-01 wasseem-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:x (meters -0.2)) + (:y (meters -0.25)) + (:z (meters 0.02)) + (:scale-x (meters 0.2)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x7b700000 + #x7b700100 + #x7b700200 + #x7b700300 + #x7b700400 + #x7b700500 + #x7b700600 + #x7b700700 + #x7b700800 + #x7b700900 + #x7b700a00 + #x7b700b00 + #x7b700c00 + #x7b700d00 + #x7b700e00 + #x7b700f00 + ) + ) + (:next-time (seconds 0.017)) + (:next-launcher 1853) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 1850 + :init-specs ((:texture (dp-text-01 wasseem-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:x (meters 0)) + (:y (meters -0.25)) + (:z (meters 0.02)) + (:scale-x (meters 0.2)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x7b700000 + #x7b700100 + #x7b700200 + #x7b700300 + #x7b700400 + #x7b700500 + #x7b700600 + #x7b700700 + #x7b700800 + #x7b700900 + #x7b700a00 + #x7b700b00 + #x7b700c00 + #x7b700d00 + #x7b700e00 + #x7b700f00 + ) + ) + (:next-time (seconds 0.017)) + (:next-launcher 1853) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 1851 + :init-specs ((:texture (dp-text-01 wasseem-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:x (meters 0.2)) + (:y (meters -0.25)) + (:z (meters 0.02)) + (:scale-x (meters 0.2)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x7b700000 + #x7b700100 + #x7b700200 + #x7b700300 + #x7b700400 + #x7b700500 + #x7b700600 + #x7b700700 + #x7b700800 + #x7b700900 + #x7b700a00 + #x7b700b00 + #x7b700c00 + #x7b700d00 + #x7b700e00 + #x7b700f00 + ) + ) + (:next-time (seconds 0.017)) + (:next-launcher 1853) + (:rotate-y (degrees 90)) + ) + ) + +(defpart 1852 + :init-specs ((:texture (dp-text-01 wasseem-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:x (meters 0.4)) + (:y (meters -0.25)) + (:z (meters 0.02)) + (:scale-x (meters 0.2)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 0 + 0 + #x7b700000 + #x7b700100 + #x7b700200 + #x7b700300 + #x7b700400 + #x7b700500 + #x7b700600 + #x7b700700 + #x7b700800 + #x7b700900 + #x7b700a00 + #x7b700b00 + #x7b700c00 + #x7b700d00 + #x7b700e00 + #x7b700f00 + ) + ) + (:next-time (seconds 0.017)) + (:next-launcher 1853) + (:rotate-y (degrees 90)) + ) + ) + +(defpartgroup group-wasteland-scenes-leaper-dust + :id 469 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1854 :flags (sp7))) + ) + +(defpart 1854 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 3.0) + (:z (meters -1) (meters 2)) + (:scale-x (meters 0.5) (meters 1.5)) + (:rot-z (degrees 90) (degrees 10)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 80.0) + (:b 60.0) + (:a 64.0) + (:vel-x (meters 0.016666668) (meters 0.016666668)) + (:vel-y (meters 0.006666667)) + (:scalevel-x (meters 0.0016666667) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.95) + (: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 20 1 0 #x409b00 #x405c00)) + (:rotate-y (degrees 90)) + ) + ) + +(defpartgroup group-day-star-fma + :id 470 + :flags (sp1) + :bounds (static-bspherem 0 0 0 70) + :parts ((sp-item 1855 :flags (sp6)) (sp-item 1856 :flags (sp6))) + ) + +(defpart 1855 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (:rot-x (degrees 1125)) + (:rot-z (degrees 30)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:omega (degrees 0)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 12.0) + ) + ) + +(defpart 1856 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 1125)) + (:rot-z (degrees 30)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 0.0) + (:b 128.0) + (:a 64.0) + (:omega (degrees 0)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 13.0) + ) + ) + +(defpartgroup group-wascity-palace-fire-beacon + :id 471 + :flags (sp0 sp4 sp11) + :bounds (static-bspherem 0 0 0 1000) + :parts ((sp-item 1857 :fade-after (meters 10000) :falloff-to (meters 10000) :flags (sp7)) + (sp-item 1858 :fade-after (meters 10000) :falloff-to (meters 10000) :flags (sp7)) + (sp-item 1859 :fade-after (meters 10000) :falloff-to (meters 10000) :flags (sp7)) + ) + ) + +(defpart 1857 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 0.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.016666668) (meters 0.033333335)) + (:accel-y (meters 0.00066666666) (meters 0.00066666666)) + (:friction 0.99) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 130)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +(if #t + (set! *range-color-wascity-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-wascity-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-wascity-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-wascity-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-wascity-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-wascity-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-wascity-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-wascity-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-wascity-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-wascity-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-wascity-palace-fire-beacon-flame-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 2) + :lifetime-offset (seconds 2) + :flags (particle-curve-flags pcf1) + ) + ) + +(set! (-> *part-id-table* 1857 init-specs 16 initial-valuef) + (the-as float *part-wascity-palace-fire-beacon-flame-curve-settings*) + ) + +(set! (-> *part-wascity-palace-fire-beacon-flame-curve-settings* color-start) + *range-color-wascity-palace-fire-beacon-flame* + ) + +(set! (-> *part-wascity-palace-fire-beacon-flame-curve-settings* alpha-start) + *range-alpha-wascity-palace-fire-beacon-flame* + ) + +(set! (-> *part-wascity-palace-fire-beacon-flame-curve-settings* scale-x-start) + *range-scale-wascity-palace-fire-beacon-flame-x* + ) + +(set! (-> *part-wascity-palace-fire-beacon-flame-curve-settings* scale-y-start) + *range-scale-wascity-palace-fire-beacon-flame-y* + ) + +(set! (-> *part-wascity-palace-fire-beacon-flame-curve-settings* r-scalar) + *r-curve-wascity-palace-fire-beacon-flame* + ) + +(set! (-> *part-wascity-palace-fire-beacon-flame-curve-settings* g-scalar) + *g-curve-wascity-palace-fire-beacon-flame* + ) + +(set! (-> *part-wascity-palace-fire-beacon-flame-curve-settings* b-scalar) + *b-curve-wascity-palace-fire-beacon-flame* + ) + +(set! (-> *part-wascity-palace-fire-beacon-flame-curve-settings* a-scalar) + *curve-alpha-wascity-palace-fire-beacon-flame* + ) + +(set! (-> *part-wascity-palace-fire-beacon-flame-curve-settings* scale-x-scalar) + *curve-wascity-palace-fire-beacon-flame-x* + ) + +(set! (-> *part-wascity-palace-fire-beacon-flame-curve-settings* scale-y-scalar) + *curve-wascity-palace-fire-beacon-flame-y* + ) + +(defpart 1858 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.2) + (:y (meters 10)) + (: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 0.0) + (:omega (degrees 2250011.2)) + (:fade-a 0.2) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 4096.0) + (:next-time (seconds 0.5)) + (:next-launcher 1860) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1860 + :init-specs ((:fade-a -0.2)) + ) + +(defpart 1859 + :init-specs ((:texture (topglow level-default-sprite)) + (:num 0.1) + (:x (meters -10) (meters 20)) + (:y (meters 20)) + (: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-y (meters 0.0013333333)) + (:friction 0.98) + (:timer (seconds 20)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:next-time (seconds 2)) + (:next-launcher 1861) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1861 + :init-specs ((:scalevel-x (meters 0.026666667) (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.14222223) + (:fade-g 0.031111112) + (:fade-b 0.13111112) + (:fade-a -0.032) + (:next-time (seconds 2)) + (:next-launcher 1862) + ) + ) + +(defpart 1862 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:accel-y (meters 0.00066666666)) + ) + ) + +(defpartgroup group-waswide-chimney + :id 472 + :bounds (static-bspherem 0 0 -12 24) + :parts ((sp-item 1863 :fade-after (meters 200) :falloff-to (meters 300)) + (sp-item 1864 :fade-after (meters 200) :flags (sp6)) + ) + ) + +(defpart 1864 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 1)) + (:scale-x (meters 16) (meters 0.1)) + (:rot-x (degrees 6.7500005)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 240.0) + (:b 100.0) + (:a 12.0 4.0) + (:omega (degrees 4518)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 6144.0) + ) + ) + +(defpart 1863 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.0 0.5) + (:scale-x (meters 1) (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.026666667) (meters 0.006666667)) + (: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-x (meters -0.00066666666) (meters -0.00033333333)) + (:accel-y (meters 0.0001) (meters 0.0001)) + (: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 1865) + ) + ) + +(defpart 1865 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:next-time (seconds 0.035) (seconds 0.13)) (:next-launcher 1866)) + ) + +(defpart 1866 + :init-specs ((:scalevel-x (meters 0.013333334) (meters 0.0033333334)) + (: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 1867) + ) + ) + +(defpart 1867 + :init-specs ((:scalevel-x (meters 0.006666667) (meters 0.0016666667)) + (: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 1868) + ) + ) + +(defpart 1868 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.024)) + ) + +(defpartgroup group-waswide-chimney-smoke + :id 473 + :bounds (static-bspherem 0 0 -12 48) + :parts ((sp-item 1869 :fade-after (meters 600) :falloff-to (meters 700))) + ) + +(defpart 1869 + :init-specs ((:texture (topglow level-default-sprite)) + (:num 0.05 0.08) + (:scale-x (meters 0.5) (meters 2)) + (:rot-z (degrees 0) (degrees 20)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 200.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.006666667) (meters 0.0033333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees 0) (degrees -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.10666667) + (:accel-x (meters -0.00013333333) (meters -0.00013333333)) + (:accel-y (meters 0.000016666667) (meters 0.00006666667)) + (:friction 0.99) + (:timer (seconds 6)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 2)) + (:next-launcher 1870) + ) + ) + +(defpart 1870 + :init-specs ((:scalevel-x (meters 0.01)) (:fade-a -0.053333335 -0.053333335)) + ) + +(defpartgroup group-waswide-chimney-double-smoke + :id 474 + :bounds (static-bspherem 0 0 -12 48) + :parts ((sp-item 1871 :fade-after (meters 600) :falloff-to (meters 700)) + (sp-item 1872 :fade-after (meters 600) :falloff-to (meters 700)) + ) + ) + +(defpart 1871 + :init-specs ((:texture (topglow level-default-sprite)) + (:num 0.05 0.08) + (:scale-x (meters 0.5) (meters 1.5)) + (:rot-z (degrees 0) (degrees 20)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 200.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.006666667) (meters 0.0033333334)) + (:scalevel-x (meters 0.0016666667) (meters 0.0033333334)) + (:rotvel-z (degrees 0) (degrees -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.10666667) + (:accel-x (meters -0.00013333333) (meters -0.00013333333)) + (:accel-y (meters 0.000016666667) (meters 0.00006666667)) + (:friction 0.99) + (:timer (seconds 6)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 2)) + (:next-launcher 1873) + ) + ) + +(defpart 1873 + :init-specs ((:scalevel-x (meters 0.01)) (:fade-a -0.053333335 -0.053333335)) + ) + +(defpart 1872 + :init-specs ((:texture (topglow level-default-sprite)) + (:num 0.05 0.08) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 20)) + (:scale-y (meters 1) (meters 1)) + (:r 200.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.00033333333) (meters 0.0016666667)) + (:rotvel-z (degrees 0) (degrees -0.033333335)) + (:fade-a 0.10666667) + (:accel-x (meters -0.00013333333) (meters -0.00013333333)) + (:accel-y (meters 0.000033333334) (meters 0.000016666667)) + (:friction 0.986) + (:timer (seconds 6)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 2)) + (:next-launcher 1874) + ) + ) + +(defpart 1874 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y (meters 0.001)) (:fade-a -0.053333335 -0.053333335)) + ) + +(defpartgroup group-waswide-chimney-long-smoke + :id 475 + :bounds (static-bspherem 0 0 -12 48) + :parts ((sp-item 1875 :fade-after (meters 600) :falloff-to (meters 700))) + ) + +(defpart 1875 + :init-specs ((:texture (topglow level-default-sprite)) + (:num 0.05 0.08) + (:scale-x (meters 0.5) (meters 2)) + (:rot-z (degrees 0) (degrees 30)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 200.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.006666667) (meters 0.0033333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees 0) (degrees -0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.053333335) + (:accel-x (meters -0.00013333333) (meters -0.00026666667)) + (:accel-y (meters 0.000016666667) (meters 0.00006666667)) + (:friction 0.99) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 4)) + (:next-launcher 1876) + ) + ) + +(defpart 1876 + :init-specs ((:scalevel-x (meters 0.01)) (:fade-a -0.035555556 -0.035555556)) + ) + +(defpartgroup group-waswide-chimney-small + :id 476 + :bounds (static-bspherem 0 0 -12 48) + :parts ((sp-item 1877 :fade-after (meters 300) :falloff-to (meters 350))) + ) + +(defpart 1877 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.0 0.5) + (:scale-x (meters 1) (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.013333334) (meters 0.013333334)) + (: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.00066666666) (meters -0.0002)) + (: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 1878) + ) + ) + +(defpart 1878 + :init-specs ((:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:next-time (seconds 0.35) (seconds 0.147)) + (:next-launcher 1879) + ) + ) + +(defpart 1879 + :init-specs ((:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +(defpartgroup group-waswide-steamvent + :id 477 + :flags (sp4) + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 1880 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7)) + (sp-item 1881 :fade-after (meters 10) :falloff-to (meters 15) :flags (sp7)) + ) + ) + +(defpart 1880 + :init-specs ((:birth-func 'birth-func-texture-group) + (:num 0.0 0.1) + (:z (meters 1)) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g :copy r) + (:b :copy g) + (:a 0.0) + (:vel-y (meters 0.0033333334)) + (:vel-z (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.42666668) + (:accel-x (meters 0.0001)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x405c00 #x400000)) + (:next-time (seconds 0.5)) + (:next-launcher 1882) + (:launchrot-x (degrees -5) (degrees 10)) + (:launchrot-y (degrees -5) (degrees 10)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1882 + :init-specs ((:fade-a -0.06095238 -0.06095238)) + ) + +(defpart 1881 + :init-specs ((:num 0.3) + (:x (meters -1) (meters 2)) + (:z (meters -1) (meters 2)) + (:rot-x 8) + (:r 2048.0) + (:g 1024.0) + (:b 860.16) + (:vel-y (meters 0.0033333334)) + (:vel-z (meters 0.0033333334) (meters 0.0033333334)) + (:accel-x (meters 0.0001)) + (:timer (seconds 2)) + (:flags (distort)) + (:launchrot-x (degrees -5) (degrees 10)) + (:launchrot-y (degrees -5) (degrees 10)) + ) + ) + +(defpartgroup group-waswide-topdust + :id 478 + :flags (sp4) + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 1883 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7))) + ) + +(defpart 1883 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.0 0.2) + (:x (meters -4) (meters 8)) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 170.0) + (:g 150.0) + (:b 120.0) + (:a 0.0) + (:scalevel-x (meters 0.016666668)) + (:rotvel-z (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.16666667 0.16666667) + (:accel-z (meters 0.006666667)) + (:friction 0.8 0.03) + (:timer (seconds 1.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x405c00 #x400000)) + (:next-time (seconds 0.5)) + (:next-launcher 1884) + ) + ) + +(defpart 1884 + :init-specs ((:fade-a -0.071428575 -0.071428575)) + ) + +(defpartgroup group-waswide-pump + :id 479 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 1885 :fade-after (meters 100) :falloff-to (meters 140) :flags (sp7) :period (seconds 2) :length (seconds 1) :offset 200) + (sp-item 1886 :fade-after (meters 100) :falloff-to (meters 140) :flags (is-3d sp7) :period (seconds 2) :length (seconds 1.2) :offset 200) + (sp-item 1887 :falloff-to (meters 50) :flags (sp7) :period (seconds 2) :length (seconds 1.2) :offset 200) + (sp-item 1888 :fade-after (meters 100) :falloff-to (meters 200) :flags (is-3d sp7) :period (seconds 2) :length (seconds 1.2) :offset 425) + (sp-item 1889 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7) :period (seconds 2) :length (seconds 1.2) :offset 425) + ) + ) + +(defpart 1888 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5) + (:x (meters 0)) + (:y (meters -1.5)) + (:z (meters 2.2)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 30.0) + (:g :copy r) + (:b :copy r) + (:a 128.0 64.0) + (:scalevel-x (meters 0.013333334) (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-13 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406400 #x408200)) + (:next-time (seconds 0.167)) + (:next-launcher 1890) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1890 + :init-specs ((:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -2.55) + (:next-time (seconds 0.085)) + (:next-launcher 1891) + ) + ) + +(defpart 1891 + :init-specs ((:scalevel-x (meters 0.0016666667) (meters 0.0016666667)) (:scalevel-y :copy scalevel-x)) + ) + +(defpart 1889 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 0.5) + (:x (meters -0.2) (meters 0.4)) + (:y (meters -1.5)) + (:z (meters 2) (meters 0.4)) + (:scale-x (meters 0.05) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 16.0) + (:vel-y (meters -0.0016666667) (meters -0.0033333334)) + (:vel-z (meters 0) (meters 0.00066666666)) + (:scalevel-x (meters -0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters 0.00016666666)) + (:friction 0.97) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1886 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0 2.0) + (:x (meters -0.05) (meters 0.1)) + (:y (meters -0.14)) + (:z (meters -0.14)) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 160.0) + (:g 160.0) + (:b 160.0) + (:a 32.0 32.0) + (:vel-z (meters 0.01)) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y (meters 0.0016666667)) + (:accel-y (meters 0)) + (:timer (seconds 0.735)) + (:flags (sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x406700 #x406700 #x406700 #x406600 #x406500)) + (:func 'sparticle-rotate-to-vel-3d) + (:next-time (seconds 0.335)) + (:next-launcher 1892) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1892 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y (meters 0)) (:accel-y (meters -0.00066666666))) + ) + +(defpart 1885 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 0.4 0.8) + (:x (meters -0.1) (meters 0.2)) + (:y (meters -0.14)) + (:z (meters -0.14) (meters -0.1)) + (:scale-x (meters 0.1) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:vel-z (meters 0.01)) + (:scalevel-x (meters 0) (meters 0.001)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters 0)) + (:timer (seconds 0.735)) + (:flags (launch-along-z left-multiply-quat)) + (:next-time (seconds 0.335)) + (:next-launcher 1893) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1893 + :init-specs ((:accel-y (meters -0.0005) (meters -0.00033333333)) (:next-time (seconds 0.017)) (:next-launcher 1894)) + ) + +(defpart 1894 + :init-specs ((:a 128.0 128.0) (:next-time (seconds 0.017) (seconds 0.015)) (:next-launcher 1895)) + ) + +(defpart 1895 + :init-specs ((:a 0.0) (:next-time (seconds 0.05) (seconds 0.165)) (:next-launcher 1894)) + ) + +(defpart 1887 + :init-specs ((:num 0.4 0.8) + (:x (meters -0.1) (meters 0.2)) + (:y (meters -0.14)) + (:z (meters -0.14) (meters -0.1)) + (:rot-x 8) + (:r 614.4) + (:g 163.84 327.68) + (:b 327.68) + (:vel-z (meters 0.01)) + (:accel-y (meters 0)) + (:timer (seconds 0.735)) + (:flags (distort launch-along-z)) + (:next-time (seconds 0.335)) + (:next-launcher 1896) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1896 + :init-specs ((:accel-y (meters -0.00066666666))) + ) + +(defpartgroup group-part-water-rocks-splash + :id 480 + :duration (seconds 1) + :linger-duration (seconds 6) + :flags (sp0 sp9) + :bounds (static-bspherem 0 0 0 600) + :parts ((sp-item 1897 :fade-after (meters 300) :falloff-to (meters 300) :period (seconds 60) :length (seconds 0.2)) + (sp-item 1898 :fade-after (meters 300) :falloff-to (meters 300) :flags (is-3d) :period (seconds 60) :length (seconds 0.035) :offset 150) + (sp-item 1899 :fade-after (meters 300) :falloff-to (meters 300) :period (seconds 60) :length (seconds 0.2) :offset 20) + ) + ) + +(defpart 1897 + :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-wrsplash-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-wrsplash-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-wrsplash-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-wrsplash-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-wrsplash-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-wrsplash-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-wrsplash-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-water-rocks-splash-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 1.5) :lifetime-offset (seconds 1)) + ) + +(set! (-> *part-id-table* 1897 init-specs 16 initial-valuef) + (the-as float *part-water-rocks-splash-curve-settings*) + ) + +(set! (-> *part-water-rocks-splash-curve-settings* color-start) *range-wrsplash-color*) + +(set! (-> *part-water-rocks-splash-curve-settings* alpha-start) *range-wrsplash-alpha*) + +(set! (-> *part-water-rocks-splash-curve-settings* scale-x-start) *range-wrsplash-scale-x*) + +(set! (-> *part-water-rocks-splash-curve-settings* scale-y-start) *range-wrsplash-scale-y*) + +(set! (-> *part-water-rocks-splash-curve-settings* r-scalar) #f) + +(set! (-> *part-water-rocks-splash-curve-settings* g-scalar) #f) + +(set! (-> *part-water-rocks-splash-curve-settings* b-scalar) #f) + +(set! (-> *part-water-rocks-splash-curve-settings* a-scalar) *curve-wrsplash-alpha*) + +(set! (-> *part-water-rocks-splash-curve-settings* scale-x-scalar) *curve-wrsplash-scale-x*) + +(set! (-> *part-water-rocks-splash-curve-settings* scale-y-scalar) #f) + +(defpart 1898 + :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 1899 + :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)) + ) + ) + +(defpartgroup group-part-water-wave-foam + :id 481 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 400) + :parts ((sp-item 1901 :flags (is-3d sp7) :period (seconds 6) :length (seconds 0.067) :binding 1900) + (sp-item 1900 :flags (is-3d sp2) :period (seconds 6) :length (seconds 1) :offset 25) + ) + ) + +(defpart 1901 + :init-specs ((:texture (wave-foam wascityb-sprite)) + (:num 1.0) + (:x (meters -20) (meters 40)) + (:y (meters 3)) + (:z (meters -20)) + (:scale-x (meters 10) (meters 10)) + (:scale-y (meters 1) (meters 3)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:vel-y (meters 0.001)) + (:vel-z (meters 0.06666667) (meters 0.016666668)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y (meters 0.026666667) (meters 0.013333334)) + (:fade-a 0.064) + (:accel-z (meters -0.0005) (meters -0.00006666667)) + (:friction 0.99) + (:timer (seconds 6.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 2.5)) + (:next-launcher 1902) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1902 + :init-specs ((:fade-a -0.1024 -0.1024)) + ) + +(defpart 1900 + :init-specs ((:texture (water-froth wascityb-sprite)) + (:num 0.1) + (:x (meters -20) (meters 40)) + (:scale-x (meters 20)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:vel-z (meters -0.000033333334)) + (:fade-a 0.42666668) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:func 'sparticle-turn-to-vel) + (:next-time (seconds 0.5)) + (:next-launcher 1903) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1903 + :init-specs ((:scalevel-y (meters 0.033333335)) (:fade-a 0.0) (:next-time (seconds 1)) (:next-launcher 1904)) + ) + +(defpart 1904 + :init-specs ((:accel-z (meters -0.001)) (:next-time (seconds 0.335)) (:next-launcher 1905)) + ) + +(defpart 1905 + :init-specs ((:fade-a -0.32 -0.32)) + ) + +(defpartgroup group-part-wascityb-birds + :id 482 + :bounds (static-bspherem 0 0 0 600) + :parts ((sp-item 1906 :flags (sp3)) + (sp-item 1907 :flags (sp3)) + (sp-item 1908 :flags (sp3)) + (sp-item 1909 :flags (sp3)) + (sp-item 1910 :flags (sp3)) + (sp-item 1911 :flags (sp3)) + (sp-item 1912 :flags (sp3)) + (sp-item 1913 :flags (sp3)) + (sp-item 1914 :flags (sp3)) + (sp-item 1915 :flags (sp3)) + ) + ) + +(defpart 1906 + :init-specs ((:texture (flying-bird-01 wascityb-sprite)) + (:num 1.0) + (:scale-x (meters 2.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 40)) + (: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-wascityb-bird1-path) + ) + ) + +(defun part-wascityb-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* 1906 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* 1906) 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-spawner (-> a0-12 proc)) last-velocity 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 1907 + :init-specs ((:texture (flying-bird-01 wascityb-sprite)) + (:num 1.0) + (:scale-x (meters 2.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 40)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 1 + 0 + #x3b301c00 + #x3b301d00 + #x3b301f00 + #x3b302000 + #x3b302200 + #x3b302300 + #x3b302500 + #x3b302600 + #x3b302800 + #x3b302900 + #x3b302b00 + ) + ) + (:func 'part-wascityb-bird2-path) + ) + ) + +(defun part-wascityb-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* 1907 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* 1907) 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-spawner (-> a0-10 proc)) last-velocity 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 1908 + :init-specs ((:texture (flying-bird-01 wascityb-sprite)) + (:num 1.0) + (:scale-x (meters 2.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 40)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 1 + 0 + #x3b301c00 + #x3b301d00 + #x3b301e00 + #x3b302000 + #x3b302100 + #x3b302200 + #x3b302400 + #x3b302500 + #x3b302600 + #x3b302800 + #x3b302900 + #x3b302a00 + ) + ) + (:func 'part-wascityb-bird3-path) + ) + ) + +(defun part-wascityb-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* 1908 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* 1908) 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-spawner (-> a0-12 proc)) last-velocity 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 1909 + :init-specs ((:texture (flying-bird-01 wascityb-sprite)) + (:num 1.0) + (:scale-x (meters 2.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 40)) + (: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-wascityb-bird4-path) + ) + ) + +(defun part-wascityb-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* 1909 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* 1909) 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-spawner (-> a0-12 proc)) last-velocity 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 1910 + :init-specs ((:texture (flying-bird-01 wascityb-sprite)) + (:num 1.0) + (:scale-x (meters 2.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 40)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 1 + 0 + #x3b301c00 + #x3b301d00 + #x3b301e00 + #x3b301f00 + #x3b302100 + #x3b302200 + #x3b302300 + #x3b302400 + #x3b302600 + #x3b302700 + #x3b302800 + #x3b302900 + #x3b302b00 + ) + ) + (:func 'part-wascityb-bird5-path) + ) + ) + +(defun part-wascityb-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* 1910 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* 1910) 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-spawner (-> a0-10 proc)) last-velocity 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 1911 + :init-specs ((:texture (flying-bird-01 wascityb-sprite)) + (:num 1.0) + (:scale-x (meters 2.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 40)) + (: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-wascityb-bird6-path) + ) + ) + +(defun part-wascityb-bird6-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* 1911 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 10240.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* 1911) 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-spawner (-> a0-12 proc)) last-velocity 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 1912 + :init-specs ((:texture (flying-bird-01 wascityb-sprite)) + (:num 1.0) + (:scale-x (meters 2.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 40)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 1 + 0 + #x3b301c00 + #x3b301d00 + #x3b301f00 + #x3b302000 + #x3b302200 + #x3b302300 + #x3b302500 + #x3b302600 + #x3b302800 + #x3b302900 + #x3b302b00 + ) + ) + (:func 'part-wascityb-bird7-path) + ) + ) + +(defun part-wascityb-bird7-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* 1912 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 34816.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* 1912) 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-spawner (-> a0-10 proc)) last-velocity 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 1913 + :init-specs ((:texture (flying-bird-01 wascityb-sprite)) + (:num 1.0) + (:scale-x (meters 2.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 40)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 1 + 0 + #x3b301c00 + #x3b301d00 + #x3b301e00 + #x3b301f00 + #x3b302000 + #x3b302100 + #x3b302200 + #x3b302400 + #x3b302500 + #x3b302600 + #x3b302700 + #x3b302800 + #x3b302900 + #x3b302a00 + ) + ) + (:func 'part-wascityb-bird8-path) + ) + ) + +(defun part-wascityb-bird8-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* 1913 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 22528.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* 1913) 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-spawner (-> a0-12 proc)) last-velocity 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 1914 + :init-specs ((:texture (flying-bird-01 wascityb-sprite)) + (:num 1.0) + (:scale-x (meters 2.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 40)) + (: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-wascityb-bird9-path) + ) + ) + +(defun part-wascityb-bird9-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* 1914 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 18432.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* 1914) 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-spawner (-> a0-12 proc)) last-velocity 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 1915 + :init-specs ((:texture (flying-bird-01 wascityb-sprite)) + (:num 1.0) + (:scale-x (meters 2.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 40)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 + 5 + 1 + 0 + #x3b301c00 + #x3b301d00 + #x3b301e00 + #x3b302000 + #x3b302100 + #x3b302200 + #x3b302400 + #x3b302500 + #x3b302600 + #x3b302800 + #x3b302900 + #x3b302a00 + ) + ) + (:func 'part-wascityb-bird10-path) + ) + ) + +(defun part-wascityb-bird10-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* 1915 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 26624.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* 1915) 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-spawner (-> a0-10 proc)) last-velocity 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-part-wascitya-flies + :id 483 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1916 :flags (sp3 sp6)) (sp-item 1917 :flags (sp3 sp6)) (sp-item 1918 :flags (sp3 sp6))) + ) + +(defpart 1916 + :init-specs ((:texture (shell-casing-03 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.2)) + (:scale-y :copy scale-x) + (:r 20.0) + (:g 20.0) + (:b 0.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:timer (seconds 40)) + (:flags (sp-cpuinfo-flag-13)) + (:func 'part-wascitya-fly1-path) + ) + ) + +(defun part-wascitya-fly1-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* 1916 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 409.6) + (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* 1916) 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-spawner (-> a0-12 proc)) last-velocity 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 1917 + :init-specs ((:texture (shell-casing-03 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.15)) + (:scale-y :copy scale-x) + (:r 20.0) + (:g 20.0) + (:b 0.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:timer (seconds 40)) + (:flags (sp-cpuinfo-flag-13)) + (:func 'part-wascitya-fly2-path) + ) + ) + +(defun part-wascitya-fly2-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* 1917 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 4096.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* 1917) 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-spawner (-> a0-10 proc)) last-velocity 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 1918 + :init-specs ((:texture (shell-casing-03 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.22)) + (:scale-y :copy scale-x) + (:r 20.0) + (:g 20.0) + (:b 0.0) + (:a 128.0) + (:omega (degrees 3.2958984) (degrees 6.591797)) + (:timer (seconds 40)) + (:flags (sp-cpuinfo-flag-13)) + (:func 'part-wascitya-fly3-path) + ) + ) + +(defun part-wascitya-fly3-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* 1918 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 6144.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* 1918) 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-spawner (-> a0-12 proc)) last-velocity 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) + ) + +(defpartgroup group-waswide-gaslamp + :id 484 + :flags (sp4 sp11) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1919 :fade-after (meters 200) :falloff-to (meters 300) :flags (sp7)) + (sp-item 1920 :fade-after (meters 200) :falloff-to (meters 300) :flags (sp7)) + (sp-item 1921 :fade-after (meters 200) :falloff-to (meters 300) :flags (sp7)) + (sp-item 1922 :fade-after (meters 200) :falloff-to (meters 300) :flags (sp7)) + (sp-item 1923 :fade-after (meters 20) :falloff-to (meters 30) :flags (sp7)) + ) + ) + +(defpart 1919 + :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 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-z (meters -0.0016666667) (meters 0.0016666667)) + (:scalevel-x (meters -0.016666668)) + (:accel-x (meters -0.001)) + (:accel-z (meters 0.0013333333) (meters 0.0013333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 0)) + (:conerot-y (degrees 0)) + ) + ) + +(if #t + (set! *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! *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! *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! *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-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-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-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! *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! *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! *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-gas-lamp-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* 1919 init-specs 17 initial-valuef) + (the-as float *part-gas-lamp-flame-curve-settings*) + ) + +(set! (-> *part-gas-lamp-flame-curve-settings* color-start) *range-color-flame*) + +(set! (-> *part-gas-lamp-flame-curve-settings* alpha-start) *range-alpha-flame*) + +(set! (-> *part-gas-lamp-flame-curve-settings* scale-x-start) *range-scale-flame-x*) + +(set! (-> *part-gas-lamp-flame-curve-settings* scale-y-start) *range-scale-flame-y*) + +(set! (-> *part-gas-lamp-flame-curve-settings* r-scalar) *r-curve-flame*) + +(set! (-> *part-gas-lamp-flame-curve-settings* g-scalar) *g-curve-flame*) + +(set! (-> *part-gas-lamp-flame-curve-settings* b-scalar) *b-curve-flame*) + +(set! (-> *part-gas-lamp-flame-curve-settings* a-scalar) *curve-alpha-flame*) + +(set! (-> *part-gas-lamp-flame-curve-settings* scale-x-scalar) *curve-flame-x*) + +(set! (-> *part-gas-lamp-flame-curve-settings* scale-y-scalar) *curve-flame-y*) + +(defpart 1920 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 1.0 1.0) + (:x (meters -0.3) (meters 0.6)) + (:y (meters -0.3) (meters 0.6)) + (:z (meters 0.3)) + (: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) + (:scalevel-x (meters -0.00033333333)) + (:fade-a -0.64) + (:accel-x (meters -0.001)) + (:accel-z (meters 0.0013333333) (meters 0.0013333333)) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +(defpart 1921 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:x (meters -1)) + (:z (meters 2.5)) + (: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 1922 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.01 0.05) + (:scale-x (meters 0.3) (meters 0.3)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-z (meters 0.06666667) (meters 0.016666668)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:accel-x (meters 0.0016666667)) + (:friction 0.95) + (:timer (seconds 2) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-y (degrees -20) (degrees 40)) + (:rotate-y (degrees -40)) + (:rotate-z (degrees 0)) + ) + ) + +(defpart 1923 + :init-specs ((:num 0.2) + (:x (meters 0) (meters 2)) + (:y (meters -0.5) (meters 1)) + (:z (meters 6)) + (:rot-x 8) + (:r 8192.0) + (:g 1228.8) + (:b 1024.0) + (:accel-x (meters 0.001)) + (:accel-z (meters 0.0016666667)) + (:timer (seconds 0.335)) + (:flags (distort)) + (:rotate-y (degrees -30)) + ) + ) + +(defpartgroup group-waswide-talltorch + :id 485 + :flags (sp4) + :bounds (static-bspherem 0 0 -12 40) + :parts ((sp-item 1924 :fade-after (meters 200) :falloff-to (meters 300) :flags (sp7)) + (sp-item 1925 :fade-after (meters 200) :falloff-to (meters 300) :flags (sp7)) + (sp-item 1926 :fade-after (meters 200) :falloff-to (meters 300) :flags (sp7)) + ) + ) + +(defpart 1924 + :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 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-z (meters -0.0016666667) (meters 0.0016666667)) + (:scalevel-x (meters -0.016666668)) + (:accel-x (meters -0.001)) + (:accel-z (meters 0.0013333333) (meters 0.0013333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 0)) + (:conerot-y (degrees 0)) + ) + ) + +(define *part-talltorch-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* 1924 init-specs 17 initial-valuef) + (the-as float *part-talltorch-flame-curve-settings*) + ) + +(set! (-> *part-talltorch-flame-curve-settings* color-start) *range-color-flame*) + +(set! (-> *part-talltorch-flame-curve-settings* alpha-start) *range-alpha-flame*) + +(set! (-> *part-talltorch-flame-curve-settings* scale-x-start) *range-scale-flame-x*) + +(set! (-> *part-talltorch-flame-curve-settings* scale-y-start) *range-scale-flame-y*) + +(set! (-> *part-talltorch-flame-curve-settings* r-scalar) *r-curve-flame*) + +(set! (-> *part-talltorch-flame-curve-settings* g-scalar) *g-curve-flame*) + +(set! (-> *part-talltorch-flame-curve-settings* b-scalar) *b-curve-flame*) + +(set! (-> *part-talltorch-flame-curve-settings* a-scalar) *curve-alpha-flame*) + +(set! (-> *part-talltorch-flame-curve-settings* scale-x-scalar) *curve-flame-x*) + +(set! (-> *part-talltorch-flame-curve-settings* scale-y-scalar) *curve-flame-y*) + +(defpart 1925 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:x (meters -1)) + (:z (meters 2.5)) + (:scale-x (meters 12) (meters 6)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3599)) + (: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 1926 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.01 0.05) + (:scale-x (meters 0.3) (meters 0.3)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-z (meters 0.06666667) (meters 0.016666668)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:accel-x (meters 0.0016666667)) + (:friction 0.95) + (:timer (seconds 2) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-y (degrees -20) (degrees 40)) + (:rotate-y (degrees -40)) + (:rotate-z (degrees 0)) + ) + ) diff --git a/goal_src/jak3/lib/project-lib.gp b/goal_src/jak3/lib/project-lib.gp index b10872a349..fdb35b6c49 100644 --- a/goal_src/jak3/lib/project-lib.gp +++ b/goal_src/jak3/lib/project-lib.gp @@ -112,15 +112,15 @@ ) ) -(defmacro copy-go (name) - (let* ((path (string-append "$DECOMP/raw_obj/" name ".go"))) +(defmacro copy-obj (name) + (let* ((path (string-append "$DECOMP/raw_obj/" name))) `(defstep :in ,path :tool 'copy - :out '(,(string-append "$OUT/obj/" name ".go"))))) + :out '(,(string-append "$OUT/obj/" name))))) -(defmacro copy-gos (&rest gos) +(defmacro copy-objs (&rest gos) `(begin - ,@(apply (lambda (x) `(copy-go ,x)) gos) + ,@(apply (lambda (x) `(copy-obj ,x)) gos) ) ) @@ -167,7 +167,7 @@ (set! curr-elt (cdr curr-elt))) new-list)) -(defmacro cgo-file (dgo-file-name deps) +(defmacro cgo-file (dgo-file-name deps &key (bsp-file-name #f)) ;; First read in the DGO file, it has pretty much everything we need (let ((dgo-data (car (read-data-file (string-append "goal_src/jak3/dgos/" dgo-file-name))))) ;; Get the name of the DGO @@ -175,7 +175,7 @@ (files (cadr dgo-data)) (gsrc-seq-args '()) (textures '()) - (gos '())) + (objs '())) ;; create the dgo step (cgo dgo-name dgo-file-name) ;; Now we iterate through the list of files, skipping ones we've already processed @@ -186,7 +186,9 @@ (when (not (car (hash-table-try-ref *file-entry-map* file-name))) ;; Depending on the type of file, generate the appropriate steps (cond - ((string-ends-with? file-name ".o") + ((and (string-ends-with? file-name ".o") + (neq? file-name bsp-file-name) + ) ;; build up a list of all gsrc files needing to be compiled (let ((base-name (symbol->string (first (string-split file-name "."))))) (cond @@ -211,23 +213,25 @@ ;; copy textures (let ((tpage-id (second (string-split (symbol->string (first (string-split file-name "."))) "-")))) (set! textures (cons tpage-id textures)))) - ((string-ends-with? file-name ".go") + ((or (string-ends-with? file-name ".go") + (eq? file-name bsp-file-name) + ) ;; copy art files - (set! gos (cons (stem file-name) gos)))) + (set! objs (cons file-name objs)))) ;; Update the map so this file isn't processed again (hash-table-set! *file-entry-map* file-name #f))) (set! files (cdr files))) ;; TODO - need an `append`!, reverse lists by re-cons'ing them for now (set! gsrc-seq-args (reverse-list gsrc-seq-args)) (set! textures (reverse-list textures)) - (set! gos (reverse-list gos)) + (set! objs (reverse-list objs)) `(begin ;; macros can't return nothing, so these macros assume they will be given a non-empty list (when (not (null? '(,@gsrc-seq-args))) (goal-src-sequence "" :deps ,(eval deps) ,@gsrc-seq-args)) (when (not (null? '(,@textures))) (copy-textures ,@textures)) - (when (not (null? '(,@gos))) - (copy-gos ,@gos))) + (when (not (null? '(,@objs))) + (copy-objs ,@objs))) ) )) 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 0000000000..35e0c0bbc5 --- /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 new file mode 100644 index 0000000000..8f8a45ad57 --- /dev/null +++ b/goal_src/jak3/pc/debug/default-menu-pc.gc @@ -0,0 +1,1081 @@ +;;-*-Lisp-*- +(in-package goal) + +#| + + Extra debug menus for PC port. + +|# + +(declare-file (debug)) + +(defmacro new-dm-func (text var func) + `(new 'debug 'debug-menu-item-function ,text ,var (the-as (function int object) ,func)) + ) +(defmacro new-dm-flag (text var func) + `(new 'debug 'debug-menu-item-flag ,text ,var (the-as (function int debug-menu-msg object) ,func)) + ) +(defmacro new-dm-bool (text sym func) + `(new-dm-flag ,text (quote ,sym) ,func) + ) +(defmacro new-dm-submenu (text menu) + `(new 'debug 'debug-menu-item-submenu ,text ,menu) + ) +(defmacro new-dm-var-float (text var func inc min max) + `(debug-menu-item-var-make-float (new 'debug 'debug-menu-item-var ,text ,var (* 8 20)) + (the-as (function int debug-menu-msg float float float) ,func) + ,inc #t ,min ,max 1) + ) + +(defun dm-int-var-func ((var symbol) (msg debug-menu-msg) (val int) (undo-val int)) + (when (= msg (debug-menu-msg press)) + (set! (-> var value) val) + ) + (-> var value) + ) + +;; (defun dm-want-level-toggle-pick-func ((arg0 pair) (arg1 debug-menu-msg)) +;; (let* ((levname (the-as symbol (car arg0))) +;; (info (the-as level-load-info (-> levname value))) +;; (idx (the int (cdr arg0))) +;; (the-level (level-get *level* (-> info name))) +;; ) +;; (if (and the-level (!= the-level (-> *level* level idx))) +;; (return 'invalid) +;; ) +;; (if (= arg1 (debug-menu-msg press)) +;; (load-state-want-levels +;; (if (= idx 0) (-> info name) (-> *level* level 0 name)) +;; (if (= idx 1) (-> info name) (-> *level* level 1 name)) +;; ) +;; ) +;; (eq? (-> *level* level idx name) (-> info name)) +;; ) +;; ) +;; +;; (defun dm-display-level-toggle-pick-func ((arg0 symbol) (arg1 debug-menu-msg)) +;; (let ((the-level (level-get *level* arg0))) +;; (if (not the-level) +;; (return 'invalid) +;; ) +;; (if (= arg1 (debug-menu-msg press)) +;; (when the-level +;; (load-state-want-display-level arg0 +;; (if (-> the-level display?) #f 'display) +;; ) +;; ) +;; ) +;; (and the-level (-> the-level display?)) +;; ) +;; ) +;; +;; (defun debug-menu-make-load-want-menu ((ctx debug-menu-context) (lev-idx int)) +;; +;; (let ((want-menu (new 'debug 'debug-menu ctx "Level want menu"))) +;; +;; (let ((iter *level-load-list*)) +;; (while (not (or (null? iter) (null? (cdr iter)) (null? (cddr iter)))) +;; (debug-menu-append-item want-menu (new-dm-flag (symbol->string (the-as symbol (car iter))) (dcons (car iter) lev-idx) dm-want-level-toggle-pick-func)) +;; +;; (set! iter (cdr iter)) +;; ) +;; ) +;; +;; (new-dm-submenu (new 'debug 'string 0 (string-format "Want ~D" lev-idx)) want-menu) +;; ) +;; ) +;; +;; (defun debug-menu-make-load-display-menu ((ctx debug-menu-context)) +;; +;; (let ((display-menu (new 'debug 'debug-menu ctx "Level display menu"))) +;; +;; (let ((iter *level-load-list*)) +;; (while (not (or (null? iter) (null? (cdr iter)) (null? (cddr iter)))) +;; (debug-menu-append-item display-menu (new-dm-flag (symbol->string (the-as symbol (car iter))) (car iter) dm-display-level-toggle-pick-func)) +;; +;; (set! iter (cdr iter)) +;; ) +;; ) +;; +;; (new-dm-submenu "Display" display-menu) +;; ) +;; ) +;; +;; (defun debug-menu-make-load-teleport-menu ((ctx debug-menu-context)) +;; +;; (let ((teleport-menu (new 'debug 'debug-menu ctx "Camera teleport menu"))) +;; +;; (let ((iter *level-load-list*)) +;; (while (not (or (null? iter) (null? (cdr iter)) (null? (cddr iter)))) +;; (debug-menu-append-item teleport-menu +;; (new-dm-func (symbol->string (the-as symbol (car iter))) +;; (-> (the-as symbol (car iter)) value) +;; (lambda ((info level-load-info)) +;; (let ((tf (new 'stack-no-clear 'transformq))) +;; (set! (-> tf trans x) (-> info bsphere x)) +;; (set! (-> tf trans y) (-> info bsphere y)) +;; (set! (-> tf trans z) (-> info bsphere z)) +;; (quaternion-identity! (-> tf quat)) +;; (vector-identity! (-> tf scale)) +;; (send-event *camera* 'teleport-to-transformq tf) +;; ) +;; ) +;; )) +;; +;; (set! iter (cdr iter)) +;; ) +;; ) +;; +;; (new-dm-submenu "Camera teleport" teleport-menu) +;; ) +;; ) +;; +;; (defun debug-menu-make-load-menu ((ctx debug-menu-context)) +;; (let ((load-menu (new 'debug 'debug-menu ctx "Load menu"))) +;; (debug-menu-append-item load-menu (new-dm-bool "Level Border" *display-level-border* dm-boolean-toggle-pick-func)) +;; (debug-menu-append-item load-menu (debug-menu-make-from-template ctx '(flag +;; "border-mode" +;; #f +;; ,(lambda ((arg0 int) (arg1 debug-menu-msg)) +;; (if (= arg1 (debug-menu-msg press)) +;; (set! (-> *setting-control* default border-mode) (not (-> *setting-control* default border-mode))) +;; ) +;; (-> *setting-control* default border-mode) +;; ) +;; ))) +;; +;; (debug-menu-append-item load-menu (debug-menu-make-load-want-menu ctx 0)) ;; Want 0 +;; (debug-menu-append-item load-menu (debug-menu-make-load-want-menu ctx 1)) ;; Want 1 +;; (debug-menu-append-item load-menu (debug-menu-make-load-display-menu ctx)) ;; Display +;; (debug-menu-append-item load-menu (debug-menu-make-load-teleport-menu ctx)) ;; Camera teleport +;; +;; (new-dm-submenu "Load" load-menu) +;; ) +;; ) + +(define *part-pick-menu* (the-as debug-menu #f)) +(define *spawn-part-test* #t) + +(defun dm-part-pick-func ((id int) (msg debug-menu-msg)) + (if (zero? (-> *part-group-id-table* id)) + (return 'invalid)) + (when (= msg (debug-menu-msg press)) + (set! *part-tester-id* id) + (if *spawn-part-test* + (start-part) + ) + ) + (= *part-tester-id* id) + ) + +(defun build-particles-list () + (debug-menu-remove-all-items *part-pick-menu*) + (dotimes (i (-> *part-group-id-table* length)) + (let ((part (-> *part-group-id-table* i))) + (when (and (nonzero? part)) + (debug-menu-append-item *part-pick-menu* (new-dm-flag (-> part name) i dm-part-pick-func)) + ) + ) + ) + (set! (-> *part-pick-menu* items) (sort (-> *part-pick-menu* items) debug-menu-node *entity-debug-inspect* entity) e) + (set-entity! *entity-debug-inspect* (the entity #f)) + (set-entity! *entity-debug-inspect* e)) + ) + (= (-> *entity-debug-inspect* entity) e) + ) + +(define *entity-debug-include-part-spawner* #f) +(define *entity-debug-include-cameras* #f) +(define *entity-debug-include-nav-meshes* #f) +(define *entity-debug-include-race-meshes* #f) +(defun build-entity-list () + "Fill the entity pick menu" + ;; clear old list + (debug-menu-remove-all-items *entity-pick-menu*) + ;; go through active levels + (dotimes (s5-0 (-> *level* length)) + (let ((s4-0 (-> *level* level s5-0))) + (when (= (-> s4-0 status) 'active) + ;; actor entities + (let ((s3-0 (-> s4-0 bsp actors))) + (when (nonzero? s3-0) + (dotimes (s2-0 (-> s3-0 length)) + (let ((s1-0 (-> s3-0 data s2-0 actor))) + (unless (and (not *entity-debug-include-part-spawner*) + (type-type? (-> s1-0 etype) part-spawner)) + (debug-menu-append-item *entity-pick-menu* (new-dm-flag (res-lump-struct s1-0 'name string) s1-0 dm-entity-flag-func)) + ) + ) + ) + ) + ) + ;; camera entities + (when *entity-debug-include-cameras* + (let ((s4-1 (-> s4-0 bsp cameras))) + (when (nonzero? s4-1) + (dotimes (s3-2 (-> s4-1 length)) + (let ((s2-2 (-> s4-1 s3-2))) + (debug-menu-append-item *entity-pick-menu* (new-dm-flag (res-lump-struct s2-2 'name string) s2-2 dm-entity-flag-func)) + ) + ) + ) + ) + ) + ;; nav mesh entities + (when *entity-debug-include-nav-meshes* + (let ((s4-1 (-> s4-0 bsp nav-meshes))) + (when (nonzero? s4-1) + (dotimes (s3-2 (-> s4-1 length)) + (let ((s2-2 (-> s4-1 s3-2))) + (debug-menu-append-item *entity-pick-menu* (new-dm-flag (res-lump-struct s2-2 'name string) s2-2 dm-entity-flag-func)) + ) + ) + ) + ) + ) + ;; race mesh entities + (when *entity-debug-include-race-meshes* + (let ((s4-1 (-> s4-0 bsp race-meshes))) + (when (nonzero? s4-1) + (dotimes (s3-2 (-> s4-1 length)) + (let ((s2-2 (-> s4-1 s3-2))) + (debug-menu-append-item *entity-pick-menu* (new-dm-flag (res-lump-struct s2-2 'name string) s2-2 dm-entity-flag-func)) + ) + ) + ) + ) + ) + ) + ) + ) + (set! (-> *entity-pick-menu* items) (sort (-> *entity-pick-menu* items) debug-menu-node *entity-debug-inspect* entity) (return #f)) + (let ((tf (new 'stack 'transformq))) + (vector-copy! (-> tf trans) (-> *entity-debug-inspect* entity trans)) + (quaternion-identity! (-> tf quat)) + (vector-identity! (-> tf scale)) + (send-event *camera* 'teleport-to-transformq tf) + )))) + (debug-menu-append-item entity-menu (new-dm-func "Print entity info" #t dm-display-entities-pick-func)) + (debug-menu-append-item entity-menu (new-dm-func "Print entity info (ag)" 'art-group dm-display-entities-pick-func)) + (debug-menu-append-item entity-menu (new-dm-func "Print entity info (meters)" 'entity-meters dm-display-entities-pick-func)) + (debug-menu-append-item entity-menu (new-dm-func "Print entity info (perm)" 'entity-perm dm-display-entities-pick-func)) + (debug-menu-append-item entity-menu (new-dm-bool "Include part-spawner" *entity-debug-include-part-spawner* dm-boolean-toggle-pick-func)) + (debug-menu-append-item entity-menu (new-dm-bool "Include cameras" *entity-debug-include-cameras* dm-boolean-toggle-pick-func)) + (debug-menu-append-item entity-menu (new-dm-bool "Include nav meshes" *entity-debug-include-nav-meshes* dm-boolean-toggle-pick-func)) + (debug-menu-append-item entity-menu (new-dm-bool "Include race meshes" *entity-debug-include-race-meshes* dm-boolean-toggle-pick-func)) + + (new-dm-submenu "Entity" entity-menu) + ) + ) + +(defmacro dm-lambda-int-var (val) + "helper macro for making int buttons" + `,(lambda (arg (msg debug-menu-msg) (newval int)) + (cond + ((= msg (debug-menu-msg press)) + (set! ,val newval) + ) + (else + ,val + ) + )) + ) + +(defmacro dm-lambda-float-var (val) + "helper macro for making float buttons" + `,(lambda (arg (msg debug-menu-msg) (newval float)) + (cond + ((= msg (debug-menu-msg press)) + (set! ,val newval) + ) + (else + ,val + ) + )) + ) + +(defmacro dm-lambda-meters-var (val) + "helper macro for making meters buttons" + `,(lambda (arg (msg debug-menu-msg) (newval float)) + (cond + ((= msg (debug-menu-msg press)) + (set! ,val (meters newval)) + ) + (else + (* (1/ METER_LENGTH) ,val) + ) + )) + ) + +(defun dm-toggle-collision-pick-func ((arg symbol) (msg debug-menu-msg)) + (when (= msg (debug-menu-msg press)) + (cond + ((-> arg value) + (false! (-> arg value)) + (logior! (-> *display* vu1-enable-user-menu) (vu1-renderer-mask shrubbery tfrag tfrag-trans tfrag-water tie etie)) + ) + (else + (true! (-> arg value)) + (logclear! (-> *display* vu1-enable-user-menu) (vu1-renderer-mask shrubbery tfrag tfrag-trans tfrag-water tie etie)) + ) + ) + ) + (-> arg value) + ) + +(defun dm-collision-mode-pick-func ((arg pc-collision-mode) (msg debug-menu-msg)) + (when (= msg (debug-menu-msg press)) + (set! *collision-mode* arg) + ) + (= *collision-mode* arg) + ) + +(defun dm-collision-filter-mode-pick-func ((arg int) (msg debug-menu-msg)) + (when (= msg (debug-menu-msg press)) + (pc-set-collision-mask (pc-collision-mode mode) arg (not (pc-get-collision-mask (pc-collision-mode mode) arg))) + ) + (pc-get-collision-mask (pc-collision-mode mode) arg) + ) + +(defun dm-collision-filter-event-pick-func ((arg int) (msg debug-menu-msg)) + (when (= msg (debug-menu-msg press)) + (pc-set-collision-mask (pc-collision-mode event) arg (not (pc-get-collision-mask (pc-collision-mode event) arg))) + ) + (pc-get-collision-mask (pc-collision-mode event) arg) + ) + +(defun dm-collision-filter-material-pick-func ((arg int) (msg debug-menu-msg)) + (when (= msg (debug-menu-msg press)) + (pc-set-collision-mask (pc-collision-mode material) arg (not (pc-get-collision-mask (pc-collision-mode material) arg))) + ) + (pc-get-collision-mask (pc-collision-mode material) arg) + ) + +(defun dm-collision-filter-skip-pick-func ((arg int) (msg debug-menu-msg)) + (when (= msg (debug-menu-msg press)) + (pc-set-collision-mask (pc-collision-mode skip) arg (not (pc-get-collision-mask (pc-collision-mode skip) arg))) + ) + (pc-get-collision-mask (pc-collision-mode skip) arg) + ) + +(defun dm-collision-filter-skiphide-pick-func ((arg int) (msg debug-menu-msg)) + (when (= msg (debug-menu-msg press)) + (pc-set-collision-mask (pc-collision-mode skiphide) arg (not (pc-get-collision-mask (pc-collision-mode skiphide) arg))) + ) + (pc-get-collision-mask (pc-collision-mode skiphide) arg) + ) + +(defun debug-menu-make-collision-renderer-menu ((ctx debug-menu-context)) + (let ((menu (new 'debug 'debug-menu ctx "OpenGOAL collision renderer menu"))) + ;; master toggle + (debug-menu-append-item menu (new-dm-bool "Enable" *collision-renderer* dm-toggle-collision-pick-func)) + (debug-menu-append-item menu (new-dm-bool "Wireframe" *collision-wireframe* dm-boolean-toggle-pick-func)) + (debug-menu-append-item menu (new-dm-submenu "Mode" + (let ((mode-menu (new 'debug 'debug-menu ctx "OpenGOAL collision renderer mode menu"))) + (debug-menu-append-item mode-menu (new-dm-flag "none" (pc-collision-mode none) dm-collision-mode-pick-func)) + (debug-menu-append-item mode-menu (new-dm-flag "mode" (pc-collision-mode mode) dm-collision-mode-pick-func)) + (debug-menu-append-item mode-menu (new-dm-flag "event" (pc-collision-mode event) dm-collision-mode-pick-func)) + (debug-menu-append-item mode-menu (new-dm-flag "material" (pc-collision-mode material) dm-collision-mode-pick-func)) + mode-menu))) + (debug-menu-append-item menu (new-dm-submenu "Filter mode" + (let ((filter-menu (new 'debug 'debug-menu ctx "OpenGOAL collision renderer filter mode menu"))) + (doenum (name val pat-mode) + (debug-menu-append-item filter-menu (new-dm-flag name val dm-collision-filter-mode-pick-func)) + ) + filter-menu))) + (debug-menu-append-item menu (new-dm-submenu "Filter event" + (let ((filter-menu (new 'debug 'debug-menu ctx "OpenGOAL collision renderer filter event menu"))) + (doenum (name val pat-event) + (debug-menu-append-item filter-menu (new-dm-flag name val dm-collision-filter-event-pick-func)) + ) + filter-menu))) + (debug-menu-append-item menu (new-dm-submenu "Filter material" + (let ((filter-menu (new 'debug 'debug-menu ctx "OpenGOAL collision renderer filter material menu"))) + (doenum (name val pat-material) + (debug-menu-append-item filter-menu (new-dm-flag name val dm-collision-filter-material-pick-func)) + ) + filter-menu))) + (debug-menu-append-item menu (new-dm-submenu "Filter skip" + (let ((filter-menu (new 'debug 'debug-menu ctx "OpenGOAL collision renderer filter skip menu"))) + (debug-menu-append-item filter-menu (new-dm-flag "(no skip)" -1 dm-collision-filter-skip-pick-func)) + (doenum (name val pc-pat-skip-hack) + (debug-menu-append-item filter-menu (new-dm-flag name val dm-collision-filter-skip-pick-func)) + ) + filter-menu))) + (debug-menu-append-item menu (new-dm-submenu "Hide skip" + (let ((filter-menu (new 'debug 'debug-menu ctx "OpenGOAL collision renderer hide skip menu"))) + (doenum (name val pc-pat-skip-hack) + (debug-menu-append-item filter-menu (new-dm-flag name val dm-collision-filter-skiphide-pick-func)) + ) + filter-menu))) + + (new-dm-submenu "OpenGOAL collision renderer" menu) + ) + ) + +(defun dm-lod-int ((arg0 int) (arg1 debug-menu-msg) (arg2 int) (arg3 int)) + (when (= arg1 (debug-menu-msg press)) + (case (/ arg0 8) + ((0) (set! (-> *pc-settings* lod-force-tfrag) arg2)) + ((1) (set! (-> *pc-settings* lod-force-tie) arg2)) + ((2) (set! (-> *pc-settings* lod-force-ocean) arg2)) + ((3) (set! (-> *pc-settings* lod-force-actor) arg2)) + ) + ) + (case (/ arg0 8) + ((0) (-> *pc-settings* lod-force-tfrag)) + ((1) (-> *pc-settings* lod-force-tie)) + ((2) (-> *pc-settings* lod-force-ocean)) + ((3) (-> *pc-settings* lod-force-actor)) + (else arg3) + ) + ) + +(defun dm-subtitle-setting ((setting symbol) (msg debug-menu-msg)) + (when (= msg (debug-menu-msg press)) + (set! (-> *pc-settings* subtitle-speaker?) setting)) + (= (-> *pc-settings* subtitle-speaker?) setting) + ) + +;; (defun dm-anim-tester-x-flag-func ((action symbol) (msg debug-menu-msg)) +;; (case action +;; (('at-show-joint-info) +;; (if (= msg (debug-menu-msg press)) +;; (logxor! (-> *ATX-settings* flags) (atx-flags show-joints))) +;; (return (logtest? (-> *ATX-settings* flags) (atx-flags show-joints))) +;; ) +;; ) +;; #f) + +;; (defun dm-anim-tester-x-refresh () +;; (atx-start) +;; (atx-list-init! (-> *ATX-settings* list-ctrl)) +;; (set! (-> *ATX-settings* list-ctrl func) atx-list-art-group-func) +;; (atx-add-common-group) +;; (atx-add-level-group) +;; ) + +;; (defun dm-anim-tester-x-func ((action symbol)) +;; (unless *atx* +;; (atx-start)) + +;; (case action +;; (('pick-art-group) +;; (set! (-> *atx* 0 edit-mode) (atx-edit-mode art-group)) +;; ;; (false! *camera-read-buttons*) +;; (logclear! (-> *camera* settings master-options) (cam-master-options READ_BUTTONS)) +;; ) +;; (('at-pick-joint-anim) +;; (when (-> *atx* 0 cur-art-group) +;; (set! (-> *atx* 0 edit-mode) (atx-edit-mode anim)) +;; ;; (false! *camera-read-buttons*) +;; (logclear! (-> *camera* settings master-options) (cam-master-options READ_BUTTONS)) +;; ) +;; ) +;; (('pick-mesh-geo) +;; (when (-> *atx* 0 cur-art-group) +;; (set! (-> *atx* 0 edit-mode) (atx-edit-mode mgeo)) +;; ;; (false! *camera-read-buttons*) +;; (logclear! (-> *camera* settings master-options) (cam-master-options READ_BUTTONS)) +;; ) +;; ) +;; (('pick-joint-geo) +;; (when (-> *atx* 0 cur-art-group) +;; (set! (-> *atx* 0 edit-mode) (atx-edit-mode jgeo)) +;; ;; (false! *camera-read-buttons*) +;; (logclear! (-> *camera* settings master-options) (cam-master-options READ_BUTTONS)) +;; ) +;; ) +;; (('at-cam-free-floating) +;; (send-event *camera* 'change-state cam-free-floating 0) +;; ) +;; ;; (('at-cam-orbit) +;; ;; (send-event *camera* 'change-state cam-orbit 0) +;; ;; ) +;; ) +;; 0) + +;; (defun dm-anim-tester-x-speed-var-func (arg (msg debug-menu-msg) (newval float)) +;; (if (= msg (debug-menu-msg press)) +;; (set! (-> *ATX-settings* speed) newval) +;; (-> *ATX-settings* speed)) +;; ) + +;; (defun dm-anim-tester-x-frame-num-var-func (arg (msg debug-menu-msg) (newval float)) +;; (if (= msg (debug-menu-msg press)) +;; (set! (-> *ATX-settings* frame-num) newval) +;; (-> *ATX-settings* frame-num)) +;; ) + +;; (defun debug-menu-make-anim-tester-x-menu ((ctx debug-menu-context)) +;; (let ((menu (new 'debug 'debug-menu ctx "Anim Tester X menu"))) +;; ;; master toggle +;; (debug-menu-append-item menu (new-dm-func "Start" #f atx-start)) +;; (debug-menu-append-item menu (new-dm-func "Stop" #f atx-stop)) +;; (debug-menu-append-item menu (new-dm-var-float "Speed" (the int #f) dm-anim-tester-x-speed-var-func 0.01 -10.0 10.0)) +;; (debug-menu-append-item menu (new-dm-var-float "Frame Num" (the int #f) dm-anim-tester-x-frame-num-var-func 0.1 0.0 99999.0)) +;; (debug-menu-append-item menu (new-dm-func "Refresh" #f dm-anim-tester-x-refresh)) +;; (debug-menu-append-item menu (new-dm-func "Pick Art Group" 'pick-art-group dm-anim-tester-x-func)) +;; (debug-menu-append-item menu (new-dm-func "Pick Anim" 'at-pick-joint-anim dm-anim-tester-x-func)) +;; (debug-menu-append-item menu (new-dm-func "Pick Mesh" 'pick-mesh-geo dm-anim-tester-x-func)) +;; (debug-menu-append-item menu (new-dm-func "Pick Skeleton" 'pick-joint-geo dm-anim-tester-x-func)) +;; (debug-menu-append-item menu (new-dm-flag "Show Joint Info" 'at-show-joint-info dm-anim-tester-x-flag-func)) +;; (debug-menu-append-item menu (new-dm-func "Free Floating cam" 'at-cam-free-floating dm-anim-tester-x-func)) +;; ;; (debug-menu-append-item menu (new-dm-func "Orbit cam" 'at-cam-orbit dm-anim-tester-x-func)) + +;; (new-dm-submenu "Anim Tester X" menu) +;; ) +;; ) + +;; (defun dm-music-player-func ((lst object)) +;; (kill-by-name 'dm-player *active-pool*) +;; (set! *progress-flava* -1) +;; (process-spawn-function process :name 'dm-player +;; (lambda :behavior process ((lst pair)) +;; (loop +;; (suspend) +;; (set-setting! 'music (the-as symbol (car lst)) 0.0 0) +;; (set! *progress-flava* (the-as int (cdr lst))) +;; ) +;; ) +;; lst +;; ) +;; ) +;; +;; (defun debug-menu-make-music-player-menu ((ctx debug-menu-context)) +;; (let ((music-menu (new 'debug 'debug-menu ctx "Music player menu"))) +;; (dotimes (i (-> *music-flava-name-list* length)) +;; (let* ((flava-list (-> *music-flava-name-list* i)) +;; (level-name (new 'debug 'string 30 (text-id->string (-> flava-list 0)))) +;; (lvl-menu (new 'debug 'debug-menu ctx (the-as string #f))) +;; ) +;; (dotimes (j (-> flava-list length)) +;; (let ((flava-name (new 'debug 'string 30 (text-id->string (-> flava-list j))))) +;; (when (and (string= (substring! *temp-string* level-name (- (length level-name) 11) (length level-name)) "-level-name") +;; (string= (substring! *temp-string* flava-name (- (length flava-name) 11) (length flava-name)) "-level-name")) +;; (copy-string<-string flava-name (symbol->string (ref *music-list* i))) +;; ) +;; (unless (string= flava-name "zero") +;; (debug-menu-append-item lvl-menu (new-dm-func flava-name (dcons (ref *music-list* i) j) dm-music-player-func)) +;; ) +;; ) +;; ) +;; (let ((menu-name (new 'debug 'string 30 (symbol->string (ref *music-list* i))))) +;; (debug-menu-append-item music-menu (new-dm-submenu menu-name lvl-menu)) +;; ) +;; ) +;; ) +;; (debug-menu-append-item music-menu (new-dm-func "Reset" #f (lambda () (kill-by-name 'dm-player *active-pool*) (set! *progress-flava* -1)))) +;; (new-dm-submenu "Music player" music-menu) +;; ) +;; ) + +(define *region-pick-menu* (the debug-menu #f)) + +(defun dm-region-pick-func ((r drawable-region-prim) (msg debug-menu-msg)) + (when (= msg (debug-menu-msg press)) + (if (= *region-debug-inspect* r) + (set! *region-debug-inspect* #f) + (set! *region-debug-inspect* r)) + ) + (= *region-debug-inspect* r) + ) + +(defun debug-menu-node-region (the-as drawable-region-prim (-> arg0 id)) region id) (-> (the-as drawable-region-prim (-> arg1 id)) region id)) + ) + +(defun array-uint32-value? ((arr (array uint32)) (val uint)) + (dotimes (i (-> arr length)) + (if (= val (-> arr i)) (return #t))) + #f) +(define *region-debug-id-list* (new 'static 'boxed-array :type uint32 :length 0 :allocated-length 2000)) + +(defun build-regions-list ((merge-prims? symbol)) + "Fill the region pick menu" + + ;; clear old list + (debug-menu-remove-all-items *region-pick-menu*) + (set! *region-debug-inspect* #f) + (set! *merge-region-prims* merge-prims?) + (dotimes (i (-> *region-debug-id-list* allocated-length)) + (set! (-> *region-debug-id-list* i) -1)) + (set! (-> *region-debug-id-list* length) 0) + + ;; go through active levels + (dotimes (lev-i (-> *level* length)) + (let ((lev (-> *level* level lev-i))) + (when (= (-> lev status) 'active) + (let ((region-trees (-> lev bsp region-trees))) + (when (nonzero? region-trees) + (let* ((s3-5 (-> region-trees length)) + (tree-i 0) + (region-tree (-> region-trees tree-i)) + ) + (while (< tree-i s3-5) + (let* ((s0-4 (-> region-tree data2 (+ (-> region-tree length) -1) length)) + (i 0) + (region (-> (the-as drawable-inline-array-region-prim (-> region-tree data2 (+ (-> region-tree length) -1))) data i)) + ) + (while (< i s0-4) + (when (or (not merge-prims?) (not (array-uint32-value? *region-debug-id-list* (-> region region id)))) + (debug-menu-append-item *region-pick-menu* (new-dm-flag (new 'debug 'string 0 (string-format "region-~D" (-> region region id))) region dm-region-pick-func)) + (when merge-prims? + (set! (-> *region-debug-id-list* (-> *region-debug-id-list* length)) (-> region region id)) + (1+! (-> *region-debug-id-list* length)) + ) + ) + (1+! i) + (set! region (-> (the-as drawable-inline-array-region-prim (-> region-tree data2 (+ (-> region-tree length) -1))) data i)) + ) + ) + (1+! tree-i) + (set! region-tree (-> region-trees tree-i)) + ) + ) + ) + ) + ) + ) + ) + + (set! (-> *region-pick-menu* items) (sort (-> *region-pick-menu* items) debug-menu-node-region *region-debug-inspect* region on-enter))) + (('on-inside) (format #t "on-inside: ~A~%" (-> *region-debug-inspect* region on-inside))) + (('on-exit) (format #t "on-exit: ~A~%" (-> *region-debug-inspect* region on-exit))) + ) + ) + +(defun debug-menu-make-regions-menu ((ctx debug-menu-context)) + (let ((regions-menu (new 'debug 'debug-menu ctx "Regions menu"))) + (let ((pick-menu (new 'debug 'debug-menu ctx "Pick region menu"))) + (set! *region-pick-menu* pick-menu) + (debug-menu-append-item regions-menu (new-dm-submenu "Pick Region" pick-menu)) + ) + (debug-menu-append-item regions-menu (new-dm-func "Refresh (merge prims)" #t build-regions-list)) + (debug-menu-append-item regions-menu (new-dm-func "Refresh" #f build-regions-list)) + (debug-menu-append-item regions-menu (new-dm-func "Go to region" #f + (lambda () + (unless *region-debug-inspect* (return #f)) + (let ((tf (new 'stack 'transformq))) + (vector-copy! (-> tf trans) (-> *region-debug-inspect* bsphere)) + (quaternion-identity! (-> tf quat)) + (vector-identity! (-> tf scale)) + (send-event *camera* 'teleport-to-transformq tf) + )))) + (debug-menu-append-item regions-menu (new-dm-func "Print on-enter" 'on-enter dm-print-region-pick-func)) + (debug-menu-append-item regions-menu (new-dm-func "Print on-inside" 'on-inside dm-print-region-pick-func)) + (debug-menu-append-item regions-menu (new-dm-func "Print on-exit" 'on-exit dm-print-region-pick-func)) + (debug-menu-append-item regions-menu (new-dm-bool "Display region inside" *display-region-inside* dm-boolean-toggle-pick-func)) + (debug-menu-append-item regions-menu (new-dm-bool "Show non-sphere bsphere" *debug-region-show-bsphere* dm-boolean-toggle-pick-func)) + (debug-menu-append-item regions-menu (new-dm-bool "Hide water regions" *debug-region-hide-water* dm-boolean-toggle-pick-func)) + (debug-menu-append-item regions-menu (new-dm-bool "Hide empty regions" *debug-region-hide-empty* dm-boolean-toggle-pick-func)) + (debug-menu-append-item regions-menu (new-dm-bool "Region Marks" *display-region-marks* dm-boolean-toggle-pick-func)) + (debug-menu-append-item regions-menu (new-dm-bool "region-mode" #f + (lambda (arg (msg debug-menu-msg)) + (if (= msg (debug-menu-msg press)) + (not! (-> *setting-control* user-default region-mode)) + ) + (-> *setting-control* user-default region-mode)))) + + (new-dm-submenu "Regions" regions-menu) + ) + ) + + +;; (define *made-vag-list* #f) +;; (defun build-vag-list ((menu debug-menu)) +;; "Fill the vag play menu" + +;; (if *made-vag-list* +;; (return #f)) +;; (true! *made-vag-list*) + +;; ;; clear old list +;; (debug-menu-remove-all-items menu) + +;; ;; make button for each vag, we use an index +;; (dotimes (i (-> *vag-list* allocated-length)) +;; (debug-menu-append-item menu (new-dm-func (-> *vag-list* i) i vag-player-play-from-index)) +;; ) + +;; ;; sort by vag name - note: already sorted from before +;; ;(set! (-> menu items) (sort (-> menu items) debug-menu-node *setting-control* user-default subtitle))) +;; (-> *setting-control* user-default subtitle)))) +;; ;; pick channel + +;; (new-dm-submenu "Vag" vag-menu) +;; ) +;; ) + +(defun dm-frame-rate-pick-func ((bfps int) (msg debug-menu-msg)) + (let ((fps (/ bfps 8))) + (when (= msg (debug-menu-msg press)) + (set-frame-rate! *pc-settings* fps #t)) + (= (-> *pc-settings* target-fps) fps))) + +(defun dm-msaa-pick-func ((bmsaa int) (msg debug-menu-msg)) + (let ((msaa (/ bmsaa 8))) + (when (= msg (debug-menu-msg press)) + (set! (-> *pc-settings* gfx-msaa) msaa)) + (= (-> *pc-settings* gfx-msaa) msaa))) + +(defun dm-territory-pick-func ((bterr int) (msg debug-menu-msg)) + (let ((terr (/ bterr 8))) + (when (= msg (debug-menu-msg press)) + (set! (-> *pc-settings* territory) terr)) + (= (-> *pc-settings* territory) terr))) + +(defun dm-size-pick-func ((size pair)) + (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*)) + (debug-menu-append-item (-> *debug-menu-context* root-menu) (debug-menu-make-entity-menu *debug-menu-context*)) + (debug-menu-append-item (-> *debug-menu-context* root-menu) (debug-menu-make-regions-menu *debug-menu-context*)) + ;; (debug-menu-append-item (-> *debug-menu-context* root-menu) (debug-menu-make-vag-menu *debug-menu-context*)) + + (debug-menu-append-item (-> *debug-menu-context* root-menu) + (debug-menu-make-from-template *debug-menu-context* + '(menu "PC Settings" + (flag "Debug" #f ,(dm-lambda-boolean-flag (-> *pc-settings* debug?))) + (flag "Use native vis" #f ,(dm-lambda-boolean-flag (-> *pc-settings* use-vis?))) + (function "Toggle game aspect" #f ,(lambda () + (cond + ((= (-> *setting-control* user-default aspect-ratio) 'aspect4x3) + (set! (-> *setting-control* user-default aspect-ratio) 'aspect16x9) + ) + (else + (set! (-> *setting-control* user-default aspect-ratio) 'aspect4x3) + ) + ) + (set-aspect-ratio (-> *setting-control* user-default aspect-ratio)) + )) + (flag "Auto aspect" #f ,(dm-lambda-boolean-flag (-> *pc-settings* aspect-ratio-auto?))) + (menu "Aspect test" + (function "4 x 3" #f ,(lambda () (set-aspect! *pc-settings* 4 3))) + (function "16 x 9" #f ,(lambda () (set-aspect! *pc-settings* 16 9))) + (function "64 x 27 (21:9)" #f ,(lambda () (set-aspect! *pc-settings* 64 27))) + (function "16 x 10" #f ,(lambda () (set-aspect! *pc-settings* 16 10))) + (function "2 x 1" #f ,(lambda () (set-aspect! *pc-settings* 2 1))) + (function "37 x 20" #f ,(lambda () (set-aspect! *pc-settings* 37 20))) + (function "21 x 9" #f ,(lambda () (set-aspect! *pc-settings* 21 9))) + (function "64 x 18" #f ,(lambda () (set-aspect! *pc-settings* 64 18))) + (int-var "Custom aspect X" #f ,(dm-lambda-int-var (-> *pc-settings* aspect-custom-x)) 20 1 #t 1 1000) + (int-var "Custom aspect Y" #f ,(dm-lambda-int-var (-> *pc-settings* aspect-custom-y)) 20 1 #t 1 1000) + (function "Custom" #f ,(lambda () (set-aspect! *pc-settings* (-> *pc-settings* aspect-custom-x) (-> *pc-settings* aspect-custom-y)))) + ) + (menu "Fullscreen" + (function "Windowed" #f ,(lambda () (set-display-mode! *pc-settings* 'windowed #t))) + (function "Fullscreen" #f ,(lambda () (set-display-mode! *pc-settings* 'fullscreen #t))) + (function "Borderless" #f ,(lambda () (set-display-mode! *pc-settings* 'borderless #t))) + ) + (menu "Sizes" + (function "640 x 480" (640 480) dm-size-pick-func) + (function "640 x 360" (640 360) dm-size-pick-func) + (function "720 x 540" (720 540) dm-size-pick-func) + (function "960 x 540" (960 540) dm-size-pick-func) + (function "800 x 600" (800 600) dm-size-pick-func) + (function "960 x 720" (960 720) dm-size-pick-func) + (function "1280 x 720" (1280 720) dm-size-pick-func) + (function "1024 x 768" (1024 768) dm-size-pick-func) + (function "1366 x 768" (1366 768) dm-size-pick-func) + (function "1280 x 960" (1280 960) dm-size-pick-func) + (function "1440 x 1080" (1440 1080) dm-size-pick-func) + (function "1920 x 1080" (1920 1080) dm-size-pick-func) + (function "1920 x 1440" (1920 1440) dm-size-pick-func) + (function "2560 x 1440" (2560 1440) dm-size-pick-func) + (function "2880 x 2160" (2880 2160) dm-size-pick-func) + (function "3840 x 2160" (3840 2160) dm-size-pick-func) + (function "512 x 416" (512 416) dm-size-pick-func) + (function "512 x 208" (512 208) dm-size-pick-func) + ) + (flag "Letterbox" #f ,(dm-lambda-boolean-flag (-> *pc-settings* letterbox?))) + (flag "Hinttitles" #f ,(dm-lambda-boolean-flag (-> *pc-settings* hinttitles?))) + (menu "Subtitle speaker" + (flag "Off" #f dm-subtitle-setting) + (flag "On" #t dm-subtitle-setting) + (flag "Auto" auto dm-subtitle-setting) + ) + (menu "Text language" + ;; TODO macro + (flag "english" (the binteger (pc-language english)) dm-text-language) + (flag "french" (the binteger (pc-language french)) dm-text-language) + (flag "german" (the binteger (pc-language german)) dm-text-language) + (flag "spanish" (the binteger (pc-language spanish)) dm-text-language) + (flag "italian" (the binteger (pc-language italian)) dm-text-language) + (flag "japanese" (the binteger (pc-language japanese)) dm-text-language) + (flag "korean" (the binteger (pc-language korean)) dm-text-language) + (flag "uk-english" (the binteger (pc-language uk-english)) dm-text-language) + ) + (flag "Discord RPC" #t ,(dm-lambda-boolean-flag (-> *pc-settings* discord-rpc?))) + (flag "Speedrunner Mode" #t ,(dm-lambda-boolean-flag (-> *pc-settings* speedrunner-mode?))) + ;; (flag "Speedrunner Mode" #t ,(dm-lambda-boolean-flag (-> *pc-settings* speedrunner-mode?))) + (menu "PS2 settings" + ;(flag "PS2 Load speed" #f ,(dm-lambda-boolean-flag (-> *pc-settings* ps2-read-speed?))) + (flag "PS2 Particles" #f ,(dm-lambda-boolean-flag (-> *pc-settings* ps2-parts?))) + (flag "PS2 Shadows" #f ,(dm-lambda-boolean-flag (-> *pc-settings* ps2-shadow?))) + ;(flag "PS2 Music" #f ,(dm-lambda-boolean-flag (-> *pc-settings* ps2-music?))) + ;(flag "PS2 Sound effects" #f ,(dm-lambda-boolean-flag (-> *pc-settings* ps2-se?))) + ;(flag "PS2 Hints" #f ,(dm-lambda-boolean-flag (-> *pc-settings* ps2-hints?))) + (flag "Highres Clouds" #f ,(dm-lambda-boolean-flag (-> *pc-settings* hires-clouds?))) + (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?))) + ) + (menu "Level of detail" + (flag "PS2 LOD " #f ,(dm-lambda-boolean-flag (-> *pc-settings* ps2-lod-dist?))) + (flag "Force Envmap" #f ,(dm-lambda-boolean-flag (-> *pc-settings* force-envmap?))) + (int-var "LOD Tfrag" 0 dm-lod-int 0 1 #t 0 2) + (int-var "LOD Tie" 1 dm-lod-int 0 1 #t 0 3) + ;(int-var "LOD Ocean" 2 dm-lod-int 0 1 #t 0 3) + (int-var "LOD Actor" 3 dm-lod-int 0 1 #t 0 3) + (function "Best quality" #f ,(lambda () (set! (-> *pc-settings* lod-force-tfrag) 0) + (set! (-> *pc-settings* lod-force-tie) 0) + ;(set! (-> *pc-settings* lod-force-ocean) 0) + (set! (-> *pc-settings* lod-force-actor) 0) + )) + (function "Worst quality" #f ,(lambda () (set! (-> *pc-settings* lod-force-tfrag) 2) + (set! (-> *pc-settings* lod-force-tie) 3) + ;(set! (-> *pc-settings* lod-force-ocean) 2) + (set! (-> *pc-settings* lod-force-actor) 3) + )) + ) + (menu "Framerate" + (flag "30" 30 dm-frame-rate-pick-func) + (flag "50" 50 dm-frame-rate-pick-func) + (flag "60" 60 dm-frame-rate-pick-func) + (flag "75" 75 dm-frame-rate-pick-func) + (flag "90" 90 dm-frame-rate-pick-func) + (flag "120" 120 dm-frame-rate-pick-func) + (flag "144" 144 dm-frame-rate-pick-func) + (flag "165" 165 dm-frame-rate-pick-func) + (flag "240" 240 dm-frame-rate-pick-func) + ;(flag "disclaimer" #f ,(dm-lambda-boolean-flag *frame-rate-disclaimer-seen?*)) + ) + (menu "MSAA" + (flag "Off" 1 dm-msaa-pick-func) + (flag "x2" 2 dm-msaa-pick-func) + (flag "x4" 4 dm-msaa-pick-func) + (flag "x8" 8 dm-msaa-pick-func) + (flag "x16" 16 dm-msaa-pick-func) + ) + (menu "LED" + (flag "hp" #f ,(dm-lambda-boolean-flag (-> *pc-settings* controller-led-hp?))) + (flag "status" #f ,(dm-lambda-boolean-flag (-> *pc-settings* controller-led-status?))) + ) + (menu "Territory" + (flag "Automatic" -1 dm-territory-pick-func) + (flag "GAME_TERRITORY_SCEA" (the binteger GAME_TERRITORY_SCEA) dm-territory-pick-func) + (flag "GAME_TERRITORY_SCEE" (the binteger GAME_TERRITORY_SCEE) dm-territory-pick-func) + (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) + (flag "Display git commit" *display-sha* dm-boolean-toggle-pick-func) + (flag "Music fadein" #f ,(dm-lambda-boolean-flag (-> *pc-settings* music-fadein?))) + (flag "Music fadeout" #f ,(dm-lambda-boolean-flag (-> *pc-settings* music-fadeout?))) + (flag "Track skill" *debug-track-skill* dm-boolean-toggle-pick-func) + (function "Reset" #f ,(lambda () (reset *pc-settings* #t))) + (function "Save" #f ,(lambda () (commit-to-file *pc-settings*))) + (function "Load" #f ,(lambda () (load-settings *pc-settings*))) + ) + ) + ) + + (debug-menu-append-item (-> *debug-menu-context* root-menu) + (debug-menu-make-from-template *debug-menu-context* + '(menu "Other" + (flag "DECI Count" *display-deci-count* dm-boolean-toggle-pick-func) + (flag "Actor graph" *display-actor-graph* dm-boolean-toggle-pick-func) + (flag "Update vis outside bsp" *update-leaf-when-outside-bsp* dm-boolean-toggle-pick-func) + ;; (flag "Pad display" *display-pad-debug* dm-boolean-toggle-pick-func) + (flag "Heap status" *display-heap-status* dm-boolean-toggle-pick-func) + (flag "Text boxes" *display-text-box* dm-boolean-toggle-pick-func) + (flag "Display actor bank" *display-actor-bank* dm-boolean-toggle-pick-func) + (float-var "Actor birth dist" #f ,(dm-lambda-meters-var (-> *ACTOR-bank* birth-dist)) 20 1 #t 0 10000 1) + (float-var "Actor pause dist" #f ,(dm-lambda-meters-var (-> *ACTOR-bank* pause-dist)) 20 1 #t 0 10000 1) + (flag "Display city info" *display-city-info* dm-boolean-toggle-pick-func) + (int-var "City info x" *city-info-x* dm-int-var-func 10 1 #t 0 255 1) + (int-var "City info y" *city-info-y* dm-int-var-func 10 1 #t 0 255 1) + (int-var "City info z" *city-info-z* dm-int-var-func 10 1 #t 0 255 1) + (flag "Joint names" *display-joint-names* dm-boolean-toggle-pick-func) + (flag "Bone lines" *display-bones* dm-boolean-toggle-pick-func) + (flag "Entity Lights" *display-lights* dm-boolean-toggle-pick-func) + (flag "Debug Font Auto-Scale" #f ,(dm-lambda-boolean-flag (-> *pc-settings* debug-font-scale-auto?))) + (float-var "Debug Font Scale" #f ,(dm-lambda-float-var (-> *pc-settings* debug-font-scale)) 2 (new 'static 'bfloat :data 0.01) #t (new 'static 'bfloat :data 0.1) 2 0) + ) + ) + ) + + (debug-menu-append-item (debug-menu-find-from-template *debug-menu-context* '("Collision")) (debug-menu-make-collision-renderer-menu *debug-menu-context*)) + + ;; (debug-menu-append-item (debug-menu-find-from-template *debug-menu-context* '("Artist")) (debug-menu-make-anim-tester-x-menu *debug-menu-context*)) + + ) + +;; (defun bg-custom ((level-name symbol)) +;; "Modified version of bg for the PC Port custom levels." +;; +;; ;; lookup info +;; (format 0 "(bg-custom ~A)%" level-name) +;; (let ((lev-info (lookup-level-info level-name))) +;; (when (= lev-info default-level) +;; (format 0 "Unable to (bg-custom ~A), the level was not found in *level-load-list*~%" level-name) +;; (return #f) +;; ) +;; +;; ;; kill jak (rip) +;; (format 0 "doing stop~%") +;; (stop 'play) +;; +;; ;; kill levels +;; (dotimes (i 2) +;; (unload! (-> *level* data i)) +;; ) +;; +;; ;; enable visiblity. the custom level won't use it, but we want it on so other levels can be loaded. +;; (set! (-> *level* vis?) #t) +;; +;; ;; disable border and play mode to prevent loading levels +;; (set! (-> *level* border?) #f) +;; (set! (-> *setting-control* default border-mode) #f) +;; (set! (-> *level* play?) #f) +;; +;; ;; disable actor vis +;; (set! *vis-actors* #f) +;; +;; (format 0 "doing level load~%") +;; ;; allocate level. This may start the loading process, but won't finish it. +;; (let ((lev (level-get-for-use *level* level-name 'active))) +;; (when (not lev) +;; (format 0 "Unable to load level, could not level-get-for-use~%") +;; (return #f) +;; ) +;; (format 0 "about to start load loop, game will freeze and hopefully come back soon~%") +;; +;; ;; spin in a loop and load it. This will cause the game to freeze during the load, +;; ;; but this is good enough for now. +;; (while (or (= (-> lev status) 'loading) +;; (= (-> lev status) 'loading-bt) +;; (= (-> lev status) 'login) +;; ) +;; (load-continue lev) +;; ) +;; +;; (when (not (-> lev info continues)) +;; (format 0 "level info has no continues, can't load it.~%") +;; ) +;; +;; (let ((cont (car (-> lev info continues)))) +;; (start 'play (the continue-point cont)) +;; ) +;; +;; (vis-load lev) +;; (set! (-> lev all-visible?) #f) +;; (set! (-> lev force-all-visible?) #t) +;; +;; ;; reset things +;; ;(initialize! *game-info* 'game (the-as game-save #f) (the-as string #f)) +;; ) +;; ) +;; ) diff --git a/goal_src/jak3/pc/debug/pc-debug-methods.gc b/goal_src/jak3/pc/debug/pc-debug-methods.gc new file mode 100644 index 0000000000..081333d513 --- /dev/null +++ b/goal_src/jak3/pc/debug/pc-debug-methods.gc @@ -0,0 +1,110 @@ +;;-*-Lisp-*- +(in-package goal) + +#| + Various debugging displays made for the pc port. This file includes overrides or game-specific implementations. + |# + +;; debug-only file! +(declare-file (debug)) + +;; updated macro for jak 3, draw-sprite2d-xy also has z now +(defmacro draw-memory-bar-generic (buf &key remain &key total &key name &key idx &key color) + "draw a memory usage bar" + `(let* ( + (total (the float ,total)) + (remain (the float ,remain)) + (bar-width (the int (/ (the float MEM_BAR_WIDTH) (-> *pc-settings* aspect-ratio-scale)))) + (bar-x (- MEM_BAR_RIGHT bar-width MEM_BAR_HORZ_PAD)) ;; x coord for left side of the bar list + (used-p (if (zero? total) 0.0 (/ (- total remain) total))) + (used-x (the int (* used-p bar-width))) + (used-y (+ MEM_BAR_Y (* ,idx MEM_BAR_HEIGHT))) + ) + (draw-sprite2d-xy ,buf bar-x used-y used-x MEM_BAR_HEIGHT ,color #x3fffff) + (draw-sprite2d-xy ,buf (+ bar-x used-x) used-y (- bar-width used-x) MEM_BAR_HEIGHT MEM_BAR_BG_COL #x3fffff) + (if (zero? total) (set! used-x (the int (* 0.5 bar-width)))) + (draw-string-xy ,name ,buf (- bar-x MEM_BAR_HORZ_PAD) used-y (font-color red) (font-flags shadow kerning right)) + (draw-string-xy (if (zero? total) "NO HEAP" (string-format "~,,2f%" (* used-p 100))) ,buf (+ bar-x used-x) used-y (font-color default) (font-flags shadow kerning middle)) + (draw-string-xy (string-format "~,,1fM" (/ total (* 1024 1024))) ,buf (+ bar-x bar-width MEM_BAR_HORZ_PAD) used-y (font-color red) (font-flags shadow kerning middle-vert)) + ) + ) + + + +(defmethod print-debug-misc pc-settings-jak3 ((obj pc-settings-jak3)) + "prints various miscellaneous debug text to the game console, according to what's enabled in this object." + + #f + ) + +(defconstant MEM_BAR_HEIGHT (the int (* 14.0 (get-debug-font-scale-factor)))) ;; total height of the bar +(defconstant MEM_BAR_BOTTOM 416) ;; x coord for the bottom side of the bar list +(defconstant MEM_BAR_NUM (+ LEVEL_MAX 5)) ;; amount of memory usage bars (override later if wanted) +(defmethod draw-memory pc-settings-jak3 ((obj pc-settings-jak3) (buf dma-buffer)) + "draw the memory heap status in the bottom right corner" + + (when *display-heap-status* + (let ((idx 0) + (level-heap-colors (new 'static 'array rgba 3 (static-rgba 32 255 255 64) + (static-rgba 255 32 255 64) + (static-rgba 255 255 32 64) + ))) + (draw-memory-bar-kheap buf global :idx idx :color (static-rgba 32 32 255 64)) + (draw-memory-bar-kheap buf debug :idx (1+! idx) :color (static-rgba 255 32 32 64)) + (dotimes (i LEVEL_MAX) + (draw-memory-bar-kheap buf (-> *level* level i heap) + :name (aif (-> *level* level i borrow-from-level) + (string-format "(~A)l~D<-l~D" (-> *level* level i name) i (-> it index)) + (string-format "(~A)l~D" (-> *level* level i name) i)) + :idx (1+! idx) :color (-> level-heap-colors (mod i 3))) + ) + (draw-memory-bar-dead-pool-heap buf *nk-dead-pool* :name "actor" :idx (1+! idx) :color (static-rgba 32 255 32 64)) + (draw-memory-bar-generic buf + :remain (* 16 (dma-buffer-free (-> *display* frames (-> *display* on-screen) global-buf))) + :total (length (-> *display* frames (-> *display* on-screen) global-buf)) + :name "dma-global" :idx (1+! idx) :color (static-rgba 32 32 255 64)) + (draw-memory-bar-generic buf + :remain (* 16 (dma-buffer-free (-> *display* frames (-> *display* on-screen) debug-buf))) + :total (length (-> *display* frames (-> *display* on-screen) debug-buf)) + :name "dma-debug" :idx (1+! idx) :color (static-rgba 255 32 32 64)) + ) + #t) + ) + + +(define *region-debug-inspect* (the drawable-region-prim #f)) +(define *display-region-inside* #f) +(define *merge-region-prims* #f) + +(define *display-city-info* #f) +(define *city-info-x* 0) +(define *city-info-y* 0) +(define *city-info-z* 0) + + +(define *debug-track-skill* #f) +(defun debug-track-skill () + "draws a line and prints the distance to every skill in every active level" + (let ((start-pos (target-pos 0))) + (dotimes (i (-> *level* length)) + (let ((lev (-> *level* level i))) + (when (= (-> lev status) 'active) + ;; actor entities + (let ((actors (-> lev bsp actors))) + (when (nonzero? actors) + (dotimes (ii (-> actors length)) + (let ((e (-> actors data ii actor))) + (when (and (= (-> e etype symbol) 'skill) (or (not (-> e extra)) (zero? (-> e extra)) (not (logtest? (-> e extra perm status) (entity-perm-status dead))))) + (add-debug-line #t (bucket-id debug-no-zbuf1) start-pos (-> e trans) (new 'static 'rgba :r #xff :a #x80) #f (the-as rgba -1)) + (format *stdcon* "~S at ~m ~m ~m (~m away)~%" (res-lump-struct e 'name string) (-> e trans x) (-> e trans y) (-> e trans z) (vector-vector-distance start-pos (-> e trans))) + ) + ) + ) + ) + ) + ) + ) + ) + ) + #f) + diff --git a/goal_src/jak3/pc/pckernel-impl.gc b/goal_src/jak3/pc/pckernel-impl.gc new file mode 100644 index 0000000000..ca1e0c8845 --- /dev/null +++ b/goal_src/jak3/pc/pckernel-impl.gc @@ -0,0 +1,275 @@ +;;-*-Lisp-*- +(in-package goal) + +#| + This file has the game-specific implementation of the pckernel (see pckernel-h.gc and pckernel.gc). + |# + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;; constants +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + + ;; version: 0.3.0.0 +(defconstant PC_KERNEL_VERSION (static-pckernel-version 0 3 0 0)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;; types and enums +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + +;; cheats +(defenum pc-cheats + :bitfield #t + :type uint64 + (turbo-board) + (health-bars) + (vehicle-health-bars) + (vehicle-invuln) + (statistics) + (suck-in-all) + (music-player) + (no-textures) + (fast-speed) + (slow-speed) + (fast-travel) + (orb-tracker) + (real-time-of-day) + (city-peace) + (board-tricks) + (weather-bad) + (weather-good) + ) + +;; pc enum for languages. this is the game's languages + custom ones. +(defenum pc-language + :type uint16 + (english 0) + (french 1) + (german 2) + (spanish 3) + (italian 4) + (commentary 5) + (japanese 6) + (korean 7) + (russian 8) + (portuguese 9) + (dutch 10) + (uk-english 11) + ;; custom + (finnish 12) + (swedish 13) + (danish 14) + (norwegian 15) + (br-portuguese 16) + (hungarian 17) + (catalan 18) + (icelandic 19) + (polish 20) + (lithuanian 21) + + (custom 999) ;; temp + ) + +;; The Jak 2 version of the pc-settings object. +(deftype pc-settings-jak3 (pc-settings) + (;; cheats + (cheats pc-cheats) + (cheats-revealed pc-cheats) + (cheats-purchased pc-cheats) + (cheats-unlocked pc-cheats) + (cheats-mask pc-cheats) + ;; music + (music-unlocked bit-array) + (flava-unlocked symbol 6) + + ;; misc + (fast-airlock? symbol) + (fast-elevator? symbol) + (fast-progress? symbol) + (minimap-force-north symbol) + + ;(stats statistics) + + ;; gfx + (smooth-minimap? symbol) + (hires-clouds? symbol) + + ;; other + (controller-led-status? symbol) + (speedrunner-mode-custom-bind uint32) + ) + + (:methods + (eligible-for-fast-elevator? (_type_ process) symbol) + (get-airlock-speed (_type_) float) + (get-airlock-close-speed (_type_) float) + ) + ) + +(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 +(deftype discord-info (structure) + ((orb-count float) + (gem-count float) + (death-count int32) + (status string) + (level string) + (cutscene? symbol) + (time-of-day float) + (percent-complete float) + (focus-status uint32) + (task string) ;; currenly active game-task used for mission specific images + ) + ) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;; resets +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + +(defmethod reset-misc ((obj pc-settings-jak3) (call-handlers symbol)) + "Set the default misc settings" + + ((method-of-type pc-settings reset-misc) obj call-handlers) + + (true! (-> obj fast-airlock?)) + (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) + 0) + +(defmethod reset-extra ((obj pc-settings-jak3) (call-handlers symbol)) + "Set the default goodies settings" + + ((method-of-type pc-settings reset-extra) obj call-handlers) + + (set! (-> obj cheats) (pc-cheats)) + (set! (-> obj cheats-revealed) (pc-cheats)) + (set! (-> obj cheats-purchased) (pc-cheats)) + (set! (-> obj cheats-unlocked) (pc-cheats)) + (set! (-> obj cheats-mask) (pc-cheats)) + + (clear-all! (-> obj music-unlocked)) + (dotimes (i 6) + (set! (-> obj flava-unlocked i) #f)) + + ;(set! (-> obj stats) *statistics*) + 0) + +(defmethod reset-input ((obj pc-settings-jak3) (device symbol) (call-handlers symbol)) + "Set the default input settings" + + ((method-of-type pc-settings reset-input) obj device call-handlers) + + (when (or (= device 'all) (= device 'controller)) + (set! (-> obj controller-led-status?) #t) + ) + 0) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;; other +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + + +(define *hires-sky* #t) +(define *debug-region-color-alt* #t) +(define *debug-region-show-bsphere* #f) +(define *debug-region-hide-water* #t) +(define *debug-region-hide-empty* #t) +(define *fallback-text-lookup?* #t) + + +(defun pc-settings-save () + (commit-to-file *pc-settings*) + ) + +(defun get-video-params () *video-params*) + + + +;; for debugging +(defenum pc-pat-skip-hack + :bitfield #t + (noentity 0) + (nocamera 1) + (noedge 2) + (nogrind 3) + (nojak 4) + (noboard 5) + (nopilot 6) + (nolineofsight 16) + (unknowncamera 17) + (probe 24) + (nomech 25) + (noproj 26) + (noendlessfall 27) + (noprobe 28) + ) + + + +;; cheat stuff + +(defenum pc-cheat-state-flag + :bitfield #t + :type uint8 + (turbo-board) ;; should turbo board be used + (clear-time-mod) + ) + +(deftype pc-cheat-state (structure) + ((progress-speed float) + (airlock-speed float) + (airlock-close-speed float) + (turbo-board-speed float) + (hijack-speech-chance float) + (flags pc-cheat-state-flag) + ) + ) + +(define *pc-cheat-state* (new 'static 'pc-cheat-state + :progress-speed 1.5 + :airlock-speed 1.75 + :airlock-close-speed 1.75 + :turbo-board-speed 1.5 + :hijack-speech-chance 0.45 + )) + +(defmacro cheat-state-flag? (&rest flags) + "are the specified flags enabled?" + `(logtest? (-> *pc-cheat-state* flags) (pc-cheat-state-flag ,@flags))) + +(defmacro set-cheat-state-flag! (&rest flags) + "set the specified flags" + `(logior! (-> *pc-cheat-state* flags) (pc-cheat-state-flag ,@flags))) +(defmacro clear-cheat-state-flag! (&rest flags) + "clear the specified flags" + `(logclear! (-> *pc-cheat-state* flags) (pc-cheat-state-flag ,@flags))) + + +(defmacro give-cheat! (&rest cheats) + `(begin + (logior! (-> *pc-settings* cheats) (pc-cheats ,@cheats)) + ) + ) + +(defmacro lock-cheat! (&rest cheats) + `(begin + (logclear! (-> *pc-settings* cheats) (pc-cheats ,@cheats)) + (logclear! (-> *pc-settings* cheats-purchased) (pc-cheats ,@cheats)) + (logclear! (-> *pc-settings* cheats-unlocked) (pc-cheats ,@cheats)) + (logclear! (-> *pc-settings* cheats-revealed) (pc-cheats ,@cheats)) + ) + ) + + diff --git a/goal_src/jak3/pc/pckernel.gc b/goal_src/jak3/pc/pckernel.gc new file mode 100644 index 0000000000..3ad7ca8873 --- /dev/null +++ b/goal_src/jak3/pc/pckernel.gc @@ -0,0 +1,781 @@ +;;-*-Lisp-*- +(in-package goal) + +#| + + This file runs the game-specific version of the pckernel. + See pckernel-common.gc for the bulk of the pckernel. + + |# + +(define-extern get-active-mission-description (function discord-info string)) + + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;; pc cheats list +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + + +(deftype pc-cheat-info (basic) + ((name text-id) + (unlock text-id) + (unlock-func symbol) ;; function symbol + (skill int) ;; skill points required. leave as 0 if you only want a custom unlock func + (flag pc-cheats) + (can-toggle symbol) ;; how it can be toggled + + ;; only show after this point in the story + (avail-after game-task-node) + (avail-after-hero game-task-node) + ) + ) + +;;;;; pc cheat unlock functions +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + +(defun pc-cheat-vehicle-health-bars-unlock () + "#t = cheat unlock requirements met. #f = locked" + #f) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;; pc cheat unlock functions end + +(defmacro static-pc-cheat-info (name flag can-toggle avail-after &key (skill 0) &key (unlock (null true-func))) + "helper for making a new static pc-cheat-info + unlock is a pair in format (unlock-text-id unlock-func) where unlock-func returns #t if the unlock requirement is met and #f otherwise + skill is the skill requirement. until the requirement is met (and avail-after is closed), it will show 'X required' in the menu + avail-after can be a single task-node or a pair of two, car is for normal game and cadr for hero mode" + `(new 'static 'pc-cheat-info :name (text-id ,name) + :unlock (text-id ,(car unlock)) + :unlock-func (quote ,(cadr unlock)) + :skill ,skill + :flag (pc-cheats ,flag) + :avail-after (game-task-node ,(if (pair? avail-after) (car avail-after) avail-after)) + :avail-after-hero (game-task-node ,(if (pair? avail-after) (cadr avail-after) avail-after)) + :can-toggle (quote ,can-toggle)) + ) + +(defmacro def-pc-cheat-list (name &rest items) + "helper for making a list of pc cheats. see static-pc-cheat-info for parameters" + `(define ,name (new 'static 'boxed-array :type pc-cheat-info ,@(apply (lambda (x) `(static-pc-cheat-info ,@x)) items))) + ) + +;; the list of cheats +(def-pc-cheat-list *pc-cheats-list* +;; name cheat flag can-toggle avail-after + ;(progress-cheats-music-player music-player #f fortress-escape-introduction) + ) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;; music player list +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + +(defenum music-player-flava + :bitfield #t :type uint8 + (default) + (gun) + (board) + (mech) + (darkjak) + (pilot) + ) + +(deftype music-player-track-info (basic) + ((text text-id) + (name symbol) + (mode int8) + (icon int16) + (flava music-player-flava) + (avail-after game-task-node) + ) + ) + +(defmacro static-music-track-info (name &key text &key avail-after &key (mode 0) &key icon &key (flava ())) + `(new 'static 'music-player-track-info :text (text-id ,text) :name ,name :icon ,icon :avail-after (game-task-node ,avail-after) :mode ,mode :flava (music-player-flava ,@flava)) + ) + +(define *music-player-tracks* (new 'static 'boxed-array :type music-player-track-info + )) + +;; automatically add the default flava to all tracks that had flavas marked +(dotimes (i (-> *music-player-tracks* length)) + (if (nonzero? (-> *music-player-tracks* i flava)) + (logior! (-> *music-player-tracks* i flava) (music-player-flava default))) + ) + + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;; fancy controller LED fader mechanics +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + +(deftype led-fader-state (structure) + ((enable? symbol) + (amount float) + (cur-color vector :inline) + (start-color vector :inline) + (end-color vector :inline) + ) + (:methods + (enable (_type_ vector) int) + (update (_type_ float float) vector) + (disable (_type_) int) + ) + ) + +(defmethod enable ((this led-fader-state) (start-from vector)) + "begin transition." + + (when (-> this enable?) + (disable this)) + + (vector-copy! (-> this start-color) start-from) + (set! (-> this amount) 0.0) + (true! (-> this enable?)) + 0) + +(defmethod disable ((this led-fader-state)) + "disable transition." + + (set! (-> this amount) 0.0) + (update this 0.0 0.1) + (false! (-> this enable?)) + 0) + +(defun vector3-lerp! ((dest vector) (a vector) (b vector) (alpha float)) + "Linearly interpolate between two vectors. Alpha isn't clamped. + w will be set to what's in vector a." + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (.lvf vf1 (&-> a quad)) + (.lvf vf2 (&-> b quad)) + (.mov vf4 alpha) + (.add.x.vf vf3 vf1 vf0 :mask #b1000) + (.sub.vf vf2 vf2 vf1) + (.mul.x.vf vf2 vf2 vf4) + (.add.vf vf3 vf1 vf2 :mask #b111) + (.svf (&-> dest quad) vf3) + dest + ) + ) + +(defun vector3-copy!! ((dest vector) (src vector)) + "copy just the xyz fields of src into dest" + (rlet ((vf0 :class vf) + (dest-vf :class vf) + (src-vf :class vf)) + (init-vf0-vector) + (.lvf dest-vf (&-> dest quad)) + (.lvf src-vf (&-> src quad)) + (.add.vf dest-vf vf0 src-vf :mask #b111) + (.svf (&-> dest quad) dest-vf) + dest + ) + ) + +(defmethod update ((this led-fader-state) (to float) (duration float)) + "disable transition." + + (when (-> this enable?) + (seek! (-> this amount) to (/ (-> *target* clock seconds-per-frame) duration)) + (vector4-lerp! (-> this cur-color) (-> this start-color) (-> this end-color) (-> this amount)) + (if (and (= to 0.0) (= 0.0 (-> this amount))) + (false! (-> this enable?))) + ) + (-> this cur-color)) + + +;; global vars +(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-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)) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;; methods +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + +(defmethod initialize ((obj pc-settings-jak3)) + "initial initialize method to be run after allocating" + + (set! (-> obj music-unlocked) (new 'global 'bit-array (-> *music-player-tracks* length))) + ((method-of-type pc-settings initialize) obj) + obj) + +(defmethod set-game-setting! ((obj pc-settings-jak3) (setting symbol) (value symbol)) + (case setting + (('video-mode) + (set! (-> *setting-control* user-current video-mode) #f) + (set! (-> *setting-control* user-default video-mode) value) + ) + (('aspect-ratio) + (set! (-> *setting-control* user-default aspect-ratio) value) + ) + (else + (format #t "unknown setting ~A (~A) to set-game-setting!" setting value)) + ) + ) + +(defmethod get-game-setting ((obj pc-settings-jak3) (setting symbol)) + (case setting + (('video-mode) + (-> *setting-control* user-default video-mode) + ) + (('aspect-ratio) + (-> *setting-control* user-default aspect-ratio) + ) + (else + (format #t "unknown setting ~A to get-game-setting" setting) + #f) + ) + ) + +(defmethod set-game-language! ((obj pc-settings-jak3) (lang language-enum)) + (set! (-> *setting-control* user-default language) lang) + ) + +(defmethod get-game-language ((obj pc-settings-jak3)) + (get-current-language) + ) + + +(defmethod update ((obj pc-settings-jak3)) + "Set the default misc settings" + + ((method-of-type pc-settings update) obj) + + (set! *hires-sky* (-> obj hires-clouds?)) + + (when (not (led-enabled? obj)) + (disable *led-fader-state*) + ) + + (none)) + + +(defun real-movie? () + "are we in an actual cutscene and should letterbox the view?" + (and (!= #f *scene-player*) (nonzero? movie?) (movie?))) + +(defmethod update-discord-rpc ((obj pc-settings-jak3)) + "update discord rpc module" + (when #f + (let ((info (new 'stack 'discord-info))) + (set! (-> info orb-count) (-> *game-info* skill-total)) + (set! (-> info gem-count) (-> *game-info* gem-total)) + (set! (-> info death-count) (-> *game-info* total-deaths)) + (set! (-> info task) "unknown") + (set! (-> info status) (get-active-mission-description info)) + ;; grab the name of the level we're in + (cond + ;; ((or (aif (level-get *level* 'title) (= (-> it status) 'active)) + ;; (and *progress-process* + ;; (= 'title (-> *progress-process* 0 state-stack 0)))) + ;; ;; in title screen. + ;; (set! (-> info level) (symbol->string 'title)) + ;; (set! (-> info status) "In title screen")) + (else + (set! (-> info level) (aif (-> *load-state* vis-nick) (symbol->string it) "unknown"))) + ) + (set! (-> info cutscene?) (real-movie?)) + (set! (-> info time-of-day) (-> *time-of-day-context* time)) + (set! (-> info percent-complete) (calculate-percentage *game-info*)) + (set! (-> info focus-status) (if *target* (-> *target* focus-status) 0)) + ;; TODO - update to new with-profiler syntax + (pc-discord-rpc-update info) + )) + (none)) + +(defmethod update-speedrun ((obj pc-settings-jak3)) + "update speedrun module" + ;; TODO - update to new with-profiler syntax + ;; (with-profiler "speedrun-update" + ;(update! *speedrun-info*) + ;;) + (none)) + +(defmethod update-video-hacks ((obj pc-settings-jak3)) + "update the graphics hacks used for the progress menu. ugh." + + (set! (-> (get-video-params) relative-x-scale) (-> obj aspect-ratio-reciprocal)) + (set! (-> (get-video-params) relative-x-scale-reciprical) (-> obj aspect-ratio-scale)) + ) + + +(defmethod eligible-for-fast-elevator? ((obj pc-settings-jak3) (proc process)) + "is this a valid process for a fast elevator?" + (and (-> obj fast-elevator?) (not (or (string= (-> proc name) "drill-lift-1") + (string= (-> proc name) "drill-lift-2")))) + ) + +(defmethod get-airlock-speed ((obj pc-settings-jak3)) + "return the current speed modifier for airlocks" + (if (-> obj fast-airlock?) + (-> *pc-cheat-state* airlock-speed) + 1.0)) + +(defmethod get-airlock-close-speed ((obj pc-settings-jak3)) + "return the current closing speed modifier for airlocks" + (if (-> obj fast-airlock?) + (-> *pc-cheat-state* airlock-close-speed) + 1.0)) + + +(defmethod led-enabled? ((obj pc-settings-jak3)) + "should the controller led be set?" + (or (-> obj controller-led-hp?) + (-> obj controller-led-status?) + )) + +(defmethod update-led ((obj pc-settings-jak3)) + "set the controller led color by modifying the controller-led-color vector" + + ;; default color is just blue. + (set-vector-xyz! (-> obj controller-led-color) 0.0 0.0 1.0) + + (when *target* + (let ((disable-fader? #t)) + (when (-> obj controller-led-hp?) + ;; flicker led according to hp. lower hp = faster and more intense flicker + (cond + ((= (-> *target* fact health) 0.0) + ;; dead. just set to minimum brightness. + (set! (-> obj controller-led-color a) (-> obj controller-led-min-brightness)) + ) + (else + (let ((flicker-speed (lerp-scale 2.0 0.0 + (-> *target* fact health) + 1.0 (-> *FACT-bank* health-max-default))) + (flicker-amp (lerp-scale (- 1.0 (-> obj controller-led-min-brightness)) (- 1.0 (-> obj controller-led-max-brightness)) + (-> *target* fact health) + 1.0 (-> *FACT-bank* health-max-default))) + ) + (set! (-> obj controller-led-color a) (- 1.0 (* flicker-amp (/ (+ 1.0 (sin (* flicker-speed (degrees (current-time))))) 2.0)))) + ) + ) + ) + ) + + (when (-> obj controller-led-status?) + (set-vector-xyz! (-> obj controller-led-color) 1.0 1.0 1.0) + (cond + ;; gun + ((and (nonzero? (-> *target* gun)) (focus-test? *target* gun)) + (case (-> *target* gun gun-type) + (((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 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 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 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)) + ) + ) + + ;; darkjak + ((and (nonzero? (-> *target* darkjak)) (focus-test? *target* dark)) + (vector-copy! (-> *led-fader-state* end-color) *led-darkjak-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-darkjak-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)) + ) + + ;; 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) + ) + + ;; mech + ((focus-test? *target* mech) + (set-vector-xyz! (-> obj controller-led-color) 1.0 1.0 0.0) + ) + + ;; board + ((focus-test? *target* board) + (set-vector-xyz! (-> obj controller-led-color) 0.0 1.0 1.0) + ) + ) + + ;; wanted flash + (awhen (the hud-map (process-by-name "hud-map" *active-pool*)) + (when (not (hidden? it)) + (let ((flash-amount (/ (+ (sin (degrees (-> it values 1 current))) 1.0) 2))) + (vector3-lerp! (-> obj controller-led-color) (-> obj controller-led-color) *led-wanted-flash-color* flash-amount) + )) + ) + ) + (when disable-fader? + (disable *led-fader-state*)) + )) + #t) + +(defmacro flava-unlocked? (flava) + "return #t if the specified flava is unlocked" + `(-> *pc-settings* flava-unlocked ,flava)) + + +(defun inside-city? () + "are we inside haven city?" + (symbol-member? (-> *game-info* current-continue vis-nick) ;; TODO get actual level we're in? + '(ctysluma ctyslumb ctyslumc + ctygena ctygenb ctygenc + ctymarka ctymarkb + ctyfarma ctyfarmb + ctyinda ctyindb + ctypal ctyport stadium))) + + +(defmethod update-cheats ((obj pc-settings-jak3)) + "run cheats." + + ;; run cheats here. + ;;;;;;;;;;;;;;;;;;; + + (when (pc-cheats? (-> obj cheats) real-time-of-day) + (let ((date (new 'stack-no-clear 'scf-time))) + (scf-get-time date) + (when (zero? (-> date stat)) + (let* ((cur-time (-> *display* bg-clock frame-counter)) + (day-len (seconds 1440)) ;; a full in-game day + (want-hour (bcd->dec (-> date hour))) + (want-minute (bcd->dec (-> date minute))) + (target-hour-frame (/ (the int (* (fsec 3600) want-hour)) 60)) + (target-minute-frame (/ (the int (* (fsec 60) want-minute)) 60)) + ) + (set! (-> *display* bg-clock frame-counter) (+ (- cur-time (mod cur-time day-len)) day-len (+ target-hour-frame target-minute-frame))) + )) + )) + + ;; turbo jet board cheat + (cond + ((and (pc-cheats? (-> obj cheats) turbo-board) + *target* + (focus-test? *target* board) + (inside-city?)) + (set-setting! 'string-spline-max-move 'abs (* (-> *pc-cheat-state* turbo-board-speed) (meters 2)) 0) + (set-setting! 'string-spline-accel 'abs (* (-> *pc-cheat-state* turbo-board-speed) (meters 0.045)) 0) + (set-setting! 'string-spline-max-move-player 'abs (* (-> *pc-cheat-state* turbo-board-speed) (meters 1.5)) 0) + (set-setting! 'string-spline-accel-player 'abs (* (-> *pc-cheat-state* turbo-board-speed) (meters 0.035)) 0) + (set-cheat-state-flag! turbo-board) + ) + (else + (remove-setting! 'string-spline-max-move) + (remove-setting! 'string-spline-accel) + (remove-setting! 'string-spline-max-move-player) + (remove-setting! 'string-spline-accel-player) + (clear-cheat-state-flag! turbo-board) + ) + ) + + (pc-set-gfx-hack (pc-gfx-hack no-tex) (pc-cheats? (-> obj cheats) no-textures)) + + ;; run cheats end!!! + ;;;;;;;;;;;;;;;;;;;; + + ;; check unlocked cheats + ;;;;;;;;;;;;;;;;;;;;;;;; + (let ((old (-> *pc-settings* cheats)) + (old-unlocked (-> *pc-settings* cheats-unlocked)) + (old-purchased (-> *pc-settings* cheats-purchased)) + (old-revealed (-> *pc-settings* cheats-revealed))) + + (dotimes (i (-> *pc-cheats-list* length)) + + ;; reveals cheats if they have been purchased, purchases cheats if they have been unlocked, unlocks cheats if they have been enabled. + ;; the cheat process requires the steps to be filled in this order, see sequential checking below + (logior! (-> *pc-settings* cheats-revealed) (logior! (-> *pc-settings* cheats-purchased) (logior! (-> *pc-settings* cheats-unlocked) (-> *pc-settings* cheats)))) + + (let* ((cheat (-> *pc-cheats-list* i)) + (cost (-> cheat skill)) + (unlock-func (the (function symbol) (-> cheat unlock-func value)))) + + (when (if (logtest? (-> *game-info* secrets) (game-secrets hero-mode)) + (task-node-closed? (-> cheat avail-after-hero)) + (task-node-closed? (-> cheat avail-after))) + (logior! (-> obj cheats-revealed) (-> cheat flag)) + + (when (>= (-> *game-info* skill-total) cost) + (logior! (-> obj cheats-purchased) (-> cheat flag)) + + (when (or (zero? unlock-func) + (not unlock-func) + (unlock-func)) + (logior! (-> obj cheats-unlocked) (-> cheat flag))))) + + (case (-> cheat can-toggle) + ((#f) + (when (logtest? (-> obj cheats-unlocked) (-> cheat flag)) + (logior! (-> obj cheats) (-> cheat flag))) + ) + ))) + + ;; when speedrunning...the cheats are manually modified to facilitate the chosen category + ;; don't persist these and don't spam the pc-settings saving routine every frame. + (when (and (not (-> *pc-settings* speedrunner-mode?)) + (or (!= old (-> *pc-settings* cheats)) + (!= old-unlocked (-> *pc-settings* cheats-unlocked)) + (!= old-purchased (-> *pc-settings* cheats-purchased)) + (!= old-revealed (-> *pc-settings* cheats-revealed)))) + ;; save pc-settings if we made new progress + (pc-settings-save))) + + 0) + + +(defmethod update-music-log ((obj pc-settings-jak3)) + "update the music log" + + (dotimes (i (-> *music-player-tracks* length)) + (when (or (logtest? (-> *game-info* secrets) (game-secrets hero-mode)) + (task-node-closed? (-> *music-player-tracks* i avail-after))) + (set-bit (-> obj music-unlocked) i) + ) + ) + + (true! (-> obj flava-unlocked 0)) ;; default always unlocked + + 0) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;; file I/O +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + +(defun bit-array<-int64 ((arr bit-array) (start-offset int) (val int)) + "starting from start-offset at arr, fill the next 64 bits of the array from an int64" + (let ((i start-offset) + (end-offset (min (+ start-offset 64) (-> arr length)))) + (while (< i end-offset) + (if (nonzero? (logand val (ash 1 (- i start-offset)))) + (set-bit arr i)) + (1+! i) + ) + val) + ) + +(defun int64<-bit-array ((arr bit-array) (start-offset int)) + "starting from start-offset at arr, pack the next 64 bits into a single value and return it" + (let ((val 0) + (i start-offset) + (end-offset (min (+ start-offset 64) (-> arr length)))) + (while (< i end-offset) + (if (get-bit arr i) + (logior! val (ash 1 (- i start-offset)))) + (1+! i) + ) + val) + ) + +(defmethod handle-input-settings ((obj pc-settings-jak3) (file file-stream)) + "handle the text parsing input for the 'settings' group" + + ((method-of-type pc-settings handle-input-settings) obj file) + (case-str *pc-temp-string* + (("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))) + (("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))) + (("cheats") (set! (-> obj cheats) (the-as pc-cheats (file-stream-read-int file)))) + (("cheats-revealed") (set! (-> obj cheats-revealed) (the-as pc-cheats (file-stream-read-int file)))) + (("cheats-purchased") (set! (-> obj cheats-purchased) (the-as pc-cheats (file-stream-read-int file)))) + (("cheats-unlocked") (set! (-> obj cheats-unlocked) (the-as pc-cheats (file-stream-read-int file)))) + (("cheats-backup") (file-stream-read-int file)) ;; TODO - Don't remove this, parsing code can't handle unexpected keys + (("music-unlocked") + (dotimes (i (/ (align64 (-> obj music-unlocked length)) 64)) + (bit-array<-int64 (-> obj music-unlocked) (* i 64) (file-stream-read-int file)) + ) + ) + (("flava-unlocked") + (dotimes (i 6) + (set! (-> obj flava-unlocked i) (file-stream-read-symbol file)) + ) + ) + ;; (("stats") + ;; (dosettings (file) + ;; (case-str *pc-temp-string* + ;; (("kill-stats") + ;; (initialize (-> obj stats kill-stats)) + ;; (dosettings (file) + ;; (let ((enemy-stats (alloc-slot (-> obj stats kill-stats) (string->symbol *pc-temp-string*)))) + ;; (dosettings (file) + ;; (let ((source (string->kill-source *pc-temp-string*)) + ;; (amount (file-stream-read-int file))) + ;; (when (!= source (kill-stats-source unknown)) + ;; (set! (-> enemy-stats sources source) amount) + ;; ) + ;; ) + ;; ) + ;; ) + ;; ) + ;; ) + ;; ) + ;; ) + ;; ) + ) + 0) + +(defmethod handle-output-settings ((obj pc-settings-jak3) (file file-stream)) + "handle the text writing output for the 'settings' group" + + ((method-of-type pc-settings handle-output-settings) obj file) + (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 " (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)) + (format file " (cheats #x~x)~%" (-> obj cheats)) + (format file " (cheats-revealed #x~x)~%" (-> obj cheats-revealed)) + (format file " (cheats-purchased #x~x)~%" (-> obj cheats-purchased)) + (format file " (cheats-unlocked #x~x)~%" (-> obj cheats-unlocked)) + + (format file " (music-unlocked") + (dotimes (i (/ (align64 (-> obj music-unlocked length)) 64)) + (format file " #x~x" (int64<-bit-array (-> obj music-unlocked) (* i 64))) + ) + (format file ")~%") + + ;; (format file " (stats~%") + ;; (format file " (kill-stats~%") + ;; (dotimes (i KILL_STATS_MAX_ENEMY_TYPES) + ;; (when (-> obj stats kill-stats enemies i name) + ;; (format file " (~A~%" (-> obj stats kill-stats enemies i name)) + ;; (dotimes (ii KILL_STATS_MAX_SOURCE) + ;; (when (nonzero? (-> obj stats kill-stats enemies i sources ii)) + ;; (format file " (~A ~D)~%" (string->symbol (kill-source->string (the kill-stats-source ii))) (-> obj stats kill-stats enemies i sources ii)) + ;; )) + ;; (format file " )~%") + ;; )) + ;; (format file " )~%") + ;; (format file " )~%") + 0) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;; PC settings +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + +(define-once *pc-settings* (new 'global 'pc-settings-jak3)) + + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;; other +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + + +(defun draw-build-revision () + (with-dma-buffer-add-bucket ((buf (-> (current-frame) global-buf)) + (bucket-id debug-no-zbuf2)) + ;; reset bucket settings prior to drawing - font won't do this for us, and + ;; draw-raw-image can sometimes mess them up. + (dma-buffer-add-gs-set-flusha buf + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))) + (clear *pc-encoded-temp-string*) + (clear *temp-string*) + (format *temp-string* "~S" *pc-settings-built-sha*) + (pc-encode-utf8-string *temp-string* *pc-encoded-temp-string*) + (let ((font-ctx (new 'stack 'font-context *font-default-matrix* 2 406 0.0 (font-color default) (font-flags shadow kerning large)))) + (set! (-> font-ctx scale) 0.25) + (draw-string-adv *pc-encoded-temp-string* buf font-ctx)))) + + + +(defun print-level-types ((lev level)) + "print the level-type linked list for a level" + (format #t "print-level-types for ~A~%" (-> lev nickname)) + (let ((cur-type (-> lev level-type))) + (while (and cur-type (nonzero? cur-type) (= type (-> cur-type type))) + (format #t "~A~%" cur-type) + (set! cur-type (the type (-> cur-type method-table 8)))) + (format #t "~%")) + ) + + +(defun-debug pc-cheat->string ((cheat pc-cheats)) + (doenum (name val pc-cheats) + (if (= cheat val) + (return name)) + ) + "*unknown*") + +(defun-debug print-cheat-status (out) + (dotimes (i (-> *pc-cheats-list* length)) + (let ((flag (-> *pc-cheats-list* i flag))) + (cond + ((logtest? (-> *pc-settings* cheats) flag) (format out " ~20S(#x~6x): enabled~%" (pc-cheat->string flag) flag)) + ((logtest? (-> *pc-settings* cheats-unlocked) flag) (format out " ~20S(#x~6x): unlocked~%" (pc-cheat->string flag) flag)) + ((logtest? (-> *pc-settings* cheats-purchased) flag) (format out " ~20S(#x~6x): purchased~%" (pc-cheat->string flag) flag)) + ((logtest? (-> *pc-settings* cheats-revealed) flag) (format out " ~20S(#x~6x): revealed~%" (pc-cheat->string flag) flag)) + (else (format out " ~20S(#x~6x): locked~%" (pc-cheat->string flag) flag)) + ) + )) + out) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;; process pools +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + +;; the actor pool for PC processes! it has space for 4 processes, with 16K of space. +(define *pc-dead-pool* (new 'global 'dead-pool 4 (* 16 1024) "*pc-dead-pool*")) + + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;; progress adjustments +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defconstant CENTER_X (/ 512 2)) + +(defun adjust-game-x-centered ((origin int) (x float)) + "given an x position ranging from [0, 512) adjust for aspect ratio towards the origin point specified + such that it does not get stretched away with the framebuffer" + (+ origin (* (- x origin) (-> *pc-settings* aspect-ratio-reciprocal)))) + +(defmacro adjust-game-x (x) + `(adjust-game-x-centered CENTER_X ,x)) + +(defmacro adjust-game-x-int (x-float) + `(the int (adjust-game-x-centered CENTER_X (the float ,x-float)))) diff --git a/goalc/CMakeLists.txt b/goalc/CMakeLists.txt index f2ae00b095..c9b58bb817 100644 --- a/goalc/CMakeLists.txt +++ b/goalc/CMakeLists.txt @@ -32,6 +32,7 @@ add_library(compiler compiler/CompilerSettings.cpp compiler/CodeGenerator.cpp compiler/StaticObject.cpp + compiler/symbol_info.cpp compiler/compilation/Asm.cpp compiler/compilation/Atoms.cpp compiler/compilation/CompilerControl.cpp diff --git a/goalc/build_level/jak1/build_level.cpp b/goalc/build_level/jak1/build_level.cpp index 4a6b4d534c..15df0e3d70 100644 --- a/goalc/build_level/jak1/build_level.cpp +++ b/goalc/build_level/jak1/build_level.cpp @@ -145,7 +145,7 @@ bool run_build_level(const std::string& input_file, objs.push_back(iso_folder / obj_name); } - decompiler::ObjectFileDB db(dgos, fs::path(config.obj_file_name_map_file), objs, {}, {}, + decompiler::ObjectFileDB db(dgos, fs::path(config.obj_file_name_map_file), objs, {}, {}, {}, config); // need to process link data for tpages @@ -154,7 +154,7 @@ bool run_build_level(const std::string& input_file, decompiler::TextureDB tex_db; auto textures_out = file_util::get_jak_project_dir() / "decompiler_out/jak1/textures"; file_util::create_dir_if_needed(textures_out); - db.process_tpages(tex_db, textures_out, config); + db.process_tpages(tex_db, textures_out, config, ""); std::vector processed_art_groups; diff --git a/goalc/build_level/jak2/build_level.cpp b/goalc/build_level/jak2/build_level.cpp index 2e418e8bb7..97a9e4c691 100644 --- a/goalc/build_level/jak2/build_level.cpp +++ b/goalc/build_level/jak2/build_level.cpp @@ -132,7 +132,7 @@ bool run_build_level(const std::string& input_file, objs.push_back(iso_folder / obj_name); } - decompiler::ObjectFileDB db(dgos, fs::path(config.obj_file_name_map_file), objs, {}, {}, + decompiler::ObjectFileDB db(dgos, fs::path(config.obj_file_name_map_file), objs, {}, {}, {}, config); // need to process link data for tpages @@ -141,7 +141,7 @@ bool run_build_level(const std::string& input_file, decompiler::TextureDB tex_db; auto textures_out = file_util::get_jak_project_dir() / "decompiler_out/jak2/textures"; file_util::create_dir_if_needed(textures_out); - db.process_tpages(tex_db, textures_out, config); + db.process_tpages(tex_db, textures_out, config, ""); // find all art groups used by the custom level in other dgos if (level_json.contains("art_groups") && !level_json.at("art_groups").empty()) { diff --git a/goalc/compiler/Compiler.cpp b/goalc/compiler/Compiler.cpp index 2290da945c..2dccd8297d 100644 --- a/goalc/compiler/Compiler.cpp +++ b/goalc/compiler/Compiler.cpp @@ -25,8 +25,9 @@ Compiler::Compiler(GameVersion version, : m_version(version), m_goos(user_profile), m_debugger(&m_listener, &m_goos.reader, version), + m_make(repl_config, user_profile), m_repl(std::move(repl)), - m_make(repl_config, user_profile) { + m_symbol_info(&m_goos.reader.db) { m_listener.add_debugger(&m_debugger); m_listener.set_default_port(version); m_ts.add_builtin_types(m_version); @@ -57,9 +58,7 @@ Compiler::Compiler(GameVersion version, // add built-in forms to symbol info for (const auto& [builtin_name, builtin_info] : g_goal_forms) { - SymbolInfo::Metadata sym_meta; - sym_meta.docstring = builtin_info.first; - m_symbol_info.add_builtin(builtin_name, sym_meta); + m_symbol_info.add_builtin(builtin_name, builtin_info.first); } // load auto-complete history, only if we are running in the interactive mode. @@ -196,6 +195,8 @@ Val* Compiler::compile_error_guard(const goos::Object& code, Env* env) { bool term; auto loc_info = m_goos.reader.db.get_info_for(code, &term); if (term) { + lg::print(fg(fmt::color::yellow) | fmt::emphasis::bold, "Function:\n"); + lg::print("{}\n", env->function_env()->name()); lg::print(fg(fmt::color::yellow) | fmt::emphasis::bold, "Location:\n"); lg::print("{}", loc_info); } @@ -223,6 +224,8 @@ Val* Compiler::compile_error_guard(const goos::Object& code, Env* env) { bool term; auto loc_info = m_goos.reader.db.get_info_for(code, &term); if (term) { + lg::print(fg(fmt::color::yellow) | fmt::emphasis::bold, "Function:\n"); + lg::print("{}\n", env->function_env()->name()); lg::print(fg(fmt::color::yellow) | fmt::emphasis::bold, "Location:\n"); lg::print("{}", loc_info); } @@ -459,6 +462,10 @@ void Compiler::asm_file(const CompilationOptions& options) { file_path = candidate_paths.at(0).string(); } + // Evict any symbols we have indexed for this file, this is what + // helps to ensure we have an up to date and accurate symbol index + m_symbol_info.evict_symbols_using_file_index(file_path); + auto code = m_goos.reader.read_from_file({file_path}); std::string obj_file_name = file_path; @@ -485,7 +492,7 @@ void Compiler::asm_file(const CompilationOptions& options) { if (options.disassemble) { codegen_and_disassemble_object_file(obj_file, &data, &disasm, options.disasm_code_only); if (options.disassembly_output_file.empty()) { - printf("%s\n", disasm.c_str()); + lg::print("{}\n", disasm); } else { file_util::write_text_file(options.disassembly_output_file, disasm); } @@ -498,7 +505,7 @@ void Compiler::asm_file(const CompilationOptions& options) { if (m_listener.is_connected()) { m_listener.send_code(data, obj_file_name); } else { - printf("WARNING - couldn't load because listener isn't connected\n"); // todo log warn + lg::print("WARNING - couldn't load because listener isn't connected\n"); // todo log warn } } @@ -511,15 +518,15 @@ void Compiler::asm_file(const CompilationOptions& options) { } } else { if (options.load) { - printf("WARNING - couldn't load because coloring is not enabled\n"); + lg::print("WARNING - couldn't load because coloring is not enabled\n"); } if (options.write) { - printf("WARNING - couldn't write because coloring is not enabled\n"); + lg::print("WARNING - couldn't write because coloring is not enabled\n"); } if (options.disassemble) { - printf("WARNING - couldn't disassemble because coloring is not enabled\n"); + lg::print("WARNING - couldn't disassemble because coloring is not enabled\n"); } } } diff --git a/goalc/compiler/Compiler.h b/goalc/compiler/Compiler.h index fc70268fb5..507455e353 100644 --- a/goalc/compiler/Compiler.h +++ b/goalc/compiler/Compiler.h @@ -12,7 +12,8 @@ #include "goalc/compiler/CompilerSettings.h" #include "goalc/compiler/Env.h" #include "goalc/compiler/IR.h" -#include "goalc/compiler/SymbolInfo.h" +#include "goalc/compiler/docs/DocTypes.h" +#include "goalc/compiler/symbol_info.h" #include "goalc/data_compiler/game_text_common.h" #include "goalc/debugger/Debugger.h" #include "goalc/emitter/Register.h" @@ -96,9 +97,20 @@ class Compiler { std::vector> const& user_data); bool knows_object_file(const std::string& name); MakeSystem& make_system() { return m_make; } - std::set lookup_symbol_infos_starting_with(const std::string& prefix) const; - std::vector* lookup_exact_name_info(const std::string& name) const; + std::vector lookup_symbol_info_by_file( + const std::string& file_path) const; + std::vector lookup_symbol_info_by_prefix( + const std::string& prefix) const; + std::set lookup_symbol_names_starting_with(const std::string& prefix, + int max_count = -1) const; + std::vector lookup_exact_name_info(const std::string& name) const; std::optional lookup_typespec(const std::string& symbol_name); + TypeSystem& type_system() { return m_ts; }; + // TODO - rename these types / namespaces -- consolidate with SymbolInfo and whatever else tries + // to also do this work + std::tuple, + std::unordered_map> + generate_per_file_symbol_info(); private: GameVersion m_version; @@ -110,19 +122,19 @@ class Compiler { listener::Listener m_listener; goos::Interpreter m_goos; Debugger m_debugger; + // TODO - this should be able to be removed, these are stored in `m_symbol_info` std::unordered_map m_macro_specs; - std::unordered_map - m_symbol_types; - std::unordered_map - m_global_constants; + // TODO - this should be able to be removed, these are stored in `m_symbol_info` + goos::InternedPtrMap m_symbol_types; + goos::InternedPtrMap m_global_constants; std::unordered_map m_inlineable_functions; CompilerSettings m_settings; bool m_throw_on_define_extern_redefinition = false; std::unordered_set m_allow_inconsistent_definition_symbols; - SymbolInfoMap m_symbol_info; - std::unique_ptr m_repl; MakeSystem m_make; + std::unique_ptr m_repl; + symbol_info::SymbolInfoMap m_symbol_info; struct DebugStats { int num_spills = 0; @@ -307,7 +319,7 @@ class Compiler { int offset, Env* env); - std::string make_symbol_info_description(const SymbolInfo& info); + std::string make_symbol_info_description(const symbol_info::SymbolInfo* info); MathMode get_math_mode(const TypeSpec& ts); bool is_number(const TypeSpec& ts); diff --git a/goalc/compiler/SymbolInfo.h b/goalc/compiler/SymbolInfo.h deleted file mode 100644 index f042b26317..0000000000 --- a/goalc/compiler/SymbolInfo.h +++ /dev/null @@ -1,249 +0,0 @@ -#pragma once - -#include -#include -#include - -#include "common/goos/Object.h" -#include "common/util/Assert.h" -#include "common/util/Trie.h" - -#include "goalc/compiler/Val.h" - -/*! - * Info about a single symbol, representing one of: - * - Global variable - * - Global function - * - Type - * - Constant - * - Macro - * - Builtin keyword of the OpenGOAL language - */ -class SymbolInfo { - public: - struct Metadata { - std::string docstring = ""; - }; - - // TODO - states - // TODO - enums - enum class Kind { - GLOBAL_VAR, - FWD_DECLARED_SYM, - FUNCTION, - TYPE, - CONSTANT, - MACRO, - LANGUAGE_BUILTIN, - METHOD, - INVALID - }; - - static SymbolInfo make_global(const std::string& name, - const goos::Object& defining_form, - const std::optional meta = {}) { - SymbolInfo info; - info.m_kind = Kind::GLOBAL_VAR; - info.m_name = name; - info.m_def_form = defining_form; - if (meta) { - info.m_meta = *meta; - } - return info; - } - - static SymbolInfo make_fwd_declared_sym(const std::string& name, - const goos::Object& defining_form) { - SymbolInfo info; - info.m_kind = Kind::FWD_DECLARED_SYM; - info.m_name = name; - info.m_def_form = defining_form; - return info; - } - - static SymbolInfo make_function(const std::string& name, - const std::vector args, - const goos::Object& defining_form, - const std::optional meta = {}) { - SymbolInfo info; - info.m_kind = Kind::FUNCTION; - info.m_name = name; - info.m_def_form = defining_form; - if (meta) { - info.m_meta = *meta; - } - info.m_args = args; - return info; - } - - static SymbolInfo make_type(const std::string& name, - const goos::Object& defining_form, - const std::optional meta = {}) { - SymbolInfo info; - info.m_kind = Kind::TYPE; - info.m_name = name; - info.m_def_form = defining_form; - if (meta) { - info.m_meta = *meta; - } - return info; - } - - static SymbolInfo make_constant(const std::string& name, - const goos::Object& defining_form, - const std::optional meta = {}) { - SymbolInfo info; - info.m_kind = Kind::CONSTANT; - info.m_name = name; - info.m_def_form = defining_form; - if (meta) { - info.m_meta = *meta; - } - return info; - } - - static SymbolInfo make_macro(const std::string& name, - const goos::Object& defining_form, - const std::optional meta = {}) { - SymbolInfo info; - info.m_kind = Kind::MACRO; - info.m_name = name; - info.m_def_form = defining_form; - if (meta) { - info.m_meta = *meta; - } - return info; - } - - static SymbolInfo make_builtin(const std::string& name, const std::optional meta = {}) { - SymbolInfo info; - info.m_kind = Kind::LANGUAGE_BUILTIN; - info.m_name = name; - if (meta) { - info.m_meta = *meta; - } - return info; - } - - static SymbolInfo make_method(const std::string& method_name, - const std::vector args, - const MethodInfo& method_info, - const goos::Object& defining_form) { - SymbolInfo info; - info.m_kind = Kind::METHOD; - info.m_name = method_name; - info.m_method_info = method_info; - info.m_def_form = defining_form; - info.m_meta.docstring = - info.m_method_info.docstring.has_value() ? info.m_method_info.docstring.value() : ""; - info.m_args = args; - return info; - } - - const std::string& name() const { return m_name; } - const MethodInfo& method_info() const { return m_method_info; } - Kind kind() const { return m_kind; } - const goos::Object& src_form() const { return m_def_form; } - const Metadata& meta() const { return m_meta; } - const std::vector& args() const { return m_args; } - - private: - Kind m_kind = Kind::INVALID; - goos::Object m_def_form; - std::string m_name; - MethodInfo m_method_info; - Metadata m_meta; - std::vector m_args; - - std::string m_return_type; -}; - -/*! - * A map of symbol info. It internally stores the info in a prefix tree so you can quickly get - * a list of all symbols starting with a given prefix. - */ -class SymbolInfoMap { - public: - SymbolInfoMap() = default; - void add_global(const std::string& name, - const goos::Object& defining_form, - const std::optional meta = {}) { - m_map[name]->push_back(SymbolInfo::make_global(name, defining_form, meta)); - } - - void add_fwd_dec(const std::string& name, const goos::Object& defining_form) { - m_map[name]->push_back(SymbolInfo::make_fwd_declared_sym(name, defining_form)); - } - - // The m_symbol_types container stores TypeSpecs -- this does have argument information but not - // the names, which is why they have to be explicitly provided - void add_function(const std::string& name, - const std::vector args, - const goos::Object& defining_form, - const std::optional meta = {}) { - m_map[name]->push_back(SymbolInfo::make_function(name, args, defining_form, meta)); - } - - void add_type(const std::string& name, - const goos::Object& defining_form, - const std::optional meta = {}) { - m_map[name]->push_back(SymbolInfo::make_type(name, defining_form, meta)); - } - - void add_constant(const std::string& name, - const goos::Object& defining_form, - const std::optional meta = {}) { - m_map[name]->push_back(SymbolInfo::make_constant(name, defining_form, meta)); - } - - void add_macro(const std::string& name, - const goos::Object& defining_form, - const std::optional meta = {}) { - m_map[name]->push_back(SymbolInfo::make_macro(name, defining_form, meta)); - } - - void add_builtin(const std::string& name, const std::optional meta = {}) { - m_map[name]->push_back(SymbolInfo::make_builtin(name, meta)); - } - - // The m_symbol_types container stores TypeSpecs -- this does have argument information but not - // the names, which is why they have to be explicitly provided - void add_method(const std::string& method_name, - const std::vector args, - const MethodInfo& method_info, - const goos::Object& defining_form) { - m_map[method_name]->push_back( - SymbolInfo::make_method(method_name, args, method_info, defining_form)); - } - - std::vector* lookup_exact_name(const std::string& name) const { - return m_map.lookup(name); - } - - std::set lookup_symbols_starting_with(const std::string& prefix) const { - std::set result; - auto lookup = m_map.lookup_prefix(prefix); - for (auto& x : lookup) { - for (auto& y : *x) { - result.insert(y.name()); - } - } - return result; - } - - int symbol_count() const { return m_map.size(); } - - std::vector get_all_symbols() const { - std::vector info; - auto lookup = m_map.get_all_nodes(); - for (auto& x : lookup) { - for (auto& y : *x) { - info.push_back(y); - } - } - return info; - } - - private: - Trie> m_map; -}; diff --git a/goalc/compiler/Util.cpp b/goalc/compiler/Util.cpp index c37006966f..4400533eb1 100644 --- a/goalc/compiler/Util.cpp +++ b/goalc/compiler/Util.cpp @@ -314,7 +314,7 @@ bool Compiler::is_local_symbol(const goos::Object& obj, Env* env) { } // check global constants - if (m_global_constants.find(obj.as_symbol()) != m_global_constants.end()) { + if (m_global_constants.lookup(obj.as_symbol())) { return true; } diff --git a/goalc/compiler/compilation/Asm.cpp b/goalc/compiler/compilation/Asm.cpp index da831286b6..afc959481b 100644 --- a/goalc/compiler/compilation/Asm.cpp +++ b/goalc/compiler/compilation/Asm.cpp @@ -219,12 +219,11 @@ Val* Compiler::compile_asm_load_sym(const goos::Object& form, const goos::Object form, args, {{}, {goos::ObjectType::SYMBOL}}, {{"sext", {false, goos::ObjectType::SYMBOL}}, {"color", {false, goos::ObjectType::SYMBOL}}}); auto& sym_name = args.unnamed.at(1).as_symbol(); - auto sym_kv = m_symbol_types.find(sym_name); - if (sym_kv == m_symbol_types.end()) { + const auto* sym_ts = m_symbol_types.lookup(sym_name); + if (!sym_ts) { throw_compiler_error(form, "Cannot find a symbol named {}.", sym_name.name_ptr); } - auto ts = sym_kv->second; - bool sext = m_ts.lookup_type(ts)->get_load_signed(); + bool sext = m_ts.lookup_type(*sym_ts)->get_load_signed(); if (args.has_named("sext")) { sext = get_true_or_false(form, args.named.at("sext")); } diff --git a/goalc/compiler/compilation/Atoms.cpp b/goalc/compiler/compilation/Atoms.cpp index bdbcc8a4d6..90ab5de78d 100644 --- a/goalc/compiler/compilation/Atoms.cpp +++ b/goalc/compiler/compilation/Atoms.cpp @@ -388,13 +388,13 @@ SymbolVal* Compiler::compile_get_sym_obj(const std::string& name, Env* env) { Val* Compiler::compile_get_symbol_value(const goos::Object& form, const std::string& name, Env* env) { - auto existing_symbol = m_symbol_types.find(m_goos.intern_ptr(name)); - if (existing_symbol == m_symbol_types.end()) { + auto existing_symbol = m_symbol_types.lookup(m_goos.intern_ptr(name)); + if (!existing_symbol) { throw_compiler_error( form, "The symbol {} was looked up as a global variable, but it does not exist.", name); } - auto ts = existing_symbol->second; + const auto& ts = *existing_symbol; auto sext = m_ts.lookup_type_allow_partial_def(ts)->get_load_signed(); auto fe = env->function_env(); auto sym = fe->alloc_val(name, m_ts.make_typespec("symbol")); @@ -431,20 +431,20 @@ Val* Compiler::compile_symbol(const goos::Object& form, Env* env) { return lexical; } - auto global_constant = m_global_constants.find(form.as_symbol()); - auto existing_symbol = m_symbol_types.find(form.as_symbol()); + auto global_constant = m_global_constants.lookup(form.as_symbol()); + auto existing_symbol = m_symbol_types.lookup(form.as_symbol()); // see if it's a constant - if (global_constant != m_global_constants.end()) { + if (global_constant) { // check there is no symbol with the same name - if (existing_symbol != m_symbol_types.end()) { + if (existing_symbol) { throw_compiler_error(form, "Ambiguous symbol: {} is both a global variable and a constant and it " "is not clear which should be used here."); } // got a global constant - return compile_error_guard(global_constant->second, env); + return compile_error_guard(*global_constant, env); } // none of those, so get a global symbol. diff --git a/goalc/compiler/compilation/CompilerControl.cpp b/goalc/compiler/compilation/CompilerControl.cpp index e53cfd4890..383ff92b80 100644 --- a/goalc/compiler/compilation/CompilerControl.cpp +++ b/goalc/compiler/compilation/CompilerControl.cpp @@ -14,8 +14,8 @@ #include "goalc/compiler/Compiler.h" #include "goalc/compiler/IR.h" -#include "goalc/compiler/SymbolInfo.h" #include "goalc/compiler/docs/DocTypes.h" +#include "goalc/compiler/symbol_info.h" #include "goalc/data_compiler/dir_tpages.h" #include "goalc/data_compiler/game_count.h" #include "goalc/data_compiler/game_text_common.h" @@ -358,35 +358,36 @@ Val* Compiler::compile_reload(const goos::Object& form, const goos::Object& rest return get_none(); } -std::string Compiler::make_symbol_info_description(const SymbolInfo& info) { - switch (info.kind()) { - case SymbolInfo::Kind::GLOBAL_VAR: +std::string Compiler::make_symbol_info_description(const symbol_info::SymbolInfo* info) { + switch (info->m_kind) { + case symbol_info::Kind::GLOBAL_VAR: return fmt::format("[Global Variable] Type: {} Defined: {}", - m_symbol_types.at(m_goos.intern_ptr(info.name())).print(), - m_goos.reader.db.get_info_for(info.src_form())); - case SymbolInfo::Kind::LANGUAGE_BUILTIN: - return fmt::format("[Built-in Form] {}\n", info.name()); - case SymbolInfo::Kind::METHOD: + m_symbol_types.lookup(m_goos.intern_ptr(info->m_name))->print(), + m_goos.reader.db.get_info_for(info->m_def_form)); + case symbol_info::Kind::LANGUAGE_BUILTIN: + return fmt::format("[Built-in Form] {}\n", info->m_name); + case symbol_info::Kind::METHOD: return fmt::format("[Method] Type: {} Method Name: {} Defined: {}", - info.method_info().defined_in_type, info.name(), - m_goos.reader.db.get_info_for(info.src_form())); - case SymbolInfo::Kind::TYPE: - return fmt::format("[Type] Name: {} Defined: {}", info.name(), - m_goos.reader.db.get_info_for(info.src_form())); - case SymbolInfo::Kind::MACRO: - return fmt::format("[Macro] Name: {} Defined: {}", info.name(), - m_goos.reader.db.get_info_for(info.src_form())); - case SymbolInfo::Kind::CONSTANT: + info->m_method_info.defined_in_type, info->m_name, + m_goos.reader.db.get_info_for(info->m_def_form)); + case symbol_info::Kind::TYPE: + return fmt::format("[Type] Name: {} Defined: {}", info->m_name, + m_goos.reader.db.get_info_for(info->m_def_form)); + case symbol_info::Kind::MACRO: + return fmt::format("[Macro] Name: {} Defined: {}", info->m_name, + m_goos.reader.db.get_info_for(info->m_def_form)); + case symbol_info::Kind::CONSTANT: return fmt::format( - "[Constant] Name: {} Value: {} Defined: {}", info.name(), - m_global_constants.at(m_goos.reader.symbolTable.intern(info.name().c_str())).print(), - m_goos.reader.db.get_info_for(info.src_form())); - case SymbolInfo::Kind::FUNCTION: - return fmt::format("[Function] Name: {} Defined: {}", info.name(), - m_goos.reader.db.get_info_for(info.src_form())); - case SymbolInfo::Kind::FWD_DECLARED_SYM: - return fmt::format("[Forward-Declared] Name: {} Defined: {}", info.name(), - m_goos.reader.db.get_info_for(info.src_form())); + "[Constant] Name: {} Value: {} Defined: {}", info->m_name, + m_global_constants.lookup(m_goos.reader.symbolTable.intern(info->m_name.c_str())) + ->print(), + m_goos.reader.db.get_info_for(info->m_def_form)); + case symbol_info::Kind::FUNCTION: + return fmt::format("[Function] Name: {} Defined: {}", info->m_name, + m_goos.reader.db.get_info_for(info->m_def_form)); + case symbol_info::Kind::FWD_DECLARED_SYM: + return fmt::format("[Forward-Declared] Name: {} Defined: {}", info->m_name, + m_goos.reader.db.get_info_for(info->m_def_form)); default: ASSERT(false); return {}; @@ -398,11 +399,11 @@ Val* Compiler::compile_get_info(const goos::Object& form, const goos::Object& re auto args = get_va(form, rest); va_check(form, args, {goos::ObjectType::SYMBOL}, {}); - auto result = m_symbol_info.lookup_exact_name(args.unnamed.at(0).as_symbol().name_ptr); - if (!result) { + const auto result = m_symbol_info.lookup_exact_name(args.unnamed.at(0).as_symbol().name_ptr); + if (result.empty()) { lg::print("No results found.\n"); } else { - for (auto& info : *result) { + for (const auto& info : result) { lg::print("{}", make_symbol_info_description(info)); } } @@ -437,9 +438,12 @@ replxx::Replxx::completions_t Compiler::find_symbols_or_object_file_by_prefix( completions.push_back(fmt::format("\"{}\")", match)); } } else { + // TODO - GOAL's method calling syntax sucks for method name auto-completion + // maybe something that could be improved? Though it would be a radical departure from + // the syntax const auto [token, stripped_leading_paren] = m_repl->get_current_repl_token(context); // Otherwise, look for symbols - auto possible_forms = lookup_symbol_infos_starting_with(token); + auto possible_forms = lookup_symbol_names_starting_with(token, 100); for (auto& x : possible_forms) { completions.push_back(stripped_leading_paren ? "(" + x : x); @@ -456,7 +460,7 @@ replxx::Replxx::hints_t Compiler::find_hints_by_prefix(std::string const& contex (void)contextLen; (void)user_data; auto token = m_repl->get_current_repl_token(context); - auto possible_forms = lookup_symbol_infos_starting_with(token.first); + auto possible_forms = lookup_symbol_names_starting_with(token.first, 100); replxx::Replxx::hints_t hints; @@ -497,9 +501,8 @@ void Compiler::repl_coloring( curr_symbol.second.erase(0, 1); curr_symbol.first++; } - std::vector* sym_match = lookup_exact_name_info(curr_symbol.second); - if (sym_match != nullptr && sym_match->size() == 1) { - SymbolInfo sym_info = sym_match->at(0); + const auto matching_symbols = lookup_exact_name_info(curr_symbol.second); + if (matching_symbols.size() == 1) { for (int pos = curr_symbol.first; pos <= int(i); pos++) { // TODO - currently just coloring all types brown/gold // - would be nice to have a different color for globals, functions, etc @@ -541,7 +544,7 @@ void Compiler::repl_coloring( } } - // TODO - general syntax highlighting with regexes (quotes, symbols, etc) + // TODO - general syntax highlighting with AST } Val* Compiler::compile_autocomplete(const goos::Object& form, const goos::Object& rest, Env* env) { @@ -550,7 +553,7 @@ Val* Compiler::compile_autocomplete(const goos::Object& form, const goos::Object va_check(form, args, {goos::ObjectType::SYMBOL}, {}); Timer timer; - auto result = m_symbol_info.lookup_symbols_starting_with(args.unnamed.at(0).as_symbol().name_ptr); + auto result = m_symbol_info.lookup_names_starting_with(args.unnamed.at(0).as_symbol().name_ptr); auto time = timer.getMs(); for (auto& x : result) { @@ -581,85 +584,50 @@ Val* Compiler::compile_update_macro_metadata(const goos::Object& form, auto arg_spec = m_goos.parse_arg_spec(form, args.unnamed.at(2)); m_macro_specs[name] = arg_spec; - - SymbolInfo::Metadata sym_meta; - sym_meta.docstring = args.unnamed.at(1).as_string()->data; - m_symbol_info.add_macro(name, form, sym_meta); + m_symbol_info.add_macro(name, arg_spec, form, args.unnamed.at(1).as_string()->data); return get_none(); } -std::set Compiler::lookup_symbol_infos_starting_with(const std::string& prefix) const { +std::vector Compiler::lookup_symbol_info_by_file( + const std::string& file_path) const { + return m_symbol_info.lookup_symbols_by_file(file_path); +} + +std::vector Compiler::lookup_symbol_info_by_prefix( + const std::string& prefix) const { + return m_symbol_info.lookup_symbols_starting_with(prefix); +} + +std::set Compiler::lookup_symbol_names_starting_with(const std::string& prefix, + int max_count) const { if (m_goos.reader.check_string_is_valid(prefix)) { - return m_symbol_info.lookup_symbols_starting_with(prefix); + return m_symbol_info.lookup_names_starting_with(prefix, max_count); } return {}; } -std::vector* Compiler::lookup_exact_name_info(const std::string& name) const { +std::vector Compiler::lookup_exact_name_info( + const std::string& name) const { if (m_goos.reader.check_string_is_valid(name)) { return m_symbol_info.lookup_exact_name(name); } else { - return nullptr; + return {}; } } std::optional Compiler::lookup_typespec(const std::string& symbol_name) { - const auto& it = m_symbol_types.find(m_goos.intern_ptr(symbol_name)); - if (it != m_symbol_types.end()) { - return it->second; + const auto it = m_symbol_types.lookup(m_goos.intern_ptr(symbol_name)); + if (it) { + return *it; } return {}; } -Val* Compiler::compile_load_project(const goos::Object& form, const goos::Object& rest, Env*) { - auto args = get_va(form, rest); - va_check(form, args, {goos::ObjectType::STRING}, {}); - m_make.load_project_file(args.unnamed.at(0).as_string()->data); - return get_none(); -} - -Val* Compiler::compile_make(const goos::Object& form, const goos::Object& rest, Env*) { - auto args = get_va(form, rest); - va_check(form, args, {goos::ObjectType::STRING}, - {{"force", {false, {goos::ObjectType::SYMBOL}}}, - {"verbose", {false, {goos::ObjectType::SYMBOL}}}}); - bool force = false; - if (args.has_named("force")) { - force = get_true_or_false(form, args.get_named("force")); - } - - bool verbose = false; - if (args.has_named("verbose")) { - verbose = get_true_or_false(form, args.get_named("verbose")); - } - - m_make.make(args.unnamed.at(0).as_string()->data, force, verbose); - return get_none(); -} - -Val* Compiler::compile_print_debug_compiler_stats(const goos::Object& form, - const goos::Object& rest, - Env*) { - auto args = get_va(form, rest); - va_check(form, args, {}, {}); - - lg::print("Spill operations (total): {}\n", m_debug_stats.num_spills); - lg::print("Spill operations (v1 only): {}\n", m_debug_stats.num_spills_v1); - lg::print("Eliminated moves: {}\n", m_debug_stats.num_moves_eliminated); - lg::print("Total functions: {}\n", m_debug_stats.total_funcs); - lg::print("Functions requiring v1: {}\n", m_debug_stats.funcs_requiring_v1_allocator); - lg::print("Size of autocomplete prefix tree: {}\n", m_symbol_info.symbol_count()); - - return get_none(); -} - -Val* Compiler::compile_gen_docs(const goos::Object& form, const goos::Object& rest, Env*) { - auto args = get_va(form, rest); - va_check(form, args, {goos::ObjectType::STRING}, {}); - - const auto& doc_path = fs::path(args.unnamed.at(0).as_string()->data); - lg::info("Saving docs to: {}", doc_path.string()); - +std::tuple, + std::unordered_map> +Compiler::generate_per_file_symbol_info() { + // TODO - remove this function, all required information has been consolidated into `SymbolInfo` + // it just has to be serialized in the same way, I will do it later const auto symbols = m_symbol_info.get_all_symbols(); std::unordered_map all_symbols; @@ -673,7 +641,7 @@ Val* Compiler::compile_gen_docs(const goos::Object& form, const goos::Object& re lg::info("Processing [{}/{}] symbols...", count, symbols.size()); } std::optional def_loc; - const auto& goos_info = m_goos.reader.db.get_short_info_for(sym_info.src_form()); + const auto& goos_info = m_goos.reader.db.get_short_info_for(sym_info->m_def_form); if (goos_info) { Docs::DefinitionLocation new_def_loc; new_def_loc.filename = file_util::convert_to_unix_path_separators(file_util::split_path_at( @@ -684,15 +652,15 @@ Val* Compiler::compile_gen_docs(const goos::Object& form, const goos::Object& re } Docs::SymbolDocumentation sym_doc; - sym_doc.name = sym_info.name(); - sym_doc.description = sym_info.meta().docstring; - sym_doc.kind = sym_info.kind(); + sym_doc.name = sym_info->m_name; + sym_doc.description = sym_info->m_docstring; + sym_doc.kind = sym_info->m_kind; sym_doc.def_location = def_loc; - if (all_symbols.count(sym_info.name()) > 1) { - lg::error("A symbol was defined twice, how did this happen? {}", sym_info.name()); + if (all_symbols.count(sym_info->m_name) > 1) { + lg::error("A symbol was defined twice, how did this happen? {}", sym_info->m_name); } else { - all_symbols.emplace(sym_info.name(), sym_doc); + all_symbols.emplace(sym_info->m_name, sym_doc); } Docs::FileDocumentation file_doc; @@ -711,36 +679,36 @@ Val* Compiler::compile_gen_docs(const goos::Object& form, const goos::Object& re } // TODO - states / enums / built-ins - if (sym_info.kind() == SymbolInfo::Kind::GLOBAL_VAR || - sym_info.kind() == SymbolInfo::Kind::CONSTANT) { + if (sym_info->m_kind == symbol_info::Kind::GLOBAL_VAR || + sym_info->m_kind == symbol_info::Kind::CONSTANT) { Docs::VariableDocumentation var; - var.name = sym_info.name(); - var.description = sym_info.meta().docstring; - if (sym_info.kind() == SymbolInfo::Kind::CONSTANT) { + var.name = sym_info->m_name; + var.description = sym_info->m_docstring; + if (sym_info->m_kind == symbol_info::Kind::CONSTANT) { var.type = "unknown"; // Unfortunately, constants are not properly typed } else { - var.type = m_symbol_types.at(m_goos.intern_ptr(var.name)).base_type(); + var.type = m_symbol_types.lookup(m_goos.intern_ptr(var.name))->base_type(); } var.def_location = def_loc; - if (sym_info.kind() == SymbolInfo::Kind::GLOBAL_VAR) { + if (sym_info->m_kind == symbol_info::Kind::GLOBAL_VAR) { file_doc.global_vars.push_back(var); } else { file_doc.constants.push_back(var); } - } else if (sym_info.kind() == SymbolInfo::Kind::FUNCTION) { + } else if (sym_info->m_kind == symbol_info::Kind::FUNCTION) { Docs::FunctionDocumentation func; - func.name = sym_info.name(); - func.description = sym_info.meta().docstring; + func.name = sym_info->m_name; + func.description = sym_info->m_docstring; func.def_location = def_loc; - func.args = Docs::get_args_from_docstring(sym_info.args(), func.description); + func.args = Docs::get_args_from_docstring(sym_info->m_args, func.description); // The last arg in the typespec is the return type - const auto& func_type = m_symbol_types.at(m_goos.intern_ptr(func.name)); - func.return_type = func_type.last_arg().base_type(); + const auto func_type = m_symbol_types.lookup(m_goos.intern_ptr(func.name)); + func.return_type = func_type->last_arg().base_type(); file_doc.functions.push_back(func); - } else if (sym_info.kind() == SymbolInfo::Kind::TYPE) { + } else if (sym_info->m_kind == symbol_info::Kind::TYPE) { Docs::TypeDocumentation type; - type.name = sym_info.name(); - type.description = sym_info.meta().docstring; + type.name = sym_info->m_name; + type.description = sym_info->m_docstring; type.def_location = def_loc; const auto& type_info = m_ts.lookup_type(type.name); type.parent_type = type_info->get_parent(); @@ -784,10 +752,10 @@ Val* Compiler::compile_gen_docs(const goos::Object& form, const goos::Object& re type.states.push_back(state_doc); } file_doc.types.push_back(type); - } else if (sym_info.kind() == SymbolInfo::Kind::MACRO) { + } else if (sym_info->m_kind == symbol_info::Kind::MACRO) { Docs::MacroDocumentation macro_doc; - macro_doc.name = sym_info.name(); - macro_doc.description = sym_info.meta().docstring; + macro_doc.name = sym_info->m_name; + macro_doc.description = sym_info->m_docstring; macro_doc.def_location = def_loc; const auto& arg_spec = m_macro_specs[macro_doc.name]; for (const auto& arg : arg_spec.unnamed) { @@ -804,16 +772,16 @@ Val* Compiler::compile_gen_docs(const goos::Object& form, const goos::Object& re macro_doc.variadic_arg = arg_spec.rest; } file_doc.macros.push_back(macro_doc); - } else if (sym_info.kind() == SymbolInfo::Kind::METHOD) { + } else if (sym_info->m_kind == symbol_info::Kind::METHOD) { Docs::MethodDocumentation method_doc; - method_doc.name = sym_info.name(); - method_doc.description = sym_info.meta().docstring; + method_doc.name = sym_info->m_name; + method_doc.description = sym_info->m_docstring; method_doc.def_location = def_loc; - const auto& method_info = sym_info.method_info(); + const auto& method_info = sym_info->m_method_info; method_doc.id = method_info.id; - method_doc.type = sym_info.method_info().defined_in_type; + method_doc.type = sym_info->m_method_info.defined_in_type; method_doc.is_override = method_info.overrides_parent; - method_doc.args = Docs::get_args_from_docstring(sym_info.args(), method_doc.description); + method_doc.args = Docs::get_args_from_docstring(sym_info->m_args, method_doc.description); // The last arg in the typespec is the return type const auto& method_type = method_info.type; method_doc.return_type = method_type.last_arg().base_type(); @@ -822,6 +790,59 @@ Val* Compiler::compile_gen_docs(const goos::Object& form, const goos::Object& re } file_docs[file_doc_key] = file_doc; } + return {all_symbols, file_docs}; +} + +Val* Compiler::compile_load_project(const goos::Object& form, const goos::Object& rest, Env*) { + auto args = get_va(form, rest); + va_check(form, args, {goos::ObjectType::STRING}, {}); + m_make.load_project_file(args.unnamed.at(0).as_string()->data); + return get_none(); +} + +Val* Compiler::compile_make(const goos::Object& form, const goos::Object& rest, Env*) { + auto args = get_va(form, rest); + va_check(form, args, {goos::ObjectType::STRING}, + {{"force", {false, {goos::ObjectType::SYMBOL}}}, + {"verbose", {false, {goos::ObjectType::SYMBOL}}}}); + bool force = false; + if (args.has_named("force")) { + force = get_true_or_false(form, args.get_named("force")); + } + + bool verbose = false; + if (args.has_named("verbose")) { + verbose = get_true_or_false(form, args.get_named("verbose")); + } + + m_make.make(args.unnamed.at(0).as_string()->data, force, verbose); + return get_none(); +} + +Val* Compiler::compile_print_debug_compiler_stats(const goos::Object& form, + const goos::Object& rest, + Env*) { + auto args = get_va(form, rest); + va_check(form, args, {}, {}); + + lg::print("Spill operations (total): {}\n", m_debug_stats.num_spills); + lg::print("Spill operations (v1 only): {}\n", m_debug_stats.num_spills_v1); + lg::print("Eliminated moves: {}\n", m_debug_stats.num_moves_eliminated); + lg::print("Total functions: {}\n", m_debug_stats.total_funcs); + lg::print("Functions requiring v1: {}\n", m_debug_stats.funcs_requiring_v1_allocator); + lg::print("Size of autocomplete prefix tree: {}\n", m_symbol_info.symbol_count()); + + return get_none(); +} + +Val* Compiler::compile_gen_docs(const goos::Object& form, const goos::Object& rest, Env*) { + auto args = get_va(form, rest); + va_check(form, args, {goos::ObjectType::STRING}, {}); + + const auto& doc_path = fs::path(args.unnamed.at(0).as_string()->data); + lg::info("Saving docs to: {}", doc_path.string()); + + const auto [all_symbols, file_docs] = generate_per_file_symbol_info(); json symbol_map_data(all_symbols); file_util::write_text_file( diff --git a/goalc/compiler/compilation/ConstantPropagation.cpp b/goalc/compiler/compilation/ConstantPropagation.cpp index a63c096876..2a630005c8 100644 --- a/goalc/compiler/compilation/ConstantPropagation.cpp +++ b/goalc/compiler/compilation/ConstantPropagation.cpp @@ -187,13 +187,13 @@ Compiler::ConstPropResult Compiler::constant_propagation_dispatch(const goos::Ob } // it can either be a global or symbol - const auto& global_constant = m_global_constants.find(expanded.as_symbol()); - const auto& existing_symbol = m_symbol_types.find(expanded.as_symbol()); + const auto* global_constant = m_global_constants.lookup(expanded.as_symbol()); + const auto* existing_symbol = m_symbol_types.lookup(expanded.as_symbol()); // see if it's a constant - if (global_constant != m_global_constants.end()) { + if (global_constant) { // check there is no symbol with the same name, this is likely a bug and complain. - if (existing_symbol != m_symbol_types.end()) { + if (existing_symbol) { throw_compiler_error( code, "Ambiguous symbol: {} is both a global variable and a constant and it " @@ -201,7 +201,7 @@ Compiler::ConstPropResult Compiler::constant_propagation_dispatch(const goos::Ob } // got a global constant - return try_constant_propagation(global_constant->second, env); + return try_constant_propagation(*global_constant, env); } else { // return to the compiler, we can't figure it out. return {expanded, true}; diff --git a/goalc/compiler/compilation/Define.cpp b/goalc/compiler/compilation/Define.cpp index ff8e6df4e4..420961c58f 100644 --- a/goalc/compiler/compilation/Define.cpp +++ b/goalc/compiler/compilation/Define.cpp @@ -11,10 +11,10 @@ */ Val* Compiler::compile_define(const goos::Object& form, const goos::Object& rest, Env* env) { auto args = get_va(form, rest); - SymbolInfo::Metadata sym_meta; + std::string docstring; // Grab the docstring (if it's there) and then rip it out so we can do the normal validation if (args.unnamed.size() == 3 && args.unnamed.at(1).is_string()) { - sym_meta.docstring = args.unnamed.at(1).as_string()->data; + docstring = args.unnamed.at(1).as_string()->data; args.unnamed.erase(args.unnamed.begin() + 1); } @@ -24,17 +24,18 @@ Val* Compiler::compile_define(const goos::Object& form, const goos::Object& rest auto& val = args.unnamed.at(1); // check we aren't duplicated a name as both a symbol and global constant - auto global_constant = m_global_constants.find(sym.as_symbol()); - if (global_constant != m_global_constants.end()) { + auto global_constant = m_global_constants.lookup(sym.as_symbol()); + if (global_constant) { throw_compiler_error( form, "Cannot define a symbol named {}, it already exists as a global constant (value {}).", - sym.print(), global_constant->second.print()); + sym.print(), global_constant->print()); } auto fe = env->function_env(); auto sym_val = fe->alloc_val(symbol_string(sym), m_ts.make_typespec("symbol")); auto compiled_val = compile_error_guard(val, env); auto as_lambda = dynamic_cast(compiled_val); + auto in_gpr = compiled_val->to_gpr(form, fe); if (as_lambda) { // there are two cases in which we save a function body that is passed to a define: // 1. It generated code [so went through the compiler] and the allow_inline flag is set. @@ -50,11 +51,14 @@ Val* Compiler::compile_define(const goos::Object& form, const goos::Object& rest } // Most defines come via macro invokations, we want the TRUE defining form location // if we can get it + // TODO - test the return value changes if (env->macro_expand_env()) { - m_symbol_info.add_function(symbol_string(sym), as_lambda->lambda.params, - env->macro_expand_env()->root_form(), sym_meta); + m_symbol_info.add_function(symbol_string(sym), in_gpr->type().last_arg().base_type(), + as_lambda->lambda.params, env->macro_expand_env()->root_form(), + docstring); } else { - m_symbol_info.add_function(symbol_string(sym), as_lambda->lambda.params, form, sym_meta); + m_symbol_info.add_function(symbol_string(sym), in_gpr->type().last_arg().base_type(), + as_lambda->lambda.params, form, docstring); } } @@ -62,24 +66,23 @@ Val* Compiler::compile_define(const goos::Object& form, const goos::Object& rest throw_compiler_error(form, "Cannot define {} because it cannot be set.", sym_val->print()); } - auto in_gpr = compiled_val->to_gpr(form, fe); - auto existing_type = m_symbol_types.find(sym.as_symbol()); - if (existing_type == m_symbol_types.end()) { - m_symbol_types[sym.as_symbol()] = in_gpr->type(); + auto existing_type = m_symbol_types.lookup(sym.as_symbol()); + if (!existing_type) { + m_symbol_types.set(sym.as_symbol(), in_gpr->type()); } else { bool do_typecheck = true; if (args.has_named("no-typecheck")) { do_typecheck = !get_true_or_false(form, args.named.at("no-typecheck")); } if (do_typecheck) { - typecheck(form, existing_type->second, in_gpr->type(), + typecheck(form, *existing_type, in_gpr->type(), fmt::format("define on existing symbol {}", sym.as_symbol().name_ptr)); } } if (!as_lambda) { // Don't double-add functions as globals - m_symbol_info.add_global(symbol_string(sym), form, sym_meta); + m_symbol_info.add_global(symbol_string(sym), in_gpr->type().base_type(), form, docstring); } env->emit(form, std::make_unique(sym_val, in_gpr)); @@ -104,27 +107,26 @@ Val* Compiler::compile_define_extern(const goos::Object& form, const goos::Objec auto new_type = parse_typespec(typespec, env); - auto existing_type = m_symbol_types.find(sym.as_symbol()); + auto existing_type = m_symbol_types.lookup(sym.as_symbol()); // symbol already declared, and doesn't match existing definition. do more checks... - if (existing_type != m_symbol_types.end() && existing_type->second != new_type) { + if (existing_type && *existing_type != new_type) { if (m_allow_inconsistent_definition_symbols.find(symbol_string(sym)) == m_allow_inconsistent_definition_symbols.end()) { // throw if we have throws enabled, and new definition is NOT just more generic // (that case is fine in goal) - if (!m_ts.tc(new_type, existing_type->second) && m_throw_on_define_extern_redefinition) { + if (!m_ts.tc(new_type, *existing_type) && m_throw_on_define_extern_redefinition) { throw_compiler_error(form, "define-extern would redefine the type of symbol {} from {} to {}.", - symbol_string(sym), existing_type->second.print(), new_type.print()); + symbol_string(sym), existing_type->print(), new_type.print()); } else { print_compiler_warning( "define-extern has redefined the type of symbol {}\npreviously: {}\nnow: {}\n", - symbol_string(sym).c_str(), existing_type->second.print().c_str(), - new_type.print().c_str()); + symbol_string(sym).c_str(), existing_type->print().c_str(), new_type.print().c_str()); } } } - m_symbol_types[sym.as_symbol()] = new_type; + m_symbol_types.set(sym.as_symbol(), new_type); m_symbol_info.add_fwd_dec(symbol_string(sym), form); return get_none(); } diff --git a/goalc/compiler/compilation/Function.cpp b/goalc/compiler/compilation/Function.cpp index 838f2bb4c3..f88e1b50f6 100644 --- a/goalc/compiler/compilation/Function.cpp +++ b/goalc/compiler/compilation/Function.cpp @@ -346,8 +346,7 @@ Val* Compiler::compile_function_or_method_call(const goos::Object& form, Env* en if (uneval_head.as_symbol() == "inspect" || uneval_head.as_symbol() == "print") { is_method_call = true; } else { - if (is_local_symbol(uneval_head, env) || - m_symbol_types.find(uneval_head.as_symbol()) != m_symbol_types.end()) { + if (is_local_symbol(uneval_head, env) || m_symbol_types.lookup(uneval_head.as_symbol())) { // the local environment (mlets, lexicals, constants, globals) defines this symbol. // this will "win" over a method name lookup, so we should compile as normal head = compile_error_guard(args.unnamed.front(), env); diff --git a/goalc/compiler/compilation/Macro.cpp b/goalc/compiler/compilation/Macro.cpp index 2fbcf0229c..52d5c436a4 100644 --- a/goalc/compiler/compilation/Macro.cpp +++ b/goalc/compiler/compilation/Macro.cpp @@ -45,6 +45,7 @@ Val* Compiler::compile_goos_macro(const goos::Object& o, env->function_env()->alloc_env(env, name.as_symbol(), macro->body, o); try { const auto& compile_result = compile(goos_result, compile_env_for_macro); + // TODO - is this critical (do the args and such change?)? m_macro_specs.emplace(macro->name, macro->args); return compile_result; } catch (CompilerException& ce) { @@ -180,10 +181,9 @@ Val* Compiler::compile_define_constant(const goos::Object& form, rest = &pair_cdr(*rest); // check for potential docstring - SymbolInfo::Metadata sym_meta; + std::string docstring = ""; if (rest->is_pair() && pair_car(*rest).is_string() && !pair_cdr(*rest).is_empty_list()) { - std::string docstring = pair_car(*rest).as_string()->data; - sym_meta.docstring = docstring; + docstring = pair_car(*rest).as_string()->data; rest = &pair_cdr(*rest); } @@ -196,19 +196,19 @@ Val* Compiler::compile_define_constant(const goos::Object& form, // GOAL constant if (goal) { - if (m_symbol_types.find(sym) != m_symbol_types.end()) { + if (m_symbol_types.lookup(sym)) { throw_compiler_error(form, "Cannot define {} as a constant because " "it is already the name of a symbol of type {}", - sym.name_ptr, m_symbol_types.at(sym).print()); + sym.name_ptr, m_symbol_types.lookup(sym)->print()); } - auto existing = m_global_constants.find(sym); - if (existing != m_global_constants.end() && existing->second != value) { + auto existing = m_global_constants.lookup(sym); + if (existing && *existing != value) { print_compiler_warning("Constant {} has been redefined {} -> {}", sym.name_ptr, - existing->second.print(), value.print()); + existing->print(), value.print()); } - m_global_constants[sym] = value; + m_global_constants.set(sym, value); } // GOOS constant @@ -218,7 +218,7 @@ Val* Compiler::compile_define_constant(const goos::Object& form, // TODO - eventually, it'd be nice if global constants were properly typed // and this information was propagated - m_symbol_info.add_constant(sym.name_ptr, form, sym_meta); + m_symbol_info.add_constant(sym.name_ptr, form, docstring); return get_none(); } diff --git a/goalc/compiler/compilation/State.cpp b/goalc/compiler/compilation/State.cpp index e47c346561..9f7eb989eb 100644 --- a/goalc/compiler/compilation/State.cpp +++ b/goalc/compiler/compilation/State.cpp @@ -98,10 +98,10 @@ Val* Compiler::compile_define_state_hook(const goos::Object& form, } auto& state_name = args.unnamed.at(0).as_symbol(); - auto existing_var = m_symbol_types.find(state_name); + auto existing_var = m_symbol_types.lookup(state_name); TypeSpec type_to_use; - if (existing_var == m_symbol_types.end()) { + if (!existing_var) { // we're a new state. we must have a type. if (!state_type) { throw_compiler_error(form, @@ -110,11 +110,11 @@ Val* Compiler::compile_define_state_hook(const goos::Object& form, state_name.name_ptr); } type_to_use = *state_type; - m_symbol_types[state_name] = *state_type; + m_symbol_types.set(state_name, *state_type); } else { - type_to_use = existing_var->second; + type_to_use = *existing_var; if (state_type) { - typecheck(form, existing_var->second, *state_type, + typecheck(form, *existing_var, *state_type, fmt::format("type of state {}", state_name.name_ptr)); } } diff --git a/goalc/compiler/compilation/Static.cpp b/goalc/compiler/compilation/Static.cpp index 57f1e42341..d20c8b75cc 100644 --- a/goalc/compiler/compilation/Static.cpp +++ b/goalc/compiler/compilation/Static.cpp @@ -700,10 +700,10 @@ StaticResult Compiler::compile_static(const goos::Object& form_before_macro, Env } // as a constant - auto kv = m_global_constants.find(form.as_symbol()); - if (kv != m_global_constants.end()) { + auto kv = m_global_constants.lookup(form.as_symbol()); + if (kv) { // expand constant and compile again. - return compile_static(kv->second, env); + return compile_static(*kv, env); } else { throw_compiler_error(form, "The symbol {} could not be evaluated at compile time", form.print()); @@ -891,8 +891,8 @@ void Compiler::fill_static_array_inline(const goos::Object& form, typecheck(form, TypeSpec("integer"), sr.typespec()); } else { if (sr.is_symbol() && sr.symbol_name() == "#f") { - // allow #f for any structure, or symbol (no longer a structure in jak 2) - if (content_type.base_type() != "symbol") { + // allow #f for any structure, symbol (no longer a structure in jak 2), or object. + if (content_type.base_type() != "symbol" && content_type.base_type() != "object") { typecheck(form, TypeSpec("structure"), content_type); } } else { diff --git a/goalc/compiler/compilation/Type.cpp b/goalc/compiler/compilation/Type.cpp index d62948b993..f110390d67 100644 --- a/goalc/compiler/compilation/Type.cpp +++ b/goalc/compiler/compilation/Type.cpp @@ -170,7 +170,24 @@ void Compiler::generate_field_description(const goos::Object& form, format_args.push_back(get_field_of_structure(type, reg, f.name(), env)->to_gpr(form, env)); } else if (m_ts.tc(m_ts.make_typespec("structure"), f.type())) { // Structure - str_template += fmt::format("{}{}: #<{} @ #x~X>~%", tabs, f.name(), f.type().print()); + auto ts = m_ts.lookup_type_no_throw(f.type()); + if (ts) { + // try to use print method if the structure implements it + // TODO see if this can be done without a hardcoded list + std::vector has_print = { + "vector", "vector2", "vector4w", "vec4s", + "connectable", "connection", "connection-minimap", "transform", + "transformq", "entity-links"}; + if (ts->get_parent() == "basic" || + (ts->get_parent() == "structure" && + std::find(has_print.begin(), has_print.end(), f.type().print()) != has_print.end())) { + str_template += fmt::format("{}{}: ~`{}`P~%", tabs, f.name(), f.type().print()); + } else { + str_template += fmt::format("{}{}: #<{} @ #x~X>~%", tabs, f.name(), f.type().print()); + } + } else { + str_template += fmt::format("{}{}: #<{} @ #x~X>~%", tabs, f.name(), f.type().print()); + } format_args.push_back(get_field_of_structure(type, reg, f.name(), env)->to_gpr(form, env)); } else if (f.type() == TypeSpec("seconds")) { // seconds @@ -369,33 +386,32 @@ Val* Compiler::compile_deftype(const goos::Object& form, const goos::Object& res auto result = parse_deftype(rest, &m_ts, &m_global_constants); // look up the type name - auto kv = m_symbol_types.find(m_goos.intern_ptr(result.type.base_type())); - if (kv != m_symbol_types.end() && kv->second.base_type() != "type") { + auto kv = m_symbol_types.lookup(m_goos.intern_ptr(result.type.base_type())); + if (kv && kv->base_type() != "type") { // we already have something that's not a type with the same name, this is bad. lg::print("[Warning] deftype will redefine {} from {} to a type.\n", result.type.base_type(), - kv->second.print()); + kv->print()); } // remember that this is a type - m_symbol_types[m_goos.intern_ptr(result.type.base_type())] = m_ts.make_typespec("type"); + m_symbol_types.set(m_goos.intern_ptr(result.type.base_type()), m_ts.make_typespec("type")); // add declared states for (auto& state : result.type_info->get_states_declared_for_type()) { auto interned_state_first = m_goos.intern_ptr(state.first); - auto existing_type = m_symbol_types.find(interned_state_first); - if (existing_type != m_symbol_types.end() && existing_type->second != state.second) { + auto existing_type = m_symbol_types.lookup(interned_state_first); + if (existing_type && *existing_type != state.second) { if (m_throw_on_define_extern_redefinition) { throw_compiler_error(form, "deftype would redefine the type of state {} from {} to {}.", - state.first, existing_type->second.print(), state.second.print()); + state.first, existing_type->print(), state.second.print()); } else { print_compiler_warning( "[Warning] deftype has redefined the type of state {}\npreviously: {}\nnow: " "{}\n", - state.first.c_str(), existing_type->second.print().c_str(), - state.second.print().c_str()); + state.first.c_str(), existing_type->print().c_str(), state.second.print().c_str()); } } - m_symbol_types[interned_state_first] = state.second; + m_symbol_types.set(interned_state_first, state.second); m_symbol_info.add_fwd_dec(state.first, form); } @@ -424,7 +440,7 @@ Val* Compiler::compile_deftype(const goos::Object& form, const goos::Object& res } } - m_symbol_info.add_type(result.type.base_type(), form); + m_symbol_info.add_type(result.type.base_type(), result.type_info, form); // return none, making the value of (deftype..) unusable return get_none(); @@ -1427,12 +1443,12 @@ Val* Compiler::compile_declare_type(const goos::Object& form, const goos::Object m_ts.forward_declare_type_as(type_name.name_ptr, kind); - auto existing_type = m_symbol_types.find(type_name); - if (existing_type != m_symbol_types.end() && existing_type->second != TypeSpec("type")) { + auto existing_type = m_symbol_types.lookup(type_name); + if (existing_type && *existing_type != TypeSpec("type")) { throw_compiler_error(form, "Cannot forward declare {} as a type: it is already a {}", - type_name.name_ptr, existing_type->second.print()); + type_name.name_ptr, existing_type->print()); } - m_symbol_types[type_name] = TypeSpec("type"); + m_symbol_types.set(type_name, TypeSpec("type")); return get_none(); } diff --git a/goalc/compiler/docs/DocTypes.cpp b/goalc/compiler/docs/DocTypes.cpp index 4c1cb02461..41ff71e72c 100644 --- a/goalc/compiler/docs/DocTypes.cpp +++ b/goalc/compiler/docs/DocTypes.cpp @@ -123,14 +123,15 @@ void to_json(json& j, const MacroDocumentation& obj) { } } -std::vector get_args_from_docstring(std::vector args, - std::string docstring) { +std::vector get_args_from_docstring( + std::vector args, + std::string docstring) { std::vector arg_docs; for (const auto& arg : args) { ArgumentDocumentation arg_doc; arg_doc.name = arg.name; // TODO - is this type reliable? - arg_doc.type = arg.type.base_type(); + arg_doc.type = arg.type; arg_docs.push_back(arg_doc); } if (docstring.empty()) { diff --git a/goalc/compiler/docs/DocTypes.h b/goalc/compiler/docs/DocTypes.h index d237cd127b..1f4af5f8f9 100644 --- a/goalc/compiler/docs/DocTypes.h +++ b/goalc/compiler/docs/DocTypes.h @@ -3,12 +3,15 @@ #include #include -#include "goalc/compiler/SymbolInfo.h" +#include "goalc/compiler/symbol_info.h" #include "third-party/json.hpp" using json = nlohmann::json; +// TODO - deprecate this file in factor of the now consolidated `SymbolInfo` +// which now contains comprehensive info on all forms of symbols + namespace Docs { struct DefinitionLocation { @@ -69,6 +72,7 @@ struct FieldDocumentation { void to_json(json& j, const FieldDocumentation& obj); struct TypeMethodDocumentation { + // TODO - relevant? int id; std::string name; bool is_override = false; @@ -89,6 +93,7 @@ struct TypeDocumentation { std::optional def_location; int size; std::vector fields = {}; + // TODO - who cares, remove this probably int method_count; std::vector methods = {}; std::vector states = {}; @@ -96,10 +101,14 @@ struct TypeDocumentation { void to_json(json& j, const TypeDocumentation& obj); struct MethodDocumentation { + // TODO - relevant? int id; bool is_builtin; std::string name; std::string description = ""; + // TODO - this is `object` sometimes, for example `(defmethod print ((this light))` + // i believe this is because we always grab the first symbol, but of course, overridden methods + // dont work like that so things are likely working as intended std::string type; std::optional def_location; // TODO - need to track function calls to determine this, obviously cant be determined from just @@ -139,13 +148,14 @@ struct SymbolDocumentation { // TODO - forward declared symbols std::string name; std::string description = ""; - SymbolInfo::Kind kind; + symbol_info::Kind kind; std::optional def_location = {}; std::vector forward_declared_in = {}; }; void to_json(json& j, const SymbolDocumentation& obj); -std::vector get_args_from_docstring(std::vector args, - std::string docstring); +std::vector get_args_from_docstring( + std::vector args, + std::string docstring); } // namespace Docs diff --git a/goalc/compiler/symbol_info.cpp b/goalc/compiler/symbol_info.cpp new file mode 100644 index 0000000000..d5832b7c94 --- /dev/null +++ b/goalc/compiler/symbol_info.cpp @@ -0,0 +1,316 @@ +#include "symbol_info.h" + +#include "common/log/log.h" +#include "common/util/FileUtil.h" +#include "common/util/string_util.h" + +namespace symbol_info { +void SymbolInfo::update_args_from_docstring() { + if (m_docstring.empty()) { + return; + } + auto lines = str_util::split(m_docstring); + for (const auto& line : lines) { + const auto trimmed_line = str_util::ltrim(line); + if (str_util::starts_with(trimmed_line, "@param")) { + // Get the info from the @param line + const auto& tokens = + str_util::regex_get_capture_groups(trimmed_line, "(@param.)\\s?([^\\s]*)\\s(.*)"); + if (tokens.size() != 3) { + lg::warn("invalid docstring line - {}, skipping", trimmed_line); + continue; + } + const auto& param_type = str_util::trim(tokens[0]); + const auto& param_name = str_util::trim(tokens[1]); + const auto& param_description = str_util::trim(tokens[2]); + // Locate the appropriate arg based on the name + for (auto& arg : m_args) { + if (arg.name == param_name) { + arg.description = param_description; + if (param_type == "@param") { + // a normal arg, nothing fancy + } else if (param_type == "@param_") { + // it's unused + arg.is_unused = true; + } else if (param_type == "@param!") { + // the params value is mutated within the function body + arg.is_mutated = true; + } else if (param_type == "@param?") { + // the param is optional -- there are checks to see if it was provided or not so its + // safe to pass "nothing" + arg.is_optional = true; + } + } + } + } + } +} + +void SymbolInfo::set_definition_location(const goos::TextDb* textdb) { + const auto& goos_info = textdb->get_short_info_for(m_def_form); + if (goos_info) { + DefinitionLocation def_loc; + def_loc.line_idx = goos_info->line_idx_to_display; + def_loc.char_idx = goos_info->pos_in_line; + def_loc.file_path = file_util::convert_to_unix_path_separators(goos_info->filename); + m_def_location = def_loc; + } +} + +void SymbolInfoMap::add_symbol_to_file_index(const std::string& file_path, SymbolInfo* symbol) { + if (m_file_symbol_index.find(file_path) == m_file_symbol_index.end()) { + m_file_symbol_index[file_path] = {}; + } + m_file_symbol_index[file_path].push_back(symbol); +} + +void SymbolInfoMap::add_global(const std::string& name, + const std::string& type, + const goos::Object& defining_form, + const std::string& docstring) { + SymbolInfo info = { + .m_kind = Kind::GLOBAL_VAR, + .m_name = name, + .m_def_form = defining_form, + .m_docstring = docstring, + .m_type = type, + }; + info.set_definition_location(m_textdb); + const auto inserted_symbol = m_symbol_map.insert(name, info); + if (info.m_def_location) { + add_symbol_to_file_index(info.m_def_location->file_path, inserted_symbol); + } +} + +void SymbolInfoMap::add_fwd_dec(const std::string& name, const goos::Object& defining_form) { + SymbolInfo info = {.m_kind = Kind::FWD_DECLARED_SYM, .m_name = name, .m_def_form = defining_form}; + info.set_definition_location(m_textdb); + const auto inserted_symbol = m_symbol_map.insert(name, info); + if (info.m_def_location) { + add_symbol_to_file_index(info.m_def_location->file_path, inserted_symbol); + } +} + +void SymbolInfoMap::add_function(const std::string& name, + const std::string& return_type, + const std::vector& args, + const goos::Object& defining_form, + const std::string& docstring) { + SymbolInfo info = { + .m_kind = Kind::FUNCTION, + .m_name = name, + .m_def_form = defining_form, + .m_docstring = docstring, + .m_return_type = return_type, + }; + for (const auto& goal_arg : args) { + ArgumentInfo arg_info; + arg_info.name = goal_arg.name; + arg_info.type_spec = goal_arg.type; + // TODO - is this reliable? + arg_info.type = goal_arg.type.base_type(); + info.m_args.push_back(arg_info); + } + info.update_args_from_docstring(); + info.set_definition_location(m_textdb); + const auto inserted_symbol = m_symbol_map.insert(name, info); + if (info.m_def_location) { + add_symbol_to_file_index(info.m_def_location->file_path, inserted_symbol); + } +} + +void SymbolInfoMap::add_type(const std::string& name, + Type* type_info, + const goos::Object& defining_form, + const std::string& docstring) { + SymbolInfo info = { + .m_kind = Kind::TYPE, + .m_name = name, + .m_def_form = defining_form, + .m_docstring = docstring, + .m_parent_type = type_info->get_parent(), + .m_type_size = type_info->get_size_in_memory(), + }; + // Only structure types have fields + auto as_structure_type = dynamic_cast(type_info); + if (as_structure_type) { // generate the inspect method + for (const auto& field : as_structure_type->fields()) { + // TODO - field docstrings arent a thing, yet! + FieldInfo field_info = { + .name = field.name(), + .description = "", + .type = field.type().base_type(), + .is_array = field.is_array(), + .is_dynamic = field.is_dynamic(), + .is_inline = field.is_inline(), + }; + info.m_type_fields.push_back(field_info); + } + } + for (const auto& method : type_info->get_methods_defined_for_type()) { + if (method.type.base_type() == "state") { + TypeStateInfo state_info = { + .name = method.name, + .is_virtual = true, + .id = method.id, + }; + info.m_type_states.push_back(state_info); + } else { + TypeMethodInfo method_info = { + .id = method.id, + .name = method.name, + .is_override = method.overrides_parent, + }; + info.m_type_methods.push_back(method_info); + } + } + for (const auto& [state_name, state_info] : type_info->get_states_declared_for_type()) { + TypeStateInfo type_state_info = { + .name = state_name, + .is_virtual = false, + }; + info.m_type_states.push_back(type_state_info); + } + info.set_definition_location(m_textdb); + const auto inserted_symbol = m_symbol_map.insert(name, info); + if (info.m_def_location) { + add_symbol_to_file_index(info.m_def_location->file_path, inserted_symbol); + } +} + +void SymbolInfoMap::add_constant(const std::string& name, + const goos::Object& defining_form, + const std::string& docstring) { + SymbolInfo info = { + .m_kind = Kind::CONSTANT, + .m_name = name, + .m_def_form = defining_form, + .m_docstring = docstring, + // TODO - unfortunately, constants are not properly typed + .m_type = "unknown", + }; + info.set_definition_location(m_textdb); + const auto inserted_symbol = m_symbol_map.insert(name, info); + if (info.m_def_location) { + add_symbol_to_file_index(info.m_def_location->file_path, inserted_symbol); + } +} + +void SymbolInfoMap::add_macro(const std::string& name, + const goos::ArgumentSpec arg_spec, + const goos::Object& defining_form, + const std::string& docstring) { + SymbolInfo info = { + .m_kind = Kind::MACRO, + .m_name = name, + .m_def_form = defining_form, + .m_docstring = docstring, + }; + for (const auto& arg : arg_spec.unnamed) { + info.m_macro_args.push_back(arg); + } + for (const auto& arg : arg_spec.named) { + std::optional def_value; + if (arg.second.has_default) { + def_value = arg.second.default_value.print(); + } + info.m_macro_kwargs.push_back({arg.first, def_value}); + } + if (!arg_spec.rest.empty()) { + info.m_variadic_arg = arg_spec.rest; + } + info.set_definition_location(m_textdb); + const auto inserted_symbol = m_symbol_map.insert(name, info); + if (info.m_def_location) { + add_symbol_to_file_index(info.m_def_location->file_path, inserted_symbol); + } +} + +void SymbolInfoMap::add_builtin(const std::string& name, const std::string& docstring) { + SymbolInfo info = { + .m_kind = Kind::LANGUAGE_BUILTIN, + .m_name = name, + .m_docstring = docstring, + }; + info.set_definition_location(m_textdb); + m_symbol_map.insert(name, info); +} + +void SymbolInfoMap::add_method(const std::string& method_name, + const std::vector& args, + const MethodInfo& method_info, + const goos::Object& /*defining_form*/) { + SymbolInfo info = { + .m_kind = Kind::METHOD, + .m_name = method_name, + .m_method_info = method_info, + .m_method_builtin = method_info.id <= 9, + }; + if (method_info.docstring) { + info.m_docstring = method_info.docstring.value(); + } + for (const auto& goal_arg : args) { + ArgumentInfo arg_info; + arg_info.name = goal_arg.name; + arg_info.type_spec = goal_arg.type; + // TODO - is this reliable? + arg_info.type = goal_arg.type.base_type(); + info.m_args.push_back(arg_info); + } + info.update_args_from_docstring(); + info.set_definition_location(m_textdb); + const auto inserted_symbol = m_symbol_map.insert(method_name, info); + if (info.m_def_location) { + add_symbol_to_file_index(info.m_def_location->file_path, inserted_symbol); + } +} + +std::vector SymbolInfoMap::lookup_symbols_by_file(const std::string& file_path) const { + if (m_file_symbol_index.find(file_path) != m_file_symbol_index.end()) { + return m_file_symbol_index.at(file_path); + } + return {}; +} + +std::vector SymbolInfoMap::lookup_exact_name(const std::string& name) const { + return m_symbol_map.retrieve_with_exact(name); +} + +std::vector SymbolInfoMap::lookup_symbols_starting_with( + const std::string& prefix) const { + std::vector symbols; + const auto lookup = m_symbol_map.retrieve_with_prefix(prefix); + for (const auto& result : lookup) { + symbols.push_back(result); + } + return symbols; +} + +std::vector SymbolInfoMap::get_all_symbols() const { + return m_symbol_map.get_all_elements(); +} + +std::set SymbolInfoMap::lookup_names_starting_with(const std::string& prefix, + int max_count) const { + std::set names; + const auto lookup = m_symbol_map.retrieve_with_prefix(prefix, max_count); + for (const auto& result : lookup) { + names.insert(result->m_name); + } + return names; +} + +int SymbolInfoMap::symbol_count() const { + return m_symbol_map.size(); +} + +void SymbolInfoMap::evict_symbols_using_file_index(const std::string& file_path) { + const auto standardized_path = file_util::convert_to_unix_path_separators(file_path); + if (m_file_symbol_index.find(standardized_path) != m_file_symbol_index.end()) { + for (const auto& symbol : m_file_symbol_index.at(standardized_path)) { + m_symbol_map.remove(symbol->m_name, symbol); + } + m_file_symbol_index.erase(standardized_path); + } +} +} // namespace symbol_info diff --git a/goalc/compiler/symbol_info.h b/goalc/compiler/symbol_info.h new file mode 100644 index 0000000000..6469ef35d6 --- /dev/null +++ b/goalc/compiler/symbol_info.h @@ -0,0 +1,172 @@ +#pragma once + +#include +#include +#include + +#include "common/goos/Object.h" +#include "common/util/Assert.h" +#include "common/util/trie_with_duplicates.h" + +#include "goalc/compiler/Val.h" + +namespace symbol_info { + +// TODO - states +// TODO - enums +enum class Kind { + GLOBAL_VAR, + FWD_DECLARED_SYM, + FUNCTION, + TYPE, + CONSTANT, + MACRO, + LANGUAGE_BUILTIN, + METHOD, + INVALID +}; + +struct DefinitionLocation { + std::string file_path; + uint32_t line_idx; + uint32_t char_idx; + // TODO - store the extent of the symbol definition as well +}; + +struct ArgumentInfo { + std::string name; + // TODO - anything use this? + TypeSpec type_spec; + std::string type; + std::string description = ""; + // !var + bool is_mutated = false; + // ?var + bool is_optional = false; + // _var + bool is_unused = false; +}; + +struct FieldInfo { + std::string name; + // TODO - DefinitionLocation def_location; + std::string description = ""; + std::string type; + // ?? TODO + bool is_array = false; + // :dynamic + bool is_dynamic = false; + // :inline + bool is_inline = false; +}; + +struct TypeMethodInfo { + int id; // TODO - is this even relevant anymore? + std::string name; + // TODO - DefinitionLocation def_location; + bool is_override = false; +}; + +struct TypeStateInfo { + std::string name; + // TODO - DefinitionLocation def_location; + bool is_virtual = false; + std::optional id; // TODO - is this even relevant anymore? +}; + +/*! + * Info about a single symbol, representing one of: + * - Global variable + * - Global function + * - Type + * - Constant + * - Macro + * - Builtin keyword of the OpenGOAL language + */ +struct SymbolInfo { + Kind m_kind = Kind::INVALID; + std::string m_name; + goos::Object m_def_form; + std::optional m_def_location; + std::string m_docstring = ""; + std::string m_type = ""; + // Method or Function Related + std::vector m_args = {}; + std::string m_return_type = ""; + // Method Related + MethodInfo m_method_info; + bool m_method_builtin = false; + // Type Related + std::string m_parent_type = ""; + int m_type_size = -1; + // NOTE - removed method count...seems unnecessary? + std::vector m_type_fields = {}; + std::vector m_type_methods = {}; + std::vector m_type_states = {}; + // Macro Related + std::vector m_macro_args = {}; + std::vector>> m_macro_kwargs = {}; + std::optional m_variadic_arg = {}; + // TODO: need to track references for this, this is a TODO for LSP work + // bool is_unused = false; + + void update_args_from_docstring(); + void set_definition_location(const goos::TextDb* textdb); +}; + +/*! + * A map of symbol info. It internally stores the info in a prefix tree so you can quickly get + * a list of all symbols starting with a given prefix. + */ +class SymbolInfoMap { + goos::TextDb* m_textdb; + TrieWithDuplicates m_symbol_map; + // Indexes references to symbols by the file they are defined within + // This allows us to not only efficiently retrieve symbols by file, but also allows us to + // cleanup symbols when files are re-compiled. + std::unordered_map> m_file_symbol_index; + + void add_symbol_to_file_index(const std::string& file_path, SymbolInfo* symbol); + + public: + SymbolInfoMap(goos::TextDb* textdb) : m_textdb(textdb) {} + void add_global(const std::string& name, + const std::string& type, + const goos::Object& defining_form, + const std::string& docstring = ""); + void add_fwd_dec(const std::string& name, const goos::Object& defining_form); + void add_function(const std::string& name, + const std::string& return_type, + const std::vector& args, + const goos::Object& defining_form, + const std::string& docstring = ""); + void add_type(const std::string& name, + Type* type_info, + const goos::Object& defining_form, + const std::string& docstring = ""); + void add_constant(const std::string& name, + const goos::Object& defining_form, + const std::string& docstring = ""); + void add_macro(const std::string& name, + const goos::ArgumentSpec arg_spec, + const goos::Object& defining_form, + const std::string& docstring = ""); + void add_builtin(const std::string& name, const std::string& docstring = ""); + void add_method(const std::string& method_name, + const std::vector& args, + const MethodInfo& method_info, + const goos::Object& defining_form); + std::vector lookup_symbols_by_file(const std::string& file_path) const; + std::vector lookup_exact_name(const std::string& name) const; + std::vector lookup_symbols_starting_with(const std::string& prefix) const; + std::set lookup_names_starting_with(const std::string& prefix, + int max_count = -1) const; + std::vector get_all_symbols() const; + int symbol_count() const; + // Uses the per-file index to find and evict symbols globally + // This should be done before re-compiling a file, symbols will be re-added to the DB if they are + // found again + void evict_symbols_using_file_index(const std::string& file_path); +}; + +} // namespace symbol_info diff --git a/goalc/debugger/Debugger.cpp b/goalc/debugger/Debugger.cpp index ab4fb9832d..946a7773d4 100644 --- a/goalc/debugger/Debugger.cpp +++ b/goalc/debugger/Debugger.cpp @@ -165,7 +165,9 @@ std::string Debugger::get_info_about_addr(u32 addr) { if (map_loc.empty) { return "Unknown Address"; } - std::string result = fmt::format("Object: {}\n", map_loc.obj_name); + std::string result = fmt::format("Object: {} {} (0x{:x} to 0x{:x}) offset 0x{:x}\n", + map_loc.obj_name, map_loc.seg_id, map_loc.start_addr, + map_loc.end_addr, addr - map_loc.start_addr); u64 obj_offset = addr - map_loc.start_addr; FunctionDebugInfo* info = nullptr; std::string name; @@ -222,11 +224,6 @@ InstructionPointerInfo Debugger::get_rip_info(u64 rip) { return result; } -void print_and_append_to_string(std::string& str, const std::string& log) { - str += log; - lg::print("{}", log); -} - std::vector Debugger::get_backtrace(u64 rip, u64 rsp, std::optional dump_path) { @@ -236,14 +233,13 @@ std::vector Debugger::get_backtrace(u64 rip, lg::print("Backtrace:\n"); std::vector bt; - if (rip == m_debug_context.base) { + bool null_pc = rip == m_debug_context.base; + if (null_pc) { // we jumped to NULL. - print_and_append_to_string(backtrace_contents, - "Jumped to GOAL 0x0. Attempting to find previous function.\n"); + u64 next_rip = 0; if (!read_memory_if_safe(&next_rip, rsp - m_debug_context.base)) { - print_and_append_to_string(backtrace_contents, - " failed to read return address off of the stack\n"); + lg::print("Failed to read return address off of the stack!\n"); return {}; } @@ -253,10 +249,9 @@ std::vector Debugger::get_backtrace(u64 rip, int fails = 0; while (true) { - print_and_append_to_string( - backtrace_contents, - fmt::format(" rsp: 0x{:x} (#x{:x}) rip: 0x{:x} (#x{:x})\n", rsp, - rsp - m_debug_context.base, rip, rip - m_debug_context.base)); + std::string this_backtrace; + this_backtrace = fmt::format(" rsp: 0x{:x} (#x{:x}) rip: 0x{:x} (#x{:x})\n", rsp, + rsp - m_debug_context.base, rip, rip - m_debug_context.base); BacktraceFrame frame; frame.rip_info = get_rip_info(rip); frame.rsp_at_rip = rsp; @@ -264,19 +259,18 @@ std::vector Debugger::get_backtrace(u64 rip, if (frame.rip_info.knows_function && frame.rip_info.func_debug && frame.rip_info.func_debug->stack_usage) { fails = 0; - print_and_append_to_string(backtrace_contents, - "<====================== CALL STACK ======================>\n"); - print_and_append_to_string(backtrace_contents, - fmt::format("{} from {}\n", frame.rip_info.function_name, - frame.rip_info.func_debug->obj_name)); + this_backtrace += "<====================== CALL STACK ======================>\n"; + this_backtrace += fmt::format("{} from {}\n", frame.rip_info.function_name, + frame.rip_info.func_debug->obj_name); // we're good! auto disasm = disassemble_at_rip(frame.rip_info); - print_and_append_to_string(backtrace_contents, fmt::format("{}\n", disasm.text)); + this_backtrace += fmt::format("{}\n", disasm.text); u64 rsp_at_call = rsp + *frame.rip_info.func_debug->stack_usage; u64 next_rip = 0; if (!read_memory_if_safe(&next_rip, rsp_at_call - m_debug_context.base)) { - print_and_append_to_string(backtrace_contents, "Invalid return address encountered!\n"); + this_backtrace += "Invalid return address encountered!\n"; + backtrace_contents = this_backtrace + backtrace_contents; break; } @@ -286,7 +280,7 @@ std::vector Debugger::get_backtrace(u64 rip, } else { if (!frame.rip_info.knows_function) { if (fails == 0) { - print_and_append_to_string(backtrace_contents, "Unknown Function at rip\n"); + this_backtrace += "Unknown Function at rip\n"; } /* @@ -323,16 +317,17 @@ std::vector Debugger::get_backtrace(u64 rip, } } else*/ if (fails > 70) { - print_and_append_to_string( - backtrace_contents, + this_backtrace += "Backtrace was too long. Exception might have happened outside GOAL code, or the " - "stack frame is too long.\n"); + "stack frame is too long.\n"; + backtrace_contents = this_backtrace + backtrace_contents; break; } // attempt to backtrace anyway! if this fails then rip u64 next_rip = 0; if (!read_memory_if_safe(&next_rip, rsp - m_debug_context.base - 8)) { - print_and_append_to_string(backtrace_contents, "Invalid return address encountered!\n"); + this_backtrace += "Invalid return address encountered!\n"; + backtrace_contents = this_backtrace + backtrace_contents; break; } @@ -341,21 +336,24 @@ std::vector Debugger::get_backtrace(u64 rip, ++fails; // break; } else if (!frame.rip_info.func_debug) { - print_and_append_to_string( - backtrace_contents, - fmt::format("Function {} has no debug info.\n", frame.rip_info.function_name)); + this_backtrace += + fmt::format("Function {} has no debug info.\n", frame.rip_info.function_name); + backtrace_contents = this_backtrace + backtrace_contents; break; } else { - print_and_append_to_string( - backtrace_contents, - fmt::format("Function {} with no stack frame data.\n", frame.rip_info.function_name)); + this_backtrace += + fmt::format("Function {} with no stack frame data.\n", frame.rip_info.function_name); + backtrace_contents = this_backtrace + backtrace_contents; break; } } bt.push_back(frame); + + backtrace_contents = this_backtrace + backtrace_contents; } + lg::print("{}\n", backtrace_contents); if (dump_path) { file_util::write_text_file(dump_path.value(), backtrace_contents); } @@ -447,21 +445,21 @@ void Debugger::update_break_info(std::optional dump_path) { m_memory_map = m_listener->build_memory_map(); // lg::print("{}", m_memory_map.print()); read_symbol_table(); - m_regs_valid = false; - if (!xdbg::get_regs_now(m_debug_context.tid, &m_regs_at_break)) { - lg::print("[Debugger] get_regs_now failed after break, something is wrong\n"); - } else { - m_regs_valid = true; - lg::print("{}", m_regs_at_break.print_gprs()); - } + m_regs_valid = xdbg::get_regs_now(m_debug_context.tid, &m_regs_at_break); if (regs_valid()) { m_break_info = get_rip_info(m_regs_at_break.rip); update_continue_info(); + + get_backtrace(m_regs_at_break.rip, m_regs_at_break.gprs[emitter::RSP], dump_path); auto dis = disassemble_at_rip(m_break_info); lg::print("{}\n", dis.text); + } - get_backtrace(m_regs_at_break.rip, m_regs_at_break.gprs[emitter::RSP], dump_path); + if (!m_regs_valid) { + lg::print("[Debugger] get_regs_now failed after break, something is wrong\n"); + } else { + lg::print("{}", m_regs_at_break.print_gprs()); } } @@ -732,6 +730,93 @@ void Debugger::read_symbol_table_jak2() { m_symbol_name_to_offset_map.size(), timer.getMs()); } +void Debugger::read_symbol_table_jak3() { + using namespace jak3_symbols; + using namespace jak3; + ASSERT(is_valid() && is_attached() && is_halted()); + u32 bytes_read = 0; + u32 reads = 0; + Timer timer; + + constexpr int kS7Offset = ((GOAL_MAX_SYMBOLS / 2) * 4 + 1); + static_assert(kS7Offset == 0x8001); // this is what we have hardcoded now + u32 st_base = m_debug_context.s7 - kS7Offset; + u32 empty_pair_offset = + (m_debug_context.s7 + S7_OFF_FIX_SYM_EMPTY_PAIR /*- PAIR_OFFSET*/) - st_base; + + constexpr u32 kSymbolMemSize = 2 * (GOAL_MAX_SYMBOLS * 4); // symbol, then strings. + std::vector mem; + mem.resize(kSymbolMemSize); + + if (!xdbg::read_goal_memory(mem.data(), kSymbolMemSize, st_base, m_debug_context, + m_memory_handle)) { + lg::print("Read failed during read_symbol_table\n"); + return; + } + reads++; + bytes_read += kSymbolMemSize; + + m_symbol_name_to_offset_map.clear(); + m_symbol_offset_to_name_map.clear(); + m_symbol_name_to_value_map.clear(); + + // now loop through all the symbols + for (int i = 0; i < GOAL_MAX_SYMBOLS; i++) { + u32 offset = i * 4; + if (offset == empty_pair_offset) { + continue; + } + auto sym_val = *(u32*)(mem.data() + offset); + auto info = *(u32*)(mem.data() + offset + kSymbolMemSize / 2); + if (info) { + // now get the string. + char str_buff[128]; + if (!xdbg::read_goal_memory((u8*)str_buff, 128, info + 4, m_debug_context, m_memory_handle)) { + lg::print("Read symbol string failed during read_symbol_table\n"); + return; + } + reads++; + bytes_read += 128; + // just in case + str_buff[127] = '\0'; + + // GOAL sym - s7 + auto sym_offset = s32(offset + st_base) - s32(m_debug_context.s7); + // ASSERT(sym_offset >= -SYM_TABLE_MEM_SIZE / 4); + // ASSERT(sym_offset < SYM_TABLE_MEM_SIZE / 4); + + std::string str(str_buff); + if (str.length() >= 60) { + lg::print("Invalid symbol #x{:x}!\n", sym_offset); + continue; + } + + // update maps + if (m_symbol_name_to_offset_map.find(str) != m_symbol_name_to_offset_map.end()) { + if (str == "asize-of-basic-func") { + // this is an actual bug in kscheme. The bug has no effect, but we replicate it so that + // the symbol table layout is closer. + + // to hide this duplicate symbol, we append "-hack-copy" to the end of it. + str += "-hack-copy"; + } else { + lg::print("Symbol {} (#x{:x}) appears multiple times!\n", str, sym_offset); + continue; + // ASSERT(false); + } + } + + m_symbol_name_to_offset_map[str] = sym_offset; + m_symbol_offset_to_name_map[sym_offset] = str; + m_symbol_name_to_value_map[str] = sym_val; + } + } + + ASSERT(m_symbol_offset_to_name_map.size() == m_symbol_name_to_offset_map.size()); + lg::print("Read symbol table ({} bytes, {} reads, {} symbols, {:.2f} ms)\n", bytes_read, reads, + m_symbol_name_to_offset_map.size(), timer.getMs()); +} + /*! * Read the GOAL Symbol table from an attached and halted target. */ @@ -743,6 +828,9 @@ void Debugger::read_symbol_table() { case GameVersion::Jak2: read_symbol_table_jak2(); break; + case GameVersion::Jak3: + read_symbol_table_jak3(); + break; default: ASSERT(false); } diff --git a/goalc/debugger/Debugger.h b/goalc/debugger/Debugger.h index 49c6aa12d7..0915ef5c9f 100644 --- a/goalc/debugger/Debugger.h +++ b/goalc/debugger/Debugger.h @@ -91,6 +91,7 @@ class Debugger { void read_symbol_table(); void read_symbol_table_jak1(); void read_symbol_table_jak2(); + void read_symbol_table_jak3(); u32 get_symbol_address(const std::string& sym_name); bool get_symbol_value(const std::string& sym_name, u32* output); const char* get_symbol_name_from_offset(s32 ofs) const; diff --git a/lsp/CMakeLists.txt b/lsp/CMakeLists.txt index 114abcea1c..37d117b625 100644 --- a/lsp/CMakeLists.txt +++ b/lsp/CMakeLists.txt @@ -1,5 +1,14 @@ add_executable(lsp handlers/lsp_router.cpp + handlers/initialize.cpp + handlers/text_document/completion.cpp + handlers/text_document/document_color.cpp + handlers/text_document/document_symbol.cpp + handlers/text_document/document_synchronization.cpp + handlers/text_document/formatting.cpp + handlers/text_document/go_to.cpp + handlers/text_document/hover.cpp + handlers/text_document/type_hierarchy.cpp main.cpp protocol/common_types.cpp protocol/completion.cpp @@ -10,10 +19,12 @@ add_executable(lsp protocol/formatting.cpp protocol/hover.cpp protocol/progress_report.cpp + protocol/type_hierarchy.cpp state/data/mips_instruction.cpp state/lsp_requester.cpp state/workspace.cpp - transport/stdio.cpp) + transport/stdio.cpp + lsp_util.cpp) target_compile_definitions(lsp PRIVATE -DJSON_DIAGNOSTICS=1) diff --git a/lsp/protocol/initialize_result.h b/lsp/handlers/initialize.cpp similarity index 89% rename from lsp/protocol/initialize_result.h rename to lsp/handlers/initialize.cpp index 8199545cfe..ae95cd9f0a 100644 --- a/lsp/protocol/initialize_result.h +++ b/lsp/handlers/initialize.cpp @@ -1,19 +1,11 @@ -// TODO - convert this to a proper class +#include "initialize.h" -#include "third-party/json.hpp" - -using json = nlohmann::json; - -class InitializeResult { - public: - InitializeResult(){}; - json to_json() { return result; } - - private: +namespace lsp_handlers { +std::optional initialize(Workspace& workspace, int id, json params) { json text_document_sync{ {"openClose", true}, {"change", 1}, // Full sync - {"willSave", false}, + {"willSave", true}, {"willSaveWaitUntil", false}, {"save", {{"includeText", false}}}, }; @@ -55,6 +47,9 @@ class InitializeResult { {"renameProvider", false}, {"documentLinkProvider", document_link_provider}, {"executeCommandProvider", execute_command_provider}, + {"typeHierarchyProvider", true}, {"experimental", {}}, }}}; -}; + return result; +} +} // namespace lsp_handlers diff --git a/lsp/handlers/initialize.h b/lsp/handlers/initialize.h index 69ee45537a..8fc2289923 100644 --- a/lsp/handlers/initialize.h +++ b/lsp/handlers/initialize.h @@ -1,14 +1,10 @@ #pragma once #include "common/log/log.h" +#include "common/util/json_util.h" -#include "lsp/protocol/initialize_result.h" +#include "lsp/state/workspace.h" -#include "third-party/json.hpp" - -using json = nlohmann::json; - -std::optional initialize_handler(Workspace& /*workspace*/, int /*id*/, json /*params*/) { - InitializeResult result; - return result.to_json(); +namespace lsp_handlers { +std::optional initialize(Workspace& workspace, int id, json params); } diff --git a/lsp/handlers/lsp_router.cpp b/lsp/handlers/lsp_router.cpp index 7664e4c85b..8d744f6760 100644 --- a/lsp/handlers/lsp_router.cpp +++ b/lsp/handlers/lsp_router.cpp @@ -3,6 +3,7 @@ #include "common/log/log.h" #include "lsp/handlers/initialize.h" +#include "lsp/handlers/text_document/type_hierarchy.h" #include "lsp/protocol/error_codes.h" #include "text_document/completion.h" #include "text_document/document_color.h" @@ -14,6 +15,14 @@ #include "fmt/core.h" +json error_resp(ErrorCodes error_code, const std::string& error_message) { + json error{ + {"code", static_cast(error_code)}, + {"message", error_message}, + }; + return json{{"error", error}}; +} + LSPRoute::LSPRoute() : m_route_type(LSPRouteType::NOOP) {} LSPRoute::LSPRoute(std::function notification_handler) @@ -29,41 +38,43 @@ LSPRoute::LSPRoute(std::function(Workspace&, int, json)> req : m_route_type(LSPRouteType::REQUEST_RESPONSE), m_request_handler(request_handler) {} void LSPRouter::init_routes() { + m_routes["exit"] = LSPRoute([](Workspace& /*workspace*/, nlohmann::json /*params*/) { + lg::info("Shutting down LSP due to explicit request"); + exit(0); + }); m_routes["shutdown"] = LSPRoute( [](Workspace& /*workspace*/, int /*id*/, nlohmann::json /*params*/) -> std::optional { - lg::info("Shutting down LSP due to explicit request"); - exit(0); + lg::info("Received shutdown request"); + return error_resp(ErrorCodes::UnknownErrorCode, "Problem occurred while existing"); }); - m_routes["initialize"] = LSPRoute(initialize_handler); + m_routes["initialize"] = LSPRoute(lsp_handlers::initialize); m_routes["initialize"].m_generic_post_action = [](Workspace& workspace) { workspace.set_initialized(true); }; m_routes["initialized"] = LSPRoute(); - m_routes["textDocument/documentSymbol"] = LSPRoute(document_symbols_handler); - m_routes["textDocument/didOpen"] = LSPRoute(did_open_handler, did_open_push_diagnostics); - m_routes["textDocument/didChange"] = LSPRoute(did_change_handler, did_change_push_diagnostics); - m_routes["textDocument/didClose"] = LSPRoute(did_close_handler); - m_routes["textDocument/hover"] = LSPRoute(hover_handler); - m_routes["textDocument/definition"] = LSPRoute(go_to_definition_handler); - m_routes["textDocument/completion"] = LSPRoute(get_completions_handler); - m_routes["textDocument/documentColor"] = LSPRoute(document_color_handler); - m_routes["textDocument/formatting"] = LSPRoute(formatting_handler); + m_routes["textDocument/documentSymbol"] = LSPRoute(lsp_handlers::document_symbols); + m_routes["textDocument/didOpen"] = + LSPRoute(lsp_handlers::did_open, lsp_handlers::did_open_push_diagnostics); + m_routes["textDocument/didChange"] = + LSPRoute(lsp_handlers::did_change, lsp_handlers::did_change_push_diagnostics); + m_routes["textDocument/didClose"] = LSPRoute(lsp_handlers::did_close); + m_routes["textDocument/willSave"] = LSPRoute(lsp_handlers::will_save); + m_routes["textDocument/hover"] = LSPRoute(lsp_handlers::hover); + m_routes["textDocument/definition"] = LSPRoute(lsp_handlers::go_to_definition); + m_routes["textDocument/completion"] = LSPRoute(lsp_handlers::get_completions); + m_routes["textDocument/documentColor"] = LSPRoute(lsp_handlers::document_color); + m_routes["textDocument/formatting"] = LSPRoute(lsp_handlers::formatting); + m_routes["textDocument/prepareTypeHierarchy"] = LSPRoute(lsp_handlers::prepare_type_hierarchy); + m_routes["typeHierarchy/supertypes"] = LSPRoute(lsp_handlers::supertypes_type_hierarchy); + m_routes["typeHierarchy/subtypes"] = LSPRoute(lsp_handlers::subtypes_type_hierarchy); // TODO - m_routes["textDocument/signatureHelp"] = LSPRoute(get_completions_handler); - // Not Yet Supported Routes, noops + // Not Supported Routes, noops m_routes["$/cancelRequest"] = LSPRoute(); m_routes["textDocument/documentLink"] = LSPRoute(); m_routes["textDocument/codeLens"] = LSPRoute(); m_routes["textDocument/colorPresentation"] = LSPRoute(); } -json error_resp(ErrorCodes error_code, const std::string& error_message) { - json error{ - {"code", static_cast(error_code)}, - {"message", error_message}, - }; - return json{{"error", error}}; -} - std::string LSPRouter::make_response(const json& result) { json content = result; content["jsonrpc"] = "2.0"; diff --git a/lsp/handlers/text_document/completion.cpp b/lsp/handlers/text_document/completion.cpp new file mode 100644 index 0000000000..738d764ca6 --- /dev/null +++ b/lsp/handlers/text_document/completion.cpp @@ -0,0 +1,58 @@ +#include "completion.h" + +namespace lsp_handlers { + +std::unordered_map completion_item_kind_map = { + {symbol_info::Kind::CONSTANT, LSPSpec::CompletionItemKind::Constant}, + {symbol_info::Kind::FUNCTION, LSPSpec::CompletionItemKind::Function}, + {symbol_info::Kind::FWD_DECLARED_SYM, LSPSpec::CompletionItemKind::Reference}, + {symbol_info::Kind::GLOBAL_VAR, LSPSpec::CompletionItemKind::Variable}, + {symbol_info::Kind::INVALID, LSPSpec::CompletionItemKind::Text}, + {symbol_info::Kind::LANGUAGE_BUILTIN, LSPSpec::CompletionItemKind::Function}, + {symbol_info::Kind::MACRO, LSPSpec::CompletionItemKind::Operator}, + {symbol_info::Kind::METHOD, LSPSpec::CompletionItemKind::Method}, + {symbol_info::Kind::TYPE, LSPSpec::CompletionItemKind::Class}, +}; + +std::optional get_completions(Workspace& workspace, int /*id*/, json params) { + auto converted_params = params.get(); + const auto file_type = workspace.determine_filetype_from_uri(converted_params.textDocument.m_uri); + + if (file_type != Workspace::FileType::OpenGOAL) { + return nullptr; + } + auto maybe_tracked_file = workspace.get_tracked_og_file(converted_params.textDocument.m_uri); + if (!maybe_tracked_file) { + return nullptr; + } + std::vector items; + const auto& tracked_file = maybe_tracked_file.value().get(); + // The cursor position in the context of completions is always 1 character ahead of the text, we + // move it back 1 spot so we can actually detect what the user has typed so far + LSPSpec::Position new_position = converted_params.position; + if (new_position.m_character > 0) { + new_position.m_character--; + } + const auto symbol = tracked_file.get_symbol_at_position(new_position); + if (!symbol) { + lg::debug("get_completions - no symbol to work from"); + } else { + const auto matching_symbols = + workspace.get_symbols_starting_with(tracked_file.m_game_version, symbol.value()); + lg::debug("get_completions - found {} symbols", matching_symbols.size()); + + for (const auto& symbol : matching_symbols) { + LSPSpec::CompletionItem item; + item.label = symbol->m_name; + item.kind = completion_item_kind_map.at(symbol->m_kind); + // TODO - flesh out this more fully when auto-complete with non-globals works as well + items.push_back(item); + } + } + LSPSpec::CompletionList list_result; + list_result.isIncomplete = false; // we want further typing to re-evaluate the list + list_result.items = items; + return list_result; +} + +} // namespace lsp_handlers diff --git a/lsp/handlers/text_document/completion.h b/lsp/handlers/text_document/completion.h index e75767d166..3c9bbc028a 100644 --- a/lsp/handlers/text_document/completion.h +++ b/lsp/handlers/text_document/completion.h @@ -2,17 +2,13 @@ #include +#include "common/util/json_util.h" + #include "lsp/protocol/common_types.h" #include "lsp/protocol/completion.h" #include "lsp/state/data/mips_instructions.h" #include "lsp/state/workspace.h" -std::optional get_completions_handler(Workspace& /*workspace*/, int /*id*/, json params) { - auto converted_params = params.get(); - - // TODO - these need to be cached, - - // TODO - implement response object - - return json::array(); +namespace lsp_handlers { +std::optional get_completions(Workspace& workspace, int id, json params); } diff --git a/lsp/handlers/text_document/document_color.cpp b/lsp/handlers/text_document/document_color.cpp new file mode 100644 index 0000000000..5b10a9d9d6 --- /dev/null +++ b/lsp/handlers/text_document/document_color.cpp @@ -0,0 +1,157 @@ +#include "lsp/protocol/document_color.h" + +#include + +#include "lsp/protocol/common_types.h" +#include "lsp/state/workspace.h" + +int hex_to_dec(const std::string& hex) { + std::string cleaned_string = hex; + if (cleaned_string.starts_with("#x")) { + cleaned_string = cleaned_string.substr(2); + } + return std::stoi(cleaned_string, nullptr, 16); +} + +std::unordered_map>> + game_font_colors = {{GameVersion::Jak1, + { + {0, {223.0, 239.0, 223.0, 255.0}}, {1, {255.0, 255.0, 255.0, 255.0}}, + {2, {255.0, 255.0, 255.0, 127.0}}, {3, {255.0, 191.0, 63.0, 255.0}}, + {4, {255.0, 199.0, 0.0, 255.0}}, {5, {255.0, 255.0, 0.0, 255.0}}, + {6, {63.0, 255.0, 63.0, 255.0}}, {7, {127.0, 127.0, 255.0, 255.0}}, + {8, {-1.0, 255.0, 255.0, 255.0}}, {9, {255.0, 127.0, 255.0, 255.0}}, + {10, {191.0, 255.0, 255.0, 255.0}}, {11, {127.0, 191.0, 191.0, 255.0}}, + {12, {255.0, 255.0, 255.0, 255.0}}, {13, {159.0, 159.0, 159.0, 255.0}}, + {14, {255.0, 167.0, 0.0, 255.0}}, {15, {223.0, 255.0, 95.0, 255.0}}, + {16, {143.0, 175.0, 15.0, 255.0}}, {17, {175.0, 191.0, 175.0, 255.0}}, + {18, {127.0, 143.0, 127.0, 255.0}}, {19, {95.0, 63.0, 95.0, 255.0}}, + {20, {255.0, 241.0, 143.0, 255.0}}, {21, {63.0, 187.0, 239.0, 255.0}}, + {22, {57.0, 57.0, 57.0, 255.0}}, {23, {127.0, 127.0, 127.0, 255.0}}, + {24, {243.0, 153.0, 201.0, 255.0}}, {25, {243.0, 103.0, 103.0, 255.0}}, + {26, {31.0, 201.0, 151.0, 255.0}}, {27, {139.0, 147.0, 239.0, 255.0}}, + {28, {173.0, 251.0, 255.0, 255.0}}, {29, {253.0, 245.0, 101.0, 255.0}}, + {30, {241.0, 241.0, 3.0, 255.0}}, {31, {141.0, 207.0, 243.0, 255.0}}, + {32, {223.0, 239.0, 223.0, 255.0}}, {33, {191.0, -1.0, 0.0, 255.0}}, + {34, {255.0, 191.0, 63.0, 255.0}}, + }}, + {GameVersion::Jak2, + { + {0, {223.0, 239.0, 223.0, 255.0}}, {1, {255.0, 255.0, 255.0, 255.0}}, + {2, {255.0, 255.0, 255.0, 127.0}}, {3, {255.0, 63.0, 0.0, 255.0}}, + {4, {255.0, 199.0, 0.0, 255.0}}, {5, {255.0, 255.0, 0.0, 255.0}}, + {6, {63.0, 255.0, 63.0, 255.0}}, {7, {0.0, 63.0, 255.0, 255.0}}, + {8, {0.0, 255.0, 255.0, 255.0}}, {9, {255.0, 127.0, 255.0, 255.0}}, + {10, {191.0, 255.0, 255.0, 255.0}}, {11, {127.0, 191.0, 191.0, 255.0}}, + {12, {255.0, 255.0, 255.0, 255.0}}, {13, {159.0, 159.0, 159.0, 255.0}}, + {14, {255.0, 167.0, 0.0, 255.0}}, {15, {223.0, 255.0, 95.0, 255.0}}, + {16, {143.0, 175.0, 31.0, 255.0}}, {17, {175.0, 191.0, 175.0, 255.0}}, + {18, {127.0, 143.0, 127.0, 255.0}}, {19, {95.0, 63.0, 95.0, 255.0}}, + {20, {255.0, 241.0, 143.0, 255.0}}, {21, {63.0, 187.0, 239.0, 255.0}}, + {22, {57.0, 57.0, 57.0, 255.0}}, {23, {127.0, 127.0, 127.0, 255.0}}, + {24, {243.0, 153.0, 201.0, 255.0}}, {25, {243.0, 103.0, 103.0, 255.0}}, + {26, {31.0, 201.0, 151.0, 255.0}}, {27, {139.0, 147.0, 239.0, 255.0}}, + {28, {173.0, 251.0, 255.0, 255.0}}, {29, {253.0, 245.0, 101.0, 255.0}}, + {30, {241.0, 241.0, 3.0, 255.0}}, {31, {141.0, 207.0, 243.0, 255.0}}, + {32, {127.0, 255.0, 255.0, 255.0}}, {33, {127.0, 255.0, 255.0, 255.0}}, + {34, {255.0, 255.0, 255.0, 255.0}}, {35, {63.0, 127.0, 127.0, 191.0}}, + {36, {223.0, 239.0, 223.0, 255.0}}, {37, {191.0, 0.0, 0.0, 255.0}}, + {38, {255.0, 191.0, 63.0, 255.0}}, {39, {0.0, 0.0, 1.0, 255.0}}, + }}}; + +namespace lsp_handlers { + +std::optional document_color(Workspace& workspace, int /*id*/, json raw_params) { + auto params = raw_params.get(); + auto file_type = workspace.determine_filetype_from_uri(params.textDocument.m_uri); + const auto game_version = workspace.determine_game_version_from_uri(params.textDocument.m_uri); + + json colors = json::array(); + + if (!game_version || file_type != Workspace::FileType::OpenGOAL) { + return colors; + } + + auto maybe_tracked_file = workspace.get_tracked_og_file(params.textDocument.m_uri); + if (!maybe_tracked_file) { + return colors; + } + const auto& tracked_file = maybe_tracked_file.value().get(); + + // Search for `(new 'static 'rgba....` forms as these can be colored + // for example - `(new 'static 'rgba :r #x70 :g #x78 :b #x70 :a #x80)` + const auto rgba_results = + tracked_file.search_for_forms_that_begin_with({"(", "new", "'static", "'rgba"}); + for (const auto& result : rgba_results) { + // Iterate the forms and find the color and alpha info + float red = 0.0f; + float green = 0.0f; + float blue = 0.0f; + float alpha = 0.0f; + int token_idx = 0; + while (token_idx < result.tokens.size()) { + const auto& token = result.tokens[token_idx]; + // in OpenGOAL -- 255 is equal to 128, so we double every value and subtract 1 + if (token == ":r" && result.tokens.size() > token_idx + 1) { + red = static_cast((hex_to_dec(result.tokens[token_idx + 1]) * 2) - 1) / 255.0f; + } else if (token == ":g" && result.tokens.size() > token_idx + 1) { + green = static_cast((hex_to_dec(result.tokens[token_idx + 1]) * 2) - 1) / 255.0f; + } else if (token == ":b" && result.tokens.size() > token_idx + 1) { + blue = static_cast((hex_to_dec(result.tokens[token_idx + 1]) * 2) - 1) / 255.0f; + } else if (token == ":a" && result.tokens.size() > token_idx + 1) { + alpha = static_cast((hex_to_dec(result.tokens[token_idx + 1]) * 2) - 1) / 255.0f; + } + token_idx++; + } + LSPSpec::ColorInformation color_info; + color_info.range = {{(uint32_t)result.start_point.first, (uint32_t)result.start_point.second}, + {(uint32_t)result.end_point.first, (uint32_t)result.end_point.second}}; + color_info.color = LSPSpec::Color{red, green, blue, alpha}; + colors.push_back(color_info); + } + // Also search for the `(static-rgba ...` macro + const auto static_rgba_results = + tracked_file.search_for_forms_that_begin_with({"(", "static-rgba"}); + for (const auto& result : static_rgba_results) { + float red = static_cast((hex_to_dec(result.tokens[2]) * 2) - 1) / 255.0f; + float green = static_cast((hex_to_dec(result.tokens[3]) * 2) - 1) / 255.0f; + float blue = static_cast((hex_to_dec(result.tokens[4]) * 2) - 1) / 255.0f; + float alpha = static_cast((hex_to_dec(result.tokens[5]) * 2) - 1) / 255.0f; + LSPSpec::ColorInformation color_info; + color_info.range = {{(uint32_t)result.start_point.first, (uint32_t)result.start_point.second}, + {(uint32_t)result.end_point.first, (uint32_t)result.end_point.second}}; + color_info.color = LSPSpec::Color{red, green, blue, alpha}; + colors.push_back(color_info); + } + + // Search for `(font-color ...` forms + const auto font_color_results = + tracked_file.search_for_forms_that_begin_with({"(", "font-color"}); + const auto font_color_enum_entries = + workspace.get_enum_entries("font-color", game_version.value()); + if (!font_color_enum_entries.empty() && + game_font_colors.find(game_version.value()) != game_font_colors.end()) { + for (const auto& result : font_color_results) { + const auto font_color = result.tokens[2]; + if (font_color_enum_entries.find(font_color) != font_color_enum_entries.end()) { + const auto font_color_val = font_color_enum_entries.at(font_color); + if (game_font_colors[game_version.value()].find(font_color_val) != + game_font_colors[game_version.value()].end()) { + const auto& [red, green, blue, alpha] = + game_font_colors[game_version.value()].at(font_color_val); + LSPSpec::ColorInformation color_info; + color_info.range = { + {(uint32_t)result.start_point.first, (uint32_t)result.start_point.second}, + {(uint32_t)result.end_point.first, (uint32_t)result.end_point.second}}; + color_info.color = + LSPSpec::Color{red / 255.0f, green / 255.0f, blue / 255.0f, alpha / 255.0f}; + colors.push_back(color_info); + } + } + } + } + + return colors; +} + +} // namespace lsp_handlers diff --git a/lsp/handlers/text_document/document_color.h b/lsp/handlers/text_document/document_color.h index df4e5fbcf7..c476712275 100644 --- a/lsp/handlers/text_document/document_color.h +++ b/lsp/handlers/text_document/document_color.h @@ -2,76 +2,14 @@ #include -#include "common/util/string_util.h" +#include "common/util/json_util.h" #include "lsp/protocol/common_types.h" #include "lsp/protocol/document_color.h" +#include "lsp/state/workspace.h" -float hexToFloat(const std::string& hex) { - int value = std::stoi(hex, nullptr, 16); - return static_cast(value) / 255.0f; -} +namespace lsp_handlers { -std::optional color_hexstring_to_lsp_color(const std::string& color_name) { - if (!str_util::contains(color_name, "#")) { - return {}; - } - const auto color_tokens = str_util::split(color_name, '#'); - const auto hexstring = color_tokens.at(1); - std::string red_hex = hexstring.substr(0, 2); - std::string green_hex = hexstring.substr(2, 2); - std::string blue_hex = hexstring.substr(4, 2); +std::optional document_color(Workspace& workspace, int id, json raw_params); - float red = hexToFloat(red_hex); - float green = hexToFloat(green_hex); - float blue = hexToFloat(blue_hex); - - return LSPSpec::Color{red, green, blue, 1.0}; -} - -std::optional document_color_handler(Workspace& /*workspace*/, int /*id*/, json raw_params) { - auto params = raw_params.get(); - json colors = json::array(); - - // TODO - hex strings aren't desirable in the `font-color` enum - // this could be used for the `new 'static 'rgba` instances but that requires proper - // AST support as it cannot (and should not) be assumed that all 4 components will be on the same - // line - return colors; - - //// Iterate through document, mark text colors ourselves - // auto file_type = workspace.determine_filetype_from_uri(params.textDocument.m_uri); - - // if (file_type == Workspace::FileType::OpenGOAL) { - // auto tracked_file = workspace.get_tracked_og_file(params.textDocument.m_uri); - // if (!tracked_file) { - // return {}; - // } - - // // This is something that is ok to be a regex, because it's very niche - // for (int i = 0; i < tracked_file->m_lines.size(); i++) { - // const auto& line = tracked_file->m_lines.at(i); - // std::smatch matches; - // std::regex regex("\\(font-color ([^)]*)\\)"); - - // std::sregex_iterator iter(line.begin(), line.end(), regex); - // std::sregex_iterator end; - - // for (; iter != end; iter++) { - // std::smatch match = *iter; - // std::string capture_group = match.str(1); - // LSPSpec::ColorInformation color_info; - // color_info.range = {{i, match.position(1)}, {i, match.position(1) + match.size()}}; - // const auto color = color_hexstring_to_lsp_color(capture_group); - // if (!color) { - // continue; - // } - // color_info.color = color.value(); - // colors.push_back(color_info); - // lg::debug("color - {}", capture_group); - // } - // } - //} - - // return colors; -} +} // namespace lsp_handlers diff --git a/lsp/handlers/text_document/document_symbol.cpp b/lsp/handlers/text_document/document_symbol.cpp new file mode 100644 index 0000000000..ddde0acef9 --- /dev/null +++ b/lsp/handlers/text_document/document_symbol.cpp @@ -0,0 +1,53 @@ +#include "document_symbol.h" + +#include "third-party/json.hpp" + +using json = nlohmann::json; + +std::optional ir_symbols(Workspace& workspace, LSPSpec::DocumentSymbolParams params) { + json symbols = json::array(); + auto maybe_tracked_file = workspace.get_tracked_ir_file(params.m_textDocument.m_uri); + if (!maybe_tracked_file) { + return symbols; + } + + const auto& tracked_file = maybe_tracked_file.value().get(); + for (const auto& symbol : tracked_file.m_symbols) { + symbols.push_back(symbol); + } + + return symbols; +} + +std::optional og_symbols(Workspace& workspace, LSPSpec::DocumentSymbolParams params) { + json symbols = json::array(); + auto maybe_tracked_file = workspace.get_tracked_og_file(params.m_textDocument.m_uri); + if (!maybe_tracked_file) { + return symbols; + } + + const auto& tracked_file = maybe_tracked_file.value().get(); + for (const auto& symbol : tracked_file.m_symbols) { + symbols.push_back(symbol); + } + + return symbols; +} + +namespace lsp_handlers { + +std::optional document_symbols(Workspace& workspace, int /*id*/, json params) { + auto converted_params = params.get(); + const auto file_type = + workspace.determine_filetype_from_uri(converted_params.m_textDocument.m_uri); + + if (file_type == Workspace::FileType::OpenGOALIR) { + return ir_symbols(workspace, converted_params); + } else if (file_type == Workspace::FileType::OpenGOAL) { + return og_symbols(workspace, converted_params); + } + + return json::array(); +} + +} // namespace lsp_handlers diff --git a/lsp/handlers/text_document/document_symbol.h b/lsp/handlers/text_document/document_symbol.h index 66d8159f07..0b4d48f8c1 100644 --- a/lsp/handlers/text_document/document_symbol.h +++ b/lsp/handlers/text_document/document_symbol.h @@ -2,26 +2,13 @@ #include +#include "common/util/json_util.h" + #include "lsp/protocol/common_types.h" #include "lsp/state/workspace.h" -#include "third-party/json.hpp" - -using json = nlohmann::json; - -std::optional document_symbols_handler(Workspace& workspace, int /*id*/, json params) { - auto converted_params = params.get(); - auto tracked_file = workspace.get_tracked_ir_file(converted_params.m_textDocument.m_uri); - - if (!tracked_file) { - return {}; - } +namespace lsp_handlers { - // TODO - convert to type! +std::optional document_symbols(Workspace& workspace, int id, json params); - json arr = json::array(); - for (const auto& symbol : tracked_file.value().m_symbols) { - arr.push_back(symbol); - } - return arr; -} +} // namespace lsp_handlers diff --git a/lsp/handlers/text_document/document_synchronization.cpp b/lsp/handlers/text_document/document_synchronization.cpp new file mode 100644 index 0000000000..d71c725256 --- /dev/null +++ b/lsp/handlers/text_document/document_synchronization.cpp @@ -0,0 +1,77 @@ +#include "document_synchronization.h" + +namespace lsp_handlers { + +void did_open(Workspace& workspace, json raw_params) { + auto params = raw_params.get(); + workspace.start_tracking_file(params.m_textDocument.m_uri, params.m_textDocument.m_languageId, + params.m_textDocument.m_text); +} + +void did_change(Workspace& workspace, json raw_params) { + auto params = raw_params.get(); + for (const auto& change : params.m_contentChanges) { + workspace.update_tracked_file(params.m_textDocument.m_uri, change.m_text); + } +} + +void did_close(Workspace& workspace, json raw_params) { + auto params = raw_params.get(); + workspace.stop_tracking_file(params.m_textDocument.m_uri); +} + +void will_save(Workspace& workspace, json raw_params) { + auto params = raw_params.get(); + workspace.tracked_file_will_save(params.textDocument.m_uri); +} + +std::optional did_open_push_diagnostics(Workspace& workspace, json raw_params) { + auto params = raw_params.get(); + const auto file_type = + workspace.determine_filetype_from_languageid(params.m_textDocument.m_languageId); + + LSPSpec::PublishDiagnosticParams publish_params; + publish_params.m_uri = params.m_textDocument.m_uri; + publish_params.m_version = params.m_textDocument.m_version; + + if (file_type == Workspace::FileType::OpenGOALIR) { + auto maybe_tracked_file = workspace.get_tracked_ir_file(params.m_textDocument.m_uri); + if (!maybe_tracked_file) { + return {}; + } + const auto& tracked_file = maybe_tracked_file.value().get(); + publish_params.m_diagnostics = tracked_file.m_diagnostics; + } + + json response; + response["method"] = "textDocument/publishDiagnostics"; + response["params"] = publish_params; + + return response; +} + +std::optional did_change_push_diagnostics(Workspace& workspace, json raw_params) { + auto params = raw_params.get(); + const auto file_type = workspace.determine_filetype_from_uri(params.m_textDocument.m_uri); + + LSPSpec::PublishDiagnosticParams publish_params; + publish_params.m_uri = params.m_textDocument.m_uri; + publish_params.m_version = params.m_textDocument.m_version; + + if (file_type == Workspace::FileType::OpenGOALIR) { + auto maybe_tracked_file = workspace.get_tracked_ir_file(params.m_textDocument.m_uri); + if (!maybe_tracked_file) { + return {}; + } + const auto& tracked_file = maybe_tracked_file.value().get(); + publish_params.m_diagnostics = tracked_file.m_diagnostics; + } + + json response; + response["method"] = "textDocument/publishDiagnostics"; + response["params"] = publish_params; + + return response; +} + +} // namespace lsp_handlers diff --git a/lsp/handlers/text_document/document_synchronization.h b/lsp/handlers/text_document/document_synchronization.h index 579bbde5be..069660b735 100644 --- a/lsp/handlers/text_document/document_synchronization.h +++ b/lsp/handlers/text_document/document_synchronization.h @@ -2,76 +2,20 @@ #include +#include "common/util/json_util.h" + #include "lsp/protocol/document_diagnostics.h" #include "lsp/protocol/document_synchronization.h" #include "lsp/state/workspace.h" -#include "third-party/json.hpp" - -using json = nlohmann::json; - -void did_open_handler(Workspace& workspace, json raw_params) { - auto params = raw_params.get(); - workspace.start_tracking_file(params.m_textDocument.m_uri, params.m_textDocument.m_languageId, - params.m_textDocument.m_text); -} - -void did_change_handler(Workspace& workspace, json raw_params) { - auto params = raw_params.get(); - for (const auto& change : params.m_contentChanges) { - workspace.update_tracked_file(params.m_textDocument.m_uri, change.m_text); - } -} - -void did_close_handler(Workspace& workspace, json raw_params) { - auto params = raw_params.get(); - workspace.stop_tracking_file(params.m_textDocument.m_uri); -} - -std::optional did_open_push_diagnostics(Workspace& workspace, json raw_params) { - auto params = raw_params.get(); - const auto file_type = - workspace.determine_filetype_from_languageid(params.m_textDocument.m_languageId); - - LSPSpec::PublishDiagnosticParams publish_params; - publish_params.m_uri = params.m_textDocument.m_uri; - publish_params.m_version = params.m_textDocument.m_version; - - if (file_type == Workspace::FileType::OpenGOALIR) { - auto tracked_file = workspace.get_tracked_ir_file(params.m_textDocument.m_uri); - if (!tracked_file) { - return {}; - } - publish_params.m_diagnostics = tracked_file.value().m_diagnostics; - } - - json response; - response["method"] = "textDocument/publishDiagnostics"; - response["params"] = publish_params; - - return response; -} - -std::optional did_change_push_diagnostics(Workspace& workspace, json raw_params) { - auto params = raw_params.get(); - const auto file_type = workspace.determine_filetype_from_uri(params.m_textDocument.m_uri); - - LSPSpec::PublishDiagnosticParams publish_params; - publish_params.m_uri = params.m_textDocument.m_uri; - publish_params.m_version = params.m_textDocument.m_version; - - if (file_type == Workspace::FileType::OpenGOALIR) { - auto tracked_file = workspace.get_tracked_ir_file(params.m_textDocument.m_uri); +namespace lsp_handlers { - if (!tracked_file) { - return {}; - } - publish_params.m_diagnostics = tracked_file.value().m_diagnostics; - } +void did_open(Workspace& workspace, json raw_params); +void did_change(Workspace& workspace, json raw_params); +void did_close(Workspace& workspace, json raw_params); +void will_save(Workspace& workspace, json raw_params); - json response; - response["method"] = "textDocument/publishDiagnostics"; - response["params"] = publish_params; +std::optional did_open_push_diagnostics(Workspace& workspace, json raw_params); +std::optional did_change_push_diagnostics(Workspace& workspace, json raw_params); - return response; -} +} // namespace lsp_handlers diff --git a/lsp/handlers/text_document/formatting.cpp b/lsp/handlers/text_document/formatting.cpp new file mode 100644 index 0000000000..e0291a00bc --- /dev/null +++ b/lsp/handlers/text_document/formatting.cpp @@ -0,0 +1,38 @@ +#include "formatting.h" + +#include "common/formatter/formatter.h" + +#include "lsp/protocol/common_types.h" +#include "lsp/protocol/formatting.h" +#include "lsp/state/data/mips_instructions.h" +#include "lsp/state/workspace.h" + +namespace lsp_handlers { +std::optional formatting(Workspace& workspace, int id, json raw_params) { + auto params = raw_params.get(); + const auto file_type = workspace.determine_filetype_from_uri(params.textDocument.m_uri); + + if (file_type == Workspace::FileType::OpenGOALIR) { + return nullptr; + } else if (file_type == Workspace::FileType::OpenGOAL) { + auto maybe_tracked_file = workspace.get_tracked_og_file(params.textDocument.m_uri); + if (!maybe_tracked_file) { + return {}; + } + const auto& tracked_file = maybe_tracked_file.value().get(); + const auto result = formatter::format_code(tracked_file.m_content); + if (!result) { + return nullptr; + } + json edits = json::array(); + auto format_edit = LSPSpec::TextEdit(); + format_edit.range = {{0, 0}, {(uint32_t)tracked_file.m_line_count, 0}}; + format_edit.newText = result.value(); + edits.push_back(format_edit); + return edits; + } + + return nullptr; +} + +} // namespace lsp_handlers diff --git a/lsp/handlers/text_document/formatting.h b/lsp/handlers/text_document/formatting.h index 27dc6568e5..0abd82526f 100644 --- a/lsp/handlers/text_document/formatting.h +++ b/lsp/handlers/text_document/formatting.h @@ -2,36 +2,12 @@ #include -#include "common/formatter/formatter.h" +#include "common/util/json_util.h" -#include "lsp/protocol/common_types.h" -#include "lsp/protocol/formatting.h" -#include "lsp/state/data/mips_instructions.h" #include "lsp/state/workspace.h" -std::optional formatting_handler(Workspace& workspace, int /*id*/, json raw_params) { - auto params = raw_params.get(); - const auto file_type = workspace.determine_filetype_from_uri(params.textDocument.m_uri); +namespace lsp_handlers { - if (file_type == Workspace::FileType::OpenGOALIR) { - return nullptr; - } else if (file_type == Workspace::FileType::OpenGOAL) { - auto tracked_file = workspace.get_tracked_og_file(params.textDocument.m_uri); - if (!tracked_file) { - return nullptr; - } - // TODO move away from holding the content directly - const auto result = formatter::format_code(tracked_file->m_content); - if (!result) { - return nullptr; - } - json edits = json::array(); - auto format_edit = LSPSpec::TextEdit(); - format_edit.range = {{0, 0}, {(uint32_t)tracked_file->m_lines.size(), 0}}; - format_edit.newText = result.value(); - edits.push_back(format_edit); - return edits; - } +std::optional formatting(Workspace& workspace, int id, json raw_params); - return nullptr; -} +} // namespace lsp_handlers diff --git a/lsp/handlers/text_document/go_to.cpp b/lsp/handlers/text_document/go_to.cpp new file mode 100644 index 0000000000..151f493b3f --- /dev/null +++ b/lsp/handlers/text_document/go_to.cpp @@ -0,0 +1,61 @@ +#include "go_to.h" + +namespace lsp_handlers { +std::optional go_to_definition(Workspace& workspace, int /*id*/, json raw_params) { + auto params = raw_params.get(); + const auto file_type = workspace.determine_filetype_from_uri(params.m_textDocument.m_uri); + + json locations = json::array(); + + if (file_type == Workspace::FileType::OpenGOALIR) { + auto maybe_tracked_file = workspace.get_tracked_ir_file(params.m_textDocument.m_uri); + if (!maybe_tracked_file) { + return {}; + } + const auto& tracked_file = maybe_tracked_file.value().get(); + auto symbol_name = tracked_file.get_symbol_at_position(params.m_position); + if (!symbol_name) { + return {}; + } + auto symbol_info = workspace.get_definition_info_from_all_types(symbol_name.value(), + tracked_file.m_all_types_uri); + if (!symbol_info) { + return {}; + } + LSPSpec::Location location; + location.m_uri = tracked_file.m_all_types_uri; + location.m_range.m_start = {(uint32_t)symbol_info.value().definition_info->line_idx_to_display, + (uint32_t)symbol_info.value().definition_info->pos_in_line}; + location.m_range.m_end = {(uint32_t)symbol_info.value().definition_info->line_idx_to_display, + (uint32_t)symbol_info.value().definition_info->pos_in_line}; + locations.push_back(location); + } else if (file_type == Workspace::FileType::OpenGOAL) { + auto maybe_tracked_file = workspace.get_tracked_og_file(params.m_textDocument.m_uri); + if (!maybe_tracked_file) { + return {}; + } + const auto& tracked_file = maybe_tracked_file.value().get(); + const auto symbol = tracked_file.get_symbol_at_position(params.m_position); + if (!symbol) { + return {}; + } + const auto& symbol_info = workspace.get_global_symbol_info(tracked_file, symbol.value()); + if (!symbol_info) { + return {}; + } + + const auto& def_loc = workspace.get_symbol_def_location(tracked_file, symbol_info.value()); + if (!def_loc) { + return {}; + } + + LSPSpec::Location location; + location.m_uri = def_loc->file_path; + location.m_range.m_start = {(uint32_t)def_loc->line_idx, (uint32_t)def_loc->char_idx}; + location.m_range.m_end = {(uint32_t)def_loc->line_idx, (uint32_t)def_loc->char_idx}; + locations.push_back(location); + } + + return locations; +} +} // namespace lsp_handlers diff --git a/lsp/handlers/text_document/go_to.h b/lsp/handlers/text_document/go_to.h index ba78a47314..acc145c5ef 100644 --- a/lsp/handlers/text_document/go_to.h +++ b/lsp/handlers/text_document/go_to.h @@ -2,65 +2,11 @@ #include +#include "common/util/json_util.h" + #include "lsp/protocol/common_types.h" -#include "lsp/protocol/hover.h" -#include "lsp/state/data/mips_instructions.h" #include "lsp/state/workspace.h" -std::optional go_to_definition_handler(Workspace& workspace, int /*id*/, json raw_params) { - auto params = raw_params.get(); - const auto file_type = workspace.determine_filetype_from_uri(params.m_textDocument.m_uri); - - json locations = json::array(); - - if (file_type == Workspace::FileType::OpenGOALIR) { - auto tracked_file = workspace.get_tracked_ir_file(params.m_textDocument.m_uri); - if (!tracked_file) { - return {}; - } - auto symbol_name = tracked_file->get_symbol_at_position(params.m_position); - if (!symbol_name) { - return {}; - } - auto symbol_info = workspace.get_definition_info_from_all_types(symbol_name.value(), - tracked_file->m_all_types_uri); - if (!symbol_info) { - return {}; - } - LSPSpec::Location location; - location.m_uri = tracked_file->m_all_types_uri; - location.m_range.m_start = {(uint32_t)symbol_info.value().definition_info->line_idx_to_display, - (uint32_t)symbol_info.value().definition_info->pos_in_line}; - location.m_range.m_end = {(uint32_t)symbol_info.value().definition_info->line_idx_to_display, - (uint32_t)symbol_info.value().definition_info->pos_in_line}; - locations.push_back(location); - } else if (file_type == Workspace::FileType::OpenGOAL) { - auto tracked_file = workspace.get_tracked_og_file(params.m_textDocument.m_uri); - if (!tracked_file) { - return {}; - } - const auto symbol = tracked_file->get_symbol_at_position(params.m_position); - if (!symbol) { - return {}; - } - const auto& symbol_info = - workspace.get_global_symbol_info(tracked_file.value(), symbol.value()); - if (!symbol_info) { - return {}; - } - - const auto& def_loc = - workspace.get_symbol_def_location(tracked_file.value(), symbol_info.value()); - if (!def_loc) { - return {}; - } - - LSPSpec::Location location; - location.m_uri = def_loc->filename; - location.m_range.m_start = {(uint32_t)def_loc->line_idx, (uint32_t)def_loc->char_idx}; - location.m_range.m_end = {(uint32_t)def_loc->line_idx, (uint32_t)def_loc->char_idx}; - locations.push_back(location); - } - - return locations; +namespace lsp_handlers { +std::optional go_to_definition(Workspace& workspace, int id, json raw_params); } diff --git a/lsp/handlers/text_document/hover.cpp b/lsp/handlers/text_document/hover.cpp new file mode 100644 index 0000000000..ad825f5b53 --- /dev/null +++ b/lsp/handlers/text_document/hover.cpp @@ -0,0 +1,269 @@ +#include "hover.h" + +bool is_number(const std::string& s) { + return !s.empty() && std::find_if(s.begin(), s.end(), + [](unsigned char c) { return !std::isdigit(c); }) == s.end(); +} + +std::vector og_method_names = {"new", "delete", "print", "inspect", "length", + "asize-of", "copy", "relocate", "mem-usage"}; + +std::optional hover_handler_ir(Workspace& workspace, + const LSPSpec::TextDocumentPositionParams& params, + const WorkspaceIRFile& tracked_file) { + // See if it's an OpenGOAL symbol or a MIPS mnemonic + auto symbol_name = tracked_file.get_symbol_at_position(params.m_position); + auto token_at_pos = tracked_file.get_mips_instruction_at_position(params.m_position); + if (!symbol_name && !token_at_pos) { + return {}; + } + + LSPSpec::MarkupContent markup; + markup.m_kind = "markdown"; + + // TODO - try specifying the range so it highlights everything, ie. `c.lt.s` + // Prefer symbols + if (symbol_name) { + lg::debug("hover - symbol match - {}", symbol_name.value()); + auto symbol_info = workspace.get_definition_info_from_all_types(symbol_name.value(), + tracked_file.m_all_types_uri); + if (symbol_info && symbol_info.value().docstring.has_value()) { + std::string docstring = symbol_info.value().docstring.value(); + lg::debug("hover - symbol has docstring - {}", docstring); + // A docstring exists, print it! + // By convention, docstrings are assumed to be markdown, they support code-blocks everything + // the only thing extra we do, is replace [[]] with links if available + std::unordered_map symbol_replacements = {}; + std::smatch match; + + std::string::const_iterator searchStart(docstring.cbegin()); + while ( + std::regex_search(searchStart, docstring.cend(), match, std::regex("\\[{2}(.*)\\]{2}"))) { + // Have we already accounted for this symbol? + const auto& name = match[1].str(); + if (symbol_replacements.count(name) != 0) { + continue; + } + // Get this symbols info + auto symbol_info = + workspace.get_definition_info_from_all_types(name, tracked_file.m_all_types_uri); + if (!symbol_info) { + symbol_replacements[name] = fmt::format("_{}_", name); + } else { + // Construct path + auto symbol_uri = + fmt::format("{}#L{}%2C{}", tracked_file.m_all_types_uri, + symbol_info.value().definition_info->line_idx_to_display + 1, + symbol_info.value().definition_info->pos_in_line); + symbol_replacements[name] = fmt::format("[{}]({})", name, symbol_uri); + } + searchStart = match.suffix().first; + } + // Replace all symbol occurences + for (const auto& [key, val] : symbol_replacements) { + docstring = std::regex_replace(docstring, std::regex("\\[{2}" + key + "\\]{2}"), val); + } + + markup.m_value = docstring; + LSPSpec::Hover hover_resp; + hover_resp.m_contents = markup; + return hover_resp; + } else if (!token_at_pos) { + // Check if it's a number, and if so we'll do some numeric conversions + if (!is_number(symbol_name.value())) { + return {}; + } + lg::debug("hover - numeric match - {}", symbol_name.value()); + // Construct the body + std::string body = ""; + uint32_t num = std::atoi(symbol_name.value().data()); + // Assuming it comes in as Decimal + body += "| Base | Value |\n"; + body += "|---------|-------|\n"; + body += fmt::format("| Decimal | `{:d}` |\n", num); + body += fmt::format("| Hex | `{:X}` |\n", num); + // TODO - would be nice to format as groups of 4 + body += fmt::format("| Binary | `{:b}` |\n", num); + if (num >= 16 && (num - 16) % 4 == 0) { + uint32_t method_id = (num - 16) / 4; + std::string method_name = "not built-in"; + if (method_id <= 8) { + method_name = og_method_names.at(method_id); + } + body += fmt::format("| Method ID | `{}` - `{}` |\n", method_id, method_name); + } + body += fmt::format("| Octal | `{:o}` |\n", num); + + markup.m_value = body; + LSPSpec::Hover hover_resp; + hover_resp.m_contents = markup; + return hover_resp; + } + } + + // Otherwise, maybe it's a MIPS instruction + if (token_at_pos) { + lg::debug("hover - token match - {}", token_at_pos.value()); + auto& token = token_at_pos.value(); + std::transform(token.begin(), token.end(), token.begin(), + [](unsigned char c) { return std::tolower(c); }); + // Find the instruction, there are some edge-cases here where they could be multiple + // TODO - havn't addressed `bc` and such instructions! Those need to be prefixed matched + std::vector ee_instructions = {}; + std::vector vu_instructions = {}; + for (const auto& instr : LSPData::MIPS_INSTRUCTION_LIST) { + auto mnemonic_lower = instr.mnemonic; + std::transform(mnemonic_lower.begin(), mnemonic_lower.end(), mnemonic_lower.begin(), + [](unsigned char c) { return std::tolower(c); }); + if (mnemonic_lower == token) { + if (instr.type == "ee") { + ee_instructions.push_back(fmt::format("- _{}_\n\n", instr.description)); + } else { + vu_instructions.push_back(fmt::format("- _{}_\n\n", instr.description)); + } + } + } + + // Construct the body + std::string body = ""; + if (!ee_instructions.empty()) { + body += "**EE Instructions**\n\n"; + for (const auto& instr : ee_instructions) { + body += instr; + } + body += "___\n\n"; + } + + if (!vu_instructions.empty()) { + body += "**VU Instructions**\n\n"; + for (const auto& instr : vu_instructions) { + body += instr; + } + body += "___\n\n"; + } + + markup.m_value = body; + LSPSpec::Hover hover_resp; + hover_resp.m_contents = markup; + return hover_resp; + } + + return {}; +} + +std::string truncate_docstring(const std::string& docstring) { + std::string truncated = ""; + const auto lines = str_util::split(docstring); + for (const auto& line : lines) { + const auto trimmed_line = str_util::ltrim(line); + if (str_util::starts_with(trimmed_line, "@")) { + break; + } + truncated += trimmed_line + "\n"; + } + return truncated; +} + +namespace lsp_handlers { +std::optional hover(Workspace& workspace, int /*id*/, json raw_params) { + auto params = raw_params.get(); + auto file_type = workspace.determine_filetype_from_uri(params.m_textDocument.m_uri); + + if (file_type == Workspace::FileType::OpenGOALIR) { + auto tracked_file = workspace.get_tracked_ir_file(params.m_textDocument.m_uri); + if (!tracked_file) { + return {}; + } + return hover_handler_ir(workspace, params, tracked_file.value()); + } else if (file_type == Workspace::FileType::OpenGOAL) { + auto maybe_tracked_file = workspace.get_tracked_og_file(params.m_textDocument.m_uri); + if (!maybe_tracked_file) { + return {}; + } + const auto& tracked_file = maybe_tracked_file.value().get(); + const auto symbol = tracked_file.get_symbol_at_position(params.m_position); + if (!symbol) { + lg::debug("hover - no symbol"); + return {}; + } + // TODO - there is an issue with docstrings and overridden methods + const auto& symbol_info = workspace.get_global_symbol_info(tracked_file, symbol.value()); + if (!symbol_info) { + lg::debug("hover - no symbol info - {}", symbol.value()); + return {}; + } + LSPSpec::MarkupContent markup; + markup.m_kind = "markdown"; + + const auto args = Docs::get_args_from_docstring(symbol_info.value()->m_args, + symbol_info.value()->m_docstring); + std::string signature = ""; + bool takes_args = true; + if (symbol_info.value()->m_kind == symbol_info::Kind::FUNCTION) { + signature += "function "; + } else if (symbol_info.value()->m_kind == symbol_info::Kind::METHOD) { + signature += "method "; + } else if (symbol_info.value()->m_kind == symbol_info::Kind::MACRO) { + signature += "macro "; + } else { + takes_args = false; + } + // TODO - others useful, probably states? + auto type_info = workspace.get_symbol_typeinfo(tracked_file, symbol.value()); + signature += symbol.value(); + if (takes_args) { + signature += "("; + for (int i = 0; i < (int)args.size(); i++) { + const auto& arg = args.at(i); + if (i == (int)args.size() - 1) { + signature += fmt::format("{}: {}", arg.name, arg.type); + } else { + signature += fmt::format("{}: {}, ", arg.name, arg.type); + } + } + signature += ")"; + if (symbol_info.value()->m_kind == symbol_info::Kind::FUNCTION && type_info) { + signature += fmt::format(": {}", type_info->first.last_arg().base_type()); + } else if (symbol_info.value()->m_kind == symbol_info::Kind::METHOD) { + signature += + fmt::format(": {}", symbol_info.value()->m_method_info.type.last_arg().base_type()); + } + } else if (type_info) { + signature += fmt::format(": {}", type_info->second->get_parent()); + } + + std::string body = fmt::format("```opengoal\n{}\n```\n\n", signature); + body += "___\n\n"; + if (!symbol_info.value()->m_docstring.empty()) { + body += truncate_docstring(symbol_info.value()->m_docstring) + "\n\n"; + } + + // TODO - support @see/@returns/[[reference]] + for (const auto& arg : args) { + std::string param_line = ""; + if (arg.is_mutated) { + param_line += fmt::format("*@param!* `{}: {}`", arg.name, arg.type); + } else if (arg.is_optional) { + param_line += fmt::format("*@param?* `{}: {}`", arg.name, arg.type); + } else if (arg.is_unused) { + param_line += fmt::format("*@param_* `{}: {}`", arg.name, arg.type); + } else { + param_line += fmt::format("*@param* `{}: {}`", arg.name, arg.type); + } + if (!arg.description.empty()) { + param_line += fmt::format(" - {}\n\n", arg.description); + } else { + param_line += "\n\n"; + } + body += param_line; + } + + markup.m_value = body; + LSPSpec::Hover hover_resp; + hover_resp.m_contents = markup; + return hover_resp; + } + + return {}; +} +} // namespace lsp_handlers diff --git a/lsp/handlers/text_document/hover.h b/lsp/handlers/text_document/hover.h index b16b7a3016..fa3419e84e 100644 --- a/lsp/handlers/text_document/hover.h +++ b/lsp/handlers/text_document/hover.h @@ -3,278 +3,16 @@ #include #include +#include "common/util/json_util.h" +#include "common/util/string_util.h" + #include "goalc/compiler/docs/DocTypes.h" #include "lsp/protocol/common_types.h" #include "lsp/protocol/hover.h" #include "lsp/state/data/mips_instructions.h" #include "lsp/state/workspace.h" -bool is_number(const std::string& s) { - return !s.empty() && std::find_if(s.begin(), s.end(), - [](unsigned char c) { return !std::isdigit(c); }) == s.end(); -} - -std::vector og_method_names = {"new", "delete", "print", "inspect", "length", - "asize-of", "copy", "relocate", "mem-usage"}; - -std::optional hover_handler_ir(Workspace& workspace, - const LSPSpec::TextDocumentPositionParams& params, - const WorkspaceIRFile& tracked_file) { - // See if it's an OpenGOAL symbol or a MIPS mnemonic - auto symbol_name = tracked_file.get_symbol_at_position(params.m_position); - auto token_at_pos = tracked_file.get_mips_instruction_at_position(params.m_position); - if (!symbol_name && !token_at_pos) { - return {}; - } - - LSPSpec::MarkupContent markup; - markup.m_kind = "markdown"; - - // TODO - try specifying the range so it highlights everything, ie. `c.lt.s` - // Prefer symbols - if (symbol_name) { - lg::debug("hover - symbol match - {}", symbol_name.value()); - auto symbol_info = workspace.get_definition_info_from_all_types(symbol_name.value(), - tracked_file.m_all_types_uri); - if (symbol_info && symbol_info.value().docstring.has_value()) { - std::string docstring = symbol_info.value().docstring.value(); - lg::debug("hover - symbol has docstring - {}", docstring); - // A docstring exists, print it! - // By convention, docstrings are assumed to be markdown, they support code-blocks everything - // the only thing extra we do, is replace [[]] with links if available - std::unordered_map symbol_replacements = {}; - std::smatch match; - - std::string::const_iterator searchStart(docstring.cbegin()); - while ( - std::regex_search(searchStart, docstring.cend(), match, std::regex("\\[{2}(.*)\\]{2}"))) { - // Have we already accounted for this symbol? - const auto& name = match[1].str(); - if (symbol_replacements.count(name) != 0) { - continue; - } - // Get this symbols info - auto symbol_info = - workspace.get_definition_info_from_all_types(name, tracked_file.m_all_types_uri); - if (!symbol_info) { - symbol_replacements[name] = fmt::format("_{}_", name); - } else { - // Construct path - auto symbol_uri = - fmt::format("{}#L{}%2C{}", tracked_file.m_all_types_uri, - symbol_info.value().definition_info->line_idx_to_display + 1, - symbol_info.value().definition_info->pos_in_line); - symbol_replacements[name] = fmt::format("[{}]({})", name, symbol_uri); - } - searchStart = match.suffix().first; - } - // Replace all symbol occurences - for (const auto& [key, val] : symbol_replacements) { - docstring = std::regex_replace(docstring, std::regex("\\[{2}" + key + "\\]{2}"), val); - } - - markup.m_value = docstring; - LSPSpec::Hover hover_resp; - hover_resp.m_contents = markup; - return hover_resp; - } else if (!token_at_pos) { - // Check if it's a number, and if so we'll do some numeric conversions - if (!is_number(symbol_name.value())) { - return {}; - } - lg::debug("hover - numeric match - {}", symbol_name.value()); - // Construct the body - std::string body = ""; - uint32_t num = std::atoi(symbol_name.value().data()); - // Assuming it comes in as Decimal - body += "| Base | Value |\n"; - body += "|---------|-------|\n"; - body += fmt::format("| Decimal | `{:d}` |\n", num); - body += fmt::format("| Hex | `{:X}` |\n", num); - // TODO - would be nice to format as groups of 4 - body += fmt::format("| Binary | `{:b}` |\n", num); - if (num >= 16 && (num - 16) % 4 == 0) { - uint32_t method_id = (num - 16) / 4; - std::string method_name = "not built-in"; - if (method_id <= 8) { - method_name = og_method_names.at(method_id); - } - body += fmt::format("| Method ID | `{}` - `{}` |\n", method_id, method_name); - } - body += fmt::format("| Octal | `{:o}` |\n", num); - - markup.m_value = body; - LSPSpec::Hover hover_resp; - hover_resp.m_contents = markup; - return hover_resp; - } - } - - // Otherwise, maybe it's a MIPS instruction - if (token_at_pos) { - lg::debug("hover - token match - {}", token_at_pos.value()); - auto& token = token_at_pos.value(); - std::transform(token.begin(), token.end(), token.begin(), - [](unsigned char c) { return std::tolower(c); }); - // Find the instruction, there are some edge-cases here where they could be multiple - // TODO - havn't addressed `bc` and such instructions! Those need to be prefixed matched - std::vector ee_instructions = {}; - std::vector vu_instructions = {}; - for (const auto& instr : LSPData::MIPS_INSTRUCTION_LIST) { - auto mnemonic_lower = instr.mnemonic; - std::transform(mnemonic_lower.begin(), mnemonic_lower.end(), mnemonic_lower.begin(), - [](unsigned char c) { return std::tolower(c); }); - if (mnemonic_lower == token) { - if (instr.type == "ee") { - ee_instructions.push_back(fmt::format("- _{}_\n\n", instr.description)); - } else { - vu_instructions.push_back(fmt::format("- _{}_\n\n", instr.description)); - } - } - } - - // Construct the body - std::string body = ""; - if (!ee_instructions.empty()) { - body += "**EE Instructions**\n\n"; - for (const auto& instr : ee_instructions) { - body += instr; - } - body += "___\n\n"; - } - - if (!vu_instructions.empty()) { - body += "**VU Instructions**\n\n"; - for (const auto& instr : vu_instructions) { - body += instr; - } - body += "___\n\n"; - } - - markup.m_value = body; - LSPSpec::Hover hover_resp; - hover_resp.m_contents = markup; - return hover_resp; - } - - return {}; -} - -std::string truncate_docstring(const std::string& docstring) { - std::string truncated = ""; - const auto lines = str_util::split(docstring); - for (const auto& line : lines) { - const auto trimmed_line = str_util::ltrim(line); - if (str_util::starts_with(trimmed_line, "@")) { - break; - } - truncated += trimmed_line + "\n"; - } - return truncated; -} - -std::optional hover_handler(Workspace& workspace, int /*id*/, json raw_params) { - auto params = raw_params.get(); - auto file_type = workspace.determine_filetype_from_uri(params.m_textDocument.m_uri); - - if (file_type == Workspace::FileType::OpenGOALIR) { - auto tracked_file = workspace.get_tracked_ir_file(params.m_textDocument.m_uri); - if (!tracked_file) { - return {}; - } - return hover_handler_ir(workspace, params, tracked_file.value()); - } else if (file_type == Workspace::FileType::OpenGOAL) { - auto tracked_file = workspace.get_tracked_og_file(params.m_textDocument.m_uri); - if (!tracked_file) { - return {}; - } - // TODO - replace with AST usage instead of figuring out the symbol ourselves - const auto symbol = tracked_file->get_symbol_at_position(params.m_position); - if (!symbol) { - lg::debug("hover - no symbol"); - return {}; - } - // TODO - there is an issue with docstrings and overridden methods - const auto& symbol_info = - workspace.get_global_symbol_info(tracked_file.value(), symbol.value()); - if (!symbol_info) { - lg::debug("hover - no symbol info - {}", symbol.value()); - return {}; - } - LSPSpec::MarkupContent markup; - markup.m_kind = "markdown"; - - const auto args = - Docs::get_args_from_docstring(symbol_info->args(), symbol_info->meta().docstring); - std::string signature = ""; - bool takes_args = true; - if (symbol_info->kind() == SymbolInfo::Kind::FUNCTION) { - signature += "function "; - } else if (symbol_info->kind() == SymbolInfo::Kind::METHOD) { - signature += "method "; - } else if (symbol_info->kind() == SymbolInfo::Kind::MACRO) { - signature += "macro "; - } else { - takes_args = false; - } - // TODO - others useful, probably states? - signature += symbol.value(); - if (takes_args) { - signature += "("; - for (int i = 0; i < (int)args.size(); i++) { - const auto& arg = args.at(i); - if (i == (int)args.size() - 1) { - signature += fmt::format("{}: {}", arg.name, arg.type); - } else { - signature += fmt::format("{}: {}, ", arg.name, arg.type); - } - } - signature += ")"; - if (symbol_info->kind() == SymbolInfo::Kind::FUNCTION && - workspace.get_symbol_typespec(tracked_file.value(), symbol.value())) { - signature += - fmt::format(": {}", workspace.get_symbol_typespec(tracked_file.value(), symbol.value()) - ->last_arg() - .base_type()); - } else if (symbol_info->kind() == SymbolInfo::Kind::METHOD) { - signature += fmt::format(": {}", symbol_info->method_info().type.last_arg().base_type()); - } - } else if (workspace.get_symbol_typespec(tracked_file.value(), symbol.value())) { - signature += fmt::format( - ": {}", workspace.get_symbol_typespec(tracked_file.value(), symbol.value())->base_type()); - } - - std::string body = fmt::format("```opengoal\n{}\n```\n\n", signature); - body += "___\n\n"; - if (!symbol_info->meta().docstring.empty()) { - body += truncate_docstring(symbol_info->meta().docstring) + "\n\n"; - } - - // TODO - support @see/@returns/[[reference]] - for (const auto& arg : args) { - std::string param_line = ""; - if (arg.is_mutated) { - param_line += fmt::format("*@param!* `{}: {}`", arg.name, arg.type); - } else if (arg.is_optional) { - param_line += fmt::format("*@param?* `{}: {}`", arg.name, arg.type); - } else if (arg.is_unused) { - param_line += fmt::format("*@param_* `{}: {}`", arg.name, arg.type); - } else { - param_line += fmt::format("*@param* `{}: {}`", arg.name, arg.type); - } - if (!arg.description.empty()) { - param_line += fmt::format(" - {}\n\n", arg.description); - } else { - param_line += "\n\n"; - } - body += param_line; - } - - markup.m_value = body; - LSPSpec::Hover hover_resp; - hover_resp.m_contents = markup; - return hover_resp; - } +namespace lsp_handlers { +std::optional hover(Workspace& workspace, int id, json raw_params); - return {}; -} +} // namespace lsp_handlers diff --git a/lsp/handlers/text_document/type_hierarchy.cpp b/lsp/handlers/text_document/type_hierarchy.cpp new file mode 100644 index 0000000000..5d8657170e --- /dev/null +++ b/lsp/handlers/text_document/type_hierarchy.cpp @@ -0,0 +1,144 @@ +#include "type_hierarchy.h" + +#include "lsp/lsp_util.h" + +namespace lsp_handlers { +std::optional prepare_type_hierarchy(Workspace& workspace, int /*id*/, json raw_params) { + auto params = raw_params.get(); + const auto file_type = workspace.determine_filetype_from_uri(params.m_textDocument.m_uri); + + if (file_type != Workspace::FileType::OpenGOAL) { + return nullptr; + } + auto maybe_tracked_file = workspace.get_tracked_og_file(params.m_textDocument.m_uri); + if (!maybe_tracked_file) { + return nullptr; + } + const auto& tracked_file = maybe_tracked_file.value().get(); + const auto symbol = tracked_file.get_symbol_at_position(params.m_position); + if (!symbol) { + lg::debug("prepare_type_hierarchy - no symbol"); + return nullptr; + } + + const auto& symbol_info = workspace.get_global_symbol_info(tracked_file, symbol.value()); + if (!symbol_info) { + lg::debug("prepare_type_hierarchy - no symbol info - {}", symbol.value()); + return nullptr; + } + + const auto& def_loc = workspace.get_symbol_def_location(tracked_file, symbol_info.value()); + if (!def_loc) { + return nullptr; + } + + auto type_item = LSPSpec::TypeHierarchyItem(); + type_item.name = symbol.value(); + // TODO - differentiate between struct and class perhaps + type_item.kind = LSPSpec::SymbolKind::Class; + if (symbol_info && !symbol_info.value()->m_docstring.empty()) { + type_item.detail = symbol_info.value()->m_docstring; + } + type_item.uri = lsp_util::uri_from_path(def_loc->file_path); + // TODO - this range is technically not entirely correct, we'd have to parse the defining file + // with an AST to get the true extent of the deftype. But for this purpose, its not really needed + // + // HACK - the definition that our compiler stores is the form itself, so we will add + // the width of the prefix `(deftype ` to the char_index + // TODO - A better way would be to use the AST + type_item.range.m_start = {(uint32_t)def_loc->line_idx, (uint32_t)(def_loc->char_idx + 9)}; + type_item.range.m_end = {(uint32_t)def_loc->line_idx, + (uint32_t)(def_loc->char_idx + 9 + symbol.value().length())}; + type_item.selectionRange.m_start = {(uint32_t)def_loc->line_idx, + (uint32_t)(def_loc->char_idx + 8)}; + type_item.selectionRange.m_end = {(uint32_t)def_loc->line_idx, + (uint32_t)(def_loc->char_idx + 8 + symbol.value().length())}; + + json items = json::array(); + items.push_back(type_item); + return items; +} + +std::optional supertypes_type_hierarchy(Workspace& workspace, int /*id*/, json raw_params) { + auto params = raw_params.get(); + const std::optional game_version = + workspace.determine_game_version_from_uri(params.item.uri); + if (!game_version) { + return nullptr; + } + const auto& parent_type_path = + workspace.get_symbols_parent_type_path(params.item.name, game_version.value()); + json items = json::array(); + for (const auto& parent_type : parent_type_path) { + if (std::get<0>(parent_type) == params.item.name) { + continue; // skip the item itself + } + auto type_item = LSPSpec::TypeHierarchyItem(); + type_item.name = std::get<0>(parent_type); + // TODO - differentiate between struct and class perhaps + type_item.kind = LSPSpec::SymbolKind::Class; + if (!std::get<1>(parent_type).empty()) { + type_item.detail = std::get<1>(parent_type); + } + const auto& def_loc = std::get<2>(parent_type); + type_item.uri = def_loc.filename; + // TODO - this range is technically not entirely correct, we'd have to parse the defining file + // with an AST to get the true entent of the deftype. But for this purpose, its not really + // needed + // + // HACK - the definition that our compiler stores is the form itself, so we will add + // the width of the prefix `(deftype ` to the char_index + // TODO - A better way would be to use the AST + type_item.range.m_start = {(uint32_t)def_loc.line_idx, (uint32_t)(def_loc.char_idx + 9)}; + type_item.range.m_end = {(uint32_t)def_loc.line_idx, + (uint32_t)(def_loc.char_idx + 9 + std::get<0>(parent_type).length())}; + type_item.selectionRange.m_start = {(uint32_t)def_loc.line_idx, + (uint32_t)(def_loc.char_idx + 8)}; + type_item.selectionRange.m_end = { + (uint32_t)def_loc.line_idx, + (uint32_t)(def_loc.char_idx + 8 + std::get<0>(parent_type).length())}; + items.push_back(type_item); + } + return items; +} + +std::optional subtypes_type_hierarchy(Workspace& workspace, int /*id*/, json raw_params) { + auto params = raw_params.get(); + const std::optional game_version = + workspace.determine_game_version_from_uri(params.item.uri); + if (!game_version) { + return nullptr; + } + const auto& parent_type_path = + workspace.get_types_subtypes(params.item.name, game_version.value()); + json items = json::array(); + for (const auto& parent_type : parent_type_path) { + auto type_item = LSPSpec::TypeHierarchyItem(); + type_item.name = std::get<0>(parent_type); + // TODO - differentiate between struct and class perhaps + type_item.kind = LSPSpec::SymbolKind::Class; + if (!std::get<1>(parent_type).empty()) { + type_item.detail = std::get<1>(parent_type); + } + const auto& def_loc = std::get<2>(parent_type); + type_item.uri = def_loc.filename; + // TODO - this range is technically not entirely correct, we'd have to parse the defining file + // with an AST to get the true entent of the deftype. But for this purpose, its not really + // needed + // + // HACK - the definition that our compiler stores is the form itself, so we will add + // the width of the prefix `(deftype ` to the char_index + // TODO - A better way would be to use the AST + type_item.range.m_start = {(uint32_t)def_loc.line_idx, (uint32_t)(def_loc.char_idx + 9)}; + type_item.range.m_end = {(uint32_t)def_loc.line_idx, + (uint32_t)(def_loc.char_idx + 9 + std::get<0>(parent_type).length())}; + type_item.selectionRange.m_start = {(uint32_t)def_loc.line_idx, + (uint32_t)(def_loc.char_idx + 8)}; + type_item.selectionRange.m_end = { + (uint32_t)def_loc.line_idx, + (uint32_t)(def_loc.char_idx + 8 + std::get<0>(parent_type).length())}; + items.push_back(type_item); + } + return items; +} +} // namespace lsp_handlers diff --git a/lsp/handlers/text_document/type_hierarchy.h b/lsp/handlers/text_document/type_hierarchy.h new file mode 100644 index 0000000000..fc7aed9e8d --- /dev/null +++ b/lsp/handlers/text_document/type_hierarchy.h @@ -0,0 +1,18 @@ +#pragma once + +#include + +#include "common/util/json_util.h" + +#include "lsp/protocol/common_types.h" +#include "lsp/protocol/type_hierarchy.h" +#include "lsp/state/workspace.h" + +namespace lsp_handlers { + +std::optional prepare_type_hierarchy(Workspace& workspace, int id, json raw_params); + +std::optional supertypes_type_hierarchy(Workspace& workspace, int id, json raw_params); + +std::optional subtypes_type_hierarchy(Workspace& workspace, int id, json raw_params); +} // namespace lsp_handlers diff --git a/lsp/lsp_util.cpp b/lsp/lsp_util.cpp new file mode 100644 index 0000000000..98bc715422 --- /dev/null +++ b/lsp/lsp_util.cpp @@ -0,0 +1,83 @@ +#include "lsp_util.h" + +#include + +#include "common/util/string_util.h" + +#include "fmt/core.h" + +namespace lsp_util { + +std::string url_encode(const std::string& value) { + std::ostringstream escaped; + escaped.fill('0'); + escaped << std::hex; + + for (std::string::const_iterator i = value.begin(), n = value.end(); i != n; ++i) { + std::string::value_type c = (*i); + + // Keep alphanumeric and other accepted characters intact + if (isalnum(c) || c == '-' || c == '_' || c == '.' || c == '~' || c == '/') { + escaped << c; + continue; + } + + // Any other characters are percent-encoded + escaped << std::uppercase; + escaped << '%' << std::setw(2) << int((unsigned char)c); + escaped << std::nouppercase; + } + + return escaped.str(); +} + +std::string url_decode(const std::string& input) { + std::ostringstream decoded; + + for (std::size_t i = 0; i < input.length(); ++i) { + if (input[i] == '%') { + // Check if there are enough characters remaining + if (i + 2 < input.length()) { + // Convert the next two characters after '%' into an integer value + std::istringstream hexStream(input.substr(i + 1, 2)); + int hexValue = 0; + hexStream >> std::hex >> hexValue; + + // Append the decoded character to the result + decoded << static_cast(hexValue); + + // Skip the next two characters + i += 2; + } + } else if (input[i] == '+') { + // Replace '+' with space character ' ' + decoded << ' '; + } else { + // Append the character as is + decoded << input[i]; + } + } + + return decoded.str(); +} + +LSPSpec::DocumentUri uri_from_path(fs::path path) { + auto path_str = file_util::convert_to_unix_path_separators(path.string()); + // vscode works with proper URL encoded URIs for file paths + // which means we have to roll our own... + path_str = url_encode(path_str); + return fmt::format("file:///{}", path_str); +} + +std::string uri_to_path(const LSPSpec::DocumentUri& uri) { + auto decoded_uri = url_decode(uri); + if (str_util::starts_with(decoded_uri, "file:///")) { +#ifdef _WIN32 + decoded_uri = decoded_uri.substr(8); +#else + decoded_uri = decoded_uri.substr(7); +#endif + } + return decoded_uri; +} +} // namespace lsp_util diff --git a/lsp/lsp_util.h b/lsp/lsp_util.h new file mode 100644 index 0000000000..78b097cfe8 --- /dev/null +++ b/lsp/lsp_util.h @@ -0,0 +1,13 @@ +#pragma once +#include + +#include "common/util/FileUtil.h" + +#include "protocol/common_types.h" + +namespace lsp_util { +std::string url_encode(const std::string& value); +std::string url_decode(const std::string& input); +LSPSpec::DocumentUri uri_from_path(fs::path path); +std::string uri_to_path(const LSPSpec::DocumentUri& uri); +}; // namespace lsp_util diff --git a/lsp/main.cpp b/lsp/main.cpp index bfa7c26d04..916ce9dbca 100644 --- a/lsp/main.cpp +++ b/lsp/main.cpp @@ -55,6 +55,29 @@ void setup_logging(bool verbose, std::string log_file, bool disable_ansi_colors) lg::initialize(); } +std::string temp_url_encode(const std::string& value) { + std::ostringstream escaped; + escaped.fill('0'); + escaped << std::hex; + + for (std::string::const_iterator i = value.begin(), n = value.end(); i != n; ++i) { + std::string::value_type c = (*i); + + // Keep alphanumeric and other accepted characters intact + if (isalnum(c) || c == '-' || c == '_' || c == '.' || c == '~' || c == '/') { + escaped << c; + continue; + } + + // Any other characters are percent-encoded + escaped << std::uppercase; + escaped << '%' << std::setw(2) << int((unsigned char)c); + escaped << std::nouppercase; + } + + return escaped.str(); +} + int main(int argc, char** argv) { ArgumentGuard u8_guard(argc, argv); @@ -72,6 +95,7 @@ int main(int argc, char** argv) { CLI11_PARSE(app, argc, argv); AppState appstate; + LSPRouter lsp_router; appstate.verbose = verbose; try { @@ -89,6 +113,11 @@ int main(int argc, char** argv) { _setmode(_fileno(stdin), _O_BINARY); #endif + // TODO - make the server check for the process id of the extension host and exit itself if that + // process goes away (the process id comes on the command line as an argument and in the + // initialize request). This is what we do in all our servers since the extension host could die + // unexpected as well. + try { char c; MessageBuffer message_buffer; diff --git a/lsp/protocol/common_types.cpp b/lsp/protocol/common_types.cpp index eed2abac1b..678ab7f9ad 100644 --- a/lsp/protocol/common_types.cpp +++ b/lsp/protocol/common_types.cpp @@ -9,6 +9,11 @@ void LSPSpec::from_json(const json& j, Position& obj) { j.at("character").get_to(obj.m_character); } +LSPSpec::Range::Range(Position start, Position end) : m_start(start), m_end(end) {} + +LSPSpec::Range::Range(uint32_t line, uint32_t character) + : m_start({line, character}), m_end({line, character}) {} + void LSPSpec::to_json(json& j, const Range& obj) { // TODO - not sure if this works yet, but nice if it does! j = json{{"start", obj.m_start}, {"end", obj.m_end}}; diff --git a/lsp/protocol/common_types.h b/lsp/protocol/common_types.h index b15d71ebc6..3d73279d16 100644 --- a/lsp/protocol/common_types.h +++ b/lsp/protocol/common_types.h @@ -28,6 +28,11 @@ void from_json(const json& j, Position& obj); struct Range { Position m_start; Position m_end; + + Range(){}; + Range(Position start, Position end); + // point constructor + Range(uint32_t line, uint32_t character); }; void to_json(json& j, const Range& obj); void from_json(const json& j, Range& obj); diff --git a/lsp/protocol/completion.cpp b/lsp/protocol/completion.cpp index 684b433e61..f9ad513b49 100644 --- a/lsp/protocol/completion.cpp +++ b/lsp/protocol/completion.cpp @@ -1,14 +1,65 @@ #include "completion.h" void LSPSpec::to_json(json& j, const CompletionParams& obj) { - j = json{{"textDocument", obj.m_textDocument}, {"position", obj.m_position}}; + json_serialize(textDocument); + json_serialize(position); } void LSPSpec::from_json(const json& j, CompletionParams& obj) { - j.at("textDocument").get_to(obj.m_textDocument); - j.at("position").get_to(obj.m_position); + json_deserialize_if_exists(textDocument); + json_deserialize_if_exists(position); } -void LSPSpec::to_json(json& /*j*/, const CompletionList& /*obj*/) {} +void LSPSpec::to_json(json& j, const CompletionItemLabelDetails& obj) { + json_serialize_optional(detail); + json_serialize_optional(description); +} + +void LSPSpec::from_json(const json& j, CompletionItemLabelDetails& obj) { + json_deserialize_optional_if_exists(detail); + json_deserialize_optional_if_exists(description); +} + +void LSPSpec::to_json(json& j, const CompletionItem& obj) { + json_serialize(label); + json_serialize_optional(labelDetails); + json_serialize_optional(kind); + json_serialize_optional(tags); + json_serialize_optional(detail); + json_serialize_optional(documentation); + json_serialize_optional(preselect); + json_serialize_optional(sortText); + json_serialize_optional(filterText); + json_serialize_optional(insertText); + json_serialize_optional(textEdit); + json_serialize_optional(textEditText); + json_serialize_optional(additionalTextEdits); + json_serialize_optional(commitCharacters); +} -void LSPSpec::from_json(const json& /*j*/, CompletionList& /*obj*/) {} +void LSPSpec::from_json(const json& j, CompletionItem& obj) { + json_deserialize_if_exists(label); + json_deserialize_optional_if_exists(labelDetails); + json_deserialize_optional_if_exists(kind); + json_deserialize_optional_if_exists(tags); + json_deserialize_optional_if_exists(detail); + json_deserialize_optional_if_exists(documentation); + json_deserialize_optional_if_exists(preselect); + json_deserialize_optional_if_exists(sortText); + json_deserialize_optional_if_exists(filterText); + json_deserialize_optional_if_exists(insertText); + json_deserialize_optional_if_exists(textEdit); + json_deserialize_optional_if_exists(textEditText); + json_deserialize_optional_if_exists(additionalTextEdits); + json_deserialize_optional_if_exists(commitCharacters); +} + +void LSPSpec::to_json(json& j, const CompletionList& obj) { + json_serialize(isIncomplete); + json_serialize(items); +} + +void LSPSpec::from_json(const json& j, CompletionList& obj) { + json_deserialize_if_exists(isIncomplete); + json_deserialize_if_exists(items); +} diff --git a/lsp/protocol/completion.h b/lsp/protocol/completion.h index 9d4dafb046..1d7cae5c18 100644 --- a/lsp/protocol/completion.h +++ b/lsp/protocol/completion.h @@ -20,10 +20,10 @@ enum class CompletionTriggerKind { // TODO - look into inheriting structs? struct CompletionParams { - /// @brief The text document. - TextDocumentIdentifier m_textDocument; - /// @brief The position inside the text document. - Position m_position; + /// The text document. + TextDocumentIdentifier textDocument; + /// The position inside the text document. + Position position; }; void to_json(json& j, const CompletionParams& obj); @@ -40,6 +40,9 @@ struct CompletionItemLabelDetails { std::optional description; }; +void to_json(json& j, const CompletionItemLabelDetails& obj); +void from_json(const json& j, CompletionItemLabelDetails& obj); + /// @brief The kind of a completion entry. enum class CompletionItemKind { Text = 1, @@ -95,8 +98,9 @@ struct CompletionItem { /// information. std::optional detail; /// A human-readable string that represents a doc-comment. + /// TODO - can also be MarkupContent std::optional documentation; - // NOTE - skipped deprecated + // NOTE - skipped deprecated (because it's deprecated!) /// Select this item when showing. /// /// *Note* that only one completion item can be selected and that the tool / client decides which @@ -108,17 +112,104 @@ struct CompletionItem { /// A string that should be used when filtering a set of completion items. When omitted the label /// is used as the filter text for this item. std::optional filterText; - // TODO - a lot of other fields... + /// A string that should be inserted into a document when selecting + /// this completion. When omitted the label is used as the insert text + /// for this item. + /// + /// The `insertText` is subject to interpretation by the client side. + /// Some tools might not take the string literally. For example + /// VS Code when code complete is requested in this example + /// `con` and a completion item with an `insertText` of + /// `console` is provided it will only insert `sole`. Therefore it is + /// recommended to use `textEdit` instead since it avoids additional client + /// side interpretation. + std::optional insertText; + /// The format of the insert text. The format applies to both the + /// `insertText` property and the `newText` property of a provided + /// `textEdit`. If omitted defaults to `InsertTextFormat.PlainText`. + /// + /// Please note that the insertTextFormat doesn't apply to + /// `additionalTextEdits`. + // TODO - std::optional insertTextFormat; + /// How whitespace and indentation is handled during completion + /// item insertion. If not provided the client's default value depends on + /// the `textDocument.completion.insertTextMode` client capability. + /// + /// @since 3.16.0 + /// @since 3.17.0 - support for `textDocument.completion.insertTextMode` + // TODO - std::optional insertTextMode; + /// An edit which is applied to a document when selecting this completion. + /// When an edit is provided the value of `insertText` is ignored. + /// + /// *Note:* The range of the edit must be a single line range and it must + /// contain the position at which completion has been requested. + /// + /// Most editors support two different operations when accepting a completion + /// item. One is to insert a completion text and the other is to replace an + /// existing text with a completion text. Since this can usually not be + /// predetermined by a server it can report both ranges. Clients need to + /// signal support for `InsertReplaceEdit`s via the + /// `textDocument.completion.completionItem.insertReplaceSupport` client + /// capability property. + /// + /// *Note 1:* The text edit's range as well as both ranges from an insert + /// replace edit must be a [single line] and they must contain the position + /// at which completion has been requested. + /// *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range + /// must be a prefix of the edit's replace range, that means it must be + /// contained and starting at the same position. + /// + /// @since 3.16.0 additional type `InsertReplaceEdit` + /// TODO - can also be InsertReplaceEdit + std::optional textEdit; + /// The edit text used if the completion item is part of a CompletionList and + /// CompletionList defines an item default for the text edit range. + /// + /// Clients will only honor this property if they opt into completion list + /// item defaults using the capability `completionList.itemDefaults`. + /// + /// If not provided and a list's default range is provided the label + /// property is used as a text. + /// + /// @since 3.17.0 + std::optional textEditText; + /// An optional array of additional text edits that are applied when + /// selecting this completion. Edits must not overlap (including the same + /// insert position) with the main edit nor with themselves. + /// + /// Additional text edits should be used to change text unrelated to the + /// current cursor position (for example adding an import statement at the + /// top of the file if the completion item will insert an unqualified type). + std::optional> additionalTextEdits; + /// An optional set of characters that when pressed while this completion is + /// active will accept it first and then type that character. *Note* that all + /// commit characters should have `length=1` and that superfluous characters + /// will be ignored. + std::optional> commitCharacters; + /// An optional command that is executed *after* inserting this completion. + /// *Note* that additional modifications to the current document should be + /// described with the additionalTextEdits-property. + // TODO - std::optional command; + /// A data entry field that is preserved on a completion item between + /// a completion and a completion resolve request. + // TODO - LSPAny for data }; +void to_json(json& j, const CompletionItem& obj); +void from_json(const json& j, CompletionItem& obj); + +// Represents a collection of [completion items](#CompletionItem) to be +// presented in the editor. struct CompletionList { - /// This list is not complete. Further typing should result in recomputing this list. + /// This list is not complete. Further typing should result in recomputing + /// this list. /// - /// Recomputed lists have all their items replaced (not appended) in the incomplete completion - /// sessions. - bool m_isIncomplete; + /// Recomputed lists have all their items replaced (not appended) in the + /// incomplete completion sessions. + bool isIncomplete; + // TODO - do itemDefaults /// The completion items. - std::vector m_items; + std::vector items; }; void to_json(json& j, const CompletionList& obj); diff --git a/lsp/protocol/document_synchronization.cpp b/lsp/protocol/document_synchronization.cpp index dedb08b800..2b1c53a606 100644 --- a/lsp/protocol/document_synchronization.cpp +++ b/lsp/protocol/document_synchronization.cpp @@ -32,3 +32,13 @@ void LSPSpec::to_json(json& j, const DidCloseTextDocumentParams& obj) { void LSPSpec::from_json(const json& j, DidCloseTextDocumentParams& obj) { j.at("textDocument").get_to(obj.m_textDocument); } + +void LSPSpec::to_json(json& j, const WillSaveTextDocumentParams& obj) { + json_serialize(textDocument); + json_serialize(reason); +} + +void LSPSpec::from_json(const json& j, WillSaveTextDocumentParams& obj) { + json_deserialize_if_exists(textDocument); + json_deserialize_if_exists(reason); +} diff --git a/lsp/protocol/document_synchronization.h b/lsp/protocol/document_synchronization.h index 476aa7c1b6..c331ee503d 100644 --- a/lsp/protocol/document_synchronization.h +++ b/lsp/protocol/document_synchronization.h @@ -32,4 +32,24 @@ struct DidCloseTextDocumentParams { void to_json(json& j, const DidCloseTextDocumentParams& obj); void from_json(const json& j, DidCloseTextDocumentParams& obj); +enum class TextDocumentSaveReason { + // Manually triggered, e.g. by the user pressing save, by starting debugging, or by an API call. + Manual = 1, + // Automatic after a delay. + AfterDelay = 2, + // When the editor lost focus. + FocusOut = 3, +}; + +// The parameters send in a will save text document notification. +struct WillSaveTextDocumentParams { + // The document that will be saved. + TextDocumentIdentifier textDocument; + // The 'TextDocumentSaveReason'. + TextDocumentSaveReason reason; +}; + +void to_json(json& j, const WillSaveTextDocumentParams& obj); +void from_json(const json& j, WillSaveTextDocumentParams& obj); + } // namespace LSPSpec diff --git a/lsp/protocol/progress_report.cpp b/lsp/protocol/progress_report.cpp index dcc315880b..d8ebbef79e 100644 --- a/lsp/protocol/progress_report.cpp +++ b/lsp/protocol/progress_report.cpp @@ -8,7 +8,7 @@ void LSPSpec::from_json(const json& j, WorkDoneProgressCreateParams& obj) { json_deserialize_if_exists(token); } -void LSPSpec::to_json(json& j, const ProgressPayloadBegin& obj) { +void LSPSpec::to_json(json& j, const WorkDoneProgressBegin& obj) { json_serialize(kind); json_serialize(title); json_serialize(cancellable); @@ -16,7 +16,7 @@ void LSPSpec::to_json(json& j, const ProgressPayloadBegin& obj) { json_serialize_optional(percentage); } -void LSPSpec::from_json(const json& j, ProgressPayloadBegin& obj) { +void LSPSpec::from_json(const json& j, WorkDoneProgressBegin& obj) { json_deserialize_if_exists(kind); json_deserialize_if_exists(title); json_deserialize_if_exists(cancellable); @@ -24,56 +24,43 @@ void LSPSpec::from_json(const json& j, ProgressPayloadBegin& obj) { json_deserialize_optional_if_exists(percentage); } -void LSPSpec::to_json(json& j, const ProgressParamsBegin& obj) { - json_serialize(token); - json_serialize(value); -} - -void LSPSpec::from_json(const json& j, ProgressParamsBegin& obj) { - json_deserialize_if_exists(token); - json_deserialize_if_exists(value); -} - -void LSPSpec::to_json(json& j, const ProgressPayloadReport& obj) { +void LSPSpec::to_json(json& j, const WorkDoneProgressReport& obj) { json_serialize(kind); json_serialize(cancellable); json_serialize_optional(message); json_serialize_optional(percentage); } -void LSPSpec::from_json(const json& j, ProgressPayloadReport& obj) { +void LSPSpec::from_json(const json& j, WorkDoneProgressReport& obj) { json_deserialize_if_exists(kind); json_deserialize_if_exists(cancellable); json_deserialize_optional_if_exists(message); json_deserialize_optional_if_exists(percentage); } -void LSPSpec::to_json(json& j, const ProgressParamsReport& obj) { - json_serialize(token); - json_serialize(value); -} - -void LSPSpec::from_json(const json& j, ProgressParamsReport& obj) { - json_deserialize_if_exists(token); - json_deserialize_if_exists(value); -} - -void LSPSpec::to_json(json& j, const ProgressPayloadEnd& obj) { +void LSPSpec::to_json(json& j, const WorkDoneProgressEnd& obj) { json_serialize(kind); json_serialize_optional(message); } -void LSPSpec::from_json(const json& j, ProgressPayloadEnd& obj) { +void LSPSpec::from_json(const json& j, WorkDoneProgressEnd& obj) { json_deserialize_if_exists(kind); json_deserialize_optional_if_exists(message); } -void LSPSpec::to_json(json& j, const ProgressParamsEnd& obj) { +void LSPSpec::to_json(json& j, const ProgressNotificationPayload& obj) { json_serialize(token); - json_serialize(value); + if (obj.beginValue) { + j["value"] = obj.beginValue.value(); + } else if (obj.reportValue) { + j["value"] = obj.reportValue.value(); + } else { + j["value"] = obj.endValue.value(); + } } -void LSPSpec::from_json(const json& j, ProgressParamsEnd& obj) { +void LSPSpec::from_json(const json& j, ProgressNotificationPayload& obj) { json_deserialize_if_exists(token); - json_deserialize_if_exists(value); + // TODO - not needed, but if so -- deserialize 'value', it's possible to figure out which is the + // right one } diff --git a/lsp/protocol/progress_report.h b/lsp/protocol/progress_report.h index 0e254c34ae..40a0f7ed0b 100644 --- a/lsp/protocol/progress_report.h +++ b/lsp/protocol/progress_report.h @@ -11,7 +11,7 @@ struct WorkDoneProgressCreateParams { void to_json(json& j, const WorkDoneProgressCreateParams& obj); void from_json(const json& j, WorkDoneProgressCreateParams& obj); -struct ProgressPayloadBegin { +struct WorkDoneProgressBegin { std::string kind = "begin"; // Mandatory title of the progress operation. Used to briefly inform about // the kind of operation being performed. @@ -36,20 +36,10 @@ struct ProgressPayloadBegin { // that are not following this rule. The value range is [0, 100] std::optional percentage; }; -void to_json(json& j, const ProgressPayloadBegin& obj); -void from_json(const json& j, ProgressPayloadBegin& obj); +void to_json(json& j, const WorkDoneProgressBegin& obj); +void from_json(const json& j, WorkDoneProgressBegin& obj); -struct ProgressParamsBegin { - // The progress token provided by the client or server. - std::string token; - // Payload - ProgressPayloadBegin value; -}; - -void to_json(json& j, const ProgressParamsBegin& obj); -void from_json(const json& j, ProgressParamsBegin& obj); - -struct ProgressPayloadReport { +struct WorkDoneProgressReport { std::string kind = "report"; // Controls enablement state of a cancel button. This property is only valid // if a cancel button got requested in the `WorkDoneProgressBegin` payload. @@ -71,35 +61,25 @@ struct ProgressPayloadReport { // that are not following this rule. The value range is [0, 100] std::optional percentage; }; -void to_json(json& j, const ProgressPayloadReport& obj); -void from_json(const json& j, ProgressPayloadReport& obj); - -struct ProgressParamsReport { - // The progress token provided by the client or server. - std::string token; - // Payload - ProgressPayloadReport value; -}; - -void to_json(json& j, const ProgressParamsReport& obj); -void from_json(const json& j, ProgressParamsReport& obj); +void to_json(json& j, const WorkDoneProgressReport& obj); +void from_json(const json& j, WorkDoneProgressReport& obj); -struct ProgressPayloadEnd { +struct WorkDoneProgressEnd { std::string kind = "end"; // Optional, a final message indicating to for example indicate the outcome // of the operation. std::optional message; }; -void to_json(json& j, const ProgressPayloadEnd& obj); -void from_json(const json& j, ProgressPayloadEnd& obj); +void to_json(json& j, const WorkDoneProgressEnd& obj); +void from_json(const json& j, WorkDoneProgressEnd& obj); -struct ProgressParamsEnd { - // The progress token provided by the client or server. +struct ProgressNotificationPayload { std::string token; - // Payload - ProgressPayloadEnd value; + std::optional beginValue; + std::optional reportValue; + std::optional endValue; }; +void to_json(json& j, const ProgressNotificationPayload& obj); +void from_json(const json& j, ProgressNotificationPayload& obj); -void to_json(json& j, const ProgressParamsEnd& obj); -void from_json(const json& j, ProgressParamsEnd& obj); } // namespace LSPSpec diff --git a/lsp/protocol/type_hierarchy.cpp b/lsp/protocol/type_hierarchy.cpp new file mode 100644 index 0000000000..a150239227 --- /dev/null +++ b/lsp/protocol/type_hierarchy.cpp @@ -0,0 +1,50 @@ +#include "type_hierarchy.h" + +#include "common/util/json_util.h" + +// TODO - there's gotta be a way to share json serialization/deserialization +// figure it out _soon_ +void LSPSpec::to_json(json& j, const TypeHierarchyPrepareParams& obj) { + j = json{{"textDocument", obj.m_textDocument}, {"position", obj.m_position}}; +} + +void LSPSpec::from_json(const json& j, TypeHierarchyPrepareParams& obj) { + j.at("textDocument").get_to(obj.m_textDocument); + j.at("position").get_to(obj.m_position); +} + +void LSPSpec::to_json(json& j, const TypeHierarchyItem& obj) { + json_serialize(name); + json_serialize(kind); + json_serialize_optional(tags); + json_serialize_optional(detail); + json_serialize(uri); + json_serialize(range); + json_serialize(selectionRange); +} + +void LSPSpec::from_json(const json& j, TypeHierarchyItem& obj) { + json_deserialize_if_exists(name); + json_deserialize_if_exists(kind); + json_deserialize_optional_if_exists(tags); + json_deserialize_optional_if_exists(detail); + json_deserialize_if_exists(uri); + json_deserialize_if_exists(range); + json_deserialize_if_exists(selectionRange); +} + +void LSPSpec::to_json(json& j, const TypeHierarchySupertypesParams& obj) { + json_serialize(item); +} + +void LSPSpec::from_json(const json& j, TypeHierarchySupertypesParams& obj) { + json_deserialize_if_exists(item); +} + +void LSPSpec::to_json(json& j, const TypeHierarchySubtypesParams& obj) { + json_serialize(item); +} + +void LSPSpec::from_json(const json& j, TypeHierarchySubtypesParams& obj) { + json_deserialize_if_exists(item); +} diff --git a/lsp/protocol/type_hierarchy.h b/lsp/protocol/type_hierarchy.h new file mode 100644 index 0000000000..305b0d5cb5 --- /dev/null +++ b/lsp/protocol/type_hierarchy.h @@ -0,0 +1,56 @@ +#pragma once + +#include "common_types.h" + +#include "lsp/protocol/document_symbols.h" + +namespace LSPSpec { + +struct TypeHierarchyPrepareParams : TextDocumentPositionParams {}; + +void to_json(json& j, const TypeHierarchyPrepareParams& obj); +void from_json(const json& j, TypeHierarchyPrepareParams& obj); + +struct TypeHierarchyItem { + /// The name of this item. + std::string name; + /// The kind of this item. + SymbolKind kind; + /// Tags for this item. + std::optional> tags; + /// More detail for this item, e.g. the signature of a function. + std::optional detail; + /// The resource identifier of this item. + DocumentUri uri; + /// The range enclosing this symbol not including leading/trailing whitespace + /// but everything else, e.g. comments and code. + Range range; + /// The range that should be selected and revealed when this symbol is being + /// picked, e.g. the name of a function. Must be contained by the + /// `range` of this + Range selectionRange; + /// A data entry field that is preserved between a type hierarchy prepare and + /// supertypes or subtypes requests. It could also be used to identify the + /// type hierarchy in the server, helping improve the performance on + /// resolving supertypes and subtypes. + // ANY data; +}; + +void to_json(json& j, const TypeHierarchyItem& obj); +void from_json(const json& j, TypeHierarchyItem& obj); + +struct TypeHierarchySupertypesParams { + TypeHierarchyItem item; +}; + +void to_json(json& j, const TypeHierarchySupertypesParams& obj); +void from_json(const json& j, TypeHierarchySupertypesParams& obj); + +struct TypeHierarchySubtypesParams { + TypeHierarchyItem item; +}; + +void to_json(json& j, const TypeHierarchySubtypesParams& obj); +void from_json(const json& j, TypeHierarchySubtypesParams& obj); + +} // namespace LSPSpec diff --git a/lsp/state/app.h b/lsp/state/app.h index 62ae4604b9..6e2a1f6761 100644 --- a/lsp/state/app.h +++ b/lsp/state/app.h @@ -2,6 +2,7 @@ #include "lsp/state/workspace.h" +// TODO - remove this, not really benefiting (never going to have multiple appstates) struct AppState { Workspace workspace; bool verbose; diff --git a/lsp/state/lsp_requester.cpp b/lsp/state/lsp_requester.cpp index 4b95ed580d..060a6a28f2 100644 --- a/lsp/state/lsp_requester.cpp +++ b/lsp/state/lsp_requester.cpp @@ -42,35 +42,49 @@ void LSPRequester::send_notification(const json& params, const std::string& meth std::cout << request.c_str() << std::flush; } -void LSPRequester::send_progress_create_request(const std::string& token, - const std::string& title) { - LSPSpec::WorkDoneProgressCreateParams params; - params.token = token; - send_request(params, "window/workDoneProgress/create"); - LSPSpec::ProgressPayloadBegin beginPayload; +void LSPRequester::send_progress_create_request(const std::string& title, + const std::string& message, + const int percentage) { + const std::string token = fmt::format("opengoal/{}", title); + LSPSpec::WorkDoneProgressCreateParams createRequest; + createRequest.token = token; + send_request(createRequest, "window/workDoneProgress/create"); + LSPSpec::WorkDoneProgressBegin beginPayload; beginPayload.title = title; - LSPSpec::ProgressParamsBegin beginParams; - beginParams.token = token; - beginParams.value = beginPayload; - send_notification(beginParams, "$/progress"); + beginPayload.cancellable = false; // TODO - maybe one day + beginPayload.message = message; + if (percentage > 0) { + beginPayload.percentage = percentage; + } + LSPSpec::ProgressNotificationPayload notification; + notification.token = token; + notification.beginValue = beginPayload; + send_notification(notification, "$/progress"); } -void LSPRequester::send_progress_update_request(const std::string& token, - const std::string& message) { - LSPSpec::ProgressPayloadReport reportPayload; +void LSPRequester::send_progress_update_request(const std::string& title, + const std::string& message, + const int percentage) { + const std::string token = fmt::format("opengoal/{}", title); + LSPSpec::WorkDoneProgressReport reportPayload; + reportPayload.cancellable = false; // TODO - maybe one day reportPayload.message = message; - LSPSpec::ProgressParamsReport reportParams; - reportParams.token = token; - reportParams.value = reportPayload; - send_notification(reportParams, "$/progress"); + if (percentage > 0) { + reportPayload.percentage = percentage; + } + LSPSpec::ProgressNotificationPayload notification; + notification.token = token; + notification.reportValue = reportPayload; + send_notification(notification, "$/progress"); } -void LSPRequester::send_progress_finish_request(const std::string& token, +void LSPRequester::send_progress_finish_request(const std::string& title, const std::string& message) { - LSPSpec::ProgressPayloadEnd endPayload; + const std::string token = fmt::format("opengoal/{}", title); + LSPSpec::WorkDoneProgressEnd endPayload; endPayload.message = message; - LSPSpec::ProgressParamsEnd endParams; - endParams.token = token; - endParams.value = endPayload; - send_notification(endParams, "$/progress"); + LSPSpec::ProgressNotificationPayload notification; + notification.token = token; + notification.endValue = endPayload; + send_notification(notification, "$/progress"); } diff --git a/lsp/state/lsp_requester.h b/lsp/state/lsp_requester.h index 4798650468..c335ed8ac3 100644 --- a/lsp/state/lsp_requester.h +++ b/lsp/state/lsp_requester.h @@ -9,9 +9,13 @@ class LSPRequester { public: - void send_progress_create_request(const std::string& token, const std::string& title); - void send_progress_update_request(const std::string& token, const std::string& message); - void send_progress_finish_request(const std::string& token, const std::string& message); + void send_progress_create_request(const std::string& title, + const std::string& message, + const int percentage); + void send_progress_update_request(const std::string& title, + const std::string& message, + const int percentage); + void send_progress_finish_request(const std::string& title, const std::string& message); private: void send_request(const json& payload, const std::string& method); diff --git a/lsp/state/workspace.cpp b/lsp/state/workspace.cpp index 6f9599365d..4ea3bc4c3b 100644 --- a/lsp/state/workspace.cpp +++ b/lsp/state/workspace.cpp @@ -1,86 +1,23 @@ #include "workspace.h" -#include #include -#include #include "common/log/log.h" +#include "common/util/FileUtil.h" +#include "common/util/ast_util.h" #include "common/util/string_util.h" +#include "lsp/lsp_util.h" #include "lsp/protocol/common_types.h" +#include "tree_sitter/api.h" -std::string url_encode(const std::string& value) { - std::ostringstream escaped; - escaped.fill('0'); - escaped << std::hex; - - for (std::string::const_iterator i = value.begin(), n = value.end(); i != n; ++i) { - std::string::value_type c = (*i); - - // Keep alphanumeric and other accepted characters intact - if (isalnum(c) || c == '-' || c == '_' || c == '.' || c == '~' || c == '/') { - escaped << c; - continue; - } - - // Any other characters are percent-encoded - escaped << std::uppercase; - escaped << '%' << std::setw(2) << int((unsigned char)c); - escaped << std::nouppercase; - } - - return escaped.str(); -} - -std::string url_decode(const std::string& input) { - std::ostringstream decoded; - - for (std::size_t i = 0; i < input.length(); ++i) { - if (input[i] == '%') { - // Check if there are enough characters remaining - if (i + 2 < input.length()) { - // Convert the next two characters after '%' into an integer value - std::istringstream hexStream(input.substr(i + 1, 2)); - int hexValue = 0; - hexStream >> std::hex >> hexValue; - - // Append the decoded character to the result - decoded << static_cast(hexValue); - - // Skip the next two characters - i += 2; - } - } else if (input[i] == '+') { - // Replace '+' with space character ' ' - decoded << ' '; - } else { - // Append the character as is - decoded << input[i]; - } - } - - return decoded.str(); -} - -LSPSpec::DocumentUri uri_from_path(fs::path path) { - auto path_str = file_util::convert_to_unix_path_separators(path.string()); - // vscode works with proper URL encoded URIs for file paths - // which means we have to roll our own... - path_str = url_encode(path_str); - return fmt::format("file:///{}", path_str); +// Declare the `tree_sitter_opengoal` function, which is +// implemented by the `tree-sitter-opengoal` library. +extern "C" { +extern const TSLanguage* tree_sitter_opengoal(); } -std::string uri_to_path(LSPSpec::DocumentUri uri) { - auto decoded_uri = url_decode(uri); - if (str_util::starts_with(decoded_uri, "file:///")) { -#ifdef _WIN32 - decoded_uri = decoded_uri.substr(8); -#else - decoded_uri = decoded_uri.substr(7); -#endif - } - return decoded_uri; -} +const TSLanguage* g_opengoalLang = tree_sitter_opengoal(); Workspace::Workspace(){}; Workspace::~Workspace(){}; @@ -111,18 +48,22 @@ Workspace::FileType Workspace::determine_filetype_from_uri(const LSPSpec::Docume return FileType::Unsupported; } -std::optional Workspace::get_tracked_og_file(const LSPSpec::URI& file_uri) { - if (m_tracked_og_files.find(file_uri) == m_tracked_og_files.end()) { - return {}; +std::optional> Workspace::get_tracked_og_file( + const LSPSpec::URI& file_uri) { + auto it = m_tracked_og_files.find(file_uri); + if (it == m_tracked_og_files.end()) { + return std::nullopt; } - return m_tracked_og_files[file_uri]; + return std::ref(it->second); } -std::optional Workspace::get_tracked_ir_file(const LSPSpec::URI& file_uri) { - if (m_tracked_ir_files.count(file_uri) == 0) { - return {}; +std::optional> Workspace::get_tracked_ir_file( + const LSPSpec::URI& file_uri) { + auto it = m_tracked_ir_files.find(file_uri); + if (it == m_tracked_ir_files.end()) { + return std::nullopt; } - return m_tracked_ir_files[file_uri]; + return std::ref(it->second); } std::optional Workspace::get_definition_info_from_all_types( @@ -143,18 +84,34 @@ std::optional Workspace::get_definition_info_from_all_types( // // This is bad because jak 2 now uses some code from the jak1 folder, and also wouldn't be able to // be determined (jak1 or jak2?) if we had a proper 'common' folder(s). -std::optional determine_game_version_from_uri(const LSPSpec::DocumentUri& uri) { - const auto path = uri_to_path(uri); +std::optional Workspace::determine_game_version_from_uri( + const LSPSpec::DocumentUri& uri) { + const auto path = lsp_util::uri_to_path(uri); if (str_util::contains(path, "goal_src/jak1")) { return GameVersion::Jak1; } else if (str_util::contains(path, "goal_src/jak2")) { return GameVersion::Jak2; + } else if (str_util::contains(path, "goal_src/jak3")) { + return GameVersion::Jak3; } return {}; } -std::optional Workspace::get_global_symbol_info(const WorkspaceOGFile& file, - const std::string& symbol_name) { +std::vector Workspace::get_symbols_starting_with( + const GameVersion game_version, + const std::string& symbol_prefix) { + if (m_compiler_instances.find(game_version) == m_compiler_instances.end()) { + lg::debug("Compiler not instantiated for game version - {}", + version_to_game_name(game_version)); + return {}; + } + const auto& compiler = m_compiler_instances[game_version].get(); + return compiler->lookup_symbol_info_by_prefix(symbol_prefix); +} + +std::optional Workspace::get_global_symbol_info( + const WorkspaceOGFile& file, + const std::string& symbol_name) { if (m_compiler_instances.find(file.m_game_version) == m_compiler_instances.end()) { lg::debug("Compiler not instantiated for game version - {}", version_to_game_name(file.m_game_version)); @@ -162,19 +119,21 @@ std::optional Workspace::get_global_symbol_info(const WorkspaceOGFil } const auto& compiler = m_compiler_instances[file.m_game_version].get(); const auto symbol_infos = compiler->lookup_exact_name_info(symbol_name); - if (!symbol_infos || symbol_infos->empty()) { + if (symbol_infos.empty()) { return {}; - } else if (symbol_infos->size() > 1) { + } else if (symbol_infos.size() > 1) { // TODO - handle this (overriden methods is the main issue here) - lg::debug("Found symbol info, but found multiple infos - {}", symbol_infos->size()); + lg::debug("Found symbol info, but found multiple infos - {}", symbol_infos.size()); return {}; } - const auto& symbol = symbol_infos->at(0); + const auto& symbol = symbol_infos.at(0); return symbol; } -std::optional Workspace::get_symbol_typespec(const WorkspaceOGFile& file, - const std::string& symbol_name) { +// TODO - consolidate what is needed into `SymbolInfo` +std::optional> Workspace::get_symbol_typeinfo( + const WorkspaceOGFile& file, + const std::string& symbol_name) { if (m_compiler_instances.find(file.m_game_version) == m_compiler_instances.end()) { lg::debug("Compiler not instantiated for game version - {}", version_to_game_name(file.m_game_version)); @@ -183,30 +142,120 @@ std::optional Workspace::get_symbol_typespec(const WorkspaceOGFile& fi const auto& compiler = m_compiler_instances[file.m_game_version].get(); const auto typespec = compiler->lookup_typespec(symbol_name); if (typespec) { - return typespec; + // NOTE - for some reason calling with the symbol's typespec and the symbol itself produces + // different results! + const auto full_type_info = compiler->type_system().lookup_type_no_throw(symbol_name); + if (full_type_info != nullptr) { + return std::make_pair(typespec.value(), full_type_info); + } } return {}; } -std::optional Workspace::get_symbol_def_location( +std::optional Workspace::get_symbol_def_location( const WorkspaceOGFile& file, - const SymbolInfo& symbol_info) { - if (m_compiler_instances.find(file.m_game_version) == m_compiler_instances.end()) { + const symbol_info::SymbolInfo* symbol_info) { + const auto& def_loc = symbol_info->m_def_location; + if (!def_loc) { + return {}; + } + return def_loc; +} + +std::vector> +Workspace::get_symbols_parent_type_path(const std::string& symbol_name, + const GameVersion game_version) { + if (m_compiler_instances.find(game_version) == m_compiler_instances.end()) { lg::debug("Compiler not instantiated for game version - {}", - version_to_game_name(file.m_game_version)); + version_to_game_name(game_version)); return {}; } - const auto& compiler = m_compiler_instances[file.m_game_version].get(); - std::optional def_loc; - const auto& goos_info = compiler->get_goos().reader.db.get_short_info_for(symbol_info.src_form()); - if (goos_info) { + + // name, docstring, def_loc + std::vector> parents = {}; + + const auto& compiler = m_compiler_instances[game_version].get(); + const auto parent_path = compiler->type_system().get_path_up_tree(symbol_name); + for (const auto& parent : parent_path) { + const auto symbol_infos = compiler->lookup_exact_name_info(parent); + if (symbol_infos.empty()) { + continue; + } + symbol_info::SymbolInfo* symbol_info; + if (symbol_infos.size() > 1) { + for (const auto& info : symbol_infos) { + if (info->m_kind == symbol_info::Kind::TYPE) { + symbol_info = info; + } + } + } else { + symbol_info = symbol_infos.at(0); + } + if (!symbol_info) { + continue; + } + const auto& def_loc = symbol_info->m_def_location; + if (!def_loc) { + continue; + } Docs::DefinitionLocation new_def_loc; - new_def_loc.filename = uri_from_path(goos_info->filename); - new_def_loc.line_idx = goos_info->line_idx_to_display; - new_def_loc.char_idx = goos_info->pos_in_line; - def_loc = new_def_loc; + new_def_loc.filename = lsp_util::uri_from_path(def_loc->file_path); + new_def_loc.line_idx = def_loc->line_idx; + new_def_loc.char_idx = def_loc->char_idx; + parents.push_back({parent, symbol_info->m_docstring, new_def_loc}); } - return def_loc; + return parents; +} + +std::vector> +Workspace::get_types_subtypes(const std::string& symbol_name, const GameVersion game_version) { + if (m_compiler_instances.find(game_version) == m_compiler_instances.end()) { + lg::debug("Compiler not instantiated for game version - {}", + version_to_game_name(game_version)); + return {}; + } + + // name, docstring, def_loc + std::vector> subtypes = {}; + + const auto& compiler = m_compiler_instances[game_version].get(); + const auto subtype_names = + compiler->type_system().search_types_by_parent_type_strict(symbol_name); + for (const auto& subtype_name : subtype_names) { + const auto symbol_infos = compiler->lookup_exact_name_info(subtype_name); + if (symbol_infos.empty()) { + continue; + } else if (symbol_infos.size() > 1) { + continue; + } + const auto& symbol_info = symbol_infos.at(0); + const auto& def_loc = symbol_info->m_def_location; + if (!def_loc) { + continue; + } + Docs::DefinitionLocation new_def_loc; + new_def_loc.filename = lsp_util::uri_from_path(def_loc->file_path); + new_def_loc.line_idx = def_loc->line_idx; + new_def_loc.char_idx = def_loc->char_idx; + subtypes.push_back({subtype_name, symbol_info->m_docstring, new_def_loc}); + } + return subtypes; +} + +std::unordered_map Workspace::get_enum_entries(const std::string& enum_name, + const GameVersion game_version) { + if (m_compiler_instances.find(game_version) == m_compiler_instances.end()) { + lg::debug("Compiler not instantiated for game version - {}", + version_to_game_name(game_version)); + return {}; + } + + const auto& compiler = m_compiler_instances[game_version].get(); + const auto enum_info = compiler->type_system().try_enum_lookup(enum_name); + if (!enum_info) { + return {}; + } + return enum_info->entries(); } void Workspace::start_tracking_file(const LSPSpec::DocumentUri& file_uri, @@ -225,33 +274,51 @@ void Workspace::start_tracking_file(const LSPSpec::DocumentUri& file_uri, } } } else if (language_id == "opengoal") { + if (m_tracked_og_files.find(file_uri) != m_tracked_og_files.end()) { + lg::debug("Already tracking - {}", file_uri); + return; + } auto game_version = determine_game_version_from_uri(file_uri); if (!game_version) { lg::debug("Could not determine game version from path - {}", file_uri); return; } - // TODO - this should happen on a separate thread so the LSP is not blocking during this lengthy - // step + if (m_compiler_instances.find(*game_version) == m_compiler_instances.end()) { lg::debug( "first time encountering a OpenGOAL file for game version - {}, initializing a compiler", version_to_game_name(*game_version)); - const auto project_path = file_util::try_get_project_path_from_path(uri_to_path(file_uri)); + const auto project_path = + file_util::try_get_project_path_from_path(lsp_util::uri_to_path(file_uri)); lg::debug("Detected project path - {}", project_path.value()); if (!file_util::setup_project_path(project_path)) { lg::debug("unable to setup project path, not initializing a compiler"); return; } - m_requester.send_progress_create_request("indexing-jak2", "Indexing - Jak 2"); + const std::string progress_title = + fmt::format("Compiling {}", version_to_game_name_external(game_version.value())); + m_requester.send_progress_create_request(progress_title, "compiling project", -1); m_compiler_instances.emplace(game_version.value(), std::make_unique(game_version.value())); - // TODO - if this fails, annotate some errors, adjust progress - m_compiler_instances.at(*game_version)->run_front_end_on_string("(make-group \"all-code\")"); - m_requester.send_progress_finish_request("indexing-jak2", "Indexed - Jak 2"); + try { + // TODO - this should happen on a separate thread so the LSP is not blocking during this + // lengthy step + // TODO - make this a setting (disable indexing) + // TODO - ask water if there is a fancy way to reduce memory usage (disabling coloring, + // etc?) + m_compiler_instances.at(*game_version) + ->run_front_end_on_string("(make-group \"all-code\")"); + m_requester.send_progress_finish_request(progress_title, "indexed"); + } catch (std::exception& e) { + // TODO - If it fails, annotate errors (DIAGNOSTIC TODO) + m_requester.send_progress_finish_request(progress_title, "failed"); + lg::debug("error when {}", progress_title); + } } - // TODO - otherwise, just `ml` the file instead of rebuilding the entire thing - // TODO - if the file fails to `ml`, annotate some errors - m_tracked_og_files[file_uri] = WorkspaceOGFile(content, *game_version); + m_tracked_og_files.emplace(file_uri, WorkspaceOGFile(file_uri, content, *game_version)); + m_tracked_og_files[file_uri].update_symbols( + m_compiler_instances.at(*game_version) + ->lookup_symbol_info_by_file(lsp_util::uri_to_path(file_uri))); } } @@ -260,7 +327,7 @@ void Workspace::update_tracked_file(const LSPSpec::DocumentUri& file_uri, lg::debug("potentially updating - {}", file_uri); // Check if the file is already tracked or not, this is done because change events don't give // language details it's assumed you are keeping track of that! - if (m_tracked_ir_files.count(file_uri) != 0) { + if (m_tracked_ir_files.find(file_uri) != m_tracked_ir_files.end()) { lg::debug("updating tracked IR file - {}", file_uri); WorkspaceIRFile file(content); m_tracked_ir_files[file_uri] = file; @@ -274,52 +341,209 @@ void Workspace::update_tracked_file(const LSPSpec::DocumentUri& file_uri, all_types_file->m_game_version = file.m_game_version; all_types_file->update_type_system(); } - } - - if (m_tracked_all_types_files.count(file_uri) != 0) { + } else if (m_tracked_all_types_files.find(file_uri) != m_tracked_all_types_files.end()) { lg::debug("updating tracked all types file - {}", file_uri); // If the all-types file has changed, re-parse it // NOTE - this assumes its still for the same game version! m_tracked_all_types_files[file_uri]->update_type_system(); + } else if (m_tracked_og_files.find(file_uri) != m_tracked_og_files.end()) { + lg::debug("updating tracked OG file - {}", file_uri); + m_tracked_og_files[file_uri].parse_content(content); + // re-`ml` the file + const auto game_version = m_tracked_og_files[file_uri].m_game_version; + if (m_compiler_instances.find(game_version) == m_compiler_instances.end()) { + lg::debug("No compiler initialized for - {}", version_to_game_name(game_version)); + return; + } + } +} + +void Workspace::tracked_file_will_save(const LSPSpec::DocumentUri& file_uri) { + lg::debug("file will be saved - {}", file_uri); + if (m_tracked_og_files.find(file_uri) != m_tracked_og_files.end()) { + // goalc is not an incremental compiler (yet) so I believe it will be a better UX + // to re-compile on the file save, rather than as the user is typing + const auto game_version = m_tracked_og_files[file_uri].m_game_version; + if (m_compiler_instances.find(game_version) == m_compiler_instances.end()) { + lg::debug("No compiler initialized for - {}", version_to_game_name(game_version)); + return; + } + CompilationOptions options; + options.filename = lsp_util::uri_to_path(file_uri); + // re-compile the file + m_compiler_instances.at(game_version)->asm_file(options); + // Update symbols for this specific file + const auto symbol_infos = + m_compiler_instances.at(game_version)->lookup_symbol_info_by_file(options.filename); + m_tracked_og_files[file_uri].update_symbols(symbol_infos); } +} + +void Workspace::update_global_index(const GameVersion game_version){ + // TODO - project wide indexing potentially (ie. finding references) }; void Workspace::stop_tracking_file(const LSPSpec::DocumentUri& file_uri) { - if (m_tracked_ir_files.count(file_uri) != 0) { - m_tracked_ir_files.erase(file_uri); - } - if (m_tracked_all_types_files.count(file_uri) != 0) { - m_tracked_all_types_files.erase(file_uri); + m_tracked_ir_files.erase(file_uri); + m_tracked_all_types_files.erase(file_uri); + m_tracked_og_files.erase(file_uri); +} + +WorkspaceOGFile::WorkspaceOGFile(const LSPSpec::DocumentUri& uri, + const std::string& content, + const GameVersion& game_version) + : m_uri(uri), m_game_version(game_version), version(0) { + const auto [line_count, line_ending] = + file_util::get_majority_file_line_endings_and_count(content); + m_line_count = line_count; + m_line_ending = line_ending; + lg::info("Added new OG file. {} symbols and {} diagnostics", m_symbols.size(), + m_diagnostics.size()); + parse_content(content); +} + +void WorkspaceOGFile::parse_content(const std::string& content) { + m_content = content; + auto parser = ts_parser_new(); + if (ts_parser_set_language(parser, g_opengoalLang)) { + // Get the AST for the current state of the file + // TODO - eventually, we should consider doing partial updates of the AST + // but right now the LSP just receives the entire document so that's a larger change. + m_ast.reset(ts_parser_parse_string(parser, NULL, m_content.c_str(), m_content.length()), + TreeSitterTreeDeleter()); } + ts_parser_delete(parser); } -WorkspaceOGFile::WorkspaceOGFile(const std::string& content, const GameVersion& game_version) - : m_content(content), m_game_version(game_version) { - const auto line_ending = file_util::get_majority_file_line_endings(content); - m_lines = str_util::split_string(content, line_ending); - lg::info("Added new OG file. {} lines with {} symbols and {} diagnostics", m_lines.size(), - m_symbols.size(), m_diagnostics.size()); +void WorkspaceOGFile::update_symbols(const std::vector& symbol_infos) { + m_symbols.clear(); + // TODO - sorting by definition location would be nice (maybe VSCode already does this?) + for (const auto& symbol_info : symbol_infos) { + LSPSpec::DocumentSymbol lsp_sym; + lsp_sym.m_name = symbol_info->m_name; + lsp_sym.m_detail = symbol_info->m_docstring; + switch (symbol_info->m_kind) { + case symbol_info::Kind::CONSTANT: + lsp_sym.m_kind = LSPSpec::SymbolKind::Constant; + break; + case symbol_info::Kind::FUNCTION: + lsp_sym.m_kind = LSPSpec::SymbolKind::Function; + break; + case symbol_info::Kind::GLOBAL_VAR: + lsp_sym.m_kind = LSPSpec::SymbolKind::Variable; + break; + case symbol_info::Kind::MACRO: + lsp_sym.m_kind = LSPSpec::SymbolKind::Operator; + break; + case symbol_info::Kind::METHOD: + lsp_sym.m_name = fmt::format("{}::{}", symbol_info->m_type, symbol_info->m_name); + lsp_sym.m_kind = LSPSpec::SymbolKind::Method; + break; + case symbol_info::Kind::TYPE: + lsp_sym.m_kind = LSPSpec::SymbolKind::Class; + break; + default: + lsp_sym.m_kind = LSPSpec::SymbolKind::Object; + break; + } + if (symbol_info->m_def_location) { + lsp_sym.m_range = LSPSpec::Range(symbol_info->m_def_location->line_idx, + symbol_info->m_def_location->char_idx); + } else { + lsp_sym.m_range = LSPSpec::Range(0, 0); + } + // TODO - would be nice to make this accurate but we don't store that info yet + lsp_sym.m_selectionRange = lsp_sym.m_range; + if (symbol_info->m_kind == symbol_info::Kind::TYPE) { + std::vector type_symbols = {}; + for (const auto& field : symbol_info->m_type_fields) { + LSPSpec::DocumentSymbol field_sym; + field_sym.m_name = field.name; + field_sym.m_detail = field.description; + if (field.is_array) { + field_sym.m_kind = LSPSpec::SymbolKind::Array; + } else { + field_sym.m_kind = LSPSpec::SymbolKind::Field; + } + // TODO - we don't store the line number for fields + field_sym.m_range = lsp_sym.m_range; + field_sym.m_selectionRange = lsp_sym.m_selectionRange; + type_symbols.push_back(field_sym); + } + for (const auto& method : symbol_info->m_type_methods) { + LSPSpec::DocumentSymbol method_sym; + method_sym.m_name = method.name; + method_sym.m_kind = LSPSpec::SymbolKind::Method; + // TODO - we don't store the line number for fields + method_sym.m_range = lsp_sym.m_range; + method_sym.m_selectionRange = lsp_sym.m_selectionRange; + type_symbols.push_back(method_sym); + } + for (const auto& state : symbol_info->m_type_states) { + LSPSpec::DocumentSymbol state_sym; + state_sym.m_name = state.name; + state_sym.m_kind = LSPSpec::SymbolKind::Event; + // TODO - we don't store the line number for fields + state_sym.m_range = lsp_sym.m_range; + state_sym.m_selectionRange = lsp_sym.m_selectionRange; + type_symbols.push_back(state_sym); + } + lsp_sym.m_children = type_symbols; + } + m_symbols.push_back(lsp_sym); + } } std::optional WorkspaceOGFile::get_symbol_at_position( const LSPSpec::Position position) const { - // Split the line on typical word boundaries - std::string line = m_lines.at(position.m_line); - std::smatch matches; - std::regex regex("[\\w\\.\\-_!<>*?]+"); - std::regex_token_iterator rend; + if (m_ast) { + TSNode root_node = ts_tree_root_node(m_ast.get()); + TSNode found_node = + ts_node_descendant_for_point_range(root_node, {position.m_line, position.m_character}, + {position.m_line, position.m_character}); + if (!ts_node_has_error(found_node)) { + uint32_t start = ts_node_start_byte(found_node); + uint32_t end = ts_node_end_byte(found_node); + const std::string node_str = m_content.substr(start, end - start); + lg::debug("AST SAP - {}", node_str); + const std::string node_name = ts_node_type(found_node); + if (node_name == "sym_name") { + return node_str; + } + } else { + // found_node = ts_node_child(found_node, 0); + // TODO - maybe get this one (but check if has an error) + return {}; + } + } + return {}; +} - std::regex_token_iterator match(line.begin(), line.end(), regex); - while (match != rend) { - auto match_start = std::distance(line.begin(), match->first); - auto match_end = match_start + match->length(); - if (position.m_character >= match_start && position.m_character <= match_end) { - return match->str(); +std::vector WorkspaceOGFile::search_for_forms_that_begin_with( + std::vector prefix) const { + std::vector results = {}; + if (!m_ast) { + return results; + } + + TSNode root_node = ts_tree_root_node(m_ast.get()); + std::vector found_nodes = {}; + ast_util::search_for_forms_that_begin_with(m_content, root_node, prefix, found_nodes); + + for (const auto& node : found_nodes) { + std::vector tokens = {}; + for (size_t i = 0; i < ts_node_child_count(node); i++) { + const auto child_node = ts_node_child(node, i); + const auto contents = ast_util::get_source_code(m_content, child_node); + tokens.push_back(contents); } - match++; + const auto start_point = ts_node_start_point(node); + const auto end_point = ts_node_end_point(node); + results.push_back( + {tokens, {start_point.row, start_point.column}, {end_point.row, end_point.column}}); } - return {}; + return results; } WorkspaceIRFile::WorkspaceIRFile(const std::string& content) { @@ -356,7 +580,7 @@ void WorkspaceIRFile::find_all_types_path(const std::string& line) { const auto& game_version = matches[1]; const auto& all_types_path = matches[2]; lg::debug("Found DTS Path - {} : {}", game_version.str(), all_types_path.str()); - auto all_types_uri = uri_from_path(fs::path(all_types_path.str())); + auto all_types_uri = lsp_util::uri_from_path(fs::path(all_types_path.str())); lg::debug("DTS URI - {}", all_types_uri); if (valid_game_version(game_version.str())) { m_game_version = game_name_to_version(game_version.str()); @@ -381,8 +605,6 @@ void WorkspaceIRFile::find_function_symbol(const uint32_t line_num_zero_based, lg::info("Adding Symbol - {}", match.str()); LSPSpec::DocumentSymbol new_symbol; new_symbol.m_name = match.str(); - // TODO - function doc-string - // new_symbol.m_detail = ... new_symbol.m_kind = LSPSpec::SymbolKind::Function; LSPSpec::Range symbol_range; symbol_range.m_start = {line_num_zero_based, 0}; diff --git a/lsp/state/workspace.h b/lsp/state/workspace.h index 997a9bb6c5..826129f214 100644 --- a/lsp/state/workspace.h +++ b/lsp/state/workspace.h @@ -2,6 +2,7 @@ #include #include +#include #include #include "common/util/FileUtil.h" @@ -14,20 +15,49 @@ #include "lsp/protocol/document_symbols.h" #include "lsp/state/lsp_requester.h" +#include "third-party/tree-sitter/tree-sitter/lib/src/tree.h" + +// TODO - +// https://sourcegraph.com/github.com/ensisoft/detonator@36f626caf957d0734865a8f5641be6170d997f45/-/blob/editor/app/lua-tools.cpp?L116:15-116:30 + +struct TreeSitterTreeDeleter { + void operator()(TSTree* ptr) const { ts_tree_delete(ptr); } +}; + +struct OpenGOALFormResult { + std::vector tokens; + std::pair start_point; + std::pair end_point; +}; + +struct OGGlobalIndex { + std::unordered_map global_symbols = {}; + std::unordered_map per_file_symbols = {}; +}; + class WorkspaceOGFile { public: WorkspaceOGFile(){}; - WorkspaceOGFile(const std::string& content, const GameVersion& game_version); - // TODO - make private - int32_t version; - // TODO - keep an AST of the file instead + WorkspaceOGFile(const LSPSpec::DocumentUri& uri, + const std::string& content, + const GameVersion& game_version); + LSPSpec::DocumentUri m_uri; std::string m_content; - std::vector m_lines; + int m_line_count = 0; + std::string m_line_ending; + GameVersion m_game_version; std::vector m_symbols; std::vector m_diagnostics; - GameVersion m_game_version; + void parse_content(const std::string& new_content); + void update_symbols(const std::vector& symbol_infos); std::optional get_symbol_at_position(const LSPSpec::Position position) const; + std::vector search_for_forms_that_begin_with( + std::vector prefix) const; + + private: + int32_t version; + std::shared_ptr m_ast; }; class WorkspaceIRFile { @@ -93,23 +123,38 @@ class Workspace { // and it's a lot faster to check the end of a string, then multiple tracked file maps FileType determine_filetype_from_languageid(const std::string& language_id); FileType determine_filetype_from_uri(const LSPSpec::DocumentUri& file_uri); + std::optional determine_game_version_from_uri(const LSPSpec::DocumentUri& uri); void start_tracking_file(const LSPSpec::DocumentUri& file_uri, const std::string& language_id, const std::string& content); void update_tracked_file(const LSPSpec::DocumentUri& file_uri, const std::string& content); + void tracked_file_will_save(const LSPSpec::DocumentUri& file_uri); + void update_global_index(const GameVersion game_version); void stop_tracking_file(const LSPSpec::DocumentUri& file_uri); - std::optional get_tracked_og_file(const LSPSpec::URI& file_uri); - std::optional get_tracked_ir_file(const LSPSpec::URI& file_uri); + std::optional> get_tracked_og_file( + const LSPSpec::URI& file_uri); + std::optional> get_tracked_ir_file( + const LSPSpec::URI& file_uri); std::optional get_definition_info_from_all_types( const std::string& symbol_name, const LSPSpec::DocumentUri& all_types_uri); - std::optional get_global_symbol_info(const WorkspaceOGFile& file, - const std::string& symbol_name); - std::optional get_symbol_typespec(const WorkspaceOGFile& file, - const std::string& symbol_name); - std::optional get_symbol_def_location(const WorkspaceOGFile& file, - const SymbolInfo& symbol_info); + std::vector get_symbols_starting_with(const GameVersion game_version, + const std::string& symbol_prefix); + std::optional get_global_symbol_info(const WorkspaceOGFile& file, + const std::string& symbol_name); + std::optional> get_symbol_typeinfo(const WorkspaceOGFile& file, + const std::string& symbol_name); + std::optional get_symbol_def_location( + const WorkspaceOGFile& file, + const symbol_info::SymbolInfo* symbol_info); + std::vector> + get_symbols_parent_type_path(const std::string& symbol_name, const GameVersion game_version); + std::vector> get_types_subtypes( + const std::string& symbol_name, + const GameVersion game_version); + std::unordered_map get_enum_entries(const std::string& enum_name, + const GameVersion game_version); private: LSPRequester m_requester; @@ -126,5 +171,7 @@ class Workspace { // and then we can track projects instead of games // // Until that decoupling happens, things like this will remain fairly clunky. + // TODO - change this to a shared_ptr so it can more easily be passed around functions std::unordered_map> m_compiler_instances; + std::unordered_map m_global_indicies; }; diff --git a/out/build/Release/bin/decompiler.exe b/out/build/Release/bin/decompiler.exe index edd5eece10..4502536185 100644 Binary files a/out/build/Release/bin/decompiler.exe and b/out/build/Release/bin/decompiler.exe differ diff --git a/out/build/Release/bin/extractor.exe b/out/build/Release/bin/extractor.exe index 353027cc5b..76b792651e 100644 Binary files a/out/build/Release/bin/extractor.exe and b/out/build/Release/bin/extractor.exe differ diff --git a/out/build/Release/bin/gk.exe b/out/build/Release/bin/gk.exe index 309661032e..d1be639455 100644 Binary files a/out/build/Release/bin/gk.exe and b/out/build/Release/bin/gk.exe differ diff --git a/out/build/Release/bin/goalc.exe b/out/build/Release/bin/goalc.exe index 6607233952..aa9f6899e2 100644 Binary files a/out/build/Release/bin/goalc.exe and b/out/build/Release/bin/goalc.exe differ diff --git a/scripts/batch/gk3-display.bat b/scripts/batch/gk3-display.bat new file mode 100644 index 0000000000..9369da3c75 --- /dev/null +++ b/scripts/batch/gk3-display.bat @@ -0,0 +1,4 @@ +@echo off +cd ..\.. +out\build\Release\bin\gk -v --game jak3 -- -boot -fakeiso -debug +pause diff --git a/scripts/batch/test3-types.bat b/scripts/batch/test3-types.bat index 300bf4b542..e8a17046bf 100644 --- a/scripts/batch/test3-types.bat +++ b/scripts/batch/test3-types.bat @@ -1,4 +1,4 @@ @echo off cd ..\.. -out\build\Release\bin\goalc-test --gtest_filter="Jak3TypeConsistency.TypeConsistency" +out\build\Release\bin\goalc-test --gtest_filter="Jak3TypeConsistency.TypeConsistency*" pause \ No newline at end of file diff --git a/test/common/formatter/corpus/blank-lines.test.gc b/test/common/formatter/corpus/blank-lines.test.gc index dc32156950..25ed606a80 100644 --- a/test/common/formatter/corpus/blank-lines.test.gc +++ b/test/common/formatter/corpus/blank-lines.test.gc @@ -11,4 +11,4 @@ Separate Top Level (println "test") -(println "test") +(println "test") \ No newline at end of file diff --git a/test/decompiler/reference/jak2/decompiler-macros.gc b/test/decompiler/reference/jak2/decompiler-macros.gc index 983bd34a4c..ece299a6d3 100644 --- a/test/decompiler/reference/jak2/decompiler-macros.gc +++ b/test/decompiler/reference/jak2/decompiler-macros.gc @@ -841,9 +841,11 @@ &key (num! #f) &key (param0 #f) &key (param1 #f) + &key (param2 #f) &key (num-func #f) &key (frame-num #f) - &key (frame-interp #f) + &key (frame-interp0 #f) + &key (frame-interp1 #f) &key (dist #f) &key (eval? #t) ) @@ -856,8 +858,10 @@ num-func = sets the num-func field for the channel. this lets you change the function with eval'ing. param0 = 1st parameter for the playback function. ONLY USE THESE WITH num-func !! param1 = 2nd parameter for the playback function. ONLY USE THESE WITH num-func !! + param2 = 3rd parameter for the playback function. ONLY USE THESE WITH num-func !! frame-num = set the frame-num field. - frame-interp = set the frame-interp field. + frame-interp0 = set the first value of the frame-interp array. + frame-interp1 = set the second value of the frame-interp array. dist = set the dist field. available num! functions: - (+!) = advance anim. @@ -913,6 +917,10 @@ (cond ((eq? num! 'seek!) (if (or (null? num-args) (null? (cdr num-args))) 1.0 (cadr num-args))) ))) + (p2 (if param2 param2 + (cond + ((eq? num! 'seek!) (if (or (null? num-args) (null? (cdr num-args))) 1.0 (cadr num-args))) + ))) (frame-num (cond ((eq? 'max frame-num) (if group! `(the float (1- (-> (the art-joint-anim ,group!) frames num-frames))) @@ -923,11 +931,13 @@ (frame-group (if (or p0 p1 frame-num (not nf)) group! #f)) ) `(let ((ja-ch (-> self skel root-channel ,chan))) - ,(if frame-interp `(set! (-> ja-ch frame-interp) ,frame-interp) `(none)) + ,(if frame-interp0 `(set! (-> ja-ch frame-interp 0) ,frame-interp0) `(none)) + ,(if frame-interp1 `(set! (-> ja-ch frame-interp 1) ,frame-interp1) `(none)) ,(if dist `(set! (-> ja-ch dist) ,dist) `(none)) ,(if frame-group `(set! (-> ja-ch frame-group) (the art-joint-anim ,frame-group)) `(none)) ,(if p0 `(set! (-> ja-ch param 0) ,p0) `(none)) ,(if p1 `(set! (-> ja-ch param 1) ,p1) `(none)) + ,(if p2 `(set! (-> ja-ch param 2) ,p2) `(none)) ,(if num-func `(set! (-> ja-ch num-func) ,num-func) `(none)) ,(if frame-num `(set! (-> ja-ch frame-num) ,frame-num) `(none)) ,(if nf @@ -940,7 +950,7 @@ `(set! (-> ja-ch frame-num) (the float (1- (-> (the art-joint-anim ,group!) frames num-frames)))) `(set! (-> ja-ch frame-num) (the float (1- (-> ja-ch frame-group frames num-frames)))) )) - ((eq? num! 'identity) `(set! (-> ja-ch frame-num) ,(car num-args))) + ((and (eq? num! 'identity) (not (null? num-args))) `(set! (-> ja-ch frame-num) ,(car num-args))) (#t `(none)) ) )) @@ -951,12 +961,14 @@ &key (num! #f) &key (param0 #f) &key (param1 #f) + &key (param2 #f) &key (num-func #f) &key (frame-num #f) - &key (frame-interp #f) + &key (frame-interp0 #f) + &key (frame-interp1 #f) &key (dist #f) ) - `(ja :eval? #f :chan ,chan :group! ,group! :num! ,num! :param0 ,param0 :param1 ,param1 :num-func ,num-func :frame-num ,frame-num :frame-interp ,frame-interp :dist ,dist) + `(ja :eval? #f :chan ,chan :group! ,group! :num! ,num! :param0 ,param0 :param1 ,param1 :param2 ,param2 :num-func ,num-func :frame-num ,frame-num :frame-interp0 ,frame-interp0 :frame-interp1 ,frame-interp1 :dist ,dist) ) (defconstant GIF_REGS_ALL_AD diff --git a/test/decompiler/reference/jak2/engine/target/mech/mech-states_REF.gc b/test/decompiler/reference/jak2/engine/target/mech/mech-states_REF.gc index 7899d07057..1b52e3583e 100644 --- a/test/decompiler/reference/jak2/engine/target/mech/mech-states_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/mech/mech-states_REF.gc @@ -150,12 +150,7 @@ ) 0 (ja :num! (loop! (/ f26-1 (current-cycle-distance (-> self skel))))) - (let ((a0-41 (-> self skel root-channel 1))) - (set! (-> a0-41 frame-interp 1) f30-0) - (set! (-> a0-41 frame-interp 0) f30-0) - (set! (-> a0-41 param 0) 0.0) - (joint-control-channel-group-eval! a0-41 (the-as art-joint-anim #f) num-func-chan) - ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) (ja-no-eval :chan 1 :num! (loop! (/ f26-1 (current-cycle-distance (-> self skel))))) ) ) @@ -310,18 +305,8 @@ 0 (ja :num! (loop! f26-1)) ) - (let ((a0-24 (-> self skel root-channel 1))) - (set! (-> a0-24 frame-interp 1) f30-0) - (set! (-> a0-24 frame-interp 0) f30-0) - (set! (-> a0-24 param 0) 0.0) - (joint-control-channel-group-eval! a0-24 (the-as art-joint-anim #f) num-func-chan) - ) - (let ((a0-25 (-> self skel root-channel 2))) - (set! (-> a0-25 frame-interp 1) f28-0) - (set! (-> a0-25 frame-interp 0) f28-0) - (set! (-> a0-25 param 0) 0.0) - (joint-control-channel-group-eval! a0-25 (the-as art-joint-anim #f) num-func-chan) - ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + (ja :chan 2 :num! (chan 0) :frame-interp0 f28-0 :frame-interp1 f28-0) ) ) #f @@ -1462,13 +1447,7 @@ ) (ja-channel-push! 2 1) (ja :group! jakb-mech-carry-pickup-high-ja :num! min) - (let ((a0-2 (-> self skel root-channel 1))) - (set! (-> a0-2 frame-interp 1) f30-0) - (set! (-> a0-2 frame-interp 0) f30-0) - (set! (-> a0-2 frame-group) (the-as art-joint-anim jakb-mech-carry-pickup-low-ja)) - (set! (-> a0-2 param 0) 0.0) - (joint-control-channel-group-eval! a0-2 (the-as art-joint-anim jakb-mech-carry-pickup-low-ja) num-func-chan) - ) + (ja :chan 1 :group! jakb-mech-carry-pickup-low-ja :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) (suspend) (ja :num! (seek!)) (ja :chan 1 :num! (chan 0)) @@ -1556,10 +1535,7 @@ (ja-no-eval :num! (seek! (ja-aframe 8.0 0))) (while (not (ja-done? 0)) (set! f30-0 (seek f30-0 f28-0 (* 5.0 (seconds-per-frame)))) - (let ((v1-120 (-> self skel root-channel 1))) - (set! (-> v1-120 frame-interp 1) f30-0) - (set! (-> v1-120 frame-interp 0) f30-0) - ) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) (suspend) (ja-eval) ) @@ -1597,10 +1573,7 @@ (ja-no-eval :num! (seek!)) (while (not (ja-done? 0)) (set! f30-0 (seek f30-0 f28-0 (* 5.0 (seconds-per-frame)))) - (let ((v1-174 (-> self skel root-channel 1))) - (set! (-> v1-174 frame-interp 1) f30-0) - (set! (-> v1-174 frame-interp 0) f30-0) - ) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) (suspend) (ja-eval) ) @@ -1618,20 +1591,14 @@ (else (ja-no-eval :num! (seek! (ja-aframe 11.0 0))) (while (not (ja-done? 0)) - (let ((v1-190 (-> self skel root-channel 1))) - (set! (-> v1-190 frame-interp 1) f30-0) - (set! (-> v1-190 frame-interp 0) f30-0) - ) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) (suspend) (ja-eval) ) (suspend) (ja-no-eval :num! (seek! 0.0)) (while (not (ja-done? 0)) - (let ((v1-199 (-> self skel root-channel 1))) - (set! (-> v1-199 frame-interp 1) f30-0) - (set! (-> v1-199 frame-interp 0) f30-0) - ) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) (suspend) (ja-eval) ) @@ -1701,13 +1668,7 @@ ) (ja-channel-push! 2 (seconds 0.1)) (ja :group! jakb-mech-carry-pickup-high-ja :num! max) - (let ((a0-19 (-> self skel root-channel 1))) - (set! (-> a0-19 frame-interp 1) f30-0) - (set! (-> a0-19 frame-interp 0) f30-0) - (set! (-> a0-19 frame-group) (the-as art-joint-anim jakb-mech-carry-pickup-low-ja)) - (set! (-> a0-19 param 0) 0.0) - (joint-control-channel-group-eval! a0-19 (the-as art-joint-anim jakb-mech-carry-pickup-low-ja) num-func-chan) - ) + (ja :chan 1 :group! jakb-mech-carry-pickup-low-ja :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) (suspend) (ja-no-eval :num! (seek! (ja-aframe 8.0 0))) (while (not (ja-done? 0)) @@ -2001,12 +1962,7 @@ ) (ja :num! (loop! f28-1)) ) - (let ((a0-16 (-> self skel root-channel 1))) - (set! (-> a0-16 frame-interp 1) f30-0) - (set! (-> a0-16 frame-interp 0) f30-0) - (set! (-> a0-16 param 0) 0.0) - (joint-control-channel-group-eval! a0-16 (the-as art-joint-anim #f) num-func-chan) - ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) ) ) #f diff --git a/test/decompiler/reference/jak2/engine/target/target-anim_REF.gc b/test/decompiler/reference/jak2/engine/target/target-anim_REF.gc index 4295826dc5..6ef41ac71b 100644 --- a/test/decompiler/reference/jak2/engine/target/target-anim_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-anim_REF.gc @@ -1116,10 +1116,7 @@ ) ) ) - (let ((v1-252 (-> self skel root-channel 6))) - (set! (-> v1-252 frame-interp 1) f26-0) - (set! (-> v1-252 frame-interp 0) f26-0) - ) + (ja :chan 6 :frame-interp0 f26-0 :frame-interp1 f26-0) (let* ((f1-14 (* (current-cycle-distance (-> self skel)) (-> self control scale x))) (f0-70 (/ (-> self control ctrl-xz-vel) (* 60.0 (/ f1-14 (-> *TARGET-bank* run-cycle-length))))) ) diff --git a/test/decompiler/reference/jak2/engine/target/target-carry_REF.gc b/test/decompiler/reference/jak2/engine/target/target-carry_REF.gc index 79ee8c3089..23a3e1273a 100644 --- a/test/decompiler/reference/jak2/engine/target/target-carry_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-carry_REF.gc @@ -186,17 +186,12 @@ (ja-channel-push! 2 (seconds 0.1)) (target-danger-set! 'carry? #f) (ja :group! (-> self draw art-group data 319) :num! min) - (let ((a0-3 (-> self skel root-channel 1))) - (set! (-> a0-3 frame-interp 1) f30-0) - (set! (-> a0-3 frame-interp 0) f30-0) - (set! (-> a0-3 frame-group) (the-as art-joint-anim (-> self draw art-group data 318))) - (set! (-> a0-3 param 0) 0.0) - (joint-control-channel-group-eval! - a0-3 - (the-as art-joint-anim (-> self draw art-group data 318)) - num-func-chan + (ja :chan 1 + :group! (-> self draw art-group data 318) + :num! (chan 0) + :frame-interp0 f30-0 + :frame-interp1 f30-0 ) - ) (suspend) (format #t "carry picked ~A~%" (handle->process (-> self carry other))) (let ((a1-5 (new 'stack-no-clear 'event-message-block))) @@ -234,10 +229,7 @@ (ja-no-eval :num! (seek! (ja-aframe 5.0 0))) (while (not (ja-done? 0)) (set! f30-0 (seek f30-0 f28-0 (* 5.0 (seconds-per-frame)))) - (let ((v1-45 (-> self skel root-channel 1))) - (set! (-> v1-45 frame-interp 1) f30-0) - (set! (-> v1-45 frame-interp 0) f30-0) - ) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) (suspend) (ja-eval) ) @@ -246,10 +238,7 @@ (ja-no-eval :num! (seek!)) (while (not (ja-done? 0)) (set! f30-0 (seek f30-0 f28-0 (* 5.0 (seconds-per-frame)))) - (let ((v1-70 (-> self skel root-channel 1))) - (set! (-> v1-70 frame-interp 1) f30-0) - (set! (-> v1-70 frame-interp 0) f30-0) - ) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) (when (< 22.0 (ja-aframe-num 0)) (let ((a1-22 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-22 from) (process->ppointer self)) @@ -270,10 +259,7 @@ ) (ja-no-eval :num! (seek! 0.0)) (while (not (ja-done? 0)) - (let ((v1-93 (-> self skel root-channel 1))) - (set! (-> v1-93 frame-interp 1) f30-0) - (set! (-> v1-93 frame-interp 0) f30-0) - ) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) (suspend) (ja-eval) ) @@ -328,17 +314,12 @@ ) (ja-channel-push! 2 (seconds 0.1)) (ja :group! (-> self draw art-group data 319) :num! max) - (let ((a0-16 (-> self skel root-channel 1))) - (set! (-> a0-16 frame-interp 1) f30-0) - (set! (-> a0-16 frame-interp 0) f30-0) - (set! (-> a0-16 frame-group) (the-as art-joint-anim (-> self draw art-group data 318))) - (set! (-> a0-16 param 0) 0.0) - (joint-control-channel-group-eval! - a0-16 - (the-as art-joint-anim (-> self draw art-group data 318)) - num-func-chan + (ja :chan 1 + :group! (-> self draw art-group data 318) + :num! (chan 0) + :frame-interp0 f30-0 + :frame-interp1 f30-0 ) - ) ) (suspend) (ja-no-eval :num! (seek! (ja-aframe 5.0 0))) diff --git a/test/decompiler/reference/jak2/engine/target/target-swim_REF.gc b/test/decompiler/reference/jak2/engine/target/target-swim_REF.gc index 0bf1c010b7..b9998230a1 100644 --- a/test/decompiler/reference/jak2/engine/target/target-swim_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/target-swim_REF.gc @@ -260,10 +260,7 @@ (set! f30-1 (seek f30-1 (lerp-scale 1.0 0.0 (-> self control ctrl-xz-vel) 16384.0 32768.0) (* 4.0 (seconds-per-frame))) ) - (let ((v1-107 (-> self skel root-channel 1))) - (set! (-> v1-107 frame-interp 1) f24-1) - (set! (-> v1-107 frame-interp 0) f24-1) - ) + (ja :chan 1 :frame-interp0 f24-1 :frame-interp1 f24-1) (ja :num! (loop! (/ (-> self control ctrl-xz-vel) (* 60.0 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 0000000000..579af88ad3 --- /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/jak2/levels/castle/roboguard-level_REF.gc b/test/decompiler/reference/jak2/levels/castle/roboguard-level_REF.gc index 022fed5bc2..dc7ae0b99c 100644 --- a/test/decompiler/reference/jak2/levels/castle/roboguard-level_REF.gc +++ b/test/decompiler/reference/jak2/levels/castle/roboguard-level_REF.gc @@ -402,11 +402,7 @@ 0 ) :code (behavior () - (let ((a0-0 (-> self skel root-channel 0))) - (set! (-> a0-0 frame-group) (the-as art-joint-anim roboguard-idle-to-ball-ja)) - (set! (-> a0-0 frame-num) 3.0) - (joint-control-channel-group! a0-0 (the-as art-joint-anim roboguard-idle-to-ball-ja) num-func-identity) - ) + (ja-no-eval :group! roboguard-idle-to-ball-ja :num! (identity 3.0)) (until (logtest? (-> self root status) (collide-status on-surface)) (nav-enemy-falling-post) (suspend) diff --git a/test/decompiler/reference/jak2/levels/city/common/pilot-states_REF.gc b/test/decompiler/reference/jak2/levels/city/common/pilot-states_REF.gc index 0caeec8de7..2db49db634 100644 --- a/test/decompiler/reference/jak2/levels/city/common/pilot-states_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/common/pilot-states_REF.gc @@ -29,13 +29,13 @@ (let ((gp-0 (-> self pilot))) (let ((f30-0 (* 5.0 (- 1.0 (-> gp-0 left-right-interp))))) (ja :num-func num-func-identity :frame-num (ja-aframe f30-0 0)) - (let ((f0-3 (fmax 0.0 (fmin 1.0 (* 0.5 (+ 1.0 (* 1.42 (+ -0.3 (-> gp-0 front-back-interp)))))))) - (s5-1 (-> self skel root-channel 1)) + (let ((f0-3 (fmax 0.0 (fmin 1.0 (* 0.5 (+ 1.0 (* 1.42 (+ -0.3 (-> gp-0 front-back-interp))))))))) + (ja :chan 1 + :frame-interp0 f0-3 + :frame-interp1 f0-3 + :num-func num-func-identity + :frame-num (ja-aframe f30-0 1) ) - (set! (-> s5-1 frame-interp 1) f0-3) - (set! (-> s5-1 frame-interp 0) f0-3) - (set! (-> s5-1 num-func) num-func-identity) - (set! (-> s5-1 frame-num) (ja-aframe f30-0 1)) ) ) (let ((f0-6 (* 5.0 (- 1.0 (-> gp-0 up-down-interp)))) diff --git a/test/decompiler/reference/jak2/levels/city/kiddogescort/kidesc-states_REF.gc b/test/decompiler/reference/jak2/levels/city/kiddogescort/kidesc-states_REF.gc index 6ef7255b39..c7dabd4ede 100644 --- a/test/decompiler/reference/jak2/levels/city/kiddogescort/kidesc-states_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/kiddogescort/kidesc-states_REF.gc @@ -507,12 +507,12 @@ ) ) (ja :num-func num-func-identity :frame-num (ja-aframe f30-0 0)) - (let ((gp-2 (-> self skel root-channel 1))) - (set! (-> gp-2 frame-interp 1) f26-0) - (set! (-> gp-2 frame-interp 0) f26-0) - (set! (-> gp-2 num-func) num-func-identity) - (set! (-> gp-2 frame-num) (ja-aframe f28-0 0)) - ) + (ja :chan 1 + :frame-interp0 f26-0 + :frame-interp1 f26-0 + :num-func num-func-identity + :frame-num (ja-aframe f28-0 0) + ) (suspend) ) ) diff --git a/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-flitter_REF.gc b/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-flitter_REF.gc index 06c23232ef..ee2379276e 100644 --- a/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-flitter_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/traffic/citizen/metalhead-flitter_REF.gc @@ -857,24 +857,18 @@ (ja-channel-push! 2 (seconds 0.1)) (let ((f30-0 (metalhead-flitter-method-209 self))) (ja-no-eval :group! flitter-attack-ja :num! (seek! max 0.8) :frame-num 0.0) - (let ((a0-3 (-> self skel root-channel 1))) - (set! (-> a0-3 frame-interp 1) f30-0) - (set! (-> a0-3 frame-interp 0) f30-0) - (set! (-> a0-3 frame-group) (the-as art-joint-anim flitter-attack-high-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 flitter-attack-high-ja) num-func-chan) - ) + (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 (metalhead-flitter-method-209 self) (* 0.2 (seconds-per-frame)))) (ja :num! (seek! max 0.8)) - (let ((a0-7 (-> self skel root-channel 1))) - (set! (-> a0-7 frame-interp 1) f30-0) - (set! (-> a0-7 frame-interp 0) f30-0) - (set! (-> a0-7 param 0) 0.0) - (joint-control-channel-group-eval! a0-7 (the-as art-joint-anim #f) num-func-chan) - ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) ) ) (let ((v1-40 self)) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/flitter_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/flitter_REF.gc index 89695a68ac..f895c3a754 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/flitter_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/flitter_REF.gc @@ -1245,24 +1245,18 @@ (ja-channel-push! 2 (seconds 0.1)) (let ((f30-0 (flitter-method-183 self))) (ja-no-eval :group! flitter-attack-ja :num! (seek! max 0.8) :frame-num 0.0) - (let ((a0-3 (-> self skel root-channel 1))) - (set! (-> a0-3 frame-interp 1) f30-0) - (set! (-> a0-3 frame-interp 0) f30-0) - (set! (-> a0-3 frame-group) (the-as art-joint-anim flitter-attack-high-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 flitter-attack-high-ja) num-func-chan) - ) + (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 (flitter-method-183 self) (* 0.2 (seconds-per-frame)))) (ja :num! (seek! max 0.8)) - (let ((a0-7 (-> self skel root-channel 1))) - (set! (-> a0-7 frame-interp 1) f30-0) - (set! (-> a0-7 frame-interp 0) f30-0) - (set! (-> a0-7 param 0) 0.0) - (joint-control-channel-group-eval! a0-7 (the-as art-joint-anim #f) num-func-chan) - ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) ) ) (let ((v1-40 self)) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/spyder_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/spyder_REF.gc index 7ea436e1e5..3da7654f1e 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/spyder_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/spyder_REF.gc @@ -1116,14 +1116,13 @@ (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) - (let ((a0-12 (-> self skel root-channel 1))) - (set! (-> a0-12 frame-interp 1) f30-0) - (set! (-> a0-12 frame-interp 0) f30-0) - (set! (-> a0-12 frame-group) (the-as art-joint-anim spyder-shoot-high-ja)) - (set! (-> a0-12 param 0) 0.0) - (set! (-> a0-12 frame-num) 0.0) - (joint-control-channel-group! a0-12 (the-as art-joint-anim spyder-shoot-high-ja) num-func-chan) - ) + (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))) @@ -1147,12 +1146,7 @@ (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!)) - (let ((a0-27 (-> self skel root-channel 1))) - (set! (-> a0-27 frame-interp 1) f30-0) - (set! (-> a0-27 frame-interp 0) f30-0) - (set! (-> a0-27 param 0) 0.0) - (joint-control-channel-group-eval! a0-27 (the-as art-joint-anim #f) num-func-chan) - ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) (suspend) ) ) diff --git a/test/decompiler/reference/jak2/levels/drill/drill-obs_REF.gc b/test/decompiler/reference/jak2/levels/drill/drill-obs_REF.gc index e20b3a6b0c..570645a416 100644 --- a/test/decompiler/reference/jak2/levels/drill/drill-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/drill/drill-obs_REF.gc @@ -407,11 +407,8 @@ This commonly includes things such as: (until #f (let ((f30-0 (- (-> self extent 1 y) (-> self extent 0 y)))) (when (!= f30-0 (-> self length)) - (let ((f0-3 (* 0.000010172526 f30-0)) - (a0-0 (-> self skel root-channel 0)) - ) - (set! (-> a0-0 frame-num) f0-3) - (joint-control-channel-group-eval! a0-0 (the-as art-joint-anim #f) num-func-identity) + (let ((f0-3 (* 0.000010172526 f30-0))) + (ja :num! (identity f0-3)) ) (transform-post) (set! (-> self length) f30-0) diff --git a/test/decompiler/reference/jak2/levels/forest/wren_REF.gc b/test/decompiler/reference/jak2/levels/forest/wren_REF.gc index 3f8382140e..fc2cedac2a 100644 --- a/test/decompiler/reference/jak2/levels/forest/wren_REF.gc +++ b/test/decompiler/reference/jak2/levels/forest/wren_REF.gc @@ -339,11 +339,7 @@ If so, it transitions from [[wren::peck]] to [[wren::hunt]]" ) (set! (-> v1-59 frame-group) (the-as art-joint-anim wren-glide-ja)) ) - (let ((v1-62 (-> self skel root-channel 1))) - (set! (-> v1-62 frame-interp 1) f30-1) - (set! (-> v1-62 frame-interp 0) f30-1) - (set! (-> v1-62 frame-group) (the-as art-joint-anim wren-fly-ja)) - ) + (ja :chan 1 :group! wren-fly-ja :frame-interp0 f30-1 :frame-interp1 f30-1) (let ((f30-2 (lerp 0.6 2.4 f30-1))) (ja :num! (loop! f30-2)) (ja :chan 1 :num! (loop! f30-2)) diff --git a/test/decompiler/reference/jak2/levels/nest/boss/metalkor-states_REF.gc b/test/decompiler/reference/jak2/levels/nest/boss/metalkor-states_REF.gc index c97b348302..0320bc0460 100644 --- a/test/decompiler/reference/jak2/levels/nest/boss/metalkor-states_REF.gc +++ b/test/decompiler/reference/jak2/levels/nest/boss/metalkor-states_REF.gc @@ -535,10 +535,7 @@ ) ) ) - (let ((v1-24 (-> self skel root-channel 1))) - (set! (-> v1-24 frame-interp 1) f30-2) - (set! (-> v1-24 frame-interp 0) f30-2) - ) + (ja :chan 1 :frame-interp0 f30-2 :frame-interp1 f30-2) ) ) (none) diff --git a/test/decompiler/reference/jak2/levels/stadium/stadium-obs_REF.gc b/test/decompiler/reference/jak2/levels/stadium/stadium-obs_REF.gc index d48c5edf39..fbc5ee211a 100644 --- a/test/decompiler/reference/jak2/levels/stadium/stadium-obs_REF.gc +++ b/test/decompiler/reference/jak2/levels/stadium/stadium-obs_REF.gc @@ -2327,12 +2327,7 @@ This commonly includes things such as: ) ) ) - (let ((a0-10 (-> self skel root-channel 0))) - (set! (-> a0-10 frame-interp 1) f28-0) - (set! (-> a0-10 frame-interp 0) f28-0) - (set! (-> a0-10 param 0) f30-0) - (joint-control-channel-group-eval! a0-10 (the-as art-joint-anim #f) num-func-loop!) - ) + (ja :num! (loop! f30-0) :frame-interp0 f28-0 :frame-interp1 f28-0) (let ((a0-11 (-> self skel root-channel 1))) (let ((f0-9 (- 1.0 f28-0))) (set! (-> a0-11 frame-interp 1) f0-9) diff --git a/test/decompiler/reference/jak2/levels/tomb/monster-frog_REF.gc b/test/decompiler/reference/jak2/levels/tomb/monster-frog_REF.gc index 3944a46c2c..b5507f8093 100644 --- a/test/decompiler/reference/jak2/levels/tomb/monster-frog_REF.gc +++ b/test/decompiler/reference/jak2/levels/tomb/monster-frog_REF.gc @@ -552,43 +552,31 @@ 0 (ja-channel-push! 2 (seconds 0.01)) (ja-no-eval :group! monster-frog-hop-small-start-ja :num! (seek! max f28-1) :frame-num 0.0) - (let ((a0-15 (-> self skel root-channel 1))) - (set! (-> a0-15 frame-interp 1) f30-1) - (set! (-> a0-15 frame-interp 0) f30-1) - (set! (-> a0-15 frame-group) (the-as art-joint-anim monster-frog-hop-slow-start-ja)) - (set! (-> a0-15 param 0) 0.0) - (set! (-> a0-15 frame-num) 0.0) - (joint-control-channel-group! a0-15 (the-as art-joint-anim monster-frog-hop-slow-start-ja) num-func-chan) - ) + (ja-no-eval :chan 1 + :group! monster-frog-hop-slow-start-ja + :num! (chan 0) + :frame-interp0 f30-1 + :frame-interp1 f30-1 + :frame-num 0.0 + ) (until (ja-done? 0) (suspend) (ja :num! (seek! max f28-1)) - (let ((a0-17 (-> self skel root-channel 1))) - (set! (-> a0-17 frame-interp 1) f30-1) - (set! (-> a0-17 frame-interp 0) f30-1) - (set! (-> a0-17 param 0) 0.0) - (joint-control-channel-group-eval! a0-17 (the-as art-joint-anim #f) num-func-chan) - ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-1 :frame-interp1 f30-1) ) (nav-enemy-method-167 self) (ja-no-eval :group! monster-frog-hop-small-end-ja :num! (seek! max f28-1) :frame-num 0.0) - (let ((a0-21 (-> self skel root-channel 1))) - (set! (-> a0-21 frame-interp 1) f30-1) - (set! (-> a0-21 frame-interp 0) f30-1) - (set! (-> a0-21 frame-group) (the-as art-joint-anim monster-frog-hop-slow-end-ja)) - (set! (-> a0-21 param 0) 0.0) - (set! (-> a0-21 frame-num) 0.0) - (joint-control-channel-group! a0-21 (the-as art-joint-anim monster-frog-hop-slow-end-ja) num-func-chan) - ) + (ja-no-eval :chan 1 + :group! monster-frog-hop-slow-end-ja + :num! (chan 0) + :frame-interp0 f30-1 + :frame-interp1 f30-1 + :frame-num 0.0 + ) (until (ja-done? 0) (suspend) (ja :num! (seek! max f28-1)) - (let ((a0-23 (-> self skel root-channel 1))) - (set! (-> a0-23 frame-interp 1) f30-1) - (set! (-> a0-23 frame-interp 0) f30-1) - (set! (-> a0-23 param 0) 0.0) - (joint-control-channel-group-eval! a0-23 (the-as art-joint-anim #f) num-func-chan) - ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-1 :frame-interp1 f30-1) ) ) ) diff --git a/test/decompiler/reference/jak2/levels/tomb/target-indax_REF.gc b/test/decompiler/reference/jak2/levels/tomb/target-indax_REF.gc index a82e61f305..9d4fd1bf81 100644 --- a/test/decompiler/reference/jak2/levels/tomb/target-indax_REF.gc +++ b/test/decompiler/reference/jak2/levels/tomb/target-indax_REF.gc @@ -679,10 +679,7 @@ ) (set! f30-0 (seek f30-0 f26-1 (* 4.0 (seconds-per-frame)))) ) - (let ((v1-94 (-> self skel root-channel 1))) - (set! (-> v1-94 frame-interp 1) f28-0) - (set! (-> v1-94 frame-interp 0) f28-0) - ) + (ja :chan 1 :frame-interp0 f28-0 :frame-interp1 f28-0) (let ((v1-98 (-> self skel root-channel 2)) (f0-23 (- 1.0 f30-0)) ) @@ -1465,7 +1462,3 @@ ) :post target-no-stick-post ) - - - - diff --git a/test/decompiler/reference/jak3/decompiler-macros.gc b/test/decompiler/reference/jak3/decompiler-macros.gc index 532e548ff4..d3b4650af9 100644 --- a/test/decompiler/reference/jak3/decompiler-macros.gc +++ b/test/decompiler/reference/jak3/decompiler-macros.gc @@ -213,6 +213,13 @@ ;; This way it can check the individual function types, make sure they make sense, and create ;; a state with the appropriate type. ,(cond + ((and virtual parent) + `(begin + (inherit-state ,new-state ,(if (pair? parent) `(method-of-type ,(car parent) ,(cadr parent)) `(the state ,parent))) + (set! (-> ,new-state parent) ,(if (pair? parent) `(method-of-type ,(car parent) ,(cadr parent)) `(the state ,parent))) + (define-virtual-state-hook ,state-name ,defstate-type ,new-state ,(eq? virtual 'override) :event ,event :enter ,enter :trans ,trans :exit ,exit :code ,code :post ,post) + ) + ) (virtual `(define-virtual-state-hook ,state-name ,defstate-type ,new-state ,(eq? virtual 'override) :event ,event :enter ,enter :trans ,trans :exit ,exit :code ,code :post ,post) ) @@ -224,7 +231,10 @@ ) ) (#t - `(define-state-hook ,state-name ,defstate-type ,new-state :event ,event :enter ,enter :trans ,trans :exit ,exit :code ,code :post ,post) + `(begin + (set! (-> ,new-state parent) #f) + (define-state-hook ,state-name ,defstate-type ,new-state :event ,event :enter ,enter :trans ,trans :exit ,exit :code ,code :post ,post) + ) ) ) ) @@ -970,7 +980,6 @@ ) ) -;; og:preserve-this ;; look up the index of an art element in an art group. (desfun art-elt-index (ag-name elt-name) (if (number? elt-name) @@ -1126,9 +1135,11 @@ &key (num! #f) &key (param0 #f) &key (param1 #f) + &key (param2 #f) &key (num-func #f) &key (frame-num #f) - &key (frame-interp #f) + &key (frame-interp0 #f) + &key (frame-interp1 #f) &key (dist #f) &key (eval? #t) ) @@ -1141,8 +1152,10 @@ num-func = sets the num-func field for the channel. this lets you change the function with eval'ing. param0 = 1st parameter for the playback function. ONLY USE THESE WITH num-func !! param1 = 2nd parameter for the playback function. ONLY USE THESE WITH num-func !! + param2 = 3rd parameter for the playback function. ONLY USE THESE WITH num-func !! frame-num = set the frame-num field. - frame-interp = set the frame-interp field. + frame-interp0 = set the first value of the frame-interp array. + frame-interp1 = set the second value of the frame-interp array. dist = set the dist field. available num! functions: - (+!) = advance anim. @@ -1198,6 +1211,10 @@ (cond ((eq? num! 'seek!) (if (or (null? num-args) (null? (cdr num-args))) 1.0 (cadr num-args))) ))) + (p2 (if param2 param2 + (cond + ((eq? num! 'seek!) (if (or (null? num-args) (null? (cdr num-args))) 1.0 (cadr num-args))) + ))) (frame-num (cond ((eq? 'max frame-num) (if group! `(the float (1- (-> (the art-joint-anim ,group!) frames num-frames))) @@ -1208,11 +1225,13 @@ (frame-group (if (or p0 p1 frame-num (not nf)) group! #f)) ) `(let ((ja-ch (-> self skel root-channel ,chan))) - ,(if frame-interp `(set! (-> ja-ch frame-interp) ,frame-interp) `(none)) + ,(if frame-interp0 `(set! (-> ja-ch frame-interp 0) ,frame-interp0) `(none)) + ,(if frame-interp1 `(set! (-> ja-ch frame-interp 1) ,frame-interp1) `(none)) ,(if dist `(set! (-> ja-ch dist) ,dist) `(none)) ,(if frame-group `(set! (-> ja-ch frame-group) (the art-joint-anim ,frame-group)) `(none)) ,(if p0 `(set! (-> ja-ch param 0) ,p0) `(none)) ,(if p1 `(set! (-> ja-ch param 1) ,p1) `(none)) + ,(if p2 `(set! (-> ja-ch param 2) ,p2) `(none)) ,(if num-func `(set! (-> ja-ch num-func) ,num-func) `(none)) ,(if frame-num `(set! (-> ja-ch frame-num) ,frame-num) `(none)) ,(if nf @@ -1225,7 +1244,7 @@ `(set! (-> ja-ch frame-num) (the float (1- (-> (the art-joint-anim ,group!) frames num-frames)))) `(set! (-> ja-ch frame-num) (the float (1- (-> ja-ch frame-group frames num-frames)))) )) - ((eq? num! 'identity) `(set! (-> ja-ch frame-num) ,(car num-args))) + ((and (eq? num! 'identity) (not (null? num-args))) `(set! (-> ja-ch frame-num) ,(car num-args))) (#t `(none)) ) )) @@ -1236,12 +1255,14 @@ &key (num! #f) &key (param0 #f) &key (param1 #f) + &key (param2 #f) &key (num-func #f) &key (frame-num #f) - &key (frame-interp #f) + &key (frame-interp0 #f) + &key (frame-interp1 #f) &key (dist #f) ) - `(ja :eval? #f :chan ,chan :group! ,group! :num! ,num! :param0 ,param0 :param1 ,param1 :num-func ,num-func :frame-num ,frame-num :frame-interp ,frame-interp :dist ,dist) + `(ja :eval? #f :chan ,chan :group! ,group! :num! ,num! :param0 ,param0 :param1 ,param1 :param2 ,param2 :num-func ,num-func :frame-num ,frame-num :frame-interp0 ,frame-interp0 :frame-interp1 ,frame-interp1 :dist ,dist) ) (defmacro script-eval (script &key (key (process->ppointer PP)) &key (proc PP) &key (vector (the-as vector #f))) @@ -1380,7 +1401,10 @@ `(new 'static 'sp-field-init-spec :field (sp-field-id ,field-enum-name) :initial-value (sp-cpuinfo-flag ,@param0) :random-mult 1) ) ((eq? field-name 'texture) - `(new 'static 'sp-field-init-spec :field (sp-field-id ,field-enum-name) :tex ,param0 :flags (sp-flag int)) + (if (eq? (car param0) 'new) + `(new 'static 'sp-field-init-spec :field (sp-field-id ,field-enum-name) :tex ,param0 :flags (sp-flag int)) + `(new 'static 'sp-field-init-spec :field (sp-field-id ,field-enum-name) :tex ,(string->symbol-format "{}-{}" (car param0) (cadr param0)) :flags (sp-flag int)) + ) ) ((eq? field-name 'next-launcher) `(new 'static 'sp-field-init-spec :field (sp-field-id ,field-enum-name) :initial-value ,param0 :flags (sp-flag launcher)) @@ -1555,3 +1579,144 @@ ) ) ) + +(defmacro defmethod-mips2c (name method-id method-type) + "Define a mips2c method." + `(method-set! ,method-type ,method-id (__pc-get-mips2c ,name)) + ) + +(defconstant GIF_REGS_ALL_AD + (new 'static 'gif-tag-regs + :regs0 (gif-reg-id a+d) + :regs1 (gif-reg-id a+d) + :regs2 (gif-reg-id a+d) + :regs3 (gif-reg-id a+d) + :regs4 (gif-reg-id a+d) + :regs5 (gif-reg-id a+d) + :regs6 (gif-reg-id a+d) + :regs7 (gif-reg-id a+d) + :regs8 (gif-reg-id a+d) + :regs9 (gif-reg-id a+d) + :regs10 (gif-reg-id a+d) + :regs11 (gif-reg-id a+d) + :regs12 (gif-reg-id a+d) + :regs13 (gif-reg-id a+d) + :regs14 (gif-reg-id a+d) + :regs15 (gif-reg-id a+d) + ) + ) + +(defmacro .movz (result value check original) + `(if (= ,check 0) + (set! ,result (the-as int ,value)) + (set! ,result (the-as int ,original)) + ) + ) + +(defmacro get-texture (name tpage) + `(lookup-texture-by-id ,(string->symbol-format "{}-{}" name tpage)) + ) + +(defmacro vitof12.xyzw (dst src) + "convert from a 20.12 integer. This does the multiply while the number is still + a float. This will have issues for very large floats, but it seems like this + is how PCSX2 does it as well, so maybe it's right? + NOTE: this is the only version of the instruction used in Jak 1, so we + don't need to worry about masks." + +`(begin + (rlet ((temp :class vf)) + (.itof.vf ,dst ,src) + (set! temp 0.000244140625) + (.mul.x.vf ,dst ,dst temp) + ) + ) +) + +(defmacro set-part-tracker-params (type group duration callback userdata target mat-joint subsample-num) + `(case ,type + ((part-tracker) + (set! (-> *part-tracker-params-default* group) ,group) + (set! (-> *part-tracker-params-default* duration) ,duration) + (set! (-> *part-tracker-params-default* callback) ,callback) + (set! (-> *part-tracker-params-default* userdata) ,userdata) + (set! (-> *part-tracker-params-default* target) ,target) + (set! (-> *part-tracker-params-default* mat-joint) ,mat-joint) + ) + (else + (set! (-> *part-tracker-subsampler-params-default* group) ,group) + (set! (-> *part-tracker-subsampler-params-default* duration) ,duration) + (set! (-> *part-tracker-subsampler-params-default* callback) ,callback) + (set! (-> *part-tracker-subsampler-params-default* userdata) ,userdata) + (set! (-> *part-tracker-subsampler-params-default* target) ,target) + (set! (-> *part-tracker-subsampler-params-default* mat-joint) ,mat-joint) + (set! (-> *part-tracker-subsampler-params-default* subsample-num) ,subsample-num) + ) + ) + ) + +(defmacro part-tracker-spawn (type &key (group #f) + &key (to #f) + &key (name #f) + &key (stack-size #x4000) + &key (stack *scratch-memory-top*) + &key (unk 0) + &key (duration (seconds 0)) + &key (callback #f) + &key (userdata (the uint #f)) + &key (target #f) + &key (mat-joint *launch-matrix*) + &key (subsample-num 1.0)) + "Specialized `process-spawn` macro for [[part-tracker]]s. + Returns a pointer to the new process, or #f (or is it 0?) if something goes wrong." + (with-gensyms (new-tracker) + `(let ((,new-tracker (the-as ,type (get-process *default-dead-pool* ,type ,stack-size ,unk)))) + (when ,new-tracker + ((method-of-type ,type activate) ,new-tracker ,to ,(if name name `(symbol->string (quote ,type))) ,stack) + (set-part-tracker-params ,type ,group ,duration ,callback ,userdata ,target ,mat-joint ,subsample-num) + (run-now-in-process ,new-tracker + (if (= ,type part-tracker) part-tracker-init part-tracker-subsampler-init) + (if (= ,type part-tracker) *part-tracker-params-default* *part-tracker-subsampler-params-default*)) + (the (pointer ,type) (-> ,new-tracker ppointer)) + ) + ) + ) + ) + +(defmacro .sll (result in sa) + `(set! ,result (sext32 (the-as int (shl (logand ,in #xffffffff) ,sa)))) + ) + +(defmacro vftoi12.xyzw (dst src) + "convert to 20.12 integer. This does the multiply while the number is still + a float. This will have issues for very large floats, but it seems like this + is how PCSX2 does it as well, so maybe it's right? + NOTE: this is the only version of the instruction used in Jak 1, so we + don't need to worry about masks." + `(begin + (rlet ((temp :class vf)) + (set! temp 4096.0) + (.mul.x.vf temp ,src temp) + (.ftoi.vf ,dst temp) + ) + ) + ) + +(defmacro vitof15.xyzw (dst src) + "convert from a 17.15 integer. This does the multiply while the number is still + a float. This will have issues for very large floats, but it seems like this + is how PCSX2 does it as well, so maybe it's right? + NOTE: this is the only version of the instruction used in Jak 1, so we + don't need to worry about masks." + +`(begin + (rlet ((temp :class vf)) + (.itof.vf ,dst ,src) + (set! temp 0.000030517578125) + (.mul.x.vf ,dst ,dst temp) + ) + ) +) + +(import "goal_src/jak3/engine/data/tpages.gc") +(import "goal_src/jak3/engine/data/textures.gc") \ No newline at end of file diff --git a/test/decompiler/reference/jak3/engine/ai/enemy-h_REF.gc b/test/decompiler/reference/jak3/engine/ai/enemy-h_REF.gc new file mode 100644 index 0000000000..f633662045 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/ai/enemy-h_REF.gc @@ -0,0 +1,758 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type enemy-focus +(deftype enemy-focus (focus) + ((aware enemy-aware) + (flags enemy-flag) + ) + (:methods + (try-update-focus (_type_ process-focusable enemy) symbol :replace) + (enemy-focus-method-13 (_type_ process-focusable enemy-aware) symbol) + ) + ) + +;; definition for method 3 of type enemy-focus +(defmethod inspect ((this enemy-focus)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'enemy-focus) + (format #t "~1Thandle: ~D~%" (-> this handle)) + (format #t "~1Tcollide-with: ~D~%" (-> this collide-with)) + (format #t "~1Taware: ~D~%" (-> this aware)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (label cfg-4) + this + ) + +;; definition of type enemy-info +(deftype enemy-info (basic) + ((fact-defaults fact-info-enemy-defaults) + (use-die-falling symbol) + (use-victory symbol) + (use-jump-blocked symbol) + (debug-draw-neck symbol) + (jump-debug-draw symbol) + (move-to-ground symbol) + (hover-if-no-ground symbol) + (idle-anim-script (inline-array idle-control-frame)) + (idle-anim int32) + (notice-anim int32) + (hostile-anim int32) + (hit-anim int32) + (knocked-anim int32) + (knocked-land-anim int32) + (die-anim int32) + (die-falling-anim int32) + (victory-anim int32) + (jump-wind-up-anim int32) + (jump-in-air-anim int32) + (jump-land-anim int32) + (neck-joint int32) + (look-at-joint int32) + (bullseye-joint int32) + (sound-hit sound-name) + (sound-die sound-name) + (notice-distance meters) + (notice-distance-delta meters) + (proximity-notice-distance meters) + (default-hit-points float) + (gnd-collide-with collide-spec) + (overlaps-others-collide-with-filter collide-spec) + (penetrate-flinch penetrate) + (penetrate-knocked penetrate) + (movement-gravity meters) + (friction float) + (slip-factor float) + (attack-shove-back meters) + (attack-shove-up meters) + (attack-mode symbol) + (attack-damage int32) + (recover-gnd-collide-with collide-spec) + (knocked-can-land-timeout time-frame) + (knocked-recover-timeout time-frame) + (ragdoll-blend-out-time time-frame) + (ragdoll-rotate-velocity-mult float) + (jump-height-min meters) + (jump-height-factor float) + (knocked-seek-ry-clamp float) + (knocked-soft-vxz-lo float) + (knocked-soft-vxz-hi float) + (knocked-soft-vy-lo float) + (knocked-soft-vy-hi float) + (knocked-medium-vxz-lo float) + (knocked-medium-vxz-hi float) + (knocked-medium-vy-lo float) + (knocked-medium-vy-hi float) + (knocked-hard-vxz-lo float) + (knocked-hard-vxz-hi float) + (knocked-hard-vy-lo float) + (knocked-hard-vy-hi float) + (knocked-huge-vxz-lo float) + (knocked-huge-vxz-hi float) + (knocked-huge-vy-lo float) + (knocked-huge-vy-hi float) + (knocked-yellow-vxz-lo float) + (knocked-yellow-vxz-hi float) + (knocked-yellow-vy-lo float) + (knocked-yellow-vy-hi float) + (knocked-red-vxz-lo float) + (knocked-red-vxz-hi float) + (knocked-red-vy-lo float) + (knocked-red-vy-hi float) + (knocked-blue-vxz-lo float) + (knocked-blue-vxz-hi float) + (knocked-blue-vy-lo float) + (knocked-blue-vy-hi float) + (ragdoll-info ragdoll-setup) + (shadow-size meters) + (shadow-max-y meters) + (shadow-min-y meters) + (shadow-locus-dist meters) + (gem-joint int32) + (gem-seg uint32) + (gem-no-seg uint32) + (gem-offset sphere :inline) + (knocked-off symbol) + ) + (:methods + (copy-enemy-info! (_type_ _type_) none) + ) + ) + +;; definition for method 3 of type enemy-info +;; INFO: Used lq/sq +(defmethod inspect ((this enemy-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tfact-defaults: ~A~%" (-> this fact-defaults)) + (format #t "~1Tuse-die-falling: ~A~%" (-> this use-die-falling)) + (format #t "~1Tuse-victory: ~A~%" (-> this use-victory)) + (format #t "~1Tuse-jump-blocked: ~A~%" (-> this use-jump-blocked)) + (format #t "~1Tdebug-draw-neck: ~A~%" (-> this debug-draw-neck)) + (format #t "~1Tjump-debug-draw: ~A~%" (-> this jump-debug-draw)) + (format #t "~1Tmove-to-ground: ~A~%" (-> this move-to-ground)) + (format #t "~1Thover-if-no-ground: ~A~%" (-> this hover-if-no-ground)) + (format #t "~1Tidle-anim-script: #x~X~%" (-> this idle-anim-script)) + (format #t "~1Tidle-anim: ~D~%" (-> this idle-anim)) + (format #t "~1Tnotice-anim: ~D~%" (-> this notice-anim)) + (format #t "~1Thostile-anim: ~D~%" (-> this hostile-anim)) + (format #t "~1Thit-anim: ~D~%" (-> this hit-anim)) + (format #t "~1Tknocked-anim: ~D~%" (-> this knocked-anim)) + (format #t "~1Tknocked-land-anim: ~D~%" (-> this knocked-land-anim)) + (format #t "~1Tdie-anim: ~D~%" (-> this die-anim)) + (format #t "~1Tdie-falling-anim: ~D~%" (-> this die-falling-anim)) + (format #t "~1Tvictory-anim: ~D~%" (-> this victory-anim)) + (format #t "~1Tjump-wind-up-anim: ~D~%" (-> this jump-wind-up-anim)) + (format #t "~1Tjump-in-air-anim: ~D~%" (-> this jump-in-air-anim)) + (format #t "~1Tjump-land-anim: ~D~%" (-> this jump-land-anim)) + (format #t "~1Tneck-joint: ~D~%" (-> this neck-joint)) + (format #t "~1Tlook-at-joint: ~D~%" (-> this look-at-joint)) + (format #t "~1Tbullseye-joint: ~D~%" (-> this bullseye-joint)) + (format #t "~1Tsound-hit: ~D~%" (-> this sound-hit)) + (format #t "~1Tsound-die: ~D~%" (-> this sound-die)) + (format #t "~1Tnotice-distance: (meters ~m)~%" (-> this notice-distance)) + (format #t "~1Tnotice-distance-delta: (meters ~m)~%" (-> this notice-distance-delta)) + (format #t "~1Tproximity-notice-distance: (meters ~m)~%" (-> this proximity-notice-distance)) + (format #t "~1Tdefault-hit-points: ~f~%" (-> this default-hit-points)) + (format #t "~1Tgnd-collide-with: ~D~%" (-> this gnd-collide-with)) + (format #t "~1Toverlaps-others-collide-with-filter: ~D~%" (-> this overlaps-others-collide-with-filter)) + (format #t "~1Tpenetrate-flinch: ~D~%" (-> this penetrate-flinch)) + (format #t "~1Tpenetrate-knocked: ~D~%" (-> this penetrate-knocked)) + (format #t "~1Tmovement-gravity: (meters ~m)~%" (-> this movement-gravity)) + (format #t "~1Tfriction: ~f~%" (-> this friction)) + (format #t "~1Tslip-factor: ~f~%" (-> this slip-factor)) + (format #t "~1Tattack-shove-back: (meters ~m)~%" (-> this attack-shove-back)) + (format #t "~1Tattack-shove-up: (meters ~m)~%" (-> this attack-shove-up)) + (format #t "~1Tattack-mode: ~A~%" (-> this attack-mode)) + (format #t "~1Tattack-damage: ~D~%" (-> this attack-damage)) + (format #t "~1Trecover-gnd-collide-with: ~D~%" (-> this recover-gnd-collide-with)) + (format #t "~1Tknocked-can-land-timeout: ~D~%" (-> this knocked-can-land-timeout)) + (format #t "~1Tknocked-recover-timeout: ~D~%" (-> this knocked-recover-timeout)) + (format #t "~1Tragdoll-blend-out-time: ~D~%" (-> this ragdoll-blend-out-time)) + (format #t "~1Tragdoll-rotate-velocity-mult: ~f~%" (-> this ragdoll-rotate-velocity-mult)) + (format #t "~1Tjump-height-min: (meters ~m)~%" (-> this jump-height-min)) + (format #t "~1Tjump-height-factor: ~f~%" (-> this jump-height-factor)) + (format #t "~1Tknocked-seek-ry-clamp: ~f~%" (-> this knocked-seek-ry-clamp)) + (format #t "~1Tknocked-soft-vxz-lo: ~f~%" (-> this knocked-soft-vxz-lo)) + (format #t "~1Tknocked-soft-vxz-hi: ~f~%" (-> this knocked-soft-vxz-hi)) + (format #t "~1Tknocked-soft-vy-lo: ~f~%" (-> this knocked-soft-vy-lo)) + (format #t "~1Tknocked-soft-vy-hi: ~f~%" (-> this knocked-soft-vy-hi)) + (format #t "~1Tknocked-medium-vxz-lo: ~f~%" (-> this knocked-medium-vxz-lo)) + (format #t "~1Tknocked-medium-vxz-hi: ~f~%" (-> this knocked-medium-vxz-hi)) + (format #t "~1Tknocked-medium-vy-lo: ~f~%" (-> this knocked-medium-vy-lo)) + (format #t "~1Tknocked-medium-vy-hi: ~f~%" (-> this knocked-medium-vy-hi)) + (format #t "~1Tknocked-hard-vxz-lo: ~f~%" (-> this knocked-hard-vxz-lo)) + (format #t "~1Tknocked-hard-vxz-hi: ~f~%" (-> this knocked-hard-vxz-hi)) + (format #t "~1Tknocked-hard-vy-lo: ~f~%" (-> this knocked-hard-vy-lo)) + (format #t "~1Tknocked-hard-vy-hi: ~f~%" (-> this knocked-hard-vy-hi)) + (format #t "~1Tknocked-huge-vxz-lo: ~f~%" (-> this knocked-huge-vxz-lo)) + (format #t "~1Tknocked-huge-vxz-hi: ~f~%" (-> this knocked-huge-vxz-hi)) + (format #t "~1Tknocked-huge-vy-lo: ~f~%" (-> this knocked-huge-vy-lo)) + (format #t "~1Tknocked-huge-vy-hi: ~f~%" (-> this knocked-huge-vy-hi)) + (format #t "~1Tknocked-yellow-vxz-lo: ~f~%" (-> this knocked-yellow-vxz-lo)) + (format #t "~1Tknocked-yellow-vxz-hi: ~f~%" (-> this knocked-yellow-vxz-hi)) + (format #t "~1Tknocked-yellow-vy-lo: ~f~%" (-> this knocked-yellow-vy-lo)) + (format #t "~1Tknocked-yellow-vy-hi: ~f~%" (-> this knocked-yellow-vy-hi)) + (format #t "~1Tknocked-red-vxz-lo: ~f~%" (-> this knocked-red-vxz-lo)) + (format #t "~1Tknocked-red-vxz-hi: ~f~%" (-> this knocked-red-vxz-hi)) + (format #t "~1Tknocked-red-vy-lo: ~f~%" (-> this knocked-red-vy-lo)) + (format #t "~1Tknocked-red-vy-hi: ~f~%" (-> this knocked-red-vy-hi)) + (format #t "~1Tknocked-blue-vxz-lo: ~f~%" (-> this knocked-blue-vxz-lo)) + (format #t "~1Tknocked-blue-vxz-hi: ~f~%" (-> this knocked-blue-vxz-hi)) + (format #t "~1Tknocked-blue-vy-lo: ~f~%" (-> this knocked-blue-vy-lo)) + (format #t "~1Tknocked-blue-vy-hi: ~f~%" (-> this knocked-blue-vy-hi)) + (format #t "~1Tragdoll-info: #~%" (-> this ragdoll-info)) + (format #t "~1Tshadow-size: (meters ~m)~%" (-> this shadow-size)) + (format #t "~1Tshadow-max-y: (meters ~m)~%" (-> this shadow-max-y)) + (format #t "~1Tshadow-min-y: (meters ~m)~%" (-> this shadow-min-y)) + (format #t "~1Tshadow-locus-dist: (meters ~m)~%" (-> this shadow-locus-dist)) + (format #t "~1Tgem-joint: ~D~%" (-> this gem-joint)) + (format #t "~1Tgem-seg: ~D~%" (-> this gem-seg)) + (format #t "~1Tgem-no-seg: ~D~%" (-> this gem-no-seg)) + (format #t "~1Tgem-offset: #~%" (-> this gem-offset)) + (format #t "~1Tknocked-off: ~A~%" (-> this knocked-off)) + (label cfg-4) + this + ) + +;; definition of type enemy-knocked-info +(deftype enemy-knocked-info (structure) + ((anim-speed float) + (on-surface-count int32) + (move-count int32) + (land-can-land-time time-frame) + ) + ) + +;; definition for method 3 of type enemy-knocked-info +(defmethod inspect ((this enemy-knocked-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'enemy-knocked-info) + (format #t "~1Tanim-speed: ~f~%" (-> this anim-speed)) + (format #t "~1Ton-surface-count: ~D~%" (-> this on-surface-count)) + (format #t "~1Tmove-count: ~D~%" (-> this move-count)) + (format #t "~1Tland-can-land-time: ~D~%" (-> this land-can-land-time)) + (label cfg-4) + this + ) + +;; definition of type enemy-jump-info +(deftype enemy-jump-info (structure) + ((flags enemy-jump-flags) + (anim-speed float) + (hang-time time-frame) + (start-pos vector :inline) + (dest-pos vector :inline) + (traj trajectory :inline) + ) + ) + +;; definition for method 3 of type enemy-jump-info +(defmethod inspect ((this enemy-jump-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'enemy-jump-info) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tanim-speed: ~f~%" (-> this anim-speed)) + (format #t "~1Thang-time: ~D~%" (-> this hang-time)) + (format #t "~1Tstart-pos: #~%" (-> this start-pos)) + (format #t "~1Tdest-pos: #~%" (-> this dest-pos)) + (format #t "~1Ttraj: #~%" (-> this traj)) + (label cfg-4) + this + ) + +;; definition of type enemy-init-by-other-params +(deftype enemy-init-by-other-params (structure) + ((trans vector :inline) + (quat quaternion :inline) + (entity entity) + (directed? symbol) + (no-initial-move-to-ground? symbol) + (art-level symbol) + ) + ) + +;; definition for method 3 of type enemy-init-by-other-params +(defmethod inspect ((this enemy-init-by-other-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'enemy-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)) + (label cfg-4) + this + ) + +;; definition of type enemy-attack-info +(deftype enemy-attack-info (structure) + ((attack-id uint32) + (knocked-type knocked-type) + (blue-juggle-count uint8) + (attacker-handle handle) + (attack-time time-frame) + (penetrate-using penetrate) + (attacker-pos vector :inline) + (attack-direction vector :inline) + (attack-position vector :inline) + (intensity float) + ) + ) + +;; definition for method 3 of type enemy-attack-info +(defmethod inspect ((this enemy-attack-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'enemy-attack-info) + (format #t "~1Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~1Tknocked-type: ~D~%" (-> this knocked-type)) + (format #t "~1Tblue-juggle-count: ~D~%" (-> this blue-juggle-count)) + (format #t "~1Tattacker-handle: ~D~%" (-> this attacker-handle)) + (format #t "~1Tattack-time: ~D~%" (-> this attack-time)) + (format #t "~1Tpenetrate-using: ~D~%" (-> this penetrate-using)) + (format #t "~1Tattacker-pos: ~`vector`P~%" (-> this attacker-pos)) + (format #t "~1Tattack-direction: ~`vector`P~%" (-> this attack-direction)) + (format #t "~1Tattack-position: ~`vector`P~%" (-> this attack-position)) + (format #t "~1Tintensity: ~f~%" (-> this intensity)) + (label cfg-4) + this + ) + +;; definition of type enemy-best-focus +(deftype enemy-best-focus (structure) + ((proc process) + (rating float) + (aware enemy-aware) + ) + ) + +;; definition for method 3 of type enemy-best-focus +(defmethod inspect ((this enemy-best-focus)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'enemy-best-focus) + (format #t "~1Tproc: ~A~%" (-> this proc)) + (format #t "~1Trating: ~f~%" (-> this rating)) + (format #t "~1Taware: ~D~%" (-> this aware)) + (label cfg-4) + this + ) + +;; definition of type enemy +(deftype enemy (process-focusable) + ((fact fact-info-enemy :override) + (root collide-shape-moving :override) + (enemy-flags enemy-flag) + (enemy-info enemy-info) + (hit-points float) + (gnd-collide-with collide-spec) + (attack-id uint32) + (persistent-attack-id uint32) + (water-max-height float) + (water-surface-height float) + (desired-angle degrees) + (jump-why uint64) + (penetrated-by-all penetrate) + (penetrate-flinch penetrate) + (penetrate-knocked penetrate) + (ragdoll-proc handle) + (reaction-time time-frame) + (notice-time time-frame) + (state-timeout time-frame) + (auto-reset-penetrate-time time-frame) + (hit-focus-time time-frame) + (last-draw-time time-frame) + (starting-time time-frame) + (fated-time time-frame) + (focus-pos vector :inline) + (event-param-point vector :inline) + (jump-dest vector :inline :overlay-at event-param-point) + (focus enemy-focus :inline) + (incoming enemy-attack-info :inline) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (neck joint-mod) + (on-notice pair) + (on-active pair) + (on-hostile pair) + (on-death pair) + (idle-anim-player idle-control :inline) + (rand-gen symbol) + ) + (:state-methods + dormant + dormant-aware + hit + knocked + knocked-recover + idle + active + notice + flee + stare + hostile + victory + die + die-falling + die-fast + directed + jump + jump-blocked + ambush-delay + ambush + view-anims + gun-dark-2-stretch + ) + (:methods + (enemy-method-50 (_type_ int) none) + (accelerate-fall! (_type_ vector) float) + (damage-enemy! (_type_ object event-message-block) float) + (reset-penetrate! (_type_) none) + (get-knockback-dir! (_type_ vector) vector) + (get-knockback-angle (_type_) degrees) + (knocked-handler (_type_ vector) object) + (can-collide-with-focus? (_type_ process-focusable) object) + (check-water (_type_) object) + (enemy-common-post (_type_) none) + (lerp-damage (_type_ float) float) + (scale-impact-vel-y! (_type_ vector vector float) vector) + (get-damage-from-attack (_type_ object event-message-block) float) + (enemy-method-63 (_type_ float) float) + (update-awareness! (_type_ process-focusable enemy-best-focus) enemy-aware) + (penetrate->next-state (_type_) symbol) + (get-penetrated-by (_type_) penetrate) + (coin-flip? (_type_) symbol) + (get-enemy-aware (_type_ enemy-aware) enemy-aware) + (enemy-method-69 (_type_) none) + (enemy-method-70 (_type_ process-focusable enemy-aware) none) + (go-dormant (_type_) object) + (go-dormant-aware (_type_) object) + (go-idle (_type_) object) + (go-ambush-delay (_type_) object) + (go-stare (_type_) object) + (go-stare2 (_type_) object) + (go-directed (_type_) object) + (go-hostile (_type_) object) + (go-flee (_type_) object) + (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) 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) + (enemy-method-88 (_type_ enemy-knocked-info) symbol) + (within-gspot-range? (_type_) symbol) + (enemy-method-90 (_type_ ragdoll-proc) none) + (enemy-method-91 (_type_ enemy-jump-info) object) + (init-jump-info! (_type_ enemy-jump-info) none) + (setup-jump! (_type_ enemy-jump-info) none) + (move-to-gspot! (_type_) float) + (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) + (jump-anim-handler (_type_ int enemy-jump-info) symbol) + (in-jump-handler (_type_ int enemy-jump-info) none) + (enemy-method-101 (_type_ int enemy-jump-info) none) + (go-directed2 (_type_) object) + (enemy-method-103 (_type_ vector float) symbol) + (enemy-method-104 (_type_ vector float) symbol) + (enemy-method-105 (_type_ float symbol) symbol) + (find-best-focus (_type_) process) + (is-pfoc-in-mesh? (_type_ process-focusable vector) symbol) + (enemy-method-108 (_type_ process-focusable) symbol) + (enemy-method-109 (_type_) symbol) + (send-attack (_type_ process touching-shapes-entry uint) symbol) + (on-attack (_type_ process-focusable) none) + (get-incoming-attack! (_type_ process-drawable event-message-block penetrate attack-info touching-shapes-entry) none) + (get-focus! (_type_) process-focusable) + (send-attack-to-all-tshapes (_type_ process-focusable event-message-block) int) + (set-look-at-mode! (_type_ int) none) + (stop-look-at! (_type_) none) + (apply-friction (_type_) none) + (init-enemy-info! (_type_ enemy-info) none) + (init-enemy-defaults! (_type_ enemy-info) none) + (init-enemy-collision! (_type_) none) + (init-enemy! (_type_) none) + (go-idle2 (_type_) object) + (enemy-method-123 (_type_) symbol) + (disable-ragdoll (_type_) none) + (ragdoll-settled? (_type_) object) + (ragdoll-spawn! (_type_ symbol symbol) vector) + (deactivate-ragdoll! (_type_) none) + (rnd-float (_type_) float) + (rnd-float-range (_type_ float float) float) + (rnd-int (_type_ int) int) + (enemy-method-131 (_type_ int int) int) + (set-reaction-time! (_type_ time-frame time-frame) time-frame) + (rnd-chance? (_type_ float) symbol) + (enemy-method-134 (_type_ float) symbol) + (enemy-method-135 (_type_) none) + (set-ground-pat! (_type_ collide-query collide-spec float float float process) pat-surface) + (enemy-above-ground? (_type_ collide-query vector collide-spec float float float) symbol) + (try-locate-ground (_type_ meters meters symbol collide-spec) symbol) + (move-above-ground! (_type_ vector move-above-ground-params) none) + (update-focus (_type_) process) + (enemy-method-141 (_type_ float) symbol) + (penetrate->knocked-type (_type_ penetrate) knocked-type) + (on-dying (_type_) none) + (falling? (_type_) symbol) + (find-offending-pfoc (_type_ process attack-info) process-focusable) + (play-damage-sound (_type_ int) sound-id) + (check-victory (_type_) none) + (go-gun-dark-2-stretch (_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) + (get-gem-pool-idx (_type_) int) + (mark-as-dead (_type_) none) + ) + ) + +;; definition for method 3 of type enemy +(defmethod inspect ((this enemy)) + (when (not this) + (set! this this) + (goto cfg-81) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tenemy-flags: #x~X : (enemy-flag " (-> this enemy-flags)) + (let ((s5-0 (-> this enemy-flags))) + (if (= (logand (enemy-flag auto-death-phase-out) s5-0) (shl 8 32)) + (format #t "auto-death-phase-out ") + ) + (if (= (logand (enemy-flag lock-focus) s5-0) (enemy-flag lock-focus)) + (format #t "lock-focus ") + ) + (if (= (logand (enemy-flag death-start) s5-0) (shl 4 32)) + (format #t "death-start ") + ) + (if (= (logand (enemy-flag checking-water) s5-0) (enemy-flag checking-water)) + (format #t "checking-water ") + ) + (if (= (logand s5-0 (enemy-flag enable-on-active)) (enemy-flag enable-on-active)) + (format #t "enable-on-active ") + ) + (if (= (logand (enemy-flag check-water) s5-0) (enemy-flag check-water)) + (format #t "check-water ") + ) + (if (= (logand (enemy-flag spawn-gem) s5-0) (enemy-flag spawn-gem)) + (format #t "spawn-gem ") + ) + (if (= (logand (enemy-flag chase-startup) s5-0) (enemy-flag chase-startup)) + (format #t "chase-startup ") + ) + (if (= (logand s5-0 (enemy-flag attackable-backup)) (enemy-flag attackable-backup)) + (format #t "attackable-backup ") + ) + (if (= (logand s5-0 (enemy-flag attackable)) (enemy-flag attackable)) + (format #t "attackable ") + ) + (if (= (logand s5-0 (enemy-flag look-at-focus)) (enemy-flag look-at-focus)) + (format #t "look-at-focus ") + ) + (if (= (logand s5-0 (enemy-flag use-notice-distance)) (enemy-flag use-notice-distance)) + (format #t "use-notice-distance ") + ) + (if (= (logand s5-0 (enemy-flag enable-on-notice)) (enemy-flag enable-on-notice)) + (format #t "enable-on-notice ") + ) + (if (= (logand s5-0 (enemy-flag look-at-move-dest)) (enemy-flag look-at-move-dest)) + (format #t "look-at-move-dest ") + ) + (if (= (logand s5-0 (enemy-flag notice)) (enemy-flag notice)) + (format #t "notice ") + ) + (if (= (logand s5-0 (enemy-flag auto-reset-penetrate)) (enemy-flag auto-reset-penetrate)) + (format #t "auto-reset-penetrate ") + ) + (if (= (logand (enemy-flag jump-check-blocked) s5-0) (shl 2 32)) + (format #t "jump-check-blocked ") + ) + (if (= (logand (enemy-flag drawn-mirrored) s5-0) (enemy-flag drawn-mirrored)) + (format #t "drawn-mirrored ") + ) + (if (= (logand (enemy-flag multi-focus) s5-0) (enemy-flag multi-focus)) + (format #t "multi-focus ") + ) + (if (= (logand s5-0 (enemy-flag alert)) (enemy-flag alert)) + (format #t "alert ") + ) + (if (= (logand s5-0 (enemy-flag victory)) (enemy-flag victory)) + (format #t "victory ") + ) + (if (= (logand s5-0 (enemy-flag dangerous-backup)) (enemy-flag dangerous-backup)) + (format #t "dangerous-backup ") + ) + (if (= (logand s5-0 (enemy-flag actor-pause-backup)) (enemy-flag actor-pause-backup)) + (format #t "actor-pause-backup ") + ) + (if (= (logand (enemy-flag trackable) s5-0) (enemy-flag trackable)) + (format #t "trackable ") + ) + (if (= (logand (enemy-flag called-dying) s5-0) (shl #x8000 16)) + (format #t "called-dying ") + ) + (if (= (logand (enemy-flag check-water-backup) s5-0) (enemy-flag check-water-backup)) + (format #t "check-water-backup ") + ) + (if (= (logand (enemy-flag no-initial-move-to-ground) s5-0) (shl 1 32)) + (format #t "no-initial-move-to-ground ") + ) + (if (= (logand s5-0 (enemy-flag cam-attack-mode)) (enemy-flag cam-attack-mode)) + (format #t "cam-attack-mode ") + ) + (if (= (logand (enemy-flag has-gem) s5-0) (shl 16 32)) + (format #t "has-gem ") + ) + (if (= (logand (enemy-flag trackable-backup) s5-0) (enemy-flag trackable-backup)) + (format #t "trackable-backup ") + ) + (if (= (logand (enemy-flag enable-on-hostile) s5-0) (enemy-flag enable-on-hostile)) + (format #t "enable-on-hostile ") + ) + (if (= (logand (enemy-flag directed-ready) s5-0) (enemy-flag directed-ready)) + (format #t "directed-ready ") + ) + (if (= (logand (enemy-flag use-trigger) s5-0) (enemy-flag use-trigger)) + (format #t "use-trigger ") + ) + (if (= (logand (enemy-flag directed) s5-0) (enemy-flag directed)) + (format #t "directed ") + ) + (if (= (logand (enemy-flag dislike-combo) s5-0) (enemy-flag dislike-combo)) + (format #t "dislike-combo ") + ) + (if (= (logand s5-0 (enemy-flag vulnerable-backup)) (enemy-flag vulnerable-backup)) + (format #t "vulnerable-backup ") + ) + (if (= (logand s5-0 (enemy-flag vulnerable)) (enemy-flag vulnerable)) + (format #t "vulnerable ") + ) + ) + (format #t ")~%") + (format #t "~2Tenemy-info: ~A~%" (-> this enemy-info)) + (format #t "~2Thit-points: ~f~%" (-> this hit-points)) + (format #t "~2Tgnd-collide-with: ~D~%" (-> this gnd-collide-with)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Tpersistent-attack-id: ~D~%" (-> this persistent-attack-id)) + (format #t "~2Twater-max-height: ~f~%" (-> this water-max-height)) + (format #t "~2Twater-surface-height: ~f~%" (-> this water-surface-height)) + (format #t "~2Tdesired-angle: ~f~%" (-> this desired-angle)) + (format #t "~2Tjump-why: ~D~%" (-> this jump-why)) + (format #t "~2Tpenetrated-by-all: ~D~%" (-> this penetrated-by-all)) + (format #t "~2Tpenetrate-flinch: ~D~%" (-> this penetrate-flinch)) + (format #t "~2Tpenetrate-knocked: ~D~%" (-> this penetrate-knocked)) + (format #t "~2Tragdoll-proc: ~D~%" (-> this ragdoll-proc)) + (format #t "~2Treaction-time: ~D~%" (-> this reaction-time)) + (format #t "~2Tnotice-time: ~D~%" (-> this notice-time)) + (format #t "~2Tstate-timeout: ~D~%" (-> this state-timeout)) + (format #t "~2Tauto-reset-penetrate-time: ~D~%" (-> this auto-reset-penetrate-time)) + (format #t "~2Thit-focus-time: ~D~%" (-> this hit-focus-time)) + (format #t "~2Tlast-draw-time: ~D~%" (-> this last-draw-time)) + (format #t "~2Tstarting-time: ~D~%" (-> this starting-time)) + (format #t "~2Tfated-time: ~D~%" (-> this fated-time)) + (format #t "~2Tfocus-pos: ~`vector`P~%" (-> this focus-pos)) + (format #t "~2Tevent-param-point: ~`vector`P~%" (-> this event-param-point)) + (format #t "~2Tjump-dest: ~`vector`P~%" (-> this event-param-point)) + (format #t "~2Tfocus: #~%" (-> this focus)) + (format #t "~2Tincoming: #~%" (-> this incoming)) + (format #t "~2Tactor-group: #x~X~%" (-> this actor-group)) + (dotimes (s5-1 (-> this actor-group-count)) + (format #t "~T [~D]~2Tactor-group: ~`actor-group`P~%" s5-1 (-> this actor-group s5-1)) + ) + (format #t "~2Tactor-group-count: ~D~%" (-> this actor-group-count)) + (format #t "~2Tneck: ~A~%" (-> this neck)) + (format #t "~2Ton-notice: ~A~%" (-> this on-notice)) + (format #t "~2Ton-active: ~A~%" (-> this on-active)) + (format #t "~2Ton-hostile: ~A~%" (-> this on-hostile)) + (format #t "~2Ton-death: ~A~%" (-> this on-death)) + (format #t "~2Tidle-anim-player: #~%" (-> this idle-anim-player)) + (format #t "~2Trand-gen: ~A~%" (-> this rand-gen)) + (label cfg-81) + this + ) + +;; definition of type anim-info +(deftype anim-info (structure) + ((anim-index int32) + (travel-speed meters) + ) + ) + +;; definition for method 3 of type anim-info +(defmethod inspect ((this anim-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'anim-info) + (format #t "~1Tanim-index: ~D~%" (-> this anim-index)) + (format #t "~1Ttravel-speed: (meters ~m)~%" (-> this travel-speed)) + (label cfg-4) + this + ) + +;; definition for method 12 of type enemy-focus +(defmethod try-update-focus ((this enemy-focus) (arg0 process-focusable) (arg1 enemy)) + (let* ((t9-0 (method-of-type focus try-update-focus)) + (s3-0 (t9-0 this arg0)) + ) + (when (not s3-0) + (logclear! (-> this flags) (enemy-flag look-at-focus)) + (set! (-> this aware) (get-enemy-aware arg1 (update-awareness! arg1 arg0 (the-as enemy-best-focus #f)))) + ) + s3-0 + ) + ) + +;; definition for method 13 of type enemy-focus +(defmethod enemy-focus-method-13 ((this enemy-focus) (arg0 process-focusable) (arg1 enemy-aware)) + (let* ((t9-0 (method-of-type focus try-update-focus)) + (v0-0 (t9-0 this arg0)) + ) + (set! (-> this aware) arg1) + (if (not v0-0) + (logclear! (-> this flags) (enemy-flag look-at-focus)) + ) + v0-0 + ) + ) + +;; definition for method 9 of type enemy-focus +;; WARN: Return type mismatch enemy-flag vs none. +(defmethod clear-focused ((this enemy-focus)) + "Reset the focus' handle." + (let ((t9-0 (method-of-type focus clear-focused))) + (t9-0 this) + ) + (set! (-> this aware) (enemy-aware ea0)) + (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 new file mode 100644 index 0000000000..019e0becb8 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/ai/enemy_REF.gc @@ -0,0 +1,3123 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 9 of type enemy-info +;; WARN: Return type mismatch int vs none. +(defmethod copy-enemy-info! ((this enemy-info) (arg0 enemy-info)) + (mem-copy! (&-> this type) (&-> arg0 type) 420) + 0 + (none) + ) + +;; definition for symbol *enemy-dummy-shadow-control*, type shadow-control +(define *enemy-dummy-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 4096.0) + :top-plane (new 'static 'plane :y 1.0 :w -4096.0) + ) + ) + ) + +;; definition for method 7 of type enemy +(defmethod relocate ((this enemy) (offset int)) + (if (nonzero? (-> this neck)) + (&+! (-> this neck) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 128 of type enemy +(defmethod rnd-float ((this enemy)) + (rand-vu) + ) + +;; definition for method 129 of type enemy +(defmethod rnd-float-range ((this enemy) (arg0 float) (arg1 float)) + (+ arg0 (* (rand-vu) (- arg1 arg0))) + ) + +;; definition for method 130 of type enemy +(defmethod rnd-int ((this enemy) (arg0 int)) + (the int (* (rand-vu) (the float arg0))) + ) + +;; definition for method 132 of type enemy +(defmethod set-reaction-time! ((this enemy) (arg0 time-frame) (arg1 time-frame)) + (+ arg0 (the int (* (rand-vu) (the float (+ (- 1 arg0) arg1))))) + ) + +;; definition for method 133 of type enemy +(defmethod rnd-chance? ((this enemy) (arg0 float)) + (>= arg0 (rand-vu)) + ) + +;; definition for method 131 of type enemy +;; WARN: new jak 2 until loop case, check carefully +(defmethod enemy-method-131 ((this enemy) (arg0 int) (arg1 int)) + (let ((v1-0 0) + (s5-0 0) + ) + (let ((a2-1 1)) + (while (nonzero? arg0) + (+! arg0 -1) + (if (not (logtest? arg1 a2-1)) + (+! v1-0 1) + ) + (set! a2-1 (* a2-1 2)) + ) + ) + (when (> v1-0 0) + (let ((v1-1 (rnd-int this v1-0)) + (a0-1 1) + ) + (until #f + (while (logtest? arg1 a0-1) + (nop!) + (nop!) + (+! s5-0 1) + (set! a0-1 (* a0-1 2)) + ) + (if (zero? v1-1) + (goto cfg-14) + ) + (+! v1-1 -1) + (+! s5-0 1) + (set! a0-1 (* a0-1 2)) + ) + ) + #f + ) + (label cfg-14) + s5-0 + ) + ) + +;; definition for method 134 of type enemy +(defmethod enemy-method-134 ((this enemy) (arg0 float)) + (let* ((v1-5 (-> *display* frames (-> *display* last-screen) run-time)) + (f1-2 (fmax 0.0 (fmin 1.0 (* 0.001 (+ -7000.0 (the float v1-5)))))) + ) + (>= (+ arg0 (* f1-2 (- 1.0 arg0))) (rand-vu)) + ) + ) + +;; definition for method 67 of type enemy +(defmethod coin-flip? ((this enemy)) + (zero? (rnd-int this 2)) + ) + +;; definition for method 12 of type enemy +;; WARN: disable def twice: 40. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod run-logic? ((this enemy)) + "Should this process be run? Checked by execute-process-tree." + (cond + ((logtest? (-> this mask) (process-mask actor-pause)) + (let ((gp-0 (-> this draw))) + (or (and (nonzero? gp-0) + (>= (+ (-> *ACTOR-bank* pause-dist) (-> this root pause-adjust-distance)) + (vector-vector-distance (-> this root trans) (camera-pos)) + ) + (or (logtest? (-> gp-0 status) (draw-control-status on-screen)) + (not (and (-> this next-state) (= (-> this next-state name) 'idle))) + ) + ) + (and (nonzero? (-> this skel)) (!= (-> this skel root-channel 0) (-> this skel channel))) + (and (nonzero? gp-0) (logtest? (-> gp-0 status) (draw-control-status uninited))) + ) + ) + ) + (else + #t + ) + ) + ) + +;; definition for method 57 of type enemy +(defmethod can-collide-with-focus? ((this enemy) (arg0 process-focusable)) + (and arg0 (!= this arg0) (collide-spec-match? (-> this focus) arg0)) + ) + +;; definition for method 20 of type enemy +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this enemy)) + (let ((v1-0 (-> this enemy-flags)) + (v0-0 0) + ) + (when (and (!= (-> this hit-points) 0.0) + (logtest? (-> this enemy-flags) (enemy-flag vulnerable)) + (logtest? (enemy-flag trackable) (-> this enemy-flags)) + ) + (if (logtest? (process-mask enemy) (-> this mask)) + (set! v0-0 (logior v0-0 16)) + ) + (if (logtest? v1-0 (enemy-flag attackable)) + (set! v0-0 (logior v0-0 8)) + ) + ) + (the-as search-info-flag v0-0) + ) + ) + +;; definition for method 21 of type enemy +(defmethod get-trans ((this enemy) (arg0 int)) + "Get the `trans` for this process." + (let ((s4-0 (-> this root))) + (cond + ((zero? arg0) + (-> s4-0 trans) + ) + ((and (= arg0 1) (type? s4-0 collide-shape-moving)) + (-> s4-0 gspot-pos) + ) + ((= arg0 2) + (vector<-cspace! (new 'static 'vector) (-> this node-list data (-> this enemy-info look-at-joint))) + ) + ((= arg0 3) + (let ((v0-0 (vector<-cspace! (new 'static 'vector) (-> this node-list data (-> this enemy-info bullseye-joint))))) + (set! (-> v0-0 w) (-> this root root-prim prim-core world-sphere w)) + v0-0 + ) + ) + (else + ((method-of-type process-focusable get-trans) this arg0) + ) + ) + ) + ) + +;; definition for method 66 of type enemy +(defmethod get-penetrated-by ((this enemy)) + (penetrated-by-all&hit-points->penetrated-by (-> this penetrated-by-all) (the int (-> this hit-points))) + ) + +;; definition for method 25 of type enemy +;; WARN: Return type mismatch float vs meters. +(defmethod get-water-height ((this enemy)) + (the-as meters (-> this water-surface-height)) + ) + +;; definition for method 58 of type enemy +;; INFO: Used lq/sq +;; WARN: Return type mismatch enemy-flag vs object. +(defmethod check-water ((this enemy)) + (let ((s4-0 (-> this root))) + (when (>= (-> this water-max-height) (-> s4-0 trans y)) + (let ((s5-0 (new 'stack-no-clear 'water-info))) + (water-info-init! s4-0 s5-0 (collide-action solid semi-solid)) + (let ((s3-0 (-> s5-0 flags))) + (when (logtest? (water-flag touch-water) s3-0) + (set! (-> this water-surface-height) (-> s5-0 trans y)) + (when (not (focus-test? this touch-water under-water)) + (let ((v1-9 (new 'stack-no-clear 'vector))) + (set! (-> v1-9 quad) (-> this root trans quad)) + (set! (-> v1-9 y) (+ 409.6 (-> s5-0 trans y))) + (cond + ((logtest? (-> *part-group-id-table* 192 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-9 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 192)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-9 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 192)) + ) + ) + ) + (cond + ((logtest? s3-0 (water-flag dark-eco)) + (sound-play "eco-splash") + (send-event this 'instant-death) + ) + (else + (play-damage-sound this 2) + ) + ) + ) + (logior! (-> this focus-status) (focus-status touch-water)) + (let* ((v1-46 (-> s4-0 root-prim prim-core)) + (f0-6 (+ (-> v1-46 world-sphere y) (-> v1-46 world-sphere w))) + ) + (if (focus-test? this under-water) + (set! f0-6 (+ -819.2 f0-6)) + ) + (if (< f0-6 (-> s5-0 trans y)) + (logior! (-> this focus-status) (focus-status under-water)) + (logclear! (-> this focus-status) (focus-status under-water)) + ) + ) + (return (the-as object #f)) + ) + ) + ) + ) + ) + (logclear! (-> this focus-status) (focus-status touch-water under-water)) + (let ((v0-11 (logclear (-> this enemy-flags) (enemy-flag checking-water)))) + (set! (-> this enemy-flags) v0-11) + v0-11 + ) + ) + +;; definition for method 59 of type enemy +;; WARN: Return type mismatch int vs none. +(defmethod enemy-common-post ((this enemy)) + (if (and (nonzero? (-> this draw)) (logtest? (-> this draw status) (draw-control-status on-screen))) + (set-time! (-> this last-draw-time)) + ) + (update-focus this) + (when *target* + (if *target* + (look-at! + (-> *target* neck) + (the-as vector (-> this root root-prim prim-core)) + (if (logtest? (-> this enemy-flags) (enemy-flag cam-attack-mode)) + 'attacking + ) + this + ) + ) + ) + (when (nonzero? (-> this neck)) + (when (logtest? (-> this enemy-flags) (enemy-flag look-at-focus)) + (let ((a0-7 (handle->process (-> this focus handle)))) + (if a0-7 + (target-set! (-> this neck) (get-trans (the-as process-focusable a0-7) 2)) + ) + ) + ) + ) + (when (and (logtest? (-> this enemy-flags) (enemy-flag auto-reset-penetrate)) + (time-elapsed? (-> this auto-reset-penetrate-time) (seconds 0.1)) + ) + (logclear! (-> this enemy-flags) (enemy-flag auto-reset-penetrate)) + (set! (-> this root penetrated-by) (get-penetrated-by this)) + (let ((v1-43 0)) + (if (logtest? (penetrate knocked) (-> this root penetrate-using)) + (set! v1-43 (logior (shl 2 32) v1-43)) + ) + (set! (-> this root penetrate-using) (the-as penetrate v1-43)) + ) + ) + (if (logtest? (-> this enemy-flags) (enemy-flag victory)) + (check-victory this) + ) + (if (logtest? (enemy-flag check-water checking-water) (-> this enemy-flags)) + (check-water this) + ) + (if (and *debug-segment* (-> this enemy-info debug-draw-neck) (nonzero? (-> this neck))) + (joint-mod-debug-draw (-> this neck)) + ) + (ja-post) + 0 + (none) + ) + +;; definition for method 147 of type enemy +;; WARN: Return type mismatch enemy-flag vs none. +(defmethod check-victory ((this enemy)) + (if (or (time-elapsed? (-> this hit-focus-time) (seconds 2)) + (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) + ) + +;; definition for function get-penetrate-using-from-attack-event +;; WARN: Return type mismatch int vs penetrate. +(defun get-penetrate-using-from-attack-event ((arg0 process-drawable) (arg1 event-message-block)) + (let ((v1-0 (the-as object (-> arg1 param 1)))) + (if (logtest? (attack-mask penetrate-using) (-> (the-as attack-info v1-0) mask)) + (return (the-as penetrate (-> (the-as attack-info v1-0) penetrate-using))) + ) + ) + (let* ((gp-0 arg0) + (v1-3 (if (type? gp-0 process-drawable) + gp-0 + ) + ) + ) + (when v1-3 + (let* ((gp-1 (-> v1-3 root)) + (v1-4 (if (type? gp-1 collide-shape) + gp-1 + ) + ) + ) + (if v1-4 + (return + (the-as penetrate (logior (-> (the-as collide-shape v1-4) penetrate-using) (penetrate generic-attack))) + ) + ) + ) + ) + ) + (the-as penetrate 2) + ) + +;; definition for method 113 of type enemy +;; WARN: Return type mismatch process vs process-focusable. +(defmethod get-focus! ((this enemy)) + (let ((v0-0 (handle->process (-> this focus handle)))) + (if (and v0-0 + (not (and v0-0 + (not (logtest? (-> (the-as process-focusable v0-0) focus-status) (focus-status disable dead ignore grabbed))) + ) + ) + ) + (set! v0-0 (the-as process #f)) + ) + (the-as process-focusable v0-0) + ) + ) + +;; definition for method 70 of type enemy +;; WARN: Return type mismatch symbol vs none. +(defmethod enemy-method-70 ((this enemy) (arg0 process-focusable) (arg1 enemy-aware)) + (if arg1 + (enemy-focus-method-13 (-> this focus) arg0 arg1) + (try-update-focus (-> this focus) arg0 this) + ) + (none) + ) + +;; definition for method 69 of type enemy +;; WARN: Return type mismatch int vs none. +(defmethod enemy-method-69 ((this enemy)) + (when (not (logtest? (enemy-flag lock-focus) (-> this enemy-flags))) + (let* ((s4-0 (handle->process (-> this incoming attacker-handle))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when (can-collide-with-focus? this (the-as process-focusable s5-0)) + (enemy-method-70 this (the-as process-focusable s5-0) (the-as enemy-aware #f)) + (logior! (-> this focus flags) (enemy-flag look-at-focus)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 114 of type enemy +(defmethod send-attack-to-all-tshapes ((this enemy) (arg0 process-focusable) (arg1 event-message-block)) + (let ((s4-0 (the-as touching-shapes-entry (-> arg1 param 0)))) + (when (and s4-0 + (and (logtest? (-> this incoming penetrate-using) (penetrate board)) + (not (logtest? (-> this incoming penetrate-using) (penetrate spin))) + ) + (begin + (let ((s3-0 (-> s4-0 head))) + (while s3-0 + (let ((s2-0 (get-touched-prim s3-0 (-> arg0 root) s4-0))) + (get-touched-prim s3-0 (-> this root) s4-0) + (when (logtest? (-> s2-0 prim-core action) (collide-action solid semi-solid deadly)) + (let* ((a0-5 this) + (t9-2 (method-of-object a0-5 send-attack)) + (a1-3 arg0) + (a2-3 s4-0) + (v1-13 *game-info*) + (a3-1 (+ (-> v1-13 attack-id) 1)) + ) + (set! (-> v1-13 attack-id) a3-1) + (if (t9-2 a0-5 a1-3 a2-3 a3-1) + (return 0) + ) + ) + ) + ) + (set! s3-0 (-> s3-0 next)) + ) + ) + #f + ) + ) + ) + ) + 0 + ) + +;; definition for method 71 of type enemy +(defmethod go-dormant ((this enemy)) + (let ((v1-1 (-> this root root-prim))) + (set! (-> v1-1 prim-core collide-as) (collide-spec)) + (set! (-> v1-1 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> this draw status) (draw-control-status no-draw)) + (logior! (-> this focus-status) (focus-status disable)) + (go (method-of-object this dormant)) + ) + +;; definition for method 72 of type enemy +(defmethod go-dormant-aware ((this enemy)) + (let ((v1-1 (-> this root root-prim))) + (set! (-> v1-1 prim-core collide-as) (collide-spec)) + (set! (-> v1-1 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> this draw status) (draw-control-status no-draw)) + (logior! (-> this focus-status) (focus-status disable)) + (go (method-of-object this dormant-aware)) + ) + +;; definition for method 73 of type enemy +(defmethod go-idle ((this enemy)) + (go (method-of-object this idle)) + ) + +;; definition for method 75 of type enemy +(defmethod go-stare ((this enemy)) + (go (method-of-object this stare)) + ) + +;; definition for method 76 of type enemy +(defmethod go-stare2 ((this enemy)) + (go (method-of-object this stare)) + ) + +;; definition for method 78 of type enemy +(defmethod go-hostile ((this enemy)) + (go (method-of-object this hostile)) + ) + +;; definition for method 149 of type enemy +(defmethod have-more-than-10-joints? ((this enemy)) + (and (nonzero? (-> this node-list)) (-> this node-list) (< 10 (-> this node-list length))) + ) + +;; definition for method 150 of type enemy +(defmethod enemy-method-150 ((this enemy)) + #t + ) + +;; definition for method 148 of type enemy +(defmethod go-gun-dark-2-stretch ((this enemy)) + (if (not (and (-> this next-state) (= (-> this next-state name) 'gun-dark-2-stretch))) + (go (method-of-object this gun-dark-2-stretch)) + ) + ) + +;; definition for method 74 of type enemy +(defmethod go-ambush-delay ((this enemy)) + (if (< 0.0 (res-lump-float (-> this entity) 'ambush-delay)) + (go (method-of-object this ambush-delay)) + (go (method-of-object this ambush)) + ) + ) + +;; definition for method 79 of type enemy +(defmethod go-flee ((this enemy)) + (go (method-of-object this flee)) + ) + +;; definition for method 77 of type enemy +(defmethod go-directed ((this enemy)) + (go (method-of-object this directed)) + ) + +;; definition for method 80 of type enemy +(defmethod go-best-state ((this enemy)) + (let ((s5-0 (-> this focus aware))) + (cond + ((and (= s5-0 (enemy-aware ea3)) (get-focus! this)) + (go-hostile this) + ) + ((<= (the-as int s5-0) 0) + (go-idle this) + ) + ((>= 1 (the-as int s5-0)) + (go (method-of-object this active)) + ) + ((= s5-0 (enemy-aware ea4)) + (go-flee this) + ) + (else + (go-stare this) + ) + ) + ) + ) + +;; definition for method 102 of type enemy +(defmethod go-directed2 ((this enemy)) + (if (logtest? (enemy-flag directed) (-> this enemy-flags)) + (go-directed this) + (go-best-state this) + ) + ) + +;; definition for method 81 of type enemy +(defmethod go-die ((this enemy)) + (if (-> this enemy-info use-die-falling) + (go (method-of-object this die-falling)) + (go (method-of-object this die)) + ) + ) + +;; definition for method 146 of type enemy +;; INFO: Used lq/sq +(defmethod play-damage-sound ((this enemy) (arg0 int)) + (let ((name (static-sound-name ""))) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (set! name (-> this enemy-info sound-hit)) + ) + ((= v1-0 1) + (set! name (-> this enemy-info sound-die)) + ) + ((= v1-0 2) + (sound-play "splash") + ) + ) + ) + (if (nonzero? (the-as uint name)) + (sound-play-by-name (the-as sound-name name) (new-sound-id) 1024 0 0 (sound-group) #t) + ) + ) + ) + +;; definition for method 103 of type enemy +;; INFO: Used lq/sq +(defmethod enemy-method-103 ((this enemy) (arg0 vector) (arg1 float)) + (let ((s4-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root 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 104 of type enemy +(defmethod enemy-method-104 ((this enemy) (arg0 vector) (arg1 float)) + (let ((v1-1 (vector-! (new 'stack-no-clear 'vector) arg0 (-> this root trans)))) + (enemy-method-103 this v1-1 arg1) + ) + ) + +;; definition for method 105 of type enemy +(defmethod enemy-method-105 ((this enemy) (arg0 float) (arg1 symbol)) + (let ((a0-2 (handle->process (-> this focus handle)))) + (cond + (a0-2 + (let ((s4-1 + (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable a0-2) 0) (-> this root trans)) + ) + ) + (enemy-method-103 this s4-1 arg0) + ) + ) + (else + arg1 + ) + ) + ) + ) + +;; definition for method 110 of type enemy +(defmethod send-attack ((this enemy) (arg0 process) (arg1 touching-shapes-entry) (arg2 uint)) + (let ((a0-1 (-> this enemy-info attack-damage))) + (if (and (logtest? (-> *game-info* secrets) (game-secrets hero-mode)) (= a0-1 1)) + (set! a0-1 2) + ) + (when (send-event + arg0 + 'attack + arg1 + (static-attack-info :mask (vehicle-impulse-factor) ((id arg2) + (damage (the float a0-1)) + (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)) + (knock (if (-> this enemy-info knocked-off) + (knocked-type knocked-off) + (knocked-type none) + ) + ) + ) + ) + ) + (on-attack this (the-as process-focusable arg0)) + #t + ) + ) + ) + +;; definition for method 111 of type enemy +;; WARN: Return type mismatch enemy-flag vs none. +(defmethod on-attack ((this enemy) (arg0 process-focusable)) + (when (logtest? (process-mask target bot) (-> arg0 mask)) + (set! (-> this root penetrated-by) (the-as penetrate -1)) + (reset-penetrate! this) + ) + (let ((s5-0 (if (type? arg0 process-focusable) + arg0 + ) + ) + ) + (when (can-collide-with-focus? this s5-0) + (let ((v1-10 (handle->process (-> this focus handle)))) + (when (or (= s5-0 v1-10) (and (not (logtest? (enemy-flag lock-focus) (-> this enemy-flags))) + (or (not v1-10) (not (logtest? (-> this focus flags) (enemy-flag look-at-focus)))) + ) + ) + (enemy-method-70 this s5-0 (the-as enemy-aware #f)) + (set-time! (-> this hit-focus-time)) + (logior! (-> this enemy-flags) (enemy-flag victory)) + ) + ) + ) + ) + (none) + ) + +;; definition for method 53 of type enemy +;; WARN: Return type mismatch time-frame vs none. +(defmethod reset-penetrate! ((this enemy)) + (logior! (-> this enemy-flags) (enemy-flag auto-reset-penetrate)) + (set-time! (-> this auto-reset-penetrate-time)) + (none) + ) + +;; definition for method 54 of type enemy +;; INFO: Used lq/sq +(defmethod get-knockback-dir! ((this enemy) (arg0 vector)) + (set! (-> arg0 quad) (-> this incoming attack-direction quad)) + (let ((v1-1 arg0)) + (when (= (+ (* (-> v1-1 x) (-> v1-1 x)) (* (-> v1-1 z) (-> v1-1 z))) 0.0) + (vector-z-quaternion! arg0 (-> this root quat)) + (vector-negate-in-place! arg0) + ) + ) + (set! (-> arg0 y) 0.0) + (vector-xz-normalize! arg0 1.0) + ) + +;; definition for method 142 of type enemy +;; WARN: Return type mismatch int vs knocked-type. +(defmethod penetrate->knocked-type ((this enemy) (arg0 penetrate)) + (the-as knocked-type (cond + ((logtest? arg0 (penetrate vehicle)) + 7 + ) + ((logtest? (penetrate jak-blue-shot) arg0) + 6 + ) + ((logtest? (penetrate jak-yellow-shot enemy-yellow-shot) arg0) + 4 + ) + ((logtest? (penetrate jak-red-shot) arg0) + 5 + ) + ((logtest? (penetrate dark-bomb dark-smack) arg0) + 3 + ) + ((logtest? (penetrate explode jak-dark-shot enemy-dark-shot) arg0) + 2 + ) + ((logtest? arg0 (penetrate mech-punch)) + 1 + ) + (else + 0 + ) + ) + ) + ) + +;; definition for method 112 of type enemy +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod get-incoming-attack! ((this enemy) + (arg0 process-drawable) + (arg1 event-message-block) + (arg2 penetrate) + (arg3 attack-info) + (arg4 touching-shapes-entry) + ) + (set! (-> this incoming penetrate-using) arg2) + (set! (-> this incoming attack-id) (-> arg3 id)) + (let ((v1-3 (if (logtest? (attack-mask knock) (-> arg3 mask)) + (-> arg3 knock) + (penetrate->knocked-type this arg2) + ) + ) + ) + (set! (-> this incoming knocked-type) v1-3) + (let ((a0-4 (current-time))) + (cond + ((!= v1-3 (knocked-type blue-shot)) + (set! (-> this incoming blue-juggle-count) (the-as uint 0)) + 0 + ) + ((time-elapsed? (-> this incoming attack-time) (seconds 1)) + (set! (-> this incoming blue-juggle-count) (the-as uint 1)) + ) + (else + (+! (-> this incoming blue-juggle-count) 1) + ) + ) + (set! (-> this incoming attack-time) a0-4) + ) + (cond + ((= v1-3 (knocked-type vehicle)) + (set! (-> this incoming attack-direction quad) (-> arg3 vector quad)) + ) + (else + (let ((s2-0 (new 'stack-no-clear 'attack-info))) + (attack-info-method-9 arg3 s2-0 arg0 this) + (set! (-> this incoming attacker-pos quad) (-> s2-0 intersection quad)) + (set! (-> this incoming attack-direction quad) (-> s2-0 attacker-velocity quad)) + ) + ) + ) + ) + (set! (-> this incoming intensity) (-> arg3 control)) + (set! (-> this incoming attacker-handle) (process->handle (find-offending-pfoc this arg0 arg3))) + (cond + (arg4 + (let ((a1-12 (-> arg4 head))) + (get-intersect-point (-> this incoming attack-position) a1-12 (-> this root) arg4) + ) + ) + (else + (vector-! (-> this incoming attack-position) (-> this root trans) (-> this incoming attack-direction)) + ) + ) + 0 + (none) + ) + +;; definition for method 115 of type enemy +;; WARN: Return type mismatch int vs none. +(defmethod set-look-at-mode! ((this enemy) (arg0 int)) + (case arg0 + ((1) + (logclear! (-> this enemy-flags) (enemy-flag look-at-move-dest)) + (logior! (-> this enemy-flags) (enemy-flag look-at-focus)) + ) + ((2) + (logclear! (-> this enemy-flags) (enemy-flag look-at-focus)) + (logior! (-> this enemy-flags) (enemy-flag look-at-move-dest)) + ) + ) + (if (nonzero? (-> this neck)) + (mode-set! (-> this neck) (joint-mod-mode look-at)) + ) + 0 + (none) + ) + +;; definition for method 116 of type enemy +;; WARN: Return type mismatch int vs none. +(defmethod stop-look-at! ((this enemy)) + (when (nonzero? (-> this neck)) + (logclear! (-> this enemy-flags) (enemy-flag look-at-focus look-at-move-dest)) + (shut-down (-> this neck)) + ) + 0 + (none) + ) + +;; definition for method 136 of type enemy +(defmethod set-ground-pat! ((this enemy) (arg0 collide-query) (arg1 collide-spec) (arg2 float) (arg3 float) (arg4 float) (arg5 process)) + (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 method 137 of type enemy +(defmethod enemy-above-ground? ((this enemy) (arg0 collide-query) (arg1 vector) (arg2 collide-spec) (arg3 float) (arg4 float) (arg5 float)) + (above-ground? (-> this root) arg0 arg1 arg2 arg3 arg4 arg5) + ) + +;; definition for method 138 of type enemy +;; INFO: Used lq/sq +(defmethod try-locate-ground ((this enemy) (arg0 meters) (arg1 meters) (arg2 symbol) (arg3 collide-spec)) + (let ((s4-0 (new 'stack-no-clear 'collide-query))) + (cond + ((set-ground-pat! this s4-0 arg3 arg0 arg1 1024.0 (the-as process #f)) + (let ((s5-1 (-> this root))) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> this root trans quad)) + (set! (-> s3-0 y) (-> s4-0 best-other-tri intersect y)) + (move-to-point! s5-1 s3-0) + (let ((a0-3 (-> s4-0 best-other-tri normal)) + (v1-8 (-> s4-0 best-other-tri pat)) + ) + (set! (-> s5-1 ground-touch-point quad) (-> s3-0 quad)) + (set! (-> s5-1 poly-normal quad) (-> a0-3 quad)) + (set! (-> s5-1 surface-normal quad) (-> a0-3 quad)) + (set! (-> s5-1 local-normal quad) (-> a0-3 quad)) + (set! (-> s5-1 ground-poly-normal quad) (-> a0-3 quad)) + (set! (-> s5-1 poly-pat) v1-8) + (set! (-> s5-1 cur-pat) v1-8) + (set! (-> s5-1 ground-pat) v1-8) + ) + ) + (logior! (-> s5-1 status) (collide-status on-surface on-ground touch-surface)) + ) + #t + ) + (else + (let ((v1-11 (-> this root))) + (logclear! (-> v1-11 status) (collide-status + on-surface + on-ground + touch-surface + touch-wall + touch-ceiling + touch-actor + on-special-surface + touch-edge + blocked + on-water + impact-surface + touch-background + stuck + glance + ) + ) + (when (not (logtest? (-> v1-11 root-prim prim-core action) (collide-action no-normal-reset))) + (let ((a0-12 (-> v1-11 dynam gravity-normal))) + (set! (-> v1-11 local-normal quad) (-> a0-12 quad)) + (set! (-> v1-11 surface-normal quad) (-> a0-12 quad)) + (set! (-> v1-11 poly-normal quad) (-> a0-12 quad)) + ) + (set! (-> v1-11 coverage) 0.0) + (set! (-> v1-11 touch-angle) 0.0) + ) + ) + (if arg2 + (format 0 "WARNING: enemy::move-to-ground: failed to locate ground for ~S!~%" (-> this name)) + ) + #f + ) + ) + ) + ) + +;; definition for method 139 of type enemy +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod move-above-ground! ((this enemy) (arg0 vector) (arg1 move-above-ground-params)) + (let ((gp-0 (-> this root))) + (set! (-> arg1 on-ground?) #f) + (set! (-> arg1 do-move?) #t) + (set! (-> arg1 old-gspot-pos quad) (-> gp-0 gspot-pos quad)) + (set! (-> arg1 old-gspot-normal quad) (-> gp-0 gspot-normal quad)) + (set! (-> gp-0 trans-old-old-old quad) (-> gp-0 trans-old-old quad)) + (set! (-> gp-0 trans-old-old quad) (-> gp-0 trans-old quad)) + (set! (-> gp-0 trans-old quad) (-> gp-0 trans quad)) + (set! (-> gp-0 prev-status) (-> gp-0 status)) + (vector-v+! (-> gp-0 trans) (-> gp-0 trans) arg0) + (set! (-> arg1 new-pos quad) (-> gp-0 trans quad)) + (let ((s2-0 (new 'stack-no-clear 'collide-query))) + (cond + ((set-ground-pat! this s2-0 (-> arg1 gnd-collide-with) (-> arg1 popup) 81920.0 1024.0 (the-as process #f)) + (when (>= (-> gp-0 gspot-pos y) (-> arg1 new-pos y)) + (set! (-> arg1 on-ground?) #t) + (set! (-> arg1 pat) (-> s2-0 best-other-tri pat)) + (set! (-> arg1 new-pos y) (-> s2-0 best-other-tri intersect y)) + (set! (-> gp-0 ground-impact-vel) (- (vector-dot arg0 (-> gp-0 dynam gravity-normal)))) + (set! (-> arg0 y) 0.0) + ) + ) + (else + (if (-> arg1 hover-if-no-ground?) + (set! (-> arg1 new-pos y) (-> gp-0 trans-old y)) + ) + ) + ) + ) + (set! (-> gp-0 trans quad) (-> gp-0 trans-old quad)) + (move-to-point! gp-0 (-> arg1 new-pos)) + (when (logtest? (logand (-> arg1 overlaps-params collide-with-filter) + (collide-spec hit-by-player-list hit-by-others-list player-list) + ) + (-> gp-0 root-prim prim-core collide-with) + ) + (when (find-overlapping-shapes gp-0 (-> arg1 overlaps-params)) + (when (-> arg1 dont-move-if-overlaps?) + (set! (-> arg1 do-move?) #f) + (move-to-point! gp-0 (-> gp-0 trans-old)) + (set! (-> gp-0 gspot-pos quad) (-> arg1 old-gspot-pos quad)) + (set! (-> gp-0 gspot-normal quad) (-> arg1 old-gspot-normal quad)) + ) + ) + ) + (when (-> arg1 do-move?) + (cond + ((-> arg1 on-ground?) + (let ((a1-6 (-> gp-0 gspot-pos)) + (a0-21 (-> gp-0 gspot-normal)) + (v1-39 (-> arg1 pat)) + ) + (set! (-> gp-0 ground-touch-point quad) (-> a1-6 quad)) + (set! (-> gp-0 poly-normal quad) (-> a0-21 quad)) + (set! (-> gp-0 surface-normal quad) (-> a0-21 quad)) + (set! (-> gp-0 local-normal quad) (-> a0-21 quad)) + (set! (-> gp-0 ground-poly-normal quad) (-> a0-21 quad)) + (set! (-> gp-0 poly-pat) v1-39) + (set! (-> gp-0 cur-pat) v1-39) + (set! (-> gp-0 ground-pat) v1-39) + ) + (logior! (-> gp-0 status) (collide-status on-surface on-ground touch-surface)) + ) + (else + (logclear! (-> gp-0 status) (collide-status + on-surface + on-ground + touch-surface + touch-wall + touch-ceiling + touch-actor + on-special-surface + touch-edge + blocked + on-water + impact-surface + touch-background + stuck + glance + ) + ) + (when (not (logtest? (-> gp-0 root-prim prim-core action) (collide-action no-normal-reset))) + (let ((v1-49 (-> gp-0 dynam gravity-normal))) + (set! (-> gp-0 local-normal quad) (-> v1-49 quad)) + (set! (-> gp-0 surface-normal quad) (-> v1-49 quad)) + (set! (-> gp-0 poly-normal quad) (-> v1-49 quad)) + ) + (set! (-> gp-0 coverage) 0.0) + (set! (-> gp-0 touch-angle) 0.0) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 117 of type enemy +;; WARN: Return type mismatch int vs none. +(defmethod apply-friction ((this enemy)) + (let ((v1-0 (-> this root))) + (when (logtest? (-> v1-0 status) (collide-status touch-surface)) + (let ((f0-1 (fmax 0.0 (+ 1.0 (* 60.0 (seconds-per-frame) (+ -1.0 (-> this enemy-info friction))))))) + (vector-float*! (-> v1-0 transv) (-> v1-0 transv) f0-1) + ) + 0 + ) + ) + 0 + (none) + ) + +;; definition for method 120 of type enemy +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this enemy)) + 0 + (none) + ) + +;; definition for method 121 of type enemy +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this enemy)) + 0 + (none) + ) + +;; definition for method 122 of type enemy +(defmethod go-idle2 ((this enemy)) + (go (method-of-object this idle)) + ) + +;; definition for method 118 of type enemy +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-info! ((this enemy) (arg0 enemy-info)) + (set! (-> this enemy-info) arg0) + (when (and (!= (-> this enemy-info neck-joint) -1) (zero? (-> this neck))) + (set! (-> this neck) + (new 'process 'joint-mod (joint-mod-mode flex-blend) this (-> this enemy-info neck-joint)) + ) + (set-vector! (-> this neck twist-max) 8192.0 8192.0 0.0 1.0) + (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 neck max-dist) 102400.0) + (set! (-> this neck ignore-angle) 16384.0) + ) + 0 + (none) + ) + +;; definition for method 119 of type enemy +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-defaults! ((this enemy) (arg0 enemy-info)) + (local-vars (sv-16 res-tag)) + (when (coin-flip? this) + (let ((a0-2 (-> this node-list data 2))) + (set! (-> a0-2 param0) (the-as (function cspace transformq none) cspace<-parented-matrix-joint-flip-z!)) + (set! (-> a0-2 param1) #f) + (set! (-> a0-2 param2) #f) + ) + (logior! (-> this enemy-flags) (enemy-flag drawn-mirrored)) + ) + (logior! (-> this mask) (process-mask enemy)) + (logior! (-> this mask) (process-mask actor-pause)) + (logior! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (init-enemy-info! this arg0) + (set! (-> this ragdoll-proc) (the-as handle #f)) + (let ((a1-2 (-> this enemy-info idle-anim-script))) + (if a1-2 + (init! (-> this idle-anim-player) a1-2) + ) + ) + (if (-> this draw shadow) + (set! (-> this draw shadow-ctrl) (new + 'process + 'shadow-control + (-> this enemy-info shadow-min-y) + (-> this enemy-info shadow-max-y) + (-> this enemy-info shadow-locus-dist) + (the-as vector #f) + (shadow-flags shdf00 shdf04) + 245760.0 + ) + ) + (set! (-> this draw shadow-ctrl) *enemy-dummy-shadow-control*) + ) + (set! (-> this water-max-height) 8192.0) + (if (logtest? (-> *game-info* secrets) (game-secrets hero-mode)) + (set! (-> this hit-points) (* 2.0 (-> this enemy-info default-hit-points))) + (set! (-> this hit-points) (-> this enemy-info default-hit-points)) + ) + (let* ((v1-37 *game-info*) + (a0-10 (+ (-> v1-37 attack-id) 1)) + ) + (set! (-> v1-37 attack-id) a0-10) + (set! (-> this attack-id) a0-10) + ) + (let* ((v1-38 *game-info*) + (a0-12 (+ (-> v1-38 attack-id) 1)) + ) + (set! (-> v1-38 attack-id) a0-12) + (set! (-> this persistent-attack-id) a0-12) + ) + (set! (-> this incoming attacker-handle) (the-as handle #f)) + (set! (-> this gnd-collide-with) (-> this enemy-info gnd-collide-with)) + (set! (-> this fact) (new 'process 'fact-info-enemy this (the-as (pointer float) (-> arg0 fact-defaults)))) + (let ((cspec (if (logtest? (enemy-option multi-focus) (-> this fact enemy-options)) + (the-as collide-spec (collide-spec jak bot player-list jak-vehicle)) + (the-as collide-spec (collide-spec jak player-list jak-vehicle)) + ) + ) + ) + (reset-to-collide-spec (-> this focus) (the-as collide-spec cspec)) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-47 (res-lump-data (-> this entity) 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))) + (cond + ((and v1-47 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) v1-47) + (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 on-notice) (res-lump-struct (-> this entity) 'on-notice pair)) + (set! (-> this on-active) (res-lump-struct (-> this entity) 'on-active pair)) + (set! (-> this on-hostile) (res-lump-struct (-> this entity) 'on-hostile pair)) + (set! (-> this on-death) (res-lump-struct (-> this entity) 'on-death pair)) + (if (-> this on-notice) + (logior! (-> this enemy-flags) (enemy-flag enable-on-notice)) + ) + (if (-> this on-active) + (logior! (-> this enemy-flags) (enemy-flag enable-on-active)) + ) + (if (-> this on-hostile) + (logior! (-> this enemy-flags) (enemy-flag enable-on-hostile)) + ) + (let ((s4-0 (-> this root))) + (set! (-> this penetrated-by-all) (-> s4-0 penetrated-by)) + (set! (-> s4-0 penetrated-by) (get-penetrated-by this)) + (set! (-> s4-0 event-self) 'touched) + ) + (set! (-> this penetrate-flinch) (-> arg0 penetrate-flinch)) + (set! (-> this penetrate-knocked) (-> arg0 penetrate-knocked)) + (set! (-> this reaction-time) (set-reaction-time! this (seconds 0.1) (seconds 0.6))) + (let* ((v1-77 (-> this enemy-flags)) + (a0-28 (-> this fact enemy-options)) + (v1-78 + (logior (enemy-flag vulnerable vulnerable-backup use-notice-distance attackable-backup trackable trackable-backup) + v1-77 + ) + ) + ) + (if (logtest? (enemy-option multi-focus) a0-28) + (set! v1-78 (logior (enemy-flag multi-focus) v1-78)) + ) + (if (logtest? (enemy-option has-trigger) a0-28) + (set! v1-78 (logior (enemy-flag use-trigger) v1-78)) + ) + (set! (-> this enemy-flags) v1-78) + ) + (if (and (should-move-to-ground? this) + (not (logtest? (enemy-flag no-initial-move-to-ground) (-> this enemy-flags))) + (not (logtest? (enemy-option ambush) (-> this fact enemy-options))) + ) + (try-locate-ground this (meters 10) (meters 10) #t (-> this gnd-collide-with)) + ) + (if (zero? (-> this draw light-index)) + (set! (-> this draw light-index) (the-as uint 10)) + ) + 0 + (none) + ) + +;; definition for method 152 of type enemy +(defmethod enemy-method-152 ((this enemy)) + 1.0 + ) + +;; definition for method 153 of type enemy +(defmethod get-gem-pool-idx ((this enemy)) + (-> *setting-control* user-current gem-pool-index) + ) + +;; definition for function enemy-setup-gem +(defbehavior enemy-setup-gem enemy () + (set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag has-gem)))) + (when (> (-> self enemy-info gem-joint) 0) + (let ((gp-0 (get-gem-pool-idx self))) + (when (gems-available? gp-0) + (if (or (and (zero? gp-0) + (-> self entity) + (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status save)))) + ) + (and (nonzero? gp-0) (let* ((v1-14 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-15 (the-as number (logior #x3f800000 v1-14))) + ) + (< (+ -1.0 (the-as float v1-15)) (enemy-method-152 self)) + ) + ) + ) + (set! (-> self enemy-flags) (the-as enemy-flag (logior (enemy-flag has-gem) (-> self enemy-flags)))) + ) + ) + ) + (cond + ((logtest? (enemy-flag has-gem) (-> self enemy-flags)) + (setup-masks + (-> self draw) + (the-as int (-> self enemy-info gem-seg)) + (the-as int (-> self enemy-info gem-no-seg)) + ) + (add-connection *part-engine* self (-> self enemy-info gem-joint) self 464 (-> self enemy-info gem-offset)) + ) + (else + (setup-masks + (-> self draw) + (the-as int (-> self enemy-info gem-seg)) + (the-as int (-> self enemy-info gem-no-seg)) + ) + ) + ) + ) + ) + +;; definition for function enemy-init-by-other +;; INFO: Used lq/sq +(defbehavior enemy-init-by-other enemy ((arg0 process-drawable) (arg1 enemy-init-by-other-params)) + (let ((a1-1 (-> arg1 entity))) + (if a1-1 + (process-entity-set! self a1-1) + ) + ) + (when (-> arg1 art-level) + (let ((v1-5 (level-get *level* (-> arg1 art-level)))) + (if v1-5 + (set! (-> self level) v1-5) + ) + ) + ) + (if (-> arg1 directed?) + (logior! (-> self enemy-flags) (enemy-flag directed)) + ) + (if (-> arg1 no-initial-move-to-ground?) + (set! (-> self enemy-flags) + (the-as enemy-flag (logior (enemy-flag no-initial-move-to-ground) (-> self enemy-flags))) + ) + ) + (init-enemy-collision! self) + (set! (-> self root trans quad) (-> arg1 trans quad)) + (quaternion-copy! (-> self root quat) (-> arg1 quat)) + (vector-identity! (-> self root scale)) + (init-enemy! self) + (enemy-setup-gem) + (process-entity-status! self (entity-perm-status subtask-complete) #f) + (let ((v1-24 (-> self fact enemy-options))) + (cond + (*debug-view-anims* + (go-virtual view-anims) + ) + ((logtest? (enemy-option dormant) v1-24) + (go-dormant self) + ) + ((logtest? (enemy-flag directed) (-> self enemy-flags)) + (go-directed self) + ) + ((logtest? (enemy-option dormant-aware) v1-24) + (go-dormant-aware self) + ) + ((logtest? (enemy-option ambush) (-> self fact enemy-options)) + (go-ambush-delay self) + ) + (else + (go-idle2 self) + ) + ) + ) + ) + +;; definition for method 11 of type enemy +(defmethod init-from-entity! ((this enemy) (arg0 entity-actor)) + (let ((a1-2 (res-lump-struct arg0 'art-level symbol))) + (when a1-2 + (let ((a0-3 (level-get *level* a1-2))) + (if a0-3 + (set! (-> this level) a0-3) + ) + ) + ) + ) + (init-enemy-collision! this) + (process-drawable-from-entity! this arg0) + (init-enemy! this) + (enemy-setup-gem) + (let ((v1-10 (-> this fact enemy-options))) + (cond + ((logtest? (enemy-option spawner) v1-10) + (process-entity-status! this (entity-perm-status dead) #t) + (go (method-of-object this die-fast)) + ) + (*debug-view-anims* + (go (method-of-object this view-anims)) + ) + ((logtest? (enemy-option dormant) v1-10) + (go-dormant this) + ) + ((logtest? (enemy-option dormant-aware) v1-10) + (go-dormant-aware this) + ) + (else + (go-idle2 this) + ) + ) + ) + ) + +;; definition for method 107 of type enemy +(defmethod is-pfoc-in-mesh? ((this enemy) (arg0 process-focusable) (arg1 vector)) + #t + ) + +;; definition for method 108 of type enemy +(defmethod enemy-method-108 ((this enemy) (arg0 process-focusable)) + #f + ) + +;; definition for method 11 of type enemy-focus +;; WARN: Return type mismatch int vs none. +(defmethod reset-to-collide-spec ((this enemy-focus) (arg0 collide-spec)) + "Reset this focus with the given [[collide-spec]]." + (let ((t9-0 (method-of-type focus reset-to-collide-spec))) + (t9-0 this arg0) + ) + (set! (-> this aware) (enemy-aware ea0)) + 0 + (none) + ) + +;; definition for method 140 of type enemy +(defmethod update-focus ((this enemy)) + (let ((gp-0 (-> this focus))) + (let ((a1-0 (handle->process (-> gp-0 handle)))) + (when a1-0 + (let ((v1-4 (-> this enemy-flags))) + (cond + ((and a1-0 (not (logtest? (-> (the-as process-focusable a1-0) focus-status) (focus-status disable dead)))) + (when (and (logtest? (enemy-flag multi-focus) v1-4) + (not (logtest? (enemy-flag lock-focus) v1-4)) + (not (logtest? (-> gp-0 flags) (enemy-flag look-at-focus))) + ) + (find-best-focus this) + (return (the-as process #f)) + ) + (let ((v1-14 + (get-enemy-aware this (update-awareness! this (the-as process-focusable a1-0) (the-as enemy-best-focus #f))) + ) + ) + (set! (-> gp-0 aware) v1-14) + (if (>= 1 (the-as int v1-14)) + (logclear! (-> gp-0 flags) (enemy-flag look-at-focus)) + ) + ) + (return (the-as process #f)) + ) + (else + (clear-focused gp-0) + ) + ) + ) + ) + ) + (if (!= (-> gp-0 handle) #f) + (clear-focused gp-0) + ) + ) + (if (not (logtest? (enemy-flag lock-focus) (-> this enemy-flags))) + (find-best-focus this) + ) + ) + +;; definition for method 106 of type enemy +(defmethod find-best-focus ((this enemy)) + (let ((s4-0 (-> this focus collide-with)) + (gp-0 (new 'stack-no-clear 'enemy-best-focus)) + ) + (set! (-> gp-0 proc) #f) + (set! (-> gp-0 rating) 409600000.0) + (set! (-> gp-0 aware) (enemy-aware ea0)) + (when (logtest? s4-0 (collide-spec player-list)) + (let ((v1-4 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((s3-0 (-> v1-4 next0))) + (while (!= v1-4 (-> *collide-player-list* alive-list-end)) + (let ((v1-5 (the-as collide-shape (-> (the-as connection v1-4) param1)))) + (when (logtest? s4-0 (-> v1-5 root-prim prim-core collide-as)) + (let* ((s2-0 (-> v1-5 process)) + (a1-1 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (if (and a1-1 + (and a1-1 (not (logtest? (-> (the-as process-focusable a1-1) focus-status) (focus-status disable dead)))) + (!= this a1-1) + ) + (update-awareness! this (the-as process-focusable a1-1) gp-0) + ) + ) + ) + ) + (set! v1-4 s3-0) + *collide-player-list* + (set! s3-0 (-> s3-0 next0)) + ) + ) + ) + ) + (when (logtest? s4-0 (collide-spec hit-by-player-list hit-by-others-list)) + (when (logtest? s4-0 (collide-spec hit-by-player-list)) + (let ((v1-19 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((s3-1 (-> v1-19 next0))) + (while (!= v1-19 (-> *collide-hit-by-player-list* alive-list-end)) + (let ((v1-20 (the-as collide-shape (-> (the-as connection v1-19) param1)))) + (when (logtest? s4-0 (-> v1-20 root-prim prim-core collide-as)) + (let* ((s2-1 (-> v1-20 process)) + (a1-3 (if (type? s2-1 process-focusable) + s2-1 + ) + ) + ) + (if (and a1-3 + (and a1-3 (not (logtest? (-> (the-as process-focusable a1-3) focus-status) (focus-status disable dead)))) + (!= this a1-3) + ) + (update-awareness! this (the-as process-focusable a1-3) gp-0) + ) + ) + ) + ) + (set! v1-19 s3-1) + *collide-hit-by-player-list* + (set! s3-1 (-> s3-1 next0)) + ) + ) + ) + ) + (when (logtest? s4-0 (collide-spec hit-by-others-list)) + (let ((v1-32 (-> *collide-hit-by-others-list* alive-list next0))) + *collide-hit-by-others-list* + (let ((s3-2 (-> v1-32 next0))) + (while (!= v1-32 (-> *collide-hit-by-others-list* alive-list-end)) + (let ((v1-33 (the-as collide-shape (-> (the-as connection v1-32) param1)))) + (when (logtest? s4-0 (-> v1-33 root-prim prim-core collide-as)) + (let* ((s2-2 (-> v1-33 process)) + (a1-5 (if (type? s2-2 process-focusable) + s2-2 + ) + ) + ) + (if (and a1-5 + (and a1-5 (not (logtest? (-> (the-as process-focusable a1-5) focus-status) (focus-status disable dead)))) + (!= this a1-5) + ) + (update-awareness! this (the-as process-focusable a1-5) gp-0) + ) + ) + ) + ) + (set! v1-32 s3-2) + *collide-hit-by-others-list* + (set! s3-2 (-> s3-2 next0)) + ) + ) + ) + ) + ) + (let ((s4-1 (-> gp-0 proc))) + (when s4-1 + (enemy-method-70 this (the-as process-focusable s4-1) (get-enemy-aware this (-> gp-0 aware))) + s4-1 + ) + ) + ) + ) + +;; definition for method 64 of type enemy +;; WARN: Return type mismatch int vs enemy-aware. +(defmethod update-awareness! ((this enemy) (arg0 process-focusable) (arg1 enemy-best-focus)) + (let ((f30-0 (vector-vector-distance (get-trans arg0 0) (-> this root trans))) + (s3-1 #f) + (s2-0 #f) + ) + (cond + ((< f30-0 (-> this enemy-info proximity-notice-distance)) + (set! s3-1 #t) + (set! s2-0 (is-pfoc-in-mesh? this arg0 (the-as vector #f))) + ) + (else + (let ((f0-1 (the-as float (-> this enemy-info notice-distance)))) + (if (< 1 (the-as int (-> this focus aware))) + (set! f0-1 (+ (the-as meters f0-1) (-> this enemy-info notice-distance-delta))) + ) + (when (or (< f30-0 f0-1) (not (logtest? (-> this enemy-flags) (enemy-flag use-notice-distance)))) + (set! s2-0 (is-pfoc-in-mesh? this arg0 (the-as vector #f))) + (if s2-0 + (set! s3-1 #t) + ) + ) + ) + ) + ) + (let ((aware (cond + (s3-1 + (cond + ((enemy-method-108 this arg0) + (the-as enemy-aware (enemy-aware ea4)) + ) + (s2-0 + (the-as enemy-aware (enemy-aware ea3)) + ) + (else + (the-as enemy-aware (enemy-aware ea2)) + ) + ) + ) + ((< f30-0 (-> this fact idle-distance)) + (the-as enemy-aware (enemy-aware ea1)) + ) + (else + (the-as enemy-aware (enemy-aware ea0)) + ) + ) + ) + ) + (when (and (> (the-as int aware) 0) (logtest? (enemy-flag use-trigger) (-> this enemy-flags))) + (cond + ((logtest? (enemy-option idle-til-trigger) (-> this fact enemy-options)) + (if (not (enemy-method-141 this f30-0)) + (set! aware (enemy-aware ea0)) + ) + ) + (else + (if (and (< 1 (the-as int aware)) (not (enemy-method-141 this f30-0))) + (set! aware (enemy-aware ea1)) + ) + ) + ) + ) + (when arg1 + (when (and (>= (the-as int aware) (the-as int (-> arg1 aware))) (< f30-0 (-> arg1 rating))) + (set! (-> arg1 aware) (the-as enemy-aware aware)) + (set! (-> arg1 rating) f30-0) + (set! (-> arg1 proc) arg0) + ) + ) + (the-as enemy-aware aware) + ) + ) + ) + +;; definition for method 141 of type enemy +(defmethod enemy-method-141 ((this enemy) (arg0 float)) + (let* ((v1-0 (-> this fact)) + (a2-0 (-> v1-0 trig-mask-count)) + (a3-0 (-> v1-0 trig-mask)) + ) + (dotimes (t0-0 a2-0) + (let ((t1-1 (the-as int (-> a3-0 t0-0)))) + (if (and (logtest? (the-as uint t1-1) 1) (>= (-> v1-0 trig-dist) arg0)) + (set! t1-1 (the-as int (logand -2 (the-as uint t1-1)))) + ) + (when (logtest? (the-as uint t1-1) 2) + (let ((t2-8 (-> v1-0 trig-actor-group 0))) + (countdown (t3-0 (-> t2-8 length)) + (let ((t5-0 (-> t2-8 data t3-0 actor))) + (when (and t5-0 (logtest? (-> t5-0 extra perm status) (entity-perm-status subtask-complete))) + (set! t1-1 (the-as int (logand -3 (the-as uint t1-1)))) + (goto cfg-17) + ) + ) + ) + ) + ) + (label cfg-17) + (when (zero? t1-1) + (logclear! (-> this enemy-flags) (enemy-flag use-trigger)) + (return #t) + ) + ) + ) + ) + #f + ) + +;; definition for method 68 of type enemy +;; WARN: Return type mismatch int vs enemy-aware. +(defmethod get-enemy-aware ((this enemy) (arg0 enemy-aware)) + (let ((v1-1 (< 1 (the-as int arg0)))) + (cond + (v1-1 + (when (not (logtest? (-> this enemy-flags) (enemy-flag notice))) + (logior! (-> this enemy-flags) (enemy-flag notice)) + (set-time! (-> this notice-time)) + ) + (if (and (not (logtest? (-> this enemy-flags) (enemy-flag alert))) + (not (time-elapsed? (-> this notice-time) (-> this reaction-time))) + ) + (set! v1-1 #f) + ) + ) + (else + (logclear! (-> this enemy-flags) (enemy-flag notice)) + ) + ) + (the-as enemy-aware (cond + (v1-1 + (the-as int arg0) + ) + ((or (= arg0 (enemy-aware ea0)) (time-elapsed? (-> this last-draw-time) (seconds 2))) + 0 + ) + (else + 1 + ) + ) + ) + ) + ) + +;; definition for method 82 of type enemy +;; INFO: Used lq/sq +(defmethod event-handler ((this enemy) (proc process) (argc int) (msg symbol) (block event-message-block)) + (local-vars (s5-6 rgbaf) (sv-640 event-message-block) (sv-656 process) (sv-672 event-message-block)) + (cond + ((= msg 'go-gun-dark-2-stretch) + (go-gun-dark-2-stretch this) + ) + ((= msg 'go-gun-dark-3-nuke) + (on-dying this) + (send-event (ppointer->process (-> this parent)) 'child-die) + (mark-as-dead this) + (cleanup-for-death this) + (go (method-of-object this die-fast)) + ) + ((= msg 'combo) + (and (not (logtest? (enemy-flag dislike-combo) (-> this enemy-flags))) (!= (-> this hit-points) 0.0)) + ) + ((= msg 'touch) + (enemy-touch-handler this proc block) + ) + ((= msg 'touched) + (when (logtest? (-> this enemy-flags) (enemy-flag auto-reset-penetrate)) + (let* ((s3-1 proc) + (v1-27 (if (type? s3-1 process-drawable) + s3-1 + ) + ) + ) + (when v1-27 + (let* ((s3-2 (-> (the-as process-drawable v1-27) root)) + (a1-5 (if (type? s3-2 collide-shape) + s3-2 + ) + ) + (s3-3 (-> block param 0)) + ) + (if (and a1-5 + s3-3 + ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s3-3) + (the-as collide-shape a1-5) + (collide-action solid) + (collide-action) + ) + ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s3-3) + (-> this root) + (collide-action solid) + (collide-action) + ) + ) + (set-time! (-> this auto-reset-penetrate-time)) + ) + ) + ) + ) + ) + (send-attack-on-jump-or-knocked this proc block) + ) + ((= msg 'attack-invinc) + (case (-> (the-as attack-info (-> block param 1)) mode) + (('endlessfall) + (let ((v1-39 (-> this root root-prim))) + (set! (-> v1-39 prim-core collide-as) (collide-spec)) + (set! (-> v1-39 prim-core collide-with) (collide-spec)) + ) + 0 + (go-die this) + ) + ) + ) + ((= msg 'attack-no-avoid) + (let* ((s2-0 (-> block param 1)) + (s3-4 this) + (s1-0 (method-of-object s3-4 get-incoming-attack!)) + (s0-0 proc) + ) + (set! sv-640 block) + (let ((a3-3 (get-penetrate-using-from-attack-event (the-as process-drawable proc) block)) + (t1-0 (-> block param 0)) + ) + (s1-0 + s3-4 + (the-as process-drawable s0-0) + sv-640 + a3-3 + (the-as attack-info s2-0) + (the-as touching-shapes-entry t1-0) + ) + ) + ) + (damage-enemy! this proc block) + ) + ((= msg 'attack) + (let ((s2-1 (the-as object (-> block param 1)))) + (when (!= (-> (the-as attack-info s2-1) id) (-> this incoming attack-id)) + (cond + ((and (logtest? (-> this enemy-flags) (enemy-flag vulnerable)) + (not (logtest? (-> this focus-status) (focus-status grabbed))) + ) + (let* ((s1-1 this) + (s0-1 (method-of-object s1-1 get-incoming-attack!)) + ) + (set! sv-656 proc) + (set! sv-672 block) + (let ((a3-4 (get-penetrate-using-from-attack-event (the-as process-drawable proc) block)) + (t1-1 (-> block param 0)) + ) + (s0-1 + s1-1 + (the-as process-drawable sv-656) + sv-672 + a3-4 + (the-as attack-info s2-1) + (the-as touching-shapes-entry t1-1) + ) + ) + ) + (send-event (ppointer->process (-> this parent)) 'child-hit) + (let ((f0-1 (the-as number 0.0))) + (if (not *debug-unkillable*) + (set! f0-1 (damage-enemy! this proc block)) + ) + ) + (let ((s2-2 (penetrate->next-state this))) + (when s2-2 + (logclear! (-> this enemy-flags) (enemy-flag use-trigger)) + (send-attack-to-all-tshapes this (the-as process-focusable proc) block) + (let ((a1-17 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-17 from) (process->ppointer proc)) + (set! (-> a1-17 num-params) argc) + (set! (-> a1-17 message) s2-2) + (set! (-> a1-17 param 0) (-> block param 0)) + (set! (-> a1-17 param 1) (-> block param 1)) + (set! (-> a1-17 param 2) (-> block param 2)) + (set! (-> a1-17 param 3) (-> block param 3)) + (set! (-> a1-17 param 4) (-> block param 4)) + (set! (-> a1-17 param 5) (-> block param 5)) + (send-event-function this a1-17) + ) + #t + ) + ) + ) + (else + (set! (-> this incoming attack-id) (-> (the-as attack-info s2-1) id)) + (enemy-touch-handler this proc block) + ) + ) + ) + ) + ) + ((= msg 'impact-impulse) + (let* ((s4-1 (the-as object (-> block param 0))) + (s3-5 (if (type? proc process-focusable) + proc + ) + ) + (f30-1 (* (-> (the-as rigid-body-impact s4-1) impulse) (get-inv-mass this))) + ) + (when (and s3-5 (< 20480.0 f30-1)) + (let ((s5-1 (new 'stack-no-clear 'attack-info))) + (let ((v1-85 (process->handle s3-5))) + (let ((a0-41 s5-1)) + (set! (-> a0-41 mode) 'impact) + (set! (-> a0-41 penetrate-using) (penetrate vehicle)) + (set! (-> a0-41 mask) (attack-mask mode penetrate-using)) + ) + (cond + ((and (= v1-85 (-> this incoming attacker-handle)) + (not (time-elapsed? (-> this incoming attack-time) (seconds 0.1))) + ) + (set! (-> s5-1 id) (-> this incoming attack-id)) + ) + (else + (let* ((a0-48 *game-info*) + (a1-26 (+ (-> a0-48 attack-id) 1)) + ) + (set! (-> a0-48 attack-id) a1-26) + (set! (-> s5-1 id) a1-26) + ) + ) + ) + (logior! (-> s5-1 mask) (attack-mask id)) + (set! (-> s5-1 attacker) (the-as handle v1-85)) + ) + (logior! (-> s5-1 mask) (attack-mask attacker)) + (let ((v1-89 (scale-impact-vel-y! + this + (new 'stack-no-clear 'vector) + (vector-negate! (new 'stack-no-clear 'vector) (-> (the-as rigid-body-impact s4-1) velocity)) + f30-1 + ) + ) + ) + (set! (-> s5-1 attacker-velocity quad) (-> v1-89 quad)) + (set! (-> s5-1 vector quad) (-> v1-89 quad)) + ) + (logior! (-> s5-1 mask) (attack-mask attacker-velocity)) + (logior! (-> s5-1 mask) (attack-mask vector)) + (set! (-> s5-1 intersection quad) (-> (the-as rigid-body-impact s4-1) point quad)) + (logior! (-> s5-1 mask) (attack-mask intersection)) + (set! (-> s5-1 damage) (lerp-damage this f30-1)) + (logior! (-> s5-1 mask) (attack-mask damage)) + (when (< 0.0 (-> s5-1 damage)) + (format + 0 + "Sending impact-impulse attack with ~f damage (~m impulse, ~m attacker-velocity)~%" + (-> s5-1 damage) + f30-1 + (vector-length (-> s5-1 attacker-velocity)) + ) + (send-event this 'attack #f s5-1) + (when (= (-> this hit-points) 0.0) + (logior! (-> this root penetrated-by) (penetrate vehicle)) + #t + ) + ) + ) + ) + ) + ) + ((= msg 'hit-flinch) + (when (= (-> this hit-points) 0.0) + (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 proc) + (send-event proc 'get-attack-count 1) + (freeze-hit-begin) + (go-die this) + ) + #t + ) + ((= msg '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 proc) + (send-event proc '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)) + ) + ((= msg 'hit) + (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 proc) + (send-event proc 'get-attack-count 1) + (freeze-hit-begin) + (if (= (-> this hit-points) 0.0) + (go-die this) + (go (method-of-object this hit)) + ) + ) + ((= msg 'cue-chase) + (when (and (< 0.0 (-> this hit-points)) + (zero? (-> this fated-time)) + (not (logtest? (-> this focus-status) (focus-status grabbed))) + ) + (let ((v1-202 (logtest? (enemy-flag directed) (-> this enemy-flags)))) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance directed directed-ready use-trigger)) + (logior! (-> this enemy-flags) (enemy-flag chase-startup)) + (logclear! (-> this mask) (process-mask actor-pause)) + (cond + (v1-202 + (if (logtest? (enemy-option ambush) (-> this fact enemy-options)) + (go-ambush-delay this) + (go-hostile this) + ) + ) + ((and (-> this next-state) (let ((v1-213 (-> this next-state name))) + (or (= v1-213 'dormant) (= v1-213 'dormant-aware)) + ) + ) + (if (logtest? (enemy-option ambush) (-> this fact enemy-options)) + (go-ambush-delay this) + (go (method-of-object this notice)) + ) + ) + ) + ) + #t + ) + ) + ((= msg 'cue-wake) + (when (and (< 0.0 (-> this hit-points)) + (zero? (-> this fated-time)) + (not (logtest? (-> this focus-status) (focus-status grabbed))) + ) + (logclear! (-> this enemy-flags) (enemy-flag directed directed-ready use-trigger)) + (if (logtest? (enemy-option ambush) (-> this fact enemy-options)) + (go-ambush-delay this) + (go-best-state this) + ) + #t + ) + ) + ((= msg 'jump) + (when (and (< 0.0 (-> this hit-points)) + (zero? (-> this fated-time)) + (not (logtest? (-> this focus-status) (focus-status grabbed))) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this jump-why) (-> block param 0)) + (set! (-> this event-param-point quad) (-> (the-as vector (-> block param 1)) quad)) + (go (method-of-object this jump)) + ) + ) + ((= msg 'birth-pickup) + (if (not (-> *setting-control* user-current gun-special-mode)) + (drop-pickup (-> this fact) #t *entity-pool* (-> this fact) 0 #f) + ) + ) + ((= msg 'death-start) + (set! (-> this enemy-flags) (the-as enemy-flag (logior (enemy-flag death-start) (-> this enemy-flags)))) + (send-event (ppointer->process (-> this parent)) 'child-die) + (when (< (-> *event-queue* length) (-> *event-queue* allocated-length)) + (let ((v1-269 (-> *event-queue* data (-> *event-queue* length)))) + (+! (-> *event-queue* length) 1) + (set! (-> v1-269 from-handle) (process->handle self)) + (set! (-> v1-269 to-handle) (process->handle this)) + (set! (-> v1-269 num-params) 0) + (set! (-> v1-269 message) 'birth-pickup) + ) + ) + (let ((s5-2 (-> this on-death))) + (if s5-2 + (script-eval s5-2 :vector (-> this root trans)) + ) + ) + ) + ((= msg 'death-end) + (if (-> this skel effect) + (logior! (-> this skel effect flags) (effect-control-flag ecf2)) + ) + (logior! (-> this draw status) (draw-control-status no-draw)) + (logclear! (-> this enemy-flags) (enemy-flag vulnerable vulnerable-backup)) + (logclear! (-> this focus-status) (focus-status dangerous)) + (set! (-> this enemy-flags) (logclear (-> this enemy-flags) (enemy-flag dangerous-backup))) + ) + ((= msg 'instant-death) + (when (and (< 0.0 (-> this hit-points)) (zero? (-> this fated-time))) + (set! (-> this hit-points) 0.0) + (set! (-> this root penetrated-by) (get-penetrated-by this)) + (let ((s5-3 (get-knockback-dir! this (new 'stack-no-clear 'vector)))) + (vector-z-quaternion! s5-3 (-> this root quat)) + (vector-float*! s5-3 s5-3 -1.0) + (vector-normalize! s5-3 1.0) + ) + (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)) + (go-die this) + ) + ) + ((= msg 'die-fast) + (logior! (-> this draw status) (draw-control-status no-draw)) + (on-dying this) + (send-event (ppointer->process (-> this parent)) 'child-die) + (let ((s5-4 (-> this on-death))) + (if s5-4 + (script-eval s5-4 :vector (-> this root trans)) + ) + ) + (cleanup-for-death this) + (go (method-of-object this die-fast)) + ) + ((= msg 'victory) + (if (and (-> this enemy-info use-victory) + (not (and (-> this next-state) (= (-> this next-state name) 'victory))) + (and (< 0.0 (-> this hit-points)) + (zero? (-> this fated-time)) + (not (logtest? (-> this focus-status) (focus-status grabbed))) + ) + ) + (go (method-of-object this victory)) + ) + ) + ((= msg 'nav-control) + (if (nonzero? (-> this nav)) + (-> this nav) + ) + ) + ((= msg 'push-trans) + (move-by-vector! (-> this root) (the-as vector (-> block param 0))) + ) + ((= msg 'move-trans) + (move-to-point! (-> this root) (the-as vector (-> block param 0))) + ) + ((= msg 'shadow) + (cond + ((-> block param 0) + (let ((v1-371 (-> this draw shadow-ctrl))) + (logclear! (-> v1-371 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + (else + (let ((v1-374 (-> this draw shadow-ctrl))) + (logior! (-> v1-374 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + ) + ((= msg 'color-effect) + (case (-> block param 0) + (('dark) + (let ((f30-2 (rand-vu-float-range 0.2 1.0))) + (set-vector! (-> this draw color-mult) (lerp 1.0 1.0 f30-2) (lerp 1.0 0.0 f30-2) (lerp 1.0 1.0 f30-2) 1.0) + (set! s5-6 (-> this draw color-emissive)) + (set! (-> s5-6 x) (lerp 0.0 0.3 f30-2)) + (set! (-> s5-6 y) (lerp 0.0 0.0 f30-2)) + (set! (-> s5-6 z) (lerp 0.0 0.3 f30-2)) + ) + (set! (-> s5-6 w) 1.0) + s5-6 + ) + ((#f) + (set-vector! (-> this draw color-mult) 1.0 1.0 1.0 1.0) + (set! s5-6 (-> this draw color-emissive)) + (set! (-> s5-6 quad) (the-as uint128 0)) + s5-6 + ) + ) + ) + ((= msg 'enable-envmap) + (cond + ((-> block param 0) + (logclear! (-> this draw global-effect) (draw-control-global-effect disable-envmap)) + #t + ) + (else + (logior! (-> this draw global-effect) (draw-control-global-effect disable-envmap)) + #t + ) + ) + ) + ) + ) + +;; definition for method 60 of type enemy +(defmethod lerp-damage ((this enemy) (arg0 float)) + (lerp-scale 0.0 (-> this enemy-info default-hit-points) arg0 20480.0 122880.0) + ) + +;; definition for method 61 of type enemy +;; INFO: Used lq/sq +(defmethod scale-impact-vel-y! ((this enemy) (arg0 vector) (arg1 vector) (arg2 float)) + (set! (-> arg0 quad) (-> arg1 quad)) + (vector-normalize! arg0 arg2) + (set! (-> arg0 y) (lerp-scale + (-> this enemy-info knocked-hard-vy-lo) + (-> this enemy-info knocked-hard-vy-hi) + arg2 + 20480.0 + 204800.0 + ) + ) + (vector-normalize! arg0 arg2) + arg0 + ) + +;; definition for method 62 of type enemy +(defmethod get-damage-from-attack ((this enemy) (arg0 object) (arg1 event-message-block)) + (let ((v1-0 (the-as object (-> arg1 param 1)))) + (if (logtest? (attack-mask damage) (-> (the-as attack-info v1-0) mask)) + (-> (the-as attack-info v1-0) damage) + (penetrate-using->damage (-> this incoming penetrate-using)) + ) + ) + ) + +;; definition for method 63 of type enemy +(defmethod enemy-method-63 ((this enemy) (arg0 float)) + (let ((f0-1 (fmax 0.0 (fmin arg0 (-> this hit-points))))) + (cond + ((and (= (-> this incoming knocked-type) (knocked-type blue-shot)) (= f0-1 (-> this hit-points)) (< 0.0 f0-1)) + (cond + ((zero? (-> this fated-time)) + (set-time! (-> this fated-time)) + (+ -1.0 f0-1) + ) + ((not (time-elapsed? (-> this fated-time) (seconds 1))) + (+ -1.0 f0-1) + ) + (else + f0-1 + ) + ) + ) + (else + f0-1 + ) + ) + ) + ) + +;; definition for method 65 of type enemy +(defmethod penetrate->next-state ((this enemy)) + (let ((gp-0 (-> this incoming penetrate-using))) + (cond + ((and (logtest? (penetrate jak-dark-blackhole) gp-0) #t) + 'go-gun-dark-2-stretch + ) + ((and (logtest? (penetrate jak-dark-nuke) (-> this incoming penetrate-using)) (enemy-method-150 this)) + 'go-gun-dark-3-nuke + ) + ((logtest? gp-0 (-> this penetrate-flinch)) + 'hit-flinch + ) + ((logtest? gp-0 (-> this penetrate-knocked)) + 'hit-knocked + ) + (else + 'hit + ) + ) + ) + ) + +;; definition for method 52 of type enemy +(defmethod damage-enemy! ((this enemy) (arg0 object) (arg1 event-message-block)) + (let* ((f0-0 (get-damage-from-attack this arg0 arg1)) + (f30-0 (enemy-method-63 this f0-0)) + ) + (set! (-> this hit-points) (- (-> this hit-points) f30-0)) + (if (not (logtest? (-> this enemy-flags) (enemy-flag auto-reset-penetrate))) + (set! (-> this root penetrated-by) (get-penetrated-by this)) + ) + f30-0 + ) + ) + +;; definition for method 145 of type enemy +(defmethod find-offending-pfoc ((this enemy) (arg0 process) (arg1 attack-info)) + (find-offending-process-focusable arg0 arg1) + ) + +;; definition for method 83 of type enemy +(defmethod enemy-touch-handler ((this enemy) (arg0 process) (arg1 event-message-block)) + (let* ((s4-0 (-> arg1 param 0)) + (s2-0 arg0) + (s3-0 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (when (and s4-0 s3-0) + (cond + ((and (focus-test? this dangerous) + (and s3-0 + (not (logtest? (-> (the-as process-focusable s3-0) focus-status) (focus-status disable dead ignore grabbed))) + ) + ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s4-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 s4-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 s4-0) a3-2) + ) + ) + ((and ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s4-0) + (-> this root) + (collide-action no-standon) + (collide-action) + ) + (not (logtest? (-> this root penetrated-by) + (-> (the-as collide-shape (-> (the-as process-drawable s3-0) root)) penetrate-using) + ) + ) + ) + (if (send-shoves (-> this root) arg0 (the-as touching-shapes-entry s4-0) 0.7 6144.0 16384.0) + (send-event this 'bouncing-off arg0) + ) + ) + ) + ) + ) + ) + +;; definition for method 84 of type enemy +;; 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 + (when (or (and (and (-> this next-state) (= (-> this next-state name) 'knocked)) + (logtest? (process-mask crate) (-> arg0 mask)) + ) + (and (and (-> this next-state) (= (-> this next-state name) 'jump)) + (logtest? (process-mask target sidekick crate bot) (-> arg0 mask)) + ) + ) + (when ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s4-0) + (-> this root) + (collide-action solid semi-solid deadly) + (collide-action) + ) + (let ((a3-2 (if ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s4-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 s4-0) a3-2) + ) + ) + ) + ) + ) + ) + +;; definition for function enemy-event-handler +(defbehavior enemy-event-handler enemy ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (event-handler self arg0 arg1 arg2 arg3) + ) + +;; definition for function enemy-simple-post +;; WARN: Return type mismatch int vs none. +(defbehavior enemy-simple-post enemy () + (enemy-common-post self) + (update-transforms (-> self root)) + 0 + (none) + ) + +;; definition for function enemy-falling-post +;; INFO: Used lq/sq +(defbehavior enemy-falling-post enemy () + (let ((gp-0 (-> self root))) + (cond + ((focus-test? self under-water) + (accelerate-fall! self (-> gp-0 transv)) + ) + (else + (let ((a1-1 (new-stack-vector0))) + (vector-v++! (-> gp-0 transv) (compute-acc-due-to-gravity gp-0 a1-1 (-> self enemy-info slip-factor))) + ) + ) + ) + (let ((a2-1 (new 'stack-no-clear 'collide-query))) + (set! (-> a2-1 collide-with) (-> gp-0 root-prim prim-core collide-with)) + (set! (-> a2-1 ignore-process0) self) + (set! (-> a2-1 ignore-process1) #f) + (set! (-> a2-1 ignore-pat) (logior (new 'static 'pat-surface :noendlessfall #x1) (-> gp-0 pat-ignore-mask))) + (set! (-> a2-1 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide gp-0 (-> gp-0 transv) a2-1 (meters 0)) + ) + ) + (apply-friction self) + (enemy-common-post self) + (none) + ) + +;; definition for method 51 of type enemy +(defmethod accelerate-fall! ((this enemy) (arg0 vector)) + (let* ((f2-0 0.8) + (f0-1 (fmax 0.0 (+ 1.0 (* 60.0 (seconds-per-frame) (+ -1.0 f2-0))))) + ) + (vector-float*! arg0 arg0 f0-1) + ) + (set! (-> arg0 y) (+ (-> arg0 y) (* -204800.0 (seconds-per-frame)))) + ) + +;; definition for function enemy-die-falling-post +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior enemy-die-falling-post enemy () + (let ((gp-0 (-> self root))) + (if (focus-test? self under-water) + (accelerate-fall! self (-> gp-0 transv)) + (vector-v++! (-> gp-0 transv) (compute-acc-due-to-gravity gp-0 (new-stack-vector0) 0.0)) + ) + (let ((s4-1 (new 'stack-no-clear 'collide-query)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> gp-0 trans quad)) + (vector-v++! s5-1 (-> gp-0 transv)) + (when (find-ground + gp-0 + s4-1 + (-> self enemy-info recover-gnd-collide-with) + 8192.0 + 81920.0 + 1024.0 + (the-as process #f) + ) + (when (>= (-> gp-0 gspot-pos y) (-> s5-1 y)) + (set! (-> s5-1 y) (-> gp-0 gspot-pos y)) + (vector-reset! (-> gp-0 transv)) + ) + ) + (move-to-point! gp-0 s5-1) + ) + ) + (enemy-common-post self) + 0 + (none) + ) + +;; definition for method 91 of type enemy +;; WARN: Return type mismatch symbol vs object. +(defmethod enemy-method-91 ((this enemy) (arg0 enemy-jump-info)) + #f + ) + +;; definition for method 92 of type enemy +;; INFO: Used lq/sq +(defmethod init-jump-info! ((this enemy) (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) 8192.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 93 of type enemy +(defmethod setup-jump! ((this enemy) (arg0 enemy-jump-info)) + (let* ((f0-0 (vector-vector-xz-distance (-> arg0 start-pos) (-> arg0 dest-pos))) + (f0-2 (fmax (-> this enemy-info jump-height-min) (* (-> this enemy-info jump-height-factor) f0-0))) + ) + (setup-from-to-height! (-> arg0 traj) (-> arg0 start-pos) (-> arg0 dest-pos) f0-2 -4.551111) + ) + (none) + ) + +;; definition for method 95 of type enemy +(defmethod on-ground? ((this enemy) (arg0 enemy-jump-info)) + (let ((gp-0 (-> this root))) + (when (< (-> gp-0 transv y) 0.0) + (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)) + ) + ) + ) + +;; definition for method 94 of type enemy +(defmethod move-to-gspot! ((this enemy)) + (let* ((v1-0 (-> this root)) + (f0-0 (-> v1-0 gspot-pos y)) + ) + (if (< (-> v1-0 trans y) f0-0) + (set! (-> v1-0 trans y) f0-0) + ) + ) + (set! (-> this root transv y) 0.0) + ) + +;; definition for method 101 of type enemy +;; WARN: Return type mismatch int vs none. +(defmethod enemy-method-101 ((this enemy) (arg0 int) (arg1 enemy-jump-info)) + 0 + (none) + ) + +;; definition for method 100 of type enemy +;; WARN: Return type mismatch int vs none. +(defmethod in-jump-handler ((this enemy) (arg0 int) (arg1 enemy-jump-info)) + (case arg0 + ((2 3) + (let ((f30-0 (the float (-> arg1 hang-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) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 98 of type enemy +(defmethod jump-wind-up-anim ((this enemy) (arg0 enemy-jump-info)) + (let ((a0-1 (-> this skel root-channel 0))) + (set! (-> a0-1 param 0) 1.0) + (joint-control-channel-group! a0-1 (the-as art-joint-anim #f) num-func-loop!) + ) + (ja-channel-push! 1 (seconds 0.1)) + (let ((a1-3 (-> this draw art-group data (-> this enemy-info jump-wind-up-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 96 of type enemy +(defmethod jump-in-air-anim ((this enemy) (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 method 97 of type enemy +(defmethod jump-land-anim ((this enemy) (arg0 enemy-jump-info)) + (let ((a0-1 (-> this skel root-channel 0))) + (set! (-> a0-1 param 0) 1.0) + (joint-control-channel-group! a0-1 (the-as art-joint-anim #f) num-func-loop!) + ) + (ja-channel-push! 1 (seconds 0.075)) + (let ((a1-3 (-> this draw art-group data (-> this enemy-info jump-land-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 99 of type enemy +(defmethod jump-anim-handler ((this enemy) (arg0 int) (arg1 enemy-jump-info)) + (local-vars (s5-0 symbol)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (not (jump-wind-up-anim this arg1)) + ) + ((= v1-0 1) + (set! s5-0 (ja-done? 0)) + (let ((a0-4 (-> this skel root-channel 0))) + (set! (-> a0-4 param 0) (the float (+ (-> a0-4 frame-group frames num-frames) -1))) + (set! (-> a0-4 param 1) (-> arg1 anim-speed)) + (joint-control-channel-group-eval! a0-4 (the-as art-joint-anim #f) num-func-seek!) + ) + (ja-blend-eval) + s5-0 + ) + ((= v1-0 2) + (jump-in-air-anim this arg1) + #f + ) + ((= v1-0 3) + (set! s5-0 (ja-done? 0)) + (let ((a0-9 (-> this skel root-channel 0))) + (set! (-> a0-9 param 0) (the float (+ (-> a0-9 frame-group frames num-frames) -1))) + (set! (-> a0-9 param 1) (-> arg1 anim-speed)) + (joint-control-channel-group-eval! a0-9 (the-as art-joint-anim #f) num-func-seek!) + ) + (ja-blend-eval) + s5-0 + ) + ((= v1-0 4) + (not (jump-land-anim this arg1)) + ) + ((= v1-0 5) + (set! s5-0 (ja-done? 0)) + (let ((a0-14 (-> this skel root-channel 0))) + (set! (-> a0-14 param 0) (the float (+ (-> a0-14 frame-group frames num-frames) -1))) + (set! (-> a0-14 param 1) (-> arg1 anim-speed)) + (joint-control-channel-group-eval! a0-14 (the-as art-joint-anim #f) num-func-seek!) + ) + (ja-blend-eval) + s5-0 + ) + (else + #t + ) + ) + ) + ) + +;; definition for method 109 of type enemy +(defmethod enemy-method-109 ((this enemy)) + #f + ) + +;; definition for method 50 of type enemy +;; WARN: Return type mismatch int vs none. +(defmethod enemy-method-50 ((this enemy) (arg0 int)) + 0 + (none) + ) + +;; failed to figure out what this is: +(if #t + (set! *shockwave-knock-scalar* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 0.5 :y 1.0 :z 1.5 :w 2.5) + :one-over-x-deltas (new 'static 'vector :x 1.6666666 :y 0.71428573 :z 1.0 :w 1.0) + ) + ) + ) + +;; definition for method 56 of type enemy +;; INFO: Used lq/sq +(defmethod knocked-handler ((this enemy) (arg0 vector)) + (local-vars (v0-22 number)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf24 :class vf) + (vf25 :class vf) + (vf26 :class vf) + (vf27 :class vf) + (vf28 :class vf) + (vf29 :class vf) + ) + (init-vf0-vector) + (get-knockback-dir! this arg0) + (let ((s5-0 (-> this enemy-info))) + (case (-> this incoming knocked-type) + (((knocked-type explode-or-darkjak)) + (let ((f30-0 (rnd-float-range this 0.0 1.0))) + (vector-float*! arg0 arg0 (lerp (-> s5-0 knocked-hard-vxz-lo) (-> s5-0 knocked-hard-vxz-hi) f30-0)) + (set! (-> arg0 y) (lerp (-> s5-0 knocked-hard-vy-lo) (-> s5-0 knocked-hard-vy-hi) f30-0)) + ) + ) + (((knocked-type mech-punch)) + (let ((f30-1 (rnd-float-range this 0.0 1.0))) + (vector-float*! arg0 arg0 (lerp (-> s5-0 knocked-medium-vxz-lo) (-> s5-0 knocked-medium-vxz-hi) f30-1)) + (set! (-> arg0 y) (lerp (-> s5-0 knocked-medium-vy-lo) (-> s5-0 knocked-medium-vy-hi) f30-1)) + ) + ) + (((knocked-type dark-shot)) + (let ((f30-2 (rnd-float-range this 0.0 1.0))) + (vector-float*! arg0 arg0 (lerp (-> s5-0 knocked-huge-vxz-lo) (-> s5-0 knocked-huge-vxz-hi) f30-2)) + (set! (-> arg0 y) (lerp (-> s5-0 knocked-huge-vy-lo) (-> s5-0 knocked-huge-vy-hi) f30-2)) + ) + ) + (((knocked-type yellow-shot)) + (vector-rotate90-around-y! arg0 arg0) + (let ((v1-9 (new 'stack-no-clear 'vector))) + (vector-! v1-9 (-> this incoming attacker-pos) (-> this root trans)) + (set! (-> v1-9 y) 0.0) + (if (< 0.0 (vector-dot v1-9 arg0)) + (vector-negate! arg0 arg0) + ) + ) + (let ((f30-3 (rnd-float-range this 0.0 1.0))) + (vector-float*! arg0 arg0 (lerp (-> s5-0 knocked-yellow-vxz-lo) (-> s5-0 knocked-yellow-vxz-hi) f30-3)) + (set! (-> arg0 y) (lerp (-> s5-0 knocked-yellow-vy-lo) (-> s5-0 knocked-yellow-vy-hi) f30-3)) + ) + ) + (((knocked-type red-shot)) + (let ((f30-4 0.0)) + (cond + ((logtest? (penetrate jak-red-shockwave) (-> this incoming penetrate-using)) + (format 0 "Intensity ~f (handle ~d)~%" f30-4 (process->handle this)) + ) + (else + (let* ((f1-2 (vector-vector-xz-distance-squared (target-pos 0) (-> this root trans))) + (f0-26 1.0) + (f2-0 61440.0) + (f1-3 (fmin f1-2 (* f2-0 f2-0))) + (f2-3 61440.0) + ) + (set! f30-4 (* (- f0-26 (/ f1-3 (* f2-3 f2-3))) (rnd-float-range this 0.8 1.0))) + ) + ) + ) + (vector-float*! arg0 arg0 (lerp (-> s5-0 knocked-red-vxz-lo) (-> s5-0 knocked-red-vxz-hi) f30-4)) + (set! (-> arg0 y) (lerp (-> s5-0 knocked-red-vy-lo) (-> s5-0 knocked-red-vy-hi) f30-4)) + ) + (when (logtest? (penetrate jak-red-shockwave) (-> this incoming penetrate-using)) + (let ((a0-31 *shockwave-knock-scalar*) + (f0-34 (-> this incoming intensity)) + (a1-23 (new 'stack-no-clear 'vector)) + (v1-33 (new 'stack-no-clear 'vector)) + ) + (let ((a2-18 f0-34)) + (.mov vf27 a2-18) + ) + (.lvf vf24 (&-> a0-31 xs quad)) + (.lvf vf25 (&-> a0-31 ys quad)) + (.lvf vf26 (&-> a0-31 one-over-x-deltas quad)) + (.min.w.vf vf27 vf27 vf0) + (.max.x.vf vf27 vf27 vf0) + (.add.x.vf vf28 vf24 vf27) + (.mul.w.vf acc vf25 vf0) + (.add.mul.vf vf29 vf28 vf26 acc) + (.svf (&-> a1-23 quad) vf28) + (.svf (&-> v1-33 quad) vf29) + (let ((a0-32 (-> a1-23 z)) + (a1-24 (-> a1-23 y)) + ) + (b! (>= (the-as int a0-32) 0) cfg-23 :delay (set! v0-22 (-> v1-33 z))) + (b! (>= (the-as int a1-24) 0) cfg-23 :delay (set! v0-22 (-> v1-33 y))) + ) + (set! v0-22 (-> v1-33 x)) + ) + (label cfg-23) + (let ((f0-35 (the-as float v0-22))) + (vector-float*! arg0 arg0 f0-35) + ) + ) + ) + (((knocked-type blue-shot)) + (let* ((f1-5 (vector-vector-xz-distance-squared (target-pos 0) (-> this root trans))) + (f0-36 1.0) + (f2-6 122880.0) + (f1-6 (fmin f1-5 (* f2-6 f2-6))) + (f2-9 122880.0) + (f30-7 (* (- f0-36 (/ f1-6 (* f2-9 f2-9))) (rnd-float-range this 0.8 1.0))) + ) + (vector-float*! arg0 arg0 (lerp (-> s5-0 knocked-blue-vxz-lo) (-> s5-0 knocked-blue-vxz-hi) f30-7)) + (cond + ((or (>= (the-as uint 4) (-> this incoming blue-juggle-count)) (handle->process (-> this ragdoll-proc))) + (set! (-> arg0 y) (lerp (-> s5-0 knocked-blue-vy-lo) (-> s5-0 knocked-blue-vy-hi) f30-7)) + ) + (else + (if (zero? (rnd-int this 3)) + (set! (-> arg0 y) 40960.0) + ) + ) + ) + ) + ) + (((knocked-type vehicle)) + (let ((v0-4 (the-as object arg0))) + (set! (-> (the-as vector v0-4) quad) (-> this incoming attack-direction quad)) + v0-4 + ) + ) + (else + (let ((f30-8 (rnd-float-range this 0.0 1.0))) + (vector-float*! arg0 arg0 (lerp (-> s5-0 knocked-soft-vxz-lo) (-> s5-0 knocked-soft-vxz-hi) f30-8)) + (set! (-> arg0 y) (lerp (-> s5-0 knocked-soft-vy-lo) (-> s5-0 knocked-soft-vy-hi) f30-8)) + ) + ) + ) + ) + ) + ) + +;; definition for method 55 of type enemy +;; WARN: Return type mismatch float vs degrees. +(defmethod get-knockback-angle ((this enemy)) + (let ((f30-0 (quaternion-y-angle (-> this root quat)))) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot) (knocked-type blue-shot)) + (let ((a0-5 (handle->process (-> this focus handle)))) + (when a0-5 + (let ((v1-9 (get-trans (the-as process-focusable a0-5) 0))) + (set! f30-0 (atan (- (-> v1-9 x) (-> this root trans x)) (- (-> v1-9 z) (-> this root trans z)))) + ) + ) + ) + ) + (else + (let* ((v1-13 (-> this root transv)) + (f28-0 (atan (-> v1-13 x) (-> v1-13 z))) + (f1-2 (deg- f30-0 f28-0)) + (f2-0 (fabs f1-2)) + (f0-6 (-> this enemy-info knocked-seek-ry-clamp)) + ) + (when (and (< f0-6 f2-0) (< f2-0 (- 32768.0 f0-6))) + (set! f30-0 (+ (cond + ((< f2-0 16384.0) + (if (>= f1-2 0.0) + f0-6 + (- f0-6) + ) + ) + ((>= f1-2 0.0) + (- 32768.0 f0-6) + ) + (else + (+ -32768.0 f0-6) + ) + ) + f28-0 + ) + ) + (if (< f30-0 0.0) + (set! f30-0 (+ 65536.0 f30-0)) + ) + ) + ) + ) + ) + (the-as degrees f30-0) + ) + ) + +;; definition for method 85 of type enemy +(defmethod knocked-anim ((this enemy) (arg0 enemy-knocked-info)) + (ja-channel-push! 1 0) + (let ((a1-2 (-> this draw art-group data (-> this enemy-info knocked-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 86 of type enemy +(defmethod knocked-land-anim ((this enemy) (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 enemy +(defmethod enemy-method-88 ((this enemy) (arg0 enemy-knocked-info)) + (let ((gp-0 (-> this root))) + (or (>= (-> arg0 on-surface-count) 3) + (and (logtest? (-> gp-0 status) (collide-status on-ground)) (>= 16384.0 (-> gp-0 transv y))) + (and (>= (-> arg0 move-count) 3) + (let ((f0-1 40.96)) + (>= (* f0-1 f0-1) (vector-vector-distance-squared (-> gp-0 trans-old) (-> gp-0 trans-old-old))) + ) + (let ((f0-4 40.96)) + (>= (* f0-4 f0-4) (vector-vector-distance-squared (-> gp-0 trans-old-old) (-> gp-0 trans-old-old-old))) + ) + ) + ) + ) + ) + +;; definition for method 89 of type enemy +(defmethod within-gspot-range? ((this enemy)) + (let ((gp-0 (-> this root)) + (a1-0 (new 'stack-no-clear 'collide-query)) + ) + (if (or (< 0.0 (-> this root transv y)) (begin + (find-ground + gp-0 + a1-0 + (-> this enemy-info recover-gnd-collide-with) + 8192.0 + 81920.0 + 1024.0 + (the-as process #f) + ) + (let ((f0-2 (- (-> gp-0 trans y) (-> gp-0 gspot-pos y)))) + (and (>= f0-2 -1228.8) (>= 6144.0 f0-2)) + ) + ) + ) + #f + #t + ) + ) + ) + +;; definition for method 90 of type enemy +;; WARN: Return type mismatch int vs none. +(defmethod enemy-method-90 ((this enemy) (arg0 ragdoll-proc)) + (let* ((s4-0 (-> arg0 ragdoll)) + (s2-0 (-> s4-0 ragdoll-joints)) + (s1-0 + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) (-> s4-0 orient-tform) (-> s4-0 orient-tform w)) + ) + (s3-0 (new 'stack-no-clear 'matrix)) + (s5-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> this root quat))) + ) + (quaternion-normalize! (quaternion*! s1-0 (the-as quaternion (-> s2-0 0)) s1-0)) + (quaternion->matrix s3-0 s1-0) + (if (logtest? (-> s4-0 ragdoll-flags) (ragdoll-flag mirror)) + (matrix*! s3-0 s3-0 (-> s4-0 mirror)) + ) + (vector-flatten! (-> s5-0 fvec) (-> s3-0 uvec) (-> s5-0 uvec)) + (vector-normalize! (-> s5-0 fvec) 1.0) + (vector-cross! (-> s5-0 rvec) (-> s5-0 uvec) (-> s5-0 fvec)) + (matrix->quaternion (-> this root quat) s5-0) + ) + 0 + (none) + ) + +;; definition for method 87 of type enemy +(defmethod knocked-anim-handler ((this enemy) (arg0 int) (arg1 enemy-knocked-info)) + (local-vars (s5-0 symbol)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (knocked-anim this arg1) + (set! s5-0 #f) + ) + ((= v1-0 1) + (set! s5-0 (ja-done? 0)) + (let ((a0-4 (-> this skel root-channel 0))) + (set! (-> a0-4 param 0) (the float (+ (-> a0-4 frame-group frames num-frames) -1))) + (set! (-> a0-4 param 1) (-> arg1 anim-speed)) + (joint-control-channel-group-eval! a0-4 (the-as art-joint-anim #f) num-func-seek!) + ) + ) + ((= v1-0 2) + (freeze-hit-end) + (set! s5-0 (not (knocked-land-anim this arg1))) + (set! (-> this incoming blue-juggle-count) (the-as uint 0)) + ) + ((= v1-0 3) + (set! s5-0 (ja-done? 0)) + (let ((a0-9 (-> this skel root-channel 0))) + (set! (-> a0-9 param 0) (the float (+ (-> a0-9 frame-group frames num-frames) -1))) + (set! (-> a0-9 param 1) (-> arg1 anim-speed)) + (joint-control-channel-group-eval! a0-9 (the-as art-joint-anim #f) num-func-seek!) + ) + ) + ((= v1-0 4) + (vector-reset! (-> this root transv)) + (set! s5-0 #t) + ) + (else + (set! s5-0 #t) + ) + ) + ) + s5-0 + ) + +;; definition for function ja-group-index? +(defbehavior ja-group-index? enemy ((arg0 int)) + (ja-group? (-> self draw art-group data arg0)) + ) + +;; definition for method 123 of type enemy +(defmethod enemy-method-123 ((this enemy)) + #t + ) + +;; definition for method 126 of type enemy +;; INFO: Used lq/sq +(defmethod ragdoll-spawn! ((this enemy) (arg0 symbol) (arg1 symbol)) + (local-vars (s2-0 process)) + (with-pp + (when (and (enemy-method-123 this) (-> this enemy-info ragdoll-info)) + (let ((s3-0 (handle->process (-> this ragdoll-proc)))) + (cond + (s3-0 + (set! s2-0 s3-0) + ) + (else + (set! (-> this ragdoll-proc) + (ppointer->handle + (process-spawn + ragdoll-proc + (-> this enemy-info ragdoll-info) + :name "ragdoll-proc" + :to this + :stack-size #x5000 + ) + ) + ) + (set! s2-0 (handle->process (-> this ragdoll-proc))) + (when (not s2-0) + (format 0 "deactivated ~A because a ragdoll allocate failed~%" (-> this name)) + (deactivate this) + ) + (set! (-> this enemy-flags) + (the-as enemy-flag (logior (enemy-flag auto-death-phase-out) (-> this enemy-flags))) + ) + ) + ) + (when (and (-> this draw) (-> this draw shadow-ctrl)) + (let ((v1-29 (-> this draw shadow-ctrl))) + (logior! (-> v1-29 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + (if (-> (the-as ragdoll-proc s2-0) ragdoll) + (logior! (-> (the-as ragdoll-proc s2-0) ragdoll ragdoll-flags) (ragdoll-flag rf3 rf4)) + ) + (let ((s1-0 (new 'stack-no-clear 'vector))) + (vector-float*! s1-0 (-> this root transv) (seconds-per-frame)) + (if s3-0 + (ragdoll-proc-method-15 (the-as ragdoll-proc s2-0) arg1 (the-as vector #f) #f) + (ragdoll-proc-method-15 (the-as ragdoll-proc s2-0) arg1 (the-as vector #f) #t) + ) + (if arg0 + (ragdoll-method-23 + (-> (the-as ragdoll-proc s2-0) ragdoll) + (-> this incoming attack-position) + s1-0 + (-> this enemy-info ragdoll-rotate-velocity-mult) + #t + ) + ) + (vector-float*! s1-0 s1-0 (/ 1.0 (-> pp clock time-adjust-ratio))) + (let ((v0-1 (-> (the-as ragdoll-proc s2-0) ragdoll ragdoll-joints 0 velocity))) + (set! (-> v0-1 quad) (-> s1-0 quad)) + v0-1 + ) + ) + ) + ) + ) + ) + +;; definition for method 127 of type enemy +;; WARN: Return type mismatch int vs none. +(defmethod deactivate-ragdoll! ((this enemy)) + (when (and (enemy-method-123 this) (-> this enemy-info ragdoll-info)) + (let ((a0-3 (handle->process (-> this ragdoll-proc)))) + (when a0-3 + (when (and (-> this draw) (-> this draw shadow-ctrl)) + (let ((v1-14 (-> this draw shadow-ctrl))) + (logclear! (-> v1-14 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + (deactivate a0-3) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 125 of type enemy +(defmethod ragdoll-settled? ((this enemy)) + (let ((s5-0 (handle->process (-> this ragdoll-proc)))) + (or (not s5-0) + (or (ragdoll-proc-method-19 (the-as ragdoll-proc s5-0)) + (and (time-elapsed? (-> this state-time) (seconds 0.1)) + (let ((f0-1 (if (= (-> this hit-points) 0.0) + 4096.0 + 49152.0 + ) + ) + (f1-2 (if (= (-> this hit-points) 0.0) + 364.0889 + 16384.0 + ) + ) + ) + (and (and (< (vector-length (-> (the-as ragdoll-proc s5-0) ragdoll ragdoll-joints 0 velocity)) + (* f0-1 (seconds-per-frame)) + ) + (< (cos (* f1-2 (seconds-per-frame))) (-> (the-as ragdoll-proc s5-0) ragdoll rotate-vel w)) + ) + (and (not (enemy-method-109 this)) (not (within-gspot-range? this))) + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 124 of type enemy +;; WARN: Return type mismatch int vs none. +(defmethod disable-ragdoll ((this enemy)) + (let ((s5-0 (handle->process (-> this ragdoll-proc)))) + (when s5-0 + (disable-for-duration (the-as ragdoll-proc s5-0) (-> this enemy-info ragdoll-blend-out-time)) + (logclear! (-> (the-as ragdoll-proc s5-0) ragdoll ragdoll-flags) (ragdoll-flag rf9)) + (enemy-method-90 this (the-as ragdoll-proc s5-0)) + ) + ) + 0 + (none) + ) + +;; definition for method 151 of type enemy +(defmethod should-move-to-ground? ((this enemy)) + (-> this enemy-info move-to-ground) + ) 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 6a3138c0d5..35984a2d05 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) - (vehicle-levels level 44) + ((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/aligner-h_REF.gc b/test/decompiler/reference/jak3/engine/anim/aligner-h_REF.gc index 3e0df10637..a01b98d49f 100644 --- a/test/decompiler/reference/jak3/engine/anim/aligner-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/anim/aligner-h_REF.gc @@ -17,9 +17,9 @@ (new (symbol type process) _type_) (compute-alignment! (_type_) transformq) (align! (_type_ align-opts float float float) trsqv) - (align-control-method-11 () none) - (align-control-method-12 () none) - (align-control-method-13 () none) + (align-vel-and-quat-only! (_type_ align-opts vector int float float) trsqv) + (first-transform (_type_) transform) + (second-transform (_type_) transform) ) ) diff --git a/test/decompiler/reference/jak3/engine/anim/aligner_REF.gc b/test/decompiler/reference/jak3/engine/anim/aligner_REF.gc new file mode 100644 index 0000000000..3141513691 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/anim/aligner_REF.gc @@ -0,0 +1,213 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 9 of type align-control +;; INFO: Used lq/sq +;; ERROR: Unsupported inline assembly instruction kind - [lw ra, return-from-thread(s7)] +;; ERROR: Unsupported inline assembly instruction kind - [jr ra] +(defmethod compute-alignment! ((this align-control)) + (local-vars (a0-10 symbol) (s7-0 none) (ra-0 int)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (update-anim-data (-> this process skel)) + (let ((s5-0 (-> this process skel active-channels))) + (dotimes (s4-0 (the-as int s5-0)) + (let* ((a0-4 (-> this process skel channel s4-0)) + (v1-7 (-> a0-4 frame-group)) + ) + (case (-> a0-4 command) + (((joint-control-command stack) (joint-control-command stack1)) + ) + (else + (when (!= (-> v1-7 type) art-joint-anim) + (go process-drawable-art-error "align joint-anim") + (.lw ra-0 return-from-thread s7-0) + (.jr ra-0) + (nop!) + 0 + ) + ) + ) + ) + ) + ) + (let* ((a0-9 (-> this process skel root-channel 0)) + (v1-18 (-> a0-9 frame-group)) + (f0-0 (-> a0-9 frame-num)) + ) + (= (-> a0-9 num-func) num-func-loop!) + (cond + ((or (not v1-18) (!= (-> this frame-group) v1-18)) + (set! a0-10 #t) + ) + ((= (-> a0-9 num-func) num-func-loop!) + (set! a0-10 (< (* (-> a0-9 param 0) (- f0-0 (-> this frame-num))) 0.0)) + ) + (else + (set! a0-10 (= f0-0 0.0)) + ) + ) + (if a0-10 + (logior! (-> this flags) (align-flags disabled)) + (logclear! (-> this flags) (align-flags disabled)) + ) + (set! (-> this frame-group) v1-18) + (set! (-> this frame-num) f0-0) + ) + (mem-copy! (the-as pointer (-> this transform 1)) (the-as pointer (-> this transform)) 48) + (quaternion-copy! (the-as quaternion (-> this transform 1 rot)) (-> this align quat)) + (set! (-> this transform 1 scale quad) (-> this align scale quad)) + (let* ((a2-5 (-> this matrix 1)) + (a3-0 (-> this matrix)) + (v1-21 (-> a3-0 0 rvec quad)) + (a0-19 (-> a3-0 0 uvec quad)) + (a1-13 (-> a3-0 0 fvec quad)) + (a3-1 (-> a3-0 0 trans quad)) + ) + (set! (-> a2-5 rvec quad) v1-21) + (set! (-> a2-5 uvec quad) a0-19) + (set! (-> a2-5 fvec quad) a1-13) + (set! (-> a2-5 trans quad) a3-1) + ) + (let ((s5-1 (-> this process node-list data 1))) + (cspace<-matrix-no-push-joint! s5-1 (-> this process skel)) + (let* ((v1-25 (-> this matrix)) + (a3-2 (-> s5-1 bone transform)) + (a0-22 (-> a3-2 rvec quad)) + (a1-15 (-> a3-2 uvec quad)) + (a2-6 (-> a3-2 fvec quad)) + (a3-3 (-> a3-2 trans quad)) + ) + (set! (-> v1-25 0 rvec quad) a0-22) + (set! (-> v1-25 0 uvec quad) a1-15) + (set! (-> v1-25 0 fvec quad) a2-6) + (set! (-> v1-25 0 trans quad) a3-3) + ) + (let ((v1-26 (-> this transform))) + (let ((a0-24 (-> s5-1 bone transform trans)) + (a1-18 (-> this process root scale)) + ) + (.lvf vf4 (&-> a0-24 quad)) + (.lvf vf5 (&-> a1-18 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-26 0 trans quad) vf6) + ) + ) + (vector-! + (the-as vector (-> this delta)) + (the-as vector (-> this transform)) + (the-as vector (-> this transform 1)) + ) + (set-vector! + (-> this align scale) + (vector-length (the-as vector (-> this matrix))) + (vector-length (-> this matrix 0 uvec)) + (vector-length (-> this matrix 0 fvec)) + 1.0 + ) + (vector-! (-> this delta scale) (-> this align scale) (-> this transform 1 scale)) + (let ((a2-7 (matrix-inv-scale! (new 'stack-no-clear 'matrix) (-> this align scale)))) + (quaternion-normalize! + (matrix->quaternion (-> this align quat) (matrix*! a2-7 (the-as matrix (-> this matrix)) a2-7)) + ) + ) + (let ((a1-27 (quaternion-inverse! (new 'stack-no-clear 'quaternion) (the-as quaternion (-> this transform 1 rot)))) + ) + (quaternion-normalize! (quaternion*! (-> this delta quat) a1-27 (-> this align quat))) + ) + (-> this delta) + ) + ) + +;; definition for method 12 of type align-control +;; WARN: Return type mismatch (inline-array transform) vs transform. +(defmethod first-transform ((this align-control)) + (the-as transform (-> this transform)) + ) + +;; definition for method 13 of type align-control +(defmethod second-transform ((this align-control)) + (-> this transform 1) + ) + +;; definition for method 10 of type align-control +(defmethod align! ((this align-control) (arg0 align-opts) (arg1 float) (arg2 float) (arg3 float)) + (when (not (logtest? (-> this flags) (align-flags disabled))) + (let* ((a0-1 (-> this process)) + (t9-0 (method-of-object a0-1 apply-alignment)) + (v1-4 (-> this delta)) + (t1-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> t1-0 x) arg1) + (set! (-> t1-0 y) arg2) + (set! (-> t1-0 z) arg3) + (set! (-> t1-0 w) 1.0) + (t9-0 a0-1 arg0 v1-4 t1-0) + ) + ) + (-> this process root) + ) + +;; definition for method 26 of type trsqv +(defmethod set-and-limit-velocity ((this trsqv) (arg0 int) (arg1 vector) (arg2 float)) + (with-pp + (let ((a0-1 (-> this transv))) + (when (logtest? arg0 4) + (set! (-> a0-1 x) (-> arg1 x)) + (set! (-> a0-1 z) (-> arg1 z)) + (let* ((v1-2 arg1) + (f0-8 + (fmin + (* (sqrtf (+ (* (-> v1-2 x) (-> v1-2 x)) (* (-> v1-2 z) (-> v1-2 z)))) (-> pp clock frames-per-second)) + arg2 + ) + ) + ) + (vector-xz-normalize! a0-1 f0-8) + ) + ) + ) + this + ) + ) + +;; definition for method 11 of type align-control +(defmethod align-vel-and-quat-only! ((this align-control) (arg0 align-opts) (arg1 vector) (arg2 int) (arg3 float) (arg4 float)) + (with-pp + (when (not (logtest? (-> this flags) (align-flags disabled))) + (let ((s5-0 (-> this delta))) + (let ((a0-1 (-> this process root transv))) + (if (logtest? arg0 (align-opts adjust-y-vel)) + (set! (-> a0-1 y) (* (-> s5-0 trans y) arg3 (-> pp clock frames-per-second))) + ) + (when (logtest? arg0 (align-opts adjust-xz-vel)) + (set! (-> a0-1 x) (-> arg1 x)) + (set! (-> a0-1 z) (-> arg1 z)) + (let* ((v1-11 arg1) + (f0-9 (sqrtf (+ (* (-> v1-11 x) (-> v1-11 x)) (* (-> v1-11 z) (-> v1-11 z))))) + (v1-13 (-> s5-0 trans)) + (f0-11 (* (fmin f0-9 (* (sqrtf (+ (* (-> v1-13 x) (-> v1-13 x)) (* (-> v1-13 z) (-> v1-13 z)))) arg4)) + (-> pp clock frames-per-second) + ) + ) + (t9-0 vector-xz-normalize!) + ) + (set! (-> this last-speed) f0-11) + (t9-0 a0-1 f0-11) + ) + ) + ) + (if (logtest? arg0 (align-opts adjust-quat)) + (quaternion-normalize! (quaternion*! (-> this process root quat) (-> this process root quat) (-> s5-0 quat))) + ) + ) + ) + (-> this process root) + ) + ) diff --git a/test/decompiler/reference/jak3/engine/anim/fma-sphere_REF.gc b/test/decompiler/reference/jak3/engine/anim/fma-sphere_REF.gc new file mode 100644 index 0000000000..d8bea7cb2e --- /dev/null +++ b/test/decompiler/reference/jak3/engine/anim/fma-sphere_REF.gc @@ -0,0 +1,300 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type fma-sphere-params +(deftype fma-sphere-params (structure) + ((mode fma-sphere-mode) + (proc process-focusable) + (track-joint int32) + (duration time-frame) + (sphere sphere) + (danger traffic-danger-info) + (nav-mesh-id uint32) + ) + ) + +;; definition for method 3 of type fma-sphere-params +(defmethod inspect ((this fma-sphere-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'fma-sphere-params) + (format #t "~1Tmode: ~D~%" (-> this mode)) + (format #t "~1Tproc: ~A~%" (-> this proc)) + (format #t "~1Ttrack-joint: ~D~%" (-> this track-joint)) + (format #t "~1Tduration: ~D~%" (-> this duration)) + (format #t "~1Tsphere: #~%" (-> this sphere)) + (format #t "~1Tdanger: #~%" (-> this danger)) + (format #t "~1Tnav-mesh-id: ~D~%" (-> this nav-mesh-id)) + (label cfg-4) + this + ) + +;; definition of type fma-sphere +(deftype fma-sphere (process-drawable) + ((root collide-shape :override) + (first-time? symbol) + (mode fma-sphere-mode) + (track-handle handle) + (track-joint int32) + (attack-id uint32) + (duration time-frame) + (sphere sphere :inline) + (danger traffic-danger-info :inline) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type fma-sphere +(defmethod inspect ((this fma-sphere)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tfirst-time?: ~A~%" (-> this first-time?)) + (format #t "~2Tmode: ~D~%" (-> this mode)) + (format #t "~2Ttrack-handle: ~D~%" (-> this track-handle)) + (format #t "~2Ttrack-joint: ~D~%" (-> this track-joint)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Tduration: ~D~%" (-> this duration)) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (format #t "~2Tsphere: #~%" (-> this sphere)) + (format #t "~2Tdanger: #~%" (-> this danger)) + (label cfg-4) + this + ) + +;; definition for method 12 of type fma-sphere +(defmethod run-logic? ((this fma-sphere)) + "Should this process be run? Checked by execute-process-tree." + (or (logtest? *display-scene-control* (scene-controls display-controls)) + (and *display-nav-marks* (logtest? (-> this mode) (fma-sphere-mode nav))) + (logtest? (-> this mode) (fma-sphere-mode deadly-overlap)) + (>= (-> this track-joint) 0) + (-> this first-time?) + ) + ) + +;; failed to figure out what this is: +(defstate idle (fma-sphere) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (let ((v1-1 (-> block param 0))) + (if v1-1 + (send-event + proc + 'attack + v1-1 + (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 'eco-red) + (attacker-velocity (-> self root transv)) + (knock (knocked-type explode-or-darkjak)) + ) + ) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self first-time?) #f) + (if (logtest? (-> self mode) (fma-sphere-mode kill-once)) + (send-event *traffic-manager* 'kill-traffic-sphere (-> self sphere)) + ) + ) + :trans (behavior () + (local-vars (at-0 int)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((v1-0 (-> self duration))) + (if (and (nonzero? v1-0) (time-elapsed? (-> self state-time) v1-0)) + (go empty-state) + ) + ) + (let ((v1-5 (-> self track-joint))) + (when (>= v1-5 0) + (let ((a2-0 (handle->process (-> self track-handle))) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (when a2-0 + (set! (-> gp-0 quad) (-> self sphere quad)) + (set! (-> gp-0 w) 1.0) + (vector-matrix*! gp-0 gp-0 (-> (the-as process-drawable a2-0) node-list data v1-5 bone transform)) + (let ((v1-9 (-> self root))) + (vector-! (-> v1-9 transv) gp-0 (-> v1-9 trans)) + (let ((a0-12 (-> v1-9 transv))) + (.lvf vf1 (&-> (-> v1-9 transv) quad)) + (let ((f0-1 (-> self clock frames-per-second))) + (.mov at-0 f0-1) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> a0-12 quad) vf1) + ) + ) + (move-to-point! (-> self root) gp-0) + (set! (-> self danger sphere x) (-> gp-0 x)) + (set! (-> self danger sphere y) (-> gp-0 y)) + (set! (-> self danger sphere z) (-> gp-0 z)) + ) + ) + ) + ) + (if (logtest? (-> self mode) (fma-sphere-mode danger)) + (send-event *traffic-manager* 'add-danger-sphere (-> self danger)) + ) + (when (logtest? (-> self mode) (fma-sphere-mode deadly-overlap)) + (let ((a1-10 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-10 options) (overlaps-others-options)) + (set! (-> a1-10 collide-with-filter) (the-as collide-spec -1)) + (set! (-> a1-10 tlist) *touching-list*) + (find-overlapping-shapes (-> self root) a1-10) + ) + ) + (if (or (logtest? *display-scene-control* (scene-controls display-controls)) + (and *display-nav-marks* (logtest? (-> self mode) (fma-sphere-mode nav))) + ) + (add-debug-sphere + #t + (bucket-id debug) + (-> self root trans) + (-> self sphere r) + (new 'static 'rgba :r #x80 :g #x40 :a #x80) + ) + ) + ) + ) + :code sleep-code + ) + +;; definition for function fma-sphere-init-by-other +;; INFO: Used lq/sq +(defbehavior fma-sphere-init-by-other fma-sphere ((fma-parms fma-sphere-params)) + (set! (-> self mode) (-> fma-parms mode)) + (set! (-> self first-time?) #t) + (set! (-> self duration) (-> fma-parms duration)) + (cond + ((and (-> fma-parms proc) (>= (-> fma-parms track-joint) 0)) + (set! (-> self track-joint) (-> fma-parms track-joint)) + (set! (-> self track-handle) (process->handle (-> fma-parms proc))) + ) + (else + (set! (-> self track-joint) -1) + (set! (-> self track-handle) (the-as handle #f)) + ) + ) + (cond + ((-> fma-parms danger) + (mem-copy! (the-as pointer (-> self danger)) (the-as pointer (-> fma-parms danger)) 54) + (cond + (sphere + (set! (-> self sphere quad) (-> fma-parms sphere quad)) + (set! (-> self danger sphere quad) (-> fma-parms sphere quad)) + ) + (else + (set! (-> self sphere quad) (-> self danger sphere quad)) + ) + ) + ) + (sphere + (set! (-> self sphere quad) (-> fma-parms sphere quad)) + (when (logtest? (-> self mode) (fma-sphere-mode danger)) + (set! (-> self danger sphere quad) (-> fma-parms sphere quad)) + (set! (-> self danger velocity quad) (the-as uint128 0)) + (set! (-> self danger notify-radius) (+ 40960.0 (-> self sphere r))) + (set! (-> self danger danger-level) 1.0) + (set! (-> self danger decay-rate) 0.0) + (set! (-> self danger flags) (the-as uint 1)) + (set! (-> self danger danger-type) (the-as uint 4)) + ) + ) + (else + (format 0 "ERROR: Initializing an fma-sphere without a sphere or danger info!~%") + (go empty-state) + ) + ) + (let ((s5-0 (new 'process 'collide-shape self (collide-list-enum hit-by-player)))) + (let ((v1-32 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-32 prim-core collide-as) (collide-spec obstacle)) + (set-vector! (-> v1-32 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-32) + ) + (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! (-> self root) s5-0) + ) + (let ((s5-1 (-> self root))) + (set! (-> s5-1 nav-radius) (-> self sphere r)) + (set! (-> s5-1 root-prim local-sphere w) (-> self sphere r)) + (set! (-> s5-1 trans quad) (-> self sphere quad)) + (set! (-> s5-1 trans w) 1.0) + (vector-identity! (-> s5-1 scale)) + (quaternion-identity! (-> s5-1 quat)) + (cond + ((logtest? (-> self mode) (fma-sphere-mode deadly-overlap)) + (set! (-> s5-1 event-self) 'touched) + (let ((v1-43 (-> s5-1 root-prim))) + (set! (-> v1-43 prim-core collide-with) (collide-spec crate civilian enemy hit-by-others-list)) + (logior! (-> v1-43 prim-core action) (collide-action deadly)) + ) + ) + (else + (let ((v1-44 (-> s5-1 root-prim))) + (set! (-> v1-44 prim-core collide-as) (collide-spec)) + (set! (-> v1-44 prim-core collide-with) (collide-spec)) + ) + 0 + ) + ) + (update-transforms s5-1) + ) + (logclear! (-> self mask) (process-mask actor-pause enemy)) + (when (logtest? (-> self mode) (fma-sphere-mode nav)) + (let ((a0-33 (if (zero? (-> fma-parms nav-mesh-id)) + (find-nearest-nav-mesh (-> self root trans) (the-as float #x7f800000)) + (get-nav-mesh (the-as actor-id (-> fma-parms nav-mesh-id))) + ) + ) + ) + (cond + (a0-33 + (add-process-drawable-to-nav-mesh a0-33 self #f) + ) + (else + (format 0 "ERROR: fma-sphere-init-by-other: failed to find nearest nav-mesh!~%") + (go empty-state) + ) + ) + ) + ) + (when (logtest? (-> self mode) (fma-sphere-mode deadly-overlap)) + (let* ((v1-62 *game-info*) + (a0-37 (+ (-> v1-62 attack-id) 1)) + ) + (set! (-> v1-62 attack-id) a0-37) + (set! (-> self attack-id) a0-37) + ) + ) + (go-virtual idle) + ) diff --git a/test/decompiler/reference/jak3/engine/anim/joint-exploder_REF.gc b/test/decompiler/reference/jak3/engine/anim/joint-exploder_REF.gc new file mode 100644 index 0000000000..4c96e6501a --- /dev/null +++ b/test/decompiler/reference/jak3/engine/anim/joint-exploder_REF.gc @@ -0,0 +1,1014 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type joint-exploder-tuning +(deftype joint-exploder-tuning (structure) + ((explosion uint64) + (duration time-frame) + (gravity float) + (rot-speed float) + (bounds-inflate float) + (max-probes uint8) + (max-probe-width float) + (max-probe-height float) + (max-probe-depth float) + (friction float) + (fountain-rand-transv-lo vector :inline) + (fountain-rand-transv-hi vector :inline) + (away-from-focal-pt vector :inline :overlay-at fountain-rand-transv-lo) + (away-from-rand-transv-xz-lo float :overlay-at (-> fountain-rand-transv-hi data 0)) + (away-from-rand-transv-xz-hi float :overlay-at (-> fountain-rand-transv-hi data 1)) + (away-from-rand-transv-y-lo float :overlay-at (-> fountain-rand-transv-hi data 2)) + (away-from-rand-transv-y-hi float :overlay-at (-> fountain-rand-transv-hi data 3)) + (hit-xz-reaction float) + (hit-y-reaction float) + ) + (:methods + (new (symbol type uint) _type_) + ) + ) + +;; definition for method 3 of type joint-exploder-tuning +(defmethod inspect ((this joint-exploder-tuning)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'joint-exploder-tuning) + (format #t "~1Texplosion: ~D~%" (-> this explosion)) + (format #t "~1Tduration: ~D~%" (-> this duration)) + (format #t "~1Tgravity: ~f~%" (-> this gravity)) + (format #t "~1Trot-speed: ~f~%" (-> this rot-speed)) + (format #t "~1Tbounds-inflate: ~f~%" (-> this bounds-inflate)) + (format #t "~1Tmax-probes: ~D~%" (-> this max-probes)) + (format #t "~1Tmax-probe-width: ~f~%" (-> this max-probe-width)) + (format #t "~1Tmax-probe-height: ~f~%" (-> this max-probe-height)) + (format #t "~1Tmax-probe-depth: ~f~%" (-> this max-probe-depth)) + (format #t "~1Tfriction: ~f~%" (-> this friction)) + (format #t "~1Tfountain-rand-transv-lo: #~%" (-> this fountain-rand-transv-lo)) + (format #t "~1Tfountain-rand-transv-hi: #~%" (-> this fountain-rand-transv-hi)) + (format #t "~1Taway-from-focal-pt: #~%" (-> this fountain-rand-transv-lo)) + (format #t "~1Taway-from-rand-transv-xz-lo: ~f~%" (-> this fountain-rand-transv-hi x)) + (format #t "~1Taway-from-rand-transv-xz-hi: ~f~%" (-> this fountain-rand-transv-hi y)) + (format #t "~1Taway-from-rand-transv-y-lo: ~f~%" (-> this fountain-rand-transv-hi z)) + (format #t "~1Taway-from-rand-transv-y-hi: ~f~%" (-> this fountain-rand-transv-hi w)) + (format #t "~1Thit-xz-reaction: ~f~%" (-> this hit-xz-reaction)) + (format #t "~1Thit-y-reaction: ~f~%" (-> this hit-y-reaction)) + (label cfg-4) + this + ) + +;; definition of type joint-exploder-static-joint-params +(deftype joint-exploder-static-joint-params (structure) + ((joint-index int16) + (parent-joint-index int16) + ) + ) + +;; definition for method 3 of type joint-exploder-static-joint-params +(defmethod inspect ((this joint-exploder-static-joint-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'joint-exploder-static-joint-params) + (format #t "~1Tjoint-index: ~D~%" (-> this joint-index)) + (format #t "~1Tparent-joint-index: ~D~%" (-> this parent-joint-index)) + (label cfg-4) + this + ) + +;; definition of type joint-exploder-static-params +(deftype joint-exploder-static-params (basic) + ((joints (array joint-exploder-static-joint-params)) + (collide-spec collide-spec) + (art-level symbol) + (collide-sound sound-name) + (collide-sound-interval time-frame) + ) + ) + +;; definition for method 3 of type joint-exploder-static-params +;; INFO: Used lq/sq +(defmethod inspect ((this joint-exploder-static-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tjoints: ~A~%" (-> this joints)) + (format #t "~1Tcollide-spec: ~D~%" (-> this collide-spec)) + (format #t "~1Tart-level: ~A~%" (-> this art-level)) + (format #t "~1Tcollide-sound: ~D~%" (-> this collide-sound)) + (format #t "~1Tcollide-sound-interval: ~D~%" (-> this collide-sound-interval)) + (label cfg-4) + this + ) + +;; definition of type joint-exploder-joint +(deftype joint-exploder-joint (structure) + ((next int16) + (prev int16) + (joint-index int16) + (mat matrix :inline) + (rmat matrix :inline) + (update-rmat matrix :inline) + (transv vector :inline) + (prev-pos vector :inline) + ) + ) + +;; definition for method 3 of type joint-exploder-joint +(defmethod inspect ((this joint-exploder-joint)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'joint-exploder-joint) + (format #t "~1Tnext: ~D~%" (-> this next)) + (format #t "~1Tprev: ~D~%" (-> this prev)) + (format #t "~1Tjoint-index: ~D~%" (-> this joint-index)) + (format #t "~1Tmat: #~%" (-> this mat)) + (format #t "~1Trmat: #~%" (-> this rmat)) + (format #t "~1Tupdate-rmat: #~%" (-> this update-rmat)) + (format #t "~1Ttransv: #~%" (-> this transv)) + (format #t "~1Tprev-pos: #~%" (-> this prev-pos)) + (label cfg-4) + this + ) + +;; definition of type joint-exploder-joints +(deftype joint-exploder-joints (basic) + ((num-joints int32) + (joint joint-exploder-joint :inline :dynamic) + ) + (:methods + (new (symbol type joint-exploder-static-params) _type_) + ) + ) + +;; definition for method 3 of type joint-exploder-joints +(defmethod inspect ((this joint-exploder-joints)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tnum-joints: ~D~%" (-> this num-joints)) + (format #t "~1Tjoint[0] @ #x~X~%" (-> this joint)) + (label cfg-4) + this + ) + +;; definition of type joint-exploder-list +(deftype joint-exploder-list (structure) + ((head int32) + (pre-moved? symbol) + (bbox-valid? symbol) + (probeless? symbol) + (bbox bounding-box :inline) + ) + ) + +;; definition for method 3 of type joint-exploder-list +(defmethod inspect ((this joint-exploder-list)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'joint-exploder-list) + (format #t "~1Thead: ~D~%" (-> this head)) + (format #t "~1Tpre-moved?: ~A~%" (-> this pre-moved?)) + (format #t "~1Tbbox-valid?: ~A~%" (-> this bbox-valid?)) + (format #t "~1Tprobeless?: ~A~%" (-> this probeless?)) + (format #t "~1Tbbox: #~%" (-> this bbox)) + (label cfg-4) + this + ) + +;; definition of type joint-exploder-list-array +(deftype joint-exploder-list-array (inline-array-class) + ((data joint-exploder-list :inline :dynamic) + ) + ) + +;; definition for method 3 of type joint-exploder-list-array +(defmethod inspect ((this joint-exploder-list-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! (-> joint-exploder-list-array heap-base) (the-as uint 48)) + +;; definition of type joint-exploder +(deftype joint-exploder (process-drawable) + ((parent (pointer process-drawable) :override) + (die-if-below-y float) + (die-if-beyond-xz-dist-sqrd float) + (joints joint-exploder-joints) + (static-params joint-exploder-static-params) + (anim art-joint-anim) + (scale-vector vector :inline) + (tuning joint-exploder-tuning :inline) + (lists joint-exploder-list-array) + (last-colsound-time time-frame) + ) + (:methods + (add-joint-to-list (_type_ joint-exploder-list int) int) + (update-bbox-for-joint (_type_ joint-exploder-list joint-exploder-joint) none) + (do-collision-response (_type_ joint-exploder-list) none) + (init-joint-list (_type_) none) + (remove-from-list-and-reset (_type_ joint-exploder-list int) int) + (final-adjust (_type_ joint-exploder-list int) int) + (integrate-and-kill (_type_ joint-exploder-list) none) + (remove-joint-from-list (_type_ joint-exploder-list int) int) + (adjust-bbox-for-limits-along-axis (_type_ joint-exploder-list int) joint-exploder-list) + (adjust-bbox-for-limits (_type_ joint-exploder-list) none) + ) + (:states + joint-exploder-shatter + ) + ) + +;; definition for method 3 of type joint-exploder +(defmethod inspect ((this joint-exploder)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tdie-if-below-y: ~f~%" (-> this die-if-below-y)) + (format #t "~2Tdie-if-beyond-xz-dist-sqrd: ~f~%" (-> this die-if-beyond-xz-dist-sqrd)) + (format #t "~2Tjoints: ~A~%" (-> this joints)) + (format #t "~2Tstatic-params: ~A~%" (-> this static-params)) + (format #t "~2Tanim: ~A~%" (-> this anim)) + (format #t "~2Tscale-vector: #~%" (-> this scale-vector)) + (format #t "~2Ttuning: #~%" (-> this tuning)) + (format #t "~2Tlists: ~A~%" (-> this lists)) + (format #t "~2Tlast-colsound-time: ~D~%" (-> this last-colsound-time)) + (label cfg-4) + this + ) + +;; definition for method 5 of type joint-exploder-joints +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this joint-exploder-joints)) + (the-as int (+ (-> this type size) (* 240 (-> this num-joints)))) + ) + +;; definition for method 0 of type joint-exploder-joints +(defmethod new joint-exploder-joints ((allocation symbol) (type-to-make type) (arg0 joint-exploder-static-params)) + (let* ((gp-0 (-> arg0 joints length)) + (v0-0 (object-new allocation type-to-make (the-as int (+ (-> type-to-make size) (* 240 gp-0))))) + ) + (set! (-> v0-0 num-joints) gp-0) + v0-0 + ) + ) + +;; definition for function joint-exploder-joint-callback +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun joint-exploder-joint-callback ((arg0 draw-control) (arg1 cspace-array) (arg2 joint-control)) + (let ((s4-0 (the-as joint-exploder (-> arg0 process)))) + (let ((s3-0 (-> s4-0 joints))) + (countdown (s2-0 (-> s3-0 num-joints)) + (let* ((v1-3 (-> s3-0 joint s2-0)) + (a0-5 (-> arg1 data (-> v1-3 joint-index) bone transform)) + ) + (matrix*! a0-5 (-> v1-3 rmat) (-> v1-3 mat)) + ) + ) + ) + (let ((s4-1 (-> s4-0 scale-vector))) + (countdown (s3-1 (-> arg1 length)) + (let ((a2-2 (-> arg1 data s3-1 bone transform))) + (scale-matrix! a2-2 s4-1 a2-2) + ) + ) + ) + ) + (let ((s4-2 (new 'stack-no-clear 'matrix))) + (set! (-> s4-2 rvec quad) (the-as uint128 0)) + (set! (-> s4-2 uvec quad) (the-as uint128 0)) + (set! (-> s4-2 fvec quad) (the-as uint128 0)) + (set! (-> s4-2 trans quad) (the-as uint128 0)) + (let ((f30-0 (-> arg0 bounds w))) + (matrix-4x4-inverse! s4-2 (-> arg1 data 0 bone transform)) + (set! (-> arg0 bounds w) 1.0) + (vector-matrix*! (-> arg0 bounds) (-> arg0 bounds) s4-2) + (set! (-> arg0 bounds w) f30-0) + ) + ) + 0 + (none) + ) + +;; definition for method 24 of type joint-exploder +;; INFO: Used lq/sq +(defmethod remove-from-list-and-reset ((this joint-exploder) (arg0 joint-exploder-list) (arg1 int)) + (let ((v0-0 (remove-joint-from-list this arg0 arg1))) + (let* ((v1-1 (-> this joints)) + (v1-2 (-> v1-1 joint arg1)) + ) + (set! (-> v1-2 mat rvec quad) (the-as uint128 0)) + (set! (-> v1-2 mat uvec quad) (the-as uint128 0)) + (set! (-> v1-2 mat fvec quad) (the-as uint128 0)) + (set! (-> v1-2 mat trans quad) (-> this root trans quad)) + ) + v0-0 + ) + ) + +;; definition for method 27 of type joint-exploder +(defmethod remove-joint-from-list ((this joint-exploder) (arg0 joint-exploder-list) (arg1 int)) + (let* ((v1-0 (-> this joints)) + (a2-1 (-> v1-0 joint arg1)) + (a0-4 (-> a2-1 prev)) + (v0-0 (-> a2-1 next)) + ) + (cond + ((>= a0-4 0) + (set! (-> v1-0 joint a0-4 next) v0-0) + (if (>= v0-0 0) + (set! (-> v1-0 joint v0-0 prev) a0-4) + ) + ) + (else + (set! (-> arg0 head) v0-0) + (cond + ((>= v0-0 0) + (let ((v1-2 (-> v1-0 joint v0-0))) + (set! (-> v1-2 prev) -1) + ) + ) + (else + (set! (-> arg0 bbox-valid?) #f) + ) + ) + ) + ) + v0-0 + ) + ) + +;; definition for method 20 of type joint-exploder +(defmethod add-joint-to-list ((this joint-exploder) (arg0 joint-exploder-list) (arg1 int)) + (let* ((v1-0 (-> this joints)) + (a3-0 (-> v1-0 joint arg1)) + (a0-4 (-> arg0 head)) + ) + (set! (-> arg0 head) arg1) + (set! (-> a3-0 prev) -1) + (set! (-> a3-0 next) a0-4) + (when (>= a0-4 0) + (set! (-> v1-0 joint a0-4 prev) arg1) + arg1 + ) + ) + ) + +;; definition for method 21 of type joint-exploder +;; INFO: Used lq/sq +(defmethod update-bbox-for-joint ((this joint-exploder) (arg0 joint-exploder-list) (arg1 joint-exploder-joint)) + (let ((a1-1 (-> arg1 mat trans))) + (cond + ((-> arg0 bbox-valid?) + (add-point! (-> arg0 bbox) a1-1) + ) + (else + (set! (-> arg0 bbox-valid?) #t) + (set! (-> arg0 bbox min quad) (-> a1-1 quad)) + (set! (-> arg0 bbox max quad) (-> a1-1 quad)) + ) + ) + ) + (add-point! (-> arg0 bbox) (-> arg1 prev-pos)) + (none) + ) + +;; definition for method 28 of type joint-exploder +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs joint-exploder-list. +(defmethod adjust-bbox-for-limits-along-axis ((this joint-exploder) (arg0 joint-exploder-list) (arg1 int)) + (local-vars + (sv-16 int) + (sv-32 int) + (sv-48 joint-exploder-joint) + (sv-64 int) + (sv-80 joint-exploder-joint) + (sv-96 int) + (sv-112 joint-exploder-joint) + ) + (let ((s4-0 (the-as object #f))) + (let ((v1-0 1)) + (until (= v1-0 (+ (-> this tuning max-probes) 1)) + (let ((a0-4 (-> this lists data v1-0))) + (when (< (-> a0-4 head) 0) + (set! s4-0 a0-4) + (goto cfg-6) + ) + ) + (+! v1-0 1) + ) + ) + (label cfg-6) + (cond + ((the-as joint-exploder-list s4-0) + (set! (-> (the-as joint-exploder-list s4-0) pre-moved?) #t) + (set! (-> (the-as joint-exploder-list s4-0) bbox-valid?) #f) + ) + (else + (set! s4-0 (-> this lists data)) + ) + ) + (set! (-> arg0 bbox-valid?) #f) + (let ((s2-0 (-> this joints))) + (set! sv-32 (-> arg0 head)) + (let ((s1-0 0) + (s0-0 0) + ) + (let ((v1-8 arg1)) + (cond + ((zero? v1-8) + (let ((f30-0 (* 0.5 (+ (-> arg0 bbox min x) (-> arg0 bbox max x))))) + (while (>= sv-32 0) + (set! sv-48 (-> s2-0 joint sv-32)) + (cond + ((>= (-> sv-48 mat trans x) f30-0) + (set! sv-16 (remove-joint-from-list this arg0 sv-32)) + (add-joint-to-list this (the-as joint-exploder-list s4-0) sv-32) + (set! sv-32 sv-16) + (update-bbox-for-joint this (the-as joint-exploder-list s4-0) sv-48) + (+! s0-0 1) + ) + (else + (update-bbox-for-joint this arg0 sv-48) + (set! sv-32 (-> sv-48 next)) + (+! s1-0 1) + ) + ) + ) + ) + ) + ((= v1-8 1) + (let ((f30-1 (* 0.5 (+ (-> arg0 bbox min y) (-> arg0 bbox max y))))) + (while (>= sv-32 0) + (set! sv-80 (-> s2-0 joint sv-32)) + (cond + ((>= (-> sv-80 mat trans y) f30-1) + (set! sv-64 (remove-joint-from-list this arg0 sv-32)) + (add-joint-to-list this (the-as joint-exploder-list s4-0) sv-32) + (set! sv-32 sv-64) + (update-bbox-for-joint this (the-as joint-exploder-list s4-0) sv-80) + (+! s0-0 1) + ) + (else + (update-bbox-for-joint this arg0 sv-80) + (set! sv-32 (-> sv-80 next)) + (+! s1-0 1) + ) + ) + ) + ) + ) + ((= v1-8 2) + (let ((f30-2 (* 0.5 (+ (-> arg0 bbox min z) (-> arg0 bbox max z))))) + (while (>= sv-32 0) + (set! sv-112 (-> s2-0 joint sv-32)) + (cond + ((>= (-> sv-112 mat trans z) f30-2) + (set! sv-96 (remove-joint-from-list this arg0 sv-32)) + (add-joint-to-list this (the-as joint-exploder-list s4-0) sv-32) + (set! sv-32 sv-96) + (update-bbox-for-joint this (the-as joint-exploder-list s4-0) sv-112) + (+! s0-0 1) + ) + (else + (update-bbox-for-joint this arg0 sv-112) + (set! sv-32 (-> sv-112 next)) + (+! s1-0 1) + ) + ) + ) + ) + ) + ) + ) + (cond + ((zero? s0-0) + (final-adjust this arg0 arg1) + ) + ((zero? s1-0) + (if (not (-> (the-as joint-exploder-list s4-0) probeless?)) + (final-adjust this (the-as joint-exploder-list s4-0) arg1) + ) + ) + ) + ) + ) + (the-as joint-exploder-list s4-0) + ) + ) + +;; definition for method 25 of type joint-exploder +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs int. +(defmethod final-adjust ((this joint-exploder) (arg0 joint-exploder-list) (arg1 int)) + (local-vars (sv-48 int) (sv-64 (inline-array joint-exploder-list)) (sv-80 joint-exploder-joint)) + (set! (-> arg0 bbox-valid?) #f) + (let ((s3-0 (-> this joints)) + (s2-0 (-> arg0 head)) + ) + (while (>= s2-0 0) + (set! sv-80 (-> s3-0 joint s2-0)) + (let ((s1-0 (new 'stack-no-clear 'bounding-box)) + (s0-0 (-> arg0 bbox-valid?)) + ) + (set! (-> s1-0 min quad) (-> arg0 bbox min quad)) + (set! (-> s1-0 max quad) (-> arg0 bbox max quad)) + (update-bbox-for-joint this arg0 sv-80) + (let* ((v1-7 arg1) + (v1-8 (cond + ((zero? v1-7) + (< (-> this tuning max-probe-width) (- (-> arg0 bbox max x) (-> arg0 bbox min x))) + ) + ((= v1-7 1) + (< (-> this tuning max-probe-height) (- (-> arg0 bbox max y) (-> arg0 bbox min y))) + ) + ((= v1-7 2) + (< (-> this tuning max-probe-depth) (- (-> arg0 bbox max z) (-> arg0 bbox min z))) + ) + ) + ) + ) + (set! s2-0 (cond + (v1-8 + (set! sv-48 (remove-joint-from-list this arg0 s2-0)) + (set! sv-64 (-> this lists data)) + (add-joint-to-list this (the-as joint-exploder-list sv-64) s2-0) + (set! s2-0 sv-48) + (update-bbox-for-joint this (the-as joint-exploder-list sv-64) sv-80) + (set! (-> arg0 bbox-valid?) s0-0) + (set! (-> arg0 bbox min quad) (-> s1-0 min quad)) + (set! (-> arg0 bbox max quad) (-> s1-0 max quad)) + s2-0 + ) + (else + (-> sv-80 next) + ) + ) + ) + ) + ) + ) + ) + (the-as int #f) + ) + +;; definition for method 29 of type joint-exploder +;; WARN: Return type mismatch int vs none. +(defmethod adjust-bbox-for-limits ((this joint-exploder) (arg0 joint-exploder-list)) + (when (and (-> arg0 bbox-valid?) (>= (-> arg0 head) 0) (not (-> arg0 probeless?))) + (let ((a2-0 -1)) + (cond + ((< (-> this tuning max-probe-width) (- (-> arg0 bbox max x) (-> arg0 bbox min x))) + (set! a2-0 0) + ) + ((< (-> this tuning max-probe-height) (- (-> arg0 bbox max y) (-> arg0 bbox min y))) + (set! a2-0 1) + ) + ((< (-> this tuning max-probe-depth) (- (-> arg0 bbox max z) (-> arg0 bbox min z))) + (set! a2-0 2) + ) + ) + (when (>= a2-0 0) + (let ((a1-2 (adjust-bbox-for-limits-along-axis this arg0 a2-0))) + (if (not (-> a1-2 probeless?)) + (adjust-bbox-for-limits this a1-2) + ) + ) + (adjust-bbox-for-limits this arg0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 26 of type joint-exploder +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod integrate-and-kill ((this joint-exploder) (arg0 joint-exploder-list)) + (local-vars (v1-8 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set! (-> arg0 bbox-valid?) #f) + (set! (-> arg0 pre-moved?) #t) + (let ((s4-0 (-> this joints)) + (f30-0 (* (-> this tuning gravity) (seconds-per-frame))) + (s3-0 (-> arg0 head)) + ) + (while (>= s3-0 0) + (let* ((s2-0 (-> s4-0 joint s3-0)) + (s1-0 (-> s2-0 mat trans)) + ) + (set! (-> s2-0 prev-pos quad) (-> s1-0 quad)) + (+! (-> s2-0 transv y) f30-0) + (when (< 0.0 (-> this tuning friction)) + (.lvf vf1 (&-> (-> s2-0 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-8 vf1) + (let* ((f0-4 v1-8) + (f1-5 (* 0.00001 (seconds-per-frame) (-> this tuning friction) f0-4)) + (f0-6 (- (sqrtf f0-4) f1-5)) + ) + (if (< f0-6 0.0) + (set! f0-6 0.0) + ) + (vector-normalize! (-> s2-0 transv) f0-6) + ) + ) + (vector-v+! s1-0 s1-0 (-> s2-0 transv)) + (matrix*! (-> s2-0 rmat) (-> s2-0 rmat) (-> s2-0 update-rmat)) + (cond + ((or (< (-> s1-0 y) (-> this die-if-below-y)) + (< (-> this die-if-beyond-xz-dist-sqrd) (vector-vector-xz-distance s1-0 (-> this root trans))) + ) + (set! s3-0 (remove-from-list-and-reset this arg0 s3-0)) + ) + (else + (update-bbox-for-joint this arg0 s2-0) + (set! s3-0 (-> s2-0 next)) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 22 of type joint-exploder +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod do-collision-response ((this joint-exploder) (arg0 joint-exploder-list)) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (set! (-> s5-0 collide-with) (-> this static-params collide-spec)) + (set! (-> s5-0 ignore-process0) this) + (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) + ) + (set! (-> s5-0 action-mask) (collide-action solid)) + (mem-copy! (the-as pointer (-> s5-0 bbox)) (the-as pointer (-> arg0 bbox)) 32) + (fill-using-bounding-box *collide-cache* s5-0) + ) + (let ((s5-1 (-> this joints)) + (v1-6 (-> arg0 head)) + ) + (while (>= v1-6 0) + (let ((s4-1 (-> s5-1 joint v1-6))) + (let ((s3-0 (-> s4-1 mat trans)) + (s2-0 (new 'stack-no-clear 'collide-query)) + ) + (vector-! (-> s2-0 move-dist) s3-0 (-> s4-1 prev-pos)) + (set! (-> s2-0 start-pos quad) (-> s4-1 prev-pos quad)) + (let ((v1-11 s2-0)) + (set! (-> v1-11 radius) 40.96) + (set! (-> v1-11 collide-with) (-> this static-params collide-spec)) + (set! (-> v1-11 ignore-process0) #f) + (set! (-> v1-11 ignore-process1) #f) + (set! (-> v1-11 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-11 action-mask) (collide-action solid)) + ) + (when (>= (probe-using-line-sphere *collide-cache* s2-0) 0.0) + (set! (-> s3-0 quad) (-> s2-0 best-other-tri intersect quad)) + (let* ((v1-16 (-> s4-1 transv)) + (f28-0 (sqrtf (+ (* (-> v1-16 x) (-> v1-16 x)) (* (-> v1-16 z) (-> v1-16 z))))) + ) + (vector-reflect! (-> s4-1 transv) (-> s4-1 transv) (-> s2-0 best-other-tri normal)) + (let ((f30-0 (-> s4-1 transv y))) + (set! (-> s4-1 transv y) 0.0) + (vector-normalize! (-> s4-1 transv) (* f28-0 (-> this tuning hit-xz-reaction))) + (set! (-> s4-1 transv y) (* f30-0 (-> this tuning hit-y-reaction))) + ) + ) + (let ((v1-20 (-> this static-params collide-sound))) + (when (and v1-20 + (nonzero? v1-20) + (< (-> this static-params collide-sound-interval) (- (current-time) (-> this last-colsound-time))) + ) + (sound-play-by-name + (-> this static-params collide-sound) + (new-sound-id) + 1024 + 0 + 0 + (sound-group) + (-> s4-1 transv) + ) + (set-time! (-> this last-colsound-time)) + ) + ) + (+! (-> s3-0 y) (* 40.96 (-> s2-0 best-other-tri normal y))) + (set! (-> s3-0 w) 1.0) + (matrix-lerp! (-> s4-1 update-rmat) (-> s4-1 update-rmat) *identity-matrix* 0.5) + ) + ) + (set! v1-6 (-> s4-1 next)) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate joint-exploder-shatter (joint-exploder) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (let* ((f1-0 (the float (- (current-time) (-> self state-time)))) + (f0-2 (- 1.0 (/ f1-0 (the float (-> self tuning duration))))) + (f1-2 (- 1.0 (/ f1-0 (* 0.75 (the float (-> self tuning duration)))))) + (f1-3 (fmax 0.0001 f1-2)) + (f0-3 (fmax 0.0001 f0-2)) + ) + (set-vector! (-> self scale-vector) f0-3 f1-3 f0-3 1.0) + ) + (dotimes (v1-11 (the-as int (+ (-> self tuning max-probes) 1))) + (set! (-> self lists data v1-11 pre-moved?) #f) + ) + (dotimes (gp-0 (the-as int (+ (-> self tuning max-probes) 1))) + (let ((s5-0 (-> self lists data gp-0))) + (when (>= (-> s5-0 head) 0) + (when (not (-> s5-0 pre-moved?)) + (integrate-and-kill self s5-0) + (if (nonzero? gp-0) + (adjust-bbox-for-limits self s5-0) + ) + ) + ) + ) + ) + (let ((gp-1 (new 'stack-no-clear 'bounding-box))) + (let ((v1-31 (-> self root trans))) + (set! (-> gp-1 min quad) (-> v1-31 quad)) + (set! (-> gp-1 max quad) (-> v1-31 quad)) + ) + (dotimes (s5-1 (the-as int (+ (-> self tuning max-probes) 1))) + (let ((s4-0 (-> self lists data s5-1))) + (if (-> s4-0 bbox-valid?) + (add-box! gp-1 (-> s4-0 bbox)) + ) + (if (nonzero? s5-1) + (do-collision-response self s4-0) + ) + ) + ) + (let ((s5-2 (-> self draw bounds))) + (vector-average! s5-2 (-> gp-1 min) (-> gp-1 max)) + (set! (-> s5-2 w) (+ (vector-vector-distance s5-2 (-> gp-1 max)) (-> self tuning bounds-inflate))) + ) + ) + 0 + ) + :code (behavior () + (set-time! (-> self state-time)) + (until (time-elapsed? (-> self state-time) (-> self tuning duration)) + (suspend) + (ja :num! (loop!)) + ) + ) + :post ja-post + ) + +;; definition for method 23 of type joint-exploder +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-joint-list ((this joint-exploder)) + (let ((gp-0 (-> this joints))) + (dotimes (s4-0 (-> gp-0 num-joints)) + (let ((v1-2 (-> this static-params joints s4-0)) + (s3-0 (-> gp-0 joint s4-0)) + ) + (let ((a0-6 (-> v1-2 parent-joint-index))) + (set! (-> s3-0 prev) (+ s4-0 -1)) + (set! (-> s3-0 next) (+ s4-0 1)) + (set! (-> s3-0 joint-index) (-> v1-2 joint-index)) + (cond + ((>= a0-6 0) + (if (zero? a0-6) + (set! a0-6 (-> v1-2 joint-index)) + ) + (let* ((a3-0 (-> this parent 0 node-list data a0-6 bone transform)) + (a2-0 (-> s3-0 mat)) + (v1-9 (-> a3-0 rvec quad)) + (a0-8 (-> a3-0 uvec quad)) + (a1-4 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> a2-0 rvec quad) v1-9) + (set! (-> a2-0 uvec quad) a0-8) + (set! (-> a2-0 fvec quad) a1-4) + (set! (-> a2-0 trans quad) a3-1) + ) + (matrix-identity! (-> s3-0 rmat)) + ) + (else + (let* ((a3-2 (-> this node-list data (-> v1-2 joint-index) bone transform)) + (a2-1 (-> s3-0 mat)) + (v1-15 (-> a3-2 rvec quad)) + (a0-11 (-> a3-2 uvec quad)) + (a1-5 (-> a3-2 fvec quad)) + (a3-3 (-> a3-2 trans quad)) + ) + (set! (-> a2-1 rvec quad) v1-15) + (set! (-> a2-1 uvec quad) a0-11) + (set! (-> a2-1 fvec quad) a1-5) + (set! (-> a2-1 trans quad) a3-3) + ) + (matrix-identity! (-> s3-0 rmat)) + ) + ) + ) + (case (-> this tuning explosion) + ((1) + (vector-! (-> s3-0 transv) (-> s3-0 mat trans) (-> this tuning fountain-rand-transv-lo)) + (vector-normalize! + (-> s3-0 transv) + (rand-vu-float-range (-> this tuning fountain-rand-transv-hi x) (-> this tuning fountain-rand-transv-hi y)) + ) + (+! (-> s3-0 transv y) + (rand-vu-float-range (-> this tuning fountain-rand-transv-hi z) (-> this tuning fountain-rand-transv-hi w)) + ) + (set! (-> s3-0 transv w) 1.0) + ) + (else + (let ((s0-0 (-> this tuning fountain-rand-transv-lo)) + (s1-1 (-> this tuning fountain-rand-transv-hi)) + ) + (set-vector! + (-> s3-0 transv) + (rand-vu-float-range (-> s0-0 x) (-> s1-1 x)) + (rand-vu-float-range (-> s0-0 y) (-> s1-1 y)) + (rand-vu-float-range (-> s0-0 z) (-> s1-1 z)) + 1.0 + ) + ) + ) + ) + (let ((s2-3 (new 'stack-no-clear 'vector)) + (s1-2 (new 'stack-no-clear 'quaternion)) + ) + (rand-vu-sphere-point-uniform! s2-3 1.0) + (vector-normalize! s2-3 1.0) + (quaternion-vector-angle! s1-2 s2-3 (* 182.04445 (-> this tuning rot-speed))) + (quaternion->matrix (-> s3-0 update-rmat) s1-2) + ) + ) + ) + (when (nonzero? (-> gp-0 num-joints)) + (let ((v1-31 (-> gp-0 joint (+ (-> gp-0 num-joints) -1)))) + (set! (-> v1-31 next) -1) + ) + (let ((v1-33 (-> this lists data 1))) + (set! (-> v1-33 head) 0) + (let ((s5-1 (-> v1-33 bbox))) + (let ((v1-34 (-> gp-0 joint 0 mat trans))) + (set! (-> s5-1 min quad) (-> v1-34 quad)) + (set! (-> s5-1 max quad) (-> v1-34 quad)) + ) + (dotimes (s4-1 (-> gp-0 num-joints)) + (add-point! s5-1 (the-as vector (+ (the-as uint (-> gp-0 joint 0 mat trans)) (* 240 s4-1)))) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 7 of type joint-exploder +;; WARN: Return type mismatch process-drawable vs joint-exploder. +(defmethod relocate ((this joint-exploder) (offset int)) + (if (nonzero? (-> this joints)) + (&+! (-> this joints) offset) + ) + (if (nonzero? (-> this lists)) + (&+! (-> this lists) offset) + ) + (the-as joint-exploder ((method-of-type process-drawable relocate) this offset)) + ) + +;; definition for function joint-exploder-init-by-other +;; INFO: Used lq/sq +(defbehavior joint-exploder-init-by-other joint-exploder ((arg0 skeleton-group) (arg1 int) (arg2 joint-exploder-tuning) (arg3 joint-exploder-static-params)) + (set! (-> self static-params) arg3) + (set! (-> self die-if-beyond-xz-dist-sqrd) 10485760000.0) + (mem-copy! (the-as pointer (-> self tuning)) (the-as pointer arg2) 88) + (set! (-> self joints) (new 'process 'joint-exploder-joints arg3)) + (set! (-> self lists) + (new 'process 'joint-exploder-list-array (the-as int (+ (-> self tuning max-probes) 1))) + ) + (dotimes (v1-4 (the-as int (+ (-> self tuning max-probes) 1))) + (let ((a0-7 (-> self lists data v1-4))) + (set! (-> a0-7 head) -1) + (set! (-> a0-7 bbox-valid?) #f) + (set! (-> a0-7 pre-moved?) #f) + (set! (-> a0-7 probeless?) #f) + ) + ) + (let ((v1-8 (-> self lists data))) + (set! (-> v1-8 0 probeless?) #t) + ) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> self parent 0 root trans quad)) + (quaternion-copy! (-> self root quat) (-> self parent 0 root quat)) + (set! (-> self root scale quad) (-> self parent 0 root scale quad)) + (when (-> arg3 art-level) + (let ((a1-8 (entity-actor-from-level-name (-> arg3 art-level)))) + (if a1-8 + (process-entity-set! self a1-8) + ) + ) + ) + (initialize-skeleton self arg0 (the-as pair 0)) + (logior! (-> self skel status) (joint-control-status sync-math)) + (set! (-> self anim) (the-as art-joint-anim (-> self draw art-group data arg1))) + (ja-channel-set! 1) + (ja :group! (-> self anim) :num! min) + (ja-post) + (init-joint-list self) + (set! (-> self die-if-below-y) (+ -102400.0 (-> self root trans y))) + (set! (-> self skel postbind-function) joint-exploder-joint-callback) + (set! (-> self last-colsound-time) 0) + (go joint-exploder-shatter) + ) + +;; definition for method 0 of type joint-exploder-tuning +;; WARN: Return type mismatch structure vs joint-exploder-tuning. +(defmethod new joint-exploder-tuning ((allocation symbol) (type-to-make type) (arg0 uint)) + (let ((t9-0 (method-of-type structure new)) + (v1-1 type-to-make) + ) + (-> type-to-make size) + (let ((v0-0 (t9-0 allocation v1-1))) + (set! (-> (the-as joint-exploder-tuning v0-0) explosion) arg0) + (set! (-> (the-as joint-exploder-tuning v0-0) duration) (seconds 2)) + (set! (-> (the-as joint-exploder-tuning v0-0) gravity) -286720.0) + (set! (-> (the-as joint-exploder-tuning v0-0) rot-speed) 8.4) + (set! (-> (the-as joint-exploder-tuning v0-0) friction) 0.0) + (set! (-> (the-as joint-exploder-tuning v0-0) bounds-inflate) 16384.0) + (set! (-> (the-as joint-exploder-tuning v0-0) max-probe-width) 20480.0) + (set! (-> (the-as joint-exploder-tuning v0-0) max-probe-height) 24576.0) + (set! (-> (the-as joint-exploder-tuning v0-0) max-probe-depth) 20480.0) + (set! (-> (the-as joint-exploder-tuning v0-0) max-probes) (the-as uint 4)) + (set! (-> (the-as joint-exploder-tuning v0-0) hit-xz-reaction) 0.75) + (set! (-> (the-as joint-exploder-tuning v0-0) hit-y-reaction) 0.7) + (cond + ((zero? arg0) + (set-vector! (-> (the-as joint-exploder-tuning v0-0) fountain-rand-transv-lo) -81920.0 20480.0 -81920.0 1.0) + (set-vector! (-> (the-as joint-exploder-tuning v0-0) fountain-rand-transv-hi) 81920.0 61440.0 81920.0 1.0) + ) + ((= arg0 1) + (vector-reset! (-> (the-as joint-exploder-tuning v0-0) fountain-rand-transv-lo)) + (set! (-> (the-as joint-exploder-tuning v0-0) fountain-rand-transv-hi x) 49152.0) + (set! (-> (the-as joint-exploder-tuning v0-0) fountain-rand-transv-hi y) 163840.0) + (set! (-> (the-as joint-exploder-tuning v0-0) fountain-rand-transv-hi z) 20480.0) + (set! (-> (the-as joint-exploder-tuning v0-0) fountain-rand-transv-hi w) 61440.0) + ) + ) + (the-as joint-exploder-tuning v0-0) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/anim/joint_REF.gc b/test/decompiler/reference/jak3/engine/anim/joint_REF.gc index e137e2b0a2..c7d4f26bb4 100644 --- a/test/decompiler/reference/jak3/engine/anim/joint_REF.gc +++ b/test/decompiler/reference/jak3/engine/anim/joint_REF.gc @@ -679,11 +679,11 @@ ) ;; definition for function joint-control-cleanup -;; WARN: Return type mismatch symbol vs none. (defun joint-control-cleanup ((jc joint-control) (heap kheap) (ja art-joint-anim)) "Remove all animations that are stored on the given heap and return those slots to a safe default." (let ((v1-0 (-> heap base)) (a1-1 (-> heap top-base)) + (v0-0 #f) ) (countdown (a3-1 (+ (-> jc active-channels) (-> jc float-channels))) (let ((t0-3 (-> jc channel a3-1))) @@ -693,12 +693,12 @@ (set! (-> t0-3 frame-group) ja) (set! (-> t0-3 frame-num) 0.0) (set! (-> t0-3 num-func) num-func-identity) - #t + (set! v0-0 #t) ) ) ) + v0-0 ) - (none) ) ;; definition for function joint-control-channel-eval @@ -2044,8 +2044,8 @@ (let ((a0-9 (-> jc interp-select 0))) (dotimes (a1-5 2) (when (logtest? a0-9 1) - (let* ((a2-7 (the-as object (-> dst matrices a1-5 rvec))) - (t2-0 (the-as (inline-array vector) (-> v1-9 matrices a1-5 rvec))) + (let* ((a2-7 (the-as object (-> dst matrices a1-5))) + (t2-0 (the-as (inline-array vector) (-> v1-9 matrices a1-5))) (a3-3 (-> t2-0 0 quad)) (t0-0 (-> t2-0 1 quad)) (t1-0 (-> t2-0 2 quad)) diff --git a/test/decompiler/reference/jak3/engine/camera/cam-layout_REF.gc b/test/decompiler/reference/jak3/engine/camera/cam-layout_REF.gc index 52489920d0..b84f5ccb70 100644 --- a/test/decompiler/reference/jak3/engine/camera/cam-layout_REF.gc +++ b/test/decompiler/reference/jak3/engine/camera/cam-layout_REF.gc @@ -280,7 +280,7 @@ ) (dma-bucket-insert-tag (-> *display* frames (-> *display* on-screen) bucket-group) - (bucket-id bucket583) + (bucket-id debug) gp-0 (the-as (pointer dma-tag) a3-2) ) @@ -2492,21 +2492,13 @@ ;; definition for function clmf-cam-string ;; INFO: Used lq/sq (defbehavior clmf-cam-string cam-layout ((arg0 string) (arg1 symbol)) - (local-vars (r0-0 uint128) (v1-5 uint128) (sv-16 int)) + (local-vars (sv-16 res-tag)) (format arg0 ":") - (set! sv-16 0) - (let ((s5-1 (res-lump-data (-> self cam-entity) arg1 pointer :tag-ptr (the-as (pointer res-tag) (& sv-16))))) + (set! sv-16 (new 'static 'res-tag)) + (let ((s5-1 (res-lump-data (-> self cam-entity) arg1 pointer :tag-ptr (& sv-16)))) (when s5-1 - (let ((s4-0 0)) - (while (begin - (let ((v1-4 (the-as uint128 sv-16))) - (.pcpyud v1-5 v1-4 r0-0) - ) - (< s4-0 (shr (* (the-as int v1-5) 2) 49)) - ) - (format arg0 " ~S" (-> (the-as (pointer uint32) (&+ s5-1 (* s4-0 4))))) - (+! s4-0 1) - ) + (dotimes (s4-0 (the-as int (-> sv-16 elt-count))) + (format arg0 " ~S" (-> (the-as (pointer uint32) (&+ s5-1 (* s4-0 4))))) ) ) ) diff --git a/test/decompiler/reference/jak3/engine/camera/cam-start_REF.gc b/test/decompiler/reference/jak3/engine/camera/cam-start_REF.gc new file mode 100644 index 0000000000..ddaeec56ef --- /dev/null +++ b/test/decompiler/reference/jak3/engine/camera/cam-start_REF.gc @@ -0,0 +1,50 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function cam-stop +(defun cam-stop () + (kill-by-name "camera-master" *active-pool*) + (kill-by-name "camera-slave" *active-pool*) + (kill-by-name "camera-combiner" *active-pool*) + (set! *camera* #f) + (set! *camera-combiner* #f) + #f + ) + +;; definition for function cam-start +;; WARN: Return type mismatch int vs none. +(defun cam-start ((arg0 symbol)) + (cam-stop) + (set! *camera-combiner* (the-as camera-combiner (ppointer->process (process-spawn + camera-combiner + :init cam-combiner-init + :name "camera-combiner" + :from *camera-dead-pool* + :to *camera-pool* + ) + ) + ) + ) + (set! *camera* (the-as camera-master (ppointer->process (process-spawn + camera-master + :init cam-master-init + :name "camera-master" + :from *camera-master-dead-pool* + :to *camera-pool* + ) + ) + ) + ) + (if arg0 + (reset-cameras) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(cam-start #f) + + + + diff --git a/test/decompiler/reference/jak3/engine/camera/cam-update_REF.gc b/test/decompiler/reference/jak3/engine/camera/cam-update_REF.gc index d76e0b801a..63000e8a9f 100644 --- a/test/decompiler/reference/jak3/engine/camera/cam-update_REF.gc +++ b/test/decompiler/reference/jak3/engine/camera/cam-update_REF.gc @@ -213,8 +213,8 @@ ) (when (= a0-45 s3-0) (if (>= v1-95 0) - (add-debug-sphere #t (bucket-id bucket583) (-> s2-0 data s1-0) (meters 1) (new 'static 'rgba :b #xff :a #x80)) - (add-debug-sphere #t (bucket-id bucket583) (-> s2-0 data s1-0) (meters 1) (new 'static 'rgba :r #xff :a #x80)) + (add-debug-sphere #t (bucket-id debug) (-> s2-0 data s1-0) (meters 1) (new 'static 'rgba :b #xff :a #x80)) + (add-debug-sphere #t (bucket-id debug) (-> s2-0 data s1-0) (meters 1) (new 'static 'rgba :r #xff :a #x80)) ) ) ) @@ -246,7 +246,7 @@ (+! (-> a3-6 z) (the float (* (-> v1-109 back-box-max z) (the int (-> s4-1 bsp bsp-scale z))))) ) ) - (add-debug-box #t (bucket-id bucket583) a2-7 a3-6 (new 'static 'rgba :g #xff :b #xff :a #x80)) + (add-debug-box #t (bucket-id debug) a2-7 a3-6 (new 'static 'rgba :g #xff :b #xff :a #x80)) ) ) ) @@ -683,7 +683,7 @@ (defun-debug move-level-by-name ((arg0 symbol) (arg1 float) (arg2 float) (arg3 float)) (let ((v1-1 (level-get *level* arg0))) (when v1-1 - (logior! (-> v1-1 info level-flags) (level-flags lf10)) + (logior! (-> v1-1 info level-flags) (level-flags use-camera-other)) (let ((v0-1 (-> *math-camera* trans-other))) (set! (-> v0-1 x) (* 4096.0 arg1)) (set! (-> v0-1 y) (* 4096.0 arg2)) @@ -714,7 +714,3 @@ ) 0 ) - - - - diff --git a/test/decompiler/reference/jak3/engine/camera/pov-camera-h_REF.gc b/test/decompiler/reference/jak3/engine/camera/pov-camera-h_REF.gc index f5541cffe5..e5dc0837c7 100644 --- a/test/decompiler/reference/jak3/engine/camera/pov-camera-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/camera/pov-camera-h_REF.gc @@ -20,11 +20,11 @@ pov-camera-startup ) (:methods - (pov-camera-method-25 () none) - (pov-camera-method-26 () none) - (pov-camera-method-27 () none) - (pov-camera-method-28 () none) - (pov-camera-method-29 () none) + (abort? (_type_) symbol) + (target-grabbed? (_type_) symbol) + (set-stack-size! (_type_) none) + (pov-camera-method-28 (_type_) none) + (target-released? (_type_) symbol) ) ) diff --git a/test/decompiler/reference/jak3/engine/camera/pov-camera_REF.gc b/test/decompiler/reference/jak3/engine/camera/pov-camera_REF.gc new file mode 100644 index 0000000000..ea0a60106a --- /dev/null +++ b/test/decompiler/reference/jak3/engine/camera/pov-camera_REF.gc @@ -0,0 +1,429 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 25 of type pov-camera +(defmethod abort? ((this pov-camera)) + (when (or (and (time-elapsed? (-> this debounce-start-time) (seconds 0.2)) (cpad-pressed? 0 triangle)) + (logtest? (-> this flags) (pov-camera-flag allow-abort)) + ) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) + (when (logtest? (-> this flags) (pov-camera-flag notify-of-abort)) + (send-event (handle->process (-> this notify-handle)) 'notify 'abort-request) + #t + ) + ) + ) + +;; definition for method 26 of type pov-camera +(defmethod target-grabbed? ((this pov-camera)) + (or (not *target*) (process-grab? *target* #f)) + ) + +;; definition for method 29 of type pov-camera +(defmethod target-released? ((this pov-camera)) + (or (not *target*) (process-release? *target*)) + ) + +;; failed to figure out what this is: +(defstate pov-camera-startup (pov-camera) + :virtual #t + :code (behavior () + (go-virtual pov-camera-start-playing) + ) + ) + +;; failed to figure out what this is: +(defstate pov-camera-start-playing (pov-camera) + :virtual #t + :code (behavior () + (logclear! (-> self mask) (process-mask actor-pause)) + (when (not (logtest? (-> self flags) (pov-camera-flag pcf3))) + (while (not (target-grabbed? self)) + (suspend) + ) + ) + (let ((gp-0 0)) + (let ((v1-10 (the-as joint (get-art-by-name-method (-> self draw jgeo) "camera" (the-as type #f))))) + (if v1-10 + (set! gp-0 (+ (-> v1-10 number) 1)) + ) + ) + (let ((v1-13 (process-spawn othercam self gp-0 #t #t :name "othercam" :to self))) + (send-event (ppointer->process v1-13) 'mask (-> self mask-to-clear)) + ) + ) + (go-virtual pov-camera-playing) + ) + ) + +;; definition for function pov-camera-play-and-reposition +;; WARN: Return type mismatch int vs none. +(defbehavior pov-camera-play-and-reposition pov-camera ((arg0 art-joint-anim) (arg1 vector) (arg2 float)) + (let ((s4-0 #f)) + (ja-no-eval :group! arg0 :num! (seek! max arg2) :frame-num 0.0) + (until (ja-done? 0) + (let ((v1-4 (and (not s4-0) (< (the float (+ (-> (ja-group) frames num-frames) -4)) (ja-frame-num 0))))) + (when v1-4 + (set! s4-0 #t) + (send-event *camera* 'teleport-to-vector-start-string arg1) + ) + ) + (suspend) + (ja :num! (seek! max arg2)) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate pov-camera-playing (pov-camera) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('abort) + (when (logtest? (-> self flags) (pov-camera-flag notify-of-abort)) + (logior! (-> self flags) (pov-camera-flag allow-abort)) + (if (= (-> self anim-name type) string) + (go-virtual pov-camera-abort) + ) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self debounce-start-time)) + (if (= (-> self anim-name type) string) + (backup-load-state-and-set-cmds *load-state* (-> self command-list)) + ) + ) + :exit (behavior () + (if (= (-> self anim-name type) string) + (restore-load-state-and-cleanup *load-state*) + ) + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) + ) + :code (behavior () + (add-setting! 'music-volume 'rel (-> self music-volume-movie) 0) + (add-setting! 'sfx-volume 'rel (-> self sfx-volume-movie) 0) + (cond + ((= (-> self anim-name type) string) + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (abort? self) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= (-> self anim-name type) spool-anim) + (ja-play-spooled-anim + (the-as spool-anim (-> self anim-name)) + (the-as art-joint-anim #f) + (the-as art-joint-anim #f) + (method-of-object self abort?) + (spooler-flags blackout-on-stall) + ) + ) + ) + (go-virtual pov-camera-done-playing) + ) + :post (behavior () + (if (= (-> self anim-name type) string) + (execute-commands-up-to *load-state* (ja-aframe-num 0)) + ) + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate pov-camera-abort (pov-camera) + :virtual #t + :enter (behavior () + (logior! (-> self flags) (pov-camera-flag allow-abort)) + ) + :code (behavior () + (set-blackout-frames (seconds 0.035)) + (suspend) + (suspend) + (go-virtual pov-camera-done-playing) + ) + ) + +;; failed to figure out what this is: +(defstate pov-camera-done-playing (pov-camera) + :virtual #t + :code (behavior () + (while (not (target-released? self)) + (suspend) + ) + (send-event (handle->process (-> self notify-handle)) 'notify 'die) + (suspend) + (suspend) + (cleanup-for-death self) + (deactivate self) + ) + ) + +;; definition for method 28 of type pov-camera +;; WARN: Return type mismatch int vs none. +(defmethod pov-camera-method-28 ((this pov-camera)) + 0 + (none) + ) + +;; definition for method 27 of type pov-camera +;; WARN: Return type mismatch int vs none. +(defmethod set-stack-size! ((this pov-camera)) + (stack-size-set! (-> this main-thread) 512) + 0 + (none) + ) + +;; definition for function pov-camera-init-by-other +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defbehavior pov-camera-init-by-other pov-camera ((arg0 vector) (arg1 skeleton-group) (arg2 string) (arg3 pov-camera-flag) (arg4 process-drawable) (arg5 pair)) + (set-stack-size! self) + (set! (-> *game-info* pov-camera-handle) (process->handle self)) + (set! (-> self flags) arg3) + (set! (-> self command-list) arg5) + (set! (-> self music-volume-movie) 100.0) + (set! (-> self sfx-volume-movie) 100.0) + (if arg4 + (set! (-> self notify-handle) (process->handle arg4)) + (set! (-> self notify-handle) (the-as handle #f)) + ) + (set-time! (-> self debounce-start-time)) + (logclear! (-> self mask) (process-mask actor-pause movie enemy platform projectile)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 quad)) + (when (and (logtest? (-> self flags) (pov-camera-flag inherit-orientation)) arg4) + (let ((v1-22 (if (type? arg4 process-drawable) + arg4 + ) + ) + ) + (quaternion-copy! (-> self root quat) (-> v1-22 root quat)) + ) + ) + (initialize-skeleton self arg1 (the-as pair 0)) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (logior! (-> self skel status) (joint-control-status sync-math)) + (set! (-> self anim-name) arg2) + (cond + ((= (-> arg2 type) string) + (logior! (-> self skel status) (joint-control-status valid-spooled-frame)) + (let ((s5-1 (get-art-by-name (-> self draw art-group) arg2 art-joint-anim))) + (if (not s5-1) + (go process-drawable-art-error arg2) + ) + (ja-channel-set! 1) + (set! (-> self skel root-channel 0 frame-group) s5-1) + ) + ) + ((= (-> arg2 type) spool-anim) + ) + ) + (set! (-> self mask-to-clear) (process-mask movie enemy platform projectile)) + (set! (-> self event-hook) (lambda :behavior pov-camera + ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('mask) + (let ((v0-0 (the-as number (-> arg3 param 0)))) + (set! (-> self mask-to-clear) (the-as process-mask v0-0)) + v0-0 + ) + ) + (('music-movie-volume) + (set! (-> self music-volume-movie) (the-as float (-> arg3 param 0))) + ) + (('sfx-movie-volume) + (set! (-> self sfx-volume-movie) (the-as float (-> arg3 param 0))) + ) + ) + ) + ) + (pov-camera-method-28 self) + (go-virtual pov-camera-startup) + (none) + ) + +;; definition for function othercam-calc +(defun othercam-calc ((arg0 float)) + (set! (-> *camera-other-fov* data) (* 2.0 (atan (/ 14.941477 (* 20.3 arg0)) 1.0))) + ) + +;; failed to figure out what this is: +(defstate othercam-running (othercam) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 object)) + (case message + (('die) + (set! v0-0 #t) + (set! (-> self die?) (the-as symbol v0-0)) + v0-0 + ) + (('joint) + (cond + ((type? (-> block param 0) string) + (let ((v1-7 (the-as joint (get-art-by-name-method + (-> (the-as process-drawable (-> self hand process 0)) draw jgeo) + (the-as string (-> block param 0)) + (the-as type #f) + ) + ) + ) + ) + (when v1-7 + (set! v0-0 (+ (-> v1-7 number) 1)) + (set! (-> self cam-joint-index) (the-as int v0-0)) + v0-0 + ) + ) + ) + ((not (logtest? (-> block param 0) 7)) + (set! v0-0 (/ (the-as int (-> block param 0)) 8)) + (set! (-> self cam-joint-index) (the-as int v0-0)) + v0-0 + ) + ) + ) + (('target) + (set! v0-0 (process->handle (the-as process (-> block param 0)))) + (set! (-> self hand) (the-as handle v0-0)) + v0-0 + ) + (('mask) + (set! v0-0 (-> block param 0)) + (set! (-> self mask-to-clear) (the-as process-mask v0-0)) + v0-0 + ) + ) + ) + :enter (behavior () + (hide-hud-quick #f) + (case (-> self spooling?) + (('logo 'scene-player) + ) + (else + (add-setting! 'process-mask 'set 0.0 (-> self mask-to-clear)) + (add-setting! 'movie (process->ppointer self) 0.0 0) + (if (not (-> self border-value)) + (add-setting! 'border-mode (-> self border-value) 0.0 0) + ) + ) + ) + (set! (-> self had-valid-frame) #f) + (let ((gp-0 (-> self hand process 0))) + (vector<-cspace! + (-> self old-pos) + (-> (the-as process-drawable gp-0) node-list data (-> self cam-joint-index)) + ) + (let ((v1-20 (-> (the-as process-drawable gp-0) node-list data (-> self cam-joint-index) bone transform))) + (vector-normalize-copy! (-> self old-mat-z) (-> v1-20 fvec) -1.0) + ) + ) + (apply-settings *setting-control*) + ) + :exit (behavior () + (remove-setting! 'process-mask) + (apply-settings *setting-control*) + ) + :code (behavior () + (until #f + (let ((s2-0 (-> self hand process 0))) + (when (not s2-0) + (format #t "ERROR: othercam parent invalid~%") + (deactivate self) + ) + (set! (-> *camera-other-root* quad) (-> (the-as process-drawable s2-0) root trans quad)) + (let ((s4-0 (-> (the-as process-drawable s2-0) node-list data (-> self cam-joint-index) bone transform)) + (s3-0 (-> (the-as process-drawable s2-0) node-list data (-> self cam-joint-index) bone scale)) + (gp-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + (s1-0 + (or (!= (-> self spooling?) #t) + (logtest? (-> (the-as process-drawable s2-0) skel status) (joint-control-status valid-spooled-frame)) + ) + ) + ) + (vector<-cspace! s5-0 (-> (the-as process-drawable s2-0) node-list data (-> self cam-joint-index))) + (vector-normalize-copy! gp-0 (-> s4-0 fvec) -1.0) + (cond + ((< (vector-length (-> s4-0 fvec)) 0.1) + (set-blackout-frames (seconds 0.017)) + (if (not (logtest? (-> (the-as process-drawable s2-0) draw status) (draw-control-status no-draw no-draw-temp))) + (format 0 "ERROR: other camera zero matrix!~%") + ) + ) + (s1-0 + (when (not (-> self had-valid-frame)) + (set! (-> self had-valid-frame) #t) + (set! (-> self old-pos quad) (-> s5-0 quad)) + (set! (-> self old-mat-z quad) (-> gp-0 quad)) + ) + (set! (-> *camera-other-trans* quad) (-> s5-0 quad)) + (vector-normalize-copy! (-> *camera-other-matrix* rvec) (-> s4-0 rvec) -1.0) + (set! (-> *camera-other-matrix* rvec w) 0.0) + (vector-normalize-copy! (-> *camera-other-matrix* uvec) (-> s4-0 uvec) 1.0) + (set! (-> *camera-other-matrix* uvec w) 0.0) + (vector-normalize-copy! (-> *camera-other-matrix* fvec) (-> s4-0 fvec) -1.0) + (set! (-> *camera-other-matrix* fvec w) 0.0) + (vector-reset! (-> *camera-other-matrix* trans)) + (set! (-> self fov) (othercam-calc (-> s3-0 x))) + (set! *camera-look-through-other* 2) + (set! (-> self old-pos quad) (-> s5-0 quad)) + (set! (-> self old-mat-z quad) (-> gp-0 quad)) + ) + ) + ) + ) + (suspend) + (let ((a0-27 (-> self hand process 0))) + (when (or (-> self die?) (and (not (-> self survive-anim-end?)) (ja-anim-done? a0-27))) + (let ((gp-1 (current-time))) + (while (and (not (time-elapsed? gp-1 (seconds 60))) + (or (and (-> self entity) (not (is-object-visible? (-> self level) (-> self entity extra vis-id)))) + (< 81920.0 (vector-vector-distance (camera-pos) (-> *math-camera* trans))) + ) + ) + (suspend) + ) + ) + (deactivate self) + ) + ) + ) + #f + ) + ) + +;; definition for function othercam-init-by-other +;; WARN: Return type mismatch int vs none. +(defbehavior othercam-init-by-other othercam ((arg0 pov-camera) (arg1 int) (arg2 symbol) (arg3 symbol)) + (set! (-> self spooling?) arg3) + (case (-> self spooling?) + (('logo) + ) + (else + (set! (-> *game-info* other-camera-handle) (process->handle self)) + ) + ) + (set! (-> self hand) (process->handle arg0)) + (set! (-> self cam-joint-index) arg1) + (logclear! (-> self mask) (process-mask freeze pause menu actor-pause)) + (set! (-> self border-value) #f) + (set! (-> self die?) #f) + (set! (-> self survive-anim-end?) arg2) + (set! (-> self mask-to-clear) (process-mask movie enemy platform projectile)) + (set! (-> self event-hook) (-> othercam-running event)) + (go othercam-running) + 0 + (none) + ) + + + + 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 17afe706d7..7e7c568c05 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 @@ -65,6 +65,7 @@ Contains a reference back to the source object (like a collide-shape or water-co (prim-index uint16 :overlay-at (-> extra-quad 8)) (user16 uint16 :overlay-at (-> extra-quad 10)) (user32 uint32 :overlay-at (-> extra-quad 12)) + (clear-flags uint128 :overlay-at (-> extra-quad 0)) ) ) @@ -103,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 - (collide-cache-prim-method-9 () none) - (collide-cache-prim-method-10 () none) + (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) ) ) @@ -139,7 +140,9 @@ To use it, it must first be 'filled' with geometry. Then you can manually inspec The supported queries are 'line-sphere' (raycast) and 'spheres' (check if intersecting anything). It is not useful for ollision queries against a specific foreground object, like 'am I on top of platform X right now?'." ((num-tris int32) + (num-tris-u32 uint32 :overlay-at num-tris) (num-prims int32) + (num-prims-u32 uint32 :overlay-at num-prims) (ignore-mask pat-surface) (ignore-processes process 2) (collide-box bounding-box :inline) @@ -150,19 +153,19 @@ It is not useful for ollision queries against a specific foreground object, like (tris collide-cache-tri 461 :inline) ) (:methods - (collide-cache-method-9 () none) + (debug-draw (_type_) none) (fill-and-probe-using-line-sphere (_type_ collide-query) float) (fill-and-probe-using-spheres (_type_ collide-query) symbol) - (collide-cache-method-12 () none) + (fill-using-bounding-box (_type_ collide-query) none) (fill-using-line-sphere (_type_ collide-query) none) - (collide-cache-method-14 () none) - (collide-cache-method-15 () none) + (fill-using-spheres (_type_ collide-query) none) + (reset (_type_) none) (probe-using-line-sphere (_type_ collide-query) float) - (collide-cache-method-17 () none) - (collide-cache-method-18 () none) - (collide-cache-method-19 () none) - (collide-cache-method-20 () none) - (collide-cache-method-21 () none) + (probe-using-spheres (_type_ collide-query) symbol) + (fill-from-bg (_type_ (function collide-hash int collide-list collide-query int) (function collide-cache collide-list collide-query none) collide-query) none) + (fill-from-fg-boxes (_type_) none) + (fill-from-fg-line-sphere (_type_ collide-query) none) + (fill-from-water (_type_ water-control) none) (collide-cache-method-22 () none) (collide-cache-method-23 () none) (collide-cache-method-24 () none) diff --git a/test/decompiler/reference/jak3/engine/collide/collide-cache_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-cache_REF.gc new file mode 100644 index 0000000000..8ace03c78f --- /dev/null +++ b/test/decompiler/reference/jak3/engine/collide/collide-cache_REF.gc @@ -0,0 +1,1064 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 15 of type collide-cache +;; WARN: Return type mismatch int vs none. +(defmethod reset ((this collide-cache)) + (set! (-> this num-tris) 0) + (set! (-> this num-prims) 0) + (set! (-> this ignore-processes 0) #f) + (set! (-> this ignore-processes 1) #f) + (set! *already-printed-exeeded-max-cache-tris* #f) + 0 + (none) + ) + +;; definition for method 18 of type collide-cache +;; WARN: Return type mismatch int vs none. +(defmethod fill-from-bg ((this collide-cache) + (arg0 (function collide-hash int collide-list collide-query int)) + (arg1 (function collide-cache collide-list collide-query none)) + (arg2 collide-query) + ) + (set! *already-printed-exeeded-max-cache-tris* #f) + (set! (-> *collide-list* num-items) 0) + (if *collide-list-boxes* + (add-debug-box + #t + (bucket-id debug) + (the-as vector (-> arg2 bbox)) + (-> arg2 bbox max) + (new 'static 'rgba :g #xff :b #xff :a #x80) + ) + ) + (dotimes (s3-0 (-> *level* length)) + (let ((v1-7 (-> *level* level s3-0))) + (if (= (-> v1-7 status) 'active) + (arg0 (-> v1-7 bsp collide-hash) 0 *collide-list* arg2) + ) + ) + ) + (if (> (-> *collide-list* num-items) 0) + (arg1 *collide-cache* *collide-list* arg2) + ) + 0 + (none) + ) + +;; definition for method 21 of type collide-cache +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; WARN: Function (method 21 collide-cache) has a return type of none, but the expression builder found a return statement. +(defmethod fill-from-water ((this collide-cache) (arg0 water-control)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + ) + (init-vf0-vector) + (if (or (not arg0) (zero? arg0)) + (return #f) + ) + (when (= (-> this num-prims) 100) + (if (and (= *cheat-mode* 'debug) (not *display-capture-mode*)) + (format 0 "ERROR: Exceeded max number of collide-cache prims!~%") + ) + (return #f) + ) + (when (< 460 (+ (-> this num-tris) 2)) + (if (and (= *cheat-mode* 'debug) (not *display-capture-mode*)) + (print-exceeded-max-cache-tris) + ) + (return #f) + ) + (if (not (and (logtest? (-> arg0 flags) (water-flag active)) + (logtest? (-> arg0 flags) (water-flag can-ground)) + (logtest? (-> arg0 flags) (water-flag swim-ground under-water)) + (logtest? (water-flag over-water) (-> arg0 flags)) + (not (logtest? (water-flag jump-out) (-> arg0 flags))) + ) + ) + (return #f) + ) + (let ((v1-31 (-> arg0 collide-height))) + (.lvf vf1 (&-> this collide-box min quad)) + (.lvf vf3 (&-> this collide-box max quad)) + (let ((a2-6 (-> this num-prims-u32)) + (a3-4 (the-as (inline-array collide-cache-tri) (-> this tris (-> this num-tris)))) + ) + (.mov vf5 v1-31) + (.add.x.vf vf1 vf0 vf5 :mask #b10) + (set! (-> a3-4 0 clear-flags) (the-as uint128 0)) + (set! (-> a3-4 0 prim-index) a2-6) + (.add.x.vf vf3 vf0 vf5 :mask #b10) + (set! (-> a3-4 1 clear-flags) (the-as uint128 0)) + (set! (-> a3-4 1 prim-index) a2-6) + (.mov.vf vf2 vf1) + (.mov.vf vf4 vf1) + (.add.z.vf vf2 vf0 vf3 :mask #b100) + (.add.x.vf vf4 vf0 vf3 :mask #b1) + (.svf (&-> a3-4 0 vertex 0 quad) vf1) + (.svf (&-> a3-4 0 vertex 1 quad) vf2) + (.svf (&-> a3-4 0 vertex 2 quad) vf3) + (set! (-> a3-4 0 pat) (new 'static 'pat-surface :material (pat-material waterbottom) :nogrind #x1)) + (set! (-> a3-4 0 collide-ptr) arg0) + (.svf (&-> a3-4 1 vertex 0 quad) vf1) + (.svf (&-> a3-4 1 vertex 1 quad) vf3) + (.svf (&-> a3-4 1 vertex 2 quad) vf4) + (set! (-> a3-4 1 pat) (new 'static 'pat-surface :material (pat-material waterbottom))) + (set! (-> a3-4 1 collide-ptr) arg0) + ) + ) + (let ((v1-34 *collide-shape-prim-water*) + (a1-5 (-> this prims (-> this num-prims))) + ) + (set! (-> a1-5 first-tri) (the-as uint (-> this num-tris))) + (set! (-> a1-5 num-tris) (the-as uint 2)) + (set! (-> a1-5 prim) v1-34) + (set! (-> a1-5 ccache) this) + (set! (-> a1-5 prim-core world-sphere quad) (-> v1-34 prim-core world-sphere quad)) + (set! (-> a1-5 prim-core quad 1) (-> v1-34 prim-core quad 1)) + ) + (+! (-> this num-prims) 1) + (+! (-> this num-tris) 2) + 0 + (none) + ) + ) + +;; definition for method 12 of type collide-cache +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod fill-using-bounding-box ((this collide-cache) (arg0 collide-query)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (+! (-> *collide-stats* calls) 1) + (new 'static 'vector :x 0.5) + (nop!) + (let ((v1-4 (-> arg0 collide-with-s32))) + (nop!) + (let ((a0-2 (-> arg0 ignore-process0))) + (nop!) + (let ((a1-1 (-> arg0 ignore-process1))) + (nop!) + (let ((a2-0 (-> arg0 ignore-pat-s32))) + (nop!) + (.lvf vf1 (&-> arg0 bbox min quad)) + (nop!) + (.lvf vf2 (&-> arg0 bbox max quad)) + (nop!) + (set! (-> this ignore-processes 0) (the-as process a0-2)) + (nop!) + (set! (-> this ignore-processes 1) (the-as process a1-1)) + (.mov.vf vf1 vf0 :mask #b1000) + (nop!) + (.mov.vf vf2 vf0 :mask #b1000) + (set! (-> this ignore-mask) (the-as pat-surface a2-0)) + ) + ) + ) + (.ftoi.vf vf3 vf1) + (nop!) + (.ftoi.vf vf4 vf2) + (set! (-> this num-tris) 0) + (nop!) + (.svf (&-> this collide-box min quad) vf1) + (nop!) + (.svf (&-> this collide-box max quad) vf2) + (nop!) + (.svf (&-> this collide-box4w min quad) vf3) + (nop!) + (.svf (&-> this collide-box4w max quad) vf4) + (nop!) + (.svf (&-> arg0 bbox4w min quad) vf3) + (nop!) + (.svf (&-> arg0 bbox4w max quad) vf4) + (nop!) + (set! (-> this num-prims) 0) + (nop!) + (set! (-> this collide-with) (the-as collide-spec v1-4)) + ) + 0 + (when (logtest? (-> arg0 collide-with) (collide-spec backgnd)) + (fill-from-bg + this + (the-as + (function collide-hash int collide-list collide-query int) + (method-of-type collide-hash drawable-method-11) + ) + collide-list-fill-bg-using-box + arg0 + ) + (dotimes (s4-0 (-> *level* length)) + (let ((v1-15 (-> *level* level s4-0))) + (when (= (-> v1-15 status) 'active) + (let ((a0-6 (-> v1-15 bsp hfrag-drawable))) + (if (nonzero? a0-6) + (hfragment-method-17 (the-as hfragment a0-6) this arg0) + ) + ) + ) + ) + ) + (let ((a0-7 (-> this num-tris))) + (when (> a0-7 0) + (let ((v1-22 (-> this prims)) + (a1-9 *collide-shape-prim-backgnd*) + ) + (set! (-> v1-22 0 num-tris) (the-as uint a0-7)) + (set! (-> v1-22 0 prim) a1-9) + (set! (-> this num-prims) 1) + (set! (-> v1-22 0 first-tri) (the-as uint 0)) + (set! (-> v1-22 0 ccache) this) + (set! (-> v1-22 0 prim-core world-sphere quad) (-> a1-9 prim-core world-sphere quad)) + (set! (-> v1-22 0 prim-core quad 1) (-> a1-9 prim-core quad 1)) + ) + ) + ) + (+! (-> *collide-stats* output) (-> this num-tris)) + ) + (when (logtest? (-> arg0 collide-with) (collide-spec water)) + (let ((v1-29 (-> arg0 ignore-process0))) + (if v1-29 + (fill-from-water this (-> (the-as process-drawable v1-29) water)) + ) + ) + ) + (if (logtest? (-> arg0 collide-with) (collide-spec hit-by-player-list hit-by-others-list player-list)) + (fill-from-fg-boxes this) + ) + 0 + (none) + ) + ) + +;; definition for method 13 of type collide-cache +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod fill-using-line-sphere ((this collide-cache) (arg0 collide-query)) + (local-vars (v1-11 float) (v1-20 float)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf12 :class vf) + (vf13 :class vf) + (vf14 :class vf) + (vf15 :class vf) + (vf16 :class vf) + (vf17 :class vf) + (vf18 :class vf) + (vf19 :class vf) + (vf2 :class vf) + (vf20 :class vf) + (vf22 :class vf) + (vf23 :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) + (+! (-> *collide-stats* calls) 1) + (let ((v1-3 0)) + (if (< (fabs (-> arg0 move-dist x)) 4096.0) + (+! v1-3 1) + ) + (if (< (fabs (-> arg0 move-dist y)) 4096.0) + (+! v1-3 1) + ) + (if (< (fabs (-> arg0 move-dist z)) 4096.0) + (+! v1-3 1) + ) + (when (< 1 v1-3) + (set-from-point-offset-pad! (-> arg0 bbox) (-> arg0 start-pos) (-> arg0 move-dist) (-> arg0 radius)) + (fill-using-bounding-box this arg0) + (b! #t cfg-55 :delay (nop!)) + (the-as none 0) + ) + ) + (nop!) + (let ((v1-10 (-> arg0 ignore-pat-s32))) + (nop!) + (let ((a0-14 (-> arg0 ignore-process0))) + (nop!) + (let ((a1-3 (-> arg0 ignore-process1))) + (nop!) + (let ((a2-1 (-> arg0 collide-with-s32))) + (nop!) + (.lvf vf9 (&-> arg0 exit-planes 0 quad)) + (nop!) + (.lvf vf3 (&-> arg0 move-dist quad)) + (nop!) + (.mov.vf vf13 vf0) + (nop!) + (.lvf vf1 (&-> arg0 start-pos quad)) + (.mul.vf vf8 vf3 vf3) + (nop!) + (.add.vf vf2 vf1 vf3) + (set! (-> this ignore-mask) (the-as pat-surface v1-10)) + (.add.y.vf vf8 vf8 vf8 :mask #b1) + (set! (-> this num-tris) 0) + (.min.vf vf4 vf1 vf2) + (set! (-> this num-prims) 0) + (.max.vf vf5 vf1 vf2) + (set! (-> this collide-with) (the-as collide-spec a2-1)) + ) + (.sub.w.vf vf10 vf0 vf9 :mask #b111) + (set! (-> this ignore-processes 0) (the-as process a0-14)) + (.add.z.vf vf8 vf8 vf8 :mask #b1) + (set! (-> this ignore-processes 1) (the-as process a1-3)) + ) + ) + ) + (.sub.w.vf vf4 vf4 vf9 :mask #b111) + (nop!) + (.add.w.vf vf5 vf5 vf9 :mask #b111) + (nop!) + (.ftoi.vf vf15 vf10) + (nop!) + (.isqrt.vf Q vf0 vf8 :fsf #b11 :ftf #b0) + (nop!) + (.add.w.vf vf11 vf0 vf9 :mask #b111) + (nop!) + (nop!) + (nop!) + (nop!) + (.svf (&-> arg0 local-box4w min quad) vf15) + (.ftoi.vf vf6 vf4) + (.svf (&-> this collide-box min quad) vf4) + (.ftoi.vf vf7 vf5) + (.svf (&-> this collide-box max quad) vf5) + (nop!) + (.svf (&-> arg0 bbox min quad) vf4) + (nop!) + (.svf (&-> arg0 bbox max quad) vf5) + (nop!) + (.svf (&-> this collide-box4w min quad) vf6) + (nop!) + (.svf (&-> this collide-box4w max quad) vf7) + (nop!) + (.svf (&-> arg0 bbox4w min quad) vf6) + (nop!) + (.svf (&-> arg0 bbox4w max quad) vf7) + (.wait.vf) + (nop!) + (.add.vf vf8 vf0 Q :mask #b1) + (nop!) + (.mul.x.vf vf12 vf3 vf8) + (nop!) + (.nop.vf) + (nop!) + (.div.vf Q vf0 vf8 :fsf #b11 :ftf #b0) + (nop!) + (.mul.vf vf22 vf12 vf12) + (nop!) + (.abs.vf vf23 vf12) + (nop!) + (.add.y.vf vf22 vf22 vf22 :mask #b1) + (.mov v1-11 vf23) + (.wait.vf) + (nop!) + (.add.vf vf8 vf0 Q :mask #b1) + (nop!) + (b! (zero? v1-11) cfg-12 :likely-delay (.add.z.vf vf13 vf0 vf12 :mask #b1)) + (.sub.y.vf vf13 vf0 vf12 :mask #b1) + (nop!) + (.isqrt.vf Q vf0 vf22 :fsf #b11 :ftf #b0) + (nop!) + (.add.x.vf vf13 vf0 vf12 :mask #b10) + (nop!) + (.wait.vf) + (nop!) + (.mul.vf vf13 vf13 Q :mask #b11) + (nop!) + (label cfg-12) + (.outer.product.a.vf acc vf12 vf13) + (nop!) + (.add.x.vf vf11 vf11 vf8 :mask #b1) + (nop!) + (.outer.product.b.vf vf14 vf13 vf12 acc) + (nop!) + (.ftoi.vf vf16 vf11) + (nop!) + (.mov.vf vf17 vf12) + (nop!) + (.mov.vf vf18 vf13) + (nop!) + (.mov.vf vf19 vf14) + (nop!) + (.mov.vf vf17 vf0 :mask #b1110) + (.svf (&-> arg0 local-box4w max quad) vf16) + (.mov.vf vf18 vf0 :mask #b1101) + (nop!) + (.mov.vf vf19 vf0 :mask #b1011) + (nop!) + (.add.x.vf vf17 vf17 vf13 :mask #b10) + (nop!) + (.add.y.vf vf18 vf18 vf12 :mask #b1) + (nop!) + (.add.z.vf vf19 vf19 vf12 :mask #b1) + (nop!) + (.add.x.vf vf17 vf17 vf14 :mask #b100) + (nop!) + (.add.y.vf vf18 vf18 vf14 :mask #b100) + (nop!) + (.add.z.vf vf19 vf19 vf13 :mask #b10) + (nop!) + (.mul.x.vf acc vf17 vf1) + (nop!) + (.add.mul.y.vf acc vf18 vf1 acc) + (.svf (&-> arg0 inv-mat rvec quad) vf17) + (.add.mul.z.vf vf20 vf19 vf1 acc) + (.svf (&-> arg0 inv-mat uvec quad) vf18) + (.sub.vf vf20 vf0 vf20) + (.svf (&-> arg0 inv-mat fvec quad) vf19) + (nop!) + (.svf (&-> arg0 inv-mat trans quad) vf20) + (set! (-> arg0 rlength x) (if (= (-> arg0 move-dist x) 0.0) + 0.0 + (/ 1.0 (-> arg0 move-dist x)) + ) + ) + (set! (-> arg0 rlength y) (if (= (-> arg0 move-dist y) 0.0) + 0.0 + (/ 1.0 (-> arg0 move-dist y)) + ) + ) + (set! (-> arg0 rlength z) (if (= (-> arg0 move-dist z) 0.0) + 0.0 + (/ 1.0 (-> arg0 move-dist z)) + ) + ) + (let ((f0-19 1.0)) + (.lvf vf1 (&-> (-> arg0 move-dist) 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-20 vf1) + (set! (-> arg0 rlength w) (/ f0-19 v1-20)) + ) + (set! (-> arg0 exit-planes 0 x) (if (< 0.0 (-> arg0 move-dist x)) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (set! (-> arg0 exit-planes 0 y) (if (< 0.0 (-> arg0 move-dist y)) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (set! (-> arg0 exit-planes 0 z) (if (< 0.0 (-> arg0 move-dist z)) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (set! (-> arg0 exit-planes 1 x) (if (< (-> arg0 move-dist x) 0.0) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (set! (-> arg0 exit-planes 1 y) (if (< (-> arg0 move-dist y) 0.0) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (set! (-> arg0 exit-planes 1 z) (if (< (-> arg0 move-dist z) 0.0) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (when (logtest? (-> arg0 collide-with) (collide-spec backgnd)) + (fill-from-bg + this + (the-as + (function collide-hash int collide-list collide-query int) + (method-of-type collide-hash drawable-method-12) + ) + collide-list-fill-bg-using-line-sphere + arg0 + ) + (dotimes (s4-0 (-> *level* length)) + (let ((v1-36 (-> *level* level s4-0))) + (when (= (-> v1-36 status) 'active) + (let ((a0-18 (-> v1-36 bsp hfrag-drawable))) + (if (nonzero? a0-18) + (hfragment-method-18 (the-as hfragment a0-18) this arg0) + ) + ) + ) + ) + ) + (let ((a0-19 (-> this num-tris))) + (when (> a0-19 0) + (let ((v1-43 (-> this prims)) + (a1-11 *collide-shape-prim-backgnd*) + ) + (set! (-> v1-43 0 num-tris) (the-as uint a0-19)) + (set! (-> v1-43 0 prim) a1-11) + (set! (-> this num-prims) 1) + (set! (-> v1-43 0 first-tri) (the-as uint 0)) + (set! (-> v1-43 0 ccache) this) + (set! (-> v1-43 0 prim-core world-sphere quad) (-> a1-11 prim-core world-sphere quad)) + (set! (-> v1-43 0 prim-core quad 1) (-> a1-11 prim-core quad 1)) + ) + ) + ) + (+! (-> *collide-stats* output) (-> this num-tris)) + ) + (when (logtest? (-> arg0 collide-with) (collide-spec water)) + (let ((a1-13 (-> (the-as process-drawable (-> arg0 ignore-process0)) water))) + (if (nonzero? a1-13) + (fill-from-water this a1-13) + ) + ) + ) + (if (logtest? (-> arg0 collide-with) (collide-spec hit-by-player-list hit-by-others-list player-list)) + (fill-from-fg-line-sphere this arg0) + ) + 0 + (label cfg-55) + (none) + ) + ) + +;; definition for method 19 of type collide-cache +;; WARN: Return type mismatch int vs none. +(defmethod fill-from-fg-boxes ((this collide-cache)) + (let ((s5-0 (-> this collide-with))) + (set! *actor-list-length* 0) + (if (logtest? s5-0 (collide-spec hit-by-others-list)) + (set! *actor-list-length* (add-an-object *actor-hash* (-> this collide-box) *actor-list* 256)) + ) + (when (logtest? s5-0 (collide-spec player-list)) + (let ((a0-2 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((v1-13 (-> 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? s5-0 (-> a1-1 prim-core collide-as)) + (let ((a1-2 (-> a1-1 prim-core))) + (when (and (>= (+ (-> a1-2 world-sphere x) (-> a1-2 world-sphere w)) (-> this collide-box min x)) + (>= (-> this collide-box max x) (- (-> a1-2 world-sphere x) (-> a1-2 world-sphere w))) + (>= (+ (-> a1-2 world-sphere y) (-> a1-2 world-sphere w)) (-> this collide-box min y)) + (>= (-> this collide-box max y) (- (-> a1-2 world-sphere y) (-> a1-2 world-sphere w))) + (>= (+ (-> a1-2 world-sphere z) (-> a1-2 world-sphere w)) (-> this collide-box min z)) + (>= (-> this collide-box max z) (- (-> a1-2 world-sphere z) (-> a1-2 world-sphere w))) + ) + (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-13) + *collide-player-list* + (set! v1-13 (-> v1-13 next0)) + ) + ) + ) + ) + (when (logtest? s5-0 (collide-spec hit-by-player-list)) + (let ((a0-5 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((v1-21 (-> 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? s5-0 (-> a1-13 prim-core collide-as)) + (let ((a1-14 (-> a1-13 prim-core))) + (when (and (>= (+ (-> a1-14 world-sphere x) (-> a1-14 world-sphere w)) (-> this collide-box min x)) + (>= (-> this collide-box max x) (- (-> a1-14 world-sphere x) (-> a1-14 world-sphere w))) + (>= (+ (-> a1-14 world-sphere y) (-> a1-14 world-sphere w)) (-> this collide-box min y)) + (>= (-> this collide-box max y) (- (-> a1-14 world-sphere y) (-> a1-14 world-sphere w))) + (>= (+ (-> a1-14 world-sphere z) (-> a1-14 world-sphere w)) (-> this collide-box min z)) + (>= (-> this collide-box max z) (- (-> a1-14 world-sphere z) (-> a1-14 world-sphere w))) + ) + (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-21) + *collide-hit-by-player-list* + (set! v1-21 (-> v1-21 next0)) + ) + ) + ) + ) + (dotimes (s4-0 *actor-list-length*) + (let ((v1-26 (-> *actor-list* s4-0))) + (when (logtest? s5-0 (-> v1-26 root-prim prim-core collide-as)) + (let ((a0-13 (-> v1-26 process))) + (if (not (or (= a0-13 (-> this ignore-processes 0)) (= a0-13 (-> this ignore-processes 1)))) + (add-fg-prim-using-box (-> v1-26 root-prim) this) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type collide-shape-prim +;; WARN: Return type mismatch object vs none. +(defmethod add-fg-prim-using-box ((this collide-shape-prim) (arg0 collide-cache)) + (format 0 "ERROR: Illegal collide-shape-prim type passed to collide-shape-prim::add-fg-prim-using-box!~%") + (none) + ) + +;; definition for method 10 of type collide-shape-prim-mesh +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 10 collide-shape-prim-mesh)" 10 collide-shape-prim-mesh) + +;; definition for method 10 of type collide-shape-prim-sphere +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 10 collide-shape-prim-sphere)" 10 collide-shape-prim-sphere) + +;; definition for method 10 of type collide-shape-prim-group +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 10 collide-shape-prim-group)" 10 collide-shape-prim-group) + +;; definition for method 20 of type collide-cache +;; WARN: Return type mismatch int vs none. +(defmethod fill-from-fg-line-sphere ((this collide-cache) (arg0 collide-query)) + (local-vars (v1-9 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 (-> arg0 collide-with))) + (set! *actor-list-length* 0) + (if (logtest? s4-0 (collide-spec hit-by-others-list)) + (set! *actor-list-length* (fill-actor-list-for-sphere + *actor-hash* + (-> arg0 start-pos) + (-> arg0 move-dist) + (-> arg0 radius) + *actor-list* + 256 + -1 + ) + ) + ) + (let ((f30-0 0.0) + (s3-0 (new 'stack-no-clear 'matrix)) + ) + (.lvf vf1 (&-> (-> arg0 move-dist) 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-9 vf1) + (let ((f0-1 v1-9)) + (if (< 0.0 f0-1) + (set! f30-0 (/ 1.0 f0-1)) + ) + ) + (when (logtest? s4-0 (collide-spec player-list)) + (let ((v1-17 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((s2-0 (-> v1-17 next0))) + (while (!= v1-17 (-> *collide-player-list* alive-list-end)) + (let* ((s1-0 (-> (the-as connection v1-17) param1)) + (v1-18 (-> (the-as collide-shape s1-0) root-prim)) + ) + (when (logtest? s4-0 (-> v1-18 prim-core collide-as)) + (let ((s0-0 (-> v1-18 prim-core))) + (vector-! (-> s3-0 uvec) (the-as vector s0-0) (-> arg0 start-pos)) + (let* ((f1-2 (* (vector-dot (-> arg0 move-dist) (-> s3-0 uvec)) f30-0)) + (f0-6 (fmax 0.0 (fmin 1.0 f1-2))) + ) + (vector+float*! (-> s3-0 rvec) (-> arg0 start-pos) (-> arg0 move-dist) f0-6) + ) + (let ((f0-7 (vector-vector-distance-squared (-> s3-0 rvec) (the-as vector s0-0))) + (f1-5 (+ (-> arg0 radius) (-> s0-0 world-sphere w))) + ) + (when (< f0-7 (* f1-5 f1-5)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape s1-0)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! v1-17 s2-0) + *collide-player-list* + (set! s2-0 (-> s2-0 next0)) + ) + ) + ) + ) + (when (logtest? s4-0 (collide-spec hit-by-player-list)) + (let ((v1-38 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((s2-1 (-> v1-38 next0))) + (while (!= v1-38 (-> *collide-hit-by-player-list* alive-list-end)) + (let* ((s1-1 (-> (the-as connection v1-38) param1)) + (v1-39 (-> (the-as collide-shape s1-1) root-prim)) + ) + (when (logtest? s4-0 (-> v1-39 prim-core collide-as)) + (let ((s0-1 (-> v1-39 prim-core))) + (vector-! (-> s3-0 uvec) (the-as vector s0-1) (-> arg0 start-pos)) + (let* ((f1-8 (* (vector-dot (-> arg0 move-dist) (-> s3-0 uvec)) f30-0)) + (f0-11 (fmax 0.0 (fmin 1.0 f1-8))) + ) + (vector+float*! (-> s3-0 rvec) (-> arg0 start-pos) (-> arg0 move-dist) f0-11) + ) + (let ((f0-12 (vector-vector-distance-squared (-> s3-0 rvec) (the-as vector s0-1))) + (f1-11 (+ (-> arg0 radius) (-> s0-1 world-sphere w))) + ) + (when (< f0-12 (* f1-11 f1-11)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape s1-1)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! v1-38 s2-1) + *collide-hit-by-player-list* + (set! s2-1 (-> s2-1 next0)) + ) + ) + ) + ) + ) + (dotimes (s3-1 *actor-list-length*) + (let ((v1-58 (-> *actor-list* s3-1))) + (when (logtest? s4-0 (-> v1-58 root-prim prim-core collide-as)) + (let ((a0-37 (-> v1-58 process))) + (if (not (or (= a0-37 (-> this ignore-processes 0)) (= a0-37 (-> this ignore-processes 1)))) + (add-fg-prim-using-line-sphere (-> v1-58 root-prim) this arg0) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 11 of type collide-shape-prim +;; WARN: Return type mismatch object vs none. +(defmethod add-fg-prim-using-line-sphere ((this collide-shape-prim) (arg0 collide-cache) (arg1 object)) + (format + 0 + "ERROR: Illegal collide-shape-prim type passed to collide-shape-prim::add-fg-prim-using-line-sphere!~%" + ) + (none) + ) + +;; definition for method 11 of type collide-shape-prim-mesh +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 11 collide-shape-prim-mesh)" 11 collide-shape-prim-mesh) + +;; definition for method 11 of type collide-shape-prim-sphere +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 11 collide-shape-prim-sphere)" 11 collide-shape-prim-sphere) + +;; definition for method 11 of type collide-shape-prim-group +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 11 collide-shape-prim-group)" 11 collide-shape-prim-group) + +;; definition for method 10 of type collide-cache +(defmethod fill-and-probe-using-line-sphere ((this collide-cache) (arg0 collide-query)) + (fill-using-line-sphere this arg0) + (probe-using-line-sphere this arg0) + ) + +;; definition of type collide-puls-work +(deftype collide-puls-work (structure) + ((ignore-pat pat-surface) + (bsphere sphere :inline) + (move-dist vector :inline) + ) + ) + +;; definition for method 3 of type collide-puls-work +(defmethod inspect ((this collide-puls-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'collide-puls-work) + (format #t "~1Tignore-pat: ~D~%" (-> this ignore-pat)) + (format #t "~1Tbsphere: #~%" (-> this bsphere)) + (format #t "~1Tmove-dist: #~%" (-> this move-dist)) + (label cfg-4) + this + ) + +;; definition for method 16 of type collide-cache +(defmethod probe-using-line-sphere ((this collide-cache) (arg0 collide-query)) + (rlet ((vf0 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'collide-cache-tri))) + (.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))) + (.mul.w.vf vf3 vf0 vf4 :mask #b1000) + (.svf (&-> s5-0 vertex 2 quad) vf2) + (.svf (&-> s5-0 vertex 1 quad) vf3) + (let ((s4-0 (the-as object (-> this prims))) + (f30-0 -100000000.0) + ) + (countdown (s3-0 (-> this num-prims)) + (when (and (logtest? (-> arg0 collide-with) (-> (the-as collide-cache-prim s4-0) prim-core collide-as)) + (logtest? (-> arg0 action-mask) (-> (the-as collide-cache-prim s4-0) prim-core action)) + ) + (cond + ((>= (-> (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) + f30-0 + (collide-action solid) + ) + ) + ) + (if (>= f0-0 0.0) + (set! f30-0 f0-0) + ) + ) + ) + (else + (when (not (logtest? (-> arg0 ignore-pat) + (-> (the-as collide-shape-prim-sphere (-> (the-as collide-cache-prim s4-0) prim)) pat) + ) + ) + (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) + f30-0 + (collide-action solid) + ) + ) + ) + (if (>= f0-1 0.0) + (set! f30-0 f0-1) + ) + ) + ) + ) + ) + ) + (set! s4-0 (-> (the-as (inline-array collide-cache-prim) s4-0) 1)) + ) + f30-0 + ) + ) + ) + ) + +;; definition of type lsmi-work +(deftype lsmi-work (structure) + ((best-u float) + (orig-best-u float) + (action uint32) + (cquery collide-query :inline) + ) + ) + +;; definition for method 3 of type lsmi-work +(defmethod inspect ((this lsmi-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'lsmi-work) + (format #t "~1Tbest-u: ~f~%" (-> this best-u)) + (format #t "~1Torig-best-u: ~f~%" (-> this orig-best-u)) + (format #t "~1Taction: ~D~%" (-> this action)) + (format #t "~1Tcquery: #~%" (-> this cquery)) + (label cfg-4) + this + ) + +;; definition for method 9 of type collide-cache-prim +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 9 collide-cache-prim)" 9 collide-cache-prim) + +;; definition for method 10 of type collide-cache-prim +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 10 collide-cache-prim)" 10 collide-cache-prim) + +;; definition for method 11 of type collide-cache +(defmethod fill-and-probe-using-spheres ((this collide-cache) (arg0 collide-query)) + (fill-using-spheres this arg0) + (probe-using-spheres this arg0) + ) + +;; definition for method 14 of type collide-cache +(defmethod fill-using-spheres ((this collide-cache) (arg0 collide-query)) + (new 'stack-no-clear 'bounding-box) + (set-from-spheres! + (-> arg0 bbox) + (the-as (inline-array sphere) (-> arg0 best-dist)) + (the-as int (-> arg0 best-other-prim)) + ) + (fill-using-bounding-box this arg0) + (none) + ) + +;; definition for method 17 of type collide-cache +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 17 collide-cache)" 17 collide-cache) + +;; definition for method 9 of type collide-puss-work +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 9 collide-puss-work)" 9 collide-puss-work) + +;; definition for method 10 of type collide-puss-work +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 10 collide-puss-work)" 10 collide-puss-work) + +;; definition for function test-closest-pt-in-triangle +;; INFO: Used lq/sq +;; ERROR: failed type prop at 20: add failed: object + +;; ERROR: Failed to guess stack use for 16 in test-closest-pt-in-triangle:0 +(defun test-closest-pt-in-triangle ((a0-0 collide-cache)) + (local-vars + (v0-0 vector) + (v0-1 vector) + (v0-2 none) + (v0-3 float) + (v0-4 symbol) + (v1-1 int) + (v1-2 vector) + (v1-3 uint128) + (v1-4 symbol) + (v1-5 symbol) + (v1-7 none) + (a0-1 int) + (a0-2 none) + (a0-3 none) + (a0-4 none) + (a0-5 none) + (a0-6 none) + (a1-0 collide-cache-tri) + (a1-1 none) + (a1-2 none) + (a2-0 vector) + (a2-1 collide-cache-tri) + (a3-0 vector) + (a3-1 none) + (s0-0 none) + (s1-0 int) + (s2-0 none) + (s3-0 none) + (s4-0 none) + (s5-0 object) + (t9-0 (function int vector)) + (t9-1 (function vector vector vector vector vector)) + (t9-2 (function vector vector matrix vector none)) + (t9-3 (function vector vector float)) + (gp-0 none) + (sp-0 none) + (f0-0 float) + (f1-0 float) + (f30-0 number) + ) + (set! gp-0 (the-as none (+ sp-0 16))) + (set! v1-1 -1082130432) + (set! f30-0 (gpr->fpr v1-1)) + (set! s5-0 (-> a0-0 tris)) + (set! s4-0 (the-as none (+ sp-0 32))) + (set! s3-0 (the-as none (+ sp-0 48))) + (set! s2-0 (the-as none (+ sp-0 64))) + (set! s1-0 (-> a0-0 num-tris)) + (set! s0-0 (the-as none s4-0)) + (set! t9-0 target-pos) + (set! a0-1 0) + (set! v0-0 (call! a0-1)) + (set! v1-2 v0-0) + (set! v1-3 (-> v1-2 quad)) + (s.q! s0-0 v1-3) + (while (nonzero? s1-0) + (when (begin + (or (begin + (set! s1-0 (+ s1-0 -1)) + (set! t9-1 normal-of-plane) + (set! a0-2 (the-as none s2-0)) + (set! a1-0 (+ s5-0 0)) + (set! a2-0 (+ s5-0 16)) + (set! a3-0 (+ s5-0 32)) + (call! a0-2 a1-0 a2-0 a3-0) + (set! t9-2 closest-pt-in-triangle) + (set! a0-3 (the-as none s3-0)) + (set! a1-1 (the-as none s4-0)) + (set! a2-1 (+ s5-0 0)) + (set! a3-1 (the-as none s2-0)) + (call! a0-3 a1-1 a2-1 a3-1) + (set! t9-3 vector-vector-distance-squared) + (set! a0-4 (the-as none s3-0)) + (set! a1-2 (the-as none s4-0)) + (set! v0-3 (call! a0-4 a1-2)) + (set! f0-0 (gpr->fpr v0-3)) + (set! f1-0 (the-as float 0)) + (set! v1-4 (<.s f30-0 f1-0)) + v1-4 + ) + (set! v1-5 (<.s f0-0 f30-0)) + ) + v1-5 + ) + (set! f30-0 f0-0) + (set! v1-7 (the-as none gp-0)) + (set! a0-5 (the-as none s3-0)) + (set! a0-6 (the-as none (l.q a0-5))) + (s.q! v1-7 a0-6) + (set! v1-8 s5-0) + ) + (set! s5-0 (-> s5-0 1)) + ) + (set! v0-4 #f) + (ret-value v0-4) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/collide/collide-debug_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-debug_REF.gc new file mode 100644 index 0000000000..3fa762f2e5 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/collide/collide-debug_REF.gc @@ -0,0 +1,308 @@ +;;-*-Lisp-*- +(in-package goal) + +;; this file is debug only +(declare-file (debug)) + +;; definition for method 9 of type collide-cache +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this collide-cache)) + (let ((gp-0 (the-as object (-> this tris)))) + (countdown (s4-0 (-> this num-tris)) + (let ((t1-0 (copy-and-set-field (-> *pat-mode-info* (-> (the-as collide-cache-tri gp-0) pat mode) color) a 64))) + (add-debug-flat-triangle + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> (the-as collide-cache-tri gp-0) vertex)) + (-> (the-as collide-cache-tri gp-0) vertex 1) + (-> (the-as collide-cache-tri gp-0) vertex 2) + t1-0 + ) + ) + (set! gp-0 (&+ (the-as collide-cache-tri gp-0) 64)) + ) + ) + (let ((gp-1 (the-as object (-> this prims)))) + (countdown (s5-1 (-> this num-prims)) + (when (= (-> (the-as collide-cache-prim gp-1) prim-core prim-type) -1) + (let ((t0-1 + (copy-and-set-field + (-> *pat-mode-info* + (-> (the-as collide-shape-prim-sphere (-> (the-as collide-shape-prim gp-1) prim-core action)) pat mode) + color + ) + a + 64 + ) + ) + ) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> (the-as collide-cache-prim gp-1) prim-core)) + (-> (the-as collide-cache-prim gp-1) prim-core world-sphere w) + t0-1 + ) + ) + ) + (set! gp-1 (&+ (the-as collide-cache-prim gp-1) 48)) + ) + ) + (print-collide-cache-tri-count) + 0 + (none) + ) + +;; definition of type col-rend-filter +(deftype col-rend-filter (structure) + ((show-pat-set pat-surface) + (show-pat-clear pat-surface) + (event-mask uint32) + ) + ) + +;; definition for method 3 of type col-rend-filter +(defmethod inspect ((this col-rend-filter)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'col-rend-filter) + (format #t "~1Tshow-pat-set: ~D~%" (-> this show-pat-set)) + (format #t "~1Tshow-pat-clear: ~D~%" (-> this show-pat-clear)) + (format #t "~1Tevent-mask: ~D~%" (-> this event-mask)) + (label cfg-4) + this + ) + +;; definition for function col-rend-draw +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defun col-rend-draw ((arg0 col-rend) (arg1 col-rend-filter)) + (let ((s4-0 (new 'stack-no-clear 'matrix))) + (set! (-> s4-0 rvec quad) (-> (math-camera-matrix) fvec quad)) + (vector-normalize! (-> s4-0 rvec) 1.0) + (let ((s3-1 (the-as collide-cache-tri (-> *collide-cache* tris)))) + (countdown (s2-0 (-> *collide-cache* num-tris)) + (vector-3pt-cross! (-> s4-0 uvec) (the-as vector (-> s3-1 vertex)) (-> s3-1 vertex 1) (-> s3-1 vertex 2)) + (vector-normalize! (-> s4-0 uvec) 1.0) + (when (or (-> arg0 show-back-faces?) (>= 0.0 (vector-dot (-> s4-0 rvec) (-> s4-0 uvec)))) + (let ((v1-9 (-> s3-1 pat))) + (cond + ((and (or (zero? (-> arg1 show-pat-set)) (logtest? v1-9 (-> arg1 show-pat-set))) + (or (zero? (-> arg1 show-pat-clear)) (not (logtest? v1-9 (-> arg1 show-pat-clear)))) + (or (zero? (-> arg1 event-mask)) (logtest? (-> arg1 event-mask) (ash 1 (the-as int (-> v1-9 event))))) + ) + (let ((t1-0 (copy-and-set-field (-> *pat-mode-info* (-> v1-9 mode) color) a 64))) + (add-debug-flat-triangle + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> s3-1 vertex)) + (-> s3-1 vertex 1) + (-> s3-1 vertex 2) + t1-0 + ) + ) + (if (-> arg0 outline?) + (add-debug-outline-triangle + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> s3-1 vertex)) + (-> s3-1 vertex 1) + (-> s3-1 vertex 2) + (new 'static 'rgba :r #x10 :g #x10 :b #x10 :a #x80) + ) + ) + (when (-> arg0 show-normals?) + (vector+! (-> s4-0 fvec) (the-as vector (-> s3-1 vertex)) (-> s3-1 vertex 1)) + (vector+! (-> s4-0 fvec) (-> s4-0 fvec) (-> s3-1 vertex 2)) + (vector-float/! (-> s4-0 fvec) (-> s4-0 fvec) 3.0) + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + (-> s4-0 fvec) + (-> s4-0 uvec) + (meters 0.75) + (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + ) + ) + ((-> arg0 ghost-hidden?) + (add-debug-flat-triangle + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> s3-1 vertex)) + (-> s3-1 vertex 1) + (-> s3-1 vertex 2) + (new 'static 'rgba :r #x20 :g #x20 :b #x20 :a #x20) + ) + (if (-> arg0 outline?) + (add-debug-outline-triangle + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> s3-1 vertex)) + (-> s3-1 vertex 1) + (-> s3-1 vertex 2) + (new 'static 'rgba :r #x10 :g #x10 :b #x10 :a #x10) + ) + ) + ) + ) + ) + ) + (&+! s3-1 64) + ) + ) + ) + (let ((s5-1 (the-as object (-> *collide-cache* prims)))) + (countdown (s4-1 (-> *collide-cache* num-prims)) + (when (= (-> (the-as collide-cache-prim s5-1) prim-core prim-type) -1) + (let ((v1-37 (-> (the-as collide-shape-prim-sphere (-> (the-as collide-cache-prim s5-1) prim)) pat))) + (when (and (or (zero? (-> arg1 show-pat-set)) (logtest? v1-37 (-> arg1 show-pat-set))) + (or (zero? (-> arg1 show-pat-clear)) (not (logtest? v1-37 (-> arg1 show-pat-clear)))) + (or (zero? (-> arg1 event-mask)) (logtest? (-> arg1 event-mask) (ash 1 (the-as int (-> v1-37 event))))) + ) + (let ((t0-5 (copy-and-set-field (-> *pat-mode-info* (-> v1-37 mode) color) a 64))) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> (the-as collide-cache-prim s5-1) prim-core)) + (-> (the-as collide-cache-prim s5-1) prim-core world-sphere w) + t0-5 + ) + ) + ) + ) + ) + (set! s5-1 (&+ (the-as collide-cache-prim s5-1) 48)) + ) + ) + (none) + ) + +;; definition for method 9 of type col-rend +;; INFO: Used lq/sq +(defmethod draw ((this col-rend)) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (let ((f30-0 (-> this bbox-radius))) + (let ((v1-0 (-> this track))) + (cond + ((zero? v1-0) + (set! (-> this bbox-center quad) (-> (target-pos 0) quad)) + (+! (-> this bbox-center y) (* 0.7 f30-0)) + ) + ((= v1-0 1) + (position-in-front-of-camera! + (-> this bbox-center) + (+ (-> this camera-to-bbox-dist) (-> this bbox-radius)) + 0.0 + ) + ) + ) + ) + (set! (-> s5-0 bbox min quad) (-> this bbox-center quad)) + (set! (-> s5-0 bbox min x) (- (-> s5-0 bbox min x) f30-0)) + (set! (-> s5-0 bbox min y) (- (-> s5-0 bbox min y) f30-0)) + (set! (-> s5-0 bbox min z) (- (-> s5-0 bbox min z) f30-0)) + (set! (-> s5-0 bbox max quad) (-> this bbox-center quad)) + (+! (-> s5-0 bbox max x) f30-0) + (+! (-> s5-0 bbox max y) f30-0) + (+! (-> s5-0 bbox max z) f30-0) + ) + (let ((v1-9 -1)) + (let ((a0-9 (-> this cspec))) + (if (not (logtest? a0-9 (collide-spec crate))) + (set! v1-9 (logxor v1-9 1)) + ) + (if (not (logtest? a0-9 (collide-spec civilian))) + (set! v1-9 (logxor v1-9 64)) + ) + (if (not (logtest? a0-9 (collide-spec enemy))) + (set! v1-9 (logxor #x100000 v1-9)) + ) + (if (not (logtest? a0-9 (collide-spec obstacle))) + (set! v1-9 (logxor v1-9 2)) + ) + (if (not (logtest? a0-9 (collide-spec vehicle-sphere))) + (set! v1-9 (logand #x100743 v1-9)) + ) + ) + (set! (-> s5-0 collide-with) (the-as collide-spec v1-9)) + ) + (set! (-> s5-0 ignore-pat) (new 'static 'pat-surface)) + (set! (-> s5-0 ignore-process0) #f) + (set! (-> s5-0 ignore-process1) #f) + (add-debug-box + #t + (bucket-id debug) + (the-as vector (-> s5-0 bbox)) + (-> s5-0 bbox max) + (if (logtest? (current-time) 128) + (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x20) + (new 'static 'rgba :a #x20) + ) + ) + (fill-using-bounding-box *collide-cache* s5-0) + ) + (let ((s5-1 (-> this show-only)) + (a1-17 (new 'stack 'col-rend-filter)) + ) + (when (nonzero? s5-1) + (cond + ((logtest? s5-1 8) + (set! (-> a1-17 show-pat-clear) (new 'static 'pat-surface :noboard #x1)) + ) + ((logtest? s5-1 16) + (set! (-> a1-17 show-pat-clear) (new 'static 'pat-surface :nogrind #x1)) + ) + ((logtest? s5-1 32) + (set! (-> a1-17 show-pat-clear) (new 'static 'pat-surface :nogrind #x1)) + (set! (-> a1-17 show-pat-set) (new 'static 'pat-surface :nojak #x1 :board #x1)) + ) + (else + (if (logtest? s5-1 8192) + (logior! (-> a1-17 show-pat-set) (new 'static 'pat-surface :nolineofsight #x1)) + ) + (if (logtest? s5-1 1024) + (set! (-> a1-17 show-pat-set noentity) 1) + ) + (if (logtest? s5-1 64) + (set! (-> a1-17 show-pat-set noboard) 1) + ) + (if (logtest? s5-1 2048) + (set! (-> a1-17 show-pat-set nogrind) 1) + ) + (if (logtest? s5-1 128) + (set! (-> a1-17 show-pat-set nocamera) 1) + ) + (if (logtest? s5-1 4096) + (set! (-> a1-17 show-pat-set nojak) 1) + ) + (if (logtest? s5-1 256) + (set! (-> a1-17 show-pat-set noedge) 1) + ) + (if (logtest? s5-1 #x8000) + (set! (-> a1-17 show-pat-set nopilot) 1) + ) + (if (logtest? s5-1 512) + (logior! (-> a1-17 show-pat-set) (new 'static 'pat-surface :noendlessfall #x1)) + ) + (if (logtest? s5-1 #x4000) + (logior! (-> a1-17 show-pat-set) (new 'static 'pat-surface :nomech #x1)) + ) + (if (logtest? #x10000 s5-1) + (logior! (-> a1-17 show-pat-set) (new 'static 'pat-surface :noproj #x1)) + ) + (if (logtest? #x40000 s5-1) + (logior! (-> a1-17 show-pat-set) (new 'static 'pat-surface :probe #x1)) + ) + (if (logtest? #x20000 s5-1) + (logior! (-> a1-17 event-mask) 64) + ) + ) + ) + ) + (col-rend-draw this a1-17) + ) + (none) + ) diff --git a/test/decompiler/reference/jak3/engine/collide/collide-edge-grab-h_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-edge-grab-h_REF.gc index ae72824f85..46289e7be4 100644 --- a/test/decompiler/reference/jak3/engine/collide/collide-edge-grab-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/collide/collide-edge-grab-h_REF.gc @@ -49,7 +49,7 @@ ) (:methods (edge-grab-info-method-9 (_type_) symbol) - (edge-grab-info-method-10 () none) + (edge-grab-info-method-10 (_type_) none) ) ) @@ -114,7 +114,7 @@ (edge-vec-norm vector :inline) ) (:methods - (collide-edge-edge-method-9 () none) + (no-collision-at-edge (_type_ collide-edge-work edge-grab-info) symbol) ) ) @@ -171,8 +171,8 @@ (attempts qword 32 :inline) ) (:methods - (collide-edge-hold-list-method-9 () none) - (collide-edge-hold-list-method-10 () none) + (debug-draw (_type_) object) + (add-to-list! (_type_ collide-edge-hold-item) none) ) ) @@ -257,18 +257,18 @@ (hold-list collide-edge-hold-list :inline) ) (:methods - (collide-edge-work-method-9 () none) - (collide-edge-work-method-10 () none) - (collide-edge-work-method-11 () none) - (collide-edge-work-method-12 () none) - (collide-edge-work-method-13 () none) - (collide-edge-work-method-14 () none) - (collide-edge-work-method-15 () none) - (collide-edge-work-method-16 () none) - (collide-edge-work-method-17 () none) - (collide-edge-work-method-18 () none) - (collide-edge-work-method-19 () none) - (collide-edge-work-method-20 () none) + (search-for-edges (_type_ collide-edge-hold-list) none) + (debug-draw-edges (_type_) object) + (debug-draw-tris (_type_) none) + (debug-draw-sphere (_type_) none) + (find-adjacent-edge (_type_ collide-edge-hold-item edge-grab-info) none) + (compute-center-point! (_type_ collide-edge-edge vector) float) + (get-best-hand-point (_type_ vector vector int) float) + (find-grabbable-edges (_type_) none) + (find-grabbable-tris (_type_) none) + (should-add-to-list? (_type_ collide-edge-hold-item collide-edge-edge) symbol) + (find-best-grab! (_type_ collide-edge-hold-list edge-grab-info) symbol) + (check-grab-for-collisions (_type_ collide-edge-hold-item edge-grab-info) symbol) ) ) 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 new file mode 100644 index 0000000000..05399735eb --- /dev/null +++ b/test/decompiler/reference/jak3/engine/collide/collide-edge-grab_REF.gc @@ -0,0 +1,795 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 28 of type target +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; WARN: Function (method 28 target) has a return type of none, but the expression builder found a return statement. +(defmethod target-method-28 ((this target) (arg0 collide-cache) (arg1 collide-edge-spec)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (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 num-verts) (the-as uint 0)) + (set! (-> s5-0 num-edges) (the-as uint 0)) + (set! (-> s5-0 num-tris) (the-as uint 0)) + (let ((v1-3 (-> this control))) + (set! (-> s5-0 ccache) arg0) + (.lvf vf1 (&-> s5-0 spec local-cache-fill-box min quad)) + (.lvf vf2 (&-> s5-0 spec local-cache-fill-box max quad)) + (set! (-> s5-0 cshape) v1-3) + (.lvf vf3 (&-> v1-3 trans quad)) + ) + (.add.vf vf1 vf1 vf3 :mask #b111) + (.add.vf vf2 vf2 vf3 :mask #b111) + (.svf (&-> s5-0 cache-fill-box min quad) vf1) + (.svf (&-> s5-0 cache-fill-box max quad) vf2) + (.lvf vf4 (&-> s5-0 spec local-within-reach-box min quad)) + (.lvf vf5 (&-> s5-0 spec local-within-reach-box max quad)) + (.add.vf vf4 vf4 vf3 :mask #b111) + (.add.vf vf5 vf5 vf3 :mask #b111) + (.ftoi.vf vf6 vf4) + (.ftoi.vf vf7 vf5) + (.svf (&-> s5-0 within-reach-box min quad) vf4) + (.svf (&-> s5-0 within-reach-box max quad) vf5) + (.svf (&-> s5-0 within-reach-box4w min quad) vf6) + (.svf (&-> s5-0 within-reach-box4w max quad) vf7) + (let ((s3-0 (new 'stack-no-clear 'collide-query))) + (set! (-> s3-0 collide-with) (-> this control root-prim prim-core collide-with)) + (set! (-> s3-0 ignore-process0) this) + (set! (-> s3-0 ignore-process1) #f) + (set! (-> s3-0 ignore-pat) (-> s5-0 spec ignore-pat)) + (set! (-> s3-0 action-mask) (collide-action solid)) + (mem-copy! (the-as pointer (-> s3-0 bbox)) (the-as pointer (-> s5-0 cache-fill-box)) 32) + (fill-using-bounding-box arg0 s3-0) + ) + (find-grabbable-tris s5-0) + (when (nonzero? (-> s5-0 num-tris)) + (find-grabbable-edges s5-0) + (when (nonzero? (-> s5-0 num-edges)) + (set! (-> s5-0 search-pt quad) (-> this control midpoint-of-hands quad)) + (when (!= (-> *cpad-list* cpads (-> this control cpad number) stick0-speed) 0.0) + (set! (-> s5-0 search-dir-vec quad) (-> this control to-target-pt-xz quad)) + (search-for-edges s5-0 (-> s5-0 hold-list)) + (when (find-best-grab! s5-0 (-> s5-0 hold-list) *edge-grab-info*) + (set! (-> *edge-grab-info* found-edge?) #t) + (if (logtest? (-> s5-0 spec flags) (collide-edge-spec-flags send-event)) + (send-event this 'edge-grab) + ) + (return #f) + ) + ) + (vector-z-quaternion! (-> s5-0 search-dir-vec) (-> this control quat-for-control)) + (search-for-edges s5-0 (-> s5-0 hold-list)) + (when (find-best-grab! s5-0 (-> s5-0 hold-list) *edge-grab-info*) + (set! (-> *edge-grab-info* found-edge?) #t) + (if (logtest? (-> s5-0 spec flags) (collide-edge-spec-flags send-event)) + (send-event this 'edge-grab) + ) + ) + 0 + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 9 of type collide-edge-work +;; WARN: Return type mismatch int vs none. +;; WARN: Function (method 9 collide-edge-work) has a return type of none, but the expression builder found a return statement. +(defmethod search-for-edges ((this collide-edge-work) (arg0 collide-edge-hold-list)) + (set! (-> arg0 num-allocs) (the-as uint 0)) + (set! (-> arg0 num-attempts) (the-as uint 0)) + (set! (-> arg0 head) #f) + (let ((s4-0 (the-as collide-edge-hold-item (-> arg0 items))) + (s3-0 (the-as collide-edge-edge (-> this edges))) + ) + (countdown (s2-0 (-> this num-edges)) + (when (not (-> s3-0 ignore)) + (compute-center-point! this s3-0 (-> s4-0 center-pt)) + (when (should-add-to-list? this s4-0 s3-0) + (add-to-list! arg0 s4-0) + (+! (-> arg0 num-allocs) 1) + (when (= (-> arg0 num-allocs) 32) + (format 0 "ERROR: Reached limit of edge grab hold items!~%") + (return #f) + ) + (&+! s4-0 48) + ) + ) + (&+! s3-0 48) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type collide-edge-hold-list +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 10 collide-edge-hold-list)" 10 collide-edge-hold-list) + +;; definition of type pbhp-stack-vars +(deftype pbhp-stack-vars (structure) + ((edge collide-edge-edge) + (allocated basic) + (neg-hold-pt vector :inline) + (split-vec vector :inline) + ) + ) + +;; definition for method 3 of type pbhp-stack-vars +(defmethod inspect ((this pbhp-stack-vars)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'pbhp-stack-vars) + (format #t "~1Tedge: #~%" (-> this edge)) + (format #t "~1Tallocated: ~A~%" (-> this allocated)) + (format #t "~1Tneg-hold-pt: #~%" (-> this neg-hold-pt)) + (format #t "~1Tsplit-vec: #~%" (-> this split-vec)) + (label cfg-4) + this + ) + +;; definition for method 19 of type collide-edge-work +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 19 collide-edge-work)" 19 collide-edge-work) + +;; definition for method 20 of type collide-edge-work +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs symbol. +(defmethod check-grab-for-collisions ((this collide-edge-work) (arg0 collide-edge-hold-item) (arg1 edge-grab-info)) + (local-vars (sv-656 vector) (sv-672 vector)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let* ((s2-0 (-> arg0 edge)) + (s1-0 (-> s2-0 etri ctri)) + (s4-0 (-> s1-0 prim-index)) + ) + (let ((s0-0 (new 'stack-no-clear 'vector))) + (let ((a1-1 s0-0)) + (let ((v1-1 (-> arg0 center-pt))) + (let ((a0-1 (-> s2-0 edge-vec-norm))) + (let ((a2-2 1105.92)) + (.mov vf7 a2-2) + ) + (.lvf vf5 (&-> a0-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) + ) + (let ((f0-1 (get-best-hand-point this (-> arg1 right-hand-hold) s0-0 (the-as int s4-0)))) + (if (< 491.52 f0-1) + (return (the-as symbol #f)) + ) + ) + (set! sv-672 s0-0) + (set! sv-656 (-> arg0 center-pt)) + (let ((v0-2 (vector-negate! (new 'stack-no-clear 'vector) (-> s2-0 edge-vec-norm)))) + (let ((v1-8 1105.92)) + (.mov vf7 v1-8) + ) + (.lvf vf5 (&-> v0-2 quad)) + ) + (.lvf vf4 (&-> sv-656 quad)) + (.add.x.vf 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-672 quad) vf6) + (let ((f0-3 (get-best-hand-point this (-> arg1 left-hand-hold) s0-0 (the-as int s4-0)))) + (if (< 491.52 f0-3) + (return (the-as symbol #f)) + ) + ) + ) + (set! (-> arg1 tri-vertex 0 quad) (-> s1-0 vertex 0 quad)) + (set! (-> arg1 world-vertex 4 quad) (-> s1-0 vertex 1 quad)) + (set! (-> arg1 world-vertex 5 quad) (-> s1-0 vertex 2 quad)) + (set! (-> arg1 edge-tri-pat) (-> s1-0 pat)) + (set! (-> arg1 center-hold quad) (-> arg0 center-pt quad)) + (set! (-> arg1 world-vertex 0 quad) (-> s2-0 vertex-ptr 0 0 quad)) + (set! (-> arg1 world-vertex 1 quad) (-> s2-0 vertex-ptr 1 0 quad)) + (set! (-> arg1 hanging-matrix uvec quad) + (-> (the-as collide-shape-moving (-> this process 0 root)) dynam gravity-normal quad) + ) + (vector-normalize! + (vector-! (-> arg1 hanging-matrix fvec) (-> arg1 world-vertex 1) (the-as vector (-> arg1 world-vertex))) + 1.0 + ) + (vector-normalize! + (vector-cross! + (the-as vector (-> arg1 hanging-matrix)) + (-> arg1 hanging-matrix fvec) + (-> arg1 hanging-matrix uvec) + ) + 1.0 + ) + (vector-cross! + (-> arg1 hanging-matrix fvec) + (the-as vector (-> arg1 hanging-matrix)) + (-> arg1 hanging-matrix uvec) + ) + (set! (-> arg1 hanging-matrix trans quad) (-> arg1 center-hold quad)) + (transform-vectors! + (-> arg1 hanging-matrix) + (-> this world-player-spheres) + (-> this spec local-player-spheres) + 12 + ) + (let ((a1-12 (new 'stack-no-clear 'collide-query))) + (let ((v1-28 a1-12)) + (set! (-> v1-28 best-dist) (the-as float (-> this world-player-spheres))) + (set! (-> v1-28 best-other-prim) (the-as collide-shape-prim 12)) + (set! (-> v1-28 collide-with) (-> this cshape root-prim prim-core collide-with)) + (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 best-my-prim) (the-as collide-shape-prim #t)) + (set! (-> v1-28 action-mask) (collide-action solid)) + ) + (if (probe-using-spheres (-> this ccache) a1-12) + (return (the-as symbol #f)) + ) + ) + (set! (-> arg1 status) (the-as uint 0)) + (if (logtest? (-> this spec flags) (collide-edge-spec-flags find-adjacent-edge)) + (find-adjacent-edge this arg0 arg1) + ) + (let* ((v1-41 (the-as object (-> this ccache prims s4-0 prim))) + (a0-44 (-> (the-as collide-shape-prim v1-41) cshape)) + ) + (cond + (a0-44 + (set! (-> arg1 actor-cshape-prim-offset) (- (the-as int v1-41) (the-as uint (the-as int (-> a0-44 process))))) + (set! (-> arg1 actor-handle) (process->handle (-> a0-44 process))) + (let ((a1-19 + (-> a0-44 process node-list data (-> (the-as collide-shape-prim v1-41) transform-index) bone transform) + ) + (s5-1 (new 'stack-no-clear 'matrix)) + ) + (matrix-4x4-inverse! s5-1 a1-19) + (dotimes (s4-1 8) + (vector-matrix*! (-> arg1 local-vertex s4-1) (-> arg1 world-vertex s4-1) s5-1) + ) + ) + ) + (else + (set! (-> arg1 actor-cshape-prim-offset) 0) + (set! (-> arg1 actor-handle) (the-as handle #f)) + ) + ) + ) + ) + (the-as symbol 0) + ) + ) + +;; definition of type faei-stack-vars +(deftype faei-stack-vars (structure) + ((hold-edge-vec-norm vector :inline) + (adj-edge-vec-norm vector :inline) + (found-left? symbol) + (left-dot float) + (found-right? symbol) + (right-dot float) + ) + ) + +;; definition for method 3 of type faei-stack-vars +(defmethod inspect ((this faei-stack-vars)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'faei-stack-vars) + (format #t "~1Thold-edge-vec-norm: #~%" (-> this hold-edge-vec-norm)) + (format #t "~1Tadj-edge-vec-norm: #~%" (-> this adj-edge-vec-norm)) + (format #t "~1Tfound-left?: ~A~%" (-> this found-left?)) + (format #t "~1Tleft-dot: ~f~%" (-> this left-dot)) + (format #t "~1Tfound-right?: ~A~%" (-> this found-right?)) + (format #t "~1Tright-dot: ~f~%" (-> this right-dot)) + (label cfg-4) + this + ) + +;; definition for method 9 of type collide-edge-edge +;; INFO: Used lq/sq +(defmethod no-collision-at-edge ((this collide-edge-edge) (arg0 collide-edge-work) (arg1 edge-grab-info)) + (let ((s4-0 (new 'stack-no-clear 'matrix)) + (s5-0 (new 'stack-no-clear 'inline-array 'sphere 6)) + ) + (dotimes (s2-0 6) + ((method-of-type sphere new) (the-as symbol (-> s5-0 s2-0)) sphere) + ) + (set! (-> s4-0 uvec quad) + (-> (the-as collide-shape-moving (-> arg0 process 0 root)) dynam gravity-normal quad) + ) + (vector-normalize! (vector-! (-> s4-0 fvec) (-> this vertex-ptr 1 0) (-> this vertex-ptr 0 0)) 1.0) + (vector-normalize! (vector-cross! (-> s4-0 rvec) (-> s4-0 fvec) (-> s4-0 uvec)) 1.0) + (vector-cross! (-> s4-0 fvec) (-> s4-0 rvec) (-> s4-0 uvec)) + (vector-average! (-> s4-0 trans) (-> this vertex-ptr 1 0) (-> this vertex-ptr 0 0)) + (transform-vectors! s4-0 s5-0 (-> arg0 spec local-player-spheres) 6) + (let ((a1-11 (new 'stack-no-clear 'collide-query))) + (let ((v1-13 a1-11)) + (set! (-> v1-13 best-dist) (the-as float s5-0)) + (set! (-> v1-13 best-other-prim) (the-as collide-shape-prim 6)) + (set! (-> v1-13 collide-with) (-> arg0 cshape root-prim prim-core collide-with)) + (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 best-my-prim) (the-as collide-shape-prim #t)) + (set! (-> v1-13 action-mask) (collide-action solid)) + ) + (not (probe-using-spheres (-> arg0 ccache) a1-11)) + ) + ) + ) + +;; definition for method 13 of type collide-edge-work +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod find-adjacent-edge ((this collide-edge-work) (arg0 collide-edge-hold-item) (arg1 edge-grab-info)) + (let ((s5-0 (new 'stack-no-clear 'faei-stack-vars))) + (let* ((v1-0 (-> arg0 edge)) + (s3-0 (-> v1-0 vertex-ptr 0 0)) + (s2-0 (-> v1-0 vertex-ptr 1 0)) + (s1-0 (the-as collide-edge-edge (-> this edges))) + ) + (set! (-> s5-0 found-left?) #f) + (set! (-> s5-0 found-right?) #f) + (vector-! (-> s5-0 hold-edge-vec-norm) s2-0 s3-0) + (vector-normalize! (-> s5-0 hold-edge-vec-norm) 1.0) + (countdown (s0-0 (-> this num-edges)) + (when (not (-> s1-0 ignore)) + (let ((v1-6 (-> s1-0 vertex-ptr 1 0))) + (when (= v1-6 s3-0) + (vector-! (-> s5-0 adj-edge-vec-norm) v1-6 (-> s1-0 vertex-ptr 0 0)) + (vector-normalize! (-> s5-0 adj-edge-vec-norm) 1.0) + (let ((f30-0 (vector-dot (-> s5-0 adj-edge-vec-norm) (-> s5-0 hold-edge-vec-norm)))) + (when (and (or (not (-> s5-0 found-left?)) (< (-> s5-0 left-dot) f30-0) (< -0.7 f30-0)) + (no-collision-at-edge s1-0 this arg1) + ) + (set! (-> s5-0 left-dot) f30-0) + (set! (-> s5-0 found-left?) #t) + (set! (-> arg1 adjacent-edge-left-vertex quad) (-> s1-0 vertex-ptr 0 0 quad)) + 0 + ) + ) + ) + ) + (let ((v1-18 (-> s1-0 vertex-ptr 0 0))) + (when (= v1-18 s2-0) + (vector-! (-> s5-0 adj-edge-vec-norm) (-> s1-0 vertex-ptr 1 0) v1-18) + (vector-normalize! (-> s5-0 adj-edge-vec-norm) 1.0) + (let ((f30-1 (vector-dot (-> s5-0 adj-edge-vec-norm) (-> s5-0 hold-edge-vec-norm)))) + (when (and (or (not (-> s5-0 found-right?)) (< (-> s5-0 right-dot) f30-1) (< -0.7 f30-1)) + (no-collision-at-edge s1-0 this arg1) + ) + (set! (-> s5-0 right-dot) f30-1) + (set! (-> s5-0 found-right?) #t) + (set! (-> arg1 adjacent-edge-right-vertex quad) (-> s1-0 vertex-ptr 1 0 quad)) + 0 + ) + ) + ) + ) + ) + (&+! s1-0 48) + ) + ) + (let ((v1-31 (-> arg1 status))) + (if (-> s5-0 found-left?) + (set! v1-31 (logior v1-31 1)) + ) + (if (-> s5-0 found-right?) + (set! v1-31 (logior v1-31 2)) + ) + (set! (-> arg1 status) v1-31) + ) + ) + 0 + (none) + ) + +;; definition for method 9 of type edge-grab-info +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 9 edge-grab-info)" 9 edge-grab-info) + +;; definition for method 17 of type collide-edge-work +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 17 collide-edge-work)" 17 collide-edge-work) + +;; definition for method 16 of type collide-edge-work +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 16 collide-edge-work)" 16 collide-edge-work) + +;; definition for method 15 of type collide-edge-work +;; INFO: Used lq/sq +(defmethod get-best-hand-point ((this collide-edge-work) (arg0 vector) (arg1 vector) (arg2 int)) + (let ((f30-0 -1.0)) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (dotimes (s1-0 (the-as int (-> this num-edges))) + (let ((v1-4 (-> this edges s1-0))) + (when (not (-> v1-4 ignore)) + (when (= (-> v1-4 etri ctri prim-index) arg2) + (let ((f0-0 (vector-segment-distance-point! arg1 (-> v1-4 vertex-ptr 0 0) (-> v1-4 vertex-ptr 1 0) s2-0))) + (when (or (< f30-0 0.0) (< f0-0 f30-0)) + (set! f30-0 f0-0) + (set! (-> arg0 quad) (-> s2-0 quad)) + ) + ) + ) + ) + ) + ) + ) + f30-0 + ) + ) + +;; definition for method 18 of type collide-edge-work +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 18 collide-edge-work)" 18 collide-edge-work) + +;; definition for method 14 of type collide-edge-work +(defmethod compute-center-point! ((this collide-edge-work) (arg0 collide-edge-edge) (arg1 vector)) + (local-vars (v1-1 float) (v1-2 float) (v1-3 float)) + (rlet ((Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf10 :class vf) + (vf11 :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) + (.mov.vf vf7 vf0) + (.lvf vf1 (&-> this search-pt quad)) + (let ((f0-0 0.0)) + (let ((v1-0 (-> arg0 vertex-ptr 0)) + (a0-1 (-> arg0 vertex-ptr 1)) + ) + (.lvf vf2 (&-> v1-0 0 quad)) + (.lvf vf3 (&-> a0-1 0 quad)) + ) + (.sub.vf vf4 vf1 vf2) + (.sub.vf vf5 vf3 vf2) + (.mul.vf vf6 vf5 vf5) + (.add.z.vf vf6 vf6 vf6 :mask #b1) + (.sqrt.vf Q vf6 :ftf #b0) + (nop!) + (.wait.vf) + (nop!) + (.add.vf vf6 vf0 Q :mask #b1) + (.nop.vf) + (.mov v1-1 vf6) + (let ((f1-0 v1-1)) + (.div.vf Q vf0 vf6 :fsf #b11 :ftf #b0) + (.wait.vf) + (nop!) + (.add.vf vf8 vf0 Q :mask #b1) + (.mul.x.vf vf9 vf5 vf8) + (.mov v1-2 vf8) + (.mul.vf vf10 vf9 vf4) + (.add.z.vf vf10 vf10 vf10 :mask #b1) + (let ((f2-0 v1-2)) + (.mov v1-3 vf10) + (let ((f3-0 v1-3)) + (b! (< f3-0 f0-0) cfg-4 :likely-delay (set! f3-0 f0-0)) + (b! (< f1-0 f3-0) cfg-4 :likely-delay (set! f3-0 f1-0)) + (label cfg-4) + (let ((v1-4 (* f3-0 f2-0))) + (.mov vf11 v1-4) + ) + ) + ) + ) + ) + (.mul.x.vf vf7 vf5 vf11 :mask #b111) + (.add.vf vf7 vf7 vf2 :mask #b111) + (.svf (&-> arg1 quad) vf7) + 0.0 + ) + ) + +;; definition for method 10 of type edge-grab-info +;; WARN: Return type mismatch object vs none. +(defmethod edge-grab-info-method-10 ((this edge-grab-info)) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> this world-vertex)) + (-> this world-vertex 1) + (new 'static 'rgba :r #xff :a #x60) + #f + (the-as rgba -1) + ) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> this center-hold) + (meters 0.05) + (new 'static 'rgba :r #xff :g #xff :a #x80) + ) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> this left-hand-hold) + (meters 0.05) + (new 'static 'rgba :r #xff :g #xff :a #x60) + ) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> this right-hand-hold) + (meters 0.05) + (new 'static 'rgba :r #xff :g #xff :a #x60) + ) + (if (logtest? (-> this status) 1) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> this adjacent-edge-left-vertex) + (the-as vector (-> this world-vertex)) + (new 'static 'rgba :r #x80 :a #x60) + #f + (the-as rgba -1) + ) + ) + (if (logtest? (-> this status) 2) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> this world-vertex 1) + (-> this adjacent-edge-right-vertex) + (new 'static 'rgba :r #x80 :a #x60) + #f + (the-as rgba -1) + ) + ) + (add-debug-outline-triangle + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> this tri-vertex)) + (-> this world-vertex 4) + (-> this world-vertex 5) + (new 'static 'rgba :r #xff :a #x30) + ) + (cond + ((nonzero? (-> this actor-cshape-prim-offset)) + (if (handle->process (-> this actor-handle)) + (format *stdcon* "grab: ~A~%" (-> this actor-handle process 0 name)) + (format *stdcon* "grab: invalid handle~%") + ) + ) + (else + (format *stdcon* "grab: ground~%") + ) + ) + (none) + ) + +;; definition for method 10 of type collide-edge-work +;; INFO: Used lq/sq +(defmethod debug-draw-edges ((this collide-edge-work)) + (local-vars (sv-32 (function _varargs_ object))) + (let ((gp-0 0)) + (dotimes (s4-0 (the-as int (-> this num-edges))) + (let* ((v1-3 (-> this edges s4-0)) + (a2-0 (-> v1-3 vertex-ptr 0 0)) + (a3-0 (-> v1-3 vertex-ptr 1 0)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (vector+! s3-0 a2-0 a3-0) + (vector-float*! s3-0 s3-0 0.5) + (cond + ((-> v1-3 ignore) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + a2-0 + a3-0 + (new 'static 'rgba :r #x7f :g #x7f :b #x7f :a #x50) + #f + (the-as rgba -1) + ) + (+! gp-0 1) + gp-0 + ) + (else + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + s3-0 + (-> v1-3 outward) + (meters 0.3) + (new 'static 'rgba :r #xff :a #x80) + ) + (let ((s2-0 add-debug-text-3d) + (s1-0 #t) + (s0-0 577) + ) + (set! sv-32 format) + (let ((a0-10 (clear *temp-string*)) + (a1-4 "~D") + (a2-2 s4-0) + ) + (sv-32 a0-10 a1-4 a2-2) + ) + (s2-0 s1-0 (the-as bucket-id s0-0) *temp-string* s3-0 (font-color white) (the-as vector2h #f)) + ) + ) + ) + ) + ) + (format *stdcon* "found ~D edges (and ~D ignored)~%" (- (-> this num-edges) (the-as uint gp-0)) gp-0) + ) + ) + +;; definition for method 12 of type collide-edge-work +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw-sphere ((this collide-edge-work)) + (dotimes (s5-0 (the-as int (-> this num-verts))) + (let ((a2-0 (-> this verts s5-0))) + (add-debug-sphere #t (bucket-id debug-no-zbuf1) a2-0 (meters 0.2) (new 'static 'rgba :r #xff :g #xff :a #x80)) + ) + ) + 0 + (none) + ) + +;; definition for method 9 of type collide-edge-hold-list +;; INFO: Used lq/sq +(defmethod debug-draw ((this collide-edge-hold-list)) + (let ((s4-0 (-> this head)) + (s5-0 0) + ) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s2-0 #t) + ) + (set! (-> s3-0 quad) (-> *target* control midpoint-of-hands quad)) + (while s4-0 + (+! s5-0 1) + (set! (-> s3-0 y) (-> s4-0 center-pt y)) + (add-debug-sphere #t (bucket-id debug-no-zbuf1) s3-0 (meters 0.1) (new 'static 'rgba :a #x80)) + (cond + (s2-0 + (set! s2-0 #f) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> s4-0 center-pt) + (meters 0.15) + (new 'static 'rgba :r #xff :g #xff :a #x80) + ) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> s4-0 outward-pt) + (meters 0.1) + (new 'static 'rgba :r #xff :a #x80) + ) + ) + (else + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> s4-0 center-pt) + (meters 0.15) + (new 'static 'rgba :r #x7f :g #x7f :a #x40) + ) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> s4-0 outward-pt) + (meters 0.1) + (new 'static 'rgba :r #x7f :a #x40) + ) + ) + ) + (set! s4-0 (-> s4-0 next)) + ) + ) + (format *stdcon* "hold list has ~D item(s)~%" s5-0) + ) + (dotimes (s5-1 (the-as int (-> this num-attempts))) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> this attempts s5-1)) + (meters 0.1) + (new 'static 'rgba :a #x40) + ) + ) + (format *stdcon* "hold list has ~D attempt(s)~%" (-> this num-attempts)) + ) + +;; definition for method 11 of type collide-edge-work +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw-tris ((this collide-edge-work)) + (dotimes (s5-0 (the-as int (-> this num-tris))) + (let* ((v1-3 (-> this tris s5-0 ctri)) + (t1-0 (copy-and-set-field (-> *pat-mode-info* (-> v1-3 pat mode) color) a 64)) + ) + (add-debug-outline-triangle + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> v1-3 vertex)) + (-> v1-3 vertex 1) + (-> v1-3 vertex 2) + t1-0 + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(let ((v1-2 (new 'static 'surface + :name '*no-walk-surface* + :turnv 0.5 + :turnvf 0.5 + :turnvv 1.0 + :turnvvf 1.0 + :tiltv 1.0 + :tiltvf 1.0 + :tiltvv 1.0 + :tiltvvf 1.0 + :transv-max 0.7 + :target-speed 0.7 + :seek0 24576.0 + :seek90 24576.0 + :seek180 24576.0 + :fric 23756.8 + :nonlin-fric-dist 4091904.0 + :slope-slip-angle 16384.0 + :bend-speed 4.0 + :alignv 0.5 + :slope-up-traction 0.9 + :align-speed 1.0 + :flags (surface-flag no-turn-around turn-to-vel) + ) + ) + ) + (set! *no-walk-surface* v1-2) + (set! (-> v1-2 exit-hook) nothing) + (set! (-> v1-2 mult-hook) (the-as (function surface surface surface int none) nothing)) + (set! (-> v1-2 touch-hook) nothing) + (set! (-> v1-2 active-hook) nothing) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/collide/collide-frag_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-frag_REF.gc new file mode 100644 index 0000000000..5bc3806b30 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/collide/collide-frag_REF.gc @@ -0,0 +1,111 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 9 of type drawable-tree-collide-fragment +(defmethod login ((this drawable-tree-collide-fragment)) + "Initialize the object after it is loaded." + this + ) + +;; definition for method 10 of type drawable-tree-collide-fragment +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this drawable-tree-collide-fragment)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + (when *display-render-collision* + (dotimes (s5-0 (-> this length)) + (draw (-> this data s5-0)) + ) + ) + 0 + (none) + ) + +;; definition for method 15 of type drawable-tree-collide-fragment +(defmethod unpack-vis ((this drawable-tree-collide-fragment) (arg0 (pointer int8)) (arg1 (pointer int8))) + arg1 + ) + +;; definition for method 8 of type collide-fragment +;; WARN: Return type mismatch int vs collide-fragment. +(defmethod mem-usage ((this collide-fragment) (usage memory-usage-block) (flags int)) + (let ((s5-0 (if (logtest? flags 1) + 55 + 51 + ) + ) + (s4-0 (-> this mesh)) + ) + (set! (-> usage data s5-0 name) "collide-fragment") + (+! (-> usage data s5-0 count) 1) + (let ((v1-9 (+ (asize-of this) (asize-of s4-0)))) + (+! (-> usage data s5-0 used) v1-9) + (+! (-> usage data s5-0 total) (logand -16 (+ v1-9 15))) + ) + (set! (-> usage data (+ s5-0 1) name) "collision-poly") + (+! (-> usage data (+ s5-0 1) count) (-> s4-0 poly-count)) + (let ((v1-20 (+ (-> s4-0 strip-data-len) (-> s4-0 poly-count)))) + (+! (-> usage data (+ s5-0 1) used) v1-20) + (+! (-> usage data (+ s5-0 1) total) v1-20) + ) + (set! (-> usage data (+ s5-0 2) name) "collision-vertex") + (+! (-> usage data (+ s5-0 2) count) (-> s4-0 vertex-count)) + (let ((v1-29 (* (-> s4-0 vertex-data-qwc) 16))) + (+! (-> usage data (+ s5-0 2) used) v1-29) + (let ((v0-2 (+ (-> usage data (+ s5-0 2) total) v1-29))) + (set! (-> usage data (+ s5-0 2) total) v0-2) + (the-as collide-fragment v0-2) + ) + ) + ) + ) + +;; definition for method 9 of type drawable-inline-array-collide-fragment +(defmethod login ((this drawable-inline-array-collide-fragment)) + "Initialize the object after it is loaded." + this + ) + +;; definition for method 10 of type collide-fragment +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this collide-fragment)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + 0 + (none) + ) + +;; definition for method 10 of type drawable-inline-array-collide-fragment +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this drawable-inline-array-collide-fragment)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + (dotimes (s5-0 (-> this length)) + (let ((s4-0 (-> this data s5-0))) + (if (sphere-cull (-> s4-0 bsphere)) + (draw s4-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 8 of type drawable-inline-array-collide-fragment +(defmethod mem-usage ((this drawable-inline-array-collide-fragment) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-5 32)) + (+! (-> usage data 0 used) v1-5) + (+! (-> usage data 0 total) (logand -16 (+ v1-5 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this data s3-0) usage flags) + ) + this + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/collide/collide-h_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-h_REF.gc index 0414783ba6..d5e09d12dd 100644 --- a/test/decompiler/reference/jak3/engine/collide/collide-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/collide/collide-h_REF.gc @@ -11,7 +11,9 @@ This has both inputs from the user, and collision results." (ignore-process0 process-tree :overlay-at (-> ignore-processes 0)) (ignore-process1 process-tree :overlay-at (-> ignore-processes 1)) (ignore-pat pat-surface) + (ignore-pat-s32 int32 :overlay-at ignore-pat) (collide-with collide-spec) + (collide-with-s32 int32 :overlay-at collide-with) (overlay-params uint32 3 :offset 112) (bbox bounding-box :inline) (bbox4w bounding-box4w :inline) @@ -59,7 +61,7 @@ This has both inputs from the user, and collision results." (format #t "~1Tignore-process1: ~A~%" (-> this ignore-process1)) (format #t "~1Tignore-pat: ~D~%" (-> this ignore-pat)) (format #t "~1Tcollide-with: ~D~%" (-> this collide-with)) - (format #t "~1Toverlay-params[3] @ #x~X~%" (&-> this spheres)) + (format #t "~1Toverlay-params[3] @ #x~X~%" (&-> this best-dist)) (format #t "~1Tbbox: #~%" (-> this bbox)) (format #t "~1Tbbox4w: #~%" (-> this bbox4w)) (format #t "~1Tbsphere: #~%" (-> this bsphere)) @@ -69,14 +71,14 @@ This has both inputs from the user, and collision results." (format #t "~1Texit-planes[2] @ #x~X~%" (-> this exit-planes)) (format #t "~1Tradius: ~f~%" (-> this radius)) (format #t "~1Tinv-mat: #~%" (-> this inv-mat)) - (format #t "~1Tspheres: #x~X~%" (-> this spheres)) + (format #t "~1Tspheres: #x~X~%" (-> this best-dist)) (format #t "~1Tnum-spheres: ~D~%" (-> this best-other-prim)) (format #t "~1Tsolid-only: ~A~%" (-> this best-my-prim)) - (format #t "~1Tbest-dist: ~f~%" (the-as float (-> this spheres))) + (format #t "~1Tbest-dist: ~f~%" (the-as float (-> this best-dist))) (format #t "~1Tbest-other-prim: ~A~%" (-> this best-other-prim)) (format #t "~1Tbest-my-prim: ~A~%" (-> this best-my-prim)) (format #t "~1Tmove-vec: #~%" (-> this move-dist)) - (format #t "~1Tbest-u: ~f~%" (the-as float (-> this spheres))) + (format #t "~1Tbest-u: ~f~%" (the-as float (-> this best-dist))) (format #t "~1Taction-mask: ~D~%" (-> this action-mask)) (format #t "~1Tlocal-box4w: #~%" (-> this local-box4w)) (format #t "~1Tsearch-box: #~%" (-> this search-box)) diff --git a/test/decompiler/reference/jak3/engine/collide/collide-mesh-h_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-mesh-h_REF.gc index b88c763618..114da30f6a 100644 --- a/test/decompiler/reference/jak3/engine/collide/collide-mesh-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/collide/collide-mesh-h_REF.gc @@ -63,13 +63,13 @@ bound to the joint specified by `joint-id`." (tris collide-mesh-tri 1 :inline :offset 32) ) (:methods - (collide-mesh-method-9 () none) - (collide-mesh-method-10 () none) - (collide-mesh-method-11 () none) - (collide-mesh-method-12 () none) - (collide-mesh-method-13 () none) - (collide-mesh-method-14 () none) - (collide-mesh-method-15 () none) + (debug-draw-tris (_type_ process-drawable int) none) + (overlap-test (_type_ collide-mesh-cache-tri vector) symbol) + (should-push-away-test (_type_ collide-mesh-cache-tri collide-tri-result vector float) float) + (sphere-on-platform-test (_type_ collide-mesh-cache-tri collide-tri-result vector float) float) + (unpack-mesh-to-cache! (_type_ (inline-array collide-mesh-cache-tri) matrix) none) + (collide-mesh-math-1 (_type_ object object) none) + (collide-mesh-math-2 (_type_ object object object) none) ) ) @@ -109,7 +109,7 @@ bound to the joint specified by `joint-id`." (format #t "~1Tvertex[3] @ #x~X~%" (-> this vertex)) (format #t "~1Tnormal: ~`vector`P~%" (-> this normal)) (format #t "~1Tbbox4w: #~%" (-> this bbox4w)) - (format #t "~1Tpat: ~D~%" (-> this normal w)) + (format #t "~1Tpat: ~D~%" (-> this pat)) (label cfg-4) this ) @@ -118,7 +118,7 @@ bound to the joint specified by `joint-id`." (deftype collide-mesh-cache-entry (structure) "A foreground mesh collide cache entry." ((mat matrix :inline) - (tris collide-mesh-cache-tri :dynamic) + (tris collide-mesh-cache-tri :inline :dynamic) ) ) @@ -144,10 +144,10 @@ bound to the joint specified by `joint-id`." (data uint8 48000) ) (:methods - (collide-mesh-cache-method-9 () none) + (populate-for-prim-mesh (_type_ collide-shape-prim-mesh) collide-mesh-cache-entry) (is-id? (_type_ int) symbol) (next-id! (_type_) uint) - (collide-mesh-cache-method-12 () none) + (allocate! (_type_ int) collide-mesh-cache-entry) ) ) @@ -192,7 +192,3 @@ bound to the joint specified by `joint-id`." ;; failed to figure out what this is: (kmemclose) - - - - diff --git a/test/decompiler/reference/jak3/engine/collide/collide-mesh_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-mesh_REF.gc new file mode 100644 index 0000000000..9cfa24ad71 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/collide/collide-mesh_REF.gc @@ -0,0 +1,659 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 5 of type collide-mesh +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this collide-mesh)) + (the-as int (+ (-> collide-mesh size) (* (+ (-> this num-tris) -1) 8))) + ) + +;; definition for method 8 of type collide-mesh +;; WARN: Return type mismatch int vs collide-mesh. +(defmethod mem-usage ((this collide-mesh) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 83 (-> usage length))) + (set! (-> usage data 82 name) "collide-mesh") + (+! (-> usage data 82 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 82 used) v1-6) + (+! (-> usage data 82 total) (logand -16 (+ v1-6 15))) + ) + (set! (-> usage length) (max 83 (-> usage length))) + (set! (-> usage data 82 name) "collide-mesh") + (+! (-> usage data 82 count) 1) + (let ((v1-16 (* (-> this num-verts) 16))) + (+! (-> usage data 82 used) v1-16) + (+! (-> usage data 82 total) (logand -16 (+ v1-16 15))) + ) + (the-as collide-mesh 0) + ) + +;; definition for method 9 of type collide-mesh +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw-tris ((this collide-mesh) (arg0 process-drawable) (arg1 int)) + (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) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (the-as object (-> this tris))) + (s4-0 (-> arg0 node-list data arg1 bone transform)) + ) + (countdown (s3-0 (-> this num-tris)) + (let ((a2-1 (new 'stack-no-clear 'vector)) + (a3-0 (new 'stack-no-clear 'vector)) + (t0-0 (new 'stack-no-clear 'vector)) + ) + (.lvf vf4 (&-> s4-0 rvec quad)) + (.lvf vf5 (&-> s4-0 uvec quad)) + (.lvf vf6 (&-> s4-0 fvec quad)) + (.lvf vf7 (&-> s4-0 trans quad)) + (.lvf vf1 (&-> (-> this vertex-data (-> (the-as collide-mesh-tri s5-0) vertex-index 0)) quad)) + (.lvf vf2 (&-> (-> this vertex-data (-> (the-as collide-mesh-tri s5-0) vertex-index 1)) quad)) + (.lvf vf3 (&-> (-> this vertex-data (-> (the-as collide-mesh-tri s5-0) vertex-index 2)) quad)) + (let ((t1-0 (copy-and-set-field (-> *pat-mode-info* (-> (the-as collide-mesh-tri s5-0) pat mode) color) a 16))) + (.mul.w.vf acc vf7 vf0) + (.add.mul.x.vf acc vf4 vf1 acc) + (.add.mul.y.vf acc vf5 vf1 acc) + (.add.mul.z.vf vf1 vf6 vf1 acc) + (.mul.w.vf acc vf7 vf0) + (.add.mul.x.vf acc vf4 vf2 acc) + (.add.mul.y.vf acc vf5 vf2 acc) + (.add.mul.z.vf vf2 vf6 vf2 acc) + (.mul.w.vf acc vf7 vf0) + (.add.mul.x.vf acc vf4 vf3 acc) + (.add.mul.y.vf acc vf5 vf3 acc) + (.add.mul.z.vf vf3 vf6 vf3 acc) + (.svf (&-> a2-1 quad) vf1) + (.svf (&-> a3-0 quad) vf2) + (.svf (&-> t0-0 quad) vf3) + (add-debug-flat-triangle #t (bucket-id debug-no-zbuf1) a2-1 a3-0 t0-0 t1-0) + ) + ) + (set! s5-0 (&+ (the-as collide-mesh-tri s5-0) 8)) + ) + ) + 0 + (none) + ) + ) + +;; definition of type sopt-work +(deftype sopt-work (structure) + ((intersect vector :inline) + (sphere-bbox4w bounding-box4w :inline) + ) + ) + +;; definition for method 3 of type sopt-work +(defmethod inspect ((this sopt-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'sopt-work) + (format #t "~1Tintersect: #~%" (-> this intersect)) + (format #t "~1Tsphere-bbox4w: #~%" (-> this sphere-bbox4w)) + (label cfg-4) + this + ) + +;; definition for method 12 of type collide-mesh +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 12 collide-mesh)" 12 collide-mesh) + +;; definition of type spat-work +(deftype spat-work (structure) + ((intersect vector :inline) + (sphere-bbox4w bounding-box4w :inline) + ) + ) + +;; definition for method 3 of type spat-work +(defmethod inspect ((this spat-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'spat-work) + (format #t "~1Tintersect: #~%" (-> this intersect)) + (format #t "~1Tsphere-bbox4w: #~%" (-> this sphere-bbox4w)) + (label cfg-4) + this + ) + +;; definition for method 11 of type collide-mesh +;; INFO: Used lq/sq +(defmethod should-push-away-test ((this collide-mesh) (arg0 collide-mesh-cache-tri) (arg1 collide-tri-result) (arg2 vector) (arg3 float)) + (local-vars + (v1-0 uint128) + (a0-1 uint128) + (a1-2 uint128) + (a1-3 uint128) + (a1-4 uint128) + (a1-7 pat-surface) + (a2-1 uint128) + (a2-2 uint128) + (a2-4 float) + (a2-5 float) + (a2-7 float) + (f0-0 float) + (f2-1 float) + (f3-0 float) + (f4-0 float) + ) + (rlet ((Q :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 ((s4-0 (new 'stack-no-clear 'spat-work))) + (nop!) + (let ((s3-0 arg0)) + (.lvf vf3 (&-> arg2 quad)) + (nop!) + (let ((s2-0 (-> this num-tris))) + (.sub.w.vf vf12 vf3 vf3) + (nop!) + (.add.w.vf vf13 vf3 vf3) + (nop!) + (.ftoi.vf vf12 vf12) + (nop!) + (.ftoi.vf vf13 vf13) + (nop!) + (.mov v1-0 vf12) + (.svf (&-> s4-0 sphere-bbox4w min quad) vf12) + (.mov a0-1 vf13) + (.svf (&-> s4-0 sphere-bbox4w max quad) vf13) + (until (>= a2-7 f4-0) + (until (> f0-0 f2-1) + (until (>= f3-0 f2-1) + (label cfg-1) + (b! (zero? s2-0) cfg-10 :delay (set! a2-1 (-> s3-0 bbox4w min quad))) + (+! s2-0 -1) + (let ((a1-1 (-> s3-0 bbox4w max quad))) + (.pcgtw a2-2 a2-1 a0-1) + (nop!) + (.pcgtw a1-2 v1-0 a1-1) + ) + (nop!) + (.por a1-3 a2-2 a1-2) + (nop!) + (.ppach a1-4 (the-as uint128 0) a1-3) + (nop!) + (let ((a1-5 (shl (the-as int a1-4) 16))) + (nop!) + (b! (nonzero? a1-5) cfg-1 :likely-delay (set! s3-0 (+ s3-0 96))) + ) + (closest-pt-in-triangle (-> s4-0 intersect) arg2 (the-as matrix (-> s3-0 vertex)) (-> s3-0 normal)) + (.lvf vf2 (&-> s4-0 intersect quad)) + (.lvf vf3 (&-> arg2 quad)) + (.lvf vf1 (&-> s3-0 normal quad)) + (set! v1-0 (-> s4-0 sphere-bbox4w min quad)) + (set! a0-1 (-> s4-0 sphere-bbox4w max quad)) + (.sub.vf vf4 vf3 vf2) + (set! a1-7 (-> s3-0 pat)) + (.mul.vf vf5 vf4 vf1) + (.lvf vf7 (&-> s3-0 vertex 0 quad)) + (.mul.vf vf6 vf4 vf4) + (.lvf vf8 (&-> s3-0 vertex 1 quad)) + (.mov.vf vf1 vf0 :mask #b1000) + (.lvf vf9 (&-> s3-0 vertex 2 quad)) + (.add.x.vf vf5 vf5 vf5 :mask #b10) + (&+! s3-0 96) + (.add.y.vf vf6 vf6 vf6 :mask #b1) + (set! f3-0 arg3) + (.add.z.vf vf5 vf5 vf5 :mask #b10) + (.add.z.vf vf6 vf6 vf6 :mask #b1) + (.sqrt.vf Q vf6 :ftf #b0) + (.mov a2-4 vf5) + (set! f0-0 0.0) + (.wait.vf) + (let ((f1-0 (-> arg2 w))) + (.add.vf vf6 vf0 Q :mask #b1) + (.mov.vf vf10 vf6) + (b! (< (the-as int a2-4) 0) cfg-6 :likely-delay (.sub.vf vf10 vf0 vf10)) + (label cfg-6) + (.mov a2-5 vf10) + (set! f2-1 (- a2-5 f1-0)) + ) + (.div.vf Q vf0 vf6 :fsf #b11 :ftf #b0) + ) + ) + (.wait.vf) + (nop!) + (.mul.vf vf11 vf4 Q) + (set! f4-0 0.707) + (.mul.vf vf5 vf11 vf1) + (.add.y.vf vf5 vf5 vf5 :mask #b1) + (.add.z.vf vf5 vf5 vf5 :mask #b1) + (.mov a2-7 vf5) + ) + ) + ) + ) + (set! arg3 f2-1) + (.svf (&-> arg1 vertex 0 quad) vf7) + (.svf (&-> arg1 vertex 1 quad) vf8) + (.svf (&-> arg1 vertex 2 quad) vf9) + (.svf (&-> arg1 intersect quad) vf2) + (.svf (&-> arg1 normal quad) vf1) + (b! #t cfg-1 :delay (set! (-> arg1 pat) a1-7)) + (label cfg-10) + arg3 + ) + ) + +;; definition for method 14 of type collide-mesh +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 14 collide-mesh)" 14 collide-mesh) + +;; definition for method 15 of type collide-mesh +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 15 collide-mesh)" 15 collide-mesh) + +;; definition for method 9 of type collide-mesh-cache +;; INFO: Used lq/sq +;; ERROR: Unsupported inline assembly instruction kind - [pxor v1, v1, a0] +;; ERROR: Unsupported inline assembly instruction kind - [pxor a0, a0, a1] +;; ERROR: Unsupported inline assembly instruction kind - [pxor a0, a0, a1] +;; ERROR: Unsupported inline assembly instruction kind - [pxor a0, a0, a1] +(defmethod populate-for-prim-mesh ((this collide-mesh-cache) (arg0 collide-shape-prim-mesh)) + (local-vars + (r0-0 uint128) + (v1-7 uint128) + (v1-8 uint128) + (v1-9 uint128) + (v1-11 uint128) + (a0-6 uint128) + (a0-8 uint128) + (a0-10 uint128) + (a0-11 uint128) + (a0-12 uint128) + ) + (let ((s5-0 (-> arg0 cshape process node-list data (-> arg0 transform-index) bone transform)) + (s4-0 (-> arg0 mesh-cache-entry)) + ) + (cond + ((= (-> arg0 mesh-cache-id) (-> this id)) + (let ((v1-6 (-> s5-0 rvec quad)) + (a0-4 (-> s4-0 mat rvec quad)) + ) + (.pxor v1-7 v1-6 a0-4) + ) + (let ((a0-5 (-> s5-0 uvec quad)) + (a1-1 (-> s4-0 mat uvec quad)) + ) + (.pxor a0-6 a0-5 a1-1) + ) + (.por v1-8 v1-7 a0-6) + (let ((a0-7 (-> s5-0 fvec quad)) + (a1-2 (-> s4-0 mat fvec quad)) + ) + (.pxor a0-8 a0-7 a1-2) + ) + (.por v1-9 v1-8 a0-8) + (let ((a0-9 (-> s5-0 trans quad)) + (a1-3 (-> s4-0 mat trans quad)) + ) + (.pxor a0-10 a0-9 a1-3) + ) + (.por a0-11 v1-9 a0-10) + (let ((v1-10 a0-11)) + (.pcpyud a0-12 a0-11 r0-0) + (.por v1-11 a0-12 v1-10) + ) + (when (nonzero? v1-11) + (set! (-> s4-0 mat rvec quad) (-> s5-0 rvec quad)) + (set! (-> s4-0 mat uvec quad) (-> s5-0 uvec quad)) + (set! (-> s4-0 mat fvec quad) (-> s5-0 fvec quad)) + (set! (-> s4-0 mat trans quad) (-> s5-0 trans quad)) + (unpack-mesh-to-cache! (-> arg0 mesh) (-> s4-0 tris) s5-0) + ) + ) + (else + (let ((v1-19 (-> arg0 mesh))) + (when v1-19 + (set! s4-0 (allocate! this (the-as int (+ (* (the-as uint 96) (-> v1-19 num-tris)) 64)))) + (set! (-> arg0 mesh-cache-entry) s4-0) + (cond + (s4-0 + (set! (-> arg0 mesh-cache-id) (-> this id)) + (set! (-> s4-0 mat rvec quad) (-> s5-0 rvec quad)) + (set! (-> s4-0 mat uvec quad) (-> s5-0 uvec quad)) + (set! (-> s4-0 mat fvec quad) (-> s5-0 fvec quad)) + (set! (-> s4-0 mat trans quad) (-> s5-0 trans quad)) + (unpack-mesh-to-cache! (-> arg0 mesh) (-> s4-0 tris) s5-0) + ) + (else + (set! (-> arg0 mesh-cache-id) (the-as uint 0)) + 0 + ) + ) + ) + ) + ) + ) + s4-0 + ) + ) + +;; definition for method 12 of type collide-mesh-cache +;; WARN: Return type mismatch (pointer uint8) vs collide-mesh-cache-entry. +(defmethod allocate! ((this collide-mesh-cache) (arg0 int)) + (local-vars (a1-2 int) (a2-2 int)) + (let* ((v1-0 (+ arg0 15)) + (a1-1 (-> this used-size)) + (v1-1 (/ v1-0 16)) + (a3-0 (-> this data)) + (a2-0 (-> this max-size)) + (v1-2 (* v1-1 16)) + (a3-1 (&+ a3-0 a1-1)) + ) + (let ((t1-0 (- a2-0 (the-as uint v1-2))) + (t0-0 (-> this id)) + ) + (b! (< (the-as int t1-0) 0) cfg-6 :delay (set! a1-2 (the-as int (+ a1-1 v1-2)))) + (b! (>= (the-as int (- a2-0 (the-as uint a1-2))) 0) cfg-5 :delay (set! a2-2 (the-as int (+ t0-0 1)))) + ) + (b! (zero? (the-as uint a2-2)) cfg-4 :likely-delay (set! a2-2 1)) + (label cfg-4) + (set! a1-2 v1-2) + (set! a3-1 (-> this data)) + (set! (-> this id) (the-as uint a2-2)) + (label cfg-5) + (set! (-> this used-size) (the-as uint a1-2)) + (let ((v0-0 a3-1)) + (b! #t cfg-7 :delay (nop!)) + (label cfg-6) + (format 0 "ERROR: Attempted to allocate something bigger than the entire mesh cache!~%") + (set! v0-0 (the-as (pointer uint8) #f)) + (label cfg-7) + (the-as collide-mesh-cache-entry v0-0) + ) + ) + ) + +;; definition for method 13 of type collide-mesh +;; WARN: Return type mismatch int vs none. +;; ERROR: Failed load: (set! vf6 (l.vf (+ (the-as vector a3-0) 16))) at op 37 +(defmethod unpack-mesh-to-cache! ((this collide-mesh) (arg0 (inline-array collide-mesh-cache-tri)) (arg1 matrix)) + (local-vars (t0-2 uint)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :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) + ) + (init-vf0-vector) + (nop!) + (let ((t0-0 #x70000000) + (v1-0 (-> this num-verts)) + ) + (nop!) + (let ((a3-0 (the-as object (-> this vertex-data)))) + (b! (zero? v1-0) cfg-3 :delay (.lvf vf1 (&-> arg1 rvec quad))) + (nop!) + (.lvf vf2 (&-> arg1 uvec quad)) + (let ((t0-1 (the-as object (+ t0-0 -64)))) + (.lvf vf3 (&-> arg1 fvec quad)) + (nop!) + (.lvf vf4 (&-> arg1 trans quad)) + (nop!) + (.lvf vf5 (&-> (the-as (inline-array vector) a3-0) 0 quad)) + (nop!) + (.lvf vf6 (&-> (the-as (inline-array vector) a3-0) 1 quad)) + (nop!) + (.lvf vf7 (&-> (the-as (inline-array vector) a3-0) 2 quad)) + (nop!) + (.lvf vf8 (&-> (the-as (inline-array vector) a3-0) 3 quad)) + (label cfg-2) + (.mul.w.vf acc vf4 vf0) + (set! a3-0 (-> (the-as (inline-array vector) a3-0) 4)) + (.add.mul.x.vf acc vf1 vf5 acc) + (set! t0-1 (-> (the-as (inline-array vector) t0-1) 4)) + (.add.mul.y.vf acc vf2 vf5 acc) + (nop!) + (.add.mul.z.vf vf9 vf3 vf5 acc) + (nop!) + (.mul.w.vf acc vf4 vf0) + (.lvf vf5 (&-> (the-as vector a3-0) quad)) + (.add.mul.x.vf acc vf1 vf6 acc) + (nop!) + (.add.mul.y.vf acc vf2 vf6 acc) + (nop!) + (.add.mul.z.vf vf10 vf3 vf6 acc) + (nop!) + (.mul.w.vf acc vf4 vf0) + (.lvf vf6 (+ (the-as vector a3-0) 16)) + (.add.mul.x.vf acc vf1 vf7 acc) + (nop!) + (.add.mul.y.vf acc vf2 vf7 acc) + (nop!) + (.add.mul.z.vf vf11 vf3 vf7 acc) + (nop!) + (.mul.w.vf acc vf4 vf0) + (.lvf vf7 (+ (the-as vector a3-0) 32)) + (.add.mul.x.vf acc vf1 vf8 acc) + (nop!) + (.add.mul.y.vf acc vf2 vf8 acc) + (nop!) + (.add.mul.z.vf vf12 vf3 vf8 acc) + (nop!) + (nop!) + (.lvf vf8 (+ (the-as vector a3-0) 48)) + (+! v1-0 -4) + (.svf (&-> (the-as (inline-array vector) t0-1) 0 quad) vf9) + (nop!) + (.svf (&-> (the-as (inline-array vector) t0-1) 1 quad) vf10) + (nop!) + (.svf (&-> (the-as (inline-array vector) t0-1) 2 quad) vf11) + (b! (> (the-as int v1-0) 0) cfg-2 :delay (.svf (&-> (the-as (inline-array vector) t0-1) 3 quad) vf12)) + ) + ) + ) + (label cfg-3) + (let ((v1-1 (the-as object (-> this tris)))) + (nop!) + (let ((a2-1 #x70000000) + (a0-1 (-> this num-tris)) + ) + (b! (zero? a0-1) cfg-6 :delay (set! t0-2 (-> (the-as (inline-array collide-mesh-tri) v1-1) 0 vertex-index 0))) + (let* ((a1-1 (-> arg0 -1)) + (a3-1 (-> (the-as (inline-array collide-mesh-tri) v1-1) 0 vertex-index 1)) + (t0-3 (* t0-2 16)) + (t2-0 (-> (the-as (inline-array collide-mesh-tri) v1-1) 0 vertex-index 2)) + (t1-0 (* a3-1 16)) + (a3-2 (the-as uint (-> (the-as (inline-array collide-mesh-tri) v1-1) 0 pat))) + ) + (let* ((t2-1 (* t2-0 16)) + (t0-4 (+ t0-3 a2-1)) + (t1-1 (+ t1-0 a2-1)) + (t2-2 (+ t2-1 a2-1)) + ) + (label cfg-5) + (+! a0-1 -1) + (.lvf vf1 t0-4) + (set! v1-1 (&+ (the-as collide-mesh-tri v1-1) 8)) + (.lvf vf2 t1-1) + (&+! a1-1 96) + (.lvf vf3 t2-2) + (.sub.vf vf4 vf2 vf1) + (.svf (&-> a1-1 vertex 0 quad) vf1) + (.min.vf vf8 vf1 vf2) + (.svf (&-> a1-1 vertex 1 quad) vf2) + (.sub.vf vf5 vf3 vf1) + (.svf (&-> a1-1 vertex 2 quad) vf3) + (.max.vf vf9 vf1 vf2) + (let ((t1-2 (-> (the-as collide-mesh-tri v1-1) vertex-index 0))) + (.outer.product.a.vf acc vf4 vf5) + (let ((t2-3 (-> (the-as collide-mesh-tri v1-1) vertex-index 1))) + (.outer.product.b.vf vf6 vf5 vf4 acc) + (let ((t0-5 (-> (the-as collide-mesh-tri v1-1) vertex-index 2))) + (.mul.vf vf7 vf6 vf6) + (nop!) + (.min.vf vf8 vf8 vf3) + (let ((t1-3 (* t1-2 16))) + (.max.vf vf9 vf9 vf3) + (let ((t2-4 (* t2-3 16))) + (.mul.x.vf acc vf0 vf7 :mask #b1000) + (let ((t3-0 (* t0-5 16))) + (.add.mul.y.vf acc vf0 vf7 acc :mask #b1000) + (set! t0-4 (+ t1-3 a2-1)) + (.add.mul.z.vf vf7 vf0 vf7 acc :mask #b1000) + (set! t1-1 (+ t2-4 a2-1)) + (.isqrt.vf Q vf0 vf7 :fsf #b11 :ftf #b11) + (set! t2-2 (+ t3-0 a2-1)) + ) + ) + ) + ) + ) + ) + ) + (.ftoi.vf vf8 vf8) + (nop!) + (.ftoi.vf vf9 vf9) + (nop!) + (nop!) + (.svf (&-> a1-1 bbox4w min quad) vf8) + (.wait.vf) + (.svf (&-> a1-1 bbox4w max quad) vf9) + (.mul.vf vf6 vf6 Q :mask #b111) + (nop!) + (nop!) + (.svf (&-> a1-1 normal quad) vf6) + (nop!) + (set! (-> a1-1 pat) (the-as pat-surface a3-2)) + (b! (nonzero? a0-1) cfg-5 :delay (set! a3-2 (the-as uint (-> (the-as collide-mesh-tri v1-1) pat)))) + ) + ) + ) + (label cfg-6) + 0 + (none) + ) + ) + +;; definition of type oot-work +(deftype oot-work (structure) + ((intersect vector :inline) + (sphere-bbox4w bounding-box4w :inline) + ) + ) + +;; definition for method 3 of type oot-work +(defmethod inspect ((this oot-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'oot-work) + (format #t "~1Tintersect: #~%" (-> this intersect)) + (format #t "~1Tsphere-bbox4w: #~%" (-> this sphere-bbox4w)) + (label cfg-4) + this + ) + +;; definition for method 10 of type collide-mesh +;; INFO: Used lq/sq +(defmethod overlap-test ((this collide-mesh) (arg0 collide-mesh-cache-tri) (arg1 vector)) + (local-vars + (v1-0 uint128) + (a0-1 uint128) + (a1-2 uint128) + (a1-3 uint128) + (a1-4 uint128) + (a1-7 float) + (a2-1 uint128) + (a2-2 uint128) + ) + (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) + (let ((s5-0 (new 'stack-no-clear 'oot-work)) + (s4-0 arg0) + ) + (.lvf vf2 (&-> arg1 quad)) + (let ((s3-0 (-> this num-tris))) + (.sub.w.vf vf5 vf2 vf2) + (.add.w.vf vf6 vf2 vf2) + (.ftoi.vf vf5 vf5) + (.ftoi.vf vf6 vf6) + (.mov v1-0 vf5) + (.svf (&-> s5-0 sphere-bbox4w min quad) vf5) + (.mov a0-1 vf6) + (.svf (&-> s5-0 sphere-bbox4w max quad) vf6) + (label cfg-1) + (b! (zero? s3-0) cfg-7 :delay (set! a2-1 (-> s4-0 bbox4w min quad))) + (+! s3-0 -1) + ) + (let ((a1-1 (-> s4-0 bbox4w max quad))) + (.pcgtw a2-2 a2-1 a0-1) + (nop!) + (.pcgtw a1-2 v1-0 a1-1) + ) + (nop!) + (.por a1-3 a2-2 a1-2) + (nop!) + (.ppach a1-4 (the-as uint128 0) a1-3) + (nop!) + (let ((a1-5 (shl (the-as int a1-4) 16))) + (nop!) + (b! (nonzero? a1-5) cfg-1 :likely-delay (set! s4-0 (+ s4-0 96))) + ) + (closest-pt-in-triangle (-> s5-0 intersect) arg1 (the-as matrix (-> s4-0 vertex)) (-> s4-0 normal)) + (.lvf vf1 (&-> s5-0 intersect quad)) + (.lvf vf2 (&-> arg1 quad)) + (set! v1-0 (-> s5-0 sphere-bbox4w min quad)) + (set! a0-1 (-> s5-0 sphere-bbox4w max quad)) + (.sub.vf vf3 vf2 vf1) + (.mul.w.vf vf4 vf2 vf2 :mask #b1000) + (.mul.vf vf3 vf3 vf3) + (.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) + (.add.w.vf vf3 vf0 vf3 :mask #b10) + (.mov a1-7 vf3) + (b! (>= (the-as int a1-7) 0) cfg-1 :delay (set! s4-0 (+ s4-0 96))) + ) + (return #t) + (label cfg-7) + #f + ) + ) diff --git a/test/decompiler/reference/jak3/engine/collide/collide-shape-h_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-shape-h_REF.gc index f293c47a32..aa64875bcd 100644 --- a/test/decompiler/reference/jak3/engine/collide/collide-shape-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/collide/collide-shape-h_REF.gc @@ -33,7 +33,7 @@ (riders collide-rider 20 :inline) ) (:methods - (collide-rider-pool-method-9 () none) + (add-rider (_type_ handle) collide-rider) (prepare (_type_) none) ) ) @@ -215,17 +215,17 @@ ) (:methods (new (symbol type collide-shape uint int) _type_) - (collide-shape-prim-method-9 () none) - (collide-shape-prim-method-10 () none) - (collide-shape-prim-method-11 () none) - (collide-shape-prim-method-12 () none) - (collide-shape-prim-method-13 () none) + (debug-draw (_type_) none) + (add-fg-prim-using-box (_type_ collide-cache) none) + (add-fg-prim-using-line-sphere (_type_ collide-cache object) none) + (overlaps-others-test (_type_ overlaps-others-params collide-shape-prim) symbol) + (overlaps-others-group (_type_ overlaps-others-params collide-shape-prim-group) symbol) (collide-shape-prim-method-14 () none) - (collide-shape-prim-method-15 () none) - (collide-shape-prim-method-16 () none) - (collide-shape-prim-method-17 () none) - (collide-shape-prim-method-18 () none) - (collide-shape-prim-method-19 () none) + (collide-with-collide-cache-prim-mesh (_type_ collide-query collide-cache-prim) none) + (collide-with-collide-cache-prim-sphere (_type_ collide-query collide-cache-prim) none) + (on-platform-test (_type_ collide-shape-prim collide-query float) none) + (should-push-away-test (_type_ collide-shape-prim collide-query) none) + (should-push-away-a-group-test (_type_ collide-shape-prim-group collide-query) none) ) ) @@ -1385,7 +1385,7 @@ Most [[process-drawable]]s have a [[collide-shape]] that represents their root t ((actor-hash-index int16 :offset 12) (process process-drawable) (max-iteration-count uint8) - (nav-flags uint8) + (nav-flags nav-flags) (total-prims uint8) (num-riders uint8) (pat-ignore-mask pat-surface) @@ -1404,31 +1404,31 @@ Most [[process-drawable]]s have a [[collide-shape]] that represents their root t (new (symbol type process-drawable collide-list-enum) _type_) (move-by-vector! (_type_ vector) none) (move-to-point! (_type_ vector) none) - (collide-shape-method-30 () none) + (debug-draw (_type_) none) (fill-cache-for-shape (_type_ float collide-query) none) (fill-cache-integrate-and-collide (_type_ vector collide-query meters) none) - (collide-shape-method-33 () none) - (collide-shape-method-34 () none) + (find-prim-by-id (_type_ uint) collide-shape-prim) + (find-prim-by-id-logtest (_type_ uint) collide-shape-prim) (detect-riders! (_type_) symbol) - (collide-shape-method-36 () none) + (build-bounding-box-for-shape (_type_ bounding-box float collide-spec) symbol) (integrate-and-collide! (_type_ vector) none) (find-collision-meshes (_type_) none) - (collide-shape-method-39 () none) + (on-platform (_type_ collide-shape collide-query) symbol) (find-overlapping-shapes (_type_ overlaps-others-params) symbol) - (collide-shape-method-41 () none) - (collide-shape-method-42 () none) - (collide-shape-method-43 () none) + (shove-to-closest-point-on-path (_type_ attack-info float) vector) + (should-push-away (_type_ collide-shape collide-query) symbol) + (pull-rider! (_type_ pull-rider-info) none) (pull-riders! (_type_) symbol) (do-push-aways (_type_) collide-spec) (update-transforms (_type_) none) (set-collide-with! (_type_ collide-spec) none) (set-collide-as! (_type_ collide-spec) none) - (collide-shape-method-49 () none) - (collide-shape-method-50 () none) - (collide-shape-method-51 () none) - (collide-shape-method-52 () none) - (collide-shape-method-53 () none) - (collide-shape-method-54 () none) + (modify-collide-as! (_type_ int collide-spec collide-spec) none) + (send-shoves (_type_ process touching-shapes-entry float float float) symbol) + (above-ground? (_type_ collide-query vector collide-spec float float float) symbol) + (water-info-init! (_type_ water-info collide-action) water-info) + (iterate-prims (_type_ (function collide-shape-prim none)) none) + (pusher-init (_type_) none) ) ) @@ -1479,14 +1479,16 @@ Most [[process-drawable]]s have a [[collide-shape]] that represents their root t ((rider-time time-frame) (rider-last-move vector :inline) (trans-old vector :inline) - (poly-pat pat-surface :offset 272) + (trans-old-old vector :inline :offset 240) + (trans-old-old-old vector :inline :offset 256) + (poly-pat pat-surface :offset 272) (cur-pat pat-surface) (ground-pat pat-surface) (status collide-status) (old-status collide-status) (prev-status collide-status) (reaction-flag cshape-reaction-flags) - (reaction (function control-info collide-query vector vector collide-status) :offset 316) + (reaction (function control-info collide-query vector vector collide-status) :offset 316) (no-reaction (function collide-shape-moving collide-query vector vector object)) (local-normal vector :inline) (surface-normal vector :inline) @@ -1505,19 +1507,19 @@ Most [[process-drawable]]s have a [[collide-shape]] that represents their root t ) (:methods (new (symbol type process-drawable collide-list-enum) _type_) - (find-ground (_type_ collide-query collide-spec float float float) symbol) + (find-ground (_type_ collide-query collide-spec float float float process) symbol) (react-to-pat! (_type_ pat-surface) cshape-reaction-flags) - (collide-shape-moving-method-57 () none) - (collide-shape-moving-method-58 () none) - (collide-shape-moving-method-59 () none) - (collide-shape-moving-method-60 () none) - (collide-shape-moving-method-61 () none) + (integrate-no-collide! (_type_ vector) none) + (integrate-for-enemy-no-mtg (_type_ vector overlaps-others-params) symbol) + (move-above-ground (_type_ vector move-above-ground-params) none) + (move-to-ground (_type_ float float symbol collide-spec) none) + (move-to-ground-point (_type_ vector vector vector) none) (compute-acc-due-to-gravity (_type_ vector float) vector) - (collide-shape-moving-method-63 () none) - (collide-shape-moving-method-64 () none) + (rbody-collision (_type_ rigid-body-control float) none) + (try-snap-to-surface (_type_ vector float float float) symbol) (fill-and-try-snap-to-surface (_type_ vector float float float collide-query) symbol) - (collide-shape-moving-method-66 () none) - (collide-shape-moving-method-67 () none) + (step-collision! (_type_ vector vector float int) float) + (collide-with-all-collide-cache-prims (_type_ matrix collide-query) none) ) ) @@ -1649,7 +1651,7 @@ Most [[process-drawable]]s have a [[collide-shape]] that represents their root t (set! (-> s5-0 actor-hash-index) -1) (set! (-> s5-0 process) arg0) (set! (-> s5-0 max-iteration-count) (the-as uint 1)) - (set! (-> s5-0 nav-flags) (the-as uint 1)) + (set! (-> s5-0 nav-flags) (nav-flags has-root-sphere)) (set! (-> s5-0 event-self) #f) (set! (-> s5-0 event-other) #f) (set! (-> s5-0 riders) (the-as (inline-array collide-rider) #f)) 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 new file mode 100644 index 0000000000..ff6a3cb678 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/collide/collide-shape-rider_REF.gc @@ -0,0 +1,444 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 39 of type collide-shape +(defmethod on-platform ((this collide-shape) (arg0 collide-shape) (arg1 collide-query)) + (let ((v1-0 arg1)) + (set! (-> v1-0 best-dist) 0.0) + (set! (-> v1-0 best-my-prim) #f) + (set! (-> v1-0 best-other-prim) #f) + ) + (set! (-> arg1 best-dist) 122.88) + (let ((s5-0 (-> this root-prim)) + (s4-0 (-> arg0 root-prim)) + ) + (when (and (logtest? (-> s5-0 prim-core collide-with) (-> s4-0 prim-core collide-as)) + (logtest? (-> s5-0 prim-core action) (collide-action rideable)) + (logtest? (-> s4-0 prim-core action) (collide-action can-ride)) + ) + (let ((f0-4 (- (- (vector-vector-distance (the-as vector (-> s5-0 prim-core)) (the-as vector (-> s4-0 prim-core))) + (-> s5-0 prim-core world-sphere w) + ) + (-> s4-0 prim-core world-sphere w) + ) + ) + ) + (if (< f0-4 122.88) + (on-platform-test s5-0 s4-0 arg1 f0-4) + ) + ) + ) + ) + (< (-> arg1 best-dist) 122.88) + ) + +;; definition for method 17 of type collide-shape-prim +;; WARN: Return type mismatch object vs none. +(defmethod on-platform-test ((this collide-shape-prim) (arg0 collide-shape-prim) (arg1 collide-query) (arg2 float)) + (format 0 "ERROR: collide-shape-prim::on-platform-test was called illegally!~%") + (none) + ) + +;; definition for method 17 of type collide-shape-prim-group +;; WARN: Return type mismatch int vs none. +(defmethod on-platform-test ((this collide-shape-prim-group) (arg0 collide-shape-prim) (arg1 collide-query) (arg2 float)) + (let ((s4-0 (-> arg0 prim-core collide-as)) + (s3-0 (-> this child 0)) + ) + (countdown (s2-0 (-> this num-children)) + (when (and (logtest? (-> s3-0 prim-core collide-with) s4-0) + (logtest? (-> s3-0 prim-core action) (collide-action rideable)) + ) + (let ((f0-2 (- (- (vector-vector-distance (the-as vector (-> s3-0 prim-core)) (the-as vector (-> arg0 prim-core))) + (-> s3-0 prim-core world-sphere w) + ) + (-> arg0 prim-core world-sphere w) + ) + ) + ) + (if (< f0-2 122.88) + (on-platform-test s3-0 arg0 arg1 f0-2) + ) + ) + ) + (&+! s3-0 80) + ) + ) + 0 + (none) + ) + +;; definition for method 17 of type collide-shape-prim-mesh +;; INFO: Used lq/sq +;; WARN: Return type mismatch pat-surface vs none. +(defmethod on-platform-test ((this collide-shape-prim-mesh) (arg0 collide-shape-prim) (arg1 collide-query) (arg2 float)) + (case (-> arg0 type) + ((collide-shape-prim-group) + (let ((s4-0 (-> this prim-core collide-with)) + (s3-0 (-> (the-as collide-shape-prim-group arg0) child 0)) + (s2-1 (the-as object (-> (the-as collide-shape-prim-group arg0) num-children))) + ) + (while (nonzero? (the-as uint s2-1)) + (set! s2-1 (+ (the-as uint s2-1) -1)) + (when (and (logtest? s4-0 (-> s3-0 prim-core collide-as)) + (logtest? (-> s3-0 prim-core action) (collide-action can-ride)) + ) + (let ((f0-2 (- (- (vector-vector-distance (the-as vector (-> this prim-core)) (the-as vector (-> s3-0 prim-core))) + (-> this prim-core world-sphere w) + ) + (-> s3-0 prim-core world-sphere w) + ) + ) + ) + (if (< f0-2 122.88) + (on-platform-test this s3-0 arg1 f0-2) + ) + ) + ) + (&+! s3-0 80) + ) + ) + ) + ((collide-shape-prim-sphere) + (let ((s3-1 (-> this mesh))) + (when s3-1 + (let ((v1-13 (populate-for-prim-mesh *collide-mesh-cache* this))) + (when v1-13 + (let* ((s4-1 (new 'stack-no-clear 'collide-tri-result)) + (f0-4 (sphere-on-platform-test + s3-1 + (the-as collide-mesh-cache-tri (-> v1-13 tris)) + s4-1 + (the-as vector (-> arg0 prim-core)) + (-> arg1 best-dist) + ) + ) + ) + (when (< f0-4 (-> arg1 best-dist)) + (set! (-> arg1 best-dist) f0-4) + (set! (-> arg1 best-my-prim) this) + (set! (-> arg1 best-other-prim) arg0) + (set! (-> arg1 best-other-tri vertex 0 quad) (-> s4-1 vertex 0 quad)) + (set! (-> arg1 best-other-tri vertex 1 quad) (-> s4-1 vertex 1 quad)) + (set! (-> arg1 best-other-tri vertex 2 quad) (-> s4-1 vertex 2 quad)) + (set! (-> arg1 best-other-tri intersect quad) (-> s4-1 intersect quad)) + (set! (-> arg1 best-other-tri normal quad) (-> s4-1 normal quad)) + (set! (-> arg1 best-other-tri pat) (-> s4-1 pat)) + ) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 9 of type collide-rider-pool +(defmethod add-rider ((this collide-rider-pool) (arg0 handle)) + (let ((v1-0 (-> this alloc-count))) + (cond + ((< v1-0 20) + (let ((v0-0 (-> this riders v1-0))) + (set! (-> this alloc-count) (+ v1-0 1)) + (set! (-> v0-0 rider-handle) arg0) + (set! (-> v0-0 sticky-prim) #f) + v0-0 + ) + ) + (else + (format 0 "ERROR: *collide-rider-pool*: exceeded max # of riders!~%") + (the-as collide-rider #f) + ) + ) + ) + ) + +;; definition for method 35 of type collide-shape +;; WARN: Return type mismatch joint-control-status vs symbol. +(defmethod detect-riders! ((this collide-shape)) + (local-vars (v0-7 joint-control-status) (a2-5 float) (a2-12 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (set! (-> this num-riders) (the-as uint 0)) + (set! (-> this riders) (the-as (inline-array collide-rider) #f)) + (let* ((s4-0 (-> this root-prim)) + (s5-0 (-> s4-0 prim-core collide-with)) + ) + (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) + ) + ) + (when (logtest? s5-0 (collide-spec player-list)) + (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? s5-0 (-> a1-1 prim-core collide-as)) + (let ((a1-2 (-> a1-1 prim-core))) + (let ((a2-4 a1-2) + (a3-1 (-> s4-0 prim-core)) + ) + (.lvf vf2 (&-> a2-4 world-sphere quad)) + (.lvf vf3 (&-> a3-1 world-sphere 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) (-> s4-0 prim-core world-sphere w))) + ) + (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 (logtest? s5-0 (collide-spec hit-by-player-list)) + (let ((a0-5 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((v1-19 (-> 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? s5-0 (-> a1-13 prim-core collide-as)) + (let ((a1-14 (-> a1-13 prim-core))) + (let ((a2-11 a1-14) + (a3-2 (-> s4-0 prim-core)) + ) + (.lvf vf2 (&-> a2-11 world-sphere quad)) + (.lvf vf3 (&-> a3-2 world-sphere 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) (-> s4-0 prim-core world-sphere w))) + ) + (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-19) + *collide-hit-by-player-list* + (set! v1-19 (-> v1-19 next0)) + ) + ) + ) + ) + (dotimes (s4-1 *actor-list-length*) + (let* ((s3-0 (-> *actor-list* s4-1)) + (v1-24 (-> s3-0 root-prim)) + ) + (when (logtest? s5-0 (-> v1-24 prim-core collide-as)) + (when (and (logtest? (-> v1-24 prim-core action) (collide-action can-ride)) + (!= (-> this process) (-> s3-0 process)) + ) + (let ((s2-0 (new 'stack-no-clear 'collide-query))) + (when (on-platform this s3-0 s2-0) + (let ((s5-1 (add-rider *collide-rider-pool* (process->handle (-> s3-0 process))))) + (when s5-1 + (+! (-> this num-riders) 1) + (if (not (-> this riders)) + (set! (-> this riders) (the-as (inline-array collide-rider) s5-1)) + ) + (let ((a0-15 (-> s2-0 best-my-prim))) + (set! (-> s5-1 sticky-prim) a0-15) + (let ((s1-0 (-> this process node-list data (-> a0-15 transform-index) bone transform))) + (set! (-> s5-1 prim-ry) (matrix-y-angle s1-0)) + (let ((s2-1 (new 'stack-no-clear 'matrix))) + (matrix-4x4-inverse! s2-1 s1-0) + (set! (-> s3-0 trans w) 1.0) + (vector-matrix*! (-> s5-1 rider-local-pos) (-> s3-0 trans) s2-1) + ) + ) + ) + (send-event (-> this process) 'ridden s5-1) + ) + ) + (set! s5-0 (-> this root-prim prim-core collide-with)) + ) + ) + ) + ) + ) + ) + ) + (let ((v1-58 (-> this process skel))) + (the-as + symbol + (when (nonzero? v1-58) + (cond + ((or (> (-> this num-riders) 0) (logtest? (-> this root-prim prim-core action) (collide-action edge-grabbed))) + (set! v0-7 (logior (-> v1-58 status) (joint-control-status sync-math))) + (set! (-> v1-58 status) v0-7) + ) + (else + (set! v0-7 (logclear (-> v1-58 status) (joint-control-status sync-math))) + (set! (-> v1-58 status) v0-7) + ) + ) + v0-7 + ) + ) + ) + ) + ) + +;; definition for method 44 of type collide-shape +;; WARN: Return type mismatch int vs symbol. +(defmethod pull-riders! ((this collide-shape)) + (let ((s5-0 (-> this riders))) + (when s5-0 + (let ((s4-0 (new 'stack-no-clear 'pull-rider-info))) + (countdown (s3-0 (-> this num-riders)) + (let* ((v1-2 (-> s5-0 s3-0)) + (a0-1 (-> v1-2 rider-handle)) + ) + (when (handle->process a0-1) + (set! (-> s4-0 rider) v1-2) + (set! (-> s4-0 rider-cshape) + (the-as collide-shape-moving (-> (the-as process-drawable (-> a0-1 process 0)) root)) + ) + (let ((a0-5 (-> v1-2 sticky-prim))) + (when a0-5 + (let ((s2-0 (-> this process node-list data (-> a0-5 transform-index) bone transform))) + (let ((s1-0 (-> s4-0 rider-dest))) + (vector-matrix*! s1-0 (-> v1-2 rider-local-pos) s2-0) + (vector-float*! s1-0 s1-0 (/ 1.0 (-> s1-0 w))) + ) + (set! (-> s4-0 rider-delta-ry) (deg- (matrix-y-angle s2-0) (-> s4-0 rider prim-ry))) + ) + (pull-rider! this s4-0) + ) + ) + ) + ) + ) + ) + ) + ) + (the-as symbol 0) + ) + +;; definition for method 43 of type collide-shape +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod pull-rider! ((this collide-shape) (arg0 pull-rider-info)) + (local-vars (at-0 int)) + (with-pp + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (-> arg0 rider-cshape))) + (let ((s2-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 quad) (-> gp-0 trans quad)) + (vector-! s2-0 (-> arg0 rider-dest) s3-0) + (cond + ((logtest? (-> this root-prim prim-core action) (collide-action pull-rider-can-collide)) + (let ((s1-0 (-> this root-prim prim-core collide-as))) + (set! (-> this root-prim prim-core collide-as) (collide-spec)) + (let ((a2-0 (new 'stack-no-clear 'collide-query))) + (set! (-> a2-0 collide-with) (-> gp-0 root-prim prim-core collide-with)) + (set! (-> a2-0 ignore-process0) (-> gp-0 process)) + (set! (-> a2-0 ignore-process1) #f) + (set! (-> a2-0 ignore-pat) (-> gp-0 pat-ignore-mask)) + (set! (-> a2-0 action-mask) (collide-action solid)) + (fill-cache-for-shape gp-0 (+ 8192.0 (vector-length s2-0)) a2-0) + ) + (set! (-> this root-prim prim-core collide-as) s1-0) + ) + (let ((s1-1 (new 'stack-no-clear 'vector))) + (set! (-> s1-1 quad) (-> s2-0 quad)) + (let ((v1-19 s1-1)) + (.lvf vf1 (&-> s1-1 quad)) + (let ((f0-2 (-> pp clock frames-per-second))) + (.mov at-0 f0-2) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> v1-19 quad) vf1) + ) + (cond + ((type? gp-0 collide-shape-moving) + (let ((s2-1 (-> gp-0 status))) + (integrate-and-collide! gp-0 s1-1) + (set! (-> gp-0 status) s2-1) + ) + ) + (else + (integrate-and-collide! gp-0 s1-1) + ) + ) + ) + ) + (else + (move-by-vector! gp-0 s2-0) + ) + ) + (when (type? gp-0 collide-shape-moving) + (let ((v1-26 (new 'stack-no-clear 'vector))) + (vector-! v1-26 (-> gp-0 trans) s3-0) + (vector-float*! + (-> gp-0 rider-last-move) + v1-26 + (* (-> pp clock frames-per-second) (-> this process clock clock-ratio)) + ) + ) + (let ((f0-5 (vector-length (-> gp-0 rider-last-move)))) + (if (< (-> this rider-max-momentum) f0-5) + (vector-normalize! (-> gp-0 rider-last-move) (-> this rider-max-momentum)) + ) + ) + (set! (-> gp-0 rider-time) (-> gp-0 process clock frame-counter)) + ) + ) + (let ((f0-7 (-> arg0 rider-delta-ry))) + (if (!= f0-7 0.0) + (send-event (-> gp-0 process) 'rotate-y-angle f0-7) + ) + ) + ) + (none) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/collide/collide-shape_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-shape_REF.gc new file mode 100644 index 0000000000..88f3ca97c3 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/collide/collide-shape_REF.gc @@ -0,0 +1,3144 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 54 of type collide-shape +;; WARN: Return type mismatch collide-shape vs none. +(defmethod pusher-init ((this collide-shape)) + (when (logtest? (collide-spec pusher) (-> this root-prim prim-core collide-as)) + (let ((v1-3 (the-as process-tree (-> this process)))) + (while (not (logtest? (-> v1-3 mask) (process-mask process-tree))) + (set! v1-3 (ppointer->process (-> v1-3 parent))) + ) + (if (!= v1-3 *pusher-pool*) + (change-parent (-> this process) *pusher-pool*) + ) + ) + ) + (none) + ) + +;; definition for method 42 of type collide-shape +(defmethod should-push-away ((this collide-shape) (arg0 collide-shape) (arg1 collide-query)) + (local-vars (v1-2 uint) (v1-3 float) (a2-2 uint) (a3-2 uint)) + (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) + (let ((v1-0 arg1)) + (set! (-> v1-0 best-dist) 0.0) + (set! (-> v1-0 best-my-prim) #f) + (set! (-> v1-0 best-other-prim) #f) + ) + (let ((a0-1 (-> this root-prim)) + (a1-1 (-> arg0 root-prim)) + ) + (let ((a3-0 (-> a0-1 prim-core collide-with)) + (t0-0 (-> a1-1 prim-core collide-as)) + (v1-1 (-> a0-1 prim-core action)) + ) + (let ((a2-1 (-> a1-1 prim-core action))) + (b! (not (logtest? a3-0 t0-0)) cfg-8 :delay (set! a3-2 (the-as uint (logand a2-1 1)))) + (b! (zero? a3-2) cfg-8 :delay (set! a2-2 (the-as uint (logand a2-1 16)))) + ) + (b! (nonzero? a2-2) cfg-8 :delay (set! v1-2 (the-as uint (logand v1-1 1)))) + ) + (b! (zero? v1-2) cfg-8 :delay (nop!)) + (.lvf vf1 (&-> a0-1 prim-core world-sphere quad)) + (.lvf vf2 (&-> a1-1 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 vf5 vf3 vf4 :mask #b1000) + (let ((f0-1 0.0)) + (.add.w.vf vf5 vf0 vf5 :mask #b1) + (.mov v1-3 vf5) + (b! (<= f0-1 v1-3) cfg-8) + ) + (should-push-away-test a0-1 a1-1 arg1) + ) + (let ((v0-1 (< (-> arg1 best-dist) 0.0))) + (b! #t cfg-9 :delay (nop!)) + (label cfg-8) + (set! v0-1 #f) + (label cfg-9) + v0-1 + ) + ) + ) + +;; definition for method 18 of type collide-shape-prim +;; WARN: Return type mismatch object vs none. +(defmethod should-push-away-test ((this collide-shape-prim) (arg0 collide-shape-prim) (arg1 collide-query)) + (format 0 "ERROR: collide-shape-prim::should-push-away-test was called illegally!~%") + (none) + ) + +;; definition for method 18 of type collide-shape-prim-group +;; WARN: Return type mismatch int vs none. +(defmethod should-push-away-test ((this collide-shape-prim-group) (arg0 collide-shape-prim) (arg1 collide-query)) + (local-vars (a0-2 collide-action) (a0-3 float) (f0-0 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (nop!) + (let ((s4-0 (the-as collide-shape-prim this)) + (s3-0 (-> this num-children)) + ) + (nop!) + (let ((v1-0 (-> arg0 prim-core collide-as))) + (nop!) + (.lvf vf1 (&-> arg0 prim-core world-sphere quad)) + (until (> f0-0 a0-3) + (until (nonzero? a0-2) + (label cfg-1) + (b! (zero? s3-0) cfg-6 :delay (set! s4-0 (+ s4-0 80))) + (+! s3-0 -1) + (let ((a1-1 (-> s4-0 prim-core collide-with))) + (nop!) + (let ((a0-1 (-> s4-0 prim-core action)) + (a1-2 (logand a1-1 v1-0)) + ) + (set! a0-2 (logand a0-1 (collide-action solid))) + (b! (zero? a1-2) cfg-1 :delay (.lvf vf2 (&-> s4-0 prim-core world-sphere quad))) + ) + ) + ) + (.sub.vf vf3 vf2 vf1) + (.add.w.vf vf4 vf2 vf1 :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) + (set! f0-0 0.0) + (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.mov a0-3 vf3) + ) + (should-push-away-test s4-0 arg0 arg1) + (set! v1-0 (-> arg0 prim-core collide-as)) + ) + ) + (b! #t cfg-1 :delay (.lvf vf1 (&-> arg0 prim-core world-sphere quad))) + (label cfg-6) + 0 + (none) + ) + ) + +;; definition for method 19 of type collide-shape-prim +;; WARN: Return type mismatch int vs none. +(defmethod should-push-away-a-group-test ((this collide-shape-prim) (arg0 collide-shape-prim-group) (arg1 collide-query)) + (local-vars (a0-2 collide-action) (a0-3 float) (f0-0 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (nop!) + (let ((s4-0 (the-as object arg0)) + (s3-0 (-> arg0 num-children)) + ) + (nop!) + (let ((v1-0 (-> this prim-core collide-with))) + (nop!) + (.lvf vf2 (&-> this prim-core world-sphere quad)) + (until (> f0-0 a0-3) + (until (nonzero? a0-2) + (label cfg-1) + (b! (zero? s3-0) cfg-6 :delay (set! s4-0 (+ (the-as collide-shape-prim s4-0) 80))) + (+! s3-0 -1) + (let ((a1-1 (-> (the-as collide-shape-prim s4-0) prim-core collide-as))) + (nop!) + (let ((a0-1 (-> (the-as collide-shape-prim s4-0) prim-core action)) + (a1-2 (logand v1-0 a1-1)) + ) + (set! a0-2 (logand a0-1 (collide-action solid))) + (b! (zero? a1-2) cfg-1 :delay (.lvf vf1 (&-> (the-as collide-shape-prim s4-0) prim-core world-sphere quad))) + ) + ) + ) + (.sub.vf vf3 vf2 vf1) + (.add.w.vf vf4 vf2 vf1 :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) + (set! f0-0 0.0) + (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.mov a0-3 vf3) + ) + (should-push-away-test this (the-as collide-shape-prim s4-0) arg1) + (set! v1-0 (-> this prim-core collide-with)) + ) + ) + (b! #t cfg-1 :delay (.lvf vf2 (&-> this prim-core world-sphere quad))) + (label cfg-6) + 0 + (none) + ) + ) + +;; definition for method 18 of type collide-shape-prim-mesh +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod should-push-away-test ((this collide-shape-prim-mesh) (arg0 collide-shape-prim) (arg1 collide-query)) + (let ((v1-0 (-> arg0 prim-core prim-type))) + (cond + ((zero? v1-0) + (should-push-away-a-group-test this (the-as collide-shape-prim-group arg0) arg1) + ) + (else + (b! (> v1-0 0) cfg-8 :delay (nop!)) + (let ((s2-0 (-> this mesh))) + (b! (not s2-0) cfg-7 :delay (empty-form)) + (let ((v1-4 (populate-for-prim-mesh *collide-mesh-cache* this))) + (b! (not v1-4) cfg-7 :delay (empty-form)) + (let ((s5-0 (new 'stack-no-clear 'collide-tri-result))) + (let ((f0-1 (should-push-away-test + s2-0 + (the-as collide-mesh-cache-tri (-> v1-4 tris)) + s5-0 + (the-as vector (-> arg0 prim-core)) + (-> arg1 best-dist) + ) + ) + ) + (b! (>= f0-1 (-> arg1 best-dist)) cfg-7 :delay #f) + (set! (-> arg1 best-dist) f0-1) + ) + (set! (-> arg1 best-my-prim) this) + (set! (-> arg1 best-other-prim) arg0) + (set! (-> arg1 best-other-tri vertex 0 quad) (-> s5-0 vertex 0 quad)) + (set! (-> arg1 best-other-tri vertex 1 quad) (-> s5-0 vertex 1 quad)) + (set! (-> arg1 best-other-tri vertex 2 quad) (-> s5-0 vertex 2 quad)) + (set! (-> arg1 best-other-tri intersect quad) (-> s5-0 intersect quad)) + (set! (-> arg1 best-other-tri normal quad) (-> s5-0 normal quad)) + (set! (-> arg1 best-other-tri pat) (-> s5-0 pat)) + ) + ) + ) + (label cfg-7) + (b! #t cfg-9 :delay (nop!)) + (label cfg-8) + (format 0 "ERROR: Attempted unsupported mesh -> mesh test in collide-shape-prim::should-push-away-test!~%") + ) + ) + ) + (label cfg-9) + 0 + (none) + ) + +;; definition for method 18 of type collide-shape-prim-sphere +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod should-push-away-test ((this collide-shape-prim-sphere) (arg0 collide-shape-prim) (arg1 collide-query)) + (local-vars (v1-3 float)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((v1-0 (-> arg0 prim-core prim-type))) + (cond + ((zero? v1-0) + (should-push-away-a-group-test this (the-as collide-shape-prim-group arg0) arg1) + ) + (else + (b! (> v1-0 0) cfg-5 :delay (nop!)) + (.lvf vf1 (&-> this prim-core world-sphere quad)) + (.lvf vf2 (&-> arg0 prim-core world-sphere quad)) + (.sub.vf vf3 vf2 vf1 :mask #b111) + (.add.w.vf vf5 vf1 vf2 :mask #b1000) + (.mul.vf vf4 vf3 vf3 :mask #b111) + (.mul.x.vf acc vf0 vf4 :mask #b1000) + (.add.mul.y.vf acc vf0 vf4 acc :mask #b1000) + (.add.mul.z.vf vf4 vf0 vf4 acc :mask #b1000) + (.sqrt.vf Q vf4 :ftf #b11) + (.mov.vf vf3 vf0 :mask #b1000) + (.add.w.vf vf5 vf0 vf5 :mask #b1) + (let ((f2-0 (-> arg1 best-dist))) + (.wait.vf) + (nop!) + (.add.vf vf4 vf0 Q :mask #b1) + (.sub.x.vf vf6 vf4 vf5 :mask #b1) + (.mul.x.vf vf3 vf3 vf4 :mask #b111) + (.mov v1-3 vf6) + (let ((f1-0 v1-3)) + (b! (<= f2-0 f1-0) cfg-9) + (let ((v1-4 (-> this pat))) + (set! (-> arg1 best-dist) f1-0) + (set! (-> arg1 best-my-prim) this) + (set! (-> arg1 best-other-prim) arg0) + (.svf (&-> arg1 best-other-tri normal quad) vf3) + (set! (-> arg1 best-other-tri pat) v1-4) + ) + ) + ) + (let ((s3-0 (-> arg1 best-other-tri normal)) + (s4-1 (-> arg1 best-other-tri intersect)) + ) + (vector-float*! s4-1 s3-0 (-> this prim-core world-sphere w)) + (vector+! s4-1 s4-1 (the-as vector (-> this prim-core))) + (set! (-> arg1 best-other-tri vertex 0 quad) (-> s4-1 quad)) + (point-in-plane-<-point+normal! (-> arg1 best-other-tri vertex 1) s4-1 s3-0) + (let* ((a0-8 (vector-normalize! + (vector-! + (new 'stack-no-clear 'vector) + (-> arg1 best-other-tri vertex 1) + (the-as vector (-> arg1 best-other-tri)) + ) + 1.0 + ) + ) + (v1-11 (vector-cross! (new 'stack-no-clear 'vector) s3-0 a0-8)) + (a0-9 (-> arg1 best-other-tri vertex 2)) + ) + (let ((a1-7 4096.0)) + (.mov vf7 a1-7) + ) + (.lvf vf5 (&-> v1-11 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 (&-> a0-9 quad) vf6) + ) + ) + (b! #t cfg-9 :delay (nop!)) + (label cfg-5) + (let ((s2-0 (-> (the-as collide-shape-prim-mesh arg0) mesh))) + (when s2-0 + (let ((v1-13 (populate-for-prim-mesh *collide-mesh-cache* (the-as collide-shape-prim-mesh arg0)))) + (when v1-13 + (let* ((s3-1 (new 'stack-no-clear 'collide-tri-result)) + (f0-3 (should-push-away-test + s2-0 + (the-as collide-mesh-cache-tri (-> v1-13 tris)) + s3-1 + (the-as vector (-> this prim-core)) + (-> arg1 best-dist) + ) + ) + ) + (when (< f0-3 (-> arg1 best-dist)) + (set! (-> arg1 best-dist) f0-3) + (set! (-> arg1 best-my-prim) this) + (set! (-> arg1 best-other-prim) arg0) + (let ((s4-2 (-> arg1 best-other-tri normal))) + (vector-! s4-2 (-> s3-1 intersect) (the-as vector (-> this prim-core))) + (vector-normalize! s4-2 1.0) + (let ((s3-2 (-> arg1 best-other-tri intersect))) + (vector-float*! s3-2 s4-2 (-> this prim-core world-sphere w)) + (vector+! s3-2 s3-2 (the-as vector (-> this prim-core))) + (set! (-> arg1 best-other-tri vertex 0 quad) (-> s3-2 quad)) + (point-in-plane-<-point+normal! (-> arg1 best-other-tri vertex 1) s3-2 s4-2) + (let* ((a0-23 (vector-normalize! + (vector-! + (new 'stack-no-clear 'vector) + (-> arg1 best-other-tri vertex 1) + (the-as vector (-> arg1 best-other-tri)) + ) + 1.0 + ) + ) + (v1-23 (vector-cross! (new 'stack-no-clear 'vector) s4-2 a0-23)) + (a0-24 (-> arg1 best-other-tri vertex 2)) + ) + (let ((a1-18 4096.0)) + (.mov vf7 a1-18) + ) + (.lvf vf5 (&-> v1-23 quad)) + (.lvf vf4 (&-> s3-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-24 quad) vf6) + ) + ) + ) + (set! (-> arg1 best-other-tri pat) (-> this pat)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (label cfg-9) + 0 + (none) + ) + ) + +;; definition for method 15 of type collide-shape-prim +;; WARN: Return type mismatch object vs none. +(defmethod collide-with-collide-cache-prim-mesh ((this collide-shape-prim) (arg0 collide-query) (arg1 collide-cache-prim)) + (format 0 "ERROR: Unsupported prim type in collide-shape-prim::collide-with-collide-cache-prim-mesh!~%") + (none) + ) + +;; definition for method 15 of type collide-shape-prim-sphere +;; WARN: Return type mismatch int vs none. +(defmethod collide-with-collide-cache-prim-mesh ((this collide-shape-prim-sphere) (arg0 collide-query) (arg1 collide-cache-prim)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + ) + (let* ((gp-0 (new 'stack-no-clear 'collide-tri-result)) + (f0-1 (resolve-moving-sphere-tri + arg1 + gp-0 + (-> this prim-core) + (-> arg0 move-dist) + (-> arg0 best-dist) + (-> this prim-core action) + ) + ) + ) + (when (>= f0-1 0.0) + (let ((v1-3 (-> arg1 prim-core action)) + (a0-2 (-> this prim-core action)) + (a2-2 (-> arg1 prim)) + ) + (let* ((v1-4 (logand a0-2 v1-3)) + (a0-3 (-> this cshape)) + (a1-2 (logand v1-4 (collide-action solid))) + (v1-5 (-> a2-2 cshape)) + ) + (b! (zero? a1-2) cfg-6 :delay (nop!)) + (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)) + ) + (set! (-> arg0 best-dist) f0-1) + (.svf (&-> arg0 best-other-tri vertex 0 quad) vf3) + (.svf (&-> arg0 best-other-tri vertex 1 quad) vf4) + (.svf (&-> arg0 best-other-tri vertex 2 quad) vf5) + (.svf (&-> arg0 best-other-tri intersect quad) vf1) + (.svf (&-> arg0 best-other-tri normal quad) vf2) + (set! (-> arg0 best-other-tri pat) a0-6) + (set! (-> arg0 best-other-tri collide-ptr) a1-4) + ) + (set! (-> arg0 best-other-prim) a2-2) + (set! (-> arg0 best-my-prim) this) + (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)) + ) + ) + ) + ) + (label cfg-8) + 0 + (none) + ) + ) + +;; definition for method 15 of type collide-shape-prim-mesh +;; WARN: Return type mismatch object vs none. +(defmethod collide-with-collide-cache-prim-mesh ((this collide-shape-prim-mesh) (arg0 collide-query) (arg1 collide-cache-prim)) + (format 0 "ERROR: collide-shape-prim-mesh vs. collide-cache-prim mesh is not currently supported!~%") + (none) + ) + +;; definition for method 15 of type collide-shape-prim-group +;; WARN: Return type mismatch int vs none. +(defmethod collide-with-collide-cache-prim-mesh ((this collide-shape-prim-group) (arg0 collide-query) (arg1 collide-cache-prim)) + (let ((s4-0 (-> arg1 prim-core collide-as)) + (s3-0 (-> this child 0)) + ) + (countdown (s2-0 (-> this num-children)) + (if (logtest? (-> s3-0 prim-core collide-with) s4-0) + (collide-with-collide-cache-prim-mesh s3-0 arg0 arg1) + ) + (&+! s3-0 80) + ) + ) + 0 + (none) + ) + +;; definition for method 16 of type collide-shape-prim +;; WARN: Return type mismatch object vs none. +(defmethod collide-with-collide-cache-prim-sphere ((this collide-shape-prim) (arg0 collide-query) (arg1 collide-cache-prim)) + (format 0 "ERROR: Unsupported prim type in collide-shape-prim::collide-with-collide-cache-prim-sphere!~%") + (none) + ) + +;; definition for method 16 of type collide-shape-prim-sphere +;; WARN: Return type mismatch int vs none. +(defmethod collide-with-collide-cache-prim-sphere ((this collide-shape-prim-sphere) (arg0 collide-query) (arg1 collide-cache-prim)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + ) + (let* ((gp-0 (new 'stack-no-clear 'collide-tri-result)) + (f0-1 (resolve-moving-sphere-sphere + arg1 + gp-0 + (-> this prim-core) + (-> arg0 move-dist) + (-> arg0 best-dist) + (-> arg1 prim-core action) + ) + ) + ) + (b! (< f0-1 0.0) cfg-5 :delay #f) + (let ((v1-3 (-> arg1 prim-core action)) + (a0-2 (-> this prim-core action)) + (a2-2 (-> arg1 prim)) + ) + (let* ((a0-3 (logand a0-2 v1-3)) + (v1-4 (-> this cshape)) + (a1-2 (logand a0-3 (collide-action solid))) + (a0-4 (-> a2-2 cshape)) + ) + (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)) + ) + (set! (-> arg0 best-dist) f0-1) + (.svf (&-> arg0 best-other-tri vertex 0 quad) vf3) + (.svf (&-> arg0 best-other-tri vertex 1 quad) vf4) + (.svf (&-> arg0 best-other-tri vertex 2 quad) vf5) + (.svf (&-> arg0 best-other-tri intersect quad) vf1) + (.svf (&-> arg0 best-other-tri normal quad) vf2) + (set! (-> arg0 best-other-tri pat) v1-7) + (set! (-> arg0 best-other-tri collide-ptr) a0-6) + ) + (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)) + ) + ) + ) + (label cfg-5) + 0 + (none) + ) + ) + +;; definition for method 16 of type collide-shape-prim-mesh +;; WARN: Return type mismatch object vs none. +(defmethod collide-with-collide-cache-prim-sphere ((this collide-shape-prim-mesh) (arg0 collide-query) (arg1 collide-cache-prim)) + (format 0 "ERROR: collide-shape-prim-mesh vs. collide-cache-prim sphere is not currently supported!~%") + (none) + ) + +;; definition for method 16 of type collide-shape-prim-group +;; WARN: Return type mismatch int vs none. +(defmethod collide-with-collide-cache-prim-sphere ((this collide-shape-prim-group) (arg0 collide-query) (arg1 collide-cache-prim)) + (let ((s4-0 (-> arg1 prim-core collide-as)) + (s3-0 (-> this child 0)) + ) + (countdown (s2-0 (-> this num-children)) + (if (logtest? (-> s3-0 prim-core collide-with) s4-0) + (collide-with-collide-cache-prim-sphere s3-0 arg0 arg1) + ) + (&+! s3-0 80) + ) + ) + 0 + (none) + ) + +;; definition for function find-ground-point +;; INFO: Used lq/sq +(defun find-ground-point ((arg0 control-info) (arg1 vector) (arg2 float) (arg3 float)) + (local-vars (sv-560 int)) + (let* ((f0-0 819.2) + (v1-1 (-> arg0 transv)) + (f30-0 (if (< f0-0 (sqrtf (+ (* (-> v1-1 x) (-> v1-1 x)) (* (-> v1-1 z) (-> v1-1 z))))) + (vector-y-angle (-> arg0 transv)) + (y-angle arg0) + ) + ) + (s2-0 (-> arg0 trans)) + (s1-0 (new 'stack-no-clear 'collide-query)) + ) + (set! (-> s1-0 collide-with) (-> arg0 root-prim prim-core collide-with)) + (set! (-> s1-0 ignore-process0) (-> arg0 process)) + (set! (-> s1-0 ignore-process1) #f) + (set! (-> s1-0 ignore-pat) (-> arg0 pat-ignore-mask)) + (set! (-> s1-0 action-mask) (collide-action solid)) + (set! (-> arg1 w) 0.0) + (dotimes (v1-9 3) + (set! (-> s1-0 bbox min data v1-9) (- (-> s2-0 data v1-9) arg3)) + (set! (-> s1-0 bbox max data v1-9) (+ (-> s2-0 data v1-9) arg3)) + ) + (set! (-> s1-0 bbox min y) (+ -40960.0 (-> s2-0 y))) + (set! (-> s1-0 bbox max y) (+ 20480.0 (-> s2-0 y))) + (fill-using-bounding-box *collide-cache* s1-0) + (vector+! (-> s1-0 start-pos) s2-0 (new 'static 'vector :y 20480.0 :w 1.0)) + (let ((v1-16 s1-0)) + (set! (-> v1-16 radius) 2048.0) + (set! (-> v1-16 collide-with) (-> arg0 root-prim prim-core collide-with)) + (set! (-> v1-16 ignore-process0) (-> arg0 process)) + (set! (-> v1-16 ignore-process1) #f) + (set! (-> v1-16 ignore-pat) (-> arg0 pat-ignore-mask)) + (set! (-> v1-16 action-mask) (collide-action solid)) + ) + (dotimes (s0-0 8) + (let ((f28-0 (+ f30-0 (if (not (logtest? s0-0 1)) + (* 8192.0 (the float (/ s0-0 2))) + (* -8192.0 (the float (/ s0-0 2))) + ) + ) + ) + ) + (set! sv-560 0) + (let ((f26-0 arg3)) + (set-vector! (-> s1-0 move-dist) 0.0 0.0 arg3 1.0) + (vector-rotate-y! (-> s1-0 move-dist) (-> s1-0 move-dist) f28-0) + (if (>= (probe-using-line-sphere *collide-cache* s1-0) 0.0) + (set! f26-0 (+ -6144.0 (vector-vector-xz-distance s2-0 (-> s1-0 best-other-tri intersect)))) + ) + (let ((f24-0 arg2)) + (while (>= f26-0 f24-0) + (set-vector! (-> s1-0 start-pos) 0.0 0.0 f24-0 1.0) + (vector-rotate-y! (-> s1-0 start-pos) (-> s1-0 start-pos) f28-0) + (vector+! (-> s1-0 start-pos) s2-0 (-> s1-0 start-pos)) + (set! (-> s1-0 start-pos y) (+ 20480.0 (-> s2-0 y))) + (set-vector! (-> s1-0 move-dist) 0.0 -61440.0 0.0 1.0) + (let ((v1-33 s1-0)) + (set! (-> v1-33 radius) 10240.0) + (set! (-> v1-33 collide-with) (-> arg0 root-prim prim-core collide-with)) + (set! (-> v1-33 ignore-process0) (-> arg0 process)) + (set! (-> v1-33 ignore-process1) #f) + (set! (-> v1-33 ignore-pat) (-> arg0 pat-ignore-mask)) + (set! (-> v1-33 action-mask) (collide-action solid)) + ) + (when (>= (probe-using-line-sphere *collide-cache* s1-0) 0.0) + (cond + ((and (or (= (-> s1-0 best-other-tri pat mode) (pat-mode ground)) + (= (-> s1-0 best-other-tri pat mode) (pat-mode halfpipe)) + ) + (and (= (-> s1-0 best-other-tri pat event) (pat-event none)) (< 0.7 (-> s1-0 best-other-tri normal y))) + ) + (set! (-> arg1 quad) (-> s1-0 best-other-tri intersect quad)) + (set! sv-560 (+ sv-560 1)) + (if (>= sv-560 2) + (return arg1) + ) + ) + ((and (= (-> s1-0 best-other-tri pat mode) (pat-mode wall)) + (< (+ 4096.0 (-> s2-0 y)) (-> s1-0 best-other-tri intersect y)) + ) + (goto cfg-38) + ) + ) + ) + (set! f24-0 (+ 4096.0 f24-0)) + ) + ) + ) + ) + (label cfg-38) + ) + ) + (the-as vector #f) + ) + +;; definition for function target-attack-up +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defun target-attack-up ((arg0 target) (arg1 symbol) (arg2 symbol)) + (when (send-event arg0 arg1 #f (static-attack-info :mask (vehicle-impulse-factor) ((id (the-as uint 2)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode arg2) + (test #t) + ) + ) + ) + (let ((s3-0 (find-ground-point (-> arg0 control) (new 'stack-no-clear 'vector) 8192.0 40960.0))) + (set! s3-0 (cond + (s3-0 + (empty) + s3-0 + ) + (else + (-> arg0 control last-trans-on-ground) + ) + ) + ) + (let* ((s2-1 (vector-! (new 'stack-no-clear 'vector) s3-0 (-> arg0 control trans))) + (f0-3 8192.0) + (f1-0 40960.0) + (v1-8 s2-1) + (f30-0 (fmax f0-3 (fmin f1-0 (sqrtf (+ (* (-> v1-8 x) (-> v1-8 x)) (* (-> v1-8 z) (-> v1-8 z))))))) + ) + (cond + ((< (fabs + (vector-dot + (-> arg0 control dynam gravity-normal) + (vector-! (new 'stack-no-clear 'vector) s3-0 (-> arg0 control trans)) + ) + ) + 40960.0 + ) + (vector-xz-normalize! s2-1 f30-0) + (send-event + arg0 + arg1 + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (the-as uint 2)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode arg2) + (vector s2-1) + (shove-up + (+ (lerp-scale 4096.0 16384.0 f30-0 4096.0 40960.0) (fmax 0.0 (- (-> s3-0 y) (-> arg0 control trans y)))) + ) + (angle 'up) + ) + ) + ) + ) + (else + (send-event + arg0 + arg1 + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (the-as uint 2)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode arg2) + (vector + (-> (new 'static 'attack-info :trans (new 'static 'vector :y 40960.0 :w 1.0) :speed (the-as float #x68a)) + trans + ) + ) + (shove-up (meters 10)) + (angle 'up) + (control 1.0) + ) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 56 of type collide-shape-moving +;; WARN: Return type mismatch int vs cshape-reaction-flags. +(defmethod react-to-pat! ((this collide-shape-moving) (arg0 pat-surface)) + (let ((s5-0 0)) + (set! (-> this cur-pat) arg0) + (set! (-> this poly-pat) arg0) + (case (-> arg0 material) + (((pat-material ice)) + (set! (-> this surf) *ice-surface*) + ) + (((pat-material gravel)) + (set! (-> this surf) *gravel-surface*) + ) + (((pat-material quicksand)) + (set! (-> this surf) *quicksand-surface*) + ) + (((pat-material mhshroom)) + (set! (-> this surf) *mushroom-surface*) + ) + (((pat-material tube)) + (set! (-> this surf) *no-walk-surface*) + ) + (else + (set! (-> this surf) *standard-ground-surface*) + ) + ) + (when (nonzero? (-> arg0 event)) + (case (-> arg0 event) + (((pat-event slide)) + (set! (-> this surf) *gravel-surface*) + (send-event (-> this process) 'slide) + ) + (((pat-event slippery)) + (set! (-> this surf) *gravel-surface*) + ) + (((pat-event rail)) + (let* ((s4-0 (-> this process)) + (a0-15 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (if (and a0-15 (not (logtest? (focus-status rail) (-> (the-as process-focusable a0-15) focus-status)))) + (set! (-> this surf) *rail-surface*) + ) + ) + ) + (((pat-event deadly)) + (set! s5-0 (logior s5-0 #x4000)) + (send-event + (-> this process) + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (the-as uint 2)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'deadly) + (shove-up (meters 3)) + ) + ) + ) + ) + (((pat-event burn)) + (set! s5-0 (logior s5-0 #x4000)) + (send-event + (-> this process) + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (the-as uint 2)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'burn) + (shove-up (meters 3)) + ) + ) + ) + ) + (((pat-event deadlyup)) + (set! s5-0 (logior s5-0 #x4000)) + (target-attack-up (the-as target (-> this process)) 'attack-or-shove 'deadlyup) + ) + (((pat-event shockup)) + (set! s5-0 (logior s5-0 #x4000)) + (target-attack-up (the-as target (-> this process)) 'attack-or-shove 'shockup) + ) + (((pat-event burnup)) + (when (not (focus-test? (the-as process-focusable (-> this process)) pilot)) + (set! s5-0 (logior s5-0 #x4000)) + (target-attack-up (the-as target (-> this process)) 'attack-or-shove 'burnup) + ) + ) + (((pat-event melt)) + (set! s5-0 (logior s5-0 #x4000)) + (send-event + (-> this process) + 'attack-invinc + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (the-as uint 2)) (damage 2.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'melt)) + ) + ) + ) + (((pat-event fry)) + (set! s5-0 (logior s5-0 #x4000)) + (send-event + (-> this process) + 'attack-invinc + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (the-as uint 2)) (damage 4.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'fry)) + ) + ) + ) + (((pat-event slime)) + (set! s5-0 (logior s5-0 #x4000)) + (send-event + (-> this process) + 'attack-invinc + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (the-as uint 2)) (damage 4.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'slime)) + ) + ) + ) + (((pat-event endlessfall)) + (set! s5-0 (logior s5-0 #x4000)) + (send-event + (-> this process) + 'attack-invinc + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (the-as uint 2)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'endlessfall) + ) + ) + ) + ) + (((pat-event shock)) + (set! s5-0 (logior s5-0 #x4000)) + (send-event + (-> this process) + 'attack-invinc + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (the-as uint 2)) (damage 2.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode 'shock)) + ) + ) + ) + (((pat-event lip)) + (send-event (-> this process) 'lip 'lip) + ) + (((pat-event lipramp)) + (send-event (-> this process) 'lip 'lipramp) + ) + (((pat-event hang)) + (send-event (-> this process) 'change-mode 'hang #f) + ) + ) + ) + (the-as cshape-reaction-flags s5-0) + ) + ) + +;; definition for function collide-shape-moving-angle-set! +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun collide-shape-moving-angle-set! ((arg0 collide-shape-moving) (arg1 vector) (arg2 vector)) + (set! (-> arg0 surface-normal quad) (-> arg1 quad)) + (set! (-> arg0 surface-angle) (vector-dot arg1 (-> arg0 dynam gravity-normal))) + (set! (-> arg0 poly-angle) (vector-dot (-> arg0 poly-normal) (-> arg0 dynam gravity-normal))) + (set! (-> arg0 touch-angle) + (fmax + (-> arg0 touch-angle) + (vector-dot arg1 (vector-normalize! (vector-negate! (new-stack-vector0) arg2) 1.0)) + ) + ) + 0 + (none) + ) + +;; definition for function cshape-reaction-update-state +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun cshape-reaction-update-state ((arg0 control-info) (arg1 collide-query) (arg2 vector)) + (local-vars (sv-48 vector) (sv-52 vector) (sv-56 collide-status) (sv-96 symbol)) + (set! sv-48 (new-stack-vector0)) + (set! sv-52 (new-stack-vector0)) + (set! sv-56 (collide-status)) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (vector-float*! a1-1 (-> arg1 move-dist) (-> arg1 best-dist)) + (move-by-vector! arg0 a1-1) + ) + (react-to-pat! arg0 (-> arg1 best-other-tri pat)) + (vector-! sv-48 (the-as vector (-> arg1 best-my-prim prim-core)) (-> arg1 best-other-tri intersect)) + (cond + ((and (= (-> arg1 best-dist) 0.0) + (< (vector-length sv-48) (+ -40.96 (-> arg1 best-my-prim prim-core world-sphere w))) + ) + (set! (-> sv-48 quad) (-> arg1 best-other-tri normal quad)) + (set! (-> arg0 coverage) 0.0) + ) + (else + (set! (-> sv-48 w) 1.0) + (vector-normalize! sv-48 1.0) + (set! (-> arg0 coverage) (vector-dot sv-48 (-> arg1 best-other-tri normal))) + (when (< (-> arg0 coverage) 0.0) + (set! (-> arg0 coverage) 0.0) + (vector-flatten! sv-48 sv-48 (-> arg1 best-other-tri normal)) + (vector-normalize! sv-48 1.0) + ) + ) + ) + (let ((v1-25 (-> sv-48 quad))) + (set! (-> sv-52 quad) v1-25) + ) + (if (= (-> arg1 best-dist) 0.0) + (move-by-vector! arg0 (vector-normalize-copy! (new-stack-vector0) sv-52 6.0)) + ) + (set! (-> arg0 poly-normal quad) (-> arg1 best-other-tri normal quad)) + (collide-shape-moving-angle-set! arg0 sv-52 arg2) + (if (< (-> arg0 poly-angle) -0.2) + (set! sv-56 (logior sv-56 (collide-status touch-ceiling))) + ) + (set! sv-96 (< (fabs (-> arg0 surface-angle)) (-> *pat-mode-info* (-> arg0 cur-pat mode) wall-angle))) + (set! sv-56 (logior sv-56 (collide-status touch-surface))) + (if (-> arg1 best-other-prim) + (set! sv-56 (logior sv-56 (collide-status touch-actor))) + ) + (cond + (sv-96 + (set! sv-56 (logior sv-56 (collide-status touch-wall))) + (set! (-> arg0 cur-pat mode) 1) + ) + (else + (set! sv-56 (logior sv-56 (collide-status on-surface))) + (set! (-> arg0 local-normal quad) (-> sv-52 quad)) + ) + ) + (when (and (not sv-96) (>= (-> arg0 coverage) 0.9)) + (set! sv-56 (logior sv-56 (collide-status on-ground))) + (set! (-> arg0 ground-poly-normal quad) (-> arg0 poly-normal quad)) + (when (!= (-> arg0 poly-pat mode) (pat-mode wall)) + (set! (-> arg0 ground-pat) (-> arg0 poly-pat)) + (set! (-> arg0 ground-touch-point quad) (-> arg1 best-other-tri intersect quad)) + ) + ) + (when (not (logtest? (-> arg0 prev-status) (collide-status on-surface))) + (set! sv-56 (logior sv-56 (collide-status impact-surface))) + (set! (-> arg0 ground-impact-vel) (- (vector-dot (-> arg0 transv) (-> arg0 dynam gravity-normal)))) + ) + (logior! (-> arg0 status) sv-56) + 0 + (none) + ) + +;; definition for function cshape-reaction-default +;; INFO: Used lq/sq +(defun cshape-reaction-default ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector)) + (cshape-reaction-update-state arg0 arg1 arg3) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (set! (-> a1-1 quad) (-> arg3 quad)) + (when (and (not (logtest? (-> arg0 prev-status) (collide-status on-surface))) + (not (logtest? (-> arg0 status) (collide-status touch-wall))) + ) + (let ((f0-1 (- 1.0 (-> arg0 surf impact-fric)))) + (when (< f0-1 1.0) + (let ((v1-9 (new-stack-vector0)) + (f1-3 (vector-dot (-> arg0 dynam gravity-normal) a1-1)) + ) + 0.0 + (vector-! v1-9 a1-1 (vector-float*! v1-9 (-> arg0 dynam gravity-normal) f1-3)) + (let* ((f2-2 (vector-length v1-9)) + (f3-0 f2-2) + ) + (if (< f1-3 0.0) + (set! f1-3 (* f1-3 f0-1)) + ) + (vector+! + a1-1 + (vector-float*! a1-1 (-> arg0 dynam gravity-normal) f1-3) + (vector-float*! v1-9 v1-9 (/ f2-2 f3-0)) + ) + ) + ) + ) + ) + ) + (vector-reflect-flat! arg2 a1-1 (-> arg0 surface-normal)) + ) + (-> arg0 status) + ) + +;; definition for function cshape-reaction-just-move +(defun cshape-reaction-just-move ((arg0 control-info) (arg1 collide-query) (arg2 vector)) + (vector-reset! arg2) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (vector-float*! a1-1 (-> arg1 move-dist) (-> arg1 best-dist)) + (move-by-vector! arg0 a1-1) + ) + (let ((v1-5 4)) + (if (-> arg1 best-other-prim) + (set! v1-5 (logior v1-5 32)) + ) + (let ((v0-1 (logior (-> arg0 status) v1-5))) + (set! (-> arg0 status) v0-1) + v0-1 + ) + ) + ) + +;; definition for method 66 of type collide-shape-moving +;; INFO: Used lq/sq +(defmethod step-collision! ((this collide-shape-moving) (arg0 vector) (arg1 vector) (arg2 float) (arg3 int)) + (local-vars (sv-592 int)) + (let ((s5-0 (new 'stack 'collide-query)) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (vector-float*! s2-0 arg1 (* arg2 (seconds-per-frame))) + (set! (-> s5-0 move-dist quad) (-> s2-0 quad)) + (set! (-> s5-0 best-dist) -100000000.0) + (set! (-> s5-0 best-my-prim) #f) + (set! (-> s5-0 best-other-prim) #f) + (let* ((s1-1 (-> this root-prim)) + (v1-5 *collide-cache*) + (s0-0 (the-as collide-cache-prim (-> v1-5 prims))) + ) + (set! sv-592 (-> v1-5 num-prims)) + (while (nonzero? sv-592) + (set! sv-592 (+ sv-592 -1)) + (when (logtest? (-> s1-1 prim-core collide-with) (-> s0-0 prim-core collide-as)) + (if (>= (-> s0-0 prim-core prim-type) 0) + (collide-with-collide-cache-prim-mesh s1-1 s5-0 s0-0) + (collide-with-collide-cache-prim-sphere s1-1 s5-0 s0-0) + ) + ) + (&+! s0-0 48) + ) + ) + (let ((f30-0 (-> s5-0 best-dist))) + (set! f30-0 (cond + ((>= f30-0 0.0) + (let ((s2-1 (new 'stack-no-clear 'vector))) + (if *display-collision-marks* + (set! (-> s2-1 quad) (-> arg1 quad)) + ) + (set! (-> this prev-status) ((-> this reaction) (the-as control-info this) s5-0 arg0 arg1)) + (when *display-collision-marks* + (let ((t1-0 (-> *pat-mode-info* (-> s5-0 best-other-tri pat mode) hilite-color))) + (add-debug-outline-triangle + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> s5-0 best-other-tri)) + (-> s5-0 best-other-tri vertex 1) + (-> s5-0 best-other-tri vertex 2) + t1-0 + ) + ) + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + (-> s5-0 best-other-tri intersect) + s2-1 + (meters 0.00007324219) + (new 'static 'rgba :r #xff :g #xa0 :a #x80) + ) + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + (-> s5-0 best-other-tri intersect) + arg0 + (meters 0.00007324219) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + ) + (if (= (-> this process type) target) + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + (-> s5-0 best-other-tri intersect) + (-> this surface-normal) + (meters 0.5) + (-> *pat-mode-info* (-> this cur-pat mode) hilite-color) + ) + ) + ) + ) + f30-0 + ) + (else + (set! (-> this reaction-flag) (cshape-reaction-flags)) + ((-> this no-reaction) this s5-0 arg0 arg1) + (set! (-> this prev-status) (collide-status)) + (move-by-vector! this s2-0) + (set! (-> arg0 quad) (-> arg1 quad)) + 1.0 + ) + ) + ) + f30-0 + ) + ) + ) + +;; definition for method 37 of type collide-shape +(defmethod integrate-and-collide! ((this collide-shape) (arg0 vector)) + (local-vars (at-0 int)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((t9-0 (method-of-object this move-by-vector!)) + (v1-1 (new 'stack-no-clear 'vector)) + ) + (.lvf vf1 (&-> arg0 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 (&-> v1-1 quad) vf1) + (t9-0 this v1-1) + ) + (none) + ) + ) + +;; definition for method 37 of type collide-shape-moving +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod integrate-and-collide! ((this collide-shape-moving) (arg0 vector)) + (update-transforms this) + (set! (-> this trans-old-old-old quad) (-> this trans-old-old quad)) + (set! (-> this trans-old-old quad) (-> this trans-old quad)) + (set! (-> this trans-old quad) (-> this trans quad)) + (set! (-> this prev-status) (-> this status)) + (logclear! (-> this status) (collide-status + on-surface + on-ground + touch-surface + touch-wall + touch-ceiling + touch-actor + on-special-surface + touch-edge + blocked + on-water + impact-surface + touch-background + stuck + glance + ) + ) + (when (not (logtest? (-> this root-prim prim-core action) (collide-action no-normal-reset))) + (let ((v1-13 (-> this dynam gravity-normal))) + (set! (-> this local-normal quad) (-> v1-13 quad)) + (set! (-> this surface-normal quad) (-> v1-13 quad)) + (set! (-> this poly-normal quad) (-> v1-13 quad)) + ) + (set! (-> this coverage) 0.0) + (set! (-> this touch-angle) 0.0) + ) + (let ((f30-0 1.0) + (s4-0 0) + ) + (while (and (< 0.05 f30-0) (and (< s4-0 (the-as int (-> this max-iteration-count))) + (not (and (= (-> arg0 x) 0.0) (= (-> arg0 y) 0.0) (= (-> arg0 z) 0.0))) + ) + ) + (let ((f28-0 (step-collision! this arg0 arg0 f30-0 s4-0))) + (update-from-step-size *touching-list* f28-0) + (set! f30-0 (- f30-0 (* f28-0 f30-0))) + ) + (+! s4-0 1) + ) + ) + 0 + (none) + ) + +;; definition for method 37 of type control-info +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod integrate-and-collide! ((this control-info) (arg0 vector)) + (stopwatch-start (the-as stopwatch (&-> *collide-stats* junk 1))) + (when (< 1638400.0 (vector-length arg0)) + (format 0 "WARNING: target vel is ~M m/s, reseting to zero.~%" (vector-length arg0)) + (vector-reset! arg0) + ) + (set! (-> this old-anim-collide-offset-world quad) (-> this anim-collide-offset-world quad)) + (vector-matrix*! + (-> this anim-collide-offset-world) + (-> this anim-collide-offset-local) + (-> this ctrl-orientation) + ) + (vector-! + (-> this anim-collide-offset-delta-world) + (-> this anim-collide-offset-world) + (-> this old-anim-collide-offset-world) + ) + (let ((a1-6 (vector-! (new 'stack-no-clear 'vector) (-> this draw-offset) (-> this anim-collide-offset-world)))) + (vector-seek! (-> this cspace-offset) a1-6 (* 16384.0 (seconds-per-frame))) + ) + (let ((a1-8 (vector+float*! + (new-stack-vector0) + (-> this collide-extra-velocity) + (-> this anim-collide-offset-delta-world) + 60.0 + ) + ) + ) + (when (< 0.0 (vector-length a1-8)) + (let ((s2-0 (-> this max-iteration-count)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 quad) (-> arg0 quad)) + (let ((s4-0 (-> this status))) + (let ((t9-4 (method-of-type collide-shape-moving integrate-and-collide!))) + (t9-4 this a1-8) + ) + (set! (-> this max-iteration-count) s2-0) + (set! (-> arg0 quad) (-> s3-0 quad)) + (logior! (-> this status) s4-0) + ) + ) + ) + ) + (let ((s3-1 (new-stack-vector0))) + (set! (-> s3-1 quad) (-> arg0 quad)) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (set! (-> s4-1 quad) (-> arg0 quad)) + (let ((t9-5 (method-of-type collide-shape-moving integrate-and-collide!))) + (t9-5 this s3-1) + ) + (let ((s1-0 (new-stack-vector0))) + (set! (-> s1-0 quad) (-> s4-1 quad)) + (let ((s2-1 (new-stack-vector0))) + (set! (-> s2-1 quad) (-> s3-1 quad)) + (let ((v1-32 (new-stack-vector0))) + (let ((f0-6 (vector-dot (-> this dynam gravity-normal) s1-0))) + 0.0 + (vector-! v1-32 s1-0 (vector-float*! v1-32 (-> this dynam gravity-normal) f0-6)) + ) + (let* ((f0-7 (vector-length v1-32)) + (f1-4 f0-7) + (f2-0 0.0) + ) + (vector+! + s1-0 + (vector-float*! s1-0 (-> this dynam gravity-normal) f2-0) + (vector-float*! v1-32 v1-32 (/ f0-7 f1-4)) + ) + ) + ) + (let ((v1-33 (new-stack-vector0))) + (let ((f0-10 (vector-dot (-> this dynam gravity-normal) s2-1))) + 0.0 + (vector-! v1-33 s2-1 (vector-float*! v1-33 (-> this dynam gravity-normal) f0-10)) + ) + (let* ((f0-11 (vector-length v1-33)) + (f1-6 f0-11) + (f2-1 0.0) + ) + (vector+! + s2-1 + (vector-float*! s2-1 (-> this dynam gravity-normal) f2-1) + (vector-float*! v1-33 v1-33 (/ f0-11 f1-6)) + ) + ) + ) + (vector-normalize! s1-0 1.0) + (vector-normalize! s2-1 1.0) + (let ((f0-14 (vector-dot s1-0 s2-1))) + (cond + ((and (!= (vector-length (-> this target-transv)) 0.0) + (if (logtest? (-> this status) (collide-status touch-wall)) + (< f0-14 0.9999) + (< f0-14 0.95) + ) + ) + (seek! (-> this blocked-factor) 1.0 (* 4.0 (seconds-per-frame))) + (seek! + (-> this blocked-in-air-factor) + (if (= (-> this mod-surface mode) 'air) + 1.0 + 0.0 + ) + (* 4.0 (seconds-per-frame)) + ) + (logior! (-> this status) (collide-status blocked)) + ) + (else + (seek! (-> this blocked-factor) 0.0 (* 2.0 (seconds-per-frame))) + (seek! (-> this blocked-in-air-factor) 0.0 (* 2.0 (seconds-per-frame))) + ) + ) + ) + ) + ) + (set! (-> arg0 quad) (-> s3-1 quad)) + (if (and (logtest? (-> this status) (collide-status on-surface)) + (and (not (logtest? (-> this status) (collide-status touch-wall blocked))) + (< (vector-length (-> this btransv)) (vector-length s4-1)) + ) + ) + (set! (-> this btransv quad) (-> s4-1 quad)) + ) + ) + ) + (let ((v1-67 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this align-xz-vel) 1.0)) + (f0-32 (vector-length (-> this align-xz-vel))) + ) + (set! (-> this zx-vel-frac) (if (= f0-32 0.0) + 0.0 + (fmax 0.0 (/ (vector-dot (-> this transv) v1-67) f0-32)) + ) + ) + ) + (stopwatch-stop (the-as stopwatch (&-> *collide-stats* junk 1))) + 0 + (none) + ) + +;; definition for method 64 of type collide-shape-moving +;; INFO: Used lq/sq +(defmethod try-snap-to-surface ((this collide-shape-moving) (arg0 vector) (arg1 float) (arg2 float) (arg3 float)) + (local-vars (at-0 int)) + (with-pp + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> gp-0 quad) (-> this trans quad)) + (vector-normalize-copy! (-> this trans) arg0 arg1) + (vector+! (-> this trans) (-> this trans) gp-0) + (update-transforms this) + (vector-normalize-copy! s2-0 arg0 (- arg2 arg1)) + (let ((v1-4 s2-0)) + (.lvf vf1 (&-> s2-0 quad)) + (let ((f0-2 (-> pp clock frames-per-second))) + (.mov at-0 f0-2) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> v1-4 quad) vf1) + ) + (set! (-> this prev-status) (-> this status)) + (logclear! (-> this status) (collide-status + on-surface + on-ground + touch-surface + touch-wall + touch-ceiling + touch-actor + on-special-surface + touch-edge + blocked + on-water + impact-surface + touch-background + stuck + glance + ) + ) + (when (not (logtest? (-> this root-prim prim-core action) (collide-action no-normal-reset))) + (let ((v1-13 (-> this dynam gravity-normal))) + (set! (-> this local-normal quad) (-> v1-13 quad)) + (set! (-> this surface-normal quad) (-> v1-13 quad)) + (set! (-> this poly-normal quad) (-> v1-13 quad)) + ) + (set! (-> this coverage) 0.0) + (set! (-> this touch-angle) 0.0) + ) + (let ((f30-0 (step-collision! this s2-0 s2-0 1.0 0))) + (update-from-step-size *touching-list* f30-0) + (cond + ((< f30-0 1.0) + (let ((s1-1 (new 'stack-no-clear 'vector)) + (s2-1 (new 'stack-no-clear 'vector)) + ) + (vector-normalize-copy! s1-1 arg0 1.0) + (vector-! s2-1 (-> this trans) gp-0) + (when (< (vector-dot s1-1 s2-1) arg3) + (vector-normalize-copy! s2-1 arg0 arg3) + (vector+! s2-1 s2-1 gp-0) + (move-to-point! this s2-1) + ) + ) + #t + ) + (else + (move-to-point! this gp-0) + #f + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 65 of type collide-shape-moving +(defmethod fill-and-try-snap-to-surface ((this collide-shape-moving) (arg0 vector) (arg1 float) (arg2 float) (arg3 float) (arg4 collide-query)) + (vector-normalize-copy! (-> arg4 start-pos) arg0 arg1) + (vector+! (-> arg4 start-pos) (-> arg4 start-pos) (-> this trans)) + (vector-normalize-copy! (-> arg4 move-dist) arg0 (- arg2 arg1)) + (fill-using-line-sphere *collide-cache* arg4) + (try-snap-to-surface this arg0 arg1 arg2 arg3) + ) + +;; definition for method 61 of type collide-shape-moving +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod move-to-ground-point ((this collide-shape-moving) (arg0 vector) (arg1 vector) (arg2 vector)) + (move-to-point! this arg0) + (set! (-> arg1 y) 0.0) + (set! (-> this ground-touch-point quad) (-> arg0 quad)) + (set! (-> this poly-normal quad) (-> arg2 quad)) + (set! (-> this surface-normal quad) (-> arg2 quad)) + (set! (-> this local-normal quad) (-> arg2 quad)) + (set! (-> this ground-poly-normal quad) (-> arg2 quad)) + (logior! (-> this status) (collide-status on-surface on-ground touch-surface)) + (set! (-> this ground-impact-vel) (- (vector-dot arg1 (-> this dynam gravity-normal)))) + 0 + (none) + ) + +;; definition for method 57 of type collide-shape-moving +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod integrate-no-collide! ((this collide-shape-moving) (arg0 vector)) + (local-vars (at-0 int)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (update-transforms this) + (set! (-> this trans-old-old-old quad) (-> this trans-old-old quad)) + (set! (-> this trans-old-old quad) (-> this trans-old quad)) + (set! (-> this trans-old quad) (-> this trans quad)) + (set! (-> this prev-status) (-> this status)) + (logclear! (-> this status) (collide-status + on-surface + on-ground + touch-surface + touch-wall + touch-ceiling + touch-actor + on-special-surface + touch-edge + blocked + on-water + impact-surface + touch-background + stuck + glance + ) + ) + (when (not (logtest? (-> this root-prim prim-core action) (collide-action no-normal-reset))) + (let ((v1-13 (-> this dynam gravity-normal))) + (set! (-> this local-normal quad) (-> v1-13 quad)) + (set! (-> this surface-normal quad) (-> v1-13 quad)) + (set! (-> this poly-normal quad) (-> v1-13 quad)) + ) + (set! (-> this coverage) 0.0) + (set! (-> this touch-angle) 0.0) + ) + (let ((t9-1 (method-of-object this move-by-vector!)) + (a1-5 (new 'stack-no-clear 'vector)) + ) + (.lvf vf1 (&-> arg0 quad)) + (let ((f0-2 (seconds-per-frame))) + (.mov at-0 f0-2) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> a1-5 quad) vf1) + (t9-1 this a1-5) + ) + 0 + (none) + ) + ) + +;; definition for method 58 of type collide-shape-moving +(defmethod integrate-for-enemy-no-mtg ((this collide-shape-moving) (arg0 vector) (arg1 overlaps-others-params)) + (integrate-no-collide! this arg0) + (let ((s5-1 (find-overlapping-shapes this arg1))) + (if s5-1 + (move-to-point! this (-> this trans-old)) + ) + s5-1 + ) + ) + +;; definition for method 55 of type collide-shape-moving +;; INFO: Used lq/sq +(defmethod find-ground ((this collide-shape-moving) + (arg0 collide-query) + (arg1 collide-spec) + (arg2 float) + (arg3 float) + (arg4 float) + (arg5 process) + ) + (set! (-> this gspot-pos quad) (-> this trans quad)) + (set! (-> arg0 start-pos quad) (-> this trans quad)) + (vector-reset! (-> arg0 move-dist)) + (let ((f0-0 (-> this transv y))) + (if (< f0-0 0.0) + (set! arg2 (- arg2 (fmax -40960.0 (* f0-0 (seconds-per-frame))))) + ) + ) + (+! (-> arg0 start-pos y) arg2) + (set! (-> arg0 move-dist y) (- (+ arg2 arg3))) + (let ((v1-7 arg0)) + (set! (-> v1-7 radius) arg4) + (set! (-> v1-7 collide-with) arg1) + (set! (-> v1-7 ignore-process0) (-> this process)) + (set! (-> v1-7 ignore-process1) arg5) + (set! (-> v1-7 ignore-pat) (logior (new 'static 'pat-surface :noendlessfall #x1) (-> this pat-ignore-mask))) + (set! (-> v1-7 action-mask) (collide-action solid)) + ) + (let ((f0-10 (fill-and-probe-using-line-sphere *collide-cache* arg0))) + (cond + ((>= f0-10 0.0) + (let ((v1-11 (vector+float*! (new 'stack-no-clear 'vector) (-> arg0 start-pos) (-> arg0 move-dist) f0-10))) + (set! (-> this gspot-pos y) (- (-> v1-11 y) arg4)) + (vector-! (-> this gspot-normal) v1-11 (-> arg0 best-other-tri intersect)) + ) + (vector-normalize! (-> this gspot-normal) 1.0) + #t + ) + (else + (set! (-> this gspot-pos y) -40959590.0) + (set! (-> this gspot-normal quad) (-> *y-vector* quad)) + #f + ) + ) + ) + ) + +;; definition for method 51 of type collide-shape +;; INFO: Used lq/sq +(defmethod above-ground? ((this collide-shape) + (arg0 collide-query) + (arg1 vector) + (arg2 collide-spec) + (arg3 float) + (arg4 float) + (arg5 float) + ) + (set! (-> arg0 start-pos quad) (-> arg1 quad)) + (+! (-> arg0 start-pos y) arg3) + (vector-reset! (-> arg0 move-dist)) + (set! (-> arg0 move-dist y) (- (+ arg3 arg4))) + (let ((v1-2 arg0)) + (set! (-> v1-2 radius) arg5) + (set! (-> v1-2 collide-with) arg2) + (set! (-> v1-2 ignore-process0) (-> this process)) + (set! (-> v1-2 ignore-process1) #f) + (set! (-> v1-2 ignore-pat) (-> this pat-ignore-mask)) + (set! (-> v1-2 action-mask) (collide-action solid)) + ) + (>= (fill-and-probe-using-line-sphere *collide-cache* arg0) 0.0) + ) + +;; definition for method 59 of type collide-shape-moving +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod move-above-ground ((this collide-shape-moving) (arg0 vector) (arg1 move-above-ground-params)) + (when *debug-segment* + (let ((s3-0 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-7 'collide) + (s2-0 *profile-collide-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-7) + (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 + ) + (set! (-> arg1 on-ground?) #f) + (set! (-> arg1 do-move?) #t) + (set! (-> arg1 old-gspot-pos quad) (-> this gspot-pos quad)) + (set! (-> arg1 old-gspot-normal quad) (-> this gspot-normal quad)) + (set! (-> this trans-old-old-old quad) (-> this trans-old-old quad)) + (set! (-> this trans-old-old quad) (-> this trans-old quad)) + (set! (-> this trans-old quad) (-> this trans quad)) + (set! (-> this prev-status) (-> this status)) + (vector-v+! (-> this trans) (-> this trans) arg0) + (set! (-> arg1 new-pos quad) (-> this trans quad)) + (let ((s3-1 (new 'stack-no-clear 'collide-query))) + (cond + ((find-ground this s3-1 (-> arg1 gnd-collide-with) (-> arg1 popup) 81920.0 1024.0 (the-as process #f)) + (when (>= (-> this gspot-pos y) (-> arg1 new-pos y)) + (set! (-> arg1 on-ground?) #t) + (set! (-> arg1 pat) (-> s3-1 best-other-tri pat)) + (set! (-> arg1 new-pos y) (-> s3-1 best-other-tri intersect y)) + (set! (-> this ground-impact-vel) (- (vector-dot arg0 (-> this dynam gravity-normal)))) + (set! (-> arg0 y) 0.0) + ) + ) + (else + (if (-> arg1 hover-if-no-ground?) + (set! (-> arg1 new-pos y) (-> this trans-old y)) + ) + ) + ) + ) + (set! (-> this trans quad) (-> this trans-old quad)) + (move-to-point! this (-> arg1 new-pos)) + (when (logtest? (logand (-> arg1 overlaps-params collide-with-filter) + (collide-spec hit-by-player-list hit-by-others-list player-list) + ) + (-> this root-prim prim-core collide-with) + ) + (when (find-overlapping-shapes this (-> arg1 overlaps-params)) + (when (-> arg1 dont-move-if-overlaps?) + (set! (-> arg1 do-move?) #f) + (move-to-point! this (-> this trans-old)) + (set! (-> this gspot-pos quad) (-> arg1 old-gspot-pos quad)) + (set! (-> this gspot-normal quad) (-> arg1 old-gspot-normal quad)) + ) + ) + ) + (when (-> arg1 do-move?) + (cond + ((-> arg1 on-ground?) + (let ((a1-8 (-> this gspot-pos)) + (a0-31 (-> this gspot-normal)) + (v1-59 (-> arg1 pat)) + ) + (set! (-> this ground-touch-point quad) (-> a1-8 quad)) + (set! (-> this poly-normal quad) (-> a0-31 quad)) + (set! (-> this surface-normal quad) (-> a0-31 quad)) + (set! (-> this local-normal quad) (-> a0-31 quad)) + (set! (-> this ground-poly-normal quad) (-> a0-31 quad)) + (set! (-> this poly-pat) v1-59) + (set! (-> this cur-pat) v1-59) + (set! (-> this ground-pat) v1-59) + ) + (logior! (-> this status) (collide-status on-surface on-ground touch-surface)) + ) + (else + (logclear! (-> this status) (collide-status + on-surface + on-ground + touch-surface + touch-wall + touch-ceiling + touch-actor + on-special-surface + touch-edge + blocked + on-water + impact-surface + touch-background + stuck + glance + ) + ) + (when (not (logtest? (-> this root-prim prim-core action) (collide-action no-normal-reset))) + (let ((v1-69 (-> this dynam gravity-normal))) + (set! (-> this local-normal quad) (-> v1-69 quad)) + (set! (-> this surface-normal quad) (-> v1-69 quad)) + (set! (-> this poly-normal quad) (-> v1-69 quad)) + ) + (set! (-> this coverage) 0.0) + (set! (-> this touch-angle) 0.0) + ) + ) + ) + ) + (when *debug-segment* + (let ((gp-1 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-83 (+ (-> gp-1 depth) -1)) + (s5-1 (-> gp-1 segment v1-83)) + (s4-1 (-> gp-1 base-time)) + ) + (when (>= v1-83 0) + (set! (-> s5-1 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-1)))) + (+! (-> gp-1 depth) -1) + ) + ) + ) + ) + 0 + ) + 0 + (none) + ) + +;; definition for method 60 of type collide-shape-moving +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod move-to-ground ((this collide-shape-moving) (arg0 float) (arg1 float) (arg2 symbol) (arg3 collide-spec)) + (local-vars (sv-576 profile-segment) (sv-592 int)) + (when *debug-segment* + (let ((s1-0 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-7 'collide) + (s0-0 *profile-collide-color*) + ) + (when (and *dproc* *debug-segment*) + (set! sv-576 (-> s1-0 data (-> s1-0 count))) + (set! sv-592 (-> s1-0 base-time)) + (set! (-> sv-576 name) v1-7) + (set! (-> sv-576 start-time) + (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint sv-592))) + ) + (set! (-> sv-576 depth) (the-as uint (-> s1-0 depth))) + (set! (-> sv-576 color) s0-0) + (set! (-> s1-0 segment (-> s1-0 depth)) sv-576) + (set! (-> s1-0 count) (min 1023 (+ (-> s1-0 count) 1))) + (+! (-> s1-0 depth) 1) + (set! (-> s1-0 max-depth) (max (-> s1-0 max-depth) (-> s1-0 depth))) + ) + ) + 0 + ) + (let ((s1-1 (new 'stack-no-clear 'collide-query))) + (cond + ((find-ground this s1-1 arg3 arg0 arg1 1024.0 (the-as process #f)) + (let ((a1-4 (new 'stack-no-clear 'vector))) + (set! (-> a1-4 quad) (-> this trans quad)) + (set! (-> a1-4 y) (-> s1-1 best-other-tri intersect y)) + (move-to-point! this a1-4) + ) + (let ((a1-5 (-> s1-1 best-other-tri intersect)) + (a0-21 (-> s1-1 best-other-tri normal)) + (v1-25 (-> s1-1 best-other-tri pat)) + ) + (set! (-> this ground-touch-point quad) (-> a1-5 quad)) + (set! (-> this poly-normal quad) (-> a0-21 quad)) + (set! (-> this surface-normal quad) (-> a0-21 quad)) + (set! (-> this local-normal quad) (-> a0-21 quad)) + (set! (-> this ground-poly-normal quad) (-> a0-21 quad)) + (set! (-> this poly-pat) v1-25) + (set! (-> this cur-pat) v1-25) + (set! (-> this ground-pat) v1-25) + ) + (logior! (-> this status) (collide-status on-surface on-ground touch-surface)) + #t + ) + (else + (logclear! (-> this status) (collide-status + on-surface + on-ground + touch-surface + touch-wall + touch-ceiling + touch-actor + on-special-surface + touch-edge + blocked + on-water + impact-surface + touch-background + stuck + glance + ) + ) + (when (not (logtest? (-> this root-prim prim-core action) (collide-action no-normal-reset))) + (let ((v1-36 (-> this dynam gravity-normal))) + (set! (-> this local-normal quad) (-> v1-36 quad)) + (set! (-> this surface-normal quad) (-> v1-36 quad)) + (set! (-> this poly-normal quad) (-> v1-36 quad)) + ) + (set! (-> this coverage) 0.0) + (set! (-> this touch-angle) 0.0) + ) + (if arg2 + (format 0 "WARNING: move-to-ground: failed to locate ground for ~S!~%" (-> this process name)) + ) + ) + ) + ) + (when *debug-segment* + (let ((gp-1 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-52 (+ (-> gp-1 depth) -1)) + (s5-1 (-> gp-1 segment v1-52)) + (s4-1 (-> gp-1 base-time)) + ) + (when (>= v1-52 0) + (set! (-> s5-1 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-1)))) + (+! (-> gp-1 depth) -1) + ) + ) + ) + ) + 0 + ) + (none) + ) + +;; definition for method 62 of type collide-shape-moving +;; INFO: Used lq/sq +(defmethod compute-acc-due-to-gravity ((this collide-shape-moving) (arg0 vector) (arg1 float)) + (let* ((s4-0 (vector-negate! (new 'stack-no-clear 'vector) (-> this dynam gravity))) + (a2-1 (-> this local-normal)) + (a2-2 (vector-reflect-flat! (new-stack-vector0) s4-0 a2-1)) + ) + (vector--float*! arg0 s4-0 a2-2 (cond + ((logtest? (-> this status) (collide-status on-surface)) + (empty) + arg1 + ) + (else + 0.0 + ) + ) + ) + ) + arg0 + ) + +;; definition for method 32 of type collide-shape +(defmethod fill-cache-integrate-and-collide ((this collide-shape) (arg0 vector) (arg1 collide-query) (arg2 meters)) + (local-vars (at-0 int)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (let ((a0-1 v1-0)) + (.lvf vf1 (&-> arg0 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-1 quad) vf1) + ) + (fill-cache-for-shape this (+ (vector-length v1-0) arg2) arg1) + ) + (integrate-and-collide! this arg0) + (none) + ) + ) + +;; definition for method 31 of type collide-shape +;; WARN: Return type mismatch int vs none. +(defmethod fill-cache-for-shape ((this collide-shape) (arg0 float) (arg1 collide-query)) + (cond + ((build-bounding-box-for-shape this (-> arg1 bbox) arg0 (-> arg1 collide-with)) + (fill-using-bounding-box *collide-cache* arg1) + (if (and *display-collide-cache* (or (= (-> this process type) target) (= (-> this process) *debug-actor*))) + (debug-draw *collide-cache*) + ) + ) + (else + (reset *collide-cache*) + ) + ) + 0 + (none) + ) + +;; definition for method 36 of type collide-shape +(defmethod build-bounding-box-for-shape ((this collide-shape) (arg0 bounding-box) (arg1 float) (arg2 collide-spec)) + (rlet ((vf0 :class vf) + (vf24 :class vf) + (vf25 :class vf) + (vf26 :class vf) + (vf27 :class vf) + (vf28 :class vf) + (vf29 :class vf) + (vf30 :class vf) + (vf31 :class vf) + ) + (init-vf0-vector) + (let ((t0-0 (new 'static 'vector :x 4.096)) + (v1-0 (-> this root-prim)) + ) + (.mov vf31 arg1) + (let ((a0-2 (logand (-> v1-0 prim-core collide-with) arg2)) + (a2-1 (-> v1-0 prim-core prim-type)) + ) + (b! (zero? a0-2) cfg-9 :delay (.lvf vf28 (&-> t0-0 quad))) + (.add.x.vf vf31 vf31 vf28 :mask #b1) + (let ((a0-3 (-> v1-0 specific 0))) + (b! (zero? a2-1) cfg-3 :delay (.lvf vf24 (&-> v1-0 prim-core world-sphere quad))) + (.add.w.vf vf25 vf31 vf24 :mask #b1) + (.add.x.vf vf30 vf24 vf25 :mask #b111) + (b! #t cfg-10 :delay (.sub.x.vf vf29 vf24 vf25 :mask #b111)) + (label cfg-3) + (b! (zero? a0-3) cfg-9 :delay (set! v1-0 (+ v1-0 80))) + (+! a0-3 -1) + (let ((a2-3 (logand (-> v1-0 prim-core collide-with) arg2))) + (.lvf vf24 (&-> v1-0 prim-core world-sphere quad)) + (b! (zero? a2-3) cfg-3 :delay (.add.w.vf vf25 vf31 vf24 :mask #b1)) + ) + (.add.x.vf vf30 vf24 vf25 :mask #b111) + (.sub.x.vf vf29 vf24 vf25 :mask #b111) + (label cfg-6) + (b! (zero? a0-3) cfg-10 :delay (set! v1-0 (+ v1-0 80))) + (+! a0-3 -1) + ) + ) + (let ((a2-5 (logand (-> v1-0 prim-core collide-with) arg2))) + (.lvf vf24 (&-> v1-0 prim-core world-sphere quad)) + (b! (zero? a2-5) cfg-6 :delay (.add.w.vf vf25 vf31 vf24 :mask #b1)) + ) + ) + (.add.x.vf vf27 vf24 vf25 :mask #b111) + (.sub.x.vf vf26 vf24 vf25 :mask #b111) + (.min.vf vf29 vf29 vf26) + (.max.vf vf30 vf30 vf27) + (b! #t cfg-6 :delay (nop!)) + (label cfg-9) + (let ((v0-0 #f)) + (b! #t cfg-11 :delay (nop!)) + (label cfg-10) + (.mov.vf vf29 vf0 :mask #b1000) + (.mov.vf vf30 vf0 :mask #b1000) + (.svf (&-> arg0 min quad) vf29) + (.svf (&-> arg0 max quad) vf30) + (set! v0-0 #t) + (label cfg-11) + v0-0 + ) + ) + ) + +;; definition for method 33 of type collide-shape +(defmethod find-prim-by-id ((this collide-shape) (arg0 uint)) + (let ((v1-0 (-> this root-prim))) + (countdown (a0-1 (-> this total-prims)) + (if (= (-> v1-0 prim-id) arg0) + (return v1-0) + ) + (&+! v1-0 80) + ) + ) + (the-as collide-shape-prim #f) + ) + +;; definition for method 34 of type collide-shape +(defmethod find-prim-by-id-logtest ((this collide-shape) (arg0 uint)) + (let ((v1-0 (-> this root-prim))) + (countdown (a0-1 (-> this total-prims)) + (if (logtest? (-> v1-0 prim-id) arg0) + (return v1-0) + ) + (&+! v1-0 80) + ) + ) + (the-as collide-shape-prim #f) + ) + +;; definition (debug) for function collide-shape-draw-debug-marks +;; WARN: Return type mismatch int vs none. +(defun-debug collide-shape-draw-debug-marks () + (add-debug-sphere + (or *display-collision-marks* *display-target-marks*) + (bucket-id debug) + (target-pos 0) + (meters 0.2) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + ) + (when *display-collision-marks* + (let ((v1-4 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((gp-1 (-> v1-4 next0))) + (while (!= v1-4 (-> *collide-player-list* alive-list-end)) + (let ((a0-4 (the-as collide-shape (-> (the-as connection v1-4) param1)))) + (if (or (not *debug-actor*) (= (-> a0-4 process) *target*) (= (-> a0-4 process) *debug-actor*)) + (debug-draw a0-4) + ) + ) + (set! v1-4 gp-1) + *collide-player-list* + (set! gp-1 (-> gp-1 next0)) + ) + ) + ) + (let ((v1-15 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((gp-2 (-> v1-15 next0))) + (while (!= v1-15 (-> *collide-hit-by-player-list* alive-list-end)) + (let ((a0-11 (the-as collide-shape (-> (the-as connection v1-15) param1)))) + (if (or (not *debug-actor*) (= (-> a0-11 process) *target*) (= (-> a0-11 process) *debug-actor*)) + (debug-draw a0-11) + ) + ) + (set! v1-15 gp-2) + *collide-hit-by-player-list* + (set! gp-2 (-> gp-2 next0)) + ) + ) + ) + (let ((v1-26 (-> *collide-hit-by-others-list* alive-list next0))) + *collide-hit-by-others-list* + (let ((gp-3 (-> v1-26 next0))) + (while (!= v1-26 (-> *collide-hit-by-others-list* alive-list-end)) + (let ((a0-18 (the-as collide-shape (-> (the-as connection v1-26) param1)))) + (if (or (not *debug-actor*) (= (-> a0-18 process) *target*) (= (-> a0-18 process) *debug-actor*)) + (debug-draw a0-18) + ) + ) + (set! v1-26 gp-3) + *collide-hit-by-others-list* + (set! gp-3 (-> gp-3 next0)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 30 of type collide-shape +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this collide-shape)) + (if (sphere-in-view-frustum? (the-as sphere (-> this root-prim prim-core))) + (debug-draw (-> this root-prim)) + ) + 0 + (none) + ) + +;; definition for symbol *col-timer*, type stopwatch +(define *col-timer* (new 'global 'stopwatch)) + +;; definition for symbol *frame-timer*, type stopwatch +(define *frame-timer* (new 'global 'stopwatch)) + +;; definition for symbol *col-timer-enable*, type symbol +(define *col-timer-enable* #t) + +;; definition for function debug-report-col-stats +(defun debug-report-col-stats () + (when *col-timer-enable* + (stopwatch-end *frame-timer*) + (format *stdcon* "col stats:~%") + (format *stdcon* " col ~F ms~%" (* 1000.0 (stopwatch-elapsed-seconds *col-timer*))) + (format *stdcon* " frame ~F ms~%" (* 1000.0 (stopwatch-elapsed-seconds *frame-timer*))) + (stopwatch-init *col-timer*) + (stopwatch-init *frame-timer*) + (stopwatch-begin *frame-timer*) + ) + ) + +;; definition for method 46 of type collide-shape +;; WARN: Return type mismatch int vs none. +(defmethod update-transforms ((this collide-shape)) + (local-vars (v1-8 float) (a1-5 float) (a1-7 float)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (-> this root-prim)) + (v1-1 (-> this process node-list)) + ) + (cond + ((nonzero? v1-1) + (countdown (a0-1 (-> this total-prims)) + (let ((a1-0 (-> s5-0 transform-index))) + (cond + ((>= a1-0 0) + (let ((a1-4 (-> v1-1 data a1-0 bone transform))) + (.lvf vf5 (&-> a1-4 trans quad)) + (.lvf vf1 (&-> s5-0 local-sphere quad)) + (.lvf vf2 (&-> a1-4 rvec quad)) + (.mul.w.vf acc vf5 vf0) + (.div.vf Q vf0 vf5 :fsf #b11 :ftf #b11) + (.lvf vf3 (&-> a1-4 uvec quad)) + (.add.mul.x.vf acc vf2 vf1 acc) + (.lvf vf4 (&-> a1-4 fvec quad)) + ) + (.add.mul.y.vf acc vf3 vf1 acc) + (.add.mul.z.vf vf1 vf4 vf1 acc :mask #b111) + (.mul.vf vf1 vf1 Q :mask #b111) + (.svf (&-> s5-0 prim-core world-sphere quad) vf1) + (.mov a1-5 vf1) + ) + (else + (when (= a1-0 -2) + (.lvf vf1 (&-> s5-0 local-sphere quad)) + (.lvf vf2 (&-> this trans quad)) + (.add.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> s5-0 prim-core world-sphere quad) vf1) + (.mov a1-7 vf1) + ) + ) + ) + ) + (&+! s5-0 80) + ) + ) + (else + (countdown (s4-0 (-> this total-prims)) + (case (-> s5-0 transform-index) + ((-3) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (vector-orient-by-quat! s3-0 (-> s5-0 local-sphere) (-> this quat)) + (vector+! (the-as vector (-> s5-0 prim-core)) s3-0 (-> this trans)) + ) + (set! (-> s5-0 prim-core world-sphere w) (-> s5-0 local-sphere w)) + ) + ((-2) + (.lvf vf1 (&-> s5-0 local-sphere quad)) + (.lvf vf2 (&-> this trans quad)) + (.add.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> s5-0 prim-core world-sphere quad) vf1) + (.mov v1-8 vf1) + ) + ) + (&+! s5-0 80) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 28 of type collide-shape +;; WARN: Return type mismatch int vs none. +(defmethod move-by-vector! ((this collide-shape) (arg0 vector)) + (vector+! (-> this trans) (-> this trans) arg0) + (let ((v1-1 (-> this root-prim))) + (countdown (a0-1 (-> this total-prims)) + (vector+! (the-as vector (-> v1-1 prim-core)) (the-as vector (-> v1-1 prim-core)) arg0) + (set! (-> v1-1 prim-core world-sphere w) (-> v1-1 local-sphere w)) + (&+! v1-1 80) + ) + ) + 0 + (none) + ) + +;; definition for method 29 of type collide-shape +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod move-to-point! ((this collide-shape) (arg0 vector)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (vector-! v1-0 arg0 (-> this trans)) + (set! (-> this trans quad) (-> arg0 quad)) + (let ((a1-2 (-> this root-prim))) + (countdown (a0-1 (-> this total-prims)) + (vector+! (the-as vector (-> a1-2 prim-core)) (the-as vector (-> a1-2 prim-core)) v1-0) + (set! (-> a1-2 prim-core world-sphere w) (-> a1-2 local-sphere w)) + (&+! a1-2 80) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 47 of type collide-shape +;; WARN: Return type mismatch int vs none. +(defmethod set-collide-with! ((this collide-shape) (arg0 collide-spec)) + (let ((v1-0 (-> this root-prim))) + (countdown (a0-1 (-> this total-prims)) + (set! (-> v1-0 prim-core collide-with) arg0) + (nop!) + (nop!) + (&+! v1-0 80) + ) + ) + 0 + (none) + ) + +;; definition for method 48 of type collide-shape +;; WARN: Return type mismatch int vs none. +(defmethod set-collide-as! ((this collide-shape) (arg0 collide-spec)) + (let ((v1-0 (-> this root-prim))) + (countdown (a0-1 (-> this total-prims)) + (set! (-> v1-0 prim-core collide-as) arg0) + (nop!) + (nop!) + (&+! v1-0 80) + ) + ) + 0 + (none) + ) + +;; definition for method 53 of type collide-shape +;; WARN: Return type mismatch int vs none. +(defmethod iterate-prims ((this collide-shape) (arg0 (function collide-shape-prim none))) + (let ((s5-0 (-> this root-prim))) + (countdown (s4-0 (-> this total-prims)) + (arg0 s5-0) + (&+! s5-0 80) + ) + ) + 0 + (none) + ) + +;; definition for method 38 of type collide-shape +;; WARN: Return type mismatch int vs none. +(defmethod find-collision-meshes ((this collide-shape)) + (let ((s5-0 (-> this root-prim)) + (s4-0 0) + ) + (let ((v1-0 (-> s5-0 prim-core prim-type))) + (cond + ((= v1-0 1) + (set! s4-0 1) + ) + ((zero? v1-0) + (set! s4-0 (the-as int (-> s5-0 specific 1))) + (&+! s5-0 80) + ) + ) + ) + (when (nonzero? s4-0) + (let ((s3-0 0)) + (let ((v1-7 (-> this process draw)) + (s2-0 (the-as (array collide-mesh) #f)) + ) + (when (and (nonzero? v1-7) (-> v1-7 jgeo)) + (set! s2-0 (res-lump-struct (-> v1-7 jgeo extra) 'collide-mesh-group (array collide-mesh))) + (when s2-0 + (countdown (s1-0 s4-0) + (when (= (-> s5-0 prim-core prim-type) 1) + (let ((s0-0 (-> (the-as collide-shape-prim-mesh s5-0) mesh-id))) + (cond + ((and (>= s0-0 0) (< s0-0 (length s2-0))) + (set! (-> (the-as collide-shape-prim-mesh s5-0) mesh) (-> s2-0 s0-0)) + ) + (else + (set! (-> (the-as collide-shape-prim-mesh s5-0) mesh) #f) + (+! s3-0 1) + ) + ) + ) + ) + (set! s5-0 (&+ (the-as collide-shape-prim-mesh s5-0) 80)) + ) + ) + ) + (when (not s2-0) + (while (nonzero? s4-0) + (+! s4-0 -1) + (when (= (-> (the-as collide-shape-prim-mesh s5-0) prim-core prim-type) 1) + (set! (-> (the-as collide-shape-prim-mesh s5-0) mesh) #f) + (+! s3-0 1) + ) + (set! s5-0 (&+ (the-as collide-shape-prim-mesh s5-0) 80)) + ) + ) + ) + (if (nonzero? s3-0) + (format 0 "ERROR: Failed to find collision meshes for ~D prim(s) in ~A!~%" s3-0 (-> this process name)) + ) + ) + ) + ) + (update-transforms this) + 0 + (none) + ) + +;; definition for method 9 of type collide-shape-prim +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this collide-shape-prim)) + (add-debug-sphere + #t + (bucket-id debug) + (the-as vector (-> this prim-core)) + (-> this local-sphere w) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x40) + ) + 0 + (none) + ) + +;; definition for method 9 of type collide-shape-prim-sphere +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this collide-shape-prim-sphere)) + (add-debug-sphere + #t + (bucket-id debug) + (the-as vector (-> this prim-core)) + (-> this local-sphere w) + (cond + ((and (zero? (-> this prim-core collide-as)) (zero? (-> this prim-core collide-with))) + (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x40) + ) + ((logtest? (-> this prim-core action) (collide-action solid)) + (new 'static 'rgba :r #xff :g #xff :a #x40) + ) + (else + (new 'static 'rgba :r #xff :g #x80 :a #x40) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 9 of type collide-shape-prim-mesh +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this collide-shape-prim-mesh)) + (add-debug-sphere + #t + (bucket-id debug) + (the-as vector (-> this prim-core)) + (-> this local-sphere w) + (new 'static 'rgba :b #xff :a #x40) + ) + 0 + (none) + ) + +;; definition for method 9 of type collide-shape-prim-group +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this collide-shape-prim-group)) + (add-debug-sphere + #t + (bucket-id debug) + (the-as vector (-> this prim-core)) + (-> this local-sphere w) + (new 'static 'rgba :g #xff :a #x10) + ) + (countdown (s5-0 (-> this num-children)) + (debug-draw (-> this child s5-0)) + ) + 0 + (none) + ) + +;; definition for method 45 of type collide-shape +;; INFO: Used lq/sq +(defmethod do-push-aways ((this collide-shape)) + (local-vars (at-0 int) (v1-55 float) (a2-5 float) (a2-12 float)) + (with-pp + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (new 'stack-no-clear 'do-push-aways-work))) + (set! (-> gp-0 cspec) (collide-spec)) + (let ((s4-0 (-> this root-prim prim-core collide-with))) + (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) + ) + ) + (when (logtest? s4-0 (collide-spec player-list)) + (let ((a0-2 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((v1-13 (-> 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? s4-0 (-> a1-1 prim-core collide-as)) + (let ((a1-2 (-> a1-1 prim-core))) + (let ((a2-4 a1-2) + (a3-2 (-> this root-prim prim-core)) + ) + (.lvf vf2 (&-> a2-4 world-sphere quad)) + (.lvf vf3 (&-> a3-2 world-sphere 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 root-prim prim-core world-sphere w))) + ) + (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-13) + *collide-player-list* + (set! v1-13 (-> v1-13 next0)) + ) + ) + ) + ) + (when (logtest? s4-0 (collide-spec hit-by-player-list)) + (let ((a0-5 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((v1-21 (-> a0-5 next0))) + (while (!= a0-5 (-> *collide-hit-by-player-list* alive-list-end)) + (let* ((a0-6 (-> (the-as connection a0-5) param1)) + (a1-14 (-> (the-as collide-shape-moving a0-6) root-prim)) + ) + (when (logtest? s4-0 (-> a1-14 prim-core collide-as)) + (let ((a1-15 (-> a1-14 prim-core))) + (let ((a2-11 a1-15) + (a3-4 (-> this root-prim prim-core)) + ) + (.lvf vf2 (&-> a2-11 world-sphere quad)) + (.lvf vf3 (&-> a3-4 world-sphere 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-15 world-sphere w) (-> this root-prim prim-core world-sphere w))) + ) + (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-21) + *collide-hit-by-player-list* + (set! v1-21 (-> v1-21 next0)) + ) + ) + ) + ) + (dotimes (s3-0 *actor-list-length*) + (let* ((s1-0 (-> *actor-list* s3-0)) + (s2-0 (-> s1-0 root-prim)) + ) + (when (logtest? s4-0 (-> s2-0 prim-core collide-as)) + (when (!= (-> this process) (-> s1-0 process)) + (when (and (should-push-away this s1-0 (-> gp-0 cquery)) (>= -81.92 (-> gp-0 cquery best-dist))) + (set! (-> gp-0 cquery collide-with) (-> s1-0 root-prim prim-core collide-with)) + (set! (-> gp-0 cquery ignore-process0) (-> s1-0 process)) + (set! (-> gp-0 cquery ignore-process1) #f) + (set! (-> gp-0 cquery ignore-pat) (-> s1-0 pat-ignore-mask)) + (set! (-> gp-0 cquery action-mask) (collide-action solid)) + (-> gp-0 cquery) + (fill-cache-for-shape s1-0 8192.0 (-> gp-0 cquery)) + (let ((s4-1 3)) + (until (or (<= s4-1 0) (not (should-push-away this s1-0 (-> gp-0 cquery)))) + (set! (-> gp-0 vec33 quad) (-> s1-0 trans quad)) + (let* ((f0-4 (+ 2867.2 (-> gp-0 vec33 y))) + (f2-2 (+ 5734.4 f0-4)) + (f1-11 (-> gp-0 cquery best-other-tri intersect y)) + ) + (cond + ((< f1-11 f0-4) + (set! f1-11 f0-4) + ) + ((< f2-2 f1-11) + (set! f1-11 f2-2) + ) + ) + (set! (-> gp-0 vec33 y) f1-11) + ) + (.lvf vf4 (&-> (-> gp-0 vec33) quad)) + (.lvf vf3 (&-> (-> gp-0 cquery) best-other-tri intersect quad)) + (.lvf vf5 (&-> (-> gp-0 cquery) best-other-tri normal quad)) + (.sub.vf vf2 vf4 vf3) + (.mul.vf vf1 vf5 vf2) + (.add.x.vf vf1 vf1 vf1 :mask #b10) + (.add.z.vf vf1 vf1 vf1 :mask #b10) + (.mov v1-55 vf1) + (b! (< (the-as int v1-55) 0) cfg-35 :likely-delay (.sub.vf vf2 vf0 vf2)) + (label cfg-35) + (.svf (&-> (-> gp-0 push-vel) quad) vf2) + (vector-normalize! (-> gp-0 push-vel) 1.0) + (vector-float*! (-> gp-0 push-vel) (-> gp-0 push-vel) (- (-> gp-0 cquery best-dist))) + (let ((v1-59 (-> gp-0 push-vel))) + (.lvf vf1 (&-> (-> gp-0 push-vel) quad)) + (let ((f0-7 (-> pp clock frames-per-second))) + (.mov at-0 f0-7) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> v1-59 quad) vf1) + ) + (let ((s0-0 (-> (the-as collide-shape-moving s1-0) status))) + (integrate-and-collide! (the-as collide-shape-moving s1-0) (-> gp-0 push-vel)) + (set! (-> (the-as collide-shape-moving s1-0) status) s0-0) + ) + (+! s4-1 -1) + ) + (if (zero? s4-1) + (logior! (-> gp-0 cspec) (-> s2-0 prim-core collide-as)) + ) + ) + (set! s4-0 (-> this root-prim prim-core collide-with)) + ) + ) + ) + ) + ) + ) + (-> gp-0 cspec) + ) + ) + ) + ) + +;; definition for method 40 of type collide-shape +;; WARN: Return type mismatch object vs symbol. +(defmethod find-overlapping-shapes ((this collide-shape) (arg0 overlaps-others-params)) + (local-vars (a0-10 float) (a0-14 uint) (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) + (let ((gp-0 (the-as object #f))) + (let* ((s3-0 (-> this root-prim)) + (s2-0 (the-as uint (logand (-> s3-0 prim-core collide-with) (-> arg0 collide-with-filter)))) + ) + (set! (-> arg0 filtered-root-collide-with) (the-as collide-spec s2-0)) + (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) + ) + (label cfg-2) + (b! (not (logtest? (the-as collide-spec s2-0) 1024)) cfg-11 :delay (empty-form)) + (let ((a0-3 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((v1-12 (-> a0-3 next0))) + (b! #t cfg-9 :delay (nop!)) + (label cfg-4) + (let ((a0-4 (-> (the-as connection a0-3) param1))) + (let ((a1-2 (-> (the-as collide-shape a0-4) root-prim))) + (b! (not (logtest? (the-as collide-spec s2-0) (-> a1-2 prim-core collide-as))) cfg-8 :delay (empty-form)) + (let ((a1-3 (-> a1-2 prim-core))) + (let ((a2-4 a1-3) + (a3-1 (-> s3-0 prim-core)) + ) + (.lvf vf2 (&-> a2-4 world-sphere quad)) + (.lvf vf3 (&-> a3-1 world-sphere 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-3 world-sphere w) (-> s3-0 prim-core world-sphere w))) + ) + (b! (>= f0-0 (* f1-1 f1-1)) cfg-8 :delay #f) + ) + ) + ) + (b! (>= *actor-list-length* 256) cfg-8 :delay #f) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-4)) + ) + (set! *actor-list-length* (+ *actor-list-length* 1)) + (label cfg-8) + (set! a0-3 v1-12) + *collide-player-list* + (set! v1-12 (-> v1-12 next0)) + ) + (label cfg-9) + (b! (!= a0-3 (-> *collide-player-list* alive-list-end)) cfg-4 :delay (nop!)) + ) + (label cfg-11) + (b! (not (logtest? (the-as collide-spec s2-0) 256)) cfg-20 :delay (empty-form)) + (let ((a0-6 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((v1-20 (-> a0-6 next0))) + (b! #t cfg-18 :delay (nop!)) + (label cfg-13) + (let ((a0-7 (-> (the-as connection a0-6) param1))) + (let ((a1-14 (-> (the-as collide-shape-moving a0-7) root-prim))) + (b! (not (logtest? (the-as collide-spec s2-0) (-> a1-14 prim-core collide-as))) cfg-17 :delay (empty-form)) + (let ((a1-15 (-> a1-14 prim-core))) + (let ((a2-11 a1-15) + (a3-2 (-> s3-0 prim-core)) + ) + (.lvf vf2 (&-> a2-11 world-sphere quad)) + (.lvf vf3 (&-> a3-2 world-sphere 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-15 world-sphere w) (-> s3-0 prim-core world-sphere w))) + ) + (b! (>= f0-1 (* f1-5 f1-5)) cfg-17 :delay #f) + ) + ) + ) + (b! (>= *actor-list-length* 256) cfg-17 :delay #f) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-7)) + ) + (set! *actor-list-length* (+ *actor-list-length* 1)) + (label cfg-17) + (set! a0-6 v1-20) + *collide-hit-by-player-list* + (set! v1-20 (-> v1-20 next0)) + ) + (label cfg-18) + (b! (!= a0-6 (-> *collide-hit-by-player-list* alive-list-end)) cfg-13 :delay (nop!)) + ) + (label cfg-20) + (let ((s1-0 0)) + (b! #t cfg-30 :delay (nop!)) + (label cfg-21) + (let ((s0-0 (-> *actor-list* s1-0))) + (let ((a2-15 (-> s0-0 root-prim))) + (b! (not (logtest? (the-as collide-spec s2-0) (-> a2-15 prim-core collide-as))) cfg-29 :delay (empty-form)) + (.lvf vf1 (&-> s3-0 prim-core world-sphere quad)) + (.lvf vf2 (&-> a2-15 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) + (let ((v1-28 (-> this process))) + (.mov a0-10 vf3) + (let ((a1-26 (-> s0-0 process))) + (b! (< f0-2 a0-10) cfg-28) + (b! (= v1-28 a1-26) cfg-28 :delay (nop!)) + ) + ) + ) + (let ((v1-30 (overlaps-others-test s3-0 arg0 a2-15))) + (.lvf vf1 (&-> s3-0 prim-core world-sphere quad)) + (b! (= v1-30 #f) cfg-28 :delay (set! s2-0 (the-as uint (-> arg0 filtered-root-collide-with)))) + ) + ) + (let ((a0-12 (-> (the-as (pointer uint64) arg0) 0)) + (v1-31 (-> this penetrate-using)) + ) + (b! (not (logtest? a0-12 4)) cfg-27 :delay (set! a0-14 (the-as uint (-> arg0 tlist)))) + (b! (logtest? (-> s0-0 penetrated-by) v1-31) cfg-28 :delay (nop!)) + ) + ) + (label cfg-27) + (b! (= a0-14 #f) cfg-32 :delay (set! gp-0 0)) + (label cfg-28) + 0 + (label cfg-29) + (+! s1-0 1) + (label cfg-30) + (b! (< s1-0 *actor-list-length*) cfg-21) + ) + ) + (label cfg-32) + (b! (= (the-as uint gp-0) #f) cfg-34 :delay (nop!)) + (set! gp-0 #t) + (label cfg-34) + (the-as symbol gp-0) + ) + ) + ) + +;; definition for method 12 of type collide-shape-prim +(defmethod overlaps-others-test ((this collide-shape-prim) (arg0 overlaps-others-params) (arg1 collide-shape-prim)) + (format 0 "ERROR: Unsupported call to collide-shape-prim::overlaps-others-test!~%") + #f + ) + +;; definition for method 12 of type collide-shape-prim-group +;; WARN: Return type mismatch object vs symbol. +(defmethod overlaps-others-test ((this collide-shape-prim-group) (arg0 overlaps-others-params) (arg1 collide-shape-prim)) + (local-vars (a0-3 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 (the-as collide-shape-prim this)) + (v1-0 (-> arg1 prim-core collide-as)) + (s2-0 (the-as object #f)) + ) + (let ((a1-1 (-> arg0 collide-with-filter))) + (nop!) + (let ((s3-0 (-> this num-children)) + (v1-1 (logand v1-0 a1-1)) + ) + (.lvf vf1 (&-> arg1 prim-core world-sphere quad)) + (nop!) + (set! (-> arg0 filtered-other-collide-as) v1-1) + (label cfg-1) + (b! (zero? s3-0) cfg-6 :delay (set! s4-0 (+ s4-0 80))) + (+! s3-0 -1) + (let ((a0-2 (logand (-> s4-0 prim-core collide-with) v1-1))) + (.lvf vf2 (&-> s4-0 prim-core world-sphere quad)) + (b! (zero? a0-2) cfg-1 :delay (.sub.vf vf3 vf2 vf1)) + ) + (.add.w.vf vf4 vf2 vf1 :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-0 0.0)) + (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.mov a0-3 vf3) + (b! (< f0-0 a0-3) cfg-1) + ) + (let ((a0-5 (overlaps-others-test s4-0 arg0 arg1))) + (set! v1-1 (-> arg0 filtered-other-collide-as)) + (b! (= a0-5 #f) cfg-1 :delay (.lvf vf1 (&-> arg1 prim-core world-sphere quad))) + ) + ) + ) + (b! (!= (-> arg0 tlist) #f) cfg-1 :delay (set! s2-0 0)) + (label cfg-6) + (b! (= (the-as uint s2-0) #f) cfg-8 :delay (nop!)) + (set! s2-0 #t) + (label cfg-8) + (the-as symbol s2-0) + ) + ) + ) + +;; definition for method 13 of type collide-shape-prim +;; WARN: Return type mismatch object vs symbol. +(defmethod overlaps-others-group ((this collide-shape-prim) (arg0 overlaps-others-params) (arg1 collide-shape-prim-group)) + (local-vars (a0-4 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 (the-as collide-shape-prim arg1)) + (v1-0 (-> this prim-core collide-with)) + ) + (nop!) + (let ((a0-1 (-> arg0 collide-with-filter))) + (nop!) + (let ((s3-0 (-> arg1 num-children)) + (v1-1 (logand v1-0 a0-1)) + ) + (.lvf vf2 (&-> this prim-core world-sphere quad)) + (let ((s2-0 (the-as object #f))) + (set! (-> arg0 filtered-child-collide-with) v1-1) + (label cfg-1) + (b! (zero? s3-0) cfg-6 :delay (set! s4-0 (+ s4-0 80))) + (+! s3-0 -1) + (let ((a0-3 (logand v1-1 (-> s4-0 prim-core collide-as)))) + (.lvf vf1 (&-> s4-0 prim-core world-sphere quad)) + (b! (zero? a0-3) cfg-1 :delay (.sub.vf vf3 vf2 vf1)) + ) + (.add.w.vf vf4 vf2 vf1 :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-0 0.0)) + (.add.w.vf vf3 vf0 vf3 :mask #b1) + (.mov a0-4 vf3) + (b! (< f0-0 a0-4) cfg-1) + ) + (let ((a0-6 (overlaps-others-test this arg0 s4-0))) + (set! v1-1 (-> arg0 filtered-child-collide-with)) + (b! (= a0-6 #f) cfg-1 :delay (.lvf vf2 (&-> this prim-core world-sphere quad))) + ) + (b! (!= (-> arg0 tlist) #f) cfg-1 :delay (set! s2-0 0)) + (label cfg-6) + (b! (= (the-as uint s2-0) #f) cfg-8 :delay (nop!)) + (set! s2-0 #t) + (label cfg-8) + (the-as symbol s2-0) + ) + ) + ) + ) + ) + ) + +;; definition for method 12 of type collide-shape-prim-sphere +(defmethod overlaps-others-test ((this collide-shape-prim-sphere) (arg0 overlaps-others-params) (arg1 collide-shape-prim)) + (local-vars (v1-11 uint) (s4-0 uint)) + (let ((v1-0 (-> arg1 prim-core prim-type))) + (b! (nonzero? v1-0) cfg-2 :delay (set! s4-0 (the-as uint (-> arg0 options)))) + (let ((v0-1 (overlaps-others-group this arg0 (the-as collide-shape-prim-group arg1)))) + (b! #t cfg-17 :delay (nop!)) + (label cfg-2) + (b! (> v1-0 0) cfg-4 :delay (nop!)) + (b! #t cfg-11 :delay (logand s4-0 2)) + (label cfg-4) + (b! (nonzero? 0) cfg-11 :delay (nop!)) + (let ((s2-0 (-> (the-as collide-shape-prim-mesh arg1) mesh))) + (b! (not s2-0) cfg-10 :delay (empty-form)) + (let ((v1-5 (populate-for-prim-mesh *collide-mesh-cache* (the-as collide-shape-prim-mesh arg1)))) + (when v1-5 + (when (overlap-test s2-0 (the-as collide-mesh-cache-tri (-> v1-5 tris)) (the-as vector (-> this prim-core))) + (b! #t cfg-11 :delay (nop!)) + (the-as none 0) + ) + ) + ) + ) + (label cfg-10) + (set! v0-1 #f) + (b! #t cfg-17 :delay (nop!)) + (label cfg-11) + (let ((a0-8 (-> arg0 tlist))) + (b! (= a0-8 #f) cfg-13 :delay (nop!)) + (add-touching-prims a0-8 this arg1 -1.0 (the-as collide-tri-result #f) (the-as collide-tri-result #f)) + ) + (label cfg-13) + (b! (not (logtest? s4-0 1)) cfg-16 :delay (set! v1-11 (the-as uint (-> this prim-core action)))) + (let ((a0-9 (-> arg1 prim-core action))) + (b! (logtest? (the-as collide-action (logand v1-11 1)) a0-9) cfg-16 :delay (nop!)) + ) + (set! v0-1 #f) + (b! #t cfg-17 :delay (nop!)) + (label cfg-16) + (set! v0-1 #t) + (label cfg-17) + v0-1 + ) + ) + ) + +;; definition for method 12 of type collide-shape-prim-mesh +(defmethod overlaps-others-test ((this collide-shape-prim-mesh) (arg0 overlaps-others-params) (arg1 collide-shape-prim)) + (local-vars (v1-3 uint) (v1-11 uint) (s4-0 uint)) + (let ((v1-0 (-> arg1 prim-core prim-type))) + (b! (nonzero? v1-0) cfg-2 :delay (set! s4-0 (the-as uint (-> arg0 options)))) + (let ((v0-1 (overlaps-others-group this arg0 (the-as collide-shape-prim-group arg1)))) + (b! #t cfg-18 :delay (nop!)) + (label cfg-2) + (b! (> v1-0 0) cfg-10 :delay (set! v1-3 (logand s4-0 2))) + (b! (nonzero? v1-3) cfg-12 :delay (nop!)) + (let ((s2-0 (-> this mesh))) + (b! (not s2-0) cfg-9 :delay (empty-form)) + (let ((v1-5 (populate-for-prim-mesh *collide-mesh-cache* this))) + (b! (not v1-5) cfg-9 :delay (empty-form)) + (b! + (not (overlap-test s2-0 (the-as collide-mesh-cache-tri (-> v1-5 tris)) (the-as vector (-> arg1 prim-core)))) + cfg-9 + :delay (empty-form) + ) + ) + ) + (b! #t cfg-12 :delay (nop!)) + (the-as none 0) + (label cfg-9) + (set! v0-1 #f) + (b! #t cfg-18 :delay (nop!)) + (label cfg-10) + (b! (nonzero? v1-3) cfg-12 :delay (nop!)) + (format + 0 + "ERROR: Unsupported mesh -> mesh test attempted in collide-shape-prim-mesh::overlaps-others-test!~%" + ) + (set! v0-1 #f) + (b! #t cfg-18 :delay (nop!)) + (label cfg-12) + (let ((a0-9 (-> arg0 tlist))) + (b! (= a0-9 #f) cfg-14 :delay (nop!)) + (add-touching-prims a0-9 this arg1 -1.0 (the-as collide-tri-result #f) (the-as collide-tri-result #f)) + ) + (label cfg-14) + (b! (not (logtest? s4-0 1)) cfg-17 :delay (set! v1-11 (the-as uint (-> this prim-core action)))) + (let ((a0-10 (-> arg1 prim-core action))) + (b! (logtest? (the-as collide-action (logand v1-11 1)) a0-10) cfg-17 :delay (nop!)) + ) + (set! v0-1 #f) + (b! #t cfg-18 :delay (nop!)) + (label cfg-17) + (set! v0-1 #t) + (label cfg-18) + v0-1 + ) + ) + ) + +;; definition for method 49 of type collide-shape +;; WARN: Return type mismatch int vs none. +(defmethod modify-collide-as! ((this collide-shape) (arg0 int) (arg1 collide-spec) (arg2 collide-spec)) + (let ((v1-0 (-> this root-prim))) + (countdown (a0-1 (-> this total-prims)) + (if (logtest? (-> v1-0 prim-id) arg0) + (set! (-> v1-0 prim-core collide-as) (logior (logclear (-> v1-0 prim-core collide-as) arg1) arg2)) + ) + (&+! v1-0 80) + ) + ) + 0 + (none) + ) + +;; definition for method 50 of type collide-shape +;; INFO: Used lq/sq +(defmethod send-shoves ((this collide-shape) (arg0 process) (arg1 touching-shapes-entry) (arg2 float) (arg3 float) (arg4 float)) + (local-vars (sv-144 process) (sv-160 collide-shape-prim) (sv-176 vector)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (when arg1 + (let ((s0-0 (-> arg1 head))) + (set! sv-144 arg0) + (let ((gp-0 (if (type? sv-144 process-focusable) + sv-144 + ) + ) + ) + (when (and s0-0 gp-0) + (while s0-0 + (set! sv-160 (get-touched-prim s0-0 this arg1)) + (get-touched-prim s0-0 (the-as collide-shape (-> (the-as process-drawable gp-0) root)) arg1) + (when (logtest? (-> sv-160 prim-core action) (collide-action no-standon)) + (let ((v1-12 (touching-prims-entry-method-9 s0-0 (new 'stack-no-clear 'vector)))) + (set! sv-176 (new 'stack-no-clear 'vector)) + (let ((a0-7 (-> sv-160 prim-core))) + (.lvf vf4 (&-> v1-12 quad)) + (.lvf vf5 (&-> a0-7 world-sphere quad)) + ) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-176 quad) vf6) + (vector-normalize! sv-176 1.0) + (when (and (< arg2 (-> sv-176 y)) (and (not (focus-test? (the-as process-focusable gp-0) dead hit board mech)) + (< (-> (the-as process-focusable gp-0) root transv y) 4.096) + ) + ) + (let ((s2-1 (new 'stack-no-clear 'vector))) + (set! (-> s2-1 quad) (-> (the-as process-focusable gp-0) root transv quad)) + (let* ((v1-26 (-> (the-as process-focusable gp-0) root transv)) + (f30-0 (sqrtf (+ (* (-> v1-26 x) (-> v1-26 x)) (* (-> v1-26 z) (-> v1-26 z))))) + ) + (if (= f30-0 0.0) + (set! (-> s2-1 quad) (-> (vector-z-quaternion! s2-1 (-> (the-as process-focusable gp-0) root quat)) quad)) + ) + (vector-xz-normalize! s2-1 (fmax f30-0 arg4)) + ) + (set! (-> s2-1 y) arg3) + (send-event + gp-0 + 'shove + arg1 + (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (vector s2-1) + (angle 'jump) + ) + ) + ) + ) + (return #t) + ) + ) + (set! s0-0 (-> s0-0 next)) + ) + ) + ) + ) + ) + #f + ) + ) + +;; definition for method 41 of type collide-shape +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs vector. +(defmethod shove-to-closest-point-on-path ((this collide-shape) (arg0 attack-info) (arg1 float)) + (set! (-> arg0 shove-up) arg1) + (let* ((s3-0 (-> this process path)) + (s2-0 (-> s3-0 curve num-cverts)) + (s4-0 (target-pos 0)) + (s1-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (let ((f30-0 -1.0)) + (dotimes (s0-0 s2-0) + (get-point-in-path! s3-0 s1-0 (the float s0-0) 'interp) + (let ((f0-3 (vector-vector-distance-squared s4-0 s1-0))) + (when (or (< f30-0 0.0) (< f0-3 f30-0)) + (set! f30-0 f0-3) + (set! (-> s5-0 quad) (-> s1-0 quad)) + ) + ) + ) + ) + (vector-! (-> arg0 vector) s5-0 s4-0) + ) + (the-as vector 0) + ) diff --git a/test/decompiler/reference/jak3/engine/collide/collide-target-h_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-target-h_REF.gc index 510fa7754f..c59c6b75f9 100644 --- a/test/decompiler/reference/jak3/engine/collide/collide-target-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/collide/collide-target-h_REF.gc @@ -223,7 +223,7 @@ (last-nonzero-input-dir-targ quaternion :inline :offset 6384) (time-of-last-wall-hide-first-check-pass time-frame :offset 6400) (time-of-first-wall-hide-first-check-pass time-frame :offset 6408) - (pad uint8 4) + (unknown-float0000 float :offset 6416) ) ) diff --git a/test/decompiler/reference/jak3/engine/collide/collide-touch-h_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-touch-h_REF.gc index 993bfa89e5..7dacba3ff9 100644 --- a/test/decompiler/reference/jak3/engine/collide/collide-touch-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/collide/collide-touch-h_REF.gc @@ -36,10 +36,10 @@ Potentially also stores the triangle that is involved." (prim2 touching-prim :inline) ) (:methods - (touching-prims-entry-method-9 () none) - (touching-prims-entry-method-10 () none) - (touching-prims-entry-method-11 () none) - (touching-prims-entry-method-12 () none) + (touching-prims-entry-method-9 (_type_ vector) vector) + (get-middle-of-bsphere-overlap (_type_ vector) vector) + (get-touched-prim (_type_ collide-shape touching-shapes-entry) collide-shape-prim) + (get-touched-tri (_type_ collide-shape touching-shapes-entry) collide-tri-result) ) ) @@ -68,10 +68,10 @@ Potentially also stores the triangle that is involved." ) (:methods (new (symbol type) _type_) - (touching-prims-entry-pool-method-9 () none) - (touching-prims-entry-pool-method-10 () none) + (alloc-node (_type_) touching-prims-entry) + (get-free-node-count (_type_) int) (init-list! (_type_) none) - (touching-prims-entry-pool-method-12 () none) + (free-node (_type_ touching-prims-entry) touching-prims-entry) ) ) @@ -139,10 +139,10 @@ storing a record of the primitives involved." (:methods (get-head (_type_) touching-prims-entry) (get-next (_type_ touching-shapes-entry) touching-prims-entry) - (touching-shapes-entry-method-11 () none) + (get-touched-shape (_type_ collide-shape) collide-shape) (prims-touching? (_type_ collide-shape uint) touching-prims-entry) (prims-touching-action? (_type_ collide-shape collide-action collide-action) basic) - (touching-shapes-entry-method-14 () none) + (free-touching-prims-list (_type_) none) ) ) @@ -172,11 +172,11 @@ storing a record of the primitives involved." ) (:methods (new (symbol type) _type_) - (touching-list-method-9 () none) - (touching-list-method-10 () none) - (touching-list-method-11 () none) - (touching-list-method-12 () none) - (touching-list-method-13 () none) + (add-touching-prims (_type_ collide-shape-prim collide-shape-prim float collide-tri-result collide-tri-result) none) + (free-nodes (_type_) none) + (update-from-step-size (_type_ float) none) + (send-events-for-touching-shapes (_type_) none) + (get-shapes-entry (_type_ collide-shape collide-shape) touching-shapes-entry) ) ) @@ -231,3 +231,7 @@ storing a record of the primitives involved." ;; failed to figure out what this is: (kmemclose) + + + + diff --git a/test/decompiler/reference/jak3/engine/collide/collide-touch_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide-touch_REF.gc new file mode 100644 index 0000000000..fcb16c7fc4 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/collide/collide-touch_REF.gc @@ -0,0 +1,552 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 10 of type touching-prims-entry-pool +(defmethod get-free-node-count ((this touching-prims-entry-pool)) + (let ((v0-0 0)) + (let ((v1-0 (-> this head))) + (while v1-0 + (+! v0-0 1) + (set! v1-0 (-> v1-0 next)) + (nop!) + (nop!) + (nop!) + ) + ) + v0-0 + ) + ) + +;; definition for method 9 of type touching-prims-entry-pool +(defmethod alloc-node ((this touching-prims-entry-pool)) + (let ((gp-0 (-> this head))) + (cond + (gp-0 + (let ((v1-0 (-> gp-0 next))) + (set! (-> this head) v1-0) + (if v1-0 + (set! (-> v1-0 prev) #f) + ) + ) + (set! (-> gp-0 allocated?) #t) + (set! (-> gp-0 next) #f) + (set! (-> gp-0 prev) #f) + ) + (else + (format 0 "ERROR: touching-prims-entry-pool::alloc-node() failed!~%") + ) + ) + gp-0 + ) + ) + +;; definition for method 12 of type touching-prims-entry-pool +(defmethod free-node ((this touching-prims-entry-pool) (arg0 touching-prims-entry)) + (when (-> arg0 allocated?) + (set! (-> arg0 allocated?) #f) + (let ((v1-1 (-> this head))) + (set! (-> arg0 next) v1-1) + (set! (-> arg0 prev) #f) + (set! (-> this head) arg0) + (when v1-1 + (set! (-> v1-1 prev) arg0) + arg0 + ) + ) + ) + ) + +;; definition for method 14 of type touching-shapes-entry +;; WARN: Return type mismatch int vs none. +(defmethod free-touching-prims-list ((this touching-shapes-entry)) + (when (-> this cshape1) + (set! (-> this cshape1) #f) + (let ((gp-0 (-> this head))) + (when gp-0 + (set! (-> this head) #f) + (let ((s5-0 *touching-prims-entry-pool*)) + (while gp-0 + (let ((a1-0 gp-0)) + (set! gp-0 (-> a1-0 next)) + (free-node s5-0 a1-0) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type touching-list +;; WARN: Return type mismatch int vs none. +(defmethod free-nodes ((this touching-list)) + (let ((s5-0 (the-as object (-> this touching-shapes)))) + (countdown (s4-0 (-> this num-touching-shapes)) + (free-touching-prims-list (the-as touching-shapes-entry s5-0)) + (set! s5-0 (&+ (the-as touching-shapes-entry s5-0) 32)) + ) + ) + (set! (-> this num-touching-shapes) 0) + (set! (-> this resolve-u) 0) + 0 + (none) + ) + +;; definition for method 13 of type touching-list +;; WARN: Return type mismatch object vs touching-shapes-entry. +(defmethod get-shapes-entry ((this touching-list) (arg0 collide-shape) (arg1 collide-shape)) + (let ((v0-0 (the-as object (-> this touching-shapes)))) + (let ((v1-0 (the-as touching-shapes-entry #f))) + (countdown (a3-0 (-> this num-touching-shapes)) + (let ((t0-0 (-> (the-as touching-shapes-entry v0-0) cshape1))) + (set! v1-0 (cond + (t0-0 + (if (or (and (= t0-0 arg0) (= (-> (the-as touching-shapes-entry v0-0) cshape2) arg1)) + (and (= t0-0 arg1) (= (-> (the-as touching-shapes-entry v0-0) cshape2) arg0)) + ) + (return (the-as touching-shapes-entry v0-0)) + ) + v1-0 + ) + (else + (the-as touching-shapes-entry v0-0) + ) + ) + ) + ) + (set! v0-0 (&+ (the-as touching-shapes-entry v0-0) 32)) + ) + (cond + (v1-0 + (set! v0-0 v1-0) + ) + (else + (when (>= (-> this num-touching-shapes) 32) + (format 0 "ERROR: touching-list::get-shapes-entry() failed!~%") + (return (the-as touching-shapes-entry #f)) + ) + (+! (-> this num-touching-shapes) 1) + ) + ) + ) + (set! (-> (the-as touching-shapes-entry v0-0) cshape1) arg0) + (set! (-> (the-as touching-shapes-entry v0-0) cshape2) arg1) + (set! (-> (the-as touching-shapes-entry v0-0) head) #f) + (set! (-> (the-as touching-shapes-entry v0-0) resolve-u) 1) + (set! (-> this resolve-u) 1) + (set! (-> (the-as touching-shapes-entry v0-0) handle1) (process->handle (-> arg0 process))) + (set! (-> (the-as touching-shapes-entry v0-0) handle2) (process->handle (-> arg1 process))) + (the-as touching-shapes-entry v0-0) + ) + ) + +;; definition of type add-prims-touching-work +(deftype add-prims-touching-work (structure) + ((tri1 collide-tri-result) + (tri2 collide-tri-result) + ) + ) + +;; definition for method 3 of type add-prims-touching-work +(defmethod inspect ((this add-prims-touching-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'add-prims-touching-work) + (format #t "~1Ttri1: #~%" (-> this tri1)) + (format #t "~1Ttri2: #~%" (-> this tri2)) + (label cfg-4) + this + ) + +;; definition for method 9 of type touching-list +;; WARN: Return type mismatch int vs none. +;; WARN: Function (method 9 touching-list) has a return type of none, but the expression builder found a return statement. +(defmethod add-touching-prims ((this touching-list) + (arg0 collide-shape-prim) + (arg1 collide-shape-prim) + (arg2 float) + (arg3 collide-tri-result) + (arg4 collide-tri-result) + ) + (let ((gp-0 (new 'stack-no-clear 'add-prims-touching-work))) + (set! (-> gp-0 tri1) arg3) + (set! (-> gp-0 tri2) arg4) + (let ((s2-0 (get-shapes-entry this (-> arg0 cshape) (-> arg1 cshape)))) + (when s2-0 + (when (= (-> s2-0 cshape1) (-> arg1 cshape)) + (let ((v1-4 arg0)) + (set! arg0 arg1) + (set! arg1 v1-4) + ) + ) + (let ((s0-0 (-> s2-0 head))) + (while s0-0 + (when (and (= (-> s0-0 prim1 cprim) arg0) (= (-> s0-0 prim2 cprim) arg1)) + (when (< arg2 (-> s0-0 u)) + (-> s0-0 u) + (let ((v1-12 (-> s0-0 prim1)) + (a1-2 (-> gp-0 tri1)) + ) + (cond + (a1-2 + (set! (-> v1-12 has-tri?) #t) + (mem-copy! (the-as pointer (-> v1-12 tri)) (the-as pointer a1-2) 88) + ) + (else + (set! (-> v1-12 has-tri?) #f) + ) + ) + ) + (let ((v1-15 (-> s0-0 prim2)) + (a1-3 (-> gp-0 tri2)) + ) + (cond + (a1-3 + (set! (-> v1-15 has-tri?) #t) + (mem-copy! (the-as pointer (-> v1-15 tri)) (the-as pointer a1-3) 88) + ) + (else + (set! (-> v1-15 has-tri?) #f) + ) + ) + ) + ) + (return 0) + ) + (set! s0-0 (-> s0-0 next)) + ) + ) + (let ((s0-1 (alloc-node *touching-prims-entry-pool*))) + (when s0-1 + (let ((v1-22 (-> s2-0 head))) + (set! (-> s0-1 next) v1-22) + (set! (-> s0-1 prev) #f) + (set! (-> s2-0 head) s0-1) + (if v1-22 + (set! (-> v1-22 prev) s0-1) + ) + ) + (set! (-> s0-1 u) arg2) + (when (>= arg2 0.0) + (set! (-> s2-0 resolve-u) 1) + (set! (-> this resolve-u) 1) + ) + (let ((v1-26 (-> s0-1 prim1)) + (a1-4 (-> gp-0 tri1)) + ) + (set! (-> v1-26 cprim) arg0) + (cond + (a1-4 + (set! (-> v1-26 has-tri?) #t) + (mem-copy! (the-as pointer (-> v1-26 tri)) (the-as pointer a1-4) 88) + ) + (else + (set! (-> v1-26 has-tri?) #f) + ) + ) + ) + (let ((v1-29 (-> s0-1 prim2)) + (a1-5 (-> gp-0 tri2)) + ) + (set! (-> v1-29 cprim) arg1) + (cond + (a1-5 + (set! (-> v1-29 has-tri?) #t) + (mem-copy! (the-as pointer (-> v1-29 tri)) (the-as pointer a1-5) 88) + ) + (else + (set! (-> v1-29 has-tri?) #f) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 11 of type touching-list +;; WARN: Return type mismatch int vs none. +(defmethod update-from-step-size ((this touching-list) (arg0 float)) + (when (nonzero? (-> this resolve-u)) + (set! (-> this resolve-u) 0) + (let ((s5-0 (the-as object (-> this touching-shapes)))) + (countdown (s4-0 (-> this num-touching-shapes)) + (when (nonzero? (-> (the-as touching-shapes-entry s5-0) resolve-u)) + (set! (-> (the-as touching-shapes-entry s5-0) resolve-u) 0) + (when (-> (the-as touching-shapes-entry s5-0) cshape1) + (let ((s3-0 (-> (the-as touching-shapes-entry s5-0) head))) + (while s3-0 + (let ((f0-0 (-> s3-0 u))) + (set! s3-0 (cond + ((>= f0-0 0.0) + (cond + ((>= arg0 f0-0) + (set! (-> s3-0 u) -1.0) + (set! s3-0 (-> s3-0 next)) + ) + (else + (let ((a1-1 s3-0)) + (let ((v1-8 (-> s3-0 next))) + (let ((a0-1 (-> s3-0 prev))) + (if a0-1 + (set! (-> a0-1 next) v1-8) + (set! (-> (the-as touching-shapes-entry s5-0) head) v1-8) + ) + (if v1-8 + (set! (-> v1-8 prev) a0-1) + ) + ) + (set! s3-0 v1-8) + ) + (free-node *touching-prims-entry-pool* a1-1) + ) + ) + ) + s3-0 + ) + (else + (-> s3-0 next) + ) + ) + ) + ) + ) + ) + (if (not (-> (the-as touching-shapes-entry s5-0) head)) + (set! (-> (the-as touching-shapes-entry s5-0) cshape1) #f) + ) + ) + ) + (set! s5-0 (&+ (the-as touching-shapes-entry s5-0) 32)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 12 of type touching-list +;; WARN: Return type mismatch int vs none. +(defmethod send-events-for-touching-shapes ((this touching-list)) + (let ((gp-0 (the-as object (-> this touching-shapes)))) + (countdown (s5-0 (-> this num-touching-shapes)) + (let ((s3-0 (-> (the-as touching-shapes-entry gp-0) cshape1))) + (when s3-0 + (let ((s4-0 (handle->process (-> (the-as touching-shapes-entry gp-0) handle1))) + (s2-0 (handle->process (-> (the-as touching-shapes-entry gp-0) handle2))) + ) + (when (and s4-0 s2-0) + (let ((s1-0 (-> (the-as touching-shapes-entry gp-0) cshape2))) + (when (< (-> s3-0 event-priority) (-> s1-0 event-priority)) + (let ((v1-9 s3-0)) + (set! s3-0 s1-0) + (set! s1-0 v1-9) + ) + (let ((v1-11 s4-0)) + (set! s4-0 s2-0) + (set! s2-0 v1-11) + ) + ) + (let ((v1-13 (-> s3-0 event-self))) + (if v1-13 + (send-event s4-0 v1-13 :from s2-0 gp-0) + ) + ) + (let ((v1-14 (-> s3-0 event-other))) + (if v1-14 + (send-event s2-0 v1-14 :from s4-0 gp-0) + ) + ) + (let ((v1-15 (-> s1-0 event-self))) + (if v1-15 + (send-event s2-0 v1-15 :from s4-0 gp-0) + ) + ) + (let ((v1-16 (-> s1-0 event-other))) + (if v1-16 + (send-event s4-0 v1-16 :from s2-0 gp-0) + ) + ) + ) + ) + ) + ) + ) + (set! gp-0 (&+ (the-as touching-shapes-entry gp-0) 32)) + ) + ) + 0 + (none) + ) + +;; definition for method 12 of type touching-shapes-entry +(defmethod prims-touching? ((this touching-shapes-entry) (arg0 collide-shape) (arg1 uint)) + (cond + ((= (-> this cshape1) arg0) + (let ((v1-1 (-> this head))) + (while v1-1 + (if (logtest? (-> v1-1 prim1 cprim prim-id) arg1) + (return v1-1) + ) + (set! v1-1 (-> v1-1 next)) + ) + ) + ) + ((= (-> this cshape2) arg0) + (let ((v1-4 (-> this head))) + (while v1-4 + (if (logtest? (-> v1-4 prim2 cprim prim-id) arg1) + (return v1-4) + ) + (set! v1-4 (-> v1-4 next)) + ) + ) + ) + (else + (format 0 "ERROR: touching-shapes-entry::prims-touching? : Bogus cshape value!~%") + ) + ) + (the-as touching-prims-entry #f) + ) + +;; definition for method 13 of type touching-shapes-entry +;; WARN: Return type mismatch touching-prims-entry vs basic. +(defmethod prims-touching-action? ((this touching-shapes-entry) (arg0 collide-shape) (arg1 collide-action) (arg2 collide-action)) + (cond + ((= (-> this cshape1) arg0) + (let ((v1-1 (-> this head))) + (while v1-1 + (let ((a0-1 (-> v1-1 prim1 cprim))) + (if (and (logtest? arg1 (-> a0-1 prim-core action)) (not (logtest? arg2 (-> a0-1 prim-core action)))) + (return (the-as basic v1-1)) + ) + ) + (set! v1-1 (-> v1-1 next)) + ) + ) + ) + ((= (-> this cshape2) arg0) + (let ((v1-4 (-> this head))) + (while v1-4 + (let ((a0-5 (-> v1-4 prim2 cprim))) + (if (and (logtest? arg1 (-> a0-5 prim-core action)) (not (logtest? arg2 (-> a0-5 prim-core action)))) + (return (the-as basic v1-4)) + ) + ) + (set! v1-4 (-> v1-4 next)) + ) + ) + ) + (else + (format 0 "ERROR: touching-shapes-entry::prims-touching-action? : Bogus cshape value!~%") + ) + ) + (the-as basic #f) + ) + +;; definition for method 11 of type touching-shapes-entry +(defmethod get-touched-shape ((this touching-shapes-entry) (arg0 collide-shape)) + (cond + ((= (-> this cshape1) arg0) + (return (-> this cshape2)) + ) + ((= (-> this cshape2) arg0) + (return (-> this cshape1)) + ) + ) + (the-as collide-shape #f) + ) + +;; definition for method 11 of type touching-prims-entry +(defmethod get-touched-prim ((this touching-prims-entry) (arg0 collide-shape) (arg1 touching-shapes-entry)) + (cond + ((= (-> arg1 cshape1) arg0) + (return (-> this prim1 cprim)) + ) + ((= (-> arg1 cshape2) arg0) + (return (-> this prim2 cprim)) + ) + ) + (the-as collide-shape-prim #f) + ) + +;; definition for method 12 of type touching-prims-entry +(defmethod get-touched-tri ((this touching-prims-entry) (arg0 collide-shape) (arg1 touching-shapes-entry)) + (let ((v0-0 (the-as collide-tri-result #f))) + (cond + ((not this) + ) + ((= (-> arg1 cshape1) arg0) + (let ((v1-4 (-> this prim1))) + (if (-> v1-4 has-tri?) + (set! v0-0 (-> v1-4 tri)) + ) + ) + ) + ((= (-> arg1 cshape2) arg0) + (let ((v1-7 (-> this prim2))) + (if (-> v1-7 has-tri?) + (set! v0-0 (-> v1-7 tri)) + ) + ) + ) + ) + v0-0 + ) + ) + +;; definition for method 9 of type touching-prims-entry +(defmethod touching-prims-entry-method-9 ((this touching-prims-entry) (arg0 vector)) + (let* ((s4-0 (-> this prim1 cprim)) + (v1-0 (-> this prim2 cprim)) + (gp-1 (vector-! + (new 'stack-no-clear 'vector) + (the-as vector (-> v1-0 prim-core)) + (the-as vector (-> s4-0 prim-core)) + ) + ) + ) + (let ((f1-2 (- (- (vector-length gp-1) (-> v1-0 prim-core world-sphere w)) (-> s4-0 prim-core world-sphere w)))) + (vector-normalize! gp-1 (+ (-> s4-0 prim-core world-sphere w) (* 0.5 f1-2))) + ) + (vector+! arg0 gp-1 (the-as vector (-> s4-0 prim-core))) + ) + arg0 + ) + +;; definition for method 10 of type touching-prims-entry +(defmethod get-middle-of-bsphere-overlap ((this touching-prims-entry) (arg0 vector)) + (let ((v1-0 (-> this prim1 cprim)) + (a2-0 (-> this prim2 cprim)) + ) + (vector+! arg0 (the-as vector (-> a2-0 prim-core)) (the-as vector (-> v1-0 prim-core))) + ) + (vector-float*! arg0 arg0 0.5) + arg0 + ) + +;; definition for function get-intersect-point +;; INFO: Used lq/sq +(defun get-intersect-point ((arg0 vector) (arg1 touching-prims-entry) (arg2 collide-shape) (arg3 touching-shapes-entry)) + (when arg1 + (let ((a0-2 (get-touched-tri arg1 arg2 arg3))) + (if a0-2 + (set! (-> arg0 quad) (-> a0-2 intersect quad)) + (touching-prims-entry-method-9 arg1 arg0) + ) + ) + ) + arg0 + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/collide/collide_REF.gc b/test/decompiler/reference/jak3/engine/collide/collide_REF.gc new file mode 100644 index 0000000000..d8da36c1e9 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/collide/collide_REF.gc @@ -0,0 +1,23 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *collide-vif0-init*, type (array uint32) +(define *collide-vif0-init* (new 'static 'boxed-array :type uint32 + #x30000000 + #x4d000000 + #x4d000000 + #x4d000000 + #x3f800000 + #x5000001 + #x20000000 + #x40404040 + #x1000404 + #x0 + #x0 + #x0 + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/collide/los-control-h_REF.gc b/test/decompiler/reference/jak3/engine/collide/los-control-h_REF.gc new file mode 100644 index 0000000000..965cd914de --- /dev/null +++ b/test/decompiler/reference/jak3/engine/collide/los-control-h_REF.gc @@ -0,0 +1,46 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type los-control +(deftype los-control (structure) + ((src-proc handle) + (dst-proc handle) + (last-lost-los time-frame) + (last-gained-los time-frame) + (check-interval time-frame) + (max-check-distance float) + (last-check-time time-frame) + (last-collide-result collide-tri-result :inline) + (collide-with collide-spec :offset 160) + ) + (:methods + (los-control-method-9 (_type_ process-focusable vector float float) none :behavior process-focusable) + (should-check-los? (_type_ time-frame) symbol) + (los-control-method-11 (_type_ time-frame) symbol) + (init-los! (_type_ process-focusable time-frame float collide-spec) none) + (los-control-method-13 (_type_ collide-query vector int float) float) + ) + ) + +;; definition for method 3 of type los-control +(defmethod inspect ((this los-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'los-control) + (format #t "~1Tsrc-proc: ~D~%" (-> this src-proc)) + (format #t "~1Tdst-proc: ~D~%" (-> this dst-proc)) + (format #t "~1Tlast-lost-los: ~D~%" (-> this last-lost-los)) + (format #t "~1Tlast-gained-los: ~D~%" (-> this last-gained-los)) + (format #t "~1Tcheck-interval: ~D~%" (-> this check-interval)) + (format #t "~1Tmax-check-distance: ~f~%" (-> this max-check-distance)) + (format #t "~1Tlast-check-time: ~D~%" (-> this last-check-time)) + (format #t "~1Tlast-collide-result: #~%" (-> this last-collide-result)) + (format #t "~1Tcollide-with: ~D~%" (-> this collide-with)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 diff --git a/test/decompiler/reference/jak3/engine/collide/los-control_REF.gc b/test/decompiler/reference/jak3/engine/collide/los-control_REF.gc new file mode 100644 index 0000000000..c981b50433 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/collide/los-control_REF.gc @@ -0,0 +1,165 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *los-time-offset*, type time-frame +(define *los-time-offset* (the-as time-frame 0)) + +;; definition for method 13 of type los-control +;; INFO: Used lq/sq +(defmethod los-control-method-13 ((this los-control) (arg0 collide-query) (arg1 vector) (arg2 int) (arg3 float)) + (set! (-> arg0 move-dist quad) (-> arg1 quad)) + (vector-length-max! (-> arg0 move-dist) (-> this max-check-distance)) + (set! (-> arg0 radius) arg3) + (set! (-> arg0 collide-with) (the-as collide-spec (logand (the-as collide-spec arg2) (-> this collide-with)))) + (fill-using-line-sphere *collide-cache* arg0) + (let ((f30-0 (probe-using-line-sphere *collide-cache* arg0)) + (f28-0 (vector-length arg1)) + ) + (cond + ((>= f30-0 0.0) + (quad-copy! (the-as pointer (-> this last-collide-result)) (the-as pointer (-> arg0 best-other-tri)) 6) + (* f30-0 f28-0) + ) + (else + f28-0 + ) + ) + ) + ) + +;; definition for method 9 of type los-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod los-control-method-9 ((this los-control) (arg0 process-focusable) (arg1 vector) (arg2 float) (arg3 float)) + (local-vars (a0-22 int) (a0-24 int) (sv-592 vector)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (let* ((v1-1 (-> *perf-stats* data 56)) + (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 + (when (and (time-elapsed? (-> this last-check-time) (-> this check-interval)) + (-> this src-proc) + (or arg0 (-> this dst-proc)) + ) + (let* ((s0-0 (handle->process (-> this src-proc))) + (s1-0 (if (type? s0-0 process-focusable) + s0-0 + ) + ) + ) + (when s1-0 + (when (and (not arg0) (not arg1)) + (let ((s0-1 (handle->process (-> this dst-proc)))) + (set! arg0 (if (type? s0-1 process-focusable) + (the-as process-focusable s0-1) + ) + ) + ) + ) + (when (or (the-as process arg0) arg1) + (set! sv-592 (new 'stack-no-clear 'vector)) + (let ((v1-24 (-> (get-trans (the-as process-focusable s1-0) 10) quad))) + (set! (-> sv-592 quad) v1-24) + ) + (let ((s0-2 (new 'stack-no-clear 'collide-query))) + (if (not arg1) + (set! arg1 (get-trans arg0 3)) + ) + (set! (-> s0-2 start-pos quad) (-> sv-592 quad)) + (set! (-> s0-2 ignore-process0) s1-0) + (set! (-> s0-2 ignore-process1) (the-as process arg0)) + (set! (-> s0-2 ignore-pat) (-> (the-as process-focusable s1-0) root pat-ignore-mask)) + (set! (-> s0-2 action-mask) (collide-action solid semi-solid)) + (let ((s2-1 (new 'stack-no-clear 'vector))) + (.lvf vf4 (&-> arg1 quad)) + (.lvf vf5 (&-> sv-592 quad)) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> s2-1 quad) vf6) + (let ((f30-0 (vector-length s2-1))) + (let ((f0-0 (los-control-method-13 this s0-2 s2-1 -2 arg3))) + (if (< f0-0 f30-0) + (vector-normalize! s2-1 f0-0) + ) + ) + (if (< (los-control-method-13 this s0-2 s2-1 1 arg2) f30-0) + (set-time! (-> this last-lost-los)) + (set-time! (-> this last-gained-los)) + ) + ) + ) + ) + (set-time! (-> this last-check-time)) + ) + ) + ) + ) + (let ((v1-45 (-> *perf-stats* data 56))) + (b! (zero? (-> v1-45 ctrl)) cfg-45 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-22 pcr0) + (+! (-> v1-45 accum0) a0-22) + (.mfpc a0-24 pcr1) + (+! (-> v1-45 accum1) a0-24) + ) + (label cfg-45) + 0 + 0 + (none) + ) + ) + +;; definition for method 10 of type los-control +(defmethod should-check-los? ((this los-control) (arg0 time-frame)) + (and (time-elapsed? (-> this last-lost-los) (+ (-> this check-interval) arg0)) + (not (time-elapsed? (-> this last-gained-los) (-> this check-interval))) + ) + ) + +;; definition for method 11 of type los-control +(defmethod los-control-method-11 ((this los-control) (arg0 time-frame)) + (and (time-elapsed? (-> this last-gained-los) (+ (-> this check-interval) arg0)) + (not (time-elapsed? (-> this last-lost-los) (-> this check-interval))) + ) + ) + +;; definition for method 12 of type los-control +;; WARN: Return type mismatch int vs none. +(defmethod init-los! ((this los-control) (arg0 process-focusable) (arg1 time-frame) (arg2 float) (arg3 collide-spec)) + (set! (-> this src-proc) (process->handle arg0)) + (set! (-> this dst-proc) (the-as handle #f)) + (set! (-> this last-lost-los) 0) + (set! (-> this last-gained-los) 0) + (set! (-> this last-check-time) 0) + (set! (-> this check-interval) (+ arg1 *los-time-offset*)) + (set! (-> this max-check-distance) arg2) + (set! (-> this collide-with) arg3) + (set! *los-time-offset* (the-as time-frame (mod (+ *los-time-offset* (seconds 0.045)) 30))) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/collide/main-collide_REF.gc b/test/decompiler/reference/jak3/engine/collide/main-collide_REF.gc new file mode 100644 index 0000000000..70da1b35fb --- /dev/null +++ b/test/decompiler/reference/jak3/engine/collide/main-collide_REF.gc @@ -0,0 +1,197 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function drawable-sphere-box-intersect? +;; INFO: Used lq/sq +(defun drawable-sphere-box-intersect? ((arg0 drawable) (arg1 bounding-box4w)) + (local-vars (v1-1 uint128) (v1-2 uint128) (v1-3 uint128) (a0-1 uint128) (a1-2 uint128) (a2-0 uint128)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (nop!) + (nop!) + (.lvf vf1 (&-> arg0 bsphere quad)) + (.add.w.vf vf2 vf1 vf1 :mask #b111) + (let ((v1-0 (-> arg1 min quad))) + (.sub.w.vf vf1 vf1 vf1 :mask #b111) + (let ((a1-1 (-> arg1 max quad))) + (.ftoi.vf vf4 vf2) + (nop!) + (.ftoi.vf vf3 vf1) + (nop!) + (.mov a0-1 vf4) + (nop!) + (.mov a2-0 vf3) + (nop!) + (.pcgtw a1-2 a2-0 a1-1) + ) + (nop!) + (.pcgtw v1-1 v1-0 a0-1) + ) + (nop!) + (.por v1-2 a1-2 v1-1) + (nop!) + (.ppach v1-3 (the-as uint128 0) v1-2) + (nop!) + (let ((v1-4 (shl (the-as int v1-3) 16))) + (nop!) + (zero? v1-4) + ) + ) + ) + +;; definition for function instance-sphere-box-intersect? +;; INFO: Used lq/sq +(defun instance-sphere-box-intersect? ((arg0 drawable) (arg1 instance-tie) (arg2 bounding-box4w)) + (local-vars + (v1-3 uint128) + (v1-4 uint128) + (v1-5 uint128) + (a0-2 uint128) + (a1-2 uint128) + (a2-1 uint128) + (a3-1 uint128) + (a3-3 uint128) + (a3-4 uint128) + (t0-1 uint128) + (t0-2 uint128) + (t1-0 uint128) + (t2-1 uint128) + (t2-2 uint128) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf10 :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) + (nop!) + (let ((v1-0 (-> arg1 max-scale))) + (nop!) + (let ((a3-0 (the-as uint128 (-> arg1 origin long 3)))) + (nop!) + (let ((t2-0 (the-as uint128 (-> arg1 origin long 0)))) + (.pextlh a3-1 a3-0 0) + (let ((t0-0 (the-as uint128 (-> arg1 origin long 1)))) + (.pw.sra t1-0 a3-1 10) + (let ((a3-2 (the-as uint128 (-> arg1 origin long 2)))) + (.pextlh t2-1 t2-0 0) + (nop!) + (.pw.sra t2-2 t2-1 16) + (nop!) + (.pextlh t0-1 t0-0 0) + (.mov vf8 t1-0) + (.pw.sra t0-2 t0-1 16) + (.mov vf5 t2-2) + (.pextlh a3-3 a3-2 0) + ) + ) + ) + ) + (.mov vf6 t0-2) + (.pw.sra a3-4 a3-3 16) + (.lvf vf9 (&-> arg1 bsphere quad)) + (nop!) + (.mov vf7 a3-4) + (nop!) + (.mov vf10 v1-0) + ) + (.itof.vf vf8 vf8) + (nop!) + (vitof12.xyzw vf5 vf5) + (nop!) + (vitof12.xyzw vf6 vf6) + (nop!) + (vitof12.xyzw vf7 vf7) + (nop!) + (.add.vf vf8 vf8 vf9 :mask #b111) + (nop!) + (nop!) + (.lvf vf9 (&-> arg0 bsphere quad)) + (vitof12.xyzw vf10 vf10) + (nop!) + (.mul.w.vf vf10 vf10 vf9 :mask #b1) + (nop!) + (.mul.x.vf acc vf5 vf9) + (nop!) + (.add.mul.y.vf acc vf6 vf9 acc) + (let ((v1-2 (-> arg2 min quad))) + (.add.mul.z.vf acc vf7 vf9 acc) + (let ((a1-1 (-> arg2 max quad))) + (.add.mul.w.vf vf1 vf8 vf0 acc) + (nop!) + (.add.x.vf vf2 vf1 vf10 :mask #b111) + (nop!) + (.sub.x.vf vf1 vf1 vf10 :mask #b111) + (nop!) + (.ftoi.vf vf4 vf2) + (nop!) + (.ftoi.vf vf3 vf1) + (nop!) + (.mov a0-2 vf4) + (nop!) + (.mov a2-1 vf3) + (nop!) + (.pcgtw a1-2 a2-1 a1-1) + ) + (nop!) + (.pcgtw v1-3 v1-2 a0-2) + ) + (nop!) + (.por v1-4 a1-2 v1-3) + (nop!) + (.ppach v1-5 (the-as uint128 0) v1-4) + (nop!) + (let ((v1-6 (shl (the-as int v1-5) 16))) + (nop!) + (zero? v1-6) + ) + ) + ) + +;; definition for function instance-tfragment-add-debug-sphere +;; INFO: Used lq/sq +(defun instance-tfragment-add-debug-sphere ((arg0 drawable) (arg1 instance-tie)) + (local-vars (v1-1 uint128) (v1-2 uint128) (a3-0 float)) + (rlet ((vf0 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf12 :class vf) + (vf9 :class vf) + ) + (init-vf0-vector) + (nop!) + (let ((v1-0 (the-as uint128 (-> arg1 origin long 3)))) + (.pextlh v1-1 v1-0 0) + ) + (.lvf vf9 (&-> arg0 bsphere quad)) + (.pw.sra v1-2 v1-1 10) + (.lvf vf10 (&-> arg1 bsphere quad)) + (nop!) + (.mov vf12 v1-2) + (.itof.vf vf12 vf12) + (nop!) + (.add.vf vf10 vf10 vf12 :mask #b111) + (nop!) + (.add.vf vf9 vf9 vf10 :mask #b111) + (nop!) + (.add.w.vf vf11 vf0 vf9 :mask #b1) + (nop!) + (.mov a3-0 vf11) + (nop!) + (let ((a2-0 (new-stack-vector0))) + (.svf (&-> a2-0 quad) vf9) + (add-debug-sphere #t (bucket-id debug) a2-0 a3-0 (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80)) + ) + ) + ) diff --git a/test/decompiler/reference/jak3/engine/common-obs/airlock_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/airlock_REF.gc new file mode 100644 index 0000000000..6b646541e9 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/airlock_REF.gc @@ -0,0 +1,1519 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type com-airlock +(deftype com-airlock (process-drawable) + ((level-name pair) + (open-test pair) + (on-running pair) + (were-behind? symbol) + (inner? symbol) + (sound-behind? symbol) + (visible-move? symbol) + (saw-pilot? handle) + (last-distance meters) + (y-height vector) + (pre-open-speed float) + (open? symbol) + (latch-closed-time time-frame) + (latch-open-time time-frame) + (gear joint-mod) + (gear-rot degrees) + (gear-rotv degrees) + (gear-start-frame float) + (gear-stop-frame float) + (gear-play-time time-frame) + (open-frame float) + (pre-open-frame float) + (lock-frame float) + (close-speed-multiplier float) + (open-distance meters 2) + (active-distance meters 2) + (sound-id sound-id) + (gear-sound-id sound-id) + (sound-gear sound-spec) + (sound-pre-open sound-spec) + (sound-pre-open-stop sound-spec) + (sound-lock-loop sound-spec) + (sound-lock-stop sound-spec) + (sound-open sound-spec) + (sound-open-loop sound-spec) + (sound-open-stop sound-spec) + (sound-close sound-spec) + (sound-close-loop sound-spec) + (sound-close-stop sound-spec) + (sound-post-close sound-spec) + (sound-post-close-stop sound-spec) + (spool-sound-time time-frame) + (start-open-time time-frame) + (door-radius float) + (allow-pilot? symbol) + (allow-flut? symbol) + (blocking-plane? symbol) + ) + (:state-methods + (open symbol) + (close symbol) + ) + (:methods + (init-airlock! (_type_) _type_) + (want-cross-airlock? (_type_) object) + (destination-loaded? (_type_ symbol) symbol) + (check-crossing-distance (_type_ vector symbol) float) + (com-airlock-method-26 (_type_ vector symbol) symbol) + (rotate-gear! (_type_ float) degrees) + (play-city-voice-sound (_type_ symbol) none) + (spawn-blocking-plane (_type_ symbol) none) + ) + ) + +;; definition for method 3 of type com-airlock +(defmethod inspect ((this com-airlock)) + (when (not this) + (set! this this) + (goto cfg-10) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tlevel-name: ~A~%" (-> this level-name)) + (format #t "~2Topen-test: ~A~%" (-> this open-test)) + (format #t "~2Ton-running: ~A~%" (-> this on-running)) + (format #t "~2Twere-behind?: ~A~%" (-> this were-behind?)) + (format #t "~2Tinner?: ~A~%" (-> this inner?)) + (format #t "~2Tsound-behind?: ~A~%" (-> this sound-behind?)) + (format #t "~2Tvisible-move?: ~A~%" (-> this visible-move?)) + (format #t "~2Tsaw-pilot?: ~D~%" (-> this saw-pilot?)) + (format #t "~2Tlast-distance: (meters ~m)~%" (-> this last-distance)) + (format #t "~2Ty-height: #x~X~%" (-> this y-height)) + (format #t "~2Tpre-open-speed: ~f~%" (-> this pre-open-speed)) + (format #t "~2Topen?: ~A~%" (-> this open?)) + (format #t "~2Tlatch-closed-time: ~D~%" (-> this latch-closed-time)) + (format #t "~2Tlatch-open-time: ~D~%" (-> this latch-open-time)) + (format #t "~2Tgear: ~A~%" (-> this gear)) + (format #t "~2Tgear-rot: (deg ~r)~%" (-> this gear-rot)) + (format #t "~2Tgear-rotv: (deg ~r)~%" (-> this gear-rotv)) + (format #t "~2Tgear-start-frame: ~f~%" (-> this gear-start-frame)) + (format #t "~2Tgear-stop-frame: ~f~%" (-> this gear-stop-frame)) + (format #t "~2Tgear-play-time: ~D~%" (-> this gear-play-time)) + (format #t "~2Topen-frame: ~f~%" (-> this open-frame)) + (format #t "~2Tpre-open-frame: ~f~%" (-> this pre-open-frame)) + (format #t "~2Tlock-frame: ~f~%" (-> this lock-frame)) + (format #t "~2Tclose-speed-multiplier: ~f~%" (-> this close-speed-multiplier)) + (format #t "~2Topen-distance[2] @ #x~X~%" (-> this open-distance)) + (dotimes (s5-0 2) + (format #t "~T [~D]~2Topen-distance: (meters ~m)~%" s5-0 (-> this open-distance s5-0)) + ) + (format #t "~2Tactive-distance[2] @ #x~X~%" (-> this active-distance)) + (dotimes (s5-1 2) + (format #t "~T [~D]~2Tactive-distance: (meters ~m)~%" s5-1 (-> this active-distance s5-1)) + ) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Tgear-sound-id: ~D~%" (-> this gear-sound-id)) + (format #t "~2Tsound-gear: ~A~%" (-> this sound-gear)) + (format #t "~2Tsound-pre-open: ~A~%" (-> this sound-pre-open)) + (format #t "~2Tsound-pre-open-stop: ~A~%" (-> this sound-pre-open-stop)) + (format #t "~2Tsound-lock-loop: ~A~%" (-> this sound-lock-loop)) + (format #t "~2Tsound-lock-stop: ~A~%" (-> this sound-lock-stop)) + (format #t "~2Tsound-open: ~A~%" (-> this sound-open)) + (format #t "~2Tsound-open-loop: ~A~%" (-> this sound-open-loop)) + (format #t "~2Tsound-open-stop: ~A~%" (-> this sound-open-stop)) + (format #t "~2Tsound-close: ~A~%" (-> this sound-close)) + (format #t "~2Tsound-close-loop: ~A~%" (-> this sound-close-loop)) + (format #t "~2Tsound-close-stop: ~A~%" (-> this sound-close-stop)) + (format #t "~2Tsound-post-close: ~A~%" (-> this sound-post-close)) + (format #t "~2Tsound-post-close-stop: ~A~%" (-> this sound-post-close-stop)) + (format #t "~2Tspool-sound-time: ~D~%" (-> this spool-sound-time)) + (format #t "~2Tstart-open-time: ~D~%" (-> this start-open-time)) + (format #t "~2Tdoor-radius: (meters ~m)~%" (-> this door-radius)) + (format #t "~2Tallow-pilot?: ~A~%" (-> this allow-pilot?)) + (format #t "~2Tallow-flut?: ~A~%" (-> this allow-flut?)) + (format #t "~2Tblocking-plane?: ~A~%" (-> this blocking-plane?)) + (label cfg-10) + this + ) + +;; definition for method 10 of type com-airlock +(defmethod deactivate ((this com-airlock)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (process-entity-status! this (entity-perm-status subtask-complete) #f) + (if (nonzero? (-> this sound-id)) + (sound-stop (-> this sound-id)) + ) + (if (nonzero? (-> this gear-sound-id)) + (sound-stop (-> this gear-sound-id)) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; definition for method 7 of type com-airlock +;; WARN: Return type mismatch process-drawable vs com-airlock. +(defmethod relocate ((this com-airlock) (offset int)) + (if (nonzero? (-> this gear)) + (&+! (-> this gear) offset) + ) + (the-as com-airlock ((method-of-type process-drawable relocate) this offset)) + ) + +;; definition for method 22 of type com-airlock +;; INFO: Used lq/sq +(defmethod init-airlock! ((this com-airlock)) + (local-vars (sv-16 res-tag) (sv-32 res-tag)) + (process-entity-status! this (entity-perm-status subtask-complete) #f) + (set! (-> this open?) #f) + (process-drawable-from-entity! this (-> this entity)) + (let ((f0-0 (res-lump-float (-> this entity) 'rotoffset))) + (if (!= f0-0 0.0) + (quaternion-rotate-y! (-> this root quat) (-> this root quat) f0-0) + ) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((s5-0 (res-lump-value (-> this entity) 'options airlock-options :time -1000000000.0))) + (set! (-> this were-behind?) #f) + (set! (-> this inner?) (logtest? s5-0 (airlock-options ao0))) + (set! (-> this on-running) (res-lump-struct (-> this entity) 'on-running pair)) + (set! (-> this sound-behind?) #f) + (set! (-> this saw-pilot?) (the-as handle #f)) + (set! (-> this open-frame) 0.0) + (set! (-> this pre-open-frame) 0.0) + (set! (-> this lock-frame) 0.0) + (set! (-> this pre-open-speed) 2.0) + (set! (-> this allow-pilot?) #f) + (set! (-> this allow-flut?) (not (logtest? s5-0 (airlock-options block-flut)))) + (let ((v1-16 (cond + ((logtest? s5-0 (airlock-options front)) + 'front + ) + ((logtest? s5-0 (airlock-options back)) + 'back + ) + ) + ) + ) + (set! (-> this blocking-plane?) v1-16) + ) + ) + (set! (-> this open-distance 0) 143360.0) + (set! (-> this open-distance 1) 143360.0) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-21 (res-lump-data (-> this entity) 'distance (pointer float) :tag-ptr (& sv-16)))) + (when v1-21 + (if (>= (-> sv-16 elt-count) (the-as uint 1)) + (set! (-> this open-distance 0) (-> v1-21 0)) + ) + (if (>= (-> sv-16 elt-count) (the-as uint 2)) + (set! (-> this open-distance 1) (-> v1-21 1)) + ) + ) + ) + (set! (-> this active-distance 0) (+ 143360.0 (-> this open-distance 0))) + (set! (-> this active-distance 1) (+ 143360.0 (-> this open-distance 1))) + (set! sv-32 (new 'static 'res-tag)) + (let ((v1-25 (res-lump-data (-> this entity) 'idle-distance (pointer float) :tag-ptr (& sv-32)))) + (when v1-25 + (if (>= (-> sv-32 elt-count) (the-as uint 1)) + (set! (-> this active-distance 0) (-> v1-25 0)) + ) + (if (>= (-> sv-32 elt-count) (the-as uint 2)) + (set! (-> this active-distance 1) (-> v1-25 1)) + ) + ) + ) + (set! (-> this y-height) (res-lump-data (-> this entity) 'height vector)) + (set! (-> this level-name) (res-lump-struct (-> this entity) 'on-notice pair)) + (set! (-> this open-test) + (the-as pair ((method-of-type res-lump get-property-struct) + (-> this entity) + 'open-test + 'interp + -1000000000.0 + (the-as structure '(not (or (scene-player?) (focus-test? *target* grabbed)))) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (set! (-> this gear-start-frame) -1.0) + (set! (-> this gear-stop-frame) 10000.0) + (set! (-> this sound-gear) #f) + (set! (-> this sound-pre-open) #f) + (set! (-> this sound-pre-open-stop) #f) + (set! (-> this sound-lock-loop) #f) + (set! (-> this sound-lock-stop) #f) + (set! (-> this sound-post-close) #f) + (set! (-> this sound-post-close-stop) #f) + (set! (-> this sound-open) #f) + (set! (-> this sound-close) #f) + (set! (-> this sound-open-loop) #f) + (set! (-> this sound-close-loop) #f) + (set! (-> this sound-open-stop) #f) + (set! (-> this sound-close-stop) #f) + (set! (-> this door-radius) 20480.0) + (set! (-> this close-speed-multiplier) 2.0) + this + ) + +;; definition for function airlock-stop-part-trackers +;; WARN: Return type mismatch int vs none. +(defbehavior airlock-stop-part-trackers com-airlock () + (let ((gp-0 (ppointer->process (-> self child)))) + (while gp-0 + (if (type? gp-0 part-tracker) + (send-event gp-0 'draw #f) + ) + (set! gp-0 (ppointer->process (-> gp-0 brother))) + ) + ) + 0 + (none) + ) + +;; definition for function airlock-command-lookup +(defun airlock-command-lookup ((arg0 pair)) + (let* ((s5-0 (the-as object (-> *setting-control* user-current airlock-command))) + (s4-0 (-> (the-as pair s5-0) car)) + ) + (while (not (null? s5-0)) + (let ((a0-1 (-> (the-as pair s4-0) car))) + (if (or (= a0-1 'any) (string= (the-as string a0-1) (the-as string arg0))) + (return (-> (the-as pair (-> (the-as pair s4-0) cdr)) car)) + ) + ) + (set! s5-0 (-> (the-as pair s5-0) cdr)) + (set! s4-0 (-> (the-as pair s5-0) car)) + ) + ) + #f + ) + +;; definition for method 26 of type com-airlock +(defmethod com-airlock-method-26 ((this com-airlock) (arg1 vector) (side symbol)) + (case side + (('front) + (let ((f0-0 (check-crossing-distance this arg1 #f))) + (and (< 0.0 f0-0) (or (< (vector-vector-xz-distance (-> this root trans) arg1) (-> this active-distance 0)) + (< 0.0 (-> this last-distance)) + ) + ) + ) + ) + ) + ) + +;; definition for method 25 of type com-airlock +(defmethod check-crossing-distance ((this com-airlock) (arg0 vector) (arg1 symbol)) + (let ((s5-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (s4-1 (vector-! (new 'stack-no-clear 'vector) arg0 (-> this root trans))) + ) + (set! (-> s4-1 y) 0.0) + (let ((f30-0 (vector-dot s4-1 s5-0))) + (cond + ((not arg1) + ) + ((or (< (vector-vector-xz-distance (-> this root trans) arg0) 40960.0) + (< 0.7 (fabs (vector-dot s5-0 (vector-normalize! s4-1 1.0)))) + ) + (when (and (< f30-0 0.0) + (< 0.0 (-> this last-distance)) + (and (not (and *target* (focus-test? *target* grabbed teleporting))) + (< (fabs (- f30-0 (-> this last-distance))) 81920.0) + ) + ) + (let ((s5-1 (res-lump-struct (-> this entity) 'on-cross pair))) + (if s5-1 + (script-eval s5-1) + ) + ) + ) + (set! (-> this last-distance) f30-0) + ) + ((< 0.0 (-> this last-distance)) + (set! f30-0 (fmax 4096.0 f30-0)) + ) + ((< (-> this last-distance) 0.0) + (set! f30-0 (fmin -4096.0 f30-0)) + ) + ) + f30-0 + ) + ) + ) + +;; definition for method 23 of type com-airlock +(defmethod want-cross-airlock? ((this com-airlock)) + (local-vars (a0-22 entity-actor)) + (let* ((tpos (target-pos 0)) + (f30-0 (check-crossing-distance this tpos #t)) + (target-dist (vector-vector-xz-distance (-> this root trans) tpos)) + (s5-0 (< (current-time) (-> this latch-open-time))) + (cmd (airlock-command-lookup (the-as pair (-> this name)))) + ) + (if (= cmd 'open) + (set! s5-0 #t) + ) + (and (or s5-0 (< target-dist (if (>= f30-0 0.0) + (-> this active-distance 0) + (-> this active-distance 1) + ) + ) + ) + (and (or s5-0 (not (-> this y-height)) (and (>= (-> tpos y) (- (-> this root trans y) (-> this y-height y))) + (< (-> tpos y) (+ (-> this root trans y) (-> this y-height x))) + ) + ) + (begin + (if (and (not (-> this were-behind?)) (and (< f30-0 0.0) (-> this inner?))) + (set! (-> this were-behind?) #t) + ) + (< (-> this latch-closed-time) (current-time)) + ) + (or (not (and *target* (or (focus-test? *target* teleporting) + (and (not (-> this allow-pilot?)) (focus-test? *target* pilot)) + (and (not (-> this allow-flut?)) (focus-test? *target* flut)) + ) + ) + ) + (< f30-0 -409.6) + ) + (let ((f28-0 (check-crossing-distance this (camera-pos) #f))) + (if (and *target* + (< target-dist 81920.0) + (or (< (* f30-0 f28-0) 0.0) (and (>= 32768.0 (fabs f30-0)) (if (= (-> this blocking-plane?) 'front) + (< f30-0 0.0) + (< 0.0 f30-0) + ) + ) + ) + (and (or (not (-> this allow-flut?)) (not (-> this allow-pilot?))) + (not (logtest? (focus-status flut pilot) (-> *target* focus-status))) + ) + ) + (persist-with-delay *setting-control* 'pilot (seconds 0.1) 'pilot #f 0.0 0) + ) + (or (and (< f30-0 (-> this open-distance 0)) + (or (not (-> this were-behind?)) (< f30-0 20480.0)) + (and (or (< 409.6 f30-0) + (begin + (let ((a0-21 (-> this entity))) + (set! a0-22 (entity-actor-lookup a0-21 'next-actor 0)) + ) + (not a0-22) + ) + (logtest? (-> a0-22 extra perm status) (entity-perm-status subtask-complete)) + ) + (script-eval (-> this open-test)) + (and (-> *setting-control* user-current airlock) + (!= cmd 'close) + (not (and (-> this blocking-plane?) *target* (or (and (not (-> this allow-pilot?)) (focus-test? *target* pilot)) + (and (not (-> this allow-flut?)) (focus-test? *target* flut)) + ) + ) + ) + ) + ) + ) + s5-0 + (and (or (not *target*) (not (logtest? (-> *target* focus-status) (focus-status in-head)))) + (not (and (and (-> this next-state) (= (-> this next-state name) 'close)) + (= (-> this skel root-channel 0 frame-num) 0.0) + ) + ) + (or (< (* f30-0 f28-0) 0.0) + (and (< (fabs f28-0) 4096.0) + (< (vector-vector-xz-distance (camera-pos) (-> this root trans)) (-> this door-radius)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 24 of type com-airlock +(defmethod destination-loaded? ((this com-airlock) (level-status symbol)) + (let ((s5-1 (script-eval (-> this level-name)))) + (cond + ((not s5-1) + (if level-status + 'unknown + #f + ) + ) + (level-status + (let ((a1-3 (car s5-1))) + (while (not (null? s5-1)) + (let ((v1-4 (status-of-level-and-borrows *level* (the-as symbol a1-3) level-status))) + (case level-status + (('display) + (if (!= v1-4 'active) + (return #f) + ) + ) + (else + (if (not (or (= v1-4 'loaded) (= v1-4 'active))) + (return #f) + ) + ) + ) + ) + (set! s5-1 (cdr s5-1)) + (set! a1-3 (car (the-as pair s5-1))) + ) + ) + #t + ) + (else + (let* ((v1-13 s5-1) + (a0-8 (car v1-13)) + ) + (while (not (null? v1-13)) + (dotimes (a1-6 10) + (if (= a0-8 (-> *load-state* want a1-6 name)) + (goto cfg-32) + ) + ) + #t + (return #f) + (label cfg-32) + (set! v1-13 (cdr v1-13)) + (set! a0-8 (car (the-as pair v1-13))) + ) + ) + #t + ) + ) + ) + ) + +;; definition for method 27 of type com-airlock +(defmethod rotate-gear! ((this com-airlock) (arg0 float)) + (cond + ((and (>= (ja-aframe-num 0) (-> this gear-start-frame)) (< (ja-aframe-num 0) (-> this gear-stop-frame))) + (if (and (zero? (-> this gear-sound-id)) + (-> this sound-gear) + (and (-> this next-state) (= (-> this next-state name) 'open)) + (>= (check-crossing-distance this (target-pos 0) #f) 0.0) + ) + (set! (-> this gear-sound-id) (sound-play-by-spec (-> this sound-gear) (new-sound-id) (the-as vector #t))) + ) + (set-time! (-> this gear-play-time)) + (when (nonzero? (-> this gear)) + (seek! (-> this gear-rotv) arg0 (* 131072.0 (seconds-per-frame))) + (+! (-> this gear-rot) (* (-> this gear-rotv) (seconds-per-frame))) + (twist-set! (-> this gear) (the-as float #f) (the-as float #f) (-> this gear-rot)) + ) + ) + (else + (when (and (nonzero? (-> this gear-sound-id)) (time-elapsed? (-> this gear-play-time) (seconds 1.5))) + (let ((v1-28 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-28 command) (sound-command set-param)) + (set! (-> v1-28 id) (-> this gear-sound-id)) + (set! (-> v1-28 params volume) -4) + (set! (-> v1-28 auto-time) 120) + (set! (-> v1-28 auto-from) 2) + (set! (-> v1-28 params mask) (the-as uint 17)) + (-> v1-28 id) + ) + (set! (-> this gear-sound-id) (new 'static 'sound-id)) + 0 + ) + ) + ) + (-> this gear-rotv) + ) + +;; definition for method 28 of type com-airlock +;; WARN: Return type mismatch int vs none. +(defmethod play-city-voice-sound ((this com-airlock) (arg0 symbol)) + (let ((gp-0 (the-as (array string) #f))) + (case arg0 + (('enter) + (set! gp-0 (new 'static 'boxed-array :type string "cityv005" "cityv006" "cityv007" "cityv008" "cityv009")) + ) + (('exit) + (set! gp-0 (new 'static 'boxed-array :type string "cityv001" "cityv002" "cityv003" "cityv004")) + ) + ) + (cond + ((and gp-0 (time-elapsed? (-> this spool-sound-time) (seconds 2))) + (set-time! (-> this spool-sound-time)) + (add-process + *gui-control* + this + (gui-channel alert) + (gui-action play) + (-> gp-0 (rand-vu-int-range 0 (+ (-> gp-0 length) -1))) + -99.0 + 0 + ) + ) + (else + 0 + ) + ) + ) + (none) + ) + +;; definition for method 29 of type com-airlock +;; WARN: Return type mismatch int vs none. +(defmethod spawn-blocking-plane ((this com-airlock) (side symbol)) + (case side + (('front) + (let ((s5-0 (new 'static 'inline-array vector 2 (new 'static 'vector) (new 'static 'vector)))) + (vector-matrix*! + (-> s5-0 0) + (new 'static 'vector :x 40960.0 :w 1.0) + (-> this node-list data 0 bone transform) + ) + (vector-matrix*! + (-> s5-0 1) + (new 'static 'vector :x -40960.0 :w 1.0) + (-> this node-list data 0 bone transform) + ) + (blocking-plane-spawn (the-as curve-control #f) s5-0 122880.0) + ) + ) + (('back) + (let ((s5-1 (new 'static 'inline-array vector 2 (new 'static 'vector) (new 'static 'vector)))) + (vector-matrix*! + (-> s5-1 0) + (new 'static 'vector :x -40960.0 :w 1.0) + (-> this node-list data 0 bone transform) + ) + (vector-matrix*! + (-> s5-1 1) + (new 'static 'vector :x 40960.0 :w 1.0) + (-> this node-list data 0 bone transform) + ) + (blocking-plane-spawn (the-as curve-control #f) s5-1 122880.0) + ) + ) + (else + (blocking-plane-destroy) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-com-airlock-outer com-airlock-outer com-airlock-outer-lod0-jg com-airlock-outer-idle-ja + ((com-airlock-outer-lod0-mg (meters 999999))) + :bounds (static-spherem 0 5 0 14) + ) + +;; failed to figure out what this is: +(defskelgroup skel-com-airlock-inner com-airlock-inner com-airlock-inner-lod0-jg com-airlock-inner-idle-ja + ((com-airlock-inner-lod0-mg (meters 999999))) + :bounds (static-spherem 0 5 0 14) + ) + +;; failed to figure out what this is: +(defstate close (com-airlock) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('close) + (set! (-> self latch-closed-time) (+ (current-time) (if (>= argc 1) + (the-as int (-> block param 0)) + 3000 + ) + ) + ) + (if (and (>= argc 2) (and (= (-> block param 1) #t) (not (want-cross-airlock? self)))) + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! min) + ) + (and (-> self next-state) (= (-> self next-state name) 'open)) + ) + (('open) + (set! (-> self latch-open-time) (+ (current-time) (if (>= argc 1) + (the-as int (-> block param 0)) + 3000 + ) + ) + ) + (if (and (>= argc 2) (and (= (-> block param 1) #t) (want-cross-airlock? self) (destination-loaded? self #f))) + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! max) + ) + (and (-> self next-state) (= (-> self next-state name) 'close)) + ) + (('front) + (let ((f30-0 (check-crossing-distance self (target-pos 0) #f)) + (f0-3 (check-crossing-distance self (camera-pos) #f)) + ) + (and (< 2048.0 f30-0) (>= (* f30-0 f0-3) 0.0)) + ) + ) + (('back) + (let ((f30-1 (check-crossing-distance self (target-pos 0) #f)) + (f0-5 (check-crossing-distance self (camera-pos) #f)) + ) + (and (< f30-1 -2048.0) (>= (* f30-1 f0-5) 0.0)) + ) + ) + (('sound) + (if (>= (check-crossing-distance self (target-pos 0) #f) 0.0) + (play-city-voice-sound self (the-as symbol (-> block param 0))) + ) + ) + (('distance) + (* (the int (check-crossing-distance self (target-pos 0) #f)) 8) + ) + (('open?) + (-> self open?) + ) + ) + ) + :enter (behavior ((arg0 symbol)) + (set-time! (-> self state-time)) + (set! (-> self visible-move?) #f) + ) + :exit (behavior () + (spawn-blocking-plane self #f) + (when (nonzero? (-> self sound-id)) + (let ((v1-4 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-4 command) (sound-command set-param)) + (set! (-> v1-4 id) (-> self sound-id)) + (set! (-> v1-4 params volume) -4) + (set! (-> v1-4 auto-time) 24) + (set! (-> v1-4 auto-from) 2) + (set! (-> v1-4 params mask) (the-as uint 17)) + (-> v1-4 id) + ) + (set! (-> self sound-id) (new 'static 'sound-id)) + 0 + ) + (when (nonzero? (-> self gear-sound-id)) + (let ((v1-9 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-9 command) (sound-command set-param)) + (set! (-> v1-9 id) (-> self gear-sound-id)) + (set! (-> v1-9 params volume) -4) + (set! (-> v1-9 auto-time) 24) + (set! (-> v1-9 auto-from) 2) + (set! (-> v1-9 params mask) (the-as uint 17)) + (-> v1-9 id) + ) + (set! (-> self gear-sound-id) (new 'static 'sound-id)) + 0 + ) + (airlock-stop-part-trackers) + ) + :trans (behavior () + (if (logtest? (-> self draw status) (draw-control-status on-screen)) + (set! (-> self visible-move?) #t) + ) + (when (and (want-cross-airlock? self) + (and (!= (-> self state-time) (current-time)) + (begin + (let ((gp-0 (res-lump-struct (-> self entity) 'on-activate structure))) + (if gp-0 + (script-eval (the-as pair gp-0)) + ) + ) + (destination-loaded? self #f) + ) + ) + ) + (when (nonzero? (-> self sound-id)) + (let ((v1-19 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-19 command) (sound-command set-param)) + (set! (-> v1-19 id) (-> self sound-id)) + (set! (-> v1-19 params volume) -4) + (set! (-> v1-19 auto-time) 24) + (set! (-> v1-19 auto-from) 2) + (set! (-> v1-19 params mask) (the-as uint 17)) + (-> v1-19 id) + ) + (set! (-> self sound-id) (new 'static 'sound-id)) + 0 + ) + (go-virtual open #f) + ) + (let ((gp-1 (-> self on-running))) + (if gp-1 + (script-eval gp-1) + ) + ) + ) + :code (behavior ((arg0 symbol)) + (process-entity-status! self (entity-perm-status subtask-complete) #f) + (when (not arg0) + ((lambda :behavior com-airlock () (when (ja-max? 0) + (let ((gp-0 (res-lump-struct (-> self entity) 'on-start-close pair))) + (if (and gp-0 (not *scene-player*)) + (script-eval gp-0) + ) + ) + ) + ) + ) + (spawn-blocking-plane self #t) + (if (and (-> self sound-close) + (and (or (-> self sound-behind?) (>= (check-crossing-distance self (target-pos 0) #f) 0.0)) + (not arg0) + (-> self visible-move?) + ) + ) + (sound-play-by-spec (-> self sound-close) (new-sound-id) (the-as vector #t)) + ) + (if (and (-> self sound-close-loop) + (and (or (-> self sound-behind?) (>= (check-crossing-distance self (target-pos 0) #f) 0.0)) + (not arg0) + (-> self visible-move?) + ) + ) + (set! (-> self sound-id) (sound-play-by-spec (-> self sound-close-loop) (new-sound-id) (the-as vector #t))) + ) + (while (< (-> self open-frame) (ja-aframe-num 0)) + (rotate-gear! self 65536.0) + (when (and (-> self were-behind?) + (< 0.4 (vector-dot + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (-> (math-camera-matrix) fvec) + ) + ) + (< 0.0 (check-crossing-distance self (target-pos 0) #f)) + ) + (ja :num-func num-func-identity :frame-num (ja-aframe (-> self open-frame) 0)) + (goto cfg-42) + ) + (suspend) + (ja :num! (seek! 0.0 (-> self close-speed-multiplier))) + (transform-post) + ) + (label cfg-42) + (if (com-airlock-method-26 self (target-pos 0) 'front) + ((lambda :behavior com-airlock + () + (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)) + ) + ) + (when (-> self were-behind?) + (let ((gp-1 (res-lump-struct (-> self entity) 'on-inside structure))) + (set! (-> self were-behind?) #f) + (if (and gp-1 (not *scene-player*)) + (script-eval (the-as pair gp-1)) + ) + ) + ) + ) + ) + ) + (when (nonzero? (-> self sound-id)) + (let ((v1-48 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-48 command) (sound-command set-param)) + (set! (-> v1-48 id) (-> self sound-id)) + (set! (-> v1-48 params volume) -4) + (set! (-> v1-48 auto-time) 24) + (set! (-> v1-48 auto-from) 2) + (set! (-> v1-48 params mask) (the-as uint 17)) + (-> v1-48 id) + ) + (set! (-> self sound-id) (new 'static 'sound-id)) + 0 + ) + (if (and (-> self sound-close-stop) (not arg0) (-> self visible-move?)) + (sound-play-by-spec (-> self sound-close-stop) (new-sound-id) (the-as vector #t)) + ) + (while (not (ja-min? 0)) + (if (and (zero? (-> self sound-id)) + (-> self sound-post-close) + (and (or (-> self sound-behind?) (>= (check-crossing-distance self (target-pos 0) #f) 0.0)) + (not arg0) + (-> self visible-move?) + ) + ) + (set! (-> self sound-id) (sound-play-by-spec (-> self sound-post-close) (new-sound-id) (the-as vector #t))) + ) + (rotate-gear! self 65536.0) + (suspend) + (ja :num! (seek! 0.0)) + (transform-post) + ) + (when (nonzero? (-> self sound-id)) + (let ((v1-73 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-73 command) (sound-command set-param)) + (set! (-> v1-73 id) (-> self sound-id)) + (set! (-> v1-73 params volume) -4) + (set! (-> v1-73 auto-time) 24) + (set! (-> v1-73 auto-from) 2) + (set! (-> v1-73 params mask) (the-as uint 17)) + (-> v1-73 id) + ) + (set! (-> self sound-id) (new 'static 'sound-id)) + (if (-> self sound-post-close-stop) + (sound-play-by-spec (-> self sound-post-close-stop) (new-sound-id) (the-as vector #t)) + ) + ) + (set! (-> self open?) #f) + (when (com-airlock-method-26 self (target-pos 0) 'front) + (let ((gp-3 (res-lump-struct (-> self entity) 'on-deactivate structure))) + (if (and gp-3 (not *scene-player*)) + (script-eval (the-as pair gp-3)) + ) + ) + ) + (while (!= (-> self gear-rotv) 0.0) + (rotate-gear! self 0.0) + (suspend) + (transform-post) + ) + (when (nonzero? (-> self gear-sound-id)) + (let ((v1-93 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-93 command) (sound-command set-param)) + (set! (-> v1-93 id) (-> self gear-sound-id)) + (set! (-> v1-93 params volume) -4) + (set! (-> v1-93 auto-time) 24) + (set! (-> v1-93 auto-from) 2) + (set! (-> v1-93 params mask) (the-as uint 17)) + (-> v1-93 id) + ) + (set! (-> self gear-sound-id) (new 'static 'sound-id)) + 0 + ) + (airlock-stop-part-trackers) + ) + (spawn-blocking-plane self #f) + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! min) + (transform-post) + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + 0 + ) + ) + +;; failed to figure out what this is: +(defstate open (com-airlock) + :virtual #t + :event (-> (method-of-type com-airlock close) event) + :enter (behavior ((arg0 symbol)) + (set! (-> self visible-move?) #f) + ) + :exit (-> (method-of-type com-airlock close) exit) + :trans (behavior () + (if (logtest? (-> self draw status) (draw-control-status on-screen)) + (set! (-> self visible-move?) #t) + ) + (if (not (want-cross-airlock? self)) + (go-virtual close #f) + ) + (when (logtest? (-> self mask) (process-mask sleep-code)) + (let ((v1-15 (destination-loaded? self 'display))) + (when (or (not v1-15) (= v1-15 'unknown)) + (if (and (not v1-15) (< (-> self open-frame) (ja-aframe-num 0))) + (ja :num-func num-func-identity :frame-num (ja-aframe (-> self open-frame) 0)) + ) + (go-virtual close #f) + ) + ) + ) + (let ((gp-1 (-> self on-running))) + (if gp-1 + (script-eval gp-1) + ) + ) + ) + :code (behavior ((arg0 symbol)) + (when (not arg0) + ((lambda :behavior com-airlock + () + (when (ja-min? 0) + (let ((gp-0 (res-lump-struct (-> self entity) 'on-start-open pair))) + (if (and gp-0 (not *scene-player*) (time-elapsed? (-> self start-open-time) (seconds 0.1))) + (script-eval gp-0) + ) + ) + ) + ) + ) + (set-time! (-> self start-open-time)) + (when (< (check-crossing-distance self (target-pos 0) #f) 0.0) + (if (< (ja-aframe-num 0) (-> self pre-open-frame)) + (ja :num-func num-func-identity :frame-num (ja-aframe (-> self pre-open-frame) 0)) + ) + ) + (while (< (ja-aframe-num 0) (-> self lock-frame)) + (if (and (zero? (-> self sound-id)) + (-> self sound-pre-open) + (and (or (-> self sound-behind?) (>= (check-crossing-distance self (target-pos 0) #f) 0.0)) + (not arg0) + (-> self visible-move?) + ) + ) + (set! (-> self sound-id) (sound-play-by-spec (-> self sound-pre-open) (new-sound-id) (the-as vector #t))) + ) + (rotate-gear! self 65536.0) + (suspend) + (ja :num! (seek! (ja-aframe (-> self lock-frame) 0) (-> self pre-open-speed))) + (transform-post) + ) + (when (nonzero? (-> self sound-id)) + (let ((v1-29 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-29 command) (sound-command set-param)) + (set! (-> v1-29 id) (-> self sound-id)) + (set! (-> v1-29 params volume) -4) + (set! (-> v1-29 auto-time) 24) + (set! (-> v1-29 auto-from) 2) + (set! (-> v1-29 params mask) (the-as uint 17)) + (-> v1-29 id) + ) + (set! (-> self sound-id) (new 'static 'sound-id)) + (if (-> self sound-pre-open-stop) + (sound-play-by-spec (-> self sound-pre-open-stop) (new-sound-id) (the-as vector #t)) + ) + ) + (while (< (ja-aframe-num 0) (-> self open-frame)) + (if (and (zero? (-> self sound-id)) + (-> self sound-lock-loop) + (and (or (-> self sound-behind?) (>= (check-crossing-distance self (target-pos 0) #f) 0.0)) + (not arg0) + (-> self visible-move?) + ) + ) + (set! (-> self sound-id) (sound-play-by-spec (-> self sound-lock-loop) (new-sound-id) (the-as vector #t))) + ) + (rotate-gear! self 65536.0) + (suspend) + (ja :num! (seek! (ja-aframe (-> self open-frame) 0) 2.0)) + (transform-post) + ) + (when (nonzero? (-> self sound-id)) + (let ((v1-52 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-52 command) (sound-command set-param)) + (set! (-> v1-52 id) (-> self sound-id)) + (set! (-> v1-52 params volume) -4) + (set! (-> v1-52 auto-time) 24) + (set! (-> v1-52 auto-from) 2) + (set! (-> v1-52 params mask) (the-as uint 17)) + (-> v1-52 id) + ) + (set! (-> self sound-id) (new 'static 'sound-id)) + (if (-> self sound-lock-stop) + (sound-play-by-spec (-> self sound-lock-stop) (new-sound-id) (the-as vector #t)) + ) + ) + (while (not (destination-loaded? self #t)) + (if (not (destination-loaded? self #f)) + (go-virtual close #f) + ) + (rotate-gear! self 65536.0) + (suspend) + (transform-post) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (set! (-> self open?) #t) + (let ((s5-10 (res-lump-struct (-> self entity) 'on-enter structure))) + (if s5-10 + (script-eval (the-as pair s5-10)) + ) + ) + (if (and (-> self sound-open) + (and (or (-> self sound-behind?) (>= (check-crossing-distance self (target-pos 0) #f) 0.0)) + (not arg0) + (-> self visible-move?) + ) + ) + (sound-play-by-spec (-> self sound-open) (new-sound-id) (the-as vector #t)) + ) + (if (and (-> self sound-open-loop) + (and (or (-> self sound-behind?) (>= (check-crossing-distance self (target-pos 0) #f) 0.0)) + (not arg0) + (-> self visible-move?) + ) + ) + (set! (-> self sound-id) (sound-play-by-spec (-> self sound-open-loop) (new-sound-id) (the-as vector #t))) + ) + (set! (-> *ACTOR-bank* birth-max) 1000) + (while (not (ja-max? 0)) + (rotate-gear! self 65536.0) + (suspend) + (ja :num! (seek!)) + (transform-post) + ) + (when (nonzero? (-> self sound-id)) + (let ((v1-104 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-104 command) (sound-command set-param)) + (set! (-> v1-104 id) (-> self sound-id)) + (set! (-> v1-104 params volume) -4) + (set! (-> v1-104 auto-time) 24) + (set! (-> v1-104 auto-from) 2) + (set! (-> v1-104 params mask) (the-as uint 17)) + (-> v1-104 id) + ) + (set! (-> self sound-id) (new 'static 'sound-id)) + 0 + ) + (when (nonzero? (-> self gear-sound-id)) + (let ((v1-109 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-109 command) (sound-command set-param)) + (set! (-> v1-109 id) (-> self gear-sound-id)) + (set! (-> v1-109 params volume) -4) + (set! (-> v1-109 auto-time) 24) + (set! (-> v1-109 auto-from) 2) + (set! (-> v1-109 params mask) (the-as uint 17)) + (-> v1-109 id) + ) + (set! (-> self gear-sound-id) (new 'static 'sound-id)) + 0 + ) + (airlock-stop-part-trackers) + (if (and (-> self sound-open-stop) (not arg0) (-> self visible-move?)) + (sound-play-by-spec (-> self sound-open-stop) (new-sound-id) (the-as vector #t)) + ) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (set! (-> self open?) #t) + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! max) + (transform-post) + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + 0 + ) + ) + +;; definition of type com-airlock-outer +(deftype com-airlock-outer (com-airlock) + () + ) + +;; definition for method 3 of type com-airlock-outer +(defmethod inspect ((this com-airlock-outer)) + (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 com-airlock-outer +(defmethod init-from-entity! ((this com-airlock-outer) (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 20480.0 0.0 57344.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) 4) + (set-vector! (-> v1-8 local-sphere) 0.0 20480.0 0.0 32768.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 7) + (set-vector! (-> v1-10 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-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) + ) + (init-airlock! this) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-com-airlock-outer" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (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 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) + ) + +;; definition of type com-airlock-inner +(deftype com-airlock-inner (com-airlock) + () + ) + +;; definition for method 3 of type com-airlock-inner +(defmethod inspect ((this com-airlock-inner)) + (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 com-airlock-inner +(defmethod init-from-entity! ((this com-airlock-inner) (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 20480.0 0.0 57344.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) 4) + (set-vector! (-> v1-8 local-sphere) 0.0 20480.0 0.0 32768.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 8) + (set-vector! (-> v1-10 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-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-com-airlock-inner" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this lock-frame) 37.0) + (set! (-> this pre-open-frame) 65.0) + (set! (-> this open-frame) 75.0) + (set! (-> this gear) (new 'process 'joint-mod (joint-mod-mode rotate) this 12)) + (set! (-> this inner?) + (logtest? (the-as + int + (res-lump-value (-> this entity) 'options uint128 :default (the-as uint128 1) :time -1000000000.0) + ) + 1 + ) + ) + (set! (-> this pre-open-speed) 0.9) + (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) + ) + +;; failed to figure out what this is: +(defskelgroup skel-cty-door cty-door cty-door-lod0-jg cty-door-idle-ja + ((cty-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 5 0 8) + ) + +;; definition of type cty-door +(deftype cty-door (com-airlock) + () + ) + +;; definition for method 3 of type cty-door +(defmethod inspect ((this cty-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 cty-door +(defmethod init-from-entity! ((this cty-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 20480.0 0.0 32768.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) 4) + (set-vector! (-> v1-8 local-sphere) 0.0 20480.0 0.0 28672.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 5) + (set-vector! (-> v1-10 local-sphere) 0.0 20480.0 0.0 28672.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-cty-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (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) + ) + +;; failed to figure out what this is: +(defskelgroup skel-vin-door-ctyinda vin-door-ctyinda vin-door-ctyinda-lod0-jg vin-door-ctyinda-idle-ja + ((vin-door-ctyinda-lod0-mg (meters 999999))) + :bounds (static-spherem 0 3 0 6) + ) + +;; definition of type vin-door-ctyinda +(deftype vin-door-ctyinda (com-airlock) + () + ) + +;; definition for method 3 of type vin-door-ctyinda +(defmethod inspect ((this vin-door-ctyinda)) + (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 vin-door-ctyinda +(defmethod init-from-entity! ((this vin-door-ctyinda) (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 12288.0 0.0 24576.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) 4) + (set-vector! (-> v1-8 local-sphere) 8192.0 16384.0 0.0 20480.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 5) + (set-vector! (-> v1-10 local-sphere) -8192.0 16384.0 0.0 20480.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-vin-door-ctyinda" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (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) + ) + +;; failed to figure out what this is: +(defskelgroup skel-com-airlock-outer-mhcity com-airlock-outer-mhcity com-airlock-outer-mhcity-lod0-jg com-airlock-outer-mhcity-idle-ja + ((com-airlock-outer-mhcity-lod0-mg (meters 999999))) + :bounds (static-spherem 0 5 0 14) + ) + +;; definition of type com-airlock-outer-mhcity +(deftype com-airlock-outer-mhcity (com-airlock) + () + ) + +;; definition for method 3 of type com-airlock-outer-mhcity +(defmethod inspect ((this com-airlock-outer-mhcity)) + (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 com-airlock-outer-mhcity +(defmethod init-from-entity! ((this com-airlock-outer-mhcity) (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 20480.0 0.0 57344.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) 4) + (set-vector! (-> v1-8 local-sphere) 0.0 20480.0 0.0 32768.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 5) + (set-vector! (-> v1-10 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-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) + ) + (init-airlock! this) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-com-airlock-outer-mhcity" (the-as (pointer level) #f)) + ) + (the-as pair 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-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) + ) + +;; failed to figure out what this is: +(defskelgroup skel-hip-door-a hip-door-a hip-door-a-lod0-jg hip-door-a-idle-ja + ((hip-door-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 5) + ) + +;; definition of type hip-door-a +(deftype hip-door-a (com-airlock) + () + ) + +;; definition for method 3 of type hip-door-a +(defmethod inspect ((this hip-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 hip-door-a +(defmethod init-from-entity! ((this hip-door-a) (arg0 entity-actor)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) + (set! (-> s5-0 total-prims) (the-as uint 3)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 8192.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 0)))) + (set! (-> v1-8 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 4) + (set-vector! (-> v1-8 local-sphere) 0.0 8192.0 0.0 16384.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 5) + (set-vector! (-> v1-10 local-sphere) 0.0 8192.0 0.0 16384.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-hip-door-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (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/base-plat_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/base-plat_REF.gc new file mode 100644 index 0000000000..8898bb76f2 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/base-plat_REF.gc @@ -0,0 +1,430 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type base-plat +(deftype base-plat (process-focusable) + ((smush smush-control :inline) + (basetrans vector :inline) + (bounce-time time-frame) + (bouncing symbol) + (bounce-scale meters) + ) + (:methods + (update-part-and-sfx! (_type_) none) + (init-bounce-params! (_type_) none) + (start-bounce! (_type_) none :behavior base-plat) + (get-art-group (_type_) art-group) + (init-collision! (_type_) none) + (base-plat-method-33 (_type_) none) + (base-plat-method-34 (_type_) none) + ) + ) + +;; definition for method 3 of type base-plat +(defmethod inspect ((this base-plat)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tsmush: #~%" (-> this smush)) + (format #t "~2Tbasetrans: #~%" (-> this basetrans)) + (format #t "~2Tbounce-time: ~D~%" (-> this bounce-time)) + (format #t "~2Tbouncing: ~A~%" (-> this bouncing)) + (format #t "~2Tbounce-scale: (meters ~m)~%" (-> this bounce-scale)) + (label cfg-4) + this + ) + +;; definition for method 34 of type base-plat +;; WARN: Return type mismatch int vs none. +(defmethod base-plat-method-34 ((this base-plat)) + 0 + (none) + ) + +;; definition for method 29 of type base-plat +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-bounce-params! ((this base-plat)) + (set! (-> this basetrans quad) (-> this root trans quad)) + (set! (-> this bouncing) #f) + (set! (-> this bounce-scale) 819.2) + 0 + (none) + ) + +;; definition for method 30 of type base-plat +;; WARN: Return type mismatch int vs none. +(defmethod start-bounce! ((this base-plat)) + (activate! (-> this smush) -1.0 60 150 1.0 1.0 (-> self clock)) + (set-time! (-> this bounce-time)) + (set! (-> this bouncing) #t) + (sound-play "plat-bounce" :position (-> this root trans)) + (logclear! (-> this mask) (process-mask sleep)) + (logclear! (-> this mask) (process-mask sleep-code)) + 0 + (none) + ) + +;; definition for function plat-code +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior plat-code base-plat () + (transform-post) + (suspend) + (transform-post) + (suspend) + (until #f + (when (not (-> self bouncing)) + (logior! (-> self mask) (process-mask sleep)) + (suspend) + 0 + ) + (while (-> self bouncing) + (suspend) + ) + ) + #f + (none) + ) + +;; definition for function plat-trans +;; INFO: Used lq/sq +(defbehavior plat-trans base-plat () + (rider-trans) + (cond + ((-> self bouncing) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self basetrans quad)) + (+! (-> gp-0 y) (* (-> self bounce-scale) (update! (-> self smush)))) + (move-to-point! (-> self root) gp-0) + ) + (if (not (!= (-> self smush amp) 0.0)) + (set! (-> self bouncing) #f) + ) + ) + (else + (move-to-point! (-> self root) (-> self basetrans)) + ) + ) + (none) + ) + +;; definition for function plat-post +(defbehavior plat-post base-plat () + (update-part-and-sfx! self) + (rider-post) + (none) + ) + +;; definition for method 33 of type base-plat +;; WARN: Return type mismatch int vs none. +(defmethod base-plat-method-33 ((this base-plat)) + 0 + (none) + ) + +;; definition for method 28 of type base-plat +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod update-part-and-sfx! ((this base-plat)) + (if (nonzero? (-> this part)) + (spawn (-> this part) (-> this root trans)) + ) + (when (nonzero? (-> this sound)) + (set! (-> this sound trans quad) (-> this root trans quad)) + (update! (-> this sound)) + ) + (none) + ) + +;; definition for function plat-event +;; WARN: Return type mismatch none vs object. +(defbehavior plat-event base-plat ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('bonk) + (start-bounce! self) + ) + ) + ) + +;; definition of type eco-door +(deftype eco-door (process-drawable) + ((root collide-shape :override) + (speed float) + (open-distance float) + (close-distance float) + (out-dir vector :inline) + (open-sound sound-name) + (close-sound sound-name) + (state-actor entity-actor) + (flags eco-door-flags) + (locked symbol) + (auto-close symbol) + (one-way symbol) + ) + (:state-methods + door-closed + door-opening + door-open + door-closing + ) + (:methods + (update-lock-status! (_type_) none) + (init-collision! (_type_) none) + (eco-door-method-26 (_type_) none) + ) + ) + +;; definition for method 3 of type eco-door +;; INFO: Used lq/sq +(defmethod inspect ((this eco-door)) + (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 "~2Topen-distance: ~f~%" (-> this open-distance)) + (format #t "~2Tclose-distance: ~f~%" (-> this close-distance)) + (format #t "~2Tout-dir: #~%" (-> this out-dir)) + (format #t "~2Topen-sound: ~D~%" (-> this open-sound)) + (format #t "~2Tclose-sound: ~D~%" (-> this close-sound)) + (format #t "~2Tstate-actor: ~A~%" (-> this state-actor)) + (format #t "~2Tflags: ~D~%" (-> this flags)) + (format #t "~2Tlocked: ~A~%" (-> this locked)) + (format #t "~2Tauto-close: ~A~%" (-> this auto-close)) + (format #t "~2Tone-way: ~A~%" (-> this one-way)) + (label cfg-4) + this + ) + +;; definition for function eco-door-event-handler +;; WARN: Return type mismatch symbol vs object. +(defbehavior eco-door-event-handler eco-door ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('trigger) + (set! (-> self locked) (not (-> self locked))) + (cond + ((-> self locked) + (if (and (-> self next-state) (= (-> self next-state name) 'door-closed)) + (sound-play "door-lock") + ) + ) + (else + (sound-play "door-unlock") + ) + ) + #t + ) + ) + ) + +;; failed to figure out what this is: +(defstate door-closed (eco-door) + :virtual #t + :code (behavior () + (ja :num-func num-func-identity :frame-num 0.0) + (suspend) + (update-transforms (-> self root)) + (ja-post) + (until #f + (when (and *target* + (and (>= (-> self open-distance) (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (update-lock-status! self) + (if (and (not (-> self locked)) + (or (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + (send-event *target* 'query 'powerup (pickup-type eco-blue)) + (and (-> self one-way) (< (vector4-dot (-> self out-dir) (target-pos 0)) -8192.0)) + ) + ) + (go-virtual door-opening) + ) + ) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate door-opening (eco-door) + :virtual #t + :code (behavior () + (if (and (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + ) + (send-event *target* 'query 'powerup (pickup-type eco-blue)) + ) + (sound-play "blue-eco-on" :position (-> self root trans)) + ) + (sound-play-by-name (-> self open-sound) (new-sound-id) 1024 0 0 (sound-group) #t) + (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 + (until (ja-done? 0) + (ja :num! (seek! max (-> self speed))) + (suspend) + ) + (go-virtual door-open) + ) + :post transform-post + ) + +;; failed to figure out what this is: +(defstate door-open (eco-door) + :virtual #t + :code (behavior () + (set-time! (-> self state-time)) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (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 + (ja :num-func num-func-identity :frame-num max) + (logior! (-> self draw status) (draw-control-status no-draw)) + (suspend) + (update-transforms (-> self root)) + (ja-post) + (until #f + (let ((f30-0 (vector4-dot (-> self out-dir) (target-pos 0))) + (f28-0 (vector4-dot (-> self out-dir) (camera-pos))) + ) + (when (and (-> self auto-close) + (or (not *target*) + (or (< (-> self close-distance) (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (focus-test? *target* teleporting) + ) + ) + ) + (if (and (>= (* f30-0 f28-0) 0.0) (< 16384.0 (fabs f28-0))) + (go-virtual door-closing) + ) + ) + ) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate door-closing (eco-door) + :virtual #t + :code (behavior () + (let ((v1-1 (-> self root root-prim))) + (set! (-> v1-1 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-1 prim-core collide-with) (-> self root backup-collide-with)) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (let ((gp-0 (new 'stack 'overlaps-others-params))) + (set! (-> gp-0 options) (overlaps-others-options oo0)) + (set! (-> gp-0 tlist) #f) + (while (find-overlapping-shapes (-> self root) gp-0) + (suspend) + ) + ) + (sound-play-by-name (-> self close-sound) (new-sound-id) 1024 0 0 (sound-group) #t) + (until (ja-done? 0) + (ja :num! (seek! 0.0 (-> self speed))) + (suspend) + ) + (if (-> self locked) + (sound-play "door-lock") + ) + (go-virtual door-closed) + ) + :post transform-post + ) + +;; definition for method 24 of type eco-door +;; WARN: Return type mismatch int vs none. +(defmethod update-lock-status! ((this eco-door)) + (when (-> this state-actor) + (if (logtest? (-> this state-actor extra perm status) (entity-perm-status subtask-complete)) + (set! (-> this locked) (logtest? (-> this flags) (eco-door-flags unlocked))) + (set! (-> this locked) (logtest? (-> this flags) (eco-door-flags locked))) + ) + ) + 0 + (none) + ) + +;; definition for method 25 of type eco-door +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this eco-door)) + (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 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) 0) + (set-vector! (-> v1-2 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-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 26 of type eco-door +;; WARN: Return type mismatch int vs none. +(defmethod eco-door-method-26 ((this eco-door)) + 0 + (none) + ) + +;; definition for method 11 of type eco-door +(defmethod init-from-entity! ((this eco-door) (arg0 entity-actor)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (let ((f0-0 (res-lump-float (-> this entity) 'scale :default 1.0))) + (set-vector! (-> this root scale) f0-0 f0-0 f0-0 1.0) + ) + (set! (-> this open-distance) 32768.0) + (set! (-> this close-distance) 49152.0) + (set! (-> this speed) 1.0) + (set! (-> this state-actor) #f) + (let ((v1-8 (entity-actor-lookup arg0 'state-actor 0))) + (if v1-8 + (set! (-> this state-actor) v1-8) + ) + ) + (set! (-> this locked) #f) + (set! (-> this flags) (res-lump-value arg0 'flags eco-door-flags :time -1000000000.0)) + (update-lock-status! this) + (set! (-> this auto-close) (logtest? (-> this flags) (eco-door-flags auto-close))) + (set! (-> this one-way) (logtest? (-> this flags) (eco-door-flags one-way))) + (vector-z-quaternion! (-> this out-dir) (-> this root quat)) + (set! (-> this out-dir w) (- (vector-dot (-> this out-dir) (-> this root trans)))) + (update-transforms (-> this root)) + (eco-door-method-26 this) + (if (and (not (-> this auto-close)) + (-> this entity) + (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + ) + (go (method-of-object this door-open)) + (go (method-of-object this door-closed)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/common-obs/basebutton_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/basebutton_REF.gc new file mode 100644 index 0000000000..877fc1f3b8 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/basebutton_REF.gc @@ -0,0 +1,489 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type basebutton +(deftype basebutton (process-focusable) + ((button-status button-status) + (notify-actor entity) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (timeout float) + (button-id int32) + (event-going-down symbol) + (event-down symbol) + (event-going-up symbol) + (event-up symbol) + (anim-speed float) + (move-to-pos vector :inline) + (move-to-quat quaternion :inline) + ) + (:state-methods + down-idle + going-down + going-up + up-idle + ) + (:methods + (init! (_type_) none) + (idle-state-transition (_type_) object) + (init-skel-and-ja! (_type_) none) + (init-collision! (_type_) none) + (prepare-trigger-event! (_type_) none) + (send-event! (_type_ symbol) none) + (move-to! (_type_ vector quaternion) none) + (press! (_type_ symbol) entity-perm-status) + ) + ) + +;; definition for method 3 of type basebutton +(defmethod inspect ((this basebutton)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tbutton-status: ~D~%" (-> this button-status)) + (format #t "~2Tnotify-actor: ~A~%" (-> this notify-actor)) + (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 "~2Ttimeout: ~f~%" (-> this timeout)) + (format #t "~2Tbutton-id: ~D~%" (-> this button-id)) + (format #t "~2Tevent-going-down: ~A~%" (-> this event-going-down)) + (format #t "~2Tevent-down: ~A~%" (-> this event-down)) + (format #t "~2Tevent-going-up: ~A~%" (-> this event-going-up)) + (format #t "~2Tevent-up: ~A~%" (-> this event-up)) + (format #t "~2Tanim-speed: ~f~%" (-> this anim-speed)) + (format #t "~2Tmove-to-pos: #~%" (-> this move-to-pos)) + (format #t "~2Tmove-to-quat: #~%" (-> this move-to-quat)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-generic-button mtn-dice-button 0 3 ((1 (meters 999999))) :bounds (static-spherem 0 0 0 3)) + +;; definition for method 38 of type basebutton +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod move-to! ((this basebutton) (arg0 vector) (arg1 quaternion)) + (logclear! (-> this button-status) (button-status button-status-2)) + (if arg0 + (set! (-> this move-to-pos quad) (-> arg0 quad)) + (set! (-> this move-to-pos quad) (-> this root trans quad)) + ) + (if arg1 + (quaternion-copy! (-> this move-to-quat) arg1) + (quaternion-copy! (-> this move-to-quat) (-> this root quat)) + ) + 0 + (none) + ) + +;; definition for method 33 of type basebutton +(defmethod idle-state-transition ((this basebutton)) + (if (logtest? (-> this button-status) (button-status pressed)) + (go (method-of-object this down-idle)) + (go (method-of-object this up-idle)) + ) + ) + +;; failed to figure out what this is: +(defstate up-idle (basebutton) + :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)))) + (case (-> v1-1 mode) + (('flop 'spin 'punch 'eco-yellow 'eco-red 'eco-blue 'eco-dark) + (when (or (not (or (= (-> v1-1 mode) 'spin) (= (-> v1-1 mode) 'punch))) + (logtest? (-> self button-status) (button-status button-status-3)) + ) + (send-event! self (-> self event-going-down)) + (go-virtual going-down) + ) + ) + ) + ) + ) + (('trigger) + (sound-play "silo-button") + (go-virtual going-down) + ) + (('touch) + (when (logtest? (-> self button-status) (button-status button-status-4)) + (send-event! self (-> self event-going-down)) + (go-virtual going-down) + ) + ) + (('move-to) + (move-to! self (the-as vector (-> block param 0)) (the-as quaternion (-> block param 1))) + ) + ) + ) + :enter (behavior () + (press! self #f) + ) + :trans (behavior () + (if (logtest? (-> self button-status) (button-status button-status-2)) + (rider-trans) + ) + ) + :code sleep-code + :post (behavior () + (when (logtest? (-> self button-status) (button-status button-status-2)) + (logclear! (-> self button-status) (button-status button-status-2)) + (set! (-> self root trans quad) (-> self move-to-pos quad)) + (quaternion-copy! (-> self root quat) (-> self move-to-quat)) + (rider-post) + ) + ) + ) + +;; failed to figure out what this is: +(defstate going-down (basebutton) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('untrigger) + (go-virtual going-up) + ) + (('move-to) + (move-to! self (the-as vector (-> block param 0)) (the-as quaternion (-> block param 1))) + ) + ) + ) + :enter (behavior () + (press! self #t) + ) + :trans rider-trans + :code (behavior () + (ja-no-eval :num! (seek! max (-> self anim-speed))) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (-> self anim-speed))) + ) + (send-event! self (-> self event-down)) + (let ((gp-0 (res-lump-struct (-> self entity) 'on-activate structure))) + (if gp-0 + (script-eval (the-as pair gp-0)) + ) + ) + (go-virtual down-idle) + ) + :post (behavior () + (when (logtest? (-> self button-status) (button-status button-status-2)) + (logclear! (-> self button-status) (button-status button-status-2)) + (set! (-> self root trans quad) (-> self move-to-pos quad)) + (quaternion-copy! (-> self root quat) (-> self move-to-quat)) + ) + (rider-post) + ) + ) + +;; failed to figure out what this is: +(defstate down-idle (basebutton) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('untrigger) + (go-virtual going-up) + ) + (('move-to) + (move-to! self (the-as vector (-> block param 0)) (the-as quaternion (-> block param 1))) + ) + ) + ) + :enter (behavior () + (press! self #t) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (logtest? (-> self button-status) (button-status button-status-2)) + (rider-trans) + ) + ) + :code (behavior () + (cond + ((= (-> self timeout) 0.0) + (sleep-code) + ) + (else + (until (time-elapsed? (-> self state-time) (the int (* 300.0 (-> self timeout)))) + (suspend) + ) + (send-event! self (-> self event-going-up)) + (sound-play "silo-button") + (go-virtual going-up) + ) + ) + ) + :post (behavior () + (when (logtest? (-> self button-status) (button-status button-status-2)) + (logclear! (-> self button-status) (button-status button-status-2)) + (set! (-> self root trans quad) (-> self move-to-pos quad)) + (quaternion-copy! (-> self root quat) (-> self move-to-quat)) + (rider-post) + ) + ) + ) + +;; failed to figure out what this is: +(defstate going-up (basebutton) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('move-to) + (move-to! self (the-as vector (-> block param 0)) (the-as quaternion (-> block param 1))) + ) + (('trigger) + (go-virtual going-down) + ) + ) + ) + :enter (behavior () + (press! self #f) + ) + :trans rider-trans + :code (behavior () + (ja-no-eval :num! (seek! 0.0 (-> self anim-speed))) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 0.0 (-> self anim-speed))) + ) + (send-event! self (-> self event-up)) + (go-virtual up-idle) + ) + :post (behavior () + (when (logtest? (-> self button-status) (button-status button-status-2)) + (logclear! (-> self button-status) (button-status button-status-2)) + (set! (-> self root trans quad) (-> self move-to-pos quad)) + (quaternion-copy! (-> self root quat) (-> self move-to-quat)) + ) + (rider-post) + ) + ) + +;; definition for method 39 of type basebutton +(defmethod press! ((this basebutton) (arg0 symbol)) + (if arg0 + (logior! (-> this button-status) (button-status pressed)) + (logclear! (-> this button-status) (button-status pressed)) + ) + (when (not (logtest? (-> this button-status) (button-status button-status-1))) + (if arg0 + (process-entity-status! this (entity-perm-status subtask-complete) #t) + (process-entity-status! this (entity-perm-status subtask-complete) #f) + ) + ) + ) + +;; definition for method 37 of type basebutton +;; WARN: Return type mismatch int vs none. +(defmethod send-event! ((this basebutton) (arg0 symbol)) + (with-pp + (when arg0 + (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) arg0) + (let ((t9-0 send-event-function) + (v1-2 (-> this notify-actor)) + ) + (t9-0 + (if v1-2 + (-> v1-2 extra process) + ) + a1-1 + ) + ) + ) + (dotimes (s4-0 (-> this actor-group-count)) + (let ((s3-0 (-> this actor-group s4-0))) + (dotimes (s2-0 (-> s3-0 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) arg0) + (let ((t9-1 send-event-function) + (v1-10 (-> s3-0 data s2-0 actor)) + ) + (t9-1 + (if v1-10 + (-> v1-10 extra process) + ) + a1-2 + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 32 of type basebutton +;; WARN: Return type mismatch int vs none. +(defmethod init! ((this basebutton)) + (set! (-> this button-status) (button-status)) + (set! (-> this notify-actor) #f) + (set! (-> this timeout) 0.0) + (set! (-> this event-going-down) #f) + (set! (-> this event-down) #f) + (set! (-> this event-going-up) #f) + (set! (-> this event-up) #f) + (set! (-> this anim-speed) 1.0) + 0 + (none) + ) + +;; definition for method 36 of type basebutton +;; WARN: Return type mismatch int vs none. +(defmethod prepare-trigger-event! ((this basebutton)) + (set! (-> this event-going-down) 'trigger) + 0 + (none) + ) + +;; definition for method 34 of type basebutton +;; WARN: Return type mismatch int vs none. +(defmethod init-skel-and-ja! ((this basebutton)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-generic-button" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (ja-channel-set! 1) + (cond + ((logtest? (-> this button-status) (button-status pressed)) + (let ((s5-1 (-> this skel root-channel 0))) + (joint-control-channel-group-eval! + s5-1 + (the-as art-joint-anim (-> this draw art-group data 3)) + num-func-identity + ) + (set! (-> s5-1 frame-num) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 3)) frames num-frames) -1)) + ) + ) + ) + (else + (let ((s5-2 (-> this skel root-channel 0))) + (joint-control-channel-group-eval! + s5-2 + (the-as art-joint-anim (-> this draw art-group data 3)) + num-func-identity + ) + (set! (-> s5-2 frame-num) 0.0) + ) + ) + ) + (set! (-> this anim-speed) 2.0) + (transform-post) + (none) + ) + +;; definition for method 35 of type basebutton +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this basebutton)) + (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 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! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 12288.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 basebutton +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this basebutton) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (init! this) + (set! (-> this button-id) -1) + (let ((v1-4 (res-lump-value (-> this entity) 'extra-id uint128 :default (the-as uint128 -1) :time -1000000000.0))) + (if (>= (the-as int v1-4) 0) + (set! (-> this button-id) (the-as int v1-4)) + ) + ) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (if (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (logior! (-> this button-status) (button-status pressed)) + (logclear! (-> this button-status) (button-status pressed)) + ) + (set! (-> this notify-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-15 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-15 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-15)) + (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 timeout) (res-lump-float arg0 'timeout)) + (if (not (logtest? (-> this button-status) (button-status button-status-1))) + (nav-mesh-connect-from-ent this) + ) + (prepare-trigger-event! this) + (init-skel-and-ja! this) + (idle-state-transition this) + ) + +;; definition for function basebutton-init-by-other +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defbehavior basebutton-init-by-other basebutton ((arg0 entity-actor) (arg1 vector) (arg2 quaternion) (arg3 entity-actor) (arg4 symbol) (arg5 float)) + (init! self) + (logior! (-> self button-status) (button-status button-status-1)) + (set! (-> self button-id) -1) + (if arg4 + (logior! (-> self button-status) (button-status pressed)) + ) + (set! (-> self notify-actor) arg3) + (set! (-> self timeout) arg5) + (if arg0 + (process-entity-set! self arg0) + ) + (set! (-> self actor-group) (the-as (pointer actor-group) #f)) + (set! (-> self actor-group-count) 0) + (init-collision! self) + (set! (-> self root trans quad) (-> arg1 quad)) + (quaternion-copy! (-> self root quat) arg2) + (set-vector! (-> self root scale) 1.0 1.0 1.0 1.0) + (prepare-trigger-event! self) + (init-skel-and-ja! self) + (idle-state-transition self) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/common-obs/blocking-plane_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/blocking-plane_REF.gc new file mode 100644 index 0000000000..9715b51667 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/blocking-plane_REF.gc @@ -0,0 +1,292 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type blocking-plane +(deftype blocking-plane (process-drawable) + ((root collide-shape :override) + (current-attack-mode symbol) + ) + (:state-methods + idle + ) + (:methods + (init! (_type_ (inline-array vector) float) none) + ) + ) + +;; definition for method 3 of type blocking-plane +(defmethod inspect ((this blocking-plane)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tcurrent-attack-mode: ~A~%" (-> this current-attack-mode)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-blocking-plane blocking-plane blocking-plane-lod0-jg blocking-plane-idle-ja + ((blocking-plane-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 100.1) + :texture-level 10 + ) + +;; failed to figure out what this is: +(defstate idle (blocking-plane) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 object)) + (case message + (('on) + (cond + ((nonzero? (-> self root)) + (let ((v1-3 (-> self root root-prim))) + (set! (-> v1-3 prim-core collide-as) (-> self root backup-collide-as)) + (set! v0-0 (-> self root backup-collide-with)) + (set! (-> v1-3 prim-core collide-with) (the-as collide-spec v0-0)) + ) + v0-0 + ) + (else + (let ((gp-1 (-> self child))) + (while gp-1 + (let ((s5-0 (ppointer->process gp-1))) + (set! gp-1 (-> gp-1 0 brother)) + (if (type? s5-0 blocking-plane) + (send-event s5-0 'on) + ) + ) + ) + ) + #f + ) + ) + ) + (('off) + (cond + ((nonzero? (-> self root)) + (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 + ) + (else + (let ((gp-2 (-> self child))) + (while gp-2 + (let ((s5-1 (ppointer->process gp-2))) + (set! gp-2 (-> gp-2 0 brother)) + (if (type? s5-1 blocking-plane) + (send-event s5-1 'off) + ) + ) + ) + ) + #f + ) + ) + ) + (('collide-as) + (set! v0-0 (-> block param 0)) + (set! (-> self root root-prim prim-core collide-as) (the-as collide-spec v0-0)) + v0-0 + ) + (('attack-mode) + (set! v0-0 (-> block param 0)) + (set! (-> self current-attack-mode) (the-as symbol v0-0)) + v0-0 + ) + (('touch 'bonk 'attack) + (when (-> self current-attack-mode) + (let ((v1-25 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (if (< (vector-dot + (vector-! (new 'stack-no-clear 'vector) (-> (the-as process-drawable proc) root trans) (-> self root trans)) + v1-25 + ) + 0.0 + ) + (vector-float*! v1-25 v1-25 -1.0) + ) + (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) + (mode (-> self current-attack-mode)) + (vector v1-25) + (shove-up (meters 2)) + (shove-back (meters 4)) + ) + ) + ) + ) + ) + ) + (('impact-impulse) + (send-event (ppointer->process (-> self parent)) 'blocking-plane-hit (-> block param 0)) + ) + ) + ) + :code sleep-code + ) + +;; definition for method 21 of type blocking-plane +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init! ((this blocking-plane) (arg0 (inline-array vector)) (arg1 float)) + (let ((s3-0 (-> arg0 0)) + (s4-0 (-> arg0 1)) + ) + 0.0 + (* 0.5 (vector-vector-distance s3-0 s4-0)) + (let ((s2-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((v1-3 (new 'process 'collide-shape-prim-mesh s2-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-3 prim-core collide-as) (collide-spec obstacle blocking-plane)) + (set! (-> v1-3 prim-core collide-with) (collide-spec jak vehicle-sphere hit-by-others-list player-list)) + (set! (-> v1-3 prim-core action) (collide-action solid)) + (set! (-> v1-3 transform-index) 3) + (set! (-> s2-0 total-prims) (the-as uint 1)) + (set! (-> s2-0 root-prim) v1-3) + ) + (set! (-> s2-0 nav-radius) (* 0.75 (-> s2-0 root-prim local-sphere w))) + (let ((v1-6 (-> s2-0 root-prim))) + (set! (-> s2-0 backup-collide-as) (-> v1-6 prim-core collide-as)) + (set! (-> s2-0 backup-collide-with) (-> v1-6 prim-core collide-with)) + ) + (set! (-> this root) s2-0) + ) + (let ((s1-0 (new 'stack-no-clear 'matrix)) + (s2-1 (-> this root)) + ) + (vector+! (-> s2-1 trans) s3-0 s4-0) + (vector-float*! (-> s2-1 trans) (-> s2-1 trans) 0.5) + (+! (-> s2-1 trans y) (* 0.5 arg1)) + (vector-! (-> s1-0 rvec) s4-0 s3-0) + (let ((f30-1 (vector-normalize-ret-len! (-> s1-0 rvec) 1.0))) + (set! (-> s2-1 scale x) (* 0.00024414062 f30-1)) + (set! (-> s2-1 scale y) (* 0.00024414062 arg1)) + (set! (-> s2-1 scale z) 0.0) + (set! (-> s1-0 uvec quad) (-> (new 'static 'vector :y 1.0 :w 1.0) quad)) + (vector-cross! (-> s1-0 fvec) (-> s1-0 rvec) (-> s1-0 uvec)) + (vector-normalize! (-> s1-0 fvec) 1.0) + (matrix->quaternion (-> s2-1 quat) s1-0) + (let ((v1-20 (-> this root root-prim local-sphere))) + (set! (-> v1-20 x) 0.0) + (set! (-> v1-20 y) (* 0.00024414062 (* 0.5 arg1))) + (set! (-> v1-20 z) 0.0) + (let ((f0-17 0.5) + (f1-7 (* f30-1 f30-1)) + (f2-2 arg1) + ) + (set! (-> v1-20 w) (* f0-17 (sqrtf (+ f1-7 (* f2-2 f2-2))))) + ) + ) + ) + ) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-blocking-plane" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logior! (-> this draw status) (draw-control-status no-draw-bounds)) + (transform-post) + (none) + ) + +;; definition for function blocking-plane-init-by-other +(defbehavior blocking-plane-init-by-other blocking-plane ((arg0 (inline-array vector)) (arg1 float)) + (if (not arg0) + (deactivate self) + ) + (init! self arg0 arg1) + (set! (-> self current-attack-mode) #f) + (set! (-> self event-hook) (-> (method-of-object self idle) event)) + (go-virtual idle) + ) + +;; definition for method 11 of type blocking-plane +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this blocking-plane) (arg0 entity-actor)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this current-attack-mode) #f) + (let ((s5-0 (new 'process 'path-control this 'path 0.0 (the-as entity #f) #f)) + (f30-0 (res-lump-float (-> this entity) 'height :default 122880.0)) + ) + (set! (-> this path) s5-0) + (if (or (not s5-0) (< (-> s5-0 curve num-cverts) 2)) + (go process-drawable-art-error "bad path") + ) + (logior! (-> s5-0 flags) (path-control-flag display draw-line draw-point draw-text)) + (let ((s4-0 (+ (-> s5-0 curve num-cverts) -1)) + (s3-0 (new 'stack-no-clear 'inline-array 'vector 2)) + ) + (dotimes (v1-14 2) + (set! (-> s3-0 v1-14 quad) (the-as uint128 0)) + ) + (dotimes (s2-0 s4-0) + (get-point-in-path! s5-0 (-> s3-0 0) (the float s2-0) 'interp) + (get-point-in-path! s5-0 (-> s3-0 1) (the float (+ s2-0 1)) 'interp) + (process-spawn blocking-plane s3-0 f30-0 :name "blocking-plane" :to this) + ) + ) + ) + (go (method-of-object this idle)) + ) + +;; definition for function blocking-plane-spawn +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior blocking-plane-spawn process ((arg0 curve-control) (arg1 (inline-array vector)) (arg2 float)) + (cond + ((and arg1 (or (not arg0) (logtest? (-> arg0 flags) (path-control-flag not-found)))) + (process-spawn blocking-plane arg1 arg2 :name "blocking-plane" :to self) + ) + (else + (let ((s4-1 (the int (get-num-segments arg0))) + (s3-0 0) + (s2-0 (new 'stack-no-clear 'inline-array 'vector 2)) + ) + (dotimes (v1-8 2) + (set! (-> s2-0 v1-8 quad) (the-as uint128 0)) + ) + (while (< s3-0 s4-1) + (get-point-in-path! arg0 (-> s2-0 0) (the float s3-0) 'interp) + (get-point-in-path! arg0 (-> s2-0 1) (the float (+ s3-0 1)) 'interp) + (process-spawn blocking-plane s2-0 arg2 :name "blocking-plane" :to self) + (+! s3-0 2) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function blocking-plane-destroy +;; WARN: Return type mismatch int vs none. +(defbehavior blocking-plane-destroy blocking-plane () + (let ((gp-0 (-> self child))) + (while gp-0 + (let ((s5-0 (ppointer->process gp-0))) + (set! gp-0 (-> gp-0 0 brother)) + (if (type? s5-0 blocking-plane) + (deactivate s5-0) + ) + ) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/common-obs/bouncer_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/bouncer_REF.gc new file mode 100644 index 0000000000..be7b2d0b7c --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/bouncer_REF.gc @@ -0,0 +1,277 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type bouncer +(deftype bouncer (process-drawable) + ((root collide-shape :override) + (spring-height meters) + (smush float) + (mods basic) + (use-alternate-jump? symbol) + ) + (:state-methods + idle + fire + smush + ) + (:methods + (bouncer-method-23 (_type_) none) + (bouncer-method-24 (_type_) none) + (play-sound (_type_) none) + (bouncer-method-26 (_type_) none) + ) + ) + +;; definition for method 3 of type bouncer +(defmethod inspect ((this bouncer)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tspring-height: (meters ~m)~%" (-> this spring-height)) + (format #t "~2Tsmush: ~f~%" (-> this smush)) + (format #t "~2Tmods: ~A~%" (-> this mods)) + (format #t "~2Tuse-alternate-jump?: ~A~%" (-> this use-alternate-jump?)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(method-set! bouncer 12 (method-of-type process run-logic?)) + +;; failed to figure out what this is: +(defstate idle (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)) + (play-sound self) + (go-virtual fire) + ) + ) + ) + (('touch) + (let ((gp-1 (-> block param 0))) + (cond + (((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry gp-1) + (-> self root) + (collide-action solid) + (collide-action) + ) + (when ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry gp-1) + (-> 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-1) + (-> 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-6 0) + ) + (cond + ((= (-> (the-as attack-info v1-29) mode) 'flop) + (set! a2-6 1) + ) + ((= (-> (the-as attack-info v1-29) mode) 'board) + (set! a2-6 9) + ) + ) + (when (and (nonzero? a2-6) + (and ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry a0-16) + (-> self root) + (the-as uint a2-6) + ) + (send-event proc 'jump (-> self spring-height) (-> self spring-height) (-> self mods)) + ) + ) + (play-sound self) + (go-virtual fire) + #f + ) + ) + ) + ) + ) + :code (behavior () + (if (nonzero? (-> self draw)) + (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 smush (bouncer) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch) + (set-time! (-> self state-time)) + #f + ) + (else + ((-> (method-of-object self idle) event) proc argc message block) + ) + ) + ) + :code (behavior () + (set-time! (-> self state-time)) + (set! (-> self smush) 0.0) + (until #f + (if (and (nonzero? (-> self draw)) (time-elapsed? (-> self state-time) (seconds 0.2))) + (ja :num! (seek! 0.0 0.1)) + (ja :num! (seek! + (lerp-scale + (ja-aframe 6.0 0) + (ja-aframe 2.0 0) + (vector-vector-xz-distance (target-pos 0) (-> self root trans)) + 0.0 + 4096.0 + ) + 0.2 + ) + ) + ) + (suspend) + (let ((v1-17 (and (nonzero? (-> self draw)) (ja-min? 0)))) + (if v1-17 + (go-virtual idle) + (go-virtual idle) + ) + ) + ) + #f + ) + :post transform-post + ) + +;; failed to figure out what this is: +(defstate fire (bouncer) + :virtual #t + :code (behavior () + (when (or (-> self use-alternate-jump?) (-> *setting-control* user-current use-alternate-bouncer?)) + (persist-with-delay *setting-control* 'slave-options (seconds 2.5) 'slave-options 'clear 0.0 16) + (persist-with-delay *setting-control* 'slave-options2 (seconds 2.5) 'slave-options 'set 0.0 #x2000000) + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 178 (seconds 0.1)) + (bouncer-method-26 self) + (when (nonzero? (-> self draw)) + (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 25 of type bouncer +;; WARN: Return type mismatch int vs none. +(defmethod play-sound ((this bouncer)) + (sound-play "trampoline") + 0 + (none) + ) + +;; definition for method 26 of type bouncer +;; WARN: Return type mismatch int vs none. +(defmethod bouncer-method-26 ((this bouncer)) + 0 + (none) + ) + +;; definition for method 23 of type bouncer +;; WARN: Return type mismatch int vs none. +(defmethod bouncer-method-23 ((this bouncer)) + (break!) + 0 + (none) + ) + +;; definition for method 24 of type bouncer +;; WARN: Return type mismatch int vs none. +(defmethod bouncer-method-24 ((this 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 0)))) + (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) 0) + (set-vector! (-> v1-2 local-sphere) 0.0 3072.0 0.0 6963.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 11 of type bouncer +(defmethod init-from-entity! ((this bouncer) (arg0 entity-actor)) + (set! (-> this mods) #f) + (bouncer-method-24 this) + (process-drawable-from-entity! this arg0) + (bouncer-method-23 this) + (nav-mesh-connect-from-ent this) + (set! (-> this spring-height) (res-lump-float arg0 'spring-height :default 45056.0)) + (set! (-> this use-alternate-jump?) (= (res-lump-value arg0 'behavior-type uint128 :time -1000000000.0) 1)) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/common-obs/collectables-part_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/collectables-part_REF.gc new file mode 100644 index 0000000000..198fcde8c5 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/collectables-part_REF.gc @@ -0,0 +1,2986 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-rod-of-god + :id 123 + :flags (sp0) + :bounds (static-bspherem 0 300 0 640) + :parts ((sp-item 409 :fade-after (meters 80) :falloff-to (meters 160)) + (sp-item 410 :flags (sp6)) + (sp-item 411 :flags (sp6)) + ) + ) + +;; failed to figure out what this is: +(defpart 409 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 8.0) + (:x (meters 0) (meters 2.7)) + (:y (meters 0) (meters 32)) + (:scale-x (meters 0.25)) + (:scale-y (meters 0.25) (meters 0.1)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.0016666667) (meters 0.0016666667)) + (:fade-a 0.4) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.267)) + (:next-launcher 412) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 412 + :init-specs ((:fade-a -0.4)) + ) + +;; failed to figure out what this is: +(defpart 410 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters -0.25)) + (:scale-x (meters 18)) + (:rot-x (degrees 135)) + (:scale-y (meters 18)) + (:r 128.0) + (:g 128.0) + (:b 0.0 64.0) + (:a 32.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 20480.0) + ) + ) + +;; failed to figure out what this is: +(defpart 411 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters -0.25)) + (:scale-x (meters 9)) + (:rot-x (degrees 135)) + (:scale-y (meters 9)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 20480.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-eco-green-collect + :id 124 + :duration (seconds 0.5) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 415 :flags (sp3) :binding 413) + (sp-item 413 :flags (sp2 sp3) :binding 414) + (sp-item 413 :flags (sp2 sp3) :binding 414) + (sp-item 413 :flags (sp2 sp3) :binding 414) + (sp-item 413 :flags (sp2 sp3) :binding 414) + (sp-item 413 :flags (sp2 sp3) :binding 414) + (sp-item 416 :fade-after (meters 40) :flags (sp2)) + (sp-item 416 :fade-after (meters 40) :flags (sp2)) + (sp-item 416 :fade-after (meters 40) :flags (sp2)) + (sp-item 416 :fade-after (meters 40) :flags (sp2)) + (sp-item 417 :fade-after (meters 40) :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 415 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 92.0) + (:g 128.0 128.0) + (:a 64.0) + (:fade-a -3.2) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'part-tracker-track-root) + (:next-time (seconds 0.05)) + (:next-launcher 418) + ) + ) + +;; failed to figure out what this is: +(defpart 418 + :init-specs ((:scale-x (meters 0.1)) (:scale-y :copy scale-x) (:a 0.0) (:fade-a 0.0)) + ) + +;; failed to figure out what this is: +(defpart 413 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 5.0) + (:y (meters -4) (meters 16)) + (:z (meters 0.08)) + (:scale-x (meters 0.3) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 255.0) + (:a 127.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.017777778) 2.0 (meters 0.035555556)) + (:vel-y (meters 0)) + (:vel-z (meters 0.08)) + (:accel-z (meters -0.0053333333)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 416 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters -0.05)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 96.0) + (:scalevel-x (meters -0.00075757573)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.8333333) + (:accel-y (meters -0.000100000005)) + (:timer (seconds 0.1) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.3)) + (:next-launcher 419) + ) + ) + +;; definition for function eco-fadeout +;; WARN: Return type mismatch int vs none. +(defun eco-fadeout ((arg0 sparticle-system) (arg1 sparticle-cpuinfo)) + (if (not (logtest? (-> arg1 key proc state-flags) (state-flags sf0))) + (set! (-> arg1 next-time) + (the-as uint (* (max 1 (the-as int (-> *display* clock (-> arg1 clock-index) sparticle-data x))) 2)) + ) + ) + 0 + (none) + ) + +;; definition for function eco-track-root-prim-fadeout +;; WARN: Return type mismatch int vs none. +(defun eco-track-root-prim-fadeout ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((v1-1 (-> arg1 key proc))) + (let ((a0-3 (-> (the-as collide-shape (-> v1-1 root)) root-prim prim-core))) + (set! (-> arg2 x) (-> a0-3 world-sphere x)) + (set! (-> arg2 y) (-> a0-3 world-sphere y)) + (set! (-> arg2 z) (-> a0-3 world-sphere z)) + ) + (if (not (logtest? (-> v1-1 state-flags) (state-flags sf0))) + (set! (-> arg1 next-time) + (the-as uint (* (max 1 (the-as int (-> *display* clock (-> arg1 clock-index) sparticle-data x))) 2)) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-eco-green-pill + :id 125 + :bounds (static-bspherem 0 0 0 0.4) + :parts ((sp-item 424 :flags (sp3) :binding 420) + (sp-item 420 :flags (sp2 sp3) :binding 421) + (sp-item 421 :flags (sp2 sp3) :binding 422) + (sp-item 422 :flags (sp2 sp3) :binding 423) + (sp-item 422 :flags (sp2 sp3)) + (sp-item 422 :flags (sp2 sp3)) + (sp-item 422 :flags (sp2 sp3)) + (sp-item 423 :fade-after (meters 40) :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 424 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:a 0.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'eco-track-root-prim-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 425) + ) + ) + +;; failed to figure out what this is: +(defpart 420 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.2) (meters 0.1)) + (:scale-x (meters 0.6) (meters 0.4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 92.0) + (:g 128.0 128.0) + (:a 24.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.026666667) (meters 0.026666667)) + (:vel-y (meters 0.0014814815)) + (:vel-z (meters 0)) + (:rotvel-z (degrees -0.1) 1 (degrees 0.2)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-track-root-prim-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 425) + ) + ) + +;; failed to figure out what this is: +(defpart 425 + :init-specs ((:fade-a -0.16) (:timer (seconds 0.5))) + ) + +;; failed to figure out what this is: +(defpart 421 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 3.0) + (:y (meters 0) (meters 16)) + (:z (meters 0) (meters 0.2)) + (:scale-x (meters 0.6) (meters 0.4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 92.0) + (:g 128.0 128.0) + (:a 24.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.017777778) (meters 0.017777778)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:rotvel-z (degrees -0.4) 1 (degrees 0.8)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-track-root-prim-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 425) + ) + ) + +;; failed to figure out what this is: +(defpart 422 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.08)) + (:scale-x (meters 0.2) (meters 0.05)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 255.0) + (:a 127.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.10666667)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 426) + ) + ) + +;; failed to figure out what this is: +(defpart 426 + :init-specs ((:fade-r 0.0) (:fade-a -0.8466667) (:timer (seconds 0.5))) + ) + +;; failed to figure out what this is: +(defpart 423 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.25) + (:y (meters -0.05)) + (:scale-x (meters 0.15)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 96.0) + (:scalevel-x (meters -0.00039393938)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.8333333) + (:accel-y (meters -0.000100000005)) + (:timer (seconds 0.1) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.3)) + (:next-launcher 427) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-eco-green-pill-collect + :id 126 + :duration (seconds 0.5) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 415 :flags (sp3) :binding 428) + (sp-item 428 :flags (sp2 sp3) :binding 414) + (sp-item 428 :flags (sp2 sp3) :binding 414) + (sp-item 428 :flags (sp2 sp3) :binding 414) + (sp-item 428 :flags (sp2 sp3) :binding 414) + (sp-item 428 :flags (sp2 sp3) :binding 414) + (sp-item 414 :fade-after (meters 40) :flags (sp2)) + (sp-item 414 :fade-after (meters 40) :flags (sp2)) + (sp-item 414 :fade-after (meters 40) :flags (sp2)) + (sp-item 414 :fade-after (meters 40) :flags (sp2)) + (sp-item 414 :fade-after (meters 40) :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 428 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters -4) (meters 16)) + (:z (meters 0.08)) + (:scale-x (meters 0.25) (meters 0.05)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 255.0) + (:a 127.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.017777778) (meters 0.017777778)) + (:vel-y (meters 0)) + (:vel-z (meters 0.04)) + (:accel-z (meters -0.0026666666)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 414 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters -0.05)) + (:scale-x (meters 0.2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 96.0) + (:scalevel-x (meters -0.0004545455)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.8333333) + (:accel-y (meters -0.000100000005)) + (:timer (seconds 0.1) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.3)) + (:next-launcher 419) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-eco-light-pill + :id 127 + :flags (sp0 sp4 sp7) + :bounds (static-bspherem 0 0 0 4) + :scale (1.0 10.0 1.0) + :parts ((sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 431 :flags (sp3) :binding 429) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017)) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 30) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 60) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 90) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 120) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 150) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 180) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 210) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 240) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 270) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017)) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 30) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 60) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 90) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 120) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 150) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 180) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 210) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 240) + (sp-item 429 :flags (sp2) :period (seconds 1) :length (seconds 0.017) :offset 270) + (sp-item 432 :flags (sp3) :binding 430) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 430 :flags (sp2)) + (sp-item 433) + ) + ) + +;; failed to figure out what this is: +(defpart 431 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + ) + ) + +;; failed to figure out what this is: +(defpart 429 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 8.0) + (:x (meters 0) (meters 16)) + (:y (meters 0) (meters 16)) + (:z (meters 0)) + (:scale-x (meters 0.4) (meters 0.2)) + (:scale-y (meters 0.4) (meters 0.2)) + (:r 128.0 128.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.053333335) 1 (meters 0.10666667)) + (:vel-y (meters -0.0014814815) (meters 0.002962963)) + (:vel-z (meters 0.0016666667) (meters 0.00066666666)) + (:rotvel-z (degrees -0.4) 1 (degrees 0.8)) + (:fade-a 0.21333334) + (:accel-z (meters -0.00006666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 ready-to-launch)) + (:next-time (seconds 0.5)) + (:next-launcher 434) + ) + ) + +;; failed to figure out what this is: +(defpart 434 + :init-specs ((:fade-a -0.21333334)) + ) + +;; failed to figure out what this is: +(defpart 432 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.1)) + (:scale-y (meters 0.1)) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + ) + ) + +;; failed to figure out what this is: +(defpart 430 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 16)) + (:y (meters 0) (meters 16)) + (:z (meters 0)) + (:scale-x (meters 0.8) (meters 0.2)) + (:scale-y (meters 0.8) (meters 0.2)) + (:r 0.0) + (:g 0.0 128.0) + (:b 128.0) + (:a 8.0 8.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.017777778) 1 (meters 0.035555556)) + (:vel-y (meters -0.00014814814) (meters 0.0002962963)) + (:vel-z (meters 0.0016666667)) + (:rotvel-z (degrees -0.6) 1 (degrees 1.2)) + (:accel-z (meters -0.00005)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 ready-to-launch)) + ) + ) + +;; failed to figure out what this is: +(defpart 433 + :init-specs ((:texture (laser-hit2-add level-default-sprite)) + (:num 0.4) + (:scale-x (meters 2) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0 1 20.0) + (:g 0.0 64.0) + (:b 100.0) + (:a 0.0) + (:scalevel-x (meters -0.006666667) (meters 0.015)) + (:scalevel-y :copy scalevel-x) + (:fade-a 2.56) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4.096) + (:func 'sparticle-track-root-prim) + (:next-time (seconds 0.167)) + (:next-launcher 435) + ) + ) + +;; failed to figure out what this is: +(defpart 435 + :init-specs ((:fade-a -2.56)) + ) + +;; failed to figure out what this is: +(defpart 1 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 8.0) + (:x (meters 0) (meters 0.1)) + (:scale-x (meters 0.3) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 0.0 64.0) + (:g :copy r) + (:b 255.0) + (:a 64.0 64.0) + (:scalevel-x (meters -0.0013333333) (meters -0.0013333333)) + (:scalevel-y (meters 0.0013333333) (meters 0.0013333333)) + (:fade-a -0.21333334) + (:accel-y (meters 0.00066666666)) + (:friction 0.95 0.04) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-eco-dark-pill + :id 128 + :flags (sp7) + :bounds (static-bspherem 0 0 0 4) + :scale (1.0 10.0 1.0) + :parts ((sp-item 438 :period (seconds 0.085) :length (seconds 0.017) :binding 436) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 436 :flags (sp1 sp2 sp3)) + (sp-item 439 :period (seconds 0.085) :length (seconds 0.017) :binding 437) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 437 :flags (sp1 sp2 sp3)) + (sp-item 440 :flags (sp6)) + ) + ) + +;; failed to figure out what this is: +(defpart 440 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 17)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0) + (:b 255.0) + (:a 16.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + (:func 'sparticle-track-root-prim) + ) + ) + +;; failed to figure out what this is: +(defpart 438 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.1)) + (:scale-y (meters 0.1)) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + ) + ) + +;; failed to figure out what this is: +(defpart 436 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 16)) + (:y (meters 0) (meters 16)) + (:z (meters 0)) + (:scale-x (meters 1.4) (meters 0.2)) + (:scale-y (meters 1.4) (meters 0.2)) + (:r 0.0 255.0) + (:g 0.0) + (:b 255.0) + (:a 6.0 6.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.053333335) 1 (meters 0.10666667)) + (:vel-y (meters -0.00037037037) (meters 0.00074074074)) + (:vel-z (meters 0.0016666667)) + (:rotvel-z (degrees -1.2) 1 (degrees 2.4)) + (:accel-z (meters -0.000041666666)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch)) + ) + ) + +;; failed to figure out what this is: +(defpart 439 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.1)) + (:scale-y (meters 0.1)) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:timer (seconds 1.167)) + (:flags (sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + ) + ) + +;; failed to figure out what this is: +(defpart 437 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 16)) + (:y (meters 0) (meters 16)) + (:z (meters 0)) + (:scale-x (meters 0.4) (meters 0.2)) + (:scale-y (meters 0.4) (meters 0.2)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 24.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.053333335) 1 (meters 0.10666667)) + (:vel-y (meters -0.00037037037) (meters 0.00074074074)) + (:vel-z (meters 0.0016666667)) + (:rotvel-z (degrees -0.6) 1 (degrees 1.2)) + (:accel-z (meters -0.000041666666)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-4 ready-to-launch)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-eco-green + :id 129 + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 444 :flags (sp3) :binding 441) + (sp-item 441 :flags (sp2 sp3) :binding 442) + (sp-item 441 :flags (sp2 sp3) :binding 442) + (sp-item 441 :flags (sp2 sp3) :binding 442) + (sp-item 441 :flags (sp2 sp3) :binding 442) + (sp-item 441 :flags (sp2 sp3) :binding 442) + (sp-item 441 :flags (sp2 sp3) :binding 442) + (sp-item 441 :flags (sp2 sp3) :binding 442) + (sp-item 442 :fade-after (meters 90) :flags (sp2 sp3) :binding 443) + (sp-item 442 :fade-after (meters 90) :flags (sp2 sp3) :binding 443) + (sp-item 442 :fade-after (meters 90) :flags (sp2 sp3) :binding 443) + (sp-item 442 :fade-after (meters 90) :flags (sp2 sp3) :binding 443) + (sp-item 442 :fade-after (meters 90) :flags (sp2 sp3) :binding 443) + (sp-item 443 :fade-after (meters 40) :falloff-to (meters 60) :flags (sp2)) + (sp-item 443 :fade-after (meters 40) :falloff-to (meters 60) :flags (sp2)) + (sp-item 443 :fade-after (meters 40) :falloff-to (meters 60) :flags (sp2)) + (sp-item 443 :fade-after (meters 40) :falloff-to (meters 60) :flags (sp2)) + (sp-item 443 :fade-after (meters 40) :falloff-to (meters 60) :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 444 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:x (meters 4)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:a 1.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + ) + ) + +;; failed to figure out what this is: +(defpart 441 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 6.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.3) (meters 0.25)) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 92.0) + (:g 128.0 128.0) + (:a 24.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.0148148155) (meters 0.0044444446)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:rotvel-z (degrees -0.1) 1 (degrees 0.2)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 445) + ) + ) + +;; failed to figure out what this is: +(defpart 445 + :init-specs ((:fade-a -0.16) (:timer (seconds 0.5))) + ) + +;; failed to figure out what this is: +(defpart 442 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.3)) + (:scale-x (meters 0.3) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 255.0) + (:a 64.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.053333335) (meters 0.0148148155)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 446) + ) + ) + +;; failed to figure out what this is: +(defpart 446 + :init-specs ((:fade-a -0.42666668) (:timer (seconds 0.5))) + ) + +;; failed to figure out what this is: +(defpart 443 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.25) + (:y (meters -0.05)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 48.0) + (:scalevel-x (meters -0.00075757573)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.8333333) + (:accel-y (meters -0.00015)) + (:timer (seconds 0.1) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.3)) + (:next-launcher 427) + ) + ) + +;; failed to figure out what this is: +(defpart 427 + :init-specs ((:fade-r 0.0)) + ) + +;; failed to figure out what this is: +(defpartgroup group-eco-dark-pill-move-collect + :id 130 + :duration (seconds 0.5) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 449 :flags (sp3) :binding 447) + (sp-item 447 :flags (sp2 sp3) :binding 448) + (sp-item 447 :flags (sp2 sp3) :binding 448) + (sp-item 447 :flags (sp2 sp3) :binding 448) + (sp-item 447 :flags (sp2 sp3) :binding 448) + (sp-item 447 :flags (sp2 sp3) :binding 448) + (sp-item 448 :fade-after (meters 40) :flags (sp2)) + (sp-item 448 :fade-after (meters 40) :flags (sp2)) + (sp-item 448 :fade-after (meters 40) :flags (sp2)) + (sp-item 448 :fade-after (meters 40) :flags (sp2)) + (sp-item 448 :fade-after (meters 40) :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 449 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 92.0) + (:b 128.0 128.0) + (:a 64.0) + (:fade-a -3.2) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'part-tracker-track-root) + (:next-time (seconds 0.05)) + (:next-launcher 450) + ) + ) + +;; failed to figure out what this is: +(defpart 450 + :init-specs ((:scale-x (meters 0.1)) (:scale-y :copy scale-x) (:a 0.0) (:fade-a 0.0)) + ) + +;; failed to figure out what this is: +(defpart 451 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 5.0) + (:y (meters -4) (meters 16)) + (:z (meters 0.08)) + (:scale-x (meters 0.3) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 128.0) + (:b 255.0) + (:a 127.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.017777778) 2.0 (meters 0.035555556)) + (:vel-y (meters 0)) + (:vel-z (meters 0.08)) + (:accel-z (meters -0.0053333333)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 447 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters -4) (meters 16)) + (:z (meters 0.08)) + (:scale-x (meters 0.25) (meters 0.05)) + (:scale-y :copy scale-x) + (:r 128.0) + (:b 255.0) + (:a 127.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.017777778) (meters 0.017777778)) + (:vel-y (meters 0)) + (:vel-z (meters 0.04)) + (:accel-z (meters -0.0026666666)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 452 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters -0.05)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:b 255.0) + (:a 96.0) + (:scalevel-x (meters -0.00075757573)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.8333333) + (:accel-y (meters -0.000100000005)) + (:timer (seconds 0.1) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.3)) + (:next-launcher 453) + ) + ) + +;; failed to figure out what this is: +(defpart 448 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters -0.05)) + (:scale-x (meters 0.2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:b 255.0) + (:a 96.0) + (:scalevel-x (meters -0.0004545455)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.8333333) + (:accel-y (meters -0.000100000005)) + (:timer (seconds 0.1) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.3)) + (:next-launcher 453) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-generic-collect + :id 131 + :duration (seconds 0.017) + :linger-duration (seconds 4) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 454)) + ) + +;; failed to figure out what this is: +(defpart 455 + :init-specs ((:fade-a -0.15238096)) + ) + +;; failed to figure out what this is: +(defpart 454 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 16.0) + (:scale-x (meters 6) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5) (meters 1)) + (:r 64.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y (meters 0.009765625)) + (:fade-a 2.1333334) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.017) (seconds 0.065)) + (:next-launcher 455) + ) + ) + +;; failed to figure out what this is: +(defpart 456 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 6.0) + (:scale-x (meters 8) (meters 2)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5)) + (:r 64.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:fade-a 2.1333334) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.017) (seconds 0.065)) + (:next-launcher 455) + ) + ) + +;; failed to figure out what this is: +(defpart 457 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:scalevel-x (meters 0.1)) + (:rotvel-z (degrees -0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.2)) + (:next-launcher 458) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-skill-glow-red + :id 132 + :flags (sp1) + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 459 :fade-after (meters 150) :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 459 + :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-skill-glow-yellow + :id 133 + :flags (sp1) + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 460 :fade-after (meters 150) :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 460 + :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 192.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-gem-glow + :id 134 + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 461 :flags (sp6 sp7)) (sp-item 462 :flags (sp6 sp7)) (sp-item 463 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 461 + :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 192.0) + (:b 64.0) + (:a 16.0) + (: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: +(defpart 462 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:z (meters 0.3)) + (:scale-x (meters 1.75)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 192.0) + (:b 64.0) + (:a 12.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 463 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:z (meters -0.3)) + (:scale-x (meters 1.75)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 192.0) + (:b 64.0) + (:a 12.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 464 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.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 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-gem-collect + :id 135 + :duration (seconds 0.1) + :linger-duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 465 :period (seconds 0.5) :length (seconds 0.017)) + (sp-item 466 :period (seconds 0.5) :length (seconds 0.067)) + ) + ) + +;; failed to figure out what this is: +(defpart 466 + :init-specs ((:texture (suckpart level-default-sprite)) + (:num 3.0 1.0) + (:scale-x (meters 16) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.005) (meters 0.005)) + (:r 255.0) + (:g 128.0 128.0) + (:b 0.0) + (:a 16.0) + (:scalevel-x (meters -0.4)) + (:scalevel-y (meters 0.00125)) + (:fade-a 0.2 0.4) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + (:func 'sparticle-track-root) + ) + ) + +;; failed to figure out what this is: +(defpart 465 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 16)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0 128.0) + (:b 0.0) + (:a 0.0) + (:scalevel-x (meters -0.23333333)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.33333334) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + (:func 'sparticle-track-root) + (:next-time (seconds 0.2)) + (:next-launcher 467) + ) + ) + +;; failed to figure out what this is: +(defpart 467 + :init-specs ((:a 16.0) (:fade-a -0.8)) + ) + +;; failed to figure out what this is: +(defpart 468 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 192.0) + (:b 64.0) + (:a 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1638.4) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-ammo-yellow-collect + :id 136 + :duration (seconds 0.017) + :linger-duration (seconds 4) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 249)) + ) + +;; failed to figure out what this is: +(defpartgroup group-ammo-red-collect + :id 137 + :duration (seconds 0.017) + :linger-duration (seconds 4) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 249)) + ) + +;; failed to figure out what this is: +(defpartgroup group-ammo-blue-collect + :id 138 + :duration (seconds 0.017) + :linger-duration (seconds 4) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 249)) + ) + +;; failed to figure out what this is: +(defpartgroup group-ammo-dark-collect + :id 139 + :duration (seconds 0.017) + :linger-duration (seconds 4) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 249)) + ) + +;; failed to figure out what this is: +(defpartgroup group-eco-dark-pill-collect + :id 140 + :duration (seconds 0.1) + :linger-duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 469 :period (seconds 0.5) :length (seconds 0.017)) + (sp-item 470 :period (seconds 0.5) :length (seconds 0.067)) + ) + ) + +;; failed to figure out what this is: +(defpart 470 + :init-specs ((:texture (suckpart level-default-sprite)) + (:num 3.0 1.0) + (:scale-x (meters 24) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.005) (meters 0.005)) + (:r 128.0 128.0) + (:g 0.0) + (:b 255.0) + (:a 16.0) + (:scalevel-x (meters -0.6)) + (:scalevel-y (meters 0.00125)) + (:fade-a 0.2 0.4) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + (:func 'sparticle-track-root) + ) + ) + +;; failed to figure out what this is: +(defpart 469 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.33333334) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + (:func 'sparticle-track-root) + (:next-time (seconds 0.2)) + (:next-launcher 471) + ) + ) + +;; failed to figure out what this is: +(defpart 471 + :init-specs ((:a 16.0) (:fade-a -0.8)) + ) + +;; failed to figure out what this is: +(defpartgroup group-green-collect + :id 141 + :duration (seconds 1) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 474 :period (seconds 1.5) :length (seconds 0.017) :offset 100) + (sp-item 475 :period (seconds 1.5) :length (seconds 0.067) :offset 125) + (sp-item 476 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 1.5) :length (seconds 0.067) :binding 472) + (sp-item 472 :fade-after (meters 80) :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 472 :flags (sp2 sp3) :binding 473) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + (sp-item 473 :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 476 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 6.0) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 472 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters 0) (meters 16)) + (:z (meters 8)) + (:scale-x (meters 0.2) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 255.0) + (:b 0.0) + (:a 28.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.008888889) (meters 0.017777778)) + (:vel-z (meters -0.053333335)) + (:fade-r -0.8) + (:fade-a 0.8) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:next-time (seconds 1.5) (seconds 0.497)) + (:next-launcher 477) + ) + ) + +;; failed to figure out what this is: +(defpart 477 + :init-specs ((:fade-r 0.0) (:fade-a -0.8466667 -0.8466667) (:timer (seconds 0.5))) + ) + +;; failed to figure out what this is: +(defpart 473 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.2) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 96.0) + (:scalevel-x (meters -0.0006060606)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.8333333) + (:accel-y (meters -0.000033333334) (meters -0.00006666667)) + (:timer (seconds 0.1) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.3)) + (:next-launcher 427) + ) + ) + +;; failed to figure out what this is: +(defpart 475 + :init-specs ((:texture (suckpart level-default-sprite)) + (:num 3.0 1.0) + (:scale-x (meters 24) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.005) (meters 0.005)) + (:r 0.0) + (:g 128.0 128.0) + (:b 0.0) + (:a 16.0) + (:scalevel-x (meters -0.6)) + (:scalevel-y (meters 0.00125)) + (:fade-a 0.2 0.4) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + (:func 'sparticle-track-root) + ) + ) + +;; failed to figure out what this is: +(defpart 474 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0 128.0) + (:b 0.0) + (:a 0.0) + (:scalevel-x (meters -0.21176471)) + (:scalevel-y :copy scalevel-x) + (:fade-r 1.5058824) + (:fade-a 0.28235295) + (:timer (seconds 0.35)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + (:func 'sparticle-track-root) + (:next-time (seconds 0.285)) + (:next-launcher 478) + ) + ) + +;; failed to figure out what this is: +(defpart 478 + :init-specs ((:a 16.0) (:fade-r -12.8) (:fade-a -1.0)) + ) + +;; failed to figure out what this is: +(defpartgroup group-skate-point + :id 142 + :linger-duration (seconds 1) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 479 :fade-after (meters 90) :falloff-to (meters 90) :flags (is-3d)) + (sp-item 480 :flags (is-3d)) + (sp-item 481 :flags (sp6)) + (sp-item 482 :flags (is-3d sp6)) + (sp-item 483 :fade-after (meters 120) :falloff-to (meters 120)) + ) + ) + +;; failed to figure out what this is: +(defpart 483 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 0.1) (meters 0.15)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0 32.0) + (:b 0.0 16.0) + (:a 96.0 32.0) + (:omega (degrees 0.19125001)) + (:vel-y (meters 0.053333335) (meters 0.026666667)) + (:scalevel-x (meters -0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.7066667) + (:friction 0.97) + (:timer (seconds 0.25)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 479 + :init-specs ((:texture (new 'static 'texture-id :page #x17e)) + (:num 0.05) + (:scale-x (meters 0.5)) + (:rot-x (degrees 0) (degrees 3600)) + (:rot-y (degrees 0) (degrees 3600)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0 64.0) + (:b 16.0) + (:a 64.0) + (:scalevel-x (meters 0.0055555557)) + (:rotvel-x (degrees 0.8)) + (:rotvel-y (degrees 0.8)) + (:rotvel-z (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 482 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-camera-orient) + (:num 1.0) + (:scale-x (meters 1.5) (meters 2.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.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: +(defpart 480 + :init-specs ((:texture (new 'static 'texture-id :page #x17e)) + (:birth-func 'birth-func-camera-orient) + (:num 1.0) + (:scale-x (meters 2.9) (meters 0.3)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 96.0) + (:b 16.0) + (:a 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 481 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8) (meters 0.2)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 96.0) + (:b 16.0) + (:a 32.0 8.0) + (:omega (degrees 22509)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-skate-point-explode + :id 143 + :duration (seconds 0.017) + :linger-duration (seconds 1) + :bounds (static-bspherem 0 0 0 32) + :parts ((sp-item 484 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 484 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 16)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 96.0) + (:b 16.0) + (:a 128.0) + (:omega (degrees 22509)) + (:scalevel-x (meters -0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.6) + (:fade-a -3.2) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 0.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-vent-light-active + :id 144 + :bounds (static-bspherem 0 5 0 5) + :parts ((sp-item 485 :flags (is-3d)) + (sp-item 486 :flags (is-3d)) + (sp-item 487 :flags (is-3d)) + (sp-item 488 :flags (is-3d)) + (sp-item 489) + (sp-item 490) + ) + ) + +;; failed to figure out what this is: +(defpart 485 + :init-specs ((:texture (light-burst level-default-sprite)) + (:num 0.1 0.1) + (:y (meters -11)) + (:scale-x (meters 40)) + (:rot-z (degrees 90)) + (:scale-y (meters 2.5)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 0.0) + (:fade-a 0.64 0.64) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-3d-rotate-xz-to-camera) + (:next-time (seconds 0.167)) + (:next-launcher 491) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 491 + :init-specs ((:fade-a -0.64 -0.64)) + ) + +;; failed to figure out what this is: +(defpart 486 + :init-specs ((:texture (light-burst level-default-sprite)) + (:num 0.1 0.1) + (:y (meters -11)) + (:scale-x (meters 40)) + (:rot-z (degrees 90)) + (:scale-y (meters 2.2)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 0.0) + (:fade-a 0.32 0.64) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-3d-rotate-xz-to-camera) + (:next-time (seconds 0.167)) + (:next-launcher 491) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 487 + :init-specs ((:texture (light-burst level-default-sprite)) + (:num 0.1 0.1) + (:y (meters -11)) + (:scale-x (meters 40)) + (:rot-z (degrees 90)) + (:scale-y (meters 2)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 0.32 0.64) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-3d-rotate-xz-to-camera) + (:next-time (seconds 0.167)) + (:next-launcher 491) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 488 + :init-specs ((:texture (static1 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1) + (:x (meters -0.5) (meters 1)) + (:y (meters -2)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 10)) + (:rot-z (degrees 90)) + (:scale-y (meters 0.25) (meters 0.5)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters 0.01) (meters 0.006666667)) + (:fade-a 0.10666667 0.10666667) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40b000 #x40b100)) + (:func 'sparticle-3d-rotate-xz-to-camera) + (:next-time (seconds 1)) + (:next-launcher 492) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 492 + :init-specs ((:fade-a -0.21333334 -0.21333334)) + ) + +;; failed to figure out what this is: +(defpart 489 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 0.5 0.5) + (:x (meters -0.5) (meters 1)) + (:y (meters 0) (meters 5)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 0.05) (meters 0.05)) + (:scale-y :copy scale-x) + (:r 0.0 1 128.0) + (:g 0.0 1 128.0) + (:b 0.0 1 128.0) + (:a 0.0) + (:vel-y (meters 0.00083333335) (meters 0.0016666667)) + (:fade-a 0.85333335) + (:timer (seconds 1) (seconds 1.665)) + (:flags (sp-cpuinfo-flag-3)) + (:next-time (seconds 0.5)) + (:next-launcher 493) + (:conerot-x (degrees -50.000004) (degrees 100.00001)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 493 + :init-specs ((:fade-a -0.85333335)) + ) + +;; failed to figure out what this is: +(defpart 490 + :init-specs ((:texture (laser-hit2-add level-default-sprite)) + (:num 0.5) + (:y (meters 0.2)) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) 1 (degrees 180)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 0.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y (meters 0.006666667) (meters 0.016666668)) + (:fade-a 0.10666667 0.10666667) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:next-time (seconds 1)) + (:next-launcher 494) + ) + ) + +;; failed to figure out what this is: +(defpart 494 + :init-specs ((:fade-a -0.21333334)) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-vent-light-touched + :id 145 + :bounds (static-bspherem 0 5 0 5) + :parts ((sp-item 495 :flags (is-3d)) + (sp-item 496 :flags (is-3d)) + (sp-item 497 :flags (is-3d)) + (sp-item 498 :flags (is-3d)) + (sp-item 499 :flags (is-3d)) + (sp-item 500) + (sp-item 501) + ) + ) + +;; failed to figure out what this is: +(defpart 495 + :init-specs ((:texture (light-burst level-default-sprite)) + (:num 0.1 0.1) + (:y (meters -15)) + (:scale-x (meters 60)) + (:rot-z (degrees 90)) + (:scale-y (meters 2.5)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 0.64 0.64) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-3d-rotate-xz-to-camera) + (:next-time (seconds 0.167)) + (:next-launcher 502) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 502 + :init-specs ((:fade-a -0.64 -0.64)) + ) + +;; failed to figure out what this is: +(defpart 496 + :init-specs ((:texture (light-burst level-default-sprite)) + (:num 0.1 0.1) + (:y (meters -15)) + (:scale-x (meters 60)) + (:rot-z (degrees 90)) + (:scale-y (meters 2.2)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 0.32 0.64) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-3d-rotate-xz-to-camera) + (:next-time (seconds 0.167)) + (:next-launcher 491) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 497 + :init-specs ((:texture (light-burst level-default-sprite)) + (:num 0.1 0.1) + (:y (meters -15)) + (:scale-x (meters 60)) + (:rot-z (degrees 90)) + (:scale-y (meters 2)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:fade-a 0.32 0.64) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-3d-rotate-xz-to-camera) + (:next-time (seconds 0.167)) + (:next-launcher 502) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 498 + :init-specs ((:texture (light-burst level-default-sprite)) + (:num 0.1 0.1) + (:y (meters -15)) + (:scale-x (meters 60)) + (:rot-z (degrees 90)) + (:scale-y (meters 2)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:scalevel-y (meters 0.016666668)) + (:fade-a 0.32 0.64) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-3d-rotate-xz-to-camera) + (:next-time (seconds 0.167)) + (:next-launcher 502) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 499 + :init-specs ((:texture (static1 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.15 0.15) + (:x (meters -0.5) (meters 1)) + (:y (meters -1)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 1)) + (:rot-z (degrees 90)) + (:scale-y (meters 0.1) (meters 0.3)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters 0.06666667)) + (:fade-a 0.10666667 0.10666667) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40b000 #x40b100)) + (:func 'sparticle-3d-rotate-xz-to-camera) + (:next-time (seconds 1)) + (:next-launcher 503) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 503 + :init-specs ((:fade-a -0.21333334 -0.21333334)) + ) + +;; failed to figure out what this is: +(defpart 500 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 2.0 2.0) + (:x (meters -0.5) (meters 1)) + (:y (meters 0) (meters 10)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 0.0 1 128.0) + (:g 0.0 1 128.0) + (:b 0.0 1 128.0) + (:a 0.0) + (:vel-y (meters -0.006666667) (meters 0.0033333334)) + (:fade-a 2.56) + (:friction 1.1) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3)) + (:next-time (seconds 0.167)) + (:next-launcher 504) + (:conerot-x (degrees -170) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 504 + :init-specs ((:fade-a -2.56)) + ) + +;; failed to figure out what this is: +(defpart 501 + :init-specs ((:texture (laser-hit2-add level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:y (meters 0.2)) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) 1 (degrees 180)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 0.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.016666668) (meters 0.013333334)) + (:scalevel-y (meters 0.06666667) (meters 0.033333335)) + (:fade-a 0.16 0.16) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x408600 #x400700)) + (:next-time (seconds 0.335)) + (:next-launcher 505) + ) + ) + +;; failed to figure out what this is: +(defpart 505 + :init-specs ((:fade-a -0.32)) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-vent-dark-active + :id 146 + :flags (sp0 sp4) + :bounds (static-bspherem 0 5 0 10) + :parts ((sp-item 506 :flags (is-3d sp3)) + (sp-item 507 :flags (is-3d sp3)) + (sp-item 508 :flags (is-3d sp3)) + (sp-item 509) + (sp-item 510) + ) + ) + +;; definition for function sparticle-3d-rotate-xz-to-camera-eco-shaft +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun sparticle-3d-rotate-xz-to-camera-eco-shaft ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-3d)) + (local-vars (v1-4 float) (v1-5 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (new 'stack-no-clear 'vector) + (-> arg1 key proc) + (let ((a0-1 (math-camera-matrix)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> a0-1 rvec quad)) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + (let ((a1-3 (matrix-fr-compose (new 'stack-no-clear 'matrix) *up-vector* s5-0)) + (s5-1 (new 'stack-no-clear 'quaternion)) + ) + (matrix->quaternion s5-1 a1-3) + (quaternion-rotate-local-z! s5-1 s5-1 -16384.0) + (quaternion-rotate-y! s5-1 s5-1 -16384.0) + (cond + ((< (-> s5-1 w) 0.0) + (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) + (.mov v1-4 vf1) + ) + (else + (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) + (.mov v1-5 vf1) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for function spt-func-part-vent-eco-dark-shaft +(defun spt-func-part-vent-eco-dark-shaft ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-3d-rotate-xz-to-camera-eco-shaft arg0 arg1 (the-as sprite-vec-data-3d arg2)) + (sparticle-texture-animate arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpart 506 + :init-specs ((:texture (lasersmoke-00 level-default-sprite)) + (:num 1.0) + (:y (meters 4)) + (:scale-x (meters 2.2)) + (:scale-y (meters 10)) + (:r 20.0) + (:g 0.0) + (:b 128.0) + (:a 64.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 20 + 1 + 0 + #x401b00 + #x401c00 + #x401d00 + #x401e00 + #x401f00 + #x402000 + #x402100 + #x402200 + #x402300 + #x402400 + #x402500 + #x402600 + #x402700 + #x402800 + #x402900 + #x402a00 + #x402b00 + #x402c00 + #x402d00 + #x402e00 + #x402f00 + #x403000 + #x403100 + #x403200 + #x403300 + #x403400 + #x403500 + #x403600 + #x403700 + #x403800 + ) + ) + (:func 'spt-func-part-vent-eco-dark-shaft) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 507 + :init-specs ((:texture (lasersmoke-00 level-default-sprite)) + (:num 1.0) + (:y (meters 4)) + (:scale-x (meters 2)) + (:scale-y (meters 12)) + (:r 60.0) + (:g 0.0) + (:b 128.0) + (:a 64.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 25 + 1 + 0 + #x403800 + #x403700 + #x403600 + #x403500 + #x403400 + #x403300 + #x403200 + #x403100 + #x403000 + #x402f00 + #x402e00 + #x402d00 + #x402c00 + #x402b00 + #x402a00 + #x402900 + #x402800 + #x402700 + #x402600 + #x402500 + #x402400 + #x402300 + #x402200 + #x402100 + #x402000 + #x401f00 + #x401e00 + #x401d00 + #x401c00 + #x401b00 + ) + ) + (:func 'spt-func-part-vent-eco-dark-shaft) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 508 + :init-specs ((:texture (lasersmoke-00 level-default-sprite)) + (:num 1.0) + (:y (meters 4)) + (:scale-x (meters 1.8)) + (:scale-y (meters 14)) + (:r 100.0) + (:g 0.0) + (:b 128.0) + (:a 64.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 30 + 1 + 0 + #x401b00 + #x401c00 + #x401d00 + #x401e00 + #x401f00 + #x402000 + #x402100 + #x402200 + #x402300 + #x402400 + #x402500 + #x402600 + #x402700 + #x402800 + #x402900 + #x402a00 + #x402b00 + #x402c00 + #x402d00 + #x402e00 + #x402f00 + #x403000 + #x403100 + #x403200 + #x403300 + #x403400 + #x403500 + #x403600 + #x403700 + #x403800 + ) + ) + (:func 'spt-func-part-vent-eco-dark-shaft) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 511 + :init-specs ((:texture (static1 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1) + (:x (meters -0.5) (meters 1)) + (:y (meters -2)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 20)) + (:rot-z (degrees 90)) + (:scale-y (meters 0.25) (meters 0.5)) + (:r 40.0 40.0) + (:g 0.0) + (:b 128.0 128.0) + (:a 0.0) + (:scalevel-x (meters -0.01) (meters -0.006666667)) + (:fade-a 0.10666667 0.10666667) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40b000 #x40b100)) + (:func 'sparticle-3d-rotate-xz-to-camera) + (:next-time (seconds 1)) + (:next-launcher 512) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 512 + :init-specs ((:fade-a -0.21333334 -0.21333334)) + ) + +;; failed to figure out what this is: +(defpart 509 + :init-specs ((:texture (flame01 level-default-sprite)) + (:num 1.0 1.0) + (:x (meters -0.2) (meters 0.4)) + (:y (meters 0) (meters 15)) + (:z (meters -0.2) (meters 0.4)) + (:scale-x (meters 0.3) (meters 1)) + (:rot-z (degrees -10) (degrees 20)) + (:scale-y (meters 1) (meters 1)) + (:r 255.0) + (:g 0.0 128.0) + (:b :copy g) + (:a 0.0) + (:scalevel-x (meters 0.00033333333)) + (:scalevel-y (meters 0.0033333334)) + (:fade-g 0.053333335 0.053333335 :store) + (:fade-b '*sp-temp*) + (:fade-a 0.053333335 0.053333335) + (: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 510 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0 1.0) + (:y (meters 3)) + (:scale-x (meters 1) (meters 1)) + (: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.026666667)) + (: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.00033333333) (meters 0.00066666666)) + (:accel-z (meters -0.00033333333) (meters 0.00066666666)) + (: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 513) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 513 + :init-specs ((:fade-a -0.42666668 -0.42666668)) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-vent-dark-touched + :id 147 + :flags (sp0 sp4) + :bounds (static-bspherem 0 5 0 5) + :parts ((sp-item 514 :flags (is-3d) :period (seconds 2) :length (seconds 0.017)) + (sp-item 515 :flags (is-3d) :period (seconds 2) :length (seconds 0.017)) + (sp-item 516 :flags (is-3d) :period (seconds 2) :length (seconds 0.017)) + (sp-item 517 :flags (is-3d)) + (sp-item 518) + (sp-item 519) + (sp-item 520) + ) + ) + +;; failed to figure out what this is: +(defpart 514 + :init-specs ((:texture (lasersmoke-00 level-default-sprite)) + (:num 1.0) + (:y (meters 4)) + (:scale-x (meters 2)) + (:scale-y (meters 10)) + (:r 20.0) + (:g 0.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x401b00 + #x401c00 + #x401d00 + #x401e00 + #x401f00 + #x402000 + #x402100 + #x402200 + #x402300 + #x402400 + #x402500 + #x402600 + #x402700 + #x402800 + #x402900 + #x402a00 + #x402b00 + #x402c00 + #x402d00 + #x402e00 + #x402f00 + #x403000 + #x403100 + #x403200 + #x403300 + #x403400 + #x403500 + #x403600 + #x403700 + #x403800 + ) + ) + (:func 'spt-func-part-vent-eco-dark-shaft) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 515 + :init-specs ((:texture (lasersmoke-00 level-default-sprite)) + (:num 1.0) + (:y (meters 4)) + (:scale-x (meters 1.5)) + (:scale-y (meters 12)) + (:r 60.0) + (:g 0.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 15 + 1 + 0 + #x403800 + #x403700 + #x403600 + #x403500 + #x403400 + #x403300 + #x403200 + #x403100 + #x403000 + #x402f00 + #x402e00 + #x402d00 + #x402c00 + #x402b00 + #x402a00 + #x402900 + #x402800 + #x402700 + #x402600 + #x402500 + #x402400 + #x402300 + #x402200 + #x402100 + #x402000 + #x401f00 + #x401e00 + #x401d00 + #x401c00 + #x401b00 + ) + ) + (:func 'spt-func-part-vent-eco-dark-shaft) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 516 + :init-specs ((:texture (lasersmoke-00 level-default-sprite)) + (:num 1.0) + (:y (meters 4)) + (:scale-x (meters 1)) + (:scale-y (meters 14)) + (:r 100.0) + (:g 0.0) + (:b 128.0) + (:a 128.0) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 20 + 1 + 0 + #x401b00 + #x401c00 + #x401d00 + #x401e00 + #x401f00 + #x402000 + #x402100 + #x402200 + #x402300 + #x402400 + #x402500 + #x402600 + #x402700 + #x402800 + #x402900 + #x402a00 + #x402b00 + #x402c00 + #x402d00 + #x402e00 + #x402f00 + #x403000 + #x403100 + #x403200 + #x403300 + #x403400 + #x403500 + #x403600 + #x403700 + #x403800 + ) + ) + (:func 'spt-func-part-vent-eco-dark-shaft) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 517 + :init-specs ((:texture (light-burst level-default-sprite)) + (:num 0.1 0.1) + (:y (meters -15)) + (:scale-x (meters 60)) + (:rot-z (degrees 90)) + (:scale-y (meters 8)) + (:r 128.0) + (:g 0.0) + (:b 255.0) + (:a 0.0) + (:scalevel-y (meters -0.053333335)) + (:fade-a 0.64 0.64) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-3d-rotate-xz-to-camera) + (:next-time (seconds 0.167)) + (:next-launcher 521) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 522 + :init-specs ((:fade-a 0.0)) + ) + +;; failed to figure out what this is: +(defpart 518 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 2.0 2.0) + (:x (meters 8)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 128.0) + (:a 0.0) + (:omega (degrees 0.1125)) + (:fade-a 0.42666668) + (:accel-x (meters -0.0016666667)) + (:friction 0.98 0.01) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'spt-func-part-vent-eco-dark-touched-specs) + (:rotate-x (degrees 0) (degrees 36000)) + (:rotate-y (degrees 0) (degrees 36000)) + (:rotate-z (degrees 0) (degrees 36000)) + ) + ) + +;; definition for function spt-func-part-vent-eco-dark-touched-specs +(defun spt-func-part-vent-eco-dark-touched-specs ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (check-drop-group-center arg0 arg1 (the-as sparticle-launchinfo arg2)) + (sparticle-motion-blur arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpart 519 + :init-specs ((:texture (flame01 level-default-sprite)) + (:num 3.0 3.0) + (:x (meters -0.2) (meters 0.4)) + (:y (meters 0) (meters 15)) + (:z (meters -0.2) (meters 0.4)) + (:scale-x (meters 0.3) (meters 1)) + (:rot-z (degrees -10) (degrees 20)) + (:scale-y (meters 1) (meters 1)) + (:r 255.0) + (:g 0.0 128.0) + (:b :copy g) + (:a 0.0) + (:scalevel-x (meters 0.00033333333)) + (:scalevel-y (meters 0.0033333334)) + (:fade-g 0.053333335 0.053333335 :store) + (:fade-b '*sp-temp*) + (:fade-a 0.10666667 0.10666667) + (:accel-y (meters -0.00066666666) (meters -0.00033333333)) + (: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 520 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0 1.0) + (:y (meters 3)) + (:scale-x (meters 1) (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.026666667)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.42666668 -0.42666668) + (:fade-g -0.85 -0.85) + (:fade-a 0.21333334 0.21333334) + (:accel-x (meters -0.001) (meters 0.00066666666)) + (:accel-y (meters -0.00016666666)) + (:accel-z (meters -0.001) (meters 0.00066666666)) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 1)) + (:next-launcher 523) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 523 + :init-specs ((:fade-a -0.42666668 -0.42666668)) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-vent-green-active + :id 148 + :flags (sp0 sp4) + :bounds (static-bspherem 0 5 0 10) + :parts ((sp-item 526 :fade-after (meters 100) :period (seconds 0.167) :length (seconds 0.017) :binding 524) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 524 :fade-after (meters 100) :flags (sp2 sp3) :binding 525) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 525 :fade-after (meters 100) :flags (sp2)) + (sp-item 527 :fade-after (meters 100) :flags (is-3d sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 527 + :init-specs ((:texture (laser-hit-rim level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0) + (:y (meters 1) (meters 0.2)) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0) (degrees 360)) + (:rot-z (degrees -10) (degrees 20)) + (:scale-y :copy scale-x) + (:r 0.0 64.0) + (:g 92.0 32.0) + (:b 0.0) + (:a 255.0) + (:vel-y (meters 0.008333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-y (degrees 0.53333336)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.56666666 -0.56666666) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 528 + :init-specs ((:vel-y (meters -0.0033333334)) + (:scalevel-x (meters 0.016666668) (meters 0.006666667)) + (:rotvel-y (degrees 0.13333334)) + (:scalevel-y :copy scalevel-x) + (:next-time (seconds 0.085)) + (:next-launcher 529) + ) + ) + +;; failed to figure out what this is: +(defpart 529 + :init-specs ((:vel-y (meters -0.0016666667)) + (:scalevel-x (meters 0.013333334) (meters 0.0033333334)) + (:rotvel-y (degrees 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.256 -0.256) + (:accel-y (meters 0.0019333332)) + (:next-time (seconds 0.085)) + (:next-launcher 530) + ) + ) + +;; failed to figure out what this is: +(defpart 530 + :init-specs ((:vel-y (meters 0)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:rotvel-y (degrees 0.53333336)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters 0.0016666667)) + (:friction 0.9) + ) + ) + +;; failed to figure out what this is: +(defpart 531 + :init-specs ((:texture (wave-foam foresta-sprite)) + (:num 0.3) + (:y (meters 1)) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y (meters 0.2) (meters 0.2)) + (:r 8.0) + (:g 64.0) + (:b 0.0) + (:a 0.0) + (:vel-y (meters 0.016666668)) + (:fade-a 0.85333335) + (:accel-y (meters 0.00033333333)) + (:friction 0.98) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'spt-func-turn-to-vel-radial) + (:next-time (seconds 0.5)) + (:next-launcher 532) + (:conerot-x (degrees -90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 532 + :init-specs ((:scalevel-y (meters 0.006666667)) + (:fade-a -0.17066666 -0.17066666) + (:accel-y (meters 0.00026666667) (meters 0.00006666667)) + (:friction 0.95) + ) + ) + +;; failed to figure out what this is: +(defpart 526 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters 1.5) (meters 0.5)) + (: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 524 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:z (meters 1)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 32.0 64.0) + (:g 255.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)) + (:scalevel-x (meters -0.00033333333)) + (:scalevel-y :copy scalevel-x) + (: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 533 + :init-specs ((:fade-a -0.21333334)) + ) + +;; failed to figure out what this is: +(defpart 525 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-inherit-size) + (:num 1.0) + (:scale-x (meters 0.00024414062)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 64.0) + (:g 128.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-placeholder-small + :id 149 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 249)) + ) + +;; failed to figure out what this is: +(defpart 534 + :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 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-placeholder-single + :id 150 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 535 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 535 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-placeholder-multiple + :id 151 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 536 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 536 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.01)) + (:timer (seconds 2)) + (:flags ()) + (:conerot-x (degrees -45) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + + + + 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 a8e7eb4934..7e1ca3a4a4 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/collectables_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/collectables_REF.gc @@ -19,14 +19,14 @@ (defskelgroup skel-gun-yellow-up yellow-barrel yellow-barrel-lod0-jg yellow-barrel-idle-ja ((yellow-barrel-lod0-mg (meters 999999))) :bounds (static-spherem 0 1 0 1.6) - :shadow-joint-index 3 + :origin-joint-index 3 ) ;; failed to figure out what this is: (defskelgroup skel-gun-dark-up dark-barrel 0 2 ((1 (meters 999999))) :bounds (static-spherem 0 1 0 1.6) - :shadow-joint-index 3 + :origin-joint-index 3 ) ;; failed to figure out what this is: @@ -38,7 +38,7 @@ :bounds (static-spherem 0 0 0 0.6) :shadow collectables-skill-shadow-mg :texture-level 10 - :origin-joint-index 3 + :shadow-joint-index 3 ) ;; definition of type collectable @@ -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)) @@ -521,50 +521,16 @@ (cond ((logtest? (-> this collect-effect flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> this root root-prim prim-core world-sphere quad)) - (let ((s4-10 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s4-10 - (let ((t9-23 (method-of-type part-tracker-subsampler activate))) - (t9-23 (the-as part-tracker-subsampler s4-10) s5-1 "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-24 run-function-in-process) - (a0-77 s4-10) - (a1-33 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> this collect-effect)) - (set! (-> *part-tracker-subsampler-params-default* duration) 0) - (set! (-> *part-tracker-subsampler-params-default* callback) part-tracker-track-target) - (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-24) a0-77 a1-33 *part-tracker-subsampler-params-default*) - ) - (-> s4-10 ppointer) - ) + (part-tracker-spawn + part-tracker-subsampler + :to s5-1 + :group (-> this collect-effect) + :callback part-tracker-track-target ) ) (else (set! (-> *launch-matrix* trans quad) (-> this root root-prim prim-core world-sphere quad)) - (let ((s4-11 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s4-11 - (let ((t9-26 (method-of-type part-tracker activate))) - (t9-26 (the-as part-tracker s4-11) s5-1 "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-27 run-function-in-process) - (a0-84 s4-11) - (a1-36 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> this collect-effect)) - (set! (-> *part-tracker-params-default* duration) 0) - (set! (-> *part-tracker-params-default* callback) part-tracker-track-target) - (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-27) a0-84 a1-36 *part-tracker-params-default*) - ) - (-> s4-11 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to s5-1 :group (-> this collect-effect) :callback part-tracker-track-target) ) ) ) @@ -572,99 +538,68 @@ (cond ((logtest? (-> this collect-effect2 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> this root root-prim prim-core world-sphere quad)) - (let ((s5-2 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-2 - (let ((t9-29 (method-of-type part-tracker-subsampler activate))) - (t9-29 (the-as part-tracker-subsampler s5-2) this "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-30 run-function-in-process) - (a0-91 s5-2) - (a1-39 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> this collect-effect2)) - (set! (-> *part-tracker-subsampler-params-default* duration) 0) - (set! (-> *part-tracker-subsampler-params-default* callback) - (lambda ((arg0 part-tracker)) - (let ((v1-1 (handle->process (-> arg0 userdata)))) - (when (the-as process v1-1) - (let* ((s5-0 (handle->process (-> (the-as collectable v1-1) pickup-handle))) - (a0-9 (if (type? s5-0 process-focusable) - s5-0 - ) - ) - (a2-0 (if (not a0-9) - (-> arg0 root trans) - (get-trans (the-as process-focusable a0-9) 3) - ) - ) + (part-tracker-spawn + part-tracker-subsampler + :to this + :group (-> this collect-effect2) + :callback (lambda ((arg0 part-tracker)) + (let ((v1-1 (handle->process (-> arg0 userdata)))) + (when (the-as process v1-1) + (let* ((s5-0 (handle->process (-> (the-as collectable v1-1) pickup-handle))) + (a0-9 (if (type? s5-0 process-focusable) + s5-0 ) - (vector-lerp! - (-> arg0 root trans) - (-> arg0 offset) - a2-0 - (/ (the float (- (current-time) (-> arg0 state-time))) (the float (-> arg0 part group duration))) - ) - ) - ) - ) - ) + ) + (a2-0 (if (not a0-9) + (-> arg0 root trans) + (get-trans (the-as process-focusable a0-9) 3) + ) + ) + ) + (vector-lerp! + (-> arg0 root trans) + (-> arg0 offset) + a2-0 + (/ (the float (- (current-time) (-> arg0 state-time))) (the float (-> arg0 part group duration))) ) - (set! (-> *part-tracker-subsampler-params-default* userdata) (the-as uint (process->handle this))) - (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-30) a0-91 a1-39 *part-tracker-subsampler-params-default*) + ) + ) ) - (-> s5-2 ppointer) ) + :userdata (the-as uint (process->handle this)) ) ) (else (set! (-> *launch-matrix* trans quad) (-> this root root-prim prim-core world-sphere quad)) - (let ((s5-3 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-3 - (let ((t9-32 (method-of-type part-tracker activate))) - (t9-32 (the-as part-tracker s5-3) this "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-33 run-function-in-process) - (a0-98 s5-3) - (a1-42 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> this collect-effect2)) - (set! (-> *part-tracker-params-default* duration) 0) - (set! (-> *part-tracker-params-default* callback) - (lambda ((arg0 part-tracker)) - (let ((v1-1 (handle->process (-> arg0 userdata)))) - (when (the-as process v1-1) - (let* ((s5-0 (handle->process (-> (the-as collectable v1-1) pickup-handle))) - (a0-9 (if (type? s5-0 process-focusable) - s5-0 - ) - ) - (a2-0 (if (not a0-9) - (-> arg0 root trans) - (get-trans (the-as process-focusable a0-9) 3) - ) - ) + (part-tracker-spawn + part-tracker + :to this + :group (-> this collect-effect2) + :callback (lambda ((arg0 part-tracker)) + (let ((v1-1 (handle->process (-> arg0 userdata)))) + (when (the-as process v1-1) + (let* ((s5-0 (handle->process (-> (the-as collectable v1-1) pickup-handle))) + (a0-9 (if (type? s5-0 process-focusable) + s5-0 ) - (vector-lerp! - (-> arg0 root trans) - (-> arg0 offset) - a2-0 - (/ (the float (- (current-time) (-> arg0 state-time))) (the float (-> arg0 part group duration))) - ) - ) - ) - ) - ) + ) + (a2-0 (if (not a0-9) + (-> arg0 root trans) + (get-trans (the-as process-focusable a0-9) 3) + ) + ) + ) + (vector-lerp! + (-> arg0 root trans) + (-> arg0 offset) + a2-0 + (/ (the float (- (current-time) (-> arg0 state-time))) (the float (-> arg0 part group duration))) ) - (set! (-> *part-tracker-params-default* userdata) (the-as uint (process->handle this))) - (set! (-> *part-tracker-params-default* target) #f) - (set! (-> *part-tracker-params-default* mat-joint) *launch-matrix*) - ((the-as (function object object object none) t9-33) a0-98 a1-42 *part-tracker-params-default*) + ) + ) ) - (-> s5-3 ppointer) ) + :userdata (the-as uint (process->handle this)) ) ) ) @@ -1038,10 +973,7 @@ ) :trans (behavior () (vector-v++! (-> self root transv) (compute-acc-due-to-gravity (-> self root) (new-stack-vector0) 0.0)) - (let ((t9-2 (method-of-object (-> self root) collide-shape-moving-method-57))) - (-> self root transv) - (t9-2) - ) + (integrate-no-collide! (-> self root) (-> self root transv)) (when (and (>= 0.0 (-> self root transv y)) (>= (-> self base y) (-> self root trans y))) (set! (-> self root trans y) (-> self base y)) (cond @@ -1190,7 +1122,7 @@ ) (else (if (nonzero? (-> self part)) - (set! (-> self part fade) (* 0.0033333334 f0-1)) + (set! (-> self part local-space-binding) (the-as particle-local-space-info (* 0.0033333334 f0-1))) ) (when (nonzero? (-> self draw)) (logior! (-> self draw status) (draw-control-status force-fade)) @@ -1947,7 +1879,7 @@ (a1-3 (-> this draw skeleton bones 3)) ) (if (nonzero? a0-7) - (sparticle-launch-control-method-17 a0-7 (the-as matrix a1-3)) + (spawn-from-mat a0-7 (the-as matrix a1-3)) ) ) 0 @@ -2083,10 +2015,7 @@ ) ) (else - (let ((t9-7 (method-of-object (-> self root) collide-shape-moving-method-57))) - (-> self root transv) - (t9-7) - ) + (integrate-no-collide! (-> self root) (-> self root transv)) ) ) ) @@ -3217,7 +3146,7 @@ (you-suck-stage *game-info* #f 0) (cond ((or (< 20 (-> *game-info* live-eco-pill-count)) - (not (logtest? (game-feature feature58) (-> *game-info* features))) + (not (logtest? (game-feature darkeco) (-> *game-info* features))) ) (return (the-as pickup-type #f)) ) @@ -3241,7 +3170,7 @@ ;; WARN: Return type mismatch number vs pickup-type. (defun pickup-light-set! ((arg0 fact-info) (arg1 (pointer pickup-type)) (arg2 (pointer float)) (arg3 int)) (the-as pickup-type (cond - ((logtest? (game-feature feature57) (-> *game-info* features)) + ((logtest? (game-feature lighteco) (-> *game-info* features)) (set! (-> arg1 0) (pickup-type eco-pill-light)) (set! (-> arg2 0) 20.0) ) diff --git a/test/decompiler/reference/jak3/engine/common-obs/crates_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/crates_REF.gc index 7f6ef10d31..191d10ac8a 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/crates_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/crates_REF.gc @@ -150,7 +150,7 @@ ;; failed to figure out what this is: (defpart 810 - :init-specs ((:texture (new 'static 'texture-id :page #x4)) + :init-specs ((:texture (bigpuff level-default-sprite)) (:num 16.0) (:y (meters 0.5) (meters 1)) (:scale-x (meters 1.5) (meters 1.5)) @@ -179,7 +179,7 @@ ;; failed to figure out what this is: (defpart 812 - :init-specs ((:texture (new 'static 'texture-id :index #x3e :page #x4)) + :init-specs ((:texture (motion-blur-part level-default-sprite)) (:num 4.0) (:y (meters 0.75)) (:scale-x (meters 6)) @@ -209,7 +209,7 @@ ;; failed to figure out what this is: (defpart 814 - :init-specs ((:texture (new 'static 'texture-id :index #x4b :page #x4)) + :init-specs ((:texture (starflash level-default-sprite)) (:num 1.0) (:y (meters 1)) (:scale-x (meters 8)) @@ -226,7 +226,7 @@ ;; failed to figure out what this is: (defpart 815 - :init-specs ((:texture (new 'static 'texture-id :index #x6 :page #x4)) + :init-specs ((:texture (crate-wood-01-splinter level-default-sprite)) (:num 5.0) (:x (meters -0.5) (meters 1)) (:y (meters 0.25) (meters 1.5)) @@ -260,7 +260,7 @@ ;; failed to figure out what this is: (defpart 817 - :init-specs ((:texture (new 'static 'texture-id :index #x5 :page #x4)) + :init-specs ((:texture (crate-metalbolt-splinter level-default-sprite)) (:num 4.5) (:x (meters -0.5) (meters 1)) (:y (meters 0.25) (meters 1.5)) @@ -359,7 +359,7 @@ ;; failed to figure out what this is: (defpart 147 - :init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4)) + :init-specs ((:texture (hotdot level-default-sprite)) (:num 6.0) (:scale-x (meters 0.2) (meters 0.4)) (:scale-y :copy scale-x) @@ -389,7 +389,7 @@ ;; failed to figure out what this is: (defpart 819 - :init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4)) + :init-specs ((:texture (hotdot level-default-sprite)) (:num 3.0) (:scale-x (meters 0.2)) (:rot-z (degrees 0) (degrees 180)) @@ -407,7 +407,7 @@ ;; failed to figure out what this is: (defpart 146 - :init-specs ((:texture (new 'static 'texture-id :index #x4b :page #x4)) + :init-specs ((:texture (starflash level-default-sprite)) (:num 1.0) (:scale-x (meters 16)) (:scale-y :copy scale-x) @@ -423,7 +423,7 @@ ;; failed to figure out what this is: (defpart 148 - :init-specs ((:texture (new 'static 'texture-id :page #x4)) + :init-specs ((:texture (bigpuff level-default-sprite)) (:num 4.0) (:scale-x (meters 2.5) (meters 1.5)) (:rot-z (degrees 0) (degrees 360)) @@ -448,7 +448,7 @@ ;; failed to figure out what this is: (defpart 145 - :init-specs ((:texture (new 'static 'texture-id :index #x4b :page #x4)) + :init-specs ((:texture (starflash level-default-sprite)) (:num 16.0) (:y (meters 1)) (:scale-x (meters 0.1)) @@ -466,7 +466,7 @@ ;; failed to figure out what this is: (defpart 143 - :init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4)) + :init-specs ((:texture (hotdot level-default-sprite)) (:num 1.0) (:y (meters 0) (meters 16)) (:z (meters 0.3) (meters 0.3)) @@ -491,7 +491,7 @@ ;; failed to figure out what this is: (defpart 144 - :init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4)) + :init-specs ((:texture (hotdot level-default-sprite)) (:num 1.0) (:scale-x (meters 0.3) (meters 0.1)) (:scale-y :copy scale-x) @@ -512,7 +512,7 @@ ;; failed to figure out what this is: (defpart 818 - :init-specs ((:texture (new 'static 'texture-id :index #x5 :page #x4)) + :init-specs ((:texture (crate-metalbolt-splinter level-default-sprite)) (:num 8.0 16.0) (:x (meters -0.5) (meters 1)) (:y (meters 0.25) (meters 1.5)) @@ -1032,50 +1032,11 @@ (cond ((logtest? (-> *part-group-id-table* 197 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) - (let ((s5-9 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-9 - (let ((t9-19 (method-of-type part-tracker-subsampler activate))) - (t9-19 (the-as part-tracker-subsampler s5-9) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-20 run-function-in-process) - (a0-41 s5-9) - (a1-20 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 197)) - (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-20) a0-41 a1-20 *part-tracker-subsampler-params-default*) - ) - (-> s5-9 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 197)) ) (else (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) - (let ((s5-10 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-10 - (let ((t9-22 (method-of-type part-tracker activate))) - (t9-22 (the-as part-tracker s5-10) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-23 run-function-in-process) - (a0-47 s5-10) - (a1-23 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 197)) - (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-23) a0-47 a1-23 *part-tracker-params-default*) - ) - (-> s5-10 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 197)) ) ) ) @@ -1083,99 +1044,21 @@ (cond ((logtest? (-> *part-group-id-table* 196 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) - (let ((s5-11 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-11 - (let ((t9-25 (method-of-type part-tracker-subsampler activate))) - (t9-25 (the-as part-tracker-subsampler s5-11) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-26 run-function-in-process) - (a0-55 s5-11) - (a1-27 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 196)) - (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-26) a0-55 a1-27 *part-tracker-subsampler-params-default*) - ) - (-> s5-11 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 196)) ) (else (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) - (let ((s5-12 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-12 - (let ((t9-28 (method-of-type part-tracker activate))) - (t9-28 (the-as part-tracker s5-12) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-29 run-function-in-process) - (a0-61 s5-12) - (a1-30 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 196)) - (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-29) a0-61 a1-30 *part-tracker-params-default*) - ) - (-> s5-12 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 196)) ) ) ) ((logtest? (-> *part-group-id-table* 195 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) - (let ((s5-13 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-13 - (let ((t9-31 (method-of-type part-tracker-subsampler activate))) - (t9-31 (the-as part-tracker-subsampler s5-13) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-32 run-function-in-process) - (a0-67 s5-13) - (a1-33 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 195)) - (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-32) a0-67 a1-33 *part-tracker-subsampler-params-default*) - ) - (-> s5-13 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 195)) ) (else (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) - (let ((s5-14 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-14 - (let ((t9-34 (method-of-type part-tracker activate))) - (t9-34 (the-as part-tracker s5-14) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-35 run-function-in-process) - (a0-73 s5-14) - (a1-36 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 195)) - (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-35) a0-73 a1-36 *part-tracker-params-default*) - ) - (-> s5-14 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 195)) ) ) ) diff --git a/test/decompiler/reference/jak3/engine/common-obs/curves_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/curves_REF.gc index 604de322c4..be28d83c04 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/curves_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/curves_REF.gc @@ -92,7 +92,7 @@ (default-loop-behavior uint64) ) (:methods - (curve2d-piecewise-method-10 (_type_ int symbol uint) none) + (curve2d-piecewise-method-10 (_type_ int symbol int) none) (curve2d-piecewise-method-11 (_type_) none) ) ) @@ -233,7 +233,7 @@ ;; definition for method 10 of type curve2d-piecewise ;; WARN: Return type mismatch int vs none. -(defmethod curve2d-piecewise-method-10 ((this curve2d-piecewise) (arg0 int) (arg1 symbol) (arg2 uint)) +(defmethod curve2d-piecewise-method-10 ((this curve2d-piecewise) (arg0 int) (arg1 symbol) (arg2 int)) (set! (-> this pts) ((method-of-type float-pair-array new) arg1 float-pair-array arg0)) (set! (-> this default-loop-behavior) (the-as uint (if arg2 0 @@ -588,7 +588,7 @@ ;; failed to figure out what this is: (when (or (zero? *curve-linear-up-hold*) (!= loading-level global)) (set! *curve-linear-up-hold* (new 'loading-level 'curve2d-piecewise)) - (curve2d-piecewise-method-10 *curve-linear-up-hold* 2 'loading-level (the-as uint #f)) + (curve2d-piecewise-method-10 *curve-linear-up-hold* 2 'loading-level (the-as int #f)) ) ;; failed to figure out what this is: @@ -657,7 +657,3 @@ ) ) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/common-obs/debris_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/debris_REF.gc new file mode 100644 index 0000000000..3b8f4e6eb4 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/debris_REF.gc @@ -0,0 +1,742 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type debris-static-joint-params +(deftype debris-static-joint-params (structure) + ((parent-joint-index int16) + (group string) + (offset vector) + ) + ) + +;; definition for method 3 of type debris-static-joint-params +(defmethod inspect ((this debris-static-joint-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'debris-static-joint-params) + (format #t "~1Tparent-joint-index: ~D~%" (-> this parent-joint-index)) + (format #t "~1Tgroup: ~A~%" (-> this group)) + (format #t "~1Toffset: #~%" (-> this offset)) + (label cfg-4) + this + ) + +;; definition of type debris-static-params +(deftype debris-static-params (basic) + ((joints (array debris-static-joint-params)) + (collide-spec collide-spec) + (sound-hit sound-name) + (art-level symbol) + ) + ) + +;; definition for method 3 of type debris-static-params +;; INFO: Used lq/sq +(defmethod inspect ((this debris-static-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tjoints: ~A~%" (-> this joints)) + (format #t "~1Tcollide-spec: ~D~%" (-> this collide-spec)) + (format #t "~1Tsound-hit: ~D~%" (-> this sound-hit)) + (format #t "~1Tart-level: ~A~%" (-> this art-level)) + (label cfg-4) + this + ) + +;; definition of type debris +(deftype debris (basic) + ((root transformq :inline) + (node-list cspace-array) + (draw draw-control) + (duration float) + (hit-xz-reaction float) + (hit-y-reaction float) + (prev-pos vector :inline) + (gravity float) + (rot-axis vector :inline) + (rot-angle float) + (transv vector :inline) + (time-fade-out time-frame) + (params debris-static-params) + ) + ) + +;; definition for method 3 of type debris +(defmethod inspect ((this debris)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Troot: #~%" (-> this root)) + (format #t "~1Tnode-list: ~A~%" (-> this node-list)) + (format #t "~1Tdraw: ~A~%" (-> this draw)) + (format #t "~1Tduration: ~f~%" (-> this duration)) + (format #t "~1Thit-xz-reaction: ~f~%" (-> this hit-xz-reaction)) + (format #t "~1Thit-y-reaction: ~f~%" (-> this hit-y-reaction)) + (format #t "~1Tprev-pos: #~%" (-> this prev-pos)) + (format #t "~1Tgravity: ~f~%" (-> this gravity)) + (format #t "~1Trot-axis: #~%" (-> this rot-axis)) + (format #t "~1Trot-angle: ~f~%" (-> this rot-angle)) + (format #t "~1Ttransv: #~%" (-> this transv)) + (format #t "~1Ttime-fade-out: ~D~%" (-> this time-fade-out)) + (format #t "~1Tparams: ~A~%" (-> this params)) + (label cfg-4) + this + ) + +;; definition of type debris-box +(deftype debris-box (structure) + ((start uint32) + (num uint32) + (bbox bounding-box :inline) + ) + ) + +;; definition for method 3 of type debris-box +(defmethod inspect ((this debris-box)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'debris-box) + (format #t "~1Tstart: ~D~%" (-> this start)) + (format #t "~1Tnum: ~D~%" (-> this num)) + (format #t "~1Tbbox: #~%" (-> this bbox)) + (label cfg-4) + this + ) + +;; definition of type debris-group +(deftype debris-group (process) + ((dead-debris-num int32) + (debris-num int32) + (debris (array debris)) + (max-probe-width float) + (state-time time-frame) + (num-boxes uint32) + (boxes debris-box 16 :inline) + ) + (:state-methods + idle + ) + (:methods + (do-collision (_type_ int) none) + (update-box! (_type_ int) none) + ) + ) + +;; definition for method 3 of type debris-group +(defmethod inspect ((this debris-group)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Tdead-debris-num: ~D~%" (-> this dead-debris-num)) + (format #t "~2Tdebris-num: ~D~%" (-> this debris-num)) + (format #t "~2Tdebris: ~A~%" (-> this debris)) + (format #t "~2Tmax-probe-width: ~f~%" (-> this max-probe-width)) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (format #t "~2Tnum-boxes: ~D~%" (-> this num-boxes)) + (format #t "~2Tboxes[16] @ #x~X~%" (-> this boxes)) + (label cfg-4) + this + ) + +;; definition of type debris-tuning +(deftype debris-tuning (structure) + ((explosion uint64) + (duration time-frame) + (gravity float) + (rot-speed float) + (bounds-inflate float) + (max-probe-width float) + (max-probe-height float) + (max-probe-depth float) + (fountain-rand-transv-lo vector :inline) + (fountain-rand-transv-hi vector :inline) + (away-from-focal-pt vector :inline :overlay-at fountain-rand-transv-lo) + (away-from-rand-transv-xz-lo float :overlay-at (-> fountain-rand-transv-hi data 0)) + (away-from-rand-transv-xz-hi float :overlay-at (-> fountain-rand-transv-hi data 1)) + (away-from-rand-transv-y-lo float :overlay-at (-> fountain-rand-transv-hi data 2)) + (away-from-rand-transv-y-hi float :overlay-at (-> fountain-rand-transv-hi data 3)) + (hit-xz-reaction float) + (hit-y-reaction float) + (scale-rand-lo float) + (scale-rand-hi float) + ) + (:methods + (new (symbol type uint) _type_) + ) + ) + +;; definition for method 3 of type debris-tuning +(defmethod inspect ((this debris-tuning)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'debris-tuning) + (format #t "~1Texplosion: ~D~%" (-> this explosion)) + (format #t "~1Tduration: ~D~%" (-> this duration)) + (format #t "~1Tgravity: ~f~%" (-> this gravity)) + (format #t "~1Trot-speed: ~f~%" (-> this rot-speed)) + (format #t "~1Tbounds-inflate: ~f~%" (-> this bounds-inflate)) + (format #t "~1Tmax-probe-width: ~f~%" (-> this max-probe-width)) + (format #t "~1Tmax-probe-height: ~f~%" (-> this max-probe-height)) + (format #t "~1Tmax-probe-depth: ~f~%" (-> this max-probe-depth)) + (format #t "~1Tfountain-rand-transv-lo: #~%" (-> this fountain-rand-transv-lo)) + (format #t "~1Tfountain-rand-transv-hi: #~%" (-> this fountain-rand-transv-hi)) + (format #t "~1Taway-from-focal-pt: #~%" (-> this fountain-rand-transv-lo)) + (format #t "~1Taway-from-rand-transv-xz-lo: ~f~%" (-> this fountain-rand-transv-hi x)) + (format #t "~1Taway-from-rand-transv-xz-hi: ~f~%" (-> this fountain-rand-transv-hi y)) + (format #t "~1Taway-from-rand-transv-y-lo: ~f~%" (-> this fountain-rand-transv-hi z)) + (format #t "~1Taway-from-rand-transv-y-hi: ~f~%" (-> this fountain-rand-transv-hi w)) + (format #t "~1Thit-xz-reaction: ~f~%" (-> this hit-xz-reaction)) + (format #t "~1Thit-y-reaction: ~f~%" (-> this hit-y-reaction)) + (format #t "~1Tscale-rand-lo: ~f~%" (-> this scale-rand-lo)) + (format #t "~1Tscale-rand-hi: ~f~%" (-> this scale-rand-hi)) + (label cfg-4) + this + ) + +;; definition for method 0 of type debris-tuning +;; WARN: Return type mismatch structure vs debris-tuning. +(defmethod new debris-tuning ((allocation symbol) (type-to-make type) (arg0 uint)) + (let ((t9-0 (method-of-type structure new)) + (v1-1 type-to-make) + ) + (-> type-to-make size) + (let ((v0-0 (t9-0 allocation v1-1))) + (set! (-> (the-as debris-tuning v0-0) explosion) arg0) + (set! (-> (the-as debris-tuning v0-0) duration) (seconds 1)) + (set! (-> (the-as debris-tuning v0-0) gravity) -286720.0) + (set! (-> (the-as debris-tuning v0-0) rot-speed) 180.0) + (set! (-> (the-as debris-tuning v0-0) bounds-inflate) 16384.0) + (set! (-> (the-as debris-tuning v0-0) max-probe-width) 40960.0) + (set! (-> (the-as debris-tuning v0-0) max-probe-height) 24576.0) + (set! (-> (the-as debris-tuning v0-0) max-probe-depth) 20480.0) + (set! (-> (the-as debris-tuning v0-0) hit-xz-reaction) 0.75) + (set! (-> (the-as debris-tuning v0-0) hit-y-reaction) 0.7) + (set! (-> (the-as debris-tuning v0-0) scale-rand-lo) 0.8) + (set! (-> (the-as debris-tuning v0-0) scale-rand-hi) 2.0) + (cond + ((zero? arg0) + (set-vector! (-> (the-as debris-tuning v0-0) fountain-rand-transv-lo) -81920.0 20480.0 -81920.0 1.0) + (set-vector! (-> (the-as debris-tuning v0-0) fountain-rand-transv-hi) 81920.0 61440.0 81920.0 1.0) + ) + ((= arg0 1) + (vector-reset! (-> (the-as debris-tuning v0-0) fountain-rand-transv-lo)) + (set! (-> (the-as debris-tuning v0-0) fountain-rand-transv-hi x) 49152.0) + (set! (-> (the-as debris-tuning v0-0) fountain-rand-transv-hi y) 163840.0) + (set! (-> (the-as debris-tuning v0-0) fountain-rand-transv-hi z) 20480.0) + (set! (-> (the-as debris-tuning v0-0) fountain-rand-transv-hi w) 61440.0) + ) + ) + (the-as debris-tuning v0-0) + ) + ) + ) + +;; definition for method 16 of type debris-group +;; WARN: Return type mismatch int vs none. +(defmethod update-box! ((this debris-group) (idx int)) + (let ((debris-box (-> this boxes idx))) + (dotimes (i (the-as int (-> debris-box num))) + (let ((debris (-> this debris (+ i (-> debris-box start))))) + (if (zero? i) + (set-to-point! (-> debris-box bbox) (the-as vector (-> debris root))) + (add-point! (-> debris-box bbox) (the-as vector (-> debris root))) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 15 of type debris-group +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod do-collision ((this debris-group) (idx int)) + (local-vars + (sv-80 (function sound-name sound-id int int int sound-group object sound-id :behavior process-drawable)) + (name sound-name) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let* ((debris-box (-> this boxes idx)) + (box-num (-> debris-box num)) + (box-start (-> debris-box start)) + (bbox (-> debris-box bbox)) + ) + (when (> box-num 0) + (let ((cquery (new 'static 'collide-query))) + (let ((debris-start (-> this debris box-start))) + (let ((a3-0 (-> cquery bbox)) + (a1-2 (-> bbox min)) + (a2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a2-0 x) 4096.0) + (set! (-> a2-0 y) 4096.0) + (set! (-> a2-0 z) 4096.0) + (set! (-> a2-0 w) 1.0) + (vector-! (the-as vector a3-0) a1-2 a2-0) + ) + (let ((a1-3 (-> cquery bbox max)) + (a0-2 (-> bbox max)) + (a2-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a2-1 x) 4096.0) + (set! (-> a2-1 y) 4096.0) + (set! (-> a2-1 z) 4096.0) + (set! (-> a2-1 w) 1.0) + (vector+! a1-3 a0-2 a2-1) + ) + (set! (-> cquery collide-with) (-> debris-start params collide-spec)) + ) + (set! (-> cquery ignore-process0) #f) + (set! (-> cquery ignore-process1) #f) + (set! (-> cquery ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> cquery action-mask) (collide-action solid)) + (fill-using-bounding-box *collide-cache* cquery) + (dotimes (s2-0 (the-as int box-num)) + (let ((s1-0 (-> this debris (+ s2-0 box-start)))) + (when (not (logtest? (-> this debris (+ s2-0 box-start) draw status) (draw-control-status no-draw))) + (let ((f0-9 (* (-> s1-0 gravity) (seconds-per-frame))) + (s0-0 (new 'stack-no-clear 'quaternion)) + ) + (set! (-> s1-0 prev-pos quad) (-> s1-0 root trans quad)) + (+! (-> s1-0 transv y) f0-9) + (vector-v+! (the-as vector (-> s1-0 root)) (the-as vector (-> s1-0 root)) (-> s1-0 transv)) + (quaternion-vector-angle! s0-0 (-> s1-0 rot-axis) (* (-> s1-0 rot-angle) (seconds-per-frame))) + (quaternion*! (-> s1-0 root quat) (-> s1-0 root quat) s0-0) + ) + (quaternion-normalize! (-> s1-0 root quat)) + (set! (-> s1-0 rot-angle) (- (-> s1-0 rot-angle) (* (seconds-per-frame) (-> s1-0 rot-angle)))) + (when (nonzero? (-> s1-0 params collide-spec)) + (let ((s0-1 (new 'stack-no-clear 'vector))) + (vector-! (-> cquery move-dist) (the-as vector (-> s1-0 root)) (-> s1-0 prev-pos)) + (set! (-> cquery start-pos quad) (-> s1-0 prev-pos quad)) + (let ((v1-34 cquery)) + (set! (-> v1-34 radius) 2048.0) + (set! (-> v1-34 collide-with) (-> s1-0 params collide-spec)) + (set! (-> v1-34 ignore-process0) #f) + (set! (-> v1-34 ignore-process1) #f) + (set! (-> v1-34 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-34 action-mask) (collide-action solid)) + ) + (let ((f0-16 (probe-using-line-sphere *collide-cache* cquery))) + (when (>= f0-16 0.0) + (let ((a1-12 s0-1)) + (let ((v1-37 (-> cquery start-pos))) + (let ((a0-21 (-> cquery move-dist))) + (let ((a2-5 f0-16)) + (.mov vf7 a2-5) + ) + (.lvf vf5 (&-> a0-21 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-12 quad) vf6) + ) + (let* ((v1-38 (-> s1-0 transv)) + (f30-0 (sqrtf (+ (* (-> v1-38 x) (-> v1-38 x)) (* (-> v1-38 z) (-> v1-38 z))))) + ) + (let ((f28-0 (vector-length (-> s1-0 transv)))) + (when (< (-> s1-0 transv y) -61440.0) + (set! sv-80 sound-play-by-name) + (set! name (-> s1-0 params sound-hit)) + (let ((id (new-sound-id)) + (a2-6 1024) + (a3-6 0) + (t0-4 0) + (t1-0 0) + (t2-0 (-> s1-0 root)) + ) + (sv-80 name id a2-6 a3-6 t0-4 (the-as sound-group t1-0) t2-0) + ) + ) + (vector-reflect! (-> s1-0 transv) (-> s1-0 transv) (-> cquery best-other-tri normal)) + (vector-reflect! (-> s1-0 rot-axis) (-> s1-0 rot-axis) (-> cquery best-other-tri normal)) + (set! (-> s1-0 rot-angle) f28-0) + ) + (let ((f28-1 (-> s1-0 transv y))) + (vector-xz-normalize! (-> s1-0 transv) (* f30-0 (-> s1-0 hit-xz-reaction))) + (set! (-> s1-0 transv y) (* f28-1 (-> s1-0 hit-y-reaction))) + ) + ) + (+! (-> s0-1 y) (* 40.96 (-> cquery best-other-tri normal y))) + (set! (-> s0-1 w) 1.0) + (set! (-> s1-0 root trans quad) (-> s0-1 quad)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; failed to figure out what this is: +(defstate idle (debris-group) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (set! (-> self dead-debris-num) (-> self debris-num)) + (dotimes (i (-> self debris-num)) + (let ((debris (-> self debris i)) + (draw-ctrl (-> self debris i draw)) + ) + (matrix<-transformq+trans! + (the-as matrix (-> draw-ctrl skeleton bones 3)) + (-> debris root) + (-> draw-ctrl skeleton bones 0 transform trans) + ) + (logclear! (-> draw-ctrl status) (draw-control-status no-draw-temp uninited)) + (vector+! (-> draw-ctrl origin) (-> draw-ctrl skeleton bones 3 transform trans) (-> draw-ctrl bounds)) + (set! (-> draw-ctrl origin w) (-> draw-ctrl bounds w)) + (cond + ((zero? (-> debris time-fade-out)) + (if (or (< (vector-length (-> debris transv)) 4096.0) + (time-elapsed? (-> self state-time) (the int (-> debris duration))) + ) + (set-time! (-> debris time-fade-out)) + ) + ) + ((time-elapsed? (-> debris time-fade-out) (seconds 0.5)) + (logior! (-> draw-ctrl status) (draw-control-status no-draw)) + (+! (-> self dead-debris-num) -1) + ) + (else + (logior! (-> draw-ctrl status) (draw-control-status force-fade)) + (set! (-> draw-ctrl force-fade) + (the-as uint (the int (- 128.0 (* 0.85333335 (the float (- (current-time) (-> debris time-fade-out))))))) + ) + ) + ) + ) + ) + (if (zero? (-> self dead-debris-num)) + (deactivate self) + ) + (dotimes (ii (the-as int (-> self num-boxes))) + (let* ((debris-box (-> self boxes ii)) + (box-num (-> debris-box num)) + (box-start (-> debris-box start)) + (bbox (-> debris-box bbox)) + (s2-0 0) + ) + (update-box! self ii) + (if (< (- (-> bbox max data s2-0) (-> bbox min data s2-0)) (- (-> bbox max y) (-> bbox min y))) + (set! s2-0 1) + ) + (if (< (- (-> bbox max data s2-0) (-> bbox min data s2-0)) (- (-> bbox max z) (-> bbox min z))) + (set! s2-0 2) + ) + (when (and (< (-> self max-probe-width) (- (-> debris-box bbox max data s2-0) (-> bbox min data s2-0))) + (< (-> self num-boxes) (the-as uint 15)) + ) + 0.0 + (let ((a1-3 (new 'static 'boxed-array :type debris :length 0 :allocated-length 32)) + (a0-12 0) + (v1-72 0) + (a2-4 (-> self boxes (-> self num-boxes))) + ) + (let ((f0-14 (* 0.5 (+ (-> debris-box bbox min data s2-0) (-> debris-box bbox max data s2-0))))) + (dotimes (a3-6 (the-as int box-num)) + (let ((t0-4 (-> self debris (+ a3-6 (-> debris-box start))))) + (cond + ((< (-> t0-4 root trans data s2-0) f0-14) + (set! (-> self debris (+ a0-12 box-start)) (-> self debris (+ a3-6 box-start))) + (+! a0-12 1) + ) + (else + (set! (-> a1-3 v1-72) (-> self debris (+ a3-6 box-start))) + (+! v1-72 1) + ) + ) + ) + ) + ) + (dotimes (a3-9 v1-72) + (set! (-> self debris (+ a0-12 box-start a3-9)) (-> a1-3 a3-9)) + ) + (set! (-> debris-box num) (the-as uint a0-12)) + (set! (-> a2-4 start) (+ box-start a0-12)) + (set! (-> a2-4 num) (the-as uint v1-72)) + ) + (update-box! self ii) + (update-box! self (the-as int (-> self num-boxes))) + (+! (-> self num-boxes) 1) + ) + ) + ) + (dotimes (gp-2 (the-as int (-> self num-boxes))) + (do-collision self gp-2) + ) + ) + :code sleep-code + ) + +;; definition for method 7 of type debris-group +;; WARN: Return type mismatch process vs debris-group. +(defmethod relocate ((this debris-group) (offset int)) + (dotimes (v1-0 (-> this debris length)) + (if (nonzero? (-> this debris v1-0 node-list)) + (&+! (-> this debris v1-0 node-list) offset) + ) + (if (nonzero? (-> this debris v1-0 draw)) + (&+! (-> this debris v1-0 draw) offset) + ) + (if (nonzero? (-> this debris v1-0)) + (&+! (-> this debris v1-0) offset) + ) + ) + (if (nonzero? (-> this debris)) + (&+! (-> this debris) offset) + ) + (the-as debris-group ((method-of-type process relocate) this offset)) + ) + +;; definition for function debris-group-init-by-other +;; INFO: Used lq/sq +(defbehavior debris-group-init-by-other debris-group ((tuning debris-tuning) (params debris-static-params) (pdraw process-drawable)) + (local-vars (tuning-scale vector) (debris-scale vector) (sv-80 vector) (sv-96 vector) (sv-112 vector)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (stack-size-set! (-> self main-thread) 512) + (set! (-> self debris-num) (-> params joints length)) + (set! (-> self debris) (new 'process 'boxed-array debris (-> self debris-num))) + (set! (-> self debris length) (-> self debris allocated-length)) + (dotimes (i (-> params joints length)) + (set! (-> self debris i) (new 'process 'debris)) + (let ((skel (art-group-get-by-name *level* (-> params joints i group) (the-as (pointer level) #f))) + (debris (-> self debris i)) + ) + (cond + ((and skel (nonzero? skel)) + (set! (-> debris params) params) + (let ((joint-transform (-> pdraw node-list data (-> params joints i parent-joint-index) bone transform))) + (matrix->quaternion (-> debris root quat) joint-transform) + (matrix->trans joint-transform (the-as vector (-> debris root))) + (set! (-> debris root scale quad) (-> pdraw root scale quad)) + (if (nonzero? (-> params joints i offset)) + (vector-matrix*! (the-as vector (-> debris root)) (-> params joints i offset) joint-transform) + ) + ) + (set! debris-scale (-> debris root scale)) + (let ((s0-1 (-> debris root scale))) + (set! tuning-scale (new 'stack-no-clear 'vector)) + (set! (-> tuning-scale x) (rand-vu-float-range (-> tuning scale-rand-lo) (-> tuning scale-rand-hi))) + (set! (-> tuning-scale y) (rand-vu-float-range (-> tuning scale-rand-lo) (-> tuning scale-rand-hi))) + (set! (-> tuning-scale z) (rand-vu-float-range (-> tuning scale-rand-lo) (-> tuning scale-rand-hi))) + (set! (-> tuning-scale w) 1.0) + (.lvf vf4 (&-> s0-1 quad)) + ) + (.lvf vf5 (&-> tuning-scale quad)) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> debris-scale quad) vf6) + (case (-> tuning explosion) + ((1) + (vector-! (-> debris transv) (the-as vector (-> debris root)) (-> tuning fountain-rand-transv-lo)) + (let ((s0-2 vector-normalize!)) + (set! sv-80 (-> debris transv)) + (let ((a1-17 (rand-vu-float-range (-> tuning fountain-rand-transv-hi x) (-> tuning fountain-rand-transv-hi y)))) + (s0-2 sv-80 a1-17) + ) + ) + (+! (-> debris transv y) + (rand-vu-float-range (-> tuning fountain-rand-transv-hi z) (-> tuning fountain-rand-transv-hi w)) + ) + (set! (-> debris transv w) 1.0) + ) + (else + (set! sv-96 (-> tuning fountain-rand-transv-lo)) + (set! sv-112 (-> tuning fountain-rand-transv-hi)) + (set-vector! + (-> debris transv) + (rand-vu-float-range (-> sv-96 x) (-> sv-112 x)) + (rand-vu-float-range (-> sv-96 y) (-> sv-112 y)) + (rand-vu-float-range (-> sv-96 z) (-> sv-112 z)) + 1.0 + ) + ) + ) + (let ((s0-5 (new 'stack-no-clear 'vector))) + (rand-vu-sphere-point-uniform! s0-5 1.0) + (vector-normalize! s0-5 1.0) + (set! (-> debris rot-axis quad) (-> s0-5 quad)) + ) + (set! (-> debris rot-angle) (* 182.04445 (-> tuning rot-speed))) + (set! (-> debris duration) (the float (-> tuning duration))) + (set! (-> debris hit-xz-reaction) (-> tuning hit-xz-reaction)) + (set! (-> debris hit-y-reaction) (-> tuning hit-y-reaction)) + (set! (-> debris gravity) (-> tuning gravity)) + (set! (-> debris time-fade-out) 0) + (let ((draw (skeleton-group->draw-control + (the-as process-drawable self) + (the-as skeleton-group skel) + (&-> debris node-list) + ) + ) + ) + (set! (-> debris draw) draw) + (set! (-> draw skeleton bones 0 transform trans quad) (-> *null-vector* quad)) + ) + ) + (else + ) + ) + ) + ) + (set! (-> self max-probe-width) (-> tuning max-probe-width)) + (set! (-> self num-boxes) (the-as uint 1)) + (set! (-> self boxes 0 start) (the-as uint 0)) + (set! (-> self boxes 0 num) (the-as uint (-> self debris-num))) + (go-virtual idle) + ) + ) + +;; definition for function debris-spawn +;; WARN: Return type mismatch (pointer process) vs (pointer debris-group). +(defun debris-spawn ((arg0 process-drawable) (arg1 debris-tuning) (arg2 debris-static-params) (arg3 process-drawable)) + (if (not arg3) + (set! arg3 arg0) + ) + (process-spawn debris-group arg1 arg2 arg3 :name "debris-group" :to arg0 :stack-size #x8000) + ) + +;; failed to figure out what this is: +(defskelgroup skel-kg-debris-a kg-debris kg-debris-a-lod0-jg -1 + ((kg-debris-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-kg-debris-b kg-debris kg-debris-b-lod0-jg -1 + ((kg-debris-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-kg-debris-c kg-debris kg-debris-c-lod0-jg -1 + ((kg-debris-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-kg-debris-d kg-debris kg-debris-d-lod0-jg -1 + ((kg-debris-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-neo-debris-a neo-debris neo-debris-a-lod0-jg -1 + ((neo-debris-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-neo-debris-b neo-debris neo-debris-b-lod0-jg -1 + ((neo-debris-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-neo-debris-c neo-debris neo-debris-c-lod0-jg -1 + ((neo-debris-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-neo-debris-d neo-debris neo-debris-d-lod0-jg -1 + ((neo-debris-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-marauder-debris-ring interceptor interceptor-debris-ring-lod0-jg -1 + ((interceptor-debris-ring-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-marauder-debris-nut interceptor interceptor-debris-nut-lod0-jg -1 + ((interceptor-debris-nut-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-marauder-debris-rod interceptor interceptor-debris-rod-lod0-jg -1 + ((interceptor-debris-rod-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-marauder-debris-panel interceptor interceptor-debris-panel-lod0-jg -1 + ((interceptor-debris-panel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-dm-debris-a dm-debris dm-debris-a-lod0-jg -1 + ((dm-debris-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-dm-debris-b dm-debris dm-debris-b-lod0-jg -1 + ((dm-debris-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-dm-debris-c dm-debris dm-debris-c-lod0-jg -1 + ((dm-debris-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-dm-debris-d dm-debris dm-debris-d-lod0-jg -1 + ((dm-debris-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/common-obs/elevator_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/elevator_REF.gc new file mode 100644 index 0000000000..0dd1841a15 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/elevator_REF.gc @@ -0,0 +1,1028 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type elevator-params +(deftype elevator-params (structure) + ((xz-threshold float) + (y-threshold float) + (start-pos float) + (move-rate float) + (flags elevator-flags) + ) + ) + +;; definition for method 3 of type elevator-params +(defmethod inspect ((this elevator-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'elevator-params) + (format #t "~1Txz-threshold: ~f~%" (-> this xz-threshold)) + (format #t "~1Ty-threshold: ~f~%" (-> this y-threshold)) + (format #t "~1Tstart-pos: ~f~%" (-> this start-pos)) + (format #t "~1Tmove-rate: ~f~%" (-> this move-rate)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (label cfg-4) + this + ) + +;; definition of type path-step +(deftype path-step (structure) + ((next-pos float) + (dist float) + ) + ) + +;; definition for method 3 of type path-step +(defmethod inspect ((this path-step)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'path-step) + (format #t "~1Tnext-pos: ~f~%" (-> this next-pos)) + (format #t "~1Tdist: ~f~%" (-> this dist)) + (label cfg-4) + this + ) + +;; definition of type path-step-inline-array +(deftype path-step-inline-array (inline-array-class) + ((data path-step :inline :dynamic) + ) + ) + +;; definition for method 3 of type path-step-inline-array +(defmethod inspect ((this path-step-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! (-> path-step-inline-array heap-base) (the-as uint 16)) + +;; definition of type elevator +(deftype elevator (base-plat) + ((params elevator-params :inline) + (path-seq path-step-inline-array) + (path-dest float) + (bottom-top float 2) + (move-pos float 2) + (move-dist float) + (path-pos float) + (path-eased-pos float) + (ride-timer time-frame) + (sticky-player-last-ride-time time-frame) + (elevator-status elevator-status) + (on-activate pair) + (on-deactivate pair) + (on-up pair) + (on-down pair) + (on-running pair) + (on-notice pair) + (on-wait pair) + (sound-id sound-id) + (sound-running-loop sound-spec) + (sound-arrived sound-spec) + (fence-prim-index uint32) + (speed float) + (sound-start sound-spec) + (activate-test pair) + ) + (:state-methods + dormant + waiting + running + arrived + unknown + die + ) + (:methods + (calc-dist-between-points! (_type_ int int) none) + (go-arrived-or-waiting (_type_) none) + (init-params! (_type_) none) + (init-sound! (_type_) none) + (point-inside-shaft? (_type_ vector float float) symbol) + (elevator-method-46 (_type_) object) + (elevator-method-47 (_type_) symbol) + (elevator-method-48 (_type_) none) + (find-closest-point-in-path! (_type_ vector (pointer float) symbol symbol) symbol) + (elevator-method-50 (_type_) none) + (toggle-fence-collision (_type_ symbol) none) + ) + ) + +;; definition for method 3 of type elevator +(defmethod inspect ((this elevator)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type base-plat inspect))) + (t9-0 this) + ) + (format #t "~2Tparams: #~%" (-> this params)) + (format #t "~2Tpath-seq: ~A~%" (-> this path-seq)) + (format #t "~2Tpath-dest: ~f~%" (-> this path-dest)) + (format #t "~2Tbottom-top[2] @ #x~X~%" (-> this bottom-top)) + (format #t "~2Tmove-pos[2] @ #x~X~%" (-> this move-pos)) + (format #t "~2Tmove-dist: ~f~%" (-> this move-dist)) + (format #t "~2Tpath-pos: ~f~%" (-> this path-pos)) + (format #t "~2Tpath-eased-pos: ~f~%" (-> this path-eased-pos)) + (format #t "~2Tride-timer: ~D~%" (-> this ride-timer)) + (format #t "~2Tsticky-player-last-ride-time: ~D~%" (-> this sticky-player-last-ride-time)) + (format #t "~2Televator-status: ~D~%" (-> this elevator-status)) + (format #t "~2Ton-activate: ~A~%" (-> this on-activate)) + (format #t "~2Ton-deactivate: ~A~%" (-> this on-deactivate)) + (format #t "~2Ton-up: ~A~%" (-> this on-up)) + (format #t "~2Ton-down: ~A~%" (-> this on-down)) + (format #t "~2Ton-running: ~A~%" (-> this on-running)) + (format #t "~2Ton-notice: ~A~%" (-> this on-notice)) + (format #t "~2Ton-wait: ~A~%" (-> this on-wait)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Tsound-running-loop: ~A~%" (-> this sound-running-loop)) + (format #t "~2Tsound-arrived: ~A~%" (-> this sound-arrived)) + (format #t "~2Tfence-prim-index: ~D~%" (-> this fence-prim-index)) + (format #t "~2Tspeed: ~f~%" (-> this speed)) + (format #t "~2Tsound-start: ~A~%" (-> this sound-start)) + (format #t "~2Tactivate-test: ~A~%" (-> this activate-test)) + (label cfg-4) + this + ) + +;; definition for method 45 of type elevator +(defmethod point-inside-shaft? ((this elevator) (arg0 vector) (arg1 float) (arg2 float)) + #f + ) + +;; definition for method 50 of type elevator +;; INFO: Used lq/sq +(defmethod elevator-method-50 ((this elevator)) + (let ((gp-0 *target*)) + (when gp-0 + (let ((s4-0 (-> gp-0 control collision-spheres 0)) + (s5-0 (new 'stack-no-clear 'collide-query)) + ) + (set! (-> s5-0 start-pos quad) (-> s4-0 prim-core world-sphere quad)) + (+! (-> s5-0 start-pos y) 8192.0) + (set! (-> s5-0 start-pos w) 1.0) + (vector-reset! (-> s5-0 move-dist)) + (set! (-> s5-0 move-dist y) -90112.0) + (let ((v1-6 s5-0)) + (set! (-> v1-6 radius) (-> s4-0 local-sphere w)) + (set! (-> v1-6 collide-with) (collide-spec hit-by-others-list pusher)) + (set! (-> v1-6 ignore-process0) gp-0) + (set! (-> v1-6 ignore-process1) #f) + (set! (-> v1-6 ignore-pat) (-> gp-0 control pat-ignore-mask)) + (set! (-> v1-6 action-mask) (collide-action solid)) + ) + (let ((f0-5 (fill-and-probe-using-line-sphere *collide-cache* s5-0))) + (when (< 0.0 f0-5) + (vector-float*! (-> s5-0 move-dist) (-> s5-0 move-dist) f0-5) + (vector+! (-> s5-0 move-dist) (-> s5-0 move-dist) (-> s5-0 start-pos)) + (vector-! (-> s5-0 move-dist) (-> s5-0 move-dist) (the-as vector (-> s4-0 prim-core))) + (move-by-vector! (-> gp-0 control) (-> s5-0 move-dist)) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 51 of type elevator +(defmethod toggle-fence-collision ((this elevator) (arg0 symbol)) + (when (and (logtest? (-> this params flags) (elevator-flags fence)) (nonzero? (-> this fence-prim-index))) + (let ((v1-7 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child (-> this fence-prim-index)))) + (cond + (arg0 + (set! (-> v1-7 prim-core collide-as) (collide-spec obstacle pusher)) + (set! (-> v1-7 prim-core collide-with) (collide-spec jak player-list)) + (set-setting! 'jump #f 0.0 0) + ) + (else + (set! (-> v1-7 prim-core collide-as) (collide-spec)) + (set! (-> v1-7 prim-core collide-with) (collide-spec)) + (remove-setting! 'jump) + ) + ) + ) + ) + (none) + ) + +;; definition for method 10 of type elevator +(defmethod deactivate ((this elevator)) + "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 43 of type elevator +;; WARN: Return type mismatch int vs none. +(defmethod init-params! ((this elevator)) + (set! (-> this params xz-threshold) (res-lump-float (-> this entity) 'elevator-xz-threshold :default 81920.0)) + (set! (-> this params y-threshold) (res-lump-float (-> this entity) 'elevator-y-threshold :default 20480.0)) + (set! (-> this params start-pos) (res-lump-float (-> this entity) 'elevator-start-pos)) + (set! (-> this params move-rate) (res-lump-float (-> this entity) 'elevator-move-rate :default 25600.0)) + (set! (-> this params flags) (res-lump-value + (-> this entity) + 'elevator-flags + elevator-flags + :default (the-as uint128 1) + :time -1000000000.0 + ) + ) + 0 + (none) + ) + +;; definition for function ease-value-in-out +(defun ease-value-in-out ((arg0 float) (arg1 float)) + (let* ((f0-0 arg1) + (f4-0 (- 1.0 arg1)) + (f3-0 (/ f0-0 (- 1.0 f4-0))) + (f2-1 (* f0-0 f0-0)) + (f1-6 (+ (* 2.0 f0-0 (- f4-0 f0-0)) f2-1)) + (f1-7 (+ (* (- 1.0 f4-0) (- 1.0 f4-0) f3-0) f1-6)) + ) + (/ (cond + ((< arg0 f0-0) + (* arg0 arg0) + ) + ((< arg0 f4-0) + (+ (* 2.0 f0-0 (- arg0 f0-0)) f2-1) + ) + (else + (let ((f0-7 (- 1.0 arg0))) + (- f1-7 (* f0-7 f0-7 f3-0)) + ) + ) + ) + f1-7 + ) + ) + ) + +;; definition for function elevator-event +;; WARN: disable def twice: 11. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defbehavior elevator-event elevator ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('status?) + (and (= (the float (/ (the-as int (-> arg3 param 0)) 8)) (-> self move-pos 0)) + (= (the float (/ (the-as int (-> arg3 param 1)) 8)) (-> self move-pos 1)) + ) + ) + (('ridden) + (let ((v1-8 (handle->process (-> (the-as focus (-> arg3 param 0)) handle)))) + (if (= (-> v1-8 type) target) + (set-time! (-> self sticky-player-last-ride-time)) + ) + ) + #t + ) + (('use-camera) + (if (-> arg3 param 0) + (set-setting! 'entity-name (-> arg3 param 0) 0.0 0) + (remove-setting! 'entity-name) + ) + ) + (('move-to) + (when (and (-> self next-state) (let ((v1-20 (-> self next-state name))) + (or (= v1-20 'waiting) (= v1-20 'arrived)) + ) + ) + (set! (-> self move-pos 0) (-> self move-pos 1)) + (cond + ((not (logtest? (-> arg3 param 0) 7)) + (let ((gp-0 (-> arg3 param 0))) + (set! (-> self move-pos 1) (the-as float (if (type? gp-0 float) + (the-as float gp-0) + ) + ) + ) + ) + ) + (else + (case (-> arg3 param 0) + (('quote 'bottom) + (set! (-> self move-pos 1) (-> self bottom-top 0)) + ) + (('quote 'top) + (set! (-> self move-pos 1) (-> self bottom-top 1)) + ) + ) + ) + ) + (go-virtual running) + ) + ) + (('jump-to) + (cond + ((not (logtest? (-> arg3 param 0) 7)) + (let ((gp-1 (-> arg3 param 0))) + (set! (-> self move-pos 1) (the-as float (if (type? gp-1 float) + (the-as float gp-1) + ) + ) + ) + ) + ) + (else + (case (-> arg3 param 0) + (('quote 'bottom) + (set! (-> self move-pos 1) (-> self bottom-top 0)) + ) + (('quote 'top) + (set! (-> self move-pos 1) (-> self bottom-top 1)) + ) + ) + ) + ) + (set! (-> self move-pos 0) (-> self move-pos 1)) + (get-point-in-path! (-> self path) (-> self basetrans) (-> self move-pos 0) 'interp) + (go-virtual waiting) + ) + (('trigger) + (when (and (-> self next-state) (let ((v1-48 (-> self next-state name))) + (or (= v1-48 'waiting) (= v1-48 'arrived)) + ) + ) + (set! (-> self move-pos 0) (-> self move-pos 1)) + (cond + ((= (-> self move-pos 0) (-> self bottom-top 0)) + (set! (-> self move-pos 1) (-> self bottom-top 1)) + ) + ((= (-> self move-pos 0) (-> self bottom-top 1)) + (set! (-> self move-pos 1) (-> self bottom-top 0)) + ) + ) + (go-virtual running) + ) + ) + (('query) + (case (-> arg3 param 0) + (('waiting?) + (and (-> self next-state) (= (-> self next-state name) 'waiting)) + ) + (('arrived?) + (and (-> self next-state) (let ((v1-61 (-> self next-state name))) + (or (= v1-61 'arrived) (= v1-61 'waiting)) + ) + ) + ) + (('running?) + (and (-> self next-state) (= (-> self next-state name) 'running)) + ) + (('path-pos?) + (+ (-> self move-pos 0) (* (-> self path-pos) (- (-> self move-pos 1) (-> self move-pos 0)))) + ) + (('player-standing-on?) + (= (-> self sticky-player-last-ride-time) (current-time)) + ) + (('point-inside-shaft?) + (point-inside-shaft? self (the-as vector (-> arg3 param 1)) (-> self bottom-top 1) (-> self bottom-top 0)) + ) + (('going-down?) + (< (-> (get-point-in-path! (-> self path) (new 'stack-no-clear 'vector) (-> self move-pos 1) 'interp) y) + (-> (get-point-in-path! (-> self path) (new 'stack-no-clear 'vector) (-> self move-pos 0) 'interp) y) + ) + ) + (('going-up?) + (< (-> (get-point-in-path! (-> self path) (new 'stack-no-clear 'vector) (-> self move-pos 0) 'interp) y) + (-> (get-point-in-path! (-> self path) (new 'stack-no-clear 'vector) (-> self move-pos 1) 'interp) y) + ) + ) + (('bottom?) + (= (-> self move-pos 1) (-> self bottom-top 0)) + ) + (('top?) + (= (-> self move-pos 1) (-> self bottom-top 1)) + ) + ) + ) + (('reset) + (go-virtual die) + ) + (('go-dormant) + (go-virtual dormant) + ) + (('set-path-pos) + (set! (-> self path-pos) (the-as float (-> arg3 param 0))) + ) + (else + (plat-event arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 49 of type elevator +;; INFO: Used lq/sq +(defmethod find-closest-point-in-path! ((this elevator) (arg0 vector) (arg1 (pointer float)) (arg2 symbol) (arg3 symbol)) + (local-vars (sv-32 vector)) + (let ((s1-0 (-> this params)) + (f28-0 0.0) + (f30-0 -1.0) + ) + (dotimes (s0-0 (-> this path curve num-cverts)) + (set! sv-32 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) (the float s0-0) 'interp)) + (when (and (or (not arg2) (< (vector-vector-xz-distance sv-32 arg0) (-> s1-0 xz-threshold))) + (or (not arg3) + (< (fabs (- (-> sv-32 y) (-> arg0 y))) (-> s1-0 y-threshold)) + (and (= s0-0 (the int (-> this bottom-top 0))) (< (-> arg0 y) (-> sv-32 y))) + (and (= s0-0 (the int (-> this bottom-top 1))) (< (-> sv-32 y) (-> arg0 y))) + ) + ) + (let* ((t9-2 vector-vector-distance) + (a1-3 arg0) + (f0-12 (t9-2 sv-32 a1-3)) + ) + (when (or (= f30-0 -1.0) (< f0-12 f28-0)) + (set! f28-0 f0-12) + (set! f30-0 (the float s0-0)) + ) + ) + ) + ) + (when (!= f30-0 -1.0) + (set! (-> arg1 0) f30-0) + #t + ) + ) + ) + +;; definition for method 46 of type elevator +(defmethod elevator-method-46 ((this elevator)) + (let* ((s5-0 *target*) + (a0-2 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (and a0-2 (point-inside-shaft? this (get-trans a0-2 0) (-> this move-pos 0) (-> this move-pos 1))) + ) + ) + +;; definition for method 47 of type elevator +(defmethod elevator-method-47 ((this elevator)) + #t + ) + +;; definition for method 48 of type elevator +;; WARN: Return type mismatch int vs none. +(defmethod elevator-method-48 ((this elevator)) + (local-vars (sv-16 float)) + (let ((a0-1 *target*)) + (when (and a0-1 + (not (logtest? (focus-status dead inactive in-air grabbed edge-grab pole pilot-riding pilot teleporting) + (-> a0-1 focus-status) + ) + ) + ) + (set! sv-16 (the-as float 0.0)) + (when (and (find-closest-point-in-path! this (get-trans a0-1 0) (& sv-16) #t #t) (!= (-> this move-pos 1) sv-16)) + (set! (-> this move-pos 0) (-> this move-pos 1)) + (set! (-> this move-pos 1) sv-16) + (logior! (-> this elevator-status) (elevator-status moving)) + (go (method-of-object this running)) + ) + ) + ) + 0 + (none) + ) + +;; definition for function move-post +(defbehavior move-post elevator () + (when (nonzero? (-> self sound)) + (let ((f0-3 (sqrtf (sin-rad (* 3.1415925 (-> self path-pos)))))) + (update-vol! (-> self sound) f0-3) + ) + (update-trans! (-> self sound) (-> self root trans)) + (update! (-> self sound)) + ) + (plat-post) + (none) + ) + +;; definition for function teleport-check +;; WARN: Return type mismatch vector vs none. +(defbehavior teleport-check elevator () + (local-vars (sv-16 float)) + (when (and *target* (logtest? (-> self params flags) (elevator-flags teleport)) (focus-test? *target* teleporting)) + (set! sv-16 (the-as float 0.0)) + (when (find-closest-point-in-path! self (target-pos 0) (& sv-16) #f #t) + (set! (-> self move-pos 0) sv-16) + (set! (-> self move-pos 1) sv-16) + (get-point-in-path! (-> self path) (-> self basetrans) sv-16 'interp) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate dormant (elevator) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual waiting) + ) + (('bonk) + #f + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :trans plat-trans + :code sleep-code + :post plat-post + ) + +;; failed to figure out what this is: +(defstate waiting (elevator) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (if (elevator-method-47 self) + (logior! (-> self elevator-status) (elevator-status waiting-to-descend)) + ) + (elevator-event proc argc message block) + ) + (else + (elevator-event proc argc message block) + ) + ) + ) + :enter (behavior () + (if (logtest? (-> self params flags) (elevator-flags dormant)) + (go-virtual dormant) + ) + (set-time! (-> self ride-timer)) + (logclear! (-> self elevator-status) (elevator-status waiting-to-descend moving)) + (logior! (-> self mask) (process-mask actor-pause)) + (if (nonzero? (-> self sound)) + (update-vol! (-> self sound) 0.0) + ) + (let ((gp-0 (-> self on-notice))) + (if gp-0 + (script-eval gp-0 :key (* (the int (-> self move-pos 0)) 8) :vector (-> self root trans)) + ) + ) + ) + :trans (behavior () + (teleport-check) + (plat-trans) + (when (not (logtest? (-> self elevator-status) (elevator-status waiting-to-descend))) + (set-time! (-> self ride-timer)) + (-> self params) + (if (and (logtest? (-> self params flags) (elevator-flags running)) + (not (logtest? (-> self params flags) (elevator-flags ef3))) + ) + (elevator-method-48 self) + ) + ) + (when (and (not (logtest? (-> self params flags) (elevator-flags ef3))) + (time-elapsed? (-> self ride-timer) (seconds 1)) + (or (not (-> self activate-test)) + (script-eval (-> self activate-test) :key (* (the int (-> self move-pos 0)) 8) :vector (-> self root trans)) + ) + ) + (set! (-> self move-pos 0) (-> self move-pos 1)) + (set! (-> self move-pos 1) (-> self path-seq data (the int (-> self move-pos 1)) next-pos)) + (go-virtual running) + ) + (let ((gp-0 (-> self on-wait))) + (if gp-0 + (script-eval gp-0 :key (* (the int (-> self move-pos 0)) 8) :vector (-> self root trans)) + ) + ) + ) + :code sleep-code + :post (behavior () + (logclear! (-> self elevator-status) (elevator-status waiting-to-descend)) + (debug-draw (-> self path)) + (plat-post) + ) + ) + +;; failed to figure out what this is: +(defstate running (elevator) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('running?) + #t + ) + (('player-ridden?) + (logtest? (-> self elevator-status) (elevator-status waiting-to-descend)) + ) + (else + (elevator-event proc argc message block) + ) + ) + ) + :enter (behavior () + (if (not (logtest? (-> self params flags) (elevator-flags ef7))) + (process-entity-status! self (entity-perm-status no-kill) #t) + ) + (logclear! (-> self elevator-status) (elevator-status waiting-to-ascend)) + (when (logtest? (-> self params flags) (elevator-flags waiting)) + (logclear! (-> self params flags) (elevator-flags waiting)) + (logior! (-> self params flags) (elevator-flags running)) + ) + (set! (-> self move-dist) 0.0) + (let ((v1-13 (the int (-> self move-pos 0))) + (a0-3 (the int (-> self move-pos 1))) + (a1-1 0) + ) + (while (let ((a2-3 (abs (- a0-3 v1-13)))) + (< a1-1 a2-3) + ) + (+! (-> self move-dist) (-> self path-seq data (+ (min v1-13 a0-3) a1-1) dist)) + (+! a1-1 1) + ) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self path-pos) 0.0) + (if (nonzero? (-> self sound)) + (update-vol! (-> self sound) 0.0) + ) + (if (-> self sound-start) + (sound-play-by-spec (-> self sound-start) (new-sound-id) (the-as vector #t)) + ) + (when (logtest? (-> self params flags) (elevator-flags prevent-jump)) + (set-setting! 'jump #f 0.0 0) + (apply-settings *setting-control*) + ) + (when (logtest? (-> self elevator-status) (elevator-status waiting-to-descend)) + (set-setting! 'board #f 0.0 0) + (set-setting! 'lightjak #f 0.0 0) + (toggle-fence-collision self #t) + (if (logtest? (-> self params flags) (elevator-flags grab)) + (process-grab? *target* #f) + ) + ) + (let ((gp-1 (-> self on-activate))) + (if gp-1 + (script-eval gp-1 :key (* (the int (-> self move-pos 0)) 8) :vector (-> self root trans)) + ) + ) + ) + :exit (behavior () + (if (not (logtest? (-> self params flags) (elevator-flags ef7))) + (process-entity-status! self (entity-perm-status no-kill) #f) + ) + (remove-setting! 'board) + (remove-setting! 'jump) + (remove-setting! 'lightjak) + (set! (-> self speed) 0.0) + ) + :trans (behavior () + (teleport-check) + (if (and (not (logtest? (-> self elevator-status) (elevator-status waiting-to-ascend))) + (= (-> self path-pos) 1.0) + ) + (go-virtual arrived) + ) + (if (elevator-method-46 self) + (set! (-> self path-dest) 0.0) + (set! (-> self path-dest) 1.0) + ) + (if (and (logtest? (-> self params flags) (elevator-flags grab)) + (and *target* (not (logtest? (-> *target* focus-status) (focus-status grabbed)))) + ) + (process-grab? *target* #f) + ) + (if (and (logtest? (-> self elevator-status) (elevator-status waiting-to-descend)) *target*) + (process-drawable-cloth-command *target* '(set-flags local-space-y)) + ) + (if (>= (+ (current-time) (seconds -1)) (-> self sticky-player-last-ride-time)) + (remove-setting! 'board) + (set-setting! 'board #f 0.0 0) + ) + (if (logtest? (-> self params flags) (elevator-flags prevent-jump)) + (elevator-method-50 self) + ) + (let ((gp-0 (-> self on-running))) + (if gp-0 + (script-eval gp-0 :key (* (the int (-> self move-pos 0)) 8) :vector (-> self root trans)) + ) + ) + (plat-trans) + ) + :code (behavior () + (logior! (-> self elevator-status) (elevator-status waiting-to-ascend)) + (suspend) + (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) 'query) + (set! (-> a1-0 param 0) (the-as uint 'player-standing-on?)) + (cond + ((and (send-event-function self 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) 'query) + (set! (-> a1-1 param 0) (the-as uint 'going-up?)) + (and (send-event-function self a1-1) (logtest? (-> self params flags) (elevator-flags fence))) + ) + ) + (let ((gp-0 (-> self on-up))) + (if gp-0 + (script-eval gp-0 :key (* (the int (-> self move-pos 0)) 8) :vector (-> self root trans)) + ) + ) + ) + ((let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer self)) + (set! (-> a1-4 num-params) 1) + (set! (-> a1-4 message) 'query) + (set! (-> a1-4 param 0) (the-as uint 'player-standing-on?)) + (and (send-event-function self a1-4) + (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) 'query) + (set! (-> a1-5 param 0) (the-as uint 'going-down?)) + (and (send-event-function self a1-5) (logtest? (-> self params flags) (elevator-flags fence))) + ) + ) + ) + (let ((gp-1 (-> self on-down))) + (if gp-1 + (script-eval gp-1 :key (* (the int (-> self move-pos 0)) 8) :vector (-> self root trans)) + ) + ) + ) + ) + ) + (until #f + (suspend) + (if (= (-> self path-pos) 1.0) + (logclear! (-> self elevator-status) (elevator-status waiting-to-ascend)) + ) + ) + #f + ) + :post (behavior () + (when (logtest? (-> self elevator-status) (elevator-status waiting-to-ascend)) + (seek! + (-> self path-pos) + (-> self path-dest) + (* (/ (-> self params move-rate) (-> self move-dist)) (seconds-per-frame)) + ) + (let* ((f30-0 (-> self move-pos 0)) + (f28-0 (-> self move-pos 1)) + (f0-9 (+ f30-0 (* (ease-value-in-out (-> self path-pos) 0.08) (- f28-0 f30-0)))) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> gp-0 quad) (-> self basetrans quad)) + (get-point-in-path! (-> self path) (-> self basetrans) f0-9 'interp) + (set! (-> self speed) (* (- (-> self basetrans y) (-> gp-0 y)) (-> self clock frames-per-second))) + ) + (if (-> self sound-running-loop) + (sound-play-by-spec (-> self sound-running-loop) (-> self sound-id) (-> self root trans)) + ) + ) + (move-post) + ) + ) + +;; failed to figure out what this is: +(defstate arrived (elevator) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (set-time! (-> self ride-timer)) + (elevator-event proc argc message block) + ) + (else + (elevator-event proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self ride-timer)) + (if (not (-> *setting-control* user-current jump)) + (remove-setting! 'jump) + ) + (sound-stop (-> self sound-id)) + (if (-> self sound-arrived) + (sound-play-by-spec (-> self sound-arrived) (new-sound-id) (the-as vector #t)) + ) + (when (logtest? (-> self elevator-status) (elevator-status waiting-to-descend)) + (toggle-fence-collision self #f) + (if (and (logtest? (-> self params flags) (elevator-flags grab)) *target* (focus-test? *target* grabbed)) + (process-release? *target*) + ) + ) + (let ((gp-1 (-> self on-deactivate))) + (if gp-1 + (script-eval gp-1 :key (* (the int (-> self move-pos 1)) 8) :vector (-> self root trans)) + ) + ) + ) + :trans (behavior () + (teleport-check) + (if (and (< (- (-> self ride-timer) (-> self sticky-player-last-ride-time)) (seconds 2)) + (begin *target* *target*) + (focus-test? *target* in-air) + ) + (set-time! (-> self ride-timer)) + ) + (if (and (logtest? (-> self params flags) (elevator-flags grab)) *target* (focus-test? *target* grabbed)) + (process-release? *target*) + ) + (when (or (logtest? (-> self elevator-status) (elevator-status moving)) + (time-elapsed? (-> self ride-timer) (seconds 0.5)) + ) + (cond + ((and (logtest? (-> self params flags) (elevator-flags ef1)) + (!= (-> self move-pos 1) (-> self params start-pos)) + ) + (set! (-> self move-pos 0) (-> self move-pos 1)) + (set! (-> self move-pos 1) (-> self params start-pos)) + (go-virtual running) + ) + (else + (go-virtual waiting) + ) + ) + ) + (plat-trans) + ) + :code sleep-code + :post plat-post + ) + +;; failed to figure out what this is: +(defstate die (elevator) + :virtual #t + :event (the-as (function process int symbol event-message-block object) eco-door-event-handler) + :code (behavior () + '() + ) + ) + +;; definition for method 41 of type elevator +;; WARN: Return type mismatch int vs none. +(defmethod calc-dist-between-points! ((this elevator) (arg0 int) (arg1 int)) + (set! (-> this path-seq data arg0 next-pos) (the float arg1)) + (let ((s3-0 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) (the float arg0) 'interp)) + (a1-3 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) (the float arg1) 'interp)) + ) + (set! (-> this path-seq data arg0 dist) (vector-vector-distance s3-0 a1-3)) + ) + 0 + (none) + ) + +;; definition for method 44 of type elevator +;; WARN: Return type mismatch int vs none. +(defmethod init-sound! ((this elevator)) + (set! (-> this sound) (the-as ambient-sound 0)) + (if (-> this sound-running-loop) + (set! (-> this sound-id) (new-sound-id)) + ) + 0 + (none) + ) + +;; definition for method 34 of type elevator +;; WARN: Return type mismatch int vs none. +(defmethod base-plat-method-34 ((this elevator)) + 0 + (none) + ) + +;; definition for method 7 of type elevator +(defmethod relocate ((this elevator) (offset int)) + (if (nonzero? (-> this path-seq)) + (&+! (-> this path-seq) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 42 of type elevator +;; WARN: Return type mismatch object vs none. +(defmethod go-arrived-or-waiting ((this elevator)) + (if (logtest? (-> this params flags) (elevator-flags arrived)) + (go (method-of-object this arrived)) + (go (method-of-object this waiting)) + ) + (none) + ) + +;; definition for method 11 of type elevator +;; WARN: Return type mismatch none vs object. +;; INFO: Process stack size was changed from 512 to 1024 +(defmethod init-from-entity! ((this elevator) (arg0 entity-actor)) + (local-vars (sv-32 float) (sv-36 path-control) (sv-40 target)) + (stack-size-set! (-> this main-thread) 1024) + (set! (-> this sound-running-loop) #f) + (set! (-> this sound-arrived) #f) + (set! (-> this sound-start) #f) + (init-params! this) + (init-collision! this) + (when (type? (-> this root root-prim) collide-shape-prim-group) + (let ((v1-9 (-> this root root-prim))) + (dotimes (a0-5 (the-as int (-> v1-9 specific 0))) + (when (= (-> (the-as collide-shape-prim-group v1-9) child a0-5 prim-id) (shl #xfe00 16)) + (set! (-> this fence-prim-index) (the-as uint a0-5)) + (toggle-fence-collision this #f) + #t + (goto cfg-8) + ) + ) + ) + ) + (label cfg-8) + (process-drawable-from-entity! this arg0) + (initialize-skeleton this (the-as skeleton-group (get-art-group this)) (the-as pair 0)) + (init-bounce-params! this) + (set! (-> this elevator-status) (elevator-status)) + (update-transforms (-> this root)) + (base-plat-method-33 this) + (set! (-> this on-activate) (res-lump-struct (-> this entity) 'on-activate pair)) + (set! (-> this on-deactivate) (res-lump-struct (-> this entity) 'on-deactivate pair)) + (set! (-> this on-up) (res-lump-struct (-> this entity) 'on-up pair)) + (set! (-> this on-down) (res-lump-struct (-> this entity) 'on-down pair)) + (set! (-> this on-running) (res-lump-struct (-> this entity) 'on-running pair)) + (set! (-> this on-notice) (res-lump-struct (-> this entity) 'on-notice pair)) + (set! (-> this on-wait) (res-lump-struct (-> this entity) 'on-wait pair)) + (set! (-> this activate-test) (res-lump-struct (-> this entity) 'activate-test pair)) + (set! (-> this path) (new 'process 'path-control this 'path 0.0 arg0 #f)) + (when (logtest? (-> this path flags) (path-control-flag not-found)) + (if (logtest? (-> this params flags) (elevator-flags dormant)) + (go (method-of-object this dormant)) + ) + (go process-drawable-art-error "error in path") + ) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (let ((s5-1 (-> this path curve num-cverts)) + (s4-1 0) + (f30-0 0.0) + (f28-0 0.0) + ) + (set! (-> this path-seq) (new 'process 'path-step-inline-array s5-1)) + (dotimes (s3-1 s5-1) + (calc-dist-between-points! this s3-1 (mod (+ s3-1 1) s5-1)) + (let ((v1-55 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) (the float s3-1) 'interp))) + (when (or (not (logtest? s4-1 1)) (< (-> v1-55 y) f28-0)) + (set! (-> this bottom-top 0) (the float s3-1)) + (set! f28-0 (-> v1-55 y)) + (set! s4-1 (logior s4-1 1)) + ) + (when (or (not (logtest? s4-1 2)) (< f30-0 (-> v1-55 y))) + (set! (-> this bottom-top 1) (the float s3-1)) + (set! f30-0 (-> v1-55 y)) + (set! s4-1 (logior s4-1 2)) + ) + ) + ) + ) + (set! sv-32 (the-as float 0.0)) + (set! sv-36 (-> this path)) + (let ((s5-2 *target*)) + (set! sv-40 (if (type? s5-2 process-focusable) + s5-2 + ) + ) + ) + (if (not (and sv-40 + (logtest? (-> this params flags) (elevator-flags teleport)) + (find-closest-point-in-path! this (get-trans sv-40 0) (& sv-32) #f #t) + ) + ) + (set! sv-32 (-> this params start-pos)) + ) + (set! (-> this move-pos 0) sv-32) + (set! (-> this move-pos 1) sv-32) + (get-point-in-path! sv-36 (-> this basetrans) sv-32 'interp) + (set! (-> this root pause-adjust-distance) + (+ 122880.0 (-> this params xz-threshold) (total-distance (-> this path))) + ) + (base-plat-method-34 this) + (init-sound! this) + (go-arrived-or-waiting this) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/common-obs/enemy-part_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/enemy-part_REF.gc new file mode 100644 index 0000000000..540c8b89db --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/enemy-part_REF.gc @@ -0,0 +1,407 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-kg-huge-explosion + :id 217 + :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 (4.0 4.0 4.0) + :parts ((sp-item 883 :flags (sp6 sp7) :period (seconds 3) :length (seconds 0.017)) + (sp-item 884 :flags (sp6 sp7) :period (seconds 3) :length (seconds 0.017)) + (sp-item 885 :flags (sp7) :period (seconds 3) :length (seconds 0.05)) + (sp-item 886 :fade-after (meters 60) :flags (sp7) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 887 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 888 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 889 :fade-after (meters 150) :falloff-to (meters 150) :flags (sp7) :period (seconds 3) :length (seconds 0.067) :offset 30) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-kg-big-explosion + :id 218 + :duration (seconds 2) + :linger-duration (seconds 1) + :flags (sp0 sp5 sp6) + :bounds (static-bspherem 0 0 0 15) + :rotate ((degrees 0) (degrees 90) (degrees 0)) + :parts ((sp-item 883 :flags (sp6 sp7) :period (seconds 3) :length (seconds 0.017)) + (sp-item 884 :flags (sp6 sp7) :period (seconds 3) :length (seconds 0.017)) + (sp-item 885 :flags (sp7) :period (seconds 3) :length (seconds 0.05)) + (sp-item 886 :fade-after (meters 60) :flags (sp7) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 887 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 888 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 889 :fade-after (meters 150) :falloff-to (meters 150) :flags (sp7) :period (seconds 3) :length (seconds 0.067) :offset 30) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-kg-explosion + :id 219 + :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 883 :flags (sp6 sp7) :period (seconds 3) :length (seconds 0.017)) + (sp-item 884 :flags (sp6 sp7) :period (seconds 3) :length (seconds 0.017)) + (sp-item 885 :flags (sp7) :period (seconds 3) :length (seconds 0.05)) + (sp-item 886 :fade-after (meters 60) :flags (sp7) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 887 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 888 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 889 :fade-after (meters 150) :falloff-to (meters 150) :flags (sp7) :period (seconds 3) :length (seconds 0.067) :offset 30) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-kg-mid-explosion + :id 220 + :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.5 0.5 0.5) + :parts ((sp-item 883 :flags (sp6 sp7) :period (seconds 3) :length (seconds 0.017)) + (sp-item 884 :flags (sp6 sp7) :period (seconds 3) :length (seconds 0.017)) + (sp-item 885 :flags (sp7) :period (seconds 3) :length (seconds 0.05)) + (sp-item 886 :fade-after (meters 60) :flags (sp7) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 887 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 888 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 889 :fade-after (meters 150) :falloff-to (meters 150) :flags (sp7) :period (seconds 3) :length (seconds 0.067) :offset 30) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-kg-small-explosion + :id 221 + :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 883 :flags (sp6 sp7) :period (seconds 3) :length (seconds 0.017)) + (sp-item 884 :flags (sp6 sp7) :period (seconds 3) :length (seconds 0.017)) + (sp-item 885 :flags (sp7) :period (seconds 3) :length (seconds 0.05)) + (sp-item 886 :fade-after (meters 60) :flags (sp7) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 887 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp7) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 888 :fade-after (meters 200) :falloff-to (meters 200) :flags (sp7) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 889 :fade-after (meters 150) :falloff-to (meters 150) :flags (sp7) :period (seconds 3) :length (seconds 0.067) :offset 30) + ) + ) + +;; failed to figure out what this is: +(defpart 884 + :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 set-conerot)) + (:next-time (seconds 0.25)) + (:next-launcher 890) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 890 + :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) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 889 + :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 set-conerot)) + (:next-time (seconds 0.085)) + (:next-launcher 891) + (:conerot-x '*sp-temp*) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 888 + :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 set-conerot)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400700)) + (:next-time (seconds 0.085)) + (:next-launcher 891) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 891 + :init-specs ((:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:next-time (seconds 0.017) (seconds 0.065)) + (:next-launcher 892) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 892 + :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 893) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 893 + :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 894) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 894 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.1125) (:rotate-y (degrees 0))) + ) + +;; failed to figure out what this is: +(defpart 883 + :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 set-conerot)) + (:next-time (seconds 0.1)) + (:next-launcher 895) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 895 + :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) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 887 + :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 set-conerot)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 896) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 896 + :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 897) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 897 + :init-specs ((:fade-r -0.5543478) (:fade-g -0.5543478) (:fade-a -0.13913043) (:rotate-y (degrees 0))) + ) + +;; failed to figure out what this is: +(defpart 885 + :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 set-conerot)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 898) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 898 + :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 899) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 899 + :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) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 886 + :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 set-conerot)) + (:rotate-y (degrees 0)) + ) + ) + + + + 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 new file mode 100644 index 0000000000..eba5b3c241 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/enemy-states_REF.gc @@ -0,0 +1,1667 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defstate idle (enemy) + :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 0.5)) + (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)) + (sleep-code) + ) + :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) + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate dormant (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + ((-> (method-of-type enemy idle) enter)) + (set! (-> self root nav-flags) (nav-flags)) + (let ((v1-4 (-> self root root-prim))) + (set! (-> v1-4 prim-core collide-as) (collide-spec)) + (set! (-> v1-4 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> self draw status) (draw-control-status no-draw)) + (set! (-> self draw origin quad) (-> self root trans quad)) + (if (logtest? (enemy-flag directed) (-> self enemy-flags)) + (logior! (-> self enemy-flags) (enemy-flag directed-ready)) + ) + (logior! (-> self focus-status) (focus-status disable)) + ) + :exit (behavior () + (logclear! (-> self focus-status) (focus-status disable)) + (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)) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (logclear! (-> self enemy-flags) (enemy-flag directed-ready)) + (logior! (-> self root nav-flags) (nav-flags has-root-sphere)) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate dormant-aware (enemy) + :virtual #t + :event enemy-event-handler + :enter (-> (method-of-type enemy dormant) enter) + :exit (-> (method-of-type enemy dormant) exit) + :trans (behavior () + (when (and (time-elapsed? (-> self state-time) (-> self state-timeout)) (> (the-as int (-> self focus aware)) 0)) + (if (logtest? (enemy-option ambush) (-> self fact enemy-options)) + (go-ambush-delay self) + (go-virtual active) + ) + ) + ) + :code 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) + ) + ) + +;; failed to figure out what this is: +(defstate ambush-delay (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self desired-angle) (fmax 0.0 (res-lump-float (-> self entity) 'ambush-delay))) + (logior! (-> self focus-status) (focus-status disable)) + (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)) + (logior! (-> self enemy-flags) (enemy-flag directed-ready)) + (logclear! (-> self root nav-flags) (nav-flags has-root-sphere)) + ) + :exit (behavior () + ((-> (method-of-type enemy dormant) exit)) + (logior! (-> self enemy-flags) (enemy-flag alert)) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (the int (* 300.0 (-> self desired-angle)))) + (go-virtual ambush) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate ambush (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logior! (-> self enemy-flags) (enemy-flag alert)) + ) + :code (behavior () + (go-virtual notice) + ) + ) + +;; failed to figure out what this is: +(defstate active (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (logclear! (-> self enemy-flags) (enemy-flag cam-attack-mode)) + (when (logtest? (-> self enemy-flags) (enemy-flag enable-on-active)) + (logclear! (-> self enemy-flags) (enemy-flag enable-on-active)) + (let ((gp-0 (-> self on-active))) + (if gp-0 + (script-eval gp-0 :vector (-> self root trans)) + ) + ) + ) + (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) (seconds 0.1)) + (let ((v1-3 (-> self focus aware))) + (cond + ((< (the-as int v1-3) 1) + (go-idle self) + ) + ((< 1 (the-as int v1-3)) + (go-virtual notice) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (sleep-code) + ) + :post (behavior () + (play-idle-frames! (-> self idle-anim-player) self) + (enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate notice (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((v1-3 (logior (-> self enemy-flags) (enemy-flag cam-attack-mode)))) + (set! (-> self enemy-flags) (logclear v1-3 (enemy-flag use-trigger))) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (set-look-at-mode! self 1) + (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 ((gp-1 (-> self focus aware))) + (when (logtest? (-> self enemy-flags) (enemy-flag alert)) + (cond + ((and (= gp-1 (enemy-aware ea3)) (get-focus! self)) + (go-hostile self) + ) + ((= gp-1 (enemy-aware ea4)) + (go-flee self) + ) + (else + (go-stare self) + ) + ) + ) + ) + (logior! (-> self enemy-flags) (enemy-flag alert)) + ) + :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)) + ) + (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 131072.0 (seconds 0.05)) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (go-best-state self) + ) + :post enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate hostile (enemy) + :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)) + ) + ) + ) + ) + :trans (behavior () + (if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory)) + (go-virtual victory) + ) + (let ((gp-0 (-> self focus aware))) + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (cond + ((or (>= 2 (the-as int gp-0)) (not (get-focus! self))) + (go-stare self) + ) + ((= gp-0 (enemy-aware ea4)) + (go-flee self) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! (-> self draw art-group data (-> self enemy-info hostile-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)) + ) + ) + #f + ) + :post enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate stare (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (logclear! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self enemy-flags) (enemy-flag chase-startup)) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (let ((gp-0 (-> self focus aware))) + (cond + ((>= 1 (the-as int gp-0)) + (go-virtual active) + ) + ((and (= gp-0 (enemy-aware ea3)) (get-focus! self)) + (go-hostile self) + ) + ((= gp-0 (enemy-aware ea4)) + (go-flee self) + ) + ) + ) + ) + ) + :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) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + #f + ) + :post enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate victory (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logclear! (-> self enemy-flags) (enemy-flag victory)) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info victory-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) + ) + :post enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate flee (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set-look-at-mode! self 1) + (logclear! (-> self enemy-flags) (enemy-flag chase-startup)) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (if (!= (-> self focus aware) (enemy-aware ea4)) + (go-stare self) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate jump (enemy) + :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)) + ) + :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 ((gp-0 (new 'stack-no-clear 'enemy-jump-info))) + (let ((s5-0 0)) + (init-jump-info! self gp-0) + (if (and (-> self enemy-info use-jump-blocked) + (logtest? (enemy-flag jump-check-blocked) (-> self enemy-flags)) + (enemy-method-91 self gp-0) + ) + (go-virtual jump-blocked) + ) + (when (logtest? (-> gp-0 flags) (enemy-jump-flags ejf0)) + (until #f + (if (jump-anim-handler self s5-0 gp-0) + (goto cfg-12) + ) + (in-jump-handler self s5-0 gp-0) + (enemy-method-101 self s5-0 gp-0) + (suspend) + (set! s5-0 1) + ) + #f + ) + ) + (label cfg-12) + (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 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) + (enemy-method-101 self s5-1 gp-0) + (suspend) + (set! s5-1 3) + ) + ) + (logclear! (-> self focus-status) (focus-status in-air)) + (move-to-gspot! self) + (let ((s5-2 4)) + (until #f + (if (jump-anim-handler self s5-2 gp-0) + (goto cfg-19) + ) + (in-jump-handler self s5-2 gp-0) + (enemy-method-101 self s5-2 gp-0) + (suspend) + (set! s5-2 5) + ) + ) + ) + #f + (label cfg-19) + (if (logtest? (enemy-flag directed) (-> self enemy-flags)) + ((lambda :behavior enemy () (send-event (ppointer->process (-> self parent)) 'child-jumped))) + ) + (go-directed2 self) + ) + :post (behavior () + (let ((a1-0 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-0 options) (overlaps-others-options)) + (set! (-> a1-0 collide-with-filter) (-> self enemy-info overlaps-others-collide-with-filter)) + (set! (-> a1-0 tlist) *touching-list*) + (find-overlapping-shapes (-> self root) a1-0) + ) + (enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate jump-blocked (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.5)) + (if (logtest? (enemy-flag directed) (-> self enemy-flags)) + (go-virtual jump) + (go-directed2 self) + ) + ) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (when (not (and v1-2 (= v1-2 (-> self draw art-group data (-> self enemy-info idle-anim))))) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! (-> self draw art-group data (-> self enemy-info idle-anim)) + :num! (identity (rand-vu-float-range 0.0 (the float (+ (-> (ja-group) frames num-frames) -1)))) + ) + ) + ) + (let ((f30-0 (rnd-float-range self 0.75 1.25))) + (until #f + (suspend) + (ja :num! (loop! f30-0)) + ) + ) + #f + ) + :post enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate hit (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (stop-look-at! self) + (logclear! (-> self mask) (process-mask actor-pause)) + (play-damage-sound self 0) + ) + :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-hostile self) + ) + :post enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate knocked (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (when (>= 0.0 (-> self hit-points)) + (let ((v1-2 (handle->process (-> self incoming attacker-handle)))) + (when (or (not (-> self draw)) + (and (or (not v1-2) (!= (-> v1-2 type) target)) + (or (not (logtest? (-> self draw status) (draw-control-status on-screen))) + (let ((f0-1 450560.0)) + (< (* f0-1 f0-1) (vector-vector-xz-distance-squared (-> self root trans) (math-camera-pos))) + ) + ) + ) + ) + (send-event (ppointer->process (-> self parent)) 'child-die) + (go-virtual die-fast) + ) + ) + ) + (set-time! (-> self state-time)) + (stop-look-at! self) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self mask) (process-mask actor-pause)) + (let* ((v1-30 *game-info*) + (a0-13 (+ (-> v1-30 attack-id) 1)) + ) + (set! (-> v1-30 attack-id) a0-13) + (set! (-> self attack-id) a0-13) + ) + (if (logtest? (enemy-option knocked-into-water) (-> self fact enemy-options)) + (logior! (-> self enemy-flags) (enemy-flag check-water)) + ) + (if (and (enemy-method-123 self) (-> self enemy-info ragdoll-info)) + (set! (-> self root transv y) 0.0) + ) + (let ((v1-43 (-> self root))) + (logclear! (-> v1-43 status) (collide-status + on-surface + on-ground + touch-surface + touch-wall + touch-ceiling + touch-actor + on-special-surface + touch-edge + blocked + on-water + impact-surface + touch-background + stuck + glance + ) + ) + (when (not (logtest? (-> v1-43 root-prim prim-core action) (collide-action no-normal-reset))) + (let ((a0-25 (-> v1-43 dynam gravity-normal))) + (set! (-> v1-43 local-normal quad) (-> a0-25 quad)) + (set! (-> v1-43 surface-normal quad) (-> a0-25 quad)) + (set! (-> v1-43 poly-normal quad) (-> a0-25 quad)) + ) + (set! (-> v1-43 coverage) 0.0) + (set! (-> v1-43 touch-angle) 0.0) + ) + (knocked-handler self (-> v1-43 transv)) + ) + (if (>= (-> self enemy-info knocked-seek-ry-clamp) 0.0) + (set! (-> self desired-angle) (get-knockback-angle self)) + ) + (if (or (= (-> self hit-points) 0.0) (nonzero? (-> self fated-time))) + (on-dying self) + (play-damage-sound self 0) + ) + (logclear! (-> self focus-status) (focus-status dangerous)) + (if (= (-> self incoming knocked-type) (knocked-type yellow-shot)) + (logclear! (-> self enemy-flags) (enemy-flag trackable)) + ) + (set! (-> self root penetrate-using) (penetrate lunge vehicle knocked)) + (reset-penetrate! self) + (enemy-method-50 self 1) + (ragdoll-spawn! self #t #f) + ) + :exit (behavior () + (disable-ragdoll self) + ) + :trans (behavior () + (if (>= (-> self enemy-info knocked-seek-ry-clamp) 0.0) + (seek-toward-yaw-angle! (-> self root) (-> self desired-angle) 138353.78 (seconds 0.1)) + ) + ) + :code (behavior () + (cond + ((handle->process (-> self ragdoll-proc)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.2)) + (suspend) + ) + ) + (until (ragdoll-settled? self) + (if (or (time-elapsed? (-> self state-time) (seconds 4)) (enemy-method-109 self)) + (go-die self) + ) + (suspend) + ) + (if (within-gspot-range? self) + (go-die self) + ) + ) + (else + (let ((gp-1 (new 'stack-no-clear 'enemy-knocked-info))) + (let ((s5-0 0)) + (set! (-> gp-1 anim-speed) (rnd-float-range self 0.9 1.1)) + (set! (-> gp-1 on-surface-count) 0) + (set! (-> gp-1 move-count) 0) + (until (enemy-method-88 self gp-1) + (if (time-elapsed? (-> self state-time) (seconds 2)) + (go-die self) + ) + (if (logtest? (-> self root status) (collide-status on-surface)) + (+! (-> gp-1 on-surface-count) 1) + ) + (knocked-anim-handler self s5-0 gp-1) + (suspend) + (+! (-> gp-1 move-count) 1) + (set! s5-0 1) + ) + ) + (let ((s5-1 2)) + (set-time! (-> gp-1 land-can-land-time)) + (until #f + (if (logtest? (-> self root status) (collide-status on-surface)) + (+! (-> gp-1 on-surface-count) 1) + ) + (if (knocked-anim-handler self s5-1 gp-1) + (goto cfg-33) + ) + (suspend) + (+! (-> gp-1 move-count) 1) + (set! s5-1 3) + (if (enemy-method-88 self gp-1) + (set-time! (-> gp-1 land-can-land-time)) + ) + ) + ) + #f + (label cfg-33) + (if (and (not (logtest? (enemy-flag death-start) (-> self enemy-flags))) + (or (within-gspot-range? self) + (enemy-method-109 self) + (time-elapsed? (-> gp-1 land-can-land-time) (-> self enemy-info knocked-can-land-timeout)) + ) + ) + (go-die self) + ) + (while (not (knocked-anim-handler self 4 gp-1)) + (suspend) + ) + ) + ) + ) + (cond + ((or (= (-> self hit-points) 0.0) (nonzero? (-> self fated-time))) + (cond + ((logtest? (enemy-flag death-start) (-> self enemy-flags)) + (set! (-> self hit-points) 0.0) + (let ((v1-90 (-> self root root-prim))) + (set! (-> v1-90 prim-core collide-as) (collide-spec)) + (set! (-> v1-90 prim-core collide-with) (collide-spec)) + ) + 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) + ) + (cleanup-for-death self) + ) + (else + (when (and (-> self skel effect) (logtest? (enemy-flag auto-death-phase-out) (-> self enemy-flags))) + (do-effect (-> self skel effect) "death-default" 0.0 -1) + (suspend) + 0 + ) + (go-die self) + ) + ) + ) + (else + (go-virtual knocked-recover) + ) + ) + ) + :post enemy-falling-post + ) + +;; failed to figure out what this is: +(defstate knocked-recover (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :exit (behavior () + (local-vars (v1-1 enemy-flag) (v1-13 enemy-flag) (v1-15 enemy-flag) (v1-17 enemy-flag)) + (let ((v1-0 (-> self enemy-flags))) + (if (logtest? (enemy-flag check-water-backup) v1-0) + (set! v1-1 (logior (enemy-flag check-water) v1-0)) + (set! v1-1 (logclear v1-0 (enemy-flag check-water))) + ) + ) + (set! (-> self enemy-flags) v1-1) + (when (!= (-> self hit-points) 0.0) + (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-12 (-> self enemy-flags))) + (if (logtest? v1-12 (enemy-flag vulnerable-backup)) + (set! v1-13 (logior v1-12 (enemy-flag vulnerable))) + (set! v1-13 (logclear v1-12 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-13) + (let ((v1-14 (-> self enemy-flags))) + (if (logtest? v1-14 (enemy-flag attackable-backup)) + (set! v1-15 (logior v1-14 (enemy-flag attackable))) + (set! v1-15 (logclear v1-14 (enemy-flag attackable))) + ) + ) + (set! (-> self enemy-flags) v1-15) + (let ((v1-16 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-16) + (set! v1-17 (logior (enemy-flag trackable) v1-16)) + (set! v1-17 (logclear v1-16 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-17) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self focus-status) (focus-status hit)) + ) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (seconds 0.01)) + (and (not (handle->process (-> self ragdoll-proc))) + (or (within-gspot-range? self) + (time-elapsed? (-> self state-time) (-> self enemy-info knocked-recover-timeout)) + ) + ) + ) + (go-die self) + ) + ) + :code (behavior () + (local-vars (v1-58 symbol)) + (cond + ((handle->process (-> self ragdoll-proc)) + (ja-channel-push! 1 0) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) :num! (seek!) :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!)) + ) + ) + (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-58 + (suspend) + (ja :num! (loop!)) + (set! v1-58 (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 () + (when (not (handle->process (-> self ragdoll-proc))) + (let ((gp-0 (-> self root))) + (if (focus-test? self under-water) + (accelerate-fall! self (-> gp-0 transv)) + (vector-v++! + (-> gp-0 transv) + (compute-acc-due-to-gravity gp-0 (new 'stack-no-clear 'vector) (-> self enemy-info slip-factor)) + ) + ) + (let ((a2-1 (new 'stack-no-clear 'collide-query))) + (set! (-> a2-1 collide-with) (-> self enemy-info recover-gnd-collide-with)) + (set! (-> a2-1 ignore-process0) self) + (set! (-> a2-1 ignore-process1) #f) + (set! (-> a2-1 ignore-pat) (logior (new 'static 'pat-surface :noendlessfall #x1) (-> gp-0 pat-ignore-mask))) + (set! (-> a2-1 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide gp-0 (-> gp-0 transv) a2-1 (meters 0)) + ) + ) + (apply-friction self) + ) + (let ((gp-1 (-> self root)) + (a1-5 (new 'stack-no-clear 'collide-query)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> gp-1 gspot-pos quad)) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (set! (-> s4-1 quad) (-> gp-1 gspot-normal quad)) + (when (not (find-ground gp-1 a1-5 (-> self enemy-info gnd-collide-with) 8192.0 81920.0 1024.0 (the-as process #f))) + (set! (-> gp-1 gspot-pos quad) (-> s5-1 quad)) + (set! (-> gp-1 gspot-normal quad) (-> s4-1 quad)) + ) + ) + ) + (enemy-simple-post) + ) + ) + +;; definition for method 154 of type enemy +;; WARN: Return type mismatch entity-perm-status vs none. +(defmethod mark-as-dead ((this enemy)) + (cond + ((logtest? (process-mask enemy) (-> this mask)) + (+! (-> *game-info* enemies-killed) 1.0) + ) + ((logtest? (process-mask guard civilian) (-> this mask)) + (+! (-> *game-info* civilians-killed) 1.0) + ) + ) + (logior! (-> this focus-status) (focus-status dead)) + (process-entity-status! this (entity-perm-status subtask-complete) #t) + (none) + ) + +;; definition for method 143 of type enemy +(defmethod on-dying ((this enemy)) + (when (not (logtest? (enemy-flag called-dying) (-> this enemy-flags))) + (set! (-> this enemy-flags) (the-as enemy-flag (logior (enemy-flag called-dying) (-> this enemy-flags)))) + (play-damage-sound this 1) + (when (and (logtest? (enemy-flag has-gem) (-> this enemy-flags)) + (not (logtest? (enemy-flag spawn-gem) (-> this enemy-flags))) + ) + (logior! (-> this enemy-flags) (enemy-flag spawn-gem)) + (remove-from-process *part-engine* this) + (setup-masks + (-> this draw) + (the-as int (-> this enemy-info gem-no-seg)) + (the-as int (-> this enemy-info gem-seg)) + ) + (let* ((a0-11 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data (-> this enemy-info gem-joint))) + ) + (s4-0 (ppointer->process (birth-pickup-at-point a0-11 (pickup-type gem) 1.0 #t *entity-pool* (-> this fact)))) + (s5-0 (if (type? s4-0 gem) + s4-0 + ) + ) + ) + (if s5-0 + (set! (-> (the-as gem s5-0) gem-pool) (the-as uint (get-gem-pool-idx this))) + ) + ) + ) + (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)) + (mark-as-dead this) + (if (-> this skel effect) + (logior! (-> this skel effect flags) (effect-control-flag ecf1)) + ) + (stop-look-at! this) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate die (enemy) + :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-time! (-> self state-time)) + (set! (-> self hit-points) 0.0) + (ragdoll-spawn! self #f #t) + ) + :code (behavior () + (cond + ((handle->process (-> self ragdoll-proc)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.2)) + (suspend) + ) + ) + (if (-> self skel effect) + (do-effect (-> self skel effect) "death-default" 0.0 -1) + ) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 0.8)) + (suspend) + ) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.075)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info die-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-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) + ) + (cleanup-for-death self) + ) + :post enemy-simple-post + ) + +;; definition for method 144 of type enemy +(defmethod falling? ((this enemy)) + (let ((s5-0 (-> this root)) + (a1-0 (new 'stack-no-clear 'collide-query)) + (gp-0 #t) + ) + (when (find-ground + s5-0 + a1-0 + (-> this enemy-info recover-gnd-collide-with) + 8192.0 + 81920.0 + 1024.0 + (the-as process #f) + ) + (if (< (- (-> s5-0 trans y) (-> s5-0 gspot-pos y)) 8192.0) + (set! gp-0 #f) + ) + ) + gp-0 + ) + ) + +;; failed to figure out what this is: +(defstate die-falling (enemy) + :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) + (if (logtest? (enemy-option knocked-into-water) (-> self fact enemy-options)) + (logior! (-> self enemy-flags) (enemy-flag check-water)) + ) + (ragdoll-spawn! self #f #t) + ) + :exit (behavior () + (local-vars (v0-0 enemy-flag)) + (let ((v1-0 (-> self enemy-flags))) + (if (logtest? (enemy-flag check-water-backup) v1-0) + (set! v0-0 (logior (enemy-flag check-water) v1-0)) + (set! v0-0 (logclear v1-0 (enemy-flag check-water))) + ) + ) + (set! (-> self enemy-flags) v0-0) + ) + :code (behavior () + (cond + ((handle->process (-> self ragdoll-proc)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (if (-> self skel effect) + (do-effect (-> self skel effect) "death-default" 0.0 -1) + ) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (suspend) + ) + ) + (deactivate-ragdoll! self) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (let ((gp-2 (-> 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-2 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + ) + (send-event self 'death-end) + (let ((gp-3 (-> self child))) + (while gp-3 + (send-event (ppointer->process gp-3) 'notice 'die) + (set! gp-3 (-> gp-3 0 brother)) + ) + ) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + :post enemy-die-falling-post + ) + +;; failed to figure out what this is: +(defstate directed (enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logior! (-> self enemy-flags) (enemy-flag directed-ready)) + ((-> (method-of-type enemy idle) enter)) + ) + :exit (behavior () + (logclear! (-> self enemy-flags) (enemy-flag directed-ready)) + ) + :code (-> (method-of-type enemy idle) code) + :post (-> (method-of-type enemy idle) post) + ) + +;; failed to figure out what this is: +(defstate die-fast (enemy) + :virtual #t + :code nothing + ) + +;; failed to figure out what this is: +(defstate view-anims (enemy) + :virtual #t + :enter (behavior () + '() + ) + :trans (behavior () + '() + ) + :code (behavior () + (let ((gp-0 (-> self draw art-group))) + (until #f + (dotimes (s5-0 (-> gp-0 length)) + (let ((s4-0 (-> gp-0 data s5-0))) + (when (and s4-0 (= (-> s4-0 type) art-joint-anim)) + (ja-channel-set! 1) + (ja-no-eval :group! s4-0 :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + ) + ) + #f + ) + :post transform-post + ) + +;; definition for function gun-dark-2-anim-code +;; WARN: Return type mismatch symbol vs object. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior gun-dark-2-anim-code enemy () + 0.0 + (let ((f28-0 (the float (ja-num-frames 0)))) + 0.0 + 0.0 + (let ((f30-0 1.0)) + 0.0 + (let* ((f26-0 (/ (ja-frame-num 0) f28-0)) + (f0-12 (cond + ((< 0.5 f26-0) + (let* ((f24-0 0.3) + (v1-4 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-5 (the-as number (logior #x3f800000 v1-4))) + ) + (- f26-0 (+ f24-0 (* (+ -1.0 (the-as float v1-5)) (+ -0.3 f26-0)))) + ) + ) + (else + (let* ((f24-1 0.3) + (v1-11 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-12 (the-as number (logior #x3f800000 v1-11))) + ) + (+ f24-1 (* (+ -1.0 (the-as float v1-12)) (- 0.7 f26-0)) f26-0) + ) + ) + ) + ) + (f26-1 (fmax 0.0 (fmin 1.0 f0-12))) + (f28-1 (* f28-0 f26-1)) + ) + (let* ((f1-8 (* 0.000061035156 (-> self root root-prim local-sphere w))) + (f0-21 (fmax 0.0 (fmin 1.0 f1-8))) + ) + (* f30-0 (lerp 2.0 1.0 f0-21)) + ) + (cond + ((>= (-> self enemy-info idle-anim) 0) + (let ((s5-0 (ja-group)) + (f30-1 (ja-frame-num 0)) + (gp-0 (-> self draw art-group data (-> self enemy-info idle-anim))) + ) + (ja-channel-push! 2 (seconds 1)) + (ja :group! s5-0 :num! (identity f30-1)) + (ja :chan 1 + :group! gp-0 + :num! (identity (* f26-1 (the float (+ (-> (the-as art-joint-anim gp-0) frames num-frames) -1)))) + ) + ) + (let* ((gp-1 (current-time)) + (f30-2 18.0) + (f28-2 6.0) + (v1-45 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-46 (the-as number (logior #x3f800000 v1-45))) + (f30-3 (+ f30-2 (* f28-2 (+ -1.0 (the-as float v1-46))))) + ) + (until #f + (let* ((f0-32 (* 0.0033333334 (the float (- (current-time) gp-1)))) + (f0-34 (/ (- f0-32 (* (the float (the int (/ f0-32 f30-3))) f30-3)) f30-3)) + (f0-36 (cos (* 65536.0 f0-34))) + (f0-37 (+ 1.0 f0-36)) + (f28-3 (* 0.5 f0-37)) + ) + (ja :num! identity :frame-interp0 f28-3 :frame-interp1 f28-3) + (let ((a0-20 (-> self skel root-channel 1))) + (let ((f0-39 (- 1.0 f28-3))) + (set! (-> a0-20 frame-interp 1) f0-39) + (set! (-> a0-20 frame-interp 0) f0-39) + ) + (joint-control-channel-group-eval! a0-20 (the-as art-joint-anim #f) num-func-identity) + ) + ) + (suspend) + 0 + ) + ) + #f + ) + (else + (until (time-elapsed? (-> self state-time) (seconds 2)) + (let* ((f1-22 (* 0.0016666667 (the float (- (current-time) (-> self state-time))))) + (f0-42 (fmax 0.0 (fmin 1.0 f1-22))) + ) + (ja :num! (seek! f28-1 (lerp 0.2 0.01 f0-42))) + ) + (suspend) + 0 + ) + ) + ) + ) + ) + ) + (sleep-code) + ) + +;; definition for function gun-dark-2-ragdoll-start +;; INFO: Used lq/sq +(defun gun-dark-2-ragdoll-start ((arg0 enemy)) + (local-vars (s4-0 process)) + (when (-> arg0 enemy-info ragdoll-info) + (let ((s5-0 (handle->process (-> arg0 ragdoll-proc)))) + (cond + (s5-0 + (set! s4-0 s5-0) + ) + (else + (set! (-> arg0 ragdoll-proc) + (ppointer->handle + (process-spawn + ragdoll-proc + (-> arg0 enemy-info ragdoll-info) + :name "ragdoll-proc" + :to arg0 + :stack-size #x5000 + ) + ) + ) + (set! s4-0 (handle->process (-> arg0 ragdoll-proc))) + (if (not s4-0) + (return 0) + ) + (set! (-> arg0 enemy-flags) + (the-as enemy-flag (logior (enemy-flag auto-death-phase-out) (-> arg0 enemy-flags))) + ) + ) + ) + (if (-> (the-as ragdoll-proc s4-0) ragdoll) + (logior! (-> (the-as ragdoll-proc s4-0) ragdoll ragdoll-flags) (ragdoll-flag rf3 rf4)) + ) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (vector-float*! s3-0 (-> arg0 root transv) (seconds-per-frame)) + (if s5-0 + (ragdoll-proc-method-15 (the-as ragdoll-proc s4-0) #f (the-as vector #f) #f) + (ragdoll-proc-method-15 (the-as ragdoll-proc s4-0) #f (the-as vector #f) #t) + ) + (let ((v0-0 (the-as object (-> (the-as ragdoll-proc s4-0) ragdoll ragdoll-joints 0 velocity)))) + (set! (-> (the-as vector v0-0) quad) (-> s3-0 quad)) + v0-0 + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate gun-dark-2-stretch (enemy) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-4 object) (sv-112 event-message-block) (sv-128 event-message-block)) + (case message + (('attack) + (let* ((s5-0 (the-as object (-> block param 1))) + (s4-0 (new 'stack-no-clear 'vector)) + (v1-1 (-> (the-as attack-info s5-0) mode)) + ) + (set! v0-4 (cond + ((= v1-1 'gravity-end) + (set! (-> self root transv quad) (the-as uint128 0)) + (gun-dark-2-ragdoll-start self) + (let* ((s4-1 self) + (s1-0 (method-of-object s4-1 get-incoming-attack!)) + (s0-0 proc) + ) + (set! sv-112 block) + (let ((a3-1 (get-penetrate-using-from-attack-event (the-as process-drawable proc) block)) + (t1-0 #f) + ) + (s1-0 + s4-1 + (the-as process-drawable s0-0) + sv-112 + a3-1 + (the-as attack-info s5-0) + (the-as touching-shapes-entry t1-0) + ) + ) + ) + (damage-enemy! self proc block) + (set! (-> self incoming penetrate-using) (penetrate vehicle)) + (set! (-> self incoming knocked-type) (knocked-type vehicle)) + (set! (-> self incoming attack-direction quad) (the-as uint128 0)) + (set! (-> self starting-time) 0) + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer proc)) + (set! (-> a1-4 num-params) argc) + (set! (-> a1-4 message) 'hit-knocked) + (set! (-> a1-4 param 0) (-> block param 0)) + (set! (-> a1-4 param 1) (-> block param 1)) + (set! (-> a1-4 param 2) (-> block param 2)) + (set! (-> a1-4 param 3) (-> block param 3)) + (set! (-> a1-4 param 4) (-> block param 4)) + (set! (-> a1-4 param 5) (-> block param 5)) + (send-event-function self a1-4) + ) + ) + (else + (when (!= (-> (the-as attack-info s5-0) id) (-> self incoming attack-id)) + (let* ((s2-1 self) + (s1-1 (method-of-object s2-1 get-incoming-attack!)) + (s0-1 proc) + ) + (set! sv-128 block) + (let ((a3-2 (get-penetrate-using-from-attack-event (the-as process-drawable proc) block)) + (t0-1 (the-as uint s5-0)) + (t1-1 (-> block param 0)) + ) + (s1-1 + s2-1 + (the-as process-drawable s0-1) + sv-128 + a3-2 + (the-as attack-info t0-1) + (the-as touching-shapes-entry t1-1) + ) + ) + ) + (knocked-handler self s4-0) + (let ((gp-1 (-> self child))) + (while gp-1 + (when (send-event (-> gp-1 0) 'is-gravity) + (send-event + (-> gp-1 0) + 'attack-forward + (-> self incoming attack-direction) + (-> self incoming attack-position) + (the-as uint s5-0) + (-> self incoming penetrate-using) + s4-0 + (-> self incoming attack-position) + ) + (set! v0-4 0) + (goto cfg-17) + ) + (set! gp-1 (-> gp-1 0 brother)) + ) + ) + #f + ) + ) + ) + ) + ) + (label cfg-17) + v0-4 + ) + (else + (if (zero? (-> self starting-time)) + (enemy-event-handler proc argc message block) + ) + ) + ) + ) + :enter (behavior () + (local-vars (v1-7 enemy-flag) (v1-9 enemy-flag) (v1-11 enemy-flag) (v1-34 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)) + (vector-float*! (-> self root transv) (-> self root transv) 0.5) + (set! (-> self root penetrated-by) (penetrate)) + (+! (-> self root transv y) 2048.0) + (set-time! (-> self state-time)) + (set! (-> self root penetrated-by) (logior (get-penetrated-by self) (penetrate vehicle))) + (set-time! (-> self starting-time)) + (set! (-> self focus-status) (the-as focus-status (logior (focus-status no-gravity) (-> self focus-status)))) + (let ((v1-33 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-33) + (set! v1-34 (logior (enemy-flag trackable) v1-33)) + (set! v1-34 (logclear v1-33 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-34) + (stop-look-at! self) + (when (and (-> self draw) (-> self draw shadow-ctrl)) + (let ((v1-41 (-> self draw shadow-ctrl))) + (logior! (-> v1-41 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + :exit (behavior () + (set! (-> self focus-status) + (the-as focus-status (logclear (-> self focus-status) (focus-status no-gravity))) + ) + (when (and (-> self draw) (-> self draw shadow-ctrl)) + (let ((v1-6 (-> self draw shadow-ctrl))) + (logclear! (-> v1-6 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + :trans (behavior () + (let ((gp-0 (-> self child))) + (while gp-0 + (when (send-event (-> gp-0 0) 'is-gravity) + (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) 'get-float-speed) + (let ((f0-0 (the-as float (send-event-function (-> gp-0 0) a1-1)))) + (+! (-> self root transv y) (* f0-0 (seconds-per-frame))) + ) + ) + 0 + (goto cfg-11) + ) + (set! gp-0 (-> gp-0 0 brother)) + ) + ) + (label cfg-11) + (vector-float*! (-> self root transv) (-> self root transv) (- 1.0 (* 0.5 (seconds-per-frame)))) + (let ((s3-0 (new 'stack 'collide-query)) + (gp-2 (vector-float*! (new 'stack-no-clear 'vector) (-> self root transv) (seconds-per-frame))) + ) + (set! (-> s3-0 start-pos quad) (-> (get-trans self 3) quad)) + (set! (-> s3-0 move-dist quad) (-> gp-2 quad)) + (let ((v1-26 s3-0)) + (set! (-> v1-26 radius) (* 0.7 (-> self root root-prim prim-core world-sphere w))) + (set! (-> v1-26 collide-with) + (collide-spec backgnd civilian enemy obstacle hit-by-others-list pusher vehicle-mesh) + ) + (set! (-> v1-26 ignore-process0) self) + (set! (-> v1-26 ignore-process1) #f) + (set! (-> v1-26 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-26 action-mask) (collide-action solid)) + ) + (let ((f30-0 (fill-and-probe-using-line-sphere *collide-cache* s3-0))) + (set! f30-0 + (cond + ((>= f30-0 0.0) + (vector-float*! gp-2 gp-2 f30-0) + (let ((s5-1 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (v1-31 (-> s3-0 best-other-tri)) + (f28-0 0.9) + ) + (set! (-> s5-1 quad) (-> v1-31 normal quad)) + (set! (-> s4-0 quad) (-> v1-31 intersect quad)) + (let ((v1-32 (and (-> v1-31 collide-ptr) (let ((s2-0 (-> v1-31 collide-ptr))) + (if (type? s2-0 collide-shape-prim-sphere) + s2-0 + ) + ) + ) + ) + ) + (when v1-32 + (let ((s2-1 (-> (the-as collide-shape-prim-sphere v1-32) cshape process))) + (let ((s1-0 (new 'stack-no-clear 'vector))) + (set! (-> s1-0 quad) (-> self root transv quad)) + (let* ((s0-0 s2-1) + (v1-37 (if (type? s0-0 process-focusable) + s0-0 + ) + ) + ) + (when v1-37 + (when (focus-test? (the-as process-focusable v1-37) no-gravity) + (vector-float*! s1-0 s1-0 0.5) + (set! f28-0 0.5) + ) + ) + ) + ) + (let ((f1-6 (fmax 0.0 (fmin 1.0 (* 0.000008138021 (vector-length (-> self root transv)))))) + (f0-12 0.0) + ) + (if (< 0.1 f1-6) + (set! f0-12 (lerp 3.0 12.0 f1-6)) + ) + (send-event + s2-1 + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self attack-id)) + (damage f0-12) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (penetrate-using (penetrate vehicle)) + (vector (-> self root transv)) + (attacker-velocity (-> self root transv)) + (intersection s4-0) + ) + ) + ) + ) + ) + ) + ) + (let ((s2-3 (vector-! (new 'stack-no-clear 'vector) (-> s3-0 start-pos) s4-0))) + 0.0 + (let* ((f0-16 (vector-normalize-ret-len! s2-3 1.0)) + (f0-18 (* 1.3 (- (* 0.7 (-> self root root-prim prim-core world-sphere w)) f0-16))) + ) + (vector-normalize! s2-3 f0-18) + ) + (vector+! (-> self root trans) (-> self root trans) s2-3) + ) + (let ((f26-0 (vector-dot (-> self root transv) s5-1))) + (vector+float*! (-> self root transv) (-> self root transv) s5-1 (* -2.0 f26-0)) + (vector-float*! (-> self root transv) (-> self root transv) f28-0) + (let ((s3-1 (-> self child))) + (while s3-1 + (when (send-event (-> s3-1 0) 'is-gravity) + (send-event (-> s3-1 0) 'impact s4-0 (vector-float*! (new 'stack-no-clear 'vector) s5-1 (- f26-0))) + 0 + (goto cfg-38) + ) + (set! s3-1 (-> s3-1 0 brother)) + ) + ) + ) + ) + (label cfg-38) + f30-0 + ) + (else + 1.0 + ) + ) + ) + (vector+! (-> self root trans) (-> self root trans) gp-2) + (if (< f30-0 1.0) + (vector+float*! (-> self root trans) (-> self root trans) (-> self root transv) (* f30-0 (seconds-per-frame))) + ) + ) + ) + ) + :code (behavior () + (gun-dark-2-anim-code) + ) + :post (behavior () + (let ((gp-0 (-> self skel status))) + (logior! (-> self skel status) (joint-control-status sync-math)) + (ja-post) + (update-transforms (-> self root)) + (set! (-> self skel status) gp-0) + ) + (let ((gp-1 (-> self child))) + (while gp-1 + (when (send-event (-> gp-1 0) 'is-gravity) + (send-event (-> gp-1 0) 'update-rotation) + (return 0) + ) + (set! gp-1 (-> gp-1 0 brother)) + ) + ) + ) + ) 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 5bb1d01381..c18ca54f44 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 3d8b918b7b..bd12e0812b 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 @@ -11,7 +11,7 @@ (defskelgroup skel-spotlight spotlight spotlight-lod0-jg -1 ((spotlight-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 10) - :shadow-joint-index 5 + :origin-joint-index 5 ) ;; definition for function entity-lookup-part-group @@ -1239,7 +1239,7 @@ ) (('do-effect) (if (and (nonzero? (-> self skel)) (-> self skel effect)) - (do-effect (-> self skel effect) (the-as symbol (-> block param 0)) (the-as float (-> block param 1)) -1) + (do-effect (-> self skel effect) (the-as string (-> block param 0)) (the-as float (-> block param 1)) -1) ) ) (('no-actor-pause) @@ -1460,7 +1460,7 @@ 0.0 614400.0 (the-as vector #f) - 0.000000000000000000000000000000000000000000084 + (shadow-flags shdf02 shdf03 shdf04 disable-draw) 245760.0 ) ) @@ -1607,17 +1607,14 @@ (nonzero? (-> (the-as process-drawable v1-15) root)) (nonzero? (-> (the-as process-drawable v1-15) node-list)) ) - (sparticle-launch-control-method-18 - (-> self part) - (-> (the-as process-drawable v1-15) node-list data (-> self target-joint)) - ) + (spawn-from-cspace (-> self part) (-> (the-as process-drawable v1-15) node-list data (-> self target-joint))) (set! (-> self root trans quad) (-> self part origin trans quad)) ) (else (let ((a0-11 (-> self root trans))) (set! (-> self mat trans quad) (-> a0-11 quad)) ) - (sparticle-launch-control-method-17 (-> self part) (-> self mat)) + (spawn-from-mat (-> self part) (-> self mat)) ) ) ) @@ -1691,7 +1688,7 @@ (nonzero? (-> (the-as process-drawable v1-15) root)) (nonzero? (-> (the-as process-drawable v1-15) node-list)) ) - (sparticle-subsampler-method-10 + (init-with-mat! (-> self subsampler) (-> (the-as process-drawable v1-15) node-list data (-> self target-joint) bone transform) ) @@ -1701,7 +1698,7 @@ (let ((a0-11 (-> self root trans))) (set! (-> self mat trans quad) (-> a0-11 quad)) ) - (sparticle-subsampler-method-10 (-> self subsampler) (-> self mat)) + (init-with-mat! (-> self subsampler) (-> self mat)) ) ) ) @@ -1791,7 +1788,7 @@ ;; failed to figure out what this is: (defpart 57 - :init-specs ((:texture (new 'static 'texture-id :index #x3d :page #x4)) + :init-specs ((:texture (middot level-default-sprite)) (:num 1.0) (:scale-x (meters 1)) (:scale-y :copy scale-x) @@ -1843,7 +1840,7 @@ (set! (-> self part) (create-launch-control (-> arg0 group) self)) (when (and (-> arg0 target) (logtest? (-> self part group flags) (sp-group-flag sp12 sp14))) (let* ((gp-0 (-> self part)) - (s5-0 (method-of-object gp-0 sparticle-launch-control-method-20)) + (s5-0 (method-of-object gp-0 set-local-space-info)) (s4-0 (add-connection *part-local-space-engine* self local-space-proc-joint (-> self target-joint) 0 0)) ) (let ((v1-10 (process->handle (-> arg0 target)))) @@ -1860,7 +1857,7 @@ (part-local-space-flags) ) ) - (s5-0 gp-0 (the-as float s4-0)) + (s5-0 gp-0 (the-as particle-local-space-info s4-0)) ) ) (set! (-> self event-hook) (-> (method-of-object self active) event)) @@ -2096,7 +2093,7 @@ ) ) ) - (set! (-> self sound) (sound-play-by-spec (the-as sound-spec gp-1) (new-sound-id) s5-1)) + (set! (-> self sound) (sound-play-by-spec gp-1 (new-sound-id) s5-1)) ) ) ) @@ -2485,7 +2482,7 @@ :trans (behavior () (when (-> self enable) (when (nonzero? (-> self path)) - (path-control-method-9 (-> self path)) + (debug-draw (-> self path)) (get-point-at-percent-along-path! (-> self path) (-> self root trans) (-> self path-pos) 'interp) (displacement-between-points-at-percent-normalized! (-> self path) (-> self last-velocity) (-> self path-pos)) (let ((f0-3 (+ (-> self path-pos) (* (-> self path-speed) (seconds-per-frame))))) @@ -2509,9 +2506,10 @@ ;; definition for method 11 of type part-spawner ;; INFO: Used lq/sq +;; INFO: Process stack size was changed from 16 to 64 (defmethod init-from-entity! ((this part-spawner) (arg0 entity-actor)) (local-vars (sv-16 string)) - (stack-size-set! (-> this main-thread) 16) + (stack-size-set! (-> this main-thread) 64) (logior! (-> this mask) (process-mask ambient)) (+! (-> this clock ref-count) -1) (+! (-> *display* part-clock ref-count) 1) @@ -2670,7 +2668,7 @@ ;; failed to figure out what this is: (defpart 59 - :init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4)) + :init-specs ((:texture (hotdot level-default-sprite)) (:num 1.0) (:x (meters 0) (meters 1.8)) (:scale-x (meters 0.2)) @@ -2691,7 +2689,7 @@ ;; failed to figure out what this is: (defpart 60 - :init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4)) + :init-specs ((:texture (hotdot level-default-sprite)) (:num 2.0) (:x (meters 1.8) (meters 1)) (:scale-x (meters 0.2)) @@ -2712,7 +2710,7 @@ ;; failed to figure out what this is: (defpart 61 - :init-specs ((:texture (new 'static 'texture-id :index #x50 :page #x4)) + :init-specs ((:texture (woodchip level-default-sprite)) (:num 1.5) (:x (meters 2.9) (meters 2.5)) (:y (meters -0.5)) @@ -2737,7 +2735,7 @@ ;; failed to figure out what this is: (defpart 62 - :init-specs ((:texture (new 'static 'texture-id :page #x4)) + :init-specs ((:texture (bigpuff level-default-sprite)) (:num 0.5) (:x (meters 2.9) (meters 2.5)) (:y (meters -0.5)) @@ -2780,7 +2778,7 @@ ;; failed to figure out what this is: (defpart 65 - :init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4)) + :init-specs ((:texture (hotdot level-default-sprite)) (:num 1.0) (:x (meters 0) (meters 1.4)) (:scale-x (meters 0.2)) @@ -2801,7 +2799,7 @@ ;; failed to figure out what this is: (defpart 66 - :init-specs ((:texture (new 'static 'texture-id :index #x18 :page #x4)) + :init-specs ((:texture (hotdot level-default-sprite)) (:num 2.0) (:x (meters 1.4) (meters 0.9)) (:scale-x (meters 0.2)) @@ -2822,7 +2820,7 @@ ;; failed to figure out what this is: (defpart 67 - :init-specs ((:texture (new 'static 'texture-id :page #x4)) + :init-specs ((:texture (bigpuff level-default-sprite)) (:num 0.5) (:x (meters 2.9) (meters 2.5)) (:y (meters -0.5)) @@ -2860,7 +2858,7 @@ ;; failed to figure out what this is: (defpart 68 - :init-specs ((:texture (new 'static 'texture-id :page #x4)) + :init-specs ((:texture (bigpuff level-default-sprite)) (:num 0.5) (:x (meters 2.9) (meters 2.5)) (:y (meters -0.5)) @@ -3561,12 +3559,12 @@ ;; definition for function explosion-spawn ;; WARN: Return type mismatch process vs none. -(defun explosion-spawn ((arg0 process-drawable) (arg1 type) (arg2 explosion-init-params)) +(defun explosion-spawn ((arg0 explosion-init-params) (arg1 process-drawable)) (let* ((gp-0 (the-as process #f)) (s3-0 (get-process *default-dead-pool* explosion #x4000 1)) (v1-1 (when s3-0 (let ((t9-1 (method-of-type explosion activate))) - (t9-1 (the-as explosion s3-0) (the-as process-tree arg1) "explosion" (the-as pointer #x70004000)) + (t9-1 (the-as explosion s3-0) arg1 "explosion" (the-as pointer #x70004000)) ) (run-now-in-process s3-0 explosion-init-by-other arg0) (-> s3-0 ppointer) @@ -3738,7 +3736,7 @@ ) 0 (while (not (time-elapsed? (-> self start-time) (the-as time-frame (-> self duration)))) - (sparticle-launch-control-method-17 (-> self part) (-> self mat)) + (spawn-from-mat (-> self part) (-> self mat)) (suspend) ) (set-time! (-> self start-time)) @@ -4243,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) ) @@ -4298,56 +4292,18 @@ (cond ((logtest? (-> self particle-launchers (-> self current-part-index) 0 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> gp-1 quad)) - (let ((gp-2 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-2 - (let ((t9-4 (method-of-type part-tracker-subsampler activate))) - (t9-4 - (the-as part-tracker-subsampler gp-2) - *entity-pool* - "part-tracker-subsampler" - (the-as pointer #x70004000) - ) - ) - (let ((t9-5 run-function-in-process) - (a0-18 gp-2) - (a1-3 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) - (-> self particle-launchers (-> self current-part-index) 0) - ) - (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-18 a1-3 *part-tracker-subsampler-params-default*) - ) - (-> gp-2 ppointer) - ) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> self particle-launchers (-> self current-part-index) 0) ) ) (else (set! (-> *launch-matrix* trans quad) (-> gp-1 quad)) - (let ((gp-3 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-3 - (let ((t9-7 (method-of-type part-tracker activate))) - (t9-7 (the-as part-tracker gp-3) *entity-pool* "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-8 run-function-in-process) - (a0-23 gp-3) - (a1-6 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> self particle-launchers (-> self current-part-index) 0)) - (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-8) a0-23 a1-6 *part-tracker-params-default*) - ) - (-> gp-3 ppointer) - ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> self particle-launchers (-> self current-part-index) 0) ) ) ) diff --git a/test/decompiler/reference/jak3/engine/common-obs/guard-projectile_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/guard-projectile_REF.gc new file mode 100644 index 0000000000..eb4c7d6ad8 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/guard-projectile_REF.gc @@ -0,0 +1,664 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpart 849 + :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 850 + :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 851 + :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 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 852 + :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 853 + :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 854 + :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 855 + :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-guard-shot-hit-object + :id 211 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 856 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 857 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 858 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-guard-shot-hit + :id 212 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 856 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 857 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 858 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 859 :period (seconds 2) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 858 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 128.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 8192.0) + ) + ) + +;; failed to figure out what this is: +(defpart 859 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 8.0 8.0) + (:scale-x (meters 0.75) (meters 0.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 128.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 857 + :init-specs ((:texture (glow level-default-sprite)) + (:num 2.0) + (:scale-x (meters 2)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0 64.0) + (:b 0.0 32.0) + (:a 48.0) + (:scalevel-x (meters 0.125)) + (: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 0.0) + (:next-time (seconds 0.067)) + (:next-launcher 860) + ) + ) + +;; failed to figure out what this is: +(defpart 860 + :init-specs ((:scale-x (meters 4.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.05)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.53333336) + (:fade-a -0.8) + ) + ) + +;; failed to figure out what this is: +(defpart 856 + :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.1)) + (: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 861) + ) + ) + +;; failed to figure out what this is: +(defpart 861 + :init-specs ((:scale-x (meters 3.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.0625)) + (:scalevel-y :copy scalevel-x) + (:fade-b -6.4) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-guard-grenade + :id 213 + :duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 862 :fade-after (meters 200) :falloff-to (meters 200))) + ) + +;; failed to figure out what this is: +(defpart 862 + :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)) + ) + ) + +;; definition of type guard-shot +(deftype guard-shot (projectile) + ((hit-actor? symbol) + (tail-pos vector :inline) + ) + ) + +;; definition for method 3 of type guard-shot +(defmethod inspect ((this guard-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 guard-shot +(defmethod deal-damage! ((this guard-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 guard-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-24 ((this guard-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* 855)) + (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 guard-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this guard-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* 850 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 850 init-specs 4 initial-valuef) (vector-length s5-1)) + (draw-beam (-> *part-id-table* 850) a1-0 s5-1 #f) + (set! (-> *part-id-table* 850 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* 853 init-specs 3 initial-valuef)) + (f28-1 (-> *part-id-table* 853 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* 853 init-specs 3 initial-valuef) (* f26-0 f30-1)) + (set! (-> *part-id-table* 853 init-specs 4 initial-valuef) (* f26-0 f28-1)) + (launch-particles (-> *part-id-table* 853) s4-1 :origin-is-matrix #t) + (set! (-> *part-id-table* 853 init-specs 3 initial-valuef) f30-1) + (set! (-> *part-id-table* 853 init-specs 4 initial-valuef) f28-1) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 26 of type guard-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this guard-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?) + (cond + ((logtest? (-> *part-group-id-table* 211 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-1 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 211)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-1 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) (-> v1-1 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 212)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-1 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 212)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 28 of type guard-shot +;; WARN: Return type mismatch int vs none. +(defmethod play-impact-sound ((this guard-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "guard-shot-fire") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "guard-shot-hit") + ) + ) + ) + 0 + (none) + ) + +;; definition for function guard-shot-move +;; WARN: Return type mismatch int vs none. +(defun guard-shot-move ((arg0 guard-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 guard-shot +(defmethod made-impact? ((this guard-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 guard-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this guard-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 guard-shot +;; INFO: Used lq/sq +(defmethod init-proj-settings! ((this guard-shot)) + (set! (-> this hit-actor?) #f) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this attack-mode) 'guard-shot) + (set! (-> this max-speed) 819200.0) + (set! (-> this move) guard-shot-move) + (set! (-> this update-velocity) projectile-update-velocity-space-wars) + (set! (-> this timeout) (seconds 0.5)) + (logior! (-> this options) (projectile-options po13)) + (set-gravity-length (-> this root dynam) 573440.0) + (none) + ) + +;; definition for function spawn-guard-projectile +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs (pointer guard-shot). +(defun spawn-guard-projectile ((arg0 process-focusable) (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 (pointer guard-shot) (spawn-projectile guard-shot gp-0 arg0 *default-dead-pool*)) + ) + ) diff --git a/test/decompiler/reference/jak3/engine/common-obs/metalhead-projectile_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/metalhead-projectile_REF.gc new file mode 100644 index 0000000000..7d4f178da8 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/metalhead-projectile_REF.gc @@ -0,0 +1,966 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpart 863 + :init-specs ((:texture (gun-enemy-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.25)) + (:scale-y (meters 12)) + (: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 864 + :init-specs ((:texture (glow-soft 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 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 865 + :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 866 + :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 867 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (: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-metalhead-shot-hit + :id 214 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 868 :period (seconds 2) :length (seconds 0.017)) + (sp-item 869 :fade-after (meters 100) :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 870 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 871 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 872 :period (seconds 2) :length (seconds 0.017)) + (sp-item 873 :fade-after (meters 50) :falloff-to (meters 50) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 871 + :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 872 + :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 873 + :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 874) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 874 + :init-specs ((:fade-a -0.48 -0.48)) + ) + +;; failed to figure out what this is: +(defpart 869 + :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 875) + ) + ) + +;; failed to figure out what this is: +(defpart 875 + :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 875) + ) + ) + +;; failed to figure out what this is: +(defpart 870 + :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 876) + ) + ) + +;; failed to figure out what this is: +(defpart 876 + :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 868 + :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 877) + ) + ) + +;; failed to figure out what this is: +(defpart 877 + :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-metalhead-shot-die + :id 215 + :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 878 + :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) + ) + ) + +;; definition of type metalhead-shot +(deftype metalhead-shot (projectile) + ((tail-pos vector :inline) + ) + ) + +;; definition for method 3 of type metalhead-shot +(defmethod inspect ((this metalhead-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 metalhead-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-24 ((this metalhead-shot)) + (draw-beam (-> *part-id-table* 866) (-> 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* 867)) + (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 metalhead-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this metalhead-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* 863 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 863 init-specs 4 initial-valuef) (fmin f28-0 (vector-length s5-1))) + (draw-beam (-> *part-id-table* 863) a1-0 s5-1 #f) + (set! (-> *part-id-table* 863 init-specs 4 initial-valuef) f28-0) + ) + (vector-normalize! s5-1 1.0) + (launch-particles (-> *part-id-table* 864) s4-0) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix)) + (f26-0 (* 0.000020345053 f30-0)) + (f30-1 (-> *part-id-table* 865 init-specs 3 initial-valuef)) + (f28-1 (-> *part-id-table* 865 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* 865 init-specs 3 initial-valuef) (* f26-0 f30-1)) + (set! (-> *part-id-table* 865 init-specs 5 initial-valuef) (* f26-0 f28-1)) + (launch-particles (-> *part-id-table* 865) s4-1 :origin-is-matrix #t) + (set! (-> *part-id-table* 865 init-specs 3 initial-valuef) f30-1) + (set! (-> *part-id-table* 865 init-specs 5 initial-valuef) f28-1) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 26 of type metalhead-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this metalhead-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* 214 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* 214)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-2 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 214)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 28 of type metalhead-shot +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this metalhead-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 metalhead-shot-move +;; WARN: Return type mismatch int vs none. +(defun metalhead-shot-move ((arg0 metalhead-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 (< 49152.0 f0-0) + (vector-normalize! s4-0 49152.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 metalhead-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this metalhead-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 metalhead-shot +;; INFO: Used lq/sq +(defmethod init-proj-settings! ((this metalhead-shot)) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (set! (-> this attack-mode) 'metalhead-shot) + (set! (-> this max-speed) 532480.0) + (set! (-> this move) metalhead-shot-move) + (set! (-> this timeout) (seconds 0.767)) + (set-gravity-length (-> this root dynam) 573440.0) + (none) + ) + +;; definition for function spawn-metalhead-projectile +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs (pointer metalhead-shot). +(defun spawn-metalhead-projectile ((arg0 metalhead-shot) (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 metalhead-shot) (spawn-projectile metalhead-shot gp-0 arg0 *default-dead-pool*)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-metalhead-grenade-shot + :id 216 + :duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 879) (sp-item 880) (sp-item 881)) + ) + +;; failed to figure out what this is: +(defpart 879 + :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 880 + :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 881 + :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 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: +(defpart 882 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.48 -0.48)) + ) + +;; definition of type metalhead-grenade-shot +(deftype metalhead-grenade-shot (projectile) + ((tumble-quat quaternion :inline) + (blast-radius float) + ) + ) + +;; definition for method 3 of type metalhead-grenade-shot +(defmethod inspect ((this metalhead-grenade-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (format #t "~2Ttumble-quat: #~%" (-> this tumble-quat)) + (format #t "~2Tblast-radius: ~f~%" (-> this blast-radius)) + (label cfg-4) + this + ) + +;; definition for method 26 of type metalhead-grenade-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this metalhead-grenade-shot)) + (cond + ((logtest? (-> *part-group-id-table* 104 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* 104)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 104)) + ) + ) + 0 + (none) + ) + +;; definition for method 28 of type metalhead-grenade-shot +;; WARN: Return type mismatch int vs none. +(defmethod play-impact-sound ((this metalhead-grenade-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "gren-launch") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "gren-shot-hit") + ) + ((= v1-0 (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 (metalhead-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) + (the-as process-focusable s4-0) + ) + ) + ) + (when v1-1 + (let ((s4-1 (-> 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 (-> 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 () + (let ((t9-0 (-> (method-of-type projectile impact) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-5 (-> self root root-prim))) + (set! (-> v1-5 local-sphere w) (-> self blast-radius)) + (set! (-> v1-5 prim-core world-sphere w) (-> self blast-radius)) + (set! (-> v1-5 prim-core collide-with) + (collide-spec jak crate civilian enemy obstacle vehicle-sphere hit-by-others-list player-list) + ) + (set! (-> v1-5 prim-core collide-as) (collide-spec enemy)) + ) + (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*) + (find-overlapping-shapes (-> self root) a1-0) + ) + ) + :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) + ) + (deactivate self) + ) + ) + +;; failed to figure out what this is: +(defstate dissipate (metalhead-grenade-shot) + :virtual #t + :enter (behavior () + (go-virtual impact) + ) + ) + +;; definition for method 25 of type metalhead-grenade-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this metalhead-grenade-shot)) + (spawn (-> this part) (-> this root trans)) + 0 + (none) + ) + +;; definition for function gren-canister-move +;; WARN: Return type mismatch int vs none. +(defun gren-canister-move ((arg0 metalhead-grenade-shot)) + (quaternion*! (-> arg0 root quat) (-> arg0 root quat) (-> arg0 tumble-quat)) + (projectile-move-fill-all-dirs arg0) + (let ((s5-0 (new 'stack-no-clear 'water-info))) + (water-info-init! (-> arg0 root) s5-0 (collide-action solid semi-solid)) + (if (and (logtest? (-> s5-0 flags) (water-flag active)) (< (-> arg0 root trans y) (-> s5-0 trans y))) + (go (method-of-object arg0 impact)) + ) + ) + (if (logtest? (-> arg0 root status) (collide-status touch-surface)) + (go (method-of-object arg0 impact)) + ) + 0 + (none) + ) + +;; definition for function gren-cshape-reaction-canister +;; WARN: Return type mismatch int vs none. +(defun gren-cshape-reaction-canister ((arg0 collide-shape-moving) (arg1 metalhead-grenade-shot)) + (let ((s5-0 0)) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (vector-float*! a1-1 (the-as vector (&-> arg1 starting-dir y)) (the-as float (-> arg1 connection-list prev0))) + (move-by-vector! arg0 a1-1) + ) + (let ((f30-0 (vector-dot (-> arg0 transv) (the-as vector (&-> arg1 prev-state)))) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (vector-float*! s3-0 (the-as vector (&-> arg1 prev-state)) (* f30-0 (rand-vu-float-range 1.6 2.2))) + (vector-! (-> arg0 transv) (-> arg0 transv) s3-0) + ) + (let ((v0-2 (logior s5-0 7))) + (logior! (-> arg0 status) v0-2) + ) + ) + (vector-float*! (-> arg0 transv) (-> arg0 transv) 0.88) + (none) + ) + +;; definition for method 30 of type metalhead-grenade-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this metalhead-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)) + (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 backgnd 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 1228.8) + (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 31 of type metalhead-grenade-shot +;; WARN: Return type mismatch sound-id vs none. +(defmethod init-proj-settings! ((this metalhead-grenade-shot)) + (set! (-> this attack-mode) 'explode) + (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* 216) this)) + (set! (-> this sound-id) (new-sound-id)) + (none) + ) + +;; definition for function spawn-metalhead-grenade +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs (pointer metalhead-grenade-shot). +(defun spawn-metalhead-grenade ((arg0 metalhead-grenade-shot) (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 metalhead-grenade-shot) (spawn-projectile metalhead-shot gp-0 arg0 *default-dead-pool*)) + ) + ) diff --git a/test/decompiler/reference/jak3/engine/common-obs/particle-curves_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/particle-curves_REF.gc new file mode 100644 index 0000000000..88ee49abb2 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/particle-curves_REF.gc @@ -0,0 +1,201 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type particle-curve-settings +(deftype particle-curve-settings (structure) + ((color-start basic) + (alpha-start basic) + (scale-x-start basic) + (scale-y-start basic) + (r-scalar basic) + (g-scalar basic) + (b-scalar basic) + (a-scalar basic) + (scale-x-scalar basic) + (scale-y-scalar basic) + (lifetime-base time-frame) + (lifetime-offset time-frame) + (flags particle-curve-flags) + ) + ) + +;; definition for method 3 of type particle-curve-settings +(defmethod inspect ((this particle-curve-settings)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'particle-curve-settings) + (format #t "~1Tcolor-start: ~A~%" (-> this color-start)) + (format #t "~1Talpha-start: ~A~%" (-> this alpha-start)) + (format #t "~1Tscale-x-start: ~A~%" (-> this scale-x-start)) + (format #t "~1Tscale-y-start: ~A~%" (-> this scale-y-start)) + (format #t "~1Tr-scalar: ~A~%" (-> this r-scalar)) + (format #t "~1Tg-scalar: ~A~%" (-> this g-scalar)) + (format #t "~1Tb-scalar: ~A~%" (-> this b-scalar)) + (format #t "~1Ta-scalar: ~A~%" (-> this a-scalar)) + (format #t "~1Tscale-x-scalar: ~A~%" (-> this scale-x-scalar)) + (format #t "~1Tscale-y-scalar: ~A~%" (-> this scale-y-scalar)) + (format #t "~1Tlifetime-base: ~D~%" (-> this lifetime-base)) + (format #t "~1Tlifetime-offset: ~D~%" (-> this lifetime-offset)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (label cfg-4) + this + ) + +;; definition for function birth-func-curve +;; INFO: function output is handled by mips2c +(def-mips2c birth-func-curve (function int sparticle-cpuinfo sparticle-launchinfo none)) + +;; definition for function live-func-curve +;; INFO: function output is handled by mips2c +(def-mips2c live-func-curve (function sparticle-system sparticle-cpuinfo vector none)) + +;; failed to figure out what this is: +(defpart 69 + :init-specs ((:texture (middot level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.01)) + (:timer (seconds 16.667)) + (:flags ()) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees -30) (degrees 60)) + (:conerot-z (degrees -30) (degrees 60)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *alpha-fast* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.25 :z -0.5 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 0.75 :z 0.5) + :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! *unity-fast* (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! *ccro* (new 'static 'curve-color-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'inline-array vector 4 + (new 'static 'vector :x 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :w 128.0) + (new 'static 'vector :x 128.0 :y 128.0 :z 128.0 :w 128.0) + (new 'static 'vector :y 128.0 :w 128.0) + ) + :one-over-x-deltas (new 'static 'vector :x 2.5 :y 3.3333335 :z 3.3333333 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *scale-curve* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.7 :w -1.0) + :ys (new 'static 'vector :x 1.0 :y 0.1 :z 0.1 :w 6.0) + :one-over-x-deltas (new 'static 'vector :x -2.9999998 :z 19.666666 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *scale-range* (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 0.4 :z 1.4 :w 2.4) + :one-over-x-deltas (new 'static 'vector :x 0.099999994 :y 1.0 :z 1.0000001 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-function-curve-test-curve-settings*, type particle-curve-settings +(define *part-function-curve-test-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* 69 init-specs 12 initial-valuef) + (the-as float *part-function-curve-test-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-function-curve-test-curve-settings* color-start) *ccro*) + +;; failed to figure out what this is: +(set! (-> *part-function-curve-test-curve-settings* alpha-start) *unity-fast*) + +;; failed to figure out what this is: +(set! (-> *part-function-curve-test-curve-settings* scale-x-start) *scale-range*) + +;; failed to figure out what this is: +(set! (-> *part-function-curve-test-curve-settings* scale-y-start) #f) + +;; failed to figure out what this is: +(set! (-> *part-function-curve-test-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-function-curve-test-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-function-curve-test-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-function-curve-test-curve-settings* a-scalar) *alpha-fast*) + +;; failed to figure out what this is: +(set! (-> *part-function-curve-test-curve-settings* scale-x-scalar) *scale-curve*) + +;; failed to figure out what this is: +(set! (-> *part-function-curve-test-curve-settings* scale-y-scalar) #f) + +;; definition for function ptest +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defun ptest () + (dotimes (gp-0 1000) + (let ((t9-0 sp-launch-particles-var) + (a0-0 *sp-particle-system-2d*) + (a1-0 (-> *part-id-table* 69)) + (a2-0 *launch-matrix*) + ) + (let ((v1-1 (-> a2-0 trans)) + (a3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a3-0 x) 0.0) + (set! (-> a3-0 y) 40960.0) + (set! (-> a3-0 z) 0.0) + (set! (-> a3-0 w) 1.0) + (set! (-> v1-1 quad) (-> a3-0 quad)) + ) + (t9-0 a0-0 a1-0 a2-0 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/common-obs/plat_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/plat_REF.gc new file mode 100644 index 0000000000..91a8fe92b5 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/plat_REF.gc @@ -0,0 +1,359 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type plat +(deftype plat (base-plat) + ((path-pos float) + (sound-id sound-id) + (sync sync-eased :inline) + ) + (:state-methods + plat-idle + plat-path-active + ) + (:methods + (go-initial-state (_type_) object) + ) + ) + +;; definition for method 3 of type plat +(defmethod inspect ((this plat)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type base-plat inspect))) + (t9-0 this) + ) + (format #t "~2Tpath-pos: ~f~%" (-> this path-pos)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Tsync: #~%" (-> this sync)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-plat plat plat-lod0-jg plat-idle-ja + ((plat-lod0-mg (meters 20)) (plat-lod1-mg (meters 40)) (plat-lod2-mg (meters 999999))) + :bounds (static-spherem 0 -0.5 0 3) + ) + +;; definition for method 31 of type plat +(defmethod get-art-group ((this plat)) + (art-group-get-by-name *level* "skel-plat" (the-as (pointer level) #f)) + ) + +;; definition for method 32 of type plat +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this plat)) + (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) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 13107.2) + (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-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 34 of type plat +;; WARN: Return type mismatch int vs none. +(defmethod base-plat-method-34 ((this plat)) + 0 + (none) + ) + +;; definition for method 33 of type plat +;; WARN: Return type mismatch int vs none. +(defmethod base-plat-method-33 ((this plat)) + 0 + (none) + ) + +;; definition for method 37 of type plat +(defmethod go-initial-state ((this plat)) + (cond + ((logtest? (-> this path flags) (path-control-flag not-found)) + (go (method-of-object this plat-idle)) + ) + ((> (-> this sync period) 0) + (go (method-of-object this plat-path-active)) + ) + (else + (go (method-of-object this plat-idle)) + ) + ) + ) + +;; failed to figure out what this is: +(defstate plat-idle (plat) + :virtual #t + :event plat-event + :trans (behavior () + (update-part-and-sfx! self) + ) + :code (behavior () + (plat-trans) + (rider-post) + (suspend) + (until #f + (when (not (-> self bouncing)) + (plat-trans) + (rider-post) + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + 0 + ) + (while (-> self bouncing) + (plat-trans) + (rider-post) + (suspend) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate plat-path-active (plat) + :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)) 81920.0) + (sound-play "eco-plat-hover" :id (-> self sound-id) :position (-> self root trans)) + ) + (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 for method 11 of type plat +(defmethod init-from-entity! ((this plat) (arg0 entity-actor)) + (logior! (-> this mask) (process-mask platform)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton this (the-as skeleton-group (get-art-group this)) (the-as pair 0)) + (update-transforms (-> this root)) + (init-bounce-params! this) + (base-plat-method-33 this) + (set! (-> this fact) + (new 'process 'fact-info this (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc)) + ) + (let ((a1-4 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-15 0)) + (if (not (logtest? (-> this fact options) (actor-option loop))) + (set! v1-15 (logior v1-15 1)) + ) + (set! (-> a1-4 sync-type) 'sync-eased) + (set! (-> a1-4 sync-flags) (the-as sync-flags v1-15)) + ) + (set! (-> a1-4 period) (the-as uint 1200)) + (set! (-> a1-4 entity) arg0) + (set! (-> a1-4 percent) 0.0) + (set! (-> a1-4 ease-in) 0.15) + (set! (-> a1-4 ease-out) 0.15) + (set! (-> a1-4 pause-in) 0.0) + (set! (-> a1-4 pause-out) 0.0) + (initialize! (-> this sync) a1-4) + ) + (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 sound-id) (new-sound-id)) + (cond + ((logtest? (-> this path flags) (path-control-flag not-found)) + (set! (-> this path-pos) 0.0) + (base-plat-method-34 this) + (go-initial-state this) + ) + ((> (-> 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) + (base-plat-method-34 this) + (go-initial-state this) + ) + (else + (set! (-> this path-pos) 0.0) + (get-point-at-percent-along-path! (-> this path) (-> this root trans) (-> this path-pos) 'interp) + (base-plat-method-34 this) + (go-initial-state this) + ) + ) + ) + +;; definition of type drop-plat +(deftype drop-plat (base-plat) + ((art-name string) + (anim spool-anim) + (break-anim-name string) + (safe-time time-frame) + (hit-point vector :inline) + ) + (:state-methods + idle + (fall symbol) + ) + ) + +;; definition for method 3 of type drop-plat +(defmethod inspect ((this drop-plat)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type base-plat inspect))) + (t9-0 this) + ) + (format #t "~2Tart-name: ~A~%" (-> this art-name)) + (format #t "~2Tanim: ~A~%" (-> this anim)) + (format #t "~2Tbreak-anim-name: ~A~%" (-> this break-anim-name)) + (format #t "~2Tsafe-time: ~D~%" (-> this safe-time)) + (format #t "~2Thit-point: ~`vector`P~%" (-> this hit-point)) + (label cfg-4) + this + ) + +;; definition for method 7 of type drop-plat +;; WARN: Return type mismatch base-plat vs drop-plat. +(defmethod relocate ((this drop-plat) (offset int)) + (if (nonzero? (-> this break-anim-name)) + (&+! (-> this break-anim-name) offset) + ) + (let ((v1-5 (-> this anim anim-name))) + (if (and (>= (the-as int v1-5) (-> *kernel-context* relocating-min)) + (< (the-as int v1-5) (-> *kernel-context* relocating-max)) + ) + (&+! (-> this anim anim-name) offset) + ) + ) + (the-as drop-plat ((method-of-type base-plat relocate) this offset)) + ) + +;; failed to figure out what this is: +(defstate idle (drop-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch 'attack 'bonk) + (let* ((s5-0 proc) + (a0-5 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (cond + ((and a0-5 (focus-test? (the-as process-focusable a0-5) edge-grab)) + (set! (-> self safe-time) (+ (current-time) (seconds 0.2))) + (return (the-as object #f)) + ) + ((not (time-elapsed? (-> self safe-time) (seconds 0.05))) + (return (the-as object #f)) + ) + ) + ) + (set! (-> self hit-point quad) (-> self root trans quad)) + (let ((a0-13 (if (type? proc process-focusable) + proc + ) + ) + ) + (set! (-> self hit-point quad) (-> (get-trans (the-as process-focusable a0-13) 0) quad)) + ) + (if (zero? (-> self bounce-time)) + (start-bounce! self) + ) + #f + ) + ) + ) + :trans plat-trans + :code (behavior () + (add-process *gui-control* self (gui-channel art-load) (gui-action queue) (-> self anim name) -99.0 0) + (until #f + (when (not (-> self bouncing)) + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + 0 + ) + (while (-> self bouncing) + (suspend) + ) + (go-virtual fall #f) + ) + #f + ) + :post plat-post + ) + +;; failed to figure out what this is: +(defstate fall (drop-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('edge-grabbed) + (if (time-elapsed? (-> self state-time) (seconds 0.5)) + (send-event proc 'end-mode 'edge-grab) + ) + ) + (('die) + (go-virtual fall #t) + ) + ) + ) + :enter (behavior ((arg0 symbol)) + (set-time! (-> self state-time)) + ) + :exit (behavior () + (ja-abort-spooled-anim (-> self anim) (the-as art-joint-anim #f) -1) + ) + :trans rider-trans + :code (behavior ((arg0 symbol)) + (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 + (if (not arg0) + (ja-play-spooled-anim + (-> self anim) + (ja-group) + (the-as art-joint-anim #f) + (the-as (function process-drawable symbol) false-func) + (spooler-flags) + ) + ) + (ja-channel-set! 0) + (suspend) + (logior! (-> self mask) (process-mask sleep)) + (suspend) + 0 + ) + :post rider-post + ) diff --git a/test/decompiler/reference/jak3/engine/common-obs/powerups_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/powerups_REF.gc new file mode 100644 index 0000000000..7c98cf8378 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/powerups_REF.gc @@ -0,0 +1,1309 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function cloud-track +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior cloud-track process ((arg0 process-tree) + (arg1 process-tree) + (arg2 (function vector none)) + (arg3 time-frame) + (arg4 time-frame) + (arg5 time-frame) + ) + (change-parent self arg0) + (let ((s1-1 (process->handle arg0)) + (s2-1 (process->handle arg1)) + ) + (let ((s0-0 (current-time))) + (until (time-elapsed? s0-0 (+ arg3 arg4)) + (let ((v1-8 (or (not (handle->process s1-1)) (not (handle->process s2-1))))) + (if v1-8 + (deactivate self) + ) + ) + (let* ((f0-1 (fmax 0.0 (fmin 1.0 (/ (- (the float (- (current-time) s0-0)) (the float arg3)) (the float arg4))))) + (a0-18 (process-drawable-pair-random-point! + (the-as process-drawable (-> s1-1 process 0)) + (the-as process-drawable (-> s2-1 process 0)) + (new-stack-vector0) + f0-1 + ) + ) + ) + (arg2 a0-18) + ) + (suspend) + ) + ) + (cond + ((zero? arg5) + (until #f + (suspend) + ) + #f + ) + (else + (let ((s4-1 (current-time))) + (until (time-elapsed? s4-1 arg5) + (let ((a0-21 (process-drawable-random-point! (the-as process-drawable (-> s2-1 process 0)) (new-stack-vector0)))) + (arg2 a0-21) + ) + (suspend) + ) + ) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defpart 784 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1.5) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 192.0) + (:a 64.0) + (:fade-a -1.0666667) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 785 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1.5) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 192.0) + (:a 64.0) + (:fade-a -1.0666667) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 786 + :init-specs ((:texture (common-white common)) + (:num 1.0 3.0) + (:scale-x (meters 0.5) (meters 1.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 128.0) + (:fade-a -1.6) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.035)) + (:next-launcher 787) + ) + ) + +;; failed to figure out what this is: +(defpart 788 + :init-specs ((:texture (common-white common)) + (:num 0.0 3.0) + (:scale-x (meters 1.5) (meters 1.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:fade-a -1.6) + (:timer (seconds 0.305)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.035)) + (:next-launcher 787) + ) + ) + +;; failed to figure out what this is: +(defpart 787 + :init-specs ((:r 64.0) (:g 64.0) (:fade-r -1.0) (:fade-g -0.4) (:fade-a -2.0)) + ) + +;; failed to figure out what this is: +(defpart 789 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.1) (meters 0.15)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0 64.0) + (:b 192.0 64.0) + (:a 64.0 128.0) + (:scalevel-x (meters -0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.2) + (:accel-y (meters -0.000016666667)) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-blue-hit-ground-effect + :id 194 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 790) (sp-item 791) (sp-item 792 :flags (is-3d)) (sp-item 793) (sp-item 794 :flags (is-3d))) + ) + +;; failed to figure out what this is: +(defpart 793 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 32.0) + (:y (meters 0.5)) + (:scale-x (meters 1) (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 32.0 32.0) + (:b 192.0 63.0) + (:a 0.0 63 1.0) + (:vel-y (meters 0.093333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3)) + (:next-time (seconds 0.067) (seconds 0.065)) + (:next-launcher 795) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 795 + :init-specs ((:r 0.0) + (:g 32.0 32.0) + (:b 192.0 63.0) + (:a 0.0 63 1.0) + (:next-time (seconds 0.067) (seconds 0.065)) + (:next-launcher 795) + ) + ) + +;; failed to figure out what this is: +(defpart 794 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:scale-x (meters 0)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 32.0 32.0) + (:b 192.0 63.0) + (:a 96.0 32.0) + (:scalevel-x (meters 0.21333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.2)) + (:next-launcher 796) + ) + ) + +;; failed to figure out what this is: +(defpart 796 + :init-specs ((:fade-a -2.1333334)) + ) + +;; failed to figure out what this is: +(defpart 792 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:scale-x (meters 0)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 32.0 32.0) + (:b 192.0 63.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.22666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.7111111) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.15)) + (:next-launcher 797) + ) + ) + +;; failed to figure out what this is: +(defpart 797 + :init-specs ((:fade-a -1.4222223)) + ) + +;; failed to figure out what this is: +(defpart 790 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 32.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 32.0 32.0) + (:b 192.0 63.0) + (:a 16.0 32.0) + (:vel-y (meters 0.053333335) (meters 0.026666667)) + (: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 791 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 12.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 32.0 32.0) + (:b 192.0 63.0) + (:a 16.0 16.0) + (:vel-y (meters 0.10666667) (meters 0.053333335)) + (: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 798 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1.5) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 92.0 32.0) + (:g 32.0 92.0) + (:b 0.0) + (:a 64.0) + (:fade-a -1.0) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 799 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1.5) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 92.0 32.0) + (:g 32.0 92.0) + (:b 0.0) + (:a 64.0) + (:fade-a -1.0) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 800 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.5 2.0) + (:y (meters -0.05)) + (:scale-x (meters 0.2) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 100.0 28.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 64.0 64.0) + (:vel-y (meters 0.0023333333) (meters 0.0016666667)) + (:scalevel-x (meters -0.00083333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.4) + (:fade-a -0.024242423) + (:accel-y (meters -0.000100000005) (meters -0.0003)) + (:friction 0.93) + (:timer (seconds 0.1) (seconds 0.697)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.3)) + (:next-launcher 801) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.05)) + ) + ) + +;; failed to figure out what this is: +(defpart 801 + :init-specs ((:fade-r 0.0)) + ) + +;; failed to figure out what this is: +(defpart 802 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1.5) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 92.0 32.0) + (:g 0.0) + (:b 0.0) + (:a 64.0) + (:fade-a -1.0) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 803 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1.5) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 92.0 32.0) + (:g 0.0) + (:b 0.0) + (:a 64.0) + (:fade-a -1.0) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 804 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.5 2.0) + (:y (meters -0.05)) + (:scale-x (meters 0.2) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 100.0 28.0) + (:g 0.0) + (:b 0.0) + (:a 64.0 64.0) + (:vel-y (meters 0.0023333333) (meters 0.0016666667)) + (:scalevel-x (meters -0.00083333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.4) + (:fade-a -0.024242423) + (:accel-y (meters -0.000100000005) (meters -0.0003)) + (:friction 0.93) + (:timer (seconds 0.1) (seconds 0.697)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.3)) + (:next-launcher 805) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.05)) + ) + ) + +;; failed to figure out what this is: +(defpart 805 + :init-specs ((:fade-r 0.0)) + ) + +;; failed to figure out what this is: +(defpart 806 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1.5) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 92.0 32.0) + (:b 0.0) + (:a 64.0) + (:fade-a -1.0) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 807 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1.5) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 92.0 32.0) + (:b 0.0) + (:a 64.0) + (:fade-a -1.0) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 808 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.5 2.0) + (:y (meters -0.05)) + (:scale-x (meters 0.2) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 100.0 28.0) + (:b 0.0) + (:a 64.0 64.0) + (:vel-y (meters 0.0023333333) (meters 0.0016666667)) + (:scalevel-x (meters -0.00083333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.4) + (:fade-a -0.024242423) + (:accel-y (meters -0.000100000005) (meters -0.0003)) + (:friction 0.93) + (:timer (seconds 0.1) (seconds 0.697)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.3)) + (:next-launcher 809) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.05)) + ) + ) + +;; failed to figure out what this is: +(defpart 809 + :init-specs ((:fade-g 0.0)) + ) + +;; definition for function eco-blue-glow +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun eco-blue-glow ((arg0 vector)) + (launch-particles (-> *part-id-table* 784) arg0) + (if (rand-vu-percent? 0.5) + (launch-particles (-> *part-id-table* 786) arg0) + ) + 0 + (none) + ) + +;; definition for function target-eco-process +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior target-eco-process target () + (when (and (!= (-> self fact eco-level) 0.0) + (>= (- (-> *display* game-clock frame-counter) (-> self fact eco-pickup-time)) + (the-as time-frame (-> self fact eco-timeout)) + ) + ) + (set! (-> self fact eco-level) 0.0) + (set! (-> self fact eco-timeout) 0) + (logclear! (-> self target-flags) (target-flags tf4)) + (send-event self 'reset-collide) + (stop! (-> self sound)) + ) + (if (logtest? (game-secrets endless-dark) (-> self game secrets)) + (set! (-> self game eco-pill-dark) (-> *FACT-bank* eco-pill-dark-max-default)) + ) + (if (logtest? (game-secrets endless-light) (-> self game secrets)) + (set! (-> self game eco-pill-light) (-> *FACT-bank* eco-pill-light-max-default)) + ) + (when (and (< 0.0 (-> self fact eco-level)) + (not (focus-test? self in-head)) + (not (logtest? (-> self draw status) (draw-control-status no-draw no-draw-temp))) + (not (movie?)) + (rand-vu-percent? + (lerp-scale + 0.0 + 1.0 + (the float (- (-> self fact eco-timeout) + (the-as uint (- (-> *display* game-clock frame-counter) (-> self fact eco-pickup-time))) + ) + ) + 0.0 + 900.0 + ) + ) + ) + (case (-> self fact eco-type) + ((1) + (change-sound! (-> self sound) (static-sound-name "yel-eco-jak")) + (let ((s1-0 (rand-vu-int-range 3 (+ (-> self node-list length) -1))) + (gp-1 sp-launch-particles-var) + (s5-0 *sp-particle-system-2d*) + (s4-0 (-> *part-id-table* (if (rand-vu-percent? 0.5) + 798 + 799 + ) + ) + ) + (s2-0 *launch-matrix*) + ) + (set! (-> s2-0 trans quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data s1-0)) quad) + ) + (gp-1 s5-0 s4-0 s2-0 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (dotimes (gp-2 2) + (let ((v1-58 (rand-vu-int-range 3 (+ (-> self node-list length) -1))) + (s5-1 sp-launch-particles-var) + (s4-1 *sp-particle-system-2d*) + (s3-1 (-> *part-id-table* 800)) + (s1-1 *launch-matrix*) + ) + (set! (-> s1-1 trans quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data v1-58)) quad) + ) + (s5-1 s4-1 s3-1 s1-1 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ((2) + (target-danger-set! (-> self control danger-mode) 'eco-red) + (update-transforms (-> self control)) + (let ((a1-13 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-13 options) (overlaps-others-options)) + (set! (-> a1-13 collide-with-filter) (the-as collide-spec -1)) + (set! (-> a1-13 tlist) *touching-list*) + (find-overlapping-shapes (-> self control) a1-13) + ) + (target-danger-set! (-> self control danger-mode) #f) + (update-transforms (-> self control)) + (change-sound! (-> self sound) (static-sound-name "red-eco-jak")) + (let ((s1-2 (rand-vu-int-range 3 (+ (-> self node-list length) -1))) + (gp-3 sp-launch-particles-var) + (s5-2 *sp-particle-system-2d*) + (s4-2 (-> *part-id-table* (if (rand-vu-percent? 0.5) + 802 + 803 + ) + ) + ) + (s2-2 *launch-matrix*) + ) + (set! (-> s2-2 trans quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data s1-2)) quad) + ) + (gp-3 s5-2 s4-2 s2-2 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (dotimes (gp-4 2) + (let ((v1-91 (rand-vu-int-range 3 (+ (-> self node-list length) -1))) + (s5-3 sp-launch-particles-var) + (s4-3 *sp-particle-system-2d*) + (s3-3 (-> *part-id-table* 804)) + (s1-3 *launch-matrix*) + ) + (set! (-> s1-3 trans quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data v1-91)) quad) + ) + (s5-3 s4-3 s3-3 s1-3 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ((3) + (change-sound! (-> self sound) (static-sound-name "blue-eco-jak")) + (let ((v1-104 (rand-vu-int-range 3 (+ (-> self node-list length) -1)))) + (cond + ((and (logtest? (-> self control mod-surface flags) (surface-flag air)) + (not (logtest? (-> self control status) (collide-status on-surface))) + ) + (set! (-> *part-id-table* 788 init-specs 4 initial-valuef) 0.0) + (set! (-> *part-id-table* 788 init-specs 4 random-rangef) 65536.0) + ) + (else + (set! (-> *part-id-table* 788 init-specs 4 initial-valuef) 40960.0) + (set! (-> *part-id-table* 788 init-specs 4 random-rangef) 16384.0) + ) + ) + (launch-particles + (-> *part-id-table* 788) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data v1-104)) + ) + ) + (let ((gp-6 (rand-vu-int-range 3 (+ (-> self node-list length) -1)))) + (launch-particles + (-> *part-id-table* (if (rand-vu-percent? 0.5) + 784 + 785 + ) + ) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data gp-6)) + ) + (if (rand-vu-percent? 0.5) + (launch-particles + (-> *part-id-table* 786) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data gp-6)) + ) + ) + ) + (let ((v1-128 (rand-vu-int-range 3 (+ (-> self node-list length) -1))) + (gp-7 sp-launch-particles-var) + (s5-7 *sp-particle-system-2d*) + (s4-7 (-> *part-id-table* 789)) + (s2-7 *launch-matrix*) + ) + (set! (-> s2-7 trans quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data v1-128)) quad) + ) + (gp-7 s5-7 s4-7 s2-7 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 0 1 (seconds 0.1)) + ) + ((5) + (change-sound! (-> self sound) (static-sound-name "green-eco-jak")) + (let ((s1-6 (rand-vu-int-range 3 (+ (-> self node-list length) -1))) + (gp-8 sp-launch-particles-var) + (s5-8 *sp-particle-system-2d*) + (s4-8 (-> *part-id-table* (if (rand-vu-percent? 0.5) + 806 + 807 + ) + ) + ) + (s2-8 *launch-matrix*) + ) + (set! (-> s2-8 trans quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data s1-6)) quad) + ) + (gp-8 s5-8 s4-8 s2-8 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (dotimes (gp-9 2) + (let ((v1-152 (rand-vu-int-range 3 (+ (-> self node-list length) -1))) + (s5-9 sp-launch-particles-var) + (s4-9 *sp-particle-system-2d*) + (s3-9 (-> *part-id-table* 808)) + (s1-7 *launch-matrix*) + ) + (set! (-> s1-7 trans quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data v1-152)) quad) + ) + (s5-9 s4-9 s3-9 s1-7 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ) + (update-trans! (-> self sound) (-> self control trans)) + (update! (-> self sound)) + ) + 0 + (none) + ) + +;; definition for function target-color-effect-process +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior target-color-effect-process target () + (when (and (-> self color-effect) (time-elapsed? (-> self color-effect-start-time) (-> self color-effect-duration))) + (set! (-> self color-effect) #f) + (set-vector! (-> self draw color-mult) 1.0 1.0 1.0 1.0) + (set! (-> self draw color-emissive quad) (the-as uint128 0)) + ) + (case (-> self color-effect) + (('shock) + (let ((f0-4 (rand-vu-float-range 0.5 2.0))) + (set-vector! (-> self draw color-mult) f0-4 f0-4 (+ 0.5 f0-4) 1.0) + ) + ) + (('eco-pill-dark) + (let ((f30-0 (lerp-scale + 1.0 + 0.0 + (the float (- (current-time) (-> self color-effect-start-time))) + (* 0.25 (the float (-> self color-effect-duration))) + (the float (-> self color-effect-duration)) + ) + ) + ) + (set-vector! (-> self draw color-mult) (lerp 1.0 1.0 f30-0) (lerp 1.0 0.0 f30-0) (lerp 1.0 1.0 f30-0) 1.0) + (set-vector! (-> self draw color-emissive) (lerp 0.0 0.3 f30-0) (lerp 0.0 0.0 f30-0) (lerp 0.0 0.3 f30-0) 1.0) + ) + ) + (('eco-pill-light) + (let ((f30-1 (lerp-scale + 1.0 + 0.0 + (the float (- (current-time) (-> self color-effect-start-time))) + (* 0.25 (the float (-> self color-effect-duration))) + (the float (-> self color-effect-duration)) + ) + ) + ) + (set-vector! (-> self draw color-mult) (lerp 1.0 5.0 f30-1) (lerp 1.0 5.0 f30-1) (lerp 1.0 5.0 f30-1) 1.0) + (set-vector! (-> self draw color-emissive) (lerp 0.0 2.0 f30-1) (lerp 0.0 2.0 f30-1) (lerp 0.0 2.0 f30-1) 1.0) + ) + ) + (('ammo-yellow) + (let ((f30-2 (lerp-scale + 1.0 + 0.0 + (the float (- (current-time) (-> self color-effect-start-time))) + (* 0.25 (the float (-> self color-effect-duration))) + (the float (-> self color-effect-duration)) + ) + ) + ) + (set-vector! (-> self draw color-mult) (lerp 1.0 1.0 f30-2) (lerp 1.0 1.0 f30-2) (lerp 1.0 0.0 f30-2) 1.0) + (set-vector! (-> self draw color-emissive) (lerp 0.0 0.3 f30-2) (lerp 0.0 0.3 f30-2) (lerp 0.0 0.0 f30-2) 1.0) + ) + ) + (('ammo-red) + (let ((f30-3 (lerp-scale + 1.0 + 0.0 + (the float (- (current-time) (-> self color-effect-start-time))) + (* 0.25 (the float (-> self color-effect-duration))) + (the float (-> self color-effect-duration)) + ) + ) + ) + (set-vector! (-> self draw color-mult) (lerp 1.0 1.0 f30-3) (lerp 1.0 0.6 f30-3) (lerp 1.0 0.6 f30-3) 1.0) + (set-vector! (-> self draw color-emissive) (lerp 0.0 0.3 f30-3) (lerp 0.0 0.0 f30-3) (lerp 0.0 0.0 f30-3) 1.0) + ) + ) + (('ammo-blue) + (let ((f30-4 (lerp-scale + 1.0 + 0.0 + (the float (- (current-time) (-> self color-effect-start-time))) + (* 0.25 (the float (-> self color-effect-duration))) + (the float (-> self color-effect-duration)) + ) + ) + ) + (set-vector! (-> self draw color-mult) (lerp 1.0 0.6 f30-4) (lerp 1.0 0.8 f30-4) (lerp 1.0 1.0 f30-4) 1.0) + (set-vector! (-> self draw color-emissive) (lerp 0.0 0.0 f30-4) (lerp 0.0 0.1 f30-4) (lerp 0.0 0.3 f30-4) 1.0) + ) + ) + (('ammo-dark) + (let ((f30-5 (lerp-scale + 1.0 + 0.0 + (the float (- (current-time) (-> self color-effect-start-time))) + (* 0.25 (the float (-> self color-effect-duration))) + (the float (-> self color-effect-duration)) + ) + ) + ) + (set-vector! (-> self draw color-mult) (lerp 1.0 1.0 f30-5) (lerp 1.0 0.7 f30-5) (lerp 1.0 0.8 f30-5) 1.0) + (set-vector! (-> self draw color-emissive) (lerp 0.0 0.2 f30-5) (lerp 0.0 0.0 f30-5) (lerp 0.0 0.1 f30-5) 1.0) + ) + ) + (('health 'eco-green) + (let ((f30-6 (lerp-scale + 1.0 + 0.0 + (the float (- (current-time) (-> self color-effect-start-time))) + (* 0.25 (the float (-> self color-effect-duration))) + (the float (-> self color-effect-duration)) + ) + ) + ) + (set-vector! (-> self draw color-mult) (lerp 1.0 0.5 f30-6) (lerp 1.0 1.0 f30-6) (lerp 1.0 0.5 f30-6) 1.0) + (set-vector! (-> self draw color-emissive) (lerp 0.0 0.0 f30-6) (lerp 0.0 0.5 f30-6) (lerp 0.0 0.0 f30-6) 1.0) + ) + ) + ) + 0 + (none) + ) + +;; definition for function target-update-segs +(defun target-update-segs ((arg0 process-drawable)) + (let ((f30-0 (-> *FACT-bank* health-max-default))) + (let ((s5-0 (-> *game-info* features))) + (when (!= (-> arg0 type) target) + (if (-> *setting-control* user-current beard) + (setup-masks (-> arg0 draw) 4 0) + (setup-masks (-> arg0 draw) 0 4) + ) + (setup-masks (-> arg0 draw) 32 64) + ) + (cond + ((logtest? (game-feature armor0) s5-0) + (set! f30-0 (+ 2.0 f30-0)) + (setup-masks (-> arg0 draw) 2 0) + ) + (else + (setup-masks (-> arg0 draw) 0 2) + ) + ) + (cond + ((logtest? (game-feature armor1) s5-0) + (set! f30-0 (+ 2.0 f30-0)) + (setup-masks (-> arg0 draw) 16 0) + ) + (else + (setup-masks (-> arg0 draw) 0 16) + ) + ) + (cond + ((logtest? (game-feature armor2) s5-0) + (set! f30-0 (+ 2.0 f30-0)) + (setup-masks (-> arg0 draw) 128 0) + ) + (else + (setup-masks (-> arg0 draw) 0 128) + ) + ) + (cond + ((logtest? (game-feature armor3) s5-0) + (set! f30-0 (+ 2.0 f30-0)) + (setup-masks (-> arg0 draw) 512 256) + ) + (else + (setup-masks (-> arg0 draw) 256 512) + ) + ) + ) + (if (not (-> *setting-control* user-current armor)) + (setup-masks (-> arg0 draw) 256 658) + ) + f30-0 + ) + ) + +;; definition for function target-draw-process +;; WARN: Return type mismatch int vs none. +(defbehavior target-draw-process target () + (let ((gp-0 (the-as uint (-> self game features)))) + (if (not (-> *setting-control* user-current armor)) + (set! gp-0 (logand (the-as uint #xff0fffffffffffff) (the-as game-feature gp-0))) + ) + (when (or (!= (-> self game old-features) gp-0) (not (time-elapsed? (-> self init-time) (seconds 0.5)))) + (let ((f30-0 (-> self fact health-max)) + (f0-0 (target-update-segs self)) + ) + (if (!= f30-0 f0-0) + (pickup-collectable! (-> self fact) (pickup-type health-max) (- f0-0 f30-0) (the-as handle #f)) + ) + ) + (set! (-> self game old-features) (the-as game-feature gp-0)) + ) + ) + (+! (-> self scarf-interp) (* 0.2 (- (-> self scarf-interp-targ) (-> self scarf-interp)))) + (seek! (-> self scarf-interp) (-> self scarf-interp-targ) (seconds-per-frame)) + (+! (-> self goggles-interp) (* 0.2 (- (-> self goggles-interp-targ) (-> self goggles-interp)))) + (seek! (-> self goggles-interp) (-> self goggles-interp-targ) (seconds-per-frame)) + (let ((f30-1 (-> self scarf-interp)) + (f28-0 (-> self goggles-interp)) + (f26-0 (-> self darkjak-interp)) + (f24-0 (-> self lightjak-interp)) + ) + (when (or (!= (-> self scarf-interp-old) f30-1) + (!= (-> self goggles-interp-old) f28-0) + (!= (-> self darkjak-interp-old) f26-0) + (or (!= (-> self lightjak-interp-old) f24-0) (not (time-elapsed? (-> self teleport-time) (seconds 0.6)))) + ) + (if (>= (-> self scarf-interp) 1.0) + (setup-masks (-> self draw) 64 32) + (setup-masks (-> self draw) 32 64) + ) + (cond + ((and (= f30-1 0.0) + (= f28-0 0.0) + (= f26-0 0.0) + (and (= f24-0 0.0) (not (time-elapsed? (-> self teleport-time) (seconds 0.5)))) + ) + (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) + ) + ((and (= f30-1 0.0) (= f28-0 0.0) (= f26-0 0.0) (= f24-0 0.0)) + (set! (-> self skel override 0) 0.0) + (set! (-> self skel override 41) 0.0) + (set! (-> self scarf-interp-old) f30-1) + (set! (-> self goggles-interp-old) f28-0) + (set! (-> self darkjak-interp-old) f26-0) + (set! (-> self lightjak-interp-old) f24-0) + ) + (else + (set! (-> self skel override 0) 1.0) + (set! (-> self skel override 8) f30-1) + (set! (-> self skel override 5) f28-0) + (set! (-> self skel override 2) f26-0) + (set! (-> self skel override 6) f26-0) + (set! (-> self skel override 7) f26-0) + (set! (-> self skel override 4) f26-0) + (cond + ((!= f26-0 0.0) + (set! (-> self skel override 41) 1.0) + (set! (-> self skel override 46) 2.0) + (set! (-> self skel override 52) 2.0) + ) + ((!= f24-0 0.0) + (set! (-> self skel override 41) 1.0) + (set! (-> self skel override 46) 0.0) + (set! (-> self skel override 52) 0.0) + ) + (else + (set! (-> self skel override 41) 0.0) + ) + ) + (set! (-> self scarf-interp-old) f30-1) + (set! (-> self goggles-interp-old) f28-0) + (set! (-> self darkjak-interp-old) f26-0) + (set! (-> self lightjak-interp-old) f24-0) + ) + ) + ) + ) + (when (!= (-> self cloth) (-> *setting-control* user-current cloth)) + (process-drawable-show-all-cloth self (-> *setting-control* user-current cloth)) + (set! (-> self cloth) (-> *setting-control* user-current cloth)) + ) + 0 + (none) + ) + +;; definition for function target-powerup-process +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior target-powerup-process target () + (target-draw-process) + (let ((gp-0 (-> self ext-anim-control))) + (when (!= (-> self ext-anim) (-> self pending-ext-anim)) + (when (not (or (= (-> gp-0 status) 'initialize) (= (-> self ext-anim) (target-anim unknown)))) + (when (joint-control-cleanup (-> self skel) (-> gp-0 heap) (the-as art-joint-anim jakb-stance-loop-ja)) + (target-gun-end-mode 'fast-exit) + (set! (-> self skel float-channels) (the-as uint 0)) + (reset (-> self skel top-anim)) + ) + (send-event (ppointer->process (-> self sidekick)) 'cleanup) + (unload-from-heap *anim-manager* (-> gp-0 heap)) + (unlink-shaders-in-heap *texture-page-dir* (-> gp-0 heap)) + ) + (case (-> self pending-ext-anim) + (((target-anim default) (target-anim board) (target-anim dark) (target-anim light)) + (set-pending-file gp-0 "jak-external" (the-as int (-> self pending-ext-anim)) (process->handle self) 0.0) + ) + (else + (set-pending-file gp-0 (the-as string #f) 0 (process->handle self) 0.0) + ) + ) + ) + (if (= (-> gp-0 status) 'active) + (set! (-> self ext-anim) (the-as target-anim (-> gp-0 load-file-part))) + (set! (-> self ext-anim) (target-anim unknown)) + ) + ) + (let ((f30-0 (-> self control collision-spheres 0 prim-core world-sphere w))) + (if (focus-test? self board) + (+! (-> self control collision-spheres 0 prim-core world-sphere w) 4096.0) + ) + (water-control-method-10 (-> self water)) + (set! (-> self control collision-spheres 0 prim-core world-sphere w) f30-0) + ) + (if (and (logtest? (-> self water flags) (water-flag under-water)) + (not (logtest? (-> self water flags) (water-flag swim-ground))) + ) + (set-time! (-> self control unknown-time-frame26)) + (set-time! (-> self control unknown-time-frame27)) + ) + (cond + ((and (= (-> self control ground-pat material) (pat-material ice)) + (and (>= (-> self control ctrl-xz-vel) 204.8) + (not (time-elapsed? (-> self control last-time-on-surface) (seconds 0.05))) + ) + ) + (let ((gp-1 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node jakb-lod0-jg RbigToe)))) + (if (and (< (fabs (vector-dot + (-> self control dynam gravity-normal) + (vector-! (new 'stack-no-clear 'vector) gp-1 (-> self control trans)) + ) + ) + 819.2 + ) + (rand-vu-percent? 0.5) + ) + (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 159) gp-1) + ) + ) + (let ((gp-2 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node jakb-lod0-jg LbigToe)))) + (if (and (< (fabs (vector-dot + (-> self control dynam gravity-normal) + (vector-! (new 'stack-no-clear 'vector) gp-2 (-> self control trans)) + ) + ) + 819.2 + ) + (rand-vu-percent? 0.5) + ) + (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 159) gp-2) + ) + ) + (let ((f0-10 (lerp-scale 0.8 1.0 (-> self control ctrl-xz-vel) 0.0 81920.0))) + (let ((v1-100 (ja-group))) + (if (not (and v1-100 (= v1-100 jakb-ice-stance-ja))) + (set! f0-10 (* 0.8 f0-10)) + ) + ) + (seek! (-> self control unknown-float45) f0-10 (seconds-per-frame)) + ) + (let ((f30-1 (-> self control unknown-float45)) + (f0-14 (lerp-scale -0.3 0.3 (-> self control ctrl-xz-vel) 0.0 81920.0)) + ) + (sound-play-by-name + (static-sound-name "ice-loop") + (-> self control unknown-sound-id04) + (the int (* 1024.0 f30-1)) + (the int (* 1524.0 f0-14)) + 0 + (sound-group) + (-> self control trans) + ) + ) + ) + ((< 0.0 (-> self control unknown-float45)) + (set! (-> self control unknown-float45) 0.0) + (let ((v1-121 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-121 command) (sound-command set-param)) + (set! (-> v1-121 id) (-> self control unknown-sound-id04)) + (set! (-> v1-121 params volume) -4) + (set! (-> v1-121 auto-time) 48) + (set! (-> v1-121 auto-from) 2) + (set! (-> v1-121 params mask) (the-as uint 17)) + (-> v1-121 id) + ) + ) + ) + (target-darkjak-process) + (target-lightjak-process) + (target-invisible-process) + (when (nonzero? (-> self fact trick-point-duration)) + (when (>= (- (-> *display* game-clock frame-counter) (-> self fact trick-point-start-time)) + (-> self fact trick-point-duration) + ) + (format #t "------------> ~,,f total points~%" (-> self fact trick-point)) + (send-event (handle->process (-> self notify)) 'notify 'trick-judge (-> self fact trick-point)) + (reset! (-> self fact) 'trick-judge) + ) + ) + (cond + ((logtest? (-> self game features) (game-feature feature0)) + (cond + ((< (current-time) (-> self fact stop-time-timeout)) + (set-setting! 'bg-a 'abs 0.3 0) + (set-setting! 'bg-r 'abs 1.0 0) + (update-rates! (-> *display* entity-clock) 0.0) + (if (zero? (mod (-> *display* base-clock integral-frame-counter) 60)) + (sound-play "stopwatch") + ) + ) + ((nonzero? (-> self fact stop-time-timeout)) + (remove-setting! 'bg-a) + (remove-setting! 'bg-r) + (update-rates! (-> *display* entity-clock) 1.0) + (set! (-> self fact stop-time-timeout) 0) + 0 + ) + ((cpad-pressed? (-> self control cpad number) r1) + (set! (-> self fact stop-time-timeout) (+ (current-time) (seconds 5))) + ) + ) + ) + ((logtest? (-> self game features) (game-feature feature2)) + (when *time-of-day-fast* + (set! *time-of-day-fast* #f) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 1.0) + ) + (cond + ((cpad-hold? (-> self control cpad number) r1) + (update-rates! + (-> *display* entity-clock) + (seek (-> *display* entity-clock clock-ratio) 60.0 (* 120.0 (seconds-per-frame))) + ) + (update-rates! (-> *display* bg-clock) (-> *display* entity-clock clock-ratio)) + (update-rates! + (-> *display* target-clock) + (seek (-> *display* target-clock clock-ratio) 2.0 (* 120.0 (seconds-per-frame))) + ) + ) + ((or (!= (-> *display* entity-clock clock-ratio) 2.0) (!= (-> *display* target-clock clock-ratio) 1.0)) + (update-rates! + (-> *display* entity-clock) + (seek (-> *display* entity-clock clock-ratio) 2.0 (* 120.0 (seconds-per-frame))) + ) + (update-rates! (-> *display* bg-clock) (-> *display* entity-clock clock-ratio)) + (update-rates! + (-> *display* target-clock) + (seek (-> *display* target-clock clock-ratio) 1.0 (* 120.0 (seconds-per-frame))) + ) + ) + ) + ) + ((logtest? (-> self game features) (game-feature feature4)) + (when *time-of-day-fast* + (set! *time-of-day-fast* #f) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 1.0) + ) + (cond + ((cpad-hold? (-> self control cpad number) r1) + (update-rates! + (-> *display* entity-clock) + (seek (-> *display* entity-clock clock-ratio) 0.3 (* 30.0 (seconds-per-frame))) + ) + (update-rates! (-> *display* bg-clock) (-> *display* entity-clock clock-ratio)) + (update-rates! + (-> *display* target-clock) + (seek (-> *display* target-clock clock-ratio) 0.5 (* 30.0 (seconds-per-frame))) + ) + ) + ((or (!= (-> *display* entity-clock clock-ratio) 1.0) (!= (-> *display* target-clock clock-ratio) 1.0)) + (update-rates! + (-> *display* entity-clock) + (seek (-> *display* entity-clock clock-ratio) 1.0 (* 30.0 (seconds-per-frame))) + ) + (update-rates! (-> *display* bg-clock) (-> *display* entity-clock clock-ratio)) + (update-rates! + (-> *display* target-clock) + (seek (-> *display* target-clock clock-ratio) 1.0 (* 30.0 (seconds-per-frame))) + ) + ) + ) + ) + ) + (target-eco-process) + (target-color-effect-process) + (if (logtest? (-> self 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? (-> self 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)) + ) + (logclear! (-> self focus-status) (focus-status super)) + (if (or (focus-test? self dead hit) + (or (logtest? (target-flags tf2 tinvuln1 tf5 tinvuln2 invisible) (-> self target-flags)) + (-> *setting-control* user-current ignore-target) + ) + ) + (logior! (-> self focus-status) (focus-status ignore)) + (logclear! (-> self focus-status) (focus-status ignore)) + ) + (cond + ((or (and (logtest? (-> self control mod-surface flags) (surface-flag air)) + (not (logtest? (-> self control status) (collide-status on-surface))) + ) + (and (focus-test? self board) (not (time-elapsed? (-> self board last-jump-time) (seconds 0.1)))) + ) + (logior! (-> self focus-status) (focus-status in-air)) + (if (logtest? (surface-flag super) (-> self control current-surface flags)) + (logior! (-> self focus-status) (focus-status super)) + ) + ) + (else + (logclear! (-> self focus-status) (focus-status in-air)) + ) + ) + (if (using-gun? self) + (logior! (-> self focus-status) (focus-status gun)) + (logclear! (-> self focus-status) (focus-status gun)) + ) + (if (or (logtest? (water-flag touch-water) (-> self water flags)) + (logtest? (-> self control status) (collide-status on-water)) + ) + (logior! (-> self focus-status) (focus-status touch-water)) + (logclear! (-> self focus-status) (focus-status touch-water)) + ) + (if (logtest? (-> self control status) (collide-status on-water)) + (logior! (-> self focus-status) (focus-status on-water)) + (logclear! (-> self focus-status) (focus-status on-water)) + ) + (if (and (logtest? (-> self water flags) (water-flag under-water)) + (not (logtest? (-> self water flags) (water-flag swim-ground))) + ) + (logior! (-> self focus-status) (focus-status under-water)) + (logclear! (-> self focus-status) (focus-status under-water)) + ) + (if (not (time-elapsed? (-> self gun fire-time) (seconds 0.1))) + (logior! (-> self focus-status) (focus-status shooting)) + (logclear! (-> self focus-status) (focus-status shooting)) + ) + 0 + (none) + ) + +;; definition for function target-powerup-effect +;; WARN: Return type mismatch int vs none. +(defbehavior target-powerup-effect target ((arg0 symbol)) + (case arg0 + (('eco-blue) + (let ((v1-4 (rand-vu-int-range 3 (+ (-> self node-list length) -1)))) + (eco-blue-glow (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data v1-4))) + ) + ) + ) + 0 + (none) + ) + +;; definition for function process-contact-action +;; WARN: Return type mismatch int vs none. +(defbehavior process-contact-action target ((arg0 process)) + (when (logtest? (-> *game-info* features) (game-feature feature0)) + (cond + (arg0 + (+! (-> self clock ref-count) -1) + (+! (-> arg0 clock ref-count) 1) + (set! (-> self clock) (-> arg0 clock)) + ) + (else + (+! (-> self clock ref-count) -1) + (+! (-> *display* base-clock ref-count) 1) + (set! (-> self clock) (-> *display* base-clock)) + ) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/common-obs/prim-beam-h_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/prim-beam-h_REF.gc new file mode 100644 index 0000000000..aabee20641 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/prim-beam-h_REF.gc @@ -0,0 +1,80 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type prim-beam-settings +(deftype prim-beam-settings (structure) + ((width float) + (color rgba) + (alpha float) + (tex-id uint32) + (num-tiles float) + ) + ) + +;; definition for method 3 of type prim-beam-settings +(defmethod inspect ((this prim-beam-settings)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'prim-beam-settings) + (format #t "~1Twidth: ~f~%" (-> this width)) + (format #t "~1Tcolor: ~D~%" (-> this color)) + (format #t "~1Talpha: ~f~%" (-> this alpha)) + (format #t "~1Ttex-id: ~D~%" (-> this tex-id)) + (format #t "~1Tnum-tiles: ~f~%" (-> this num-tiles)) + (label cfg-4) + this + ) + +;; definition of type prim-beam-params +(deftype prim-beam-params (structure) + ((appearance prim-beam-settings) + ) + ) + +;; definition for method 3 of type prim-beam-params +(defmethod inspect ((this prim-beam-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'prim-beam-params) + (format #t "~1Tappearance: #~%" (-> this appearance)) + (label cfg-4) + this + ) + +;; definition of type prim-beam-tracker-params +(deftype prim-beam-tracker-params (prim-beam-params) + ((track-obj1 handle) + (track-obj2 handle) + (track-joint1 int32) + (track-joint2 int32) + (pos0 vector) + (pos1 vector) + (duration time-frame) + ) + ) + +;; definition for method 3 of type prim-beam-tracker-params +(defmethod inspect ((this prim-beam-tracker-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'prim-beam-tracker-params) + (format #t "~1Tappearance: #~%" (-> this appearance)) + (format #t "~1Ttrack-obj1: ~D~%" (-> this track-obj1)) + (format #t "~1Ttrack-obj2: ~D~%" (-> this track-obj2)) + (format #t "~1Ttrack-joint1: ~D~%" (-> this track-joint1)) + (format #t "~1Ttrack-joint2: ~D~%" (-> this track-joint2)) + (format #t "~1Tpos0: #~%" (-> this pos0)) + (format #t "~1Tpos1: #~%" (-> this pos1)) + (format #t "~1Tduration: ~D~%" (-> this duration)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 diff --git a/test/decompiler/reference/jak3/engine/common-obs/prim-h_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/prim-h_REF.gc index 4e5d69c9db..c96e862662 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/prim-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/prim-h_REF.gc @@ -32,7 +32,7 @@ some special effect code, then sent to the prim renderer to be drawn." "Base class for prim-strip." () (:methods - (prim-base-method-9 () none) + (generate-dma! (_type_ matrix) none) ) ) @@ -71,7 +71,7 @@ These are owned by the thing submitting to prim, not the prim renderer itself." ) (:methods (new (symbol type int texture-id string) _type_) - (prim-strip-method-10 (_type_ draw-control) none) + (setup-dma-and-tex (_type_ draw-control) none) ) ) @@ -112,7 +112,7 @@ These are owned by the thing submitting to prim, not the prim renderer itself." (go process-drawable-art-error "prim-strip") ) (add-connection *prim-engine* pp #f pp s5-0 #f) - (set! (-> s5-0 flags) (prim-flags pf0 pf1)) + (set! (-> s5-0 flags) (prim-flags alpha-blend-enable texture-enable)) (set! (-> s5-0 num-verts) (the-as uint num-vertices)) (set! (-> s5-0 allocated-num-verts) (the-as uint num-vertices)) (set! (-> s5-0 data0) (new 'static 'gs-test)) @@ -198,11 +198,11 @@ These are owned by the thing submitting to prim, not the prim renderer itself." (mask vector4w :inline) (in-verts int32) (num-verts int32) - (vert-ptr prim-vertex) + (vert-ptr (inline-array prim-vertex)) (sinks prim-sink 68 :inline) ) (:methods - (prim-work-method-9 () none) + (reset! (_type_) none) ) ) diff --git a/test/decompiler/reference/jak3/engine/common-obs/prim_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/prim_REF.gc new file mode 100644 index 0000000000..e1deabe7c1 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/prim_REF.gc @@ -0,0 +1,130 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *prim-work*, type prim-work +(define *prim-work* + (new 'static 'prim-work + :vertex-tmpl (new 'static 'inline-array dma-packet 3 + (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x9 :cmd (vif-cmd unpack-v4-32)) + ) + (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x120 :cmd (vif-cmd unpack-v4-32)) + ) + (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x237 :cmd (vif-cmd unpack-v4-32)) + ) + ) + :control-tmpl (new 'static 'inline-array dma-packet 2 + (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #xc :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x345 :num #xc :cmd (vif-cmd unpack-v4-32)) + ) + (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #xc :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #x363 :num #xc :cmd (vif-cmd unpack-v4-32)) + ) + ) + :giftag (new 'static 'generic-gif-tag + :fan-prim (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + :str-prim (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + :regs (new 'static 'gif-tag-regs-32 :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + :num-strips #x1 + ) + :call-scissor (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd mscalf) :msk #x1) + ) + :call-noclip (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :imm #x8 :cmd (vif-cmd mscalf) :msk #x1) + ) + :mask (new 'static 'vector4w :x -2 :y -1 :z -1) + ) + ) + +;; definition for method 9 of type prim-work +;; WARN: Return type mismatch int vs none. +(defmethod reset! ((this prim-work)) + "Reset all pending vertex/control data." + (dotimes (v1-0 68) + (let ((a1-2 (-> this sinks v1-0))) + (set! (-> a1-2 vertex-count) (the-as uint 0)) + (set! (-> a1-2 control-count) (the-as uint 0)) + ) + 0 + ) + 0 + (none) + ) + +;; definition for method 9 of type prim-strip +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 9 prim-strip)" 9 prim-strip) + +;; definition for method 10 of type prim-strip +;; WARN: Return type mismatch int vs none. +(defmethod setup-dma-and-tex ((this prim-strip) (arg0 draw-control)) + "Set up the bucket, prim sink, and texture." + (let ((s5-0 (-> *level* level (-> arg0 level-index)))) + (let ((s2-0 (-> s5-0 draw-index)) + (s4-0 (-> arg0 default-texture-page)) + ) + (let ((s3-0 (vu1-bucket-map s2-0 (the-as int s4-0) (merc-mode mercneric2))) + (v1-3 (vu1-bucket-map s2-0 (the-as int s4-0) (merc-mode mm5))) + ) + (set! (-> this bucket) s3-0) + (set! (-> this sink) (the-as uint v1-3)) + ) + (set! (-> this level) s5-0) + (set! (-> this texture-index) s4-0) + ) + (when (not (logtest? (-> this flags) (prim-flags no-texture-name))) + (set! (-> this tex-id) + (lookup-level-texture-id-by-name (the-as string (-> this tex-name)) s5-0 (the-as int (-> this texture-index))) + ) + (logior! (-> this flags) (prim-flags no-texture-name)) + ) + ) + 0 + (none) + ) + +;; definition for function prim-engine-execute +;; WARN: Return type mismatch int vs none. +(defun prim-engine-execute () + "Generate all prim DMA." + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask generic)) + (when (not (get-menu-mode *blit-displays-work*)) + (let* ((gp-0 *prim-engine*) + (s5-0 (-> *math-camera* camera-temp)) + (v1-9 (-> gp-0 alive-list next0)) + (s4-0 (-> (the-as connection v1-9) next0)) + ) + (while (!= v1-9 (-> gp-0 alive-list-end)) + (-> (the-as connection v1-9) param1) + (generate-dma! (the-as prim-strip (-> (the-as connection v1-9) param2)) s5-0) + (set! v1-9 s4-0) + (set! s4-0 (-> s4-0 next0)) + ) + ) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/common-obs/proc-focusable-spawner_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/proc-focusable-spawner_REF.gc new file mode 100644 index 0000000000..3bd780338c --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/proc-focusable-spawner_REF.gc @@ -0,0 +1,219 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type proc-focusable-spawn-record +(deftype proc-focusable-spawn-record (structure) + "A record of a [[process-focusable]] that was created by a spawner." + ((proc handle) + (index int16) + (dead-time time-frame) + ) + ) + +;; definition for method 3 of type proc-focusable-spawn-record +(defmethod inspect ((this proc-focusable-spawn-record)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'proc-focusable-spawn-record) + (format #t "~1Tproc: ~D~%" (-> this proc)) + (format #t "~1Tindex: ~D~%" (-> this index)) + (format #t "~1Tdead-time: ~D~%" (-> this dead-time)) + (label cfg-4) + this + ) + +;; definition of type proc-focusable-spawn-record-array +(deftype proc-focusable-spawn-record-array (inline-array-class) + ((data proc-focusable-spawn-record :inline :dynamic) + ) + ) + +;; definition for method 3 of type proc-focusable-spawn-record-array +(defmethod inspect ((this proc-focusable-spawn-record-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! (-> proc-focusable-spawn-record-array heap-base) (the-as uint 32)) + +;; definition of type proc-focusable-spawner +(deftype proc-focusable-spawner (basic) + "A [[process-focusable]] spawner. Keeps track of spawned processes and cleans up inactive ones." + ((records proc-focusable-spawn-record-array) + (unused-list (array int8)) + ) + (:methods + (alloc-records! (_type_ int symbol) none) + (get-last-unused-handle! (_type_) handle) + (get-last-unused-val! (_type_) int) + (mark-unused! (_type_ handle) int) + (init-records! (_type_) none) + (add-unused! (_type_ int) none) + (check-inactive (_type_) symbol) + (reset-and-kill-all! (_type_) none) + ) + ) + +;; definition for method 3 of type proc-focusable-spawner +(defmethod inspect ((this proc-focusable-spawner)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Trecords: ~A~%" (-> this records)) + (format #t "~1Tunused-list: ~A~%" (-> this unused-list)) + (label cfg-4) + this + ) + +;; definition for method 9 of type proc-focusable-spawner +(defmethod alloc-records! ((this proc-focusable-spawner) (count int) (allocation symbol)) + "Allocate records and unused list." + (set! (-> this records) + ((method-of-type proc-focusable-spawn-record-array new) allocation proc-focusable-spawn-record-array count) + ) + (set! (-> this unused-list) (the-as (array int8) ((method-of-type array new) allocation array int8 count))) + (init-records! this) + (none) + ) + +;; definition for method 7 of type proc-focusable-spawner +(defmethod relocate ((this proc-focusable-spawner) (offset int)) + (if (nonzero? (-> this records)) + (&+! (-> this records) offset) + ) + (if (nonzero? (-> this unused-list)) + (&+! (-> this unused-list) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 13 of type proc-focusable-spawner +;; WARN: Return type mismatch int vs none. +(defmethod init-records! ((this proc-focusable-spawner)) + "Initialize the records list." + (dotimes (v1-0 (-> this records allocated-length)) + (set! (-> this unused-list v1-0) v1-0) + (set! (-> this records data v1-0 proc) (the-as handle #f)) + (set! (-> this records data v1-0 index) v1-0) + (set! (-> this records data v1-0 dead-time) 0) + ) + (set! (-> this unused-list length) (-> this unused-list allocated-length)) + (none) + ) + +;; definition for method 11 of type proc-focusable-spawner +(defmethod get-last-unused-val! ((this proc-focusable-spawner)) + "Get the last value in the unused list and decrement size." + (cond + ((<= (-> this unused-list length) 0) + -1 + ) + (else + (let ((v0-0 (-> this unused-list (+ (-> this unused-list length) -1)))) + (+! (-> this unused-list length) -1) + v0-0 + ) + ) + ) + ) + +;; definition for method 10 of type proc-focusable-spawner +(defmethod get-last-unused-handle! ((this proc-focusable-spawner)) + "Get the handle for the last element in the unused list and decrement the unused list size." + (local-vars (v1-6 int)) + (cond + ((<= (-> this unused-list length) 0) + (the-as handle #f) + ) + ((begin (set! v1-6 (-> this unused-list (+ (-> this unused-list length) -1))) #t) + (+! (-> this unused-list length) -1) + (-> this records data v1-6 proc) + ) + (else + (the-as handle #f) + ) + ) + ) + +;; definition for method 14 of type proc-focusable-spawner +;; WARN: Return type mismatch int vs none. +(defmethod add-unused! ((this proc-focusable-spawner) (arg0 int)) + "Add the given value to the unused list." + (set! (-> this records data arg0 dead-time) (+ (current-time) (seconds 1))) + (set! (-> this unused-list (-> this unused-list length)) arg0) + (+! (-> this unused-list length) 1) + (none) + ) + +;; definition for method 12 of type proc-focusable-spawner +(defmethod mark-unused! ((this proc-focusable-spawner) (arg0 handle)) + "Add this handle to the unused list." + (dotimes (v1-0 (-> this records length)) + (when (= (-> this records data v1-0 proc) arg0) + (add-unused! this v1-0) + (return 0) + ) + ) + (the-as int #f) + ) + +;; definition for method 15 of type proc-focusable-spawner +(defmethod check-inactive ((this proc-focusable-spawner)) + "Check for inactive processes and add them to the unused list." + (local-vars (v1-10 symbol)) + (dotimes (i (-> this records length)) + (let* ((proc (handle->process (-> this records data i proc))) + (pfoc (if (type? proc process-focusable) + proc + ) + ) + ) + (when (or (not pfoc) (focus-test? (the-as process-focusable pfoc) inactive)) + (dotimes (ii (-> this unused-list length)) + (when (= (-> this unused-list ii) i) + (set! v1-10 #t) + (goto cfg-19) + ) + ) + (set! v1-10 #f) + (label cfg-19) + (if (not v1-10) + (add-unused! this i) + ) + ) + ) + ) + #f + ) + +;; definition for method 16 of type proc-focusable-spawner +;; WARN: Return type mismatch symbol vs none. +(defmethod reset-and-kill-all! ((this proc-focusable-spawner)) + "Reset the records list and deactivate all remaining active processes." + (dotimes (s5-0 (-> this records length)) + (let ((a0-3 (handle->process (-> this records data s5-0 proc)))) + (when a0-3 + (deactivate a0-3) + (set! (-> this records data s5-0 proc) (the-as handle #f)) + ) + ) + ) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/common-obs/projectile-h_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/projectile-h_REF.gc index 63fa34ed7c..925809a4c8 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/projectile-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/projectile-h_REF.gc @@ -35,7 +35,7 @@ (sound-id sound-id) (stop-speed meters) (invinc-time time-frame) - (desired-target uint64) + (desired-target handle) (desired-target-pos vector :inline) ) (:state-methods @@ -52,11 +52,11 @@ (play-impact-sound (_type_ projectile-options) none) (projectile-method-29 (_type_) none) (setup-collision! (_type_) none) - (projectile-method-31 (_type_) none) + (init-proj-settings! (_type_) none) (projectile-method-32 (_type_) none) (go-impact! (_type_) none) (projectile-method-34 (_type_) none) - (event-handler! (_type_ process int symbol event-message-block) object) + (proj-event-handler (_type_ process int symbol event-message-block) object) (handle-proj-hit! (_type_ process event-message-block) object) (deal-damage! (_type_ process event-message-block) symbol) (made-impact? (_type_) symbol) @@ -115,7 +115,7 @@ ((pos vector :inline) (vel vector :inline) (target-pos vector :inline) - (target-handle uint64) + (target-handle handle) (ent entity) (charge float) (attack-id uint32) diff --git a/test/decompiler/reference/jak3/engine/common-obs/projectile_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/projectile_REF.gc index 2bf48c28ae..c203a0cc58 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/projectile_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/projectile_REF.gc @@ -21,7 +21,7 @@ ) ;; definition for method 35 of type projectile -(defmethod event-handler! ((this projectile) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) +(defmethod proj-event-handler ((this projectile) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (case arg2 (('tracked) (let ((v0-0 (the-as object (process->handle (the-as process (-> arg3 param 0)))))) @@ -41,7 +41,7 @@ ;; definition for function projectile-event-handler ;; WARN: Return type mismatch object vs projectile. (defbehavior projectile-event-handler projectile ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) - (the-as projectile (event-handler! self arg0 arg1 arg2 arg3)) + (the-as projectile (proj-event-handler self arg0 arg1 arg2 arg3)) ) ;; definition for method 37 of type projectile @@ -401,7 +401,7 @@ ;; definition for method 31 of type projectile ;; WARN: Return type mismatch int vs none. -(defmethod projectile-method-31 ((this projectile)) +(defmethod init-proj-settings! ((this projectile)) 0 (none) ) @@ -538,7 +538,7 @@ ) (set! (-> self target-pos quad) (-> self base-target-pos quad)) (set! (-> self event-hook) projectile-event-handler) - (projectile-method-31 self) + (init-proj-settings! self) (update-transforms (-> self root)) (projectile-method-24 self) (play-impact-sound self (projectile-options)) @@ -582,20 +582,20 @@ (projectile-bounce-update-velocity self) (set! (-> s5-0 quad) (-> gp-0 trans quad)) (vector-v++! s5-0 (-> gp-0 transv)) - (let* ((a0-4 gp-0) - (t9-2 (method-of-object a0-4 find-ground)) - (a2-0 #x100249) - (a3-0 4096.0) - (t0-0 81920.0) - (t1-0 1024.0) - ) - (when (t9-2 a0-4 s4-0 (the-as collide-spec a2-0) a3-0 t0-0 t1-0) - (let ((f30-0 (+ (-> gp-0 gspot-pos y) (-> self root root-prim local-sphere w)))) - (when (>= f30-0 (-> s5-0 y)) - (projectile-bounce-method-43 self) - (set! (-> s5-0 y) f30-0) - (vector-reset! (-> gp-0 transv)) + (when (find-ground + gp-0 + s4-0 + (collide-spec backgnd crate obstacle hit-by-others-list pusher) + 4096.0 + 81920.0 + 1024.0 + (the-as process #f) ) + (let ((f30-0 (+ (-> gp-0 gspot-pos y) (-> self root root-prim local-sphere w)))) + (when (>= f30-0 (-> s5-0 y)) + (projectile-bounce-method-43 self) + (set! (-> s5-0 y) f30-0) + (vector-reset! (-> gp-0 transv)) ) ) ) @@ -727,7 +727,7 @@ ;; definition for method 31 of type projectile-bounce ;; WARN: Return type mismatch int vs none. -(defmethod projectile-method-31 ((this projectile-bounce)) +(defmethod init-proj-settings! ((this projectile-bounce)) (set! (-> this max-speed) 450560.0) (set! (-> this timeout) (seconds 1.6)) (set! (-> this update-velocity) projectile-bounce-update-velocity) diff --git a/test/decompiler/reference/jak3/engine/common-obs/ragdoll-test_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/ragdoll-test_REF.gc new file mode 100644 index 0000000000..db55c1e604 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/ragdoll-test_REF.gc @@ -0,0 +1,368 @@ +;;-*-Lisp-*- +(in-package goal) + +;; this file is debug only +(declare-file (debug)) + +;; failed to figure out what this is: +(defskelgroup skel-ragdoll-test wlander-male wlander-male-lod0-jg wlander-male-ragdoll-ja + ((wlander-male-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; definition for symbol *ragdoll-test-ragdoll-setup*, type ragdoll-setup +(define *ragdoll-test-ragdoll-setup* (new 'static 'ragdoll-setup + :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) + (new 'static 'ragdoll-joint-setup :joint-index 4 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 5 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 6 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 7 :parent-joint 4) + (new 'static 'ragdoll-joint-setup :joint-index 8 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 9 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 10 :parent-joint 4) + (new 'static 'ragdoll-joint-setup :joint-index 11 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 12 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 13 :parent-joint 3) + (new 'static 'ragdoll-joint-setup :joint-index 14 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 15 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 16 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 17 :parent-joint 13) + (new 'static 'ragdoll-joint-setup :joint-index 18 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 19 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 20 :parent-joint 2) + (new 'static 'ragdoll-joint-setup :joint-index 21 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 22 :parent-joint 12) + (new 'static 'ragdoll-joint-setup :joint-index 23 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 24 :parent-joint 12) + (new 'static 'ragdoll-joint-setup :joint-index 25 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 26 :parent-joint -1) + (new 'static 'ragdoll-joint-setup :joint-index 27 :parent-joint 16) + (new 'static 'ragdoll-joint-setup :joint-index 28 :parent-joint 19) + ) + ) + ) + +;; definition of type ragdoll-test +(deftype ragdoll-test (process-focusable) + ((ragdoll-proc handle) + ) + (:state-methods + reform + tweak + freefall-reform + freefall + idle + ) + ) + +;; definition for method 3 of type ragdoll-test +(defmethod inspect ((this ragdoll-test)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tragdoll-proc: ~D~%" (-> this ragdoll-proc)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate reform (ragdoll-test) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :exit (behavior () + (cond + ((!= *external-cam-mode* 'locked) + ) + (*target* + (set! *external-cam-mode* #f) + ) + (else + (set! *external-cam-mode* 'pad-0) + ) + ) + ) + :trans (behavior () + (ja :num! (loop!)) + (let ((gp-0 (handle->process (-> self ragdoll-proc)))) + (when gp-0 + (if (nonzero? *ragdoll-edit-info*) + (ragdoll-proc-method-18 (the-as ragdoll-proc gp-0) *ragdoll-edit-info*) + ) + (ragdoll-proc-method-17 (the-as ragdoll-proc gp-0) *ragdoll-edit-info*) + (let ((v1-14 (-> (the-as ragdoll-proc gp-0) ragdoll))) + (if (or (zero? v1-14) (= (-> v1-14 flex-blend) 0.0)) + (go-virtual idle) + ) + ) + ) + ) + (format *stdcon* "~%press r2 to advance single-step~%") + ) + :code sleep-code + :post transform-post + ) + +;; failed to figure out what this is: +(defstate tweak (ragdoll-test) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((v1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> v1-1 from) (process->ppointer proc)) + (set! (-> v1-1 num-params) argc) + (set! (-> v1-1 message) message) + (set! (-> v1-1 param 0) (-> block param 0)) + (set! (-> v1-1 param 1) (-> block param 1)) + (set! (-> v1-1 param 2) (-> block param 2)) + (set! (-> v1-1 param 3) (-> block param 3)) + (set! (-> v1-1 param 4) (-> block param 4)) + (set! (-> v1-1 param 5) (-> block param 5)) + (send-event-function (handle->process (-> self ragdoll-proc)) v1-1) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (let ((a0-1 (handle->process (-> self ragdoll-proc)))) + (if a0-1 + (ragdoll-proc-method-15 (the-as ragdoll-proc a0-1) #f (the-as vector #f) #t) + ) + ) + (vector-reset! (-> self root transv)) + ) + :exit (behavior () + (let ((a0-1 (handle->process (-> self ragdoll-proc)))) + (if a0-1 + (disable-for-duration (the-as ragdoll-proc a0-1) (seconds 0.25)) + ) + ) + (if (= *external-cam-mode* 'locked) + (set! *external-cam-mode* 'pad-0) + ) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) 1) (cpad-pressed? 0 r3)) + (go-virtual reform) + ) + (let ((gp-0 (handle->process (-> self ragdoll-proc)))) + (when gp-0 + (when (nonzero? *ragdoll-edit-info*) + (ragdoll-proc-method-18 (the-as ragdoll-proc gp-0) *ragdoll-edit-info*) + (if (-> (the-as ragdoll-proc gp-0) ragdoll) + (logclear! (-> (the-as ragdoll-proc gp-0) ragdoll ragdoll-flags) (ragdoll-flag rf2)) + ) + ) + (ragdoll-proc-method-17 (the-as ragdoll-proc gp-0) *ragdoll-edit-info*) + ) + ) + ) + :code sleep-code + :post transform-post + ) + +;; failed to figure out what this is: +(defstate freefall-reform (ragdoll-test) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (ja :num! (loop!)) + (let ((gp-0 (handle->process (-> self ragdoll-proc)))) + (when gp-0 + (ragdoll-proc-method-17 (the-as ragdoll-proc gp-0) (the-as ragdoll-edit-info 0)) + (let ((v1-9 (-> (the-as ragdoll-proc gp-0) ragdoll))) + (if (or (zero? v1-9) (= (-> v1-9 flex-blend) 0.0)) + (go-virtual idle) + ) + ) + ) + ) + ) + :code sleep-code + :post transform-post + ) + +;; failed to figure out what this is: +(defstate freefall (ragdoll-test) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((v1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> v1-1 from) (process->ppointer proc)) + (set! (-> v1-1 num-params) argc) + (set! (-> v1-1 message) message) + (set! (-> v1-1 param 0) (-> block param 0)) + (set! (-> v1-1 param 1) (-> block param 1)) + (set! (-> v1-1 param 2) (-> block param 2)) + (set! (-> v1-1 param 3) (-> block param 3)) + (set! (-> v1-1 param 4) (-> block param 4)) + (set! (-> v1-1 param 5) (-> block param 5)) + (send-event-function (handle->process (-> self ragdoll-proc)) v1-1) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (let ((a0-1 (handle->process (-> self ragdoll-proc)))) + (if a0-1 + (ragdoll-proc-method-15 (the-as ragdoll-proc a0-1) #f (the-as vector #f) #t) + ) + ) + (vector-reset! (-> self root transv)) + ) + :exit (behavior () + (let ((a0-1 (handle->process (-> self ragdoll-proc)))) + (if a0-1 + (disable-for-duration (the-as ragdoll-proc a0-1) (seconds 0.25)) + ) + ) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) 1) (cpad-pressed? 0 triangle)) + (go-virtual freefall-reform) + ) + (let ((a0-7 (handle->process (-> self ragdoll-proc)))) + (if a0-7 + (ragdoll-proc-method-17 (the-as ragdoll-proc a0-7) (the-as ragdoll-edit-info 0)) + ) + ) + (format *stdcon* "press triangle to edit ragdoll~%") + ) + :code sleep-code + :post transform-post + ) + +;; failed to figure out what this is: +(defstate idle (ragdoll-test) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (cond + ((not (time-elapsed? (-> self state-time) 1)) + ) + (else + (format *stdcon* "up: reinit ragdoll~%") + (format *stdcon* "l2: reset position~%") + (format *stdcon* "rpush: edit ragdoll~%") + (format *stdcon* "triangle: run ragdoll~%") + (if (= (-> self node-list data 2 param0) cspace<-parented-matrix-joint-flip-z!) + (format *stdcon* "x: stop mirroring~%") + (format *stdcon* "x: mirror~%") + ) + (when (cpad-pressed? 0 up) + (let ((v1-13 (handle->process (-> self ragdoll-proc)))) + (when v1-13 + (if (nonzero? (-> (the-as ragdoll-proc v1-13) ragdoll)) + (ragdoll-setup! (-> (the-as ragdoll-proc v1-13) ragdoll) self *ragdoll-test-ragdoll-setup*) + ) + ) + ) + ) + (when (cpad-pressed? 0 l2) + (cond + ((-> self entity) + (set! (-> self root trans quad) (-> self entity trans quad)) + ) + (else + (vector-reset! (-> self root trans)) + (set! (-> self root trans y) -163840.0) + ) + ) + (quaternion-identity! (-> self root quat)) + ) + (if (cpad-pressed? 0 r3) + (go-virtual tweak) + ) + (if (cpad-pressed? 0 triangle) + (go-virtual freefall) + ) + (when (cpad-pressed? 0 x) + (cond + ((= (-> self node-list data 2 param0) cspace<-parented-matrix-joint-flip-z!) + (let ((v1-54 (-> self node-list data 2))) + (set! (-> v1-54 param0) (the-as (function cspace transformq none) cspace<-parented-matrix-joint!)) + (set! (-> v1-54 param1) #f) + (set! (-> v1-54 param2) #f) + ) + ) + (else + (let ((v1-56 (-> self node-list data 2))) + (set! (-> v1-56 param0) (the-as (function cspace transformq none) cspace<-parented-matrix-joint-flip-z!)) + (set! (-> v1-56 param1) #f) + (set! (-> v1-56 param2) #f) + ) + ) + ) + ) + (set! (-> (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat)) trans quad) + (-> self root trans quad) + ) + ) + ) + (ja :num! (loop!)) + ) + :code sleep-code + :post transform-post + ) + +;; definition for function ragdoll-test-init-by-other +;; INFO: Used lq/sq +(defbehavior ragdoll-test-init-by-other ragdoll-test ((arg0 ragdoll-setup) (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-sphere s5-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 bot hit-by-others-list 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 4096.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 event-self) 'touched) + (set! (-> self root) s5-0) + ) + (set! (-> self root trans quad) (-> arg0 orient-tform quad)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-ragdoll-test" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logior! (-> self mask) (process-mask enemy)) + (set! (-> self ragdoll-proc) + (ppointer->handle + (process-spawn ragdoll-proc *ragdoll-test-ragdoll-setup* :name "ragdoll-proc" :to self :stack-size #x5000) + ) + ) + (go-virtual idle) + ) + + + + 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 0000000000..250fcdd3df --- /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/shield-sphere_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/shield-sphere_REF.gc new file mode 100644 index 0000000000..aac69845ac --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/shield-sphere_REF.gc @@ -0,0 +1,817 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type shield-sphere-heat +(deftype shield-sphere-heat (structure) + ((current-heat-value float) + (damage-scalar float) + (last-heat-time time-frame) + (distort-handle handle) + ) + ) + +;; definition for method 3 of type shield-sphere-heat +(defmethod inspect ((this shield-sphere-heat)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'shield-sphere-heat) + (format #t "~1Tcurrent-heat-value: ~f~%" (-> this current-heat-value)) + (format #t "~1Tdamage-scalar: ~f~%" (-> this damage-scalar)) + (format #t "~1Tlast-heat-time: ~D~%" (-> this last-heat-time)) + (format #t "~1Tdistort-handle: ~D~%" (-> this distort-handle)) + (label cfg-4) + this + ) + +;; definition of type shield-sphere-toggle +(deftype shield-sphere-toggle (structure) + ((enable-time time-frame) + (disable-time time-frame) + ) + ) + +;; definition for method 3 of type shield-sphere-toggle +(defmethod inspect ((this shield-sphere-toggle)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'shield-sphere-toggle) + (format #t "~1Tenable-time: ~D~%" (-> this enable-time)) + (format #t "~1Tdisable-time: ~D~%" (-> this disable-time)) + (label cfg-4) + this + ) + +;; definition of type shield-sphere +(deftype shield-sphere (process-focusable) + ((owner handle) + (sphere-size float) + (offset-vec vector :inline) + (enabled? symbol) + (shield-type shield-type) + (track-joint int32) + (heat-info shield-sphere-heat :inline) + (toggle-info shield-sphere-toggle :inline :overlay-at (-> heat-info current-heat-value)) + (last-attack-time time-frame) + (last-attack-id uint32) + (persistent-attack-id uint32) + ) + (:state-methods + shield-enabled + shield-disabled + explode + die + ) + (:methods + (shield-sphere-method-32 (_type_) quaternion) + (shield-enabled-trans (_type_) none) + (toggle-shield (_type_ symbol) none) + (shield-post (_type_) object) + (init-and-go! (_type_) object) + (init-collision! (_type_) none) + (shield-event-handler (_type_ process int symbol event-message-block) object) + (get-attack-damage (_type_ process-focusable event-message-block) int) + (shield-touch-handler (_type_ process-focusable event-message-block) object) + (shield-attack-handler (_type_ process-focusable event-message-block) symbol) + (send-shield-attack (_type_ process-focusable touching-shapes-entry int) object) + ) + ) + +;; definition for method 3 of type shield-sphere +(defmethod inspect ((this shield-sphere)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Towner: ~D~%" (-> this owner)) + (format #t "~2Tsphere-size: ~f~%" (-> this sphere-size)) + (format #t "~2Toffset-vec: #~%" (-> this offset-vec)) + (format #t "~2Tenabled?: ~A~%" (-> this enabled?)) + (format #t "~2Tshield-type: ~D~%" (-> this shield-type)) + (format #t "~2Ttrack-joint: ~D~%" (-> this track-joint)) + (format #t "~2Theat-info: #~%" (-> this heat-info)) + (format #t "~2Ttoggle-info: #~%" (-> this heat-info)) + (format #t "~2Tlast-attack-time: ~D~%" (-> this last-attack-time)) + (format #t "~2Tlast-attack-id: ~D~%" (-> this last-attack-id)) + (format #t "~2Tpersistent-attack-id: ~D~%" (-> this persistent-attack-id)) + (label cfg-4) + this + ) + +;; definition of type shield-sphere-spawn-params +(deftype shield-sphere-spawn-params (structure) + ((offset-vec vector :inline) + (owner handle) + (sphere-size float) + (shield-type shield-type) + (track-joint int32) + (enable-time time-frame) + (disable-time time-frame) + (shield-strength int8) + (pad int16) + ) + ) + +;; definition for method 3 of type shield-sphere-spawn-params +(defmethod inspect ((this shield-sphere-spawn-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'shield-sphere-spawn-params) + (format #t "~1Toffset-vec: #~%" (-> this offset-vec)) + (format #t "~1Towner: ~D~%" (-> this owner)) + (format #t "~1Tsphere-size: ~f~%" (-> this sphere-size)) + (format #t "~1Tshield-type: ~D~%" (-> this shield-type)) + (format #t "~1Ttrack-joint: ~D~%" (-> this track-joint)) + (format #t "~1Tenable-time: ~D~%" (-> this enable-time)) + (format #t "~1Tdisable-time: ~D~%" (-> this disable-time)) + (format #t "~1Tshield-strength: ~D~%" (-> this shield-strength)) + (format #t "~1Tpad: ~D~%" (-> this pad)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-shield-sphere-distort shield-sphere-distort shield-sphere-distort-lod0-jg shield-sphere-distort-idle-ja + ((shield-sphere-distort-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.5) + ) + +;; definition of type shield-sphere-distort +(deftype shield-sphere-distort (process-drawable) + ((owner handle) + (sphere-size float) + ) + (:state-methods + inactive + distort + die + ) + ) + +;; definition for method 3 of type shield-sphere-distort +(defmethod inspect ((this shield-sphere-distort)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Towner: ~D~%" (-> this owner)) + (format #t "~2Tsphere-size: ~f~%" (-> this sphere-size)) + (label cfg-4) + this + ) + +;; definition of type shield-sphere-distort-spawn-params +(deftype shield-sphere-distort-spawn-params (structure) + ((owner handle) + (sphere-size float) + ) + ) + +;; definition for method 3 of type shield-sphere-distort-spawn-params +(defmethod inspect ((this shield-sphere-distort-spawn-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'shield-sphere-distort-spawn-params) + (format #t "~1Towner: ~D~%" (-> this owner)) + (format #t "~1Tsphere-size: ~f~%" (-> this sphere-size)) + (label cfg-4) + this + ) + +;; definition for function shield-sphere-distort-init-by-other +(defbehavior shield-sphere-distort-init-by-other shield-sphere-distort ((arg0 shield-sphere-distort-spawn-params)) + (stack-size-set! (-> self main-thread) 128) + (set! (-> self owner) (-> arg0 owner)) + (set! (-> self root) (new 'process 'trsqv)) + (initialize-skeleton + self + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-shield-sphere-distort" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (set-vector! (-> self root scale) (-> arg0 sphere-size) (-> arg0 sphere-size) (-> arg0 sphere-size) 1.0) + (go-virtual inactive) + ) + +;; failed to figure out what this is: +(defskelgroup skel-shield-sphere-explode shield-sphere-explode shield-sphere-explode-lod0-jg shield-sphere-explode-idle-ja + ((shield-sphere-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +;; definition for symbol *shield-sphere-exploder-params*, type joint-exploder-static-params +(define *shield-sphere-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 1 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 2 :parent-joint-index -1) + (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 method 36 of type shield-sphere +(defmethod init-and-go! ((this shield-sphere)) + (case (-> this shield-type) + (((shield-type shield-type-0)) + (set! (-> this heat-info current-heat-value) 0.0) + (set-time! (-> this heat-info last-heat-time)) + ) + (((shield-type shield-type-1)) + ) + ) + (let* ((v1-5 *game-info*) + (a0-4 (+ (-> v1-5 attack-id) 1)) + ) + (set! (-> v1-5 attack-id) a0-4) + (set! (-> this last-attack-id) a0-4) + ) + (let* ((v1-6 *game-info*) + (a0-6 (+ (-> v1-6 attack-id) 1)) + ) + (set! (-> v1-6 attack-id) a0-6) + (set! (-> this persistent-attack-id) a0-6) + ) + (set-vector! (-> this draw color-mult) 0.4 0.4 0.4 0.4) + (shield-enabled-trans this) + (go (method-of-object this shield-enabled)) + ) + +;; definition for method 37 of type shield-sphere +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this shield-sphere)) + (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 ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-7 prim-core collide-as) (collide-spec obstacle impenetrable-obj shield)) + (set! (-> v1-7 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-7 prim-core action) (collide-action solid deadly no-standon)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 (* 4096.0 (-> this sphere-size))) + (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 33 of type shield-sphere +;; WARN: Return type mismatch object vs none. +(defmethod shield-enabled-trans ((this shield-sphere)) + (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 + (if (!= (-> this track-joint) -1) + (vector<-cspace! + (-> this root trans) + (-> (the-as process-focusable s5-0) node-list data (-> this track-joint)) + ) + (vector+! (-> this root trans) (get-trans (the-as process-focusable s5-0) 0) (-> this offset-vec)) + ) + (shield-sphere-method-32 this) + (send-event s5-0 'go-invulnerable) + ) + (else + (go (method-of-object this die)) + ) + ) + ) + (none) + ) + +;; definition for method 34 of type shield-sphere +;; WARN: Return type mismatch int vs none. +(defmethod toggle-shield ((this shield-sphere) (arg0 symbol)) + (cond + (arg0 + (let ((v1-1 (-> this root root-prim))) + (set! (-> v1-1 prim-core collide-as) (-> this root backup-collide-as)) + (set! (-> v1-1 prim-core collide-with) (-> this root backup-collide-with)) + ) + ) + (else + (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 + ) + ) + (let* ((s4-0 (handle->process (-> this owner))) + (a0-9 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (cond + (arg0 + (logior! (-> this draw status) (draw-control-status no-draw)) + ) + (else + (logclear! (-> this draw status) (draw-control-status no-draw)) + (send-event a0-9 'go-vulnerable) + ) + ) + ) + (set! (-> this enabled?) arg0) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate shield-enabled (shield-sphere) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (shield-event-handler self proc argc message block) + ) + :enter (behavior () + (toggle-shield self #t) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (shield-enabled-trans self) + (if (and (= (-> self shield-type) (shield-type shield-type-1)) + (time-elapsed? (-> self state-time) (-> self toggle-info enable-time)) + ) + (go-virtual shield-disabled) + ) + ) + :code sleep-code + :post (behavior () + (shield-post self) + ) + ) + +;; failed to figure out what this is: +(defstate shield-disabled (shield-sphere) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (shield-event-handler self proc argc message block) + ) + :enter (behavior () + (toggle-shield self #f) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (and (= (-> self shield-type) (shield-type shield-type-1)) + (time-elapsed? (-> self state-time) (-> self heat-info last-heat-time)) + ) + (go-virtual shield-enabled) + ) + ) + :code sleep-code + :post (behavior () + (shield-post self) + ) + ) + +;; failed to figure out what this is: +(defstate explode (shield-sphere) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (toggle-shield self #f) + (let ((a0-2 (handle->process (-> self heat-info distort-handle)))) + (if a0-2 + (send-event a0-2 'die) + ) + ) + (let ((gp-0 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (set! (-> gp-0 rot-speed) 20.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-shield-sphere-explode" (the-as (pointer level) #f)) + 2 + gp-0 + *shield-sphere-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + ) + :code (behavior () + (while (-> self child) + (suspend) + ) + (go-virtual die) + ) + :post (behavior () + (shield-post self) + ) + ) + +;; failed to figure out what this is: +(defstate die (shield-sphere) + :virtual #t + :enter (behavior () + '() + ) + :code (behavior () + '() + ) + ) + +;; definition for method 35 of type shield-sphere +;; WARN: Return type mismatch int vs object. +(defmethod shield-post ((this shield-sphere)) + (cond + ((not (-> this enabled?)) + (logior! (-> this draw status) (draw-control-status no-draw)) + (return (the-as object 0)) + ) + (else + (logclear! (-> this draw status) (draw-control-status no-draw)) + ) + ) + (let ((f0-0 (calc-fade-from-fog (-> this root trans)))) + (case (-> this shield-type) + (((shield-type shield-type-0)) + (+ 0.4 (* 0.6 (-> this heat-info current-heat-value))) + (let ((a1-0 (new 'stack-no-clear 'vector))) + (set-vector! a1-0 0.4 0.4 0.4 0.4) + (vector-lerp! (-> this draw color-mult) a1-0 *zero-vector* (-> this heat-info current-heat-value)) + ) + (set-vector! + (-> this draw color-emissive) + (-> this heat-info current-heat-value) + 0.0 + 0.0 + (-> this heat-info current-heat-value) + ) + ) + (((shield-type shield-type-1)) + (set-vector! (-> this draw color-mult) 0.4 0.4 0.4 (* 0.4 f0-0)) + (set-vector! (-> this draw color-emissive) 0.0 0.0 0.0 0.0) + ) + ) + ) + (transform-post) + ) + +;; failed to figure out what this is: +(defskelgroup skel-shield-sphere shield-sphere shield-sphere-lod0-jg shield-sphere-idle-ja + ((shield-sphere-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.5) + ) + +;; definition for function shield-sphere-init-by-other +;; INFO: Used lq/sq +(defbehavior shield-sphere-init-by-other shield-sphere ((arg0 shield-sphere-spawn-params)) + (stack-size-set! (-> self main-thread) 128) + (logclear! (-> self mask) (process-mask enemy)) + (set! (-> self sphere-size) (-> arg0 sphere-size)) + (set! (-> self owner) (-> arg0 owner)) + (set! (-> self track-joint) (-> arg0 track-joint)) + (set! (-> self offset-vec quad) (-> arg0 offset-vec quad)) + (init-collision! self) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-shield-sphere" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set-vector! (-> self root scale) (-> self sphere-size) (-> self sphere-size) (-> self sphere-size) 1.0) + (set! (-> self shield-type) (-> arg0 shield-type)) + (case (-> self shield-type) + (((shield-type shield-type-0)) + (set! (-> self heat-info damage-scalar) (/ 1.0 (the float (-> arg0 shield-strength)))) + (let ((gp-1 (new 'stack-no-clear 'shield-sphere-distort-spawn-params))) + (set! (-> gp-1 owner) (process->handle self)) + (set! (-> gp-1 sphere-size) (-> self sphere-size)) + (let ((s5-1 (the-as process #f))) + (let* ((s4-1 (get-process *default-dead-pool* shield-sphere-distort #x4000 1)) + (v1-22 (when s4-1 + (let ((t9-5 (method-of-type process activate))) + (t9-5 s4-1 self "process" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-1 shield-sphere-distort-init-by-other gp-1) + (-> s4-1 ppointer) + ) + ) + ) + (if v1-22 + (set! s5-1 (-> v1-22 0)) + ) + ) + (set! (-> self heat-info distort-handle) (process->handle s5-1)) + ) + ) + ) + (((shield-type shield-type-1)) + (set! (-> self toggle-info enable-time) (-> arg0 enable-time)) + (set! (-> self heat-info last-heat-time) (-> arg0 disable-time)) + ) + ) + (ja-no-eval :group! (ja-group) :num! (loop!) :frame-num 0.0) + (ja-post) + (logior! (-> self draw status) (draw-control-status disable-fog)) + (set! (-> self event-hook) (-> (method-of-type shield-sphere shield-enabled) event)) + (init-and-go! self) + ) + +;; definition for method 32 of type shield-sphere +(defmethod shield-sphere-method-32 ((this shield-sphere)) + (forward-up-nopitch->quaternion + (-> this root quat) + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (camera-pos) (-> this root trans)) 1.0) + *y-vector* + ) + ) + +;; definition for method 27 of type shield-sphere +(defmethod get-inv-mass ((this shield-sphere)) + 2.0 + ) + +;; definition for method 38 of type shield-sphere +(defmethod shield-event-handler ((this shield-sphere) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('shield-detach) + (go (method-of-object this die)) + #t + ) + (('active) + #t + ) + (('heat-ratio) + (-> this heat-info current-heat-value) + ) + (('notice) + (case (-> arg3 param 0) + (('die) + (go (method-of-object this die)) + #t + ) + (else + #f + ) + ) + ) + (('enabled) + (go (method-of-object this shield-enabled)) + ) + (('disabled) + (go (method-of-object this shield-disabled)) + ) + (('touch) + (shield-touch-handler this (the-as process-focusable arg0) arg3) + ) + (('attack) + (shield-attack-handler this (the-as process-focusable arg0) arg3) + ) + (('impact-impulse) + (let ((v1-12 (the-as object (-> arg3 param 0)))) + (when (< 40960.0 (* (-> (the-as rigid-body-impact v1-12) impulse) (get-inv-mass this))) + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (go (method-of-object this explode)) + #t + ) + ) + ) + ) + ) + +;; definition for method 39 of type shield-sphere +;; WARN: Return type mismatch number vs int. +(defmethod get-attack-damage ((this shield-sphere) (arg0 process-focusable) (arg1 event-message-block)) + (let ((v1-0 (the-as object (-> arg1 param 1)))) + (the-as int (cond + ((logtest? (attack-mask damage) (-> (the-as attack-info v1-0) mask)) + (the int (-> (the-as attack-info v1-0) damage)) + ) + (else + (let ((a0-4 (get-penetrate-using-from-attack-event arg0 arg1))) + (if (and (logtest? a0-4 (penetrate board)) (logtest? a0-4 (penetrate spin))) + 10000 + (penetrate-using->damage a0-4) + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 40 of type shield-sphere +(defmethod shield-touch-handler ((this shield-sphere) (arg0 process-focusable) (arg1 event-message-block)) + (let* ((s5-0 (-> arg1 param 0)) + (s2-0 arg0) + (s3-0 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (when (and s5-0 s3-0) + (cond + ((and (and s3-0 (not (logtest? (-> s3-0 focus-status) (focus-status disable dead ignore grabbed)))) + ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s5-0) + (-> this root) + (collide-action deadly) + (collide-action) + ) + ) + (let ((a3-1 (-> this persistent-attack-id))) + (send-shield-attack this arg0 (the-as touching-shapes-entry s5-0) (the-as int a3-1)) + ) + ) + ((and ((method-of-type touching-shapes-entry prims-touching-action?) + (the-as touching-shapes-entry s5-0) + (-> this root) + (collide-action no-standon) + (collide-action) + ) + (not (logtest? (-> this root penetrated-by) (-> s3-0 root penetrate-using))) + ) + (send-shoves (-> this root) arg0 (the-as touching-shapes-entry s5-0) 0.0 10240.0 24576.0) + ) + ) + ) + ) + ) + +;; definition for method 41 of type shield-sphere +(defmethod shield-attack-handler ((this shield-sphere) (arg0 process-focusable) (arg1 event-message-block)) + (let ((s5-0 (-> arg1 param 0)) + (v1-0 (the-as object (-> arg1 param 1))) + ) + (cond + ((and (and (-> this next-state) (= (-> this next-state name) 'shield-enabled)) + (and (= (-> this shield-type) (shield-type shield-type-0)) + (or (!= (-> (the-as attack-info v1-0) id) (-> this last-attack-id)) + (time-elapsed? (-> this last-attack-time) (seconds 1)) + ) + ) + ) + (set! (-> this last-attack-id) (-> (the-as attack-info v1-0) id)) + (set-time! (-> this last-attack-time)) + (let* ((v1-5 (get-attack-damage this arg0 arg1)) + (f30-0 (* (-> this heat-info damage-scalar) (the float v1-5))) + ) + (when (> v1-5 0) + (if (< (+ f30-0 (-> this heat-info current-heat-value)) 1.0) + (set! f30-0 (fmin f30-0 (* 0.0027777778 (the float (- (current-time) (-> this heat-info last-heat-time)))))) + ) + (set-time! (-> this heat-info last-heat-time)) + (let ((a0-14 (handle->process (-> this heat-info distort-handle)))) + (if a0-14 + (send-event a0-14 'distort) + ) + ) + (sound-play "dpbiped-shld-df") + (+! (-> this heat-info current-heat-value) f30-0) + (if (< 1.0 (-> this heat-info current-heat-value)) + (go (method-of-object this explode)) + ) + ) + ) + (if (not (send-shield-attack this arg0 (the-as touching-shapes-entry s5-0) (the-as int (-> this persistent-attack-id))) + ) + (send-shoves (-> this root) arg0 (the-as touching-shapes-entry s5-0) 0.0 12288.0 32768.0) + ) + #t + ) + (else + #f + ) + ) + ) + ) + +;; definition for method 42 of type shield-sphere +(defmethod send-shield-attack ((this shield-sphere) (arg0 process-focusable) (arg1 touching-shapes-entry) (arg2 int)) + (let ((t0-0 0)) + (send-event + arg0 + 'attack + arg1 + (static-attack-info :mask (vehicle-impulse-factor) ((id (the-as uint arg2)) + (damage (the float t0-0)) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (shove-back (meters 4)) + (shove-up (meters 3)) + (mode 'generic) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate die (shield-sphere-distort) + :virtual #t + :code (behavior () + '() + ) + ) + +;; failed to figure out what this is: +(defstate distort (shield-sphere-distort) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('die) + (go-virtual die) + ) + (('distort) + (let ((f0-0 (ja-frame-num 0))) + (if (< 5.0 f0-0) + (go-virtual distort) + ) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (logclear! (-> self draw status) (draw-control-status no-draw)) + ) + :trans (behavior () + (let ((v1-1 (handle->process (-> self owner)))) + (when v1-1 + (set! (-> self root trans quad) (-> (the-as process-drawable v1-1) root trans quad)) + (quaternion-copy! (-> self root quat) (-> (the-as process-drawable v1-1) root quat)) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! shield-sphere-distort-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual inactive) + ) + :post (behavior () + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate inactive (shield-sphere-distort) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('distort) + (go-virtual distort) + ) + (('die) + (go-virtual die) + ) + ) + ) + :enter (behavior () + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + :code sleep-code + ) 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 cc4c0b1b0e..efd9db2340 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)) @@ -235,98 +235,35 @@ (cond ((logtest? (-> self collect-effect flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> v1-9 root-prim prim-core world-sphere quad)) - (let ((s5-2 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-2 - (let ((t9-3 (method-of-type part-tracker-subsampler activate))) - (t9-3 (the-as part-tracker-subsampler s5-2) gp-0 "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-4 run-function-in-process) - (a0-13 s5-2) - (a1-10 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> self collect-effect)) - (set! (-> *part-tracker-subsampler-params-default* duration) 0) - (set! (-> *part-tracker-subsampler-params-default* callback) part-tracker-track-target) - (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-4) a0-13 a1-10 *part-tracker-subsampler-params-default*) - ) - (-> s5-2 ppointer) - ) + (part-tracker-spawn + part-tracker-subsampler + :to gp-0 + :group (-> self collect-effect) + :callback part-tracker-track-target ) ) (else (set! (-> *launch-matrix* trans quad) (-> v1-9 root-prim prim-core world-sphere quad)) - (let ((s5-3 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-3 - (let ((t9-6 (method-of-type part-tracker activate))) - (t9-6 (the-as part-tracker s5-3) gp-0 "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-7 run-function-in-process) - (a0-18 s5-3) - (a1-13 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> self collect-effect)) - (set! (-> *part-tracker-params-default* duration) 0) - (set! (-> *part-tracker-params-default* callback) part-tracker-track-target) - (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-7) a0-18 a1-13 *part-tracker-params-default*) - ) - (-> s5-3 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to gp-0 :group (-> self collect-effect) :callback part-tracker-track-target) ) ) (cond ((logtest? (-> self collect-effect2 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self root root-prim prim-core world-sphere quad)) - (let ((gp-1 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-1 - (let ((t9-9 (method-of-type part-tracker-subsampler activate))) - (t9-9 (the-as part-tracker-subsampler gp-1) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-10 run-function-in-process) - (a0-25 gp-1) - (a1-16 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> self collect-effect2)) - (set! (-> *part-tracker-subsampler-params-default* duration) 0) - (set! (-> *part-tracker-subsampler-params-default* callback) part-tracker-move-to-target) - (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-10) a0-25 a1-16 *part-tracker-subsampler-params-default*) - ) - (-> gp-1 ppointer) - ) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> self collect-effect2) + :callback part-tracker-move-to-target ) ) (else (set! (-> *launch-matrix* trans quad) (-> self root root-prim prim-core world-sphere quad)) - (let ((gp-2 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-2 - (let ((t9-12 (method-of-type part-tracker activate))) - (t9-12 (the-as part-tracker gp-2) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-13 run-function-in-process) - (a0-32 gp-2) - (a1-19 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> self collect-effect2)) - (set! (-> *part-tracker-params-default* duration) 0) - (set! (-> *part-tracker-params-default* callback) part-tracker-move-to-target) - (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-13) a0-32 a1-19 *part-tracker-params-default*) - ) - (-> gp-2 ppointer) - ) + (part-tracker-spawn + part-tracker + :to self + :group (-> self collect-effect2) + :callback part-tracker-move-to-target ) ) ) @@ -362,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 @@ -457,7 +394,7 @@ ) ) :trans (behavior () - (if (not (logtest? (the-as game-feature (logand (game-feature feature57) (-> *setting-control* user-current features))) + (if (not (logtest? (the-as game-feature (logand (game-feature lighteco) (-> *setting-control* user-current features))) (-> *game-info* features) ) ) @@ -507,7 +444,7 @@ (defstate close (light-eco-vent) :virtual #t :trans (behavior () - (if (logtest? (the-as game-feature (logand (game-feature feature57) (-> *setting-control* user-current features))) + (if (logtest? (the-as game-feature (logand (game-feature lighteco) (-> *setting-control* user-current features))) (-> *game-info* features) ) (go-virtual open #f) @@ -581,7 +518,7 @@ (set! (-> this sound) (new 'process 'ambient-sound "eco-bg-light" (-> this root trans) 0.0)) (set-falloff-far! (-> this sound) 81920.0) (set-falloff-mode! (-> this sound) 9) - (if (logtest? (the-as game-feature (logand (game-feature feature57) (-> *setting-control* user-current features))) + (if (logtest? (the-as game-feature (logand (game-feature lighteco) (-> *setting-control* user-current features))) (-> *game-info* features) ) (go (method-of-object this open) #t) @@ -681,7 +618,7 @@ ) ) :trans (behavior () - (if (not (logtest? (the-as game-feature (logand (game-feature feature58) (-> *setting-control* user-current features))) + (if (not (logtest? (the-as game-feature (logand (game-feature darkeco) (-> *setting-control* user-current features))) (-> *game-info* features) ) ) @@ -731,7 +668,7 @@ (defstate close (dark-eco-vent) :virtual #t :trans (behavior () - (if (logtest? (the-as game-feature (logand (game-feature feature58) (-> *setting-control* user-current features))) + (if (logtest? (the-as game-feature (logand (game-feature darkeco) (-> *setting-control* user-current features))) (-> *game-info* features) ) (go-virtual open #f) @@ -808,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/voicebox_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/voicebox_REF.gc index 255a8a865b..9e0ac865dd 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/voicebox_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/voicebox_REF.gc @@ -17,7 +17,7 @@ ;; failed to figure out what this is: (defpart 407 - :init-specs ((:texture (new 'static 'texture-id :index #x7a :page #x4)) + :init-specs ((:texture (shockwave level-default-sprite)) (:birth-func 'birth-func-set-vel) (:num 0.0 0.3) (:y (meters 0.15)) @@ -111,7 +111,7 @@ ((talk-box-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 4) :texture-level 10 - :light-index 1 + :sort 1 ) ;; definition for method 24 of type remote @@ -173,7 +173,7 @@ ) (vector-float*! v1-16 a0-9 (/ 1.0 f0-2)) ) - (sparticle-launch-control-method-18 (-> this part) (-> this node-list data 3)) + (spawn-from-cspace (-> this part) (-> this node-list data 3)) ) 0 (none) 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 new file mode 100644 index 0000000000..0365032b62 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/warp-gate_REF.gc @@ -0,0 +1,2031 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-warpgate + :id 202 + :duration (seconds 0.267) + :flags (sp0 sp6) + :bounds (static-bspherem 0 0 0 8) + :rotate ((degrees 90) (degrees 0) (degrees 0)) + :parts ((sp-item 825 :flags (is-3d sp3 sp7)) (sp-item 826 :flags (sp3)) (sp-item 827 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 825 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4.75)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 196.0) + (:fade-a -3.1875) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 826 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 14)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 48.0) + (:fade-a -0.8) + (:timer (seconds 0.267)) + (:flags (glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 827 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 16.0) + (:x (meters 0) (meters 2)) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:scalevel-x (meters -0.0025)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-airtrain-dust-plume :id 203 :bounds (static-bspherem 0 0 0 15) :parts ((sp-item 828))) + +;; failed to figure out what this is: +(defpart 828 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 1.0) + (:x (meters 0) (meters 10)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 1) (meters 1)) + (:r 128.0) + (:g 106.0 16.0) + (:b 64.0 32.0) + (:a 16.0 32.0) + (:vel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-x (meters 0.033333335) (meters 0.006666667)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.04 -0.08) + (:accel-y (meters 0.00033333333)) + (:friction 0.95 0.03) + (:timer (seconds 4.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-airtrain-dust-hover :id 204 :bounds (static-bspherem 0 0 0 15) :parts ((sp-item 829))) + +;; failed to figure out what this is: +(defpart 829 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 5)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 1) (meters 1)) + (:r 128.0) + (:g 106.0 16.0) + (:b 64.0 32.0) + (:a 16.0 16.0) + (:vel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-x (meters 0.016666668) (meters 0.006666667)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.04 -0.08) + (:accel-y (meters 0.00033333333)) + (:friction 0.95 0.03) + (:timer (seconds 4.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-airtrain-thruster + :id 205 + :linger-duration (seconds 2) + :flags (sp4 sp6) + :bounds (static-bspherem 0 0 0 12) + :rotate ((degrees 180) (degrees 0) (degrees 0)) + :parts ((sp-item 830 :flags (sp6 sp7)) + (sp-item 831 :flags (sp6 sp7)) + (sp-item 832 :flags (sp7)) + (sp-item 833 :flags (sp7)) + (sp-item 834 :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-airtrain-thruster-off + :id 206 + :linger-duration (seconds 2) + :flags (sp4 sp6) + :bounds (static-bspherem 0 0 0 12) + :rotate ((degrees 180) (degrees 0) (degrees 0)) + :parts ((sp-item 834 :fade-after (meters 120) :falloff-to (meters 90) :flags (sp7)) + (sp-item 835 :fade-after (meters 120) :falloff-to (meters 90) :flags (sp7)) + (sp-item 836 :flags (sp6 sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 830 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 0.1)) + (:scale-x (meters 1) (meters 0.4)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0 128.0) + (:b 0.0) + (:a 64.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: +(defpart 831 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 0.1)) + (:scale-x (meters 4.8) (meters 0.6)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0 128.0) + (:b 0.0) + (:a 16.0 2.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: +(defpart 832 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 2.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 1) (meters 1)) + (:r 196.0) + (:g 128.0 64.0) + (:b :copy g) + (:a 16.0 16.0) + (:vel-x (meters -0.006666667) (meters 0.013333334)) + (:vel-y (meters -0.05) (meters -0.1)) + (:vel-z (meters -0.006666667) (meters 0.013333334)) + (:scalevel-x (meters 0.053333335) (meters 0.053333335)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:fade-a -0.21333334 -0.42666668) + (:accel-y (meters 0.00016666666) (meters 0.0005)) + (:friction 0.94 0.04) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 835 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 2.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 1) (meters 1)) + (:r 196.0) + (:g 128.0 64.0) + (:b :copy g) + (:a 10.0 4.0) + (:vel-x (meters -0.006666667) (meters 0.013333334)) + (:vel-y (meters -0.05) (meters -0.1)) + (:vel-z (meters -0.006666667) (meters 0.013333334)) + (:scalevel-x (meters 0.053333335) (meters 0.053333335)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:fade-a -0.21333334 -0.42666668) + (:accel-y (meters 0.00016666666) (meters 0.0005)) + (:friction 0.94 0.04) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 836 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 0.1)) + (:scale-x (meters 1.4) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 48.0 32.0) + (:b 0.0) + (:a 48.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: +(defpart 833 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.0 1.0) + (:x (meters 0) (meters 0.5)) + (:scale-x (meters 0.2) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 192.0 64.0) + (:g 128.0) + (:b 0.0) + (:a 128.0) + (:omega (degrees 0.0675) (degrees 0.0225)) + (:vel-x (meters -0.013333334) (meters 0.026666667)) + (:vel-y (meters -0.1) (meters -0.06666667)) + (:vel-z (meters -0.013333334) (meters 0.026666667)) + (:fade-g -1.0) + (:fade-a -2.56) + (:accel-x (meters 0) (meters 0.0016666667)) + (:friction 0.96 0.02) + (:timer (seconds 0.085) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:func 'sparticle-motion-blur) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 834 + :init-specs ((:num 0.4) + (:rot-x 8) + (:r 1638.4) + (:g 1331.2) + (:b 1433.6) + (:vel-y (meters -0.05) (meters -0.016666668)) + (:fade-r 32.768) + (:fade-g 28.671999) + (:fade-b 26.623999) + (:accel-x (meters 0) (meters 0.0016666667)) + (:friction 0.94) + (:timer (seconds 0.335)) + (:flags (distort)) + (:next-time (seconds 0.167)) + (:next-launcher 837) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 837 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b -4.096)) + ) + +;; failed to figure out what this is: +(defpartgroup group-warp-hellcat-thruster + :id 207 + :duration (seconds 3) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 32) + :parts ((sp-item 838 :flags (is-3d sp7)) + (sp-item 839 :flags (is-3d sp7)) + (sp-item 840 :flags (sp7)) + (sp-item 841 :flags (is-3d sp7)) + (sp-item 842 :flags (is-3d sp7)) + (sp-item 843 :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 838 + :init-specs ((:texture (mech-flame lprecurc-sprite)) + (:num 1.0) + (:x (meters 1.45)) + (:y (meters 1.1)) + (:z (meters -5.15)) + (:scale-x (meters 0.6)) + (:rot-x 4) + (:scale-y (meters 2)) + (:r 128.0 128.0) + (:g 32.0 96.0) + (:b :copy g) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 839 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:num 1.0) + (:x (meters 1.45)) + (:y (meters 1.1)) + (:z (meters -5.15)) + (:scale-x (meters 0.6)) + (:rot-x 4) + (:rot-z (degrees 90)) + (:scale-y (meters 2)) + (:r 128.0 128.0) + (:g 32.0 96.0) + (:b :copy g) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 840 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters 1.45)) + (:y (meters 1.1)) + (:z (meters -4.75)) + (:scale-x (meters 1.75)) + (:rot-x (degrees 0.5625)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 16.0 4.0) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 841 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:num 1.0) + (:x (meters -1.45)) + (:y (meters 1.1)) + (:z (meters -5.15)) + (:scale-x (meters 0.6)) + (:rot-x 4) + (:scale-y (meters 2)) + (:r 128.0 128.0) + (:g 32.0 96.0) + (:b :copy g) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 842 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:num 1.0) + (:x (meters -1.45)) + (:y (meters 1.1)) + (:z (meters -5.15)) + (:scale-x (meters 0.6)) + (:rot-x 4) + (:rot-z (degrees 90)) + (:scale-y (meters 2)) + (:r 128.0 128.0) + (:g 32.0 96.0) + (:b :copy g) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 843 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:x (meters -1.45)) + (:y (meters 1.1)) + (:z (meters -4.75)) + (:scale-x (meters 1.75)) + (:rot-x (degrees 0.5625)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 16.0 4.0) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-warp-gate warp-gate warp-gate-lod0-jg warp-gate-idle-ja + ((warp-gate-lod0-mg (meters 999999))) + :bounds (static-spherem 0 3 0 4) + :origin-joint-index 3 + ) + +;; definition of type warp-gate +(deftype warp-gate (process-drawable) + ((root collide-shape :override) + (level-name symbol) + (on-notice pair) + (on-activate pair) + (on-close pair) + (wait-for pair) + (continue continue-point) + (distance meters) + (anim-speed float) + (test-time time-frame) + (center vector :inline) + ) + (:state-methods + idle + (use continue-point) + hidden + ) + (:methods + (init-skel-and-collide! (_type_) none) + (init-defaults! (_type_) none) + (eval-on-notice (_type_) continue-point) + ) + ) + +;; definition for method 3 of type warp-gate +(defmethod inspect ((this warp-gate)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tlevel-name: ~A~%" (-> this level-name)) + (format #t "~2Ton-notice: ~A~%" (-> this on-notice)) + (format #t "~2Ton-activate: ~A~%" (-> this on-activate)) + (format #t "~2Ton-close: ~A~%" (-> this on-close)) + (format #t "~2Twait-for: ~A~%" (-> this wait-for)) + (format #t "~2Tcontinue: ~A~%" (-> this continue)) + (format #t "~2Tdistance: (meters ~m)~%" (-> this distance)) + (format #t "~2Tanim-speed: ~f~%" (-> this anim-speed)) + (format #t "~2Ttest-time: ~D~%" (-> this test-time)) + (format #t "~2Tcenter: ~`vector`P~%" (-> this center)) + (label cfg-4) + this + ) + +;; definition for method 25 of type warp-gate +(defmethod eval-on-notice ((this warp-gate)) + (let ((s5-0 (script-eval (-> this on-notice)))) + (cond + ((= s5-0 'hide) + (logior! (-> this draw status) (draw-control-status no-draw)) + (set! (-> this continue) #f) + ) + (s5-0 + (logclear! (-> this draw status) (draw-control-status no-draw)) + (set! (-> this continue) (get-continue-by-name *game-info* (the-as string (car s5-0)))) + (set! (-> this on-activate) (the-as pair (car (cdr s5-0)))) + (set! (-> this wait-for) (the-as pair (car (cdr (cdr s5-0))))) + (set! (-> this on-close) (the-as pair (car (cdr (cdr (cdr s5-0)))))) + ) + (else + (set! (-> this continue) #f) + ) + ) + ) + (-> this continue) + ) + +;; failed to figure out what this is: +(defstate hidden (warp-gate) + :virtual #t + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate idle (warp-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('hide) + (go-virtual hidden) + ) + (('effect) + (script-eval '(part-tracker "group-warpgate" entity self joint "outerOut")) + ) + ) + ) + :code (behavior () + (remove-setting! 'allow-progress) + (set-time! (-> self state-time)) + (update-transforms (-> self root)) + (until #f + (eval-on-notice self) + (when (and (and *target* + (and (>= (-> self distance) (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (-> self continue) + (-> *setting-control* user-current airlock) + (begin + (persist-with-delay *setting-control* 'lightjak (seconds 0.1) 'lightjak #f 0.0 0) + (persist-with-delay *setting-control* 'darkjak (seconds 0.1) 'darkjak #f 0.0 0) + (persist-with-delay *setting-control* 'board (seconds 0.1) 'board #f 0.0 0) + (not (logtest? (focus-status in-head edge-grab pole flut tube light board pilot mech dark indax) + (-> *target* focus-status) + ) + ) + ) + (not (-> *setting-control* user-current hint)) + (zero? (-> *target* ext-anim)) + ) + (talker-surpress!) + (when (and (can-display-query? self "warp-gate" -99.0) + (cond + ((and (-> *target* next-state) (let ((v1-37 (-> *target* next-state name))) + (or (= v1-37 'target-warp-in) (= v1-37 'target-warp-out)) + ) + ) + (set-time! (-> self state-time)) + #f + ) + (else + #t + ) + ) + (time-elapsed? (-> self state-time) (seconds 0.1)) + ) + (if (and (cpad-pressed? 0 triangle) (process-grab? *target* #f)) + (go-virtual use (-> self continue)) + ) + (script-eval (-> self on-close)) + (let ((gp-0 + (new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-58 gp-0)) + (set! (-> v1-58 width) (the float 340)) + ) + (let ((v1-59 gp-0)) + (set! (-> v1-59 height) (the float 80)) + ) + (let ((v1-60 gp-0) + (a0-25 (-> *setting-control* user-default language)) + ) + (set! (-> v1-60 scale) (if (or (= a0-25 (language-enum korean)) (= a0-25 (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) + ) + ) + ) + ) + (cond + ((-> self continue) + (seek! (-> self anim-speed) 1.0 (* 2.0 (seconds-per-frame))) + (setup-masks (-> self draw) 2 0) + ) + (else + (setup-masks (-> self draw) 0 2) + (seek! (-> self anim-speed) 0.0 (* 2.0 (seconds-per-frame))) + ) + ) + (update! (-> self sound)) + (ja-post) + (suspend) + (ja :num! (loop! (-> self anim-speed))) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate use (warp-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('effect) + (script-eval '(part-tracker "group-warpgate" entity self joint "outerOut")) + ) + ) + ) + :exit (behavior () + (remove-setting! 'mode-name) + (remove-setting! 'interp-time) + ) + :trans (behavior () + (send-event *camera* 'joystick 0.0 0.0) + ) + :code (behavior ((arg0 continue-point)) + (local-vars (v1-38 symbol)) + (kill-current-talker '() '() 'exit) + (set-setting! 'mode-name 'cam-fixed 0.0 0) + (set-setting! 'interp-time 'abs 0.0 0) + (set-time! (-> self state-time)) + (logclear! (-> self mask) (process-mask actor-pause)) + (when (not arg0) + (process-release? *target*) + (go-virtual idle) + ) + (set-setting! 'allow-progress #f 0.0 0) + (set! (-> *setting-control* user-default border-mode) #t) + (set! (-> *level* play?) #t) + (apply-settings *setting-control*) + (let ((s5-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> s5-0 from) (process->ppointer self)) + (set! (-> s5-0 num-params) 4) + (set! (-> s5-0 message) 'change-state) + (set! (-> s5-0 param 0) (the-as uint target-warp-out)) + (let ((v1-22 (new 'static 'vector))) + (set! (-> v1-22 quad) (-> self center quad)) + (set! (-> s5-0 param 1) (the-as uint v1-22)) + ) + (set! (-> s5-0 param 2) (the-as uint (target-pos 0))) + (set! (-> s5-0 param 3) (the-as uint (process->handle self))) + (send-event-function *target* s5-0) + ) + (script-eval (-> self on-activate)) + (while (begin + (set! v1-38 + (when (-> self wait-for) + (let* ((s5-1 (-> self wait-for)) + (a1-8 (car s5-1)) + ) + (while (not (null? s5-1)) + (when (not (member (status-of-level-and-borrows *level* (the-as symbol a1-8) #f) '(loaded active))) + (set! v1-38 #t) + (goto cfg-21) + ) + (set! s5-1 (cdr s5-1)) + (set! a1-8 (car s5-1)) + ) + ) + #f + ) + ) + (label cfg-21) + (or v1-38 (not (time-elapsed? (-> self state-time) (seconds 2)))) + ) + (update! (-> self sound)) + (suspend) + (ja :num! (loop!)) + (ja-post) + ) + (if (not (logtest? (-> arg0 flags) (continue-flags no-blackout))) + (set-blackout-frames (seconds 0.05)) + ) + (start 'play arg0) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (suspend) + ) + ) + (while (and *target* (and (>= 81920.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (suspend) + (ja :num! (loop!)) + (ja-post) + ) + (logior! (-> self mask) (process-mask actor-pause)) + (go-virtual idle) + ) + ) + +;; definition for method 23 of type warp-gate +;; WARN: Return type mismatch draw-control vs none. +(defmethod init-skel-and-collide! ((this warp-gate)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate)) + (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 action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 12288.0 0.0 16384.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) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-warp-gate" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (none) + ) + +;; definition for method 24 of type warp-gate +;; INFO: Used lq/sq +;; WARN: Return type mismatch float vs none. +(defmethod init-defaults! ((this warp-gate)) + (set! (-> this level-name) (-> this level name)) + (set! (-> this on-notice) (res-lump-struct (-> this entity) 'on-notice pair)) + (set! (-> this on-activate) #f) + (set! (-> this wait-for) #f) + (set! (-> this continue) #f) + (set! (-> this on-close) #f) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 202) this)) + (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 0 :fo-max 30) (-> this root trans) 0.0) + ) + (set! (-> this distance) (res-lump-float (-> this entity) 'distance :default 20480.0)) + (none) + ) + +;; definition for function warp-gate-init +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defbehavior warp-gate-init warp-gate ((arg0 entity-actor) (arg1 vector)) + (stack-size-set! (-> self main-thread) 512) + (init-skel-and-collide! self) + (if arg0 + (process-drawable-from-entity! self arg0) + ) + (if arg1 + (set! (-> self root trans quad) (-> arg1 quad)) + ) + (logior! (-> self mask) (process-mask actor-pause)) + (init-defaults! self) + (go-virtual idle) + (none) + ) + +;; definition for method 11 of type warp-gate +;; WARN: Return type mismatch none vs object. +(defmethod init-from-entity! ((this warp-gate) (arg0 entity-actor)) + (warp-gate-init arg0 (the-as vector #f)) + ) + +;; definition for symbol *warp-jump-mods*, type surface +(define *warp-jump-mods* (new 'static 'surface + :name 'jump + :turnv 273066.66 + :turnvf 30.0 + :turnvv 1820444.5 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 65536.0 + :target-speed 65536.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 + :mode 'air + :flags (surface-flag turn-to-vel turn-when-centered gun-off) + ) + ) + +;; failed to figure out what this is: +(defstate target-warp-out (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('death-end) + (let ((v0-0 (the-as object (logior (-> self draw status) (draw-control-status no-draw))))) + (set! (-> self draw status) (the-as draw-control-status v0-0)) + v0-0 + ) + ) + (('warp-gate) + (if (not (-> self control unknown-spool-anim00)) + 'busy + ) + ) + (else + (target-generic-event-handler proc argc message block) + ) + ) + ) + :enter (behavior ((arg0 vector) (arg1 vector) (arg2 handle)) + (set-time! (-> self state-time)) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (set! (-> self control mod-surface) *warp-jump-mods*) + (set! (-> self control unknown-vector37 quad) (-> arg0 quad)) + (set! (-> self control unknown-vector38 quad) (-> arg1 quad)) + (+! (-> self control unknown-vector37 y) -4096.0) + (set! (-> self control unknown-word04) (the-as uint #f)) + (set! (-> self control unknown-handle02) arg2) + (vector-reset! (-> self control transv)) + (logior! (-> self target-flags) (target-flags tf6)) + (set! (-> self alt-cam-pos quad) (-> arg1 quad)) + (forward-up-nopitch->quaternion + (-> self control dir-targ) + (vector-! (new 'stack-no-clear 'vector) arg1 (-> self control trans)) + (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self control dir-targ)) + ) + ) + :exit (behavior () + (logclear! (-> self target-flags) (target-flags tf6)) + ) + :code (behavior ((arg0 vector) (arg1 vector) (arg2 handle)) + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! jakb-duck-high-jump-ja :num! (seek! (ja-aframe 16.0 0)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 16.0 0))) + ) + (vector-! (-> self control transv) (-> self control unknown-vector37) (-> self control trans)) + (vector-xz-normalize! (-> self control transv) 32768.0) + (let ((v1-18 (new-stack-vector0))) + (let ((f0-6 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-18 (-> self control transv) (vector-float*! v1-18 (-> self control dynam gravity-normal) f0-6)) + ) + (let* ((f0-7 (vector-length v1-18)) + (f1-1 f0-7) + (f2-4 + (- (sqrtf + (* 2.0 + (-> self control dynam gravity-length) + (vector-dot + (-> self control dynam gravity-normal) + (vector-! (new 'stack-no-clear 'vector) (-> self control unknown-vector37) (-> self control trans)) + ) + ) + ) + (* 0.008333334 (- (-> self control dynam gravity-length))) + ) + ) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f2-4) + (vector-float*! v1-18 v1-18 (/ f0-7 f1-1)) + ) + ) + ) + (let ((v1-20 (-> self control root-prim))) + (set! (-> v1-20 prim-core collide-as) (collide-spec)) + (set! (-> v1-20 prim-core collide-with) (collide-spec)) + ) + 0 + (set-time! (-> self state-time)) + (set! (-> self trans-hook) + (lambda :behavior target + () + (let ((v1-0 (new-stack-vector0)) + (f0-1 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + ) + 0.0 + (vector-! v1-0 (-> self control transv) (vector-float*! v1-0 (-> self control dynam gravity-normal) f0-1)) + (let* ((f1-2 (vector-length v1-0)) + (f2-0 f1-2) + ) + (if (< f0-1 0.0) + (set! f0-1 8192.0) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f0-1) + (vector-float*! v1-0 v1-0 (/ f1-2 f2-0)) + ) + ) + ) + (let ((gp-1 (vector-! (new-stack-vector0) (-> self control unknown-vector37) (-> self control trans)))) + (set! (-> gp-1 y) 0.0) + (send-event *target* 'sidekick #f) + (when (and (or (< (vector-dot gp-1 (-> self control transv)) 0.0) (-> self control unknown-spool-anim00)) + (time-elapsed? (-> self state-time) (seconds 0.05)) + ) + (vector-seek! (-> self draw color-mult) (new 'static 'vector) (* 2.0 (seconds-per-frame))) + (set! (-> self control transv x) (* 0.95 (-> self control transv x))) + (set! (-> self control transv z) (* 0.95 (-> self control transv z))) + (when (not (-> self control unknown-spool-anim00)) + (sound-play "warpgate-tele") + (send-event (handle->process (-> self control unknown-handle02)) 'effect) + (send-event self 'draw #f) + (let ((v0-1 #t)) + (set! (-> self control unknown-word04) (the-as uint v0-1)) + v0-1 + ) + ) + ) + ) + ) + ) + (ja-no-eval :group! jakb-duck-high-jump-ja :num! (seek! (ja-aframe 40.0 0)) :frame-num (ja-aframe 16.0 0)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 40.0 0))) + ) + (sleep-code) + ) + :post target-no-stick-post + ) + +;; failed to figure out what this is: +(defstate target-warp-in (target) + :event target-generic-event-handler + :enter (behavior ((arg0 vector) (arg1 vector) (arg2 object)) + (set! (-> self control did-move-to-pole-or-max-jump-height) (the-as float arg2)) + ((-> target-warp-out enter) arg0 arg1 (the-as handle arg2)) + ) + :exit (-> target-warp-out exit) + :trans (behavior () + (set! (-> self control transv x) + (* 2.4 (- (-> self control unknown-vector38 x) (-> self control unknown-vector37 x))) + ) + (set! (-> self control transv z) + (* 2.4 (- (-> self control unknown-vector38 z) (-> self control unknown-vector37 z))) + ) + (if (logtest? (-> self control status) (collide-status on-surface)) + (go target-hit-ground #f) + ) + ) + :code (behavior ((arg0 vector) (arg1 vector) (arg2 object)) + (let ((a0-1 (-> self control did-move-to-pole-or-max-jump-height))) + (when a0-1 + (let ((s5-0 (res-lump-struct (the-as res-lump a0-1) 'camera-name string))) + (when s5-0 + (logclear! (-> self target-flags) (target-flags tf6)) + (process-spawn-function + process + (lambda :behavior process + ((arg0 string)) + (local-vars (a1-2 event-message-block)) + (add-setting! 'entity-name arg0 0.0 0) + (until (send-event-function *camera* a1-2) + (suspend) + (set! a1-2 (new 'stack-no-clear 'event-message-block)) + (let ((v1-2 (process->ppointer self))) + (set! (-> a1-2 from) v1-2) + ) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'intro-done?) + ) + #f + ) + s5-0 + :to self + ) + ) + ) + ) + ) + (let ((v1-12 (-> self control root-prim))) + (set! (-> self control backup-collide-as) (-> v1-12 prim-core collide-as)) + (set! (-> self control backup-collide-with) (-> v1-12 prim-core collide-with)) + ) + (let ((v1-15 (-> self control root-prim))) + (set! (-> v1-15 prim-core collide-as) (collide-spec)) + (set! (-> v1-15 prim-core collide-with) (collide-spec)) + ) + 0 + (ja-channel-set! 0) + (vector-reset! (-> self control transv)) + (move-to-point! (-> self control) (-> self control unknown-vector37)) + (let ((s5-1 (current-time))) + (while (or (not (time-elapsed? s5-1 (seconds 1))) + (< 81920.0 (vector-vector-distance (camera-pos) (-> self control trans))) + ) + (suspend) + ) + ) + (set-heading-vec! (-> self control) (-> self control transv)) + (rot->dir-targ! (-> self control)) + (set-time! (-> self state-time)) + (set! (-> self post-hook) target-no-stick-post) + (ja-channel-set! 1) + (send-event + (if arg2 + (-> (the-as process arg2) child 3) + ) + 'effect + ) + (send-event self 'draw #t) + (sound-play "warpgate-tele") + (ja-no-eval :group! jakb-duck-high-jump-ja :num! (seek! (ja-aframe 42.0 0)) :frame-num (ja-aframe 40.0 0)) + (until (ja-done? 0) + (let ((v1-58 (new-stack-vector0))) + (let ((f0-5 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-58 (-> self control transv) (vector-float*! v1-58 (-> self control dynam gravity-normal) f0-5)) + ) + (let* ((f0-6 (vector-length v1-58)) + (f1-1 f0-6) + (f2-3 + (- (sqrtf (* 4096.0 (-> self control dynam gravity-length))) + (* 0.008333334 (- (-> self control dynam gravity-length))) + ) + ) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f2-3) + (vector-float*! v1-58 v1-58 (/ f0-6 f1-1)) + ) + ) + ) + (suspend) + (ja :num! (seek! (ja-aframe 42.0 0))) + ) + (ja-no-eval :group! jakb-duck-high-jump-ja :num! (seek! (ja-aframe 50.0 0)) :frame-num (ja-aframe 42.0 0)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 50.0 0))) + ) + (let ((v1-79 (-> self control root-prim))) + (set! (-> v1-79 prim-core collide-as) (-> self control backup-collide-as)) + (set! (-> v1-79 prim-core collide-with) (-> self control backup-collide-with)) + ) + (ja-no-eval :group! jakb-duck-high-jump-ja :num! (seek!) :frame-num (ja-aframe 50.0 0)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (target-falling-anim -1 (seconds 0.33)) + ) + :post target-no-move-post + ) + +;; failed to figure out what this is: +(defskelgroup skel-air-train air-train air-train-lod0-jg air-train-idle-ja + ((air-train-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 -2 12.5) + :origin-joint-index 3 + ) + +;; definition of type air-train +(deftype air-train (warp-gate) + ((part-exhaust-left sparticle-launch-control) + (part-exhaust-right sparticle-launch-control) + (part-dust sparticle-launch-control) + (dust-y float) + (hover-sound sound-id) + (base-pos vector :inline) + ) + ) + +;; definition for method 3 of type air-train +(defmethod inspect ((this air-train)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type warp-gate inspect))) + (t9-0 this) + ) + (format #t "~2Tpart-exhaust-left: ~A~%" (-> this part-exhaust-left)) + (format #t "~2Tpart-exhaust-right: ~A~%" (-> this part-exhaust-right)) + (format #t "~2Tpart-dust: ~A~%" (-> this part-dust)) + (format #t "~2Tdust-y: ~f~%" (-> this dust-y)) + (format #t "~2Thover-sound: ~D~%" (-> this hover-sound)) + (format #t "~2Tbase-pos: #~%" (-> this base-pos)) + (label cfg-4) + this + ) + +;; definition for method 7 of type air-train +;; WARN: Return type mismatch warp-gate vs air-train. +(defmethod relocate ((this air-train) (offset int)) + (if (nonzero? (-> this part-exhaust-left)) + (&+! (-> this part-exhaust-left) offset) + ) + (if (nonzero? (-> this part-exhaust-right)) + (&+! (-> this part-exhaust-right) offset) + ) + (if (nonzero? (-> this part-dust)) + (&+! (-> this part-dust) offset) + ) + (the-as air-train ((method-of-type warp-gate relocate) this offset)) + ) + +;; definition for method 10 of type air-train +(defmethod deactivate ((this air-train)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this hover-sound)) + (if (nonzero? (-> this part-exhaust-left)) + (kill-particles (-> this part-exhaust-left)) + ) + (if (nonzero? (-> this part-exhaust-right)) + (kill-particles (-> this part-exhaust-right)) + ) + (if (nonzero? (-> this part-dust)) + (kill-particles (-> this part-dust)) + ) + ((method-of-type warp-gate deactivate) this) + (none) + ) + +;; definition for method 23 of type air-train +;; WARN: Return type mismatch draw-control vs none. +(defmethod init-skel-and-collide! ((this air-train)) + (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 player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 69632.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 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! (-> v1-13 transform-index) 6) + (set-vector! (-> v1-13 local-sphere) 0.0 10240.0 0.0 24576.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)) + (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) 3) + (set-vector! (-> v1-15 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-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) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-air-train" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (none) + ) + +;; definition for method 24 of type air-train +;; INFO: Used lq/sq +;; WARN: Return type mismatch sound-id vs none. +(defmethod init-defaults! ((this air-train)) + (let ((t9-0 (method-of-type warp-gate init-defaults!))) + (t9-0 this) + ) + (set! (-> this base-pos quad) (-> this root trans quad)) + (let ((v1-2 (-> this level-name))) + (set! (-> this dust-y) (cond + ((= v1-2 'nest) + -1105.92 + ) + ((= v1-2 'caspad) + 114647.04 + ) + (else + (the-as float #x7f800000) + ) + ) + ) + ) + (set! (-> this part-exhaust-left) (create-launch-control (-> *part-group-id-table* 206) this)) + (set! (-> this part-exhaust-right) (create-launch-control (-> *part-group-id-table* 206) this)) + (set! (-> this part-dust) (create-launch-control (-> *part-group-id-table* 204) this)) + (set! (-> this root pause-adjust-distance) 368640.0) + (set! (-> this hover-sound) (sound-play "air-train")) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (air-train) + :virtual #t + :post (behavior () + (let ((t9-0 (-> (method-of-type warp-gate idle) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (set! (-> self root trans y) (+ (-> self base-pos y) + (* 696.32 (cos (* 66.19798 (the float (mod (current-time) 990))))) + (* 450.56 (cos (* 42.25403 (the float (mod (current-time) 1551))))) + ) + ) + (spawn-from-cspace (-> self part-exhaust-left) (joint-node air-train-lod0-jg thruster_l)) + (spawn-from-cspace (-> self part-exhaust-right) (joint-node air-train-lod0-jg thruster_r)) + (let ((f0-9 (-> self dust-y))) + (when (!= f0-9 (the-as float #x7f800000)) + (let ((a1-2 (new 'stack-no-clear 'vector))) + (set! (-> a1-2 quad) (-> self root trans quad)) + (set! (-> a1-2 y) f0-9) + (spawn (-> self part-dust) a1-2) + ) + ) + ) + (sound-play "air-train" :id (-> self hover-sound) :position (-> self root trans)) + ) + ) + +;; failed to figure out what this is: +(defstate use (air-train) + :virtual #t + :code (behavior ((arg0 continue-point)) + (kill-current-talker '() '() 'exit) + (set-time! (-> self state-time)) + (logclear! (-> self mask) (process-mask actor-pause)) + (when (not arg0) + (process-release? *target*) + (go-virtual idle) + ) + (set-setting! 'allow-progress #f 0.0 0) + (set! (-> *setting-control* user-default border-mode) #t) + (set! (-> *level* play?) #t) + (apply-settings *setting-control*) + (sound-stop (-> self hover-sound)) + (set! (-> self hover-sound) (new 'static 'sound-id)) + (script-eval (-> self on-activate)) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "desert-air-train-in" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "air-train-5" + :art-group "scenecamera" + :anim "desert-air-train-in" + :parts 4 + :command-list '((0 + (kill "air-train-5") + (fadein (frame-time-30 10)) + (apply ,(lambda () (kill-by-type v-marauder *active-pool*))) + ) + (260 + (part-tracker + "group-warp-fma-drop-thrusters" + entity + "air-train" + joint + "thruster_l" + track + #t + duration + (frame-range 260 475) + ) + (part-tracker + "group-warp-fma-drop-thrusters" + entity + "air-train" + joint + "thruster_r" + track + #t + duration + (frame-range 260 475) + ) + ) + (270 (part-tracker + "group-warp-fma-dust-takeoff" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 270 475) + ) + ) + (350 + (part-tracker + "group-warp-thruster-trail" + entity + "air-train" + joint + "thruster_l" + track + #t + duration + (frame-range 350 475) + subsample-num + (new 'static 'bfloat :data 5.0) + ) + (part-tracker + "group-warp-thruster-trail" + entity + "air-train" + joint + "thruster_r" + track + #t + duration + (frame-range 350 475) + subsample-num + (new 'static 'bfloat :data 5.0) + ) + ) + (475 (fadeout (frame-time-30 5))) + ) + :cut-list '(285) + :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 'warpcast + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min 290)) + :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 'warpcast + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min 290)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "particleman" + :level 'warpcast + :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 "air-train" + :level 'desertb + :art-group "skel-air-train" + :prefix "" + :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-warp" + :end-point "ctyport-warp" + :borrow '() + :sfx-volume 0.75 + :ambient-volume -1.0 + :music-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-air-train-out" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "air-train-5" + :art-group "scenecamera" + :anim "desert-air-train-out" + :parts 3 + :command-list '((0 (kill "air-train-5") (fadein (frame-time-30 10))) + (1 + (part-tracker + "group-warp-fma-drop-thrusters" + entity + "air-train" + joint + "thruster_l" + track + #t + duration + (frame-range 1 200) + ) + (part-tracker + "group-warp-fma-drop-thrusters" + entity + "air-train" + joint + "thruster_r" + track + #t + duration + (frame-range 1 200) + ) + ) + (65 (part-tracker + "group-warp-fma-dust-takeoff" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 65 172) + ) + ) + (290 (fadeout (frame-time-30 5))) + ) + :cut-list '(180) + :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 'warpcast + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((180 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 'warpcast + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((180 max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "particleman" + :level 'warpcast + :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 "air-train" + :level 'desertb + :art-group "skel-air-train" + :prefix "" + :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-warp" + :end-point "desert-warp" + :borrow '() + :sfx-volume 0.75 + :ambient-volume -1.0 + :music-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 "city-air-train-out" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-87" + :art-group "scenecamera" + :anim "city-air-train-out" + :parts 2 + :command-list '((0 (kill "air-train-1") (fadein (frame-time-30 10))) (235 (fadeout (frame-time-30 5)))) + :cut-list '(98 188) + :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 'citycast + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :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 'citycast + :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 "air-train" + :level 'ctyport + :art-group "skel-air-train" + :prefix "" + :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 "ctyport-air-train" + :end-point "ctyport-warp" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-volume -1.0 + :music-delay 1500.0 + :on-running '(begin + (sound-play-loop "port-amb-mov") + (sound-play-loop "port-water-mov") + (sound-play-loop "port-gulls-mov") + ) + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "city-air-train-in-desert" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie enemy platform projectile) + :entity "scene-stage-87" + :art-group "scenecamera" + :anim "city-air-train-in-desert" + :parts 3 + :command-list '((0 (kill "air-train-1") (fadein (frame-time-30 10))) (275 (fadeout (frame-time-30 5)))) + :cut-list '(51 102 226) + :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 'citycast + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min 226)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :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 'citycast + :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 "air-train" + :level 'ctyport + :art-group "skel-air-train" + :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 "ctyport-warp" + :end-point "desert-warp" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-volume -1.0 + :music-delay 1500.0 + :on-running '(begin + (sound-play-loop "port-amb-mov") + (sound-play-loop "port-water-mov") + (sound-play-loop "port-gulls-mov") + ) + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-warp-fma-dust-takeoff + :id 208 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 844 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 844 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 5.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-warp-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-warp-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-warp-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 3.0 :y 3.3 :z 4.3 :w 5.3) + :one-over-x-deltas (new 'static 'vector :x 0.29999995 :y 1.0000002 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-warp-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 3.0 :y 3.3 :z 4.3 :w 5.3) + :one-over-x-deltas (new 'static 'vector :x 0.29999995 :y 1.0000002 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-warp-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-warp-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-warp-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-warp-fma-dust-takeoff-curve-settings*, type particle-curve-settings +(define *part-warp-fma-dust-takeoff-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 5) + :lifetime-offset (seconds 2) + :flags (particle-curve-flags pcf0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 844 init-specs 15 initial-valuef) + (the-as float *part-warp-fma-dust-takeoff-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-warp-fma-dust-takeoff-curve-settings* color-start) *range-warp-dust-color*) + +;; failed to figure out what this is: +(set! (-> *part-warp-fma-dust-takeoff-curve-settings* alpha-start) *range-warp-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-warp-fma-dust-takeoff-curve-settings* scale-x-start) *range-warp-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-warp-fma-dust-takeoff-curve-settings* scale-y-start) *range-warp-dust-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-warp-fma-dust-takeoff-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-warp-fma-dust-takeoff-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-warp-fma-dust-takeoff-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-warp-fma-dust-takeoff-curve-settings* a-scalar) *curve-warp-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-warp-fma-dust-takeoff-curve-settings* scale-x-scalar) *curve-warp-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-warp-fma-dust-takeoff-curve-settings* scale-y-scalar) *curve-warp-dust-scale-y*) + +;; failed to figure out what this is: +(defpartgroup group-warp-fma-drop-thrusters + :id 209 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 845 :flags (sp7)) + (sp-item 846 :flags (sp7) :period (seconds 0.017) :length (seconds 0.017)) + (sp-item 847 :flags (sp7) :period (seconds 0.017) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 845 + :init-specs ((:num 1.0) + (:x (meters -2) (meters 4)) + (:y (meters -2) (meters 4)) + (:z (meters -2) (meters 4)) + (:rot-x 5) + (:r 20480.0) + (:g 10240.0) + (:b 8192.0 4096.0) + (:timer (seconds 0.5)) + (:flags (distort launch-along-z)) + ) + ) + +;; failed to figure out what this is: +(defpart 846 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 4.0) + (:scale-x (meters 2) (meters 2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 200.0) + (:b 128.0) + (:a 40.0 10.0) + (:vel-y (meters 0.1)) + (: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 847 + :init-specs ((:texture (glow level-default-sprite)) + (:num 3.0) + (:scale-x (meters 6) (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 100.0 28.0) + (:b 0.0) + (:a 8.0 8.0) + (:vel-y (meters 0.1)) + (: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-warp-thruster-trail + :id 210 + :flags (sp0 sp4 sp13) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 848 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 848 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0 100.0) + (:g :copy r) + (:b :copy r) + (:a 20.0 10.0) + (:vel-y (meters 0.1)) + (:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.05 -0.05) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-z (degrees 0)) + (:rotate-y (degrees 0)) + ) + ) diff --git a/test/decompiler/reference/jak3/engine/common-obs/water-anim_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/water-anim_REF.gc new file mode 100644 index 0000000000..1fee5bcef8 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/water-anim_REF.gc @@ -0,0 +1,486 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type water-anim +(deftype water-anim (process-drawable) + ((water-height meters) + (wade-height meters) + (swim-height meters) + (bottom-height meters) + (attack-event symbol) + (attack-id uint32) + (flow flow-control) + (target handle) + (flags water-flag) + (look wanim-look) + (play-ambient-sound? symbol) + (visible symbol) + ) + (:state-methods + unknown + idle + ) + (:methods + (move-to-point! (_type_ vector) int) + (get-ripple-height (_type_ vector) float) + (init-water! (_type_) object) + (alloc-root! (_type_) none) + (water-anim-init! (_type_) none) + (stub (_type_) none) + (set-offset-and-look! (_type_) none) + ) + ) + +;; definition for method 3 of type water-anim +(defmethod inspect ((this water-anim)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Twater-height: (meters ~m)~%" (-> this water-height)) + (format #t "~2Twade-height: (meters ~m)~%" (-> this wade-height)) + (format #t "~2Tswim-height: (meters ~m)~%" (-> this swim-height)) + (format #t "~2Tbottom-height: (meters ~m)~%" (-> this bottom-height)) + (format #t "~2Tattack-event: ~A~%" (-> this attack-event)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Tflow: ~A~%" (-> this flow)) + (format #t "~2Ttarget: ~D~%" (-> this target)) + (format #t "~2Tflags: #x~X~%" (-> this flags)) + (format #t "~2Tlook: ~D~%" (-> this look)) + (format #t "~2Tplay-ambient-sound?: ~A~%" (-> this play-ambient-sound?)) + (format #t "~2Tvisible: ~A~%" (-> this visible)) + (label cfg-4) + this + ) + +;; definition for method 7 of type water-anim +(defmethod relocate ((this water-anim) (offset int)) + (if (nonzero? (-> this flow)) + (&+! (-> this flow) offset) + ) + (call-parent-method this offset) + ) + +;; failed to figure out what this is: +(defskelgroup skel-water-anim-nst-lake water-anim-nst water-anim-nst-lake-lod0-jg -1 + ((water-anim-nst-lake-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 300) + ) + +;; failed to figure out what this is: +(defskelgroup skel-water-anim-forb-foresta water-anim-forb 0 -1 + ((1 (meters 999999))) + :bounds (static-spherem 0 0 0 500) + ) + +;; failed to figure out what this is: +(defskelgroup skel-water-anim-fora-forestb water-anim-fora 0 -1 + ((1 (meters 999999))) + :bounds (static-spherem 0 0 0 500) + ) + +;; failed to figure out what this is: +(defskelgroup skel-water-anim-fora-forestc water-anim-fora 2 -1 + ((3 (meters 999999))) + :bounds (static-spherem 0 0 0 500) + ) + +;; failed to figure out what this is: +(defskelgroup skel-water-anim-fora-forestd water-anim-fora 4 -1 + ((5 (meters 999999))) + :bounds (static-spherem 0 0 0 500) + ) + +;; failed to figure out what this is: +(defskelgroup skel-water-anim-fora-foreste water-anim-fora 6 -1 + ((7 (meters 999999))) + :bounds (static-spherem 0 0 0 500) + ) + +;; failed to figure out what this is: +(defskelgroup skel-water-anim-fora-forestf water-anim-fora 8 -1 + ((9 (meters 999999))) + :bounds (static-spherem 0 0 0 500) + ) + +;; failed to figure out what this is: +(defskelgroup skel-water-anim-waspala-thronesec water-anim-waspala water-anim-waspala-thronesec-lod0-jg -1 + ((water-anim-waspala-thronesec-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 500) + ) + +;; failed to figure out what this is: +(defskelgroup skel-water-anim-waspala-windowwall water-anim-waspala water-anim-waspala-windowwall-lod0-jg -1 + ((water-anim-waspala-windowwall-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 500) + ) + +;; failed to figure out what this is: +(defskelgroup skel-water-anim-waspala-frontthrone water-anim-waspala water-anim-waspala-frontthrone-lod0-jg -1 + ((water-anim-waspala-frontthrone-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 500) + ) + +;; failed to figure out what this is: +(defskelgroup skel-water-anim-waspala-frontwindowwall water-anim-waspala water-anim-waspala-frontwindowwall-lod0-jg -1 + ((water-anim-waspala-frontwindowwall-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 500) + ) + +;; definition of type water-anim-look +(deftype water-anim-look (structure) + ((skel-group string) + (anim int32) + (ambient-sound-spec sound-spec) + ) + ) + +;; definition for method 3 of type water-anim-look +(defmethod inspect ((this water-anim-look)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'water-anim-look) + (format #t "~1Tskel-group: ~A~%" (-> this skel-group)) + (format #t "~1Tanim: ~D~%" (-> this anim)) + (format #t "~1Tambient-sound-spec: ~A~%" (-> this ambient-sound-spec)) + (label cfg-4) + this + ) + +;; definition for symbol *water-anim-look*, type (array water-anim-look) +(define *water-anim-look* + (new 'static 'boxed-array :type water-anim-look + (new 'static 'water-anim-look :skel-group "water-anim-nst-lake" :anim 2 :ambient-sound-spec #f) + (new 'static 'water-anim-look :skel-group "water-anim-forb-foresta" :anim 2 :ambient-sound-spec #f) + (new 'static 'water-anim-look :skel-group "water-anim-fora-forestb" :anim 10 :ambient-sound-spec #f) + (new 'static 'water-anim-look :skel-group "water-anim-fora-forestc" :anim 10 :ambient-sound-spec #f) + (new 'static 'water-anim-look :skel-group "water-anim-fora-forestd" :anim 10 :ambient-sound-spec #f) + (new 'static 'water-anim-look :skel-group "water-anim-fora-foreste" :anim 10 :ambient-sound-spec #f) + (new 'static 'water-anim-look :skel-group "water-anim-fora-forestf" :anim 10 :ambient-sound-spec #f) + (new 'static 'water-anim-look :skel-group "water-anim-waspala-thronesec" :anim 8 :ambient-sound-spec #f) + (new 'static 'water-anim-look :skel-group "water-anim-waspala-windowwall" :anim 8 :ambient-sound-spec #f) + (new 'static 'water-anim-look :skel-group "water-anim-waspala-frontthrone" :anim 8 :ambient-sound-spec #f) + (new 'static 'water-anim-look :skel-group "water-anim-waspala-frontwindowwall" :anim 8 :ambient-sound-spec #f) + ) + ) + +;; definition for function water-anim-event-handler +;; INFO: Used lq/sq +(defbehavior water-anim-event-handler water-anim ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-1 object)) + (case arg2 + (('move-to) + (move-to-point! self (the-as vector (-> arg3 param 0))) + (set! v0-1 (logclear (-> self mask) (process-mask sleep-code))) + (set! (-> self mask) (the-as process-mask v0-1)) + v0-1 + ) + (('move-to-y) + (let ((a1-2 (new 'stack-no-clear 'vector))) + (set! (-> a1-2 quad) (-> self root trans quad)) + (set! (-> a1-2 y) (the-as float (-> arg3 param 0))) + (move-to-point! self a1-2) + ) + (set! v0-1 (logclear (-> self mask) (process-mask sleep-code))) + (set! (-> self mask) (the-as process-mask v0-1)) + v0-1 + ) + (('water) + (let* ((s5-0 (the-as object (-> arg3 param 0))) + (s4-0 (-> arg3 param 1)) + (gp-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when (and (logtest? (-> self flags) (water-flag deadly)) + (logtest? (water-flag touch-water) (-> (the-as water-info s5-0) flags)) + (the-as uint gp-0) + ) + (let ((v1-15 (-> self attack-event))) + (case v1-15 + ((#f) + ) + (('heat) + (send-event (the-as process-tree gp-0) 'heat (* 10.0 (seconds-per-frame))) + ) + (('drown-death 'lava 'dark-eco-pool) + (if (and (not (focus-test? (the-as process-focusable gp-0) board)) + (send-event + (the-as process-tree gp-0) + 'attack-invinc + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (-> self attack-id)) (damage 2.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode v1-15)) + ) + ) + ) + (send-event self 'notify 'attack) + ) + ) + (else + (if (and (not (focus-test? (the-as process-focusable gp-0) board)) + (send-event + (the-as process-tree gp-0) + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (-> self attack-id)) (damage 2.0) (vehicle-damage-factor 1.0) (vehicle-impulse-factor 1.0) (mode v1-15)) + ) + ) + ) + (send-event self 'notify 'attack) + ) + ) + ) + ) + ) + (when (and (logtest? (-> self flags) (water-flag flow)) + (logtest? (water-flag touch-water) (-> (the-as water-info s5-0) flags)) + ) + (let ((a0-40 (-> self flow))) + (if (nonzero? a0-40) + (push-process a0-40 (the-as process-focusable gp-0)) + ) + ) + ) + ) + ) + (('visible) + (cond + ((-> arg3 param 0) + (set! (-> self visible) #t) + ) + (else + (set! (-> self visible) #f) + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + ) + (logclear! (-> self mask) (process-mask sleep-code)) + #t + ) + ) + ) + +;; failed to figure out what this is: +(defstate idle (water-anim) + :virtual #t + :event water-anim-event-handler + :trans (behavior () + (let ((a0-0 (-> self flow))) + (if (and (nonzero? a0-0) *display-vol-marks*) + (draw-path a0-0) + ) + ) + (cond + ((not (-> self visible)) + ) + ((< (-> (math-camera-pos) y) (+ -8192.0 (-> self root trans y))) + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + (else + (logclear! (-> self draw status) (draw-control-status no-draw)) + ) + ) + (if (and (-> self visible) (and (-> self play-ambient-sound?) (nonzero? (-> self sound)))) + (update! (-> self sound)) + ) + ) + :code (behavior () + (until #f + (ja-post) + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + #f + ) + ) + +;; definition for method 22 of type water-anim +;; INFO: Used lq/sq +(defmethod move-to-point! ((this water-anim) (arg0 vector)) + (set! (-> this root trans quad) (-> arg0 quad)) + (set! (-> this water-height) (-> this root trans y)) + (if (nonzero? (-> this sound)) + (update-trans! (-> this sound) (-> this root trans)) + ) + ) + +;; definition for method 23 of type water-anim +(defmethod get-ripple-height ((this water-anim) (arg0 vector)) + (ripple-find-height this 0 arg0) + ) + +;; definition for method 27 of type water-anim +;; WARN: Return type mismatch symbol vs none. +(defmethod stub ((this water-anim)) + (none) + ) + +;; definition for method 28 of type water-anim +;; INFO: Used lq/sq +;; WARN: Return type mismatch quaternion vs none. +(defmethod set-offset-and-look! ((this water-anim)) + (local-vars (sv-16 res-tag)) + (set! (-> this play-ambient-sound?) #t) + (set! (-> this visible) #t) + (set! (-> this look) + (res-lump-value (-> this entity) 'look wanim-look :default (the-as uint128 -1) :time -1000000000.0) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-4 (res-lump-data (-> this entity) 'trans-offset vector :tag-ptr (& sv-16)))) + (when v1-4 + (+! (-> this root trans x) (-> v1-4 x)) + (+! (-> this root trans y) (-> v1-4 y)) + (+! (-> this root trans z) (-> v1-4 z)) + ) + ) + (let ((f0-6 (res-lump-float (-> this entity) 'rotoffset))) + (if (!= f0-6 0.0) + (quaternion-rotate-y! (-> this root quat) (-> this root quat) f0-6) + ) + ) + (none) + ) + +;; definition for method 24 of type water-anim +;; WARN: Return type mismatch none vs object. +(defmethod init-water! ((this water-anim)) + (let ((s5-0 (-> this look))) + (if (or (< (the-as int s5-0) 0) (>= (the-as int s5-0) (-> *water-anim-look* length))) + (go process-drawable-art-error "skel group") + ) + (let ((s5-1 (-> *water-anim-look* s5-0))) + (initialize-skeleton-by-name this (-> s5-1 skel-group)) + (ja-channel-set! 1) + (let ((s4-0 (-> this skel root-channel 0))) + (joint-control-channel-group-eval! + s4-0 + (the-as art-joint-anim (-> this draw art-group data (-> s5-1 anim))) + num-func-identity + ) + (set! (-> s4-0 frame-num) 0.0) + ) + (let ((a2-1 (-> s5-1 ambient-sound-spec))) + (when a2-1 + (let ((a3-0 (new 'stack-no-clear 'vector))) + (vector+! a3-0 (-> this root trans) (-> this draw bounds)) + (set! (-> this sound) (new 'process 'ambient-sound a2-1 a3-0 0.0)) + ) + ) + ) + ) + ) + (ja-post) + ) + +;; definition for method 25 of type water-anim +;; WARN: Return type mismatch trsqv vs none. +(defmethod alloc-root! ((this water-anim)) + (set! (-> this root) (new 'process 'trsqv)) + (none) + ) + +;; definition for method 26 of type water-anim +;; INFO: Used lq/sq +;; WARN: Return type mismatch water-flag vs none. +(defmethod water-anim-init! ((this water-anim)) + (local-vars (sv-16 res-tag)) + (set! (-> this attack-event) (the-as symbol ((method-of-type res-lump get-property-struct) + (-> this entity) + 'attack-event + 'interp + -1000000000.0 + (the-as structure 'drown) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (process-drawable-from-entity! this (-> this entity)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this vol) (new 'process 'vol-control this)) + (logior! (-> this vol flags) (vol-flags display? vol-flags-1)) + (set! (-> this bottom-height) 32768.0) + (let* ((v1-8 *game-info*) + (a0-7 (+ (-> v1-8 attack-id) 1)) + ) + (set! (-> v1-8 attack-id) a0-7) + (set! (-> this attack-id) a0-7) + ) + (set! (-> this target) (the-as handle #f)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-10 (the-as (pointer float) ((method-of-type res-lump get-property-data) + (-> this entity) + 'water-height + 'exact + -1000000000.0 + (the-as pointer #f) + (& sv-16) + *res-static-buf* + ) + ) + ) + ) + (when v1-10 + (set! (-> this water-height) (-> v1-10 0)) + (set! (-> this wade-height) (-> v1-10 1)) + (set! (-> this swim-height) (-> v1-10 2)) + (if (>= (-> sv-16 elt-count) (the-as uint 4)) + (set! (-> this flags) (the-as water-flag (the int (-> v1-10 3)))) + ) + (if (>= (-> sv-16 elt-count) (the-as uint 5)) + (set! (-> this bottom-height) (-> v1-10 4)) + ) + ) + ) + (logior! (-> this flags) (water-flag part-water)) + (if (logtest? (-> this flags) (water-flag flow)) + (set! (-> this flow) (new 'process 'flow-control this (the-as res-lump #f))) + ) + (cond + ((zero? (-> this flags)) + (if (< 0.0 (-> this wade-height)) + (logior! (-> this flags) (water-flag can-wade)) + ) + (if (< 0.0 (-> this swim-height)) + (logior! (-> this flags) (water-flag can-swim)) + ) + ) + (else + ) + ) + (none) + ) + +;; definition for function water-anim-init-by-other +(defbehavior water-anim-init-by-other water-anim ((arg0 entity-actor)) + (process-entity-set! self arg0) + (stub self) + (alloc-root! self) + (water-anim-init! self) + (set-offset-and-look! self) + (init-water! self) + (go-virtual idle) + ) + +;; definition for method 11 of type water-anim +(defmethod init-from-entity! ((this water-anim) (arg0 entity-actor)) + (stub this) + (alloc-root! this) + (water-anim-init! this) + (set-offset-and-look! this) + (init-water! this) + (go (method-of-object this idle)) + ) + + + + 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 new file mode 100644 index 0000000000..20758dc3c8 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/water-flow_REF.gc @@ -0,0 +1,701 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function ray-plane-equation-intersect +(defun ray-plane-equation-intersect ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector)) + (let* ((f0-1 (vector4-dot arg3 arg1)) + (f1-1 (vector-dot arg3 arg2)) + (f30-0 (/ (- f0-1) f1-1)) + ) + (vector-v*float+! arg0 arg1 arg2 f30-0) + f30-0 + ) + ) + +;; definition of type flow-section +(deftype flow-section (structure) + ((start vector :inline) + (trailing plane :inline) + (pull-dir vector :inline) + (radial-dir vector :inline) + (speed float) + ) + ) + +;; definition for method 3 of type flow-section +(defmethod inspect ((this flow-section)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'flow-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)) + (format #t "~1Tspeed: ~f~%" (-> this speed)) + (label cfg-4) + this + ) + +;; definition of type flow-section-array +(deftype flow-section-array (inline-array-class) + ((data flow-section :inline :dynamic) + ) + ) + +;; definition for method 3 of type flow-section-array +(defmethod inspect ((this flow-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! (-> flow-section-array heap-base) (the-as uint 80)) + +;; definition of type flow-control +(deftype flow-control (basic) + ((path path-control) + (speed float) + (belt-radius float) + (sections flow-section-array) + (leading plane :inline) + (collide-bounds sphere :inline) + ) + (:methods + (new (symbol type process-drawable res-lump) _type_) + (draw-path (_type_) none) + (setup (_type_ (pointer float) int) none) + (push-process (_type_ process-focusable) none) + (find-and-push-things (_type_) none) + (flow-control-method-13 (_type_ water-info vector) symbol) + ) + ) + +;; definition for method 3 of type flow-control +(defmethod inspect ((this flow-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tpath: ~A~%" (-> this path)) + (format #t "~1Tspeed: ~f~%" (-> this speed)) + (format #t "~1Tbelt-radius: ~f~%" (-> this belt-radius)) + (format #t "~1Tsections: ~A~%" (-> this sections)) + (format #t "~1Tleading: #~%" (-> this leading)) + (format #t "~1Tcollide-bounds: #~%" (-> this collide-bounds)) + (label cfg-4) + this + ) + +;; definition for method 7 of type flow-control +(defmethod relocate ((this flow-control) (offset int)) + (if (nonzero? (-> this sections)) + (&+! (-> this sections) offset) + ) + (if (nonzero? (-> this path)) + (&+! (-> this path) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 9 of type flow-control +;; WARN: Return type mismatch int vs none. +(defmethod draw-path ((this flow-control)) + (let ((a0-1 (-> this path))) + (if (nonzero? a0-1) + (debug-draw a0-1) + ) + ) + 0 + (none) + ) + +;; definition for method 13 of type flow-control +;; INFO: Used lq/sq +(defmethod flow-control-method-13 ((this flow-control) (arg0 water-info) (arg1 vector)) + (local-vars (v0-7 symbol) (sv-192 vector) (sv-208 vector) (sv-224 flow-section)) + (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))) + (set! (-> s5-0 quad) (-> arg1 quad)) + (set! (-> s5-0 w) 1.0) + (when (>= (vector4-dot s5-0 (the-as vector (-> this leading))) 0.0) + (let* ((s1-0 (-> this sections)) + (s2-0 (-> s1-0 length)) + (a3-0 (the-as object (-> this leading))) + ) + (dotimes (s4-0 s2-0) + (let ((s3-0 (-> s1-0 data s4-0))) + (when (< (vector4-dot s5-0 (the-as vector (-> s3-0 trailing))) 0.0) + (let ((v1-10 (new 'stack-no-clear 'vector))) + (vector-! v1-10 s5-0 (-> s3-0 start)) + (when (>= (-> this belt-radius) (fabs (vector-dot v1-10 (-> s3-0 radial-dir)))) + (let* ((f0-7 (vector-dot v1-10 (-> s3-0 pull-dir))) + (f0-9 (- (-> v1-10 y) (* (-> s3-0 pull-dir y) f0-7))) + ) + (when (and (>= f0-9 -41984.0) (>= 41779.2 f0-9)) + (let ((a0-11 (new 'stack-no-clear 'vector))) + (set! sv-192 (new 'stack-no-clear 'vector)) + (let* ((f30-0 (ray-plane-equation-intersect a0-11 s5-0 (-> s3-0 pull-dir) (the-as vector a3-0))) + (t9-1 ray-plane-equation-intersect) + (a1-5 s5-0) + (a2-4 (-> s3-0 pull-dir)) + (a3-1 (-> s3-0 trailing)) + (f0-10 (t9-1 sv-192 a1-5 a2-4 a3-1)) + ) + (let ((a1-6 (new 'stack-no-clear 'vector))) + (let ((v1-16 (-> s3-0 start))) + (let ((a0-13 (-> s3-0 pull-dir))) + (let ((a2-6 12288.0)) + (.mov vf7 a2-6) + ) + (.lvf vf5 (&-> a0-13 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-6 quad) vf6) + ) + 0 + (let ((f0-12 (/ f30-0 (- f30-0 f0-10)))) + (set! sv-208 (new 'stack-no-clear 'vector)) + (displacement-between-two-points-normalized! (-> this path) sv-208 (+ (the float (if (= s4-0 (+ s2-0 -1)) + (+ s4-0 -1) + s4-0 + ) + ) + f0-12 + ) + ) + ) + ) + ) + (let ((v1-22 (new 'stack-no-clear 'vector))) + (let ((a0-15 v1-22) + (f0-15 (* (-> s3-0 speed) (seconds-per-frame))) + ) + (vector-float*! a0-15 sv-208 f0-15) + ) + (let ((a1-10 (new 'stack-no-clear 'vector))) + (let ((a0-17 s5-0)) + (let ((a2-9 2048.0)) + (.mov vf7 a2-9) + ) + (.lvf vf5 (&-> v1-22 quad)) + (.lvf vf4 (&-> a0-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-10 quad) vf6) + ) + ) + 0 + (let ((s0-1 (-> s3-0 start))) + (set! sv-224 (-> s1-0 data (if (= s4-0 (+ s2-0 -1)) + (+ s4-0 -1) + (+ s4-0 1) + ) + ) + ) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (let ((s2-1 (new 'stack-no-clear 'vector)) + (s1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s2-1 quad) (-> s3-0 pull-dir quad)) + (vector-normalize! s2-1 1.0) + (vector-cross! s1-1 s2-1 *y-vector*) + (vector-normalize! s1-1 1.0) + (vector-cross! (-> arg0 normal) s2-1 s1-1) + ) + (let ((t9-5 vector-segment-distance-point!) + (a3-2 s4-1) + ) + (t9-5 s5-0 s0-1 (the-as vector sv-224) a3-2) + ) + (set! (-> arg0 trans y) (-> s4-1 y)) + ) + ) + (if (< (-> arg0 normal y) 0.0) + (vector-negate! (-> arg0 normal) (-> arg0 normal)) + ) + 0 + (return #t) + ) + ) + ) + ) + ) + ) + (set! a3-0 (+ (the-as uint (-> s1-0 data 0 trailing)) (* 80 s4-0))) + ) + ) + ) + ) + (return #f) + v0-7 + ) + ) + +;; definition for method 11 of type flow-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; WARN: Function (method 11 flow-control) has a return type of none, but the expression builder found a return statement. +(defmethod push-process ((this flow-control) (arg0 process-focusable)) + (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))) + (set! (-> s5-0 quad) (-> (get-trans arg0 0) quad)) + (set! (-> s5-0 w) 1.0) + (when (>= (vector4-dot s5-0 (the-as vector (-> this leading))) 0.0) + (let* ((v1-7 (-> this sections)) + (a0-3 (-> v1-7 length)) + (a3-0 (the-as object (-> this leading))) + ) + (dotimes (s3-1 a0-3) + (let ((s2-0 (-> v1-7 data s3-1))) + (when (< (vector4-dot s5-0 (the-as vector (-> s2-0 trailing))) 0.0) + (let ((v1-8 (new 'stack-no-clear 'vector))) + (vector-! v1-8 s5-0 (-> s2-0 start)) + (when (>= (-> this belt-radius) (fabs (vector-dot v1-8 (-> s2-0 radial-dir)))) + (let* ((f0-7 (vector-dot v1-8 (-> s2-0 pull-dir))) + (f0-9 (- (-> v1-8 y) (* (-> s2-0 pull-dir y) f0-7))) + ) + (when (and (>= f0-9 -41984.0) (>= 41779.2 f0-9)) + (let* ((a0-11 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'vector)) + (f30-0 (ray-plane-equation-intersect a0-11 s5-0 (-> s2-0 pull-dir) (the-as vector a3-0))) + (f0-10 (ray-plane-equation-intersect s1-0 s5-0 (-> s2-0 pull-dir) (-> s2-0 trailing))) + ) + (let ((a1-13 (new 'stack-no-clear 'vector))) + (let ((v1-13 (-> s2-0 start))) + (let ((a0-13 (-> s2-0 pull-dir))) + (let ((a2-6 12288.0)) + (.mov vf7 a2-6) + ) + (.lvf vf5 (&-> a0-13 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-13 quad) vf6) + ) + 0 + (let ((f0-12 (/ f30-0 (- f30-0 f0-10))) + (s1-1 (new 'stack-no-clear 'vector)) + ) + (displacement-between-two-points-normalized! (-> this path) s1-1 (+ (the float s3-1) f0-12)) + (let ((v1-17 (new 'stack-no-clear 'vector))) + (vector-float*! v1-17 s1-1 (* (-> s2-0 speed) (seconds-per-frame))) + (let ((a1-16 (new 'stack-no-clear 'vector))) + (let ((a0-17 v1-17)) + (let ((a2-9 2048.0)) + (.mov vf7 a2-9) + ) + (.lvf vf5 (&-> a0-17 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 (&-> a1-16 quad) vf6) + ) + 0 + (send-event arg0 'push-trans v1-17 (seconds 10)) + ) + ) + ) + ) + ) + ) + ) + (return #f) + ) + ) + (set! a3-0 (+ (the-as uint (-> v1-7 data 0 trailing)) (* 80 s3-1))) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 12 of type flow-control +;; WARN: Return type mismatch int vs none. +(defmethod find-and-push-things ((this flow-control)) + (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* (the-as bounding-box (-> 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))) + (b! #t cfg-9 :delay (nop!)) + (label cfg-4) + (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 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)) + ) + (label cfg-9) + (b! (!= a0-2 (-> *collide-player-list* alive-list-end)) cfg-4 :delay (nop!)) + ) + ) + (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 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 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-30) + (let ((a1-29 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (if (and a1-29 (not (logtest? (focus-status board) (-> (the-as process-focusable a1-29) focus-status)))) + (push-process this (the-as process-focusable a1-29)) + ) + ) + ) + ) + (label cfg-30) + 0 + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 10 of type flow-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod setup ((this flow-control) (arg0 (pointer float)) (arg1 int)) + (local-vars (sv-32 int) (sv-48 flow-section) (sv-64 int) (sv-80 flow-section)) + (let* ((s5-0 (-> this path)) + (s4-0 (-> s5-0 curve num-cverts)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (let ((s0-0 (new 'process 'flow-section-array (+ s4-0 -1)))) + (set! (-> this sections) s0-0) + (set! (-> this collide-bounds quad) (the-as uint128 0)) + (get-point-in-path! s5-0 s3-0 0.0 'interp) + (vector+! (the-as vector (-> this collide-bounds)) (the-as vector (-> this collide-bounds)) s3-0) + (set! sv-32 (+ s4-0 -1)) + (set! sv-48 (the-as flow-section #f)) + (set! sv-64 0) + (while (< sv-64 sv-32) + (set! sv-80 (-> s0-0 data sv-64)) + (let ((f0-0 1.0)) + (if (< sv-64 arg1) + (set! f0-0 (-> arg0 sv-64)) + ) + (if arg0 + (set! (-> sv-80 speed) (* f0-0 (-> this speed))) + (set! (-> sv-80 speed) (-> this speed)) + ) + ) + (set! (-> sv-80 start quad) (-> s3-0 quad)) + (get-point-in-path! s5-0 s3-0 (the float (+ sv-64 1)) 'interp) + (vector+! (the-as vector (-> this collide-bounds)) (the-as vector (-> this collide-bounds)) s3-0) + (vector-! (-> sv-80 pull-dir) s3-0 (-> sv-80 start)) + (vector-normalize! (-> sv-80 pull-dir) 1.0) + (set! (-> sv-80 trailing quad) (-> sv-80 pull-dir quad)) + (set! (-> sv-80 trailing y) 0.0) + (vector-normalize! (-> sv-80 trailing) 1.0) + (set-vector! (-> sv-80 radial-dir) (- (-> sv-80 trailing z)) 0.0 (-> sv-80 trailing x) 1.0) + (set! (-> sv-80 trailing w) (- (vector-dot s3-0 (the-as vector (-> sv-80 trailing))))) + (when sv-48 + (vector+! + (the-as vector (-> sv-48 trailing)) + (the-as vector (-> sv-48 trailing)) + (the-as vector (-> sv-80 trailing)) + ) + (vector-normalize! (-> sv-48 trailing) 1.0) + (set! (-> sv-48 trailing w) (- (vector-dot (-> sv-80 start) (the-as vector (-> sv-48 trailing))))) + ) + (set! sv-48 sv-80) + sv-48 + (set! sv-64 (+ sv-64 1)) + ) + ) + (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-22 (/ 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-22) + (dotimes (s2-2 s4-0) + (get-point-in-path! s5-0 s3-0 (the float s2-2) 'interp) + (let ((f0-25 (vector-vector-distance-squared s3-0 (-> this collide-bounds)))) + (if (< f30-0 f0-25) + (set! f30-0 f0-25) + ) + ) + ) + (set! (-> this collide-bounds r) (+ (sqrtf f30-0) (-> this belt-radius))) + ) + ) + 0 + (none) + ) + +;; definition for method 0 of type flow-control +;; INFO: Used lq/sq +(defmethod new flow-control ((allocation symbol) (type-to-make type) (arg0 process-drawable) (arg1 res-lump)) + (local-vars (sv-16 res-tag)) + (if (not arg1) + (set! arg1 (-> arg0 entity)) + ) + (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (when (nonzero? gp-0) + (let ((v1-6 (new 'process 'curve-control arg0 'flow -1000000000.0))) + (cond + ((nonzero? v1-6) + (set! (-> gp-0 path) v1-6) + (logior! (-> v1-6 flags) (path-control-flag display draw-line draw-point draw-text)) + (if (< (-> v1-6 curve num-cverts) 2) + (go process-drawable-art-error "bad flow path") + ) + (set! (-> gp-0 speed) (res-lump-float arg1 'speed :default 12288.0)) + (set! (-> gp-0 belt-radius) (res-lump-float arg1 'extra-radius :default 16384.0)) + (set! sv-16 (new 'static 'res-tag)) + (let ((a1-6 (res-lump-data arg1 'scale-factor pointer :tag-ptr (& sv-16)))) + (setup gp-0 (the-as (pointer float) a1-6) (the-as int (-> sv-16 elt-count))) + ) + ) + (else + (go process-drawable-art-error "no flow path") + ) + ) + ) + ) + gp-0 + ) + ) + +;; definition of type water-flow +(deftype water-flow (process) + ((root collide-shape) + (flow flow-control) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type water-flow +(defmethod inspect ((this water-flow)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Troot: ~A~%" (-> this root)) + (format #t "~2Tflow: ~A~%" (-> this flow)) + (label cfg-4) + this + ) + +;; definition for method 7 of type water-flow +;; WARN: Return type mismatch process vs water-flow. +(defmethod relocate ((this water-flow) (offset int)) + (if (nonzero? (-> this flow)) + (&+! (-> this flow) offset) + ) + (the-as water-flow ((method-of-type process relocate) this offset)) + ) + +;; definition for method 12 of type water-flow +(defmethod run-logic? ((this water-flow)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; failed to figure out what this is: +(defstate idle (water-flow) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('water-info) + (let* ((gp-0 (-> block param 0)) + (s5-0 proc) + (a0-2 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (if (and a0-2 (focus-test? (the-as process-focusable a0-2) board)) + #f + (flow-control-method-13 (-> self flow) (the-as water-info gp-0) (the-as vector (+ gp-0 0))) + ) + ) + ) + (('touch-water) + (let* ((gp-1 (-> self flow)) + (s5-1 proc) + (a1-8 (if (type? s5-1 process-focusable) + s5-1 + ) + ) + ) + (if (and (nonzero? gp-1) (and a1-8 (!= (-> a1-8 type) target) (< 0.0 (-> gp-1 speed)))) + (push-process gp-1 (the-as process-focusable a1-8)) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (draw-path (-> self flow)) + (if (and *target* + (focus-test? *target* touch-water) + (not (logtest? (focus-status board) (-> *target* focus-status))) + ) + (push-process (-> self flow) *target*) + ) + ) + ) + +;; definition for method 11 of type water-flow +(defmethod init-from-entity! ((this water-flow) (arg0 entity-actor)) + (set! (-> this root) (the-as collide-shape (new 'process 'trsqv))) + (process-drawable-from-entity! (the-as process-drawable this) arg0) + (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/common-obs/water-h_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/water-h_REF.gc index 13e3ac5ced..f9880ce14b 100644 --- a/test/decompiler/reference/jak3/engine/common-obs/water-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/common-obs/water-h_REF.gc @@ -47,15 +47,15 @@ ) (:methods (new (symbol type process int float float float) _type_) - (water-control-method-9 () none) - (water-control-method-10 () none) + (water-control-method-9 (_type_) none) + (water-control-method-10 (_type_) none) (start-bobbing! (_type_ float int int) none) (distance-from-surface (_type_) float) (spawn-ripples (_type_ float vector int vector symbol) none) (display-water-marks? (_type_) symbol) - (water-control-method-15 () none) - (water-control-method-16 () none) - (water-control-method-17 () none) + (enter-water (_type_) none) + (water-control-method-16 (_type_) none) + (water-control-method-17 (_type_) none) ) ) diff --git a/test/decompiler/reference/jak3/engine/common-obs/water-part_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/water-part_REF.gc new file mode 100644 index 0000000000..fa71deb848 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/water-part_REF.gc @@ -0,0 +1,800 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpart 756 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 0.1) + (:x (meters -0.25) (meters 0.5)) + (:y (meters -0.05) (meters 0.1)) + (:z (meters -0.25) (meters 0.5)) + (:scale-x (meters 0.05) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 16.0) + (:vel-y (meters 0) (meters 0.006666667)) + (:accel-y (meters 0.00016666666) (meters 0.00016666666)) + (:friction 0.96) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'check-water-level-above-and-die) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 757 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 0.1) + (:x (meters -0.25) (meters 0.5)) + (:y (meters 0.15)) + (:z (meters -0.25) (meters 0.5)) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 16.0) + (:vel-y (meters 0) (meters 0.006666667)) + (:accel-y (meters 0.00033333333)) + (:friction 0.96) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'check-water-level-above-and-die) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 758 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.05) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 16.0) + (:scalevel-x (meters 0.005) (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.04 -0.04) + (:timer (seconds 2.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 759 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.06) + (:x (meters 10)) + (:scale-x (meters 0.75) (meters 1.5)) + (:rot-y (degrees 0)) + (:scale-y (meters 0.75) (meters 1.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:vel-x (meters 0.01) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.004333333)) + (:scalevel-y (meters 0.0033333334) (meters 0.004333333)) + (:fade-a 0.000111111105) + (:friction 0.94) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.3)) + (:next-launcher 760) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 760 + :init-specs ((:fade-a 0.0) (:next-time (seconds 0.3) (seconds 0.397)) (:next-launcher 761)) + ) + +;; failed to figure out what this is: +(defpart 761 + :init-specs ((:fade-a -0.21333334)) + ) + +;; failed to figure out what this is: +(defpart 762 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 0.05 0.4) + (:x (meters -0.75) (meters 1.5)) + (:z (meters -0.75) (meters 1.5)) + (:scale-x (meters 0.2) (meters 0.7)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:scalevel-x (meters 0.0016666667) (meters 0.003)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 0.5)) + (:next-launcher 763) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 763 + :init-specs ((:fade-a 0.0) (:next-time (seconds 1.2)) (:next-launcher 764)) + ) + +;; failed to figure out what this is: +(defpart 764 + :init-specs ((:fade-a -0.7111111)) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-water-splash + :id 192 + :duration (seconds 5) + :flags (sp0 sp4) + :bounds (static-bspherem 0 -12 0 14) + :parts ((sp-item 765 :flags (sp7) :period (seconds 10) :length (seconds 0.2)) + (sp-item 766 :flags (sp7) :period (seconds 10) :length (seconds 0.067) :offset 125) + (sp-item 767 :flags (is-3d sp7) :period (seconds 10) :length (seconds 0.067)) + (sp-item 768 :flags (is-3d sp7) :period (seconds 10) :length (seconds 0.167) :offset 125) + (sp-item 769 :flags (is-3d sp7) :period (seconds 10) :length (seconds 0.5) :offset 150) + (sp-item 770 :flags (sp7) :period (seconds 10) :length (seconds 0.167) :offset 20) + (sp-item 771 :flags (sp7) :period (seconds 10) :length (seconds 0.167) :offset 125) + ) + ) + +;; failed to figure out what this is: +(defpart 765 + :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.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-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-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-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 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-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 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-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-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-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-water-splash-curve-settings*, type particle-curve-settings +(define *part-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* 765 init-specs 13 initial-valuef) (the-as float *part-water-splash-curve-settings*)) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-curve-settings* color-start) *range-wsplash-color*) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-curve-settings* alpha-start) *range-wsplash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-curve-settings* scale-x-start) *range-wsplash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-curve-settings* scale-y-start) *range-wsplash-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-curve-settings* a-scalar) *curve-wsplash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-curve-settings* scale-x-scalar) *curve-wsplash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-curve-settings* scale-y-scalar) *curve-wsplash-scale-y*) + +;; failed to figure out what this is: +(defpart 766 + :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)) + (:userdata 0.0) + (:func 'live-func-curve) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-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-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-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 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 4.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-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 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-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-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-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-water-splash-center-curve-settings*, type particle-curve-settings +(define *part-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* 766 init-specs 11 initial-valuef) + (the-as float *part-water-splash-center-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-center-curve-settings* color-start) *range-splash-color*) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-center-curve-settings* alpha-start) *range-splash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-center-curve-settings* scale-x-start) *range-splash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-center-curve-settings* scale-y-start) *range-splash-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-center-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-center-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-center-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-center-curve-settings* a-scalar) *curve-splash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-center-curve-settings* scale-x-scalar) *curve-splash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-center-curve-settings* scale-y-scalar) *curve-splash-scale-y*) + +;; failed to figure out what this is: +(defpart 767 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.4) + (:scale-x (meters 2) (meters 0.5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 2) (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: +(defpart 768 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.2) + (:scale-x (meters 0) (meters 0.1)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 0) (meters 0.1)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.00033333333) (meters 0.006666667)) + (:scalevel-y (meters 0.00033333333) (meters 0.006666667)) + (: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 770 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 10.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-water-level-drop) + (:conerot-x (degrees -40) (degrees 80)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 769 + :init-specs ((:texture (ripples level-default-sprite)) + (: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)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 771 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 2.0 2.0) + (: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.026666667) (meters 0.026666667)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'check-water-level-drop) + (:conerot-x (degrees -2) (degrees 4)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-water-splash-small + :id 193 + :duration (seconds 3) + :flags (sp0) + :bounds (static-bspherem 0 -12 0 14) + :parts ((sp-item 772 :period (seconds 10) :length (seconds 0.2)) + (sp-item 773 :flags (is-3d) :period (seconds 10) :length (seconds 0.067)) + (sp-item 774 :period (seconds 10) :length (seconds 0.167) :offset 20) + ) + ) + +;; failed to figure out what this is: +(defpart 773 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.8) + (:scale-x (meters 0.5) (meters 0.2)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 0.5) (meters 0.2)) + (: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.42666668) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 774 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 5.0) + (: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.006666667) (meters 0.016666668)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'check-water-level-drop) + (:conerot-x (degrees -40) (degrees 80)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 772 + :init-specs ((:texture (splash level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 4.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.01)) + (:friction 0.99) + (: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! *curve-wsplash-small-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.3 :y 0.7 :z 1.7 :w 2.7) + :one-over-x-deltas (new 'static 'vector :x 0.39999998 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-wsplash-small-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.4 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 0.7 :z 0.2) + :one-over-x-deltas (new 'static 'vector :x 1.75 :y -1.6666667 :z -0.6666666 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-water-splash-small-curve-settings*, type particle-curve-settings +(define *part-water-splash-small-curve-settings* + (new 'static 'particle-curve-settings :lifetime-base (seconds 0.25) :lifetime-offset (seconds 0.1)) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 772 init-specs 13 initial-valuef) + (the-as float *part-water-splash-small-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-small-curve-settings* color-start) *range-wsplash-color*) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-small-curve-settings* alpha-start) *range-wsplash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-small-curve-settings* scale-x-start) *range-wsplash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-small-curve-settings* scale-y-start) *range-wsplash-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-small-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-small-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-small-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-small-curve-settings* a-scalar) *curve-wsplash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-small-curve-settings* scale-x-scalar) *curve-wsplash-small-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-water-splash-small-curve-settings* scale-y-scalar) *curve-wsplash-small-scale-y*) + +;; failed to figure out what this is: +(defpart 775 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6) (meters 0.1)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g :copy r) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters 0.16)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow set-conerot)) + (:userdata 10240.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 776 + :init-specs ((:fade-a -0.64)) + ) + +;; failed to figure out what this is: +(defpart 777 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 12.0) + (:y (meters 0)) + (:scale-x (meters 0.08) (meters 0.03)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g :copy r) + (:b 64.0 32.0) + (:a 128.0) + (:omega (degrees 0.01575) (degrees 0.009)) + (:vel-y (meters 0.033333335) (meters 0.05)) + (:accel-y (meters -0.005) (meters -0.00066666666)) + (:friction 0.96 0.02) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 set-conerot)) + (:userdata -208896.0) + (:func 'check-water-level-drop-motion) + (:next-time (seconds 0) (seconds 0.58)) + (:next-launcher 41) + (:conerot-x (degrees 15) (degrees 65)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + (:conerot-radius (meters 0) (meters 1)) + ) + ) + +;; failed to figure out what this is: +(defpart 41 + :init-specs ((:r 255.0) (:g 255.0) (:b 255.0) (:next-time (seconds 0.017)) (:next-launcher 778)) + ) + +;; failed to figure out what this is: +(defpart 778 + :init-specs ((:r 32.0 32.0) (:g 32.0 32.0) (:b 64.0 32.0) (:next-time (seconds 0) (seconds 1.497)) (:next-launcher 779)) + ) + +;; failed to figure out what this is: +(defpart 780 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.3) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32 -0.32) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 set-conerot)) + (:userdata :data (new 'static 'boxed-array :type int32 10 0 0 #x401800 #x403d00 #x400700 #x408200)) + (:func 'sparticle-texture-animate) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 781 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 0.0 0.5) + (:scale-x (meters 0.08) (meters 0.03)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g :copy r) + (:b 64.0 32.0) + (:a 0.0) + (:omega (degrees 0.01575) (degrees 0.009)) + (:vel-y (meters 0.026666667) (meters 0.05)) + (:accel-y (meters -0.005) (meters -0.00066666666)) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 set-conerot)) + (:userdata -208896.0) + (:func 'check-water-level-drop-and-die-motion) + (:next-time (seconds 0) (seconds 0.33)) + (:next-launcher 41) + (:conerot-x (degrees 30) (degrees 40)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 782 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.15) (meters 0.05)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g :copy r) + (:b 64.0 32.0) + (:a 0.0) + (:omega (degrees 0.0225) (degrees 0.0225)) + (:vel-x (meters -0.016666668) (meters 0.0016666667)) + (:vel-y (meters 0.016666668)) + (:vel-z (meters -0.016666668) (meters 0.0016666667)) + (:scalevel-x (meters -0.00016666666)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.001) (meters -0.00033333333)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'check-water-level-drop-motion) + (:next-time (seconds 2)) + (:next-launcher 783) + ) + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/common-obs/water_REF.gc b/test/decompiler/reference/jak3/engine/common-obs/water_REF.gc new file mode 100644 index 0000000000..8ff76ed73f --- /dev/null +++ b/test/decompiler/reference/jak3/engine/common-obs/water_REF.gc @@ -0,0 +1,1229 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function check-water-level-drop +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun check-water-level-drop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (when (and (< (-> arg2 y) (-> arg1 user-float)) (< (-> 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 user-float) (-> arg2 z) 1.0) + (sound-play "water-drop" :position gp-0) + (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 780) gp-0) + ) + ) + 0 + (none) + ) + +;; definition for function check-water-level-drop-and-die +;; WARN: Return type mismatch symbol vs none. +(defun check-water-level-drop-and-die ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (if (and (< (-> arg2 y) (-> arg1 user-float)) (< (-> arg1 vel-sxvel y) 0.0)) + (sp-kill-particle arg0 arg1) + ) + (none) + ) + +;; definition for function check-water-level-drop-and-die-motion +(defun check-water-level-drop-and-die-motion ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (if (and (< (-> arg2 y) (-> arg1 user-float)) (< (-> arg1 vel-sxvel y) 0.0)) + (sp-kill-particle arg0 arg1) + ) + (sparticle-motion-blur arg0 arg1 arg2) + (none) + ) + +;; definition for function check-water-level-above-and-die +;; WARN: Return type mismatch symbol vs none. +(defun check-water-level-above-and-die ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (if (or (>= (-> arg2 y) (-> arg1 user-float)) (and *target* (>= (-> arg2 y) (-> *target* water height)))) + (sp-kill-particle arg0 arg1) + ) + (none) + ) + +;; definition for function check-water-level-drop-motion +;; INFO: Used lq/sq +(defun check-water-level-drop-motion ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (when (and (< (-> arg2 y) (-> arg1 user-float)) (< (-> arg1 vel-sxvel y) 0.0)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (sp-kill-particle arg0 arg1) + (set-vector! s3-0 (-> arg2 x) (-> arg1 user-float) (-> arg2 z) 1.0) + (sound-play "water-drop" :position s3-0) + (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 780) s3-0) + (set! (-> *part-id-table* 781 init-specs 15 initial-valuef) (-> s3-0 y)) + (launch-particles (-> *part-id-table* 781) s3-0) + ) + ) + (sparticle-motion-blur arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(when (or (zero? *water-simple-alpha-curve-in*) (!= loading-level global)) + (set! *water-simple-alpha-curve-in* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *water-simple-alpha-curve-in* 2 'loading-level (the-as int #f)) + ) + +;; failed to figure out what this is: +(set! (-> *water-simple-alpha-curve-in* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *water-simple-alpha-curve-in* pts data 0 second) 0.0) + +;; failed to figure out what this is: +(set! (-> *water-simple-alpha-curve-in* pts data 1 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *water-simple-alpha-curve-in* pts data 1 second) 1.0) + +;; failed to figure out what this is: +(when (or (zero? *growing-curve*) (!= loading-level global)) + (set! *growing-curve* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *growing-curve* 2 'loading-level (the-as int #f)) + ) + +;; failed to figure out what this is: +(set! (-> *growing-curve* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *growing-curve* pts data 0 second) 1.0) + +;; failed to figure out what this is: +(set! (-> *growing-curve* pts data 1 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *growing-curve* pts data 1 second) 10.0) + +;; failed to figure out what this is: +(when (or (zero? *water-simple-alpha-curve-fade-out*) (!= loading-level global)) + (set! *water-simple-alpha-curve-fade-out* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *water-simple-alpha-curve-fade-out* 2 'loading-level (the-as int #f)) + ) + +;; failed to figure out what this is: +(set! (-> *water-simple-alpha-curve-fade-out* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *water-simple-alpha-curve-fade-out* pts data 0 second) 1.0) + +;; failed to figure out what this is: +(set! (-> *water-simple-alpha-curve-fade-out* pts data 1 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *water-simple-alpha-curve-fade-out* pts data 1 second) 0.0) + +;; failed to figure out what this is: +(when (or (zero? *color-curve-tan-brown*) (!= loading-level global)) + (set! *color-curve-tan-brown* (new 'loading-level 'curve-color-piecewise)) + (curve-color-piecewise-method-10 *color-curve-tan-brown* 2 'loading-level (the-as uint #f)) + ) + +;; failed to figure out what this is: +(set! (-> *color-curve-tan-brown* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *color-curve-tan-brown* pts data 0 second x) 1.0) + +;; failed to figure out what this is: +(set! (-> *color-curve-tan-brown* pts data 0 second y) 1.0) + +;; failed to figure out what this is: +(set! (-> *color-curve-tan-brown* pts data 0 second z) 0.78125) + +;; failed to figure out what this is: +(set! (-> *color-curve-tan-brown* pts data 0 second w) 1.0) + +;; failed to figure out what this is: +(set! (-> *color-curve-tan-brown* pts data 1 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *color-curve-tan-brown* pts data 1 second x) 0.78125) + +;; failed to figure out what this is: +(set! (-> *color-curve-tan-brown* pts data 1 second y) 0.78125) + +;; failed to figure out what this is: +(set! (-> *color-curve-tan-brown* pts data 1 second z) 0.625) + +;; failed to figure out what this is: +(set! (-> *color-curve-tan-brown* pts data 1 second w) 1.0) + +;; failed to figure out what this is: +(if (or (zero? *water-wake-trail*) (!= loading-level global)) + (set! *water-wake-trail* (new 'loading-level 'light-trail-composition)) + ) + +;; failed to figure out what this is: +(set! (-> *water-wake-trail* color-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *water-wake-trail* color-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *water-wake-trail* alpha-1-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *water-wake-trail* alpha-2-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *water-wake-trail* base-alpha) 0.6) + +;; failed to figure out what this is: +(set! (-> *water-wake-trail* alpha-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *water-wake-trail* width-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *water-wake-trail* base-width) 4096.0) + +;; failed to figure out what this is: +(set! (-> *water-wake-trail* width-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *water-wake-trail* uv-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *water-wake-trail* uv-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *water-wake-trail* lie-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *water-wake-trail* max-age) (seconds 3)) + +;; failed to figure out what this is: +(if #f + (set! (-> *water-wake-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *water-wake-trail* tex-id) (the-as uint #x500800)) + ) + +;; failed to figure out what this is: +(set! (-> *water-wake-trail* width-curve) *growing-curve*) + +;; failed to figure out what this is: +(set! (-> *water-wake-trail* color-curve) *color-curve-tan-brown*) + +;; failed to figure out what this is: +(set! (-> *water-wake-trail* alpha-curve-1) *water-simple-alpha-curve-in*) + +;; failed to figure out what this is: +(set! (-> *water-wake-trail* alpha-curve-2) *water-simple-alpha-curve-fade-out*) + +;; failed to figure out what this is: +(set! (-> *water-wake-trail* zbuffer?) #f) + +;; failed to figure out what this is: +(set! (-> *water-wake-trail* lie-vector quad) (-> *up-vector* quad)) + +;; failed to figure out what this is: +(set! (-> *water-wake-trail* use-tape-mode?) #t) + +;; failed to figure out what this is: +(set! (-> *water-wake-trail* blend-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *water-wake-trail* frame-stagger) (the-as uint 1)) + +;; definition for method 17 of type water-control +;; WARN: Return type mismatch int vs none. +(defmethod water-control-method-17 ((this water-control)) + (when (and (not (handle->process (-> this ripple))) + (>= (+ (current-time) (seconds -0.1)) (-> this enter-water-time)) + ) + (let ((s5-0 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-0 tracked-obj) (process->handle (-> this process))) + (set! (-> s5-0 appearance) *water-wake-trail*) + (set! (-> s5-0 max-num-crumbs) (the int (* 0.25 (the float (-> s5-0 appearance max-age))))) + (let* ((v1-18 + (estimate-light-trail-mem-usage + (the-as uint (-> s5-0 max-num-crumbs)) + (the-as uint (= (-> s5-0 appearance lie-mode) 3)) + ) + ) + (s4-0 (get-process *default-dead-pool* light-trail-tracker-water (+ v1-18 8192) 1)) + ) + (set! (-> this ripple) + (ppointer->handle (when s4-0 + (let ((t9-2 (method-of-type process activate))) + (t9-2 s4-0 (-> this process) "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-0 light-trail-tracker-init-by-other s5-0) + (-> s4-0 ppointer) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 9 of type water-control +;; WARN: Return type mismatch int vs none. +(defmethod water-control-method-9 ((this water-control)) + 0 + (none) + ) + +;; definition for method 10 of type water-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod water-control-method-10 ((this water-control)) + (local-vars (sv-336 (function vector vector vector vector)) (sv-352 vector)) + (with-pp + (let ((s4-0 (-> this flags)) + (s5-0 (new 'stack-no-clear 'water-info)) + ) + (when (logtest? (water-flag find-water) (-> this flags)) + (water-info-init! (-> this process control) s5-0 (collide-action solid semi-solid)) + (set! (-> this flags) + (logior (logclear + (-> this flags) + (water-flag active can-wade can-swim can-ground use-ocean tar mud use-water-anim swamp over-water) + ) + (logclear (-> s5-0 flags) (water-flag touch-water)) + ) + ) + (set! (-> this base-height) (-> s5-0 base-height)) + (set! (-> this normal quad) (-> s5-0 normal quad)) + (set! (-> this base-ocean-offset) (- (-> s5-0 trans y) (-> s5-0 base-height))) + ) + (cond + ((or (not (logtest? (-> this flags) (water-flag active))) + (logtest? (focus-status teleporting) (-> this process focus-status)) + ) + (logclear! + (-> this flags) + (water-flag under-water head-under-water bouncing wading swimming touch-water jump-out break-surface) + ) + ) + ((and (logtest? (-> this flags) (water-flag no-grab-sound)) + (logtest? (-> this process focus-status) (focus-status grabbed)) + ) + (logior! (-> this flags) (water-flag jump-out)) + (logclear! (-> this flags) (water-flag break-surface)) + ) + ((begin + (set! (-> this top 1 quad) (-> this top 0 quad)) + (vector<-cspace! (the-as vector (-> this top)) (-> this process node-list data (-> this joint-index))) + (+! (-> this top 0 y) (-> this top-y-offset)) + (set! (-> this bottom 1 quad) (-> this bottom 0 quad)) + (set! (-> this bottom 0 quad) (-> this process control trans quad)) + (logclear! (-> this flags) (water-flag under-water head-under-water bouncing wading swimming break-surface)) + (set! (-> this bob-offset) (update! (-> this bob))) + (cond + ((logtest? (-> this flags) (water-flag use-ocean use-water-anim)) + (if (not (logtest? (water-flag touch-water) (-> this flags))) + (set! (-> this ocean-offset) (-> this base-ocean-offset)) + (set! (-> this ocean-offset) (lerp (-> this ocean-offset) (-> this base-ocean-offset) 0.2)) + ) + (set! (-> this base-ocean-offset) 0.0) + ) + (else + (set! (-> this base-ocean-offset) 0.0) + (set! (-> this base-ocean-offset) 0.0) + (set! (-> this ocean-offset) 0.0) + ) + ) + (if (logtest? (focus-status board pilot) (-> this process focus-status)) + (set! (-> this bob-offset) 0.0) + ) + (set! (-> this height) + (+ (-> this base-height) (-> this ocean-offset) (-> this bob-offset) (-> this align-offset)) + ) + (set! (-> this surface-height) (+ (-> this base-height) (-> this base-ocean-offset))) + (cond + ((logtest? (focus-status board pilot) (-> this process focus-status)) + (set! (-> this collide-height) (+ -819.2 (-> this base-ocean-offset) (-> this base-height))) + ) + ((logtest? (-> this flags) (water-flag swim-ground)) + (set! (-> this collide-height) (- (-> this height) (-> this swim-height))) + ) + (else + (set! (-> this collide-height) (- (-> this height) (-> this bottom-height))) + ) + ) + (set! (-> this swim-depth) + (fmax 0.0 (- (- (-> this surface-height) (-> this swim-height)) (-> this bottom 0 y))) + ) + (and (>= (-> this height) (-> this bottom 0 y)) (logtest? (water-flag touch-water) (-> s5-0 flags))) + ) + (if (logtest? (-> this process control status) (collide-status on-water)) + (set-time! (-> this on-water-time)) + ) + (when (not (logtest? (-> this flags) (water-flag dark-eco lava))) + (set! (-> this drip-wetness) 1.0) + (set! (-> this drip-height) (fmax (- (-> this surface-height) (-> this bottom 0 y)) (-> this drip-height))) + (set! (-> this drip-speed) 15.0) + ) + (if (and (not (logtest? (water-flag touch-water) (-> this flags))) + (not (logtest? (-> this process focus-status) (focus-status touch-water))) + ) + (enter-water this) + ) + (logior! (-> this flags) (water-flag touch-water)) + (cond + ((>= (-> this top 0 y) (-> this height)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> this bottom 0 quad)) + (let ((v1-82 (-> this process control transv))) + (sqrtf (+ (* (-> v1-82 x) (-> v1-82 x)) (* (-> v1-82 z) (-> v1-82 z)))) + ) + (logior! (-> this flags) (water-flag break-surface)) + (set! (-> s3-0 y) (+ 40.96 (-> this surface-height))) + (water-control-method-17 this) + (when (and (logtest? (-> this process draw status) (draw-control-status on-screen)) + (zero? (-> this process draw cur-lod)) + (logtest? (water-flag part-rings) (-> this flags)) + (logtest? (water-flag part-water) (-> this flags)) + ) + 0.0 + (let* ((v1-102 (-> this process control transv)) + (f30-0 (sqrtf (+ (* (-> v1-102 x) (-> v1-102 x)) (* (-> v1-102 z) (-> v1-102 z))))) + (s2-0 (new 'stack-no-clear 'matrix)) + ) + (let ((s1-0 forward-up->inv-matrix) + (s0-0 s2-0) + ) + (set! sv-336 vector-flatten!) + (set! sv-352 (-> s2-0 fvec)) + (let ((a1-11 (vector-z-quaternion! (-> s2-0 fvec) (-> this process control quat))) + (a2-2 (-> s5-0 normal)) + ) + (s1-0 s0-0 (sv-336 sv-352 a1-11 a2-2) (-> s5-0 normal)) + ) + ) + (set! (-> s2-0 trans quad) (-> s3-0 quad)) + (set! (-> *part-id-table* 762 init-specs 1 initial-valuef) (* 0.000004150391 f30-0)) + (set! (-> *part-id-table* 762 init-specs 16 initial-valuef) 0.0) + (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 762) s2-0 :origin-is-matrix #t) + (when (< f30-0 4096.0) + (set! (-> *part-id-table* 758 init-specs 2 random-rangef) (-> this ripple-size)) + (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 758) s2-0 :origin-is-matrix #t) + ) + ) + ) + (if (< (-> this top 1 y) (-> this height)) + (spawn-ripples this 0.2 s3-0 1 (-> this process control transv) #t) + ) + ) + ) + (else + (logior! (-> this flags) (water-flag head-under-water)) + ) + ) + (when (and (logtest? (water-flag part-splash) (-> this flags)) (logtest? (water-flag part-water) (-> this flags))) + (cond + ((logtest? (-> this flags) (water-flag lava)) + ) + ((logtest? (-> this flags) (water-flag dark-eco)) + ) + ((logtest? (focus-status mech) (-> this process focus-status)) + ) + (else + (let* ((v0-12 (rand-vu-int-range 3 (+ (-> this process node-list length) -1))) + (s3-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data v0-12))) + ) + (when (< (-> s3-1 y) (-> this surface-height)) + (set! (-> *part-id-table* 756 init-specs 16 initial-valuef) (-> this surface-height)) + (let ((f0-59 (lerp-scale 5.0 0.4 (the float (- (current-time) (-> this enter-water-time))) 0.0 600.0)) + (f1-26 0.00012207031) + (v1-158 (-> this process control transv)) + ) + (set! (-> *part-id-table* 756 init-specs 1 initial-valuef) + (+ f0-59 (* f1-26 (sqrtf (+ (* (-> v1-158 x) (-> v1-158 x)) (* (-> v1-158 z) (-> v1-158 z)))))) + ) + ) + (launch-particles (-> *part-id-table* 756) s3-1) + ) + ) + ) + ) + ) + (let ((f30-1 (- (+ (-> this base-height) (-> this ocean-offset) (-> this bob-offset) (-> this align-offset)) + (-> this swim-height) + ) + ) + ) + (let* ((s3-2 (-> this process control)) + (v1-167 (if (type? s3-2 control-info) + s3-2 + ) + ) + (v1-168 (and v1-167 (not (time-elapsed? (-> v1-167 last-time-on-surface) (seconds 0.5))))) + ) + (if (and (logtest? (-> this flags) (water-flag swim-ground)) + (and v1-168 (not (logtest? (-> this process control status) (collide-status on-water)))) + ) + (set! (-> this bob amp) (* 0.8 (-> this bob amp))) + ) + (cond + ((and (logtest? (-> this flags) (water-flag can-swim)) + (or (logtest? (-> this process control status) (collide-status on-water)) + (>= f30-1 (-> this bottom 0 y)) + (and (logtest? (water-flag swimming) s4-0) + (logtest? (-> this process control status) (collide-status touch-surface)) + (not (logtest? (-> this process control status) (collide-status on-surface))) + (>= (+ 204.8 f30-1) (-> this bottom 0 y)) + ) + ) + (or (logtest? (water-flag swimming) s4-0) + (let ((f0-70 12288.0) + (a0-99 (-> this process control transv)) + ) + (< f0-70 (sqrtf (+ (* (-> a0-99 x) (-> a0-99 x)) (* (-> a0-99 z) (-> a0-99 z))))) + ) + (< (+ (current-time) (seconds -0.2)) (-> this enter-water-time)) + (or (>= (+ (- 204.8 (fmin 6144.0 (+ (-> this ocean-offset) (-> this bob-offset) (-> this align-offset)))) f30-1) + (-> this bottom 0 y) + ) + (and (-> this process next-state) (= (-> this process next-state name) 'target-hit-ground)) + ) + ) + ) + (set-time! (-> this swim-time)) + (send-event (-> this process) 'swim) + (logior! (-> this flags) (water-flag swimming)) + (if (not (logtest? (water-flag swimming) s4-0)) + (set-time! (-> this enter-swim-time)) + ) + (cond + ((and (logtest? (-> this flags) (water-flag swim-ground)) + (logtest? (-> this process control status) (collide-status touch-surface)) + (not (logtest? (water-flag jump-out) (-> this flags))) + ) + (let ((v1-191 (new 'stack-no-clear 'vector))) + (set! (-> v1-191 quad) (-> this bottom 0 quad)) + (set! (-> v1-191 y) (- (-> this height) (-> this swim-height))) + (let ((s3-3 (-> this process control))) + (when (and (not (logtest? (-> s3-3 status) (collide-status touch-background))) + (logtest? (water-flag swimming) (-> this flags)) + (not (logtest? (focus-status board pilot) (-> this process focus-status))) + ) + (let ((a1-37 (vector-! (new 'stack-no-clear 'vector) v1-191 (-> s3-3 trans)))) + (vector-float*! a1-37 a1-37 (-> pp clock frames-per-second)) + (integrate-and-collide! s3-3 a1-37) + ) + (logior! (-> s3-3 status) (collide-status on-surface on-ground touch-surface on-water)) + ) + ) + ) + ) + ((and (< (-> this bottom 0 y) f30-1) (not (logtest? (water-flag jump-out) (-> this flags)))) + (logior! (-> this flags) (water-flag under-water)) + ) + ) + ) + ((begin + (set! v1-168 (and (logtest? (-> this flags) (water-flag can-wade)) + (or (not (!= (-> this bob amp) 0.0)) (time-elapsed? (-> this swim-time) (seconds 0.05))) + (and (>= (- (-> this height) (-> this wade-height)) (-> this bottom 0 y)) v1-168) + ) + ) + v1-168 + ) + (set-time! (-> this wade-time)) + (send-event (-> this process) 'wade) + (logior! (-> this flags) (water-flag wading)) + ) + ((and (< (-> this bottom 0 y) f30-1) (not (logtest? (water-flag jump-out) (-> this flags)))) + (logior! (-> this flags) (water-flag under-water)) + ) + ) + ) + (when (and (logtest? (-> this flags) (water-flag can-swim)) + (< (-> this bottom 1 y) f30-1) + (and (< f30-1 (-> this bottom 0 y)) (logtest? s4-0 (water-flag under-water))) + ) + (logior! (-> this flags) (water-flag swimming)) + (let ((a1-42 (new 'stack-no-clear 'vector))) + (set! (-> a1-42 quad) (-> this bottom 0 quad)) + (let ((s4-1 (-> this process control))) + (set! (-> a1-42 y) f30-1) + (when (not (logtest? (focus-status board pilot) (-> this process focus-status))) + (let ((f30-2 (-> s4-1 ground-impact-vel))) + (move-to-ground-point s4-1 a1-42 (-> s4-1 transv) *up-vector*) + (logior! (-> s4-1 status) (collide-status on-water)) + (set! (-> s4-1 ground-impact-vel) f30-2) + ) + ) + ) + ) + ) + ) + (when (= (-> this process type) target) + (cond + ((logtest? (-> this flags) (water-flag tar)) + (when (and (logtest? (-> this process control status) (collide-status on-surface on-water)) + (not (logtest? (focus-status board pilot) (-> this process focus-status))) + ) + (when (< (-> this process control trans y) (+ -1228.8 (-> this base-height))) + (send-event (-> this process) 'no-look-around (seconds 1.5)) + (if (not (logtest? (-> this process focus-status) (focus-status flut))) + (send-event + (-> this process) + 'attack + #f + (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-up (meters 0.5)) + (shove-back (meters 0)) + (mode 'tar) + ) + ) + ) + ) + (let ((v1-261 (-> this process))) + (set! (-> v1-261 control surf) *tar-surface*) + (set! (-> v1-261 control ground-pat material) 4) + ) + ) + (set! (-> this swim-height) (lerp (-> this swim-height) 7372.8 0.05)) + ) + ) + ((logtest? (-> this flags) (water-flag lava)) + (when (logtest? (-> this process control status) (collide-status on-surface on-water)) + (when (< (-> this process control trans y) (+ -204.8 (-> this base-height))) + (send-event (-> this process) 'no-look-around (seconds 1.5)) + (send-event + (-> this process) + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (the-as uint 2)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (shove-up (meters 0.5)) + (shove-back (meters 0)) + (mode 'melt) + (intersection (-> s5-0 trans)) + ) + ) + ) + ) + (set! (-> this swim-height) (lerp (-> this swim-height) 7372.8 0.05)) + ) + ) + ) + ) + ) + (else + (if (logtest? (water-flag touch-water) (-> this flags)) + (water-control-method-16 this) + ) + ) + ) + ) + (when (not (or (not (logtest? (water-flag part-drip) (-> this flags))) + (not (logtest? (water-flag part-water) (-> this flags))) + (= (-> this drip-wetness) 0.0) + ) + ) + (cond + ((logtest? (water-flag spawn-drip) (-> this flags)) + (let ((v0-28 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data (-> this drip-joint-index))) + ) + ) + (set! (-> *part-id-table* 782 init-specs 18 initial-valuef) (-> this surface-height)) + (set! (-> *part-id-table* 782 init-specs 10 initial-valuef) + (* 0.05 (- (-> v0-28 x) (-> this drip-old-pos x))) + ) + (set! (-> *part-id-table* 782 init-specs 11 initial-valuef) + (* 0.05 (- (-> v0-28 y) (-> this drip-old-pos y))) + ) + (set! (-> *part-id-table* 782 init-specs 12 initial-valuef) + (* 0.05 (- (-> v0-28 z) (-> this drip-old-pos z))) + ) + (launch-particles (-> *part-id-table* 782) v0-28) + ) + (set-time! (-> this drip-time)) + (logclear! (-> this flags) (water-flag spawn-drip)) + (seek! (-> this drip-wetness) 0.0 (* 0.001 (-> this drip-speed))) + (set! (-> this drip-speed) (* 1.05 (-> this drip-speed))) + (if (= (-> this drip-wetness) 0.0) + (set! (-> this drip-height) 0.0) + ) + ) + ((time-elapsed? + (the-as time-frame (the int (/ (the float (-> this drip-time)) (-> this drip-mult)))) + (the int (-> this drip-speed)) + ) + (let* ((s5-1 (rand-vu-int-range 3 (+ (-> this process node-list length) -1))) + (v0-32 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data s5-1))) + ) + (when (and (< (- (-> v0-32 y) (-> this process control trans y)) (-> this drip-height)) + (< (-> this height) (-> v0-32 y)) + ) + (set! (-> this drip-joint-index) s5-1) + (set! (-> this drip-old-pos quad) (-> v0-32 quad)) + (logior! (-> this flags) (water-flag spawn-drip)) + ) + ) + ) + ) + ) + (if (and (not (logtest? (water-flag break-surface) (-> this flags))) (handle->process (-> this ripple))) + (send-event (handle->process (-> this ripple)) 'die) + ) + 0 + (none) + ) + ) + +;; definition for method 11 of type water-control +;; WARN: Return type mismatch int vs none. +(defmethod start-bobbing! ((this water-control) (arg0 float) (arg1 int) (arg2 int)) + (with-pp + (activate! (-> this bob) (- arg0) arg1 arg2 0.9 1.0 (-> pp clock)) + 0 + (none) + ) + ) + +;; definition for function part-water-splash-callback +;; WARN: Return type mismatch int vs none. +(defun part-water-splash-callback ((arg0 part-tracker)) + (let ((f1-0 (-> arg0 root trans y)) + (f0-0 (the-as float (-> arg0 userdata))) + ) + (set! (-> *part-id-table* 777 init-specs 16 initial-valuef) f1-0) + (set! (-> *part-id-table* 777 init-specs 1 initial-valuef) (* 12.0 f0-0)) + ) + 0 + (none) + ) + +;; definition for method 15 of type water-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod enter-water ((this water-control)) + (with-pp + (logior! (-> this flags) (water-flag touch-water)) + (logclear! (-> this flags) (water-flag jump-out)) + (set-time! (-> this enter-water-time)) + (set-vector! (-> this enter-water-pos) (-> this bottom 0 x) (-> this surface-height) (-> this bottom 0 z) 1.0) + (when (and (logtest? (water-flag part-splash) (-> this flags)) (logtest? (water-flag part-water) (-> this flags))) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer pp)) + (set! (-> a1-1 num-params) 1) + (set! (-> a1-1 message) 'query) + (set! (-> a1-1 param 0) (the-as uint 'ground-height)) + (let* ((f0-4 (the-as float (send-event-function (-> this process) a1-1))) + (f30-0 (lerp-scale 0.3 1.0 f0-4 2048.0 24576.0)) + ) + (when (not (logtest? (-> this flags) (water-flag dark-eco lava))) + (if (nonzero? (-> this process skel effect)) + (sound-play-by-name (-> this enter-water-sound) (new-sound-id) 1024 0 0 (sound-group) #t) + ) + (spawn-ripples this f30-0 (-> this enter-water-pos) 1 (-> this process control transv) #t) + ) + ) + ) + ) + (if (logtest? (-> this flags) (water-flag tar lava)) + (set! (-> this swim-height) 2867.2) + ) + 0 + (none) + ) + ) + +;; definition for method 16 of type water-control +;; WARN: Return type mismatch int vs none. +(defmethod water-control-method-16 ((this water-control)) + (logclear! (-> this flags) (water-flag touch-water)) + (set-zero! (-> this bob)) + (if (logtest? (-> this flags) (water-flag tar lava)) + (set! (-> this swim-height) 2867.2) + ) + 0 + (none) + ) + +;; definition for function splash-spawn +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun splash-spawn ((arg0 float) (arg1 vector) (arg2 int)) + (cond + ((logtest? (-> (if (zero? arg2) + (-> *part-group-id-table* 193) + (-> *part-group-id-table* 192) + ) + flags + ) + (sp-group-flag sp13) + ) + (set! (-> *launch-matrix* trans quad) (-> arg1 quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (if (zero? arg2) + (-> *part-group-id-table* 193) + (-> *part-group-id-table* 192) + ) + :callback (the-as (function part-tracker vector) part-water-splash-callback) + :userdata (the-as uint arg0) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> arg1 quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (if (zero? arg2) + (-> *part-group-id-table* 193) + (-> *part-group-id-table* 192) + ) + :callback (the-as (function part-tracker vector) part-water-splash-callback) + :userdata (the-as uint arg0) + ) + ) + ) + 0 + (none) + ) + +;; definition for function rings-water-spawn +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun rings-water-spawn ((arg0 float) (arg1 vector) (arg2 vector) (arg3 float) (arg4 float)) + (let* ((v1-0 arg2) + (f30-0 (sqrtf (+ (* (-> v1-0 x) (-> v1-0 x)) (* (-> v1-0 z) (-> v1-0 z))))) + ) + (set! (-> *part-id-table* 759 init-specs 4 initial-valuef) (+ 24576.0 arg0)) + (set! (-> *part-id-table* 759 init-specs 19 initial-valuef) (+ 49152.0 arg0)) + (set! (-> *part-id-table* 759 init-specs 1 initial-valuef) (* 0.0000036621095 f30-0)) + (set! (-> *part-id-table* 759 init-specs 2 initial-valuef) (* 0.1 f30-0)) + (set! (-> *part-id-table* 759 init-specs 13 initial-valuef) 0.7111111) + (set! (-> *part-id-table* 759 init-specs 3 initial-valuef) arg3) + (set! (-> *part-id-table* 759 init-specs 5 initial-valuef) arg3) + (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 759) arg1) + (set! (-> *part-id-table* 762 init-specs 1 initial-valuef) (* 0.000004150391 f30-0)) + (set! (-> *part-id-table* 762 init-specs 16 initial-valuef) arg0) + (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 762) arg1) + (when (< f30-0 4096.0) + (set! (-> *part-id-table* 758 init-specs 2 random-rangef) arg4) + (launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 758) arg1) + ) + ) + 0 + (none) + ) + +;; definition for method 13 of type water-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod spawn-ripples ((this water-control) (arg0 float) (arg1 vector) (arg2 int) (arg3 vector) (arg4 symbol)) + (local-vars (sv-112 vector)) + (when (and (logtest? (water-flag part-splash) (-> this flags)) + (logtest? (water-flag part-water) (-> this flags)) + (cond + ((< 150 (-> *sp-particle-system-3d* num-alloc 0)) + (= (-> this process type) target) + ) + ((< 100 (-> *sp-particle-system-3d* num-alloc 0)) + (let ((s2-0 vector-vector-distance)) + (set! sv-112 arg1) + (let ((a1-1 (camera-pos))) + (< (s2-0 sv-112 a1-1) 81920.0) + ) + ) + ) + (else + #t + ) + ) + ) + (let ((s2-2 (vector+float*! (new 'stack-no-clear 'vector) arg1 arg3 0.05))) + (set! (-> s2-2 y) (+ 40.96 (-> this surface-height))) + (if (time-elapsed? (-> this distort-time) (seconds 0.1)) + (splash-spawn arg0 s2-2 arg2) + ) + (when (and arg4 (time-elapsed? (-> this distort-time) (seconds 0.3))) + (set-time! (-> this distort-time)) + (let ((s4-1 (process-spawn + manipy + :init manipy-init + s2-2 + (-> this process entity) + (art-group-get-by-name *level* "skel-generic-ripples" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to (-> this process) + :stack-size #x20000 + ) + ) + ) + (when s4-1 + (send-event (ppointer->process s4-1) 'anim-mode 'play1) + (send-event (ppointer->process s4-1) 'anim "idle") + (let ((f0-5 (fmax 0.6 (fmin 1.0 (* 2.0 arg0))))) + (set-vector! (-> (the-as process-drawable (-> s4-1 0)) root scale) f0-5 0.5 f0-5 1.0) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function water-info<-region +;; INFO: Used lq/sq +(defun water-info<-region ((arg0 water-info) + (arg1 drawable-region-prim) + (arg2 (inline-array water-sphere)) + (arg3 collide-action) + (arg4 process-drawable) + ) + (local-vars (sv-256 process)) + (when (and (-> arg0 prim) (= (-> arg0 prim region) (-> arg1 region))) + (set! arg0 arg0) + (goto cfg-96) + ) + (set! (-> arg0 flags) (water-flag)) + (set! (-> arg0 handle) (the-as handle #f)) + (set! (-> arg0 depth) 0.0) + (let ((s1-0 (the-as object (-> arg1 region on-inside)))) + (set! s1-0 (cond + ((= (-> (the-as pair s1-0) car) 'water) + (empty) + s1-0 + ) + (else + (script-eval (the-as pair s1-0)) + ) + ) + ) + (when s1-0 + (set! (-> arg0 trans quad) (-> arg2 (+ arg3 -1) sphere quad)) + (set-vector! (-> arg0 normal) 0.0 1.0 0.0 1.0) + (case (-> (the-as pair (-> (the-as pair s1-0) cdr)) car) + (('height) + (set! (-> arg0 flags) (water-flag active)) + (set! (-> arg0 trans y) + (* 4096.0 (command-get-float (-> (the-as pair (-> (the-as pair (-> (the-as pair s1-0) cdr)) cdr)) car) 0.0)) + ) + (set! (-> arg0 base-height) (-> arg0 trans y)) + ) + (('ocean) + (set! (-> arg0 flags) (water-flag active use-ocean)) + (set! (-> arg0 trans y) (get-height *ocean* (-> arg0 trans) #f)) + (set! (-> arg0 base-height) (get-base-height *ocean-map*)) + (when (= (-> arg0 trans y) 4095996000.0) + (set! (-> arg0 flags) (water-flag)) + 0 + ) + ) + (('water-anim) + (set! sv-256 (command-get-process + (-> (the-as pair (-> (the-as pair (-> (the-as pair s1-0) cdr)) cdr)) car) + (the-as process #f) + ) + ) + (let ((s0-0 (if (type? sv-256 process-drawable) + sv-256 + ) + ) + ) + (cond + (s0-0 + (set! (-> arg0 flags) (water-flag active use-water-anim)) + (set! (-> arg0 trans y) (ripple-find-height (the-as process-drawable s0-0) 0 (-> arg0 trans))) + (set! (-> arg0 handle) (process->handle s0-0)) + (set! (-> arg0 base-height) (-> (the-as process-drawable s0-0) root trans y)) + ) + (else + (set! (-> arg0 flags) (water-flag)) + 0 + ) + ) + ) + ) + (('water-flow) + (let ((s0-1 (command-get-process + (-> (the-as pair (-> (the-as pair (-> (the-as pair s1-0) cdr)) cdr)) car) + (the-as process #f) + ) + ) + ) + (cond + (s0-1 + (set! (-> arg0 flags) (water-flag active use-water-anim)) + (cond + ((send-event s0-1 'water-info arg0) + (set! (-> arg0 handle) (process->handle s0-1)) + (set! (-> arg0 base-height) (-> arg0 trans y)) + ) + (else + (set! (-> arg0 flags) (water-flag)) + 0 + ) + ) + ) + (else + (set! (-> arg0 flags) (water-flag)) + 0 + ) + ) + ) + ) + (('gspot) + (set! (-> arg0 flags) (water-flag)) + 0 + ) + (else + (set! (-> arg0 flags) (water-flag)) + 0 + ) + ) + (when (logtest? (-> arg0 flags) (water-flag active)) + (let* ((s1-1 (-> (the-as pair (-> (the-as pair (-> (the-as pair (-> (the-as pair s1-0) cdr)) cdr)) cdr)) car)) + (v1-56 (-> (the-as pair s1-1) car)) + ) + (while (not (null? s1-1)) + (cond + ((= v1-56 'swim) + (logior! (-> arg0 flags) (water-flag can-swim can-ground)) + ) + ((= v1-56 'wade) + (logior! (-> arg0 flags) (water-flag can-wade can-ground)) + ) + ((= v1-56 'event) + (logior! (-> arg0 flags) (water-flag event)) + ) + ((= v1-56 'tar) + (logior! (-> arg0 flags) (water-flag tar)) + ) + ((= v1-56 'darkeco) + (logior! (-> arg0 flags) (water-flag dark-eco)) + ) + ((= v1-56 'lava) + (logior! (-> arg0 flags) (water-flag lava)) + ) + ((= v1-56 'mud) + (logior! (-> arg0 flags) (water-flag mud)) + ) + ((= v1-56 'mech) + (let* ((s0-2 arg4) + (a0-50 (if (type? s0-2 process-focusable) + s0-2 + ) + ) + ) + (when (and a0-50 (not (logtest? (focus-status mech) (-> (the-as process-focusable a0-50) focus-status)))) + (set! (-> arg0 flags) (water-flag)) + 0 + ) + ) + (logior! (-> arg0 extra-flags) 1) + ) + ) + (set! s1-1 (-> (the-as pair s1-1) cdr)) + (set! v1-56 (-> (the-as pair s1-1) car)) + ) + ) + (dotimes (s1-2 (the-as int (+ arg3 -1))) + (set! (-> (the-as region-prim-area #x70000000) pos quad) (-> arg2 s1-2 sphere quad)) + (when (and (within-area? arg1 (the-as region-prim-area (+ #x70000000 0))) + (begin + (logior! (-> arg0 flags) (water-flag over-water)) + (>= (-> arg0 trans y) (- (-> arg2 s1-2 sphere y) (-> arg2 s1-2 sphere r))) + ) + ) + (set! (-> arg0 prim) arg1) + (logior! (-> arg0 flags) (water-flag touch-water)) + (logior! (-> arg2 s1-2 flags) (water-flag touch-water)) + ) + ) + (if (and (logtest? (water-flag event) (-> arg0 flags)) (logtest? (water-flag touch-water) (-> arg0 flags))) + (send-event (handle->process (-> arg0 handle)) 'water arg0 arg4) + ) + ) + ) + ) + (label cfg-96) + arg0 + ) + +;; definition for function find-water-1 +;; INFO: Used lq/sq +(defun find-water-1 ((arg0 water-sphere) (arg1 water-info) (arg2 water-info)) + (local-vars (v0-1 symbol)) + (set! (-> arg2 flags) (water-flag)) + (set! (-> arg2 handle) (the-as handle #f)) + (set! (-> arg1 flags) (water-flag)) + (set! (-> arg1 handle) (the-as handle #f)) + (set! (-> arg2 extra-flags) (the-as uint 0)) + (set! (-> (the-as region-prim-area #x70000000) region-prim-list num-items) 0) + (set! (-> (the-as region-prim-area #x70000000) region-inside-count) 0) + (set! (-> (the-as region-prim-area #x70000000) pos quad) (-> arg0 sphere quad)) + (dotimes (gp-0 (-> *level* length)) + (let ((v1-7 (-> *level* level gp-0))) + (when (= (-> v1-7 status) 'active) + (let ((s5-0 (-> v1-7 bsp region-trees))) + (when (nonzero? s5-0) + (let* ((s4-0 (-> s5-0 length)) + (s3-0 0) + (a0-6 (-> s5-0 s3-0)) + ) + (while (< s3-0 s4-0) + (if (= (-> a0-6 name) 'water) + (collect-regions + a0-6 + (the-as sphere (-> (the-as region-prim-area #x70000000) pos)) + 0 + (the-as region-prim-list (+ #x70000000 0)) + ) + ) + (+! s3-0 1) + (set! a0-6 (-> s5-0 s3-0)) + ) + ) + ) + ) + ) + ) + ) + (return (nonzero? (-> (the-as region-prim-area #x70000000) region-prim-list num-items))) + v0-1 + ) + +;; definition for function find-water-2 +(defun find-water-2 ((arg0 (inline-array water-sphere)) (arg1 int) (arg2 water-info) (arg3 water-info) (arg4 process-drawable)) + (set! (-> arg2 prim) #f) + (set! (-> arg3 prim) #f) + (countdown (s1-0 (-> (the-as region-prim-area #x70000000) region-prim-list num-items)) + (water-info<-region + arg3 + (-> (the-as region-prim-area #x70000000) region-prim-list items s1-0) + arg0 + (the-as collide-action arg1) + arg4 + ) + (when (and (logtest? (-> arg3 flags) (water-flag active)) + (logtest? (water-flag touch-water) (-> arg3 flags)) + (not (logtest? (-> arg3 extra-flags) 1)) + ) + (mem-copy! (the-as pointer arg2) (the-as pointer arg3) 60) + (send-event (handle->process (-> arg2 handle)) 'touch-water) + (return arg2) + ) + (when (and (logtest? (-> arg3 flags) (water-flag active)) + (logtest? (water-flag touch-water over-water) (-> arg3 flags)) + ) + (mem-copy! (the-as pointer arg2) (the-as pointer arg3) 60) + (if (logtest? (water-flag touch-water) (-> arg2 flags)) + (send-event (handle->process (-> arg2 handle)) 'touch-water) + ) + ) + ) + (the-as water-info #f) + ) + +;; definition for method 52 of type collide-shape +;; INFO: Used lq/sq +;; ERROR: Unsupported inline assembly instruction kind - [movz v1, v1, a0] +(defmethod water-info-init! ((this collide-shape) (arg0 water-info) (arg1 collide-action)) + (local-vars (v1-4 int) (a0-3 int) (sv-80 int)) + (let ((s4-0 (new 'stack-no-clear 'water-info))) + (when (find-water-1 (the-as water-sphere (-> this root-prim prim-core)) arg0 s4-0) + (let ((s3-0 (new 'static 'inline-array water-sphere 30 + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + (new 'static 'water-sphere) + ) + ) + (s2-0 0) + ) + (let ((s0-0 (-> this root-prim))) + (set! sv-80 30) + (let ((a0-2 sv-80) + (v1-3 (-> this total-prims)) + ) + (set-on-less-than a0-3 a0-2 v1-3) + (.movz v1-4 v1-3 a0-3 v1-3) + ) + (set! sv-80 v1-4) + (if (and *debug-segment* (< (the-as uint 30) (-> this total-prims))) + (format *stdcon* "find-water exceeded FIND_WATER_MAX_PRIMS ~D/~D~%" (-> this total-prims) 30) + ) + (while (nonzero? sv-80) + (set! sv-80 (+ sv-80 -1)) + (when (and (nonzero? (-> s0-0 prim-core prim-type)) + (logtest? (-> s0-0 prim-core action) arg1) + (nonzero? (-> s0-0 prim-core collide-with)) + ) + (set! (-> s3-0 s2-0 sphere quad) (-> s0-0 prim-core world-sphere quad)) + (set! (-> s3-0 s2-0 flags) (water-flag)) + (+! s2-0 1) + ) + (&+! s0-0 80) + ) + ) + (let ((v1-26 (-> this root-prim))) + (when (zero? (-> v1-26 prim-core prim-type)) + (set! (-> s3-0 s2-0 sphere quad) (-> v1-26 prim-core world-sphere quad)) + (set! (-> s3-0 s2-0 flags) (water-flag)) + (+! s2-0 1) + ) + ) + (find-water-2 s3-0 s2-0 arg0 s4-0 (-> this process)) + ) + ) + ) + arg0 + ) + +;; definition for function find-water-with-spheres +;; WARN: Return type mismatch int vs object. +(defun find-water-with-spheres ((arg0 (inline-array water-sphere)) (arg1 int) (arg2 water-info)) + (let ((s3-0 (new 'stack-no-clear 'water-info))) + (if (not arg2) + (set! arg2 (new 'static 'water-info)) + ) + (if (find-water-1 (-> arg0 (+ arg1 -1)) arg2 s3-0) + (find-water-2 arg0 arg1 arg2 s3-0 (the-as process-drawable #f)) + ) + ) + 0 + ) diff --git a/test/decompiler/reference/jak3/engine/data/art-h_REF.gc b/test/decompiler/reference/jak3/engine/data/art-h_REF.gc index 305b650ce6..cf9a414185 100644 --- a/test/decompiler/reference/jak3/engine/data/art-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/data/art-h_REF.gc @@ -551,6 +551,7 @@ This stores settings like the name of the art-group, shadow/level-of-detail sett ((lod lod-group 6 :inline) (max-lod int8) ) + :allow-misaligned (:methods (setup-lods! (_type_ skeleton-group art-group entity) _type_) ) diff --git a/test/decompiler/reference/jak3/engine/data/font-data_REF.gc b/test/decompiler/reference/jak3/engine/data/font-data_REF.gc new file mode 100644 index 0000000000..6c3147e3e1 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/data/font-data_REF.gc @@ -0,0 +1,516 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *font12-table*, type (inline-array vector) +(define *font12-table* (new 'static 'inline-array vector 250 + (new 'static 'vector :x 0.0039 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.0322 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.0322 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.1914 :y 0.0322 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.2851 :y 0.0322 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.0322 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.4726 :y 0.0322 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.0322 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.6601 :y 0.0322 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.7539 :y 0.0322 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.8476 :y 0.0322 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.0634 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.0634 :z 1.0 :w 22.5) + (new 'static 'vector :x 0.1914 :y 0.0634 :z 1.0 :w 19.5) + (new 'static 'vector :x 0.2851 :y 0.0634 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.3789 :y 0.0634 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.4726 :y 0.0634 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.0634 :z 1.0 :w 10.5) + (new 'static 'vector :x 0.6601 :y 0.0634 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.7539 :y 0.0634 :z 1.0 :w 10.5) + (new 'static 'vector :x 0.8476 :y 0.0634 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.0947 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.0976 :y 0.0947 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.1914 :y 0.0947 :z 1.0 :w 10.5) + (new 'static 'vector :x 0.2851 :y 0.0947 :z 1.0 :w 7.5) + (new 'static 'vector :x 0.3789 :y 0.0947 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.4726 :y 0.0947 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.5664 :y 0.0947 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.6601 :y 0.0947 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.7539 :y 0.0947 :z 1.0 :w 7.5) + (new 'static 'vector :x 0.8476 :y 0.0947 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.0039 :y 0.1259 :z 1.0 :w 7.5) + (new 'static 'vector :x 0.0976 :y 0.1259 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.1914 :y 0.1259 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.2851 :y 0.1259 :z 1.0 :w 11.25) + (new 'static 'vector :x 0.3789 :y 0.1259 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.4726 :y 0.1259 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.5664 :y 0.1259 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.6601 :y 0.1259 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.7539 :y 0.1259 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.8476 :y 0.1259 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.0039 :y 0.1572 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.0976 :y 0.1572 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.1914 :y 0.1572 :z 1.0 :w 7.5) + (new 'static 'vector :x 0.2851 :y 0.1572 :z 1.0 :w 7.5) + (new 'static 'vector :x 0.3789 :y 0.1572 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.4726 :y 0.1572 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.5664 :y 0.1572 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.6601 :y 0.1572 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.7539 :y 0.1572 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.8476 :y 0.1572 :z 1.0 :w 17.25) + (new 'static 'vector :x 0.0039 :y 0.1884 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.1884 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.1914 :y 0.1884 :z 1.0 :w 15.75) + (new 'static 'vector :x 0.2851 :y 0.1884 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.3789 :y 0.1884 :z 1.0 :w 14.25) + (new 'static 'vector :x 0.4726 :y 0.1884 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.1884 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.6601 :y 0.1884 :z 1.0 :w 7.5) + (new 'static 'vector :x 0.7539 :y 0.1884 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.8476 :y 0.1884 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.2197 :z 1.0 :w 15.75) + (new 'static 'vector :x 0.0976 :y 0.2197 :z 1.0 :w 19.5) + (new 'static 'vector :x 0.1914 :y 0.2197 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.2851 :y 0.2197 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.2197 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.4726 :y 0.2197 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.2197 :z 1.0 :w 15.75) + (new 'static 'vector :x 0.6601 :y 0.2197 :z 1.0 :w 12.75) + (new 'static 'vector :x 0.7539 :y 0.2197 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.8476 :y 0.2197 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.2509 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.2509 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.1914 :y 0.2509 :z 1.0 :w 17.25) + (new 'static 'vector :x 0.2851 :y 0.2509 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.3789 :y 0.2509 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.4726 :y 0.2509 :z 1.0 :w 9.0) + (new 'static 'vector :x 0.5664 :y 0.2509 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.6601 :y 0.2509 :z 1.0 :w 10.5) + (new 'static 'vector :x 0.7539 :y 0.2509 :z 1.0 :w 19.5) + (new 'static 'vector :x 0.8476 :y 0.2509 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.0039 :y 0.2822 :z 1.0 :w 6.0) + (new 'static 'vector :x 0.0976 :y 0.2822 :z 1.0 :w 14.25) + (new 'static 'vector :x 0.1914 :y 0.2822 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.2851 :y 0.2822 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.3789 :y 0.2822 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.4726 :y 0.2822 :z 1.0 :w 12.75) + (new 'static 'vector :x 0.5664 :y 0.2822 :z 1.0 :w 12.75) + (new 'static 'vector :x 0.6601 :y 0.2822 :z 1.0 :w 17.25) + (new 'static 'vector :x 0.7539 :y 0.2822 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.8476 :y 0.2822 :z 1.0 :w 9.0) + (new 'static 'vector :x 0.0039 :y 0.3134 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.0976 :y 0.3134 :z 1.0 :w 14.25) + (new 'static 'vector :x 0.1914 :y 0.3134 :z 1.0 :w 9.75) + (new 'static 'vector :x 0.2851 :y 0.3134 :z 1.0 :w 18.5) + (new 'static 'vector :x 0.3789 :y 0.3134 :z 1.0 :w 14.25) + (new 'static 'vector :x 0.4726 :y 0.3134 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.5664 :y 0.3134 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.6601 :y 0.3134 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.7539 :y 0.3134 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.8476 :y 0.3134 :z 1.0 :w 10.5) + (new 'static 'vector :x 0.0039 :y 0.3447 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.0976 :y 0.3447 :z 1.0 :w 12.75) + (new 'static 'vector :x 0.1914 :y 0.3447 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.2851 :y 0.3447 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.3789 :y 0.3447 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.4726 :y 0.3447 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.5664 :y 0.3447 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.6601 :y 0.3447 :z 1.0 :w 10.5) + (new 'static 'vector :x 0.7539 :y 0.3447 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.3447 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.0039 :y 0.3759 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.0976 :y 0.3759 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.1914 :y 0.3759 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.3759 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.3759 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.3759 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.3759 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.3759 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.3759 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.3759 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.4072 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.4072 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.4072 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.4072 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.4072 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.4072 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.4072 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.4072 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.4072 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.4072 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.4384 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.4384 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.4384 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.4384 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.4384 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.4384 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.4384 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.4384 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.4384 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.4384 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.4697 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.4697 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.4697 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.4697 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.4697 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.4697 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.4697 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.4697 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.4697 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.4697 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.5634 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.5634 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.5634 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.5634 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.5634 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.5634 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.5634 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.5634 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.5634 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.5634 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.5947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.5947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.5947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.5947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.5947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.5947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.5947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.5947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.5947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.5947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.6259 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.6259 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.6259 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.6259 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.6259 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.6259 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.6259 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.6259 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.6259 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.6259 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.6884 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.6884 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.6884 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.6884 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.6884 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.6884 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.6884 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.6884 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.6884 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.6884 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.7509 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.7509 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.7509 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.7509 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.7509 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.7509 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.7509 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.7509 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.7509 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.7509 :z 1.0 :w 16.0) + ) + ) + +;; definition for symbol *font24-table*, type (inline-array vector) +(define *font24-table* (new 'static 'inline-array vector 250 + (new 'static 'vector :x 0.0039 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.0009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.0322 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.0976 :y 0.0322 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.1914 :y 0.0322 :z 1.0 :w 19.5) + (new 'static 'vector :x 0.2851 :y 0.0322 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.0322 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.4726 :y 0.0322 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.5664 :y 0.0322 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.6601 :y 0.0322 :z 1.0 :w 11.0) + (new 'static 'vector :x 0.7539 :y 0.0322 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.8476 :y 0.0322 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.0039 :y 0.0634 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.0634 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.1914 :y 0.0634 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.2851 :y 0.0634 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.0634 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.4726 :y 0.0634 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.0634 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.6601 :y 0.0634 :z 1.0 :w 11.0) + (new 'static 'vector :x 0.7539 :y 0.0634 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.8476 :y 0.0634 :z 1.0 :w 17.5) + (new 'static 'vector :x 0.0039 :y 0.0947 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.0947 :z 1.0 :w 26.0) + (new 'static 'vector :x 0.1914 :y 0.0947 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.0947 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.0947 :z 1.0 :w 14.0) + (new 'static 'vector :x 0.4726 :y 0.0947 :z 1.0 :w 14.0) + (new 'static 'vector :x 0.5664 :y 0.0947 :z 1.0 :w 22.5) + (new 'static 'vector :x 0.6601 :y 0.0947 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.7539 :y 0.0947 :z 1.0 :w 11.0) + (new 'static 'vector :x 0.8476 :y 0.0947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.1259 :z 1.0 :w 11.0) + (new 'static 'vector :x 0.0976 :y 0.1259 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.1914 :y 0.1259 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.1259 :z 1.0 :w 14.0) + (new 'static 'vector :x 0.3789 :y 0.1259 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.4726 :y 0.1259 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.5664 :y 0.1259 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.6601 :y 0.1259 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.7539 :y 0.1259 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.8476 :y 0.1259 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.0039 :y 0.1572 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.0976 :y 0.1572 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.1914 :y 0.1572 :z 1.0 :w 11.0) + (new 'static 'vector :x 0.2851 :y 0.1572 :z 1.0 :w 20.0) + (new 'static 'vector :x 0.3789 :y 0.1572 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.4726 :y 0.1572 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.5664 :y 0.1572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.1572 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.7539 :y 0.1572 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.8476 :y 0.1572 :z 1.0 :w 26.0) + (new 'static 'vector :x 0.0039 :y 0.1884 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.0976 :y 0.1884 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.1914 :y 0.1884 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.2851 :y 0.1884 :z 1.0 :w 19.0) + (new 'static 'vector :x 0.3789 :y 0.1884 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.4726 :y 0.1884 :z 1.0 :w 26.0) + (new 'static 'vector :x 0.5664 :y 0.1884 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.6601 :y 0.1884 :z 1.0 :w 10.0) + (new 'static 'vector :x 0.7539 :y 0.1884 :z 1.0 :w 19.0) + (new 'static 'vector :x 0.8476 :y 0.1884 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.2197 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.0976 :y 0.2197 :z 1.0 :w 26.0) + (new 'static 'vector :x 0.1914 :y 0.2197 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.2851 :y 0.2197 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.3789 :y 0.2197 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.4726 :y 0.2197 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.5664 :y 0.2197 :z 1.0 :w 19.0) + (new 'static 'vector :x 0.6601 :y 0.2197 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.7539 :y 0.2197 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.8476 :y 0.2197 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.0039 :y 0.2509 :z 1.0 :w 26.0) + (new 'static 'vector :x 0.0976 :y 0.2509 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.1914 :y 0.2509 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.2851 :y 0.2509 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.3789 :y 0.2509 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.2509 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.2509 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.2509 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.2509 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.8476 :y 0.2509 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.2822 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.2822 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.1914 :y 0.2822 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.2851 :y 0.2822 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.2822 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.2822 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.5664 :y 0.2822 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.6601 :y 0.2822 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.7539 :y 0.2822 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.8476 :y 0.2822 :z 1.0 :w 10.0) + (new 'static 'vector :x 0.0039 :y 0.3134 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.0976 :y 0.3134 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.1914 :y 0.3134 :z 1.0 :w 10.0) + (new 'static 'vector :x 0.2851 :y 0.3134 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.3789 :y 0.3134 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.4726 :y 0.3134 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.5664 :y 0.3134 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.3134 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.7539 :y 0.3134 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.3134 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.0039 :y 0.3447 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.3447 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.1914 :y 0.3447 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.2851 :y 0.3447 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.3789 :y 0.3447 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.4726 :y 0.3447 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.5664 :y 0.3447 :z 1.0 :w 20.0) + (new 'static 'vector :x 0.6601 :y 0.3447 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.3447 :z 1.0 :w 27.0) + (new 'static 'vector :x 0.8476 :y 0.3447 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.3759 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.3759 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.3759 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.3759 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.3759 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.3759 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.3759 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.3759 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.3759 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.3759 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.4072 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.4072 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.4072 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.4072 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.4072 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.4072 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.4072 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.4072 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.4072 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.4072 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.4384 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.4384 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.4384 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.4384 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.4384 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.4384 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.4384 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.4384 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.4384 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.4384 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.4697 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.4697 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.4697 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.4697 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.4697 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.4697 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.4697 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.4697 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.4697 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.4697 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.5009 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.5322 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.5322 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.5322 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.5322 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.5322 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.5322 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.5322 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.5634 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.0976 :y 0.5634 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.1914 :y 0.5634 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.2851 :y 0.5634 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.5634 :z 1.0 :w 19.0) + (new 'static 'vector :x 0.4726 :y 0.5634 :z 1.0 :w 14.0) + (new 'static 'vector :x 0.5664 :y 0.5634 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.6601 :y 0.5634 :z 1.0 :w 14.0) + (new 'static 'vector :x 0.7539 :y 0.5634 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.8476 :y 0.5634 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.5947 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.0976 :y 0.5947 :z 1.0 :w 19.0) + (new 'static 'vector :x 0.1914 :y 0.5947 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.2851 :y 0.5947 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.3789 :y 0.5947 :z 1.0 :w 20.0) + (new 'static 'vector :x 0.4726 :y 0.5947 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.5664 :y 0.5947 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.6601 :y 0.5947 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.5947 :z 1.0 :w 19.0) + (new 'static 'vector :x 0.8476 :y 0.5947 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.6259 :z 1.0 :w 19.0) + (new 'static 'vector :x 0.0976 :y 0.6259 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.1914 :y 0.6259 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.2851 :y 0.6259 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.3789 :y 0.6259 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.4726 :y 0.6259 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.5664 :y 0.6259 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.6601 :y 0.6259 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.7539 :y 0.6259 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.8476 :y 0.6259 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.0039 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.6572 :z 1.0 :w 25.0) + (new 'static 'vector :x 0.1914 :y 0.6572 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.2851 :y 0.6572 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.6572 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.6572 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.6572 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.6601 :y 0.6572 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.7539 :y 0.6572 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.8476 :y 0.6572 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.6884 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.6884 :z 1.0 :w 13.0) + (new 'static 'vector :x 0.1914 :y 0.6884 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.2851 :y 0.6884 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.6884 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.6884 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.5664 :y 0.6884 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.6601 :y 0.6884 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.7539 :y 0.6884 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.8476 :y 0.6884 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0976 :y 0.7197 :z 1.0 :w 13.0) + (new 'static 'vector :x 0.1914 :y 0.7197 :z 1.0 :w 14.0) + (new 'static 'vector :x 0.2851 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.7197 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.4726 :y 0.7197 :z 1.0 :w 14.0) + (new 'static 'vector :x 0.5664 :y 0.7197 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.7197 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.7539 :y 0.7197 :z 1.0 :w 20.0) + (new 'static 'vector :x 0.8476 :y 0.7197 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.0039 :y 0.7509 :z 1.0 :w 20.0) + (new 'static 'vector :x 0.0976 :y 0.7509 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.1914 :y 0.7509 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.7509 :z 1.0 :w 13.0) + (new 'static 'vector :x 0.3789 :y 0.7509 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.4726 :y 0.7509 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.5664 :y 0.7509 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.7509 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.7539 :y 0.7509 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.7509 :z 1.0 :w 24.0) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/debug/collision-editor_REF.gc b/test/decompiler/reference/jak3/engine/debug/collision-editor_REF.gc new file mode 100644 index 0000000000..c827bd9469 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/debug/collision-editor_REF.gc @@ -0,0 +1,1000 @@ +;;-*-Lisp-*- +(in-package goal) + +;; this file is debug only +(declare-file (debug)) + +;; failed to figure out what this is: +(defskelgroup skel-collision-editor sew-rove-plat sew-rove-plat-lod0-jg sew-rove-plat-idle-ja + ((sew-rove-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 100) + ) + +;; definition of type collision-editor-default-proc +(deftype collision-editor-default-proc (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type collision-editor-default-proc +(defmethod inspect ((this collision-editor-default-proc)) + (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 (collision-editor-default-proc) + :virtual #t + :trans (behavior () + (deactivate self) + ) + :code sleep-code + ) + +;; definition for function collision-editor-default-proc-init-by-other +(defbehavior collision-editor-default-proc-init-by-other collision-editor-default-proc () + (let ((gp-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-sphere gp-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 4096000.0) + (set! (-> gp-0 total-prims) (the-as uint 1)) + (set! (-> gp-0 root-prim) v1-2) + ) + (set! (-> gp-0 nav-radius) (* 0.75 (-> gp-0 root-prim local-sphere w))) + (let ((v1-5 (-> gp-0 root-prim))) + (set! (-> gp-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> gp-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> self root) gp-0) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-collision-editor" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (transform-post) + (go-virtual idle) + ) + +;; definition of type collision-editor-edited-proc +(deftype collision-editor-edited-proc (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type collision-editor-edited-proc +(defmethod inspect ((this collision-editor-edited-proc)) + (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 (collision-editor-edited-proc) + :virtual #t + :code sleep-code + :post (behavior () + (transform-post) + ) + ) + +;; definition for function collision-editor-edited-proc-init-by-other +(defbehavior collision-editor-edited-proc-init-by-other collision-editor-edited-proc () + (let ((gp-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (let ((v1-2 (new 'process 'collide-shape-prim-sphere gp-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! (-> gp-0 total-prims) (the-as uint 1)) + (set! (-> gp-0 root-prim) v1-2) + ) + (set! (-> gp-0 nav-radius) (* 0.75 (-> gp-0 root-prim local-sphere w))) + (let ((v1-5 (-> gp-0 root-prim))) + (set! (-> gp-0 backup-collide-as) (-> v1-5 prim-core collide-as)) + (set! (-> gp-0 backup-collide-with) (-> v1-5 prim-core collide-with)) + ) + (set! (-> self root) gp-0) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-collision-editor" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go-virtual idle) + ) + +;; definition for symbol *collision-editor-mesh-names*, type (array string) +(define *collision-editor-mesh-names* (new 'static 'boxed-array :type string "moveplat")) + +;; definition for symbol *collision-editor-art-group-name*, type string +(define *collision-editor-art-group-name* "sew-rove-plat") + +;; definition for function collision-editor-add-mesh-to-ccache +(defun collision-editor-add-mesh-to-ccache ((arg0 collide-shape-prim-group) (arg1 collide-cache)) + (set! (-> arg1 collide-box4w min x) -409600000) + (set! (-> arg1 collide-box4w min y) -409600000) + (set! (-> arg1 collide-box4w min z) -409600000) + (set! (-> arg1 collide-box4w max x) #x186a0000) + (set! (-> arg1 collide-box4w max y) #x186a0000) + (set! (-> arg1 collide-box4w max z) #x186a0000) + (set! (-> arg1 num-tris) 0) + (set! (-> arg1 num-prims) 0) + (set! (-> arg1 collide-with) (the-as collide-spec -1)) + (set! (-> arg1 ignore-mask) (new 'static 'pat-surface)) + (add-fg-prim-using-box arg0 arg1) + (none) + ) + +;; definition for function print-default-collision +;; INFO: Used lq/sq +;; 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 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 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 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 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 272 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 288 mismatch: defined as size 4, got size 16 +;; WARN: Return type mismatch int vs none. +(defun print-default-collision ((arg0 process-drawable)) + (local-vars (sv-224 matrix) (sv-240 symbol) (sv-256 string) (sv-272 float) (sv-288 float)) + (let ((gp-0 (process-spawn collision-editor-default-proc :name "collision-editor-default-proc"))) + (when gp-0 + (when (and (nonzero? (-> (the-as process-drawable (-> gp-0 0)) draw)) + (-> (the-as process-drawable (-> gp-0 0)) draw jgeo) + ) + (format #t "(group (#f~%") + (format #t " :action (solid)~%") + (format #t " :collide-as enemy~%") + (format #t " :collide-with (player-list hit-by-others-list jak bot)~%") + (format #t " :sphere ((meters 0.0) (meters 0.0) (meters 0.0) (meters 2.0))~%") + (format + #t + " :transform-index (joint-node-index ~S ~S)~%" + *collision-editor-art-group-name* + (-> (the-as process-drawable (-> gp-0 0)) node-list data 3 joint name) + ) + (format #t " :children (~%") + (let* ((t9-10 (method-of-type res-lump get-property-struct)) + (a0-11 (-> (the-as process-drawable (-> gp-0 0)) draw jgeo extra)) + (a1-10 'collide-mesh-group) + (a2-3 'interp) + (a3-3 -1000000000.0) + (t0-0 (the-as float #f)) + (s5-1 (the-as + (array collide-mesh) + (t9-10 a0-11 a1-10 a2-3 a3-3 (the-as structure t0-0) (the-as (pointer res-tag) #f) *res-static-buf*) + ) + ) + ) + (cond + ((and s5-1 (> (length s5-1) 0)) + (dotimes (s4-0 (length s5-1)) + (format + #t + " (mesh ((la-collide-mesh ~S ~S)~%" + *collision-editor-art-group-name* + (-> *collision-editor-mesh-names* s4-0) + ) + (format #t " :action solid~%") + (format #t " :collide-as enemy~%") + (format #t " :collide-with (player-list hit-by-others-list jak bot)~%") + (let ((v1-22 (-> s5-1 s4-0 joint-id))) + (cond + ((= v1-22 -1) + (format #t " ;;:transform-index JOINT_ID_NO_TRANSFORM~%") + ) + ((= v1-22 -2) + (format #t " ;;:transform-index JOINT_ID_ROOT_TRANSLATION~%") + ) + ((= v1-22 -3) + (format #t " ;;:transform-index JOINT_ID_ROOT_TRANSFORM~%") + ) + (else + (let ((t9-19 format) + (a0-23 #t) + (a1-18 " :transform-index (joint-node-index ~S ~S)~%") + (a2-5 *collision-editor-art-group-name*) + (a3-12 (-> (the-as process-drawable (-> gp-0 0)) node-list data (+ (-> s5-1 s4-0 joint-id) 1) joint name)) + ) + (t9-19 a0-23 a1-18 a2-5 a3-12) + (let ((s0-0 (new 'stack 'collide-shape-prim-mesh (the-as collide-shape 0) (the-as uint a3-12) (the-as uint t0-0)))) + (set! (-> s0-0 cshape) (the-as collide-shape (-> (the-as process-drawable (-> gp-0 0)) root))) + (set! (-> s0-0 transform-index) (+ (-> s5-1 s4-0 joint-id) 1)) + (set! (-> s0-0 prim-core prim-type) 1) + (set! (-> s0-0 local-sphere w) 1.0) + (set! (-> s0-0 mesh) (-> s5-1 s4-0)) + (set! (-> s0-0 mesh-cache-id) (the-as uint 0)) + (set! (-> s0-0 mesh-id) s4-0) + (collision-editor-add-mesh-to-ccache (the-as collide-shape-prim-group s0-0) *collide-cache*) + (let ((a0-26 (the-as object (-> *collide-cache* tris))) + (v1-41 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'vector)) + ) + (when (nonzero? (-> *collide-cache* num-tris)) + (set! (-> v1-41 quad) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 quad)) + (set! (-> s2-0 quad) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 quad)) + ) + (countdown (a1-27 (-> *collide-cache* num-tris)) + (set! (-> v1-41 x) (fmin + (fmin + (fmin (-> v1-41 x) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 x)) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 x) + ) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 x) + ) + ) + (set! (-> v1-41 y) (fmin + (fmin + (fmin (-> v1-41 y) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 y)) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 y) + ) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 y) + ) + ) + (set! (-> v1-41 z) (fmin + (fmin + (fmin (-> v1-41 z) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 z)) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 z) + ) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 z) + ) + ) + (set! (-> s2-0 x) (fmax + (fmax + (fmax (-> s2-0 x) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 x)) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 x) + ) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 x) + ) + ) + (set! (-> s2-0 y) (fmax + (fmax + (fmax (-> s2-0 y) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 y)) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 y) + ) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 y) + ) + ) + (set! (-> s2-0 z) (fmax + (fmax + (fmax (-> s2-0 z) (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 0 z)) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 1 z) + ) + (-> (the-as (inline-array collide-cache-tri) a0-26) 0 vertex 2 z) + ) + ) + (set! a0-26 (-> (the-as (inline-array collide-cache-tri) a0-26) 1)) + ) + (vector+! s3-0 v1-41 s2-0) + (vector-float*! s3-0 s3-0 0.5) + (vector<-cspace! s1-0 (-> (the-as process-drawable (-> gp-0 0)) node-list data (-> s0-0 transform-index))) + (vector-! s1-0 s3-0 s1-0) + (set! sv-224 (new 'stack-no-clear 'matrix)) + (let* ((a0-35 (-> (the-as process-drawable (-> gp-0 0)) node-list data (-> s0-0 transform-index) bone transform)) + (a2-11 (-> a0-35 rvec quad)) + (a1-36 (-> a0-35 uvec quad)) + (v1-53 (-> a0-35 fvec quad)) + (a0-36 (-> a0-35 trans quad)) + ) + (set! (-> sv-224 rvec quad) a2-11) + (set! (-> sv-224 uvec quad) a1-36) + (set! (-> sv-224 fvec quad) v1-53) + (set! (-> sv-224 trans quad) a0-36) + ) + (vector-reset! (-> sv-224 trans)) + (matrix-transpose! sv-224 sv-224) + (vector-matrix*! s1-0 s1-0 sv-224) + (let ((s0-1 format)) + (set! sv-240 #t) + (set! sv-256 " :sphere ((meters ~M) (meters ~M) (meters ~M) (meters ~M))~%") + (set! sv-272 (-> s1-0 x)) + (set! sv-288 (-> s1-0 y)) + (let ((s1-1 (-> s1-0 z)) + (t1-1 (* 1.0001 (vector-vector-distance s3-0 s2-0))) + ) + (set! t0-0 s1-1) + (s0-1 sv-240 sv-256 sv-272 sv-288 t0-0 t1-1) + ) + ) + ) + ) + ) + ) + ) + ) + (format #t " ))~%") + ) + #f + ) + (else + (format #t " (sphere (#f~%") + (format #t " :action solid~%") + (format #t " :collide-as enemy~%") + (format #t " :collide-with (player-list hit-by-others-list jak bot)~%") + (format + #t + " :transform-index (joint-node-index ~S ~S)~%" + *collision-editor-art-group-name* + (-> (the-as process-drawable (-> gp-0 0)) node-list data 3 joint name) + ) + (format #t " :sphere ((meters 0.0) (meters 0.0) (meters 0.0) (meters 1.0))~%") + (format #t " ))~%") + ) + ) + ) + (format #t " )))~%") + ) + ) + (deactivate (-> gp-0 0)) + ) + 0 + (none) + ) + +;; definition for function print-actual-collision +;; WARN: Return type mismatch object vs none. +(defun print-actual-collision ((arg0 process-drawable)) + (format #t "~%~%") + (when arg0 + (when (type? (-> arg0 root) collide-shape) + (let ((s5-0 (-> (the-as collide-shape (-> arg0 root)) root-prim)) + (s4-0 0) + ) + (let ((v1-3 (-> s5-0 prim-core prim-type))) + (cond + ((or (= v1-3 1) (= v1-3 -1)) + (set! s4-0 1) + ) + ((zero? v1-3) + (let ((s4-1 s5-0)) + (format #t "(group (#f~%") + (format #t " ;;:action (solid)~%") + (format #t " ;;:collide-as enemy~%") + (format #t " ;;:collide-with (player-list hit-by-others-list jak bot)~%") + (format + #t + " :sphere ((meters ~M) (meters ~M) (meters ~M) (meters ~M))~%" + (-> s5-0 local-sphere x) + (-> s5-0 local-sphere y) + (-> s5-0 local-sphere z) + (-> s5-0 local-sphere w) + ) + (format + #t + " :transform-index (joint-node-index ~S ~S)~%" + *collision-editor-art-group-name* + (-> arg0 node-list data (-> s4-1 transform-index) joint name) + ) + (format #t " :children (~%") + (set! s4-0 (the-as int (-> s4-1 specific 1))) + ) + (&+! s5-0 80) + ) + ) + ) + (dotimes (s3-0 s4-0) + (case (-> s5-0 prim-core prim-type) + ((1) + (let ((v1-11 s5-0)) + (format + #t + " (mesh ((la-collide-mesh ~S ~S)~%" + *collision-editor-art-group-name* + (-> (the-as + (array string) + (+ (* (-> (the-as collide-shape-prim-mesh v1-11) mesh-id) 4) (the-as int *collision-editor-mesh-names*)) + ) + 0 + ) + ) + ) + (format #t " ;;:action solid~%") + (format #t " ;;:collide-as enemy~%") + (format #t " ;;:collide-with (player-list hit-by-others-list jak bot)~%") + (format + #t + " :transform-index (joint-node-index ~S ~S)~%" + *collision-editor-art-group-name* + (-> arg0 node-list data (-> s5-0 transform-index) joint name) + ) + (format + #t + " :sphere ((meters ~M) (meters ~M) (meters ~M) (meters ~M))~%" + (-> s5-0 local-sphere x) + (-> s5-0 local-sphere y) + (-> s5-0 local-sphere z) + (-> s5-0 local-sphere w) + ) + (format #t " ))~%") + ) + ((-1) + (format #t " (sphere (#f~%") + (format #t " ;;:action solid~%") + (format #t " ;;:collide-as enemy~%") + (format #t " ;;:collide-with (player-list hit-by-others-list jak bot)~%") + (format + #t + " :transform-index (joint-node-index ~S ~S)~%" + *collision-editor-art-group-name* + (-> arg0 node-list data (-> s5-0 transform-index) joint name) + ) + (format + #t + " :sphere ((meters ~M) (meters ~M) (meters ~M) (meters ~M))~%" + (-> s5-0 local-sphere x) + (-> s5-0 local-sphere y) + (-> s5-0 local-sphere z) + (-> s5-0 local-sphere w) + ) + (format #t " ))~%") + ) + ) + (&+! s5-0 80) + ) + ) + (if (zero? (-> (the-as collide-shape (-> arg0 root)) root-prim prim-core prim-type)) + (format #t " )))~%") + ) + ) + ) + (format #t "~%~%") + (none) + ) + +;; definition of type collision-editor +(deftype collision-editor (process) + ((proc handle) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type collision-editor +(defmethod inspect ((this collision-editor)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Tproc: ~D~%" (-> this proc)) + (label cfg-4) + this + ) + +;; definition of type collision-edit-info +(deftype collision-edit-info (structure) + ((editing symbol) + (current-func collision-editor-func) + (analog-func collision-editor-func) + (current-prim int32) + ) + (:methods + (collision-edit-info-method-9 (_type_) none) + (draw-menu (_type_ process-drawable) none) + (collision-edit-info-method-11 (_type_ process-drawable) none) + ) + ) + +;; definition for method 3 of type collision-edit-info +(defmethod inspect ((this collision-edit-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'collision-edit-info) + (format #t "~1Tediting: ~A~%" (-> this editing)) + (format #t "~1Tcurrent-func: ~D~%" (-> this current-func)) + (format #t "~1Tanalog-func: ~D~%" (-> this analog-func)) + (format #t "~1Tcurrent-prim: ~D~%" (-> this current-prim)) + (label cfg-4) + this + ) + +;; definition for function collision-edit-get-max-prim +(defun collision-edit-get-max-prim ((arg0 process-drawable)) + (let ((gp-0 0)) + (when (and arg0 (type? (-> arg0 root) collide-shape)) + (let ((v1-3 (-> (the-as collide-shape (-> arg0 root)) root-prim))) + (if (zero? (-> v1-3 prim-core prim-type)) + (set! gp-0 (the-as int (-> v1-3 specific 1))) + ) + ) + ) + gp-0 + ) + ) + +;; definition for function collision-edit-get-prim +;; WARN: Return type mismatch int vs collide-shape-prim. +(defun collision-edit-get-prim ((arg0 process-drawable) (arg1 int)) + (when (and arg0 (type? (-> arg0 root) collide-shape)) + (let ((s5-0 (-> (the-as collide-shape (-> arg0 root)) root-prim)) + (v1-3 (collision-edit-get-max-prim arg0)) + ) + (if (and s5-0 (>= v1-3 arg1)) + (return (the-as collide-shape-prim (+ (the-as uint s5-0) (* 80 arg1)))) + ) + ) + ) + (the-as collide-shape-prim #f) + ) + +;; definition for method 9 of type collision-edit-info +;; WARN: Return type mismatch int vs none. +(defmethod collision-edit-info-method-9 ((this collision-edit-info)) + (if (cpad-pressed? 0 up) + (+! (-> this current-func) -1) + ) + (if (cpad-pressed? 0 left) + (+! (-> this current-func) -4) + ) + (if (cpad-pressed? 0 down) + (+! (-> this current-func) 1) + ) + (if (cpad-pressed? 0 right) + (+! (-> this current-func) 4) + ) + (cond + ((< (the-as int (-> this current-func)) 0) + (set! (-> this current-func) (collision-editor-func stop-editor)) + ) + ((>= (the-as int (-> this current-func)) 4) + (set! (-> this current-func) (collision-editor-func analog)) + 0 + ) + ) + (none) + ) + +;; definition for method 11 of type collision-edit-info +;; WARN: Return type mismatch int vs none. +(defmethod collision-edit-info-method-11 ((this collision-edit-info) (arg0 process-drawable)) + (local-vars (s5-0 int)) + (when (not arg0) + (set! s5-0 (the-as int #f)) + (goto cfg-14) + ) + (set! s5-0 (-> this current-prim)) + (let ((v1-2 (collision-edit-get-max-prim arg0))) + (when (cpad-pressed? 0 r1) + (+! s5-0 1) + (if (cpad-hold? 0 l1) + (+! s5-0 4) + ) + ) + (when (cpad-pressed? 0 l1) + (+! s5-0 -1) + (if (cpad-hold? 0 r1) + (+! s5-0 -4) + ) + ) + (if (< s5-0 0) + (set! s5-0 v1-2) + ) + (if (< v1-2 s5-0) + (set! s5-0 0) + ) + ) + (set! (-> this current-prim) s5-0) + (label cfg-14) + (none) + ) + +;; definition for method 10 of type collision-edit-info +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw-menu ((this collision-edit-info) (arg0 process-drawable)) + (local-vars (a3-0 string)) + (when (cpad-pressed? 0 l2) + (set! (-> this editing) (not (-> this editing))) + (cond + ((-> this editing) + (set! *external-cam-mode* 'locked) + ) + (*target* + (set! *external-cam-mode* #f) + ) + (else + (set! *external-cam-mode* 'pad-0) + ) + ) + ) + (cond + ((or (not (-> this editing)) (cpad-hold? 0 r2)) + (if (not (-> this editing)) + (format *stdcon* "press l2 to edit collision~%") + (format *stdcon* "release r2 to continue editing collision~%") + ) + (if (or (cpad-hold? 0 r2) (not *target*)) + (set! *external-cam-mode* 'pad-0) + ) + ) + (else + (set! *external-cam-mode* 'locked) + (collision-edit-info-method-9 this) + (collision-edit-info-method-11 this arg0) + (let ((s3-0 ">") + (s4-0 " ") + ) + (if (not (logtest? (-> *display* real-frame-clock integral-frame-counter) 8)) + (set! s3-0 " ") + ) + (format *stdcon* " r2/l2: move camera~%") + (let ((s2-0 (-> this current-prim))) + "??" + (let ((v1-38 (collision-edit-get-prim arg0 0))) + (when v1-38 + (if (zero? (-> v1-38 prim-core prim-type)) + (+! s2-0 -1) + ) + ) + ) + (cond + ((= s2-0 -1) + (set! a3-0 "*group*") + ) + ((= (-> (collision-edit-get-prim arg0 s2-0) prim-core prim-type) 1) + (set! a3-0 (-> *collision-editor-mesh-names* s2-0)) + ) + (else + (set! a3-0 "*sphere*") + ) + ) + ) + (format *stdcon* " r1/l1: select prim ~D ~S~%" (-> this current-prim) a3-0) + (format *stdcon* " dpad: select function~%") + (format *stdcon* " x, tri: toggle/call~%") + (format *stdcon* "------------------------~%") + (format + *stdcon* + " ~S analog: ~S~%" + (if (= (-> this current-func) (collision-editor-func analog)) + s3-0 + s4-0 + ) + (if (= (-> this analog-func) (collision-editor-func analog)) + "adjust sphere" + "???" + ) + ) + (let ((v1-50 (collision-edit-get-prim arg0 (-> this current-prim))) + (a3-2 (the-as basic "??")) + ) + (if (zero? (-> v1-50 transform-index)) + (set! a3-2 "*root*") + ) + (if (and v1-50 + (< (-> v1-50 transform-index) (-> arg0 node-list length)) + (-> arg0 node-list data (-> v1-50 transform-index) joint) + ) + (set! a3-2 (-> arg0 node-list data (-> v1-50 transform-index) joint name)) + ) + (format + *stdcon* + " ~S change sphere joint ~S~%" + (if (= (-> this current-func) (collision-editor-func edit)) + s3-0 + s4-0 + ) + a3-2 + ) + ) + (format + *stdcon* + " ~S print to listener~%" + (if (= (-> this current-func) (collision-editor-func print-collision)) + s3-0 + s4-0 + ) + ) + (format *stdcon* " ~S quit~%" (cond + ((= (-> this current-func) (collision-editor-func stop-editor)) + (empty) + s3-0 + ) + (else + s4-0 + ) + ) + ) + ) + (let ((s4-1 0)) + (if (cpad-pressed? 0 x) + (+! s4-1 1) + ) + (if (cpad-pressed? 0 triangle) + (+! s4-1 -1) + ) + (when (nonzero? s4-1) + (case (-> this current-func) + (((collision-editor-func analog)) + (+! (-> this analog-func) s4-1) + ) + (((collision-editor-func edit)) + (let ((v1-75 (collision-edit-get-prim arg0 (-> this current-prim)))) + (when (and v1-75 (!= (-> v1-75 prim-core prim-type) 1)) + (let* ((a0-41 (-> v1-75 transform-index)) + (a1-25 (+ (-> arg0 node-list length) -1)) + (a0-42 (+ a0-41 s4-1)) + ) + (if (< a0-42 0) + (set! a0-42 a1-25) + ) + (while (or (= a0-42 1) (= a0-42 2)) + (+! a0-42 s4-1) + ) + (if (< a1-25 a0-42) + (set! a0-42 0) + ) + (set! (-> v1-75 transform-index) a0-42) + ) + ) + ) + ) + (((collision-editor-func print-collision)) + (print-actual-collision arg0) + ) + (((collision-editor-func stop-editor)) + (kill-by-type collision-editor-edited-proc *active-pool*) + (kill-by-type collision-editor *active-pool*) + ) + (else + (format 0 "~%ERROR: bad collision-edit-func~%") + ) + ) + ) + ) + (cond + ((< (the-as int (-> this analog-func)) 0) + (set! (-> this analog-func) (collision-editor-func analog)) + 0 + ) + ((>= (the-as int (-> this analog-func)) 1) + (set! (-> this analog-func) (collision-editor-func analog)) + 0 + ) + ) + (when arg0 + (let ((f30-0 (analog-input (the-as int (-> *cpad-list* cpads 0 rightx)) 128.0 48.0 110.0 1.0)) + (f28-0 (analog-input (the-as int (-> *cpad-list* cpads 0 righty)) 128.0 48.0 110.0 1.0)) + (f26-0 (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 48.0 110.0 1.0)) + (f24-0 (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 48.0 110.0 1.0)) + ) + (when (or (!= f30-0 0.0) (!= f28-0 0.0) (!= f26-0 0.0) (!= f24-0 0.0)) + (when (= (-> this analog-func) (collision-editor-func analog)) + (set! f30-0 (* -409.6 f30-0)) + (set! f28-0 (* -409.6 f28-0)) + (let ((f0-8 (+ (* 0.01 f24-0) (* -0.01 f26-0)))) + (set! f24-0 (+ 1.0 f0-8)) + ) + (set! f26-0 0.0) + ) + (when (= (-> this analog-func) (collision-editor-func analog)) + (let ((s4-2 (collision-edit-get-prim arg0 (-> this current-prim)))) + (when s4-2 + (set! (-> s4-2 local-sphere w) (* (-> s4-2 local-sphere w) f24-0)) + (let ((s3-1 (new 'stack-no-clear 'matrix))) + (let* ((a2-17 (matrix-local->world #f #f)) + (v1-107 (-> a2-17 rvec quad)) + (a0-58 (-> a2-17 uvec quad)) + (a1-37 (-> a2-17 fvec quad)) + (a2-18 (-> a2-17 trans quad)) + ) + (set! (-> s3-1 rvec quad) v1-107) + (set! (-> s3-1 uvec quad) a0-58) + (set! (-> s3-1 fvec quad) a1-37) + (set! (-> s3-1 trans quad) a2-18) + ) + (let ((s2-1 (new 'stack-no-clear 'matrix))) + (let* ((a2-19 (-> arg0 node-list data (-> s4-2 transform-index) bone transform)) + (v1-111 (-> a2-19 rvec quad)) + (a0-61 (-> a2-19 uvec quad)) + (a1-38 (-> a2-19 fvec quad)) + (a2-20 (-> a2-19 trans quad)) + ) + (set! (-> s2-1 rvec quad) v1-111) + (set! (-> s2-1 uvec quad) a0-61) + (set! (-> s2-1 fvec quad) a1-38) + (set! (-> s2-1 trans quad) a2-20) + ) + (let ((s1-1 (new 'stack-no-clear 'vector))) + (set! (-> s1-1 x) f30-0) + (set! (-> s1-1 y) f28-0) + (set! (-> s1-1 z) f26-0) + (set! (-> s1-1 w) 1.0) + (vector-reset! (-> s3-1 trans)) + (vector-matrix*! s1-1 s1-1 s3-1) + (vector-reset! (-> s2-1 trans)) + (matrix-transpose! s2-1 s2-1) + (vector-matrix*! s1-1 s1-1 s2-1) + (+! (-> s4-2 local-sphere x) (-> s1-1 x)) + (+! (-> s4-2 local-sphere y) (-> s1-1 y)) + (+! (-> s4-2 local-sphere z) (-> s1-1 z)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let ((s5-1 (collision-edit-get-prim arg0 (-> this current-prim)))) + (cond + (s5-1 + (show-maya-skeleton arg0 (-> s5-1 transform-index) #x45800000) + (let ((gp-1 (shl #x80ff 16))) + (let ((v1-117 (-> s5-1 prim-core prim-type))) + (cond + ((= v1-117 1) + (collision-editor-add-mesh-to-ccache (the-as collide-shape-prim-group s5-1) *collide-cache*) + (debug-draw *collide-cache*) + (let ((s4-3 (the-as object (-> *collide-cache* tris)))) + (countdown (s3-2 (-> *collide-cache* num-tris)) + (when (< (-> s5-1 prim-core world-sphere w) + (vector-vector-distance + (the-as vector (-> s5-1 prim-core)) + (the-as vector (-> (the-as collide-cache-tri s4-3) vertex)) + ) + ) + (add-debug-x + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> (the-as collide-cache-tri s4-3) vertex)) + (new 'static 'rgba :r #xff :g #xff :a #x80) + ) + (set! gp-1 (the-as int (the-as uint #x800000ff))) + ) + (when (< (-> s5-1 prim-core world-sphere w) + (vector-vector-distance (the-as vector (-> s5-1 prim-core)) (-> (the-as collide-cache-tri s4-3) vertex 1)) + ) + (add-debug-x + #t + (bucket-id debug-no-zbuf1) + (-> (the-as collide-cache-tri s4-3) vertex 1) + (new 'static 'rgba :r #xff :g #xff :a #x80) + ) + (set! gp-1 (the-as int (the-as uint #x800000ff))) + ) + (when (< (-> s5-1 prim-core world-sphere w) + (vector-vector-distance (the-as vector (-> s5-1 prim-core)) (-> (the-as collide-cache-tri s4-3) vertex 2)) + ) + (add-debug-x + #t + (bucket-id debug-no-zbuf1) + (-> (the-as collide-cache-tri s4-3) vertex 2) + (new 'static 'rgba :r #xff :g #xff :a #x80) + ) + (set! gp-1 (the-as int (the-as uint #x800000ff))) + ) + (set! s4-3 (&+ (the-as collide-cache-tri s4-3) 64)) + ) + ) + ) + ((= v1-117 -1) + ) + ((zero? v1-117) + ) + ) + ) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> s5-1 prim-core)) + (-> s5-1 prim-core world-sphere w) + (the-as rgba gp-1) + ) + ) + ) + (else + (show-maya-skeleton arg0 1000 #x45800000) + ) + ) + ) + 0 + (none) + ) + +;; definition for symbol *collision-edit-info*, type collision-edit-info +(define *collision-edit-info* (the-as collision-edit-info 0)) + +;; definition for symbol *collision-edit-info*, type collision-edit-info +(define *collision-edit-info* + (new 'static 'collision-edit-info :editing #t :current-func (collision-editor-func print-collision)) + ) + +;; failed to figure out what this is: +(defstate idle (collision-editor) + :virtual #t + :exit (behavior () + (set! *external-cam-mode* #f) + ) + :trans (behavior () + (let ((gp-0 *collision-edit-info*) + (s5-0 (method-of-type collision-edit-info draw-menu)) + (s4-0 (handle->process (-> self proc))) + ) + (s5-0 gp-0 (the-as process-drawable (if (type? s4-0 process-drawable) + s4-0 + ) + ) + ) + ) + ) + :code sleep-code + ) + +;; definition for function collision-editor-init-by-other +(defbehavior collision-editor-init-by-other collision-editor ((arg0 handle)) + (set! (-> self proc) arg0) + (go-virtual idle) + ) + +;; definition for function stop-collision-edit +;; WARN: Return type mismatch int vs none. +(defun stop-collision-edit () + (kill-by-type collision-editor-edited-proc *active-pool*) + (kill-by-type collision-editor *active-pool*) + 0 + (none) + ) + +;; definition for function collision-edit +(defun collision-edit ((arg0 process)) + (stop-collision-edit) + (when (not arg0) + (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 arg0))) + (process-spawn collision-editor gp-2 :name "collision-editor") + ) + ) diff --git a/test/decompiler/reference/jak3/engine/debug/debug-part_REF.gc b/test/decompiler/reference/jak3/engine/debug/debug-part_REF.gc new file mode 100644 index 0000000000..1b48b60548 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/debug/debug-part_REF.gc @@ -0,0 +1,1952 @@ +;;-*-Lisp-*- +(in-package goal) + +;; this file is debug only +(declare-file (debug)) + +;; failed to figure out what this is: +(defpart 537 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 64.0 64.0) + (:rotvel-z (degrees 0.3)) + (:fade-a -1.6) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-red-eco-strike-ground + :id 152 + :duration (seconds 0.035) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 538) (sp-item 539)) + ) + +;; failed to figure out what this is: +(defpart 538 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 24.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 32.0) + (:a 8.0 56.0) + (:vel-y (meters 0.13333334) (meters 0.16666667)) + (:scalevel-x (meters 0.013333334)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.4222223) + (:fade-a -0.35555556) + (:accel-y (meters 0.00008333333)) + (:friction 0.7) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.3)) + (:next-launcher 540) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 539 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 32.0) + (:y (meters 1)) + (:scale-x (meters 1) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:a 64.0 8.0) + (:vel-y (meters 0.3)) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-g -2.8444445) + (:fade-a -0.82222223) + (:friction 0.7) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.15)) + (:next-launcher 540) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-red-eco-spinkick + :id 153 + :duration (seconds 0.035) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 541) (sp-item 542) (sp-item 543 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 541 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 32.0) + (:a 8.0 56.0) + (:scalevel-x (meters 0.013333334)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.4222223) + (:fade-a -0.35555556) + (:accel-y (meters 0.00008333333)) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.3)) + (:next-launcher 540) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 540 + :init-specs ((:fade-r -0.7111111) (:fade-g 0.7111111) (:fade-b 0.35555556)) + ) + +;; failed to figure out what this is: +(defpart 542 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.66) + (:scale-x (meters 1) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:a 64.0 8.0) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-g -2.8444445) + (:fade-a -0.82222223) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.15)) + (:next-launcher 540) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.1)) + ) + ) + +;; failed to figure out what this is: +(defpart 543 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 96.0) + (:a 64.0) + (:fade-a -4.0) + (:accel-y (meters 0.00008333333)) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-eco-blue + :id 154 + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 550 :flags (sp3) :binding 544) + (sp-item 544 :fade-after (meters 40) :flags (sp2 sp3) :binding 545) + (sp-item 544 :fade-after (meters 60) :flags (sp2 sp3) :binding 545) + (sp-item 544 :fade-after (meters 80) :flags (sp2 sp3) :binding 545) + (sp-item 544 :fade-after (meters 100) :flags (sp2 sp3) :binding 545) + (sp-item 544 :fade-after (meters 130) :flags (sp2 sp3) :binding 545) + (sp-item 544 :flags (sp2 sp3) :binding 545) + (sp-item 545 :flags (sp2 sp3) :binding 546) + (sp-item 545 :flags (sp2 sp3) :binding 547) + (sp-item 545 :flags (sp2 sp3) :binding 548) + (sp-item 545 :flags (sp2 sp3) :binding 546) + (sp-item 545 :flags (sp2 sp3) :binding 547) + (sp-item 545 :flags (sp2 sp3) :binding 548) + (sp-item 546 :fade-after (meters 60) :flags (sp2) :binding 549) + (sp-item 547 :fade-after (meters 70) :flags (sp2) :binding 549) + (sp-item 548 :fade-after (meters 80) :flags (sp2) :binding 549) + (sp-item 546 :fade-after (meters 90) :flags (sp2) :binding 549) + (sp-item 547 :fade-after (meters 100) :flags (sp2) :binding 549) + (sp-item 548 :fade-after (meters 100) :flags (sp2) :binding 549) + (sp-item 549 :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 550 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 4)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + ) + ) + +;; failed to figure out what this is: +(defpart 544 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 6.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.3) (meters 0.15)) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0 32.0) + (:g 32.0 96.0) + (:b 128.0 128.0) + (:a 32.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.0148148155) (meters 0.0044444446)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:rotvel-z (degrees -0.1) 1 (degrees 0.2)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 551) + ) + ) + +;; failed to figure out what this is: +(defpart 551 + :init-specs ((:fade-a -0.21333334) (:timer (seconds 0.5))) + ) + +;; failed to figure out what this is: +(defpart 545 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.2) (meters 0.1)) + (:scale-x (meters 0.8) (meters 0.4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 96.0) + (:g 96.0) + (:b 192.0) + (:a 32.0 32.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.017777778) (meters 0.0148148155)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:rotvel-z (degrees 269.52002) (degrees 208.99998)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 552) + ) + ) + +;; failed to figure out what this is: +(defpart 552 + :init-specs ((:fade-a -0.16) (:timer (seconds 0.5))) + ) + +;; failed to figure out what this is: +(defpart 546 + :init-specs ((:texture (common-white common)) + (:num 0.0 1.0) + (:scale-x (meters 0.2) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.15) (meters 0.1)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 128.0 64.0) + (:fade-a -1.6) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +;; failed to figure out what this is: +(defpart 547 + :init-specs ((:texture (common-white common)) + (:num 0.0 1.0) + (:scale-x (meters 0.2) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.15) (meters 0.1)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 128.0 64.0) + (:fade-a -1.6) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +;; failed to figure out what this is: +(defpart 548 + :init-specs ((:texture (common-white common)) + (:num 0.0 1.0) + (:scale-x (meters 0.2) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.15) (meters 0.1)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 128.0 64.0) + (:fade-a -1.6) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +;; failed to figure out what this is: +(defpart 549 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.2 0.2) + (:scale-x (meters 1) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0) + (:b 192.0) + (:a 96.0 64.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: +(defpartgroup group-eco-blue-collect + :id 155 + :duration (seconds 0.5) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 558 :flags (sp3) :binding 554) + (sp-item 554 :flags (sp2 sp3) :binding 555) + (sp-item 554 :flags (sp2 sp3) :binding 556) + (sp-item 554 :flags (sp2 sp3) :binding 555) + (sp-item 554 :flags (sp2 sp3) :binding 556) + (sp-item 554 :flags (sp2 sp3) :binding 557) + (sp-item 555 :fade-after (meters 40) :flags (sp2)) + (sp-item 555 :fade-after (meters 40) :flags (sp2)) + (sp-item 555 :fade-after (meters 40) :flags (sp2)) + (sp-item 555 :fade-after (meters 40) :flags (sp2)) + (sp-item 556 :fade-after (meters 40) :flags (sp2)) + (sp-item 556 :fade-after (meters 40) :flags (sp2)) + (sp-item 556 :fade-after (meters 40) :flags (sp2)) + (sp-item 556 :fade-after (meters 40) :flags (sp2)) + (sp-item 557 :fade-after (meters 40) :flags (sp2)) + (sp-item 557 :fade-after (meters 40) :flags (sp2)) + (sp-item 557 :fade-after (meters 40) :flags (sp2)) + (sp-item 557 :fade-after (meters 40) :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 558 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 96.0) + (:g 96.0) + (:b 192.0) + (:a 64.0) + (:fade-a -3.2) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'part-tracker-track-root) + (:next-time (seconds 0.05)) + (:next-launcher 418) + ) + ) + +;; failed to figure out what this is: +(defpart 554 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 5.0) + (:y (meters -4) (meters 16)) + (:z (meters 0.08)) + (:scale-x (meters 0.75) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 127.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.017777778) 2.0 (meters 0.035555556)) + (:vel-y (meters 0)) + (:vel-z (meters 0.08)) + (:accel-z (meters -0.0053333333)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 555 + :init-specs ((:texture (common-white common)) + (:num 1.0) + (:scale-x (meters 0.2) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.15) (meters 0.1)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 128.0 64.0) + (:fade-a -1.4) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +;; failed to figure out what this is: +(defpart 556 + :init-specs ((:texture (common-white common)) + (:num 1.0) + (:scale-x (meters 0.2) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.15) (meters 0.1)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 128.0 64.0) + (:fade-a -1.4) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +;; failed to figure out what this is: +(defpart 557 + :init-specs ((:texture (common-white common)) + (:num 1.0) + (:scale-x (meters 0.2) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.15) (meters 0.1)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 128.0 64.0) + (:fade-a -1.4) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-vent-blue-active + :id 156 + :bounds (static-bspherem 0 5 0 5) + :parts ((sp-item 562 :fade-after (meters 140) :falloff-to (meters 140) :binding 559) + (sp-item 562 :fade-after (meters 140) :falloff-to (meters 140) :binding 560) + (sp-item 562 :fade-after (meters 140) :falloff-to (meters 140) :binding 561) + (sp-item 563) + (sp-item 564 :fade-after (meters 120) :falloff-to (meters 120)) + (sp-item 565 :fade-after (meters 120) :falloff-to (meters 120)) + (sp-item 566 :fade-after (meters 120) :falloff-to (meters 120)) + (sp-item 561 :fade-after (meters 30) :falloff-to (meters 30) :flags (sp2)) + (sp-item 560 :fade-after (meters 60) :falloff-to (meters 60) :flags (sp2)) + (sp-item 559 :fade-after (meters 80) :falloff-to (meters 80) :flags (sp2)) + (sp-item 561 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp2)) + (sp-item 560 :fade-after (meters 100) :falloff-to (meters 100) :flags (sp2)) + (sp-item 559 :fade-after (meters 110) :falloff-to (meters 110) :flags (sp2)) + (sp-item 561 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp2)) + (sp-item 560 :fade-after (meters 120) :falloff-to (meters 120) :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-vent-blue-inactive + :id 157 + :bounds (static-bspherem 0 5 0 5) + :parts ((sp-item 562 :fade-after (meters 100)) (sp-item 563)) + ) + +;; failed to figure out what this is: +(defpart 563 + :init-specs ((:texture (middot level-default-sprite)) + (:num 0.1 1.0) + (:x (meters -0.75) (meters 1.5)) + (:y (meters 0.5)) + (:z (meters -0.75) (meters 1.5)) + (:scale-x (meters 1.5) (meters 1.4)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0) + (:b 192.0) + (:a 64.0) + (:vel-y (meters 0.016666668) (meters 0.016666668)) + (:fade-a -0.2) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 562 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.05 0.1) + (:x (meters -0.75) (meters 1.5)) + (:y (meters 0.5)) + (:z (meters -0.75) (meters 1.5)) + (:scale-x (meters 1.5) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 192.0) + (:a 96.0) + (:vel-y (meters 0.01) (meters 0.01)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 559 + :init-specs ((:texture (common-white common)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 1.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 128.0) + (:fade-a -1.4) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +;; failed to figure out what this is: +(defpart 560 + :init-specs ((:texture (common-white common)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 1.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 128.0) + (:fade-a -1.4) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +;; failed to figure out what this is: +(defpart 561 + :init-specs ((:texture (common-white common)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 1.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 64.0) + (:g 64.0) + (:b 128.0) + (:a 128.0) + (:fade-a -1.4) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +;; failed to figure out what this is: +(defpart 564 + :init-specs ((:texture (common-white common)) + (:num 0.1 0.5) + (:x (meters -0.5) (meters 1)) + (:y (meters 0.5)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 1.5) (meters 1.5)) + (:rot-x 4) + (:rot-z (degrees 10) (degrees 160)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:fade-a -1.4) + (:timer (seconds 0.305)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +;; failed to figure out what this is: +(defpart 565 + :init-specs ((:texture (common-white common)) + (:num 0.2 0.4) + (:x (meters -0.5) (meters 1)) + (:y (meters 0.5)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 1.5) (meters 1.5)) + (:rot-x 4) + (:rot-z (degrees 10) (degrees 160)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:fade-a -1.4) + (:timer (seconds 0.305)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +;; failed to figure out what this is: +(defpart 566 + :init-specs ((:texture (common-white common)) + (:num 0.3 0.1) + (:x (meters -0.5) (meters 1)) + (:y (meters 0.5)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 1.5) (meters 1.5)) + (:rot-x 4) + (:rot-z (degrees 10) (degrees 160)) + (:scale-y (meters 0.2) (meters 0.1)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:fade-a -1.4) + (:timer (seconds 0.305)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.035)) + (:next-launcher 553) + ) + ) + +;; failed to figure out what this is: +(defpart 553 + :init-specs ((:r 64.0) (:g 64.0) (:fade-r -1.0) (:fade-g -1.0) (:fade-a -2.0)) + ) + +;; failed to figure out what this is: +(defpartgroup group-eco-red + :id 158 + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 571 :flags (sp3) :binding 567) + (sp-item 567 :flags (sp2 sp3) :binding 568) + (sp-item 567 :flags (sp2 sp3) :binding 568) + (sp-item 567 :flags (sp2 sp3) :binding 568) + (sp-item 567 :flags (sp2 sp3) :binding 568) + (sp-item 567 :flags (sp2 sp3) :binding 568) + (sp-item 567 :flags (sp2 sp3) :binding 568) + (sp-item 568 :flags (sp2 sp3) :binding 569) + (sp-item 568 :flags (sp2 sp3) :binding 569) + (sp-item 568 :flags (sp2 sp3) :binding 569) + (sp-item 569 :fade-after (meters 100) :flags (sp2 sp3) :binding 570) + (sp-item 569 :fade-after (meters 100) :flags (sp2 sp3) :binding 570) + (sp-item 569 :fade-after (meters 100) :flags (sp2 sp3) :binding 570) + (sp-item 570 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp2)) + (sp-item 570 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp2)) + (sp-item 570 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 571 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 4)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + ) + ) + +;; failed to figure out what this is: +(defpart 567 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 6.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.15) (meters 0.2)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 24.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.0148148155) (meters 0.0044444446)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:rotvel-z (degrees -0.1) 1 (degrees 0.2)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 572) + ) + ) + +;; failed to figure out what this is: +(defpart 572 + :init-specs ((:fade-a -0.16) (:timer (seconds 0.5))) + ) + +;; failed to figure out what this is: +(defpart 568 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.25) (meters 0.1)) + (:scale-x (meters 0.6) (meters 0.4)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 64.0 64.0) + (:a 32.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.017777778) (meters 0.0148148155)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 573) + ) + ) + +;; failed to figure out what this is: +(defpart 573 + :init-specs ((:fade-a -0.21333334) (:timer (seconds 0.5))) + ) + +;; failed to figure out what this is: +(defpart 569 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 16)) + (:y (meters 0) (meters 16)) + (:z (meters 0.07) (meters 0.03)) + (:scale-x (meters 0.6) (meters 0.6)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 64.0 64.0) + (:a 32.0) + (:vel-x (meters 0.11259259)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 573) + ) + ) + +;; failed to figure out what this is: +(defpart 570 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.1 1.0) + (:scale-x (meters 0.4) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 28.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 32.0 32.0) + (:scalevel-x (meters -0.00038095238)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.4) + (:fade-a -0.01904762) + (:accel-y (meters 0.000100000005) (meters 0.00015)) + (:timer (seconds 0.1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.8)) + (:next-launcher 574) + ) + ) + +;; failed to figure out what this is: +(defpart 574 + :init-specs ((:fade-g 0.0)) + ) + +;; failed to figure out what this is: +(defpartgroup group-eco-red-collect + :id 159 + :duration (seconds 0.5) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 577 :flags (sp3) :binding 575) + (sp-item 575 :flags (sp2 sp3) :binding 576) + (sp-item 575 :flags (sp2 sp3) :binding 576) + (sp-item 575 :flags (sp2 sp3) :binding 576) + (sp-item 575 :flags (sp2 sp3) :binding 576) + (sp-item 575 :flags (sp2 sp3) :binding 576) + (sp-item 576 :fade-after (meters 40) :flags (sp2)) + (sp-item 576 :fade-after (meters 40) :flags (sp2)) + (sp-item 576 :fade-after (meters 40) :flags (sp2)) + (sp-item 576 :fade-after (meters 40) :flags (sp2)) + (sp-item 576 :fade-after (meters 40) :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 577 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 128.0) + (:fade-a -3.2) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'part-tracker-track-root) + (:next-time (seconds 0.05)) + (:next-launcher 418) + ) + ) + +;; failed to figure out what this is: +(defpart 575 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 5.0) + (:y (meters -4) (meters 16)) + (:z (meters 0.08)) + (:scale-x (meters 0.3) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 127.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.017777778) 2.0 (meters 0.035555556)) + (:vel-y (meters 0)) + (:vel-z (meters 0.08)) + (:accel-z (meters -0.0053333333)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 576 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 28.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 64.0 32.0) + (:vel-y (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-x (meters -0.005555555)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:scalevel-y :copy scalevel-x) + (:fade-g -2.0) + (:fade-a -0.22857143) + (:accel-y (meters 0.000100000005) (meters 0.00015)) + (:timer (seconds 0.18)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.8)) + (:next-launcher 578) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-vent-red-active + :id 160 + :bounds (static-bspherem 0 3 0 5) + :parts ((sp-item 582 :fade-after (meters 30) :period (seconds 1.1) :length (seconds 0.017) :binding 579) + (sp-item 582 :fade-after (meters 60) :period (seconds 2.455) :length (seconds 0.017) :binding 579) + (sp-item 582 :fade-after (meters 90) :period (seconds 3.12) :length (seconds 0.017) :binding 579) + (sp-item 582 :fade-after (meters 130) :period (seconds 1.76) :length (seconds 0.017) :binding 579) + (sp-item 582 :fade-after (meters 170) :period (seconds 2.67) :length (seconds 0.017) :binding 579) + (sp-item 579 :flags (sp2 sp3) :binding 580) + (sp-item 579 :flags (sp2 sp3) :binding 580) + (sp-item 579 :flags (sp2 sp3) :binding 580) + (sp-item 579 :flags (sp2 sp3) :binding 580) + (sp-item 579 :flags (sp2 sp3) :binding 580) + (sp-item 579 :flags (sp2 sp3) :binding 580) + (sp-item 579 :flags (sp2 sp3) :binding 580) + (sp-item 579 :flags (sp2 sp3) :binding 580) + (sp-item 580 :flags (sp2 sp3) :binding 581) + (sp-item 580 :flags (sp2 sp3) :binding 581) + (sp-item 580 :flags (sp2 sp3) :binding 581) + (sp-item 580 :flags (sp2 sp3) :binding 581) + (sp-item 580 :flags (sp2 sp3) :binding 581) + (sp-item 580 :flags (sp2 sp3) :binding 581) + (sp-item 580 :flags (sp2 sp3) :binding 581) + (sp-item 580 :flags (sp2 sp3) :binding 581) + (sp-item 581 :fade-after (meters 90) :falloff-to (meters 50) :flags (sp2)) + (sp-item 581 :fade-after (meters 90) :falloff-to (meters 60) :flags (sp2)) + (sp-item 581 :fade-after (meters 90) :falloff-to (meters 70) :flags (sp2)) + (sp-item 581 :fade-after (meters 90) :falloff-to (meters 80) :flags (sp2)) + (sp-item 581 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp2)) + (sp-item 581 :fade-after (meters 90) :falloff-to (meters 100) :flags (sp2)) + (sp-item 581 :fade-after (meters 90) :falloff-to (meters 100) :flags (sp2)) + (sp-item 581 :fade-after (meters 90) :falloff-to (meters 100) :flags (sp2)) + (sp-item 583 :fade-after (meters 140) :falloff-to (meters 140)) + (sp-item 584) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-vent-red-inactive + :id 161 + :bounds (static-bspherem 0 3 0 5) + :parts ((sp-item 583 :fade-after (meters 140) :falloff-to (meters 140)) (sp-item 584)) + ) + +;; failed to figure out what this is: +(defpart 584 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.6 0.6) + (:x (meters -0.75) (meters 1.5)) + (:y (meters 0.5)) + (:z (meters -0.75) (meters 1.5)) + (:scale-x (meters 1.9) (meters 1.9)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 32.0) + (:vel-y (meters 0.016666668) (meters 0.016666668)) + (:rotvel-z (degrees -0.1) 1 (degrees 0.2)) + (:fade-a -0.10666667) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 583 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.1 0.3) + (:x (meters -0.5) (meters 1)) + (:y (meters 0.5)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 1.5) (meters 0.4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 64.0) + (:vel-y (meters 0.01) (meters 0.01)) + (:rotvel-z (degrees -0.1) (degrees 0.1)) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 582 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 1.5)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:a 1.0) + (:vel-y (meters 0.006666667) (meters 0.0033333334)) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 5)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 579 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.5)) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 128.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.017777778) (meters 0.017777778)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:rotvel-z (degrees -0.1) 1 (degrees 0.2)) + (:fade-a -0.28444445) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 580 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.25) (meters 0.1)) + (:scale-x (meters 1) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 64.0 64.0) + (:a 32.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.017777778) (meters 0.0148148155)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 581 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.1 1.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 28.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 64.0 32.0) + (:vel-y (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-x (meters -0.0023809525)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.4) + (:fade-a -0.07619048) + (:accel-y (meters 0.000100000005) (meters 0.00015)) + (:timer (seconds 0.1) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.8)) + (:next-launcher 578) + ) + ) + +;; failed to figure out what this is: +(defpart 578 + :init-specs ((:fade-g 0.0)) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-vent-yellow-active + :id 162 + :bounds (static-bspherem 0 3 0 5) + :parts ((sp-item 588 :fade-after (meters 40) :period (seconds 1.1) :length (seconds 0.017) :binding 585) + (sp-item 588 :fade-after (meters 60) :period (seconds 2.455) :length (seconds 0.017) :binding 585) + (sp-item 588 :fade-after (meters 80) :period (seconds 3.12) :length (seconds 0.017) :binding 585) + (sp-item 588 :fade-after (meters 100) :period (seconds 1.76) :length (seconds 0.017) :binding 585) + (sp-item 588 :fade-after (meters 130) :period (seconds 2.67) :length (seconds 0.017) :binding 585) + (sp-item 585 :flags (sp2 sp3) :binding 586) + (sp-item 585 :flags (sp2 sp3) :binding 586) + (sp-item 585 :flags (sp2 sp3) :binding 586) + (sp-item 585 :flags (sp2 sp3) :binding 586) + (sp-item 585 :flags (sp2 sp3) :binding 586) + (sp-item 585 :flags (sp2 sp3) :binding 586) + (sp-item 585 :flags (sp2 sp3) :binding 586) + (sp-item 585 :flags (sp2 sp3) :binding 586) + (sp-item 586 :flags (sp2 sp3) :binding 587) + (sp-item 586 :flags (sp2 sp3) :binding 587) + (sp-item 586 :flags (sp2 sp3) :binding 587) + (sp-item 586 :flags (sp2 sp3) :binding 587) + (sp-item 586 :flags (sp2 sp3) :binding 587) + (sp-item 586 :flags (sp2 sp3) :binding 587) + (sp-item 586 :flags (sp2 sp3) :binding 587) + (sp-item 586 :flags (sp2 sp3) :binding 587) + (sp-item 587 :fade-after (meters 90) :falloff-to (meters 60) :flags (sp2)) + (sp-item 587 :fade-after (meters 90) :falloff-to (meters 70) :flags (sp2)) + (sp-item 587 :fade-after (meters 90) :falloff-to (meters 80) :flags (sp2)) + (sp-item 587 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp2)) + (sp-item 587 :fade-after (meters 90) :falloff-to (meters 100) :flags (sp2)) + (sp-item 587 :fade-after (meters 90) :falloff-to (meters 100) :flags (sp2)) + (sp-item 587 :fade-after (meters 90) :falloff-to (meters 100) :flags (sp2)) + (sp-item 587 :fade-after (meters 90) :falloff-to (meters 100) :flags (sp2)) + (sp-item 589 :fade-after (meters 140) :falloff-to (meters 140)) + (sp-item 590) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-vent-yellow-inactive + :id 163 + :bounds (static-bspherem 0 3 0 5) + :parts ((sp-item 589 :fade-after (meters 140) :falloff-to (meters 140)) (sp-item 590)) + ) + +;; failed to figure out what this is: +(defpart 590 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.6 0.6) + (:x (meters -0.75) (meters 1.5)) + (:y (meters 0.5)) + (:z (meters -0.75) (meters 1.5)) + (:scale-x (meters 1.9) (meters 1.9)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 92.0 32.0) + (:g 32.0 92.0) + (:b 0.0) + (:a 32.0) + (:vel-y (meters 0.016666668) (meters 0.016666668)) + (:rotvel-z (degrees -0.1) 1 (degrees 0.2)) + (:fade-a -0.10666667) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 589 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.1 0.3) + (:x (meters -0.5) (meters 1)) + (:y (meters 0.5)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 1.5) (meters 0.4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 64.0) + (:vel-y (meters 0.01) (meters 0.01)) + (:rotvel-z (degrees -0.1) (degrees 0.1)) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 588 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 1.5)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:a 1.0) + (:vel-y (meters 0.013333334) (meters 0.013333334)) + (:timer (seconds 1.25)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 5)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 585 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 16)) + (:y (meters 0)) + (:z (meters 0.2) (meters 0.2)) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 64.0 64.0) + (:a 128.0) + (:vel-x (meters 0.10666667)) + (:rotvel-z (degrees -0.3) 1 (degrees 0.6)) + (:fade-a -0.34133333) + (:timer (seconds 1.25)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 586 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 16)) + (:y (meters 0) (meters 16)) + (:z (meters 0.2)) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 64.0 64.0) + (:a 128.0) + (:vel-x (meters 0.11259259)) + (:rotvel-z (degrees -0.3) 1 (degrees 0.6)) + (:fade-a -0.34133333) + (:timer (seconds 1.25)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 587 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.5 2.0) + (:y (meters -0.05)) + (:scale-x (meters 0.4) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 100.0 28.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 64.0 64.0) + (:vel-y (meters 0.0023333333) (meters 0.0016666667)) + (:scalevel-x (meters -0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.4) + (:fade-a -0.024242423) + (:accel-y (meters -0.000100000005) (meters -0.0003)) + (:friction 0.93) + (:timer (seconds 0.1) (seconds 0.697)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.3)) + (:next-launcher 591) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.05)) + ) + ) + +;; failed to figure out what this is: +(defpart 591 + :init-specs ((:fade-r 0.0)) + ) + +;; failed to figure out what this is: +(defpartgroup group-eco-yellow + :id 164 + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 596 :flags (sp3) :binding 592) + (sp-item 592 :flags (sp2 sp3) :binding 593) + (sp-item 592 :flags (sp2 sp3) :binding 593) + (sp-item 592 :flags (sp2 sp3) :binding 593) + (sp-item 592 :flags (sp2 sp3) :binding 593) + (sp-item 592 :flags (sp2 sp3) :binding 593) + (sp-item 592 :flags (sp2 sp3) :binding 593) + (sp-item 593 :flags (sp2 sp3) :binding 594) + (sp-item 593 :flags (sp2 sp3) :binding 594) + (sp-item 593 :flags (sp2 sp3) :binding 594) + (sp-item 593 :flags (sp2 sp3) :binding 594) + (sp-item 594 :fade-after (meters 100) :flags (sp2 sp3) :binding 595) + (sp-item 594 :fade-after (meters 100) :flags (sp2 sp3) :binding 595) + (sp-item 594 :fade-after (meters 100) :flags (sp2 sp3) :binding 595) + (sp-item 594 :fade-after (meters 100) :flags (sp2 sp3) :binding 595) + (sp-item 595 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp2)) + (sp-item 595 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp2)) + (sp-item 595 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp2)) + (sp-item 595 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 596 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 4)) + (:scale-x (meters 0.01)) + (:scale-y :copy scale-x) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + ) + ) + +;; failed to figure out what this is: +(defpart 592 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 5.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.15) (meters 0.2)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 64.0 192.0) + (:b 0.0) + (:a 16.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.0148148155) (meters 0.0044444446)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:rotvel-z (degrees -0.1) 1 (degrees 0.2)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 597) + ) + ) + +;; failed to figure out what this is: +(defpart 597 + :init-specs ((:fade-a -0.10666667) (:timer (seconds 0.5))) + ) + +;; failed to figure out what this is: +(defpart 593 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters 0) (meters 16)) + (:z (meters 0.75) (meters 0.1)) + (:scale-x (meters 0.4) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 64.0 64.0) + (:a 32.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters 0.017777778) (meters 0.0148148155)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 598) + ) + ) + +;; failed to figure out what this is: +(defpart 598 + :init-specs ((:fade-a -0.16) (:timer (seconds 0.5))) + ) + +;; failed to figure out what this is: +(defpart 594 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 16)) + (:y (meters 0) (meters 16)) + (:z (meters 0.12) (meters 0.03)) + (:scale-x (meters 0.4) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 64.0 64.0) + (:a 32.0) + (:vel-x (meters 0.11259259)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + (:func 'eco-fadeout) + (:next-time (seconds 0.035)) + (:next-launcher 598) + ) + ) + +;; failed to figure out what this is: +(defpart 595 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.1 1.0) + (:scale-x (meters 0.3) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 100.0 28.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 32.0 32.0) + (:scalevel-x (meters -0.0006190476)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.4) + (:fade-a -0.01904762) + (:accel-y (meters -0.000100000005) (meters -0.00015)) + (:timer (seconds 0.1) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.8)) + (:next-launcher 599) + ) + ) + +;; failed to figure out what this is: +(defpart 599 + :init-specs ((:fade-g 0.0)) + ) + +;; failed to figure out what this is: +(defpartgroup group-eco-yellow-collect + :id 165 + :duration (seconds 0.5) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 602 :flags (sp3) :binding 600) + (sp-item 600 :flags (sp2 sp3) :binding 601) + (sp-item 600 :flags (sp2 sp3) :binding 601) + (sp-item 600 :flags (sp2 sp3) :binding 601) + (sp-item 600 :flags (sp2 sp3) :binding 601) + (sp-item 600 :flags (sp2 sp3) :binding 601) + (sp-item 601 :fade-after (meters 40) :flags (sp2)) + (sp-item 601 :fade-after (meters 40) :flags (sp2)) + (sp-item 601 :fade-after (meters 40) :flags (sp2)) + (sp-item 601 :fade-after (meters 40) :flags (sp2)) + (sp-item 601 :fade-after (meters 40) :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 602 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 64.0 192.0) + (:b 0.0) + (:a 64.0) + (:fade-a -3.2) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'part-tracker-track-root) + (:next-time (seconds 0.05)) + (:next-launcher 418) + ) + ) + +;; failed to figure out what this is: +(defpart 600 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 5.0) + (:y (meters -4) (meters 16)) + (:z (meters 0.08)) + (:scale-x (meters 0.3) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 127.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.017777778) 2.0 (meters 0.035555556)) + (:vel-y (meters 0)) + (:vel-z (meters 0.08)) + (:accel-z (meters -0.0053333333)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 601 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.3) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 100.0 28.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 32.0 32.0) + (:scalevel-x (meters -0.0006190476)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.4) + (:fade-a -0.01904762) + (:accel-y (meters -0.000100000005) (meters -0.00015)) + (:timer (seconds 0.1) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.8)) + (:next-launcher 599) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-fuel-cell-starburst + :id 166 + :bounds (static-bspherem 0 0.5 0 1.5) + :parts ((sp-item 603 :fade-after (meters 35)) + (sp-item 604 :fade-after (meters 20)) + (sp-item 605 :flags (sp1 sp3)) + (sp-item 606 :flags (sp1 sp3)) + ) + ) + +;; failed to figure out what this is: +(defpart 603 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 0.5) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.8)) + (:r 0.0 1 255.0) + (:g 0.0 1 255.0) + (:b 0.0 1 255.0) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.15) (degrees 0.3)) + (:scalevel-y (meters 0.009765625)) + (:fade-a 0.35555556) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + (:next-time (seconds 0.3)) + (:next-launcher 607) + ) + ) + +;; failed to figure out what this is: +(defpart 607 + :init-specs ((:fade-a -0.53333336)) + ) + +;; failed to figure out what this is: +(defpart 604 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 0.06) + (:scale-x (meters 2) (meters 0.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2)) + (:r 0.0 1 255.0) + (:g 0.0 1 255.0) + (:b 0.0 1 255.0) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.15) (degrees 0.3)) + (:fade-a 0.32) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + (:next-time (seconds 0.25)) + (:next-launcher 607) + ) + ) + +;; failed to figure out what this is: +(defpart 605 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3.5)) + (:rot-z (degrees 0)) + (:scale-y (meters 3)) + (:r 192.0) + (:g 192.0) + (:b 0.0 128.0) + (:a 64.0) + (:rotvel-z (degrees -0.4)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + ) + ) + +;; failed to figure out what this is: +(defpart 606 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-z (degrees 0)) + (:scale-y (meters 3.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:rotvel-z (degrees 0.3)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root-prim) + ) + ) + +;; definition for function sparticle-track-root-money +;; WARN: Return type mismatch int vs none. +(defun sparticle-track-root-money ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((v1-1 (-> arg1 key proc))) + (when (!= (-> v1-1 type) hud-money) + (let ((v1-3 (-> v1-1 root trans))) + (set! (-> arg2 x) (-> v1-3 x)) + (set! (-> arg2 y) (+ 2048.0 (-> v1-3 y))) + (set! (-> arg2 z) (-> v1-3 z)) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 608 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 0.5) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1) (meters 0.8)) + (:r 192.0) + (:g 192.0) + (:b 0.0 128.0) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.15) (degrees 0.3)) + (:scalevel-y (meters 0.009765625)) + (:fade-a 0.35555556) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.3)) + (:next-launcher 609) + ) + ) + +;; failed to figure out what this is: +(defpart 609 + :init-specs ((:fade-a -0.53333336)) + ) + +;; failed to figure out what this is: +(defpart 610 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 0.06) + (:scale-x (meters 2) (meters 0.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.2)) + (:r 192.0) + (:g 192.0) + (:b 0.0 128.0) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.15) (degrees 0.3)) + (:fade-a 0.32) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.25)) + (:next-launcher 609) + ) + ) + +;; failed to figure out what this is: +(defpart 611 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5)) + (:rot-z (degrees 0)) + (:scale-y (meters 2)) + (:r 192.0) + (:g 192.0) + (:b 0.0 128.0) + (:a 32.0) + (:rotvel-z (degrees -0.4)) + (:timer (seconds 12)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root-money) + ) + ) + +;; failed to figure out what this is: +(defpart 612 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3)) + (:rot-z (degrees 0)) + (:scale-y (meters 2.5)) + (:r 192.0) + (:g 192.0) + (:b 0.0 128.0) + (:a 32.0) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 12)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root-money) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-money-starburst :id 167 :bounds (static-bspherem 0 0.5 0 1.5) :parts ((sp-item 613))) + +;; failed to figure out what this is: +(defpartgroup group-buzzer-effect :id 168 :bounds (static-bspherem 0 0 0 1) :parts ((sp-item 249))) + +;; failed to figure out what this is: +(defpartgroup group-blue-collect + :id 169 + :duration (seconds 0.017) + :linger-duration (seconds 4) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 614) (sp-item 615) (sp-item 616)) + ) + +;; failed to figure out what this is: +(defpart 614 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 16.0) + (:scale-x (meters 6) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5) (meters 1)) + (:r 32.0 32.0) + (:g 60.0 20.0) + (:b 128.0 64.0) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y (meters 0.009765625)) + (:fade-a 2.1333334) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.017) (seconds 0.065)) + (:next-launcher 455) + ) + ) + +;; failed to figure out what this is: +(defpart 615 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 6.0) + (:scale-x (meters 8) (meters 2)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5)) + (:r 32.0 32.0) + (:g 60.0 20.0) + (:b 128.0 64.0) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:fade-a 2.1333334) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.017) (seconds 0.065)) + (:next-launcher 455) + ) + ) + +;; failed to figure out what this is: +(defpart 616 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g 60.0 20.0) + (:b 128.0 64.0) + (:a 128.0) + (:scalevel-x (meters 0.1)) + (:rotvel-z (degrees -0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.2)) + (:next-launcher 458) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-yellow-collect + :id 170 + :duration (seconds 0.017) + :linger-duration (seconds 4) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 617) (sp-item 618) (sp-item 619)) + ) + +;; failed to figure out what this is: +(defpart 617 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 16.0) + (:scale-x (meters 6) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5) (meters 1)) + (:r 128.0 128.0) + (:g 64.0 192.0) + (:b 0.0) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y (meters 0.009765625)) + (:fade-a 2.1333334) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.017) (seconds 0.065)) + (:next-launcher 455) + ) + ) + +;; failed to figure out what this is: +(defpart 618 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 6.0) + (:scale-x (meters 8) (meters 2)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5)) + (:r 128.0 128.0) + (:g 64.0 192.0) + (:b 0.0) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:fade-a 2.1333334) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.017) (seconds 0.065)) + (:next-launcher 455) + ) + ) + +;; failed to figure out what this is: +(defpart 619 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 64.0 192.0) + (:b 0.0) + (:a 128.0) + (:scalevel-x (meters 0.1)) + (:rotvel-z (degrees -0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.2)) + (:next-launcher 458) + ) + ) + +;; failed to figure out what this is: +(defpart 458 + :init-specs ((:scalevel-x (meters -0.025)) (:scalevel-y :copy scalevel-x)) + ) + +;; failed to figure out what this is: +(defpartgroup group-red-collect + :id 171 + :duration (seconds 0.017) + :linger-duration (seconds 4) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 620) (sp-item 621) (sp-item 622)) + ) + +;; failed to figure out what this is: +(defpart 620 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 16.0) + (:scale-x (meters 6) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5) (meters 1)) + (:r 128.0 128.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y (meters 0.009765625)) + (:fade-a 2.1333334) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.017) (seconds 0.065)) + (:next-launcher 455) + ) + ) + +;; failed to figure out what this is: +(defpart 621 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 6.0) + (:scale-x (meters 8) (meters 2)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.5)) + (:r 128.0 128.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 0.0) + (:scalevel-x (meters 0.009765625)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:fade-a 2.1333334) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.017) (seconds 0.065)) + (:next-launcher 455) + ) + ) + +;; failed to figure out what this is: +(defpart 622 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 128.0) + (:scalevel-x (meters 0.1)) + (:rotvel-z (degrees -0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:next-time (seconds 0.2)) + (:next-launcher 458) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/debug/debug_REF.gc b/test/decompiler/reference/jak3/engine/debug/debug_REF.gc index ca95dae97d..d8f7848fdd 100644 --- a/test/decompiler/reference/jak3/engine/debug/debug_REF.gc +++ b/test/decompiler/reference/jak3/engine/debug/debug_REF.gc @@ -1448,7 +1448,7 @@ (set! (-> gp-0 0 y) (* (cos (-> arg0 stick0-dir)) (-> arg0 stick0-speed))) (dotimes (s5-1 32) (with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) debug-buf)) - (bucket-id bucket583) + (bucket-id debug) ) (draw-sprite2d-xy s3-0 @@ -1742,7 +1742,7 @@ ) (let ((s5-0 (the-as adgif-shader (-> arg1 base)))) (adgif-shader<-texture-simple! s5-0 a1-1) - (set! (-> s5-0 alpha) (new 'static 'gs-alpha :b #x1 :d #x1)) + (set! (-> s5-0 alpha) (new 'static 'gs-miptbp :tbp1 #x44)) (set! (-> s5-0 tex0 tfx) 0) (set! (-> s5-0 tex1 mmag) 0) (set! (-> s5-0 clamp) (new 'static 'gs-clamp)) @@ -1945,7 +1945,3 @@ ) ) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/debug/default-menu_REF.gc b/test/decompiler/reference/jak3/engine/debug/default-menu_REF.gc new file mode 100644 index 0000000000..636e583c5f --- /dev/null +++ b/test/decompiler/reference/jak3/engine/debug/default-menu_REF.gc @@ -0,0 +1,7154 @@ +;;-*-Lisp-*- +(in-package goal) + +;; this file is debug only +(declare-file (debug)) + +;; definition for symbol *debug-menu-context*, type debug-menu-context +(define *debug-menu-context* (new 'debug 'debug-menu-context)) + +;; definition for symbol *dm-cam-mode-interpolation*, type int +(define *dm-cam-mode-interpolation* 0) + +;; definition for function dm-cam-mode-func +(defun dm-cam-mode-func ((arg0 (state camera-slave)) (arg1 debug-menu-msg)) + (if (and (= arg1 (debug-menu-msg press)) arg0) + (set-setting-by-param *setting-control* 'mode-name (-> arg0 name) 0 0) + ) + (if *camera* + (send-event *camera* 'query-state arg0) + (not arg0) + ) + ) + +;; definition for function dm-cam-mode-default +(defun dm-cam-mode-default ((arg0 object) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (remove-setting-by-arg0 *setting-control* 'mode-name) + ) + (not (get-setting *setting-control* 'mode-name)) + ) + +;; definition for function dm-cam-settings-default +(defun dm-cam-settings-default ((arg0 object) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (remove-setting-by-arg0 *setting-control* 'fov) + (remove-setting-by-arg0 *setting-control* 'slave-options) + ) + (and (not (get-setting *setting-control* 'fov)) (not (get-setting *setting-control* 'slave-options))) + ) + +;; definition for function dm-cam-settings-func +(defun dm-cam-settings-func ((arg0 int) (arg1 debug-menu-msg)) + (when (and (= arg1 (debug-menu-msg press)) *camera*) + (cond + ((zero? arg0) + (send-event *camera* 'toggle-slave-option (cam-slave-options BUTT_CAM)) + ) + ((= arg0 1) + (send-event *camera* 'toggle-slave-option (cam-slave-options SAME_SIDE)) + ) + ((= arg0 2) + (send-event *camera* 'toggle-slave-option (cam-slave-options MOVE_SPHERICAL)) + ) + ((= arg0 3) + (send-event *camera* 'toggle-slave-option (cam-slave-options DRAG)) + ) + ((= arg0 4) + (send-event *camera* 'toggle-slave-option (cam-slave-options ALLOW_Z_ROT)) + ) + ((= arg0 6) + (set-setting-by-param *setting-control* 'slave-options 'clear 0 16) + ) + ((= arg0 7) + (send-event *camera* 'toggle-slave-option (cam-slave-options FIND_HIDDEN_TARGET)) + ) + ((= arg0 8) + (send-event *camera* 'toggle-slave-option (cam-slave-options COLLIDE)) + ) + ((= arg0 9) + (send-event *camera* 'toggle-slave-option (cam-slave-options LINE_OF_SIGHT)) + ) + ((= arg0 10) + (send-event *camera* 'toggle-slave-option (cam-slave-options NO_ROTATE)) + ) + ((= arg0 11) + (send-event *camera* 'toggle-slave-option (cam-slave-options STICKY_ANGLE)) + ) + ) + ) + (cond + (*camera* + (cond + ((zero? arg0) + (logtest? (-> *camera* slave-options) (cam-slave-options-u32 BUTT_CAM)) + ) + ((= arg0 1) + (logtest? (-> *camera* slave-options) (cam-slave-options-u32 SAME_SIDE)) + ) + ((= arg0 2) + (logtest? (-> *camera* slave-options) (cam-slave-options-u32 MOVE_SPHERICAL)) + ) + ((= arg0 3) + (logtest? (-> *camera* slave-options) (cam-slave-options-u32 DRAG)) + ) + ((= arg0 4) + (logtest? (-> *camera* slave-options) (cam-slave-options-u32 ALLOW_Z_ROT)) + ) + ((= arg0 6) + (not (get-setting *setting-control* 'slave-options)) + ) + ((= arg0 7) + (logtest? (-> *camera* slave-options) (cam-slave-options-u32 FIND_HIDDEN_TARGET)) + ) + ((= arg0 8) + (logtest? (-> *camera* slave-options) (cam-slave-options-u32 COLLIDE)) + ) + ((= arg0 9) + (logtest? (-> *camera* slave-options) (cam-slave-options-u32 LINE_OF_SIGHT)) + ) + ((= arg0 10) + (logtest? (-> *camera* slave-options) (cam-slave-options-u32 NO_ROTATE)) + ) + ((= arg0 11) + (logtest? (-> *camera* slave-options) (cam-slave-options-u32 STICKY_ANGLE)) + ) + (else + #f + ) + ) + ) + (else + #f + ) + ) + ) + +;; definition for function dm-cam-settings-func-int +(defun dm-cam-settings-func-int ((arg0 int) (arg1 debug-menu-msg) (arg2 int) (arg3 int)) + (when (and (= arg1 (debug-menu-msg press)) *camera*) + (if (= (/ arg0 8) 5) + (set! *dm-cam-mode-interpolation* arg2) + ) + ) + (cond + (*camera* + (if (= (/ arg0 8) 5) + *dm-cam-mode-interpolation* + arg3 + ) + ) + (else + arg3 + ) + ) + ) + +;; definition for function dm-cam-externalize +(defun dm-cam-externalize ((arg0 symbol) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (cond + ((= arg0 'reset) + (if (!= *external-cam-mode* 'locked) + (external-cam-reset!) + ) + ) + ((= arg0 'allow-z) + (set! *external-cam-options* (logxor *external-cam-options* (external-cam-option allow-z))) + ) + ((= *external-cam-mode* arg0) + (set! *external-cam-mode* #f) + ) + (else + (if (not *external-cam-mode*) + (external-cam-reset!) + ) + (set! *external-cam-mode* arg0) + ) + ) + ) + (if (= arg0 'allow-z) + (logtest? *external-cam-options* (external-cam-option allow-z)) + (= *external-cam-mode* arg0) + ) + ) + +;; definition for function dm-cam-setting-float +(defun dm-cam-setting-float ((arg0 float) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (when (= arg1 (debug-menu-msg press)) + (let ((v1-2 arg0)) + (when (= (the-as int v1-2) 'fov) + (if (not (get-setting *setting-control* 'fov)) + (set! arg2 64.0) + ) + (set-setting-by-param *setting-control* 'fov #f (* 182.04445 arg2) 0) + (if *camera-combiner* + (set! (-> *camera-combiner* fov) (* 182.04445 arg2)) + ) + (if (and *camera* (-> *camera* slave)) + (set! (-> *camera* slave 0 fov) (* 182.04445 arg2)) + ) + ) + ) + ) + (cond + ((= (the-as int arg0) 'fov) + (cond + ((get-setting *setting-control* 'fov) + (empty) + arg2 + ) + (*math-camera* + (* 0.005493164 (-> *math-camera* fov)) + ) + (else + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + +;; definition for function dm-cam-render-float +(defun dm-cam-render-float ((arg0 int) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (when (= arg1 (debug-menu-msg press)) + (when (zero? (/ arg0 8)) + (when *math-camera* + (set! (-> *math-camera* fov) (* 182.04445 arg2)) + (update-math-camera + *math-camera* + (-> *setting-control* user-current video-mode) + (-> *setting-control* user-current aspect-ratio) + (-> *math-camera* fov) + ) + ) + ) + ) + (cond + ((zero? (/ arg0 8)) + (cond + (*math-camera* + (* 0.005493164 (-> *math-camera* fov)) + ) + (else + (empty) + arg3 + ) + ) + ) + (else + (empty) + arg3 + ) + ) + ) + +;; definition for function dm-subdiv-float +(defun dm-subdiv-float ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (when (= arg1 (debug-menu-msg press)) + (case arg0 + (('close) + (when (and *math-camera* *subdivide-settings*) + (dotimes (v1-6 12) + (set! (-> *subdivide-settings* close v1-6) (* 4096.0 arg2)) + ) + ) + ) + (('far) + (when (and *math-camera* *subdivide-settings*) + (dotimes (v1-13 12) + (set! (-> *subdivide-settings* far v1-13) (* 4096.0 arg2)) + ) + ) + ) + ) + ) + (case arg0 + (('close) + (if (and *math-camera* *subdivide-settings*) + (* 0.00024414062 (-> *subdivide-settings* close 0)) + arg3 + ) + ) + (('far) + (if (and *math-camera* *subdivide-settings*) + (* 0.00024414062 (-> *subdivide-settings* far 0)) + arg3 + ) + ) + (else + arg3 + ) + ) + ) + +;; definition for function dm-subdiv-int +(defun dm-subdiv-int ((arg0 symbol) (arg1 debug-menu-msg) (arg2 int) (arg3 int)) + (when (= arg1 (debug-menu-msg press)) + (case arg0 + (('anim-speed) + (if *anim-tester* + (set! (-> *anim-tester* 0 speed) arg2) + ) + ) + ) + ) + (case arg0 + (('anim-speed) + (if *anim-tester* + (-> *anim-tester* 0 speed) + arg3 + ) + ) + (else + arg3 + ) + ) + ) + +;; definition for function dm-select-race-path +(defun dm-select-race-path ((arg0 object) (arg1 debug-menu-msg) (arg2 int)) + (if (= arg1 (debug-menu-msg press)) + (set! *select-race-path* arg2) + ) + *select-race-path* + ) + +;; definition for function dm-setting-language +(defun dm-setting-language ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *setting-control* user-default language) (the-as language-enum (/ arg0 8))) + ) + (= (-> *setting-control* user-default language) (/ arg0 8)) + ) + +;; definition for function dm-setting-subtitle-language +(defun dm-setting-subtitle-language ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *setting-control* user-default subtitle-language) (the-as language-enum (/ arg0 8))) + ) + (= (-> *setting-control* user-default subtitle-language) (/ arg0 8)) + ) + +;; definition for function dm-setting-audio-language +(defun dm-setting-audio-language ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *setting-control* user-default audio-language) (the-as language-enum (/ arg0 8))) + ) + (= (-> *setting-control* user-default audio-language) (/ arg0 8)) + ) + +;; definition for function dm-setting-stereo-mode +(defun dm-setting-stereo-mode ((arg0 object) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *setting-control* user-default stereo-mode) (the-as int (/ (the-as int arg0) 8))) + ) + (= (-> *setting-control* user-default stereo-mode) (/ (the-as int arg0) 8)) + ) + +;; definition for function dm-current-continue +(defun dm-current-continue ((arg0 string) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (start 'play (get-continue-by-name *game-info* arg0)) + ) + (string= (-> (get-current-continue-forced *game-info*) name) arg0) + ) + +;; definition for function dm-subdiv-draw-func +(defun dm-subdiv-draw-func ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *subdivide-draw-mode* (the-as subdivide-setting (/ arg0 8))) + ) + (= (/ arg0 8) *subdivide-draw-mode*) + ) + +;; definition for function dm-scissor-subdiv-draw-func +(defun dm-scissor-subdiv-draw-func ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *subdivide-scissor-draw-mode* (the-as subdivide-setting (/ arg0 8))) + ) + (= (/ arg0 8) *subdivide-scissor-draw-mode*) + ) + +;; definition for function dm-foreground-subdiv-draw-func +(defun dm-foreground-subdiv-draw-func ((arg0 int) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (set! *subdivide-foreground-draw-mode* (the-as subdivide-setting (/ arg0 8))) + (let ((v1-3 *generic-consts*) + (a1-1 (/ arg0 8)) + ) + (cond + ((zero? a1-1) + (set! (-> v1-3 base-strgif str-prim) + (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> v1-3 base-strgif fan-prim) + (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ((= a1-1 1) + (set! (-> v1-3 base-strgif str-prim) + (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> v1-3 base-strgif fan-prim) + (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ((= a1-1 2) + (set! (-> v1-3 base-strgif str-prim) + (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> v1-3 base-strgif fan-prim) + (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ((= a1-1 3) + (set! (-> v1-3 base-strgif str-prim) + (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + (set! (-> v1-3 base-strgif fan-prim) + (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ) + ) + ) + (= (/ arg0 8) *subdivide-foreground-draw-mode*) + ) + +;; definition for function dm-col-rend-on-func +(defun dm-col-rend-on-func ((arg0 object) (arg1 debug-menu-msg)) + (let ((v1-0 *col-rend*)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> v1-0 draw?) (not (-> v1-0 draw?))) + ) + (-> v1-0 draw?) + ) + ) + +;; definition for function dm-col-rend-outline-func +(defun dm-col-rend-outline-func ((arg0 object) (arg1 debug-menu-msg)) + (let ((v1-0 *col-rend*)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> v1-0 outline?) (not (-> v1-0 outline?))) + ) + (-> v1-0 outline?) + ) + ) + +;; definition for function dm-col-rend-back-face-func +(defun dm-col-rend-back-face-func ((arg0 object) (arg1 debug-menu-msg)) + (let ((v1-0 *col-rend*)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> v1-0 show-back-faces?) (not (-> v1-0 show-back-faces?))) + ) + (-> v1-0 show-back-faces?) + ) + ) + +;; definition for function dm-col-rend-normals-func +(defun dm-col-rend-normals-func ((arg0 object) (arg1 debug-menu-msg)) + (let ((v1-0 *col-rend*)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> v1-0 show-normals?) (not (-> v1-0 show-normals?))) + ) + (-> v1-0 show-normals?) + ) + ) + +;; definition for function dm-col-rend-ghost-hidden-func +(defun dm-col-rend-ghost-hidden-func ((arg0 object) (arg1 debug-menu-msg)) + (let ((v1-0 *col-rend*)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> v1-0 ghost-hidden?) (not (-> v1-0 ghost-hidden?))) + ) + (-> v1-0 ghost-hidden?) + ) + ) + +;; definition for function dm-col-rend-track-func +(defun dm-col-rend-track-func ((arg0 int) (arg1 debug-menu-msg)) + (let ((v1-0 *col-rend*)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> v1-0 track) (the-as uint (/ arg0 8))) + ) + (= (/ arg0 8) (-> v1-0 track)) + ) + ) + +;; definition for function dm-col-rend-show-only-toggle-func +(defun dm-col-rend-show-only-toggle-func ((arg0 uint) (arg1 debug-menu-msg)) + (let ((v1-0 *col-rend*)) + (when (= arg1 (debug-menu-msg press)) + (logxor! (-> v1-0 show-only) arg0) + (logand! (-> v1-0 show-only) -57) + ) + (logtest? (-> v1-0 show-only) arg0) + ) + ) + +;; definition for function dm-col-rend-show-only-set-func +(defun dm-col-rend-show-only-set-func ((arg0 uint) (arg1 debug-menu-msg)) + (let ((v1-0 *col-rend*)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> v1-0 show-only) arg0) + ) + (= (-> v1-0 show-only) arg0) + ) + ) + +;; definition for function dm-col-rend-cspec-toggle +(defun dm-col-rend-cspec-toggle ((arg0 uint) (arg1 debug-menu-msg)) + (let ((v1-0 *col-rend*)) + (if (= arg1 (debug-menu-msg press)) + (logxor! (-> v1-0 cspec) (the-as uint arg0)) + ) + (logtest? (-> v1-0 cspec) arg0) + ) + ) + +;; definition for function dm-col-rend-size +(defun dm-col-rend-size ((arg0 object) (arg1 debug-menu-msg) (arg2 float)) + (let ((v1-0 *col-rend*)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> v1-0 bbox-radius) (* 2048.0 arg2)) + ) + (* 0.00024414062 (* 2.0 (-> v1-0 bbox-radius))) + ) + ) + +;; definition for function dm-col-rend-cam-dist +(defun dm-col-rend-cam-dist ((arg0 object) (arg1 debug-menu-msg) (arg2 float)) + (let ((v1-0 *col-rend*)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> v1-0 camera-to-bbox-dist) (* 4096.0 arg2)) + ) + (* 0.00024414062 (-> v1-0 camera-to-bbox-dist)) + ) + ) + +;; definition for function dm-ocean-height-func +(defun dm-ocean-height-func ((arg0 ocean-height-hack) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (set! *ocean-height-hack* (the-as ocean-height-hack (/ (the-as int arg0) 8))) + (let* ((v1-3 (/ (the-as int arg0) 8)) + (f0-0 (cond + ((= v1-3 2) + -16384000.0 + ) + ((= v1-3 3) + -216498.17 + ) + ((= v1-3 4) + -265650.2 + ) + ((= v1-3 5) + -314802.2 + ) + ((= v1-3 6) + -368050.2 + ) + (else + 0.0 + ) + ) + ) + ) + (set-height! *ocean-map-sewer* f0-0) + ) + ) + (= (/ (the-as int arg0) 8) *ocean-height-hack*) + ) + +;; definition for function dm-ocean-subdiv-draw-func +(defun dm-ocean-subdiv-draw-func ((arg0 object) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *subdivide-ocean-draw-mode* (the-as subdivide-setting (/ (the-as int arg0) 8))) + ) + (= (/ (the-as int arg0) 8) *subdivide-ocean-draw-mode*) + ) + +;; definition for function dm-time-of-day-func +(defun dm-time-of-day-func ((arg0 int) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (cond + ((zero? (/ arg0 8)) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 7) + (set! (-> *time-of-day-context* mode) (the-as time-of-day-palette-id (/ arg0 8))) + ) + ((= (/ arg0 8) 1) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 10) + (set! (-> *time-of-day-context* mode) (the-as time-of-day-palette-id (/ arg0 8))) + ) + ((= (/ arg0 8) 2) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 12) + (set! (-> *time-of-day-context* mode) (the-as time-of-day-palette-id (/ arg0 8))) + ) + ((= (/ arg0 8) 3) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 14) + (set! (-> *time-of-day-context* mode) (the-as time-of-day-palette-id (/ arg0 8))) + ) + ((= (/ arg0 8) 4) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 18) + (set! (-> *time-of-day-context* mode) (the-as time-of-day-palette-id (/ arg0 8))) + ) + ((= (/ arg0 8) 5) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 19) + (set! (-> *time-of-day-context* mode) (the-as time-of-day-palette-id (/ arg0 8))) + ) + ((= (/ arg0 8) 6) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 23) + (set! (-> *time-of-day-context* mode) (the-as time-of-day-palette-id (/ arg0 8))) + ) + ((= (/ arg0 8) 7) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 4) + (set! (-> *time-of-day-context* mode) (the-as time-of-day-palette-id (/ arg0 8))) + ) + ((= (/ arg0 8) 8) + (send-event + (ppointer->process *time-of-day*) + 'dest-clock-ratio-set + (if *time-of-day-fast* + #x42700000 + #x3f800000 + ) + (seconds 2) + ) + ) + (else + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + (set! (-> *time-of-day-context* mode) + (logand (logxor (-> *time-of-day-context* mode) (the-as uint (/ arg0 8))) + (time-of-day-palette-id palette-0 palette-1 palette-2 palette-3 palette-4 palette-5 palette-6 palette-7) + ) + ) + ) + ) + (send-event (ppointer->process *time-of-day*) 'change 'minutes 0) + (send-event (ppointer->process *time-of-day*) 'change 'seconds 0) + (send-event (ppointer->process *time-of-day*) 'change 'frames 0) + (set! *teleport-count* 1) + ) + (cond + ((< (/ arg0 8) 9) + (= (/ arg0 8) (-> *time-of-day-context* mode)) + ) + ((< (/ arg0 8) 8) + #f + ) + (else + (logtest? (-> *time-of-day-context* mode) (/ arg0 8)) + ) + ) + ) + +;; definition for function dm-time-of-day-func2 +(defun dm-time-of-day-func2 ((arg0 symbol) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (set! (-> arg0 value) (not (-> arg0 value))) + (if (nonzero? (send-event (ppointer->process *time-of-day*) 'ratio)) + (send-event + (ppointer->process *time-of-day*) + 'dest-clock-ratio-set + (if *time-of-day-fast* + #x42700000 + #x3f800000 + ) + (seconds 2) + ) + ) + ) + (-> arg0 value) + ) + +;; definition for function dm-time-of-day-palette-func +(defun dm-time-of-day-palette-func ((arg0 int) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (set! (-> *time-of-day-context* overide-palette) (the-as time-of-day-palette-id (/ arg0 8))) + (cond + ((zero? (/ arg0 8)) + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id palette-0)) + ) + ((= (/ arg0 8) 1) + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id palette-1)) + ) + ((= (/ arg0 8) 2) + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id palette-2)) + ) + ((= (/ arg0 8) 3) + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id palette-3)) + ) + ((= (/ arg0 8) 4) + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id palette-4)) + ) + ((= (/ arg0 8) 5) + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id palette-5)) + ) + ((= (/ arg0 8) 6) + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id palette-6)) + ) + ((= (/ arg0 8) 7) + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id palette-7)) + ) + ) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + ) + (cond + ((zero? (/ arg0 8)) + (= (-> *time-of-day-context* mode) 16) + ) + ((= (/ arg0 8) 1) + (= (-> *time-of-day-context* mode) 32) + ) + ((= (/ arg0 8) 2) + (= (-> *time-of-day-context* mode) 64) + ) + ((= (/ arg0 8) 3) + (= (-> *time-of-day-context* mode) 128) + ) + ((= (/ arg0 8) 4) + (= (-> *time-of-day-context* mode) 256) + ) + ((= (/ arg0 8) 5) + (= (-> *time-of-day-context* mode) 512) + ) + ((= (/ arg0 8) 6) + (= (-> *time-of-day-context* mode) 1024) + ) + ((= (/ arg0 8) 7) + (= (-> *time-of-day-context* mode) 2048) + ) + ) + ) + +;; definition for function dm-boolean-toggle-pick-func +(defun dm-boolean-toggle-pick-func ((arg0 symbol) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> arg0 value) (not (-> arg0 value))) + ) + (-> arg0 value) + ) + +;; definition for function dm-time-of-day-pick-func +(defun dm-time-of-day-pick-func ((arg0 symbol) (arg1 debug-menu-msg)) + (time-of-day-setup (= arg1 (debug-menu-msg press))) + ) + +;; definition for function dm-stats-memory-func +(defun dm-stats-memory-func ((arg0 int) (arg1 debug-menu-msg)) + (let ((v1-0 (/ arg0 8))) + (if (= arg1 (debug-menu-msg press)) + (set! *stats-memory-level-index* v1-0) + ) + (= *stats-memory-level-index* v1-0) + ) + ) + +;; definition for function dm-actor-marks-pick-func +(defun dm-actor-marks-pick-func ((arg0 symbol) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *display-actor-marks* arg0) + ) + (= *display-actor-marks* arg0) + ) + +;; definition for function dm-debug-actor-lod-dist +;; INFO: Used lq/sq +;; WARN: Return type mismatch number vs object. +(defun dm-debug-actor-lod-dist ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (local-vars (sv-16 res-tag)) + (when (= arg1 (debug-menu-msg press)) + (when (and *debug-actor* (>= (-> (the-as process-drawable *debug-actor*) draw lod-set max-lod) (/ arg0 8))) + (let ((a0-4 (&+ (-> (the-as process-drawable *debug-actor*) draw jgeo extra data-base) (* (/ arg0 8) 4)))) + (mem-set32! a0-4 1 (the-as int (* 4096.0 arg2))) + ) + (reset-actors 'debug) + ) + ) + (cond + (*debug-actor* + (let ((f30-0 0.00024414062)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-21 (res-lump-data + (-> (the-as process-drawable *debug-actor*) draw jgeo extra) + 'lod-dist + (pointer float) + :tag-ptr (& sv-16) + ) + ) + ) + (* f30-0 (if (and v1-21 (< (/ arg0 8) (the-as int (-> sv-16 elt-count)))) + (-> v1-21 (/ arg0 8)) + 0.0 + ) + ) + ) + ) + ) + (else + 0 + ) + ) + ) + +;; definition for function dm-select-race-pick-func +(defun dm-select-race-pick-func ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *select-race* (the-as race-selection (/ arg0 8))) + ) + (= (/ arg0 8) *select-race*) + ) + +;; definition for function dm-compact-actor-pick-func +(defun dm-compact-actor-pick-func ((arg0 symbol) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *compact-actors* arg0) + ) + (= *compact-actors* arg0) + ) + +;; definition for function dm-actor-vis-pick-func +(defun dm-actor-vis-pick-func ((arg0 symbol) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *display-actor-vis* arg0) + ) + (= *display-actor-vis* arg0) + ) + +;; definition for function dm-game-mode-pick-func +(defun dm-game-mode-pick-func ((arg0 symbol) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *game-info* mode) arg0) + ) + (= (-> *game-info* mode) arg0) + ) + +;; definition for function dm-game-feature-toggle-pick-func +(defun dm-game-feature-toggle-pick-func ((arg0 int) (arg1 debug-menu-msg)) + (let ((v1-1 (ash 1 (/ arg0 8)))) + (when (= arg1 (debug-menu-msg press)) + (logxor! (-> *game-info* features) (the-as uint v1-1)) + (set! (-> *game-info* debug-features) + (logior (logclear (-> *game-info* debug-features) v1-1) (logand (-> *game-info* features) v1-1)) + ) + (if (logtest? (game-feature + gun-red-1 + gun-red-2 + gun-red-3 + gun-yellow-1 + gun-yellow-2 + gun-yellow-3 + gun-blue-1 + gun-blue-2 + gun-blue-3 + gun-dark-1 + gun-dark-2 + gun-dark-3 + ) + (-> *game-info* features) + ) + (logior! (-> *game-info* features) (game-feature gun)) + (logclear! (-> *game-info* features) (game-feature gun)) + ) + (if (logtest? (game-feature + gun-red-1 + gun-red-2 + gun-red-3 + gun-yellow-1 + gun-yellow-2 + gun-yellow-3 + gun-blue-1 + gun-blue-2 + gun-blue-3 + gun-dark-1 + gun-dark-2 + gun-dark-3 + ) + (-> *game-info* debug-features) + ) + (logior! (-> *game-info* debug-features) (game-feature gun)) + (logclear! (-> *game-info* debug-features) (game-feature gun)) + ) + ) + (logtest? (-> *game-info* features) v1-1) + ) + ) + +;; definition for function dm-game-vehicle-toggle-pick-func +(defun dm-game-vehicle-toggle-pick-func ((arg0 int) (arg1 debug-menu-msg)) + (let ((v1-1 (ash 1 (/ arg0 8)))) + (when (= arg1 (debug-menu-msg press)) + (logxor! (-> *game-info* vehicles) (the-as uint v1-1)) + (set! (-> *game-info* debug-vehicles) + (logior (logclear (-> *game-info* debug-vehicles) v1-1) (logand (-> *game-info* vehicles) v1-1)) + ) + ) + (logtest? (-> *game-info* vehicles) v1-1) + ) + ) + +;; definition for function dm-game-secret-toggle-pick-func +(defun dm-game-secret-toggle-pick-func ((arg0 int) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (logxor! (-> *game-info* secrets) (the-as uint (ash 1 (/ arg0 8)))) + (update-task-masks 'event) + ) + (logtest? (-> *game-info* secrets) (ash 1 (/ arg0 8))) + ) + +;; definition for function display-scene-control-toggle-pick-func +(defun display-scene-control-toggle-pick-func ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *display-scene-control* (logxor *display-scene-control* (the-as uint arg0))) + ) + (logtest? *display-scene-control* arg0) + ) + +;; definition for function display-scene-control-set-pick-func +(defun display-scene-control-set-pick-func ((arg0 scene-controls) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *display-scene-control* arg0) + ) + (= *display-scene-control* arg0) + ) + +;; definition for function display-bot-marks-toggle-pick-func +(defun display-bot-marks-toggle-pick-func ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *display-bot-marks* (logxor *display-bot-marks* (the-as uint arg0))) + ) + (logtest? *display-bot-marks* arg0) + ) + +;; definition for function display-bot-marks-set-pick-func +(defun display-bot-marks-set-pick-func ((arg0 bot-marks-controls) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *display-bot-marks* arg0) + ) + (= *display-bot-marks* arg0) + ) + +;; definition for function display-race-marks-toggle-pick-func +(defun display-race-marks-toggle-pick-func ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *display-race-marks* (logxor *display-race-marks* (the-as uint arg0))) + ) + (logtest? *display-race-marks* arg0) + ) + +;; definition for function display-race-marks-set-pick-func +(defun display-race-marks-set-pick-func ((arg0 race-marks-controls) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *display-race-marks* arg0) + ) + (= *display-race-marks* arg0) + ) + +;; definition for function dm-vu1-user-toggle-pick-func +(defun dm-vu1-user-toggle-pick-func ((arg0 vu1-renderer-mask) (arg1 debug-menu-msg)) + (let ((v1-1 (ash 1 (/ (the-as int arg0) 8)))) + (if (= arg1 (debug-menu-msg press)) + (logxor! (-> *display* vu1-enable-user-menu) (the-as uint v1-1)) + ) + (logtest? (-> *display* vu1-enable-user-menu) v1-1) + ) + ) + +;; definition for function dm-vu1-user-all-pick-func +(defun dm-vu1-user-all-pick-func ((arg0 symbol) (arg1 debug-menu-msg)) + (let ((v1-1 (the-as uint #x17fffffff8))) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *display* vu1-enable-user-menu) (the-as vu1-renderer-mask v1-1)) + ) + (= (-> *display* vu1-enable-user-menu) v1-1) + ) + ) + +;; definition for function dm-vu1-user-none-pick-func +(defun dm-vu1-user-none-pick-func ((arg0 symbol) (arg1 debug-menu-msg)) + (let ((v1-0 0)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *display* vu1-enable-user-menu) (the-as vu1-renderer-mask v1-0)) + ) + (= (-> *display* vu1-enable-user-menu) v1-0) + ) + ) + +;; definition for function dm-texture-user-toggle-pick-func +(defun dm-texture-user-toggle-pick-func ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (logxor! (-> *texture-pool* texture-enable-user-menu) (the-as uint arg0)) + ) + (logtest? (-> *texture-pool* texture-enable-user-menu) arg0) + ) + +;; definition for function dm-texture-user-set-pick-func +(defun dm-texture-user-set-pick-func ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *texture-pool* texture-enable-user-menu) (the-as texture-enable-mask arg0)) + ) + (= (-> *texture-pool* texture-enable-user-menu) arg0) + ) + +;; definition for function dm-strip-lines-toggle-pick-func +(defun dm-strip-lines-toggle-pick-func ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *display-strip-lines* (logxor *display-strip-lines* (the-as uint (/ arg0 8)))) + ) + (logtest? *display-strip-lines* (/ arg0 8)) + ) + +;; definition for function dm-strip-lines-set-pick-func +(defun dm-strip-lines-set-pick-func ((arg0 strip-lines-controls) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *display-strip-lines* (the-as strip-lines-controls (/ (the-as int arg0) 8))) + ) + (= *display-strip-lines* (/ (the-as int arg0) 8)) + ) + +;; definition for function dm-edit-instance-toggle-pick-func +(defun dm-edit-instance-toggle-pick-func ((arg0 int) (arg1 debug-menu-msg)) + (dotimes (s4-0 (-> *level* length)) + (let ((a1-1 (-> *level* level s4-0))) + (when (= (-> a1-1 status) 'active) + (let ((v1-4 (find-instance-by-name-level *edit-instance* a1-1))) + (when v1-4 + (if (= arg1 (debug-menu-msg press)) + (logxor! (-> v1-4 flags) (the-as uint arg0)) + ) + (logtest? (-> v1-4 flags) arg0) + ) + ) + ) + ) + ) + #f + ) + +;; definition for function all-texture-tweak-adjust +;; WARN: Return type mismatch int vs none. +(defun all-texture-tweak-adjust ((arg0 texture-page-dir) (arg1 float)) + (dotimes (s4-0 (-> arg0 length)) + (let ((s3-0 (-> arg0 entries s4-0 page))) + (dotimes (s2-0 (min (-> s3-0 length) (-> arg0 entries s4-0 length))) + (when (-> arg0 entries s4-0 link) + (let ((v1-12 (+ (the-as uint (-> arg0 entries s4-0 link)) (* s2-0 4))) + (s1-0 (-> arg0 entries s4-0 page data s2-0)) + ) + (+! (-> s1-0 uv-dist) arg1) + (+ v1-12 0) + (let ((s0-0 (the-as object (* (-> (dynamic-array-field-access v1-12 next PLACEHOLDER) shader) 16)))) + (while (nonzero? (the-as uint s0-0)) + (adgif-shader-update! (the-as adgif-shader s0-0) s1-0) + (&-> (the-as adgif-shader s0-0) reg-2) + (set! s0-0 (* (-> (the-as adgif-shader s0-0) next shader) 16)) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function dm-float-field-tie-rvanish-func +(defun dm-float-field-tie-rvanish-func ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (let ((f30-0 arg3)) + (dotimes (s3-0 (-> *level* length)) + (let ((a1-1 (-> *level* level s3-0))) + (when (= (-> a1-1 status) 'active) + (let ((s2-0 (find-instance-by-name-level (the-as string (-> arg0 value)) a1-1))) + (when s2-0 + (case (prototype-bucket-type s2-0) + ((instance-tie) + (let* ((f0-0 (-> (the-as prototype-bucket-tie s2-0) tie-vanish-far)) + (f1-2 (- f0-0 (/ 128.0 (-> (the-as prototype-bucket-tie s2-0) tie-rvanish)))) + ) + (let ((f2-1 (-> (the-as prototype-bucket-tie s2-0) dists w))) + (when (= arg1 (debug-menu-msg press)) + (logior! (-> (the-as prototype-bucket-tie s2-0) flags) (prototype-flags vanish)) + (set! f1-2 (fmax (fmin (* 4096.0 arg2) f0-0) (+ 4096.0 f2-1))) + (let ((f0-1 (fmax f0-0 (+ 4096.0 f1-2)))) + (set! (-> (the-as prototype-bucket-tie s2-0) tie-rvanish) (/ 128.0 (- f0-1 f1-2))) + (set! (-> (the-as prototype-bucket-tie s2-0) tie-vanish-far) f0-1) + ) + ) + ) + (set! f30-0 (* 0.00024414062 f1-2)) + ) + ) + ) + ) + ) + ) + ) + ) + f30-0 + ) + ) + +;; definition for function dm-float-field-tie-vanish-far-func +(defun dm-float-field-tie-vanish-far-func ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (let ((f30-0 arg3)) + (dotimes (s3-0 (-> *level* length)) + (let ((a1-1 (-> *level* level s3-0))) + (when (= (-> a1-1 status) 'active) + (let ((s2-0 (find-instance-by-name-level (the-as string (-> arg0 value)) a1-1))) + (when s2-0 + (case (prototype-bucket-type s2-0) + ((instance-tie) + (let ((f0-0 (-> (the-as prototype-bucket-tie s2-0) tie-vanish-far))) + (let ((f2-1 (- f0-0 (/ 128.0 (-> (the-as prototype-bucket-tie s2-0) tie-rvanish)))) + (f1-2 (-> (the-as prototype-bucket-tie s2-0) dists w)) + ) + (when (= arg1 (debug-menu-msg press)) + (logior! (-> s2-0 flags) (prototype-flags vanish)) + (set! f0-0 (fmax (* 4096.0 arg2) (+ 4096.0 f2-1))) + (let ((f1-4 (fmax (fmin f2-1 f0-0) (+ 4096.0 f1-2)))) + (set! (-> (the-as prototype-bucket-tie s2-0) tie-rvanish) (/ 128.0 (- f0-0 f1-4))) + ) + (set! (-> (the-as prototype-bucket-tie s2-0) tie-vanish-far) f0-0) + ) + ) + (set! f30-0 (* 0.00024414062 f0-0)) + ) + ) + ) + ) + ) + ) + ) + ) + f30-0 + ) + ) + +;; definition for function dm-bug-report-output-pick-func +(defun dm-bug-report-output-pick-func ((arg0 symbol) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! *bug-report-output-mode* arg0) + ) + (= *bug-report-output-mode* arg0) + ) + +;; definition for function dm-bug-report-report-pick-func +;; WARN: Return type mismatch int vs none. +(defun dm-bug-report-report-pick-func ((arg0 symbol) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (bug-report-display arg0) + ) + 0 + (none) + ) + +;; definition for function debug-menu-node arg0 name) (-> arg1 name)) + ) + +;; definition for function dm-shader-pick-func +(defun dm-shader-pick-func ((arg0 texture-id) (arg1 debug-menu-msg)) + (if (and (= arg1 (debug-menu-msg press)) + *texture-page-dir* + (-> *texture-page-dir* entries (-> arg0 page) page) + (-> *texture-page-dir* entries (-> arg0 page) link) + (nonzero? (-> *texture-page-dir* entries (-> arg0 page) link next (-> arg0 index))) + ) + (set! *edit-shader* arg0) + ) + (and (nonzero? *edit-shader*) (= arg0 *edit-shader*)) + ) + +;; definition for symbol *shader-pick-menu*, type debug-menu +(define *shader-pick-menu* (the-as debug-menu #f)) + +;; definition for function build-shader-list +;; WARN: Return type mismatch pair vs none. +(defun build-shader-list () + (debug-menu-remove-all-items *shader-pick-menu*) + (when *texture-page-dir* + (dotimes (gp-0 (-> *texture-page-dir* length)) + (let ((s5-0 (-> *texture-page-dir* entries gp-0 page)) + (s4-0 (-> *texture-page-dir* entries gp-0 link)) + ) + (when (and s5-0 s4-0) + (dotimes (s3-0 (-> s5-0 length)) + (when (and (-> s5-0 data s3-0) (nonzero? (-> s4-0 next s3-0))) + (let ((a1-1 (new + 'debug + 'debug-menu-item-flag + (-> s5-0 data s3-0 name) + (logior (shr (shl s3-0 52) 44) (shr (shl gp-0 52) 32)) + dm-shader-pick-func + ) + ) + ) + (debug-menu-append-item *shader-pick-menu* a1-1) + ) + ) + ) + ) + ) + ) + ) + (set! (-> *shader-pick-menu* items) (sort (-> *shader-pick-menu* items) debug-menu-node *level* length)) + (let ((a1-1 (-> *level* level s5-0))) + (when (= (-> a1-1 status) 'active) + (if (find-instance-by-name-level arg0 a1-1) + (set! *edit-instance* arg0) + ) + ) + ) + ) + ) + (the-as basic (and *edit-instance* (string= arg0 *edit-instance*))) + ) + +;; definition for function dm-enable-instance-func +(defun dm-enable-instance-func ((arg0 string) (arg1 debug-menu-msg)) + (let ((s3-0 #f)) + (dotimes (s4-0 (-> *level* length)) + (let ((a1-1 (-> *level* level s4-0))) + (when (= (-> a1-1 status) 'active) + (let ((v1-4 (find-instance-by-name-level arg0 a1-1))) + (when v1-4 + (if (= arg1 (debug-menu-msg press)) + (logxor! (-> v1-4 flags) (prototype-flags disable)) + ) + (set! s3-0 (not (logtest? (-> v1-4 flags) (prototype-flags disable)))) + ) + ) + ) + ) + ) + s3-0 + ) + ) + +;; definition for symbol *instance-shrub-menu*, type debug-menu +(define *instance-shrub-menu* (the-as debug-menu #f)) + +;; definition for symbol *instance-tie-menu*, type debug-menu +(define *instance-tie-menu* (the-as debug-menu #f)) + +;; definition for symbol *enable-instance-shrub-menu*, type debug-menu +(define *enable-instance-shrub-menu* (the-as debug-menu #f)) + +;; definition for symbol *enable-instance-tie-menu*, type debug-menu +(define *enable-instance-tie-menu* (the-as debug-menu #f)) + +;; definition for function build-instance-list +;; WARN: Return type mismatch int vs none. +(defun build-instance-list ((arg0 object)) + (debug-menu-remove-all-items *instance-shrub-menu*) + (debug-menu-remove-all-items *instance-tie-menu*) + (debug-menu-remove-all-items *enable-instance-shrub-menu*) + (debug-menu-remove-all-items *enable-instance-tie-menu*) + (set! *display-instance-info* #f) + (dotimes (gp-0 (-> *level* length)) + (let ((v1-3 (-> *level* level gp-0))) + (when (= (-> v1-3 status) 'active) + (let ((s5-0 (-> v1-3 bsp drawable-trees))) + (dotimes (s4-0 (-> s5-0 length)) + (let ((v1-7 (-> s5-0 trees s4-0))) + (case (-> v1-7 type) + ((drawable-tree-instance-shrub) + (let ((s3-0 (-> (the-as drawable-tree-instance-shrub v1-7) info prototype-inline-array-shrub))) + (dotimes (s2-0 (-> s3-0 length)) + (let ((a1-4 + (new 'global 'debug-menu-item-flag (-> s3-0 data s2-0 name) (-> s3-0 data s2-0 name) dm-instance-pick-func) + ) + ) + (debug-menu-append-item *instance-shrub-menu* a1-4) + ) + (let ((a1-6 + (new 'debug 'debug-menu-item-flag (-> s3-0 data s2-0 name) (-> s3-0 data s2-0 name) dm-enable-instance-func) + ) + ) + (set! (-> a1-6 is-on) #t) + (debug-menu-append-item *enable-instance-shrub-menu* a1-6) + ) + ) + ) + ) + ((drawable-tree-instance-tie) + (let ((s3-1 (-> (the-as drawable-tree-instance-tie v1-7) prototypes prototype-array-tie))) + (dotimes (s2-1 (-> s3-1 length)) + (let ((a1-9 + (new + 'debug + 'debug-menu-item-flag + (-> s3-1 array-data s2-1 name) + (-> s3-1 array-data s2-1 name) + dm-instance-pick-func + ) + ) + ) + (debug-menu-append-item *instance-tie-menu* a1-9) + ) + (let ((a1-11 + (new + 'debug + 'debug-menu-item-flag + (-> s3-1 array-data s2-1 name) + (-> s3-1 array-data s2-1 name) + dm-enable-instance-func + ) + ) + ) + (set! (-> a1-11 is-on) #t) + (debug-menu-append-item *enable-instance-tie-menu* a1-11) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (set! (-> *instance-shrub-menu* items) + (sort + (-> *instance-shrub-menu* items) + (lambda ((arg0 debug-menu) (arg1 debug-menu)) (string<=? (-> arg0 name) (-> arg1 name))) + ) + ) + (set! (-> *instance-tie-menu* items) + (sort + (-> *instance-tie-menu* items) + (lambda ((arg0 debug-menu) (arg1 debug-menu)) (string<=? (-> arg0 name) (-> arg1 name))) + ) + ) + (set! (-> *enable-instance-shrub-menu* items) + (sort + (-> *enable-instance-shrub-menu* items) + (lambda ((arg0 debug-menu) (arg1 debug-menu)) (string<=? (-> arg0 name) (-> arg1 name))) + ) + ) + (set! (-> *enable-instance-tie-menu* items) + (sort + (-> *enable-instance-tie-menu* items) + (lambda ((arg0 debug-menu) (arg1 debug-menu)) (string<=? (-> arg0 name) (-> arg1 name))) + ) + ) + 0 + (none) + ) + +;; definition for function dm-scene-load-pick-func +(defun dm-scene-load-pick-func ((arg0 pair) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (let ((s5-0 *display-profile*)) + (play-clean #f) + (set! *display-profile* s5-0) + ) + (set! *debug-menu-scene-play* #t) + (let ((s5-1 (car (cdr arg0)))) + (process-spawn scene-player :init scene-player-init s5-1 #t (car arg0) :name "scene-player") + ) + (debug-menu-context-send-msg *debug-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation)) + (set-master-mode 'game) + ) + #f + ) + +;; definition for function debug-create-cam-restore +;; WARN: Return type mismatch object vs none. +(defun debug-create-cam-restore () + (cond + (*math-camera* + (format #t "(defun-debug cam-restore ()~%") + (format #t " ;;this function is a hack, don't use it as an example~%") + (format #t " (let ((pos (new 'stack 'vector))~%") + (format #t " (rot (new 'stack 'matrix)))~%") + (format #t " (set! (-> pos x) ~12F)~%" (-> *math-camera* trans x)) + (format #t " (set! (-> pos y) ~12F)~%" (-> *math-camera* trans y)) + (format #t " (set! (-> pos z) ~12F)~%" (-> *math-camera* trans z)) + (format #t " (set! (-> pos w) 1.0)~%") + (format #t " (set! (-> rot data 0) ~12F)~%" (-> *math-camera* inv-camera-rot rvec x)) + (format #t " (set! (-> rot data 1) ~12F)~%" (-> *math-camera* inv-camera-rot rvec y)) + (format #t " (set! (-> rot data 2) ~12F)~%" (-> *math-camera* inv-camera-rot rvec z)) + (format #t " (set! (-> rot data 3) ~12F)~%" (-> *math-camera* inv-camera-rot rvec w)) + (format #t " (set! (-> rot data 4) ~12F)~%" (-> *math-camera* inv-camera-rot uvec x)) + (format #t " (set! (-> rot data 5) ~12F)~%" (-> *math-camera* inv-camera-rot uvec y)) + (format #t " (set! (-> rot data 6) ~12F)~%" (-> *math-camera* inv-camera-rot uvec z)) + (format #t " (set! (-> rot data 7) ~12F)~%" (-> *math-camera* inv-camera-rot uvec w)) + (format #t " (set! (-> rot data 8) ~12F)~%" (-> *math-camera* inv-camera-rot fvec x)) + (format #t " (set! (-> rot data 9) ~12F)~%" (-> *math-camera* inv-camera-rot fvec y)) + (format #t " (set! (-> rot data 10) ~12F)~%" (-> *math-camera* inv-camera-rot fvec z)) + (format #t " (set! (-> rot data 11) ~12F)~%" (-> *math-camera* inv-camera-rot fvec w)) + (format #t " (set! (-> rot data 12) ~12F)~%" 0) + (format #t " (set! (-> rot data 13) ~12F)~%" 0) + (format #t " (set! (-> rot data 14) ~12F)~%" 0) + (format #t " (set! (-> rot data 15) ~12F)~%" #x3f800000) + (let ((gp-0 (new 'stack-no-clear 'euler-angles))) + (matrix->eul gp-0 (-> *math-camera* inv-camera-rot) 21) + (format #t " ;; euler angles (xyz order degrees) x ~R y ~R z ~R~%" (-> gp-0 x) (-> gp-0 y) (-> gp-0 z)) + (format + #t + " ;; MAYA euler angles (xyz order degrees) x ~R y ~R z ~R~%" + (-> gp-0 x) + (- 32768.0 (-> gp-0 y)) + (-> gp-0 z) + ) + ) + (format #t " (debug-set-camera-pos-rot! pos rot)~%") + (format #t " (send-event *camera* 'set-fov (deg ~f))~%" (* 0.005493164 (-> *math-camera* fov))) + (format #t " (clear *camera-old-level*)~%") + (format #t " (format *camera-old-level* \"~A\")~%" (-> *level* level0 name)) + (let ((t9-31 format) + (a0-31 #t) + (a1-31 " (set! *camera-old-cpu* ~D)~%") + (a2-25 (-> *display* frames (-> *display* last-screen) profile-array data 0)) + ) + (t9-31 a0-31 a1-31 (- (-> a2-25 data 0 end-time) (-> a2-25 data 0 start-time))) + ) + (let ((t9-32 format) + (a0-32 #t) + (a1-32 " (set! *camera-old-vu* ~D)~%") + (a2-29 (-> *display* frames (-> *display* on-screen) profile-array data 1)) + ) + (t9-32 a0-32 a1-32 (- (-> a2-29 data 0 end-time) (-> a2-29 data 0 start-time))) + ) + (compute-memory-usage! (the-as level (-> *level* level)) #f) + (format #t " (set! *camera-old-tfrag-bytes* ~D)~%" (+ (-> *level* level0 mem-usage-block data 1 total) + (-> *level* level0 mem-usage-block data 2 total) + (-> *level* level0 mem-usage-block data 3 total) + (-> *level* level0 mem-usage-block data 4 total) + (-> *level* level0 mem-usage-block data 5 total) + (-> *level* level0 mem-usage-block data 6 total) + (-> *level* level0 mem-usage-block data 7 total) + (-> *level* level0 mem-usage-block data 8 total) + ) + ) + (format #t " (clear *camera-old-stat-string-tfrag*)~%") + (format #t " (clear *camera-old-stat-string-tfrag-near*)~%") + (format #t " (clear *camera-old-stat-string-total*)~%") + (when *stats-poly* + (format #t " (format *camera-old-stat-string-tfrag* \"~S\")~%" *stat-string-tfrag*) + (format #t " (format *camera-old-stat-string-tfrag-near* \"~S\")~%" *stat-string-tfrag-scissor*) + (format #t " (format *camera-old-stat-string-total* \"~S\")~%" *stat-string-total*) + ) + (format #t " (set! *display-camera-old-stats* #t)~%") + (format #t " )~%") + (format #t " )~%") + ) + (else + (format #t "camera save failed~%") + ) + ) + (none) + ) + +;; definition for function debug-menu-make-camera-mode-menu +(defun debug-menu-make-camera-mode-menu ((arg0 debug-menu) (arg1 debug-menu)) + (new 'debug 'debug-menu-item-submenu "Camera" arg0) + (let ((a1-3 (new 'debug 'debug-menu-item-submenu "Mode" arg1))) + (debug-menu-append-item arg0 a1-3) + ) + (let ((a1-5 (new 'debug 'debug-menu-item-flag "Default" #f dm-cam-mode-default))) + (debug-menu-append-item arg1 a1-5) + ) + (let ((a1-7 (new 'debug 'debug-menu-item-flag "Free-floating" cam-free-floating dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-7) + ) + (let ((a1-9 (new 'debug 'debug-menu-item-flag "Fixed" cam-fixed dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-9) + ) + (let ((a1-11 (new 'debug 'debug-menu-item-flag "No Trans" cam-no-trans dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-11) + ) + (let ((a1-13 (new 'debug 'debug-menu-item-flag "Pov" cam-pov dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-13) + ) + (let ((a1-15 (new 'debug 'debug-menu-item-flag "Pov180" cam-pov180 dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-15) + ) + (let ((a1-17 (new 'debug 'debug-menu-item-flag "Pov-track" cam-pov-track dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-17) + ) + (let ((a1-19 (new 'debug 'debug-menu-item-flag "Decel" cam-decel dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-19) + ) + (let ((a1-21 (new 'debug 'debug-menu-item-flag "Endless fall" cam-endlessfall dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-21) + ) + (let ((a1-23 (new 'debug 'debug-menu-item-flag "Eye" cam-eye dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-23) + ) + (let ((a1-25 (new 'debug 'debug-menu-item-flag "Stick" cam-stick dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-25) + ) + (let ((a1-27 (new 'debug 'debug-menu-item-flag "String" cam-string dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-27) + ) + (let ((a1-29 (new 'debug 'debug-menu-item-flag "Standoff" cam-standoff dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-29) + ) + (let ((a1-31 (new 'debug 'debug-menu-item-flag "Circular" cam-circular dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-31) + ) + (let ((a1-33 (new 'debug 'debug-menu-item-flag "Look At" cam-lookat dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-33) + ) + (let ((a1-35 (new 'debug 'debug-menu-item-flag "Center of world" cam-point-watch dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-35) + ) + (let ((a1-37 (new 'debug 'debug-menu-item-flag "Spline" cam-spline dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-37) + ) + (let ((a1-39 (new 'debug 'debug-menu-item-flag "Tube Sled" cam-tube-sled dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-39) + ) + (let ((a1-41 (new 'debug 'debug-menu-item-flag "Bike" cam-bike dm-cam-mode-func))) + (debug-menu-append-item arg1 a1-41) + ) + ) + +;; definition for function debug-menu-make-camera-menu +(defun debug-menu-make-camera-menu ((arg0 debug-menu-context)) + (let* ((gp-0 (new 'debug 'debug-menu arg0 "Camera menu")) + (s5-0 (new 'debug 'debug-menu-item-submenu "Camera" gp-0)) + ) + (let ((a1-3 (new 'debug 'debug-menu arg0 "Camera mode menu"))) + (debug-menu-make-camera-mode-menu gp-0 a1-3) + ) + (let ((s3-0 (new 'debug 'debug-menu arg0 "Camera externalize menu"))) + (let ((a1-6 (new 'debug 'debug-menu-item-submenu "External" s3-0))) + (debug-menu-append-item gp-0 a1-6) + ) + (let ((a1-8 (new 'debug 'debug-menu-item-flag "CPad 0" 'pad-0 dm-cam-externalize))) + (debug-menu-append-item s3-0 a1-8) + ) + (let ((a1-10 (new 'debug 'debug-menu-item-flag "CPad 1" 'pad-1 dm-cam-externalize))) + (debug-menu-append-item s3-0 a1-10) + ) + (let ((a1-12 (new 'debug 'debug-menu-item-flag "Lock" 'locked dm-cam-externalize))) + (debug-menu-append-item s3-0 a1-12) + ) + (let ((a1-14 (new 'debug 'debug-menu-item-flag "Reset" 'reset dm-cam-externalize))) + (debug-menu-append-item s3-0 a1-14) + ) + (let ((a1-16 (new 'debug 'debug-menu-item-flag "Allow z rot" 'allow-z dm-cam-externalize))) + (debug-menu-append-item s3-0 a1-16) + ) + (let ((s2-0 (new 'debug 'debug-menu-item-var "Fov" 0 80))) + (debug-menu-item-var-make-float s2-0 dm-cam-render-float 1.0 #t 15.0 180.0 1) + (debug-menu-append-item s3-0 s2-0) + ) + (let ((a1-21 (new 'debug 'debug-menu-item-flag "turbo free" '*camera-turbo-free* dm-boolean-toggle-pick-func))) + (debug-menu-append-item s3-0 a1-21) + ) + ) + (let ((s3-1 (new 'debug 'debug-menu arg0 "Camera collision menu"))) + (let ((a1-24 (new 'debug 'debug-menu-item-submenu "Collision" s3-1))) + (debug-menu-append-item gp-0 a1-24) + ) + (let ((a1-26 (new 'debug 'debug-menu-item-flag "Record" '*record-cam-collide-history* dm-boolean-toggle-pick-func)) + ) + (debug-menu-append-item s3-1 a1-26) + ) + (let ((a1-28 + (new 'debug 'debug-menu-item-flag "Display" '*display-cam-collide-history* dm-boolean-toggle-pick-func) + ) + ) + (debug-menu-append-item s3-1 a1-28) + ) + ) + (let ((s4-1 (new 'debug 'debug-menu arg0 "Camera settings menu"))) + (let ((a1-31 (new 'debug 'debug-menu-item-submenu "Settings" s4-1))) + (debug-menu-append-item gp-0 a1-31) + ) + (let ((a1-33 (new 'debug 'debug-menu-item-flag "Default" #f dm-cam-settings-default))) + (debug-menu-append-item s4-1 a1-33) + ) + (let ((a1-35 (new 'debug 'debug-menu-item-flag "turbo free" '*camera-turbo-free* dm-boolean-toggle-pick-func))) + (debug-menu-append-item s4-1 a1-35) + ) + (let ((s3-2 (new 'debug 'debug-menu-item-var "Fov" (the-as int 'fov) 80))) + (debug-menu-item-var-make-float + s3-2 + (the-as (function int debug-menu-msg float float float) dm-cam-setting-float) + 1.0 + #t + 15.0 + 180.0 + 1 + ) + (debug-menu-append-item s4-1 s3-2) + ) + (let ((a1-40 (new 'debug 'debug-menu-item-flag "Butt cam" 0 dm-cam-settings-func))) + (debug-menu-append-item s4-1 a1-40) + ) + (let ((a1-42 (new 'debug 'debug-menu-item-flag "Same side" 1 dm-cam-settings-func))) + (debug-menu-append-item s4-1 a1-42) + ) + (let ((a1-44 (new 'debug 'debug-menu-item-flag "Move spherical" 2 dm-cam-settings-func))) + (debug-menu-append-item s4-1 a1-44) + ) + (let ((a1-46 (new 'debug 'debug-menu-item-flag "Drag" 3 dm-cam-settings-func))) + (debug-menu-append-item s4-1 a1-46) + ) + (let ((a1-48 (new 'debug 'debug-menu-item-flag "Allow Z rot" 4 dm-cam-settings-func))) + (debug-menu-append-item s4-1 a1-48) + ) + (let ((a1-50 (new 'debug 'debug-menu-item-flag "Pitch for jump" 6 dm-cam-settings-func))) + (debug-menu-append-item s4-1 a1-50) + ) + (let ((a1-52 (new 'debug 'debug-menu-item-flag "Find hidden target" 7 dm-cam-settings-func))) + (debug-menu-append-item s4-1 a1-52) + ) + (let ((a1-54 (new 'debug 'debug-menu-item-flag "Collide" 8 dm-cam-settings-func))) + (debug-menu-append-item s4-1 a1-54) + ) + (let ((a1-56 (new 'debug 'debug-menu-item-flag "Line of Sight" 9 dm-cam-settings-func))) + (debug-menu-append-item s4-1 a1-56) + ) + (let ((a1-58 (new 'debug 'debug-menu-item-flag "No Rotate" 10 dm-cam-settings-func))) + (debug-menu-append-item s4-1 a1-58) + ) + (let ((a1-60 (new 'debug 'debug-menu-item-flag "Sticky Angle" 11 dm-cam-settings-func))) + (debug-menu-append-item s4-1 a1-60) + ) + (let ((s3-3 (new 'debug 'debug-menu-item-var "Interp Frms" 40 80))) + (debug-menu-item-var-make-int s3-3 dm-cam-settings-func-int 1 #f 0 0 #f) + (debug-menu-append-item s4-1 s3-3) + ) + (let ((a1-65 (new + 'debug + 'debug-menu-item-flag + "no mip/lod correction" + '*camera-no-mip-correction* + dm-boolean-toggle-pick-func + ) + ) + ) + (debug-menu-append-item s4-1 a1-65) + ) + (let ((a1-67 + (new 'debug 'debug-menu-item-flag "last attacker" '*display-camera-last-attacker* dm-boolean-toggle-pick-func) + ) + ) + (debug-menu-append-item s4-1 a1-67) + ) + (let ((a1-69 (new 'debug 'debug-menu-item-flag "old stats" '*display-camera-old-stats* dm-boolean-toggle-pick-func)) + ) + (debug-menu-append-item s4-1 a1-69) + ) + (let ((a1-71 (new 'debug 'debug-menu-item-flag "Amy cam" '*amy-cam* dm-boolean-toggle-pick-func))) + (debug-menu-append-item s4-1 a1-71) + ) + (let ((a1-73 (new 'debug 'debug-menu-item-flag "xyz axes" '*display-xyz-axes* dm-boolean-toggle-pick-func))) + (debug-menu-append-item s4-1 a1-73) + ) + (let ((a1-75 + (new 'debug 'debug-menu-item-flag "Master Marks" '*display-cam-master-marks* dm-boolean-toggle-pick-func) + ) + ) + (debug-menu-append-item s4-1 a1-75) + ) + (let ((a1-77 (new 'debug 'debug-menu-item-flag "Other Marks" '*display-cam-other* dm-boolean-toggle-pick-func))) + (debug-menu-append-item s4-1 a1-77) + ) + (let ((a1-79 (new 'debug 'debug-menu-item-flag "los debug" '*display-cam-los-debug* dm-boolean-toggle-pick-func))) + (debug-menu-append-item s4-1 a1-79) + ) + (let ((a1-81 (new 'debug 'debug-menu-item-flag "los info" '*display-cam-los-info* dm-boolean-toggle-pick-func))) + (debug-menu-append-item s4-1 a1-81) + ) + (let ((a1-83 (new 'debug 'debug-menu-item-flag "los Marks" '*display-cam-los-marks* dm-boolean-toggle-pick-func))) + (debug-menu-append-item s4-1 a1-83) + ) + (let ((a1-85 (new 'debug 'debug-menu-item-flag "coll Marks" '*display-cam-coll-marks* dm-boolean-toggle-pick-func)) + ) + (debug-menu-append-item s4-1 a1-85) + ) + (let ((a1-87 (new 'debug 'debug-menu-item-flag "Camera Marks" '*display-camera-marks* dm-boolean-toggle-pick-func)) + ) + (debug-menu-append-item s4-1 a1-87) + ) + ) + (let ((a1-89 (new 'debug 'debug-menu-item-flag "Edit" '*cam-layout* (lambda ((arg0 symbol) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (if (-> arg0 value) + (cam-layout-stop) + (cam-layout-start) + ) + ) + (-> arg0 value) + ) + ) + ) + ) + (debug-menu-append-item gp-0 a1-89) + ) + (let ((a1-91 (new + 'debug + 'debug-menu-item-function + "Save Pos" + #f + (the-as (function object object) debug-create-cam-restore) + ) + ) + ) + (debug-menu-append-item gp-0 a1-91) + ) + s5-0 + ) + ) + +;; definition for function debug-menu-make-shader-menu +(defun debug-menu-make-shader-menu ((arg0 debug-menu-context)) + (let* ((gp-0 (new 'debug 'debug-menu arg0 "Shader menu")) + (s5-0 (new 'debug 'debug-menu-item-submenu "Shader" gp-0)) + ) + (let ((a3-3 (new 'debug 'debug-menu arg0 "Shader pick menu"))) + (set! *shader-pick-menu* a3-3) + (let ((a1-4 (new 'debug 'debug-menu-item-submenu "Pick Shader" a3-3))) + (debug-menu-append-item gp-0 a1-4) + ) + ) + (let ((a1-6 (new 'debug 'debug-menu-item-function "Refresh" #f (the-as (function object object) build-shader-list))) + ) + (debug-menu-append-item gp-0 a1-6) + ) + (let ((s4-1 (new 'debug 'debug-menu-item-var "tweak" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-float + s4-1 + (the-as + (function int debug-menu-msg float float float) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((s4-0 (the-as texture-id (-> arg0 value))) + (gp-0 (lookup-texture-by-id s4-0)) + (v1-3 (-> *texture-page-dir* entries (-> s4-0 page) link)) + ) + (cond + ((and gp-0 v1-3) + (when (= arg1 (debug-menu-msg press)) + (set! (-> gp-0 uv-dist) arg2) + (let ((s5-1 (the-as object (* (-> v1-3 next (-> s4-0 index) shader) 16)))) + (while (nonzero? (the-as uint s5-1)) + (adgif-shader-update! (the-as adgif-shader s5-1) gp-0) + (set! s5-1 (* (-> (the-as adgif-shader s5-1) next shader) 16)) + ) + ) + ) + (-> gp-0 uv-dist) + ) + (else + (empty) + arg3 + ) + ) + ) + ) + (else + (empty) + arg3 + ) + ) + ) + ) + 0.1 + #t + 0.1 + 30.0 + 1 + ) + (debug-menu-append-item gp-0 s4-1) + ) + (let ((a1-11 (new + 'debug + 'debug-menu-item-function + "all tweak+" + #f + (the-as (function object object) (lambda () (all-texture-tweak-adjust *texture-page-dir* 0.1))) + ) + ) + ) + (debug-menu-append-item gp-0 a1-11) + ) + (let ((a1-13 (new + 'debug + 'debug-menu-item-function + "all tweak-" + #f + (the-as (function object object) (lambda () (all-texture-tweak-adjust *texture-page-dir* -0.1))) + ) + ) + ) + (debug-menu-append-item gp-0 a1-13) + ) + (let ((s4-2 (new 'debug 'debug-menu-item-var "l" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-2 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) tex1 l) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) tex1 l) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 3 + #f + ) + (debug-menu-append-item gp-0 s4-2) + ) + (let ((s4-3 (new 'debug 'debug-menu-item-var "k" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-3 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (the-as adgif-shader (-> a0-3 next (-> v1-1 index) shader)) 16)))) + (while (nonzero? (the-as int a1-8)) + (set! (-> (the-as adgif-shader a1-8) tex1 k) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (sar (shl (the-as int (the-as adgif-shader (-> (the-as adgif-shader v1-8) tex1))) 20) 52) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + -2048 + 2047 + #f + ) + (debug-menu-append-item gp-0 s4-3) + ) + (let ((s4-4 (new 'debug 'debug-menu-item-var "mmin" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-4 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) tex1 mmin) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) tex1 mmin) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 5 + #t + ) + (debug-menu-append-item gp-0 s4-4) + ) + (let ((s4-5 (new 'debug 'debug-menu-item-var "mmag" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-5 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) tex1 mmag) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) tex1 mmag) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 1 + #t + ) + (debug-menu-append-item gp-0 s4-5) + ) + (let ((s4-6 (new 'debug 'debug-menu-item-var "lcm" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-6 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) tex1 lcm) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) tex1 lcm) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 1 + #t + ) + (debug-menu-append-item gp-0 s4-6) + ) + (let ((s4-7 (new 'debug 'debug-menu-item-var "tfx" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-7 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (the-as adgif-shader (-> a0-3 next (-> v1-1 index) shader)) 16)))) + (while (nonzero? (the-as int a1-8)) + (set! (-> (the-as adgif-shader a1-8) tex0 tfx) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (shr (shl (the-as int (the-as adgif-shader (-> (the-as adgif-shader v1-8) tex0))) 27) 62) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 3 + #t + ) + (debug-menu-append-item gp-0 s4-7) + ) + (let ((s4-8 (new 'debug 'debug-menu-item-var "tbp" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-8 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) tex0 tbp0) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) tex0 tbp0) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + #x4000 + #t + ) + (debug-menu-append-item gp-0 s4-8) + ) + (let ((s4-9 (new 'debug 'debug-menu-item-var "tbw" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-9 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) tex0 tbw) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) tex0 tbw) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 15 + #t + ) + (debug-menu-append-item gp-0 s4-9) + ) + (let ((s4-10 (new 'debug 'debug-menu-item-var "tw" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-10 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) tex0 tw) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) tex0 tw) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 10 + #t + ) + (debug-menu-append-item gp-0 s4-10) + ) + (let ((s4-11 (new 'debug 'debug-menu-item-var "th" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-11 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (the-as adgif-shader (-> a0-3 next (-> v1-1 index) shader)) 16)))) + (while (nonzero? (the-as int a1-8)) + (set! (-> (the-as adgif-shader a1-8) tex0 th) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (shr (shl (the-as int (the-as adgif-shader (-> (the-as adgif-shader v1-8) tex0))) 30) 60) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 10 + #t + ) + (debug-menu-append-item gp-0 s4-11) + ) + (let ((s4-12 (new 'debug 'debug-menu-item-var "mxl" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-12 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) tex1 mxl) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) tex1 mxl) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 6 + #t + ) + (debug-menu-append-item gp-0 s4-12) + ) + (let ((s4-13 (new 'debug 'debug-menu-item-var "wms" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-13 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) clamp wms) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) clamp wms) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 3 + #t + ) + (debug-menu-append-item gp-0 s4-13) + ) + (let ((s4-14 (new 'debug 'debug-menu-item-var "wmt" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-14 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) clamp wmt) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) clamp wmt) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 3 + #t + ) + (debug-menu-append-item gp-0 s4-14) + ) + (let ((s4-15 (new 'debug 'debug-menu-item-var "minu" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-15 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) clamp minu) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) clamp minu) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 511 + #t + ) + (debug-menu-append-item gp-0 s4-15) + ) + (let ((s4-16 (new 'debug 'debug-menu-item-var "maxu" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-16 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (while (nonzero? (the-as uint a1-8)) + (set! (-> (the-as adgif-shader a1-8) clamp maxu) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (-> (the-as adgif-shader v1-8) clamp maxu) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 511 + #t + ) + (debug-menu-append-item gp-0 s4-16) + ) + (let ((s4-17 (new 'debug 'debug-menu-item-var "minv" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-17 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (the-as adgif-shader (-> a0-3 next (-> v1-1 index) shader)) 16)))) + (while (nonzero? (the-as int a1-8)) + (set! (-> (the-as adgif-shader a1-8) clamp minv) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (shr (shl (the-as int (the-as adgif-shader (-> (the-as adgif-shader v1-8) clamp))) 30) 54) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 511 + #t + ) + (debug-menu-append-item gp-0 s4-17) + ) + (let ((s4-18 (new 'debug 'debug-menu-item-var "maxv" (the-as int '*edit-shader*) 80))) + (debug-menu-item-var-make-int + s4-18 + (the-as + (function int debug-menu-msg int int int) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (cond + (*texture-page-dir* + (let* ((v1-1 (the-as texture-id (-> arg0 value))) + (a0-3 (-> *texture-page-dir* entries (-> v1-1 page) link)) + ) + (cond + (a0-3 + (when (= arg1 (debug-menu-msg press)) + (let ((a1-8 (the-as object (* (the-as adgif-shader (-> a0-3 next (-> v1-1 index) shader)) 16)))) + (while (nonzero? (the-as int a1-8)) + (set! (-> (the-as adgif-shader a1-8) clamp maxv) (the-as int arg2)) + (set! a1-8 (* (-> (the-as adgif-shader a1-8) next shader) 16)) + ) + ) + ) + (let ((v1-8 (the-as object (* (-> a0-3 next (-> v1-1 index) shader) 16)))) + (if (nonzero? (the-as uint v1-8)) + (shr (shl (the-as int (the-as adgif-shader (-> (the-as adgif-shader v1-8) clamp))) 20) 54) + arg3 + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + (else + arg3 + ) + ) + ) + ) + 1 + #t + 0 + 511 + #t + ) + (debug-menu-append-item gp-0 s4-18) + ) + s5-0 + ) + ) + +;; definition for function debug-menu-make-instance-menu +(defun debug-menu-make-instance-menu ((arg0 debug-menu-context)) + (let* ((gp-0 (new 'debug 'debug-menu arg0 "Instance menu")) + (s5-0 (new 'debug 'debug-menu-item-submenu "Instance" gp-0)) + ) + (let ((a3-3 (new 'debug 'debug-menu arg0 "Instance shrub menu"))) + (set! *instance-shrub-menu* a3-3) + (let ((a1-4 (new 'debug 'debug-menu-item-submenu "Pick Shrub" a3-3))) + (debug-menu-append-item gp-0 a1-4) + ) + ) + (let ((a3-5 (new 'debug 'debug-menu arg0 "Instance tie menu"))) + (set! *instance-tie-menu* a3-5) + (let ((a1-7 (new 'debug 'debug-menu-item-submenu "Pick Tie" a3-5))) + (debug-menu-append-item gp-0 a1-7) + ) + ) + (let ((a1-9 (new 'debug 'debug-menu-item-function "Refresh" #f build-instance-list))) + (debug-menu-append-item gp-0 a1-9) + ) + (let ((a1-11 + (new 'debug 'debug-menu-item-function "Print Info" #f (the-as (function object object) print-prototype-list)) + ) + ) + (debug-menu-append-item gp-0 a1-11) + ) + (let ((s3-0 (new 'debug 'debug-menu-item-var "near" (the-as int '*edit-instance*) 80))) + (debug-menu-item-var-make-float + s3-0 + (the-as + (function int debug-menu-msg float float float) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (let ((f30-0 arg3)) + (dotimes (s3-0 (-> *level* length)) + (let ((a1-1 (-> *level* level s3-0))) + (when (= (-> a1-1 status) 'active) + (let ((s2-0 (find-instance-by-name-level (the-as string (-> arg0 value)) a1-1))) + (when s2-0 + (when (= arg1 (debug-menu-msg press)) + (set! (-> s2-0 dists x) (* 4096.0 arg2)) + (prototype-bucket-recalc-fields s2-0) + ) + (set! f30-0 (* 0.00024414062 (-> s2-0 dists x))) + ) + ) + ) + ) + ) + f30-0 + ) + ) + ) + 1.0 + #t + 10.0 + 250.0 + 1 + ) + (debug-menu-append-item gp-0 s3-0) + ) + (let ((s3-1 (new 'debug 'debug-menu-item-var "far" (the-as int '*edit-instance*) 80))) + (debug-menu-item-var-make-float + s3-1 + (the-as + (function int debug-menu-msg float float float) + (lambda ((arg0 symbol) (arg1 debug-menu-msg) (arg2 float) (arg3 float)) + (let ((f30-0 arg3)) + (dotimes (s3-0 (-> *level* length)) + (let ((a1-1 (-> *level* level s3-0))) + (when (= (-> a1-1 status) 'active) + (let ((s2-0 (find-instance-by-name-level (the-as string (-> arg0 value)) a1-1))) + (when s2-0 + (when (= arg1 (debug-menu-msg press)) + (set! (-> s2-0 dists w) (* 4096.0 arg2)) + (prototype-bucket-recalc-fields s2-0) + ) + (set! f30-0 (* 0.00024414062 (-> s2-0 dists w))) + ) + ) + ) + ) + ) + f30-0 + ) + ) + ) + 1.0 + #t + 10.0 + 250.0 + 1 + ) + (debug-menu-append-item gp-0 s3-1) + ) + (let ((s3-2 (new 'debug 'debug-menu-item-var "tie vanish near" (the-as int '*edit-instance*) 80))) + (debug-menu-item-var-make-float + s3-2 + (the-as (function int debug-menu-msg float float float) dm-float-field-tie-rvanish-func) + 1.0 + #t + 10.0 + 250.0 + 1 + ) + (debug-menu-append-item gp-0 s3-2) + ) + (let ((s3-3 (new 'debug 'debug-menu-item-var "tie vanish far" (the-as int '*edit-instance*) 80))) + (debug-menu-item-var-make-float + s3-3 + (the-as (function int debug-menu-msg float float float) dm-float-field-tie-vanish-far-func) + 1.0 + #t + 10.0 + 250.0 + 1 + ) + (debug-menu-append-item gp-0 s3-3) + ) + (let ((a1-25 (new 'debug 'debug-menu-item-flag "invisible" 1 dm-edit-instance-toggle-pick-func))) + (debug-menu-append-item gp-0 a1-25) + ) + (let ((a3-18 (new 'debug 'debug-menu arg0 "Enable Instance Shrub Menu"))) + (set! *enable-instance-shrub-menu* a3-18) + (let ((a1-28 (new 'debug 'debug-menu-item-submenu "Enable Shrub" a3-18))) + (debug-menu-append-item gp-0 a1-28) + ) + ) + (let ((a3-20 (new 'debug 'debug-menu arg0 "Enable Instance Tie Menu"))) + (set! *enable-instance-tie-menu* a3-20) + (let ((a1-31 (new 'debug 'debug-menu-item-submenu "Enable Tie" a3-20))) + (debug-menu-append-item gp-0 a1-31) + ) + ) + (let ((a1-33 + (new 'debug 'debug-menu-item-flag "Instance Info" '*display-instance-info* dm-boolean-toggle-pick-func) + ) + ) + (debug-menu-append-item gp-0 a1-33) + ) + s5-0 + ) + ) + +;; definition for function dm-task-menu-pick-func +(defun dm-task-menu-pick-func ((arg0 game-task) (arg1 debug-menu-msg)) + (let ((gp-0 (/ (the-as int arg0) 8))) + (when (= arg1 (debug-menu-msg press)) + (if (cpad-hold? 0 l1) + (task-node-open! (the-as game-task-node gp-0) 'menu) + (task-node-close! (the-as game-task-node gp-0) 'menu) + ) + ) + (if (and (not (task-node-closed? (the-as game-task-node gp-0))) + (not (task-node-open? (the-as game-task-node gp-0))) + ) + (return 'invalid) + ) + (task-node-closed? (the-as game-task-node gp-0)) + ) + ) + +;; definition for function debug-menu-make-continue-sub-menu +;; INFO: Used lq/sq +(defun debug-menu-make-continue-sub-menu ((arg0 game-info) (arg1 symbol)) + (local-vars + (sv-16 (function symbol type object object pair)) + (sv-32 symbol) + (sv-48 type) + (sv-64 symbol) + (sv-80 (function symbol type object object pair)) + (sv-96 symbol) + (sv-112 type) + (sv-128 string) + (sv-144 (function symbol type object object pair)) + (sv-160 symbol) + (sv-176 type) + (sv-192 string) + (sv-208 symbol) + (sv-224 type) + ) + (let ((s4-0 *level-load-list*) + (s5-0 '()) + ) + (while (not (null? s4-0)) + (let ((v1-1 (-> (the-as symbol (car s4-0)) value))) + (when (or (= arg1 'test) (= (-> (the-as level-load-info v1-1) taskname) arg1)) + (let ((s3-0 (-> (the-as level-load-info v1-1) continues))) + (while (not (null? s3-0)) + (let ((v1-2 (car s3-0)) + (a0-5 arg1) + ) + (when (if (= a0-5 'test) + (logtest? (continue-flags continue-flag-16) (-> (the-as continue-point v1-2) flags)) + #t + ) + (let ((s2-0 (method-of-type pair new)) + (s1-0 'global) + (s0-0 pair) + ) + (set! sv-16 (method-of-type pair new)) + (set! sv-32 'global) + (set! sv-48 pair) + (set! sv-64 'flag) + (set! sv-80 (method-of-type pair new)) + (set! sv-96 'global) + (set! sv-112 pair) + (set! sv-128 (-> (the-as continue-point v1-2) name)) + (set! sv-144 (method-of-type pair new)) + (set! sv-160 'global) + (set! sv-176 pair) + (set! sv-192 (-> (the-as continue-point v1-2) name)) + (let* ((a3-1 (cons 'dm-current-continue '())) + (a3-2 (sv-144 sv-160 sv-176 sv-192 a3-1)) + (a3-3 (sv-80 sv-96 sv-112 sv-128 a3-2)) + ) + (set! s5-0 (s2-0 s1-0 s0-0 (sv-16 sv-32 sv-48 sv-64 a3-3) s5-0)) + ) + ) + ) + ) + (set! s3-0 (cdr s3-0)) + ) + ) + ) + ) + (set! s4-0 (cdr s4-0)) + ) + (let ((s4-1 s5-0) + (s5-1 '()) + ) + (let ((a2-6 (car s4-1))) + (while (not (null? s4-1)) + (set! s5-1 (cons a2-6 s5-1)) + (set! s4-1 (cdr s4-1)) + (set! a2-6 (car s4-1)) + ) + ) + (let ((s4-2 (method-of-type pair new)) + (s3-1 'global) + (s2-1 pair) + (s1-1 'menu) + (s0-1 (method-of-type pair new)) + ) + (set! sv-208 'global) + (set! sv-224 pair) + (let ((a2-7 (symbol->string-debug arg1)) + (a3-6 s5-1) + ) + (s4-2 s3-1 s2-1 s1-1 (s0-1 sv-208 sv-224 a2-7 a3-6)) + ) + ) + ) + ) + ) + +;; definition for function debug-menu-make-task-sub-menu +;; INFO: Used lq/sq +(defun debug-menu-make-task-sub-menu ((arg0 symbol)) + (local-vars + (sv-16 (function symbol type object object pair)) + (sv-32 symbol) + (sv-48 type) + (sv-64 symbol) + (sv-80 (function symbol type object object pair)) + (sv-96 symbol) + (sv-112 type) + (sv-128 string) + (sv-144 (function symbol type object object pair)) + (sv-160 symbol) + (sv-176 type) + (sv-192 int) + (sv-208 symbol) + (sv-224 type) + ) + (let ((gp-0 '())) + (let ((s4-0 (-> *game-info* sub-task-list))) + (countdown (s3-0 (-> s4-0 length)) + (when (nonzero? s3-0) + (let ((v1-4 (-> s4-0 s3-0))) + (when (= (-> v1-4 level) arg0) + (let ((s2-0 (method-of-type pair new)) + (s1-0 'global) + (s0-0 pair) + ) + (set! sv-16 (method-of-type pair new)) + (set! sv-32 'global) + (set! sv-48 pair) + (set! sv-64 'flag) + (set! sv-80 (method-of-type pair new)) + (set! sv-96 'global) + (set! sv-112 pair) + (set! sv-128 (-> v1-4 name)) + (set! sv-144 (method-of-type pair new)) + (set! sv-160 'global) + (set! sv-176 pair) + (set! sv-192 (* s3-0 8)) + (let* ((a3-1 (cons 'dm-task-menu-pick-func '())) + (a3-2 (sv-144 sv-160 sv-176 sv-192 a3-1)) + (a3-3 (sv-80 sv-96 sv-112 sv-128 a3-2)) + ) + (set! gp-0 (s2-0 s1-0 s0-0 (sv-16 sv-32 sv-48 sv-64 a3-3) gp-0)) + ) + ) + ) + ) + ) + ) + ) + (let ((s4-1 (method-of-type pair new)) + (s3-1 'global) + (s2-1 pair) + (s1-1 'menu) + (s0-1 (method-of-type pair new)) + ) + (set! sv-208 'global) + (set! sv-224 pair) + (let ((a2-5 (symbol->string-debug arg0)) + (a3-5 gp-0) + ) + (s4-1 s3-1 s2-1 s1-1 (s0-1 sv-208 sv-224 a2-5 a3-5)) + ) + ) + ) + ) + +;; definition for function debug-menu-make-task-menu +;; INFO: Used lq/sq +(defun debug-menu-make-task-menu ((arg0 debug-menu-context)) + (local-vars (sv-16 debug-menu-context)) + (let* ((s5-0 (new 'debug 'debug-menu arg0 "Task menu")) + (s4-0 (new 'debug 'debug-menu-item-submenu "Task" s5-0)) + ) + (let* ((s3-0 '(city + comb + desert + factory + forest + mine + nest + palace + sewer + wascity + arena + temple + tower + volcano + precursor + default + test + ) + ) + (a0-3 (car s3-0)) + ) + (while (not (null? s3-0)) + (let ((s2-0 debug-menu-append-item) + (s1-0 s5-0) + (s0-0 debug-menu-make-from-template) + ) + (set! sv-16 arg0) + (let ((a1-2 (debug-menu-make-task-sub-menu (the-as symbol a0-3)))) + (s2-0 s1-0 (s0-0 sv-16 a1-2)) + ) + ) + (set! s3-0 (cdr s3-0)) + (set! a0-3 (car s3-0)) + ) + ) + s4-0 + ) + ) + +;; definition for function dm-play-task-with-continue +;; WARN: Return type mismatch int vs object. +(defun dm-play-task-with-continue ((arg0 game-task) (arg1 string)) + (let* ((t9-0 play-task) + (a1-1 'debug) + (a2-0 (cond + ((cpad-hold? 0 l1) + 'pre-play + ) + ((cpad-hold? 0 r1) + 'kiosk + ) + ) + ) + (a1-2 (t9-0 arg0 a1-1 a2-0)) + ) + (if arg1 + (set! a1-2 arg1) + ) + (start 'play (get-continue-by-name *game-info* a1-2)) + ) + (set-master-mode 'game) + 0 + ) + +;; definition for function dm-play-task +(defun dm-play-task ((arg0 game-task)) + (dm-play-task-with-continue (the-as game-task (/ (the-as int arg0) 8)) (the-as string #f)) + ) + +;; definition for function dm-play-race +(defun dm-play-race ((arg0 race-selection) (arg1 symbol)) + (let ((s5-0 (the-as string #f)) + (gp-0 0) + ) + (case arg0 + (((race-selection desertb-race-record)) + (set! gp-0 15) + (set! s5-0 "desertb-race-record") + ) + (((race-selection rs1)) + (set! gp-0 131) + (set! s5-0 "desertb-race-record") + ) + (((race-selection desrally-record)) + (set! gp-0 132) + (set! s5-0 "desrally-record") + ) + ) + (if (not arg1) + (set! s5-0 (the-as string #f)) + ) + (format #t "dm-play-race starting task ~d continue ~s~%" gp-0 s5-0) + (if (nonzero? gp-0) + (dm-play-task-with-continue (the-as game-task gp-0) s5-0) + ) + ) + ) + +;; definition for function debug-menu-make-play-menu +;; INFO: Used lq/sq +(defun debug-menu-make-play-menu ((arg0 debug-menu-context)) + (local-vars + (sv-16 type) + (sv-32 (function symbol type object object pair)) + (sv-48 symbol) + (sv-64 type) + (sv-80 symbol) + (sv-96 (function symbol type object object pair)) + (sv-112 symbol) + (sv-128 type) + (sv-144 string) + (sv-160 (function symbol type object object pair)) + (sv-176 symbol) + (sv-192 type) + (sv-208 symbol) + (sv-224 type) + (sv-240 (function symbol type object object pair)) + (sv-256 symbol) + (sv-272 type) + (sv-288 symbol) + (sv-304 (function symbol type object object pair)) + (sv-320 symbol) + (sv-336 type) + (sv-352 (function symbol type object object pair)) + (sv-368 symbol) + (sv-384 type) + (sv-400 int) + (sv-416 type) + (sv-432 symbol) + (sv-448 (function symbol type object object pair)) + (sv-464 symbol) + (sv-480 type) + (sv-496 string) + (sv-512 (function symbol type object object pair)) + (sv-528 symbol) + (sv-544 type) + (sv-560 symbol) + ) + (let ((s5-0 '())) + (let ((s2-0 #x200000)) + (countdown (s4-0 (-> *game-info* play-list length)) + (let ((s3-0 (-> *game-info* play-list s4-0))) + (when (-> s3-0 play-continue) + (let ((s1-0 + (logand (game-task-node-flag act1 act2 act3 bbush) (-> *game-info* sub-task-list (-> s3-0 play-node) flags)) + ) + ) + (when (!= s1-0 s2-0) + (let ((s2-1 (method-of-type pair new)) + (s0-0 'global) + ) + (set! sv-16 pair) + (set! sv-32 (method-of-type pair new)) + (set! sv-48 'global) + (set! sv-64 pair) + (set! sv-80 'function) + (set! sv-96 (method-of-type pair new)) + (set! sv-112 'global) + (set! sv-128 pair) + (cond + ((logtest? (game-task-node-flag act3) s1-0) + (set! sv-144 "=== Burning Bush ===") + ) + ((logtest? (game-task-node-flag act2) s1-0) + (set! sv-144 "====== ACT 3 ======") + ) + ((logtest? (game-task-node-flag act1) s1-0) + (set! sv-144 "====== ACT 2 ======") + ) + (else + (set! sv-144 "======= END =======") + ) + ) + (set! sv-160 (method-of-type pair new)) + (set! sv-176 'global) + (set! sv-192 pair) + (set! sv-208 (the-as symbol #f)) + (let* ((a3-1 (cons 'nothing '())) + (a3-2 (sv-160 sv-176 sv-192 sv-208 a3-1)) + (a3-3 (sv-96 sv-112 sv-128 sv-144 a3-2)) + (a2-4 (sv-32 sv-48 sv-64 sv-80 a3-3)) + ) + (set! s5-0 (s2-1 s0-0 sv-16 a2-4 s5-0)) + ) + ) + (set! s2-0 (the-as int s1-0)) + ) + ) + (let ((s1-1 (method-of-type pair new)) + (s0-1 'global) + ) + (set! sv-224 pair) + (set! sv-240 (method-of-type pair new)) + (set! sv-256 'global) + (set! sv-272 pair) + (set! sv-288 'function) + (set! sv-304 (method-of-type pair new)) + (set! sv-320 'global) + (set! sv-336 pair) + (let ((s3-1 (-> s3-0 name))) + (set! sv-352 (method-of-type pair new)) + (set! sv-368 'global) + (set! sv-384 pair) + (set! sv-400 (* s4-0 8)) + (let* ((a3-6 (cons 'dm-play-task '())) + (a3-7 (sv-352 sv-368 sv-384 sv-400 a3-6)) + (a3-8 (sv-304 sv-320 sv-336 s3-1 a3-7)) + (a2-9 (sv-240 sv-256 sv-272 sv-288 a3-8)) + (a3-9 s5-0) + ) + (set! s5-0 (s1-1 s0-1 sv-224 a2-9 a3-9)) + ) + ) + ) + ) + ) + ) + ) + (let ((s4-1 (method-of-type pair new)) + (s3-2 'global) + (s2-2 pair) + (s1-2 (method-of-type pair new)) + (s0-2 'global) + ) + (set! sv-416 pair) + (set! sv-432 'function) + (set! sv-448 (method-of-type pair new)) + (set! sv-464 'global) + (set! sv-480 pair) + (set! sv-496 "====== ACT 1 ======") + (set! sv-512 (method-of-type pair new)) + (set! sv-528 'global) + (set! sv-544 pair) + (set! sv-560 (the-as symbol #f)) + (let* ((a3-11 (cons 'nothing '())) + (a3-12 (sv-512 sv-528 sv-544 sv-560 a3-11)) + (a3-13 (sv-448 sv-464 sv-480 sv-496 a3-12)) + (a3-15 (s4-1 s3-2 s2-2 (s1-2 s0-2 sv-416 sv-432 a3-13) s5-0)) + ) + (debug-menu-make-from-template arg0 (cons 'menu (cons "Play" a3-15))) + ) + ) + ) + ) + +;; definition for function dm-anim-tester-flag-func +(defun dm-anim-tester-flag-func ((arg0 int) (arg1 debug-menu-msg)) + (when *anim-tester* + (case arg0 + (('at-apply-align) + (if (= arg1 (debug-menu-msg press)) + (logxor! (-> *anim-tester* 0 flags) (anim-tester-flags fanimt5)) + ) + (return (logtest? (-> *anim-tester* 0 flags) (anim-tester-flags fanimt5))) + ) + (('at-show-joint-info) + (if (= arg1 (debug-menu-msg press)) + (logxor! (-> *anim-tester* 0 flags) (anim-tester-flags fanimt4)) + ) + (return (logtest? (-> *anim-tester* 0 flags) (anim-tester-flags fanimt4))) + ) + ) + ) + #f + ) + +;; definition for function dm-anim-tester-func +(defun dm-anim-tester-func ((arg0 int) (arg1 debug-menu-msg)) + (local-vars (v0-1 symbol)) + (if (not *anim-tester*) + (anim-tester-start) + ) + (when *anim-tester* + (cond + ((= arg0 'at-pick-object) + (send-event (ppointer->process *anim-tester*) 'pick-object) + (set! v0-1 #t) + (set! (-> *debug-menu-context* is-hidden) v0-1) + v0-1 + ) + ((= arg0 'at-pick-joint-anim) + (send-event (ppointer->process *anim-tester*) 'pick-joint-anim) + (set! v0-1 #t) + (set! (-> *debug-menu-context* is-hidden) v0-1) + v0-1 + ) + ) + ) + ) + +;; definition for function dm-pilot-mode +(defun dm-pilot-mode ((arg0 object)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'pilot #f arg0 #t) + ) + +;; definition for function stop-watch-display +(defun stop-watch-display ((arg0 object) (arg1 object)) + (let ((v1-3 (- (-> *display* base-clock frame-counter) (-> *game-info* stop-watch-start)))) + (format arg1 "Stop watch ~D:~D:~D~%" (/ v1-3 #x4650) (/ (mod v1-3 #x4650) 300) (/ (* 100 (mod v1-3 300)) 300)) + ) + #f + ) + +;; definition for function debug-menu-context-make-default-menus +;; INFO: Used lq/sq +(defun debug-menu-context-make-default-menus ((arg0 debug-menu-context)) + (local-vars (sv-16 debug-menu-context)) + (let ((s5-0 (new 'debug 'debug-menu arg0 "Main menu"))) + (debug-menu-context-set-root-menu arg0 s5-0) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Artist" + (flag "Poly Stats" *stats-poly* dm-boolean-toggle-pick-func) + (menu + "Memory Stats" + (flag "Enable" *stats-memory* dm-boolean-toggle-pick-func) + (flag "Short" *stats-memory-short* dm-boolean-toggle-pick-func) + (flag "Level 0" 0 dm-stats-memory-func) + (flag "Level 1" 1 dm-stats-memory-func) + (flag "Level 2" 2 dm-stats-memory-func) + (flag "Level 3" 3 dm-stats-memory-func) + (flag "Level 4" 4 dm-stats-memory-func) + (flag "Level 5" 5 dm-stats-memory-func) + (flag "Level 6" 6 dm-stats-memory-func) + (flag "Level 7" 7 dm-stats-memory-func) + (flag "Level 8" 8 dm-stats-memory-func) + (flag "Level 9" 9 dm-stats-memory-func) + ) + (flag "All Visible" *artist-all-visible* dm-boolean-toggle-pick-func) + (flag "Flip Visible" *artist-flip-visible* dm-boolean-toggle-pick-func) + (flag "Fix Visible" *artist-fix-visible* dm-boolean-toggle-pick-func) + (flag "Fix Frustum" *artist-fix-frustum* dm-boolean-toggle-pick-func) + (flag "Manual Sample Point" *manual-sample-point* dm-boolean-toggle-pick-func) + (flag "Error Spheres" *artist-error-spheres* dm-boolean-toggle-pick-func) + (flag "Use menu subdiv" *artist-use-menu-subdiv* dm-boolean-toggle-pick-func) + (float-var "Subdiv Close" close dm-subdiv-float 10 1 #t 1 1000 1) + (float-var "Subdiv Far" far dm-subdiv-float 10 1 #t 1 1000 1) + (function + "Target Start" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (start 'debug (get-current-continue-forced *game-info*)) + ) + ) + (function "Target Stop" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (stop 'debug))) + (menu + "Anim Tester" + (int-var "Speed" anim-speed dm-subdiv-int 10 10 #t -300 1000) + (flag "Apply Align" at-apply-align dm-anim-tester-flag-func) + (flag "Show Joint Inf" at-show-joint-info dm-anim-tester-flag-func) + (function "Pick Object" at-pick-object dm-anim-tester-func) + (function "Pick Joint Anim" at-pick-joint-anim dm-anim-tester-func) + (function "Pick Sequence" at-pick-sequence dm-anim-tester-func) + (function "Save Sequences" at-save-sequences dm-anim-tester-func) + ) + (flag "Show Entity Errors" *display-entity-errors* dm-boolean-toggle-pick-func) + (flag "Capture Mode" *display-capture-mode* dm-boolean-toggle-pick-func) + (flag "Sprite Info" *display-sprite-info* dm-boolean-toggle-pick-func) + (flag "Sprite Marks" *display-sprite-marks* dm-boolean-toggle-pick-func) + (flag "Sprite Spheres" *display-sprite-spheres* dm-boolean-toggle-pick-func) + (flag "Time of Day" #f dm-time-of-day-pick-func) + (flag "Preload Anims" *preload-spool-anims* dm-boolean-toggle-pick-func) + (function + "Mike F" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (debug-actor "drill-crane-14") + (send-event *debug-actor* 'die) + ) + ) + (function + "Editor" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (kill-by-type editable-player *active-pool*) + (process-spawn editable-player :init editable-player-init #f :name "editable-player" :to *entity-pool*) + (set-master-mode 'game) + ) + ) + (flag + "Screen shot highres enable" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *screen-shot-work* highres-enable) (not (-> *screen-shot-work* highres-enable))) + ) + (-> *screen-shot-work* highres-enable) + ) + ) + (flag + "Screen shot hud enable" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *screen-shot-work* hud-enable) (not (-> *screen-shot-work* hud-enable))) + ) + (-> *screen-shot-work* hud-enable) + ) + ) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Game" + (function + "New Game" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (initialize! *game-info* 'game (the-as game-save #f) (the-as string #f) (the-as resetter-spec #f)) + ) + ) + (function + "New Life" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (initialize! *game-info* 'dead (the-as game-save #f) (the-as string #f) (the-as resetter-spec #f)) + ) + ) + (function + "Kill Target" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (set! (-> *game-info* mode) 'play) + (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 'death)) + ) + ) + ) + ) + (function + "Hit Target" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (set! (-> *game-info* mode) 'play) + (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)) + ) + ) + ) + ) + (function + "Reset Game" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (set! (-> *game-info* mode) 'debug) + (initialize! *game-info* 'game (the-as game-save #f) (the-as string #f) (the-as resetter-spec #f)) + ) + ) + (function "Reset Actors" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (reset-actors 'debug))) + (function + "Save Game" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (auto-save-command 'save 0 0 *default-pool* #f)) + ) + (function + "Load Game" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (auto-save-command 'restore 0 0 *default-pool* #f)) + ) + (function + "Manager Complete" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (script-eval '(send-event *task-manager* 'complete))) + ) + (flag "Target" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (when (= arg1 (debug-menu-msg press)) + (if *target* + (stop 'debug) + (start 'debug (get-current-continue-forced *game-info*)) + ) + ) + *target* + ) + ) + (flag "Game Mode" play dm-game-mode-pick-func) + (flag "Debug Mode" debug dm-game-mode-pick-func) + (function + "Stop Watch Start" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (remove-by-param0 *debug-engine* stop-watch-display) + (add-connection *debug-engine* *dproc* stop-watch-display *dproc* *stdcon0* #f) + (set! (-> *game-info* stop-watch-start) (-> *display* base-clock frame-counter)) + (set! (-> *game-info* stop-watch-stop) 0) + (format #t "Stop watch started!~%") + ) + ) + (function + "Stop Watch Stop" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (remove-by-param0 *debug-engine* stop-watch-display) + (set! (-> *game-info* stop-watch-stop) (-> *display* base-clock frame-counter)) + (let ((v1-7 (- (-> *game-info* stop-watch-stop) (-> *game-info* stop-watch-start)))) + (format + #t + "Stop watch elasped time was ~D:~D:~D~%" + (/ v1-7 #x4650) + (/ (mod v1-7 #x4650) 300) + (/ (* 100 (mod v1-7 300)) 300) + ) + ) + ) + ) + (function + "Continue Start" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (start 'play (-> *game-info* current-continue))) + ) + (function + "Kiosk Reset" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (auto-save-command 'restore 0 0 *default-pool* #f)) + ) + (menu + "Secrets" + (flag "hero-mode" 0 dm-game-secret-toggle-pick-func) + (flag "toggle-beard" 14 dm-game-secret-toggle-pick-func) + (flag "hflip-screen" 15 dm-game-secret-toggle-pick-func) + (flag "endless-ammo" 16 dm-game-secret-toggle-pick-func) + (flag "invulnerable" 17 dm-game-secret-toggle-pick-func) + (flag "endless-dark" 18 dm-game-secret-toggle-pick-func) + (flag "endless-light" 19 dm-game-secret-toggle-pick-func) + (flag "scene-player-1" 1 dm-game-secret-toggle-pick-func) + (flag "scene-player-2" 2 dm-game-secret-toggle-pick-func) + (flag "scene-player-3" 3 dm-game-secret-toggle-pick-func) + (flag "level-select-1" 5 dm-game-secret-toggle-pick-func) + (flag "level-select-2" 6 dm-game-secret-toggle-pick-func) + (flag "level-select-3" 7 dm-game-secret-toggle-pick-func) + (flag "scrap-book-1" 8 dm-game-secret-toggle-pick-func) + (flag "scrap-book-2" 9 dm-game-secret-toggle-pick-func) + (flag "scrap-book-3" 10 dm-game-secret-toggle-pick-func) + (flag "gungame-blue" 20 dm-game-secret-toggle-pick-func) + (flag "gungame-dark" 21 dm-game-secret-toggle-pick-func) + (flag "gungame-ratchet" 22 dm-game-secret-toggle-pick-func) + (flag "big-head" 23 dm-game-secret-toggle-pick-func) + (flag "little-head" 24 dm-game-secret-toggle-pick-func) + (flag "fast-movie" 25 dm-game-secret-toggle-pick-func) + (flag "slow-movie" 26 dm-game-secret-toggle-pick-func) + (flag "unlimited-turbos" 27 dm-game-secret-toggle-pick-func) + (flag "vehicle-hit-points" 28 dm-game-secret-toggle-pick-func) + (flag "board-fast" 29 dm-game-secret-toggle-pick-func) + (flag "vehicle-fox" 30 dm-game-secret-toggle-pick-func) + (flag "vehicle-mirage" 31 dm-game-secret-toggle-pick-func) + (flag "vehicle-x-ride" 32 dm-game-secret-toggle-pick-func) + (flag "model-viewer-1" 11 dm-game-secret-toggle-pick-func) + (flag "model-viewer-2" 12 dm-game-secret-toggle-pick-func) + (flag "model-viewer-3" 13 dm-game-secret-toggle-pick-func) + (flag "kleever-diaper" 33 dm-game-secret-toggle-pick-func) + (flag "bad-weather" 34 dm-game-secret-toggle-pick-func) + (flag "fast-weather" 35 dm-game-secret-toggle-pick-func) + (flag "daxter-pants" 36 dm-game-secret-toggle-pick-func) + (flag "darkjak-tracking" 37 dm-game-secret-toggle-pick-func) + (flag "commentary" 4 dm-game-secret-toggle-pick-func) + (flag "jak-is-jak2" 38 dm-game-secret-toggle-pick-func) + (flag "button-invis" 40 dm-game-secret-toggle-pick-func) + (flag "statistics" 39 dm-game-secret-toggle-pick-func) + (flag "gun-dark-4" 41 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-red-1" 42 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-red-2" 43 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-red-3" 44 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-yellow-1" 45 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-yellow-2" 46 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-yellow-3" 47 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-blue-1" 48 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-blue-2" 49 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-blue-3" 50 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-dark-1" 51 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-dark-2" 52 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-dark-3" 53 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-ammo-red" 54 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-ammo-yellow" 55 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-ammo-blue" 56 dm-game-secret-toggle-pick-func) + (flag "gun-upgrade-ammo-dark" 57 dm-game-secret-toggle-pick-func) + ) + (function "Print Load State" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (dotimes (gp-0 11) + (let ((s5-0 (-> *level* level gp-0))) + (if (!= (-> s5-0 status) 'inactive) + (format + #t + "~Tlevel ~2D ~16S ~16S bits #b~18,'0B ~A~%" + gp-0 + (-> s5-0 name) + (if (nonzero? (-> s5-0 info)) + (level-memory-mode->string (-> s5-0 info memory-mode)) + ) + (-> s5-0 memory-mask) + (-> s5-0 status) + ) + ) + ) + ) + #t + ) + ) + (menu "Continue") + (menu + "Settings" + (float-var + "sfx-volume" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *setting-control* (nonzero? *setting-control*)) + (set! (-> *setting-control* user-default sfx-volume) arg2) + ) + ) + ((or (not *setting-control*) (zero? *setting-control*)) + 0 + ) + (else + (-> *setting-control* user-default sfx-volume) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.01) + #t + 0 + 1 + 0 + ) + (float-var + "ambient-volume" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *setting-control* (nonzero? *setting-control*)) + (set! (-> *setting-control* user-default ambient-volume) arg2) + ) + ) + ((or (not *setting-control*) (zero? *setting-control*)) + 0 + ) + (else + (-> *setting-control* user-default ambient-volume) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.01) + #t + 0 + 1 + 0 + ) + (float-var + "music-volume" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *setting-control* (nonzero? *setting-control*)) + (set! (-> *setting-control* user-default music-volume) arg2) + ) + ) + ((or (not *setting-control*) (zero? *setting-control*)) + 0 + ) + (else + (-> *setting-control* user-default music-volume) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.01) + #t + 0 + 1 + 0 + ) + (float-var + "dialog-volume" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *setting-control* (nonzero? *setting-control*)) + (set! (-> *setting-control* user-default dialog-volume) arg2) + ) + ) + ((or (not *setting-control*) (zero? *setting-control*)) + 0 + ) + (else + (-> *setting-control* user-default dialog-volume) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.01) + #t + 0 + 1 + 0 + ) + (float-var + "contrast" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *setting-control* (nonzero? *setting-control*)) + (set! (-> *setting-control* user-default contrast) arg2) + ) + ) + ((or (not *setting-control*) (zero? *setting-control*)) + 0 + ) + (else + (-> *setting-control* user-default contrast) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.00390625) + #t + (new 'static 'bfloat :data 0.25) + (new 'static 'bfloat :data 1.0) + 0 + ) + (float-var + "brightness" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *setting-control* (nonzero? *setting-control*)) + (set! (-> *setting-control* user-default brightness) arg2) + ) + ) + ((or (not *setting-control*) (zero? *setting-control*)) + 0 + ) + (else + (-> *setting-control* user-default brightness) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.00390625) + #t + (new 'static 'bfloat :data 0.25) + (new 'static 'bfloat :data 1.0) + 0 + ) + (function + "reset contrast and brightness" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (set! (-> *setting-control* user-default contrast) 0.5) + (set! (-> *setting-control* user-default brightness) 0.5) + ) + ) + (menu + "Language" + (flag "english" 0 dm-setting-language) + (flag "french" 1 dm-setting-language) + (flag "german" 2 dm-setting-language) + (flag "spanish" 3 dm-setting-language) + (flag "italian" 4 dm-setting-language) + (flag "korean" 7 dm-setting-language) + (flag "russian" 8 dm-setting-language) + (flag "portuguese" 9 dm-setting-language) + (flag "uk-english" 11 dm-setting-language) + ) + (menu + "Audio Language" + (flag "english" 0 dm-setting-audio-language) + (flag "french" 1 dm-setting-audio-language) + (flag "german" 2 dm-setting-audio-language) + (flag "spanish" 3 dm-setting-audio-language) + (flag "italian" 4 dm-setting-audio-language) + (flag "commentary" 5 dm-setting-audio-language) + ) + (menu + "Subtitle Language" + (flag "english" 0 dm-setting-subtitle-language) + (flag "french" 1 dm-setting-subtitle-language) + (flag "german" 2 dm-setting-subtitle-language) + (flag "spanish" 3 dm-setting-subtitle-language) + (flag "italian" 4 dm-setting-subtitle-language) + (flag "korean" 7 dm-setting-subtitle-language) + (flag "russian" 8 dm-setting-subtitle-language) + (flag "portuguese" 9 dm-setting-subtitle-language) + (flag "uk-english" 11 dm-setting-subtitle-language) + ) + (flag + "play-hints " + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *setting-control* user-default play-hints) (not (-> *setting-control* user-default play-hints))) + ) + (-> *setting-control* user-default play-hints) + ) + ) + (flag + "subtitle " + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *setting-control* user-default subtitle) (not (-> *setting-control* user-default subtitle))) + ) + (-> *setting-control* user-default subtitle) + ) + ) + (flag + "vibration" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *setting-control* user-default vibration) (not (-> *setting-control* user-default vibration))) + ) + (-> *setting-control* user-default vibration) + ) + ) + (menu + "Stereo Mode" + (flag "mono" 0 dm-setting-stereo-mode) + (flag "stereo" 1 dm-setting-stereo-mode) + (flag "surround" 2 dm-setting-stereo-mode) + ) + (flag + "camera-stick-dir" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *setting-control* user-default camera-stick-dir) + (not (-> *setting-control* user-default camera-stick-dir)) + ) + ) + (-> *setting-control* user-default camera-stick-dir) + ) + ) + (flag + "progressive-scan" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *setting-control* user-default set-video-mode) + (not (-> *setting-control* user-default set-video-mode)) + ) + ) + (-> *setting-control* user-default set-video-mode) + ) + ) + (flag + "border-mode" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (set! (-> *setting-control* user-default border-mode) (not (-> *setting-control* user-default border-mode))) + (set! (-> *level* play?) (-> *setting-control* user-default border-mode)) + ) + (-> *setting-control* user-default border-mode) + ) + ) + ) + (menu + "Features" + (flag "armor0" 52 dm-game-feature-toggle-pick-func) + (flag "armor1" 53 dm-game-feature-toggle-pick-func) + (flag "armor2" 54 dm-game-feature-toggle-pick-func) + (flag "armor3" 55 dm-game-feature-toggle-pick-func) + (flag "artifact-invis" 51 dm-game-feature-toggle-pick-func) + (flag "board" 18 dm-game-feature-toggle-pick-func) + (flag "board-training" 36 dm-game-feature-toggle-pick-func) + (flag "board-launch" 37 dm-game-feature-toggle-pick-func) + (flag "board-zap" 39 dm-game-feature-toggle-pick-func) + (flag "board-trail" 38 dm-game-feature-toggle-pick-func) + (flag "carry" 19 dm-game-feature-toggle-pick-func) + (flag "sidekick" 20 dm-game-feature-toggle-pick-func) + (flag "darkeco" 58 dm-game-feature-toggle-pick-func) + (flag "darkjak" 40 dm-game-feature-toggle-pick-func) + (flag "darkjak-smack" 41 dm-game-feature-toggle-pick-func) + (flag "darkjak-bomb0" 42 dm-game-feature-toggle-pick-func) + (flag "darkjak-bomb1" 43 dm-game-feature-toggle-pick-func) + (flag "darkjak-tracking" 44 dm-game-feature-toggle-pick-func) + (flag "darkjak-invinc" 45 dm-game-feature-toggle-pick-func) + (flag "lighteco" 57 dm-game-feature-toggle-pick-func) + (flag "lightjak" 46 dm-game-feature-toggle-pick-func) + (flag "lightjak-regen" 47 dm-game-feature-toggle-pick-func) + (flag "lightjak-swoop" 48 dm-game-feature-toggle-pick-func) + (flag "lightjak-freeze" 49 dm-game-feature-toggle-pick-func) + (flag "lightjak-shield" 50 dm-game-feature-toggle-pick-func) + (flag "gun-yellow-1" 9 dm-game-feature-toggle-pick-func) + (flag "gun-yellow-2" 10 dm-game-feature-toggle-pick-func) + (flag "gun-yellow-3" 11 dm-game-feature-toggle-pick-func) + (flag "gun-upgrade-yellow-ammo-1" 23 dm-game-feature-toggle-pick-func) + (flag "gun-upgrade-yellow-ammo-2" 24 dm-game-feature-toggle-pick-func) + (flag "gun-red-1" 6 dm-game-feature-toggle-pick-func) + (flag "gun-red-2" 7 dm-game-feature-toggle-pick-func) + (flag "gun-red-3" 8 dm-game-feature-toggle-pick-func) + (flag "gun-upgrade-red-ammo-1" 25 dm-game-feature-toggle-pick-func) + (flag "gun-upgrade-red-ammo-2" 26 dm-game-feature-toggle-pick-func) + (flag "gun-blue-1" 12 dm-game-feature-toggle-pick-func) + (flag "gun-blue-2" 13 dm-game-feature-toggle-pick-func) + (flag "gun-blue-3" 14 dm-game-feature-toggle-pick-func) + (flag "gun-upgrade-blue-ammo-1" 27 dm-game-feature-toggle-pick-func) + (flag "gun-upgrade-blue-ammo-2" 28 dm-game-feature-toggle-pick-func) + (flag "gun-dark-1" 15 dm-game-feature-toggle-pick-func) + (flag "gun-dark-2" 16 dm-game-feature-toggle-pick-func) + (flag "gun-dark-3" 17 dm-game-feature-toggle-pick-func) + (flag "gun-upgrade-dark-ammo-1" 29 dm-game-feature-toggle-pick-func) + (flag "gun-upgrade-dark-ammo-2" 30 dm-game-feature-toggle-pick-func) + (flag "gun-upgrade-speed" 21 dm-game-feature-toggle-pick-func) + (flag "gun-upgrade-damage" 22 dm-game-feature-toggle-pick-func) + (flag "pass-port-mh" 31 dm-game-feature-toggle-pick-func) + (flag "pass-port-inda" 32 dm-game-feature-toggle-pick-func) + (flag "pass-inda-indb" 33 dm-game-feature-toggle-pick-func) + (flag "pass-indb-sluma" 34 dm-game-feature-toggle-pick-func) + (flag "pass-slumb-genb" 35 dm-game-feature-toggle-pick-func) + (flag "turtle" 0 dm-game-vehicle-toggle-pick-func) + (flag "snake" 1 dm-game-vehicle-toggle-pick-func) + (flag "scorpion" 2 dm-game-vehicle-toggle-pick-func) + (flag "toad" 3 dm-game-vehicle-toggle-pick-func) + (flag "fox" 4 dm-game-vehicle-toggle-pick-func) + (flag "rhino" 5 dm-game-vehicle-toggle-pick-func) + (flag "mirage" 6 dm-game-vehicle-toggle-pick-func) + (flag "x-ride" 7 dm-game-vehicle-toggle-pick-func) + ) + ) + ) + ) + (let* ((s4-2 (debug-menu-find-from-template arg0 '("Game" "Continue"))) + (s3-2 + '(city + comb + desert + factory + forest + mine + nest + palace + sewer + wascity + arena + temple + tower + volcano + precursor + default + test + ) + ) + (a1-7 (car s3-2)) + ) + (while (not (null? s3-2)) + (let ((s2-0 debug-menu-append-item) + (s1-0 s4-2) + (s0-0 debug-menu-make-from-template) + ) + (set! sv-16 arg0) + (let ((a1-8 (debug-menu-make-continue-sub-menu *game-info* (the-as symbol a1-7)))) + (s2-0 s1-0 (s0-0 sv-16 a1-8)) + ) + ) + (set! s3-2 (cdr s3-2)) + (set! a1-7 (car s3-2)) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Stats" + (flag "Poly" *stats-poly* dm-boolean-toggle-pick-func) + (flag "Collide" *stats-collide* dm-boolean-toggle-pick-func) + (flag "Bsp" *stats-bsp* dm-boolean-toggle-pick-func) + (flag "Buffer" *stats-buffer* dm-boolean-toggle-pick-func) + (flag "Target" *stats-target* dm-boolean-toggle-pick-func) + (flag "Blerc" *stats-blerc* dm-boolean-toggle-pick-func) + (flag "Profile bars" *stats-profile-bars* dm-boolean-toggle-pick-func) + (flag "Perf" *stats-perf* dm-boolean-toggle-pick-func) + (menu + "Memory Stats" + (flag "Enable" *stats-memory* dm-boolean-toggle-pick-func) + (flag "Short" *stats-memory-short* dm-boolean-toggle-pick-func) + (flag "Level 0" 0 dm-stats-memory-func) + (flag "Level 1" 1 dm-stats-memory-func) + (flag "Level 2" 2 dm-stats-memory-func) + (flag "Level 3" 3 dm-stats-memory-func) + (flag "Level 4" 4 dm-stats-memory-func) + (flag "Level 5" 5 dm-stats-memory-func) + (flag "Level 6" 6 dm-stats-memory-func) + (flag "Level 7" 7 dm-stats-memory-func) + (flag "Level 8" 8 dm-stats-memory-func) + (flag "Level 9" 9 dm-stats-memory-func) + ) + (function + "Print Entity Memory" + #f + ,(lambda () + (format #t "~%~%========================= Entity Memory =========================~%~%") + (let ((gp-0 (-> *level* level))) + (inspect (-> gp-0 0 art-group)) + (dotimes (s5-0 (-> gp-0 0 art-group art-group-array length)) + (inspect (-> gp-0 0 art-group art-group-array s5-0)) + ) + ) + #f + ) + ) + (function + "Print Texture Info" + #f + ,(lambda () + (format #t "~%~%========================= Texture Info =========================~%~%") + (inspect *texture-page-dir*) + ) + ) + (function + "Print Texture Verbose" + #f + ,(lambda () + (format #t "~%~%========================= Texture Info =========================~%~%") + (texture-page-dir-inspect *texture-page-dir* #t) + ) + ) + (function + "Print Merc Stats" + #f + ,(lambda () + (format #t "~%~%========================== Merc Stats ==========================~%~%") + (merc-stats) + ) + ) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Render" + (menu + "Background" + (flag "Textured" 0 dm-subdiv-draw-func) + (flag "Outline" 1 dm-subdiv-draw-func) + (flag "Gouraud" 2 dm-subdiv-draw-func) + (flag "Hack" 3 dm-subdiv-draw-func) + ) + (menu + "Background Scissor" + (flag "Textured" 0 dm-scissor-subdiv-draw-func) + (flag "Outline" 1 dm-scissor-subdiv-draw-func) + (flag "Gouraud" 2 dm-scissor-subdiv-draw-func) + (flag "Hack" 3 dm-scissor-subdiv-draw-func) + ) + (menu + "Foreground" + (flag "Textured" 0 dm-foreground-subdiv-draw-func) + (flag "Outline" 1 dm-foreground-subdiv-draw-func) + (flag "Gouraud" 2 dm-foreground-subdiv-draw-func) + (flag "Hack" 3 dm-foreground-subdiv-draw-func) + ) + (menu + "Ocean" + (flag "Textured" 0 dm-ocean-subdiv-draw-func) + (flag "Outline" 1 dm-ocean-subdiv-draw-func) + (flag "Gouraud" 2 dm-ocean-subdiv-draw-func) + (flag "Hack" 3 dm-ocean-subdiv-draw-func) + ) + (flag "SKY TEXTURES" 32 dm-texture-user-toggle-pick-func) + (flag "sky" 3 dm-vu1-user-toggle-pick-func) + (flag "ocean" 4 dm-vu1-user-toggle-pick-func) + (flag "ocean-wave" 5 dm-vu1-user-toggle-pick-func) + (flag "HFRAG TIE TEXTURES" 64 dm-texture-user-toggle-pick-func) + (flag "hfrag" 6 dm-vu1-user-toggle-pick-func) + (flag "hfrag-scissor" 7 dm-vu1-user-toggle-pick-func) + (flag "TFRAG TIE TEXTURES" #x1 dm-texture-user-toggle-pick-func) + (flag "tfrag" 8 dm-vu1-user-toggle-pick-func) + (flag "tie" 10 dm-vu1-user-toggle-pick-func) + (flag "tie-envmap" 11 dm-vu1-user-toggle-pick-func) + (flag "tie-scissor" 9 dm-vu1-user-toggle-pick-func) + (flag "tie-envmap-scissor" 12 dm-vu1-user-toggle-pick-func) + (flag "tie-vanish" 13 dm-vu1-user-toggle-pick-func) + (flag "SHRUB TEXTURES" #x4 dm-texture-user-toggle-pick-func) + (flag "shrub-near" 18 dm-vu1-user-toggle-pick-func) + (flag "shrubbery" 17 dm-vu1-user-toggle-pick-func) + (flag "shrubbery-vanish" 20 dm-vu1-user-toggle-pick-func) + (flag "billboard" 19 dm-vu1-user-toggle-pick-func) + (flag "ALPHA TEXTURES" 1 dm-texture-user-toggle-pick-func) + (flag "tfrag-trans" 21 dm-vu1-user-toggle-pick-func) + (flag "tie-trans" 23 dm-vu1-user-toggle-pick-func) + (flag "tie-envmap-trans" 24 dm-vu1-user-toggle-pick-func) + (flag "tie-scissor-trans" 22 dm-vu1-user-toggle-pick-func) + (flag "tie-envmap-scissor-trans" 25 dm-vu1-user-toggle-pick-func) + (flag "PRIS TEXTURES" #x2 dm-texture-user-toggle-pick-func) + (flag "merc" 15 dm-vu1-user-toggle-pick-func) + (flag "emerc" 16 dm-vu1-user-toggle-pick-func) + (flag "generic" 14 dm-vu1-user-toggle-pick-func) + (flag "WATER TEXTURES" 2 dm-texture-user-toggle-pick-func) + (flag "tfrag-water" 26 dm-vu1-user-toggle-pick-func) + (flag "tie-water" 28 dm-vu1-user-toggle-pick-func) + (flag "tie-envmap-water" 29 dm-vu1-user-toggle-pick-func) + (flag "tie-scissor-water" 27 dm-vu1-user-toggle-pick-func) + (flag "tie-envmap-scissor-water" 30 dm-vu1-user-toggle-pick-func) + (flag "SPRITE TEXTURES" 8 dm-texture-user-toggle-pick-func) + (flag "sprite" 31 dm-vu1-user-toggle-pick-func) + (flag "shadow" 32 dm-vu1-user-toggle-pick-func) + (flag "shadow-debug" *shadow-debug* dm-boolean-toggle-pick-func) + (flag "depth-cue" 36 dm-vu1-user-toggle-pick-func) + (flag "WARP TEXTURES" 4 dm-texture-user-toggle-pick-func) + (flag "HUD TEXTURES" 16 dm-texture-user-toggle-pick-func) + (flag "all on" #f dm-vu1-user-all-pick-func) + (flag "all off" #f dm-vu1-user-none-pick-func) + (flag "all textures on" #x3ff dm-texture-user-set-pick-func) + (flag "all textures off" 0 dm-texture-user-set-pick-func) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Collision" + (menu + "Collision Renderer" + (flag "On" 0 dm-col-rend-on-func) + (flag "Track Player" 0 dm-col-rend-track-func) + (flag "Track Camera" 1 dm-col-rend-track-func) + (float-var " Dist" #f dm-col-rend-cam-dist 10 1 #t 0 80 1) + (flag "Fixed Pos" 2 dm-col-rend-track-func) + (float-var "Size" #f dm-col-rend-size 10 1 #t 1 20 1) + (flag "Outline" 0 dm-col-rend-outline-func) + (flag "Show Back-faces" 0 dm-col-rend-back-face-func) + (flag "Show Normals" 0 dm-col-rend-normals-func) + (flag "Ghost Hidden" 0 dm-col-rend-ghost-hidden-func) + (menu + "Show Only" + (flag "(board)" 1 dm-col-rend-show-only-set-func) + (flag "(grind)" 2 dm-col-rend-show-only-set-func) + (flag "(grindonly)" 4 dm-col-rend-show-only-set-func) + (flag "melt" 16384 dm-col-rend-show-only-toggle-func) + (flag "noboard" 8 dm-col-rend-show-only-toggle-func) + (flag "nocamera" 16 dm-col-rend-show-only-toggle-func) + (flag "noedge" 32 dm-col-rend-show-only-toggle-func) + (flag "noendlessfall" 64 dm-col-rend-show-only-toggle-func) + (flag "noentity" 128 dm-col-rend-show-only-toggle-func) + (flag "nogrind" 256 dm-col-rend-show-only-toggle-func) + (flag "nojak" 512 dm-col-rend-show-only-toggle-func) + (flag "nolineofsight" 1024 dm-col-rend-show-only-toggle-func) + (flag "nomech" 2048 dm-col-rend-show-only-toggle-func) + (flag "nopilot" 4096 dm-col-rend-show-only-toggle-func) + (flag "noproj" 8192 dm-col-rend-show-only-toggle-func) + (flag "probe" 32768 dm-col-rend-show-only-toggle-func) + (flag "Select All" 49144 dm-col-rend-show-only-set-func) + (flag "Unselect All" 0 dm-col-rend-show-only-set-func) + ) + (menu + "Find" + (flag "background" 1 dm-col-rend-cspec-toggle) + (flag "obstacles" 2 dm-col-rend-cspec-toggle) + (flag "pushers" 4 dm-col-rend-cspec-toggle) + (flag "Jak" 8 dm-col-rend-cspec-toggle) + (flag "other" 16 dm-col-rend-cspec-toggle) + ) + ) + (flag "Collision Cache" *display-collide-cache* dm-boolean-toggle-pick-func) + (flag "Collision Marks" *display-collision-marks* dm-boolean-toggle-pick-func) + (flag "Ground Stats" *display-ground-stats* dm-boolean-toggle-pick-func) + (flag "Hipri Collision Marks" *display-hipri-collision-marks* dm-boolean-toggle-pick-func) + (flag "Edge Collision Marks" *display-edge-collision-marks* dm-boolean-toggle-pick-func) + (flag "Collide Stats" *stats-collide* dm-boolean-toggle-pick-func) + (flag "Render Collision" *display-render-collision* dm-boolean-toggle-pick-func) + (flag "Collide List Boxes" *collide-list-boxes* dm-boolean-toggle-pick-func) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Display" + (flag "Profile" *display-profile* dm-boolean-toggle-pick-func) + (flag "Ticks" *profile-ticks* dm-boolean-toggle-pick-func) + (flag "File Info" *display-file-info* dm-boolean-toggle-pick-func) + (flag "Level Spheres" *display-level-spheres* dm-boolean-toggle-pick-func) + (flag "Camera Marks" *display-camera-marks* dm-boolean-toggle-pick-func) + (flag "Camera Info" *display-camera-info* dm-boolean-toggle-pick-func) + (flag "Geometry Marks" *display-geo-marks* dm-boolean-toggle-pick-func) + (flag "Art Control" *display-art-control* dm-boolean-toggle-pick-func) + (flag "Gui Control" *display-gui-control* dm-boolean-toggle-pick-func) + (flag "Instance Info" *display-instance-info* dm-boolean-toggle-pick-func) + (menu + "strip lines" + (flag "strippable" 1 dm-strip-lines-toggle-pick-func) + (flag "convertible" 2 dm-strip-lines-toggle-pick-func) + (flag "edgeable" 4 dm-strip-lines-toggle-pick-func) + (flag "ordinary" 8 dm-strip-lines-toggle-pick-func) + (flag "color mismatch" 16 dm-strip-lines-toggle-pick-func) + (flag "shader mismatch" 32 dm-strip-lines-toggle-pick-func) + (flag "uv mismatch" 64 dm-strip-lines-toggle-pick-func) + (flag "too big" 128 dm-strip-lines-toggle-pick-func) + (flag "good" 3 dm-strip-lines-set-pick-func) + (flag "bad" 240 dm-strip-lines-set-pick-func) + (flag "all edges" 255 dm-strip-lines-set-pick-func) + (flag "strips" 256 dm-strip-lines-set-pick-func) + (flag "frags" 512 dm-strip-lines-set-pick-func) + (flag "none" 0 dm-strip-lines-set-pick-func) + ) + (menu + "collision mesh" + (flag "wall" 1024 dm-strip-lines-toggle-pick-func) + (flag "ground" 2048 dm-strip-lines-toggle-pick-func) + (flag "all" 3072 dm-strip-lines-set-pick-func) + (flag "none" 0 dm-strip-lines-set-pick-func) + ) + (flag "Texture Distances" *display-texture-distances* dm-boolean-toggle-pick-func) + (flag "Texture Download" *display-texture-download* dm-boolean-toggle-pick-func) + (flag "Level Border" *display-level-border* dm-boolean-toggle-pick-func) + (flag "Split Boxes" *display-split-boxes* dm-boolean-toggle-pick-func) + (flag "Split Box Info" *display-split-box-info* dm-boolean-toggle-pick-func) + (flag "Memcard Info" *display-memcard-info* dm-boolean-toggle-pick-func) + (flag "Trail Graph" *display-trail-graph* dm-boolean-toggle-pick-func) + (flag "Color Bars" *display-color-bars* dm-boolean-toggle-pick-func) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Actor" + (flag "Spawn Actors" *spawn-actors* dm-boolean-toggle-pick-func) + (function "Reset Actors" #f ,(lambda () (reset-actors 'debug))) + (function "Traffic Start" #f ,(lambda () (let ((gp-0 traffic-start)) + (if (valid? gp-0 function "" #t 0) + (gp-0) + ) + ) + ) + ) + (function "Traffic Kill" #f ,(lambda () (let ((gp-0 traffic-kill)) + (if (valid? gp-0 function "" #t 0) + (gp-0) + ) + ) + ) + ) + (menu + "Bot" + (function + "Bot Next" + #f + ,(lambda () + (send-event (process-by-name "sig-atoll-1" *active-pool*) 'skip) + (send-event (process-by-name "hal-sewer-1" *active-pool*) 'skip) + (send-event (process-by-name "hal-escort-1" *active-pool*) 'skip) + (send-event (process-by-name "squid-2" *active-pool*) 'skip) + (send-event (process-by-name "metalkor-1" *active-pool*) 'skip) + (send-event (process-by-name "sig-under-1" *active-pool*) 'skip) + (send-event (process-by-name "scorpion-gun-manager-1" *active-pool*) 'skip) + (send-event (process-by-name "terraformer-1" *active-pool*) 'skip) + ) + ) + (menu + "Bot Marks" + (flag "course spots" 1 display-bot-marks-toggle-pick-func) + (flag "task spots" 2 display-bot-marks-toggle-pick-func) + (flag "all on" 3 display-bot-marks-set-pick-func) + (flag "all off" 0 display-bot-marks-set-pick-func) + ) + ) + (menu + "Actor Compaction" + (flag "off" #f dm-compact-actor-pick-func) + (flag "on" #t dm-compact-actor-pick-func) + (flag "debug" debug dm-compact-actor-pick-func) + ) + (flag "Traffic height map" *display-traffic-height-map* dm-boolean-toggle-pick-func) + (flag "View Anims" *debug-view-anims* dm-boolean-toggle-pick-func) + (flag "Unkillable" *debug-unkillable* dm-boolean-toggle-pick-func) + (flag "Jak Vehicle Unkillable" *debug-player-vehicle-unkillable* dm-boolean-toggle-pick-func) + (flag "Regions" *execute-regions* dm-boolean-toggle-pick-func) + (flag "Region Marks" *display-region-marks* dm-boolean-toggle-pick-func) + (flag "Actor Vis" *vis-actors* dm-boolean-toggle-pick-func) + (float-var + "Entity clock" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *display* (nonzero? *display*)) + (update-rates! (-> *display* entity-clock) arg2) + ) + ) + ((or (not *display*) (zero? *display*)) + 0 + ) + (else + (-> *display* entity-clock clock-ratio) + ) + ) + ) + 4 + (new 'static 'bfloat :data 0.01) + #t + (new 'static 'bfloat) + (new 'static 'bfloat :data 1.0) + (new 'static 'bfloat :data 0.0001) + ) + (flag "Battle Marks" *display-battle-marks* dm-boolean-toggle-pick-func) + (menu + "Hover Marks" + (flag "Nav Network" *display-nav-network* dm-boolean-toggle-pick-func) + (flag "Debug Hover" *debug-hover* dm-boolean-toggle-pick-func) + ) + (flag "Path Marks" *display-path-marks* dm-boolean-toggle-pick-func) + (flag "Nav Marks" *display-nav-marks* dm-boolean-toggle-pick-func) + (flag "Vol Marks" *display-vol-marks* dm-boolean-toggle-pick-func) + (flag "Collision Marks" *display-collision-marks* dm-boolean-toggle-pick-func) + (menu + "Debug Actor" + (float-var "lod0-dist" 0 dm-debug-actor-lod-dist 10 (new 'static 'bfloat :data 1.0) #f 0 0 1) + (float-var "lod1-dist" 1 dm-debug-actor-lod-dist 10 (new 'static 'bfloat :data 1.0) #f 0 0 1) + (float-var "lod2-dist" 2 dm-debug-actor-lod-dist 10 (new 'static 'bfloat :data 1.0) #f 0 0 1) + (flag "Joint Axes" *display-joint-axes* dm-boolean-toggle-pick-func) + ) + (menu + "Actor Vis" + (flag "off" #f dm-actor-vis-pick-func) + (flag "box" box dm-actor-vis-pick-func) + (flag "sphere" sphere dm-actor-vis-pick-func) + (flag "all" #t dm-actor-vis-pick-func) + ) + (menu + "Actor Marks" + (flag "off" #f dm-actor-marks-pick-func) + (flag "alive entities" #t dm-actor-marks-pick-func) + (flag "all entities" full dm-actor-marks-pick-func) + (flag "processes" process dm-actor-marks-pick-func) + ) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Target" + (menu + "Mode" + (function + "normal" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (send-event *target* 'change-mode 'normal)) + ) + (function "racer" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'racer #f) + ) + ) + (function "flut" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'flut #f) + ) + ) + (function "board" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (logior! (-> *game-info* features) (game-feature board)) + (logior! (-> *game-info* debug-features) (game-feature board)) + (send-event *target* 'change-mode 'board #f) + ) + ) + (function "mech" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'mech #f) + ) + ) + (function "gun" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (logior! (-> *game-info* features) (game-feature gun)) + (logior! (-> *game-info* debug-features) (game-feature gun)) + (send-event *target* 'change-mode 'gun #f (pickup-type none)) + ) + ) + (function + "darkjak" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature darkjak) (-> *game-info* features))) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature darkjak) (-> *game-info* debug-features))) + ) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0)) + ) + ) + (function + "lightjak" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature lightjak) (-> *game-info* features))) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature lightjak) (-> *game-info* debug-features))) + ) + (send-event *target* 'change-mode 'lightjak #f 5) + ) + ) + (function "indax" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'indax #f #f) + ) + ) + (function + "invisible" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature artifact-invis) (-> *game-info* features))) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature artifact-invis) (-> *game-info* debug-features))) + ) + (send-event *target* 'change-mode 'invisible #f) + ) + ) + ) + (menu + "Pilot Mode" + (function "h-bike-a" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 0))) + (function "h-bike-b" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 1))) + (function "h-bike-c" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 2))) + (function "h-bike-d" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 6))) + (function "h-car-a" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 3))) + (function "h-car-b" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 4))) + (function "h-car-c" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 5))) + (function "h-hellcat" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 7))) + (function "h-warf" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 8))) + (function "h-glider" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 9))) + (function "h-sled" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 10))) + (function "v-turtle" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 12))) + (function "v-snake" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 13))) + (function "v-scorpion" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 14))) + (function "v-toad" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 15))) + (function "v-fox" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 16))) + (function "v-rhino" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 17))) + (function "v-mirage" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 18))) + (function "v-x-ride" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 19))) + (function "v-marauder" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 20))) + (function "v-faccar" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 21))) + (function "v-catapult" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 22))) + (function "v-marauder-b" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 23))) + (function "evantestbike" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 29))) + (function "test-car" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 25))) + (function "wbike-test" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (dm-pilot-mode 26))) + ) + (flag "Target" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (when (= arg1 (debug-menu-msg press)) + (if *target* + (stop 'debug) + (start 'debug (get-current-continue-forced *game-info*)) + ) + ) + *target* + ) + ) + (menu + "Darkjak" + (function + "get all" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (set! (-> *game-info* features) + (the-as + game-feature + (logior (game-feature darkjak darkjak-smack darkjak-bomb0 darkjak-bomb1 feature44 feature45) + (-> *game-info* features) + ) + ) + ) + (set! (-> *game-info* debug-features) + (the-as + game-feature + (logior (game-feature darkjak darkjak-smack darkjak-bomb0 darkjak-bomb1 feature44 feature45) + (-> *game-info* debug-features) + ) + ) + ) + (send-event *target* 'get-pickup (pickup-type eco-pill-dark) 100.0) + ) + ) + (function + "debug" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (set! (-> *game-info* features) + (the-as + game-feature + (logior (game-feature darkjak darkjak-smack darkjak-bomb0 darkjak-bomb1 feature44 feature45) + (-> *game-info* features) + ) + ) + ) + (set! (-> *game-info* debug-features) + (the-as + game-feature + (logior (game-feature darkjak darkjak-smack darkjak-bomb0 darkjak-bomb1 feature44 feature45) + (-> *game-info* debug-features) + ) + ) + ) + (send-event *target* 'get-pickup (pickup-type eco-pill-dark) 100.0) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage active bomb0 no-anim disable-force-on)) + ) + ) + (function + "manual" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature darkjak) (-> *game-info* features))) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature darkjak) (-> *game-info* debug-features))) + ) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0)) + ) + ) + (function + "rapid" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature darkjak) (-> *game-info* features))) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature darkjak) (-> *game-info* debug-features))) + ) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage bomb0)) + ) + ) + (function "smack" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0 bomb1)) + ) + ) + (function + "bomb0" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0 bomb1 invinc)) + ) + ) + (function + "bomb1" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0 bomb1 invinc giant)) + ) + ) + (function + "tracking" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0 bomb1 invinc giant no-anim)) + ) + ) + (function + "invinc" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event + *target* + 'change-mode + 'darkjak + #f + (darkjak-stage force-on bomb0 invinc giant no-anim disable-force-on) + ) + ) + ) + ) + (menu + "Lightjak" + (function + "get all" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (set! (-> *game-info* features) + (the-as + game-feature + (logior (game-feature lightjak lightjak-regen lightjak-swoop lightjak-freeze lightjak-shield) + (-> *game-info* features) + ) + ) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature lightjak) (-> *game-info* debug-features))) + ) + (send-event *target* 'get-pickup (pickup-type eco-pill-light) 100.0) + ) + ) + (function + "debug" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (set! (-> *game-info* features) + (the-as + game-feature + (logior (game-feature lightjak lightjak-regen lightjak-swoop lightjak-freeze lightjak-shield) + (-> *game-info* features) + ) + ) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature lightjak) (-> *game-info* debug-features))) + ) + (send-event *target* 'get-pickup (pickup-type eco-pill-light) 100.0) + (send-event *target* 'change-mode 'lightjak #f 6) + ) + ) + (function + "manual" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature lightjak) (-> *game-info* features))) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature lightjak) (-> *game-info* debug-features))) + ) + (send-event *target* 'change-mode 'lightjak #f 5) + ) + ) + (function + "normal" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature lightjak) (-> *game-info* features))) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature lightjak) (-> *game-info* debug-features))) + ) + (send-event *target* 'change-mode 'lightjak #f 4) + ) + ) + ) + (flag "Target Marks" *display-target-marks* dm-boolean-toggle-pick-func) + (flag "Gun Marks" *gun-marks* dm-boolean-toggle-pick-func) + (flag "Target Stats" *stats-target* dm-boolean-toggle-pick-func) + (flag "Sidekick Stats" *display-sidekick-stats* dm-boolean-toggle-pick-func) + (flag "Invulnerable" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (when (= arg1 (debug-menu-msg press)) + (if *target* + (logxor! (-> *target* target-flags) (target-flags tf2)) + ) + ) + (and *target* (logtest? (-> *target* target-flags) (target-flags tf2))) + ) + ) + (flag + "Endless Ammo" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (when (= arg1 (debug-menu-msg press)) + (if *target* + (set! (-> *target* target-flags) (logxor (target-flags tf16) (the-as int (-> *target* target-flags)))) + ) + ) + (and *target* (logtest? (target-flags tf16) (-> *target* target-flags))) + ) + ) + (function + "Full Stuff" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (send-event *target* 'get-pickup (pickup-type health) 1000.0) + (send-event *target* 'get-pickup (pickup-type shield) 1000.0) + (send-event *target* 'get-pickup (pickup-type skill) 100.0) + (send-event *target* 'get-pickup (pickup-type gem) 100.0) + (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) + (send-event *target* 'get-pickup (pickup-type eco-pill-dark) 100.0) + (send-event *target* 'get-pickup (pickup-type eco-pill-light) 100.0) + (set! (-> *game-info* features) + (the-as + game-feature + (logior (game-feature + gun + gun-red-1 + gun-red-2 + gun-red-3 + gun-yellow-1 + gun-yellow-2 + gun-yellow-3 + gun-blue-1 + gun-blue-2 + gun-blue-3 + gun-dark-1 + gun-dark-2 + gun-dark-3 + board + darkjak + ) + (-> *game-info* features) + ) + ) + ) + (let ((v0-10 + (logior (game-feature gun gun-red-1 gun-yellow-1 gun-blue-1 gun-dark-1 board darkjak) + (-> *game-info* debug-features) + ) + ) + ) + (set! (-> *game-info* debug-features) (the-as game-feature v0-10)) + v0-10 + ) + ) + ) + (function + "Dump Stuff" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (send-event *target* 'get-pickup (pickup-type shield) -1000.0) + (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) + ) + ) + (function + "Trick Mode" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (send-event *target* 'get-pickup (pickup-type trick-judge) 18000.0) + ) + ) + (function + "Reset Trans" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (when *target* + (position-in-front-of-camera! (target-pos 0) 40960.0 4096.0) + (set! (-> *target* control transv quad) (the-as uint128 0)) + (quaternion-identity! (-> *target* control quat)) + (quaternion-identity! (-> *target* control quat-for-control)) + (quaternion-identity! (-> *target* control dir-targ)) + ) + ) + ) + (function + "Zero Trans" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (when *target* + (set-vector! (-> *target* control trans) 0.0 163840.0 0.0 1.0) + (set! (-> *target* control transv quad) (the-as uint128 0)) + (quaternion-identity! (-> *target* control quat)) + (quaternion-identity! (-> *target* control quat-for-control)) + (quaternion-identity! (-> *target* control dir-targ)) + ) + ) + ) + (flag "Slow Frame Rate" *slow-frame-rate* dm-boolean-toggle-pick-func) + (function "Print Pos" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((v1-0 (target-pos 0))) + (format #t "~6,,2m ~6,,2m ~6,,2m~%" (-> v1-0 x) (-> v1-0 y) (-> v1-0 z)) + ) + 0 + ) + ) + (flag "Goggles" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (when (= arg1 (debug-menu-msg press)) + (cond + ((not *target*) + ) + ((= (-> *target* goggles-interp-targ) 0.0) + (set! (-> *target* goggles-interp-targ) 1.0) + ) + (else + (set! (-> *target* goggles-interp-targ) 0.0) + ) + ) + ) + (if *target* + (!= (-> *target* goggles-interp-targ) 0.0) + #f + ) + ) + ) + (flag "Scarf" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (when (= arg1 (debug-menu-msg press)) + (cond + ((not *target*) + ) + ((= (-> *target* scarf-interp-targ) 0.0) + (set! (-> *target* scarf-interp-targ) 1.0) + ) + (else + (set! (-> *target* scarf-interp-targ) 0.0) + ) + ) + ) + (if *target* + (!= (-> *target* scarf-interp-targ) 0.0) + #f + ) + ) + ) + (function + "Save Continue" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (if *target* + (trsq->continue-point (-> *target* control)) + ) + ) + ) + (flag "RC Board Controls" *target-rc-board-controls* dm-boolean-toggle-pick-func) + ) + ) + ) + (debug-menu-append-item s5-0 (debug-menu-make-camera-menu arg0)) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Racing" + (flag "Desertb" 0 dm-select-race-pick-func) + (flag "Desert Rally" 2 dm-select-race-pick-func) + (int-var "Select Path" 0 dm-select-race-path 10 1 #t 0 7) + (menu + "Race Marks" + (flag "Path 0 (Red)" 1 display-race-marks-toggle-pick-func) + (flag "Path 1 (Green)" 2 display-race-marks-toggle-pick-func) + (flag "Path 2 (Blue)" 4 display-race-marks-toggle-pick-func) + (flag "Path 3 (Yellow)" 8 display-race-marks-toggle-pick-func) + (flag "Path 4 (Cyan)" 16 display-race-marks-toggle-pick-func) + (flag "Path 5 (Violet)" 32 display-race-marks-toggle-pick-func) + (flag "Path 6 (Orange)" 64 display-race-marks-toggle-pick-func) + (flag "Path 7 (Black)" 128 display-race-marks-toggle-pick-func) + (flag "All Paths On" 255 display-race-marks-set-pick-func) + (flag "All Off" 0 display-race-marks-set-pick-func) + ) + (flag "Race Mesh" *display-race-mesh* dm-boolean-toggle-pick-func) + (function + "Record Selected Path" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (set! *race-record-path* #t) + (dm-play-race *select-race* #t) + ) + ) + (function + "Play Race" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (set! *race-record-path* #f) + (dm-play-race *select-race* #f) + ) + ) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Nav Graph" + (function + "Start Editor" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (when (not (get-nav-graph-editor)) + (let ((t9-1 run-nav-graph-editor) + (a0-1 'test) + ) + (t9-1 a0-1) + ) + ) + ) + ) + (function + "Exit Editor" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (if (get-nav-graph-editor) + (exit-nav-graph-editor) + ) + ) + ) + (function + "Toggle Plane Mode" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (if a0-1 + ((method-of-object a0-1 nav-graph-editor-method-64)) + ) + ) + ) + ) + (function + "Toggle Hover Mode" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (if a0-1 + ((method-of-object a0-1 nav-graph-editor-method-65)) + ) + ) + ) + ) + (menu + "Load" + (function + "Hover Foresta" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'hover + 'foresta + (t9-1) + ) + ) + ) + ) + ) + (function + "Hover Sewc" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'hover + 'sewc + (t9-1) + ) + ) + ) + ) + ) + (function + "Hover Sewg" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'hover + 'sewg + (t9-1) + ) + ) + ) + ) + ) + (function + "Hover Sewl" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'hover + 'sewl + (t9-1) + ) + ) + ) + ) + ) + (function + "Traffic" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'traffic + (t9-1) + ) + ) + ) + ) + ) + (function + "Minimap" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'minimap + (t9-1) + ) + ) + ) + ) + ) + (function + "flyingsaw_2" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'flyingsaw_2 + (t9-1) + ) + ) + ) + ) + ) + (function + "flyingsaw_3" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'flyingsaw_3 + (t9-1) + ) + ) + ) + ) + ) + (function + "forest-plant-1" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'forest-plant-1 + (t9-1) + ) + ) + ) + ) + ) + (function + "forest-plant-2" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'forest-plant-2 + (t9-1) + ) + ) + ) + ) + ) + (function + "forest-plant-3" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'forest-plant-3 + (t9-1) + ) + ) + ) + ) + ) + (function + "forest-plant-4" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'forest-plant-4 + (t9-1) + ) + ) + ) + ) + ) + (function + "Desert Beast" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'beast + (t9-1) + ) + ) + ) + ) + ) + (function + "Was Minimap" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'wasminimap + (t9-1) + ) + ) + ) + ) + ) + (function + "Desert Rescue" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'desrescue + (t9-1) + ) + ) + ) + ) + ) + (function + "Assault" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'assault + (t9-1) + ) + ) + ) + ) + ) + (function + "Timer Chase 1" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'timer-chase-1 + (t9-1) + ) + ) + ) + ) + ) + (function + "ProtectHQ" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'protect-hq + (t9-1) + ) + ) + ) + ) + ) + (function + "Blow Tower" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'blow-tower + (t9-1) + ) + ) + ) + ) + ) + (function + "desert-lizard" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'desert-lizard + (t9-1) + ) + ) + ) + ) + ) + (function + "terraformer-walk" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'terraformer-walk + (t9-1) + ) + ) + ) + ) + ) + (function + "terraformer-fly" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'terraformer-fly + (t9-1) + ) + ) + ) + ) + ) + (function + "Desert Beast Battle" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'beast-battle + (t9-1) + ) + ) + ) + ) + ) + (function + "Desert Chase Marauder" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (when a0-1 + (let ((t9-1 (method-of-object a0-1 nav-graph-editor-method-66))) + 'desert-chase-marauder + (t9-1) + ) + ) + ) + ) + ) + ) + (function + "Save" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (let ((a0-1 (get-nav-graph-editor))) + (if a0-1 + ((method-of-object a0-1 nav-graph-editor-method-67)) + ) + ) + ) + ) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Nav Mesh" + (function + "Start Editor" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (when (not *nav-mesh-editor*) + (kill-by-type nav-mesh-editor *active-pool*) + (let ((gp-0 (get-process *default-dead-pool* nav-mesh-editor #x4000 1))) + (when gp-0 + (let ((t9-2 (method-of-type nav-mesh-editor activate))) + (t9-2 (the-as nav-mesh-editor gp-0) *entity-pool* "nav-mesh-editor" (the-as pointer #x70004000)) + ) + (let ((t9-3 run-function-in-process) + (a0-4 gp-0) + (a1-4 nav-mesh-editor-init) + ) + ((the-as (function object object none) t9-3) a0-4 a1-4) + ) + (-> gp-0 ppointer) + ) + ) + ) + ) + ) + (function + "Exit Editor" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) (kill-by-type nav-mesh-editor *active-pool*)) + ) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Ocean" + (menu + "Ocean Height" + (flag "zero" 1 dm-ocean-height-func) + (flag "far-below" 2 dm-ocean-height-func) + (flag "sewer-start" 3 dm-ocean-height-func) + (flag "sewer-hi" 4 dm-ocean-height-func) + (flag "sewer-med" 5 dm-ocean-height-func) + (flag "sewer-lo" 6 dm-ocean-height-func) + ) + (menu + "Ocean Subdiv" + (flag "Textured" 0 dm-ocean-subdiv-draw-func) + (flag "Outline" 1 dm-ocean-subdiv-draw-func) + (flag "Gouraud" 2 dm-ocean-subdiv-draw-func) + ) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Time of day" + (flag "7am sunrise" 0 dm-time-of-day-func) + (flag "10am morning" 1 dm-time-of-day-func) + (flag "12pm noon" 2 dm-time-of-day-func) + (flag "2pm afternoon" 3 dm-time-of-day-func) + (flag "6pm sunset" 4 dm-time-of-day-func) + (flag "7pm twilight" 5 dm-time-of-day-func) + (flag "11pm evening" 6 dm-time-of-day-func) + (flag "4am green sun" 7 dm-time-of-day-func) + (flag "palette 0" 16 dm-time-of-day-func) + (flag "palette 1" 32 dm-time-of-day-func) + (flag "palette 2" 64 dm-time-of-day-func) + (flag "palette 3" 128 dm-time-of-day-func) + (flag "palette 4" 256 dm-time-of-day-func) + (flag "palette 5" 512 dm-time-of-day-func) + (flag "palette 6" 1024 dm-time-of-day-func) + (flag "palette 7" 2048 dm-time-of-day-func) + (flag "on" #f dm-time-of-day-pick-func) + (flag "Fast" *time-of-day-fast* dm-time-of-day-func2) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Mood" + (flag + "Overide Enable" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *time-of-day-context* overide-enable) (not (-> *time-of-day-context* overide-enable))) + ) + (-> *time-of-day-context* overide-enable) + ) + ) + (menu + "Weather" + (flag + "Overide Weather Enable" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *mood-control* overide-weather-flag) (not (-> *mood-control* overide-weather-flag))) + ) + (-> *mood-control* overide-weather-flag) + ) + ) + (flag + "Display Values" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (if (= arg1 (debug-menu-msg press)) + (set! (-> *mood-control* display-flag) (not (-> *mood-control* display-flag))) + ) + (-> *mood-control* display-flag) + ) + ) + (float-var + "Clouds" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *mood-control* (nonzero? *mood-control*)) + (set! (-> *mood-control* overide cloud) arg2) + ) + ) + ((or (not *mood-control*) (zero? *mood-control*)) + 0 + ) + (else + (-> *mood-control* overide cloud) + ) + ) + ) + 1 + (new 'static 'bfloat :data 0.00390625) + #t + 0 + (new 'static 'bfloat :data 1.0) + 0 + ) + (float-var + "Fog" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *mood-control* (nonzero? *mood-control*)) + (set! (-> *mood-control* overide fog) arg2) + ) + ) + ((or (not *mood-control*) (zero? *mood-control*)) + 0 + ) + (else + (-> *mood-control* overide fog) + ) + ) + ) + 1 + (new 'static 'bfloat :data 0.00390625) + #t + 0 + (new 'static 'bfloat :data 1.0) + 0 + ) + ) + (menu + "Colors" + (flag "7am sunrise" 0 dm-time-of-day-func) + (flag "10am morning" 1 dm-time-of-day-func) + (flag "12pm noon" 2 dm-time-of-day-func) + (flag "2pm afternoon" 3 dm-time-of-day-func) + (flag "6pm sunset" 4 dm-time-of-day-func) + (flag "7pm twilight" 5 dm-time-of-day-func) + (flag "11pm evening" 6 dm-time-of-day-func) + (flag "4am green sun" 7 dm-time-of-day-func) + (flag "time of day on" #f dm-time-of-day-pick-func) + (float-var + "Ambient Red" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-color-table* (nonzero? *overide-mood-color-table*)) + (set! (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + amb-color + x + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-color-table*) (zero? *overide-mood-color-table*)) + 0 + ) + (else + (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + amb-color + x + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Ambient Green" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-color-table* (nonzero? *overide-mood-color-table*)) + (set! (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + amb-color + y + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-color-table*) (zero? *overide-mood-color-table*)) + 0 + ) + (else + (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + amb-color + y + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Ambient Blue" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-color-table* (nonzero? *overide-mood-color-table*)) + (set! (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + amb-color + z + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-color-table*) (zero? *overide-mood-color-table*)) + 0 + ) + (else + (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + amb-color + z + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Ambient Mult" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-color-table* (nonzero? *overide-mood-color-table*)) + (set! (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + amb-color + w + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-color-table*) (zero? *overide-mood-color-table*)) + 0 + ) + (else + (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + amb-color + w + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + 2 + 0 + ) + (float-var + "Light Red" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-color-table* (nonzero? *overide-mood-color-table*)) + (set! (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + lgt-color + x + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-color-table*) (zero? *overide-mood-color-table*)) + 0 + ) + (else + (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + lgt-color + x + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Light Green" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-color-table* (nonzero? *overide-mood-color-table*)) + (set! (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + lgt-color + y + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-color-table*) (zero? *overide-mood-color-table*)) + 0 + ) + (else + (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + lgt-color + y + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Light Blue" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-color-table* (nonzero? *overide-mood-color-table*)) + (set! (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + lgt-color + z + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-color-table*) (zero? *overide-mood-color-table*)) + 0 + ) + (else + (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + lgt-color + z + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Light Mult" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-color-table* (nonzero? *overide-mood-color-table*)) + (set! (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + lgt-color + w + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-color-table*) (zero? *overide-mood-color-table*)) + 0 + ) + (else + (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + lgt-color + w + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + 2 + 0 + ) + (function + "reset selected time" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (mem-copy! + (the-as + pointer + (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + ) + ) + (the-as + pointer + (-> *debug-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + ) + ) + 32 + ) + (set! (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + lgt-color + w + ) + 1.0 + ) + (set! (-> *overide-mood-color-table* + data + (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2)) + amb-color + w + ) + 1.0 + ) + ) + ) + (function + "reset all times" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (mem-copy! (the-as pointer *overide-mood-color-table*) (the-as pointer *debug-mood-color-table*) 256) + (dotimes (v1-0 8) + (set! (-> *overide-mood-color-table* data v1-0 lgt-color w) 1.0) + (set! (-> *overide-mood-color-table* data v1-0 amb-color w) 1.0) + ) + #f + ) + ) + ) + (menu + "Fog" + (flag "7am sunrise" 0 dm-time-of-day-func) + (flag "10am morning" 1 dm-time-of-day-func) + (flag "12pm noon" 2 dm-time-of-day-func) + (flag "2pm afternoon" 3 dm-time-of-day-func) + (flag "6pm sunset" 4 dm-time-of-day-func) + (flag "7pm twilight" 5 dm-time-of-day-func) + (flag "11pm evening" 6 dm-time-of-day-func) + (flag "4am green sun" 7 dm-time-of-day-func) + (flag "time of day on" #f dm-time-of-day-pick-func) + (float-var + "Red" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-fog-table* (nonzero? *overide-mood-fog-table*)) + (set! (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-color + x + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-fog-table*) (zero? *overide-mood-fog-table*)) + 0 + ) + (else + (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-color + x + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 1.0) + #t + 0 + 255 + 0 + ) + (float-var + "Green" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-fog-table* (nonzero? *overide-mood-fog-table*)) + (set! (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-color + y + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-fog-table*) (zero? *overide-mood-fog-table*)) + 0 + ) + (else + (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-color + y + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 1.0) + #t + 0 + 255 + 0 + ) + (float-var + "Blue" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-fog-table* (nonzero? *overide-mood-fog-table*)) + (set! (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-color + z + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-fog-table*) (zero? *overide-mood-fog-table*)) + 0 + ) + (else + (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-color + z + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 1.0) + #t + 0 + 255 + 0 + ) + (float-var + "Mult" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-fog-table* (nonzero? *overide-mood-fog-table*)) + (set! (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-color + w + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-fog-table*) (zero? *overide-mood-fog-table*)) + 0 + ) + (else + (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-color + w + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.00390625) + #t + 0 + 1 + 0 + ) + (float-var + "Start" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-fog-table* (nonzero? *overide-mood-fog-table*)) + (set! (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + x + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-fog-table*) (zero? *overide-mood-fog-table*)) + 0 + ) + (else + (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + x + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 1.0) + #t + -1000 + 10000 + 0 + ) + (float-var + "End" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-fog-table* (nonzero? *overide-mood-fog-table*)) + (set! (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + y + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-fog-table*) (zero? *overide-mood-fog-table*)) + 0 + ) + (else + (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + y + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 1.0) + #t + 0 + 10000 + 0 + ) + (float-var + "Max" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-fog-table* (nonzero? *overide-mood-fog-table*)) + (set! (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + w + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-fog-table*) (zero? *overide-mood-fog-table*)) + 0 + ) + (else + (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + w + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.5) + #t + 0 + 255 + 0 + ) + (float-var + "Min" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *overide-mood-fog-table* (nonzero? *overide-mood-fog-table*)) + (set! (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + z + ) + arg2 + ) + ) + ) + ((or (not *overide-mood-fog-table*) (zero? *overide-mood-fog-table*)) + 0 + ) + (else + (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + z + ) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.5) + #t + 0 + 255 + 0 + ) + (function + "reset selected time" + #f + ,(lambda () + (mem-copy! + (the-as + pointer + (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + ) + ) + (the-as + pointer + (-> *debug-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + ) + ) + 48 + ) + (set! (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-color + w + ) + 1.0 + ) + (set! (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + x + ) + (* 0.00024414062 + (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + x + ) + ) + ) + (set! (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + y + ) + (* 0.00024414062 + (-> *overide-mood-fog-table* + data + (the-as uint (logand (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1 unk2))) + fog-dists + y + ) + ) + ) + ) + ) + (function + "reset all times" + #f + ,(lambda () + (mem-copy! (the-as pointer *overide-mood-fog-table*) (the-as pointer *debug-mood-fog-table*) 384) + (dotimes (v1-0 8) + (set! (-> *overide-mood-fog-table* data v1-0 fog-color w) 1.0) + (set! (-> *overide-mood-fog-table* data v1-0 fog-dists x) + (* 0.00024414062 (-> *overide-mood-fog-table* data v1-0 fog-dists x)) + ) + (set! (-> *overide-mood-fog-table* data v1-0 fog-dists y) + (* 0.00024414062 (-> *overide-mood-fog-table* data v1-0 fog-dists y)) + ) + ) + #f + ) + ) + ) + (menu + "Palette" + (flag "palette 0" 0 dm-time-of-day-palette-func) + (flag "palette 1" 1 dm-time-of-day-palette-func) + (flag "palette 2" 2 dm-time-of-day-palette-func) + (flag "palette 3" 3 dm-time-of-day-palette-func) + (flag "palette 4" 4 dm-time-of-day-palette-func) + (flag "palette 5" 5 dm-time-of-day-palette-func) + (flag "palette 6" 6 dm-time-of-day-palette-func) + (flag "palette 7" 7 dm-time-of-day-palette-func) + (flag "time of day on" #f dm-time-of-day-pick-func) + (float-var + "Red" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *time-of-day-context* (nonzero? *time-of-day-context*)) + (set! (-> *time-of-day-context* times (-> *time-of-day-context* overide-palette) x) arg2) + ) + ) + ((or (not *time-of-day-context*) (zero? *time-of-day-context*)) + 0 + ) + (else + (-> *time-of-day-context* times (-> *time-of-day-context* overide-palette) x) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Green" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *time-of-day-context* (nonzero? *time-of-day-context*)) + (set! (-> *time-of-day-context* times (-> *time-of-day-context* overide-palette) y) arg2) + ) + ) + ((or (not *time-of-day-context*) (zero? *time-of-day-context*)) + 0 + ) + (else + (-> *time-of-day-context* times (-> *time-of-day-context* overide-palette) y) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Blue" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *time-of-day-context* (nonzero? *time-of-day-context*)) + (set! (-> *time-of-day-context* times (-> *time-of-day-context* overide-palette) z) arg2) + ) + ) + ((or (not *time-of-day-context*) (zero? *time-of-day-context*)) + 0 + ) + (else + (-> *time-of-day-context* times (-> *time-of-day-context* overide-palette) z) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Mult" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *time-of-day-context* (nonzero? *time-of-day-context*)) + (set! (-> *time-of-day-context* times (-> *time-of-day-context* overide-palette) w) arg2) + ) + ) + ((or (not *time-of-day-context*) (zero? *time-of-day-context*)) + 0 + ) + (else + (-> *time-of-day-context* times (-> *time-of-day-context* overide-palette) w) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (function + "reset selected time" + #f + ,(lambda () (let ((v0-0 (-> *time-of-day-context* times (-> *time-of-day-context* overide-palette)))) + (set! (-> v0-0 x) 1.0) + (set! (-> v0-0 y) 1.0) + (set! (-> v0-0 z) 1.0) + (set! (-> v0-0 w) 1.0) + v0-0 + ) + ) + ) + (function "reset all times" #f ,(lambda () + (dotimes (v1-0 8) + (set-vector! (-> *time-of-day-context* times v1-0) 1.0 1.0 1.0 1.0) + ) + #f + ) + ) + ) + (menu + "Filter" + (float-var + "Red" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *time-of-day-context* (nonzero? *time-of-day-context*)) + (set! (-> *time-of-day-context* filter-color x) arg2) + ) + ) + ((or (not *time-of-day-context*) (zero? *time-of-day-context*)) + 0 + ) + (else + (-> *time-of-day-context* filter-color x) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Green" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *time-of-day-context* (nonzero? *time-of-day-context*)) + (set! (-> *time-of-day-context* filter-color y) arg2) + ) + ) + ((or (not *time-of-day-context*) (zero? *time-of-day-context*)) + 0 + ) + (else + (-> *time-of-day-context* filter-color y) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Blue" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *time-of-day-context* (nonzero? *time-of-day-context*)) + (set! (-> *time-of-day-context* filter-color z) arg2) + ) + ) + ((or (not *time-of-day-context*) (zero? *time-of-day-context*)) + 0 + ) + (else + (-> *time-of-day-context* filter-color z) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + (new 'static 'bfloat :data 1.9921875) + 0 + ) + (float-var + "Mult" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *time-of-day-context* (nonzero? *time-of-day-context*)) + (set! (-> *time-of-day-context* filter-color w) arg2) + ) + ) + ((or (not *time-of-day-context*) (zero? *time-of-day-context*)) + 0 + ) + (else + (-> *time-of-day-context* filter-color w) + ) + ) + ) + 2 + (new 'static 'bfloat :data 0.007781982) + #t + 0 + 2 + 0 + ) + (function "reset filter" #f ,(lambda () (let ((v0-0 (-> *time-of-day-context* filter-color))) + (set! (-> v0-0 x) 1.0) + (set! (-> v0-0 y) 1.0) + (set! (-> v0-0 z) 1.0) + (set! (-> v0-0 w) 1.0) + v0-0 + ) + ) + ) + ) + (menu + "Sky" + (float-var + "Cloud Min" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *time-of-day-context* (nonzero? *time-of-day-context*)) + (set! (-> *time-of-day-context* current-clouds cloud-min) arg2) + ) + ) + ((or (not *time-of-day-context*) (zero? *time-of-day-context*)) + 0 + ) + (else + (-> *time-of-day-context* current-clouds cloud-min) + ) + ) + ) + 1 + (new 'static 'bfloat :data 0.00390625) + #t + 0 + 1 + 0 + ) + (float-var + "Cloud Max" + #f + ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (and *time-of-day-context* (nonzero? *time-of-day-context*)) + (set! (-> *time-of-day-context* current-clouds cloud-max) arg2) + ) + ) + ((or (not *time-of-day-context*) (zero? *time-of-day-context*)) + 0 + ) + (else + (-> *time-of-day-context* current-clouds cloud-max) + ) + ) + ) + 1 + (new 'static 'bfloat :data 0.00390625) + #t + 0 + 1 + 0 + ) + (function + "reset sky" + #f + ,(lambda () + (set! (-> *time-of-day-context* current-clouds cloud-min) (-> *mood-control* mood-clouds cloud-min)) + (set! (-> *time-of-day-context* current-clouds cloud-max) (-> *mood-control* mood-clouds cloud-max)) + ) + ) + ) + (function "Print mood tables" #f ,(lambda () (print-mood-tables))) + (function + "reset everything" + #f + ,(lambda () + (mem-copy! (the-as pointer *overide-mood-color-table*) (the-as pointer *debug-mood-color-table*) 256) + (mem-copy! (the-as pointer *overide-mood-fog-table*) (the-as pointer *debug-mood-fog-table*) 384) + (dotimes (v1-0 8) + (set! (-> *overide-mood-color-table* data v1-0 lgt-color w) 1.0) + (set! (-> *overide-mood-color-table* data v1-0 amb-color w) 1.0) + (set! (-> *overide-mood-fog-table* data v1-0 fog-color w) 1.0) + (set! (-> *overide-mood-fog-table* data v1-0 fog-dists x) + (* 0.00024414062 (-> *overide-mood-fog-table* data v1-0 fog-dists x)) + ) + (set! (-> *overide-mood-fog-table* data v1-0 fog-dists y) + (* 0.00024414062 (-> *overide-mood-fog-table* data v1-0 fog-dists y)) + ) + (set-vector! (-> *time-of-day-context* times v1-0) 1.0 1.0 1.0 1.0) + ) + (set-vector! (-> *time-of-day-context* filter-color) 1.0 1.0 1.0 1.0) + (set! (-> *time-of-day-context* current-clouds cloud-min) (-> *mood-control* mood-clouds cloud-min)) + (set! (-> *time-of-day-context* current-clouds cloud-max) (-> *mood-control* mood-clouds cloud-max)) + ) + ) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Sound" + (flag "Effect Debug" *debug-effect-control* dm-boolean-toggle-pick-func) + (flag "Regions" *execute-regions* dm-boolean-toggle-pick-func) + (flag "Region Marks" *display-region-marks* dm-boolean-toggle-pick-func) + (flag "Sound channels" *display-iop-info* dm-boolean-toggle-pick-func) + (function "Reload Banks" #f sound-bank-reload) + (function "List Sounds" #f ,(lambda () (list-sounds))) + (function "IOP Info" #f ,(lambda () (loader-test-command (sound-command iop-mem) (the-as uint 0)))) + ) + ) + ) + (debug-menu-append-item s5-0 (debug-menu-make-shader-menu arg0)) + (debug-menu-append-item s5-0 (debug-menu-make-instance-menu arg0)) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Bug Report" + (flag "display" *display-bug-report* dm-boolean-toggle-pick-func) + (function "Start" #f ,(lambda () (bug-report-start))) + (function "Stop" #f ,(lambda () (bug-report-stop))) + ) + ) + ) + (debug-menu-append-item + s5-0 + (debug-menu-make-from-template + arg0 + '(menu + "Scene" + (menu + "Scene Info" + (flag "channel" 1 display-scene-control-toggle-pick-func) + (flag "anim name" 2 display-scene-control-toggle-pick-func) + (flag "dma size" 4 display-scene-control-toggle-pick-func) + (flag "bounds spheres" 8 display-scene-control-toggle-pick-func) + (flag "actors" 16 display-scene-control-toggle-pick-func) + (flag "actor-marks" 32 display-scene-control-toggle-pick-func) + (flag "special fma spheres" 64 display-scene-control-toggle-pick-func) + (flag "all on" 95 display-scene-control-set-pick-func) + (flag "all off" 0 display-scene-control-set-pick-func) + ) + (menu + "arena" + (function + "arena-training-1-intro" + ("waspala-intro-training" "arena-training-1-intro") + dm-scene-load-pick-func + ) + (function "arena-fight-1-intro" ("wasstada-pre-fight-1" "arena-fight-1-intro") dm-scene-load-pick-func) + (function "arena-fight-1-res" ("wasstada-fight" "arena-fight-1-res") dm-scene-load-pick-func) + (function "wascity-chase-intro" ("wasstada-wascity-chase" "wascity-chase-intro") dm-scene-load-pick-func) + (function "arena-fight-2-res" ("wasstada-fight" "arena-fight-2-res") dm-scene-load-pick-func) + (function "arena-fight-3-intro" ("wasstada-fight" "arena-fight-3-intro") dm-scene-load-pick-func) + (function "arena-fight-3-res" ("wasstada-fight" "arena-fight-3-res") dm-scene-load-pick-func) + ) + (menu + "city" + (function "sewer-hum-kg-entrance" ("ctyslumb-sewer" "sewer-hum-kg-entrance") dm-scene-load-pick-func) + (function "sewer-kg-entrance" ("ctyinda-sewer" "sewer-kg-entrance") dm-scene-load-pick-func) + (function "sewer-genb-entrance" ("ctygenb-sewer" "sewer-genb-entrance") dm-scene-load-pick-func) + (function "city-gun-course-intro" ("gungame-start" "city-gun-course-intro") dm-scene-load-pick-func) + (function "city-gun-course-1-res" ("gungame-start" "city-gun-course-1-res") dm-scene-load-pick-func) + (function "city-gun-course-2-intro" ("gungame-start" "city-gun-course-2-intro") dm-scene-load-pick-func) + (function "city-gun-course-2-res" ("gungame-start" "city-gun-course-2-res") dm-scene-load-pick-func) + (function "city-port-attack-intro-b" ("ctyport-hiphog" "ctyport-attack-get-on-nuke") dm-scene-load-pick-func) + (function "city-port-attack-res" ("ctyport-attack-res" "city-port-attack-res") dm-scene-load-pick-func) + (function "city-hijack-vehicle-res" ("ctyhijack-res" "city-hijack-vehicle-res") dm-scene-load-pick-func) + (function "city-get-dark-punch" ("mhcitya-fma" "city-get-dark-punch") dm-scene-load-pick-func) + (function "sewer-met-hum-intro" ("ctygenb-samos" "sewer-met-hum-intro") dm-scene-load-pick-func) + (function "city-destroy-grid-res" ("ctyinda-grid-res-a" "city-destroy-grid-res") dm-scene-load-pick-func) + (function "tower-destroy-intro" ("mhcityb-tower-fma" "tower-destroy-intro") dm-scene-load-pick-func) + ) + (menu + "desert" + (function "nest-destroy-barrier" ("desertg-egg-wall-scene" "nest-destroy-barrier") dm-scene-load-pick-func) + (function "nest-hunt-intro" ("desertg-egg-wall-scene" "nest-hunt-intro") dm-scene-load-pick-func) + (function "nest-hunt-res" ("desertg-hunt-res-start" "nest-hunt-res") dm-scene-load-pick-func) + (function + "desert-oasis-defense-res" + ("desert-ashelin-movie" "desert-oasis-defense-res") + dm-scene-load-pick-func + ) + (function "desert-rescue-res-a" ("desert-rescue-movie" "desert-rescue-res-a") dm-scene-load-pick-func) + (function "desert-hover-res" ("desert-hover-movie" "desert-hover-res") dm-scene-load-pick-func) + (function "desert-lizard-catch" ("desert-lizard-corral" "desert-lizard-catch") dm-scene-load-pick-func) + (function "desert-lizard-catch-2" ("desert-lizard-corral" "desert-lizard-catch-2") dm-scene-load-pick-func) + (function "desert-lizard-catch-3" ("desert-lizard-corral" "desert-lizard-resolution") dm-scene-load-pick-func) + (function + "desert-oasis-defense-res-b" + ("desert-ashelin-movie" "desert-oasis-defense-res-b") + dm-scene-load-pick-func + ) + (function "desert-glide-res" ("volcanox-vola-start" "desert-glide-res") dm-scene-load-pick-func) + (function "desert-courserace-win" ("desertg-hunt-res-start" "desert-courserace-win") dm-scene-load-pick-func) + (function + "desert-final-boss-res" + ("desert-final-boss-res-movie-a" "desert-final-boss-res") + dm-scene-load-pick-func + ) + (function + "desert-final-boss-res-b" + ("desert-final-boss-res-movie" "desert-final-boss-res-b") + dm-scene-load-pick-func + ) + (function + "desert-final-boss-intro" + ("wasall-final-boss-intro-movie" "desert-final-boss-intro") + dm-scene-load-pick-func + ) + (function + "full desert-jak-gets-on-terraformer" + ("desert-boss-res-a" ("desert-jak-gets-on-t-a" "desert-jak-gets-on-t-b" "desert-jak-gets-on-t-c")) + dm-scene-load-pick-func + ) + (function "desert-jak-gets-on-t-a" ("desert-boss-res-a" "desert-jak-gets-on-t-a") dm-scene-load-pick-func) + (function "desert-jak-gets-on-t-b" ("desert-boss-res-b" "desert-jak-gets-on-t-b") dm-scene-load-pick-func) + (function "desert-jak-gets-on-t-c" ("desert-boss-res-b" "desert-jak-gets-on-t-c") dm-scene-load-pick-func) + (function + "full outro" + ("desert-final-boss-res-movie-a" ("desert-final-boss-res" "desert-final-boss-res-b" "arena-outro")) + dm-scene-load-pick-func + ) + ) + (menu + "comb" + (function "comb-exit" ("combn-start" "comb-exit") dm-scene-load-pick-func) + (function "comb-entrance-temple" ("temple-comb-entrance" "comb-entrance-temple") dm-scene-load-pick-func) + (function "catacombs-wild-ride-res" ("railx-start" "catacombs-wild-ride-res") dm-scene-load-pick-func) + (function "catacomb-get-shield" ("combn-start" "catacomb-get-shield") dm-scene-load-pick-func) + ) + (menu + "factory" + (function "factory-sky-battle-res" ("factorya-movie" "factory-sky-battle-res") dm-scene-load-pick-func) + (function + "factory-sky-battle-intro-b" + ("factorya-intro-b" "factory-sky-battle-intro-b") + dm-scene-load-pick-func + ) + (function "factory-indax-1-intro" ("factoryc-start" "factory-indax-1-intro") dm-scene-load-pick-func) + (function "factory-indax-2-intro" ("factoryc-start" "factory-indax-2-intro") dm-scene-load-pick-func) + (function "factory-indax-3-intro" ("factoryc-start" "factory-indax-3-intro") dm-scene-load-pick-func) + (function "factory-indax-4-intro" ("factoryc-start" "factory-indax-4-intro") dm-scene-load-pick-func) + (function "factory-boss-intro" ("factoryd-start" "factory-boss-intro") dm-scene-load-pick-func) + (function "factory-boss-res" ("factoryd-res-fma" "factory-boss-res") dm-scene-load-pick-func) + ) + (menu + "forest" + (function "forest-tower" ("foresta-start" "forest-tower") dm-scene-load-pick-func) + (function + "forest-turn-on-machine-res" + ("forest-pillar-start" "forest-turn-on-machine-res") + dm-scene-load-pick-func + ) + (function "precursor-tour-res" ("precura-foresta" "precursor-tour-res") dm-scene-load-pick-func) + (function "forest-ring-chase-res" ("foresta-start" "forest-ring-chase-res") dm-scene-load-pick-func) + (function "forest-res-b" ("foresta-start" "forest-res-b") dm-scene-load-pick-func) + ) + (menu + "freehq" + (function "factory-sky-battle-intro" ("freehq-movie" "factory-sky-battle-intro") dm-scene-load-pick-func) + (function "city-protect-hq-intro" ("freehq-movie" "city-protect-hq-intro") dm-scene-load-pick-func) + (function "city-protect-hq-res" ("freehq-movie" "city-protect-hq-res") dm-scene-load-pick-func) + (function "city-blow-tower-intro" ("freehq-movie" "city-blow-tower-intro") dm-scene-load-pick-func) + (function "temple-defend-intro" ("freehq-movie" "temple-defend-intro") dm-scene-load-pick-func) + ) + (menu + "hiphog" + (function "sewer-kg-met-intro" ("hiphog-movie" "sewer-kg-met-intro") dm-scene-load-pick-func) + (function "port-assault-intro" ("hiphog-movie" "port-assault-intro") dm-scene-load-pick-func) + (function "city-blow-barricade-intro" ("hiphog-movie" "city-blow-barricade-intro") dm-scene-load-pick-func) + (function "city-blow-barricade-res" ("hiphog-movie" "city-blow-barricade-res") dm-scene-load-pick-func) + (function "city-port-fight-intro" ("hiphog-movie" "city-port-fight-intro") dm-scene-load-pick-func) + (function "city-sniper-fight-intro" ("hiphog-movie" "city-sniper-fight-intro") dm-scene-load-pick-func) + (function "city-port-attack-intro" ("hiphog-movie" "city-port-attack-intro") dm-scene-load-pick-func) + ) + (menu + "intro" + (function + "full intro" + ("wasintro-start" ("intro-drop" "intro-lost" "intro-ffhq" "intro-tired" "intro-palace" "intro-rescue")) + dm-scene-load-pick-func + ) + (function "intro-drop" ("wasintro-start" "intro-drop") dm-scene-load-pick-func) + (function "intro-lost" ("wasintro-start" "intro-lost") dm-scene-load-pick-func) + (function "intro-ffhq" ("freehq-intro" "intro-ffhq") dm-scene-load-pick-func) + (function "intro-tired" ("wasintro-tired" "intro-tired") dm-scene-load-pick-func) + (function "intro-palace" ("wasintro-palace" "intro-palace") dm-scene-load-pick-func) + (function "intro-rescue" ("wasintro-rescue" "intro-rescue") dm-scene-load-pick-func) + ) + (menu + "mine" + (function "catacombs-travel-res" ("minec-start" "catacombs-travel-res") dm-scene-load-pick-func) + (function "mine-train-intro" ("mineb-elevator-room" "mine-train-intro") dm-scene-load-pick-func) + (function "mine-train-res" ("minec-train" "mine-train-res") dm-scene-load-pick-func) + (function "mine-boss-intro" ("prebot-intro" "mine-boss-intro") dm-scene-load-pick-func) + (function "prebot-hit-a" ("prebot-fight" "prebot-hit-a") dm-scene-load-pick-func) + (function "prebot-hit-b" ("prebot-fight" "prebot-hit-b") dm-scene-load-pick-func) + (function "mine-boss-res" ("prebot-fight" "mine-boss-res") dm-scene-load-pick-func) + (function "minee-genb-exit" ("minee-exit" "minee-genb-exit") dm-scene-load-pick-func) + (function "mine-explore-res" ("mineb-elevator-room" "mine-explore-res") dm-scene-load-pick-func) + ) + (menu + "onintent" + (function + "city-find-catacomb-ent-intro" + ("onintent-start" "city-find-catacomb-ent-intro") + dm-scene-load-pick-func + ) + ) + (menu "outro" (function "arena-outro" ("wasstada-outro" "arena-outro") dm-scene-load-pick-func)) + (menu + "precursor" + (function "precursor-destroy-ship-res" ("precurd-start" "precursor-destroy-ship-res") dm-scene-load-pick-func) + (function "desert-final-boss-intro-a" ("precurd-escape" "desert-final-boss-intro-a") dm-scene-load-pick-func) + (function + "precursor-destroy-ship-exp-res" + ("precurd-escape" "precursor-destroy-ship-exp-res") + dm-scene-load-pick-func + ) + (function + "precursor-destroy-ship-lose" + ("precura-start" "precursor-destroy-ship-lose") + dm-scene-load-pick-func + ) + (function + "full final-boss-intro" + ("precurd-escape" ("desert-final-boss-intro-a" "precursor-destroy-ship-exp-res" "desert-final-boss-intro")) + dm-scene-load-pick-func + ) + ) + (menu + "rubble" + (function "palace-ruins-attack-intro" ("rubblea-start" "palace-ruins-attack-intro") dm-scene-load-pick-func) + (function + "full palace-ruins-attack-res" + ("rubblec-fma" ("palace-ruins-attack-res-a" "palace-ruins-attack-res")) + dm-scene-load-pick-func + ) + (function "palace-ruins-attack-res" ("rubblec-fma" "palace-ruins-attack-res") dm-scene-load-pick-func) + (function "palace-ruins-attack-res-a" ("rubblec-fma" "palace-ruins-attack-res-a") dm-scene-load-pick-func) + (function "palace-ruins-patrol-intro" ("stadium-tunnel" "palace-ruins-patrol-intro") dm-scene-load-pick-func) + ) + (menu + "sewer" + (function "sewer-kg-exit" ("sewf-start" "sewer-kg-exit") dm-scene-load-pick-func) + (function "sewer-mh-exit" ("sewj-exit" "sewer-mh-exit") dm-scene-load-pick-func) + (function "sewer-port-exit" ("sewo-exit" "sewer-port-exit") dm-scene-load-pick-func) + (function "sewer-waterslide" ("sewd-start" "sewer-waterslide") dm-scene-load-pick-func) + (function "sewer-hum-kg-res" ("sewe-switch" "sewer-hum-kg-res") dm-scene-load-pick-func) + (function "sewer-met-hum-intro" ("ctygenb-samos" "sewer-met-hum-intro") dm-scene-load-pick-func) + ) + (menu + "temple" + (function "temple-climb-intro" ("templex-start" "temple-climb-intro") dm-scene-load-pick-func) + (function "temple-climb-res" ("templex-pre-hang" "temple-climb-res") dm-scene-load-pick-func) + (function "temple-oracle-intro" ("templeb-oracle-movie" "temple-oracle-intro") dm-scene-load-pick-func) + (function "temple-oracle-res" ("templeb-start" "temple-oracle-res") dm-scene-load-pick-func) + (function + "temple-jak-gets-light-glide" + ("templeb-glide" "temple-jak-gets-light-glide") + dm-scene-load-pick-func + ) + (function "temple-tests-res-a" ("templeb-flash-freeze" "temple-tests-res-a") dm-scene-load-pick-func) + (function "temple-tests-res-b" ("comba-elevator" "temple-tests-res-b") dm-scene-load-pick-func) + (function "temple-tests-intro" ("templea-mardoor" "temple-tests-intro") dm-scene-load-pick-func) + (function "temple-defend-res" ("templed-start" "temple-defend-res") dm-scene-load-pick-func) + ) + (menu + "throne" + (function + "full training intro" + ("waspala-intro-training" ("intro-training" "arena-training-1-intro")) + dm-scene-load-pick-func + ) + (function "intro-training" ("waspala-intro-training" "intro-training") dm-scene-load-pick-func) + (function "arena-fight-2-intro" ("waspala-start" "arena-fight-2-intro") dm-scene-load-pick-func) + (function "nest-eggs-intro" ("waspala-start" "nest-eggs-intro") dm-scene-load-pick-func) + (function "desert-rescue-intro" ("waspala-start" "desert-rescue-intro") dm-scene-load-pick-func) + (function "desert-jump-mission-intro" ("waspala-start" "desert-jump-mission-intro") dm-scene-load-pick-func) + ) + (menu + "tower" + (function "tower-destroy-res" ("towerb-top" "tower-destroy-res") dm-scene-load-pick-func) + (function "tower-destroy-res-b" ("ltowerb-fma" "tower-destroy-res-b") dm-scene-load-pick-func) + ) + (menu + "vinroom" + (function "city-power-game-intro" ("vinroom-movie" "city-power-game-intro") dm-scene-load-pick-func) + (function "city-power-game-res" ("vinroom-movie" "city-power-game-res") dm-scene-load-pick-func) + ) + (menu + "volcano" + (function "volcano-darkeco-res" ("volcano-movie" "volcano-darkeco-res") dm-scene-load-pick-func) + (function "volcano-indax-1-intro" ("volcano-movie" "volcano-indax-1-intro") dm-scene-load-pick-func) + (function "volcano-indax-1-res" ("volcano-movie" "volcano-indax-1-res") dm-scene-load-pick-func) + (function "volcano-indax-2-intro" ("volcano-movie" "volcano-indax-2-intro") dm-scene-load-pick-func) + (function "volcano-indax-2-res" ("volcano-movie" "volcano-indax-2-res") dm-scene-load-pick-func) + ) + (menu + "warp" + (function "desert-air-train-in" ("desert-warp" "desert-air-train-in") dm-scene-load-pick-func) + (function "desert-air-train-out" ("desert-warp" "desert-air-train-out") dm-scene-load-pick-func) + (function "city-air-train-out" ("ctyport-air-train" "city-air-train-out") dm-scene-load-pick-func) + (function "city-air-train-in-desert" ("ctyport-air-train" "city-air-train-in-desert") dm-scene-load-pick-func) + ) + (menu + "wasdoors" + (function "desert-course-race-intro" ("wasdoors-desert" "desert-course-race-intro") dm-scene-load-pick-func) + (function + "desert-artifact-race-1-intro" + ("wasdoors-desert" "desert-artifact-race-1-intro") + dm-scene-load-pick-func + ) + (function + "desert-artifact-race-1-res" + ("wasdoors-desert" "desert-artifact-race-1-res") + dm-scene-load-pick-func + ) + (function + "desert-artifact-race-2-intro" + ("wasdoors-desert" "desert-artifact-race-2-intro") + dm-scene-load-pick-func + ) + (function "desert-hover-intro" ("wasdoors-desert" "desert-hover-intro") dm-scene-load-pick-func) + (function "desert-beast-battle-intro" ("wasdoors-desert" "desert-beast-battle-intro") dm-scene-load-pick-func) + (function + "desert-catch-lizards-intro" + ("wasdoors-desert" "desert-catch-lizards-intro") + dm-scene-load-pick-func + ) + ) + (menu + "wasteland" + (function "wascity-pre-game-intro" ("wascityb-seem" "wascity-pre-game-intro") dm-scene-load-pick-func) + (function "wascity-pre-game-res" ("wascityb-seem" "wascity-pre-game-res") dm-scene-load-pick-func) + (function "wascity-leaper-race-intro" ("wascitya-seem" "wascity-leaper-race-intro") dm-scene-load-pick-func) + (function "wascity-leaper-race-res" ("wascityb-flut" "wascity-leaper-race-res") dm-scene-load-pick-func) + (function "wascity-gun-intro" ("wascityb-gungame" "wascity-gun-intro") dm-scene-load-pick-func) + (function "wascity-gun-res" ("wascityb-gungame" "wascity-gun-res") dm-scene-load-pick-func) + (function "nest-eggs-intro" ("waspala-nest" "nest-eggs-intro") dm-scene-load-pick-func) + (function "wascity-defend-res" ("wascityb-gungame" "wascity-defend-res") dm-scene-load-pick-func) + ) + ) + ) + ) + (debug-menu-append-item s5-0 (debug-menu-make-task-menu arg0)) + (debug-menu-append-item s5-0 (debug-menu-make-play-menu arg0)) + ) + arg0 + ) + +;; definition for symbol *popup-menu-context*, type debug-menu-context +(define *popup-menu-context* (new 'debug 'debug-menu-context)) + +;; definition for function popup-menu-context-make-default-menus +(defun popup-menu-context-make-default-menus ((arg0 debug-menu-context)) + (debug-menu-make-from-template + arg0 + '(main-menu + "Popup" + (flag "Cam 1" pad-1 dm-cam-externalize) + (flag "Turbo Cam" *camera-turbo-free* dm-boolean-toggle-pick-func) + (flag "Target" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg) (arg2 float)) + (when (= arg1 (debug-menu-msg press)) + (if *target* + (stop 'debug) + (start 'debug (get-current-continue-forced *game-info*)) + ) + ) + *target* + ) + ) + (menu + "Mode" + (function "normal" #f ,(lambda () (send-event *target* 'change-mode 'normal))) + (function "racer" #f ,(lambda () + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'racer #f) + ) + ) + (function "flut" #f ,(lambda () + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'flut #f) + ) + ) + (function "board" #f ,(lambda () + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (logior! (-> *game-info* features) (game-feature board)) + (logior! (-> *game-info* debug-features) (game-feature board)) + (send-event *target* 'change-mode 'board #f) + ) + ) + (function "mech" #f ,(lambda () + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'mech #f) + ) + ) + (function "gun" #f ,(lambda () + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (logior! (-> *game-info* features) (game-feature gun)) + (logior! (-> *game-info* debug-features) (game-feature gun)) + (send-event *target* 'change-mode 'gun #f (pickup-type none)) + ) + ) + (function + "darkjak" + #f + ,(lambda () + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature darkjak) (-> *game-info* features))) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature darkjak) (-> *game-info* debug-features))) + ) + (send-event *target* 'change-mode 'darkjak #f (darkjak-stage force-on bomb0)) + ) + ) + (function + "lightjak" + #f + ,(lambda () + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature lightjak) (-> *game-info* features))) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature lightjak) (-> *game-info* debug-features))) + ) + (send-event *target* 'change-mode 'lightjak #f 5) + ) + ) + (function "indax" #f ,(lambda () + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (send-event *target* 'change-mode 'indax #f) + ) + ) + (function + "invisible" + #f + ,(lambda () + (if (not *target*) + (start 'debug (get-current-continue-forced *game-info*)) + ) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature artifact-invis) (-> *game-info* features))) + ) + (set! (-> *game-info* debug-features) + (the-as game-feature (logior (game-feature artifact-invis) (-> *game-info* debug-features))) + ) + (send-event *target* 'change-mode 'invisible #f) + ) + ) + ) + (flag "Game" #f ,(lambda ((arg0 int) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (let ((v1-3 (-> *game-info* mode))) + (set! (-> *game-info* mode) (cond + ((= v1-3 'play) + 'debug + ) + ((= v1-3 'debug) + 'play + ) + (else + (-> *game-info* mode) + ) + ) + ) + ) + ) + (= (-> *game-info* mode) 'play) + ) + ) + (function "Clean" #f ,(lambda () + (if (time-of-day-setup #f) + (time-of-day-setup #t) + ) + (play-clean #f) + ) + ) + (flag "Stats" *stats-target* dm-boolean-toggle-pick-func) + (function "Reset" #f ,(lambda () (reset-actors 'debug))) + (function "Start" #f ,(lambda () (start 'play (-> *game-info* current-continue)))) + (function + "Editor" + #f + ,(lambda () + (kill-by-type editable-player *active-pool*) + (process-spawn editable-player :init editable-player-init #f :name "editable-player" :to *entity-pool*) + (set-master-mode 'game) + ) + ) + ) + ) + arg0 + ) + +;; failed to figure out what this is: +(debug-menu-context-make-default-menus *debug-menu-context*) + +;; failed to figure out what this is: +(popup-menu-context-make-default-menus *popup-menu-context*) + +;; definition for function menu-respond-to-pause +(defun menu-respond-to-pause () + (case *master-mode* + (('menu) + (cond + ((and (cpad-hold? 0 l3) (cpad-hold? 0 select)) + (debug-menu-context-send-msg *popup-menu-context* (debug-menu-msg activate) (debug-menu-dest activation)) + (debug-menu-context-send-msg *debug-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation)) + (debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation)) + ) + ((and (cpad-hold? 1 start) *editable*) + (debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg activate) (debug-menu-dest activation)) + (debug-menu-context-send-msg *debug-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation)) + (debug-menu-context-send-msg *popup-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation)) + ) + ((and (cpad-hold? 0 l3) (cpad-hold? 0 start)) + (debug-menu-context-send-msg *debug-menu-context* (debug-menu-msg activate) (debug-menu-dest activation)) + (debug-menu-context-send-msg *popup-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation)) + (debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation)) + ) + ) + ) + (else + (debug-menu-context-send-msg *debug-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation)) + (debug-menu-context-send-msg *popup-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation)) + (debug-menu-context-send-msg *editable-menu-context* (debug-menu-msg deactivate) (debug-menu-dest activation)) + ) + ) + #f + ) + +;; definition for function *menu-hook* +(defun *menu-hook* () + (debug-menus-handler *debug-menu-context*) + (debug-menus-handler *popup-menu-context*) + ) diff --git a/test/decompiler/reference/jak3/engine/debug/editable-h_REF.gc b/test/decompiler/reference/jak3/engine/debug/editable-h_REF.gc new file mode 100644 index 0000000000..49f0cbe2d6 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/debug/editable-h_REF.gc @@ -0,0 +1,1359 @@ +;;-*-Lisp-*- +(in-package goal) + +;; this file is debug only +(declare-file (debug)) + +;; definition for symbol *editable-temp-id*, type int +(define *editable-temp-id* 0) + +;; definition for symbol *editable-default-name*, type string +(define *editable-default-name* (new 'debug 'string 32 "undefined")) + +;; definition for function editable-command->string +(defun editable-command->string ((arg0 editable-command)) + (case arg0 + (((editable-command select-current-face)) + "select-current-face" + ) + (((editable-command camera-move)) + "camera-move" + ) + (((editable-command select-current-region)) + "select-current-region" + ) + (((editable-command insert-sample)) + "insert-sample" + ) + (((editable-command print-region-info)) + "print-region-info" + ) + (((editable-command camera-rotate)) + "camera-rotate" + ) + (((editable-command select-user1)) + "select-user1" + ) + (((editable-command select-add)) + "select-add" + ) + (((editable-command camera-xz)) + "camera-xz" + ) + (((editable-command pick-loc)) + "pick-loc" + ) + (((editable-command insert-box)) + "insert-box" + ) + (((editable-command insert-entity)) + "insert-entity" + ) + (((editable-command translate-y-level)) + "translate-y-level" + ) + (((editable-command select-user11)) + "select-user11" + ) + (((editable-command select-user10)) + "select-user10" + ) + (((editable-command select-all)) + "select-all" + ) + (((editable-command copy-region)) + "copy-region" + ) + (((editable-command select-none)) + "select-none" + ) + (((editable-command camera-zoom)) + "camera-zoom" + ) + (((editable-command delete-region)) + "delete-region" + ) + (((editable-command select-toggle)) + "select-toggle" + ) + (((editable-command copy)) + "copy" + ) + (((editable-command pick-yes-no)) + "pick-yes-no" + ) + (((editable-command insert-light)) + "insert-light" + ) + (((editable-command none)) + "none" + ) + (((editable-command select-user4)) + "select-user4" + ) + (((editable-command resize)) + "resize" + ) + (((editable-command flip-side)) + "flip-side" + ) + (((editable-command refresh-filter)) + "refresh-filter" + ) + (((editable-command cancel)) + "cancel" + ) + (((editable-command save)) + "save" + ) + (((editable-command select-user6)) + "select-user6" + ) + (((editable-command region-new)) + "region-new" + ) + (((editable-command snap-to-ground)) + "snap-to-ground" + ) + (((editable-command pick-target)) + "pick-target" + ) + (((editable-command snap-y)) + "snap-y" + ) + (((editable-command select-user8)) + "select-user8" + ) + (((editable-command select-face)) + "select-face" + ) + (((editable-command exit)) + "exit" + ) + (((editable-command drag-move)) + "drag-move" + ) + (((editable-command edit-plane-set)) + "edit-plane-set" + ) + (((editable-command select-region)) + "select-region" + ) + (((editable-command delete)) + "delete" + ) + (((editable-command select-user0)) + "select-user0" + ) + (((editable-command camera-xy)) + "camera-xy" + ) + (((editable-command select-current-owner)) + "select-current-owner" + ) + (((editable-command region-add)) + "region-add" + ) + (((editable-command insert-sphere)) + "insert-sphere" + ) + (((editable-command insert-plane)) + "insert-plane" + ) + (((editable-command drag-rotate)) + "drag-rotate" + ) + (((editable-command select-one)) + "select-one" + ) + (((editable-command update-game)) + "update-game" + ) + (((editable-command select-user2)) + "select-user2" + ) + (((editable-command select-user3)) + "select-user3" + ) + (((editable-command snap-rotate)) + "snap-rotate" + ) + (((editable-command rotate-level)) + "rotate-level" + ) + (((editable-command select-prim)) + "select-prim" + ) + (((editable-command drag-none)) + "drag-none" + ) + (((editable-command select-current-prim)) + "select-current-prim" + ) + (((editable-command select-user5)) + "select-user5" + ) + (((editable-command insert-wall)) + "insert-wall" + ) + (((editable-command insert-simple-camera)) + "insert-sample-camera" + ) + (((editable-command insert-face)) + "insert-face" + ) + (((editable-command region-set)) + "region-set" + ) + (((editable-command select-user7)) + "select-user7" + ) + (((editable-command insert-point)) + "insert-point" + ) + (((editable-command drag-resize)) + "drag-resize" + ) + (((editable-command kill)) + "kill" + ) + (((editable-command snap-xz)) + "snap-xz" + ) + (((editable-command select-user12)) + "select-user12" + ) + (((editable-command camera-tumble)) + "camera-tumble" + ) + (((editable-command select-user9)) + "select-user9" + ) + (((editable-command edit-plane-clear)) + "edit-plane-clear" + ) + (((editable-command drag-scale)) + "drag-scale" + ) + (((editable-command load)) + "load" + ) + (((editable-command select-remove)) + "select-remove" + ) + (else + "*unknown*" + ) + ) + ) + +;; definition for function editable-filter->string +;; WARN: Return type mismatch basic vs string. +(defun editable-filter->string ((arg0 editable-filter) (arg1 basic)) + (if (= (logand arg0 (editable-filter target)) (editable-filter target)) + (format arg1 "target ") + ) + (if (= (logand arg0 (editable-filter city_vis)) (editable-filter city_vis)) + (format arg1 "city_vis ") + ) + (if (= (logand arg0 (editable-filter water-command)) (editable-filter water-command)) + (format arg1 "water-command ") + ) + (if (= (logand arg0 (editable-filter user-setting)) (editable-filter user-setting)) + (format arg1 "user-setting ") + ) + (if (= (logand arg0 (editable-filter sample)) (editable-filter sample)) + (format arg1 "sample ") + ) + (if (= (logand arg0 (editable-filter light)) (editable-filter light)) + (format arg1 "light ") + ) + (if (= (logand arg0 (editable-filter part)) (editable-filter part)) + (format arg1 "part ") + ) + (if (= (logand arg0 (editable-filter unknown)) (editable-filter unknown)) + (format arg1 "unknown ") + ) + (if (= (logand arg0 (editable-filter entity)) (editable-filter entity)) + (format arg1 "entity ") + ) + (if (= (logand arg0 (editable-filter data)) (editable-filter data)) + (format arg1 "data ") + ) + (if (= (logand arg0 (editable-filter water)) (editable-filter water)) + (format arg1 "water ") + ) + (if (= (logand arg0 (editable-filter cam-setting)) (editable-filter cam-setting)) + (format arg1 "cam-setting ") + ) + (if (= (logand (editable-filter selected) arg0) (editable-filter selected)) + (format arg1 "selected ") + ) + (if (= (logand arg0 (editable-filter none)) (editable-filter none)) + (format arg1 "none ") + ) + (if (= (logand arg0 (editable-filter camera)) (editable-filter camera)) + (format arg1 "camera ") + ) + (if (= (logand arg0 (editable-filter load)) (editable-filter load)) + (format arg1 "load ") + ) + (if (= (logand arg0 (editable-filter sound)) (editable-filter sound)) + (format arg1 "sound ") + ) + (the-as string arg1) + ) + +;; definition of type editable-region +(deftype editable-region (basic) + ((changed symbol) + (locked symbol) + (id uint64) + (filter editable-filter) + (tree symbol) + (level string) + (on-enter string) + (on-inside string) + (on-exit string) + ) + (:methods + (new (symbol type) _type_) + (editable-region-method-9 () none) + (editable-region-method-10 () none) + (editable-region-method-11 () none) + (editable-region-method-12 () none) + ) + ) + +;; definition for method 3 of type editable-region +(defmethod inspect ((this editable-region)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tchanged: ~A~%" (-> this changed)) + (format #t "~1Tlocked: ~A~%" (-> this locked)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tfilter: ~D~%" (-> this filter)) + (format #t "~1Ttree: ~A~%" (-> this tree)) + (format #t "~1Tlevel: ~A~%" (-> this level)) + (format #t "~1Ton-enter: ~A~%" (-> this on-enter)) + (format #t "~1Ton-inside: ~A~%" (-> this on-inside)) + (format #t "~1Ton-exit: ~A~%" (-> this on-exit)) + (label cfg-4) + this + ) + +;; definition of type editable +(deftype editable (basic) + ((flags editable-flag) + (name string) + (id uint32) + (region editable-region) + (owner pair) + (prefix basic) + ) + (:methods + (editable-method-9 () none) + (editable-method-10 () none) + (editable-method-11 () none) + (editable-method-12 () none) + (editable-method-13 () none) + (editable-method-14 () none) + (editable-method-15 () none) + (editable-method-16 () none) + (editable-method-17 () none) + (editable-method-18 () none) + (editable-method-19 () none) + (editable-method-20 () none) + (editable-method-21 () none) + (editable-method-22 () none) + (editable-method-23 () none) + (editable-method-24 () none) + (editable-method-25 () none) + (editable-method-26 () none) + (editable-method-27 () none) + (editable-method-28 () none) + (editable-method-29 () none) + (editable-method-30 () none) + (editable-method-31 () none) + (editable-method-32 () none) + (editable-method-33 () none) + (editable-method-34 () none) + (editable-method-35 () none) + ) + ) + +;; definition for method 3 of type editable +(defmethod inspect ((this editable)) + (when (not this) + (set! this this) + (goto cfg-28) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tflags: #x~X : (editable-flag " (-> this flags)) + (let ((s5-0 (-> this flags))) + (if (= (logand s5-0 (editable-flag no-save)) (editable-flag no-save)) + (format #t "no-save ") + ) + (if (= (logand s5-0 (editable-flag top-set)) (editable-flag top-set)) + (format #t "top-set ") + ) + (if (= (logand s5-0 (editable-flag orient)) (editable-flag orient)) + (format #t "orient ") + ) + (if (= (logand s5-0 (editable-flag z)) (editable-flag z)) + (format #t "z ") + ) + (if (= (logand s5-0 (editable-flag y)) (editable-flag y)) + (format #t "y ") + ) + (if (= (logand s5-0 (editable-flag x)) (editable-flag x)) + (format #t "x ") + ) + (if (= (logand s5-0 (editable-flag changed)) (editable-flag changed)) + (format #t "changed ") + ) + (if (= (logand s5-0 (editable-flag no-plane-snap)) (editable-flag no-plane-snap)) + (format #t "no-plane-snap ") + ) + (if (= (logand s5-0 (editable-flag mark)) (editable-flag mark)) + (format #t "mark ") + ) + (if (= (logand s5-0 (editable-flag bot-set)) (editable-flag bot-set)) + (format #t "bot-set ") + ) + (if (= (logand s5-0 (editable-flag selected)) (editable-flag selected)) + (format #t "selected ") + ) + (if (= (logand s5-0 (editable-flag no-update)) (editable-flag no-update)) + (format #t "no-update ") + ) + ) + (format #t ")~%") + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tregion: ~A~%" (-> this region)) + (format #t "~1Towner: ~A~%" (-> this owner)) + (format #t "~1Tprefix: ~A~%" (-> this prefix)) + (label cfg-28) + this + ) + +;; definition of type editable-array +(deftype editable-array (basic) + ((allocated-length int32) + (length int32) + (region editable-region) + (backup-region editable-region) + (region-lock? symbol) + (move-lock? symbol) + (move-speed float) + (selection (array editable)) + (filter editable-filter 2) + (target editable) + (target-mode editable-command) + (target-command editable-command) + (target-message string) + (edit-plane editable-plane) + (edit-plane-center vector :inline) + (edit-plane-normal vector :inline) + (level-offset vector :inline) + (level-info-id uint32) + (level uint32) + (edit-param0 float) + (data editable :dynamic) + ) + (:methods + (new (symbol type int) _type_) + (editable-array-method-9 () none) + (editable-array-method-10 () none) + (editable-array-method-11 () none) + (editable-array-method-12 () none) + (editable-array-method-13 () none) + (editable-array-method-14 () none) + (editable-array-method-15 () none) + (editable-array-method-16 () none) + (editable-array-method-17 () none) + (editable-array-method-18 () none) + (editable-array-method-19 () none) + ) + ) + +;; definition for method 3 of type editable-array +(defmethod inspect ((this editable-array)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tallocated-length: ~D~%" (-> this allocated-length)) + (format #t "~1Tlength: ~D~%" (-> this length)) + (format #t "~1Tregion: ~A~%" (-> this region)) + (format #t "~1Tbackup-region: ~A~%" (-> this backup-region)) + (format #t "~1Tregion-lock?: ~A~%" (-> this region-lock?)) + (format #t "~1Tmove-lock?: ~A~%" (-> this move-lock?)) + (format #t "~1Tmove-speed: ~f~%" (-> this move-speed)) + (format #t "~1Tselection: ~`basic`P~%" (-> this selection)) + (format #t "~1Tfilter[2] @ #x~X~%" (-> this filter)) + (format #t "~1Ttarget: ~A~%" (-> this target)) + (format #t "~1Ttarget-mode: ~D~%" (-> this target-mode)) + (format #t "~1Ttarget-command: ~D~%" (-> this target-command)) + (format #t "~1Ttarget-message: ~A~%" (-> this target-message)) + (format #t "~1Tedit-plane: ~A~%" (-> this edit-plane)) + (format #t "~1Tedit-plane-center: ~`vector`P~%" (-> this edit-plane-center)) + (format #t "~1Tedit-plane-normal: ~`vector`P~%" (-> this edit-plane-normal)) + (format #t "~1Tlevel-offset: ~`vector`P~%" (-> this level-offset)) + (format #t "~1Tlevel-info-id: ~D~%" (-> this level-info-id)) + (format #t "~1Tlevel: ~A~%" (-> this level)) + (format #t "~1Tedit-param0: ~f~%" (-> this edit-param0)) + (format #t "~1Tdata[0] @ #x~X~%" (-> this data)) + (dotimes (s5-0 (-> this length)) + (format #t "~T [~D]~1Tdata: ~A~%" s5-0 (-> this data s5-0)) + ) + (label cfg-7) + this + ) + +;; definition for method 0 of type editable-array +(defmethod new editable-array ((allocation symbol) (type-to-make type) (arg0 int)) + (let ((s5-0 (object-new allocation type-to-make (the-as int (+ (-> type-to-make size) (* arg0 4)))))) + (set! (-> s5-0 allocated-length) arg0) + (set! (-> s5-0 length) 0) + (set! (-> s5-0 region) #f) + (set! (-> s5-0 backup-region) #f) + (set! (-> s5-0 region-lock?) #f) + (set! (-> s5-0 move-lock?) #f) + (set! (-> s5-0 target) #f) + (set! (-> s5-0 target-command) (editable-command none)) + (set! (-> s5-0 target-message) #f) + (set! (-> s5-0 selection) + (the-as (array editable) ((method-of-type array new) allocation array editable arg0)) + ) + (set! (-> s5-0 edit-plane) #f) + (set! (-> s5-0 filter 0) (editable-filter + none + unknown + sound + part + user-setting + cam-setting + load + water-command + city_vis + sample + light + entity + ) + ) + (set! (-> s5-0 filter 1) (editable-filter camera target water data city_vis sample light entity selected)) + (dotimes (v1-5 arg0) + (set! (-> s5-0 data v1-5) #f) + (set! (-> s5-0 selection v1-5) #f) + ) + s5-0 + ) + ) + +;; definition of type editable-point +(deftype editable-point (editable) + ((radius meters) + (trans vector :inline) + ) + (:methods + (new (symbol type vector editable-region) _type_) + ) + ) + +;; definition for method 3 of type editable-point +(defmethod inspect ((this editable-point)) + (when (not this) + (set! this this) + (goto cfg-28) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tflags: #x~X : (editable-flag " (-> this flags)) + (let ((s5-0 (-> this flags))) + (if (= (logand s5-0 (editable-flag no-save)) (editable-flag no-save)) + (format #t "no-save ") + ) + (if (= (logand s5-0 (editable-flag top-set)) (editable-flag top-set)) + (format #t "top-set ") + ) + (if (= (logand s5-0 (editable-flag orient)) (editable-flag orient)) + (format #t "orient ") + ) + (if (= (logand s5-0 (editable-flag z)) (editable-flag z)) + (format #t "z ") + ) + (if (= (logand s5-0 (editable-flag y)) (editable-flag y)) + (format #t "y ") + ) + (if (= (logand s5-0 (editable-flag x)) (editable-flag x)) + (format #t "x ") + ) + (if (= (logand s5-0 (editable-flag changed)) (editable-flag changed)) + (format #t "changed ") + ) + (if (= (logand s5-0 (editable-flag no-plane-snap)) (editable-flag no-plane-snap)) + (format #t "no-plane-snap ") + ) + (if (= (logand s5-0 (editable-flag mark)) (editable-flag mark)) + (format #t "mark ") + ) + (if (= (logand s5-0 (editable-flag bot-set)) (editable-flag bot-set)) + (format #t "bot-set ") + ) + (if (= (logand s5-0 (editable-flag selected)) (editable-flag selected)) + (format #t "selected ") + ) + (if (= (logand s5-0 (editable-flag no-update)) (editable-flag no-update)) + (format #t "no-update ") + ) + ) + (format #t ")~%") + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tregion: ~A~%" (-> this region)) + (format #t "~1Towner: ~A~%" (-> this owner)) + (format #t "~1Tprefix: ~A~%" (-> this prefix)) + (format #t "~1Tradius: (meters ~m)~%" (-> this radius)) + (format #t "~1Ttrans: ~`vector`P~%" (-> this trans)) + (label cfg-28) + this + ) + +;; definition for method 0 of type editable-point +;; INFO: Used lq/sq +(defmethod new editable-point ((allocation symbol) (type-to-make type) (arg0 vector) (arg1 editable-region)) + (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> gp-0 region) #f) + (set! (-> gp-0 name) "undefined") + (set! (-> gp-0 prefix) "undefined") + (let* ((s3-0 gp-0) + (s2-0 (method-of-object s3-0 editable-method-23)) + ) + (set! arg1 (cond + (arg1 + (empty) + arg1 + ) + (else + (new 'debug 'editable-region) + ) + ) + ) + (s2-0) + ) + (set! (-> gp-0 trans quad) (-> arg0 quad)) + (set! (-> gp-0 radius) 2048.0) + (set! (-> gp-0 owner) '()) + gp-0 + ) + ) + +;; definition of type editable-sphere +(deftype editable-sphere (editable-point) + () + (:methods + (new (symbol type vector float editable-region) _type_) + ) + ) + +;; definition for method 3 of type editable-sphere +(defmethod inspect ((this editable-sphere)) + (when (not this) + (set! this this) + (goto cfg-28) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tflags: #x~X : (editable-flag " (-> this flags)) + (let ((s5-0 (-> this flags))) + (if (= (logand s5-0 (editable-flag no-save)) (editable-flag no-save)) + (format #t "no-save ") + ) + (if (= (logand s5-0 (editable-flag top-set)) (editable-flag top-set)) + (format #t "top-set ") + ) + (if (= (logand s5-0 (editable-flag orient)) (editable-flag orient)) + (format #t "orient ") + ) + (if (= (logand s5-0 (editable-flag z)) (editable-flag z)) + (format #t "z ") + ) + (if (= (logand s5-0 (editable-flag y)) (editable-flag y)) + (format #t "y ") + ) + (if (= (logand s5-0 (editable-flag x)) (editable-flag x)) + (format #t "x ") + ) + (if (= (logand s5-0 (editable-flag changed)) (editable-flag changed)) + (format #t "changed ") + ) + (if (= (logand s5-0 (editable-flag no-plane-snap)) (editable-flag no-plane-snap)) + (format #t "no-plane-snap ") + ) + (if (= (logand s5-0 (editable-flag mark)) (editable-flag mark)) + (format #t "mark ") + ) + (if (= (logand s5-0 (editable-flag bot-set)) (editable-flag bot-set)) + (format #t "bot-set ") + ) + (if (= (logand s5-0 (editable-flag selected)) (editable-flag selected)) + (format #t "selected ") + ) + (if (= (logand s5-0 (editable-flag no-update)) (editable-flag no-update)) + (format #t "no-update ") + ) + ) + (format #t ")~%") + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tregion: ~A~%" (-> this region)) + (format #t "~1Towner: ~A~%" (-> this owner)) + (format #t "~1Tprefix: ~A~%" (-> this prefix)) + (format #t "~1Tradius: (meters ~m)~%" (-> this radius)) + (format #t "~1Ttrans: ~`vector`P~%" (-> this trans)) + (label cfg-28) + this + ) + +;; definition for method 0 of type editable-sphere +;; INFO: Used lq/sq +(defmethod new editable-sphere ((allocation symbol) (type-to-make type) (arg0 vector) (arg1 float) (arg2 editable-region)) + (let ((s5-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> s5-0 region) #f) + (set! (-> s5-0 name) "undefined") + (set! (-> s5-0 prefix) "undefined") + (let* ((s2-0 s5-0) + (s1-0 (method-of-object s2-0 editable-method-23)) + ) + (set! arg2 (cond + (arg2 + (empty) + arg2 + ) + (else + (new 'debug 'editable-region) + ) + ) + ) + (s1-0) + ) + (set! (-> s5-0 trans quad) (-> arg0 quad)) + (set! (-> s5-0 radius) arg1) + (set! (-> s5-0 owner) '()) + s5-0 + ) + ) + +;; definition of type editable-sample +(deftype editable-sample (editable-point) + () + ) + +;; definition for method 3 of type editable-sample +(defmethod inspect ((this editable-sample)) + (when (not this) + (set! this this) + (goto cfg-28) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tflags: #x~X : (editable-flag " (-> this flags)) + (let ((s5-0 (-> this flags))) + (if (= (logand s5-0 (editable-flag no-save)) (editable-flag no-save)) + (format #t "no-save ") + ) + (if (= (logand s5-0 (editable-flag top-set)) (editable-flag top-set)) + (format #t "top-set ") + ) + (if (= (logand s5-0 (editable-flag orient)) (editable-flag orient)) + (format #t "orient ") + ) + (if (= (logand s5-0 (editable-flag z)) (editable-flag z)) + (format #t "z ") + ) + (if (= (logand s5-0 (editable-flag y)) (editable-flag y)) + (format #t "y ") + ) + (if (= (logand s5-0 (editable-flag x)) (editable-flag x)) + (format #t "x ") + ) + (if (= (logand s5-0 (editable-flag changed)) (editable-flag changed)) + (format #t "changed ") + ) + (if (= (logand s5-0 (editable-flag no-plane-snap)) (editable-flag no-plane-snap)) + (format #t "no-plane-snap ") + ) + (if (= (logand s5-0 (editable-flag mark)) (editable-flag mark)) + (format #t "mark ") + ) + (if (= (logand s5-0 (editable-flag bot-set)) (editable-flag bot-set)) + (format #t "bot-set ") + ) + (if (= (logand s5-0 (editable-flag selected)) (editable-flag selected)) + (format #t "selected ") + ) + (if (= (logand s5-0 (editable-flag no-update)) (editable-flag no-update)) + (format #t "no-update ") + ) + ) + (format #t ")~%") + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tregion: ~A~%" (-> this region)) + (format #t "~1Towner: ~A~%" (-> this owner)) + (format #t "~1Tprefix: ~A~%" (-> this prefix)) + (format #t "~1Tradius: (meters ~m)~%" (-> this radius)) + (format #t "~1Ttrans: ~`vector`P~%" (-> this trans)) + (label cfg-28) + this + ) + +;; definition of type editable-light +(deftype editable-light (editable-sphere) + ((direction vector :inline) + (color vector :inline) + (decay-start float) + (ambient-point-ratio float) + (brightness float) + (shadow uint32 :overlay-at (-> direction data 0)) + (shadows float 5) + (shadow-ambi float :overlay-at (-> shadows 0)) + (shadow-dir0 float :overlay-at (-> shadows 1)) + (shadow-dir1 float :overlay-at (-> shadows 2)) + (shadow-dir2 float :overlay-at (-> shadows 3)) + (shadow-dir3 float :overlay-at (-> shadows 4)) + ) + (:methods + (new (symbol type vector float editable-region) _type_) + ) + ) + +;; definition for method 3 of type editable-light +(defmethod inspect ((this editable-light)) + (when (not this) + (set! this this) + (goto cfg-28) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tflags: #x~X : (editable-flag " (-> this flags)) + (let ((s5-0 (-> this flags))) + (if (= (logand s5-0 (editable-flag no-save)) (editable-flag no-save)) + (format #t "no-save ") + ) + (if (= (logand s5-0 (editable-flag top-set)) (editable-flag top-set)) + (format #t "top-set ") + ) + (if (= (logand s5-0 (editable-flag orient)) (editable-flag orient)) + (format #t "orient ") + ) + (if (= (logand s5-0 (editable-flag z)) (editable-flag z)) + (format #t "z ") + ) + (if (= (logand s5-0 (editable-flag y)) (editable-flag y)) + (format #t "y ") + ) + (if (= (logand s5-0 (editable-flag x)) (editable-flag x)) + (format #t "x ") + ) + (if (= (logand s5-0 (editable-flag changed)) (editable-flag changed)) + (format #t "changed ") + ) + (if (= (logand s5-0 (editable-flag no-plane-snap)) (editable-flag no-plane-snap)) + (format #t "no-plane-snap ") + ) + (if (= (logand s5-0 (editable-flag mark)) (editable-flag mark)) + (format #t "mark ") + ) + (if (= (logand s5-0 (editable-flag bot-set)) (editable-flag bot-set)) + (format #t "bot-set ") + ) + (if (= (logand s5-0 (editable-flag selected)) (editable-flag selected)) + (format #t "selected ") + ) + (if (= (logand s5-0 (editable-flag no-update)) (editable-flag no-update)) + (format #t "no-update ") + ) + ) + (format #t ")~%") + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tregion: ~A~%" (-> this region)) + (format #t "~1Towner: ~A~%" (-> this owner)) + (format #t "~1Tprefix: ~A~%" (-> this prefix)) + (format #t "~1Tradius: (meters ~m)~%" (-> this radius)) + (format #t "~1Ttrans: ~`vector`P~%" (-> this trans)) + (format #t "~1Tdirection: ~`vector`P~%" (-> this direction)) + (format #t "~1Tcolor: ~`vector`P~%" (-> this color)) + (format #t "~1Tdecay-start: ~f~%" (-> this decay-start)) + (format #t "~1Tambient-point-ratio: ~f~%" (-> this ambient-point-ratio)) + (format #t "~1Tbrightness: ~f~%" (-> this brightness)) + (format #t "~1Tshadow: ~D~%" (-> this direction x)) + (format #t "~1Tshadows[5] @ #x~X~%" (-> this shadows)) + (format #t "~1Tshadow-ambi: ~f~%" (-> this shadow-ambi)) + (format #t "~1Tshadow-dir0: ~f~%" (-> this shadow-dir0)) + (format #t "~1Tshadow-dir1: ~f~%" (-> this shadow-dir1)) + (format #t "~1Tshadow-dir2: ~f~%" (-> this shadow-dir2)) + (format #t "~1Tshadow-dir3: ~f~%" (-> this shadow-dir3)) + (label cfg-28) + this + ) + +;; definition for method 0 of type editable-light +;; INFO: Used lq/sq +(defmethod new editable-light ((allocation symbol) (type-to-make type) (arg0 vector) (arg1 float) (arg2 editable-region)) + (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> gp-0 region) #f) + (let* ((s2-0 gp-0) + (s1-0 (method-of-object s2-0 editable-method-23)) + ) + (set! arg2 (cond + (arg2 + (empty) + arg2 + ) + (else + (new 'debug 'editable-region) + ) + ) + ) + (s1-0) + ) + (set! (-> gp-0 trans quad) (-> arg0 quad)) + (set! (-> gp-0 radius) arg1) + (set! (-> gp-0 owner) '()) + (set! (-> gp-0 prefix) (new 'debug 'string 32 *editable-default-name*)) + (let ((s5-1 (new 'debug 'string 32 (the-as string #f)))) + (format s5-1 "~s-~d" (-> gp-0 prefix) *editable-temp-id*) + (set! (-> gp-0 name) s5-1) + ) + (set! *editable-temp-id* (+ *editable-temp-id* 1)) + (set! (-> gp-0 decay-start) 0.5) + (set! (-> gp-0 ambient-point-ratio) 1.0) + (set! (-> gp-0 brightness) 1.0) + (set-vector! (-> gp-0 color) 1.0 1.0 1.0 -1.0) + (set-vector! (-> gp-0 direction) 0.0 0.0 0.0 0.0) + (set! (-> gp-0 shadow-ambi) 1.0) + (set! (-> gp-0 shadow-dir0) 1.0) + (set! (-> gp-0 shadow-dir1) 1.0) + (set! (-> gp-0 shadow-dir2) 1.0) + (set! (-> gp-0 shadow-dir3) 1.0) + gp-0 + ) + ) + +;; definition of type editable-entity +(deftype editable-entity (editable-point) + ((angles euler-angles :inline) + (idx int32) + ) + (:methods + (new (symbol type vector float editable-region) _type_) + (editable-entity-method-36 () none) + ) + ) + +;; definition for method 3 of type editable-entity +(defmethod inspect ((this editable-entity)) + (when (not this) + (set! this this) + (goto cfg-28) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tflags: #x~X : (editable-flag " (-> this flags)) + (let ((s5-0 (-> this flags))) + (if (= (logand s5-0 (editable-flag no-save)) (editable-flag no-save)) + (format #t "no-save ") + ) + (if (= (logand s5-0 (editable-flag top-set)) (editable-flag top-set)) + (format #t "top-set ") + ) + (if (= (logand s5-0 (editable-flag orient)) (editable-flag orient)) + (format #t "orient ") + ) + (if (= (logand s5-0 (editable-flag z)) (editable-flag z)) + (format #t "z ") + ) + (if (= (logand s5-0 (editable-flag y)) (editable-flag y)) + (format #t "y ") + ) + (if (= (logand s5-0 (editable-flag x)) (editable-flag x)) + (format #t "x ") + ) + (if (= (logand s5-0 (editable-flag changed)) (editable-flag changed)) + (format #t "changed ") + ) + (if (= (logand s5-0 (editable-flag no-plane-snap)) (editable-flag no-plane-snap)) + (format #t "no-plane-snap ") + ) + (if (= (logand s5-0 (editable-flag mark)) (editable-flag mark)) + (format #t "mark ") + ) + (if (= (logand s5-0 (editable-flag bot-set)) (editable-flag bot-set)) + (format #t "bot-set ") + ) + (if (= (logand s5-0 (editable-flag selected)) (editable-flag selected)) + (format #t "selected ") + ) + (if (= (logand s5-0 (editable-flag no-update)) (editable-flag no-update)) + (format #t "no-update ") + ) + ) + (format #t ")~%") + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tregion: ~A~%" (-> this region)) + (format #t "~1Towner: ~A~%" (-> this owner)) + (format #t "~1Tprefix: ~A~%" (-> this prefix)) + (format #t "~1Tradius: (meters ~m)~%" (-> this radius)) + (format #t "~1Ttrans: ~`vector`P~%" (-> this trans)) + (format #t "~1Tangles: #~%" (-> this angles)) + (format #t "~1Tidx: ~D~%" (-> this idx)) + (label cfg-28) + this + ) + +;; definition for method 0 of type editable-entity +;; INFO: Used lq/sq +(defmethod new editable-entity ((allocation symbol) (type-to-make type) (arg0 vector) (arg1 float) (arg2 editable-region)) + (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> gp-0 region) #f) + (let* ((s2-0 gp-0) + (s1-0 (method-of-object s2-0 editable-method-23)) + ) + (set! arg2 (cond + (arg2 + (empty) + arg2 + ) + (else + (new 'debug 'editable-region) + ) + ) + ) + (s1-0) + ) + (set! (-> gp-0 trans quad) (-> arg0 quad)) + (set! (-> gp-0 radius) arg1) + (set! (-> gp-0 owner) '()) + (set! (-> gp-0 prefix) (new 'debug 'string 32 "entity")) + (set! (-> gp-0 name) (new 'debug 'string 32 "entity")) + gp-0 + ) + ) + +;; definition of type editable-face +(deftype editable-face (editable) + ((length int32) + (normal vector :inline) + (center vector :inline) + (vertex editable-point 6) + ) + (:methods + (new (symbol type editable-region) _type_) + (editable-face-method-36 () none) + (editable-face-method-37 () none) + ) + ) + +;; definition for method 3 of type editable-face +(defmethod inspect ((this editable-face)) + (when (not this) + (set! this this) + (goto cfg-31) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tflags: #x~X : (editable-flag " (-> this flags)) + (let ((s5-0 (-> this flags))) + (if (= (logand s5-0 (editable-flag no-save)) (editable-flag no-save)) + (format #t "no-save ") + ) + (if (= (logand s5-0 (editable-flag top-set)) (editable-flag top-set)) + (format #t "top-set ") + ) + (if (= (logand s5-0 (editable-flag orient)) (editable-flag orient)) + (format #t "orient ") + ) + (if (= (logand s5-0 (editable-flag z)) (editable-flag z)) + (format #t "z ") + ) + (if (= (logand s5-0 (editable-flag y)) (editable-flag y)) + (format #t "y ") + ) + (if (= (logand s5-0 (editable-flag x)) (editable-flag x)) + (format #t "x ") + ) + (if (= (logand s5-0 (editable-flag changed)) (editable-flag changed)) + (format #t "changed ") + ) + (if (= (logand s5-0 (editable-flag no-plane-snap)) (editable-flag no-plane-snap)) + (format #t "no-plane-snap ") + ) + (if (= (logand s5-0 (editable-flag mark)) (editable-flag mark)) + (format #t "mark ") + ) + (if (= (logand s5-0 (editable-flag bot-set)) (editable-flag bot-set)) + (format #t "bot-set ") + ) + (if (= (logand s5-0 (editable-flag selected)) (editable-flag selected)) + (format #t "selected ") + ) + (if (= (logand s5-0 (editable-flag no-update)) (editable-flag no-update)) + (format #t "no-update ") + ) + ) + (format #t ")~%") + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tregion: ~A~%" (-> this region)) + (format #t "~1Towner: ~A~%" (-> this owner)) + (format #t "~1Tprefix: ~A~%" (-> this prefix)) + (format #t "~1Tlength: ~D~%" (-> this length)) + (format #t "~1Tnormal: ~`vector`P~%" (-> this normal)) + (format #t "~1Tcenter: ~`vector`P~%" (-> this center)) + (format #t "~1Tvertex[6] @ #x~X~%" (-> this vertex)) + (dotimes (s5-1 (-> this length)) + (format #t "~T [~D]~1Tvertex: ~A~%" s5-1 (-> this vertex s5-1)) + ) + (label cfg-31) + this + ) + +;; definition for method 0 of type editable-face +(defmethod new editable-face ((allocation symbol) (type-to-make type) (arg0 editable-region)) + (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> gp-0 region) #f) + (set! (-> gp-0 name) "undefined") + (set! (-> gp-0 prefix) "undefined") + (let* ((s4-0 gp-0) + (s3-0 (method-of-object s4-0 editable-method-23)) + ) + (set! arg0 (cond + (arg0 + (empty) + arg0 + ) + (else + (new 'debug 'editable-region) + ) + ) + ) + (s3-0) + ) + (set! (-> gp-0 owner) '()) + gp-0 + ) + ) + +;; definition of type editable-plane +(deftype editable-plane (editable) + ((length int32) + (radius meters) + (vertex editable-point 2) + ) + (:methods + (new (symbol type editable-region) _type_) + (editable-plane-method-36 () none) + (editable-plane-method-37 () none) + ) + ) + +;; definition for method 3 of type editable-plane +(defmethod inspect ((this editable-plane)) + (when (not this) + (set! this this) + (goto cfg-31) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tflags: #x~X : (editable-flag " (-> this flags)) + (let ((s5-0 (-> this flags))) + (if (= (logand s5-0 (editable-flag no-save)) (editable-flag no-save)) + (format #t "no-save ") + ) + (if (= (logand s5-0 (editable-flag top-set)) (editable-flag top-set)) + (format #t "top-set ") + ) + (if (= (logand s5-0 (editable-flag orient)) (editable-flag orient)) + (format #t "orient ") + ) + (if (= (logand s5-0 (editable-flag z)) (editable-flag z)) + (format #t "z ") + ) + (if (= (logand s5-0 (editable-flag y)) (editable-flag y)) + (format #t "y ") + ) + (if (= (logand s5-0 (editable-flag x)) (editable-flag x)) + (format #t "x ") + ) + (if (= (logand s5-0 (editable-flag changed)) (editable-flag changed)) + (format #t "changed ") + ) + (if (= (logand s5-0 (editable-flag no-plane-snap)) (editable-flag no-plane-snap)) + (format #t "no-plane-snap ") + ) + (if (= (logand s5-0 (editable-flag mark)) (editable-flag mark)) + (format #t "mark ") + ) + (if (= (logand s5-0 (editable-flag bot-set)) (editable-flag bot-set)) + (format #t "bot-set ") + ) + (if (= (logand s5-0 (editable-flag selected)) (editable-flag selected)) + (format #t "selected ") + ) + (if (= (logand s5-0 (editable-flag no-update)) (editable-flag no-update)) + (format #t "no-update ") + ) + ) + (format #t ")~%") + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tregion: ~A~%" (-> this region)) + (format #t "~1Towner: ~A~%" (-> this owner)) + (format #t "~1Tprefix: ~A~%" (-> this prefix)) + (format #t "~1Tlength: ~D~%" (-> this length)) + (format #t "~1Tradius: (meters ~m)~%" (-> this radius)) + (format #t "~1Tvertex[2] @ #x~X~%" (-> this vertex)) + (dotimes (s5-1 (-> this length)) + (format #t "~T [~D]~1Tvertex: ~A~%" s5-1 (-> this vertex s5-1)) + ) + (label cfg-31) + this + ) + +;; definition for method 0 of type editable-plane +(defmethod new editable-plane ((allocation symbol) (type-to-make type) (arg0 editable-region)) + (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> gp-0 region) #f) + (set! (-> gp-0 name) "undefined") + (set! (-> gp-0 prefix) "undefined") + (let* ((s4-0 gp-0) + (s3-0 (method-of-object s4-0 editable-method-23)) + ) + (set! arg0 (cond + (arg0 + (empty) + arg0 + ) + (else + (new 'debug 'editable-region) + ) + ) + ) + (s3-0) + ) + (set! (-> gp-0 owner) '()) + (set! (-> gp-0 radius) 20480.0) + gp-0 + ) + ) + +;; definition of type editable-player +(deftype editable-player (process-drawable) + ((current editable-array) + (current-command uint32) + (select-command function) + (drag-command uint32) + (extra-command function) + (left-handed basic) + (light-names basic) + (external-cam-mode symbol) + (command editable-command 6) + (close-menu-time time-frame) + (mouse-pos vector :inline) + (mouse-end vector :inline) + (manipulator manipulator :inline) + (mouse-box vector 2 :inline) + (mouse-hit vector :inline) + (mouse-normal vector :inline) + (float-variable float) + (float-step float) + (float-max float) + (float-min float) + (float-id uint32) + ) + (:methods + (editable-player-method-20 () none) + (editable-player-method-21 () none) + (editable-player-method-22 () none) + (editable-player-method-23 () none) + ) + ) + +;; definition for method 3 of type editable-player +(defmethod inspect ((this editable-player)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tcurrent: ~A~%" (-> this current)) + (format #t "~2Tcurrent-command: ~D~%" (-> this current-command)) + (format #t "~2Tselect-command: ~D~%" (-> this select-command)) + (format #t "~2Tdrag-command: ~D~%" (-> this drag-command)) + (format #t "~2Textra-command: ~D~%" (-> this extra-command)) + (format #t "~2Tleft-handed: ~A~%" (-> this left-handed)) + (format #t "~2Tlight-names: ~A~%" (-> this light-names)) + (format #t "~2Texternal-cam-mode: ~A~%" (-> this external-cam-mode)) + (format #t "~2Tcommand[6] @ #x~X~%" (-> this command)) + (format #t "~2Tclose-menu-time: ~D~%" (-> this close-menu-time)) + (format #t "~2Tmouse-pos: #~%" (-> this mouse-pos)) + (format #t "~2Tmouse-end: #~%" (-> this mouse-end)) + (format #t "~2Tmanipulator: #~%" (-> this manipulator)) + (format #t "~2Tmouse-box[2] @ #x~X~%" (-> this mouse-box)) + (format #t "~2Tmouse-hit: #~%" (-> this mouse-hit)) + (format #t "~2Tmouse-normal: #~%" (-> this mouse-normal)) + (format #t "~2Tfloat-variable: ~f~%" (-> this float-variable)) + (format #t "~2Tfloat-step: ~f~%" (-> this float-step)) + (format #t "~2Tfloat-max: ~f~%" (-> this float-max)) + (format #t "~2Tfloat-min: ~f~%" (-> this float-min)) + (format #t "~2Tfloat-id: ~D~%" (-> this float-id)) + (label cfg-4) + this + ) + +;; definition of type editable-work +(deftype editable-work (basic) + ((num-found int16) + (last-found int16) + (last-x float) + (last-y float) + (hide symbol) + (found editable 256) + (dists uint32 256) + ) + ) + +;; definition for method 3 of type editable-work +(defmethod inspect ((this editable-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tnum-found: ~D~%" (-> this num-found)) + (format #t "~1Tlast-found: ~D~%" (-> this last-found)) + (format #t "~1Tlast-x: ~f~%" (-> this last-x)) + (format #t "~1Tlast-y: ~f~%" (-> this last-y)) + (format #t "~1Thide: ~A~%" (-> this hide)) + (format #t "~1Tfound[256] @ #x~X~%" (-> this found)) + (format #t "~1Tdists[256] @ #x~X~%" (-> this dists)) + (label cfg-4) + this + ) + +;; definition for symbol *editable-work*, type editable-work +(define *editable-work* (new 'global 'editable-work)) + +;; definition for symbol *editable*, type (pointer editable-player) +(define *editable* (the-as (pointer editable-player) #f)) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/debug/manipulator_REF.gc b/test/decompiler/reference/jak3/engine/debug/manipulator_REF.gc new file mode 100644 index 0000000000..0e52a25d51 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/debug/manipulator_REF.gc @@ -0,0 +1,689 @@ +;;-*-Lisp-*- +(in-package goal) + +;; this file is debug only +(declare-file (debug)) + +;; definition of type manipulator +(deftype manipulator (structure) + ((action manipulator-action) + (mode manipulator-mode) + (dragging? symbol) + (position vector :inline) + (speed vector :inline) + (drag-ref-position vector :inline) + (mouse-ref-position vector :inline) + (mat matrix :inline) + (rotate-ref int32) + (angles euler-angles :inline) + ) + (:methods + (set-mode (_type_ manipulator-mode) none) + (manipulator-method-10 (_type_) none) + (manipulator-method-11 (_type_) none) + (manipulator-method-12 (_type_ vector) none) + (manipulator-method-13 (_type_ vector vector) none) + (manipulator-method-14 (_type_) none) + ) + ) + +;; definition for method 3 of type manipulator +(defmethod inspect ((this manipulator)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'manipulator) + (format #t "~1Taction: ~D~%" (-> this action)) + (format #t "~1Tmode: ~D~%" (-> this mode)) + (format #t "~1Tdragging?: ~A~%" (-> this dragging?)) + (format #t "~1Tposition: #~%" (-> this position)) + (format #t "~1Tspeed: #~%" (-> this speed)) + (format #t "~1Tdrag-ref-position: #~%" (-> this drag-ref-position)) + (format #t "~1Tmouse-ref-position: #~%" (-> this mouse-ref-position)) + (format #t "~1Tmat: #~%" (-> this mat)) + (format #t "~1Trotate-ref: ~D~%" (-> this rotate-ref)) + (format #t "~1Tangles: #~%" (-> this angles)) + (label cfg-4) + this + ) + +;; definition for function draw-axis +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defun draw-axis ((arg0 vector) (arg1 vector) (arg2 float) (arg3 float) (arg4 rgba)) + (local-vars + (sv-160 int) + (sv-176 (function symbol bucket-id vector vector vector rgba symbol)) + (sv-192 symbol) + (sv-208 int) + (sv-224 vector) + (sv-240 vector) + (sv-256 vector) + (sv-272 vector) + (sv-288 vector) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s1-0 (new 'stack-no-clear 'vector))) + (cond + ((< (fabs (vector-dot arg1 *x-vector*)) 0.5) + (vector-cross! s1-0 *x-vector* arg1) + ) + ((< (fabs (vector-dot arg1 *y-vector*)) 0.5) + (vector-cross! s1-0 *y-vector* arg1) + ) + (else + (vector-cross! s1-0 *z-vector* arg1) + ) + ) + (vector-cross! s1-0 s1-0 arg1) + (vector-normalize! s1-0 1.0) + (let ((s0-0 (new 'stack-no-clear 'vector))) + (let ((v1-10 arg0)) + (let ((a0-8 arg1)) + (let ((a1-10 arg2)) + (.mov vf7 a1-10) + ) + (.lvf vf5 (&-> a0-8 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 (&-> s0-0 quad) vf6) + (set! sv-160 0) + (while (< sv-160 8) + (set! sv-176 add-debug-flat-triangle) + (set! sv-192 #t) + (set! sv-208 584) + (set! sv-224 (new 'stack-no-clear 'vector)) + (let ((v1-16 s0-0)) + (let ((a0-9 arg1)) + (let ((a1-11 arg3)) + (.mov vf7 a1-11) + ) + (.lvf vf5 (&-> a0-9 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 (&-> sv-224 quad) vf6) + (set! sv-256 (new 'stack-no-clear 'vector)) + (set! sv-240 s0-0) + (let* ((a2-3 + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) arg1 (* 182.04445 (the float (* 45 sv-160)))) + ) + (v1-22 (vector-orient-by-quat! (new 'stack-no-clear 'vector) s1-0 a2-3)) + ) + (let ((a0-13 (* 0.25 arg3))) + (.mov vf7 a0-13) + ) + (.lvf vf5 (&-> v1-22 quad)) + ) + (.lvf vf4 (&-> sv-240 quad)) + (.add.x.vf 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-256 quad) vf6) + (set! sv-288 (new 'stack-no-clear 'vector)) + (set! sv-272 s0-0) + (let* ((a2-7 (quaternion-vector-angle! + (new 'stack-no-clear 'quaternion) + arg1 + (* 182.04445 (the float (* 45 (+ sv-160 1)))) + ) + ) + (v1-29 (vector-orient-by-quat! (new 'stack-no-clear 'vector) s1-0 a2-7)) + ) + (let ((a0-17 (* 0.25 arg3))) + (.mov vf7 a0-17) + ) + (.lvf vf5 (&-> v1-29 quad)) + ) + (.lvf vf4 (&-> sv-272 quad)) + (.add.x.vf 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-288 quad) vf6) + (let ((t1-0 arg4)) + (sv-176 sv-192 (the-as bucket-id sv-208) sv-224 sv-256 sv-288 t1-0) + ) + (set! sv-160 (+ sv-160 1)) + ) + ) + ) + (add-debug-vector #t (bucket-id debug-no-zbuf2) arg0 arg1 arg2 arg4) + (none) + ) + ) + +;; definition for method 9 of type manipulator +;; WARN: Return type mismatch int vs none. +(defmethod set-mode ((this manipulator) (arg0 manipulator-mode)) + (set! (-> this mode) arg0) + 0 + (none) + ) + +;; definition for method 10 of type manipulator +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for method 11 of type manipulator +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod manipulator-method-11 ((this manipulator)) + (local-vars (sv-240 rgba) (sv-256 vector) (sv-272 vector)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (format *stdcon* "~M ~M ~M~%" (-> this position x) (-> this position y) (-> this position z)) + (let ((s5-0 (-> this position))) + 0.0 + (let* ((v0-1 + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> *math-camera* trans) (-> this position)) 1.0) + ) + (s4-0 (< (fabs (vector-dot v0-1 (the-as vector (-> this mat)))) 0.9)) + (s3-0 (< (fabs (vector-dot v0-1 (-> this mat uvec))) 0.9)) + (s2-0 (< (fabs (vector-dot v0-1 (-> this mat fvec))) 0.9)) + (f30-1 (* 0.15 (vector-vector-distance (-> *math-camera* trans) s5-0))) + ) + (if s4-0 + (draw-axis + s5-0 + (the-as vector (-> this mat)) + f30-1 + (* 0.25 f30-1) + (if (= (-> this action) (manipulator-action ma1)) + *color-yellow* + *color-red* + ) + ) + ) + (if s3-0 + (draw-axis s5-0 (-> this mat uvec) f30-1 (* 0.25 f30-1) (if (= (-> this action) (manipulator-action ma2)) + *color-yellow* + *color-green* + ) + ) + ) + (if s2-0 + (draw-axis s5-0 (-> this mat fvec) f30-1 (* 0.25 f30-1) (if (= (-> this action) (manipulator-action ma3)) + *color-yellow* + *color-blue* + ) + ) + ) + (let ((s1-0 (new 'stack-no-clear 'vector)) + (s0-0 (new 'stack-no-clear 'vector)) + ) + (let ((f28-0 0.1)) + (if (= (-> this action) (manipulator-action ma7)) + (set! sv-240 *color-yellow*) + (set! sv-240 *color-light-blue*) + ) + (let ((a1-7 s1-0)) + (let ((v1-26 s5-0)) + (let ((a0-13 (vector+! + (new 'stack-no-clear 'vector) + (the-as vector (-> *math-camera* inv-camera-rot)) + (-> *math-camera* inv-camera-rot uvec) + ) + ) + ) + (let ((a2-6 (* f30-1 f28-0))) + (.mov vf7 a2-6) + ) + (.lvf vf5 (&-> a0-13 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 quad) vf6) + ) + (let ((a0-14 s0-0)) + (let ((v1-27 s1-0)) + (let ((a1-9 (-> *math-camera* inv-camera-rot uvec))) + (let ((a2-8 (* -2.0 f30-1 f28-0))) + (.mov vf7 a2-8) + ) + (.lvf vf5 (&-> a1-9 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 (&-> a0-14 quad) vf6) + ) + (add-debug-line #t (bucket-id debug-no-zbuf1) s1-0 s0-0 sv-240 #f (the-as rgba -1)) + (set! (-> s1-0 quad) (-> s0-0 quad)) + (let ((a0-18 s0-0)) + (let ((v1-29 s0-0)) + (let ((a1-12 (-> *math-camera* inv-camera-rot))) + (let ((a2-11 (* -2.0 f30-1 f28-0))) + (.mov vf7 a2-11) + ) + (.lvf vf5 (&-> a1-12 rvec 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 (&-> a0-18 quad) vf6) + ) + (add-debug-line #t (bucket-id debug-no-zbuf1) s1-0 s0-0 sv-240 #f (the-as rgba -1)) + (set! (-> s1-0 quad) (-> s0-0 quad)) + (let ((a0-22 s0-0)) + (let ((v1-31 s0-0)) + (let ((a1-15 (-> *math-camera* inv-camera-rot uvec))) + (let ((a2-14 (* 2.0 f30-1 f28-0))) + (.mov vf7 a2-14) + ) + (.lvf vf5 (&-> a1-15 quad)) + ) + (.lvf vf4 (&-> v1-31 quad)) + ) + (.add.x.vf 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) + ) + (add-debug-line #t (bucket-id debug-no-zbuf1) s1-0 s0-0 sv-240 #f (the-as rgba -1)) + (set! (-> s1-0 quad) (-> s0-0 quad)) + (let ((a0-26 s0-0)) + (let ((v1-33 s0-0)) + (let ((a1-18 (-> *math-camera* inv-camera-rot))) + (let ((a2-17 (* 2.0 f30-1 f28-0))) + (.mov vf7 a2-17) + ) + (.lvf vf5 (&-> a1-18 rvec 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 (&-> a0-26 quad) vf6) + ) + ) + (let ((t9-9 add-debug-line) + (a0-27 #t) + (a1-19 577) + (t1-3 #f) + (t2-3 -1) + ) + (t9-9 a0-27 (the-as bucket-id a1-19) s1-0 s0-0 sv-240 t1-3 (the-as rgba t2-3)) + ) + ) + (let ((s1-1 (new 'stack-no-clear 'vector))) + (when (and s3-0 s2-0) + (let ((a1-20 s1-1)) + (let ((v1-36 s5-0)) + (let ((a0-29 (vector+! (new 'stack-no-clear 'vector) (-> this mat fvec) (-> this mat uvec)))) + (let ((a2-20 f30-1)) + (.mov vf7 a2-20) + ) + (.lvf vf5 (&-> a0-29 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-20 quad) vf6) + ) + (let ((s0-1 draw-axis)) + (set! sv-256 s1-1) + (let ((a1-22 (vector-negate! (new 'stack-no-clear 'vector) (-> this mat uvec))) + (a2-21 (* 0.15 f30-1)) + (a3-11 (* 0.15 f30-1)) + (t0-11 (if (= (-> this action) (manipulator-action ma6)) + *color-yellow* + *color-green* + ) + ) + ) + (s0-1 sv-256 a1-22 a2-21 a3-11 t0-11) + ) + ) + (let ((s0-2 draw-axis)) + (set! sv-272 s1-1) + (let ((a1-24 (vector-negate! (new 'stack-no-clear 'vector) (-> this mat fvec))) + (a2-22 (* 0.15 f30-1)) + (a3-12 (* 0.15 f30-1)) + (t0-12 (if (= (-> this action) (manipulator-action ma6)) + *color-yellow* + *color-blue* + ) + ) + ) + (s0-2 sv-272 a1-24 a2-22 a3-12 t0-12) + ) + ) + ) + (set! s2-0 (and s4-0 s2-0)) + (when s2-0 + (let ((a1-25 s1-1)) + (let ((v1-44 s5-0)) + (let ((a0-37 (vector+! (new 'stack-no-clear 'vector) (the-as vector (-> this mat)) (-> this mat fvec)))) + (let ((a2-24 f30-1)) + (.mov vf7 a2-24) + ) + (.lvf vf5 (&-> a0-37 quad)) + ) + (.lvf vf4 (&-> v1-44 quad)) + ) + (.add.x.vf 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-25 quad) vf6) + ) + (draw-axis + s1-1 + (vector-negate! (new 'stack-no-clear 'vector) (the-as vector (-> this mat))) + (* 0.15 f30-1) + (* 0.15 f30-1) + (if (= (-> this action) (manipulator-action ma5)) + *color-yellow* + *color-red* + ) + ) + (draw-axis + s1-1 + (vector-negate! (new 'stack-no-clear 'vector) (-> this mat fvec)) + (* 0.15 f30-1) + (* 0.15 f30-1) + (if (= (-> this action) (manipulator-action ma5)) + *color-yellow* + *color-blue* + ) + ) + ) + (set! s3-0 (and s4-0 s3-0)) + (when s3-0 + (let ((a0-44 s1-1)) + (let ((v1-52 (vector+! (new 'stack-no-clear 'vector) (the-as vector (-> this mat)) (-> this mat uvec)))) + (let ((a1-31 f30-1)) + (.mov vf7 a1-31) + ) + (.lvf vf5 (&-> v1-52 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-44 quad) vf6) + ) + (draw-axis + s1-1 + (vector-negate! (new 'stack-no-clear 'vector) (the-as vector (-> this mat))) + (* 0.15 f30-1) + (* 0.15 f30-1) + (if (= (-> this action) (manipulator-action ma4)) + *color-yellow* + *color-red* + ) + ) + (draw-axis + s1-1 + (vector-negate! (new 'stack-no-clear 'vector) (-> this mat uvec)) + (* 0.15 f30-1) + (* 0.15 f30-1) + (if (= (-> this action) (manipulator-action ma4)) + *color-yellow* + *color-green* + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 12 of type manipulator +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod manipulator-method-12 ((this manipulator) (arg0 vector)) + (set! (-> this rotate-ref) (the int (-> *mouse* posx))) + (set! (-> this mouse-ref-position quad) (-> arg0 quad)) + (set! (-> this drag-ref-position quad) (-> this position quad)) + (set! (-> this dragging?) #t) + (set! (-> this speed quad) (the-as uint128 0)) + 0 + (none) + ) + +;; definition for method 13 of type manipulator +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod manipulator-method-13 ((this manipulator) (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) + (cond + ((= (-> this mode) (manipulator-mode mm0)) + (set! (-> this speed quad) (-> this position quad)) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) arg1 arg0)) + (s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this mouse-ref-position) arg0)) + ) + 0.0 + 0.0 + (let ((s2-0 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'vector)) + ) + (cond + ((or (= (-> this action) (manipulator-action ma1)) + (= (-> this action) (manipulator-action ma2)) + (= (-> this action) (manipulator-action ma3)) + ) + (cond + ((= (-> this action) (manipulator-action ma1)) + (cond + ((< (fabs (vector-dot s5-1 (-> this mat uvec))) (fabs (vector-dot s5-1 (-> this mat fvec)))) + (set! (-> s2-0 quad) (-> this mat fvec quad)) + (set! (-> s1-0 quad) (-> this mat uvec quad)) + ) + (else + (set! (-> s2-0 quad) (-> this mat uvec quad)) + (set! (-> s1-0 quad) (-> this mat fvec quad)) + ) + ) + ) + ((= (-> this action) (manipulator-action ma2)) + (cond + ((< (fabs (vector-dot s5-1 (the-as vector (-> this mat)))) (fabs (vector-dot s5-1 (-> this mat fvec)))) + (set! (-> s2-0 quad) (-> this mat fvec quad)) + (set! (-> s1-0 quad) (-> this mat rvec quad)) + ) + (else + (set! (-> s2-0 quad) (-> this mat rvec quad)) + (set! (-> s1-0 quad) (-> this mat fvec quad)) + ) + ) + ) + ((= (-> this action) (manipulator-action ma3)) + (cond + ((< (fabs (vector-dot s5-1 (-> this mat uvec))) (fabs (vector-dot s5-1 (the-as vector (-> this mat))))) + (set! (-> s2-0 quad) (-> this mat rvec quad)) + (set! (-> s1-0 quad) (-> this mat uvec quad)) + ) + (else + (set! (-> s2-0 quad) (-> this mat uvec quad)) + (set! (-> s1-0 quad) (-> this mat rvec quad)) + ) + ) + ) + ) + (let ((f30-0 (intersect-ray-plane arg0 s5-1 (-> this position) s2-0)) + (f0-11 (intersect-ray-plane arg0 s4-1 (-> this position) s2-0)) + ) + (let ((a1-3 s5-1)) + (let ((v1-41 arg0)) + (let ((a0-43 s5-1)) + (let ((a2-3 f30-0)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a0-43 quad)) + ) + (.lvf vf4 (&-> v1-41 quad)) + ) + (.add.x.vf 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 ((a0-44 s4-1)) + (let ((v1-42 s4-1)) + (let ((a1-4 f0-11)) + (.mov vf7 a1-4) + ) + (.lvf vf5 (&-> v1-42 quad)) + ) + (.lvf vf4 (&-> arg0 quad)) + (.add.x.vf 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-44 quad) vf6) + ) + ) + (vector-flatten! s5-1 (vector-! (new 'stack-no-clear 'vector) s5-1 (-> this position)) s1-0) + (vector-flatten! s4-1 (vector-! (new 'stack-no-clear 'vector) s4-1 (-> this position)) s1-0) + (let ((v1-46 (vector-! (new 'stack-no-clear 'vector) s5-1 s4-1))) + (vector+! (-> this position) (-> this drag-ref-position) v1-46) + (format *stdcon* "delta ~M ~M ~M~%" (-> v1-46 x) (-> v1-46 y) (-> v1-46 z)) + ) + ) + ((or (= (-> this action) (manipulator-action ma4)) + (= (-> this action) (manipulator-action ma5)) + (= (-> this action) (manipulator-action ma6)) + (= (-> this action) (manipulator-action ma7)) + ) + (cond + ((= (-> this action) (manipulator-action ma4)) + (set! (-> s2-0 quad) (-> *z-vector* quad)) + ) + ((= (-> this action) (manipulator-action ma5)) + (set! (-> s2-0 quad) (-> *y-vector* quad)) + ) + ((= (-> this action) (manipulator-action ma6)) + (set! (-> s2-0 quad) (-> *x-vector* quad)) + ) + ((= (-> this action) (manipulator-action ma7)) + (set! (-> s2-0 quad) (-> *math-camera* inv-camera-rot fvec quad)) + ) + ) + (vector-normalize! s2-0 1.0) + (let ((f30-1 (intersect-ray-plane arg0 s5-1 (-> this position) s2-0)) + (f0-15 (intersect-ray-plane arg0 s4-1 (-> this position) s2-0)) + ) + (let ((a1-14 s5-1)) + (let ((v1-69 arg0)) + (let ((a0-69 s5-1)) + (let ((a2-13 f30-1)) + (.mov vf7 a2-13) + ) + (.lvf vf5 (&-> a0-69 quad)) + ) + (.lvf vf4 (&-> v1-69 quad)) + ) + (.add.x.vf 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-14 quad) vf6) + ) + (let ((v1-70 s4-1)) + (let ((a0-70 arg0)) + (let ((a1-15 s4-1)) + (let ((a2-14 f0-15)) + (.mov vf7 a2-14) + ) + (.lvf vf5 (&-> a1-15 quad)) + ) + (.lvf vf4 (&-> a0-70 quad)) + ) + (.add.x.vf 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-70 quad) vf6) + ) + ) + (vector+! (-> this position) (-> this drag-ref-position) (vector-! (new 'stack-no-clear 'vector) s5-1 s4-1)) + ) + ) + ) + ) + (vector-! (-> this speed) (-> this position) (-> this speed)) + ) + ((= (-> this mode) (manipulator-mode mm1)) + (let ((s4-2 (- (-> this rotate-ref) (the int (-> *mouse* posx)))) + (s5-2 (new 'stack-no-clear 'matrix)) + ) + (new 'stack 'euler-angles) + (matrix-identity! s5-2) + (cond + ((= (-> this action) (manipulator-action ma1)) + (matrix-axis-angle! s5-2 (the-as vector (-> this mat)) (* 182.04445 (the float s4-2))) + ) + ((= (-> this action) (manipulator-action ma2)) + (matrix-axis-angle! s5-2 (-> this mat uvec) (* 182.04445 (the float s4-2))) + ) + ((= (-> this action) (manipulator-action ma3)) + (matrix-axis-angle! s5-2 (-> this mat fvec) (* 182.04445 (the float s4-2))) + ) + ) + (matrix*! (-> this mat) (-> this mat) s5-2) + ) + (vector-normalize! (the-as vector (-> this mat)) 1.0) + (vector-normalize! (-> this mat uvec) 1.0) + (vector-normalize! (-> this mat fvec) 1.0) + (matrix->eul (-> this angles) (-> this mat) 21) + (format *stdcon* "X = ~R~%Y = ~R~%Z = ~R~%" (-> this angles x) (-> this angles y) (-> this angles z)) + (set! (-> this rotate-ref) (the int (-> *mouse* posx))) + ) + (else + ) + ) + 0 + (none) + ) + ) + +;; definition for method 14 of type manipulator +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod manipulator-method-14 ((this manipulator)) + (set! (-> this speed quad) (the-as uint128 0)) + (set! (-> this dragging?) #f) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/debug/menu_REF.gc b/test/decompiler/reference/jak3/engine/debug/menu_REF.gc new file mode 100644 index 0000000000..4c42436da7 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/debug/menu_REF.gc @@ -0,0 +1,1673 @@ +;;-*-Lisp-*- +(in-package goal) + +;; this file is debug only +(declare-file (debug)) + +;; definition of type debug-menu-context +(deftype debug-menu-context (basic) + ((is-active symbol) + (sel-length int32) + (sel-menu debug-menu 8) + (root-menu debug-menu) + (joypad-func (function basic int none)) + (joypad-item debug-menu-item) + (font font-context) + (is-hidden symbol) + (joypad-number int32) + ) + (:methods + (new (symbol type) _type_) + ) + ) + +;; definition for method 3 of type debug-menu-context +(defmethod inspect ((this debug-menu-context)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tis-active: ~A~%" (-> this is-active)) + (format #t "~1Tsel-length: ~D~%" (-> this sel-length)) + (format #t "~1Tsel-menu[8] @ #x~X~%" (-> this sel-menu)) + (format #t "~1Troot-menu: ~A~%" (-> this root-menu)) + (format #t "~1Tjoypad-func: ~A~%" (-> this joypad-func)) + (format #t "~1Tjoypad-item: ~A~%" (-> this joypad-item)) + (format #t "~1Tfont: ~A~%" (-> this font)) + (format #t "~1Tis-hidden: ~A~%" (-> this is-hidden)) + (format #t "~1Tjoypad-number: ~D~%" (-> this joypad-number)) + (label cfg-4) + this + ) + +;; definition for method 0 of type debug-menu-context +(defmethod new debug-menu-context ((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 is-active) #f) + (set! (-> gp-0 is-hidden) #f) + (set! (-> gp-0 sel-length) 0) + (set! (-> gp-0 root-menu) #f) + (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)) + ) + (set! (-> gp-0 joypad-number) 0) + gp-0 + ) + ) + +;; definition of type debug-menu-node +(deftype debug-menu-node (basic) + ((name string) + (parent debug-menu) + (refresh-delay int32) + (refresh-ctr int32) + ) + ) + +;; definition for method 3 of type debug-menu-node +(defmethod inspect ((this debug-menu-node)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tparent: ~A~%" (-> this parent)) + (format #t "~1Trefresh-delay: ~D~%" (-> this refresh-delay)) + (format #t "~1Trefresh-ctr: ~D~%" (-> this refresh-ctr)) + (label cfg-4) + this + ) + +;; definition for method 2 of type debug-menu-node +(defmethod print ((this debug-menu-node)) + (format #t "#<~A ~A @ #x~X>" (-> this type) (-> this name) this) + this + ) + +;; definition of type debug-menu +(deftype debug-menu (debug-menu-node) + ((context debug-menu-context) + (selected-item debug-menu-item) + (pix-width int32) + (pix-height int32) + (items pair) + ) + (:methods + (new (symbol type debug-menu-context string) _type_) + ) + ) + +;; definition for method 3 of type debug-menu +(defmethod inspect ((this debug-menu)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tparent: ~A~%" (-> this parent)) + (format #t "~1Trefresh-delay: ~D~%" (-> this refresh-delay)) + (format #t "~1Trefresh-ctr: ~D~%" (-> this refresh-ctr)) + (format #t "~1Tcontext: ~A~%" (-> this context)) + (format #t "~1Tselected-item: ~A~%" (-> this selected-item)) + (format #t "~1Tpix-width: ~D~%" (-> this pix-width)) + (format #t "~1Tpix-height: ~D~%" (-> this pix-height)) + (format #t "~1Titems: ~A~%" (-> this items)) + (label cfg-4) + this + ) + +;; definition for method 0 of type debug-menu +(defmethod new debug-menu ((allocation symbol) (type-to-make type) (arg0 debug-menu-context) (arg1 string)) + (let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> v0-0 context) arg0) + (set! (-> v0-0 name) arg1) + (set! (-> v0-0 parent) #f) + (set! (-> v0-0 selected-item) #f) + (set! (-> v0-0 items) '()) + v0-0 + ) + ) + +;; definition of type debug-menu-item +(deftype debug-menu-item (debug-menu-node) + ((id int32) + ) + ) + +;; definition for method 3 of type debug-menu-item +(defmethod inspect ((this debug-menu-item)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tparent: ~A~%" (-> this parent)) + (format #t "~1Trefresh-delay: ~D~%" (-> this refresh-delay)) + (format #t "~1Trefresh-ctr: ~D~%" (-> this refresh-ctr)) + (format #t "~1Tid: #x~X~%" (-> this id)) + (label cfg-4) + this + ) + +;; definition of type debug-menu-item-submenu +(deftype debug-menu-item-submenu (debug-menu-item) + ((submenu debug-menu) + ) + (:methods + (new (symbol type string debug-menu) _type_) + ) + ) + +;; definition for method 3 of type debug-menu-item-submenu +(defmethod inspect ((this debug-menu-item-submenu)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tparent: ~A~%" (-> this parent)) + (format #t "~1Trefresh-delay: ~D~%" (-> this refresh-delay)) + (format #t "~1Trefresh-ctr: ~D~%" (-> this refresh-ctr)) + (format #t "~1Tid: #x~X~%" (-> this id)) + (format #t "~1Tsubmenu: ~A~%" (-> this submenu)) + (label cfg-4) + this + ) + +;; definition for method 0 of type debug-menu-item-submenu +(defmethod new debug-menu-item-submenu ((allocation symbol) (type-to-make type) (arg0 string) (arg1 debug-menu)) + (let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> v0-0 name) arg0) + (set! (-> v0-0 parent) #f) + (set! (-> v0-0 refresh-delay) 0) + (set! (-> v0-0 refresh-ctr) (-> v0-0 refresh-delay)) + (set! (-> v0-0 submenu) arg1) + (set! (-> v0-0 submenu parent) (the-as debug-menu v0-0)) + v0-0 + ) + ) + +;; definition of type debug-menu-item-function +(deftype debug-menu-item-function (debug-menu-item) + ((activate-func (function object object)) + (hilite-timer int8) + ) + (:methods + (new (symbol type string object (function object object)) _type_) + ) + ) + +;; definition for method 3 of type debug-menu-item-function +(defmethod inspect ((this debug-menu-item-function)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tparent: ~A~%" (-> this parent)) + (format #t "~1Trefresh-delay: ~D~%" (-> this refresh-delay)) + (format #t "~1Trefresh-ctr: ~D~%" (-> this refresh-ctr)) + (format #t "~1Tid: #x~X~%" (-> this id)) + (format #t "~1Tactivate-func: ~A~%" (-> this activate-func)) + (format #t "~1Thilite-timer: ~D~%" (-> this hilite-timer)) + (label cfg-4) + this + ) + +;; definition for method 0 of type debug-menu-item-function +(defmethod new debug-menu-item-function ((allocation symbol) (type-to-make type) (arg0 string) (arg1 object) (arg2 (function object object))) + (let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> v0-0 name) arg0) + (set! (-> v0-0 parent) #f) + (set! (-> v0-0 refresh-delay) 0) + (set! (-> v0-0 refresh-ctr) (-> v0-0 refresh-delay)) + (set! (-> v0-0 id) (the-as int arg1)) + (set! (-> v0-0 activate-func) arg2) + (set! (-> v0-0 hilite-timer) 0) + v0-0 + ) + ) + +;; definition of type debug-menu-item-flag +(deftype debug-menu-item-flag (debug-menu-item) + ((activate-func (function object debug-menu-msg object)) + (is-on symbol) + ) + (:methods + (new (symbol type string object (function object debug-menu-msg object)) _type_) + ) + ) + +;; definition for method 3 of type debug-menu-item-flag +(defmethod inspect ((this debug-menu-item-flag)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tparent: ~A~%" (-> this parent)) + (format #t "~1Trefresh-delay: ~D~%" (-> this refresh-delay)) + (format #t "~1Trefresh-ctr: ~D~%" (-> this refresh-ctr)) + (format #t "~1Tid: #x~X~%" (-> this id)) + (format #t "~1Tactivate-func: ~A~%" (-> this activate-func)) + (format #t "~1Tis-on: ~A~%" (-> this is-on)) + (label cfg-4) + this + ) + +;; definition for method 0 of type debug-menu-item-flag +(defmethod new debug-menu-item-flag ((allocation symbol) + (type-to-make type) + (arg0 string) + (arg1 object) + (arg2 (function object debug-menu-msg object)) + ) + (let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> v0-0 name) arg0) + (set! (-> v0-0 parent) #f) + (set! (-> v0-0 refresh-delay) 23) + (set! (-> v0-0 refresh-ctr) (-> v0-0 refresh-delay)) + (set! (-> v0-0 id) (the-as int arg1)) + (set! (-> v0-0 activate-func) arg2) + (set! (-> v0-0 is-on) #f) + v0-0 + ) + ) + +;; definition of type debug-menu-item-var +(deftype debug-menu-item-var (debug-menu-item) + ((display-str string) + (grabbed-joypad-p symbol) + (float-p symbol) + (range-p symbol) + (show-len int32) + (inc-delay int32) + (inc-delay-ctr int32) + (step-delay-ctr int32) + (inc-dir int32) + (fval float) + (fundo-val float) + (frange-min float) + (frange-max float) + (fstart-inc float) + (fstep float) + (fprecision int32) + (factivate-func (function int debug-menu-msg float float float)) + (ival int32 :overlay-at fval) + (iundo-val int32 :overlay-at fundo-val) + (irange-min int32 :overlay-at frange-min) + (irange-max int32 :overlay-at frange-max) + (istart-inc int32 :overlay-at fstart-inc) + (istep int32 :overlay-at fstep) + (ihex-p symbol) + (iactivate-func (function int debug-menu-msg int int int) :overlay-at factivate-func) + (ifloat-p symbol) + ) + (:methods + (new (symbol type string int int) _type_) + ) + ) + +;; definition for method 3 of type debug-menu-item-var +(defmethod inspect ((this debug-menu-item-var)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tparent: ~A~%" (-> this parent)) + (format #t "~1Trefresh-delay: ~D~%" (-> this refresh-delay)) + (format #t "~1Trefresh-ctr: ~D~%" (-> this refresh-ctr)) + (format #t "~1Tid: #x~X~%" (-> this id)) + (format #t "~1Tdisplay-str: ~A~%" (-> this display-str)) + (format #t "~1Tgrabbed-joypad-p: ~A~%" (-> this grabbed-joypad-p)) + (format #t "~1Tfloat-p: ~A~%" (-> this float-p)) + (format #t "~1Trange-p: ~A~%" (-> this range-p)) + (format #t "~1Tshow-len: ~D~%" (-> this show-len)) + (format #t "~1Tinc-delay: ~D~%" (-> this inc-delay)) + (format #t "~1Tinc-delay-ctr: ~D~%" (-> this inc-delay-ctr)) + (format #t "~1Tstep-delay-ctr: ~D~%" (-> this step-delay-ctr)) + (format #t "~1Tinc-dir: ~D~%" (-> this inc-dir)) + (format #t "~1Tfval: ~f~%" (-> this fval)) + (format #t "~1Tfundo-val: ~f~%" (-> this fundo-val)) + (format #t "~1Tfrange-min: ~f~%" (-> this frange-min)) + (format #t "~1Tfrange-max: ~f~%" (-> this frange-max)) + (format #t "~1Tfstart-inc: ~f~%" (-> this fstart-inc)) + (format #t "~1Tfstep: ~f~%" (-> this fstep)) + (format #t "~1Tfprecision: ~D~%" (-> this fprecision)) + (format #t "~1Tfactivate-func: ~A~%" (-> this factivate-func)) + (format #t "~1Tival: ~D~%" (-> this fval)) + (format #t "~1Tiundo-val: ~D~%" (-> this fundo-val)) + (format #t "~1Tirange-min: ~D~%" (-> this frange-min)) + (format #t "~1Tirange-max: ~D~%" (-> this frange-max)) + (format #t "~1Tistart-inc: ~D~%" (-> this fstart-inc)) + (format #t "~1Tistep: ~D~%" (-> this fstep)) + (format #t "~1Tihex-p: ~A~%" (-> this ihex-p)) + (format #t "~1Tiactivate-func: ~A~%" (-> this factivate-func)) + (format #t "~1Tifloat-p: ~A~%" (-> this ifloat-p)) + (label cfg-4) + this + ) + +;; definition for function debug-menu-item-var-update-display-str +(defun debug-menu-item-var-update-display-str ((arg0 debug-menu-item-var)) + (cond + ((-> arg0 float-p) + (format (clear (-> arg0 display-str)) "~f" (-> arg0 fval)) + ) + ((-> arg0 ihex-p) + (format (clear (-> arg0 display-str)) "x~X" (-> arg0 fval)) + ) + ((-> arg0 ifloat-p) + (cond + ((and (< (the-as int (-> arg0 fval)) 0) (< -100 (the-as int (-> arg0 fval)))) + (let ((s5-2 format) + (a0-8 (clear (-> arg0 display-str))) + (a1-2 "-0.~1d") + (v1-8 (abs (the-as int (-> arg0 fval)))) + ) + (s5-2 a0-8 a1-2 (/ (mod v1-8 100) 10)) + ) + ) + (else + (let ((s5-3 format) + (a0-10 (clear (-> arg0 display-str))) + (a1-3 "~2d.~1d") + (a2-6 (/ (the-as int (-> arg0 fval)) 100)) + (v1-12 (abs (the-as int (-> arg0 fval)))) + ) + (s5-3 a0-10 a1-3 a2-6 (/ (mod v1-12 100) 10)) + ) + ) + ) + ) + (else + (format (clear (-> arg0 display-str)) "~D" (-> arg0 fval)) + ) + ) + arg0 + ) + +;; definition for function debug-menu-item-var-make-int +(defun debug-menu-item-var-make-int ((arg0 debug-menu-item-var) + (arg1 (function int debug-menu-msg int int int)) + (arg2 int) + (arg3 symbol) + (arg4 int) + (arg5 int) + (arg6 symbol) + ) + (set! (-> arg0 float-p) #f) + (set! (-> arg0 range-p) arg3) + (set! (-> arg0 frange-min) (the-as float arg4)) + (set! (-> arg0 frange-max) (the-as float arg5)) + (set! (-> arg0 fstart-inc) (the-as float arg2)) + (set! (-> arg0 fstep) (the-as float arg2)) + (set! (-> arg0 ihex-p) arg6) + (set! (-> arg0 factivate-func) (the-as (function int debug-menu-msg float float float) arg1)) + (cond + (arg3 + (set! (-> arg0 fval) (the-as float arg4)) + ) + (else + (set! (-> arg0 fval) 0.0) + 0 + ) + ) + (if arg1 + (set! (-> arg0 fval) + (the-as + float + (arg1 (-> arg0 id) (debug-menu-msg update) (the-as int (-> arg0 fval)) (the-as int (-> arg0 fval))) + ) + ) + ) + (debug-menu-item-var-update-display-str arg0) + arg0 + ) + +;; definition for function debug-menu-item-var-make-float +(defun debug-menu-item-var-make-float ((arg0 debug-menu-item-var) + (arg1 (function int debug-menu-msg float float float)) + (arg2 float) + (arg3 symbol) + (arg4 float) + (arg5 float) + (arg6 int) + ) + (set! (-> arg0 float-p) #t) + (set! (-> arg0 range-p) arg3) + (set! (-> arg0 frange-min) arg4) + (set! (-> arg0 frange-max) arg5) + (set! (-> arg0 fstart-inc) arg2) + (set! (-> arg0 fstep) arg2) + (set! (-> arg0 fprecision) arg6) + (set! (-> arg0 factivate-func) arg1) + (if arg3 + (set! (-> arg0 fval) arg4) + (set! (-> arg0 fval) 0.0) + ) + (if arg1 + (set! (-> arg0 fval) + (the float (the-as int (arg1 (-> arg0 id) (debug-menu-msg update) (-> arg0 fval) (-> arg0 fval)))) + ) + ) + (debug-menu-item-var-update-display-str arg0) + arg0 + ) + +;; definition for method 0 of type debug-menu-item-var +(defmethod new debug-menu-item-var ((allocation symbol) (type-to-make type) (arg0 string) (arg1 int) (arg2 int)) + (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (let ((v1-2 (/ arg2 8))) + (set! (-> gp-0 name) arg0) + (set! (-> gp-0 parent) #f) + (set! (-> gp-0 refresh-delay) 31) + (set! (-> gp-0 refresh-ctr) (-> gp-0 refresh-delay)) + (set! (-> gp-0 id) arg1) + (set! v1-2 (cond + ((< 3 v1-2) + (empty) + v1-2 + ) + (else + 3 + ) + ) + ) + (set! (-> gp-0 show-len) v1-2) + ) + (set! (-> gp-0 grabbed-joypad-p) #f) + (set! (-> gp-0 ifloat-p) #f) + (set! (-> gp-0 display-str) (new 'debug 'string 64 (the-as string #f))) + (debug-menu-item-var-make-int gp-0 (the-as (function int debug-menu-msg int int int) #f) 1 #t 0 0 #f) + gp-0 + ) + ) + +;; definition for function debug-menu-context-grab-joypad +(defun debug-menu-context-grab-joypad ((arg0 debug-menu-context) (arg1 basic) (arg2 (function basic int none))) + (cond + ((-> arg0 joypad-func) + #f + ) + (else + (set! (-> arg0 joypad-func) arg2) + (set! (-> arg0 joypad-item) (the-as debug-menu-item arg1)) + #t + ) + ) + ) + +;; definition for function debug-menu-context-release-joypad +(defun debug-menu-context-release-joypad ((arg0 debug-menu-context)) + (set! (-> arg0 joypad-func) #f) + (set! (-> arg0 joypad-item) #f) + #f + ) + +;; definition for function debug-menu-item-get-max-width +(defun debug-menu-item-get-max-width ((arg0 debug-menu-item) (arg1 debug-menu)) + (local-vars (v0-1 int)) + 0 + (cond + ((= (-> arg0 type) debug-menu-item-submenu) + (set! v0-1 + (+ (the int + (-> (get-string-length (-> (the-as debug-menu-item-submenu arg0) name) (-> arg1 context font)) length) + ) + 16 + ) + ) + ) + ((= (-> arg0 type) debug-menu-item-var) + (set! v0-1 + (the int + (-> (get-string-length (-> (the-as debug-menu-item-var arg0) display-str) (-> arg1 context font)) length) + ) + ) + ) + (else + (set! v0-1 (+ (the int (-> (get-string-length (-> arg0 name) (-> arg1 context font)) length)) 6)) + ) + ) + v0-1 + ) + +;; definition for function debug-menu-context-default-selection +(defun debug-menu-context-default-selection ((arg0 debug-menu-context) (arg1 symbol)) + (when (or (zero? (-> arg0 sel-length)) (not arg1)) + (let ((s5-0 (-> arg0 root-menu))) + (when (and s5-0 (not (null? (-> s5-0 items)))) + (let ((s4-0 (-> arg0 is-active))) + (if s4-0 + (debug-menu-context-send-msg arg0 (debug-menu-msg deactivate) (debug-menu-dest activation)) + ) + (set! (-> arg0 sel-length) 1) + (set! (-> arg0 sel-menu 0) s5-0) + (set! (-> s5-0 selected-item) (the-as debug-menu-item (-> s5-0 items car))) + (if s4-0 + (debug-menu-context-send-msg arg0 (debug-menu-msg activate) (debug-menu-dest activation)) + ) + ) + ) + ) + ) + arg0 + ) + +;; definition for function debug-menu-rebuild +(defun debug-menu-rebuild ((arg0 debug-menu)) + (let ((s4-0 0) + (s5-0 0) + ) + (let* ((s3-0 (-> arg0 items)) + (a0-1 (car s3-0)) + ) + (while (not (null? s3-0)) + (+! s5-0 1) + (set! (-> (the-as debug-menu-item a0-1) parent) arg0) + (set! s4-0 (max s4-0 (debug-menu-item-get-max-width (the-as debug-menu-item a0-1) arg0))) + (set! s3-0 (cdr s3-0)) + (set! a0-1 (car s3-0)) + ) + ) + (set! (-> arg0 pix-width) (+ s4-0 18)) + (set! (-> arg0 pix-height) (+ (* 15 s5-0) 10)) + ) + (let ((a0-2 (-> arg0 context))) + (debug-menu-context-default-selection a0-2 #t) + ) + arg0 + ) + +;; definition for function debug-menu-context-set-root-menu +(defun debug-menu-context-set-root-menu ((arg0 debug-menu-context) (arg1 debug-menu)) + (let ((s4-0 (-> arg0 is-active))) + (if s4-0 + (debug-menu-context-send-msg arg0 (debug-menu-msg deactivate) (debug-menu-dest activation)) + ) + (set! (-> arg0 root-menu) arg1) + (debug-menu-context-default-selection arg0 #f) + (if s4-0 + (debug-menu-context-send-msg arg0 (debug-menu-msg activate) (debug-menu-dest activation)) + ) + ) + arg0 + ) + +;; definition for function debug-menu-append-item +(defun debug-menu-append-item ((arg0 debug-menu) (arg1 debug-menu-node)) + (let* ((gp-0 (-> arg0 context)) + (s4-0 (-> gp-0 is-active)) + ) + (if s4-0 + (debug-menu-context-send-msg gp-0 (debug-menu-msg deactivate) (debug-menu-dest activation)) + ) + (set! (-> arg1 parent) arg0) + (set! (-> arg0 items) (the-as pair (append! (-> arg0 items) (cons arg1 '())))) + (debug-menu-rebuild arg0) + (if s4-0 + (debug-menu-context-send-msg gp-0 (debug-menu-msg activate) (debug-menu-dest activation)) + ) + ) + arg1 + ) + +;; definition for function debug-menu-remove-all-items +(defun debug-menu-remove-all-items ((arg0 debug-menu)) + (let* ((gp-0 (-> arg0 context)) + (s4-0 (-> gp-0 is-active)) + ) + (if s4-0 + (debug-menu-context-send-msg gp-0 (debug-menu-msg deactivate) (debug-menu-dest activation)) + ) + (set! (-> arg0 items) '()) + (set! (-> arg0 selected-item) #f) + (debug-menu-rebuild arg0) + (if s4-0 + (debug-menu-context-send-msg gp-0 (debug-menu-msg activate) (debug-menu-dest activation)) + ) + ) + arg0 + ) + +;; definition for function debug-menu-func-decode +;; WARN: Return type mismatch object vs function. +(defun debug-menu-func-decode ((arg0 object)) + (let ((v1-2 (rtype-of arg0))) + (the-as function (cond + ((or (= v1-2 symbol) (= v1-2 type)) + (-> (the-as symbol arg0) value) + ) + ((= v1-2 function) + arg0 + ) + (else + nothing + ) + ) + ) + ) + ) + +;; definition for function debug-menu-make-from-template +;; INFO: Used lq/sq +;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 128 mismatch: defined as size 4, got size 16 +(defun debug-menu-make-from-template ((arg0 debug-menu-context) (arg1 pair)) + (local-vars + (s4-0 debug-menu-node) + (sv-16 object) + (sv-32 (function object int int)) + (sv-48 int) + (sv-64 (function object int int)) + (sv-80 (function object float float)) + (sv-96 float) + (sv-112 (function object float float)) + (sv-128 float) + (sv-144 (function object int int)) + ) + (when (or (not arg1) (null? arg1)) + (set! s4-0 (the-as debug-menu-node #f)) + (goto cfg-39) + ) + (let ((s5-0 (car arg1)) + (s4-1 (car (cdr arg1))) + ) + (cond + ((= s5-0 'menu) + (let ((s5-1 (new 'debug 'debug-menu arg0 (the-as string s4-1)))) + (set! s4-0 (new 'debug 'debug-menu-item-submenu (the-as string s4-1) s5-1)) + (let* ((gp-1 (cdr (cdr arg1))) + (a1-3 (car gp-1)) + ) + (while (not (null? gp-1)) + (let ((a1-4 (debug-menu-make-from-template arg0 (the-as pair a1-3)))) + (if a1-4 + (debug-menu-append-item s5-1 a1-4) + ) + ) + (set! gp-1 (cdr gp-1)) + (set! a1-3 (car gp-1)) + ) + ) + ) + ) + ((= s5-0 'main-menu) + (set! s4-0 (new 'debug 'debug-menu arg0 (the-as string s4-1))) + (let* ((gp-2 (cdr (cdr arg1))) + (a1-6 (car gp-2)) + ) + (while (not (null? gp-2)) + (let ((a1-7 (debug-menu-make-from-template arg0 (the-as pair a1-6)))) + (if a1-7 + (debug-menu-append-item (the-as debug-menu s4-0) a1-7) + ) + ) + (set! gp-2 (cdr gp-2)) + (set! a1-6 (car gp-2)) + ) + ) + (debug-menu-context-set-root-menu arg0 (the-as debug-menu s4-0)) + ) + (else + (set! s4-0 + (cond + ((= s5-0 'flag) + (new + 'debug + 'debug-menu-item-flag + (the-as string s4-1) + (car (cdr (cdr arg1))) + (the-as (function object debug-menu-msg object) (debug-menu-func-decode (car (cdr (cdr (cdr arg1)))))) + ) + ) + ((or (= s5-0 0) (= s5-0 'function)) + (new + 'debug + 'debug-menu-item-function + (the-as string s4-1) + (car (cdr (cdr arg1))) + (the-as (function object object) (debug-menu-func-decode (car (cdr (cdr (cdr arg1)))))) + ) + ) + ((= s5-0 'var) + (new + 'debug + 'debug-menu-item-var + (the-as string s4-1) + (the-as int (car (cdr (cdr arg1)))) + (the-as int (car (cdr (cdr (cdr arg1))))) + ) + ) + ((or (= s5-0 'int-var) (= s5-0 'int-var-gat1) (= s5-0 'hex-var)) + (set! s4-0 (new + 'debug + 'debug-menu-item-var + (the-as string s4-1) + (the-as int (car (cdr (cdr arg1)))) + (the-as int (ref arg1 4)) + ) + ) + (let ((s3-4 debug-menu-item-var-make-int) + (s2-3 (the-as debug-menu-item-var s4-0)) + (s1-3 (debug-menu-func-decode (car (cdr (cdr (cdr arg1)))))) + (s0-2 (command-get-int (ref arg1 5) 0)) + ) + (set! sv-16 (ref arg1 6)) + (set! sv-32 command-get-int) + (let ((a0-24 (ref arg1 7)) + (a1-18 0) + ) + (set! sv-48 (sv-32 a0-24 a1-18)) + ) + (set! sv-64 command-get-int) + (let* ((a0-26 (ref arg1 8)) + (a1-20 0) + (t1-0 (sv-64 a0-26 a1-20)) + (t2-0 (= s5-0 'hex-var)) + ) + (s3-4 s2-3 (the-as (function int debug-menu-msg int int int) s1-3) s0-2 (the-as symbol sv-16) sv-48 t1-0 t2-0) + ) + ) + s4-0 + ) + ((= s5-0 'float-var) + (set! s4-0 (new + 'debug + 'debug-menu-item-var + (the-as string s4-1) + (the-as int (car (cdr (cdr arg1)))) + (the-as int (ref arg1 4)) + ) + ) + (let ((s5-5 debug-menu-item-var-make-float) + (s3-6 (the-as debug-menu-item-var s4-0)) + (s2-5 (debug-menu-func-decode (car (cdr (cdr (cdr arg1)))))) + (s1-6 (command-get-float (ref arg1 5) 0.0)) + (s0-3 (ref arg1 6)) + ) + (set! sv-80 command-get-float) + (let ((a0-35 (ref arg1 7)) + (a1-28 0.0) + ) + (set! sv-96 (sv-80 a0-35 a1-28)) + ) + (set! sv-112 command-get-float) + (let ((a0-37 (ref arg1 8)) + (a1-30 0.0) + ) + (set! sv-128 (sv-112 a0-37 a1-30)) + ) + (set! sv-144 command-get-int) + (let* ((a0-39 (ref arg1 9)) + (a1-32 0) + (t2-1 (sv-144 a0-39 a1-32)) + ) + (s5-5 + s3-6 + (the-as (function int debug-menu-msg float float float) s2-5) + s1-6 + (the-as symbol s0-3) + sv-96 + sv-128 + t2-1 + ) + ) + ) + s4-0 + ) + (else + (the-as debug-menu-node #f) + ) + ) + ) + ) + ) + ) + (label cfg-39) + s4-0 + ) + +;; definition for function debug-menu-find-from-template +;; WARN: Return type mismatch object vs debug-menu. +(defun debug-menu-find-from-template ((arg0 debug-menu-context) (arg1 pair)) + (let ((s5-0 (the-as object (-> arg0 root-menu)))) + (while (begin (label cfg-12) (and s5-0 (type? s5-0 debug-menu) (not (null? arg1)))) + (let ((s3-0 (-> (the-as debug-menu s5-0) items)) + (s5-1 (car arg1)) + ) + (set! arg1 (cdr arg1)) + (let ((s4-0 (car s3-0))) + (while (not (null? s3-0)) + (when (string= (the-as string s5-1) (-> (the-as debug-menu-item s4-0) name)) + (if (type? s4-0 debug-menu-item-submenu) + (set! s5-0 (-> (the-as debug-menu-item-submenu s4-0) submenu)) + (set! s5-0 s4-0) + ) + (goto cfg-12) + ) + (set! s3-0 (cdr s3-0)) + (set! s4-0 (car s3-0)) + ) + ) + ) + (set! s5-0 #f) + (goto cfg-19) + ) + (label cfg-19) + (the-as debug-menu s5-0) + ) + ) + +;; definition for function debug-menu-item-submenu-render +(defun debug-menu-item-submenu-render ((arg0 debug-menu-item-submenu) (arg1 int) (arg2 int) (arg3 int) (arg4 symbol)) + (let ((s5-0 (-> arg0 parent context font))) + (let ((v1-2 s5-0) + (a0-1 arg2) + ) + (set! (-> v1-2 origin x) (the float arg1)) + (set! (-> v1-2 origin y) (the float a0-1)) + ) + (set! (-> s5-0 color) (cond + ((zero? arg3) + (font-color menu) + ) + (arg4 + (font-color menu-selected-parent) + ) + (else + (font-color menu-parent) + ) + ) + ) + (with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) debug-buf)) + (bucket-id debug-menu) + ) + (draw-string-adv (-> arg0 name) s3-0 s5-0) + (draw-string-adv "..." s3-0 s5-0) + ) + ) + arg0 + ) + +;; definition for function debug-menu-item-function-render +(defun debug-menu-item-function-render ((arg0 debug-menu-item-function) (arg1 int) (arg2 int) (arg3 int) (arg4 symbol)) + (let ((s5-0 (-> arg0 parent context font))) + (let ((v1-2 s5-0) + (a0-1 arg2) + ) + (set! (-> v1-2 origin x) (the float arg1)) + (set! (-> v1-2 origin y) (the float a0-1)) + ) + (set! (-> s5-0 color) (the-as font-color (cond + ((> (-> arg0 hilite-timer) 0) + (+! (-> arg0 hilite-timer) -1) + 10 + ) + ((< (-> arg0 hilite-timer) 0) + (+! (-> arg0 hilite-timer) 1) + 14 + ) + ((nonzero? arg3) + 13 + ) + (else + 12 + ) + ) + ) + ) + (with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) debug-buf)) + (bucket-id debug-menu) + ) + (set-context! *font-work* s5-0) + (draw-string (-> arg0 name) s3-0 s5-0) + ) + ) + arg0 + ) + +;; definition for function debug-menu-item-flag-render +(defun debug-menu-item-flag-render ((arg0 debug-menu-item-flag) (arg1 int) (arg2 int) (arg3 int) (arg4 symbol)) + (let ((s5-0 (-> arg0 parent context font))) + (let ((v1-2 s5-0) + (a0-1 arg2) + ) + (set! (-> v1-2 origin x) (the float arg1)) + (set! (-> v1-2 origin y) (the float a0-1)) + ) + (set! (-> s5-0 color) (cond + ((= (-> arg0 is-on) 'invalid) + (font-color menu-invalid) + ) + ((-> arg0 is-on) + (if (zero? arg3) + (font-color menu-flag-on) + (font-color menu-flag-on-parent) + ) + ) + ((zero? arg3) + (font-color menu-flag-off) + ) + (else + (font-color menu-flag-off-parent) + ) + ) + ) + (with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) debug-buf)) + (bucket-id debug-menu) + ) + (set-context! *font-work* s5-0) + (draw-string (-> arg0 name) s3-0 s5-0) + ) + ) + arg0 + ) + +;; definition for function debug-menu-item-var-render +(defun debug-menu-item-var-render ((arg0 debug-menu-item-var) (arg1 int) (arg2 int) (arg3 int) (arg4 symbol)) + (let ((s5-0 (-> arg0 parent context font))) + (let ((v1-2 s5-0) + (a0-1 arg2) + ) + (set! (-> v1-2 origin x) (the float arg1)) + (set! (-> v1-2 origin y) (the float a0-1)) + ) + (set! (-> s5-0 color) (cond + ((zero? arg3) + (if (-> arg0 grabbed-joypad-p) + (font-color menu-selected) + (font-color menu) + ) + ) + (arg4 + (font-color menu-selected-parent) + ) + (else + (font-color menu-parent) + ) + ) + ) + (with-dma-buffer-add-bucket ((s1-0 (-> *display* frames (-> *display* on-screen) debug-buf)) + (bucket-id debug-menu) + ) + (draw-string-adv (-> arg0 name) s1-0 s5-0) + (draw-string-adv ":" s1-0 s5-0) + (cond + ((>= (-> arg0 show-len) (length (-> arg0 display-str))) + (set-context! *font-work* s5-0) + (draw-string (-> arg0 display-str) s1-0 s5-0) + ) + (else + (set-context! *font-work* s5-0) + (draw-string "..." s1-0 s5-0) + (set! arg4 (and (zero? arg3) arg4)) + (when arg4 + (let ((v1-18 s5-0) + (a1-7 20) + (a0-10 379) + ) + (set! (-> v1-18 origin x) (the float a1-7)) + (set! (-> v1-18 origin y) (the float a0-10)) + ) + (draw-string-adv (-> arg0 name) s1-0 s5-0) + (draw-string-adv ":" s1-0 s5-0) + (draw-string (-> arg0 display-str) s1-0 s5-0) + ) + ) + ) + ) + ) + arg0 + ) + +;; definition for function debug-menu-item-render +(defun debug-menu-item-render ((arg0 debug-menu-item) (arg1 int) (arg2 int) (arg3 int) (arg4 symbol)) + (when (> (-> arg0 refresh-delay) 0) + (+! (-> arg0 refresh-ctr) -1) + (when (<= (-> arg0 refresh-ctr) 0) + (set! (-> arg0 refresh-ctr) (-> arg0 refresh-delay)) + (debug-menu-item-send-msg arg0 (debug-menu-msg update)) + ) + ) + (cond + ((= (-> arg0 type) debug-menu-item-submenu) + (debug-menu-item-submenu-render (the-as debug-menu-item-submenu arg0) arg1 arg2 arg3 arg4) + ) + ((= (-> arg0 type) debug-menu-item-function) + (debug-menu-item-function-render (the-as debug-menu-item-function arg0) arg1 arg2 arg3 arg4) + ) + ((= (-> arg0 type) debug-menu-item-flag) + (debug-menu-item-flag-render (the-as debug-menu-item-flag arg0) arg1 arg2 arg3 arg4) + ) + ((= (-> arg0 type) debug-menu-item-var) + (debug-menu-item-var-render (the-as debug-menu-item-var arg0) arg1 arg2 arg3 arg4) + ) + (else + (format 0 "ERROR: Found unknown item type!~%") + ) + ) + arg0 + ) + +;; definition for function debug-menu-render +;; INFO: Used lq/sq +(defun debug-menu-render ((arg0 debug-menu) (arg1 int) (arg2 int) (arg3 debug-menu-node) (arg4 int)) + (local-vars (sv-16 dma-buffer) (sv-32 pointer)) + (let ((v1-0 0)) + (let* ((a0-1 (-> arg0 items)) + (a1-1 (car a0-1)) + ) + (while (not (null? a0-1)) + (if (= a1-1 arg3) + (goto cfg-7) + ) + (+! v1-0 1) + (set! a0-1 (cdr a0-1)) + (set! a1-1 (car a0-1)) + ) + ) + (label cfg-7) + (if (< 16 v1-0) + (set! arg2 (- arg2 (* 15 (+ v1-0 -16)))) + ) + ) + (with-dma-buffer-add-bucket ((s0-0 (-> *display* frames (-> *display* on-screen) debug-buf)) + (bucket-id debug-menu) + ) + (draw-sprite2d-xy + s0-0 + arg1 + arg2 + (-> arg0 pix-width) + (-> arg0 pix-height) + (new 'static 'rgba :a #x40) + #x3fffff + ) + ) + (let* ((s3-1 (+ arg1 3)) + (s2-1 (+ arg2 5)) + (s1-1 (-> arg0 items)) + (s0-1 (car s1-1)) + ) + (while (not (null? s1-1)) + (when (= s0-1 arg3) + (set! (-> arg0 context font color) (if (nonzero? arg4) + (font-color menu-parent) + (font-color menu) + ) + ) + (let ((v1-20 (-> arg0 context font)) + (a1-5 s3-1) + (a0-15 s2-1) + ) + (set! (-> v1-20 origin x) (the float a1-5)) + (set! (-> v1-20 origin y) (the float a0-15)) + ) + (set! sv-16 (-> *display* frames (-> *display* on-screen) debug-buf)) + (set! sv-32 (-> sv-16 base)) + (set-context! *font-work* (-> arg0 context font)) + (draw-string ">" sv-16 (-> arg0 context font)) + (let ((a3-3 (-> sv-16 base))) + (when (!= sv-32 a3-3) + (let ((v1-35 (the-as object (-> sv-16 base)))) + (set! (-> (the-as dma-packet v1-35) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-35) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-35) vif1) (new 'static 'vif-tag)) + (set! (-> sv-16 base) (&+ (the-as pointer v1-35) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id debug-menu) + sv-32 + (the-as (pointer dma-tag) a3-3) + ) + ) + ) + ) + (debug-menu-item-render (the-as debug-menu-item s0-1) (+ s3-1 12) s2-1 arg4 (= s0-1 arg3)) + (+! s2-1 15) + (set! s1-1 (cdr s1-1)) + (set! s0-1 (car s1-1)) + ) + ) + arg0 + ) + +;; definition for function debug-menu-context-render +(defun debug-menu-context-render ((arg0 debug-menu-context)) + (let ((s4-0 6)) + (dotimes (s5-0 (-> arg0 sel-length)) + (let ((s3-0 (-> arg0 sel-menu s5-0))) + (let ((a3-0 (-> s3-0 selected-item))) + (debug-menu-render s3-0 s4-0 52 a3-0 (+ (- -1 s5-0) (-> arg0 sel-length))) + ) + (set! s4-0 (+ s4-0 3 (-> s3-0 pix-width))) + ) + ) + ) + arg0 + ) + +;; definition for function debug-menu-context-select-next-or-prev-item +(defun debug-menu-context-select-next-or-prev-item ((arg0 debug-menu-context) (arg1 int)) + (local-vars (v1-6 object)) + (let ((s5-0 (-> arg0 sel-menu (+ (-> arg0 sel-length) -1)))) + (let ((a2-0 (-> s5-0 selected-item)) + (a0-1 '()) + (v1-4 '()) + ) + (let ((a3-0 (-> s5-0 items))) + (while (not (null? a3-0)) + (when (= (car a3-0) a2-0) + (set! v1-4 a3-0) + (goto cfg-7) + ) + (set! a0-1 a3-0) + (set! a3-0 (cdr a3-0)) + ) + ) + (label cfg-7) + (when (null? v1-4) + (format 0 "ERROR: Couldn't find selected item in menu.~%") + (set! arg0 arg0) + (goto cfg-19) + ) + (cond + ((>= arg1 0) + (if (null? (cdr v1-4)) + (set! v1-6 (car (-> s5-0 items))) + (set! v1-6 (car (cdr v1-4))) + ) + ) + ((null? a0-1) + (set! v1-6 (car (last (-> s5-0 items)))) + ) + (else + (set! v1-6 (car a0-1)) + ) + ) + ) + (set! (-> s5-0 selected-item) (the-as debug-menu-item v1-6)) + ) + (label cfg-19) + arg0 + ) + +;; definition for function debug-menu-context-select-new-item +(defun debug-menu-context-select-new-item ((arg0 debug-menu-context) (arg1 int)) + (let* ((a2-0 (-> arg0 sel-menu (+ (-> arg0 sel-length) -1))) + (a1-1 (-> a2-0 selected-item)) + (a0-1 0) + (v1-4 -1) + ) + (let ((a2-1 (-> a2-0 items))) + (while (not (null? a2-1)) + (if (= (car a2-1) a1-1) + (set! v1-4 a0-1) + ) + (set! a2-1 (cdr a2-1)) + (+! a0-1 1) + ) + ) + (when (= v1-4 -1) + (format 0 "ERROR: Couldn't find selected item in menu.~%") + (set! arg0 arg0) + (goto cfg-25) + ) + (cond + ((>= arg1 0) + (cond + ((= v1-4 (+ a0-1 -1)) + (set! arg1 1) + ) + ((>= (+ v1-4 arg1) a0-1) + (set! arg1 (+ (- -1 v1-4) a0-1)) + ) + ) + (dotimes (s4-0 arg1) + (debug-menu-context-select-next-or-prev-item arg0 1) + ) + ) + (else + (cond + ((zero? v1-4) + (set! arg1 -1) + ) + ((< (+ v1-4 arg1) 0) + (set! arg1 (- v1-4)) + ) + ) + (dotimes (s4-1 (- arg1)) + (debug-menu-context-select-next-or-prev-item arg0 -1) + ) + ) + ) + ) + (label cfg-25) + arg0 + ) + +;; definition for function debug-menu-context-open-submenu +(defun debug-menu-context-open-submenu ((arg0 debug-menu-context) (arg1 debug-menu)) + (let ((v1-0 (-> arg0 sel-length))) + (when (>= v1-0 8) + (format 0 "ERROR: Trying to exceed maximum menu depth!") + (return arg1) + ) + (when (null? (-> arg1 items)) + (format 0 "ERROR: Submenu has no items!") + (return arg1) + ) + (set! (-> arg0 sel-menu v1-0) arg1) + (if (not (-> arg1 selected-item)) + (set! (-> arg1 selected-item) (the-as debug-menu-item (-> arg1 items car))) + ) + (set! (-> arg0 sel-length) (+ v1-0 1)) + ) + (debug-menu-context-send-msg arg0 (debug-menu-msg activate) (debug-menu-dest current-selection)) + ) + +;; definition for function debug-menu-context-close-submenu +(defun debug-menu-context-close-submenu ((arg0 debug-menu-context)) + (debug-menu-context-send-msg arg0 (debug-menu-msg deactivate) (debug-menu-dest current-selection)) + (if (< 1 (-> arg0 sel-length)) + (+! (-> arg0 sel-length) -1) + ) + arg0 + ) + +;; definition for function debug-menu-item-submenu-msg +(defun debug-menu-item-submenu-msg ((arg0 debug-menu-item-submenu) (arg1 debug-menu-msg)) + (when (= arg1 (debug-menu-msg press)) + (let ((a0-1 (-> arg0 parent context))) + (debug-menu-context-open-submenu a0-1 (-> arg0 submenu)) + ) + ) + arg0 + ) + +;; definition for function debug-menu-item-function-msg +(defun debug-menu-item-function-msg ((arg0 debug-menu-item-function) (arg1 debug-menu-msg)) + (cond + ((= arg1 (debug-menu-msg press)) + (cond + ((-> arg0 activate-func) + (if ((-> arg0 activate-func) (-> arg0 id)) + (set! (-> arg0 hilite-timer) 6) + (set! (-> arg0 hilite-timer) -6) + ) + ) + (else + (set! (-> arg0 hilite-timer) -6) + ) + ) + ) + ((= arg1 (debug-menu-msg deactivate)) + (set! (-> arg0 hilite-timer) 0) + 0 + ) + ) + arg0 + ) + +;; definition for function debug-menu-item-flag-msg +(defun debug-menu-item-flag-msg ((arg0 debug-menu-item-flag) (arg1 debug-menu-msg)) + (cond + ((= arg1 (debug-menu-msg press)) + (if (-> arg0 activate-func) + (set! (-> arg0 is-on) (the-as symbol ((-> arg0 activate-func) (-> arg0 id) (debug-menu-msg press)))) + ) + (let ((a0-2 (-> arg0 parent context))) + (debug-menu-context-send-msg a0-2 (debug-menu-msg update) (debug-menu-dest open-menus)) + ) + ) + ((or (= arg1 (debug-menu-msg update)) (= arg1 (debug-menu-msg activate))) + (if (-> arg0 activate-func) + (set! (-> arg0 is-on) (the-as symbol ((-> arg0 activate-func) (-> arg0 id) (debug-menu-msg update)))) + ) + (set! (-> arg0 refresh-ctr) (-> arg0 refresh-delay)) + ) + ) + arg0 + ) + +;; definition for function debug-menu-item-var-joypad-handler +(defun debug-menu-item-var-joypad-handler ((arg0 debug-menu-item-var) (arg1 int)) + (cond + ((not (cpad-hold? arg1 x)) + (let ((a0-2 (-> arg0 parent context))) + (debug-menu-context-release-joypad a0-2) + ) + (set! (-> arg0 grabbed-joypad-p) #f) + (when (cpad-pressed? arg1 square) + (cond + ((-> arg0 float-p) + (if (-> arg0 factivate-func) + (set! (-> arg0 fval) + ((-> arg0 factivate-func) (-> arg0 id) (debug-menu-msg press) (-> arg0 fundo-val) (-> arg0 fval)) + ) + ) + ) + (else + (if (-> arg0 factivate-func) + (set! (-> arg0 fval) + ((-> arg0 factivate-func) (-> arg0 id) (debug-menu-msg press) (-> arg0 fundo-val) (-> arg0 fval)) + ) + ) + ) + ) + (debug-menu-item-var-update-display-str arg0) + ) + (let ((a0-7 (-> arg0 parent context))) + (debug-menu-context-send-msg a0-7 (debug-menu-msg update) (debug-menu-dest open-menus)) + ) + ) + ((or (cpad-hold? arg1 right) (cpad-hold? arg1 left) (cpad-hold? arg1 down) (cpad-hold? arg1 up)) + (let ((v1-45 (cond + ((cpad-hold? arg1 right) + 10 + ) + ((cpad-hold? arg1 up) + 1 + ) + ((cpad-hold? arg1 down) + -1 + ) + (else + -10 + ) + ) + ) + ) + (when (!= v1-45 (-> arg0 inc-dir)) + (set! (-> arg0 inc-dir) v1-45) + (set! (-> arg0 inc-delay) 15) + (set! (-> arg0 inc-delay-ctr) 0) + (set! (-> arg0 step-delay-ctr) 30) + (set! (-> arg0 fstep) (-> arg0 fstart-inc)) + (set! (-> arg0 fstep) (-> arg0 fstart-inc)) + ) + ) + (cond + ((<= (-> arg0 inc-delay-ctr) 0) + (if (> (-> arg0 inc-delay) 0) + (+! (-> arg0 inc-delay) -1) + ) + (when (zero? (-> arg0 inc-delay)) + (cond + ((<= (-> arg0 step-delay-ctr) 0) + (set! (-> arg0 step-delay-ctr) 30) + (cond + ((-> arg0 float-p) + (if (< (-> arg0 fstep) 10000000.0) + (set! (-> arg0 fstep) (* 2.0 (-> arg0 fstep))) + ) + ) + (else + (if (< (the-as int (-> arg0 fstep)) #x989680) + (set! (-> arg0 fstep) (the-as float (* (-> arg0 fstep) 2))) + ) + ) + ) + ) + (else + (+! (-> arg0 step-delay-ctr) -1) + ) + ) + ) + (set! (-> arg0 inc-delay-ctr) (-> arg0 inc-delay)) + (cond + ((-> arg0 float-p) + (when (-> arg0 factivate-func) + (let ((f0-8 (+ (-> arg0 fval) (* (the float (-> arg0 inc-dir)) (-> arg0 fstep))))) + (if (-> arg0 range-p) + (set! f0-8 (fmin (fmax f0-8 (-> arg0 frange-min)) (-> arg0 frange-max))) + ) + (set! (-> arg0 fval) ((-> arg0 factivate-func) (-> arg0 id) (debug-menu-msg press) f0-8 (-> arg0 fval))) + ) + ) + ) + (else + (when (-> arg0 factivate-func) + (let ((a2-4 (+ (the-as int (-> arg0 fval)) (* (-> arg0 inc-dir) (the-as int (-> arg0 fstep)))))) + (if (-> arg0 range-p) + (set! a2-4 (min (max a2-4 (the-as int (-> arg0 frange-min))) (the-as int (-> arg0 frange-max)))) + ) + (set! (-> arg0 fval) + ((-> arg0 factivate-func) (-> arg0 id) (debug-menu-msg press) (the-as float a2-4) (-> arg0 fval)) + ) + ) + ) + ) + ) + (debug-menu-item-var-update-display-str arg0) + (let ((a0-29 (-> arg0 parent context))) + (debug-menu-context-send-msg a0-29 (debug-menu-msg update) (debug-menu-dest current-selection)) + ) + ) + (else + (+! (-> arg0 inc-delay-ctr) -1) + ) + ) + ) + (else + (set! (-> arg0 inc-dir) 0) + 0 + ) + ) + arg0 + ) + +;; definition for function debug-menu-item-var-msg +(defun debug-menu-item-var-msg ((arg0 debug-menu-item-var) (arg1 debug-menu-msg)) + (cond + ((= arg1 (debug-menu-msg deactivate)) + (when (-> arg0 grabbed-joypad-p) + (let ((a0-1 (-> arg0 parent context))) + (debug-menu-context-release-joypad a0-1) + ) + (set! (-> arg0 grabbed-joypad-p) #f) + ) + ) + ((= arg1 (debug-menu-msg press)) + (when (not (-> arg0 grabbed-joypad-p)) + (let ((a0-2 (-> arg0 parent context))) + (when (debug-menu-context-grab-joypad + a0-2 + arg0 + (the-as (function basic int none) debug-menu-item-var-joypad-handler) + ) + (set! (-> arg0 grabbed-joypad-p) #t) + (set! (-> arg0 fundo-val) (-> arg0 fval)) + (set! (-> arg0 fundo-val) (-> arg0 fval)) + (set! (-> arg0 inc-dir) 0) + 0 + ) + ) + ) + ) + ((or (= arg1 (debug-menu-msg update)) (= arg1 (debug-menu-msg activate))) + (cond + ((-> arg0 float-p) + (if (-> arg0 factivate-func) + (set! (-> arg0 fval) + ((-> arg0 factivate-func) (-> arg0 id) (debug-menu-msg update) (-> arg0 fval) (-> arg0 fval)) + ) + ) + ) + (else + (if (-> arg0 factivate-func) + (set! (-> arg0 fval) + ((-> arg0 factivate-func) (-> arg0 id) (debug-menu-msg update) (-> arg0 fval) (-> arg0 fval)) + ) + ) + ) + ) + (debug-menu-item-var-update-display-str arg0) + (set! (-> arg0 refresh-ctr) (-> arg0 refresh-delay)) + ) + ) + arg0 + ) + +;; definition for function debug-menu-item-send-msg +(defun debug-menu-item-send-msg ((arg0 debug-menu-item) (arg1 debug-menu-msg)) + (cond + ((= (-> arg0 type) debug-menu-item-submenu) + (debug-menu-item-submenu-msg (the-as debug-menu-item-submenu arg0) arg1) + ) + ((= (-> arg0 type) debug-menu-item-function) + (debug-menu-item-function-msg (the-as debug-menu-item-function arg0) arg1) + ) + ((= (-> arg0 type) debug-menu-item-flag) + (debug-menu-item-flag-msg (the-as debug-menu-item-flag arg0) arg1) + ) + ((= (-> arg0 type) debug-menu-item-var) + (debug-menu-item-var-msg (the-as debug-menu-item-var arg0) arg1) + ) + (else + (format 0 "ERROR: Found unknown item type!~%") + ) + ) + arg0 + ) + +;; definition for function debug-menu-send-msg +(defun debug-menu-send-msg ((arg0 debug-menu) (arg1 debug-menu-msg) (arg2 symbol)) + (let* ((s3-0 (-> arg0 items)) + (s2-0 (car s3-0)) + ) + (while (not (null? s3-0)) + (debug-menu-item-send-msg (the-as debug-menu-item s2-0) arg1) + (if (and arg2 (= (-> (the-as debug-menu-item s2-0) type) debug-menu-item-submenu)) + (debug-menu-send-msg (-> (the-as debug-menu-item-submenu s2-0) submenu) arg1 #t) + ) + (set! s3-0 (cdr s3-0)) + (set! s2-0 (car s3-0)) + ) + ) + arg0 + ) + +;; definition for function debug-menu-context-send-msg +(defun debug-menu-context-send-msg ((arg0 debug-menu-context) (arg1 debug-menu-msg) (arg2 debug-menu-dest)) + (cond + ((= arg2 (debug-menu-dest root)) + (debug-menu-send-msg (-> arg0 root-menu) arg1 #t) + ) + ((= arg2 (debug-menu-dest open-menus)) + (when (-> arg0 is-active) + (dotimes (s4-0 (-> arg0 sel-length)) + (let ((a0-2 (-> arg0 sel-menu s4-0))) + (debug-menu-send-msg a0-2 arg1 #f) + ) + ) + ) + ) + ((= arg2 (debug-menu-dest current-selection)) + (when (-> arg0 is-active) + (if (nonzero? (-> arg0 sel-length)) + (debug-menu-send-msg (-> arg0 sel-menu (+ (-> arg0 sel-length) -1)) arg1 #f) + ) + ) + ) + ((= arg2 (debug-menu-dest activation)) + (cond + ((= arg1 (debug-menu-msg activate)) + (when (not (-> arg0 is-active)) + (set! (-> arg0 is-active) #t) + (debug-menu-context-send-msg arg0 (debug-menu-msg activate) (debug-menu-dest open-menus)) + ) + ) + ((= arg1 (debug-menu-msg deactivate)) + (when (-> arg0 is-active) + (debug-menu-context-send-msg arg0 (debug-menu-msg deactivate) (debug-menu-dest open-menus)) + (set! (-> arg0 is-active) #f) + ) + ) + ) + ) + ) + arg0 + ) + +;; definition for function debug-menu-context-activate-selection +(defun debug-menu-context-activate-selection ((arg0 debug-menu-context)) + (let ((a0-1 (-> arg0 sel-menu (+ (-> arg0 sel-length) -1) selected-item))) + (debug-menu-item-send-msg a0-1 (debug-menu-msg press)) + ) + arg0 + ) + +;; definition for function debug-menus-default-joypad-func +(defun debug-menus-default-joypad-func ((arg0 debug-menu-context)) + (cond + ((cpad-pressed? (-> arg0 joypad-number) square) + (cond + ((< 1 (-> arg0 sel-length)) + (debug-menu-context-close-submenu arg0) + ) + (else + ) + ) + ) + ((cpad-pressed? (-> arg0 joypad-number) x) + (debug-menu-context-activate-selection arg0) + ) + ((cpad-pressed? (-> arg0 joypad-number) up) + (debug-menu-context-select-new-item arg0 -1) + ) + ((cpad-pressed? (-> arg0 joypad-number) down) + (debug-menu-context-select-new-item arg0 1) + ) + ((cpad-pressed? (-> arg0 joypad-number) left) + (debug-menu-context-select-new-item arg0 -5) + ) + ((cpad-pressed? (-> arg0 joypad-number) right) + (debug-menu-context-select-new-item arg0 5) + ) + ) + arg0 + ) + +;; definition for function debug-menus-active +(defun debug-menus-active ((arg0 debug-menu-context)) + (when (not (-> arg0 is-hidden)) + (if (-> arg0 joypad-func) + ((-> arg0 joypad-func) (-> arg0 joypad-item) (-> arg0 joypad-number)) + (debug-menus-default-joypad-func arg0) + ) + (debug-menu-context-render arg0) + ) + arg0 + ) + +;; definition for function debug-menus-handler +(defun debug-menus-handler ((arg0 debug-menu-context)) + (if (-> arg0 is-active) + (debug-menus-active arg0) + ) + arg0 + ) + +;; failed to figure out what this is: +0 diff --git a/test/decompiler/reference/jak3/engine/dma/dma-buffer_REF.gc b/test/decompiler/reference/jak3/engine/dma/dma-buffer_REF.gc index 452b8e45a5..d8bbb3c33b 100644 --- a/test/decompiler/reference/jak3/engine/dma/dma-buffer_REF.gc +++ b/test/decompiler/reference/jak3/engine/dma/dma-buffer_REF.gc @@ -103,7 +103,8 @@ (base pointer) (end pointer) (real-buffer-end int32) - (data uint64 1 :offset 32) + (data-buffer uint8 :dynamic :overlay-at real-buffer-end) + (data uint64 1 :offset 32) ) (:methods (new (symbol type int) _type_) @@ -235,7 +236,3 @@ (dma-send-chain chan (the-as uint (-> buf data))) (none) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/draw/draw-node_REF.gc b/test/decompiler/reference/jak3/engine/draw/draw-node_REF.gc new file mode 100644 index 0000000000..037a5a37cc --- /dev/null +++ b/test/decompiler/reference/jak3/engine/draw/draw-node_REF.gc @@ -0,0 +1,64 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 16 of type draw-node +;; WARN: Return type mismatch int vs none. +(defmethod collect-regions ((this draw-node) (arg0 sphere) (arg1 int) (arg2 region-prim-list)) + "Fill the region-prim-list with regions that intersect the sphere." + (dotimes (s2-0 arg1) + (if (spheres-overlap? arg0 (the-as sphere (-> this bsphere))) + (collect-regions (-> this child) arg0 (the-as int (-> this child-count)) arg2) + ) + (&+! this 32) + ) + 0 + (none) + ) + +;; definition for method 3 of type drawable-inline-array-node +(defmethod inspect ((this drawable-inline-array-node)) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~Tlength: ~D~%" (-> this length)) + (format #t "~Tdata[~D]: @ #x~X~%" (-> this length) (-> this data)) + (dotimes (s5-0 (-> this length)) + (format #t "~T [~D] ~A~%" s5-0 (-> this data s5-0)) + ) + this + ) + +;; definition for method 8 of type drawable-inline-array-node +(defmethod mem-usage ((this drawable-inline-array-node) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 65 (-> usage length))) + (set! (-> usage data 64 name) "draw-node") + (+! (-> usage data 64 count) (-> this length)) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 64 used) v1-6) + (+! (-> usage data 64 total) (logand -16 (+ v1-6 15))) + ) + this + ) + +;; definition for method 5 of type drawable-inline-array-node +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this drawable-inline-array-node)) + (the-as int (+ (-> drawable-inline-array-node size) (* (+ (-> this length) -1) 32))) + ) + +;; definition for method 16 of type drawable-inline-array-node +;; WARN: Return type mismatch int vs none. +(defmethod collect-regions ((this drawable-inline-array-node) (arg0 sphere) (arg1 int) (arg2 region-prim-list)) + "Fill the region-prim-list with regions that intersect the sphere." + (collect-regions (the-as draw-node (-> this data)) arg0 (-> this length) arg2) + 0 + (none) + ) + +;; definition for function draw-node-cull +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/draw/drawable-group_REF.gc b/test/decompiler/reference/jak3/engine/draw/drawable-group_REF.gc new file mode 100644 index 0000000000..b7ca6a4425 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/draw/drawable-group_REF.gc @@ -0,0 +1,115 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 0 of type drawable-group +(defmethod new drawable-group ((allocation symbol) (type-to-make type) (arg0 int)) + (let ((v0-0 (object-new allocation type-to-make (the-as int (+ (-> type-to-make size) (* arg0 4)))))) + (set! (-> v0-0 length) arg0) + v0-0 + ) + ) + +;; definition for method 2 of type drawable-group +(defmethod print ((this drawable-group)) + (format #t "#<~A @ #x~X [~D]" (-> this type) this (-> this length)) + (dotimes (s5-0 (-> this length)) + (format #t " ~A" (-> this data s5-0)) + ) + (format #t ">") + this + ) + +;; definition for method 4 of type drawable-group +(defmethod length ((this drawable-group)) + (-> this length) + ) + +;; definition for method 5 of type drawable-group +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this drawable-group)) + (the-as int (+ (-> drawable-group size) (* (-> this length) 4))) + ) + +;; definition for method 8 of type drawable-group +(defmethod mem-usage ((this drawable-group) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 0 used) v1-6) + (+! (-> usage data 0 total) (logand -16 (+ v1-6 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this data s3-0) usage flags) + ) + this + ) + +;; definition for method 9 of type drawable-group +(defmethod login ((this drawable-group)) + "Initialize the object after it is loaded." + (dotimes (s5-0 (-> this length)) + (login (-> this data s5-0)) + ) + this + ) + +;; definition for method 10 of type drawable-group +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this drawable-group)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + (when (vis-cull (-> this id)) + (when (sphere-cull (-> this bsphere)) + (dotimes (s5-0 (-> this length)) + (draw (-> this data s5-0)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 13 of type drawable-group +;; WARN: Return type mismatch int vs none. +(defmethod collect-stats ((this drawable-group)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + (when (vis-cull (-> this id)) + (when (sphere-cull (-> this bsphere)) + (dotimes (s5-0 (-> this length)) + (collect-stats (-> this data s5-0)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 14 of type drawable-group +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this drawable-group)) + "Debug-draw a drawable and its children. Typically uses the debug-draw functions." + (when (vis-cull (-> this id)) + (when (sphere-cull (-> this bsphere)) + (dotimes (s5-0 (-> this length)) + (debug-draw (-> this data s5-0)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 15 of type drawable-group +(defmethod unpack-vis ((this drawable-group) (arg0 (pointer int8)) (arg1 (pointer int8))) + (dotimes (s4-0 (-> this length)) + (set! arg1 (unpack-vis (-> this data s4-0) arg0 arg1)) + ) + arg1 + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/draw/drawable-h_REF.gc b/test/decompiler/reference/jak3/engine/draw/drawable-h_REF.gc index 62c41ce8ab..84d663d5d1 100644 --- a/test/decompiler/reference/jak3/engine/draw/drawable-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/draw/drawable-h_REF.gc @@ -15,8 +15,8 @@ control over memory layout for use with DMA." (:methods (login (_type_) _type_) (draw (_type_) none) - (drawable-method-11 () none) - (drawable-method-12 () none) + (drawable-method-11 (_type_) none) + (drawable-method-12 (_type_) none) (collect-stats (_type_) none) (debug-draw (_type_) none) (unpack-vis (_type_ (pointer int8) (pointer int8)) (pointer int8)) diff --git a/test/decompiler/reference/jak3/engine/draw/drawable-inline-array_REF.gc b/test/decompiler/reference/jak3/engine/draw/drawable-inline-array_REF.gc new file mode 100644 index 0000000000..def4db5bc4 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/draw/drawable-inline-array_REF.gc @@ -0,0 +1,44 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 4 of type drawable-inline-array +(defmethod length ((this drawable-inline-array)) + (-> this length) + ) + +;; definition for method 9 of type drawable-inline-array +(defmethod login ((this drawable-inline-array)) + "Initialize the object after it is loaded." + this + ) + +;; definition for method 10 of type drawable-inline-array +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this drawable-inline-array)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + 0 + (none) + ) + +;; definition for method 13 of type drawable-inline-array +;; WARN: Return type mismatch int vs none. +(defmethod collect-stats ((this drawable-inline-array)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + 0 + (none) + ) + +;; definition for method 14 of type drawable-inline-array +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this drawable-inline-array)) + "Debug-draw a drawable and its children. Typically uses the debug-draw functions." + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/draw/drawable-tree-h_REF.gc b/test/decompiler/reference/jak3/engine/draw/drawable-tree-h_REF.gc index e52fa79674..2ae12e1084 100644 --- a/test/decompiler/reference/jak3/engine/draw/drawable-tree-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/draw/drawable-tree-h_REF.gc @@ -13,12 +13,9 @@ Generally, the object passed to a large renderer is a drawable-tree." ;; definition of type drawable-tree-array (deftype drawable-tree-array (drawable-group) "Collection of drawable trees. This might have a tfrag tree, tie tree, etc." - () + ((trees drawable-tree :dynamic :offset 32) + ) ) ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/engine/draw/drawable-tree_REF.gc b/test/decompiler/reference/jak3/engine/draw/drawable-tree_REF.gc new file mode 100644 index 0000000000..9f5533a3b2 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/draw/drawable-tree_REF.gc @@ -0,0 +1,97 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 10 of type drawable-tree-array +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this drawable-tree-array)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + (case (-> *level* draw-level *draw-index* display?) + (('special #f) + ) + (else + (dotimes (s5-0 (-> this length)) + (draw (-> this trees s5-0)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 13 of type drawable-tree-array +;; WARN: Return type mismatch int vs none. +(defmethod collect-stats ((this drawable-tree-array)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + (dotimes (s5-0 (-> this length)) + (collect-stats (-> this trees s5-0)) + ) + 0 + (none) + ) + +;; definition for method 14 of type drawable-tree-array +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this drawable-tree-array)) + "Debug-draw a drawable and its children. Typically uses the debug-draw functions." + (dotimes (s5-0 (-> this length)) + (debug-draw (-> this trees s5-0)) + ) + 0 + (none) + ) + +;; definition for method 15 of type drawable-tree +(defmethod unpack-vis ((this drawable-tree) (arg0 (pointer int8)) (arg1 (pointer int8))) + (local-vars (t5-1 uint)) + (let* ((v1-0 (the-as drawable-inline-array-node (-> this data 0))) + (a3-1 (/ (-> v1-0 data 0 id) 8)) + (t0-0 (-> v1-0 length)) + (v1-1 (&+ arg0 a3-1)) + (a3-3 (/ (+ t0-0 7) 8)) + ) + (dotimes (t0-1 a3-3) + (let ((t1-0 (-> arg1 0))) + (set! arg1 (&-> arg1 1)) + (set! (-> v1-1 0) t1-0) + ) + (set! v1-1 (&-> v1-1 1)) + ) + ) + (let ((v1-5 (+ (-> this length) -1))) + (when (nonzero? v1-5) + (dotimes (a3-5 v1-5) + (let* ((t0-4 (-> this data a3-5)) + (t2-0 (the-as drawable-inline-array-node (-> this data (+ a3-5 1)))) + (t1-5 (/ (-> (the-as drawable-inline-array-node t0-4) data 0 id) 8)) + (t2-2 (/ (-> t2-0 data 0 id) 8)) + (t0-5 (-> (the-as drawable-inline-array-node t0-4) length)) + (t1-6 (&+ arg0 t1-5)) + (t2-3 (the-as object (&+ arg0 t2-2))) + ) + (loop + (let ((t3-0 (-> t1-6 0))) + (set! t1-6 (&-> t1-6 1)) + (let ((t4-0 128)) + (label cfg-7) + (b! (not (logtest? t3-0 t4-0)) cfg-9 :delay (set! t5-1 (the-as uint (-> arg1 0)))) + (set! arg1 (&-> arg1 1)) + (set! (-> (the-as (pointer int8) t2-3) 0) (the-as int t5-1)) + (label cfg-9) + (+! t0-5 -1) + (b! (zero? t0-5) cfg-12 :delay (shift-arith-right-32 t4-0 t4-0 1)) + (b! (nonzero? (the-as uint t4-0)) cfg-7 :delay (set! t2-3 (&-> (the-as (pointer int8) t2-3) 1))) + ) + ) + ) + ) + (label cfg-12) + (nop!) + 0 + ) + ) + ) + arg1 + ) diff --git a/test/decompiler/reference/jak3/engine/draw/drawable_REF.gc b/test/decompiler/reference/jak3/engine/draw/drawable_REF.gc new file mode 100644 index 0000000000..21ed27d8a3 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/draw/drawable_REF.gc @@ -0,0 +1,2605 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function sphere-cull +;; ERROR: Bad vector register dependency: vf16 +;; ERROR: Bad vector register dependency: vf17 +;; ERROR: Bad vector register dependency: vf18 +;; ERROR: Bad vector register dependency: vf19 +(defun sphere-cull ((arg0 vector)) + "Is this sphere visible? Uses cached camera matrix registers, so use with care." + (local-vars (v1-0 uint128) (v1-1 uint128) (v1-2 uint128)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf10 :class vf) + (vf16 :class vf) + (vf17 :class vf) + (vf18 :class vf) + (vf19 :class vf) + (vf9 :class vf) + ) + (init-vf0-vector) + (.lvf vf10 (&-> arg0 quad)) + (.mul.x.vf acc vf16 vf10) + (.add.mul.y.vf acc vf17 vf10 acc) + (.add.mul.z.vf acc vf18 vf10 acc) + (.sub.mul.w.vf vf9 vf19 vf0 acc) + (.add.w.vf vf9 vf9 vf10) + (.mov v1-0 vf9) + (.pcgtw v1-1 0 v1-0) + (.ppach v1-2 (the-as uint128 0) v1-1) + (zero? (the-as int v1-2)) + ) + ) + +;; definition for function guard-band-cull +;; ERROR: Bad vector register dependency: vf20 +;; ERROR: Bad vector register dependency: vf21 +;; ERROR: Bad vector register dependency: vf22 +;; ERROR: Bad vector register dependency: vf23 +(defun guard-band-cull ((arg0 vector)) + "Is this sphere within the guard band, and maybe needs clipping? Uses cached camera matrix registers, so use with care." + (local-vars (v1-0 uint128) (v1-1 uint128) (v1-2 uint128)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf10 :class vf) + (vf20 :class vf) + (vf21 :class vf) + (vf22 :class vf) + (vf23 :class vf) + (vf9 :class vf) + ) + (init-vf0-vector) + (.lvf vf10 (&-> arg0 quad)) + (.mul.x.vf acc vf20 vf10) + (.add.mul.y.vf acc vf21 vf10 acc) + (.add.mul.z.vf acc vf22 vf10 acc) + (.sub.mul.w.vf vf9 vf23 vf0 acc) + (.sub.w.vf vf9 vf9 vf10) + (.mov v1-0 vf9) + (.pcgtw v1-1 0 v1-0) + (.ppach v1-2 (the-as uint128 0) v1-1) + (nonzero? (the-as int v1-2)) + ) + ) + +;; definition for function sphere-in-view-frustum? +(defun sphere-in-view-frustum? ((arg0 sphere)) + "Check if sphere is in view frustum. Uses math-camera, so doesn't need register setup." + (local-vars (v1-1 uint128) (v1-2 uint128) (v1-3 uint128)) + (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) + (let ((v1-0 *math-camera*)) + (.lvf vf6 (&-> arg0 quad)) + (.lvf vf1 (&-> v1-0 plane 0 quad)) + (.lvf vf2 (&-> v1-0 plane 1 quad)) + (.lvf vf3 (&-> v1-0 plane 2 quad)) + (.lvf vf4 (&-> v1-0 plane 3 quad)) + ) + (.mul.x.vf acc vf1 vf6) + (.add.mul.y.vf acc vf2 vf6 acc) + (.add.mul.z.vf acc vf3 vf6 acc) + (.sub.mul.w.vf vf5 vf4 vf0 acc) + (.add.w.vf vf5 vf5 vf6) + (.mov v1-1 vf5) + (.pcgtw v1-2 0 v1-1) + (.ppach v1-3 (the-as uint128 0) v1-2) + (zero? (the-as int v1-3)) + ) + ) + +;; definition for function line-in-view-frustum? +(defun line-in-view-frustum? ((arg0 vector) (arg1 vector)) + "Check if line is in view frustum. Uses math-camera, so doesn't need register setup." + (local-vars (v1-1 uint128) (v1-2 uint128) (v1-3 uint128) (a0-1 uint128) (a0-2 uint128) (a0-3 uint128)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf10 :class vf) + (vf16 :class vf) + (vf17 :class vf) + (vf18 :class vf) + (vf19 :class vf) + (vf9 :class vf) + ) + (init-vf0-vector) + (let ((v1-0 *math-camera*)) + (.lvf vf9 (&-> arg0 quad)) + (.lvf vf10 (&-> arg1 quad)) + (.lvf vf16 (&-> v1-0 plane 0 quad)) + (.lvf vf17 (&-> v1-0 plane 1 quad)) + (.lvf vf18 (&-> v1-0 plane 2 quad)) + (.lvf vf19 (&-> v1-0 plane 3 quad)) + ) + (.mul.x.vf acc vf16 vf9) + (.add.mul.y.vf acc vf17 vf9 acc) + (.add.mul.z.vf acc vf18 vf9 acc) + (.sub.mul.w.vf vf9 vf19 vf0 acc) + (.mul.x.vf acc vf16 vf10) + (.add.mul.y.vf acc vf17 vf10 acc) + (.add.mul.z.vf acc vf18 vf10 acc) + (.sub.mul.w.vf vf10 vf19 vf0 acc) + (.mov v1-1 vf9) + (.pcgtw v1-2 0 v1-1) + (.ppach v1-3 (the-as uint128 0) v1-2) + (.mov a0-1 vf10) + (.pcgtw a0-2 0 a0-1) + (.ppach a0-3 (the-as uint128 0) a0-2) + (not (logtest? (the-as int v1-3) (the-as int a0-3))) + ) + ) + +;; definition for function vis-cull +;; ERROR: failed type prop at 3: Could not figure out load: (set! v1 (l.b (+ v1 #x3800))) +;; WARN: Return type mismatch none vs symbol. +;; ERROR: Unsupported inline assembly instruction kind - [addiu a0, a0, 56] +(defun vis-cull ((a0-0 int)) + "Check if object is visible by ID with precomputed visibility. Requres scratchpad to have vis-bits loaded." + (local-vars (v0-0 none) (v1-0 int) (v1-1 int) (v1-2 none) (v1-3 none) (a0-1 none) (a0-2 none) (a1-0 int)) + (set! v1-0 #x70000000) + (shift-arith-right-32 a1-0 a0-0 3) + (set! v1-1 (+ a1-0 v1-0)) + (set! v1-2 (the-as none (l.b (+ v1-1 #x3800)))) + (set! a0-1 (the-as none (logand a0-0 7))) + (.addiu a0-2 a0-1 56) + (set! v1-3 (the-as none (sll v1-2 a0-2))) + (set! v0-0 (the-as none (<0.si v1-3))) + (ret-value v0-0) + ) + +;; definition (debug) for function vis-cull-debug +;; ERROR: Failed load: (set! v1-2 (l.b (+ v1-1 #x3800))) at op 2 +;; ERROR: Unsupported inline assembly instruction kind - [addiu a0, a0, 56] +(defun-debug vis-cull-debug ((arg0 work-area) (arg1 int)) + (local-vars (v1-0 int) (a0-2 int)) + (shift-arith-right-32 v1-0 arg1 3) + (let ((v1-2 (l.b (+ v1-0 (the-as int arg0) #x3800)))) + (let ((a0-1 (logand arg1 7))) + (.addiu a0-2 a0-1 56) + ) + (< (shl v1-2 a0-2) 0) + ) + ) + +;; definition for function error-sphere +;; WARN: Return type mismatch int vs none. +(defun error-sphere ((arg0 drawable-error) (arg1 string)) + "Draw an error sphere and text for a drawable-error." + (when *artist-error-spheres* + (when (vis-cull (-> arg0 id)) + (when (sphere-cull (-> arg0 bsphere)) + (add-debug-sphere + #t + (bucket-id debug) + (-> arg0 bsphere) + (-> arg0 bsphere w) + (new 'static 'rgba :r #x80 :a #x80) + ) + (add-debug-text-3d + #t + (bucket-id debug-no-zbuf1) + arg1 + (-> arg0 bsphere) + (font-color white) + (the-as vector2h #f) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 9 of type drawable +(defmethod login ((this drawable)) + "Initialize the object after it is loaded." + this + ) + +;; definition for method 10 of type drawable +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this drawable)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + 0 + (none) + ) + +;; definition for method 11 of type drawable +;; WARN: Return type mismatch int vs none. +(defmethod drawable-method-11 ((this drawable)) + 0 + (none) + ) + +;; definition for method 12 of type drawable +;; WARN: Return type mismatch int vs none. +(defmethod drawable-method-12 ((this drawable)) + 0 + (none) + ) + +;; definition for method 16 of type drawable +;; WARN: Return type mismatch int vs none. +(defmethod collect-regions ((this drawable) (arg0 sphere) (arg1 int) (arg2 region-prim-list)) + "Fill the region-prim-list with regions that intersect the sphere." + 0 + (none) + ) + +;; definition for method 13 of type drawable +;; WARN: Return type mismatch int vs none. +(defmethod collect-stats ((this drawable)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + 0 + (none) + ) + +;; definition for method 14 of type drawable +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this drawable)) + "Debug-draw a drawable and its children. Typically uses the debug-draw functions." + 0 + (none) + ) + +;; definition for method 10 of type drawable-error +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this drawable-error)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + (error-sphere this (-> this name)) + 0 + (none) + ) + +;; definition for method 15 of type drawable +(defmethod unpack-vis ((this drawable) (arg0 (pointer int8)) (arg1 (pointer int8))) + arg1 + ) + +;; definition for symbol *edit-instance*, type string +(define *edit-instance* (the-as string #f)) + +;; this part is debug only +(when *debug-segment* +;; definition for symbol *instance-mem-usage*, type memory-usage-block +(define *instance-mem-usage* (new 'debug 'memory-usage-block)) + +) +;; definition for function find-instance-by-name-level +(defun find-instance-by-name-level ((arg0 string) (arg1 level)) + "Find shrub or tie prototype by name in a level. + Yes it says instance. No it does not return an instance." + (let ((s5-0 (-> arg1 bsp drawable-trees))) + (dotimes (s4-0 (-> s5-0 length)) + (let ((v1-3 (-> s5-0 trees s4-0))) + (case (-> v1-3 type) + ((drawable-tree-instance-shrub) + (let ((s3-0 (-> (the-as drawable-tree-instance-shrub v1-3) info prototype-inline-array-shrub))) + (dotimes (s2-0 (-> s3-0 length)) + (if (string= arg0 (-> s3-0 data s2-0 name)) + (return (-> s3-0 data s2-0)) + ) + ) + ) + ) + ((drawable-tree-instance-tie) + (let ((s3-1 (-> (the-as drawable-tree-instance-tie v1-3) prototypes prototype-array-tie))) + (dotimes (s2-1 (-> s3-1 length)) + (if (string= arg0 (-> s3-1 array-data s2-1 name)) + (return (-> s3-1 array-data s2-1)) + ) + ) + ) + ) + ) + ) + ) + ) + (the-as prototype-bucket #f) + ) + +;; definition for function find-instance-by-name +(defun find-instance-by-name ((arg0 string)) + "Find shrub or tie prototype by name in any level. + Yes it says instance. No it does not return an instance." + (dotimes (s5-0 (-> *level* length)) + (let ((a1-0 (-> *level* level s5-0))) + (when (= (-> a1-0 status) 'active) + (let ((a0-4 (find-instance-by-name-level arg0 a1-0))) + (if a0-4 + (return a0-4) + ) + ) + ) + ) + ) + (the-as prototype-bucket #f) + ) + +;; definition for function prototypes-game-visible-set! +(defun prototypes-game-visible-set! ((arg0 pair) (arg1 symbol) (arg2 level)) + "Disable collision/visibilty of tie/shrub based on a list of prototype names. + Only looks in the given level." + (let ((a0-1 (car arg0))) + (while (not (null? arg0)) + (let ((v1-0 (find-instance-by-name-level (the-as string a0-1) arg2))) + (when v1-0 + (if arg1 + (logclear! (-> v1-0 flags) (prototype-flags visible no-collide)) + (logior! (-> v1-0 flags) (prototype-flags visible no-collide)) + ) + ) + ) + (set! arg0 (cdr arg0)) + (set! a0-1 (car arg0)) + ) + ) + 0 + ) + +;; definition (debug) for function find-instance-by-index +(defun-debug find-instance-by-index ((arg0 type) (arg1 int) (arg2 bsp-header)) + (dotimes (v1-0 (-> *level* length)) + (let ((a3-3 (-> *level* level v1-0))) + (when (= (-> a3-3 status) 'active) + (let ((a3-4 (-> a3-3 bsp))) + (when (or (not arg2) (= a3-4 arg2)) + (let ((a3-5 (-> a3-4 drawable-trees))) + (dotimes (t0-5 (-> a3-5 length)) + (let ((t1-3 (-> a3-5 trees t0-5))) + (case (-> t1-3 type) + ((drawable-tree-instance-shrub) + (when (= arg0 (-> t1-3 type)) + (let ((v1-2 (-> (the-as drawable-tree-instance-shrub t1-3) info prototype-inline-array-shrub))) + (return (-> v1-2 data arg1)) + ) + ) + ) + ((drawable-tree-instance-tie) + (when (= arg0 (-> t1-3 type)) + (let ((v1-5 (-> (the-as drawable-tree-instance-tie t1-3) prototypes prototype-array-tie))) + (return (-> v1-5 array-data arg1)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (the-as prototype-bucket #f) + ) + +;; definition (debug) for function prototype-bucket-type +(defun-debug prototype-bucket-type ((arg0 prototype-bucket)) + (case (-> arg0 geometry 1 type) + ((prototype-shrubbery shrubbery) + instance-shrubbery + ) + ((prototype-tie prototype-tie tie-fragment) + instance-tie + ) + ) + ) + +;; definition (debug) for function prototype-bucket-recalc-fields +(defun-debug prototype-bucket-recalc-fields ((arg0 prototype-bucket)) + (case (prototype-bucket-type arg0) + ((instance-shrubbery) + (set! (-> arg0 rdists x) (/ 1.0 (- (-> arg0 dists w) (-> arg0 dists x)))) + ) + (else + (set! (-> arg0 dists z) (+ (-> arg0 dists x) (* 0.33333334 (- (-> arg0 dists w) (-> arg0 dists x))))) + (set! (-> arg0 rdists x) (/ 1.0 (- (-> arg0 dists z) (-> arg0 dists x)))) + ) + ) + (set! (-> arg0 rdists z) (/ 1.0 (- (-> arg0 dists w) (-> arg0 dists z)))) + (set! (-> arg0 dists y) (* 0.5 (-> arg0 dists x))) + (set! (-> arg0 rdists y) (/ 1.0 (-> arg0 dists y))) + arg0 + ) + +;; definition (debug) for function print-prototype-list +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun-debug print-prototype-list () + (local-vars (sv-16 (function prototype-bucket-shrub memory-usage-block int prototype-bucket-shrub))) + (dotimes (gp-0 (-> *level* length)) + (let ((s5-0 (-> *level* level gp-0))) + (when (= (-> s5-0 status) 'active) + (format #t "-------- level ~S~%" (-> s5-0 name)) + (let ((s5-1 (-> s5-0 bsp drawable-trees))) + (dotimes (s4-0 (-> s5-1 length)) + (let ((v1-8 (-> s5-1 trees s4-0))) + (case (-> v1-8 type) + ((drawable-tree-instance-shrub) + (let ((s3-0 (-> (the-as drawable-tree-instance-shrub v1-8) info prototype-inline-array-shrub))) + (dotimes (s2-0 (-> s3-0 length)) + 0 + (let ((s1-0 (-> s3-0 data s2-0))) + (dotimes (s0-0 4) + (reset! *instance-mem-usage*) + (if (nonzero? (-> s1-0 geometry s0-0)) + (mem-usage (-> s1-0 geometry s0-0) *instance-mem-usage* 0) + ) + ) + (let ((s0-1 s1-0)) + (set! sv-16 (method-of-object s0-1 mem-usage)) + (let ((a1-4 (reset! *instance-mem-usage*)) + (a2-2 0) + ) + (sv-16 s0-1 a1-4 a2-2) + ) + ) + (let ((v1-29 (calculate-total *instance-mem-usage*))) + (format + #t + " ~-48S~4D shrub ~5,,2fK ~4,,2fK~%" + (-> s1-0 name) + (-> s1-0 in-level) + (* 0.0009765625 (the float v1-29)) + (* 0.0009765625 (the float (* (the-as uint 80) (-> s1-0 in-level)))) + ) + ) + ) + ) + ) + ) + ((drawable-tree-instance-tie) + (let ((s3-1 (-> (the-as drawable-tree-instance-tie v1-8) prototypes prototype-array-tie))) + (dotimes (s2-1 (-> s3-1 length)) + 0 + (let ((s1-1 (-> s3-1 array-data s2-1))) + (reset! *instance-mem-usage*) + (dotimes (s0-2 4) + (when (nonzero? (-> s1-1 tie-geom s0-2)) + (let* ((a0-13 (-> s1-1 tie-geom s0-2)) + (t9-8 (method-of-object a0-13 mem-usage)) + (a1-7 *instance-mem-usage*) + (v1-47 s0-2) + ) + (t9-8 a0-13 a1-7 (logior (cond + ((= v1-47 1) + 4 + ) + ((= v1-47 2) + 8 + ) + ((= v1-47 3) + 16 + ) + (else + 0 + ) + ) + 2 + ) + ) + ) + ) + ) + (mem-usage s1-1 *instance-mem-usage* 0) + (let ((v1-54 (calculate-total *instance-mem-usage*))) + (format + #t + " ~-48S~4D tie ~5,,2fK ~4,,2fK~%" + (-> s1-1 name) + (-> s1-1 in-level) + (* 0.0009765625 (the float v1-54)) + (* 0.0009765625 (the float (* (-> s1-1 in-level) 64))) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition (debug) for function draw-instance-info +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defun-debug draw-instance-info ((arg0 string)) + (local-vars + (sv-16 uint) + (sv-32 uint) + (sv-48 uint) + (sv-64 int) + (sv-80 int) + (sv-96 int) + (sv-112 int) + (sv-128 int) + (sv-144 int) + ) + (when (and *display-instance-info* *edit-instance*) + (let ((s5-0 (find-instance-by-name *edit-instance*))) + (when s5-0 + (dotimes (s4-0 (-> *level* length)) + (let ((v1-5 (-> *level* level s4-0))) + (when (= (-> v1-5 status) 'active) + (let ((s3-0 (-> v1-5 bsp drawable-trees))) + (dotimes (s2-0 (-> s3-0 length)) + (let ((v1-9 (-> s3-0 trees s2-0))) + (case (-> v1-9 type) + ((drawable-tree-instance-shrub) + ) + ((drawable-tree-instance-tie) + (let ((s1-0 (-> (the-as + drawable-tree-instance-tie + (+ (* (+ (-> (the-as drawable-tree-instance-tie v1-9) length) -1) 4) (the-as int v1-9)) + ) + data + 0 + ) + ) + ) + (dotimes (s0-0 (-> (the-as drawable-inline-array-instance-tie s1-0) length)) + (if (string= (-> (the-as drawable-inline-array-instance-tie s1-0) data s0-0 bucket-ptr name) *edit-instance*) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (the-as + vector + (+ (the-as uint (-> (the-as drawable-inline-array-instance-tie s1-0) data 0 bsphere)) (* s0-0 64)) + ) + (-> (the-as drawable-inline-array-instance-tie s1-0) data s0-0 bsphere w) + (new 'static 'rgba :g #xff :a #x80) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let ((s2-1 (prototype-bucket-type s5-0))) + (let ((s4-1 0)) + 0 + (cond + ((= s2-1 instance-shrubbery) + (set! s4-1 80) + ) + ((= s2-1 instance-tie) + (reset! *instance-mem-usage*) + (dotimes (s4-2 4) + (when (nonzero? (-> s5-0 geometry s4-2)) + (let* ((a0-17 (-> s5-0 geometry s4-2)) + (t9-5 (method-of-object a0-17 mem-usage)) + (a1-6 *instance-mem-usage*) + (v1-40 s4-2) + ) + (t9-5 a0-17 a1-6 (logior (cond + ((= v1-40 1) + 4 + ) + ((= v1-40 2) + 8 + ) + ((= v1-40 3) + 16 + ) + (else + 0 + ) + ) + 2 + ) + ) + ) + ) + ) + (set! s4-1 (+ (calculate-total *instance-mem-usage*) 64)) + ) + ) + (mem-usage s5-0 (reset! *instance-mem-usage*) 0) + (let ((v1-50 (calculate-total *instance-mem-usage*))) + (format + arg0 + "~%~A ~A b @ #x~X ~,,2fK/~,,2fK~%" + s2-1 + (-> s5-0 name) + s5-0 + (* 0.0009765625 (the float v1-50)) + (* 0.0009765625 (the float s4-1)) + ) + ) + ) + (format arg0 "near: ~m mid: ~m far: ~m~%" (-> s5-0 dists x) (-> s5-0 dists z) (-> s5-0 dists w)) + (let ((s3-2 0) + (s4-3 0) + ) + (cond + ((= s2-1 instance-shrubbery) + (let ((f30-0 0.0)) + (format + arg0 + "usage: vis: ~D shrub: ~D trans-shrub ~D bill: ~D in level: ~D~%" + (-> (the-as prototype-bucket-shrub s5-0) count 0) + (-> (the-as prototype-bucket-shrub s5-0) count 1) + (-> (the-as prototype-bucket-shrub s5-0) count 2) + (-> (the-as prototype-bucket-shrub s5-0) count 3) + (-> (the-as prototype-bucket-shrub s5-0) in-level) + ) + (format arg0 "~%frag# tris dverts strlen tex~%") + (let ((s1-2 (the-as prototype-shrubbery (-> (the-as prototype-bucket-shrub s5-0) geometry 1))) + (s2-2 (+ (-> (the-as prototype-bucket-shrub s5-0) count 1) (-> (the-as prototype-bucket-shrub s5-0) count 2))) + ) + (dotimes (s0-1 (-> s1-2 length)) + (set! sv-16 (shrub-num-tris (-> s1-2 data s0-1))) + (set! sv-32 (-> s1-2 data s0-1 header data 2)) + (set! sv-48 (-> s1-2 data s0-1 header data 0)) + (format + arg0 + "~5D ~4D ~5D ~6f ~D~%" + s0-1 + sv-16 + sv-32 + (/ (* 2.0 (the float sv-16)) (the float (- sv-32 sv-16))) + sv-48 + ) + (+! s3-2 sv-16) + (+! s4-3 sv-32) + (set! f30-0 + (+ 29.0 + (* 5.5 (the float (- sv-32 sv-16))) + (* 22.0 (the float sv-48)) + (* 8.0 (the float sv-32)) + (* 53.0 (the float (/ (+ s2-2 9) (the-as uint 10)))) + (* (the float s2-2) (+ 15.0 (* 5.0 (the float sv-48)) (* 13.5 (the float sv-32)))) + f30-0 + ) + ) + ) + (format + arg0 + "total ~4D ~5D ~6f ~D speed: ~f~%" + s3-2 + s4-3 + (/ (* 2.0 (the float s3-2)) (the float (- s4-3 s3-2))) + (-> s5-0 utextures) + (/ f30-0 (* (the float s2-2) (the float s3-2))) + ) + ) + ) + ) + ((= s2-1 instance-tie) + (set! sv-144 0) + (let ((s1-3 0) + (s0-2 0) + (s2-3 0) + ) + (format arg0 "~%level visible frags tris dverts strlen tex ttris~%") + (set! sv-64 1) + (set! sv-80 3) + (while (>= sv-80 sv-64) + (let ((v1-100 (-> (the-as prototype-bucket-tie s5-0) tie-geom sv-64))) + (set! sv-96 0) + (set! sv-112 0) + (set! sv-128 0) + (dotimes (a0-36 (-> v1-100 length)) + (set! sv-96 (+ sv-96 (-> v1-100 data a0-36 debug num-tris))) + (set! sv-112 (+ sv-112 (-> v1-100 data a0-36 debug num-dverts))) + (set! sv-128 (+ sv-128 (-> v1-100 data a0-36 tex-count))) + ) + (set! sv-144 (+ sv-144 (-> (the-as prototype-bucket-tie s5-0) count sv-64))) + (format + arg0 + "~5D ~7D ~5D ~5D" + sv-64 + (-> (the-as prototype-bucket-tie s5-0) count sv-64) + (-> v1-100 length) + sv-96 + ) + ) + (format + arg0 + " ~5D ~6f ~3D ~5D~%" + sv-112 + (/ (* 2.0 (the float sv-96)) (the float (- sv-112 sv-96))) + sv-128 + (* (the-as uint sv-96) (-> (the-as prototype-bucket-tie s5-0) count sv-64)) + ) + (+! s1-3 (* (the-as uint sv-96) (-> (the-as prototype-bucket-tie s5-0) count sv-64))) + (+! s0-2 (* (the-as uint sv-112) (-> (the-as prototype-bucket-tie s5-0) count sv-64))) + (+! s3-2 sv-96) + (+! s4-3 sv-112) + (+! s2-3 sv-128) + (set! sv-64 (+ sv-64 1)) + ) + (let ((t9-20 format) + (a0-52 arg0) + (a1-28 "total ~7D/~3D ~5D") + (a3-12 (-> s5-0 in-level)) + ) + (t9-20 a0-52 a1-28 sv-144 a3-12 s3-2) + ) + (format + arg0 + " ~5D ~6f ~3D ~5D~%" + s4-3 + (/ (* 2.0 (the float s1-3)) (the float (- s0-2 s1-3))) + s2-3 + s1-3 + ) + ) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition (debug) for function set-shadow-by-name +;; WARN: Return type mismatch uint vs none. +(defun-debug set-shadow-by-name ((arg0 string) (arg1 int) (arg2 int)) + "Modify the shadow values for a process." + (let ((v1-0 (process-by-name arg0 *active-pool*))) + (when v1-0 + (let ((v1-1 (-> (the-as process-drawable v1-0) draw))) + (cond + ((< arg2 16) + (logior! (-> v1-1 shadow-mask) (ash 1 arg1)) + (logclear! (-> v1-1 shadow-values) (ash 15 (* arg1 4))) + (logior! (-> v1-1 shadow-values) (ash arg2 (* arg1 4))) + ) + (else + (logclear! (-> v1-1 shadow-mask) (ash 1 arg1)) + (logclear! (-> v1-1 shadow-values) (ash 15 (* arg1 4))) + ) + ) + ) + ) + ) + (none) + ) + +;; definition (debug) for function get-shadow-by-name +;; WARN: Return type mismatch object vs none. +(defun-debug get-shadow-by-name ((arg0 string)) + "Print to stdout the mask/values for the given process shadows" + (let ((v1-0 (process-by-name arg0 *active-pool*))) + (when v1-0 + (let ((s5-0 (-> (the-as process-drawable v1-0) draw))) + (format 0 "actor ~s {~%" arg0) + (format 0 " SHADOW_MASK(0x~02x)~%" (-> s5-0 shadow-mask)) + (format 0 " SHADOW_VALUES(0x~08x)~%" (-> s5-0 shadow-values)) + ) + (format 0 "}~%") + ) + ) + (none) + ) + +;; definition (debug) for function teleport-camera-by-name +;; WARN: Return type mismatch object vs none. +(defun-debug teleport-camera-by-name ((arg0 string)) + "Move camera to entity by name" + (let* ((gp-0 (entity-by-name arg0)) + (v1-0 (if (type? gp-0 entity-actor) + gp-0 + ) + ) + ) + (if (and v1-0 *camera*) + (send-event *camera* 'teleport-to-vector-start-string (-> v1-0 trans)) + ) + ) + (none) + ) + +;; definition (debug) for function teleport-camera-by-pos +;; WARN: Return type mismatch object vs none. +(defun-debug teleport-camera-by-pos ((arg0 float) (arg1 float) (arg2 float)) + "Move camera to position" + (let ((v1-0 (new 'stack-no-clear 'vector))) + (when *camera* + (set-vector! v1-0 (* 4096.0 arg0) (* 4096.0 arg1) (* 4096.0 arg2) 1.0) + (send-event *camera* 'teleport-to-vector-start-string v1-0) + ) + ) + (none) + ) + +;; definition for function calc-vu1-shadow +;; INFO: Used lq/sq +;; WARN: Return type mismatch float vs none. +(defun calc-vu1-shadow ((arg0 light-group) (arg1 draw-control)) + "Update shadow-ctrl based on lights" + (rlet ((acc :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s5-0 (-> arg1 shadow-ctrl settings shadow-dir)) + (f30-0 (-> arg1 shadow-ctrl settings shadow-dir w)) + ) + (.lvf vf1 (&-> arg0 dir0 direction quad)) + (.lvf vf2 (&-> arg0 dir1 direction quad)) + (.lvf vf3 (&-> arg0 dir2 direction quad)) + (.lvf vf4 (&-> arg0 dir0 extra quad)) + (.lvf vf5 (&-> arg0 dir1 extra quad)) + (.lvf vf6 (&-> arg0 dir2 extra quad)) + (.mul.x.vf acc vf1 vf4) + (.add.mul.x.vf acc vf2 vf5 acc) + (.add.mul.x.vf vf1 vf3 vf6 acc) + (.svf (&-> s4-0 quad) vf1) + (vector-normalize! s4-0 -1.0) + (when (< (- (-> s4-0 y)) 0.9063) + (let* ((f0-2 0.4226) + (f1-1 (-> s4-0 x)) + (f1-3 (* f1-1 f1-1)) + (f2-0 (-> s4-0 z)) + (f0-3 (/ f0-2 (sqrtf (+ f1-3 (* f2-0 f2-0))))) + ) + (set! (-> s4-0 x) (* (-> s4-0 x) f0-3)) + (set! (-> s4-0 y) -0.9063) + (set! (-> s4-0 z) (* (-> s4-0 z) f0-3)) + ) + ) + (cond + ((logtest? (-> arg1 shadow-ctrl settings flags) (shadow-flags shdf08)) + (set! (-> s5-0 quad) (-> s4-0 quad)) + ) + (else + (when (not (paused?)) + (vector-seek! s5-0 s4-0 (* 0.2 (seconds-per-frame))) + (vector-normalize! s5-0 1.0) + ) + ) + ) + (set! (-> arg1 shadow-ctrl settings shadow-dir w) f30-0) + ) + (none) + ) + ) + +;; definition for function calc-shadow-masks +;; WARN: Return type mismatch symbol vs none. +;; ERROR: Unsupported inline assembly instruction kind - [srl v1, v1, 24] +(defun calc-shadow-masks ((arg0 light-group) (arg1 draw-control) (arg2 uint)) + (local-vars (v1-25 uint) (v1-26 int) (sv-64 light-hash) (sv-68 vector) (sv-72 mood-context) (sv-76 pointer)) + (let ((s5-0 (the-as (array float) (new 'stack 'boxed-array float 6)))) + (let ((v1-1 (-> arg1 shadow-mask)) + (a0-2 (-> arg1 shadow-values)) + ) + (dotimes (a1-2 5) + (if (not (logtest? v1-1 (ash 1 a1-2))) + (set! (-> s5-0 a1-2) 1.0) + (set! (-> s5-0 a1-2) (* 0.0625 (the float (logand (ash a0-2 (* -4 a1-2)) 15)))) + ) + ) + ) + (when (or (and (>= (the-as int arg2) 10) (< (the-as int arg2) 18)) + (and (>= (the-as int arg2) 30) (< (the-as int arg2) 38)) + ) + (dotimes (s3-1 (-> *level* length)) + (let ((v1-10 (-> *level* level s3-1))) + (when (= (-> v1-10 status) 'active) + (set! sv-64 (-> v1-10 light-hash)) + (set! sv-68 (-> arg1 origin)) + (set! sv-72 (-> v1-10 mood-context)) + (when (nonzero? sv-64) + (let ((v1-13 (light-hash-get-bucket-index sv-64 (-> arg1 origin)))) + (when (!= v1-13 -1) + (let ((s2-0 (-> sv-64 bucket-array v1-13))) + (set! sv-76 (+ (+ (-> s2-0 index) 0) (the-as uint (-> sv-64 index-array)))) + (dotimes (s1-0 (the-as int (-> s2-0 count))) + (let ((s0-0 (-> sv-64 light-sphere-array (-> (the-as (pointer uint8) (&+ sv-76 s1-0)))))) + (when (= (-> s0-0 palette-index) -2) + (let* ((f0-3 (-> s0-0 bsphere w)) + (f28-0 (* f0-3 (-> s0-0 decay-start))) + (f26-0 (- f0-3 f28-0)) + (f0-8 (fmax 0.0 (fmin 1.0 (/ (- (vector-vector-distance (-> s0-0 bsphere) sv-68) f28-0) f26-0)))) + ) + (when (!= f0-8 1.0) + (.srl v1-26 v1-25 24) + (let ((a0-26 (shr (shl (-> s0-0 shadow) 40) 40))) + (dotimes (a1-6 5) + (when (logtest? v1-26 (ash 1 a1-6)) + (let ((f1-5 (* 0.0625 (the float (logand (ash a0-26 (* -4 a1-6)) 15))))) + 1.0 + (set! (-> s5-0 a1-6) (fmin (-> s5-0 a1-6) (+ f1-5 (* (- 1.0 f1-5) f0-8)))) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (dotimes (v1-35 4) + (when (nonzero? (-> arg0 lights v1-35 mask)) + (let ((a0-36 (-> arg0 lights v1-35 palette-index))) + (set! (-> arg0 lights v1-35 extra x) (* (-> arg0 lights v1-35 extra x) (-> s5-0 a0-36))) + ) + ) + ) + ) + (none) + ) + +;; definition for function calc-realtime-lights +;; WARN: Return type mismatch symbol vs none. +(defun calc-realtime-lights ((arg0 light-group) (arg1 draw-control) (arg2 uint)) + (local-vars (sv-16 light-hash) (sv-20 vector) (sv-24 mood-context)) + (when (or (and (>= (the-as int arg2) 10) (< (the-as int arg2) 18)) + (and (>= (the-as int arg2) 30) (< (the-as int arg2) 38)) + ) + (dotimes (s4-0 (-> *level* length)) + (let ((v1-5 (-> *level* level s4-0))) + (when (= (-> v1-5 status) 'active) + (set! sv-16 (-> v1-5 light-hash)) + (set! sv-20 (-> arg1 origin)) + (set! sv-24 (-> v1-5 mood-context)) + (when (nonzero? sv-16) + (let ((v1-8 (light-hash-get-bucket-index sv-16 (-> arg1 origin)))) + (when (!= v1-8 -1) + (let* ((s3-0 (-> sv-16 bucket-array v1-8)) + (s2-0 (+ (+ (-> s3-0 index) 0) (the-as uint (-> sv-16 index-array)))) + ) + (dotimes (s1-0 (the-as int (-> s3-0 count))) + (let* ((a1-3 (-> sv-16 light-sphere-array (-> (the-as (pointer uint8) (&+ s2-0 s1-0))))) + (v1-14 (-> a1-3 palette-index)) + (f0-1 (if (= v1-14 -1) + 1.0 + (-> sv-24 times v1-14 w) + ) + ) + ) + (if (not (or (= (-> a1-3 palette-index) -2) (= (* (-> a1-3 brightness) f0-1) 0.0))) + (add-light-sphere-to-light-group arg0 a1-3 sv-20 sv-24) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for function calc-vu1-lights +;; WARN: Return type mismatch int vs none. +(defun calc-vu1-lights ((arg0 vu-lights) (arg1 draw-control) (arg2 symbol)) + (local-vars (v1-44 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (let ((s4-0 *time-of-day-context*)) + (cond + ((logtest? (-> arg1 global-effect) (draw-control-global-effect title-light)) + (when (not (-> s4-0 title-updated)) + (set! (-> s4-0 title-updated) #t) + (let ((s2-1 (-> *math-camera* inv-camera-rot)) + (a1-1 (new 'static 'vector :x 0.612 :y 0.5 :z -0.612)) + (s3-0 (new 'static 'vector :x -0.696 :y 0.174 :z 0.696)) + ) + (vector-matrix*! (the-as vector (-> s4-0 title-light-group)) a1-1 s2-1) + (vector-matrix*! (the-as vector (-> s4-0 title-light-group dir1)) s3-0 s2-1) + ) + ) + (vu-lights<-light-group! arg0 (-> s4-0 title-light-group)) + ) + ((logtest? (-> arg1 global-effect) (draw-control-global-effect rim-lights)) + (let ((s1-0 (-> *math-camera* inv-camera-rot)) + (a1-4 (new 'static 'vector :x 0.77455187 :y 0.44725248 :z 0.44725248)) + (s3-1 (new 'static 'vector :x -0.77455187 :y 0.44725248 :z 0.44725248)) + (s2-2 (new 'static 'vector :y -0.8944 :z 0.4472)) + (s4-1 (-> s4-0 rim-light-group)) + ) + (vector-matrix*! (the-as vector (-> s4-1 dir0)) a1-4 s1-0) + (vector-matrix*! (the-as vector (-> s4-1 dir1)) s3-1 s1-0) + (vector-matrix*! (the-as vector (-> s4-1 dir2)) s2-2 s1-0) + (vu-lights<-light-group! arg0 s4-1) + ) + ) + ((logtest? (-> arg1 global-effect) (draw-control-global-effect rim-lights2)) + (let ((s1-1 (-> *math-camera* inv-camera-rot)) + (a1-8 (new 'static 'vector :x 0.77455187 :y 0.44725248 :z 0.44725248)) + (s3-2 (new 'static 'vector :x -0.77455187 :y 0.44725248 :z 0.44725248)) + (s2-3 (new 'static 'vector :y -0.8944 :z 0.4472)) + (s4-2 (-> s4-0 rim-light-group2)) + ) + (vector-matrix*! (the-as vector (-> s4-2 dir0)) a1-8 s1-1) + (vector-matrix*! (the-as vector (-> s4-2 dir1)) s3-2 s1-1) + (vector-matrix*! (the-as vector (-> s4-2 dir2)) s2-3 s1-1) + (vu-lights<-light-group! arg0 s4-2) + ) + ) + ((logtest? (-> arg1 global-effect) (draw-control-global-effect rim-lights3)) + (let ((s1-2 (-> *math-camera* inv-camera-rot)) + (a1-12 (new 'static 'vector :x 0.77455187 :y 0.44725248 :z 0.44725248)) + (s3-3 (new 'static 'vector :x -0.77455187 :y 0.44725248 :z 0.44725248)) + (s2-4 (new 'static 'vector :y -0.8944 :z 0.4472)) + (s4-3 (-> s4-0 rim-light-group3)) + ) + (vector-matrix*! (the-as vector (-> s4-3 dir0)) a1-12 s1-2) + (vector-matrix*! (the-as vector (-> s4-3 dir1)) s3-3 s1-2) + (vector-matrix*! (the-as vector (-> s4-3 dir2)) s2-4 s1-2) + (vu-lights<-light-group! arg0 s4-3) + ) + ) + (else + (let ((v1-20 (-> arg1 level-index)) + (s1-3 (-> arg1 light-index)) + (s3-4 (new 'stack-no-clear 'light-group)) + ) + (if (and (>= v1-20 (the-as uint 10)) (< s1-3 (the-as uint 20))) + (+! s1-3 20) + ) + (let ((v1-22 (+ (the-as uint (-> *level* level0 mood-context)) (* (the-as uint 5424) v1-20)))) + (cond + ((< s1-3 (the-as uint 8)) + (quad-copy! (the-as pointer s3-4) (the-as pointer (+ (* (the-as uint 192) s1-3) 112 v1-22)) 12) + ) + ((< s1-3 (the-as uint 18)) + (quad-copy! (the-as pointer s3-4) (the-as pointer (+ (* (the-as uint 192) (+ s1-3 -10)) 112 v1-22)) 12) + ) + ((< s1-3 (the-as uint 28)) + (quad-copy! (the-as pointer s3-4) (the-as pointer (-> s4-0 light-group (+ s1-3 -20))) 12) + ) + ((< s1-3 (the-as uint 38)) + (quad-copy! (the-as pointer s3-4) (the-as pointer (-> s4-0 light-group (+ s1-3 -30))) 12) + ) + ) + ) + (calc-shadow-masks s3-4 arg1 s1-3) + (calc-realtime-lights s3-4 arg1 s1-3) + (vu-lights<-light-group! arg0 s3-4) + (if (and arg2 + (nonzero? (-> arg1 shadow-ctrl)) + (-> arg1 shadow-ctrl) + (not (logtest? (-> arg1 shadow-ctrl settings flags) (shadow-flags disable-draw))) + (not (logtest? (-> arg1 shadow-ctrl settings flags) (shadow-flags shdf07))) + ) + (calc-vu1-shadow s3-4 arg1) + ) + ) + ) + ) + ) + (.lvf vf5 (&-> arg1 color-mult quad)) + (.lvf vf6 (&-> arg1 color-emissive quad)) + (.lvf vf1 (&-> arg0 color 0 quad)) + (.lvf vf2 (&-> arg0 color 1 quad)) + (.lvf vf3 (&-> arg0 color 2 quad)) + (.lvf vf4 (&-> arg0 ambient quad)) + (.mul.vf vf4 vf4 vf5) + (.mul.vf vf1 vf1 vf5) + (.mul.vf vf2 vf2 vf5) + (.mul.vf vf3 vf3 vf5) + (.add.vf vf4 vf4 vf6) + (.svf (&-> arg0 color 0 quad) vf1) + (.svf (&-> arg0 color 1 quad) vf2) + (.svf (&-> arg0 color 2 quad) vf3) + (.svf (&-> arg0 ambient quad) vf4) + (.mov v1-44 vf4) + 0 + (none) + ) + ) + +;; definition for function dma-add-process-drawable +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; WARN: Function dma-add-process-drawable has a return type of none, but the expression builder found a return statement. +(defun dma-add-process-drawable ((arg0 process-drawable) (arg1 draw-control) (arg2 symbol) (arg3 dma-buffer)) + "Generate DMA for foreground object, calculate lights/shadows, etc." + (local-vars (a0-41 int) (a0-43 int) (a3-9 uint128) (sv-16 process-drawable)) + (with-pp + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf15 :class vf) + (vf16 :class vf) + (vf17 :class vf) + (vf18 :class vf) + (vf19 :class vf) + (vf20 :class vf) + (vf21 :class vf) + (vf22 :class vf) + (vf23 :class vf) + (vf24 :class vf) + (vf25 :class vf) + (vf26 :class vf) + (vf27 :class vf) + (vf28 :class vf) + (vf29 :class vf) + ) + (init-vf0-vector) + (set! sv-16 arg0) + (let* ((v1-1 (-> *perf-stats* data 50)) + (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 + (when (get-menu-mode *blit-displays-work*) + (if (not (logtest? (-> arg1 status) (draw-control-status hud))) + (return #f) + ) + ) + (logclear! (-> arg1 status) (draw-control-status on-screen)) + (when (not (logtest? (-> arg1 status) (draw-control-status no-draw no-draw-temp uninited))) + (let ((s3-0 (-> (the-as foreground-work #x70000000) bounds)) + (s4-0 (-> (the-as foreground-work #x70000000) lights)) + ) + (.lvf vf16 (&-> arg1 origin quad)) + (.svf (&-> s3-0 quad) vf16) + (when (or (sphere-in-view-frustum? s3-0) (logtest? (-> arg1 status) (draw-control-status no-bounds-check))) + (calc-vu1-lights s4-0 arg1 #t) + (let ((at-0 *math-camera*)) + (.lvf vf16 (&-> at-0 plane 0 quad)) + (.lvf vf17 (&-> at-0 plane 1 quad)) + (.lvf vf18 (&-> at-0 plane 2 quad)) + (.lvf vf19 (&-> at-0 plane 3 quad)) + (.lvf vf20 (&-> at-0 guard-plane 0 quad)) + (.lvf vf21 (&-> at-0 guard-plane 1 quad)) + (.lvf vf22 (&-> at-0 guard-plane 2 quad)) + (.lvf vf23 (&-> at-0 guard-plane 3 quad)) + (.lvf vf24 (&-> at-0 camera-rot rvec quad)) + (.lvf vf25 (&-> at-0 camera-rot uvec quad)) + (.lvf vf26 (&-> at-0 camera-rot fvec quad)) + (.lvf vf27 (&-> at-0 camera-rot trans quad)) + ) + (let ((v1-20 (-> (the-as foreground-work #x70000000) distance))) + (.lvf vf15 (&-> s3-0 quad)) + (.mul.w.vf acc vf27 vf0) + (.add.mul.x.vf acc vf24 vf15 acc) + (.add.mul.y.vf acc vf25 vf15 acc) + (.add.mul.z.vf vf15 vf26 vf15 acc :mask #b111) + (.mul.vf vf28 vf15 vf15) + (.max.w.vf vf29 vf0 vf0) + (.add.y.vf acc vf28 vf28) + (.add.mul.z.vf vf28 vf29 vf28 acc :mask #b1) + (.sqrt.vf Q vf28 :ftf #b0) + (.sub.w.vf vf28 vf0 vf15 :mask #b1000) + (.wait.vf) + (.add.vf vf15 vf28 Q :mask #b1000) + (.svf (&-> v1-20 quad) vf15) + (when (< 0.0 (+ (-> v1-20 z) (-> arg1 bounds w))) + (let ((s4-1 0)) + (let ((f30-0 (-> v1-20 w))) + (if (and *debug-segment* (-> *screen-shot-work* highres-enable)) + (set! f30-0 0.0) + ) + (set! (-> arg1 distance) f30-0) + (when (nonzero? (-> arg1 lod-set max-lod)) + (cond + ((>= (-> arg1 force-lod) 0) + (set! s4-1 (-> arg1 force-lod)) + (if (< (-> arg1 lod-set lod (-> arg1 lod-set max-lod) dist) f30-0) + (return #f) + ) + ) + (else + (while (and (< s4-1 (-> arg1 lod-set max-lod)) (< (-> arg1 lod-set lod s4-1 dist) f30-0)) + (+! s4-1 1) + ) + ) + ) + ) + (if (and (< (-> arg1 lod-set lod s4-1 dist) f30-0) (< (-> arg1 force-lod) 0)) + (return #f) + ) + (let ((v1-49 (-> *level* level (-> arg1 level-index))) + (f0-5 (* f30-0 (-> *math-camera* fov-correction-factor))) + (a0-18 (-> arg1 mgeo header texture-usage-group)) + ) + (dotimes (a1-4 7) + (let ((a2-2 (+ a1-4 12))) + (if (not (logtest? (-> arg1 status) (draw-control-status no-closest-distance))) + (set! (-> v1-49 closest-object a2-2) (fmin (-> v1-49 closest-object a2-2) f30-0)) + ) + ) + (let ((t0-0 (cond + ((>= f0-5 (-> a0-18 data a1-4 data 0 dist)) + 0 + ) + ((>= f0-5 (-> a0-18 data a1-4 data 1 dist)) + 1 + ) + (else + 2 + ) + ) + ) + (a2-12 (+ a1-4 12)) + ) + (let ((a3-8 (-> v1-49 texture-mask a2-12 mask quad)) + (t0-3 (-> (the-as (pointer int128) (+ (the-as uint a0-18) (* 48 a1-4) (* t0-0 16))) 0)) + ) + (.por a3-9 a3-8 t0-3) + ) + (set! (-> v1-49 texture-mask a2-12 mask quad) a3-9) + ) + ) + ) + (if (or (guard-band-cull s3-0) (< f30-0 (* 1.2 (-> *math-camera* d)))) + (logior! (-> arg1 status) (draw-control-status close-to-screen)) + (logclear! (-> arg1 status) (draw-control-status close-to-screen)) + ) + (logior! (-> arg1 status) (draw-control-status on-screen)) + (if (logtest? (-> arg1 status) (draw-control-status no-draw-bounds no-draw-bounds2)) + (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) + ) + ) + (when (and (< s4-1 (-> arg1 cur-lod)) (logtest? (-> arg1 status) (draw-control-status math-skel))) + (let ((s5-1 *matrix-engine*)) + (when (= (-> s5-1 length) (-> s5-1 allocated-length)) + (format 0 "Matrix engine is too small!~%") + (format *stdcon* "Matrix engine is too small!~%") + (break!) + 0 + ) + (set! (-> s5-1 (-> s5-1 length)) (process->handle sv-16)) + (+! (-> s5-1 length) 1) + ) + ) + (lod-set! arg1 s4-1) + ) + (logior! (-> arg1 status) (draw-control-status lod-set)) + ) + ) + ) + ) + ) + (let ((v1-88 (-> *perf-stats* data 50))) + (b! (zero? (-> v1-88 ctrl)) cfg-79 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-41 pcr0) + (+! (-> v1-88 accum0) a0-41) + (.mfpc a0-43 pcr1) + (+! (-> v1-88 accum1) a0-43) + ) + (label cfg-79) + 0 + 0 + (none) + ) + ) + ) + +;; definition for symbol *hud-lights*, type vu-lights +(define *hud-lights* (new 'global 'vu-lights)) + +;; failed to figure out what this is: +(set-vector! (-> *hud-lights* direction 0) 1.0 0.0 0.0 1.0) + +;; failed to figure out what this is: +(set-vector! (-> *hud-lights* direction 1) 0.0 1.0 0.0 1.0) + +;; failed to figure out what this is: +(set-vector! (-> *hud-lights* direction 2) 0.0 0.0 1.0 1.0) + +;; failed to figure out what this is: +(set-vector! (-> *hud-lights* color 0) 0.0 0.0 0.0 1.0) + +;; failed to figure out what this is: +(set-vector! (-> *hud-lights* color 1) 0.0 0.0 0.0 1.0) + +;; failed to figure out what this is: +(set-vector! (-> *hud-lights* color 2) 0.5 0.5 0.5 1.0) + +;; failed to figure out what this is: +(set-vector! (-> *hud-lights* ambient) 0.5 0.5 0.5 1.0) + +;; definition for function dma-add-process-drawable-hud +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun dma-add-process-drawable-hud ((arg0 process-drawable) (arg1 draw-control) (arg2 float) (arg3 dma-buffer)) + "Special version of dma-add-process-drawable for drawing hud foreground objects" + (local-vars (a3-4 uint128)) + (logclear! (-> arg1 status) (draw-control-status on-screen)) + (when (not (logtest? (-> arg1 status) (draw-control-status no-draw no-draw-temp uninited))) + (let ((v1-6 (-> (the-as foreground-work #x70000000) lights)) + (a0-3 *hud-lights*) + ) + (set! (-> v1-6 direction 0 quad) (-> a0-3 direction 0 quad)) + (set! (-> v1-6 direction 1 quad) (-> a0-3 direction 1 quad)) + (set! (-> v1-6 direction 2 quad) (-> a0-3 direction 2 quad)) + (set! (-> v1-6 color 0 quad) (-> a0-3 color 0 quad)) + (set! (-> v1-6 color 1 quad) (-> a0-3 color 1 quad)) + (set! (-> v1-6 color 2 quad) (-> a0-3 color 2 quad)) + (set! (-> v1-6 ambient quad) (-> a0-3 ambient quad)) + ) + (lod-set! arg1 0) + (logior! (-> arg1 status) (draw-control-status on-screen)) + (foreground-draw-hud arg1 arg3 arg2) + (let ((v1-12 (-> *level* level-default)) + (a0-9 (-> arg1 mgeo header texture-usage-group)) + ) + (dotimes (a1-9 7) + (let ((a2-1 (+ a1-9 12))) + (let ((a3-3 (-> v1-12 texture-mask a2-1 mask quad)) + (t0-3 (-> a0-9 data a1-9 data 2 mask quad)) + ) + (.por a3-4 a3-3 t0-3) + ) + (set! (-> v1-12 texture-mask a2-1 mask quad) a3-4) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function add-process-drawable +;; WARN: Return type mismatch symbol vs none. +(defun add-process-drawable ((arg0 process-drawable) (arg1 draw-control) (arg2 symbol) (arg3 dma-buffer)) + "Foreground engine function to generate dma for a process-drawable." + ((-> arg1 dma-add-func) arg0 arg1 arg2 arg3) + (none) + ) + +;; definition for function foreground-engine-execute +;; WARN: Return type mismatch int vs none. +;; ERROR: Unsupported inline assembly instruction kind - [cache dxwbin v1, 0] +;; ERROR: Unsupported inline assembly instruction kind - [cache dxwbin v1, 1] +(defun foreground-engine-execute ((arg0 engine)) + "Draw all foreground objects!" + (when (> (length arg0) 0) + (let ((gp-0 (-> *display* frames (-> *display* on-screen) global-buf base))) + (when *debug-segment* + (let ((s4-0 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-16 'foreground) + (s3-0 *profile-foreground-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s2-0 (-> s4-0 data (-> s4-0 count)))) + (let ((s1-0 (-> s4-0 base-time))) + (set! (-> s2-0 name) v1-16) + (set! (-> s2-0 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s1-0)))) + ) + (set! (-> s2-0 depth) (the-as uint (-> s4-0 depth))) + (set! (-> s2-0 color) s3-0) + (set! (-> s4-0 segment (-> s4-0 depth)) s2-0) + ) + (set! (-> s4-0 count) (min 1023 (+ (-> s4-0 count) 1))) + (+! (-> s4-0 depth) 1) + (set! (-> s4-0 max-depth) (max (-> s4-0 max-depth) (-> s4-0 depth))) + ) + ) + 0 + ) + (let ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf))) + (let ((v1-34 (-> s4-1 base))) + (.sync.l) + (.cache dxwbin v1-34 0) + (.sync.l) + (.cache dxwbin v1-34 1) + ) + (.sync.l) + 0 + (foreground-init) + (execute-connections arg0 s4-1) + ) + (foreground-wrapup) + (when *debug-segment* + (let ((s5-1 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-49 (+ (-> s5-1 depth) -1)) + (s4-2 (-> s5-1 segment v1-49)) + (s3-1 (-> s5-1 base-time)) + ) + (when (>= v1-49 0) + (set! (-> s4-2 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-1)))) + (+! (-> s5-1 depth) -1) + ) + ) + ) + ) + 0 + ) + (let ((v1-54 *dma-mem-usage*)) + (when (nonzero? v1-54) + (set! (-> v1-54 length) (max 36 (-> v1-54 length))) + (set! (-> v1-54 data 35 name) "pris-fragment") + (+! (-> v1-54 data 35 count) 1) + (+! (-> v1-54 data 35 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint gp-0)) + ) + (set! (-> v1-54 data 35 total) (-> v1-54 data 35 used)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition (debug) for function main-debug-hook +(defun-debug main-debug-hook () + "Run debug engine, collision renderer." + (when (not (or (= *master-mode* 'menu) (= *master-mode* 'progress))) + (let ((a0-3 *col-rend*)) + (if (-> a0-3 draw?) + (draw a0-3) + ) + ) + (execute-connections *debug-engine* #f) + (draw-instance-info *stdcon*) + ) + (none) + ) + +;; definition for symbol *debug-hook*, type pair +(define *debug-hook* (cons main-debug-hook '())) + +;; definition for symbol *add-sphere*, type symbol +(define *add-sphere* #f) + +;; definition for symbol *generic-effect-mode*, type int +(define *generic-effect-mode* 0) + +;; definition for function foreground-initialize-engines +;; WARN: Return type mismatch symbol vs none. +(defun foreground-initialize-engines () + "Initialize shadow chains prior to foreground drawing." + (let ((v1-0 *shadow-globals*)) + (dotimes (a0-0 3) + (let ((a1-2 (-> v1-0 bucket a0-0))) + (set! (-> a1-2 first) (the-as pointer 0)) + (set! (-> a1-2 next) (the-as pointer 0)) + (set! (-> a1-2 shadow-color) (cond + ((zero? a0-0) + (new 'static 'rgba :r #xf0 :g #xf0 :b #xf0 :a #x80) + ) + ((= a0-0 1) + (the-as rgba (-> *setting-control* user-current spotlight-color)) + ) + (else + (the-as rgba (-> *setting-control* user-current highlight-color)) + ) + ) + ) + (set! (-> a1-2 constants) (the-as shadow-vu1-constants 0)) + ) + ) + ) + (none) + ) + +;; definition for function foreground-execute-cpu-vu0-engines +(defun foreground-execute-cpu-vu0-engines () + "Run foreground drawing code on EE/VU0 (bones, generic merc, part of shadow, lightning, prim)" + (let ((gp-0 (-> *display* frames (-> *display* on-screen) global-buf))) + (bones-init gp-0) + (bones-mtx-calc-execute) + (generic-merc-execute-all gp-0) + (shadow-execute-all gp-0) + ) + (lightning-draw-all) + (prim-engine-execute) + (none) + ) + +;; definition for function real-main-draw-hook +;; WARN: Return type mismatch int vs none. +(defun real-main-draw-hook () + "Do all drawing! Called by main loop to run drawing for a frame. + Note that this also dispatches collide events, updates actors, etc. + It's a bit more than just drawing." + (local-vars (a0-115 int) (a0-117 int)) + (with-pp + (let ((v1-5 (-> *display* frames (-> *display* on-screen) global-buf))) + (set! (-> v1-5 end) (&- (-> v1-5 end) (the-as uint (* (shr (+ (-> *display* mem-reserve-size) 8255) 6) 64)))) + ) + (when *display-bug-report* + (let ((v1-13 (-> *display* frames (-> *display* on-screen) global-buf))) + (&+! (-> v1-13 end) -262144) + ) + ) + (set! (-> *display* dma-buffer-overflow) #f) + (set! (-> *display* mem-reserve-size) (the-as uint 0)) + (when *slow-frame-rate* + (dotimes (v1-18 #xc3500) + (nop!) + (nop!) + (nop!) + (nop!) + (nop!) + (nop!) + ) + ) + "Function to be executed to set up for engine dma" + (set! (-> *display* vu1-enable-user) (-> *display* vu1-enable-user-menu)) + (set! (-> *texture-pool* texture-enable-user) (-> *texture-pool* texture-enable-user-menu)) + (when *debug-segment* + (when (and *stats-memory* (!= *master-mode* 'menu)) + (cond + (*stats-memory-short* + (dotimes (gp-0 (-> *level* length)) + (let ((s5-0 (-> *level* level gp-0))) + (if (= (-> s5-0 status) 'active) + (print-mem-usage (compute-memory-usage! s5-0 #f) s5-0 *stdcon*) + ) + ) + ) + ) + (else + (let ((gp-1 (-> *level* level *stats-memory-level-index*))) + (if (and gp-1 (= (-> gp-1 status) 'active)) + (print-mem-usage (compute-memory-usage! gp-1 #f) gp-1 *stdcon*) + ) + ) + ) + ) + ) + (reset! *dma-mem-usage*) + ) + (foreground-initialize-engines) + (reset! *prim-work*) + (let ((gp-2 (-> 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)) + ) + (if (not (paused?)) + (update-wind *wind-work* *wind-scales*) + ) + (update-time-of-day *time-of-day-context*) + (set! (-> pp clock) gp-2) + ) + (when *debug-segment* + (let ((gp-3 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-73 'sky) + (s5-1 *profile-sky-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s4-0 (-> gp-3 data (-> gp-3 count)))) + (let ((s3-0 (-> gp-3 base-time))) + (set! (-> s4-0 name) v1-73) + (set! (-> s4-0 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-0)))) + ) + (set! (-> s4-0 depth) (the-as uint (-> gp-3 depth))) + (set! (-> s4-0 color) s5-1) + (set! (-> gp-3 segment (-> gp-3 depth)) s4-0) + ) + (set! (-> gp-3 count) (min 1023 (+ (-> gp-3 count) 1))) + (+! (-> gp-3 depth) 1) + (set! (-> gp-3 max-depth) (max (-> gp-3 max-depth) (-> gp-3 depth))) + ) + ) + 0 + ) + (if (-> *sky-work* draw-vortex) + (draw-vortex) + (draw *sky-work*) + ) + (flush-cache 0) + (when *debug-segment* + (let ((gp-4 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-102 (+ (-> gp-4 depth) -1)) + (s5-2 (-> gp-4 segment v1-102)) + (s4-1 (-> gp-4 base-time)) + ) + (when (>= v1-102 0) + (set! (-> s5-2 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-1)))) + (+! (-> gp-4 depth) -1) + ) + ) + ) + ) + 0 + ) + (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)) + ) + (when *debug-segment* + (let ((s5-3 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-120 'ocean) + (s4-2 *profile-ocean-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s3-1 (-> s5-3 data (-> s5-3 count)))) + (let ((s2-0 (-> s5-3 base-time))) + (set! (-> s3-1 name) v1-120) + (set! (-> s3-1 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s2-0)))) + ) + (set! (-> s3-1 depth) (the-as uint (-> s5-3 depth))) + (set! (-> s3-1 color) s4-2) + (set! (-> s5-3 segment (-> s5-3 depth)) s3-1) + ) + (set! (-> s5-3 count) (min 1023 (+ (-> s5-3 count) 1))) + (+! (-> s5-3 depth) 1) + (set! (-> s5-3 max-depth) (max (-> s5-3 max-depth) (-> s5-3 depth))) + ) + ) + 0 + ) + (draw! *ocean*) + (if *ocean-map* + (update-map *ocean*) + ) + (when *debug-segment* + (let ((s5-4 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-150 (+ (-> s5-4 depth) -1)) + (s4-3 (-> s5-4 segment v1-150)) + (s3-2 (-> s5-4 base-time)) + ) + (when (>= v1-150 0) + (set! (-> s4-3 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-2)))) + (+! (-> s5-4 depth) -1) + ) + ) + ) + ) + 0 + ) + (set! (-> pp clock) gp-5) + ) + (foreground-engine-execute *foreground-draw-engine*) + (let ((gp-6 (-> 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)) + ) + (foreground-execute-cpu-vu0-engines) + (set! (-> pp clock) gp-6) + ) + (when *add-sphere* + ) + (if (not (paused?)) + (execute-part-engine) + ) + (when (logtest? (vu1-renderer-mask sprite) (-> *display* vu1-enable-user)) + (if (not (get-screen-copied *blit-displays-work*)) + (sprite-draw *display*) + ) + ) + (when *debug-segment* + (debug-draw-actors *level* *display-actor-marks*) + (collide-shape-draw-debug-marks) + ) + (when *display-trail-graph* + (let ((a0-67 *trail-graph*)) + (if a0-67 + (debug-draw a0-67) + ) + ) + ) + (send-events-for-touching-shapes *touching-list*) + (free-nodes *touching-list*) + (prepare *collide-rider-pool*) + (send-all! *event-queue*) + (when *debug-segment* + (let ((gp-7 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-200 'actors) + (s5-5 *profile-actors-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s4-4 (-> gp-7 data (-> gp-7 count)))) + (let ((s3-3 (-> gp-7 base-time))) + (set! (-> s4-4 name) v1-200) + (set! (-> s4-4 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-3)))) + ) + (set! (-> s4-4 depth) (the-as uint (-> gp-7 depth))) + (set! (-> s4-4 color) s5-5) + (set! (-> gp-7 segment (-> gp-7 depth)) s4-4) + ) + (set! (-> gp-7 count) (min 1023 (+ (-> gp-7 count) 1))) + (+! (-> gp-7 depth) 1) + (set! (-> gp-7 max-depth) (max (-> gp-7 max-depth) (-> gp-7 depth))) + ) + ) + 0 + ) + (actors-update *level*) + (when *debug-segment* + (let ((gp-8 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-226 (+ (-> gp-8 depth) -1)) + (s5-6 (-> gp-8 segment v1-226)) + (s4-5 (-> gp-8 base-time)) + ) + (when (>= v1-226 0) + (set! (-> s5-6 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-5)))) + (+! (-> gp-8 depth) -1) + ) + ) + ) + ) + 0 + ) + (when *debug-segment* + (let ((gp-9 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-239 'nav) + (s5-7 *profile-nav-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s4-6 (-> gp-9 data (-> gp-9 count)))) + (let ((s3-4 (-> gp-9 base-time))) + (set! (-> s4-6 name) v1-239) + (set! (-> s4-6 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-4)))) + ) + (set! (-> s4-6 depth) (the-as uint (-> gp-9 depth))) + (set! (-> s4-6 color) s5-7) + (set! (-> gp-9 segment (-> gp-9 depth)) s4-6) + ) + (set! (-> gp-9 count) (min 1023 (+ (-> gp-9 count) 1))) + (+! (-> gp-9 depth) 1) + (set! (-> gp-9 max-depth) (max (-> gp-9 max-depth) (-> gp-9 depth))) + ) + ) + 0 + ) + (update-nav-meshes-method *level*) + (when *debug-segment* + (let ((gp-10 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-265 (+ (-> gp-10 depth) -1)) + (s5-8 (-> gp-10 segment v1-265)) + (s4-7 (-> gp-10 base-time)) + ) + (when (>= v1-265 0) + (set! (-> s5-8 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-7)))) + (+! (-> gp-10 depth) -1) + ) + ) + ) + ) + 0 + ) + (when *debug-segment* + (let ((gp-11 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-278 'background) + (s5-9 *profile-background-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s4-8 (-> gp-11 data (-> gp-11 count)))) + (let ((s3-5 (-> gp-11 base-time))) + (set! (-> s4-8 name) v1-278) + (set! (-> s4-8 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-5)))) + ) + (set! (-> s4-8 depth) (the-as uint (-> gp-11 depth))) + (set! (-> s4-8 color) s5-9) + (set! (-> gp-11 segment (-> gp-11 depth)) s4-8) + ) + (set! (-> gp-11 count) (min 1023 (+ (-> gp-11 count) 1))) + (+! (-> gp-11 depth) 1) + (set! (-> gp-11 max-depth) (max (-> gp-11 max-depth) (-> gp-11 depth))) + ) + ) + 0 + ) + (init-background) + (execute-connections *background-draw-engine* #f) + (let* ((v1-294 (-> *perf-stats* data 40)) + (a0-113 (-> v1-294 ctrl)) + ) + (+! (-> v1-294 count) 1) + (b! (zero? a0-113) cfg-122 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-113) + ) + (.sync.l) + (.sync.p) + (label cfg-122) + 0 + (finish-background) + (let ((v1-297 (-> *perf-stats* data 40))) + (b! (zero? (-> v1-297 ctrl)) cfg-124 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-115 pcr0) + (+! (-> v1-297 accum0) a0-115) + (.mfpc a0-117 pcr1) + (+! (-> v1-297 accum1) a0-117) + ) + (label cfg-124) + 0 + (update-wait-stats + (-> *perf-stats* data 40) + (-> *background-work* wait-to-vu0) + (the-as uint 0) + (the-as uint 0) + ) + (when *debug-segment* + (let ((gp-12 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-314 (+ (-> gp-12 depth) -1)) + (s5-10 (-> gp-12 segment v1-314)) + (s4-9 (-> gp-12 base-time)) + ) + (when (>= v1-314 0) + (set! (-> s5-10 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-9)))) + (+! (-> gp-12 depth) -1) + ) + ) + ) + ) + 0 + ) + (end-perf-stat-collection) + (when (and (!= *master-mode* 'menu) *stats-poly*) + (dotimes (gp-13 (-> *level* length)) + (let ((v1-326 (-> *level* level gp-13))) + (if (= (-> v1-326 status) 'active) + (collect-stats (-> v1-326 bsp)) + ) + ) + ) + (print-terrain-stats) + ) + (when (not (paused?)) + (if (and (!= *master-mode* 'menu) *stats-perf*) + (print-perf-stats) + ) + (if (and (!= *master-mode* 'menu) *stats-collide*) + (print-collide-stats) + ) + ) + (start-perf-stat-collection) + 0 + (none) + ) + ) + +;; definition for function main-draw-hook +(defun main-draw-hook () + "Wrapper of real-main-draw-hook" + (real-main-draw-hook) + (none) + ) + +;; definition for symbol *draw-hook*, type (function none) +(define *draw-hook* main-draw-hook) + +;; definition for function default-init-buffer +;; WARN: Return type mismatch symbol vs none. +(defun default-init-buffer ((arg0 bucket-id) (arg1 gs-zbuf) (arg2 gs-test)) + "Initialize DMA chain for a bucket." + (let ((v1-0 *display*) + (t0-0 16) + ) + (+! (-> v1-0 mem-reserve-size) t0-0) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((t1-0 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> t1-0 real-buffer-end) (the-as int (&+ (-> t1-0 base) t0-0))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((v1-8 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + (when (!= v1-8 (-> v1-8 last)) + (let* ((a0-8 (-> *display* frames (-> *display* on-screen) global-buf)) + (a3-15 (-> a0-8 base)) + ) + (let ((t0-2 *display*) + (t1-2 176) + ) + (+! (-> t0-2 mem-reserve-size) t1-2) + (when (not (-> t0-2 dma-buffer-overflow)) + (let ((t3-0 (-> t0-2 frames (-> t0-2 on-screen) global-buf))) + (if (< (-> t3-0 real-buffer-end) (the-as int (&+ (-> t3-0 base) t1-2))) + (set! (-> t0-2 dma-buffer-overflow) #t) + ) + ) + (if (not (-> t0-2 dma-buffer-overflow)) + (dma-buffer-add-gs-set-flusha a0-8 + (zbuf-1 arg1) + (test-1 arg2) + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (pabe 0) + (clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))) + (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (texa (new 'static 'gs-texa :ta1 #x80)) + (texclut (new 'static 'gs-texclut :cbw #x4)) + (fogcol *fog-color*) + ) + ) + ) + ) + (let ((a1-17 (the-as dma-packet (-> a0-8 base)))) + (set! (-> a1-17 dma) (new 'static 'dma-tag :id (dma-tag-id next) :addr (-> v1-8 next))) + (set! (-> a1-17 vif0) (new 'static 'vif-tag)) + (set! (-> a1-17 vif1) (new 'static 'vif-tag)) + (set! (-> a0-8 base) (the-as pointer (&+ a1-17 16))) + ) + (set! (-> v1-8 next) (the-as uint a3-15)) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for function default-end-buffer +;; WARN: Return type mismatch symbol vs none. +(defun default-end-buffer ((arg0 bucket-id) (arg1 gs-zbuf) (arg2 gs-test)) + "Add DMA data at the end of a bucket to reset settings." + (let ((v1-0 *display*) + (a3-0 16) + ) + (+! (-> v1-0 mem-reserve-size) a3-0) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((t1-0 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> t1-0 real-buffer-end) (the-as int (&+ (-> t1-0 base) a3-0))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((v1-8 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + (when (!= v1-8 (-> v1-8 last)) + (let* ((a3-6 (-> *display* frames (-> *display* on-screen) global-buf)) + (a0-8 (-> a3-6 base)) + ) + (let ((t0-11 *display*) + (t1-2 176) + ) + (+! (-> t0-11 mem-reserve-size) t1-2) + (when (not (-> t0-11 dma-buffer-overflow)) + (let ((t3-0 (-> t0-11 frames (-> t0-11 on-screen) global-buf))) + (if (< (-> t3-0 real-buffer-end) (the-as int (&+ (-> t3-0 base) t1-2))) + (set! (-> t0-11 dma-buffer-overflow) #t) + ) + ) + (if (not (-> t0-11 dma-buffer-overflow)) + (dma-buffer-add-gs-set-flusha a3-6 + (zbuf-1 arg1) + (test-1 arg2) + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (pabe 0) + (clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))) + (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (texa (new 'static 'gs-texa :ta1 #x80)) + (texclut (new 'static 'gs-texclut :cbw #x4)) + (fogcol *fog-color*) + ) + ) + ) + ) + (let ((t0-16 (-> a3-6 base))) + (let ((a1-17 (the-as dma-packet (-> a3-6 base)))) + (set! (-> a1-17 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> a1-17 vif0) (new 'static 'vif-tag)) + (set! (-> a1-17 vif1) (new 'static 'vif-tag)) + (set! (-> a3-6 base) (the-as pointer (&+ a1-17 16))) + ) + (set! (-> (the-as (pointer uint32) (-> v1-8 last)) 1) (the-as uint a0-8)) + (set! (-> v1-8 last) (the-as (pointer dma-tag) t0-16)) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition (debug) for function screen-shot-scale +;; WARN: Return type mismatch int vs none. +(defun-debug screen-shot-scale ((arg0 int) (arg1 string)) + (set! (-> *screen-shot-work* size) arg0) + (set! (-> *screen-shot-work* name) arg1) + (set! *display-profile* #f) + 0 + (none) + ) + +;; definition (debug) for function screen-shot +;; WARN: Return type mismatch int vs none. +(defun-debug screen-shot () + "Take a screenshot." + (screen-shot-scale 1 "image") + 0 + (none) + ) + +;; definition for function display-frame-start +;; WARN: Return type mismatch display vs none. +(defun display-frame-start ((arg0 display) (arg1 int) (arg2 float)) + "Advance clocks, poll pads/mouse, set up buckets." + (set! (-> (the-as vif-bank #x10003c00) err me0) 1) + (set-time-ratios *display* 1.0) + (tick! (-> arg0 frame-clock)) + (tick! (-> arg0 real-frame-clock)) + (set-time-ratios *display* arg2) + (tick! (-> arg0 session-clock)) + (tick! (-> arg0 game-clock)) + (tick! (-> arg0 total-game-clock)) + (tick! (-> arg0 base-clock)) + (tick! (-> arg0 real-clock)) + (tick! (-> arg0 target-clock)) + (tick! (-> arg0 camera-clock)) + (tick! (-> arg0 entity-clock)) + (tick! (-> arg0 bg-clock)) + (tick! (-> arg0 user0-clock)) + (tick! (-> arg0 user1-clock)) + (tick! (-> arg0 user2-clock)) + (tick! (-> arg0 user3-clock)) + (tick! (-> arg0 user4-clock)) + (tick! (-> arg0 user5-clock)) + (tick! (-> arg0 user6-clock)) + (tick! (-> arg0 user7-clock)) + (tick! (-> arg0 user8-clock)) + (tick! (-> arg0 user9-clock)) + (set! (-> arg0 bg-clock frame-counter) (the-as time-frame (mod (-> arg0 bg-clock frame-counter) #x69780))) + (tick! (-> arg0 part-clock)) + (when (and (nonzero? *screen-shot-work*) (!= (-> *screen-shot-work* count) -1)) + (let ((v1-61 (-> *screen-shot-work* size))) + (if (!= (-> *screen-shot-work* count) (* v1-61 v1-61)) + (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* + (sync-path 0 0) + ) + (let ((v1-75 (-> s5-1 global-buf))) + (set! (-> v1-75 base) (-> v1-75 data)) + (set! (-> v1-75 end) (the-as pointer (+ (+ (-> v1-75 allocated-length) 28) (the-as int v1-75)))) + ) + (when *debug-segment* + (let ((v1-78 (-> s5-1 debug-buf))) + (set! (-> v1-78 base) (-> v1-78 data)) + (set! (-> v1-78 end) (the-as pointer (+ (+ (-> v1-78 allocated-length) 28) (the-as int v1-78)))) + ) + ) + (let ((v1-79 (-> s5-1 calc-buf))) + (set! (-> v1-79 base) (-> v1-79 data)) + (set! (-> v1-79 end) (the-as pointer (+ (+ (-> v1-79 allocated-length) 28) (the-as int v1-79)))) + ) + (*pre-draw-hook* (-> s5-1 calc-buf)) + (when (not (paused?)) + (clear *stdcon1*) + (debug-reset-buffers) + (clear! *simple-sprite-system*) + ) + (set! (-> s5-1 bucket-group) (dma-buffer-add-buckets (-> s5-1 calc-buf) 586)) + ) + (service-cpads) + (service-mouse) + (service-keybd) + (execute-connections *pad-engine* #f) + (none) + ) + +;; definition for function display-frame-finish +(defun display-frame-finish ((arg0 display)) + "Do final texture remaps, sync DMA (wait for previous rendering to finish), and finalize DMA chain." + (local-vars (a0-54 int) (a0-56 int)) + (with-pp + (let* ((s4-0 (-> arg0 frames (-> arg0 on-screen))) + (s5-0 (-> s4-0 calc-buf)) + ) + (-> s4-0 global-buf base) + (tfrag-vu1-init-buffers) + (tie-vu1-init-buffers) + (merc-vu1-init-buffers) + (emerc-vu1-init-buffers) + (generic-vu1-init-buffers) + (when *debug-segment* + (let ((s3-0 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-12 'texture) + (s2-0 *profile-texture-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-12) + (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 + ) + (when (-> *texture-pool* update-sprites-flag) + (update-sprites *texture-pool*) + (particle-adgif-cache-flush) + (remap-all-particles) + ) + (let ((s3-1 (-> pp clock))) + (if (= (-> *time-of-day-context* mode) (time-of-day-palette-id unk3)) + (set! (-> pp clock) (-> arg0 bg-clock)) + (set! (-> pp clock) (-> arg0 real-clock)) + ) + (upload-textures *texture-pool*) + (set! (-> pp clock) s3-1) + ) + (if (-> *texture-pool* update-flag) + (update-warp-and-hud *texture-pool*) + ) + (-> arg0 frames (-> arg0 on-screen) global-buf) + (update-eyes) + (when *debug-segment* + (let ((s3-2 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-56 (+ (-> s3-2 depth) -1)) + (s2-1 (-> s3-2 segment v1-56)) + (s1-1 (-> s3-2 base-time)) + ) + (when (>= v1-56 0) + (set! (-> s2-1 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s1-1)))) + (+! (-> s3-2 depth) -1) + ) + ) + ) + ) + 0 + ) + (when *debug-segment* + (when *debug-segment* + (let ((s3-3 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-71 'debug) + (s2-2 *profile-debug-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s1-2 (-> s3-3 data (-> s3-3 count)))) + (let ((s0-1 (-> s3-3 base-time))) + (set! (-> s1-2 name) v1-71) + (set! (-> s1-2 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s0-1)))) + ) + (set! (-> s1-2 depth) (the-as uint (-> s3-3 depth))) + (set! (-> s1-2 color) s2-2) + (set! (-> s3-3 segment (-> s3-3 depth)) s1-2) + ) + (set! (-> s3-3 count) (min 1023 (+ (-> s3-3 count) 1))) + (+! (-> s3-3 depth) 1) + (set! (-> s3-3 max-depth) (max (-> s3-3 max-depth) (-> s3-3 depth))) + ) + ) + 0 + ) + (debug-draw-buffers) + (when *debug-segment* + (let ((s3-4 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-95 (+ (-> s3-4 depth) -1)) + (s2-3 (-> s3-4 segment v1-95)) + (s1-3 (-> s3-4 base-time)) + ) + (when (>= v1-95 0) + (set! (-> s2-3 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s1-3)))) + (+! (-> s3-4 depth) -1) + ) + ) + ) + ) + 0 + ) + (when *debug-segment* + (let ((s3-5 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-108 'gs-sync) + (s2-4 *profile-gs-sync-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s1-4 (-> s3-5 data (-> s3-5 count)))) + (let ((s0-2 (-> s3-5 base-time))) + (set! (-> s1-4 name) v1-108) + (set! (-> s1-4 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s0-2)))) + ) + (set! (-> s1-4 depth) (the-as uint (-> s3-5 depth))) + (set! (-> s1-4 color) s2-4) + (set! (-> s3-5 segment (-> s3-5 depth)) s1-4) + ) + (set! (-> s3-5 count) (min 1023 (+ (-> s3-5 count) 1))) + (+! (-> s3-5 depth) 1) + (set! (-> s3-5 max-depth) (max (-> s3-5 max-depth) (-> s3-5 depth))) + ) + ) + 0 + ) + (when (nonzero? (sync-path 0 0)) + (*dma-timeout-hook*) + (reset-vif1-path) + (nop!) + (nop!) + 0 + ) + (when *debug-segment* + (let ((s3-6 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-134 (+ (-> s3-6 depth) -1)) + (s2-5 (-> s3-6 segment v1-134)) + (s1-5 (-> s3-6 base-time)) + ) + (when (>= v1-134 0) + (set! (-> s2-5 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s1-5)))) + (+! (-> s3-6 depth) -1) + ) + ) + ) + ) + 0 + ) + (let ((s3-7 (-> arg0 frames (-> arg0 on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-148 (+ (-> s3-7 depth) -1)) + (s2-6 (-> s3-7 segment v1-148)) + (s1-6 (-> s3-7 base-time)) + ) + (when (>= v1-148 0) + (set! (-> s2-6 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s1-6)))) + (+! (-> s3-7 depth) -1) + ) + ) + ) + ) + 0 + (let ((v1-155 (-> *perf-stats* data))) + (b! (zero? (-> v1-155 0 ctrl)) cfg-63 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-54 pcr0) + (+! (-> v1-155 0 accum0) a0-54) + (.mfpc a0-56 pcr1) + (+! (-> v1-155 0 accum1) a0-56) + ) + (label cfg-63) + 0 + (with-dma-buffer-add-bucket ((s2-7 (-> arg0 frames (-> arg0 on-screen) debug-buf)) + (bucket-id debug-no-zbuf2) + ) + (when (and (or *display-profile* *stats-profile-bars*) (not *display-capture-mode*)) + (postprocess-data! (-> arg0 frames (-> arg0 on-screen) profile-array)) + (let ((a2-0 7)) + (if *display-profile* + (draw-bars! *profile-array* s2-7 a2-0) + ) + ) + (if (and (!= *master-mode* 'menu) *stats-profile-bars*) + (draw-text! *profile-array*) + ) + ) + (when *display-deci-count* + (let ((s1-7 draw-string-xy)) + (format (clear *temp-string*) "~D" *deci-count*) + (s1-7 *temp-string* s2-7 448 210 (font-color default) (font-flags shadow kerning)) + ) + ) + (display-file-info) + ) + ) + (let ((s3-9 6) + (s2-8 583) + ) + (while (>= s2-8 s3-9) + (default-end-buffer + (the-as bucket-id s3-9) + (new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24)) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (+! s3-9 1) + ) + ) + (default-init-buffer + (bucket-id debug-no-zbuf1) + (new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24) :zmsk #x1) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest always)) + ) + (default-init-buffer + (bucket-id debug-no-zbuf2) + (new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24) :zmsk #x1) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest always)) + ) + (default-init-buffer + (bucket-id tex-hud-pris2) + (new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24) :zmsk #x1) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest always)) + ) + (default-init-buffer + (bucket-id bucket8) + (new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24)) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest always)) + ) + (*post-draw-hook* (-> arg0 frames (-> arg0 on-screen) calc-buf)) + (let ((v1-199 *display*) + (a0-75 16) + ) + (+! (-> v1-199 mem-reserve-size) a0-75) + (when (not (-> v1-199 dma-buffer-overflow)) + (let ((a2-9 (-> v1-199 frames (-> v1-199 on-screen) global-buf))) + (if (< (-> a2-9 real-buffer-end) (the-as int (&+ (-> a2-9 base) a0-75))) + (set! (-> v1-199 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-199 dma-buffer-overflow)) + (let* ((v1-201 s5-0) + (a0-79 (the-as dma-packet (-> v1-201 base))) + ) + (set! (-> a0-79 dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> a0-79 vif0) (new 'static 'vif-tag :imm #x24b :cmd (vif-cmd mark))) + (set! (-> a0-79 vif1) (new 'static 'vif-tag :cmd (vif-cmd flushe) :irq #x1 :msk #x1)) + (set! (-> v1-201 base) (the-as pointer (&+ a0-79 16))) + ) + ) + ) + ) + (dma-buffer-patch-buckets (the-as dma-bucket (-> s4-0 bucket-group)) 586) + (let ((v1-202 *display*) + (a0-81 16) + ) + (+! (-> v1-202 mem-reserve-size) a0-81) + (when (not (-> v1-202 dma-buffer-overflow)) + (let ((a2-11 (-> v1-202 frames (-> v1-202 on-screen) global-buf))) + (if (< (-> a2-11 real-buffer-end) (the-as int (&+ (-> a2-11 base) a0-81))) + (set! (-> v1-202 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-202 dma-buffer-overflow)) + (let* ((v1-204 s5-0) + (a0-85 (-> v1-204 base)) + ) + (set! (-> (the-as (pointer int64) a0-85)) #x70000000) + (set! (-> (the-as (pointer uint64) a0-85) 1) (the-as uint 0)) + (set! (-> v1-204 base) (&+ a0-85 16)) + ) + ) + ) + ) + (flush-cache 0) + (when (not (paused?)) + (when *stats-buffer* + (let* ((a0-87 (-> s4-0 global-buf)) + (v1-208 (-> s5-0 base)) + (a2-13 (-> s5-0 data)) + (s4-1 (-> a0-87 base)) + (s5-1 (-> a0-87 data)) + (s3-10 (-> a0-87 end)) + ) + (format *stdcon* "~0kvu1 buf = ~d~%" (&- v1-208 (the-as uint a2-13))) + (format *stdcon* "~0kglobal buf = ~d~%" (&- s4-1 (the-as uint s5-1))) + (format *stdcon* "~0kbase = #x~x~%" s4-1) + (format *stdcon* "~0kend = #x~x~%" s3-10) + ) + ) + ) + ) + arg0 + ) + ) + +;; definition for function determine-pause-mode +;; WARN: Return type mismatch int vs none. +(defun determine-pause-mode () + "Update pause modes" + (when (and (or (not *progress-process*) (can-go-back? (-> *progress-process* 0))) + (or (!= *master-mode* 'freeze) (and *debug-segment* (cpad-pressed? 0 select start) (cpad-hold? 0 l3))) + ) + (if (or (cpad-pressed? 0 select start) + (cond + ((= *master-mode* 'menu) + (cpad-pressed? 0 r3 r2 triangle circle) + ) + (*cam-layout* + #f + ) + (else + #f + ) + ) + (or (and (logtest? (-> *cpad-list* cpads 0 valid) 128) + (= *master-mode* 'game) + (>= (-> *display* base-clock frame-counter) (-> *game-info* blackout-time)) + (= (-> *setting-control* user-current bg-a) 0.0) + (and (= (-> *setting-control* user-current bg-a-force) 0.0) + (< (seconds 1003) (-> *display* real-clock frame-counter)) + ) + ) + (and (cpad-pressed? 0 r2) (or (= *master-mode* 'pause) (= *master-mode* 'menu))) + *pause-lock* + ) + ) + (toggle-pause) + ) + ) + (if (and *progress-process* (!= *master-mode* 'progress)) + (deactivate-progress) + ) + 0 + (none) + ) + +;; definition for function calc-ratio +(defun calc-ratio ((arg0 int) (arg1 int)) + (let ((f0-1 (the float (sar (- arg0 arg1) 48)))) + (if (< f0-1 0.0) + (set! f0-1 (+ 65536.0 f0-1)) + ) + (/ f0-1 (the float *ticks-per-frame*)) + ) + ) + +;; definition for function display-sync +(defun display-sync ((arg0 display)) + (sync-path 0 0) + (let* ((s4-0 (-> arg0 last-screen)) + (s2-0 (shl (timer-count (the-as timer-bank #x10000800)) 48)) + (s5-0 (shl (-> arg0 frames s4-0 start-time) 48)) + (a1-1 (shl (-> arg0 vblank-start-time 0) 48)) + (s1-0 (shl (-> arg0 vblank-start-time 1) 48)) + ) + (set! *ticks-per-frame* (max 9000 (min #x2ee0 (sar (- s1-0 a1-1) 48)))) + (let ((f28-0 (the float *ticks-per-frame*)) + (s3-0 (sar (- s2-0 s5-0) 48)) + (f30-1 (fmax 1.0 (calc-ratio (the-as int s2-0) (the-as int s5-0)))) + ) + (/ (the float (sar (- s2-0 (the-as uint s1-0)) 48)) f28-0) + (let ((f28-1 (/ (the float (sar (- s2-0 (the-as uint s1-0)) 48)) f28-0)) + (f26-0 (fmax 1.0 (fmin 4.0 (-> *display* dog-ratio)))) + ) + (if (< (the-as int s3-0) 0) + (set! s3-0 (+ #x10000 s3-0)) + ) + (set! (-> arg0 frames s4-0 run-time) s3-0) + (set! f30-1 (cond + ((-> arg0 run-half-speed) + (syncv 0) + (let ((a0-8 (shl (timer-count (the-as timer-bank #x10000800)) 48))) + (if (and (< (calc-ratio (the-as int a0-8) (the-as int s5-0)) 2.0) (< f28-1 0.9)) + (syncv 0) + ) + ) + 2.0 + ) + ((< 1.0 f30-1) + (when (> (-> arg0 force-sync) 0) + (syncv 0) + (+! (-> arg0 force-sync) -1) + (let ((a0-12 (shl (timer-count (the-as timer-bank #x10000800)) 48))) + (set! f30-1 (calc-ratio (the-as int a0-12) (the-as int s5-0))) + ) + ) + f30-1 + ) + ((and (= f30-1 1.0) (< f30-1 f26-0)) + (while (< f30-1 f26-0) + (let ((a0-14 (shl (timer-count (the-as timer-bank #x10000800)) 48))) + (set! f30-1 (calc-ratio (the-as int a0-14) (the-as int s5-0))) + ) + (if (< f30-1 0.0) + (set! f30-1 f26-0) + ) + ) + 1.0 + ) + (else + (if (< f28-1 0.9) + (syncv 0) + ) + f30-1 + ) + ) + ) + ) + (let ((s4-1 (-> arg0 on-screen))) + (let ((v1-50 (timer-count (the-as timer-bank #x10000800)))) + (let ((a0-19 (sar (- (shl v1-50 48) s5-0) 48))) + (if (< (the-as int a0-19) 0) + (set! a0-19 (+ #x10000 a0-19)) + ) + (+! (-> arg0 total-run-time) a0-19) + ) + (set! (-> arg0 frames s4-1 start-time) v1-50) + ) + (set-graphics-mode) + (let ((s5-1 (-> arg0 frames s4-1 calc-buf))) + (when (nonzero? (dma-buffer-length s5-1)) + (+! s4-1 1) + (if (< 1 s4-1) + (set! s4-1 0) + ) + (set! (-> arg0 last-screen) (-> arg0 on-screen)) + (set! (-> arg0 on-screen) s4-1) + (when *debug-segment* + (set! *profile-interrupt-segment* (-> *display* frames (-> *display* last-screen) profile-array data 1)) + (set! (-> *profile-interrupt-segment* depth) 0) + (set! (-> *profile-interrupt-segment* max-depth) 1) + ) + (if (not (-> *display* dma-buffer-overflow)) + (dma-buffer-send-chain (the-as dma-bank-source #x10009000) s5-1) + ) + ) + ) + (determine-pause-mode) + (when (and (nonzero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1) (!= (-> *screen-shot-work* size) -1)) + (let ((v1-82 (-> *screen-shot-work* size))) + (set! (-> *screen-shot-work* count) (* v1-82 v1-82)) + ) + (set-master-mode 'pause) + ) + (display-frame-start arg0 s4-1 f30-1) + ) + ) + ) + (none) + ) 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 434e4dc4a8..67e01b3d52 100644 --- a/test/decompiler/reference/jak3/engine/entity/entity-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/entity/entity-h_REF.gc @@ -77,7 +77,7 @@ (task game-task :overlay-at (-> perm task)) ) (:methods - (entity-links-method-9 () none) + (birth? (_type_ vector) symbol) ) ) @@ -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 new file mode 100644 index 0000000000..4ecc215b20 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/entity/entity_REF.gc @@ -0,0 +1,2748 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *spawn-actors*, type symbol +(define *spawn-actors* #t) + +;; definition for symbol *compact-actors*, type symbol +(define *compact-actors* #t) + +;; definition for symbol *vis-actors*, type symbol +(define *vis-actors* #t) + +;; definition for method 8 of type drawable-actor +;; WARN: Return type mismatch int vs drawable-actor. +(defmethod mem-usage ((this drawable-actor) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 45 (-> usage length))) + (set! (-> usage data 44 name) "entity") + (+! (-> usage data 44 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 44 used) v1-6) + (+! (-> usage data 44 total) (logand -16 (+ v1-6 15))) + ) + (mem-usage (-> this actor) usage (logior flags 64)) + (the-as drawable-actor 0) + ) + +;; definition for method 8 of type drawable-inline-array-actor +;; WARN: Return type mismatch int vs drawable-inline-array-actor. +(defmethod mem-usage ((this drawable-inline-array-actor) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-5 32)) + (+! (-> usage data 0 used) v1-5) + (+! (-> usage data 0 total) (logand -16 (+ v1-5 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this data s3-0) usage flags) + ) + (the-as drawable-inline-array-actor 0) + ) + +;; definition for method 2 of type entity-links +(defmethod print ((this entity-links)) + (format #t "#" (-> this process) this) + this + ) + +;; definition for method 2 of type entity-perm +(defmethod print ((this entity-perm)) + (format + #t + "#" + (-> this aid) + (-> this task) + (-> this status) + (-> this user-uint64) + this + ) + this + ) + +;; definition for method 2 of type actor-group +(defmethod print ((this actor-group)) + (format #t "# this length)) + (format #t " ~A" (-> this data s5-0 actor)) + ) + (format #t " @ #x~X>" this) + this + ) + +;; definition for method 3 of type actor-group +(defmethod inspect ((this actor-group)) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~Tlength: ~D~%" (-> this length)) + (format #t "~Tallocated-length: ~D~%" (-> this allocated-length)) + (format #t "~Tdata[~D]: @ #x~X~%" (-> this length) (-> this data)) + (dotimes (s5-0 (-> this length)) + (format #t "~T [~D] ~A / ~D~%" s5-0 (-> this data s5-0 actor) (-> this data s5-0 id)) + ) + this + ) + +;; definition for method 22 of type entity +(defmethod birth! ((this entity)) + (format #t "birth ~A~%" this) + this + ) + +;; definition for method 23 of type entity +(defmethod kill! ((this entity)) + (format #t "kill ~A~%" this) + this + ) + +;; definition for method 2 of type entity +(defmethod print ((this entity)) + (format #t "#<~A :name ~S @ #x~X>" (-> this type) (res-lump-struct this 'name structure) this) + this + ) + +;; definition for method 26 of type entity +(defmethod get-level ((this entity)) + (dotimes (v1-0 (-> *level* length)) + (let ((a1-3 (-> *level* level v1-0))) + (when (= (-> a1-3 status) 'active) + (if (and (>= (the-as int this) (the-as int (-> a1-3 heap base))) + (< (the-as int this) (the-as int (-> a1-3 heap top-base))) + ) + (return a1-3) + ) + ) + ) + ) + (-> *level* level-default) + ) + +;; definition for function entity-by-name +(defun entity-by-name ((arg0 string)) + (if (not arg0) + (return (the-as entity #f)) + ) + (dotimes (s5-0 (-> *level* length)) + (let ((s4-0 (-> *level* level s5-0))) + (when (= (-> s4-0 status) 'active) + (let ((s3-0 (-> s4-0 bsp actors))) + (when (nonzero? s3-0) + (dotimes (s2-0 (-> s3-0 length)) + (let ((s1-0 (-> s3-0 data s2-0 actor))) + (if (string= (res-lump-struct s1-0 'name string) arg0) + (return s1-0) + ) + ) + ) + ) + ) + (let ((s3-1 (-> s4-0 bsp nav-meshes))) + (when (nonzero? s3-1) + (dotimes (s2-1 (-> s3-1 length)) + (let ((s1-1 (-> s3-1 s2-1))) + (if (string= (res-lump-struct s1-1 'name string) arg0) + (return s1-1) + ) + ) + ) + ) + ) + (let ((s3-2 (-> s4-0 bsp race-meshes))) + (when (nonzero? s3-2) + (dotimes (s2-2 (-> s3-2 length)) + (let ((s1-2 (-> s3-2 s2-2))) + (if (string= (res-lump-struct s1-2 'name string) arg0) + (return s1-2) + ) + ) + ) + ) + ) + (let ((s4-1 (-> s4-0 bsp cameras))) + (when (nonzero? s4-1) + (dotimes (s3-3 (-> s4-1 length)) + (let ((s2-3 (-> s4-1 s3-3))) + (if (string= (res-lump-struct s2-3 'name string) arg0) + (return s2-3) + ) + ) + ) + ) + ) + ) + ) + ) + (the-as entity #f) + ) + +;; definition for function entity-by-type +(defun entity-by-type ((arg0 type)) + (dotimes (s5-0 (-> *level* length)) + (let ((v1-3 (-> *level* level s5-0))) + (when (= (-> v1-3 status) 'active) + (let ((s4-0 (-> v1-3 bsp actors))) + (when (nonzero? s4-0) + (dotimes (s3-0 (-> s4-0 length)) + (let ((s2-0 (-> s4-0 data s3-0 actor))) + (if (and (type? s2-0 entity-actor) (= (-> s2-0 etype) arg0)) + (return s2-0) + ) + ) + ) + ) + ) + ) + ) + ) + (the-as entity-actor #f) + ) + +;; definition for function entity-by-aid +(defun entity-by-aid ((arg0 uint)) + (dotimes (v1-0 (-> *level* length)) + (let ((a1-3 (-> *level* level v1-0))) + (when (= (-> a1-3 status) 'active) + (let ((a1-4 (-> a1-3 entity))) + (when (nonzero? a1-4) + (let ((a2-4 0) + (a3-2 (+ (-> a1-4 length) -1)) + ) + 0 + (while (>= a3-2 a2-4) + (let* ((t0-3 (+ a2-4 (/ (- a3-2 a2-4) 2))) + (t1-2 (-> a1-4 data t0-3)) + (t2-0 (-> t1-2 perm aid)) + ) + (cond + ((= t2-0 arg0) + (return (-> t1-2 entity)) + ) + ((< (the-as uint t2-0) arg0) + (set! a2-4 (+ t0-3 1)) + ) + (else + (set! a3-2 (+ t0-3 -1)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (the-as entity #f) + ) + +;; definition for function entity-actor-from-level-name +;; WARN: Return type mismatch entity vs entity-actor. +(defun entity-actor-from-level-name ((arg0 symbol)) + (let ((v0-0 (the-as entity #f))) + (dotimes (s5-0 (-> *level* length)) + (let ((s4-0 (-> *level* level s5-0))) + (when (= (-> s4-0 status) 'active) + (when (= (-> s4-0 name) arg0) + (when (zero? (-> s4-0 entity length)) + (format 0 "ERROR: level ~s has no entities!!" (-> s4-0 name)) + (when *debug-segment* + (break!) + 0 + ) + ) + (set! v0-0 (-> s4-0 entity data 0 entity)) + ) + ) + ) + ) + (the-as entity-actor v0-0) + ) + ) + +;; definition for method 18 of type level-group +;; WARN: Return type mismatch int vs none. +(defmethod update-nav-meshes-method ((this level-group)) + (when (not (paused?)) + (dotimes (s5-0 (-> this length)) + (let ((v1-4 (-> this level s5-0))) + (when (= (-> v1-4 status) 'active) + (let ((s4-0 (-> v1-4 bsp nav-meshes))) + (when (nonzero? s4-0) + (dotimes (s3-0 (-> s4-0 length)) + (update-navigation (-> s4-0 s3-0 nav-mesh)) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function entity-nav-mesh-by-aid +(defun entity-nav-mesh-by-aid ((arg0 actor-id)) + (dotimes (v1-0 (-> *level* length)) + (let ((a1-3 (-> *level* level v1-0))) + (when (= (-> a1-3 status) 'active) + (let ((a1-5 (-> a1-3 bsp nav-meshes))) + (when (nonzero? a1-5) + (let ((a2-4 0) + (a3-2 (+ (-> a1-5 length) -1)) + ) + 0 + (while (>= a3-2 a2-4) + (let* ((t0-3 (+ a2-4 (/ (- a3-2 a2-4) 2))) + (t1-2 (-> a1-5 t0-3)) + (t2-0 (-> t1-2 aid)) + ) + (cond + ((= t2-0 arg0) + (return t1-2) + ) + ((< t2-0 (the-as uint arg0)) + (set! a2-4 (+ t0-3 1)) + ) + (else + (set! a3-2 (+ t0-3 -1)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (the-as entity-nav-mesh #f) + ) + +;; definition for function nav-mesh-from-res-tag +(defun nav-mesh-from-res-tag ((arg0 entity) (arg1 symbol) (arg2 int)) + (let ((v1-1 (res-lump-data arg0 arg1 pointer)) + (gp-0 (the-as nav-mesh #f)) + ) + (when v1-1 + (let* ((s5-1 (entity-nav-mesh-by-aid (the-as actor-id (-> (the-as (pointer uint32) (&+ v1-1 (* arg2 4))))))) + (v1-3 (if (type? s5-1 entity-nav-mesh) + s5-1 + ) + ) + ) + (if v1-3 + (set! gp-0 (-> v1-3 nav-mesh)) + ) + ) + ) + gp-0 + ) + ) + +;; definition for function entity-by-meters +(defun entity-by-meters ((arg0 float) (arg1 float) (arg2 float)) + (dotimes (v1-0 (-> *level* length)) + (let ((a3-3 (-> *level* level v1-0))) + (when (= (-> a3-3 status) 'active) + (let ((a3-5 (-> a3-3 bsp actors))) + (when (nonzero? a3-5) + (dotimes (t0-4 (-> a3-5 length)) + (let* ((t1-3 (-> a3-5 data t0-4 actor)) + (t2-1 (-> t1-3 extra trans)) + ) + (if (and (= (the float (the int (-> t2-1 x))) arg0) + (= (the float (the int (-> t2-1 y))) arg1) + (= (the float (the int (-> t2-1 z))) arg2) + ) + (return t1-3) + ) + ) + ) + ) + ) + ) + ) + ) + (the-as entity-actor #f) + ) + +;; definition for function process-by-ename +(defun process-by-ename ((arg0 string)) + (let ((v1-0 (entity-by-name arg0))) + (if v1-0 + (-> v1-0 extra process) + ) + ) + ) + +;; definition for function entity-process-count +(defun entity-process-count ((arg0 symbol)) + (let ((gp-0 0)) + (dotimes (s4-0 (-> *level* length)) + (let ((s3-0 (-> *level* level s4-0))) + (when (= (-> s3-0 status) 'active) + (let ((s2-0 (-> s3-0 bsp level entity))) + (dotimes (s1-0 (-> s2-0 length)) + (let ((v1-9 (-> s2-0 data s1-0 entity))) + (case arg0 + (('vis) + (if (is-object-visible? s3-0 (-> v1-9 extra vis-id)) + (+! gp-0 1) + ) + ) + (else + (if (-> v1-9 extra process) + (+! gp-0 1) + ) + ) + ) + ) + ) + ) + ) + ) + ) + gp-0 + ) + ) + +;; definition for function entity-count +(defun entity-count () + (let ((v0-0 0)) + (dotimes (v1-0 (-> *level* length)) + (let ((a0-3 (-> *level* level v1-0))) + (when (= (-> a0-3 status) 'active) + (let ((a0-6 (-> a0-3 bsp level entity))) + (dotimes (a1-3 (-> a0-6 length)) + (-> a0-6 data a1-3 entity) + (+! v0-0 1) + ) + ) + ) + ) + ) + v0-0 + ) + ) + +;; definition for function entity-remap-names +;; WARN: Return type mismatch int vs none. +(defun entity-remap-names ((arg0 pair)) + (let ((s5-0 (car arg0))) + (while (not (null? arg0)) + (let ((a0-2 (entity-by-meters + (the float (/ (the-as int (car (cdr s5-0))) 8)) + (the float (/ (the-as int (car (cdr (cdr s5-0)))) 8)) + (the float (/ (the-as int (car (cdr (cdr (cdr s5-0))))) 8)) + ) + ) + ) + (if a0-2 + (add-data! + a0-2 + (new 'static 'res-tag :name 'name :key-frame -1000000000.0 :elt-count #x1 :elt-type string) + (the-as pointer (car s5-0)) + ) + ) + ) + (set! arg0 (cdr arg0)) + (set! s5-0 (car arg0)) + ) + ) + 0 + (none) + ) + +;; definition (debug) for function process-status-bits +;; WARN: Return type mismatch int vs none. +(defun-debug process-status-bits ((arg0 process) (arg1 symbol)) + (let* ((s5-0 arg0) + (s3-0 (if (type? s5-0 process-drawable) + (the-as process-drawable s5-0) + ) + ) + ) + (if (and s3-0 (zero? (-> s3-0 draw))) + (set! s3-0 (the-as process-drawable #f)) + ) + (let ((s5-1 format) + (s4-0 "~C~C~C") + (a2-0 (if (and arg0 (not (logtest? (-> *kernel-context* prevent-from-run) (-> arg0 mask))) (run-logic? arg0)) + 114 + 32 + ) + ) + (a3-0 (if (and s3-0 (logtest? (-> s3-0 draw status) (draw-control-status on-screen))) + 100 + 32 + ) + ) + (t0-0 (cond + ((and s3-0 (logtest? (-> s3-0 draw status) (draw-control-status on-screen))) + (let ((v1-14 (-> s3-0 draw cur-lod))) + (cond + ((zero? v1-14) + 48 + ) + ((= v1-14 1) + 49 + ) + ((= v1-14 2) + 50 + ) + ((= v1-14 3) + 51 + ) + ((= v1-14 4) + 52 + ) + ) + ) + ) + (else + 32 + ) + ) + ) + ) + (s5-1 arg1 s4-0 a2-0 a3-0 t0-0) + ) + ) + 0 + (none) + ) + +;; definition for function process-entity-set! +(defun process-entity-set! ((arg0 process) (arg1 entity)) + (set! (-> arg0 entity) (the-as entity-actor arg1)) + (if arg1 + (set! (-> arg0 level) (-> arg1 extra level)) + (set! (-> arg0 level) (-> *level* level-default)) + ) + arg1 + ) + +;; definition for function process-task-mask +(defun process-task-mask ((arg0 process)) + (-> arg0 level task-mask) + ) + +;; definition for method 2 of type process +(defmethod print ((this process)) + (cond + ((and (-> this top-thread) (!= (-> this status) 'dead)) + (format + #t + "#<~A ~S ~A :state ~S :flags " + (-> this type) + (-> this name) + (-> this status) + (if (-> this state) + (-> this state name) + ) + ) + (process-status-bits this #t) + (format + #t + " :stack ~D/~D :heap ~D/~D @ #x~X>" + (&- (-> this top-thread stack-top) (the-as uint (-> this top-thread sp))) + (-> this main-thread stack-size) + (- (-> this allocated-length) (&- (-> this heap-top) (the-as uint (-> this heap-cur)))) + (-> this allocated-length) + this + ) + ) + (else + (format + #t + "#<~A ~S ~A :state ~S @ #x~X" + (-> this type) + (-> this name) + (-> this status) + (if (-> this state) + (-> this state name) + ) + this + ) + ) + ) + this + ) + +;; definition for method 3 of type entity +(defmethod inspect ((this entity)) + (call-parent-method this) + (format #t "~Ttrans: ~`vector`P~%" (-> this trans)) + (format #t "~Taid: ~D~%" (-> this aid)) + this + ) + +;; definition for method 3 of type entity-nav-mesh +(defmethod inspect ((this entity-nav-mesh)) + (call-parent-method this) + (format #t "~Tnav-mesh ~A~%" (-> this nav-mesh)) + (if (and (-> this nav-mesh) (nonzero? (-> this nav-mesh))) + (inspect (-> this nav-mesh)) + ) + this + ) + +;; definition for method 3 of type entity-actor +(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)) + (let ((s5-0 (-> this kill-mask))) + (if (= (logand s5-0 (task-mask task0)) (task-mask task0)) + (format #t "task0 ") + ) + (if (= (logand s5-0 (task-mask task2)) (task-mask task2)) + (format #t "task2 ") + ) + (if (= (logand s5-0 (task-mask task4)) (task-mask task4)) + (format #t "task4 ") + ) + (if (= (logand s5-0 (task-mask task6)) (task-mask task6)) + (format #t "task6 ") + ) + (if (= (logand s5-0 (task-mask ctywide)) (task-mask ctywide)) + (format #t "ctywide ") + ) + (if (= (logand s5-0 (task-mask never)) (task-mask never)) + (format #t "never ") + ) + (if (= (logand (task-mask movie1) s5-0) (task-mask movie1)) + (format #t "movie1 ") + ) + (if (= (logand s5-0 (task-mask vehicle)) (task-mask vehicle)) + (format #t "vehicle ") + ) + (if (= (logand s5-0 (task-mask dummy1)) (task-mask dummy1)) + (format #t "dummy1 ") + ) + (if (= (logand s5-0 (task-mask primary0)) (task-mask primary0)) + (format #t "primary0 ") + ) + (if (= (logand s5-0 (task-mask task1)) (task-mask task1)) + (format #t "task1 ") + ) + (if (= (logand s5-0 (task-mask task3)) (task-mask task3)) + (format #t "task3 ") + ) + (if (= (logand s5-0 (task-mask task5)) (task-mask task5)) + (format #t "task5 ") + ) + (if (= (logand s5-0 (task-mask task7)) (task-mask task7)) + (format #t "task7 ") + ) + (if (= (logand (task-mask movie2) s5-0) (task-mask movie2)) + (format #t "movie2 ") + ) + (if (= (logand s5-0 (task-mask done)) (task-mask done)) + (format #t "done ") + ) + (if (= (logand s5-0 (task-mask special)) (task-mask special)) + (format #t "special ") + ) + (if (= (logand (task-mask movie0) s5-0) (task-mask movie0)) + (format #t "movie0 ") + ) + (if (= (logand s5-0 (task-mask dummy0)) (task-mask dummy0)) + (format #t "dummy0 ") + ) + ) + (format #t ")~%") + (format #t "~Tvis-id: ~d~%" (-> this vis-id)) + (format #t "~Tquat: ~`vector`P~%" (-> this quat)) + this + ) + +;; definition for method 29 of type entity-actor +;; WARN: Return type mismatch entity-actor vs none. +(defmethod debug-print ((this entity-actor) (arg0 symbol) (arg1 type)) + (let ((s4-0 (-> this etype))) + (when (or (not arg1) (and s4-0 (valid? s4-0 type (the-as string #f) #f 0) (type-type? s4-0 arg1))) + (format #t "~5D #x~8X ~-26S" (-> this extra vis-id) this (res-lump-struct this 'name structure)) + (let ((t9-4 format) + (a0-5 #t) + (a1-5 "~8D ~3D ~-8S #x~4X") + (a2-4 (-> this extra perm aid)) + (a3-3 (-> this extra perm task)) + (t0-3 (-> this extra level nickname)) + ) + (set! t0-3 (cond + (t0-3 + (empty) + t0-3 + ) + (else + (-> this extra level name) + ) + ) + ) + (t9-4 a0-5 a1-5 a2-4 a3-3 t0-3 (-> this extra perm status)) + ) + (if (= arg0 'entity-meters) + (format #t " :trans ~14m ~14m ~14m " (-> this extra trans x) (-> this extra trans y) (-> this extra trans z)) + (format + #t + " :trans ~11,,1f ~11,,1f ~11,,1f " + (-> this extra trans x) + (-> this extra trans y) + (-> this extra trans z) + ) + ) + (let* ((s3-2 (-> this extra process)) + (s4-2 (if (type? s3-2 process-drawable) + s3-2 + ) + ) + ) + (format + #t + ":pr #x~8X ~-18S ~-5S/~-5S " + (if (-> this extra process) + (-> this extra process) + 0 + ) + (if (and (-> this extra process) (-> this extra process state)) + (-> this extra process state name) + "" + ) + (if (-> this extra process) + (* (- (-> this extra process allocated-length) + (&- (-> this extra process heap-top) (the-as uint (-> this extra process heap-cur))) + ) + 8 + ) + "" + ) + (if (-> this extra process) + (* (-> this extra process allocated-length) 8) + "" + ) + ) + (process-status-bits s4-2 #t) + ) + (format #t "~%") + (if (= arg0 'entity-perm) + (format #t " ~`entity-perm`P~%" (-> this extra perm)) + ) + ) + ) + (none) + ) + +;; definition for method 14 of type level-group +;; WARN: Return type mismatch int vs none. +(defmethod debug-print-entities ((this level-group) (arg0 symbol) (arg1 type) (arg2 string)) + (let ((t9-0 format) + (a0-1 #t) + (a1-1 + " id address name aid tsk lev status x y z address state heap flags~%" + ) + ) + 0 + 0 + 0 + (t9-0 a0-1 a1-1) + ) + (dotimes (s2-0 (-> this length)) + (let ((s1-0 (-> this level s2-0))) + (when (= (-> s1-0 status) 'active) + (when (or (not arg2) (= arg2 (-> s1-0 name))) + (case arg0 + (('art-group) + (format #t "level ~A~%" (-> s1-0 name)) + (dotimes (s0-0 (-> s1-0 art-group art-group-array length)) + (format #t "~T~2D ~S~%" s0-0 (-> s1-0 art-group art-group-array s0-0 name)) + ) + ) + (else + (let ((s1-1 (-> s1-0 bsp level entity))) + (dotimes (s0-1 (-> s1-1 length)) + (debug-print (the-as entity-actor (-> s1-1 data s0-1 entity)) arg0 arg1) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 24 of type entity-actor +;; INFO: Used lq/sq +;; WARN: Return type mismatch entity-actor vs none. +(defmethod add-to-level! ((this entity-actor) (arg0 level-group) (arg1 level) (arg2 actor-id)) + (let ((v1-4 (-> arg1 entity data (-> arg1 entity length)))) + (+! (-> arg1 entity length) 1) + (set! (-> v1-4 process) #f) + (set! (-> v1-4 entity) this) + (set! (-> this extra) v1-4) + (cond + ((-> arg0 entity-link) + (let* ((a0-6 (-> arg0 entity-link)) + (t0-1 (-> a0-6 next-link)) + ) + (set! (-> a0-6 next-link) v1-4) + (set! (-> v1-4 prev-link) a0-6) + (set! (-> v1-4 next-link) t0-1) + (set! (-> t0-1 prev-link) v1-4) + ) + ) + (else + (set! (-> v1-4 prev-link) v1-4) + (set! (-> v1-4 next-link) v1-4) + ) + ) + (set! (-> arg0 entity-link) v1-4) + (set! (-> v1-4 trans quad) (-> this trans quad)) + ) + (set! (-> this extra perm aid) arg2) + (set! (-> this extra level) arg1) + (set! (-> this extra kill-mask) + (logior (logand (-> this kill-mask) + (task-mask + task0 + task1 + task2 + task3 + task4 + task5 + task6 + task7 + done + dummy0 + dummy1 + vehicle + special + primary0 + ctywide + never + ) + ) + (logclear + (task-mask movie0 movie1 movie2 tm19 tm20 tm21 tm22 tm23 tm24 tm25 tm26 tm27 tm28 tm29 tm30 tm31) + (-> this kill-mask) + ) + ) + ) + (if (not (-> arg1 vis-info 0)) + (set! (-> this extra vis-dist) (res-lump-float this 'vis-dist :default 40960000.0)) + ) + (cond + ((= (-> this type) entity-actor) + (set! (-> this extra perm task) (-> this task)) + (set! (-> this extra vis-id) (-> this vis-id)) + ) + (else + (set! (-> this extra perm task) (game-task none)) + (set! (-> this extra vis-id) 0) + 0 + ) + ) + (none) + ) + +;; definition for method 25 of type entity +(defmethod remove-from-level! ((this entity) (arg0 level-group)) + (let ((v1-0 (-> this extra))) + (cond + ((= (-> v1-0 next-link) v1-0) + (set! (-> arg0 entity-link) #f) + ) + (else + (set! (-> v1-0 next-link prev-link) (-> v1-0 prev-link)) + (set! (-> v1-0 prev-link next-link) (-> v1-0 next-link)) + (if (= (-> arg0 entity-link) v1-0) + (set! (-> arg0 entity-link) (-> v1-0 prev-link)) + ) + ) + ) + ) + this + ) + +;; definition for function update-actor-vis-box +;; WARN: Return type mismatch int vs none. +(defun update-actor-vis-box ((arg0 process-drawable) (arg1 vector) (arg2 vector)) + (when (and arg0 (nonzero? (-> arg0 draw)) (not (logtest? (-> arg0 draw status) (draw-control-status no-draw)))) + (let ((v1-5 (-> arg0 draw origin)) + (f0-0 (-> arg0 draw bounds w)) + ) + (set! (-> arg1 x) (fmin (-> arg1 x) (- (-> v1-5 x) f0-0))) + (set! (-> arg1 y) (fmin (-> arg1 y) (- (-> v1-5 y) f0-0))) + (set! (-> arg1 z) (fmin (-> arg1 z) (- (-> v1-5 z) f0-0))) + (set! (-> arg2 x) (fmax (-> arg2 x) (+ (-> v1-5 x) f0-0))) + (set! (-> arg2 y) (fmax (-> arg2 y) (+ (-> v1-5 y) f0-0))) + (set! (-> arg2 z) (fmax (-> arg2 z) (+ (-> v1-5 z) f0-0))) + ) + ) + 0 + (none) + ) + +;; definition for method 23 of type level-group +;; WARN: Return type mismatch int vs none. +(defmethod update-vis-volumes ((this level-group)) + (local-vars (sv-16 (inline-array vector)) (sv-20 vector) (sv-24 vector) (sv-28 process)) + (dotimes (s5-0 (-> this length)) + (let ((v1-3 (-> this level s5-0))) + (when (= (-> v1-3 status) 'active) + (let ((s4-0 (-> v1-3 bsp level entity))) + (dotimes (s3-0 (-> s4-0 length)) + (let ((s2-0 (-> s4-0 data s3-0 entity))) + (set! sv-16 (res-lump-data s2-0 'visvol (inline-array vector))) + (set! sv-20 (-> sv-16 0)) + (set! sv-24 (-> sv-16 1)) + (let ((s2-1 (-> s2-0 extra process))) + (set! sv-28 (if (type? s2-1 process-drawable) + s2-1 + ) + ) + ) + ) + (when sv-28 + (update-actor-vis-box (the-as process-drawable sv-28) sv-20 sv-24) + (let ((s2-2 (-> sv-28 child))) + (while s2-2 + (let ((s1-0 update-actor-vis-box) + (s0-0 (-> s2-2 0)) + ) + (s1-0 + (the-as process-drawable (if (type? s0-0 process-drawable) + s0-0 + ) + ) + sv-20 + sv-24 + ) + ) + (set! s2-2 (-> s2-2 0 brother)) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function expand-bounding-box +;; WARN: Return type mismatch int vs none. +(defun expand-bounding-box ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector)) + (set! (-> arg0 x) (fmin (-> arg0 x) (-> arg2 x))) + (set! (-> arg0 y) (fmin (-> arg0 y) (-> arg2 y))) + (set! (-> arg0 z) (fmin (-> arg0 z) (-> arg2 z))) + (set! (-> arg1 x) (fmax (-> arg1 x) (-> arg3 x))) + (set! (-> arg1 y) (fmax (-> arg1 y) (-> arg3 y))) + (set! (-> arg1 z) (fmax (-> arg1 z) (-> arg3 z))) + 0 + (none) + ) + +;; definition for function expand-bounding-box-from-nav-meshes +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs object. +(defun expand-bounding-box-from-nav-meshes ((arg0 entity) (arg1 vector) (arg2 vector)) + (local-vars (sv-16 res-tag)) + (set! sv-16 (new 'static 'res-tag)) + (res-lump-data arg0 'nav-mesh-actor pointer :tag-ptr (& sv-16)) + (dotimes (s3-0 (the-as int (-> sv-16 elt-count))) + (let ((a0-3 (nav-mesh-from-res-tag arg0 'nav-mesh-actor s3-0))) + (when a0-3 + (let ((s2-0 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'vector)) + ) + (compute-bounding-box-from-vertices a0-3 s2-0 s1-0) + (expand-bounding-box arg1 arg2 s2-0 s1-0) + ) + ) + ) + ) + #f + ) + +;; definition for method 24 of type level-group +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod level-group-method-24 ((this level-group)) + (local-vars + (sv-16 (inline-array vector)) + (sv-20 vector) + (sv-24 vector) + (sv-28 float) + (sv-32 float) + (sv-36 vector) + (sv-40 entity) + (sv-48 res-tag) + ) + (dotimes (s5-0 (-> this length)) + (let ((v1-3 (-> this level s5-0))) + (when (= (-> v1-3 status) 'active) + (let ((s4-0 (-> v1-3 bsp level entity))) + (dotimes (s3-0 (-> s4-0 length)) + (let ((s2-0 (-> s4-0 data s3-0 entity))) + (set! sv-16 (res-lump-data s2-0 'visvol (inline-array vector))) + (set! sv-20 (-> sv-16 0)) + (set! sv-24 (-> sv-16 1)) + (set! sv-28 (the-as float -12288.0)) + (set! sv-32 (the-as float 12288.0)) + (set! sv-36 (-> s2-0 extra trans)) + (set! sv-40 s2-0) + (let ((v1-17 (entity-actor-lookup s2-0 'nav-mesh-actor 0))) + (if v1-17 + (set! sv-40 v1-17) + ) + ) + ) + (cond + ((type? sv-40 entity-actor) + (let ((enemy-option (res-lump-value sv-40 'enemy-options enemy-option :time -1000000000.0))) + (cond + ((logtest? (enemy-option spawner) (the-as uint128 enemy-option)) + (set! (-> sv-20 quad) (-> sv-36 quad)) + (set! (-> sv-24 quad) (-> sv-36 quad)) + (set! sv-28 (the-as float -409.6)) + (set! sv-32 (the-as float 409.6)) + ) + ((string-prefix= "battle" (res-lump-struct sv-40 'name string)) + (set! (-> sv-20 quad) (-> sv-36 quad)) + (set! (-> sv-24 quad) (-> sv-36 quad)) + (set! sv-48 (new 'static 'res-tag)) + (let ((v1-29 (res-lump-data sv-40 'actor-groups (pointer actor-group) :tag-ptr (& sv-48)))) + (when (and v1-29 (nonzero? (-> sv-48 elt-count))) + (let* ((s2-2 (-> v1-29 0)) + (s1-1 (-> s2-2 length)) + ) + (dotimes (s0-0 s1-1) + (let ((a0-26 (-> s2-2 data s0-0 actor))) + (expand-bounding-box-from-nav-meshes a0-26 sv-20 sv-24) + ) + ) + ) + ) + ) + ) + (else + (expand-bounding-box-from-nav-meshes sv-40 sv-20 sv-24) + ) + ) + ) + ) + (else + (set! (-> sv-20 quad) (-> sv-36 quad)) + (set! (-> sv-24 quad) (-> sv-36 quad)) + ) + ) + (+! (-> sv-20 x) sv-28) + (+! (-> sv-20 y) sv-28) + (+! (-> sv-20 z) sv-28) + (+! (-> sv-24 x) sv-32) + (+! (-> sv-24 y) sv-32) + (+! (-> sv-24 z) sv-32) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 25 of type level-group +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod print-volume-sizes ((this level-group)) + (local-vars + (sv-16 (inline-array vector)) + (sv-20 float) + (sv-24 vector) + (sv-28 type) + (sv-32 vector) + (sv-36 vector) + (sv-48 int) + (sv-64 entity) + (sv-80 string) + ) + (let ((s5-0 0)) + (dotimes (v1-0 (-> this length)) + (let ((a0-4 (-> this level v1-0))) + (if (= (-> a0-4 status) 'active) + (+! s5-0 (-> a0-4 entity length)) + ) + ) + ) + (let ((s4-0 (the-as string #f))) + (while (nonzero? s5-0) + 0 + (let ((s2-0 (the-as string #f)) + (s3-0 (the-as entity #f)) + ) + (dotimes (s1-0 (-> this length)) + (let ((v1-7 (-> this level s1-0))) + (when (= (-> v1-7 status) 'active) + (let ((s0-0 (-> v1-7 entity))) + (set! sv-48 (-> s0-0 length)) + (while (nonzero? sv-48) + (set! sv-48 (+ sv-48 -1)) + (set! sv-64 (-> s0-0 data sv-48 entity)) + (set! sv-80 (res-lump-struct sv-64 'name string)) + (when (and (or (not s4-0) (string>? sv-80 s4-0)) (or (not s2-0) (string (the-as entity-actor s3-0) extra trans)) + (set! sv-28 (if (type? s3-0 entity-actor) + (-> (the-as entity-actor s3-0) etype) + (the-as type #f) + ) + ) + (set! sv-32 (-> sv-16 0)) + (set! sv-36 (-> sv-16 1)) + (format #t "actor-vis ~S ~6,,1M " (res-lump-struct s3-0 'name structure) sv-20) + (format + #t + "~6,,1M ~6,,1M ~6,,1M ~6,,1M ~6,,1M ~6,,1M~%" + (- (-> sv-32 x) (-> sv-24 x)) + (- (-> sv-32 y) (-> sv-24 y)) + (- (-> sv-32 z) (-> sv-24 z)) + (- (-> sv-36 x) (-> sv-24 x)) + (- (-> sv-36 y) (-> sv-24 y)) + (- (-> sv-36 z) (-> sv-24 z)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function expand-vis-box-with-point +;; WARN: Return type mismatch int vs none. +(defun expand-vis-box-with-point ((arg0 entity) (arg1 vector)) + (let ((v1-1 (res-lump-data arg0 'visvol (inline-array vector)))) + (when v1-1 + (let ((a0-2 (-> v1-1 0)) + (v1-2 (-> v1-1 1)) + ) + (set! (-> a0-2 x) (fmin (-> a0-2 x) (-> arg1 x))) + (set! (-> a0-2 y) (fmin (-> a0-2 y) (-> arg1 y))) + (set! (-> a0-2 z) (fmin (-> a0-2 z) (-> arg1 z))) + (set! (-> v1-2 x) (fmax (-> v1-2 x) (-> arg1 x))) + (set! (-> v1-2 y) (fmax (-> v1-2 y) (-> arg1 y))) + (set! (-> v1-2 z) (fmax (-> v1-2 z) (-> arg1 z))) + ) + ) + ) + 0 + (none) + ) + +;; definition of type debug-actor-info +(deftype debug-actor-info (basic) + ((name string) + (handle handle) + (process process) + (pid int32) + ) + ) + +;; definition for method 3 of type debug-actor-info +(defmethod inspect ((this debug-actor-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Thandle: ~D~%" (-> this handle)) + (format #t "~1Tprocess: ~A~%" (-> this process)) + (format #t "~1Tpid: ~D~%" (-> this pid)) + (label cfg-4) + this + ) + +;; definition for symbol *debug-actor-info*, type debug-actor-info +(define *debug-actor-info* (new 'static 'debug-actor-info :name #f)) + +;; definition for symbol *pid-string*, type string +(define *pid-string* (new 'global 'string 128 (the-as string #f))) + +;; definition (debug) for function debug-actor +;; WARN: Return type mismatch int vs none. +(defun-debug debug-actor ((arg0 string)) + (let ((gp-0 *debug-actor-info*)) + (set! (-> gp-0 name) #f) + (set! (-> gp-0 handle) (the-as handle #f)) + (cond + ((string-prefix= "pid " arg0) + (let ((s4-0 (length arg0))) + (when (< 4 s4-0) + (clear *pid-string*) + (catn-string<-charp *pid-string* (&-> arg0 data 4) (+ s4-0 -4)) + (set! (-> gp-0 pid) (string->int *pid-string*)) + ) + ) + (let ((gp-1 (lambda ((arg0 process)) (let ((v1-0 *debug-actor-info*)) + (when (= (-> arg0 pid) (-> v1-0 pid)) + (let ((v0-0 (process->handle arg0))) + (set! (-> v1-0 handle) (the-as handle v0-0)) + v0-0 + ) + ) + ) + ) + ) + ) + (iterate-process-tree *pusher-pool* gp-1 *null-kernel-context*) + (iterate-process-tree *entity-pool* gp-1 *null-kernel-context*) + ) + ) + (else + (set! (-> gp-0 name) arg0) + ) + ) + ) + 0 + (none) + ) + +;; definition (debug) for function debug-actor-process +;; WARN: Return type mismatch int vs none. +(defun-debug debug-actor-process ((arg0 process)) + (let ((v1-0 *debug-actor-info*)) + (set! (-> v1-0 handle) (process->handle arg0)) + ) + (none) + ) + +;; definition (debug) for function draw-actor-marks +;; WARN: Return type mismatch int vs none. +(defun-debug draw-actor-marks ((arg0 process)) + (local-vars (sv-16 entity-actor) (sv-20 (pointer int32))) + (b! + (not (and (or (type? arg0 process-drawable) (= (-> arg0 type) part-tracker) (type? arg0 part-spawner)) + (nonzero? (-> (the-as process-drawable arg0) root)) + ) + ) + cfg-51 + :delay (nop!) + ) + (when (type? arg0 process-drawable) + (when (and (-> (the-as process-drawable arg0) nav) (nonzero? (-> (the-as process-drawable arg0) nav))) + (if (= arg0 *debug-actor*) + (debug-draw (-> (the-as process-drawable arg0) nav)) + ) + ) + (if (nonzero? (-> (the-as process-drawable arg0) path)) + (debug-draw (-> (the-as process-drawable arg0) path)) + ) + (if (nonzero? (-> (the-as process-drawable arg0) vol)) + (debug-draw (-> (the-as process-drawable arg0) vol)) + ) + (if (and (nonzero? (-> (the-as process-drawable arg0) draw)) *display-actor-vis*) + (add-debug-sphere + #t + (bucket-id debug) + (-> (the-as process-drawable arg0) draw origin) + (-> (the-as process-drawable arg0) draw bounds w) + (new 'static 'rgba :r #x80 :a #x80) + ) + ) + ) + (add-debug-x + #t + (bucket-id debug-no-zbuf1) + (-> (the-as process-drawable arg0) root trans) + (new 'static 'rgba :r #x80 :g #xff :b #x80 :a #x80) + ) + (set! sv-16 (-> arg0 entity)) + (cond + ((and sv-16 (= (-> sv-16 extra process) arg0)) + (add-debug-text-3d + #t + (bucket-id debug-no-zbuf1) + (res-lump-struct sv-16 'name string) + (-> (the-as process-drawable arg0) root trans) + (if (logtest? (-> sv-16 extra perm status) (entity-perm-status bit-0 error)) + (font-color red) + (font-color white) + ) + (new 'static 'vector2h :y 8) + ) + (set! sv-20 (res-lump-data sv-16 'eco-info (pointer int32) :time 0.0)) + (when sv-20 + (let ((s5-1 add-debug-text-3d) + (s4-1 #t) + (s3-1 577) + ) + (format (clear *temp-string*) "~S ~D~%" (pickup-type->string (the-as pickup-type (-> sv-20 0))) (-> sv-20 1)) + (s5-1 + s4-1 + (the-as bucket-id s3-1) + *temp-string* + (-> (the-as process-drawable arg0) root trans) + (font-color white) + (new 'static 'vector2h :y 24) + ) + ) + ) + (let ((a0-23 (res-lump-struct sv-16 'art-name string))) + (if (and a0-23 (logtest? (the-as int a0-23) 1)) + (add-debug-text-3d + #t + (bucket-id debug-no-zbuf1) + (symbol->string-debug (the-as symbol a0-23)) + (-> (the-as process-drawable arg0) root trans) + (font-color white) + (new 'static 'vector2h :y 24) + ) + ) + ) + (when *display-actor-vis* + (let ((v1-56 (res-lump-data sv-16 'visvol (inline-array vector))) + (a1-14 (-> sv-16 extra vis-id)) + ) + (if v1-56 + (add-debug-box + #t + (bucket-id debug-no-zbuf1) + (-> v1-56 0) + (-> v1-56 1) + (if (is-object-visible? (-> sv-16 extra level) a1-14) + (new 'static 'rgba :g #x80 :b #x80 :a #x80) + (new 'static 'rgba :r #x80 :b #x80 :a #x80) + ) + ) + ) + ) + ) + ) + (else + (let ((s5-4 add-debug-text-3d) + (s4-4 #t) + (s3-4 577) + ) + (format (clear *temp-string*) "pid ~d" (-> arg0 pid)) + (s5-4 + s4-4 + (the-as bucket-id s3-4) + *temp-string* + (-> (the-as process-drawable arg0) root trans) + (font-color green) + (new 'static 'vector2h :y 8) + ) + ) + ) + ) + (add-debug-text-3d + #t + (bucket-id debug-no-zbuf1) + (if (-> arg0 state) + (symbol->string-debug (-> arg0 state name)) + "#f" + ) + (-> (the-as process-drawable arg0) root trans) + (font-color white) + (new 'static 'vector2h :y 16) + ) + (label cfg-51) + 0 + (none) + ) + +;; definition for method 15 of type level-group +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw-actors ((this level-group) (arg0 symbol)) + (local-vars + (sv-16 symbol) + (sv-20 vector) + (sv-32 int) + (sv-48 (function symbol bucket-id vector vector rgba symbol)) + (sv-64 symbol) + (sv-80 int) + (sv-96 pointer) + (sv-112 pointer) + (sv-128 int) + ) + (let ((s4-0 *debug-actor-info*)) + (set! (-> s4-0 process) #f) + (if (zero? (-> s4-0 handle pid)) + (set! (-> s4-0 handle) + (logior (logand (-> s4-0 handle) (shl (the-as uint #xffffffff) 32)) (shr (shl (the-as int #f) 32) 32)) + ) + ) + (let ((v1-7 (handle->process (-> s4-0 handle)))) + (when (not v1-7) + (when (-> s4-0 name) + (let ((s3-0 (process-by-name (-> s4-0 name) *active-pool*))) + (set! v1-7 (if (type? s3-0 process-drawable) + s3-0 + ) + ) + ) + (set! (-> s4-0 handle) (process->handle v1-7)) + ) + ) + (set! (-> s4-0 process) v1-7) + ) + (set! *debug-actor* (-> s4-0 process)) + ) + (set! sv-16 arg0) + (when (and sv-16 (not (or (= *master-mode* 'menu) (= *master-mode* 'progress)))) + (cond + ((= sv-16 'process) + (let ((s5-1 draw-actor-marks)) + (iterate-process-tree *pusher-pool* s5-1 *null-kernel-context*) + (iterate-process-tree *entity-pool* s5-1 *null-kernel-context*) + ) + ) + (else + (dotimes (s5-2 (-> this length)) + (let ((v1-21 (-> this level s5-2))) + (when (= (-> v1-21 status) 'active) + (let ((s4-1 (-> v1-21 bsp level entity))) + (dotimes (s3-1 (-> s4-1 length)) + (let ((s2-0 (-> s4-1 data s3-1 entity))) + (set! sv-20 (-> s2-0 extra trans)) + (when (or (= sv-16 'full) (-> s2-0 extra process)) + (add-debug-x #t (bucket-id debug-no-zbuf1) sv-20 (if (-> s2-0 extra process) + (new 'static 'rgba :r #x80 :g #xff :b #x80 :a #x80) + (new 'static 'rgba :r #xff :a #x80) + ) + ) + (when (< (vector-vector-distance (math-camera-pos) sv-20) 491520.0) + (let ((s1-1 add-debug-text-3d) + (s0-0 #t) + ) + (set! sv-32 577) + (let ((a2-4 (res-lump-struct s2-0 'name structure)) + (a3-2 sv-20) + (t0-1 (if (logtest? (-> s2-0 extra perm status) (entity-perm-status bit-0 error)) + 1 + 5 + ) + ) + (t1-1 (new 'static 'vector2h :y 8)) + ) + (s1-1 s0-0 (the-as bucket-id sv-32) (the-as string a2-4) a3-2 (the-as font-color t0-1) t1-1) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (when (and *display-actor-vis* (not *debug-actor*)) + (let ((s5-3 *display-actor-vis*)) + (dotimes (s4-2 (-> this length)) + (let ((s3-2 (-> this level s4-2))) + (when (= (-> s3-2 status) 'active) + (let ((s2-1 (-> s3-2 bsp level entity))) + (dotimes (s1-2 (-> s2-1 length)) + (let ((s0-1 (-> s2-1 data s1-2 entity))) + (let ((v0-9 (res-lump-data s0-1 'visvol pointer)) + (a1-16 (-> s0-1 extra vis-id)) + ) + (when (and v0-9 (or (= s5-3 #t) (= s5-3 'box))) + (set! sv-48 add-debug-box) + (set! sv-64 #t) + (set! sv-80 577) + (set! sv-96 (&+ v0-9 0)) + (set! sv-112 (&+ v0-9 16)) + (let ((t0-3 (if (is-object-visible? s3-2 a1-16) + (the-as uint #x80808000) + (the-as uint #x80800080) + ) + ) + ) + (sv-48 sv-64 (the-as bucket-id sv-80) (the-as vector sv-96) (the-as vector sv-112) (the-as rgba t0-3)) + ) + ) + ) + (when (or (= s5-3 #t) (= s5-3 'sphere)) + (let ((s0-2 (-> s0-1 extra process))) + (when s0-2 + (when (and (type? s0-2 process-drawable) (nonzero? (-> (the-as process-drawable s0-2) draw))) + (add-debug-x + #t + (bucket-id debug-no-zbuf1) + (-> (the-as process-drawable s0-2) root trans) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + ) + (add-debug-sphere + #t + (bucket-id debug) + (-> (the-as process-drawable s0-2) draw origin) + (-> (the-as process-drawable s0-2) draw bounds w) + (new 'static 'rgba :r #x80 :a #x80) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (if *generate-actor-vis* + (update-vis-volumes this) + ) + (cond + (*debug-actor* + (let* ((s4-3 *debug-actor*) + (s5-4 (if (type? s4-3 process-drawable) + (the-as process-drawable s4-3) + ) + ) + ) + (when s5-4 + (if (nonzero? (-> s5-4 skel)) + (debug-print-channels (-> s5-4 skel) (the-as symbol *stdcon*)) + ) + (when (and (nonzero? (-> s5-4 nav)) (-> s5-4 nav) *display-nav-marks*) + (let ((s4-4 (-> s5-4 nav state flags))) + (if (= (logand s4-4 (nav-state-flag in-target-poly)) (nav-state-flag in-target-poly)) + (format *stdcon* "in-target-poly ") + ) + (if (= (logand s4-4 (nav-state-flag directional-mode)) (nav-state-flag directional-mode)) + (format *stdcon* "directional-mode ") + ) + (if (= (logand s4-4 (nav-state-flag initialized)) (nav-state-flag initialized)) + (format *stdcon* "initialized ") + ) + (if (= (logand s4-4 (nav-state-flag display-marks)) (nav-state-flag display-marks)) + (format *stdcon* "display-marks ") + ) + (if (= (logand s4-4 (nav-state-flag recovery-mode)) (nav-state-flag recovery-mode)) + (format *stdcon* "recovery-mode ") + ) + (if (= (logand s4-4 (nav-state-flag touching-sphere)) (nav-state-flag touching-sphere)) + (format *stdcon* "touching-sphere ") + ) + (if (= (logand s4-4 (nav-state-flag trapped-by-sphere)) (nav-state-flag trapped-by-sphere)) + (format *stdcon* "trapped-by-sphere ") + ) + (if (= (logand s4-4 (nav-state-flag blocked)) (nav-state-flag blocked)) + (format *stdcon* "blocked ") + ) + (if (= (logand s4-4 (nav-state-flag avoiding-sphere)) (nav-state-flag avoiding-sphere)) + (format *stdcon* "avoiding-sphere ") + ) + (if (= (logand s4-4 (nav-state-flag target-inside)) (nav-state-flag target-inside)) + (format *stdcon* "target-inside ") + ) + (if (= (logand s4-4 (nav-state-flag debug)) (nav-state-flag debug)) + (format *stdcon* "debug ") + ) + (if (= (logand s4-4 (nav-state-flag at-gap)) (nav-state-flag at-gap)) + (format *stdcon* "at-gap ") + ) + (if (= (logand s4-4 (nav-state-flag use-position)) (nav-state-flag use-position)) + (format *stdcon* "user-position ") + ) + (if (= (logand s4-4 (nav-state-flag in-mesh)) (nav-state-flag in-mesh)) + (format *stdcon* "in-mesh ") + ) + (if (= (logand s4-4 (nav-state-flag at-target)) (nav-state-flag at-target)) + (format *stdcon* "at-target ") + ) + (if (= (logand s4-4 (nav-state-flag target-poly-dirty)) (nav-state-flag target-poly-dirty)) + (format *stdcon* "target-poly-dirty ") + ) + ) + (format *stdcon* "~%") + ) + (when *display-joint-axes* + (if (and (type? s5-4 process-drawable) (nonzero? (-> s5-4 draw))) + (draw-joint-axes s5-4) + ) + ) + (draw-actor-marks s5-4) + ) + ) + ) + (*display-nav-mesh* + (dotimes (s5-5 (-> this length)) + (let ((v1-145 (-> this level s5-5))) + (when (= (-> v1-145 status) 'active) + (let ((s4-5 (-> v1-145 bsp nav-meshes))) + (when (nonzero? s4-5) + (dotimes (s3-3 (-> s4-5 length)) + (let ((s2-2 (-> s4-5 s3-3))) + (if (name= *display-nav-mesh* (res-lump-struct s2-2 'name structure)) + (debug-draw s2-2) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (else + (when *display-nav-marks* + (dotimes (s5-6 (-> this length)) + (let ((v1-163 (-> this level s5-6))) + (when (= (-> v1-163 status) 'active) + (let ((s4-6 (-> v1-163 bsp nav-meshes))) + (when (nonzero? s4-6) + (dotimes (s3-4 (-> s4-6 length)) + (debug-draw (-> s4-6 s3-4)) + ) + ) + ) + ) + ) + ) + ) + (if (or *display-path-marks* *display-vol-marks*) + (iterate-process-tree + *active-pool* + (lambda ((arg0 process)) (when (type? arg0 process-drawable) + (if (nonzero? (-> (the-as process-drawable arg0) path)) + (debug-draw (-> (the-as process-drawable arg0) path)) + ) + (if (nonzero? (-> (the-as process-drawable arg0) vol)) + (debug-draw (-> (the-as process-drawable arg0) vol)) + ) + ) + ) + *null-kernel-context* + ) + ) + ) + ) + (when (and *display-actor-graph* (not (or (= *master-mode* 'menu) (= *master-mode* 'progress)))) + (if (not (paused?)) + (float-save-timeplot (if (< (the int (the float (mod (current-time) 600))) 300) + 1.0 + 0.0 + ) + ) + ) + (camera-plot-float-func + 0.0 + 399.0 + -81920.0 + 81920.0 + float-lookup-redline + (new 'static 'vector4w :x #xff :w #x80) + ) + (camera-plot-float-func + 0.0 + 399.0 + -81920.0 + 81920.0 + float-lookup-blueline + (new 'static 'vector4w :z #xff :w #x80) + ) + (camera-plot-float-func + 0.0 + 399.0 + -81920.0 + 81920.0 + float-lookup-greenline + (new 'static 'vector4w :y #xff :w #x80) + ) + (camera-plot-float-func + 0.0 + 399.0 + 0.0 + 409600.0 + float-lookup-yellowline + (new 'static 'vector4w :x #xff :y #xff :w #x80) + ) + (camera-plot-float-func + 0.0 + 399.0 + 0.0 + 1.0 + float-lookup-timeplot + (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) + ) + ) + (when *display-split-boxes* + (dotimes (s5-7 (-> this length)) + (let ((v1-193 (-> this level s5-7))) + (when (= (-> v1-193 status) 'active) + (let ((s4-7 (-> v1-193 bsp region-tree))) + (when (nonzero? s4-7) + (let* ((s3-5 (-> s4-7 data2 (+ (-> s4-7 length) -1) length)) + (s2-3 0) + (a0-113 (the-as object (+ (+ (* s2-3 32) 32) (the-as int (-> s4-7 data2 (+ (-> s4-7 length) -1)))))) + ) + (while (< s2-3 s3-5) + (debug-draw-region (the-as drawable-region-prim a0-113) 0) + (+! s2-3 1) + (set! a0-113 (+ (+ (* s2-3 32) 32) (the-as int (-> s4-7 data2 (+ (-> s4-7 length) -1))))) + ) + ) + ) + ) + ) + ) + ) + ) + (when *display-region-marks* + (dotimes (s5-8 (-> this length)) + (let ((s4-8 (-> this level s5-8))) + (when (= (-> s4-8 status) 'active) + (when (nonzero? (-> s4-8 bsp region-trees)) + (let* ((s3-6 (-> s4-8 bsp region-trees length)) + (s2-4 0) + (s1-4 (-> s4-8 bsp region-trees s2-4)) + ) + (while (< s2-4 s3-6) + (let ((s0-4 (-> s1-4 data2 (+ (-> s1-4 length) -1) length))) + (set! sv-128 0) + (let ((a0-128 (the-as object (+ (+ (* sv-128 32) 32) (the-as int (-> s1-4 data2 (+ (-> s1-4 length) -1))))))) + (while (< sv-128 s0-4) + (debug-draw-region (the-as drawable-region-prim a0-128) 0) + (set! sv-128 (+ sv-128 1)) + (set! a0-128 (+ (+ (* sv-128 32) 32) (the-as int (-> s1-4 data2 (+ (-> s1-4 length) -1))))) + ) + ) + ) + (+! s2-4 1) + (set! s1-4 (-> s4-8 bsp region-trees s2-4)) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 22 of type entity-camera +(defmethod birth! ((this entity-camera)) + (add-connection *camera-engine* *camera* nothing this #f #f) + this + ) + +;; definition for method 23 of type entity-camera +(defmethod kill! ((this entity-camera)) + (remove-by-param1 *camera-engine* (the-as int this)) + this + ) + +;; definition for function init-entity +;; WARN: Return type mismatch process vs none. +(defun init-entity ((arg0 process) (arg1 entity-actor) (arg2 type)) + (activate arg0 *entity-pool* (res-lump-struct arg1 'name string) (the-as pointer #x70004000)) + (set! (-> arg0 entity) arg1) + (set! (-> arg0 level) (-> arg1 extra level)) + (set! (-> arg1 extra process) arg0) + (run-now-in-process arg0 (method-of-object arg0 init-from-entity!) arg0 arg1) + (none) + ) + +;; definition for method 22 of type entity-actor +(defmethod birth! ((this entity-actor)) + (let* ((s5-0 (-> this etype)) + (v1-0 (entity-info-lookup s5-0)) + (s4-0 (get-process + *default-dead-pool* + s5-0 + (if v1-0 + (-> v1-0 heap-size) + #x4000 + ) + 0 + ) + ) + ) + (cond + ((not s4-0) + ) + ((begin + (set! (-> s4-0 type) s5-0) + (and s5-0 + (valid? s5-0 type (the-as string #f) #f 0) + (valid? (method-of-object s4-0 init-from-entity!) function (the-as string #f) #f 0) + ) + ) + (init-entity s4-0 this s5-0) + ) + (else + (when (not (birth-viewer s4-0 this)) + (format 0 "ERROR: no proper process type named ~A exists in the code, could not start ~A~%" s5-0 this) + (logior! (-> this extra perm status) (entity-perm-status bit-0)) + ) + ) + ) + ) + this + ) + +;; definition for function entity-deactivate-handler +;; WARN: Return type mismatch symbol vs none. +(defun entity-deactivate-handler ((arg0 process) (arg1 entity-actor)) + (when (= arg0 (-> arg1 extra process)) + (logclear! (-> arg1 extra perm status) (entity-perm-status error no-kill)) + (set! (-> arg1 extra process) #f) + ) + (none) + ) + +;; definition for method 23 of type entity-actor +(defmethod kill! ((this entity-actor)) + (let ((a0-1 (-> this extra process))) + (if a0-1 + (deactivate a0-1) + (entity-deactivate-handler a0-1 this) + ) + ) + this + ) + +;; definition for method 17 of type bsp-header +;; INFO: Used lq/sq +;; WARN: Return type mismatch bsp-header vs none. +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 s5, Count] +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count] +(defmethod birth ((this bsp-header)) + (local-vars (v1-75 int) (s5-0 int) (sv-16 int)) + (.mfc0 s5-0 Count) + (let ((a2-0 (if (nonzero? (-> this actors)) + (-> this actors length) + 0 + ) + ) + ) + (cond + ((not (-> this level entity)) + (set! (-> this level entity) (new 'loading-level 'entity-links-array a2-0)) + ) + ((< (-> this level entity allocated-length) a2-0) + (format + 0 + "ERROR: Attempting to rebirth level ~A with incorrect entity table size ~D/~D~%" + (-> this level) + a2-0 + (-> this level entity allocated-length) + ) + ) + ) + ) + (set! (-> this level entity length) 0) + 0 + (when (nonzero? (-> this actors)) + (dotimes (s4-0 (-> this actors length)) + (let* ((a0-4 (-> this actor-birth-order s4-0)) + (v1-23 (-> this actors data (logand a0-4 8191) actor)) + ) + (add-to-level! v1-23 *level* (-> this level) (the-as actor-id (-> v1-23 aid))) + ) + ) + ) + (let ((s4-1 (-> this cameras))) + (when (nonzero? s4-1) + (dotimes (s3-0 (-> s4-1 length)) + (birth! (-> s4-1 s3-0)) + ) + ) + ) + (let ((s4-2 (-> this level status))) + (set! (-> this level status) 'active) + (do-nothing *level*) + (dotimes (s3-1 (-> *level* length)) + (let ((s2-0 (-> *level* level s3-1))) + (when (= (-> s2-0 status) 'active) + (when (nonzero? (-> s2-0 bsp actor-groups)) + (countdown (s1-0 (-> s2-0 bsp actor-groups length)) + (let ((s0-0 (-> s2-0 bsp actor-groups s1-0))) + (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) (the-as entity-actor (entity-by-aid (-> s0-0 data sv-16 id)))) + ) + (set! sv-16 (+ sv-16 1)) + ) + ) + ) + ) + ) + ) + ) + (set! (-> this level status) s4-2) + ) + (.mfc0 v1-75 Count) + (let ((a3-2 (- v1-75 s5-0))) + (format 0 "Done ~S in ~D~%" "birth" a3-2) + ) + (none) + ) + +;; definition for function check-for-rougue-process +;; WARN: Return type mismatch int vs none. +(defun check-for-rougue-process ((arg0 process) (arg1 int) (arg2 int) (arg3 level)) + (cond + ((-> arg0 entity) + (cond + ((or (= (-> arg0 level) arg3) (= (-> arg0 entity extra level) arg3)) + (format #t "NOTICE: rogue level entity ~A still alive~%" arg0) + (deactivate arg0) + ) + ((let ((v1-9 (-> arg0 name))) + (and (>= (the-as int v1-9) arg1) (< (the-as int v1-9) arg2)) + ) + (format #t "NOTICE: rogue level entity ~A still alive~%" arg0) + (deactivate arg0) + ) + ((and (logtest? (-> arg0 entity extra kill-mask) (task-mask ctywide)) + (or (= (-> arg3 name) 'ctywide) (= (-> arg3 name) 'waswide)) + ) + (format #t "NOTICE: rogue level entity ~A still alive~%" arg0) + (deactivate arg0) + ) + ((and (logtest? (-> arg0 entity extra kill-mask) (task-mask vehicle)) + (or (= (-> arg3 name) 'ctywide) (= (-> arg3 name) 'wasall)) + ) + (format #t "NOTICE: rogue level entity ~A still alive~%" arg0) + (deactivate arg0) + ) + ((and (logtest? (-> arg0 entity extra kill-mask) (task-mask primary0)) + (logtest? (-> arg3 info base-task-mask) (task-mask primary0)) + ) + (format #t "NOTICE: rogue level entity ~A still alive~%" arg0) + (deactivate arg0) + ) + ) + ) + ((= (-> arg0 level) arg3) + (format #t "NOTICE: rogue level entity ~A still alive~%" arg0) + (deactivate arg0) + ) + ((= (-> arg0 type) part-tracker) + (let ((v1-45 (the-as part-tracker arg0))) + (if (and (nonzero? (-> v1-45 part)) + (>= (the-as int (-> v1-45 part group)) arg1) + (< (the-as int (-> v1-45 part group)) arg2) + ) + (deactivate arg0) + ) + ) + ) + ((type? arg0 part-spawner) + (let ((v1-50 (the-as part-spawner arg0))) + (if (and (nonzero? (-> v1-50 part)) + (>= (the-as int (-> v1-50 part group)) arg1) + (< (the-as int (-> v1-50 part group)) arg2) + ) + (deactivate arg0) + ) + ) + ) + (else + (let* ((s3-0 arg0) + (v1-55 (if (type? s3-0 process-drawable) + s3-0 + ) + ) + ) + (when v1-55 + (cond + ((and (nonzero? (-> (the-as process-drawable v1-55) part)) + (>= (the-as int (-> (the-as process-drawable v1-55) part group)) arg1) + (< (the-as int (-> (the-as process-drawable v1-55) part group)) arg2) + ) + (format + #t + "NOTICE: rogue null level entity (using part ~A) ~A still alive~%" + (-> (the-as process-drawable v1-55) part group) + arg0 + ) + (deactivate arg0) + ) + ((and (nonzero? (-> (the-as process-drawable v1-55) draw)) + (>= (the-as int (-> (the-as process-drawable v1-55) draw art-group)) arg1) + (< (the-as int (-> (the-as process-drawable v1-55) draw art-group)) arg2) + ) + (format + #t + "NOTICE: rogue null level entity (using art ~A) ~A still alive~%" + (-> (the-as process-drawable v1-55) draw art-group) + arg0 + ) + (deactivate arg0) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 18 of type bsp-header +;; WARN: Return type mismatch bsp-header vs none. +(defmethod deactivate-entities ((this bsp-header)) + (let ((v1-1 (-> this level heap base)) + (a0-2 (-> this level heap top-base)) + ) + (when (nonzero? (-> this actor-groups)) + (dotimes (a1-2 (-> this actor-groups length)) + (let ((a2-2 (-> this actor-groups a1-2))) + (dotimes (a3-1 (-> a2-2 length)) + (let ((t0-2 (-> a2-2 data a3-1 actor))) + (if (and t0-2 (not (and (>= (the-as int t0-2) (the-as int v1-1)) (< (the-as int t0-2) (the-as int a0-2))))) + (set! (-> a2-2 data a3-1 actor) #f) + ) + ) + ) + ) + ) + ) + (dotimes (a1-5 (-> *level* length)) + (let ((a2-10 (-> *level* level a1-5))) + (when (= (-> a2-10 status) 'active) + (when (!= a2-10 (-> this level)) + (when (nonzero? (-> a2-10 bsp actor-groups)) + (dotimes (a3-10 (-> a2-10 bsp actor-groups length)) + (let ((t0-13 (-> a2-10 bsp actor-groups a3-10))) + (dotimes (t1-2 (-> t0-13 length)) + (let ((t2-3 (-> t0-13 data t1-2 actor))) + (if (and t2-3 (>= (the-as int t2-3) (the-as int v1-1)) (< (the-as int t2-3) (the-as int a0-2))) + (set! (-> t0-13 data t1-2 actor) #f) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let ((s5-0 (-> this actors))) + (when (nonzero? s5-0) + (dotimes (s4-0 (-> s5-0 length)) + (let ((s3-0 (-> s5-0 data s4-0 actor))) + (kill! s3-0) + (remove-from-level! s3-0 *level*) + ) + ) + ) + ) + (let ((s5-1 (-> this cameras))) + (when (nonzero? s5-1) + (dotimes (s4-1 (-> s5-1 length)) + (kill! (-> s5-1 s4-1)) + ) + ) + ) + (let ((v1-23 (-> this level heap base)) + (a0-7 (-> this level heap top-base)) + (s5-2 (lambda ((arg0 process)) (check-for-rougue-process + arg0 + (-> *kernel-context* relocating-min) + (-> *kernel-context* relocating-max) + (-> *kernel-context* relocating-level) + ) + ) + ) + ) + (set! (-> *kernel-context* relocating-min) (the-as int v1-23)) + (set! (-> *kernel-context* relocating-max) (the-as int a0-7)) + (set! (-> *kernel-context* relocating-level) (-> this level)) + (iterate-process-tree *pusher-pool* s5-2 *null-kernel-context*) + (iterate-process-tree *entity-pool* s5-2 *null-kernel-context*) + (iterate-process-tree *default-pool* s5-2 *null-kernel-context*) + ) + (let ((s5-3 (-> this nav-meshes))) + (when (nonzero? s5-3) + (dotimes (s4-2 (-> s5-3 length)) + (kill! (-> s5-3 s4-2)) + ) + ) + ) + (none) + ) + +;; definition for function process-drawable-scale-from-entity! +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun process-drawable-scale-from-entity! ((arg0 process-drawable) (arg1 entity)) + (let ((v1-1 (res-lump-struct arg1 'scale vector))) + (if v1-1 + (set! (-> arg0 root scale quad) (-> v1-1 quad)) + (vector-identity! (-> arg0 root scale)) + ) + ) + 0 + (none) + ) + +;; definition for function process-drawable-from-entity! +;; INFO: Used lq/sq +;; WARN: Return type mismatch process-drawable vs none. +(defun process-drawable-from-entity! ((arg0 process-drawable) (arg1 entity-actor)) + (logior! (-> arg0 mask) (process-mask actor-pause)) + (set! (-> arg0 root trans quad) (-> arg1 extra trans quad)) + (quaternion-copy! (-> arg0 root quat) (-> arg1 quat)) + (vector-identity! (-> arg0 root scale)) + (none) + ) + +;; definition for method 9 of type entity-perm +(defmethod update ((this entity-perm) (arg0 symbol) (arg1 entity-perm-status)) + (cond + ((= arg0 'game) + (logclear! (-> this status) arg1) + ) + ((task-complete? *game-info* (-> this task)) + (if (or (= arg0 'try) (= arg0 'life)) + (logclear! (-> this status) (logior (if (logtest? (-> this status) (entity-perm-status bit-4)) + 524 + 0 + ) + #x8203 + ) + ) + (logclear! (-> this status) (logior (if (logtest? (-> this status) (entity-perm-status bit-4)) + 524 + 0 + ) + 515 + ) + ) + ) + ) + (else + (logclear! (-> this status) (logclear + (logior arg1 (if (logtest? (-> this status) (entity-perm-status bit-4)) + 524 + 0 + ) + ) + (if (logtest? (-> this status) (entity-perm-status bit-14)) + 32 + 0 + ) + ) + ) + ) + ) + (when (not (logtest? (-> this status) (entity-perm-status bit-5))) + (set! (-> this user-uint64) (the-as uint 0)) + 0 + ) + this + ) + +;; definition for function reset-actors +;; WARN: Return type mismatch int vs none. +(defun reset-actors ((arg0 symbol)) + (let* ((v1-0 arg0) + (perm + (cond + ((or (= v1-0 'life) (= v1-0 'debug)) + (the-as + entity-perm-status + (entity-perm-status bit-0 error dead no-kill bit-5 subtask-complete bit-9 bit-12 bit-15) + ) + ) + ((= v1-0 'try) + (the-as + entity-perm-status + (entity-perm-status bit-0 error dead no-kill bit-5 subtask-complete bit-9 bit-12 bit-15) + ) + ) + ((= v1-0 'game) + (the-as entity-perm-status (entity-perm-status + bit-0 + error + dead + no-kill + bit-4 + bit-5 + subtask-complete + complete + bit-9 + bit-10 + save + bit-12 + bit-13 + bit-15 + ) + ) + ) + (else + (the-as + entity-perm-status + (entity-perm-status bit-0 error dead no-kill bit-4 bit-5 subtask-complete bit-9 bit-10 bit-12 bit-15) + ) + ) + ) + ) + (s4-0 *game-info*) + ) + (dotimes (s3-0 (-> *level* length)) + (let ((v1-4 (-> *level* level s3-0))) + (when (or (= (-> v1-4 status) 'active) (= (-> v1-4 status) 'alive) (= (-> v1-4 status) 'loaded)) + (when (-> v1-4 part-engine) + (set! (-> v1-4 part-engine length) 0) + 0 + ) + (when (-> v1-4 entity) + (let ((s2-0 (-> v1-4 bsp level entity))) + (dotimes (s1-0 (-> s2-0 length)) + (let ((s0-0 (-> s2-0 data s1-0 entity))) + (if (not (and (-> s0-0 extra process) (logtest? (-> s0-0 extra process mask) (process-mask no-kill)))) + (kill! s0-0) + ) + (update (-> s0-0 extra perm) arg0 (the-as entity-perm-status perm)) + ) + ) + ) + ) + ) + ) + ) + (let ((s3-1 (-> s4-0 task-perm-list))) + (dotimes (s2-1 (-> s3-1 length)) + (update (-> s3-1 data s2-1) arg0 (the-as entity-perm-status perm)) + ) + (logior! (-> s3-1 data 1 status) (entity-perm-status complete)) + ) + (let ((s4-1 (-> s4-0 perm-list))) + (dotimes (s3-2 (-> s4-1 length)) + (update (-> s4-1 data s3-2) arg0 (the-as entity-perm-status perm)) + ) + ) + ) + (let ((s5-1 (lambda ((arg0 process)) (if (not (logtest? (-> arg0 mask) (process-mask no-kill))) + (deactivate arg0) + ) + ) + ) + ) + (iterate-process-tree *pusher-pool* s5-1 *null-kernel-context*) + (iterate-process-tree *entity-pool* s5-1 *null-kernel-context*) + ) + (if #t + (task-node-reset arg0) + ) + (dotimes (s5-2 (-> *level* length)) + (let ((s4-2 (-> *level* level s5-2))) + (when (= (-> s4-2 status) 'active) + (let ((s3-3 (the-as (function level none) (get-callback-symbol-value-by-slot! (-> s4-2 info) 35)))) + (if (and s3-3 (type? s3-3 function)) + (s3-3 s4-2) + ) + ) + ) + ) + ) + (set! (-> *ACTOR-bank* birth-max) 1000) + (update-task-masks arg0) + 0 + (none) + ) + +;; definition for function reset-cameras +;; WARN: Return type mismatch int vs none. +(defun reset-cameras () + (remove-all *camera-engine*) + (dotimes (gp-0 (-> *level* length)) + (let ((v1-5 (-> *level* level gp-0))) + (when (= (-> v1-5 status) 'active) + (let ((s5-0 (-> v1-5 bsp cameras))) + (when (nonzero? s5-0) + (dotimes (s4-0 (-> s5-0 length)) + (birth! (-> s5-0 s4-0)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 12 of type process-drawable +(defmethod run-logic? ((this process-drawable)) + "Should this process be run? Checked by execute-process-tree." + (or (not (logtest? (-> this mask) (process-mask actor-pause))) + (or (>= (+ (-> *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 9 of type entity-links +(defmethod birth? ((this entity-links) (arg0 vector)) + (and (not (logtest? (-> this perm status) (entity-perm-status bit-0 dead))) + (< (vector-vector-distance (-> this trans) arg0) (-> *ACTOR-bank* birth-dist)) + ) + ) + +;; definition for method 17 of type level-group +;; INFO: Used lq/sq +;; ERROR: Stack slot load at 96 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 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 96 mismatch: defined as size 4, got size 16 +;; WARN: Return type mismatch int vs none. +;; WARN: Function (method 17 level-group) has a return type of none, but the expression builder found a return statement. +(defmethod actors-update ((this level-group)) + (local-vars + (sv-16 vector) + (sv-24 int) + (sv-32 task-mask) + (sv-48 entity-links) + (sv-64 string) + (sv-80 string) + (sv-96 float) + ) + (when *compact-actors* + (if (and (= *compact-actors* 'debug) (= (-> *nk-dead-pool* alive-list prev) (-> *nk-dead-pool* first-gap))) + (churn *nk-dead-pool* 1) + ) + (let ((s5-0 + (the int + (lerp-scale 8.0 1.0 (the float (-> *display* frames (-> *display* last-screen) run-time)) 2000.0 8000.0) + ) + ) + ) + (if (nonzero? *debug-dead-pool*) + (compact *debug-dead-pool* 10) + ) + (compact *nk-dead-pool* s5-0) + ) + ) + (update-actor-hash) + (when (not (paused?)) + (let ((s5-1 (-> *display* frames (-> *display* last-screen) run-time))) + (let ((f0-5 (fmax + 327680.0 + (fmin (+ 327680.0 (* 204.8 (the float (- 7000 (the-as int s5-1))))) (-> *ACTOR-bank* birth-dist)) + ) + ) + ) + (seek! (-> *ACTOR-bank* pause-dist) f0-5 (* 81920.0 (seconds-per-frame))) + ) + (seekl! (-> *ACTOR-bank* birth-max) (the int (lerp-scale 25.0 2.0 (the float s5-1) 2000.0 7000.0)) 10) + ) + (if (movie?) + (set! (-> *ACTOR-bank* birth-max) 1000) + ) + ) + (when *spawn-actors* + (set! sv-16 (if (movie?) + (math-camera-pos) + (camera-pos) + ) + ) + (set! sv-24 0) + (dotimes (s5-2 (-> this length)) + (let ((s4-1 (-> this level s5-2))) + (when (= (-> s4-1 status) 'active) + (set! sv-32 (-> s4-1 task-mask)) + (cond + ((= (-> s4-1 display?) 'special) + (let* ((s4-2 (-> s4-1 entity)) + (s3-1 (-> s4-2 length)) + ) + (dotimes (s2-0 s3-1) + (let ((v1-53 (-> s4-2 data s2-0))) + (cond + ((and (logtest? (-> v1-53 kill-mask) (task-mask special)) (not (logtest? (-> v1-53 kill-mask) sv-32))) + (when (not (or (-> v1-53 process) (logtest? (-> v1-53 perm status) (entity-perm-status bit-0 dead)))) + (birth! (-> v1-53 entity)) + (set! sv-24 (+ sv-24 1)) + (if (>= sv-24 (-> *ACTOR-bank* birth-max)) + (return #f) + ) + ) + ) + (else + (if (and (-> v1-53 process) + (not (logtest? (-> v1-53 perm status) (entity-perm-status no-kill))) + (not (logtest? (-> v1-53 process mask) (process-mask no-kill))) + ) + (kill! (-> v1-53 entity)) + ) + ) + ) + ) + ) + ) + ) + ((= (-> s4-1 display?) 'actor) + (let* ((s4-3 (-> s4-1 entity)) + (s3-2 (-> s4-3 length)) + ) + (dotimes (s2-1 s3-2) + (let ((v1-66 (-> s4-3 data s2-1))) + (cond + ((not (logtest? (-> v1-66 kill-mask) sv-32)) + (when (not (or (-> v1-66 process) (logtest? (-> v1-66 perm status) (entity-perm-status bit-0 dead)))) + (birth! (-> v1-66 entity)) + (set! sv-24 (+ sv-24 1)) + (if (>= sv-24 (-> *ACTOR-bank* birth-max)) + (return #f) + ) + ) + ) + (else + (if (and (-> v1-66 process) + (not (logtest? (-> v1-66 perm status) (entity-perm-status no-kill))) + (not (logtest? (-> v1-66 process mask) (process-mask no-kill))) + ) + (kill! (-> v1-66 entity)) + ) + ) + ) + ) + ) + ) + ) + ((not *vis-actors*) + (let* ((s4-4 (-> s4-1 entity)) + (s3-3 (-> s4-4 length)) + ) + (dotimes (s2-2 s3-3) + (let ((s1-0 (-> s4-4 data s2-2))) + (cond + ((and (< (vector-vector-distance (-> s1-0 trans) sv-16) (-> *ACTOR-bank* birth-dist)) + (not (logtest? (-> s1-0 perm status) (entity-perm-status bit-9 bit-10))) + (not (logtest? (-> s1-0 kill-mask) sv-32)) + ) + (when (not (or (-> s1-0 process) (logtest? (-> s1-0 perm status) (entity-perm-status bit-0 dead)))) + (birth! (-> s1-0 entity)) + (set! sv-24 (+ sv-24 1)) + (if (>= sv-24 (-> *ACTOR-bank* birth-max)) + (return #f) + ) + ) + ) + (else + (if (and (-> s1-0 process) + (not (logtest? (-> s1-0 perm status) (entity-perm-status no-kill))) + (not (logtest? (-> s1-0 process mask) (process-mask no-kill))) + ) + (kill! (-> s1-0 entity)) + ) + ) + ) + ) + ) + ) + ) + (*vis-actors* + (when (not (and (-> s4-1 vis-info 0) (-> s4-1 all-visible?))) + (let* ((s3-4 (-> s4-1 entity)) + (s2-3 (-> s3-4 length)) + (s0-0 #f) + ) + (dotimes (s1-1 s2-3) + (set! sv-48 (-> s3-4 data s1-1)) + (cond + ((and (is-object-visible? s4-1 (-> sv-48 vis-id)) + (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))) + ) + (when (not (or (-> sv-48 process) (logtest? (-> sv-48 perm status) (entity-perm-status bit-0 dead)) s0-0)) + (birth! (-> sv-48 entity)) + (set! sv-24 (+ sv-24 1)) + (when (< (/ (the float (memory-free *nk-dead-pool*)) (the float (memory-total *nk-dead-pool*))) 0.1) + (when (and *debug-segment* (not *display-capture-mode*)) + (let ((s0-1 format)) + (set! sv-64 *stdcon*) + (set! sv-80 "low actor memory, no birth triggered!!! ~,,0fK/~,,0fK~%") + (set! sv-96 (* 0.0009765625 (the float (memory-free *nk-dead-pool*)))) + (let ((a3-2 (* 0.0009765625 (the float (memory-total *nk-dead-pool*))))) + (s0-1 sv-64 sv-80 sv-96 a3-2) + ) + ) + ) + (set! s0-0 #t) + ) + ) + ) + (else + (when (and (-> sv-48 process) + (not (logtest? (-> sv-48 perm status) (entity-perm-status no-kill))) + (not (logtest? (-> sv-48 process mask) (process-mask no-kill))) + ) + (kill! (-> sv-48 entity)) + (set! sv-24 (+ sv-24 1)) + ) + ) + ) + (if (>= sv-24 (-> *ACTOR-bank* birth-max)) + (return #f) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function entity-birth-no-kill +(defun entity-birth-no-kill ((arg0 entity)) + (let ((gp-0 (-> arg0 extra))) + (logior! (-> gp-0 perm status) (entity-perm-status no-kill)) + (if (not (or (-> gp-0 process) (logtest? (-> gp-0 perm status) (entity-perm-status bit-0 dead)))) + (birth! (-> gp-0 entity)) + ) + (-> gp-0 process) + ) + ) + +;; definition for function entity-task-complete-on +;; WARN: Return type mismatch int vs none. +(defun entity-task-complete-on ((arg0 entity)) + (let ((v1-0 (-> arg0 extra))) + (if (nonzero? (-> v1-0 perm task)) + (logior! (-> *game-info* task-perm-list data (-> v1-0 perm task) status) (entity-perm-status complete)) + ) + ) + 0 + (none) + ) + +;; definition for function entity-task-complete-off +;; WARN: Return type mismatch int vs none. +(defun entity-task-complete-off ((arg0 entity)) + (let ((v1-0 (-> arg0 extra))) + (if (!= (-> v1-0 perm task) (game-task complete)) + (logclear! (-> *game-info* task-perm-list data (-> v1-0 perm task) status) (entity-perm-status complete)) + ) + ) + 0 + (none) + ) + +;; definition for method 30 of type entity-actor +;; WARN: Return type mismatch entity-perm-status vs none. +(defmethod toggle-status ((this entity-actor) (arg0 entity-perm-status) (arg1 symbol)) + (let ((v1-0 (-> this extra))) + (if arg1 + (logior! (-> v1-0 perm status) arg0) + (logclear! (-> v1-0 perm status) arg0) + ) + (-> v1-0 perm status) + ) + (none) + ) + +;; definition for function process-entity-status! +;; WARN: Return type mismatch int vs entity-perm-status. +(defun process-entity-status! ((arg0 process) (arg1 entity-perm-status) (arg2 symbol)) + (the-as entity-perm-status (cond + ((and (-> arg0 entity) arg0 (= arg0 (-> arg0 entity extra process))) + (let ((v1-6 (-> arg0 entity extra))) + (if arg2 + (logior! (-> v1-6 perm status) arg1) + (logclear! (-> v1-6 perm status) arg1) + ) + (the-as int (-> v1-6 perm status)) + ) + ) + (else + 0 + ) + ) + ) + ) + +;; definition for function find-nearest-entity +;; WARN: Return type mismatch entity-actor vs entity. +(defun find-nearest-entity ((arg0 vector) (arg1 type)) + (local-vars (v1-8 object)) + (let ((gp-0 (the-as entity-actor #f))) + (let ((f30-0 0.0) + (f28-0 0.0) + ) + (dotimes (s3-0 (-> *level* length)) + (let ((v1-3 (-> *level* level s3-0))) + (when (= (-> v1-3 status) 'active) + (let ((s2-0 (-> v1-3 bsp actors))) + (when (nonzero? s2-0) + (dotimes (s1-0 (-> s2-0 length)) + (let ((s0-0 (-> s2-0 data s1-0 actor))) + (let ((v1-7 (or (not arg1) (type-type? (-> s0-0 etype) arg1)))) + (b! (not v1-7) cfg-15 :likely-delay (set! v1-8 v1-7)) + ) + (set! f28-0 (vector-vector-distance arg0 (-> s0-0 extra trans))) + (set! v1-8 f28-0) + (b! (not (the int v1-8)) cfg-15 :likely-delay (nop!)) + (set! v1-8 (or (not gp-0) (< f28-0 f30-0))) + (label cfg-15) + (when v1-8 + (set! gp-0 s0-0) + (set! f30-0 f28-0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (the-as entity gp-0) + ) + ) + +;; definition (debug) for function entity-speed-test +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 s4, Count] +(defun-debug entity-speed-test ((arg0 string)) + (local-vars (s4-0 int)) + (let ((gp-0 (entity-by-name arg0))) + (when gp-0 + (set! *spawn-actors* #f) + (reset-actors 'debug) + 0 + (disable-irq) + (.mtc0 Count 0) + (.sync.p) + (birth! gp-0) + (.mfc0 s4-0 Count) + (enable-irq) + (format #t "~D spawn ~A ~A ~%" s4-0 arg0 (-> gp-0 extra process)) + (kill! gp-0) + ) + ) + ) + +;; definition (debug) for function dump-entity-remap +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun-debug dump-entity-remap ((arg0 object) (arg1 object)) + (local-vars + (sv-16 symbol) + (sv-32 string) + (sv-48 symbol) + (sv-64 string) + (sv-80 symbol) + (sv-96 string) + (sv-112 string) + ) + (format #t "~%(:eval (remap-entity-list '(") + (dotimes (s4-0 (-> *level* length)) + (let ((s3-0 (-> *level* level s4-0))) + (when (= (-> s3-0 status) 'active) + (when (= (-> s3-0 name) arg0) + (let ((s2-0 (-> s3-0 bsp actors))) + (when (nonzero? s2-0) + (dotimes (s1-0 (-> s2-0 length)) + (let ((a0-4 (-> s2-0 data s1-0 actor)) + (s0-0 format) + ) + (set! sv-16 #t) + (set! sv-32 "~A ") + (let ((a2-1 (res-lump-struct a0-4 'name structure))) + (s0-0 sv-16 sv-32 a2-1) + ) + ) + ) + ) + ) + (let ((s2-1 (-> s3-0 bsp nav-meshes))) + (when (nonzero? s2-1) + (dotimes (s1-1 (-> s2-1 length)) + (let ((a0-6 (-> s2-1 s1-1)) + (s0-1 format) + ) + (set! sv-48 #t) + (set! sv-64 "~A ") + (let ((a2-3 (res-lump-struct a0-6 'name structure))) + (s0-1 sv-48 sv-64 a2-3) + ) + ) + ) + ) + ) + (let ((s2-2 (-> s3-0 bsp race-meshes))) + (when (nonzero? s2-2) + (dotimes (s1-2 (-> s2-2 length)) + (let ((a0-8 (-> s2-2 s1-2)) + (s0-2 format) + ) + (set! sv-80 #t) + (set! sv-96 "~A ") + (let ((a2-5 (res-lump-struct a0-8 'name structure))) + (s0-2 sv-80 sv-96 a2-5) + ) + ) + ) + ) + ) + (let ((s3-1 (-> s3-0 bsp cameras))) + (when (nonzero? s3-1) + (dotimes (s2-3 (-> s3-1 length)) + (let ((a0-10 (-> s3-1 s2-3)) + (s1-3 format) + (s0-3 #t) + ) + (set! sv-112 "~A ") + (let ((a2-7 (res-lump-struct a0-10 'name structure))) + (s1-3 s0-3 sv-112 a2-7) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (format #t ") '~A '~A))~%~%" arg0 arg1) + 0 + (none) + ) diff --git a/test/decompiler/reference/jak3/engine/entity/relocate_REF.gc b/test/decompiler/reference/jak3/engine/entity/relocate_REF.gc new file mode 100644 index 0000000000..51f27b86df --- /dev/null +++ b/test/decompiler/reference/jak3/engine/entity/relocate_REF.gc @@ -0,0 +1,446 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 7 of type process +(defmethod relocate ((this process) (offset int)) + (let ((v1-0 *kernel-context*)) + (set! (-> v1-0 relocating-process) this) + (set! (-> v1-0 relocating-min) (the-as int (&-> this type))) + (set! (-> v1-0 relocating-max) + (the-as int (+ (+ (-> this allocated-length) -4 (-> process size)) (the-as int this))) + ) + (set! (-> v1-0 relocating-offset) offset) + ) + (&+! (-> this ppointer 0) offset) + (let ((v1-5 (-> this entity))) + (if (and v1-5 (= (-> v1-5 extra process) this)) + (&+! (-> v1-5 extra process) offset) + ) + ) + (let ((v1-7 (-> this connection-list next1))) + (while (the-as connection v1-7) + (let ((a0-14 (-> v1-7 prev1))) + (if (and (>= (the-as int a0-14) (-> *kernel-context* relocating-min)) + (< (the-as int a0-14) (-> *kernel-context* relocating-max)) + ) + (&+! (-> v1-7 prev1) offset) + ) + ) + (let ((a0-19 (-> (the-as connection v1-7) param1))) + (if (and (>= (the-as int a0-19) (-> *kernel-context* relocating-min)) + (< (the-as int a0-19) (-> *kernel-context* relocating-max)) + ) + (&+! (-> (the-as connection v1-7) param1) offset) + ) + ) + (let ((a0-24 (-> (the-as connection v1-7) param2))) + (if (and (>= a0-24 (-> *kernel-context* relocating-min)) (< a0-24 (-> *kernel-context* relocating-max))) + (+! (-> (the-as connection v1-7) param2) offset) + ) + ) + (let ((a0-29 (-> (the-as connection v1-7) param3))) + (if (and (>= a0-29 (-> *kernel-context* relocating-min)) (< a0-29 (-> *kernel-context* relocating-max))) + (+! (-> (the-as connection v1-7) param3) offset) + ) + ) + (set! v1-7 (-> (the-as connection v1-7) next1)) + ) + ) + (let ((v1-10 (-> this self))) + (if (and (>= (the-as int v1-10) (-> *kernel-context* relocating-min)) + (< (the-as int v1-10) (-> *kernel-context* relocating-max)) + ) + (&+! (-> this self) offset) + ) + ) + (let ((v1-15 (-> this ppointer))) + (if (and (>= (the-as int v1-15) (-> *kernel-context* relocating-min)) + (< (the-as int v1-15) (-> *kernel-context* relocating-max)) + ) + (&+! (-> this ppointer) offset) + ) + ) + (let ((s4-0 (&+ (-> this heap-base) 4))) + (while (< (the-as int s4-0) (the-as int (-> this heap-cur))) + (relocate s4-0 offset) + (&+! s4-0 (logand -16 (+ (asize-of s4-0) 15))) + ) + ) + (&+! (-> this main-thread) offset) + (&+! (-> this top-thread) offset) + (if (-> this state-stack) + (&+! (-> this state-stack) offset) + ) + (&+! (-> this heap-base) offset) + (&+! (-> this heap-cur) offset) + (&+! (-> this heap-top) offset) + (let ((a2-4 (asize-of this)) + (a1-22 (&-> this type)) + ) + (cond + ((>= offset 0) + (qmem-copy->! (&+ a1-22 offset) a1-22 a2-4) + ) + ((< a2-4 2560) + (qmem-copy<-! (&+ a1-22 offset) a1-22 a2-4) + ) + (else + (ultimate-memcpy (&+ a1-22 offset) a1-22 (the-as uint a2-4)) + ) + ) + ) + (set! (-> *kernel-context* relocating-process) #f) + (&+ this offset) + ) + +;; definition for method 7 of type cpu-thread +(defmethod relocate ((this cpu-thread) (offset int)) + (&+! (-> this process) offset) + this + ) + +;; definition for method 7 of type process-drawable +;; WARN: Return type mismatch process vs process-drawable. +(defmethod relocate ((this process-drawable) (offset int)) + (let ((v1-0 *kernel-context*)) + (set! (-> v1-0 relocating-process) this) + (set! (-> v1-0 relocating-min) (the-as int (&-> this type))) + (set! (-> v1-0 relocating-max) + (the-as int (+ (+ (-> this allocated-length) -4 (-> process size)) (the-as int this))) + ) + (set! (-> v1-0 relocating-offset) offset) + ) + (let ((a0-6 (-> this nav))) + (if (and (nonzero? a0-6) a0-6) + (relocate a0-6 offset) + ) + ) + (if (nonzero? (-> this root)) + (&+! (-> this root) offset) + ) + (if (nonzero? (-> this node-list)) + (&+! (-> this node-list) offset) + ) + (if (nonzero? (-> this draw)) + (&+! (-> this draw) offset) + ) + (if (nonzero? (-> this skel)) + (&+! (-> this skel) offset) + ) + (if (nonzero? (-> this align)) + (&+! (-> this align) offset) + ) + (if (nonzero? (-> this path)) + (&+! (-> this path) offset) + ) + (if (nonzero? (-> this vol)) + (&+! (-> this vol) offset) + ) + (if (nonzero? (-> this fact)) + (&+! (-> this fact) offset) + ) + (if (nonzero? (-> this link)) + (&+! (-> this link) offset) + ) + (if (nonzero? (-> this part)) + (&+! (-> this part) offset) + ) + (if (nonzero? (-> this water)) + (&+! (-> this water) offset) + ) + (if (nonzero? (-> this sound)) + (&+! (-> this sound) offset) + ) + (if (nonzero? (-> this carry)) + (&+! (-> this carry) offset) + ) + (if (nonzero? (-> this rbody)) + (&+! (-> this rbody) offset) + ) + (the-as process-drawable ((method-of-type process relocate) this offset)) + ) + +;; definition for method 7 of type collide-shape +(defmethod relocate ((this collide-shape) (offset int)) + (&+! (-> this process) offset) + (&+! (-> this root-prim) offset) + this + ) + +;; definition for method 7 of type collide-shape-moving +;; WARN: Return type mismatch collide-shape vs collide-shape-moving. +(defmethod relocate ((this collide-shape-moving) (offset int)) + (if (-> this dynam) + (&+! (-> this dynam) offset) + ) + (the-as collide-shape-moving ((method-of-type collide-shape relocate) this offset)) + ) + +;; definition for method 7 of type collide-shape-prim +(defmethod relocate ((this collide-shape-prim) (offset int)) + (&+! (-> this cshape) offset) + this + ) + +;; definition for method 7 of type collide-shape-prim-group +(defmethod relocate ((this collide-shape-prim-group) (offset int)) + (&+! (-> this cshape) offset) + (&+! (-> this child) offset) + this + ) + +;; definition for method 7 of type fact-info +(defmethod relocate ((this fact-info) (offset int)) + (&+! (-> this process) offset) + this + ) + +;; definition for method 7 of type draw-control +(defmethod relocate ((this draw-control) (offset int)) + (&+! (-> this skeleton) offset) + (&+! (-> this process) offset) + (when (-> this ripple) + (if (-> this ripple query) + (&+! (-> this ripple query) offset) + ) + (&+! (-> this ripple) offset) + ) + (let ((v1-14 (-> this shadow-ctrl))) + (if (and (>= (the-as int v1-14) (-> *kernel-context* relocating-min)) + (< (the-as int v1-14) (-> *kernel-context* relocating-max)) + ) + (&+! (-> this shadow-ctrl) offset) + ) + ) + (when (-> this cloth-instances) + (dotimes (v1-21 (-> this cloth-instances length)) + (&+! (-> this cloth-instances v1-21) offset) + ) + (&+! (-> this cloth-instances) offset) + ) + this + ) + +;; definition for method 7 of type joint-control +(defmethod relocate ((this joint-control) (offset int)) + (if (-> this effect) + (&+! (-> this effect) offset) + ) + (if (-> this top-anim) + (&+! (-> this top-anim) offset) + ) + (&+! (-> this root-channel) offset) + (countdown (v1-10 (-> this allocated-length)) + (&+! (-> this channel v1-10 parent) offset) + ) + this + ) + +;; definition for method 7 of type cspace-array +(defmethod relocate ((this cspace-array) (offset int)) + (countdown (v1-0 (-> this length)) + (let ((a2-2 (-> this data v1-0))) + (if (-> a2-2 parent) + (&+! (-> a2-2 parent) offset) + ) + (&+! (-> a2-2 bone) offset) + (let ((a3-6 (-> a2-2 param1))) + (if (and (>= (the-as int a3-6) (-> *kernel-context* relocating-min)) + (< (the-as int a3-6) (-> *kernel-context* relocating-max)) + ) + (&+! (-> a2-2 param1) offset) + ) + ) + (let ((a3-11 (-> a2-2 param2))) + (if (and (>= (the-as int a3-11) (-> *kernel-context* relocating-min)) + (< (the-as int a3-11) (-> *kernel-context* relocating-max)) + ) + (&+! (-> a2-2 param2) offset) + ) + ) + ) + ) + this + ) + +;; definition for method 7 of type path-control +(defmethod relocate ((this path-control) (offset int)) + (&+! (-> this process) offset) + (let ((v1-2 (-> this curve cverts))) + (if (and (>= (the-as int v1-2) (-> *kernel-context* relocating-min)) + (< (the-as int v1-2) (-> *kernel-context* relocating-max)) + ) + (&+! (-> this curve cverts) offset) + ) + ) + this + ) + +;; definition for method 7 of type vol-control +(defmethod relocate ((this vol-control) (offset int)) + (&+! (-> this process) offset) + this + ) + +;; definition for method 7 of type water-control +(defmethod relocate ((this water-control) (offset int)) + (&+! (-> this process) offset) + this + ) + +;; definition for method 7 of type actor-link-info +(defmethod relocate ((this actor-link-info) (offset int)) + (&+! (-> this process) offset) + this + ) + +;; definition for method 7 of type align-control +(defmethod relocate ((this align-control) (offset int)) + (&+! (-> this process) offset) + this + ) + +;; definition for method 7 of type joint-mod +(defmethod relocate ((this joint-mod) (offset int)) + (&+! (-> this process) offset) + (&+! (-> this joint) offset) + this + ) + +;; definition for method 7 of type joint-mod-ik +(defmethod relocate ((this joint-mod-ik) (offset int)) + (&+! (-> this process) offset) + this + ) + +;; definition for method 7 of type effect-control +(defmethod relocate ((this effect-control) (offset int)) + (&+! (-> this process) offset) + this + ) + +;; definition for method 7 of type sparticle-launch-control +(defmethod relocate ((this sparticle-launch-control) (offset int)) + (&+! (-> this proc) offset) + (countdown (v1-2 (-> this length)) + (let* ((a0-4 (-> this data v1-2)) + (a2-0 (-> a0-4 center)) + ) + (if (and (>= (the-as int a2-0) (-> *kernel-context* relocating-min)) + (< (the-as int a2-0) (-> *kernel-context* relocating-max)) + ) + (&+! (-> a0-4 center) offset) + ) + ) + ) + (forall-particles-with-key + this + (lambda ((arg0 sparticle-system) (arg1 sparticle-cpuinfo)) + (let ((v1-1 (-> *kernel-context* relocating-offset))) + (set! (-> arg1 key) (the-as sparticle-launch-control (+ (the-as int (-> arg1 key)) v1-1))) + (if (-> arg1 binding) + (set! (-> arg1 binding) (the-as sparticle-launch-state (+ (the-as int (-> arg1 binding)) v1-1))) + ) + ) + 0 + (none) + ) + #t + #t + ) + this + ) + +;; definition for method 7 of type camera-master +;; WARN: Return type mismatch process vs camera-master. +(defmethod relocate ((this camera-master) (offset int)) + (if (nonzero? (-> this water-drip)) + (&+! (-> this water-drip) offset) + ) + (the-as camera-master ((method-of-type process relocate) this offset)) + ) + +;; definition for method 7 of type time-of-day-proc +;; WARN: Return type mismatch process vs time-of-day-proc. +(defmethod relocate ((this time-of-day-proc) (offset int)) + (if (nonzero? (-> this sun)) + (&+! (-> this sun) offset) + ) + (if (nonzero? (-> this green-sun)) + (&+! (-> this green-sun) offset) + ) + (if (nonzero? (-> this moon)) + (&+! (-> this moon) offset) + ) + (if (nonzero? (-> this day-star)) + (&+! (-> this day-star) offset) + ) + (the-as time-of-day-proc ((method-of-type process relocate) this offset)) + ) + +;; definition for method 7 of type part-tracker +;; WARN: Return type mismatch process vs part-tracker. +(defmethod relocate ((this part-tracker) (offset int)) + (if (nonzero? (-> this root)) + (&+! (-> this root) offset) + ) + (if (nonzero? (-> this part)) + (&+! (-> this part) offset) + ) + (the-as part-tracker ((method-of-type process relocate) this offset)) + ) + +;; definition for method 7 of type part-spawner +;; WARN: Return type mismatch process vs part-spawner. +(defmethod relocate ((this part-spawner) (offset int)) + (if (nonzero? (-> this root)) + (&+! (-> this root) offset) + ) + (if (nonzero? (-> this part)) + (&+! (-> this part) offset) + ) + (if (nonzero? (-> this path)) + (&+! (-> this path) offset) + ) + (if (nonzero? (-> this sound)) + (&+! (-> this sound) offset) + ) + (if (nonzero? (-> this sound-extra)) + (&+! (-> this sound-extra) offset) + ) + (the-as part-spawner ((method-of-type process relocate) this offset)) + ) + +;; definition for method 7 of type lightning-tracker +;; WARN: Return type mismatch process vs lightning-tracker. +(defmethod relocate ((this lightning-tracker) (offset int)) + (if (nonzero? (-> this root)) + (&+! (-> this root) offset) + ) + (if (nonzero? (-> this lightning)) + (&+! (-> this lightning) offset) + ) + (the-as lightning-tracker ((method-of-type process relocate) this offset)) + ) + +;; definition for method 7 of type manipy +;; WARN: Return type mismatch process-drawable vs manipy. +(defmethod relocate ((this manipy) (offset int)) + (if (nonzero? (-> this joint 0)) + (&+! (-> this joint 0) offset) + ) + (if (nonzero? (-> this joint 1)) + (&+! (-> this joint 1) offset) + ) + (if (nonzero? (-> this joint 2)) + (&+! (-> this joint 2) offset) + ) + (if (nonzero? (-> this joint 3)) + (&+! (-> this joint 3) offset) + ) + (the-as manipy ((method-of-type process-drawable relocate) this offset)) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/game/effect-control-h_REF.gc b/test/decompiler/reference/jak3/engine/game/effect-control-h_REF.gc index 26283b96c6..dd2ff3e94b 100644 --- a/test/decompiler/reference/jak3/engine/game/effect-control-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/game/effect-control-h_REF.gc @@ -16,11 +16,11 @@ (:methods (new (symbol type process-drawable) _type_) (effect-control-method-9 (_type_) none) - (do-effect (_type_ symbol float int) none) - (effect-control-method-11 () none) + (do-effect (_type_ string float int) none) + (do-effect-for-surface (_type_ symbol float int basic pat-surface) none) (play-effect-sound (_type_ symbol float int basic sound-name) int) (set-channel-offset! (_type_ int) none) - (effect-control-method-14 () none) + (play-effects-from-res-lump (_type_ float float float) 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 new file mode 100644 index 0000000000..c6270f699c --- /dev/null +++ b/test/decompiler/reference/jak3/engine/game/effect-control_REF.gc @@ -0,0 +1,1095 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *footstep-surface*, type pat-surface +(define *footstep-surface* (new 'static 'pat-surface :material (pat-material grass))) + +;; definition for symbol *debug-effect-control*, type symbol +(define *debug-effect-control* #f) + +;; definition for function sound-name-with-material +(defun sound-name-with-material ((arg0 string) (arg1 pat-surface) (arg2 string)) + (format + (clear *temp-string*) + "~S~S~S" + arg0 + (-> (new 'static 'boxed-array :type string + "-unk" + "-ice" + "-qsd" + "-wtr" + "-tar" + "-san" + "-wod" + "-grs" + "-pmt" + "-snw" + "-dsn" + "-unk" + "-lav" + "-cwd" + "-grv" + "-drt" + "-mtl" + "-str" + "-pmt" + "-swm" + "-unk" + "-mtl" + "-neu" + "-stn" + "-cmt" + "-car" + "-gmt" + "-smt" + "-hwd" + "-sqi" + "-mhm" + "-for" + "-mhs" + "-dma" + ) + (-> arg1 material) + ) + arg2 + ) + (string->sound-name *temp-string*) + ) + +;; definition for function effect-param->sound-spec +(defun effect-param->sound-spec ((arg0 sound-spec) (arg1 (pointer float)) (arg2 int) (arg3 process-focusable)) + (while (> arg2 0) + (case (the int (-> arg1 0)) + ((3) + (logior! (-> arg0 mask) (sound-mask volume)) + (set! (-> arg0 volume) (the int (* 1024.0 (-> arg1 1)))) + ) + ((4) + (logior! (-> arg0 mask) (sound-mask volume)) + (+! (-> arg0 volume) (the int (* 1024.0 (* (-> arg1 1) (rand-vu))))) + ) + ((5) + (logior! (-> arg0 mask) (sound-mask pitch)) + (set! (-> arg0 pitch-mod) (the int (* 1524.0 (-> arg1 1)))) + ) + ((6) + (logior! (-> arg0 mask) (sound-mask pitch)) + (+! (-> arg0 pitch-mod) (the int (* 1524.0 (* (-> arg1 1) (rand-vu))))) + ) + ((9) + (logior! (-> arg0 mask) (sound-mask bend)) + (set! (-> arg0 bend) (the int (* 327.66998 (-> arg1 1)))) + ) + ((10) + (logior! (-> arg0 mask) (sound-mask bend)) + (+! (-> arg0 bend) (the int (* 327.66998 (* (-> arg1 1) (rand-vu))))) + ) + ((11) + (logior! (-> arg0 mask) (sound-mask fo-min)) + (set! (-> arg0 fo-min) (the int (-> arg1 1))) + ) + ((12) + (logior! (-> arg0 mask) (sound-mask fo-max)) + (set! (-> arg0 fo-max) (the int (-> arg1 1))) + ) + ((13) + (logior! (-> arg0 mask) (sound-mask fo-curve)) + (set! (-> arg0 fo-curve) (the int (-> arg1 1))) + ) + ((19) + (set! (-> arg0 priority) (the int (-> arg1 1))) + ) + ((25) + (logior! (-> arg0 mask) (sound-mask reg0)) + (set! (-> arg0 reg 0) (the-as uint (-> *footstep-surface* material))) + (let* ((s2-3 arg3) + (v1-33 (if (type? s2-3 process-focusable) + s2-3 + ) + ) + ) + (when v1-33 + (cond + ((focus-test? v1-33 in-air) + (set! (-> arg0 reg 0) (the-as uint 126)) + ) + ((focus-test? v1-33 touch-water) + (set! (-> arg0 reg 0) (the-as uint 127)) + ) + (else + (let* ((s2-4 (-> v1-33 root)) + (v1-34 (if (type? s2-4 collide-shape-moving) + s2-4 + ) + ) + ) + (if v1-34 + (set! (-> arg0 reg 0) (the-as uint (-> (the-as collide-shape-moving v1-34) ground-pat material))) + ) + ) + ) + ) + ) + ) + ) + ((21) + (logior! (-> arg0 mask) (sound-mask reg0)) + (set! (-> arg0 reg 0) (the-as uint (the int (-> arg1 1)))) + ) + ((22) + (logior! (-> arg0 mask) (sound-mask reg1)) + (set! (-> arg0 reg 1) (the-as uint (the int (-> arg1 1)))) + ) + ((23) + (logior! (-> arg0 mask) (sound-mask reg2)) + (set! (-> arg0 reg 2) (the-as uint (the int (-> arg1 1)))) + ) + ) + (+! arg2 -2) + (set! arg1 (&-> arg1 2)) + ) + arg0 + ) + +;; definition for method 9 of type effect-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod effect-control-method-9 ((this effect-control)) + (let* ((a0-1 (-> this process skel)) + (v1-3 (if (< (the-as uint (-> this channel-offset)) (-> a0-1 active-channels)) + (-> a0-1 root-channel (-> this channel-offset)) + (the-as joint-control-channel #f) + ) + ) + ) + (cond + ((and v1-3 (-> v1-3 frame-group)) + (let* ((s5-0 (-> v1-3 frame-group)) + (f30-0 (+ (* (-> v1-3 frame-num) (-> s5-0 artist-step)) (-> s5-0 artist-base))) + ) + (let ((a0-3 (-> a0-1 root-channel 0 num-func))) + (cond + ((!= s5-0 (-> this last-frame-group)) + (set! (-> this res) (-> s5-0 extra)) + (let ((v1-6 (-> (lookup-tag-idx (-> s5-0 extra) 'effect-name 'base -1000000000.0) lo))) + (set! (-> this name) (if (>= (the-as int v1-6) 0) + (&-> (-> s5-0 extra tag) v1-6) + (the-as (pointer res-tag) #f) + ) + ) + ) + (if (and (-> this name) (= (-> this name 0 key-frame) -1000000000.0)) + (set! (-> this name) (&-> (-> this name) 1)) + ) + (play-effects-from-res-lump this f30-0 f30-0 f30-0) + ) + ((or (not (-> this name)) (= f30-0 (-> this last-frame-num))) + ) + (else + (let ((f28-0 (-> this last-frame-num)) + (f26-0 f30-0) + ) + (cond + ((= a0-3 num-func-seek!) + (let ((f0-6 (+ (* (-> v1-3 param 0) (-> s5-0 artist-step)) (-> s5-0 artist-base)))) + (cond + ((< f26-0 f28-0) + (if (>= f28-0 f0-6) + (play-effects-from-res-lump this f26-0 f28-0 f30-0) + ) + ) + (else + (if (>= f0-6 f28-0) + (play-effects-from-res-lump this f28-0 f26-0 f30-0) + ) + ) + ) + ) + ) + ((or (= a0-3 num-func-loop!) (= a0-3 num-func-loop-speedless!) (= a0-3 num-func-loop-set!)) + (cond + ((>= (-> v1-3 param 0) 0.0) + (cond + ((< f26-0 f28-0) + (play-effects-from-res-lump this f28-0 9999999.0 f30-0) + (play-effects-from-res-lump this -100000000.0 f26-0 9999999.0) + ) + (else + (play-effects-from-res-lump this f28-0 f26-0 f30-0) + ) + ) + ) + ((< f28-0 f26-0) + (play-effects-from-res-lump this f26-0 9999999.0 f30-0) + (play-effects-from-res-lump this -100000000.0 f28-0 9999999.0) + ) + (else + (play-effects-from-res-lump this f26-0 f28-0 f30-0) + ) + ) + ) + ((= a0-3 num-func-+!) + (if (>= (-> v1-3 param 0) 0.0) + (play-effects-from-res-lump this f28-0 f26-0 f30-0) + (play-effects-from-res-lump this f26-0 f28-0 f30-0) + ) + ) + ((= a0-3 num-func-identity) + (play-effects-from-res-lump this f30-0 f30-0 f30-0) + ) + ) + ) + ) + ) + ) + (set! (-> this last-frame-group) s5-0) + (set! (-> this last-frame-num) f30-0) + ) + ) + (else + (set! (-> this last-frame-group) #f) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 14 of type effect-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(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 + ) + ) + ) + ) + (set! s2-0 (&-> s2-0 1)) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type effect-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; WARN: Function (method 10 effect-control) has a return type of none, but the expression builder found a return statement. +(defmethod do-effect ((this effect-control) (arg0 string) (arg1 float) (arg2 int)) + (local-vars (sv-288 res-lump)) + (let* ((v1-2 (rtype-of arg0)) + (s3-0 (cond + ((= v1-2 symbol) + (symbol->string (the-as symbol arg0)) + ) + ((= v1-2 string) + arg0 + ) + (else + (the-as string #f) + ) + ) + ) + ) + (cond + ((logtest? (-> this flags) (effect-control-flag ecf2)) + (return #f) + ) + ((string= s3-0 "script") + (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 gp-1) + ) + (return #f) + ) + ) + (set! arg2 (cond + ((< arg2 0) + (let ((v0-7 (get-property-value + (-> this res) + 'effect-joint + 'exact + arg1 + (the-as uint128 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (if (zero? v0-7) + 0 + (the-as int (+ v0-7 1)) + ) + ) + ) + (else + (empty) + arg2 + ) + ) + ) + (when (logtest? (-> this flags) (effect-control-flag ecf0)) + (if (send-event (-> this process) 'effect-control s3-0 arg1 arg2) + (return 0) + ) + ) + (cond + ((and (= (-> s3-0 data 0) 101) + (= (-> s3-0 data 1) 102) + (= (-> s3-0 data 2) 102) + (= (-> s3-0 data 3) 101) + (= (-> s3-0 data 4) 99) + (= (-> s3-0 data 5) 116) + (= (-> s3-0 data 6) 45) + ) + (let* ((s2-0 (-> this process root)) + (v1-38 (if (type? s2-0 collide-shape-moving) + s2-0 + ) + ) + (t1-2 (if v1-38 + (-> (the-as collide-shape-moving v1-38) ground-pat) + *footstep-surface* + ) + ) + ) + (do-effect-for-surface this (the-as symbol s3-0) arg1 arg2 (-> this res) t1-2) + ) + ) + ((and (= (-> s3-0 data 0) 103) + (= (-> s3-0 data 1) 114) + (= (-> s3-0 data 2) 111) + (= (-> s3-0 data 3) 117) + (= (-> s3-0 data 4) 112) + (= (-> s3-0 data 5) 45) + ) + (let ((s2-1 (lookup-part-group-by-name s3-0))) + (when (and (nonzero? s2-1) s2-1 (= (-> s2-1 type) sparticle-launch-group)) + (if *debug-effect-control* + (format + #t + "(~5D) effect group ~A ~A frame ~F joint ~D~%" + (current-time) + (-> this process name) + s3-0 + arg1 + arg2 + ) + ) + (cond + ((logtest? (-> s2-1 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data arg2)) quad) + ) + (part-tracker-spawn part-tracker-subsampler :to (-> this process) :group s2-1) + ) + (else + (set! (-> *launch-matrix* trans quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data arg2)) quad) + ) + (part-tracker-spawn part-tracker :to (-> this process) :group s2-1) + ) + ) + ) + ) + ) + ((and (= (-> s3-0 data 0) 101) + (= (-> s3-0 data 1) 118) + (= (-> s3-0 data 2) 101) + (= (-> s3-0 data 3) 110) + (= (-> s3-0 data 4) 116) + (= (-> s3-0 data 5) 45) + ) + (send-event (-> this process) (string->symbol s3-0) arg1 arg2) + ) + ((string= s3-0 "camera-shake") + (activate! *camera-smush-control* 819.2 15 75 1.0 0.9 (-> *display* camera-clock)) + ) + ((and (= (-> s3-0 data 0) 100) + (= (-> s3-0 data 1) 101) + (= (-> s3-0 data 2) 97) + (= (-> s3-0 data 3) 116) + (= (-> s3-0 data 4) 104) + (= (-> s3-0 data 5) 45) + ) + (let ((s3-1 (-> (string->symbol s3-0) value))) + (when (and (logtest? (-> this flags) (effect-control-flag ecf1)) + (zero? (-> this process draw death-timer)) + (= (-> (the-as death-info s3-1) type) death-info) + ) + (let ((v1-131 (-> this process draw))) + (let ((a1-25 (-> (the-as death-info s3-1) vertex-skip)) + (a0-59 + (max + 2 + (the-as int (/ (-> (the-as death-info s3-1) timer) (the-as uint (the int (-> *display* time-factor))))) + ) + ) + ) + (when (= (-> *setting-control* user-current video-mode) 'pal) + (if (< (the-as uint 1) a1-25) + (set! a1-25 (/ (the-as uint (* (the-as uint 50) a1-25)) (the-as uint 60))) + ) + ) + (let ((a2-29 (-> *display* frames (-> *display* last-screen) run-time))) + (cond + ((< 9000 (the-as int a2-29)) + (set! a1-25 (* a1-25 4)) + ) + ((< 7000 (the-as int a2-29)) + (set! a1-25 (* a1-25 2)) + ) + ) + ) + (set! (-> v1-131 death-vertex-skip) a1-25) + (set! (-> v1-131 death-effect) (-> (the-as death-info s3-1) effect)) + (set! (-> v1-131 death-timer) (the-as uint (+ a0-59 1))) + ) + (set! (-> v1-131 death-timer-org) (-> v1-131 death-timer)) + (set! (-> v1-131 death-draw-overlap) (-> (the-as death-info s3-1) overlap)) + ) + (when (-> (the-as death-info s3-1) sound) + (let* ((s2-3 this) + (s1-0 (method-of-object s2-3 play-effect-sound)) + (s0-0 (-> (the-as death-info s3-1) sound)) + ) + (set! sv-288 (-> this res)) + (let ((t1-5 (string->sound-name (-> (the-as death-info s3-1) sound)))) + (s1-0 s2-3 (the-as symbol s0-0) arg1 arg2 sv-288 t1-5) + ) + ) + ) + (send-event (-> this process) 'death-start (the-as death-info s3-1)) + ) + ) + ) + (else + (play-effect-sound this (the-as symbol s3-0) arg1 arg2 (-> this res) (string->sound-name s3-0)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 11 of type effect-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod do-effect-for-surface ((this effect-control) (arg0 symbol) (arg1 float) (arg2 int) (arg3 basic) (arg4 pat-surface)) + (local-vars + (sv-64 + (function sparticle-system sparticle-launcher matrix sparticle-launch-state sparticle-launch-control float none) + ) + (sv-80 sparticle-system) + (sv-96 vector) + (sv-112 matrix) + (sv-128 + (function sparticle-system sparticle-launcher matrix sparticle-launch-state sparticle-launch-control float none) + ) + (sv-144 sparticle-system) + (sv-160 vector) + (sv-176 matrix) + (sv-192 symbol) + (sv-208 + (function sparticle-system sparticle-launcher matrix sparticle-launch-state sparticle-launch-control float none) + ) + (sv-224 sparticle-system) + (sv-240 vector) + (sv-256 matrix) + ) + (let ((s1-0 (the-as sound-name #f))) + (-> *display* frames (-> *display* last-screen) run-time) + (set! sv-192 arg0) + (cond + ((string= (the-as string sv-192) "effect-walk-step-left") + (set! s1-0 (sound-name-with-material "walk" arg4 "1")) + ) + ((string= (the-as string sv-192) "effect-run-step-left") + (set! s1-0 (sound-name-with-material "run" arg4 "1")) + ) + ((string= (the-as string sv-192) "effect-mech-step-left") + (set! s1-0 (sound-name-with-material "mwlk" arg4 "1")) + ) + ((string= (the-as string sv-192) "effect-walk-step-right") + (set! s1-0 (sound-name-with-material "walk" arg4 "2")) + ) + ((string= (the-as string sv-192) "effect-run-step-right") + (set! s1-0 (sound-name-with-material "run" arg4 "2")) + ) + ((string= (the-as string sv-192) "effect-mech-step-right") + (set! s1-0 (sound-name-with-material "mwlk" arg4 "2")) + ) + ((string= (the-as string sv-192) "effect-roll") + (set! s1-0 (sound-name-with-material "roll" arg4 "")) + ) + ((string= (the-as string sv-192) "effect-slide") + (set! s1-0 (sound-name-with-material "slide" arg4 "")) + ) + ((string= (the-as string sv-192) "effect-land") + (set! s1-0 (sound-name-with-material "land" arg4 "")) + ) + ((string= (the-as string sv-192) "effect-zoom-land") + (set! s1-0 (sound-name-with-material "zoom-land" arg4 "")) + ) + ((string= (the-as string sv-192) "effect-zoom-hit") + (set! s1-0 (sound-name-with-material "zoom-hit" arg4 "")) + ) + ((string= (the-as string sv-192) "effect-flut-land") + (set! s1-0 (sound-name-with-material "flut-land" arg4 "")) + ) + ((string= (the-as string sv-192) "effect-land-poof") + (do-effect + this + (-> (new 'static 'boxed-array :type string + "group-land-poof-unk" + "group-land-poof-ice" + "group-land-poof-qsd" + "group-land-poof-wtr" + "group-land-poof-tar" + "group-land-poof-san" + "group-land-poof-wod" + "group-land-poof-grs" + "group-land-poof-pmt" + "group-land-poof-snw" + "group-land-poof-dsn" + "group-land-poof-unk" + "group-land-poof-lav" + "group-land-poof-cwd" + "group-land-poof-grv" + "group-land-poof-drt" + "group-land-poof-mtl" + "group-land-poof-str" + "group-land-poof-pmt" + "group-land-poof-swm" + "group-land-poof-unk" + "group-land-poof-mtl" + "group-land-poof-neu" + "group-land-poof-stn" + "group-land-poof-cmt" + "group-land-poof-car" + "group-land-poof-gmt" + "group-land-poof-smt" + "group-land-poof-hwd" + "group-land-poof-sqi" + "group-land-poof-mhm" + "group-land-poof-for" + "group-land-poof-mhs" + "group-land-poof-dma" + ) + (-> arg4 material) + ) + arg1 + -1 + ) + ) + ((string= (the-as string sv-192) "effect-run-poof") + (do-effect + this + (-> (new 'static 'boxed-array :type string + "group-run-poof-unk" + "group-run-poof-ice" + "group-run-poof-qsd" + "group-run-poof-wtr" + "group-run-poof-tar" + "group-run-poof-san" + "group-run-poof-wod" + "group-run-poof-grs" + "group-run-poof-pmt" + "group-run-poof-snw" + "group-run-poof-dsn" + "group-run-poof-unk" + "group-run-poof-lav" + "group-run-poof-cwd" + "group-run-poof-grv" + "group-run-poof-drt" + "group-run-poof-mtl" + "group-run-poof-str" + "group-run-poof-pmt" + "group-run-poof-swm" + "group-run-poof-unk" + "group-run-poof-mtl" + "group-run-poof-neu" + "group-run-poof-stn" + "group-run-poof-cmt" + "group-run-poof-car" + "group-run-poof-gmt" + "group-run-poof-smt" + "group-run-poof-hwd" + "group-run-poof-sqi" + "group-run-poof-mhm" + "group-run-poof-for" + "group-run-poof-mhs" + "group-run-poof-dma" + ) + (-> arg4 material) + ) + arg1 + -1 + ) + ) + ((string= (the-as string sv-192) "effect-just-footprint") + (do-effect + this + (-> (new 'static 'boxed-array :type string + "group-just-footprint-unk" + "group-just-footprint-ice" + "group-just-footprint-qsd" + "group-just-footprint-wtr" + "group-just-footprint-tar" + "group-just-footprint-san" + "group-just-footprint-wod" + "group-just-footprint-grs" + "group-just-footprint-pmt" + "group-just-footprint-snw" + "group-just-footprint-dsn" + "group-just-footprint-unk" + "group-just-footprint-lav" + "group-just-footprint-cwd" + "group-just-footprint-grv" + "group-just-footprint-drt" + "group-just-footprint-mtl" + "group-just-footprint-str" + "group-just-footprint-pmt" + "group-just-footprint-swm" + "group-just-footprint-unk" + "group-just-footprint-mtl" + "group-just-footprint-neu" + "group-just-footprint-stn" + "group-just-footprint-cmt" + "group-just-footprint-car" + "group-just-footprint-gmt" + "group-just-footprint-smt" + "group-just-footprint-hwd" + "group-just-footprint-sqi" + "group-just-footprint-mhm" + "group-just-footprint-for" + "group-just-footprint-mhs" + "group-just-footprint-dma" + ) + (-> arg4 material) + ) + arg1 + -1 + ) + ) + ((string= (the-as string sv-192) "effect-just-poof") + (do-effect + this + (-> (new 'static 'boxed-array :type string + "group-just-poof-unk" + "group-just-poof-ice" + "group-just-poof-qsd" + "group-just-poof-wtr" + "group-just-poof-tar" + "group-just-poof-san" + "group-just-poof-wod" + "group-just-poof-grs" + "group-just-poof-pmt" + "group-just-poof-snw" + "group-just-poof-dsn" + "group-just-poof-unk" + "group-just-poof-lav" + "group-just-poof-cwd" + "group-just-poof-grv" + "group-just-poof-drt" + "group-just-poof-mtl" + "group-just-poof-str" + "group-just-poof-pmt" + "group-just-poof-swm" + "group-just-poof-unk" + "group-just-poof-mtl" + "group-just-poof-neu" + "group-just-poof-stn" + "group-just-poof-cmt" + "group-just-poof-car" + "group-just-poof-gmt" + "group-just-poof-smt" + "group-just-poof-hwd" + "group-just-poof-sqi" + "group-just-poof-mhm" + "group-just-poof-for" + "group-just-poof-mhs" + "group-just-poof-dma" + ) + (-> arg4 material) + ) + arg1 + -1 + ) + ) + ((string= (the-as string sv-192) "effect-slide-poof") + (do-effect + this + (-> (new 'static 'boxed-array :type string + "group-slide-poof-unk" + "group-slide-poof-ice" + "group-slide-poof-qsd" + "group-slide-poof-wtr" + "group-slide-poof-tar" + "group-slide-poof-san" + "group-slide-poof-wod" + "group-slide-poof-grs" + "group-slide-poof-pmt" + "group-slide-poof-snw" + "group-slide-poof-dsn" + "group-slide-poof-unk" + "group-slide-poof-lav" + "group-slide-poof-cwd" + "group-slide-poof-grv" + "group-slide-poof-drt" + "group-slide-poof-mtl" + "group-slide-poof-str" + "group-slide-poof-pmt" + "group-slide-poof-swm" + "group-slide-poof-unk" + "group-slide-poof-mtl" + "group-slide-poof-neu" + "group-slide-poof-stn" + "group-slide-poof-cmt" + "group-slide-poof-car" + "group-slide-poof-gmt" + "group-slide-poof-smt" + "group-slide-poof-hwd" + "group-slide-poof-sqi" + "group-slide-poof-mhm" + "group-slide-poof-for" + "group-slide-poof-mhs" + "group-slide-poof-dma" + ) + (-> arg4 material) + ) + arg1 + -1 + ) + ) + ((string= (the-as string sv-192) "effect-droppings") + (let ((s0-1 (-> *part-id-table* (-> (new 'static 'boxed-array :type uint32 + #x8e + #x2a9 + #x2aa + #x2ab + #x2ac + #x75 + #x8b + #x77 + #x2ad + #x79 + #x2ae + #x8e + #x2af + #x8d + #x2b0 + #x76 + #x2b1 + #x2b2 + #x2ad + #x2b3 + #x8e + #x2b1 + #x2b4 + #x8c + #x2b5 + #x2b6 + #x2b7 + #x2b8 + #x2b9 + #x2ba + #x2bb + #x78 + #x2bc + #x2bd + ) + (-> arg4 material) + ) + ) + ) + ) + (when (nonzero? s0-1) + (set! sv-64 sp-launch-particles-var) + (set! sv-80 *sp-particle-system-2d*) + (set! sv-112 *launch-matrix*) + (set! sv-96 (-> sv-112 trans)) + (let ((v1-80 (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data arg2)) quad))) + (set! (-> sv-96 quad) v1-80) + ) + (let ((a3-6 #f) + (t0-1 #f) + (t1-1 1.0) + ) + (sv-64 sv-80 s0-1 sv-112 (the-as sparticle-launch-state a3-6) (the-as sparticle-launch-control t0-1) t1-1) + ) + ) + ) + ) + ((string= (the-as string sv-192) "effect-jump-droppings") + (let ((s0-2 (-> *part-id-table* (-> (new 'static 'boxed-array :type uint32 + #x2be + #x2bf + #x2c0 + #x2c1 + #x2c2 + #x86 + #x2c3 + #x89 + #x2c4 + #x88 + #x2c5 + #x2be + #x2c6 + #x2c7 + #x2c8 + #x87 + #x2c9 + #x2ca + #x2c4 + #x2cb + #x2be + #x2c9 + #x2cc + #x2cd + #x2ce + #x2cf + #x2d0 + #x2d1 + #x2d2 + #x2d3 + #x2d4 + #x8a + #x2d5 + #x2d6 + ) + (-> arg4 material) + ) + ) + ) + ) + (when (nonzero? s0-2) + (set! sv-128 sp-launch-particles-var) + (set! sv-144 *sp-particle-system-2d*) + (set! sv-176 *launch-matrix*) + (set! sv-160 (-> sv-176 trans)) + (let ((v1-97 (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data arg2)) quad))) + (set! (-> sv-160 quad) v1-97) + ) + (let ((a3-7 #f) + (t0-2 #f) + (t1-2 1.0) + ) + (sv-128 sv-144 s0-2 sv-176 (the-as sparticle-launch-state a3-7) (the-as sparticle-launch-control t0-2) t1-2) + ) + ) + ) + ) + ((let ((t9-40 string=) + (a1-45 "effect-board-poof") + ) + (t9-40 (the-as string sv-192) a1-45) + ) + (let ((s0-3 (-> *part-id-table* (-> (new 'static 'boxed-array :type uint32 + #x2d7 + #x2d8 + #x2d9 + #x2da + #x2db + #x2dc + #x2dd + #x2de + #x2df + #x2e0 + #x2e1 + #x2d7 + #x2e2 + #x2e3 + #x2e4 + #x2e5 + #x2e6 + #x2e7 + #x2df + #x2e8 + #x2d7 + #x2e6 + #x2e9 + #x2a2 + #x2ea + #x2eb + #x2ec + #x2ed + #x2ee + #x2ef + #x2f0 + #x2f1 + #x2f2 + #x2f3 + ) + (-> arg4 material) + ) + ) + ) + ) + (when (nonzero? s0-3) + (set! sv-208 sp-launch-particles-var) + (set! sv-224 *sp-particle-system-2d*) + (set! sv-256 *launch-matrix*) + (set! sv-240 (-> sv-256 trans)) + (let ((v1-114 (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data arg2)) quad))) + (set! (-> sv-240 quad) v1-114) + ) + (let ((a3-8 #f) + (t0-3 #f) + (t1-3 1.0) + ) + (sv-208 sv-224 s0-3 sv-256 (the-as sparticle-launch-state a3-8) (the-as sparticle-launch-control t0-3) t1-3) + ) + ) + ) + ) + ) + (if s1-0 + (play-effect-sound this arg0 arg1 arg2 arg3 s1-0) + ) + ) + 0 + (none) + ) + +;; definition for method 12 of type effect-control +;; INFO: Used lq/sq +(defmethod play-effect-sound ((this effect-control) (arg0 symbol) (arg1 float) (arg2 int) (arg3 basic) (arg4 sound-name)) + (local-vars (sv-112 res-tag) (sv-128 sound-name) (sv-144 basic) (sv-160 (function vector vector float))) + (set! sv-144 arg3) + (let ((s0-0 arg4) + (gp-0 (the-as object (new 'stack 'sound-spec))) + (s5-0 (if (< arg2 0) + (the-as vector #f) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this process node-list data arg2)) + ) + ) + ) + (set! (-> (the-as sound-spec gp-0) sound-name) s0-0) + (logior! (-> (the-as sound-spec gp-0) mask) (sound-mask volume)) + (set! (-> (the-as sound-spec gp-0) pitch-mod) 0) + (set! (-> (the-as sound-spec gp-0) volume) 1024) + (set! sv-112 (new 'static 'res-tag)) + (let* ((t9-2 (method-of-type res-lump get-property-data)) + (a1-5 'effect-param) + (a2-1 'exact) + (a3-1 arg1) + (t0-1 #f) + (t1-1 (the-as (pointer res-tag) (& sv-112))) + (t2-0 *res-static-buf*) + (a1-6 (t9-2 (the-as res-lump sv-144) a1-5 a2-1 a3-1 (the-as pointer t0-1) t1-1 t2-0)) + ) + (when a1-6 + (effect-param->sound-spec + (the-as sound-spec gp-0) + (the-as (pointer float) a1-6) + (the-as int (-> sv-112 elt-count)) + (the-as process-focusable (-> this process)) + ) + (if (logtest? (-> (the-as sound-spec gp-0) mask) (sound-mask unk)) + (return 0) + ) + ) + ) + (let ((f0-0 (-> *setting-control* user-current under-water-pitch-mod))) + (when (!= f0-0 0.0) + (logior! (-> (the-as sound-spec gp-0) mask) (sound-mask pitch)) + (let ((f0-1 (* 2.0 f0-0))) + (set! (-> (the-as sound-spec gp-0) pitch-mod) + (- (-> (the-as sound-spec gp-0) pitch-mod) (the int (* 1524.0 f0-1))) + ) + ) + ) + ) + (if (or (and (nonzero? (-> (the-as sound-spec gp-0) fo-max)) + (let ((f30-0 (* 4096.0 (the float (-> (the-as sound-spec gp-0) fo-max))))) + (set! sv-160 vector-vector-distance) + (let ((a0-8 (ear-trans 0)) + (a1-7 s5-0) + ) + (< f30-0 (sv-160 a0-8 a1-7)) + ) + ) + ) + (= (-> (the-as (pointer int8) gp-0) 9) 126) + ) + (return 0) + ) + (when *debug-effect-control* + (set! sv-128 s0-0) + (string<-charp (clear *temp-string*) (the-as (pointer uint8) (& sv-128))) + (format + #t + "(~5D) effect sound ~A ~S (~S) frame ~F joint ~D " + (current-time) + (-> this process name) + arg0 + *temp-string* + arg1 + arg2 + ) + (format + #t + "volume: ~f pitch-mod: ~f~%" + (* 0.09765625 (the float (-> (the-as sound-spec gp-0) volume))) + (* 0.000656168 (the float (-> (the-as sound-spec gp-0) pitch-mod))) + ) + ) + (sound-play-by-spec (the-as sound-spec gp-0) (new-sound-id) s5-0) + ) + 0 + ) + +;; definition for function target-land-effect +;; WARN: Return type mismatch int vs none. +(defbehavior target-land-effect target () + (cond + ((focus-test? self flut) + (do-effect (-> self skel effect) "effect-land-poof" -1.0 -1) + (do-effect (-> self skel effect) "effect-flut-land" -1.0 -1) + ) + ((focus-test? self pilot) + (sound-play-by-name + (sound-name-with-material "zoom-land" (-> self control ground-pat) "") + (new-sound-id) + (the int (* 1024.0 (* 0.000016276043 (-> self control ground-impact-vel)))) + 0 + 0 + (sound-group) + #t + ) + ) + ((logtest? (water-flag touch-water) (-> self water flags)) + (do-effect (-> self skel effect) "effect-land-water" -1.0 -1) + ) + (else + (do-effect (-> self skel effect) "effect-land-poof" -1.0 -1) + (do-effect (-> self skel effect) "effect-land" -1.0 -1) + ) + ) + 0 + (none) + ) diff --git a/test/decompiler/reference/jak3/engine/game/fact-h_REF.gc b/test/decompiler/reference/jak3/engine/game/fact-h_REF.gc index 69e567b4b0..7fbf32c757 100644 --- a/test/decompiler/reference/jak3/engine/game/fact-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/game/fact-h_REF.gc @@ -679,7 +679,7 @@ (trig-mask uint8 2) ) (:methods - (new (symbol type process (pointer float) pickup-type float) _type_) + (new (symbol type process (pointer float)) _type_) (clear-mask-bits (_type_ int) none) ) ) @@ -1086,13 +1086,7 @@ ;; definition for method 0 of type fact-info-enemy ;; INFO: Used lq/sq -(defmethod new fact-info-enemy ((allocation symbol) - (type-to-make type) - (arg0 process) - (arg1 (pointer float)) - (arg2 pickup-type) - (arg3 float) - ) +(defmethod new fact-info-enemy ((allocation symbol) (type-to-make type) (arg0 process) (arg1 (pointer float))) (local-vars (sv-16 res-tag) (sv-32 res-tag)) (let ((gp-0 (the-as 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 e492b0d39d..6a389c9b00 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,8 @@ 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) + (root trsqv) (node-list cspace-array) (draw draw-control) (skel joint-control) diff --git a/test/decompiler/reference/jak3/engine/game/game-info-h_REF.gc b/test/decompiler/reference/jak3/engine/game/game-info-h_REF.gc index d79220c18d..f0951c9b89 100644 --- a/test/decompiler/reference/jak3/engine/game/game-info-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/game/game-info-h_REF.gc @@ -131,23 +131,23 @@ (command-list pair) (object-name string 256) (object-status basic 256) - (update-callback basic) + (update-callback (function load-state object)) ) (:methods (new (symbol type) _type_) - (load-state-method-9 () none) - (load-state-method-10 () none) - (load-state-method-11 () none) + (reset! (_type_) _type_) + (update! (_type_) int) + (want-levels (_type_ (pointer symbol)) int) (want-sound-banks (_type_ (pointer symbol)) none) - (load-state-method-13 () none) - (load-state-method-14 () none) - (load-state-method-15 () none) - (load-state-method-16 () none) + (want-display-level (_type_ symbol symbol) int) + (want-vis-level (_type_ symbol) none) + (want-force-vis (_type_ symbol symbol) int) + (want-force-inside (_type_ symbol symbol) none) (execute-commands-up-to (_type_ float) none) (backup-load-state-and-set-cmds (_type_ pair) int) (restore-load-state-and-cleanup (_type_) int) (restore-load-state (_type_) int) - (load-state-method-21 (_type_) none) + (add-borrow-levels (_type_) none) ) ) @@ -192,11 +192,10 @@ ) ;; definition for method 0 of type load-state -;; WARN: Return type mismatch none vs load-state. (defmethod new load-state ((allocation symbol) (type-to-make type)) (let ((a0-1 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) (set! (-> a0-1 update-callback) #f) - (the-as load-state ((method-of-object a0-1 load-state-method-9))) + (reset! a0-1) ) ) @@ -316,7 +315,7 @@ (play-list (array game-task-info)) (sub-task-list (array game-task-node-info)) (mission-list (array game-task-node-info)) - (task-node-commands (array uint8)) + (task-node-commands (array game-task-node-command)) (task-node-exclusive (array uint16)) (task-counter uint32) (unknown-arr4 (array uint16)) @@ -377,7 +376,7 @@ (dust-storm handle) (flut-count int32) (death-resetter resetter-spec :inline) - (current-vehicle uint8) + (current-vehicle game-vehicle-u8) (vehicle-turbo-ready float) (percent-complete float) ) diff --git a/test/decompiler/reference/jak3/engine/game/game-info_REF.gc b/test/decompiler/reference/jak3/engine/game/game-info_REF.gc index 5c27b3c5be..277e85640f 100644 --- a/test/decompiler/reference/jak3/engine/game/game-info_REF.gc +++ b/test/decompiler/reference/jak3/engine/game/game-info_REF.gc @@ -193,7 +193,7 @@ (set! (-> continue-rot 8) (the int (* 32767.0 (-> rot fvec z)))) ) ) - (load-state-method-21 arg0) + (add-borrow-levels arg0) this ) @@ -385,12 +385,7 @@ (when (or (and (-> subtask manager) (handle->process (-> subtask manager manager))) (and (-> subtask manager) (-> subtask manager level) - (let* ((a0-8 *level*) - (t9-2 (method-of-object a0-8 level-group-method-26)) - (a1-1 (-> subtask manager level)) - ) - (= (t9-2 a0-8 a1-1) 'active) - ) + (= (status-of-level-and-borrows *level* (-> subtask manager level) #f) 'active) ) (and (not (-> subtask manager)) (= (-> level info taskname) (-> subtask level))) ) @@ -486,7 +481,7 @@ (set! (-> this old-vehicles) (game-vehicles)) (set! (-> this secrets) (game-secrets)) (set! (-> this purchase-secrets) (game-secrets)) - (set! (-> this current-vehicle) (the-as uint 27)) + (set! (-> this current-vehicle) (game-vehicle-u8 v-turtle v-snake v-toad v-fox)) (set-continue! this (cond @@ -694,13 +689,17 @@ (get-current-continue-forced this) ) ) + (t1-3 arg2) + (t2-0 reset-spec) ) - ((the-as (function symbol symbol continue-point game-save resetter-spec none :behavior process) s0-2) - (the-as symbol sv-128) - (the-as symbol sv-144) - (the-as continue-point sv-160) - (the-as game-save mode) - (the-as resetter-spec t0-4) + ((the-as (function cpu-thread function symbol symbol continue-point game-save resetter-spec none) s0-2) + sv-128 + sv-144 + sv-160 + mode + (the-as continue-point t0-4) + t1-3 + t2-0 ) ) ) @@ -2179,7 +2178,7 @@ board sidekick board-launch - feature39 + board-zap darkjak darkjak-smack darkjak-bomb0 @@ -2192,9 +2191,9 @@ lightjak-freeze lightjak-shield artifact-invis - feature56 - feature57 - feature58 + jakc + lighteco + darkeco ) ) (set! (-> gp-0 vehicles) (game-vehicles v-turtle v-snake v-scorpion v-toad v-fox v-rhino v-mirage v-x-ride)) @@ -2219,7 +2218,7 @@ (set! (-> gp-0 distance) 0.0) (set! (-> gp-0 health-bar-vehicle) 0.0) (set! (-> gp-0 dust-storm) (the-as handle #f)) - (set! (-> gp-0 current-vehicle) (the-as uint 27)) + (set! (-> gp-0 current-vehicle) (game-vehicle-u8 v-turtle v-snake v-toad v-fox)) ) ;; failed to figure out what this is: diff --git a/test/decompiler/reference/jak3/engine/game/game-save_REF.gc b/test/decompiler/reference/jak3/engine/game/game-save_REF.gc index 8d16f61344..96ddba8b1c 100644 --- a/test/decompiler/reference/jak3/engine/game/game-save_REF.gc +++ b/test/decompiler/reference/jak3/engine/game/game-save_REF.gc @@ -1859,7 +1859,7 @@ (set! (-> this vehicles) (the-as game-vehicles (-> (the-as game-save-tag s4-0) user-uint64))) ) (((game-save-elt vehicle)) - (set! (-> this current-vehicle) (-> (the-as game-save-tag s4-0) user-uint8 0)) + (set! (-> this current-vehicle) (the-as game-vehicle-u8 (-> (the-as game-save-tag s4-0) user-uint8 0))) ) (((game-save-elt items)) (set! (-> this items) (the-as game-items (-> (the-as game-save-tag s4-0) user-uint64))) @@ -2301,7 +2301,7 @@ ) ) (print-game-text - (lookup-text! *common-text* (text-id text-00a0) #f) + (lookup-text! *common-text* (text-id progress-memcard-saving) #f) gp-1 #f 44 @@ -2316,7 +2316,7 @@ (set! (-> v1-38 height) (the float 200)) ) (let ((s5-2 print-game-text)) - (format (clear *temp-string*) (lookup-text! *common-text* (text-id text-00a4) #f) 1) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-remove-warn) #f) 1) (s5-2 *temp-string* gp-1 #f 44 (bucket-id hud-draw-hud-alpha)) ) ) @@ -2327,13 +2327,7 @@ (let* ((s5-3 (-> *display* frames (-> *display* on-screen) global-buf)) (gp-2 (-> s5-3 base)) ) - (let ((a0-39 (-> self icon)) - (t9-14 (method-of-type hud-sprite draw)) - (a1-12 s5-3) - (a2-10 (-> self level)) - ) - (t9-14 a0-39 a1-12 a2-10) - ) + (draw (-> self icon) s5-3 (-> self level) #f) (let ((a3-8 (-> s5-3 base))) (when (!= gp-2 a3-8) (let ((v1-55 (the-as object (-> s5-3 base)))) @@ -2397,7 +2391,12 @@ ) (set! (-> self starting-auto-save-status) (the-as basic (-> *setting-control* user-default auto-save))) (set! (-> *setting-control* user-default auto-save) #f) - (set-vector! (-> self icon color) 128 128 128 128) + (let ((v1-61 (-> self icon color-ptr))) + (set! (-> v1-61 0) 128) + (set! (-> v1-61 1) 128) + (set! (-> v1-61 2) 128) + (set! (-> v1-61 3) 128) + ) (set! (-> self icon pos x) 440) (set! (-> self icon pos y) 210) (set! (-> self icon pos z) #xffffff) @@ -2405,8 +2404,8 @@ (set! (-> self icon scale-x) 2.0) (set! (-> self icon scale-y) 2.0) (set! (-> self icon angle) 0.0) - (set! (-> self icon flags) (the-as uint 0)) - (set! (-> self icon tex) (lookup-texture-by-id (new 'static 'texture-id :page #x9))) + (set! (-> self icon flags) (hud-sprite-flags)) + (set! (-> self icon tid) (the-as texture-id (get-texture checkpoint level-default-minimap))) (go-virtual get-heap) ) diff --git a/test/decompiler/reference/jak3/engine/game/idle-control_REF.gc b/test/decompiler/reference/jak3/engine/game/idle-control_REF.gc new file mode 100644 index 0000000000..f2288b5b59 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/game/idle-control_REF.gc @@ -0,0 +1,168 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type idle-control-frame +(deftype idle-control-frame (structure) + ((command idle-control-cmd) + (anim uint32) + (param0 int32) + (param1 int32) + (param2 pair) + ) + ) + +;; definition for method 3 of type idle-control-frame +(defmethod inspect ((this idle-control-frame)) + (when (not this) + (set! this this) + (goto cfg-11) + ) + (format #t "[~8x] ~A~%" this 'idle-control-frame) + (let ((t9-1 format) + (a0-2 #t) + (a1-1 "~1Tcommand: #x~X : ~S~%") + (a2-1 (-> this command)) + (v1-2 (-> this command)) + ) + (t9-1 a0-2 a1-1 a2-1 (cond + ((= v1-2 (idle-control-cmd play)) + "play" + ) + ((= v1-2 (idle-control-cmd push)) + "push" + ) + ((= v1-2 (idle-control-cmd reset)) + "restart" + ) + (else + "*unknown*" + ) + ) + ) + ) + (format #t "~1Tanim: ~D~%" (-> this anim)) + (format #t "~1Tparam0: ~D~%" (-> this param0)) + (format #t "~1Tparam1: ~D~%" (-> this param1)) + (format #t "~1Tparam2: ~A~%" (-> this param2)) + (label cfg-11) + this + ) + +;; definition of type idle-control +(deftype idle-control (structure) + ((anim (inline-array idle-control-frame)) + (anim-speed float) + (current-index int32) + (counter int32) + (target int32) + ) + (:methods + (init! (_type_ (inline-array idle-control-frame)) none) + (play-idle-frames! (_type_ process-drawable) none :behavior process-drawable) + ) + ) + +;; definition for method 3 of type idle-control +(defmethod inspect ((this idle-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'idle-control) + (format #t "~1Tanim: #x~X~%" (-> this anim)) + (format #t "~1Tanim-speed: ~f~%" (-> this anim-speed)) + (format #t "~1Tcurrent-index: ~D~%" (-> this current-index)) + (format #t "~1Tcounter: ~D~%" (-> this counter)) + (format #t "~1Ttarget: ~D~%" (-> this target)) + (label cfg-4) + this + ) + +;; definition for method 9 of type idle-control +;; WARN: Return type mismatch idle-control vs none. +(defmethod init! ((this idle-control) (arg0 (inline-array idle-control-frame))) + "Initialize this [[idle-control]]." + (set! (-> this anim) arg0) + (set! (-> this anim-speed) 0.0) + (set! (-> this current-index) 0) + (set! (-> this counter) 0) + (set! (-> this target) 0) + (none) + ) + +;; definition for method 10 of type idle-control +;; WARN: Return type mismatch int vs none. +;; WARN: Function (method 10 idle-control) has a return type of none, but the expression builder found a return statement. +(defmethod play-idle-frames! ((this idle-control) (arg0 process-drawable)) + "Set the process pointer to the given [[process-drawable]] and run the idle frames for it." + (when (nonzero? (-> this anim)) + (let ((s5-0 self)) + (set! self arg0) + (loop + (let ((s4-0 (-> this anim (-> this current-index)))) + (case (-> s4-0 command) + (((idle-control-cmd play)) + (if (< (-> s4-0 anim) 0) + (return #f) + ) + (when (zero? (-> this target)) + (set! (-> this target) (rand-vu-int-range (-> s4-0 param0) (-> s4-0 param1))) + (set! (-> this anim-speed) + (rand-vu-float-range + (command-get-float (-> s4-0 param2 car) 0.0) + (command-get-float (-> (the-as pair (-> s4-0 param2 cdr)) car) 0.0) + ) + ) + (ja :group! (-> (the-as process-drawable self) draw art-group data (-> s4-0 anim)) :num! min) + (return #f) + ) + (ja :group! (-> (the-as process-drawable self) draw art-group data (-> s4-0 anim)) + :num! (seek! max (-> this anim-speed)) + ) + (cond + ((ja-done? 0) + (+! (-> this counter) 1) + (cond + ((>= (-> this counter) (-> this target)) + (+! (-> this current-index) 1) + (set! (-> this counter) 0) + (set! (-> this target) 0) + 0 + ) + (else + (ja :num-func num-func-identity :frame-num 0.0) + (return #f) + ) + ) + ) + (else + (return #f) + ) + ) + ) + (((idle-control-cmd push)) + (ja-channel-push! 1 (the-as time-frame (-> s4-0 param0))) + (+! (-> this current-index) 1) + (set! (-> this counter) 0) + (set! (-> this target) 0) + 0 + ) + (((idle-control-cmd reset)) + (set! (-> this current-index) 0) + (set! (-> this counter) 0) + (set! (-> this target) 0) + 0 + ) + ) + ) + ) + (set! self s5-0) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/game/main-h_REF.gc b/test/decompiler/reference/jak3/engine/game/main-h_REF.gc index 9061925b79..81dacfc5fe 100644 --- a/test/decompiler/reference/jak3/engine/game/main-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/game/main-h_REF.gc @@ -277,8 +277,8 @@ ;; definition for symbol *debug-player-vehicle-unkillable*, type symbol (define *debug-player-vehicle-unkillable* #f) -;; definition for symbol *debug-actor*, type object -(define *debug-actor* (the-as object #f)) +;; definition for symbol *debug-actor*, type process +(define *debug-actor* (the-as process #f)) ;; definition for symbol *gun-marks*, type symbol (define *gun-marks* #f) @@ -379,7 +379,7 @@ ;; definition of type screen-filter (deftype screen-filter (basic) ((draw? symbol) - (bucket int32) + (bucket bucket-id) (depth int32) (ztest uint64) (color vector :inline) @@ -388,11 +388,11 @@ (extra vector :inline) (speed float :overlay-at (-> extra data 0)) (current-interp float :overlay-at (-> extra data 1)) - (lock-vsync? basic) + (lock-vsync? symbol) ) (:methods (draw (_type_) none) - (setup (_type_ vector vector float bucket-id) none) + (setup (_type_ vector vector float bucket-id int int symbol) none) (disable (_type_) none) ) ) @@ -434,7 +434,7 @@ (camera-to-bbox-dist float) ) (:methods - (col-rend-method-9 () none) + (draw (_type_) none) ) ) diff --git a/test/decompiler/reference/jak3/engine/game/main_REF.gc b/test/decompiler/reference/jak3/engine/game/main_REF.gc new file mode 100644 index 0000000000..e5596a91af --- /dev/null +++ b/test/decompiler/reference/jak3/engine/game/main_REF.gc @@ -0,0 +1,2017 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function set-letterbox-frames +;; WARN: Return type mismatch time-frame vs none. +(defun set-letterbox-frames ((arg0 time-frame)) + "Enable letterbox for the given amount of time." + (with-pp + (set! (-> *game-info* letterbox-time) + (+ (-> *display* base-clock frame-counter) + (the int (/ (* (the float arg0) (-> *display* game-clock clock-ratio)) (-> pp clock clock-ratio))) + ) + ) + (none) + ) + ) + +;; definition for function letterbox +;; WARN: Return type mismatch int vs none. +(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 + ) + ) + 0 + (none) + ) + +;; definition for function set-blackout-frames +;; WARN: Return type mismatch int vs none. +(defun set-blackout-frames ((arg0 time-frame)) + "Enable blackout for the given amount of time." + (with-pp + (if (zero? arg0) + (set! (-> *game-info* blackout-time) (-> *display* base-clock frame-counter)) + (set! (-> *game-info* blackout-time) + (the-as + time-frame + (max + (-> *game-info* blackout-time) + (+ (-> *display* base-clock frame-counter) + (the int (/ (* (the float arg0) (-> *display* game-clock clock-ratio)) (-> pp clock clock-ratio))) + arg0 + ) + ) + ) + ) + ) + (none) + ) + ) + +;; definition for function blackout +;; WARN: Return type mismatch int vs none. +(defun blackout ((arg0 bucket-id)) + "Draw blackout as a sprite." + (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + arg0 + ) + (draw-sprite2d-xy-absolute s4-0 0 0 512 416 (new 'static 'rgba :a #x80) #x3fffff) + ) + 0 + (none) + ) + +;; definition for function add-blackout +(defun add-blackout ((arg0 time-frame) (r int) (g int) (b int) (arg4 int)) + "Update display settings to do blackout with GS pmode alp." + (let ((v1-0 *display*)) + (let ((a0-1 (new 'static 'array time-frame 2 (seconds 0) (seconds 0)))) + (set! (-> v1-0 bgcolor r) r) + (set! (-> v1-0 bgcolor g) g) + (set! (-> v1-0 bgcolor b) b) + (set! (-> v1-0 pmode alp) (- 255 arg4)) + (set! (-> a0-1 0) 0) + (set! (-> a0-1 1) 0) + ) + (if (nonzero? arg4) + (set! (-> v1-0 force-sync) (the-as uint (max 4 (the-as int (-> v1-0 force-sync))))) + ) + ) + 0 + ) + +;; definition for function paused? +(defun paused? () + "Are we paused? Counts any type of pause/menu/freeze." + (or (= *master-mode* 'pause) (= *master-mode* 'progress) (= *master-mode* 'menu) (= *master-mode* 'freeze)) + ) + +;; definition for function movie? +(defun movie? () + "Are we in a movie?" + (logtest? (-> *kernel-context* prevent-from-run) (process-mask movie)) + ) + +;; definition for function scene-select? +(defun scene-select? () + (and (>= (-> *game-info* demo-state) (the-as uint 100)) (< (-> *game-info* demo-state) (the-as uint 200))) + ) + +;; definition for function demo? +(defun demo? () + "Is this a demo version?" + (or (= *kernel-boot-message* 'demo) (= *kernel-boot-message* 'demo-shared)) + ) + +;; definition for function kiosk? +(defun kiosk? () + "Is this a kiosk version of the game?" + (= *kernel-boot-message* 'kiosk) + ) + +;; definition for symbol *last-master-mode*, type symbol +(define *last-master-mode* 'game) + +;; definition for function set-master-mode +;; WARN: Return type mismatch int vs none. +(defun set-master-mode ((arg0 symbol)) + "Change the master mode and adjust a few masks" + (when (!= arg0 *master-mode*) + (set! *last-master-mode* *master-mode*) + (set! *master-mode* arg0) + (case *master-mode* + (('pause) + (if (not *debug-pause*) + (logior! (-> *setting-control* user-default process-mask) (process-mask pause)) + ) + (logclear! (-> *setting-control* user-default process-mask) (process-mask freeze menu)) + (set! *pause-lock* #f) + (sound-group-pause (the-as sound-group #xffffffff)) + (set! (-> *game-info* pause-start-time) (-> *display* real-clock frame-counter)) + ) + (('freeze) + (logior! (-> *setting-control* user-default process-mask) (process-mask freeze)) + (logclear! (-> *setting-control* user-default process-mask) (process-mask pause menu)) + (sound-group-pause (sound-group sfx ambient)) + (set! (-> *game-info* pause-start-time) (-> *display* real-clock frame-counter)) + ) + (('menu) + (logior! (-> *setting-control* user-default process-mask) (process-mask menu)) + (logclear! (-> *setting-control* user-default process-mask) (process-mask freeze pause progress)) + (sound-group-pause (the-as sound-group #xffffffff)) + (set! *pause-lock* #f) + ) + (('progress) + (logclear! (-> *setting-control* user-default process-mask) (process-mask freeze pause menu)) + (sound-group-pause (the-as sound-group #xffffffff)) + (when (not *progress-process*) + (activate-progress *dproc* 'main) + (if (not *progress-process*) + (set-master-mode 'game) + ) + ) + (set! (-> *game-info* pause-start-time) (-> *display* real-clock frame-counter)) + ) + (('game) + (logclear! (-> *setting-control* user-default process-mask) (process-mask freeze pause menu)) + (sound-group-continue (the-as sound-group #xffffffff)) + ) + ) + (apply-settings *setting-control*) + ) + (if *debug-segment* + (menu-respond-to-pause) + ) + 0 + (none) + ) + +;; definition for function pause-allowed? +(defun pause-allowed? () + "Should we allow a pause?" + (not (or (< (-> *display* base-clock frame-counter) (-> *game-info* blackout-time)) + (!= (-> *setting-control* user-current bg-a) 0.0) + (!= (-> *setting-control* user-current bg-a-force) 0.0) + (not (-> *setting-control* user-current allow-pause)) + (handle->process (-> *game-info* auto-save-proc)) + (= *master-mode* 'freeze) + (not *target*) + *master-exit* + (not *common-text*) + ) + ) + ) + +;; definition for function toggle-pause +(defun toggle-pause () + "Update the pause state. Call this if the user presses a pause button + This function will check the button and state and do a pause if needed." + (case *master-mode* + (('game) + (set-master-mode + (cond + ((and (logtest? (-> *cpad-list* cpads 0 valid) 128) + *target* + (>= (-> *display* base-clock frame-counter) (-> *game-info* blackout-time)) + (= (-> *setting-control* user-current bg-a) 0.0) + (and (= (-> *setting-control* user-current bg-a-force) 0.0) + (< (seconds 1003) (-> *display* real-clock frame-counter)) + ) + ) + (if (or *progress-process* (not (-> *setting-control* user-current allow-pause))) + *master-mode* + 'pause + ) + ) + ((and (cpad-pressed? 0 select start) (cpad-hold? 0 l3) *debug-segment*) + 'menu + ) + ((and (or (cpad-hold? 0 select) (cpad-hold? 0 r2)) *debug-segment*) + 'pause + ) + ((and (not *debug-segment*) (not (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons start)))) + (if (pause-allowed?) + 'pause + *master-mode* + ) + ) + ((not (progress-allowed?)) + (if (pause-allowed?) + 'pause + *master-mode* + ) + ) + ((cpad-hold? 0 start) + 'progress + ) + (else + *master-mode* + ) + ) + ) + ) + (('menu) + (set-master-mode (cond + ((and *debug-segment* (cpad-hold? 0 l3) (cpad-pressed? 0 select start)) + 'menu + ) + ((cpad-hold? 0 select r2) + (if *debug-segment* + 'pause + *master-mode* + ) + ) + ((cpad-hold? 0 r3 r2 triangle circle) + 'game + ) + ((cpad-hold? 0 start) + 'game + ) + (else + *master-mode* + ) + ) + ) + (set! *pause-lock* #f) + ) + (('pause) + (set-master-mode (cond + ((and (cpad-pressed? 0 select start) (cpad-hold? 0 l3) *debug-segment*) + 'menu + ) + ((and (or (not *debug-segment*) (not *cheat-mode*)) (cpad-hold? 0 select)) + 'game + ) + ((and *cheat-mode* (cpad-hold? 0 select r2)) + 'game + ) + ((cpad-hold? 0 start) + 'game + ) + (else + *master-mode* + ) + ) + ) + (set! *pause-lock* (and *cheat-mode* (cpad-hold? 0 r2))) + ) + (('freeze) + (set-master-mode (if (and (cpad-pressed? 0 select start) (cpad-hold? 0 l3) *debug-segment*) + 'menu + *master-mode* + ) + ) + ) + (('progress) + (if (cpad-hold? 0 start) + (hide-progress-screen) + ) + (set! *pause-lock* (and *cheat-mode* (cpad-hold? 0 r2))) + ) + ) + 0 + ) + +;; definition for symbol *screen-filter*, type screen-filter +(define *screen-filter* (new 'static 'screen-filter :draw? #f :bucket (bucket-id tex-hud-pris2))) + +;; definition for method 9 of type screen-filter +;; WARN: Return type mismatch int vs none. +;; WARN: Function (method 9 screen-filter) has a return type of none, but the expression builder found a return statement. +(defmethod draw ((this screen-filter)) + "Add DMA data to our bucket to draw the filter." + (local-vars (v1-1 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (when (not (paused?)) + (.lvf vf4 (&-> this extra quad)) + (.lvf vf1 (&-> this color-dest quad)) + (.lvf vf2 (&-> this color quad)) + (.sub.vf vf3 vf1 vf2) + (.add.x.vf vf4 vf4 vf4 :mask #b10) + (.min.w.vf vf4 vf4 vf0 :mask #b10) + (.max.y.vf vf4 vf4 vf0 :mask #b10) + (.mul.y.vf vf3 vf3 vf4) + (.add.vf vf1 vf2 vf3) + (.svf (&-> this extra quad) vf4) + (.svf (&-> this color quad) vf1) + (.mov v1-1 vf1) + ) + (let ((f0-0 0.1)) + (when (and (>= f0-0 (fabs (- (-> this color-dest x) (-> this color x)))) + (>= f0-0 (fabs (- (-> this color-dest y) (-> this color y)))) + (>= f0-0 (fabs (- (-> this color-dest z) (-> this color z)))) + (>= f0-0 (fabs (- (-> this color-dest w) (-> this color w)))) + (>= f0-0 (-> this color w)) + ) + (disable this) + (return 0) + ) + ) + (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> this bucket) + ) + (dma-buffer-add-gs-set s4-0 (test-1 (-> this ztest))) + (let ((t1-0 (new 'static 'rgba + :r (the int (-> this color x)) + :g (the int (-> this color y)) + :b (the int (-> this color z)) + :a (the int (-> this color w)) + ) + ) + ) + (draw-sprite2d-xy s4-0 -256 -208 512 416 t1-0 (-> this depth)) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 10 of type screen-filter +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod setup ((this screen-filter) + (arg0 vector) + (arg1 vector) + (arg2 float) + (arg3 bucket-id) + (arg4 int) + (arg5 int) + (arg6 symbol) + ) + "Initialize the screen-filter with the given settings." + (set! (-> this draw?) #t) + (set! (-> this color quad) (-> arg0 quad)) + (set! (-> this color-src quad) (-> arg0 quad)) + (set! (-> this color-dest quad) (-> arg1 quad)) + (set! (-> this extra x) arg2) + (set! (-> this extra y) 0.0) + (set! (-> this bucket) arg3) + (set! (-> this depth) arg4) + (set! (-> this ztest) (the-as uint arg5)) + (set! (-> this lock-vsync?) arg6) + 0 + (none) + ) + +;; definition for method 11 of type screen-filter +;; WARN: Return type mismatch int vs none. +(defmethod disable ((this screen-filter)) + (set! (-> this draw?) #f) + 0 + (none) + ) + +;; definition for symbol *cheat-temp*, type (pointer int32) +(define *cheat-temp* (the-as (pointer int32) (malloc 'global 20))) + +;; definition for symbol *master-exit*, type symbol +(define *master-exit* #f) + +;; definition for symbol *progress-cheat*, type symbol +(define *progress-cheat* #f) + +;; definition for symbol *first-boot*, type symbol +(define *first-boot* #t) + +;; definition for function main-timeouts +;; WARN: Return type mismatch int vs none. +(defun main-timeouts () + "Maybe reset/restart the game if no input has been given. + Mainly used for kiosk/demo modes." + (when (demo?) + (let ((gp-0 (scf-get-timeout)) + (v1-1 (scf-get-inactive-timeout)) + ) + (when (and (or (and (nonzero? gp-0) + (>= (+ -300000 (-> *display* real-clock frame-counter)) (the int (* 300.0 (the float gp-0)))) + ) + (and (nonzero? v1-1) + (or (and (>= (- (-> *display* base-clock frame-counter) (-> *cpad-list* cpads 0 change-time)) + (the int (* 300.0 (the float v1-1))) + ) + (>= (- (-> *display* game-clock frame-counter) (-> *game-info* kiosk-timeout)) + (the int (* 300.0 (the float v1-1))) + ) + ) + (and (or (= *master-mode* 'pause) (= *master-mode* 'progress) (= *master-mode* 'freeze)) + (>= (- (-> *display* real-clock frame-counter) (-> *game-info* pause-start-time)) + (the int (* 300.0 (the float v1-1))) + ) + ) + ) + ) + (or (= *master-exit* 'force) (= *master-exit* 'movie)) + ) + (or *master-exit* (-> *setting-control* user-current allow-timeout)) + (!= *master-exit* #t) + ) + (cond + ((and (= *kernel-boot-message* 'demo) (not *master-exit*)) + (let ((v1-17 (level-get-target-inside *level*))) + (when (and v1-17 (!= (-> v1-17 name) 'demo) (not (logtest? (-> v1-17 info level-flags) (level-flags lf0)))) + (persist-with-delay *setting-control* 'sfx-volume (seconds 0.5) 'sfx-volume 'abs 0.0 0) + (persist-with-delay *setting-control* 'music-volume (seconds 0.5) 'music-volume 'abs 0.0 0) + (persist-with-delay *setting-control* 'dialog-volume (seconds 0.5) 'dialog-volume 'abs 0.0 0) + (persist-with-delay *setting-control* 'ambient-volume (seconds 0.5) 'ambient-volume 'abs 0.0 0) + (set! (-> *setting-control* user-current sfx-volume) 0.01) + (set! (-> *setting-control* user-current music-volume) 0.01) + (set! (-> *setting-control* user-current dialog-volume) 0.01) + (set! (-> *setting-control* user-current ambient-volume) 0.01) + (apply-settings *setting-control*) + (set! (-> *game-info* mode) 'play) + (initialize! *game-info* 'game (the-as game-save #f) "title-restart" (the-as resetter-spec #f)) + ) + ) + ) + (else + (when (process-spawn-function + process + (lambda ((arg0 int)) + (set-blackout-frames (seconds 100)) + (set! (-> *setting-control* user-default allow-pause) #f) + (set! (-> *setting-control* user-default allow-progress) #f) + (apply-settings *setting-control*) + (set! (-> *setting-control* user-default sfx-volume) 0.0) + (set! (-> *setting-control* user-default music-volume) 0.0) + (set! (-> *setting-control* user-default dialog-volume) 0.0) + (set! (-> *setting-control* user-default ambient-volume) 0.0) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (seconds 0.1)) + (suspend) + ) + ) + (kernel-shutdown arg0) + (none) + ) + (if (= *master-exit* 'movie) + 2 + 1 + ) + :to *display-pool* + ) + (set! (-> *setting-control* user-default sfx-volume) 0.0) + (set! (-> *setting-control* user-default music-volume) 0.0) + (set! (-> *setting-control* user-default dialog-volume) 0.0) + (set! (-> *setting-control* user-default ambient-volume) 0.0) + (set! *master-exit* #t) + ) + ) + ) + ) + ) + ) + (case *kernel-boot-message* + (('kiosk) + (if (and (= *master-mode* 'pause) + (>= (- (-> *display* real-clock frame-counter) (-> *cpad-list* cpads 0 real-change-time)) (seconds 60)) + ) + (set-master-mode 'game) + ) + ) + ) + 0 + (none) + ) + +;; definition for function main-cheats +;; WARN: Return type mismatch int vs none. +(defun main-cheats () + (when (and (cpad-hold? 0 l3) (or *cheat-mode* (not (demo?)))) + ((lambda () + (when (nonzero? (-> *cpad-list* cpads 0 button0-rel 0)) + (let ((v1-5 (-> *cheat-temp* 0))) + (cond + ((zero? v1-5) + (cond + ((cpad-pressed? 0 up) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 1) + (cond + ((cpad-pressed? 0 up) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 2) + (cond + ((cpad-pressed? 0 down) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 3) + (cond + ((cpad-pressed? 0 down) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 4) + (cond + ((cpad-pressed? 0 left) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 5) + (cond + ((cpad-pressed? 0 right) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 6) + (cond + ((cpad-pressed? 0 left) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 7) + (cond + ((cpad-pressed? 0 right) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 8) + (cond + ((cpad-pressed? 0 x) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 9) + (cond + ((cpad-pressed? 0 x) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 10) + (cond + ((cpad-pressed? 0 square) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 11) + (cond + ((cpad-pressed? 0 circle) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 12) + (cond + ((cpad-pressed? 0 square) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= v1-5 13) + (cond + ((cpad-pressed? 0 circle) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r1)) + (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 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 + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ) + ) + ) + (when *cheat-mode* + (when (nonzero? (-> *cpad-list* cpads 0 button0-rel 0)) + (let ((v1-146 (-> *cheat-temp* 1))) + (cond + ((zero? v1-146) + (cond + ((cpad-pressed? 0 circle) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 1) + (cond + ((cpad-pressed? 0 square) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 2) + (cond + ((cpad-pressed? 0 circle) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 3) + (cond + ((cpad-pressed? 0 square) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 4) + (cond + ((cpad-pressed? 0 x) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 5) + (cond + ((cpad-pressed? 0 x) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 6) + (cond + ((cpad-pressed? 0 right) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 7) + (cond + ((cpad-pressed? 0 left) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 8) + (cond + ((cpad-pressed? 0 right) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 9) + (cond + ((cpad-pressed? 0 left) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 10) + (cond + ((cpad-pressed? 0 down) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 11) + (cond + ((cpad-pressed? 0 down) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 12) + (cond + ((cpad-pressed? 0 up) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= v1-146 13) + (cond + ((cpad-pressed? 0 up) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r1)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons r1)) + (set! *cheat-mode* (if (= *cheat-mode* 'debug) + #t + 'debug + ) + ) + (if (= *cheat-mode* 'debug) + (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 + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ) + ) + ) + ) + (none) + ) + ) + ((lambda () + (scf-get-territory) + (when (nonzero? (-> *cpad-list* cpads 0 button0-rel 0)) + (let ((v1-6 (-> *cheat-temp* 2))) + (cond + ((zero? v1-6) + (cond + ((cpad-pressed? 0 l1) + (+! (-> *cheat-temp* 2) 1) + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ((= v1-6 1) + (cond + ((cpad-pressed? 0 r1) + (+! (-> *cheat-temp* 2) 1) + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ((= v1-6 2) + (cond + ((cpad-pressed? 0 l1) + (+! (-> *cheat-temp* 2) 1) + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ((= v1-6 3) + (cond + ((cpad-pressed? 0 r1) + (+! (-> *cheat-temp* 2) 1) + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ((= v1-6 4) + (cond + ((cpad-pressed? 0 triangle) + (+! (-> *cheat-temp* 2) 1) + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ((= v1-6 5) + (cond + ((cpad-pressed? 0 circle) + (+! (-> *cheat-temp* 2) 1) + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ((= v1-6 6) + (cond + ((cpad-pressed? 0 x) + (+! (-> *cheat-temp* 2) 1) + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ((= v1-6 7) + (cond + ((cpad-pressed? 0 square) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r1)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons r1)) + (set! *progress-cheat* (if *progress-cheat* + #f + 'language + ) + ) + (if *progress-cheat* + (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 + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ) + ) + ) + (when *debug-segment* + (when (nonzero? (-> *cpad-list* cpads 0 button0-rel 0)) + (let ((v1-94 (-> *cheat-temp* 3))) + (cond + ((zero? v1-94) + (cond + ((cpad-pressed? 0 x) + (+! (-> *cheat-temp* 3) 1) + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ((= v1-94 1) + (cond + ((cpad-pressed? 0 square) + (+! (-> *cheat-temp* 3) 1) + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ((= v1-94 2) + (cond + ((cpad-pressed? 0 triangle) + (+! (-> *cheat-temp* 3) 1) + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ((= v1-94 3) + (cond + ((cpad-pressed? 0 circle) + (+! (-> *cheat-temp* 3) 1) + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ((= v1-94 4) + (cond + ((cpad-pressed? 0 x) + (+! (-> *cheat-temp* 3) 1) + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ((= v1-94 5) + (cond + ((cpad-pressed? 0 square) + (+! (-> *cheat-temp* 3) 1) + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ((= v1-94 6) + (cond + ((cpad-pressed? 0 triangle) + (+! (-> *cheat-temp* 3) 1) + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ((= v1-94 7) + (cond + ((cpad-pressed? 0 circle) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r1)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons r1)) + (set! *progress-cheat* (if *progress-cheat* + #f + 'pal + ) + ) + (if *progress-cheat* + (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 + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ) + ) + ) + (when (nonzero? (-> *cpad-list* cpads 1 button0-rel 0)) + (let ((v1-180 (-> *cheat-temp* 5))) + (cond + ((zero? v1-180) + (cond + ((cpad-pressed? 1 triangle) + (+! (-> *cheat-temp* 5) 1) + ) + (else + (set! (-> *cheat-temp* 5) 0) + 0 + ) + ) + ) + ((= v1-180 1) + (cond + ((cpad-pressed? 1 x) + (+! (-> *cheat-temp* 5) 1) + ) + (else + (set! (-> *cheat-temp* 5) 0) + 0 + ) + ) + ) + ((= v1-180 2) + (cond + ((cpad-pressed? 1 circle) + (+! (-> *cheat-temp* 5) 1) + ) + (else + (set! (-> *cheat-temp* 5) 0) + 0 + ) + ) + ) + ((= v1-180 3) + (cond + ((cpad-pressed? 1 square) + (+! (-> *cheat-temp* 5) 1) + ) + (else + (set! (-> *cheat-temp* 5) 0) + 0 + ) + ) + ) + ((= v1-180 4) + (cond + ((cpad-pressed? 1 triangle) + (+! (-> *cheat-temp* 5) 1) + ) + (else + (set! (-> *cheat-temp* 5) 0) + 0 + ) + ) + ) + ((= v1-180 5) + (cond + ((cpad-pressed? 1 x) + (+! (-> *cheat-temp* 5) 1) + ) + (else + (set! (-> *cheat-temp* 5) 0) + 0 + ) + ) + ) + ((= v1-180 6) + (cond + ((cpad-pressed? 1 circle) + (+! (-> *cheat-temp* 5) 1) + ) + (else + (set! (-> *cheat-temp* 5) 0) + 0 + ) + ) + ) + ((= v1-180 7) + (cond + ((cpad-pressed? 1 square) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r1)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons r1)) + (set! *cheat-mode* (if (= *cheat-mode* 'camera) + #f + 'camera + ) + ) + (cond + (*cheat-mode* + (if (not *external-cam-mode*) + (external-cam-reset!) + ) + (set! *external-cam-mode* 'pad-1) + (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 0 :fo-curve 1) (new-sound-id) (the-as vector #t)) + ) + ) + (set! (-> *cheat-temp* 5) 0) + 0 + ) + (else + (set! (-> *cheat-temp* 5) 0) + 0 + ) + ) + ) + ) + ) + ) + ) + (none) + ) + ) + ) + (if (and *cheat-mode* (not *debug-segment*) (cpad-hold? 1 l3)) + ((lambda () + (cond + ((cpad-pressed? 1 x) + (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) + (send-event *target* 'get-pickup (pickup-type eco-pill-dark) 1000.0) + (send-event *target* 'get-pickup (pickup-type eco-pill-light) 1000.0) + (send-event *target* 'get-pickup (pickup-type skill) 1000.0) + (send-event *target* 'get-pickup (pickup-type gem) 1000.0) + (set! (-> *game-info* features) + (the-as + game-feature + (logior (game-feature + gun + gun-red-1 + gun-red-2 + gun-red-3 + gun-yellow-1 + gun-yellow-2 + gun-yellow-3 + gun-blue-1 + gun-blue-2 + gun-blue-3 + gun-dark-1 + gun-dark-2 + gun-dark-3 + board + darkjak + darkjak-smack + darkjak-bomb0 + darkjak-bomb1 + feature44 + feature45 + lightjak + lightjak-regen + lightjak-swoop + lightjak-freeze + lightjak-shield + ) + (-> *game-info* features) + ) + ) + ) + (set! (-> *game-info* debug-features) + (the-as + game-feature + (logior (game-feature gun gun-red-1 gun-yellow-1 gun-blue-1 gun-dark-1 board darkjak lightjak) + (-> *game-info* debug-features) + ) + ) + ) + (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 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 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 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 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)) + ) + ) + ) + (none) + ) + ) + ) + (if (and *display-bug-report* (not *progress-process*)) + (position->stream *stdcon* '*stdcon* #t) + ) + (when (and (= *cheat-mode* 'debug) (not *debug-segment*)) + (when (and (cpad-hold? 0 l1) (cpad-hold? 0 l2) (cpad-hold? 0 r1) (cpad-pressed? 0 r2)) + (if *target* + (stop 'debug) + (start 'play (get-current-continue-forced *game-info*)) + ) + ) + (if (and (cpad-hold? 0 left) (cpad-hold? 0 up) (cpad-pressed? 0 select)) + (initialize! *game-info* 'game (the-as game-save #f) "title-restart" (the-as resetter-spec #f)) + ) + (if (cpad-pressed? 1 r3) + (inspect global) + ) + (when (cpad-hold? 1 r3) + (with-dma-buffer-add-bucket ((s5-1 (if *debug-segment* + (-> *display* frames (-> *display* on-screen) debug-buf) + (-> *display* frames (-> *display* on-screen) global-buf) + ) + ) + (bucket-id debug) + ) + (show-iop-memory s5-1) + ) + ) + (if (cpad-pressed? 1 triangle) + (set! *display-level-border* (not *display-level-border*)) + ) + ) + (main-timeouts) + 0 + (none) + ) + +;; definition for function end-display +;; WARN: Return type mismatch int vs none. +(defun end-display ((arg0 display)) + (let ((s5-0 (-> (if *debug-segment* + (-> arg0 frames (-> arg0 on-screen) debug-buf) + (-> arg0 frames (-> arg0 on-screen) global-buf) + ) + base + ) + ) + ) + (when *debug-segment* + (let ((s4-0 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-17 'debug) + (s3-0 *profile-debug-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s2-0 (-> s4-0 data (-> s4-0 count)))) + (let ((s1-0 (-> s4-0 base-time))) + (set! (-> s2-0 name) v1-17) + (set! (-> s2-0 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s1-0)))) + ) + (set! (-> s2-0 depth) (the-as uint (-> s4-0 depth))) + (set! (-> s2-0 color) s3-0) + (set! (-> s4-0 segment (-> s4-0 depth)) s2-0) + ) + (set! (-> s4-0 count) (min 1023 (+ (-> s4-0 count) 1))) + (+! (-> s4-0 depth) 1) + (set! (-> s4-0 max-depth) (max (-> s4-0 max-depth) (-> s4-0 depth))) + ) + ) + 0 + ) + (with-dma-buffer-add-bucket ((s3-1 (if *debug-segment* + (-> arg0 frames (-> arg0 on-screen) debug-buf) + (-> arg0 frames (-> arg0 on-screen) global-buf) + ) + ) + (bucket-id debug-no-zbuf2) + ) + (if (and (= *master-mode* 'pause) + (and (!= *cheat-mode* 'camera) (or (zero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1))) + ) + (draw-string-xy + (lookup-text! *common-text* (text-id progress-pause) #f) + s3-1 + 256 + (if (< (-> *display* base-clock frame-counter) (-> *game-info* letterbox-time)) + 352 + 320 + ) + (font-color red) + (font-flags shadow kerning middle large) + ) + ) + (let ((s2-2 (the int (-> *font-context* origin y)))) + (cond + ((or (!= (-> *setting-control* user-current letterbox) 0.0) + (< (-> *display* base-clock frame-counter) (-> *game-info* letterbox-time)) + ) + (+! s2-2 56) + ) + ((and *display-profile* (not *display-capture-mode*)) + (+! s2-2 48) + ) + ) + (when (or (zero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1) (-> *screen-shot-work* hud-enable)) + (let* ((v1-73 + (draw-string-xy + *stdcon0* + s3-1 + (the int (-> *font-context* origin x)) + s2-2 + (font-color default) + (font-flags shadow kerning) + ) + ) + (a3-4 (+ s2-2 (the int (* 2.0 (-> v1-73 b))))) + ) + (draw-string-xy + *stdcon1* + s3-1 + (the int (-> *font-context* origin x)) + a3-4 + (font-color default) + (font-flags shadow kerning) + ) + ) + ) + ) + (if (or (not *debug-segment*) *display-capture-mode*) + (set! *stdebug* *null*) + (set! *stdebug* *stdcon1*) + ) + (if *display-iop-info* + (show-iop-info s3-1) + ) + (if *display-memcard-info* + (show-mc-info s3-1) + ) + ) + (set! *stdcon* (clear *stdcon0*)) + (when *debug-segment* + (let ((s4-2 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-108 (+ (-> s4-2 depth) -1)) + (s3-2 (-> s4-2 segment v1-108)) + (s2-3 (-> s4-2 base-time)) + ) + (when (>= v1-108 0) + (set! (-> s3-2 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s2-3)))) + (+! (-> s4-2 depth) -1) + ) + ) + ) + ) + 0 + ) + (let ((v1-113 *dma-mem-usage*)) + (when (nonzero? v1-113) + (set! (-> v1-113 length) (max 89 (-> v1-113 length))) + (set! (-> v1-113 data 88 name) "debug") + (+! (-> v1-113 data 88 count) 1) + (+! (-> v1-113 data 88 used) (&- + (-> (if *debug-segment* + (-> arg0 frames (-> arg0 on-screen) debug-buf) + (-> arg0 frames (-> arg0 on-screen) global-buf) + ) + base + ) + (the-as uint s5-0) + ) + ) + (set! (-> v1-113 data 88 total) (-> v1-113 data 88 used)) + ) + ) + ) + 0 + (none) + ) + +;; definition for function display-loop-main +;; WARN: Return type mismatch int vs none. +(defun display-loop-main ((arg0 display)) + (with-pp + (if (-> *level* loading-level) + (load-continue (-> *level* loading-level)) + ) + (when *debug-segment* + (let ((s5-0 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-13 'merc) + (s4-0 *profile-merc-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s3-0 (-> s5-0 data (-> s5-0 count)))) + (let ((s2-0 (-> s5-0 base-time))) + (set! (-> s3-0 name) v1-13) + (set! (-> s3-0 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s2-0)))) + ) + (set! (-> s3-0 depth) (the-as uint (-> s5-0 depth))) + (set! (-> s3-0 color) s4-0) + (set! (-> s5-0 segment (-> s5-0 depth)) s3-0) + ) + (set! (-> s5-0 count) (min 1023 (+ (-> s5-0 count) 1))) + (+! (-> s5-0 depth) 1) + (set! (-> s5-0 max-depth) (max (-> s5-0 max-depth) (-> s5-0 depth))) + ) + ) + 0 + ) + (blerc-execute) + (blerc-init) + (when *debug-segment* + (let ((s5-1 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-37 (+ (-> s5-1 depth) -1)) + (s4-1 (-> s5-1 segment v1-37)) + (s3-1 (-> s5-1 base-time)) + ) + (when (>= v1-37 0) + (set! (-> s4-1 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-1)))) + (+! (-> s5-1 depth) -1) + ) + ) + ) + ) + 0 + ) + (texscroll-execute) + (ripple-execute) + (region-execute) + (when *debug-segment* + (let ((s5-2 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-50 'joints) + (s4-2 *profile-joints-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s3-2 (-> s5-2 data (-> s5-2 count)))) + (let ((s2-1 (-> s5-2 base-time))) + (set! (-> s3-2 name) v1-50) + (set! (-> s3-2 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s2-1)))) + ) + (set! (-> s3-2 depth) (the-as uint (-> s5-2 depth))) + (set! (-> s3-2 color) s4-2) + (set! (-> s5-2 segment (-> s5-2 depth)) s3-2) + ) + (set! (-> s5-2 count) (min 1023 (+ (-> s5-2 count) 1))) + (+! (-> s5-2 depth) 1) + (set! (-> s5-2 max-depth) (max (-> s5-2 max-depth) (-> s5-2 depth))) + ) + ) + 0 + ) + (execute-math-engine) + (when *debug-segment* + (let ((s5-3 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-74 (+ (-> s5-3 depth) -1)) + (s4-3 (-> s5-3 segment v1-74)) + (s3-3 (-> s5-3 base-time)) + ) + (when (>= v1-74 0) + (set! (-> s4-3 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-3)))) + (+! (-> s5-3 depth) -1) + ) + ) + ) + ) + 0 + ) + (execute-cloth-engine) + (when *debug-segment* + (let ((s5-4 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-87 'debug) + (s4-4 *profile-debug-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s3-4 (-> s5-4 data (-> s5-4 count)))) + (let ((s2-2 (-> s5-4 base-time))) + (set! (-> s3-4 name) v1-87) + (set! (-> s3-4 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s2-2)))) + ) + (set! (-> s3-4 depth) (the-as uint (-> s5-4 depth))) + (set! (-> s3-4 color) s4-4) + (set! (-> s5-4 segment (-> s5-4 depth)) s3-4) + ) + (set! (-> s5-4 count) (min 1023 (+ (-> s5-4 count) 1))) + (+! (-> s5-4 depth) 1) + (set! (-> s5-4 max-depth) (max (-> s5-4 max-depth) (-> s5-4 depth))) + ) + ) + 0 + ) + (let* ((s5-5 *debug-hook*) + (t9-13 (car s5-5)) + ) + (while (not (null? s5-5)) + ((the-as (function none) t9-13)) + (set! s5-5 (cdr s5-5)) + (set! t9-13 (car s5-5)) + ) + ) + (main-cheats) + (when *debug-segment* + (let ((s5-6 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-115 (+ (-> s5-6 depth) -1)) + (s4-5 (-> s5-6 segment v1-115)) + (s3-5 (-> s5-6 base-time)) + ) + (when (>= v1-115 0) + (set! (-> s4-5 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-5)))) + (+! (-> s5-6 depth) -1) + ) + ) + ) + ) + 0 + ) + (when *debug-segment* + (let ((s5-7 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-128 'camera) + (s4-6 *profile-camera-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s3-6 (-> s5-7 data (-> s5-7 count)))) + (let ((s2-3 (-> s5-7 base-time))) + (set! (-> s3-6 name) v1-128) + (set! (-> s3-6 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s2-3)))) + ) + (set! (-> s3-6 depth) (the-as uint (-> s5-7 depth))) + (set! (-> s3-6 color) s4-6) + (set! (-> s5-7 segment (-> s5-7 depth)) s3-6) + ) + (set! (-> s5-7 count) (min 1023 (+ (-> s5-7 count) 1))) + (+! (-> s5-7 depth) 1) + (set! (-> s5-7 max-depth) (max (-> s5-7 max-depth) (-> s5-7 depth))) + ) + ) + 0 + ) + (update-camera) + (execute-cam-post-hook-engine) + (when *debug-segment* + (let ((s5-8 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-152 (+ (-> s5-8 depth) -1)) + (s4-7 (-> s5-8 segment v1-152)) + (s3-7 (-> s5-8 base-time)) + ) + (when (>= v1-152 0) + (set! (-> s4-7 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-7)))) + (+! (-> s5-8 depth) -1) + ) + ) + ) + ) + 0 + ) + (update *bigmap*) + (if (-> *level* loading-level) + (load-continue (-> *level* loading-level)) + ) + (when *debug-segment* + (let ((s5-9 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-173 'draw-hook) + (s4-8 *profile-draw-hook-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s3-8 (-> s5-9 data (-> s5-9 count)))) + (let ((s2-4 (-> s5-9 base-time))) + (set! (-> s3-8 name) v1-173) + (set! (-> s3-8 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s2-4)))) + ) + (set! (-> s3-8 depth) (the-as uint (-> s5-9 depth))) + (set! (-> s3-8 color) s4-8) + (set! (-> s5-9 segment (-> s5-9 depth)) s3-8) + ) + (set! (-> s5-9 count) (min 1023 (+ (-> s5-9 count) 1))) + (+! (-> s5-9 depth) 1) + (set! (-> s5-9 max-depth) (max (-> s5-9 max-depth) (-> s5-9 depth))) + ) + ) + 0 + ) + (*draw-hook*) + (when *debug-segment* + (let ((s5-10 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-197 (+ (-> s5-10 depth) -1)) + (s4-9 (-> s5-10 segment v1-197)) + (s3-9 (-> s5-10 base-time)) + ) + (when (>= v1-197 0) + (set! (-> s4-9 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-9)))) + (+! (-> s5-10 depth) -1) + ) + ) + ) + ) + 0 + ) + (if (-> *level* loading-level) + (load-continue (-> *level* loading-level)) + ) + (if *display-color-bars* + (draw-color-bars *blit-displays-work*) + ) + (*menu-hook*) + (load-level-text-files -1) + (when (-> *screen-filter* draw?) + (if (-> *screen-filter* lock-vsync?) + (set! (-> arg0 force-sync) (the-as uint (max 4 (the-as int (-> arg0 force-sync))))) + ) + (draw *screen-filter*) + ) + (when (or (!= (-> *setting-control* user-current letterbox) 0.0) + (< (-> *display* base-clock frame-counter) (-> *game-info* letterbox-time)) + ) + (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) (-> *screen-shot-work* hud-enable)) + ) + (letterbox + (bucket-id tex-hud-pris2) + (if (< (-> *display* base-clock frame-counter) (-> *game-info* letterbox-time)) + 1.0 + (-> *setting-control* user-current letterbox) + ) + ) + ) + ) + (when (-> *setting-control* user-current render) + (if (< (-> *display* base-clock frame-counter) (-> *game-info* blackout-time)) + (set! (-> *setting-control* user-default bg-a-force) 1.0) + (set! (-> *setting-control* user-default bg-a-force) 0.0) + ) + ) + (when *debug-segment* + (let ((s5-11 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-266 'blit-displays) + (s4-10 *profile-blit-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s3-10 (-> s5-11 data (-> s5-11 count)))) + (let ((s2-5 (-> s5-11 base-time))) + (set! (-> s3-10 name) v1-266) + (set! (-> s3-10 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s2-5)))) + ) + (set! (-> s3-10 depth) (the-as uint (-> s5-11 depth))) + (set! (-> s3-10 color) s4-10) + (set! (-> s5-11 segment (-> s5-11 depth)) s3-10) + ) + (set! (-> s5-11 count) (min 1023 (+ (-> s5-11 count) 1))) + (+! (-> s5-11 depth) 1) + (set! (-> s5-11 max-depth) (max (-> s5-11 max-depth) (-> s5-11 depth))) + ) + ) + 0 + ) + (blit-displays-work-method-19 *blit-displays-work*) + (when *debug-segment* + (let ((s5-12 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-292 (+ (-> s5-12 depth) -1)) + (s4-11 (-> s5-12 segment v1-292)) + (s3-11 (-> s5-12 base-time)) + ) + (when (>= v1-292 0) + (set! (-> s4-11 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-11)))) + (+! (-> s5-12 depth) -1) + ) + ) + ) + ) + 0 + ) + (end-display arg0) + (display-frame-finish arg0) + (display-sync arg0) + (when *debug-segment* + (start-frame! (-> arg0 frames (-> arg0 on-screen) profile-array data 0)) + (let* ((v1-307 (-> *perf-stats* data)) + (a0-109 (-> v1-307 0 ctrl)) + ) + (+! (-> v1-307 0 count) 1) + (b! (zero? a0-109) cfg-132 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-109) + ) + (.sync.l) + (.sync.p) + (label cfg-132) + 0 + ) + (set! (-> *time-of-day-context* title-updated) #f) + (set! *teleport* #f) + (when (nonzero? *teleport-count*) + (set! *teleport* #t) + (set! *teleport-count* (+ *teleport-count* -1)) + ) + (execute-particle-local-space-engine 0) + (let ((gp-1 (-> pp clock))) + (set! (-> pp clock) (-> *display* part-clock)) + (process-particles) + (set! (-> pp clock) gp-1) + ) + (execute-particle-local-space-engine 1) + (dma-send + (the-as dma-bank #x10008000) + (the-as uint (-> *collide-vif0-init* data)) + (the-as uint (/ (-> *collide-vif0-init* length) 4)) + ) + (swap-sound-buffers + (ear-trans 0) + (ear-trans 1) + (if (-> *setting-control* user-current lock-sound-camera-to-target) + (ear-trans 1) + (camera-pos) + ) + (-> (math-camera-matrix) fvec) + (-> (math-camera-matrix) rvec) + (-> *setting-control* user-current sound-ear-scale) + ) + (str-play-kick) + (level-update *level*) + (mc-run) + (auto-save-check) + 0 + (none) + ) + ) + +;; definition for function display-loop +(defbehavior display-loop process () + "Main loop for running the game." + (stack-size-set! (-> self main-thread) 512) + (process-spawn-function + process + (lambda :behavior process + () + (logclear! (-> self mask) (process-mask freeze pause menu progress entity)) + (until #f + (when *debug-segment* + (let ((gp-0 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-9 'joints) + (s5-0 *profile-joints-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s4-0 (-> gp-0 data (-> gp-0 count)))) + (let ((s3-0 (-> gp-0 base-time))) + (set! (-> s4-0 name) v1-9) + (set! (-> s4-0 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-0)))) + ) + (set! (-> s4-0 depth) (the-as uint (-> gp-0 depth))) + (set! (-> s4-0 color) s5-0) + (set! (-> gp-0 segment (-> gp-0 depth)) s4-0) + ) + (set! (-> gp-0 count) (min 1023 (+ (-> gp-0 count) 1))) + (+! (-> gp-0 depth) 1) + (set! (-> gp-0 max-depth) (max (-> gp-0 max-depth) (-> gp-0 depth))) + ) + ) + 0 + ) + (execute-math-engine) + (when *debug-segment* + (let ((gp-1 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-33 (+ (-> gp-1 depth) -1)) + (s5-1 (-> gp-1 segment v1-33)) + (s4-1 (-> gp-1 base-time)) + ) + (when (>= v1-33 0) + (set! (-> s5-1 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-1)))) + (+! (-> gp-1 depth) -1) + ) + ) + ) + ) + 0 + ) + (suspend) + ) + #f + ) + :name "matrix" + :from *4k-dead-pool* + :to *mid-pool* + ) + (let ((gp-1 *display*)) + (set! *teleport* #t) + (update *setting-control*) + (init-time-of-day-context *time-of-day-context*) + (display-sync gp-1) + (display-frame-finish gp-1) + (display-sync gp-1) + (install-handler 3 vblank-handler) + (free-nodes *touching-list*) + (prepare *collide-rider-pool*) + (update-actor-hash) + (blerc-init) + (dma-send + (the-as dma-bank #x10008000) + (the-as uint (-> *collide-vif0-init* data)) + (the-as uint (/ (-> *collide-vif0-init* length) 4)) + ) + (suspend) + (set! (-> *setting-control* user-default bg-a) 0.0) + (set! (-> gp-1 frames 0 start-time) (timer-count (the-as timer-bank #x10000800))) + (set! (-> gp-1 frames 1 start-time) (timer-count (the-as timer-bank #x10000800))) + (set! (-> gp-1 dog-ratio) 1.0) + (while *run* + (display-loop-main gp-1) + (when *debug-segment* + (let ((s5-0 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-27 'actors) + (s4-0 *profile-actors-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s3-0 (-> s5-0 data (-> s5-0 count)))) + (let ((s2-0 (-> s5-0 base-time))) + (set! (-> s3-0 name) v1-27) + (set! (-> s3-0 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s2-0)))) + ) + (set! (-> s3-0 depth) (the-as uint (-> s5-0 depth))) + (set! (-> s3-0 color) s4-0) + (set! (-> s5-0 segment (-> s5-0 depth)) s3-0) + ) + (set! (-> s5-0 count) (min 1023 (+ (-> s5-0 count) 1))) + (+! (-> s5-0 depth) 1) + (set! (-> s5-0 max-depth) (max (-> s5-0 max-depth) (-> s5-0 depth))) + ) + ) + 0 + ) + (suspend) + (when *debug-segment* + (let ((s5-1 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-51 (+ (-> s5-1 depth) -1)) + (s4-1 (-> s5-1 segment v1-51)) + (s3-1 (-> s5-1 base-time)) + ) + (when (>= v1-51 0) + (set! (-> s4-1 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-1)))) + (+! (-> s5-1 depth) -1) + ) + ) + ) + ) + 0 + ) + ) + ) + (set! *dproc* #f) + (format 0 "display is off #<#x~X>.~%" self) + 0 + ) + +;; definition for function on +(defun on ((arg0 symbol)) + "Start the display process." + (when (not *dproc*) + (when (not arg0) + (if (= (-> *level* level0 status) 'inactive) + (bg 'halfpipe) + ) + ) + (set! *run* #t) + (set! *dproc* (ppointer->process (process-spawn-function + process + display-loop + :name "display" + :from *4k-dead-pool* + :to *display-pool* + :stack *kernel-dram-stack* + ) + ) + ) + (cond + ((or (level-get-with-status *level* 'loaded) + (level-get-with-status *level* 'alive) + (level-get-with-status *level* 'active) + ) + (activate-levels! *level*) + (when (not arg0) + (let ((gp-1 (entity-by-type camera-start))) + (when (and gp-1 (type? gp-1 entity-actor)) + (while (not (camera-teleport-to-entity gp-1)) + (suspend) + ) + ) + ) + ) + (if (and (= *kernel-boot-message* 'art-group) *kernel-boot-art-group*) + (anim-tester-add-object *kernel-boot-art-group*) + ) + ) + (else + (kill-by-name "display" *active-pool*) + (set! *dproc* #f) + ) + ) + ) + *dproc* + ) + +;; definition for function off +;; WARN: Return type mismatch int vs none. +(defun off () + "Stop the display process." + (stop 'debug) + (dotimes (gp-0 (-> *level* length)) + (let ((a0-2 (-> *level* level gp-0))) + (if (= (-> a0-2 status) 'active) + (deactivate a0-2) + ) + ) + ) + (set! *run* #f) + 0 + (none) + ) diff --git a/test/decompiler/reference/jak3/engine/game/settings-h_REF.gc b/test/decompiler/reference/jak3/engine/game/settings-h_REF.gc index 1abc5933a2..a8ea297ae3 100644 --- a/test/decompiler/reference/jak3/engine/game/settings-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/game/settings-h_REF.gc @@ -700,13 +700,13 @@ ) (:methods (new (symbol type int) _type_) - (add-setting (_type_ process symbol object object object) none) + (add-setting (_type_ process symbol object object object) connection) (persist-with-delay (_type_ symbol time-frame symbol symbol float int) none) - (set-setting (_type_ process symbol object object object) none) + (set-setting (_type_ process symbol object object object) connection) (remove-setting (_type_ process symbol) none) (kill-persister (_type_ engine-pers object) none) (setting-control-method-14 (_type_ object) connectable) - (setting-control-method-15 (_type_ object) connectable) + (get-setting (_type_ object) connectable) (remove-setting-by-arg0 (_type_ object) none) (set-setting-by-param (_type_ symbol object object object) connection) (apply-settings (_type_) user-setting-data) @@ -753,7 +753,3 @@ ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/engine/game/settings_REF.gc b/test/decompiler/reference/jak3/engine/game/settings_REF.gc index 497d957b3c..5e0f503e4c 100644 --- a/test/decompiler/reference/jak3/engine/game/settings_REF.gc +++ b/test/decompiler/reference/jak3/engine/game/settings_REF.gc @@ -1186,18 +1186,14 @@ ) ;; definition for method 9 of type setting-control -;; WARN: Return type mismatch connection vs none. (defmethod add-setting ((this setting-control) (arg0 process) (arg1 symbol) (arg2 object) (arg3 object) (arg4 object)) (add-connection (-> this engine) arg0 arg1 arg2 arg3 arg4) - (none) ) ;; definition for method 11 of type setting-control -;; WARN: Return type mismatch connection vs none. (defmethod set-setting ((this setting-control) (arg0 process) (arg1 symbol) (arg2 object) (arg3 object) (arg4 object)) (remove-setting this arg0 arg1) (add-connection (-> this engine) arg0 arg1 arg2 arg3 arg4) - (none) ) ;; definition for method 10 of type setting-control @@ -1261,7 +1257,7 @@ ) ;; definition for method 15 of type setting-control -(defmethod setting-control-method-15 ((this setting-control) (arg0 object)) +(defmethod get-setting ((this setting-control) (arg0 object)) (let ((v1-1 (-> this engine-hi alive-list next0))) (-> this engine-hi) (let ((a2-2 (-> (the-as connection v1-1) next0))) @@ -1429,13 +1425,7 @@ (set! (-> s5-0 allow-error) (-> s4-0 allow-error)) (set! (-> s5-0 under-water-pitch-mod) (-> s4-0 under-water-pitch-mod)) (set! (-> s5-0 slow-time) (-> s4-0 slow-time)) - (if (and (-> s4-0 mirror) (let* ((a0-55 *level*) - (t9-4 (method-of-object a0-55 level-group-method-26)) - (a1-36 'ctywide) - ) - (= (t9-4 a0-55 a1-36) 'active) - ) - ) + (if (and (-> s4-0 mirror) (= (status-of-level-and-borrows *level* 'ctywide #f) 'active)) (set! (-> s5-0 mirror) #f) (set! (-> s5-0 mirror) (-> s4-0 mirror)) ) @@ -1661,7 +1651,7 @@ (when (and (!= (-> s4-0 music) (-> s5-0 music)) (and (zero? (rpc-busy? 1)) (or (not (-> s4-0 music)) - (and (< 0.0 (-> s5-0 music-volume)) (not (level-group-method-28 *level*)) (not (-> s5-0 movie))) + (and (< 0.0 (-> s5-0 music-volume)) (not (load-in-progress? *level*)) (not (-> s5-0 movie))) ) (not *master-exit*) ) diff --git a/test/decompiler/reference/jak3/engine/game/task/game-task_REF.gc b/test/decompiler/reference/jak3/engine/game/task/game-task_REF.gc index 7441167d14..31b62012db 100644 --- a/test/decompiler/reference/jak3/engine/game/task/game-task_REF.gc +++ b/test/decompiler/reference/jak3/engine/game/task/game-task_REF.gc @@ -4203,10 +4203,11 @@ :user-count 3 ) :borrow '() - :open? (lambda () (or (not (task-node-closed? (game-task-node wascity-defend-get-to))) - (task-node-closed? (game-task-node wascity-defend-resolution)) - ) - ) + :open? (lambda () + (or (not (task-node-closed? (game-task-node wascity-defend-get-to))) + (task-node-closed? (game-task-node wascity-defend-resolution)) + ) + ) :on-close #f :reset (new 'static 'task-reset-info :restart-info #f @@ -23350,83 +23351,85 @@ ) ) (set! (-> game-info mission-list) (new 'global 'boxed-array game-task-node-info 410)) - (set! (-> game-info task-node-commands) (new 'static 'boxed-array :type uint8 - #x48 - #x20 - #x1f - #x1 - #x5 - #x23 - #x22 - #x19 - #x36 - #xa - #x3a - #x41 - #x48 - #x32 - #x39 - #x3f - #x3a - #x8 - #x6 - #x37 - #xd - #xb - #x3e - #x3a - #x39 - #xf - #x40 - #x31 - #x28 - #x27 - #x26 - #x2f - #x2d - #x3 - #x3b - #x29 - #x2a - #x33 - #x12 - #x10 - #x1b - #xe - #xc - #x21 - #x1a - #x2e - #x34 - #x30 - #x13 - #x11 - #x1c - #x9 - #x7 - #x14 - #x1d - #x3c - #x43 - #x39 - #x44 - #x46 - #x45 - #x39 - #x17 - #x15 - #x2b - #x47 - #x38 - #x35 - #x18 - #x16 - #x3a - #x1e - #x42 - #x4 - #x3 - ) + (set! (-> game-info task-node-commands) + (the-as (array game-task-node-command) (new 'static 'boxed-array :type uint8 + #x48 + #x20 + #x1f + #x1 + #x5 + #x23 + #x22 + #x19 + #x36 + #xa + #x3a + #x41 + #x48 + #x32 + #x39 + #x3f + #x3a + #x8 + #x6 + #x37 + #xd + #xb + #x3e + #x3a + #x39 + #xf + #x40 + #x31 + #x28 + #x27 + #x26 + #x2f + #x2d + #x3 + #x3b + #x29 + #x2a + #x33 + #x12 + #x10 + #x1b + #xe + #xc + #x21 + #x1a + #x2e + #x34 + #x30 + #x13 + #x11 + #x1c + #x9 + #x7 + #x14 + #x1d + #x3c + #x43 + #x39 + #x44 + #x46 + #x45 + #x39 + #x17 + #x15 + #x2b + #x47 + #x38 + #x35 + #x18 + #x16 + #x3a + #x1e + #x42 + #x4 + #x3 + ) + ) ) (dotimes (v1-4 (-> game-info sub-task-list length)) (if (-> game-info sub-task-list v1-4 manager) 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 58f1e8a591..8d475ba9f1 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 @@ -1534,11 +1534,11 @@ (faction-commands pair) ) (:methods - (game-task-node-info-method-9 () none) + (get-idx-in-task-list (_type_) int) (open! (_type_ symbol) int) - (game-task-node-info-method-11 () none) + (game-task-node-info-method-11 (_type_ symbol) none) (game-task-node-info-method-12 (_type_) symbol) - (game-task-node-info-method-13 () none) + (eval-game-task-cmd! (_type_) none) ) ) @@ -1646,13 +1646,13 @@ (text-name text-id) (pre-play-node game-task-node) (kiosk-play-node game-task-node) - (pre-play-continue string) + (pre-play-continue object) (play-node game-task-node) (play-continue string) (kiosk-play-continue object) ) (:methods - (game-task-info-method-9 (_type_) none) + (get-play-list-idx (_type_) int) ) ) @@ -1722,25 +1722,27 @@ (hud-counter handle :overlay-at (-> hud 1)) (intro-time time-frame) ) + (:state-methods + wait + active + complete + resolution + (fail resetter-params) + (restart symbol) + ) (:methods - (task-manager-method-14 () none) - (task-manager-method-15 () none) - (task-manager-method-16 () none) - (task-manager-method-17 () none) - (task-manager-method-18 () none) - (task-manager-method-19 () none) - (task-manager-method-20 () none) - (task-manager-method-21 () none) - (task-manager-method-22 () none) - (task-manager-method-23 () none) - (task-manager-method-24 () none) - (task-manager-method-25 () none) - (task-manager-method-26 () none) - (task-manager-method-27 () none) - (task-manager-method-28 () none) - (task-manager-method-29 () none) - (task-manager-method-30 () none) - (task-manager-method-31 (_type_ symbol) resetter-spec) + (init! (_type_) none) + (set-time-limit (_type_) none) + (kill-all-children (_type_) none) + (hud-timer-handler (_type_) none) + (ready? (_type_) object) + (task-manager-method-25 (_type_) none) + (task-manager-method-26 (_type_) none) + (task-manager-method-27 (_type_) none) + (task-manager-method-28 (_type_) none) + (go-fail (_type_) object) + (taskman-event-handler (_type_ process int symbol event-message-block) object) + (on-fail (_type_ symbol) resetter-params) ) ) @@ -1801,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 new file mode 100644 index 0000000000..5e13bfd1fd --- /dev/null +++ b/test/decompiler/reference/jak3/engine/game/task/task-control_REF.gc @@ -0,0 +1,3490 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type resetter-control +(deftype resetter-control (basic) + ((process handle) + (handle-init-hack symbol :overlay-at process) + ) + (:methods + (check-reset (_type_) object) + (get-resetter (_type_) process) + (spawn-resetter! (_type_ resetter-params game-task-node-info) symbol) + (do-reset (_type_) object) + ) + ) + +;; definition for method 3 of type resetter-control +(defmethod inspect ((this resetter-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tprocess: ~D~%" (-> this process)) + (format #t "~1Thandle-init-hack: ~A~%" (-> this handle-init-hack)) + (label cfg-4) + this + ) + +;; definition for symbol *resetter-control*, type resetter-control +(define *resetter-control* (new 'static 'resetter-control :handle-init-hack #f)) + +;; definition for method 2 of type resetter-spec +(defmethod print ((this resetter-spec)) + (format + #t + "#" + (-> this continue) + (-> this reset-mode) + (game-task-node->string (-> this node)) + (-> this execute) + this + ) + this + ) + +;; definition for function game-task-node->string +(defun game-task-node->string ((arg0 game-task-node)) + (-> *game-info* sub-task-list arg0 name) + ) + +;; definition for method 9 of type game-task-info +(defmethod get-play-list-idx ((this game-task-info)) + (let ((v1-1 (-> *game-info* play-list))) + (countdown (a1-0 (-> v1-1 length)) + (if (= this (-> v1-1 a1-0)) + (return a1-0) + ) + ) + ) + 0 + ) + +;; definition for method 9 of type game-task-node-info +(defmethod get-idx-in-task-list ((this game-task-node-info)) + (let ((v1-1 (-> *game-info* sub-task-list))) + (countdown (a1-0 (-> v1-1 length)) + (if (= this (-> v1-1 a1-0)) + (return a1-0) + ) + ) + ) + 0 + ) + +;; definition for function reset-city-squad-control +(defun reset-city-squad-control ((arg0 symbol)) + (if (and (nonzero? *cty-attack-controller*) *cty-attack-controller*) + (cty-attack-reset arg0 #f #f) + ) + (none) + ) + +;; definition for function city-task-faction-commands +(defun city-task-faction-commands () + (if (or (zero? *cty-faction-manager*) (not *cty-faction-manager*)) + (return 0) + ) + (setup-city-task-faction) + ) + +;; definition for function evaluate-faction-commands +(defun evaluate-faction-commands ((arg0 pair)) + (if (or (zero? *cty-faction-manager*) (not *cty-faction-manager*) (zero? arg0)) + (return 0) + ) + (cty-faction-evaluate-commands arg0) + ) + +;; definition for function update-task-masks +(defun update-task-masks ((arg0 symbol)) + (local-vars (a3-2 symbol) (sv-176 game-task-event)) + (if (= arg0 'none) + (return 0) + ) + (do-nothing *level*) + (cond + ((or (= arg0 'debug) (= arg0 'level)) + ) + ((logtest? (-> *game-info* secrets) (game-secrets hero-mode)) + (set! (-> *game-info* features) (game-feature + gun + gun-red-1 + gun-red-2 + gun-red-3 + gun-yellow-1 + gun-yellow-2 + gun-yellow-3 + gun-blue-1 + gun-blue-2 + gun-blue-3 + gun-dark-1 + gun-dark-2 + gun-dark-3 + board + gun-upgrade-yellow-ammo-1 + gun-upgrade-yellow-ammo-2 + gun-upgrade-red-ammo-1 + gun-upgrade-red-ammo-2 + gun-upgrade-blue-ammo-1 + gun-upgrade-blue-ammo-2 + gun-upgrade-dark-ammo-1 + gun-upgrade-dark-ammo-2 + board-launch + board-zap + darkjak + darkjak-bomb0 + darkjak-bomb1 + lightjak + lightjak-regen + lightjak-freeze + lightjak-shield + armor0 + armor1 + armor2 + armor3 + lighteco + darkeco + ) + ) + (set! (-> *game-info* items) (game-items)) + (set! (-> *game-info* vehicles) (game-vehicles v-turtle v-snake v-scorpion v-toad v-rhino)) + (set! (-> *game-info* light-crystal) 0.0) + (set! (-> *game-info* dark-crystal) 0.0) + ) + (else + (set! (-> *game-info* features) (game-feature)) + (set! (-> *game-info* items) (game-items)) + (set! (-> *game-info* vehicles) (game-vehicles)) + (set! (-> *game-info* light-crystal) 0.0) + (set! (-> *game-info* dark-crystal) 0.0) + ) + ) + (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))) + (set! (-> v1-43 length) 0) + (let ((a0-10 (-> *game-info* sub-task-list))) + (dotimes (a1-0 (-> a0-10 length)) + (when (nonzero? a1-0) + (let ((a2-3 (-> a0-10 a1-0))) + (set! a3-2 + (and (logtest? (-> a2-3 flags) (game-task-node-flag exclusive)) + (not (logtest? (-> a2-3 flags) (game-task-node-flag closed))) + (begin + (dotimes (a3-5 4) + (let ((t1-0 (-> a2-3 parent-node a3-5))) + (when (and (nonzero? t1-0) (not (logtest? (-> a0-10 t1-0 flags) (game-task-node-flag closed)))) + (set! a3-2 #f) + (goto cfg-38) + ) + ) + ) + #t + ) + ) + ) + (label cfg-38) + (when a3-2 + (when (< (-> v1-43 length) (-> v1-43 allocated-length)) + (set! (-> v1-43 (-> v1-43 length)) (the-as uint (-> a2-3 task))) + (+! (-> v1-43 length) 1) + ) + ) + ) + ) + ) + ) + ) + (let ((s5-1 + (lambda ((arg0 pair)) + (let ((s4-0 (-> arg0 car))) + (while (not (null? (the-as object arg0))) + (let ((v1-0 (-> (the-as pair s4-0) car)) + (s5-0 (-> (the-as pair (-> (the-as pair s4-0) cdr)) car)) + ) + (-> (the-as pair (-> (the-as pair (-> (the-as pair s4-0) cdr)) cdr)) car) + (-> (the-as pair (-> (the-as pair (-> (the-as pair (-> (the-as pair s4-0) cdr)) cdr)) cdr)) car) + (let* ((s3-0 (-> (the-as symbol v1-0) value)) + (v1-1 (if (type? s3-0 level-load-info) + s3-0 + ) + ) + (a0-11 (-> (the-as pair (-> (the-as pair s4-0) cdr)) cdr)) + ) + (when (and v1-1 (-> (the-as level-load-info v1-1) borrow)) + (case s5-0 + (('alias) + (set! a0-11 (cond + ((-> (the-as pair a0-11) car) + (empty) + a0-11 + ) + (else + #f + ) + ) + ) + (set! (-> (the-as level-load-info v1-1) borrow alias) a0-11) + ) + (else + (set! (-> (the-as level-load-info v1-1) borrow borrow-info (/ (the-as int s5-0) 8)) a0-11) + ) + ) + ) + ) + ) + (set! arg0 (the-as pair (-> arg0 cdr))) + (set! s4-0 (-> arg0 car)) + ) + ) + #f + ) + ) + ) + (let ((s4-1 #f)) + (s5-1 (-> *game-info* sub-task-list (game-task-node city-start-start) borrow)) + (evaluate-faction-commands (-> *game-info* sub-task-list (game-task-node city-start-start) faction-commands)) + (let ((s3-0 (-> *game-info* sub-task-list))) + (dotimes (s2-0 (-> s3-0 length)) + (when (nonzero? s2-0) + (let ((s1-0 (-> s3-0 s2-0))) + (case arg0 + (('debug 'level) + ) + (else + (if (logtest? (-> s1-0 flags) (game-task-node-flag closed)) + (eval-game-task-cmd! s1-0) + ) + ) + ) + (when (game-task-node-info-method-12 s1-0) + (if (-> s1-0 on-open) + (script-eval (-> s1-0 on-open) :key s1-0) + ) + (when (-> s1-0 when-open) + (let ((s0-0 (-> s1-0 when-open length))) + (while (begin (label cfg-75) (nonzero? s0-0)) + (+! s0-0 -1) + (set! sv-176 (-> s1-0 when-open s0-0)) + (case (-> sv-176 actor) + (((game-task-actor minimap)) + (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)) + ) + ) + ) + ((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)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (s5-1 (-> s1-0 borrow)) + (when (not (null? (-> s1-0 faction-commands))) + (set! s4-1 #t) + (evaluate-faction-commands (-> s1-0 faction-commands)) + ) + ) + ) + ) + ) + ) + (if (not s4-1) + (city-task-faction-commands) + ) + ) + (dotimes (s4-2 (the-as int (-> *setting-control* user-current faction-command-count))) + (evaluate-faction-commands (-> *setting-control* user-current faction-command s4-2)) + ) + (if (logtest? (game-secrets darkjak-tracking) (-> *game-info* secrets)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature feature44) (-> *game-info* features))) + ) + ) + (logior! (-> *game-info* features) (-> *game-info* debug-features)) + (logior! (-> *game-info* items) (-> *game-info* debug-items)) + (logior! (-> *game-info* vehicles) (-> *game-info* debug-vehicles)) + (dotimes (s4-3 (the-as int (-> *setting-control* user-current borrow-count))) + (s5-1 (-> *setting-control* user-current borrow s4-3)) + ) + ) + (case arg0 + (('load) + ) + (else + (let ((s5-2 (-> *game-info* sub-task-list))) + (dotimes (s4-4 (-> s5-2 length)) + (when (nonzero? s4-4) + (let ((s3-1 (-> s5-2 s4-4))) + (if (and (-> s3-1 manager) (or (and (logtest? (-> s3-1 flags) (game-task-node-flag closed)) + (not (task-node-closed? (-> s3-1 manager final-node))) + ) + (game-task-node-info-method-12 s3-1) + ) + ) + (script-eval '(task-manager) :key s3-1) + ) + ) + ) + ) + ) + ) + ) + (add-borrow-levels *load-state*) + (dotimes (s5-3 (-> *level* length)) + (let ((a0-75 (-> *level* level s5-3))) + (if (= (-> a0-75 status) 'active) + (set-proto-vis! a0-75 arg0) + ) + ) + ) + (if (logtest? (game-secrets vehicle-fox) (-> *game-info* secrets)) + (logior! (-> *game-info* vehicles) (game-vehicles v-fox)) + ) + (if (logtest? (game-secrets vehicle-mirage) (-> *game-info* secrets)) + (logior! (-> *game-info* vehicles) (game-vehicles v-mirage)) + ) + (if (logtest? (game-secrets vehicle-x-ride) (-> *game-info* secrets)) + (logior! (-> *game-info* vehicles) (game-vehicles v-x-ride)) + ) + (set! (-> *game-info* percent-complete) (calculate-percentage *game-info*)) + 0 + ) + +;; definition for method 22 of type level +(defmethod set-proto-vis! ((this level) (arg0 symbol)) + (if (= arg0 'none) + (return 0) + ) + (set! (-> this task-mask) + (logior (logand (-> this info base-task-mask) (task-mask task0 task1 task2 task3 task4 task5 task6 task7 done)) + (logand (-> this task-mask) (task-mask primary0)) + ) + ) + (let ((v1-8 (-> this info taskname)) + (a0-4 (-> *game-info* sub-task-list)) + ) + (dotimes (a1-1 (-> a0-4 length)) + (when (nonzero? a1-1) + (let ((a2-3 (-> a0-4 a1-1))) + (when (and (logtest? (-> a2-3 flags) (game-task-node-flag closed)) (= (-> a2-3 level) v1-8)) + (cond + ((logtest? (-> a2-3 flags) (game-task-node-flag abs-task-mask)) + (set! (-> this task-mask) (-> a2-3 task-mask)) + ) + ((logtest? (-> a2-3 flags) (game-task-node-flag set-task-mask)) + (logior! (-> this task-mask) (-> a2-3 task-mask)) + ) + ((logtest? (-> a2-3 flags) (game-task-node-flag clear-task-mask)) + (logclear! (-> this task-mask) (-> a2-3 task-mask)) + ) + ) + ) + ) + ) + ) + ) + (case (-> this name) + (('foresta 'forestb) + (prototypes-game-visible-set! '("gun-base-cylinder.mb" "gun-base-tubes.mb") #f this) + (prototypes-game-visible-set! + '("destroyed-statue-base.mb" + "destroyed-statue-chunk-a.mb" + "destroyed-statue-chunk-b.mb" + "destroyed-statue-eyelid.mb" + "destroyed-statue-rubble-terrain.mb" + "fora-grounder-destroyed-statue-lil-rocks.mb" + "fora-shrub-destroyed-statue-pebbles.mb" + "neo-spawner-root-a.mb" + "neo-spawner-root-b.mb" + ) + (and (task-node-closed? (game-task-node wascity-defend-resolution)) + (not (task-node-closed? (game-task-node precursor-tour-resolution))) + ) + this + ) + (prototypes-game-visible-set! + '("green-eco-vent-a.mb") + (not (task-node-closed? (game-task-node forest-ring-chase-introduction))) + this + ) + ) + (('mhcityb 'mhcitya) + (prototypes-game-visible-set! + '("mhcity-de-tower-grind-strand-long-nocol01.mb" + "mhcity-ground-lower-wall-gapfiller-strand-nub-01.mb" + "mhcity-ground-lower-wall-veins-small-02.mb" + "mhcity-wall-vine-thin-c-destrand-01.mb" + "mhcity-wall-vine-thin-s-destrand-01.mb" + ) + (not (task-node-closed? (game-task-node city-destroy-darkeco-resolution))) + this + ) + ) + (('factoryb) + (prototypes-game-visible-set! + '("facb-gun-tower-base-01.mb") + (not (task-node-closed? (game-task-node factory-sky-battle-tower1))) + this + ) + (prototypes-game-visible-set! + '("facb-gun-tower-base-02.mb") + (not (task-node-closed? (game-task-node factory-sky-battle-tower2))) + this + ) + (prototypes-game-visible-set! + '("facb-gun-tower-base-03.mb") + (not (task-node-closed? (game-task-node factory-sky-battle-tower3))) + this + ) + (prototypes-game-visible-set! + '("facb-gun-tower-base-04.mb") + (not (task-node-closed? (game-task-node factory-sky-battle-tower4))) + this + ) + ) + (('precurd) + (prototypes-game-visible-set! + '("precur-road-bridge01.mb" + "precur-road-bridge02.mb" + "precur-road-bridge03.mb" + "precur-road-bridge04.mb" + "precur-road-bridge05.mb" + ) + (not (task-node-closed? (game-task-node precursor-destroy-ship-escape-continue))) + this + ) + ) + (('desertg) + (prototypes-game-visible-set! '("des-egg.mb") (not (task-node-closed? (game-task-node nest-eggs-wall))) this) + ) + (('wasstada) + (prototypes-game-visible-set! + '("wstd-table.mb") + (task-node-closed? (game-task-node arena-fight-1-introduction)) + this + ) + ) + (('desertg) + (prototypes-game-visible-set! '("des-egg.mb") (not (task-node-closed? (game-task-node nest-eggs-wall))) this) + ) + (('templea 'templed) + (prototypes-game-visible-set! + '("tpl-hide-debris-blocka.mb" + "tpl-hide-debris-blockb.mb" + "tpl-hide-debris-plank-8m.mb" + "tpl-hide-debris-rock1.mb" + "tpl-hide-sunken-brick-01.mb" + "tpl-hide-collision-01.mb" + ) + (task-node-closed? (game-task-node temple-defend-introduction)) + this + ) + (prototypes-game-visible-set! + '("tpl-hall-alter-tunnel-section-jnt-hide.mb" "tpl-hall-alter-tunnel-section-hide.mb") + (not (task-node-closed? (game-task-node temple-tests-resolution))) + this + ) + ) + (('ctywide) + (prototypes-game-visible-set! + '("palcab-lowres-mhcity-tower-shell.mb" + "palcab-lowres-mhcity-tower-shelleye-01.mb" + "palcab-lowres-mhcity-tower-cap.mb" + "palcab-lowres-mhcity-tower-capdoor-01.mb" + ) + (not (task-node-closed? (game-task-node tower-destroy-resolution))) + this + ) + (prototypes-game-visible-set! + '("palcab-lowres-mhcity-tower-shell-blasted-01.mb" "palcab-lowres-mhcity-tower-shell-blasted-02.mb") + (task-node-closed? (game-task-node tower-destroy-resolution)) + this + ) + ) + (('ctygenb) + (prototypes-game-visible-set! + '("city-cable-grindable-turnoff-01.mb" + "city-cable-grindable-collision-01.mb" + "city-cable-grindable-collision.mb" + ) + (task-node-closed? (game-task-node tower-destroy-resolution)) + this + ) + ) + (('atoll) + ) + (('ctymarkb) + ) + (('ctypal) + ) + (('ctyasha) + ) + (('stadiumb) + ) + (('hiphog) + ) + ) + (logior! (-> this task-mask) (-> *setting-control* user-current task-mask)) + 0 + ) + +;; definition for function play-clean +(defun play-clean ((arg0 symbol)) + (set! *display-entity-errors* #f) + (set! *display-profile* #f) + (set! *display-actor-marks* #f) + (set! (-> *level* play?) #t) + (time-of-day-setup #t) + (set! *time-of-day-fast* #f) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 1.0) + (let ((t9-2 reset-city-squad-control) + (a0-5 #f) + ) + (t9-2 a0-5) + ) + (when arg0 + (let ((s5-0 (-> *game-info* mode))) + (set! (-> *game-info* mode) arg0) + (initialize! *game-info* 'game (the-as game-save #f) (the-as string #f) (the-as resetter-spec #f)) + (set! (-> *game-info* mode) s5-0) + ) + ) + 0 + ) + +;; definition for function play-task +;; WARN: Return type mismatch object vs string. +(defun play-task ((arg0 game-task) (arg1 symbol) (arg2 symbol)) + (persist-with-delay *setting-control* 'fail-music-volume (seconds 5) 'music-volume 'abs 0.0 0) + (persist-with-delay *setting-control* 'fail-sfx-volume (seconds 5) 'sfx-volume 'abs 0.0 0) + (persist-with-delay *setting-control* 'fail-dialog-volume (seconds 5) 'dialog-volume 'abs 0.0 0) + (play-clean arg1) + (let ((gp-1 (-> *game-info* play-list arg0))) + (the-as string (cond + ((and (= arg2 'pre-play) (-> gp-1 pre-play-continue)) + (task-node-open! (-> gp-1 pre-play-node) 'menu) + (-> gp-1 pre-play-continue) + ) + ((and (= arg2 'kiosk) (-> gp-1 kiosk-play-continue)) + (send-event (ppointer->process *time-of-day*) 'change 'hour 7) + (task-node-open! (-> gp-1 kiosk-play-node) 'event) + (if (pair? (-> gp-1 kiosk-play-continue)) + (-> (the-as pair (-> gp-1 kiosk-play-continue)) car) + (-> gp-1 kiosk-play-continue) + ) + ) + (else + (if (-> gp-1 play-continue) + (task-node-open! (-> gp-1 play-node) 'menu) + ) + (-> gp-1 play-continue) + ) + ) + ) + ) + ) + +;; definition for function restart-mission +(defun restart-mission () + (let ((gp-0 #t)) + (let ((s5-0 #f)) + (let ((t9-0 reset-city-squad-control) + (a0-0 #f) + ) + (t9-0 a0-0) + ) + (let ((v1-1 (-> *task-manager-engine* alive-list next0))) + *task-manager-engine* + (let ((s4-0 (-> v1-1 next0))) + (while (!= v1-1 (-> *task-manager-engine* alive-list-end)) + (let ((a0-3 (-> (the-as connection v1-1) param1))) + (if (not s5-0) + (set! s5-0 #t) + ) + (if (and (-> (the-as task-manager a0-3) next-state) + (let ((v1-7 (-> (the-as task-manager a0-3) next-state name))) + (or (= v1-7 'complete) (= v1-7 'resolution) (= v1-7 'fail) (= v1-7 'restart)) + ) + ) + (set! s5-0 'busy) + ) + (if (send-event (the-as process-tree a0-3) 'restart) + (set! gp-0 #f) + ) + ) + (set! v1-1 s4-0) + *task-manager-engine* + (set! s4-0 (-> s4-0 next0)) + ) + ) + ) + (if (or (and *target* (focus-test? *target* dead) s5-0) (= s5-0 'busy)) + (return (the-as int #f)) + ) + ) + (cond + ((-> *setting-control* user-current restart-info) + (spawn-resetter! + *resetter-control* + (the-as resetter-params (-> *setting-control* user-current restart-info)) + (the-as game-task-node-info #f) + ) + ) + (gp-0 + (let ((s5-1 (the-as game-task-node-info #f)) + (s4-1 (level-get-target-inside *level*)) + (gp-1 (the-as string #f)) + ) + (when (and s4-1 (not (logtest? (-> s4-1 info level-flags) (level-flags lf0)))) + (let ((s3-0 (-> *game-info* sub-task-list))) + (dotimes (s2-0 (-> s3-0 length)) + (when (nonzero? s2-0) + (let ((s1-0 (-> s3-0 s2-0))) + (if (and (= (-> s1-0 level) (-> s4-1 info taskname)) + (!= (-> s1-0 level) 'city) + (not (logtest? (-> s1-0 flags) (game-task-node-flag no-restart))) + (game-task-node-info-method-12 s1-0) + ) + (set! s5-1 s1-0) + ) + ) + ) + ) + ) + ) + (when s5-1 + (let ((v1-56 (-> *game-info* play-list (-> s5-1 task)))) + (cond + ((and (-> s5-1 reset) (-> s5-1 reset restart-info)) + (spawn-resetter! *resetter-control* (-> s5-1 reset restart-info) (the-as game-task-node-info #f)) + (return 0) + ) + ((-> v1-56 play-continue) + (set! gp-1 (-> v1-56 play-continue)) + ) + ) + ) + ) + (let ((a1-8 (new 'stack-no-clear 'resetter-params))) + (set! (-> a1-8 flags) (resetter-flag auto-reset text-message no-audio)) + (set! (-> a1-8 message) (resetter-message mission-retry)) + (set! (-> a1-8 retry continue) gp-1) + (set! (-> a1-8 retry node) (game-task-node none)) + (set! (-> a1-8 retry reset-mode) 'try) + (set! (-> a1-8 retry execute) #f) + (set! (-> a1-8 fail node) (game-task-node none)) + (set! (-> a1-8 fail continue) #f) + (set! (-> a1-8 fail reset-mode) 'life) + (set! (-> a1-8 fail execute) #f) + (set! (-> a1-8 reset-delay) (the-as uint 0)) + (set! (-> a1-8 task) (game-task none)) + (set! (-> a1-8 text-message) (text-id null)) + (spawn-resetter! *resetter-control* a1-8 (the-as game-task-node-info #f)) + ) + ) + ) + ) + ) + 0 + ) + +;; definition for function fail-mission +;; WARN: Return type mismatch int vs none. +;; WARN: Function fail-mission has a return type of none, but the expression builder found a return statement. +(defun fail-mission () + (let ((gp-0 #t)) + (let ((s5-0 #f)) + (let ((t9-0 reset-city-squad-control) + (a0-0 #f) + ) + (t9-0 a0-0) + ) + (let ((v1-1 (-> *task-manager-engine* alive-list next0))) + *task-manager-engine* + (let ((s4-0 (-> v1-1 next0))) + (while (!= v1-1 (-> *task-manager-engine* alive-list-end)) + (let ((a0-3 (-> (the-as connection v1-1) param1))) + (if (not s5-0) + (set! s5-0 #t) + ) + (if (and (-> (the-as task-manager a0-3) next-state) + (let ((v1-7 (-> (the-as task-manager a0-3) next-state name))) + (or (= v1-7 'complete) (= v1-7 'resolution) (= v1-7 'fail) (= v1-7 'restart)) + ) + ) + (set! s5-0 'busy) + ) + (if (send-event (the-as process-tree a0-3) 'fail #t) + (set! gp-0 #f) + ) + ) + (set! v1-1 s4-0) + *task-manager-engine* + (set! s4-0 (-> s4-0 next0)) + ) + ) + ) + (if (or (and *target* (focus-test? *target* dead) s5-0) (= s5-0 'busy)) + (return #f) + ) + ) + (cond + ((-> *setting-control* user-current fail-info) + (spawn-resetter! + *resetter-control* + (the-as resetter-params (-> *setting-control* user-current fail-info)) + (the-as game-task-node-info #f) + ) + ) + (gp-0 + (let ((s4-1 (the-as game-task-node-info #f)) + (s3-0 (level-get-target-inside *level*)) + (gp-1 (the-as string #f)) + (s5-1 138) + ) + (when (and s3-0 (not (logtest? (-> s3-0 info level-flags) (level-flags lf0)))) + (let ((s2-0 (-> *game-info* sub-task-list))) + (dotimes (s1-0 (-> s2-0 length)) + (when (nonzero? s1-0) + (let ((s0-0 (-> s2-0 s1-0))) + (if (and (= (-> s0-0 level) (-> s3-0 info taskname)) + (!= (-> s0-0 level) 'city) + (not (logtest? (-> s0-0 flags) (game-task-node-flag no-restart))) + (game-task-node-info-method-12 s0-0) + ) + (set! s4-1 s0-0) + ) + ) + ) + ) + ) + ) + (cond + ((and s4-1 (-> s4-1 reset) (-> s4-1 reset fail-info)) + (spawn-resetter! *resetter-control* (-> s4-1 reset fail-info) (the-as game-task-node-info #f)) + (return 0) + ) + ((= (status-of-level-and-borrows *level* 'wasall #f) 'active) + (set! gp-1 "wasdoors-desert") + (if (and (-> *game-info* current-continue) + (logtest? (continue-flags record-path) (-> *game-info* current-continue flags)) + ) + (set! gp-1 (-> *game-info* current-continue name)) + ) + (set! s5-1 1973) + ) + ((and s4-1 (let ((a0-25 (-> *game-info* play-list (-> s4-1 task) play-continue))) + (when a0-25 + (set! gp-1 a0-25) + gp-1 + ) + ) + ) + ) + ) + (let ((a1-12 (new 'stack-no-clear 'resetter-params))) + (set! (-> a1-12 flags) (resetter-flag auto-reset text-message)) + (set! (-> a1-12 message) (resetter-message mission-fail)) + (set! (-> a1-12 retry continue) #f) + (set! (-> a1-12 retry node) (game-task-node none)) + (set! (-> a1-12 retry reset-mode) 'try) + (set! (-> a1-12 retry execute) #f) + (set! (-> a1-12 fail node) (game-task-node none)) + (set! (-> a1-12 fail continue) gp-1) + (set! (-> a1-12 fail reset-mode) 'life) + (set! (-> a1-12 fail execute) #f) + (set! (-> a1-12 reset-delay) (the-as uint 1500)) + (set! (-> a1-12 task) (game-task none)) + (set! (-> a1-12 text-message) (the-as text-id s5-1)) + (spawn-resetter! *resetter-control* a1-12 (the-as game-task-node-info #f)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function task-node-by-name +(defun task-node-by-name ((arg0 string)) + (let ((s5-0 (-> *game-info* sub-task-list))) + (dotimes (s4-0 (-> s5-0 length)) + (when (nonzero? s4-0) + (let ((s3-0 (-> s5-0 s4-0))) + (if (string= arg0 (-> s3-0 name)) + (return s3-0) + ) + ) + ) + ) + ) + (the-as game-task-node-info #f) + ) + +;; definition for function task-node-index-by-name +(defun task-node-index-by-name ((arg0 string)) + (let ((s5-0 (-> *game-info* sub-task-list))) + (dotimes (s4-0 (-> s5-0 length)) + (when (nonzero? s4-0) + (let ((v1-4 (-> s5-0 s4-0))) + (if (string= arg0 (-> v1-4 name)) + (return s4-0) + ) + ) + ) + ) + ) + 0 + ) + +;; definition for function task-resolution-close! +(defun task-resolution-close! ((arg0 game-task)) + (let ((v1-1 (-> *game-info* sub-task-list))) + (dotimes (a1-0 (-> v1-1 length)) + (when (nonzero? a1-0) + (let ((a2-3 (-> v1-1 a1-0))) + (when (and (= (-> a2-3 task) arg0) (logtest? (-> a2-3 flags) (game-task-node-flag close-task))) + (open! a2-3 'event) + (return #t) + ) + ) + ) + ) + ) + #f + ) + +;; definition for function task-close! +(defun task-close! ((arg0 string)) + (let ((s5-0 (-> *game-info* sub-task-list))) + (dotimes (s4-0 (-> s5-0 length)) + (when (nonzero? s4-0) + (let ((s3-0 (-> s5-0 s4-0))) + (when (string= arg0 (-> s3-0 name)) + (let ((gp-2 (not (logtest? (-> s3-0 flags) (game-task-node-flag closed))))) + (open! s3-0 'event) + (return gp-2) + ) + ) + ) + ) + ) + ) + (format 0 "ERROR: attempting to close unknown task node ~A.~%" arg0) + #f + ) + +;; definition for function task-closed? +(defun task-closed? ((arg0 string)) + (let ((s5-0 (-> *game-info* sub-task-list))) + (dotimes (s4-0 (-> s5-0 length)) + (when (nonzero? s4-0) + (let ((s3-0 (-> s5-0 s4-0))) + (if (string= arg0 (-> s3-0 name)) + (return (logtest? (-> s3-0 flags) (game-task-node-flag closed))) + ) + ) + ) + ) + ) + (format 0 "ERROR: attempting to query closed? of unknown task node ~A.~%" arg0) + #f + ) + +;; definition for function open-task-nodes +(defun open-task-nodes ((arg0 (array game-task-node-info))) + (local-vars (a3-4 symbol)) + (set! (-> arg0 length) 0) + (let ((v1-1 (-> *game-info* sub-task-list))) + (dotimes (a1-0 (-> v1-1 length)) + (when (nonzero? a1-0) + (let ((a2-3 (-> v1-1 a1-0))) + (when (and (not (logtest? (-> a2-3 flags) (game-task-node-flag closed))) + (begin + (dotimes (a3-3 4) + (when (and (nonzero? (-> a2-3 parent-node a3-3)) + (not (logtest? (-> v1-1 (-> a2-3 parent-node a3-3) flags) (game-task-node-flag closed))) + ) + (set! a3-4 #f) + (goto cfg-14) + ) + ) + (set! a3-4 #t) + (label cfg-14) + (and a3-4 (< (-> arg0 length) (-> arg0 allocated-length))) + ) + ) + (set! (-> arg0 (-> arg0 length)) a2-3) + (+! (-> arg0 length) 1) + ) + ) + ) + ) + ) + arg0 + ) + +;; definition for method 2 of type game-task-node-info +(defmethod print ((this game-task-node-info)) + (format + #t + "#" + (-> this name) + (cond + ((logtest? (-> this flags) (game-task-node-flag closed)) + "closed" + ) + ((game-task-node-info-method-12 this) + "open" + ) + (else + "inactive" + ) + ) + this + ) + this + ) + +;; definition for method 10 of type game-task-node-info +(defmethod open! ((this game-task-node-info) (arg0 symbol)) + (when (not (logtest? (-> this flags) (game-task-node-flag closed))) + (let ((s4-0 (lambda ((arg0 game-task-node-info) (arg1 symbol)) + (logior! (-> arg0 flags) (game-task-node-flag closed)) + (+! (-> *game-info* task-counter) 1) + (when (zero? (-> arg0 close-time)) + (set! (-> arg0 gem-count) (the-as uint (the int (-> *game-info* gem)))) + (set! (-> arg0 skill-count) (the-as uint (the int (-> *game-info* skill)))) + (set! (-> arg0 close-time) (the-as uint (-> *display* game-clock frame-counter))) + ) + (if (-> arg0 on-close) + (script-eval (-> arg0 on-close) :key arg0) + ) + (when (logtest? (-> arg0 flags) (game-task-node-flag close-task)) + (let ((t9-2 reset-city-squad-control) + (a0-4 #f) + ) + (t9-2 a0-4) + ) + (target-reset-on-task-finish) + (if (= arg1 'event) + (menu-secrets-notify-task-node-close (the-as game-task-node arg0)) + ) + ) + (if (logtest? (-> arg0 flags) (game-task-node-flag close-task)) + ((lambda ((arg0 game-task-node-info)) + (if *target* + (send-event *target* 'get-pickup (pickup-type fuel-cell) (the float (-> arg0 task))) + (give *game-info* 'fuel-cell (the float (-> arg0 task)) (the-as handle #f)) + ) + ) + arg0 + ) + ) + ) + ) + ) + (let ((s2-0 0) + (s3-0 (new 'stack-no-clear 'array 'game-task-node 64)) + ) + (let ((s1-0 this)) + (loop + (cond + ((= (-> s1-0 parent-node 0) (game-task-node none)) + (goto cfg-21) + ) + ((= (-> s1-0 parent-node 1) (game-task-node none)) + (let ((v1-10 (-> *game-info* sub-task-list (-> s1-0 parent-node 0)))) + (cond + ((logtest? (-> v1-10 flags) (game-task-node-flag closed)) + (goto cfg-21) + ) + (else + (set! (-> s3-0 s2-0) (-> s1-0 parent-node 0)) + (+! s2-0 1) + (when (< 64 s2-0) + (break!) + 0 + ) + ) + ) + (set! s1-0 v1-10) + ) + ) + (else + (dotimes (s0-0 4) + (let ((v1-15 (-> s1-0 parent-node s0-0))) + (if (nonzero? v1-15) + (open! (-> *game-info* sub-task-list v1-15) 'none) + ) + ) + ) + (goto cfg-21) + ) + ) + ) + ) + (label cfg-21) + (while (nonzero? s2-0) + (+! s2-0 -1) + (s4-0 (-> *game-info* sub-task-list (-> s3-0 s2-0)) arg0) + ) + ) + (s4-0 this arg0) + ) + (let ((s4-1 (-> *game-info* sub-task-list))) + (dotimes (s3-1 (-> s4-1 length)) + (when (nonzero? s3-1) + (let ((s2-1 (-> s4-1 s3-1))) + (if (and (or (logtest? (-> s2-1 flags) (game-task-node-flag auto-close disk-close)) + (and (kiosk?) + (logtest? (-> this flags) (game-task-node-flag close-task)) + (!= arg0 'menu) + (logtest? (-> s2-1 flags) (game-task-node-flag kiosk-close)) + ) + ) + (game-task-node-info-method-12 s2-1) + ) + (open! s2-1 'none) + ) + ) + ) + ) + ) + (update-task-masks arg0) + ) + 0 + ) + +;; definition for function task-node-closed? +(defun task-node-closed? ((arg0 game-task-node)) + (let ((v1-2 (-> *game-info* sub-task-list arg0))) + (logtest? (-> v1-2 flags) (game-task-node-flag closed)) + ) + ) + +;; definition for function task-node-close! +(defun task-node-close! ((arg0 game-task-node) (arg1 symbol)) + (open! (-> *game-info* sub-task-list arg0) arg1) + 0 + ) + +;; definition for function task-open? +(defun task-open? ((arg0 string)) + (let ((s5-0 (-> *game-info* sub-task-list)) + (s4-0 0) + ) + (while (< s4-0 (-> s5-0 length)) + (when (nonzero? s4-0) + (let ((v1-4 (-> s5-0 s4-0))) + (if (string= arg0 (-> v1-4 name)) + (return (task-node-open? (the-as game-task-node s4-0))) + ) + ) + ) + (set! s4-0 (+ s4-0 1)) + ) + ) + (format 0 "ERROR: attempting to query open? of unknown task node ~A.~%" arg0) + #f + ) + +;; definition for method 11 of type game-task-node-info +;; WARN: Return type mismatch int vs none. +(defmethod game-task-node-info-method-11 ((this game-task-node-info) (arg0 symbol)) + (local-vars (v1-19 symbol)) + (when (logtest? (-> this flags) (game-task-node-flag closed)) + (logclear! (-> this flags) (game-task-node-flag closed)) + (+! (-> *game-info* task-counter) 1) + (if (logtest? (-> this flags) (game-task-node-flag close-task)) + (logclear! (-> *game-info* task-perm-list data (-> this task) status) (entity-perm-status complete)) + ) + (let ((s5-0 (-> *game-info* sub-task-list))) + (dotimes (s4-0 (-> s5-0 length)) + (when (nonzero? s4-0) + (let ((a0-4 (-> s5-0 s4-0))) + (set! v1-19 + (and (logtest? (-> a0-4 flags) (game-task-node-flag closed)) + (begin + (dotimes (v1-20 4) + (when (and (nonzero? (-> a0-4 parent-node v1-20)) + (not (logtest? (-> s5-0 (-> a0-4 parent-node v1-20) flags) (game-task-node-flag closed))) + ) + (set! v1-19 #t) + (goto cfg-17) + ) + ) + #f + ) + ) + ) + (label cfg-17) + (if v1-19 + (game-task-node-info-method-11 a0-4 'none) + ) + ) + ) + ) + ) + (update-task-masks arg0) + ) + 0 + (none) + ) + +;; definition for function task-node-open? +(defun task-node-open? ((arg0 game-task-node)) + (let ((v1-1 (-> *game-info* sub-task-list))) + (game-task-node-info-method-12 (-> v1-1 arg0)) + ) + ) + +;; definition for method 12 of type game-task-node-info +(defmethod game-task-node-info-method-12 ((this game-task-node-info)) + (local-vars (a0-3 symbol) (a1-1 symbol)) + (let ((a1-0 (-> *game-info* sub-task-list)) + (v1-1 this) + ) + (and (not (logtest? (-> v1-1 flags) (game-task-node-flag closed))) + (begin + (dotimes (a2-2 4) + (let ((t0-0 (-> v1-1 parent-node a2-2))) + (when (and (nonzero? t0-0) (not (logtest? (-> a1-0 t0-0 flags) (game-task-node-flag closed)))) + (set! a1-1 #f) + (goto cfg-12) + ) + ) + ) + (set! a1-1 #t) + (label cfg-12) + a1-1 + ) + (and (or (zero? (+ (-> *setting-control* user-current exclusive-task-count) (-> *game-info* task-node-exclusive length)) + ) + (begin + (dotimes (a1-6 (the-as int (-> *setting-control* user-current exclusive-task-count))) + (when (= (-> *setting-control* user-current exclusive-task a1-6) (-> this task)) + (set! a0-3 #t) + (goto cfg-29) + ) + ) + (dotimes (a1-9 (-> *game-info* task-node-exclusive length)) + (when (= (-> *game-info* task-node-exclusive a1-9) (-> this task)) + (set! a0-3 #t) + (goto cfg-29) + ) + ) + (set! a0-3 #f) + (label cfg-29) + (or a0-3 (logtest? (-> v1-1 flags) (game-task-node-flag auto-close disk-close))) + ) + ) + (or (not (-> v1-1 open?)) ((-> v1-1 open?) v1-1)) + ) + ) + ) + ) + +;; definition for function task-node-open! +(defun task-node-open! ((arg0 game-task-node) (arg1 symbol)) + (let ((s5-0 (-> *game-info* sub-task-list arg0))) + (dotimes (s4-0 4) + (if (nonzero? (-> s5-0 parent-node s4-0)) + (open! (-> *game-info* sub-task-list (-> s5-0 parent-node s4-0)) arg1) + ) + ) + (game-task-node-info-method-11 s5-0 arg1) + ) + 0 + ) + +;; definition for method 13 of type game-task-node-info +;; WARN: Return type mismatch int vs none. +(defmethod eval-game-task-cmd! ((this game-task-node-info)) + (dotimes (v1-0 (the-as int (-> this command-count))) + (case (-> *game-info* task-node-commands (+ (-> this command-index) v1-0)) + (((game-task-node-command none)) + ) + (((game-task-node-command add-jakc)) + (set! (-> *game-info* features) (the-as game-feature (logior (game-feature jakc) (-> *game-info* features)))) + ) + (((game-task-node-command add-sidekick)) + (logior! (-> *game-info* features) (game-feature sidekick)) + ) + (((game-task-node-command sub-sidekick)) + (logclear! (-> *game-info* features) (game-feature sidekick)) + ) + (((game-task-node-command add-board)) + (logior! (-> *game-info* features) (game-feature board)) + ) + (((game-task-node-command add-board-training)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature feature36) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-board-launch)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature board-launch) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-board-zap)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature board-zap) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-board-trail)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature board-trail) (-> *game-info* features))) + ) + ) + (((game-task-node-command sub-board-trail)) + (set! (-> *game-info* features) + (the-as game-feature (logclear (-> *game-info* features) (game-feature board-trail))) + ) + ) + (((game-task-node-command sub-board)) + (logclear! (-> *game-info* features) (game-feature board)) + ) + (((game-task-node-command add-gun-red-1)) + (logior! (-> *game-info* features) (game-feature gun gun-red-1)) + ) + (((game-task-node-command add-gun-red-2)) + (logior! (-> *game-info* features) (game-feature gun gun-red-2)) + ) + (((game-task-node-command add-gun-red-3)) + (logior! (-> *game-info* features) (game-feature gun gun-red-3)) + ) + (((game-task-node-command add-gun-red-ammo-1)) + (logior! (-> *game-info* features) (game-feature gun gun-upgrade-red-ammo-1)) + ) + (((game-task-node-command add-gun-red-ammo-2)) + (logior! (-> *game-info* features) (game-feature gun gun-upgrade-red-ammo-2)) + ) + (((game-task-node-command add-gun-yellow-1)) + (logior! (-> *game-info* features) (game-feature gun gun-yellow-1)) + ) + (((game-task-node-command add-gun-yellow-2)) + (logior! (-> *game-info* features) (game-feature gun gun-yellow-2)) + ) + (((game-task-node-command add-gun-yellow-3)) + (logior! (-> *game-info* features) (game-feature gun gun-yellow-3)) + ) + (((game-task-node-command add-gun-yellow-ammo-1)) + (logior! (-> *game-info* features) (game-feature gun gun-upgrade-yellow-ammo-1)) + ) + (((game-task-node-command add-gun-yellow-ammo-2)) + (logior! (-> *game-info* features) (game-feature gun gun-upgrade-yellow-ammo-2)) + ) + (((game-task-node-command add-gun-blue-1)) + (logior! (-> *game-info* features) (game-feature gun gun-blue-1)) + ) + (((game-task-node-command add-gun-blue-2)) + (logior! (-> *game-info* features) (game-feature gun gun-blue-2)) + ) + (((game-task-node-command add-gun-blue-3)) + (logior! (-> *game-info* features) (game-feature gun gun-blue-3)) + ) + (((game-task-node-command add-gun-blue-ammo-1)) + (logior! (-> *game-info* features) (game-feature gun gun-upgrade-blue-ammo-1)) + ) + (((game-task-node-command add-gun-blue-ammo-2)) + (logior! (-> *game-info* features) (game-feature gun gun-upgrade-blue-ammo-2)) + ) + (((game-task-node-command add-gun-dark-1)) + (logior! (-> *game-info* features) (game-feature gun gun-dark-1)) + ) + (((game-task-node-command add-gun-dark-2)) + (logior! (-> *game-info* features) (game-feature gun gun-dark-2)) + ) + (((game-task-node-command add-gun-dark-3)) + (logior! (-> *game-info* features) (game-feature gun gun-dark-3)) + ) + (((game-task-node-command add-gun-dark-ammo-1)) + (logior! (-> *game-info* features) (game-feature gun gun-upgrade-dark-ammo-1)) + ) + (((game-task-node-command add-gun-dark-ammo-2)) + (logior! (-> *game-info* features) (game-feature gun gun-upgrade-dark-ammo-2)) + ) + (((game-task-node-command add-pass-port-mh)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature feature31) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-pass-port-inda)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature feature32) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-pass-inda-indb)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature feature33) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-pass-indb-sluma)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature feature34) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-pass-slumb-genb)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature feature35) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-darkeco)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature darkeco) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-darkjak)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature darkjak) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-darkjak-smack)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature darkjak-smack) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-darkjak-bomb0)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature darkjak-bomb0) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-darkjak-bomb1)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature darkjak-bomb1) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-darkjak-tracking)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature feature44) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-darkjak-invinc)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature feature45) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-lighteco)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature lighteco) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-lightjak)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature lightjak) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-lightjak-regen)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature lightjak lightjak-regen) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-lightjak-swoop)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature lightjak lightjak-swoop) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-lightjak-freeze)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature lightjak lightjak-freeze) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-lightjak-shield)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature lightjak lightjak-shield) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-armor-0)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature armor0) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-armor-1)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature armor1) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-armor-2)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature armor2) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-armor-3)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature armor3) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-artifact-invis)) + (set! (-> *game-info* features) + (the-as game-feature (logior (game-feature artifact-invis) (-> *game-info* features))) + ) + ) + (((game-task-node-command add-light-eco-crystal)) + (+! (-> *game-info* light-crystal) 1.0) + (case (-> *game-info* light-crystal) + ((1.0) + (logior! (-> *game-info* items) (game-items light-eco-crystal0)) + ) + ((2.0) + (logior! (-> *game-info* items) (game-items light-eco-crystal1)) + ) + ((3.0) + (logior! (-> *game-info* items) (game-items light-eco-crystal2)) + ) + ((4.0) + (logior! (-> *game-info* items) (game-items light-eco-crystal3)) + ) + ) + ) + (((game-task-node-command add-dark-eco-crystal)) + (+! (-> *game-info* dark-crystal) 1.0) + (case (-> *game-info* dark-crystal) + ((1.0) + (logior! (-> *game-info* items) (game-items dark-eco-crystal0)) + ) + ((2.0) + (logior! (-> *game-info* items) (game-items dark-eco-crystal1)) + ) + ((3.0) + (logior! (-> *game-info* items) (game-items dark-eco-crystal2)) + ) + ((4.0) + (logior! (-> *game-info* items) (game-items dark-eco-crystal3)) + ) + ) + ) + (((game-task-node-command add-vehicle-turtle)) + (logior! (-> *game-info* vehicles) (game-vehicles v-turtle)) + ) + (((game-task-node-command add-vehicle-snake)) + (logior! (-> *game-info* vehicles) (game-vehicles v-snake)) + ) + (((game-task-node-command add-vehicle-scorpion)) + (logior! (-> *game-info* vehicles) (game-vehicles v-scorpion)) + ) + (((game-task-node-command add-vehicle-toad)) + (logior! (-> *game-info* vehicles) (game-vehicles v-toad)) + ) + (((game-task-node-command add-vehicle-rhino)) + (logior! (-> *game-info* vehicles) (game-vehicles v-rhino)) + ) + (((game-task-node-command add-amulet-1)) + (logior! (-> *game-info* items) (game-items amulet0)) + ) + (((game-task-node-command add-amulet-2)) + (logior! (-> *game-info* items) (game-items amulet1)) + ) + (((game-task-node-command add-amulet-3)) + (logior! (-> *game-info* items) (game-items amulet2)) + ) + (((game-task-node-command add-pass-front-gate)) + (logior! (-> *game-info* items) (game-items pass-front-gate)) + ) + (((game-task-node-command add-seal)) + (logior! (-> *game-info* items) (game-items seal-of-mar)) + ) + (((game-task-node-command add-cypher-gliph)) + (logior! (-> *game-info* items) (game-items cypher-gliph)) + ) + (((game-task-node-command add-av-cube)) + (logior! (-> *game-info* items) (game-items artifact-holocube)) + ) + (((game-task-node-command add-av-reflector)) + (logior! (-> *game-info* items) (game-items artifact-av-reflector)) + ) + (((game-task-node-command add-av-prism)) + (logior! (-> *game-info* items) (game-items artifact-av-prism)) + ) + (((game-task-node-command add-av-generator)) + (logior! (-> *game-info* items) (game-items artifact-av-generator)) + ) + (((game-task-node-command add-av-map)) + (logior! (-> *game-info* items) (game-items artifact-av-map)) + ) + ) + ) + 0 + (none) + ) + +;; definition for function task-node-close-upwards +;; WARN: Return type mismatch int vs none. +(defun task-node-close-upwards ((arg0 (array game-task-node-info)) (arg1 int)) + (let ((s5-0 (-> arg0 arg1))) + (dotimes (s4-0 4) + (when (nonzero? (-> s5-0 parent-node s4-0)) + (let ((v1-11 (-> arg0 (-> s5-0 parent-node s4-0)))) + (when (not (logtest? (-> v1-11 flags) (game-task-node-flag closed))) + (logior! (-> v1-11 flags) (game-task-node-flag closed)) + (task-node-close-upwards arg0 (the-as int (-> s5-0 parent-node s4-0))) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function task-node-reset +(defun task-node-reset ((arg0 symbol)) + (let ((s5-0 (-> *game-info* sub-task-list))) + (dotimes (s4-0 (-> s5-0 length)) + (when (nonzero? s4-0) + (let ((s3-0 (-> s5-0 s4-0))) + (when (logtest? (-> s3-0 flags) (game-task-node-flag closed)) + (case arg0 + (('game) + (if (nonzero? s4-0) + (logclear! (-> s3-0 flags) (game-task-node-flag closed)) + ) + ) + (('life) + (if (and (not (task-complete? *game-info* (-> s3-0 task))) + (not (logtest? (-> s3-0 flags) (game-task-node-flag save-on-life))) + ) + (logclear! (-> s3-0 flags) (game-task-node-flag closed)) + ) + ) + (('try) + (if (and (not (task-complete? *game-info* (-> s3-0 task))) + (or (not (logtest? (-> s3-0 flags) (game-task-node-flag save-on-life save-on-try))) + (logtest? (-> s3-0 flags) (game-task-node-flag reset-on-try)) + ) + ) + (logclear! (-> s3-0 flags) (game-task-node-flag closed)) + ) + ) + ) + (if (logtest? (-> s3-0 flags) (game-task-node-flag closed)) + (task-node-close-upwards s5-0 s4-0) + ) + ) + ) + ) + ) + ) + (+! (-> *game-info* task-counter) 1) + 0 + ) + +;; definition (debug) for function task-node-dump +(defun-debug task-node-dump ((arg0 symbol)) + (let ((gp-0 (-> *game-info* sub-task-list))) + (dotimes (s5-0 (-> gp-0 length)) + (when (nonzero? s5-0) + (let* ((s0-0 (-> gp-0 s5-0)) + (s4-0 format) + (s3-0 #t) + (s2-0 " ~-40S ~-8S ~S~%") + (s1-0 (game-task-node->string (the-as game-task-node s5-0))) + (a3-0 (if (task-node-closed? (the-as game-task-node s5-0)) + "closed" + "open" + ) + ) + (t0-0 (and (-> s0-0 manager) (handle->process (-> s0-0 manager manager)))) + ) + (set! t0-0 (cond + (t0-0 + (empty) + t0-0 + ) + (else + "" + ) + ) + ) + (s4-0 s3-0 s2-0 s1-0 a3-0 t0-0) + ) + ) + ) + ) + #f + ) + +;; definition for method 2 of type game-task-event +(defmethod print ((this game-task-event)) + (let* ((t9-0 format) + (a0-1 #t) + (a1-0 "#") + (v1-0 (-> this actor)) + (a2-1 (cond + ((= v1-0 (game-task-actor wascity-turret)) + "wascity-turret" + ) + ((= v1-0 (game-task-actor none)) + "none" + ) + ((= v1-0 (game-task-actor burning-bush-genb-2)) + "burning-bush-genb-2" + ) + ((= v1-0 (game-task-actor unused-slot-18)) + "unused-slot-18" + ) + ((= v1-0 (game-task-actor burning-bush-wasb-3)) + "burning-bush-wasb-3" + ) + ((= v1-0 (game-task-actor burning-bush-desd-3)) + "burning-bush-desd-3" + ) + ((= v1-0 (game-task-actor unused-slot-17)) + "unused-slot-17" + ) + ((= v1-0 (game-task-actor unused-slot-15)) + "unused-slot-15" + ) + ((= v1-0 (game-task-actor burning-bush-inda-1)) + "burning-bush-inda-1" + ) + ((= v1-0 (game-task-actor veger-ruins)) + "veger-ruins" + ) + ((= v1-0 (game-task-actor burning-bush-desb-2)) + "burning-bush-desb-2" + ) + ((= v1-0 (game-task-actor unused-slot-16)) + "unused-slot-16" + ) + ((= v1-0 (game-task-actor burning-bush-desf)) + "burning-bush-desf" + ) + ((= v1-0 (game-task-actor burning-bush-slumb-3)) + "burning-bush-slumb-3" + ) + ((= v1-0 (game-task-actor wascity-leaper)) + "wascity-leaper" + ) + ((= v1-0 (game-task-actor unused-slot-8)) + "unused-slot-8" + ) + ((= v1-0 (game-task-actor burning-bush-slumb-2)) + "burning-bush-slumb-2" + ) + ((= v1-0 (game-task-actor burning-bush-desb)) + "burning-bush-desb" + ) + ((= v1-0 (game-task-actor burning-bush-wasa-2)) + "burning-bush-wasa-2" + ) + ((= v1-0 (game-task-actor seem-wascitya)) + "seem-wascitya" + ) + ((= v1-0 (game-task-actor ashelin-oasis)) + "ashelin-oasis" + ) + ((= v1-0 (game-task-actor was-pre-game-deserte)) + "was-pre-game-deserte" + ) + ((= v1-0 (game-task-actor burning-bush-indb)) + "burning-bush-indb" + ) + ((= v1-0 (game-task-actor burning-bush-port-4)) + "burning-bush-port-4" + ) + ((= v1-0 (game-task-actor burning-bush-port-5)) + "burning-bush-port-5" + ) + ((= v1-0 (game-task-actor seem-wascity)) + "seem-wascity" + ) + ((= v1-0 (game-task-actor burning-bush-wasa-1)) + "burning-bush-wasa-1" + ) + ((= v1-0 (game-task-actor unused-slot-20)) + "unused-slot-20" + ) + ((= v1-0 (game-task-actor vin-vinroom)) + "vin-vinroom" + ) + ((= v1-0 (game-task-actor burning-bush-marka)) + "burning-bush-marka" + ) + ((= v1-0 (game-task-actor burning-bush-slumc-2)) + "burning-bush-slumc-2" + ) + ((= v1-0 (game-task-actor burning-bush-desc-5)) + "burning-bush-desc-5" + ) + ((= v1-0 (game-task-actor unused-slot-19)) + "unused-slot-19" + ) + ((= v1-0 (game-task-actor monk-mummy)) + "monk-mummy" + ) + ((= v1-0 (game-task-actor torn-freehq)) + "torn-freehq" + ) + ((= v1-0 (game-task-actor burning-bush-indb-3)) + "burning-bush-indb-3" + ) + ((= v1-0 (game-task-actor burning-bush-desb-4)) + "burning-bush-desb-4" + ) + ((= v1-0 (game-task-actor seem-temple)) + "seem-temple" + ) + ((= v1-0 (game-task-actor kleever-arena)) + "kleever-arena" + ) + ((= v1-0 (game-task-actor unused-slot-21)) + "unused-slot-21" + ) + ((= v1-0 (game-task-actor burning-bush-indb-2)) + "burning-bush-indb-2" + ) + ((= v1-0 (game-task-actor oracle-oracle)) + "oracle-oracle" + ) + ((= v1-0 (game-task-actor jinx-hiphog)) + "jinx-hiphog" + ) + ((= v1-0 (game-task-actor minimap)) + "minimap" + ) + ((= v1-0 (game-task-actor burning-bush-arena)) + "burning-bush-arena" + ) + ((= v1-0 (game-task-actor damus-wasdoors)) + "damus-wasdoors" + ) + ((= v1-0 (game-task-actor kleever-pen)) + "kleever-pen" + ) + ((= v1-0 (game-task-actor burning-bush-markb)) + "burning-bush-markb" + ) + ((= v1-0 (game-task-actor burning-bush-genb-4)) + "burning-bush-genb-4" + ) + ((= v1-0 (game-task-actor daxter)) + "daxter" + ) + ((= v1-0 (game-task-actor burning-bush-genb-5)) + "burning-bush-genb-5" + ) + ((= v1-0 (game-task-actor torn-hipbar)) + "torn-hipbar" + ) + ((= v1-0 (game-task-actor burning-bush-genb-1)) + "burning-bush-genb-1" + ) + ((= v1-0 (game-task-actor burning-bush-inda-4)) + "burning-bush-inda-4" + ) + ((= v1-0 (game-task-actor burning-bush-desb-3)) + "burning-bush-desb-3" + ) + ((= v1-0 (game-task-actor sig-nest)) + "sig-nest" + ) + ((= v1-0 (game-task-actor unused-slot-22)) + "unused-slot-22" + ) + ((= v1-0 (game-task-actor burning-bush-slumb)) + "burning-bush-slumb" + ) + ((= v1-0 (game-task-actor ashelin-freehq)) + "ashelin-freehq" + ) + ((= v1-0 (game-task-actor burning-bush-desc-2)) + "burning-bush-desc-2" + ) + ((= v1-0 (game-task-actor samos-onintent)) + "samos-onintent" + ) + ((= v1-0 (game-task-actor burning-bush-desd)) + "burning-bush-desd" + ) + ((= v1-0 (game-task-actor burning-bush-desg-2)) + "burning-bush-desg-2" + ) + ((= v1-0 (game-task-actor burning-bush-wasa-6)) + "burning-bush-wasa-6" + ) + ((= v1-0 (game-task-actor burning-bush-wasb-7)) + "burning-bush-wasb-7" + ) + ((= v1-0 (game-task-actor burning-bush-wasb-2)) + "burning-bush-wasb-2" + ) + ((= v1-0 (game-task-actor burning-bush-inda-5)) + "burning-bush-inda-5" + ) + ((= v1-0 (game-task-actor sig-talkbox)) + "sig-talkbox" + ) + ((= v1-0 (game-task-actor pecker-onintent)) + "pecker-onintent" + ) + ((= v1-0 (game-task-actor damus-arena)) + "damus-arena" + ) + ((= v1-0 (game-task-actor burning-bush-wasa-5)) + "burning-bush-wasa-5" + ) + ((= v1-0 (game-task-actor unused-slot-23)) + "unused-slot-23" + ) + ((= v1-0 (game-task-actor damus-wascity)) + "damus-wascity" + ) + ((= v1-0 (game-task-actor monk-wascity)) + "monk-wascity" + ) + ((= v1-0 (game-task-actor damus-desert)) + "damus-desert" + ) + ((= v1-0 (game-task-actor burning-bush-wasb-1)) + "burning-bush-wasb-1" + ) + ((= v1-0 (game-task-actor burning-bush-desc-4)) + "burning-bush-desc-4" + ) + ((= v1-0 (game-task-actor burning-bush-dese-5)) + "burning-bush-dese-5" + ) + ((= v1-0 (game-task-actor was-pre-game-wascityb)) + "was-pre-game-wascityb" + ) + ((= v1-0 (game-task-actor burning-bush-slumc)) + "burning-bush-slumc" + ) + ((= v1-0 (game-task-actor power-game-vinroom)) + "power-game-vinroom" + ) + ((= v1-0 (game-task-actor tess-gungame)) + "tess-gungame" + ) + ((= v1-0 (game-task-actor pecker)) + "pecker" + ) + ((= v1-0 (game-task-actor torn-hipbooth)) + "torn-hipbooth" + ) + ((= v1-0 (game-task-actor burning-bush-desg-4)) + "burning-bush-desg-4" + ) + ((= v1-0 (game-task-actor burning-bush-genc-2)) + "burning-bush-genc-2" + ) + ((= v1-0 (game-task-actor damus-ruins)) + "damus-ruins" + ) + ((= v1-0 (game-task-actor unused-slot-24)) + "unused-slot-24" + ) + ((= v1-0 (game-task-actor ashelin-talkbox)) + "ashelin-talkbox" + ) + ((= v1-0 (game-task-actor burning-bush-port-8)) + "burning-bush-port-8" + ) + ((= v1-0 (game-task-actor burning-bush-port-2)) + "burning-bush-port-2" + ) + ((= v1-0 (game-task-actor burning-bush-wasb-6)) + "burning-bush-wasb-6" + ) + ((= v1-0 (game-task-actor burning-bush-port-3)) + "burning-bush-port-3" + ) + ((= v1-0 (game-task-actor unused-slot-27)) + "unused-slot-27" + ) + ((= v1-0 (game-task-actor burning-bush-slumb-4)) + "burning-bush-slumb-4" + ) + ((= v1-0 (game-task-actor burning-bush-desg-3)) + "burning-bush-desg-3" + ) + ((= v1-0 (game-task-actor sig-wasdoors)) + "sig-wasdoors" + ) + ((= v1-0 (game-task-actor samos-freehq)) + "samos-freehq" + ) + ((= v1-0 (game-task-actor burning-bush-sluma-1)) + "burning-bush-sluma-1" + ) + ((= v1-0 (game-task-actor onin-talkbox)) + "onin-talkbox" + ) + ((= v1-0 (game-task-actor unused-slot-25)) + "unused-slot-25" + ) + ((= v1-0 (game-task-actor burning-bush-desc-3)) + "burning-bush-desc-3" + ) + ((= v1-0 (game-task-actor burning-bush-genb)) + "burning-bush-genb" + ) + ((= v1-0 (game-task-actor burning-bush-markb-2)) + "burning-bush-markb-2" + ) + ((= v1-0 (game-task-actor burning-bush-dese-2)) + "burning-bush-dese-2" + ) + ((= v1-0 (game-task-actor burning-bush-indb-1)) + "burning-bush-indb-1" + ) + ((= v1-0 (game-task-actor unused-slot-9)) + "unused-slot-9" + ) + ((= v1-0 (game-task-actor burning-bush-slumb-1)) + "burning-bush-slumb-1" + ) + ((= v1-0 (game-task-actor unused-slot-28)) + "unused-slot-28" + ) + ((= v1-0 (game-task-actor burning-bush-pal-2)) + "burning-bush-pal-2" + ) + ((= v1-0 (game-task-actor burning-bush-desa-2)) + "burning-bush-desa-2" + ) + ((= v1-0 (game-task-actor burning-bush-farma)) + "burning-bush-farma" + ) + ((= v1-0 (game-task-actor burning-bush-desg)) + "burning-bush-desg" + ) + ((= v1-0 (game-task-actor keira-freehq)) + "keira-freehq" + ) + ((= v1-0 (game-task-actor unused-slot-26)) + "unused-slot-26" + ) + ((= v1-0 (game-task-actor burning-bush-desd-5)) + "burning-bush-desd-5" + ) + ((= v1-0 (game-task-actor burning-bush-wasb-5)) + "burning-bush-wasb-5" + ) + ((= v1-0 (game-task-actor burning-bush-desc)) + "burning-bush-desc" + ) + ((= v1-0 (game-task-actor burning-bush-genb-3)) + "burning-bush-genb-3" + ) + ((= v1-0 (game-task-actor onin-onintent)) + "onin-onintent" + ) + ((= v1-0 (game-task-actor unused-slot-29)) + "unused-slot-29" + ) + ((= v1-0 (game-task-actor unused-slot-10)) + "unused-slot-10" + ) + ((= v1-0 (game-task-actor burning-bush-inda-2)) + "burning-bush-inda-2" + ) + ((= v1-0 (game-task-actor unused-slot-30)) + "unused-slot-30" + ) + ((= v1-0 (game-task-actor burning-bush-inda-3)) + "burning-bush-inda-3" + ) + ((= v1-0 (game-task-actor burning-bush-slumc-1)) + "burning-bush-slumc-1" + ) + ((= v1-0 (game-task-actor samos-genb)) + "samos-genb" + ) + ((= v1-0 (game-task-actor burning-bush-dese-4)) + "burning-bush-dese-4" + ) + ((= v1-0 (game-task-actor burning-bush-desh)) + "burning-bush-desh" + ) + ((= v1-0 (game-task-actor samos-talkbox)) + "samos-talkbox" + ) + ((= v1-0 (game-task-actor burning-bush-farmb)) + "burning-bush-farmb" + ) + ((= v1-0 (game-task-actor gun-gungame)) + "gun-gungame" + ) + ((= v1-0 (game-task-actor burning-bush-wasa-4)) + "burning-bush-wasa-4" + ) + ((= v1-0 (game-task-actor unused-slot-12)) + "unused-slot-12" + ) + ((= v1-0 (game-task-actor onin-freehq)) + "onin-freehq" + ) + ((= v1-0 (game-task-actor burning-bush-desa-3)) + "burning-bush-desa-3" + ) + ((= v1-0 (game-task-actor burning-bush-port-6)) + "burning-bush-port-6" + ) + ((= v1-0 (game-task-actor unused-slot-11)) + "unused-slot-11" + ) + ((= v1-0 (game-task-actor unused-slot-31)) + "unused-slot-31" + ) + ((= v1-0 (game-task-actor burning-bush-wasa-3)) + "burning-bush-wasa-3" + ) + ((= v1-0 (game-task-actor veger-cave)) + "veger-cave" + ) + ((= v1-0 (game-task-actor burning-bush-port-1)) + "burning-bush-port-1" + ) + ((= v1-0 (game-task-actor keira-genb)) + "keira-genb" + ) + ((= v1-0 (game-task-actor burning-bush-dese-3)) + "burning-bush-dese-3" + ) + ((= v1-0 (game-task-actor burning-bush-gena-2)) + "burning-bush-gena-2" + ) + ((= v1-0 (game-task-actor burning-bush-genc)) + "burning-bush-genc" + ) + ((= v1-0 (game-task-actor burning-bush-desd-2)) + "burning-bush-desd-2" + ) + ((= v1-0 (game-task-actor burning-bush-desa)) + "burning-bush-desa" + ) + ((= v1-0 (game-task-actor burning-bush-port)) + "burning-bush-port" + ) + ((= v1-0 (game-task-actor burning-bush-inda)) + "burning-bush-inda" + ) + ((= v1-0 (game-task-actor burning-bush-stadium)) + "burning-bush-stadium" + ) + ((= v1-0 (game-task-actor damus-waspal)) + "damus-waspal" + ) + ((= v1-0 (game-task-actor burning-bush-port-7)) + "burning-bush-port-7" + ) + ((= v1-0 (game-task-actor burning-bush-wasb-4)) + "burning-bush-wasb-4" + ) + ((= v1-0 (game-task-actor keira-garage)) + "keira-garage" + ) + ((= v1-0 (game-task-actor torn-hiptable)) + "torn-hiptable" + ) + ((= v1-0 (game-task-actor torn-hiphog)) + "torn-hiphog" + ) + ((= v1-0 (game-task-actor kleever-wasdoors)) + "kleever-wasdoors" + ) + ((= v1-0 (game-task-actor unused-slot-14)) + "unused-slot-14" + ) + ((= v1-0 (game-task-actor unused-slot-13)) + "unused-slot-13" + ) + ((= v1-0 (game-task-actor burning-bush-dese)) + "burning-bush-dese" + ) + ((= v1-0 (game-task-actor seem-leaper)) + "seem-leaper" + ) + ((= v1-0 (game-task-actor burning-bush-pal)) + "burning-bush-pal" + ) + ((= v1-0 (game-task-actor kleever-wascityb)) + "kleever-wascityb" + ) + ((= v1-0 (game-task-actor burning-bush-desd-4)) + "burning-bush-desd-4" + ) + ((= v1-0 (game-task-actor burning-bush-sluma-3)) + "burning-bush-sluma-3" + ) + ((= v1-0 (game-task-actor burning-bush-sluma-2)) + "burning-bush-sluma-2" + ) + ((= v1-0 (game-task-actor burning-bush-gena)) + "burning-bush-gena" + ) + ((= v1-0 (game-task-actor burning-bush-sluma)) + "burning-bush-sluma" + ) + (else + "*unknown*" + ) + ) + ) + (v1-1 (-> this action)) + ) + (t9-0 + a0-1 + a1-0 + a2-1 + (cond + ((= v1-1 (game-task-action idle)) + "idle" + ) + ((= v1-1 (game-task-action play)) + "play" + ) + ((= v1-1 (game-task-action show)) + "show" + ) + ((= v1-1 (game-task-action talk)) + "talk" + ) + ((= v1-1 (game-task-action hide)) + "hide" + ) + ((= v1-1 (game-task-action say)) + "say" + ) + ((= v1-1 (game-task-action trade)) + "trade" + ) + ((= v1-1 (game-task-action menu)) + "menu" + ) + (else + "*unknown*" + ) + ) + (-> this scene) + this + ) + ) + this + ) + +;; definition for method 0 of type game-task-control +(defmethod new game-task-control ((allocation symbol) (type-to-make type) (arg0 game-task-actor)) + (let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> v0-0 actor) arg0) + v0-0 + ) + ) + +;; definition for method 9 of type game-task-control +(defmethod get-current-task-event ((this game-task-control)) + (let ((gp-0 (new 'static 'game-task-event :scene #f))) + (let ((s4-0 #f)) + (when (!= (-> this counter) (-> *game-info* task-counter)) + (set! (-> this counter) (-> *game-info* task-counter)) + (set! (-> this current-node) (game-task-node none)) + (set! (-> this current-event) #f) + (set! s4-0 #t) + (let ((s2-0 (-> *game-info* sub-task-list))) + (dotimes (s3-0 (-> s2-0 length)) + (when (nonzero? s3-0) + (let ((s1-0 (-> s2-0 s3-0))) + (when (and (task-node-open? (the-as game-task-node s3-0)) + (-> s1-0 when-open) + (begin + (countdown (v1-12 (-> s1-0 when-open length)) + (when (= (-> this actor) (-> s1-0 when-open v1-12 actor)) + (set! (-> this current-event) (-> s1-0 when-open v1-12)) + (set! (-> this current-node) (the-as game-task-node s3-0)) + #t + (goto cfg-18) + ) + ) + #f + ) + ) + ) + ) + ) + ) + ) + ) + (label cfg-18) + (cond + ((= (-> this current-node) (game-task-node none)) + (set! (-> gp-0 actor) (-> this actor)) + ) + ((begin (set! gp-0 (-> this current-event)) (not (logtest? (-> gp-0 flags) (game-task-flags gatflag-00)))) + ) + (else + (set! (-> gp-0 action) (the-as game-task-action (-> gp-0 tex))) + ) + ) + (if s4-0 + (logior! (-> gp-0 flags) (game-task-flags gatflag-01)) + (logclear! (-> gp-0 flags) (game-task-flags gatflag-01)) + ) + ) + gp-0 + ) + ) + +;; definition of type resetter +(deftype resetter (process) + ((params resetter-params :inline) + (message resetter-message :overlay-at (-> params message)) + (flags resetter-flag :overlay-at (-> params flags)) + (reset-delay uint32 :overlay-at (-> params reset-delay)) + (task game-task :overlay-at (-> params task)) + (text-message text-id :overlay-at (-> params text-message)) + (retry resetter-spec :inline :overlay-at (-> params retry)) + (retry-continue continue-point :overlay-at (-> params retry continue)) + (retry-node game-task-node :overlay-at (-> params retry node)) + (retry-reset-mode symbol :overlay-at (-> params retry reset-mode)) + (fail resetter-spec :inline :overlay-at (-> params fail)) + (fail-continue continue-point :overlay-at (-> params fail continue)) + (fail-node game-task-node :overlay-at (-> params fail node)) + (fail-reset-mode symbol :overlay-at (-> params fail reset-mode)) + (resetter-id text-id :offset 176) + (grabbed-player? symbol :offset 180) + (grabbed-time time-frame) + (dead-player? symbol) + (retry? symbol) + (message-id text-id) + (stinger uint32) + (start-time time-frame) + ) + (:state-methods + idle + resetting + ) + (:methods + (resetter-method-16 (_type_) none) + ) + ) + +;; definition for method 3 of type resetter +(defmethod inspect ((this resetter)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Tparams: #~%" (-> this params)) + (format #t "~2Tmessage: ~D~%" (-> this params message)) + (format #t "~2Tflags: ~D~%" (-> this params flags)) + (format #t "~2Treset-delay: ~D~%" (-> this params reset-delay)) + (format #t "~2Ttask: ~D~%" (-> this params task)) + (format #t "~2Ttext-message: ~D~%" (-> this params text-message)) + (format #t "~2Tretry: #~%" (-> this params retry)) + (format #t "~2Tretry-continue: ~A~%" (-> this params retry continue)) + (format #t "~2Tretry-node: ~D~%" (-> this params retry node)) + (format #t "~2Tretry-reset-mode: ~A~%" (-> this params retry reset-mode)) + (format #t "~2Tfail: #~%" (-> this params fail)) + (format #t "~2Tfail-continue: ~A~%" (-> this params fail continue)) + (format #t "~2Tfail-node: ~D~%" (-> this params fail node)) + (format #t "~2Tfail-reset-mode: ~A~%" (-> this params fail reset-mode)) + (format #t "~2Tresetter-id: ~D~%" (-> this resetter-id)) + (format #t "~2Tgrabbed-player?: ~A~%" (-> this grabbed-player?)) + (format #t "~2Tgrabbed-time: ~D~%" (-> this grabbed-time)) + (format #t "~2Tdead-player?: ~A~%" (-> this dead-player?)) + (format #t "~2Tretry?: ~A~%" (-> this retry?)) + (format #t "~2Tmessage-id: ~D~%" (-> this message-id)) + (format #t "~2Tstinger: ~D~%" (-> this stinger)) + (format #t "~2Tstart-time: ~D~%" (-> this start-time)) + (label cfg-4) + this + ) + +;; definition for method 12 of type resetter +(defmethod run-logic? ((this resetter)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; definition for method 16 of type resetter +;; WARN: Return type mismatch float vs none. +(defmethod resetter-method-16 ((this resetter)) + (when (and (not (logtest? (-> this params flags) (resetter-flag no-message))) + (= (get-status *gui-control* (the-as sound-id (-> this message-id))) (gui-status active)) + ) + (let ((gp-0 + (new 'stack 'font-context *font-default-matrix* 70 20 0.0 (font-color orange) (font-flags shadow kerning)) + ) + ) + (set! (-> gp-0 origin x) 120.0) + (let ((v1-7 gp-0)) + (set! (-> v1-7 scale) 0.7) + ) + (let ((v1-8 gp-0)) + (set! (-> v1-8 width) (the float 300)) + ) + (let ((v1-9 gp-0)) + (set! (-> v1-9 height) (the float 35)) + ) + (set! (-> gp-0 flags) (font-flags shadow kerning middle middle-vert large)) + (let ((s4-0 (if (logtest? (-> this params flags) (resetter-flag text-message)) + (the-as int (-> this params text-message)) + 138 + ) + ) + ) + (when (nonzero? s4-0) + (let ((s3-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (the-as text-id s4-0) #f) 1) + (s3-0 *temp-string* gp-0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + (when (= (-> this params message) (resetter-message mission-fail-or-retry)) + (let ((v1-17 gp-0)) + (set! (-> v1-17 height) (the float 95)) + ) + (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-0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (let ((v1-19 gp-0)) + (set! (-> v1-19 height) (the float 155)) + ) + (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-0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (resetter) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('reset) + (cond + ((-> self grabbed-player?) + (persist-with-delay *setting-control* 'fail (seconds 10) 'bg-a 'abs 1.0 0) + (go-virtual resetting) + ) + (else + (logior! (-> self params flags) (resetter-flag auto-reset)) + (set! (-> self params reset-delay) (the-as uint 0)) + #t + ) + ) + ) + (('query) + (case (-> block param 0) + (('reset) + (-> self grabbed-player?) + ) + ) + ) + ) + ) + :exit (behavior () + (update-rates! (-> *display* bg-clock) 1.0) + (update-rates! (-> *display* entity-clock) 1.0) + (update-rates! (-> *display* target-clock) 1.0) + (update-rates! (-> *display* camera-clock) 1.0) + ) + :code (behavior () + (if (and *target* (focus-test? *target* dead)) + (set! (-> self dead-player?) #t) + ) + (cond + ((or (= (-> self params message) (resetter-message mission-fail)) + (= (-> self params message) (resetter-message mission-retry)) + (logtest? (-> self params flags) (resetter-flag no-grab)) + ) + (while (begin + (if (and *target* (focus-test? *target* grabbed)) + (process-release? *target*) + ) + (if (logtest? (-> self params flags) (resetter-flag no-draw-target)) + (send-event *target* 'draw #f) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 2) + (set! (-> a1-1 message) 'attack-invinc) + (set! (-> a1-1 param 0) (the-as uint #f)) + (set! (-> a1-1 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) (mode 'bot)) + ) + ) + ) + (not (or (send-event-function *target* a1-1) (and *target* (focus-test? *target* dead)))) + ) + ) + (suspend) + ) + (hide-hud 'hud-health) + ) + ((= (-> self params message) (resetter-message mission-fail-or-retry)) + (while (not (process-grab? *target* 'dead)) + (suspend) + ) + ) + ) + (set! (-> self grabbed-player?) #t) + (set! (-> self grabbed-time) (-> *display* real-clock frame-counter)) + (kill-current-talker '() '() 'exit) + (when (and (not (-> self dead-player?)) (not (logtest? (-> self params flags) (resetter-flag no-slow-down)))) + (while (< (- (-> *display* real-clock frame-counter) (-> self grabbed-time)) (seconds 1.5)) + (let ((f30-0 + (lerp-scale 0.0 1.0 (the float (- (-> *display* real-clock frame-counter) (-> self grabbed-time))) 0.0 450.0) + ) + ) + (set-filter-color! + (lerp-scale 1.0 1.25 f30-0 0.0 1.0) + (lerp-scale 1.0 0.875 f30-0 0.0 1.0) + (lerp-scale 1.0 0.25 f30-0 0.0 1.0) + ) + (update-rates! (-> *display* bg-clock) (- 1.0 f30-0)) + (update-rates! (-> *display* entity-clock) (- 1.0 f30-0)) + (update-rates! (-> *display* target-clock) (- 1.0 f30-0)) + (update-rates! (-> *display* camera-clock) (- 1.0 f30-0)) + ) + (resetter-method-16 self) + (suspend) + ) + (+! (-> self clock ref-count) -1) + (+! (-> *display* real-clock ref-count) 1) + (set! (-> self clock) (-> *display* real-clock)) + (logclear! (-> self mask) (process-mask freeze)) + (set-master-mode 'freeze) + (set-setting! 'sfx-volume 'abs 0.0 0) + (set-setting! 'ambient-volume 'abs 0.0 0) + ) + (case (-> self params message) + (((resetter-message mission-fail) (resetter-message mission-retry)) + (until #f + (when (or (and (logtest? (-> self params flags) (resetter-flag auto-reset)) + (>= (- (-> *display* real-clock frame-counter) (-> self grabbed-time)) + (the-as time-frame (-> self params reset-delay)) + ) + ) + (or (cpad-pressed? 0 confirm) + (and (kiosk?) + (>= (- (-> *display* real-clock frame-counter) (-> self start-time)) (seconds 60)) + (>= (- (-> *display* real-clock frame-counter) (-> *cpad-list* cpads 0 real-change-time)) (seconds 60)) + ) + ) + ) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (if (= (-> self params message) (resetter-message mission-retry)) + (set! (-> self retry?) #t) + ) + (persist-with-delay *setting-control* 'fail (seconds 10) 'bg-a 'abs 1.0 0) + (go-virtual resetting) + ) + (resetter-method-16 self) + (suspend) + ) + #f + ) + (((resetter-message mission-fail-or-retry)) + (until #f + (when (cpad-pressed? 0 confirm) + (sound-play "mission-retry") + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (set! (-> self retry?) #t) + (cond + ((not *target*) + ) + ((focus-test? *target* grabbed) + (while (not (process-release? *target*)) + (suspend) + ) + ) + ) + (suspend) + (persist-with-delay *setting-control* 'fail (seconds 10) 'bg-a 'abs 1.0 0) + (go-virtual resetting) + ) + (let ((v1-147 (when (cpad-pressed? 0 triangle) + (sound-play "mission-quit") + #t + ) + ) + ) + (when (or v1-147 + (and (kiosk?) + (>= (- (-> *display* real-clock frame-counter) (-> self start-time)) (seconds 60)) + (>= (- (-> *display* real-clock frame-counter) (-> *cpad-list* cpads 0 real-change-time)) (seconds 60)) + ) + ) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) + (set! (-> self retry?) #f) + (cond + ((not *target*) + ) + ((focus-test? *target* grabbed) + (while (not (process-release? *target*)) + (suspend) + ) + ) + ) + (suspend) + (go-virtual resetting) + ) + ) + (resetter-method-16 self) + (suspend) + ) + #f + ) + ) + ) + ) + +;; definition for method 10 of type resetter +(defmethod deactivate ((this resetter)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set-filter-color! 1.0 1.0 1.0) + (sound-group-continue (the-as sound-group #xffffffff)) + (update-rates! (-> *display* bg-clock) 1.0) + (update-rates! (-> *display* entity-clock) 1.0) + (update-rates! (-> *display* target-clock) 1.0) + (update-rates! (-> *display* camera-clock) 1.0) + (call-parent-method this) + (none) + ) + +;; failed to figure out what this is: +(defstate resetting (resetter) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('reset) + #t + ) + (('query) + (case (-> block param 0) + (('reset) + #t + ) + ) + ) + ) + ) + :exit (behavior () + (if (= *master-mode* 'freeze) + (set-master-mode 'game) + ) + (process-release? *target*) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (let ((f30-0 (lerp-scale 1.0 0.0 (the float (- (current-time) gp-0)) 0.0 300.0))) + (set-filter-color! + (lerp-scale 1.0 1.25 f30-0 0.0 1.0) + (lerp-scale 1.0 0.875 f30-0 0.0 1.0) + (lerp-scale 1.0 0.25 f30-0 0.0 1.0) + ) + ) + (suspend) + ) + ) + (let ((gp-1 (if (-> self retry?) + (-> self params retry) + (-> self params fail) + ) + ) + ) + (format 0 "---------> resetting with ~`resetter-spec`P~%" gp-1) + (let ((s5-1 (-> gp-1 execute))) + (if s5-1 + (script-eval (the-as pair s5-1)) + ) + ) + (cond + ((and *target* + (or (and (focus-test? *target* dead) #t) (and (not (-> gp-1 continue)) (focus-test? *target* grabbed))) + ) + (inc-death-count! *game-info*) + (if (-> gp-1 continue) + (set-continue! *game-info* (-> gp-1 continue) #t) + ) + (when (-> gp-1 reset-mode) + (task-node-reset (-> gp-1 reset-mode)) + (update-task-masks (-> gp-1 reset-mode)) + ) + (if (nonzero? (-> gp-1 node)) + (task-node-open! (-> gp-1 node) 'event) + ) + (if (and *target* (focus-test? *target* dead grabbed)) + (send-event *target* 'end-mode 'bot (if (-> self retry?) + (-> self params retry) + (-> self params fail) + ) + ) + ) + ) + (else + (initialize! *game-info* #f (the-as game-save #f) (the-as string #f) gp-1) + ) + ) + (cond + ((or (and *target* (focus-test? *target* dead)) (-> gp-1 continue)) + (persist-with-delay *setting-control* 'fail-sfx-volume (seconds 3) 'sfx-volume 'abs 0.0 0) + (persist-with-delay *setting-control* 'fail-dialog-volume (seconds 3) 'dialog-volume 'abs 0.0 0) + (persist-with-delay *setting-control* 'fail-music-volume (seconds 3) 'music-volume 'abs 0.0 0) + ) + (else + (set-action! + *gui-control* + (gui-action fade) + (the-as sound-id (-> self stinger)) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + ) + (persist-with-delay *setting-control* 'allow-continue (seconds 3) 'allow-continue #f 0.0 0) + (persist-with-delay *setting-control* 'speech-control (seconds 3) 'speech-control #f 0.0 0) + ) + ) + +;; definition for function resetter-init-by-other +(defbehavior resetter-init-by-other resetter ((arg0 resetter-params) (arg1 game-task-node-info)) + (stack-size-set! (-> self main-thread) 512) + (mem-copy! (the-as pointer (-> self params)) (the-as pointer arg0) 48) + (set! (-> self grabbed-player?) #f) + (set! (-> self dead-player?) #f) + (set! (-> self retry?) #f) + (set-setting! 'allow-continue #f 0.0 0) + (set-setting! 'gun-eject #f 0.0 0) + (set-setting! 'minimap 'clear 0.0 (minimap-flag minimap)) + (set! (-> self start-time) (-> *display* real-clock frame-counter)) + (set! (-> *game-info* mode) 'play) + (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 citizen) + (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 jak-mode) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (when (not (or (logtest? (-> arg0 flags) (resetter-flag no-audio)) + (and arg1 (logtest? (-> arg0 flags) (resetter-flag no-audio-first)) (zero? (-> arg1 death-count))) + ) + ) + (if (and arg1 (logtest? (-> arg0 flags) (resetter-flag no-audio-first))) + (set-action! + *gui-control* + (gui-action stop) + (the-as sound-id 1) + (gui-channel alert) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (set! (-> self stinger) + (the-as uint (add-process *gui-control* *target* (gui-channel task) (gui-action play) "lose1" -99.0 0)) + ) + (sound-params-set! *gui-control* (the-as sound-id (-> self stinger)) #f -1 -1 -1 0.75) + ) + (set-setting! 'music-volume 'abs 0.0 0) + (if (logtest? (-> arg0 flags) (resetter-flag stop-sfx)) + (set-setting! 'sfx-volume 'abs 0.0 0) + ) + (set-setting! 'speech-control #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) + (set-setting! 'allow-pause #f 0.0 0) + (+! (-> self clock ref-count) -1) + (+! (-> *display* base-clock ref-count) 1) + (set! (-> self clock) (-> *display* base-clock)) + (apply-settings *setting-control*) + (if (or (not (logtest? (-> self params flags) (resetter-flag text-message))) + (nonzero? (-> self params text-message)) + (= (-> self params message) (resetter-message mission-fail-or-retry)) + ) + (set! (-> self message-id) + (the-as text-id (add-process *gui-control* self (gui-channel supertitle) (gui-action play) "fail" 81920.0 0)) + ) + ) + (set! (-> self resetter-id) + (the-as text-id (add-process *gui-control* self (gui-channel resetter) (gui-action play) "fail" -99.0 0)) + ) + (go-virtual idle) + ) + +;; definition for method 11 of type resetter-control +(defmethod spawn-resetter! ((this resetter-control) (arg0 resetter-params) (arg1 game-task-node-info)) + (when (not (handle->process (-> this process))) + (let ((v1-4 (process-spawn resetter arg0 arg1 :name "resetter" :to *entity-pool*))) + (when v1-4 + (set! (-> this process) (process->handle (-> v1-4 0))) + #t + ) + ) + ) + ) + +;; definition for method 12 of type resetter-control +(defmethod do-reset ((this resetter-control)) + (send-event (handle->process (-> this process)) 'reset) + ) + +;; definition for method 9 of type resetter-control +(defmethod check-reset ((this resetter-control)) + (send-event (handle->process (-> this process)) 'query 'reset) + ) + +;; definition for method 10 of type resetter-control +(defmethod get-resetter ((this resetter-control)) + (handle->process (-> this process)) + ) + +;; definition for method 25 of type task-manager +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-method-25 ((this task-manager)) + 0 + (none) + ) + +;; definition for method 26 of type task-manager +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-method-26 ((this task-manager)) + 0 + (none) + ) + +;; definition for method 27 of type task-manager +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-method-27 ((this task-manager)) + 0 + (none) + ) + +;; definition for method 28 of type task-manager +;; WARN: Return type mismatch int vs none. +(defmethod task-manager-method-28 ((this task-manager)) + 0 + (none) + ) + +;; definition for method 31 of type task-manager +;; WARN: Return type mismatch structure vs resetter-params. +;; WARN: disable def twice: 65. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: disable def twice: 127. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: disable def twice: 189. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: disable def twice: 251. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod on-fail ((this task-manager) (arg0 symbol)) + (local-vars (v0-0 structure)) + (let ((gp-0 (-> *game-info* sub-task-list (-> this node-info manager final-node))) + (s5-0 (-> this node-info)) + (v1-5 arg0) + ) + (the-as + resetter-params + (cond + ((= v1-5 'death) + (let ((v1-7 (-> *setting-control* user-current death-info))) + (if v1-7 + (return (the-as resetter-params v1-7)) + ) + ) + (while (!= gp-0 s5-0) + (if (and (-> gp-0 reset) + (-> gp-0 reset death-info) + (or (logtest? (-> gp-0 flags) (game-task-node-flag closed)) (game-task-node-info-method-12 gp-0)) + ) + (return (the-as resetter-params (-> gp-0 reset death-info))) + ) + (set! gp-0 (-> *game-info* sub-task-list (-> gp-0 parent-node 0))) + ) + (when (and (-> gp-0 reset) + (-> gp-0 reset death-info) + (or (logtest? (-> gp-0 flags) (game-task-node-flag closed)) (game-task-node-info-method-12 gp-0)) + ) + (return (the-as resetter-params (-> gp-0 reset death-info))) + v0-0 + ) + ) + ((= v1-5 'fail) + (let ((v1-35 (-> *setting-control* user-current fail-info))) + (if v1-35 + (return (the-as resetter-params v1-35)) + ) + ) + (while (!= gp-0 s5-0) + (if (and (-> gp-0 reset) + (-> gp-0 reset fail-info) + (or (logtest? (-> gp-0 flags) (game-task-node-flag closed)) (game-task-node-info-method-12 gp-0)) + ) + (return (the-as resetter-params (-> gp-0 reset fail-info))) + ) + (set! gp-0 (-> *game-info* sub-task-list (-> gp-0 parent-node 0))) + ) + (when (and (-> gp-0 reset) + (-> gp-0 reset fail-info) + (or (logtest? (-> gp-0 flags) (game-task-node-flag closed)) (game-task-node-info-method-12 gp-0)) + ) + (return (the-as resetter-params (-> gp-0 reset fail-info))) + v0-0 + ) + ) + ((= v1-5 'restart) + (let ((v1-63 (-> *setting-control* user-current restart-info))) + (if v1-63 + (return (the-as resetter-params v1-63)) + ) + ) + (while (!= gp-0 s5-0) + (if (and (-> gp-0 reset) + (-> gp-0 reset restart-info) + (or (logtest? (-> gp-0 flags) (game-task-node-flag closed)) (game-task-node-info-method-12 gp-0)) + ) + (return (the-as resetter-params (-> gp-0 reset restart-info))) + ) + (set! gp-0 (-> *game-info* sub-task-list (-> gp-0 parent-node 0))) + ) + (when (and (-> gp-0 reset) + (-> gp-0 reset restart-info) + (or (logtest? (-> gp-0 flags) (game-task-node-flag closed)) (game-task-node-info-method-12 gp-0)) + ) + (return (the-as resetter-params (-> gp-0 reset restart-info))) + v0-0 + ) + ) + ((= v1-5 'quit) + (let ((v1-91 (-> *setting-control* user-current quit-info))) + (if v1-91 + (return (the-as resetter-params v1-91)) + ) + ) + (while (!= gp-0 s5-0) + (if (and (-> gp-0 reset) + (-> gp-0 reset quit-info) + (or (logtest? (-> gp-0 flags) (game-task-node-flag closed)) (game-task-node-info-method-12 gp-0)) + ) + (return (the-as resetter-params (-> gp-0 reset quit-info))) + ) + (set! gp-0 (-> *game-info* sub-task-list (-> gp-0 parent-node 0))) + ) + (when (and (-> gp-0 reset) + (-> gp-0 reset quit-info) + (or (logtest? (-> gp-0 flags) (game-task-node-flag closed)) (game-task-node-info-method-12 gp-0)) + ) + (return (the-as resetter-params (-> gp-0 reset quit-info))) + v0-0 + ) + ) + (else + (the-as structure #f) + ) + ) + ) + ) + ) + +;; 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) 2048) + (add-connection *task-manager-engine* self nothing self arg0 #f) + (set! (-> self node-info) arg0) + (set! (-> self lev-name) arg1) + (add-setting! 'task arg0 0.0 0) + (add-setting! 'task-manager (process->ppointer self) 0.0 0) + (set-time! (-> self intro-time)) + (set! (-> self fail-on-death?) (if (and (-> self node-info reset) (-> self node-info reset death-info)) + #t + #f + ) + ) + (when arg1 + (let* ((v1-19 (level-get *level* arg1)) + (a1-6 (if (and (nonzero? (-> v1-19 entity)) (> (-> v1-19 entity length) 0)) + (-> v1-19 entity data 0 entity) + ) + ) + ) + (if a1-6 + (process-entity-set! self a1-6) + ) + ) + ) + (init! self) + (go-virtual wait) + ) + +;; definition for method 22 of type task-manager +;; WARN: Return type mismatch int vs none. +(defmethod kill-all-children ((this task-manager)) + (while (-> this child) + (deactivate (ppointer->process (-> this child))) + ) + 0 + (none) + ) + +;; definition for method 29 of type task-manager +;; WARN: Return type mismatch int vs object. +(defmethod go-fail ((this task-manager)) + (if *debug-segment* + (format #t "task failed: ran out of time~%") + ) + (go (method-of-object this fail) (on-fail this 'fail)) + 0 + ) + +;; definition for method 23 of type task-manager +;; WARN: Return type mismatch int vs none. +(defmethod hud-timer-handler ((this task-manager)) + (when (nonzero? (-> this start-time)) + (let ((v1-3 (handle->process (-> this hud-timer)))) + (if (and *target* (not v1-3)) + (set! (-> this hud-timer) + (ppointer->handle (process-spawn hud-timer :init hud-init-by-other :name "hud-timer" :to *target*)) + ) + ) + ) + (let ((v1-13 (- (-> this time-limit) (- (current-time) (-> this start-time))))) + (let ((a0-15 *game-info*)) + (set! (-> a0-15 timer) v1-13) + (set! (-> a0-15 timer-flash) (< v1-13 (seconds 10))) + ) + (when (< v1-13 0) + (send-event (handle->process (-> this hud-timer)) 'hide-and-die) + (go-fail this) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 20 of type task-manager +;; WARN: Return type mismatch int vs none. +(defmethod init! ((this task-manager)) + (set! (-> this info) (-> this node-info manager)) + (countdown (v1-2 4) + (set! (-> this hud v1-2) (the-as handle #f)) + ) + (set! (-> this arrow) (the-as handle #f)) + (set! (-> this player-vehicle) (the-as handle #f)) + (set! (-> this fail-now) #f) + (set! (-> this restart-now) #f) + (set! (-> this allow-fail) #t) + 0 + (none) + ) + +;; definition for method 21 of type task-manager +;; WARN: Return type mismatch int vs none. +(defmethod set-time-limit ((this task-manager)) + (when (logtest? (-> this info mask) (task-manager-mask time-limit)) + (set-time! (-> this start-time)) + (set! (-> this time-limit) (the-as time-frame (-> this info time-limit))) + ) + 0 + (none) + ) + +;; definition for method 10 of type task-manager +(defmethod deactivate ((this task-manager)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (with-pp + (let ((s5-0 pp)) + (set! pp this) + (task-manager-method-25 this) + (set! pp s5-0) + ) + (countdown (s5-1 4) + (send-event (handle->process (-> this hud s5-1)) 'hide-and-die) + ) + ((method-of-type process deactivate) this) + (none) + ) + ) + +;; definition for function task-manager-event-handler +(defbehavior task-manager-event-handler task-manager ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (taskman-event-handler self arg0 arg1 arg2 arg3) + ) + +;; definition for method 30 of type task-manager +(defmethod taskman-event-handler ((this task-manager) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-2 object)) + (case arg2 + (('fail) + (let ((s4-0 (on-fail this 'fail)) + (v1-2 (if (>= arg1 1) + (-> arg3 param 0) + ) + ) + ) + (if (and (not (and (-> this next-state) (let ((a0-7 (-> this next-state name))) + (or (= a0-7 'complete) (= a0-7 'resolution) (= a0-7 'fail) (= a0-7 'retry)) + ) + ) + ) + (or (not v1-2) s4-0) + (not (scene-select?)) + ) + (go (method-of-object this fail) s4-0) + ) + ) + ) + (('restart) + (let ((a0-12 (on-fail this 'restart))) + (if (and (not (and (-> this next-state) (let ((v1-11 (-> this next-state name))) + (or (= v1-11 'complete) (= v1-11 'fail) (= v1-11 'restart)) + ) + ) + ) + a0-12 + ) + (go (method-of-object this restart) (the-as symbol a0-12)) + ) + ) + ) + (('restart-immediately) + (let ((a0-16 (on-fail this 'restart))) + (when (and (or (not (and (-> this next-state) (let ((v1-19 (-> this next-state name))) + (or (= v1-19 'complete) (= v1-19 'resolution) (= v1-19 'fail) (= v1-19 'restart)) + ) + ) + ) + (not (-> this allow-fail)) + ) + a0-16 + ) + (set! (-> this restart-now) #t) + (go (method-of-object this restart) (the-as symbol a0-16)) + ) + ) + ) + (('quit) + (let ((a0-20 (on-fail this 'quit))) + (if (and (not (and (-> this next-state) (let ((v1-30 (-> this next-state name))) + (or (= v1-30 'complete) (= v1-30 'resolution) (= v1-30 'fail) (= v1-30 'restart)) + ) + ) + ) + a0-20 + ) + (go (method-of-object this restart) (the-as symbol a0-20)) + ) + ) + ) + (('complete) + (if (or (not (and (-> this next-state) (let ((v1-37 (-> this next-state name))) + (or (= v1-37 'complete) (= v1-37 'resolution) (= v1-37 'fail) (= v1-37 'restart)) + ) + ) + ) + (not (-> this allow-fail)) + ) + (go (method-of-object this complete)) + ) + ) + (('wait) + (go (method-of-object this wait)) + ) + (('active) + (go (method-of-object this active)) + ) + (('fail-on-death) + (set! v0-2 (-> arg3 param 0)) + (set! (-> this fail-on-death?) (the-as symbol v0-2)) + v0-2 + ) + (('target) + (case (-> arg3 param 0) + (('die) + (let ((a0-37 (on-fail this 'death))) + (when a0-37 + (if (not (and (-> this next-state) + (let ((v1-51 (-> this next-state name))) + (or (= v1-51 'wait) (= v1-51 'complete) (= v1-51 'resolution) (= v1-51 'fail) (= v1-51 'restart)) + ) + ) + ) + (go (method-of-object this fail) a0-37) + ) + (if (not (and (-> this next-state) (let ((v1-59 (-> this next-state name))) + (or (= v1-59 'wait) (= v1-59 'complete) (= v1-59 'resolution)) + ) + ) + ) + 'wait + ) + ) + ) + ) + ) + ) + (('fail-continue) + (let ((v1-61 (on-fail this 'fail))) + (when v1-61 + (case (-> v1-61 message) + (((resetter-message mission-retry)) + (-> v1-61 retry) + ) + (else + (-> v1-61 fail) + ) + ) + ) + ) + ) + (('fail-immediately) + (when (or (not (and (-> this next-state) (let ((v1-65 (-> this next-state name))) + (or (= v1-65 'complete) (= v1-65 'resolution) (= v1-65 'fail) (= v1-65 'restart)) + ) + ) + ) + (not (-> this allow-fail)) + ) + (set! (-> this allow-fail) #t) + (set! (-> this fail-now) #t) + (go (method-of-object this fail) (on-fail this 'fail)) + ) + ) + (('allow-fail) + (set! v0-2 (-> arg3 param 0)) + (set! (-> this allow-fail) (the-as symbol v0-2)) + v0-2 + ) + ) + ) + +;; definition for method 24 of type task-manager +(defmethod ready? ((this task-manager)) + (and (or (not (logtest? (game-task-node-flag city-wait) (-> this node-info flags))) + (let ((a0-4 (level-get-target-inside *level*))) + (cond + ((not (and a0-4 (logtest? (-> a0-4 info level-flags) (level-flags lf0)))) + (set-time! (-> this intro-time)) + #f + ) + (else + #t + ) + ) + ) + ) + (or (zero? (-> this info intro-delay)) + (time-elapsed? (-> this intro-time) (the-as time-frame (-> this info intro-delay))) + ) + (and *target* (not (logtest? (focus-status dead teleporting) (-> *target* focus-status)))) + (not (-> *setting-control* user-current talking)) + ) + ) + +;; failed to figure out what this is: +(defstate wait (task-manager) + :virtual #t + :event task-manager-event-handler + :trans (behavior () + (if (or (and (nonzero? (-> self info final-node)) (task-node-closed? (-> self info final-node))) + (and (not (logtest? (-> self node-info flags) (game-task-node-flag closed))) + (not (game-task-node-info-method-12 (-> self node-info))) + ) + ) + (deactivate self) + ) + ) + :code (behavior () + (local-vars (v1-18 symbol)) + (while (or (not *target*) (not *spawn-actors*)) + (suspend) + ) + (when (or (logtest? (game-task-node-flag intro-wait city-wait) (-> self node-info flags)) + (nonzero? (-> self info intro-delay)) + ) + (while (not (ready? self)) + (suspend) + ) + (let ((a0-5 (-> self info intro-scene))) + (when a0-5 + (let ((gp-1 (talker-spawn-func + (string->talker-speech (the-as string a0-5)) + *entity-pool* + (target-pos 0) + (the-as region #f) + ) + ) + ) + (get-status *gui-control* gp-1) + (until v1-18 + (suspend) + (let ((v1-17 (get-status *gui-control* gp-1))) + (set! v1-18 (or (= v1-17 (gui-status stop)) (= v1-17 (gui-status unknown)))) + ) + ) + ) + ) + ) + (if (logtest? (-> self node-info flags) (game-task-node-flag intro-wait)) + (open! (-> self node-info) 'event) + ) + ) + (set-time-limit self) + (if (logtest? (-> self info mask) (task-manager-mask auto-complete)) + (go-virtual complete) + ) + (go-virtual active) + ) + ) + +;; failed to figure out what this is: +(defstate active (task-manager) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + ((-> (method-of-object self wait) trans)) + (if (logtest? (-> self info mask) (task-manager-mask time-limit)) + (hud-timer-handler self) + ) + (if (and *debug-segment* (not *editable*)) + (format *stdebug* "task-manager ~A alive~%" (-> self node-info name)) + ) + (task-manager-method-26 self) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate complete (task-manager) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set-setting! 'allow-progress #f 0.0 0) + ) + :code (behavior () + (if (get-resetter *resetter-control*) + (sleep-code) + ) + (send-event (handle->process (-> self arrow)) 'die) + (countdown (gp-0 4) + (send-event (handle->process (-> self hud gp-0)) 'hide-and-die) + ) + (let ((gp-1 (-> self child))) + (while gp-1 + (send-event (ppointer->process gp-1) 'notify 'die) + (set! gp-1 (-> gp-1 0 brother)) + ) + ) + (when (not (logtest? (game-task-node-flag no-hud-wait) (-> self node-info flags))) + (let ((gp-2 (current-time))) + (label cfg-28) + (when (not (time-elapsed? gp-2 (seconds 5))) + (when (handle->process (-> self arrow)) + (suspend) + (goto cfg-28) + ) + (countdown (v1-42 4) + (when (handle->process (-> self hud v1-42)) + (suspend) + (goto cfg-28) + ) + ) + ) + ) + ) + (go-virtual resolution) + ) + ) + +;; failed to figure out what this is: +(defstate resolution (task-manager) + :virtual #t + :event task-manager-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (local-vars (v1-27 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) + (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-27 (or (handle->process (-> self arrow)) (begin + (countdown (v1-28 4) + (when (handle->process (-> self hud v1-28)) + (set! v1-27 #t) + (goto cfg-39) + ) + ) + #f + ) + ) + ) + (label cfg-39) + v1-27 + ) + (suspend) + ) + ) + ) + +;; failed to figure out what this is: +(defstate fail (task-manager) + :virtual #t + :event task-manager-event-handler + :exit (behavior () + (disable *screen-filter*) + ) + :code (behavior ((arg0 resetter-params)) + (while (not (-> self allow-fail)) + (suspend) + ) + (send-event (handle->process (-> self arrow)) 'die) + (countdown (s5-0 4) + (send-event (handle->process (-> self hud s5-0)) 'hide-and-die) + ) + (task-manager-method-28 self) + (let ((s5-1 (-> self info on-fail))) + (if s5-1 + (script-eval s5-1) + ) + ) + (when arg0 + (spawn-resetter! *resetter-control* arg0 (-> self node-info)) + (while (get-resetter *resetter-control*) + (suspend) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate restart (task-manager) + :virtual #t + :event task-manager-event-handler + :exit (-> (method-of-type task-manager fail) exit) + :code (behavior ((arg0 symbol)) + (send-event (handle->process (-> self arrow)) 'die) + (countdown (s5-0 4) + (send-event (handle->process (-> self hud s5-0)) 'hide-and-die) + ) + (task-manager-method-28 self) + (let ((s5-1 (-> self info on-fail))) + (if s5-1 + (script-eval s5-1) + ) + ) + (cond + (arg0 + (spawn-resetter! *resetter-control* (the-as resetter-params arg0) (-> self node-info)) + (while (get-resetter *resetter-control*) + (suspend) + ) + ) + (else + (initialize! *game-info* 'try (the-as game-save #f) (the-as string #f) (the-as resetter-spec #f)) + ) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/geometry/path-h_REF.gc b/test/decompiler/reference/jak3/engine/geometry/path-h_REF.gc index b63f6afa86..a1fb00bed7 100644 --- a/test/decompiler/reference/jak3/engine/geometry/path-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/geometry/path-h_REF.gc @@ -17,29 +17,29 @@ These path-controls are typically allocated on a process heap." ) (:methods (new (symbol type process symbol float entity symbol) _type_) - (path-control-method-9 (_type_) none) - (path-control-method-10 () none) - (path-control-method-11 () none) - (path-control-method-12 () none) - (path-control-method-13 () none) + (debug-draw (_type_) none) + (get-point-in-path! (_type_ vector float symbol) vector) + (get-random-point (_type_ vector) vector) + (path-control-method-12 (_type_ vector float float) vector) + (displacement-between-two-points-normalized! (_type_ vector float) vector) (get-point-at-percent-along-path! (_type_ vector float symbol) vector) - (path-control-method-15 () none) + (path-control-method-15 (_type_ vector float float) vector) (displacement-between-points-at-percent-normalized! (_type_ vector float) vector) (get-num-segments (_type_) float) - (path-control-method-18 () none) + (total-distance (_type_) float) (get-num-verts (_type_) int) (segement-duration->path-duration (_type_ float) float) (path-duration->segment-duration (_type_ float) float) - (path-control-method-22 () none) - (path-control-method-23 () none) - (path-control-method-24 () none) + (path-control-method-22 (_type_ vector) float) + (path-control-method-23 (_type_ vector) float) + (path-control-method-24 (_type_ vector) float) (path-control-method-25 (_type_ vector) float) - (path-control-method-26 () none) - (path-control-method-27 () none) - (path-control-method-28 () none) - (path-control-method-29 () none) + (path-control-method-26 (_type_ float float) float) + (path-control-method-27 (_type_ vector) vector) + (path-control-method-28 (_type_ vector vector symbol) float) + (path-control-method-29 (_type_ vector int float) float) (should-display-marks? (_type_) symbol) - (path-control-method-31 () none) + (displacement-between-two-points! (_type_ vector float float) vector) ) ) diff --git a/test/decompiler/reference/jak3/engine/geometry/path_REF.gc b/test/decompiler/reference/jak3/engine/geometry/path_REF.gc new file mode 100644 index 0000000000..a888de36e5 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/geometry/path_REF.gc @@ -0,0 +1,609 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 9 of type path-control +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this path-control)) + (cond + ((logtest? (-> this flags) (path-control-flag not-found)) + (when (and (type? (-> this process) process-drawable) *display-entity-errors* (not *display-capture-mode*)) + (let ((s5-0 add-debug-text-3d) + (s4-0 #t) + (s3-0 577) + ) + (format (clear *temp-string*) "path data error in ~S" (-> this process name)) + (s5-0 + s4-0 + (the-as bucket-id s3-0) + *temp-string* + (-> this process root trans) + (font-color red) + (the-as vector2h #f) + ) + ) + ) + ) + ((let ((a0-5 this)) + (and *display-path-marks* (logtest? (-> a0-5 flags) (path-control-flag display))) + ) + (dotimes (s5-1 (-> this curve num-cverts)) + (let ((s4-1 (-> this curve cverts s5-1))) + (if (and (logtest? (-> this flags) (path-control-flag draw-line)) (< s5-1 (+ (-> this curve num-cverts) -1))) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + s4-1 + (-> this curve cverts (+ s5-1 1)) + (new 'static 'rgba :r #xff :g #x80 :a #x80) + #f + (the-as rgba -1) + ) + ) + (if (logtest? (-> this flags) (path-control-flag draw-point)) + (add-debug-x #t (bucket-id debug-no-zbuf1) s4-1 (new 'static 'rgba :r #xff :a #x80)) + ) + (when (logtest? (-> this flags) (path-control-flag draw-text)) + (let ((s3-1 add-debug-text-3d) + (s2-1 #t) + (s1-0 577) + ) + (format (clear *temp-string*) "~D" s5-1) + (s3-1 s2-1 (the-as bucket-id s1-0) *temp-string* s4-1 (font-color orange) (the-as vector2h #f)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 18 of type path-control +(defmethod total-distance ((this path-control)) + (let ((f30-0 (-> this curve length))) + (when (= f30-0 0.0) + (dotimes (s5-0 (+ (-> this curve num-cverts) -1)) + (+! f30-0 (vector-vector-distance (-> this curve cverts s5-0) (-> this curve cverts (+ s5-0 1)))) + ) + (set! (-> this curve length) f30-0) + ) + f30-0 + ) + ) + +;; definition for method 18 of type curve-control +(defmethod total-distance ((this curve-control)) + (let ((f0-0 (-> this curve length))) + (when (= f0-0 0.0) + (set! f0-0 (curve-length (-> this curve))) + (set! (-> this curve length) f0-0) + ) + f0-0 + ) + ) + +;; definition for method 26 of type path-control +;; INFO: Used lq/sq +(defmethod path-control-method-26 ((this path-control) (arg0 float) (arg1 float)) + (local-vars (v1-9 float)) + (let ((f30-0 (* arg0 (the float (+ (-> this curve num-cverts) -1)))) + (f28-0 (if (< 0.0 arg1) + 1.0 + -1.0 + ) + ) + (f26-0 (fabs arg1)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (get-point-in-path! this s5-0 f30-0 'interp) + 0.0 + (while (< 0.0 f26-0) + (let ((f24-0 (the float (the int (+ f28-0 f30-0))))) + (set! f30-0 (cond + ((or (< f24-0 0.0) (>= f24-0 (the float (-> this curve num-cverts)))) + (set! v1-9 f24-0) + (goto cfg-19) + f30-0 + ) + (else + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> this curve cverts (the int (the float (the int f24-0))) quad)) + 0.0 + (let ((f0-16 (vector-vector-distance s5-0 s4-0))) + (cond + ((< f0-16 f26-0) + (set! f26-0 (- f26-0 f0-16)) + (set! (-> s5-0 quad) (-> s4-0 quad)) + f24-0 + ) + (else + (let ((f0-17 (/ f26-0 f0-16))) + (set! v1-9 (lerp f30-0 f24-0 f0-17)) + ) + (goto cfg-19) + f30-0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (set! v1-9 (the-as float #f)) + (label cfg-19) + (let* ((f0-21 (/ v1-9 (the float (+ (-> this curve num-cverts) -1)))) + (f0-22 (fmin 1.0 f0-21)) + ) + (fmax 0.0 f0-22) + ) + ) + +;; definition for method 10 of type path-control +;; INFO: Used lq/sq +(defmethod get-point-in-path! ((this path-control) (arg0 vector) (arg1 float) (arg2 symbol)) + (let ((a1-1 (-> this curve num-cverts)) + (f0-3 (the float (the int arg1))) + ) + (cond + ((< arg1 0.0) + (set! (-> arg0 quad) (-> this curve cverts 0 quad)) + ) + ((>= f0-3 (the float (+ a1-1 -1))) + (set! (-> arg0 quad) (-> this curve cverts (+ a1-1 -1) quad)) + ) + ((or (= arg2 'exact) (= f0-3 arg1)) + (set! (-> arg0 quad) (-> this curve cverts (the int f0-3) quad)) + ) + (else + (vector-lerp! + arg0 + (-> this curve cverts (the int f0-3)) + (-> this curve cverts (the int (+ 1.0 f0-3))) + (- arg1 f0-3) + ) + ) + ) + ) + arg0 + ) + +;; definition for method 11 of type path-control +;; INFO: Used lq/sq +(defmethod get-random-point ((this path-control) (arg0 vector)) + (with-pp + (cond + ((> (-> this curve num-cverts) 0) + (let ((a0-2 (rand-vu-int-count (-> this curve num-cverts)))) + (set! (-> arg0 quad) (-> this curve cverts a0-2 quad)) + ) + ) + (else + (format #t "WARNING: method get-random-point called on a path-control object with no vertices.~%") + (if pp + (format #t "current process is ~A~%" (-> pp name)) + ) + (set! (-> arg0 quad) (-> *null-vector* quad)) + ) + ) + arg0 + ) + ) + +;; definition for method 14 of type path-control +(defmethod get-point-at-percent-along-path! ((this path-control) (arg0 vector) (arg1 float) (arg2 symbol)) + (get-point-in-path! this arg0 (* arg1 (the float (+ (-> this curve num-cverts) -1))) arg2) + ) + +;; definition for method 14 of type curve-control +(defmethod get-point-at-percent-along-path! ((this curve-control) (arg0 vector) (arg1 float) (arg2 symbol)) + (if (not (logtest? (-> this flags) (path-control-flag not-found))) + (curve-evaluate! + arg0 + arg1 + (-> this curve cverts) + (-> this curve num-cverts) + (-> this curve knots) + (-> this curve num-knots) + ) + ) + arg0 + ) + +;; definition for method 10 of type curve-control +(defmethod get-point-in-path! ((this curve-control) (arg0 vector) (arg1 float) (arg2 symbol)) + (if (not (logtest? (-> this flags) (path-control-flag not-found))) + (curve-evaluate! + arg0 + (/ arg1 (the float (+ (-> this curve num-cverts) -1))) + (-> this curve cverts) + (-> this curve num-cverts) + (-> this curve knots) + (-> this curve num-knots) + ) + ) + arg0 + ) + +;; definition for method 31 of type path-control +(defmethod displacement-between-two-points! ((this path-control) (arg0 vector) (arg1 float) (arg2 float)) + (let ((v1-0 (-> this curve num-cverts)) + (f0-3 (the float (the int arg1))) + ) + (cond + ((or (logtest? (-> this flags) (path-control-flag not-found)) (< v1-0 2) (< arg1 0.0)) + (vector-reset! arg0) + ) + (else + (let ((f0-4 (fmin f0-3 (the float (+ v1-0 -2))))) + (vector-! arg0 (-> this curve cverts (the int (+ 1.0 f0-4))) (-> this curve cverts (the int f0-4))) + ) + (vector-float*! arg0 arg0 arg2) + ) + ) + ) + arg0 + ) + +;; definition for method 12 of type path-control +(defmethod path-control-method-12 ((this path-control) (arg0 vector) (arg1 float) (arg2 float)) + (displacement-between-two-points! this arg0 arg1 arg2) + ) + +;; definition for method 15 of type path-control +(defmethod path-control-method-15 ((this path-control) (arg0 vector) (arg1 float) (arg2 float)) + (path-control-method-12 + this + arg0 + (* arg1 (the float (+ (-> this curve num-cverts) -1))) + (* arg2 (the float (+ (-> this curve num-cverts) -1))) + ) + ) + +;; definition for method 13 of type path-control +(defmethod displacement-between-two-points-normalized! ((this path-control) (arg0 vector) (arg1 float)) + (displacement-between-two-points! this arg0 arg1 1.0) + (vector-normalize! arg0 1.0) + ) + +;; definition for method 16 of type path-control +(defmethod displacement-between-points-at-percent-normalized! ((this path-control) (arg0 vector) (arg1 float)) + (displacement-between-two-points-normalized! this arg0 (* arg1 (the float (+ (-> this curve num-cverts) -1)))) + ) + +;; definition for method 31 of type curve-control +(defmethod displacement-between-two-points! ((this curve-control) (arg0 vector) (arg1 float) (arg2 float)) + (when (not (logtest? (-> this flags) (path-control-flag not-found))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (curve-evaluate! + arg0 + arg1 + (-> this curve cverts) + (-> this curve num-cverts) + (-> this curve knots) + (-> this curve num-knots) + ) + (cond + ((< arg1 (- 1.0 arg2)) + (curve-evaluate! + s4-0 + (+ arg1 arg2) + (-> this curve cverts) + (-> this curve num-cverts) + (-> this curve knots) + (-> this curve num-knots) + ) + (vector-! arg0 s4-0 arg0) + ) + (else + (curve-evaluate! + s4-0 + (- arg1 arg2) + (-> this curve cverts) + (-> this curve num-cverts) + (-> this curve knots) + (-> this curve num-knots) + ) + (vector-! arg0 arg0 s4-0) + ) + ) + ) + ) + ) + +;; definition for method 26 of type curve-control +(defmethod path-control-method-26 ((this curve-control) (arg0 float) (arg1 float)) + (let* ((f30-0 0.0001) + (v1-2 (displacement-between-two-points! this (new 'stack-no-clear 'vector) arg0 f30-0)) + ) + 0.0 + 0.0 + (let* ((f0-3 (/ f30-0 (vector-length v1-2))) + (v1-4 (+ arg0 (* f0-3 arg1))) + ) + (fmax 0.0 (fmin 1.0 v1-4)) + ) + ) + ) + +;; definition for method 12 of type curve-control +(defmethod path-control-method-12 ((this curve-control) (arg0 vector) (arg1 float) (arg2 float)) + (displacement-between-two-points! this arg0 (/ arg1 (the float (+ (-> this curve num-cverts) -1))) arg2) + ) + +;; definition for method 15 of type curve-control +(defmethod path-control-method-15 ((this curve-control) (arg0 vector) (arg1 float) (arg2 float)) + (displacement-between-two-points! this arg0 arg1 arg2) + ) + +;; definition for method 16 of type curve-control +(defmethod displacement-between-points-at-percent-normalized! ((this curve-control) (arg0 vector) (arg1 float)) + (displacement-between-two-points! this arg0 arg1 0.01) + (vector-normalize! arg0 1.0) + ) + +;; definition for method 13 of type curve-control +(defmethod displacement-between-two-points-normalized! ((this curve-control) (arg0 vector) (arg1 float)) + (displacement-between-points-at-percent-normalized! + this + arg0 + (/ arg1 (the float (+ (-> this curve num-cverts) -1))) + ) + ) + +;; definition for method 28 of type path-control +;; INFO: Used lq/sq +(defmethod path-control-method-28 ((this path-control) (arg0 vector) (arg1 vector) (arg2 symbol)) + (local-vars + (sv-96 vector) + (sv-100 vector) + (sv-104 vector) + (sv-108 vector) + (sv-112 number) + (sv-116 vector) + (sv-120 symbol) + (sv-124 float) + ) + (set! sv-96 (new 'stack-no-clear 'vector)) + (set! sv-100 (new 'stack-no-clear 'vector)) + (set! sv-104 (new 'stack-no-clear 'vector)) + (set! sv-108 (new 'stack-no-clear 'vector)) + (set! sv-112 -1.0) + (set! sv-116 (new 'stack-no-clear 'vector)) + (set! sv-120 (the-as symbol #f)) + (set! sv-124 (the-as float -1.0)) + (get-point-in-path! this sv-96 0.0 'interp) + (set! sv-112 (gpr->fpr #x7f800000)) + (when (not arg2) + (set! sv-124 (path-control-method-22 this arg0)) + (get-point-in-path! this sv-108 sv-124 'interp) + (set! sv-112 (vector-vector-distance-squared sv-108 arg0)) + ) + (let ((s3-1 (new 'stack-no-clear 'vector))) + (vector+! s3-1 arg0 arg1) + (dotimes (s2-0 (+ (-> this curve num-cverts) -1)) + (get-point-in-path! this sv-100 (the float (+ s2-0 1)) 'interp) + (vector-! sv-104 sv-100 sv-96) + (let ((s0-0 #f)) + 0.0 + (let ((s1-0 (new 'stack-no-clear 'vector))) + (set! (-> s1-0 x) -1.0) + (set! (-> s1-0 y) -1.0) + (line-line-find-intersection-xz arg0 arg1 sv-96 sv-104 s1-0) + (when (>= (-> s1-0 x) 0.0) + (if (and (< 0.0 (-> s1-0 y)) (>= 1.0 (-> s1-0 y))) + (set! s0-0 #t) + ) + (vector+float*! sv-116 arg0 arg1 (-> s1-0 x)) + (cond + ((and s0-0 (not sv-120)) + (set! (-> sv-108 quad) (-> sv-116 quad)) + (set! sv-112 (vector-vector-distance-squared sv-116 arg0)) + (set! sv-124 (lerp (the float s2-0) (the float (+ s2-0 1)) (-> s1-0 y))) + (set! sv-120 #t) + ) + ((and s0-0 sv-120) + (let ((f0-22 (vector-vector-distance-squared sv-116 arg0))) + (when (< f0-22 (the-as float sv-112)) + (set! (-> sv-108 quad) (-> sv-116 quad)) + (set! sv-112 f0-22) + (set! sv-124 (lerp (the float s2-0) (the float (+ s2-0 1)) (-> s1-0 y))) + ) + ) + ) + ((not (or s0-0 sv-120)) + (let ((s0-1 (new 'stack-no-clear 'vector)) + (a3-5 (new 'stack-no-clear 'vector)) + ) + (set! (-> s1-0 y) (fmax 0.0 (fmin 1.0 (-> s1-0 y)))) + (vector+float*! s0-1 sv-96 sv-104 (-> s1-0 y)) + (let* ((f0-32 (vector-segment-distance-point! s0-1 arg0 s3-1 a3-5)) + (f0-33 (* f0-32 f0-32)) + ) + (when (< f0-33 (the-as float sv-112)) + (set! (-> sv-108 quad) (-> s0-1 quad)) + (set! sv-112 f0-33) + (set! sv-124 (lerp (the float s2-0) (the float (+ s2-0 1)) (-> s1-0 y))) + ) + ) + ) + ) + ) + ) + ) + ) + (set! (-> sv-96 quad) (-> sv-100 quad)) + ) + ) + (set! sv-124 (/ sv-124 (the float (+ (-> this curve num-cverts) -1)))) + sv-124 + ) + +;; definition for method 29 of type path-control +(defmethod path-control-method-29 ((this path-control) (arg0 vector) (arg1 int) (arg2 float)) + (let ((s2-0 (get-point-in-path! this (new 'stack-no-clear 'vector) (the float arg1) 'interp)) + (a2-3 (get-point-in-path! this (new 'stack-no-clear 'vector) (the float (+ arg1 1)) 'interp)) + ) + (vector-segment-distance-point! arg0 s2-0 a2-3 (the-as vector arg2)) + ) + ) + +;; definition for method 22 of type path-control +;; INFO: Used lq/sq +(defmethod path-control-method-22 ((this path-control) (arg0 vector)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (f30-0 4096000000.0) + (f28-0 0.0) + ) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> arg0 quad)) + (set! (-> s3-0 y) 0.0) + (get-point-in-path! this s4-0 0.0 'interp) + (set! (-> s4-0 y) 0.0) + (dotimes (s1-0 (+ (-> this curve num-cverts) -1)) + (set! (-> s5-0 quad) (-> s4-0 quad)) + (get-point-in-path! this s4-0 (the float (+ s1-0 1)) 'interp) + (set! (-> s4-0 y) 0.0) + (let ((f0-5 (vector-segment-distance-point! s3-0 s5-0 s4-0 s2-0))) + (when (< f0-5 f30-0) + (set! f30-0 f0-5) + (set! f28-0 + (+ (/ (vector-vector-xz-distance s2-0 s5-0) (vector-vector-xz-distance s4-0 s5-0)) (the float s1-0)) + ) + ) + ) + ) + ) + f28-0 + ) + ) + +;; definition for method 24 of type path-control +;; INFO: Used lq/sq +(defmethod path-control-method-24 ((this path-control) (arg0 vector)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (f30-0 4096000000.0) + (f28-0 0.0) + ) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> arg0 quad)) + (get-point-in-path! this s4-0 0.0 'interp) + (dotimes (s1-0 (+ (-> this curve num-cverts) -1)) + (set! (-> s5-0 quad) (-> s4-0 quad)) + (get-point-in-path! this s4-0 (the float (+ s1-0 1)) 'interp) + (let ((f0-2 (vector-segment-distance-point! s3-0 s5-0 s4-0 s2-0))) + (when (< f0-2 f30-0) + (set! f30-0 f0-2) + (set! f28-0 (+ (/ (vector-vector-distance s2-0 s5-0) (vector-vector-distance s4-0 s5-0)) (the float s1-0))) + ) + ) + ) + ) + f28-0 + ) + ) + +;; definition for method 25 of type path-control +(defmethod path-control-method-25 ((this path-control) (arg0 vector)) + (/ (path-control-method-24 this arg0) (the float (+ (-> this curve num-cverts) -1))) + ) + +;; definition for method 23 of type path-control +(defmethod path-control-method-23 ((this path-control) (arg0 vector)) + (/ (path-control-method-22 this arg0) (the float (+ (-> this curve num-cverts) -1))) + ) + +;; definition for method 9 of type curve-control +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this curve-control)) + (cond + ((logtest? (-> this flags) (path-control-flag not-found)) + (when (and (type? (-> this process) process-drawable) *display-entity-errors* (not *display-capture-mode*)) + (let ((s5-0 add-debug-text-3d) + (s4-0 #t) + (s3-0 577) + ) + (format (clear *temp-string*) "curve data error in ~S" (-> this process name)) + (s5-0 + s4-0 + (the-as bucket-id s3-0) + *temp-string* + (-> this process root trans) + (font-color red) + (the-as vector2h #f) + ) + ) + ) + ) + ((let ((a0-5 this)) + (and *display-path-marks* (logtest? (-> a0-5 flags) (path-control-flag display))) + ) + (if (and (logtest? (-> this flags) (path-control-flag draw-line)) (> (-> this curve num-cverts) 0)) + (add-debug-curve2 + #t + (bucket-id debug-no-zbuf1) + (-> this curve) + (new 'static 'rgba :r #xff :g #x80 :a #x80) + #f + ) + ) + (dotimes (s5-1 (-> this curve num-cverts)) + (let ((s4-1 (-> this curve cverts s5-1))) + (if (logtest? (-> this flags) (path-control-flag draw-point)) + (add-debug-x #t (bucket-id debug-no-zbuf1) s4-1 (new 'static 'rgba :r #xff :a #x80)) + ) + (when (logtest? (-> this flags) (path-control-flag draw-text)) + (let ((s3-1 add-debug-text-3d) + (s2-1 #t) + (s1-0 577) + ) + (format (clear *temp-string*) "~D" s5-1) + (s3-1 s2-1 (the-as bucket-id s1-0) *temp-string* s4-1 (font-color orange) (the-as vector2h #f)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 27 of type path-control +(defmethod path-control-method-27 ((this path-control) (arg0 vector)) + (let ((s4-0 (-> this curve num-cverts))) + (let ((f30-0 (/ 1.0 (the float s4-0)))) + (set-vector! arg0 0.0 0.0 0.0 0.0) + (dotimes (s3-0 s4-0) + (vector+float*! + arg0 + arg0 + (get-point-in-path! this (new 'stack-no-clear 'vector) (the float s3-0) 'interp) + f30-0 + ) + ) + ) + (dotimes (s3-1 s4-0) + (let ((f0-10 + (vector-vector-distance arg0 (get-point-in-path! this (new 'stack-no-clear 'vector) (the float s3-1) 'interp)) + ) + ) + (if (< (-> arg0 w) f0-10) + (set! (-> arg0 w) (+ 4096.0 f0-10)) + ) + ) + ) + ) + arg0 + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/background/background_REF.gc b/test/decompiler/reference/jak3/engine/gfx/background/background_REF.gc new file mode 100644 index 0000000000..ccd3380b71 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/background/background_REF.gc @@ -0,0 +1,623 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *background-work*, type background-work +(define *background-work* (new 'global 'background-work)) + +;; definition for symbol background-vu0-block, type vu-function +(define background-vu0-block (new 'static 'vu-function :length 59 :qlength 30)) + +;; definition for function background-upload-vu0 +;; WARN: Return type mismatch int vs none. +(defun background-upload-vu0 () + "Upload VU0 functions for background. (believed unused?)" + (upload-vu0-program background-vu0-block (&-> *background-work* wait-to-vu0)) + 0 + (none) + ) + +;; definition for function init-background +;; WARN: Return type mismatch int vs none. +(defun init-background () + "Reset lists of trees to draw for background rendering." + (dotimes (v1-0 8) + (set! (-> *background-work* tfrag-trees v1-0) #f) + (set! (-> *background-work* tfrag-trans-trees v1-0) #f) + (set! (-> *background-work* tfrag-water-trees v1-0) #f) + ) + (set! (-> *background-work* tfrag-tree-count) 0) + (set! (-> *background-work* tfrag-trans-tree-count) 0) + (set! (-> *background-work* tfrag-water-tree-count) 0) + (set! (-> *background-work* shrub-tree-count) 0) + (set! (-> *background-work* tie-tree-count) 0) + (set! (-> *background-work* wait-to-vu0) (the-as uint 0)) + 0 + (none) + ) + +;; definition for function upload-vis-bits +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun upload-vis-bits ((arg0 level) (arg1 level) (arg2 bsp-header)) + "Upload vis data to the scratchpad." + (let ((v1-2 (/ (+ (-> arg2 visible-list-length) 15) 16))) + (let ((a0-1 (-> arg0 vis-bits)) + (a1-1 (the-as (pointer uinteger) (-> arg2 all-visible-list))) + (a2-2 (the-as (pointer uint128) (+ #x3800 #x70000000))) + ) + (b! (not *artist-flip-visible*) cfg-5 :delay (nop!)) + (nop!) + (nop!) + (label cfg-2) + (let ((a3-2 (-> (the-as (pointer uint128) a0-1)))) + (&+! a0-1 16) + (let ((t0-0 (-> (the-as (pointer uint128) a1-1) 0))) + (set! a1-1 (&-> (the-as (pointer uint8) a1-1) 16)) + (nop!) + (nop!) + (let ((a3-3 (logxor a3-2 (the-as uint t0-0)))) + (+! v1-2 -1) + (set! (-> a2-2 0) a3-3) + ) + ) + ) + (set! a2-2 (&-> a2-2 1)) + (b! (> v1-2 0) cfg-2 :delay (nop!)) + 0 + (b! #t cfg-8 :delay (nop!)) + (nop!) + (label cfg-5) + (nop!) + (nop!) + (label cfg-6) + (let ((a1-2 (-> (the-as (pointer uint128) a0-1)))) + (&+! a0-1 16) + (nop!) + (+! v1-2 -1) + (set! (-> a2-2 0) a1-2) + ) + (set! a2-2 (&-> a2-2 1)) + ) + (b! (> v1-2 0) cfg-6 :delay (nop!)) + ) + 0 + (label cfg-8) + (none) + ) + +;; definition for function set-background-regs! +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function set-tie-quard-planes! +;; INFO: Used lq/sq +;; WARN: Return type mismatch plane vs none. +(defun set-tie-quard-planes! ((arg0 level)) + "Set up TIE work guard planes." + (cond + ((logtest? (-> arg0 info level-flags) (level-flags use-camera-other)) + (set! (-> *instance-tie-work* guard-plane 0 quad) (-> *math-camera* guard-plane-other 0 quad)) + (set! (-> *instance-tie-work* guard-plane 1 quad) (-> *math-camera* guard-plane-other 1 quad)) + (set! (-> *instance-tie-work* guard-plane 2 quad) (-> *math-camera* guard-plane-other 2 quad)) + (set! (-> *instance-tie-work* guard-plane 3 quad) (-> *math-camera* guard-plane-other 3 quad)) + ) + (else + (set! (-> *instance-tie-work* guard-plane 0 quad) (-> *math-camera* guard-plane 0 quad)) + (set! (-> *instance-tie-work* guard-plane 1 quad) (-> *math-camera* guard-plane 1 quad)) + (set! (-> *instance-tie-work* guard-plane 2 quad) (-> *math-camera* guard-plane 2 quad)) + (set! (-> *instance-tie-work* guard-plane 3 quad) (-> *math-camera* guard-plane 3 quad)) + ) + ) + (none) + ) + +;; definition for function set-shrub-quard-planes! +;; INFO: Used lq/sq +;; WARN: Return type mismatch plane vs none. +(defun set-shrub-quard-planes! ((arg0 level)) + "Set shrub work guard planes." + (cond + ((logtest? (-> arg0 info level-flags) (level-flags use-camera-other)) + (set! (-> *instance-shrub-work* guard-plane 0 quad) (-> *math-camera* guard-plane-other 0 quad)) + (set! (-> *instance-shrub-work* guard-plane 1 quad) (-> *math-camera* guard-plane-other 1 quad)) + (set! (-> *instance-shrub-work* guard-plane 2 quad) (-> *math-camera* guard-plane-other 2 quad)) + (set! (-> *instance-shrub-work* guard-plane 3 quad) (-> *math-camera* guard-plane-other 3 quad)) + ) + (else + (set! (-> *instance-shrub-work* guard-plane 0 quad) (-> *math-camera* guard-plane 0 quad)) + (set! (-> *instance-shrub-work* guard-plane 1 quad) (-> *math-camera* guard-plane 1 quad)) + (set! (-> *instance-shrub-work* guard-plane 2 quad) (-> *math-camera* guard-plane 2 quad)) + (set! (-> *instance-shrub-work* guard-plane 3 quad) (-> *math-camera* guard-plane 3 quad)) + ) + ) + (none) + ) + +;; definition for function set-subdivide-settings! +(defun set-subdivide-settings! ((arg0 level)) + "Set subdivide settings from the level." + (if *artist-use-menu-subdiv* + (update-subdivide-settings! *subdivide-settings* *math-camera* 11) + (update-subdivide-settings! *subdivide-settings* *math-camera* (-> arg0 index)) + ) + (none) + ) + +;; definition for function finish-background +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; WARN: Function finish-background has a return type of none, but the expression builder found a return statement. +(defun finish-background () + "Run all renderers for background data added." + (if (get-menu-mode *blit-displays-work*) + (return #f) + ) + (when (not (paused?)) + (flush-cache 0) + (dotimes (gp-0 (-> *level* length)) + (let ((v1-8 (-> *level* level gp-0))) + (when (= (-> v1-8 status) 'active) + (-> v1-8 bsp wind-array) + (if (nonzero? (-> v1-8 bsp wind-array-length)) + (level-update-wind *wind-work*) + ) + ) + ) + ) + ) + (background-upload-vu0) + (dotimes (v1-14 (-> *level* length)) + (let ((a0-12 (-> *level* level v1-14))) + (when (= (-> a0-12 status) 'active) + (let ((a0-13 (-> a0-12 bsp))) + (when (nonzero? (-> a0-13 tfrag-masks)) + (dotimes (a1-7 (-> a0-13 tfrag-masks length)) + (set! (-> a0-13 tfrag-closest a1-7) 4095996000.0) + ) + ) + (when (nonzero? (-> a0-13 shrub-masks)) + (dotimes (a1-12 (-> a0-13 shrub-masks length)) + (set! (-> a0-13 shrub-closest a1-12) 4095996000.0) + ) + ) + (when (nonzero? (-> a0-13 alpha-masks)) + (dotimes (a1-17 (-> a0-13 alpha-masks length)) + (set! (-> a0-13 alpha-closest a1-17) 4095996000.0) + ) + ) + (when (nonzero? (-> a0-13 water-masks)) + (dotimes (a1-22 (-> a0-13 water-masks length)) + (set! (-> a0-13 water-closest a1-22) 4095996000.0) + ) + ) + ) + ) + ) + ) + (when (nonzero? (-> *background-work* shrub-tree-count)) + (when *debug-segment* + (let ((gp-1 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-27 'shrubbery) + (s5-0 *profile-shrubbery-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s4-0 (-> gp-1 data (-> gp-1 count)))) + (let ((s3-0 (-> gp-1 base-time))) + (set! (-> s4-0 name) v1-27) + (set! (-> s4-0 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-0)))) + ) + (set! (-> s4-0 depth) (the-as uint (-> gp-1 depth))) + (set! (-> s4-0 color) s5-0) + (set! (-> gp-1 segment (-> gp-1 depth)) s4-0) + ) + (set! (-> gp-1 count) (min 1023 (+ (-> gp-1 count) 1))) + (+! (-> gp-1 depth) 1) + (set! (-> gp-1 max-depth) (max (-> gp-1 max-depth) (-> gp-1 depth))) + ) + ) + 0 + ) + (dotimes (gp-2 (-> *background-work* shrub-tree-count)) + (set! *draw-index* (-> *background-work* shrub-levels gp-2 draw-index)) + (flush-cache 0) + (let ((s5-1 (-> *background-work* shrub-trees gp-2)) + (s4-1 (-> *background-work* shrub-levels gp-2)) + ) + (if (nonzero? (-> s5-1 colors-added)) + (time-of-day-interp-colors + (-> *instance-shrub-work* colors) + (the-as uint (-> s5-1 colors-added)) + (-> s4-1 mood-context) + ) + ) + (set-background-regs! s4-1) + (set-shrub-quard-planes! s4-1) + (draw-drawable-tree-instance-shrub s5-1 s4-1) + ) + ) + (when *debug-segment* + (let ((gp-3 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-68 (+ (-> gp-3 depth) -1)) + (s5-2 (-> gp-3 segment v1-68)) + (s4-2 (-> gp-3 base-time)) + ) + (when (>= v1-68 0) + (set! (-> s5-2 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-2)))) + (+! (-> gp-3 depth) -1) + ) + ) + ) + ) + 0 + ) + ) + (let ((gp-4 (the-as level #f))) + (when (or (nonzero? (-> *background-work* tfrag-tree-count)) + (nonzero? (-> *background-work* tfrag-trans-tree-count)) + (nonzero? (-> *background-work* tfrag-water-tree-count)) + ) + (let ((s5-5 (max + (max (-> *background-work* tfrag-tree-count) (-> *background-work* tfrag-trans-tree-count)) + (-> *background-work* tfrag-water-tree-count) + ) + ) + (s4-3 (the-as time-of-day-palette #f)) + ) + (when *debug-segment* + (let ((s3-1 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-94 'tfrag) + (s2-0 *profile-tfrag-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s1-0 (-> s3-1 data (-> s3-1 count)))) + (let ((s0-0 (-> s3-1 base-time))) + (set! (-> s1-0 name) v1-94) + (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-1 depth))) + (set! (-> s1-0 color) s2-0) + (set! (-> s3-1 segment (-> s3-1 depth)) s1-0) + ) + (set! (-> s3-1 count) (min 1023 (+ (-> s3-1 count) 1))) + (+! (-> s3-1 depth) 1) + (set! (-> s3-1 max-depth) (max (-> s3-1 max-depth) (-> s3-1 depth))) + ) + ) + 0 + ) + (dotimes (s3-2 s5-5) + (let ((s2-1 (-> *background-work* tfrag-trees s3-2))) + (when s2-1 + (let ((s1-1 (-> *background-work* tfrag-levels s3-2))) + (let ((a2-23 (-> s1-1 bsp)) + (s0-1 (-> s2-1 time-of-day-pal)) + ) + (upload-vis-bits s1-1 gp-4 a2-23) + (set-subdivide-settings! s1-1) + (when (not (or (zero? s0-1) (= s4-3 s0-1))) + (flush-cache 0) + (time-of-day-interp-colors-scratch (the-as (pointer rgba) (+ 6144 #x70000000)) s0-1 (-> s1-1 mood-context)) + (set! s4-3 s0-1) + ) + ) + (set! *draw-index* (-> s1-1 draw-index)) + (set! (-> *tfrag-work* min-dist z) 4095996000.0) + (set-background-regs! s1-1) + ) + (draw-drawable-tree-tfrag s2-1) + (set! (-> *level* draw-level *draw-index* closest-object 0) (-> *tfrag-work* min-dist z)) + ) + ) + (let ((s2-2 (-> *background-work* tfrag-trans-trees s3-2))) + (when s2-2 + (let ((s1-2 (-> *background-work* tfrag-trans-levels s3-2))) + (let ((a2-25 (-> s1-2 bsp)) + (s0-2 (-> s2-2 time-of-day-pal)) + ) + (upload-vis-bits s1-2 gp-4 a2-25) + (set-subdivide-settings! s1-2) + (when (not (or (zero? s0-2) (= s4-3 s0-2))) + (flush-cache 0) + (time-of-day-interp-colors-scratch (the-as (pointer rgba) (+ 6144 #x70000000)) s0-2 (-> s1-2 mood-context)) + (set! s4-3 s0-2) + ) + ) + (set! *draw-index* (-> s1-2 draw-index)) + (set! (-> *tfrag-work* min-dist z) 4095996000.0) + (set-background-regs! s1-2) + ) + (draw-drawable-tree-tfrag-trans s2-2) + (set! (-> *level* draw-level *draw-index* closest-object 3) (-> *tfrag-work* min-dist z)) + ) + ) + (let ((s2-3 (-> *background-work* tfrag-water-trees s3-2))) + (when s2-3 + (let ((s1-3 (-> *background-work* tfrag-water-levels s3-2))) + (let ((a2-27 (-> s1-3 bsp)) + (s0-3 (-> s2-3 time-of-day-pal)) + ) + (upload-vis-bits s1-3 gp-4 a2-27) + (set-subdivide-settings! s1-3) + (when (not (or (zero? s0-3) (= s4-3 s0-3))) + (flush-cache 0) + (time-of-day-interp-colors-scratch (the-as (pointer rgba) (+ 6144 #x70000000)) s0-3 (-> s1-3 mood-context)) + (set! s4-3 s0-3) + ) + ) + (set! *draw-index* (-> s1-3 draw-index)) + (set! (-> *tfrag-work* min-dist z) 4095996000.0) + (set-background-regs! s1-3) + ) + (draw-drawable-tree-tfrag-water s2-3) + (set! (-> *level* draw-level *draw-index* closest-object 4) (-> *tfrag-work* min-dist z)) + ) + ) + ) + ) + (when *debug-segment* + (let ((s5-6 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-174 (+ (-> s5-6 depth) -1)) + (s4-4 (-> s5-6 segment v1-174)) + (s3-3 (-> s5-6 base-time)) + ) + (when (>= v1-174 0) + (set! (-> s4-4 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-3)))) + (+! (-> s5-6 depth) -1) + ) + ) + ) + ) + 0 + ) + ) + (when (nonzero? (-> *background-work* tie-tree-count)) + (set! (-> *instance-tie-work* tod-env-color quad) (-> *time-of-day-context* current-env-color quad)) + (when *debug-segment* + (let ((s5-7 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-192 'tie) + (s4-5 *profile-tie-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s3-4 (-> s5-7 data (-> s5-7 count)))) + (let ((s2-4 (-> s5-7 base-time))) + (set! (-> s3-4 name) v1-192) + (set! (-> s3-4 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s2-4)))) + ) + (set! (-> s3-4 depth) (the-as uint (-> s5-7 depth))) + (set! (-> s3-4 color) s4-5) + (set! (-> s5-7 segment (-> s5-7 depth)) s3-4) + ) + (set! (-> s5-7 count) (min 1023 (+ (-> s5-7 count) 1))) + (+! (-> s5-7 depth) 1) + (set! (-> s5-7 max-depth) (max (-> s5-7 max-depth) (-> s5-7 depth))) + ) + ) + 0 + ) + (dotimes (s5-8 (-> *background-work* tie-tree-count)) + (let ((s4-6 (-> *background-work* tie-levels s5-8))) + (let ((a2-29 (-> s4-6 bsp))) + (when (!= s4-6 gp-4) + (set! (-> *instance-tie-work* min-dist x) 4095996000.0) + (upload-vis-bits s4-6 gp-4 a2-29) + (set-subdivide-settings! s4-6) + (set! gp-4 s4-6) + ) + ) + (set! *draw-index* (-> s4-6 draw-index)) + (set! (-> *prototype-tie-work* mood) (-> s4-6 mood-context)) + (set-background-regs! s4-6) + (set-tie-quard-planes! s4-6) + (tie-scissor-make-perspective-matrix + (-> *instance-tie-work* tie-scissor-perspective-matrix) + (if (logtest? (-> s4-6 info level-flags) (level-flags use-camera-other)) + (-> *math-camera* camera-temp-other) + (-> *math-camera* camera-temp) + ) + ) + (draw-drawable-tree-instance-tie (-> *background-work* tie-trees s5-8) s4-6) + ) + (set! (-> *background-work* tie-generic s5-8) (the-as basic (-> *prototype-tie-work* generic-next))) + (set! (-> *background-work* tie-generic-trans s5-8) + (the-as basic (-> *prototype-tie-work* generic-trans-next)) + ) + ) + (when *debug-segment* + (let ((gp-5 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-240 (+ (-> gp-5 depth) -1)) + (s5-9 (-> gp-5 segment v1-240)) + (s4-7 (-> gp-5 base-time)) + ) + (when (>= v1-240 0) + (set! (-> s5-9 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-7)))) + (+! (-> gp-5 depth) -1) + ) + ) + ) + ) + 0 + ) + ) + ) + (let ((a0-116 (-> *display* frames (-> *display* on-screen) global-buf))) + (when (< (-> a0-116 real-buffer-end) (the-as int (-> a0-116 base))) + (break!) + 0 + ) + ) + (dotimes (gp-6 (-> *level* draw-level-count)) + (let ((s5-10 (-> *level* draw-level gp-6))) + (when (and s5-10 (= (-> s5-10 status) 'active)) + (when (and (nonzero? (-> s5-10 bsp hfrag-drawable)) (= (-> s5-10 display?) 'display)) + (when *debug-segment* + (let ((s4-8 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-271 'hfrag) + (s3-5 *profile-hfrag-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s2-5 (-> s4-8 data (-> s4-8 count)))) + (let ((s1-4 (-> s4-8 base-time))) + (set! (-> s2-5 name) v1-271) + (set! (-> s2-5 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s1-4)))) + ) + (set! (-> s2-5 depth) (the-as uint (-> s4-8 depth))) + (set! (-> s2-5 color) s3-5) + (set! (-> s4-8 segment (-> s4-8 depth)) s2-5) + ) + (set! (-> s4-8 count) (min 1023 (+ (-> s4-8 count) 1))) + (+! (-> s4-8 depth) 1) + (set! (-> s4-8 max-depth) (max (-> s4-8 max-depth) (-> s4-8 depth))) + ) + ) + 0 + ) + (set! *draw-index* (-> s5-10 draw-index)) + (let ((s4-9 (-> *display* frames (-> *display* on-screen) global-buf base))) + (draw (-> s5-10 bsp hfrag-drawable)) + (let ((v1-293 *dma-mem-usage*)) + (when (nonzero? v1-293) + (set! (-> v1-293 length) (max 44 (-> v1-293 length))) + (set! (-> v1-293 data 43 name) "hfragment") + (+! (-> v1-293 data 43 count) 1) + (+! (-> v1-293 data 43 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s4-9)) + ) + (set! (-> v1-293 data 43 total) (-> v1-293 data 43 used)) + ) + ) + ) + (when *debug-segment* + (let ((s5-11 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-305 (+ (-> s5-11 depth) -1)) + (s4-10 (-> s5-11 segment v1-305)) + (s3-6 (-> s5-11 base-time)) + ) + (when (>= v1-305 0) + (set! (-> s4-10 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-6)))) + (+! (-> s5-11 depth) -1) + ) + ) + ) + ) + 0 + ) + ) + ) + ) + ) + (let ((a0-139 (-> *display* frames (-> *display* on-screen) global-buf))) + (when (< (-> a0-139 real-buffer-end) (the-as int (-> a0-139 base))) + (break!) + 0 + ) + ) + (dotimes (v1-323 (-> *level* length)) + (let ((a1-55 (-> *level* level v1-323))) + (when (= (-> a1-55 status) 'active) + (let ((a0-145 (-> a1-55 bsp))) + (when (nonzero? (-> a0-145 tfrag-masks)) + (let ((a2-43 (-> a1-55 texture-mask))) + (dotimes (a3-5 (-> a0-145 tfrag-masks length)) + (let ((f0-12 (* (-> a0-145 tfrag-closest a3-5) (-> *math-camera* fov-correction-factor)))) + (when (!= f0-12 4095996000.0) + (let ((t0-8 (-> a0-145 tfrag-masks data a3-5))) + (dotimes (t1-2 3) + (when (or (= t1-2 2) (>= f0-12 (-> t0-8 data t1-2 dist))) + (dotimes (t2-5 3) + (logior! + (-> (&-> a2-43 0 mask data t2-5) 0) + (-> (the-as (pointer int32) (+ (* t2-5 4) (the-as int t0-8) (* t1-2 16))) 0) + ) + ) + (goto cfg-176) + ) + ) + ) + ) + ) + (label cfg-176) + ) + ) + ) + (when (nonzero? (-> a0-145 shrub-masks)) + (let ((a2-48 (-> a1-55 texture-mask 2))) + (dotimes (a3-6 (-> a0-145 shrub-masks length)) + (let ((f0-14 (* (-> a0-145 shrub-closest a3-6) (-> *math-camera* fov-correction-factor)))) + (when (!= f0-14 4095996000.0) + (let ((t0-24 (-> a0-145 shrub-masks data a3-6))) + (dotimes (t1-5 3) + (when (or (= t1-5 2) (>= f0-14 (-> t0-24 data t1-5 dist))) + (dotimes (t2-11 3) + (logior! + (-> a2-48 mask data t2-11) + (-> (the-as (pointer int32) (+ (* t2-11 4) (the-as int t0-24) (* t1-5 16))) 0) + ) + ) + (goto cfg-196) + ) + ) + ) + ) + ) + (label cfg-196) + ) + ) + ) + (when (nonzero? (-> a0-145 alpha-masks)) + (let ((a2-53 (-> a1-55 texture-mask 3))) + (dotimes (a3-7 (-> a0-145 alpha-masks length)) + (let ((f0-16 (* (-> a0-145 alpha-closest a3-7) (-> *math-camera* fov-correction-factor)))) + (when (!= f0-16 4095996000.0) + (let ((t0-40 (-> a0-145 alpha-masks data a3-7))) + (dotimes (t1-8 3) + (when (or (= t1-8 2) (>= f0-16 (-> t0-40 data t1-8 dist))) + (dotimes (t2-17 3) + (logior! + (-> a2-53 mask data t2-17) + (-> (the-as (pointer int32) (+ (* t2-17 4) (the-as int t0-40) (* t1-8 16))) 0) + ) + ) + (goto cfg-216) + ) + ) + ) + ) + ) + (label cfg-216) + ) + ) + ) + (when (nonzero? (-> a0-145 water-masks)) + (let ((a1-56 (-> a1-55 texture-mask 4))) + (dotimes (a2-58 (-> a0-145 water-masks length)) + (let ((f0-18 (* (-> a0-145 water-closest a2-58) (-> *math-camera* fov-correction-factor)))) + (when (!= f0-18 4095996000.0) + (let ((a3-16 (-> a0-145 water-masks data a2-58))) + (dotimes (t0-50 3) + (when (or (= t0-50 2) (>= f0-18 (-> a3-16 data t0-50 dist))) + (dotimes (t1-14 3) + (logior! + (-> a1-56 mask data t1-14) + (-> (the-as (pointer int32) (+ (* t1-14 4) (the-as int a3-16) (* t0-50 16))) 0) + ) + ) + (goto cfg-236) + ) + ) + ) + ) + ) + (label cfg-236) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) diff --git a/test/decompiler/reference/jak3/engine/gfx/background/hfrag/hfrag-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/background/hfrag/hfrag-h_REF.gc new file mode 100644 index 0000000000..84e9e7444c --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/background/hfrag/hfrag-h_REF.gc @@ -0,0 +1,1068 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type adgif-shader-array +(deftype adgif-shader-array (inline-array-class) + ((data adgif-shader :inline :dynamic) + ) + ) + +;; definition for method 3 of type adgif-shader-array +(defmethod inspect ((this adgif-shader-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! (-> adgif-shader-array heap-base) (the-as uint 80)) + +;; definition of type hfrag-montage +(deftype hfrag-montage (structure) + ((data uint16 16) + ) + ) + +;; definition for method 3 of type hfrag-montage +(defmethod inspect ((this hfrag-montage)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-montage) + (format #t "~1Tdata[16] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition of type hfrag-bucket +(deftype hfrag-bucket (structure) + ((next uint32) + (count uint16) + (vertex-count uint16) + (next-scissor uint32) + (count-scissor uint16) + (vertex-count-scissor uint16) + ) + ) + +;; definition for method 3 of type hfrag-bucket +(defmethod inspect ((this hfrag-bucket)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-bucket) + (format #t "~1Tnext: #x~X~%" (-> this next)) + (format #t "~1Tcount: ~D~%" (-> this count)) + (format #t "~1Tvertex-count: ~D~%" (-> this vertex-count)) + (format #t "~1Tnext-scissor: #x~X~%" (-> this next-scissor)) + (format #t "~1Tcount-scissor: ~D~%" (-> this count-scissor)) + (format #t "~1Tvertex-count-scissor: ~D~%" (-> this vertex-count-scissor)) + (label cfg-4) + this + ) + +;; definition of type hfrag-packed-index +(deftype hfrag-packed-index (uint16) + ((bit11 uint8 :offset 11 :size 5) + ) + ) + +;; definition of type hfrag-vertex +(deftype hfrag-vertex (structure) + ((height uint16) + (packed-index hfrag-packed-index) + ) + ) + +;; definition for method 3 of type hfrag-vertex +(defmethod inspect ((this hfrag-vertex)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-vertex) + (format #t "~1Theight: ~D~%" (-> this height)) + (format #t "~1Tpacked-index: ~D~%" (-> this packed-index)) + (label cfg-4) + this + ) + +;; definition of type hfrag-vert-index +(deftype hfrag-vert-index (structure) + ((pos vector2ub :inline) + (index0 uint16 :offset 2) + (index1 uint16 :offset 4) + (index2 uint16 :offset 6) + ) + :pack-me + ) + +;; definition for method 3 of type hfrag-vert-index +(defmethod inspect ((this hfrag-vert-index)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-vert-index) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tindex0: ~D~%" (-> this index0)) + (format #t "~1Tindex1: ~D~%" (-> this index1)) + (format #t "~1Tindex2: ~D~%" (-> this index2)) + (label cfg-4) + this + ) + +;; definition of type hfrag-poly4 +(deftype hfrag-poly4 (structure) + ((data hfrag-vert-index 4 :inline) + ) + ) + +;; definition for method 3 of type hfrag-poly4 +;; INFO: this function exists in multiple non-identical object files +(defmethod inspect ((this hfrag-poly4)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-poly4) + (format #t "~1Tdata[4] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition for method 3 of type hfrag-poly4 +;; INFO: this function exists in multiple non-identical object files +(defmethod inspect ((this hfrag-poly4)) + (format #t "[~8x] hfrag-poly4~%" this) + (dotimes (s5-0 4) + (format + #t + "~T~d: index0: ~d index1: ~d index2: ~d pos: ~d ~d~%" + s5-0 + (shr (-> this data s5-0 index0) 2) + (shr (-> this data s5-0 index1) 2) + (shr (-> this data s5-0 index2) 2) + (-> this data s5-0 pos x) + (-> this data s5-0 pos y) + ) + ) + this + ) + +;; definition of type hfrag-poly9 +(deftype hfrag-poly9 (structure) + ((data hfrag-vert-index 9 :inline) + ) + ) + +;; definition for method 3 of type hfrag-poly9 +;; INFO: this function exists in multiple non-identical object files +(defmethod inspect ((this hfrag-poly9)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-poly9) + (format #t "~1Tdata[9] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition for method 3 of type hfrag-poly9 +;; INFO: this function exists in multiple non-identical object files +(defmethod inspect ((this hfrag-poly9)) + (format #t "[~8x] hfrag-poly9~%" this) + (dotimes (s5-0 9) + (format + #t + "~T~d: index0: ~d index1: ~d index2: ~d pos: ~d ~d~%" + s5-0 + (shr (-> this data s5-0 index0) 2) + (shr (-> this data s5-0 index1) 2) + (shr (-> this data s5-0 index2) 2) + (-> this data s5-0 pos x) + (-> this data s5-0 pos y) + ) + ) + this + ) + +;; definition of type hfrag-poly25 +(deftype hfrag-poly25 (structure) + ((data hfrag-vert-index 25 :inline) + ) + ) + +;; definition for method 3 of type hfrag-poly25 +;; INFO: this function exists in multiple non-identical object files +(defmethod inspect ((this hfrag-poly25)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-poly25) + (format #t "~1Tdata[25] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition for method 3 of type hfrag-poly25 +;; INFO: this function exists in multiple non-identical object files +(defmethod inspect ((this hfrag-poly25)) + (format #t "[~8x] hfrag-poly9~%" this) + (dotimes (s5-0 25) + (format + #t + "~T~d: index0: ~d index1: ~d index2: ~d pos: ~d ~d~%" + s5-0 + (shr (-> this data s5-0 index0) 2) + (shr (-> this data s5-0 index1) 2) + (shr (-> this data s5-0 index2) 2) + (-> this data s5-0 pos x) + (-> this data s5-0 pos y) + ) + ) + this + ) + +;; definition of type hfrag-poly4-chain +(deftype hfrag-poly4-chain (structure) + ((tag dma-packet :inline) + (verts vector4w-3 4 :inline) + (next dma-packet :inline :offset 208) + ) + ) + +;; definition for method 3 of type hfrag-poly4-chain +(defmethod inspect ((this hfrag-poly4-chain)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-poly4-chain) + (format #t "~1Ttag: #~%" (-> this tag)) + (format #t "~1Tverts[4] @ #x~X~%" (-> this verts)) + (format #t "~1Tnext: #~%" (-> this next)) + (label cfg-4) + this + ) + +;; definition of type hfrag-poly9-chain +(deftype hfrag-poly9-chain (structure) + ((tag dma-packet :inline) + (verts vector4w-3 12 :inline) + (next dma-packet :inline :offset 592) + ) + ) + +;; definition for method 3 of type hfrag-poly9-chain +(defmethod inspect ((this hfrag-poly9-chain)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-poly9-chain) + (format #t "~1Ttag: #~%" (-> this tag)) + (format #t "~1Tverts[12] @ #x~X~%" (-> this verts)) + (format #t "~1Tnext: #~%" (-> this next)) + (label cfg-4) + this + ) + +;; definition of type hfrag-poly25-chain +(deftype hfrag-poly25-chain (structure) + ((tag dma-packet :inline) + (verts vector4w-3 40 :inline) + (next dma-packet :inline) + ) + ) + +;; definition for method 3 of type hfrag-poly25-chain +(defmethod inspect ((this hfrag-poly25-chain)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-poly25-chain) + (format #t "~1Ttag: #~%" (-> this tag)) + (format #t "~1Tverts[40] @ #x~X~%" (-> this verts)) + (format #t "~1Tnext: #~%" (-> this next)) + (label cfg-4) + this + ) + +;; definition of type hfrag-cache-vertex +(deftype hfrag-cache-vertex (structure) + ((color vector4w :inline) + (pos vector :inline) + (clip uint32 :overlay-at (-> pos data 3)) + ) + ) + +;; definition for method 3 of type hfrag-cache-vertex +(defmethod inspect ((this hfrag-cache-vertex)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-cache-vertex) + (format #t "~1Tcolor: #~%" (-> this color)) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tclip: ~D~%" (-> this pos w)) + (label cfg-4) + this + ) + +;; definition of type hfrag-cache-line +(deftype hfrag-cache-line (structure) + ((data hfrag-cache-vertex 9 :inline) + ) + ) + +;; definition for method 3 of type hfrag-cache-line +(defmethod inspect ((this hfrag-cache-line)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-cache-line) + (format #t "~1Tdata[9] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition of type hfrag-visbits +(deftype hfrag-visbits (structure) + ((data uint8 128) + ) + ) + +;; definition for method 3 of type hfrag-visbits +(defmethod inspect ((this hfrag-visbits)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-visbits) + (format #t "~1Tdata[128] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition of type hfrag-gcf-control +(deftype hfrag-gcf-control (structure) + ((matrix matrix :inline) + (giftag generic-gif-tag :inline) + (adnops gs-adcmd 2 :inline) + (num-strips uint32 :overlay-at (-> giftag data 3)) + (num-dps uint32 :overlay-at (-> adnops 0 word 3)) + (kick-offset uint32 :offset 108) + (shader gcf-shader :inline) + ) + ) + +;; definition for method 3 of type hfrag-gcf-control +(defmethod inspect ((this hfrag-gcf-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-gcf-control) + (format #t "~1Tmatrix: #~%" (-> this matrix)) + (format #t "~1Tgiftag: #~%" (-> this giftag)) + (format #t "~1Tadnops[2] @ #x~X~%" (-> this adnops)) + (format #t "~1Tnum-strips: ~D~%" (-> this giftag num-strips)) + (format #t "~1Tnum-dps: ~D~%" (-> this num-dps)) + (format #t "~1Tkick-offset: ~D~%" (-> this kick-offset)) + (format #t "~1Tshader: #~%" (-> this shader)) + (label cfg-4) + this + ) + +;; definition of type hfrag-gcf-ctrl +(deftype hfrag-gcf-ctrl (structure) + ((tag dma-packet :inline) + (control hfrag-gcf-control :inline) + ) + ) + +;; definition for method 3 of type hfrag-gcf-ctrl +(defmethod inspect ((this hfrag-gcf-ctrl)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-gcf-ctrl) + (format #t "~1Ttag: #~%" (-> this tag)) + (format #t "~1Tcontrol: #~%" (-> this control)) + (label cfg-4) + this + ) + +;; definition of type hfrag-init-packet +(deftype hfrag-init-packet (structure) + ((init-tmpl dma-packet :inline) + (init-data uint32 8) + ) + ) + +;; definition for method 3 of type hfrag-init-packet +(defmethod inspect ((this hfrag-init-packet)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-init-packet) + (format #t "~1Tinit-tmpl: #~%" (-> this init-tmpl)) + (format #t "~1Tinit-data[8] @ #x~X~%" (-> this init-data)) + (format #t "~1Tquad[3] @ #x~X~%" (-> this init-tmpl)) + (label cfg-4) + this + ) + +;; definition of type hfrag-sprite-coord +(deftype hfrag-sprite-coord (structure) + ((pos0 vector4w :inline) + (pos1 vector4w :inline) + ) + ) + +;; definition for method 3 of type hfrag-sprite-coord +(defmethod inspect ((this hfrag-sprite-coord)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-sprite-coord) + (format #t "~1Tpos0: #~%" (-> this pos0)) + (format #t "~1Tpos1: #~%" (-> this pos1)) + (label cfg-4) + this + ) + +;; definition of type hfrag-montage-coord +(deftype hfrag-montage-coord (structure) + ((stq0 vector4 :inline) + (stq1 vector4 :inline) + ) + ) + +;; definition for method 3 of type hfrag-montage-coord +(defmethod inspect ((this hfrag-montage-coord)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-montage-coord) + (format #t "~1Tstq0: #~%" (-> this stq0)) + (format #t "~1Tstq1: #~%" (-> this stq1)) + (label cfg-4) + this + ) + +;; definition of type hfrag-sprite-packet +(deftype hfrag-sprite-packet (structure) + ((sprite-tmpl dma-gif-packet :inline) + (color vector4w :inline) + (tex0 vector :inline) + (pos0 vector4w :inline) + (tex1 vector :inline) + (pos1 vector4w :inline) + ) + ) + +;; definition for method 3 of type hfrag-sprite-packet +(defmethod inspect ((this hfrag-sprite-packet)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-sprite-packet) + (format #t "~1Tsprite-tmpl: #~%" (-> this sprite-tmpl)) + (format #t "~1Tcolor: #~%" (-> this color)) + (format #t "~1Ttex0: #~%" (-> this tex0)) + (format #t "~1Tpos0: #~%" (-> this pos0)) + (format #t "~1Ttex1: #~%" (-> this tex1)) + (format #t "~1Tpos1: #~%" (-> this pos1)) + (label cfg-4) + this + ) + +;; definition of type hfrag-tex-data +(deftype hfrag-tex-data (structure) + ((quad qword 3 :inline) + (prims uint64 6 :overlay-at quad) + (reg-0 uint8 :overlay-at (-> quad 0 data 2)) + (reg-1 uint8 :overlay-at (-> prims 3)) + (reg-2 uint8 :overlay-at (-> prims 5)) + (tex0 uint64 :overlay-at (-> quad 0 data 0)) + (tex1 uint64 :overlay-at (-> prims 2)) + (texflush uint64 :overlay-at (-> prims 4)) + ) + ) + +;; definition for method 3 of type hfrag-tex-data +(defmethod inspect ((this hfrag-tex-data)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-tex-data) + (format #t "~1Tquad[3] @ #x~X~%" (-> this quad)) + (format #t "~1Tprims[6] @ #x~X~%" (-> this quad)) + (format #t "~1Treg-0: ~D~%" (-> this reg-0)) + (format #t "~1Treg-1: ~D~%" (-> this reg-1)) + (format #t "~1Treg-2: ~D~%" (-> this reg-2)) + (format #t "~1Ttex0: #x~X~%" (-> this tex0)) + (format #t "~1Ttex1: #x~X~%" (-> this tex1)) + (format #t "~1Ttexflush: #x~X~%" (-> this texflush)) + (label cfg-4) + this + ) + +;; definition of type hfrag-mip-packet +(deftype hfrag-mip-packet (structure) + ((mip-tmpl dma-gif-packet :inline) + (tex0-1 vector :inline) + (tex1-1 vector :inline) + (texflush vector :inline) + (color vector4w :inline) + (tex0 vector :inline) + (pos0 vector :inline) + (tex1 vector :inline) + (pos1 vector :inline) + ) + ) + +;; definition for method 3 of type hfrag-mip-packet +;; INFO: this function exists in multiple non-identical object files +(defmethod inspect ((this hfrag-mip-packet)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-mip-packet) + (format #t "~1Tsprite-tmpl: #~%" (-> this mip-tmpl)) + (format #t "~1Tadnop0: #~%" (-> this tex0-1)) + (format #t "~1Tadnop1: #~%" (-> this tex1-1)) + (format #t "~1Tcolor: #~%" (-> this texflush)) + (format #t "~1Ttex0: #~%" (-> this color)) + (format #t "~1Tpos0: #~%" (-> this tex0)) + (format #t "~1Ttex1: #~%" (-> this pos0)) + (format #t "~1Tpos1: #~%" (-> this tex1)) + (label cfg-4) + this + ) + +;; definition of type hfrag-adgif-packet +(deftype hfrag-adgif-packet (structure) + ((adgif-tmpl dma-gif-packet :inline) + (adgif-data adgif-shader :inline) + ) + ) + +;; definition for method 3 of type hfrag-adgif-packet +(defmethod inspect ((this hfrag-adgif-packet)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-adgif-packet) + (format #t "~1Tadgif-tmpl: #~%" (-> this adgif-tmpl)) + (format #t "~1Tadgif-data: #~%" (-> this adgif-data)) + (label cfg-4) + this + ) + +;; definition of type hfrag-adgif-packet2 +(deftype hfrag-adgif-packet2 (structure) + ((adgif-tmpl dma-gif-packet :inline) + (adgif-data adgif-shader :inline) + (texflush uint128) + ) + ) + +;; definition for method 3 of type hfrag-adgif-packet2 +;; INFO: Used lq/sq +(defmethod inspect ((this hfrag-adgif-packet2)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-adgif-packet2) + (format #t "~1Tadgif-tmpl: #~%" (-> this adgif-tmpl)) + (format #t "~1Tadgif-data: #~%" (-> this adgif-data)) + (format #t "~1Ttexflush: ~D~%" (-> this texflush)) + (label cfg-4) + this + ) + +;; definition of type hfrag-frame +(deftype hfrag-frame (structure) + ((quad qword 4 :inline :offset 0) + (prims uint64 8 :overlay-at quad) + (reg-0 uint8 :overlay-at (-> prims 1)) + (reg-1 uint8 :overlay-at (-> prims 3)) + (reg-2 uint8 :overlay-at (-> prims 5)) + (reg-3 uint8 :overlay-at (-> prims 7)) + (frame uint64 :overlay-at (-> prims 0)) + (scissor uint64 :overlay-at (-> prims 2)) + (xyoffset uint64 :overlay-at (-> prims 4)) + (test uint64 :overlay-at (-> prims 6)) + ) + ) + +;; definition for method 3 of type hfrag-frame +(defmethod inspect ((this hfrag-frame)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-frame) + (format #t "~1Tquad[4] @ #x~X~%" (-> this quad)) + (format #t "~1Tprims[8] @ #x~X~%" (-> this quad)) + (format #t "~1Treg-0: ~D~%" (-> this reg-0)) + (format #t "~1Treg-1: ~D~%" (-> this reg-1)) + (format #t "~1Treg-2: ~D~%" (-> this reg-2)) + (format #t "~1Treg-3: ~D~%" (-> this reg-3)) + (format #t "~1Tframe: #x~X~%" (-> this frame)) + (format #t "~1Tscissor: #x~X~%" (-> this scissor)) + (format #t "~1Txyoffset: #x~X~%" (-> this xyoffset)) + (format #t "~1Ttest: #x~X~%" (-> this test)) + (label cfg-4) + this + ) + +;; definition of type hfrag-frame-packet +(deftype hfrag-frame-packet (structure) + ((frame-tmpl dma-gif-packet :inline) + (frame-data hfrag-frame :inline) + ) + ) + +;; definition for method 3 of type hfrag-frame-packet +(defmethod inspect ((this hfrag-frame-packet)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-frame-packet) + (format #t "~1Tframe-tmpl: #~%" (-> this frame-tmpl)) + (format #t "~1Tframe-data: #~%" (-> this frame-data)) + (label cfg-4) + this + ) + +;; definition of type hfragment +(deftype hfragment (drawable) + ((start-corner vector :inline) + (spheres uint32) + (visids uint32) + (shaders (inline-array adgif-shader)) + (colors basic) + (montage uint32) + (buckets-far uint32) + (buckets-mid uint32) + (buckets-near uint32) + (verts (inline-array hfrag-vertex)) + (pat-array (pointer pat-surface)) + (pat-length uint16) + (num-buckets-far uint16) + (num-buckets-mid uint16) + (num-buckets-near uint16) + (size uint32 :overlay-at (-> start-corner data 3)) + ) + (:methods + (hfragment-method-17 (_type_ collide-cache collide-query) none) + (hfragment-method-18 (_type_ collide-cache collide-query) none) + (hfragment-method-19 (_type_ collide-cache collide-query int int int int) none) + (hfragment-method-20 (_type_ collide-cache int int uint uint uint pat-surface) none) + (hfragment-method-21 (_type_ collide-cache int int uint uint uint pat-surface) none) + ) + ) + +;; definition for method 3 of type hfragment +(defmethod inspect ((this hfragment)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere)) + (format #t "~1Tstart-corner: #~%" (-> this start-corner)) + (format #t "~1Tspheres: #x~X~%" (-> this spheres)) + (format #t "~1Tvisids: #x~X~%" (-> this visids)) + (format #t "~1Tshaders: #x~X~%" (-> this shaders)) + (format #t "~1Tcolors: ~A~%" (-> this colors)) + (format #t "~1Tmontage: #x~X~%" (-> this montage)) + (format #t "~1Tbuckets-far: #x~X~%" (-> this buckets-far)) + (format #t "~1Tbuckets-mid: #x~X~%" (-> this buckets-mid)) + (format #t "~1Tbuckets-near: #x~X~%" (-> this buckets-near)) + (format #t "~1Tverts: #x~X~%" (-> this verts)) + (format #t "~1Tpat-array: #x~X~%" (-> this pat-array)) + (format #t "~1Tpat-length: ~D~%" (-> this pat-length)) + (format #t "~1Tnum-buckets-far: ~D~%" (-> this num-buckets-far)) + (format #t "~1Tnum-buckets-mid: ~D~%" (-> this num-buckets-mid)) + (format #t "~1Tnum-buckets-near: ~D~%" (-> this num-buckets-near)) + (format #t "~1Tsize: ~D~%" (-> this start-corner w)) + (label cfg-4) + this + ) + +;; definition for method 9 of type hfragment +(defmethod login ((this hfragment)) + "Initialize the object after it is loaded." + (dotimes (s5-0 3) + (adgif-shader-login (-> this shaders s5-0)) + (if (> s5-0 0) + (set! (-> this shaders s5-0 tex0 tcc) 0) + ) + (set! (-> this shaders 1 tex0 cbp) 3904) + (set! (-> this shaders 2 tex0 cbp) 3904) + ) + this + ) + +;; definition of type hfrag-dma +(deftype hfrag-dma (structure) + ((banka uint32 340) + (bankb uint32 340) + (outa uint128 227) + (outb uint128 227) + (cache hfrag-cache-line 8 :inline) + (colors rgba 1024) + ) + ) + +;; definition for method 3 of type hfrag-dma +(defmethod inspect ((this hfrag-dma)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-dma) + (format #t "~1Tbanka[340] @ #x~X~%" (-> this banka)) + (format #t "~1Tbankb[340] @ #x~X~%" (-> this bankb)) + (format #t "~1Touta[227] @ #x~X~%" (-> this outa)) + (format #t "~1Toutb[227] @ #x~X~%" (-> this outb)) + (format #t "~1Tcache[8] @ #x~X~%" (-> this cache)) + (format #t "~1Tcolors[1024] @ #x~X~%" (-> this colors)) + (label cfg-4) + this + ) + +;; definition of type hfrag-work +(deftype hfrag-work (structure) + ((far-chaina dma-packet 6 :inline) + (far-chainb dma-packet 6 :inline) + (mid-chaina dma-packet 10 :inline) + (mid-chainb dma-packet 10 :inline) + (near-chaina dma-packet 18 :inline) + (near-chainb dma-packet 18 :inline) + (poly4-tmpl dma-packet 3 :inline) + (poly9-tmpl dma-packet 3 :inline) + (poly25-tmpl dma-packet 3 :inline) + (init-tmpl dma-packet 3 :inline) + (control-tmpl dma-packet 2 :inline :offset 1376) + (heights4-tmpl dma-packet 2 :inline) + (colors4-tmpl dma-packet 2 :inline) + (heights9-tmpl dma-packet 2 :inline) + (colors9-tmpl dma-packet 2 :inline) + (heights25-tmpl dma-packet 2 :inline) + (colors25-tmpl dma-packet 2 :inline) + (init-vu1-tmpl dma-packet 2 :inline) + (next-tmpl dma-packet :inline :offset 1696) + (call-tmpl dma-packet :inline) + (ret-tmpl dma-packet :inline) + (next-scissor-tmpl dma-packet :inline) + (ret-scissor-tmpl dma-packet :inline) + (frame-tmpl dma-gif-packet :inline) + (frames hfrag-frame 5 :inline) + (adgif-tmpl dma-gif-packet :inline) + (adgif-tmpl2 dma-gif-packet :inline) + (sprite-tmpl dma-gif-packet :inline) + (mip-tmpl dma-gif-packet :inline) + (color uint128 6) + (far-data hfrag-sprite-coord :inline) + (near-data vector4w-2 16 :inline) + (mip-data vector4w-3 7 :inline :offset 2896) + (tex-data hfrag-tex-data 5 :offset 3120) + (tex uint128 6 :offset 3360) + (montage-tex-coords uint128 128 :offset 3456) + (giftag generic-gif-tag :inline :offset 7552) + (call-abort dma-packet :inline) + (call-abort-vu1 dma-packet :inline) + (shader-far adgif-shader :inline) + (shader-mid adgif-shader :inline) + (shader-near adgif-shader :inline) + (stq uint128 9) + (shader adgif-shader :inline) + (constants vector :inline) + (pos-temp vector4w :inline) + (trans-temp vector :inline :overlay-at (-> pos-temp data 0)) + (dists vector :inline) + (rdists vector :inline) + (call-poly4-near uint32) + (call-poly9-mid uint32) + (call-poly9-near uint32) + (call-poly25-far uint32) + (call-poly25-mid uint32) + (dma-buffer basic) + (base uint32) + (wait-to-spr uint32) + (wait-from-spr uint32) + (buffer-end uint32) + (subdiv-index uint32) + (scissor basic) + (chain-ptr uint32) + (chain-ptr-next uint32) + (near-dist float) + (far-dist float) + (to-spr uint32) + (from-spr uint32) + (lowres-flag basic) + (hfrag hfragment :inline) + (next-far int16) + (next-far-mid int16) + (next-mid int16) + (next-near-mid int16) + (next-near int16) + (next-far-scissor int16) + (next-near-mid-scissor int16) + (next-near-scissor int16) + (count-far int16) + (count-far-mid int16) + (count-mid int16) + (count-near-mid int16) + (count-near int16) + (count-far-scissor int16) + (count-near-mid-scissor int16) + (count-near-scissor int16) + (size-far int32) + (size-far-mid int32) + (size-mid int32) + (size-near-mid int32) + (size-near int32) + (size-far-scissor int32) + (size-near-mid-scissor int32) + (size-near-scissor int32) + (size-texture int32) + (poly-far hfrag-poly25) + (poly-mid25 uint32) + (poly-mid uint32) + (poly-near uint32) + (far-texture uint32) + (near-textures uint16 16) + (draw-table uint16 1024 :offset 8456) + (corners uint128 1024) + ) + (:methods + (hfrag-work-method-9 () none) + (hfrag-work-method-10 () none) + (hfrag-work-method-11 () none) + (hfrag-work-method-12 () none) + (hfrag-work-method-13 () none) + (hfrag-work-method-14 () none) + (hfrag-work-method-15 () none) + (hfrag-work-method-16 () none) + (hfrag-work-method-17 () none) + (hfrag-work-method-18 () none) + (hfrag-work-method-19 () none) + (hfrag-work-method-20 () none) + (hfrag-work-method-21 () none) + (hfrag-work-method-22 () none) + (hfrag-work-method-23 () none) + (hfrag-work-method-24 () none) + (hfrag-work-method-25 () none) + (hfrag-work-method-26 () none) + (hfrag-work-method-27 () none) + (hfrag-work-method-28 () none) + (hfrag-work-method-29 () none) + (hfrag-work-method-30 () none) + (hfrag-work-method-31 () none) + (hfrag-work-method-32 () none) + (hfrag-work-method-33 () none) + (hfrag-work-method-34 () none) + (hfrag-work-method-35 () none) + ) + ) + +;; definition for method 3 of type hfrag-work +(defmethod inspect ((this hfrag-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-work) + (format #t "~1Tfar-chaina[6] @ #x~X~%" (-> this far-chaina)) + (format #t "~1Tfar-chainb[6] @ #x~X~%" (-> this far-chainb)) + (format #t "~1Tmid-chaina[10] @ #x~X~%" (-> this mid-chaina)) + (format #t "~1Tmid-chainb[10] @ #x~X~%" (-> this mid-chainb)) + (format #t "~1Tnear-chaina[18] @ #x~X~%" (-> this near-chaina)) + (format #t "~1Tnear-chainb[18] @ #x~X~%" (-> this near-chainb)) + (format #t "~1Tpoly4-tmpl[3] @ #x~X~%" (-> this poly4-tmpl)) + (format #t "~1Tpoly9-tmpl[3] @ #x~X~%" (-> this poly9-tmpl)) + (format #t "~1Tpoly25-tmpl[3] @ #x~X~%" (-> this poly25-tmpl)) + (format #t "~1Tinit-tmpl[3] @ #x~X~%" (-> this init-tmpl)) + (format #t "~1Tcontrol-tmpl[2] @ #x~X~%" (-> this control-tmpl)) + (format #t "~1Theights4-tmpl[2] @ #x~X~%" (-> this heights4-tmpl)) + (format #t "~1Tcolors4-tmpl[2] @ #x~X~%" (-> this colors4-tmpl)) + (format #t "~1Theights9-tmpl[2] @ #x~X~%" (-> this heights9-tmpl)) + (format #t "~1Tcolors9-tmpl[2] @ #x~X~%" (-> this colors9-tmpl)) + (format #t "~1Theights25-tmpl[2] @ #x~X~%" (-> this heights25-tmpl)) + (format #t "~1Tcolors25-tmpl[2] @ #x~X~%" (-> this colors25-tmpl)) + (format #t "~1Tinit-vu1-tmpl[2] @ #x~X~%" (-> this init-vu1-tmpl)) + (format #t "~1Tnext-tmpl: #~%" (-> this next-tmpl)) + (format #t "~1Tcall-tmpl: #~%" (-> this call-tmpl)) + (format #t "~1Tret-tmpl: #~%" (-> this ret-tmpl)) + (format #t "~1Tnext-scissor-tmpl: #~%" (-> this next-scissor-tmpl)) + (format #t "~1Tret-scissor-tmpl: #~%" (-> this ret-scissor-tmpl)) + (format #t "~1Tframe-tmpl: #~%" (-> this frame-tmpl)) + (format #t "~1Tframes[5] @ #x~X~%" (-> this frames)) + (format #t "~1Tadgif-tmpl: #~%" (-> this adgif-tmpl)) + (format #t "~1Tadgif-tmpl2: #~%" (-> this adgif-tmpl2)) + (format #t "~1Tsprite-tmpl: #~%" (-> this sprite-tmpl)) + (format #t "~1Tmip-tmpl: #~%" (-> this mip-tmpl)) + (format #t "~1Tcolor[6] @ #x~X~%" (-> this color)) + (format #t "~1Tfar-data: #~%" (-> this far-data)) + (format #t "~1Tnear-data[16] @ #x~X~%" (-> this near-data)) + (format #t "~1Tmip-data[7] @ #x~X~%" (-> this mip-data)) + (format #t "~1Ttex-data[5] @ #x~X~%" (-> this tex-data)) + (format #t "~1Ttex[6] @ #x~X~%" (-> this tex)) + (format #t "~1Tmontage-tex-coords[128] @ #x~X~%" (-> this montage-tex-coords)) + (format #t "~1Tgiftag: #~%" (-> this giftag)) + (format #t "~1Tcall-abort: #~%" (-> this call-abort)) + (format #t "~1Tcall-abort-vu1: #~%" (-> this call-abort-vu1)) + (format #t "~1Tshader-far: #~%" (-> this shader-far)) + (format #t "~1Tshader-mid: #~%" (-> this shader-mid)) + (format #t "~1Tshader-near: #~%" (-> this shader-near)) + (format #t "~1Tstq[9] @ #x~X~%" (-> this stq)) + (format #t "~1Tshader: #~%" (-> this shader)) + (format #t "~1Tconstants: #~%" (-> this constants)) + (format #t "~1Tpos-temp: #~%" (-> this pos-temp)) + (format #t "~1Ttrans-temp: #~%" (-> this pos-temp)) + (format #t "~1Tdists: #~%" (-> this dists)) + (format #t "~1Trdists: #~%" (-> this rdists)) + (format #t "~1Tcall-poly4-near: ~D~%" (-> this call-poly4-near)) + (format #t "~1Tcall-poly9-mid: ~D~%" (-> this call-poly9-mid)) + (format #t "~1Tcall-poly9-near: ~D~%" (-> this call-poly9-near)) + (format #t "~1Tcall-poly25-far: ~D~%" (-> this call-poly25-far)) + (format #t "~1Tcall-poly25-mid: ~D~%" (-> this call-poly25-mid)) + (format #t "~1Tdma-buffer: ~A~%" (-> this dma-buffer)) + (format #t "~1Tbase: #x~X~%" (-> this base)) + (format #t "~1Twait-to-spr: ~D~%" (-> this wait-to-spr)) + (format #t "~1Twait-from-spr: ~D~%" (-> this wait-from-spr)) + (format #t "~1Tbuffer-end: #x~X~%" (-> this buffer-end)) + (format #t "~1Tsubdiv-index: ~D~%" (-> this subdiv-index)) + (format #t "~1Tscissor: ~A~%" (-> this scissor)) + (format #t "~1Tchain-ptr: ~D~%" (-> this chain-ptr)) + (format #t "~1Tchain-ptr-next: ~D~%" (-> this chain-ptr-next)) + (format #t "~1Tnear-dist: ~f~%" (-> this near-dist)) + (format #t "~1Tfar-dist: ~f~%" (-> this far-dist)) + (format #t "~1Tto-spr: ~D~%" (-> this to-spr)) + (format #t "~1Tfrom-spr: ~D~%" (-> this from-spr)) + (format #t "~1Tlowres-flag: ~A~%" (-> this lowres-flag)) + (format #t "~1Thfrag: #~%" (-> this hfrag)) + (format #t "~1Tnext-far: ~D~%" (-> this next-far)) + (format #t "~1Tnext-far-mid: ~D~%" (-> this next-far-mid)) + (format #t "~1Tnext-mid: ~D~%" (-> this next-mid)) + (format #t "~1Tnext-near-mid: ~D~%" (-> this next-near-mid)) + (format #t "~1Tnext-near: ~D~%" (-> this next-near)) + (format #t "~1Tnext-far-scissor: ~D~%" (-> this next-far-scissor)) + (format #t "~1Tnext-near-mid-scissor: ~D~%" (-> this next-near-mid-scissor)) + (format #t "~1Tnext-near-scissor: ~D~%" (-> this next-near-scissor)) + (format #t "~1Tcount-far: ~D~%" (-> this count-far)) + (format #t "~1Tcount-far-mid: ~D~%" (-> this count-far-mid)) + (format #t "~1Tcount-mid: ~D~%" (-> this count-mid)) + (format #t "~1Tcount-near-mid: ~D~%" (-> this count-near-mid)) + (format #t "~1Tcount-near: ~D~%" (-> this count-near)) + (format #t "~1Tcount-far-scissor: ~D~%" (-> this count-far-scissor)) + (format #t "~1Tcount-near-mid-scissor: ~D~%" (-> this count-near-mid-scissor)) + (format #t "~1Tcount-near-scissor: ~D~%" (-> this count-near-scissor)) + (format #t "~1Tsize-far: ~D~%" (-> this size-far)) + (format #t "~1Tsize-far-mid: ~D~%" (-> this size-far-mid)) + (format #t "~1Tsize-mid: ~D~%" (-> this size-mid)) + (format #t "~1Tsize-near-mid: ~D~%" (-> this size-near-mid)) + (format #t "~1Tsize-near: ~D~%" (-> this size-near)) + (format #t "~1Tsize-far-scissor: ~D~%" (-> this size-far-scissor)) + (format #t "~1Tsize-near-mid-scissor: ~D~%" (-> this size-near-mid-scissor)) + (format #t "~1Tsize-near-scissor: ~D~%" (-> this size-near-scissor)) + (format #t "~1Tsize-texture: ~D~%" (-> this size-texture)) + (format #t "~1Tpoly-far: #~%" (-> this poly-far)) + (format #t "~1Tpoly-mid25: #x~X~%" (-> this poly-mid25)) + (format #t "~1Tpoly-mid: #x~X~%" (-> this poly-mid)) + (format #t "~1Tpoly-near: #x~X~%" (-> this poly-near)) + (format #t "~1Tfar-texture: #x~X~%" (-> this far-texture)) + (format #t "~1Tnear-textures[16] @ #x~X~%" (-> this near-textures)) + (format #t "~1Tdraw-table[1024] @ #x~X~%" (-> this draw-table)) + (format #t "~1Tcorners[1024] @ #x~X~%" (-> this corners)) + (label cfg-4) + this + ) + +;; definition of type hfrag-mip-packet +(deftype hfrag-mip-packet (structure) + ((mip-tmpl dma-gif-packet :inline) + (tex0-1 vector :inline) + (tex1-1 vector :inline) + (texflush vector :inline) + (color vector4w :inline) + (tex0 vector :inline) + (pos0 vector :inline) + (tex1 vector :inline) + (pos1 vector :inline) + ) + ) + +;; definition for method 3 of type hfrag-mip-packet +;; INFO: this function exists in multiple non-identical object files +(defmethod inspect ((this hfrag-mip-packet)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-mip-packet) + (format #t "~1Tmip-tmpl: #~%" (-> this mip-tmpl)) + (format #t "~1Ttex0-1: #~%" (-> this tex0-1)) + (format #t "~1Ttex1-1: #~%" (-> this tex1-1)) + (format #t "~1Ttexflush: #~%" (-> this texflush)) + (format #t "~1Tcolor: #~%" (-> this color)) + (format #t "~1Ttex0: #~%" (-> this tex0)) + (format #t "~1Tpos0: #~%" (-> this pos0)) + (format #t "~1Ttex1: #~%" (-> this tex1)) + (format #t "~1Tpos1: #~%" (-> this pos1)) + (label cfg-4) + this + ) + +;; definition of type hfrag-mip-packet-array +(deftype hfrag-mip-packet-array (structure) + ((data hfrag-mip-packet 6 :inline) + ) + ) + +;; definition for method 3 of type hfrag-mip-packet-array +(defmethod inspect ((this hfrag-mip-packet-array)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'hfrag-mip-packet-array) + (format #t "~1Tdata[6] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 diff --git a/test/decompiler/reference/jak3/engine/gfx/background/prototype-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/background/prototype-h_REF.gc index 649c1428a9..d65e034852 100644 --- a/test/decompiler/reference/jak3/engine/gfx/background/prototype-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/background/prototype-h_REF.gc @@ -53,11 +53,12 @@ (deftype prototype-bucket-shrub (prototype-bucket) ((next uint32 4) (count uint16 4) - (mod-count uint16 4) + (count-quad uint128 :overlay-at (-> count 0)) + (mod-count uint16 4 :offset 88) (last dma-packet 4) - (next-clear uint128 :overlay-at (-> next 0)) - (count-clear uint64 :overlay-at (-> count 0)) - (last-clear uint128 :overlay-at (-> last 0)) + (next-clear uint128 :overlay-at (-> next 0)) + (count-clear uint64 :overlay-at (-> count 0)) + (last-clear uint128 :overlay-at (-> last 0)) ) ) @@ -408,7 +409,3 @@ ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/engine/gfx/background/prototype_REF.gc b/test/decompiler/reference/jak3/engine/gfx/background/prototype_REF.gc new file mode 100644 index 0000000000..05699d8bf9 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/background/prototype_REF.gc @@ -0,0 +1,119 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 9 of type prototype-inline-array-shrub +(defmethod login ((this prototype-inline-array-shrub)) + "Initialize the object after it is loaded." + (let ((s5-0 (-> *level* level *level-index* bsp))) + (dotimes (s4-0 (-> this length)) + (let ((s3-0 (-> this data s4-0))) + (when (and *debug-segment* (-> *screen-shot-work* highres-enable)) + (dotimes (v1-9 4) + (+! (-> s3-0 dists data v1-9) 40960000.0) + (set! (-> s3-0 rdists data v1-9) (/ 1.0 (-> s3-0 dists data v1-9))) + ) + ) + (set! *texture-masks* (-> s5-0 shrub-masks data (-> s3-0 texture-masks-index))) + (dotimes (s2-0 4) + (let ((a0-15 (-> s3-0 geometry s2-0))) + (if (nonzero? a0-15) + (login a0-15) + ) + ) + ) + ) + ) + ) + this + ) + +;; definition for method 8 of type prototype-array-tie +(defmethod mem-usage ((this prototype-array-tie) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 0 used) v1-6) + (+! (-> usage data 0 total) (logand -16 (+ v1-6 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this array-data s3-0) usage flags) + ) + this + ) + +;; definition for method 8 of type prototype-bucket-tie +(defmethod mem-usage ((this prototype-bucket-tie) (usage memory-usage-block) (flags int)) + (dotimes (s3-0 4) + (let ((a0-1 (-> this tie-geom s3-0))) + (if (nonzero? a0-1) + (mem-usage a0-1 usage (logior flags 1)) + ) + ) + ) + (set! (-> usage length) (max 85 (-> usage length))) + (set! (-> usage data 84 name) "string") + (+! (-> usage data 84 count) 1) + (let ((v1-13 (asize-of (-> this name)))) + (+! (-> usage data 84 used) v1-13) + (+! (-> usage data 84 total) (logand -16 (+ v1-13 15))) + ) + (when (nonzero? (-> this tie-colors)) + (set! (-> usage length) (max 17 (-> usage length))) + (set! (-> usage data 16 name) "tie-pal") + (+! (-> usage data 16 count) 1) + (let ((v1-25 (asize-of (-> this tie-colors)))) + (+! (-> usage data 16 used) v1-25) + (+! (-> usage data 16 total) (logand -16 (+ v1-25 15))) + ) + ) + (if (nonzero? (-> this collide-hash-fragment-array)) + (mem-usage (-> this collide-hash-fragment-array) usage (logior flags 1)) + ) + this + ) + +;; definition for method 8 of type prototype-inline-array-shrub +(defmethod mem-usage ((this prototype-inline-array-shrub) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 0 used) v1-6) + (+! (-> usage data 0 total) (logand -16 (+ v1-6 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this data s3-0) usage flags) + ) + this + ) + +;; definition for method 8 of type prototype-bucket-shrub +(defmethod mem-usage ((this prototype-bucket-shrub) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 25 (-> usage length))) + (set! (-> usage data 24 name) "prototype-bucket-shrub") + (+! (-> usage data 24 count) 1) + (let ((v1-5 112)) + (+! (-> usage data 24 used) v1-5) + (+! (-> usage data 24 total) (logand -16 (+ v1-5 15))) + ) + (dotimes (s3-0 4) + (let ((a0-5 (-> this geometry s3-0))) + (if (nonzero? a0-5) + (mem-usage a0-5 usage (logior flags 1)) + ) + ) + ) + (set! (-> usage length) (max 85 (-> usage length))) + (set! (-> usage data 84 name) "string") + (+! (-> usage data 84 count) 1) + (let ((v1-22 (asize-of (-> this name)))) + (+! (-> usage data 84 used) v1-22) + (+! (-> usage data 84 total) (logand -16 (+ v1-22 15))) + ) + this + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/background/tfrag/tfrag-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/background/tfrag/tfrag-h_REF.gc new file mode 100644 index 0000000000..b2d72baa50 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/background/tfrag/tfrag-h_REF.gc @@ -0,0 +1,455 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type tfragment-stats +(deftype tfragment-stats (structure) + "Triangle and vertex stats for a single tfragment." + ((num-tris uint16 4) + (num-dverts uint16 4) + ) + ) + +;; definition for method 3 of type tfragment-stats +(defmethod inspect ((this tfragment-stats)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'tfragment-stats) + (format #t "~1Tnum-tris[4] @ #x~X~%" (-> this num-tris)) + (format #t "~1Tnum-dverts[4] @ #x~X~%" (-> this num-dverts)) + (label cfg-4) + this + ) + +;; definition of type tfragment-debug-data +(deftype tfragment-debug-data (structure) + "Optional debug information (stats, lines) for a tfragment." + ((stats tfragment-stats :inline) + (debug-lines (array vector-array)) + ) + ) + +;; definition for method 3 of type tfragment-debug-data +(defmethod inspect ((this tfragment-debug-data)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'tfragment-debug-data) + (format #t "~1Tstats: #~%" (-> this stats)) + (format #t "~1Tdebug-lines: ~A~%" (-> this debug-lines)) + (label cfg-4) + this + ) + +;; definition of type generic-tfragment +(deftype generic-tfragment (structure) + "Unused. Could have been a way to render tfrag's through generic." + ((dummy int32) + ) + ) + +;; definition for method 3 of type generic-tfragment +(defmethod inspect ((this generic-tfragment)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-tfragment) + (format #t "~1Tdummy: ~D~%" (-> this dummy)) + (label cfg-4) + this + ) + +;; definition of type tfragment +(deftype tfragment (drawable) + "A tfrag mesh fragment. This is just references to DMA data, plus some metadata." + ((color-index uint16 :offset 6) + (debug-data tfragment-debug-data :offset 8) + (color-indices uint32 :offset 12) + (colors uint32 :overlay-at color-indices) + (dma-chain uint32 3 :offset 32) + (dma-common uint32 :overlay-at (-> dma-chain 0)) + (dma-level-0 uint32 :overlay-at dma-common) + (dma-base uint32 :overlay-at (-> dma-chain 1)) + (dma-level-1 uint32 :overlay-at (-> dma-chain 2)) + (dma-qwc uint8 4 :offset 44) + (dma-qwc-word uint32 :overlay-at (-> dma-qwc 0)) + (shader (inline-array adgif-shader) :offset 48) + (num-shaders uint8 :offset 52) + (num-base-colors uint8 :offset 53) + (num-level0-colors uint8 :offset 54) + (num-level1-colors uint8 :offset 55) + (color-offset uint8 :offset 56) + (color-count uint8 :offset 57) + (texture-masks-index uint16 :offset 58) + (generic generic-tfragment :offset 60) + (generic-u32 uint32 :overlay-at generic) + ) + ) + +;; definition for method 3 of type tfragment +(defmethod inspect ((this tfragment)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere)) + (format #t "~1Tcolor-index: ~D~%" (-> this color-index)) + (format #t "~1Tdebug-data: #~%" (-> this debug-data)) + (format #t "~1Tcolor-indices: #x~X~%" (-> this color-indices)) + (format #t "~1Tcolors: #x~X~%" (-> this color-indices)) + (format #t "~1Tdma-chain[3] @ #x~X~%" (-> this dma-chain)) + (format #t "~1Tdma-common: #x~X~%" (-> this dma-common)) + (format #t "~1Tdma-level-0: #x~X~%" (-> this dma-common)) + (format #t "~1Tdma-base: #x~X~%" (-> this dma-base)) + (format #t "~1Tdma-level-1: #x~X~%" (-> this dma-level-1)) + (format #t "~1Tdma-qwc[4] @ #x~X~%" (-> this dma-qwc)) + (format #t "~1Tshader: #x~X~%" (-> this shader)) + (format #t "~1Tnum-shaders: ~D~%" (-> this num-shaders)) + (format #t "~1Tnum-base-colors: ~D~%" (-> this num-base-colors)) + (format #t "~1Tnum-level0-colors: ~D~%" (-> this num-level0-colors)) + (format #t "~1Tnum-level1-colors: ~D~%" (-> this num-level1-colors)) + (format #t "~1Tcolor-offset: ~D~%" (-> this color-offset)) + (format #t "~1Tcolor-count: ~D~%" (-> this color-count)) + (format #t "~1Ttexture-masks-index: ~D~%" (-> this texture-masks-index)) + (format #t "~1Tgeneric: #~%" (-> this generic)) + (label cfg-4) + this + ) + +;; definition of type drawable-inline-array-tfrag +(deftype drawable-inline-array-tfrag (drawable-inline-array) + "Array of tfragments" + ((data tfragment 1 :inline) + (pad uint32) + ) + ) + +;; definition of type drawable-inline-array-tfrag-trans +(deftype drawable-inline-array-tfrag-trans (drawable-inline-array-tfrag) + ((data2 tfragment 1 :inline) + (pad2 uint32) + ) + ) + +;; definition of type drawable-inline-array-tfrag-water +(deftype drawable-inline-array-tfrag-water (drawable-inline-array-tfrag) + ((data2 tfragment 1 :inline) + (pad2 uint32) + ) + ) + +;; definition of type drawable-tree-tfrag +(deftype drawable-tree-tfrag (drawable-tree) + "top level tfrag tree." + ((time-of-day-pal time-of-day-palette :offset 12) + (arrays drawable-inline-array :dynamic :offset 32) + ) + ) + +;; definition of type drawable-tree-tfrag-trans +(deftype drawable-tree-tfrag-trans (drawable-tree-tfrag) + () + ) + +;; definition of type drawable-tree-tfrag-water +(deftype drawable-tree-tfrag-water (drawable-tree-tfrag-trans) + () + ) + +;; definition of type tfrag-dists +(deftype tfrag-dists (structure) + "Distances for mesh level-of-detail blending for use on VU1." + ((data uint32 16) + (vector vector 4 :overlay-at (-> data 0)) + (k0s vector 2 :overlay-at (-> data 0)) + (k1s vector 2 :overlay-at (-> data 8)) + ) + ) + +;; definition for method 3 of type tfrag-dists +(defmethod inspect ((this tfrag-dists)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'tfrag-dists) + (format #t "~1Tdata[16] @ #x~X~%" (-> this data)) + (format #t "~1Tvector[4] @ #x~X~%" (-> this data)) + (format #t "~1Tk0s[2] @ #x~X~%" (-> this data)) + (format #t "~1Tk1s[2] @ #x~X~%" (-> this k1s)) + (label cfg-4) + this + ) + +;; definition of type tfrag-data +(deftype tfrag-data (structure) + "Constants for VU1 data memory for tfrag rendering." + ((data uint32 56) + (vector vector 14 :overlay-at (-> data 0)) + (fog vector :inline :overlay-at (-> data 0)) + (val vector :inline :overlay-at (-> data 4)) + (strgif gs-gif-tag :inline :overlay-at (-> data 8)) + (fangif gs-gif-tag :inline :overlay-at (-> data 12)) + (adgif gs-gif-tag :inline :overlay-at (-> data 16)) + (hvdf-offset vector :inline :overlay-at (-> data 20)) + (hmge-scale vector :inline :overlay-at (-> data 24)) + (invh-scale vector :inline :overlay-at (-> data 28)) + (ambient vector :inline :overlay-at (-> data 32)) + (guard vector :inline :overlay-at (-> data 36)) + (dists tfrag-dists :inline :overlay-at (-> data 40)) + (k0s uint128 2 :overlay-at (-> data 40)) + (k1s uint128 2 :overlay-at (-> data 48)) + ) + ) + +;; definition for method 3 of type tfrag-data +(defmethod inspect ((this tfrag-data)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'tfrag-data) + (format #t "~1Tdata[56] @ #x~X~%" (-> this data)) + (format #t "~1Tvector[14] @ #x~X~%" (-> this data)) + (format #t "~1Tfog: #~%" (-> this data)) + (format #t "~1Tval: #~%" (-> this val)) + (format #t "~1Tstrgif: #~%" (-> this strgif)) + (format #t "~1Tfangif: #~%" (-> this fangif)) + (format #t "~1Tadgif: #~%" (-> this adgif)) + (format #t "~1Thvdf-offset: #~%" (-> this hvdf-offset)) + (format #t "~1Thmge-scale: #~%" (-> this hmge-scale)) + (format #t "~1Tinvh-scale: #~%" (-> this invh-scale)) + (format #t "~1Tambient: #~%" (-> this ambient)) + (format #t "~1Tguard: #~%" (-> this guard)) + (format #t "~1Tdists: #~%" (-> this dists)) + (format #t "~1Tk0s[2] @ #x~X~%" (-> this dists)) + (format #t "~1Tk1s[2] @ #x~X~%" (-> this dists k1s)) + (label cfg-4) + this + ) + +;; definition of type tfrag-control +(deftype tfrag-control (structure) + "VU1 'control' data containing address and counters." + ((num-base-points uint32) + (num-shared-base-points uint32) + (num-level0-points uint32) + (num-shared-level0-points uint32) + (num-level1-points uint32) + (num-shared-level1-points uint32) + (ptr-vtxdata uint32) + (ptr-base-points uint32) + (ptr-shared-base-points uint32) + (ptr-level0-points uint32) + (ptr-shared-level0-points uint32) + (ptr-level1-points uint32) + (ptr-shared-level1-points uint32) + (ptr-draw-points uint32) + (ptr-interpolated-0 uint32) + (ptr-shared-interpolated-0 uint32) + (ptr-interpolated1 uint32) + (ptr-shared-interpolated1 uint32) + (ptr-strip-data uint32) + (ptr-texture-data uint32) + ) + ) + +;; definition for method 3 of type tfrag-control +(defmethod inspect ((this tfrag-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'tfrag-control) + (format #t "~1Tnum-base-points: ~D~%" (-> this num-base-points)) + (format #t "~1Tnum-shared-base-points: ~D~%" (-> this num-shared-base-points)) + (format #t "~1Tnum-level0-points: ~D~%" (-> this num-level0-points)) + (format #t "~1Tnum-shared-level0-points: ~D~%" (-> this num-shared-level0-points)) + (format #t "~1Tnum-level1-points: ~D~%" (-> this num-level1-points)) + (format #t "~1Tnum-shared-level1-points: ~D~%" (-> this num-shared-level1-points)) + (format #t "~1Tptr-vtxdata: ~D~%" (-> this ptr-vtxdata)) + (format #t "~1Tptr-base-points: ~D~%" (-> this ptr-base-points)) + (format #t "~1Tptr-shared-base-points: ~D~%" (-> this ptr-shared-base-points)) + (format #t "~1Tptr-level0-points: ~D~%" (-> this ptr-level0-points)) + (format #t "~1Tptr-shared-level0-points: ~D~%" (-> this ptr-shared-level0-points)) + (format #t "~1Tptr-level1-points: ~D~%" (-> this ptr-level1-points)) + (format #t "~1Tptr-shared-level1-points: ~D~%" (-> this ptr-shared-level1-points)) + (format #t "~1Tptr-draw-points: ~D~%" (-> this ptr-draw-points)) + (format #t "~1Tptr-interpolated-0: ~D~%" (-> this ptr-interpolated-0)) + (format #t "~1Tptr-shared-interpolated-0: ~D~%" (-> this ptr-shared-interpolated-0)) + (format #t "~1Tptr-interpolated1: ~D~%" (-> this ptr-interpolated1)) + (format #t "~1Tptr-shared-interpolated1: ~D~%" (-> this ptr-shared-interpolated1)) + (format #t "~1Tptr-strip-data: ~D~%" (-> this ptr-strip-data)) + (format #t "~1Tptr-texture-data: ~D~%" (-> this ptr-texture-data)) + (label cfg-4) + this + ) + +;; definition of type tfrag-stats +(deftype tfrag-stats (structure) + "TFRAG statistics computed on EE." + ((from int32) + (to int32) + (cnt int32) + (tris int32) + (tfaces int32) + (tfrags int32) + (dtris int32) + (base-verts int32) + (level0-verts int32) + (level1-verts int32) + (dma-cnt int32) + (dma-dta int32) + (dma-tex int32) + (strips int32) + (drawpoints int32) + (vif int32) + ) + ) + +;; definition for method 3 of type tfrag-stats +(defmethod inspect ((this tfrag-stats)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'tfrag-stats) + (format #t "~1Tfrom: ~D~%" (-> this from)) + (format #t "~1Tto: ~D~%" (-> this to)) + (format #t "~1Tcnt: ~D~%" (-> this cnt)) + (format #t "~1Ttris: ~D~%" (-> this tris)) + (format #t "~1Ttfaces: ~D~%" (-> this tfaces)) + (format #t "~1Ttfrags: ~D~%" (-> this tfrags)) + (format #t "~1Tdtris: ~D~%" (-> this dtris)) + (format #t "~1Tbase-verts: ~D~%" (-> this base-verts)) + (format #t "~1Tlevel0-verts: ~D~%" (-> this level0-verts)) + (format #t "~1Tlevel1-verts: ~D~%" (-> this level1-verts)) + (format #t "~1Tdma-cnt: ~D~%" (-> this dma-cnt)) + (format #t "~1Tdma-dta: ~D~%" (-> this dma-dta)) + (format #t "~1Tdma-tex: ~D~%" (-> this dma-tex)) + (format #t "~1Tstrips: ~D~%" (-> this strips)) + (format #t "~1Tdrawpoints: ~D~%" (-> this drawpoints)) + (format #t "~1Tvif: ~D~%" (-> this vif)) + (label cfg-4) + this + ) + +;; definition of type tfrag-packet +(deftype tfrag-packet (structure) + ((tag uint128 2) + ) + ) + +;; definition for method 3 of type tfrag-packet +(defmethod inspect ((this tfrag-packet)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'tfrag-packet) + (format #t "~1Ttag[2] @ #x~X~%" (-> this tag)) + (label cfg-4) + this + ) + +;; definition of type tfrag-work +(deftype tfrag-work (structure) + "Scratch space for generating TFRAG DMA." + ((base-tmpl dma-packet :inline) + (level-0-tmpl dma-packet :inline) + (common-tmpl dma-packet :inline) + (level-1-tmpl dma-packet :inline) + (color-tmpl dma-packet :inline) + (frag-dists vector :inline) + (min-dist vector :inline) + (color-ptr vector4w :inline) + (tr-stat-tfrag tr-stat) + (tr-stat-tfrag-scissor tr-stat) + (vu1-enable-tfrag int32) + (vu1-enable-tfrag-scissor int32) + (cur-vis-bits uint32) + (end-vis-bits uint32) + (src-ptr uint32) + (last-call uint32) + (dma-buffer basic) + (test-id uint32) + (wait-from-spr uint32) + (wait-to-spr uint32) + (near-wait-from-spr uint32) + (near-wait-to-spr uint32) + (max-fragment uint16) + (min-fragment uint16) + (texture-dists uint32) + ) + ) + +;; definition for method 3 of type tfrag-work +(defmethod inspect ((this tfrag-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'tfrag-work) + (format #t "~1Tbase-tmpl: #~%" (-> this base-tmpl)) + (format #t "~1Tlevel-0-tmpl: #~%" (-> this level-0-tmpl)) + (format #t "~1Tcommon-tmpl: #~%" (-> this common-tmpl)) + (format #t "~1Tlevel-1-tmpl: #~%" (-> this level-1-tmpl)) + (format #t "~1Tcolor-tmpl: #~%" (-> this color-tmpl)) + (format #t "~1Tfrag-dists: #~%" (-> this frag-dists)) + (format #t "~1Tmin-dist: #~%" (-> this min-dist)) + (format #t "~1Tcolor-ptr: #~%" (-> this color-ptr)) + (format #t "~1Ttr-stat-tfrag: #~%" (-> this tr-stat-tfrag)) + (format #t "~1Ttr-stat-tfrag-scissor: #~%" (-> this tr-stat-tfrag-scissor)) + (format #t "~1Tvu1-enable-tfrag: ~D~%" (-> this vu1-enable-tfrag)) + (format #t "~1Tvu1-enable-tfrag-scissor: ~D~%" (-> this vu1-enable-tfrag-scissor)) + (format #t "~1Tcur-vis-bits: ~D~%" (-> this cur-vis-bits)) + (format #t "~1Tend-vis-bits: ~D~%" (-> this end-vis-bits)) + (format #t "~1Tsrc-ptr: ~D~%" (-> this src-ptr)) + (format #t "~1Tlast-call: ~D~%" (-> this last-call)) + (format #t "~1Tdma-buffer: ~A~%" (-> this dma-buffer)) + (format #t "~1Ttest-id: ~D~%" (-> this test-id)) + (format #t "~1Twait-from-spr: ~D~%" (-> this wait-from-spr)) + (format #t "~1Twait-to-spr: ~D~%" (-> this wait-to-spr)) + (format #t "~1Tnear-wait-from-spr: ~D~%" (-> this near-wait-from-spr)) + (format #t "~1Tnear-wait-to-spr: ~D~%" (-> this near-wait-to-spr)) + (format #t "~1Tmax-fragment: ~D~%" (-> this max-fragment)) + (format #t "~1Tmin-fragment: ~D~%" (-> this min-fragment)) + (format #t "~1Ttexture-dists: #x~X~%" (-> this texture-dists)) + (label cfg-4) + this + ) + +;; definition of type tfrag-dma +(deftype tfrag-dma (structure) + "Memory layout for to/from scratchpad for tfrag." + ((banka tfragment 16 :inline) + (bankb tfragment 16 :inline) + (outa uint128 128) + (outb uint128 128) + (colors rgba 2047) + ) + ) + +;; definition for method 3 of type tfrag-dma +(defmethod inspect ((this tfrag-dma)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'tfrag-dma) + (format #t "~1Tbanka[16] @ #x~X~%" (-> this banka)) + (format #t "~1Tbankb[16] @ #x~X~%" (-> this bankb)) + (format #t "~1Touta[128] @ #x~X~%" (-> this outa)) + (format #t "~1Toutb[128] @ #x~X~%" (-> this outb)) + (format #t "~1Tcolors[2048] @ #x~X~%" (-> this colors)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 diff --git a/test/decompiler/reference/jak3/engine/gfx/background/tfrag/tfrag-methods_REF.gc b/test/decompiler/reference/jak3/engine/gfx/background/tfrag/tfrag-methods_REF.gc new file mode 100644 index 0000000000..212eb39696 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/background/tfrag/tfrag-methods_REF.gc @@ -0,0 +1,898 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function edge-debug-lines +;; WARN: Return type mismatch symbol vs none. +(defun edge-debug-lines ((arg0 (array vector-array))) + "Draw tfrag debug lines. These debug-lines are not stored in retail copies." + (when (nonzero? arg0) + (dotimes (s5-0 (-> arg0 length)) + (when (logtest? *display-strip-lines* (ash 1 s5-0)) + (let ((s4-0 (-> arg0 s5-0))) + (dotimes (s3-0 (/ (-> s4-0 length) 2)) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> s4-0 data (* s3-0 2)) + (-> s4-0 data (+ (* s3-0 2) 1)) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + #f + (the-as rgba -1) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for function draw-drawable-tree-tfrag +;; WARN: Return type mismatch drawable-tree-tfrag vs none. +(defun draw-drawable-tree-tfrag ((arg0 drawable-tree-tfrag)) + "Top-level function to generate DMA for tfrag." + (local-vars (sv-16 int)) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tfrag)) + (let ((s5-0 (+ (-> arg0 length) -1))) + (when (nonzero? s5-0) + (dotimes (s4-0 s5-0) + (let* ((v1-8 (-> arg0 arrays s4-0)) + (a0-4 (-> arg0 arrays (+ s4-0 1))) + (a1-1 (/ (-> (the-as drawable-inline-array-node v1-8) data 0 id) 8)) + (a0-6 (/ (-> (the-as drawable-inline-array-node a0-4) data 0 id) 8)) + (a1-3 (+ a1-1 #x3800 #x70000000)) + (a0-8 (+ a0-6 #x3800 #x70000000)) + ) + (draw-node-cull + (the-as pointer a0-8) + (the-as pointer a1-3) + (the-as (inline-array draw-node) (&+ v1-8 32)) + (-> v1-8 length) + ) + ) + ) + ) + (let* ((v1-14 (-> arg0 arrays s5-0)) + (s4-1 (&+ v1-14 32)) + (s3-0 (-> v1-14 length)) + ) + (set! sv-16 (+ (/ (-> s4-1 id) 8) #x3800 #x70000000)) + (let ((s5-1 (-> *display* frames (-> *display* on-screen) global-buf base))) + (with-dma-buffer-add-bucket ((s1-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 10 + (bucket-id tfrag-l0-tfrag) + (bucket-id tfrag-l1-tfrag) + (bucket-id tfrag-l2-tfrag) + (bucket-id tfrag-l3-tfrag) + (bucket-id tfrag-l4-tfrag) + (bucket-id tfrag-l5-tfrag) + (bucket-id tfrag-l6-tfrag) + (bucket-id tfrag-l7-tfrag) + (bucket-id tfrag-l8-tfrag) + (bucket-id tfrag-l9-tfrag) + ) + *draw-index* + ) + ) + (set! (-> *tfrag-work* wait-to-spr) (the-as uint 0)) + (set! (-> *tfrag-work* wait-from-spr) (the-as uint 0)) + (set! (-> *tfrag-work* texture-dists) (the-as uint (-> *level* draw-level *draw-index* bsp tfrag-closest))) + (set! (-> *tfrag-work* last-call) (the-as uint 0)) + (draw-inline-array-tfrag (the-as pointer sv-16) s4-1 s3-0 s1-0) + (set! (-> *level* draw-level *draw-index* tfrag-last-calls 0) (-> *tfrag-work* last-call)) + (update-wait-stats + (-> *perf-stats* data 42) + (the-as uint 0) + (-> *tfrag-work* wait-to-spr) + (-> *tfrag-work* wait-from-spr) + ) + ) + (with-dma-buffer-add-bucket ((s1-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 10 + (bucket-id tfrag-scissor-l0-tfrag) + (bucket-id tfrag-scissor-l1-tfrag) + (bucket-id tfrag-scissor-l2-tfrag) + (bucket-id tfrag-scissor-l3-tfrag) + (bucket-id tfrag-scissor-l4-tfrag) + (bucket-id tfrag-scissor-l5-tfrag) + (bucket-id tfrag-scissor-l6-tfrag) + (bucket-id tfrag-scissor-l7-tfrag) + (bucket-id tfrag-scissor-l8-tfrag) + (bucket-id tfrag-scissor-l9-tfrag) + ) + *draw-index* + ) + ) + (set! (-> *tfrag-work* near-wait-to-spr) (the-as uint 0)) + (set! (-> *tfrag-work* near-wait-from-spr) (the-as uint 0)) + (set! (-> *tfrag-work* last-call) (the-as uint 0)) + (draw-inline-array-tfrag-scissor (the-as pointer sv-16) s4-1 s3-0 s1-1) + (set! (-> *level* draw-level *draw-index* tfrag-last-calls 1) (-> *tfrag-work* last-call)) + (update-wait-stats + (-> *perf-stats* data 43) + (the-as uint 0) + (-> *tfrag-work* near-wait-to-spr) + (-> *tfrag-work* near-wait-from-spr) + ) + ) + (let ((a0-33 *dma-mem-usage*)) + (when (nonzero? a0-33) + (set! (-> a0-33 length) (max 2 (-> a0-33 length))) + (set! (-> a0-33 data 1 name) "tfragment") + (+! (-> a0-33 data 1 count) 1) + (+! (-> a0-33 data 1 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-1)) + ) + (set! (-> a0-33 data 1 total) (-> a0-33 data 1 used)) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for function draw-drawable-tree-tfrag-trans +;; WARN: Return type mismatch drawable-tree-tfrag vs none. +(defun draw-drawable-tree-tfrag-trans ((arg0 drawable-tree-tfrag)) + "Top-level function to generate DMA for tfrag." + (local-vars (sv-16 int)) + (when (logtest? (vu1-renderer-mask tfrag-trans) (-> *display* vu1-enable-user)) + (let ((s5-0 (+ (-> arg0 length) -1))) + (when (nonzero? s5-0) + (dotimes (s4-0 s5-0) + (let* ((v1-7 (-> arg0 arrays s4-0)) + (a0-6 (-> arg0 arrays (+ s4-0 1))) + (a1-1 (/ (-> (the-as drawable-inline-array-node v1-7) data 0 id) 8)) + (a0-8 (/ (-> (the-as drawable-inline-array-node a0-6) data 0 id) 8)) + (a1-3 (+ a1-1 #x3800 #x70000000)) + (a0-10 (+ a0-8 #x3800 #x70000000)) + ) + (draw-node-cull + (the-as pointer a0-10) + (the-as pointer a1-3) + (the-as (inline-array draw-node) (&+ v1-7 32)) + (-> v1-7 length) + ) + ) + ) + ) + (let* ((v1-13 (-> arg0 arrays s5-0)) + (s5-1 (&+ v1-13 32)) + (s4-1 (-> v1-13 length)) + ) + (set! sv-16 (+ (/ (-> s5-1 id) 8) #x3800 #x70000000)) + (with-dma-buffer-add-bucket ((s2-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 12 + (bucket-id tfrag-l0-alpha) + (bucket-id tfrag-l1-alpha) + (bucket-id tfrag-l2-alpha) + (bucket-id tfrag-l3-alpha) + (bucket-id tfrag-l4-alpha) + (bucket-id tfrag-l5-alpha) + (bucket-id tfrag-l6-alpha) + (bucket-id tfrag-l7-alpha) + (bucket-id tfrag-l8-alpha) + (bucket-id tfrag-l9-alpha) + (bucket-id bucket0) + (bucket-id bucket0) + ) + *draw-index* + ) + ) + (set! (-> *tfrag-work* wait-to-spr) (the-as uint 0)) + (set! (-> *tfrag-work* wait-from-spr) (the-as uint 0)) + (set! (-> *tfrag-work* texture-dists) (the-as uint (-> *level* draw-level *draw-index* bsp alpha-closest))) + (set! (-> *tfrag-work* last-call) (the-as uint 0)) + (draw-inline-array-tfrag (the-as pointer sv-16) s5-1 s4-1 s2-0) + (set! (-> *level* draw-level *draw-index* tfrag-last-calls 2) (-> *tfrag-work* last-call)) + (update-wait-stats + (-> *perf-stats* data 42) + (the-as uint 0) + (-> *tfrag-work* wait-to-spr) + (-> *tfrag-work* wait-from-spr) + ) + ) + (with-dma-buffer-add-bucket ((s2-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 12 + (bucket-id tfrag-scissor-l0-alpha) + (bucket-id tfrag-scissor-l1-alpha) + (bucket-id tfrag-scissor-l2-alpha) + (bucket-id tfrag-scissor-l3-alpha) + (bucket-id tfrag-scissor-l4-alpha) + (bucket-id tfrag-scissor-l5-alpha) + (bucket-id tfrag-scissor-l6-alpha) + (bucket-id tfrag-scissor-l7-alpha) + (bucket-id tfrag-scissor-l8-alpha) + (bucket-id tfrag-scissor-l9-alpha) + (bucket-id bucket0) + (bucket-id bucket0) + ) + *draw-index* + ) + ) + (set! (-> *tfrag-work* near-wait-to-spr) (the-as uint 0)) + (set! (-> *tfrag-work* near-wait-from-spr) (the-as uint 0)) + (set! (-> *tfrag-work* last-call) (the-as uint 0)) + (draw-inline-array-tfrag-scissor (the-as pointer sv-16) s5-1 s4-1 s2-1) + (set! (-> *level* draw-level *draw-index* tfrag-last-calls 3) (-> *tfrag-work* last-call)) + (update-wait-stats + (-> *perf-stats* data 43) + (the-as uint 0) + (-> *tfrag-work* near-wait-to-spr) + (-> *tfrag-work* near-wait-from-spr) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for function draw-drawable-tree-tfrag-water +;; WARN: Return type mismatch drawable-tree-tfrag vs none. +(defun draw-drawable-tree-tfrag-water ((arg0 drawable-tree-tfrag)) + "Top-level function to generate DMA for tfrag." + (local-vars (sv-16 int)) + (when (logtest? (vu1-renderer-mask tfrag-water) (-> *display* vu1-enable-user)) + (let ((s5-0 (+ (-> arg0 length) -1))) + (when (nonzero? s5-0) + (dotimes (s4-0 s5-0) + (let* ((v1-7 (-> arg0 arrays s4-0)) + (a0-6 (-> arg0 arrays (+ s4-0 1))) + (a1-1 (/ (-> (the-as drawable-inline-array-node v1-7) data 0 id) 8)) + (a0-8 (/ (-> (the-as drawable-inline-array-node a0-6) data 0 id) 8)) + (a1-3 (+ a1-1 #x3800 #x70000000)) + (a0-10 (+ a0-8 #x3800 #x70000000)) + ) + (draw-node-cull + (the-as pointer a0-10) + (the-as pointer a1-3) + (the-as (inline-array draw-node) (&+ v1-7 32)) + (-> v1-7 length) + ) + ) + ) + ) + (let* ((v1-13 (-> arg0 arrays s5-0)) + (s5-1 (&+ v1-13 32)) + (s4-1 (-> v1-13 length)) + ) + (set! sv-16 (+ (/ (-> s5-1 id) 8) #x3800 #x70000000)) + (with-dma-buffer-add-bucket ((s2-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 12 + (bucket-id tfrag-l0-water) + (bucket-id tfrag-l1-water) + (bucket-id tfrag-l2-water) + (bucket-id tfrag-l3-water) + (bucket-id tfrag-l4-water) + (bucket-id tfrag-l5-water) + (bucket-id tfrag-l6-water) + (bucket-id tfrag-l7-water) + (bucket-id tfrag-l8-water) + (bucket-id tfrag-l9-water) + (bucket-id bucket0) + (bucket-id bucket0) + ) + *draw-index* + ) + ) + (set! (-> *tfrag-work* wait-to-spr) (the-as uint 0)) + (set! (-> *tfrag-work* wait-from-spr) (the-as uint 0)) + (set! (-> *tfrag-work* texture-dists) (the-as uint (-> *level* draw-level *draw-index* bsp water-closest))) + (set! (-> *tfrag-work* last-call) (the-as uint 0)) + (draw-inline-array-tfrag (the-as pointer sv-16) s5-1 s4-1 s2-0) + (set! (-> *level* draw-level *draw-index* tfrag-last-calls 4) (-> *tfrag-work* last-call)) + (update-wait-stats + (-> *perf-stats* data 42) + (the-as uint 0) + (-> *tfrag-work* wait-to-spr) + (-> *tfrag-work* wait-from-spr) + ) + ) + (with-dma-buffer-add-bucket ((s2-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 12 + (bucket-id tfrag-scissor-l0-water) + (bucket-id tfrag-scissor-l1-water) + (bucket-id tfrag-scissor-l2-water) + (bucket-id tfrag-scissor-l3-water) + (bucket-id tfrag-scissor-l4-water) + (bucket-id tfrag-scissor-l5-water) + (bucket-id tfrag-scissor-l6-water) + (bucket-id tfrag-scissor-l7-water) + (bucket-id tfrag-scissor-l8-water) + (bucket-id tfrag-scissor-l9-water) + (bucket-id bucket0) + (bucket-id bucket0) + ) + *draw-index* + ) + ) + (set! (-> *tfrag-work* near-wait-to-spr) (the-as uint 0)) + (set! (-> *tfrag-work* near-wait-from-spr) (the-as uint 0)) + (set! (-> *tfrag-work* last-call) (the-as uint 0)) + (draw-inline-array-tfrag-scissor (the-as pointer sv-16) s5-1 s4-1 s2-1) + (set! (-> *level* draw-level *draw-index* tfrag-last-calls 5) (-> *tfrag-work* last-call)) + (update-wait-stats + (-> *perf-stats* data 43) + (the-as uint 0) + (-> *tfrag-work* near-wait-to-spr) + (-> *tfrag-work* near-wait-from-spr) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for function tfrag-vu1-init-buf +;; WARN: Return type mismatch pointer vs none. +(defun tfrag-vu1-init-buf ((arg0 bucket-id) (arg1 gs-test) (arg2 int) (arg3 uint) (arg4 symbol)) + "Do all tfrag buffer setup for a single bucket." + (let ((v1-0 *display*) + (a0-1 32) + ) + (+! (-> v1-0 mem-reserve-size) a0-1) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((t1-0 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> t1-0 real-buffer-end) (the-as int (&+ (-> t1-0 base) a0-1))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((s4-0 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + (when (!= s4-0 (-> s4-0 last)) + (let* ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s2-1 (-> s3-0 base)) + ) + (tfrag-init-buffer s3-0 arg1 arg2 arg4) + (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 (-> s4-0 next))) + (set! (-> (the-as dma-packet v1-14) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-14) vif1) (new 'static 'vif-tag)) + (set! (-> s3-0 base) (the-as pointer (&+ (the-as dma-packet v1-14) 16))) + ) + (set! (-> s4-0 next) (the-as uint s2-1)) + ) + ) + ) + (let ((s5-1 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + (when (!= s5-1 (-> s5-1 last)) + (let* ((s3-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s4-1 (-> s3-1 base)) + ) + (tfrag-end-buffer s3-1 (the-as int arg3)) + (let ((v0-5 (-> s3-1 base))) + (let ((v1-28 (the-as object (-> s3-1 base)))) + (set! (-> (the-as dma-packet v1-28) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-28) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-28) vif1) (new 'static 'vif-tag)) + (set! (-> s3-1 base) (&+ (the-as pointer v1-28) 16)) + ) + (set! (-> (the-as (pointer int32) (-> s5-1 last)) 1) (the-as int s4-1)) + (set! (-> s5-1 last) (the-as (pointer dma-tag) v0-5)) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for function tfrag-scissor-vu1-init-buf +;; WARN: Return type mismatch pointer vs none. +;; ERROR: Failed store: (s.w! (+ v1-14 8) 0) at op 52 +;; ERROR: Failed store: (s.w! (+ v1-14 12) 0) at op 53 +;; ERROR: Failed store: (s.w! (+ v1-28 8) 0) at op 84 +;; ERROR: Failed store: (s.w! (+ v1-28 12) 0) at op 85 +;; ERROR: Failed store: (s.w! (+ v1-30 4) s4-1) at op 89 +(defun tfrag-scissor-vu1-init-buf ((arg0 bucket-id) (arg1 gs-test) (arg2 int) (arg3 uint) (arg4 symbol)) + (let ((v1-0 *display*) + (a0-1 32) + ) + (+! (-> v1-0 mem-reserve-size) a0-1) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((t1-0 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> t1-0 real-buffer-end) (the-as int (&+ (-> t1-0 base) a0-1))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((s4-0 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + (when (!= s4-0 (-> s4-0 last)) + (let* ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s2-1 (-> s3-0 base)) + ) + (tfrag-scissor-init-buffer s3-0 arg1 arg2 arg4) + (let ((v1-14 (-> s3-0 base))) + (set! (-> (the-as (pointer uint64) v1-14)) (logior #x20000000 (shr (shl (-> s4-0 next) 33) 1))) + (s.w! (+ v1-14 8) 0) + (s.w! (+ v1-14 12) 0) + (set! (-> s3-0 base) (&+ v1-14 16)) + ) + (set! (-> s4-0 next) (the-as uint s2-1)) + ) + ) + ) + (let ((s5-1 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + (when (!= s5-1 (-> s5-1 last)) + (let* ((s3-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s4-1 (-> s3-1 base)) + ) + (tfrag-scissor-end-buffer s3-1 arg3) + (let ((v0-5 (-> s3-1 base))) + (let ((v1-28 (-> s3-1 base))) + (set! (-> (the-as (pointer int64) v1-28)) #x20000000) + (s.w! (+ v1-28 8) 0) + (s.w! (+ v1-28 12) 0) + (set! (-> s3-1 base) (&+ v1-28 16)) + ) + (let ((v1-30 (-> s5-1 last))) + (s.w! (+ v1-30 4) s4-1) + ) + (set! (-> s5-1 last) (the-as (pointer dma-tag) v0-5)) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition of type tfrag-init-data +(deftype tfrag-init-data (structure) + ((tfrag-bucket bucket-id) + (tfrag-scissor-bucket bucket-id) + (tfrag-trans-bucket bucket-id) + (tfrag-scissor-trans-bucket bucket-id) + (tfrag-water-bucket bucket-id) + (tfrag-water-scissor-bucket bucket-id) + ) + ) + +;; definition for method 3 of type tfrag-init-data +(defmethod inspect ((this tfrag-init-data)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'tfrag-init-data) + (format #t "~1Ttfrag-bucket: ~D~%" (-> this tfrag-bucket)) + (format #t "~1Ttfrag-scissor-bucket: ~D~%" (-> this tfrag-scissor-bucket)) + (format #t "~1Ttfrag-trans-bucket: ~D~%" (-> this tfrag-trans-bucket)) + (format #t "~1Ttfrag-scissor-trans-bucket: ~D~%" (-> this tfrag-scissor-trans-bucket)) + (format #t "~1Ttfrag-water-bucket: ~D~%" (-> this tfrag-water-bucket)) + (format #t "~1Ttfrag-water-scissor-bucket: ~D~%" (-> this tfrag-water-scissor-bucket)) + (label cfg-4) + this + ) + +;; definition for symbol *tfrag-init-table*, type (inline-array tfrag-init-data) +(define *tfrag-init-table* (new 'static 'inline-array tfrag-init-data 10 + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l0-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-scissor-l0-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-l0-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-scissor-l0-alpha) + :tfrag-water-bucket (bucket-id tfrag-l0-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-scissor-l0-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l1-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-scissor-l1-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-l1-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-scissor-l1-alpha) + :tfrag-water-bucket (bucket-id tfrag-l1-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-scissor-l1-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l2-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-scissor-l2-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-l2-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-scissor-l2-alpha) + :tfrag-water-bucket (bucket-id tfrag-l2-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-scissor-l2-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l3-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-scissor-l3-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-l3-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-scissor-l3-alpha) + :tfrag-water-bucket (bucket-id tfrag-l3-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-scissor-l3-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l4-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-scissor-l4-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-l4-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-scissor-l4-alpha) + :tfrag-water-bucket (bucket-id tfrag-l4-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-scissor-l4-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l5-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-scissor-l5-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-l5-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-scissor-l5-alpha) + :tfrag-water-bucket (bucket-id tfrag-l5-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-scissor-l5-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l6-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-scissor-l6-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-l6-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-scissor-l6-alpha) + :tfrag-water-bucket (bucket-id tfrag-l6-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-scissor-l6-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l7-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-scissor-l7-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-l7-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-scissor-l7-alpha) + :tfrag-water-bucket (bucket-id tfrag-l7-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-scissor-l7-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l8-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-scissor-l8-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-l8-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-scissor-l8-alpha) + :tfrag-water-bucket (bucket-id tfrag-l8-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-scissor-l8-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l9-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-scissor-l9-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-l9-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-scissor-l9-alpha) + :tfrag-water-bucket (bucket-id tfrag-l9-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-scissor-l9-water) + ) + ) + ) + +;; definition for function tfrag-vu1-init-buffers +;; WARN: Return type mismatch symbol vs none. +(defun tfrag-vu1-init-buffers () + "Initialize all tfrag buckets." + (dotimes (gp-0 10) + (let ((s5-0 (-> *level* draw-level gp-0)) + (s4-0 (-> *tfrag-init-table* gp-0)) + ) + (when s5-0 + (set-subdivide-settings! s5-0) + (let ((s3-0 (-> s5-0 tfrag-gs-test))) + (tfrag-vu1-init-buf + (-> s4-0 tfrag-bucket) + s3-0 + 0 + (-> s5-0 tfrag-last-calls 0) + (logtest? (-> s5-0 info level-flags) (level-flags use-camera-other)) + ) + (tfrag-scissor-vu1-init-buf + (-> s4-0 tfrag-scissor-bucket) + s3-0 + 0 + (-> s5-0 tfrag-last-calls 1) + (logtest? (-> s5-0 info level-flags) (level-flags use-camera-other)) + ) + ) + (tfrag-vu1-init-buf + (-> s4-0 tfrag-trans-bucket) + (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + 1 + (-> s5-0 tfrag-last-calls 2) + (logtest? (-> s5-0 info level-flags) (level-flags use-camera-other)) + ) + (tfrag-scissor-vu1-init-buf + (-> s4-0 tfrag-scissor-trans-bucket) + (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + 1 + (-> s5-0 tfrag-last-calls 3) + (logtest? (-> s5-0 info level-flags) (level-flags use-camera-other)) + ) + (tfrag-vu1-init-buf + (-> s4-0 tfrag-water-bucket) + (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest greater-equal)) + 1 + (-> s5-0 tfrag-last-calls 4) + (logtest? (-> s5-0 info level-flags) (level-flags use-camera-other)) + ) + (tfrag-scissor-vu1-init-buf + (-> s4-0 tfrag-water-scissor-bucket) + (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest greater-equal)) + 1 + (-> s5-0 tfrag-last-calls 5) + (logtest? (-> s5-0 info level-flags) (level-flags use-camera-other)) + ) + ) + ) + ) + (none) + ) + +;; definition for method 10 of type drawable-tree-tfrag +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this drawable-tree-tfrag)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + (let ((v1-1 (-> *background-work* tfrag-tree-count)) + (a1-3 (-> *level* draw-level *draw-index*)) + ) + (set! (-> *background-work* tfrag-trees v1-1) this) + (set! (-> *background-work* tfrag-levels v1-1) a1-3) + ) + (+! (-> *background-work* tfrag-tree-count) 1) + 0 + (none) + ) + +;; definition for method 10 of type drawable-tree-tfrag-trans +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this drawable-tree-tfrag-trans)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + (let ((v1-1 (-> *background-work* tfrag-trans-tree-count)) + (a1-3 (-> *level* draw-level *draw-index*)) + ) + (set! (-> *background-work* tfrag-trans-trees v1-1) this) + (set! (-> *background-work* tfrag-trans-levels v1-1) a1-3) + ) + (+! (-> *background-work* tfrag-trans-tree-count) 1) + 0 + (none) + ) + +;; definition for method 10 of type drawable-tree-tfrag-water +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this drawable-tree-tfrag-water)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + (let ((v1-1 (-> *background-work* tfrag-water-tree-count)) + (a1-3 (-> *level* draw-level *draw-index*)) + ) + (set! (-> *background-work* tfrag-water-trees v1-1) this) + (set! (-> *background-work* tfrag-water-levels v1-1) a1-3) + ) + (+! (-> *background-work* tfrag-water-tree-count) 1) + 0 + (none) + ) + +;; definition for method 13 of type tfragment +;; WARN: Return type mismatch int vs none. +(defmethod collect-stats ((this tfragment)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + (stats-tfrag-asm this) + 0 + (none) + ) + +;; definition for method 13 of type drawable-tree-tfrag +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod collect-stats ((this drawable-tree-tfrag)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tfrag)) + (set! (-> *tfrag-work* vu1-enable-tfrag) + (the-as int (logand (-> *display* vu1-enable-user) (vu1-renderer-mask tfrag))) + ) + (set! (-> *tfrag-work* vu1-enable-tfrag-scissor) + (the-as int (logand (-> *display* vu1-enable-user) (vu1-renderer-mask tfrag))) + ) + (set! (-> *tfrag-work* tr-stat-tfrag) (-> *terrain-stats* tfrag)) + (set! (-> *tfrag-work* tr-stat-tfrag-scissor) (-> *terrain-stats* tfrag-scissor)) + (let ((v1-15 (-> *tfrag-work* frag-dists quad))) + (set! (-> *tfrag-work* frag-dists quad) v1-15) + ) + (dotimes (s5-0 (-> this length)) + (collect-stats (-> this arrays s5-0)) + ) + ) + 0 + (none) + ) + +;; definition for method 13 of type drawable-tree-tfrag-trans +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod collect-stats ((this drawable-tree-tfrag-trans)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + (when (logtest? (vu1-renderer-mask tfrag-trans) (-> *display* vu1-enable-user)) + (set! (-> *tfrag-work* vu1-enable-tfrag) + (the-as int (logand (vu1-renderer-mask tfrag-trans) (-> *display* vu1-enable-user))) + ) + (set! (-> *tfrag-work* vu1-enable-tfrag-scissor) + (the-as int (logand (vu1-renderer-mask tfrag-trans) (-> *display* vu1-enable-user))) + ) + (set! (-> *tfrag-work* tr-stat-tfrag) (-> *terrain-stats* tfrag-trans)) + (set! (-> *tfrag-work* tr-stat-tfrag-scissor) (-> *terrain-stats* tfrag-scissor-trans)) + (let ((v1-12 (-> *tfrag-work* frag-dists quad))) + (set! (-> *tfrag-work* frag-dists quad) v1-12) + ) + (dotimes (s5-0 (-> this length)) + (collect-stats (-> this arrays s5-0)) + ) + ) + 0 + (none) + ) + +;; definition for method 13 of type drawable-tree-tfrag-water +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod collect-stats ((this drawable-tree-tfrag-water)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + (when (logtest? (vu1-renderer-mask tfrag-water) (-> *display* vu1-enable-user)) + (set! (-> *tfrag-work* vu1-enable-tfrag) + (the-as int (logand (vu1-renderer-mask tfrag-water) (-> *display* vu1-enable-user))) + ) + (set! (-> *tfrag-work* vu1-enable-tfrag-scissor) + (the-as int (logand (vu1-renderer-mask tfrag-water) (-> *display* vu1-enable-user))) + ) + (set! (-> *tfrag-work* tr-stat-tfrag) (-> *terrain-stats* tfrag-water)) + (set! (-> *tfrag-work* tr-stat-tfrag-scissor) (-> *terrain-stats* tfrag-scissor-water)) + (let ((v1-12 (-> *tfrag-work* frag-dists quad))) + (set! (-> *tfrag-work* frag-dists quad) v1-12) + ) + (dotimes (s5-0 (-> this length)) + (collect-stats (-> this arrays s5-0)) + ) + ) + 0 + (none) + ) + +;; definition for method 13 of type drawable-inline-array-tfrag +;; WARN: Return type mismatch int vs none. +(defmethod collect-stats ((this drawable-inline-array-tfrag)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tfrag)) + (dotimes (s5-0 (-> this length)) + (let ((s4-0 (-> this data s5-0))) + (if (vis-cull (-> s4-0 id)) + (collect-stats s4-0) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 13 of type drawable-inline-array-tfrag-trans +;; WARN: Return type mismatch int vs none. +(defmethod collect-stats ((this drawable-inline-array-tfrag-trans)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + (when (logtest? (vu1-renderer-mask tfrag-trans) (-> *display* vu1-enable-user)) + (dotimes (s5-0 (-> this length)) + (let ((s4-0 (-> this data s5-0))) + (if (vis-cull (-> s4-0 id)) + (collect-stats s4-0) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 13 of type drawable-inline-array-tfrag-water +;; WARN: Return type mismatch int vs none. +(defmethod collect-stats ((this drawable-inline-array-tfrag-water)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + (when (logtest? (vu1-renderer-mask tfrag-water) (-> *display* vu1-enable-user)) + (dotimes (s5-0 (-> this length)) + (let ((s4-0 (-> this data s5-0))) + (if (vis-cull (-> s4-0 id)) + (collect-stats s4-0) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 14 of type drawable-tree-tfrag +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this drawable-tree-tfrag)) + "Debug-draw a drawable and its children. Typically uses the debug-draw functions." + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tfrag)) + (dotimes (s5-0 (-> this length)) + (debug-draw (-> this arrays s5-0)) + ) + ) + 0 + (none) + ) + +;; definition for method 14 of type drawable-tree-tfrag-trans +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this drawable-tree-tfrag-trans)) + "Debug-draw a drawable and its children. Typically uses the debug-draw functions." + (when (logtest? (vu1-renderer-mask tfrag-trans) (-> *display* vu1-enable-user)) + (dotimes (s5-0 (-> this length)) + (debug-draw (-> this arrays s5-0)) + ) + ) + 0 + (none) + ) + +;; definition for method 14 of type drawable-tree-tfrag-water +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this drawable-tree-tfrag-water)) + "Debug-draw a drawable and its children. Typically uses the debug-draw functions." + (when (logtest? (vu1-renderer-mask tfrag-water) (-> *display* vu1-enable-user)) + (dotimes (s5-0 (-> this length)) + (debug-draw (-> this arrays s5-0)) + ) + ) + 0 + (none) + ) + +;; definition for method 14 of type drawable-inline-array-tfrag +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this drawable-inline-array-tfrag)) + "Debug-draw a drawable and its children. Typically uses the debug-draw functions." + (dotimes (s5-0 (-> this length)) + (let ((s4-0 (-> this data s5-0))) + (if (vis-cull (-> s4-0 id)) + (debug-draw s4-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 14 of type tfragment +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this tfragment)) + "Debug-draw a drawable and its children. Typically uses the debug-draw functions." + (-> *display* frames (-> *display* on-screen) global-buf) + (edge-debug-lines (-> this debug-data debug-lines)) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/background/tfrag/tfrag-near_REF.gc b/test/decompiler/reference/jak3/engine/gfx/background/tfrag/tfrag-near_REF.gc new file mode 100644 index 0000000000..c5d38dd50f --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/background/tfrag/tfrag-near_REF.gc @@ -0,0 +1,80 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol tnear-vu1-block, type vu-function +(define tnear-vu1-block (new 'static 'vu-function :length #x38b :qlength #x1c6)) + +;; definition (debug) for function tfrag-details +;; WARN: Return type mismatch symbol vs none. +(defun-debug tfrag-details ((arg0 tfragment)) + (format 0 "id = ~d~%" (-> arg0 id)) + (format 0 "common:~%") + (let ((s5-0 (-> arg0 dma-qwc 0)) + (s4-0 (-> arg0 dma-common)) + ) + (format 0 "qwc = ~d, ref = ~x~%" s5-0 s4-0) + (disasm-vif-tag (the-as (pointer vif-tag) s4-0) (the-as int (* s5-0 4)) (the-as symbol 0) #t) + ) + (format 0 "base:~%") + (let ((s5-1 (-> arg0 dma-qwc 1)) + (s4-1 (-> arg0 dma-base)) + ) + (format 0 "qwc = ~d, ref = ~x~%" s5-1 s4-1) + (disasm-vif-tag (the-as (pointer vif-tag) s4-1) (the-as int (* s5-1 4)) (the-as symbol 0) #t) + ) + (format 0 "level-0:~%") + (let ((s5-2 (-> arg0 dma-qwc 3)) + (s4-2 (-> arg0 dma-qwc-word)) + ) + (format 0 "qwc = ~d, ref = ~x~%" s5-2 s4-2) + (disasm-vif-tag (the-as (pointer vif-tag) s4-2) (the-as int (* s5-2 4)) (the-as symbol 0) #t) + ) + (format 0 "level-1:~%") + (let ((s5-3 (-> arg0 dma-qwc 2)) + (gp-1 (-> arg0 dma-level-1)) + ) + (format 0 "qwc = ~d, ref = ~x~%" s5-3 gp-1) + (disasm-vif-tag (the-as (pointer vif-tag) gp-1) (the-as int (* s5-3 4)) (the-as symbol 0) #t) + ) + (none) + ) + +;; definition (debug) for function clip-restore +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs none. +(defun-debug clip-restore () + (let ((a0-0 (new-stack-vector0)) + (a1-0 (new 'stack-no-clear 'matrix)) + ) + (set! (-> a1-0 rvec quad) (the-as uint128 0)) + (set! (-> a1-0 uvec quad) (the-as uint128 0)) + (set! (-> a1-0 fvec quad) (the-as uint128 0)) + (set! (-> a1-0 trans quad) (the-as uint128 0)) + (set! (-> a0-0 x) 92648.22) + (set! (-> a0-0 y) 238025.03) + (set! (-> a0-0 z) 199836.31) + (set! (-> a0-0 w) 1.0) + (set! (-> a1-0 rvec x) -0.9283) + (set! (-> a1-0 rvec y) 0.0) + (set! (-> a1-0 rvec z) 0.3716) + (set! (-> a1-0 rvec w) 0.0) + (set! (-> a1-0 uvec x) -0.2257) + (set! (-> a1-0 uvec y) 0.7945) + (set! (-> a1-0 uvec z) -0.5637) + (set! (-> a1-0 uvec w) 0.0) + (set! (-> a1-0 fvec x) -0.2952) + (set! (-> a1-0 fvec y) -0.6072) + (set! (-> a1-0 fvec z) -0.7375) + (set! (-> a1-0 fvec w) 0.0) + (set! (-> a1-0 trans x) 0.0) + (set! (-> a1-0 trans y) 0.0) + (set! (-> a1-0 trans z) 0.0) + (set! (-> a1-0 trans w) 1.0) + (debug-set-camera-pos-rot! a0-0 a1-0) + ) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/background/tfrag/tfrag-work_REF.gc b/test/decompiler/reference/jak3/engine/gfx/background/tfrag/tfrag-work_REF.gc new file mode 100644 index 0000000000..8fc6970bd7 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/background/tfrag/tfrag-work_REF.gc @@ -0,0 +1,45 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *tfrag-work*, type tfrag-work +(define *tfrag-work* (new 'static 'tfrag-work + :base-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + ) + :level-0-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + ) + :common-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + ) + :level-1-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + ) + :color-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :imm #x102 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #xc000 :cmd (vif-cmd unpack-v4-8)) + ) + :max-fragment #xffff + ) + ) + +;; failed to figure out what this is: +(set! (-> *tfrag-work* color-ptr x) (+ 6144 #x70000000)) + +;; failed to figure out what this is: +(set! (-> *tfrag-work* color-ptr y) (+ 6144 #x70000000)) + +;; failed to figure out what this is: +(set! (-> *tfrag-work* color-ptr z) (+ 6144 #x70000000)) + +;; failed to figure out what this is: +(set! (-> *tfrag-work* color-ptr w) (+ 6144 #x70000000)) + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/background/tfrag/tfrag_REF.gc b/test/decompiler/reference/jak3/engine/gfx/background/tfrag/tfrag_REF.gc new file mode 100644 index 0000000000..e5902ee12a --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/background/tfrag/tfrag_REF.gc @@ -0,0 +1,618 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 9 of type tfragment +(defmethod login ((this tfragment)) + "Initialize the object after it is loaded." + (when (nonzero? *texture-masks-array*) + (dotimes (s5-0 (the-as int (-> this num-shaders))) + (let ((v1-3 (adgif-shader-login-no-remap (-> this shader s5-0))) + (a0-7 (-> *texture-masks-array* data (-> this texture-masks-index))) + ) + (when v1-3 + (dotimes (a1-3 3) + (dotimes (a2-0 3) + (set! (-> (the-as (pointer int32) (+ (+ (* a1-3 16) (* a2-0 4)) (the-as int a0-7)))) + (logior (-> (the-as (pointer int32) (+ (* a2-0 4) (the-as int a0-7) (* a1-3 16))) 0) + (-> (the-as texture (+ (* a2-0 4) (the-as int v1-3) (* a1-3 16))) masks data 0 mask x) + ) + ) + ) + (set! (-> a0-7 data a1-3 dist) (fmax (-> a0-7 data a1-3 dist) (-> v1-3 masks data a1-3 dist))) + ) + ) + ) + ) + ) + this + ) + +;; definition for method 8 of type tfragment +(defmethod mem-usage ((this tfragment) (usage memory-usage-block) (flags int)) + (when (logtest? flags 2) + (+! (-> usage data 19 count) 1) + (let ((v1-6 (+ (-> this num-base-colors) (-> this num-level0-colors) (-> this num-level1-colors)))) + (+! (-> usage data 19 used) v1-6) + (+! (-> usage data 19 total) (logand -4 (+ v1-6 3))) + ) + (set! this this) + (goto cfg-16) + ) + (let ((s4-0 1)) + (set! (-> usage length) (max (-> usage length) (+ s4-0 8))) + (set! (-> usage data s4-0 name) "tfragment") + (+! (-> usage data s4-0 count) 1) + (let ((v1-20 (asize-of this))) + (+! (-> usage data s4-0 used) v1-20) + (+! (-> usage data s4-0 total) (logand -16 (+ v1-20 15))) + ) + (set! (-> usage data (+ s4-0 1) name) "tfragment-base") + (+! (-> usage data (+ s4-0 1) count) 1) + (let ((v1-31 (* (-> this dma-qwc 0) 16))) + (+! (-> usage data (+ s4-0 1) used) v1-31) + (+! (-> usage data (+ s4-0 1) total) v1-31) + ) + (set! (-> usage data (+ s4-0 2) name) "tfragment-common") + (+! (-> usage data (+ s4-0 2) count) 1) + (let ((v1-41 (* (- (-> this dma-qwc 1) (-> this dma-qwc 0)) 16))) + (+! (-> usage data (+ s4-0 2) used) v1-41) + (+! (-> usage data (+ s4-0 2) total) v1-41) + ) + (set! (-> usage data (+ s4-0 3) name) "tfragment-level0") + (when (nonzero? (-> this num-level0-colors)) + (+! (-> usage data (+ s4-0 3) count) 1) + (let ((v1-53 (* (- (-> this dma-qwc 2) (-> this dma-qwc 0)) 16))) + (+! (-> usage data (+ s4-0 3) used) v1-53) + (+! (-> usage data (+ s4-0 3) total) v1-53) + ) + ) + (set! (-> usage data (+ s4-0 4) name) "tfragment-level1") + (when (not (or (= (-> this dma-level-1) (-> this dma-common)) + (= (-> this dma-level-1) (-> this dma-base)) + (zero? (-> this num-level1-colors)) + ) + ) + (+! (-> usage data (+ s4-0 4) count) 1) + (let ((v1-68 (* (- (-> this dma-qwc 3) + (- (/ (the-as int (- (-> this dma-level-1) (-> this dma-common))) 16) (-> this dma-qwc 0)) + ) + 16 + ) + ) + ) + (+! (-> usage data (+ s4-0 4) used) v1-68) + (+! (-> usage data (+ s4-0 4) total) v1-68) + ) + ) + (set! (-> usage data (+ s4-0 5) name) "tfragment-color") + (+! (-> usage data (+ s4-0 5) count) 1) + (let ((v1-77 + (if (logtest? flags 1) + 0 + (the-as int (* (+ (-> this num-base-colors) (-> this num-level0-colors) (-> this num-level1-colors)) 2)) + ) + ) + ) + (+! (-> usage data (+ s4-0 5) used) v1-77) + (+! (-> usage data (+ s4-0 5) total) (logand -16 (+ v1-77 15))) + ) + (set! (-> usage data (+ s4-0 6) name) "tfragment-debug") + ) + (label cfg-16) + this + ) + +;; definition for method 3 of type drawable-inline-array-tfrag +(defmethod inspect ((this drawable-inline-array-tfrag)) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~Tlength: ~D~%" (-> this length)) + (format #t "~Tdata[~D]: @ #x~X~%" (-> this length) (-> this data)) + (dotimes (s5-0 (-> this length)) + (format #t "~T [~D] ~A~%" s5-0 (-> this data s5-0)) + ) + this + ) + +;; definition for method 9 of type drawable-inline-array-tfrag +(defmethod login ((this drawable-inline-array-tfrag)) + "Initialize the object after it is loaded." + (set! *texture-masks-array* (-> *level* level *level-index* bsp tfrag-masks)) + (dotimes (s5-0 (-> this length)) + (login (-> this data s5-0)) + ) + this + ) + +;; definition for method 9 of type drawable-inline-array-tfrag-trans +(defmethod login ((this drawable-inline-array-tfrag-trans)) + "Initialize the object after it is loaded." + (set! *texture-masks-array* (-> *level* level *level-index* bsp alpha-masks)) + (dotimes (s5-0 (-> this length)) + (login (-> this data s5-0)) + ) + this + ) + +;; definition for method 9 of type drawable-inline-array-tfrag-water +(defmethod login ((this drawable-inline-array-tfrag-water)) + "Initialize the object after it is loaded." + (set! *texture-masks-array* (-> *level* level *level-index* bsp water-masks)) + (dotimes (s5-0 (-> this length)) + (login (-> this data s5-0)) + ) + this + ) + +;; definition for method 8 of type drawable-inline-array-tfrag +(defmethod mem-usage ((this drawable-inline-array-tfrag) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-5 32)) + (+! (-> usage data 0 used) v1-5) + (+! (-> usage data 0 total) (logand -16 (+ v1-5 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this data s3-0) usage flags) + ) + this + ) + +;; definition for method 8 of type drawable-tree-tfrag +(defmethod mem-usage ((this drawable-tree-tfrag) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 0 used) v1-6) + (+! (-> usage data 0 total) (logand -16 (+ v1-6 15))) + ) + (when (nonzero? (-> this time-of-day-pal)) + (set! (-> usage length) (max 9 (-> usage length))) + (set! (-> usage data 8 name) "tfragment-pal") + (+! (-> usage data 8 count) 1) + (let ((v1-18 (asize-of (-> this time-of-day-pal)))) + (+! (-> usage data 8 used) v1-18) + (+! (-> usage data 8 total) (logand -16 (+ v1-18 15))) + ) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this arrays s3-0) usage flags) + ) + this + ) + +;; definition for method 5 of type drawable-inline-array-tfrag +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this drawable-inline-array-tfrag)) + (the-as int (+ (-> drawable-inline-array-tfrag size) (* (+ (-> this length) -1) 64))) + ) + +;; definition for symbol *tfrag-display-stats*, type symbol +(define *tfrag-display-stats* #f) + +;; definition for symbol tfrag-vu1-block, type vu-function +(define tfrag-vu1-block (new 'static 'vu-function :length #x74b :qlength #x3a6)) + +;; definition for function tfrag-data-setup +;; INFO: Used lq/sq +;; WARN: Return type mismatch tfrag-data vs none. +(defun tfrag-data-setup ((arg0 tfrag-data) (arg1 int) (arg2 int)) + "Set up VU1 constants" + (let ((v1-0 *math-camera*)) + (let ((a0-1 (-> arg0 data))) + (set! (-> a0-1 0) (the-as uint (-> v1-0 pfog0))) + (set! (-> a0-1 1) (the-as uint (-> v1-0 fog-min))) + (set! (-> a0-1 2) (the-as uint (-> v1-0 fog-max))) + (set! (-> a0-1 3) (the-as uint 3072.0)) + ) + (set-vector! (-> arg0 val) 0.5 1.0 2048.0 0.0) + (set-vector! (-> arg0 ambient) 1.0 1.0 1.0 1.0) + (let ((a0-4 arg2)) + (cond + ((zero? a0-4) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :pre #x1 + :nreg #x3 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1 :abe arg1) + ) + ) + (set! (-> arg0 fangif tag) + (new 'static 'gif-tag64 + :pre #x1 + :nreg #x3 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :fge #x1 :abe arg1) + ) + ) + ) + ((= a0-4 1) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :pre #x1 + :nreg #x3 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe arg1) + ) + ) + (set! (-> arg0 fangif tag) + (new 'static 'gif-tag64 + :pre #x1 + :nreg #x3 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe arg1) + ) + ) + ) + ((= a0-4 2) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :pre #x1 + :nreg #x3 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :fge #x1 :abe arg1) + ) + ) + (set! (-> arg0 fangif tag) + (new 'static 'gif-tag64 + :pre #x1 + :nreg #x3 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :fge #x1 :abe arg1) + ) + ) + ) + ((= a0-4 3) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :pre #x1 + :nreg #x3 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe arg1) + ) + ) + (set! (-> arg0 fangif tag) + (new 'static 'gif-tag64 + :pre #x1 + :nreg #x3 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :fge #x1 :abe arg1) + ) + ) + ) + ) + ) + (set! (-> arg0 strgif regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 fangif regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 adgif tag) (new 'static 'gif-tag64 :nloop #x5 :nreg #x1)) + (set! (-> arg0 adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (set! (-> arg0 hvdf-offset quad) (-> v1-0 hvdf-off quad)) + (set! (-> arg0 hmge-scale quad) (-> v1-0 hmge-scale quad)) + (set! (-> arg0 invh-scale quad) (-> v1-0 inv-hmge-scale quad)) + (set! (-> arg0 guard quad) (-> v1-0 guard quad)) + ) + (set-tfrag-dists! (-> arg0 dists)) + (none) + ) + +;; definition for function add-tfrag-mtx-0 +;; WARN: Return type mismatch pointer vs none. +(defun add-tfrag-mtx-0 ((arg0 dma-buffer) (arg1 symbol)) + "Add DMA for transferring matrix0 (same as matrix1)" + (let* ((a2-0 4) + (v1-0 arg0) + (a0-1 (the-as dma-packet (-> v1-0 base))) + ) + (set! (-> a0-1 dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-0)) + (set! (-> a0-1 vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> a0-1 vif1) (new 'static 'vif-tag :imm #x5 :cmd (vif-cmd unpack-v4-32) :num a2-0)) + (set! (-> v1-0 base) (the-as pointer (&+ a0-1 16))) + ) + (if arg1 + (column-scale-matrix! + (the-as matrix (-> arg0 base)) + (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + (-> *math-camera* camera-temp-other) + ) + (column-scale-matrix! + (the-as matrix (-> arg0 base)) + (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + (-> *math-camera* camera-temp) + ) + ) + (&+! (-> arg0 base) 64) + (none) + ) + +;; definition for function add-tfrag-mtx-1 +;; WARN: Return type mismatch pointer vs none. +(defun add-tfrag-mtx-1 ((arg0 dma-buffer) (arg1 symbol)) + "Add DMA for transferring matrix1 (same as matrix0)" + (let* ((a2-0 4) + (v1-0 arg0) + (a0-1 (the-as dma-packet (-> v1-0 base))) + ) + (set! (-> a0-1 dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-0)) + (set! (-> a0-1 vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> a0-1 vif1) (new 'static 'vif-tag :imm #x14d :cmd (vif-cmd unpack-v4-32) :num a2-0)) + (set! (-> v1-0 base) (the-as pointer (&+ a0-1 16))) + ) + (if arg1 + (column-scale-matrix! + (the-as matrix (-> arg0 base)) + (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + (-> *math-camera* camera-temp-other) + ) + (column-scale-matrix! + (the-as matrix (-> arg0 base)) + (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + (-> *math-camera* camera-temp) + ) + ) + (&+! (-> arg0 base) 64) + (none) + ) + +;; definition for function add-tfrag-data +;; WARN: Return type mismatch dma-packet vs none. +(defun add-tfrag-data ((arg0 dma-buffer) (arg1 int) (arg2 int)) + "Add DMA for tfrag constants." + (let* ((a3-0 14) + (v1-0 arg0) + (a0-1 (the-as dma-packet (-> v1-0 base))) + ) + (set! (-> a0-1 dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a3-0)) + (set! (-> a0-1 vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> a0-1 vif1) (new 'static 'vif-tag :imm #x290 :cmd (vif-cmd unpack-v4-32) :num a3-0)) + (set! (-> v1-0 base) (the-as pointer (&+ a0-1 16))) + ) + (tfrag-data-setup (the-as tfrag-data (-> arg0 base)) arg1 arg2) + (&+! (-> arg0 base) 224) + (let ((v1-3 (the-as dma-packet (-> arg0 base)))) + (set! (-> v1-3 dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> v1-3 vif0) (new 'static 'vif-tag)) + (set! (-> v1-3 vif1) (new 'static 'vif-tag :cmd (vif-cmd mscal) :msk #x1)) + (set! (-> arg0 base) (the-as pointer (&+ v1-3 16))) + ) + (none) + ) + +;; definition for symbol t-stat, type tfrag-stats +(define t-stat (new 'global 'tfrag-stats)) + +;; definition for function tfrag-print-stats +;; WARN: Return type mismatch symbol vs none. +(defun tfrag-print-stats ((arg0 symbol)) + "Print out accumulated tfrag stats." + (when (and *tfrag-display-stats* (!= *master-mode* 'menu)) + (format arg0 "~%") + (format arg0 "tris: ~8d~%" (-> t-stat tris)) + (format arg0 "verts: ~8d~%" (+ (-> t-stat base-verts) (-> t-stat level0-verts) (-> t-stat level1-verts))) + (format arg0 " base: ~8d~%" (-> t-stat base-verts)) + (format arg0 " lev0: ~8d~%" (-> t-stat level0-verts)) + (format arg0 " lev1: ~8d~%" (-> t-stat level1-verts)) + (format arg0 "tfaces: ~8d~%" (-> t-stat tfaces)) + (format arg0 "tfrags: ~8d~%" (-> t-stat tfrags)) + (format arg0 "dtris: ~8d~%" (-> t-stat dtris)) + (format arg0 "dps: ~8d~%" (-> t-stat drawpoints)) + (format arg0 "strips: ~8d~%" (-> t-stat strips)) + (format arg0 "shaders:~8d~%" (-> t-stat dma-tex)) + (format arg0 "tri/str:~8f~%" (/ (the float (-> t-stat dtris)) (the float (-> t-stat strips)))) + (format arg0 "dma-cnt:~8d (~8d)~%" (-> t-stat dma-cnt) (* (-> t-stat dma-cnt) 32)) + (format arg0 "dma-dta:~8d (~8d)~%" (-> t-stat dma-dta) (/ (* 33 (-> t-stat dma-dta)) 10)) + (let ((f0-4 (* 32.0 (the float (-> t-stat dma-cnt)))) + (f1-5 (* 3.3 (the float (-> t-stat dma-dta)))) + (f2-3 (* 30.0 (the float (-> t-stat tfrags)))) + ) + (+ f0-4 f1-5 f2-3) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(set! (-> t-stat from) 0) + +;; failed to figure out what this is: +(set! (-> t-stat to) 0) + +;; failed to figure out what this is: +(set! (-> t-stat cnt) 0) + +;; definition for function tfrag-init-buffer +;; WARN: Return type mismatch symbol vs none. +(defun tfrag-init-buffer ((arg0 dma-buffer) (arg1 gs-test) (arg2 int) (arg3 symbol)) + "Initialize DMA bucket for Tfrag rendering." + (let ((v1-0 *display*) + (a0-6 (+ (* (+ (/ (-> tfrag-vu1-block qlength) 127) 1) 16) 480)) + ) + (+! (-> v1-0 mem-reserve-size) a0-6) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((a2-1 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> a2-1 real-buffer-end) (the-as int (&+ (-> a2-1 base) a0-6))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (dma-buffer-add-vu-function arg0 tfrag-vu1-block 1) + (dma-buffer-add-gs-set arg0 (test-1 arg1)) + (add-tfrag-mtx-0 arg0 arg3) + (add-tfrag-mtx-1 arg0 arg3) + (add-tfrag-data arg0 arg2 (the-as int *subdivide-draw-mode*)) + (let ((v1-5 (the-as dma-packet (-> arg0 base)))) + (set! (-> v1-5 dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> v1-5 vif0) (new 'static 'vif-tag :cmd (vif-cmd base))) + (set! (-> v1-5 vif1) (new 'static 'vif-tag :imm #x148 :cmd (vif-cmd offset))) + (set! (-> arg0 base) (the-as pointer (&+ v1-5 16))) + ) + ) + ) + ) + (none) + ) + +;; definition for function tfrag-end-buffer +;; WARN: Return type mismatch symbol vs none. +(defun tfrag-end-buffer ((arg0 dma-buffer) (arg1 int)) + "Finalize DMA bucket for tfrag rendering." + (let ((v1-0 *display*) + (a2-0 64) + ) + (+! (-> v1-0 mem-reserve-size) a2-0) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((t0-0 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> t0-0 real-buffer-end) (the-as int (&+ (-> t0-0 base) a2-0))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (let* ((v1-2 arg0) + (a2-4 (the-as dma-packet (-> v1-2 base))) + ) + (set! (-> a2-4 dma) (new 'static 'dma-tag :qwc #x3 :id (dma-tag-id cnt))) + (set! (-> a2-4 vif0) (new 'static 'vif-tag :cmd (vif-cmd stmask))) + (set! (-> a2-4 vif1) (new 'static 'vif-tag)) + (set! (-> v1-2 base) (the-as pointer (&+ a2-4 16))) + ) + (let* ((v1-3 arg0) + (a0-1 (-> v1-3 base)) + ) + (set! (-> (the-as (pointer vif-tag) a0-1) 0) (the-as vif-tag arg1)) + (set! (-> (the-as (pointer vif-tag) a0-1) 1) (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1)) + (set! (-> (the-as (pointer vif-tag) a0-1) 2) (new 'static 'vif-tag :cmd (vif-cmd stmod))) + (set! (-> (the-as (pointer vif-tag) a0-1) 3) (new 'static 'vif-tag :cmd (vif-cmd strow) :msk #x1)) + (set! (-> (the-as (pointer int32) a0-1) 4) 0) + (set! (-> (the-as (pointer int32) a0-1) 5) 0) + (set! (-> (the-as (pointer int32) a0-1) 6) 0) + (set! (-> (the-as (pointer int32) a0-1) 7) 0) + (set! (-> (the-as (pointer vif-tag) a0-1) 8) (new 'static 'vif-tag :cmd (vif-cmd base))) + (set! (-> (the-as (pointer vif-tag) a0-1) 9) (new 'static 'vif-tag :cmd (vif-cmd offset))) + (set! (-> (the-as (pointer vif-tag) a0-1) 10) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as (pointer vif-tag) a0-1) 11) (new 'static 'vif-tag)) + (set! (-> v1-3 base) (&+ a0-1 48)) + ) + ) + ) + ) + (none) + ) + +;; definition for function draw-inline-array-tfrag +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function tfrag-scissor-init-buffer +;; WARN: Return type mismatch symbol vs none. +;; ERROR: Failed store: (s.w! (+ v1-5 8) a0-21) at op 77 +;; ERROR: Failed store: (s.w! (+ v1-5 12) a0-22) at op 79 +(defun tfrag-scissor-init-buffer ((arg0 dma-buffer) (arg1 gs-test) (arg2 int) (arg3 symbol)) + (let ((v1-0 *display*) + (a0-6 (+ (* (+ (/ (-> tnear-vu1-block qlength) 127) 1) 16) 496)) + ) + (+! (-> v1-0 mem-reserve-size) a0-6) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((a2-1 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> a2-1 real-buffer-end) (the-as int (&+ (-> a2-1 base) a0-6))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (dma-buffer-add-vu-function arg0 tnear-vu1-block 1) + (dma-buffer-add-gs-set arg0 (test-1 arg1)) + (add-tfrag-mtx-0 arg0 arg3) + (add-tfrag-mtx-1 arg0 arg3) + (add-tfrag-data arg0 arg2 (the-as int *subdivide-scissor-draw-mode*)) + (let ((v1-5 (-> arg0 base))) + (set! (-> (the-as (pointer int64) v1-5)) #x10000000) + (let ((a0-21 #x3000000)) + (s.w! (+ v1-5 8) a0-21) + ) + (let ((a0-22 #x2000148)) + (s.w! (+ v1-5 12) a0-22) + ) + (set! (-> arg0 base) (&+ v1-5 16)) + ) + ) + ) + ) + (none) + ) + +;; definition for function tfrag-scissor-end-buffer +;; WARN: Return type mismatch symbol vs none. +;; ERROR: Failed store: (s.w! (+ a2-4 8) a3-11) at op 25 +;; ERROR: Failed store: (s.w! (+ a2-4 12) 0) at op 26 +;; ERROR: Failed store: (s.w! (+ a0-1 4) a1-1) at op 33 +;; ERROR: Failed store: (s.w! (+ a0-1 8) a1-2) at op 35 +;; ERROR: Failed store: (s.w! (+ a0-1 12) a1-3) at op 37 +;; ERROR: Failed store: (s.w! (+ a0-1 16) 0) at op 38 +;; ERROR: Failed store: (s.w! (+ a0-1 20) 0) at op 39 +;; ERROR: Failed store: (s.w! (+ a0-1 24) 0) at op 40 +;; ERROR: Failed store: (s.w! (+ a0-1 28) 0) at op 41 +;; ERROR: Failed store: (s.w! (+ a0-1 32) a1-4) at op 43 +;; ERROR: Failed store: (s.w! (+ a0-1 36) a1-5) at op 45 +;; ERROR: Failed store: (s.w! (+ a0-1 40) a1-6) at op 47 +;; ERROR: Failed store: (s.w! (+ a0-1 44) 0) at op 48 +(defun tfrag-scissor-end-buffer ((arg0 dma-buffer) (arg1 uint)) + (let ((v1-0 *display*) + (a2-0 64) + ) + (+! (-> v1-0 mem-reserve-size) a2-0) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((t0-0 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> t0-0 real-buffer-end) (the-as int (&+ (-> t0-0 base) a2-0))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (let* ((v1-2 arg0) + (a2-4 (-> v1-2 base)) + ) + (set! (-> (the-as (pointer int64) a2-4)) #x10000003) + (let ((a3-11 #x20000000)) + (s.w! (+ a2-4 8) a3-11) + ) + (s.w! (+ a2-4 12) 0) + (set! (-> v1-2 base) (&+ a2-4 16)) + ) + (let* ((v1-3 arg0) + (a0-1 (-> v1-3 base)) + ) + (set! (-> (the-as (pointer uint32) a0-1)) arg1) + (let ((a1-1 #x13000000)) + (s.w! (+ a0-1 4) a1-1) + ) + (let ((a1-2 #x5000000)) + (s.w! (+ a0-1 8) a1-2) + ) + (let ((a1-3 #x30000000)) + (s.w! (+ a0-1 12) a1-3) + ) + (s.w! (+ a0-1 16) 0) + (s.w! (+ a0-1 20) 0) + (s.w! (+ a0-1 24) 0) + (s.w! (+ a0-1 28) 0) + (let ((a1-4 #x3000000)) + (s.w! (+ a0-1 32) a1-4) + ) + (let ((a1-5 #x2000000)) + (s.w! (+ a0-1 36) a1-5) + ) + (let ((a1-6 #x1000404)) + (s.w! (+ a0-1 40) a1-6) + ) + (s.w! (+ a0-1 44) 0) + (set! (-> v1-3 base) (&+ a0-1 48)) + ) + ) + ) + ) + (none) + ) + +;; definition for function draw-inline-array-tfrag-scissor +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function stats-tfrag-asm +;; ERROR: function was not converted to expressions. Cannot decompile. + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/background/tie/generic-tie-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/background/tie/generic-tie-h_REF.gc new file mode 100644 index 0000000000..b4ea1340ca --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/background/tie/generic-tie-h_REF.gc @@ -0,0 +1,657 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type generic-tie-instance +(deftype generic-tie-instance (structure) + ((matrix-tag dma-packet :inline) + (matrix-data vector 6 :inline) + (index-tag dma-packet :inline) + (indices uint8 224) + (end-tag dma-packet :inline) + ) + ) + +;; definition for method 3 of type generic-tie-instance +(defmethod inspect ((this generic-tie-instance)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-tie-instance) + (format #t "~1Tmatrix-tag: #~%" (-> this matrix-tag)) + (format #t "~1Tmatrix-data[6] @ #x~X~%" (-> this matrix-data)) + (format #t "~1Tindex-tag: #~%" (-> this index-tag)) + (format #t "~1Tindices[224] @ #x~X~%" (-> this indices)) + (format #t "~1Tend-tag: #~%" (-> this end-tag)) + (label cfg-4) + this + ) + +;; definition of type generic-tie-input +(deftype generic-tie-input (structure) + ((palette-tag dma-packet :inline) + (palette rgba 128) + (model-tag dma-packet :inline) + (model vector 146 :inline) + (matrix-tag dma-packet :inline) + (matrix-data vector 6 :inline) + (index-tag dma-packet :inline) + (indices uint8 224) + (end-tag dma-packet :inline) + ) + ) + +;; definition for method 3 of type generic-tie-input +(defmethod inspect ((this generic-tie-input)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-tie-input) + (format #t "~1Tpalette-tag: #~%" (-> this palette-tag)) + (format #t "~1Tpalette[128] @ #x~X~%" (-> this palette)) + (format #t "~1Tmodel-tag: #~%" (-> this model-tag)) + (format #t "~1Tmodel[146] @ #x~X~%" (-> this model)) + (format #t "~1Tmatrix-tag: #~%" (-> this matrix-tag)) + (format #t "~1Tmatrix-data[6] @ #x~X~%" (-> this matrix-data)) + (format #t "~1Tindex-tag: #~%" (-> this index-tag)) + (format #t "~1Tindices[224] @ #x~X~%" (-> this indices)) + (format #t "~1Tend-tag: #~%" (-> this end-tag)) + (label cfg-4) + this + ) + +;; definition of type generic-tie-run-control +(deftype generic-tie-run-control (structure) + ((skip-bp2 uint8) + (skip-ips uint8) + (gifbuf-skip uint8) + (strips uint8) + (target-bp1 uint8) + (target-bp2 uint8) + (target-ip1 uint8) + (target-ip2 uint8) + (target-bps uint8) + (target-ips uint8) + (is-generic uint8) + (reserved uint8) + ) + ) + +;; definition for method 3 of type generic-tie-run-control +(defmethod inspect ((this generic-tie-run-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-tie-run-control) + (format #t "~1Tskip-bp2: ~D~%" (-> this skip-bp2)) + (format #t "~1Tskip-ips: ~D~%" (-> this skip-ips)) + (format #t "~1Tgifbuf-skip: ~D~%" (-> this gifbuf-skip)) + (format #t "~1Tstrips: ~D~%" (-> this strips)) + (format #t "~1Ttarget-bp1: ~D~%" (-> this target-bp1)) + (format #t "~1Ttarget-bp2: ~D~%" (-> this target-bp2)) + (format #t "~1Ttarget-ip1: ~D~%" (-> this target-ip1)) + (format #t "~1Ttarget-ip2: ~D~%" (-> this target-ip2)) + (format #t "~1Ttarget-bps: ~D~%" (-> this target-bps)) + (format #t "~1Ttarget-ips: ~D~%" (-> this target-ips)) + (format #t "~1Tis-generic: ~D~%" (-> this is-generic)) + (format #t "~1Treserved: ~D~%" (-> this reserved)) + (label cfg-4) + this + ) + +;; definition of type generic-tie-base-point +(deftype generic-tie-base-point (structure) + ((data uint16 8) + (quad uint128 :overlay-at (-> data 0)) + (x int16 :overlay-at (-> data 0)) + (y int16 :overlay-at (-> data 1)) + (z int16 :overlay-at (-> data 2)) + (d0 int16 :overlay-at (-> data 3)) + (vtx uint64 :overlay-at (-> data 0)) + (u int16 :overlay-at (-> data 4)) + (v int16 :overlay-at (-> data 5)) + (tex uint32 :overlay-at (-> data 4)) + (w int16 :overlay-at (-> data 6)) + (d1 int16 :overlay-at (-> data 7)) + ) + ) + +;; definition for method 3 of type generic-tie-base-point +;; INFO: Used lq/sq +(defmethod inspect ((this generic-tie-base-point)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-tie-base-point) + (format #t "~1Tdata[8] @ #x~X~%" (-> this data)) + (format #t "~1Tquad: ~D~%" (-> this quad)) + (format #t "~1Tx: ~D~%" (-> this x)) + (format #t "~1Ty: ~D~%" (-> this y)) + (format #t "~1Tz: ~D~%" (-> this z)) + (format #t "~1Td0: ~D~%" (-> this d0)) + (format #t "~1Tvtx: ~D~%" (-> this vtx)) + (format #t "~1Tu: ~D~%" (-> this u)) + (format #t "~1Tv: ~D~%" (-> this v)) + (format #t "~1Ttex: ~D~%" (-> this tex)) + (format #t "~1Tw: ~D~%" (-> this w)) + (format #t "~1Td1: ~D~%" (-> this d1)) + (label cfg-4) + this + ) + +;; definition of type generic-tie-bps +(deftype generic-tie-bps (structure) + ((bp generic-tie-base-point 4 :inline) + ) + ) + +;; definition for method 3 of type generic-tie-bps +(defmethod inspect ((this generic-tie-bps)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-tie-bps) + (format #t "~1Tbp[4] @ #x~X~%" (-> this bp)) + (label cfg-4) + this + ) + +;; definition of type generic-tie-interp-point +(deftype generic-tie-interp-point (structure) + ((data uint16 12) + (x int16 :overlay-at (-> data 0)) + (y int16 :overlay-at (-> data 1)) + (z int16 :overlay-at (-> data 2)) + (d0 int16 :overlay-at (-> data 3)) + (vtx0 uint64 :overlay-at (-> data 0)) + (dx int16 :overlay-at (-> data 4)) + (dy int16 :overlay-at (-> data 5)) + (dz int16 :overlay-at (-> data 6)) + (unused int16 :overlay-at (-> data 7)) + (vtx1 uint64 :overlay-at (-> data 4)) + (u int16 :overlay-at (-> data 8)) + (v int16 :overlay-at (-> data 9)) + (tex uint32 :overlay-at (-> data 8)) + (w int16 :overlay-at (-> data 10)) + (d1 int16 :overlay-at (-> data 11)) + ) + :pack-me + ) + +;; definition for method 3 of type generic-tie-interp-point +;; INFO: Used lq/sq +;; ERROR: failed type prop at 19: Could not figure out load: (set! a2 (l.q gp)) +(defmethod inspect ((a0-0 generic-tie-interp-point)) + (local-vars + (v0-0 object) + (v0-1 object) + (v0-2 none) + (v0-3 none) + (v0-4 none) + (v0-5 none) + (v0-6 none) + (v0-7 none) + (v0-8 none) + (v0-9 none) + (v0-10 none) + (v0-11 none) + (v0-12 none) + (v0-13 none) + (v0-14 none) + (v0-15 none) + (v0-16 none) + (v0-17 none) + (v0-18 generic-tie-interp-point) + (a0-1 symbol) + (a0-2 symbol) + (a0-3 symbol) + (a0-4 none) + (a0-5 none) + (a0-6 none) + (a0-7 none) + (a0-8 none) + (a0-9 none) + (a0-10 none) + (a0-11 none) + (a0-12 none) + (a0-13 none) + (a0-14 none) + (a0-15 none) + (a0-16 none) + (a0-17 none) + (a0-18 none) + (a1-0 string) + (a1-1 string) + (a1-2 string) + (a1-3 none) + (a1-4 none) + (a1-5 none) + (a1-6 none) + (a1-7 none) + (a1-8 none) + (a1-9 none) + (a1-10 none) + (a1-11 none) + (a1-12 none) + (a1-13 none) + (a1-14 none) + (a1-15 none) + (a1-16 none) + (a1-17 none) + (a2-0 generic-tie-interp-point) + (a2-1 (pointer uint16)) + (a2-2 none) + (a2-3 none) + (a2-4 none) + (a2-5 none) + (a2-6 none) + (a2-7 none) + (a2-8 none) + (a2-9 none) + (a2-10 none) + (a2-11 none) + (a2-12 none) + (a2-13 none) + (a2-14 none) + (a2-15 none) + (a2-16 none) + (a2-17 none) + (a3-0 symbol) + (t9-0 (function _varargs_ object)) + (t9-1 (function _varargs_ object)) + (t9-2 (function _varargs_ object)) + (t9-3 none) + (t9-4 none) + (t9-5 none) + (t9-6 none) + (t9-7 none) + (t9-8 none) + (t9-9 none) + (t9-10 none) + (t9-11 none) + (t9-12 none) + (t9-13 none) + (t9-14 none) + (t9-15 none) + (t9-16 none) + (t9-17 none) + ) + (if (begin (not a0-0)) + (begin (set! a0-0 a0-0) (goto cfg-4)) + ) + (set! t9-0 format) + (set! a0-1 #t) + (set! a1-0 L144) + (set! a2-0 a0-0) + (set! a3-0 'generic-tie-interp-point) + (call! a0-1 a1-0 a2-0 a3-0) + (set! t9-1 format) + (set! a0-2 #t) + (set! a1-1 L109) + (set! a2-1 (-> a0-0 data)) + (call! a0-2 a1-1 a2-1) + (set! t9-2 format) + (set! a0-3 #t) + (set! a1-2 L121) + (set! a2-2 (the-as none (l.q a0-0))) + (call!) + (set! t9-3 (the-as none format)) + (set! a0-4 (the-as none #t)) + (set! a1-3 (the-as none L120)) + (set! a2-3 (the-as none (-> a0-0 x))) + (call!) + (set! t9-4 (the-as none format)) + (set! a0-5 (the-as none #t)) + (set! a1-4 (the-as none L119)) + (set! a2-4 (the-as none (-> a0-0 y))) + (call!) + (set! t9-5 (the-as none format)) + (set! a0-6 (the-as none #t)) + (set! a1-5 (the-as none L118)) + (set! a2-5 (the-as none (-> a0-0 z))) + (call!) + (set! t9-6 (the-as none format)) + (set! a0-7 (the-as none #t)) + (set! a1-6 (the-as none L117)) + (set! a2-6 (the-as none (-> a0-0 d0))) + (call!) + (set! t9-7 (the-as none format)) + (set! a0-8 (the-as none #t)) + (set! a1-7 (the-as none L108)) + (set! a2-7 (the-as none (-> a0-0 vtx0))) + (call!) + (set! t9-8 (the-as none format)) + (set! a0-9 (the-as none #t)) + (set! a1-8 (the-as none L107)) + (set! a2-8 (the-as none (-> a0-0 dx))) + (call!) + (set! t9-9 (the-as none format)) + (set! a0-10 (the-as none #t)) + (set! a1-9 (the-as none L106)) + (set! a2-9 (the-as none (-> a0-0 dy))) + (call!) + (set! t9-10 (the-as none format)) + (set! a0-11 (the-as none #t)) + (set! a1-10 (the-as none L105)) + (set! a2-10 (the-as none (-> a0-0 dz))) + (call!) + (set! t9-11 (the-as none format)) + (set! a0-12 (the-as none #t)) + (set! a1-11 (the-as none L104)) + (set! a2-11 (the-as none (-> a0-0 unused))) + (call!) + (set! t9-12 (the-as none format)) + (set! a0-13 (the-as none #t)) + (set! a1-12 (the-as none L103)) + (set! a2-12 (the-as none (-> a0-0 vtx1))) + (call!) + (set! t9-13 (the-as none format)) + (set! a0-14 (the-as none #t)) + (set! a1-13 (the-as none L115)) + (set! a2-13 (the-as none (-> a0-0 u))) + (call!) + (set! t9-14 (the-as none format)) + (set! a0-15 (the-as none #t)) + (set! a1-14 (the-as none L114)) + (set! a2-14 (the-as none (-> a0-0 v))) + (call!) + (set! t9-15 (the-as none format)) + (set! a0-16 (the-as none #t)) + (set! a1-15 (the-as none L113)) + (set! a2-15 (the-as none (-> a0-0 tex))) + (call!) + (set! t9-16 (the-as none format)) + (set! a0-17 (the-as none #t)) + (set! a1-16 (the-as none L112)) + (set! a2-16 (the-as none (-> a0-0 w))) + (call!) + (set! t9-17 (the-as none format)) + (set! a0-18 (the-as none #t)) + (set! a1-17 (the-as none L111)) + (set! a2-17 (the-as none (-> a0-0 d1))) + (call!) + (label cfg-4) + (set! v0-18 a0-0) + (ret-value v0-18) + ) + +;; definition of type generic-tie-ips +(deftype generic-tie-ips (structure) + ((ip generic-tie-interp-point 2 :inline) + ) + ) + +;; definition for method 3 of type generic-tie-ips +(defmethod inspect ((this generic-tie-ips)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-tie-ips) + (format #t "~1Tip[2] @ #x~X~%" (-> this ip)) + (label cfg-4) + this + ) + +;; definition of type generic-tie-header +(deftype generic-tie-header (structure) + ((effect uint8) + (interp-table-size uint8) + (num-bps uint8) + (num-ips uint8) + (tint-color uint32) + (index-table-offset uint16) + (kick-table-offset uint16) + (normal-table-offset uint16) + (interp-table-offset uint16) + (gsf-header gsf-header :inline) + ) + ) + +;; definition for method 3 of type generic-tie-header +(defmethod inspect ((this generic-tie-header)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-tie-header) + (format #t "~1Teffect: ~D~%" (-> this effect)) + (format #t "~1Tinterp-table-size: ~D~%" (-> this interp-table-size)) + (format #t "~1Tnum-bps: ~D~%" (-> this num-bps)) + (format #t "~1Tnum-ips: ~D~%" (-> this num-ips)) + (format #t "~1Ttint-color: ~D~%" (-> this tint-color)) + (format #t "~1Tindex-table-offset: ~D~%" (-> this index-table-offset)) + (format #t "~1Tkick-table-offset: ~D~%" (-> this kick-table-offset)) + (format #t "~1Tnormal-table-offset: ~D~%" (-> this normal-table-offset)) + (format #t "~1Tinterp-table-offset: ~D~%" (-> this interp-table-offset)) + (format #t "~1Tgsf-header: #~%" (-> this gsf-header)) + (label cfg-4) + this + ) + +;; definition of type generic-tie-matrix +(deftype generic-tie-matrix (structure) + ((matrix matrix :inline) + (morph vector :inline) + (fog qword :inline) + ) + ) + +;; definition for method 3 of type generic-tie-matrix +(defmethod inspect ((this generic-tie-matrix)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-tie-matrix) + (format #t "~1Tmatrix: #~%" (-> this matrix)) + (format #t "~1Tmorph: #~%" (-> this morph)) + (format #t "~1Tfog: #~%" (-> this fog)) + (label cfg-4) + this + ) + +;; definition of type generic-tie-normal +(deftype generic-tie-normal (structure) + ((x int8) + (y int8) + (z int8) + (dummy int8) + ) + ) + +;; definition for method 3 of type generic-tie-normal +(defmethod inspect ((this generic-tie-normal)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-tie-normal) + (format #t "~1Tx: ~D~%" (-> this x)) + (format #t "~1Ty: ~D~%" (-> this y)) + (format #t "~1Tz: ~D~%" (-> this z)) + (format #t "~1Tdummy: ~D~%" (-> this dummy)) + (label cfg-4) + this + ) + +;; definition of type generic-tie-control +(deftype generic-tie-control (structure) + ((ptr-palette uint32) + (ptr-shaders uint32) + (ptr-runctrl generic-tie-run-control) + (ptr-verts uint32) + (ptr-generic generic-tie-header) + (ptr-dps uint32) + (ptr-kicks uint32) + (ptr-normals uint32) + (ptr-interp uint32) + (ptr-mtxs generic-tie-matrix) + (ptr-cinds uint32) + (next-instance uint32) + (next-model uint32) + (next-is-model uint32) + (tie-type uint32) + ) + ) + +;; definition for method 3 of type generic-tie-control +(defmethod inspect ((this generic-tie-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-tie-control) + (format #t "~1Tptr-palette: #x~X~%" (-> this ptr-palette)) + (format #t "~1Tptr-shaders: #x~X~%" (-> this ptr-shaders)) + (format #t "~1Tptr-runctrl: #~%" (-> this ptr-runctrl)) + (format #t "~1Tptr-verts: #x~X~%" (-> this ptr-verts)) + (format #t "~1Tptr-generic: #~%" (-> this ptr-generic)) + (format #t "~1Tptr-dps: #x~X~%" (-> this ptr-dps)) + (format #t "~1Tptr-kicks: #x~X~%" (-> this ptr-kicks)) + (format #t "~1Tptr-normals: #x~X~%" (-> this ptr-normals)) + (format #t "~1Tptr-interp: #x~X~%" (-> this ptr-interp)) + (format #t "~1Tptr-mtxs: #~%" (-> this ptr-mtxs)) + (format #t "~1Tptr-cinds: #x~X~%" (-> this ptr-cinds)) + (format #t "~1Tnext-instance: #x~X~%" (-> this next-instance)) + (format #t "~1Tnext-model: #x~X~%" (-> this next-model)) + (format #t "~1Tnext-is-model: ~D~%" (-> this next-is-model)) + (format #t "~1Ttie-type: ~D~%" (-> this tie-type)) + (label cfg-4) + this + ) + +;; definition of type generic-tie-stats +(deftype generic-tie-stats (structure) + ((num-bps uint32) + (num-ips uint32) + (num-dps uint32) + (num-shaders uint32) + (num-models uint32) + (num-instances uint32) + (num-waits uint32) + (num-qwc uint32) + (max-qwc uint32) + ) + ) + +;; definition for method 3 of type generic-tie-stats +(defmethod inspect ((this generic-tie-stats)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-tie-stats) + (format #t "~1Tnum-bps: ~D~%" (-> this num-bps)) + (format #t "~1Tnum-ips: ~D~%" (-> this num-ips)) + (format #t "~1Tnum-dps: ~D~%" (-> this num-dps)) + (format #t "~1Tnum-shaders: ~D~%" (-> this num-shaders)) + (format #t "~1Tnum-models: ~D~%" (-> this num-models)) + (format #t "~1Tnum-instances: ~D~%" (-> this num-instances)) + (format #t "~1Tnum-waits: ~D~%" (-> this num-waits)) + (format #t "~1Tnum-qwc: ~D~%" (-> this num-qwc)) + (format #t "~1Tmax-qwc: ~D~%" (-> this max-qwc)) + (label cfg-4) + this + ) + +;; definition of type generic-tie-calls +(deftype generic-tie-calls (structure) + ((generic-prepare-dma-double basic) + (generic-envmap-dproc basic) + (generic-interp-dproc basic) + (generic-no-light-dproc basic) + ) + :pack-me + ) + +;; definition for method 3 of type generic-tie-calls +(defmethod inspect ((this generic-tie-calls)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-tie-calls) + (format #t "~1Tgeneric-prepare-dma-double: ~A~%" (-> this generic-prepare-dma-double)) + (format #t "~1Tgeneric-envmap-dproc: ~A~%" (-> this generic-envmap-dproc)) + (format #t "~1Tgeneric-interp-dproc: ~A~%" (-> this generic-interp-dproc)) + (format #t "~1Tgeneric-no-light-dproc: ~A~%" (-> this generic-no-light-dproc)) + (label cfg-4) + this + ) + +;; definition of type generic-tie-shadow +(deftype generic-tie-shadow (structure) + ((out-buf gsf-buffer) + (cur-buf uint32) + (tie-type int32) + (ptr-inst uint32) + (ptr-buf uint32) + (inst-xor int32) + (end-of-chain uint32) + (write-limit uint32) + (calls generic-tie-calls :inline) + ) + :pack-me + ) + +;; definition for method 3 of type generic-tie-shadow +(defmethod inspect ((this generic-tie-shadow)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-tie-shadow) + (format #t "~1Tout-buf: #~%" (-> this out-buf)) + (format #t "~1Tcur-buf: #x~X~%" (-> this cur-buf)) + (format #t "~1Ttie-type: ~D~%" (-> this tie-type)) + (format #t "~1Tptr-inst: #x~X~%" (-> this ptr-inst)) + (format #t "~1Tptr-buf: #x~X~%" (-> this ptr-buf)) + (format #t "~1Tinst-xor: ~D~%" (-> this inst-xor)) + (format #t "~1Tend-of-chain: ~D~%" (-> this end-of-chain)) + (format #t "~1Twrite-limit: ~D~%" (-> this write-limit)) + (format #t "~1Tcalls: #~%" (-> this calls)) + (label cfg-4) + this + ) + +;; definition of type generic-tie-work +(deftype generic-tie-work (structure) + ((control generic-tie-control :inline) + (interp-job generic-interp-job :inline) + (shadow generic-tie-shadow :inline) + (input-a generic-tie-input :inline) + (input-b generic-tie-input :inline) + (inst-buf generic-tie-instance :inline) + (palette-buf rgba 128) + ) + ) + +;; definition for method 3 of type generic-tie-work +(defmethod inspect ((this generic-tie-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'generic-tie-work) + (format #t "~1Tcontrol: #~%" (-> this control)) + (format #t "~1Tinterp-job: #~%" (-> this interp-job)) + (format #t "~1Tshadow: #~%" (-> this shadow)) + (format #t "~1Tinput-a: #~%" (-> this input-a)) + (format #t "~1Tinput-b: #~%" (-> this input-b)) + (format #t "~1Tinst-buf: #~%" (-> this inst-buf)) + (format #t "~1Tpalette-buf[128] @ #x~X~%" (-> this palette-buf)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/background/tie/tie-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/background/tie/tie-h_REF.gc new file mode 100644 index 0000000000..424fef0dbb --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/background/tie/tie-h_REF.gc @@ -0,0 +1,669 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type tie-fragment-debug +(deftype tie-fragment-debug (structure) + "Optional debug information about a tie-fragment." + ((num-tris uint16) + (num-dverts uint16) + (debug-lines (array vector-array)) + ) + ) + +;; definition for method 3 of type tie-fragment-debug +(defmethod inspect ((this tie-fragment-debug)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'tie-fragment-debug) + (format #t "~1Tnum-tris: ~D~%" (-> this num-tris)) + (format #t "~1Tnum-dverts: ~D~%" (-> this num-dverts)) + (format #t "~1Tdebug-lines: ~A~%" (-> this debug-lines)) + (label cfg-4) + this + ) + +;; definition of type tie-fragment +(deftype tie-fragment (drawable) + "A mesh fragment of a TIE. This is a chunk of mesh that is rendered by VU1, stored as DMA chains." + ((gif-ref (inline-array adgif-shader) :overlay-at id) + (point-ref uint32 :offset 8) + (color-index uint16 :offset 12) + (base-colors uint8 :offset 14) + (tex-count uint16 :offset 32) + (gif-count uint16 :offset 34) + (vertex-count uint16 :offset 36) + (color-count uint16) + (dp-ref uint32) + (dp-qwc uint32) + (generic-ref uint32) + (generic-count uint16) + (normal-count uint16) + (normal-ref uint32) + (debug tie-fragment-debug) + ) + ) + +;; definition for method 3 of type tie-fragment +(defmethod inspect ((this tie-fragment)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere)) + (format #t "~1Tgif-ref: #x~X~%" (-> this gif-ref)) + (format #t "~1Tpoint-ref: #x~X~%" (-> this point-ref)) + (format #t "~1Tcolor-index: ~D~%" (-> this color-index)) + (format #t "~1Tbase-colors: ~D~%" (-> this base-colors)) + (format #t "~1Ttex-count: ~D~%" (-> this tex-count)) + (format #t "~1Tgif-count: ~D~%" (-> this gif-count)) + (format #t "~1Tvertex-count: ~D~%" (-> this vertex-count)) + (format #t "~1Tcolor-count: ~D~%" (-> this color-count)) + (format #t "~1Tdp-ref: #x~X~%" (-> this dp-ref)) + (format #t "~1Tdp-qwc: ~D~%" (-> this dp-qwc)) + (format #t "~1Tgeneric-ref: #x~X~%" (-> this generic-ref)) + (format #t "~1Tgeneric-count: ~D~%" (-> this generic-count)) + (format #t "~1Tnormal-count: ~D~%" (-> this normal-count)) + (format #t "~1Tnormal-ref: #x~X~%" (-> this normal-ref)) + (format #t "~1Tdebug: #~%" (-> this debug)) + (label cfg-4) + this + ) + +;; definition of type instance-tie +(deftype instance-tie (instance) + "A TIE model instance." + ((color-indices uint32 :offset 8) + (bucket-ptr prototype-bucket-tie :offset 12) + (max-scale uint16 :overlay-at (-> origin data 3)) + (rmin-scale uint16 :overlay-at (-> origin data 11)) + ) + ) + +;; definition for method 3 of type instance-tie +(defmethod inspect ((this instance-tie)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere)) + (format #t "~1Tbucket-index: ~D~%" (-> this bucket-index)) + (format #t "~1Torigin: #~%" (-> this origin)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Twind-index: ~D~%" (-> this wind-index)) + (format #t "~1Tcolor-indices: #x~X~%" (-> this color-indices)) + (format #t "~1Tbucket-ptr: ~A~%" (-> this bucket-ptr)) + (format #t "~1Tmax-scale: ~D~%" (-> this max-scale)) + (format #t "~1Trmin-scale: ~D~%" (-> this rmin-scale)) + (label cfg-4) + this + ) + +;; definition of type drawable-inline-array-instance-tie +(deftype drawable-inline-array-instance-tie (drawable-inline-array) + "Array of tie instances stored in the level." + ((data instance-tie 1 :inline) + (pad uint32) + ) + ) + +;; definition of type drawable-tree-instance-tie +(deftype drawable-tree-instance-tie (drawable-tree) + "Top-level drawable-tree for TIEs" + ((prototypes proxy-prototype-array-tie :offset 8) + ) + ) + +;; definition for method 3 of type drawable-tree-instance-tie +(defmethod inspect ((this drawable-tree-instance-tie)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere)) + (format #t "~1Tlength: ~D~%" (-> this length)) + (format #t "~1Tdata[0] @ #x~X~%" (-> this data)) + (dotimes (s5-0 (-> this length)) + (format #t "~T [~D]~1Tdata: ~A~%" s5-0 (-> this data s5-0)) + ) + (format #t "~1Tprototypes: ~A~%" (-> this prototypes)) + (label cfg-7) + this + ) + +;; definition of type prototype-tie +(deftype prototype-tie (drawable-inline-array) + "Prototype for a TIE: just an array of fragments." + ((data tie-fragment 1 :inline) + (pad uint32) + ) + ) + +;; definition of type tie-matrix +(deftype tie-matrix (structure) + "Per-instance matrix for TIE VU1 rendering." + ((mat matrix :inline) + (morph qword :inline) + (fog qword :inline) + (envmap-flag uint32 :overlay-at (-> fog data 0)) + (guard-flag uint32 :overlay-at (-> fog data 1)) + (vertex-alpha float :overlay-at (-> fog data 2)) + (fog-value float :overlay-at (-> fog data 3)) + (fixed-alpha float :overlay-at (-> morph data 1)) + ) + ) + +;; definition for method 3 of type tie-matrix +(defmethod inspect ((this tie-matrix)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'tie-matrix) + (format #t "~1Tmat: #~%" (-> this mat)) + (format #t "~1Tmorph: #~%" (-> this morph)) + (format #t "~1Tfog: #~%" (-> this fog)) + (format #t "~1Tenvmap-flag: ~D~%" (-> this envmap-flag)) + (format #t "~1Tguard-flag: ~D~%" (-> this guard-flag)) + (format #t "~1Tvertex-alpha: ~f~%" (-> this vertex-alpha)) + (format #t "~1Tfog-value: ~f~%" (-> this fog-value)) + (format #t "~1Tfixed-alpha: ~f~%" (-> this fixed-alpha)) + (label cfg-4) + this + ) + +;; definition of type instance-tie-work +(deftype instance-tie-work (structure) + "workspace for TIE instance DMA generation" + ((wind-const vector :inline) + (hmge-d vector :inline) + (hvdf-offset vector :inline) + (wind-force vector :inline) + (constant vector :inline) + (far-morph vector :inline) + (dist-test vector :inline) + (min-dist vector :inline) + (guard-plane plane 4 :inline) + (upload-color-0 dma-packet :inline) + (upload-color-1 dma-packet :inline) + (upload-color-2 dma-packet :inline) + (upload-color-ret dma-packet :inline) + (upload-color-temp dma-packet :inline) + (generic-color-0 dma-packet :inline) + (generic-color-1 dma-packet :inline) + (generic-color-end dma-packet :inline) + (envmap-color-0 dma-packet :inline) + (envmap-color-1 dma-packet :inline) + (tie-scissor-perspective-matrix matrix :inline) + (tod-env-color vector :inline) + (morph-temp vector :inline) + (fog-temp vector :inline) + (fade-temp float) + (wind-vectors uint32) + (test-id uint32) + (test-id2 uint32) + (dma-buffer basic) + (to-spr uint32) + (from-spr uint32) + (wind-work uint32) + (cur-vis-bits uint32) + (end-vis-bits uint32) + (refl-fade-fac float) + (refl-fade-end float) + (flags uint32) + (vanish-flag uint32) + (translucent-flag uint32) + (wait-from-spr uint32) + (wait-to-spr uint32) + (use-etie symbol) + (buffer-start uint32) + (buffer-end uint32) + (tfrag-dists uint32) + (alpha-dists uint32) + (water-dists uint32) + ) + ) + +;; definition for method 3 of type instance-tie-work +(defmethod inspect ((this instance-tie-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'instance-tie-work) + (format #t "~1Twind-const: #~%" (-> this wind-const)) + (format #t "~1Thmge-d: #~%" (-> this hmge-d)) + (format #t "~1Thvdf-offset: #~%" (-> this hvdf-offset)) + (format #t "~1Twind-force: #~%" (-> this wind-force)) + (format #t "~1Tconstant: #~%" (-> this constant)) + (format #t "~1Tfar-morph: #~%" (-> this far-morph)) + (format #t "~1Tdist-test: #~%" (-> this dist-test)) + (format #t "~1Tmin-dist: #~%" (-> this min-dist)) + (format #t "~1Tguard-plane[4] @ #x~X~%" (-> this guard-plane)) + (format #t "~1Tupload-color-0: #~%" (-> this upload-color-0)) + (format #t "~1Tupload-color-1: #~%" (-> this upload-color-1)) + (format #t "~1Tupload-color-2: #~%" (-> this upload-color-2)) + (format #t "~1Tupload-color-ret: #~%" (-> this upload-color-ret)) + (format #t "~1Tupload-color-temp: #~%" (-> this upload-color-temp)) + (format #t "~1Tgeneric-color-0: #~%" (-> this generic-color-0)) + (format #t "~1Tgeneric-color-1: #~%" (-> this generic-color-1)) + (format #t "~1Tgeneric-color-end: #~%" (-> this generic-color-end)) + (format #t "~1Tenvmap-color-0: #~%" (-> this envmap-color-0)) + (format #t "~1Tenvmap-color-1: #~%" (-> this envmap-color-1)) + (format #t "~1Ttie-scissor-perspective-matrix: #~%" (-> this tie-scissor-perspective-matrix)) + (format #t "~1Ttod-env-color: #~%" (-> this tod-env-color)) + (format #t "~1Tmorph-temp: #~%" (-> this morph-temp)) + (format #t "~1Tfog-temp: #~%" (-> this fog-temp)) + (format #t "~1Tfade-temp: ~f~%" (-> this fade-temp)) + (format #t "~1Twind-vectors: #x~X~%" (-> this wind-vectors)) + (format #t "~1Ttest-id: ~D~%" (-> this test-id)) + (format #t "~1Ttest-id2: ~D~%" (-> this test-id2)) + (format #t "~1Tdma-buffer: ~A~%" (-> this dma-buffer)) + (format #t "~1Tto-spr: ~D~%" (-> this to-spr)) + (format #t "~1Tfrom-spr: ~D~%" (-> this from-spr)) + (format #t "~1Twind-work: ~D~%" (-> this wind-work)) + (format #t "~1Tcur-vis-bits: ~D~%" (-> this cur-vis-bits)) + (format #t "~1Tend-vis-bits: ~D~%" (-> this end-vis-bits)) + (format #t "~1Trefl-fade-fac: ~f~%" (-> this refl-fade-fac)) + (format #t "~1Trefl-fade-end: ~f~%" (-> this refl-fade-end)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tvanish-flag: ~D~%" (-> this vanish-flag)) + (format #t "~1Ttranslucent-flag: ~D~%" (-> this translucent-flag)) + (format #t "~1Twait-from-spr: ~D~%" (-> this wait-from-spr)) + (format #t "~1Twait-to-spr: ~D~%" (-> this wait-to-spr)) + (format #t "~1Tuse-etie: ~A~%" (-> this use-etie)) + (format #t "~1Tbuffer-start: #x~X~%" (-> this buffer-start)) + (format #t "~1Tbuffer-end: #x~X~%" (-> this buffer-end)) + (format #t "~1Ttfrag-dists: #x~X~%" (-> this tfrag-dists)) + (format #t "~1Talpha-dists: #x~X~%" (-> this alpha-dists)) + (format #t "~1Twater-dists: #x~X~%" (-> this water-dists)) + (label cfg-4) + this + ) + +;; definition of type instance-tie-dma +(deftype instance-tie-dma (structure) + "Scratchpad memory layout for TIE instance DMA generation." + ((banka instance-tie 32 :inline) + (bankb instance-tie 32 :inline) + (outa uint128 256) + (outb uint128 256) + (work instance-tie-work :dynamic) + ) + ) + +;; definition for method 3 of type instance-tie-dma +(defmethod inspect ((this instance-tie-dma)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'instance-tie-dma) + (format #t "~1Tbanka[32] @ #x~X~%" (-> this banka)) + (format #t "~1Tbankb[32] @ #x~X~%" (-> this bankb)) + (format #t "~1Touta[256] @ #x~X~%" (-> this outa)) + (format #t "~1Toutb[256] @ #x~X~%" (-> this outb)) + (format #t "~1Twork: #~%" (-> this work 0)) + (label cfg-4) + this + ) + +;; definition of type prototype-tie-work +(deftype prototype-tie-work (structure) + "workspace for TIE protype DMA generation." + ((upload-flushe dma-packet :inline) + (upload-palette dma-packet :inline) + (upload-model-0 dma-packet :inline) + (upload-model-1 dma-packet :inline) + (upload-model-2 dma-packet :inline) + (upload-model-3 dma-packet :inline) + (upload-model-near-0 dma-packet :inline) + (upload-model-near-1 dma-packet :inline) + (upload-model-near-2 dma-packet :inline) + (upload-model-near-3 dma-packet :inline) + (upload-model-near-4 dma-packet :inline) + (envmap-palette dma-packet :inline) + (envmap-shader dma-packet :inline) + (upload-envmap-0 dma-packet :inline) + (upload-envmap-1 dma-packet :inline) + (upload-envmap-2 dma-packet :inline) + (upload-envmap-3 dma-packet :inline) + (upload-envmap-4 dma-packet :inline) + (upload-envmap-scissor-4 dma-packet :inline) + (generic-palette dma-packet :inline) + (generic-model-0 dma-packet :inline) + (generic-model-1 dma-packet :inline) + (generic-model-2 dma-packet :inline) + (model-next dma-packet :inline) + (clamp uint64) + (prototype-array basic) + (wait-from-spr uint32) + (wait-to-spr uint32) + (mood mood-context) + (last uint32 16 :offset 416) + (next uint32 16) + (count uint16 16) + (tie-last uint32 :overlay-at (-> last 0)) + (tie-next uint32 :overlay-at (-> next 0)) + (tie-count uint16 :overlay-at (-> count 0)) + (trans-last uint32 :overlay-at (-> last 1)) + (trans-next uint32 :overlay-at (-> next 1)) + (trans-count uint16 :overlay-at (-> count 1)) + (water-last uint32 :overlay-at (-> last 2)) + (water-next uint32 :overlay-at (-> next 2)) + (water-count uint16 :overlay-at (-> count 2)) + (scissor-last uint32 :overlay-at (-> last 3)) + (scissor-next uint32 :overlay-at (-> next 3)) + (scissor-count uint16 :overlay-at (-> count 3)) + (scissor-trans-last uint32 :overlay-at (-> last 4)) + (scissor-trans-next uint32 :overlay-at (-> next 4)) + (scissor-trans-count uint16 :overlay-at (-> count 4)) + (scissor-water-last uint32 :overlay-at (-> last 5)) + (scissor-water-next uint32 :overlay-at (-> next 5)) + (scissor-water-count uint16 :overlay-at (-> count 5)) + (envmap-last uint32 :overlay-at (-> last 6)) + (envmap-next uint32 :overlay-at (-> next 6)) + (envmap-count uint16 :overlay-at (-> count 6)) + (envmap-trans-last uint32 :overlay-at (-> last 7)) + (envmap-trans-next uint32 :overlay-at (-> next 7)) + (envmap-trans-count uint16 :overlay-at (-> count 7)) + (envmap-water-last uint32 :overlay-at (-> last 8)) + (envmap-water-next uint32 :overlay-at (-> next 8)) + (envmap-water-count uint16 :overlay-at (-> count 8)) + (envmap-scissor-last uint32 :overlay-at (-> last 9)) + (envmap-scissor-next uint32 :overlay-at (-> next 9)) + (envmap-scissor-count uint16 :overlay-at (-> count 9)) + (envmap-scissor-trans-last uint32 :overlay-at (-> last 10)) + (envmap-scissor-trans-next uint32 :overlay-at (-> next 10)) + (envmap-scissor-trans-count uint16 :overlay-at (-> count 10)) + (envmap-scissor-water-last uint32 :overlay-at (-> last 11)) + (envmap-scissor-water-next uint32 :overlay-at (-> next 11)) + (envmap-scissor-water-count uint16 :overlay-at (-> count 11)) + (generic-last uint32 :overlay-at (-> last 12)) + (generic-next uint32 :overlay-at (-> next 12)) + (generic-count uint16 :overlay-at (-> count 12)) + (generic-trans-last uint32 :overlay-at (-> last 13)) + (generic-trans-next uint32 :overlay-at (-> next 13)) + (generic-trans-count uint16 :overlay-at (-> count 13)) + (generic-water-last uint32 :overlay-at (-> last 14)) + (generic-water-next uint32 :overlay-at (-> next 14)) + (generic-water-count uint16 :overlay-at (-> count 14)) + (vanish-last uint32 :overlay-at (-> last 15)) + (vanish-next uint32 :overlay-at (-> next 15)) + (vanish-count uint16 :overlay-at (-> count 15)) + ) + ) + +;; definition for method 3 of type prototype-tie-work +(defmethod inspect ((this prototype-tie-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'prototype-tie-work) + (format #t "~1Tupload-flushe: #~%" (-> this upload-flushe)) + (format #t "~1Tupload-palette: #~%" (-> this upload-palette)) + (format #t "~1Tupload-model-0: #~%" (-> this upload-model-0)) + (format #t "~1Tupload-model-1: #~%" (-> this upload-model-1)) + (format #t "~1Tupload-model-2: #~%" (-> this upload-model-2)) + (format #t "~1Tupload-model-3: #~%" (-> this upload-model-3)) + (format #t "~1Tupload-model-near-0: #~%" (-> this upload-model-near-0)) + (format #t "~1Tupload-model-near-1: #~%" (-> this upload-model-near-1)) + (format #t "~1Tupload-model-near-2: #~%" (-> this upload-model-near-2)) + (format #t "~1Tupload-model-near-3: #~%" (-> this upload-model-near-3)) + (format #t "~1Tupload-model-near-4: #~%" (-> this upload-model-near-4)) + (format #t "~1Tenvmap-palette: #~%" (-> this envmap-palette)) + (format #t "~1Tenvmap-shader: #~%" (-> this envmap-shader)) + (format #t "~1Tupload-envmap-0: #~%" (-> this upload-envmap-0)) + (format #t "~1Tupload-envmap-1: #~%" (-> this upload-envmap-1)) + (format #t "~1Tupload-envmap-2: #~%" (-> this upload-envmap-2)) + (format #t "~1Tupload-envmap-3: #~%" (-> this upload-envmap-3)) + (format #t "~1Tupload-envmap-4: #~%" (-> this upload-envmap-4)) + (format #t "~1Tupload-envmap-scissor-4: #~%" (-> this upload-envmap-scissor-4)) + (format #t "~1Tgeneric-palette: #~%" (-> this generic-palette)) + (format #t "~1Tgeneric-model-0: #~%" (-> this generic-model-0)) + (format #t "~1Tgeneric-model-1: #~%" (-> this generic-model-1)) + (format #t "~1Tgeneric-model-2: #~%" (-> this generic-model-2)) + (format #t "~1Tmodel-next: #~%" (-> this model-next)) + (format #t "~1Tclamp: ~D~%" (-> this clamp)) + (format #t "~1Tprototype-array: ~A~%" (-> this prototype-array)) + (format #t "~1Twait-from-spr: ~D~%" (-> this wait-from-spr)) + (format #t "~1Twait-to-spr: ~D~%" (-> this wait-to-spr)) + (format #t "~1Tmood: #~%" (-> this mood)) + (format #t "~1Tlast[16] @ #x~X~%" (-> this last)) + (format #t "~1Tnext[16] @ #x~X~%" (-> this next)) + (format #t "~1Tcount[16] @ #x~X~%" (-> this count)) + (format #t "~1Ttie-last: #x~X~%" (-> this tie-last)) + (format #t "~1Ttie-next: #x~X~%" (-> this tie-next)) + (format #t "~1Ttie-count: ~D~%" (-> this tie-count)) + (format #t "~1Ttrans-last: #x~X~%" (-> this trans-last)) + (format #t "~1Ttrans-next: #x~X~%" (-> this trans-next)) + (format #t "~1Ttrans-count: ~D~%" (-> this trans-count)) + (format #t "~1Twater-last: #x~X~%" (-> this water-last)) + (format #t "~1Twater-next: #x~X~%" (-> this water-next)) + (format #t "~1Twater-count: ~D~%" (-> this water-count)) + (format #t "~1Tscissor-last: #x~X~%" (-> this scissor-last)) + (format #t "~1Tscissor-next: #x~X~%" (-> this scissor-next)) + (format #t "~1Tscissor-count: ~D~%" (-> this scissor-count)) + (format #t "~1Tscissor-trans-last: #x~X~%" (-> this scissor-trans-last)) + (format #t "~1Tscissor-trans-next: #x~X~%" (-> this scissor-trans-next)) + (format #t "~1Tscissor-trans-count: ~D~%" (-> this scissor-trans-count)) + (format #t "~1Tscissor-water-last: #x~X~%" (-> this scissor-water-last)) + (format #t "~1Tscissor-water-next: #x~X~%" (-> this scissor-water-next)) + (format #t "~1Tscissor-water-count: ~D~%" (-> this scissor-water-count)) + (format #t "~1Tenvmap-last: #x~X~%" (-> this envmap-last)) + (format #t "~1Tenvmap-next: #x~X~%" (-> this envmap-next)) + (format #t "~1Tenvmap-count: ~D~%" (-> this envmap-count)) + (format #t "~1Tenvmap-trans-last: #x~X~%" (-> this envmap-trans-last)) + (format #t "~1Tenvmap-trans-next: #x~X~%" (-> this envmap-trans-next)) + (format #t "~1Tenvmap-trans-count: ~D~%" (-> this envmap-trans-count)) + (format #t "~1Tenvmap-water-last: #x~X~%" (-> this envmap-water-last)) + (format #t "~1Tenvmap-water-next: #x~X~%" (-> this envmap-water-next)) + (format #t "~1Tenvmap-water-count: ~D~%" (-> this envmap-water-count)) + (format #t "~1Tenvmap-scissor-last: #x~X~%" (-> this envmap-scissor-last)) + (format #t "~1Tenvmap-scissor-next: #x~X~%" (-> this envmap-scissor-next)) + (format #t "~1Tenvmap-scissor-count: ~D~%" (-> this envmap-scissor-count)) + (format #t "~1Tenvmap-scissor-trans-last: #x~X~%" (-> this envmap-scissor-trans-last)) + (format #t "~1Tenvmap-scissor-trans-next: #x~X~%" (-> this envmap-scissor-trans-next)) + (format #t "~1Tenvmap-scissor-trans-count: ~D~%" (-> this envmap-scissor-trans-count)) + (format #t "~1Tenvmap-scissor-water-last: #x~X~%" (-> this envmap-scissor-water-last)) + (format #t "~1Tenvmap-scissor-water-next: #x~X~%" (-> this envmap-scissor-water-next)) + (format #t "~1Tenvmap-scissor-water-count: ~D~%" (-> this envmap-scissor-water-count)) + (format #t "~1Tgeneric-last: #x~X~%" (-> this generic-last)) + (format #t "~1Tgeneric-next: #x~X~%" (-> this generic-next)) + (format #t "~1Tgeneric-count: ~D~%" (-> this generic-count)) + (format #t "~1Tgeneric-trans-last: #x~X~%" (-> this generic-trans-last)) + (format #t "~1Tgeneric-trans-next: #x~X~%" (-> this generic-trans-next)) + (format #t "~1Tgeneric-trans-count: ~D~%" (-> this generic-trans-count)) + (format #t "~1Tgeneric-water-last: #x~X~%" (-> this generic-water-last)) + (format #t "~1Tgeneric-water-next: #x~X~%" (-> this generic-water-next)) + (format #t "~1Tgeneric-water-count: ~D~%" (-> this generic-water-count)) + (format #t "~1Tvanish-last: #x~X~%" (-> this vanish-last)) + (format #t "~1Tvanish-next: #x~X~%" (-> this vanish-next)) + (format #t "~1Tvanish-count: ~D~%" (-> this vanish-count)) + (label cfg-4) + this + ) + +;; definition of type prototype-tie-dma +(deftype prototype-tie-dma (structure) + ((colora rgba 256) + (colorb rgba 256) + (outa uint128 256) + (outb uint128 256) + (geometry uint32 4) + (next uint32 12) + (count uint16 12) + (counts uint32 4) + (palette-ptr uint32 :overlay-at (-> counts 2)) + (model-ptr uint32 :overlay-at (-> counts 3)) + (ret-ptr uint32) + (length uint32) + (flags uint32) + (dma-buffer basic) + (this-frag-count uint32) + (frag-count uint8 4) + (from-spr uint32) + (to-spr uint32) + (spr-out uint32) + (this-count uint32) + (scissor-geometry uint32 :overlay-at (-> geometry 0)) + (near-geometry uint32 :overlay-at (-> geometry 1)) + (mid-geometry uint32 :overlay-at (-> geometry 2)) + (far-geometry uint32 :overlay-at (-> geometry 3)) + (scissor-frag-count uint8 :overlay-at (-> frag-count 0)) + (near-frag-count uint8 :overlay-at (-> frag-count 1)) + (mid-frag-count uint8 :overlay-at (-> frag-count 2)) + (far-frag-count uint8 :overlay-at (-> frag-count 3)) + (tie-scissor-next uint32 :overlay-at (-> next 0)) + (tie-near-next uint32 :overlay-at (-> next 1)) + (tie-mid-next uint32 :overlay-at (-> next 2)) + (tie-far-next uint32 :overlay-at (-> next 3)) + (trans-scissor-next uint32 4 :overlay-at (-> next 0)) + (trans-near-next uint32 :overlay-at (-> next 1)) + (trans-mid-next uint32 :overlay-at (-> next 2)) + (trans-far-next uint32 :overlay-at (-> next 3)) + (water-scissor-next uint32 4 :overlay-at (-> next 0)) + (water-near-next uint32 :overlay-at (-> next 1)) + (water-mid-next uint32 :overlay-at (-> next 2)) + (water-far-next uint32 :overlay-at (-> next 3)) + (envmap-scissor-next uint32 4 :overlay-at (-> next 4)) + (envmap-near-next uint32 :overlay-at (-> next 5)) + (envmap-mid-next uint32 :overlay-at (-> next 6)) + (envmap-far-next uint32 :overlay-at (-> next 7)) + (generic-near-next uint32 :overlay-at (-> next 8)) + (generic-mid-next uint32 :overlay-at (-> next 9)) + (generic-far-next uint32 :overlay-at (-> next 10)) + (vanish-next uint32 :overlay-at (-> next 11)) + (tie-count uint16 :overlay-at (-> count 0)) + (tie-scissor-count uint16 :overlay-at (-> count 0)) + (tie-near-count uint16 :overlay-at (-> count 1)) + (tie-mid-count uint16 :overlay-at (-> count 2)) + (tie-far-count uint16 :overlay-at (-> count 3)) + (trans-count uint16 :overlay-at (-> count 0)) + (trans-scissor-count uint16 :overlay-at (-> count 0)) + (trans-near-count uint16 :overlay-at (-> count 1)) + (trans-mid-count uint16 :overlay-at (-> count 2)) + (trans-far-count uint16 :overlay-at (-> count 3)) + (water-count uint16 :overlay-at (-> count 0)) + (water-scissor-count uint16 :overlay-at (-> count 0)) + (water-near-count uint16 :overlay-at (-> count 1)) + (water-mid-count uint16 :overlay-at (-> count 2)) + (water-far-count uint16 :overlay-at (-> count 3)) + (envmap-count uint16 :overlay-at (-> count 4)) + (envmap-scissor-count uint16 :overlay-at (-> count 4)) + (envmap-near-count uint16 :overlay-at (-> count 5)) + (envmap-mid-count uint16 :overlay-at (-> count 6)) + (envmap-far-count uint16 :overlay-at (-> count 7)) + (generic-count uint16 :overlay-at (-> count 8)) + (generic-near-count uint16 :overlay-at (-> count 8)) + (generic-mid-count uint16 :overlay-at (-> count 9)) + (generic-far-count uint16 :overlay-at (-> count 10)) + (vanish-count uint16 :overlay-at (-> count 11)) + (next-clear uint32 3 :overlay-at (-> next 0)) + (count-clear uint16 3 :overlay-at (-> count 0)) + ) + ) + +;; definition for method 3 of type prototype-tie-dma +(defmethod inspect ((this prototype-tie-dma)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'prototype-tie-dma) + (format #t "~1Tcolora[256] @ #x~X~%" (-> this colora)) + (format #t "~1Tcolorb[256] @ #x~X~%" (-> this colorb)) + (format #t "~1Touta[256] @ #x~X~%" (-> this outa)) + (format #t "~1Toutb[256] @ #x~X~%" (-> this outb)) + (format #t "~1Tgeometry[4] @ #x~X~%" (-> this geometry)) + (format #t "~1Tnext[12] @ #x~X~%" (-> this next)) + (format #t "~1Tcount[12] @ #x~X~%" (-> this count)) + (format #t "~1Tcounts[4] @ #x~X~%" (-> this counts)) + (format #t "~1Tpalette-ptr: #x~X~%" (-> this palette-ptr)) + (format #t "~1Tmodel-ptr: #x~X~%" (-> this model-ptr)) + (format #t "~1Tret-ptr: #x~X~%" (-> this ret-ptr)) + (format #t "~1Tlength: ~D~%" (-> this length)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tdma-buffer: ~A~%" (-> this dma-buffer)) + (format #t "~1Tthis-frag-count: ~D~%" (-> this this-frag-count)) + (format #t "~1Tfrag-count[4] @ #x~X~%" (-> this frag-count)) + (format #t "~1Tfrom-spr: #x~X~%" (-> this from-spr)) + (format #t "~1Tto-spr: #x~X~%" (-> this to-spr)) + (format #t "~1Tspr-out: #x~X~%" (-> this spr-out)) + (format #t "~1Tthis-count: ~D~%" (-> this this-count)) + (format #t "~1Tscissor-geometry: #x~X~%" (-> this scissor-geometry)) + (format #t "~1Tnear-geometry: #x~X~%" (-> this near-geometry)) + (format #t "~1Tmid-geometry: #x~X~%" (-> this mid-geometry)) + (format #t "~1Tfar-geometry: #x~X~%" (-> this far-geometry)) + (format #t "~1Tscissor-frag-count: ~D~%" (-> this scissor-frag-count)) + (format #t "~1Tnear-frag-count: ~D~%" (-> this near-frag-count)) + (format #t "~1Tmid-frag-count: ~D~%" (-> this mid-frag-count)) + (format #t "~1Tfar-frag-count: ~D~%" (-> this far-frag-count)) + (format #t "~1Ttie-scissor-next: #x~X~%" (-> this tie-scissor-next)) + (format #t "~1Ttie-near-next: #x~X~%" (-> this tie-near-next)) + (format #t "~1Ttie-mid-next: #x~X~%" (-> this tie-mid-next)) + (format #t "~1Ttie-far-next: #x~X~%" (-> this tie-far-next)) + (format #t "~1Ttrans-scissor-next[4] @ #x~X~%" (-> this next)) + (format #t "~1Ttrans-near-next: #x~X~%" (-> this tie-near-next)) + (format #t "~1Ttrans-mid-next: #x~X~%" (-> this tie-mid-next)) + (format #t "~1Ttrans-far-next: #x~X~%" (-> this tie-far-next)) + (format #t "~1Twater-scissor-next[4] @ #x~X~%" (-> this next)) + (format #t "~1Twater-near-next: #x~X~%" (-> this tie-near-next)) + (format #t "~1Twater-mid-next: #x~X~%" (-> this tie-mid-next)) + (format #t "~1Twater-far-next: #x~X~%" (-> this tie-far-next)) + (format #t "~1Tenvmap-scissor-next[4] @ #x~X~%" (-> this envmap-scissor-next)) + (format #t "~1Tenvmap-near-next: #x~X~%" (-> this envmap-near-next)) + (format #t "~1Tenvmap-mid-next: #x~X~%" (-> this envmap-mid-next)) + (format #t "~1Tenvmap-far-next: #x~X~%" (-> this envmap-far-next)) + (format #t "~1Tgeneric-near-next: #x~X~%" (-> this generic-near-next)) + (format #t "~1Tgeneric-mid-next: #x~X~%" (-> this generic-mid-next)) + (format #t "~1Tgeneric-far-next: #x~X~%" (-> this generic-far-next)) + (format #t "~1Tvanish-next: #x~X~%" (-> this vanish-next)) + (format #t "~1Ttie-count: ~D~%" (-> this tie-count)) + (format #t "~1Ttie-scissor-count: ~D~%" (-> this tie-count)) + (format #t "~1Ttie-near-count: ~D~%" (-> this tie-near-count)) + (format #t "~1Ttie-mid-count: ~D~%" (-> this tie-mid-count)) + (format #t "~1Ttie-far-count: ~D~%" (-> this tie-far-count)) + (format #t "~1Ttrans-count: ~D~%" (-> this tie-count)) + (format #t "~1Ttrans-scissor-count: ~D~%" (-> this tie-count)) + (format #t "~1Ttrans-near-count: ~D~%" (-> this tie-near-count)) + (format #t "~1Ttrans-mid-count: ~D~%" (-> this tie-mid-count)) + (format #t "~1Ttrans-far-count: ~D~%" (-> this tie-far-count)) + (format #t "~1Twater-count: ~D~%" (-> this tie-count)) + (format #t "~1Twater-scissor-count: ~D~%" (-> this tie-count)) + (format #t "~1Twater-near-count: ~D~%" (-> this tie-near-count)) + (format #t "~1Twater-mid-count: ~D~%" (-> this tie-mid-count)) + (format #t "~1Twater-far-count: ~D~%" (-> this tie-far-count)) + (format #t "~1Tenvmap-count: ~D~%" (-> this envmap-count)) + (format #t "~1Tenvmap-scissor-count: ~D~%" (-> this envmap-count)) + (format #t "~1Tenvmap-near-count: ~D~%" (-> this envmap-near-count)) + (format #t "~1Tenvmap-mid-count: ~D~%" (-> this envmap-mid-count)) + (format #t "~1Tenvmap-far-count: ~D~%" (-> this envmap-far-count)) + (format #t "~1Tgeneric-count: ~D~%" (-> this generic-count)) + (format #t "~1Tgeneric-near-count: ~D~%" (-> this generic-count)) + (format #t "~1Tgeneric-mid-count: ~D~%" (-> this generic-mid-count)) + (format #t "~1Tgeneric-far-count: ~D~%" (-> this generic-far-count)) + (format #t "~1Tvanish-count: ~D~%" (-> this vanish-count)) + (format #t "~1Tnext-clear[3] @ #x~X~%" (-> this next)) + (format #t "~1Tcount-clear[3] @ #x~X~%" (-> this count)) + (label cfg-4) + this + ) + +;; definition for symbol *instance-tie-work-copy*, type instance-tie-work +(define *instance-tie-work-copy* (the-as instance-tie-work #f)) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/background/tie/tie-methods_REF.gc b/test/decompiler/reference/jak3/engine/gfx/background/tie/tie-methods_REF.gc new file mode 100644 index 0000000000..89d06eb48c --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/background/tie/tie-methods_REF.gc @@ -0,0 +1,2317 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type tie-debug +(deftype tie-debug (structure) + ((max-instance uint32) + (min-instance uint32) + (test-fragment uint32) + (frag-count uint32) + ) + ) + +;; definition for method 3 of type tie-debug +(defmethod inspect ((this tie-debug)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'tie-debug) + (format #t "~1Tmax-instance: ~D~%" (-> this max-instance)) + (format #t "~1Tmin-instance: ~D~%" (-> this min-instance)) + (format #t "~1Ttest-fragment: ~D~%" (-> this test-fragment)) + (format #t "~1Tfrag-count: ~D~%" (-> this frag-count)) + (label cfg-4) + this + ) + +;; definition for symbol *tie*, type tie-debug +(define *tie* (new 'global 'tie-debug)) + +;; definition for function tie-debug-between +(defun tie-debug-between ((arg0 uint) (arg1 uint)) + (set! (-> *instance-tie-work* test-id) arg1) + (set! (-> *instance-tie-work* test-id2) arg0) + arg0 + ) + +;; definition for function tie-debug-one +(defun tie-debug-one ((arg0 uint) (arg1 uint)) + (set! (-> *instance-tie-work* test-id) (+ arg1 -1 arg0)) + (set! (-> *instance-tie-work* test-id2) arg0) + arg0 + ) + +;; definition for function tie-debug-frag-between +(defun tie-debug-frag-between ((arg0 uint) (arg1 uint)) + (set! (-> *tie* test-fragment) arg0) + (let ((v0-0 (- arg1 arg0))) + (set! (-> *tie* frag-count) v0-0) + v0-0 + ) + ) + +;; definition for function tie-debug-frag-one +(defun tie-debug-frag-one ((arg0 uint) (arg1 uint)) + (set! (-> *tie* test-fragment) arg0) + (set! (-> *tie* frag-count) arg1) + arg1 + ) + +;; definition for function walk-tie-generic-prototypes +;; WARN: Return type mismatch symbol vs none. +(defun walk-tie-generic-prototypes () + (none) + ) + +;; definition for symbol *pke-hack*, type vector +(define *pke-hack* (new 'global 'vector)) + +;; definition for function draw-inline-array-instance-tie +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function draw-inline-array-prototype-tie-asm +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function instance-tie-patch-buckets +;; INFO: Used lq/sq +;; WARN: Return type mismatch pointer vs object. +;; ERROR: Failed store: (s.d! (the-as uint a0-5) a1-5) at op 46 +;; ERROR: Failed store: (s.d! (the-as uint a0-18) a1-23) at op 144 +;; ERROR: Failed store: (s.d! (the-as uint a0-31) a1-41) at op 242 +;; ERROR: Failed store: (s.d! (the-as uint a0-44) a1-59) at op 340 +;; ERROR: Failed store: (s.d! (the-as uint a0-57) a1-77) at op 438 +;; ERROR: Failed store: (s.d! (the-as uint a0-72) a1-95) at op 537 +;; ERROR: Failed store: (s.d! (the-as uint a0-87) a1-113) at op 636 +;; ERROR: Failed store: (s.d! (the-as uint a0-102) a1-131) at op 735 +;; ERROR: Failed store: (s.d! (the-as uint a0-117) a1-149) at op 834 +;; ERROR: Failed store: (s.d! (the-as uint a0-132) a1-167) at op 933 +;; ERROR: Failed store: (s.d! (the-as uint a0-147) a1-185) at op 1032 +;; ERROR: Failed store: (s.d! (the-as uint a0-162) a1-203) at op 1131 +;; ERROR: Failed store: (s.d! (the-as uint a0-176) a1-221) at op 1230 +;; ERROR: Failed store: (s.w! (+ a0-179 8) 0) at op 1239 +;; ERROR: Failed store: (s.w! (+ a0-179 12) 0) at op 1240 +(defun instance-tie-patch-buckets ((arg0 dma-buffer) (arg1 level)) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie-scissor)) + (when (nonzero? (-> *prototype-tie-work* scissor-count)) + (let ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf base))) + (with-dma-buffer-add-bucket ((v1-17 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 10 + (bucket-id tie-scissor-l0-tfrag) + (bucket-id tie-scissor-l1-tfrag) + (bucket-id tie-scissor-l2-tfrag) + (bucket-id tie-scissor-l3-tfrag) + (bucket-id tie-scissor-l4-tfrag) + (bucket-id tie-scissor-l5-tfrag) + (bucket-id tie-scissor-l6-tfrag) + (bucket-id tie-scissor-l7-tfrag) + (bucket-id tie-scissor-l8-tfrag) + (bucket-id tie-scissor-l9-tfrag) + ) + (-> arg1 draw-index) + ) + ) + (let ((a1-1 (-> v1-17 base)) + (a0-5 (the-as object (-> *prototype-tie-work* scissor-last))) + ) + (let ((a3-1 (-> *prototype-tie-work* scissor-next))) + (set! (-> (the-as (pointer uint128) a1-1)) (-> *prototype-tie-work* model-next quad)) + (set! (-> (the-as (pointer uint64) a1-1)) + (logior (logand (-> (the-as (pointer uint64) a1-1)) (the-as uint #x80000000ffffffff)) (shr (shl a3-1 33) 1)) + ) + ) + (let ((a1-5 (logior (logand (-> (the-as (pointer uint64) a0-5) 0) (the-as uint #x80000000ffffffff)) + (shr (shl (the-as int (&+ a1-1 16)) 33) 1) + ) + ) + ) + (s.d! (the-as uint a0-5) a1-5) + ) + ) + (&+! (-> v1-17 base) 16) + ) + (let ((v1-25 *dma-mem-usage*)) + (when (nonzero? v1-25) + (set! (-> v1-25 length) (max 16 (-> v1-25 length))) + (set! (-> v1-25 data 15 name) "tie-scissor") + (+! (-> v1-25 data 15 count) 1) + (+! (-> v1-25 data 15 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-0)) + ) + (set! (-> v1-25 data 15 total) (-> v1-25 data 15 used)) + ) + ) + ) + ) + ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie)) + (when (nonzero? (-> *prototype-tie-work* tie-count)) + (let ((s5-1 (-> *display* frames (-> *display* on-screen) global-buf base))) + (with-dma-buffer-add-bucket ((v1-43 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 10 + (bucket-id tie-l0-tfrag) + (bucket-id tie-l1-tfrag) + (bucket-id tie-l2-tfrag) + (bucket-id tie-l3-tfrag) + (bucket-id tie-l4-tfrag) + (bucket-id tie-l5-tfrag) + (bucket-id tie-l6-tfrag) + (bucket-id tie-l7-tfrag) + (bucket-id tie-l8-tfrag) + (bucket-id tie-l9-tfrag) + ) + (-> arg1 draw-index) + ) + ) + (let ((a1-19 (-> v1-43 base)) + (a0-18 (the-as object (-> *prototype-tie-work* tie-last))) + ) + (let ((a3-10 (-> *prototype-tie-work* tie-next))) + (set! (-> (the-as (pointer uint128) a1-19)) (-> *prototype-tie-work* model-next quad)) + (set! (-> (the-as (pointer uint64) a1-19)) + (logior (logand (-> (the-as (pointer uint64) a1-19)) (the-as uint #x80000000ffffffff)) (shr (shl a3-10 33) 1)) + ) + ) + (let ((a1-23 (logior (logand (-> (the-as (pointer uint64) a0-18) 0) (the-as uint #x80000000ffffffff)) + (shr (shl (the-as int (&+ a1-19 16)) 33) 1) + ) + ) + ) + (s.d! (the-as uint a0-18) a1-23) + ) + ) + (&+! (-> v1-43 base) 16) + ) + (let ((v1-51 *dma-mem-usage*)) + (when (nonzero? v1-51) + (set! (-> v1-51 length) (max 10 (-> v1-51 length))) + (set! (-> v1-51 data 9 name) "tie-fragment") + (+! (-> v1-51 data 9 count) 1) + (+! (-> v1-51 data 9 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-1)) + ) + (set! (-> v1-51 data 9 total) (-> v1-51 data 9 used)) + ) + ) + ) + ) + ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask etie)) + (when (nonzero? (-> *prototype-tie-work* envmap-count)) + (let ((s5-2 (-> *display* frames (-> *display* on-screen) global-buf base))) + (with-dma-buffer-add-bucket ((v1-69 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 10 + (bucket-id etie-l0-tfrag) + (bucket-id etie-l1-tfrag) + (bucket-id etie-l2-tfrag) + (bucket-id etie-l3-tfrag) + (bucket-id etie-l4-tfrag) + (bucket-id etie-l5-tfrag) + (bucket-id etie-l6-tfrag) + (bucket-id etie-l7-tfrag) + (bucket-id etie-l8-tfrag) + (bucket-id etie-l9-tfrag) + ) + (-> arg1 draw-index) + ) + ) + (let ((a1-37 (-> v1-69 base)) + (a0-31 (the-as object (-> *prototype-tie-work* envmap-last))) + ) + (let ((a3-19 (-> *prototype-tie-work* envmap-next))) + (set! (-> (the-as (pointer uint128) a1-37)) (-> *prototype-tie-work* model-next quad)) + (set! (-> (the-as (pointer uint64) a1-37)) + (logior (logand (-> (the-as (pointer uint64) a1-37)) (the-as uint #x80000000ffffffff)) (shr (shl a3-19 33) 1)) + ) + ) + (let ((a1-41 (logior (logand (-> (the-as (pointer uint64) a0-31) 0) (the-as uint #x80000000ffffffff)) + (shr (shl (the-as int (&+ a1-37 16)) 33) 1) + ) + ) + ) + (s.d! (the-as uint a0-31) a1-41) + ) + ) + (&+! (-> v1-69 base) 16) + ) + (let ((v1-77 *dma-mem-usage*)) + (when (nonzero? v1-77) + (set! (-> v1-77 length) (max 10 (-> v1-77 length))) + (set! (-> v1-77 data 9 name) "tie-fragment") + (+! (-> v1-77 data 9 count) 1) + (+! (-> v1-77 data 9 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-2)) + ) + (set! (-> v1-77 data 9 total) (-> v1-77 data 9 used)) + ) + ) + ) + ) + ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask etie-scissor)) + (when (nonzero? (-> *prototype-tie-work* envmap-scissor-count)) + (let ((s5-3 (-> *display* frames (-> *display* on-screen) global-buf base))) + (with-dma-buffer-add-bucket ((v1-95 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 10 + (bucket-id etie-scissor-l0-tfrag) + (bucket-id etie-scissor-l1-tfrag) + (bucket-id etie-scissor-l2-tfrag) + (bucket-id etie-scissor-l3-tfrag) + (bucket-id etie-scissor-l4-tfrag) + (bucket-id etie-scissor-l5-tfrag) + (bucket-id etie-scissor-l6-tfrag) + (bucket-id etie-scissor-l7-tfrag) + (bucket-id etie-scissor-l8-tfrag) + (bucket-id etie-scissor-l9-tfrag) + ) + (-> arg1 draw-index) + ) + ) + (let ((a1-55 (-> v1-95 base)) + (a0-44 (the-as object (-> *prototype-tie-work* envmap-scissor-last))) + ) + (let ((a3-28 (-> *prototype-tie-work* envmap-scissor-next))) + (set! (-> (the-as (pointer uint128) a1-55)) (-> *prototype-tie-work* model-next quad)) + (set! (-> (the-as (pointer uint64) a1-55)) + (logior (logand (-> (the-as (pointer uint64) a1-55)) (the-as uint #x80000000ffffffff)) (shr (shl a3-28 33) 1)) + ) + ) + (let ((a1-59 (logior (logand (-> (the-as (pointer uint64) a0-44) 0) (the-as uint #x80000000ffffffff)) + (shr (shl (the-as int (&+ a1-55 16)) 33) 1) + ) + ) + ) + (s.d! (the-as uint a0-44) a1-59) + ) + ) + (&+! (-> v1-95 base) 16) + ) + (let ((v1-103 *dma-mem-usage*)) + (when (nonzero? v1-103) + (set! (-> v1-103 length) (max 10 (-> v1-103 length))) + (set! (-> v1-103 data 9 name) "tie-fragment") + (+! (-> v1-103 data 9 count) 1) + (+! (-> v1-103 data 9 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-3)) + ) + (set! (-> v1-103 data 9 total) (-> v1-103 data 9 used)) + ) + ) + ) + ) + ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie-vanish)) + (when (nonzero? (-> *prototype-tie-work* vanish-count)) + (let ((s5-4 (-> *display* frames (-> *display* on-screen) global-buf base))) + (with-dma-buffer-add-bucket ((v1-121 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 10 + (bucket-id tie-vanish-l0-tfrag) + (bucket-id tie-vanish-l1-tfrag) + (bucket-id tie-vanish-l2-tfrag) + (bucket-id tie-vanish-l3-tfrag) + (bucket-id tie-vanish-l4-tfrag) + (bucket-id tie-vanish-l5-tfrag) + (bucket-id tie-vanish-l6-tfrag) + (bucket-id tie-vanish-l7-tfrag) + (bucket-id tie-vanish-l8-tfrag) + (bucket-id tie-vanish-l9-tfrag) + ) + (-> arg1 draw-index) + ) + ) + (let ((a1-73 (-> v1-121 base)) + (a0-57 (the-as object (-> *prototype-tie-work* vanish-last))) + ) + (let ((a3-37 (-> *prototype-tie-work* vanish-next))) + (set! (-> (the-as (pointer uint128) a1-73)) (-> *prototype-tie-work* model-next quad)) + (set! (-> (the-as (pointer uint64) a1-73)) + (logior (logand (-> (the-as (pointer uint64) a1-73)) (the-as uint #x80000000ffffffff)) (shr (shl a3-37 33) 1)) + ) + ) + (let ((a1-77 (logior (logand (-> (the-as (pointer uint64) a0-57) 0) (the-as uint #x80000000ffffffff)) + (shr (shl (the-as int (&+ a1-73 16)) 33) 1) + ) + ) + ) + (s.d! (the-as uint a0-57) a1-77) + ) + ) + (&+! (-> v1-121 base) 16) + ) + (let ((v1-129 *dma-mem-usage*)) + (when (nonzero? v1-129) + (set! (-> v1-129 length) (max 10 (-> v1-129 length))) + (set! (-> v1-129 data 9 name) "tie-fragment") + (+! (-> v1-129 data 9 count) 1) + (+! (-> v1-129 data 9 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-4)) + ) + (set! (-> v1-129 data 9 total) (-> v1-129 data 9 used)) + ) + ) + ) + ) + ) + (when (logtest? (vu1-renderer-mask tie-scissor-trans) (-> *display* vu1-enable-user)) + (when (nonzero? (-> *prototype-tie-work* scissor-trans-count)) + (let ((s5-5 (-> *display* frames (-> *display* on-screen) global-buf base))) + (with-dma-buffer-add-bucket ((v1-146 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 10 + (bucket-id tie-scissor-l0-alpha) + (bucket-id tie-scissor-l1-alpha) + (bucket-id tie-scissor-l2-alpha) + (bucket-id tie-scissor-l3-alpha) + (bucket-id tie-scissor-l4-alpha) + (bucket-id tie-scissor-l5-alpha) + (bucket-id tie-scissor-l6-alpha) + (bucket-id tie-scissor-l7-alpha) + (bucket-id tie-scissor-l8-alpha) + (bucket-id tie-scissor-l9-alpha) + ) + (-> arg1 draw-index) + ) + ) + (let ((a1-91 (-> v1-146 base)) + (a0-72 (the-as object (-> *prototype-tie-work* scissor-trans-last))) + ) + (let ((a3-46 (-> *prototype-tie-work* scissor-trans-next))) + (set! (-> (the-as (pointer uint128) a1-91)) (-> *prototype-tie-work* model-next quad)) + (set! (-> (the-as (pointer uint64) a1-91)) + (logior (logand (-> (the-as (pointer uint64) a1-91)) (the-as uint #x80000000ffffffff)) (shr (shl a3-46 33) 1)) + ) + ) + (let ((a1-95 (logior (logand (-> (the-as (pointer uint64) a0-72) 0) (the-as uint #x80000000ffffffff)) + (shr (shl (the-as int (&+ a1-91 16)) 33) 1) + ) + ) + ) + (s.d! (the-as uint a0-72) a1-95) + ) + ) + (&+! (-> v1-146 base) 16) + ) + (let ((v1-154 *dma-mem-usage*)) + (when (nonzero? v1-154) + (set! (-> v1-154 length) (max 16 (-> v1-154 length))) + (set! (-> v1-154 data 15 name) "tie-scissor") + (+! (-> v1-154 data 15 count) 1) + (+! (-> v1-154 data 15 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-5)) + ) + (set! (-> v1-154 data 15 total) (-> v1-154 data 15 used)) + ) + ) + ) + ) + ) + (when (logtest? (vu1-renderer-mask tie-trans) (-> *display* vu1-enable-user)) + (when (nonzero? (-> *prototype-tie-work* trans-count)) + (let ((s5-6 (-> *display* frames (-> *display* on-screen) global-buf base))) + (with-dma-buffer-add-bucket ((v1-171 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 10 + (bucket-id tie-l0-alpha) + (bucket-id tie-l1-alpha) + (bucket-id tie-l2-alpha) + (bucket-id tie-l3-alpha) + (bucket-id tie-l4-alpha) + (bucket-id tie-l5-alpha) + (bucket-id tie-l6-alpha) + (bucket-id tie-l7-alpha) + (bucket-id tie-l8-alpha) + (bucket-id tie-l9-alpha) + ) + (-> arg1 draw-index) + ) + ) + (let ((a1-109 (-> v1-171 base)) + (a0-87 (the-as object (-> *prototype-tie-work* trans-last))) + ) + (let ((a3-55 (-> *prototype-tie-work* trans-next))) + (set! (-> (the-as (pointer uint128) a1-109)) (-> *prototype-tie-work* model-next quad)) + (set! (-> (the-as (pointer uint64) a1-109)) + (logior (logand (-> (the-as (pointer uint64) a1-109)) (the-as uint #x80000000ffffffff)) + (shr (shl a3-55 33) 1) + ) + ) + ) + (let ((a1-113 (logior (logand (-> (the-as (pointer uint64) a0-87) 0) (the-as uint #x80000000ffffffff)) + (shr (shl (the-as int (&+ a1-109 16)) 33) 1) + ) + ) + ) + (s.d! (the-as uint a0-87) a1-113) + ) + ) + (&+! (-> v1-171 base) 16) + ) + (let ((v1-179 *dma-mem-usage*)) + (when (nonzero? v1-179) + (set! (-> v1-179 length) (max 10 (-> v1-179 length))) + (set! (-> v1-179 data 9 name) "tie-fragment") + (+! (-> v1-179 data 9 count) 1) + (+! (-> v1-179 data 9 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-6)) + ) + (set! (-> v1-179 data 9 total) (-> v1-179 data 9 used)) + ) + ) + ) + ) + ) + (when (logtest? (vu1-renderer-mask etie-trans) (-> *display* vu1-enable-user)) + (when (nonzero? (-> *prototype-tie-work* envmap-trans-count)) + (let ((s5-7 (-> *display* frames (-> *display* on-screen) global-buf base))) + (with-dma-buffer-add-bucket ((v1-196 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 10 + (bucket-id etie-l0-alpha) + (bucket-id etie-l1-alpha) + (bucket-id etie-l2-alpha) + (bucket-id etie-l3-alpha) + (bucket-id etie-l4-alpha) + (bucket-id etie-l5-alpha) + (bucket-id etie-l6-alpha) + (bucket-id etie-l7-alpha) + (bucket-id etie-l8-alpha) + (bucket-id etie-l9-alpha) + ) + (-> arg1 draw-index) + ) + ) + (let ((a1-127 (-> v1-196 base)) + (a0-102 (the-as object (-> *prototype-tie-work* envmap-trans-last))) + ) + (let ((a3-64 (-> *prototype-tie-work* envmap-trans-next))) + (set! (-> (the-as (pointer uint128) a1-127)) (-> *prototype-tie-work* model-next quad)) + (set! (-> (the-as (pointer uint64) a1-127)) + (logior (logand (-> (the-as (pointer uint64) a1-127)) (the-as uint #x80000000ffffffff)) + (shr (shl a3-64 33) 1) + ) + ) + ) + (let ((a1-131 (logior (logand (-> (the-as (pointer uint64) a0-102) 0) (the-as uint #x80000000ffffffff)) + (shr (shl (the-as int (&+ a1-127 16)) 33) 1) + ) + ) + ) + (s.d! (the-as uint a0-102) a1-131) + ) + ) + (&+! (-> v1-196 base) 16) + ) + (let ((v1-204 *dma-mem-usage*)) + (when (nonzero? v1-204) + (set! (-> v1-204 length) (max 10 (-> v1-204 length))) + (set! (-> v1-204 data 9 name) "tie-fragment") + (+! (-> v1-204 data 9 count) 1) + (+! (-> v1-204 data 9 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-7)) + ) + (set! (-> v1-204 data 9 total) (-> v1-204 data 9 used)) + ) + ) + ) + ) + ) + (when (logtest? (vu1-renderer-mask etie-scissor-trans) (-> *display* vu1-enable-user)) + (when (nonzero? (-> *prototype-tie-work* envmap-scissor-trans-count)) + (let ((s5-8 (-> *display* frames (-> *display* on-screen) global-buf base))) + (with-dma-buffer-add-bucket ((v1-221 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 10 + (bucket-id etie-scissor-l0-alpha) + (bucket-id etie-scissor-l1-alpha) + (bucket-id etie-scissor-l2-alpha) + (bucket-id etie-scissor-l3-alpha) + (bucket-id etie-scissor-l4-alpha) + (bucket-id etie-scissor-l5-alpha) + (bucket-id etie-scissor-l6-alpha) + (bucket-id etie-scissor-l7-alpha) + (bucket-id etie-scissor-l8-alpha) + (bucket-id etie-scissor-l9-alpha) + ) + (-> arg1 draw-index) + ) + ) + (let ((a1-145 (-> v1-221 base)) + (a0-117 (the-as object (-> *prototype-tie-work* envmap-scissor-trans-last))) + ) + (let ((a3-73 (-> *prototype-tie-work* envmap-scissor-trans-next))) + (set! (-> (the-as (pointer uint128) a1-145)) (-> *prototype-tie-work* model-next quad)) + (set! (-> (the-as (pointer uint64) a1-145)) + (logior (logand (-> (the-as (pointer uint64) a1-145)) (the-as uint #x80000000ffffffff)) + (shr (shl a3-73 33) 1) + ) + ) + ) + (let ((a1-149 (logior (logand (-> (the-as (pointer uint64) a0-117) 0) (the-as uint #x80000000ffffffff)) + (shr (shl (the-as int (&+ a1-145 16)) 33) 1) + ) + ) + ) + (s.d! (the-as uint a0-117) a1-149) + ) + ) + (&+! (-> v1-221 base) 16) + ) + (let ((v1-229 *dma-mem-usage*)) + (when (nonzero? v1-229) + (set! (-> v1-229 length) (max 10 (-> v1-229 length))) + (set! (-> v1-229 data 9 name) "tie-fragment") + (+! (-> v1-229 data 9 count) 1) + (+! (-> v1-229 data 9 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-8)) + ) + (set! (-> v1-229 data 9 total) (-> v1-229 data 9 used)) + ) + ) + ) + ) + ) + (when (logtest? (vu1-renderer-mask tie-scissor-water) (-> *display* vu1-enable-user)) + (when (nonzero? (-> *prototype-tie-work* scissor-water-count)) + (let ((s5-9 (-> *display* frames (-> *display* on-screen) global-buf base))) + (with-dma-buffer-add-bucket ((v1-246 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 10 + (bucket-id tie-scissor-l0-water) + (bucket-id tie-scissor-l1-water) + (bucket-id tie-scissor-l2-water) + (bucket-id tie-scissor-l3-water) + (bucket-id tie-scissor-l4-water) + (bucket-id tie-scissor-l5-water) + (bucket-id tie-scissor-l6-water) + (bucket-id tie-scissor-l7-water) + (bucket-id tie-scissor-l8-water) + (bucket-id tie-scissor-l9-water) + ) + (-> arg1 draw-index) + ) + ) + (let ((a1-163 (-> v1-246 base)) + (a0-132 (the-as object (-> *prototype-tie-work* scissor-water-last))) + ) + (let ((a3-82 (-> *prototype-tie-work* scissor-water-next))) + (set! (-> (the-as (pointer uint128) a1-163)) (-> *prototype-tie-work* model-next quad)) + (set! (-> (the-as (pointer uint64) a1-163)) + (logior (logand (-> (the-as (pointer uint64) a1-163)) (the-as uint #x80000000ffffffff)) + (shr (shl a3-82 33) 1) + ) + ) + ) + (let ((a1-167 (logior (logand (-> (the-as (pointer uint64) a0-132) 0) (the-as uint #x80000000ffffffff)) + (shr (shl (the-as int (&+ a1-163 16)) 33) 1) + ) + ) + ) + (s.d! (the-as uint a0-132) a1-167) + ) + ) + (&+! (-> v1-246 base) 16) + ) + (let ((v1-254 *dma-mem-usage*)) + (when (nonzero? v1-254) + (set! (-> v1-254 length) (max 16 (-> v1-254 length))) + (set! (-> v1-254 data 15 name) "tie-scissor") + (+! (-> v1-254 data 15 count) 1) + (+! (-> v1-254 data 15 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-9)) + ) + (set! (-> v1-254 data 15 total) (-> v1-254 data 15 used)) + ) + ) + ) + ) + ) + (when (logtest? (vu1-renderer-mask tie-water) (-> *display* vu1-enable-user)) + (when (nonzero? (-> *prototype-tie-work* water-count)) + (let ((s5-10 (-> *display* frames (-> *display* on-screen) global-buf base))) + (with-dma-buffer-add-bucket ((v1-271 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 10 + (bucket-id tie-l0-water) + (bucket-id tie-l1-water) + (bucket-id tie-l2-water) + (bucket-id tie-l3-water) + (bucket-id tie-l4-water) + (bucket-id tie-l5-water) + (bucket-id tie-l6-water) + (bucket-id tie-l7-water) + (bucket-id tie-l8-water) + (bucket-id tie-l9-water) + ) + (-> arg1 draw-index) + ) + ) + (let ((a1-181 (-> v1-271 base)) + (a0-147 (the-as object (-> *prototype-tie-work* water-last))) + ) + (let ((a3-91 (-> *prototype-tie-work* water-next))) + (set! (-> (the-as (pointer uint128) a1-181)) (-> *prototype-tie-work* model-next quad)) + (set! (-> (the-as (pointer uint64) a1-181)) + (logior (logand (-> (the-as (pointer uint64) a1-181)) (the-as uint #x80000000ffffffff)) + (shr (shl a3-91 33) 1) + ) + ) + ) + (let ((a1-185 (logior (logand (-> (the-as (pointer uint64) a0-147) 0) (the-as uint #x80000000ffffffff)) + (shr (shl (the-as int (&+ a1-181 16)) 33) 1) + ) + ) + ) + (s.d! (the-as uint a0-147) a1-185) + ) + ) + (&+! (-> v1-271 base) 16) + ) + (let ((v1-279 *dma-mem-usage*)) + (when (nonzero? v1-279) + (set! (-> v1-279 length) (max 10 (-> v1-279 length))) + (set! (-> v1-279 data 9 name) "tie-fragment") + (+! (-> v1-279 data 9 count) 1) + (+! (-> v1-279 data 9 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-10)) + ) + (set! (-> v1-279 data 9 total) (-> v1-279 data 9 used)) + ) + ) + ) + ) + ) + (when (logtest? (vu1-renderer-mask etie-water) (-> *display* vu1-enable-user)) + (when (nonzero? (-> *prototype-tie-work* envmap-water-count)) + (let ((s5-11 (-> *display* frames (-> *display* on-screen) global-buf base))) + (with-dma-buffer-add-bucket ((v1-296 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 10 + (bucket-id etie-l0-water) + (bucket-id etie-l1-water) + (bucket-id etie-l2-water) + (bucket-id etie-l3-water) + (bucket-id etie-l4-water) + (bucket-id etie-l5-water) + (bucket-id etie-l6-water) + (bucket-id etie-l7-water) + (bucket-id etie-l8-water) + (bucket-id etie-l9-water) + ) + (-> arg1 draw-index) + ) + ) + (let ((a1-199 (-> v1-296 base)) + (a0-162 (the-as object (-> *prototype-tie-work* envmap-water-last))) + ) + (let ((a3-100 (-> *prototype-tie-work* envmap-water-next))) + (set! (-> (the-as (pointer uint128) a1-199)) (-> *prototype-tie-work* model-next quad)) + (set! (-> (the-as (pointer uint64) a1-199)) + (logior (logand (-> (the-as (pointer uint64) a1-199)) (the-as uint #x80000000ffffffff)) + (shr (shl a3-100 33) 1) + ) + ) + ) + (let ((a1-203 (logior (logand (-> (the-as (pointer uint64) a0-162) 0) (the-as uint #x80000000ffffffff)) + (shr (shl (the-as int (&+ a1-199 16)) 33) 1) + ) + ) + ) + (s.d! (the-as uint a0-162) a1-203) + ) + ) + (&+! (-> v1-296 base) 16) + ) + (let ((v1-304 *dma-mem-usage*)) + (when (nonzero? v1-304) + (set! (-> v1-304 length) (max 10 (-> v1-304 length))) + (set! (-> v1-304 data 9 name) "tie-fragment") + (+! (-> v1-304 data 9 count) 1) + (+! (-> v1-304 data 9 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-11)) + ) + (set! (-> v1-304 data 9 total) (-> v1-304 data 9 used)) + ) + ) + ) + ) + ) + (when (logtest? (vu1-renderer-mask etie-scissor-water) (-> *display* vu1-enable-user)) + (when (nonzero? (-> *prototype-tie-work* envmap-scissor-water-count)) + (let* ((s5-12 (-> *display* frames (-> *display* on-screen) global-buf base)) + (v1-320 (-> *display* frames (-> *display* on-screen) global-buf)) + (a2-120 (-> v1-320 base)) + ) + (let ((a1-217 (-> v1-320 base)) + (a0-176 (the-as object (-> *prototype-tie-work* envmap-scissor-water-last))) + ) + (let ((a3-109 (-> *prototype-tie-work* envmap-scissor-water-next))) + (set! (-> (the-as (pointer uint128) a1-217)) (-> *prototype-tie-work* model-next quad)) + (set! (-> (the-as (pointer uint64) a1-217)) + (logior (logand (-> (the-as (pointer uint64) a1-217)) (the-as uint #x80000000ffffffff)) + (shr (shl a3-109 33) 1) + ) + ) + ) + (let ((a1-221 (logior (logand (-> (the-as (pointer uint64) a0-176) 0) (the-as uint #x80000000ffffffff)) + (shr (shl (the-as int (&+ a1-217 16)) 33) 1) + ) + ) + ) + (s.d! (the-as uint a0-176) a1-221) + ) + ) + (&+! (-> v1-320 base) 16) + (let* ((a3-115 (-> v1-320 base)) + (v0-12 (when (!= a2-120 a3-115) + (let ((a0-179 (-> v1-320 base))) + (set! (-> (the-as (pointer int64) a0-179)) #x20000000) + (s.w! (+ a0-179 8) 0) + (s.w! (+ a0-179 12) 0) + (set! (-> v1-320 base) (&+ a0-179 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (-> (new 'static 'array bucket-id 10 + (bucket-id etie-scissor-l0-water) + (bucket-id etie-scissor-l1-water) + (bucket-id etie-scissor-l2-water) + (bucket-id etie-scissor-l3-water) + (bucket-id etie-scissor-l4-water) + (bucket-id etie-scissor-l5-water) + (bucket-id etie-scissor-l6-water) + (bucket-id etie-scissor-l7-water) + (bucket-id etie-scissor-l8-water) + (bucket-id etie-scissor-l9-water) + ) + (-> arg1 draw-index) + ) + a2-120 + (the-as (pointer dma-tag) a3-115) + ) + ) + ) + ) + (let ((v1-328 *dma-mem-usage*)) + (when (nonzero? v1-328) + (set! (-> v1-328 length) (max 10 (-> v1-328 length))) + (set! (-> v1-328 data 9 name) "tie-fragment") + (+! (-> v1-328 data 9 count) 1) + (+! (-> v1-328 data 9 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-12)) + ) + (set! (-> v1-328 data 9 total) (-> v1-328 data 9 used)) + ) + ) + v0-12 + ) + ) + ) + ) + ) + +;; definition for function draw-drawable-tree-instance-tie +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun draw-drawable-tree-instance-tie ((arg0 drawable-tree-instance-tie) (arg1 level)) + (local-vars (v0-9 object) (a0-42 int) (a0-44 int) (a0-55 int) (a0-57 int) (sv-16 int)) + (when (logtest? (vu1-renderer-mask + tie-scissor + tie + etie + etie-scissor + tie-vanish + generic + tie-scissor-trans + tie-trans + etie-trans + etie-scissor-trans + ) + (-> *display* vu1-enable-user) + ) + (set! (-> *instance-tie-work* wind-vectors) (-> arg0 prototypes wind-vectors)) + (let ((s5-0 (+ (-> arg0 length) -1))) + (when (nonzero? s5-0) + (dotimes (s4-0 s5-0) + (let* ((v1-9 (-> arg0 data s4-0)) + (a0-7 (-> arg0 data (+ s4-0 1))) + (a1-2 (/ (-> (the-as drawable-inline-array-node v1-9) data 0 id) 8)) + (a0-9 (/ (-> (the-as drawable-inline-array-node a0-7) data 0 id) 8)) + (a1-4 (+ a1-2 #x3800 #x70000000)) + (a0-11 (+ a0-9 #x3800 #x70000000)) + ) + (draw-node-cull + (the-as pointer a0-11) + (the-as pointer a1-4) + (-> (the-as drawable-inline-array-node v1-9) data) + (-> (the-as drawable-inline-array-node v1-9) length) + ) + ) + ) + ) + (let* ((s2-0 (-> arg0 data s5-0)) + (s3-0 (-> arg0 prototypes prototype-array-tie)) + (s4-1 (-> s3-0 length)) + (s5-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s0-0 (-> s5-1 base)) + (s1-1 (&- (-> s5-1 end) (the-as uint (* (-> arg0 prototypes prototype-max-qwc) 16)))) + ) + (when *debug-segment* + (if (>= (the-as uint s0-0) (the-as uint s1-1)) + (format *stdcon* "out of tie memory~%") + ) + ) + (when (< (the-as uint s0-0) (the-as uint s1-1)) + (set! (-> *instance-tie-work* buffer-start) (the-as uint (-> s5-1 base))) + (set! (-> *instance-tie-work* buffer-end) (the-as uint s1-1)) + (dotimes (v1-28 16) + (set! (-> *prototype-tie-work* last v1-28) (the-as uint 0)) + (set! (-> *prototype-tie-work* next v1-28) (the-as uint 0)) + (set! (-> *prototype-tie-work* count v1-28) (the-as uint 0)) + ) + (dotimes (v1-31 s4-1) + (let ((a0-26 (-> s3-0 array-data v1-31))) + (dotimes (a1-9 3) + (set! (-> a0-26 next-clear a1-9) (the-as uint128 0)) + (set! (-> a0-26 count-clear a1-9) (the-as uint 0)) + ) + ) + ) + (let* ((s1-2 (&+ s2-0 32)) + (s0-1 (+ (/ (-> s1-2 id) 8) #x3800 #x70000000)) + ) + (set! sv-16 (-> (the-as drawable-inline-array-instance-tie s2-0) length)) + (when (nonzero? sv-16) + (let* ((v1-41 (logand (the-as int *gsf-buffer*) 8191)) + (v1-43 + (the-as + object + (logand (the-as int (&- (logand (the-as int (&-> (-> s3-0 data) -640)) 8191) (the-as uint v1-41))) 8191) + ) + ) + ) + (set! *instance-tie-work-copy* (the-as instance-tie-work (+ (the-as int *gsf-buffer*) (the-as int v1-43)))) + ) + (quad-copy! (the-as pointer *instance-tie-work-copy*) (the-as pointer *instance-tie-work*) 35) + (let ((s2-1 (-> *display* frames (-> *display* on-screen) global-buf base))) + (set! (-> *instance-tie-work-copy* wait-to-spr) (the-as uint 0)) + (set! (-> *instance-tie-work-copy* wait-from-spr) (the-as uint 0)) + (set! (-> *instance-tie-work-copy* tfrag-dists) (the-as uint (-> arg1 bsp tfrag-closest))) + (set! (-> *instance-tie-work-copy* alpha-dists) (the-as uint (-> arg1 bsp alpha-closest))) + (set! (-> *instance-tie-work-copy* water-dists) (the-as uint (-> arg1 bsp water-closest))) + (let* ((v1-61 (-> *perf-stats* data 46)) + (a0-39 (-> v1-61 ctrl)) + ) + (+! (-> v1-61 count) 1) + (b! (zero? a0-39) cfg-23 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-39) + ) + (.sync.l) + (.sync.p) + (label cfg-23) + 0 + (let ((t9-3 draw-inline-array-instance-tie) + (a3-1 s5-1) + ) + (t9-3 (the-as pointer s0-1) (the-as (inline-array instance-tie) s1-2) sv-16 a3-1) + ) + (let ((v1-64 (-> *perf-stats* data 46))) + (b! (zero? (-> v1-64 ctrl)) cfg-25 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-42 pcr0) + (+! (-> v1-64 accum0) a0-42) + (.mfpc a0-44 pcr1) + (+! (-> v1-64 accum1) a0-44) + ) + (label cfg-25) + 0 + (update-wait-stats + (-> *perf-stats* data 46) + (the-as uint 0) + (-> *instance-tie-work-copy* wait-to-spr) + (-> *instance-tie-work-copy* wait-from-spr) + ) + (let ((v1-71 (-> *instance-tie-work-copy* min-dist quad))) + (set! (-> *instance-tie-work* min-dist quad) v1-71) + ) + (set! (-> *instance-tie-work* flags) (-> *instance-tie-work-copy* flags)) + (if (and *debug-segment* (< (the-as int (-> *instance-tie-work* buffer-end)) (the-as int (-> s5-1 base)))) + (format *stdcon* "out of tie memory~%") + ) + (when (>= (the-as int (-> *instance-tie-work* buffer-end)) (the-as int (-> s5-1 base))) + (set! (-> *prototype-tie-work* wait-to-spr) (the-as uint 0)) + (set! (-> *prototype-tie-work* wait-from-spr) (the-as uint 0)) + (let* ((v1-85 (-> *perf-stats* data 47)) + (a0-52 (-> v1-85 ctrl)) + ) + (+! (-> v1-85 count) 1) + (b! (zero? a0-52) cfg-33 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-52) + ) + (.sync.l) + (.sync.p) + (label cfg-33) + 0 + (draw-inline-array-prototype-tie-asm s5-1 s4-1 s3-0) + (let ((v1-88 (-> *perf-stats* data 47))) + (b! (zero? (-> v1-88 ctrl)) cfg-35 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-55 pcr0) + (+! (-> v1-88 accum0) a0-55) + (.mfpc a0-57 pcr1) + (+! (-> v1-88 accum1) a0-57) + ) + (label cfg-35) + 0 + (update-wait-stats + (-> *perf-stats* data 47) + (the-as uint 0) + (-> *prototype-tie-work* wait-to-spr) + (-> *prototype-tie-work* wait-from-spr) + ) + ) + (let ((a0-60 *dma-mem-usage*)) + (when (nonzero? a0-60) + (set! (-> a0-60 length) (max 10 (-> a0-60 length))) + (set! (-> a0-60 data 9 name) "tie-fragment") + (+! (-> a0-60 data 9 count) 1) + (+! (-> a0-60 data 9 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s2-1)) + ) + (set! (-> a0-60 data 9 total) (-> a0-60 data 9 used)) + ) + ) + ) + ) + ) + (set! v0-9 (cond + ((< (the-as int (-> *instance-tie-work* buffer-end)) (the-as int (-> s5-1 base))) + (if *debug-segment* + (format *stdcon* "out of tie memory~%") + ) + (set! v0-9 (-> *instance-tie-work* buffer-start)) + (set! (-> s5-1 base) (the-as pointer v0-9)) + v0-9 + ) + (else + (instance-tie-patch-buckets s5-1 arg1) + ) + ) + ) + ) + ) + ) + ) + (set! (-> arg1 tie-min-dist) (-> *instance-tie-work* min-dist x)) + 0 + (none) + ) + +;; definition for function tie-init-scissor-buf +;; ERROR: failed type prop at 40: Unknown symbol: tie-near-init-engine +;; WARN: Return type mismatch symbol vs none. +(defun tie-init-scissor-buf ((a0-0 bucket-id) (a1-0 gs-alpha) (a2-0 gs-test) (a3-0 gs-test)) + (local-vars + (v0-2 none) + (v0-4 none) + (v0-5 none) + (v1-0 display) + (v1-1 symbol) + (v1-2 display) + (v1-3 int) + (v1-4 int) + (v1-5 int) + (v1-6 display-frame) + (v1-7 (inline-array dma-bucket)) + (v1-8 (pointer dma-tag)) + (v1-9 display) + (v1-10 int) + (v1-11 int) + (v1-12 int) + (v1-13 display-frame) + (v1-14 none) + (v1-15 none) + (v1-16 none) + (v1-17 none) + (v1-18 none) + (v1-19 none) + (v1-20 none) + (v1-21 none) + (v1-22 none) + (v1-23 none) + (v1-24 none) + (v1-25 none) + (v1-26 none) + (v1-27 none) + (v1-28 none) + (v1-29 none) + (v1-30 none) + (v1-31 none) + (v1-32 none) + (v1-33 none) + (a0-1 int) + (a0-2 pointer) + (a0-4 symbol) + (a0-5 display) + (a0-6 uint) + (a0-7 display) + (a0-9 none) + (a0-10 none) + (a0-11 none) + (a0-12 none) + (a0-13 none) + (a0-14 none) + (a0-15 none) + (a0-16 none) + (a0-17 none) + (a0-18 none) + (a0-19 none) + (a0-21 none) + (a1-1 none) + (a1-2 none) + (a1-3 none) + (a1-4 none) + (a1-5 none) + (a1-6 none) + (a1-7 none) + (a1-8 none) + (a1-9 none) + (a1-10 none) + (t0-0 uint) + (t0-1 uint) + (t0-2 symbol) + (t0-3 int) + (t0-4 int) + (t0-5 int) + (t0-6 display-frame) + (t0-7 int) + (t1-0 dma-buffer) + (t1-1 pointer) + (s3-1 pointer) + (s4-0 dma-buffer) + (s4-1 none) + (s5-0 dma-bucket) + (s5-1 none) + (t9-0 none) + (t9-1 none) + (gp-1 none) + ) + (when (begin + (set! v1-0 *display*) + (set! a0-1 80) + (set! t0-0 (-> v1-0 mem-reserve-size)) + (set! t0-1 (+ t0-0 a0-1)) + (set! (-> v1-0 mem-reserve-size) t0-1) + (set! t0-2 (-> v1-0 dma-buffer-overflow)) + (not t0-2) + ) + (when (begin + (when (begin + (set! t0-3 (-> v1-0 on-screen)) + (set! t0-4 (sll t0-3 2)) + (set! t0-5 (+ t0-4 v1-0)) + (set! t0-6 (dynamic-array-field-access t0-5 frames PLACEHOLDER)) + (set! t1-0 (-> t0-6 global-buf)) + (set! t0-7 (-> t1-0 real-buffer-end)) + (set! t1-1 (-> t1-0 base)) + (set! a0-2 (+ t1-1 a0-1)) + (<.si t0-7 a0-2) + ) + (set! a0-4 #t) + (set! (-> v1-0 dma-buffer-overflow) a0-4) + ) + (set! v1-1 (-> v1-0 dma-buffer-overflow)) + (not v1-1) + ) + (when (begin + (when (begin + (set! v1-2 *display*) + (set! v1-3 (-> v1-2 on-screen)) + (set! v1-4 (sll v1-3 2)) + (set! a0-5 *display*) + (set! v1-5 (+ v1-4 a0-5)) + (set! v1-6 (dynamic-array-field-access v1-5 frames PLACEHOLDER)) + (set! v1-7 (-> v1-6 bucket-group)) + (set! a0-6 (sll a0-0 4)) + (set! s5-0 (+ v1-7 a0-6)) + (set! v1-8 (-> s5-0 last)) + (!= s5-0 v1-8) + ) + (set! v1-9 *display*) + (set! v1-10 (-> v1-9 on-screen)) + (set! v1-11 (sll v1-10 2)) + (set! a0-7 *display*) + (set! v1-12 (+ v1-11 a0-7)) + (set! v1-13 (dynamic-array-field-access v1-12 frames PLACEHOLDER)) + (set! s4-0 (-> v1-13 global-buf)) + (set! s3-1 (-> s4-0 base)) + (set! t9-0 (the-as none tie-near-init-engine)) + (set! a0-8 (the-as none s4-0)) + (call!) + (set! v1-14 (the-as none s4-0)) + (set! a0-9 (the-as none (l.wu (+ v1-14 4)))) + (set! a1-1 (the-as none #x10000002)) + (s.d! a0-9 a1-1) + (s.w! (+ a0-9 8) 0) + (set! a1-2 (the-as none #x50000002)) + (s.w! (+ a0-9 12) a1-2) + (set! a0-10 (the-as none (+ a0-9 16))) + (s.w! (+ v1-14 4) a0-10) + (set! v1-15 (the-as none s4-0)) + (set! a0-11 (the-as none (l.wu (+ v1-15 4)))) + (set! a1-3 (the-as none (the-as uint #x1000000000008001))) + (set! a1-4 (the-as none (pcypld 0 a1-3))) + (s.d! a0-11 a1-4) + (set! a1-5 (the-as none (the-as uint #xeeeeeeeeeeeeeeee))) + (s.d! (+ a0-11 8) a1-5) + (set! a0-12 (the-as none (+ a0-11 16))) + (s.w! (+ v1-15 4) a0-12) + (set! v1-16 (the-as none s4-0)) + (set! a0-13 (the-as none (l.wu (+ v1-16 4)))) + (set! a1-6 (the-as none #x1000130)) + (s.d! a0-13 a1-6) + (set! a1-7 (the-as none 78)) + (s.d! (+ a0-13 8) a1-7) + (set! a0-14 (the-as none (+ a0-13 16))) + (s.w! (+ v1-16 4) a0-14) + (set! v1-17 (the-as none (-> s4-0 base))) + (set! a0-15 (the-as none #x20000000)) + (set! a1-8 (the-as none (-> s5-0 next))) + (set! a1-9 (the-as none (sll a1-8 33))) + (set! a1-10 (the-as none (srl a1-9 1))) + (set! a0-16 (the-as none (logior a0-15 a1-10))) + (s.d! v1-17 a0-16) + (s.w! (+ v1-17 8) 0) + (s.w! (+ v1-17 12) 0) + (set! v1-18 (the-as none (+ v1-17 16))) + (set! (-> s4-0 base) (the-as pointer v1-18)) + (set! (-> s5-0 next) (the-as uint s3-1)) + ) + (set! v1-19 (the-as none *display*)) + (set! v1-20 (the-as none (l.w v1-19))) + (set! v1-21 (the-as none (sll v1-20 2))) + (set! a0-17 (the-as none *display*)) + (set! v1-22 (the-as none (+ v1-21 a0-17))) + (set! v1-23 (the-as none (l.wu (+ v1-22 8)))) + (set! v1-24 (the-as none (l.wu (+ v1-23 40)))) + (set! a0-18 (the-as none (sll a0-0 4))) + (set! gp-1 (the-as none (+ v1-24 a0-18))) + (set! v1-25 (the-as none (l.wu (+ gp-1 8)))) + (!= gp-1 v1-25) + ) + (set! v1-26 (the-as none *display*)) + (set! v1-27 (the-as none (l.w v1-26))) + (set! v1-28 (the-as none (sll v1-27 2))) + (set! a0-19 (the-as none *display*)) + (set! v1-29 (the-as none (+ v1-28 a0-19))) + (set! v1-30 (the-as none (l.wu (+ v1-29 8)))) + (set! s4-1 (the-as none (l.wu (+ v1-30 36)))) + (set! s5-1 (the-as none (l.wu (+ s4-1 4)))) + (set! t9-1 (the-as none tie-near-end-buffer)) + (set! a0-20 (the-as none s4-1)) + (call!) + (set! v0-5 (the-as none (l.wu (+ s4-1 4)))) + (set! v1-31 (the-as none (l.wu (+ s4-1 4)))) + (set! a0-21 (the-as none #x20000000)) + (s.d! v1-31 a0-21) + (s.w! (+ v1-31 8) 0) + (s.w! (+ v1-31 12) 0) + (set! v1-32 (the-as none (+ v1-31 16))) + (s.w! (+ s4-1 4) v1-32) + (set! v1-33 (the-as none (l.wu (+ gp-1 8)))) + (s.w! (+ v1-33 4) s5-1) + (s.w! (+ gp-1 8) v0-5) + ) + ) + ) + (ret-none) + ) + +;; definition for function tie-init-buf +;; WARN: Return type mismatch pointer vs none. +(defun tie-init-buf ((arg0 bucket-id) (arg1 gs-alpha) (arg2 gs-test) (arg3 gs-test)) + (let ((v1-0 *display*) + (a0-1 80) + ) + (+! (-> v1-0 mem-reserve-size) a0-1) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((t1-0 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> t1-0 real-buffer-end) (the-as int (&+ (-> t1-0 base) a0-1))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((s5-0 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + (when (!= s5-0 (-> s5-0 last)) + (let* ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s3-1 (-> s4-0 base)) + ) + (tie-init-engine s4-0 arg1 arg2 arg3) + (let* ((v1-14 s4-0) + (a0-9 (the-as dma-packet (-> v1-14 base))) + ) + (set! (-> a0-9 dma) (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id cnt))) + (set! (-> a0-9 vif0) (new 'static 'vif-tag)) + (set! (-> a0-9 vif1) (new 'static 'vif-tag :imm #x2 :cmd (vif-cmd direct) :msk #x1)) + (set! (-> v1-14 base) (the-as pointer (&+ a0-9 16))) + ) + (let* ((v1-15 s4-0) + (a0-11 (the-as gs-gif-tag (-> v1-15 base))) + ) + (set! (-> a0-11 tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x1)) + (set! (-> a0-11 regs) GIF_REGS_ALL_AD) + (set! (-> v1-15 base) (the-as pointer (&+ a0-11 16))) + ) + (let* ((v1-16 s4-0) + (a0-13 (-> v1-16 base)) + ) + (set! (-> (the-as (pointer gs-zbuf) a0-13) 0) (new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24))) + (set! (-> (the-as (pointer gs-reg64) a0-13) 1) (gs-reg64 zbuf-1)) + (set! (-> v1-16 base) (&+ a0-13 16)) + ) + (let ((v1-17 (the-as object (-> s4-0 base)))) + (set! (-> (the-as dma-packet v1-17) dma) (new 'static 'dma-tag :id (dma-tag-id next) :addr (-> s5-0 next))) + (set! (-> (the-as dma-packet v1-17) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-17) vif1) (new 'static 'vif-tag)) + (set! (-> s4-0 base) (the-as pointer (&+ (the-as dma-packet v1-17) 16))) + ) + (set! (-> s5-0 next) (the-as uint s3-1)) + ) + ) + ) + (let ((gp-1 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + (when (!= gp-1 (-> gp-1 last)) + (let* ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-1 (-> s4-1 base)) + ) + (tie-end-buffer s4-1) + (let ((v0-5 (-> s4-1 base))) + (let ((v1-31 (the-as dma-packet (-> s4-1 base)))) + (set! (-> v1-31 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> v1-31 vif0) (new 'static 'vif-tag)) + (set! (-> v1-31 vif1) (new 'static 'vif-tag)) + (set! (-> s4-1 base) (the-as pointer (&+ v1-31 16))) + ) + (set! (-> (the-as (pointer uint32) (-> gp-1 last)) 1) (the-as uint s5-1)) + (set! (-> gp-1 last) (the-as (pointer dma-tag) v0-5)) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for function tie-init-envmap-buf +;; WARN: Return type mismatch pointer vs none. +;; ERROR: Failed store: (s.w! (+ v1-14 8) 0) at op 50 +;; ERROR: Failed store: (s.w! (+ v1-14 12) 0) at op 51 +;; ERROR: Failed store: (s.w! (+ v1-28 8) 0) at op 81 +;; ERROR: Failed store: (s.w! (+ v1-28 12) 0) at op 82 +;; ERROR: Failed store: (s.w! (+ v1-30 4) s5-1) at op 86 +(defun tie-init-envmap-buf ((arg0 bucket-id) (arg1 gs-alpha) (arg2 gs-test)) + (let ((v1-0 *display*) + (a0-1 32) + ) + (+! (-> v1-0 mem-reserve-size) a0-1) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((t0-0 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> t0-0 real-buffer-end) (the-as int (&+ (-> t0-0 base) a0-1))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((s5-0 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + (when (!= s5-0 (-> s5-0 last)) + (let* ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s3-1 (-> s4-0 base)) + ) + (etie-init-engine s4-0 arg1 arg2) + (let ((v1-14 (-> s4-0 base))) + (set! (-> (the-as (pointer uint64) v1-14)) (logior #x20000000 (shr (shl (-> s5-0 next) 33) 1))) + (s.w! (+ v1-14 8) 0) + (s.w! (+ v1-14 12) 0) + (set! (-> s4-0 base) (&+ v1-14 16)) + ) + (set! (-> s5-0 next) (the-as uint s3-1)) + ) + ) + ) + (let ((gp-1 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + (when (!= gp-1 (-> gp-1 last)) + (let* ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-1 (-> s4-1 base)) + ) + (etie-end-buffer s4-1) + (let ((v0-5 (-> s4-1 base))) + (let ((v1-28 (-> s4-1 base))) + (set! (-> (the-as (pointer int64) v1-28)) #x20000000) + (s.w! (+ v1-28 8) 0) + (s.w! (+ v1-28 12) 0) + (set! (-> s4-1 base) (&+ v1-28 16)) + ) + (let ((v1-30 (-> gp-1 last))) + (s.w! (+ v1-30 4) s5-1) + ) + (set! (-> gp-1 last) (the-as (pointer dma-tag) v0-5)) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for function tie-init-envmap-scissor-buf +;; ERROR: failed type prop at 40: Unknown symbol: etn-init-engine +;; WARN: Return type mismatch symbol vs none. +(defun tie-init-envmap-scissor-buf ((a0-0 bucket-id) (a1-0 gs-alpha) (a2-0 int) (a3-0 int)) + (local-vars + (v0-2 none) + (v0-4 none) + (v0-5 none) + (v1-0 display) + (v1-1 symbol) + (v1-2 display) + (v1-3 int) + (v1-4 int) + (v1-5 int) + (v1-6 display-frame) + (v1-7 (inline-array dma-bucket)) + (v1-8 (pointer dma-tag)) + (v1-9 display) + (v1-10 int) + (v1-11 int) + (v1-12 int) + (v1-13 display-frame) + (v1-14 none) + (v1-15 none) + (v1-16 none) + (v1-17 none) + (v1-18 none) + (v1-19 none) + (v1-20 none) + (v1-21 none) + (v1-22 none) + (v1-23 none) + (v1-24 none) + (v1-25 none) + (v1-26 none) + (v1-27 none) + (v1-28 none) + (v1-29 none) + (v1-30 none) + (a0-1 int) + (a0-2 pointer) + (a0-4 symbol) + (a0-5 display) + (a0-6 uint) + (a0-7 display) + (a0-9 none) + (a0-10 none) + (a0-11 none) + (a0-12 none) + (a0-13 none) + (a0-15 none) + (a1-1 none) + (a1-2 none) + (a1-3 none) + (a3-1 uint) + (a3-2 uint) + (a3-3 symbol) + (a3-4 int) + (a3-5 int) + (a3-6 int) + (a3-7 display-frame) + (a3-8 int) + (t0-0 dma-buffer) + (t0-1 pointer) + (s3-1 pointer) + (s4-0 dma-buffer) + (s4-1 none) + (s5-0 dma-bucket) + (s5-1 none) + (t9-0 none) + (t9-1 none) + (gp-1 none) + ) + (when (begin + (set! v1-0 *display*) + (set! a0-1 32) + (set! a3-1 (-> v1-0 mem-reserve-size)) + (set! a3-2 (+ a3-1 a0-1)) + (set! (-> v1-0 mem-reserve-size) a3-2) + (set! a3-3 (-> v1-0 dma-buffer-overflow)) + (not a3-3) + ) + (when (begin + (when (begin + (set! a3-4 (-> v1-0 on-screen)) + (set! a3-5 (sll a3-4 2)) + (set! a3-6 (+ a3-5 v1-0)) + (set! a3-7 (dynamic-array-field-access a3-6 frames PLACEHOLDER)) + (set! t0-0 (-> a3-7 global-buf)) + (set! a3-8 (-> t0-0 real-buffer-end)) + (set! t0-1 (-> t0-0 base)) + (set! a0-2 (+ t0-1 a0-1)) + (<.si a3-8 a0-2) + ) + (set! a0-4 #t) + (set! (-> v1-0 dma-buffer-overflow) a0-4) + ) + (set! v1-1 (-> v1-0 dma-buffer-overflow)) + (not v1-1) + ) + (when (begin + (when (begin + (set! v1-2 *display*) + (set! v1-3 (-> v1-2 on-screen)) + (set! v1-4 (sll v1-3 2)) + (set! a0-5 *display*) + (set! v1-5 (+ v1-4 a0-5)) + (set! v1-6 (dynamic-array-field-access v1-5 frames PLACEHOLDER)) + (set! v1-7 (-> v1-6 bucket-group)) + (set! a0-6 (sll a0-0 4)) + (set! s5-0 (+ v1-7 a0-6)) + (set! v1-8 (-> s5-0 last)) + (!= s5-0 v1-8) + ) + (set! v1-9 *display*) + (set! v1-10 (-> v1-9 on-screen)) + (set! v1-11 (sll v1-10 2)) + (set! a0-7 *display*) + (set! v1-12 (+ v1-11 a0-7)) + (set! v1-13 (dynamic-array-field-access v1-12 frames PLACEHOLDER)) + (set! s4-0 (-> v1-13 global-buf)) + (set! s3-1 (-> s4-0 base)) + (set! t9-0 (the-as none etn-init-engine)) + (set! a0-8 (the-as none s4-0)) + (call!) + (set! v1-14 (the-as none (-> s4-0 base))) + (set! a0-9 (the-as none #x20000000)) + (set! a1-1 (the-as none (-> s5-0 next))) + (set! a1-2 (the-as none (sll a1-1 33))) + (set! a1-3 (the-as none (srl a1-2 1))) + (set! a0-10 (the-as none (logior a0-9 a1-3))) + (s.d! v1-14 a0-10) + (s.w! (+ v1-14 8) 0) + (s.w! (+ v1-14 12) 0) + (set! v1-15 (the-as none (+ v1-14 16))) + (set! (-> s4-0 base) (the-as pointer v1-15)) + (set! (-> s5-0 next) (the-as uint s3-1)) + ) + (set! v1-16 (the-as none *display*)) + (set! v1-17 (the-as none (l.w v1-16))) + (set! v1-18 (the-as none (sll v1-17 2))) + (set! a0-11 (the-as none *display*)) + (set! v1-19 (the-as none (+ v1-18 a0-11))) + (set! v1-20 (the-as none (l.wu (+ v1-19 8)))) + (set! v1-21 (the-as none (l.wu (+ v1-20 40)))) + (set! a0-12 (the-as none (sll a0-0 4))) + (set! gp-1 (the-as none (+ v1-21 a0-12))) + (set! v1-22 (the-as none (l.wu (+ gp-1 8)))) + (!= gp-1 v1-22) + ) + (set! v1-23 (the-as none *display*)) + (set! v1-24 (the-as none (l.w v1-23))) + (set! v1-25 (the-as none (sll v1-24 2))) + (set! a0-13 (the-as none *display*)) + (set! v1-26 (the-as none (+ v1-25 a0-13))) + (set! v1-27 (the-as none (l.wu (+ v1-26 8)))) + (set! s4-1 (the-as none (l.wu (+ v1-27 36)))) + (set! s5-1 (the-as none (l.wu (+ s4-1 4)))) + (set! t9-1 (the-as none etn-end-buffer)) + (set! a0-14 (the-as none s4-1)) + (call!) + (set! v0-5 (the-as none (l.wu (+ s4-1 4)))) + (set! v1-28 (the-as none (l.wu (+ s4-1 4)))) + (set! a0-15 (the-as none #x20000000)) + (s.d! v1-28 a0-15) + (s.w! (+ v1-28 8) 0) + (s.w! (+ v1-28 12) 0) + (set! v1-29 (the-as none (+ v1-28 16))) + (s.w! (+ s4-1 4) v1-29) + (set! v1-30 (the-as none (l.wu (+ gp-1 8)))) + (s.w! (+ v1-30 4) s5-1) + (s.w! (+ gp-1 8) v0-5) + ) + ) + ) + (ret-none) + ) + +;; definition of type tie-init-data +(deftype tie-init-data (structure) + ((tie-bucket bucket-id) + (tie-scissor-bucket bucket-id) + (tie-envmap-bucket bucket-id) + (tie-envmap-scissor-bucket bucket-id) + (tie-vanish-bucket bucket-id) + (tie-trans-bucket bucket-id) + (tie-scissor-trans-bucket bucket-id) + (tie-envmap-trans-bucket bucket-id) + (tie-envmap-scissor-trans-bucket bucket-id) + (tie-water-bucket bucket-id) + (tie-scissor-water-bucket bucket-id) + (tie-envmap-water-bucket bucket-id) + (tie-envmap-scissor-water-bucket bucket-id) + ) + ) + +;; definition for method 3 of type tie-init-data +(defmethod inspect ((this tie-init-data)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'tie-init-data) + (format #t "~1Ttie-bucket: ~D~%" (-> this tie-bucket)) + (format #t "~1Ttie-scissor-bucket: ~D~%" (-> this tie-scissor-bucket)) + (format #t "~1Ttie-envmap-bucket: ~D~%" (-> this tie-envmap-bucket)) + (format #t "~1Ttie-envmap-scissor-bucket: ~D~%" (-> this tie-envmap-scissor-bucket)) + (format #t "~1Ttie-vanish-bucket: ~D~%" (-> this tie-vanish-bucket)) + (format #t "~1Ttie-trans-bucket: ~D~%" (-> this tie-trans-bucket)) + (format #t "~1Ttie-scissor-trans-bucket: ~D~%" (-> this tie-scissor-trans-bucket)) + (format #t "~1Ttie-envmap-trans-bucket: ~D~%" (-> this tie-envmap-trans-bucket)) + (format #t "~1Ttie-envmap-scissor-trans-bucket: ~D~%" (-> this tie-envmap-scissor-trans-bucket)) + (format #t "~1Ttie-water-bucket: ~D~%" (-> this tie-water-bucket)) + (format #t "~1Ttie-scissor-water-bucket: ~D~%" (-> this tie-scissor-water-bucket)) + (format #t "~1Ttie-envmap-water-bucket: ~D~%" (-> this tie-envmap-water-bucket)) + (format #t "~1Ttie-envmap-scissor-water-bucket: ~D~%" (-> this tie-envmap-scissor-water-bucket)) + (label cfg-4) + this + ) + +;; definition for symbol *tie-init-table*, type (inline-array tie-init-data) +(define *tie-init-table* (new 'static 'inline-array tie-init-data 10 + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l0-tfrag) + :tie-scissor-bucket (bucket-id tie-scissor-l0-tfrag) + :tie-envmap-bucket (bucket-id etie-l0-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-scissor-l0-tfrag) + :tie-vanish-bucket (bucket-id tie-vanish-l0-tfrag) + :tie-trans-bucket (bucket-id tie-l0-alpha) + :tie-scissor-trans-bucket (bucket-id tie-scissor-l0-alpha) + :tie-envmap-trans-bucket (bucket-id etie-l0-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-scissor-l0-alpha) + :tie-water-bucket (bucket-id tie-l0-water) + :tie-scissor-water-bucket (bucket-id tie-scissor-l0-water) + :tie-envmap-water-bucket (bucket-id etie-l0-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-scissor-l0-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l1-tfrag) + :tie-scissor-bucket (bucket-id tie-scissor-l1-tfrag) + :tie-envmap-bucket (bucket-id etie-l1-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-scissor-l1-tfrag) + :tie-vanish-bucket (bucket-id tie-vanish-l1-tfrag) + :tie-trans-bucket (bucket-id tie-l1-alpha) + :tie-scissor-trans-bucket (bucket-id tie-scissor-l1-alpha) + :tie-envmap-trans-bucket (bucket-id etie-l1-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-scissor-l1-alpha) + :tie-water-bucket (bucket-id tie-l1-water) + :tie-scissor-water-bucket (bucket-id tie-scissor-l1-water) + :tie-envmap-water-bucket (bucket-id etie-l1-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-scissor-l1-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l2-tfrag) + :tie-scissor-bucket (bucket-id tie-scissor-l2-tfrag) + :tie-envmap-bucket (bucket-id etie-l2-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-scissor-l2-tfrag) + :tie-vanish-bucket (bucket-id tie-vanish-l2-tfrag) + :tie-trans-bucket (bucket-id tie-l2-alpha) + :tie-scissor-trans-bucket (bucket-id tie-scissor-l2-alpha) + :tie-envmap-trans-bucket (bucket-id etie-l2-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-scissor-l2-alpha) + :tie-water-bucket (bucket-id tie-l2-water) + :tie-scissor-water-bucket (bucket-id tie-scissor-l2-water) + :tie-envmap-water-bucket (bucket-id etie-l2-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-scissor-l2-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l3-tfrag) + :tie-scissor-bucket (bucket-id tie-scissor-l3-tfrag) + :tie-envmap-bucket (bucket-id etie-l3-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-scissor-l3-tfrag) + :tie-vanish-bucket (bucket-id tie-vanish-l3-tfrag) + :tie-trans-bucket (bucket-id tie-l3-alpha) + :tie-scissor-trans-bucket (bucket-id tie-scissor-l3-alpha) + :tie-envmap-trans-bucket (bucket-id etie-l3-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-scissor-l3-alpha) + :tie-water-bucket (bucket-id tie-l3-water) + :tie-scissor-water-bucket (bucket-id tie-scissor-l3-water) + :tie-envmap-water-bucket (bucket-id etie-l3-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-scissor-l3-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l4-tfrag) + :tie-scissor-bucket (bucket-id tie-scissor-l4-tfrag) + :tie-envmap-bucket (bucket-id etie-l4-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-scissor-l4-tfrag) + :tie-vanish-bucket (bucket-id tie-vanish-l4-tfrag) + :tie-trans-bucket (bucket-id tie-l4-alpha) + :tie-scissor-trans-bucket (bucket-id tie-scissor-l4-alpha) + :tie-envmap-trans-bucket (bucket-id etie-l4-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-scissor-l4-alpha) + :tie-water-bucket (bucket-id tie-l4-water) + :tie-scissor-water-bucket (bucket-id tie-scissor-l4-water) + :tie-envmap-water-bucket (bucket-id etie-l4-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-scissor-l4-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l5-tfrag) + :tie-scissor-bucket (bucket-id tie-scissor-l5-tfrag) + :tie-envmap-bucket (bucket-id etie-l5-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-scissor-l5-tfrag) + :tie-vanish-bucket (bucket-id tie-vanish-l5-tfrag) + :tie-trans-bucket (bucket-id tie-l5-alpha) + :tie-scissor-trans-bucket (bucket-id tie-scissor-l5-alpha) + :tie-envmap-trans-bucket (bucket-id etie-l5-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-scissor-l5-alpha) + :tie-water-bucket (bucket-id tie-l5-water) + :tie-scissor-water-bucket (bucket-id tie-scissor-l5-water) + :tie-envmap-water-bucket (bucket-id etie-l5-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-scissor-l5-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l6-tfrag) + :tie-scissor-bucket (bucket-id tie-scissor-l6-tfrag) + :tie-envmap-bucket (bucket-id etie-l6-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-scissor-l6-tfrag) + :tie-vanish-bucket (bucket-id tie-vanish-l6-tfrag) + :tie-trans-bucket (bucket-id tie-l6-alpha) + :tie-scissor-trans-bucket (bucket-id tie-scissor-l6-alpha) + :tie-envmap-trans-bucket (bucket-id etie-l6-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-scissor-l6-alpha) + :tie-water-bucket (bucket-id tie-l6-water) + :tie-scissor-water-bucket (bucket-id tie-scissor-l6-water) + :tie-envmap-water-bucket (bucket-id etie-l6-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-scissor-l6-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l7-tfrag) + :tie-scissor-bucket (bucket-id tie-scissor-l7-tfrag) + :tie-envmap-bucket (bucket-id etie-l7-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-scissor-l7-tfrag) + :tie-vanish-bucket (bucket-id tie-vanish-l7-tfrag) + :tie-trans-bucket (bucket-id tie-l7-alpha) + :tie-scissor-trans-bucket (bucket-id tie-scissor-l7-alpha) + :tie-envmap-trans-bucket (bucket-id etie-l7-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-scissor-l7-alpha) + :tie-water-bucket (bucket-id tie-l7-water) + :tie-scissor-water-bucket (bucket-id tie-scissor-l7-water) + :tie-envmap-water-bucket (bucket-id etie-l7-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-scissor-l7-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l8-tfrag) + :tie-scissor-bucket (bucket-id tie-scissor-l8-tfrag) + :tie-envmap-bucket (bucket-id etie-l8-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-scissor-l8-tfrag) + :tie-vanish-bucket (bucket-id tie-vanish-l8-tfrag) + :tie-trans-bucket (bucket-id tie-l8-alpha) + :tie-scissor-trans-bucket (bucket-id tie-scissor-l8-alpha) + :tie-envmap-trans-bucket (bucket-id etie-l8-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-scissor-l8-alpha) + :tie-water-bucket (bucket-id tie-l8-water) + :tie-scissor-water-bucket (bucket-id tie-scissor-l8-water) + :tie-envmap-water-bucket (bucket-id etie-l8-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-scissor-l8-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l9-tfrag) + :tie-scissor-bucket (bucket-id tie-scissor-l9-tfrag) + :tie-envmap-bucket (bucket-id etie-l9-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-scissor-l9-tfrag) + :tie-vanish-bucket (bucket-id tie-vanish-l9-tfrag) + :tie-trans-bucket (bucket-id tie-l9-alpha) + :tie-scissor-trans-bucket (bucket-id tie-scissor-l9-alpha) + :tie-envmap-trans-bucket (bucket-id etie-l9-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-scissor-l9-alpha) + :tie-water-bucket (bucket-id tie-l9-water) + :tie-scissor-water-bucket (bucket-id tie-scissor-l9-water) + :tie-envmap-water-bucket (bucket-id etie-l9-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-scissor-l9-water) + ) + ) + ) + +;; definition for function tie-vu1-init-buffers +;; WARN: Return type mismatch symbol vs none. +(defun tie-vu1-init-buffers () + (let ((gp-0 0) + (s5-0 100) + (s4-0 68) + ) + (dotimes (s3-0 10) + (let ((v1-2 (-> *level* draw-level s3-0)) + (s2-0 (-> *tie-init-table* s3-0)) + ) + (when v1-2 + (tie-init-buf + (-> s2-0 tie-bucket) + (the-as gs-alpha gp-0) + (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (let ((t9-1 tie-init-scissor-buf) + (a0-3 (-> s2-0 tie-scissor-bucket)) + (a1-2 0) + (a2-1 #x5026b) + (a3-1 #x50000) + ) + (t9-1 a0-3 (the-as gs-alpha a1-2) (the-as gs-test a2-1) (the-as gs-test a3-1)) + (tie-init-envmap-buf + (-> s2-0 tie-envmap-bucket) + (the-as gs-alpha gp-0) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (tie-init-envmap-scissor-buf (-> s2-0 tie-envmap-scissor-bucket) (the-as gs-alpha gp-0) #x50000 a3-1) + ) + (tie-init-buf + (-> s2-0 tie-vanish-bucket) + (the-as gs-alpha s5-0) + (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (tie-init-buf + (-> s2-0 tie-trans-bucket) + (the-as gs-alpha s4-0) + (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (let ((t9-6 tie-init-scissor-buf) + (a0-8 (-> s2-0 tie-scissor-trans-bucket)) + (a1-7 1) + (a2-6 #x5026b) + (a3-4 #x50000) + ) + (t9-6 a0-8 (the-as gs-alpha a1-7) (the-as gs-test a2-6) (the-as gs-test a3-4)) + (tie-init-envmap-buf + (-> s2-0 tie-envmap-trans-bucket) + (the-as gs-alpha s4-0) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (tie-init-envmap-scissor-buf (-> s2-0 tie-envmap-scissor-trans-bucket) (the-as gs-alpha s4-0) #x50000 a3-4) + ) + (tie-init-buf + (-> s2-0 tie-water-bucket) + (the-as gs-alpha s4-0) + (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest greater-equal)) + (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (let ((t9-10 tie-init-scissor-buf) + (a0-12 (-> s2-0 tie-scissor-water-bucket)) + (a1-11 1) + (a2-10 #x51001) + (a3-6 #x51001) + ) + (t9-10 a0-12 (the-as gs-alpha a1-11) (the-as gs-test a2-10) (the-as gs-test a3-6)) + (tie-init-envmap-buf + (-> s2-0 tie-envmap-water-bucket) + (the-as gs-alpha s4-0) + (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (tie-init-envmap-scissor-buf (-> s2-0 tie-envmap-scissor-water-bucket) (the-as gs-alpha s4-0) #x51001 a3-6) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 10 of type drawable-tree-instance-tie +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this drawable-tree-instance-tie)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + (let ((v1-1 (-> *background-work* tie-tree-count)) + (a1-3 (-> *level* draw-level *draw-index*)) + ) + (set! (-> *background-work* tie-trees v1-1) this) + (set! (-> *background-work* tie-levels v1-1) a1-3) + ) + (+! (-> *background-work* tie-tree-count) 1) + 0 + (none) + ) + +;; definition for method 13 of type drawable-tree-instance-tie +;; WARN: Return type mismatch int vs none. +(defmethod collect-stats ((this drawable-tree-instance-tie)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + (when (logtest? (vu1-renderer-mask + tie-scissor + tie + etie + tie-vanish + generic + tie-scissor-trans + tie-trans + etie-trans + tie-scissor-water + tie-water + etie-water + ) + (-> *display* vu1-enable-user) + ) + (-> this data (+ (-> this length) -1)) + (let ((v1-9 (-> this prototypes prototype-array-tie))) + (dotimes (a0-1 (-> v1-9 length)) + (let ((a1-4 (-> v1-9 array-data a0-1))) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask generic)) + (let ((a2-4 0) + (a3-0 2) + ) + (while (>= a3-0 a2-4) + (let ((t0-2 (-> a1-4 generic-count a2-4)) + (t2-0 (-> a1-4 tie-geom (+ a2-4 1))) + ) + (when (nonzero? t0-2) + (let ((t1-4 (the-as object (-> t2-0 data))) + (t2-1 (-> t2-0 length)) + ) + (+! (-> *terrain-stats* tie-generic groups) 1) + (+! (-> *terrain-stats* tie-generic fragments) t2-1) + (+! (-> *terrain-stats* tie-generic instances) t0-2) + (dotimes (t3-9 t2-1) + (let ((t5-0 (* (-> (the-as tie-fragment t1-4) debug num-tris) t0-2)) + (t4-7 (* (-> (the-as tie-fragment t1-4) debug num-dverts) t0-2)) + ) + (+! (-> *terrain-stats* tie-generic tris) t5-0) + (+! (-> *terrain-stats* tie-generic dverts) t4-7) + ) + (set! t1-4 (&+ (the-as tie-fragment t1-4) 64)) + ) + ) + ) + ) + (+! a2-4 1) + ) + ) + ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie-vanish)) + (let ((a2-11 (-> a1-4 vanish-count)) + (t0-4 (-> a1-4 tie-geom 3)) + ) + (when (nonzero? a2-11) + (let ((a3-2 (the-as object (-> t0-4 data))) + (t0-5 (-> t0-4 length)) + ) + (+! (-> *terrain-stats* tie-vanish groups) 1) + (+! (-> *terrain-stats* tie-vanish fragments) t0-5) + (+! (-> *terrain-stats* tie-vanish instances) a2-11) + (dotimes (t1-15 t0-5) + (let ((t3-10 (* (-> (the-as tie-fragment a3-2) debug num-tris) a2-11)) + (t2-9 (* (-> (the-as tie-fragment a3-2) debug num-dverts) a2-11)) + ) + (+! (-> *terrain-stats* tie-vanish tris) t3-10) + (+! (-> *terrain-stats* tie-vanish dverts) t2-9) + ) + (set! a3-2 (&+ (the-as tie-fragment a3-2) 64)) + ) + ) + ) + ) + ) + (cond + ((logtest? (-> a1-4 flags) (prototype-flags tpage-water)) + (when (logtest? (vu1-renderer-mask tie-water) (-> *display* vu1-enable-user)) + (let ((a2-18 1) + (a3-6 3) + ) + (while (>= a3-6 a2-18) + (let ((t0-8 (-> a1-4 count a2-18)) + (t2-11 (-> a1-4 tie-geom a2-18)) + ) + (when (nonzero? t0-8) + (let ((t1-19 (the-as object (-> t2-11 data))) + (t2-12 (-> t2-11 length)) + ) + (+! (-> *terrain-stats* tie-water groups) 1) + (+! (-> *terrain-stats* tie-water fragments) t2-12) + (+! (-> *terrain-stats* tie-water instances) t0-8) + (dotimes (t3-24 t2-12) + (let ((t5-5 (* (-> (the-as tie-fragment t1-19) debug num-tris) t0-8)) + (t4-19 (* (-> (the-as tie-fragment t1-19) debug num-dverts) t0-8)) + ) + (+! (-> *terrain-stats* tie-water tris) t5-5) + (+! (-> *terrain-stats* tie-water dverts) t4-19) + ) + (set! t1-19 (&+ (the-as tie-fragment t1-19) 64)) + ) + ) + ) + ) + (+! a2-18 1) + ) + ) + ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie-scissor)) + (let ((a2-25 (-> a1-4 tie-scissor-count)) + (t0-10 (-> a1-4 tie-geom 0)) + ) + (when (nonzero? a2-25) + (let ((a3-8 (the-as object (-> t0-10 data))) + (t0-11 (-> t0-10 length)) + ) + (+! (-> *terrain-stats* tie-scissor-water groups) 1) + (+! (-> *terrain-stats* tie-scissor-water fragments) t0-11) + (+! (-> *terrain-stats* tie-scissor-water instances) a2-25) + (dotimes (t1-30 t0-11) + (let ((t3-25 (* (-> (the-as tie-fragment a3-8) debug num-tris) a2-25)) + (t2-20 (* (-> (the-as tie-fragment a3-8) debug num-dverts) a2-25)) + ) + (+! (-> *terrain-stats* tie-scissor-water tris) t3-25) + (+! (-> *terrain-stats* tie-scissor-water dverts) t2-20) + ) + (set! a3-8 (&+ (the-as tie-fragment a3-8) 64)) + ) + ) + ) + ) + ) + (when (logtest? (vu1-renderer-mask etie-water) (-> *display* vu1-enable-user)) + (let ((a2-30 1) + (a3-12 3) + ) + (while (>= a3-12 a2-30) + (let ((t0-14 (-> a1-4 envmap-count a2-30)) + (t2-22 (-> a1-4 tie-geom a2-30)) + ) + (when (nonzero? t0-14) + (let ((t1-34 (the-as object (-> t2-22 data))) + (t2-23 (-> t2-22 length)) + ) + (+! (-> *terrain-stats* tie-envmap-water groups) 1) + (+! (-> *terrain-stats* tie-envmap-water fragments) t2-23) + (+! (-> *terrain-stats* tie-envmap-water instances) t0-14) + (dotimes (t3-39 t2-23) + (let ((t5-10 (* (* t0-14 (-> (the-as tie-fragment t1-34) debug num-tris)) 2)) + (t4-33 (* (* t0-14 (-> (the-as tie-fragment t1-34) debug num-dverts)) 2)) + ) + (+! (-> *terrain-stats* tie-envmap-water tris) t5-10) + (+! (-> *terrain-stats* tie-envmap-water dverts) t4-33) + ) + (set! t1-34 (&+ (the-as tie-fragment t1-34) 64)) + ) + ) + ) + ) + (+! a2-30 1) + ) + ) + ) + (when (logtest? (vu1-renderer-mask etie-scissor-water) (-> *display* vu1-enable-user)) + (let ((a2-35 (-> a1-4 envmap-scissor-count)) + (t0-16 (-> a1-4 tie-geom 0)) + ) + (when (nonzero? a2-35) + (let ((a1-5 (the-as object (-> t0-16 data))) + (a3-17 (-> t0-16 length)) + ) + (+! (-> *terrain-stats* tie-envmap-scissor-water groups) 1) + (+! (-> *terrain-stats* tie-envmap-scissor-water fragments) a3-17) + (+! (-> *terrain-stats* tie-envmap-scissor-water instances) a2-35) + (dotimes (t0-26 a3-17) + (let ((t2-24 (* (* a2-35 (-> (the-as tie-fragment a1-5) debug num-tris)) 2)) + (t1-45 (* (* a2-35 (-> (the-as tie-fragment a1-5) debug num-dverts)) 2)) + ) + (+! (-> *terrain-stats* tie-envmap-scissor-water tris) t2-24) + (+! (-> *terrain-stats* tie-envmap-scissor-water dverts) t1-45) + ) + (set! a1-5 (&+ (the-as tie-fragment a1-5) 64)) + ) + ) + ) + ) + ) + ) + ((logtest? (-> a1-4 flags) (prototype-flags tpage-alpha)) + (when (logtest? (vu1-renderer-mask tie-trans) (-> *display* vu1-enable-user)) + (let ((a2-41 1) + (a3-21 3) + ) + (while (>= a3-21 a2-41) + (let ((t0-29 (-> a1-4 count a2-41)) + (t2-29 (-> a1-4 tie-geom a2-41)) + ) + (when (nonzero? t0-29) + (let ((t1-50 (the-as object (-> t2-29 data))) + (t2-30 (-> t2-29 length)) + ) + (+! (-> *terrain-stats* tie-trans groups) 1) + (+! (-> *terrain-stats* tie-trans fragments) t2-30) + (+! (-> *terrain-stats* tie-trans instances) t0-29) + (dotimes (t3-52 t2-30) + (let ((t5-15 (* (-> (the-as tie-fragment t1-50) debug num-tris) t0-29)) + (t4-42 (* (-> (the-as tie-fragment t1-50) debug num-dverts) t0-29)) + ) + (+! (-> *terrain-stats* tie-trans tris) t5-15) + (+! (-> *terrain-stats* tie-trans dverts) t4-42) + ) + (set! t1-50 (&+ (the-as tie-fragment t1-50) 64)) + ) + ) + ) + ) + (+! a2-41 1) + ) + ) + ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie-scissor)) + (let ((a2-48 (-> a1-4 tie-scissor-count)) + (t0-31 (-> a1-4 tie-geom 0)) + ) + (when (nonzero? a2-48) + (let ((a3-23 (the-as object (-> t0-31 data))) + (t0-32 (-> t0-31 length)) + ) + (+! (-> *terrain-stats* tie-scissor-trans groups) 1) + (+! (-> *terrain-stats* tie-scissor-trans fragments) t0-32) + (+! (-> *terrain-stats* tie-scissor-trans instances) a2-48) + (dotimes (t1-61 t0-32) + (let ((t3-53 (* (-> (the-as tie-fragment a3-23) debug num-tris) a2-48)) + (t2-38 (* (-> (the-as tie-fragment a3-23) debug num-dverts) a2-48)) + ) + (+! (-> *terrain-stats* tie-scissor-trans tris) t3-53) + (+! (-> *terrain-stats* tie-scissor-trans dverts) t2-38) + ) + (set! a3-23 (&+ (the-as tie-fragment a3-23) 64)) + ) + ) + ) + ) + ) + (when (logtest? (vu1-renderer-mask etie-trans) (-> *display* vu1-enable-user)) + (let ((a2-53 1) + (a3-27 3) + ) + (while (>= a3-27 a2-53) + (let ((t0-35 (-> a1-4 envmap-count a2-53)) + (t2-40 (-> a1-4 tie-geom a2-53)) + ) + (when (nonzero? t0-35) + (let ((t1-65 (the-as object (-> t2-40 data))) + (t2-41 (-> t2-40 length)) + ) + (+! (-> *terrain-stats* tie-envmap-trans groups) 1) + (+! (-> *terrain-stats* tie-envmap-trans fragments) t2-41) + (+! (-> *terrain-stats* tie-envmap-trans instances) t0-35) + (dotimes (t3-67 t2-41) + (let ((t5-20 (* (* t0-35 (-> (the-as tie-fragment t1-65) debug num-tris)) 2)) + (t4-56 (* (* t0-35 (-> (the-as tie-fragment t1-65) debug num-dverts)) 2)) + ) + (+! (-> *terrain-stats* tie-envmap-trans tris) t5-20) + (+! (-> *terrain-stats* tie-envmap-trans dverts) t4-56) + ) + (set! t1-65 (&+ (the-as tie-fragment t1-65) 64)) + ) + ) + ) + ) + (+! a2-53 1) + ) + ) + ) + (when (logtest? (vu1-renderer-mask etie-scissor-trans) (-> *display* vu1-enable-user)) + (let ((a2-58 (-> a1-4 envmap-scissor-count)) + (t0-37 (-> a1-4 tie-geom 0)) + ) + (when (nonzero? a2-58) + (let ((a1-7 (the-as object (-> t0-37 data))) + (a3-32 (-> t0-37 length)) + ) + (+! (-> *terrain-stats* tie-envmap-scissor-trans groups) 1) + (+! (-> *terrain-stats* tie-envmap-scissor-trans fragments) a3-32) + (+! (-> *terrain-stats* tie-envmap-scissor-trans instances) a2-58) + (dotimes (t0-47 a3-32) + (let ((t2-42 (* (* a2-58 (-> (the-as tie-fragment a1-7) debug num-tris)) 2)) + (t1-76 (* (* a2-58 (-> (the-as tie-fragment a1-7) debug num-dverts)) 2)) + ) + (+! (-> *terrain-stats* tie-envmap-scissor-trans tris) t2-42) + (+! (-> *terrain-stats* tie-envmap-scissor-trans dverts) t1-76) + ) + (set! a1-7 (&+ (the-as tie-fragment a1-7) 64)) + ) + ) + ) + ) + ) + ) + (else + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie)) + (let ((a2-63 1) + (a3-34 3) + ) + (while (>= a3-34 a2-63) + (let ((t0-50 (-> a1-4 count a2-63)) + (t2-47 (-> a1-4 tie-geom a2-63)) + ) + (when (nonzero? t0-50) + (let ((t1-81 (the-as object (-> t2-47 data))) + (t2-48 (-> t2-47 length)) + ) + (+! (-> *terrain-stats* tie groups) 1) + (+! (-> *terrain-stats* tie fragments) t2-48) + (+! (-> *terrain-stats* tie instances) t0-50) + (dotimes (t3-80 t2-48) + (let ((t5-25 (* (-> (the-as tie-fragment t1-81) debug num-tris) t0-50)) + (t4-65 (* (-> (the-as tie-fragment t1-81) debug num-dverts) t0-50)) + ) + (+! (-> *terrain-stats* tie tris) t5-25) + (+! (-> *terrain-stats* tie dverts) t4-65) + ) + (set! t1-81 (&+ (the-as tie-fragment t1-81) 64)) + ) + ) + ) + ) + (+! a2-63 1) + ) + ) + ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie-scissor)) + (let ((a2-70 (-> a1-4 tie-scissor-count)) + (t0-52 (-> a1-4 tie-geom 0)) + ) + (when (nonzero? a2-70) + (let ((a3-36 (the-as object (-> t0-52 data))) + (t0-53 (-> t0-52 length)) + ) + (+! (-> *terrain-stats* tie-scissor groups) 1) + (+! (-> *terrain-stats* tie-scissor fragments) t0-53) + (+! (-> *terrain-stats* tie-scissor instances) a2-70) + (dotimes (t1-92 t0-53) + (let ((t3-81 (* (-> (the-as tie-fragment a3-36) debug num-tris) a2-70)) + (t2-56 (* (-> (the-as tie-fragment a3-36) debug num-dverts) a2-70)) + ) + (+! (-> *terrain-stats* tie-scissor tris) t3-81) + (+! (-> *terrain-stats* tie-scissor dverts) t2-56) + ) + (set! a3-36 (&+ (the-as tie-fragment a3-36) 64)) + ) + ) + ) + ) + ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask etie)) + (let ((a2-76 1) + (a3-38 3) + ) + (while (>= a3-38 a2-76) + (let ((t0-56 (-> a1-4 envmap-count a2-76)) + (t2-58 (-> a1-4 tie-geom a2-76)) + ) + (when (nonzero? t0-56) + (let ((t1-96 (the-as object (-> t2-58 data))) + (t2-59 (-> t2-58 length)) + ) + (+! (-> *terrain-stats* tie-envmap groups) 1) + (+! (-> *terrain-stats* tie-envmap fragments) t2-59) + (+! (-> *terrain-stats* tie-envmap instances) t0-56) + (dotimes (t3-95 t2-59) + (let ((t5-30 (* (* t0-56 (-> (the-as tie-fragment t1-96) debug num-tris)) 2)) + (t4-79 (* (* t0-56 (-> (the-as tie-fragment t1-96) debug num-dverts)) 2)) + ) + (+! (-> *terrain-stats* tie-envmap tris) t5-30) + (+! (-> *terrain-stats* tie-envmap dverts) t4-79) + ) + (set! t1-96 (&+ (the-as tie-fragment t1-96) 64)) + ) + ) + ) + ) + (+! a2-76 1) + ) + ) + ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask etie-scissor)) + (let ((a2-82 (-> a1-4 envmap-scissor-count)) + (t0-58 (-> a1-4 tie-geom 0)) + ) + (when (nonzero? a2-82) + (let ((a1-9 (the-as object (-> t0-58 data))) + (a3-41 (-> t0-58 length)) + ) + (+! (-> *terrain-stats* tie-envmap-scissor groups) 1) + (+! (-> *terrain-stats* tie-envmap-scissor fragments) a3-41) + (+! (-> *terrain-stats* tie-envmap-scissor instances) a2-82) + (dotimes (t0-68 a3-41) + (let ((t2-60 (* (* a2-82 (-> (the-as tie-fragment a1-9) debug num-tris)) 2)) + (t1-107 (* (* a2-82 (-> (the-as tie-fragment a1-9) debug num-dverts)) 2)) + ) + (+! (-> *terrain-stats* tie-envmap-scissor tris) t2-60) + (+! (-> *terrain-stats* tie-envmap-scissor dverts) t1-107) + ) + (set! a1-9 (&+ (the-as tie-fragment a1-9) 64)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 14 of type drawable-tree-instance-tie +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this drawable-tree-instance-tie)) + "Debug-draw a drawable and its children. Typically uses the debug-draw functions." + (-> this data (+ (-> this length) -1)) + (let* ((gp-0 (-> this prototypes prototype-array-tie)) + (s5-0 (-> gp-0 length)) + ) + (dotimes (s4-0 s5-0) + (debug-draw (-> gp-0 array-data s4-0 tie-geom 0)) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/background/tie/tie-work_REF.gc b/test/decompiler/reference/jak3/engine/gfx/background/tie/tie-work_REF.gc new file mode 100644 index 0000000000..a09fa1ba47 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/background/tie/tie-work_REF.gc @@ -0,0 +1,176 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *instance-tie-work*, type instance-tie-work +(define *instance-tie-work* (new 'static 'instance-tie-work + :wind-const (new 'static 'vector :x 0.5 :y 100.0 :z 0.0166 :w -1.0) + :constant (new 'static 'vector :x 4096.0 :y 128.0) + :far-morph (new 'static 'vector :x 1.0 :w 256.0) + :upload-color-0 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x80c6 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :upload-color-1 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :cmd (vif-cmd stmod)) + :vif1 (new 'static 'vif-tag :imm #xc0cc :cmd (vif-cmd unpack-v4-8)) + ) + :upload-color-2 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :cmd (vif-cmd stmod)) + ) + :upload-color-ret (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ret)) + :vif0 (new 'static 'vif-tag :cmd (vif-cmd stmod)) + ) + :generic-color-0 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x3) + ) + :generic-color-1 (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref))) + :generic-color-end (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id end))) + :envmap-color-0 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x8 :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x8000 :num #x8 :cmd (vif-cmd unpack-v4-32)) + ) + :envmap-color-1 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :cmd (vif-cmd stmod)) + :vif1 (new 'static 'vif-tag :imm #xc008 :cmd (vif-cmd unpack-v4-8)) + ) + :refl-fade-fac -0.000625 + :refl-fade-end 409600.0 + :use-etie #t + ) + ) + +;; failed to figure out what this is: +(set! (-> *instance-tie-work* upload-color-2 vif1) (new 'static 'vif-tag :cmd (vif-cmd mscal) :msk #x1)) + +;; failed to figure out what this is: +(set! (-> *instance-tie-work* upload-color-ret vif1) (new 'static 'vif-tag :cmd (vif-cmd mscal) :msk #x1)) + +;; definition for symbol *prototype-tie-work*, type prototype-tie-work +(define *prototype-tie-work* (new 'static 'prototype-tie-work + :upload-flushe (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :cmd (vif-cmd flushe) :msk #x1) + ) + :upload-palette (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x20 :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x1 :cmd (vif-cmd stmod)) + :vif1 (new 'static 'vif-tag :imm #x4346 :num #x80 :cmd (vif-cmd unpack-v4-8)) + ) + :upload-model-0 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :cmd (vif-cmd stmod)) + :vif1 (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32)) + ) + :upload-model-1 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x4000 :cmd (vif-cmd unpack-v4-8)) + ) + :upload-model-2 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x32 :cmd (vif-cmd unpack-v4-16)) + ) + :upload-model-3 (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id call))) + :upload-model-near-0 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :cmd (vif-cmd stmod)) + :vif1 (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32)) + ) + :upload-model-near-1 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x4000 :cmd (vif-cmd unpack-v4-8)) + ) + :upload-model-near-2 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x1e :cmd (vif-cmd unpack-v4-8)) + ) + :upload-model-near-3 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x32 :cmd (vif-cmd unpack-v4-16)) + ) + :upload-model-near-4 (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id call))) + :envmap-palette (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x20 :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x1 :cmd (vif-cmd stmod)) + :vif1 (new 'static 'vif-tag :imm #x4302 :num #x80 :cmd (vif-cmd unpack-v4-8)) + ) + :envmap-shader (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x5 :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :cmd (vif-cmd stmod)) + :vif1 (new 'static 'vif-tag :imm #x387 :num #x5 :cmd (vif-cmd unpack-v4-32)) + ) + :upload-envmap-0 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #xb8 :cmd (vif-cmd base)) + :vif1 (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32)) + ) + :upload-envmap-1 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x20 :cmd (vif-cmd offset)) + :vif1 (new 'static 'vif-tag :imm #x4000 :cmd (vif-cmd unpack-v4-8)) + ) + :upload-envmap-2 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x20 :cmd (vif-cmd unpack-v4-16)) + ) + :upload-envmap-3 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x84 :cmd (vif-cmd unpack-v4-8)) + ) + :upload-envmap-4 (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id call))) + :upload-envmap-scissor-4 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #xac :cmd (vif-cmd unpack-v4-8)) + ) + :generic-palette (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x20 :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x1) + ) + :generic-model-0 (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x2) + ) + :generic-model-1 (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref))) + :generic-model-2 (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref))) + :model-next (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id next))) + :clamp #x8000ff00ff00ff + ) + ) + +;; failed to figure out what this is: +(set! (-> *prototype-tie-work* upload-model-1 vif0) + (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd mscal) :msk #x1) + ) + +;; failed to figure out what this is: +(set! (-> *prototype-tie-work* upload-model-3 vif0) + (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd mscal) :msk #x1) + ) + +;; failed to figure out what this is: +(set! (-> *prototype-tie-work* upload-model-near-1 vif0) + (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd mscal) :msk #x1) + ) + +;; failed to figure out what this is: +(set! (-> *prototype-tie-work* upload-model-near-4 vif0) + (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd mscal) :msk #x1) + ) + +;; failed to figure out what this is: +(set! (-> *prototype-tie-work* upload-envmap-2 vif0) + (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd mscalf) :msk #x1) + ) + +;; failed to figure out what this is: +(set! (-> *prototype-tie-work* upload-envmap-4 vif1) + (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/background/tie/tie_REF.gc b/test/decompiler/reference/jak3/engine/gfx/background/tie/tie_REF.gc new file mode 100644 index 0000000000..e05fe8c6a1 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/background/tie/tie_REF.gc @@ -0,0 +1,724 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 9 of type tie-fragment +(defmethod login ((this tie-fragment)) + "Initialize the object after it is loaded." + (let ((s5-0 (the-as adgif-shader (-> this gif-ref))) + (s4-0 (/ (-> this tex-count) (the-as uint 5))) + ) + (dotimes (s3-0 (the-as int s4-0)) + (let ((v1-1 (adgif-shader-login-no-remap s5-0))) + (when v1-1 + (dotimes (a0-4 3) + (dotimes (a1-0 3) + (set! (-> (the-as (pointer int32) (+ (+ (* a0-4 16) (* a1-0 4)) (the-as int *texture-masks*)))) + (logior (-> (the-as (pointer int32) (+ (* a1-0 4) (the-as int *texture-masks*) (* a0-4 16))) 0) + (-> (the-as (pointer int32) (+ (* a1-0 4) (the-as int v1-1) (* a0-4 16))) 15) + ) + ) + ) + (set! (-> *texture-masks* data a0-4 dist) + (fmax (-> *texture-masks* data a0-4 dist) (-> v1-1 masks data a0-4 dist)) + ) + ) + ) + ) + (when (= (-> s5-0 reg-4) 66) + (set! (-> s5-0 reg-4) (the-as uint 127)) + (set! (-> s5-0 alpha) (new 'static 'gs-miptbp)) + 0 + ) + (&+! s5-0 80) + ) + ) + this + ) + +;; definition for method 3 of type drawable-inline-array-instance-tie +(defmethod inspect ((this drawable-inline-array-instance-tie)) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~Tlength: ~D~%" (-> this length)) + (format #t "~Tdata[~D]: @ #x~X~%" (-> this length) (-> this data)) + (dotimes (s5-0 (-> this length)) + (format #t "~T [~D] ~A~%" s5-0 (-> this data s5-0)) + ) + this + ) + +;; definition for method 5 of type drawable-inline-array-instance-tie +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this drawable-inline-array-instance-tie)) + (the-as int (+ (-> drawable-inline-array-instance-tie size) (* (+ (-> this length) -1) 64))) + ) + +;; definition for method 9 of type drawable-tree-instance-tie +;; INFO: this function exists in multiple non-identical object files +(defmethod login ((this drawable-tree-instance-tie)) + "Initialize the object after it is loaded." + this + ) + +;; definition for method 9 of type drawable-tree-instance-tie +;; INFO: this function exists in multiple non-identical object files +(defmethod login ((this drawable-tree-instance-tie)) + "Initialize the object after it is loaded." + (dotimes (s5-0 (-> this length)) + (login (-> this data s5-0)) + ) + this + ) + +;; definition for method 3 of type prototype-tie +(defmethod inspect ((this prototype-tie)) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~Tlength: ~D~%" (-> this length)) + (format #t "~Tdata[~D]: @ #x~X~%" (-> this length) (-> this data)) + (dotimes (s5-0 (-> this length)) + (format #t "~T [~D] ~A~%" s5-0 (-> this data s5-0)) + ) + this + ) + +;; definition for method 9 of type prototype-tie +(defmethod login ((this prototype-tie)) + "Initialize the object after it is loaded." + (dotimes (s5-0 (-> this length)) + (login (-> this data s5-0)) + ) + this + ) + +;; definition for method 8 of type drawable-tree-instance-tie +(defmethod mem-usage ((this drawable-tree-instance-tie) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-5 32)) + (+! (-> usage data 0 used) v1-5) + (+! (-> usage data 0 total) (logand -16 (+ v1-5 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this data s3-0) usage flags) + ) + (mem-usage (-> this prototypes prototype-array-tie) usage (logior flags 1)) + this + ) + +;; definition for method 8 of type tie-fragment +(defmethod mem-usage ((this tie-fragment) (usage memory-usage-block) (flags int)) + (when (logtest? flags 2) + (let ((v1-3 (* (-> this color-count) 4)) + (a0-2 (cond + ((logtest? flags 4) + 20 + ) + ((logtest? flags 8) + 21 + ) + (else + 22 + ) + ) + ) + ) + (+! (-> usage data a0-2 count) 1) + (+! (-> usage data a0-2 used) v1-3) + (+! (-> usage data a0-2 total) (logand -4 (+ v1-3 3))) + ) + (set! (-> usage length) (max 23 (-> usage length))) + (set! this this) + (goto cfg-13) + ) + (set! (-> usage length) (max 18 (-> usage length))) + (set! (-> usage data 9 name) "tie-fragment") + (set! (-> usage data 10 name) "tie-gif") + (set! (-> usage data 11 name) "tie-points") + (set! (-> usage data 12 name) "tie-colors") + (set! (-> usage data 14 name) "tie-debug") + (set! (-> usage data 13 name) "tie-draw-points") + (set! (-> usage data 17 name) "tie-generic") + (+! (-> usage data 9 count) 1) + (let ((v1-21 (asize-of this))) + (+! (-> usage data 9 used) v1-21) + (+! (-> usage data 9 total) (logand -16 (+ v1-21 15))) + ) + (let ((v1-26 (* (-> this gif-count) 16))) + (+! (-> usage data 10 count) (-> this tex-count)) + (+! (-> usage data 10 used) v1-26) + (+! (-> usage data 10 total) (logand -16 (+ v1-26 15))) + ) + (let ((v1-31 (* (-> this vertex-count) 16))) + (+! (-> usage data 11 count) (-> this vertex-count)) + (+! (-> usage data 11 used) v1-31) + (+! (-> usage data 11 total) (logand -16 (+ v1-31 15))) + ) + (let ((v1-36 (* (-> this dp-qwc) 16))) + (+! (-> usage data 13 count) (* (-> this dp-qwc) 16)) + (+! (-> usage data 13 used) v1-36) + (+! (-> usage data 13 total) (logand -16 (+ v1-36 15))) + ) + (let ((v1-41 (* (-> this generic-count) 16))) + (+! (-> usage data 17 count) 1) + (+! (-> usage data 17 used) v1-41) + (+! (-> usage data 17 total) (logand -16 (+ v1-41 15))) + ) + (let ((s4-0 (-> this debug debug-lines))) + (when (nonzero? s4-0) + (dotimes (s3-0 (-> s4-0 length)) + (+! (-> usage data 14 count) (-> s4-0 s3-0 length)) + (let ((v1-52 (asize-of (-> s4-0 s3-0)))) + (+! (-> usage data 12 used) v1-52) + (+! (-> usage data 12 total) (logand -16 (+ v1-52 15))) + ) + ) + ) + ) + (label cfg-13) + this + ) + +;; definition for method 8 of type instance-tie +(defmethod mem-usage ((this instance-tie) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 19 (-> usage length))) + (set! (-> usage data 18 name) "instance-tie") + (+! (-> usage data 18 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 18 used) v1-6) + (+! (-> usage data 18 total) (logand -16 (+ v1-6 15))) + ) + (when (nonzero? (-> this color-indices)) + (set! (-> usage length) (max 24 (-> usage length))) + (set! (-> usage data 23 name) "instance-tie-colors*") + (set! (-> usage data 19 name) "instance-tie-colors0") + (set! (-> usage data 20 name) "instance-tie-colors1") + (set! (-> usage data 21 name) "instance-tie-colors2") + (set! (-> usage data 22 name) "instance-tie-colors3") + (+! (-> usage data 23 count) 1) + (let ((s3-0 (-> this bucket-ptr))) + (+ (-> usage data 19 used) (-> usage data 20 used) (-> usage data 21 used) (-> usage data 22 used)) + (dotimes (s2-0 4) + (let ((a0-10 (-> s3-0 tie-geom s2-0))) + (when (nonzero? a0-10) + (let ((t9-1 (method-of-object a0-10 mem-usage)) + (a1-2 usage) + (v1-29 s2-0) + ) + (t9-1 a0-10 a1-2 (logior (logior (cond + ((= v1-29 1) + 4 + ) + ((= v1-29 2) + 8 + ) + ((= v1-29 3) + 16 + ) + (else + 0 + ) + ) + 2 + ) + flags + ) + ) + ) + ) + ) + ) + ) + ) + this + ) + +;; definition for method 8 of type drawable-inline-array-instance-tie +(defmethod mem-usage ((this drawable-inline-array-instance-tie) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-5 32)) + (+! (-> usage data 0 used) v1-5) + (+! (-> usage data 0 total) (logand -16 (+ v1-5 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this data s3-0) usage flags) + ) + this + ) + +;; definition for method 8 of type prototype-tie +(defmethod mem-usage ((this prototype-tie) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-5 32)) + (+! (-> usage data 0 used) v1-5) + (+! (-> usage data 0 total) (logand -16 (+ v1-5 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this data s3-0) usage flags) + ) + this + ) + +;; definition for method 5 of type prototype-tie +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this prototype-tie)) + (the-as int (+ (-> prototype-tie size) (* (+ (-> this length) -1) 64))) + ) + +;; definition of type tie-consts +(deftype tie-consts (structure) + ((data uint32 40) + (vector vector 10 :inline :overlay-at (-> data 0)) + (quads uint128 10 :overlay-at (-> data 0)) + (adgif gs-gif-tag :inline :overlay-at (-> data 0)) + (strgif gs-gif-tag :inline :overlay-at (-> data 4)) + (extra vector :inline :overlay-at (-> data 8)) + (gifbufs vector :inline :overlay-at (-> data 12)) + (clrbufs qword :inline :overlay-at (-> data 16)) + (misc qword :inline :overlay-at (-> data 20)) + (atestgif gs-gif-tag :inline :overlay-at (-> data 24)) + (alpha gs-adcmd :inline :overlay-at (-> data 28)) + (atest gs-adcmd 2 :inline :overlay-at (-> data 32)) + (atest-tra gs-adcmd :inline :overlay-at (-> data 32)) + (atest-def gs-adcmd :inline :overlay-at (-> data 36)) + ) + ) + +;; definition for method 3 of type tie-consts +(defmethod inspect ((this tie-consts)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'tie-consts) + (format #t "~1Tdata[40] @ #x~X~%" (-> this data)) + (format #t "~1Tvector[10] @ #x~X~%" (-> this data)) + (format #t "~1Tquads[10] @ #x~X~%" (-> this data)) + (format #t "~1Tadgif: #~%" (-> this data)) + (format #t "~1Tstrgif: #~%" (-> this strgif)) + (format #t "~1Textra: #~%" (-> this extra)) + (format #t "~1Tgifbufs: #~%" (-> this gifbufs)) + (format #t "~1Tclrbufs: #~%" (-> this clrbufs)) + (format #t "~1Tmisc: #~%" (-> this misc)) + (format #t "~1Tatestgif: #~%" (-> this atestgif)) + (format #t "~1Talpha: #~%" (-> this alpha)) + (format #t "~1Tatest[2] @ #x~X~%" (-> this atest-tra)) + (format #t "~1Tatest-tra: #~%" (-> this atest-tra)) + (format #t "~1Tatest-def: #~%" (-> this atest-def)) + (label cfg-4) + this + ) + +;; definition for symbol tie-vu1-block, type vu-function +(define tie-vu1-block (new 'static 'vu-function :length #x3e7 :qlength #x1f4)) + +;; definition for function tie-init-consts +;; WARN: Return type mismatch int vs none. +(defun tie-init-consts ((arg0 tie-consts) (arg1 gs-alpha) (arg2 gs-test) (arg3 gs-test)) + "Set up tie-consts for VU1" + (set! (-> arg0 adgif tag) (new 'static 'gif-tag64 :nloop #x5 :nreg #x1)) + (set! (-> arg0 adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (case *subdivide-draw-mode* + (((subdivide-setting textured)) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting outline)) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting gouraud)) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting hack)) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :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 strgif regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (let ((f0-0 8388894.0) + (f1-0 8389078.0) + (f2-0 8389262.0) + ) + (set! (-> arg0 gifbufs x) f2-0) + (set! (-> arg0 gifbufs y) f1-0) + (set! (-> arg0 gifbufs z) f2-0) + (set! (-> arg0 gifbufs w) f1-0) + (set! (-> arg0 extra x) (+ f0-0 f1-0 f2-0)) + (set! (-> arg0 extra y) 0.0) + (set! (-> arg0 extra z) (+ f0-0 f1-0 f2-0)) + ) + (set! (-> arg0 clrbufs vector4w x) 198) + (set! (-> arg0 clrbufs vector4w y) 242) + (set! (-> arg0 clrbufs vector4w z) 198) + (set! (-> arg0 clrbufs vector4w w) 242) + (set! (-> arg0 atestgif tag) (new 'static 'gif-tag64 :nloop #x2 :eop #x1 :nreg #x1)) + (set! (-> arg0 atestgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (set! (-> arg0 alpha data) (the-as uint arg1)) + (set! (-> arg0 alpha cmds) (gs-reg64 alpha-1)) + (set! (-> arg0 atest-tra cmds) (gs-reg64 test-1)) + (set! (-> arg0 atest-tra data) (the-as uint arg2)) + (set! (-> arg0 atest-def cmds) (gs-reg64 test-1)) + (set! (-> arg0 atest-def data) (the-as uint arg3)) + (set! (-> arg0 misc vector4w x) 0) + (set! (-> arg0 misc vector4w y) -1) + (none) + ) + +;; definition for function tie-init-engine +;; WARN: Return type mismatch int vs none. +(defun tie-init-engine ((arg0 dma-buffer) (arg1 gs-alpha) (arg2 gs-test) (arg3 gs-test)) + "Set up DMA to initialize TIE vu1." + (let ((v1-0 *display*) + (a0-6 (+ (* (+ (/ (-> tie-vu1-block qlength) 127) 1) 16) 240)) + ) + (+! (-> v1-0 mem-reserve-size) a0-6) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((a2-1 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> a2-1 real-buffer-end) (the-as int (&+ (-> a2-1 base) a0-6))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (dma-buffer-add-vu-function arg0 tie-vu1-block 1) + (let ((s2-0 10)) + (let* ((v1-2 arg0) + (a0-11 (the-as dma-packet (-> v1-2 base))) + ) + (set! (-> a0-11 dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc s2-0)) + (set! (-> a0-11 vif0) (new 'static 'vif-tag :cmd (vif-cmd stmod))) + (set! (-> a0-11 vif1) (new 'static 'vif-tag :imm #x3c6 :cmd (vif-cmd unpack-v4-32) :num s2-0)) + (set! (-> v1-2 base) (the-as pointer (&+ a0-11 16))) + ) + (tie-init-consts (the-as tie-consts (-> arg0 base)) arg1 arg2 arg3) + (&+! (-> arg0 base) (* s2-0 16)) + ) + (let* ((v1-5 arg0) + (a0-15 (the-as dma-packet (-> v1-5 base))) + ) + (set! (-> a0-15 dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> a0-15 vif0) (new 'static 'vif-tag :imm #x8 :cmd (vif-cmd mscalf) :msk #x1)) + (set! (-> a0-15 vif1) (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1)) + (set! (-> v1-5 base) (the-as pointer (&+ a0-15 16))) + ) + (let* ((v1-6 arg0) + (a0-17 (the-as dma-packet (-> v1-6 base))) + ) + (set! (-> a0-17 dma) (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id cnt))) + (set! (-> a0-17 vif0) (new 'static 'vif-tag)) + (set! (-> a0-17 vif1) (new 'static 'vif-tag :cmd (vif-cmd strow) :msk #x1)) + (set! (-> v1-6 base) (the-as pointer (&+ a0-17 16))) + ) + (let ((v1-7 (the-as object (-> arg0 base)))) + (set! (-> (the-as vector v1-7) x) 8388608.0) + (set! (-> (the-as vector v1-7) y) 8388608.0) + (set! (-> (the-as vector v1-7) z) 8388608.0) + (set! (-> (the-as vector v1-7) w) 8388608.0) + (set! (-> (the-as (pointer vif-tag) v1-7) 4) (new 'static 'vif-tag :cmd (vif-cmd base))) + (set! (-> (the-as (pointer vif-tag) v1-7) 5) (new 'static 'vif-tag :imm #x2c :cmd (vif-cmd offset))) + (set! (-> (the-as (pointer vif-tag) v1-7) 6) (new 'static 'vif-tag :cmd (vif-cmd stmod))) + (set! (-> (the-as (pointer vif-tag) v1-7) 7) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> arg0 base) (&+ (the-as pointer v1-7) 32)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function tie-end-buffer +;; WARN: Return type mismatch int vs none. +(defun tie-end-buffer ((arg0 dma-buffer)) + "Set up DMA to finish TIE." + (let ((v1-0 *display*) + (a1-0 96) + ) + (+! (-> v1-0 mem-reserve-size) a1-0) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((a3-0 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> a3-0 real-buffer-end) (the-as int (&+ (-> a3-0 base) a1-0))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (dma-buffer-add-gs-set arg0 (test-1 (new 'static 'gs-test :zte #x1 :ztst (gs-ztest greater-equal)))) + (let* ((v1-5 arg0) + (a1-10 (the-as dma-packet (-> v1-5 base))) + ) + (set! (-> a1-10 dma) (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id cnt))) + (set! (-> a1-10 vif0) (new 'static 'vif-tag :cmd (vif-cmd stmask))) + (set! (-> a1-10 vif1) (new 'static 'vif-tag)) + (set! (-> v1-5 base) (the-as pointer (&+ a1-10 16))) + ) + (let* ((v1-6 arg0) + (a0-1 (-> v1-6 base)) + ) + (set! (-> (the-as (pointer vif-tag) a0-1) 0) (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd mscalf) :msk #x1)) + (set! (-> (the-as (pointer vif-tag) a0-1) 1) (new 'static 'vif-tag :cmd (vif-cmd stmod))) + (set! (-> (the-as (pointer vif-tag) a0-1) 2) (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1)) + (set! (-> (the-as (pointer vif-tag) a0-1) 3) (new 'static 'vif-tag :cmd (vif-cmd strow) :msk #x1)) + (set! (-> (the-as (pointer vif-tag) a0-1) 4) (new 'static 'vif-tag)) + (set! (-> (the-as (pointer vif-tag) a0-1) 5) (new 'static 'vif-tag)) + (set! (-> (the-as (pointer vif-tag) a0-1) 6) (new 'static 'vif-tag)) + (set! (-> (the-as (pointer vif-tag) a0-1) 7) (new 'static 'vif-tag)) + (set! (-> v1-6 base) (&+ a0-1 32)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition (debug) for function tie-int-reg +(defun-debug tie-int-reg ((arg0 int)) + "Get the name of TIE VU1 program integer register." + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + "zero" + ) + ((= v1-0 1) + "itemp" + ) + ((= v1-0 2) + "point-ptr" + ) + ((= v1-0 3) + "clr-ptr" + ) + ((= v1-0 4) + "target-bp1-ptr" + ) + ((= v1-0 5) + "skip-bp2" + ) + ((= v1-0 6) + "target-bp2-ptr" + ) + ((= v1-0 7) + "target-ip1-ptr" + ) + ((= v1-0 8) + "target-ip2-ptr" + ) + ((= v1-0 9) + "ind/ind0" + ) + ((= v1-0 10) + " ind1" + ) + ((= v1-0 11) + " ind2" + ) + ((= v1-0 12) + "dest-ptr" + ) + ((= v1-0 13) + "dest2-ptr" + ) + ((= v1-0 14) + "skip-ips" + ) + ((= v1-0 15) + "kick-addr" + ) + ) + ) + ) + +;; definition (debug) for function tie-float-reg +(defun-debug tie-float-reg ((arg0 int)) + "Get the name of TIE VU1 program float register." + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + "zero" + ) + ((= v1-0 1) + "t-mtx0" + ) + ((= v1-0 2) + "t-mtx1" + ) + ((= v1-0 3) + "t-mtx2" + ) + ((= v1-0 4) + "t-mtx3" + ) + ((= v1-0 5) + "vtx-0" + ) + ((= v1-0 6) + "vtx-1" + ) + ((= v1-0 7) + "vtx-2" + ) + ((= v1-0 8) + "vtx-3" + ) + ((= v1-0 9) + "pos-0/2" + ) + ((= v1-0 10) + "pos-1/3" + ) + ((= v1-0 11) + "clr-0" + ) + ((= v1-0 12) + "clr-1" + ) + ((= v1-0 13) + "clr-2" + ) + ((= v1-0 14) + "clr-3" + ) + ((= v1-0 15) + "tex-0" + ) + ((= v1-0 16) + "tex-1" + ) + ((= v1-0 17) + "tex-2" + ) + ((= v1-0 18) + "tex-3" + ) + ((= v1-0 19) + "res-0/2" + ) + ((= v1-0 20) + "res-1/3" + ) + ((= v1-0 21) + "gifbuf" + ) + ((= v1-0 22) + "clrbuf" + ) + ((= v1-0 23) + "extra" + ) + ((= v1-0 24) + "inds" + ) + ((= v1-0 25) + "--" + ) + ((= v1-0 26) + "--" + ) + ((= v1-0 27) + "morph" + ) + ((= v1-0 28) + "xyzofs" + ) + ((= v1-0 29) + "clr1" + ) + ((= v1-0 30) + "clr2" + ) + ((= v1-0 31) + "--" + ) + ) + ) + ) + +;; definition (debug) for function tie-ints +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defun-debug tie-ints () + "Dump TIE integer regs for debug." + (local-vars (sv-16 uint)) + (let ((gp-0 (+ #x3da0 #x1100c000))) + (dotimes (s5-0 16) + (if (< s5-0 10) + (format 0 " ") + ) + (let ((s4-0 format) + (s3-0 0) + (s2-0 "vi~d: ~6d #x~4,'0X ~s~%") + (s1-0 s5-0) + (s0-0 (-> (the-as (pointer uint32) (+ gp-0 (* (* s5-0 4) 4))) 0)) + ) + (set! sv-16 (-> (the-as (pointer uint32) (+ gp-0 (* (* s5-0 4) 4))) 0)) + (let ((t1-0 (tie-int-reg s5-0))) + (s4-0 s3-0 s2-0 s1-0 s0-0 sv-16 t1-0) + ) + ) + ) + ) + (none) + ) + +;; definition (debug) for function tie-floats +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defun-debug tie-floats () + "Dump TIE float regs for debug." + (local-vars (sv-16 uint) (sv-32 uint)) + (let ((gp-0 (the-as (pointer uint32) (+ #x3da0 #x1100c000)))) + (dotimes (s5-0 32) + (if (< s5-0 10) + (format 0 " ") + ) + (format + 0 + "vf~d: #x~8,'0X #x~8,'0X #x~8,'0X #x~8,'0X " + s5-0 + (-> gp-0 (* s5-0 4)) + (-> gp-0 (+ (* s5-0 4) 1)) + (-> gp-0 (+ (* s5-0 4) 2)) + (-> gp-0 (+ (* s5-0 4) 3)) + ) + (let ((s4-0 format) + (s3-0 0) + (s2-0 "~F ~F ~F ~F ~s~%") + (s1-0 (-> gp-0 (* s5-0 4))) + (s0-0 (-> gp-0 (+ (* s5-0 4) 1))) + ) + (set! sv-16 (-> gp-0 (+ (* s5-0 4) 2))) + (set! sv-32 (-> gp-0 (+ (* s5-0 4) 3))) + (let ((t2-1 (tie-float-reg s5-0))) + (s4-0 s3-0 s2-0 s1-0 s0-0 sv-16 sv-32 t2-1) + ) + ) + ) + ) + (none) + ) diff --git a/test/decompiler/reference/jak3/engine/gfx/blit-displays-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/blit-displays-h_REF.gc index de1c368546..6d9d62bf96 100644 --- a/test/decompiler/reference/jak3/engine/gfx/blit-displays-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/blit-displays-h_REF.gc @@ -43,7 +43,7 @@ (blit-displays-work-method-16 () none) (blit-displays-work-method-17 (_type_ vector int float symbol) none) (blit-displays-work-method-18 () none) - (blit-displays-work-method-19 () none) + (blit-displays-work-method-19 (_type_) none) (blit-displays-work-method-20 () none) (get-menu-mode (_type_) symbol) (get-screen-copied (_type_) symbol) diff --git a/test/decompiler/reference/jak3/engine/gfx/font-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/font-h_REF.gc index eaca2ff019..0ca4eecc4f 100644 --- a/test/decompiler/reference/jak3/engine/gfx/font-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/font-h_REF.gc @@ -52,18 +52,19 @@ ;; definition of type font-context (deftype font-context (basic) - ((origin vector :inline) - (strip-gif vector :inline) - (width float) - (height float) - (projection float) - (scale float) - (color font-color) - (flags font-flags) - (mat matrix) - (start-line uint32) - (alpha float) - (max-x float) + ((origin vector :inline) + (strip-gif vector :inline) + (width float) + (height float) + (projection float) + (scale float) + (color font-color) + (color-signed int32 :overlay-at color) + (flags font-flags) + (mat matrix) + (start-line uint32) + (alpha float) + (max-x float) ) (:methods (new (symbol type matrix int int float font-color font-flags) _type_) @@ -284,7 +285,7 @@ (reg-save uint32 5) ) (:methods - (set-context! (_type_ object) none) + (set-context! (_type_ font-context) none) ) ) diff --git a/test/decompiler/reference/jak3/engine/gfx/font_REF.gc b/test/decompiler/reference/jak3/engine/gfx/font_REF.gc new file mode 100644 index 0000000000..47a4e41d4d --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/font_REF.gc @@ -0,0 +1,80 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 9 of type font-work +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 9 font-work)" 9 font-work) + +;; definition for function draw-string-asm +;; INFO: function output is handled by mips2c +(def-mips2c draw-string-asm (function string dma-buffer font-context draw-string-result)) + +;; definition for function draw-string +;; INFO: Used lq/sq +;; WARN: Return type mismatch uint vs draw-string-result. +;; 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)) + (let ((v1-1 (the int (* 128.0 (-> arg2 alpha))))) + (-> arg2 origin quad) + (dotimes (a0-2 45) + (dotimes (a1-1 4) + (let ((a2-6 + (logior (logand (l.wu (+ (+ (* a1-1 4) (* a0-2 16)) (the-as int *font-work*) 2224)) (the-as uint #xffffffff00ffffff)) + (shr (shl v1-1 56) 32) + ) + ) + (a3-7 (+ (+ (* a1-1 4) (* a0-2 16)) (the-as int *font-work*))) + ) + (s.w! (+ a3-7 2224) a2-6) + ) + ) + ) + (set! (-> *font-work* color-shadow w) v1-1) + ) + (if (< (the-as uint (dma-buffer-free arg1)) (the-as uint (* (length arg0) 32))) + (set! v0-2 (the-as uint (-> arg2 origin quad))) + (set! v0-2 (the-as uint (draw-string-asm arg0 arg1 arg2))) + ) + (dotimes (v1-7 45) + (dotimes (a0-9 4) + (let ((a1-10 + (logior (logand (l.wu (+ (+ (* a0-9 4) (* v1-7 16)) (the-as int *font-work*) 2224)) (the-as uint #xffffffff00ffffff)) + (shl #x8000 16) + ) + ) + (a2-15 (+ (+ (* a0-9 4) (* v1-7 16)) (the-as int *font-work*))) + ) + (s.w! (+ a2-15 2224) a1-10) + ) + ) + ) + (set! (-> *font-work* color-shadow w) 128) + (the-as draw-string-result v0-2) + ) + +;; definition for function get-string-length +;; INFO: function output is handled by mips2c +(def-mips2c get-string-length (function string font-context draw-string-result)) + +;; definition for function draw-string-xy +(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))) + (set-context! *font-work* s4-0) + (draw-string arg0 arg1 s4-0) + ) + ) + +;; definition for function draw-string-adv +;; WARN: Return type mismatch float vs none. +(defun draw-string-adv ((arg0 string) (arg1 dma-buffer) (arg2 font-context)) + (set-context! *font-work* arg2) + (let ((v1-2 (draw-string arg0 arg1 arg2))) + (+! (-> arg2 origin x) (-> v1-2 length)) + ) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/foreground/eye_REF.gc b/test/decompiler/reference/jak3/engine/gfx/foreground/eye_REF.gc new file mode 100644 index 0000000000..d2e8087b64 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/foreground/eye_REF.gc @@ -0,0 +1,1130 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *eye-work*, type eye-work +(define *eye-work* (new 'static 'eye-work + :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) + ) + :gif (new 'static 'array uint64 2 #x508b400000008001 #x53531) + ) + :sprite-tmpl2 (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) + ) + :gif (new 'static 'array uint64 2 #x50ab400000008001 #x53531) + ) + :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) + ) + :gif (new 'static 'array uint64 2 #x1000000000008005 #xe) + ) + :blink-table (new 'static 'array float 10 0.0 0.667 0.9 1.0 1.0 1.0 1.0 0.333 0.1 0.0) + ) + ) + +;; definition for function find-free-eye-index +(defun find-free-eye-index ((arg0 int) (arg1 string) (arg2 int)) + (dotimes (s4-0 32) + (let ((s2-0 (-> *eye-control-array* data s4-0))) + (when (!= (-> s2-0 level-index) -1) + (when (string-charp= arg1 (-> s2-0 art-group-name)) + (if (= (-> *kernel-context* login-level-index) (-> s2-0 level-index)) + (return s4-0) + ) + ) + ) + ) + ) + (let ((v1-14 (-> *level* level (-> *kernel-context* login-level-index)))) + (dotimes (s4-1 32) + (let ((s2-1 (-> *eye-control-array* data s4-1))) + (when (= (-> s2-1 level-index) -1) + (cond + ((< arg2 60) + (set! (-> s2-1 high-res?) #f) + (set! (-> s2-1 eye-slot) (logand (-> v1-14 eye-slot-lowres arg0) 15)) + (+! (-> v1-14 eye-slot-lowres arg0) 1) + ) + (else + (set! (-> s2-1 high-res?) #t) + (set! (-> s2-1 eye-slot) (logand (-> v1-14 eye-slot-highres arg0) 3)) + (+! (-> v1-14 eye-slot-highres arg0) 1) + ) + ) + (copyn-charp<-string (-> s2-1 art-group-name) arg1 (min 63 (+ (length arg1) 1))) + (set! (-> s2-1 level-index) (-> *kernel-context* login-level-index)) + (return s4-1) + ) + ) + ) + ) + (format 0 "ERROR: no free eye-controls available.~%") + 0 + ) + +;; definition for function free-eye-index +(defun free-eye-index ((idx int)) + (when (< idx 32) + (let ((v1-4 (-> *eye-control-array* data idx))) + (set! (-> v1-4 process) (the-as handle #f)) + (set! (-> v1-4 random-time) (the-as uint 60)) + (set! (-> v1-4 blink) 0.0) + (set! (-> v1-4 shaders) (the-as (inline-array adgif-shader) #f)) + (set! (-> v1-4 level-index) -1) + (set! (-> v1-4 high-res?) #f) + (set! (-> v1-4 eye-slot) (the-as uint 0)) + (set! (-> v1-4 art-group-name 0) (the-as uint 0)) + (dotimes (a0-4 2) + (set! (-> v1-4 eyes a0-4 shader-count) (the-as uint 0)) + (dotimes (a1-3 8) + (set! (-> (the-as eye-control (+ (+ (* a1-3 4) (* 80 a0-4)) (the-as int v1-4))) left shader 0) #f) + ) + ) + ) + ) + 0 + ) + +;; definition for function render-eyes-32 +;; INFO: Used lq/sq +(defun render-eyes-32 ((arg0 dma-buffer) (arg1 eye-control) (arg2 int)) + (local-vars (sv-16 float)) + (let ((v1-0 *display*) + (a0-1 1776) + ) + (+! (-> v1-0 mem-reserve-size) a0-1) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((a2-1 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> a2-1 real-buffer-end) (the-as int (&+ (-> a2-1 base) a0-1))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (let* ((v1-2 (-> arg1 eye-slot)) + (s4-0 32) + (s3-0 (+ (* v1-2 32) 32)) + (s2-0 (* v1-2 32)) + ) + (let ((f28-0 (* 16.0 (+ (the float (+ s4-0 16)) (* 32.0 (-> arg1 left x))))) + (f26-0 (* 16.0 (+ (the float (+ s3-0 16)) (* 32.0 (-> arg1 left y))))) + (f30-0 (* 16.0 (+ (the float (+ s4-0 48)) (* 32.0 (-> arg1 right x))))) + ) + (set! sv-16 (* 16.0 (+ (the float (+ s3-0 16)) (* 32.0 (-> arg1 right y))))) + (let ((s1-0 (-> arg1 shaders 0))) + (let ((v1-16 (the-as object (-> arg0 base)))) + (set! (-> (the-as dma-gif-packet v1-16) dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> (the-as dma-gif-packet v1-16) quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-0 (the-as structure (&+ (the-as dma-gif-packet v1-16) 32)))) + (quad-copy! (the-as pointer s0-0) (the-as pointer s1-0) 5) + (set! (-> (the-as adgif-shader s0-0) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x1f :maxv #x1f) + ) + (set! (-> (the-as adgif-shader s0-0) alpha) (new 'static 'gs-miptbp :tbp1 #x44)) + (set! (-> (the-as adgif-shader s0-0) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (dma-buffer-add-gs-set arg0 (scissor-1 (new 'static 'gs-scissor :scax1 #x3f :scay1 (+ s2-0 31) :scay0 s2-0))) + (let ((v1-25 (the-as object (-> arg0 base)))) + (set! (-> (the-as (inline-array vector4w) v1-25) 0 quad) (-> *eye-work* sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-25) 1 quad) (-> *eye-work* sprite-tmpl quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) v1-25) 2) 128 128 128 128) + (set-vector! (-> (the-as (inline-array vector4w) v1-25) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) v1-25) 4) (* s4-0 16) (the-as int (* s3-0 16)) #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) v1-25) 5) 0 0 0 0) + (set-vector! + (-> (the-as (inline-array vector4w) v1-25) 6) + (* (+ s4-0 64) 16) + (the-as int (* (+ s3-0 32) 16)) + #xffffff + 0 + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-30 (ash 16 (the-as int (-> s1-0 tex0 tw)))) + (a0-35 (ash 16 (the-as int (-> s1-0 tex0 th)))) + ) + (dma-buffer-add-gs-set arg0 (scissor-1 (new 'static 'gs-scissor :scax1 #x1f :scay1 (+ s2-0 31) :scay0 s2-0))) + (let* ((f0-6 (* 256.0 (-> arg1 left iris-scale))) + (a1-34 (the-as object (-> arg0 base))) + (a2-15 (the int (- f28-0 f0-6))) + (t0-5 (the int (- f26-0 f0-6))) + (a3-9 (the int (+ f28-0 f0-6))) + (t1-0 (the int (+ f26-0 f0-6))) + ) + (set! (-> (the-as (inline-array vector4w) a1-34) 0 quad) (-> *eye-work* sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-34) 1 quad) (-> *eye-work* sprite-tmpl quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-34) 2) 128 128 128 128) + (set-vector! (-> (the-as (inline-array vector4w) a1-34) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-34) 4) a2-15 t0-5 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-34) 5) v1-30 a0-35 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-34) 6) a3-9 t1-0 #xffffff 0) + ) + ) + ) + (&+! (-> arg0 base) 112) + (let ((s1-1 (-> arg1 shaders 3))) + (let ((v1-35 (the-as object (-> arg0 base)))) + (set! (-> (the-as dma-gif-packet v1-35) dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> (the-as dma-gif-packet v1-35) quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-1 (the-as structure (&+ (the-as dma-gif-packet v1-35) 32)))) + (quad-copy! (the-as pointer s0-1) (the-as pointer s1-1) 5) + (set! (-> (the-as adgif-shader s0-1) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x1f :maxv #x1f) + ) + (set! (-> (the-as adgif-shader s0-1) alpha) (new 'static 'gs-miptbp :tbp1 #x44)) + (set! (-> (the-as adgif-shader s0-1) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-42 (ash 16 (the-as int (-> s1-1 tex0 tw)))) + (a0-47 (ash 16 (the-as int (-> s1-1 tex0 th)))) + ) + (dma-buffer-add-gs-set arg0 + (scissor-1 (new 'static 'gs-scissor :scax0 #x20 :scax1 #x3f :scay1 (+ s2-0 31) :scay0 s2-0)) + ) + (let* ((f0-10 (* 256.0 (-> arg1 right iris-scale))) + (a1-44 (the-as object (-> arg0 base))) + (a2-25 (the int (- f30-0 f0-10))) + (t0-11 (the int (- sv-16 f0-10))) + (a3-19 (the int (+ f30-0 f0-10))) + (t1-1 (the int (+ sv-16 f0-10))) + ) + (set! (-> (the-as (inline-array vector4w) a1-44) 0 quad) (-> *eye-work* sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-44) 1 quad) (-> *eye-work* sprite-tmpl quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-44) 2) 128 128 128 128) + (set-vector! (-> (the-as (inline-array vector4w) a1-44) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-44) 4) a2-25 t0-11 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-44) 5) v1-42 a0-47 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-44) 6) a3-19 t1-1 #xffffff 0) + ) + ) + ) + (&+! (-> arg0 base) 112) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always))) + ) + (let ((s1-2 (-> arg1 shaders 1))) + (let ((v1-50 (the-as object (-> arg0 base)))) + (set! (-> (the-as dma-gif-packet v1-50) dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> (the-as dma-gif-packet v1-50) quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-2 (the-as structure (&+ (the-as dma-gif-packet v1-50) 32)))) + (quad-copy! (the-as pointer s0-2) (the-as pointer s1-2) 5) + (set! (-> (the-as adgif-shader s0-2) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x1f :maxv #x1f) + ) + (set! (-> (the-as adgif-shader s0-2) alpha) (new 'static 'gs-miptbp :tbp1 #x44)) + (set! (-> (the-as adgif-shader s0-2) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-57 (ash 16 (the-as int (-> s1-2 tex0 tw)))) + (a0-65 (ash 16 (the-as int (-> s1-2 tex0 th)))) + ) + (dma-buffer-add-gs-set arg0 (scissor-1 (new 'static 'gs-scissor :scax1 #x1f :scay1 (+ s2-0 31) :scay0 s2-0))) + (let* ((f0-14 (* 256.0 (-> arg1 left pupil-scale))) + (a1-61 (the-as object (-> arg0 base))) + (a2-35 (the int (- f28-0 f0-14))) + (t0-17 (the int (- f26-0 f0-14))) + (a3-29 (the int (+ f28-0 f0-14))) + (t1-2 (the int (+ f26-0 f0-14))) + ) + (set! (-> (the-as (inline-array vector4w) a1-61) 0 quad) (-> *eye-work* sprite-tmpl2 dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-61) 1 quad) (-> *eye-work* sprite-tmpl2 quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-61) 2) 128 128 128 128) + (set-vector! (-> (the-as (inline-array vector4w) a1-61) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-61) 4) a2-35 t0-17 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-61) 5) v1-57 a0-65 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-61) 6) a3-29 t1-2 #xffffff 0) + ) + ) + ) + (&+! (-> arg0 base) 112) + (let ((s1-3 (-> arg1 shaders 4))) + (let ((v1-62 (the-as object (-> arg0 base)))) + (set! (-> (the-as dma-gif-packet v1-62) dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> (the-as dma-gif-packet v1-62) quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-3 (the-as structure (&+ (the-as dma-gif-packet v1-62) 32)))) + (quad-copy! (the-as pointer s0-3) (the-as pointer s1-3) 5) + (set! (-> (the-as adgif-shader s0-3) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x1f :maxv #x1f) + ) + (set! (-> (the-as adgif-shader s0-3) alpha) (new 'static 'gs-miptbp :tbp1 #x44)) + (set! (-> (the-as adgif-shader s0-3) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-69 (ash 16 (the-as int (-> s1-3 tex0 tw)))) + (a0-77 (ash 16 (the-as int (-> s1-3 tex0 th)))) + ) + (dma-buffer-add-gs-set arg0 + (scissor-1 (new 'static 'gs-scissor :scax0 #x20 :scax1 #x3f :scay1 (+ s2-0 31) :scay0 s2-0)) + ) + (let* ((f0-18 (* 256.0 (-> arg1 right pupil-scale))) + (a1-71 (the-as object (-> arg0 base))) + (a2-45 (the int (- f30-0 f0-18))) + (t0-23 (the int (- sv-16 f0-18))) + (a3-39 (the int (+ f30-0 f0-18))) + (t1-3 (the int (+ sv-16 f0-18))) + ) + (set! (-> (the-as (inline-array vector4w) a1-71) 0 quad) (-> *eye-work* sprite-tmpl2 dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-71) 1 quad) (-> *eye-work* sprite-tmpl2 quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-71) 2) 128 128 128 128) + (set-vector! (-> (the-as (inline-array vector4w) a1-71) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-71) 4) a2-45 t0-23 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-71) 5) v1-69 a0-77 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-71) 6) a3-39 t1-3 #xffffff 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))) + ) + (let ((s1-4 (-> arg1 shaders 2))) + (let ((v1-77 (the-as object (-> arg0 base)))) + (set! (-> (the-as dma-gif-packet v1-77) dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> (the-as dma-gif-packet v1-77) quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-4 (the-as structure (&+ (the-as dma-gif-packet v1-77) 32)))) + (quad-copy! (the-as pointer s0-4) (the-as pointer s1-4) 5) + (set! (-> (the-as adgif-shader s0-4) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x1f :maxv #x1f) + ) + (set! (-> (the-as adgif-shader s0-4) alpha) (new 'static 'gs-miptbp :tbp1 #x1)) + (set! (-> (the-as adgif-shader s0-4) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-84 (ash 16 (the-as int (-> s1-4 tex0 tw)))) + (a0-95 (ash 16 (the-as int (-> s1-4 tex0 th)))) + ) + (when (< (-> arg1 left lid) 0.0) + (let ((f0-23 (+ 1.0 (-> arg1 left lid)))) + (set! (-> arg1 left lid) (+ f0-23 (* (- 1.0 f0-23) (-> arg1 blink)))) + ) + ) + (dma-buffer-add-gs-set arg0 (scissor-1 (new 'static 'gs-scissor :scax1 #x1f :scay1 (+ s2-0 31) :scay0 s2-0))) + (let* ((f0-27 (+ (the float (+ s3-0 -32)) (* 32.0 (-> arg1 left lid)))) + (a1-93 (the-as object (-> arg0 base))) + (a2-55 (* s4-0 16)) + (t0-29 (the int (* 16.0 f0-27))) + (a3-51 (* (+ s4-0 32) 16)) + (t1-6 (the int (* 16.0 (+ f0-27 (* 32.0 (-> arg1 left lid-scale)))))) + ) + (set! (-> (the-as (inline-array vector4w) a1-93) 0 quad) (-> *eye-work* sprite-tmpl2 dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-93) 1 quad) (-> *eye-work* sprite-tmpl2 quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-93) 2) 128 128 128 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-93) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-93) 4) a2-55 t0-29 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-93) 5) v1-84 a0-95 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-93) 6) a3-51 t1-6 #xffffff 0) + ) + ) + ) + (&+! (-> arg0 base) 112) + (let ((s1-5 (-> arg1 shaders 5))) + (let ((v1-89 (the-as object (-> arg0 base)))) + (set! (-> (the-as dma-gif-packet v1-89) dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> (the-as dma-gif-packet v1-89) quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-5 (the-as structure (&+ (the-as dma-gif-packet v1-89) 32)))) + (quad-copy! (the-as pointer s0-5) (the-as pointer s1-5) 5) + (set! (-> (the-as adgif-shader s0-5) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x1f :maxv #x1f) + ) + (set! (-> (the-as adgif-shader s0-5) alpha) (new 'static 'gs-miptbp :tbp1 #x1)) + (set! (-> (the-as adgif-shader s0-5) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-96 (ash 16 (the-as int (-> s1-5 tex0 tw)))) + (a0-107 (ash 16 (the-as int (-> s1-5 tex0 th)))) + ) + (when (< (-> arg1 right lid) 0.0) + (let ((f0-33 (+ 1.0 (-> arg1 right lid)))) + (set! (-> arg1 right lid) (+ f0-33 (* (- 1.0 f0-33) (-> arg1 blink)))) + ) + ) + (dma-buffer-add-gs-set arg0 + (scissor-1 (new 'static 'gs-scissor :scax0 #x20 :scax1 #x3f :scay1 (+ s2-0 31) :scay0 s2-0)) + ) + (let* ((f0-37 (+ (the float (+ s3-0 -32)) (* 32.0 (-> arg1 right lid)))) + (a1-108 (the-as object (-> arg0 base))) + (a2-66 (* (+ s4-0 64) 16)) + (t0-35 (the int (* 16.0 f0-37))) + (a3-63 (* (+ s4-0 32) 16)) + (t1-9 (the int (* 16.0 (+ f0-37 (* 32.0 (-> arg1 left lid-scale)))))) + ) + (set! (-> (the-as (inline-array vector4w) a1-108) 0 quad) (-> *eye-work* sprite-tmpl2 dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-108) 1 quad) (-> *eye-work* sprite-tmpl2 quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-108) 2) 128 128 128 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-108) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-108) 4) a2-66 t0-35 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-108) 5) v1-96 a0-107 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-108) 6) a3-63 t1-9 #xffffff 0) + ) + ) + ) + ) + (let ((v0-0 (&+ (-> arg0 base) 112))) + (set! (-> arg0 base) v0-0) + v0-0 + ) + ) + ) + ) + ) + +;; definition for function render-eyes-64 +;; INFO: Used lq/sq +(defun render-eyes-64 ((arg0 dma-buffer) (arg1 eye-control) (arg2 int)) + (local-vars (sv-16 float)) + (let ((v1-0 *display*) + (a0-1 1776) + ) + (+! (-> v1-0 mem-reserve-size) a0-1) + (when (not (-> v1-0 dma-buffer-overflow)) + (let ((a2-1 (-> v1-0 frames (-> v1-0 on-screen) global-buf))) + (if (< (-> a2-1 real-buffer-end) (the-as int (&+ (-> a2-1 base) a0-1))) + (set! (-> v1-0 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-0 dma-buffer-overflow)) + (let* ((v1-2 (-> arg1 eye-slot)) + (s4-0 64) + (s3-0 (+ (* v1-2 64) 64)) + (s2-0 (* v1-2 64)) + ) + (let ((f28-0 (* 16.0 (+ (the float (+ s4-0 32)) (* 64.0 (-> arg1 left x))))) + (f26-0 (* 16.0 (+ (the float (+ s3-0 32)) (* 64.0 (-> arg1 left y))))) + (f30-0 (* 16.0 (+ (the float (+ s4-0 96)) (* 64.0 (-> arg1 right x))))) + ) + (set! sv-16 (* 16.0 (+ (the float (+ s3-0 32)) (* 64.0 (-> arg1 right y))))) + (let ((s1-0 (-> arg1 shaders 0))) + (let ((v1-16 (the-as object (-> arg0 base)))) + (set! (-> (the-as dma-gif-packet v1-16) dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> (the-as dma-gif-packet v1-16) quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-0 (the-as structure (&+ (the-as dma-gif-packet v1-16) 32)))) + (quad-copy! (the-as pointer s0-0) (the-as pointer s1-0) 5) + (set! (-> (the-as adgif-shader s0-0) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x3f :maxv #x3f) + ) + (set! (-> (the-as adgif-shader s0-0) alpha) (new 'static 'gs-miptbp :tbp1 #x44)) + (set! (-> (the-as adgif-shader s0-0) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (dma-buffer-add-gs-set arg0 (scissor-1 (new 'static 'gs-scissor :scax1 #x7f :scay1 (+ s2-0 63) :scay0 s2-0))) + (let ((v1-25 (the-as object (-> arg0 base)))) + (set! (-> (the-as (inline-array vector4w) v1-25) 0 quad) (-> *eye-work* sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-25) 1 quad) (-> *eye-work* sprite-tmpl quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) v1-25) 2) 128 128 128 128) + (set-vector! (-> (the-as (inline-array vector4w) v1-25) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) v1-25) 4) (* s4-0 16) (the-as int (* s3-0 16)) #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) v1-25) 5) 0 0 0 0) + (set-vector! + (-> (the-as (inline-array vector4w) v1-25) 6) + (* (+ s4-0 128) 16) + (the-as int (* (+ s3-0 64) 16)) + #xffffff + 0 + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-30 (ash 16 (the-as int (-> s1-0 tex0 tw)))) + (a0-35 (ash 16 (the-as int (-> s1-0 tex0 th)))) + ) + (dma-buffer-add-gs-set arg0 (scissor-1 (new 'static 'gs-scissor :scax1 #x3f :scay1 (+ s2-0 63) :scay0 s2-0))) + (let* ((f0-6 (* 512.0 (-> arg1 left iris-scale))) + (a1-34 (the-as object (-> arg0 base))) + (a2-15 (the int (- f28-0 f0-6))) + (t0-5 (the int (- f26-0 f0-6))) + (a3-9 (the int (+ f28-0 f0-6))) + (t1-0 (the int (+ f26-0 f0-6))) + ) + (set! (-> (the-as (inline-array vector4w) a1-34) 0 quad) (-> *eye-work* sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-34) 1 quad) (-> *eye-work* sprite-tmpl quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-34) 2) 128 128 128 128) + (set-vector! (-> (the-as (inline-array vector4w) a1-34) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-34) 4) a2-15 t0-5 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-34) 5) v1-30 a0-35 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-34) 6) a3-9 t1-0 #xffffff 0) + ) + ) + ) + (&+! (-> arg0 base) 112) + (let ((s1-1 (-> arg1 shaders 3))) + (let ((v1-35 (the-as dma-gif-packet (-> arg0 base)))) + (set! (-> v1-35 dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> v1-35 quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-1 (the-as structure (&+ v1-35 32)))) + (quad-copy! (the-as pointer s0-1) (the-as pointer s1-1) 5) + (set! (-> (the-as adgif-shader s0-1) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x3f :maxv #x3f) + ) + (set! (-> (the-as adgif-shader s0-1) alpha) (new 'static 'gs-miptbp :tbp1 #x44)) + (set! (-> (the-as adgif-shader s0-1) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-42 (ash 16 (the-as int (-> s1-1 tex0 tw)))) + (a0-47 (ash 16 (the-as int (-> s1-1 tex0 th)))) + ) + (dma-buffer-add-gs-set arg0 + (scissor-1 (new 'static 'gs-scissor :scax0 #x40 :scax1 #x7f :scay1 (+ s2-0 63) :scay0 s2-0)) + ) + (let* ((f0-10 (* 512.0 (-> arg1 right iris-scale))) + (a1-44 (the-as object (-> arg0 base))) + (a2-25 (the int (- f30-0 f0-10))) + (t0-11 (the int (- sv-16 f0-10))) + (a3-19 (the int (+ f30-0 f0-10))) + (t1-1 (the int (+ sv-16 f0-10))) + ) + (set! (-> (the-as (inline-array vector4w) a1-44) 0 quad) (-> *eye-work* sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-44) 1 quad) (-> *eye-work* sprite-tmpl quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-44) 2) 128 128 128 128) + (set-vector! (-> (the-as (inline-array vector4w) a1-44) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-44) 4) a2-25 t0-11 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-44) 5) v1-42 a0-47 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-44) 6) a3-19 t1-1 #xffffff 0) + ) + ) + ) + (&+! (-> arg0 base) 112) + (dma-buffer-add-gs-set arg0 + (test-1 (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always))) + ) + (let ((s1-2 (-> arg1 shaders 1))) + (let ((v1-50 (the-as dma-gif-packet (-> arg0 base)))) + (set! (-> v1-50 dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> v1-50 quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-2 (the-as structure (&+ v1-50 32)))) + (quad-copy! (the-as pointer s0-2) (the-as pointer s1-2) 5) + (set! (-> (the-as adgif-shader s0-2) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x3f :maxv #x3f) + ) + (set! (-> (the-as adgif-shader s0-2) alpha) (new 'static 'gs-miptbp :tbp1 #x44)) + (set! (-> (the-as adgif-shader s0-2) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-57 (ash 16 (the-as int (-> s1-2 tex0 tw)))) + (a0-65 (ash 16 (the-as int (-> s1-2 tex0 th)))) + ) + (dma-buffer-add-gs-set arg0 (scissor-1 (new 'static 'gs-scissor :scax1 #x3f :scay1 (+ s2-0 63) :scay0 s2-0))) + (let* ((f0-14 (* 512.0 (-> arg1 left pupil-scale))) + (a1-61 (the-as object (-> arg0 base))) + (a2-35 (the int (- f28-0 f0-14))) + (t0-17 (the int (- f26-0 f0-14))) + (a3-29 (the int (+ f28-0 f0-14))) + (t1-2 (the int (+ f26-0 f0-14))) + ) + (set! (-> (the-as (pointer uint128) a1-61)) (-> *eye-work* sprite-tmpl2 dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-61) 1 quad) (-> *eye-work* sprite-tmpl2 quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-61) 2) 128 128 128 128) + (set-vector! (-> (the-as (inline-array vector4w) a1-61) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-61) 4) a2-35 t0-17 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-61) 5) v1-57 a0-65 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-61) 6) a3-29 t1-2 #xffffff 0) + ) + ) + ) + (&+! (-> arg0 base) 112) + (let ((s1-3 (-> arg1 shaders 4))) + (let ((v1-62 (the-as object (-> arg0 base)))) + (set! (-> (the-as dma-gif-packet v1-62) dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> (the-as dma-gif-packet v1-62) quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-3 (the-as structure (&+ (the-as dma-gif-packet v1-62) 32)))) + (quad-copy! (the-as pointer s0-3) (the-as pointer s1-3) 5) + (set! (-> (the-as adgif-shader s0-3) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x3f :maxv #x3f) + ) + (set! (-> (the-as adgif-shader s0-3) alpha) (new 'static 'gs-miptbp :tbp1 #x44)) + (set! (-> (the-as adgif-shader s0-3) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-69 (ash 16 (the-as int (-> s1-3 tex0 tw)))) + (a0-77 (ash 16 (the-as int (-> s1-3 tex0 th)))) + ) + (dma-buffer-add-gs-set arg0 + (scissor-1 (new 'static 'gs-scissor :scax0 #x40 :scax1 #x7f :scay1 (+ s2-0 63) :scay0 s2-0)) + ) + (let* ((f0-18 (* 512.0 (-> arg1 right pupil-scale))) + (a1-71 (the-as object (-> arg0 base))) + (a2-45 (the int (- f30-0 f0-18))) + (t0-23 (the int (- sv-16 f0-18))) + (a3-39 (the int (+ f30-0 f0-18))) + (t1-3 (the int (+ sv-16 f0-18))) + ) + (set! (-> (the-as (inline-array vector4w) a1-71) 0 quad) (-> *eye-work* sprite-tmpl2 dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-71) 1 quad) (-> *eye-work* sprite-tmpl2 quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-71) 2) 128 128 128 128) + (set-vector! (-> (the-as (inline-array vector4w) a1-71) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-71) 4) a2-45 t0-23 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-71) 5) v1-69 a0-77 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-71) 6) a3-39 t1-3 #xffffff 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))) + ) + (let ((s1-4 (-> arg1 shaders 2))) + (let ((v1-77 (the-as object (-> arg0 base)))) + (set! (-> (the-as dma-gif-packet v1-77) dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> (the-as dma-gif-packet v1-77) quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-4 (the-as structure (&+ (the-as dma-gif-packet v1-77) 32)))) + (quad-copy! (the-as pointer s0-4) (the-as pointer s1-4) 5) + (set! (-> (the-as adgif-shader s0-4) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x3f :maxv #x3f) + ) + (set! (-> (the-as adgif-shader s0-4) alpha) (new 'static 'gs-miptbp :tbp1 #x1)) + (set! (-> (the-as adgif-shader s0-4) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-84 (ash 16 (the-as int (-> s1-4 tex0 tw)))) + (a0-95 (ash 16 (the-as int (-> s1-4 tex0 th)))) + ) + (when (< (-> arg1 left lid) 0.0) + (let ((f0-23 (+ 1.0 (-> arg1 left lid)))) + (set! (-> arg1 left lid) (+ f0-23 (* (- 1.0 f0-23) (-> arg1 blink)))) + ) + ) + (dma-buffer-add-gs-set arg0 (scissor-1 (new 'static 'gs-scissor :scax1 #x3f :scay1 (+ s2-0 63) :scay0 s2-0))) + (let* ((f0-27 (+ (the float (+ s3-0 -64)) (* 64.0 (-> arg1 left lid)))) + (a1-93 (the-as object (-> arg0 base))) + (a2-55 (* s4-0 16)) + (t0-29 (the int (* 16.0 f0-27))) + (a3-51 (* (+ s4-0 64) 16)) + (t1-6 (the int (* 16.0 (+ f0-27 (* 64.0 (-> arg1 left lid-scale)))))) + ) + (set! (-> (the-as (inline-array vector4w) a1-93) 0 quad) (-> *eye-work* sprite-tmpl2 dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-93) 1 quad) (-> *eye-work* sprite-tmpl2 quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-93) 2) 128 128 128 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-93) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-93) 4) a2-55 t0-29 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-93) 5) v1-84 a0-95 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-93) 6) a3-51 t1-6 #xffffff 0) + ) + ) + ) + (&+! (-> arg0 base) 112) + (let ((s1-5 (-> arg1 shaders 5))) + (let ((v1-89 (the-as object (-> arg0 base)))) + (set! (-> (the-as dma-gif-packet v1-89) dma-vif quad) (-> *eye-work* adgif-tmpl dma-vif quad)) + (set! (-> (the-as dma-gif-packet v1-89) quad 1) (-> *eye-work* adgif-tmpl quad 1)) + (let ((s0-5 (the-as structure (&+ (the-as dma-gif-packet v1-89) 32)))) + (quad-copy! (the-as pointer s0-5) (the-as pointer s1-5) 5) + (set! (-> (the-as adgif-shader s0-5) clamp) + (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp) :maxu #x3f :maxv #x3f) + ) + (set! (-> (the-as adgif-shader s0-5) alpha) (new 'static 'gs-miptbp :tbp1 #x1)) + (set! (-> (the-as adgif-shader s0-5) prims 9) (gs-reg64 alpha-1)) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-96 (ash 16 (the-as int (-> s1-5 tex0 tw)))) + (a0-107 (ash 16 (the-as int (-> s1-5 tex0 th)))) + ) + (when (< (-> arg1 right lid) 0.0) + (let ((f0-33 (+ 1.0 (-> arg1 right lid)))) + (set! (-> arg1 right lid) (+ f0-33 (* (- 1.0 f0-33) (-> arg1 blink)))) + ) + ) + (dma-buffer-add-gs-set arg0 + (scissor-1 (new 'static 'gs-scissor :scax0 #x40 :scax1 #x7f :scay1 (+ s2-0 63) :scay0 s2-0)) + ) + (let* ((f0-37 (+ (the float (+ s3-0 -64)) (* 64.0 (-> arg1 right lid)))) + (a1-108 (the-as object (-> arg0 base))) + (a2-66 (* (+ s4-0 128) 16)) + (t0-35 (the int (* 16.0 f0-37))) + (a3-63 (* (+ s4-0 64) 16)) + (t1-9 (the int (* 16.0 (+ f0-37 (* 64.0 (-> arg1 left lid-scale)))))) + ) + (set! (-> (the-as (pointer uint128) a1-108)) (-> *eye-work* sprite-tmpl2 dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) a1-108) 1 quad) (-> *eye-work* sprite-tmpl2 quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) a1-108) 2) 128 128 128 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-108) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-108) 4) a2-66 t0-35 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-108) 5) v1-96 a0-107 0 0) + (set-vector! (-> (the-as (inline-array vector4w) a1-108) 6) a3-63 t1-9 #xffffff 0) + ) + ) + ) + ) + (let ((v0-0 (&+ (-> arg0 base) 112))) + (set! (-> arg0 base) v0-0) + v0-0 + ) + ) + ) + ) + ) + +;; definition for function debug-eyes +;; INFO: Used lq/sq +;; WARN: Return type mismatch pointer vs none. +;; ERROR: Failed store: (s.q! (+ v1-23 16) a0-10) at op 69 +;; ERROR: Failed store: (s.w! (+ a0-11 4) a1-6) at op 74 +;; ERROR: Failed store: (s.w! (+ a0-11 8) a1-7) at op 76 +;; ERROR: Failed store: (s.w! (+ a0-11 12) a1-8) at op 78 +;; ERROR: Failed store: (s.w! (+ a0-12 4) 0) at op 81 +;; ERROR: Failed store: (s.w! (+ a0-12 8) 0) at op 82 +;; ERROR: Failed store: (s.w! (+ a0-12 12) 0) at op 83 +;; ERROR: Failed store: (s.w! (+ a0-13 4) a1-10) at op 88 +;; ERROR: Failed store: (s.w! (+ a0-13 8) a1-11) at op 90 +;; ERROR: Failed store: (s.w! (+ a0-13 12) 0) at op 91 +;; ERROR: Failed store: (s.w! (+ a0-14 4) a1-13) at op 96 +;; ERROR: Failed store: (s.w! (+ a0-14 8) 0) at op 97 +;; ERROR: Failed store: (s.w! (+ a0-14 12) 0) at op 98 +;; ERROR: Failed store: (s.w! (+ v1-24 4) a0-16) at op 103 +;; ERROR: Failed store: (s.w! (+ v1-24 8) a0-17) at op 105 +;; ERROR: Failed store: (s.w! (+ v1-24 12) 0) at op 106 +(defun debug-eyes ((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 :tbw #x1 :th (log2 512) :tw (log2 64) :tbp0 (-> *eyes-texture-base* vram-block)) + ) + (tex1-1 (new 'static 'gs-tex1 :mmag #x1 :mmin #x4 :l #x1 :k #xeed)) + (texa (new 'static 'gs-texa :ta0 #x80 :ta1 #x80)) + (clamp-1 (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))) + ) + (let ((v1-23 (-> arg0 base))) + (set! (-> (the-as (pointer uint128) v1-23)) (-> *eye-work* sprite-tmpl dma-vif quad)) + (let ((a0-10 (-> *eye-work* sprite-tmpl quad 1))) + (s.q! (+ v1-23 16) a0-10) + ) + (let ((a0-11 (&+ v1-23 32))) + (set! (-> (the-as (pointer int32) a0-11)) 128) + (let ((a1-6 128)) + (s.w! (+ a0-11 4) a1-6) + ) + (let ((a1-7 128)) + (s.w! (+ a0-11 8) a1-7) + ) + (let ((a1-8 128)) + (s.w! (+ a0-11 12) a1-8) + ) + ) + (let ((a0-12 (&+ v1-23 48))) + (set! (-> (the-as (pointer int32) a0-12)) 0) + (s.w! (+ a0-12 4) 0) + (s.w! (+ a0-12 8) 0) + (s.w! (+ a0-12 12) 0) + ) + (let ((a0-13 (&+ v1-23 64))) + (set! (-> (the-as (pointer int32) a0-13)) #x7e00) + (let ((a1-10 #x7800)) + (s.w! (+ a0-13 4) a1-10) + ) + (let ((a1-11 #xffffff)) + (s.w! (+ a0-13 8) a1-11) + ) + (s.w! (+ a0-13 12) 0) + ) + (let ((a0-14 (&+ v1-23 80))) + (set! (-> (the-as (pointer int32) a0-14)) 1024) + (let ((a1-13 8192)) + (s.w! (+ a0-14 4) a1-13) + ) + (s.w! (+ a0-14 8) 0) + (s.w! (+ a0-14 12) 0) + ) + (let ((v1-24 (&+ v1-23 96))) + (set! (-> (the-as (pointer int32) v1-24)) #x8200) + (let ((a0-16 #x8800)) + (s.w! (+ v1-24 4) a0-16) + ) + (let ((a0-17 #xffffff)) + (s.w! (+ v1-24 8) a0-17) + ) + (s.w! (+ v1-24 12) 0) + ) + ) + (&+! (-> arg0 base) 112) + (none) + ) + +;; definition for function update-eyes +;; WARN: Return type mismatch int vs none. +(defun update-eyes () + (when (not (-> *blit-displays-work* screen-copied)) + (dotimes (gp-0 32) + (let* ((s5-0 (-> *eye-control-array* data gp-0)) + (v1-7 (handle->process (-> s5-0 process))) + ) + (when (and v1-7 + (logtest? (-> (the-as process-drawable v1-7) skel status) (joint-control-status eye-anim)) + (logtest? (-> (the-as process-drawable v1-7) draw status) (draw-control-status on-screen)) + ) + (when (-> s5-0 shaders) + (when (not (paused?)) + (cond + ((and (>= (-> s5-0 left lid) 0.0) (>= (-> s5-0 right lid) 0.0)) + (set! (-> s5-0 random-time) (the-as uint 60)) + (set! (-> s5-0 blink) 0.0) + ) + (else + (+! (-> s5-0 random-time) -1) + (let ((v1-19 (-> s5-0 random-time))) + (when (< v1-19 (the-as uint 10)) + (set! (-> s5-0 blink) (-> *eye-work* blink-table v1-19)) + (if (zero? v1-19) + (set! (-> s5-0 random-time) (the-as uint (the int (rand-vu-float-range 60.0 240.0)))) + ) + ) + ) + ) + ) + ) + (when (-> s5-0 left shader) + (cond + ((and (= (-> s5-0 left pupil-scale) 0.0) (= (-> s5-0 left iris-scale) 0.0)) + (dotimes (v1-24 (the-as int (-> s5-0 left shader-count))) + (set! (-> s5-0 left shader v1-24 tex0 tfx) 1) + ) + ) + (else + (dotimes (v1-27 (the-as int (-> s5-0 left shader-count))) + (set! (-> s5-0 left shader v1-27 tex0 tfx) 0) + ) + ) + ) + ) + (when (-> s5-0 right shader) + (cond + ((and (= (-> s5-0 right pupil-scale) 0.0) (= (-> s5-0 right iris-scale) 0.0)) + (dotimes (v1-34 (the-as int (-> s5-0 right shader-count))) + (set! (-> s5-0 right shader v1-34 tex0 tfx) 1) + ) + ) + (else + (dotimes (v1-37 (the-as int (-> s5-0 right shader-count))) + (set! (-> s5-0 right shader v1-37 tex0 tfx) 0) + ) + ) + ) + ) + (cond + ((-> s5-0 high-res?) + (let ((v1-42 *display*) + (a0-45 16) + ) + (+! (-> v1-42 mem-reserve-size) a0-45) + (when (not (-> v1-42 dma-buffer-overflow)) + (let ((a2-0 (-> v1-42 frames (-> v1-42 on-screen) global-buf))) + (if (< (-> a2-0 real-buffer-end) (the-as int (&+ (-> a2-0 base) a0-45))) + (set! (-> v1-42 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-42 dma-buffer-overflow)) + (with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (the-as bucket-id (-> s5-0 bucket)) + ) + (let ((t9-2 set-display-gs-state-offset) + (a0-50 s3-0) + (a1-35 (-> *eyes-texture-base* vram-page)) + (a2-2 (the-as object 128)) + ) + (t9-2 a0-50 (the-as int a1-35) (the-as int a2-2) 256 0 0 64 64) + (let ((v1-50 *display*) + (a0-51 48) + ) + (+! (-> v1-50 mem-reserve-size) a0-51) + (when (not (-> v1-50 dma-buffer-overflow)) + (let* ((a2-3 (-> v1-50 frames (-> v1-50 on-screen) global-buf)) + (a1-44 (-> a2-3 real-buffer-end)) + ) + (set! a2-2 (-> a2-3 base)) + (if (< a1-44 (the-as int (&+ (the-as pointer a2-2) a0-51))) + (set! (-> v1-50 dma-buffer-overflow) #t) + ) + ) + (if (not (-> v1-50 dma-buffer-overflow)) + (dma-buffer-add-gs-set s3-0 + (test-1 (new 'static 'gs-test :ate #x1 :atst (gs-atest always) :zte #x1 :ztst (gs-ztest always))) + ) + ) + ) + ) + (render-eyes-64 s3-0 s5-0 (the-as int a2-2)) + ) + (reset-display-gs-state *display* s3-0) + (let ((v1-55 *display*) + (a0-62 48) + ) + (+! (-> v1-55 mem-reserve-size) a0-62) + (when (not (-> v1-55 dma-buffer-overflow)) + (let ((a2-4 (-> v1-55 frames (-> v1-55 on-screen) global-buf))) + (if (< (-> a2-4 real-buffer-end) (the-as int (&+ (-> a2-4 base) a0-62))) + (set! (-> v1-55 dma-buffer-overflow) #t) + ) + ) + (if (not (-> v1-55 dma-buffer-overflow)) + (dma-buffer-add-gs-set s3-0 (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))) + ) + ) + ) + ) + ) + ) + ) + ) + ((not (-> s5-0 high-res?)) + (let ((v1-68 *display*) + (a0-74 16) + ) + (+! (-> v1-68 mem-reserve-size) a0-74) + (when (not (-> v1-68 dma-buffer-overflow)) + (let ((a2-7 (-> v1-68 frames (-> v1-68 on-screen) global-buf))) + (if (< (-> a2-7 real-buffer-end) (the-as int (&+ (-> a2-7 base) a0-74))) + (set! (-> v1-68 dma-buffer-overflow) #t) + ) + ) + (when (not (-> v1-68 dma-buffer-overflow)) + (with-dma-buffer-add-bucket ((s3-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (the-as bucket-id (-> s5-0 bucket)) + ) + (let ((t9-6 set-display-gs-state-offset) + (a0-79 s3-1) + (a1-88 (-> *eyes-texture-base* vram-page)) + (a2-9 (the-as object 64)) + ) + (t9-6 a0-79 (the-as int a1-88) (the-as int a2-9) 512 0 0 32 32) + (let ((v1-76 *display*) + (a0-80 48) + ) + (+! (-> v1-76 mem-reserve-size) a0-80) + (when (not (-> v1-76 dma-buffer-overflow)) + (let* ((a2-10 (-> v1-76 frames (-> v1-76 on-screen) global-buf)) + (a1-97 (-> a2-10 real-buffer-end)) + ) + (set! a2-9 (-> a2-10 base)) + (if (< a1-97 (the-as int (&+ (the-as pointer a2-9) a0-80))) + (set! (-> v1-76 dma-buffer-overflow) #t) + ) + ) + (if (not (-> v1-76 dma-buffer-overflow)) + (dma-buffer-add-gs-set s3-1 + (test-1 (new 'static 'gs-test :ate #x1 :atst (gs-atest always) :zte #x1 :ztst (gs-ztest always))) + ) + ) + ) + ) + (render-eyes-32 s3-1 s5-0 (the-as int a2-9)) + ) + (reset-display-gs-state *display* s3-1) + (let ((v1-81 *display*) + (a0-91 48) + ) + (+! (-> v1-81 mem-reserve-size) a0-91) + (when (not (-> v1-81 dma-buffer-overflow)) + (let ((a2-11 (-> v1-81 frames (-> v1-81 on-screen) global-buf))) + (if (< (-> a2-11 real-buffer-end) (the-as int (&+ (-> a2-11 base) a0-91))) + (set! (-> v1-81 dma-buffer-overflow) #t) + ) + ) + (if (not (-> v1-81 dma-buffer-overflow)) + (dma-buffer-add-gs-set s3-1 (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function get-eye-block +;; WARN: Return type mismatch uint vs int. +(defun get-eye-block ((arg0 int) (arg1 int)) + (let ((v1-0 arg0) + (a0-4 (-> ct32-24-block-table (* arg1 4))) + ) + (the-as int (+ (-> *eyes-texture-base* vram-block) (* v1-0 32) a0-4)) + ) + ) + +;; definition for function convert-eye-data +(defun convert-eye-data ((arg0 eye) (arg1 uint)) + (local-vars + (v0-0 float) + (v1-0 uint128) + (v1-1 uint128) + (v1-2 uint128) + (v1-3 uint128) + (v1-4 uint128) + (v1-5 uint128) + ) + (rlet ((vf1 :class vf) + (vf2 :class vf) + ) + (.pextlb v1-0 arg1 0) + (.pextlh v1-1 v1-0 0) + (.pw.sra v1-2 v1-1 16) + (.mov vf1 v1-2) + (.pextlb v1-3 0 arg1) + (.pextuh v1-4 0 v1-3) + (.pw.sll v1-5 v1-4 6) + (.mov vf2 v1-5) + (vitof15.xyzw vf1 vf1) + (vitof12.xyzw vf2 vf2) + (.svf (&-> arg0 data 0 quad) vf1) + (.svf (&-> arg0 data 1 quad) vf2) + (.mov v0-0 vf2) + v0-0 + ) + ) + +;; definition for function merc-eye-anim +;; WARN: Return type mismatch int vs none. +(defun merc-eye-anim ((arg0 process-drawable)) + (let* ((v1-2 (-> arg0 draw mgeo header eye-ctrl)) + (a0-2 (-> arg0 skel float-channels)) + (s3-0 (cond + ((> a0-2 0) + (-> arg0 skel channel (+ a0-2 -1 (-> arg0 skel active-channels))) + ) + (else + (let ((a0-8 (-> arg0 skel root-channel)) + (a1-4 (-> arg0 skel effect)) + ) + (-> a0-8 (if a1-4 + (-> a1-4 channel-offset) + 0 + ) + ) + ) + ) + ) + ) + (s4-0 (-> s3-0 frame-group)) + ) + (when (and (logtest? (-> arg0 skel status) (joint-control-status eye-anim)) + (and (nonzero? v1-2) (> (-> arg0 skel active-channels) 0) s4-0) + ) + (cond + ((and (-> arg0 skel override) (!= (-> arg0 skel override 41) 0.0)) + (let ((v1-6 (-> *eye-control-array* data (-> v1-2 eye-ctrl-index))) + (a0-24 (-> arg0 skel override)) + ) + (set! (-> v1-6 left x) (-> a0-24 42)) + (set! (-> v1-6 left y) (-> a0-24 43)) + (set! (-> v1-6 left lid) (-> a0-24 44)) + (set! (-> v1-6 left iris-scale) (-> a0-24 45)) + (set! (-> v1-6 left pupil-scale) (-> a0-24 46)) + (set! (-> v1-6 left lid-scale) (-> a0-24 47)) + (set! (-> v1-6 right x) (-> a0-24 48)) + (set! (-> v1-6 right y) (-> a0-24 49)) + (set! (-> v1-6 right lid) (-> a0-24 50)) + (set! (-> v1-6 right iris-scale) (-> a0-24 51)) + (set! (-> v1-6 right pupil-scale) (-> a0-24 52)) + (set! (-> v1-6 right lid-scale) (-> a0-24 53)) + ) + (logior! (-> arg0 skel status) (joint-control-status eye-anim-valid)) + ) + (else + (let* ((s5-0 (-> *eye-control-array* data (-> v1-2 eye-ctrl-index))) + (f0-13 (-> s3-0 frame-num)) + (f30-0 (- f0-13 (* (the float (the int (/ f0-13 1.0))) 1.0))) + ) + (set! (-> s5-0 process) (process->handle arg0)) + (set! (-> s5-0 shaders) (-> v1-2 shader)) + (let ((a0-34 *level*) + (v1-11 (-> arg0 draw)) + ) + (set! (-> s5-0 bucket) (the-as uint (vu1-bucket-map + (the-as int (-> a0-34 draw-index-map (-> v1-11 level-index))) + (the-as int (-> v1-11 default-texture-page)) + (merc-mode texture) + ) + ) + ) + ) + (let ((s2-0 (new 'stack-no-clear 'eye)) + (s1-0 (new 'stack-no-clear 'eye)) + ) + (cond + ((-> s4-0 eye-anim) + (let ((s0-1 (min (the int (-> s3-0 frame-num)) (-> s4-0 eye-anim max-frame))) + (s3-2 (min (+ (the int (-> s3-0 frame-num)) 1) (-> s4-0 eye-anim max-frame))) + ) + (convert-eye-data s2-0 (-> s4-0 eye-anim data (* s0-1 2) dword)) + (convert-eye-data s1-0 (-> s4-0 eye-anim data (* s3-2 2) dword)) + (vector4-lerp! (the-as vector (-> s5-0 eyes)) (the-as vector (&-> s2-0 x)) (the-as vector (&-> s1-0 x)) f30-0) + (vector4-lerp! + (the-as vector (&-> s5-0 left iris-scale)) + (the-as vector (&-> s2-0 iris-scale)) + (the-as vector (&-> s1-0 iris-scale)) + f30-0 + ) + (convert-eye-data s2-0 (-> s4-0 eye-anim data (+ (* s0-1 2) 1) dword)) + (convert-eye-data s1-0 (-> s4-0 eye-anim data (+ (* s3-2 2) 1) dword)) + ) + (vector4-lerp! + (the-as vector (-> s5-0 right)) + (the-as vector (&-> s2-0 x)) + (the-as vector (&-> s1-0 x)) + f30-0 + ) + (vector4-lerp! + (the-as vector (&-> s5-0 right iris-scale)) + (the-as vector (&-> s2-0 iris-scale)) + (the-as vector (&-> s1-0 iris-scale)) + f30-0 + ) + ) + (else + (format *stdcon* "no eye anim data for ~s~%" (-> arg0 name)) + (set! (-> s5-0 left x) 0.0) + (set! (-> s5-0 left y) 0.0) + (set! (-> s5-0 left lid) -1.0) + (set! (-> s5-0 left iris-scale) 0.55) + (set! (-> s5-0 left pupil-scale) 0.45) + (set! (-> s5-0 left lid-scale) 1.0) + (set! (-> s5-0 right x) 0.0) + (set! (-> s5-0 right y) 0.0) + (set! (-> s5-0 right lid) -1.0) + (set! (-> s5-0 right iris-scale) 0.55) + (set! (-> s5-0 right pupil-scale) 0.45) + (set! (-> s5-0 right lid-scale) 1.0) + ) + ) + ) + ) + (logior! (-> arg0 skel status) (joint-control-status eye-anim-valid)) + ) + ) + ) + ) + (if (logtest? (-> arg0 skel status) (joint-control-status eye-anim-valid)) + (logclear! (-> arg0 skel status) (joint-control-status eye-anim-valid)) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/foreground/foreground-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/foreground/foreground-h_REF.gc index 1d4d85b70c..67ef156272 100644 --- a/test/decompiler/reference/jak3/engine/gfx/foreground/foreground-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/foreground/foreground-h_REF.gc @@ -235,6 +235,7 @@ that assigns stuff to buckets and prepares DMA for merc (or requests for generic "Scratch info computed per-merc-effect by the foreground code, then later read by merc DMA generation. This is only for the currently-processing merc model's effects." ((color-fade rgba) + (alpha uint8 :offset 3) (merc-path uint8) (ignore-alpha uint8) (disable-draw uint8) @@ -338,7 +339,3 @@ DMA generation. This is only for the currently-processing merc model's effects." ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/engine/gfx/foreground/foreground_REF.gc b/test/decompiler/reference/jak3/engine/gfx/foreground/foreground_REF.gc index 62ff0a38d6..dd53829b14 100644 --- a/test/decompiler/reference/jak3/engine/gfx/foreground/foreground_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/foreground/foreground_REF.gc @@ -17,7 +17,7 @@ (bucket-id-16 gmerc-l0-pris) (bucket-id-16 tex-l0-pris) (bucket-id-16 gmerc2-l0-pris) - (bucket-id-16 bucket32) + (bucket-id-16 tie-vanish-l1-tfrag) (bucket-id-16 merc-l0-shrub) (bucket-id-16 emerc-l0-shrub) (bucket-id-16 gmerc-l0-shrub) @@ -29,7 +29,7 @@ (bucket-id-16 gmerc-l0-alpha) (bucket-id-16 tex-l0-alpha) (bucket-id-16 gmerc2-l0-alpha) - (bucket-id-16 bucket20) + (bucket-id-16 tie-vanish-l0-tfrag) (bucket-id-16 merc-l0-water) (bucket-id-16 merc-l0-water) (bucket-id-16 gmerc-l0-water) @@ -41,7 +41,7 @@ (bucket-id-16 gmerc-l0-pris) (bucket-id-16 tex-l0-pris) (bucket-id-16 gmerc2-l0-pris) - (bucket-id-16 bucket32) + (bucket-id-16 tie-vanish-l1-tfrag) (bucket-id-16 merc-l0-pris2) (bucket-id-16 emerc-l0-pris2) (bucket-id-16 gmerc-l0-pris2) @@ -65,7 +65,7 @@ (bucket-id-16 gmerc-l1-shrub) (bucket-id-16 tex-l1-shrub) (bucket-id-16 gmerc2-l1-shrub) - (bucket-id-16 bucket11) + (bucket-id-16 tfrag-l0-tfrag) (bucket-id-16 merc-l1-alpha) (bucket-id-16 emerc-l1-alpha) (bucket-id-16 gmerc-l1-alpha) @@ -89,7 +89,7 @@ (bucket-id-16 gmerc-l1-pris2) (bucket-id-16 tex-l1-pris2) (bucket-id-16 gmerc2-l1-pris2) - (bucket-id-16 bucket44) + (bucket-id-16 tie-vanish-l2-tfrag) (bucket-id-16 merc-l2-tfrag) (bucket-id-16 emerc-l2-tfrag) (bucket-id-16 gmerc-l2-tfrag) @@ -107,7 +107,7 @@ (bucket-id-16 gmerc-l2-shrub) (bucket-id-16 tex-l2-shrub) (bucket-id-16 gmerc2-l2-shrub) - (bucket-id-16 bucket12) + (bucket-id-16 tie-l0-tfrag) (bucket-id-16 merc-l2-alpha) (bucket-id-16 emerc-l2-alpha) (bucket-id-16 gmerc-l2-alpha) @@ -119,7 +119,7 @@ (bucket-id-16 gmerc-l2-water) (bucket-id-16 tex-l2-water) (bucket-id-16 gmerc2-l2-water) - (bucket-id-16 bucket56) + (bucket-id-16 tie-vanish-l3-tfrag) (bucket-id-16 merc-l2-pris) (bucket-id-16 emerc-l2-pris) (bucket-id-16 gmerc-l2-pris) @@ -143,19 +143,19 @@ (bucket-id-16 gmerc-l3-pris) (bucket-id-16 tex-l3-pris) (bucket-id-16 gmerc2-l3-pris) - (bucket-id-16 bucket35) + (bucket-id-16 tfrag-l2-tfrag) (bucket-id-16 merc-l3-shrub) (bucket-id-16 emerc-l3-shrub) (bucket-id-16 gmerc-l3-shrub) (bucket-id-16 tex-l3-shrub) (bucket-id-16 gmerc2-l3-shrub) - (bucket-id-16 bucket13) + (bucket-id-16 etie-l0-tfrag) (bucket-id-16 merc-l3-alpha) (bucket-id-16 emerc-l3-alpha) (bucket-id-16 gmerc-l3-alpha) (bucket-id-16 tex-l3-alpha) (bucket-id-16 gmerc2-l3-alpha) - (bucket-id-16 bucket23) + (bucket-id-16 tfrag-l1-tfrag) (bucket-id-16 merc-l3-water) (bucket-id-16 merc-l3-water) (bucket-id-16 gmerc-l3-water) @@ -167,7 +167,7 @@ (bucket-id-16 gmerc-l3-pris) (bucket-id-16 tex-l3-pris) (bucket-id-16 gmerc2-l3-pris) - (bucket-id-16 bucket35) + (bucket-id-16 tfrag-l2-tfrag) (bucket-id-16 merc-l3-pris2) (bucket-id-16 emerc-l3-pris2) (bucket-id-16 gmerc-l3-pris2) @@ -185,19 +185,19 @@ (bucket-id-16 gmerc-l4-pris) (bucket-id-16 tex-l4-pris) (bucket-id-16 gmerc2-l4-pris) - (bucket-id-16 bucket36) + (bucket-id-16 tie-l2-tfrag) (bucket-id-16 merc-l4-shrub) (bucket-id-16 emerc-l4-shrub) (bucket-id-16 gmerc-l4-shrub) (bucket-id-16 tex-l4-shrub) (bucket-id-16 gmerc2-l4-shrub) - (bucket-id-16 bucket14) + (bucket-id-16 tfrag-scissor-l0-tfrag) (bucket-id-16 merc-l4-alpha) (bucket-id-16 emerc-l4-alpha) (bucket-id-16 gmerc-l4-alpha) (bucket-id-16 tex-l4-alpha) (bucket-id-16 gmerc2-l4-alpha) - (bucket-id-16 bucket24) + (bucket-id-16 tie-l1-tfrag) (bucket-id-16 merc-l4-water) (bucket-id-16 merc-l4-water) (bucket-id-16 gmerc-l4-water) @@ -209,13 +209,13 @@ (bucket-id-16 gmerc-l4-pris) (bucket-id-16 tex-l4-pris) (bucket-id-16 gmerc2-l4-pris) - (bucket-id-16 bucket36) + (bucket-id-16 tie-l2-tfrag) (bucket-id-16 merc-l4-pris2) (bucket-id-16 emerc-l4-pris2) (bucket-id-16 gmerc-l4-pris2) (bucket-id-16 tex-l4-pris2) (bucket-id-16 gmerc2-l4-pris2) - (bucket-id-16 bucket47) + (bucket-id-16 tfrag-l3-tfrag) (bucket-id-16 merc-l5-tfrag) (bucket-id-16 emerc-l5-tfrag) (bucket-id-16 gmerc-l5-tfrag) @@ -227,37 +227,37 @@ (bucket-id-16 gmerc-l5-pris) (bucket-id-16 tex-l5-pris) (bucket-id-16 gmerc2-l5-pris) - (bucket-id-16 bucket37) + (bucket-id-16 etie-l2-tfrag) (bucket-id-16 merc-l5-shrub) (bucket-id-16 emerc-l5-shrub) (bucket-id-16 gmerc-l5-shrub) (bucket-id-16 tex-l5-shrub) (bucket-id-16 gmerc2-l5-shrub) - (bucket-id-16 bucket15) + (bucket-id-16 tie-scissor-l0-tfrag) (bucket-id-16 merc-l5-alpha) (bucket-id-16 emerc-l5-alpha) (bucket-id-16 gmerc-l5-alpha) (bucket-id-16 tex-l5-alpha) (bucket-id-16 gmerc2-l5-alpha) - (bucket-id-16 bucket25) + (bucket-id-16 etie-l1-tfrag) (bucket-id-16 merc-l5-water) (bucket-id-16 merc-l5-water) (bucket-id-16 gmerc-l5-water) (bucket-id-16 tex-l5-water) (bucket-id-16 gmerc2-l5-water) - (bucket-id-16 bucket59) + (bucket-id-16 tfrag-l4-tfrag) (bucket-id-16 merc-l5-pris) (bucket-id-16 emerc-l5-pris) (bucket-id-16 gmerc-l5-pris) (bucket-id-16 tex-l5-pris) (bucket-id-16 gmerc2-l5-pris) - (bucket-id-16 bucket37) + (bucket-id-16 etie-l2-tfrag) (bucket-id-16 merc-l5-pris2) (bucket-id-16 emerc-l5-pris2) (bucket-id-16 gmerc-l5-pris2) (bucket-id-16 tex-l5-pris2) (bucket-id-16 gmerc2-l5-pris2) - (bucket-id-16 bucket48) + (bucket-id-16 tie-l3-tfrag) (bucket-id-16 merc-l6-tfrag) (bucket-id-16 emerc-l6-tfrag) (bucket-id-16 gmerc-l6-tfrag) @@ -269,37 +269,37 @@ (bucket-id-16 gmerc-l6-pris) (bucket-id-16 tex-l6-pris) (bucket-id-16 gmerc2-l6-pris) - (bucket-id-16 bucket38) + (bucket-id-16 tfrag-scissor-l2-tfrag) (bucket-id-16 merc-l6-shrub) (bucket-id-16 emerc-l6-shrub) (bucket-id-16 gmerc-l6-shrub) (bucket-id-16 tex-l6-shrub) (bucket-id-16 gmerc2-l6-shrub) - (bucket-id-16 bucket16) + (bucket-id-16 etie-scissor-l0-tfrag) (bucket-id-16 merc-l6-alpha) (bucket-id-16 emerc-l6-alpha) (bucket-id-16 gmerc-l6-alpha) (bucket-id-16 tex-l6-alpha) (bucket-id-16 gmerc2-l6-alpha) - (bucket-id-16 bucket26) + (bucket-id-16 tfrag-scissor-l1-tfrag) (bucket-id-16 merc-l6-water) (bucket-id-16 merc-l6-water) (bucket-id-16 gmerc-l6-water) (bucket-id-16 tex-l6-water) (bucket-id-16 gmerc2-l6-water) - (bucket-id-16 bucket60) + (bucket-id-16 tie-l4-tfrag) (bucket-id-16 merc-l6-pris) (bucket-id-16 emerc-l6-pris) (bucket-id-16 gmerc-l6-pris) (bucket-id-16 tex-l6-pris) (bucket-id-16 gmerc2-l6-pris) - (bucket-id-16 bucket38) + (bucket-id-16 tfrag-scissor-l2-tfrag) (bucket-id-16 merc-l6-pris2) (bucket-id-16 emerc-l6-pris2) (bucket-id-16 gmerc-l6-pris2) (bucket-id-16 tex-l6-pris2) (bucket-id-16 gmerc2-l6-pris2) - (bucket-id-16 bucket49) + (bucket-id-16 etie-l3-tfrag) (bucket-id-16 merc-l7-tfrag) (bucket-id-16 emerc-l7-tfrag) (bucket-id-16 gmerc-l7-tfrag) @@ -311,7 +311,7 @@ (bucket-id-16 gmerc-l7-pris) (bucket-id-16 tex-l7-pris) (bucket-id-16 gmerc2-l7-pris) - (bucket-id-16 bucket39) + (bucket-id-16 tie-scissor-l2-tfrag) (bucket-id-16 merc-l7-shrub) (bucket-id-16 emerc-l7-shrub) (bucket-id-16 gmerc-l7-shrub) @@ -323,25 +323,25 @@ (bucket-id-16 gmerc-l7-alpha) (bucket-id-16 tex-l7-alpha) (bucket-id-16 gmerc2-l7-alpha) - (bucket-id-16 bucket27) + (bucket-id-16 tie-scissor-l1-tfrag) (bucket-id-16 merc-l7-water) (bucket-id-16 merc-l7-water) (bucket-id-16 gmerc-l7-water) (bucket-id-16 tex-l7-water) (bucket-id-16 gmerc2-l7-water) - (bucket-id-16 bucket61) + (bucket-id-16 etie-l4-tfrag) (bucket-id-16 merc-l7-pris) (bucket-id-16 emerc-l7-pris) (bucket-id-16 gmerc-l7-pris) (bucket-id-16 tex-l7-pris) (bucket-id-16 gmerc2-l7-pris) - (bucket-id-16 bucket39) + (bucket-id-16 tie-scissor-l2-tfrag) (bucket-id-16 merc-l7-pris2) (bucket-id-16 emerc-l7-pris2) (bucket-id-16 gmerc-l7-pris2) (bucket-id-16 tex-l7-pris2) (bucket-id-16 gmerc2-l7-pris2) - (bucket-id-16 bucket50) + (bucket-id-16 tfrag-scissor-l3-tfrag) (bucket-id-16 merc-l8-tfrag) (bucket-id-16 emerc-l8-tfrag) (bucket-id-16 gmerc-l8-tfrag) @@ -353,7 +353,7 @@ (bucket-id-16 gmerc-l8-pris) (bucket-id-16 tex-l8-pris) (bucket-id-16 gmerc2-l8-pris) - (bucket-id-16 bucket40) + (bucket-id-16 etie-scissor-l2-tfrag) (bucket-id-16 merc-l8-shrub) (bucket-id-16 emerc-l8-shrub) (bucket-id-16 gmerc-l8-shrub) @@ -365,25 +365,25 @@ (bucket-id-16 gmerc-l8-alpha) (bucket-id-16 tex-l8-alpha) (bucket-id-16 gmerc2-l8-alpha) - (bucket-id-16 bucket28) + (bucket-id-16 etie-scissor-l1-tfrag) (bucket-id-16 merc-l8-water) (bucket-id-16 merc-l8-water) (bucket-id-16 gmerc-l8-water) (bucket-id-16 tex-l8-water) (bucket-id-16 gmerc2-l8-water) - (bucket-id-16 bucket62) + (bucket-id-16 tfrag-scissor-l4-tfrag) (bucket-id-16 merc-l8-pris) (bucket-id-16 emerc-l8-pris) (bucket-id-16 gmerc-l8-pris) (bucket-id-16 tex-l8-pris) (bucket-id-16 gmerc2-l8-pris) - (bucket-id-16 bucket40) + (bucket-id-16 etie-scissor-l2-tfrag) (bucket-id-16 merc-l8-pris2) (bucket-id-16 emerc-l8-pris2) (bucket-id-16 gmerc-l8-pris2) (bucket-id-16 tex-l8-pris2) (bucket-id-16 gmerc2-l8-pris2) - (bucket-id-16 bucket51) + (bucket-id-16 tie-scissor-l3-tfrag) (bucket-id-16 merc-l9-tfrag) (bucket-id-16 emerc-l9-tfrag) (bucket-id-16 gmerc-l9-tfrag) @@ -413,7 +413,7 @@ (bucket-id-16 gmerc-l9-water) (bucket-id-16 tex-l9-water) (bucket-id-16 gmerc2-l9-water) - (bucket-id-16 bucket63) + (bucket-id-16 tie-scissor-l4-tfrag) (bucket-id-16 merc-l9-pris) (bucket-id-16 emerc-l9-pris) (bucket-id-16 gmerc-l9-pris) @@ -425,7 +425,7 @@ (bucket-id-16 gmerc-l9-pris2) (bucket-id-16 tex-l9-pris2) (bucket-id-16 gmerc2-l9-pris2) - (bucket-id-16 bucket52) + (bucket-id-16 etie-scissor-l3-tfrag) (bucket-id-16 merc-lcom-tfrag) (bucket-id-16 emerc-lcom-tfrag) (bucket-id-16 gmerc-lcom-tfrag) @@ -455,7 +455,7 @@ (bucket-id-16 gmerc-lcom-water) (bucket-id-16 tex-lcom-water) (bucket-id-16 gmerc2-lcom-water) - (bucket-id-16 bucket64) + (bucket-id-16 etie-scissor-l4-tfrag) (bucket-id-16 merc-lcom-pris) (bucket-id-16 emerc-lcom-pris) (bucket-id-16 gmerc-lcom-pris) @@ -1513,7 +1513,8 @@ ) ;; definition for function foreground-draw-hud -;; ERROR: function was not converted to expressions. Cannot decompile. +;; INFO: function output is handled by mips2c +(def-mips2c foreground-draw-hud (function draw-control dma-buffer float none)) ;; failed to figure out what this is: (kmemopen global "foreground-engine") @@ -1526,7 +1527,3 @@ ;; failed to figure out what this is: (kmemclose) - - - - diff --git a/test/decompiler/reference/jak3/engine/gfx/foreground/lights-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/foreground/lights-h_REF.gc index 30166893f5..617b7b645e 100644 --- a/test/decompiler/reference/jak3/engine/gfx/foreground/lights-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/foreground/lights-h_REF.gc @@ -90,7 +90,7 @@ (format #t "[~8x] ~A~%" this 'light-sphere) (format #t "~1Tname: ~A~%" (-> this name)) (format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere)) - (format #t "~1Tdirection: ~`vector`P~%" (-> this direction)) + (format #t "~1Tdirection: ~`vector`P~%" (&-> this shadow)) (format #t "~1Tcolor: ~`vector`P~%" (-> this color)) (format #t "~1Tdecay-start: ~f~%" (-> this decay-start)) (format #t "~1Tambient-point-ratio: ~f~%" (-> this ambient-point-ratio)) @@ -98,7 +98,7 @@ (format #t "~1Tbytes[4] @ #x~X~%" (&-> this color w)) (format #t "~1Tmask: ~D~%" (-> this mask)) (format #t "~1Tpalette-index: ~D~%" (-> this palette-index)) - (format #t "~1Tshadow: #x~X~%" (-> this direction x)) + (format #t "~1Tshadow: #x~X~%" (-> this shadow)) (label cfg-4) this ) @@ -108,6 +108,7 @@ ((index uint16) (count uint16) ) + :pack-me ) ;; definition for method 3 of type light-hash-bucket diff --git a/test/decompiler/reference/jak3/engine/gfx/foreground/merc/merc-blend-shape_REF.gc b/test/decompiler/reference/jak3/engine/gfx/foreground/merc/merc-blend-shape_REF.gc new file mode 100644 index 0000000000..ea9ebf4ee2 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/foreground/merc/merc-blend-shape_REF.gc @@ -0,0 +1,361 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *stats-blerc*, type symbol +(define *stats-blerc* #f) + +;; definition of type blerc-block-header +(deftype blerc-block-header (structure) + ((tag generic-merc-tag :inline) + (vtx-count uint32) + (overlap uint32) + (lump-dest uint32) + (lump-qwc uint32) + ) + ) + +;; definition for method 3 of type blerc-block-header +(defmethod inspect ((this blerc-block-header)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'blerc-block-header) + (format #t "~1Ttag: #~%" (-> this tag)) + (format #t "~1Tvtx-count: ~D~%" (-> this vtx-count)) + (format #t "~1Toverlap: ~D~%" (-> this overlap)) + (format #t "~1Tlump-dest: ~D~%" (-> this lump-dest)) + (format #t "~1Tlump-qwc: ~D~%" (-> this lump-qwc)) + (label cfg-4) + this + ) + +;; definition of type blerc-block +(deftype blerc-block (structure) + ((output uint8 848) + (header blerc-block-header :inline) + ) + ) + +;; definition for method 3 of type blerc-block +(defmethod inspect ((this blerc-block)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'blerc-block) + (format #t "~1Toutput[848] @ #x~X~%" (-> this output)) + (format #t "~1Theader: #~%" (-> this header)) + (label cfg-4) + this + ) + +;; definition of type blerc-dcache +(deftype blerc-dcache (structure) + ((repl-mult vector 40 :inline) + ) + ) + +;; definition for method 3 of type blerc-dcache +(defmethod inspect ((this blerc-dcache)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'blerc-dcache) + (format #t "~1Trepl-mult[40] @ #x~X~%" (-> this repl-mult)) + (label cfg-4) + this + ) + +;; definition of type blerc-globals +(deftype blerc-globals (structure) + ((first uint32) + (next uint32) + (min-val int16) + (max-val int16) + (fragment-count int32) + (vtx-count int32) + (target-vtx-count int32) + ) + ) + +;; definition for method 3 of type blerc-globals +(defmethod inspect ((this blerc-globals)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'blerc-globals) + (format #t "~1Tfirst: #x~X~%" (-> this first)) + (format #t "~1Tnext: #x~X~%" (-> this next)) + (format #t "~1Tmin-val: ~D~%" (-> this min-val)) + (format #t "~1Tmax-val: ~D~%" (-> this max-val)) + (format #t "~1Tfragment-count: ~D~%" (-> this fragment-count)) + (format #t "~1Tvtx-count: ~D~%" (-> this vtx-count)) + (format #t "~1Ttarget-vtx-count: ~D~%" (-> this target-vtx-count)) + (label cfg-4) + this + ) + +;; definition for symbol *blerc-globals*, type blerc-globals +(define *blerc-globals* (new 'global 'blerc-globals)) + +;; definition of type blerc-context +(deftype blerc-context (structure) + ((block-a blerc-block :inline) + (dummy uint8 7312) + (block-b blerc-block :inline) + ) + ) + +;; definition for method 3 of type blerc-context +(defmethod inspect ((this blerc-context)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'blerc-context) + (format #t "~1Tblock-a: #~%" (-> this block-a)) + (format #t "~1Tdummy[7312] @ #x~X~%" (-> this dummy)) + (format #t "~1Tblock-b: #~%" (-> this block-b)) + (label cfg-4) + this + ) + +;; definition (debug) for function blerc-stats-init +;; WARN: Return type mismatch int vs none. +(defun-debug blerc-stats-init () + (when *stats-blerc* + (when (nonzero? (-> *blerc-globals* fragment-count)) + (format *stdcon* "~%BLERC (merc blend target) STATS~%") + (format + *stdcon* + " ~D fragments, ~D vertices~%" + (-> *blerc-globals* fragment-count) + (-> *blerc-globals* vtx-count) + ) + (format + *stdcon* + " ~D blend target computations (~F average)~%" + (-> *blerc-globals* target-vtx-count) + (/ (the float (-> *blerc-globals* target-vtx-count)) (the float (-> *blerc-globals* vtx-count))) + ) + (if (< (-> *blerc-globals* min-val) 0) + (format *stdcon* "MINIMUM OUT OF RANGE: ~D~%" (-> *blerc-globals* min-val)) + ) + (if (< 255 (-> *blerc-globals* max-val)) + (format *stdcon* "MAXIMUM OUT OF RANGE: ~D~%" (-> *blerc-globals* max-val)) + ) + ) + (let ((a0-7 *blerc-globals*)) + (set! (-> a0-7 min-val) 255) + (set! (-> a0-7 max-val) 0) + (set! (-> a0-7 fragment-count) 0) + (set! (-> a0-7 vtx-count) 0) + (set! (-> a0-7 target-vtx-count) 0) + ) + ) + 0 + (none) + ) + +;; definition for function blerc-init +;; WARN: Return type mismatch int vs none. +(defun blerc-init () + (blerc-stats-init) + (let ((v1-0 *blerc-globals*)) + (set! (-> v1-0 first) (the-as uint 0)) + (set! (-> v1-0 next) (the-as uint 0)) + ) + 0 + (none) + ) + +;; definition for function blerc-a-fragment +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function dma-from-spr +;; ERROR: function has no type analysis. Cannot decompile. + +;; definition for function merc-dma-chain-to-spr +;; ERROR: function has no type analysis. Cannot decompile. + +;; definition for function blerc-execute +;; INFO: function output is handled by mips2c +(def-mips2c blerc-execute (function none)) + +;; definition for function merc-blend-shape +;; WARN: Return type mismatch int vs object. +(defun merc-blend-shape ((arg0 process-drawable)) + (let* ((v1-1 (-> arg0 skel float-channels)) + (a2-0 (cond + ((> v1-1 0) + (-> arg0 skel channel (+ v1-1 -1 (-> arg0 skel active-channels))) + ) + (else + (let ((v1-7 (-> arg0 skel root-channel)) + (a0-5 (-> arg0 skel effect)) + ) + (-> v1-7 (if a0-5 + (-> a0-5 channel-offset) + 0 + ) + ) + ) + ) + ) + ) + (a3-0 (-> a2-0 frame-group)) + (a1-0 (new 'stack-no-clear 'array 'int16 128)) + ) + (when (and a3-0 (and (> (-> arg0 skel active-channels) 0) + (zero? (-> arg0 draw cur-lod)) + (logtest? (-> arg0 skel status) (joint-control-status blend-shape)) + ) + ) + (cond + ((and (-> arg0 skel override) (!= (-> arg0 skel override 0) 0.0)) + (let* ((a0-12 (-> arg0 draw mgeo)) + (v1-20 (-> a0-12 header blend-target-count)) + (a2-2 (-> arg0 skel override)) + ) + (when (nonzero? v1-20) + (dotimes (a3-1 (the-as int v1-20)) + (set! (-> a1-0 a3-1) (the int (* 8192.0 (-> a2-2 (+ a3-1 1))))) + ) + (setup-blerc-chains a0-12 a1-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (logior! (-> arg0 skel status) (joint-control-status blend-shape-valid)) + (return (the-as object #f)) + ) + ) + ) + (else + (let ((t2-0 (-> a3-0 blend-shape-anim))) + (when t2-0 + (let ((a0-14 (-> arg0 draw mgeo))) + (let* ((v1-33 (-> a0-14 header blend-target-count)) + (t0-8 (-> a2-0 frame-num)) + (t1-2 (the int t0-8)) + (a2-6 (&+ t2-0 (* (the-as uint t1-2) v1-33))) + ) + (cond + ((< t1-2 (the-as int (+ (-> a3-0 frames num-frames) -1))) + (let* ((a3-6 (&+ a2-6 v1-33)) + (t0-9 (* 64.0 (- t0-8 (the float t1-2)))) + (t1-4 (- 64.0 t0-9)) + ) + (dotimes (t2-2 (the-as int v1-33)) + (set! (-> a1-0 t2-2) (the int (+ 0.5 + (* (the float (+ (-> (the-as (pointer uint8) (&+ a3-6 t2-2))) -64)) t0-9) + (* (the float (+ (-> (the-as (pointer uint8) (&+ a2-6 t2-2))) -64)) t1-4) + ) + ) + ) + ) + ) + ) + (else + (dotimes (a3-7 (the-as int v1-33)) + (set! (-> a1-0 a3-7) (the-as int (* (+ (-> (the-as (pointer uint8) (&+ a2-6 a3-7))) -64) 64))) + ) + ) + ) + ) + (setup-blerc-chains a0-14 a1-0 (-> *display* frames (-> *display* on-screen) global-buf)) + ) + (logior! (-> arg0 skel status) (joint-control-status blend-shape-valid)) + (return (the-as object #f)) + ) + ) + ) + ) + ) + ) + (when (logtest? (-> arg0 skel status) (joint-control-status blend-shape-valid)) + (logclear! (-> arg0 skel status) (joint-control-status blend-shape-valid)) + (setup-blerc-chains + (-> arg0 draw lod-set lod 0 geo) + (new 'static 'array int16 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) + (-> *display* frames (-> *display* on-screen) global-buf) + ) + ) + 0 + ) + +;; definition for function setup-blerc-chains-for-one-fragment +;; INFO: function output is handled by mips2c +(def-mips2c setup-blerc-chains-for-one-fragment (function object object object object object object object)) + +;; definition for function setup-blerc-chains +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun setup-blerc-chains ((arg0 merc-ctrl) (arg1 (pointer int16)) (arg2 dma-buffer)) + (local-vars + (sv-16 uint) + (sv-20 pointer) + (sv-24 merc-effect) + (sv-28 uint) + (sv-32 object) + (sv-48 int) + (sv-64 int) + ) + (set! sv-16 (-> arg0 header effect-count)) + (let ((s3-0 (-> arg0 header blend-target-count)) + (v1-1 (-> arg2 base)) + ) + (set! sv-20 (&+ v1-1 0)) + (let ((a2-1 (the-as object (&+ v1-1 16)))) + (if (zero? (-> *blerc-globals* first)) + (set! (-> *blerc-globals* first) (the-as uint a2-1)) + ) + (dotimes (s2-0 (the-as int sv-16)) + (set! sv-24 (-> arg0 effect s2-0)) + (set! sv-28 (-> sv-24 blend-frag-count)) + (when (nonzero? sv-28) + (let ((v1-15 (the-as object (-> sv-24 frag-geo))) + (s1-0 (the-as structure (-> sv-24 frag-ctrl))) + (s0-0 (the-as object (-> sv-24 blend-data))) + ) + (set! sv-32 (-> sv-24 blend-ctrl)) + (set! sv-48 0) + (while (< sv-48 (the-as int sv-28)) + (set! sv-64 (+ (the-as int v1-15) + (logand (* (+ (-> (the-as merc-fragment-control s1-0) unsigned-four-count) 3) 4) #xfff0) + ) + ) + (if (nonzero? (-> (the-as (pointer uint8) sv-32) 0)) + (set! a2-1 (setup-blerc-chains-for-one-fragment s3-0 arg1 a2-1 s0-0 sv-32 sv-64)) + ) + (let ((a0-14 (logand (+ (* (the-as uint 6) (-> (the-as merc-blend-ctrl sv-32) blend-vtx-count)) 15) #xfff0))) + (set! v1-15 + (+ sv-64 + (logand (* (+ (-> (the-as merc-fragment-control s1-0) lump-four-count) 3) 4) #xfff0) + (* (-> (the-as merc-fragment-control s1-0) fp-qwc) 16) + ) + ) + (set! s1-0 (+ (the-as uint s1-0) (* (-> (the-as merc-fragment-control s1-0) mat-xfer-count) 2) 4)) + (set! s0-0 + (+ (the-as int s0-0) (* (the-as uint a0-14) (+ (-> (the-as merc-blend-ctrl sv-32) nonzero-index-count) 1))) + ) + ) + (set! sv-32 (+ (the-as int sv-32) s3-0 2)) + (the-as int sv-32) + (set! sv-48 (+ sv-48 1)) + ) + ) + ) + ) + (set! (-> (the-as (pointer int64) sv-20)) (logior #x20000000 (shr (shl (the-as int a2-1) 33) 1))) + (set! (-> (the-as (pointer uint32) sv-20) 2) (the-as uint 0)) + (set! (-> (the-as (pointer uint32) sv-20) 3) (the-as uint 0)) + (set! (-> arg2 base) (the-as pointer a2-1)) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/foreground/merc/merc-death_REF.gc b/test/decompiler/reference/jak3/engine/gfx/foreground/merc/merc-death_REF.gc new file mode 100644 index 0000000000..ffa3d5a0d9 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/foreground/merc/merc-death_REF.gc @@ -0,0 +1,167 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *merc-death-globals*, type vector +(define *merc-death-globals* (new 'global 'vector)) + +;; definition for function birth-func-death-sparks +;; WARN: Return type mismatch int vs none. +(defun birth-func-death-sparks () + 0 + (none) + ) + +;; definition for symbol death-seed, type death-info +(define death-seed + (new 'static 'death-info :vertex-skip #x8 :timer #xe0 :overlap #xff :effect #x34 :sound "temp-enemy-die") + ) + +;; definition for function start-seed-effect +;; WARN: Return type mismatch int vs none. +(defun start-seed-effect ((arg0 process-drawable) (arg1 vector) (arg2 cspace)) + (let ((v1-0 (-> arg0 draw)) + (a1-1 death-seed) + ) + (set! (-> v1-0 death-vertex-skip) (-> a1-1 vertex-skip)) + (set! (-> v1-0 death-effect) (-> a1-1 effect)) + (set! (-> v1-0 death-timer) (+ (-> a1-1 timer) 1)) + (set! (-> v1-0 death-timer-org) (-> v1-0 death-timer)) + (set! (-> v1-0 death-draw-overlap) (-> a1-1 overlap)) + ) + (send-event + arg0 + 'trans-hook + (lambda :behavior process-drawable () (let ((v0-0 200)) + (set! (-> self draw death-timer) (the-as uint v0-0)) + (the-as time-frame v0-0) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 52 + :init-specs ((:scale-x (meters 1)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 64.0 196.0) + (:g 196.0 64.0) + (:b 0.0) + (:a 4.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:func 'sparticle-texture-glow-soft) + ) + ) + +;; definition for symbol death-default, type death-info +(define death-default + (new 'static 'death-info :vertex-skip #xa :timer #x4b :overlap #x4 :effect #x35 :sound "enemy-fizz") + ) + +;; definition for symbol death-warp-in, type death-info +(define death-warp-in + (new 'static 'death-info :vertex-skip #x96 :timer #x4b :effect #x36 :sound "warpgate-tele") + ) + +;; definition for symbol death-warp-out, type death-info +(define death-warp-out + (new 'static 'death-info :vertex-skip #x96 :timer #x96 :effect #x36 :sound "warpgate-tele") + ) + +;; definition for function sparticle-texture-glow-soft +;; WARN: Return type mismatch int vs none. +(defun sparticle-texture-glow-soft ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (particle-adgif-callback (-> arg1 adgif) (new 'static 'texture-id :index #xf :page #x4)) + (set! (-> arg1 sp-func) (the-as (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d uint none) 0)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 54 + :init-specs ((:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g 32.0 64.0) + (:b 128.0 128.0) + (:a 128.0) + (:scalevel-x (meters 0.02) (meters 0.02)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0 -1.28) + (:friction 0.92 0.02) + (:timer (seconds 1.667)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.1) (seconds 0.065)) + (:next-launcher 55) + ) + ) + +;; failed to figure out what this is: +(defpart 55 + :init-specs ((:scale-x (meters 0.3) (meters 0.2)) + (:scale-y :copy scale-x) + (:a 64.0 32.0) + (:omega (degrees 0.045) (degrees 0.03375)) + (:vel-x (meters -0.053333335) (meters 0.10666667)) + (:vel-y (meters -0.026666667) (meters 0.093333334)) + (:vel-z (meters -0.053333335) (meters 0.10666667)) + (:scalevel-x (meters -0.001) (meters -0.008)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:func 'sparticle-motion-blur) + ) + ) + +;; failed to figure out what this is: +(defpart 53 + :init-specs ((:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 96.0 150.0) + (:g 32.0 64.0) + (:b 128.0 128.0) + (:a 128.0) + (:scalevel-x (meters 0.02) (meters 0.02)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0 -1.28) + (:friction 0.92 0.02) + (:timer (seconds 1.667)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.1) (seconds 0.065)) + (:next-launcher 56) + ) + ) + +;; failed to figure out what this is: +(defpart 56 + :init-specs ((:scale-x (meters 0.3) (meters 0.2)) + (:scale-y :copy scale-x) + (:a 64.0 32.0) + (:omega (degrees 0.045) (degrees 0.03375)) + (:vel-x (meters -0.053333335) (meters 0.10666667)) + (:vel-y (meters -0.026666667) (meters 0.093333334)) + (:vel-z (meters -0.053333335) (meters 0.10666667)) + (:scalevel-x (meters -0.001) (meters -0.008)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:func 'sparticle-motion-blur) + ) + ) + +;; definition for function merc-death-spawn +;; WARN: Return type mismatch int vs none. +(defun merc-death-spawn ((arg0 int) (arg1 vector) (arg2 vector)) + (let ((v1-2 (-> *part-id-table* arg0))) + (if (and (nonzero? v1-2) (= (-> v1-2 type) sparticle-launcher)) + (sp-launch-particles-death *sp-particle-system-2d* v1-2 arg1) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/foreground/merc/merc-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/foreground/merc/merc-h_REF.gc index 3907b06824..1a8d8c95e8 100644 --- a/test/decompiler/reference/jak3/engine/gfx/foreground/merc/merc-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/foreground/merc/merc-h_REF.gc @@ -877,7 +877,7 @@ Consists of a header and a list of [[merc-effect]]s." (timer uint8) (overlap uint8) (effect uint32) - (sound symbol) + (sound string) ) ) 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 0000000000..c0986c27ff --- /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/foreground/shadow-cpu-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/foreground/shadow-cpu-h_REF.gc index 4862b7caa8..a9f0cfeb6a 100644 --- a/test/decompiler/reference/jak3/engine/gfx/foreground/shadow-cpu-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/foreground/shadow-cpu-h_REF.gc @@ -44,7 +44,7 @@ ((settings shadow-settings :inline) ) (:methods - (new (symbol type float float float vector float float) _type_) + (new (symbol type float float float vector shadow-flags float) _type_) (enable-draw (shadow-control) int) (disable-draw (shadow-control) int) (set-top-plane-offset (shadow-control float) int) @@ -480,14 +480,14 @@ (arg1 float) (arg2 float) (arg3 vector) - (arg4 float) + (arg4 shadow-flags) (arg5 float) ) (let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) (if arg3 (set! (-> v0-0 settings center quad) (-> arg3 quad)) ) - (set! (-> v0-0 settings flags) (the-as shadow-flags arg4)) + (set! (-> v0-0 settings flags) arg4) (set-vector! (-> v0-0 settings shadow-dir) 0.0 -1.0 0.0 arg2) (set-vector! (-> v0-0 settings bot-plane) 0.0 1.0 0.0 (- arg0)) (set-vector! (-> v0-0 settings top-plane) 0.0 1.0 0.0 (- arg1)) @@ -508,7 +508,3 @@ ;; definition for symbol *shadow-dma-buf*, type dma-buffer (define *shadow-dma-buf* (new 'global 'dma-buffer 512)) - - - - diff --git a/test/decompiler/reference/jak3/engine/gfx/generic/generic-effect_REF.gc b/test/decompiler/reference/jak3/engine/gfx/generic/generic-effect_REF.gc new file mode 100644 index 0000000000..f5bdb33c66 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/generic/generic-effect_REF.gc @@ -0,0 +1,394 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *target-lock*, type object +(define *target-lock* (the-as object 0)) + +;; definition for symbol *generic-consts*, type generic-consts +(define *generic-consts* + (new 'static 'generic-consts + :dma-header (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32)) + ) + :vif-header (new 'static 'array uint32 4 #x1000404 #x1000404 #x1000404 #x6c000000) + :dma-ref-vtxs (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref))) + :dma-cnt-call (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id cnt))) + :matrix (new 'static 'matrix + :rvec (new 'static 'vector :x 1.0) + :uvec (new 'static 'vector :y 1.0) + :fvec (new 'static 'vector :z 1.0) + :trans (new 'static 'vector :w 1.0) + ) + :base-strgif (new 'static 'generic-gif-tag + :fan-prim (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + :str-prim (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + :regs (new 'static 'gif-tag-regs-32 :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + :alpha-opaque (new 'static 'gs-adcmd :cmds (gs-reg64 alpha-1)) + :alpha-translucent (new 'static 'gs-adcmd :cmds (gs-reg64 alpha-1) :x #x44) + :ztest-normal (new 'static 'gs-adcmd :cmds (gs-reg64 test-1) :x #x5026b) + :ztest-opaque (new 'static 'gs-adcmd :cmds (gs-reg64 test-1) :x #x5000a) + :adcmd-offsets (new 'static 'array uint8 16 #x0 #x20 #x20 #x20 #x0 #x30 #x30 #x30 #x0 #x30 #x30 #x30 #x0 #x30 #x30 #x30) + :stcycle-tag #x1000103 + :unpack-vtx-tag #x68000000 + :unpack-clr-tag #x6e004000 + :unpack-tex-tag #x65000000 + :mscal-tag #x14000006 + :reset-cycle-tag #x1000404 + :dma-tag-cnt #x10000000 + :envmap (new 'static 'generic-envmap-consts + :consts (new 'static 'vector :x 1.0 :z 0.5 :w 0.5) + :strgif (new 'static 'generic-gif-tag + :fan-prim (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + :str-prim (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + :regs (new 'static 'gif-tag-regs-32 :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + :colors (new 'static 'vector4w :x -2139062144 :y -2139062144 :z -2139062144 :w -2139062144) + ) + :light-consts (new 'static 'vector :x 255.0 :y 8388608.0) + ) + ) + +;; definition for function generic-work-init +;; INFO: Used lq/sq +;; WARN: Return type mismatch uint128 vs none. +(defun generic-work-init ((arg0 generic-bucket-state)) + "Initialize the scratchpad work for generic." + (quad-copy! + (the-as pointer (-> (the-as generic-work #x70000000) fx-buf work)) + (the-as pointer *generic-consts*) + 27 + ) + (set! (-> (the-as generic-work #x70000000) saves gifbuf-adr) (-> arg0 gifbuf-adr)) + (set! (-> (the-as generic-work #x70000000) saves inbuf-adr) (-> arg0 inbuf-adr)) + (set! (-> (the-as generic-work #x70000000) saves cur-outbuf) + (the-as uint (-> (the-as generic-work #x70000000) fx-buf)) + ) + (let* ((v1-6 *default-envmap-shader*) + (a0-9 (-> (the-as generic-work #x70000000) fx-buf work consts envmap shader)) + (a1-2 (-> v1-6 quad 0 quad)) + (a2-1 (-> v1-6 quad 1 quad)) + (a3-0 (-> v1-6 quad 2 quad)) + (t0-0 (-> v1-6 quad 3 quad)) + (v0-1 (-> v1-6 quad 4 quad)) + ) + (set! (-> a0-9 quad 0 quad) a1-2) + (set! (-> a0-9 quad 1 quad) a2-1) + (set! (-> a0-9 quad 2 quad) a3-0) + (set! (-> a0-9 quad 3 quad) t0-0) + (set! (-> a0-9 quad 4 quad) v0-1) + ) + (none) + ) + +;; definition for function generic-upload-vu0 +;; WARN: Return type mismatch int vs none. +;; ERROR: Failed store: (s.d! (+ a0-5 8) 0) at op 17 +(defun generic-upload-vu0 () + "Upload generic VU0 program." + (let ((gp-0 *vu0-dma-list*)) + (let ((v1-0 gp-0)) + (set! (-> v1-0 base) (-> v1-0 data)) + (set! (-> v1-0 end) (the-as pointer (+ (+ (-> v1-0 allocated-length) 28) (the-as int v1-0)))) + ) + (dma-buffer-add-vu-function gp-0 generic-vu0-block 0) + (let* ((v1-1 gp-0) + (a0-5 (-> v1-1 base)) + ) + (set! (-> (the-as (pointer int64) a0-5)) #x70000000) + (s.d! (+ a0-5 8) 0) + (set! (-> v1-1 base) (&+ a0-5 16)) + ) + (.sync.l) + (dma-buffer-send-chain (the-as dma-bank-source #x10008000) gp-0) + ) + 0 + (none) + ) + +;; definition for function upload-vu0-program +;; ERROR: failed type prop at 2: Could not figure out load: (set! a3 (l.wu (+ a0 8))) +;; ERROR: Unsupported inline assembly instruction kind - [pmaxw t5, t4, r0] +;; ERROR: Unsupported inline assembly instruction kind - [sll t6, t4, 17] +;; ERROR: Unsupported inline assembly instruction kind - [sll t5, t4, 1] +;; ERROR: Unsupported inline assembly instruction kind - [sll t4, t4, 4] +;; ERROR: Unsupported inline assembly instruction kind - [cache dxwbin t0, 0] +;; ERROR: Unsupported inline assembly instruction kind - [cache dxwbin t0, 1] +;; ERROR: Unsupported inline assembly instruction kind - [cache dxwbin a0, 0] +;; ERROR: Unsupported inline assembly instruction kind - [cache dxwbin a0, 1] +(defun upload-vu0-program ((a0-0 vu-function) (a1-0 pointer)) + "Upload vu-function to VU0." + (local-vars + (v0-0 none) + (v1-0 dma-buffer) + (v1-1 none) + (a0-1 none) + (a0-2 none) + (a0-3 none) + (a0-4 none) + (a1-1 none) + (a2-0 int) + (a2-1 none) + (a2-2 none) + (a3-0 none) + (a3-1 none) + (a3-2 none) + (a3-3 none) + (t0-0 none) + (t0-1 none) + (t0-2 none) + (t0-3 none) + (t0-4 none) + (t1-0 none) + (t1-1 none) + (t1-2 none) + (t2-0 none) + (t3-0 none) + (t4-0 uint128) + (t4-1 none) + (t4-2 none) + (t5-0 uint128) + (t5-1 none) + (t5-2 none) + (t6-0 none) + (t6-1 none) + ) + (set! v1-0 *vu0-dma-list*) + (set! a2-0 #x30000000) + (set! a3-0 (the-as none (l.wu (+ a0-0 8)))) + (set! t0-0 (the-as none #x10000000)) + (set! t1-0 (the-as none (l.wu (+ a0-0 4)))) + (set! v1-1 (the-as none (-> v1-0 data))) + (set! t2-0 (the-as none (+ a0-0 16))) + (set! a0-1 (the-as none v1-1)) + (set! t3-0 (the-as none #x4a000000)) + (label cfg-1) + (set! t4-0 (the-as uint128 (+ a3-0 -127))) + (s.w! a0-1 a2-0) + (.pmaxw t5-0 t4-0 r0) + (s.w! (+ a0-1 4) t2-0) + (set! t4-1 (the-as none (- a3-0 t5-0))) + (s.w! (+ a0-1 8) t0-0) + (set! a3-0 (the-as none t5-0)) + (s.b! a0-1 t4-1) + (.sll t6-0 t4-1 17) + (.sll t5-1 t4-1 1) + (set! t6-1 (the-as none (+ t6-0 t1-0))) + (set! t1-0 (the-as none (+ t1-0 t5-1))) + (set! t5-2 (the-as none (+ t6-1 t3-0))) + (.sll t4-2 t4-1 4) + (s.w! (+ a0-1 12) t5-2) + (set! t2-0 (the-as none (+ t2-0 t4-2))) + ((b! (nonzero? a3-0) L101 (set! a0-1 (+ a0-1 16))) (set! a0-1 (the-as none (+ a0-1 16)))) + (set! a2-1 (the-as none #x70000000)) + (set! a3-1 (the-as none #x10000000)) + (s.d! a0-1 a2-1) + (set! a2-2 (the-as none (logior a3-1 #x8000))) + (s.d! (+ a0-1 8) 0) + (set! a3-2 (the-as none (l.w a2-2))) + (set! t0-1 (the-as none v1-1)) + (.sync.l) + (.cache dxwbin t0-1 0) + (.sync.l) + (.cache dxwbin t0-1 1) + (.sync.l) + (set! t0-2 (the-as none 0)) + (.sync.l) + (.cache dxwbin a0-1 0) + (.sync.l) + (.cache dxwbin a0-1 1) + (.sync.l) + (set! a0-2 (the-as none 0)) + (set! a0-3 (the-as none (logand a3-2 256))) + ((b! (zero? a0-3) L103 (set! a0-4 325)) (set! a0-4 (the-as none 325))) + (set! a3-3 (the-as none a2-2)) + (nop!) + (label cfg-4) + (set! t0-3 (the-as none (l.w a1-0))) + (nop!) + (set! t1-1 (the-as none (l.w a3-3))) + (nop!) + (set! t1-2 (the-as none (logand t1-1 256))) + (set! t0-4 (the-as none (+ t0-3 1))) + ((b! (nonzero? t1-2) L102 (s.w! a1-0 t0-4)) (s.w! a1-0 t0-4)) + (set! a1-1 (the-as none 0)) + (label cfg-6) + (.sync.l) + (s.w! (+ a2-2 32) 0) + (s.w! (+ a2-2 48) v1-1) + (.sync.l) + (s.w! a2-2 a0-4) + (.sync.l) + (set! v0-0 (the-as none 0)) + (ret-none) + ) + +;; definition for function generic-initialize-without-sync +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun generic-initialize-without-sync ((arg0 matrix) (arg1 vu-lights)) + "Init generic, version for generic-merc, which relies on generic-merc init running after." + (upload-vu0-program generic-vu0-block (the-as pointer #x70000054)) + (let ((a2-0 (-> (the-as generic-work #x70000000) fx-buf work consts matrix)) + (v1-1 (-> arg0 rvec quad)) + (a0-3 (-> arg0 uvec quad)) + (a1-2 (-> arg0 fvec quad)) + (a3-0 (-> arg0 trans quad)) + ) + (set! (-> a2-0 rvec quad) v1-1) + (set! (-> a2-0 uvec quad) a0-3) + (set! (-> a2-0 fvec quad) a1-2) + (set! (-> a2-0 trans quad) a3-0) + ) + (if arg1 + (quad-copy! (the-as pointer (-> (the-as generic-work #x70000000) fx-buf work lights)) (the-as pointer arg1) 7) + ) + 0 + (none) + ) + +;; definition for function generic-initialize +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun generic-initialize ((arg0 generic-bucket-state) (arg1 matrix) (arg2 vu-lights)) + "Normal init for generic - sets up scratchpad and VU0." + (generic-work-init arg0) + (generic-upload-vu0) + (let ((a2-1 (-> (the-as generic-work #x70000000) fx-buf work consts matrix)) + (v1-1 (-> arg1 rvec quad)) + (a0-2 (-> arg1 uvec quad)) + (a1-1 (-> arg1 fvec quad)) + (a3-0 (-> arg1 trans quad)) + ) + (set! (-> a2-1 rvec quad) v1-1) + (set! (-> a2-1 uvec quad) a0-2) + (set! (-> a2-1 fvec quad) a1-1) + (set! (-> a2-1 trans quad) a3-0) + ) + (if arg2 + (quad-copy! (the-as pointer (-> (the-as generic-work #x70000000) fx-buf work lights)) (the-as pointer arg2) 7) + ) + 0 + (none) + ) + +;; definition for function generic-wrapup +;; WARN: Return type mismatch uint vs none. +(defun generic-wrapup ((arg0 generic-bucket-state)) + (set! (-> arg0 gifbuf-adr) (-> (the-as generic-work #x70000000) saves gifbuf-adr)) + (set! (-> arg0 inbuf-adr) (-> (the-as generic-work #x70000000) saves inbuf-adr)) + (none) + ) + +;; definition for function generic-dma-from-spr +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function generic-light-proc +;; INFO: function output is handled by mips2c +(def-mips2c generic-light-proc function) + +;; definition for function generic-envmap-proc +;; INFO: function output is handled by mips2c +(def-mips2c generic-envmap-proc function) + +;; definition for function generic-prepare-dma-double +;; INFO: function output is handled by mips2c +(def-mips2c generic-prepare-dma-double function) + +;; definition for function generic-prepare-dma-single +;; INFO: function output is handled by mips2c +(def-mips2c generic-prepare-dma-single function) + +;; definition for function generic-envmap-dproc +;; ERROR: function has no type analysis. Cannot decompile. + +;; definition for function generic-interp-dproc +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function generic-no-light-proc +;; INFO: function output is handled by mips2c +(def-mips2c generic-no-light-proc function) + +;; definition for function generic-no-light-dproc-only +;; ERROR: function has no type analysis. Cannot decompile. + +;; definition for function generic-no-light-dproc +;; ERROR: function has no type analysis. Cannot decompile. + +;; definition for function generic-no-light+envmap +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function generic-no-light +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function generic-envmap-only-proc +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function generic-light +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function generic-copy-vtx-dclr-dtex +;; ERROR: function has no type analysis. Cannot decompile. + +;; definition for function generic-none +;; ERROR: function has no type analysis. Cannot decompile. + +;; definition for function generic-none-dma-wait +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for symbol *warp-data*, type object +(define *warp-data* (the-as object (malloc 'global 1024))) + +;; definition for function generic-warp-source-proc +;; INFO: function output is handled by mips2c +(def-mips2c generic-warp-source-proc (function none)) + +;; definition for function generic-warp-source +;; ERROR: Unsupported inline assembly instruction kind - [lui at, 28672] +(defun generic-warp-source ((arg0 gsf-buffer)) + (local-vars (at-0 object)) + (.lui at-0 28672) + (set! (-> (the-as generic-work at-0) saves gsf-buf) arg0) + (generic-warp-source-proc) + (none) + ) + +;; definition for function generic-warp-dest-proc +;; INFO: function output is handled by mips2c +(def-mips2c generic-warp-dest-proc function) + +;; definition for function generic-warp-dest +;; INFO: function output is handled by mips2c +(def-mips2c generic-warp-dest function) + +;; definition for function generic-warp-envmap-dest +;; INFO: function output is handled by mips2c +(def-mips2c generic-warp-envmap-dest function) + +;; definition for function generic-debug-light-proc +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition (debug) for function generic-post-debug +;; ERROR: function has no type analysis. Cannot decompile. + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/generic/generic-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/generic/generic-h_REF.gc index 100556a24f..70480508a0 100644 --- a/test/decompiler/reference/jak3/engine/gfx/generic/generic-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/generic/generic-h_REF.gc @@ -372,8 +372,8 @@ the same position/normal." (goto cfg-4) ) (format #t "[~8x] ~A~%" this 'generic-gif-tag) - (format #t "~1Tdata[4] @ #x~X~%" (-> this data)) - (format #t "~1Tqword: #~%" (-> this data)) + (format #t "~1Tdata[4] @ #x~X~%" (&-> this fan-prim)) + (format #t "~1Tqword: #~%" (&-> this fan-prim)) (format #t "~1Tfan-prim: ~D~%" (-> this fan-prim)) (format #t "~1Tstr-prim: ~D~%" (-> this str-prim)) (format #t "~1Tregs: ~D~%" (-> this regs)) @@ -495,7 +495,3 @@ the same position/normal." ;; failed to figure out what this is: (kmemclose) - - - - diff --git a/test/decompiler/reference/jak3/engine/gfx/generic/generic-vu1_REF.gc b/test/decompiler/reference/jak3/engine/gfx/generic/generic-vu1_REF.gc index 54947867e3..c36ccef51c 100644 --- a/test/decompiler/reference/jak3/engine/gfx/generic/generic-vu1_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/generic/generic-vu1_REF.gc @@ -44,10 +44,16 @@ ;; definition for function generic-setup-shrub-constants ;; WARN: Return type mismatch int vs none. (defun generic-setup-shrub-constants ((arg0 generic-shrub-constants) (arg1 int) (arg2 int) (arg3 int)) - (set! (-> arg0 shrub-giftag qword vector4w x) (logior #x30004000 (shr (shl arg3 53) 38))) - (set! (-> arg0 shrub-giftag qword vector4w y) (logior #x30004000 (shr (shl arg2 53) 38))) - (set! (-> arg0 shrub-giftag qword vector4w z) 1042) - (set! (-> arg0 shrub-giftag qword vector4w w) 0) + (set! (-> arg0 shrub-giftag fan-prim) + (new 'static 'gif-tag-prim :pre #x1 :nreg #x3 :prim (the-as gs-prim arg3)) + ) + (set! (-> arg0 shrub-giftag str-prim) + (new 'static 'gif-tag-prim :pre #x1 :nreg #x3 :prim (the-as gs-prim arg2)) + ) + (set! (-> arg0 shrub-giftag regs) + (new 'static 'gif-tag-regs-32 :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 shrub-giftag num-strips) (the-as uint 0)) (set! (-> arg0 shrub-adnop dword 0) (the-as uint arg1)) (set! (-> arg0 shrub-adnop dword 1) (the-as uint 71)) (none) diff --git a/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning-h_REF.gc index 3a07f20187..f00dbb55ef 100644 --- a/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning-h_REF.gc @@ -21,7 +21,7 @@ (radius float) (duration float) (duration-rand float) - (sound symbol) + (sound sound-spec) (delay float) (delay-rand float) ) diff --git a/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning-new-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning-new-h_REF.gc new file mode 100644 index 0000000000..88e182e5e3 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning-new-h_REF.gc @@ -0,0 +1,316 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type lightning-appearance +(deftype lightning-appearance (structure) + ((base-alpha float) + (width-range-start float) + (width-range-end float) + (tex-id uint32) + (blend-mode uint64) + (fade-time time-frame) + (regenerate-time-start time-frame) + (regenerate-time-end time-frame) + (alpha-1-curve curve2d-fast) + (alpha-1-mode uint64) + (alpha-1-repeat-dist float) + (alpha-2-curve curve2d-fast) + (alpha-2-mode uint64) + (alpha-2-repeat-dist float) + (width-curve curve2d-fast) + (width-mode uint64) + (width-repeat-dist float) + (uv-repeat-dist float) + (uv-shift? symbol) + (uv-shift-speed time-frame) + (use-sprite-bucket? symbol :offset 128) + (use-accurate-interp? symbol) + ) + ) + +;; definition for method 3 of type lightning-appearance +(defmethod inspect ((this lightning-appearance)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'lightning-appearance) + (format #t "~1Tbase-alpha: ~f~%" (-> this base-alpha)) + (format #t "~1Twidth-range-start: ~f~%" (-> this width-range-start)) + (format #t "~1Twidth-range-end: ~f~%" (-> this width-range-end)) + (format #t "~1Ttex-id: ~D~%" (-> this tex-id)) + (format #t "~1Tblend-mode: ~D~%" (-> this blend-mode)) + (format #t "~1Tfade-time: ~D~%" (-> this fade-time)) + (format #t "~1Tregenerate-time-start: ~D~%" (-> this regenerate-time-start)) + (format #t "~1Tregenerate-time-end: ~D~%" (-> this regenerate-time-end)) + (format #t "~1Talpha-1-curve: ~A~%" (-> this alpha-1-curve)) + (format #t "~1Talpha-1-mode: ~D~%" (-> this alpha-1-mode)) + (format #t "~1Talpha-1-repeat-dist: ~f~%" (-> this alpha-1-repeat-dist)) + (format #t "~1Talpha-2-curve: ~A~%" (-> this alpha-2-curve)) + (format #t "~1Talpha-2-mode: ~D~%" (-> this alpha-2-mode)) + (format #t "~1Talpha-2-repeat-dist: ~f~%" (-> this alpha-2-repeat-dist)) + (format #t "~1Twidth-curve: ~A~%" (-> this width-curve)) + (format #t "~1Twidth-mode: ~D~%" (-> this width-mode)) + (format #t "~1Twidth-repeat-dist: ~f~%" (-> this width-repeat-dist)) + (format #t "~1Tuv-repeat-dist: ~f~%" (-> this uv-repeat-dist)) + (format #t "~1Tuv-shift?: ~A~%" (-> this uv-shift?)) + (format #t "~1Tuv-shift-speed: ~D~%" (-> this uv-shift-speed)) + (format #t "~1Tfade-time: ~D~%" (-> this fade-time)) + (format #t "~1Tuse-sprite-bucket?: ~A~%" (-> this use-sprite-bucket?)) + (format #t "~1Tuse-accurate-interp?: ~A~%" (-> this use-accurate-interp?)) + (label cfg-4) + this + ) + +;; definition of type lightning-span-internal +(deftype lightning-span-internal (structure) + ((index int16) + (span-flags uint8) + (num-inner-points int8) + ) + :pack-me + ) + +;; definition for method 3 of type lightning-span-internal +(defmethod inspect ((this lightning-span-internal)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'lightning-span-internal) + (format #t "~1Tindex: ~D~%" (-> this index)) + (format #t "~1Tspan-flags: ~D~%" (-> this span-flags)) + (format #t "~1Tnum-inner-points: ~D~%" (-> this num-inner-points)) + (label cfg-4) + this + ) + +;; definition of type lightning-span +(deftype lightning-span (structure) + ((random-offset-size-start float) + (inner-random-offset-size float) + ) + :pack-me + ) + +;; definition for method 3 of type lightning-span +(defmethod inspect ((this lightning-span)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'lightning-span) + (format #t "~1Trandom-offset-size-start: ~f~%" (-> this random-offset-size-start)) + (format #t "~1Tinner-random-offset-size: ~f~%" (-> this inner-random-offset-size)) + (label cfg-4) + this + ) + +;; definition of type lightning-spans-array +(deftype lightning-spans-array (inline-array-class) + ((data lightning-span :inline :dynamic) + ) + ) + +;; definition for method 3 of type lightning-spans-array +(defmethod inspect ((this lightning-spans-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! (-> lightning-spans-array heap-base) (the-as uint 8)) + +;; definition of type lightning-spans-internal-array +(deftype lightning-spans-internal-array (inline-array-class) + ((data lightning-span-internal :inline :dynamic) + ) + ) + +;; definition for method 3 of type lightning-spans-internal-array +(defmethod inspect ((this lightning-spans-internal-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! (-> lightning-spans-internal-array heap-base) (the-as uint 4)) + +;; definition of type tex-u-holder +(deftype tex-u-holder (structure) + ((uu float) + (last-dist float) + ) + ) + +;; definition for method 3 of type tex-u-holder +(defmethod inspect ((this tex-u-holder)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'tex-u-holder) + (format #t "~1Tuu: ~f~%" (-> this uu)) + (format #t "~1Tlast-dist: ~f~%" (-> this last-dist)) + (label cfg-4) + this + ) + +;; definition of type lightning-bolt +(deftype lightning-bolt (basic) + ((current-points vector-array) + (desired-points vector-array) + (span-pts-start vector-array) + (spans lightning-spans-array) + (spans-internal lightning-spans-internal-array) + (strip1 prim-strip) + (strip2 prim-strip) + (inner-point-travel-time time-frame) + (start-fade-time time-frame) + (new-inner-point-generate-time time-frame) + (last-generate-time time-frame) + (base-width float) + (current-uv-shift float) + (current-fade-scalar float) + (fractal-reduction float) + (appearance lightning-appearance) + (fade-mode uint64) + (generate-mode uint64) + (snap-inner-points? symbol) + (span-data int8 2) + (num-active-spans int8 :overlay-at (-> span-data 0)) + (num-spans int8 :overlay-at (-> span-data 1)) + (base-color rgba) + ) + (:methods + (init! (_type_ int int lightning-appearance) none) + (reset-spans! (_type_) none) + (lightning-bolt-method-11 (_type_) none) + (lightning-bolt-method-12 (_type_) none) + (lightning-bolt-method-13 (_type_ int) none) + (lightning-bolt-method-14 (_type_) int) + (lightning-bolt-method-15 (_type_ object int lightning-span-internal) none) + (lightning-bolt-method-16 (_type_ vector float float vector matrix) none) + (lightning-bolt-method-17 (_type_ uint float float curve2d-fast float) float) + (lightning-bolt-method-18 (_type_ prim-strip vector rgba float float) none) + (lightning-bolt-method-19 (_type_ vector int int matrix float float) none) + (lightning-bolt-method-20 (_type_ int lightning-span-internal) vector) + (lightning-bolt-method-21 (_type_ int int float) none) + (lightning-bolt-method-22 (_type_) none) + ) + ) + +;; definition for method 3 of type lightning-bolt +(defmethod inspect ((this lightning-bolt)) + (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 lightning-new-tracker +(deftype lightning-new-tracker (process) + ((bolt lightning-bolt) + (lifetime time-frame) + (state-time time-frame) + ) + (:state-methods + active + die + ) + ) + +;; definition for method 3 of type lightning-new-tracker +(defmethod inspect ((this lightning-new-tracker)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Tbolt: ~A~%" (-> this bolt)) + (format #t "~2Tlifetime: ~D~%" (-> this lifetime)) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (label cfg-4) + this + ) + +;; definition of type lightning-tracker-init-params +(deftype lightning-tracker-init-params (structure) + ((appearance lightning-appearance) + (start-pt vector :inline) + (end-pt vector :inline) + (lifetime time-frame) + (num-inner-points int8) + (inner-random-offset-size float) + (random-offset-size-start float) + ) + ) + +;; definition for method 3 of type lightning-tracker-init-params +(defmethod inspect ((this lightning-tracker-init-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'lightning-tracker-init-params) + (format #t "~1Tappearance: #~%" (-> this appearance)) + (format #t "~1Tstart-pt: #~%" (-> this start-pt)) + (format #t "~1Tend-pt: #~%" (-> this end-pt)) + (format #t "~1Tlifetime: ~D~%" (-> this lifetime)) + (format #t "~1Tnum-inner-points: ~D~%" (-> this num-inner-points)) + (format #t "~1Tinner-random-offset-size: ~f~%" (-> this inner-random-offset-size)) + (format #t "~1Trandom-offset-size-start: ~f~%" (-> this random-offset-size-start)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning-new_REF.gc b/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning-new_REF.gc new file mode 100644 index 0000000000..0783a92797 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning-new_REF.gc @@ -0,0 +1,883 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *lightning-alpha-additive*, type gs-alpha +(define *lightning-alpha-additive* (new 'static 'gs-alpha :b #x2 :d #x1)) + +;; definition for symbol *lightning-alpha-blend*, type gs-alpha +(define *lightning-alpha-blend* (new 'static 'gs-alpha :b #x1 :d #x1)) + +;; definition for symbol *lightning-alpha-subtractive*, type gs-alpha +(define *lightning-alpha-subtractive* (new 'static 'gs-alpha :a #x2 :d #x1)) + +;; definition for method 9 of type lightning-bolt +;; WARN: Return type mismatch int vs none. +(defmethod init! ((this lightning-bolt) (arg0 int) (arg1 int) (arg2 lightning-appearance)) + (set! (-> this num-spans) arg0) + (set! (-> this spans) (new 'process 'lightning-spans-array arg0)) + (set! (-> this num-active-spans) 0) + (set! (-> this span-pts-start) (new 'process 'vector-array arg0)) + (let ((s3-0 (* arg1 arg0))) + (let ((s2-1 (+ (* arg1 (+ arg0 -1)) 1))) + (set! (-> this current-points) (new 'process 'vector-array s2-1)) + (set! (-> this desired-points) (new 'process 'vector-array s2-1)) + ) + (let ((f30-0 (* 2.0 (the float s3-0)))) + (set! (-> this strip1) + (new 'process 'prim-strip (the int f30-0) (new 'static 'texture-id :index #x3 :page #x1) (the-as string #f)) + ) + (set! (-> this strip2) + (new 'process 'prim-strip (the int f30-0) (new 'static 'texture-id :index #x3 :page #x1) (the-as string #f)) + ) + ) + ) + (set! (-> this appearance) arg2) + (set! (-> this spans-internal) (new 'process 'lightning-spans-internal-array arg0)) + (set! (-> this current-uv-shift) 0.0) + (set! (-> this strip1 clamp) (new 'static 'gs-clamp)) + (set! (-> this strip2 clamp) (new 'static 'gs-clamp)) + (when (-> this appearance use-sprite-bucket?) + (set! (-> this strip1 bucket) (bucket-id generic-sprite-1)) + (set! (-> this strip1 sink) (the-as uint 65)) + (set! (-> this strip1 texture-index) (the-as uint 7)) + (set! (-> this strip2 bucket) (bucket-id generic-sprite-1)) + (set! (-> this strip2 sink) (the-as uint 65)) + (set! (-> this strip2 texture-index) (the-as uint 7)) + ) + (set! (-> this new-inner-point-generate-time) + (rand-vu-int-range + (the-as int (-> this appearance regenerate-time-start)) + (the-as int (-> this appearance regenerate-time-end)) + ) + ) + (set! (-> this base-width) + (rand-vu-float-range (-> this appearance width-range-start) (-> this appearance width-range-end)) + ) + (set! (-> this fade-mode) (the-as uint 0)) + (set! (-> this current-fade-scalar) 1.0) + (when (-> this appearance uv-shift?) + (let* ((v1-31 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-32 (the-as number (logior #x3f800000 v1-31))) + ) + (set! (-> this current-uv-shift) (+ -1.0 (the-as float v1-32))) + ) + ) + (dotimes (v1-35 (-> this num-spans)) + (logand! (-> this spans-internal data v1-35 span-flags) -2) + (set! (-> this spans-internal data v1-35 index) v1-35) + ) + (set! (-> this base-color) *color-gray*) + 0 + (none) + ) + +;; definition for method 10 of type lightning-bolt +;; WARN: Return type mismatch int vs none. +(defmethod reset-spans! ((this lightning-bolt)) + (set! (-> this num-active-spans) 0) + 0 + (none) + ) + +;; definition for method 20 of type lightning-bolt +;; INFO: Used lq/sq +(defmethod lightning-bolt-method-20 ((this lightning-bolt) (arg0 int) (arg1 lightning-span-internal)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (let* ((f30-0 -0.5) + (v1-2 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-3 (the-as number (logior #x3f800000 v1-2))) + ) + (set! (-> s3-0 x) (+ f30-0 (+ -1.0 (the-as float v1-3)))) + ) + (let* ((f30-1 -0.5) + (v1-7 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-8 (the-as number (logior #x3f800000 v1-7))) + ) + (set! (-> s3-0 y) (+ f30-1 (+ -1.0 (the-as float v1-8)))) + ) + (set! (-> s3-0 z) (the float (-> arg1 index))) + (set! (-> s3-0 w) 1.0) + (set! (-> this desired-points data arg0 quad) (-> s3-0 quad)) + ) + (set! (-> this current-points data arg0 z) (the float (-> arg1 index))) + (-> this desired-points data arg0) + ) + +;; definition for method 21 of type lightning-bolt +;; WARN: Return type mismatch int vs none. +(defmethod lightning-bolt-method-21 ((this lightning-bolt) (arg0 int) (arg1 int) (arg2 float)) + (local-vars (sv-16 int) (sv-24 vector) (sv-28 vector) (sv-32 float)) + (let ((v1-0 (-> this desired-points))) + (when (< 1 (- arg1 arg0)) + (set! sv-16 (/ (+ arg0 arg1) 2)) + (set! sv-24 (-> v1-0 data arg0)) + (set! sv-28 (-> v1-0 data arg1)) + (set! sv-32 (the-as float 1.0)) + (set! sv-32 (-> sv-28 z)) + (let ((s2-0 (-> v1-0 data sv-16))) + (let* ((f30-0 (* 0.5 (+ (-> sv-24 x) (-> sv-28 x)))) + (f28-0 arg2) + (f26-0 -0.5) + (v1-6 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-7 (the-as number (logior #x3f800000 v1-6))) + ) + (set! (-> s2-0 x) (+ f30-0 (* f28-0 (+ f26-0 (+ -1.0 (the-as float v1-7)))))) + ) + (let* ((f30-1 (* 0.5 (+ (-> sv-24 y) (-> sv-28 y)))) + (f28-1 arg2) + (f26-1 -0.5) + (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-1 (* f28-1 (+ f26-1 (+ -1.0 (the-as float v1-15)))))) + ) + (set! (-> s2-0 z) (lerp (-> sv-24 z) sv-32 0.5)) + ) + (lightning-bolt-method-21 this arg0 sv-16 (* arg2 (-> this fractal-reduction))) + (lightning-bolt-method-21 this sv-16 arg1 (* arg2 (-> this fractal-reduction))) + ) + ) + 0 + (none) + ) + +;; definition for method 15 of type lightning-bolt +(defmethod lightning-bolt-method-15 ((this lightning-bolt) (arg0 object) (arg1 int) (arg2 lightning-span-internal)) + (let ((v1-0 (-> this generate-mode))) + (cond + ((zero? v1-0) + (let ((f30-0 (the float (-> arg2 index))) + (f28-0 (the float (+ (-> arg2 index) 1))) + (f26-0 (/ 1.0 (the float (+ (-> arg2 num-inner-points) 1)))) + ) + 0.0 + (let ((f24-0 (+ 0.0 f26-0))) + (dotimes (s3-0 (-> arg2 num-inner-points)) + (let ((f22-0 (lerp f30-0 f28-0 f24-0))) + (let ((s2-0 (-> this desired-points data (+ s3-0 1 arg1)))) + (let* ((f20-0 -0.5) + (v1-13 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-14 (the-as number (logior #x3f800000 v1-13))) + ) + (set! (-> s2-0 x) (+ f20-0 (+ -1.0 (the-as float v1-14)))) + ) + (let* ((f20-1 -0.5) + (v1-18 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-19 (the-as number (logior #x3f800000 v1-18))) + ) + (set! (-> s2-0 y) (+ f20-1 (+ -1.0 (the-as float v1-19)))) + ) + (set! (-> s2-0 z) f22-0) + (set! (-> s2-0 w) 1.0) + ) + (set! (-> this current-points data (+ s3-0 1 arg1) z) f22-0) + ) + (+! f24-0 f26-0) + ) + ) + ) + ) + ((= v1-0 1) + (lightning-bolt-method-21 this arg1 (+ (-> arg2 num-inner-points) 1 arg1) 1.0) + ) + ) + ) + (none) + ) + +;; definition for method 14 of type lightning-bolt +;; WARN: Return type mismatch uint vs int. +(defmethod lightning-bolt-method-14 ((this lightning-bolt)) + (the-as int (-> this fade-mode)) + ) + +;; definition for method 13 of type lightning-bolt +;; WARN: Return type mismatch int vs none. +(defmethod lightning-bolt-method-13 ((this lightning-bolt) (arg0 int)) + (when (!= (-> this fade-mode) arg0) + (let ((v1-1 arg0)) + (cond + ((zero? v1-1) + (set! (-> this current-fade-scalar) 1.0) + (set-time! (-> this start-fade-time)) + ) + ((= v1-1 2) + (set-time! (-> this start-fade-time)) + (set! (-> this current-fade-scalar) 1.0) + ) + ((= v1-1 1) + (set! (-> this current-fade-scalar) 0.0) + (set-time! (-> this start-fade-time)) + ) + ((= v1-1 3) + (dotimes (v1-12 (-> this num-spans)) + (logand! (-> this spans-internal data v1-12 span-flags) -2) + ) + ) + ) + ) + (set! (-> this fade-mode) (the-as uint arg0)) + ) + (none) + ) + +;; definition for method 11 of type lightning-bolt +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; WARN: Function (method 11 lightning-bolt) has a return type of none, but the expression builder found a return statement. +(defmethod lightning-bolt-method-11 ((this lightning-bolt)) + (local-vars + (sv-16 time-frame) + (sv-24 float) + (sv-32 time-frame) + (sv-40 float) + (sv-64 vector) + (sv-68 float) + (sv-72 float) + ) + (with-pp + (case (-> this fade-mode) + ((2) + (let* ((f1-2 (/ (the float (- (current-time) (-> this start-fade-time))) (the float (-> this appearance fade-time)))) + (f0-3 (fmax 0.0 (fmin 1.0 f1-2))) + ) + (set! (-> this current-fade-scalar) (lerp 1.0 0.0 f0-3)) + ) + (if (>= 0.0 (-> this current-fade-scalar)) + (lightning-bolt-method-13 this 3) + ) + ) + ((1) + (let* ((f1-7 (/ (the float (- (current-time) (-> this start-fade-time))) (the float (-> this appearance fade-time)))) + (f0-9 (fmax 0.0 (fmin 1.0 f1-7))) + ) + (set! (-> this current-fade-scalar) (lerp 0.0 1.0 f0-9)) + ) + (if (>= (-> this current-fade-scalar) 1.0) + (lightning-bolt-method-13 this 0) + ) + ) + ) + (if (= (-> this fade-mode) 3) + (return 0) + ) + (if (zero? (-> this fade-mode)) + (set! (-> this current-fade-scalar) 1.0) + ) + (set! (-> this num-active-spans) (min (-> this num-active-spans) (+ (-> this num-spans) -1))) + (let ((v1-31 (-> this num-active-spans)) + (a0-14 (+ (-> this num-spans) -1)) + ) + (while (>= a0-14 v1-31) + (let ((a1-6 (-> this spans-internal data v1-31))) + (logand! (-> a1-6 span-flags) -2) + ) + (+! v1-31 1) + ) + ) + (let ((v1-37 (time-elapsed? (-> this last-generate-time) (-> this new-inner-point-generate-time)))) + (dotimes (a0-17 (-> this num-active-spans)) + (-> this spans data a0-17) + (let ((a1-12 (-> this spans-internal data a0-17))) + (if (or v1-37 (not (logtest? (-> a1-12 span-flags) 1))) + (logior! (-> a1-12 span-flags) 2) + (logand! (-> a1-12 span-flags) -3) + ) + ) + ) + ) + (let ((s5-0 0)) + (dotimes (s4-0 (-> this num-active-spans)) + (-> this spans data s4-0) + (let* ((a2-13 (-> this spans-internal data s4-0)) + (s3-0 (+ (-> a2-13 num-inner-points) 1)) + ) + (when (logtest? (-> a2-13 span-flags) 2) + (when (or (-> this snap-inner-points?) + (and (logtest? (-> a2-13 span-flags) 2) (not (logtest? (-> a2-13 span-flags) 1))) + ) + (dotimes (v1-55 s3-0) + (set! (-> this current-points data (+ v1-55 s5-0) quad) (-> this desired-points data (+ v1-55 s5-0) quad)) + ) + ) + (lightning-bolt-method-20 this s5-0 a2-13) + ) + (+! s5-0 s3-0) + ) + ) + (when (time-elapsed? (-> this last-generate-time) (-> this new-inner-point-generate-time)) + (lightning-bolt-method-20 this s5-0 (-> this spans-internal data (-> this num-active-spans))) + (if (-> this snap-inner-points?) + (set! (-> this current-points data s5-0 quad) (-> this desired-points data s5-0 quad)) + ) + (set-time! (-> this last-generate-time)) + (set! (-> this new-inner-point-generate-time) (rand-vu-int-range + (the-as int (-> this appearance regenerate-time-start)) + (the-as int (-> this appearance regenerate-time-end)) + ) + ) + ) + ) + (let ((s5-1 0)) + (dotimes (s4-1 (-> this num-active-spans)) + (let* ((a1-24 (-> this spans data s4-1)) + (a3-5 (-> this spans-internal data s4-1)) + (s3-1 (+ (-> a3-5 num-inner-points) 1)) + ) + (if (logtest? (-> a3-5 span-flags) 2) + (lightning-bolt-method-15 this a1-24 s5-1 a3-5) + ) + (+! s5-1 s3-1) + ) + ) + ) + (let ((s5-2 0)) + (dotimes (s4-2 (+ (-> this num-active-spans) 1)) + (-> this spans data s4-2) + (let* ((v1-102 (-> this spans-internal data s4-2)) + (s3-2 (+ (-> v1-102 num-inner-points) 1)) + ) + (if (= s4-2 (-> this num-active-spans)) + (set! s3-2 1) + ) + (cond + ((not (-> this appearance use-accurate-interp?)) + (let ((a0-49 (the-as int (- (current-time) (-> pp clock old-frame-counter))))) + 0.0 + (if (logtest? (-> v1-102 span-flags) 2) + (set! a0-49 0) + ) + (let* ((f1-12 (/ (the float a0-49) (the float (-> this inner-point-travel-time)))) + (f30-0 (fmax 0.0 (fmin 1.0 f1-12))) + ) + (dotimes (s2-0 s3-2) + (vector-lerp! + (-> this current-points data (+ s2-0 s5-2)) + (-> this current-points data (+ s2-0 s5-2)) + (-> this desired-points data (+ s2-0 s5-2)) + f30-0 + ) + ) + ) + ) + ) + (else + (set! sv-16 (- (current-time) (- (current-time) (-> pp clock old-frame-counter)))) + (set! sv-24 (the-as float 0.0)) + (set! sv-32 (current-time)) + (set! sv-40 (the-as float 0.0)) + (set! sv-24 + (/ (the float (- sv-16 (-> this last-generate-time))) (the float (-> this inner-point-travel-time))) + ) + (set! sv-40 + (/ (the float (- sv-32 (-> this last-generate-time))) (the float (-> this inner-point-travel-time))) + ) + (set! sv-24 (fmax 0.0 (fmin 1.0 sv-24))) + (set! sv-40 (fmax 0.0 (fmin 1.0 sv-40))) + (let ((f30-1 (- 1.0 sv-24))) + (dotimes (s2-1 s3-2) + (set! sv-64 (new 'stack-no-clear 'vector)) + (set! sv-68 (the-as float 0.0)) + (set! sv-72 (the-as float 0.0)) + (set-vector! + sv-64 + (- (-> this desired-points data (+ s2-1 s5-2) x) (-> this current-points data (+ s2-1 s5-2) x)) + (- (-> this desired-points data (+ s2-1 s5-2) y) (-> this current-points data (+ s2-1 s5-2) y)) + 0.0 + 1.0 + ) + (set! sv-68 (vector-normalize-ret-len! sv-64 1.0)) + (when (< 0.0 f30-1) + (set! sv-72 (/ sv-68 f30-1)) + (vector-float*! sv-64 sv-64 (* sv-72 (- sv-40 sv-24))) + (vector+! (-> this current-points data (+ s2-1 s5-2)) (-> this current-points data (+ s2-1 s5-2)) sv-64) + (set! (-> this current-points data (+ s2-1 s5-2) z) (-> this desired-points data (+ s2-1 s5-2) z)) + ) + ) + ) + ) + ) + (+! s5-2 s3-2) + ) + ) + ) + (dotimes (v1-156 (-> this num-active-spans)) + (-> this spans data v1-156) + (let ((a0-82 (-> this spans-internal data v1-156))) + (logior! (-> a0-82 span-flags) 1) + ) + ) + (none) + ) + ) + +;; definition for method 19 of type lightning-bolt +;; WARN: Return type mismatch vector vs none. +(defmethod lightning-bolt-method-19 ((this lightning-bolt) (arg0 vector) (arg1 int) (arg2 int) (arg3 matrix) (arg4 float) (arg5 float)) + (let ((a1-2 + (vector-! (new 'stack-no-clear 'vector) (-> this current-points data arg2) (-> this current-points data arg1)) + ) + ) + (set! (-> a1-2 x) (* (-> a1-2 x) arg4)) + (set! (-> a1-2 y) (* (-> a1-2 y) arg4)) + (set! (-> a1-2 z) (* (-> a1-2 z) arg5)) + (vector-rotate*! arg0 a1-2 arg3) + ) + (none) + ) + +;; definition for function matrix<-vector-yz2! +;; INFO: Used lq/sq +(defun matrix<-vector-yz2! ((arg0 matrix) (arg1 vector) (arg2 vector)) + (set! (-> arg0 fvec quad) (-> arg1 quad)) + (vector-cross! (-> arg0 rvec) arg2 arg1) + (vector-normalize! (-> arg0 rvec) 1.0) + (vector-cross! (-> arg0 uvec) arg1 (-> arg0 rvec)) + (vector-normalize! (-> arg0 uvec) 1.0) + (set! (-> arg0 rvec w) 1.0) + (set! (-> arg0 uvec w) 1.0) + (set! (-> arg0 fvec w) 1.0) + arg0 + ) + +;; definition for method 22 of type lightning-bolt +;; WARN: Return type mismatch number vs none. +;; WARN: Function (method 22 lightning-bolt) has a return type of none, but the expression builder found a return statement. +(defmethod lightning-bolt-method-22 ((this lightning-bolt)) + (with-pp + (set! (-> this strip1 num-verts) (the-as uint 0)) + (set! (-> this strip2 num-verts) (the-as uint 0)) + (set! (-> this strip1 adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> this strip1 data0) + (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (set! (-> this strip2 adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> this strip2 data0) + (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (set! (-> this strip1 adnops 1 cmds) (gs-reg64 alpha-1)) + (set! (-> this strip2 adnops 1 cmds) (gs-reg64 alpha-1)) + (let ((v1-9 (-> this appearance blend-mode))) + (cond + ((= v1-9 1) + (set! (-> this strip1 data1) (the-as gs-test *lightning-alpha-additive*)) + (set! (-> this strip2 data1) (the-as gs-test *lightning-alpha-additive*)) + ) + ((zero? v1-9) + (set! (-> this strip1 data1) (the-as gs-test *lightning-alpha-blend*)) + (set! (-> this strip2 data1) (the-as gs-test *lightning-alpha-blend*)) + ) + ((= v1-9 2) + (set! (-> this strip1 data1) (the-as gs-test *lightning-alpha-subtractive*)) + (set! (-> this strip2 data1) (the-as gs-test *lightning-alpha-subtractive*)) + ) + ) + ) + (set! (-> this strip1 tex-id) (the-as texture-id (-> this appearance tex-id))) + (set! (-> this strip2 tex-id) (the-as texture-id (-> this appearance tex-id))) + (if (= (-> this fade-mode) 3) + (return 0) + ) + (when (-> this appearance uv-shift?) + (let ((f0-2 (/ (the float (- (current-time) (-> pp clock old-frame-counter))) + (the float (-> this appearance uv-shift-speed)) + ) + ) + ) + (+! (-> this current-uv-shift) f0-2) + ) + (let ((f0-4 (-> this current-uv-shift))) + (set! (-> this current-uv-shift) (- f0-4 (the float (the int f0-4)))) + ) + (if (< (-> this current-uv-shift) 1.0) + (+! (-> this current-uv-shift) 1.0) + ) + ) + (none) + ) + ) + +;; definition for function choose-nice-perp +(defun choose-nice-perp ((arg0 vector)) + (let* ((f0-0 (-> arg0 x)) + (f0-2 (* f0-0 f0-0)) + (f1-0 (-> arg0 z)) + ) + (if (< (+ f0-2 (* f1-0 f1-0)) 0.01) + *x-vector* + *up-vector* + ) + ) + ) + +;; definition for method 12 of type lightning-bolt +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; WARN: Function (method 12 lightning-bolt) has a return type of none, but the expression builder found a return statement. +(defmethod lightning-bolt-method-12 ((this lightning-bolt)) + (local-vars + (sv-48 int) + (sv-56 float) + (sv-60 vector) + (sv-64 matrix) + (sv-96 lightning-span) + (sv-100 lightning-span-internal) + (sv-104 vector) + (sv-224 matrix) + (sv-228 vector) + (sv-232 vector) + (sv-236 float) + (sv-240 vector) + (sv-244 float) + (sv-248 float) + (sv-256 int) + (sv-288 lightning-span) + (sv-292 lightning-span-internal) + (sv-296 vector) + (sv-416 matrix) + (sv-420 vector) + (sv-424 vector) + (sv-428 vector) + (sv-432 float) + ) + (when (= (-> this fade-mode) 3) + (set! (-> this strip1 num-verts) (the-as uint 0)) + (set! (-> this strip2 num-verts) (the-as uint 0)) + (return 0) + ) + (set! sv-48 0) + (set! sv-56 (the-as float 0.0)) + (set! sv-60 (new 'stack-no-clear 'vector)) + (set! sv-64 (new 'stack-no-clear 'matrix)) + (lightning-bolt-method-22 this) + (set! (-> sv-60 x) 0.0) + (set! (-> sv-60 y) 0.0) + (dotimes (s5-0 (-> this num-active-spans)) + (set! sv-96 (-> this spans data s5-0)) + (set! sv-100 (-> this spans-internal data s5-0)) + (set! sv-104 (new 'stack-no-clear 'vector)) + (set! sv-224 (new 'stack-no-clear 'matrix)) + (set! sv-228 (new 'stack-no-clear 'vector)) + (set! sv-232 (new 'stack-no-clear 'vector)) + (set! sv-236 (the-as float 0.0)) + (set! sv-240 + (vector-! + (new 'stack-no-clear 'vector) + (-> this span-pts-start data (+ s5-0 1)) + (-> this span-pts-start data s5-0) + ) + ) + (set! sv-244 (the float (-> sv-100 index))) + (vector-normalize! sv-240 1.0) + (set! sv-236 + (vector-vector-distance (-> this span-pts-start data s5-0) (-> this span-pts-start data (+ s5-0 1))) + ) + (matrix<-vector-yz2! sv-224 sv-240 (choose-nice-perp sv-240)) + (let ((f30-0 (-> sv-96 random-offset-size-start))) + (lightning-bolt-method-19 this sv-104 sv-48 (+ sv-48 1) sv-224 f30-0 sv-236) + (set! (-> sv-232 quad) (-> this current-points data sv-48 quad)) + (set! (-> sv-232 x) (* (-> sv-232 x) f30-0)) + (set! (-> sv-232 y) (* (-> sv-232 y) f30-0)) + ) + (set! (-> sv-232 z) (- (-> sv-232 z) sv-244)) + (set! (-> sv-232 z) (* (-> sv-232 z) sv-236)) + (vector-rotate*! sv-228 sv-232 sv-224) + (vector+! sv-228 sv-228 (-> this span-pts-start data s5-0)) + (lightning-bolt-method-16 this sv-228 (vector-length sv-232) sv-56 sv-60 (the-as matrix sv-104)) + (set! sv-248 (-> sv-96 inner-random-offset-size)) + (dotimes (s4-1 (-> sv-100 num-inner-points)) + (set! sv-256 (+ sv-48 1 s4-1)) + (lightning-bolt-method-19 this sv-104 (+ sv-256 -1) sv-256 sv-224 sv-248 sv-236) + (set! (-> sv-232 quad) (-> this current-points data sv-256 quad)) + (set! (-> sv-232 x) (* (-> sv-232 x) sv-248)) + (set! (-> sv-232 y) (* (-> sv-232 y) sv-248)) + (set! (-> sv-232 z) (- (-> sv-232 z) sv-244)) + (set! (-> sv-232 z) (* (-> sv-232 z) sv-236)) + (vector-rotate*! sv-228 sv-232 sv-224) + (vector+! sv-228 sv-228 (-> this span-pts-start data s5-0)) + (lightning-bolt-method-16 this sv-228 (vector-length sv-232) sv-56 sv-60 (the-as matrix sv-104)) + ) + (set! sv-56 (+ sv-56 sv-236)) + (set! sv-48 (+ (-> sv-100 num-inner-points) 1 sv-48)) + (set! (-> sv-64 rvec quad) (-> sv-104 quad)) + ) + (let ((s5-1 (-> this num-active-spans))) + (set! sv-288 (-> this spans data s5-1)) + (set! sv-292 (-> this spans-internal data s5-1)) + (set! sv-296 (new 'stack-no-clear 'vector)) + (set! sv-416 (new 'stack-no-clear 'matrix)) + (set! sv-420 (new 'stack-no-clear 'vector)) + (set! sv-424 (new 'stack-no-clear 'vector)) + (set! sv-428 (vector-! + (new 'stack-no-clear 'vector) + (-> this span-pts-start data s5-1) + (-> this span-pts-start data (+ s5-1 -1)) + ) + ) + (set! sv-432 (the float (-> sv-292 index))) + (vector-normalize! sv-428 1.0) + (matrix<-vector-yz2! sv-416 sv-428 (choose-nice-perp sv-428)) + (let ((f0-33 (-> sv-288 random-offset-size-start))) + (set! (-> sv-424 quad) (-> this current-points data sv-48 quad)) + (set! (-> sv-424 x) (* (-> sv-424 x) f0-33)) + (set! (-> sv-424 y) (* (-> sv-424 y) f0-33)) + ) + (set! (-> sv-424 z) (- (-> sv-424 z) sv-432)) + (vector-rotate*! sv-420 sv-424 sv-416) + (vector+! sv-420 sv-420 (-> this span-pts-start data s5-1)) + ) + (lightning-bolt-method-16 this sv-420 0.0 sv-56 sv-60 sv-64) + 0 + (none) + ) + +;; definition for method 7 of type lightning-bolt +(defmethod relocate ((this lightning-bolt) (offset int)) + (if (nonzero? (-> this spans)) + (&+! (-> this spans) offset) + ) + (if (nonzero? (-> this strip1)) + (&+! (-> this strip1) offset) + ) + (if (nonzero? (-> this strip2)) + (&+! (-> this strip2) offset) + ) + (dotimes (v1-12 (+ (-> this num-spans) -1)) + ) + (if (nonzero? (-> this spans-internal)) + (&+! (-> this spans-internal) offset) + ) + (if (nonzero? (-> this current-points)) + (&+! (-> this current-points) offset) + ) + (if (nonzero? (-> this desired-points)) + (&+! (-> this desired-points) offset) + ) + (if (nonzero? (-> this span-pts-start)) + (&+! (-> this span-pts-start) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 17 of type lightning-bolt +(defmethod lightning-bolt-method-17 ((this lightning-bolt) (arg0 uint) (arg1 float) (arg2 float) (arg3 curve2d-fast) (arg4 float)) + (if (not arg3) + (return 1.0) + ) + (let ((v1-2 arg0)) + (cond + ((zero? v1-2) + (curve2d-method-9 arg3 (/ arg2 arg4) 3) + ) + ((= v1-2 1) + (curve2d-method-9 arg3 arg1 3) + ) + ((= v1-2 2) + (let* ((v1-6 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-7 (the-as number (logior #x3f800000 v1-6))) + ) + (+ -1.0 (the-as float v1-7)) + ) + ) + (else + 1.0 + ) + ) + ) + ) + +;; definition for method 16 of type lightning-bolt +;; WARN: Return type mismatch int vs none. +(defmethod lightning-bolt-method-16 ((this lightning-bolt) (arg0 vector) (arg1 float) (arg2 float) (arg3 vector) (arg4 matrix)) + (local-vars (sv-160 vector) (sv-164 vector) (sv-168 vector) (sv-172 vector) (sv-176 rgba)) + 0.0 + 0.0 + 0.0 + (let ((f28-0 + (/ (the float (- (current-time) (-> this last-generate-time))) (the float (-> this inner-point-travel-time))) + ) + (f30-0 (+ arg2 arg1)) + ) + (math-camera-pos) + (let* ((s2-0 (-> this appearance)) + (f24-0 (* (lightning-bolt-method-17 + this + (-> s2-0 alpha-1-mode) + f28-0 + f30-0 + (-> s2-0 alpha-1-curve) + (-> s2-0 alpha-1-repeat-dist) + ) + (lightning-bolt-method-17 + this + (-> s2-0 alpha-2-mode) + f28-0 + f30-0 + (-> s2-0 alpha-2-curve) + (-> s2-0 alpha-2-repeat-dist) + ) + (-> s2-0 base-alpha) + (-> this current-fade-scalar) + ) + ) + (f22-0 (* (lightning-bolt-method-17 + this + (-> s2-0 width-mode) + f28-0 + f30-0 + (-> s2-0 width-curve) + (-> s2-0 width-repeat-dist) + ) + (-> this base-width) + ) + ) + (f0-14 (/ f30-0 (-> s2-0 uv-repeat-dist))) + (f28-1 (+ (- f0-14 (* (the float (the int (/ f0-14 6.0))) 6.0)) (-> this current-uv-shift))) + ) + (vector-normalize! (the-as vector arg4) 1.0) + (let* ((a2-4 (-> (camera-matrix) uvec)) + (v1-13 (matrix-f-u-compose (new 'stack-no-clear 'matrix) (the-as vector arg4) a2-4)) + (f26-1 6.0) + ) + (set! sv-160 (vector+float*! (new 'stack-no-clear 'vector) arg0 (-> v1-13 rvec) (* 0.5 f22-0))) + (set! sv-164 (vector+float*! (new 'stack-no-clear 'vector) arg0 (-> v1-13 rvec) (* -0.5 f22-0))) + (set! sv-168 (vector+float*! (new 'stack-no-clear 'vector) arg0 (-> v1-13 uvec) (* 0.5 f22-0))) + (set! sv-172 (vector+float*! (new 'stack-no-clear 'vector) arg0 (-> v1-13 uvec) (* -0.5 f22-0))) + (set! sv-176 (the-as rgba (new 'stack-no-clear 'array 'rgba 1))) + (set! sv-176 (-> this base-color)) + (set! sv-176 (copy-and-set-field sv-176 a (the int (* 128.0 f24-0)))) + (when (< f28-1 (-> arg3 x)) + (let ((s3-1 (new 'stack-no-clear 'vector)) + (s4-1 (new 'stack-no-clear 'vector)) + ) + (let ((f24-1 (/ (- (+ f26-1 f28-1) (-> arg3 x)) f26-1))) + (let ((a1-10 (+ (the-as uint (-> this strip1 data 0 pos)) (* (+ (-> this strip1 num-verts) -2) 32))) + (s2-1 (+ (the-as uint (-> this strip1 data 0 pos)) (* (+ (-> this strip1 num-verts) -1) 32))) + ) + (vector-lerp! s3-1 (the-as vector a1-10) sv-160 f24-1) + (vector-lerp! s4-1 (the-as vector s2-1) sv-164 f24-1) + ) + (lightning-bolt-method-18 this (-> this strip1) s3-1 sv-176 0.0 f26-1) + (lightning-bolt-method-18 this (-> this strip1) s4-1 sv-176 1.0 f26-1) + (lightning-bolt-method-18 this (-> this strip1) s3-1 sv-176 0.0 0.0) + (lightning-bolt-method-18 this (-> this strip1) s4-1 sv-176 1.0 0.0) + (let ((a1-16 (+ (the-as uint (-> this strip2 data 0 pos)) (* (+ (-> this strip2 num-verts) -2) 32))) + (s2-2 (+ (the-as uint (-> this strip2 data 0 pos)) (* (+ (-> this strip2 num-verts) -1) 32))) + ) + (vector-lerp! s3-1 (the-as vector a1-16) sv-168 f24-1) + (vector-lerp! s4-1 (the-as vector s2-2) sv-172 f24-1) + ) + ) + (lightning-bolt-method-18 this (-> this strip2) s3-1 sv-176 1.0 f26-1) + (lightning-bolt-method-18 this (-> this strip2) s4-1 sv-176 0.0 f26-1) + (lightning-bolt-method-18 this (-> this strip2) s3-1 sv-176 1.0 0.0) + (lightning-bolt-method-18 this (-> this strip2) s4-1 sv-176 0.0 0.0) + ) + ) + ) + (lightning-bolt-method-18 this (-> this strip1) sv-160 sv-176 0.0 f28-1) + (lightning-bolt-method-18 this (-> this strip1) sv-164 sv-176 1.0 f28-1) + (lightning-bolt-method-18 this (-> this strip2) sv-168 sv-176 1.0 f28-1) + (lightning-bolt-method-18 this (-> this strip2) sv-172 sv-176 0.0 f28-1) + (set! (-> arg3 y) f30-0) + (set! (-> arg3 x) f28-1) + ) + ) + 0 + (none) + ) + +;; definition for method 18 of type lightning-bolt +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod lightning-bolt-method-18 ((this lightning-bolt) (arg0 prim-strip) (arg1 vector) (arg2 rgba) (arg3 float) (arg4 float)) + (when (< (-> arg0 num-verts) (-> arg0 allocated-num-verts)) + (let ((v1-5 (-> arg0 data (-> arg0 num-verts)))) + (set! (-> v1-5 pos quad) (-> arg1 quad)) + (set! (-> v1-5 col) arg2) + (set! (-> v1-5 stq x) arg3) + (set! (-> v1-5 stq y) arg4) + ) + (+! (-> arg0 num-verts) 1) + ) + 0 + (none) + ) + +;; definition for function lightning-new-tracker-init-by-other +;; INFO: Used lq/sq +(defbehavior lightning-new-tracker-init-by-other lightning-new-tracker ((arg0 lightning-tracker-init-params)) + (set! (-> self bolt) (new 'process 'lightning-bolt)) + (init! (-> self bolt) 2 (+ (-> arg0 num-inner-points) 2) (-> arg0 appearance)) + (set! (-> self lifetime) (-> arg0 lifetime)) + (set! (-> self bolt span-pts-start data 0 quad) (-> arg0 start-pt quad)) + (set! (-> self bolt span-pts-start data 1 quad) (-> arg0 end-pt quad)) + (set! (-> self bolt spans-internal data 0 num-inner-points) (-> arg0 num-inner-points)) + (set! (-> self bolt spans data 0 inner-random-offset-size) (-> arg0 inner-random-offset-size)) + (set! (-> self bolt spans data 0 random-offset-size-start) (-> arg0 random-offset-size-start)) + (set! (-> self bolt inner-point-travel-time) (seconds 0.017)) + (set! (-> self bolt snap-inner-points?) #t) + (set! (-> self bolt appearance) (-> arg0 appearance)) + (set! (-> self bolt fractal-reduction) 0.4) + (set! (-> self bolt generate-mode) (the-as uint 1)) + (go-virtual active) + ) + +;; definition for function create-lightning-tracker-new +;; WARN: Return type mismatch process vs lightning-new-tracker. +(defun create-lightning-tracker-new ((arg0 lightning-tracker-init-params)) + (let ((v1-1 (process-spawn lightning-new-tracker arg0 :name "lightning-new-tracker" :stack-size #x8000))) + (if v1-1 + (return (the-as lightning-new-tracker (-> v1-1 0))) + ) + ) + (the-as lightning-new-tracker #f) + ) + +;; definition for method 7 of type lightning-new-tracker +(defmethod relocate ((this lightning-new-tracker) (offset int)) + (if (nonzero? (-> this bolt)) + (&+! (-> this bolt) offset) + ) + (call-parent-method this offset) + ) + +;; failed to figure out what this is: +(defstate active (lightning-new-tracker) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self bolt num-active-spans) 1) + (lightning-bolt-method-13 (-> self bolt) 0) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (-> self lifetime)) + (go-virtual die) + ) + (lightning-bolt-method-11 (-> self bolt)) + (lightning-bolt-method-12 (-> self bolt)) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate die (lightning-new-tracker) + :virtual #t + :enter (behavior () + (lightning-bolt-method-13 (-> self bolt) 2) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (lightning-bolt-method-11 (-> self bolt)) + (lightning-bolt-method-12 (-> self bolt)) + ) + :code (behavior () + (until (= (lightning-bolt-method-14 (-> self bolt)) 3) + (suspend) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning_REF.gc b/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning_REF.gc new file mode 100644 index 0000000000..dbb8a362d0 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/generic/lightning/lightning_REF.gc @@ -0,0 +1,874 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(kmemopen global "part-tables") + +;; definition for symbol *lightning-spec-id-table*, type (array lightning-spec) +(define *lightning-spec-id-table* (new 'global 'boxed-array lightning-spec 128)) + +;; failed to figure out what this is: +(kmemclose) + +;; definition for symbol *lightning-gcf*, type gcf-control +(define *lightning-gcf* + (new 'static 'gcf-control + :giftag (new 'static 'generic-gif-tag + :fan-prim (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + :str-prim (new 'static 'gif-tag-prim + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + :regs (new 'static 'gif-tag-regs-32 :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + :adnops (new 'static 'inline-array gs-adcmd 2 + (new 'static 'gs-adcmd :cmds (gs-reg64 hack)) + (new 'static 'gs-adcmd :cmds (gs-reg64 hack)) + ) + ) + ) + +;; definition for function lightning-fractal-gen +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun lightning-fractal-gen ((arg0 (inline-array vector)) (arg1 int) (arg2 int) (arg3 float) (arg4 lightning-spec)) + (local-vars (sv-16 vector) (sv-32 vector)) + (when (< 1 (- arg2 arg1)) + (let ((s1-0 (/ (+ arg1 arg2) 2))) + (set! sv-16 (-> arg0 arg1)) + (set! sv-32 (-> arg0 arg2)) + (let ((s0-0 (-> arg0 s1-0))) + (let* ((f30-0 (* 0.5 (+ (-> sv-16 x) (-> sv-32 x)))) + (f28-0 arg3) + (f26-0 -0.5) + (v1-12 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-13 (the-as number (logior #x3f800000 v1-12))) + ) + (set! (-> s0-0 x) (+ f30-0 (* f28-0 (+ f26-0 (+ -1.0 (the-as float v1-13)))))) + ) + (let* ((f30-1 (* 0.5 (+ (-> sv-16 y) (-> sv-32 y)))) + (f28-1 arg3) + (f26-1 -0.5) + (v1-19 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-20 (the-as number (logior #x3f800000 v1-19))) + ) + (set! (-> s0-0 y) (+ f30-1 (* f28-1 (+ f26-1 (+ -1.0 (the-as float v1-20)))))) + ) + (let* ((f30-2 (* 0.5 (+ (-> sv-16 z) (-> sv-32 z)))) + (f28-2 arg3) + (f26-2 -0.5) + (v1-26 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-27 (the-as number (logior #x3f800000 v1-26))) + ) + (set! (-> s0-0 z) (+ f30-2 (* f28-2 (+ f26-2 (+ -1.0 (the-as float v1-27)))))) + ) + ) + (lightning-fractal-gen arg0 arg1 s1-0 (* arg3 (-> arg4 reduction)) arg4) + (lightning-fractal-gen arg0 s1-0 arg2 (* arg3 (-> arg4 reduction)) arg4) + ) + ) + 0 + (none) + ) + +;; definition for function lightning-uniform-gen +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun lightning-uniform-gen ((arg0 (inline-array vector)) (arg1 int) (arg2 int) (arg3 float) (arg4 lightning-spec)) + (local-vars (sv-32 vector)) + (let ((s4-0 (-> arg0 arg1)) + (s3-0 (-> arg0 arg2)) + (f30-0 (/ 1.0 (the float (- arg2 arg1)))) + (f28-0 0.0) + (s2-0 (new-stack-vector0)) + (s1-0 arg1) + (s0-0 arg2) + ) + (while (>= s0-0 s1-0) + (vector-lerp! (-> arg0 s1-0) s4-0 s3-0 f28-0) + (set! sv-32 s2-0) + (let* ((f26-0 0.4) + (f24-0 -0.5) + (v1-7 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-8 (the-as number (logior #x3f800000 v1-7))) + ) + (set! (-> sv-32 x) (* f26-0 (+ f24-0 (+ -1.0 (the-as float v1-8))) arg3)) + ) + (let* ((f26-1 0.4) + (f24-1 -0.5) + (v1-13 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-14 (the-as number (logior #x3f800000 v1-13))) + ) + (set! (-> sv-32 y) (* f26-1 (+ f24-1 (+ -1.0 (the-as float v1-14))) arg3)) + ) + (let* ((f26-2 0.4) + (f24-2 -0.5) + (v1-19 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-20 (the-as number (logior #x3f800000 v1-19))) + ) + (set! (-> sv-32 z) (* f26-2 (+ f24-2 (+ -1.0 (the-as float v1-20))) arg3)) + ) + (set! (-> sv-32 w) 1.0) + (vector+! (-> arg0 s1-0) (-> arg0 s1-0) s2-0) + (+! f28-0 f30-0) + (+! s1-0 1) + ) + ) + 0 + (none) + ) + +;; definition for function lightning-trail-uniform-gen +(defun lightning-trail-uniform-gen ((arg0 (inline-array vector)) (arg1 (inline-array vector)) (arg2 float) (arg3 int)) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (dotimes (s1-0 arg3) + (let ((s0-0 s2-0)) + (let* ((f30-0 0.4) + (f28-0 -0.5) + (v1-3 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-4 (the-as number (logior #x3f800000 v1-3))) + ) + (set! (-> s0-0 x) (* f30-0 (+ f28-0 (+ -1.0 (the-as float v1-4))) arg2)) + ) + (let* ((f30-1 0.4) + (f28-1 -0.5) + (v1-9 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-10 (the-as number (logior #x3f800000 v1-9))) + ) + (set! (-> s0-0 y) (* f30-1 (+ f28-1 (+ -1.0 (the-as float v1-10))) arg2)) + ) + (let* ((f30-2 0.4) + (f28-2 -0.5) + (v1-15 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-16 (the-as number (logior #x3f800000 v1-15))) + ) + (set! (-> s0-0 z) (* f30-2 (+ f28-2 (+ -1.0 (the-as float v1-16))) arg2)) + ) + (set! (-> s0-0 w) 1.0) + ) + (vector+! (-> arg0 s1-0) (-> arg1 s1-0) s2-0) + ) + ) + #f + ) + +;; definition for function lightning-trail-fractal-gen +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun lightning-trail-fractal-gen ((arg0 (inline-array vector)) + (arg1 (inline-array vector)) + (arg2 int) + (arg3 int) + (arg4 float) + (arg5 lightning-spec) + ) + (local-vars (sv-80 vector) (sv-96 vector) (sv-112 vector) (sv-128 vector) (sv-144 vector)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (when (< 1 (- arg3 arg2)) + (let ((s0-0 (/ (+ arg2 arg3) 2))) + (set! sv-96 (new 'stack-no-clear 'vector)) + (let ((v1-5 (-> arg0 arg2)) + (a0-3 (-> arg1 arg2)) + ) + (.lvf vf4 (&-> v1-5 quad)) + (.lvf vf5 (&-> a0-3 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-96 quad) vf6) + (set! sv-112 (new 'stack-no-clear 'vector)) + (let ((v1-9 (-> arg0 arg3)) + (a0-5 (-> arg1 arg3)) + ) + (.lvf vf4 (&-> v1-9 quad)) + (.lvf vf5 (&-> a0-5 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-112 quad) vf6) + (set! sv-144 (new 'stack-no-clear 'vector)) + (set! sv-128 (new 'stack-no-clear 'vector)) + (set! sv-80 sv-144) + (let* ((f30-0 arg4) + (f28-0 -0.5) + (v1-15 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-16 (the-as number (logior #x3f800000 v1-15))) + ) + (set! (-> sv-80 x) (* f30-0 (+ f28-0 (+ -1.0 (the-as float v1-16))))) + ) + (let* ((f30-1 arg4) + (f28-1 -0.5) + (v1-20 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-21 (the-as number (logior #x3f800000 v1-20))) + ) + (set! (-> sv-80 y) (* f30-1 (+ f28-1 (+ -1.0 (the-as float v1-21))))) + ) + (let* ((f30-2 arg4) + (f28-2 -0.5) + (v1-25 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-26 (the-as number (logior #x3f800000 v1-25))) + ) + (set! (-> sv-80 z) (* f30-2 (+ f28-2 (+ -1.0 (the-as float v1-26))))) + ) + (set! (-> sv-80 w) 1.0) + (let ((v1-31 sv-128) + (a0-15 sv-128) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> sv-96 quad)) + (.lvf vf5 (&-> sv-112 quad)) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> a0-15 quad) vf6) + (vector-float*! v1-31 a0-15 0.5) + ) + (let ((v1-33 sv-144)) + (let ((a0-16 sv-144)) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> a0-16 quad)) + ) + (.lvf vf5 (&-> sv-128 quad)) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-33 quad) vf6) + ) + (let ((v1-35 (-> arg0 s0-0))) + (let ((a0-19 (-> arg1 s0-0))) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> a0-19 quad)) + ) + (.lvf vf5 (&-> sv-144 quad)) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-35 quad) vf6) + ) + (lightning-trail-fractal-gen arg0 arg1 arg2 s0-0 (* arg4 (-> arg5 reduction)) arg5) + (lightning-trail-fractal-gen arg0 arg1 s0-0 arg3 (* arg4 (-> arg5 reduction)) arg5) + ) + ) + 0 + (none) + ) + ) + +;; definition of type lightning-globals +(deftype lightning-globals (structure) + ((gcf-buf uint16) + (vtx-buf uint16) + ) + ) + +;; definition for method 3 of type lightning-globals +(defmethod inspect ((this lightning-globals)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'lightning-globals) + (format #t "~1Tgcf-buf: ~D~%" (-> this gcf-buf)) + (format #t "~1Tvtx-buf: ~D~%" (-> this vtx-buf)) + (label cfg-4) + this + ) + +;; definition for function gs-packed-rgba-lerp! +(defun gs-packed-rgba-lerp! ((arg0 gs-packed-rgba) (arg1 rgba) (arg2 rgba) (arg3 float)) + (local-vars (v1-0 uint128) (v1-1 uint128) (a1-1 uint128) (a1-2 uint128)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (.pextlb v1-0 0 arg1) + (.pextlb a1-1 0 arg2) + (.pextlh v1-1 0 v1-0) + (.pextlh a1-2 0 a1-1) + (.mov vf1 v1-1) + (.mov vf2 a1-2) + (.mov vf3 arg3) + (.itof.vf vf1 vf1) + (.itof.vf vf2 vf2) + (.mul.w.vf acc vf1 vf0) + (.add.mul.x.vf acc vf2 vf3 acc) + (.sub.mul.x.vf vf1 vf1 vf3 acc) + (.ftoi.vf vf1 vf1) + (.svf (&-> arg0 quad) vf1) + arg0 + ) + ) + +;; definition for function lightning-fade +(defbehavior lightning-fade process ((arg0 lightning-control)) + (local-vars (v0-1 int) (sv-16 rgba)) + (let ((f0-0 (-> arg0 spec fade-time))) + (-> arg0 process 0 clock) + (cond + ((< (-> arg0 state counter) f0-0) + (+! (-> arg0 state counter) (* 300.0 (seconds-per-frame))) + (let ((gp-0 (-> arg0 state))) + (let* ((s5-0 (-> arg0 spec)) + (f30-0 (fmax 0.0 (fmin 1.0 (* (- 1.0 (/ (-> gp-0 counter) f0-0)) (-> s5-0 fade-start-factor))))) + ) + (set! sv-16 (-> s5-0 fade-to-color)) + (set! (-> gp-0 start-color) (rgba-lerp sv-16 (-> s5-0 start-color) (the-as rgba f30-0))) + (set! v0-1 (the-as int (rgba-lerp sv-16 (-> s5-0 end-color) (the-as rgba f30-0)))) + ) + (set! (-> gp-0 end-color) (the-as rgba v0-1)) + ) + ) + (else + (let ((v1-9 arg0)) + (set! v0-1 0) + (let ((a0-4 (!= v0-1 (-> v1-9 state mode)))) + (case v0-1 + ((3) + (if a0-4 + (set! (-> v1-9 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-9 state start-color) (-> v1-9 spec start-color)) + (set! (-> v1-9 state end-color) (-> v1-9 spec end-color)) + ) + ) + ) + (set! (-> v1-9 state mode) (the-as uint v0-1)) + ) + ) + ) + ) + v0-1 + ) + +;; definition for function lightning-update +;; INFO: Used lq/sq +(defun lightning-update ((arg0 lightning-control)) + (local-vars + (sv-16 lightning-spec) + (sv-20 vector-array) + (sv-24 vector-array) + (sv-28 vector-array) + (sv-32 symbol) + (sv-36 clock) + ) + (let* ((gp-0 (-> arg0 state points-to-draw)) + (s4-0 (+ gp-0 -1)) + (s5-0 (-> arg0 state)) + ) + (set! sv-16 (-> arg0 spec)) + (set! sv-20 (-> s5-0 line)) + (set! sv-24 (-> s5-0 meet)) + (set! sv-28 (-> s5-0 path)) + (set! sv-32 (= (-> s5-0 mode) 1)) + (set! sv-36 (-> arg0 process 0 clock)) + (when (not (or (= (-> sv-36 time-adjust-ratio) 0.0) (< gp-0 2))) + (when (logtest? (-> sv-16 flags) (lightning-spec-flags lsf4)) + (let ((f1-1 (vector-vector-distance (the-as vector (-> sv-24 data)) (-> sv-24 data s4-0)))) + (set! (-> s5-0 box-size) + (* (-> sv-16 box-size) (fmax 1.0 (fmin 5.0 (/ f1-1 (* 4096.0 (the float (-> sv-16 adjust-distance))))))) + ) + ) + ) + (set! (-> s5-0 counter) (fmax 0.0 (- (-> s5-0 counter) (-> sv-36 time-adjust-ratio)))) + (when sv-32 + (set! (-> s5-0 mode) (the-as uint 2)) + (set! (-> s5-0 counter) 0.0) + ) + (when (>= 0.0 (-> s5-0 counter)) + (let ((v1-33 (-> sv-16 rand-func))) + (cond + ((or (zero? v1-33) (= v1-33 1)) + (let ((v1-35 (-> sv-16 rand-func))) + (cond + ((zero? v1-35) + (lightning-fractal-gen (-> sv-24 data) 0 s4-0 (-> s5-0 box-size) sv-16) + ) + ((= v1-35 1) + (lightning-uniform-gen (-> sv-24 data) 0 s4-0 (-> s5-0 box-size) sv-16) + ) + ) + ) + (when sv-32 + (dotimes (v1-43 gp-0) + (set! (-> sv-20 data v1-43 quad) (-> sv-24 data v1-43 quad)) + ) + ) + ) + ((or (= v1-33 2) (= v1-33 3)) + (case (-> sv-16 rand-func) + ((2) + (set! (-> sv-24 data 0 quad) (-> sv-28 data 0 quad)) + (set! (-> sv-24 data s4-0 quad) (-> sv-28 data s4-0 quad)) + (lightning-trail-fractal-gen (-> sv-24 data) (-> sv-28 data) 0 s4-0 (-> s5-0 box-size) sv-16) + ) + (else + (lightning-trail-uniform-gen (-> sv-24 data) (-> sv-28 data) (-> s5-0 box-size) gp-0) + ) + ) + (when sv-32 + (dotimes (v1-63 gp-0) + (set! (-> sv-20 data v1-63 quad) (-> sv-28 data v1-63 quad)) + ) + ) + ) + ) + ) + (set! (-> s5-0 counter) (the float (-> sv-16 merge-count))) + ) + (let ((f0-14 (fmax 0.0 (fmin 1.0 (* (-> sv-16 merge-factor) (-> sv-36 time-adjust-ratio)))))) + (dotimes (v1-72 gp-0) + (let* ((a1-21 (-> sv-20 data v1-72)) + (a2-7 (-> sv-24 data v1-72)) + (a0-31 a1-21) + ) + (set! (-> a0-31 x) (+ (-> a1-21 x) (* f0-14 (- (-> a2-7 x) (-> a1-21 x))))) + (set! (-> a0-31 y) (+ (-> a1-21 y) (* f0-14 (- (-> a2-7 y) (-> a1-21 y))))) + (set! (-> a0-31 z) (+ (-> a1-21 z) (* f0-14 (- (-> a2-7 z) (-> a1-21 z))))) + ) + ) + ) + #f + ) + ) + ) + +;; definition for function lightning-draw +;; INFO: Used lq/sq +(defun lightning-draw ((arg0 dma-buffer) (arg1 lightning-control) (arg2 lightning-globals)) + (local-vars + (sv-16 math-camera) + (sv-20 (inline-array gcf-vertex)) + (sv-24 lightning-spec) + (sv-28 float) + (sv-32 texture) + (sv-48 vector-array) + (sv-64 int) + (sv-80 int) + (sv-96 int) + (sv-112 int) + (sv-128 int) + (sv-144 int) + (sv-160 int) + (sv-176 gcf-control) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf17 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf6 :class vf) + (vf7 :class vf) + (vf8 :class vf) + (vf9 :class vf) + ) + (init-vf0-vector) + (set! sv-16 *math-camera*) + (set! sv-20 (the-as (inline-array gcf-vertex) *gsf-buffer*)) + (let* ((s3-0 (-> arg1 state points-to-draw)) + (s2-0 (+ s3-0 -1)) + (s1-0 *lightning-gcf*) + (s0-0 (-> sv-16 camera-rot)) + ) + (set! sv-32 (lookup-texture-by-id (-> arg1 spec texture))) + (set! sv-48 (-> arg1 state line)) + (set! sv-24 (-> arg1 spec)) + (when (< 1 s3-0) + (set! sv-64 0) + (while (< sv-64 2) + (set! sv-28 (/ 1.0 (the float s2-0))) + (cond + ((logtest? (-> sv-24 flags) (lightning-spec-flags lsf0)) + (set! sv-80 0) + (while (< sv-80 (* s3-0 2)) + (cond + ((not (logtest? sv-80 1)) + (gs-packed-rgba-lerp! + (-> sv-20 sv-80 clr) + (-> arg1 state start-color) + (-> arg1 state end-color) + (* (the float (/ sv-80 2)) sv-28) + ) + (let ((v1-24 (-> sv-20 sv-80))) + (set! (-> v1-24 tex x) 0) + (set! (-> v1-24 tex y) (* (/ 4096 s3-0) (/ sv-80 2))) + (set! (-> v1-24 tex z) 4096) + (set! (-> v1-24 tex w) 0) + ) + ) + (else + (gs-packed-rgba-lerp! + (-> sv-20 sv-80 clr) + (-> arg1 state start-color) + (-> arg1 state end-color) + (* (the float (/ sv-80 2)) sv-28) + ) + (let ((v1-33 (-> sv-20 sv-80))) + (set! (-> v1-33 tex x) 4096) + (set! (-> v1-33 tex y) (* (/ 4096 s3-0) (/ sv-80 2))) + (set! (-> v1-33 tex z) 4096) + (set! (-> v1-33 tex w) 0) + ) + ) + ) + (set! sv-80 (+ sv-80 1)) + ) + ) + ((logtest? (-> sv-24 flags) (lightning-spec-flags lsf1)) + (dotimes (v1-43 (* s3-0 2)) + (cond + ((not (logtest? v1-43 1)) + (let ((a0-26 (-> sv-20 v1-43))) + (set! (-> a0-26 tex x) 0) + (set! (-> a0-26 tex y) (* (/ 4096 s3-0) (/ v1-43 2))) + (set! (-> a0-26 tex z) 4096) + (set! (-> a0-26 tex w) 0) + ) + ) + (else + (let ((a0-30 (-> sv-20 v1-43))) + (set! (-> a0-30 tex x) 4096) + (set! (-> a0-30 tex y) (* (/ 4096 s3-0) (/ v1-43 2))) + (set! (-> a0-30 tex z) 4096) + (set! (-> a0-30 tex w) 0) + ) + ) + ) + ) + (dotimes (v1-46 (* s2-0 2)) + (set! (-> sv-20 v1-46 clr x) (the-as int (-> arg1 state start-color r))) + (set! (-> sv-20 v1-46 clr y) (the-as int (-> arg1 state start-color g))) + (set! (-> sv-20 v1-46 clr z) (the-as int (-> arg1 state start-color b))) + (set! (-> sv-20 v1-46 clr w) (the-as int (-> arg1 state start-color a))) + ) + (dotimes (v1-49 2) + (let ((a0-45 (+ v1-49 (* s2-0 2)))) + (set! (-> sv-20 a0-45 clr x) (the-as int (-> arg1 state end-color r))) + (set! (-> sv-20 a0-45 clr y) (the-as int (-> arg1 state end-color g))) + (set! (-> sv-20 a0-45 clr z) (the-as int (-> arg1 state end-color b))) + (set! (-> sv-20 a0-45 clr w) (the-as int (-> arg1 state end-color a))) + ) + ) + ) + ((logtest? (-> sv-24 flags) (lightning-spec-flags lsf2)) + (dotimes (v1-56 (* s3-0 2)) + (cond + ((not (logtest? v1-56 1)) + (let ((a0-52 (-> sv-20 v1-56))) + (set! (-> a0-52 tex x) 0) + (set! (-> a0-52 tex y) (* (/ 4096 s3-0) (/ v1-56 2))) + (set! (-> a0-52 tex z) 4096) + (set! (-> a0-52 tex w) 0) + ) + ) + (else + (let ((a0-56 (-> sv-20 v1-56))) + (set! (-> a0-56 tex x) 4096) + (set! (-> a0-56 tex y) (* (/ 4096 s3-0) (/ v1-56 2))) + (set! (-> a0-56 tex z) 4096) + (set! (-> a0-56 tex w) 0) + ) + ) + ) + ) + (dotimes (v1-59 (* (+ s3-0 -2) 2)) + (let ((a0-58 (+ v1-59 2))) + (set! (-> sv-20 a0-58 clr x) (the-as int (-> arg1 state start-color r))) + (set! (-> sv-20 a0-58 clr y) (the-as int (-> arg1 state start-color g))) + (set! (-> sv-20 a0-58 clr z) (the-as int (-> arg1 state start-color b))) + (set! (-> sv-20 a0-58 clr w) (the-as int (-> arg1 state start-color a))) + ) + ) + (dotimes (v1-62 2) + (let ((a0-63 v1-62)) + (set! (-> sv-20 a0-63 clr x) (the-as int (-> arg1 state end-color r))) + (set! (-> sv-20 a0-63 clr y) (the-as int (-> arg1 state end-color g))) + (set! (-> sv-20 a0-63 clr z) (the-as int (-> arg1 state end-color b))) + (set! (-> sv-20 a0-63 clr w) (the-as int (-> arg1 state end-color a))) + ) + ) + (dotimes (v1-65 2) + (let ((a0-67 (+ v1-65 (* s2-0 2)))) + (set! (-> sv-20 a0-67 clr x) (the-as int (-> arg1 state end-color r))) + (set! (-> sv-20 a0-67 clr y) (the-as int (-> arg1 state end-color g))) + (set! (-> sv-20 a0-67 clr z) (the-as int (-> arg1 state end-color b))) + (set! (-> sv-20 a0-67 clr w) (the-as int (-> arg1 state end-color a))) + ) + ) + ) + ) + (let ((f0-8 (-> sv-24 radius)) + (f1-4 0.5) + (v1-71 (-> sv-48 data)) + (a0-71 (the-as object (-> sv-20 0))) + (a1-82 (the-as object (-> sv-20 1))) + ) + 1 + (.lvf vf1 (&-> s0-0 rvec quad)) + (.lvf vf2 (&-> s0-0 uvec quad)) + (.lvf vf3 (&-> s0-0 fvec quad)) + (.lvf vf4 (&-> s0-0 trans quad)) + (let ((a2-44 f0-8)) + (.mov vf8 a2-44) + ) + (let ((a2-45 f1-4)) + (.mov vf17 a2-45) + ) + (.add.x.vf vf17 vf0 vf8 :mask #b10) + (.add.w.vf vf17 vf0 vf0 :mask #b100) + (.add.w.vf vf17 vf17 vf0 :mask #b100) + (dotimes (a2-46 s3-0) + (.lvf vf8 (&-> v1-71 0 quad)) + (.mul.w.vf acc vf4 vf0 :mask #b111) + (.add.mul.x.vf acc vf1 vf8 acc :mask #b111) + (.add.mul.y.vf acc vf2 vf8 acc :mask #b111) + (.add.mul.z.vf vf8 vf3 vf8 acc :mask #b111) + (.add.x.vf vf6 vf8 vf0) + (b! (zero? sv-64) cfg-44 :delay (.add.x.vf vf7 vf8 vf0)) + (.add.y.vf vf6 vf6 vf17 :mask #b10) + (b! #t cfg-45 :delay (.sub.y.vf vf7 vf7 vf17 :mask #b10)) + (label cfg-44) + (.add.y.vf vf6 vf6 vf17 :mask #b1) + (.sub.y.vf vf7 vf7 vf17 :mask #b1) + (label cfg-45) + (.svf (&-> (the-as (pointer uint128) a1-82) 2) vf6) + (.svf (&-> (the-as (pointer uint128) a0-71) 2) vf7) + (set! a1-82 (&-> (the-as (pointer uint128) a1-82) 6)) + (set! a0-71 (&-> (the-as (pointer uint128) a0-71) 6)) + (.add.x.vf vf9 vf8 vf0) + (set! v1-71 (the-as (inline-array vector) (-> v1-71 1))) + ) + ) + (set! sv-96 s2-0) + (set! sv-112 0) + (while (> sv-96 0) + (if (< 40 sv-96) + (set! sv-128 40) + (set! sv-128 sv-96) + ) + (set! sv-144 (+ sv-128 1)) + (set! sv-160 12) + (let* ((v1-81 arg0) + (a0-73 (the-as object (-> v1-81 base))) + ) + (set! (-> (the-as dma-packet a0-73) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc sv-160)) + (set! (-> (the-as dma-packet a0-73) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet a0-73) vif1) + (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32) :imm (shr (shl (-> arg2 gcf-buf) 54) 54) :num sv-160) + ) + (set! (-> v1-81 base) (the-as pointer (the-as dma-packet (&+ (the-as dma-packet a0-73) 16)))) + ) + (set! sv-176 (the-as gcf-control (-> arg0 base))) + (let* ((v1-84 (-> sv-176 matrix)) + (a3-31 (-> sv-16 perspective)) + (a0-76 (-> a3-31 rvec quad)) + (a1-88 (-> a3-31 uvec quad)) + (a2-58 (-> a3-31 fvec quad)) + (a3-32 (-> a3-31 trans quad)) + ) + (set! (-> v1-84 rvec quad) a0-76) + (set! (-> v1-84 uvec quad) a1-88) + (set! (-> v1-84 fvec quad) a2-58) + (set! (-> v1-84 trans quad) a3-32) + ) + (quad-copy! (the-as pointer (-> sv-176 giftag)) (the-as pointer (-> s1-0 giftag)) 3) + (set! (-> sv-176 giftag num-strips) (the-as uint 1)) + (set! (-> sv-176 num-dps) (the-as uint (* sv-144 2))) + (set! (-> sv-176 kick-offset) (the-as uint 0)) + (when sv-32 + (adgif-shader<-texture-simple! (the-as adgif-shader (-> sv-176 shader)) sv-32) + (adgif-shader-update! (the-as adgif-shader (-> sv-176 shader)) sv-32) + ) + (set! (-> sv-176 shader 0 shader alpha) (new 'static 'gs-miptbp :tbp1 #x48 :tbw2 #x20)) + (set! (-> sv-176 shader 0 shader tex0 tfx) 0) + (set! (-> sv-176 shader 0 pos) (the-as uint 0)) + (set! (-> sv-176 shader 0 num) (the-as uint (+ #x8000 (* sv-144 2)))) + (&+! (-> arg0 base) (* sv-160 16)) + (let* ((v1-104 arg0) + (a0-90 (the-as object (-> v1-104 base))) + ) + (set! (-> (the-as dma-packet a0-90) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc (* 6 sv-144))) + (set! (-> (the-as dma-packet a0-90) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet a0-90) vif1) + (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32) :imm (shr (shl (-> arg2 vtx-buf) 54) 54) :num (* 6 sv-144)) + ) + (set! (-> v1-104 base) (the-as pointer (&+ (the-as dma-packet a0-90) 16))) + ) + (quad-copy! (-> arg0 base) (the-as pointer (-> sv-20 sv-112)) (* 6 sv-144)) + (&+! (-> arg0 base) (* 96 sv-144)) + (let* ((v1-109 arg0) + (a0-95 (the-as object (-> v1-109 base))) + ) + (set! (-> (the-as dma-packet a0-95) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-95) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet a0-95) vif1) (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd mscal) :msk #x1)) + (set! (-> v1-109 base) (the-as pointer (&+ (the-as dma-packet a0-95) 16))) + ) + (set! (-> arg2 gcf-buf) (- 1704 (the-as int (-> arg2 gcf-buf)))) + (+! (-> arg2 vtx-buf) 279) + (if (< (the-as uint 567) (-> arg2 vtx-buf)) + (set! (-> arg2 vtx-buf) (the-as uint 9)) + ) + (set! sv-96 (- sv-96 sv-128)) + (set! sv-112 (+ sv-112 (* sv-128 2))) + sv-112 + ) + (set! sv-64 (+ sv-64 1)) + ) + #f + ) + ) + ) + ) + +;; definition (debug) for function lightning-start +(defun-debug lightning-start ((arg0 float) (arg1 float)) + (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 ((t9-2 run-function-in-process) + (a0-3 gp-0) + (a1-3 lightning-tracker-init) + (a2-2 (new 'static 'lightning-spec + :name #f + :flags (lightning-spec-flags lsf1) + :start-color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + :end-color (new 'static 'rgba :r #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 16 + :box-size 32768.0 + :merge-factor 0.5 + :merge-count 2 + :radius 2048.0 + :duration 18000.0 + :sound #f + ) + ) + (a3-2 0) + (t0-0 #f) + (t1-0 #f) + (t2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> t2-0 x) arg0) + (set! (-> t2-0 y) 0.0) + (set! (-> t2-0 z) arg1) + (set! (-> t2-0 w) 1.0) + (let ((t3-0 (new 'stack-no-clear 'vector))) + (set! (-> t3-0 x) arg0) + (set! (-> t3-0 y) 262144.0) + (set! (-> t3-0 z) arg1) + (set! (-> t3-0 w) 1.0) + ((the-as (function object object object object object object object object none) t9-2) + a0-3 + a1-3 + a2-2 + a3-2 + t0-0 + t1-0 + t2-0 + t3-0 + ) + ) + ) + (-> gp-0 ppointer) + ) + ) + ) + +;; definition for symbol *lightning-globals*, type lightning-globals +(define *lightning-globals* (new 'global 'lightning-globals)) + +;; definition for symbol *lightning*, type symbol +(define *lightning* #t) + +;; definition for function lightning-draw-all +;; WARN: Return type mismatch int vs none. +(defun lightning-draw-all () + (when (and *lightning* (not (get-menu-mode *blit-displays-work*))) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask generic)) + (let ((s5-0 *lightning-engine*)) + (when (> (length s5-0) 0) + (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id generic-sprite-3) + ) + (let ((s3-0 *lightning-globals*)) + (let ((v1-17 s3-0)) + (set! (-> v1-17 gcf-buf) (the-as uint 837)) + (set! (-> v1-17 vtx-buf) (the-as uint 9)) + ) + (let* ((v1-19 (-> s5-0 alive-list next0)) + (s2-0 (-> v1-19 next0)) + ) + (while (!= v1-19 (-> s5-0 alive-list-end)) + (let* ((s1-0 (-> (the-as connection v1-19) param1)) + (s0-0 (-> (the-as dma-buffer s1-0) data-buffer 0)) + ) + (when (not (paused?)) + (case s0-0 + ((1 2) + (lightning-update (the-as lightning-control s1-0)) + ) + ((3) + (lightning-fade (the-as lightning-control s1-0)) + ) + ) + ) + (if (or (= s0-0 2) (= s0-0 3)) + (lightning-draw s4-0 (the-as lightning-control s1-0) s3-0) + ) + ) + (set! v1-19 s2-0) + (set! s2-0 (-> s2-0 next0)) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function unlink-lightning-spec-by-heap +;; WARN: Return type mismatch int vs none. +(defun unlink-lightning-spec-by-heap ((arg0 kheap)) + (let* ((v1-0 *lightning-spec-id-table*) + (a2-0 (-> v1-0 length)) + (a1-0 (-> arg0 base)) + (a0-1 (-> arg0 top-base)) + ) + (while (nonzero? a2-0) + (+! a2-0 -1) + (let ((a3-2 (-> v1-0 a2-0))) + (when (and (>= (the-as int a3-2) (the-as int a1-0)) (< (the-as int a3-2) (the-as int a0-1))) + (set! (-> v1-0 a2-0) (the-as lightning-spec 0)) + 0 + ) + ) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/hw/display-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/hw/display-h_REF.gc index 7ba13ecbd1..4427103637 100644 --- a/test/decompiler/reference/jak3/engine/gfx/hw/display-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/hw/display-h_REF.gc @@ -57,8 +57,8 @@ ((on-screen int32) (last-screen int32) (frames display-frame 2) - (bgcolor uint64) - (pmode uint64) + (bgcolor gs-bgcolor) + (pmode gs-pmode) (clock clock 22) (session-clock clock :overlay-at (-> clock 0)) (game-clock clock :overlay-at (-> clock 1)) @@ -154,17 +154,19 @@ (set-display gp-0) (set! (-> gp-0 frames 0) (new 'global 'display-frame)) (set! (-> gp-0 frames 1) (new 'global 'display-frame)) - (set! (-> gp-0 pmode) (the-as uint 165)) + (set! (-> gp-0 pmode) (new 'static 'gs-pmode :en1 #x1 :crtmd #x1 :mmod #x1 :slbg #x1)) (set! (-> gp-0 run-half-speed) #f) (set! (-> gp-0 vu1-enable-user-menu) (vu1-renderer-mask - sky - ocean - ocean-wave + rn3 + rn4 + rn5 + rn6 + rn7 tfrag - tie - tie-envmap tie-scissor - tie-envmap-scissor + tie + etie + etie-scissor tie-vanish shrubbery shrub-near @@ -172,35 +174,35 @@ merc emerc billboard - shrubbery-vanish + shrub-vanish tfrag-trans tie-scissor-trans tie-trans - tie-envmap-trans - tie-envmap-scissor-trans + etie-trans + etie-scissor-trans tfrag-water tie-scissor-water tie-water - tie-envmap-water - tie-envmap-scissor-water + etie-water + etie-scissor-water sprite - shadow - rn31 rn32 rn33 - depth-cue + rn34 rn36 ) ) (set! (-> gp-0 vu1-enable-user) (vu1-renderer-mask - sky - ocean - ocean-wave + rn3 + rn4 + rn5 + rn6 + rn7 tfrag - tie - tie-envmap tie-scissor - tie-envmap-scissor + tie + etie + etie-scissor tie-vanish shrubbery shrub-near @@ -208,23 +210,21 @@ merc emerc billboard - shrubbery-vanish + shrub-vanish tfrag-trans tie-scissor-trans tie-trans - tie-envmap-trans - tie-envmap-scissor-trans + etie-trans + etie-scissor-trans tfrag-water tie-scissor-water tie-water - tie-envmap-water - tie-envmap-scissor-water + etie-water + etie-scissor-water sprite - shadow - rn31 rn32 rn33 - depth-cue + rn34 rn36 ) ) diff --git a/test/decompiler/reference/jak3/engine/gfx/hw/video_REF.gc b/test/decompiler/reference/jak3/engine/gfx/hw/video_REF.gc new file mode 100644 index 0000000000..920def006a --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/hw/video_REF.gc @@ -0,0 +1,126 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function set-video-mode +;; WARN: Return type mismatch int vs none. +(defun set-video-mode ((arg0 symbol)) + (case arg0 + (('ntsc) + (set! (-> *setting-control* user-default screenx) 0) + (set! (-> *setting-control* user-default screeny) 8) + (set! (-> *video-params* display-fbp) 164) + (set! (-> *video-params* display-sy) 224) + (set! *video-mode* 0) + (sound-set-fps 60) + ) + (('pal) + (set! (-> *setting-control* user-default screenx) 0) + (set! (-> *setting-control* user-default screeny) 24) + (set! (-> *video-params* display-fbp) 144) + (set! (-> *video-params* display-sy) 256) + (set! *video-mode* 1) + (sound-set-fps 50) + ) + ) + (set-time-ratios *display* (-> *display* dog-ratio)) + (set! (-> *video-params* reset-video-mode) #t) + (set! (-> *math-camera* isometric uvec y) 0.5) + (set! (-> *math-camera* y-clip) 416.0) + (set! (-> *math-camera* y-pix) (* 0.5 (-> *math-camera* y-clip))) + (set! *profile-y* 1848) + (set! (-> *video-params* set-video-mode) #t) + 0 + (none) + ) + +;; definition for function get-video-mode +(defun get-video-mode () + (-> *setting-control* user-current video-mode) + ) + +;; definition for function set-aspect-ratio +;; WARN: Return type mismatch int vs none. +(defun set-aspect-ratio ((arg0 symbol)) + (case arg0 + (('aspect4x3) + (set! (-> *video-params* relative-x-scale) 1.0) + (set! (-> *video-params* relative-x-scale-reciprical) 1.0) + ) + (('aspect16x9) + (set! (-> *video-params* relative-x-scale) 0.75) + (set! (-> *video-params* relative-x-scale-reciprical) 1.3333334) + ) + ) + 0 + (none) + ) + +;; definition for function get-aspect-ratio +(defun get-aspect-ratio () + (-> *setting-control* user-current aspect-ratio) + ) + +;; definition for function set-progressive-scan +;; WARN: Return type mismatch int vs none. +(defun set-progressive-scan ((arg0 symbol)) + (set! (-> *setting-control* user-default set-video-mode) arg0) + 0 + (none) + ) + +;; definition for function get-progressive-scan +(defun get-progressive-scan () + (-> *setting-control* user-current set-video-mode) + ) + +;; definition for function set-graphics-mode +;; WARN: Return type mismatch int vs none. +(defun set-graphics-mode () + (let ((v1-0 *setting-control*) + (gp-0 (the-as gs-bank #x12000000)) + (s5-0 *video-params*) + ) + (let ((s4-0 *display*)) + (cond + ((-> v1-0 user-current set-video-mode) + (when (nonzero? (-> s5-0 smode2)) + (reset-graph 0 0 80 0) + (set! (-> s5-0 smode2) (the-as uint 0)) + 0 + ) + (set! (-> gp-0 display1) (new 'static 'gs-display + :magh #x1 + :dw #x4ff + :dy (+ (-> s5-0 display-dy) 50) + :dx (+ (* (-> s5-0 display-dx) 2) 326) + :dh (+ (* (-> s5-0 display-sy) 2) -1) + ) + ) + ) + (else + (when (or (!= (-> s5-0 smode2) 1) (-> *video-params* set-video-mode)) + (if (= (-> *setting-control* user-current video-mode) 'ntsc) + (reset-graph 0 1 2 0) + (reset-graph 0 1 3 0) + ) + (set! (-> s5-0 smode2) (the-as uint 1)) + (set! (-> s5-0 set-video-mode) #f) + ) + (set! (-> gp-0 display1) (new 'static 'gs-display + :magh #x3 + :dw #x9ff + :dy (+ (-> s5-0 display-dy) 50) + :dx (+ (* (-> s5-0 display-dx) 4) 652) + :dh (+ (* (-> s5-0 display-sy) 2) -1) + ) + ) + ) + ) + (set! (-> gp-0 pmode) (-> s4-0 pmode)) + (set! (-> gp-0 bgcolor) (-> s4-0 bgcolor)) + ) + (set! (-> gp-0 dspfb1) (new 'static 'gs-display-fb :fbw #xa :fbp (-> s5-0 display-fbp))) + ) + 0 + (none) + ) 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 92f8058c00..5a66894b15 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 @@ -4,7 +4,7 @@ ;; definition of type mood-channel (deftype mood-channel (structure) ((data float 24) - (vecs vector4 6 :overlay-at (-> data 0)) + (vecs vector4 6 :inline :overlay-at (-> data 0)) ) ) @@ -71,7 +71,8 @@ ;; definition of type mood-fog-table (deftype mood-fog-table (structure) - ((data mood-fog 8 :inline) + ((data mood-fog 8 :inline) + (_data uint128 24 :overlay-at data) ) ) @@ -127,7 +128,8 @@ ;; definition of type mood-color-table (deftype mood-color-table (structure) - ((data mood-color 8 :inline) + ((data mood-color 8 :inline) + (_data uint128 16 :overlay-at data) ) ) @@ -308,6 +310,7 @@ ((time float) (fade float) ) + :pack-me ) ;; definition for method 3 of type light-state @@ -328,6 +331,7 @@ ((flicker-off uint8) (flicker-on uint8) ) + :allow-misaligned ) ;; definition for method 3 of type flicker-state @@ -370,6 +374,7 @@ ((value float) (scale float) ) + :pack-me ) ;; definition for method 3 of type electricity-state @@ -392,6 +397,7 @@ (target-brightness float) (speed float) ) + :pack-me ) ;; definition for method 3 of type pulse-state @@ -434,6 +440,7 @@ (length uint8) (height uint8) ) + :pack-me ) ;; definition for method 3 of type flames-state @@ -528,6 +535,7 @@ (deftype mood-context (mood-context-core3) ((itimes vector4w 4 :inline) (state uint32 32) + (data uint128 123 :overlay-at (-> current-fog fog-color data 0)) ) ) @@ -624,22 +632,22 @@ (clouds mood-clouds 9) ) (:methods - (mood-control-method-9 () none) - (mood-control-method-10 () none) - (mood-control-method-11 () none) - (mood-control-method-12 () none) + (init-weather! (_type_) none) + (set-cloud-and-fog-interp! (_type_ float float float float) none) + (update-mood-range! (_type_ float float float float) none) + (set-time-for-random-weather! (_type_ float float) none) (set-special-interps! (_type_ float float symbol) none) (weather-event-concluded? (_type_) symbol) - (mood-control-method-15 () none) - (mood-control-method-16 () none) - (mood-control-method-17 () none) - (mood-control-method-18 () none) - (mood-control-method-19 () none) - (mood-control-method-20 () none) - (mood-control-method-21 () none) - (mood-control-method-22 () none) - (mood-control-method-23 () none) - (mood-control-method-24 () none) + (set-lightning-time! (_type_ int int float) none) + (apply-mood-clouds-and-fog (_type_ mood-control-work) none) + (apply-mood-fog (_type_ mood-control-work mood-color-table mood-color-table mood-color-table float) none) + (apply-fog-height (_type_ mood-control-work float float float float) none) + (apply-mood-colors (_type_ mood-control-work) none) + (mood-control-method-20 (_type_ mood-control-work mood-color-table mood-color-table mood-color-table float) none) + (apply-mood-channels (_type_ mood-control-work) none) + (adjust-num-clouds (_type_ mood-control-work) none) + (gen-lightning-and-thunder! (_type_ int) none) + (play-or-stop-lightning-sfx! (_type_ sound-spec vector) none) ) ) diff --git a/test/decompiler/reference/jak3/engine/gfx/mood/mood_REF.gc b/test/decompiler/reference/jak3/engine/gfx/mood/mood_REF.gc new file mode 100644 index 0000000000..dde6a468eb --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/mood/mood_REF.gc @@ -0,0 +1,1937 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function palette-select-special +;; INFO: Used lq/sq +(defun palette-select-special ((arg0 mood-context-core3)) + (dotimes (v1-0 8) + (cond + ((logtest? (-> *time-of-day-context* mode) (ash 16 v1-0)) + (if (-> *time-of-day-context* overide-enable) + (set! (-> arg0 times v1-0 quad) (-> *time-of-day-context* times v1-0 quad)) + (set! (-> arg0 times v1-0 w) 1.0) + ) + ) + (else + (set! (-> arg0 times v1-0 w) 0.0) + ) + ) + ) + #f + ) + +;; definition for function clear-mood-times +(defun clear-mood-times ((mood-ctx mood-context)) + (dotimes (idx 8) + (set! (-> mood-ctx times idx w) 0.0) + ) + #f + ) + +;; definition for function update-mood-itimes +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun update-mood-itimes ((arg0 mood-context)) + (local-vars + (v1-0 uint128) + (v1-1 uint128) + (v1-2 uint128) + (v1-3 uint128) + (a1-0 uint128) + (a1-1 uint128) + (a1-2 uint128) + (a1-3 uint128) + (a2-0 uint128) + (a2-1 uint128) + (a3-0 uint128) + (a3-1 uint128) + (t0-0 uint128) + (t0-1 uint128) + (t1-0 uint128) + (t1-1 uint128) + (t2-0 uint128) + (t2-1 uint128) + (t3-0 uint128) + (t3-1 uint128) + ) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + (vf8 :class vf) + ) + (nop!) + (nop!) + (.lvf vf1 (&-> arg0 times 0 quad)) + (nop!) + (.lvf vf2 (&-> arg0 times 1 quad)) + (.mul.w.vf vf1 vf1 vf1 :mask #b111) + (.lvf vf3 (&-> arg0 times 2 quad)) + (.mul.w.vf vf2 vf2 vf2 :mask #b111) + (.lvf vf4 (&-> arg0 times 3 quad)) + (.mul.w.vf vf3 vf3 vf3 :mask #b111) + (.lvf vf5 (&-> arg0 times 4 quad)) + (.mul.w.vf vf4 vf4 vf4 :mask #b111) + (.lvf vf6 (&-> arg0 times 5 quad)) + (.mul.w.vf vf5 vf5 vf5 :mask #b111) + (.lvf vf7 (&-> arg0 times 6 quad)) + (.mul.w.vf vf6 vf6 vf6 :mask #b111) + (.lvf vf8 (&-> arg0 times 7 quad)) + (.mul.w.vf vf7 vf7 vf7 :mask #b111) + (nop!) + (.mul.w.vf vf8 vf8 vf8 :mask #b111) + (nop!) + (vftoi12.xyzw vf1 vf1) + (nop!) + (vftoi12.xyzw vf2 vf2) + (nop!) + (vftoi12.xyzw vf3 vf3) + (nop!) + (vftoi12.xyzw vf4 vf4) + (nop!) + (vftoi12.xyzw vf5 vf5) + (nop!) + (vftoi12.xyzw vf6 vf6) + (nop!) + (vftoi12.xyzw vf7 vf7) + (nop!) + (vftoi12.xyzw vf8 vf8) + (nop!) + (.mov v1-0 vf1) + (nop!) + (.mov a1-0 vf2) + (nop!) + (.mov a2-0 vf3) + (.pw.sra v1-1 v1-0 6) + (.mov a3-0 vf4) + (.pw.sra a1-1 a1-0 6) + (.mov t0-0 vf5) + (.pw.sra a2-1 a2-0 6) + (.mov t1-0 vf6) + (.pw.sra a3-1 a3-0 6) + (.mov t2-0 vf7) + (.pw.sra t0-1 t0-0 6) + (.mov t3-0 vf8) + (.pw.sra t1-1 t1-0 6) + (.pw.sra t2-1 t2-0 6) + (nop!) + (.pw.sra t3-1 t3-0 6) + (nop!) + (.ppach v1-2 a1-1 v1-1) + (nop!) + (.ppach a1-2 a3-1 a2-1) + (set! (-> arg0 itimes 0 quad) v1-2) + (.ppach v1-3 t1-1 t0-1) + (set! (-> arg0 itimes 1 quad) a1-2) + (.ppach a1-3 t3-1 t2-1) + (set! (-> arg0 itimes 2 quad) v1-3) + (nop!) + (set! (-> arg0 itimes 3 quad) a1-3) + 0 + (none) + ) + ) + +;; definition for function update-mood-direction +;; INFO: Used lq/sq +;; ERROR: Expression building failed: In update-mood-direction: Failed to match non-power of two case: t3-14 +(defun update-mood-direction ((arg0 mood-context-core3) (arg1 mood-table) (arg2 float)) + (local-vars + (v0-0 pointer) + (v0-1 float) + (v1-0 mood-channel-group) + (v1-3 int) + (v1-4 float) + (v1-5 float) + (v1-6 float) + (v1-7 symbol) + (v1-8 symbol) + (v1-9 float) + (v1-12 float) + (v1-13 symbol) + (v1-14 symbol) + (v1-15 float) + (v1-17 float) + (v1-19 float) + (v1-20 symbol) + (v1-21 symbol) + (v1-22 float) + (v1-24 float) + (v1-26 light-group) + (v1-27 light-group) + (v1-28 light-group) + (v1-29 light-group) + (v1-30 light-group) + (v1-31 light-group) + (a0-1 light-group) + (a1-1 int) + (a1-2 float) + (a1-3 (inline-array light-group)) + (a2-1 mood-direction-table) + (a2-2 int) + (a3-0 int) + (t0-0 int) + (t0-1 int) + (t1-0 int) + (t2-0 light-group) + (t2-1 float) + (t2-2 int) + (t3-7 int) + (t3-8 int) + (t3-9 light) + (t3-10 int) + (t3-11 int) + (t3-12 int) + (t3-13 light-group) + (t3-14 int) + (t3-15 rgbaf) + (t3-16 int) + (t3-17 int) + (t3-18 int) + (t3-19 int) + (t4-5 int) + (t4-6 int) + (t4-7 light) + (t4-8 int) + (t4-9 int) + (t4-10 light) + (t4-11 int) + (t4-12 int) + (t4-13 int) + (t4-14 int) + (t4-15 vector) + (t4-16 uint128) + (t4-17 int) + (t4-18 int) + (t4-19 int) + (t4-20 int) + (t4-21 int) + (t4-22 vector) + (t4-23 uint128) + (t9-0 (function pointer pointer int pointer)) + (f0-0 float) + (f0-1 int) + (f0-2 float) + (f0-3 float) + (f0-4 float) + (f0-5 float) + (f1-0 int) + (f1-1 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) + (f2-0 float) + (f2-1 float) + (f2-2 float) + (f2-3 float) + (f2-6 float) + (f2-7 float) + (f2-8 float) + (f2-9 float) + (f2-10 float) + (f2-11 float) + (f2-12 float) + (f2-13 float) + (f2-14 float) + (f2-15 float) + (f2-16 float) + (f3-3 float) + (f3-4 float) + (f3-5 float) + (f3-6 float) + (f3-7 float) + (f3-8 float) + (f3-9 float) + (f3-10 float) + (sv-16 light-group) + ) + (cond + ((begin + (set! v1-0 (-> arg1 mood-channel-group)) + (set! a2-1 (-> arg1 mood-direction-table)) + (set! f0-0 arg2) + (set! f0-1 (the int arg2)) + (set! a3-0 (the int arg2)) + (set! a1-1 (+ a3-0 1)) + (set! t0-0 24) + (set! t0-1 (mod (+ a3-0 1) 24)) + (set! f0-2 arg2) + (set! f1-0 (gpr->fpr a3-0)) + (set! f1-1 (the float a3-0)) + (set! f0-3 (- arg2 (the float a3-0))) + (set! a1-2 1.0) + (set! f1-2 1.0) + (set! f1-3 (- 1.0 f0-3)) + (set! t1-0 0) + (set! a1-3 (-> arg0 light-group)) + (set! t2-0 (-> arg0 light-group 1)) + (set! sv-16 t2-0) + (set! t2-1 1.0) + (set! f2-0 1.0) + (set! (-> a1-3 0 ambi extra x) f2-0) + (set! f2-1 0.0) + (set! (-> a1-3 0 dir0 extra x) f2-1) + (set! f2-2 0.0) + (set! (-> a1-3 0 dir1 extra x) f2-2) + (set! f2-3 0.0) + (set! (-> a1-3 0 dir2 extra x) f2-3) + (set! t2-2 0) + (while (<.si t2-2 4) + (when (!= f2-6 0.0) + (set! t3-7 48) + (set! t3-8 (* 48 t1-0)) + (set! t3-9 (-> a1-3 0 lights t1-0)) + (set! (-> a1-3 0 lights t1-0 extra x) f2-6) + (set! t3-10 2) + (set! t3-11 (ash 2 t2-2)) + (set! t4-5 48) + (set! t4-6 (* 48 t1-0)) + (set! t4-7 (-> a1-3 0 lights t1-0)) + (set! (-> a1-3 0 lights t1-0 mask) (the-as uint t3-11)) + (set! t3-12 (+ t2-2 1)) + (set! t4-8 48) + (set! t4-9 (* 48 t1-0)) + (set! t4-10 (-> a1-3 0 lights t1-0)) + (set! (-> a1-3 0 lights t1-0 palette-index) t3-12) + (set! t3-13 (-> a1-3 0)) + (set! t4-11 48) + (set! t4-12 (* 48 t1-0)) + (set! t3-14 (+ (the-as uint (-> a1-3 0)) (* 48 t1-0))) + (set! t4-13 (* t2-2 16)) + (set! t4-14 (+ (* t2-2 16) 0)) + (set! t4-15 (-> a2-1 data t2-2)) + (set! t4-16 (-> a2-1 data t2-2 quad)) + (set! (dynamic-array-field-access t3-14 lights PLACEHOLDER direction quad) t4-16) + (set! t3-15 (-> a1-3 0 dir0 color)) + (set! t4-17 48) + (set! t4-18 (*.si t4-17 t1-0)) + (set! t3-16 (+ t3-15 t4-18)) + (set! t4-19 (+ t2-2 1)) + (set! t4-20 (sll t4-19 4)) + (set! t4-21 (+ t4-20 1648)) + (set! t4-22 (+ t4-21 arg0)) + (set! t4-23 (-> t4-22 quad)) + (set! (the-as (pointer uint128) (-> (the-as (pointer uint128) t3-16))) t4-23) + (set! t3-17 (+ t2-2 1)) + (set! t3-18 (sll t3-17 4)) + (set! t3-19 (+ arg0 t3-18)) + (set! (dynamic-array-field-access t3-19 times PLACEHOLDER w) f2-6) + (set! t1-0 (+ t1-0 1)) + (set! t3-20 t1-0) + ) + (set! t2-2 (+ t2-2 1)) + ) + (set! v1-3 1) + (set! (-> a1-3 0 ambi mask) (the-as uint v1-3)) + (set! (-> a1-3 0 ambi palette-index) 0) + (set! t9-0 mem-copy!) + (set! a0-1 sv-16) + (set! a2-2 192) + (call! a0-1 a1-3 a2-2) + (set! v1-4 1.0) + (set! f0-4 (gpr->fpr v1-4)) + (set! v1-5 1.1) + (set! f1-4 (gpr->fpr v1-5)) + (set! v1-6 6.0) + (set! f2-7 (gpr->fpr v1-6)) + (set! f3-3 (gpr->fpr arg2)) + (set! v1-7 (>=.s f2-7 f3-3)) + (or v1-7 + (begin (set! f2-8 (gpr->fpr arg2)) (set! v1-9 18.0) (set! f3-4 (gpr->fpr v1-9)) (set! v1-8 (>=.s f2-8 f3-4))) + ) + v1-8 + ) + (set! f0-4 f1-4) + (set! v1-11 (fpr->gpr f0-4)) + ) + ((begin + (and (begin + (set! v1-12 6.0) + (set! f2-9 (gpr->fpr v1-12)) + (set! f3-5 (gpr->fpr arg2)) + (set! v1-13 (<.s f2-9 f3-5)) + v1-13 + ) + (begin + (set! f2-10 (gpr->fpr arg2)) + (set! v1-15 7.0) + (set! f3-6 (gpr->fpr v1-15)) + (set! v1-14 (<.s f2-10 f3-6)) + ) + ) + v1-14 + ) + (set! f1-5 (-.s f1-4 f0-4)) + (set! v1-17 7.0) + (set! f2-11 (gpr->fpr v1-17)) + (set! f3-7 (gpr->fpr arg2)) + (set! f2-12 (-.s f2-11 f3-7)) + (set! f1-6 (*.s f1-5 f2-12)) + (set! f0-4 (+.s f0-4 f1-6)) + (set! v1-18 (fpr->gpr f0-4)) + ) + ((begin + (and (begin + (set! v1-19 17.0) + (set! f2-13 (gpr->fpr v1-19)) + (set! f3-8 (gpr->fpr arg2)) + (set! v1-20 (<.s f2-13 f3-8)) + v1-20 + ) + (begin + (set! f2-14 (gpr->fpr arg2)) + (set! v1-22 18.0) + (set! f3-9 (gpr->fpr v1-22)) + (set! v1-21 (<.s f2-14 f3-9)) + ) + ) + v1-21 + ) + (set! f1-7 (-.s f1-4 f0-4)) + (set! v1-24 -17.0) + (set! f2-15 (gpr->fpr v1-24)) + (set! f3-10 (gpr->fpr arg2)) + (set! f2-16 (+.s f2-15 f3-10)) + (set! f1-8 (*.s f1-7 f2-16)) + (set! f0-4 (+.s f0-4 f1-8)) + (set! v1-25 (fpr->gpr f0-4)) + ) + ) + (set! v1-26 sv-16) + (set! f1-9 (-> v1-26 dir0 extra x)) + (set! f1-10 (*.s f1-9 f0-4)) + (set! v1-27 sv-16) + (set! (-> v1-27 dir0 extra x) f1-10) + (set! v1-28 sv-16) + (set! f1-11 (-> v1-28 dir1 extra x)) + (set! f1-12 (*.s f1-11 f0-4)) + (set! v1-29 sv-16) + (set! (-> v1-29 dir1 extra x) f1-12) + (set! v1-30 sv-16) + (set! f1-13 (-> v1-30 dir2 extra x)) + (set! f0-5 (*.s f1-13 f0-4)) + (set! v1-31 sv-16) + (set! (-> v1-31 dir2 extra x) f0-5) + (set! v0-1 (fpr->gpr f0-5)) + (ret-value v0-1) + ) + +;; definition for function update-mood-exterior +;; INFO: Used lq/sq +(defun update-mood-exterior ((arg0 mood-context-core3) (arg1 mood-table) (arg2 float) (arg3 int)) + (local-vars (v0-1 object) (sv-32 mood-color) (sv-48 mood-color) (sv-64 vector)) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + 0 + 0 + 0.0 + (let* ((v1-3 (the int arg2)) + (f0-4 (- arg2 (the float v1-3))) + (f1-3 (- 1.0 f0-4)) + (a0-6 (/ v1-3 24)) + (v1-7 (-> arg1 mood-interp-table hour (- v1-3 (* 24 a0-6)))) + (s3-0 (-> v1-7 snapshot1)) + (s2-0 (-> v1-7 snapshot2)) + (f30-0 (+ (* f1-3 (-> v1-7 morph-start)) (* f0-4 (-> v1-7 morph-end)))) + ) + (set! v0-1 + (cond + ((and (-> *level* level arg3 bsp) + (nonzero? (-> *level* level arg3 bsp)) + (not (-> *level* level arg3 bsp ambients)) + ) + (set! v0-1 (-> arg0 times)) + (set! (-> (the-as (inline-array vector) v0-1) 0 x) 1.0) + (set! (-> (the-as (inline-array vector) v0-1) 0 y) 1.0) + (set! (-> (the-as (inline-array vector) v0-1) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v0-1) 0 w) 1.0) + v0-1 + ) + ((= s3-0 s2-0) + (let ((a2-1 (-> arg1 mood-color-table data s3-0)) + (v1-26 (-> arg0 times)) + (a1-2 (-> arg0 times 1)) + (a0-16 (-> arg0 light-group)) + ) + (set! (-> v1-26 0 quad) (-> a2-1 amb-color quad)) + (set! (-> a1-2 quad) (-> a2-1 lgt-color quad)) + (set! (-> arg0 times 2 quad) (-> a1-2 quad)) + (set! (-> arg0 times 3 quad) (-> a1-2 quad)) + (set! (-> arg0 times 4 quad) (-> a1-2 quad)) + (set! (-> a0-16 0 ambi color quad) (-> v1-26 0 quad)) + ) + (set! (-> arg0 current-sky-color quad) (-> arg1 mood-sky-table data s3-0 quad)) + (mem-copy! (the-as pointer (-> arg0 current-fog)) (the-as pointer (-> arg1 mood-fog-table data s3-0)) 48) + ) + (else + (set! sv-32 (-> arg1 mood-color-table data s3-0)) + (set! sv-48 (-> arg1 mood-color-table data s2-0)) + (let ((s1-0 (-> arg0 times))) + (set! sv-64 (-> arg0 times 1)) + (let ((s0-0 (-> arg0 light-group))) + (vector4-lerp! (the-as vector s1-0) (-> sv-32 amb-color) (-> sv-48 amb-color) f30-0) + (vector4-lerp! sv-64 (-> sv-32 lgt-color) (-> sv-48 lgt-color) f30-0) + (set! (-> arg0 times 2 quad) (-> sv-64 quad)) + (set! (-> arg0 times 3 quad) (-> sv-64 quad)) + (set! (-> arg0 times 4 quad) (-> sv-64 quad)) + (set! (-> s0-0 0 ambi color quad) (-> s1-0 0 quad)) + ) + ) + (vector4-lerp! + (-> arg0 current-sky-color) + (-> arg1 mood-sky-table data s3-0) + (-> arg1 mood-sky-table data s2-0) + f30-0 + ) + (vector4-array-lerp! + (the-as (inline-array vector4) (-> arg0 current-fog)) + (the-as (inline-array vector4) (-> arg1 mood-fog-table data s3-0)) + (the-as (inline-array vector4) (-> arg1 mood-fog-table data s2-0)) + f30-0 + 3 + ) + ) + ) + ) + ) + (set-vector! (-> arg0 current-prt-color) 0.0 0.0 0.0 0.0) + (set-vector! (-> arg0 current-env-color) 0.0 0.0 0.0 0.0) + (let ((f0-18 (-> *mood-control* lightning-flash)) + (a0-36 (-> *mood-control* lightning-index)) + ) + (when (and (!= f0-18 0.0) (< a0-36 4)) + (let ((v1-64 (new 'stack-no-clear 'vector)) + (a0-40 (-> arg0 times (+ a0-36 1))) + ) + (set-vector! v1-64 f0-18 f0-18 f0-18 0.0) + (vector+! a0-40 a0-40 v1-64) + ) + ) + ) + (update-mood-direction arg0 arg1 arg2) + ) + ) + ) + +;; definition for function copy-mood-exterior +;; INFO: Used lq/sq +(defun copy-mood-exterior ((arg0 mood-context)) + (set! (-> *time-of-day-context* exterior-level) (the-as basic #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)) + (a1-4 (the-as structure (-> *level* level-default mood-context))) + ) + (dotimes (a2-1 31) + (set! (-> (the-as (inline-array vector) v1-2) 0 quad) + (-> (the-as mood-context a1-4) current-fog fog-color quad) + ) + (set! v1-2 (-> (the-as (inline-array vector) v1-2) 1)) + (set! a1-4 (-> (the-as mood-context a1-4) current-fog fog-dists)) + ) + ) + (let ((v1-5 (the-as object (-> arg0 times))) + (a0-2 (the-as object (-> *level* level-default mood-context times))) + ) + (dotimes (a1-6 5) + (set! (-> (the-as (inline-array vector) v1-5) 0 quad) (-> (the-as (inline-array vector) a0-2) 0 quad)) + (set! v1-5 (-> (the-as (inline-array vector) v1-5) 1)) + (set! a0-2 (-> (the-as (inline-array vector) a0-2) 1)) + ) + ) + #f + ) + ) + ) + +;; definition for function copy-mood-exterior-ambi +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defun copy-mood-exterior-ambi ((arg0 mood-context) (arg1 symbol)) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (let ((v1-1 (the-as structure arg0)) + (a2-3 (the-as structure (-> *level* level-default mood-context))) + ) + (dotimes (a3-1 31) + (set! (-> (the-as mood-context v1-1) current-fog fog-color quad) + (-> (the-as mood-context a2-3) current-fog fog-color quad) + ) + (set! v1-1 (-> (the-as mood-context v1-1) current-fog fog-dists)) + (set! a2-3 (-> (the-as mood-context a2-3) current-fog fog-dists)) + ) + ) + (set! (-> arg0 times 0 quad) (-> *level* level-default mood-context times 0 quad)) + (vector+! + (the-as vector (-> arg0 times)) + (the-as vector (-> arg0 times)) + (-> *level* level-default mood-context times 1) + ) + (when arg1 + (set! (-> arg0 times 1 quad) (-> *level* level-default mood-context times 1 quad)) + (set! (-> arg0 times 1 w) 1.0) + ) + ) + ) + (none) + ) + +;; definition for function clear-mood-context +;; INFO: Used lq/sq +(defun clear-mood-context ((arg0 mood-context)) + (let ((v1-0 arg0)) + (dotimes (a1-0 123) + (set! (-> v1-0 data a1-0) (the-as uint128 0)) + ) + ) + (dotimes (v1-3 8) + (set-vector! (-> arg0 times v1-3) 1.0 1.0 1.0 0.0) + ) + #f + ) + +;; definition for function update-mood-interior +;; INFO: Used lq/sq +(defun update-mood-interior ((arg0 mood-context) (arg1 symbol)) + (let ((v1-0 (-> arg0 light-group))) + (cond + (arg1 + (set! (-> arg0 current-fog fog-color quad) (-> *level* level-default mood-context current-fog fog-color quad)) + (set-vector! (-> arg0 current-fog fog-dists) 98304.0 3072000.0 255.0 150.0) + (set-vector! (-> arg0 current-fog erase-color) 0.0 0.0 0.0 128.0) + ) + (else + (let ((a1-4 (-> arg0 current-fog))) + (set! (-> a1-4 fog-color x) 150.0) + (set! (-> a1-4 fog-color y) 165.0) + (set! (-> a1-4 fog-color z) 220.0) + (set! (-> a1-4 fog-color w) 128.0) + ) + (set-vector! (-> arg0 current-fog fog-dists) 2048000.0 12288000.0 255.0 150.0) + (set-vector! (-> arg0 current-fog erase-color) 0.0 0.0 0.0 128.0) + ) + ) + (set-vector! (-> arg0 current-prt-color) 0.0 0.0 0.0 0.0) + (set-vector! (-> arg0 current-env-color) 96.0 96.0 96.0 128.0) + (set-vector! (-> arg0 current-sky-color) 0.0 0.0 0.0 1.0) + (let ((a0-2 (-> v1-0 0))) + (set! (-> a0-2 dir0 direction x) 0.0) + (set! (-> a0-2 dir0 direction y) 1.0) + (set! (-> a0-2 dir0 direction z) 0.0) + (set! (-> a0-2 dir0 direction w) 0.0) + ) + (set-vector! (-> v1-0 0 dir0 color) 0.667 0.667 0.667 1.0) + (set-vector! (-> v1-0 0 ambi color) 0.333 0.333 0.333 1.0) + (set! (-> v1-0 0 dir0 extra x) 1.0) + (set! (-> v1-0 0 dir1 extra x) 0.0) + (set! (-> v1-0 0 dir2 extra x) 0.0) + (set! (-> v1-0 0 ambi extra x) 1.0) + ) + ) + +;; definition for function update-mood-interior-ambient +;; INFO: Used lq/sq +(defun update-mood-interior-ambient ((arg0 mood-context) (arg1 symbol) (arg2 float)) + (update-mood-interior arg0 arg1) + (set! (-> arg0 times 0 quad) (-> *level* level-default mood-context times 0 quad)) + (vector+float*! + (the-as vector (-> arg0 times)) + (the-as vector (-> arg0 times)) + (-> *level* level-default mood-context times 1) + arg2 + ) + ) + +;; definition for function update-mood-flames +(defbehavior update-mood-flames time-of-day-proc ((arg0 mood-context) (arg1 int) (arg2 int) (arg3 int) (arg4 float) (arg5 float) (arg6 float)) + (let* ((gp-0 (the-as flames-state (+ (+ arg3 1840) (the-as int arg0)))) + (s4-0 (+ (-> gp-0 index) arg1)) + (f0-0 (-> gp-0 time)) + (v1-2 (-> gp-0 length)) + (s0-0 (-> gp-0 height)) + ) + (dotimes (a0-1 arg2) + (set! (-> arg0 times (+ arg1 a0-1) w) arg4) + ) + (cond + ((>= f0-0 (the float v1-2)) + (set! (-> gp-0 index) (the-as uint (the int (rand-vu-float-range 0.0 (+ -0.01 (the float arg2)))))) + (set! (-> gp-0 time) 0.0) + (set! (-> gp-0 length) (the-as uint (the int (* (rand-vu-float-range 7.0 15.0) arg6)))) + (set! (-> gp-0 height) (the-as uint (the int (rand-vu-float-range 0.0 255.0)))) + (set! (-> arg0 times s4-0 w) arg4) + ) + (else + (let ((f0-14 (sin (* 32768.0 (/ f0-0 (the float v1-2)))))) + (set! (-> arg0 times s4-0 w) (+ (* (the float s0-0) f0-14 arg5) arg4)) + ) + (if (not (paused?)) + (set! (-> gp-0 time) (+ (-> gp-0 time) (if (= (-> *display* bg-clock clock-ratio) 0.0) + 1.0 + (-> self clock time-adjust-ratio) + ) + ) + ) + ) + ) + ) + ) + ) + +;; definition for symbol *flash0*, type (array float) +(define *flash0* + (new 'static 'boxed-array :type float 1.0 0.0 0.5 1.0 0.5 0.0 0.5 0.35 0.4 0.35 0.25 0.1 0.04) + ) + +;; definition for symbol *flash1*, type (array float) +(define *flash1* (new 'static 'boxed-array :type float 1.0 0.8 0.0 1.0 0.5 1.0 0.4 0.2 0.1)) + +;; definition for symbol *flash2*, type (array float) +(define *flash2* (new 'static 'boxed-array :type float 1.0 0.9 0.8 0.7 0.0 0.0 1.0 0.0 1.0 0.5)) + +;; definition for symbol *flash3*, type (array float) +(define *flash3* (new 'static 'boxed-array :type float 0.5 0.0 1.0 0.9 1.0 0.8 0.3 0.0 0.0 0.5 0.1 0.5 0.35)) + +;; definition for symbol *flash4*, type (array float) +(define *flash4* + (new 'static 'boxed-array :type float 1.0 0.0 1.0 0.0 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.5 0.4 0.3 0.2 0.1) + ) + +;; definition for symbol *flash5*, type (array float) +(define *flash5* (new 'static 'boxed-array :type float + 1.0 + 0.0 + 1.0 + 0.0 + 1.0 + 0.95 + 0.9 + 0.85 + 0.8 + 0.75 + 0.7 + 0.65 + 0.6 + 0.55 + 0.5 + 0.45 + 0.4 + 0.35 + 0.3 + 0.25 + 0.2 + 0.5 + 0.45 + 0.4 + 0.35 + 0.3 + 0.25 + 0.2 + 0.15 + 0.1 + 0.05 + ) + ) + +;; definition for symbol *flash6*, type (array float) +(define *flash6* + (new 'static 'boxed-array :type float 1.0 0.0 1.0 0.0 0.5 0.0 0.5 0.35 0.0 0.0 1.0 0.0 0.2 0.1) + ) + +;; definition for symbol *flash7*, type (array float) +(define *flash7* + (new 'static 'boxed-array :type float 1.0 0.8 0.3 0.0 0.6 0.5 0.4 0.3 0.2 0.5 0.4 0.3 0.2 0.1) + ) + +;; definition for function update-mood-light +(defun update-mood-light ((arg0 mood-context) (arg1 int) (arg2 int) (arg3 float) (arg4 float) (arg5 float) (arg6 float) (arg7 float)) + (with-pp + (let* ((gp-0 (the-as light-state (+ (+ arg2 1840) (the-as int arg0)))) + (f0-0 512.0) + (f1-1 (+ (-> gp-0 time) arg6)) + (f26-0 (* f0-0 (- f1-1 (* (the float (the int (/ f1-1 256.0))) 256.0)))) + (f30-1 (+ (fabs arg3) (* (cos f26-0) arg4))) + (f28-0 (-> gp-0 fade)) + ) + (cond + ((or (>= arg5 18.0) (>= 6.0 arg5)) + (set! f28-0 (cond + ((< arg3 0.0) + (if (not (paused?)) + (set! f28-0 (seek f28-0 1.0 (* 2.0 (seconds-per-frame)))) + ) + f28-0 + ) + (else + 1.0 + ) + ) + ) + (set! (-> gp-0 fade) f28-0) + (set! (-> arg0 times arg1 w) (* f30-1 f28-0)) + (when (not (paused?)) + (let ((f0-10 (-> gp-0 time))) + (set! arg7 (cond + ((= (-> *display* bg-clock clock-ratio) 0.0) + (empty) + arg7 + ) + (else + (* arg7 (-> pp clock time-adjust-ratio)) + ) + ) + ) + (set! (-> gp-0 time) (+ f0-10 arg7)) + ) + ) + ) + ((= f28-0 1.0) + (cond + ((< f26-0 3640.889) + (set! (-> arg0 times arg1 w) f30-1) + (set! (-> gp-0 fade) 0.99) + ) + (else + (set! (-> arg0 times arg1 w) f30-1) + ) + ) + (if (not (paused?)) + (set! (-> gp-0 time) (+ (-> gp-0 time) (if (= (-> *display* bg-clock clock-ratio) 0.0) + arg7 + (* arg7 (-> pp clock time-adjust-ratio)) + ) + ) + ) + ) + ) + ((and (< f28-0 1.0) (< 0.0 f28-0)) + (set! (-> arg0 times arg1 w) f28-0) + (when (not (paused?)) + (if (< 0.75 f28-0) + (set! (-> gp-0 fade) (- (-> gp-0 fade) (* 0.04 (-> pp clock time-adjust-ratio)))) + (set! (-> gp-0 fade) (- (-> gp-0 fade) (* 0.02 (-> pp clock time-adjust-ratio)))) + ) + ) + ) + (else + (set! (-> gp-0 fade) 0.0) + (set! (-> gp-0 time) 0.0) + ) + ) + ) + ) + ) + +;; definition of type lava-state +(deftype lava-state (structure) + ((lava float) + ) + ) + +;; definition for method 3 of type lava-state +(defmethod inspect ((this lava-state)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'lava-state) + (format #t "~1Tlava: ~f~%" (-> this lava)) + (label cfg-4) + this + ) + +;; definition for function update-mood-lava +(defun update-mood-lava ((arg0 mood-context) (arg1 int) (arg2 int) (arg3 float) (arg4 float) (arg5 float) (arg6 float) (arg7 float)) + (let ((gp-0 (+ (+ arg2 1840) (the-as int arg0)))) + (let ((f0-1 (cos (-> (the-as (pointer float) gp-0))))) + (set! (-> arg0 times arg1 w) (+ arg3 (* f0-1 arg4))) + (set! (-> arg0 times (+ arg1 1) w) (+ arg3 (* (- f0-1) arg4))) + ) + (if (not (paused?)) + (set! (-> (the-as (pointer float) gp-0)) (+ (-> (the-as (pointer float) gp-0)) arg5)) + ) + ) + ) + +;; definition for function update-mood-flicker +;; WARN: Return type mismatch int vs none. +(defun update-mood-flicker ((arg0 mood-context) (arg1 int) (arg2 int)) + (let ((gp-0 (the-as flicker-state (+ (+ arg2 1840) (the-as int arg0))))) + (cond + ((nonzero? (-> gp-0 flicker-on)) + (set! (-> arg0 times arg1 w) 1.0) + (if (not (paused?)) + (+! (-> gp-0 flicker-on) -1) + ) + ) + ((nonzero? (-> gp-0 flicker-off)) + (if (not (paused?)) + (+! (-> gp-0 flicker-off) -1) + ) + ) + (else + (set! (-> gp-0 flicker-on) (the-as uint (the int (rand-vu-float-range 2.0 20.0)))) + (if (zero? (the int (rand-vu-float-range 0.0 3.0))) + (set! (-> gp-0 flicker-off) (the-as uint (the int (rand-vu-float-range 2.0 120.0)))) + (set! (-> gp-0 flicker-off) (the-as uint (the int (rand-vu-float-range 2.0 20.0)))) + ) + ) + ) + ) + (none) + ) + +;; definition for function update-mood-florescent +(defun update-mood-florescent ((arg0 mood-context) (arg1 int) (arg2 int)) + (let ((gp-0 (the-as florescent-state (+ (+ arg2 1840) (the-as int arg0))))) + (set! (-> arg0 times arg1 w) (-> gp-0 value)) + (when (not (paused?)) + (cond + ((zero? (-> gp-0 delay)) + (set! (-> gp-0 delay2) (the int (rand-vu-float-range 10.0 60.0))) + (set! (-> gp-0 delay) (the int (rand-vu-float-range 60.0 120.0))) + ) + (else + (+! (-> gp-0 delay) -1) + ) + ) + (cond + ((>= (-> gp-0 delay2) (-> gp-0 delay)) + (set! (-> gp-0 value) (rand-vu-float-range 1.0 1.5)) + ) + ((< (-> gp-0 delay2) (-> gp-0 delay)) + (set! (-> gp-0 value) 1.5) + ) + ) + ) + ) + ) + +;; definition for function update-mood-electricity +;; WARN: Return type mismatch float vs none. +(defun update-mood-electricity ((arg0 mood-context) (arg1 int) (arg2 int) (arg3 float) (arg4 float)) + (let ((gp-0 (the-as electricity-state (+ (+ arg2 1840) (the-as int arg0))))) + (set! (-> arg0 times arg1 w) (* (-> gp-0 value) (-> gp-0 scale))) + (if (not (paused?)) + (set! (-> gp-0 value) (rand-vu-float-range arg3 arg4)) + ) + ) + (none) + ) + +;; definition for function update-mood-pulse +;; WARN: Return type mismatch float vs none. +(defun update-mood-pulse ((arg0 mood-context) (arg1 int) (arg2 int) (arg3 float) (arg4 float) (arg5 float) (arg6 float)) + (let ((gp-0 (the-as pulse-state (+ (+ arg2 1840) (the-as int arg0))))) + (set! (-> arg0 times arg1 w) + (fmin 1.9921875 (* (+ arg3 (* (cos (+ (-> gp-0 pulse) arg6)) arg4)) (-> gp-0 brightness))) + ) + (when (not (paused?)) + (+! (-> gp-0 pulse) arg5) + (seek! (-> gp-0 brightness) (-> gp-0 target-brightness) (* (-> gp-0 speed) (seconds-per-frame))) + ) + ) + (none) + ) + +;; definition for function update-mood-strobe +(defun update-mood-strobe ((arg0 mood-context) (arg1 int) (arg2 int) (arg3 int) (arg4 float)) + (let ((gp-0 (+ (+ arg2 1840) (the-as int arg0)))) + (let ((a2-1 (the int (-> (the-as (pointer float) gp-0))))) + (if (logtest? arg3 (ash 1 a2-1)) + (set! (-> arg0 times arg1 w) 1.0) + (set! (-> arg0 times arg1 w) 0.3) + ) + ) + (when (not (paused?)) + (let ((f0-5 (+ (-> (the-as (pointer float) gp-0)) arg4))) + (set! (-> (the-as (pointer float) gp-0)) (- f0-5 (* (the float (the int (/ f0-5 32.0))) 32.0))) + ) + ) + ) + ) + +;; definition for function update-mood-caustics +(defun update-mood-caustics ((arg0 mood-context) (arg1 int) (arg2 float) (arg3 float) (arg4 float) (arg5 float)) + (let ((f0-2 (sin (+ arg2 arg3)))) + (set! (-> arg0 times arg1 w) (+ arg4 (* f0-2 arg5))) + ) + ) + +;; definition for function overide-mood-fog +;; WARN: Return type mismatch symbol vs none. +(defun overide-mood-fog ((arg0 mood-context) (arg1 float) (arg2 int) (arg3 float)) + 0 + 0 + 0.0 + (let* ((v1-3 (-> *mood-control* mood-interp-table)) + (a0-1 (the int arg1)) + (f0-4 (- arg1 (the float a0-1))) + (f1-3 (- 1.0 f0-4)) + (a1-3 (/ a0-1 24)) + (a0-5 (-> v1-3 hour (- a0-1 (* 24 a1-3)))) + (a1-5 (-> a0-5 snapshot1)) + (v1-4 (-> a0-5 snapshot2)) + (f0-6 (+ (* f1-3 (-> a0-5 morph-start)) (* f0-4 (-> a0-5 morph-end)))) + ) + (if (= a1-5 v1-4) + (mem-copy! (the-as pointer (-> arg0 current-fog)) (the-as pointer (+ (* 48 a1-5) 0 arg2)) 48) + (vector4-array-lerp! + (the-as (inline-array vector4) (-> arg0 current-fog)) + (the-as (inline-array vector4) (+ (* 48 a1-5) 0 arg2)) + (the-as (inline-array vector4) (+ (* 48 v1-4) 0 arg2)) + f0-6 + 3 + ) + ) + ) + (if (!= arg3 0.0) + (vector4-array-lerp! + (the-as (inline-array vector4) (-> arg0 current-fog)) + (the-as (inline-array vector4) (-> arg0 current-fog)) + (the-as (inline-array vector4) (-> *level* level-default mood-context)) + arg3 + 3 + ) + ) + (none) + ) + +;; definition for function overide-mood-color +;; INFO: Used lq/sq +;; WARN: Return type mismatch rgbaf vs none. +(defun overide-mood-color ((arg0 mood-context) (arg1 float) (arg2 int) (arg3 float)) + 0 + 0 + 0.0 + (let* ((v1-3 (-> *mood-control* mood-interp-table)) + (a0-1 (the int arg1)) + (f0-4 (- arg1 (the float a0-1))) + (f1-3 (- 1.0 f0-4)) + (a1-3 (/ a0-1 24)) + (a1-5 (-> v1-3 hour (- a0-1 (* 24 a1-3)))) + (a0-5 (-> a1-5 snapshot1)) + (v1-4 (-> a1-5 snapshot2)) + (f30-0 (+ (* f1-3 (-> a1-5 morph-start)) (* f0-4 (-> a1-5 morph-end)))) + ) + (cond + ((= a0-5 v1-4) + (let ((a0-6 (+ (* a0-5 32) 0 arg2)) + (a1-7 (-> arg0 times)) + (v1-7 (-> arg0 times 1)) + ) + (set! (-> a1-7 0 quad) (-> (the-as (inline-array vector) (+ a0-6 16)) 0 quad)) + (set! (-> v1-7 quad) (-> (the-as (inline-array vector) (+ a0-6 0)) 0 quad)) + (set! (-> arg0 times 2 quad) (-> v1-7 quad)) + (set! (-> arg0 times 3 quad) (-> v1-7 quad)) + (set! (-> arg0 times 4 quad) (-> v1-7 quad)) + ) + ) + (else + (let ((s3-0 (+ (* a0-5 32) 0 arg2)) + (s2-0 (+ (* v1-4 32) 0 arg2)) + (a0-14 (-> arg0 times)) + (s4-0 (-> arg0 times 1)) + ) + (vector4-lerp! (the-as vector a0-14) (the-as vector (+ s3-0 16)) (the-as vector (+ s2-0 16)) f30-0) + (vector4-lerp! s4-0 (the-as vector (+ s3-0 0)) (the-as vector (+ s2-0 0)) f30-0) + (set! (-> arg0 times 2 quad) (-> s4-0 quad)) + (set! (-> arg0 times 3 quad) (-> s4-0 quad)) + (set! (-> arg0 times 4 quad) (-> s4-0 quad)) + ) + ) + ) + ) + (let ((s4-1 (-> arg0 light-group))) + (let ((s3-1 (-> *level* level-default mood-context))) + (if (!= arg3 0.0) + (vector4-array-lerp! + (the-as (inline-array vector4) (-> arg0 times)) + (the-as (inline-array vector4) (-> arg0 times)) + (the-as (inline-array vector4) (-> s3-1 times)) + arg3 + 5 + ) + ) + (dotimes (v1-17 5) + (set! (-> arg0 times v1-17 w) (-> (the-as mood-context (+ (the-as uint s3-1) (* v1-17 16))) times 0 w)) + ) + ) + (set! (-> s4-1 0 ambi color quad) (-> arg0 times 0 quad)) + (set! (-> s4-1 0 dir0 color quad) (-> arg0 times 1 quad)) + (set! (-> s4-1 0 dir1 color quad) (-> arg0 times 2 quad)) + (set! (-> s4-1 0 dir2 color quad) (-> arg0 times 3 quad)) + ) + (none) + ) + +;; definition for method 16 of type mood-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod apply-mood-clouds-and-fog ((this mood-control) (arg0 mood-control-work)) + (let ((v1-0 (-> this mood-fog-table))) + (dotimes (a0-1 24) + (set! (-> v1-0 _data a0-1) (the-as uint128 0)) + ) + ) + (let ((s4-0 (-> this mood-fog-table))) + (let ((f30-0 (- 1.0 (-> arg0 interp cloud)))) + (when (!= f30-0 0.0) + (let ((f0-4 (* (- 1.0 (-> arg0 interp fog)) f30-0)) + (a2-0 (-> this fogs (-> arg0 index 0))) + ) + (if (!= f0-4 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) a2-0) + f0-4 + 24 + ) + ) + ) + (let ((f0-6 (* (-> arg0 interp fog) f30-0)) + (a2-1 (-> this fogs (-> arg0 index 1))) + ) + (if (!= f0-6 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) a2-1) + f0-6 + 24 + ) + ) + ) + ) + ) + (let ((f30-1 (-> arg0 interp cloud))) + (when (!= f30-1 0.0) + (let ((f0-10 (* (- 1.0 (-> arg0 interp fog)) f30-1)) + (a2-2 (-> this fogs (-> arg0 index 2))) + ) + (if (!= f0-10 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) a2-2) + f0-10 + 24 + ) + ) + ) + (let ((f0-12 (* (-> arg0 interp fog) f30-1)) + (a2-3 (-> this fogs (-> arg0 index 3))) + ) + (if (!= f0-12 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) a2-3) + f0-12 + 24 + ) + ) + ) + ) + ) + ) + (let ((f0-13 (-> *time-of-day-context* fog-mult)) + (v1-29 (-> this mood-fog-table)) + ) + (dotimes (a0-6 8) + (set! (-> v1-29 data a0-6 fog-dists y) (* (-> v1-29 data a0-6 fog-dists y) f0-13)) + ) + ) + 0 + (none) + ) + +;; definition for method 17 of type mood-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod apply-mood-fog ((this mood-control) + (arg0 mood-control-work) + (arg1 mood-color-table) + (arg2 mood-color-table) + (arg3 mood-color-table) + (arg4 float) + ) + (let ((v1-0 (-> this mood-fog-table))) + (dotimes (a1-1 24) + (set! (-> v1-0 _data a1-1) (the-as uint128 0)) + ) + ) + (let ((s4-0 (-> this mood-fog-table)) + (f0-1 (fmax 0.0 (fmin 1.0 (* 5.0 (- 0.2 arg4))))) + (f30-0 (if (>= 0.2 arg4) + (fmax 0.0 (fmin 1.0 (* 5.0 arg4))) + (- 1.0 (fmax 0.0 (fmin 1.0 (* 1.25 (+ -0.2 arg4))))) + ) + ) + (f28-0 (fmax 0.0 (fmin 1.0 (* 1.25 (+ -0.2 arg4))))) + ) + (if (!= f0-1 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) arg1) + f0-1 + 24 + ) + ) + (if (!= f30-0 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) arg2) + f30-0 + 24 + ) + ) + (if (!= f28-0 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) arg3) + f28-0 + 24 + ) + ) + ) + 0 + (none) + ) + +;; definition for method 18 of type mood-control +;; WARN: Return type mismatch int vs none. +(defmethod apply-fog-height ((this mood-control) (arg0 mood-control-work) (arg1 float) (arg2 float) (arg3 float) (arg4 float)) + (cond + ((= arg4 0.2) + (set-fog-height! arg2) + ) + ((< arg4 0.2) + (set-fog-height! (lerp arg1 arg2 (* 5.0 arg4))) + ) + (else + (set-fog-height! (lerp arg2 arg3 (* 1.25 (+ -0.2 arg4)))) + ) + ) + 0 + (none) + ) + +;; definition for method 19 of type mood-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod apply-mood-colors ((this mood-control) (arg0 mood-control-work)) + (let ((v1-0 (-> this mood-color-table))) + (dotimes (a0-1 16) + (set! (-> v1-0 _data a0-1) (the-as uint128 0)) + ) + ) + (let ((s4-0 (-> this mood-color-table))) + (let ((f0-1 (- 1.0 (-> arg0 color-interp))) + (a2-0 (-> this colors (-> arg0 color-index 0))) + ) + (if (!= f0-1 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) a2-0) + f0-1 + 16 + ) + ) + ) + (let ((f0-2 (-> arg0 color-interp)) + (a2-1 (-> this colors (-> arg0 color-index 1))) + ) + (if (!= f0-2 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) a2-1) + f0-2 + 16 + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 20 of type mood-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod mood-control-method-20 ((this mood-control) + (arg0 mood-control-work) + (arg1 mood-color-table) + (arg2 mood-color-table) + (arg3 mood-color-table) + (arg4 float) + ) + (let ((v1-0 (-> this mood-color-table))) + (dotimes (a1-1 16) + (set! (-> v1-0 _data a1-1) (the-as uint128 0)) + ) + ) + (let ((s4-0 (-> this mood-color-table)) + (f0-1 (fmax 0.0 (fmin 1.0 (* 5.0 (- 0.2 arg4))))) + (f30-0 (if (>= 0.2 arg4) + (fmax 0.0 (fmin 1.0 (* 5.0 arg4))) + (- 1.0 (fmax 0.0 (fmin 1.0 (* 1.25 (+ -0.2 arg4))))) + ) + ) + (f28-0 (fmax 0.0 (fmin 1.0 (* 1.25 (+ -0.2 arg4))))) + ) + (if (!= f0-1 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) arg1) + f0-1 + 16 + ) + ) + (if (!= f30-0 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) arg2) + f30-0 + 16 + ) + ) + (if (!= f28-0 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) arg3) + f28-0 + 16 + ) + ) + ) + 0 + (none) + ) + +;; definition for method 21 of type mood-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod apply-mood-channels ((this mood-control) (arg0 mood-control-work)) + (let ((v1-0 (-> this mood-channel-group))) + (dotimes (a0-1 24) + (set! (-> v1-0 data 0 vecs a0-1 quad) (the-as uint128 0)) + ) + ) + (let ((s4-0 (-> this mood-channel-group))) + (let ((f0-1 (- 1.0 (-> arg0 channel-interp))) + (a2-0 (-> this channels (-> arg0 channel-index 0))) + ) + (if (!= f0-1 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) a2-0) + f0-1 + 24 + ) + ) + ) + (let ((f0-2 (-> arg0 channel-interp)) + (a2-1 (-> this channels (-> arg0 channel-index 1))) + ) + (if (!= f0-2 0.0) + (vector4-array-madd! + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) s4-0) + (the-as (inline-array vector4) a2-1) + f0-2 + 24 + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 22 of type mood-control +;; WARN: Return type mismatch int vs none. +(defmethod adjust-num-clouds ((this mood-control) (arg0 mood-control-work)) + (let ((v1-0 (-> this mood-clouds))) + (set! (-> v1-0 cloud-min) 0.0) + (set! (-> v1-0 cloud-max) 0.0) + (let ((f0-3 (- 1.0 (-> arg0 cloud-interp))) + (a2-4 (-> this clouds (-> arg0 cloud-index 0))) + ) + (when (!= f0-3 0.0) + (set! (-> v1-0 cloud-min) (* (-> a2-4 cloud-min) f0-3)) + (set! (-> v1-0 cloud-max) (* (-> a2-4 cloud-max) f0-3)) + ) + ) + (let ((f0-5 (-> arg0 cloud-interp)) + (a0-2 (-> this clouds (-> arg0 cloud-index 1))) + ) + (when (!= f0-5 0.0) + (+! (-> v1-0 cloud-min) (* (-> a0-2 cloud-min) f0-5)) + (+! (-> v1-0 cloud-max) (* (-> a0-2 cloud-max) f0-5)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 24 of type mood-control +;; WARN: Return type mismatch int vs none. +(defmethod play-or-stop-lightning-sfx! ((this mood-control) (arg0 sound-spec) (arg1 vector)) + (vector+! (new 'stack-no-clear 'vector) arg1 (math-camera-pos)) + (cond + ((or (load-in-progress? *level*) (movie?)) + (when (nonzero? (-> this lightning-id)) + (sound-stop (-> this lightning-id)) + (set! (-> this lightning-id) (new 'static 'sound-id)) + 0 + ) + ) + (else + (when (nonzero? (-> this lightning-id)) + (sound-stop (-> this lightning-id)) + (set! (-> this lightning-id) (new 'static 'sound-id)) + 0 + ) + (set! (-> this lightning-id) (sound-play-by-spec arg0 (new-sound-id) arg1)) + ) + ) + (none) + ) + +;; definition for method 23 of type mood-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod gen-lightning-and-thunder! ((this mood-control) (arg0 int)) + (local-vars (a1-2 (array float))) + (let ((v1-3 (-> this mood-channel-group data (-> this lightning-index))) + (a1-1 (-> this lightning-val)) + (a0-4 (/ (-> this lightning-time) 2)) + (f0-0 (-> this lightning-time2)) + ) + (set! (-> this lightning-flash) 0.0) + (cond + ((>= 0.0 f0-0) + (cond + ((zero? a1-1) + (set! a1-2 *flash0*) + ) + ((= a1-1 1) + (set! a1-2 *flash1*) + ) + ((= a1-1 2) + (set! a1-2 *flash2*) + ) + ((= a1-1 3) + (set! a1-2 *flash3*) + ) + ((= a1-1 4) + (set! a1-2 *flash4*) + ) + ((= a1-1 5) + (set! a1-2 *flash5*) + ) + ((= a1-1 6) + (set! a1-2 *flash6*) + ) + (else + (set! a1-2 *flash7*) + ) + ) + (cond + ((< a0-4 (-> a1-2 length)) + (let ((f30-0 (-> a1-2 a0-4)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (cond + ((= (-> this lightning-index) 4) + (set! (-> this lightning-flash) f30-0) + ) + ((= (-> this lightning-index) 5) + (set! (-> this lightning-flash) f30-0) + (dotimes (s4-0 8) + (set-vector! s5-0 255.0 255.0 255.0 128.0) + (vector4-lerp! + (the-as vector (-> this mood-fog-table data s4-0)) + (the-as vector (-> this mood-fog-table data s4-0)) + s5-0 + f30-0 + ) + ) + ) + (else + (set! (-> this lightning-flash) (* 1.9921875 f30-0)) + (let ((a0-17 (-> v1-3 data))) + (set! (-> a0-17 0) 1.0) + (set! (-> a0-17 1) 1.0) + (set! (-> a0-17 2) 1.0) + (set! (-> a0-17 3) 1.0) + ) + (set! (-> (the-as vector (&-> v1-3 data 4)) quad) (-> (the-as vector (-> v1-3 data)) quad)) + (set! (-> (the-as vector (&-> v1-3 data 8)) quad) (-> (the-as vector (-> v1-3 data)) quad)) + (set! (-> (the-as vector (&-> v1-3 data 12)) quad) (-> (the-as vector (-> v1-3 data)) quad)) + (set! (-> (the-as vector (&-> v1-3 data 16)) quad) (-> (the-as vector (-> v1-3 data)) quad)) + (set! (-> (the-as vector (&-> v1-3 data 20)) quad) (-> (the-as vector (-> v1-3 data)) quad)) + ) + ) + ) + (if (not (paused?)) + (+! (-> this lightning-time) 1) + ) + ) + (else + (level-get-target-inside *level*) + (cond + ((!= (-> this lightning-time3) 0.0) + (set! (-> this lightning-time2) (-> this lightning-time3)) + (set! (-> this lightning-time3) 0.0) + ) + (else + (set! (-> this lightning-time2) (rand-vu-float-range 5.0 10.0)) + ) + ) + ) + ) + ) + (else + (when (not (paused?)) + (set! (-> this lightning-time2) (- (-> this lightning-time2) (seconds-per-frame))) + (when (>= 0.0 (-> this lightning-time2)) + (when (= (-> this lightning-time3) 0.0) + (set! (-> this lightning-index) (mod (the-as int (rand-uint31-gen *random-generator*)) 6)) + (set! (-> this lightning-val) (the-as int (logand (rand-uint31-gen *random-generator*) 7))) + ) + (set! (-> this lightning-time) 0) + (cond + ((zero? (-> this lightning-index)) + (play-or-stop-lightning-sfx! + this + (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 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 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 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 0) + (new 'static 'vector :y 40960000.0) + ) + ) + ((= (-> this lightning-index) 5) + (play-or-stop-lightning-sfx! + this + (static-sound-spec "thunder-a" :group 0) + (new 'static 'vector :y 40960000.0) + ) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 15 of type mood-control +;; WARN: Return type mismatch int vs none. +(defmethod set-lightning-time! ((this mood-control) (arg0 int) (arg1 int) (arg2 float)) + (set! (-> this lightning-index) arg0) + (set! (-> this lightning-val) arg1) + (set! (-> this lightning-time2) (seconds-per-frame)) + (set! (-> this lightning-time3) arg2) + 0 + (none) + ) + +;; definition for method 9 of type mood-control +;; WARN: Return type mismatch int vs none. +(defmethod init-weather! ((this mood-control)) + (local-vars (v1-32 int) (a1-12 object)) + (let ((s5-0 (level-get-target-inside *level*))) + (when s5-0 + (set! (-> this mood-direction-table) *mood-direction-table*) + (let ((s4-0 (new 'stack-no-clear 'mood-control-work))) + (let ((s3-0 this)) + (cond + ((and (-> s3-0 overide-weather-flag) (not (movie?)) (= (-> s3-0 current-special-interp) 0.0)) + (set! (-> s4-0 weather cloud) (* 2.0 (fmax 0.0 (fmin 1.0 (-> this overide cloud))))) + (set! (-> s4-0 weather fog) (* 2.0 (-> this overide fog))) + ) + (else + (set! (-> s4-0 weather cloud) (* 2.0 (fmax 0.0 (fmin 1.0 (-> this current-interp cloud))))) + (set! (-> s4-0 weather fog) (* 2.0 (fmax 0.0 (fmin 1.0 (-> this current-interp fog))))) + ) + ) + ) + (set! (-> s4-0 iweather cloud) (the int (-> s4-0 weather cloud))) + (let ((f0-12 (- (-> s4-0 weather cloud) (the float (-> s4-0 iweather cloud))))) + (cond + ((zero? (-> s4-0 iweather cloud)) + (if (< f0-12 0.5) + (set! (-> s4-0 interp cloud) 0.0) + (set! (-> s4-0 interp cloud) (* 2.0 (+ -0.5 f0-12))) + ) + ) + (else + (set! (-> s4-0 interp cloud) f0-12) + ) + ) + ) + (set! (-> s4-0 iweather fog) (the int (-> s4-0 weather fog))) + (set! (-> s4-0 interp fog) (- (-> s4-0 weather fog) (the float (-> s4-0 iweather fog)))) + (let ((a0-2 (-> s4-0 iweather fog)) + (v1-23 (-> s4-0 iweather cloud)) + ) + (set! (-> s4-0 index 0) (+ (* 3 v1-23) a0-2)) + (set! (-> s4-0 index 1) (+ a0-2 1 (* 3 v1-23))) + (set! (-> s4-0 index 2) (+ (* 3 (+ v1-23 1)) a0-2)) + (set! (-> s4-0 index 3) (+ a0-2 1 (* 3 (+ v1-23 1)))) + ) + (let ((v1-27 (-> s4-0 iweather cloud))) + (set! (-> s4-0 color-interp) (-> s4-0 interp cloud)) + (set! (-> s4-0 color-index 0) v1-27) + (set! (-> s4-0 color-index 1) (+ v1-27 1)) + ) + 0 + (let ((f0-22 (- (-> s4-0 weather cloud) (the float (-> s4-0 iweather cloud))))) + (cond + ((zero? (-> s4-0 iweather cloud)) + (set! (-> s4-0 channel-interp) 0.0) + (set! v1-32 0) + ) + ((= (-> s4-0 iweather cloud) 2) + (set! (-> s4-0 channel-interp) 0.0) + (set! v1-32 2) + ) + ((< f0-22 0.5) + (set! (-> s4-0 channel-interp) (* 2.0 f0-22)) + (set! v1-32 0) + ) + (else + (set! (-> s4-0 channel-interp) (* 2.0 (+ -0.5 f0-22))) + (set! v1-32 1) + ) + ) + ) + (set! (-> s4-0 channel-index 0) v1-32) + (set! (-> s4-0 channel-index 1) (+ v1-32 1)) + (let* ((s3-1 this) + (f0-33 (if (and (-> s3-1 overide-weather-flag) (and (not (movie?)) (= (-> s3-1 current-special-interp) 0.0))) + (* 8.0 (-> this overide cloud)) + (* 8.0 (fmax 0.0 (fmin 1.0 (-> this current-interp cloud)))) + ) + ) + (v1-45 (the int f0-33)) + ) + (set! (-> s4-0 cloud-interp) (- f0-33 (the float v1-45))) + (set! (-> s4-0 cloud-index 0) v1-45) + (set! (-> s4-0 cloud-index 1) (+ v1-45 1)) + ) + (cond + ((= (-> *time-of-day-context* special-mood) 'desert) + (apply-mood-fog + this + s4-0 + (the-as mood-color-table *desert-mood-fog-table*) + (the-as mood-color-table *sandstorm-start-mood-fog-table*) + (the-as mood-color-table *sandstorm-end-mood-fog-table*) + (-> this current-special-interp) + ) + (mood-control-method-20 + this + s4-0 + *desert-mood-color-table* + *sandstorm-start-mood-color-table* + *sandstorm-end-mood-color-table* + (-> this current-special-interp) + ) + (apply-fog-height this s4-0 327680.0 614400.0 4096000.0 (-> this current-special-interp)) + (set! a1-12 s4-0) + (adjust-num-clouds this (the-as mood-control-work a1-12)) + ) + (else + (apply-mood-clouds-and-fog this s4-0) + (apply-mood-colors this s4-0) + (apply-mood-channels this s4-0) + (set! a1-12 s4-0) + (adjust-num-clouds this (the-as mood-control-work a1-12)) + ) + ) + ) + (when (not (or (paused?) (let ((s4-1 this)) + (and (-> s4-1 overide-weather-flag) (not (movie?)) (= (-> s4-1 current-special-interp) 0.0)) + ) + ) + ) + (when (!= (-> this time-until-random cloud) -99.0) + (set! (-> this target-interp cloud) + (fmax (fmin (-> this target-interp cloud) (-> this range max-cloud)) (-> this range min-cloud)) + ) + (let ((t9-13 seek) + (a0-19 (-> this current-interp cloud)) + ) + (set! a1-12 (-> this target-interp cloud)) + (set! (-> this current-interp cloud) + (t9-13 a0-19 (the-as float a1-12) (* (/ 1.0 (-> this speed-interp cloud)) (seconds-per-frame))) + ) + ) + ) + (when (!= (-> this time-until-random fog) -99.0) + (set! (-> this target-interp fog) + (fmax (fmin (-> this target-interp fog) (-> this range max-fog)) (-> this range min-fog)) + ) + (let ((t9-14 seek) + (a0-20 (-> this current-interp fog)) + ) + (set! a1-12 (-> this target-interp fog)) + (set! (-> this current-interp fog) + (t9-14 a0-20 (the-as float a1-12) (* (/ 1.0 (-> this speed-interp fog)) (seconds-per-frame))) + ) + ) + ) + (when (!= (-> this time-until-random cloud) -99.0) + (set! (-> this time-until-random cloud) (- (-> this time-until-random cloud) (* 300.0 (seconds-per-frame)))) + (when (< (-> this time-until-random cloud) 0.0) + (set! (-> this time-until-random cloud) + (rand-vu-float-range (-> this time-until-random-min cloud) (-> this time-until-random-max cloud)) + ) + (let ((f30-0 (rand-vu-float-range (-> this range min-cloud) (-> this range max-cloud))) + (f28-0 (rand-vu-float-range (-> this range min-cloud) (-> this range max-cloud))) + (f26-0 (rand-vu-float-range (-> this range min-cloud) (-> this range max-cloud))) + (f24-0 (rand-vu-float-range (-> this range min-cloud) (-> this range max-cloud))) + (f2-11 (rand-vu-float-range (-> this range min-cloud) (-> this range max-cloud))) + ) + (set! (-> this target-interp cloud) (fmax 0.0 (+ -0.25 (* 0.25 (+ f30-0 f28-0 f26-0 f24-0 f2-11))))) + ) + (let ((t9-21 rand-vu-float-range) + (a0-27 30.0) + ) + (set! a1-12 120.0) + (set! (-> this speed-interp cloud) (t9-21 a0-27 (the-as float a1-12))) + ) + (when (and (< 0.0 (-> *setting-control* user-current rain)) + (< (-> this target-interp cloud) 0.5) + (< 0.25 (-> this target-interp cloud)) + (or (< (-> this target-interp fog) 0.25) (< 0.75 (-> this target-interp fog))) + ) + (set! (-> this speed-interp fog) (fabs (/ (* 1.25 (-> this current-interp fog) (-> this speed-interp cloud)) + (+ -0.75 (-> this current-interp cloud)) + ) + ) + ) + (set! (-> this target-interp fog) 0.5) + (set! (-> this time-until-random fog) (-> this time-until-random cloud)) + ) + ) + ) + (when (!= (-> this time-until-random fog) -99.0) + (set! (-> this time-until-random fog) (- (-> this time-until-random fog) (* 300.0 (seconds-per-frame)))) + (when (< (-> this time-until-random fog) 0.0) + (set! (-> this time-until-random fog) + (rand-vu-float-range (-> this time-until-random-min fog) (-> this time-until-random-max fog)) + ) + (let ((f30-1 (rand-vu-float-range (-> this range min-fog) (-> this range max-fog))) + (f28-1 (rand-vu-float-range (-> this range min-fog) (-> this range max-fog))) + (f26-1 (rand-vu-float-range (-> this range min-fog) (-> this range max-fog))) + (f24-1 (rand-vu-float-range (-> this range min-fog) (-> this range max-fog))) + (f0-108 (rand-vu-float-range (-> this range min-fog) (-> this range max-fog))) + ) + (set! (-> this target-interp fog) (* 0.2 (+ f30-1 f28-1 f26-1 f24-1 f0-108))) + ) + (let ((t9-28 rand-vu-float-range) + (a0-34 30.0) + ) + (set! a1-12 120.0) + (set! (-> this speed-interp fog) (t9-28 a0-34 (the-as float a1-12))) + ) + ) + ) + ) + (when (logtest? (game-secrets bad-weather) (-> *game-info* secrets)) + (set! (-> this current-interp cloud) 1.0) + (set! (-> this current-interp fog) 1.0) + ) + (let* ((s4-2 this) + (f30-2 (if (and (-> s4-2 overide-weather-flag) (and (not (movie?)) (= (-> s4-2 current-special-interp) 0.0))) + (-> this overide cloud) + (-> this current-interp cloud) + ) + ) + (s4-3 this) + (f26-2 (if (and (-> s4-3 overide-weather-flag) (and (not (movie?)) (= (-> s4-3 current-special-interp) 0.0))) + (-> this overide fog) + (-> this current-interp fog) + ) + ) + (f28-2 (fmin (-> s5-0 info max-rain) (-> *time-of-day-context* max-rain))) + ) + (set! (-> this sound-pitch) (* 1.442695 (logf (-> *display* bg-clock clock-ratio)))) + (let* ((f0-125 (fmax 0.0 (fmin (* 4.0 (fmax 0.0 (+ -0.5 f26-2)) (fmax 0.0 (+ -0.5 f30-2))) f28-2))) + (f30-3 (fmin 0.75 f0-125)) + ) + (set! (-> *setting-control* user-default rain) f30-3) + (level-get-target-inside *level*) + (cond + ((and (< 0.0 (-> *setting-control* user-current rain)) (!= *master-mode* 'progress)) + (gen-lightning-and-thunder! this (the-as int a1-12)) + (cond + ((zero? (-> this rain-id)) + (set! (-> this rain-id) (sound-play-by-name + (static-sound-name "rain-hiss") + (new-sound-id) + (the int (* 1024.0 f30-3)) + (the int (* 1524.0 (-> this sound-pitch))) + 0 + (sound-group) + #t + ) + ) + ) + (else + (when *sound-player-enable* + (let ((v1-146 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-146 command) (sound-command set-param)) + (set! (-> v1-146 id) (-> this rain-id)) + (set! (-> v1-146 params volume) (the int (* 1024.0 f30-3))) + (set! (-> v1-146 params pitch-mod) (the int (* 1524.0 (-> this sound-pitch)))) + (set! (-> v1-146 params mask) (the-as uint 3)) + (-> v1-146 id) + ) + ) + ) + ) + ) + (else + (set! (-> this lightning-flash) 0.0) + (when (nonzero? (-> this rain-id)) + (sound-stop (-> this rain-id)) + (set! (-> this rain-id) (new 'static 'sound-id)) + 0 + ) + ) + ) + ) + ) + (if (and (not (paused?)) (not (-> *game-info* dust-storm))) + (seek! + (-> this current-special-interp) + (-> this target-special-interp) + (* (-> this rate-special-interp) (seconds-per-frame)) + ) + ) + (when (-> this display-flag) + (let ((s5-2 this)) + (cond + ((and (-> s5-2 overide-weather-flag) (not (movie?)) (= (-> s5-2 current-special-interp) 0.0)) + (format *stdcon* "overide cloud ~f~%" (-> this overide cloud)) + (format *stdcon* "overide fog ~f~%" (-> this overide fog)) + ) + (else + (format *stdcon* "time until random cloud ~f~%" (* 0.0033333334 (-> this time-until-random cloud))) + (format *stdcon* "current cloud ~f~%" (-> this current-interp cloud)) + (format *stdcon* "target cloud ~f~%" (-> this target-interp cloud)) + (format *stdcon* "speed cloud ~f~%" (* (/ 1.0 (-> this speed-interp cloud)) (seconds-per-frame))) + (format *stdcon* "time until random fog ~f~%" (* 0.0033333334 (-> this time-until-random fog))) + (format *stdcon* "current fog ~f~%" (-> this current-interp fog)) + (format *stdcon* "target fog ~f~%" (-> this target-interp fog)) + (format *stdcon* "speed fog ~f~%" (* (/ 1.0 (-> this speed-interp fog)) (seconds-per-frame))) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type mood-control +;; WARN: Return type mismatch int vs none. +(defmethod set-cloud-and-fog-interp! ((this mood-control) (arg0 float) (arg1 float) (arg2 float) (arg3 float)) + (set! (-> this target-interp cloud) arg0) + (set! (-> this target-interp fog) arg1) + (set! (-> this speed-interp cloud) arg2) + (set! (-> this speed-interp fog) arg3) + (if (= arg2 0.0) + (set! (-> this current-interp cloud) arg0) + ) + (if (= arg3 0.0) + (set! (-> this current-interp fog) arg1) + ) + 0 + (none) + ) + +;; definition for method 11 of type mood-control +;; WARN: Return type mismatch int vs none. +(defmethod update-mood-range! ((this mood-control) (arg0 float) (arg1 float) (arg2 float) (arg3 float)) + (set! (-> this range min-cloud) arg0) + (set! (-> this range max-cloud) arg1) + (set! (-> this range min-fog) arg2) + (set! (-> this range max-fog) arg3) + 0 + (none) + ) + +;; definition for method 12 of type mood-control +;; WARN: Return type mismatch int vs none. +(defmethod set-time-for-random-weather! ((this mood-control) (arg0 float) (arg1 float)) + (set! (-> this time-until-random cloud) arg0) + (set! (-> this time-until-random fog) arg1) + 0 + (none) + ) diff --git a/test/decompiler/reference/jak3/engine/gfx/mood/time-of-day-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/mood/time-of-day-h_REF.gc index e87de78803..959c3b2c85 100644 --- a/test/decompiler/reference/jak3/engine/gfx/mood/time-of-day-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/mood/time-of-day-h_REF.gc @@ -76,8 +76,8 @@ and the code in mood.gc, which set the actual fade values for time-of-day." (moon-count int32) (moon sparticle-launch-control) (day-star-count int32) - (day-star basic) - (day-star-enable basic) + (day-star sparticle-launch-control) + (day-star-enable symbol) (start-timer int32) ) ) @@ -251,7 +251,3 @@ blend between them." ;; failed to figure out what this is: 0 - - - - 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 5619a240ab..957ce2ef9b 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) @@ -895,87 +895,87 @@ (wait-to-vu0 uint32) ) (:methods - (ocean-method-11 () none) - (ocean-method-12 () none) - (ocean-method-13 () 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) + (get-height (_type_ vector symbol) float) + (draw! (_type_) none) + (update-map (_type_) 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) ) ) @@ -1344,7 +1344,3 @@ ;; failed to figure out what this is: 0 - - - - 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 0000000000..0010123b1f --- /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 0000000000..555be41bbb --- /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 0000000000..8fff2a54a6 --- /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 0000000000..66b1bc980a --- /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 0000000000..afdab42fb3 --- /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 0000000000..e985ec7028 --- /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/shrub/shrub-work_REF.gc b/test/decompiler/reference/jak3/engine/gfx/shrub/shrub-work_REF.gc new file mode 100644 index 0000000000..2c932ddc51 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/shrub/shrub-work_REF.gc @@ -0,0 +1,323 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *instance-shrub-work*, type instance-shrub-work +(define *instance-shrub-work* + (new 'static 'instance-shrub-work + :matrix-tmpl (new 'static 'inline-array qword 20 + (new 'static 'qword :data (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c050143)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050148)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05014d)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050152)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050157)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05015c)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050161)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050166)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05016b)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c050170)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c050176)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05017b)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050180)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050185)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05018a)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05018f)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050194)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c050199)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x20000005 #x0 #x0 #x6c05019e)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x10000005 #x0 #x0 #x6c0501a3)) + ) + :count-tmpl (new 'static 'inline-array vector4w 20 + (new 'static 'vector4w :x #x20000000 :z #x60010175 :w 10) + (new 'static 'vector4w :x #x20000000 :z #x60010142 :w 1) + (new 'static 'vector4w :x #x20000000 :z #x60010142 :w 2) + (new 'static 'vector4w :x #x20000000 :z #x60010142 :w 3) + (new 'static 'vector4w :x #x20000000 :z #x60010142 :w 4) + (new 'static 'vector4w :x #x20000000 :z #x60010142 :w 5) + (new 'static 'vector4w :x #x20000000 :z #x60010142 :w 6) + (new 'static 'vector4w :x #x20000000 :z #x60010142 :w 7) + (new 'static 'vector4w :x #x20000000 :z #x60010142 :w 8) + (new 'static 'vector4w :x #x20000000 :z #x60010142 :w 9) + (new 'static 'vector4w :x #x20000000 :z #x60010142 :w 10) + (new 'static 'vector4w :x #x20000000 :z #x60010175 :w 1) + (new 'static 'vector4w :x #x20000000 :z #x60010175 :w 2) + (new 'static 'vector4w :x #x20000000 :z #x60010175 :w 3) + (new 'static 'vector4w :x #x20000000 :z #x60010175 :w 4) + (new 'static 'vector4w :x #x20000000 :z #x60010175 :w 5) + (new 'static 'vector4w :x #x20000000 :z #x60010175 :w 6) + (new 'static 'vector4w :x #x20000000 :z #x60010175 :w 7) + (new 'static 'vector4w :x #x20000000 :z #x60010175 :w 8) + (new 'static 'vector4w :x #x20000000 :z #x60010175 :w 9) + ) + :mscalf-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1) + ) + :mscalf-ret-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ret)) + :vif0 (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1) + ) + :adgif-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id next)) + :vif1 (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x1000000000008005 #xe) + ) + :billboard-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #xd :id (dma-tag-id next)) + :vif1 (new 'static 'vif-tag :imm #xd :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x303e400000008004 #x412) + ) + :shrub-near-packets (new 'static 'inline-array shrub-near-packet 6 + (new 'static 'shrub-near-packet + :matrix-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x9 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x400a :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #xb :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data (new 'static 'inline-array qword 2 + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x345 #x117)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c)) + ) + ) + (new 'static 'shrub-near-packet + :matrix-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x120 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x4121 :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x122 :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data (new 'static 'inline-array qword 2 + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x363 #x22e)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c)) + ) + ) + (new 'static 'shrub-near-packet + :matrix-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x237 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x4238 :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x239 :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data (new 'static 'inline-array qword 2 + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x345 #x0)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c)) + ) + ) + (new 'static 'shrub-near-packet + :matrix-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x9 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x400a :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #xb :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data (new 'static 'inline-array qword 2 + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x363 #x117)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c)) + ) + ) + (new 'static 'shrub-near-packet + :matrix-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x345 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x34c :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x120 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x4121 :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x122 :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data (new 'static 'inline-array qword 2 + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x345 #x22e)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c)) + ) + ) + (new 'static 'shrub-near-packet + :matrix-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x363 :num #x6 :cmd (vif-cmd unpack-v4-32)) + ) + :header-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x36a :cmd (vif-cmd unpack-v4-32)) + ) + :stq-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif0 (new 'static 'vif-tag :imm #x103 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x237 :cmd (vif-cmd unpack-v2-16)) + ) + :color-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x4238 :cmd (vif-cmd unpack-v3-8)) + ) + :vertex-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id ref)) + :vif1 (new 'static 'vif-tag :imm #x239 :cmd (vif-cmd unpack-v3-16)) + ) + :mscal-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd mscal) :msk #x1) + ) + :init-tmpl (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id next)) + :vif0 (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) + :vif1 (new 'static 'vif-tag :imm #x388 :num #x1 :cmd (vif-cmd unpack-v4-32)) + ) + :init-data (new 'static 'inline-array qword 2 + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x363 #x0)) + (new 'static 'qword :data (new 'static 'array uint32 4 #x0 #x0 #x0 #x1500000c)) + ) + ) + ) + :dma-ref (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref))) + :dma-end (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id end))) + :wind-const (new 'static 'vector :x 0.5 :y 100.0 :z 0.0166 :w -1.0) + :constants (new 'static 'vector :x 128.0 :y 1.0) + :color-constant (new 'static 'vector4w :x #x47000000 :y #x47000000 :z #x47000000) + :start-bank (new 'static 'array uint8 20 #x0 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x1 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0 #x0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *instance-shrub-work* mscalf-tmpl vif0 imm) 103) + +;; failed to figure out what this is: +(set! (-> *instance-shrub-work* mscalf-ret-tmpl vif0 imm) 103) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/shrub/shrubbery-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/shrub/shrubbery-h_REF.gc index d7c615c679..5207f8aa4e 100644 --- a/test/decompiler/reference/jak3/engine/gfx/shrub/shrubbery-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/shrub/shrubbery-h_REF.gc @@ -278,7 +278,7 @@ This requires storing the data for all shrubs prototype twice!" (vertex-tmpl dma-packet :inline) (mscal-tmpl dma-packet :inline) (init-tmpl dma-packet :inline) - (init-data qword 8) + (init-data qword 2 :inline) ) ) diff --git a/test/decompiler/reference/jak3/engine/gfx/shrub/shrubbery_REF.gc b/test/decompiler/reference/jak3/engine/gfx/shrub/shrubbery_REF.gc new file mode 100644 index 0000000000..7f732a746a --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/shrub/shrubbery_REF.gc @@ -0,0 +1,1209 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 9 of type billboard +(defmethod login ((this billboard)) + "Initialize the object after it is loaded." + (adgif-shader-login (-> this flat)) + this + ) + +;; definition for method 8 of type billboard +(defmethod mem-usage ((this billboard) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 34 (-> usage length))) + (set! (-> usage data 33 name) "billboard") + (+! (-> usage data 33 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 33 used) v1-6) + (+! (-> usage data 33 total) (logand -16 (+ v1-6 15))) + ) + this + ) + +;; definition for function mem-usage-shrub-walk +(defun mem-usage-shrub-walk ((arg0 draw-node) (arg1 int) (arg2 memory-usage-block) (arg3 int)) + "Walk the shrub tree and compute memory usagbe for draw nodes and shrub instances." + (set! (-> arg2 length) (max 65 (-> arg2 length))) + (set! (-> arg2 data 64 name) "draw-node") + (+! (-> arg2 data 64 count) arg1) + (let ((v1-5 (* arg1 32))) + (+! (-> arg2 data 64 used) v1-5) + (+! (-> arg2 data 64 total) (logand -16 (+ v1-5 15))) + ) + (let ((s2-0 arg0)) + (dotimes (s1-0 arg1) + (let ((a1-2 (-> s2-0 child-count))) + (cond + ((logtest? (-> s2-0 flags) 1) + (mem-usage-shrub-walk (the-as draw-node (-> s2-0 child)) (the-as int a1-2) arg2 arg3) + ) + (else + (set! (-> arg2 length) (max 35 (-> arg2 length))) + (set! (-> arg2 data 34 name) "instance-shrubbery") + (+! (-> arg2 data 34 count) a1-2) + (let ((v1-18 (* (the-as uint 80) a1-2))) + (+! (-> arg2 data 34 used) v1-18) + (+! (-> arg2 data 34 total) (logand -16 (+ v1-18 15))) + ) + ) + ) + ) + (&+! s2-0 32) + ) + ) + arg0 + ) + +;; definition for method 8 of type drawable-tree-instance-shrub +(defmethod mem-usage ((this drawable-tree-instance-shrub) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-5 32)) + (+! (-> usage data 0 used) v1-5) + (+! (-> usage data 0 total) (logand -16 (+ v1-5 15))) + ) + (when (nonzero? (-> this colors-added)) + (set! (-> usage length) (max 33 (-> usage length))) + (set! (-> usage data 32 name) "shrubbery-pal") + (+! (-> usage data 32 count) 1) + (let ((v1-17 (asize-of (-> this colors-added)))) + (+! (-> usage data 32 used) v1-17) + (+! (-> usage data 32 total) (logand -16 (+ v1-17 15))) + ) + ) + (mem-usage-shrub-walk + (the-as draw-node (&+ (-> this data 0) 32)) + (-> (the-as drawable-group (-> this data 0)) length) + usage + flags + ) + (mem-usage (-> this info prototype-inline-array-shrub) usage (logior flags 1)) + this + ) + +;; definition for method 9 of type generic-shrub-fragment +(defmethod login ((this generic-shrub-fragment)) + "Initialize the object after it is loaded." + (let ((s5-0 (/ (-> this cnt-qwc) (the-as uint 5)))) + (dotimes (s4-0 (the-as int s5-0)) + (adgif-shader-login-no-remap (-> this textures s4-0)) + ) + ) + this + ) + +;; definition for method 8 of type generic-shrub-fragment +(defmethod mem-usage ((this generic-shrub-fragment) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 27 (-> usage length))) + (set! (-> usage data 25 name) "generic-shrub") + (+! (-> usage data 25 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 25 used) v1-6) + (+! (-> usage data 25 total) (logand -16 (+ v1-6 15))) + ) + (set! (-> usage data 26 name) "generic-shrub-data") + (+! (-> usage data 26 count) 1) + (let ((v1-17 (* (+ (-> this cnt-qwc) (-> this vtx-qwc) (-> this col-qwc) (-> this stq-qwc)) 16))) + (+! (-> usage data 26 used) v1-17) + (+! (-> usage data 26 total) (logand -16 (+ v1-17 15))) + ) + this + ) + +;; definition for method 3 of type prototype-shrubbery +(defmethod inspect ((this prototype-shrubbery)) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~Tlength: ~D~%" (-> this length)) + (format #t "~Tdata[~D]: @ #x~X~%" (-> this length) (-> this data)) + (dotimes (s5-0 (-> this length)) + (format #t "~T [~D] ~A~%" s5-0 (-> this data s5-0)) + ) + this + ) + +;; definition for method 8 of type prototype-shrubbery +(defmethod mem-usage ((this prototype-shrubbery) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-5 32)) + (+! (-> usage data 0 used) v1-5) + (+! (-> usage data 0 total) (logand -16 (+ v1-5 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this data s3-0) usage flags) + ) + this + ) + +;; definition for method 9 of type prototype-shrubbery +(defmethod login ((this prototype-shrubbery)) + "Initialize the object after it is loaded." + (dotimes (s5-0 (-> this length)) + (login (-> this data s5-0)) + ) + this + ) + +;; definition for method 5 of type prototype-shrubbery +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this prototype-shrubbery)) + (the-as int (+ (-> prototype-shrubbery size) (* (+ (-> this length) -1) 32))) + ) + +;; definition for method 9 of type prototype-generic-shrub +(defmethod login ((this prototype-generic-shrub)) + "Initialize the object after it is loaded." + (dotimes (s5-0 (-> this length)) + (login (-> this data s5-0)) + ) + this + ) + +;; definition for method 9 of type shrubbery +(defmethod login ((this shrubbery)) + "Initialize the object after it is loaded." + (let ((s5-0 (* (-> this header data 0) 2))) + (dotimes (s4-0 (the-as int s5-0)) + (let ((v1-3 (adgif-shader-login-no-remap (-> this textures s4-0)))) + (when v1-3 + (dotimes (a0-5 3) + (dotimes (a1-0 3) + (set! (-> (the-as (pointer int32) (+ (+ (* a0-5 16) (* a1-0 4)) (the-as int *texture-masks*)))) + (logior (-> (the-as (pointer int32) (+ (* a1-0 4) (the-as int *texture-masks*) (* a0-5 16))) 0) + (-> (the-as (pointer int32) (+ (* a1-0 4) (the-as int v1-3) (* a0-5 16))) 15) + ) + ) + ) + (set! (-> *texture-masks* data a0-5 dist) + (fmax (-> *texture-masks* data a0-5 dist) (-> v1-3 masks data a0-5 dist)) + ) + ) + ) + ) + ) + ) + (shrubbery-login-post-texture this) + this + ) + +;; definition for method 8 of type shrubbery +(defmethod mem-usage ((this shrubbery) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 28 (-> usage length))) + (set! (-> usage data 27 name) "shrubbery") + (+! (-> usage data 27 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 27 used) v1-6) + (+! (-> usage data 27 total) (logand -16 (+ v1-6 15))) + ) + (set! (-> usage length) (max 30 (-> usage length))) + (set! (-> usage data 29 name) "shrubbery-vertex") + (+! (-> usage data 29 count) 1) + (let ((v1-16 (* (-> this vtx-qwc) 16))) + (+! (-> usage data 29 used) v1-16) + (+! (-> usage data 29 total) (logand -16 (+ v1-16 15))) + ) + (set! (-> usage length) (max 31 (-> usage length))) + (set! (-> usage data 30 name) "shrubbery-color") + (+! (-> usage data 30 count) 1) + (let ((v1-26 (* (-> this col-qwc) 16))) + (+! (-> usage data 30 used) v1-26) + (+! (-> usage data 30 total) (logand -16 (+ v1-26 15))) + ) + (set! (-> usage length) (max 29 (-> usage length))) + (set! (-> usage data 28 name) "shrubbery-object") + (+! (-> usage data 28 count) 1) + (let ((v1-36 (* (-> this obj-qwc) 16))) + (+! (-> usage data 28 used) v1-36) + (+! (-> usage data 28 total) (logand -16 (+ v1-36 15))) + ) + (set! (-> usage length) (max 32 (-> usage length))) + (set! (-> usage data 31 name) "shrubbery-stq") + (+! (-> usage data 31 count) 1) + (let ((v1-46 (* (-> this stq-qwc) 16))) + (+! (-> usage data 31 used) v1-46) + (+! (-> usage data 31 total) (logand -16 (+ v1-46 15))) + ) + this + ) + +;; definition (debug) for function highres-shrub-login +;; WARN: Return type mismatch int vs none. +(defun-debug highres-shrub-login ((arg0 draw-node)) + "Set draw-node's distance to max, to force to always draw." + (set! (-> arg0 distance) 40960000.0) + (when (logtest? (-> arg0 flags) 1) + (dotimes (s5-0 (the-as int (-> arg0 child-count))) + (let ((a0-2 (+ (+ (* s5-0 32) 32) (the-as int (-> arg0 child))))) + (highres-shrub-login (the-as draw-node a0-2)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 9 of type drawable-tree-instance-shrub +(defmethod login ((this drawable-tree-instance-shrub)) + "Initialize the object after it is loaded." + (when (and *debug-segment* (-> *screen-shot-work* highres-enable)) + (dotimes (s5-0 (-> this length)) + (let ((a0-1 (-> this data s5-0))) + (highres-shrub-login (the-as draw-node a0-1)) + ) + ) + ) + (if (nonzero? (-> this info prototype-inline-array-shrub)) + (login (-> this info prototype-inline-array-shrub)) + ) + this + ) + +;; definition for symbol shrub-vu1-block, type vu-function +(define shrub-vu1-block (new 'static 'vu-function :length #x26a :qlength #x135)) + +;; definition for function shrub-num-tris +(defun shrub-num-tris ((arg0 shrubbery)) + "Get the number of triangles in this shrubbery." + (- (-> arg0 header data 2) (* (-> arg0 header data 1) 2)) + ) + +;; definition for function shrub-make-perspective-matrix +;; INFO: Used lq/sq +(defun shrub-make-perspective-matrix ((arg0 matrix) (arg1 matrix)) + "Create shrub drawing matrix." + (let* ((v1-0 arg0) + (t0-0 arg1) + (a1-1 (-> 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) a1-1) + (set! (-> v1-0 uvec quad) a2-0) + (set! (-> v1-0 fvec quad) a3-0) + (set! (-> v1-0 trans quad) t0-1) + ) + (let ((f0-1 (/ 1.0 (-> *math-camera* pfog0)))) + (set! (-> arg0 rvec w) (* (-> arg0 rvec w) f0-1)) + (set! (-> arg0 uvec w) (* (-> arg0 uvec w) f0-1)) + (set! (-> arg0 fvec w) (* (-> arg0 fvec w) f0-1)) + (set! (-> arg0 trans w) (* (-> arg0 trans w) f0-1)) + ) + (+! (-> arg0 rvec x) (* (-> arg0 rvec w) (-> *math-camera* hvdf-off x))) + (+! (-> arg0 uvec x) (* (-> arg0 uvec w) (-> *math-camera* hvdf-off x))) + (+! (-> arg0 fvec x) (* (-> arg0 fvec w) (-> *math-camera* hvdf-off x))) + (+! (-> arg0 trans x) (* (-> arg0 trans w) (-> *math-camera* hvdf-off x))) + (+! (-> arg0 rvec y) (* (-> arg0 rvec w) (-> *math-camera* hvdf-off y))) + (+! (-> arg0 uvec y) (* (-> arg0 uvec w) (-> *math-camera* hvdf-off y))) + (+! (-> arg0 fvec y) (* (-> arg0 fvec w) (-> *math-camera* hvdf-off y))) + (+! (-> arg0 trans y) (* (-> arg0 trans w) (-> *math-camera* hvdf-off y))) + (+! (-> arg0 rvec z) (* (-> arg0 rvec w) (-> *math-camera* hvdf-off z))) + (+! (-> arg0 uvec z) (* (-> arg0 uvec w) (-> *math-camera* hvdf-off z))) + (+! (-> arg0 fvec z) (* (-> arg0 fvec w) (-> *math-camera* hvdf-off z))) + (+! (-> arg0 trans z) (* (-> arg0 trans w) (-> *math-camera* hvdf-off z))) + arg0 + ) + +;; definition for function shrub-init-view-data +(defun shrub-init-view-data ((arg0 shrub-view-data)) + "Initialize shrub drawing constants." + (set! (-> arg0 texture-giftag tag) (new 'static 'gif-tag64 :nloop #x1 :nreg #x4)) + (set! (-> arg0 texture-giftag regs) (new 'static 'gif-tag-regs + :regs0 (gif-reg-id a+d) + :regs1 (gif-reg-id a+d) + :regs2 (gif-reg-id a+d) + :regs3 (gif-reg-id a+d) + ) + ) + (set! (-> arg0 texture-giftag word 3) (the-as uint #x40a00000)) + (set! (-> arg0 consts x) 25167696.0) + (set! (-> arg0 consts y) 8388608.0) + (set! (-> arg0 consts z) (-> *math-camera* pfog0)) + (set! (-> arg0 consts w) (-> *math-camera* pfog1)) + (set! (-> arg0 fog-clamp x) (-> *math-camera* fog-min)) + (set! (-> arg0 fog-clamp y) (-> *math-camera* fog-max)) + #f + ) + +;; definition for function shrub-upload-view-data +(defun shrub-upload-view-data ((arg0 dma-buffer)) + "Create DMA to set shrub vu1 constants." + (let ((s5-0 3)) + (let* ((v1-0 arg0) + (a0-1 (the-as dma-packet (-> v1-0 base))) + ) + (set! (-> a0-1 dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc s5-0)) + (set! (-> a0-1 vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> a0-1 vif1) (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32) :num s5-0)) + (set! (-> v1-0 base) (the-as pointer (&+ a0-1 16))) + ) + (shrub-init-view-data (the-as shrub-view-data (-> arg0 base))) + (&+! (-> arg0 base) (* s5-0 16)) + ) + #f + ) + +;; definition for function shrub-time +(defun shrub-time ((arg0 int) (arg1 int) (arg2 int) (arg3 int) (arg4 int)) + "Unknown. Maybe rough cycle count for a shrub fragment?" + (+ (* arg0 8) 29 (* 22 arg2) (* 11 arg1) (* (+ (* arg4 2) 15 (* 5 arg2) (* 13 arg0)) arg3) 53) + ) + +;; definition for function shrub-do-init-frame +(defun shrub-do-init-frame ((arg0 dma-buffer)) + "Set up DMA to set up VU1 for shrub rendering." + (dma-buffer-add-vu-function arg0 shrub-vu1-block 1) + (shrub-upload-view-data arg0) + (let* ((v1-0 arg0) + (a0-3 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-3) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-3) vif0) (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1 :imm #x0)) + (set! (-> (the-as dma-packet a0-3) vif1) (new 'static 'vif-tag :cmd (vif-cmd flushe) :msk #x1)) + (set! (-> v1-0 base) (&+ (the-as pointer a0-3) 16)) + ) + (let* ((v1-1 arg0) + (a0-5 (the-as object (-> v1-1 base))) + ) + (set! (-> (the-as dma-packet a0-5) dma) (new 'static 'dma-tag :qwc #x3 :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-5) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet a0-5) vif1) (new 'static 'vif-tag)) + (set! (-> v1-1 base) (&+ (the-as pointer a0-5) 16)) + ) + (let ((v1-2 (-> arg0 base))) + (set! (-> (the-as (pointer vif-tag) v1-2) 0) (new 'static 'vif-tag :cmd (vif-cmd strow) :msk #x1)) + (set! (-> (the-as (pointer uint32) v1-2) 1) (the-as uint #x8080)) + (set! (-> (the-as (pointer uint32) v1-2) 2) (the-as uint #x8080)) + (set! (-> (the-as (pointer uint32) v1-2) 3) (the-as uint #x8080)) + (set! (-> (the-as (pointer uint32) v1-2) 4) (the-as uint 0)) + (set! (-> (the-as (pointer vif-tag) v1-2) 5) (new 'static 'vif-tag :cmd (vif-cmd stcol) :msk #x1)) + (set! (-> (the-as (pointer uint32) v1-2) 6) (the-as uint 4096)) + (set! (-> (the-as (pointer uint32) v1-2) 7) (the-as uint 4096)) + (set! (-> (the-as (pointer uint32) v1-2) 8) (the-as uint 4096)) + (set! (-> (the-as (pointer uint32) v1-2) 9) (the-as uint 4096)) + (set! (-> (the-as (pointer vif-tag) v1-2) 10) (new 'static 'vif-tag :cmd (vif-cmd stmask))) + (set! (-> (the-as (pointer uint32) v1-2) 11) (the-as uint #xa0a0a0a0)) + (set! (-> arg0 base) (&+ v1-2 48)) + ) + (set! *shrub-state* 2) + #f + ) + +;; definition for function shrub-init-frame +(defun shrub-init-frame ((arg0 dma-buffer) (arg1 gs-test)) + "Set up DMA to set up VU1 and GS for shrub rendering." + (shrub-do-init-frame arg0) + (let* ((v1-0 arg0) + (a0-2 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-2) dma) (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-2) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet a0-2) vif1) (new 'static 'vif-tag :imm #x2 :cmd (vif-cmd direct) :msk #x1)) + (set! (-> v1-0 base) (&+ (the-as pointer a0-2) 16)) + ) + (let* ((v1-1 arg0) + (a0-4 (the-as object (-> v1-1 base))) + ) + (set! (-> (the-as gs-gif-tag a0-4) tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x1)) + (set! (-> (the-as gs-gif-tag a0-4) regs) GIF_REGS_ALL_AD) + (set! (-> v1-1 base) (&+ (the-as pointer a0-4) 16)) + ) + (let ((v1-2 (-> arg0 base))) + (set! (-> (the-as (pointer gs-test) v1-2) 0) arg1) + (set! (-> (the-as (pointer gs-reg64) v1-2) 1) (gs-reg64 test-1)) + (set! (-> arg0 base) (&+ v1-2 16)) + ) + #f + ) + +;; definition for function shrub-upload-model +(defun shrub-upload-model ((arg0 shrubbery) (arg1 dma-buffer) (arg2 int)) + "Set up DMA to upload a single shrub model." + (let* ((v1-0 arg1) + (a3-0 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a3-0) dma) + (new 'static 'dma-tag + :id (dma-tag-id ref) + :addr (the-as int (-> arg0 bsphere x)) + :qwc (+ (-> arg0 obj-qwc) (-> arg0 vtx-qwc) (-> arg0 col-qwc) (-> arg0 stq-qwc)) + ) + ) + (set! (-> (the-as dma-packet a3-0) vif0) (new 'static 'vif-tag :cmd (vif-cmd base) :imm *shrub-state*)) + (set! (-> (the-as dma-packet a3-0) vif1) (new 'static 'vif-tag :cmd (vif-cmd offset))) + (set! (-> v1-0 base) (&+ (the-as pointer a3-0) 16)) + ) + (cond + ((= arg2 1) + (let* ((v1-2 arg1) + (a0-9 (the-as object (-> v1-2 base))) + ) + (set! (-> (the-as dma-packet a0-9) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-9) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet a0-9) vif1) (new 'static 'vif-tag :cmd (vif-cmd mscal) :msk #x1 :imm #x11)) + (set! (-> v1-2 base) (&+ (the-as pointer a0-9) 16)) + ) + ) + (else + (let* ((v1-3 arg1) + (a0-11 (the-as object (-> v1-3 base))) + ) + (set! (-> (the-as dma-packet a0-11) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-11) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet a0-11) vif1) (new 'static 'vif-tag :cmd (vif-cmd mscal) :msk #x1 :imm #x15)) + (set! (-> v1-3 base) (&+ (the-as pointer a0-11) 16)) + ) + ) + ) + (set! *shrub-state* (- 164 *shrub-state*)) + #f + ) + +;; definition for function draw-inline-array-instance-shrub +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function draw-prototype-inline-array-shrub +;; INFO: Used lq/sq +;; ERROR: Failed load: (set! a2-11 (l.d (+ a0-14 96))) at op 102 +(defun draw-prototype-inline-array-shrub ((arg0 int) (arg1 (inline-array prototype-bucket-shrub))) + (local-vars + (sv-16 drawable) + (sv-32 uint) + (sv-48 int) + (sv-64 drawable) + (sv-80 int) + (sv-96 uint) + (sv-112 drawable) + (sv-128 int) + ) + (let ((v1-0 (the-as object arg1)) + (a0-6 (-> *display* frames (-> *display* on-screen) global-buf)) + ) + (countdown (a1-2 arg0) + (when (nonzero? (-> (the-as prototype-bucket-shrub v1-0) count 1)) + (let ((a2-2 (-> a0-6 base))) + (set! (-> (the-as (pointer uint128) a2-2)) + (-> *instance-shrub-work* count-tmpl (-> (the-as prototype-bucket-shrub v1-0) mod-count 1) quad) + ) + (set! (-> (the-as (pointer uint64) a2-2)) + (logior (logand (-> (the-as (pointer uint64) a2-2)) (the-as uint #x80000000ffffffff)) + (shr (shl (-> (the-as prototype-bucket-shrub v1-0) next 1) 33) 1) + ) + ) + (set! (-> (the-as prototype-bucket-shrub v1-0) next 1) (the-as uint a2-2)) + ) + (&+! (-> a0-6 base) 16) + ) + (when (nonzero? (-> (the-as prototype-bucket-shrub v1-0) count 2)) + (let ((a2-7 (-> a0-6 base))) + (set! (-> (the-as (pointer uint128) a2-7)) + (-> *instance-shrub-work* count-tmpl (-> (the-as prototype-bucket-shrub v1-0) mod-count 2) quad) + ) + (set! (-> (the-as (pointer uint64) a2-7)) + (logior (logand (-> (the-as (pointer uint64) a2-7)) (the-as uint #x80000000ffffffff)) + (shr (shl (-> (the-as prototype-bucket-shrub v1-0) next 2) 33) 1) + ) + ) + (set! (-> (the-as prototype-bucket-shrub v1-0) next 2) (the-as uint a2-7)) + ) + (&+! (-> a0-6 base) 16) + ) + (set! v1-0 (&+ (the-as prototype-bucket-shrub v1-0) 112)) + ) + ) + (when (logtest? (vu1-renderer-mask shrub-near) (-> *display* vu1-enable-user)) + (when (nonzero? (-> *instance-shrub-work* near-count)) + (let ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf base))) + (with-dma-buffer-add-bucket ((s2-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 12 + (bucket-id shrub-near-l0-shrub) + (bucket-id shrub-near-l1-shrub) + (bucket-id shrub-near-l2-shrub) + (bucket-id shrub-near-l3-shrub) + (bucket-id shrub-near-l4-shrub) + (bucket-id shrub-near-l5-shrub) + (bucket-id shrub-near-l6-shrub) + (bucket-id shrub-near-l7-shrub) + (bucket-id shrub-near-l8-shrub) + (bucket-id shrub-near-l9-shrub) + (bucket-id bucket0) + (bucket-id bucket0) + ) + *draw-index* + ) + ) + (generic-init-buf s2-0 (new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24))) + (generic-add-shrub-constants s2-0 #x5026b 60 61) + (let ((a0-14 (+ (+ (-> *instance-shrub-work* current-shrub-near-packet) 5152) (the-as uint *instance-shrub-work*))) + (v1-23 (-> s2-0 base)) + (a1-7 (+ (-> *instance-shrub-work* near-last) 176)) + ) + (let ((a2-13 (logior (logand (l.d (+ a0-14 96)) (the-as uint #x80000000ffffffff)) + (shr (shl (-> *instance-shrub-work* near-next) 33) 1) + ) + ) + ) + (s.d! (+ a0-14 96) a2-13) + ) + (let ((a2-14 (l.q (+ a0-14 96))) + (a3-18 (l.q (+ a0-14 112))) + (a0-15 (l.q (+ a0-14 128))) + ) + (set! (-> (the-as (pointer uint128) v1-23)) a2-14) + (s.q! (+ v1-23 16) a3-18) + (s.q! (+ v1-23 32) a0-15) + ) + (let ((v1-24 (&+ v1-23 48))) + (s.w! (+ a1-7 4) v1-24) + (set! (-> s2-0 base) v1-24) + ) + ) + ) + (let ((v1-34 *dma-mem-usage*)) + (when (nonzero? v1-34) + (set! (-> v1-34 length) (max 28 (-> v1-34 length))) + (set! (-> v1-34 data 27 name) "shrubbery") + (+! (-> v1-34 data 27 count) 1) + (+! (-> v1-34 data 27 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s4-0)) + ) + (set! (-> v1-34 data 27 total) (-> v1-34 data 27 used)) + ) + ) + ) + ) + (when (nonzero? (-> *instance-shrub-work* near-trans-count)) + (let ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf base))) + (with-dma-buffer-add-bucket ((s2-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 12 + (bucket-id shrub-near-trans-l0-shrub) + (bucket-id shrub-near-trans-l1-shrub) + (bucket-id shrub-near-trans-l2-shrub) + (bucket-id shrub-near-trans-l3-shrub) + (bucket-id shrub-near-trans-l4-shrub) + (bucket-id shrub-near-trans-l5-shrub) + (bucket-id shrub-near-trans-l6-shrub) + (bucket-id shrub-near-trans-l7-shrub) + (bucket-id shrub-near-trans-l8-shrub) + (bucket-id shrub-near-trans-l9-shrub) + (bucket-id bucket0) + (bucket-id bucket0) + ) + *draw-index* + ) + ) + (generic-init-buf s2-1 (new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24))) + (generic-add-shrub-constants s2-1 #x51001 124 125) + (let ((a0-26 + (+ (+ (-> *instance-shrub-work* current-shrub-near-trans-packet) 5152) (the-as uint *instance-shrub-work*)) + ) + (v1-51 (-> s2-1 base)) + (a1-24 (+ (-> *instance-shrub-work* near-trans-last) 176)) + ) + (let ((a2-28 (logior (logand (l.d (+ a0-26 96)) (the-as uint #x80000000ffffffff)) + (shr (shl (-> *instance-shrub-work* near-trans-next) 33) 1) + ) + ) + ) + (s.d! (+ a0-26 96) a2-28) + ) + (let ((a2-29 (l.q (+ a0-26 96))) + (a3-27 (l.q (+ a0-26 112))) + (a0-27 (l.q (+ a0-26 128))) + ) + (set! (-> (the-as (pointer uint128) v1-51)) a2-29) + (s.q! (+ v1-51 16) a3-27) + (s.q! (+ v1-51 32) a0-27) + ) + (let ((v1-52 (&+ v1-51 48))) + (s.w! (+ a1-24 4) v1-52) + (set! (-> s2-1 base) v1-52) + ) + ) + ) + (let ((v1-62 *dma-mem-usage*)) + (when (nonzero? v1-62) + (set! (-> v1-62 length) (max 28 (-> v1-62 length))) + (set! (-> v1-62 data 27 name) "shrubbery") + (+! (-> v1-62 data 27 count) 1) + (+! (-> v1-62 data 27 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s4-1)) + ) + (set! (-> v1-62 data 27 total) (-> v1-62 data 27 used)) + ) + ) + ) + ) + ) + (when (logtest? (vu1-renderer-mask shrubbery) (-> *display* vu1-enable-user)) + (let ((s4-2 (-> *display* frames (-> *display* on-screen) global-buf base))) + (with-dma-buffer-add-bucket ((s2-2 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 12 + (bucket-id shrub-l0-shrub) + (bucket-id shrub-l1-shrub) + (bucket-id shrub-l2-shrub) + (bucket-id shrub-l3-shrub) + (bucket-id shrub-l4-shrub) + (bucket-id shrub-l5-shrub) + (bucket-id shrub-l6-shrub) + (bucket-id shrub-l7-shrub) + (bucket-id shrub-l8-shrub) + (bucket-id shrub-l9-shrub) + (bucket-id bucket0) + (bucket-id bucket0) + ) + *draw-index* + ) + ) + (shrub-init-frame s2-2 (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + (let ((s1-0 (the-as prototype-bucket-shrub arg1))) + (countdown (s0-0 arg0) + (when (nonzero? (-> s1-0 count 1)) + (if (logtest? (-> s1-0 flags) (prototype-flags tpage-alpha)) + (set! sv-16 (-> s1-0 geometry 2)) + (set! sv-16 (-> s1-0 geometry 1)) + ) + (set! sv-32 (-> s1-0 next 1)) + (if (logtest? (-> s1-0 flags) (prototype-flags tpage-alpha)) + (set! sv-48 #x51001) + (set! sv-48 #x5026b) + ) + (set! sv-64 (&+ sv-16 32)) + (set! sv-80 0) + (while (< sv-80 (-> (the-as prototype-shrubbery sv-16) length)) + (shrub-upload-model + (the-as shrubbery sv-64) + s2-2 + (the-as int (-> *instance-shrub-work* start-bank (-> s1-0 mod-count 1))) + ) + (if (zero? sv-80) + (dma-buffer-add-gs-set s2-2 (test-1 sv-48)) + ) + (let* ((v1-98 s2-2) + (a0-44 (-> v1-98 base)) + ) + (set! (-> (the-as (pointer uint64) a0-44)) (logior #x50000000 (shr (shl sv-32 33) 1))) + (s.w! (+ a0-44 8) 0) + (s.w! (+ a0-44 12) 0) + (set! (-> v1-98 base) (&+ a0-44 16)) + ) + (set! sv-64 (&+ sv-64 32)) + (set! sv-80 (+ sv-80 1)) + ) + ) + (&+! s1-0 112) + ) + ) + ) + (let ((v1-117 *dma-mem-usage*)) + (when (nonzero? v1-117) + (set! (-> v1-117 length) (max 28 (-> v1-117 length))) + (set! (-> v1-117 data 27 name) "shrubbery") + (+! (-> v1-117 data 27 count) 1) + (+! (-> v1-117 data 27 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s4-2)) + ) + (set! (-> v1-117 data 27 total) (-> v1-117 data 27 used)) + ) + ) + ) + ) + (when (logtest? (vu1-renderer-mask shrub-vanish) (-> *display* vu1-enable-user)) + (let ((s4-3 (-> *display* frames (-> *display* on-screen) global-buf base))) + (with-dma-buffer-add-bucket ((s2-3 (-> *display* frames (-> *display* on-screen) global-buf)) + (-> (new 'static 'array bucket-id 12 + (bucket-id shrub-vanish-l0-shrub) + (bucket-id shrub-vanish-l1-shrub) + (bucket-id shrub-vanish-l2-shrub) + (bucket-id shrub-vanish-l3-shrub) + (bucket-id shrub-vanish-l4-shrub) + (bucket-id shrub-vanish-l5-shrub) + (bucket-id shrub-vanish-l6-shrub) + (bucket-id shrub-vanish-l7-shrub) + (bucket-id shrub-vanish-l8-shrub) + (bucket-id shrub-vanish-l9-shrub) + (bucket-id bucket0) + (bucket-id bucket0) + ) + *draw-index* + ) + ) + (shrub-init-frame s2-3 (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + (let ((s1-1 (the-as prototype-bucket-shrub arg1))) + (countdown (s0-1 arg0) + (when (nonzero? (-> s1-1 count 2)) + (let ((v1-134 (-> s1-1 geometry 2))) + (set! sv-96 (-> s1-1 next 2)) + (set! sv-112 (&+ v1-134 32)) + (set! sv-128 (-> (the-as prototype-shrubbery v1-134) length)) + ) + (while (nonzero? sv-128) + (set! sv-128 (+ sv-128 -1)) + (shrub-upload-model + (the-as shrubbery sv-112) + s2-3 + (the-as int (-> *instance-shrub-work* start-bank (-> s1-1 mod-count 2))) + ) + (let* ((v1-140 s2-3) + (a0-60 (-> v1-140 base)) + ) + (set! (-> (the-as (pointer uint64) a0-60)) (logior #x50000000 (shr (shl sv-96 33) 1))) + (s.w! (+ a0-60 8) 0) + (s.w! (+ a0-60 12) 0) + (set! (-> v1-140 base) (&+ a0-60 16)) + ) + (set! sv-112 (&+ sv-112 32)) + ) + ) + (&+! s1-1 112) + ) + ) + ) + (let ((v1-157 *dma-mem-usage*)) + (when (nonzero? v1-157) + (set! (-> v1-157 length) (max 28 (-> v1-157 length))) + (set! (-> v1-157 data 27 name) "shrubbery") + (+! (-> v1-157 data 27 count) 1) + (+! (-> v1-157 data 27 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s4-3)) + ) + (set! (-> v1-157 data 27 total) (-> v1-157 data 27 used)) + ) + ) + ) + ) + (when (logtest? (vu1-renderer-mask billboard) (-> *display* vu1-enable-user)) + (let* ((s4-4 (-> *display* frames (-> *display* on-screen) global-buf base)) + (v1-171 (-> *display* frames (-> *display* on-screen) global-buf)) + (a2-70 (-> v1-171 base)) + ) + (dma-buffer-add-gs-set v1-171 (test-1 (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x80 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + ) + (let ((a0-73 (-> v1-171 base))) + (while (nonzero? arg0) + (+! arg0 -1) + (when (nonzero? (-> (the-as prototype-bucket-shrub arg1) count 3)) + (set! (-> *instance-shrub-work* adgif-tmpl dma-vif dma addr) (-> (the-as prototype-bucket-shrub arg1) next 3)) + (set! (-> (the-as (pointer uint128) a0-73)) (-> *instance-shrub-work* adgif-tmpl dma-vif quad)) + (let ((a1-91 (-> *instance-shrub-work* adgif-tmpl quad 1))) + (s.q! (+ a0-73 16) a1-91) + ) + (let ((a1-92 (the-as prototype-bucket-shrub (-> (the-as prototype-bucket-shrub arg1) geometry 3)))) + (let ((a3-46 (-> a1-92 dists quad))) + (s.q! (+ a0-73 32) a3-46) + ) + (let ((a3-47 (-> a1-92 rdists quad))) + (s.q! (+ a0-73 48) a3-47) + ) + (let ((a3-48 (-> a1-92 next-clear))) + (s.q! (+ a0-73 64) a3-48) + ) + (let ((a3-49 (-> a1-92 count-quad))) + (s.q! (+ a0-73 80) a3-49) + ) + (let ((a1-93 (-> a1-92 last-clear))) + (s.q! (+ a0-73 96) a1-93) + ) + ) + (&+! a0-73 112) + (set! (-> (the-as prototype-bucket-shrub arg1) last 3 dma addr) (the-as int a0-73)) + ) + (set! arg1 (the-as (inline-array prototype-bucket-shrub) (&+ (the-as prototype-bucket-shrub arg1) 112))) + ) + (set! (-> v1-171 base) a0-73) + ) + (let* ((a3-54 (-> v1-171 base)) + (v0-12 (when (!= a2-70 a3-54) + (let ((a0-74 (-> v1-171 base))) + (set! (-> (the-as (pointer int64) a0-74)) #x20000000) + (s.w! (+ a0-74 8) 0) + (s.w! (+ a0-74 12) 0) + (set! (-> v1-171 base) (&+ a0-74 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (-> (new 'static 'array bucket-id 12 + (bucket-id billboard-l0-shrub) + (bucket-id billboard-l1-shrub) + (bucket-id billboard-l2-shrub) + (bucket-id billboard-l3-shrub) + (bucket-id billboard-l4-shrub) + (bucket-id billboard-l5-shrub) + (bucket-id billboard-l6-shrub) + (bucket-id billboard-l7-shrub) + (bucket-id billboard-l8-shrub) + (bucket-id billboard-l9-shrub) + (bucket-id bucket0) + (bucket-id bucket0) + ) + *draw-index* + ) + a2-70 + (the-as (pointer dma-tag) a3-54) + ) + ) + ) + ) + (let ((v1-179 *dma-mem-usage*)) + (when (nonzero? v1-179) + (set! (-> v1-179 length) (max 34 (-> v1-179 length))) + (set! (-> v1-179 data 33 name) "billboard") + (+! (-> v1-179 data 33 count) 1) + (+! (-> v1-179 data 33 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s4-4)) + ) + (set! (-> v1-179 data 33 total) (-> v1-179 data 33 used)) + ) + ) + v0-12 + ) + ) + ) + ) + +;; definition for function draw-drawable-tree-instance-shrub +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun draw-drawable-tree-instance-shrub ((arg0 drawable-tree-instance-shrub) (arg1 level)) + "Draw a shrub tree!" + (local-vars (a0-4 int) (a0-6 int) (a0-11 int) (a0-13 int)) + (set! (-> *instance-shrub-work* texture-dists) (the-as uint (-> arg1 bsp shrub-closest))) + (set! (-> *instance-shrub-work* near-last) (the-as uint 0)) + (set! (-> *instance-shrub-work* near-next) (the-as uint 0)) + (set! (-> *instance-shrub-work* near-count) (the-as uint 0)) + (set! (-> *instance-shrub-work* near-trans-last) (the-as uint 0)) + (set! (-> *instance-shrub-work* near-trans-next) (the-as uint 0)) + (set! (-> *instance-shrub-work* near-trans-count) (the-as uint 0)) + (set! (-> *instance-shrub-work* wind-vectors) (-> arg0 info wind-vectors)) + (set! (-> *instance-shrub-work* wait-to-spr) (the-as uint 0)) + (set! (-> *instance-shrub-work* wait-from-spr) (the-as uint 0)) + (when (logtest? (vu1-renderer-mask shrubbery shrub-near billboard shrub-vanish) (-> *display* vu1-enable-user)) + (let* ((v1-16 (-> arg0 info prototype-inline-array-shrub)) + (s5-0 (-> v1-16 length)) + (s4-0 (-> v1-16 data)) + ) + (countdown (a1-5 s5-0) + (let ((a2-3 (-> v1-16 data a1-5))) + (set! (-> a2-3 next-clear) (the-as uint128 0)) + (set! (-> a2-3 last-clear) (the-as uint128 0)) + (set! (-> a2-3 count-clear) (the-as uint 0)) + ) + 0 + ) + (let ((v1-24 (-> *display* frames (-> *display* on-screen) global-buf))) + (when (nonzero? (-> arg0 length)) + (let ((gp-0 (-> *display* frames (-> *display* on-screen) global-buf base))) + (let* ((a1-16 (-> *perf-stats* data 44)) + (a2-6 (-> a1-16 ctrl)) + ) + (+! (-> a1-16 count) 1) + (b! (zero? a2-6) cfg-7 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a2-6) + ) + (.sync.l) + (.sync.p) + (label cfg-7) + 0 + (draw-inline-array-instance-shrub + v1-24 + (&+ (-> arg0 data 0) 32) + (-> (the-as drawable-group (-> arg0 data 0)) length) + s4-0 + ) + (let ((v1-26 (-> *perf-stats* data 44))) + (b! (zero? (-> v1-26 ctrl)) cfg-9 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-4 pcr0) + (+! (-> v1-26 accum0) a0-4) + (.mfpc a0-6 pcr1) + (+! (-> v1-26 accum1) a0-6) + ) + (label cfg-9) + 0 + (let* ((v1-29 (-> *perf-stats* data 45)) + (a0-8 (-> v1-29 ctrl)) + ) + (+! (-> v1-29 count) 1) + (b! (zero? a0-8) cfg-11 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-8) + ) + (.sync.l) + (.sync.p) + (label cfg-11) + 0 + (draw-prototype-inline-array-shrub s5-0 s4-0) + (let ((v1-32 (-> *perf-stats* data 45))) + (b! (zero? (-> v1-32 ctrl)) cfg-13 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-11 pcr0) + (+! (-> v1-32 accum0) a0-11) + (.mfpc a0-13 pcr1) + (+! (-> v1-32 accum1) a0-13) + ) + (label cfg-13) + 0 + (let ((v1-33 *dma-mem-usage*)) + (when (nonzero? v1-33) + (set! (-> v1-33 length) (max 28 (-> v1-33 length))) + (set! (-> v1-33 data 27 name) "shrubbery") + (+! (-> v1-33 data 27 count) 1) + (+! (-> v1-33 data 27 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint gp-0)) + ) + (set! (-> v1-33 data 27 total) (-> v1-33 data 27 used)) + ) + ) + ) + ) + ) + ) + (update-wait-stats + (-> *perf-stats* data 44) + (the-as uint 0) + (-> *instance-shrub-work* wait-to-spr) + (-> *instance-shrub-work* wait-from-spr) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type drawable-tree-instance-shrub +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this drawable-tree-instance-shrub)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + (let ((v1-1 (-> *background-work* shrub-tree-count)) + (a1-3 (-> *level* draw-level *draw-index*)) + ) + (set! (-> *background-work* shrub-trees v1-1) this) + (set! (-> *background-work* shrub-levels v1-1) a1-3) + ) + (+! (-> *background-work* shrub-tree-count) 1) + 0 + (none) + ) + +;; definition for method 15 of type drawable-tree-instance-shrub +(defmethod unpack-vis ((this drawable-tree-instance-shrub) (arg0 (pointer int8)) (arg1 (pointer int8))) + arg1 + ) + +;; definition for method 13 of type drawable-tree-instance-shrub +;; WARN: Return type mismatch int vs none. +(defmethod collect-stats ((this drawable-tree-instance-shrub)) + "Collect triangle/perf statistics for rendering. + This is only called when viewing stats. + The vis-bits and culling registers are loaded during this time." + (when (logtest? (vu1-renderer-mask shrubbery shrub-near billboard shrub-vanish) (-> *display* vu1-enable-user)) + (let* ((v1-4 (-> this info prototype-inline-array-shrub)) + (gp-0 (the-as object (-> v1-4 data))) + ) + (countdown (s5-0 (-> v1-4 length)) + (when (logtest? (vu1-renderer-mask shrub-near) (-> *display* vu1-enable-user)) + (let ((v1-8 (-> (the-as prototype-bucket-shrub gp-0) count 0)) + (a1-2 (-> (the-as prototype-bucket-shrub gp-0) geometry 0)) + ) + (when (nonzero? v1-8) + (let ((a0-4 (-> (the-as drawable-group a1-2) length))) + (+! (-> *terrain-stats* shrub groups) 1) + (+! (-> *terrain-stats* shrub fragments) (* a0-4 (the-as int v1-8))) + ) + (+! (-> *terrain-stats* shrub instances) v1-8) + ) + ) + ) + (when (logtest? (vu1-renderer-mask shrubbery) (-> *display* vu1-enable-user)) + (let ((s4-0 (-> (the-as prototype-bucket-shrub gp-0) count 1)) + (v1-13 (-> (the-as prototype-bucket-shrub gp-0) geometry 1)) + ) + (when (nonzero? s4-0) + (let ((s3-0 (&+ v1-13 32)) + (s2-0 (-> (the-as drawable-group v1-13) length)) + ) + (+! (-> *terrain-stats* shrub groups) 1) + (+! (-> *terrain-stats* shrub fragments) s2-0) + (+! (-> *terrain-stats* shrub instances) s4-0) + (while (nonzero? s2-0) + (+! s2-0 -1) + (let ((a0-17 (* (shrub-num-tris (the-as shrubbery s3-0)) s4-0)) + (v1-25 (* (-> (the-as shrubbery s3-0) header data 2) s4-0)) + ) + (+! (-> *terrain-stats* shrub tris) a0-17) + (+! (-> *terrain-stats* shrub dverts) v1-25) + ) + (&+! s3-0 32) + ) + ) + ) + ) + ) + (when (logtest? (vu1-renderer-mask shrub-vanish) (-> *display* vu1-enable-user)) + (let ((s4-1 (-> (the-as prototype-bucket-shrub gp-0) count 2)) + (v1-31 (-> (the-as prototype-bucket-shrub gp-0) geometry 2)) + ) + (when (nonzero? s4-1) + (let ((s3-1 (&+ v1-31 32)) + (s2-1 (-> (the-as drawable-group v1-31) length)) + ) + (+! (-> *terrain-stats* trans-shrub groups) 1) + (+! (-> *terrain-stats* trans-shrub fragments) s2-1) + (+! (-> *terrain-stats* trans-shrub instances) s4-1) + (while (nonzero? s2-1) + (+! s2-1 -1) + (let ((a0-30 (* (shrub-num-tris (the-as shrubbery s3-1)) s4-1)) + (v1-43 (* (-> (the-as shrubbery s3-1) header data 2) s4-1)) + ) + (+! (-> *terrain-stats* trans-shrub tris) a0-30) + (+! (-> *terrain-stats* trans-shrub dverts) v1-43) + ) + (&+! s3-1 32) + ) + ) + ) + ) + ) + (when (logtest? (vu1-renderer-mask billboard) (-> *display* vu1-enable-user)) + (let ((v1-49 (-> (the-as prototype-bucket-shrub gp-0) count 3))) + (when (nonzero? v1-49) + (+! (-> *terrain-stats* billboard groups) 1) + (+! (-> *terrain-stats* billboard instances) v1-49) + (+! (-> *terrain-stats* billboard tris) (* v1-49 2)) + (+! (-> *terrain-stats* billboard dverts) (* v1-49 4)) + ) + ) + ) + (set! gp-0 (-> (the-as (inline-array prototype-bucket-shrub) gp-0) 1)) + ) + ) + ) + 0 + (none) + ) + +;; definition of type dma-test +(deftype dma-test (structure) + ((data qword 101 :inline) + ) + ) + +;; definition for method 3 of type dma-test +(defmethod inspect ((this dma-test)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'dma-test) + (format #t "~1Tdata[101] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition for symbol *dma-test*, type dma-test +(define *dma-test* (new 'global 'dma-test)) + +;; definition of type dma-test-work +(deftype dma-test-work (structure) + ((upload dma-packet :inline) + (end dma-packet :inline) + ) + ) + +;; definition for method 3 of type dma-test-work +(defmethod inspect ((this dma-test-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'dma-test-work) + (format #t "~1Tupload: #~%" (-> this upload)) + (format #t "~1Tend: #~%" (-> this end)) + (label cfg-4) + this + ) + +;; definition for symbol *dma-test-work*, type dma-test-work +(define *dma-test-work* + (new 'static 'dma-test-work + :upload (new 'static 'dma-packet :dma (new 'static 'dma-tag :qwc #x20 :id (dma-tag-id ref))) + :end (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id end))) + ) + ) + +;; definition for function init-dma-test +;; INFO: Used lq/sq +;; WARN: Return type mismatch uint128 vs none. +;; ERROR: Failed store: (s.q! (+ v1-0 1616) v0-0) at op 29 +(defun init-dma-test () + (let ((a0-0 *dma-test-work*) + (v1-0 *dma-test*) + ) + (let ((a1-6 (-> *display* frames (-> *display* on-screen) calc-buf base))) + (dotimes (a2-1 100) + (set! (-> a0-0 upload dma addr) (the-as int a1-6)) + (set! (-> v1-0 data a2-1 quad) (-> a0-0 upload quad)) + (&+! a1-6 256) + ) + ) + (let ((v0-0 (-> a0-0 end quad))) + (s.q! (+ v1-0 1616) v0-0) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(init-dma-test) + +;; definition for function dma-test-func +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function move-test-func +;; ERROR: function was not converted to expressions. Cannot decompile. + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/sky/sky-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/sky/sky-h_REF.gc index 6f733b365c..f797ae02d5 100644 --- a/test/decompiler/reference/jak3/engine/gfx/sky/sky-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/sky/sky-h_REF.gc @@ -406,12 +406,12 @@ (disable-day-star basic) ) (:methods - (sky-work-method-9 () none) - (sky-work-method-10 () none) - (sky-work-method-11 () none) - (sky-work-method-12 () none) + (init-sun-data! (_type_ int float float float) none) + (init-orbit-settings! (_type_ int float float float float float float) none) + (update-colors-for-time (_type_ float) none) + (update-time-and-speed (_type_ float float) none) (sky-work-method-13 () none) - (sky-work-method-14 () none) + (draw (_type_) none) (sky-work-method-15 () none) (sky-work-method-16 () none) (sky-work-method-17 () none) @@ -501,7 +501,3 @@ ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/engine/gfx/sprite/particles/light-trails-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/light-trails-h_REF.gc new file mode 100644 index 0000000000..148b116ea0 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/light-trails-h_REF.gc @@ -0,0 +1,520 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type color-array +(deftype color-array (inline-array-class) + ((data rgbaf :inline :dynamic) + ) + ) + +;; definition for method 3 of type color-array +(defmethod inspect ((this color-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! (-> color-array heap-base) (the-as uint 16)) + +;; definition of type light-trail-composition +(deftype light-trail-composition (structure) + ((color-mode uint64) + (color-curve curve-color-piecewise) + (color-repeat-dist float) + (alpha-1-mode uint64) + (alpha-2-mode uint64) + (base-alpha float) + (alpha-curve-1 curve2d-piecewise) + (alpha-curve-2 curve2d-piecewise) + (alpha-repeat-dist float) + (width-mode uint64) + (base-width float) + (width-curve curve2d-piecewise) + (width-repeat-dist float) + (uv-mode uint64) + (uv-repeat-dist float) + (max-age time-frame) + (tex-id uint32) + (lie-mode uint64) + (lie-vector vector :inline) + (zbuffer? symbol) + (use-tape-mode? symbol) + (blend-mode uint64) + (frame-stagger uint8) + ) + ) + +;; definition for method 3 of type light-trail-composition +(defmethod inspect ((this light-trail-composition)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'light-trail-composition) + (format #t "~1Tcolor-mode: ~D~%" (-> this color-mode)) + (format #t "~1Tcolor-curve: ~A~%" (-> this color-curve)) + (format #t "~1Tcolor-repeat-dist: ~f~%" (-> this color-repeat-dist)) + (format #t "~1Talpha-1-mode: ~D~%" (-> this alpha-1-mode)) + (format #t "~1Talpha-2-mode: ~D~%" (-> this alpha-2-mode)) + (format #t "~1Tbase-alpha: ~f~%" (-> this base-alpha)) + (format #t "~1Talpha-curve-1: ~A~%" (-> this alpha-curve-1)) + (format #t "~1Talpha-curve-2: ~A~%" (-> this alpha-curve-2)) + (format #t "~1Talpha-repeat-dist: ~f~%" (-> this alpha-repeat-dist)) + (format #t "~1Twidth-mode: ~D~%" (-> this width-mode)) + (format #t "~1Tbase-width: ~f~%" (-> this base-width)) + (format #t "~1Twidth-curve: ~A~%" (-> this width-curve)) + (format #t "~1Twidth-repeat-dist: ~f~%" (-> this width-repeat-dist)) + (format #t "~1Tuv-mode: ~D~%" (-> this uv-mode)) + (format #t "~1Tuv-repeat-dist: ~f~%" (-> this uv-repeat-dist)) + (format #t "~1Tmax-age: ~D~%" (-> this max-age)) + (format #t "~1Ttex-id: ~D~%" (-> this tex-id)) + (format #t "~1Tlie-mode: ~D~%" (-> this lie-mode)) + (format #t "~1Tlie-vector: #~%" (-> this lie-vector)) + (format #t "~1Tzbuffer?: ~A~%" (-> this zbuffer?)) + (format #t "~1Tuse-tape-mode?: ~A~%" (-> this use-tape-mode?)) + (format #t "~1Tblend-mode: ~D~%" (-> this blend-mode)) + (format #t "~1Tframe-stagger: ~D~%" (-> this frame-stagger)) + (label cfg-4) + this + ) + +;; definition of type light-trail-breadcrumb +(deftype light-trail-breadcrumb (structure) + ((pos vector :inline) + (birth-time uint32 :overlay-at (-> pos data 3)) + ) + ) + +;; definition for method 3 of type light-trail-breadcrumb +(defmethod inspect ((this light-trail-breadcrumb)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'light-trail-breadcrumb) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tbirth-time: ~D~%" (-> this pos w)) + (label cfg-4) + this + ) + +;; definition of type breadcrumb-array +(deftype breadcrumb-array (inline-array-class) + ((data light-trail-breadcrumb :dynamic) + ) + ) + +;; definition for method 3 of type breadcrumb-array +(defmethod inspect ((this breadcrumb-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! (-> breadcrumb-array heap-base) (the-as uint 16)) + +;; definition of type light-trail +(deftype light-trail (basic) + ((crumb-array (array light-trail-breadcrumb)) + (crumb-size uint8) + (crumb-count int16) + (max-crumb-count int16) + (appearance light-trail-composition) + (start-marker uint64) + (end-marker uint64) + (decision uint64) + (total-distance-traveled float) + (strip prim-strip) + (strip2 prim-strip) + (cache-vector vector 4 :inline) + ) + (:methods + (light-trail-method-9 (_type_ light-trail-composition int) none) + (light-trail-method-10 (_type_) none) + (light-trail-method-11 (_type_ vector time-frame) int) + (light-trail-method-12 (_type_) none) + (light-trail-method-13 (_type_) int) + (light-trail-method-14 (_type_) none) + (light-trail-method-15 (_type_) none) + (add-vert! (_type_ prim-strip vector float float float) none) + (light-trail-method-17 (_type_ vector float float vector float) symbol) + (light-trail-method-18 (_type_ light-trail-breadcrumb int vector vector) none) + (light-trail-method-19 (_type_ float int) none) + (reset-crumbs! (_type_) none) + (light-trail-method-21 (_type_ vector) none) + ) + ) + +;; definition for method 3 of type light-trail +(defmethod inspect ((this light-trail)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tcrumb-array: ~A~%" (-> this crumb-array)) + (format #t "~1Tcrumb-size: ~D~%" (-> this crumb-size)) + (format #t "~1Tcrumb-count: ~D~%" (-> this crumb-count)) + (format #t "~1Tmax-crumb-count: ~D~%" (-> this max-crumb-count)) + (format #t "~1Tappearance: #~%" (-> this appearance)) + (format #t "~1Tstart-marker: ~D~%" (-> this start-marker)) + (format #t "~1Tend-marker: ~D~%" (-> this end-marker)) + (format #t "~1Tdecision: ~D~%" (-> this decision)) + (format #t "~1Ttotal-distance-traveled: ~f~%" (-> this total-distance-traveled)) + (format #t "~1Tstrip: ~A~%" (-> this strip)) + (format #t "~1Tstrip2: ~A~%" (-> this strip2)) + (format #t "~1Tcache-vector[4] @ #x~X~%" (-> this cache-vector)) + (label cfg-4) + this + ) + +;; definition of type weapon-trail-crumb +(deftype weapon-trail-crumb (light-trail-breadcrumb) + ((offset vector :inline) + ) + ) + +;; definition for method 3 of type weapon-trail-crumb +(defmethod inspect ((this weapon-trail-crumb)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'weapon-trail-crumb) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tbirth-time: ~D~%" (-> this pos w)) + (format #t "~1Toffset: #~%" (-> this offset)) + (label cfg-4) + this + ) + +;; definition of type weapon-trail +(deftype weapon-trail (light-trail) + () + (:methods + (weapon-trail-method-22 (_type_ vector vector) light-trail-breadcrumb) + (weapon-trail-method-23 (_type_ vector vector) none) + ) + ) + +;; definition for method 3 of type weapon-trail +(defmethod inspect ((this weapon-trail)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tcrumb-array: ~A~%" (-> this crumb-array)) + (format #t "~1Tcrumb-size: ~D~%" (-> this crumb-size)) + (format #t "~1Tcrumb-count: ~D~%" (-> this crumb-count)) + (format #t "~1Tmax-crumb-count: ~D~%" (-> this max-crumb-count)) + (format #t "~1Tappearance: #~%" (-> this appearance)) + (format #t "~1Tstart-marker: ~D~%" (-> this start-marker)) + (format #t "~1Tend-marker: ~D~%" (-> this end-marker)) + (format #t "~1Tdecision: ~D~%" (-> this decision)) + (format #t "~1Ttotal-distance-traveled: ~f~%" (-> this total-distance-traveled)) + (format #t "~1Tstrip: ~A~%" (-> this strip)) + (format #t "~1Tstrip2: ~A~%" (-> this strip2)) + (format #t "~1Tcache-vector[4] @ #x~X~%" (-> this cache-vector)) + (label cfg-4) + this + ) + +;; definition of type tread-trail-crumb +(deftype tread-trail-crumb (light-trail-breadcrumb) + ((normal vector :inline) + ) + ) + +;; definition for method 3 of type tread-trail-crumb +(defmethod inspect ((this tread-trail-crumb)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'tread-trail-crumb) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tbirth-time: ~D~%" (-> this pos w)) + (format #t "~1Tnormal: #~%" (-> this normal)) + (label cfg-4) + this + ) + +;; definition of type tread-trail +(deftype tread-trail (light-trail) + () + (:methods + (tread-trail-method-22 (_type_ vector vector) light-trail-breadcrumb) + (tread-trail-method-23 (_type_ vector vector) light-trail-breadcrumb) + ) + ) + +;; definition for method 3 of type tread-trail +(defmethod inspect ((this tread-trail)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tcrumb-array: ~A~%" (-> this crumb-array)) + (format #t "~1Tcrumb-size: ~D~%" (-> this crumb-size)) + (format #t "~1Tcrumb-count: ~D~%" (-> this crumb-count)) + (format #t "~1Tmax-crumb-count: ~D~%" (-> this max-crumb-count)) + (format #t "~1Tappearance: #~%" (-> this appearance)) + (format #t "~1Tstart-marker: ~D~%" (-> this start-marker)) + (format #t "~1Tend-marker: ~D~%" (-> this end-marker)) + (format #t "~1Tdecision: ~D~%" (-> this decision)) + (format #t "~1Ttotal-distance-traveled: ~f~%" (-> this total-distance-traveled)) + (format #t "~1Tstrip: ~A~%" (-> this strip)) + (format #t "~1Tstrip2: ~A~%" (-> this strip2)) + (format #t "~1Tcache-vector[4] @ #x~X~%" (-> this cache-vector)) + (label cfg-4) + this + ) + +;; definition of type light-trail-tracker-spawn-params +(deftype light-trail-tracker-spawn-params (structure) + ((appearance light-trail-composition) + (max-num-crumbs int32) + (tracked-obj handle) + (track-immediately? symbol) + ) + ) + +;; definition for method 3 of type light-trail-tracker-spawn-params +(defmethod inspect ((this light-trail-tracker-spawn-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'light-trail-tracker-spawn-params) + (format #t "~1Tappearance: #~%" (-> this appearance)) + (format #t "~1Tmax-num-crumbs: ~D~%" (-> this max-num-crumbs)) + (format #t "~1Ttracked-obj: ~D~%" (-> this tracked-obj)) + (format #t "~1Ttrack-immediately?: ~A~%" (-> this track-immediately?)) + (label cfg-4) + this + ) + +;; definition of type weapon-trail-tracker-spawn-params +(deftype weapon-trail-tracker-spawn-params (light-trail-tracker-spawn-params) + ((joint0 int16) + (joint1 int16) + ) + ) + +;; definition for method 3 of type weapon-trail-tracker-spawn-params +(defmethod inspect ((this weapon-trail-tracker-spawn-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'weapon-trail-tracker-spawn-params) + (format #t "~1Tappearance: #~%" (-> this appearance)) + (format #t "~1Tmax-num-crumbs: ~D~%" (-> this max-num-crumbs)) + (format #t "~1Ttracked-obj: ~D~%" (-> this tracked-obj)) + (format #t "~1Ttrack-immediately?: ~A~%" (-> this track-immediately?)) + (format #t "~1Tjoint0: ~D~%" (-> this joint0)) + (format #t "~1Tjoint1: ~D~%" (-> this joint1)) + (label cfg-4) + this + ) + +;; definition of type light-trail-tracker +(deftype light-trail-tracker (process) + ((trail light-trail) + (tracked-object handle) + (offscreen? symbol) + (offscreen-start-time time-frame) + (next-line-check-time time-frame) + (last-add-frame-val uint32) + ) + (:state-methods + tracking + die + ) + (:methods + (light-trail-tracker-method-16 (_type_ process-focusable vector) vector) + (light-trail-tracker-method-17 (_type_ process-focusable) symbol) + (light-trail-tracker-method-18 (_type_ process-focusable) symbol) + (light-trail-tracker-method-19 (_type_) symbol) + (light-trail-tracker-method-20 (_type_ vector) none) + ) + ) + +;; definition for method 3 of type light-trail-tracker +(defmethod inspect ((this light-trail-tracker)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Ttrail: ~A~%" (-> this trail)) + (format #t "~2Ttracked-object: ~D~%" (-> this tracked-object)) + (format #t "~2Toffscreen?: ~A~%" (-> this offscreen?)) + (format #t "~2Toffscreen-start-time: ~D~%" (-> this offscreen-start-time)) + (format #t "~2Tnext-line-check-time: ~D~%" (-> this next-line-check-time)) + (format #t "~2Tlast-add-frame-val: ~D~%" (-> this last-add-frame-val)) + (label cfg-4) + this + ) + +;; definition of type weapon-trail-tracker +(deftype weapon-trail-tracker (light-trail-tracker) + ((trail weapon-trail :override) + (joint0 int16) + (joint1 int16) + (state-time time-frame) + ) + (:state-methods + hang-on + ) + ) + +;; definition for method 3 of type weapon-trail-tracker +(defmethod inspect ((this weapon-trail-tracker)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type light-trail-tracker inspect))) + (t9-0 this) + ) + (format #t "~2Tjoint0: ~D~%" (-> this joint0)) + (format #t "~2Tjoint1: ~D~%" (-> this joint1)) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (label cfg-4) + this + ) + +;; definition of type tread-trail-tracker +(deftype tread-trail-tracker (light-trail-tracker) + ((trail tread-trail :override) + ) + ) + +;; definition for method 3 of type tread-trail-tracker +(defmethod inspect ((this tread-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 function light-trail-tracker-init-by-other +(defbehavior light-trail-tracker-init-by-other light-trail-tracker ((arg0 light-trail-tracker-spawn-params)) + (stack-size-set! (-> self main-thread) 32) + (set! (-> self tracked-object) (-> arg0 tracked-obj)) + (set! (-> self trail) (new 'process 'light-trail)) + (set! (-> self next-line-check-time) 0) + (set! (-> self last-add-frame-val) (the-as uint 0)) + (set! (-> self offscreen?) #f) + (light-trail-method-9 (-> self trail) (-> arg0 appearance) (-> arg0 max-num-crumbs)) + (when (-> arg0 track-immediately?) + (let ((gp-1 (handle->process (-> self tracked-object)))) + (if (light-trail-tracker-method-17 self (the-as process-focusable gp-1)) + (light-trail-method-11 + (-> self trail) + (light-trail-tracker-method-16 self (the-as process-focusable gp-1) (new 'stack-no-clear 'vector)) + (seconds 10000) + ) + ) + ) + ) + (go-virtual tracking) + ) + +;; definition for function weapon-trail-tracker-init-by-other +(defbehavior weapon-trail-tracker-init-by-other weapon-trail-tracker ((arg0 weapon-trail-tracker-spawn-params)) + (set! (-> self tracked-object) (-> arg0 tracked-obj)) + (set! (-> self trail) (new 'process 'weapon-trail)) + (set! (-> self next-line-check-time) 0) + (set! (-> self last-add-frame-val) (the-as uint 0)) + (set! (-> self joint0) (-> arg0 joint0)) + (set! (-> self joint1) (-> arg0 joint1)) + (set! (-> self offscreen?) #f) + (light-trail-method-9 (-> self trail) (-> arg0 appearance) (-> arg0 max-num-crumbs)) + (go-virtual tracking) + ) + +;; definition for function tread-trail-tracker-init-by-other +(defbehavior tread-trail-tracker-init-by-other tread-trail-tracker ((arg0 light-trail-tracker-spawn-params)) + (set! (-> self tracked-object) (-> arg0 tracked-obj)) + (set! (-> self trail) (new 'process 'tread-trail)) + (set! (-> self offscreen?) #f) + (set! (-> self next-line-check-time) 0) + (set! (-> self last-add-frame-val) (the-as uint 0)) + (light-trail-method-9 (-> self trail) (-> arg0 appearance) (-> arg0 max-num-crumbs)) + (go-virtual tracking) + ) + +;; definition of type light-trail-tracker-water +(deftype light-trail-tracker-water (light-trail-tracker) + () + ) + +;; definition for method 3 of type light-trail-tracker-water +(defmethod inspect ((this light-trail-tracker-water)) + (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 of type light-trail-tracker-projectile +(deftype light-trail-tracker-projectile (light-trail-tracker) + ((state-time time-frame) + ) + (:state-methods + hang-on + ) + ) + +;; definition for method 3 of type light-trail-tracker-projectile +(defmethod inspect ((this light-trail-tracker-projectile)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type light-trail-tracker inspect))) + (t9-0 this) + ) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/sprite/particles/light-trails_REF.gc b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/light-trails_REF.gc new file mode 100644 index 0000000000..0cfc2e20cf --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/light-trails_REF.gc @@ -0,0 +1,1328 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 9 of type light-trail +;; WARN: Return type mismatch int vs none. +(defmethod light-trail-method-9 ((this light-trail) (arg0 light-trail-composition) (arg1 int)) + (set! (-> this appearance) arg0) + (set! (-> this crumb-size) (the-as uint (max 16 (the-as int (-> this crumb-size))))) + (set! (-> this crumb-array) + (the-as + (array light-trail-breadcrumb) + (new 'process 'boxed-array uint8 (* arg1 (the-as int (-> this crumb-size)))) + ) + ) + (set! (-> this max-crumb-count) arg1) + (set! (-> this crumb-count) 0) + (set! (-> this strip) + (new 'process 'prim-strip (* arg1 2) (the-as texture-id (-> arg0 tex-id)) (the-as string #f)) + ) + (set! (-> this strip2) #f) + (if (= (-> this appearance lie-mode) 3) + (set! (-> this strip2) + (new 'process 'prim-strip (* arg1 2) (the-as texture-id (-> arg0 tex-id)) (the-as string #f)) + ) + ) + (light-trail-method-10 this) + 0 + (none) + ) + +;; definition for method 10 of type light-trail +;; WARN: Return type mismatch float vs none. +(defmethod light-trail-method-10 ((this light-trail)) + (set! (-> this crumb-count) 0) + (set! (-> this start-marker) (the-as uint (current-time))) + (set! (-> this end-marker) (the-as uint (current-time))) + (set! (-> this decision) (the-as uint 2)) + (set! (-> this total-distance-traveled) 0.0) + (none) + ) + +;; definition for method 11 of type light-trail +;; INFO: Used lq/sq +(defmethod light-trail-method-11 ((this light-trail) (arg0 vector) (arg1 time-frame)) + (local-vars (s3-0 int)) + (with-pp + (if (< (seconds 5000) arg1) + (set! arg1 (- (current-time) (-> pp clock old-frame-counter))) + ) + (let ((v1-5 (-> this crumb-count))) + 0.0 + (when (> v1-5 0) + (let* ((v1-8 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ v1-5 -1)))) + (f0-1 (vector-vector-distance (the-as vector (&+ v1-8 0)) arg0)) + ) + (cond + ((< f0-1 40.96) + (set! (-> this decision) (the-as uint 1)) + (set! s3-0 1) + (goto cfg-12) + ) + (else + (+! (-> this total-distance-traveled) f0-1) + ) + ) + ) + ) + ) + (set! s3-0 2) + (when (= (-> this crumb-count) (-> this max-crumb-count)) + (let ((a0-11 (&+ (-> this crumb-array data) (* (-> this crumb-size) 0))) + (a1-4 (&+ (-> this crumb-array data) (-> this crumb-size))) + (v1-20 (* (+ (-> this crumb-count) -1) (the-as int (-> this crumb-size)))) + ) + (quad-copy! a0-11 a1-4 (/ v1-20 16)) + ) + (+! (-> this crumb-count) -1) + (set! s3-0 0) + ) + (let ((a1-5 (new 'stack-no-clear 'light-trail-breadcrumb))) + (let ((f1-2 (the float (- (-> this start-marker) (-> this end-marker)))) + (f2-0 (the float (-> this appearance max-age))) + (f0-5 0.0) + ) + (if (-> this appearance use-tape-mode?) + (set! f0-5 (- f2-0 f1-2)) + ) + (set! (-> a1-5 pos quad) (-> arg0 quad)) + (set! (-> a1-5 pos w) (the-as float (the int (- (the float (+ (-> this start-marker) arg1)) f0-5)))) + ) + (mem-copy! + (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (-> this crumb-count))) + (the-as pointer a1-5) + (the-as int (-> this crumb-size)) + ) + ) + (+! (-> this crumb-count) 1) + (set! (-> this decision) (the-as uint 0)) + (label cfg-12) + s3-0 + ) + ) + +;; definition for method 21 of type light-trail +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod light-trail-method-21 ((this light-trail) (arg0 vector)) + (with-pp + (let ((v1-0 (-> this crumb-count))) + 0.0 + (cond + ((zero? v1-0) + (light-trail-method-11 this arg0 (seconds 10000)) + ) + (else + (set! (-> this decision) (the-as uint 0)) + (let ((gp-0 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ v1-0 -1))))) + (let ((f0-1 (vector-vector-distance (the-as vector (&+ gp-0 0)) arg0))) + (+! (-> this total-distance-traveled) f0-1) + (if (< f0-1 40.96) + (set! (-> this decision) (the-as uint 1)) + ) + ) + (let ((f1-3 (the float (- (-> this start-marker) (-> this end-marker)))) + (f2-0 (the float (-> this appearance max-age))) + (f0-4 0.0) + ) + (if (-> this appearance use-tape-mode?) + (set! f0-4 (- f2-0 f1-3)) + ) + (set! (-> (the-as light-trail-breadcrumb (&+ gp-0 0)) pos quad) (-> arg0 quad)) + (set! (-> gp-0 3) + (the-as + light-trail-breadcrumb + (the int (- (the float (+ (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter)))) f0-4)) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + ) + +;; definition for method 16 of type light-trail +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod add-vert! ((this light-trail) (arg0 prim-strip) (arg1 vector) (arg2 float) (arg3 float) (arg4 float)) + (let ((v1-3 (-> arg0 data (-> arg0 num-verts)))) + (set! (-> v1-3 pos quad) (-> arg1 quad)) + (set! (-> v1-3 col) (the-as rgba arg2)) + (set! (-> v1-3 stq x) arg3) + (set! (-> v1-3 stq y) arg4) + ) + (+! (-> arg0 num-verts) 1) + 0 + (none) + ) + +;; definition for method 17 of type light-trail +;; INFO: Used lq/sq +(defmethod light-trail-method-17 ((this light-trail) (arg0 vector) (arg1 float) (arg2 float) (arg3 vector) (arg4 float)) + (if (< (+ (-> this strip allocated-num-verts) -2) (-> this strip num-verts)) + (return #f) + ) + (cond + ((= (-> this appearance lie-mode) 3) + (let ((s1-0 (new 'stack-no-clear 'vector))) + (set! (-> s1-0 quad) (-> this cache-vector 0 quad)) + (vector-normalize! s1-0 (* 0.5 arg2)) + (add-vert! this (-> this strip) (vector+! (new 'stack-no-clear 'vector) arg0 s1-0) arg1 arg4 0.0) + (add-vert! this (-> this strip) (vector+float*! (new 'stack-no-clear 'vector) arg0 s1-0 -1.0) arg1 arg4 1.0) + ) + (let ((s1-1 (new 'stack-no-clear 'vector))) + (set! (-> s1-1 quad) (-> this cache-vector 1 quad)) + (vector-normalize! s1-1 (* 0.5 arg2)) + (add-vert! this (-> this strip2) (vector+! (new 'stack-no-clear 'vector) arg0 s1-1) arg1 arg4 0.0) + (add-vert! this (-> this strip2) (vector+float*! (new 'stack-no-clear 'vector) arg0 s1-1 -1.0) arg1 arg4 1.0) + ) + ) + (else + (let ((s1-2 (new 'stack-no-clear 'vector))) + (set! (-> s1-2 quad) (-> arg3 quad)) + (vector-normalize! s1-2 (* 0.5 arg2)) + (add-vert! this (-> this strip) (vector+! (new 'stack-no-clear 'vector) arg0 s1-2) arg1 arg4 0.0) + (add-vert! this (-> this strip) (vector+float*! (new 'stack-no-clear 'vector) arg0 s1-2 -1.0) arg1 arg4 1.0) + ) + ) + ) + #f + ) + +;; definition for function compute-trail-scaled-t +(defun compute-trail-scaled-t ((arg0 uint) (arg1 float) (arg2 float) (arg3 float) (arg4 float) (arg5 float) (arg6 vector)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + arg1 + ) + ((= v1-0 5) + (let* ((v1-2 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-3 (the-as number (logior #x3f800000 v1-2))) + ) + (+ -1.0 (the-as float v1-3)) + ) + ) + ((= v1-0 2) + (/ arg2 arg5) + ) + ((= v1-0 1) + (/ arg3 arg5) + ) + ((= v1-0 3) + (/ arg4 arg5) + ) + ((= v1-0 4) + (/ (vector-vector-distance (camera-pos) arg6) arg5) + ) + (else + 1.0 + ) + ) + ) + ) + +;; failed to figure out what this is: +(kmemopen global "light-trails") + +;; definition for symbol *dist-cache-array*, type (pointer float) +(define *dist-cache-array* (the-as (pointer float) (malloc 'global 4000))) + +;; definition for symbol *total-length*, type float +(define *total-length* 0.0) + +;; failed to figure out what this is: +(kmemclose) + +;; definition for method 18 of type light-trail +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs none. +(defmethod light-trail-method-18 ((this light-trail) (arg0 light-trail-breadcrumb) (arg1 int) (arg2 vector) (arg3 vector)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (cond + ((> (the-as uint arg1) 0) + (let ((t2-1 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint (+ arg1 -1)))))) + (vector-! v1-0 (-> arg0 pos) (the-as vector (&+ t2-1 0))) + ) + ) + (else + (let ((t1-6 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint (+ arg1 1)))))) + (vector-! v1-0 (the-as vector (&+ t1-6 0)) (-> arg0 pos)) + ) + ) + ) + (let ((a2-9 (-> this appearance lie-mode))) + (cond + ((= a2-9 1) + (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) + (set! (-> arg3 y) 0.0) + ) + ((zero? a2-9) + (vector-cross! arg3 (vector-! (new 'stack-no-clear 'vector) (-> arg0 pos) arg2) v1-0) + ) + ((= a2-9 2) + (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) + (set! (-> arg3 y) 0.0) + (vector-cross! arg3 v1-0 arg3) + ) + ((= a2-9 3) + (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) + (set! (-> arg3 y) 0.0) + (set! (-> this cache-vector 0 quad) (-> arg3 quad)) + (vector-cross! arg3 v1-0 (-> this appearance lie-vector)) + (set! (-> arg3 y) 0.0) + (vector-cross! arg3 v1-0 arg3) + (set! (-> this cache-vector 1 quad) (-> arg3 quad)) + ) + ) + ) + ) + (none) + ) + +;; definition for method 12 of type light-trail +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod light-trail-method-12 ((this light-trail)) + (local-vars + (sv-64 time-frame) + (sv-72 uint) + (sv-80 int) + (sv-88 float) + (sv-92 float) + (sv-96 float) + (sv-100 rgbaf) + (sv-104 vector) + (sv-128 vector) + (sv-132 vector) + (sv-136 float) + (sv-140 float) + (sv-144 float) + (sv-148 float) + (sv-152 float) + (sv-156 float) + (sv-192 float) + (sv-196 float) + (sv-200 vector) + (sv-204 vector) + ) + (set! (-> *dist-cache-array* 0) 0.0) + (set! *total-length* 0.0) + (let ((s5-0 (new 'stack-no-clear 'array 'int32 4))) + (set! (-> s5-0 0) (-> this crumb-count)) + (let ((s3-0 (+ (-> s5-0 0) -1)) + (s4-0 1) + ) + (while (>= s3-0 s4-0) + (let* ((v1-5 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint (+ s4-0 -1))))) + (a1-3 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint s4-0)))) + (a0-6 (- (-> this start-marker) (the-as uint (-> a1-3 3)))) + ) + (when (and (>= a0-6 0) (< a0-6 (-> this appearance max-age))) + (set! *total-length* + (+ *total-length* (vector-vector-distance (the-as vector (&+ v1-5 0)) (the-as vector (&+ a1-3 0)))) + ) + (set! (-> *dist-cache-array* s4-0) *total-length*) + ) + ) + (+! s4-0 1) + ) + ) + (set! sv-64 (-> this appearance max-age)) + (set! sv-72 (- (-> this start-marker) (-> this end-marker))) + (set! sv-80 0) + (set! sv-88 (the-as float 0.0)) + (set! sv-92 (the-as float -100.0)) + (set! sv-96 (the-as float 0.0)) + (set! sv-100 (new 'stack-no-clear 'rgbaf)) + (set! sv-104 (new 'stack-no-clear 'vector)) + (if (= (-> this appearance uv-mode) 3) + (set! sv-92 (the-as float 100.0)) + ) + (set! sv-128 (math-camera-pos)) + (set! sv-132 (new 'stack-no-clear 'vector)) + (set! (-> this strip num-verts) (the-as uint 0)) + (set! (-> this strip tex-id) (the-as texture-id (-> this appearance tex-id))) + (cond + ((not (-> this appearance zbuffer?)) + (set! (-> this strip adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> this strip data0) (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x80 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + ) + (else + (set! (-> this strip adnops 0 cmds) (gs-reg64 hack)) + (set! (-> this strip data0) (new 'static 'gs-test)) + 0 + ) + ) + (let ((v1-34 (-> this appearance blend-mode))) + (cond + ((= v1-34 1) + (set! (-> this strip alpha) (new 'static 'gs-alpha :b #x2 :d #x1)) + ) + ((zero? v1-34) + (set! (-> this strip alpha) (new 'static 'gs-alpha :b #x1 :d #x1)) + ) + ((= v1-34 2) + (set! (-> this strip alpha) (new 'static 'gs-alpha :a #x2 :d #x1)) + ) + ) + ) + (when (-> this strip2) + (set! (-> this strip2 num-verts) (the-as uint 0)) + (set! (-> this strip2 tex-id) (the-as texture-id (-> this appearance tex-id))) + (cond + ((not (-> this appearance zbuffer?)) + (set! (-> this strip2 adnops 0 cmds) (gs-reg64 test-1)) + (set! (-> this strip2 data0) (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x80 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + ) + (else + (set! (-> this strip2 adnops 0 cmds) (gs-reg64 hack)) + (set! (-> this strip2 data0) (new 'static 'gs-test)) + 0 + ) + ) + (let ((v1-52 (-> this appearance blend-mode))) + (cond + ((= v1-52 1) + (set! (-> this strip2 alpha) (new 'static 'gs-alpha :b #x2 :d #x1)) + ) + ((zero? v1-52) + (set! (-> this strip2 alpha) (new 'static 'gs-alpha :b #x1 :d #x1)) + ) + ((= v1-52 2) + (set! (-> this strip2 alpha) (new 'static 'gs-alpha :a #x2 :d #x1)) + ) + ) + ) + ) + (countdown (s5-1 (-> s5-0 0)) + (let* ((s3-1 s5-1) + (s4-1 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) s3-1))) + ) + (set! sv-136 (/ (the float (+ (- (-> this start-marker) (the-as uint (-> s4-1 3))) sv-80)) (the float sv-64))) + (when (or (< 1.0 sv-136) (< sv-136 0.0)) + ) + (when (and (>= 1.0 sv-136) (>= sv-136 0.0)) + (let* ((f30-1 (-> *dist-cache-array* s5-1)) + (f28-0 (- *total-length* f30-1)) + (f26-0 (- (-> this total-distance-traveled) f28-0)) + ) + (set! sv-140 (the-as float 1.0)) + (set! sv-144 (the-as float 1.0)) + (set! sv-148 (the-as float 1.0)) + (set! sv-152 (the-as float 0.0)) + (set! sv-156 (the-as float 0.0)) + (when (-> this appearance alpha-curve-1) + (set! sv-140 + (compute-trail-scaled-t + (-> this appearance alpha-1-mode) + sv-136 + f30-1 + f28-0 + f26-0 + (-> this appearance alpha-repeat-dist) + (the-as vector (&+ s4-1 0)) + ) + ) + (set! sv-140 (curve2d-method-9 (-> this appearance alpha-curve-1) sv-140 3)) + ) + (when (-> this appearance alpha-curve-2) + (set! sv-144 + (compute-trail-scaled-t + (-> this appearance alpha-2-mode) + sv-136 + f30-1 + f28-0 + f26-0 + (-> this appearance alpha-repeat-dist) + (the-as vector (&+ s4-1 0)) + ) + ) + (set! sv-144 (curve2d-method-9 (-> this appearance alpha-curve-2) sv-144 3)) + ) + (when (-> this appearance width-curve) + (set! sv-148 + (compute-trail-scaled-t + (-> this appearance width-mode) + sv-136 + f30-1 + f28-0 + f26-0 + (-> this appearance width-repeat-dist) + (the-as vector (&+ s4-1 0)) + ) + ) + (set! sv-148 (curve2d-method-9 (-> this appearance width-curve) sv-148 3)) + ) + (set! sv-152 + (compute-trail-scaled-t + (-> this appearance uv-mode) + sv-136 + f30-1 + f28-0 + f26-0 + (-> this appearance uv-repeat-dist) + (the-as vector (&+ s4-1 0)) + ) + ) + (when (or (< 1.0 sv-152) (< sv-152 0.0)) + (let ((f0-43 sv-152)) + (set! sv-152 (- f0-43 (the float (the int f0-43)))) + ) + ) + (set! sv-192 (* sv-140 sv-144 (-> this appearance base-alpha))) + (set! sv-196 (* sv-148 (-> this appearance base-width))) + (set! sv-200 (new 'stack-no-clear 'vector)) + (set! sv-204 (new 'stack-no-clear 'vector)) + (when (-> this appearance color-curve) + (set! sv-156 + (compute-trail-scaled-t + (-> this appearance color-mode) + sv-136 + f30-1 + f28-0 + f26-0 + (-> this appearance color-repeat-dist) + (the-as vector (&+ s4-1 0)) + ) + ) + (curve-color-method-9 (-> this appearance color-curve) sv-156 (the-as rgbaf sv-200) 3) + ) + ) + (set! (-> sv-200 w) (* (-> sv-200 w) sv-192)) + (light-trail-method-18 this (the-as light-trail-breadcrumb s4-1) s3-1 sv-128 sv-204) + (when (or (and (= (-> this appearance uv-mode) 3) (< sv-92 sv-152)) + (and (!= (-> this appearance uv-mode) 3) (< sv-152 sv-92)) + ) + (let ((s2-0 (new 'stack-no-clear 'inline-array 'vector 5))) + (set! (-> s2-0 3 z) (- sv-152)) + (set! (-> s2-0 3 w) (- sv-92 (-> s2-0 3 z))) + (set! (-> s2-0 4 x) (/ sv-92 (-> s2-0 3 w))) + (vector-lerp! (-> s2-0 0) sv-104 (the-as vector (&+ s4-1 0)) (-> s2-0 4 x)) + (rgbaf-lerp! (the-as rgbaf (-> s2-0 2)) sv-100 (the-as rgbaf sv-200) (-> s2-0 4 x)) + (set! (-> s2-0 3 y) (lerp sv-96 sv-196 (-> s2-0 4 x))) + (vector-lerp! (-> s2-0 1) sv-132 sv-204 (-> s2-0 4 x)) + (set! (-> s2-0 3 x) (the-as float (rgba<-rgbaf (the-as rgba (-> s2-0 3 x)) (the-as rgbaf (-> s2-0 2))))) + (light-trail-method-17 this (-> s2-0 0) (-> s2-0 3 x) (-> s2-0 3 y) (-> s2-0 1) 0.0) + (light-trail-method-17 this (-> s2-0 0) (-> s2-0 3 x) (-> s2-0 3 y) (-> s2-0 1) 1.0) + ) + ) + (light-trail-method-17 + this + (the-as vector (&+ s4-1 0)) + (the-as float (rgba<-rgbaf (the-as rgba (new 'stack-no-clear 'rgbaf)) (the-as rgbaf sv-200))) + sv-196 + sv-204 + sv-152 + ) + (when (> s3-1 0) + (let ((v1-149 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ s3-1 -1))))) + (set! sv-88 (+ sv-88 (vector-vector-distance (the-as vector (&+ s4-1 0)) (the-as vector (&+ v1-149 0))))) + ) + ) + (set! sv-92 sv-152) + (set! (-> sv-104 quad) (-> (the-as vector (&+ s4-1 0)) quad)) + (set! sv-96 sv-196) + (set! (-> sv-100 quad) (-> sv-200 quad)) + (set! (-> sv-132 quad) (-> sv-204 quad)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 19 of type light-trail +;; WARN: Return type mismatch int vs none. +(defmethod light-trail-method-19 ((this light-trail) (arg0 float) (arg1 int)) + 0 + (none) + ) + +;; definition for method 14 of type light-trail +;; WARN: Return type mismatch pointer vs none. +(defmethod light-trail-method-14 ((this light-trail)) + (let ((s4-0 (new 'stack-no-clear 'light-trail-breadcrumb)) + (s5-0 -1) + ) + (let ((s3-0 (-> this crumb-count))) + (dotimes (s2-0 s3-0) + (let ((a1-0 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint s2-0))))) + (cond + ((< (the-as uint (-> a1-0 3)) (-> this end-marker)) + (mem-copy! (the-as pointer s4-0) a1-0 16) + (set! s5-0 s2-0) + ) + (else + (goto cfg-8) + ) + ) + ) + ) + ) + (label cfg-8) + (when (>= s5-0 0) + (let ((s3-1 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint (+ s5-0 1))))) + (s2-1 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint s5-0)))) + ) + (let* ((f0-1 (the float (- (-> this start-marker) (the-as uint (-> s3-1 3))))) + (f1-1 (the float (- (-> this start-marker) (the-as uint (-> s4-0 pos w))))) + (f30-0 (/ (- (the float (-> this appearance max-age)) f0-1) (- f1-1 f0-1))) + ) + (light-trail-method-19 this f30-0 s5-0) + (vector-lerp! (the-as vector (&+ s2-1 0)) (the-as vector (&+ s3-1 0)) (-> s4-0 pos) f30-0) + ) + (set! (-> s2-1 3) (the-as light-trail-breadcrumb (-> this end-marker))) + ) + (when (> s5-0 0) + (set! (-> this crumb-count) (- (-> this crumb-count) s5-0)) + (mem-copy! + (&+ (-> this crumb-array data) (* (-> this crumb-size) 0)) + (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint s5-0))) + (* (-> this crumb-count) (the-as int (-> this crumb-size))) + ) + ) + ) + ) + (none) + ) + +;; definition for method 13 of type light-trail +(defmethod light-trail-method-13 ((this light-trail)) + (with-pp + (if (<= (-> this crumb-count) 0) + (return 0) + ) + (let ((v1-3 (-> this decision))) + (cond + ((= v1-3 2) + (return 0) + ) + ((zero? v1-3) + (+! (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter))) + (let ((v1-8 (- (-> this start-marker) (the-as uint (-> this appearance max-age))))) + (when (< (the-as int (-> this end-marker)) (the-as int v1-8)) + (set! (-> this end-marker) v1-8) + (light-trail-method-14 this) + ) + ) + ) + ((= v1-3 1) + (+! (-> this end-marker) (- (current-time) (-> pp clock old-frame-counter))) + (when (< (the-as int (-> this start-marker)) (the-as int (-> this end-marker))) + (reset-crumbs! this) + (set! (-> this end-marker) (-> this start-marker)) + ) + (+! (-> this end-marker) (- (current-time) (-> pp clock old-frame-counter))) + (+! (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter))) + ) + ) + ) + (set! (-> this decision) (the-as uint 1)) + 0 + ) + ) + +;; definition for method 20 of type light-trail +;; WARN: Return type mismatch int vs none. +(defmethod reset-crumbs! ((this light-trail)) + (set! (-> this crumb-count) 0) + 0 + (none) + ) + +;; definition for function light-trail-tracker-common-post +(defbehavior light-trail-tracker-common-post light-trail-tracker () + (cond + ((light-trail-tracker-method-19 self) + (light-trail-method-12 (-> self trail)) + ) + (else + (set! (-> self trail strip num-verts) (the-as uint 0)) + (when (-> self trail strip2) + (set! (-> self trail strip2 num-verts) (the-as uint 0)) + 0 + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate tracking (light-trail-tracker) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('notice) + (case (-> block param 0) + (('add-crumb) + (let ((a1-1 (handle->process (-> self tracked-object)))) + (light-trail-tracker-method-20 + self + (light-trail-tracker-method-16 self (the-as process-focusable a1-1) (new 'stack-no-clear 'vector)) + ) + ) + ) + (('add-crumb-elapsed) + (let ((a1-4 (handle->process (-> self tracked-object)))) + (light-trail-method-11 + (-> self trail) + (light-trail-tracker-method-16 self (the-as process-focusable a1-4) (new 'stack-no-clear 'vector)) + (the-as time-frame (the int (the-as float (-> block param 1)))) + ) + ) + ) + (('add-crumb-pos) + (light-trail-tracker-method-20 self (the-as vector (-> block param 1))) + ) + (('replace-last-crumb) + (light-trail-method-21 (-> self trail) (the-as vector (-> block param 1))) + ) + (('die) + (go-virtual die) + ) + ) + ) + ) + #t + ) + :trans (behavior () + (let ((gp-0 (handle->process (-> self tracked-object)))) + (cond + ((light-trail-tracker-method-18 self (the-as process-focusable gp-0)) + (go-virtual die) + ) + (else + (if (light-trail-tracker-method-17 self (the-as process-focusable gp-0)) + (light-trail-tracker-method-20 + self + (light-trail-tracker-method-16 self (the-as process-focusable gp-0) (new 'stack-no-clear 'vector)) + ) + ) + (light-trail-method-13 (-> self trail)) + 0 + ) + ) + ) + ) + :code sleep-code + :post light-trail-tracker-common-post + ) + +;; failed to figure out what this is: +(defstate die (light-trail-tracker) + :virtual #t + :enter (behavior () + '() + ) + :trans (behavior () + (light-trail-method-13 (-> self trail)) + ) + :code (behavior () + (until #f + (if (>= 1 (-> self trail crumb-count)) + (return #f) + ) + (suspend) + ) + #f + ) + :post light-trail-tracker-common-post + ) + +;; definition for method 7 of type light-trail-tracker +(defmethod relocate ((this light-trail-tracker) (offset int)) + (if (nonzero? (-> this trail)) + (&+! (-> this trail) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 7 of type light-trail +(defmethod relocate ((this light-trail) (offset int)) + (&+! (-> this crumb-array) offset) + (&+! (-> this strip) offset) + (if (-> this strip2) + (&+! (-> this strip2) offset) + ) + this + ) + +;; definition for method 16 of type light-trail-tracker +;; INFO: Used lq/sq +(defmethod light-trail-tracker-method-16 ((this light-trail-tracker) (arg0 process-focusable) (arg1 vector)) + (let ((a0-2 (if (type? arg0 process-focusable) + arg0 + ) + ) + ) + (if a0-2 + (set! (-> arg1 quad) (-> (get-trans a0-2 0) quad)) + ) + ) + arg1 + ) + +;; definition for method 17 of type light-trail-tracker +(defmethod light-trail-tracker-method-17 ((this light-trail-tracker) (arg0 process-focusable)) + #t + ) + +;; definition for method 16 of type light-trail-tracker-water +;; INFO: Used lq/sq +(defmethod light-trail-tracker-method-16 ((this light-trail-tracker-water) (arg0 process-focusable) (arg1 vector)) + (let ((a0-2 (if (type? arg0 process-focusable) + arg0 + ) + ) + ) + (when a0-2 + (let ((s5-1 (-> a0-2 water))) + (when (and s5-1 a0-2 (nonzero? s5-1)) + (set! (-> arg1 quad) (-> (get-trans a0-2 0) quad)) + (set! (-> arg1 y) (+ 40.96 (-> s5-1 surface-height))) + ) + ) + ) + ) + arg1 + ) + +;; definition for method 17 of type light-trail-tracker-water +;; WARN: Return type mismatch object vs symbol. +(defmethod light-trail-tracker-method-17 ((this light-trail-tracker-water) (arg0 process-focusable)) + (the-as symbol (and *target* (or (logtest? (water-flag touch-water) (-> *target* water flags)) + (logtest? (-> *target* control status) (collide-status on-water)) + ) + ) + ) + ) + +;; definition for method 18 of type light-trail-tracker +(defmethod light-trail-tracker-method-18 ((this light-trail-tracker) (arg0 process-focusable)) + (not arg0) + ) + +;; definition for method 18 of type light-trail-tracker-water +(defmethod light-trail-tracker-method-18 ((this light-trail-tracker-water) (arg0 process-focusable)) + (let ((v1-0 (if (type? arg0 process-focusable) + arg0 + ) + ) + ) + (or (not v1-0) + (not (-> v1-0 water)) + (not (logtest? (water-flag touch-water) (-> v1-0 water flags))) + (not (logtest? (water-flag break-surface) (-> v1-0 water flags))) + ) + ) + ) + +;; definition for function estimate-light-trail-mem-usage +;; WARN: Return type mismatch uint vs int. +(defun estimate-light-trail-mem-usage ((arg0 uint) (arg1 uint)) + (let* ((a2-0 (-> prim-vertex size)) + (a3-0 (-> prim-strip size)) + (v1-3 (-> light-trail size)) + (a0-3 (+ a3-0 (* arg0 (-> light-trail-breadcrumb size)) (* (* arg0 a2-0) 2))) + ) + (if arg1 + (set! a0-3 (* a0-3 2)) + ) + (the-as int (shl (+ (sar (+ v1-3 a0-3) 10) 1) 10)) + ) + ) + +;; definition for method 18 of type light-trail-tracker-projectile +(defmethod light-trail-tracker-method-18 ((this light-trail-tracker-projectile) (arg0 process-focusable)) + (if (not arg0) + (set! (-> this tracked-object) (the-as handle #f)) + ) + #f + ) + +;; definition for method 16 of type light-trail-tracker-projectile +;; INFO: Used lq/sq +(defmethod light-trail-tracker-method-16 ((this light-trail-tracker-projectile) (arg0 process-focusable) (arg1 vector)) + (let ((a0-1 arg0)) + (if a0-1 + (set! (-> arg1 quad) (-> a0-1 root trans quad)) + ) + ) + arg1 + ) + +;; failed to figure out what this is: +(defstate tracking (light-trail-tracker-projectile) + :virtual #t + :trans (behavior () + (let ((gp-0 (handle->process (-> self tracked-object)))) + (cond + ((not gp-0) + (go-virtual hang-on) + ) + (else + (if (light-trail-tracker-method-17 self (the-as process-focusable gp-0)) + (light-trail-tracker-method-20 + self + (light-trail-tracker-method-16 self (the-as process-focusable gp-0) (new 'stack-no-clear 'vector)) + ) + ) + (light-trail-method-13 (-> self trail)) + ) + ) + ) + ) + :code sleep-code + :post light-trail-tracker-common-post + ) + +;; failed to figure out what this is: +(defstate hang-on (light-trail-tracker-projectile) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 2)) + (go-virtual die) + ) + (light-trail-method-13 (-> self trail)) + ) + :code sleep-code + :post light-trail-tracker-common-post + ) + +;; failed to figure out what this is: +(defstate hang-on (weapon-trail-tracker) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 2)) + (go-virtual die) + ) + (light-trail-method-13 (-> self trail)) + ) + :code sleep-code + :post light-trail-tracker-common-post + ) + +;; failed to figure out what this is: +(defstate tracking (weapon-trail-tracker) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('notice) + (case (-> block param 0) + (('die) + (go-virtual hang-on) + ) + (('add-crumbs) + (let ((a1-1 (-> block param 1)) + (a2-1 (-> block param 2)) + ) + (weapon-trail-method-22 (-> self trail) (the-as vector a1-1) (the-as vector a2-1)) + ) + ) + ) + ) + ) + #t + ) + :trans (behavior () + (let ((gp-0 (handle->process (-> self tracked-object)))) + (cond + ((light-trail-tracker-method-18 self (the-as process-focusable gp-0)) + (go-virtual hang-on) + ) + (else + (when (and (>= (-> self joint0) 0) (>= (-> self joint1) 0)) + (let ((s5-0 (vector<-cspace! + (new 'stack-no-clear 'vector) + (-> (the-as process-drawable gp-0) node-list data (-> self joint0)) + ) + ) + (a2-0 (vector<-cspace! + (new 'stack-no-clear 'vector) + (-> (the-as process-drawable gp-0) node-list data (-> self joint1)) + ) + ) + ) + (weapon-trail-method-22 (-> self trail) s5-0 a2-0) + ) + ) + (light-trail-method-13 (-> self trail)) + ) + ) + ) + ) + :code sleep-code + :post light-trail-tracker-common-post + ) + +;; failed to figure out what this is: +(defstate tracking (tread-trail-tracker) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('reset) + (light-trail-method-10 (-> self trail)) + ) + (('notice) + (case (-> block param 0) + (('die) + (go-virtual die) + ) + (('add-crumbs) + (let ((a1-1 (-> block param 0)) + (a2-1 (-> block param 1)) + ) + (tread-trail-method-22 (-> self trail) (the-as vector a1-1) (the-as vector a2-1)) + ) + ) + ) + ) + ) + #t + ) + :trans (behavior () + (let ((gp-0 (handle->process (-> self tracked-object)))) + (cond + ((light-trail-tracker-method-18 self (the-as process-focusable gp-0)) + (go-virtual die) + ) + (else + (when (and gp-0 (nonzero? (-> (the-as process-drawable gp-0) draw))) + (let ((a1-2 (-> (the-as process-drawable gp-0) draw))) + (setup-dma-and-tex (-> self trail strip) a1-2) + ) + ) + (light-trail-method-13 (-> self trail)) + ) + ) + ) + ) + :code sleep-code + :post light-trail-tracker-common-post + ) + +;; definition for method 18 of type weapon-trail +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs none. +(defmethod light-trail-method-18 ((this weapon-trail) (arg0 light-trail-breadcrumb) (arg1 int) (arg2 vector) (arg3 vector)) + (set! (-> arg3 quad) (-> (&+ arg0 16) pos quad)) + (none) + ) + +;; definition for method 9 of type weapon-trail +(defmethod light-trail-method-9 ((this weapon-trail) (arg0 light-trail-composition) (arg1 int)) + (set! (-> this crumb-size) (the-as uint 32)) + (call-parent-method this arg0 arg1) + (none) + ) + +;; definition for method 22 of type weapon-trail +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer light-trail-breadcrumb) vs light-trail-breadcrumb. +(defmethod weapon-trail-method-22 ((this weapon-trail) (arg0 vector) (arg1 vector)) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (v1-0 (new 'stack-no-clear 'vector)) + ) + (vector-! gp-0 arg1 arg0) + (vector-float*! gp-0 gp-0 0.5) + (vector+! v1-0 arg0 gp-0) + (let ((v1-1 (light-trail-method-11 this v1-0 (seconds 10000)))) + (the-as + light-trail-breadcrumb + (when (!= v1-1 1) + (let ((v0-1 + (the-as + object + (&+ (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ (-> this crumb-count) -1))) 16) + ) + ) + ) + (set! (-> (the-as light-trail-breadcrumb v0-1) pos quad) (-> gp-0 quad)) + v0-1 + ) + ) + ) + ) + ) + ) + +;; definition for method 23 of type weapon-trail +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod weapon-trail-method-23 ((this weapon-trail) (arg0 vector) (arg1 vector)) + (local-vars (gp-0 (pointer light-trail-breadcrumb)) (f0-2 float)) + (with-pp + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (v1-0 (-> this crumb-count)) + ) + 0.0 + (cond + ((zero? v1-0) + (weapon-trail-method-22 this arg0 arg1) + ) + ((begin + (set! (-> this decision) (the-as uint 0)) + (set! gp-0 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ v1-0 -1)))) + (vector-! s4-0 arg1 arg0) + (vector-float*! s4-0 s4-0 0.5) + (vector+! s3-0 arg0 s4-0) + (set! f0-2 (vector-vector-distance (the-as vector (&+ gp-0 0)) s3-0)) + (< f0-2 40.96) + ) + (set! (-> this decision) (the-as uint 1)) + ) + (else + (+! (-> this total-distance-traveled) f0-2) + (let ((f1-2 (the float (- (-> this start-marker) (-> this end-marker)))) + (f2-0 (the float (-> this appearance max-age))) + (f0-6 0.0) + ) + (if (-> this appearance use-tape-mode?) + (set! f0-6 (- f2-0 f1-2)) + ) + (set! (-> (the-as light-trail-breadcrumb (&+ gp-0 0)) pos quad) (-> s3-0 quad)) + (set! (-> (the-as light-trail-breadcrumb (&+ gp-0 16)) pos quad) (-> s4-0 quad)) + (set! (-> gp-0 3) + (the-as + light-trail-breadcrumb + (the int (- (the float (+ (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter)))) f0-6)) + ) + ) + ) + ) + ) + ) + (none) + ) + ) + +;; definition for method 19 of type weapon-trail +;; WARN: Return type mismatch vector vs none. +(defmethod light-trail-method-19 ((this weapon-trail) (arg0 float) (arg1 int)) + (let ((v1-2 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) arg1))) + (a2-2 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ arg1 1)))) + ) + (vector-lerp! (the-as vector (&+ v1-2 16)) (the-as vector (&+ a2-2 16)) (the-as vector (&+ v1-2 16)) arg0) + ) + (none) + ) + +;; definition for method 17 of type weapon-trail +;; INFO: Used lq/sq +(defmethod light-trail-method-17 ((this weapon-trail) (arg0 vector) (arg1 float) (arg2 float) (arg3 vector) (arg4 float)) + (when (< (+ (-> this strip allocated-num-verts) -2) (-> this strip num-verts)) + (format 0 "Out of stuff (~d)~%" (-> this strip allocated-num-verts)) + (return #f) + ) + (vector-float*! arg3 arg3 arg2) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (set! (-> s2-0 quad) (-> arg3 quad)) + (add-vert! this (-> this strip) (vector+! (new 'stack-no-clear 'vector) arg0 s2-0) arg1 arg4 0.0) + (add-vert! this (-> this strip) (vector+float*! (new 'stack-no-clear 'vector) arg0 s2-0 -1.0) arg1 arg4 1.0) + ) + #f + ) + +;; definition for method 18 of type tread-trail +;; WARN: Return type mismatch vector vs none. +(defmethod light-trail-method-18 ((this tread-trail) (arg0 light-trail-breadcrumb) (arg1 int) (arg2 vector) (arg3 vector)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (cond + ((> (the-as uint arg1) 0) + (let ((a3-3 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint (+ arg1 -1)))))) + (vector-! v1-0 (-> arg0 pos) (the-as vector (&+ a3-3 0))) + ) + ) + (else + (let ((a2-5 (&+ (-> this crumb-array data) (* (-> this crumb-size) (the-as uint (+ arg1 1)))))) + (vector-! v1-0 (the-as vector (&+ a2-5 0)) (-> arg0 pos)) + ) + ) + ) + (vector-cross! arg3 v1-0 (the-as vector (&+ arg0 16))) + ) + (none) + ) + +;; definition for method 9 of type tread-trail +(defmethod light-trail-method-9 ((this tread-trail) (arg0 light-trail-composition) (arg1 int)) + (set! (-> this crumb-size) (the-as uint 32)) + (call-parent-method this arg0 arg1) + (none) + ) + +;; definition for method 19 of type tread-trail +;; WARN: Return type mismatch vector vs none. +(defmethod light-trail-method-19 ((this tread-trail) (arg0 float) (arg1 int)) + (let ((v1-2 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) arg1))) + (a2-2 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ arg1 1)))) + ) + (vector-lerp! (the-as vector (&+ v1-2 16)) (the-as vector (&+ a2-2 16)) (the-as vector (&+ v1-2 16)) arg0) + ) + (none) + ) + +;; definition for method 22 of type tread-trail +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer light-trail-breadcrumb) vs light-trail-breadcrumb. +(defmethod tread-trail-method-22 ((this tread-trail) (arg0 vector) (arg1 vector)) + (let ((v1-1 (light-trail-method-11 this arg0 (seconds 10000)))) + (the-as + light-trail-breadcrumb + (when (!= v1-1 1) + (let ((v0-1 + (the-as + object + (&+ (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ (-> this crumb-count) -1))) 16) + ) + ) + ) + (set! (-> (the-as light-trail-breadcrumb v0-1) pos quad) (-> arg1 quad)) + v0-1 + ) + ) + ) + ) + ) + +;; definition for method 23 of type tread-trail +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs light-trail-breadcrumb. +(defmethod tread-trail-method-23 ((this tread-trail) (arg0 vector) (arg1 vector)) + (with-pp + (let ((v1-0 (-> this crumb-count))) + 0.0 + (the-as + light-trail-breadcrumb + (cond + ((zero? v1-0) + (tread-trail-method-22 this arg0 arg1) + ) + (else + (set! (-> this decision) (the-as uint 0)) + (let ((s5-0 (&+ (-> this crumb-array data) (* (the-as int (-> this crumb-size)) (+ v1-0 -1))))) + (let ((f0-1 (vector-vector-distance (the-as vector (&+ s5-0 0)) arg0))) + (+! (-> this total-distance-traveled) f0-1) + (if (< f0-1 40.96) + (set! (-> this decision) (the-as uint 1)) + ) + ) + (let ((f1-3 (the float (- (-> this start-marker) (-> this end-marker)))) + (f2-0 (the float (-> this appearance max-age))) + (f0-4 0.0) + ) + (if (-> this appearance use-tape-mode?) + (set! f0-4 (- f2-0 f1-3)) + ) + (set! (-> (the-as light-trail-breadcrumb (&+ s5-0 0)) pos quad) (-> arg0 quad)) + (set! (-> s5-0 3) + (the-as + light-trail-breadcrumb + (the int (- (the float (+ (-> this start-marker) (- (current-time) (-> pp clock old-frame-counter)))) f0-4)) + ) + ) + ) + (let ((v0-0 (the-as object (&+ s5-0 16)))) + (set! (-> (the-as light-trail-breadcrumb v0-0) pos quad) (-> arg1 quad)) + v0-0 + ) + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 19 of type light-trail-tracker +(defmethod light-trail-tracker-method-19 ((this light-trail-tracker)) + (let ((a1-0 (handle->process (-> this tracked-object)))) + #t + (let ((v1-4 #t)) + (let ((a0-4 #f)) + (if (and a1-0 + (nonzero? (-> (the-as process-drawable a1-0) draw)) + (logtest? (-> (the-as process-drawable a1-0) draw status) + (draw-control-status no-draw no-draw-temp no-draw-bounds no-draw-bounds2) + ) + ) + (set! v1-4 #f) + ) + (if (and a1-0 + (nonzero? (-> (the-as process-drawable a1-0) draw)) + (logtest? (-> (the-as process-drawable a1-0) draw status) (draw-control-status on-screen)) + ) + (set! a0-4 #t) + ) + (when v1-4 + (if (and (-> this offscreen?) (not a0-4)) + (set! v1-4 #f) + ) + (when (< (-> this next-line-check-time) (current-time)) + (let ((a0-11 (-> this trail crumb-count))) + (when (< 1 a0-11) + (let ((v1-8 (&+ (-> this trail crumb-array data) (* (-> this trail crumb-size) 0))) + (a1-19 (&+ (-> this trail crumb-array data) (* (the-as int (-> this trail crumb-size)) (+ a0-11 -1)))) + ) + (set! v1-4 (line-in-view-frustum? (the-as vector (&+ v1-8 0)) (the-as vector (&+ a1-19 0)))) + ) + ) + ) + (set-time! (-> this next-line-check-time)) + ) + ) + ) + (when (and (not v1-4) (not (-> this offscreen?))) + (set! (-> this offscreen?) #t) + (set-time! (-> this offscreen-start-time)) + ) + (if (and v1-4 (-> this offscreen?)) + (set! (-> this offscreen?) #f) + ) + ) + ) + (or (not (-> this offscreen?)) (not (time-elapsed? + (-> this offscreen-start-time) + (the int (* 0.5 (the float (-> this trail appearance max-age)))) + ) + ) + ) + ) + +;; definition for method 20 of type light-trail-tracker +;; WARN: Return type mismatch uint vs none. +(defmethod light-trail-tracker-method-20 ((this light-trail-tracker) (arg0 vector)) + (if (zero? (mod (-> this last-add-frame-val) (-> this trail appearance frame-stagger))) + (light-trail-method-11 (-> this trail) arg0 (seconds 10000)) + (light-trail-method-21 (-> this trail) arg0) + ) + (+! (-> this last-add-frame-val) 1) + (none) + ) diff --git a/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-h_REF.gc index 638eec1d70..2fbf543184 100644 --- a/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-h_REF.gc @@ -23,6 +23,7 @@ (friction float) (timer int32) (flags sp-cpuinfo-flag) + (flags-s32 int32 :overlay-at flags) (user-int32 int32) (user-uint32 uint32 :overlay-at user-int32) (user-float float :overlay-at user-int32) @@ -148,6 +149,9 @@ There are separate systems for different modes of sprite rendering: 2D/billboard (vecdata-table pointer) (adgifdata-table (inline-array adgif-shader)) ) + (:methods + (new (symbol type int int symbol pointer (inline-array adgif-shader)) _type_) + ) ) ;; definition for method 3 of type sparticle-system diff --git a/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-launcher-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-launcher-h_REF.gc index f0f8490a29..d44fb97088 100644 --- a/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-launcher-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-launcher-h_REF.gc @@ -54,6 +54,7 @@ (sym symbol :overlay-at initial-valuef) (sound sound-spec :overlay-at initial-valuef) ) + :allow-misaligned ) ;; definition for method 3 of type sp-field-init-spec @@ -260,13 +261,13 @@ particle system itself. This type just holds the launching-related state." (data sparticle-launch-state :inline :dynamic) ) (:methods - (sparticle-launch-control-method-14 () none) - (sparticle-launch-control-method-15 () none) + (initialize (_type_ sparticle-launch-group process-drawable) none) + (is-visible? (_type_ vector) symbol) (spawn (_type_ vector) object) - (sparticle-launch-control-method-17 (_type_ matrix) none) - (sparticle-launch-control-method-18 (_type_ cspace) none) + (spawn-from-mat (_type_ matrix) none) + (spawn-from-cspace (_type_ cspace) none) (kill-particles (_type_) none) - (sparticle-launch-control-method-20 (_type_ float) none) + (set-local-space-info (_type_ particle-local-space-info) none) ) ) @@ -282,11 +283,11 @@ particle system itself. This type just holds the launching-related state." (format #t "~1Tgroup: ~A~%" (-> this group)) (format #t "~1Tproc: ~A~%" (-> this proc)) (format #t "~1Tlocal-clock: ~D~%" (-> this local-clock)) - (format #t "~1Tfade: ~f~%" (-> this fade)) + (format #t "~1Tfade: ~f~%" (the-as float (-> this local-space-binding))) (format #t "~1Tmatrix: ~D~%" (-> this matrix)) (format #t "~1Tstate-mode[3] @ #x~X~%" (-> this state-mode)) (format #t "~1Tstate-counter: ~D~%" (-> this state-counter)) - (format #t "~1Tlocal-space-binding: #~%" (-> this fade)) + (format #t "~1Tlocal-space-binding: #~%" (-> this local-space-binding)) (format #t "~1Tlast-spawn-frame: ~D~%" (-> this last-spawn-frame)) (format #t "~1Tlast-spawn-time: ~D~%" (-> this last-spawn-time)) (format #t "~1Torigin: #~%" (-> this origin)) @@ -309,8 +310,8 @@ particle system itself. This type just holds the launching-related state." ) (:methods (new (symbol type sparticle-system sparticle-launcher float) _type_) - (sparticle-subsampler-method-9 () none) - (sparticle-subsampler-method-10 (_type_ matrix) none) + (init-with-vec! (_type_ vector) vector) + (init-with-mat! (_type_ matrix) matrix) ) ) diff --git a/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-launcher_REF.gc b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-launcher_REF.gc new file mode 100644 index 0000000000..a68c8c5cbb --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle-launcher_REF.gc @@ -0,0 +1,3217 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 3 of type sparticle-launcher +;; WARN: Return type mismatch int vs sparticle-launcher. +(defmethod inspect ((this sparticle-launcher)) + (format #t "~X: sparticle-launcher~%" this) + (let ((s5-0 0)) + (while (!= (-> this init-specs s5-0 field) (sp-field-id spt-end)) + (let* ((v1-1 (-> this init-specs s5-0)) + (t9-1 format) + (a0-3 #t) + (a1-1 "~T~S : ~F / #x~X / ~D~%") + (a2-1 (-> v1-1 field)) + ) + (t9-1 + a0-3 + a1-1 + (cond + ((= a2-1 (sp-field-id spt-rotate-x)) + "spt-rotate-x" + ) + ((= a2-1 (sp-field-id sprite-fields-end)) + "sprite-fields-end" + ) + ((= a2-1 (sp-field-id spt-quat-z)) + "spt-quat-z" + ) + ((= a2-1 (sp-field-id spt-next-launcher)) + "spt-next-launcher" + ) + ((= a2-1 (sp-field-id cpu-fields-start)) + "cpu-fields-start" + ) + ((= a2-1 (sp-field-id spt-rotvel-z)) + "spt-rotvel-z" + ) + ((= a2-1 (sp-field-id launch-fields-end)) + "launch-fields-end" + ) + ((= a2-1 (sp-field-id spt-conerot-w)) + "spt-conerot-w" + ) + ((= a2-1 (sp-field-id spt-fade-a)) + "spt-fade-a" + ) + ((= a2-1 (sp-field-id spt-a)) + "spt-a" + ) + ((= a2-1 (sp-field-id spt-friction)) + "spt-friction" + ) + ((= a2-1 (sp-field-id spt-b)) + "spt-b" + ) + ((= a2-1 (sp-field-id spt-launchrot-x)) + "spt-launchrot-x" + ) + ((= a2-1 (sp-field-id spt-rotate-z)) + "spt-rotate-z" + ) + ((= a2-1 (sp-field-id spt-anim)) + "spt-anim" + ) + ((= a2-1 (sp-field-id spt-fade-g)) + "spt-fade-g" + ) + ((= a2-1 (sp-field-id spt-g)) + "spt-g" + ) + ((= a2-1 (sp-field-id spt-mat-scale-z)) + "spt-mat-scale-z" + ) + ((= a2-1 (sp-field-id spt-scale)) + "spt-scale" + ) + ((= a2-1 (sp-field-id spt-vel-z)) + "spt-vel-z" + ) + ((= a2-1 (sp-field-id spt-dummy)) + "spt-dummy" + ) + ((= a2-1 (sp-field-id spt-accel-z)) + "spt-accel-z" + ) + ((= a2-1 (sp-field-id spt-fade-r)) + "spt-fade-r" + ) + ((= a2-1 (sp-field-id spt-quat-x)) + "spt-quat-x" + ) + ((= a2-1 (sp-field-id spt-rot-y)) + "spt-rot-y" + ) + ((= a2-1 (sp-field-id cpu-fields-end)) + "cpu-fields-end" + ) + ((= a2-1 (sp-field-id spt-accel-y)) + "spt-accel-y" + ) + ((= a2-1 (sp-field-id spt-vel-x)) + "spt-vel-x" + ) + ((= a2-1 (sp-field-id spt-x)) + "spt-x" + ) + ((= a2-1 (sp-field-id spt-omega)) + "spt-omega" + ) + ((= a2-1 (sp-field-id spt-accel-x)) + "spt-accel-x" + ) + ((= a2-1 (sp-field-id spt-y)) + "spt-y" + ) + ((= a2-1 (sp-field-id spt-sound)) + "spt-sound" + ) + ((= a2-1 (sp-field-id spt-z)) + "spt-z" + ) + ((= a2-1 (sp-field-id spt-r)) + "spt-r" + ) + ((= a2-1 (sp-field-id misc-fields-end)) + "misc-fields-end" + ) + ((= a2-1 (sp-field-id spt-birth-func)) + "spt-birth-func" + ) + ((= a2-1 (sp-field-id spt-rotvel-y)) + "spt-rotvel-y" + ) + ((= a2-1 (sp-field-id spt-userdata)) + "spt-userdata" + ) + ((= a2-1 (sp-field-id spt-launchrot-w)) + "spt-launchrot-w" + ) + ((= a2-1 (sp-field-id spt-quad-w)) + "spt-quad-w" + ) + ((= a2-1 (sp-field-id spt-fade-b)) + "spt-fade-b" + ) + ((= a2-1 (sp-field-id spt-anim-speed)) + "spt-anim-speed" + ) + ((= a2-1 (sp-field-id spt-timer)) + "spt-timer" + ) + ((= a2-1 (sp-field-id spt-mat-scale-y)) + "spt-mat-scale-y" + ) + ((= a2-1 (sp-field-id spt-rotate-y)) + "spt-rotate-y" + ) + ((= a2-1 (sp-field-id spt-joint/refpoint)) + "spt-joint/refpoint" + ) + ((= a2-1 (sp-field-id spt-next-time)) + "spt-next-time" + ) + ((= a2-1 (sp-field-id spt-launchrot-z)) + "spt-launchrot-z" + ) + ((= a2-1 (sp-field-id spt-conerot-z)) + "spt-conerot-z" + ) + ((= a2-1 (sp-field-id spt-scale-y)) + "spt-scale-y" + ) + ((= a2-1 (sp-field-id spt-flags)) + "spt-flags" + ) + ((= a2-1 (sp-field-id spt-scale-x)) + "spt-scale-x" + ) + ((= a2-1 (sp-field-id spt-quat-y)) + "spt-quat-y" + ) + ((= a2-1 (sp-field-id spt-scalevel-y)) + "spt-scalevel-y" + ) + ((= a2-1 (sp-field-id spt-mat-scale-x)) + "spt-mat-scale-x" + ) + ((= a2-1 (sp-field-id spt-conerot-y)) + "spt-conerot-y" + ) + ((= a2-1 (sp-field-id launch-fields-start)) + "launch-fields-start" + ) + ((= a2-1 (sp-field-id sprite-fields-start)) + "sprite-fields-start" + ) + ((= a2-1 (sp-field-id spt-vel-y)) + "spt-vel-y" + ) + ((= a2-1 (sp-field-id spt-rot-z)) + "spt-rot-z" + ) + ((= a2-1 (sp-field-id misc-fields-start)) + "misc-fields-start" + ) + ((= a2-1 (sp-field-id spt-rot-x)) + "spt-rot-x" + ) + ((= a2-1 (sp-field-id spt-scalevel)) + "spt-scalevel" + ) + ((= a2-1 (sp-field-id spt-conerot-x)) + "spt-conerot-x" + ) + ((= a2-1 (sp-field-id spt-num)) + "spt-num" + ) + ((= a2-1 (sp-field-id spt-launchrot-y)) + "spt-launchrot-y" + ) + ((= a2-1 (sp-field-id spt-end)) + "spt-end" + ) + ((= a2-1 (sp-field-id spt-texture)) + "spt-texture" + ) + ((= a2-1 (sp-field-id spt-rotvel-x)) + "spt-rotvel-x" + ) + ((= a2-1 (sp-field-id spt-scalevel-x)) + "spt-scalevel-x" + ) + ((= a2-1 (sp-field-id spt-conerot-radius)) + "spt-conerot-radius" + ) + ((= a2-1 (sp-field-id spt-func)) + "spt-func" + ) + (else + "*unknown*" + ) + ) + (-> v1-1 initial-valuef) + (-> v1-1 initial-valuef) + (-> v1-1 initial-valuef) + ) + ) + (+! s5-0 1) + ) + ) + (the-as sparticle-launcher 0) + ) + +;; failed to figure out what this is: +(kmemopen global "part-tables") + +;; definition for symbol *part-id-table*, type (array sparticle-launcher) +(define *part-id-table* (new 'global 'boxed-array sparticle-launcher 5500)) + +;; definition for symbol *part-group-id-table*, type (array sparticle-launch-group) +(define *part-group-id-table* (new 'global 'boxed-array sparticle-launch-group 1700)) + +;; definition for symbol *sp-temp*, type float +(define *sp-temp* 0.0) + +;; failed to figure out what this is: +(kmemclose) + +;; definition for function lookup-part-group-by-name +(defun lookup-part-group-by-name ((arg0 string)) + (let* ((s5-0 *part-group-id-table*) + (s4-0 (-> s5-0 length)) + ) + (dotimes (s3-0 s4-0) + (let ((s2-0 (-> s5-0 s3-0))) + (if (and (nonzero? s2-0) (string= arg0 (-> s2-0 name))) + (return s2-0) + ) + ) + ) + ) + (the-as sparticle-launch-group #f) + ) + +;; definition for function lookup-part-group-pointer-by-name +;; WARN: Return type mismatch (pointer sparticle-launch-group) vs (pointer object). +(defun lookup-part-group-pointer-by-name ((arg0 string)) + (let* ((s4-0 *part-group-id-table*) + (s3-0 (-> s4-0 length)) + ) + (dotimes (gp-0 s3-0) + (let ((v1-2 (-> s4-0 gp-0))) + (if (and (nonzero? v1-2) (string= arg0 (-> v1-2 name))) + (return (the-as (pointer object) (&+ (-> s4-0 data) (* gp-0 4)))) + ) + ) + ) + ) + (the-as (pointer sparticle-launch-group) #f) + ) + +;; definition for function part-group-pointer? +(defun part-group-pointer? ((arg0 pointer)) + (let ((v1-0 *part-group-id-table*)) + (and (>= (the-as int arg0) (the-as int (-> v1-0 data))) (< (the-as int arg0) (the-as int (&-> v1-0 1700)))) + ) + ) + +;; definition for function unlink-part-group-by-heap +(defun unlink-part-group-by-heap ((arg0 kheap)) + (let* ((v1-0 *part-group-id-table*) + (a2-0 (-> v1-0 length)) + (a1-0 (-> arg0 base)) + (a0-1 (-> arg0 top-base)) + ) + (while (nonzero? a2-0) + (+! a2-0 -1) + (let ((a3-2 (-> v1-0 a2-0))) + (when (and (>= (the-as int a3-2) (the-as int a1-0)) (< (the-as int a3-2) (the-as int a0-1))) + (set! (-> v1-0 a2-0) (the-as sparticle-launch-group 0)) + 0 + ) + ) + ) + ) + 0 + ) + +;; definition for function sp-init-fields! +;; INFO: function output is handled by mips2c +(def-mips2c sp-init-fields! (function (pointer float) (inline-array sp-field-init-spec) sp-field-id sp-field-id symbol (inline-array sp-field-init-spec))) + +;; definition of type sp-queued-launch-particles +(deftype sp-queued-launch-particles (structure) + ((sp-system sparticle-system) + (sp-launcher sparticle-launcher) + (pos vector :inline) + ) + ) + +;; definition for method 3 of type sp-queued-launch-particles +(defmethod inspect ((this sp-queued-launch-particles)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'sp-queued-launch-particles) + (format #t "~1Tsp-system: ~A~%" (-> this sp-system)) + (format #t "~1Tsp-launcher: ~A~%" (-> this sp-launcher)) + (format #t "~1Tpos: #~%" (-> this pos)) + (label cfg-4) + this + ) + +;; definition of type sp-launch-queue +(deftype sp-launch-queue (basic) + ((in-use int32) + (queue sp-queued-launch-particles 256 :inline) + ) + ) + +;; definition for method 3 of type sp-launch-queue +(defmethod inspect ((this sp-launch-queue)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tin-use: ~D~%" (-> this in-use)) + (format #t "~1Tqueue[256] @ #x~X~%" (-> this queue)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(kmemopen global "launcher-queue") + +;; definition for symbol *sp-launcher-lock*, type symbol +(define *sp-launcher-lock* #f) + +;; definition for symbol *sp-launch-queue*, type sp-launch-queue +(define *sp-launch-queue* (new 'global 'sp-launch-queue)) + +;; definition for symbol *sp-launcher-enable*, type symbol +(define *sp-launcher-enable* #t) + +;; failed to figure out what this is: +(kmemclose) + +;; definition for function particle-setup-adgif +;; WARN: Return type mismatch int vs none. +(defun particle-setup-adgif ((arg0 adgif-shader) (arg1 int)) + (let ((a1-1 (lookup-texture-by-id-fast (the-as texture-id arg1))) + (s5-0 #f) + ) + (when (not a1-1) + (set! a1-1 (get-texture common-white common)) + (set! s5-0 #t) + ) + (set! (-> arg0 tex1) (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (set! (-> arg0 tex0 tfx) 0) + (adgif-shader<-texture! arg0 a1-1) + (set! (-> arg0 prims 1) (gs-reg64 tex0-1)) + (set! (-> arg0 prims 3) (the-as gs-reg64 (logior arg1 20))) + (set! (-> arg0 prims 5) (gs-reg64 miptbp1-1)) + (set! (-> arg0 clamp-reg) (gs-reg64 zbuf-1)) + (set! (-> arg0 prims 9) (gs-reg64 alpha-1)) + (if s5-0 + (logior! (-> arg0 link-test) (link-test-flags backup-sprite-tex)) + ) + ) + (set! (-> arg0 alpha) (new 'static 'gs-miptbp :tbp1 #x44)) + (set! (-> arg0 clamp) (new 'static 'gs-clamp :minu #x13 :minv #x101)) + 0 + (none) + ) + +;; definition of type particle-adgif-cache +(deftype particle-adgif-cache (basic) + ((used int32) + (last uint16) + (lastgif adgif-shader) + (tidhash uint16 80) + (spadgif adgif-shader 80 :inline) + ) + ) + +;; definition for method 3 of type particle-adgif-cache +(defmethod inspect ((this particle-adgif-cache)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tused: ~D~%" (-> this used)) + (format #t "~1Tlast: ~D~%" (-> this last)) + (format #t "~1Tlastgif: #~%" (-> this lastgif)) + (format #t "~1Ttidhash[80] @ #x~X~%" (-> this tidhash)) + (format #t "~1Tspadgif[80] @ #x~X~%" (-> this spadgif)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(kmemopen global "part-adgif-cache") + +;; definition for symbol *particle-adgif-cache*, type particle-adgif-cache +(define *particle-adgif-cache* (new 'global 'particle-adgif-cache)) + +;; failed to figure out what this is: +(set! (-> *particle-adgif-cache* used) 0) + +;; failed to figure out what this is: +(kmemclose) + +;; definition for function particle-adgif-cache-flush +;; WARN: Return type mismatch int vs none. +(defun particle-adgif-cache-flush () + (set! (-> *particle-adgif-cache* used) 0) + (set! (-> *particle-adgif-cache* last) (the-as uint 0)) + 0 + (none) + ) + +;; definition for function particle-adgif +;; INFO: function output is handled by mips2c +(def-mips2c particle-adgif (function adgif-shader texture-id none)) + +;; definition for function particle-adgif-callback +;; WARN: Return type mismatch int vs none. +;; ERROR: Bad vector register dependency: vf16 +;; ERROR: Bad vector register dependency: vf17 +;; ERROR: Bad vector register dependency: vf18 +;; ERROR: Bad vector register dependency: vf19 +;; ERROR: Bad vector register dependency: vf20 +(defun particle-adgif-callback ((arg0 adgif-shader) (arg1 texture-id)) + (local-vars (v1-0 float)) + (rlet ((vf16 :class vf) + (vf17 :class vf) + (vf18 :class vf) + (vf19 :class vf) + (vf20 :class vf) + ) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'vector 4))) + (let ((s4-0 (-> arg0 alpha)) + (s3-0 (-> arg0 clamp)) + ) + (.svf (&-> s5-0 0 quad) vf16) + (.svf (&-> s5-0 1 quad) vf17) + (.svf (&-> s5-0 2 quad) vf18) + (.svf (&-> s5-0 3 quad) vf19) + (.svf (&-> s5-0 4 quad) vf20) + (particle-adgif arg0 arg1) + (set! (-> arg0 alpha) s4-0) + (set! (-> arg0 clamp) s3-0) + ) + (.lvf vf16 (&-> s5-0 0 quad)) + (.lvf vf17 (&-> s5-0 1 quad)) + (.lvf vf18 (&-> s5-0 2 quad)) + (.lvf vf19 (&-> s5-0 3 quad)) + (.lvf vf20 (&-> s5-0 4 quad)) + ) + (.mov v1-0 vf20) + 0 + (none) + ) + ) + +;; definition for function sp-queue-launch +;; INFO: Used lq/sq +(defun sp-queue-launch ((arg0 sparticle-system) (arg1 sparticle-launcher) (arg2 matrix)) + (let ((v1-0 *sp-launch-queue*)) + (when (= (-> v1-0 in-use) 256) + (format 0 "ERROR: sp-launch-particles called during processing, and queue is full~%") + (return 0) + ) + (let ((a3-5 (-> v1-0 queue (-> v1-0 in-use)))) + (set! (-> a3-5 sp-system) arg0) + (set! (-> a3-5 sp-launcher) arg1) + (set! (-> a3-5 pos quad) (-> arg2 trans quad)) + ) + (let ((v0-1 (+ (-> v1-0 in-use) 1))) + (set! (-> v1-0 in-use) v0-1) + v0-1 + ) + ) + ) + +;; definition for function sp-adjust-launch +;; WARN: Return type mismatch int vs none. +(defun sp-adjust-launch ((arg0 sparticle-launchinfo) + (arg1 sparticle-cpuinfo) + (arg2 (inline-array sp-field-init-spec)) + (arg3 matrix) + (arg4 symbol) + ) + (let ((s2-0 (new 'stack-no-clear 'matrix)) + (s5-0 (new 'stack-no-clear 'matrix)) + ) + (let ((s0-0 (new 'stack-no-clear 'vector))) + (sp-init-fields! + (the-as (pointer float) (-> s2-0 rvec)) + arg2 + (sp-field-id launch-fields-start) + (sp-field-id launch-fields-end) + #t + ) + (matrix-rotate-xyz! s5-0 (-> s2-0 rvec)) + (vector3s-matrix*! (the-as vector3s (-> arg1 vel-sxvel)) (the-as vector3s (-> arg1 vel-sxvel)) s5-0) + (matrix-rotate-xyz! s5-0 (-> s2-0 uvec)) + (vector3s-matrix*! (the-as vector3s (-> arg1 vel-sxvel)) (the-as vector3s (-> arg1 vel-sxvel)) s5-0) + (matrix*! s5-0 s5-0 arg3) + (set-vector! s0-0 0.0 (-> s2-0 fvec w) 0.0 1.0) + (vector-matrix*! s0-0 s0-0 s5-0) + (+! (-> arg0 launchrot x) (-> s0-0 x)) + (+! (-> arg0 launchrot y) (-> s0-0 y)) + (+! (-> arg0 launchrot z) (-> s0-0 z)) + ) + (when (logtest? (sp-cpuinfo-flag set-conerot) (-> arg1 flags)) + (let ((f0-10 (vector-length (-> arg3 rvec))) + (f1-3 (vector-length (-> arg3 uvec))) + (f2-0 (vector-length (-> arg3 fvec))) + ) + (set! (-> arg0 launchrot w) (* (-> arg0 launchrot w) f0-10)) + (set! (-> arg0 conerot w) (* (-> arg0 conerot w) f1-3)) + (set! (-> arg1 vel-sxvel w) (* (-> arg1 vel-sxvel w) f0-10)) + (set! (-> arg1 rot-syvel w) (* (-> arg1 rot-syvel w) f1-3)) + (set! (-> arg1 vel-sxvel x) (* (-> arg1 vel-sxvel x) f0-10)) + (set! (-> arg1 vel-sxvel y) (* (-> arg1 vel-sxvel y) f1-3)) + (set! (-> arg1 vel-sxvel z) (* (-> arg1 vel-sxvel z) f2-0)) + ) + ) + (matrix-rotate-xyz! s5-0 (-> s2-0 fvec)) + (matrix*! s5-0 s5-0 arg3) + (vector3s-rotate*! (the-as vector3s (-> arg0 launchrot)) (the-as vector3s (-> arg0 launchrot)) s5-0) + (vector3s-rotate*! (the-as vector3s (-> arg1 vel-sxvel)) (the-as vector3s (-> arg1 vel-sxvel)) s5-0) + (if (not (logtest? (sp-cpuinfo-flag launch-along-z) (-> arg1 flags))) + (vector3s-rotate*! (the-as vector3s (-> arg1 acc)) (the-as vector3s (-> arg1 acc)) s5-0) + ) + (if (logtest? (sp-cpuinfo-flag right-multiply-quat) (-> arg1 flags)) + (set! (-> arg0 conerot y) (+ 16384.0 (vector-y-angle (-> s5-0 fvec)))) + ) + (when arg4 + (let ((s4-1 (new 'stack-no-clear 'euler-angles))) + (matrix->eul s4-1 s5-0 13) + (set! (-> arg0 conerot x) (- (-> arg0 conerot x) (-> s4-1 y))) + (set! (-> arg0 conerot y) (- (-> arg0 conerot y) (-> s4-1 z))) + (set! (-> arg0 conerot z) (- (-> arg0 conerot z) (-> s4-1 x))) + ) + ) + ) + 0 + (none) + ) + +;; definition for function sp-euler-convert +;; WARN: Return type mismatch int vs none. +(defun sp-euler-convert ((arg0 sparticle-launchinfo) (arg1 sparticle-cpuinfo)) + (local-vars (v1-1 float) (v1-2 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((a1-1 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'quaternion)) + ) + (set-vector! a1-1 (-> arg0 conerot x) (-> arg0 conerot y) (-> arg0 conerot z) 1.0) + (quaternion-zxy! s5-0 a1-1) + (cond + ((< (-> s5-0 w) 0.0) + (.lvf vf1 (&-> arg0 conerot quad)) + (.lvf vf2 (&-> s5-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg0 conerot quad) vf1) + (.mov v1-1 vf1) + ) + (else + (.lvf vf1 (&-> arg0 conerot quad)) + (.lvf vf2 (&-> s5-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg0 conerot quad) vf1) + (.mov v1-2 vf1) + ) + ) + ) + (cond + (*sp-60-hz* + (set! (-> arg1 rot-syvel x) (* 5.0 (-> arg1 rot-syvel x))) + (set! (-> arg1 rot-syvel y) (* 5.0 (-> arg1 rot-syvel y))) + (set! (-> arg1 rot-syvel z) (* 5.0 (-> arg1 rot-syvel z))) + ) + (else + (set! (-> arg1 rot-syvel x) (* 6.0 (-> arg1 rot-syvel x))) + (set! (-> arg1 rot-syvel y) (* 6.0 (-> arg1 rot-syvel y))) + (set! (-> arg1 rot-syvel z) (* 6.0 (-> arg1 rot-syvel z))) + ) + ) + (quaternion-zxy! (-> arg1 rotvel3d) (-> arg1 rot-syvel)) + 0 + (none) + ) + ) + +;; definition for function sp-rotate-system +;; WARN: Return type mismatch int vs none. +(defun sp-rotate-system ((arg0 sparticle-launchinfo) (arg1 sparticle-cpuinfo) (arg2 transformq)) + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (let ((a1-1 (new 'stack-no-clear 'quaternion))) + (let* ((v1-0 a1-1) + (a0-1 arg2) + (f0-0 (-> a0-1 quat x)) + (f1-0 (-> a0-1 quat y)) + (f2-0 (-> a0-1 quat z)) + ) + (set! (-> v1-0 x) f0-0) + (set! (-> v1-0 y) f1-0) + (set! (-> v1-0 z) f2-0) + (set! (-> v1-0 w) (sqrtf (- (- (- 1.0 (* f2-0 f2-0)) (* f1-0 f1-0)) (* f0-0 f0-0)))) + ) + (quaternion->matrix s5-0 a1-1) + ) + (vector3s-rotate*! (the-as vector3s (-> arg0 launchrot)) (the-as vector3s (-> arg0 launchrot)) s5-0) + (vector3s-rotate*! (the-as vector3s (-> arg1 vel-sxvel)) (the-as vector3s (-> arg1 vel-sxvel)) s5-0) + (if (not (logtest? (sp-cpuinfo-flag launch-along-z) (-> arg1 flags))) + (vector3s-rotate*! (the-as vector3s (-> arg1 acc)) (the-as vector3s (-> arg1 acc)) s5-0) + ) + ) + 0 + (none) + ) + +;; definition of type sp-launch-stack +(deftype sp-launch-stack (structure) + ((ra basic) + (dummy0 basic) + (dummy1 basic) + (b-spfic basic) + (r16 uint128) + (r17 uint128) + (r18 uint128) + (pos uint128) + (matrix matrix :inline) + (l-spfic basic) + (birth-info sparticle-birthinfo :inline) + (sprite sprite-vec-data-2d :inline) + (r19 uint128) + (r20 uint128) + (r21 uint128) + (r22 uint128) + ) + ) + +;; definition for method 3 of type sp-launch-stack +;; INFO: Used lq/sq +(defmethod inspect ((this sp-launch-stack)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'sp-launch-stack) + (format #t "~1Tra: ~A~%" (-> this ra)) + (format #t "~1Tdummy0: ~A~%" (-> this dummy0)) + (format #t "~1Tdummy1: ~A~%" (-> this dummy1)) + (format #t "~1Tb-spfic: ~A~%" (-> this b-spfic)) + (format #t "~1Tr16: ~D~%" (-> this r16)) + (format #t "~1Tr17: ~D~%" (-> this r17)) + (format #t "~1Tr18: ~D~%" (-> this r18)) + (format #t "~1Tpos: ~D~%" (-> this pos)) + (format #t "~1Tmatrix: #~%" (-> this matrix)) + (format #t "~1Tl-spfic: ~A~%" (-> this l-spfic)) + (format #t "~1Tbirth-info: #~%" (-> this birth-info)) + (format #t "~1Tsprite: #~%" (-> this sprite)) + (format #t "~1Tr19: ~D~%" (-> this r19)) + (format #t "~1Tr20: ~D~%" (-> this r20)) + (format #t "~1Tr21: ~D~%" (-> this r21)) + (format #t "~1Tr22: ~D~%" (-> this r22)) + (label cfg-4) + this + ) + +;; definition for function sp-launch-particles-var +;; INFO: function output is handled by mips2c +(def-mips2c sp-launch-particles-var (function sparticle-system sparticle-launcher matrix sparticle-launch-state sparticle-launch-control float none)) + +;; definition for symbol *death-adgif*, type adgif-shader +(define *death-adgif* (the-as adgif-shader #f)) + +;; definition for function sp-launch-particles-death +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; WARN: Function sp-launch-particles-death has a return type of none, but the expression builder found a return statement. +(defun sp-launch-particles-death ((arg0 sparticle-system) (arg1 sparticle-launcher) (arg2 vector)) + (local-vars (v1-26 float) (v1-28 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf30 :class vf) + (vf31 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (.lvf vf30 (&-> arg2 quad)) + (let ((v1-0 #x437f0000)) + (.mov vf31 v1-0) + ) + (let ((s5-0 (new 'stack-no-clear 'matrix)) + (gp-0 (sp-get-particle arg0 0 (the-as sparticle-launch-state #f))) + ) + (if (not gp-0) + (return 0) + ) + (let* ((a1-2 (-> arg1 init-specs 0)) + (a1-3 (sp-init-fields! + (the-as (pointer float) (-> s5-0 rvec)) + (the-as (inline-array sp-field-init-spec) a1-2) + (sp-field-id sprite-fields-start) + (sp-field-id sprite-fields-end) + #t + ) + ) + ) + (sp-init-fields! (&-> gp-0 omega) a1-3 (sp-field-id cpu-fields-start) (sp-field-id cpu-fields-end) #t) + ) + (set! (-> s5-0 uvec y) 0.0) + (set! (-> s5-0 uvec z) (the float (sar (shl (the int (-> s5-0 uvec z)) 48) 48))) + (.lvf vf4 (&-> s5-0 fvec quad)) + (.lvf vf5 (&-> s5-0 rvec quad)) + (.min.x.vf vf4 vf4 vf31 :mask #b111) + (.add.vf vf5 vf5 vf30 :mask #b111) + (.svf (&-> s5-0 fvec quad) vf4) + (.svf (&-> s5-0 rvec quad) vf5) + (when (not *death-adgif*) + (set! *death-adgif* (new 'static 'adgif-shader)) + (particle-adgif *death-adgif* (new 'static 'texture-id :index #x18 :page #x4)) + (set! (-> *death-adgif* alpha) (new 'static 'gs-miptbp :tbp1 #x48)) + ) + (let ((v1-14 (-> *death-adgif* quad 0 quad))) + (set! (-> gp-0 adgif quad 0 quad) v1-14) + ) + (let ((v1-16 (-> *death-adgif* quad 1 quad))) + (set! (-> gp-0 adgif quad 1 quad) v1-16) + ) + (let ((v1-18 (-> *death-adgif* quad 2 quad))) + (set! (-> gp-0 adgif quad 2 quad) v1-18) + ) + (let ((v1-20 (-> *death-adgif* quad 3 quad))) + (set! (-> gp-0 adgif quad 3 quad) v1-20) + ) + (let ((v1-22 (-> *death-adgif* quad 4 quad))) + (set! (-> gp-0 adgif quad 4 quad) v1-22) + ) + (set! (-> gp-0 clock-index) (the-as uint 8)) + (.lvf vf4 (&-> (-> *time-of-day-context* current-prt-color) quad)) + (.lvf vf5 (&-> s5-0 fvec quad)) + (.lvf vf6 (&-> gp-0 fade quad)) + (.mul.vf vf5 vf5 vf4 :mask #b111) + (.mul.vf vf6 vf6 vf4 :mask #b111) + (.svf (&-> s5-0 fvec quad) vf5) + (.svf (&-> gp-0 fade quad) vf6) + (.mov v1-26 vf6) + (set! (-> gp-0 key) (the-as sparticle-launch-control 0)) + (set! (-> gp-0 binding) #f) + (let ((v1-27 (-> gp-0 sprite))) + (.lvf vf1 (&-> s5-0 rvec quad)) + (.lvf vf2 (&-> s5-0 uvec quad)) + (.lvf vf3 (&-> s5-0 fvec quad)) + (.svf (&-> v1-27 x-y-z-sx quad) vf1) + (.svf (&-> v1-27 flag-rot-sy quad) vf2) + (.sub.w.vf vf3 vf0 vf0 :mask #b1000) + (.svf (&-> v1-27 r-g-b-a quad) vf3) + ) + (.mov v1-28 vf3) + (logior! (-> gp-0 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-5)) + (set! (-> gp-0 cache-alpha) (-> s5-0 fvec w)) + ) + 0 + (none) + ) + ) + +;; definition for function sp-clear-queue +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun sp-clear-queue () + (let ((gp-0 *sp-launch-queue*) + (s5-0 *launch-matrix*) + ) + (when (> (-> gp-0 in-use) 0) + (dotimes (s4-0 (-> gp-0 in-use)) + (let ((v1-4 (-> gp-0 queue s4-0))) + (set! (-> s5-0 trans quad) (-> v1-4 pos quad)) + (launch-particles :system (-> v1-4 sp-system) (-> v1-4 sp-launcher) s5-0 :origin-is-matrix #t) + ) + ) + (set! (-> gp-0 in-use) 0) + 0 + ) + ) + 0 + (none) + ) + +;; definition for function sp-relaunch-setup-fields +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun sp-relaunch-setup-fields ((arg0 object) (arg1 sparticle-launcher) (arg2 sparticle-cpuinfo) (arg3 sprite-vec-data-3d)) + (local-vars + (sv-80 (inline-array sp-field-init-spec)) + (sv-88 sp-cpuinfo-flag) + (sv-96 matrix) + (sv-100 symbol) + (sv-104 symbol) + ) + (set! sv-80 (the-as (inline-array sp-field-init-spec) (-> arg1 init-specs 0))) + (set! sv-88 (logand (-> arg2 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-9 level0 level1 sp-cpuinfo-flag-12))) + (set! sv-96 (new 'stack-no-clear 'matrix)) + (set! sv-100 (the-as symbol #f)) + (set! sv-104 (the-as symbol #f)) + (set! (-> arg2 next-launcher) (the-as basic 0)) + (when (nonzero? (-> arg2 key)) + (let ((s3-0 #t)) + (cond + ((logtest? (sp-cpuinfo-flag left-multiply-quat) (-> arg2 flags)) + (quaternion->matrix sv-96 (-> arg2 key proc root quat)) + ) + ((logtest? (-> arg2 key group flags) (sp-group-flag sp12)) + (let* ((v1-17 sv-96) + (a3-1 (-> arg2 key local-space-binding mat-new)) + (a0-5 (-> a3-1 rvec quad)) + (a1-2 (-> a3-1 uvec quad)) + (a2-1 (-> a3-1 fvec quad)) + (a3-2 (-> a3-1 trans quad)) + ) + (set! (-> v1-17 rvec quad) a0-5) + (set! (-> v1-17 uvec quad) a1-2) + (set! (-> v1-17 fvec quad) a2-1) + (set! (-> v1-17 trans quad) a3-2) + ) + ) + (else + (set! s3-0 #f) + ) + ) + (when s3-0 + (matrix-transpose! sv-96 sv-96) + (when (or (get-field-spec-by-id arg1 (sp-field-id spt-accel-x)) + (get-field-spec-by-id arg1 (sp-field-id spt-accel-y)) + (get-field-spec-by-id arg1 (sp-field-id spt-accel-z)) + ) + (set! sv-100 #t) + (vector3s-rotate*! (the-as vector3s (-> arg2 acc)) (the-as vector3s (-> arg2 acc)) sv-96) + ) + (when (or (get-field-spec-by-id arg1 (sp-field-id spt-vel-x)) + (get-field-spec-by-id arg1 (sp-field-id spt-vel-y)) + (get-field-spec-by-id arg1 (sp-field-id spt-vel-z)) + ) + (set! sv-104 #t) + (vector3s-rotate*! (the-as vector3s (-> arg2 vel-sxvel)) (the-as vector3s (-> arg2 vel-sxvel)) sv-96) + ) + (matrix-transpose! sv-96 sv-96) + ) + ) + ) + (cond + ((and (logtest? (-> arg2 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-13)) + (not (logtest? (-> arg2 flags) (sp-cpuinfo-flag distort))) + (not (logtest? (-> arg2 flags) (sp-cpuinfo-flag glow))) + ) + (let ((f20-0 (-> arg3 r-g-b-a x)) + (f22-0 (-> arg3 r-g-b-a y)) + (f24-0 (-> arg3 r-g-b-a z)) + (f26-0 (-> arg2 fade x)) + (f28-0 (-> arg2 fade y)) + (f30-0 (-> arg2 fade z)) + ) + (set! (-> arg3 r-g-b-a x) 99999.0) + (set! (-> arg3 r-g-b-a y) 99999.0) + (set! (-> arg3 r-g-b-a z) 99999.0) + (set! (-> arg2 fade x) 99999.0) + (set! (-> arg2 fade y) 99999.0) + (set! (-> arg2 fade z) 99999.0) + (set! sv-80 + (sp-init-fields! + (the-as (pointer float) (-> arg3 x-y-z-sx)) + sv-80 + (sp-field-id sprite-fields-start) + (sp-field-id sprite-fields-end) + #f + ) + ) + (set! sv-80 + (sp-init-fields! (&-> arg2 omega) sv-80 (sp-field-id cpu-fields-start) (sp-field-id cpu-fields-end) #f) + ) + (logior! (-> arg2 flags) sv-88) + (let ((v1-54 (-> *time-of-day-context* current-prt-color))) + (if (= (-> arg3 r-g-b-a x) 99999.0) + (set! (-> arg3 r-g-b-a x) f20-0) + (set! (-> arg3 r-g-b-a x) (* (-> arg3 r-g-b-a x) (-> v1-54 x))) + ) + (if (= (-> arg3 r-g-b-a y) 99999.0) + (set! (-> arg3 r-g-b-a y) f22-0) + (set! (-> arg3 r-g-b-a y) (* (-> arg3 r-g-b-a y) (-> v1-54 y))) + ) + (if (= (-> arg3 r-g-b-a z) 99999.0) + (set! (-> arg3 r-g-b-a z) f24-0) + (set! (-> arg3 r-g-b-a z) (* (-> arg3 r-g-b-a z) (-> v1-54 z))) + ) + (if (= (-> arg2 fade x) 99999.0) + (set! (-> arg2 fade x) f26-0) + (set! (-> arg2 fade x) (* (-> arg2 fade x) (-> v1-54 x))) + ) + (if (= (-> arg2 fade y) 99999.0) + (set! (-> arg2 fade y) f28-0) + (set! (-> arg2 fade y) (* (-> arg2 fade y) (-> v1-54 y))) + ) + (if (= (-> arg2 fade z) 99999.0) + (set! (-> arg2 fade z) f30-0) + (set! (-> arg2 fade z) (* (-> arg2 fade z) (-> v1-54 z))) + ) + ) + ) + ) + (else + (set! sv-80 + (sp-init-fields! + (the-as (pointer float) (-> arg3 x-y-z-sx)) + sv-80 + (sp-field-id sprite-fields-start) + (sp-field-id sprite-fields-end) + #f + ) + ) + (set! sv-80 + (sp-init-fields! (&-> arg2 omega) sv-80 (sp-field-id cpu-fields-start) (sp-field-id cpu-fields-end) #f) + ) + ) + ) + (if sv-100 + (vector3s-rotate*! (the-as vector3s (-> arg2 acc)) (the-as vector3s (-> arg2 acc)) sv-96) + ) + (if sv-104 + (vector3s-rotate*! (the-as vector3s (-> arg2 vel-sxvel)) (the-as vector3s (-> arg2 vel-sxvel)) sv-96) + ) + 0 + 0 + (none) + ) + +;; definition for function sp-relaunch-particle-2d +;; WARN: Return type mismatch int vs none. +(defun sp-relaunch-particle-2d ((arg0 object) (arg1 sparticle-launcher) (arg2 sparticle-cpuinfo) (arg3 sprite-vec-data-2d)) + (sp-relaunch-setup-fields arg0 arg1 arg2 (the-as sprite-vec-data-3d arg3)) + (when (logtest? (-> arg2 flags) (sp-cpuinfo-flag distort)) + (set! (-> arg3 r-g-b-a w) 0.0) + (set! (-> arg2 fade w) 0.0) + (logclear! (-> arg2 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-2)) + ) + (when (logtest? (-> arg2 flags) (sp-cpuinfo-flag glow)) + ) + 0 + (none) + ) + +;; definition for function sp-relaunch-particle-3d +;; WARN: Return type mismatch int vs none. +(defun sp-relaunch-particle-3d ((arg0 object) (arg1 sparticle-launcher) (arg2 sparticle-cpuinfo) (arg3 sprite-vec-data-3d)) + (local-vars (v1-9 float) (v1-10 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (let* ((v1-0 s4-0) + (a2-1 arg3) + (f0-0 (-> a2-1 qx-qy-qz-sy x)) + (f1-0 (-> a2-1 qx-qy-qz-sy y)) + (f2-0 (-> a2-1 qx-qy-qz-sy z)) + ) + (set! (-> v1-0 x) f0-0) + (set! (-> v1-0 y) f1-0) + (set! (-> v1-0 z) f2-0) + (set! (-> v1-0 w) (sqrtf (- (- (- 1.0 (* f2-0 f2-0)) (* f1-0 f1-0)) (* f0-0 f0-0)))) + ) + (set! (-> arg3 qx-qy-qz-sy x) 0.0) + (set! (-> arg3 qx-qy-qz-sy y) 0.0) + (set! (-> arg3 qx-qy-qz-sy z) 0.0) + (sp-relaunch-setup-fields arg0 arg1 arg2 arg3) + (let* ((a1-1 (-> arg2 flags-s32)) + (v1-1 -2) + (a0-1 (-> arg3 r-g-b-a x)) + (a1-2 (logand a1-1 #x4000)) + ) + 1 + (let ((a1-3 (sar a1-2 14))) + (set! (-> arg3 r-g-b-a x) (the-as float (logior (logand a0-1 (the-as uint v1-1)) a1-3))) + ) + ) + (let ((a1-4 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'quaternion)) + ) + (set-vector! a1-4 (-> arg3 qx-qy-qz-sy x) (-> arg3 qx-qy-qz-sy y) (-> arg3 qx-qy-qz-sy z) 1.0) + (quaternion-zxy! s3-0 a1-4) + (if (logtest? (sp-cpuinfo-flag left-multiply-quat) (-> arg2 flags)) + (quaternion*! s3-0 s4-0 s3-0) + ) + (cond + ((< (-> s3-0 w) 0.0) + (.lvf vf1 (&-> arg3 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s3-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg3 qx-qy-qz-sy quad) vf1) + (.mov v1-9 vf1) + ) + (else + (.lvf vf1 (&-> arg3 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s3-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg3 qx-qy-qz-sy quad) vf1) + (.mov v1-10 vf1) + ) + ) + ) + ) + (cond + (*sp-60-hz* + (set! (-> arg2 rot-syvel x) (* 5.0 (-> arg2 rot-syvel x))) + (set! (-> arg2 rot-syvel y) (* 5.0 (-> arg2 rot-syvel y))) + (set! (-> arg2 rot-syvel z) (* 5.0 (-> arg2 rot-syvel z))) + ) + (else + (set! (-> arg2 rot-syvel x) (* 6.0 (-> arg2 rot-syvel x))) + (set! (-> arg2 rot-syvel y) (* 6.0 (-> arg2 rot-syvel y))) + (set! (-> arg2 rot-syvel z) (* 6.0 (-> arg2 rot-syvel z))) + ) + ) + (quaternion-zxy! (-> arg2 rotvel3d) (-> arg2 rot-syvel)) + 0 + (none) + ) + ) + +;; definition for method 14 of type sparticle-launch-control +;; WARN: Return type mismatch int vs none. +(defmethod initialize ((this sparticle-launch-control) (arg0 sparticle-launch-group) (arg1 process-drawable)) + (let ((s5-0 0)) + (set! (-> this group) arg0) + (set! (-> this proc) arg1) + (set! (-> this local-clock) 0) + (set! (-> this local-space-binding) (the-as particle-local-space-info 1.0)) + (set! (-> this matrix) 0) + (set! (-> this last-spawn-frame) + (the-as int (+ (-> *display* real-frame-clock integral-frame-counter) (seconds -0.007))) + ) + (set! (-> this last-spawn-time) 0) + (if (logtest? (-> this group flags) (sp-group-flag sp4)) + (quaternion->matrix (-> this origin) (-> arg1 root quat)) + (matrix-identity! (-> this origin)) + ) + (when (logtest? (-> arg0 flags) (sp-group-flag sp6)) + (let ((f0-1 (-> arg0 rotate-x)) + (f1-0 (-> arg0 rotate-y)) + (f2-0 (-> arg0 rotate-z)) + (t9-2 matrix-rotate-xyz!) + (a0-3 (new 'stack-no-clear 'matrix)) + (a1-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-2 x) f0-1) + (set! (-> a1-2 y) f1-0) + (set! (-> a1-2 z) f2-0) + (set! (-> a1-2 w) 1.0) + (let ((a1-3 (t9-2 a0-3 a1-2))) + (matrix*! (-> this origin) a1-3 (-> this origin)) + ) + ) + ) + (when (logtest? (-> arg0 flags) (sp-group-flag sp7)) + (let ((a1-4 (new 'stack-no-clear 'vector))) + (set! (-> a1-4 x) (-> arg0 scale-x)) + (set! (-> a1-4 y) (-> arg0 scale-y)) + (set! (-> a1-4 z) (-> arg0 scale-z)) + (set! (-> a1-4 w) 1.0) + (set! (-> a1-4 w) 1.0) + (scale-matrix! (-> this origin) a1-4 (-> this origin)) + ) + ) + (dotimes (s3-0 (-> arg0 length)) + (let* ((a0-7 (-> arg0 launcher s3-0)) + (a1-6 (-> *part-id-table* (-> a0-7 launcher))) + (v1-29 (-> this data s5-0)) + ) + (when (nonzero? a1-6) + (set! (-> v1-29 group-item) a0-7) + (cond + ((= (-> a1-6 type) sparticle-launcher) + (set! (-> v1-29 accum) 0.0) + (set! (-> v1-29 spawn-time) (the-as uint (+ (current-time) (seconds -100)))) + (set! (-> v1-29 offset) (the-as uint (-> a0-7 offset))) + (set! (-> v1-29 randomize) (the-as uint 0)) + (cond + ((logtest? (-> a0-7 flags) (sp-group-item-flag sp2)) + (logclear! (-> v1-29 flags) (sp-launch-state-flags sp0)) + (set! (-> v1-29 center) #f) + (set! (-> v1-29 sprite3d) #f) + (set! (-> v1-29 sprite) #f) + ) + (else + (logior! (-> v1-29 flags) (sp-launch-state-flags sp0)) + (set! (-> v1-29 center) (-> this origin trans)) + (set! (-> v1-29 sprite3d) #f) + (set! (-> v1-29 sprite) #f) + ) + ) + (+! s5-0 1) + ) + (else + (format 0 "initialize called with non-particle-launcher~%") + ) + ) + ) + ) + ) + (set! (-> this length) s5-0) + ) + 0 + (none) + ) + +;; definition for method 9 of type sparticle-launch-group +;; WARN: Return type mismatch object vs sparticle-launch-control. +(defmethod create-launch-control ((this sparticle-launch-group) (arg0 process)) + (let ((gp-0 (the-as object (new 'process 'sparticle-launch-control (-> this length))))) + (when (zero? (the-as sparticle-launch-control gp-0)) + (go process-drawable-art-error "memory") + (set! gp-0 0) + (goto cfg-4) + ) + (initialize (the-as sparticle-launch-control gp-0) this (the-as process-drawable arg0)) + (label cfg-4) + (the-as sparticle-launch-control gp-0) + ) + ) + +;; definition for method 19 of type sparticle-launch-control +;; WARN: Return type mismatch int vs none. +(defmethod kill-particles ((this sparticle-launch-control)) + (countdown (v1-0 (-> this length)) + (let ((a0-4 (-> this data v1-0))) + (logclear! (-> a0-4 flags) (sp-launch-state-flags sp1)) + ) + ) + (set! (-> this local-clock) 0) + (set! (-> this local-space-binding) (the-as particle-local-space-info 1.0)) + (kill-all-particles-with-key this) + (if (> (-> this matrix) 0) + (sprite-release-user-hvdf (-> this matrix)) + ) + 0 + (none) + ) + +;; definition for method 12 of type sparticle-launch-control +;; WARN: Return type mismatch int vs none. +(defmethod clear-2 ((this sparticle-launch-control)) + "Set length to 0" + (kill-all-particles-with-key this) + 0 + (none) + ) + +;; definition for method 15 of type sparticle-launch-control +(defmethod is-visible? ((this sparticle-launch-control) (arg0 vector)) + (let* ((v1-0 (-> this group)) + (f0-0 (-> v1-0 bounds r)) + ) + (cond + ((= f0-0 0.0) + #t + ) + ((nonzero? (-> this matrix)) + #t + ) + (else + (let ((s5-1 (vector+! (new 'stack-no-clear 'vector) arg0 (the-as vector (-> v1-0 bounds))))) + (set! (-> s5-1 w) f0-0) + (when (or *display-sprite-marks* + *display-sprite-spheres* + (and *display-actor-vis* (= (-> this proc) *debug-actor*)) + ) + (add-debug-sphere + *display-sprite-spheres* + (bucket-id debug) + s5-1 + (-> s5-1 w) + (new 'static 'rgba :g #xff :a #x80) + ) + (add-debug-matrix *display-sprite-marks* (bucket-id debug) (-> this origin) (meters 2)) + ) + (sphere-in-view-frustum? (the-as sphere s5-1)) + ) + ) + ) + ) + ) + +;; definition for method 20 of type sparticle-launch-control +;; WARN: Return type mismatch particle-local-space-info vs none. +(defmethod set-local-space-info ((this sparticle-launch-control) (arg0 particle-local-space-info)) + (set! (-> this local-space-binding) arg0) + (none) + ) + +;; definition for function execute-particle-local-space-engine +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun execute-particle-local-space-engine ((arg0 int)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (let* ((gp-0 *part-local-space-engine*) + (v1-2 (-> gp-0 alive-list next0)) + (s5-0 (-> (the-as connection v1-2) next0)) + ) + (while (!= v1-2 (-> gp-0 alive-list-end)) + ((the-as (function object) (-> (the-as connection v1-2) param0))) + (set! v1-2 s5-0) + (set! s5-0 (-> (the-as connection s5-0) next0)) + ) + ) + ) + ((= v1-0 1) + (let* ((v1-7 *part-local-space-engine*) + (a1-0 (-> v1-7 alive-list next0)) + (a0-13 (-> (the-as particle-local-space-info a1-0) next0)) + ) + (while (!= a1-0 (-> v1-7 alive-list-end)) + (let* ((a2-0 (-> (the-as particle-local-space-info a1-0) mat-prev)) + (t1-0 (-> (the-as particle-local-space-info a1-0) mat-new)) + (a1-1 (-> t1-0 rvec quad)) + (a3-0 (-> t1-0 uvec quad)) + (t0-0 (-> t1-0 fvec quad)) + (t1-1 (-> t1-0 trans quad)) + ) + (set! (-> a2-0 rvec quad) a1-1) + (set! (-> a2-0 uvec quad) a3-0) + (set! (-> a2-0 fvec quad) t0-0) + (set! (-> a2-0 trans quad) t1-1) + ) + (set! a1-0 a0-13) + (set! a0-13 (-> a0-13 next0)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function local-space-camera +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun local-space-camera ((arg0 particle-local-space-info)) + (let ((s5-0 (math-camera-matrix)) + (gp-0 (-> arg0 mat-new)) + ) + (logior! (-> arg0 flags) (part-local-space-flags pls2)) + (cond + ((logtest? (-> arg0 flags) (part-local-space-flags pls0)) + (matrix-identity! gp-0) + (set! (-> gp-0 trans quad) (-> s5-0 trans quad)) + ) + ((logtest? (-> arg0 flags) (part-local-space-flags pls1)) + (let ((a2-0 gp-0) + (v1-7 (-> s5-0 rvec quad)) + (a0-4 (-> s5-0 uvec quad)) + (a1-0 (-> s5-0 fvec quad)) + (a3-0 (-> s5-0 trans quad)) + ) + (set! (-> a2-0 rvec quad) v1-7) + (set! (-> a2-0 uvec quad) a0-4) + (set! (-> a2-0 fvec quad) a1-0) + (set! (-> a2-0 trans quad) a3-0) + ) + (set! (-> gp-0 rvec y) 0.0) + (set! (-> gp-0 fvec y) 0.0) + (vector-normalize! (-> gp-0 rvec) 1.0) + (vector-normalize! (-> gp-0 fvec) 1.0) + (vector-cross! (-> gp-0 uvec) (-> gp-0 fvec) (-> gp-0 rvec)) + ) + (else + (let* ((a2-1 s5-0) + (v1-10 (-> a2-1 rvec quad)) + (a0-8 (-> a2-1 uvec quad)) + (a1-4 (-> a2-1 fvec quad)) + (a2-2 (-> a2-1 trans quad)) + ) + (set! (-> gp-0 rvec quad) v1-10) + (set! (-> gp-0 uvec quad) a0-8) + (set! (-> gp-0 fvec quad) a1-4) + (set! (-> gp-0 trans quad) a2-2) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function local-space-proc-joint +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun local-space-proc-joint ((arg0 particle-local-space-info)) + (let ((a2-0 (handle->process (-> arg0 hand)))) + (when a2-0 + (let ((s5-0 (-> (the-as process-drawable a2-0) node-list data (the-as int (-> arg0 param1)) bone transform)) + (gp-0 (-> arg0 mat-new)) + ) + (logior! (-> arg0 flags) (part-local-space-flags pls2)) + (cond + ((logtest? (-> arg0 flags) (part-local-space-flags pls0)) + (matrix-identity! gp-0) + (set! (-> gp-0 trans quad) (-> s5-0 trans quad)) + ) + ((logtest? (-> arg0 flags) (part-local-space-flags pls1)) + (let ((a2-2 gp-0) + (v1-14 (-> s5-0 rvec quad)) + (a0-4 (-> s5-0 uvec quad)) + (a1-5 (-> s5-0 fvec quad)) + (a3-0 (-> s5-0 trans quad)) + ) + (set! (-> a2-2 rvec quad) v1-14) + (set! (-> a2-2 uvec quad) a0-4) + (set! (-> a2-2 fvec quad) a1-5) + (set! (-> a2-2 trans quad) a3-0) + ) + (set! (-> gp-0 rvec y) 0.0) + (set! (-> gp-0 fvec y) 0.0) + (vector-normalize! (-> gp-0 rvec) 1.0) + (vector-normalize! (-> gp-0 fvec) 1.0) + (vector-cross! (-> gp-0 uvec) (-> gp-0 fvec) (-> gp-0 rvec)) + ) + (else + (let* ((a2-3 s5-0) + (v1-17 (-> a2-3 rvec quad)) + (a0-8 (-> a2-3 uvec quad)) + (a1-9 (-> a2-3 fvec quad)) + (a2-4 (-> a2-3 trans quad)) + ) + (set! (-> gp-0 rvec quad) v1-17) + (set! (-> gp-0 uvec quad) a0-8) + (set! (-> gp-0 fvec quad) a1-9) + (set! (-> gp-0 trans quad) a2-4) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 17 of type sparticle-launch-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod spawn-from-mat ((this sparticle-launch-control) (arg0 matrix)) + (let* ((a2-0 (-> this origin)) + (a3-0 arg0) + (v1-0 (-> a3-0 rvec quad)) + (a0-1 (-> a3-0 uvec quad)) + (a1-1 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> a2-0 rvec quad) v1-0) + (set! (-> a2-0 uvec quad) a0-1) + (set! (-> a2-0 fvec quad) a1-1) + (set! (-> a2-0 trans quad) a3-1) + ) + (let ((s4-0 (-> this group))) + (when (logtest? (-> s4-0 flags) (sp-group-flag sp6)) + (let ((f0-0 (-> s4-0 rotate-x)) + (f1-0 (-> s4-0 rotate-y)) + (f2-0 (-> s4-0 rotate-z)) + (t9-0 matrix-rotate-xyz!) + (a0-2 (new 'stack-no-clear 'matrix)) + (a1-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-2 x) f0-0) + (set! (-> a1-2 y) f1-0) + (set! (-> a1-2 z) f2-0) + (set! (-> a1-2 w) 1.0) + (let ((a1-3 (t9-0 a0-2 a1-2))) + (matrix*! (-> this origin) a1-3 (-> this origin)) + ) + ) + ) + (when (logtest? (-> s4-0 flags) (sp-group-flag sp7)) + (let ((a1-4 (new 'stack-no-clear 'vector))) + (set! (-> a1-4 x) (-> s4-0 scale-x)) + (set! (-> a1-4 y) (-> s4-0 scale-y)) + (set! (-> a1-4 z) (-> s4-0 scale-z)) + (set! (-> a1-4 w) 1.0) + (set! (-> a1-4 w) 1.0) + (scale-matrix! (-> this origin) a1-4 (-> this origin)) + ) + ) + ) + (spawn this (-> arg0 trans)) + (none) + ) + +;; definition for method 18 of type sparticle-launch-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod spawn-from-cspace ((this sparticle-launch-control) (arg0 cspace)) + (let* ((v1-0 (-> this origin)) + (a3-0 (-> arg0 bone transform)) + (a0-2 (-> a3-0 rvec quad)) + (a1-1 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-0 rvec quad) a0-2) + (set! (-> v1-0 uvec quad) a1-1) + (set! (-> v1-0 fvec quad) a2-0) + (set! (-> v1-0 trans quad) a3-1) + ) + (let ((s4-0 (-> this group))) + (when (logtest? (-> s4-0 flags) (sp-group-flag sp6)) + (let ((f0-0 (-> s4-0 rotate-x)) + (f1-0 (-> s4-0 rotate-y)) + (f2-0 (-> s4-0 rotate-z)) + (t9-0 matrix-rotate-xyz!) + (a0-3 (new 'stack-no-clear 'matrix)) + (a1-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-2 x) f0-0) + (set! (-> a1-2 y) f1-0) + (set! (-> a1-2 z) f2-0) + (set! (-> a1-2 w) 1.0) + (let ((a1-3 (t9-0 a0-3 a1-2))) + (matrix*! (-> this origin) a1-3 (-> this origin)) + ) + ) + ) + (when (logtest? (-> s4-0 flags) (sp-group-flag sp7)) + (let ((a1-4 (new 'stack-no-clear 'vector))) + (set! (-> a1-4 x) (-> s4-0 scale-x)) + (set! (-> a1-4 y) (-> s4-0 scale-y)) + (set! (-> a1-4 z) (-> s4-0 scale-z)) + (set! (-> a1-4 w) 1.0) + (set! (-> a1-4 w) 1.0) + (scale-matrix! (-> this origin) a1-4 (-> this origin)) + ) + ) + ) + (spawn this (vector<-cspace! (-> this origin trans) arg0)) + (none) + ) + +;; definition for method 16 of type sparticle-launch-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs object. +(defmethod spawn ((this sparticle-launch-control) (arg0 vector)) + (with-pp + (set! (-> this origin trans quad) (-> arg0 quad)) + (if (not (or (is-visible? this arg0) + (logtest? (-> this group flags) (sp-group-flag sp1 sp2)) + (and (logtest? (-> this group flags) (sp-group-flag sp2 sp11)) + (not (-> *setting-control* user-current part-bounds-check)) + ) + ) + ) + (return (the-as object 0)) + ) + (when (logtest? (-> this group flags) (sp-group-flag sp12)) + (let* ((v1-18 (-> this origin)) + (a3-0 (-> this local-space-binding mat-prev)) + (a0-5 (-> a3-0 rvec quad)) + (a1-2 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-18 rvec quad) a0-5) + (set! (-> v1-18 uvec quad) a1-2) + (set! (-> v1-18 fvec quad) a2-0) + (set! (-> v1-18 trans quad) a3-1) + ) + ) + (let ((s4-0 (the-as int (current-time))) + (s5-0 (-> this last-spawn-time)) + ) + (let ((v1-22 (-> *display* real-frame-clock integral-frame-counter))) + (if (!= v1-22 (+ (-> this last-spawn-frame) 1)) + (set! s5-0 (the-as int (- (the-as time-frame s4-0) (logand (the-as int (-> pp clock sparticle-data x)) 255)))) + ) + ) + (set! (-> this last-spawn-frame) (the-as int (-> *display* real-frame-clock integral-frame-counter))) + (set! (-> this last-spawn-time) s4-0) + (when (logtest? (-> this group flags) (sp-group-flag sp0)) + (set! s5-0 (-> this local-clock)) + (+! (-> this local-clock) (logand (the-as int (-> pp clock sparticle-data x)) 255)) + (set! s4-0 (-> this local-clock)) + ) + (let* ((f30-0 (vector-vector-distance arg0 (math-camera-pos))) + (v1-38 1) + (a0-12 *time-of-day*) + (s3-1 (ash v1-38 (if a0-12 + (-> a0-12 0 hours) + 0 + ) + ) + ) + ) + (if (nonzero? (-> this matrix)) + (set! f30-0 0.0) + ) + (let ((s2-1 (-> this length))) + (b! #t cfg-102 :delay (nop!)) + (label cfg-26) + (+! s2-1 -1) + (let* ((a3-2 (-> this data s2-1)) + (v1-45 (-> a3-2 group-item)) + (a1-5 (-> *part-id-table* (-> v1-45 launcher))) + ) + (when (and a1-5 (nonzero? a1-5) (logtest? (-> a3-2 flags) (sp-launch-state-flags sp0))) + (let* ((f1-3 (if (!= (-> v1-45 falloff-to) 0.0) + (- 1.0 (/ f30-0 (-> v1-45 falloff-to))) + 1.0 + ) + ) + (f0-5 f1-3) + ) + (let ((a0-24 sparticle-launcher)) + (b! (!= (-> a1-5 type) a0-24) cfg-101 :delay (nop!)) + ) + (b! (not (logtest? (-> v1-45 flags) (sp-group-item-flag sp3))) cfg-49 :delay (nop!)) + (when (not (logtest? (-> a3-2 flags) (sp-launch-state-flags sp1))) + (set! (-> a3-2 spawn-time) (the-as uint s4-0)) + (logior! (-> a3-2 flags) (sp-launch-state-flags sp1)) + (when (< 0.0 f0-5) + (cond + ((logtest? (-> v1-45 flags) (sp-group-item-flag sp7)) + (launch-particles + :system (if (logtest? (-> v1-45 flags) (sp-group-item-flag is-3d)) + *sp-particle-system-3d* + *sp-particle-system-2d* + ) + a1-5 + (-> this origin) + :launch-state a3-2 + :launch-control this + :rate f0-5 + :origin-is-matrix #t + ) + ) + (else + (let ((t9-4 sp-launch-particles-var) + (a0-37 (if (logtest? (-> v1-45 flags) (sp-group-item-flag is-3d)) + *sp-particle-system-3d* + *sp-particle-system-2d* + ) + ) + (a2-5 *launch-matrix*) + ) + (set! (-> a2-5 trans quad) (-> a3-2 center quad)) + (t9-4 a0-37 a1-5 a2-5 a3-2 this f0-5) + ) + ) + ) + ) + ) + (b! #t cfg-100 :delay (nop!)) + (label cfg-49) + (when (or (logtest? s3-1 (-> v1-45 hour-mask)) + (not (or (= (-> v1-45 fade-after) 0.0) (< f30-0 (-> v1-45 fade-after)))) + ) + 0 + (goto cfg-100) + ) + (b! (nonzero? (-> v1-45 period)) cfg-66 :delay (empty-form)) + (if (not (logtest? (-> v1-45 flags) (sp-group-item-flag sp6))) + (set! f0-5 (* 0.2 (the float (- s4-0 s5-0)) f0-5)) + ) + (b! #t cfg-88 :delay (nop!)) + (label cfg-66) + 0 + 0 + (let* ((a2-6 (-> v1-45 length)) + (a0-56 (-> v1-45 period)) + (t0-10 (mod (+ (- s5-0 (the-as int (-> this data s2-1 offset))) a0-56) (the-as int a0-56))) + (a0-57 (mod (the-as uint (+ (- s4-0 (the-as int (-> this data s2-1 offset))) a0-56)) a0-56)) + ) + (set! f0-5 (cond + ((and (< t0-10 (the-as int a2-6)) (< (the-as int a0-57) (the-as int a2-6))) + (* 0.2 (the float (- s4-0 s5-0)) f0-5) + ) + ((and (< t0-10 (the-as int a2-6)) (>= (the-as int a0-57) (the-as int a2-6))) + (* 0.2 (the float (- a2-6 (the-as uint t0-10))) f0-5) + ) + ((and (>= t0-10 (the-as int a2-6)) (< (the-as int a0-57) (the-as int a2-6))) + (* 0.2 (the float a0-57) f0-5) + ) + (else + (when (not (logtest? (-> v1-45 flags) (sp-group-item-flag sp1))) + 0 + (goto cfg-100) + ) + (when (< (the-as uint (- s4-0 (the-as int (-> this data s2-1 spawn-time)))) (-> v1-45 period)) + 0 + (goto cfg-100) + ) + (set! (-> this data s2-1 offset) (- (-> v1-45 period) a0-57)) + (* 0.2 (the float (- s4-0 s5-0)) f0-5) + ) + ) + ) + ) + (label cfg-88) + (set! (-> a3-2 spawn-time) (the-as uint s4-0)) + (logior! (-> a3-2 flags) (sp-launch-state-flags sp1)) + (when (< 0.0 f0-5) + (if (logtest? (-> v1-45 flags) (sp-group-item-flag sp6)) + (set! f0-5 f1-3) + ) + (cond + ((logtest? (-> v1-45 flags) (sp-group-item-flag sp7)) + (launch-particles + :system (if (logtest? (-> v1-45 flags) (sp-group-item-flag is-3d)) + *sp-particle-system-3d* + *sp-particle-system-2d* + ) + a1-5 + (-> this origin) + :launch-state a3-2 + :launch-control this + :rate f0-5 + :origin-is-matrix #t + ) + ) + (else + (let ((t9-6 sp-launch-particles-var) + (a0-82 (if (logtest? (-> v1-45 flags) (sp-group-item-flag is-3d)) + *sp-particle-system-3d* + *sp-particle-system-2d* + ) + ) + (a2-23 *launch-matrix*) + ) + (set! (-> a2-23 trans quad) (-> a3-2 center quad)) + (t9-6 a0-82 a1-5 a2-23 a3-2 this f0-5) + ) + ) + ) + ) + ) + (label cfg-100) + (b! #t cfg-102 :delay (nop!)) + (label cfg-101) + (format 0 "spawn called for non-sparticle-launcher~%") + ) + ) + (label cfg-102) + (b! (nonzero? s2-1) cfg-26 :delay (nop!)) + ) + ) + ) + 0 + ) + ) + +;; definition for function execute-part-engine +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun execute-part-engine () + (local-vars (sv-96 sparticle-launcher) (sv-104 int)) + (let ((gp-0 *sp-particle-system-2d*)) + (let* ((s5-0 *part-engine*) + (s4-0 *part-id-table*) + (s3-0 (new 'stack-no-clear 'matrix)) + (s2-0 (new 'stack-no-clear 'vector)) + (v1-1 (-> s5-0 alive-list next0)) + (s1-0 (-> v1-1 next0)) + ) + (while (!= v1-1 (-> s5-0 alive-list-end)) + (let* ((a0-2 (the-as process-drawable (-> (the-as connection v1-1) param1))) + (a1-0 (-> a0-2 draw)) + (s0-0 (the-as object (-> (the-as connection v1-1) param3))) + ) + (when (and (logtest? (-> a1-0 status) (draw-control-status on-screen)) + (< (-> a1-0 distance) (-> (the-as vector s0-0) w)) + ) + (set! sv-96 (-> s4-0 (-> (the-as connection v1-1) param2))) + (set! sv-104 (the-as int (-> (the-as connection v1-1) param0))) + (when (nonzero? sv-96) + (let ((a1-8 (-> a0-2 node-list data sv-104))) + (let* ((v1-7 s3-0) + (t0-0 (-> a1-8 bone transform)) + (a0-5 (-> t0-0 rvec quad)) + (a2-2 (-> t0-0 uvec quad)) + (a3-0 (-> t0-0 fvec quad)) + (t0-1 (-> t0-0 trans quad)) + ) + (set! (-> v1-7 rvec quad) a0-5) + (set! (-> v1-7 uvec quad) a2-2) + (set! (-> v1-7 fvec quad) a3-0) + (set! (-> v1-7 trans quad) t0-1) + ) + (vector<-cspace! (-> s3-0 trans) a1-8) + ) + (set! (-> s2-0 quad) (-> (the-as vector s0-0) quad)) + (set! (-> s2-0 w) 1.0) + (vector-matrix*! (-> s3-0 trans) s2-0 s3-0) + (launch-particles :system gp-0 sv-96 s3-0 :origin-is-matrix #t) + ) + ) + ) + (set! v1-1 s1-0) + (set! s1-0 (-> s1-0 next0)) + ) + ) + (let* ((s5-1 (camera-pos)) + (v1-12 1) + (a0-14 *time-of-day*) + (s4-1 (ash v1-12 (if a0-14 + (-> a0-14 0 hours) + 0 + ) + ) + ) + ) + (dotimes (s3-1 (-> *level* length)) + (let ((v1-16 (-> *level* level s3-1))) + (when (= (-> v1-16 status) 'active) + (let ((s2-1 (-> v1-16 part-engine))) + (when s2-1 + (countdown (s1-1 (-> s2-1 length)) + (let ((s0-1 (-> s2-1 data s1-1))) + (when (and (or (zero? (-> s0-1 param3)) + (< (vector-vector-distance s5-1 (the-as vector (&-> s0-1 param0))) (the-as float (gpr->fpr (-> s0-1 param3)))) + ) + (not (logtest? s4-1 (the-as int (-> s0-1 prev1)))) + ) + (let ((a1-14 (-> s0-1 next1)) + (t9-5 sp-launch-particles-var) + (a0-25 gp-0) + (a2-5 *launch-matrix*) + ) + (set! (-> a2-5 trans quad) (-> (the-as vector (&-> s0-1 param0)) quad)) + (t9-5 + a0-25 + (the-as sparticle-launcher a1-14) + a2-5 + (the-as sparticle-launch-state #f) + (the-as sparticle-launch-control #f) + 1.0 + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function sparticle-track-root +;; WARN: Return type mismatch int vs none. +(defun sparticle-track-root ((arg0 object) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((v1-3 (-> arg1 key proc root trans))) + (set! (-> arg2 x) (-> v1-3 x)) + (set! (-> arg2 y) (-> v1-3 y)) + (set! (-> arg2 z) (-> v1-3 z)) + ) + 0 + (none) + ) + +;; definition for function sparticle-track-root-prim +;; WARN: Return type mismatch int vs none. +(defun sparticle-track-root-prim ((arg0 object) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((v1-4 (-> (the-as collide-shape (-> arg1 key proc root)) root-prim prim-core))) + (set! (-> arg2 x) (-> v1-4 world-sphere x)) + (set! (-> arg2 y) (-> v1-4 world-sphere y)) + (set! (-> arg2 z) (-> v1-4 world-sphere z)) + ) + 0 + (none) + ) + +;; definition for function sparticle-track-joint +;; WARN: Return type mismatch int vs none. +(defun sparticle-track-joint ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let* ((v1-1 (-> arg1 key proc)) + (a1-1 (the int (-> arg1 user-float))) + (v1-3 (vector<-cspace! (new 'stack-no-clear 'vector) (-> v1-1 node-list data a1-1))) + ) + (set! (-> arg2 x) (-> v1-3 x)) + (set! (-> arg2 y) (-> v1-3 y)) + (set! (-> arg2 z) (-> v1-3 z)) + ) + 0 + (none) + ) + +;; definition for function sparticle-turn-to-vel +;; WARN: Return type mismatch int vs none. +(defun sparticle-turn-to-vel ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-3d)) + (local-vars (v1-1 float) (v1-2 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (new 'stack-no-clear 'quaternion))) + (quaternion-axis-angle! gp-0 0.0 1.0 0.0 (+ 32768.0 (vector-y-angle (-> arg1 vel-sxvel)))) + (cond + ((< (-> gp-0 w) 0.0) + (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> gp-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) + (.mov v1-1 vf1) + ) + (else + (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> gp-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) + (.mov v1-2 vf1) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for function sparticle-rotate-to-vel-3d +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun sparticle-rotate-to-vel-3d ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-3d) (arg3 vector)) + (local-vars (v1-9 float) (v1-10 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (new 'stack-no-clear 'vector) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> arg1 vel-sxvel quad)) + (let ((s4-0 (-> arg1 key proc))) + (vector-normalize! s5-0 1.0) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (v1-4 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-4 x) (-> arg2 x-y-z-sx x)) + (set! (-> v1-4 y) (-> arg2 x-y-z-sx y)) + (set! (-> v1-4 z) (-> arg2 x-y-z-sx z)) + (set! (-> v1-4 w) 1.0) + (let ((s3-1 (vector-! s3-0 v1-4 (-> s4-0 root trans))) + (s2-0 (new 'stack-no-clear 'matrix)) + ) + (cond + (#t + (set! (-> s3-1 y) 0.0) + (vector-rotate-around-y! s3-1 s3-1 16384.0) + (vector-normalize! s3-1 1.0) + (matrix-r-f-compose s2-0 s5-0 s3-1 arg3) + ) + (else + (matrix-r-f-compose s2-0 s5-0 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> s4-0 root quat)) arg3) + ) + ) + (let ((s5-1 (new 'stack-no-clear 'quaternion))) + (matrix->quaternion s5-1 s2-0) + (cond + ((< (-> s5-1 w) 0.0) + (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) + (.mov v1-9 vf1) + ) + (else + (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) + (.mov v1-10 vf1) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for function birth-func-clean +;; WARN: Return type mismatch int vs none. +(defun birth-func-clean ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (when *display-capture-mode* + (set! (-> arg1 timer) 0) + 0 + ) + 0 + (none) + ) + +;; definition for function birth-func-process-clock +;; WARN: Return type mismatch int vs none. +(defun birth-func-process-clock ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (set! (-> arg1 clock-index) (the-as uint (-> *kernel-context* current-process clock index))) + 0 + (none) + ) + +;; definition for function birth-func-copy-rot-color +;; WARN: Return type mismatch int vs none. +(defun birth-func-copy-rot-color ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (local-vars (v1-5 float) (v1-6 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (-> arg4 sprite))) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (let* ((v1-0 arg2) + (f0-0 (-> v1-0 qx-qy-qz-sy x)) + (f1-0 (-> v1-0 qx-qy-qz-sy y)) + (f2-0 (-> v1-0 qx-qy-qz-sy z)) + ) + (set! (-> s4-0 x) f0-0) + (set! (-> s4-0 y) f1-0) + (set! (-> s4-0 z) f2-0) + (set! (-> s4-0 w) (sqrtf (- (- (- 1.0 (* f2-0 f2-0)) (* f1-0 f1-0)) (* f0-0 f0-0)))) + ) + (quaternion-rotate-y! s4-0 s4-0 (-> s5-0 sprite flag-rot-sy z)) + (let ((v1-4 arg2)) + (cond + ((< (-> s4-0 w) 0.0) + (.lvf vf1 (&-> v1-4 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s4-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> v1-4 qx-qy-qz-sy quad) vf1) + (.mov v1-5 vf1) + ) + (else + (.lvf vf1 (&-> v1-4 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s4-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> v1-4 qx-qy-qz-sy quad) vf1) + (.mov v1-6 vf1) + ) + ) + ) + ) + (set! (-> arg2 r-g-b-a x) (-> s5-0 sprite r-g-b-a x)) + (set! (-> arg2 r-g-b-a y) (-> s5-0 sprite r-g-b-a y)) + (set! (-> arg2 r-g-b-a z) (-> s5-0 sprite r-g-b-a z)) + ) + 0 + (none) + ) + ) + +;; definition for symbol *global-toggle*, type int +(define *global-toggle* 0) + +;; definition for function birth-func-copy2-rot-color +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun birth-func-copy2-rot-color ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (local-vars (v1-18 float) (v1-19 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (-> arg4 sprite))) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (let* ((v1-0 arg2) + (f0-0 (-> v1-0 qx-qy-qz-sy x)) + (f1-0 (-> v1-0 qx-qy-qz-sy y)) + (f2-0 (-> v1-0 qx-qy-qz-sy z)) + ) + (set! (-> s4-0 x) f0-0) + (set! (-> s4-0 y) f1-0) + (set! (-> s4-0 z) f2-0) + (set! (-> s4-0 w) (sqrtf (- (- (- 1.0 (* f2-0 f2-0)) (* f1-0 f1-0)) (* f0-0 f0-0)))) + ) + (let ((a1-1 (new-stack-vector0))) + (set! (-> a1-1 y) (-> s5-0 sprite flag-rot-sy z)) + (set! (-> a1-1 z) (if (logtest? *global-toggle* 1) + (the float (sar (shl (the int (- 16384.0 (-> s5-0 sprite x-y-z-sx w))) 48) 48)) + (the float (sar (shl (the int (+ 16384.0 (-> s5-0 sprite x-y-z-sx w))) 48) 48)) + ) + ) + (quaternion-zxy! s4-0 a1-1) + ) + (let ((v1-17 arg2)) + (cond + ((< (-> s4-0 w) 0.0) + (.lvf vf1 (&-> v1-17 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s4-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> v1-17 qx-qy-qz-sy quad) vf1) + (.mov v1-18 vf1) + ) + (else + (.lvf vf1 (&-> v1-17 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s4-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> v1-17 qx-qy-qz-sy quad) vf1) + (.mov v1-19 vf1) + ) + ) + ) + ) + (set! (-> arg2 r-g-b-a x) (-> s5-0 sprite r-g-b-a x)) + (set! (-> arg2 r-g-b-a y) (-> s5-0 sprite r-g-b-a y)) + (set! (-> arg2 r-g-b-a z) (-> s5-0 sprite r-g-b-a z)) + ) + (set! *global-toggle* (+ *global-toggle* 1)) + 0 + (none) + ) + ) + +;; definition for function birth-func-copy-omega-to-z +;; WARN: Return type mismatch int vs none. +(defun birth-func-copy-omega-to-z ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (set! (-> arg2 qx-qy-qz-sy z) (+ -16384.0 (-> arg1 omega))) + (set! (-> arg1 next-time) (-> arg4 sprite next-time)) + (set! (-> arg2 x-y-z-sx w) (* 163.85638 (the float (-> arg4 sprite next-time)))) + 0 + (none) + ) + +;; definition for function birth-func-random-next-time +;; WARN: Return type mismatch int vs none. +(defun birth-func-random-next-time ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (set! (-> arg1 next-time) (the-as uint (the int (rand-vu-float-range 0.0 (-> arg1 user-float))))) + 0 + (none) + ) + +;; definition for function sparticle-respawn-heights +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun sparticle-respawn-heights ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((gp-0 (the-as (array int32) (-> arg1 user-float)))) + (when (and (nonzero? gp-0) + (or (and (< (-> arg1 vel-sxvel y) 0.0) (< (-> arg2 y) (the-as float (gpr->fpr (-> gp-0 1))))) + (and (< 0.0 (-> arg1 vel-sxvel y)) (< (the-as float (gpr->fpr (-> gp-0 2))) (-> arg2 y))) + ) + ) + (sp-kill-particle arg0 arg1) + (let ((s3-0 (+ (-> gp-0 length) -1))) + (when (< 2 s3-0) + (let ((s2-0 (new 'stack-no-clear 'vector)) + (s1-0 (if (zero? (-> gp-0 0)) + *sp-particle-system-2d* + *sp-particle-system-3d* + ) + ) + ) + (set-vector! s2-0 (-> arg2 x) (-> arg1 user-float) (-> arg2 z) 1.0) + (let ((s5-1 3)) + (while (>= s3-0 s5-1) + (let ((t9-1 sp-launch-particles-var) + (a0-2 s1-0) + (a1-3 (-> *part-id-table* (-> gp-0 s5-1))) + (a2-1 *launch-matrix*) + ) + (set! (-> a2-1 trans quad) (-> s2-0 quad)) + (t9-1 a0-2 a1-3 a2-1 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (+! s5-1 1) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function sparticle-respawn-timer +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun sparticle-respawn-timer ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (when (<= (-> arg1 timer) 0) + (let ((gp-0 (the-as (array int32) (-> arg1 user-float)))) + (when (nonzero? gp-0) + (sp-kill-particle arg0 arg1) + (let ((s5-0 (+ (-> gp-0 length) -1))) + (when (< 2 s5-0) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (if (zero? (-> gp-0 0)) + *sp-particle-system-2d* + *sp-particle-system-3d* + ) + ) + ) + (set-vector! s4-0 (-> arg2 x) (-> arg1 user-float) (-> arg2 z) 1.0) + (let ((s2-1 3)) + (while (>= s5-0 s2-1) + (let ((t9-1 sp-launch-particles-var) + (a0-2 s3-0) + (a1-3 (-> *part-id-table* (-> gp-0 s2-1))) + (a2-1 *launch-matrix*) + ) + (set! (-> a2-1 trans quad) (-> s4-0 quad)) + (t9-1 a0-2 a1-3 a2-1 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (+! s2-1 1) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function sparticle-texture-animate +;; WARN: Return type mismatch symbol vs none. +(defun sparticle-texture-animate ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((v1-0 (the-as (array int32) (-> arg1 user-float)))) + (when (nonzero? v1-0) + (if (zero? (-> v1-0 2)) + (set! (-> v1-0 2) (-> arg1 timer)) + ) + (let* ((a0-6 (+ (-> v1-0 length) -3)) + (a2-1 (-> v1-0 0)) + (a3-0 (-> v1-0 2)) + (t0-1 (if (< (-> arg1 timer) 0) + (the-as int (-> *display* base-clock frame-counter)) + (- a3-0 (-> arg1 timer)) + ) + ) + ) + (cond + ((zero? (-> v1-0 1)) + (let ((v1-2 + (the-as + (array int32) + (-> (the-as + (array int32) + (+ (* (+ (max 0 (min (+ (/ t0-1 a2-1) (-> arg1 user1-int16)) (+ a0-6 -1))) 3) 4) (the-as int v1-0)) + ) + 0 + ) + ) + ) + ) + (if (nonzero? v1-2) + (particle-adgif-callback (-> arg1 adgif) (the-as texture-id v1-2)) + ) + ) + ) + (else + (let ((v1-4 (-> v1-0 (+ (mod (max 0 (+ (/ t0-1 a2-1) (-> arg1 user1-int16))) a0-6) 3)))) + (if (nonzero? v1-4) + (particle-adgif-callback (-> arg1 adgif) (the-as texture-id v1-4)) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for function sparticle-texture-day-night +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +;; ERROR: Bad vector register dependency: vf1 +;; ERROR: Bad vector register dependency: vf2 +(defun sparticle-texture-day-night ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d)) + (local-vars + (v1-9 uint128) + (v1-10 uint128) + (v1-13 uint128) + (v1-14 uint128) + (v1-23 uint128) + (v1-24 uint128) + (v1-27 uint128) + (v1-28 uint128) + (v1-33 float) + (a0-5 float) + (a0-11 float) + (t7-0 float) + (t7-3 float) + (s3-0 float) + (s4-0 float) + ) + (rlet ((vf1 :class vf) + (vf2 :class vf) + ) + (let ((s2-0 (the-as (array int32) (-> arg1 user-float)))) + (when (nonzero? s2-0) + (let* ((v1-1 *time-of-day*) + (s1-0 (if v1-1 + (-> v1-1 0 hours) + 0 + ) + ) + (f0-0 (rand-vu)) + ) + (.mov s4-0 vf1) + (.mov s3-0 vf2) + (cond + ((or (< s1-0 6) (< 18 s1-0)) + (let ((a1-1 (-> s2-0 7))) + (when (nonzero? a1-1) + (let ((v1-6 f0-0)) + (.mov vf2 v1-6) + ) + (let ((v1-8 (the-as uint128 (make-u128 0 (-> s2-0 9))))) + (.pextlb v1-9 0 v1-8) + ) + (.pextlb v1-10 0 v1-9) + (.mov vf1 v1-10) + (.itof.vf vf1 vf1) + (.mul.x.vf vf1 vf1 vf2) + (let ((v1-12 (the-as uint128 (make-u128 0 (-> s2-0 8))))) + (.pextlb v1-13 0 v1-12) + ) + (.pextlb v1-14 0 v1-13) + (.mov vf2 v1-14) + (.itof.vf vf2 vf2) + (.add.vf vf1 vf1 vf2) + (let ((v1-15 (-> arg1 flags-s32))) + (when (nonzero? (-> s2-0 10)) + (.lvf vf2 (&-> *time-of-day-context* current-prt-color quad)) + (.mul.vf vf1 vf1 vf2) + (.mov a0-5 vf1) + ) + (let ((v1-16 (logand v1-15 #x4000))) + (.mov t7-0 vf1) + (let ((v1-17 (sar v1-16 14))) + (set! (-> arg2 r-g-b-a quad) (the-as uint128 (logior (logand t7-0 (the-as uint -2)) v1-17))) + ) + ) + ) + (particle-adgif-callback (-> arg1 adgif) (the-as texture-id a1-1)) + ) + ) + ) + (else + (let ((a1-2 (-> s2-0 3))) + (when (nonzero? a1-2) + (let ((v1-20 f0-0)) + (.mov vf2 v1-20) + ) + (let ((v1-22 (the-as uint128 (make-u128 0 (-> s2-0 5))))) + (.pextlb v1-23 0 v1-22) + ) + (.pextlb v1-24 0 v1-23) + (.mov vf1 v1-24) + (.itof.vf vf1 vf1) + (.mul.x.vf vf1 vf1 vf2) + (let ((v1-26 (the-as uint128 (make-u128 0 (-> s2-0 4))))) + (.pextlb v1-27 0 v1-26) + ) + (.pextlb v1-28 0 v1-27) + (.mov vf2 v1-28) + (.itof.vf vf2 vf2) + (.add.vf vf1 vf1 vf2) + (let ((v1-29 (-> arg1 flags-s32))) + (when (nonzero? (-> s2-0 6)) + (.lvf vf2 (&-> *time-of-day-context* current-prt-color quad)) + (.mul.vf vf1 vf1 vf2) + (.mov a0-11 vf1) + ) + (let ((v1-30 (logand v1-29 #x4000))) + (.mov t7-3 vf1) + (let ((v1-31 (sar v1-30 14))) + (set! (-> arg2 r-g-b-a quad) (the-as uint128 (logior (logand t7-3 (the-as uint -2)) v1-31))) + ) + ) + ) + (particle-adgif-callback (-> arg1 adgif) (the-as texture-id a1-2)) + ) + ) + ) + ) + ) + (.mov vf1 s4-0) + (.mov vf2 s3-0) + (.mov v1-33 vf2) + ) + ) + (none) + ) + ) + +;; definition for function sparticle-mode-animate +;; WARN: Return type mismatch int vs none. +(defun sparticle-mode-animate ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d)) + (let ((a0-1 (-> arg1 key)) + (v1-0 (the-as object (-> arg1 user-float))) + ) + (when (nonzero? (the-as float v1-0)) + (let ((a1-2 (the-as (array uint32) (-> (the-as (array symbol) v1-0) 0 value)))) + (when (nonzero? a1-2) + (let* ((a1-4 (the-as object (-> a1-2 (min (the-as int (+ (-> a0-1 state-mode 0) 1)) (+ (-> a1-2 length) -1))))) + (a0-8 (the-as + object + (-> (the-as (array int32) a1-4) + (+ (mod + (the-as int (/ (-> a0-1 state-counter) (the-as uint (/ (-> (the-as vector4w a1-4) w) 8)))) + (+ (-> (the-as (pointer int32) a1-4) 0) -1) + ) + 1 + ) + ) + ) + ) + (a1-6 (/ (-> (the-as (array int32) v1-0) 1) 8)) + (a2-14 (-> (the-as (pointer int64) a0-8) (/ a1-6 64))) + (a0-11 (logtest? a2-14 (ash 1 (logand a1-6 63)))) + (s4-0 (if a0-11 + (-> (the-as (pointer int32) v1-0) 6) + (-> (the-as (pointer int32) v1-0) 5) + ) + ) + ) + (if a0-11 + (set! (-> arg2 r-g-b-a x) (rand-vu-float-range 64.0 192.0)) + (set! (-> arg2 r-g-b-a x) (rand-vu-float-range 32.0 48.0)) + ) + (set! (-> arg2 r-g-b-a y) (-> arg2 r-g-b-a x)) + (set! (-> arg2 r-g-b-a z) (-> arg2 r-g-b-a x)) + (if (nonzero? s4-0) + (particle-adgif-callback (-> arg1 adgif) (the-as texture-id s4-0)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function sparticle-motion-blur +;; INFO: function output is handled by mips2c +(def-mips2c sparticle-motion-blur (function sparticle-system sparticle-cpuinfo vector none)) + +;; definition (debug) for function sparticle-motion-blur-old +;; WARN: Return type mismatch int vs object. +(defun-debug sparticle-motion-blur-old ((arg0 object) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-3d)) + (let ((s2-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector4w)) + (s3-0 (new 'stack-no-clear 'vector4w)) + ) + (set! (-> s2-0 x) (-> arg2 x-y-z-sx x)) + (set! (-> s2-0 y) (-> arg2 x-y-z-sx y)) + (set! (-> s2-0 z) (-> arg2 x-y-z-sx z)) + (set! (-> s2-0 w) 1.0) + (when (and (or (!= (-> arg1 vel-sxvel x) 0.0) (!= (-> arg1 vel-sxvel y) 0.0) (!= (-> arg1 vel-sxvel z) 0.0)) + (transform-point-qword! s5-0 s2-0) + ) + (+! (-> s2-0 x) (* 32.0 (-> arg1 vel-sxvel x))) + (+! (-> s2-0 y) (* 32.0 (-> arg1 vel-sxvel y))) + (+! (-> s2-0 z) (* 32.0 (-> arg1 vel-sxvel z))) + (when (transform-point-qword! s3-0 s2-0) + (let* ((f0-14 (the float (+ (-> s5-0 x) -28672))) + (f1-10 (the float (+ (-> s5-0 y) -29440))) + (f2-4 (the float (+ (-> s3-0 x) -28672))) + (f3-1 (the float (+ (-> s3-0 y) -29440))) + (f30-0 (- f2-4 f0-14)) + (f28-0 (- f3-1 f1-10)) + ) + (set! (-> arg2 qx-qy-qz-sy z) (+ -16384.0 (atan f30-0 f28-0))) + (let ((f0-17 (-> arg1 omega))) + (if (!= f0-17 0.0) + (set! (-> arg2 x-y-z-sx w) (* (sqrtf (+ (* f30-0 f30-0) (* f28-0 f28-0))) + f0-17 + (lerp-scale 3.0 0.25 (/ 1.0 (the float (-> s5-0 z))) 0.000001 0.00000014285715) + ) + ) + ) + ) + ) + (return (the-as object #f)) + ) + ) + ) + (if (!= (-> arg1 omega) 0.0) + (set! (-> arg2 x-y-z-sx w) 0.0) + ) + 0 + ) + +;; definition for function sparticle-set-conerot +;; WARN: Return type mismatch int vs none. +(defun sparticle-set-conerot ((arg0 sparticle-launcher) (arg1 vector)) + (let ((s5-0 (get-field-spec-by-id arg0 (sp-field-id spt-conerot-x))) + (s4-0 (get-field-spec-by-id arg0 (sp-field-id spt-conerot-y))) + (v1-3 (get-field-spec-by-id arg0 (sp-field-id spt-conerot-z))) + ) + (set! (-> s5-0 initial-valuef) (-> arg1 x)) + (set! (-> s4-0 initial-valuef) (-> arg1 y)) + (set! (-> v1-3 initial-valuef) (-> arg1 z)) + ) + 0 + (none) + ) + +;; definition for function sparticle-next-on-mode-1 +(defun sparticle-next-on-mode-1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (if (zero? (-> arg1 key state-mode 0)) + (set! (-> arg1 next-time) + (the-as uint (* (max 1 (the-as int (-> *display* clock (-> arg1 clock-index) sparticle-data x))) 2)) + ) + ) + 0.0 + ) + +;; definition for function check-ground-bounce +(defun check-ground-bounce ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((f0-1 (+ (-> arg1 key origin trans y) (-> arg1 user-float)))) + (when (and (< (-> arg2 launchrot y) f0-1) (< (-> arg1 vel-sxvel y) 0.0)) + (set! (-> arg2 launchrot y) f0-1) + (set! (-> arg1 vel-sxvel y) (* (-> arg1 vel-sxvel y) (- (rand-vu-float-range 0.6 0.8)))) + ) + ) + ) + +;; definition for function check-drop-group-center +;; WARN: Return type mismatch symbol vs none. +(defun check-drop-group-center ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((f0-0 (-> arg1 key origin trans y))) + (if (< (-> arg2 launchrot y) f0-0) + (sp-kill-particle arg0 arg1) + ) + ) + (none) + ) + +;; definition for function check-bubble-height +;; WARN: Return type mismatch symbol vs none. +(defun check-bubble-height ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (if (< (-> arg1 key origin trans y) (-> arg2 launchrot y)) + (sp-kill-particle arg0 arg1) + ) + (none) + ) + +;; definition for function check-raise-group-center +;; WARN: Return type mismatch symbol vs none. +(defun check-raise-group-center ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (if (< (-> arg1 key origin trans y) (-> arg2 launchrot y)) + (sp-kill-particle arg0 arg1) + ) + (none) + ) + +;; definition for function birth-func-y->userdata +;; WARN: Return type mismatch int vs none. +(defun birth-func-y->userdata ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) + (+! (-> arg1 user-float) (-> arg2 rvec y)) + 0 + (none) + ) + +;; definition for function birth-func-ocean-height +;; WARN: Return type mismatch int vs none. +(defun birth-func-ocean-height ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) + (set! (-> arg2 rvec y) (+ (get-height *ocean* (-> arg2 rvec) #t) (-> arg1 user-float))) + 0 + (none) + ) + +;; definition for function birth-func-camera-orient +;; WARN: Return type mismatch int vs none. +(defun birth-func-camera-orient ((arg0 int) (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) + ) + ) + +;; definition for function birth-func-set-parent-pntr +;; WARN: Return type mismatch int vs none. +(defun birth-func-set-parent-pntr ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (set! (-> arg1 user-float) (the-as float (-> arg4 sprite sprite))) + 0 + (none) + ) + +;; definition for function birth-func-get-parent-quat +;; WARN: Return type mismatch int vs none. +(defun birth-func-get-parent-quat ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (let ((a0-1 (-> arg4 sprite sprite)) + (a1-1 (new 'stack-no-clear 'quaternion)) + ) + (when a0-1 + (let ((v1-2 a1-1) + (f0-0 (-> a0-1 flag-rot-sy x)) + (f1-0 (-> a0-1 flag-rot-sy y)) + (f2-0 (-> a0-1 flag-rot-sy z)) + ) + (set! (-> v1-2 x) f0-0) + (set! (-> v1-2 y) f1-0) + (set! (-> v1-2 z) f2-0) + (set! (-> v1-2 w) (sqrtf (- (- (- 1.0 (* f2-0 f2-0)) (* f1-0 f1-0)) (* f0-0 f0-0)))) + ) + (quaternion->matrix (-> arg4 control origin) a1-1) + ) + ) + 0 + (none) + ) + +;; definition for function spt-func-camera-facing-orbiter +(defun spt-func-camera-facing-orbiter ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (new 'stack-no-clear 'quaternion))) + 0.0 + (quaternion<-rotate-y-vector s5-0 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> arg1 rotvel3d))) + (let ((f0-2 (- (camera-angle) (quaternion-xz-angle s5-0)))) + (quaternion-rotate-y! (-> arg1 rotvel3d) (-> arg1 rotvel3d) f0-2) + ) + ) + ) + +;; definition for symbol *particle-quat*, type quaternion +(define *particle-quat* (new 'static 'quaternion :w 1.0)) + +;; definition for function birth-func-set-quat +;; WARN: Return type mismatch int vs none. +(defun birth-func-set-quat ((arg0 int) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (local-vars (a0-2 float) (a0-3 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((a0-1 arg2) + (v1-0 *particle-quat*) + ) + (cond + ((< (-> v1-0 w) 0.0) + (.lvf vf1 (&-> a0-1 conerot quad)) + (.lvf vf2 (&-> v1-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> a0-1 conerot quad) vf1) + (.mov a0-2 vf1) + ) + (else + (.lvf vf1 (&-> a0-1 conerot quad)) + (.lvf vf2 (&-> v1-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> a0-1 conerot quad) vf1) + (.mov a0-3 vf1) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for symbol *particle-vel*, type vector +(define *particle-vel* (new 'static 'vector :w 1.0)) + +;; definition for function birth-func-set-vel +;; WARN: Return type mismatch int vs none. +(defun birth-func-set-vel ((arg0 object) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((v1-0 *particle-vel*)) + (set! (-> arg1 vel-sxvel x) (-> v1-0 x)) + (set! (-> arg1 vel-sxvel y) (-> v1-0 y)) + (set! (-> arg1 vel-sxvel z) (-> v1-0 z)) + ) + 0 + (none) + ) + +;; definition for function birth-func-texture-group +;; WARN: Return type mismatch int vs none. +(defun birth-func-texture-group ((arg0 int) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (the-as (array int32) (-> arg1 user-float)))) + (when (nonzero? s5-0) + (let* ((s4-0 (+ (-> s5-0 length) -3)) + (v1-3 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) s4-0) 3)) + (a1-1 (-> s5-0 v1-3)) + ) + (set! (-> arg1 user1-int16) (the-as uint (+ v1-3 -3))) + (if (nonzero? a1-1) + (particle-adgif-callback (-> arg1 adgif) (the-as texture-id a1-1)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 9 of type sparticle-launcher +;; WARN: new jak 2 until loop case, check carefully +(defmethod get-field-spec-by-id ((this sparticle-launcher) (arg0 sp-field-id)) + "Look up a field's init spec by ID number." + (let ((v1-0 0)) + (until #f + (let ((a2-2 (-> this init-specs v1-0 field))) + (cond + ((= a2-2 arg0) + (return (-> this init-specs v1-0)) + ) + ((or (< (the-as uint arg0) (the-as uint a2-2)) (= a2-2 (sp-field-id spt-end))) + (return (the-as sp-field-init-spec #f)) + ) + (else + (+! v1-0 1) + ) + ) + ) + ) + ) + (the-as sp-field-init-spec #f) + ) + +;; definition for method 10 of type sparticle-launcher +;; WARN: Return type mismatch int vs none. +(defmethod setup-special-textures ((this sparticle-launcher) (arg0 string)) + "Set the particle's texture to the texture with the given name, and convert userdata strings to textures." + (let ((s5-0 (get-field-spec-by-id this (sp-field-id spt-texture))) + (v1-1 (lookup-texture-id-by-name arg0 (the-as string #f))) + ) + (if s5-0 + (set! (-> s5-0 initial-valuef) (the-as float v1-1)) + ) + ) + (let ((v1-3 (get-field-spec-by-id this (sp-field-id spt-userdata)))) + (when (and v1-3 (= (-> v1-3 flags) (sp-flag object))) + (let ((gp-1 (the-as (array int32) (-> v1-3 initial-valuef)))) + (when (and (= (logand (the-as int gp-1) 7) 4) (type? gp-1 array) (logtest? (-> gp-1 1) 128)) + (set! (-> gp-1 0) (/ (-> gp-1 0) 8)) + (set! (-> gp-1 1) (/ (logand (-> gp-1 1) 8) 8)) + (set! (-> gp-1 2) (/ (-> gp-1 2) 8)) + (set! (-> gp-1 content-type) int32) + (dotimes (s5-1 (+ (-> gp-1 length) -3)) + (set! (-> gp-1 (+ s5-1 3)) + (the-as int (lookup-texture-id-by-name (the-as string (-> gp-1 (+ s5-1 3))) (the-as string #f))) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function rot-to-particle +;; WARN: Return type mismatch degrees vs none. +(defun rot-to-particle ((arg0 degrees) (arg1 sprite-vec-data-2d) (arg2 matrix)) + (logand! (-> arg1 flag) -49) + (let ((v1-4 (the int (* 0.000061035156 (+ 32768.0 arg0))))) + (if (or (zero? v1-4) (= v1-4 3)) + (logior! (-> arg1 flag) 32) + ) + ) + (set! (-> arg1 flag-rot-sy z) arg0) + (none) + ) + +;; definition for function birth-func-flip-based-on-scale +;; WARN: Return type mismatch int vs none. +(defun birth-func-flip-based-on-scale ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (when (< (-> arg2 x-y-z-sx w) 0.0) + (set! (-> arg2 qx-qy-qz-sy x) (the-as float (logior (the-as int (-> arg2 qx-qy-qz-sy x)) 16))) + (set! (-> arg2 x-y-z-sx w) (* -1.0 (-> arg2 x-y-z-sx w))) + ) + (when (< (-> arg2 qx-qy-qz-sy w) 0.0) + (set! (-> arg2 qx-qy-qz-sy x) (the-as float (logior (the-as int (-> arg2 qx-qy-qz-sy x)) 32))) + (set! (-> arg2 qx-qy-qz-sy w) (* -1.0 (-> arg2 qx-qy-qz-sy w))) + ) + 0 + (none) + ) + +;; definition for function sparticle-2d-spline-align +;; WARN: Return type mismatch int vs none. +(defun sparticle-2d-spline-align ((arg0 object) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d) (arg3 object)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 x) (-> arg1 vel-sxvel x)) + (set! (-> s3-0 y) (-> arg1 vel-sxvel y)) + (set! (-> s3-0 z) (-> arg1 vel-sxvel z)) + (set! (-> s3-0 w) 1.0) + (let ((f30-0 (-> arg2 flag-rot-sy z))) + (vector-normalize! s3-0 1.0) + (let ((s5-0 deg-seek) + (s4-0 f30-0) + ) + 0.0 + (let ((a0-2 (-> (math-camera-matrix) fvec))) + 0.0 + (let ((v1-1 (new 'stack-no-clear 'vector))) + (let ((f0-7 (vector-dot a0-2 s3-0))) + (vector-float*! v1-1 a0-2 f0-7) + ) + (vector-! s3-0 s3-0 v1-1) + ) + ) + (let ((a2-2 (matrix-transpose! (new 'stack-no-clear 'matrix) (math-camera-matrix)))) + (vector-matrix*! s3-0 s3-0 a2-2) + ) + (let* ((a1-11 (the float (sar (shl (the int (atan (-> s3-0 y) (* -1.0 (-> s3-0 x)))) 48) 48))) + (a2-3 (* 65536.0 (seconds-per-frame))) + (f0-17 (s5-0 s4-0 a1-11 a2-3)) + ) + (rot-to-particle f0-17 arg2 (the-as matrix a2-3)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function sparticle-2d-spline-align-instant +;; WARN: Return type mismatch int vs none. +(defun sparticle-2d-spline-align-instant ((arg0 object) (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) + (-> arg2 flag-rot-sy z) + (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)))) + (rot-to-particle f0-16 arg2 a2-2) + ) + ) + ) + 0 + (none) + ) + +;; definition for function birth-func-inherit-size +;; WARN: Return type mismatch int vs none. +(defun birth-func-inherit-size ((arg0 sparticle-system) + (arg1 sparticle-cpuinfo) + (arg2 sprite-vec-data-3d) + (arg3 sparticle-launcher) + (arg4 sparticle-launch-state) + ) + (let ((v1-1 (-> arg4 sprite sprite))) + (set! (-> arg2 x-y-z-sx w) (* (-> v1-1 x-y-z-sx w) (-> arg2 x-y-z-sx w))) + (set! (-> arg2 qx-qy-qz-sy w) (* (-> v1-1 flag-rot-sy w) (-> arg2 qx-qy-qz-sy w))) + ) + 0 + (none) + ) + +;; definition for function birth-func-texture-group-2d +;; WARN: Return type mismatch int vs none. +(defun birth-func-texture-group-2d ((arg0 object) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group (the-as int arg0) arg1 arg2) + 0 + (none) + ) + +;; definition for function birth-func-set-vel-2d +;; WARN: Return type mismatch int vs none. +(defun birth-func-set-vel-2d ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((v1-0 *particle-vel*)) + (set! (-> arg1 vel-sxvel x) (-> v1-0 x)) + (set! (-> arg1 vel-sxvel y) (-> v1-0 y)) + (set! (-> arg1 vel-sxvel z) (-> v1-0 z)) + ) + 0 + (none) + ) + +;; definition for function sparticle-3d-rotate-xz-to-camera +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun sparticle-3d-rotate-xz-to-camera ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-3d)) + (local-vars (v1-4 float) (v1-5 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (new 'stack-no-clear 'vector) + (-> arg1 key proc) + (let ((a0-1 (math-camera-matrix)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> a0-1 rvec quad)) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + (let ((a1-3 (matrix-fr-compose (new 'stack-no-clear 'matrix) s5-0 *up-vector*)) + (s5-1 (new 'stack-no-clear 'quaternion)) + ) + (matrix->quaternion s5-1 a1-3) + (cond + ((< (-> s5-1 w) 0.0) + (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) + (.mov v1-4 vf1) + ) + (else + (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) + (.mov v1-5 vf1) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 9 of type sparticle-subsampler +;; INFO: Used lq/sq +(defmethod init-with-vec! ((this sparticle-subsampler) (arg0 vector)) + (let ((f30-0 (-> this spt-num))) + (when (not (-> this inited?)) + (set! (-> this spawn-mat trans quad) (-> arg0 quad)) + (set! (-> this inited?) #t) + (set! f30-0 0.000000000000000000000000000000000000000000001) + ) + (set! (-> this sp-launcher birthaccum) 0.0) + (let ((f28-0 (/ 1.0 f30-0))) + 0.0 + (let ((s4-0 (new 'stack-no-clear 'matrix))) + (let* ((a2-0 s4-0) + (a3-0 (-> this spawn-mat)) + (v1-8 (-> a3-0 rvec quad)) + (a0-3 (-> a3-0 uvec quad)) + (a1-1 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> a2-0 rvec quad) v1-8) + (set! (-> a2-0 uvec quad) a0-3) + (set! (-> a2-0 fvec quad) a1-1) + (set! (-> a2-0 trans quad) a3-1) + ) + (dotimes (s3-0 (the int f30-0)) + (let ((f0-5 (* f28-0 (the float s3-0)))) + (vector-lerp! (-> s4-0 trans) arg0 (-> this spawn-mat trans) f0-5) + ) + (launch-particles :system (-> this sp-system) (-> this sp-launcher) s4-0 :origin-is-matrix #t) + ) + ) + ) + ) + (let ((v0-2 (-> this spawn-mat trans))) + (set! (-> v0-2 quad) (-> arg0 quad)) + v0-2 + ) + ) + +;; definition for method 10 of type sparticle-subsampler +;; INFO: Used lq/sq +(defmethod init-with-mat! ((this sparticle-subsampler) (arg0 matrix)) + (when (not (-> this inited?)) + (let* ((a2-0 (-> this spawn-mat)) + (a3-0 arg0) + (v1-2 (-> a3-0 rvec quad)) + (a0-1 (-> a3-0 uvec quad)) + (a1-1 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> a2-0 rvec quad) v1-2) + (set! (-> a2-0 uvec quad) a0-1) + (set! (-> a2-0 fvec quad) a1-1) + (set! (-> a2-0 trans quad) a3-1) + ) + (set! (-> this inited?) #t) + ) + (set! (-> this sp-launcher birthaccum) 0.0) + (let ((f30-0 (/ 1.0 (-> this spt-num)))) + 0.0 + (let ((s4-0 (new 'stack-no-clear 'matrix))) + (let* ((a2-1 s4-0) + (a3-2 arg0) + (v1-6 (-> a3-2 rvec quad)) + (a0-2 (-> a3-2 uvec quad)) + (a1-2 (-> a3-2 fvec quad)) + (a3-3 (-> a3-2 trans quad)) + ) + (set! (-> a2-1 rvec quad) v1-6) + (set! (-> a2-1 uvec quad) a0-2) + (set! (-> a2-1 fvec quad) a1-2) + (set! (-> a2-1 trans quad) a3-3) + ) + (dotimes (s3-0 (the int (-> this spt-num))) + (let ((f0-5 (* f30-0 (the float s3-0)))) + (vector-lerp! (-> s4-0 trans) (-> arg0 trans) (-> this spawn-mat trans) f0-5) + ) + (launch-particles :system (-> this sp-system) (-> this sp-launcher) s4-0 :origin-is-matrix #t) + ) + ) + ) + (let ((v0-2 (-> this spawn-mat))) + (let ((v1-10 (-> arg0 rvec quad)) + (a0-5 (-> arg0 uvec quad)) + (a1-5 (-> arg0 fvec quad)) + (a2-4 (-> arg0 trans quad)) + ) + (set! (-> v0-2 rvec quad) v1-10) + (set! (-> v0-2 uvec quad) a0-5) + (set! (-> v0-2 fvec quad) a1-5) + (set! (-> v0-2 trans quad) a2-4) + ) + v0-2 + ) + ) + +;; definition for function spt-func-relative-pos +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun spt-func-relative-pos ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-3d)) + (local-vars + (sv-256 vector) + (sv-260 vector) + (sv-264 vector) + (sv-268 matrix) + (sv-272 matrix) + (sv-276 matrix) + (sv-280 matrix) + (sv-284 matrix) + ) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 x) (-> arg2 x-y-z-sx x)) + (set! (-> v1-0 y) (-> arg2 x-y-z-sx y)) + (set! (-> v1-0 z) (-> arg2 x-y-z-sx z)) + (set! (-> v1-0 w) 1.0) + (set! sv-256 v1-0) + ) + (let ((v1-1 (new 'stack-no-clear 'vector))) + (set! (-> v1-1 x) (-> arg1 vel-sxvel x)) + (set! (-> v1-1 y) (-> arg1 vel-sxvel y)) + (set! (-> v1-1 z) (-> arg1 vel-sxvel z)) + (set! (-> v1-1 w) 1.0) + (set! sv-260 v1-1) + ) + (let ((v1-2 (new 'stack-no-clear 'vector))) + (set! (-> v1-2 x) (-> arg1 acc x)) + (set! (-> v1-2 y) (-> arg1 acc y)) + (set! (-> v1-2 z) (-> arg1 acc z)) + (set! (-> v1-2 w) 1.0) + (set! sv-264 v1-2) + ) + (set! sv-268 (-> arg1 key local-space-binding mat-prev)) + (set! sv-272 (-> arg1 key local-space-binding mat-new)) + (set! sv-276 (new 'stack-no-clear 'matrix)) + (set! sv-280 (new 'stack-no-clear 'matrix)) + (set! sv-284 (new 'stack-no-clear 'matrix)) + (let* ((a2-1 sv-280) + (a3-0 sv-268) + (v1-12 (-> a3-0 rvec quad)) + (a0-4 (-> a3-0 uvec quad)) + (a1-1 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> a2-1 rvec quad) v1-12) + (set! (-> a2-1 uvec quad) a0-4) + (set! (-> a2-1 fvec quad) a1-1) + (set! (-> a2-1 trans quad) a3-1) + ) + (let* ((a2-2 sv-284) + (a3-2 sv-272) + (v1-13 (-> a3-2 rvec quad)) + (a0-5 (-> a3-2 uvec quad)) + (a1-2 (-> a3-2 fvec quad)) + (a3-3 (-> a3-2 trans quad)) + ) + (set! (-> a2-2 rvec quad) v1-13) + (set! (-> a2-2 uvec quad) a0-5) + (set! (-> a2-2 fvec quad) a1-2) + (set! (-> a2-2 trans quad) a3-3) + ) + (dotimes (s4-0 3) + (vector-normalize! (the-as vector (&-> sv-280 quad s4-0)) 1.0) + (vector-normalize! (the-as vector (&-> sv-284 quad s4-0)) 1.0) + ) + (set! (-> sv-256 w) 1.0) + (set! (-> sv-260 w) 0.0) + (set! (-> sv-264 w) 0.0) + (let ((a1-6 (matrix-inverse-of-rot-trans! (new 'stack-no-clear 'matrix) sv-280))) + (matrix*! sv-276 a1-6 sv-284) + ) + (vector-matrix*! sv-256 sv-256 sv-276) + (set! (-> arg2 x-y-z-sx x) (-> sv-256 x)) + (set! (-> arg2 x-y-z-sx y) (-> sv-256 y)) + (set! (-> arg2 x-y-z-sx z) (-> sv-256 z)) + (-> arg2 x-y-z-sx) + (vector-matrix*! sv-260 sv-260 sv-276) + (set! (-> arg1 vel-sxvel x) (-> sv-260 x)) + (set! (-> arg1 vel-sxvel y) (-> sv-260 y)) + (set! (-> arg1 vel-sxvel z) (-> sv-260 z)) + (-> arg1 vel-sxvel) + (vector-matrix*! sv-264 sv-264 sv-276) + (set! (-> arg1 acc x) (-> sv-264 x)) + (set! (-> arg1 acc y) (-> sv-264 y)) + (set! (-> arg1 acc z) (-> sv-264 z)) + (-> arg1 acc) + 0 + (none) + ) + +;; definition for function spt-func-turn-to-vel-radial +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun spt-func-turn-to-vel-radial ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-3d)) + (local-vars (v1-5 float) (v1-6 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (new 'stack-no-clear 'vector) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> arg1 vel-sxvel quad)) + (let ((s3-0 (-> arg1 key proc))) + (vector-normalize! s5-0 1.0) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (v1-4 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-4 x) (-> arg2 x-y-z-sx x)) + (set! (-> v1-4 y) (-> arg2 x-y-z-sx y)) + (set! (-> v1-4 z) (-> arg2 x-y-z-sx z)) + (set! (-> v1-4 w) 1.0) + (let ((s4-1 (vector-! s4-0 v1-4 (-> s3-0 root trans))) + (s3-1 (new 'stack-no-clear 'matrix)) + ) + (set! (-> s4-1 y) 0.0) + (vector-rotate-around-y! s4-1 s4-1 16384.0) + (vector-normalize! s4-1 1.0) + (matrix-f-r-compose s3-1 s5-0 s4-1) + (let ((s5-1 (new 'stack-no-clear 'quaternion))) + (matrix->quaternion s5-1 s3-1) + (cond + ((< (-> s5-1 w) 0.0) + (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) + (.mov v1-5 vf1) + ) + (else + (.lvf vf1 (&-> arg2 qx-qy-qz-sy quad)) + (.lvf vf2 (&-> s5-1 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 qx-qy-qz-sy quad) vf1) + (.mov v1-6 vf1) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) diff --git a/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle_REF.gc b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle_REF.gc new file mode 100644 index 0000000000..b1ec32fb49 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/gfx/sprite/particles/sparticle_REF.gc @@ -0,0 +1,739 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 2 of type sparticle-cpuinfo +;; WARN: Return type mismatch object vs sparticle-cpuinfo. +(defmethod print ((this sparticle-cpuinfo)) + (format #t "~%") + (dotimes (s5-0 16) + (format #t "~D:~F~%" s5-0 (the-as float (-> this data s5-0))) + ) + (format #t "TIMER:~D~%" (-> this timer)) + (the-as sparticle-cpuinfo (format #t "FLAGS:~X~%" (-> this flags))) + ) + +;; definition for function sp-particle-copy! +;; INFO: Used lq/sq +;; WARN: Return type mismatch (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d uint none) vs none. +(defun sp-particle-copy! ((arg0 sparticle-cpuinfo) (arg1 sparticle-cpuinfo)) + (let ((v1-1 (-> arg1 sprite x-y-z-sx quad))) + (set! (-> arg0 sprite x-y-z-sx quad) v1-1) + ) + (let ((v1-3 (-> arg1 sprite flag-rot-sy quad))) + (set! (-> arg0 sprite flag-rot-sy quad) v1-3) + ) + (let ((v1-5 (-> arg1 sprite r-g-b-a quad))) + (set! (-> arg0 sprite r-g-b-a quad) v1-5) + ) + (dotimes (v1-6 10) + (set! (-> arg0 adgif prims v1-6) (-> arg1 adgif prims v1-6)) + ) + (set! (-> arg0 vel-sxvel quad) (-> arg1 vel-sxvel quad)) + (set! (-> arg0 rot-syvel quad) (-> arg1 rot-syvel quad)) + (set! (-> arg0 fade quad) (-> arg1 fade quad)) + (set! (-> arg0 acc quad) (-> arg1 acc quad)) + (set! (-> arg0 friction) (-> arg1 friction)) + (set! (-> arg0 timer) (-> arg1 timer)) + (set! (-> arg0 flags) (-> arg1 flags)) + (set! (-> arg0 user-float) (-> arg1 user-float)) + (set! (-> arg0 sp-func) (-> arg1 sp-func)) + (none) + ) + +;; definition for method 0 of type sparticle-system +(defmethod new sparticle-system ((allocation symbol) + (type-to-make type) + (arg0 int) + (arg1 int) + (arg2 symbol) + (arg3 pointer) + (arg4 (inline-array adgif-shader)) + ) + (let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (let* ((v1-3 (/ (+ arg0 63) 64)) + (a0-2 (/ (+ arg1 63) 64)) + (a1-2 (* v1-3 64)) + (a2-2 (* a0-2 64)) + (s2-1 (+ v1-3 a0-2)) + (s5-1 (+ a1-2 a2-2)) + ) + (set! (-> gp-0 blocks 0) v1-3) + (set! (-> gp-0 length 0) a1-2) + (set! (-> gp-0 num-alloc 0) 0) + (set! (-> gp-0 blocks 1) a0-2) + (set! (-> gp-0 length 1) a2-2) + (set! (-> gp-0 num-alloc 1) 0) + (set! (-> gp-0 is-3d) (the-as basic arg2)) + (set! (-> gp-0 alloc-table) (the-as (pointer uint64) (malloc 'global (* s2-1 8)))) + (set! (-> gp-0 cpuinfo-table) (the-as (inline-array sparticle-cpuinfo) (malloc 'global (* 144 s5-1)))) + (set! (-> gp-0 vecdata-table) arg3) + (set! (-> gp-0 adgifdata-table) arg4) + (dotimes (v1-5 s2-1) + (set! (-> gp-0 alloc-table v1-5) (the-as uint -1)) + ) + (dotimes (s4-1 s5-1) + (set! (-> gp-0 cpuinfo-table s4-1 valid) (the-as uint 0)) + (set! (-> gp-0 cpuinfo-table s4-1 sprite) + (the-as sprite-vec-data-2d (&+ (-> gp-0 vecdata-table) (* 48 s4-1))) + ) + (set! (-> gp-0 cpuinfo-table s4-1 adgif) (-> gp-0 adgifdata-table s4-1)) + (adgif-shader<-texture-simple! (-> gp-0 adgifdata-table s4-1) (the-as texture #f)) + (set! (-> gp-0 adgifdata-table s4-1 alpha) (new 'static 'gs-miptbp :tbp1 #x48)) + ) + ) + gp-0 + ) + ) + +;; failed to figure out what this is: +(kmemopen global "part-systems") + +;; definition for symbol *sp-particle-system-2d*, type sparticle-system +(define *sp-particle-system-2d* + (new 'global 'sparticle-system 1920 128 #f (-> *sprite-array-2d* vec-data) (-> *sprite-array-2d* adgif-data)) + ) + +;; definition for symbol *sp-particle-system-3d*, type sparticle-system +(define *sp-particle-system-3d* + (new 'global 'sparticle-system 256 0 #t (-> *sprite-array-3d* vec-data) (-> *sprite-array-3d* adgif-data)) + ) + +;; failed to figure out what this is: +(kmemclose) + +;; definition for function sp-get-block-size +(defun sp-get-block-size ((arg0 sparticle-system) (arg1 int)) + (let ((v0-0 0)) + (let ((v1-0 0) + (a2-0 (-> arg0 blocks 0)) + ) + (when (= arg1 1) + (set! v1-0 a2-0) + (set! a2-0 (-> arg0 blocks 1)) + ) + (dotimes (a1-3 a2-0) + (if (!= (-> arg0 alloc-table (+ v1-0 a1-3)) -1) + (set! v0-0 (+ a1-3 1)) + ) + ) + ) + v0-0 + ) + ) + +;; definition for function sp-get-approx-alloc-size +(defun sp-get-approx-alloc-size ((arg0 sparticle-system) (arg1 int)) + (let ((a3-0 arg1) + (v1-0 0) + ) + (let ((a1-1 0) + (a2-0 (-> arg0 blocks 0)) + ) + (when (= a3-0 1) + (set! a1-1 a2-0) + (set! a2-0 (-> arg0 blocks 1)) + ) + (dotimes (a3-3 a2-0) + (if (!= (-> arg0 alloc-table (+ a1-1 a3-3)) -1) + (set! v1-0 (+ a3-3 1)) + ) + ) + ) + (* v1-0 64) + ) + ) + +;; definition for function sp-free-particle +;; WARN: Return type mismatch int vs none. +(defun sp-free-particle ((arg0 sparticle-system) (arg1 int) (arg2 sparticle-cpuinfo) (arg3 sprite-vec-data-2d)) + (if (and (-> arg2 binding) (nonzero? (-> arg2 binding))) + (logclear! (-> arg2 binding flags) (sp-launch-state-flags sp0 sp1)) + ) + (let ((v1-6 (/ arg1 64)) + (t0-4 (logand arg1 63)) + ) + (logior! (-> arg0 alloc-table v1-6) (ash 1 t0-4)) + ) + (if (< arg1 (-> arg0 length 0)) + (+! (-> arg0 num-alloc 0) -1) + (+! (-> arg0 num-alloc 1) -1) + ) + (set! (-> arg2 valid) (the-as uint 0)) + (set! (-> arg3 r-g-b-a w) 0.0) + 0 + (none) + ) + +;; definition for function sp-get-particle +;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2] +;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2] +;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2] +;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2] +;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t3, t2] +;; ERROR: Unsupported inline assembly instruction kind - [movz a2, t2, t1] +(defun sp-get-particle ((arg0 sparticle-system) (arg1 int) (arg2 sparticle-launch-state)) + (local-vars + (a2-3 int) + (a2-4 int) + (a2-5 int) + (a2-6 int) + (a2-7 int) + (a2-8 int) + (t1-16 int) + (t1-17 int) + (t1-18 int) + (t1-19 int) + (t1-20 int) + (t3-5 int) + ) + (let ((v1-0 0) + (t0-0 (-> arg0 blocks 0)) + (a3-0 0) + ) + (when (= arg1 1) + (set! v1-0 t0-0) + (set! t0-0 (-> arg0 blocks 1)) + ) + (when arg2 + (set! a3-0 (the-as int (-> arg2 randomize))) + (+! (-> arg2 randomize) 1) + (when (= (-> arg2 randomize) t0-0) + (set! (-> arg2 randomize) (the-as uint 0)) + 0 + ) + ) + (dotimes (a2-1 t0-0) + (when (nonzero? (-> arg0 alloc-table (+ v1-0 a3-0))) + (let ((a2-2 0) + (t1-15 (-> arg0 alloc-table (+ v1-0 a3-0))) + (t0-4 (* (+ v1-0 a3-0) 64)) + ) + 0 + 0 + (let ((t2-4 (shl t1-15 32)) + (t3-0 (+ a2-2 32)) + ) + (move-if-not-zero t1-16 t2-4 t2-4 t1-15) + (.movz a2-3 t3-0 t2-4 a2-2) + ) + (let ((t2-5 (shl t1-16 16)) + (t3-1 (+ a2-3 16)) + ) + (move-if-not-zero t1-17 t2-5 t2-5 t1-16) + (.movz a2-4 t3-1 t2-5 a2-3) + ) + (let ((t2-6 (* t1-17 256)) + (t3-2 (+ a2-4 8)) + ) + (move-if-not-zero t1-18 t2-6 t2-6 t1-17) + (.movz a2-5 t3-2 t2-6 a2-4) + ) + (let ((t2-7 (* t1-18 16)) + (t3-3 (+ a2-5 4)) + ) + (move-if-not-zero t1-19 t2-7 t2-7 t1-18) + (.movz a2-6 t3-3 t2-7 a2-5) + ) + (let ((t2-8 (* t1-19 4)) + (t3-4 (+ a2-6 2)) + ) + (move-if-not-zero t1-20 t2-8 t2-8 t1-19) + (.movz a2-7 t3-4 t2-8 a2-6) + (let ((t1-21 (* t1-20 2)) + (t2-9 (+ a2-7 1)) + ) + (move-if-not-zero t3-5 t1-21 t1-21 t3-4) + (.movz a2-8 t2-9 t1-21 a2-7) + ) + ) + (let ((t0-5 (+ t0-4 a2-8))) + (logxor! (-> arg0 alloc-table (+ v1-0 a3-0)) (the-as uint (ash 1 a2-8))) + (+! (-> arg0 num-alloc arg1) 1) + (let ((v1-9 (-> arg0 cpuinfo-table t0-5))) + (set! (-> v1-9 valid) (the-as uint 1)) + (return v1-9) + ) + ) + ) + ) + (+! a3-0 1) + (if (= a3-0 t0-0) + (set! a3-0 0) + ) + ) + ) + (the-as sparticle-cpuinfo #f) + ) + +;; definition for function sp-kill-particle +(defun sp-kill-particle ((arg0 sparticle-system) (arg1 sparticle-cpuinfo)) + (cond + ((>= (the-as int arg1) #x70000000) + (set! (-> arg1 timer) 0) + 0 + ) + (else + (let ((a2-1 (/ (the-as int (- (the-as uint arg1) (the-as uint (the-as uint (-> arg0 cpuinfo-table 0))))) 144))) + (when (or (< a2-1 0) (>= a2-1 (+ (-> arg0 length 0) (-> arg0 length 1)))) + (format 0 "Tried to release particle ~D~%" a2-1) + (return #f) + ) + (sp-free-particle arg0 a2-1 arg1 (-> arg1 sprite)) + ) + ) + ) + #t + ) + +;; definition for function sp-orbiter +;; WARN: Return type mismatch int vs none. +(defun sp-orbiter ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let* ((f2-0 (-> arg1 omega)) + (f0-0 (-> arg1 radius)) + (f3-0 (-> arg1 vel-sxvel x)) + (f30-0 (-> arg1 vel-sxvel y)) + (f1-0 (-> arg1 vel-sxvel z)) + (f4-0 (-> *display* clock (-> arg1 clock-index) sparticle-data y)) + (f26-0 (+ f2-0 (* f3-0 f4-0))) + ) + (set! (-> arg1 omega) f26-0) + (let ((f28-0 (+ f0-0 (* f1-0 f4-0)))) + (set! (-> arg1 radius) f28-0) + (let ((f24-0 (sin f26-0)) + (f26-1 (cos f26-0)) + (f22-0 (sin (* 0.5 f30-0))) + (f0-5 (cos (* 0.5 f30-0))) + (a2-1 (new 'stack-no-clear 'quaternion)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (let ((s3-0 (new 'stack-no-clear 'matrix))) + (set-vector! a2-1 (* f22-0 f26-1) 0.0 (* f22-0 f24-0) f0-5) + (quaternion*! (-> arg1 rotvel3d) (-> arg1 rotvel3d) a2-1) + (quaternion-normalize! (-> arg1 rotvel3d)) + (set-vector! s4-0 (* f24-0 f28-0) 0.0 (* f26-1 f28-0) 1.0) + (quaternion->matrix s3-0 (-> arg1 rotvel3d)) + (vector-matrix*! s4-0 s4-0 s3-0) + ) + (let ((v1-8 (the-as sprite-vec-data-2d (-> arg1 user-float)))) + (set! (-> arg2 x) (+ (-> s4-0 x) (-> v1-8 x-y-z-sx x))) + (set! (-> arg2 y) (+ (-> s4-0 y) (-> v1-8 x-y-z-sx y))) + (set! (-> arg2 z) (+ (-> s4-0 z) (-> v1-8 x-y-z-sx z))) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function sp-process-block-2d +;; INFO: function output is handled by mips2c +(def-mips2c sp-process-block-2d (function sparticle-system int int int int symbol none)) + +;; definition for function sp-process-block-3d +;; INFO: function output is handled by mips2c +(def-mips2c sp-process-block-3d (function sparticle-system int int int int symbol none)) + +;; definition for function sp-copy-to-spr +;; WARN: Return type mismatch int vs none. +(defun sp-copy-to-spr ((arg0 int) (arg1 pointer) (arg2 int)) + (let ((a2-1 (/ (+ arg2 15) 16))) + (dma-send-to-spr-no-flush (the-as uint arg0) (the-as uint arg1) (the-as uint a2-1) #t) + ) + 0 + (none) + ) + +;; definition for function sp-copy-from-spr +;; WARN: Return type mismatch int vs none. +(defun sp-copy-from-spr ((arg0 int) (arg1 pointer) (arg2 int)) + (let ((a2-1 (/ (+ arg2 15) 16))) + (dma-send-from-spr-no-flush (the-as uint arg1) (the-as uint arg0) (the-as uint a2-1) #t) + ) + 0 + (none) + ) + +;; definition for function memcpy +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function sp-process-block +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun sp-process-block ((arg0 sparticle-system) (arg1 int) (arg2 sprite-array-2d) (arg3 int)) + (local-vars (sv-16 int) (sv-32 int) (sv-48 int) (sv-64 int)) + (let ((s3-0 352) + (s2-0 (* 144 arg3)) + (s5-0 (* 48 arg3)) + ) + (set! sv-32 (* 80 arg3)) + (let ((s1-0 (+ s3-0 s2-0))) + (set! sv-16 (+ s1-0 s5-0)) + (sp-copy-to-spr s3-0 (the-as pointer (-> arg0 cpuinfo-table arg1)) s2-0) + (sp-copy-to-spr s1-0 (&+ (-> arg0 vecdata-table) (* 48 arg1)) s5-0) + (let ((t9-2 sp-copy-to-spr) + (a1-7 (-> arg0 adgifdata-table arg1)) + ) + (t9-2 sv-16 (the-as pointer a1-7) sv-32) + ) + (set! sv-48 (+ #x70000000 s3-0)) + (set! sv-64 (+ #x70000000 s1-0)) + (let ((t1-0 (paused?))) + (cond + ((-> arg0 is-3d) + (let ((t9-4 sp-process-block-3d) + (a0-6 arg0) + (a3-1 arg1) + ) + (t9-4 a0-6 sv-48 sv-64 a3-1 arg3 t1-0) + ) + ) + (else + (sp-process-block-2d arg0 sv-48 sv-64 arg1 arg3 t1-0) + ) + ) + ) + (sp-copy-from-spr s3-0 (the-as pointer (-> arg0 cpuinfo-table arg1)) s2-0) + (sp-copy-from-spr s1-0 (&+ (-> arg0 vecdata-table) (* 48 arg1)) s5-0) + ) + ) + 0 + (none) + ) + +;; definition for function sp-process-particle-system +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun sp-process-particle-system ((arg0 sparticle-system) (arg1 int) (arg2 sprite-array-2d)) + (countdown (v1-0 22) + (let ((a0-4 (-> *display* clock v1-0 sparticle-data quad))) + (set! (-> (the-as vector (+ #x70000000 (* v1-0 16))) quad) a0-4) + ) + ) + (let* ((v1-3 352) + (s1-0 (/ (- #x4000 v1-3) 272)) + (s2-0 0) + (s3-0 (sp-get-approx-alloc-size arg0 arg1)) + ) + (if (= arg1 1) + (set! s2-0 (* (-> arg0 blocks 0) 64)) + ) + (set! (-> arg2 num-valid arg1) s3-0) + (flush-cache 0) + (while (>= s3-0 s1-0) + (sp-process-block arg0 s2-0 arg2 s1-0) + (set! s3-0 (- s3-0 s1-0)) + (+! s2-0 s1-0) + ) + (if (> s3-0 0) + (sp-process-block arg0 s2-0 arg2 s3-0) + ) + ) + 0 + (none) + ) + +;; definition (perm) for symbol *particles-flag*, type symbol +(define-perm *particles-flag* symbol #t) + +;; definition for function forall-particles-with-key-runner +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun forall-particles-with-key-runner ((arg0 sparticle-launch-control) + (arg1 (function sparticle-system sparticle-cpuinfo none)) + (arg2 sparticle-system) + ) + (local-vars (sv-16 int)) + (let ((s3-0 (the-as object (-> arg2 cpuinfo-table 0))) + (s2-0 (&+ (-> arg2 vecdata-table) 0)) + (s1-0 (+ (-> arg2 blocks 0) (-> arg2 blocks 1))) + ) + (dotimes (s0-0 s1-0) + (cond + ((!= (-> arg2 alloc-table s0-0) -1) + (set! sv-16 0) + (while (< sv-16 64) + (if (and (nonzero? (-> (the-as sparticle-cpuinfo s3-0) valid)) (= (-> (the-as sparticle-cpuinfo s3-0) key) arg0)) + (arg1 arg2 (the-as sparticle-cpuinfo s3-0)) + ) + (set! s3-0 (-> (the-as (inline-array sparticle-cpuinfo) s3-0) 1)) + (&+! s2-0 48) + (set! sv-16 (+ sv-16 1)) + ) + ) + (else + (set! s3-0 (-> (the-as (inline-array sparticle-cpuinfo) s3-0) 64)) + (&+! s2-0 3072) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function forall-particles-with-key +;; WARN: Return type mismatch int vs none. +(defun forall-particles-with-key ((arg0 sparticle-launch-control) + (arg1 (function sparticle-system sparticle-cpuinfo none)) + (arg2 symbol) + (arg3 symbol) + ) + (if arg2 + (forall-particles-with-key-runner arg0 arg1 *sp-particle-system-2d*) + ) + (if arg3 + (forall-particles-with-key-runner arg0 arg1 *sp-particle-system-3d*) + ) + 0 + (none) + ) + +;; definition for function sparticle-kill-it +;; WARN: Return type mismatch int vs none. +(defun sparticle-kill-it ((arg0 sparticle-system) (arg1 sparticle-cpuinfo)) + (set! (-> arg1 timer) 0) + (set! (-> arg1 sp-func) (the-as (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d uint none) 0)) + (when (and (-> arg1 binding) (nonzero? (-> arg1 binding))) + (logclear! (-> arg1 binding flags) (sp-launch-state-flags sp0 sp1)) + (set! (-> arg1 binding) #f) + ) + 0 + (none) + ) + +;; definition for symbol *sparticle-kill-it-level*, type int +(define *sparticle-kill-it-level* 0) + +;; definition for function sparticle-kill-it-level +;; WARN: Return type mismatch int vs none. +(defun sparticle-kill-it-level ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 pointer)) + (if (= (logand (shr (the-as int (-> arg1 flags)) 9) 15) *sparticle-kill-it-level*) + (sparticle-kill-it arg0 arg1) + ) + 0 + (none) + ) + +;; definition for function sparticle-60-to-50 +;; WARN: Return type mismatch int vs none. +(defun sparticle-60-to-50 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 pointer)) + (let ((gp-0 (-> arg1 rotvel3d)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (vector-angle<-quaternion! s5-0 gp-0) + (set! (-> s5-0 w) (* 12516.455 (-> s5-0 w))) + (quaternion-vector-angle! gp-0 s5-0 (-> s5-0 w)) + ) + 0 + (none) + ) + +;; definition for function sparticle-50-to-60 +;; WARN: Return type mismatch int vs none. +(defun sparticle-50-to-60 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 pointer)) + (let ((gp-0 (-> arg1 rotvel3d)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (vector-angle<-quaternion! s5-0 gp-0) + (set! (-> s5-0 w) (* 8691.982 (-> s5-0 w))) + (quaternion-vector-angle! gp-0 s5-0 (-> s5-0 w)) + ) + 0 + (none) + ) + +;; definition for function kill-all-particles-with-key +;; WARN: Return type mismatch int vs none. +(defun kill-all-particles-with-key ((arg0 sparticle-launch-control)) + (forall-particles-with-key arg0 sparticle-kill-it #t #t) + 0 + (none) + ) + +;; definition for function forall-particles-runner +;; WARN: Return type mismatch int vs none. +(defun forall-particles-runner ((arg0 (function sparticle-system sparticle-cpuinfo pointer none)) (arg1 sparticle-system)) + (let ((s4-0 (the-as object (-> arg1 cpuinfo-table 0))) + (s3-0 (&+ (-> arg1 vecdata-table) 0)) + (s2-0 (+ (-> arg1 blocks 0) (-> arg1 blocks 1))) + ) + (dotimes (s1-0 s2-0) + (cond + ((!= (-> arg1 alloc-table s1-0) -1) + (dotimes (s0-0 64) + (if (nonzero? (-> (the-as sparticle-cpuinfo s4-0) valid)) + (arg0 arg1 (the-as sparticle-cpuinfo s4-0) s3-0) + ) + (set! s4-0 (+ (the-as uint s4-0) 144)) + (&+! s3-0 48) + ) + ) + (else + (set! s4-0 (&+ (the-as pointer s4-0) 9216)) + (&+! s3-0 3072) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function forall-particles +;; WARN: Return type mismatch int vs none. +(defun forall-particles ((arg0 function) (arg1 symbol) (arg2 symbol)) + (if arg1 + (forall-particles-runner + (the-as (function sparticle-system sparticle-cpuinfo pointer none) arg0) + *sp-particle-system-2d* + ) + ) + (if arg2 + (forall-particles-runner + (the-as (function sparticle-system sparticle-cpuinfo pointer none) arg0) + *sp-particle-system-3d* + ) + ) + 0 + (none) + ) + +;; definition for function kill-all-particles-in-level +(defun kill-all-particles-in-level ((arg0 level)) + (set! *sparticle-kill-it-level* (-> arg0 index)) + (forall-particles sparticle-kill-it-level #t #t) + 0 + ) + +;; definition for function all-particles-50-to-60 +(defun all-particles-50-to-60 () + (forall-particles-runner sparticle-50-to-60 *sp-particle-system-3d*) + (none) + ) + +;; definition for function all-particles-60-to-50 +(defun all-particles-60-to-50 () + (forall-particles-runner sparticle-60-to-50 *sp-particle-system-3d*) + (none) + ) + +;; definition for function remap-particle +;; WARN: Return type mismatch gs-miptbp vs none. +(defun remap-particle ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 pointer)) + (let* ((gp-0 (-> arg1 adgif)) + (a0-1 (-> gp-0 texture-id)) + (v1-0 (lookup-texture-by-id-fast a0-1)) + ) + (when v1-0 + (set! (-> gp-0 tex0 tbp0) (-> v1-0 dest 0)) + (set! (-> gp-0 tex0 cbp) (-> v1-0 clutdest)) + (set! (-> gp-0 miptbp1 tbp1) (-> v1-0 dest 1)) + (set! (-> gp-0 miptbp1 tbp2) (-> v1-0 dest 2)) + (set! (-> gp-0 miptbp1 tbp3) (-> v1-0 dest 3)) + ) + ) + (none) + ) + +;; definition for function remap-all-particles +(defun remap-all-particles () + (forall-particles remap-particle #t #t) + (none) + ) + +;; definition for function process-particles +;; WARN: Return type mismatch int vs none. +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 gp, Count] +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count] +(defun process-particles () + (local-vars (v1-53 int) (gp-0 int)) + (with-pp + (when *particles-flag* + 0 + 0 + (.mfc0 gp-0 Count) + (set! *sp-launcher-lock* #t) + (when *debug-segment* + (let ((s5-0 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-12 'particle) + (s4-0 *profile-particle-color*) + ) + (when (and *dproc* *debug-segment*) + (let ((s3-0 (-> s5-0 data (-> s5-0 count)))) + (let ((s2-0 (-> s5-0 base-time))) + (set! (-> s3-0 name) v1-12) + (set! (-> s3-0 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s2-0)))) + ) + (set! (-> s3-0 depth) (the-as uint (-> s5-0 depth))) + (set! (-> s3-0 color) s4-0) + (set! (-> s5-0 segment (-> s5-0 depth)) s3-0) + ) + (set! (-> s5-0 count) (min 1023 (+ (-> s5-0 count) 1))) + (+! (-> s5-0 depth) 1) + (set! (-> s5-0 max-depth) (max (-> s5-0 max-depth) (-> s5-0 depth))) + ) + ) + 0 + ) + (logand (the-as int (-> pp clock sparticle-data x)) 255) + (cond + (*sp-60-hz* + (when (= (-> *setting-control* user-current video-mode) 'pal) + (set! *sp-60-hz* #f) + (all-particles-60-to-50) + ) + ) + (else + (when (= (-> *setting-control* user-current video-mode) 'ntsc) + (set! *sp-60-hz* #t) + (all-particles-50-to-60) + ) + ) + ) + (clear-sprite-aux-list) + (sp-process-particle-system *sp-particle-system-2d* 0 *sprite-array-2d*) + (sp-process-particle-system *sp-particle-system-2d* 1 *sprite-array-2d*) + (sp-process-particle-system *sp-particle-system-3d* 0 (the-as sprite-array-2d *sprite-array-3d*)) + (when *debug-segment* + (let ((s5-1 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-47 (+ (-> s5-1 depth) -1)) + (s4-1 (-> s5-1 segment v1-47)) + (s3-1 (-> s5-1 base-time)) + ) + (when (>= v1-47 0) + (set! (-> s4-1 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s3-1)))) + (+! (-> s5-1 depth) -1) + ) + ) + ) + ) + 0 + ) + (set! *sp-launcher-lock* #f) + (sp-clear-queue) + (.mfc0 v1-53 Count) + (- v1-53 gp-0) + (when *display-sprite-info* + (if (movie?) + (format *stdcon* "~%~%~%") + ) + (format + *stdcon* + "2d: ~4d~100h3d: ~4d~200hwarp/glow: ~3D~350hhud:~3D~%" + (-> *sp-particle-system-2d* num-alloc 0) + (-> *sp-particle-system-3d* num-alloc 0) + (-> *sprite-aux-list* entry) + (-> *sp-particle-system-2d* num-alloc 1) + ) + ) + ) + 0 + (none) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/gfx/sprite/sprite-distort_REF.gc b/test/decompiler/reference/jak3/engine/gfx/sprite/sprite-distort_REF.gc index a14dd1505c..3f20424db1 100644 --- a/test/decompiler/reference/jak3/engine/gfx/sprite/sprite-distort_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/sprite/sprite-distort_REF.gc @@ -221,7 +221,7 @@ (.mul.vf vf10 vf1 vf8) (.div.vf Q vf0 vf10 :fsf #b11 :ftf #b11) (TODO.VCLIP vf10 vf10) - (b! (zero? (-> sv-16 flag-rot-sy x)) cfg-22 :delay (nop!)) + (b! (zero? (-> sv-16 flag)) cfg-22 :delay (nop!)) (.wait.vf) (.mul.vf vf1 vf1 Q :mask #b111) (.mul.vf vf2 vf2 Q :mask #b111) @@ -235,11 +235,11 @@ (set! (-> sv-32 y) (+ 0.0009765625 (* 0.001953125 (+ -1840.0 (-> (the-as vector a0-3) y))))) ) (set! (-> sv-32 z) 1.0) - (when (or (< (the-as int (-> sv-16 flag-rot-sy x)) 3) (< 11 (the-as int (-> sv-16 flag-rot-sy x)))) - (format 0 "Turns = ~D!!!~%" (-> sv-16 flag-rot-sy x)) - (set! (-> sv-16 flag-rot-sy x) (the-as float #xb)) + (when (or (< (-> sv-16 flag) 3) (< 11 (-> sv-16 flag))) + (format 0 "Turns = ~D!!!~%" (-> sv-16 flag)) + (set! (-> sv-16 flag) 11) ) - (set! (-> sv-32 w) (-> sv-16 flag-rot-sy x)) + (set! (-> sv-32 w) (the-as float (-> sv-16 flag))) (let* ((f1-4 (- (-> *math-camera* perspective uvec y))) (f2-4 (-> sv-32 y)) (f4-0 (+ f2-4 (* (-> sv-48 x) f1-4))) @@ -372,7 +372,3 @@ (none) ) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/gfx/sprite/sprite-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/sprite/sprite-h_REF.gc index b649486079..058aacf7b6 100644 --- a/test/decompiler/reference/jak3/engine/gfx/sprite/sprite-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/sprite/sprite-h_REF.gc @@ -35,7 +35,7 @@ ) (format #t "[~8x] ~A~%" this 'sprite-vec-data-2d) (format #t "~1Tx-y-z-sx: #~%" (-> this x-y-z-sx)) - (format #t "~1Tflag-rot-sy: #~%" (-> this flag-rot-sy)) + (format #t "~1Tflag-rot-sy: #~%" (&-> this flag)) (format #t "~1Tr-g-b-a: #~%" (-> this r-g-b-a)) (format #t "~1Tx: ~f~%" (-> this x-y-z-sx x)) (format #t "~1Ty: ~f~%" (-> this x-y-z-sx y)) @@ -43,9 +43,9 @@ (format #t "~1Tsx: ~f~%" (-> this x-y-z-sx w)) (format #t "~1Tsy: ~f~%" (-> this flag-rot-sy w)) (format #t "~1Trot: ~f~%" (-> this flag-rot-sy z)) - (format #t "~1Tflag: ~D~%" (-> this flag-rot-sy x)) + (format #t "~1Tflag: ~D~%" (-> this flag)) (format #t "~1Tmatrix: ~D~%" (-> this flag-rot-sy y)) - (format #t "~1Twarp-turns: ~D~%" (-> this flag-rot-sy x)) + (format #t "~1Twarp-turns: ~D~%" (-> this flag)) (format #t "~1Tr: ~f~%" (-> this r-g-b-a x)) (format #t "~1Tg: ~f~%" (-> this r-g-b-a y)) (format #t "~1Tb: ~f~%" (-> this r-g-b-a z)) diff --git a/test/decompiler/reference/jak3/engine/gfx/sprite/sprite_REF.gc b/test/decompiler/reference/jak3/engine/gfx/sprite/sprite_REF.gc index a51bc9daf3..31d3174de6 100644 --- a/test/decompiler/reference/jak3/engine/gfx/sprite/sprite_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/sprite/sprite_REF.gc @@ -397,7 +397,7 @@ The glow and distort renderers will pull sprites from here." ) ) (set! (-> arg0 screen-shader prims 9) (gs-reg64 alpha-1)) - (set! (-> arg0 screen-shader alpha) (new 'static 'gs-alpha :b #x1 :d #x1)) + (set! (-> arg0 screen-shader alpha) (new 'static 'gs-miptbp :tbp1 #x44)) (set! (-> arg0 sincos-01 z) 0.999998) (set! (-> arg0 sincos-23 z) -0.16666014) (set! (-> arg0 sincos-45 z) 0.008326521) @@ -919,7 +919,3 @@ The glow and distort renderers will pull sprites from here." ;; failed to figure out what this is: (kmemclose) - - - - 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 a8d8de66fd..88f34e929a 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 @@ -333,7 +333,7 @@ (alpha-near float) (alpha-far float) (alpha-delta float) - (color uint32) + (color rgba) ) ) @@ -622,7 +622,3 @@ ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/engine/gfx/texture/texture-h_REF.gc b/test/decompiler/reference/jak3/engine/gfx/texture/texture-h_REF.gc index eb061b4383..84fdb08df8 100644 --- a/test/decompiler/reference/jak3/engine/gfx/texture/texture-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/texture/texture-h_REF.gc @@ -441,22 +441,24 @@ to have a smaller impact on frame times when loading." These are used by many different renderers and partially managed by the texture system. For example, the texture system will automatically update tbp to point to the location of the texture." - ((quad qword 5 :inline) - (prims gs-reg64 10 :overlay-at quad) - (reg-0 uint8 :overlay-at (-> quad 0 data 2)) - (reg-1 uint8 :overlay-at (-> prims 3)) - (reg-2 uint8 :overlay-at (-> prims 5)) - (reg-3 uint8 :overlay-at (-> prims 7)) - (reg-4 uint8 :overlay-at (-> prims 9)) - (tex0 gs-tex0 :overlay-at (-> quad 0 data 0)) - (tex1 gs-tex1 :overlay-at (-> prims 2)) - (miptbp1 gs-miptbp :overlay-at (-> prims 4)) - (clamp gs-clamp :overlay-at (-> prims 6)) - (clamp-reg gs-reg64 :overlay-at reg-3) - (alpha gs-alpha :overlay-at (-> prims 8)) - (link-test link-test-flags :overlay-at (-> quad 0 data 2)) - (texture-id texture-id :overlay-at reg-1) - (next shader-ptr :overlay-at reg-2) + ((quad qword 5 :inline) + (prims gs-reg64 10 :overlay-at quad) + (reg-0 uint8 :overlay-at (-> quad 0 data 2)) + (reg-1 uint8 :overlay-at (-> prims 3)) + (reg-2 uint8 :overlay-at (-> prims 5)) + (reg-3 uint8 :overlay-at (-> prims 7)) + (reg-4 uint8 :overlay-at (-> prims 9)) + (tex0 gs-tex0 :overlay-at (-> quad 0 data 0)) + (tex1 gs-tex1 :overlay-at (-> prims 2)) + (miptbp1 gs-miptbp :overlay-at (-> prims 4)) + (clamp gs-clamp :overlay-at (-> prims 6)) + (clamp-reg gs-reg64 :overlay-at reg-3) + (alpha gs-miptbp :overlay-at (-> prims 8)) + (link-test link-test-flags :overlay-at (-> quad 0 data 2)) + (texture-id texture-id :overlay-at reg-1) + (next shader-ptr :overlay-at reg-2) + (alpha-as-miptb2 gs-miptbp :overlay-at alpha) + (reg-4-u32 gs-reg32 :overlay-at reg-4) ) ) diff --git a/test/decompiler/reference/jak3/engine/gfx/texture/texture_REF.gc b/test/decompiler/reference/jak3/engine/gfx/texture/texture_REF.gc index b2767f7fbb..a81aed4eec 100644 --- a/test/decompiler/reference/jak3/engine/gfx/texture/texture_REF.gc +++ b/test/decompiler/reference/jak3/engine/gfx/texture/texture_REF.gc @@ -1479,9 +1479,9 @@ "Turn on masks for skull gem textures, so they will be uploaded." (local-vars (v0-3 uint128) (v1-2 uint128) (v1-3 uint128)) (let ((gp-0 (-> *level* level-default texture-mask))) - (let* ((s5-0 (lookup-texture-by-id (new 'static 'texture-id :index #x17 :page #x6))) - (s4-0 (lookup-texture-by-id (new 'static 'texture-id :index #x18 :page #x6))) - (a0-4 (lookup-texture-by-id (new 'static 'texture-id :index #x19 :page #x6))) + (let* ((s5-0 (get-texture skull-gem-alpha-00 level-default-tfrag)) + (s4-0 (get-texture skull-gem-alpha-01 level-default-tfrag)) + (a0-4 (get-texture skull-gem-alpha-02 level-default-tfrag)) (v1-1 (-> gp-0 0 mask quad)) (a1-0 (-> s5-0 masks data 0 mask quad)) (a2-0 (-> s4-0 masks data 0 mask quad)) @@ -1732,7 +1732,7 @@ (set! (-> v1-6 base) (-> v1-6 data)) (set! (-> v1-6 end) (the-as pointer (+ (+ (-> v1-6 allocated-length) 28) (the-as int v1-6)))) ) - (let ((s2-0 (lookup-texture-by-id (new 'static 'texture-id :index #x1 :page #xc))) + (let ((s2-0 (get-texture font.12lo gamefont)) (s1-0 #xc2000) (s0-0 36) ) @@ -1741,7 +1741,7 @@ (font-set-tex0 (the-as (pointer gs-tex0) (-> *font-work* small-font-0-tmpl)) s2-0 s1-0 s0-0 sv-20) (font-set-tex0 (the-as (pointer gs-tex0) (-> *font-work* small-font-2-tmpl)) s2-0 s1-0 s0-0 sv-20) ) - (let ((s3-1 (lookup-texture-by-id (new 'static 'texture-id :page #xc))) + (let ((s3-1 (get-texture font.12hi gamefont)) (s2-1 #xc2000) (s1-1 44) ) @@ -1750,7 +1750,7 @@ (font-set-tex0 (the-as (pointer gs-tex0) (-> *font-work* small-font-1-tmpl)) s3-1 s2-1 s1-1 sv-20) (font-set-tex0 (the-as (pointer gs-tex0) (-> *font-work* small-font-3-tmpl)) s3-1 s2-1 s1-1 sv-20) ) - (let ((s3-2 (lookup-texture-by-id (new 'static 'texture-id :index #x4 :page #xc))) + (let ((s3-2 (get-texture font.24lo gamefont)) (s2-2 #x90000) (s1-2 36) ) @@ -1758,7 +1758,7 @@ (texture-relocate s4-0 s3-2 s2-2 (the-as gs-psm s1-2) -1) (font-set-tex0 (the-as (pointer gs-tex0) (-> *font-work* large-font-0-tmpl)) s3-2 s2-2 s1-2 sv-20) ) - (let ((s3-3 (lookup-texture-by-id (new 'static 'texture-id :index #x2 :page #xc))) + (let ((s3-3 (get-texture font.24hi gamefont)) (s2-3 #x90000) (s1-3 44) ) @@ -1766,7 +1766,7 @@ (texture-relocate s4-0 s3-3 s2-3 (the-as gs-psm s1-3) -1) (font-set-tex0 (the-as (pointer gs-tex0) (-> *font-work* large-font-1-tmpl)) s3-3 s2-3 s1-3 sv-20) ) - (let ((s3-4 (lookup-texture-by-id (new 'static 'texture-id :index #x5 :page #xc))) + (let ((s3-4 (get-texture font.24lo2 gamefont)) (s2-4 #x5e000) (s1-4 36) ) @@ -1774,7 +1774,7 @@ (texture-relocate s4-0 s3-4 s2-4 (the-as gs-psm s1-4) -1) (font-set-tex0 (the-as (pointer gs-tex0) (-> *font-work* large-font-2-tmpl)) s3-4 s2-4 s1-4 sv-20) ) - (let ((s3-5 (lookup-texture-by-id (new 'static 'texture-id :index #x3 :page #xc))) + (let ((s3-5 (get-texture font.24hi2 gamefont)) (s2-5 #x5e000) (s1-5 44) ) @@ -2322,7 +2322,7 @@ (adgif-shader<-texture! shader tex) ) (set! (-> shader clamp) (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))) - (set! (-> shader alpha) (new 'static 'gs-alpha :b #x1 :d #x1)) + (set! (-> shader alpha) (new 'static 'gs-miptbp :tbp1 #x44)) (set! (-> shader prims 1) (gs-reg64 tex0-1)) (set! (-> shader prims 3) (gs-reg64 tex1-1)) (set! (-> shader prims 5) (gs-reg64 miptbp1-1)) diff --git a/test/decompiler/reference/jak3/engine/level/bsp-h_REF.gc b/test/decompiler/reference/jak3/engine/level/bsp-h_REF.gc index 057300a88b..412df690ea 100644 --- a/test/decompiler/reference/jak3/engine/level/bsp-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/level/bsp-h_REF.gc @@ -37,30 +37,46 @@ This is used for precomputed visibility, based on the camera position. This is n "The bsp-header is really an entire level. This probably started as a very simple structure, but now it is extremely complicated." ((info file-info :overlay-at id) - (all-visible-list (pointer uint16) :offset 32) - (visible-list-length int16 :offset 36) - (drawable-trees drawable-tree-array :offset 40) - (pat pointer :offset 44) - (pat-length int32 :offset 48) + (all-visible-list (pointer uint8)) + (visible-list-length int16) + (extra-vis-list-length int16) + (drawable-trees drawable-tree-array) + (pat pointer) + (pat-length int32) (texture-remap-table (pointer uint64)) (texture-remap-table-len int32) (texture-ids (pointer texture-id)) (texture-page-count int32) (unknown-basic basic) - (actors drawable-inline-array-actor :offset 112) + (name symbol) + (nickname symbol) + (vis-info level-vis-info 8) + (actors drawable-inline-array-actor) (cameras (array entity-camera)) - (nodes (inline-array bsp-node) :offset 120) + (nodes (inline-array bsp-node)) (level level) (current-leaf-idx uint16) - (texture-flags texture-page-flag 10 :offset 130) + (texture-flags texture-page-flag 10) (cam-outside-bsp uint8 :offset 152) (cam-using-back uint8) (cam-box-idx uint16) + (ambients symbol) + (subdivide-close float :offset 160) + (subdivide-far float) + (race-meshes (array entity-race-mesh)) (actor-birth-order (pointer uint32) :offset 172) + (light-hash light-hash) + (nav-meshes (array entity-nav-mesh)) + (actor-groups (array actor-group)) (region-trees (array drawable-tree-region-prim) :offset 188) + (region-array region-array) (collide-hash collide-hash :offset 196) + (wind-array uint32 :offset 200) + (wind-array-length int32 :offset 204) + (city-level-info city-level-info :offset 208) (vis-spheres vector-array :offset 216) (vis-spheres-length uint32 :offset 248) + (region-tree drawable-tree-region-prim :offset 252) (tfrag-masks texture-masks-array :offset 256) (tfrag-closest (pointer float)) (tfrag-mask-count uint32 :overlay-at tfrag-closest) @@ -75,7 +91,7 @@ This probably started as a very simple structure, but now it is extremely compli (water-mask-count uint32 :overlay-at water-closest) (bsp-scale vector :inline :offset 288) (bsp-offset vector :inline) - (unk-drawable drawable :offset 320) + (hfrag-drawable drawable :offset 320) (end uint8 :offset 399) ) (:methods diff --git a/test/decompiler/reference/jak3/engine/level/bsp_REF.gc b/test/decompiler/reference/jak3/engine/level/bsp_REF.gc index daf274fcaa..4c4fde05f6 100644 --- a/test/decompiler/reference/jak3/engine/level/bsp_REF.gc +++ b/test/decompiler/reference/jak3/engine/level/bsp_REF.gc @@ -101,8 +101,8 @@ (+! (-> usage data 65 used) v1-92) (+! (-> usage data 65 total) (logand -16 (+ v1-92 15))) ) - (if (nonzero? (-> this unk-drawable)) - (mem-usage (-> this unk-drawable) usage flags) + (if (nonzero? (-> this hfrag-drawable)) + (mem-usage (-> this hfrag-drawable) usage flags) ) (when (nonzero? (-> this region-trees)) (let* ((s3-0 (-> this region-trees length)) @@ -147,8 +147,8 @@ ) ) ) - (if (nonzero? (-> this unk-drawable)) - (login (-> this unk-drawable)) + (if (nonzero? (-> this hfrag-drawable)) + (login (-> this hfrag-drawable)) ) this ) @@ -349,8 +349,8 @@ (if (nonzero? (-> this drawable-trees)) (collect-stats (-> this drawable-trees)) ) - (if (nonzero? (-> this unk-drawable)) - (collect-stats (-> this unk-drawable)) + (if (nonzero? (-> this hfrag-drawable)) + (collect-stats (-> this hfrag-drawable)) ) 0 (none) @@ -597,7 +597,7 @@ ) (when (zero? (&+ (+ (&+ s2-0 s3-0) (the-as int s4-0)) gp-0)) (dotimes (a0-5 (-> v1-0 length)) - (let ((a1-2 (-> v1-0 data a0-5))) + (let ((a1-2 (-> v1-0 trees a0-5))) (cond ((= (-> a1-2 type) drawable-tree-tfrag) (let* ((a2-5 (-> (the-as drawable-tree-tfrag a1-2) arrays (+ (-> (the-as drawable-tree-tfrag a1-2) length) -1))) diff --git a/test/decompiler/reference/jak3/engine/level/level-h_REF.gc b/test/decompiler/reference/jak3/engine/level/level-h_REF.gc index 6d55cbe393..869f2f96ea 100644 --- a/test/decompiler/reference/jak3/engine/level/level-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/level/level-h_REF.gc @@ -150,9 +150,9 @@ ;; definition of type level-borrow-info (deftype level-borrow-info (basic) - ((alias symbol) + ((alias object) (borrow-size uint16 5) - (borrow-info symbol 5) + (borrow-info object 5) ) ) @@ -218,8 +218,8 @@ (mood-range mood-range :inline) ) (:methods - (level-load-info-method-9 (_type_ int) object) - (level-load-info-method-10 (_type_) none) + (get-callback-symbol-value-by-slot! (_type_ int) object) + (get-callback-by-slot! (_type_ int) object) ) ) @@ -375,6 +375,12 @@ (loaded-texture-page-count int32) (entity entity-links-array) (closest-object meters 10) + (tie-min-dist float :offset 352) + (fg-tfrag-min-dist float) + (fg-prim-min-dist float) + (fg-shrub-min-dist float) + (fg-warp-min-dist float :offset 372) + (fg-prim2-min-dist float :offset 380) (upload-size int32 20 :offset 388) (inside-boxes? basic) (display? symbol) @@ -418,7 +424,7 @@ (alpha-dists pointer) (water-masks texture-masks-array) (water-dists pointer) - (tfrag-last-calls int32 6) + (tfrag-last-calls uint32 6) (texture-anim-array texture-anim-array 11) (light-hash light-hash) (draw-priority float) @@ -434,27 +440,27 @@ (unknown-pad uint8 14) ) (:methods - (level-method-9 () none) - (level-method-10 () none) - (level-method-11 () none) + (deactivate (_type_) _type_) + (unload! (_type_) _type_) + (is-object-visible? (_type_ int) symbol) (level-method-12 () none) - (level-method-13 () none) + (bsp-name (_type_) symbol) (compute-memory-usage! (_type_ symbol) memory-usage-block) - (level-method-15 () none) + (inside-bsp? (_type_) symbol) (update-vis! (_type_ level-vis-info uint (pointer uint8)) symbol) - (level-method-17 () none) - (level-method-18 () none) - (level-method-19 () none) - (level-method-20 () none) + (load-continue (_type_) _type_) + (load-begin (_type_) _type_) + (login-begin (_type_) _type_) + (debug-print-region-splitbox (_type_ vector object) none) (get-art-group-by-name (_type_ string) art-group) - (level-method-22 () none) - (level-method-23 () none) + (set-proto-vis! (_type_ symbol) int) + (lookup-text (_type_ text-id symbol) string) (level-method-24 () none) - (level-method-25 () none) - (level-method-26 () none) - (level-method-27 () none) - (level-method-28 () none) - (level-method-29 () none) + (birth (_type_) _type_) + (level-status-update! (_type_ symbol) _type_) + (load-common-package (_type_) none) + (init-vis-from-bsp (_type_) none) + (vis-clear (_type_) none) ) ) @@ -656,27 +662,27 @@ ) (:methods (level-get (_type_ symbol) level) - (level-group-method-10 () none) + (level-get-with-status (_type_ symbol) level) (get-level-by-heap-ptr-and-status (_type_ pointer symbol) level) - (level-group-method-12 () none) - (level-group-method-13 () none) - (level-group-method-14 () none) - (level-group-method-15 () none) - (level-group-method-16 () none) - (level-group-method-17 () none) - (level-group-method-18 () none) + (level-get-for-use (_type_ symbol symbol) level) + (activate-levels! (_type_) int) + (debug-print-entities (_type_ symbol type string) none) + (debug-draw-actors (_type_ symbol) none) + (assign-draw-indices (_type_) none) + (actors-update (_type_) none) + (update-nav-meshes-method (_type_) none) (level-update (_type_) none) (level-get-target-inside (_type_) level) - (level-group-method-21 () none) + (init-level-system (_type_ symbol) none) (art-group-get-by-name (_type_ string (pointer level)) art-group) - (level-group-method-23 () none) - (level-group-method-24 () none) - (level-group-method-25 () none) - (level-group-method-26 (_type_ symbol) symbol) - (level-group-method-27 () none) - (level-group-method-28 (_type_) symbol) - (level-group-method-29 () none) - (level-group-method-30 () none) + (update-vis-volumes (_type_) none) + (level-group-method-24 (_type_) none) + (print-volume-sizes (_type_) none) + (status-of-level-and-borrows (_type_ symbol symbol) symbol) + (do-nothing (_type_) none) + (load-in-progress? (_type_) symbol) + (is-load-allowed? (_type_ (pointer symbol)) symbol) + (level-get-most-disposable (_type_) level) ) ) diff --git a/test/decompiler/reference/jak3/engine/level/level-info_REF.gc b/test/decompiler/reference/jak3/engine/level/level-info_REF.gc index b02794a050..25d475c76b 100644 --- a/test/decompiler/reference/jak3/engine/level/level-info_REF.gc +++ b/test/decompiler/reference/jak3/engine/level/level-info_REF.gc @@ -445,7 +445,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xbb8 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -15) :fog-height (meters 80) @@ -574,7 +574,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x1a4 #x1a4 #x1a4 #x30c #x32a) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -15) :fog-height (meters 80) @@ -607,7 +607,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -639,7 +639,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -671,7 +671,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -703,7 +703,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -735,7 +735,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -767,7 +767,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -3190,7 +3190,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x71c #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -100) :fog-height (meters 80) @@ -3377,7 +3377,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x13a1 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -3523,7 +3523,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xbea #x898 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -4299,7 +4299,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x4ba #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -15) :fog-height (meters 80) @@ -4422,7 +4422,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x82a #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -15) :fog-height (meters 80) @@ -4566,7 +4566,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x1b #x2ee #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -15) :fog-height (meters 80) @@ -4791,7 +4791,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x3e8 #xe6 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -5179,7 +5179,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xfa #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -5355,7 +5355,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xfa #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -6221,7 +6221,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xa28 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -10000) :fog-height (meters 80) @@ -8202,7 +8202,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x79e #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -8476,7 +8476,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x785 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -8510,7 +8510,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x21c #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) @@ -8645,7 +8645,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x195 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -10000) :fog-height (meters 80) @@ -8679,7 +8679,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x320 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -8971,7 +8971,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x258 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -9456,7 +9456,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x3e8 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -9895,7 +9895,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x4dd #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -9929,7 +9929,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x8ca #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) @@ -10385,7 +10385,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x898 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters 10) :fog-height (meters 80) @@ -11893,7 +11893,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x52d #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -13969,7 +13969,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x3e8 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) @@ -14411,7 +14411,7 @@ :bigmap-id (bigmap-id no-map) :continues '() :callback-list '() - :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f)) + :borrow (new 'static 'level-borrow-info :alias #f :borrow-info (new 'static 'array object 5 #f #f #f #f #f)) :bottom-height (meters -20) :fog-height (meters 80) :max-rain 1.0 @@ -14843,7 +14843,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x4c9 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) @@ -16005,7 +16005,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x3e8 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -16489,7 +16489,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xa #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -17819,7 +17819,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x285 #x8fc #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -17993,7 +17993,7 @@ :index #x110 :task-level #x9 :master-level 'factorya - :level-flags (level-flags lf10 lf12 lf13) + :level-flags (level-flags use-camera-other lf12 lf13) :packages '() :run-packages '("common") :memory-mode (level-memory-mode borrow) @@ -18023,7 +18023,7 @@ :index #x111 :task-level #x9 :master-level 'factorya - :level-flags (level-flags lf10 lf12 lf13) + :level-flags (level-flags use-camera-other lf12 lf13) :packages '() :run-packages '("common") :memory-mode (level-memory-mode borrow) @@ -18091,7 +18091,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xc4e #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -18464,7 +18464,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xc4e #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -150) :fog-height (meters 80) @@ -18549,7 +18549,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #xc4e #x9c4 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters 516) :fog-height (meters 80) @@ -18737,7 +18737,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x258 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) @@ -18855,7 +18855,7 @@ :borrow (new 'static 'level-borrow-info :alias #f :borrow-size (new 'static 'array uint16 5 #x384 #x0 #x0 #x0 #x0) - :borrow-info (new 'static 'array symbol 5 #f #f #f #f #f) + :borrow-info (new 'static 'array object 5 #f #f #f #f #f) ) :bottom-height (meters -20) :fog-height (meters 80) diff --git a/test/decompiler/reference/jak3/engine/level/level_REF.gc b/test/decompiler/reference/jak3/engine/level/level_REF.gc new file mode 100644 index 0000000000..5c45c10b3a --- /dev/null +++ b/test/decompiler/reference/jak3/engine/level/level_REF.gc @@ -0,0 +1,3836 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function level-memory-mode->string +(defun level-memory-mode->string ((arg0 level-memory-mode)) + "Convert level-memory-mode enum to string." + (case arg0 + (((level-memory-mode large)) + "large" + ) + (((level-memory-mode city-center)) + "city-center" + ) + (((level-memory-mode tiny)) + "tiny" + ) + (((level-memory-mode borrow1)) + "borrow1" + ) + (((level-memory-mode borrow)) + "borrow" + ) + (((level-memory-mode small-center)) + "small-center" + ) + (((level-memory-mode alias)) + "alias" + ) + (((level-memory-mode borrow2)) + "borrow2" + ) + (((level-memory-mode tiny-edge)) + "tiny-edge" + ) + (((level-memory-mode borrow-city-small)) + "borrow-city-small" + ) + (((level-memory-mode borrow3)) + "borrow3" + ) + (((level-memory-mode medium)) + "medium" + ) + (((level-memory-mode tiny-center-micro)) + "tiny-center-micro" + ) + (((level-memory-mode small-edge)) + "small-edge" + ) + (((level-memory-mode borrow4)) + "borrow4" + ) + (((level-memory-mode tiny-center)) + "tiny-center" + ) + (((level-memory-mode city-tiny-edge)) + "city-tiny-edge" + ) + (((level-memory-mode tiny-center-small)) + "tiny-center-small" + ) + (((level-memory-mode borrow0)) + "borrow0" + ) + (((level-memory-mode micro)) + "micro" + ) + (else + "*unknown*" + ) + ) + ) + +;; definition for function lookup-level-info +;; WARN: Return type mismatch object vs level-load-info. +(defun lookup-level-info ((arg0 symbol)) + "Get the level load info. Symbol can be the level name, visname, nickname, or a symbol that contains a level-load-info value." + (the-as + level-load-info + (cond + (arg0 + (let ((v1-0 (-> arg0 value))) + (if (and (nonzero? v1-0) + v1-0 + (= (logand (the-as int v1-0) 7) 4) + (= (-> (the-as basic v1-0) type) level-load-info) + ) + (return (the-as level-load-info v1-0)) + ) + ) + (let* ((v1-2 *level-load-list*) + (a1-5 (car v1-2)) + ) + (while (not (null? v1-2)) + (let ((a1-6 (the-as level-load-info (-> (the-as symbol a1-5) value)))) + (if (or (= arg0 (-> a1-6 name)) (= arg0 (-> a1-6 visname)) (= arg0 (-> a1-6 nickname))) + (return a1-6) + ) + ) + (set! v1-2 (cdr v1-2)) + (set! a1-5 (car v1-2)) + ) + ) + default-level + ) + (else + default-level + ) + ) + ) + ) + +;; definition for method 9 of type level-load-info +(defmethod get-callback-symbol-value-by-slot! ((this level-load-info) (arg0 int)) + "Look up value of symbol in callback-list with the given int as the car. Print warning if symbol's value is 0." + (let* ((v1-0 (the-as object (-> this callback-list))) + (a2-0 (-> (the-as pair v1-0) car)) + ) + (while (not (null? v1-0)) + (let ((a3-1 (/ (the-as int (-> (the-as pair a2-0) car)) 8)) + (t0-0 (-> (the-as pair a2-0) cdr)) + ) + (when (= a3-1 arg0) + (cond + ((nonzero? (-> (the-as symbol t0-0) value)) + (return (-> (the-as symbol t0-0) value)) + ) + (else + (format 0 "WARNING: level ~A has undefined callback slot ~D with value ~A~%" (-> this name) a3-1 t0-0) + (return #f) + ) + ) + (set! v1-0 0) + ) + ) + (set! v1-0 (-> (the-as pair v1-0) cdr)) + (set! a2-0 (-> (the-as pair v1-0) car)) + ) + ) + #f + ) + +;; definition for method 10 of type level-load-info +;; WARN: Return type mismatch pair vs object. +(defmethod get-callback-by-slot! ((this level-load-info) (arg0 int)) + "Look up value in callback-list with the given int as the car and return it. Doesn't derefence the symbol." + (let* ((v1-0 (-> this callback-list)) + (a0-1 (car v1-0)) + ) + (while (not (null? v1-0)) + (let ((a2-1 (/ (the-as int (car a0-1)) 8)) + (a0-2 (cdr a0-1)) + ) + (if (= a2-1 arg0) + (return (the-as object a0-2)) + ) + ) + (set! v1-0 (cdr v1-0)) + (set! a0-1 (car v1-0)) + ) + ) + (the-as pair #f) + ) + +;; definition for method 28 of type level-group +(defmethod load-in-progress? ((this level-group)) + "Is there a load happening now?" + (!= (-> *level* loading-level) (-> *level* level-default)) + ) + +;; definition for method 11 of type level-group +(defmethod get-level-by-heap-ptr-and-status ((this level-group) (arg0 pointer) (arg1 symbol)) + "Look up a loaded level, given pointer inside of level's heap, + and the status of the level (active or loading)." + (case arg1 + (('active) + (dotimes (v1-1 (-> this length)) + (let ((a2-6 (-> this level v1-1))) + (when (= (-> a2-6 status) 'active) + (if (and (>= (the-as int arg0) (the-as int (-> a2-6 heap base))) + (< (the-as int arg0) (the-as int (-> a2-6 heap top-base))) + ) + (return a2-6) + ) + ) + ) + ) + ) + (('loading) + (dotimes (v1-5 (-> this length)) + (let ((a2-12 (-> this level v1-5))) + (when (!= (-> a2-12 status) 'inactive) + (if (and (>= (the-as int arg0) (the-as int (-> a2-12 heap base))) + (< (the-as int arg0) (the-as int (-> a2-12 heap top-base))) + ) + (return a2-12) + ) + ) + ) + ) + ) + ) + (the-as level #f) + ) + +;; definition for method 29 of type level-group +;; WARN: Return type mismatch object vs symbol. +(defmethod is-load-allowed? ((this level-group) (arg0 (pointer symbol))) + "Does the exclusive-load setting allow us to load this level?" + (let ((v1-1 (the-as pair (-> *setting-control* user-current exclusive-load)))) + (if (or (not v1-1) (null? v1-1)) + (return (the-as symbol #t)) + ) + (let ((a0-4 (if arg0 + (-> arg0 0) + 'default + ) + ) + (v0-0 (the-as object #t)) + ) + (let ((a1-1 (car v1-1))) + (while (not (null? v1-1)) + (case (car a1-1) + (('allow) + (if (= (car (cdr a1-1)) a0-4) + (return (the-as symbol #t)) + ) + (if (= (car (cdr a1-1)) 'all) + (set! v0-0 #t) + ) + ) + (('ignore) + (if (= (car (cdr a1-1)) a0-4) + (return (the-as symbol #f)) + ) + (if (= (car (cdr a1-1)) 'all) + (set! v0-0 #f) + ) + ) + ) + (set! v1-1 (cdr v1-1)) + (set! a1-1 (car v1-1)) + ) + ) + (the-as symbol v0-0) + ) + ) + ) + +;; definition for function remap-level-name +(defun remap-level-name ((arg0 level-load-info)) + "Get the load name, depending on if we should load a vis level or not." + (if (-> *level* vis?) + (-> arg0 visname) + (-> arg0 name) + ) + ) + +;; definition for method 21 of type level +(defmethod get-art-group-by-name ((this level) (arg0 string)) + "Look up art-group in this level by name." + (countdown (s4-0 (-> this art-group art-group-array length)) + (if (name= (-> this art-group art-group-array s4-0 name) arg0) + (return (-> this art-group art-group-array s4-0)) + ) + ) + (the-as art-group #f) + ) + +;; definition for method 13 of type level +(defmethod bsp-name ((this level)) + "Try getting the name from the BSP. If that fails, return the level's name (typically the same)." + (if (and (!= (-> this status) 'inactive) (-> this bsp) (nonzero? (-> this bsp name))) + (-> this bsp name) + (-> this name) + ) + ) + +;; definition for function add-bsp-drawable +(defun add-bsp-drawable ((arg0 bsp-header) (arg1 level) (arg2 symbol) (arg3 display-frame)) + "Callback function used by background-engine to draw a bsp. + Note that most drawing work has been moved into finish-background, + and the draw method called here just adds references to high-level rendering data + to lists. The exception is debug-draw, which does run here (only for draw-strip-lines)." + (draw arg0) + (if (nonzero? *display-strip-lines*) + (debug-draw arg0) + ) + (none) + ) + +;; definition for method 2 of type level +(defmethod print ((this level)) + (format #t "#<~A ~A ~S @ #x~X>" (-> this type) (-> this status) (-> this name) this) + this + ) + +;; definition for method 7 of type bsp-header +(defmethod relocate ((this bsp-header) (offset int)) + (let ((gp-0 (-> *level* loading-level))) + (when gp-0 + (cond + (this + (cond + ((not (type? this bsp-header)) + (format 0 "ERROR: level ~A is not a bsp-header.~%" (-> gp-0 name)) + (the-as bsp-header #f) + ) + ((not (file-info-correct-version? (-> this info) (file-kind level-bt) 0)) + (the-as bsp-header #f) + ) + ((< 2048 (-> this visible-list-length)) + (format + 0 + "ERROR: level ~A visible-list-length ~d is greater than 2048 (16384 drawables).~%" + (-> gp-0 name) + (-> this visible-list-length) + ) + (the-as bsp-header #f) + ) + (else + (set! (-> gp-0 bsp) this) + (set! (-> this level) gp-0) + this + ) + ) + ) + (else + (format 0 "ERROR: level ~A is not a valid file.~%" (-> gp-0 name)) + (the-as bsp-header #f) + ) + ) + ) + ) + ) + +;; definition for method 27 of type level +;; WARN: Return type mismatch level vs none. +(defmethod load-common-package ((this level)) + "Somewhat useless leftover from a more compliated package system. Will load common in some cases." + (when (not (or (not (-> this bsp)) (= *kernel-boot-mode* 'debug-boot))) + (if (not (null? (-> this info packages))) + (load-package "common" global) + ) + ) + (none) + ) + +;; definition for method 29 of type level +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vis-clear ((this level)) + "Clear visibility data: both the info and the cached vis bits. Switch all-visible? to loading." + (countdown (v1-0 8) + (nop!) + (set! (-> this vis-info v1-0) #f) + ) + (dotimes (v1-3 128) + (set! (-> (the-as (pointer int128) (&+ (-> this vis-bits) (* v1-3 16)))) 0) + ) + (set! (-> this all-visible?) 'loading) + 0 + (none) + ) + +;; definition for method 28 of type level +;; WARN: Return type mismatch int vs none. +(defmethod init-vis-from-bsp ((this level)) + "Link vis-infos from the bsp to the level." + (when (not (or (= (-> this status) 'inactive) (not (-> this bsp)))) + (set! (-> this all-visible?) 'loading) + (dotimes (s5-0 8) + (let ((s4-0 (-> this bsp vis-info s5-0))) + (cond + ((and s4-0 (nonzero? s4-0) (valid? s4-0 level-vis-info (the-as string #f) #f 0)) + (set! (-> this vis-info s5-0) s4-0) + (set! (-> s4-0 current-vis-string) (the-as uint -1)) + (if (= (-> s4-0 from-level) (-> this load-name)) + (set! (-> s4-0 from-bsp) (-> this bsp)) + (set! (-> s4-0 from-bsp) #f) + ) + (set! (-> s4-0 vis-bits) (the-as uint (-> this vis-bits))) + (set! (-> s4-0 flags) + (the-as vis-info-flag (logclear (-> s4-0 flags) (vis-info-flag in-iop loading vis-valid))) + ) + (set! *vis-boot* #t) + ) + (else + (set! (-> this vis-info s5-0) #f) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 12 of type level-group +(defmethod level-get-for-use ((this level-group) (arg0 symbol) (arg1 symbol)) + "Request a level by name in the given state. + Will return quickly (non-blocking) and might not be able to get a level in the desired state, + though it will do some small amount of work to make progress on loading. + + This is the most general/powerful function like this: if there is no level with this name + it will kick out levels as needed to make a free slot, and set up a new level, and start + the load. This should only be used when you might want to start a load." + (local-vars (s5-1 level)) + (init-level-system this #f) + (let* ((s2-0 (lookup-level-info arg0)) + (s1-0 (remap-level-name s2-0)) + ) + (let ((s5-0 (level-get this s1-0))) + (when s5-0 + (level-status-update! s5-0 arg1) + (set! s5-1 s5-0) + (goto cfg-28) + ) + ) + (let ((a0-7 (level-get-most-disposable this))) + (set! s5-1 (if a0-7 + (level-status-update! a0-7 'inactive) + a0-7 + ) + ) + ) + (when (not level) + (format 0 "ERROR: could not find a slot to load ~A into.~%" arg0) + (set! s5-1 (the-as level #f)) + (goto cfg-28) + ) + (let ((s0-0 (-> s2-0 master-level))) + (when s0-0 + (let ((a0-10 (lookup-level-info s0-0))) + (when (not (logtest? (level-flags lf17) (-> a0-10 level-flags))) + (dotimes (v1-16 (-> this length)) + (let ((a0-15 (-> this level v1-16))) + (when (or (= (-> a0-15 status) 'active) (= (-> a0-15 status) 'alive) (= (-> a0-15 status) 'loaded)) + (if (= (-> a0-15 name) s0-0) + (goto cfg-24) + ) + ) + ) + ) + (format 0 "ERROR: level ~A is loading before master-level ~A~%" arg0 s0-0) + (break!) + 0 + ) + ) + ) + ) + (label cfg-24) + (let ((v1-22 (+ (-> this load-order) 1))) + (set! (-> this load-order) v1-22) + (set! (-> s5-1 load-order) v1-22) + ) + (set! (-> s5-1 info) s2-0) + (set! (-> s5-1 name) arg0) + (set! (-> s5-1 load-name) s1-0) + ) + (dotimes (v1-23 11) + (set! (-> s5-1 texture-anim-array v1-23) #f) + ) + (set! (-> s5-1 display?) #f) + (set! (-> s5-1 force-all-visible?) #f) + (set! (-> s5-1 force-inside?) #f) + (level-status-update! s5-1 'loading) + (level-status-update! s5-1 arg1) + (label cfg-28) + s5-1 + ) + +;; definition for method 27 of type level-group +;; WARN: Return type mismatch int vs none. +(defmethod do-nothing ((this level-group)) + "Empty method." + 0 + (none) + ) + +;; definition for method 26 of type level-group +(defmethod status-of-level-and-borrows ((this level-group) (arg0 symbol) (arg1 symbol)) + "Get the combined status of a level and borrow levels." + (if (not arg0) + (return #f) + ) + (let ((s4-0 (level-get *level* arg0)) + (v1-3 (lookup-level-info arg0)) + ) + (cond + (s4-0 + (when (and (or (= (-> s4-0 status) 'loaded) (= (-> s4-0 status) 'active)) + (and (-> s4-0 info borrow) (!= arg1 'ignore-borrow)) + ) + (dotimes (s3-1 5) + (let ((v1-14 (-> s4-0 info borrow borrow-info s3-1))) + (when v1-14 + (when (car (cdr v1-14)) + (let ((v1-15 (status-of-level-and-borrows this (the-as symbol (car v1-14)) arg1))) + (if (!= v1-15 (-> s4-0 status)) + (return v1-15) + ) + ) + ) + ) + ) + ) + ) + (-> s4-0 status) + ) + ((and v1-3 (-> v1-3 borrow) (-> v1-3 borrow alias)) + (b! + (not (or (= arg0 'ctywide-ff) + (= arg0 'ctywide-kg) + (= arg0 'ctywide-mh) + (= arg0 'ctywide-ff-kg) + (= arg0 'ctywide-ff-mh) + (= arg0 'ctywide-mh-kg) + ) + ) + cfg-42 + :delay (nop!) + ) + (let ((s5-1 (the-as object *borrow-city-status-list*))) + (b! #t cfg-43 :delay (nop!)) + (label cfg-42) + (set! s5-1 (-> v1-3 borrow alias)) + (label cfg-43) + (let* ((a0-26 s5-1) + (s4-1 ((method-of-type (rtype-of a0-26) length) a0-26)) + ) + (while (and (> s4-1 0) (car s5-1)) + (when (and (!= (car s5-1) 'dummy) + (or (= arg1 'all) (let ((a0-31 (lookup-level-info (the-as symbol (car s5-1))))) + (and a0-31 (not (logtest? (-> a0-31 level-flags) (level-flags lf15)))) + ) + ) + ) + (let ((v1-29 (status-of-level-and-borrows *level* (the-as symbol (car s5-1)) arg1))) + (if (!= v1-29 'active) + (return v1-29) + ) + ) + ) + (set! s5-1 (cdr (cdr s5-1))) + (+! s4-1 -2) + ) + ) + ) + 'active + ) + ) + ) + ) + +;; definition for method 26 of type level +;; INFO: Used lq/sq +(defmethod level-status-update! ((this level) (arg0 symbol)) + "Try to update the level to the given status, calling whatever is needed to make it happen. + This can do both loading, linking, login, and activation. + This is somewhat similar to level-get-for-use, but requires that you already have the level object. + This function is the way to transition from loaded to alive/active." + (case arg0 + (('inactive) + (-> this status) + (unload! this) + ) + (('loading) + (case (-> this status) + (('inactive) + (load-begin this) + ) + ) + ) + (('loading-bt) + (case (-> this status) + (('loading) + (set! (-> this status) arg0) + (do-nothing *level*) + (load-continue this) + ) + ) + ) + (('loading-done) + (case (-> this status) + (('loading-bt) + (set! (-> this status) arg0) + (do-nothing *level*) + ) + ) + ) + (('loaded) + (case (-> this status) + (('loading-done) + (login-begin this) + ) + (('alive 'active) + (deactivate this) + ) + ) + ) + (('alive 'active) + (when *dproc* + (case (-> this status) + (('loaded) + (birth this) + (level-status-update! this arg0) + ) + (('alive) + (when (and *dproc* (= arg0 'active)) + (when (zero? (-> this display-start-time)) + (set! (-> this display-start-time) (the-as uint (-> *display* real-clock frame-counter))) + 0 + ) + (remove-by-param1 *background-draw-engine* (the-as int (-> this bsp))) + (add-connection *background-draw-engine* *dproc* add-bsp-drawable (-> this bsp) this #f) + (dotimes (v1-49 20) + (set! (-> this closest-object v1-49) 0.0) + (set! (-> this texture-mask v1-49 mask quad) (the-as uint128 0)) + ) + (set! (-> this status) 'active) + (do-nothing *level*) + (assign-draw-indices *level*) + ) + ) + ) + ) + ) + ) + this + ) + +;; definition for symbol *login-state*, type login-state +(define *login-state* (new 'global 'login-state)) + +;; definition for symbol *print-login*, type symbol +(define *print-login* #t) + +;; definition for function load-buffer-resize +;; WARN: Return type mismatch int vs none. +(defun load-buffer-resize ((arg0 level) (arg1 dgo-header)) + "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))))) + ) + (((level-memory-mode tiny-edge)) + (set! (-> arg0 load-buffer-size) (+ (-> arg1 length) 2048)) + ) + ) + (let ((v1-4 (logand -64 (+ (-> arg0 load-buffer-size) 63)))) + (if (= arg1 (-> arg0 load-buffer 0)) + (set! (-> arg0 load-buffer 0) (- (-> arg0 load-buffer 1) v1-4)) + (set! (-> arg0 load-buffer 1) + (the-as uint (&- (logand -64 (&+ (-> arg0 heap top-base) 0)) (the-as uint v1-4))) + ) + ) + ) + (set! (-> arg0 heap top) (the-as pointer (-> arg0 load-buffer 0))) + 0 + (none) + ) + +;; definition for method 17 of type level +(defmethod load-continue ((this level)) + "Main function to run level loading/linking. + Called by the engine to make progress on loading levels." + (local-vars (sv-16 symbol)) + (when (-> this linking) + (when (nonzero? (link-resume)) + (set! (-> this linking) #f) + (case (-> this status) + (('loading) + (when (not (-> *texture-relocate-later* memcpy)) + (cond + ((= (-> this load-buffer-mode) (level-memory-mode borrow)) + (let ((a2-0 (logand -64 (&+ (-> this heap current) 63)))) + (dgo-load-continue a2-0 a2-0 a2-0) + ) + ) + (else + (load-buffer-resize this (-> this load-buffer-last)) + (dgo-load-continue + (the-as pointer (-> this load-buffer 0)) + (the-as pointer (-> this load-buffer 1)) + (logand -64 (&+ (-> this heap current) 63)) + ) + ) + ) + ) + ) + (('loading-bt) + (level-status-update! this 'loading-done) + (level-status-update! this 'loaded) + ) + ) + ) + (set! this this) + (goto cfg-39) + ) + (when (-> *texture-relocate-later* memcpy) + (relocate-later) + (load-buffer-resize this (-> this load-buffer-last)) + (dgo-load-continue + (the-as pointer (-> this load-buffer 0)) + (the-as pointer (-> this load-buffer 1)) + (logand -64 (&+ (-> this heap current) 63)) + ) + (set! this this) + (goto cfg-39) + ) + (case (-> this status) + (('loading) + (set! sv-16 (the-as symbol #f)) + (let ((s5-0 (dgo-load-get-next (& sv-16)))) + (when s5-0 + (set! (-> this load-buffer-last) (the-as dgo-header s5-0)) + (+! (-> *level* load-size) (-> (the-as (pointer uint32) s5-0))) + (set! (-> *level* load-time) + (* 0.016666668 (the float (- (-> *display* real-clock integral-frame-counter) *dgo-time*))) + ) + (set! (-> *level* load-login-time) + (* 0.016666668 (the float (- (-> *display* real-clock integral-frame-counter) *dgo-time*))) + ) + (cond + ((not sv-16) + (cond + ((= (-> this load-buffer-mode) (level-memory-mode borrow)) + (cond + ((dgo-load-link (the-as dgo-header s5-0) (-> this heap) (the-as uint (-> this heap top-base)) *print-login* #f) + (when (not (-> *texture-relocate-later* memcpy)) + (let ((a2-8 (logand -64 (&+ (-> this heap current) 63)))) + (dgo-load-continue a2-8 a2-8 a2-8) + ) + ) + ) + (else + (set! (-> this linking) #t) + ) + ) + ) + ((dgo-load-link (the-as dgo-header s5-0) (-> this heap) (-> this load-buffer 1) *print-login* #f) + (when (not (-> *texture-relocate-later* memcpy)) + (load-buffer-resize this (the-as dgo-header s5-0)) + (dgo-load-continue + (the-as pointer (-> this load-buffer 0)) + (the-as pointer (-> this load-buffer 1)) + (logand -64 (&+ (-> this heap current) 63)) + ) + ) + ) + (else + (set! (-> this linking) #t) + ) + ) + ) + (else + (set! (-> this heap top) (-> this heap top-base)) + (level-status-update! this 'loading-bt) + ) + ) + ) + ) + ) + (('login) + (level-update-after-load this *login-state*) + ) + (('loading-bt) + (let ((a0-36 (logand -64 (&+ (-> this heap current) 63)))) + (cond + ((dgo-load-link + (the-as dgo-header a0-36) + (-> this heap) + (the-as uint (-> this heap top-base)) + *print-login* + #t + ) + (level-status-update! this 'loading-done) + (level-status-update! this 'loaded) + ) + (else + (set! (-> this linking) #t) + ) + ) + ) + ) + ) + (label cfg-39) + this + ) + +;; definition for function level-find-borrow-slot +;; WARN: Return type mismatch int vs none. +(defun level-find-borrow-slot ((borrower-level level) (mode level-memory-mode)) + "Set up a level to 'borrow' from another. + This function finds the right 'host' level, which should + have prepared a heap for this level. This level will then + be configured to use this heap." + (local-vars (a2-1 level) (found-slot symbol)) + (let ((host-level-borrow-slot -1)) + (dotimes (host-level-candidate-idx 10) + (let ((host-level-candidate (-> *level* level host-level-candidate-idx))) + (when (and (or (= (-> host-level-candidate status) 'active) (= (-> host-level-candidate status) 'loaded)) + (and (-> host-level-candidate info borrow) + (begin + (let ((mode2 mode)) + (set! found-slot + (cond + ((= mode2 (level-memory-mode borrow)) + (dotimes (host-level-slot-idx 5) + (when (and (-> host-level-candidate info borrow borrow-info host-level-slot-idx) + (= (car (-> host-level-candidate info borrow borrow-info host-level-slot-idx)) (-> borrower-level name)) + (nonzero? (-> host-level-candidate info borrow borrow-size host-level-slot-idx)) + ) + (set! host-level-borrow-slot host-level-slot-idx) + (set! found-slot #t) + (goto cfg-70) + ) + ) + #f + ) + ((= mode2 (level-memory-mode borrow-city-small)) + (when (= (-> borrower-level info master-level) (-> host-level-candidate name)) + (dotimes (t0-13 3) + (when (not (-> host-level-candidate borrow-level t0-13)) + (set! host-level-borrow-slot t0-13) + (set! found-slot #t) + (goto cfg-70) + ) + ) + #f + ) + ) + ((= mode2 (level-memory-mode borrow0)) + (when (and (= (-> borrower-level info master-level) (-> host-level-candidate name)) + (nonzero? (-> host-level-candidate info borrow borrow-size 0)) + ) + (set! host-level-borrow-slot 0) + (set! found-slot #t) + (goto cfg-70) + found-slot + ) + ) + ((= mode2 (level-memory-mode borrow1)) + (when (and (= (-> borrower-level info master-level) (-> host-level-candidate name)) + (nonzero? (-> host-level-candidate info borrow borrow-size 1)) + ) + (set! host-level-borrow-slot 1) + (set! found-slot #t) + (goto cfg-70) + found-slot + ) + ) + ((= mode2 (level-memory-mode borrow2)) + (when (and (= (-> borrower-level info master-level) (-> host-level-candidate name)) + (nonzero? (-> host-level-candidate info borrow borrow-size 2)) + ) + (set! host-level-borrow-slot 2) + (set! found-slot #t) + (goto cfg-70) + found-slot + ) + ) + ((= mode2 (level-memory-mode borrow3)) + (when (and (= (-> borrower-level info master-level) (-> host-level-candidate name)) + (nonzero? (-> host-level-candidate info borrow borrow-size 3)) + ) + (set! host-level-borrow-slot 3) + (set! found-slot #t) + (goto cfg-70) + found-slot + ) + ) + ((= mode2 (level-memory-mode borrow4)) + (when (and (= (-> borrower-level info master-level) (-> host-level-candidate name)) + (nonzero? (-> host-level-candidate info borrow borrow-size 4)) + ) + (set! host-level-borrow-slot 4) + (set! found-slot #t) + (goto cfg-70) + found-slot + ) + ) + ) + ) + ) + (label cfg-70) + (and found-slot + (>= host-level-borrow-slot 0) + (not (-> host-level-candidate borrow-level host-level-borrow-slot)) + ) + ) + ) + ) + (set! a2-1 host-level-candidate) + (goto cfg-82) + ) + ) + ) + (set! a2-1 (the-as level #f)) + (label cfg-82) + (cond + (a2-1 + (set! (-> borrower-level borrow-from-level) a2-1) + (set! (-> a2-1 borrow-level host-level-borrow-slot) borrower-level) + (mem-copy! + (the-as pointer (-> borrower-level heap)) + (the-as pointer (-> a2-1 borrow-heap host-level-borrow-slot)) + 16 + ) + ) + (else + (format + 0 + "ERROR: level ~A could not find free ~S bank in the level-group heap~%" + (-> borrower-level name) + (level-memory-mode->string mode) + ) + (break!) + 0 + ) + ) + ) + 0 + (none) + ) + +;; definition for method 18 of type level +(defmethod load-begin ((this level)) + "Start loading data of a level." + (local-vars + (sv-16 level) + (memory-unused? (function level-group int symbol)) + (sv-24 int) + (mask int) + (sv-40 int) + (sv-48 int) + (sv-56 int) + ) + (dotimes (v1-0 5) + (set! (-> this borrow-level v1-0) #f) + ) + (set! (-> this borrow-from-level) #f) + (set! (-> this memory-mask) (the-as uint 0)) + (let ((mem-mode (-> this info memory-mode))) + (dotimes (v1-4 10) + (set! sv-16 (-> *level* level v1-4)) + (when (and (or (= (-> sv-16 status) 'active) (= (-> sv-16 status) 'loaded)) (-> sv-16 info borrow)) + (dotimes (a0-16 5) + (when (and (-> sv-16 info borrow borrow-info a0-16) + (= (car (-> sv-16 info borrow borrow-info a0-16)) (-> this name)) + (nonzero? (-> sv-16 info borrow borrow-size a0-16)) + ) + (when (!= mem-mode (level-memory-mode borrow)) + (format 0 "WARNING: level ~A upgraded to borrow~%" (-> this name)) + (set! mem-mode (level-memory-mode borrow)) + ) + (goto cfg-28) + ) + ) + ) + ) + (label cfg-28) + (case mem-mode + (((level-memory-mode borrow) + (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) + ) + (level-find-borrow-slot this mem-mode) + ) + (else + (set! memory-unused? (lambda ((arg0 level-group) (arg1 int)) + (dotimes (v1-0 11) + (if (logtest? (-> arg0 level v1-0 memory-mask) arg1) + (return #f) + ) + ) + #t + ) + ) + (set! sv-24 0) + (set! mask 0) + (set! sv-40 0) + (dotimes (v1-15 10) + (let ((lev (-> *level* level v1-15))) + (when (and (or (= (-> lev status) 'active) (= (-> lev status) 'loaded)) + (or (= (-> lev info memory-mode) (level-memory-mode micro)) + (= (-> lev info memory-mode) (level-memory-mode city-tiny-edge)) + ) + ) + (case (-> lev info memory-mode) + (((level-memory-mode city-tiny-edge)) + (set! 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)) + #x3c000 + 60 + ) + ) + ) + ) + (((level-memory-mode micro)) + (set! 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! sv-56 0) + (case mem-mode + (((level-memory-mode large)) + (case mask + ((3) + (let ((s4-0 #x3ffc0)) + (when (memory-unused? *level* s4-0) + (set! sv-24 48) + (set! sv-56 s4-0) + (goto cfg-322) + ) + ) + (let ((s4-1 #x3ffc)) + (when (memory-unused? *level* s4-1) + (set! sv-24 16) + (set! sv-56 s4-1) + (goto cfg-322) + ) + ) + ) + ((#x30000) + (let ((s4-2 4095)) + (when (memory-unused? *level* s4-2) + (set! sv-24 0) + (set! sv-56 s4-2) + (goto cfg-322) + ) + ) + (let ((s4-3 #xfff0)) + (when (memory-unused? *level* s4-3) + (set! sv-24 32) + (set! sv-56 s4-3) + (goto cfg-322) + ) + ) + ) + (else + (let ((s4-4 4095)) + (when (memory-unused? *level* s4-4) + (set! sv-24 0) + (set! sv-56 s4-4) + (goto cfg-322) + ) + ) + (let ((s4-5 #x3ffc0)) + (when (memory-unused? *level* s4-5) + (set! sv-24 48) + (set! sv-56 s4-5) + (goto cfg-322) + ) + ) + ) + ) + ) + (((level-memory-mode medium)) + (let ((s4-6 511)) + (when (memory-unused? *level* s4-6) + (set! sv-24 0) + (set! sv-56 s4-6) + (goto cfg-322) + ) + ) + (let ((s4-7 #x3fe00)) + (when (memory-unused? *level* s4-7) + (set! sv-24 73) + (set! sv-56 s4-7) + (goto cfg-322) + ) + ) + ) + (((level-memory-mode small-center)) + (case mask + ((3) + (case sv-40 + ((#x3c000) + (let ((s4-8 #x3f00)) + (when (memory-unused? *level* s4-8) + (set! sv-24 64) + (set! sv-56 s4-8) + (goto cfg-322) + ) + ) + ) + (else + (let ((s4-9 4032)) + (when (memory-unused? *level* s4-9) + (set! sv-24 48) + (set! sv-56 s4-9) + (goto cfg-322) + ) + ) + ) + ) + ) + ((#x30000) + (case sv-40 + ((#x3c000) + (let ((s4-10 1008)) + (when (memory-unused? *level* s4-10) + (set! sv-24 32) + (set! sv-56 s4-10) + (goto cfg-322) + ) + ) + ) + (else + (let ((s4-11 4032)) + (when (memory-unused? *level* s4-11) + (set! sv-24 48) + (set! sv-56 s4-11) + (goto cfg-322) + ) + ) + ) + ) + ) + (else + (let ((s4-12 4032)) + (when (memory-unused? *level* s4-12) + (set! sv-24 48) + (set! sv-56 s4-12) + (goto cfg-322) + ) + ) + ) + ) + ) + (((level-memory-mode city-center)) + (let ((s4-13 4032)) + (when (memory-unused? *level* s4-13) + (set! sv-24 48) + (set! sv-56 s4-13) + (goto cfg-322) + ) + ) + ) + (((level-memory-mode small-edge)) + (case mask + ((3) + (case sv-40 + ((#x3c000) + (let ((s4-14 252)) + (when (memory-unused? *level* s4-14) + (set! sv-24 16) + (set! sv-56 s4-14) + (goto cfg-322) + ) + ) + (let ((s4-15 #x3f00)) + (when (memory-unused? *level* s4-15) + (set! sv-24 64) + (set! sv-56 s4-15) + (goto cfg-322) + ) + ) + ) + (else + (let ((s4-16 #x3f000)) + (when (memory-unused? *level* s4-16) + (set! sv-24 98) + (set! sv-56 s4-16) + (goto cfg-322) + ) + ) + (let ((s4-17 4032)) + (when (memory-unused? *level* s4-17) + (set! sv-24 48) + (set! sv-56 s4-17) + (goto cfg-322) + ) + ) + ) + ) + ) + ((#x30000) + (case sv-40 + ((#x3c000) + (let ((s4-18 #xfc00)) + (when (memory-unused? *level* s4-18) + (set! sv-24 82) + (set! sv-56 s4-18) + (goto cfg-322) + ) + ) + (let ((s4-19 1008)) + (when (memory-unused? *level* s4-19) + (set! sv-24 32) + (set! sv-56 s4-19) + (goto cfg-322) + ) + ) + ) + (else + (let ((s4-20 63)) + (when (memory-unused? *level* s4-20) + (set! sv-24 0) + (set! sv-56 s4-20) + (goto cfg-322) + ) + ) + (let ((s4-21 4032)) + (when (memory-unused? *level* s4-21) + (set! sv-24 48) + (set! sv-56 s4-21) + (goto cfg-322) + ) + ) + ) + ) + ) + (else + (let ((s4-22 63)) + (when (memory-unused? *level* s4-22) + (set! sv-24 0) + (set! sv-56 s4-22) + (goto cfg-322) + ) + ) + (let ((s4-23 #x3f000)) + (when (memory-unused? *level* s4-23) + (set! sv-24 98) + (set! sv-56 s4-23) + (goto cfg-322) + ) + ) + ) + ) + ) + (((level-memory-mode micro)) + (let ((s4-24 3)) + (when (memory-unused? *level* s4-24) + (set! sv-24 0) + (set! sv-56 s4-24) + (goto cfg-322) + ) + ) + (let ((s4-25 #x30000)) + (when (memory-unused? *level* s4-25) + (set! sv-24 130) + (set! sv-56 s4-25) + (goto cfg-322) + ) + ) + ) + (((level-memory-mode tiny-edge) (level-memory-mode city-tiny-edge)) + (let ((v1-126 mask)) + (cond + ((or (zero? v1-126) (= v1-126 3)) + (let ((s4-26 60)) + (when (memory-unused? *level* s4-26) + (set! sv-24 16) + (set! sv-56 s4-26) + (goto cfg-322) + ) + ) + (let ((s4-27 #x3c000)) + (when (memory-unused? *level* s4-27) + (set! sv-24 114) + (set! sv-56 s4-27) + (goto cfg-322) + ) + ) + ) + ((= v1-126 #x30000) + (let ((s4-28 #xf000)) + (when (memory-unused? *level* s4-28) + (set! sv-24 98) + (set! sv-56 s4-28) + (goto cfg-322) + ) + ) + (let ((s4-29 15)) + (when (memory-unused? *level* s4-29) + (set! sv-24 0) + (set! sv-56 s4-29) + (goto cfg-322) + ) + ) + ) + ) + ) + ) + (((level-memory-mode tiny)) + (let ((v1-143 mask)) + (cond + ((or (zero? v1-143) (= v1-143 3)) + (let ((s4-30 60)) + (when (memory-unused? *level* s4-30) + (set! sv-24 16) + (set! sv-56 s4-30) + (goto cfg-322) + ) + ) + (let ((s4-31 #x3c000)) + (when (memory-unused? *level* s4-31) + (set! sv-24 114) + (set! sv-56 s4-31) + (goto cfg-322) + ) + ) + (let ((s4-32 #x3c00)) + (when (memory-unused? *level* s4-32) + (set! sv-24 82) + (set! sv-56 s4-32) + (goto cfg-322) + ) + ) + (let ((s4-33 960)) + (when (memory-unused? *level* s4-33) + (set! sv-24 48) + (set! sv-56 s4-33) + (goto cfg-322) + ) + ) + ) + ((= v1-143 #x30000) + (let ((s4-34 #xf000)) + (when (memory-unused? *level* s4-34) + (set! sv-24 98) + (set! sv-56 s4-34) + (goto cfg-322) + ) + ) + (let ((s4-35 15)) + (when (memory-unused? *level* s4-35) + (set! sv-24 0) + (set! sv-56 s4-35) + (goto cfg-322) + ) + ) + (let ((s4-36 240)) + (when (memory-unused? *level* s4-36) + (set! sv-24 32) + (set! sv-56 s4-36) + (goto cfg-322) + ) + ) + (let ((s4-37 3840)) + (when (memory-unused? *level* s4-37) + (set! sv-24 64) + (set! sv-56 s4-37) + (goto cfg-322) + ) + ) + ) + ) + ) + ) + (((level-memory-mode tiny-center)) + (let ((v1-176 mask)) + (cond + ((or (zero? v1-176) (= v1-176 3)) + (let ((s4-38 #x3c00)) + (when (memory-unused? *level* s4-38) + (set! sv-24 82) + (set! sv-56 s4-38) + (goto cfg-322) + ) + ) + (let ((s4-39 960)) + (when (memory-unused? *level* s4-39) + (set! sv-24 48) + (set! sv-56 s4-39) + (goto cfg-322) + ) + ) + ) + ((= v1-176 #x30000) + (let ((s4-40 240)) + (when (memory-unused? *level* s4-40) + (set! sv-24 32) + (set! sv-56 s4-40) + (goto cfg-322) + ) + ) + (let ((s4-41 3840)) + (when (memory-unused? *level* s4-41) + (set! sv-24 64) + (set! sv-56 s4-41) + (goto cfg-322) + ) + ) + ) + ) + ) + ) + (((level-memory-mode tiny-center-small)) + (let ((v1-194 mask)) + (cond + ((or (zero? v1-194) (= v1-194 3)) + (let ((s4-42 #x3e00)) + (when (memory-unused? *level* s4-42) + (set! sv-24 72) + (set! sv-56 s4-42) + (goto cfg-322) + ) + ) + (let ((s4-43 1984)) + (when (memory-unused? *level* s4-43) + (set! sv-24 48) + (set! sv-56 s4-43) + (goto cfg-322) + ) + ) + ) + ((= v1-194 #x30000) + (let ((s4-44 496)) + (when (memory-unused? *level* s4-44) + (set! sv-24 32) + (set! sv-56 s4-44) + (goto cfg-322) + ) + ) + (let ((s4-45 3968)) + (when (memory-unused? *level* s4-45) + (set! sv-24 56) + (set! sv-56 s4-45) + (goto cfg-322) + ) + ) + ) + ) + ) + ) + (((level-memory-mode tiny-center-micro)) + (let ((v1-213 mask)) + (cond + ((or (zero? v1-213) (= v1-213 3)) + (let ((s4-46 448)) + (when (memory-unused? *level* s4-46) + (set! sv-24 48) + (set! sv-56 s4-46) + (goto cfg-322) + ) + ) + (let ((s4-47 #x3800)) + (when (memory-unused? *level* s4-47) + (set! sv-24 90) + (set! sv-56 s4-47) + (goto cfg-322) + ) + ) + ) + ((= v1-213 #x30000) + (let ((s4-48 3584)) + (when (memory-unused? *level* s4-48) + (set! sv-24 72) + (set! sv-56 s4-48) + (goto cfg-322) + ) + ) + (let ((s4-49 112)) + (when (memory-unused? *level* s4-49) + (set! sv-24 32) + (set! sv-56 s4-49) + (goto cfg-322) + ) + ) + ) + ) + ) + ) + ) + (label cfg-322) + (cond + ((zero? sv-56) + (format + 0 + "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 + ) + (dotimes (s5-1 11) + (let ((s4-51 (-> *level* level s5-1))) + (when (!= (-> s4-51 status) 'inactive) + (format 0 "~Tlevel ~2D ~16S " s5-1 (-> s4-51 name)) + (format + 0 + "~16S bits #b~18,'0B~%" + (if (nonzero? (-> s4-51 info)) + (level-memory-mode->string (-> s4-51 info memory-mode)) + ) + (-> s4-51 memory-mask) + ) + ) + ) + ) + #t + (break!) + 0 + ) + (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)) + ) + ) + (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)) + ) + ) + ) + ) + ) + ) + ) + ) + (set! loading-level (-> this heap)) + (set! (-> *level* loading-level) this) + (set! (-> this level-type) #f) + (set! *level-type-list* (the-as type (&-> this level-type))) + (set! (-> *level* log-in-level-bsp) #f) + (set! (-> this nickname) #f) + (set! (-> this bsp) #f) + (set! (-> this entity) #f) + (set! (-> this linking) #f) + (set! (-> this task-mask) (-> *setting-control* user-current task-mask)) + (vis-clear this) + (set! (-> this load-start-time) (the-as uint (-> *display* real-clock frame-counter))) + (set! (-> this load-stop-time) (the-as uint 0)) + (set! (-> this display-start-time) (the-as uint 0)) + (set! (-> this part-engine) #f) + (dotimes (v1-258 4) + (set! (-> this user-object v1-258) #f) + ) + (set! (-> this load-id) (the-as uint (new-sound-id))) + (set! (-> this status) 'loading) + (do-nothing *level*) + (set! (-> *texture-pool* allocate-func) texture-page-level-allocate) + (if (= (-> this load-name) (-> this info visname)) + (format (clear *temp-string*) "~S" (-> this info nickname)) + (format (clear *temp-string*) "~S" (-> this name)) + ) + (set! (-> *temp-string* data 8) (the-as uint 0)) + (format *temp-string* ".DGO") + (set! (-> this heap top) (-> this heap top-base)) + (set! (-> *level* load-level) (-> this load-name)) + (set! (-> *level* load-size) (the-as uint 0)) + (set! (-> *level* load-time) 0.0) + (set! (-> *level* load-login-time) 0.0) + (set! (-> this code-memory-start) (-> this heap current)) + (let ((v1-278 (-> this info memory-mode))) + (cond + ((or (or (= v1-278 (level-memory-mode borrow)) (or (= v1-278 (level-memory-mode borrow0)) + (= v1-278 (level-memory-mode borrow1)) + (= v1-278 (level-memory-mode borrow2)) + (= v1-278 (level-memory-mode borrow3)) + (= v1-278 (level-memory-mode borrow4)) + (= v1-278 (level-memory-mode micro)) + (= v1-278 (level-memory-mode borrow-city-small)) + ) + ) + (-> this borrow-from-level) + (logtest? (-> this info level-flags) (level-flags lf6)) + ) + (set! (-> this load-buffer-mode) (level-memory-mode borrow)) + (let ((t0-2 (logand -64 (&+ (-> this heap current) 63)))) + (dgo-load-begin *temp-string* (the-as uint128 (-> this load-id)) t0-2 t0-2 t0-2) + ) + ) + (else + (let* ((v1-287 (-> this info memory-mode)) + (s4-52 + (cond + ((= v1-287 (level-memory-mode micro)) + #x80000 + ) + ((= v1-287 (level-memory-mode tiny-center-micro)) + #xc0000 + ) + ((or (= v1-287 (level-memory-mode tiny-center)) + (= v1-287 (level-memory-mode tiny-edge)) + (= v1-287 (level-memory-mode tiny)) + (= v1-287 (level-memory-mode city-tiny-edge)) + ) + #xc8000 + ) + (else + #x1b5800 + ) + ) + ) + (s5-4 (kmalloc (-> this heap) s4-52 (kmalloc-flags align-64 top) "dgo-level-buf-2")) + (s3-2 (kmalloc (-> this heap) s4-52 (kmalloc-flags align-64 top) "dgo-level-buf-2")) + ) + (format 0 "-----------> begin load ~A [~S] buffers ~d bytes~%" (-> this load-name) *temp-string* s4-52) + (set! (-> this load-buffer 0) (the-as uint s3-2)) + (set! (-> this load-buffer 1) (the-as uint s5-4)) + (set! (-> this load-buffer-size) (the-as uint s4-52)) + (set! (-> this load-buffer-mode) (level-memory-mode micro)) + (dgo-load-begin + *temp-string* + (the-as uint128 (-> this load-id)) + s3-2 + s5-4 + (logand -64 (&+ (-> this heap current) 63)) + ) + ) + ) + ) + ) + this + ) + +;; definition for method 19 of type level +(defmethod login-begin ((this level)) + "Start logging in loaded level data." + (set! (-> *texture-pool* allocate-func) texture-page-default-allocate) + (cond + ((-> this bsp) + (let ((s5-0 (-> this bsp))) + (set! (-> s5-0 level tfrag-gs-test) + (if (logtest? (-> s5-0 texture-flags 0) (texture-page-flag alpha-enable)) + (new 'static 'gs-test :ate #x1 :atst (gs-atest always) :zte #x1 :ztst (gs-ztest greater-equal)) + (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + ) + (set! (-> *level* log-in-level-bsp) (-> this bsp)) + (login-level-textures *texture-pool* this (-> this bsp texture-page-count) (-> this bsp texture-ids)) + (dotimes (v1-10 10) + (set! (-> this sky-mask mask data v1-10) 0) + ) + (let* ((s4-0 (-> this info callback-list)) + (v1-14 (car s4-0)) + ) + (while (not (null? s4-0)) + (let ((s3-0 (/ (the-as int (car v1-14)) 8)) + (a3-1 (the-as symbol (cdr v1-14))) + ) + (when (and (< (the-as uint 1) s3-0) (< s3-0 (the-as uint 13))) + (if (nonzero? (-> a3-1 value)) + (set! (-> this texture-anim-array (+ s3-0 -2)) (init! (the-as texture-anim-array (-> a3-1 value)))) + (format 0 "WARNING: level ~A has undefined texture anim array ~A~%" (-> this name) a3-1) + ) + ) + ) + (set! s4-0 (cdr s4-0)) + (set! v1-14 (car s4-0)) + ) + ) + (build-masks s5-0) + ) + (set! (-> *login-state* state) -1) + (set! (-> *login-state* pos) (the-as uint 0)) + (set! (-> *login-state* elts) (the-as uint 0)) + (dotimes (v1-28 11) + (set! (-> this eye-slot-lowres v1-28) (the-as uint 0)) + (set! (-> this eye-slot-highres v1-28) (the-as uint 0)) + ) + (set! (-> this status) 'login) + (do-nothing *level*) + ) + (else + (level-status-update! this 'inactive) + (set! loading-level global) + (set! (-> *level* loading-level) (-> *level* level-default)) + (set! *level-type-list* (the-as type 0)) + 0 + ) + ) + this + ) + +;; definition for function level-update-after-load +;; WARN: Found some very strange gotos. Check result carefully, this is not well tested. +;; INFO: Used lq/sq +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 s5, Count] +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count] +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count] +(defun level-update-after-load ((arg0 level) (arg1 login-state)) + "Run the post-load state machine to login level data." + (local-vars + (v1-4 int) + (v1-244 int) + (s5-0 int) + (sv-16 drawable) + (sv-32 proxy-prototype-array-tie) + (sv-48 int) + (sv-64 prototype-bucket-tie) + (sv-80 int) + (sv-96 adgif-shader) + ) + (set! *level-index* (-> arg0 index)) + 0 + (let* ((s3-0 (-> arg0 bsp)) + (s2-0 (-> s3-0 drawable-trees)) + ) + 0 + (.mfc0 s5-0 Count) + (label cfg-1) + 0 + (.mfc0 v1-4 Count) + (let ((v1-5 (- v1-4 s5-0))) + (when (< #x186a0 v1-5) + (set! arg0 arg0) + (goto cfg-116) + ) + ) + (let ((s0-0 (the-as int (-> arg1 pos)))) + (when (= (-> arg1 state) -1) + (when (< s0-0 (-> s2-0 length)) + (let ((s1-0 (-> s2-0 trees (the-as uint s0-0)))) + (cond + ((= (-> (the-as drawable-tree-tfrag s1-0) type) drawable-tree-tfrag) + (dotimes (s0-1 (-> (the-as drawable-tree-tfrag s1-0) length)) + (cond + ((= (-> (the-as drawable-tree-tfrag s1-0) arrays s0-1 type) drawable-inline-array-tfrag) + (set! (-> arg1 elt (-> arg1 elts)) (-> (the-as drawable-tree-tfrag s1-0) arrays s0-1)) + (+! (-> arg1 elts) 1) + ) + (else + (login (-> (the-as drawable-tree-tfrag s1-0) arrays s0-1)) + ) + ) + ) + ) + ((= (-> s1-0 type) drawable-tree-instance-tie) + (set! (-> arg1 elt (-> arg1 elts)) s1-0) + (+! (-> arg1 elts) 1) + ) + (else + (login s1-0) + (if (nonzero? (-> s3-0 hfrag-drawable)) + (login (-> s3-0 hfrag-drawable)) + ) + ) + ) + ) + (+! (-> arg1 pos) 1) + (goto cfg-1) + ) + (let ((v1-42 (- (the-as uint s0-0) (-> s2-0 length)))) + (when (< (the-as int v1-42) (-> arg0 art-group art-group-array length)) + (let ((s0-2 (-> arg0 art-group art-group-array v1-42)) + (s1-1 (-> *kernel-context* login-level-index)) + ) + (set! (-> *kernel-context* login-level-index) (-> arg0 index)) + (login s0-2) + (if (contains-art-for-other-group? s0-2) + (link-art-to-master s0-2) + ) + (set! (-> *kernel-context* login-level-index) s1-1) + ) + (+! (-> arg1 pos) 1) + (goto cfg-1) + ) + ) + (set! (-> arg1 pos) (the-as uint 0)) + (set! (-> arg1 state) 0) + (goto cfg-1) + ) + (when (< (-> arg1 state) (the-as int (-> arg1 elts))) + (set! sv-16 (-> arg1 elt (-> arg1 state))) + (cond + ((= (-> sv-16 type) drawable-inline-array-tfrag) + (set! *texture-masks-array* (-> arg0 bsp tfrag-masks)) + (cond + ((< s0-0 (-> (the-as drawable-inline-array-tfrag sv-16) length)) + (dotimes (s1-2 200) + (when (< s0-0 (-> (the-as drawable-inline-array-tfrag sv-16) length)) + (login (-> (the-as drawable-inline-array-tfrag sv-16) data (the-as uint s0-0))) + (set! s0-0 (the-as int (+ (the-as uint s0-0) 1))) + ) + ) + (set! (-> arg1 pos) (the-as uint s0-0)) + ) + (else + (set! (-> arg1 pos) (the-as uint 0)) + (set! s0-0 (+ (-> arg1 state) 1)) + (set! (-> arg1 state) s0-0) + ) + ) + ) + ((= (-> sv-16 type) drawable-tree-instance-tie) + (let ((s1-3 (-> (the-as drawable-tree-instance-tie sv-16) prototypes prototype-array-tie))) + (set! sv-32 (-> (the-as drawable-tree-instance-tie sv-16) prototypes)) + (when (< s0-0 (-> s1-3 length)) + (set! sv-48 0) + (while (< sv-48 10) + (when (< s0-0 (-> s1-3 length)) + (set! sv-64 (-> s1-3 array-data (the-as uint s0-0))) + (+! (-> sv-32 prototype-max-qwc) 32) + (cond + ((logtest? (-> sv-64 flags) (prototype-flags tpage-alpha)) + (set! *texture-masks* (-> *level* level *level-index* bsp alpha-masks data (-> sv-64 texture-masks-index))) + ) + ((logtest? (-> sv-64 flags) (prototype-flags tpage-water)) + (set! *texture-masks* (-> *level* level *level-index* bsp water-masks data (-> sv-64 texture-masks-index))) + ) + (else + (set! *texture-masks* (-> *level* level *level-index* bsp tfrag-masks data (-> sv-64 texture-masks-index))) + ) + ) + (when (and *debug-segment* (-> *screen-shot-work* highres-enable)) + (dotimes (v1-116 4) + (+! (-> sv-64 dists data v1-116) 40960000.0) + (set! (-> sv-64 rdists data v1-116) (/ 1.0 (-> sv-64 dists data v1-116))) + ) + ) + (set! sv-80 0) + (while (< sv-80 4) + (let ((a0-63 (-> sv-64 tie-geom sv-80))) + (when (nonzero? a0-63) + (+! (-> sv-32 prototype-max-qwc) (* 7 (-> a0-63 length))) + (login a0-63) + ) + ) + (set! sv-80 (+ sv-80 1)) + ) + (set! s0-0 (the-as int (+ (the-as uint s0-0) 1))) + ) + (set! sv-48 (+ sv-48 1)) + ) + (set! (-> arg1 pos) (the-as uint s0-0)) + ) + (when (= (the-as uint s0-0) (-> s1-3 length)) + (dotimes (s0-3 (-> s1-3 length)) + (let ((v1-146 (-> s1-3 array-data s0-3))) + (cond + ((logtest? (-> v1-146 flags) (prototype-flags tpage-alpha)) + (set! *texture-masks* (-> *level* level *level-index* bsp alpha-masks data (-> v1-146 texture-masks-index))) + ) + ((logtest? (-> v1-146 flags) (prototype-flags tpage-water)) + (set! *texture-masks* (-> *level* level *level-index* bsp water-masks data (-> v1-146 texture-masks-index))) + ) + (else + (set! *texture-masks* (-> *level* level *level-index* bsp tfrag-masks data (-> v1-146 texture-masks-index))) + ) + ) + (set! sv-96 (-> v1-146 envmap-shader)) + ) + (when (nonzero? sv-96) + (let ((v0-8 (adgif-shader-login-no-remap sv-96))) + (when v0-8 + (dotimes (v1-150 3) + (dotimes (a0-82 3) + (set! (-> (the-as (pointer int32) (+ (+ (* v1-150 16) (* a0-82 4)) (the-as int *texture-masks*)))) + (logior (-> (the-as (pointer int32) (+ (* a0-82 4) (the-as int *texture-masks*) (* v1-150 16))) 0) + (-> (the-as (pointer int32) (+ (* a0-82 4) (the-as int v0-8) (* v1-150 16))) 15) + ) + ) + ) + (set! (-> *texture-masks* data v1-150 dist) + (fmax (-> *texture-masks* data v1-150 dist) (-> v0-8 masks data v1-150 dist)) + ) + ) + ) + ) + (set! (-> sv-96 tex1) (new 'static 'gs-tex1 :mmag #x1 :mmin #x1)) + (set! (-> sv-96 clamp) (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))) + (set! (-> sv-96 alpha) (new 'static 'gs-miptbp :tbp1 #x58)) + (set! (-> sv-96 reg-0) (the-as uint 6)) + (set! (-> sv-96 reg-1) (the-as uint 20)) + (set! (-> sv-96 reg-2) (the-as uint 52)) + (set! (-> sv-96 reg-3) (the-as uint 8)) + (set! (-> sv-96 reg-4) (the-as uint 66)) + ) + ) + (set! (-> arg1 pos) (the-as uint 0)) + (+! (-> arg1 state) 1) + ) + ) + ) + ) + (goto cfg-1) + ) + (when (= (-> arg1 state) (-> arg1 elts)) + (let ((v1-168 (-> arg0 bsp))) + (cond + ((or (zero? (-> v1-168 nav-meshes)) (= (the-as uint s0-0) (-> v1-168 nav-meshes length))) + (set! (-> arg1 pos) (the-as uint 0)) + (+! (-> arg1 state) 1) + ) + (else + (initialize-nav-mesh! (-> v1-168 nav-meshes (the-as uint s0-0))) + (+! (-> arg1 pos) 1) + ) + ) + ) + (goto cfg-1) + ) + (when (zero? (the-as uint s0-0)) + (set! (-> arg1 pos) (the-as uint 1)) + (set! arg0 arg0) + (goto cfg-116) + ) + ) + ) + (set! (-> arg0 nickname) (-> arg0 bsp nickname)) + (let ((f0-6 (-> arg0 bsp subdivide-close)) + (f1-3 (-> arg0 bsp subdivide-far)) + ) + (when (and (= f0-6 0.0) (= f1-3 0.0)) + (set! f0-6 122880.0) + (set! f1-3 286720.0) + ) + (set! (-> *subdivide-settings* close (-> arg0 index)) f0-6) + (set! (-> *subdivide-settings* far (-> arg0 index)) f1-3) + (set! (-> *subdivide-settings* close 11) f0-6) + (set! (-> *subdivide-settings* far 11) f1-3) + ) + (when (and *debug-segment* (-> *screen-shot-work* highres-enable)) + (set! (-> *subdivide-settings* close (-> arg0 index)) 40960000.0) + (set! (-> *subdivide-settings* far (-> arg0 index)) 41369600.0) + (set! (-> *subdivide-settings* close 11) 40960000.0) + (set! (-> *subdivide-settings* far 11) 41369600.0) + ) + (init-vis-from-bsp arg0) + (if (nonzero? (-> arg0 info part-engine-max)) + (set! (-> arg0 part-engine) + (new 'loading-level 'engine 'sparticle-launcher (the-as int (* (-> arg0 info part-engine-max) 16)) connection) + ) + ) + (load-common-package arg0) + (clear-mood-context (-> arg0 mood-context)) + (set! (-> arg0 mood-init) + (the-as (function mood-context none) (get-callback-symbol-value-by-slot! (-> arg0 info) 23)) + ) + (if (-> arg0 mood-init) + ((-> arg0 mood-init) (-> arg0 mood-context)) + ) + (when (-> arg0 info borrow) + (dotimes (v1-229 5) + (set! (-> arg0 heap top-base) + (&- (-> arg0 heap top-base) (the-as uint (shl (-> 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))) + (set! (-> a0-121 top) (-> a0-121 top-base)) + ) + ) + ) + (set! (-> arg0 draw-priority) (-> arg0 info draw-priority)) + (set! (-> arg0 status) 'loaded) + (do-nothing *level*) + (mark-hud-warp-sprite-dirty *texture-pool*) + (set! loading-level global) + (set! (-> *level* loading-level) (-> *level* level-default)) + (set! *level-type-list* (the-as type 0)) + (set! (-> *level* log-in-level-bsp) #f) + (set! (-> arg0 load-stop-time) (the-as uint (-> *display* real-clock frame-counter))) + 0 + (.mfc0 v1-244 Count) + (- v1-244 s5-0) + (set! (-> *level* load-login-time) + (* 0.016666668 (the float (- (-> *display* real-clock integral-frame-counter) *dgo-time*))) + ) + (label cfg-116) + arg0 + ) + +;; definition for method 25 of type level +;; INFO: Used lq/sq +(defmethod birth ((this level)) + "Start running a level." + (local-vars (sv-96 int)) + (case (-> this status) + (('loaded) + (let ((s5-0 loading-level) + (s4-0 (-> *level* loading-level)) + (s3-0 (-> *level* log-in-level-bsp)) + (s2-1 *level-type-list*) + ) + (let ((s1-0 (not (-> this entity)))) + (set! loading-level (-> this heap)) + (set! (-> *level* log-in-level-bsp) (-> this bsp)) + (set! (-> *level* loading-level) this) + (set! *level-type-list* (the-as type (&-> this level-type))) + (cond + ((valid? (-> this bsp light-hash) light-hash (the-as string #f) #t 0) + (set! (-> this light-hash) (-> this bsp light-hash)) + ) + (else + (set! (-> this light-hash) (the-as light-hash 0)) + 0 + ) + ) + (birth (-> this bsp)) + (set! (-> this status) 'alive) + (do-nothing *level*) + (set! (-> this render?) #t) + (copy-perms-to-level! *game-info* this) + (send-event *camera* 'level-activate (-> this name)) + (send-event *target* 'level-activate (-> this name)) + (when s1-0 + (let ((s1-1 (get-callback-symbol-value-by-slot! (-> this info) 33))) + (if (and s1-1 (type? s1-1 function)) + ((the-as (function object object) s1-1) this) + ) + ) + ) + ) + (let ((s1-2 (-> this status))) + (set! (-> this status) 'active) + (do-nothing *level*) + (update-task-masks 'level) + (assign-draw-indices *level*) + (let ((s0-0 (-> this bsp nav-meshes))) + (when (nonzero? s0-0) + (set! sv-96 0) + (while (< sv-96 (-> s0-0 length)) + (birth! (-> s0-0 sv-96)) + (set! sv-96 (+ sv-96 1)) + ) + ) + ) + (if (and (!= (-> this bsp city-level-info) 0) *traffic-manager*) + (send-event *traffic-manager* 'level-loaded this) + ) + (let ((s0-1 (get-callback-symbol-value-by-slot! (-> this info) 35))) + (if (and s0-1 (type? s0-1 function)) + ((the-as (function object object object) s0-1) this 'display) + ) + ) + (set! (-> this status) s1-2) + ) + (set! loading-level s5-0) + (set! (-> *level* loading-level) s4-0) + (set! (-> *level* log-in-level-bsp) s3-0) + (set! *level-type-list* s2-1) + ) + ) + ) + this + ) + +;; definition for method 9 of type level +;; INFO: Used lq/sq +(defmethod deactivate ((this level)) + "Keep a level in memory, but kill entities and stop drawing it." + (case (-> this status) + (('active 'alive) + (format 0 "----------- deactivate(kill) ~A (status ~A)~%" this (-> this status)) + (if (and (!= (-> this bsp city-level-info) 0) *traffic-manager*) + (send-event *traffic-manager* 'level-killed this) + ) + (let ((s5-0 (get-callback-symbol-value-by-slot! (-> this info) 36))) + (if (and s5-0 (type? s5-0 function)) + ((the-as (function object object) s5-0) this) + ) + ) + (copy-perms-from-level! *game-info* this) + (send-event *target* 'level-deactivate (-> this name)) + (remove-by-param1 *background-draw-engine* (the-as int (-> this bsp))) + (let ((s5-1 (-> this status))) + (set! (-> this status) 'shutdown) + (do-nothing *level*) + (deactivate-entities (-> this bsp)) + (set! (-> this status) s5-1) + ) + (kill-all-particles-in-level this) + (unload-from-heap *anim-manager* (-> this heap)) + (set! (-> this inside-boxes?) #f) + (set! (-> this meta-inside?) #f) + (set! (-> this force-inside?) #f) + (set! (-> this status) 'loaded) + (do-nothing *level*) + (set! (-> this light-hash) (the-as light-hash 0)) + (set! (-> this all-visible?) 'loading) + (dotimes (v1-35 128) + (set! (-> (the-as (pointer int128) (&+ (-> this vis-bits) (* v1-35 16)))) 0) + ) + (countdown (v1-38 8) + (let ((a0-23 (-> this vis-info v1-38))) + (if a0-23 + (set! (-> a0-23 current-vis-string) (the-as uint -1)) + ) + ) + ) + (when (logtest? (-> this info base-task-mask) (task-mask primary0)) + (let ((v1-45 (task-mask))) + (dotimes (a0-24 (-> *level* length)) + (let ((a1-15 (-> *level* level a0-24))) + (if (= (-> a1-15 status) 'active) + (set! v1-45 (logior v1-45 (logand (-> a1-15 info base-task-mask) (task-mask primary0)))) + ) + ) + ) + (when (not (logtest? v1-45 (task-mask primary0))) + (dotimes (v1-48 (-> *level* length)) + (let ((a0-30 (-> *level* level v1-48))) + (if (= (-> a0-30 status) 'active) + (logior! (-> a0-30 task-mask) (task-mask primary0)) + ) + ) + ) + ) + ) + ) + ) + ) + (if (= (-> *level* log-in-level-bsp) (-> this bsp)) + (set! (-> *level* log-in-level-bsp) #f) + ) + this + ) + +;; definition for method 10 of type level +(defmethod unload! ((this level)) + "Remove level from memory." + (deactivate this) + (when (!= (-> this status) 'inactive) + (when (not (logtest? (level-flags lf17) (-> this info level-flags))) + (dotimes (s5-0 (-> *level* length)) + (let ((v1-10 (-> *level* level s5-0))) + (when (or (= (-> v1-10 status) 'active) (= (-> v1-10 status) 'alive) (= (-> v1-10 status) 'loaded)) + (when (= (-> v1-10 info master-level) (-> this name)) + (format + 0 + "ERROR: level ~A is unloading but level ~A depends on it as a master-level~%" + (-> this name) + (-> v1-10 name) + ) + (break!) + 0 + ) + ) + ) + ) + ) + (dotimes (s5-1 5) + (when (-> this borrow-level s5-1) + (unload! (-> this borrow-level s5-1)) + (set! (-> this borrow-level s5-1) #f) + ) + ) + (when (-> this borrow-from-level) + (dotimes (v1-30 5) + (if (= this (-> this borrow-from-level borrow-level v1-30)) + (set! (-> this borrow-from-level borrow-level v1-30) #f) + ) + ) + (set! (-> this borrow-from-level) #f) + ) + (case (-> this status) + (('loading 'loading-bt) + (dgo-load-cancel (the-as int (-> this load-id))) + (link-reset) + ) + (('alive 'active 'loaded) + (when (-> this entity) + (let ((s5-2 (get-callback-symbol-value-by-slot! (-> this info) 34))) + (if (and s5-2 (type? s5-2 function)) + ((the-as (function level object) s5-2) this) + ) + ) + ) + ) + ) + (when (or (= (-> this status) 'loaded) + (= (-> this status) 'alive) + (= (-> this status) 'active) + (= (-> this status) 'login) + ) + (dotimes (s5-3 (-> this art-group art-group-array length)) + (let ((s4-0 (-> this art-group art-group-array s5-3))) + (if (contains-art-for-other-group? s4-0) + (unlink-art-to-master s4-0) + ) + (art-method-10 s4-0) + ) + ) + (case (-> this status) + (('alive 'active 'loaded) + (let* ((s5-4 (-> this info callback-list)) + (v1-68 (car s5-4)) + ) + (while (not (null? s5-4)) + (let ((s4-1 (/ (the-as int (car v1-68)) 8)) + (v1-69 (the-as object (cdr v1-68))) + ) + (when (and (< (the-as uint 1) s4-1) (< s4-1 (the-as uint 13))) + (if (nonzero? (-> (the-as symbol v1-69) value)) + (set! (-> this texture-anim-array (+ s4-1 -2)) + (clear! (the-as texture-anim-array (-> (the-as symbol v1-69) value))) + ) + ) + ) + ) + (set! s5-4 (cdr s5-4)) + (set! v1-68 (car s5-4)) + ) + ) + ) + ) + ) + (set! (-> this bsp) #f) + (set! (-> this entity) #f) + (set! (-> this status) 'inactive) + (do-nothing *level*) + (set! (-> this linking) #f) + (set! (-> this art-group string-array length) 0) + (set! (-> this art-group art-group-array length) 0) + (set! (-> this mem-usage-block) (the-as memory-usage-block 0)) + (set! (-> this mem-usage) 0) + (set! (-> this part-engine) #f) + (dotimes (v1-83 4) + (set! (-> this user-object v1-83) #f) + ) + (dotimes (v1-86 11) + (set! (-> this texture-anim-array v1-86) #f) + ) + (countdown (s5-5 (-> this loaded-texture-page-count)) + (dotimes (v1-89 32) + (when (= (-> this loaded-texture-page s5-5) (-> *texture-pool* common-page v1-89)) + (set! (-> *texture-pool* common-page v1-89) (the-as texture-page 0)) + 0 + ) + ) + (unload-page *texture-pool* (-> this loaded-texture-page s5-5)) + ) + (set! (-> this loaded-texture-page-count) 0) + (unlink-shaders-in-heap *texture-page-dir* (-> this heap)) + (unlink-part-group-by-heap (-> this heap)) + (unlink-lightning-spec-by-heap (-> this heap)) + (particle-adgif-cache-flush) + (set! (-> this loaded-text-info-count) 0) + (dotimes (s5-6 2) + (let ((v1-103 (-> *art-control* buffer s5-6 pending-load-file))) + (if (and (>= (the-as int v1-103) (the-as int (-> this heap base))) + (< (the-as int v1-103) (the-as int (-> this heap top-base))) + ) + (set-pending-file (-> *art-control* buffer s5-6) (the-as string #f) -1 (the-as handle #f) 100000000.0) + ) + ) + ) + (let ((v1-112 0) + (a0-79 0) + (a1-27 (-> this level-type)) + ) + (while a1-27 + (+! a0-79 1) + (+! v1-112 (-> a1-27 psize)) + (set! (-> a1-27 symbol value) (the-as object 0)) + (set! a1-27 (the-as type (-> a1-27 method-table 8))) + ) + ) + (let* ((s5-7 (-> this info packages)) + (a0-80 (car s5-7)) + ) + (while (not (null? s5-7)) + (case (rtype-of a0-80) + ((symbol) + (unload (symbol->string (the-as symbol a0-80))) + ) + ((string) + (unload (the-as string a0-80)) + ) + ) + (set! s5-7 (cdr s5-7)) + (set! a0-80 (car s5-7)) + ) + ) + (vis-clear this) + (let ((v1-127 (-> this heap))) + (set! (-> v1-127 current) (-> v1-127 base)) + ) + (set! (-> this memory-mask) (the-as uint 0)) + (set! (-> this code-memory-start) (the-as pointer 0)) + (set! (-> this code-memory-end) (the-as pointer 0)) + (set! (-> this level-type) #f) + (when (= (-> *level* loading-level) this) + (set! loading-level global) + (set! (-> *level* loading-level) (-> *level* level-default)) + (set! (-> *level* log-in-level-bsp) #f) + (set! *level-type-list* (the-as type 0)) + 0 + ) + (assign-draw-indices *level*) + ) + this + ) + +;; definition for method 11 of type level +;; ERROR: Unsupported inline assembly instruction kind - [addiu a0, a0, 56] +(defmethod is-object-visible? ((this level) (arg0 int)) + "Look up object visibility from bit-string." + (local-vars (a0-1 int) (a0-3 int)) + (let ((v1-0 (-> this vis-bits))) + (shift-arith-right-32 a0-1 arg0 3) + (let ((v1-2 (-> (the-as (pointer int8) (+ a0-1 (the-as int v1-0)))))) + (let ((a0-2 (logand arg0 7))) + (.addiu a0-3 a0-2 56) + ) + (< (shl v1-2 a0-3) 0) + ) + ) + ) + +;; definition for method 15 of type level +(defmethod inside-bsp? ((this level)) + "Check if the camera is inside the BSP for this level." + (cond + ((not (-> this bsp)) + #f + ) + ((-> this force-inside?) + #t + ) + (else + (zero? (-> this bsp cam-outside-bsp)) + ) + ) + ) + +;; definition for method 20 of type level +;; WARN: Return type mismatch int vs none. +(defmethod debug-print-region-splitbox ((this level) (arg0 vector) (arg1 object)) + (cond + ((or (not (-> this bsp)) (zero? (-> this bsp region-tree))) + ) + ((nonzero? (-> this bsp region-tree)) + (debug-print (-> this bsp region-tree) arg0 arg1) + ) + ) + 0 + (none) + ) + +;; definition for method 8 of type level +(defmethod mem-usage ((this level) (usage memory-usage-block) (flags int)) + (when (= (-> this status) 'active) + (set! (-> usage length) (max 68 (-> usage length))) + (set! (-> usage data 67 name) "entity-links") + (+! (-> usage data 67 count) (-> this entity length)) + (let ((v1-8 (asize-of (-> this entity)))) + (+! (-> usage data 67 used) v1-8) + (+! (-> usage data 67 total) (logand -16 (+ v1-8 15))) + ) + (mem-usage (-> this art-group) usage flags) + (set! (-> usage length) (max 67 (-> usage length))) + (set! (-> usage data 66 name) "level-code") + (+! (-> usage data 66 count) 1) + (let ((v1-20 (&- (-> this code-memory-end) (the-as uint (-> this code-memory-start))))) + (+! (-> usage data 66 used) v1-20) + (+! (-> usage data 66 total) (logand -16 (+ v1-20 15))) + ) + (countdown (s3-0 (-> this loaded-texture-page-count)) + (mem-usage (-> this loaded-texture-page s3-0) usage flags) + ) + (countdown (s3-1 (-> this loaded-text-info-count)) + (mem-usage (-> this loaded-text-info s3-1) usage flags) + ) + (countdown (s3-2 8) + (let ((s2-0 (-> this vis-info s3-2))) + (when s2-0 + (cond + ((zero? s3-2) + (set! (-> usage length) (max 63 (-> usage length))) + (set! (-> usage data 62 name) "bsp-leaf-vis-self") + (+! (-> usage data 62 count) 1) + (let ((v1-47 (+ (asize-of s2-0) (-> s2-0 allocated-length)))) + (+! (-> usage data 62 used) v1-47) + (+! (-> usage data 62 total) (logand -16 (+ v1-47 15))) + ) + ) + (else + (set! (-> usage length) (max 64 (-> usage length))) + (set! (-> usage data 63 name) "bsp-leaf-vis-adj") + (+! (-> usage data 63 count) 1) + (let ((v1-58 (+ (asize-of s2-0) (-> s2-0 allocated-length)))) + (+! (-> usage data 63 used) v1-58) + (+! (-> usage data 63 total) (logand -16 (+ v1-58 15))) + ) + ) + ) + ) + ) + ) + (mem-usage (-> this bsp) usage flags) + ) + this + ) + +;; definition for method 21 of type level-group +;; WARN: Return type mismatch int vs none. +(defmethod init-level-system ((this level-group) (arg0 symbol)) + "If needed, initialize the level system by loading common/art packages and allocating level heaps." + (when (zero? (-> *level* heap base)) + (kmemopen global "level-heaps") + (when (nmember "game" *kernel-packages*) + (set! *kernel-packages* (cons "art" *kernel-packages*)) + (set! *kernel-packages* (cons "common" *kernel-packages*)) + ) + (load-package "art" global) + (if arg0 + (load-package "common" global) + ) + (let ((s5-1 (if (and arg0 (not *debug-segment*)) + #x11f7000 + #x1af2800 + ) + ) + (gp-1 (-> this heap)) + ) + (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)) + (set! (-> gp-1 top) (-> gp-1 top-base)) + ) + (kmemclose) + ) + 0 + (none) + ) + +;; definition for method 10 of type level-group +(defmethod level-get-with-status ((this level-group) (arg0 symbol)) + "Get the first level with the given status, #f if there are none." + (dotimes (v1-0 (-> this length)) + (if (= (-> this level v1-0 status) arg0) + (return (-> this level v1-0)) + ) + ) + (the-as level #f) + ) + +;; definition for method 30 of type level-group +(defmethod level-get-most-disposable ((this level-group)) + "Get the level inside this level-group that should + be used to load a new level." + (dotimes (v1-0 (-> this length)) + (case (-> this level v1-0 status) + (('inactive) + (return (-> this level v1-0)) + ) + ) + ) + (dotimes (v1-6 (-> this length)) + (case (-> this level v1-6 status) + (('loading 'loading-bt) + (return (-> this level v1-6)) + ) + ) + ) + (dotimes (v1-12 (-> this length)) + (case (-> this level v1-12 status) + (('loaded) + (return (-> this level v1-12)) + ) + ) + ) + (let ((v0-0 (the-as level #f))) + (dotimes (v1-18 (-> this length)) + (case (-> this level v1-18 status) + (('active) + (if (and (not (-> this level v1-18 inside-boxes?)) + (or (not v0-0) (< (-> this level v1-18 info priority) (-> v0-0 info priority))) + ) + (set! v0-0 (-> this level v1-18)) + ) + ) + ) + ) + v0-0 + ) + ) + +;; definition for method 9 of type level-group +(defmethod level-get ((this level-group) (arg0 symbol)) + "Lookup loaded level by name." + (when arg0 + (dotimes (v1-0 (-> this length)) + (if (and (!= (-> this level v1-0 status) 'inactive) + (or (= (-> this level v1-0 name) arg0) (= (-> this level v1-0 load-name) arg0)) + ) + (return (-> this level v1-0)) + ) + ) + (the-as level #f) + ) + ) + +;; definition for method 22 of type level-group +(defmethod art-group-get-by-name ((this level-group) (arg0 string) (arg1 (pointer level))) + "Check all levels for an art group with the given name." + (countdown (s4-0 11) + (let ((s3-0 (-> *level* level s4-0))) + (when (or (= (-> s3-0 status) 'active) (= (-> s3-0 status) 'reserved)) + (countdown (s2-0 (-> s3-0 art-group art-group-array length)) + (when (name= (-> s3-0 art-group art-group-array s2-0 name) arg0) + (if arg1 + (set! (-> arg1 0) s3-0) + ) + (return (-> s3-0 art-group art-group-array s2-0)) + ) + ) + ) + ) + ) + (the-as art-group #f) + ) + +;; definition for method 13 of type level-group +(defmethod activate-levels! ((this level-group)) + "Make all levels 'active!" + (dotimes (s5-0 (-> this length)) + (level-status-update! (-> this level s5-0) 'active) + ) + 0 + ) + +;; definition for method 20 of type level-group +(defmethod level-get-target-inside ((this level-group)) + "Get the level that the player is 'in'." + (let ((s5-0 (target-pos 0))) + (let ((v1-1 (-> *load-state* vis-nick))) + (when v1-1 + (dotimes (a0-3 (-> this length)) + (let ((a1-3 (-> this level a0-3))) + (when (= (-> a1-3 status) 'active) + (if (and (= (-> a1-3 name) v1-1) (not (logtest? (-> a1-3 info level-flags) (level-flags lf1)))) + (return a1-3) + ) + ) + ) + ) + ) + ) + (let ((v1-5 (-> *game-info* current-continue level))) + (dotimes (a0-5 (-> this length)) + (let ((a1-8 (-> this level a0-5))) + (when (= (-> a1-8 status) 'active) + (if (and (= (-> a1-8 name) v1-5) (not (logtest? (-> a1-8 info level-flags) (level-flags lf1)))) + (return a1-8) + ) + ) + ) + ) + ) + (let ((s4-0 (the-as level #f))) + (let ((f30-0 0.0)) + (dotimes (s3-0 (-> this length)) + (let ((s2-0 (-> this level s3-0))) + (when (= (-> s2-0 status) 'active) + (let ((f0-0 (vector-vector-distance (-> s2-0 bsp bsphere) s5-0))) + (if (and (-> s2-0 inside-boxes?) + (not (logtest? (-> s2-0 info level-flags) (level-flags lf1))) + (or (not s4-0) (< f0-0 f30-0)) + ) + (set! s4-0 s2-0) + ) + ) + ) + ) + ) + ) + (if s4-0 + (return s4-0) + ) + ) + ) + (dotimes (v1-26 (-> this length)) + (let ((a0-11 (-> this level v1-26))) + (when (= (-> a0-11 status) 'active) + (if (and (-> a0-11 meta-inside?) (not (logtest? (-> a0-11 info level-flags) (level-flags lf1)))) + (return a0-11) + ) + ) + ) + ) + (let ((v0-1 (the-as level #f))) + 0.0 + (dotimes (v1-29 (-> this length)) + (let ((a0-16 (-> this level v1-29))) + (when (= (-> a0-16 status) 'active) + (if (and (not v0-1) (not (logtest? (-> a0-16 info level-flags) (level-flags lf1)))) + (set! v0-1 a0-16) + ) + ) + ) + ) + v0-1 + ) + ) + +;; definition for method 8 of type level-group +(defmethod mem-usage ((this level-group) (usage memory-usage-block) (flags int)) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this level s3-0) usage flags) + ) + this + ) + +;; definition for function bg +;; WARN: Return type mismatch int vs none. +(defun bg ((arg0 symbol)) + "Debug function to start playing a given level." + (set! *cheat-mode* (if *debug-segment* + 'debug + #f + ) + ) + (let ((v1-2 (lookup-level-info arg0))) + (cond + ((= (-> v1-2 visname) arg0) + (set! (-> *level* vis?) #t) + (set! arg0 (-> v1-2 name)) + ) + (else + (set! (-> *level* vis?) #f) + (set! (-> *kernel-context* low-memory-message) #f) + ) + ) + (let ((a0-8 (-> v1-2 memory-mode))) + (if (or (= a0-8 (level-memory-mode borrow)) (or (= a0-8 (level-memory-mode borrow0)) + (= a0-8 (level-memory-mode borrow1)) + (= a0-8 (level-memory-mode borrow2)) + (= a0-8 (level-memory-mode borrow3)) + (= a0-8 (level-memory-mode borrow4)) + (= a0-8 (level-memory-mode borrow-city-small)) + ) + ) + (set! (-> v1-2 memory-mode) (level-memory-mode small-edge)) + ) + ) + (let* ((s5-0 (-> v1-2 run-packages)) + (a0-12 (car s5-0)) + ) + (while (not (null? s5-0)) + (case (rtype-of a0-12) + ((symbol) + (load-package (symbol->string (the-as symbol a0-12)) global) + ) + ((string) + (load-package (the-as string a0-12) global) + ) + ) + (set! s5-0 (cdr s5-0)) + (set! a0-12 (car s5-0)) + ) + ) + ) + (let ((s5-1 (level-get-for-use *level* arg0 'active))) + (while (and s5-1 + (or (= (-> s5-1 status) 'loading) (= (-> s5-1 status) 'loading-bt) (= (-> s5-1 status) 'login)) + (not *dproc*) + ) + (load-continue s5-1) + ) + (reset! *load-state*) + (set! (-> *load-state* vis-nick) (-> s5-1 name)) + (set! (-> *load-state* want 0 name) (-> s5-1 name)) + (set! (-> *load-state* want 0 display?) 'display) + (if (-> s5-1 info continues) + (set-continue! *game-info* (the-as basic (car (-> s5-1 info continues))) #f) + ) + ) + (dotimes (v1-35 3) + (set! (-> *load-state* want-sound v1-35 name) (-> *game-info* current-continue want-sound v1-35)) + (set! (-> *load-state* want-sound v1-35 mode) (sound-bank-mode unknown)) + ) + (add-borrow-levels *load-state*) + (activate-levels! *level*) + (set! *print-login* #f) + (cond + ((= arg0 'halfpipe) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 0.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 14) + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id unk0 unk1)) + ) + (else + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id unk3)) + ) + ) + 0 + (none) + ) + +;; definition for function play +(defun play ((arg0 symbol) (arg1 symbol)) + "Start (or restart) the game! + This will start up the display process, and load the initial level." + (kmemopen global "level-boot") + (when *kernel-boot-level* + (bg (string->symbol (the-as string *kernel-boot-level*))) + (on #f) + (kmemclose) + (kmemclose) + (return 0) + ) + *kernel-boot-message* + (let ((s5-0 (if *debug-segment* + 'wasall + 'title + ) + ) + ) + (stop 'play) + (set! (-> *level* vis?) arg0) + (set! (-> *level* want-level) #f) + (set! (-> *level* border?) #t) + (set! (-> *setting-control* user-default border-mode) #t) + (set! (-> *level* play?) #t) + (init-level-system *level* #t) + (set! *display-profile* #f) + (set! *cheat-mode* (if *debug-segment* + 'debug + #f + ) + ) + (set! *time-of-day-fast* #f) + (send-event (ppointer->process *time-of-day*) 'change 'ratio 1.0) + (send-event (ppointer->process *time-of-day*) 'change 'hour 7) + (send-event (ppointer->process *time-of-day*) 'change 'minutes 0) + (send-event (ppointer->process *time-of-day*) 'change 'seconds 0) + (send-event (ppointer->process *time-of-day*) 'change 'frames 0) + (set! (-> *time-of-day-context* mode) (time-of-day-palette-id unk3)) + (set! (-> *mood-control* overide-weather-flag) #f) + (set-blackout-frames (seconds 0.02)) + (when (not *dproc*) + (reset! *load-state*) + (let ((s4-1 (level-get-for-use *level* s5-0 'active))) + (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) #f) + (set! (-> a1-9 2) #f) + (set! (-> a1-9 1) (if (= s5-0 'ctysluma) + 'ctywide + ) + ) + (set! (-> a1-9 0) s5-0) + (want-levels *load-state* a1-9) + ) + (want-display-level *load-state* s5-0 'display) + (if (= s5-0 'ctysluma) + (want-display-level *load-state* 'ctywide 'display) + ) + (want-vis-level *load-state* s5-0) + (while (and s4-1 (or (= (-> s4-1 status) 'loading) (= (-> s4-1 status) 'loading-bt) (= (-> s4-1 status) 'login))) + (set-blackout-frames (seconds 0.02)) + (load-continue s4-1) + ) + ) + ) + (set! *print-login* #f) + (level-status-update! (level-get *level* s5-0) 'active) + ) + (on #t) + (if arg1 + (initialize! *game-info* 'boot (the-as game-save #f) (the-as string #f) (the-as resetter-spec #f)) + ) + (kmemclose) + (kmemclose) + 0 + ) + +;; definition for function play-boot +;; WARN: Return type mismatch int vs none. +(defun play-boot () + "Function called by the C Kernel to start the game (wrapper around play)." + (process-spawn-function + process + (lambda () (play #t #t) (none)) + :from *4k-dead-pool* + :stack *kernel-dram-stack* + ) + 0 + (none) + ) + +;; definition for function sound-bank-name->mode +;; WARN: Return type mismatch int vs sound-bank-mode. +(defun sound-bank-name->mode ((arg0 symbol)) + (let ((v1-0 arg0)) + (the-as sound-bank-mode (cond + ((or (= v1-0 'half1) + (= v1-0 'half2) + (= v1-0 'ctyslmch) + (= v1-0 'ctyslmbh) + (= v1-0 'ctygnbh) + (= v1-0 'ctyindh) + (= v1-0 'ctyslmah) + (= v1-0 'ctyporth) + (= v1-0 'mhcity1h) + (= v1-0 'mhcity2h) + (= v1-0 'citypedh) + (= v1-0 'cityffh) + (= v1-0 'citycarh) + (= v1-0 'vinroomh) + (= v1-0 'ctyprtdh) + (= v1-0 'citybbh) + ) + 5 + ) + ((= v1-0 'ctywide) + 9 + ) + (else + 4 + ) + ) + ) + ) + ) + +;; definition for function update-sound-banks +;; WARN: Return type mismatch int vs none. +;; WARN: Function update-sound-banks has a return type of none, but the expression builder found a return statement. +(defun update-sound-banks ((arg0 load-state) (arg1 (inline-array sound-bank-state))) + (local-vars (v1-90 symbol)) + (let ((s4-0 0) + (s5-0 (the-as object #f)) + ) + (dotimes (v1-1 6) + (set! (-> arg0 want-exp-sound v1-1 name) #f) + (set! (-> arg0 want-exp-sound v1-1 mode) (sound-bank-mode none)) + (set! (-> arg0 target-sound v1-1 name) #f) + (set! (-> arg0 target-sound v1-1 mode) (sound-bank-mode none)) + ) + (dotimes (s3-0 3) + (let ((a0-10 (the-as object (-> *load-state* want-sound s3-0 name)))) + (dotimes (v1-6 (-> *level* length)) + (let ((a1-4 (-> *level* level v1-6))) + (when (= (-> a1-4 status) 'active) + (let ((a1-6 (-> a1-4 info extra-sound-bank))) + (when a1-6 + (let ((a2-4 (car a1-6))) + (while (not (null? a1-6)) + (if (= (car a2-4) a0-10) + (set! a0-10 (cdr a2-4)) + ) + (set! a1-6 (cdr a1-6)) + (set! a2-4 (car a1-6)) + ) + ) + ) + ) + ) + ) + ) + (dotimes (v1-9 (the-as int (-> *setting-control* user-current extra-bank-count))) + (let ((a1-13 (and (not (null? (-> *setting-control* user-current extra-bank v1-9))) + (-> *setting-control* user-current extra-bank v1-9) + ) + ) + ) + (when a1-13 + (let ((a2-12 (car a1-13))) + (while (not (null? a1-13)) + (cond + ((and (= s3-0 2) (= (car a2-12) 'force2)) + (set! s5-0 (car (cdr a2-12))) + ) + ((= (car a2-12) a0-10) + (set! a0-10 (cdr a2-12)) + ) + ) + (set! a1-13 (cdr a1-13)) + (set! a2-12 (car (the-as pair a1-13))) + ) + ) + ) + ) + ) + (case (rtype-of a0-10) + ((symbol) + (when a0-10 + (set! (-> arg0 want-exp-sound s4-0 name) (the-as symbol a0-10)) + (set! (-> arg0 want-exp-sound s4-0 mode) (sound-bank-name->mode (the-as symbol a0-10))) + (+! s4-0 1) + ) + ) + ((pair) + (let* ((s2-0 (the-as pair a0-10)) + (a0-11 (car s2-0)) + ) + (while (not (null? s2-0)) + (when a0-11 + (set! (-> arg0 want-exp-sound s4-0 name) (the-as symbol a0-11)) + (set! (-> arg0 want-exp-sound s4-0 mode) (sound-bank-name->mode (the-as symbol a0-11))) + (+! s4-0 1) + ) + (set! s2-0 (cdr s2-0)) + (set! a0-11 (car s2-0)) + ) + ) + ) + ) + ) + ) + (if (= *city-mode* 'ctywide) + (city-sound-expand-want-list) + ) + (when s5-0 + (cond + ((-> arg0 want-exp-sound 1) + (set! (-> arg0 want-exp-sound 2 name) (the-as symbol s5-0)) + (set! (-> arg0 want-exp-sound 2 mode) (sound-bank-name->mode (the-as symbol s5-0))) + ) + ((-> arg0 want-exp-sound) + (set! (-> arg0 want-exp-sound 1 name) (the-as symbol s5-0)) + (set! (-> arg0 want-exp-sound 1 mode) (sound-bank-name->mode (the-as symbol s5-0))) + ) + (else + (set! (-> arg0 want-exp-sound 0 name) (the-as symbol s5-0)) + (set! (-> arg0 want-exp-sound 0 mode) (sound-bank-name->mode (the-as symbol s5-0))) + ) + ) + ) + ) + (let ((s4-1 0) + (s3-1 0) + (s2-1 0) + (s1-0 0) + (s5-1 (new 'stack-no-clear 'array 'int8 36)) + ) + (dotimes (v1-43 10) + (set! (-> s5-1 v1-43) 0) + ) + (dotimes (s0-0 6) + (case (-> arg0 want-exp-sound s0-0 mode) + (((sound-bank-mode virtual)) + ) + (((sound-bank-mode full)) + (if (>= s2-1 3) + (goto cfg-80) + ) + (+! s2-1 1) + (+! s3-1 1) + (mem-copy! (the-as pointer (-> arg0 target-sound s1-0)) (the-as pointer (-> arg0 want-exp-sound s0-0)) 8) + (+! s1-0 1) + ) + (((sound-bank-mode half)) + (cond + ((even? s4-1) + (if (>= s2-1 3) + (goto cfg-80) + ) + (+! s2-1 1) + (mem-copy! (the-as pointer (-> arg0 target-sound s1-0)) (the-as pointer (-> arg0 want-exp-sound s0-0)) 8) + ) + (else + (mem-copy! (the-as pointer (-> arg0 target-sound s1-0)) (the-as pointer (-> arg0 want-exp-sound s0-0)) 8) + ) + ) + (set! (-> arg0 target-sound s1-0 mode) (sound-bank-mode half)) + (+! s4-1 1) + (+! s1-0 1) + ) + ) + (label cfg-80) + ) + (let ((v1-76 0)) + (dotimes (a0-28 6) + (case (-> arg0 target-sound a0-28 mode) + (((sound-bank-mode half)) + (dotimes (a1-32 6) + (when (= (-> *level* sound-bank a1-32 name) (-> arg0 target-sound a0-28 name)) + (let ((a2-26 (-> *level* sound-bank a1-32 mode))) + (when (and (>= (the-as uint a2-26) (the-as uint 6)) + (>= (the-as uint 8) (the-as uint a2-26)) + (not (and (nonzero? s3-1) + (= (+ v1-76 1) s4-1) + (< 1 s4-1) + (zero? (-> s5-1 a2-26)) + (or (= (-> s5-1 6) 1) (= (-> s5-1 7) 1) (= (-> s5-1 8) 1)) + ) + ) + ) + (set! (-> arg0 target-sound a0-28 mode) (-> *level* sound-bank a1-32 mode)) + (+! (-> s5-1 a2-26) 1) + (+! v1-76 1) + ) + ) + (goto cfg-112) + ) + ) + ) + ) + (label cfg-112) + ) + ) + (dotimes (v1-79 6) + (case (-> arg0 target-sound v1-79 mode) + (((sound-bank-mode half)) + (cond + ((= (-> s5-1 6) 1) + (+! (-> s5-1 6) 1) + (set! (-> arg0 target-sound v1-79 mode) (sound-bank-mode halfa)) + ) + ((= (-> s5-1 7) 1) + (+! (-> s5-1 7) 1) + (set! (-> arg0 target-sound v1-79 mode) (sound-bank-mode halfb)) + ) + ((= (-> s5-1 8) 1) + (+! (-> s5-1 8) 1) + (set! (-> arg0 target-sound v1-79 mode) (sound-bank-mode halfc)) + ) + ((zero? (-> s5-1 6)) + (+! (-> s5-1 6) 1) + (set! (-> arg0 target-sound v1-79 mode) (sound-bank-mode halfa)) + ) + ((zero? (-> s5-1 7)) + (+! (-> s5-1 7) 1) + (set! (-> arg0 target-sound v1-79 mode) (sound-bank-mode halfb)) + ) + ((zero? (-> s5-1 8)) + (+! (-> s5-1 8) 1) + (set! (-> arg0 target-sound v1-79 mode) (sound-bank-mode halfc)) + ) + ) + ) + ) + ) + ) + (if (or (nonzero? (rpc-busy? 1)) (not (-> *setting-control* user-current sound-bank-load))) + (return 0) + ) + (dotimes (s4-2 6) + (let ((s5-2 (-> arg0 target-sound s4-2)) + (s2-2 + (lambda ((arg0 load-state) (arg1 sound-bank-state)) + (if (not (-> arg1 name)) + (return #f) + ) + (countdown (v1-3 6) + (if (and (= (-> arg1 name) (-> arg0 target-sound v1-3 name)) (= (-> arg1 mode) (-> arg0 target-sound v1-3 mode))) + (return #t) + ) + ) + #f + ) + ) + ) + (set! v1-90 (and (-> s5-2 name) (begin + (dotimes (v1-91 6) + (when (and (= (-> s5-2 name) (-> *level* sound-bank v1-91 name)) + (= (-> s5-2 mode) (-> *level* sound-bank v1-91 mode)) + ) + (set! v1-90 #f) + (goto cfg-150) + ) + ) + #t + ) + ) + ) + (label cfg-150) + (when v1-90 + (let ((s3-2 -1)) + (let ((v1-94 -1)) + (case (-> s5-2 mode) + (((sound-bank-mode full)) + ) + (else + (dotimes (a0-70 3) + (if (or (= (-> *level* sound-bank (* a0-70 2) mode) (-> s5-2 mode)) + (= (-> *level* sound-bank (+ (* a0-70 2) 1) mode) (-> s5-2 mode)) + ) + (set! v1-94 a0-70) + ) + ) + ) + ) + (dotimes (a0-73 3) + (case (-> s5-2 mode) + (((sound-bank-mode full)) + (when (and (not (-> *level* sound-bank (* a0-73 2) name)) (not (-> *level* sound-bank (+ (* a0-73 2) 1) name))) + (set! s3-2 (* a0-73 2)) + (goto cfg-224) + ) + ) + (else + (when (or (< v1-94 0) (= v1-94 a0-73)) + (when (and (not (-> *level* sound-bank (* a0-73 2) name)) + (or (not (-> *level* sound-bank (+ (* a0-73 2) 1) name)) + (= (-> *level* sound-bank (+ (* a0-73 2) 1) mode) (-> s5-2 mode)) + ) + ) + (set! s3-2 (* a0-73 2)) + (goto cfg-224) + ) + (when (and (not (-> *level* sound-bank (+ (* a0-73 2) 1) name)) + (= (-> *level* sound-bank (* a0-73 2) mode) (-> s5-2 mode)) + ) + (set! s3-2 (+ (* a0-73 2) 1)) + (goto cfg-224) + ) + ) + ) + ) + ) + ) + (case (-> s5-2 mode) + (((sound-bank-mode full)) + ) + (else + (let ((s1-1 0)) + (while (< s1-1 6) + (when (or (and (-> *level* sound-bank s1-1 name) + (= (-> *level* sound-bank s1-1 mode) (-> s5-2 mode)) + (not (s2-2 arg0 (-> *level* sound-bank s1-1))) + ) + (= (-> *level* sound-bank s1-1 name) (-> s5-2 name)) + ) + (format 0 "Unload soundbank ~A from slot ~D~%" (-> *level* sound-bank s1-1 name) s1-1) + (sound-bank-unload (string->sound-name (symbol->string (-> *level* sound-bank s1-1 name)))) + (set! (-> *level* sound-bank s1-1 name) #f) + (set! (-> *level* sound-bank s1-1 mode) (sound-bank-mode none)) + (return 0) + ) + (set! s1-1 (+ s1-1 1)) + ) + ) + ) + ) + (dotimes (s1-2 3) + (when (and (not (s2-2 arg0 (-> *level* sound-bank (* s1-2 2)))) + (not (s2-2 arg0 (-> *level* sound-bank (+ (* s1-2 2) 1)))) + ) + (let ((gp-2 (if (-> *level* sound-bank (* s1-2 2) name) + (* s1-2 2) + (+ (* s1-2 2) 1) + ) + ) + ) + (format 0 "Unload soundbank ~A from slot ~D~%" (-> *level* sound-bank gp-2 name) gp-2) + (sound-bank-unload (string->sound-name (symbol->string (-> *level* sound-bank gp-2 name)))) + (set! (-> *level* sound-bank gp-2 name) #f) + (set! (-> *level* sound-bank gp-2 mode) (sound-bank-mode none)) + ) + (return 0) + ) + ) + (label cfg-224) + (let ((s2-3 0)) + (while (< s2-3 6) + (when (= (-> *level* sound-bank s2-3 name) (-> s5-2 name)) + (format 0 "Unload soundbank ~A from slot ~D~%" (-> *level* sound-bank s2-3 name) s2-3) + (sound-bank-unload (string->sound-name (symbol->string (-> *level* sound-bank s2-3 name)))) + (set! (-> *level* sound-bank s2-3 name) #f) + (set! (-> *level* sound-bank s2-3 mode) (sound-bank-mode none)) + (return 0) + ) + (set! s2-3 (+ s2-3 1)) + ) + ) + (when (>= s3-2 0) + (format 0 "Load soundbank ~A in slot ~D~%" (-> s5-2 name) s3-2) + (sound-bank-load (string->sound-name (symbol->string (-> s5-2 name))) (the-as int (-> s5-2 mode)) 0) + (mem-copy! (the-as pointer (-> *level* sound-bank s3-2)) (the-as pointer s5-2) 8) + (return 0) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type load-state +(defmethod update! ((this load-state)) + (local-vars (a0-11 symbol)) + (if (-> this update-callback) + ((-> this update-callback) this) + ) + (let ((v1-3 #f)) + (let ((s5-0 0)) + -1 + (countdown (s4-0 10) + (let ((a0-3 -1)) + (countdown (a1-0 10) + (let ((a2-3 (-> *level* level a1-0))) + (when (and (!= (-> a2-3 status) 'inactive) (>= (-> a2-3 load-order) (the-as uint s5-0))) + (let ((a3-5 #f)) + (dotimes (t0-2 10) + (if (= (-> a2-3 name) (-> this target t0-2 name)) + (set! a3-5 #t) + ) + ) + (when (not a3-5) + (set! s5-0 (the-as int (-> a2-3 load-order))) + (set! a0-3 a1-0) + ) + ) + ) + ) + ) + (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) + ) + (set! v1-3 #t) + ) + ) + ) + ) + (let ((s5-1 #f)) + (countdown (a0-10 10) + (when (!= (-> *level* level a0-10 status) 'inactive) + (set! a0-11 #f) + (goto cfg-25) + ) + ) + (set! a0-11 #t) + (label cfg-25) + (if a0-11 + (set! s5-1 #t) + ) + (if v1-3 + (return 0) + ) + (let ((v1-11 (new 'static 'boxed-array :type symbol :length 0 :allocated-length 10))) + (countdown (a0-15 10) + (set! (-> v1-11 a0-15) #f) + ) + (dotimes (a0-18 10) + (when (-> this target a0-18 name) + (set! (-> v1-11 a0-18) (-> this target a0-18 name)) + (dotimes (a1-17 10) + (let ((a2-13 (-> *level* level a1-17))) + (if (and (!= (-> a2-13 status) 'inactive) (= (-> a2-13 name) (-> this target a0-18 name))) + (set! (-> v1-11 a0-18) #f) + ) + ) + ) + ) + ) + (let ((s4-1 -1)) + (dotimes (a0-21 10) + (when (-> v1-11 a0-21) + (set! s4-1 a0-21) + (goto cfg-53) + ) + ) + (label cfg-53) + (when (!= s4-1 -1) + (when (and (or s5-1 (not (check-busy *load-dgo-rpc*))) (not (load-in-progress? *level*))) + (format 0 "Adding level ~A~%" (-> this target s4-1 name)) + (let ((s3-1 (level-get-for-use *level* (-> this target s4-1 name) 'loaded))) + (when (and s5-1 (-> this target s4-1 display?)) + (format 0 "Waiting for level to load~%") + (while (or (= (-> s3-1 status) 'loading) (= (-> s3-1 status) 'loading-bt) (= (-> s3-1 status) 'login)) + (load-continue s3-1) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (dotimes (s5-2 10) + (when (-> this target s5-2 name) + (dotimes (s4-2 11) + (let ((s3-2 (-> *level* level s4-2))) + (when (!= (-> s3-2 status) 'inactive) + (when (= (-> s3-2 name) (-> this target s5-2 name)) + (when (!= (-> s3-2 display?) (-> this target s5-2 display?)) + (cond + ((not (-> s3-2 display?)) + (cond + ((or (= (-> s3-2 status) 'loaded) (= (-> s3-2 status) 'active)) + (format 0 "Displaying level ~A [~A]~%" (-> this target s5-2 name) (-> this target s5-2 display?)) + (level-get-for-use *level* (-> s3-2 info name) 'active) + (set! (-> s3-2 display?) (-> this target s5-2 display?)) + ) + (else + (if (and (logtest? (-> s3-2 info level-flags) (level-flags lf11)) + (!= (-> this target s5-2 display?) 'display-no-wait) + ) + (send-event *target* 'loading) + ) + (if (and (= *cheat-mode* 'debug) (not *display-capture-mode*)) + (format *stdcon* "display on for ~A but level is loading~%" (-> this target s5-2 name)) + ) + ) + ) + ) + ((not (-> this target s5-2 display?)) + (set! (-> s3-2 display?) #f) + (format 0 "Turning level ~A off~%" (-> s3-2 name)) + (deactivate s3-2) + ) + (else + (format + 0 + "Setting level ~A display command to ~A~%" + (-> this target s5-2 name) + (-> this target s5-2 display?) + ) + (set! (-> s3-2 display?) (-> this target s5-2 display?)) + ) + ) + ) + (when (!= (-> s3-2 force-all-visible?) (-> this target s5-2 force-vis?)) + (set! (-> s3-2 force-all-visible?) (-> this target s5-2 force-vis?)) + (format + 0 + "Setting force-all-visible?[~A] to ~A~%" + (-> this target s5-2 name) + (-> this target s5-2 force-vis?) + ) + ) + (when (!= (-> s3-2 force-inside?) (-> this target s5-2 force-inside?)) + (format + 0 + "Setting force-inside?[~A] ~A->~A~%" + (-> this target s5-2 name) + (-> s3-2 force-inside?) + (-> this target s5-2 force-inside?) + ) + (set! (-> s3-2 force-inside?) (-> this target s5-2 force-inside?)) + ) + ) + ) + ) + ) + ) + ) + (when (-> *level* border?) + (let ((v1-131 (the-as level #f)) + (a0-55 0) + ) + (dotimes (a1-35 (-> *level* length)) + (let ((a2-32 (-> *level* level a1-35))) + (when (= (-> a2-32 status) 'active) + (when (and (-> a2-32 inside-boxes?) (not (null? (-> a2-32 info continues)))) + (if (= (-> a2-32 name) (-> this vis-nick)) + (goto cfg-137) + ) + (if (or (not v1-131) (not (logtest? (-> a2-32 info level-flags) (level-flags lf1)))) + (set! v1-131 a2-32) + ) + (+! a0-55 1) + ) + ) + ) + ) + (if (and (>= a0-55 1) (!= (-> v1-131 name) (-> this vis-nick))) + (want-vis-level this (-> v1-131 name)) + ) + ) + ) + (label cfg-137) + (update-sound-banks this (-> *level* sound-bank)) + 0 + ) + +;; definition for method 16 of type level-group +;; WARN: Return type mismatch int vs none. +(defmethod assign-draw-indices ((this level-group)) + "Assign the order for levels to be drawn." + (local-vars (t0-3 symbol)) + (set! (-> this draw-level-count) 0) + (dotimes (v1-0 11) + (let ((f0-0 100000.0) + (a1-1 (the-as level #f)) + ) + (dotimes (a2-0 (-> this length)) + (let ((a3-3 (-> this level a2-0))) + (when (= (-> a3-3 status) 'active) + (set! t0-3 (and (< (-> a3-3 draw-priority) f0-0) (begin + (dotimes (t0-4 (-> this draw-level-count)) + (when (= a3-3 (-> this draw-level t0-4)) + (set! t0-3 #f) + (goto cfg-14) + ) + ) + #t + ) + ) + ) + (label cfg-14) + (when t0-3 + (set! a1-1 a3-3) + (set! f0-0 (-> a1-1 draw-priority)) + ) + ) + ) + ) + (when a1-1 + (set! (-> this draw-level (-> this draw-level-count)) a1-1) + (set! (-> a1-1 draw-index) (-> this draw-level-count)) + (+! (-> this draw-level-count) 1) + ) + ) + ) + (while (< (-> this draw-level-count) 11) + (set! (-> this draw-level (-> this draw-level-count)) #f) + (+! (-> this draw-level-count) 1) + ) + (set! (-> this draw-level 10) (-> this level-default)) + (set! (-> (&-> this level-default draw-index) 0) 10) + (dotimes (v1-13 11) + (let ((a2-9 (-> this level v1-13))) + (if a2-9 + (set! (-> this draw-index-map v1-13) (the-as uint (-> a2-9 draw-index))) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 19 of type level-group +;; WARN: Return type mismatch int vs none. +(defmethod level-update ((this level-group)) + "Per-frame update of the level system." + (local-vars (v1-109 symbol)) + (camera-pos) + (new 'static 'boxed-array :type symbol :length 0 :allocated-length 10) + (update *setting-control*) + (update *gui-control* #t) + (update *art-control* #t) + (clear-rec *art-control*) + (dotimes (s5-0 10) + (load-continue (-> this level s5-0)) + ) + (dotimes (s5-1 (-> this length)) + (let ((s4-0 (-> this level s5-1))) + (when (= (-> s4-0 status) 'active) + (let* ((a0-7 s4-0) + (t9-6 (method-of-object a0-7 inside-bsp?)) + ) + (-> *math-camera* trans) + (set! (-> s4-0 inside-boxes?) (the-as basic (t9-6 a0-7))) + ) + (if (-> s4-0 inside-boxes?) + (set! (-> s4-0 meta-inside?) #t) + ) + ) + ) + ) + (update! *load-state*) + (let ((s5-2 (level-get-target-inside this))) + (dotimes (s4-1 (-> this length)) + (let ((s3-0 (-> this level s4-1))) + (when (= (-> s3-0 status) 'active) + (when (-> s3-0 inside-boxes?) + (dotimes (v1-41 (-> this length)) + (let ((a0-14 (-> this level v1-41))) + (when (= (-> a0-14 status) 'active) + (if (and (!= s3-0 a0-14) (not (-> a0-14 inside-boxes?))) + (set! (-> a0-14 meta-inside?) #f) + ) + ) + ) + ) + ) + (when (and (= s3-0 s5-2) + (begin + (set! (-> *setting-control* user-default music) (-> s3-0 info music-bank)) + (set! (-> *setting-control* user-default sound-reverb) (-> s3-0 info sound-reverb)) + #t + ) + (or (-> *level* border?) (logtest? (-> *game-info* current-continue flags) (continue-flags change-continue))) + (and (or (and (!= (-> s3-0 name) (-> *game-info* current-continue level)) + (or (not (logtest? (level-flags lf18) (-> s3-0 info level-flags))) + (!= (-> s3-0 info taskname) (-> (lookup-level-info (-> *game-info* current-continue level)) taskname)) + ) + ) + (logtest? (-> *game-info* current-continue flags) (continue-flags change-continue)) + ) + (not (null? (-> s3-0 info continues))) + (-> *setting-control* user-current allow-continue) + ) + ) + (let ((s2-1 (car (-> s3-0 info continues)))) + (let* ((s1-0 (target-pos 0)) + (s3-1 (-> s3-0 info continues)) + (s0-0 (car s3-1)) + ) + (while (not (null? s3-1)) + (when (and (or (< (vector-vector-distance s1-0 (-> (the-as continue-point s0-0) trans)) + (vector-vector-distance s1-0 (-> (the-as continue-point s2-1) trans)) + ) + (string= (-> *game-info* current-continue name) (-> (the-as continue-point s0-0) name)) + ) + (not (logtest? (-> (the-as continue-point s0-0) flags) (continue-flags change-continue no-auto))) + ) + (set! s2-1 s0-0) + (if (string= (-> *game-info* current-continue name) (-> (the-as continue-point s0-0) name)) + (goto cfg-62) + ) + ) + (set! s3-1 (cdr s3-1)) + (set! s0-0 (car s3-1)) + ) + ) + (label cfg-62) + (if (and s2-1 (not (logtest? (-> (the-as continue-point s2-1) flags) (continue-flags change-continue no-auto)))) + (set-continue! *game-info* (the-as basic s2-1) #f) + ) + ) + ) + ) + ) + ) + ) + (dotimes (v1-94 (-> this length)) + (let ((a0-48 (-> this level v1-94))) + (when (= (-> a0-48 status) 'active) + (set! (-> a0-48 vis-self-index) 0) + 0 + ) + ) + ) + (when (and (not *display-capture-mode*) (= *cheat-mode* 'debug)) + (dotimes (s5-3 (-> this length)) + (let ((v1-104 (-> this level s5-3))) + (when (= (-> v1-104 status) 'active) + (if (and (= (-> v1-104 status) 'active) + (!= (-> v1-104 display?) 'special) + (nonzero? (-> v1-104 bsp cam-outside-bsp)) + ) + (format *stdcon* "~3Loutside of bsp ~S~%~0L" (-> v1-104 name)) + ) + ) + ) + ) + ) + (countdown (v1-108 10) + (when (-> this level v1-108 inside-boxes?) + (set! v1-109 #f) + (goto cfg-96) + ) + ) + (set! v1-109 #t) + (label cfg-96) + (cond + (v1-109 + 0 + ) + (else + (dotimes (s5-4 (-> this length)) + (let ((s4-2 (-> this level s5-4))) + (when (= (-> s4-2 status) 'active) + (dotimes (s3-2 8) + (let ((s2-2 (-> s4-2 vis-info s3-2))) + (when s2-2 + (set! (-> s2-2 flags) (the-as vis-info-flag (logclear (-> s2-2 flags) (vis-info-flag vis-valid)))) + (cond + ((= s3-2 (-> s4-2 vis-self-index)) + (set! (-> s2-2 from-bsp) (-> s4-2 bsp)) + ) + (else + (let ((v1-123 (level-get this (-> s2-2 from-level)))) + (set! (-> s2-2 from-bsp) (if v1-123 + (-> v1-123 bsp) + ) + ) + ) + ) + ) + ) + ) + ) + (let ((v1-126 #f)) + (cond + ((= (-> s4-2 display?) 'display-self) + (let ((v1-130 (-> s4-2 vis-info (-> s4-2 vis-self-index)))) + (if v1-130 + (set! (-> v1-130 flags) (the-as vis-info-flag (logior (vis-info-flag vis-valid) (-> v1-130 flags)))) + ) + ) + ) + ((and (-> s4-2 inside-boxes?) (not v1-126)) + (let ((v1-135 (-> s4-2 vis-info (-> s4-2 vis-self-index)))) + (if v1-135 + (set! (-> v1-135 flags) (the-as vis-info-flag (logior (vis-info-flag vis-valid) (-> v1-135 flags)))) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (assign-draw-indices this) + (when (or *display-level-border* *display-texture-distances* *display-texture-download* *display-split-box-info*) + (when *display-level-border* + (format + *stdcon* + " want: ~A ~A/~A ~A ~A/~A~%" + (-> *load-state* want 0 name) + (-> *load-state* want 0 display?) + (-> *load-state* want 0 force-vis?) + (-> *load-state* want 1 name) + (-> *load-state* want 1 display?) + (-> *load-state* want 1 force-vis?) + ) + (let ((t9-20 format) + (a0-86 *stdcon*) + (a1-30 " nick ~A cur ~S cont ~A~%~%") + (a2-6 (-> *load-state* vis-nick)) + (v1-156 (and *target* (-> *target* current-level) (-> *target* current-level name))) + ) + (t9-20 + a0-86 + a1-30 + a2-6 + (if v1-156 + v1-156 + ) + (-> *game-info* current-continue name) + ) + ) + ) + (dotimes (s5-5 11) + (let ((s4-3 (-> this level s5-5))) + (when (or (= (-> s4-3 status) 'active) (= (-> s4-3 status) 'reserved)) + (format + *stdcon* + "~A: ~S ~A~%" + (-> s4-3 name) + (if (-> s4-3 inside-boxes?) + "inside" + ) + (-> s4-3 display?) + ) + (when *display-texture-distances* + (format *stdcon* "~10Htfrag: ~8,,0m" (-> s4-3 closest-object 0)) + (format *stdcon* "~140Hshrub: ~8,,0m" (-> s4-3 closest-object 2)) + (format *stdcon* "~272Halpha: ~8,,0m~%" (-> s4-3 closest-object 3)) + (format *stdcon* "~27Htie: ~8,,0m" (-> s4-3 tie-min-dist)) + (format *stdcon* "~140Hfg-tf: ~8,,0m" (-> s4-3 fg-tfrag-min-dist)) + (format *stdcon* "~270Hfg-pr: ~8,,0m~%" (-> s4-3 fg-prim-min-dist)) + (format *stdcon* "~10Hfg-wa: ~8,,0m" (-> s4-3 fg-warp-min-dist)) + (format *stdcon* "~140Hfg-sh: ~8,,0m" (-> s4-3 fg-shrub-min-dist)) + (format *stdcon* "~267Hfg-p2: ~8,,0m~%" (-> s4-3 fg-prim2-min-dist)) + ) + (when *display-texture-download* + (format + *stdcon* + "~30Htf: ~8D~134Hpr: ~8D~252Hsh: ~8D~370Hhd: ~8D~%" + (-> s4-3 upload-size 0) + (-> s4-3 upload-size 1) + (-> s4-3 upload-size 2) + (-> s4-3 upload-size 8) + ) + (format + *stdcon* + "~30Hal: ~8D~131Hwa: ~8D~252Hsp: ~8D~370Hwp: ~8D~%" + (-> s4-3 upload-size 3) + (-> s4-3 upload-size 4) + (-> s4-3 upload-size 7) + (-> s4-3 upload-size 5) + ) + (format *stdcon* "~30Hp2: ~8D~131Hhf: ~8D~%~1K" (-> s4-3 upload-size 6) (-> s4-3 upload-size 10)) + ) + (if *display-split-box-info* + (debug-print-region-splitbox s4-3 (-> *math-camera* trans) *stdcon*) + ) + ) + ) + ) + ) + (when (and (-> this disk-load-timing?) (-> this load-level)) + (let ((s5-6 format) + (s4-4 *stdcon*) + (s3-3 "~0Kload ~16S ~5S ~5DK ~5,,2fs ~5,,2fs~1K ~5,,0f k/s~%") + (s2-3 (-> this load-level)) + (v1-188 (lookup-level-info (-> this load-level))) + ) + (s5-6 + s4-4 + s3-3 + s2-3 + (if v1-188 + (-> v1-188 nickname) + "" + ) + (shr (-> this load-size) 10) + (-> this load-time) + (-> this load-login-time) + (if (= (-> this load-time) 0.0) + 0 + (* 0.0009765625 (/ (the float (-> this load-size)) (-> this load-time))) + ) + ) + ) + ) + (let ((v1-194 (- #x2000000 (the-as int (-> global current))))) + (if (and (not *debug-segment*) (or (< v1-194 #x4000) (= *cheat-mode* 'debug))) + (format + *stdcon* + "~3Lglobal heap fatally low at ~D.~DK free~%~0L" + (sar v1-194 10) + (/ (logand v1-194 1023) 103) + ) + ) + ) + 0 + (none) + ) + +;; definition (debug) for function show-level +;; WARN: Return type mismatch int vs none. +(defun-debug show-level ((arg0 symbol)) + (set! (-> *setting-control* user-default border-mode) #t) + (let ((s5-0 (new 'stack-no-clear 'array 'symbol 10))) + (set! (-> s5-0 9) #f) + (set! (-> s5-0 8) #f) + (set! (-> s5-0 7) #f) + (set! (-> s5-0 6) #f) + (set! (-> s5-0 5) #f) + (set! (-> s5-0 4) #f) + (set! (-> s5-0 3) #f) + (set! (-> s5-0 2) #f) + (set! (-> s5-0 1) arg0) + (set! (-> s5-0 0) (-> (level-get-target-inside *level*) name)) + (want-levels *load-state* s5-0) + ) + (want-display-level *load-state* arg0 'display) + 0 + (none) + ) + +;; failed to figure out what this is: +(when (zero? (-> *level* level0 art-group)) + (kmemopen global "level-struct") + (let ((gp-0 *level*)) + (set! (-> gp-0 loading-level) (-> gp-0 level-default)) + (dotimes (s5-0 10) + (let ((s4-0 (-> gp-0 level s5-0))) + (set! (-> s4-0 art-group) (new 'global 'load-dir-art-group 100 s4-0)) + (set! (-> s4-0 vis-bits) (malloc 'global 2048)) + (vis-clear s4-0) + (set! (-> s4-0 tfrag-masks) (new 'global 'texture-masks-array 1)) + (set! (-> s4-0 tfrag-dists) (malloc 'global 4)) + (set! (-> s4-0 shrub-masks) (new 'global 'texture-masks-array 1)) + (set! (-> s4-0 shrub-dists) (malloc 'global 4)) + (set! (-> s4-0 alpha-masks) (new 'global 'texture-masks-array 1)) + (set! (-> s4-0 alpha-dists) (malloc 'global 4)) + (set! (-> s4-0 water-masks) (new 'global 'texture-masks-array 1)) + (set! (-> s4-0 water-dists) (malloc 'global 4)) + (clear-mood-context (-> s4-0 mood-context)) + ) + ) + (set! (-> (&-> gp-0 level-default art-group) 0) (new 'global 'load-dir-art-group 512 (-> gp-0 level-default))) + (dotimes (v1-38 11) + (let ((a0-55 (-> gp-0 level v1-38))) + (dotimes (a1-50 11) + (set! (-> a0-55 texture-anim-array a1-50) #f) + (set! (-> a0-55 eye-slot-lowres a1-50) (the-as uint 0)) + (set! (-> a0-55 eye-slot-highres a1-50) (the-as uint 0)) + ) + (set! (-> a0-55 borrow-from-level) #f) + (dotimes (a1-53 5) + (set! (-> a0-55 borrow-level a1-53) #f) + ) + ) + ) + (set! (-> (&-> gp-0 level-default texture-anim-array 9) 0) *sky-texture-anim-array*) + (set! (-> (&-> gp-0 level-default texture-anim-array 1) 0) *darkjak-texture-anim-array*) + (set! (-> (&-> gp-0 level-default texture-anim-array 4) 0) *default-water-texture-anim-array*) + (set! (-> (&-> gp-0 level-default texture-anim-array 5) 0) *default-warp-texture-anim-array*) + (set! (-> (&-> gp-0 level-default draw-priority) 0) 20.0) + (set! (-> (&-> gp-0 level-default info) 0) default-level) + (set! (-> *kernel-context* login-level-index) (-> (&-> gp-0 level-default index) 0)) + (set! *default-level* (-> gp-0 level-default)) + ) + (kmemclose) + ) diff --git a/test/decompiler/reference/jak3/engine/level/region_REF.gc b/test/decompiler/reference/jak3/engine/level/region_REF.gc new file mode 100644 index 0000000000..425cf8bba5 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/level/region_REF.gc @@ -0,0 +1,672 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 8 of type drawable-region-prim +;; WARN: Return type mismatch int vs drawable-region-prim. +(defmethod mem-usage ((this drawable-region-prim) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 51 (-> usage length))) + (set! (-> usage data 50 name) "region") + (+! (-> usage data 50 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 50 used) v1-6) + (+! (-> usage data 50 total) (logand -16 (+ v1-6 15))) + ) + (mem-usage (-> this region) usage (logior flags 128)) + (the-as drawable-region-prim 0) + ) + +;; definition for method 8 of type drawable-inline-array-region-prim +;; WARN: Return type mismatch int vs drawable-inline-array-region-prim. +(defmethod mem-usage ((this drawable-inline-array-region-prim) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 1 (-> usage length))) + (set! (-> usage data 0 name) "drawable-group") + (+! (-> usage data 0 count) 1) + (let ((v1-5 32)) + (+! (-> usage data 0 used) v1-5) + (+! (-> usage data 0 total) (logand -16 (+ v1-5 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this data s3-0) usage flags) + ) + (the-as drawable-inline-array-region-prim 0) + ) + +;; definition for method 10 of type drawable-tree-region-prim +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this drawable-tree-region-prim)) + "Draw the drawable, and typically its children. + This usually means adding stuff to a list to be drawn later, rather than expensive drawing here." + 0 + (none) + ) + +;; definition for method 15 of type drawable-tree-region-prim +(defmethod unpack-vis ((this drawable-tree-region-prim) (arg0 (pointer int8)) (arg1 (pointer int8))) + arg1 + ) + +;; definition for method 16 of type drawable-region-prim +;; WARN: Return type mismatch int vs none. +(defmethod collect-regions ((this drawable-region-prim) (arg0 sphere) (arg1 int) (arg2 region-prim-list)) + "Fill the region-prim-list with regions that intersect the sphere." + (dotimes (s2-0 arg1) + (when (spheres-overlap? arg0 (the-as sphere (-> this bsphere))) + (set! (-> arg2 items (-> arg2 num-items)) this) + (+! (-> arg2 num-items) 1) + ) + (&+! this 32) + ) + 0 + (none) + ) + +;; definition for method 16 of type drawable-inline-array-region-prim +;; WARN: Return type mismatch int vs none. +(defmethod collect-regions ((this drawable-inline-array-region-prim) (arg0 sphere) (arg1 int) (arg2 region-prim-list)) + "Fill the region-prim-list with regions that intersect the sphere." + (collect-regions (the-as drawable-region-prim (-> this data)) arg0 (-> this length) arg2) + 0 + (none) + ) + +;; definition for method 16 of type drawable-tree-region-prim +;; WARN: Return type mismatch int vs none. +(defmethod collect-regions ((this drawable-tree-region-prim) (arg0 sphere) (arg1 int) (arg2 region-prim-list)) + "Fill the region-prim-list with regions that intersect the sphere." + (collect-regions (-> this data2 0) arg0 (-> this length) arg2) + 0 + (none) + ) + +;; definition for method 17 of type drawable-region-prim +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw-region ((this drawable-region-prim) (arg0 int)) + (local-vars (sv-32 vector2h) (sv-36 vector)) + (set! sv-32 (new 'stack 'vector2h)) + (set! sv-36 (-> this bsphere)) + (add-debug-x #t (bucket-id debug-no-zbuf1) sv-36 (new 'static 'rgba :r #xff :g #xff :a #x80)) + (when (nonzero? (-> this region)) + (let ((s5-0 add-debug-text-3d) + (s4-0 #t) + (s3-0 577) + ) + (format (clear *temp-string*) "region-~D~%" (-> this region id)) + (s5-0 s4-0 (the-as bucket-id s3-0) *temp-string* sv-36 (font-color white) sv-32) + ) + (+! (-> sv-32 y) 8) + (let ((s5-1 (-> this region on-enter))) + (when s5-1 + (let ((s4-1 add-debug-text-3d) + (s3-1 #t) + (s2-1 577) + ) + (format (clear *temp-string*) "(on-enter ~S)" s5-1) + (s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* sv-36 (font-color white) sv-32) + ) + (+! (-> sv-32 y) 8) + ) + ) + (let ((s5-2 (-> this region on-inside))) + (when s5-2 + (let ((s4-2 add-debug-text-3d) + (s3-2 #t) + (s2-2 577) + ) + (format (clear *temp-string*) "(on-inside ~S)" s5-2) + (s4-2 s3-2 (the-as bucket-id s2-2) *temp-string* sv-36 (font-color white) sv-32) + ) + (+! (-> sv-32 y) 8) + ) + ) + (let ((gp-1 (-> this region on-exit))) + (when gp-1 + (let ((s5-3 add-debug-text-3d) + (s4-3 #t) + (s3-3 577) + ) + (format (clear *temp-string*) "(on-exit ~S)" gp-1) + (s5-3 s4-3 (the-as bucket-id s3-3) *temp-string* sv-36 (font-color white) sv-32) + ) + (+! (-> sv-32 y) 8) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 18 of type drawable-region-prim +(defmethod track-region ((this drawable-region-prim) (arg0 region-prim-area)) + #f + ) + +;; definition for method 19 of type drawable-region-prim +(defmethod within-area? ((this drawable-region-prim) (arg0 region-prim-area)) + "@returns Whether or not the object overlaps with the provided [[region-prim-area]]'s extent" + #f + ) + +;; definition for method 9 of type region-prim-area +(defmethod track-entered-region! ((this region-prim-area) (arg0 drawable-region-sphere)) + (let ((v1-0 (-> this region-enter-count))) + (let ((a2-0 (-> arg0 region))) + (countdown (a3-0 v1-0) + (if (= (-> this region-enter-list a3-0) a2-0) + (return (the-as int #f)) + ) + ) + (set! (-> this region-enter-list v1-0) a2-0) + ) + (set! (-> this region-enter-prim-list v1-0) arg0) + (set! (-> this region-enter-count) (+ v1-0 1)) + ) + 0 + ) + +;; definition for method 10 of type region-prim-area +(defmethod track-exited-region! ((this region-prim-area) (arg0 drawable-region-sphere)) + (let ((v1-0 (-> this region-exit-count))) + (let ((a2-0 (-> arg0 region))) + (countdown (a3-0 v1-0) + (if (= (-> this region-exit-list a3-0) a2-0) + (return (the-as int #f)) + ) + ) + (set! (-> this region-exit-list v1-0) a2-0) + ) + (set! (-> this region-exit-prim-list v1-0) arg0) + (set! (-> this region-exit-count) (+ v1-0 1)) + ) + 0 + ) + +;; definition for method 11 of type region-prim-area +(defmethod track-inside-region! ((this region-prim-area) (arg0 drawable-region-sphere)) + (let ((v1-0 (-> this region-inside-count))) + (let ((a2-0 (-> arg0 region))) + (countdown (a3-0 v1-0) + (if (= (-> this region-inside-list a3-0) a2-0) + (return (the-as int #f)) + ) + ) + (set! (-> this region-inside-list v1-0) a2-0) + ) + (set! (-> this region-inside-prim-list v1-0) arg0) + (set! (-> this region-inside-count) (+ v1-0 1)) + ) + 0 + ) + +;; definition for method 12 of type region-prim-area +(defmethod track-start-region! ((this region-prim-area) (arg0 drawable-region-sphere)) + (let ((v1-0 (-> this region-start-count))) + (let ((a2-0 (-> arg0 region))) + (countdown (a3-0 v1-0) + (if (= (-> this region-start-list a3-0) a2-0) + (return (the-as int #f)) + ) + ) + (set! (-> this region-start-list v1-0) a2-0) + ) + (set! (-> this region-start-prim-list v1-0) arg0) + (set! (-> this region-start-count) (+ v1-0 1)) + ) + 0 + ) + +;; definition for method 17 of type drawable-region-sphere +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw-region ((this drawable-region-sphere) (arg0 int)) + (let ((t9-0 (method-of-type drawable-region-prim debug-draw-region))) + (t9-0 this arg0) + ) + (let ((a2-0 (-> this bsphere))) + (add-debug-sphere #t (bucket-id debug) a2-0 (-> this bsphere w) (new 'static 'rgba :r #xff :a #x80)) + ) + 0 + (none) + ) + +;; definition for method 18 of type drawable-region-sphere +(defmethod track-region ((this drawable-region-sphere) (arg0 region-prim-area)) + (-> this region) + (let ((s4-0 (-> this bsphere))) + (if (< 0.0 (ray-sphere-intersect (-> arg0 pos) (-> arg0 ray) s4-0 (-> s4-0 w))) + (track-entered-region! arg0 this) + ) + (if (< 0.0 (ray-sphere-intersect (-> arg0 exit-pos) (-> arg0 exit-ray) s4-0 (-> s4-0 w))) + (track-exited-region! arg0 this) + ) + (if (spheres-overlap? (the-as sphere (-> arg0 pos)) (the-as sphere s4-0)) + (track-start-region! arg0 this) + ) + (when (spheres-overlap? (the-as sphere (-> arg0 exit-pos)) (the-as sphere s4-0)) + (track-inside-region! arg0 this) + #t + ) + ) + ) + +;; definition for method 19 of type drawable-region-sphere +(defmethod within-area? ((this drawable-region-sphere) (arg0 region-prim-area)) + "@returns Whether or not the object overlaps with the provided [[region-prim-area]]'s extent" + (spheres-overlap? (the-as sphere (-> arg0 pos)) (the-as sphere (-> this bsphere))) + ) + +;; definition for method 17 of type drawable-region-face +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw-region ((this drawable-region-face) (arg0 int)) + (when (zero? arg0) + (let ((t9-0 (method-of-type drawable-region-prim debug-draw-region))) + (t9-0 this arg0) + ) + ) + (let ((s5-0 (-> this bsphere))) + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + s5-0 + (-> this data normal) + (meters 2) + (new 'static 'rgba :r #xff :g #xff :a #x80) + ) + (add-debug-sphere #t (bucket-id debug) s5-0 (-> this bsphere w) (new 'static 'rgba :r #xff :a #x30)) + ) + (add-debug-bound + (bucket-id debug) + (-> this data points) + (the-as int (-> this data num-points)) + (new 'static 'rgba :r #x80 :g #x80 :a #x40) + (new 'static 'rgba :r #x80 :a #x40) + 0 + ) + 0 + (none) + ) + +;; definition for method 18 of type drawable-region-face +(defmethod track-region ((this drawable-region-face) (arg0 region-prim-area)) + (local-vars (sv-48 vector) (sv-52 vector) (sv-56 (inline-array vector))) + (-> this region) + (let* ((s4-0 (-> this data)) + (v1-1 (-> s4-0 normal)) + (a0-3 (>= 0.0 (- (vector-dot (-> arg0 pos) v1-1) (-> v1-1 w)))) + (s3-0 (>= 0.0 (- (vector-dot (-> arg0 exit-pos) v1-1) (-> v1-1 w)))) + ) + (when (!= a0-3 s3-0) + (when (nonzero? (-> s4-0 num-points)) + (set! sv-48 (new 'stack-no-clear 'vector)) + (set! sv-52 (new 'stack-no-clear 'vector)) + (set! sv-56 (-> s4-0 points)) + (ray-plane-intersect sv-48 sv-52 (-> arg0 pos) (-> arg0 ray) (-> sv-56 0) (-> sv-56 1) (-> sv-56 2)) + (let ((s4-1 (-> s4-0 num-points)) + (s2-0 0) + (s1-0 (vector-negate! (new 'stack-no-clear 'vector) sv-52)) + ) + (while (< (+ s2-0 2) (the-as int s4-1)) + (if (or (point-in-triangle-cross + sv-48 + sv-52 + (-> (the-as (inline-array vector) sv-56) 0) + (-> (the-as (inline-array vector) sv-56) 1) + (-> (the-as (inline-array vector) sv-56) 2) + ) + (point-in-triangle-cross + sv-48 + s1-0 + (-> (the-as (inline-array vector) sv-56) 0) + (-> (the-as (inline-array vector) sv-56) 1) + (-> (the-as (inline-array vector) sv-56) 2) + ) + ) + (goto cfg-17) + ) + (+! s2-0 1) + (set! sv-56 (the-as (inline-array vector) (-> (the-as (inline-array vector) sv-56) 1))) + ) + ) + (set! s3-0 s3-0) + (goto cfg-20) + ) + (label cfg-17) + (if s3-0 + (track-entered-region! arg0 (the-as drawable-region-sphere this)) + (track-exited-region! arg0 (the-as drawable-region-sphere this)) + ) + ) + (label cfg-20) + s3-0 + ) + ) + +;; definition for method 17 of type drawable-region-volume +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw-region ((this drawable-region-volume) (arg0 int)) + (let ((t9-0 (method-of-type drawable-region-prim debug-draw-region))) + (t9-0 this arg0) + ) + (let* ((s5-0 (-> this faces length)) + (s4-0 0) + (a0-3 (-> this faces data s4-0)) + ) + (while (< s4-0 s5-0) + (debug-draw-region a0-3 1) + (+! s4-0 1) + (set! a0-3 (-> this faces data s4-0)) + ) + ) + 0 + (none) + ) + +;; definition for method 18 of type drawable-region-volume +(defmethod track-region ((this drawable-region-volume) (arg0 region-prim-area)) + (if (within-area? this arg0) + (track-start-region! arg0 (the-as drawable-region-sphere this)) + ) + (let* ((s4-0 (-> this faces length)) + (s3-0 0) + (a0-4 (-> this faces data s3-0)) + ) + (while (< s3-0 s4-0) + (if (not (track-region a0-4 arg0)) + (return #f) + ) + (+! s3-0 1) + (set! a0-4 (-> this faces data s3-0)) + ) + ) + (track-inside-region! arg0 (the-as drawable-region-sphere this)) + #t + ) + +;; definition for method 19 of type drawable-region-volume +(defmethod within-area? ((this drawable-region-volume) (arg0 region-prim-area)) + "@returns Whether or not the object overlaps with the provided [[region-prim-area]]'s extent" + (let* ((v1-1 (-> this faces length)) + (a2-0 0) + (a3-2 (-> this faces data a2-0)) + ) + (while (< a2-0 v1-1) + (let ((a3-4 (-> a3-2 data normal))) + (if (< 0.0 (- (vector-dot (-> arg0 pos) a3-4) (-> a3-4 w))) + (return #f) + ) + ) + (+! a2-0 1) + (set! a3-2 (-> this faces data a2-0)) + ) + ) + #t + ) + +;; definition for method 17 of type drawable-tree-region-prim +(defmethod drawable-tree-region-prim-method-17 ((this drawable-tree-region-prim) (arg0 vector)) + (sphere<-vector+r! (the-as sphere (-> (the-as region-prim-area #x70000000) pos)) arg0 0.0) + (let* ((s5-0 (-> this data2 (+ (-> this length) -1) length)) + (s4-0 0) + (a0-8 (the-as object (+ (+ (* s4-0 32) 32) (the-as int (-> this data2 (+ (-> this length) -1)))))) + ) + (while (< s4-0 s5-0) + (if (within-area? (the-as drawable-region-prim a0-8) (the-as region-prim-area (+ #x70000000 0))) + (return #t) + ) + (+! s4-0 1) + (set! a0-8 (+ (+ (* s4-0 32) 32) (the-as int (-> this data2 (+ (-> this length) -1))))) + ) + ) + #f + ) + +;; definition for method 9 of type region +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs symbol. +(defmethod point-in-region-debug! ((this region) (arg0 vector)) + "Debug check to see if point is in region. This is not efficient, since it has to find the parent geometry of this region." + (local-vars (sv-16 int) (sv-32 int)) + (sphere<-vector+r! (the-as sphere (-> (the-as region-prim-area #x70000000) pos)) arg0 0.0) + (dotimes (s5-0 (-> *level* length)) + (let ((s4-0 (-> *level* level s5-0))) + (when (= (-> s4-0 status) 'active) + (when (nonzero? (-> s4-0 bsp region-trees)) + (let* ((s3-0 (-> s4-0 bsp region-trees length)) + (s2-0 0) + (s1-0 (-> s4-0 bsp region-trees s2-0)) + ) + (while (< s2-0 s3-0) + (let ((s0-0 (-> s1-0 data2 (+ (-> s1-0 length) -1) length))) + (set! sv-16 0) + (set! sv-32 (+ (+ (* sv-16 32) 32) (the-as int (-> s1-0 data2 (+ (-> s1-0 length) -1))))) + (while (< sv-16 s0-0) + (if (and (= (-> (the-as drawable-region-prim sv-32) region) this) + (within-area? + (the-as drawable-region-prim sv-32) + (the-as region-prim-area (-> (the-as region-prim-area #x70000000) region-prim-list)) + ) + ) + (return (the-as symbol sv-32)) + ) + (set! sv-16 (+ sv-16 1)) + (set! sv-32 (+ (+ (* sv-16 32) 32) (the-as int (-> s1-0 data2 (+ (-> s1-0 length) -1))))) + ) + ) + (+! s2-0 1) + (set! s1-0 (-> s4-0 bsp region-trees s2-0)) + ) + ) + ) + ) + ) + ) + (the-as symbol #f) + ) + +;; definition for method 18 of type drawable-tree-region-prim +;; WARN: Return type mismatch int vs none. +(defmethod debug-print ((this drawable-tree-region-prim) (arg0 vector) (arg1 object)) + (sphere<-vector+r! (the-as sphere (-> (the-as region-prim-area #x70000000) pos)) arg0 0.0) + (let* ((s4-0 (-> this data2 (+ (-> this length) -1) length)) + (s3-0 0) + (s2-0 (the-as object (+ (+ (* s3-0 32) 32) (the-as int (-> this data2 (+ (-> this length) -1)))))) + ) + (while (< s3-0 s4-0) + (if (within-area? (the-as drawable-region-prim s2-0) (the-as region-prim-area (+ #x70000000 0))) + (format + arg1 + " splitbox-~D ~A~%" + (-> (the-as drawable-region-prim s2-0) id) + (the-as drawable-region-prim s2-0) + ) + ) + (+! s3-0 1) + (set! s2-0 (+ (+ (* s3-0 32) 32) (the-as int (-> this data2 (+ (-> this length) -1))))) + ) + ) + 0 + (none) + ) + +;; definition for function region-tree-execute +;; WARN: Return type mismatch int vs none. +(defun region-tree-execute ((arg0 symbol) (arg1 vector) (arg2 vector)) + (local-vars (sv-32 vector)) + (set! sv-32 (vector-average! (new 'stack-no-clear 'vector) arg1 arg2)) + (set! (-> sv-32 w) (* 0.5 (vector-vector-distance arg1 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)) arg1 0.0) + (sphere<-vector+r! (the-as sphere (-> (the-as region-prim-area #x70000000) exit-pos)) arg2 0.0) + (vector-! (-> (the-as region-prim-area #x70000000) ray) arg2 arg1) + (vector-! (-> (the-as region-prim-area #x70000000) exit-ray) arg1 arg2) + (dotimes (s5-1 (-> *level* length)) + (let ((v1-17 (-> *level* level s5-1))) + (when (= (-> v1-17 status) 'active) + (let ((s4-1 (-> v1-17 bsp region-trees))) + (when (nonzero? s4-1) + (let* ((s3-0 (-> s4-1 length)) + (s2-0 0) + (a0-14 (-> s4-1 s2-0)) + ) + (while (< s2-0 s3-0) + (if (= (-> a0-14 name) arg0) + (collect-regions a0-14 (the-as sphere sv-32) 0 (the-as region-prim-list (+ #x70000000 0))) + ) + (+! s2-0 1) + (set! a0-14 (-> s4-1 s2-0)) + ) + ) + ) + ) + ) + ) + ) + (countdown (gp-1 (-> (the-as region-prim-area #x70000000) region-prim-list num-items)) + (track-region + (-> (the-as region-prim-area (+ (* gp-1 4) #x70000000)) region-prim-list items 0) + (the-as region-prim-area (-> (the-as region-prim-area #x70000000) region-prim-list)) + ) + ) + (let ((gp-2 (-> (the-as region-prim-area #x70000000) region-enter-count))) + (while (begin (label cfg-22) (nonzero? gp-2)) + (+! gp-2 -1) + (let* ((a2-5 (-> (the-as region-prim-area (+ (* gp-2 4) #x70000000)) region-enter-list 0)) + (s5-2 (-> a2-5 on-enter)) + ) + (when s5-2 + (countdown (v1-47 (-> (the-as region-prim-area #x70000000) region-start-count)) + (if (= a2-5 (-> (the-as region-prim-area #x70000000) region-start-list v1-47)) + (goto cfg-22) + ) + ) + (script-eval + s5-2 + :key a2-5 + :vector (-> (the-as region-prim-area (+ (* gp-2 4) #x70000000)) region-enter-prim-list 0 bsphere) + ) + ) + ) + ) + ) + (let ((gp-3 (-> (the-as region-prim-area #x70000000) region-exit-count))) + (while (begin (label cfg-31) (nonzero? gp-3)) + (+! gp-3 -1) + (let* ((a2-6 (-> (the-as region-prim-area (+ (* gp-3 4) #x70000000)) region-exit-list 0)) + (s5-3 (-> a2-6 on-exit)) + ) + (when s5-3 + (countdown (v1-64 (-> (the-as region-prim-area #x70000000) region-inside-count)) + (if (= a2-6 (-> (the-as region-prim-area (+ (* v1-64 4) #x70000000)) region-inside-list 0)) + (goto cfg-31) + ) + ) + (script-eval + s5-3 + :key a2-6 + :vector (-> (the-as region-prim-area (+ (* gp-3 4) #x70000000)) region-exit-prim-list 0 bsphere) + ) + ) + ) + ) + ) + (countdown (gp-4 (-> (the-as region-prim-area #x70000000) region-inside-count)) + (let* ((a2-7 (-> (the-as region-prim-area (+ (* gp-4 4) #x70000000)) region-inside-list 0)) + (s5-4 (-> a2-7 on-inside)) + ) + (if s5-4 + (script-eval + s5-4 + :key a2-7 + :vector (-> (the-as region-prim-area (+ (* gp-4 4) #x70000000)) region-inside-prim-list 0 bsphere) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function region-execute +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun region-execute () + (set! (-> *level* camera-pos 1 quad) (-> *level* camera-pos 0 quad)) + (set! (-> *level* camera-pos 0 quad) (-> (camera-pos) quad)) + (set! (-> *level* target-pos 1 quad) (-> *level* target-pos 0 quad)) + (set! (-> *level* target-pos 0 quad) (-> (target-pos 0) quad)) + (when (and *execute-regions* (-> *setting-control* user-current region-mode) (not (paused?))) + (region-tree-execute 'camera (-> *level* camera-pos 1) (the-as vector (-> *level* camera-pos))) + (region-tree-execute 'target (-> *level* target-pos 1) (the-as vector (-> *level* target-pos))) + ) + 0 + (none) + ) + +;; definition for function region-prim-lookup-by-id +;; WARN: Return type mismatch int vs drawable-region-prim. +(defun region-prim-lookup-by-id ((arg0 int) (arg1 symbol) (arg2 int)) + (let ((v1-0 -1)) + (dotimes (a3-0 (-> *level* length)) + (let ((t0-3 (-> *level* level a3-0))) + (when (= (-> t0-3 status) 'active) + (when (nonzero? (-> t0-3 bsp region-trees)) + (let* ((t1-8 (-> t0-3 bsp region-trees length)) + (t2-1 0) + (t3-2 (-> t0-3 bsp region-trees t2-1)) + ) + (while (< t2-1 t1-8) + (when (or (not arg1) (= (-> t3-2 name) arg1)) + (let* ((t4-10 (-> t3-2 data2 (+ (-> t3-2 length) -1) length)) + (t5-0 0) + (t6-2 (the-as object (+ (+ (* t5-0 32) 32) (the-as int (-> t3-2 data2 (+ (-> t3-2 length) -1)))))) + ) + (while (< t5-0 t4-10) + (when (= (-> (the-as drawable-region-prim t6-2) region id) arg0) + (+! v1-0 1) + (if (= v1-0 arg2) + (return (the-as drawable-region-prim t6-2)) + ) + ) + (+! t5-0 1) + (set! t6-2 (+ (+ (* t5-0 32) 32) (the-as int (-> t3-2 data2 (+ (-> t3-2 length) -1))))) + ) + ) + ) + (+! t2-1 1) + (set! t3-2 (-> t0-3 bsp region-trees t2-1)) + ) + ) + ) + ) + ) + ) + ) + (the-as drawable-region-prim #f) + ) + +;; definition for function region-lookup-by-id +(defun region-lookup-by-id ((arg0 int)) + (dotimes (v1-0 (-> *level* length)) + (let ((a1-3 (-> *level* level v1-0))) + (when (= (-> a1-3 status) 'active) + (when (nonzero? (-> a1-3 bsp region-array)) + (let* ((a2-8 (-> a1-3 bsp region-array length)) + (a3-1 0) + (t0-2 (-> a1-3 bsp region-array data a3-1)) + ) + (while (< a3-1 a2-8) + (if (= (-> t0-2 id) arg0) + (return t0-2) + ) + (+! a3-1 1) + (set! t0-2 (-> a1-3 bsp region-array data a3-1)) + ) + ) + ) + ) + ) + ) + (the-as region #f) + ) diff --git a/test/decompiler/reference/jak3/engine/load/decomp_REF.gc b/test/decompiler/reference/jak3/engine/load/decomp_REF.gc new file mode 100644 index 0000000000..f58bf62e19 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/load/decomp_REF.gc @@ -0,0 +1,525 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function unpack-comp-rle +(defun unpack-comp-rle ((arg0 (pointer int8)) (arg1 (pointer int8))) + "Decompress data compressed with run-length encoding." + (local-vars (v1-2 int) (v1-3 uint)) + (nop!) + (loop + (loop + (set! v1-2 (-> arg1 0)) + (set! arg1 (&-> arg1 1)) + (b! (<= v1-2 0) cfg-5 :delay (nop!)) + (let ((a2-0 (-> arg1 0))) + (set! arg1 (&-> arg1 1)) + (label cfg-3) + (nop!) + (nop!) + (nop!) + (nop!) + (set! (-> arg0 0) a2-0) + ) + (set! arg0 (&-> arg0 1)) + (b! (> v1-2 0) cfg-3 :delay (set! v1-2 (+ v1-2 -1))) + ) + (label cfg-5) + (b! (zero? v1-2) cfg-8 :delay (set! v1-3 (the-as uint (- v1-2)))) + (label cfg-6) + (let ((a2-1 (-> arg1 0))) + (set! arg1 (&-> arg1 1)) + (nop!) + (nop!) + (set! (-> arg0 0) a2-1) + ) + (+! v1-3 -1) + (b! (> (the-as int v1-3) 0) cfg-6 :delay (set! arg0 (&-> arg0 1))) + ) + (label cfg-8) + arg1 + ) + +;; definition of type huf-dictionary-node +(deftype huf-dictionary-node (structure) + ((zero uint16) + (one uint16) + ) + ) + +;; definition for method 3 of type huf-dictionary-node +(defmethod inspect ((this huf-dictionary-node)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'huf-dictionary-node) + (format #t "~1Tzero: ~D~%" (-> this zero)) + (format #t "~1Tone: ~D~%" (-> this one)) + (label cfg-4) + this + ) + +;; definition for function unpack-comp-huf +;; WARN: Return type mismatch int vs none. +(defun unpack-comp-huf ((arg0 (pointer uint8)) (arg1 (pointer uint8)) (arg2 uint) (arg3 huf-dictionary-node)) + "Decompress data compressed with huffman encoding." + (local-vars (t1-1 uint) (t3-2 (pointer uint16))) + (nop!) + (let ((t1-0 (-> arg3 zero)) + (a2-1 (+ arg2 -1028)) + (t2-0 (-> arg3 one)) + ) + (nop!) + (label cfg-1) + (let ((v1-4 128)) + (nop!) + (let ((t0-0 (-> arg1 0))) + (set! arg1 (&-> arg1 1)) + (label cfg-2) + (let ((t3-0 (logand t0-0 v1-4))) + (shift-arith-right-32 v1-4 v1-4 1) + (b! (zero? t3-0) cfg-4 :delay (set! t1-1 t1-0)) + ) + ) + (nop!) + (set! t1-1 t2-0) + (label cfg-4) + (let ((t2-1 (+ t1-1 -256))) + (let ((t3-1 (* t1-1 4))) + (b! (< (the-as int t2-1) 0) cfg-8 :delay (set! t3-2 (the-as (pointer uint16) (+ t3-1 a2-1)))) + ) + (b! (zero? t2-1) cfg-10 :delay (set! t1-0 (-> t3-2 0))) + ) + (b! (nonzero? v1-4) cfg-2 :delay (set! t2-0 (-> t3-2 1))) + (b! #t cfg-1 :delay (nop!)) + (label cfg-8) + (set! (-> arg0 0) t1-1) + (set! arg0 (&-> arg0 1)) + (nop!) + (set! t1-0 (-> arg3 zero)) + (b! (nonzero? v1-4) cfg-2 :delay (set! t2-0 (-> arg3 one))) + ) + ) + (b! #t cfg-1 :delay (nop!)) + (label cfg-10) + (nop!) + (nop!) + 0 + (none) + ) + +;; definition for function unpack-comp-lzo +;; WARN: Return type mismatch int vs none. +(defun unpack-comp-lzo ((arg0 (pointer uint8)) (arg1 (pointer uint8))) + "Decompress data compressed with LZO encoding." + 0 + (let ((v1-1 arg0)) + (b! (>= (the-as uint 17) (-> arg1 0)) cfg-5 :delay #f) + (let ((a2-4 (the-as int (+ (-> arg1 0) -17)))) + (set! arg1 (&-> arg1 1)) + (b! (< a2-4 4) cfg-41) + (until (<= a2-4 0) + (set! (-> arg0 0) (-> arg1 0)) + (set! arg0 (&-> arg0 1)) + (set! arg1 (&-> arg1 1)) + (+! a2-4 -1) + ) + (b! #t cfg-15 :delay (nop!)) + (label cfg-5) + (b! #t cfg-45 :delay (nop!)) + (label cfg-6) + (let ((a2-6 (-> arg1 0))) + (set! arg1 (&-> arg1 1)) + (b! (>= (the-as int a2-6) 16) cfg-18) + (b! (nonzero? a2-6) cfg-12 :delay (empty-form)) + (while (zero? (-> arg1 0)) + (+! a2-6 255) + (set! arg1 (&-> arg1 1)) + ) + (set! a2-6 (+ (-> arg1 0) 15 a2-6)) + (set! arg1 (&-> arg1 1)) + (label cfg-12) + (set! (-> arg0 0) (-> arg1 0)) + (set! (-> arg0 1) (-> arg1 1)) + (set! (-> arg0 2) (-> arg1 2)) + (set! arg0 (&-> arg0 3)) + (set! arg1 (&-> arg1 3)) + (until (<= (the-as int a2-6) 0) + (set! (-> arg0 0) (-> arg1 0)) + (set! arg0 (&-> arg0 1)) + (set! arg1 (&-> arg1 1)) + (+! a2-6 -1) + ) + (label cfg-15) + (set! a2-6 (-> arg1 0)) + (set! arg1 (&-> arg1 1)) + (b! (>= (the-as int a2-6) 16) cfg-18) + (let ((a2-10 (&- (&- (&-> arg0 -2049) (the-as uint (/ (the-as int a2-6) 4))) (the-as uint (* (-> arg1 0) 4))))) + (set! arg1 (&-> arg1 1)) + (set! (-> arg0 0) (-> a2-10 0)) + (set! (-> arg0 1) (-> a2-10 1)) + (set! (-> arg0 2) (-> a2-10 2)) + (set! arg0 (&-> arg0 3)) + (&-> a2-10 2) + ) + (b! #t cfg-39 :delay (nop!)) + (b! #t cfg-43 :delay (nop!)) + (label cfg-18) + (b! (< (the-as int a2-6) 64) cfg-20) + (let ((a3-23 + (&- (&- (&-> arg0 -1) (the-as uint (logand (/ (the-as int a2-6) 4) 7))) (the-as uint (* (-> arg1 0) 8))) + ) + ) + (set! arg1 (&-> arg1 1)) + (let ((a2-13 (+ (/ (the-as int a2-6) 32) -1))) + (b! #t cfg-36 :delay (nop!)) + (label cfg-20) + (b! (< (the-as int a2-6) 32) cfg-27) + (set! a2-13 (logand a2-6 31)) + (b! (nonzero? a2-13) cfg-26 :delay (empty-form)) + (b! #t cfg-24 :delay (nop!)) + (label cfg-23) + (+! a2-13 255) + (set! arg1 (&-> arg1 1)) + (label cfg-24) + (b! (zero? (-> arg1 0)) cfg-23 :delay (nop!)) + (set! a2-13 (+ (-> arg1 0) 31 a2-13)) + (set! arg1 (&-> arg1 1)) + (label cfg-26) + (set! a3-23 (&- (&-> arg0 -1) (the-as uint (+ (shr (-> arg1 0) 2) (* (-> arg1 1) 64))))) + (set! arg1 (&-> arg1 2)) + (b! #t cfg-36 :delay (nop!)) + (label cfg-27) + (b! (< (the-as int a2-6) 16) cfg-35) + (let ((a3-32 (&- arg0 (the-as uint (shl (logand a2-6 8) 11))))) + (set! a2-13 (logand a2-6 7)) + (b! (nonzero? a2-13) cfg-33 :delay (empty-form)) + (b! #t cfg-31 :delay (nop!)) + (label cfg-30) + (+! a2-13 255) + (set! arg1 (&-> arg1 1)) + (label cfg-31) + (b! (zero? (-> arg1 0)) cfg-30 :delay (nop!)) + (set! a2-13 (+ (-> arg1 0) 7 a2-13)) + (set! arg1 (&-> arg1 1)) + (label cfg-33) + (let ((a3-33 (&- a3-32 (the-as uint (+ (shr (-> arg1 0) 2) (* (-> arg1 1) 64)))))) + (set! arg1 (&-> arg1 2)) + (b! (= a3-33 arg0) cfg-47 :delay (nop!)) + (set! a3-23 (&-> a3-33 -16384)) + ) + ) + (b! #t cfg-36 :delay (nop!)) + (label cfg-35) + (let ((a2-16 (&- (&- (&-> arg0 -1) (the-as uint (/ (the-as int a2-6) 4))) (the-as uint (* (-> arg1 0) 4))))) + (set! arg1 (&-> arg1 1)) + (set! (-> arg0 0) (-> a2-16 0)) + (set! (-> arg0 1) (-> a2-16 1)) + (set! arg0 (&-> arg0 2)) + (&-> a2-16 1) + ) + (b! #t cfg-39 :delay (nop!)) + (label cfg-36) + (set! (-> arg0 0) (-> a3-23 0)) + (set! (-> arg0 1) (-> a3-23 1)) + (set! arg0 (&-> arg0 2)) + (let ((a3-39 (&-> a3-23 2))) + (until (<= (the-as int a2-13) 0) + (set! (-> arg0 0) (-> a3-39 0)) + (set! arg0 (&-> arg0 1)) + (set! a3-39 (&-> a3-39 1)) + (+! a2-13 -1) + ) + ) + ) + ) + (label cfg-39) + (set! a2-4 (the-as int (logand (-> arg1 -2) 3))) + (b! (zero? (the-as uint a2-4)) cfg-45 :delay (nop!)) + (until (<= a2-4 0) + (label cfg-41) + (set! (-> arg0 0) (-> arg1 0)) + (set! arg0 (&-> arg0 1)) + (set! arg1 (&-> arg1 1)) + (set! a2-4 (the-as int (+ (the-as uint a2-4) -1))) + ) + (set! a2-6 (-> arg1 0)) + ) + ) + (set! arg1 (&-> arg1 1)) + (label cfg-43) + (b! #t cfg-18 :delay (nop!)) + (label cfg-45) + (b! #t cfg-6 :delay (nop!)) + (label cfg-47) + (&- arg0 (the-as uint v1-1)) + ) + (none) + ) + +;; definition for method 16 of type level +;; INFO: Used lq/sq +(defmethod update-vis! ((this level) (arg0 level-vis-info) (arg1 uint) (arg2 (pointer uint8))) + "Load/decompress precomputed visibility." + (local-vars (t0-3 uint128) (sv-16 int) (sv-32 (pointer int8))) + (let* ((a0-1 (-> arg0 from-bsp current-leaf-idx)) + (v1-1 (-> arg0 current-vis-string)) + (s3-0 (-> arg0 vis-string a0-1)) + ) + 0 + (+ #x70000000 0) + (+ 2048 #x70000000) + (b! (!= v1-1 s3-0) cfg-8 :delay (empty-form)) + (b! (not (logtest? (vis-info-flag loading) (-> arg0 flags))) cfg-6 :delay (empty-form)) + (if (check-busy *ramdisk-rpc*) + (return #f) + ) + (logclear! (-> arg0 flags) (vis-info-flag loading)) + (let ((s3-1 (the-as (pointer integer) (-> this vis-buffer)))) + (b! #t cfg-16 :delay (nop!)) + (label cfg-6) + (return #t) + (label cfg-8) + (when (logtest? (vis-info-flag loading) (-> arg0 flags)) + (if (check-busy *ramdisk-rpc*) + (return #f) + ) + (logclear! (-> arg0 flags) (vis-info-flag loading)) + ) + (set! (-> arg0 current-vis-string) s3-0) + (b! (logtest? (vis-info-flag in-iop) (-> arg0 flags)) cfg-15 :delay (empty-form)) + (set! s3-1 (&+ arg2 s3-0)) + (b! #t cfg-16 :delay (nop!)) + (label cfg-15) + (format 0 "ERROR: ramdisk vis for level ~A, this is not supported~%" (-> this name)) + (let ((v0-1 #f)) + (b! #t cfg-49 :delay (nop!)) + (label cfg-16) + (let ((s2-0 (the-as int (logand (vis-info-flag + dummy0 + dummy1 + dummy2 + dummy3 + dummy4 + dummy5 + dummy6 + dummy7 + dummy8 + dummy9 + dummy10 + dummy11 + dummy12 + dummy13 + dummy14 + dummy15 + dummy16 + dummy17 + dummy18 + dummy19 + dummy20 + dummy21 + dummy22 + dummy23 + dummy24 + dummy25 + dummy26 + dummy27 + dummy28 + ) + (-> arg0 flags) + ) + ) + ) + (s1-0 (&-> (the-as (pointer int8) #x70000000) 0)) + (s0-0 (the-as (pointer int8) (+ 2048 #x70000000))) + (s4-1 (-> this bsp visible-list-length)) + ) + (when (zero? (the-as vis-info-flag s2-0)) + (let ((v1-30 (/ (+ s4-1 15) 16))) + (dotimes (a0-19 v1-30) + (set! (-> (the-as (pointer int128) (&+ s1-0 (* a0-19 16)))) 0) + ) + ) + (mem-copy! s1-0 (the-as (pointer uint8) s3-1) s4-1) + ) + (while (nonzero? s2-0) + (let ((v1-33 (logand s2-0 7))) + (cond + ((= v1-33 1) + (let ((v1-35 (/ (+ s4-1 15) 16))) + (dotimes (a0-23 v1-35) + (set! (-> (the-as (pointer int128) (&+ s1-0 (* a0-23 16)))) 0) + ) + ) + (set! sv-16 (-> this bsp extra-vis-list-length)) + (set! sv-32 (&+ s1-0 (- s4-1 sv-16))) + (let ((v1-45 (unpack-vis (-> this bsp drawable-trees) s1-0 (the-as (pointer int8) s3-1)))) + (dotimes (a0-25 sv-16) + (let ((a1-9 (-> v1-45 0))) + (set! v1-45 (&-> v1-45 1)) + (set! (-> sv-32 0) a1-9) + ) + (set! sv-32 (&-> sv-32 1)) + ) + ) + #f + ) + ((= v1-33 2) + (unpack-comp-rle s1-0 (the-as (pointer int8) s3-1)) + ) + ((= v1-33 3) + (unpack-comp-huf + (the-as (pointer uint8) s1-0) + (the-as (pointer uint8) s3-1) + (-> arg0 dictionary) + (the-as huf-dictionary-node (+ (-> arg0 dictionary) (-> arg0 dictionary-length) -4)) + ) + ) + ((= v1-33 4) + (unpack-comp-lzo (the-as (pointer uint8) s1-0) (the-as (pointer uint8) s3-1)) + ) + ) + ) + (set! s3-1 s1-0) + (set! s1-0 s0-0) + (set! s0-0 (the-as (pointer int8) s3-1)) + (shift-arith-right-32 s2-0 s2-0 3) + ) + (let ((s2-1 (the-as (pointer uint8) s3-1)) + (s1-1 (-> this bsp all-visible-list)) + (v1-51 #f) + ) + (dotimes (s0-1 s4-1) + (when (!= (logand (-> s2-1 0) (-> s1-1 0)) (-> s2-1 0)) + (format #t "ERROR: illegal vis bits set [byte ~X] ~X -> ~X~%" s0-1 (-> s2-1 0) (-> s1-1 0)) + (set! v1-51 #t) + ) + (set! s2-1 (&-> s2-1 1)) + (set! s1-1 (&-> s1-1 1)) + ) + (when v1-51 + (format #t "src = #x~x dest = #x~x ~s ~s~%" s3-1 (-> arg0 vis-bits) (-> arg0 level) (-> arg0 from-level)) + (format #t "leaf-index = ~d~%" (-> arg0 from-bsp current-leaf-idx)) + 0 + ) + ) + (let ((v1-55 s3-1) + (a0-42 (the-as object (-> arg0 vis-bits))) + (a1-22 (the-as (pointer uinteger) (-> this bsp all-visible-list))) + (a2-11 (/ (+ s4-1 15) 16)) + ) + (dotimes (a3-6 a2-11) + (let ((t0-2 (-> (the-as (pointer uint128) v1-55) 0)) + (t1-1 (-> (the-as (pointer uint128) a1-22) 0)) + ) + (.pand t0-3 t0-2 t1-1) + ) + (set! (-> (the-as (pointer uint128) a0-42) 0) t0-3) + (set! a0-42 (+ (the-as uint a0-42) 16)) + (set! v1-55 (&-> (the-as (pointer uint8) v1-55) 16)) + (set! a1-22 (&-> (the-as (pointer uint8) a1-22) 16)) + ) + ) + ) + (set! v0-1 #t) + (label cfg-49) + v0-1 + ) + ) + ) + ) + +;; definition for function pack-comp-rle +;; WARN: Return type mismatch int vs (pointer uint8). +(defun pack-comp-rle ((arg0 (pointer uint8)) (arg1 (pointer uint8)) (arg2 int) (arg3 int)) + "Compress data, used for map mask stuff." + (let ((s4-0 0)) + 0 + (while (and (> arg2 0) (< (+ s4-0 131) arg3)) + (cond + ((= (-> arg1 0) (-> arg1 1)) + (let ((v1-2 (-> arg1 0))) + (set! arg1 (&-> arg1 2)) + (let ((a0-2 2)) + (+! arg2 -2) + (while (> arg2 0) + (cond + ((= v1-2 (-> arg1 0)) + (+! a0-2 1) + (set! arg1 (&-> arg1 1)) + (+! arg2 -1) + (if (>= a0-2 128) + (goto cfg-12) + ) + ) + (else + (goto cfg-12) + ) + ) + ) + (label cfg-12) + (set! (-> arg0 0) (the-as uint (+ a0-2 -1))) + ) + (set! (-> arg0 1) v1-2) + ) + (set! arg0 (&-> arg0 2)) + (+! s4-0 2) + ) + (else + (let ((a0-4 arg1) + (v1-4 1) + ) + (set! arg1 (&-> arg1 1)) + (+! arg2 -1) + (while (< 1 arg2) + (when (and (= (-> arg1 0) (-> arg1 1)) (< 2 arg2)) + (if (= (-> arg1 0) (-> arg1 2)) + (goto cfg-26) + ) + ) + (+! v1-4 1) + (set! arg1 (&-> arg1 1)) + (+! arg2 -1) + (if (>= v1-4 127) + (goto cfg-26) + ) + ) + (label cfg-26) + (when (= arg2 1) + (+! v1-4 1) + (set! arg1 (&-> arg1 1)) + (+! arg2 -1) + ) + (set! (-> arg0 0) (the-as uint (- v1-4))) + (let ((a1-21 (&-> arg0 1)) + (a2-4 (+ s4-0 1)) + ) + (dotimes (t0-0 v1-4) + (set! (-> a1-21 t0-0) (-> a0-4 t0-0)) + ) + (set! arg0 (&+ a1-21 v1-4)) + (set! s4-0 (+ a2-4 v1-4)) + ) + ) + ) + ) + ) + (if (< arg3 (+ s4-0 131)) + (format 0 "(GOMI) Warning: May have run out of bigmap bit mask compression memory~%") + ) + (when (= arg2 1) + (set! (-> arg0 0) (the-as uint -1)) + (set! (-> arg0 1) (-> arg1 0)) + (set! arg0 (&-> arg0 2)) + (+! s4-0 2) + (&-> arg1 1) + ) + (set! (-> arg0 0) (the-as uint 0)) + (&-> arg0 1) + (the-as (pointer uint8) (+ s4-0 1)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/load/load-state_REF.gc b/test/decompiler/reference/jak3/engine/load/load-state_REF.gc new file mode 100644 index 0000000000..d71b99bcda --- /dev/null +++ b/test/decompiler/reference/jak3/engine/load/load-state_REF.gc @@ -0,0 +1,657 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 2 of type level-buffer-state +(defmethod print ((this level-buffer-state)) + (format + #t + "#" + (-> this name) + (-> this display?) + (-> this force-vis?) + (-> this force-inside?) + this + ) + this + ) + +;; definition for method 2 of type level-buffer-state-small +(defmethod print ((this level-buffer-state-small)) + (format #t "#" (-> this name) (-> this display?) this) + this + ) + +;; definition for method 2 of type sound-bank-state +(defmethod print ((this sound-bank-state)) + (let ((t9-0 format) + (a0-1 #t) + (a1-0 "#") + (a2-0 (-> this name)) + (v1-0 (-> this mode)) + ) + (t9-0 + a0-1 + a1-0 + a2-0 + (cond + ((= v1-0 (sound-bank-mode halfa)) + "halfa" + ) + ((= v1-0 (sound-bank-mode halfc)) + "halfc" + ) + ((= v1-0 (sound-bank-mode half)) + "half" + ) + ((= v1-0 (sound-bank-mode full)) + "full" + ) + ((= v1-0 (sound-bank-mode mode)) + "mode" + ) + ((= v1-0 (sound-bank-mode unknown)) + "unknown" + ) + ((= v1-0 (sound-bank-mode common)) + "common" + ) + ((= v1-0 (sound-bank-mode halfb)) + "halfb" + ) + ((= v1-0 (sound-bank-mode none)) + "none" + ) + ((= v1-0 (sound-bank-mode virtual)) + "virtual" + ) + (else + "*unknown*" + ) + ) + this + ) + ) + this + ) + +;; definition for method 9 of type load-state +(defmethod reset! ((this load-state)) + (dotimes (v1-0 10) + (set! (-> this want v1-0 name) #f) + (set! (-> this want v1-0 display?) #f) + (set! (-> this want v1-0 force-vis?) #f) + (set! (-> this want v1-0 force-inside?) #f) + ) + (dotimes (v1-3 3) + (set! (-> this want-sound v1-3 name) #f) + (set! (-> this want-sound v1-3 mode) (sound-bank-mode none)) + ) + (set! (-> this command-list) '()) + (dotimes (v1-7 256) + (set! (-> this object-name v1-7) #f) + (set! (-> this object-status v1-7) (the-as basic 0)) + ) + this + ) + +;; definition for function level-base-level-name +(defun level-base-level-name ((arg0 symbol)) + (when arg0 + (let ((v1-0 (lookup-level-info arg0))) + (if (and v1-0 (-> v1-0 borrow) (-> v1-0 borrow alias)) + (car (-> v1-0 borrow alias)) + ) + ) + ) + ) + +;; definition for method 11 of type load-state +(defmethod want-levels ((this load-state) (arg0 (pointer symbol))) + (dotimes (v1-0 10) + (dotimes (a0-1 10) + (when (= (-> this want v1-0 name) (-> arg0 a0-1)) + (set! (-> arg0 a0-1) #f) + (goto cfg-8) + ) + ) + (set! (-> this want v1-0 name) #f) + (label cfg-8) + ) + (dotimes (s4-0 10) + (when (-> arg0 s4-0) + (dotimes (s3-0 10) + (when (not (-> this want s3-0 name)) + (set! (-> this want s3-0 name) (-> arg0 s4-0)) + (set! (-> this want s3-0 display?) #f) + (set! (-> this want s3-0 force-vis?) #f) + (set! (-> this want s3-0 force-inside?) #f) + (let ((a0-13 (level-base-level-name (-> this want s3-0 name)))) + (dotimes (v1-22 10) + (when (= (-> this want-exp v1-22 name) a0-13) + (set! (-> this want s3-0 display?) (-> this want-exp v1-22 display?)) + (set! (-> this want s3-0 force-vis?) (-> this want-exp v1-22 force-vis?)) + (set! (-> this want s3-0 force-inside?) (-> this want-exp v1-22 force-inside?)) + (goto cfg-21) + ) + ) + ) + (label cfg-21) + (goto cfg-26) + ) + ) + ) + (label cfg-26) + ) + (dotimes (v1-35 10) + (when (not (-> this want v1-35 name)) + (set! (-> this want v1-35 display?) #f) + (set! (-> this want v1-35 force-vis?) #f) + (set! (-> this want v1-35 force-inside?) #f) + ) + ) + (add-borrow-levels this) + 0 + ) + +;; definition for symbol *borrow-city-expansion-list*, type pair +(define *borrow-city-expansion-list* '(#f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f)) + +;; definition for symbol *borrow-city-status-list*, type pair +(define *borrow-city-status-list* '(#f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f #f)) + +;; definition for function borrow-city-expansion +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Return type mismatch pair vs object. +(defun borrow-city-expansion ((arg0 pair)) + (local-vars (v1-12 type) (s2-2 int) (sv-16 pair) (sv-20 symbol) (sv-24 object)) + (let ((gp-0 *borrow-city-expansion-list*)) + 0 + (let ((s4-0 0)) + (b! #t cfg-2 :delay (nop!)) + (label cfg-1) + (set! (car (ref& gp-0 s4-0)) #f) + (set! (car (ref& *borrow-city-status-list* s4-0)) #f) + (+! s4-0 1) + (label cfg-2) + (let ((a0-3 (the-as object gp-0))) + (b! (< s4-0 ((method-of-type (rtype-of (the-as pair a0-3)) length) (the-as pair a0-3))) cfg-1) + ) + ) + (let* ((v1-7 gp-0) + (a0-4 arg0) + (a1-4 (car a0-4)) + ) + (while (not (null? a0-4)) + (set! (car v1-7) a1-4) + (set! v1-7 (cdr v1-7)) + (set! a0-4 (cdr a0-4)) + (set! a1-4 (car a0-4)) + ) + ) + (let ((v1-11 (shr (shl (the-as int arg0) 61) 61))) + (b! (zero? v1-11) cfg-20 :likely-delay (set! v1-12 binteger)) + (b! (= v1-11 4) cfg-20 :likely-delay (set! v1-12 (-> (the-as basic arg0) type))) + (b! (= v1-11 2) cfg-20 :likely-delay (set! v1-12 pair)) + ) + (set! v1-12 symbol) + (label cfg-20) + (let ((s5-1 ((method-of-type v1-12 length) arg0))) + (if (and (nonzero? *city-borrow-manager*) *city-borrow-manager*) + (mark-permanent-holds gp-0) + ) + (dotimes (s4-1 (the-as int (-> *setting-control* user-current borrow-city-count))) + (set! sv-16 (-> *setting-control* user-current borrow-city s4-1)) + (let* ((s3-0 sv-16) + (v1-20 (car s3-0)) + ) + (while (not (null? s3-0)) + (set! sv-20 (the-as symbol #f)) + (set! sv-24 v1-20) + (when sv-24 + (dotimes (s2-0 (/ s5-1 2)) + (when (= sv-24 (ref gp-0 (* s2-0 2))) + (set! sv-20 #t) + (if (= (ref gp-0 (+ (* s2-0 2) 1)) 'auto) + (set! (car (ref& gp-0 (+ (* s2-0 2) 1))) 'faction) + ) + 0 + (goto cfg-37) + ) + ) + (label cfg-37) + (when (not sv-20) + (dotimes (s2-1 (/ s5-1 2)) + (when (= (ref gp-0 (+ (* s2-1 2) 1)) 'auto) + (set! s2-2 s2-1) + (goto cfg-45) + ) + ) + (set! s2-2 -1) + (label cfg-45) + (when (> s2-2 0) + (set! (car (ref& gp-0 (* s2-2 2))) sv-24) + (set! (car (ref& gp-0 (+ (* s2-2 2) 1))) 'faction) + ) + ) + ) + (set! s3-0 (cdr s3-0)) + (set! v1-20 (car s3-0)) + ) + ) + ) + (let ((s4-2 0)) + (dotimes (s3-1 (/ s5-1 2)) + (let ((v1-48 (ref gp-0 (+ (* s3-1 2) 1)))) + (when (not (or (= v1-48 'auto) (= v1-48 'faction))) + (set! (car (ref& *borrow-city-status-list* (* s4-2 2))) (ref gp-0 (* s3-1 2))) + (set! (car (ref& *borrow-city-status-list* (+ (* s4-2 2) 1))) (ref gp-0 (+ (* s3-1 2) 1))) + (+! s4-2 1) + ) + ) + ) + ) + (dotimes (s4-3 (/ s5-1 2)) + (case (ref gp-0 (+ (* s4-3 2) 1)) + (('auto 'faction) + (set! (car (ref& gp-0 (+ (* s4-3 2) 1))) 'special) + ) + ) + ) + ) + gp-0 + ) + ) + +;; definition for function add-want-level +;; WARN: Return type mismatch int vs object. +(defun add-want-level ((arg0 (inline-array level-buffer-state)) + (arg1 (pointer int64)) + (arg2 symbol) + (arg3 symbol) + (arg4 symbol) + (arg5 symbol) + ) + (when arg2 + (let ((s1-0 (lookup-level-info arg2))) + (cond + ((>= (-> arg1 0) 10) + ) + ((and (-> s1-0 borrow) (-> s1-0 borrow alias)) + (let* ((s0-1 (borrow-city-expansion (the-as pair (-> s1-0 borrow alias)))) + (a0-3 (-> s1-0 borrow alias)) + (s1-1 ((method-of-type (rtype-of a0-3) length) a0-3)) + ) + (while (and (> s1-1 0) (car s0-1)) + (when (!= (car s0-1) 'dummy) + (let ((t9-3 add-want-level) + (a0-5 arg0) + (a1-3 arg1) + (a2-1 (car s0-1)) + (a3-1 (car (cdr s0-1))) + ) + (set! a3-1 (cond + ((or (not arg3) (= a3-1 'copy)) + arg3 + ) + (else + (empty) + a3-1 + ) + ) + ) + (t9-3 a0-5 a1-3 (the-as symbol a2-1) (the-as symbol a3-1) arg4 arg5) + ) + ) + (set! s0-1 (cdr (cdr s0-1))) + (+! s1-1 -2) + ) + ) + ) + (else + (set! (-> arg0 (-> arg1 0) name) arg2) + (set! (-> arg0 (-> arg1 0) display?) arg3) + (set! (-> arg0 (-> arg1 0) force-vis?) arg4) + (set! (-> arg0 (-> arg1 0) force-inside?) arg5) + (+! (-> arg1 0) 1) + (when (-> s1-0 borrow) + (dotimes (s0-2 5) + (let ((v1-38 (-> s1-0 borrow borrow-info s0-2))) + (when v1-38 + (let ((t9-4 add-want-level) + (a0-9 arg0) + (a1-4 arg1) + (a2-2 (car v1-38)) + (a3-2 (car (cdr v1-38))) + ) + (set! a3-2 (cond + ((or (not arg3) (= a3-2 'copy)) + arg3 + ) + (else + (empty) + a3-2 + ) + ) + ) + (t9-4 a0-9 a1-4 (the-as symbol a2-2) (the-as symbol a3-2) arg4 arg5) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + ) + +;; definition for method 21 of type load-state +;; WARN: Return type mismatch int vs none. +(defmethod add-borrow-levels ((this load-state)) + (local-vars (sv-16 int)) + (dotimes (s5-0 10) + (let ((a0-1 (-> this want s5-0 name))) + (when a0-1 + (let ((a0-2 (lookup-level-info a0-1))) + (when (= (-> a0-2 memory-mode) (level-memory-mode borrow)) + (set! (-> this want s5-0 name) #f) + (set! (-> this want s5-0 display?) #f) + (set! (-> this want s5-0 force-vis?) #f) + (set! (-> this want s5-0 force-inside?) #f) + ) + ) + ) + ) + ) + (set! sv-16 0) + (dotimes (s5-1 10) + (if (-> this want s5-1 name) + (add-want-level + (-> this want-exp) + (the-as (pointer int64) (& sv-16)) + (-> this want s5-1 name) + (-> this want s5-1 display?) + (-> this want s5-1 force-vis?) + (-> this want s5-1 force-inside?) + ) + ) + ) + (while (< sv-16 10) + (set! (-> this want-exp sv-16 name) #f) + (set! (-> this want-exp sv-16 display?) #f) + (set! (-> this want-exp sv-16 force-vis?) #f) + (set! (-> this want-exp sv-16 force-inside?) #f) + (set! sv-16 (+ sv-16 1)) + ) + (cond + ((-> this update-callback) + ((-> this update-callback) this) + ) + (else + (dotimes (v1-49 10) + (set! (-> this target v1-49 name) (-> this want-exp v1-49 name)) + (set! (-> this target v1-49 display?) (-> this want-exp v1-49 display?)) + (set! (-> this target v1-49 force-vis?) (-> this want-exp v1-49 force-vis?)) + (set! (-> this target v1-49 force-inside?) (-> this want-exp v1-49 force-inside?)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 12 of type load-state +;; WARN: Return type mismatch int vs none. +(defmethod want-sound-banks ((this load-state) (arg0 (pointer symbol))) + (dotimes (v1-0 3) + (dotimes (a2-0 3) + (when (= (-> this want-sound v1-0 name) (-> arg0 a2-0)) + (set! (-> arg0 a2-0) #f) + (goto cfg-8) + ) + ) + (set! (-> this want-sound v1-0 name) #f) + (set! (-> this want-sound v1-0 mode) (sound-bank-mode none)) + 0 + (label cfg-8) + ) + (dotimes (v1-3 3) + (when (-> arg0 v1-3) + (dotimes (a2-15 3) + (when (not (-> this want-sound a2-15 name)) + (set! (-> this want-sound a2-15 name) (-> arg0 v1-3)) + (set! (-> this want-sound a2-15 mode) (sound-bank-mode unknown)) + (goto cfg-19) + ) + ) + ) + (label cfg-19) + ) + 0 + (none) + ) + +;; definition for method 13 of type load-state +(defmethod want-display-level ((this load-state) (arg0 symbol) (arg1 symbol)) + (dotimes (v1-0 10) + (when (= (-> this want v1-0 name) arg0) + (set! (-> this want v1-0 display?) arg1) + (add-borrow-levels this) + (return 0) + ) + ) + (if arg1 + (format 0 "ERROR: can't display ~A because it isn't loaded~%" arg0) + ) + 0 + ) + +;; definition for method 14 of type load-state +;; WARN: Return type mismatch int vs none. +(defmethod want-vis-level ((this load-state) (arg0 symbol)) + (let ((v1-0 (lookup-level-info arg0))) + (if v1-0 + (set! arg0 (-> v1-0 name)) + ) + ) + (set! (-> this vis-nick) arg0) + 0 + (none) + ) + +;; definition for method 15 of type load-state +(defmethod want-force-vis ((this load-state) (arg0 symbol) (arg1 symbol)) + (dotimes (v1-0 10) + (when (= (-> this want v1-0 name) arg0) + (set! (-> this want v1-0 force-vis?) arg1) + (add-borrow-levels this) + (return 0) + ) + ) + (format 0 "ERROR: can't force vis on ~A because it isn't loaded~%" arg0) + 0 + ) + +;; definition for method 16 of type load-state +;; WARN: Return type mismatch int vs none. +;; WARN: Function (method 16 load-state) has a return type of none, but the expression builder found a return statement. +(defmethod want-force-inside ((this load-state) (arg0 symbol) (arg1 symbol)) + (dotimes (v1-0 10) + (when (= (-> this want v1-0 name) arg0) + (set! (-> this want v1-0 force-inside?) arg1) + (add-borrow-levels this) + (return 0) + ) + ) + (format 0 "ERROR: can't force inside on ~A because it isn't loaded~%" arg0) + 0 + (none) + ) + +;; definition for symbol *display-load-commands*, type symbol +(define *display-load-commands* #f) + +;; definition for method 18 of type load-state +(defmethod backup-load-state-and-set-cmds ((this load-state) (arg0 pair)) + (dotimes (s4-0 256) + (when (-> this object-name s4-0) + (format 0 "WARNING: load state somehow aquired object command ~A~%" (-> this object-name s4-0)) + (set! (-> this object-name s4-0) #f) + ) + ) + (mem-copy! (&-> *backup-load-state* type) (&-> this type) 2664) + (set! (-> *backup-load-state* command-list) '()) + (set! (-> this command-list) arg0) + 0 + ) + +;; definition for method 19 of type load-state +(defmethod restore-load-state-and-cleanup ((this load-state)) + (with-pp + (execute-commands-up-to this 100000.0) + (dotimes (gp-0 256) + (when (-> this object-name gp-0) + (let ((a0-3 (entity-by-name (-> this object-name gp-0)))) + (when a0-3 + (set! (-> a0-3 extra perm status) (the-as entity-perm-status (-> this object-status gp-0))) + (if (-> a0-3 extra process) + (kill! a0-3) + ) + ) + ) + (set! (-> this object-name gp-0) #f) + ) + ) + (let ((s5-0 (new 'stack 'load-state)) + (gp-1 (-> *load-state* update-callback)) + ) + (mem-copy! (&-> s5-0 type) (&-> *load-state* type) 2664) + (mem-copy! (&-> this type) (&-> *backup-load-state* type) 2664) + (when (!= (-> pp type) scene-player) + (dotimes (s4-1 10) + (mem-copy! (the-as pointer (-> *load-state* want s4-1)) (the-as pointer (-> s5-0 want s4-1)) 16) + ) + (dotimes (v1-34 3) + (set! (-> *load-state* want-sound v1-34 name) (-> s5-0 want-sound v1-34 name)) + (set! (-> *load-state* want-sound v1-34 mode) (-> s5-0 want-sound v1-34 mode)) + ) + ) + (dotimes (s4-2 10) + (mem-copy! (the-as pointer (-> *load-state* want-exp s4-2)) (the-as pointer (-> s5-0 want-exp s4-2)) 16) + (mem-copy! (the-as pointer (-> *load-state* target s4-2)) (the-as pointer (-> s5-0 target s4-2)) 16) + ) + (dotimes (v1-47 6) + (set! (-> *load-state* want-exp-sound v1-47 name) (-> s5-0 want-exp-sound v1-47 name)) + (set! (-> *load-state* want-exp-sound v1-47 mode) (-> s5-0 want-exp-sound v1-47 mode)) + (set! (-> *load-state* target-sound v1-47 name) (-> s5-0 target-sound v1-47 name)) + (set! (-> *load-state* target-sound v1-47 mode) (-> s5-0 target-sound v1-47 mode)) + ) + (set! (-> *load-state* update-callback) gp-1) + ) + (add-borrow-levels *load-state*) + 0 + ) + ) + +;; definition for method 20 of type load-state +(defmethod restore-load-state ((this load-state)) + (dotimes (v1-0 256) + (if (-> this object-name v1-0) + (set! (-> this object-name v1-0) #f) + ) + ) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'level-buffer-state 10))) + (dotimes (s4-0 10) + ((method-of-type level-buffer-state new) (the-as symbol (-> s5-0 s4-0)) level-buffer-state) + ) + (let ((s4-1 (new 'stack-no-clear 'inline-array 'level-buffer-state 10))) + (dotimes (s3-0 10) + ((method-of-type level-buffer-state new) (the-as symbol (-> s4-1 s3-0)) level-buffer-state) + ) + (let ((s3-1 (-> *load-state* update-callback))) + (dotimes (s2-0 10) + (mem-copy! (the-as pointer (-> s5-0 s2-0)) (the-as pointer (-> *load-state* want-exp s2-0)) 16) + (mem-copy! (the-as pointer (-> s4-1 s2-0)) (the-as pointer (-> *load-state* target s2-0)) 16) + ) + (mem-copy! (&-> this type) (&-> *backup-load-state* type) 2664) + (dotimes (gp-1 10) + (mem-copy! (the-as pointer (-> *load-state* want-exp gp-1)) (the-as pointer (-> s5-0 gp-1)) 16) + (mem-copy! (the-as pointer (-> *load-state* target gp-1)) (the-as pointer (-> s4-1 gp-1)) 16) + ) + (set! (-> *load-state* update-callback) s3-1) + ) + ) + ) + (add-borrow-levels *load-state*) + 0 + ) + +;; definition for method 17 of type load-state +;; WARN: Return type mismatch int vs none. +;; WARN: Function (method 17 load-state) has a return type of none, but the expression builder found a return statement. +(defmethod execute-commands-up-to ((this load-state) (arg0 float)) + (with-pp + (let ((s4-0 (new 'stack 'script-context (process->ppointer pp) pp (the-as vector #f)))) + (set! (-> s4-0 load-state) this) + (while (not (null? (-> this command-list))) + (let ((f0-0 (command-get-float (car (car (-> this command-list))) 0.0)) + (s3-0 (cdr (car (-> this command-list)))) + ) + (if (< arg0 f0-0) + (return #f) + ) + (if *display-load-commands* + (format 0 "NOTICE: ~D: ~f: execute command ~A~%" (current-time) f0-0 s3-0) + ) + (cond + ((pair? (car s3-0)) + (let ((a1-4 (car s3-0))) + (while (not (null? s3-0)) + (eval! s4-0 (the-as pair a1-4)) + (set! s3-0 (cdr s3-0)) + (set! a1-4 (car s3-0)) + ) + ) + ) + (else + (eval! s4-0 s3-0) + ) + ) + ) + (set! (-> this command-list) (cdr (-> this command-list))) + ) + ) + 0 + (none) + ) + ) + +;; failed to figure out what this is: +(kmemopen global "load-state-struct") + +;; definition for symbol *backup-load-state*, type load-state +(define *backup-load-state* (new 'global 'load-state)) + +;; definition (perm) for symbol *load-state*, type load-state +(define-perm *load-state* load-state (new 'global 'load-state)) + +;; failed to figure out what this is: +(kmemclose) + + + + 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 1d5ae3aeb3..f2dfc0622b 100644 --- a/test/decompiler/reference/jak3/engine/math/matrix-compose_REF.gc +++ b/test/decompiler/reference/jak3/engine/math/matrix-compose_REF.gc @@ -12,7 +12,7 @@ ;; definition for function matrix-fu-compose ;; INFO: Used lq/sq -(defun matrix-fu-compose ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 vector)) +(defun matrix-fu-compose ((arg0 matrix) (arg1 vector) (arg2 vector)) (set! (-> arg0 fvec quad) (-> arg1 quad)) (set! (-> arg0 uvec quad) (-> arg2 quad)) (vector-cross! (-> arg0 rvec) arg2 arg1) @@ -21,7 +21,7 @@ ;; definition for function matrix-fr-compose ;; INFO: Used lq/sq -(defun matrix-fr-compose ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 vector)) +(defun matrix-fr-compose ((arg0 matrix) (arg1 vector) (arg2 vector)) (set! (-> arg0 fvec quad) (-> arg1 quad)) (set! (-> arg0 rvec quad) (-> arg2 quad)) (vector-cross! (-> arg0 uvec) arg1 arg2) @@ -39,7 +39,7 @@ ;; definition for function matrix-f-u-compose ;; INFO: Used lq/sq -(defun matrix-f-u-compose ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 vector)) +(defun matrix-f-u-compose ((arg0 matrix) (arg1 vector) (arg2 vector)) (set! (-> arg0 fvec quad) (-> arg1 quad)) (vector-cross! (-> arg0 rvec) arg2 arg1) (vector-normalize! (-> arg0 rvec) 1.0) @@ -49,7 +49,7 @@ ;; definition for function matrix-f-r-compose ;; INFO: Used lq/sq -(defun matrix-f-r-compose ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 vector)) +(defun matrix-f-r-compose ((arg0 matrix) (arg1 vector) (arg2 vector)) (set! (-> arg0 fvec quad) (-> arg1 quad)) (vector-cross! (-> arg0 uvec) arg1 arg2) (vector-normalize! (-> arg0 uvec) 1.0) @@ -59,7 +59,7 @@ ;; definition for function matrix-u-f-compose ;; INFO: Used lq/sq -(defun matrix-u-f-compose ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 vector)) +(defun matrix-u-f-compose ((arg0 matrix) (arg1 vector) (arg2 vector)) (set! (-> arg0 uvec quad) (-> arg1 quad)) (vector-cross! (-> arg0 rvec) arg1 arg2) (vector-normalize! (-> arg0 rvec) 1.0) @@ -99,10 +99,10 @@ ;; definition for function matrix-f-compose ;; INFO: Used lq/sq -(defun matrix-f-compose ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 vector)) +(defun matrix-f-compose ((arg0 matrix) (arg1 vector) (arg2 float)) (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 arg3) + (matrix-f-u-compose arg0 arg1 a2-1) ) arg0 ) @@ -112,7 +112,7 @@ (defun matrix-u-compose ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 vector)) (set! (-> arg0 uvec quad) (-> arg1 quad)) (let ((a2-1 (vector-get-unique! (new 'stack-no-clear 'vector) arg1))) - (matrix-u-f-compose arg0 arg1 a2-1 arg3) + (matrix-u-f-compose arg0 arg1 a2-1) ) arg0 ) @@ -126,7 +126,3 @@ ) arg0 ) - - - - diff --git a/test/decompiler/reference/jak3/engine/math/matrix-h_REF.gc b/test/decompiler/reference/jak3/engine/math/matrix-h_REF.gc index 7dbc7ece49..f32c721c80 100644 --- a/test/decompiler/reference/jak3/engine/math/matrix-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/math/matrix-h_REF.gc @@ -7,12 +7,12 @@ some, but not all, functions assume that a matrix is an affine transform. others assume that the rotation has no scale or shear (and that its inverse is its transpose)." ((data float 16) - (vector vector 4 :overlay-at (-> data 0)) - (quad uint128 4 :overlay-at (-> data 0)) - (rvec vector :inline :overlay-at (-> data 0)) - (uvec vector :inline :overlay-at (-> data 4)) - (fvec vector :inline :overlay-at (-> data 8)) - (trans vector :inline :overlay-at (-> data 12)) + (vector vector 4 :inline :overlay-at (-> data 0)) + (quad uint128 4 :overlay-at (-> data 0)) + (rvec vector :inline :overlay-at (-> data 0)) + (uvec vector :inline :overlay-at (-> data 4)) + (fvec vector :inline :overlay-at (-> data 8)) + (trans vector :inline :overlay-at (-> data 12)) ) (:methods (transform-vectors! (_type_ (inline-array vector) (inline-array vector) int) none) @@ -145,7 +145,3 @@ and how they were originally packed (for example, in tie/shrub)." ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/engine/nav/nav-control-h_REF.gc b/test/decompiler/reference/jak3/engine/nav/nav-control-h_REF.gc index f647b66b17..6443647505 100644 --- a/test/decompiler/reference/jak3/engine/nav/nav-control-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/nav/nav-control-h_REF.gc @@ -117,53 +117,53 @@ (user-position vector :inline :overlay-at virtual-current-pos-local) ) (:methods - (nav-state-method-9 () none) - (nav-state-method-10 () none) - (nav-state-method-11 () none) - (nav-state-method-12 () none) - (nav-state-method-13 () none) - (nav-state-method-14 () none) - (nav-state-method-15 () none) - (nav-state-method-16 () none) - (nav-state-method-17 () none) - (nav-state-method-18 () none) - (nav-state-method-19 () none) - (nav-state-method-20 () none) + (debug-draw (_type_) none) + (nav-state-method-10 (_type_) none) + (plan-over-pat1-polys-using-route (_type_ nav-gap-info) symbol) + (get-velocity (_type_ vector) vector) + (get-travel (_type_ vector) vector) + (get-heading (_type_ vector) vector) + (get-target-pos (_type_ vector) vector) + (get-speed (_type_) meters) + (get-rotation-rate (_type_) float) + (try-projecting-to-current-poly (_type_ vector vector vector) symbol) + (get-current-poly (_type_) nav-poly) + (copy-nav-state! (_type_ (pointer nav-state)) none) (nav-state-method-21 () none) (nav-state-method-22 () none) (nav-state-method-23 () none) - (nav-state-method-24 () none) - (nav-state-method-25 () none) - (nav-state-method-26 () none) - (nav-state-method-27 () none) - (nav-state-method-28 () none) - (nav-state-method-29 () none) - (nav-state-method-30 () none) - (nav-state-method-31 () none) - (nav-state-method-32 () none) - (nav-state-method-33 () none) - (nav-state-method-34 () none) - (nav-state-method-35 () none) - (nav-state-method-36 () none) - (nav-state-method-37 () none) - (nav-state-method-38 () none) - (nav-state-method-39 () none) - (nav-state-method-40 () none) - (nav-state-method-41 () none) - (nav-state-method-42 () none) - (nav-state-method-43 () none) - (nav-state-method-44 () none) - (nav-state-method-45 () none) - (nav-state-method-46 () none) - (nav-state-method-47 () none) - (nav-state-method-48 () none) + (turn-and-navigate-to-destination (_type_) none) + (navigate-using-route-portals-wrapper (_type_) none) + (navigate-using-best-dir-recompute-avoid-spheres-1-wrapper (_type_) none) + (navigate-within-poly-wrapper (_type_) none) + (compute-travel-speed (_type_) none) + (nav-state-method-29 (_type_) none) + (nav-state-method-30 (_type_) none) + (navigate-using-best-dir-recompute-avoid-spheres-2 (_type_) none) + (update-travel-dir-from-spheres (_type_) none) + (compute-speed-simple (_type_) none) + (navigate-v1! (_type_) none) + (reset-target! (_type_) none) + (add-offset-to-target! (_type_ vector) none) + (navigate-v2! (_type_) none) + (set-current-poly! (_type_ nav-poly) none) + (nav-state-method-39 (_type_) symbol) + (do-navigation-to-destination (_type_ vector) none) + (clamp-vector-to-mesh-cross-gaps (_type_ vector) symbol) + (set-target-pos! (_type_ vector) none) + (set-virtual-cur-pos! (_type_ vector) none) + (set-travel! (_type_ vector) none) + (set-velocity! (_type_ vector) none) + (set-heading! (_type_ vector) none) + (set-speed! (_type_ meters) none) + (reset! (_type_ nav-control) none) (nav-state-method-49 () none) - (nav-state-method-50 () none) - (nav-state-method-51 () none) - (nav-state-method-52 () none) - (nav-state-method-53 () none) - (nav-state-method-54 () none) - (nav-state-method-55 () none) + (navigate-using-best-dir-use-existing-avoid-spheres (_type_ nav-avoid-spheres-params) none) + (nav-state-method-51 (_type_) none) + (navigate-using-route-portals (_type_) none) + (navigate-using-best-dir-recompute-avoid-spheres-1 (_type_) none) + (navigate-within-poly (_type_) none) + (clamp-travel-vector (_type_) none) ) ) @@ -278,44 +278,44 @@ (mesh basic :overlay-at (-> state mesh)) ) (:methods - (nav-control-method-9 () none) - (nav-control-method-10 () none) + (debug-draw (_type_) none) + (point-in-bsphere? (_type_ vector) symbol) (find-poly-containing-point-1 (_type_ vector) nav-poly) - (nav-control-method-12 () none) - (nav-control-method-13 () none) - (nav-control-method-14 () none) - (nav-control-method-15 () none) - (nav-control-method-16 () none) - (nav-control-method-17 () none) - (nav-control-method-18 () none) - (nav-control-method-19 () none) - (nav-control-method-20 () none) - (nav-control-method-21 () none) - (nav-control-method-22 () none) - (nav-control-method-23 () none) - (nav-control-method-24 () none) - (nav-control-method-25 () none) - (nav-control-method-26 () none) - (nav-control-method-27 () none) - (nav-control-method-28 () none) - (nav-control-method-29 () none) - (nav-control-method-30 () none) - (nav-control-method-31 () none) - (nav-control-method-32 () none) - (nav-control-method-33 () none) - (nav-control-method-34 () none) - (nav-control-method-35 () none) - (nav-control-method-36 () none) - (nav-control-method-37 () none) - (nav-control-method-38 () none) - (nav-control-method-39 () none) - (nav-control-method-40 () none) - (nav-control-method-41 () none) - (nav-control-method-42 () none) - (nav-control-method-43 () none) + (closest-point-on-mesh (_type_ vector vector nav-poly) nav-poly) + (find-nearest-poly-to-point (_type_ vector) nav-poly) + (project-point-onto-plane-of-poly (_type_ nav-poly vector vector vector) none) + (find-poly-containing-point-2 (_type_ vector) nav-poly) + (is-above-poly-max-height? (_type_ vector float) symbol) + (is-in-mesh? (_type_ vector float) symbol) + (avoid-spheres-1! (_type_ nav-avoid-spheres-params) symbol) + (avoid-spheres-2! (_type_ nav-avoid-spheres-params) symbol) + (clamp-vector-to-mesh-cross-gaps (_type_ vector nav-poly vector float symbol clamp-travel-vector-to-mesh-return-info) none) + (clamp-vector-to-mesh-no-gaps (_type_ vector nav-poly vector clamp-travel-vector-to-mesh-return-info) none) + (find-first-sphere-and-update-avoid-params (_type_ vector nav-avoid-spheres-params) float) + (set-spheres-from-nav-ids (_type_) none) + (add-root-sphere-to-hash! (_type_ vector int) symbol) + (get-max-rotation-rate (_type_) float) + (get-sphere-mask (_type_) uint) + (get-target-speed (_type_) meters) + (enable-extra-sphere! (_type_) none) + (disable-extra-sphere! (_type_) none) + (copy-extra-nav-sphere! (_type_ sphere) none) + (set-extra-nav-sphere-xyz! (_type_ sphere) none) + (set-extra-nav-sphere-radius! (_type_ float) none) + (set-nearest-y-thres! (_type_ float) none) + (set-nav-cull-radius! (_type_ meters) none) + (set-speed-scale! (_type_ float) none) + (set-target-speed! (_type_ meters) none) + (set-acceleration! (_type_ meters) none) + (set-turning-acceleration! (_type_ meters) none) + (set-max-rotation-rate! (_type_ float) none) + (set-sphere-mask! (_type_ uint) none) + (remove! (_type_) none) + (init! (_type_ collide-shape) none) + (display-marks? (_type_) symbol) (nav-control-method-44 () none) - (nav-control-method-45 () none) - (nav-control-method-46 () none) + (find-first-sphere-intersecting-ray (_type_ vector vector vector) sphere) + (find-sphere-ids-from-sphere-hash (_type_ symbol) none) ) ) diff --git a/test/decompiler/reference/jak3/engine/nav/nav-control_REF.gc b/test/decompiler/reference/jak3/engine/nav/nav-control_REF.gc new file mode 100644 index 0000000000..ba3d03c8dd --- /dev/null +++ b/test/decompiler/reference/jak3/engine/nav/nav-control_REF.gc @@ -0,0 +1,3978 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *nav-triangle-test-count*, type int +(define *nav-triangle-test-count* 0) + +;; definition for symbol *nav-last-triangle-test-count*, type int +(define *nav-last-triangle-test-count* 0) + +;; definition for function debug-nav-validate-current-poly +(defun debug-nav-validate-current-poly ((arg0 nav-mesh) (arg1 nav-poly) (arg2 vector)) + (local-vars (sv-32 vector) (sv-36 float)) + (when (not (point-in-poly? arg0 arg1 arg2)) + (set! sv-32 (new 'stack-no-clear 'vector)) + (project-point-into-poly-2d arg0 arg1 sv-32 arg2) + (set! sv-36 (vector-vector-xz-distance arg2 sv-32)) + #f + ) + ) + +;; definition for function debug-report-nav-stats +;; WARN: Return type mismatch int vs none. +(defun debug-report-nav-stats () + 0 + (none) + ) + +;; definition for method 7 of type nav-control +(defmethod relocate ((this nav-control) (offset int)) + (&+! (-> this process) offset) + (&+! (-> this shape) offset) + this + ) + +;; definition for method 41 of type nav-control +;; WARN: Return type mismatch int vs none. +(defmethod remove! ((this nav-control)) + (remove-nav-control (-> this state mesh) this) + 0 + (none) + ) + +;; definition for method 28 of type nav-control +;; WARN: Return type mismatch int vs none. +(defmethod enable-extra-sphere! ((this nav-control)) + (logior! (-> this shape nav-flags) (nav-flags has-extra-sphere)) + 0 + (none) + ) + +;; definition for method 29 of type nav-control +;; WARN: Return type mismatch int vs none. +(defmethod disable-extra-sphere! ((this nav-control)) + (logclear! (-> this shape nav-flags) (nav-flags has-extra-sphere)) + 0 + (none) + ) + +;; definition for method 30 of type nav-control +;; WARN: Return type mismatch int vs none. +(defmethod copy-extra-nav-sphere! ((this nav-control) (arg0 sphere)) + (mem-copy! (the-as pointer (-> this extra-nav-sphere)) (the-as pointer arg0) 16) + 0 + (none) + ) + +;; definition for method 31 of type nav-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod set-extra-nav-sphere-xyz! ((this nav-control) (arg0 sphere)) + (let ((f0-0 (-> this extra-nav-sphere w))) + (set! (-> this extra-nav-sphere quad) (-> arg0 quad)) + (set! (-> this extra-nav-sphere w) f0-0) + ) + 0 + (none) + ) + +;; definition for method 32 of type nav-control +;; WARN: Return type mismatch int vs none. +(defmethod set-extra-nav-sphere-radius! ((this nav-control) (arg0 float)) + (set! (-> this extra-nav-sphere w) arg0) + 0 + (none) + ) + +;; definition for method 33 of type nav-control +;; WARN: Return type mismatch int vs none. +(defmethod set-nearest-y-thres! ((this nav-control) (arg0 float)) + (set! (-> this nearest-y-threshold) arg0) + 0 + (none) + ) + +;; definition for method 34 of type nav-control +;; WARN: Return type mismatch int vs none. +(defmethod set-nav-cull-radius! ((this nav-control) (arg0 meters)) + (set! (-> this nav-cull-radius) arg0) + 0 + (none) + ) + +;; definition for method 35 of type nav-control +;; WARN: Return type mismatch int vs none. +(defmethod set-speed-scale! ((this nav-control) (arg0 float)) + (set! (-> this speed-scale) arg0) + 0 + (none) + ) + +;; definition for method 36 of type nav-control +;; WARN: Return type mismatch int vs none. +(defmethod set-target-speed! ((this nav-control) (arg0 meters)) + (set! (-> this target-speed) arg0) + 0 + (none) + ) + +;; definition for method 27 of type nav-control +(defmethod get-target-speed ((this nav-control)) + (-> this target-speed) + ) + +;; definition for method 37 of type nav-control +;; WARN: Return type mismatch int vs none. +(defmethod set-acceleration! ((this nav-control) (arg0 meters)) + (set! (-> this acceleration) arg0) + 0 + (none) + ) + +;; definition for method 38 of type nav-control +;; WARN: Return type mismatch int vs none. +(defmethod set-turning-acceleration! ((this nav-control) (arg0 meters)) + (set! (-> this turning-acceleration) arg0) + 0 + (none) + ) + +;; definition for method 39 of type nav-control +;; WARN: Return type mismatch int vs none. +(defmethod set-max-rotation-rate! ((this nav-control) (arg0 float)) + (set! (-> this max-rotation-rate) arg0) + 0 + (none) + ) + +;; definition for method 25 of type nav-control +(defmethod get-max-rotation-rate ((this nav-control)) + (-> this max-rotation-rate) + ) + +;; definition for method 40 of type nav-control +;; WARN: Return type mismatch int vs none. +(defmethod set-sphere-mask! ((this nav-control) (arg0 uint)) + (set! (-> this sphere-mask) arg0) + 0 + (none) + ) + +;; definition for method 26 of type nav-control +(defmethod get-sphere-mask ((this nav-control)) + (-> this sphere-mask) + ) + +;; definition for method 10 of type nav-control +(defmethod point-in-bsphere? ((this nav-control) (arg0 vector)) + (let ((v1-1 (-> this state mesh bounds))) + (>= (-> v1-1 r) (vector-vector-distance arg0 v1-1)) + ) + ) + +;; definition for method 43 of type nav-control +(defmethod display-marks? ((this nav-control)) + (and *display-nav-marks* (logtest? (-> this flags) (nav-control-flag display-marks))) + ) + +;; definition for method 42 of type nav-control +;; WARN: Return type mismatch int vs none. +(defmethod init! ((this nav-control) (arg0 collide-shape)) + (set! (-> this callback-info) #f) + (logior! (-> this flags) (nav-control-flag update-heading-from-facing output-sphere-hash)) + (let ((v1-2 this)) + (set! (-> v1-2 sphere-mask) (the-as uint #x1000f8)) + ) + 0 + (set! (-> this sphere-count) 0) + (set! (-> this sphere-array) (the-as (inline-array sphere) #f)) + (set! (-> this shape) arg0) + (set! (-> this process) (-> arg0 process)) + (set! (-> this speed-scale) 1.0) + (set! (-> this acceleration) 4096.0) + (set! (-> this turning-acceleration) 4096.0) + (set! (-> this max-rotation-rate) 131072.0) + (set! (-> this target-speed) 0.0) + (set! (-> this nav-cull-radius) 40960.0) + (reset! (-> this state) this) + 0 + (none) + ) + +;; definition for function get-nav-control +;; WARN: Return type mismatch object vs none. +;; WARN: Function get-nav-control has a return type of none, but the expression builder found a return statement. +(defun get-nav-control ((arg0 process-drawable) (arg1 nav-mesh)) + (if (not arg1) + (set! arg1 (nav-mesh-from-res-tag (-> arg0 entity) 'nav-mesh-actor 0)) + ) + (when (not arg1) + (if (-> arg0 entity) + (logior! (-> arg0 entity extra perm status) (entity-perm-status error)) + ) + (go process-drawable-art-error "no nav-mesh") + (return 0) + ) + (add-process-drawable-to-nav-mesh arg1 arg0 #t) + (none) + ) + +;; definition for method 13 of type nav-control +(defmethod find-nearest-poly-to-point ((this nav-control) (arg0 vector)) + (let ((gp-0 (new 'stack 'nav-find-poly-parms))) + (vector-! (-> gp-0 point) arg0 (the-as vector (-> this state mesh bounds))) + (set! (-> gp-0 y-threshold) (-> this nearest-y-threshold)) + (set! (-> gp-0 ignore) (the-as uint 2)) + (nav-mesh-method-46 (-> this state mesh) (the-as nav-poly gp-0)) + (-> gp-0 poly) + ) + ) + +;; definition for method 14 of type nav-control +;; WARN: Return type mismatch int vs none. +(defmethod project-point-onto-plane-of-poly ((this nav-control) (arg0 nav-poly) (arg1 vector) (arg2 vector) (arg3 vector)) + (project-point-onto-plane-of-poly-local + (-> this state mesh) + arg0 + arg1 + arg2 + (vector-! (new 'stack-no-clear 'vector) arg3 (the-as vector (-> this state mesh bounds))) + ) + (vector+! arg1 arg1 (the-as vector (-> this state mesh bounds))) + 0 + (none) + ) + +;; definition for method 17 of type nav-control +(defmethod is-in-mesh? ((this nav-control) (arg0 vector) (arg1 float)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (vector-! v1-0 arg0 (the-as vector (-> this state mesh bounds))) + (let ((a1-1 (-> this state mesh))) + (is-in-mesh-local? a1-1 v1-0 arg1 (-> this nearest-y-threshold)) + ) + ) + ) + +;; definition for method 9 of type nav-control +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this nav-control)) + (local-vars (sv-32 nav-mesh) (sv-36 vector)) + (when #t + (debug-draw (-> this state mesh)) + (set! sv-32 (-> this state mesh)) + (set! sv-36 (new 'stack-no-clear 'vector)) + (if (logtest? (-> this shape nav-flags) (nav-flags has-root-sphere)) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> this root-nav-sphere) + (-> this root-nav-sphere w) + (new 'static 'rgba :g #xff :b #xff :a #x20) + ) + ) + (if (logtest? (-> this shape nav-flags) (nav-flags has-extra-sphere)) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> this extra-nav-sphere) + (-> this extra-nav-sphere w) + (new 'static 'rgba :g #xff :b #xff :a #x20) + ) + ) + (when (logtest? (-> this shape nav-flags) (nav-flags has-child-spheres)) + ) + (dotimes (s5-0 (-> this sphere-count)) + (let ((v1-23 (-> this state mesh work debug sphere-array s5-0))) + (vector+! sv-36 (the-as vector (-> sv-32 bounds)) (the-as vector v1-23)) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + sv-36 + (- (-> v1-23 r) (-> this shape nav-radius)) + (new 'static 'rgba :g #xff :b #xff :a #x20) + ) + ) + ) + (dotimes (s5-1 (the-as int (-> sv-32 static-sphere-count))) + (let ((s4-0 (-> sv-32 static-sphere s5-1))) + (add-debug-sphere #t (bucket-id debug) s4-0 (-> s4-0 r) *color-blue*) + (let ((s3-0 add-debug-text-3d) + (s2-0 #t) + (s1-0 577) + ) + (format (clear *temp-string*) "~D" s5-1) + (s3-0 s2-0 (the-as bucket-id s1-0) *temp-string* s4-0 (font-color cyan) (the-as vector2h #f)) + ) + ) + ) + (debug-draw (-> this state)) + ) + 0 + (none) + ) + +;; definition for method 11 of type nav-control +(defmethod find-poly-containing-point-1 ((this nav-control) (arg0 vector)) + (let ((v1-0 (new 'stack-no-clear 'nav-poly))) + (vector-! (the-as vector (-> v1-0 vertex)) arg0 (the-as vector (-> this state mesh bounds))) + (set! (-> v1-0 vertex1 x) (-> this nearest-y-threshold)) + (set! (-> v1-0 data 20) (the-as uint 2)) + (nav-mesh-method-45 (-> this state mesh) v1-0) + ) + ) + +;; definition for method 15 of type nav-control +(defmethod find-poly-containing-point-2 ((this nav-control) (arg0 vector)) + (let ((v1-0 (new 'stack-no-clear 'nav-poly))) + (vector-! (the-as vector (-> v1-0 vertex)) arg0 (the-as vector (-> this state mesh bounds))) + (set! (-> v1-0 vertex1 x) (-> this nearest-y-threshold)) + (set! (-> v1-0 data 20) (the-as uint 2)) + (nav-mesh-method-45 (-> this state mesh) v1-0) + ) + ) + +;; definition for method 16 of type nav-control +;; WARN: Return type mismatch object vs symbol. +(defmethod is-above-poly-max-height? ((this nav-control) (arg0 vector) (arg1 float)) + (let ((a1-1 (new 'stack-no-clear 'nav-poly))) + (vector-! (the-as vector (-> a1-1 vertex)) arg0 (the-as vector (-> this state mesh bounds))) + (set! (-> a1-1 vertex1 x) (-> this nearest-y-threshold)) + (set! (-> a1-1 data 20) (the-as uint 2)) + (the-as + symbol + (and (nav-mesh-method-45 (-> this state mesh) a1-1) (< (-> arg0 y) (+ (-> this state mesh bounds y) arg1))) + ) + ) + ) + +;; definition for method 45 of type nav-control +(defmethod find-first-sphere-intersecting-ray ((this nav-control) (arg0 vector) (arg1 vector) (arg2 vector)) + (let ((s5-0 (the-as sphere #f))) + (let ((f30-0 -0.000001)) + (countdown (s1-0 (-> this sphere-count)) + (let* ((s0-0 (-> this sphere-array s1-0)) + (f0-1 (ray-circle-intersect arg0 arg1 s0-0 (-> s0-0 r))) + ) + (when (< f30-0 f0-1) + (set! s5-0 s0-0) + (set! f30-0 f0-1) + ) + ) + ) + (set! (-> arg2 x) f30-0) + ) + s5-0 + ) + ) + +;; definition for function add-nav-sphere +;; WARN: Return type mismatch int vs none. +(defun add-nav-sphere ((arg0 nav-control) (arg1 sphere) (arg2 int)) + (local-vars (a2-4 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (when (< (-> arg0 sphere-count) arg2) + (let ((v1-3 (-> arg0 sphere-array (-> arg0 sphere-count)))) + (let ((a2-3 arg1) + (a3-0 (-> arg0 root-nav-sphere)) + ) + (.lvf vf2 (&-> a2-3 quad)) + (.lvf vf3 (&-> a3-0 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a2-4 vf1) + (let ((f1-0 a2-4) + (f0-1 (+ (-> arg1 r) (-> arg0 shape nav-radius))) + ) + (when (and (< 0.0 f1-0) (let ((f2-3 (+ f0-1 (-> arg0 nav-cull-radius)))) + (< f1-0 (* f2-3 f2-3)) + ) + ) + (vector-! (the-as vector v1-3) (the-as vector arg1) (the-as vector (-> arg0 state mesh bounds))) + (set! (-> v1-3 r) f0-1) + (+! (-> arg0 sphere-count) 1) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for function add-collide-shape-spheres +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun add-collide-shape-spheres ((arg0 nav-control) (arg1 collide-shape) (arg2 sphere)) + (local-vars (a2-6 float) (t0-4 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (when (logtest? (-> arg1 nav-flags) (nav-flags has-root-sphere)) + (set! (-> arg2 quad) (-> arg1 trans quad)) + (set! (-> arg2 r) (-> arg1 nav-radius)) + (let ((v1-4 arg0) + (a3-2 16) + ) + (when (< (-> v1-4 sphere-count) a3-2) + (let ((a3-5 (-> v1-4 sphere-array (-> v1-4 sphere-count)))) + (let ((t0-3 arg2) + (t1-0 (-> v1-4 root-nav-sphere)) + ) + (.lvf vf2 (&-> t0-3 quad)) + (.lvf vf3 (&-> t1-0 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov t0-4 vf1) + (let ((f1-0 t0-4) + (f0-2 (+ (-> arg2 r) (-> v1-4 shape nav-radius))) + ) + (when (and (< 0.0 f1-0) (let ((f2-3 (+ f0-2 (-> v1-4 nav-cull-radius)))) + (< f1-0 (* f2-3 f2-3)) + ) + ) + (vector-! (the-as vector a3-5) (the-as vector arg2) (the-as vector (-> v1-4 state mesh bounds))) + (set! (-> a3-5 r) f0-2) + (+! (-> v1-4 sphere-count) 1) + ) + ) + ) + ) + ) + 0 + ) + (when (logtest? (-> arg1 nav-flags) (nav-flags has-extra-sphere)) + (let ((v1-9 arg0) + (a0-1 (-> arg1 process nav extra-nav-sphere)) + (a1-2 16) + ) + (when (< (-> v1-9 sphere-count) a1-2) + (let ((a1-5 (-> v1-9 sphere-array (-> v1-9 sphere-count)))) + (let ((a2-5 a0-1) + (a3-6 (-> v1-9 root-nav-sphere)) + ) + (.lvf vf2 (&-> a2-5 quad)) + (.lvf vf3 (&-> a3-6 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a2-6 vf1) + (let ((f1-1 a2-6) + (f0-4 (+ (-> a0-1 w) (-> v1-9 shape nav-radius))) + ) + (when (and (< 0.0 f1-1) (let ((f2-9 (+ f0-4 (-> v1-9 nav-cull-radius)))) + (< f1-1 (* f2-9 f2-9)) + ) + ) + (vector-! (the-as vector a1-5) a0-1 (the-as vector (-> v1-9 state mesh bounds))) + (set! (-> a1-5 r) f0-4) + (+! (-> v1-9 sphere-count) 1) + ) + ) + ) + ) + ) + 0 + ) + (none) + ) + ) + +;; definition for method 46 of type nav-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod find-sphere-ids-from-sphere-hash ((this nav-control) (arg0 symbol)) + (let ((s5-0 (new 'stack-no-clear 'find-nav-sphere-ids-params))) + (set! (-> s5-0 bsphere quad) (-> this root-nav-sphere quad)) + (+! (-> s5-0 bsphere r) (-> this nav-cull-radius)) + (set! (-> s5-0 max-len) 16) + (set! (-> s5-0 mask) (-> this sphere-mask)) + (set! (-> s5-0 array) (-> this sphere-id-array)) + (set! (-> s5-0 y-threshold) (-> this nearest-y-threshold)) + (sphere-hash-method-29 (-> this state mesh sphere-hash) s5-0) + (set! (-> this sphere-count) (-> s5-0 len)) + ) + 0 + (none) + ) + +;; definition for method 23 of type nav-control +;; WARN: Return type mismatch int vs none. +(defmethod set-spheres-from-nav-ids ((this nav-control)) + (let ((v1-2 (-> this state mesh sphere-hash sphere-array)) + (a1-0 (-> this sphere-id-array)) + (a2-1 (-> this state mesh bounds)) + (a3-0 (-> this root-nav-sphere)) + (t0-0 (-> this sphere-count)) + ) + (dotimes (t1-0 t0-0) + (let ((t3-0 (-> v1-2 (-> a1-0 t1-0))) + (t2-4 (-> this sphere-array t1-0)) + ) + (vector-! (the-as vector t2-4) (the-as vector t3-0) (the-as vector a2-1)) + (set! (-> t2-4 r) (+ (-> t3-0 r) (-> a3-0 w))) + ) + ) + ) + 0 + (none) + ) + +;; definition of type nav-control-cfs-work +(deftype nav-control-cfs-work (structure) + ((in-dir vector :inline) + (right-dir vector :inline) + (best-dir vector 2 :inline) + (temp-dir vector 2 :inline) + (away-dir vector :inline) + (best-dir-angle degrees 2) + (ignore-mask uint64) + (initial-ignore-mask uint64) + (i-sphere int32) + (i-first-sphere int32) + (i-inside-sphere int32) + (inside-sphere-dist float) + (sign float) + (travel-len float) + (dist2 float) + (inside-dist float) + (rand-angle float) + (dir-update basic) + (debug-offset vector :inline) + ) + ) + +;; definition for method 3 of type nav-control-cfs-work +(defmethod inspect ((this nav-control-cfs-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'nav-control-cfs-work) + (format #t "~1Tin-dir: #~%" (-> this in-dir)) + (format #t "~1Tright-dir: #~%" (-> this right-dir)) + (format #t "~1Tbest-dir[2] @ #x~X~%" (-> this best-dir)) + (format #t "~1Ttemp-dir[2] @ #x~X~%" (-> this temp-dir)) + (format #t "~1Taway-dir: #~%" (-> this away-dir)) + (format #t "~1Tbest-dir-angle[2] @ #x~X~%" (-> this best-dir-angle)) + (format #t "~1Tignore-mask: ~D~%" (-> this ignore-mask)) + (format #t "~1Tinitial-ignore-mask: ~D~%" (-> this initial-ignore-mask)) + (format #t "~1Ti-sphere: ~D~%" (-> this i-sphere)) + (format #t "~1Ti-first-sphere: ~D~%" (-> this i-first-sphere)) + (format #t "~1Ti-inside-sphere: ~D~%" (-> this i-inside-sphere)) + (format #t "~1Tinside-sphere-dist: ~f~%" (-> this inside-sphere-dist)) + (format #t "~1Tsign: ~f~%" (-> this sign)) + (format #t "~1Ttravel-len: ~f~%" (-> this travel-len)) + (format #t "~1Tdist2: ~f~%" (-> this dist2)) + (format #t "~1Tinside-dist: ~f~%" (-> this inside-dist)) + (format #t "~1Trand-angle: ~f~%" (-> this rand-angle)) + (format #t "~1Tdir-update: ~A~%" (-> this dir-update)) + (format #t "~1Tdebug-offset: #~%" (-> this debug-offset)) + (label cfg-4) + this + ) + +;; definition for function circle-tangent-directions +;; INFO: Used lq/sq +(defun circle-tangent-directions ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((t1-0 (new 'stack-no-clear 'vector)) + (t0-0 (new 'stack-no-clear 'vector)) + (v1-0 (new 'stack-no-clear 'vector)) + ) + (vector-! t1-0 arg1 arg0) + (set! (-> t1-0 y) 0.0) + (let ((a0-1 t0-0)) + (let ((t3-2 t1-0)) + (set! (-> a0-1 quad) (-> t3-2 quad)) + ) + (let ((f0-1 1.0)) + (.lvf vf1 (&-> a0-1 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((t2-3 f0-1)) + (.mov vf3 t2-3) + ) + ) + (.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 (&-> a0-1 quad) vf1) + ) + (set! (-> v1-0 quad) (-> t0-0 quad)) + (set! (-> v1-0 x) (-> t0-0 z)) + (set! (-> v1-0 z) (- (-> t0-0 x))) + (let* ((f0-5 (-> arg1 w)) + (f1-1 (vector-dot t0-0 t1-0)) + (f0-6 (fmin f0-5 f1-1)) + (f2-0 f1-1) + (f2-2 (* f2-0 f2-0)) + (f3-0 f0-6) + (f2-4 (sqrtf (- f2-2 (* f3-0 f3-0)))) + (f3-4 (/ 1.0 f1-1)) + (f1-3 (* f2-4 f3-4)) + (f0-7 (* f0-6 f3-4)) + (a0-9 (new 'stack-no-clear 'vector)) + ) + (vector-float*! a0-9 t0-0 f1-3) + (let ((t0-1 arg2)) + (let ((a1-3 a0-9)) + (let ((a2-1 v1-0)) + (let ((t1-1 f0-7)) + (.mov vf7 t1-1) + ) + (.lvf vf5 (&-> a2-1 quad)) + ) + (.lvf vf4 (&-> a1-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 (&-> t0-1 quad) vf6) + ) + (let ((v0-0 arg3)) + (let ((a1-4 (- f0-7))) + (.mov vf7 a1-4) + ) + (.lvf vf5 (&-> v1-0 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 (&-> v0-0 quad) vf6) + v0-0 + ) + ) + ) + ) + ) + +;; definition for function circle-ray-intersection? +(defun circle-ray-intersection? ((arg0 vector) (arg1 vector) (arg2 float) (arg3 vector)) + (let ((f1-1 (- (-> arg3 x) (-> arg0 x))) + (f0-2 (- (-> arg3 z) (-> arg0 z))) + ) + (when (< (fabs (- (* (-> arg1 z) f1-1) (* (-> arg1 x) f0-2))) (-> arg3 w)) + (let ((f2-7 (+ (* (-> arg1 x) f1-1) (* (-> arg1 z) f0-2)))) + (cond + ((< f2-7 0.0) + (let ((f0-5 (+ (* f1-1 f1-1) (* f0-2 f0-2))) + (f1-4 (-> arg3 w)) + ) + (< f0-5 (* f1-4 f1-4)) + ) + ) + ((< arg2 f2-7) + (let* ((f0-8 (- (-> arg3 x) (+ (-> arg0 x) (* (-> arg1 x) arg2)))) + (f1-10 (- (-> arg3 z) (+ (-> arg0 z) (* (-> arg1 z) arg2)))) + (f0-11 (+ (* f0-8 f0-8) (* f1-10 f1-10))) + (f1-13 (-> arg3 w)) + ) + (< f0-11 (* f1-13 f1-13)) + ) + ) + (else + #t + ) + ) + ) + ) + ) + ) + +;; definition for function find-closest-circle-ray-intersection +(defun find-closest-circle-ray-intersection ((arg0 vector) (arg1 vector) (arg2 float) (arg3 int) (arg4 (inline-array vector)) (arg5 int)) + 1.0 + (let ((v0-0 -1)) + (vector-float*! (new 'stack-no-clear 'vector) arg1 arg2) + (let ((v1-3 0)) + (b! #t cfg-18 :delay (nop!)) + (label cfg-1) + (b! (logtest? arg5 (ash 1 v1-3)) cfg-17 :delay (empty-form)) + (let* ((t4-0 arg0) + (t3-1 arg1) + (f0-2 arg2) + (t2-6 (-> arg4 v1-3)) + (f2-1 (- (-> t2-6 x) (-> t4-0 x))) + (f1-2 (- (-> t2-6 z) (-> t4-0 z))) + ) + (b! + (not (when (< (fabs (- (* (-> t3-1 z) f2-1) (* (-> t3-1 x) f1-2))) (-> t2-6 w)) + (let ((f3-7 (+ (* (-> t3-1 x) f2-1) (* (-> t3-1 z) f1-2)))) + (cond + ((< f3-7 0.0) + (let ((f0-5 (+ (* f2-1 f2-1) (* f1-2 f1-2))) + (f1-5 (-> t2-6 w)) + ) + (< f0-5 (* f1-5 f1-5)) + ) + ) + ((< f0-2 f3-7) + (let* ((f1-9 (- (-> t2-6 x) (+ (-> t4-0 x) (* (-> t3-1 x) f0-2)))) + (f2-5 (- (-> t2-6 z) (+ (-> t4-0 z) (* (-> t3-1 z) f0-2)))) + (f0-10 (+ (* f1-9 f1-9) (* f2-5 f2-5))) + (f1-12 (-> t2-6 w)) + ) + (< f0-10 (* f1-12 f1-12)) + ) + ) + (else + #t + ) + ) + ) + ) + ) + cfg-17 + :delay (empty-form) + ) + ) + (set! v0-0 v1-3) + (b! #t cfg-20 :delay (nop!)) + (label cfg-17) + (+! v1-3 1) + (label cfg-18) + (b! (< v1-3 arg3) cfg-1) + ) + (label cfg-20) + v0-0 + ) + ) + +;; definition for function compute-dir-parm +(defun compute-dir-parm ((arg0 vector) (arg1 vector) (arg2 vector)) + (let ((a2-1 (the-as number (vector-dot arg0 arg2))) + (a3-1 #xffffffff80000000) + (v1-2 #x3f800000) + ) + (* (the-as float (logior (logand (the-as uint a2-1) a3-1) v1-2)) (- 1.0 (vector-dot arg0 arg1))) + ) + ) + +;; definition for method 18 of type nav-control +;; INFO: Used lq/sq +(defmethod avoid-spheres-1! ((this nav-control) (arg0 nav-avoid-spheres-params)) + (local-vars (v1-28 int) (a0-29 int) (a1-3 float)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'nav-control-cfs-work))) + (set! (-> s5-0 in-dir quad) (-> arg0 travel quad)) + (set! (-> s5-0 in-dir y) 0.0) + (let ((v1-1 (-> s5-0 in-dir))) + (let ((f0-1 1.0)) + (.lvf vf1 (&-> v1-1 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-4 f0-1)) + (.mov vf3 a0-4) + ) + ) + (.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-1 quad) vf1) + ) + (set! (-> s5-0 travel-len) (vector-dot (-> s5-0 in-dir) (-> arg0 travel))) + (set! (-> s5-0 right-dir quad) (-> s5-0 in-dir quad)) + (set! (-> s5-0 right-dir x) (- (-> s5-0 in-dir z))) + (set! (-> s5-0 right-dir z) (-> s5-0 in-dir x)) + (set! (-> s5-0 best-dir 0 quad) (-> s5-0 in-dir quad)) + (set! (-> s5-0 best-dir 1 quad) (-> s5-0 in-dir quad)) + (set! (-> s5-0 best-dir-angle 0) 0.0) + (set! (-> s5-0 best-dir-angle 1) 0.0) + (set! (-> s5-0 initial-ignore-mask) (the-as uint 0)) + (set! (-> s5-0 i-inside-sphere) -1) + (set! (-> s5-0 inside-sphere-dist) 0.0) + (let ((f0-10 65536.0)) + (set! (-> arg0 closest-sphere-dist2) (* f0-10 f0-10)) + ) + (dotimes (v1-10 (-> this sphere-count)) + (let ((a0-13 (-> this sphere-array v1-10))) + (let ((a1-2 (-> arg0 current-pos)) + (a2-0 a0-13) + ) + (.lvf vf2 (&-> a1-2 quad)) + (.lvf vf3 (&-> a2-0 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a1-3 vf1) + (set! (-> s5-0 dist2) a1-3) + (let ((f0-14 (-> arg0 closest-sphere-dist2)) + (f1-0 (-> s5-0 dist2)) + (f2-0 (-> a0-13 r)) + ) + (set! (-> arg0 closest-sphere-dist2) (fmin f0-14 (- f1-0 (* f2-0 f2-0)))) + ) + (when (< (-> arg0 closest-sphere-dist2) 0.0) + (vector-! (the-as vector (-> s5-0 temp-dir)) (-> arg0 current-pos) (the-as vector a0-13)) + (set! (-> s5-0 temp-dir 0 y) 0.0) + (if (< 0.0 (vector-dot (the-as vector (-> s5-0 temp-dir)) (-> s5-0 in-dir))) + (+! (-> s5-0 initial-ignore-mask) (ash 1 v1-10)) + ) + (set! (-> s5-0 inside-dist) (- (-> a0-13 r) (sqrtf (-> s5-0 dist2)))) + (when (< (-> s5-0 inside-sphere-dist) (-> s5-0 inside-dist)) + (set! (-> s5-0 i-inside-sphere) v1-10) + (set! (-> s5-0 inside-sphere-dist) (-> s5-0 inside-dist)) + ) + ) + ) + ) + (set! (-> s5-0 i-first-sphere) (find-closest-circle-ray-intersection + (-> arg0 current-pos) + (-> s5-0 in-dir) + (-> s5-0 travel-len) + (-> this sphere-count) + (-> this sphere-array) + (the-as int (-> s5-0 initial-ignore-mask)) + ) + ) + (let ((v1-13 -1)) + (b! (!= (-> s5-0 i-first-sphere) v1-13) cfg-13 :delay (empty-form)) + ) + (set! (-> arg0 out-travel 0 quad) (-> arg0 travel quad)) + (set! (-> arg0 out-travel 1 quad) (the-as uint128 0)) + (set! (-> arg0 avoiding-sphere?) #f) + (b! #t cfg-43 :delay (nop!)) + (label cfg-13) + (+! (-> s5-0 initial-ignore-mask) (ash 1 (-> s5-0 i-first-sphere))) + (let ((a1-17 (-> this sphere-array (-> s5-0 i-first-sphere)))) + (circle-tangent-directions + (-> arg0 current-pos) + a1-17 + (the-as vector (-> s5-0 temp-dir)) + (-> s5-0 temp-dir 1) + ) + ) + (dotimes (v1-20 2) + (let ((a0-28 (vector-dot (-> s5-0 right-dir) (-> s5-0 temp-dir v1-20)))) + (shift-arith-right-32 a0-29 a0-28 31) + ) + (let ((a0-30 (logand a0-29 1)) + (f0-27 (- 1.0 (vector-dot (-> s5-0 in-dir) (-> s5-0 temp-dir v1-20)))) + ) + (set! (-> s5-0 best-dir a0-30 quad) (-> s5-0 temp-dir v1-20 quad)) + (set! (-> s5-0 best-dir-angle a0-30) f0-27) + ) + ) + 0 + (set! (-> s5-0 sign) 1.0) + (let ((s3-0 0)) + (b! #t cfg-34 :delay (nop!)) + (label cfg-20) + (-> s5-0 i-first-sphere) + (set! (-> s5-0 dir-update) (the-as basic #t)) + (set! (-> s5-0 ignore-mask) (-> s5-0 initial-ignore-mask)) + (b! #t cfg-30 :delay (nop!)) + (label cfg-21) + (+! (-> s5-0 ignore-mask) (ash 1 v1-28)) + (circle-tangent-directions + (-> arg0 current-pos) + (-> this sphere-array v1-28) + (the-as vector (-> s5-0 temp-dir)) + (-> s5-0 temp-dir 1) + ) + (set! (-> s5-0 dir-update) #f) + (dotimes (v1-30 2) + (let* ((f0-29 (-> s5-0 sign)) + (a1-31 (-> s5-0 temp-dir v1-30)) + (a0-39 (-> s5-0 in-dir)) + (a2-14 (-> s5-0 right-dir)) + (a3-7 (the-as number (vector-dot a1-31 a2-14))) + (t0-1 #xffffffff80000000) + (a2-16 #x3f800000) + (f0-30 (* f0-29 (* (the-as float (logior (logand (the-as uint a3-7) (the-as uint t0-1)) a2-16)) + (- 1.0 (vector-dot a1-31 a0-39)) + ) + ) + ) + ) + (when (< (-> s5-0 best-dir-angle s3-0) f0-30) + (set! (-> s5-0 best-dir s3-0 quad) (-> s5-0 temp-dir v1-30 quad)) + (set! (-> s5-0 best-dir-angle s3-0) f0-30) + (set! (-> s5-0 dir-update) (the-as basic #t)) + ) + ) + ) + (label cfg-30) + (when (-> s5-0 dir-update) + (set! v1-28 (find-closest-circle-ray-intersection + (-> arg0 current-pos) + (-> s5-0 best-dir s3-0) + (-> s5-0 travel-len) + (-> this sphere-count) + (-> this sphere-array) + (the-as int (-> s5-0 ignore-mask)) + ) + ) + (b! (!= v1-28 -1) cfg-21 :delay (nop!)) + ) + (set! (-> s5-0 sign) (* -1.0 (-> s5-0 sign))) + (+! s3-0 1) + (label cfg-34) + (b! (< s3-0 2) cfg-20) + ) + (when (!= (-> s5-0 i-inside-sphere) -1) + (let ((s4-1 (-> this sphere-array (-> s5-0 i-inside-sphere)))) + (vector-! (-> s5-0 away-dir) (-> arg0 current-pos) (the-as vector s4-1)) + (set! (-> s5-0 away-dir y) 0.0) + (when (>= 40.96 (vector-length (-> s5-0 away-dir))) + (set! (-> s5-0 rand-angle) (* 65536.0 (rand-vu))) + (set! (-> s5-0 away-dir x) (cos (-> s5-0 rand-angle))) + (set! (-> s5-0 away-dir z) (sin (-> s5-0 rand-angle))) + ) + (let ((v1-51 (-> s5-0 away-dir))) + (let ((f0-42 1.0)) + (.lvf vf1 (&-> v1-51 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-60 f0-42)) + (.mov vf3 a0-60) + ) + ) + (.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-51 quad) vf1) + ) + (let ((f0-44 (/ (-> s5-0 inside-sphere-dist) (-> s4-1 r)))) + (let ((v1-52 (-> s5-0 best-dir))) + (let ((a0-61 (-> s5-0 best-dir)) + (a1-39 (-> s5-0 away-dir)) + (f1-19 f0-44) + ) + (.lvf vf1 (&-> a0-61 0 quad)) + (.lvf vf2 (&-> a1-39 quad)) + (let ((a0-62 f1-19)) + (.mov vf4 a0-62) + ) + ) + (.add.x.vf vf3 vf0 vf0 :mask #b1000) + (.sub.vf vf2 vf2 vf1) + (.mul.x.vf vf2 vf2 vf4) + (.add.vf vf3 vf1 vf2 :mask #b111) + (.svf (&-> v1-52 0 quad) vf3) + ) + (let ((v1-53 (-> s5-0 best-dir 1))) + (let ((a0-63 (-> s5-0 best-dir 1)) + (a1-40 (-> s5-0 away-dir)) + ) + (.lvf vf1 (&-> a0-63 quad)) + (.lvf vf2 (&-> a1-40 quad)) + ) + (let ((a0-64 f0-44)) + (.mov vf4 a0-64) + ) + (.add.x.vf vf3 vf0 vf0 :mask #b1000) + (.sub.vf vf2 vf2 vf1) + (.mul.x.vf vf2 vf2 vf4) + (.add.vf vf3 vf1 vf2 :mask #b111) + (.svf (&-> v1-53 quad) vf3) + ) + ) + ) + (let ((v1-54 (-> s5-0 best-dir))) + (let ((f0-45 1.0)) + (.lvf vf1 (&-> v1-54 0 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-66 f0-45)) + (.mov vf3 a0-66) + ) + ) + (.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-54 0 quad) vf1) + ) + (let ((v1-55 (-> s5-0 best-dir 1))) + (let ((f0-46 1.0)) + (.lvf vf1 (&-> v1-55 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-68 f0-46)) + (.mov vf3 a0-68) + ) + ) + (.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-55 quad) vf1) + ) + ) + (vector-dot (-> s5-0 in-dir) (the-as vector (-> s5-0 best-dir))) + (vector-dot (-> s5-0 in-dir) (-> s5-0 best-dir 1)) + (let* ((f0-52 (vector-dot (-> arg0 pref-dir) (the-as vector (-> s5-0 best-dir)))) + (a1-41 (if (< (vector-dot (-> arg0 pref-dir) (-> s5-0 best-dir 1)) f0-52) + 0 + 1 + ) + ) + (v1-65 (- 1 a1-41)) + ) + (vector-float*! (the-as vector (-> arg0 out-travel)) (-> s5-0 best-dir a1-41) (-> s5-0 travel-len)) + (vector-float*! (-> arg0 out-travel 1) (-> s5-0 best-dir v1-65) (-> s5-0 travel-len)) + ) + ) + 0 + (set! (-> arg0 avoiding-sphere?) #t) + (label cfg-43) + (-> arg0 avoiding-sphere?) + ) + ) + +;; definition for method 19 of type nav-control +;; INFO: Used lq/sq +(defmethod avoid-spheres-2! ((this nav-control) (arg0 nav-avoid-spheres-params)) + (local-vars (a0-32 int) (a1-3 float)) + (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 (new 'stack-no-clear 'nav-control-cfs-work))) + (set! (-> s5-0 in-dir quad) (-> arg0 travel quad)) + (set! (-> s5-0 in-dir y) 0.0) + (let ((v1-1 (-> s5-0 in-dir))) + (let ((f0-1 1.0)) + (.lvf vf1 (&-> v1-1 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-4 f0-1)) + (.mov vf3 a0-4) + ) + ) + (.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-1 quad) vf1) + ) + (set! (-> s5-0 travel-len) (vector-dot (-> s5-0 in-dir) (-> arg0 travel))) + (set! (-> s5-0 right-dir quad) (-> s5-0 in-dir quad)) + (set! (-> s5-0 right-dir x) (- (-> s5-0 in-dir z))) + (set! (-> s5-0 right-dir z) (-> s5-0 in-dir x)) + (set! (-> s5-0 best-dir 0 quad) (-> s5-0 in-dir quad)) + (set! (-> s5-0 best-dir 1 quad) (-> s5-0 in-dir quad)) + (set! (-> s5-0 best-dir-angle 0) 0.0) + (set! (-> s5-0 best-dir-angle 1) 0.0) + (set! (-> s5-0 initial-ignore-mask) (the-as uint 0)) + (let ((f0-9 65536.0)) + (set! (-> arg0 closest-sphere-dist2) (* f0-9 f0-9)) + ) + (dotimes (v1-9 (-> this sphere-count)) + (let ((a0-13 (-> this sphere-array v1-9))) + (let ((a1-2 (-> arg0 current-pos)) + (a2-0 a0-13) + ) + (.lvf vf2 (&-> a1-2 quad)) + (.lvf vf3 (&-> a2-0 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a1-3 vf1) + (set! (-> s5-0 dist2) a1-3) + (let ((f0-13 (-> arg0 closest-sphere-dist2)) + (f1-0 (-> s5-0 dist2)) + (f2-0 (-> a0-13 r)) + ) + (set! (-> arg0 closest-sphere-dist2) (fmin f0-13 (- f1-0 (* f2-0 f2-0)))) + ) + (when (< (-> arg0 closest-sphere-dist2) 0.0) + (vector-! (the-as vector (-> s5-0 temp-dir)) (-> arg0 current-pos) (the-as vector a0-13)) + (set! (-> s5-0 temp-dir 0 y) 0.0) + (if (< 0.0 (vector-dot (the-as vector (-> s5-0 temp-dir)) (-> s5-0 in-dir))) + (+! (-> s5-0 initial-ignore-mask) (ash 1 v1-9)) + ) + ) + ) + ) + (set! (-> s5-0 i-first-sphere) (find-closest-circle-ray-intersection + (-> arg0 current-pos) + (-> s5-0 in-dir) + (-> s5-0 travel-len) + (-> this sphere-count) + (-> this sphere-array) + (the-as int (-> s5-0 initial-ignore-mask)) + ) + ) + (let ((v1-12 -1)) + (b! (!= (-> s5-0 i-first-sphere) v1-12) cfg-11 :delay (empty-form)) + ) + (set! (-> arg0 out-travel 0 quad) (-> arg0 travel quad)) + (set! (-> arg0 out-travel 1 quad) (the-as uint128 0)) + (set! (-> arg0 avoiding-sphere?) #f) + (b! #t cfg-21 :delay (nop!)) + (label cfg-11) + (+! (-> s5-0 initial-ignore-mask) (ash 1 (-> s5-0 i-first-sphere))) + (let ((a1-15 (-> this sphere-array (-> s5-0 i-first-sphere)))) + (circle-tangent-directions + (-> arg0 current-pos) + a1-15 + (the-as vector (-> s5-0 temp-dir)) + (-> s5-0 temp-dir 1) + ) + ) + (dotimes (v1-19 2) + (let ((a0-31 (vector-dot (-> s5-0 right-dir) (-> s5-0 temp-dir v1-19)))) + (shift-arith-right-32 a0-32 a0-31 31) + ) + (let ((a0-33 (logand a0-32 1)) + (f0-22 (- 1.0 (vector-dot (-> s5-0 in-dir) (-> s5-0 temp-dir v1-19)))) + ) + (set! (-> s5-0 best-dir a0-33 quad) (-> s5-0 temp-dir v1-19 quad)) + (set! (-> s5-0 best-dir-angle a0-33) f0-22) + ) + ) + 0 + (vector-dot (-> s5-0 in-dir) (the-as vector (-> s5-0 best-dir))) + (vector-dot (-> s5-0 in-dir) (-> s5-0 best-dir 1)) + (let* ((f0-28 (vector-dot (-> arg0 pref-dir) (the-as vector (-> s5-0 best-dir)))) + (a1-25 (if (< (vector-dot (-> arg0 pref-dir) (-> s5-0 best-dir 1)) f0-28) + 0 + 1 + ) + ) + (v1-32 (- 1 a1-25)) + ) + (vector-float*! (the-as vector (-> arg0 out-travel)) (-> s5-0 best-dir a1-25) (-> s5-0 travel-len)) + (vector-float*! (-> arg0 out-travel 1) (-> s5-0 best-dir v1-32) (-> s5-0 travel-len)) + ) + ) + 0 + (set! (-> arg0 avoiding-sphere?) #t) + (label cfg-21) + (-> arg0 avoiding-sphere?) + ) + ) + +;; definition for method 21 of type nav-control +;; WARN: Return type mismatch int vs none. +(defmethod clamp-vector-to-mesh-no-gaps ((this nav-control) + (arg0 vector) + (arg1 nav-poly) + (arg2 vector) + (arg3 clamp-travel-vector-to-mesh-return-info) + ) + (clamp-vector-to-mesh-no-gaps (-> this state mesh) arg0 arg1 arg2 arg3) + 0 + (none) + ) + +;; definition for method 21 of type nav-mesh +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod clamp-vector-to-mesh-no-gaps ((this nav-mesh) (arg0 vector) (arg1 nav-poly) (arg2 vector) (arg3 clamp-travel-vector-to-mesh-return-info)) + (local-vars + (v1-12 symbol) + (sv-112 nav-ray) + (sv-116 vector) + (sv-120 symbol) + (sv-124 nav-mesh-work) + (sv-128 int) + (sv-136 int) + (sv-144 nav-mesh-work) + (sv-148 nav-poly) + (sv-152 uint) + (sv-156 (pointer int8)) + (sv-160 (pointer int8)) + (sv-164 float) + (sv-168 float) + (sv-172 vector) + (sv-176 vector) + (sv-180 float) + (sv-184 float) + (sv-188 uint) + (sv-192 vector) + (sv-196 vector) + (sv-200 float) + (sv-204 float) + (sv-208 float) + (sv-212 float) + ) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (set! (-> arg3 found-boundary) #f) + (set! (-> arg3 gap-poly) #f) + (set! sv-112 (new 'stack-no-clear 'nav-ray)) + (set! sv-116 (new 'stack-no-clear 'vector)) + (set! sv-120 (the-as symbol #f)) + (set! sv-124 (-> this work)) + (vector-! sv-116 arg0 (the-as vector (-> this bounds))) + (set! (-> sv-112 current-poly) arg1) + (set! (-> sv-112 current-pos quad) (-> sv-116 quad)) + (vector+! (-> sv-112 dest-pos) sv-116 arg2) + (let* ((t2-0 this) + (v1-11 (-> sv-112 dest-pos)) + (a1-4 (-> arg1 vertex-count)) + (a2-1 (-> arg1 vertex)) + (t1-4 (-> t2-0 work vert0-table)) + (t2-2 (-> t2-0 work vert1-table)) + ) + (dotimes (t3-0 (the-as int a1-4)) + (let* ((t4-3 (-> a2-1 (-> t1-4 t3-0))) + (t5-3 (-> a2-1 (-> t2-2 t3-0))) + (f0-1 (- (-> t4-3 z) (-> t5-3 z))) + (f1-2 (- (-> t5-3 x) (-> t4-3 x))) + (f2-2 (- (-> v1-11 x) (-> t4-3 x))) + (f3-2 (- (-> v1-11 z) (-> t4-3 z))) + (f0-3 (+ (* f2-2 f0-1) (* f3-2 f1-2))) + ) + (when (< 0.0 f0-3) + (set! v1-12 #f) + (goto cfg-7) + ) + ) + ) + ) + (set! v1-12 #t) + (label cfg-7) + (b! v1-12 cfg-41 :delay (nop!)) + (set! sv-128 0) + (let ((v1-16 sv-112)) + (vector-! (-> v1-16 dir) (-> v1-16 dest-pos) (-> v1-16 current-pos)) + (set! (-> v1-16 dir y) 0.0) + (let ((a1-6 (-> v1-16 dir))) + (let ((f0-5 1.0)) + (.lvf vf1 (&-> a1-6 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a2-4 f0-5)) + (.mov vf3 a2-4) + ) + ) + (.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-6 quad) vf1) + ) + (set! (-> v1-16 next-poly) #f) + (set! (-> v1-16 len) 0.0) + (set! (-> v1-16 last-edge) -1) + (set! (-> v1-16 terminated) #f) + (set! (-> v1-16 reached-dest) #f) + (set! (-> v1-16 hit-boundary) #f) + (set! (-> v1-16 hit-gap) #f) + (set! (-> v1-16 ignore) (the-as uint 3)) + ) + 0 + (until (or (>= sv-128 15) (-> sv-112 terminated)) + (set! sv-128 (+ sv-128 1)) + (let ((a1-9 this) + (v1-20 sv-112) + ) + (set! sv-136 -1) + (set! sv-144 (-> a1-9 work)) + (set! sv-148 (-> v1-20 current-poly)) + (set! sv-152 (-> v1-20 current-poly vertex-count)) + (set! sv-156 (-> a1-9 work vert0-table)) + (set! sv-160 (-> a1-9 work vert1-table)) + (set! sv-164 (- (-> v1-20 dest-pos x) (-> v1-20 current-pos x))) + (set! sv-168 (- (-> v1-20 dest-pos z) (-> v1-20 current-pos z))) + (dotimes (a2-14 (the-as int sv-152)) + (set! sv-172 (-> sv-148 vertex (-> sv-156 a2-14))) + (set! sv-176 (-> sv-148 vertex (-> sv-160 a2-14))) + (set! sv-180 (- (-> sv-172 z) (-> sv-176 z))) + (set! sv-184 (- (-> sv-176 x) (-> sv-172 x))) + (let ((f0-17 (+ (* sv-164 sv-180) (* sv-168 sv-184)))) + (when (< 0.0 f0-17) + (let ((f1-15 (+ (* sv-180 (- (-> sv-172 x) (-> v1-20 current-pos x))) + (* sv-184 (- (-> sv-172 z) (-> v1-20 current-pos z))) + ) + ) + ) + (when (< f1-15 f0-17) + (set! sv-136 a2-14) + (let ((f0-19 (fmax 0.0 (/ f1-15 f0-17)))) + (set! sv-164 (* sv-164 f0-19)) + (set! sv-168 (* sv-168 f0-19)) + ) + ) + ) + ) + ) + ) + (let ((f0-23 (+ (* sv-164 (-> v1-20 dir x)) (* sv-168 (-> v1-20 dir z))))) + (+! (-> v1-20 len) f0-23) + ) + 0 + (set! (-> v1-20 next-poly) #f) + (cond + ((= sv-136 -1) + (set! (-> v1-20 current-pos quad) (-> v1-20 dest-pos quad)) + (set! (-> v1-20 reached-dest) #t) + (set! (-> v1-20 terminated) #t) + ) + (else + (+! (-> v1-20 current-pos x) sv-164) + (+! (-> v1-20 current-pos z) sv-168) + (set! sv-188 (-> sv-148 adj-poly sv-136)) + (if (!= sv-188 255) + (set! (-> v1-20 next-poly) (-> a1-9 poly-array sv-188)) + ) + (cond + ((and (-> v1-20 next-poly) (not (logtest? (-> v1-20 next-poly pat) (-> v1-20 ignore)))) + (set! (-> v1-20 current-poly) (-> v1-20 next-poly)) + ) + (else + (set! (-> v1-20 last-edge) sv-136) + (if (-> v1-20 next-poly) + (set! (-> v1-20 hit-gap) #t) + (set! (-> v1-20 hit-boundary) #t) + ) + (set! (-> v1-20 terminated) #t) + ) + ) + ) + ) + ) + 0 + ) + (cond + ((or (-> sv-112 hit-boundary) (-> sv-112 hit-gap)) + (set! sv-192 (-> sv-112 current-poly vertex (-> sv-124 vert0-table (-> sv-112 last-edge)))) + (set! sv-196 (-> sv-112 current-poly vertex (-> sv-124 vert1-table (-> sv-112 last-edge)))) + (set! sv-200 (- (-> sv-192 z) (-> sv-196 z))) + (set! sv-204 (- (-> sv-196 x) (-> sv-192 x))) + (set! sv-208 (-> arg2 x)) + (set! sv-212 (-> arg2 z)) + (let* ((f0-35 sv-200) + (f0-37 (* f0-35 f0-35)) + (f1-27 sv-204) + (f0-39 (sqrtf (+ f0-37 (* f1-27 f1-27)))) + (f0-41 (/ 1.0 f0-39)) + ) + (set! sv-200 (* sv-200 f0-41)) + (set! sv-204 (* sv-204 f0-41)) + ) + (set! (-> arg3 found-boundary) #t) + (vector+! (-> arg3 intersection) (-> sv-112 current-pos) (the-as vector (-> this bounds))) + (set! (-> arg3 boundary-normal x) sv-200) + (set! (-> arg3 boundary-normal y) 0.0) + (set! (-> arg3 boundary-normal z) sv-204) + (set! (-> arg3 poly) (-> sv-112 current-poly)) + (set! (-> arg3 edge) (-> sv-112 last-edge)) + (vector+! (-> arg3 vert-0) sv-192 (the-as vector (-> this bounds))) + (vector+! (-> arg3 vert-1) sv-196 (the-as vector (-> this bounds))) + (set! (-> sv-112 dest-pos quad) (-> sv-112 current-pos quad)) + (if (-> sv-112 hit-gap) + (set! (-> arg3 gap-poly) (-> sv-112 next-poly)) + ) + ) + (else + ) + ) + (vector-! arg2 (-> sv-112 current-pos) sv-116) + 0 + (label cfg-41) + 0 + (none) + ) + ) + +;; definition for method 23 of type nav-mesh +;; WARN: Return type mismatch object vs none. +;; WARN: Function (method 23 nav-mesh) has a return type of none, but the expression builder found a return statement. +(defmethod find-adjacent-bounds-one ((this nav-mesh) (arg0 vector) (arg1 nav-poly) (arg2 int) (arg3 int)) + (local-vars (sv-16 nav-poly)) + (if (zero? arg3) + (set! arg2 (the-as int (mod (the-as uint (+ arg2 1)) (-> arg1 vertex-count)))) + ) + (set! sv-16 arg1) + (let ((s2-0 (-> sv-16 vertex arg2)) + (s3-0 sv-16) + (s1-0 100) + ) + (while (begin (label cfg-21) (nonzero? s1-0)) + (+! s1-0 -1) + (if (nonzero? arg3) + (set! arg2 (the-as int (mod (the-as uint (+ arg2 arg3 (-> s3-0 vertex-count))) (-> s3-0 vertex-count)))) + ) + (let ((v1-12 (-> s3-0 adj-poly arg2))) + (cond + ((= v1-12 255) + (if (zero? arg3) + (set! arg2 (the-as int (mod (the-as uint (+ arg2 1)) (-> s3-0 vertex-count)))) + ) + (vector+! arg0 (-> s3-0 vertex arg2) (the-as vector (-> this bounds))) + (return #f) + ) + (else + (set! s3-0 (-> this poly-array v1-12)) + (when (= s3-0 sv-16) + (format 0 "ERROR: find-adjacent-bounds-one cur-poly = start-poly after step~%") + (return #f) + ) + (dotimes (s0-0 (the-as int (-> s3-0 vertex-count))) + (when (vector= (-> s3-0 vertex s0-0) s2-0) + (set! arg2 s0-0) + (goto cfg-21) + ) + ) + (format 0 "ERROR: find-adjacent-bounds-one couldn't match vertex~%") + (return #f) + ) + ) + ) + ) + ) + (format 0 "ERROR: find-adjacent-bounds-one took too many steps~%") + (none) + ) + +;; definition for method 22 of type nav-mesh +;; WARN: Return type mismatch int vs none. +(defmethod set-normals-from-adjacent-bounds ((this nav-mesh) (arg0 clamp-travel-vector-to-mesh-return-info)) + (find-adjacent-bounds-one this (-> arg0 vert-prev) (-> arg0 poly) (-> arg0 edge) -1) + (find-adjacent-bounds-one this (-> arg0 vert-next) (-> arg0 poly) (-> arg0 edge) 0) + (vector-! (-> arg0 prev-normal) (-> arg0 vert-0) (-> arg0 vert-prev)) + (vector-! (-> arg0 next-normal) (-> arg0 vert-next) (-> arg0 vert-1)) + (vector-normalize! (-> arg0 prev-normal) 1.0) + (vector-normalize! (-> arg0 next-normal) 1.0) + (let ((f0-0 (-> arg0 prev-normal x))) + (set! (-> arg0 prev-normal x) (-> arg0 prev-normal z)) + (set! (-> arg0 prev-normal z) f0-0) + ) + (let ((f0-1 (-> arg0 next-normal x))) + (set! (-> arg0 next-normal x) (-> arg0 next-normal z)) + (set! (-> arg0 next-normal z) f0-1) + ) + (set! (-> arg0 prev-normal x) (- (-> arg0 prev-normal x))) + (set! (-> arg0 next-normal x) (- (-> arg0 next-normal x))) + 0 + (none) + ) + +;; definition for method 20 of type nav-mesh +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod clamp-vector-to-mesh-cross-gaps ((this nav-mesh) + (arg0 vector) + (arg1 nav-poly) + (arg2 vector) + (arg3 float) + (arg4 symbol) + (arg5 clamp-travel-vector-to-mesh-return-info) + ) + (local-vars + (v1-11 symbol) + (v1-22 symbol) + (sv-96 nav-ray) + (sv-100 symbol) + (sv-104 int) + (sv-112 nav-mesh-work) + (sv-120 int) + (sv-128 int) + (sv-136 nav-mesh-work) + (sv-140 nav-poly) + (sv-144 uint) + (sv-148 (pointer int8)) + (sv-152 (pointer int8)) + (sv-156 float) + (sv-160 float) + (sv-164 vector) + (sv-168 vector) + (sv-172 float) + (sv-176 float) + (sv-180 uint) + (sv-184 vector) + (sv-188 vector) + (sv-192 float) + (sv-196 float) + (sv-200 float) + (sv-204 float) + ) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (when arg5 + (set! (-> arg5 found-boundary) #f) + (set! (-> arg5 gap-poly) #f) + ) + (set! sv-96 (new 'stack-no-clear 'nav-ray)) + (set! sv-100 (the-as symbol #f)) + (set! sv-104 0) + (set! sv-112 (-> this work)) + (set! (-> sv-96 current-poly) arg1) + (set! (-> sv-96 current-pos quad) (-> arg0 quad)) + (vector+! (-> sv-96 dest-pos) arg0 arg2) + (let* ((t6-0 this) + (t4-2 arg1) + (v1-10 (-> sv-96 dest-pos)) + (t3-3 (-> t4-2 vertex-count)) + (t4-3 (-> t4-2 vertex)) + (t5-1 (-> t6-0 work vert0-table)) + (t6-2 (-> t6-0 work vert1-table)) + ) + (dotimes (t7-0 (the-as int t3-3)) + (let* ((t8-3 (-> t4-3 (-> t5-1 t7-0))) + (t9-3 (-> t4-3 (-> t6-2 t7-0))) + (f0-1 (- (-> t8-3 z) (-> t9-3 z))) + (f1-2 (- (-> t9-3 x) (-> t8-3 x))) + (f2-2 (- (-> v1-10 x) (-> t8-3 x))) + (f3-2 (- (-> v1-10 z) (-> t8-3 z))) + (f0-3 (+ (* f2-2 f0-1) (* f3-2 f1-2))) + ) + (when (< 0.0 f0-3) + (set! v1-11 #f) + (goto cfg-9) + ) + ) + ) + ) + (set! v1-11 #t) + (label cfg-9) + (b! v1-11 cfg-62 :delay (nop!)) + (until sv-100 + (set! sv-120 0) + (let ((v1-15 sv-96)) + (vector-! (-> v1-15 dir) (-> v1-15 dest-pos) (-> v1-15 current-pos)) + (set! (-> v1-15 dir y) 0.0) + (let ((t3-5 (-> v1-15 dir))) + (let ((f0-5 1.0)) + (.lvf vf1 (&-> t3-5 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((t4-6 f0-5)) + (.mov vf3 t4-6) + ) + ) + (.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 (&-> t3-5 quad) vf1) + ) + (set! (-> v1-15 next-poly) #f) + (set! (-> v1-15 len) 0.0) + (set! (-> v1-15 last-edge) -1) + (set! (-> v1-15 terminated) #f) + (set! (-> v1-15 reached-dest) #f) + (set! (-> v1-15 hit-boundary) #f) + (set! (-> v1-15 hit-gap) #f) + (set! (-> v1-15 ignore) (the-as uint 3)) + ) + 0 + (until v1-22 + (set! sv-120 (+ sv-120 1)) + (let ((t3-8 this) + (v1-19 sv-96) + ) + (set! sv-128 -1) + (set! sv-136 (-> t3-8 work)) + (set! sv-140 (-> v1-19 current-poly)) + (set! sv-144 (-> v1-19 current-poly vertex-count)) + (set! sv-148 (-> t3-8 work vert0-table)) + (set! sv-152 (-> t3-8 work vert1-table)) + (set! sv-156 (- (-> v1-19 dest-pos x) (-> v1-19 current-pos x))) + (set! sv-160 (- (-> v1-19 dest-pos z) (-> v1-19 current-pos z))) + (dotimes (t4-16 (the-as int sv-144)) + (set! sv-164 (-> sv-140 vertex (-> sv-148 t4-16))) + (set! sv-168 (-> sv-140 vertex (-> sv-152 t4-16))) + (set! sv-172 (- (-> sv-164 z) (-> sv-168 z))) + (set! sv-176 (- (-> sv-168 x) (-> sv-164 x))) + (let ((f0-17 (+ (* sv-156 sv-172) (* sv-160 sv-176)))) + (when (< 0.0 f0-17) + (let ((f1-15 (+ (* sv-172 (- (-> sv-164 x) (-> v1-19 current-pos x))) + (* sv-176 (- (-> sv-164 z) (-> v1-19 current-pos z))) + ) + ) + ) + (when (< f1-15 f0-17) + (set! sv-128 t4-16) + (let ((f0-19 (fmax 0.0 (/ f1-15 f0-17)))) + (set! sv-156 (* sv-156 f0-19)) + (set! sv-160 (* sv-160 f0-19)) + ) + ) + ) + ) + ) + ) + (let ((f0-23 (+ (* sv-156 (-> v1-19 dir x)) (* sv-160 (-> v1-19 dir z))))) + (+! (-> v1-19 len) f0-23) + ) + 0 + (set! (-> v1-19 next-poly) #f) + (cond + ((= sv-128 -1) + (set! (-> v1-19 current-pos quad) (-> v1-19 dest-pos quad)) + (set! (-> v1-19 reached-dest) #t) + (set! (-> v1-19 terminated) #t) + ) + (else + (+! (-> v1-19 current-pos x) sv-156) + (+! (-> v1-19 current-pos z) sv-160) + (set! sv-180 (-> sv-140 adj-poly sv-128)) + (if (!= sv-180 255) + (set! (-> v1-19 next-poly) (-> t3-8 poly-array sv-180)) + ) + (cond + ((and (-> v1-19 next-poly) (not (logtest? (-> v1-19 next-poly pat) (-> v1-19 ignore)))) + (set! (-> v1-19 current-poly) (-> v1-19 next-poly)) + ) + (else + (set! (-> v1-19 last-edge) sv-128) + (if (-> v1-19 next-poly) + (set! (-> v1-19 hit-gap) #t) + (set! (-> v1-19 hit-boundary) #t) + ) + (set! (-> v1-19 terminated) #t) + ) + ) + ) + ) + ) + 0 + (set! v1-22 (or (>= sv-120 15) (or (>= (-> sv-96 len) (fmax 20480.0 arg3)) (-> sv-96 terminated)))) + ) + (cond + ((and (-> sv-96 hit-boundary) (and (< (-> sv-96 len) arg3) (!= (-> sv-96 last-edge) -1) (< sv-104 1))) + (set! sv-104 (+ sv-104 1)) + (set! sv-184 (-> arg1 vertex (-> sv-112 vert0-table (-> sv-96 last-edge)))) + (set! sv-188 (-> arg1 vertex (-> sv-112 vert1-table (-> sv-96 last-edge)))) + (set! sv-192 (- (-> sv-184 z) (-> sv-188 z))) + (set! sv-196 (- (-> sv-188 x) (-> sv-184 x))) + (set! sv-200 (-> arg2 x)) + (set! sv-204 (-> arg2 z)) + (let* ((f0-37 sv-192) + (f0-39 (* f0-37 f0-37)) + (f1-30 sv-196) + (f0-41 (sqrtf (+ f0-39 (* f1-30 f1-30)))) + (f0-43 (/ 1.0 f0-41)) + ) + (set! sv-192 (* sv-192 f0-43)) + (set! sv-196 (* sv-196 f0-43)) + ) + (when arg5 + (set! (-> arg5 found-boundary) #t) + (vector+! (-> arg5 intersection) (-> sv-96 current-pos) (the-as vector (-> this bounds))) + (set! (-> arg5 boundary-normal x) sv-192) + (set! (-> arg5 boundary-normal y) 0.0) + (set! (-> arg5 boundary-normal z) sv-196) + (set! (-> arg5 poly) (-> sv-96 current-poly)) + (set! (-> arg5 edge) (-> sv-96 last-edge)) + (vector+! (-> arg5 vert-0) sv-184 (the-as vector (-> this bounds))) + (vector+! (-> arg5 vert-1) sv-188 (the-as vector (-> this bounds))) + ) + (set! (-> sv-96 dest-pos quad) (-> sv-96 current-pos quad)) + (cond + (arg4 + (let ((f0-49 (* 1.01 (+ (* sv-192 sv-200) (* sv-196 sv-204))))) + (set! sv-200 (- sv-200 (* sv-192 f0-49))) + (set! sv-204 (- sv-204 (* sv-196 f0-49))) + ) + (+! (-> sv-96 dest-pos x) sv-200) + (+! (-> sv-96 dest-pos z) sv-204) + ) + (else + (set! sv-100 #t) + ) + ) + ) + ((-> sv-96 hit-gap) + (if arg5 + (set! (-> arg5 gap-poly) (-> sv-96 next-poly)) + ) + (set! sv-100 #t) + ) + (else + (set! sv-100 #t) + ) + ) + ) + (vector-! arg2 (-> sv-96 current-pos) arg0) + 0 + (label cfg-62) + 0 + (none) + ) + ) + +;; definition for method 22 of type nav-control +(defmethod find-first-sphere-and-update-avoid-params ((this nav-control) (arg0 vector) (arg1 nav-avoid-spheres-params)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (let ((s2-1 + (vector-! (new 'stack-no-clear 'vector) (-> this root-nav-sphere) (the-as vector (-> this state mesh bounds))) + ) + (f30-0 -1.0) + ) + (let ((s3-0 -1)) + (countdown (s1-0 (-> this sphere-count)) + (let* ((s0-0 (-> this sphere-array s1-0)) + (f0-2 (ray-circle-intersect s2-1 arg0 s0-0 (+ -409.6 (-> s0-0 r)))) + ) + (when (>= f0-2 0.0) + (let ((v1-5 (new 'stack-no-clear 'vector))) + (vector-! v1-5 (the-as vector s0-0) s2-1) + (when (>= (vector-dot v1-5 arg0) 0.0) + (when (or (< f30-0 0.0) (< f0-2 f30-0)) + (set! f30-0 f0-2) + (set! s3-0 s1-0) + ) + ) + ) + ) + ) + ) + (when arg1 + (set! (-> arg1 current-pos x) f30-0) + (when (>= f30-0 0.0) + (vector+float*! (-> arg1 travel) (-> this root-nav-sphere) arg0 f30-0) + (let ((a0-9 (-> this sphere-array s3-0)) + (v1-19 (new 'stack-no-clear 'vector)) + ) + (vector+! v1-19 (the-as vector a0-9) (the-as vector (-> this state mesh bounds))) + (vector-! (-> arg1 pref-dir) (-> arg1 travel) v1-19) + ) + (set! (-> arg1 pref-dir w) 1.0) + (let ((v1-21 (-> arg1 pref-dir))) + (let ((f0-6 1.0)) + (.lvf vf1 (&-> v1-21 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-12 f0-6)) + (.mov vf3 a0-12) + ) + ) + (.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-21 quad) vf1) + ) + ) + ) + ) + f30-0 + ) + ) + ) + +;; definition for method 24 of type nav-control +(defmethod add-root-sphere-to-hash! ((this nav-control) (arg0 vector) (arg1 int)) + (if (logtest? (-> this flags) (nav-control-flag output-sphere-hash)) + (find-nav-sphere-ids + (-> this state mesh sphere-hash) + (the-as find-nav-sphere-ids-params arg0) + (logand arg1 255) + (the-as int (-> this root-sphere-id)) + ) + ) + ) + +;; definition for method 48 of type nav-state +;; WARN: Return type mismatch int vs none. +(defmethod reset! ((this nav-state) (arg0 nav-control)) + (set! (-> this nav) arg0) + (set! (-> this flags) (nav-state-flag)) + (set! (-> this current-poly) #f) + (set! (-> this next-poly) #f) + (set! (-> this target-poly) #f) + (set! (-> this user-poly) #f) + 0 + (none) + ) + +;; definition for method 7 of type nav-state +(defmethod relocate ((this nav-state) (offset int)) + (break!) + (&+! (-> this nav) offset) + this + ) + +;; definition for method 12 of type nav-state +;; INFO: Used lq/sq +(defmethod get-velocity ((this nav-state) (arg0 vector)) + (set! (-> arg0 quad) (-> this velocity quad)) + arg0 + ) + +;; definition for method 14 of type nav-state +;; INFO: Used lq/sq +(defmethod get-heading ((this nav-state) (arg0 vector)) + (set! (-> arg0 quad) (-> this heading quad)) + arg0 + ) + +;; definition for method 15 of type nav-state +;; INFO: Used lq/sq +(defmethod get-target-pos ((this nav-state) (arg0 vector)) + (set! (-> arg0 quad) (-> this target-pos quad)) + arg0 + ) + +;; definition for method 19 of type nav-state +(defmethod get-current-poly ((this nav-state)) + (-> this current-poly) + ) + +;; definition for method 16 of type nav-state +(defmethod get-speed ((this nav-state)) + (-> this speed) + ) + +;; definition for method 17 of type nav-state +(defmethod get-rotation-rate ((this nav-state)) + (-> this rotation-rate) + ) + +;; definition for method 13 of type nav-state +;; INFO: Used lq/sq +(defmethod get-travel ((this nav-state) (arg0 vector)) + (set! (-> arg0 quad) (-> this travel quad)) + arg0 + ) + +;; definition for method 45 of type nav-state +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod set-velocity! ((this nav-state) (arg0 vector)) + (set! (-> this velocity quad) (-> arg0 quad)) + 0 + (none) + ) + +;; definition for method 46 of type nav-state +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod set-heading! ((this nav-state) (arg0 vector)) + (set! (-> this heading quad) (-> arg0 quad)) + 0 + (none) + ) + +;; definition for method 47 of type nav-state +;; WARN: Return type mismatch int vs none. +(defmethod set-speed! ((this nav-state) (arg0 meters)) + (set! (-> this speed) arg0) + 0 + (none) + ) + +;; definition for method 42 of type nav-state +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod set-target-pos! ((this nav-state) (arg0 vector)) + (logclear! (-> this flags) (nav-state-flag directional-mode)) + (logior! (-> this flags) (nav-state-flag target-poly-dirty)) + (set! (-> this target-pos quad) (-> arg0 quad)) + 0 + (none) + ) + +;; definition for method 43 of type nav-state +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod set-virtual-cur-pos! ((this nav-state) (arg0 vector)) + (logior! (-> this flags) (nav-state-flag use-position)) + (set! (-> this virtual-current-pos-local quad) (-> arg0 quad)) + 0 + (none) + ) + +;; definition for method 44 of type nav-state +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod set-travel! ((this nav-state) (arg0 vector)) + (logior! (-> this flags) (nav-state-flag directional-mode)) + (set! (-> this travel quad) (-> arg0 quad)) + 0 + (none) + ) + +;; definition for method 20 of type nav-state +;; WARN: Return type mismatch int vs none. +(defmethod copy-nav-state! ((this nav-state) (arg0 (pointer nav-state))) + (mem-copy! (the-as pointer this) arg0 176) + 0 + (none) + ) + +;; definition for method 10 of type nav-state +;; WARN: Return type mismatch int vs none. +(defmethod nav-state-method-10 ((this nav-state)) + 0 + (none) + ) + +;; definition for method 9 of type nav-state +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this nav-state)) + (let ((s5-0 (-> this mesh))) + (if (-> this next-poly) + (debug-draw-poly s5-0 (-> this next-poly) *color-cyan*) + ) + (if (-> this target-poly) + (debug-draw-poly s5-0 (-> this target-poly) *color-yellow*) + ) + (if (-> this current-poly) + (debug-draw-poly s5-0 (-> this current-poly) *color-red*) + ) + ) + (add-debug-x #t (bucket-id debug-no-zbuf1) (-> this target-pos) *color-yellow*) + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + (-> this current-pos) + (-> this travel) + (meters 0.00024414062) + *color-white* + ) + (let ((s5-1 (new 'stack-no-clear 'vector))) + 0.0 + (-> this mesh work debug) + (set! (-> s5-1 quad) (-> this current-pos quad)) + (let ((f30-0 (-> s5-1 y))) + (set! (-> s5-1 y) (+ 2048.0 f30-0)) + (add-debug-vector #t (bucket-id debug-no-zbuf1) s5-1 (-> this heading) (meters 1) *color-yellow*) + (set! (-> s5-1 y) (+ 4096.0 f30-0)) + ) + ) + 0 + (add-debug-x + #t + (bucket-id debug-no-zbuf1) + (vector+! (new 'stack-no-clear 'vector) (-> this current-pos) (-> this travel)) + *color-white* + ) + 0 + (none) + ) + +;; definition for method 38 of type nav-state +;; WARN: Return type mismatch int vs none. +(defmethod set-current-poly! ((this nav-state) (arg0 nav-poly)) + (set! (-> this current-poly) arg0) + 0 + (none) + ) + +;; definition for method 41 of type nav-state +(defmethod clamp-vector-to-mesh-cross-gaps ((this nav-state) (arg0 vector)) + (when (-> this current-poly) + (clamp-vector-to-mesh-cross-gaps + (-> this nav) + (-> this current-pos) + (-> this current-poly) + arg0 + 204.8 + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + #t + ) + ) + +;; definition for method 40 of type nav-state +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod do-navigation-to-destination ((this nav-state) (arg0 vector)) + (local-vars (v1-15 symbol)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (cond + ((-> this current-poly) + (let ((s3-0 (-> this mesh)) + (s4-0 (new 'stack-no-clear 'nav-ray)) + ) + (let ((s2-0 0)) + (set! (-> s4-0 current-poly) (-> this current-poly)) + (vector-! (-> s4-0 current-pos) (-> this current-pos) (the-as vector (-> s3-0 bounds))) + (vector-! (-> s4-0 dest-pos) arg0 (the-as vector (-> s3-0 bounds))) + (b! (not (point-in-poly? s3-0 (-> this current-poly) (-> s4-0 dest-pos))) cfg-3 :delay (empty-form)) + (logior! (-> this flags) (nav-state-flag in-mesh)) + (set! (-> this current-pos quad) (-> arg0 quad)) + (b! #t cfg-17 :delay (nop!)) + (label cfg-3) + (let ((v1-10 s4-0)) + (vector-! (-> v1-10 dir) (-> v1-10 dest-pos) (-> v1-10 current-pos)) + (set! (-> v1-10 dir y) 0.0) + (let ((a0-6 (-> v1-10 dir))) + (let ((f0-1 1.0)) + (.lvf vf1 (&-> a0-6 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a1-8 f0-1)) + (.mov vf3 a1-8) + ) + ) + (.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 (&-> a0-6 quad) vf1) + ) + (set! (-> v1-10 next-poly) #f) + (set! (-> v1-10 len) 0.0) + (set! (-> v1-10 last-edge) -1) + (set! (-> v1-10 terminated) #f) + (set! (-> v1-10 reached-dest) #f) + (set! (-> v1-10 hit-boundary) #f) + (set! (-> v1-10 hit-gap) #f) + (set! (-> v1-10 ignore) (the-as uint 3)) + ) + 0 + (set! (-> s4-0 ignore) (the-as uint 1)) + (until v1-15 + (+! s2-0 1) + (advance-ray-to-nearest-poly-edge-or-dest! s3-0 s4-0) + (set! v1-15 (or (>= s2-0 15) (-> s4-0 terminated))) + ) + ) + (set! (-> this current-poly) (-> s4-0 current-poly)) + (when (-> s4-0 reached-dest) + (if (not (point-in-poly? s3-0 (-> this current-poly) (-> s4-0 dest-pos))) + (set! (-> s4-0 reached-dest) #f) + ) + ) + (cond + ((-> s4-0 reached-dest) + (logior! (-> this flags) (nav-state-flag in-mesh)) + (set! (-> this current-pos quad) (-> arg0 quad)) + ) + (else + (logclear! (-> this flags) (nav-state-flag in-mesh)) + (set! (-> this current-pos quad) (-> arg0 quad)) + (let ((s4-1 (new 'stack 'nav-find-poly-parms))) + (vector-! (-> s4-1 point) arg0 (the-as vector (-> this mesh bounds))) + (set! (-> s4-1 y-threshold) (-> this nav nearest-y-threshold)) + (set! (-> s4-1 ignore) (the-as uint 1)) + (nav-mesh-method-46 (-> this mesh) (the-as nav-poly s4-1)) + (set! (-> this current-poly) (-> s4-1 poly)) + ) + 0 + ) + ) + ) + ) + (else + (set! (-> this current-pos quad) (-> arg0 quad)) + (let ((s4-2 (new 'stack 'nav-find-poly-parms))) + (vector-! (-> s4-2 point) arg0 (the-as vector (-> this mesh bounds))) + (set! (-> s4-2 y-threshold) (-> this nav nearest-y-threshold)) + (set! (-> s4-2 ignore) (the-as uint 1)) + (nav-mesh-method-46 (-> this mesh) (the-as nav-poly s4-2)) + (set! (-> this current-poly) (-> s4-2 poly)) + (logclear! (-> this flags) (nav-state-flag in-mesh)) + (if (-> s4-2 point-inside?) + (logior! (-> this flags) (nav-state-flag in-mesh)) + ) + ) + ) + ) + (label cfg-17) + 0 + (none) + ) + ) + +;; definition for method 18 of type nav-state +(defmethod try-projecting-to-current-poly ((this nav-state) (arg0 vector) (arg1 vector) (arg2 vector)) + (cond + ((-> this current-poly) + (let ((s5-0 (-> this nav)) + (v1-1 (-> this current-poly)) + (gp-0 arg0) + ) + (let ((t1-0 arg1) + (a1-1 arg2) + ) + (project-point-onto-plane-of-poly-local + (-> s5-0 state mesh) + v1-1 + gp-0 + t1-0 + (vector-! (new 'stack-no-clear 'vector) a1-1 (the-as vector (-> s5-0 state mesh bounds))) + ) + ) + (vector+! gp-0 gp-0 (the-as vector (-> s5-0 state mesh bounds))) + ) + 0 + #t + ) + (else + #f + ) + ) + ) + +;; definition for method 20 of type nav-control +;; WARN: Return type mismatch int vs none. +(defmethod clamp-vector-to-mesh-cross-gaps ((this nav-control) + (arg0 vector) + (arg1 nav-poly) + (arg2 vector) + (arg3 float) + (arg4 symbol) + (arg5 clamp-travel-vector-to-mesh-return-info) + ) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (vector-! v1-0 arg0 (the-as vector (-> this state mesh bounds))) + (clamp-vector-to-mesh-cross-gaps (-> this state mesh) v1-0 arg1 arg2 arg3 arg4 arg5) + ) + 0 + (none) + ) + +;; definition for method 12 of type nav-control +;; WARN: Return type mismatch float vs nav-poly. +(defmethod closest-point-on-mesh ((this nav-control) (arg0 vector) (arg1 vector) (arg2 nav-poly)) + (local-vars (sv-16 vector)) + (set! sv-16 arg0) + (let ((gp-0 (new 'stack-no-clear 'nav-poly))) + (set! (-> gp-0 vertex1 z) (the-as float arg2)) + (vector-! (the-as vector (-> gp-0 vertex)) arg1 (the-as vector (-> this state mesh bounds))) + (when (or (not (-> gp-0 vertex1 z)) + (not (point-in-poly? (-> this state mesh) (the-as nav-poly (-> gp-0 vertex1 z)) (the-as vector (-> gp-0 vertex))) + ) + ) + (set! (-> gp-0 vertex1 x) (-> this nearest-y-threshold)) + (set! (-> gp-0 data 20) (the-as uint 3)) + (nav-mesh-method-46 (-> this state mesh) gp-0) + ) + (when (-> gp-0 vertex1 z) + (project-point-into-poly-2d + (-> this state mesh) + (the-as nav-poly (-> gp-0 vertex1 z)) + sv-16 + (the-as vector (-> gp-0 vertex)) + ) + (vector+! sv-16 sv-16 (the-as vector (-> this state mesh bounds))) + ) + (the-as nav-poly (-> gp-0 vertex1 z)) + ) + ) + +;; definition for function vector-rotate-y-sincos! +(defun vector-rotate-y-sincos! ((arg0 vector) (arg1 vector) (arg2 float) (arg3 float)) + (let ((f0-0 (-> arg1 x)) + (f1-0 (-> arg1 z)) + ) + (set! (-> arg0 x) (+ (* arg3 f0-0) (* arg2 f1-0))) + (set! (-> arg0 y) (-> arg1 y)) + (set! (-> arg0 z) (- (* arg3 f1-0) (* arg2 f0-0))) + ) + ) + +;; definition for method 39 of type nav-state +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 39 nav-state)" 39 nav-state) + +;; definition for method 51 of type nav-state +;; WARN: Return type mismatch int vs none. +(defmethod nav-state-method-51 ((this nav-state)) + 0 + (none) + ) + +;; definition for function test-xz-point-on-line-segment? +(defun test-xz-point-on-line-segment? ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 float)) + (local-vars (v1-2 float) (v1-4 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (let* ((f0-0 arg3) + (f0-2 (* f0-0 f0-0)) + ) + (let ((v1-1 arg0) + (t0-0 arg1) + ) + (.lvf vf2 (&-> v1-1 quad)) + (.lvf vf3 (&-> t0-0 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov v1-2 vf1) + (let ((f1-0 v1-2)) + (let ((v1-3 arg0) + (t0-1 arg2) + ) + (.lvf vf2 (&-> v1-3 quad)) + (.lvf vf3 (&-> t0-1 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov v1-4 vf1) + (let ((v0-0 (>= f0-2 (fmin f1-0 v1-4)))) + (when (not v0-0) + (let* ((f0-4 (- (-> arg2 x) (-> arg1 x))) + (f1-4 (- (-> arg2 z) (-> arg1 z))) + (f2-2 f0-4) + (f2-4 (* f2-2 f2-2)) + (f3-0 f1-4) + (f2-6 (sqrtf (+ f2-4 (* f3-0 f3-0)))) + (f3-3 f2-6) + (f3-5 (/ 1.0 f3-3)) + (f5-0 (* f3-5 (- f1-4))) + (f6-0 (* f3-5 f0-4)) + (f3-7 (- (-> arg0 x) (-> arg1 x))) + (f4-4 (- (-> arg0 z) (-> arg1 z))) + ) + (when (>= arg3 (fabs (+ (* f3-7 f5-0) (* f4-4 f6-0)))) + (let ((f0-6 (+ (* f3-7 f0-4) (* f4-4 f1-4)))) + (set! v0-0 (and (>= f0-6 0.0) (>= (* f2-6 f2-6) f0-6))) + ) + ) + ) + ) + v0-0 + ) + ) + ) + ) + ) + +;; definition for method 52 of type nav-state +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod navigate-using-route-portals ((this nav-state)) + (local-vars + (v1-117 float) + (sv-112 vector) + (sv-116 nav-route-portal) + (sv-120 (inline-array vector)) + (sv-124 symbol) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set! (-> this virtual-current-poly) (-> this current-poly)) + (set! sv-112 (new 'stack-no-clear 'vector)) + (set! sv-116 (new 'stack-no-clear 'nav-route-portal)) + (set! sv-120 (new 'stack-no-clear 'inline-array 'vector 2)) + (set! sv-124 (the-as symbol #f)) + (vector-! (-> this current-pos-local) (-> this current-pos) (the-as vector (-> this mesh bounds))) + (set! (-> this virtual-current-pos-local quad) (-> this current-pos-local quad)) + (set! (-> sv-116 next-poly) #f) + (when (not (logtest? (-> this flags) (nav-state-flag directional-mode))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (let ((s4-0 (new 'stack-no-clear 'nav-poly))) + (vector-! s5-0 (-> this target-pos) (the-as vector (-> this mesh bounds))) + (when (or (logtest? (-> this flags) (nav-state-flag target-poly-dirty)) (not (-> this target-poly))) + (set! (-> s4-0 vertex 0 quad) (-> s5-0 quad)) + (set! (-> s4-0 vertex1 x) (-> this nav nearest-y-threshold)) + (set! (-> s4-0 data 20) (the-as uint 3)) + (nav-mesh-method-46 (-> this mesh) s4-0) + (set! (-> this target-poly) (the-as nav-poly (-> s4-0 vertex1 z))) + (if (not (-> this target-poly)) + (set! (-> this target-poly) (-> this current-poly)) + ) + (logclear! (-> this flags) (nav-state-flag target-poly-dirty)) + ) + ) + (project-point-into-poly-2d (-> this mesh) (-> this target-poly) sv-112 s5-0) + ) + (set! (-> sv-112 y) (-> this current-pos-local y)) + (vector-! (-> this travel) sv-112 (-> this current-pos-local)) + (set! (-> this travel y) 0.0) + (let* ((v1-32 (-> this travel)) + (f0-6 (+ (* (-> v1-32 x) (-> v1-32 x)) (* (-> v1-32 z) (-> v1-32 z)))) + (f1-3 4096.0) + ) + (if (< f0-6 (* f1-3 f1-3)) + (logior! (-> this flags) (nav-state-flag at-target)) + ) + ) + (get-route-portal (-> this mesh) (-> this current-poly) (-> this target-poly) sv-116) + ) + (cond + ((not (-> sv-116 next-poly)) + (set! (-> this next-poly) #f) + ) + (else + (set! (-> this next-poly) (-> sv-116 next-poly)) + (set! (-> sv-120 0 quad) (-> sv-116 vertex 0 quad)) + (set! (-> sv-120 1 quad) (-> sv-116 vertex 1 quad)) + (set! sv-124 #t) + (while (and sv-124 (-> sv-116 next-poly) (test-xz-point-on-line-segment? + (-> this current-pos-local) + (the-as vector (-> sv-116 vertex)) + (-> sv-116 vertex 1) + 409.59998 + ) + ) + (when #t + #t + (vector-segment-distance-point! + (-> this current-pos-local) + (the-as vector (-> sv-116 vertex)) + (-> sv-116 vertex 1) + (-> this virtual-current-pos-local) + ) + (vector-! (-> this travel) sv-112 (-> this virtual-current-pos-local)) + (set! (-> this travel y) 0.0) + 0 + ) + (set! (-> this virtual-current-poly) (-> sv-116 next-poly)) + (cond + ((get-route-portal (-> this mesh) (-> sv-116 next-poly) (-> this target-poly) sv-116) + (set! (-> this next-poly) (-> sv-116 next-poly)) + (set! (-> sv-120 0 quad) (-> sv-116 vertex 0 quad)) + (set! (-> sv-120 1 quad) (-> sv-116 vertex 1 quad)) + 0 + ) + (else + (set! (-> this next-poly) #f) + (set! sv-124 (the-as symbol #f)) + ) + ) + ) + ) + ) + (when sv-124 + (let ((s5-1 (new 'stack-no-clear 'matrix))) + (vector-! (-> s5-1 rvec) (-> sv-120 1) (-> sv-120 0)) + (vector-normalize! (-> s5-1 rvec) 409.6) + (vector+! (-> sv-120 0) (-> sv-120 0) (-> s5-1 rvec)) + (vector-! (-> sv-120 1) (-> sv-120 1) (-> s5-1 rvec)) + ) + (when (not (ray-ccw-line-segment-intersection? + (-> this virtual-current-pos-local) + (-> this travel) + (-> sv-120 0) + (-> sv-120 1) + ) + ) + (let ((s5-2 -1)) + (let* ((f0-8 (cos 8192.0)) + (f0-10 (* f0-8 f0-8)) + (v1-93 (new 'stack-no-clear 'vector)) + (a0-39 (-> this travel)) + (f1-9 (+ (* (-> a0-39 x) (-> a0-39 x)) (* (-> a0-39 z) (-> a0-39 z)))) + ) + (countdown (a0-41 2) + (vector-! v1-93 (-> sv-120 a0-41) (-> this virtual-current-pos-local)) + (let ((f2-5 (vector-dot (-> this travel) v1-93))) + (when (< 0.0 f2-5) + (let* ((f2-7 (* f2-5 f2-5)) + (a1-26 v1-93) + (f2-8 (/ f2-7 (* f1-9 (+ (* (-> a1-26 x) (-> a1-26 x)) (* (-> a1-26 z) (-> a1-26 z)))))) + ) + (when (< f0-10 f2-8) + (set! f0-10 f2-8) + (set! s5-2 a0-41) + ) + ) + ) + ) + ) + ) + (when (= s5-2 -1) + (let ((f30-0 (the-as float #x7f800000)) + (s3-0 (new 'stack-no-clear 'nav-route-portal)) + (s4-1 (new 'stack-no-clear 'vector)) + ) + (get-route-portal (-> this mesh) (-> sv-116 next-poly) (-> this target-poly) s3-0) + (cond + ((-> s3-0 next-poly) + (vector+! s4-1 (the-as vector (-> s3-0 vertex)) (the-as vector (-> s3-0 vertex 1))) + (vector-float*! s4-1 s4-1 0.5) + ) + (else + (set! (-> s4-1 quad) (-> sv-112 quad)) + ) + ) + (countdown (s3-1 2) + (let* ((s2-0 (-> sv-120 s3-1)) + (f0-13 (+ (vector-vector-xz-distance-squared (-> this virtual-current-pos-local) s2-0) + (vector-vector-xz-distance-squared s4-1 s2-0) + ) + ) + ) + (when (< f0-13 f30-0) + (set! f30-0 f0-13) + (set! s5-2 s3-1) + ) + ) + ) + ) + ) + (vector-! (-> this travel) (-> sv-120 s5-2) (-> this virtual-current-pos-local)) + ) + (set! (-> this travel y) 0.0) + ) + ) + (.lvf vf1 (&-> (-> this travel) 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-117 vf1) + (let ((f0-15 v1-117) + (f1-10 (-> this nav nav-cull-radius)) + ) + (if (< (* f1-10 f1-10) f0-15) + (vector-float*! (-> this travel) (-> this travel) (/ (-> this nav nav-cull-radius) (sqrtf f0-15))) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 50 of type nav-state +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod navigate-using-best-dir-use-existing-avoid-spheres ((this nav-state) (arg0 nav-avoid-spheres-params)) + (local-vars + (sv-96 int) + (sv-104 nav-mesh-work) + (sv-108 nav-poly) + (sv-112 uint) + (sv-116 (pointer int8)) + (sv-120 (pointer int8)) + (sv-124 float) + (sv-128 float) + (sv-132 vector) + (sv-136 vector) + (sv-140 float) + (sv-144 float) + (sv-148 uint) + ) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (when (-> arg0 avoiding-sphere?) + (logior! (-> this flags) (nav-state-flag avoiding-sphere)) + (let ((f0-0 (-> arg0 closest-sphere-dist2)) + (f1-0 512.0) + ) + (if (< f0-0 (* f1-0 f1-0)) + (logior! (-> this flags) (nav-state-flag touching-sphere)) + ) + ) + (set! (-> this travel quad) (-> arg0 out-travel 0 quad)) + (let ((v1-10 (new 'stack-no-clear 'nav-ray))) + (set! (-> v1-10 current-pos quad) (-> this virtual-current-pos-local quad)) + (set! (-> v1-10 current-poly) (-> this virtual-current-poly)) + (vector+! (-> v1-10 dest-pos) (-> this virtual-current-pos-local) (-> this travel)) + (let ((a2-5 0)) + (let ((a3-3 v1-10)) + (vector-! (-> a3-3 dir) (-> a3-3 dest-pos) (-> a3-3 current-pos)) + (set! (-> a3-3 dir y) 0.0) + (let ((t0-3 (-> a3-3 dir))) + (let ((f0-2 1.0)) + (.lvf vf1 (&-> t0-3 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((t1-2 f0-2)) + (.mov vf3 t1-2) + ) + ) + (.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 (&-> t0-3 quad) vf1) + ) + (set! (-> a3-3 next-poly) #f) + (set! (-> a3-3 len) 0.0) + (set! (-> a3-3 last-edge) -1) + (set! (-> a3-3 terminated) #f) + (set! (-> a3-3 reached-dest) #f) + (set! (-> a3-3 hit-boundary) #f) + (set! (-> a3-3 hit-gap) #f) + (set! (-> a3-3 ignore) (the-as uint 3)) + ) + 0 + (until (or (>= a2-5 15) (-> v1-10 terminated)) + (+! a2-5 1) + (let ((t0-6 (-> this mesh)) + (a3-5 v1-10) + ) + (set! sv-96 -1) + (set! sv-104 (-> t0-6 work)) + (set! sv-108 (-> a3-5 current-poly)) + (set! sv-112 (-> a3-5 current-poly vertex-count)) + (set! sv-116 (-> t0-6 work vert0-table)) + (set! sv-120 (-> t0-6 work vert1-table)) + (set! sv-124 (- (-> a3-5 dest-pos x) (-> a3-5 current-pos x))) + (set! sv-128 (- (-> a3-5 dest-pos z) (-> a3-5 current-pos z))) + (dotimes (t1-12 (the-as int sv-112)) + (set! sv-132 (-> sv-108 vertex (-> sv-116 t1-12))) + (set! sv-136 (-> sv-108 vertex (-> sv-120 t1-12))) + (set! sv-140 (- (-> sv-132 z) (-> sv-136 z))) + (set! sv-144 (- (-> sv-136 x) (-> sv-132 x))) + (let ((f0-14 (+ (* sv-124 sv-140) (* sv-128 sv-144)))) + (when (< 0.0 f0-14) + (let ((f1-13 + (+ (* sv-140 (- (-> sv-132 x) (-> a3-5 current-pos x))) (* sv-144 (- (-> sv-132 z) (-> a3-5 current-pos z)))) + ) + ) + (when (< f1-13 f0-14) + (set! sv-96 t1-12) + (let ((f0-16 (fmax 0.0 (/ f1-13 f0-14)))) + (set! sv-124 (* sv-124 f0-16)) + (set! sv-128 (* sv-128 f0-16)) + ) + ) + ) + ) + ) + ) + (let ((f0-20 (+ (* sv-124 (-> a3-5 dir x)) (* sv-128 (-> a3-5 dir z))))) + (+! (-> a3-5 len) f0-20) + ) + 0 + (set! (-> a3-5 next-poly) #f) + (cond + ((= sv-96 -1) + (set! (-> a3-5 current-pos quad) (-> a3-5 dest-pos quad)) + (set! (-> a3-5 reached-dest) #t) + (set! (-> a3-5 terminated) #t) + ) + (else + (+! (-> a3-5 current-pos x) sv-124) + (+! (-> a3-5 current-pos z) sv-128) + (set! sv-148 (-> sv-108 adj-poly sv-96)) + (if (!= sv-148 255) + (set! (-> a3-5 next-poly) (-> t0-6 poly-array sv-148)) + ) + (cond + ((and (-> a3-5 next-poly) (not (logtest? (-> a3-5 next-poly pat) (-> a3-5 ignore)))) + (set! (-> a3-5 current-poly) (-> a3-5 next-poly)) + ) + (else + (set! (-> a3-5 last-edge) sv-96) + (if (-> a3-5 next-poly) + (set! (-> a3-5 hit-gap) #t) + (set! (-> a3-5 hit-boundary) #t) + ) + (set! (-> a3-5 terminated) #t) + ) + ) + ) + ) + ) + 0 + ) + ) + (cond + ((or (-> v1-10 reached-dest) (-> v1-10 hit-gap) (>= (-> v1-10 len) 4096.0)) + (set! (-> this travel quad) (-> arg0 out-travel 0 quad)) + ) + (else + (set! (-> this travel quad) (-> arg0 out-travel 1 quad)) + (logior! (-> this flags) (nav-state-flag trapped-by-sphere)) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 53 of type nav-state +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod navigate-using-best-dir-recompute-avoid-spheres-1 ((this nav-state)) + (local-vars + (sv-192 int) + (sv-200 nav-mesh-work) + (sv-204 nav-poly) + (sv-208 uint) + (sv-212 (pointer int8)) + (sv-216 (pointer int8)) + (sv-220 float) + (sv-224 float) + (sv-228 vector) + (sv-232 vector) + (sv-236 float) + (sv-240 float) + (sv-244 uint) + ) + (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 (new 'stack-no-clear 'nav-avoid-spheres-params))) + (set! (-> s5-0 current-pos quad) (-> this virtual-current-pos-local quad)) + (set! (-> s5-0 travel quad) (-> this travel quad)) + (set! (-> s5-0 pref-dir quad) (-> (if (logtest? (-> this flags) (nav-state-flag trapped-by-sphere)) + (-> this heading) + (-> this travel) + ) + quad + ) + ) + (avoid-spheres-1! (-> this nav) s5-0) + (when (-> s5-0 avoiding-sphere?) + (logior! (-> this flags) (nav-state-flag avoiding-sphere)) + (let ((f0-0 (-> s5-0 closest-sphere-dist2)) + (f1-0 512.0) + ) + (if (< f0-0 (* f1-0 f1-0)) + (logior! (-> this flags) (nav-state-flag touching-sphere)) + ) + ) + (set! (-> this travel quad) (-> s5-0 out-travel 0 quad)) + (let ((v1-15 (new 'stack-no-clear 'nav-ray))) + (set! (-> v1-15 current-pos quad) (-> this virtual-current-pos-local quad)) + (set! (-> v1-15 current-poly) (-> this virtual-current-poly)) + (vector+! (-> v1-15 dest-pos) (-> this virtual-current-pos-local) (-> this travel)) + (let ((a0-15 0)) + (let ((a1-4 v1-15)) + (vector-! (-> a1-4 dir) (-> a1-4 dest-pos) (-> a1-4 current-pos)) + (set! (-> a1-4 dir y) 0.0) + (let ((a2-3 (-> a1-4 dir))) + (let ((f0-2 1.0)) + (.lvf vf1 (&-> a2-3 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a3-2 f0-2)) + (.mov vf3 a3-2) + ) + ) + (.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-3 quad) vf1) + ) + (set! (-> a1-4 next-poly) #f) + (set! (-> a1-4 len) 0.0) + (set! (-> a1-4 last-edge) -1) + (set! (-> a1-4 terminated) #f) + (set! (-> a1-4 reached-dest) #f) + (set! (-> a1-4 hit-boundary) #f) + (set! (-> a1-4 hit-gap) #f) + (set! (-> a1-4 ignore) (the-as uint 3)) + ) + 0 + (until (or (>= a0-15 15) (-> v1-15 terminated)) + (+! a0-15 1) + (let ((a2-6 (-> this mesh)) + (a1-6 v1-15) + ) + (set! sv-192 -1) + (set! sv-200 (-> a2-6 work)) + (set! sv-204 (-> a1-6 current-poly)) + (set! sv-208 (-> a1-6 current-poly vertex-count)) + (set! sv-212 (-> a2-6 work vert0-table)) + (set! sv-216 (-> a2-6 work vert1-table)) + (set! sv-220 (- (-> a1-6 dest-pos x) (-> a1-6 current-pos x))) + (set! sv-224 (- (-> a1-6 dest-pos z) (-> a1-6 current-pos z))) + (dotimes (a3-12 (the-as int sv-208)) + (set! sv-228 (-> sv-204 vertex (-> sv-212 a3-12))) + (set! sv-232 (-> sv-204 vertex (-> sv-216 a3-12))) + (set! sv-236 (- (-> sv-228 z) (-> sv-232 z))) + (set! sv-240 (- (-> sv-232 x) (-> sv-228 x))) + (let ((f0-14 (+ (* sv-220 sv-236) (* sv-224 sv-240)))) + (when (< 0.0 f0-14) + (let ((f1-13 + (+ (* sv-236 (- (-> sv-228 x) (-> a1-6 current-pos x))) (* sv-240 (- (-> sv-228 z) (-> a1-6 current-pos z)))) + ) + ) + (when (< f1-13 f0-14) + (set! sv-192 a3-12) + (let ((f0-16 (fmax 0.0 (/ f1-13 f0-14)))) + (set! sv-220 (* sv-220 f0-16)) + (set! sv-224 (* sv-224 f0-16)) + ) + ) + ) + ) + ) + ) + (let ((f0-20 (+ (* sv-220 (-> a1-6 dir x)) (* sv-224 (-> a1-6 dir z))))) + (+! (-> a1-6 len) f0-20) + ) + 0 + (set! (-> a1-6 next-poly) #f) + (cond + ((= sv-192 -1) + (set! (-> a1-6 current-pos quad) (-> a1-6 dest-pos quad)) + (set! (-> a1-6 reached-dest) #t) + (set! (-> a1-6 terminated) #t) + ) + (else + (+! (-> a1-6 current-pos x) sv-220) + (+! (-> a1-6 current-pos z) sv-224) + (set! sv-244 (-> sv-204 adj-poly sv-192)) + (if (!= sv-244 255) + (set! (-> a1-6 next-poly) (-> a2-6 poly-array sv-244)) + ) + (cond + ((and (-> a1-6 next-poly) (not (logtest? (-> a1-6 next-poly pat) (-> a1-6 ignore)))) + (set! (-> a1-6 current-poly) (-> a1-6 next-poly)) + ) + (else + (set! (-> a1-6 last-edge) sv-192) + (if (-> a1-6 next-poly) + (set! (-> a1-6 hit-gap) #t) + (set! (-> a1-6 hit-boundary) #t) + ) + (set! (-> a1-6 terminated) #t) + ) + ) + ) + ) + ) + 0 + ) + ) + (cond + ((or (-> v1-15 reached-dest) (-> v1-15 hit-gap) (>= (-> v1-15 len) 4096.0)) + (set! (-> this travel quad) (-> s5-0 out-travel 0 quad)) + ) + (else + (set! (-> this travel quad) (-> s5-0 out-travel 1 quad)) + (logior! (-> this flags) (nav-state-flag trapped-by-sphere)) + ) + ) + ) + ) + ) + 0 + 0 + (none) + ) + ) + +;; definition for method 54 of type nav-state +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod navigate-within-poly ((this nav-state)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (set! (-> this target-dir quad) (-> this travel quad)) + (let ((v1-1 (-> this target-dir))) + (let ((f0-0 1.0)) + (.lvf vf1 (&-> v1-1 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-4 f0-0)) + (.mov vf3 a0-4) + ) + ) + (.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-1 quad) vf1) + ) + (cond + ((logtest? (-> this nav flags) (nav-control-flag limit-rotation-rate)) + (let ((s5-0 (nav-state-method-39 this))) + (let* ((f0-1 40.96) + (f0-3 (* f0-1 f0-1)) + (v1-8 (-> this travel)) + ) + (when (< f0-3 (+ (* (-> v1-8 x) (-> v1-8 x)) (* (-> v1-8 z) (-> v1-8 z)))) + (set! (-> this heading quad) (-> this travel quad)) + (set! (-> this heading y) 0.0) + (let ((v1-12 (-> this heading))) + (let ((f0-5 1.0)) + (.lvf vf1 (&-> v1-12 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-9 f0-5)) + (.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-12 quad) vf1) + ) + ) + ) + (let ((f0-6 (find-first-sphere-and-update-avoid-params + (-> this nav) + (-> this travel) + (the-as nav-avoid-spheres-params #f) + ) + ) + ) + (when (>= f0-6 0.0) + (vector-float*! (-> this travel) (-> this travel) f0-6) + (let ((f0-7 (* f0-6 (-> this nav nav-cull-radius)))) + (if (and (not s5-0) (>= 40.96 f0-7)) + (logior! (-> this flags) (nav-state-flag blocked)) + ) + ) + ) + ) + ) + ) + (else + (let* ((f0-8 40.96) + (f0-10 (* f0-8 f0-8)) + (v1-26 (-> this travel)) + ) + (when (< f0-10 (+ (* (-> v1-26 x) (-> v1-26 x)) (* (-> v1-26 z) (-> v1-26 z)))) + (set! (-> this heading quad) (-> this travel quad)) + (set! (-> this heading y) 0.0) + (let ((v1-30 (-> this heading))) + (let ((f0-12 1.0)) + (.lvf vf1 (&-> v1-30 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-15 f0-12)) + (.mov vf3 a0-15) + ) + ) + (.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-30 quad) vf1) + ) + ) + ) + ) + ) + (if (not (logtest? (-> this flags) (nav-state-flag touching-sphere))) + (logclear! (-> this flags) (nav-state-flag trapped-by-sphere)) + ) + 0 + (none) + ) + ) + +;; definition for method 55 of type nav-state +;; WARN: Return type mismatch int vs none. +(defmethod clamp-travel-vector ((this nav-state)) + (let ((s5-0 (new 'stack-no-clear 'clamp-travel-vector-to-mesh-return-info))) + (clamp-vector-to-mesh-cross-gaps + (-> this mesh) + (-> this virtual-current-pos-local) + (-> this virtual-current-poly) + (-> this travel) + (-> this mesh work nav-poly-min-dist) + (not (or (logtest? (-> this nav flags) (nav-control-flag no-redirect-in-clamp)) + (logtest? (-> this nav flags) (nav-control-flag limit-rotation-rate)) + ) + ) + s5-0 + ) + (when (-> s5-0 gap-poly) + (set! (-> this next-poly) (-> s5-0 gap-poly)) + (let* ((v1-12 (-> this travel)) + (f0-4 (+ (* (-> v1-12 x) (-> v1-12 x)) (* (-> v1-12 z) (-> v1-12 z)))) + (f1-3 1024.0) + ) + (if (< f0-4 (* f1-3 f1-3)) + (logior! (-> this flags) (nav-state-flag at-gap)) + ) + ) + ) + ) + (let ((v1-19 (new 'stack-no-clear 'vector))) + (vector-! v1-19 (-> this virtual-current-pos-local) (-> this current-pos-local)) + (vector+! (-> this travel) (-> this travel) v1-19) + ) + (set! (-> this travel y) 0.0) + 0 + (none) + ) + +;; definition for method 11 of type nav-state +;; INFO: Used lq/sq +(defmethod plan-over-pat1-polys-using-route ((this nav-state) (arg0 nav-gap-info)) + (local-vars (sv-48 vector) (sv-52 vector) (sv-56 number)) + (let ((a1-1 (-> this next-poly))) + (when (logtest? (-> a1-1 pat) 1) + (while (and a1-1 (logtest? (-> a1-1 pat) 1)) + (set! a1-1 (lookup-poly-on-route-to-target (-> this mesh) a1-1 (-> this target-poly))) + ) + (when (and a1-1 (!= a1-1 (-> this current-poly))) + (set! (-> arg0 poly) a1-1) + (-> this mesh) + (let ((s3-0 (-> arg0 poly)) + (s4-0 (-> arg0 dest)) + ) + (let ((s2-0 (-> this current-pos-local))) + (set! sv-48 (new 'stack-no-clear 'vector)) + (set! sv-52 (new 'stack-no-clear 'vector)) + (set! sv-56 10000000000000000000000000000000000000.0) + (let* ((s1-0 (-> s3-0 vertex-count)) + (v1-13 (the-as int (+ s1-0 -1))) + ) + (dotimes (s0-0 (the-as int s1-0)) + (let ((f0-1 (vector-segment-distance-point! s2-0 (-> s3-0 vertex v1-13) (-> s3-0 vertex s0-0) sv-48))) + (when (< f0-1 (the-as float sv-56)) + (set! sv-56 f0-1) + (set! (-> sv-52 quad) (-> sv-48 quad)) + ) + ) + (set! v1-13 s0-0) + ) + ) + ) + (set! (-> s4-0 quad) (-> sv-52 quad)) + ) + (vector+! (-> arg0 dest) (-> arg0 dest) (the-as vector (-> this mesh bounds))) + #t + ) + ) + ) + ) + +;; definition for method 24 of type nav-state +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod turn-and-navigate-to-destination ((this nav-state)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (set! (-> this rotation-rate) (-> this nav max-rotation-rate)) + (if (< 0.0 (-> this speed)) + (set! (-> this rotation-rate) + (fmin + (-> this rotation-rate) + (* (/ (-> this nav turning-acceleration) (-> this speed)) (-> this mesh work rad-to-deg)) + ) + ) + ) + (when (logtest? (-> this nav flags) (nav-control-flag update-heading-from-facing)) + (vector-z-quaternion! (-> this heading) (-> this nav shape quat)) + (set! (-> this heading y) 0.0) + (let ((v1-12 (-> this heading))) + (let ((f0-5 1.0)) + (.lvf vf1 (&-> v1-12 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-3 f0-5)) + (.mov vf3 a0-3) + ) + ) + (.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-12 quad) vf1) + ) + ) + (let ((v1-13 (new 'stack-no-clear 'inline-array 'vector 1))) + (if (logtest? (-> this flags) (nav-state-flag use-position)) + (set! (-> v1-13 0 quad) (-> this virtual-current-pos-local quad)) + (set! (-> v1-13 0 quad) (-> this nav shape trans quad)) + ) + (if (or (not (-> this current-poly)) + (!= (-> this current-pos x) (-> v1-13 0 x)) + (!= (-> this current-pos z) (-> v1-13 0 z)) + ) + (do-navigation-to-destination this (-> v1-13 0)) + ) + ) + (logclear! + (-> this flags) + (nav-state-flag blocked in-target-poly at-target avoiding-sphere touching-sphere at-gap use-position) + ) + 0 + (none) + ) + ) + +;; definition for method 25 of type nav-state +;; WARN: Return type mismatch int vs none. +(defmethod navigate-using-route-portals-wrapper ((this nav-state)) + (navigate-using-route-portals this) + 0 + (none) + ) + +;; definition for method 26 of type nav-state +;; WARN: Return type mismatch int vs none. +(defmethod navigate-using-best-dir-recompute-avoid-spheres-1-wrapper ((this nav-state)) + (navigate-using-best-dir-recompute-avoid-spheres-1 this) + 0 + (none) + ) + +;; definition for method 27 of type nav-state +;; WARN: Return type mismatch int vs none. +(defmethod navigate-within-poly-wrapper ((this nav-state)) + (navigate-within-poly this) + 0 + (none) + ) + +;; definition for method 28 of type nav-state +;; WARN: Return type mismatch int vs none. +(defmethod compute-travel-speed ((this nav-state)) + (local-vars (sv-192 float) (sv-196 float) (sv-200 float) (sv-204 float) (sv-224 vector)) + (let ((s5-0 this)) + (let ((s4-0 (new 'stack-no-clear 'clamp-travel-vector-to-mesh-return-info))) + (clamp-vector-to-mesh-cross-gaps + (-> s5-0 mesh) + (-> s5-0 virtual-current-pos-local) + (-> s5-0 virtual-current-poly) + (-> s5-0 travel) + (-> s5-0 mesh work nav-poly-min-dist) + (not (or (logtest? (-> s5-0 nav flags) (nav-control-flag no-redirect-in-clamp)) + (logtest? (-> s5-0 nav flags) (nav-control-flag limit-rotation-rate)) + ) + ) + s4-0 + ) + (when (-> s4-0 gap-poly) + (set! (-> s5-0 next-poly) (-> s4-0 gap-poly)) + (let* ((v1-12 (-> s5-0 travel)) + (f0-4 (+ (* (-> v1-12 x) (-> v1-12 x)) (* (-> v1-12 z) (-> v1-12 z)))) + (f1-3 1024.0) + ) + (if (< f0-4 (* f1-3 f1-3)) + (logior! (-> s5-0 flags) (nav-state-flag at-gap)) + ) + ) + ) + ) + (let ((v1-19 (new 'stack-no-clear 'vector))) + (vector-! v1-19 (-> s5-0 virtual-current-pos-local) (-> s5-0 current-pos-local)) + (vector+! (-> s5-0 travel) (-> s5-0 travel) v1-19) + ) + (set! (-> s5-0 travel y) 0.0) + ) + 0 + (cond + ((logtest? (-> this nav flags) (nav-control-flag use-momentum)) + (set! sv-192 (-> this nav target-speed)) + (if (not (logtest? (-> this nav flags) (nav-control-flag momentum-ignore-heading))) + (set! sv-192 (* sv-192 (fmax 0.0 (vector-dot (-> this heading) (-> this target-dir))))) + ) + (set! sv-196 (- sv-192 (-> this speed))) + (set! sv-200 (* (-> this nav sec-per-frame) (-> this nav acceleration))) + (set! sv-204 (fmin sv-200 (fabs sv-196))) + (if (< sv-196 0.0) + (set! (-> this speed) (- (-> this speed) sv-204)) + (+! (-> this speed) sv-204) + ) + ) + (else + (set! (-> this speed) (-> this nav target-speed)) + ) + ) + (let* ((f0-22 (/ (vector-length (-> this travel)) (-> this nav sec-per-frame))) + (f1-18 (fmin (* (-> this nav speed-scale) (-> this speed)) f0-22)) + ) + (set! sv-224 (new 'stack-no-clear 'vector)) + (when (< f0-22 (-> this speed)) + (set! (-> this prev-speed) (-> this speed)) + (set! (-> this speed) (/ f0-22 (-> this nav speed-scale))) + ) + (vector-normalize-copy! sv-224 (-> this travel) f1-18) + ) + (set! (-> this velocity x) (-> sv-224 x)) + (set! (-> this velocity z) (-> sv-224 z)) + 0 + (none) + ) + +;; definition for method 34 of type nav-state +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod navigate-v1! ((this nav-state)) + (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 this)) + (set! (-> s5-0 rotation-rate) (-> s5-0 nav max-rotation-rate)) + (if (< 0.0 (-> s5-0 speed)) + (set! (-> s5-0 rotation-rate) + (fmin + (-> s5-0 rotation-rate) + (* (/ (-> s5-0 nav turning-acceleration) (-> s5-0 speed)) (-> s5-0 mesh work rad-to-deg)) + ) + ) + ) + (when (logtest? (-> s5-0 nav flags) (nav-control-flag update-heading-from-facing)) + (vector-z-quaternion! (-> s5-0 heading) (-> s5-0 nav shape quat)) + (set! (-> s5-0 heading y) 0.0) + (let ((v1-12 (-> s5-0 heading))) + (let ((f0-5 1.0)) + (.lvf vf1 (&-> v1-12 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-3 f0-5)) + (.mov vf3 a0-3) + ) + ) + (.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-12 quad) vf1) + ) + ) + (let ((v1-13 (new 'stack-no-clear 'inline-array 'vector 1))) + (if (logtest? (-> s5-0 flags) (nav-state-flag use-position)) + (set! (-> v1-13 0 quad) (-> s5-0 virtual-current-pos-local quad)) + (set! (-> v1-13 0 quad) (-> s5-0 nav shape trans quad)) + ) + (if (or (not (-> s5-0 current-poly)) + (!= (-> s5-0 current-pos x) (-> v1-13 0 x)) + (!= (-> s5-0 current-pos z) (-> v1-13 0 z)) + ) + (do-navigation-to-destination s5-0 (-> v1-13 0)) + ) + ) + (logclear! + (-> s5-0 flags) + (nav-state-flag blocked in-target-poly at-target avoiding-sphere touching-sphere at-gap use-position) + ) + ) + 0 + (navigate-using-route-portals this) + 0 + (let* ((v1-20 (-> this nav)) + (a0-18 (-> v1-20 state mesh sphere-hash sphere-array)) + (a1-9 (-> v1-20 sphere-id-array)) + (a2-1 (-> v1-20 state mesh bounds)) + (a3-0 (-> v1-20 root-nav-sphere)) + (t0-0 (-> v1-20 sphere-count)) + ) + (dotimes (t1-0 t0-0) + (let ((t3-0 (-> a0-18 (-> a1-9 t1-0))) + (t2-4 (-> v1-20 sphere-array t1-0)) + ) + (vector-! (the-as vector t2-4) (the-as vector t3-0) (the-as vector a2-1)) + (set! (-> t2-4 r) (+ (-> t3-0 r) (-> a3-0 w))) + ) + ) + ) + 0 + (navigate-using-best-dir-recompute-avoid-spheres-1 this) + 0 + (navigate-within-poly this) + 0 + (compute-travel-speed this) + 0 + (none) + ) + ) + +;; definition for method 35 of type nav-state +;; WARN: Return type mismatch int vs none. +(defmethod reset-target! ((this nav-state)) + (vector-reset! (-> this target-dir)) + 0 + (none) + ) + +;; definition for method 36 of type nav-state +;; WARN: Return type mismatch int vs none. +(defmethod add-offset-to-target! ((this nav-state) (arg0 vector)) + (vector+! (-> this target-dir) (-> this target-dir) arg0) + 0 + (none) + ) + +;; definition for method 29 of type nav-state +;; WARN: Return type mismatch int vs none. +(defmethod nav-state-method-29 ((this nav-state)) + 0 + (none) + ) + +;; definition for method 30 of type nav-state +;; WARN: Return type mismatch int vs none. +(defmethod nav-state-method-30 ((this nav-state)) + 0 + (none) + ) + +;; definition for method 31 of type nav-state +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod navigate-using-best-dir-recompute-avoid-spheres-2 ((this nav-state)) + (local-vars + (sv-192 int) + (sv-200 nav-mesh-work) + (sv-204 nav-poly) + (sv-208 uint) + (sv-212 (pointer int8)) + (sv-216 (pointer int8)) + (sv-220 float) + (sv-224 float) + (sv-228 vector) + (sv-232 vector) + (sv-236 float) + (sv-240 float) + (sv-244 uint) + ) + (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 (new 'stack-no-clear 'nav-avoid-spheres-params))) + (set! (-> s5-0 current-pos quad) (-> this virtual-current-pos-local quad)) + (set! (-> s5-0 travel quad) (-> this travel quad)) + (set! (-> s5-0 pref-dir quad) (-> (if (logtest? (-> this flags) (nav-state-flag trapped-by-sphere)) + (-> this heading) + (-> this travel) + ) + quad + ) + ) + (avoid-spheres-2! (-> this nav) s5-0) + (let ((v1-5 this)) + (when (-> s5-0 avoiding-sphere?) + (logior! (-> v1-5 flags) (nav-state-flag avoiding-sphere)) + (let ((f0-0 (-> s5-0 closest-sphere-dist2)) + (f1-0 512.0) + ) + (if (< f0-0 (* f1-0 f1-0)) + (logior! (-> v1-5 flags) (nav-state-flag touching-sphere)) + ) + ) + (set! (-> v1-5 travel quad) (-> s5-0 out-travel 0 quad)) + (let ((a0-20 (new 'stack-no-clear 'nav-ray))) + (set! (-> a0-20 current-pos quad) (-> v1-5 virtual-current-pos-local quad)) + (set! (-> a0-20 current-poly) (-> v1-5 virtual-current-poly)) + (vector+! (-> a0-20 dest-pos) (-> v1-5 virtual-current-pos-local) (-> v1-5 travel)) + (let ((a1-6 0)) + (let ((a2-3 a0-20)) + (vector-! (-> a2-3 dir) (-> a2-3 dest-pos) (-> a2-3 current-pos)) + (set! (-> a2-3 dir y) 0.0) + (let ((a3-3 (-> a2-3 dir))) + (let ((f0-2 1.0)) + (.lvf vf1 (&-> a3-3 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((t0-2 f0-2)) + (.mov vf3 t0-2) + ) + ) + (.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 (&-> a3-3 quad) vf1) + ) + (set! (-> a2-3 next-poly) #f) + (set! (-> a2-3 len) 0.0) + (set! (-> a2-3 last-edge) -1) + (set! (-> a2-3 terminated) #f) + (set! (-> a2-3 reached-dest) #f) + (set! (-> a2-3 hit-boundary) #f) + (set! (-> a2-3 hit-gap) #f) + (set! (-> a2-3 ignore) (the-as uint 3)) + ) + 0 + (until (or (>= a1-6 15) (-> a0-20 terminated)) + (+! a1-6 1) + (let ((a3-6 (-> v1-5 mesh)) + (a2-5 a0-20) + ) + (set! sv-192 -1) + (set! sv-200 (-> a3-6 work)) + (set! sv-204 (-> a2-5 current-poly)) + (set! sv-208 (-> a2-5 current-poly vertex-count)) + (set! sv-212 (-> a3-6 work vert0-table)) + (set! sv-216 (-> a3-6 work vert1-table)) + (set! sv-220 (- (-> a2-5 dest-pos x) (-> a2-5 current-pos x))) + (set! sv-224 (- (-> a2-5 dest-pos z) (-> a2-5 current-pos z))) + (dotimes (t0-12 (the-as int sv-208)) + (set! sv-228 (-> sv-204 vertex (-> sv-212 t0-12))) + (set! sv-232 (-> sv-204 vertex (-> sv-216 t0-12))) + (set! sv-236 (- (-> sv-228 z) (-> sv-232 z))) + (set! sv-240 (- (-> sv-232 x) (-> sv-228 x))) + (let ((f0-14 (+ (* sv-220 sv-236) (* sv-224 sv-240)))) + (when (< 0.0 f0-14) + (let ((f1-13 + (+ (* sv-236 (- (-> sv-228 x) (-> a2-5 current-pos x))) (* sv-240 (- (-> sv-228 z) (-> a2-5 current-pos z)))) + ) + ) + (when (< f1-13 f0-14) + (set! sv-192 t0-12) + (let ((f0-16 (fmax 0.0 (/ f1-13 f0-14)))) + (set! sv-220 (* sv-220 f0-16)) + (set! sv-224 (* sv-224 f0-16)) + ) + ) + ) + ) + ) + ) + (let ((f0-20 (+ (* sv-220 (-> a2-5 dir x)) (* sv-224 (-> a2-5 dir z))))) + (+! (-> a2-5 len) f0-20) + ) + 0 + (set! (-> a2-5 next-poly) #f) + (cond + ((= sv-192 -1) + (set! (-> a2-5 current-pos quad) (-> a2-5 dest-pos quad)) + (set! (-> a2-5 reached-dest) #t) + (set! (-> a2-5 terminated) #t) + ) + (else + (+! (-> a2-5 current-pos x) sv-220) + (+! (-> a2-5 current-pos z) sv-224) + (set! sv-244 (-> sv-204 adj-poly sv-192)) + (if (!= sv-244 255) + (set! (-> a2-5 next-poly) (-> a3-6 poly-array sv-244)) + ) + (cond + ((and (-> a2-5 next-poly) (not (logtest? (-> a2-5 next-poly pat) (-> a2-5 ignore)))) + (set! (-> a2-5 current-poly) (-> a2-5 next-poly)) + ) + (else + (set! (-> a2-5 last-edge) sv-192) + (if (-> a2-5 next-poly) + (set! (-> a2-5 hit-gap) #t) + (set! (-> a2-5 hit-boundary) #t) + ) + (set! (-> a2-5 terminated) #t) + ) + ) + ) + ) + ) + 0 + ) + ) + (cond + ((or (-> a0-20 reached-dest) (-> a0-20 hit-gap) (>= (-> a0-20 len) 4096.0)) + (set! (-> v1-5 travel quad) (-> s5-0 out-travel 0 quad)) + ) + (else + (set! (-> v1-5 travel quad) (-> s5-0 out-travel 1 quad)) + (logior! (-> v1-5 flags) (nav-state-flag trapped-by-sphere)) + ) + ) + ) + ) + ) + ) + 0 + (if (not (logtest? (-> this flags) (nav-state-flag touching-sphere))) + (logclear! (-> this flags) (nav-state-flag trapped-by-sphere)) + ) + 0 + (none) + ) + ) + +;; definition for method 32 of type nav-state +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod update-travel-dir-from-spheres ((this nav-state)) + (local-vars (v1-11 float) (v1-25 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'nav-control-cfs-work))) + (vector-reset! (-> s5-0 in-dir)) + (set! (-> s5-0 best-dir 0 quad) (-> this travel quad)) + (set! (-> s5-0 best-dir 0 y) 0.0) + (vector-normalize! (the-as vector (-> s5-0 best-dir)) (-> this nav target-speed)) + (vector-! (-> s5-0 right-dir) (the-as vector (-> s5-0 best-dir)) (-> this velocity)) + (vector-float*! (-> s5-0 right-dir) (-> s5-0 right-dir) 4.0) + (vector+! (-> s5-0 in-dir) (-> s5-0 in-dir) (-> s5-0 right-dir)) + (dotimes (s4-0 (-> this nav sphere-count)) + (let ((s3-0 (-> this nav sphere-array s4-0))) + (vector-! (-> s5-0 right-dir) (-> this current-pos-local) (the-as vector s3-0)) + (.lvf vf1 (&-> (-> s5-0 right-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-11 vf1) + (let ((f30-0 v1-11)) + (vector-normalize! (-> s5-0 right-dir) 2.0) + (let* ((f0-4 (+ (-> this nav root-nav-sphere w) (-> s3-0 r))) + (f1-1 (* f0-4 f0-4)) + (f0-7 (fmax 0.0 (/ (- f1-1 f30-0) f1-1))) + ) + (vector-float*! (-> s5-0 right-dir) (-> s5-0 right-dir) (* 81920.0 f0-7)) + ) + ) + ) + (vector+! (-> s5-0 in-dir) (-> s5-0 in-dir) (-> s5-0 right-dir)) + ) + (vector+! (-> this target-dir) (-> this target-dir) (-> s5-0 in-dir)) + ) + (set! (-> this target-dir y) 0.0) + (vector+float*! (-> this velocity) (-> this velocity) (-> this target-dir) (-> this nav sec-per-frame)) + (.lvf vf1 (&-> (-> this 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) + (let ((f0-11 v1-25) + (f1-4 (-> this nav target-speed)) + ) + (if (< (* f1-4 f1-4) f0-11) + (vector-float*! (-> this velocity) (-> this velocity) (/ (-> this nav target-speed) (sqrtf f0-11))) + ) + ) + (vector-float*! (-> this travel) (-> this velocity) (-> this nav sec-per-frame)) + 0 + (none) + ) + ) + +;; definition for method 33 of type nav-state +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod compute-speed-simple ((this nav-state)) + (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 (new 'stack-no-clear 'clamp-travel-vector-to-mesh-return-info))) + (clamp-vector-to-mesh-cross-gaps + (-> this mesh) + (-> this virtual-current-pos-local) + (-> this virtual-current-poly) + (-> this travel) + (-> this mesh work nav-poly-min-dist) + #t + s5-0 + ) + (if (-> s5-0 gap-poly) + (set! (-> this next-poly) (-> s5-0 gap-poly)) + ) + ) + (let* ((f0-1 40.96) + (f0-3 (* f0-1 f0-1)) + (v1-9 (-> this travel)) + ) + (when (< f0-3 (+ (* (-> v1-9 x) (-> v1-9 x)) (* (-> v1-9 z) (-> v1-9 z)))) + (set! (-> this heading quad) (-> this travel quad)) + (set! (-> this heading y) 0.0) + (let ((v1-13 (-> this heading))) + (let ((f0-5 1.0)) + (.lvf vf1 (&-> v1-13 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-5 f0-5)) + (.mov vf3 a0-5) + ) + ) + (.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-13 quad) vf1) + ) + ) + ) + (vector-float*! (-> this velocity) (-> this travel) (/ 1.0 (-> this nav sec-per-frame))) + (set! (-> this speed) (vector-length (-> this velocity))) + (vector-reset! (-> this target-dir)) + 0 + (none) + ) + ) + +;; definition for method 37 of type nav-state +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod navigate-v2! ((this nav-state)) + (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 this)) + (set! (-> s5-0 rotation-rate) (-> s5-0 nav max-rotation-rate)) + (if (< 0.0 (-> s5-0 speed)) + (set! (-> s5-0 rotation-rate) + (fmin + (-> s5-0 rotation-rate) + (* (/ (-> s5-0 nav turning-acceleration) (-> s5-0 speed)) (-> s5-0 mesh work rad-to-deg)) + ) + ) + ) + (when (logtest? (-> s5-0 nav flags) (nav-control-flag update-heading-from-facing)) + (vector-z-quaternion! (-> s5-0 heading) (-> s5-0 nav shape quat)) + (set! (-> s5-0 heading y) 0.0) + (let ((v1-12 (-> s5-0 heading))) + (let ((f0-5 1.0)) + (.lvf vf1 (&-> v1-12 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-3 f0-5)) + (.mov vf3 a0-3) + ) + ) + (.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-12 quad) vf1) + ) + ) + (let ((v1-13 (new 'stack-no-clear 'inline-array 'vector 1))) + (if (logtest? (-> s5-0 flags) (nav-state-flag use-position)) + (set! (-> v1-13 0 quad) (-> s5-0 virtual-current-pos-local quad)) + (set! (-> v1-13 0 quad) (-> s5-0 nav shape trans quad)) + ) + (if (or (not (-> s5-0 current-poly)) + (!= (-> s5-0 current-pos x) (-> v1-13 0 x)) + (!= (-> s5-0 current-pos z) (-> v1-13 0 z)) + ) + (do-navigation-to-destination s5-0 (-> v1-13 0)) + ) + ) + (logclear! + (-> s5-0 flags) + (nav-state-flag blocked in-target-poly at-target avoiding-sphere touching-sphere at-gap use-position) + ) + ) + 0 + (navigate-using-route-portals this) + 0 + (let* ((v1-20 (-> this nav)) + (a0-18 (-> v1-20 state mesh sphere-hash sphere-array)) + (a1-9 (-> v1-20 sphere-id-array)) + (a2-1 (-> v1-20 state mesh bounds)) + (a3-0 (-> v1-20 root-nav-sphere)) + (t0-0 (-> v1-20 sphere-count)) + ) + (dotimes (t1-0 t0-0) + (let ((t3-0 (-> a0-18 (-> a1-9 t1-0))) + (t2-4 (-> v1-20 sphere-array t1-0)) + ) + (vector-! (the-as vector t2-4) (the-as vector t3-0) (the-as vector a2-1)) + (set! (-> t2-4 r) (+ (-> t3-0 r) (-> a3-0 w))) + ) + ) + ) + 0 + (navigate-using-best-dir-recompute-avoid-spheres-2 this) + (update-travel-dir-from-spheres this) + (compute-speed-simple this) + 0 + (none) + ) + ) + +;; definition for symbol *null-nav-callback-info*, type nav-callback-info +(define *null-nav-callback-info* (new 'static 'nav-callback-info)) + +;; definition for symbol *default-nav-callback-info*, type nav-callback-info +(define *default-nav-callback-info* + (new 'static 'nav-callback-info + :callback-count 5 + :callback-array (new 'static 'array (function object nav-control none) 10 + (lambda ((arg0 object) (arg1 nav-control)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (-> arg1 state))) + (set! (-> gp-0 rotation-rate) (-> gp-0 nav max-rotation-rate)) + (if (< 0.0 (-> gp-0 speed)) + (set! (-> gp-0 rotation-rate) + (fmin + (-> gp-0 rotation-rate) + (* (/ (-> gp-0 nav turning-acceleration) (-> gp-0 speed)) (-> gp-0 mesh work rad-to-deg)) + ) + ) + ) + (when (logtest? (-> gp-0 nav flags) (nav-control-flag update-heading-from-facing)) + (vector-z-quaternion! (-> gp-0 heading) (-> gp-0 nav shape quat)) + (set! (-> gp-0 heading y) 0.0) + (let ((v1-12 (-> gp-0 heading))) + (let ((f0-5 1.0)) + (.lvf vf1 (&-> v1-12 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-3 f0-5)) + (.mov vf3 a0-3) + ) + ) + (.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-12 quad) vf1) + ) + ) + (let ((v1-13 (new 'stack-no-clear 'inline-array 'vector 1))) + (if (logtest? (-> gp-0 flags) (nav-state-flag use-position)) + (set! (-> v1-13 0 quad) (-> gp-0 virtual-current-pos-local quad)) + (set! (-> v1-13 0 quad) (-> gp-0 nav shape trans quad)) + ) + (if (or (not (-> gp-0 current-poly)) + (!= (-> gp-0 current-pos x) (-> v1-13 0 x)) + (!= (-> gp-0 current-pos z) (-> v1-13 0 z)) + ) + (do-navigation-to-destination gp-0 (-> v1-13 0)) + ) + ) + (logclear! + (-> gp-0 flags) + (nav-state-flag blocked in-target-poly at-target avoiding-sphere touching-sphere at-gap use-position) + ) + ) + 0 + 0 + (none) + ) + ) + (lambda ((arg0 object) (arg1 nav-control)) (navigate-using-route-portals (-> arg1 state)) 0 0 (none)) + (lambda ((arg0 object) (arg1 nav-control)) + (let* ((v1-0 arg1) + (a0-3 (-> v1-0 state mesh sphere-hash sphere-array)) + (a2-0 (-> v1-0 sphere-id-array)) + (a3-1 (-> v1-0 state mesh bounds)) + (t0-0 (-> v1-0 root-nav-sphere)) + (t1-0 (-> v1-0 sphere-count)) + ) + (dotimes (t2-0 t1-0) + (let ((t4-0 (-> a0-3 (-> a2-0 t2-0))) + (t3-4 (-> v1-0 sphere-array t2-0)) + ) + (vector-! (the-as vector t3-4) (the-as vector t4-0) (the-as vector a3-1)) + (set! (-> t3-4 r) (+ (-> t4-0 r) (-> t0-0 w))) + ) + ) + ) + 0 + (navigate-using-best-dir-recompute-avoid-spheres-1 (-> arg1 state)) + 0 + (none) + ) + (lambda ((arg0 object) (arg1 nav-control)) + (let* ((v1-0 arg1) + (a0-3 (-> v1-0 state mesh sphere-hash sphere-array)) + (a2-0 (-> v1-0 sphere-id-array)) + (a3-1 (-> v1-0 state mesh bounds)) + (t0-0 (-> v1-0 root-nav-sphere)) + (t1-0 (-> v1-0 sphere-count)) + ) + (dotimes (t2-0 t1-0) + (let ((t4-0 (-> a0-3 (-> a2-0 t2-0))) + (t3-4 (-> v1-0 sphere-array t2-0)) + ) + (vector-! (the-as vector t3-4) (the-as vector t4-0) (the-as vector a3-1)) + (set! (-> t3-4 r) (+ (-> t4-0 r) (-> t0-0 w))) + ) + ) + ) + 0 + (navigate-within-poly (-> arg1 state)) + 0 + 0 + (none) + ) + (lambda ((arg0 object) (arg1 nav-control)) (compute-travel-speed (-> arg1 state)) 0 (none)) + ) + ) + ) + +;; definition for symbol *physics-nav-callback-info*, type nav-callback-info +(define *physics-nav-callback-info* + (new 'static 'nav-callback-info + :callback-count 5 + :callback-array (new 'static 'array (function object nav-control none) 10 + (lambda ((arg0 object) (arg1 nav-control)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (-> arg1 state))) + (set! (-> gp-0 rotation-rate) (-> gp-0 nav max-rotation-rate)) + (if (< 0.0 (-> gp-0 speed)) + (set! (-> gp-0 rotation-rate) + (fmin + (-> gp-0 rotation-rate) + (* (/ (-> gp-0 nav turning-acceleration) (-> gp-0 speed)) (-> gp-0 mesh work rad-to-deg)) + ) + ) + ) + (when (logtest? (-> gp-0 nav flags) (nav-control-flag update-heading-from-facing)) + (vector-z-quaternion! (-> gp-0 heading) (-> gp-0 nav shape quat)) + (set! (-> gp-0 heading y) 0.0) + (let ((v1-12 (-> gp-0 heading))) + (let ((f0-5 1.0)) + (.lvf vf1 (&-> v1-12 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-3 f0-5)) + (.mov vf3 a0-3) + ) + ) + (.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-12 quad) vf1) + ) + ) + (let ((v1-13 (new 'stack-no-clear 'inline-array 'vector 1))) + (if (logtest? (-> gp-0 flags) (nav-state-flag use-position)) + (set! (-> v1-13 0 quad) (-> gp-0 virtual-current-pos-local quad)) + (set! (-> v1-13 0 quad) (-> gp-0 nav shape trans quad)) + ) + (if (or (not (-> gp-0 current-poly)) + (!= (-> gp-0 current-pos x) (-> v1-13 0 x)) + (!= (-> gp-0 current-pos z) (-> v1-13 0 z)) + ) + (do-navigation-to-destination gp-0 (-> v1-13 0)) + ) + ) + (logclear! + (-> gp-0 flags) + (nav-state-flag blocked in-target-poly at-target avoiding-sphere touching-sphere at-gap use-position) + ) + ) + 0 + 0 + (none) + ) + ) + (lambda ((arg0 object) (arg1 nav-control)) (navigate-using-route-portals (-> arg1 state)) 0 0 (none)) + (lambda ((arg0 object) (arg1 nav-control)) + (let* ((v1-0 arg1) + (a0-3 (-> v1-0 state mesh sphere-hash sphere-array)) + (a2-0 (-> v1-0 sphere-id-array)) + (a3-1 (-> v1-0 state mesh bounds)) + (t0-0 (-> v1-0 root-nav-sphere)) + (t1-0 (-> v1-0 sphere-count)) + ) + (dotimes (t2-0 t1-0) + (let ((t4-0 (-> a0-3 (-> a2-0 t2-0))) + (t3-4 (-> v1-0 sphere-array t2-0)) + ) + (vector-! (the-as vector t3-4) (the-as vector t4-0) (the-as vector a3-1)) + (set! (-> t3-4 r) (+ (-> t4-0 r) (-> t0-0 w))) + ) + ) + ) + 0 + (navigate-using-best-dir-recompute-avoid-spheres-2 (-> arg1 state)) + 0 + (none) + ) + (lambda ((arg0 object) (arg1 nav-control)) + (let* ((v1-0 arg1) + (a0-3 (-> v1-0 state mesh sphere-hash sphere-array)) + (a2-0 (-> v1-0 sphere-id-array)) + (a3-1 (-> v1-0 state mesh bounds)) + (t0-0 (-> v1-0 root-nav-sphere)) + (t1-0 (-> v1-0 sphere-count)) + ) + (dotimes (t2-0 t1-0) + (let ((t4-0 (-> a0-3 (-> a2-0 t2-0))) + (t3-4 (-> v1-0 sphere-array t2-0)) + ) + (vector-! (the-as vector t3-4) (the-as vector t4-0) (the-as vector a3-1)) + (set! (-> t3-4 r) (+ (-> t4-0 r) (-> t0-0 w))) + ) + ) + ) + 0 + (update-travel-dir-from-spheres (-> arg1 state)) + 0 + (none) + ) + (lambda ((arg0 object) (arg1 nav-control)) (compute-speed-simple (-> arg1 state)) 0 (none)) + ) + ) + ) diff --git a/test/decompiler/reference/jak3/engine/nav/nav-enemy-h_REF.gc b/test/decompiler/reference/jak3/engine/nav/nav-enemy-h_REF.gc new file mode 100644 index 0000000000..8474f68ee8 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/nav/nav-enemy-h_REF.gc @@ -0,0 +1,254 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type nav-enemy-info +(deftype nav-enemy-info (enemy-info) + ((callback-info nav-callback-info) + (use-momentum symbol) + (use-frustration symbol) + (use-stop-chase symbol) + (use-circling symbol) + (use-pacing symbol) + (walk-anim int32) + (turn-anim int32) + (run-anim int32) + (taunt-anim int32) + (run-travel-speed meters) + (run-acceleration meters) + (run-turning-acceleration meters) + (walk-travel-speed meters) + (walk-acceleration meters) + (walk-turning-acceleration meters) + (maximum-rotation-rate degrees) + (notice-nav-radius meters) + (frustration-distance meters) + (frustration-time time-frame) + (blocked-time time-frame) + (circle-dist-lo float) + (circle-dist-hi float) + (nav-mesh nav-mesh) + ) + (:methods + (copy! (_type_ nav-enemy-info) none) + ) + ) + +;; definition for method 3 of type nav-enemy-info +;; INFO: Used lq/sq +(defmethod inspect ((this nav-enemy-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tfact-defaults: ~A~%" (-> this fact-defaults)) + (format #t "~1Tuse-die-falling: ~A~%" (-> this use-die-falling)) + (format #t "~1Tuse-victory: ~A~%" (-> this use-victory)) + (format #t "~1Tuse-jump-blocked: ~A~%" (-> this use-jump-blocked)) + (format #t "~1Tdebug-draw-neck: ~A~%" (-> this debug-draw-neck)) + (format #t "~1Tjump-debug-draw: ~A~%" (-> this jump-debug-draw)) + (format #t "~1Tmove-to-ground: ~A~%" (-> this move-to-ground)) + (format #t "~1Thover-if-no-ground: ~A~%" (-> this hover-if-no-ground)) + (format #t "~1Tidle-anim-script: #x~X~%" (-> this idle-anim-script)) + (format #t "~1Tidle-anim: ~D~%" (-> this idle-anim)) + (format #t "~1Tnotice-anim: ~D~%" (-> this notice-anim)) + (format #t "~1Thostile-anim: ~D~%" (-> this hostile-anim)) + (format #t "~1Thit-anim: ~D~%" (-> this hit-anim)) + (format #t "~1Tknocked-anim: ~D~%" (-> this knocked-anim)) + (format #t "~1Tknocked-land-anim: ~D~%" (-> this knocked-land-anim)) + (format #t "~1Tdie-anim: ~D~%" (-> this die-anim)) + (format #t "~1Tdie-falling-anim: ~D~%" (-> this die-falling-anim)) + (format #t "~1Tvictory-anim: ~D~%" (-> this victory-anim)) + (format #t "~1Tjump-wind-up-anim: ~D~%" (-> this jump-wind-up-anim)) + (format #t "~1Tjump-in-air-anim: ~D~%" (-> this jump-in-air-anim)) + (format #t "~1Tjump-land-anim: ~D~%" (-> this jump-land-anim)) + (format #t "~1Tneck-joint: ~D~%" (-> this neck-joint)) + (format #t "~1Tlook-at-joint: ~D~%" (-> this look-at-joint)) + (format #t "~1Tbullseye-joint: ~D~%" (-> this bullseye-joint)) + (format #t "~1Tsound-hit: ~D~%" (-> this sound-hit)) + (format #t "~1Tsound-die: ~D~%" (-> this sound-die)) + (format #t "~1Tnotice-distance: (meters ~m)~%" (-> this notice-distance)) + (format #t "~1Tnotice-distance-delta: (meters ~m)~%" (-> this notice-distance-delta)) + (format #t "~1Tproximity-notice-distance: (meters ~m)~%" (-> this proximity-notice-distance)) + (format #t "~1Tdefault-hit-points: ~f~%" (-> this default-hit-points)) + (format #t "~1Tgnd-collide-with: ~D~%" (-> this gnd-collide-with)) + (format #t "~1Toverlaps-others-collide-with-filter: ~D~%" (-> this overlaps-others-collide-with-filter)) + (format #t "~1Tpenetrate-flinch: ~D~%" (-> this penetrate-flinch)) + (format #t "~1Tpenetrate-knocked: ~D~%" (-> this penetrate-knocked)) + (format #t "~1Tmovement-gravity: (meters ~m)~%" (-> this movement-gravity)) + (format #t "~1Tfriction: ~f~%" (-> this friction)) + (format #t "~1Tslip-factor: ~f~%" (-> this slip-factor)) + (format #t "~1Tattack-shove-back: (meters ~m)~%" (-> this attack-shove-back)) + (format #t "~1Tattack-shove-up: (meters ~m)~%" (-> this attack-shove-up)) + (format #t "~1Tattack-mode: ~A~%" (-> this attack-mode)) + (format #t "~1Tattack-damage: ~D~%" (-> this attack-damage)) + (format #t "~1Trecover-gnd-collide-with: ~D~%" (-> this recover-gnd-collide-with)) + (format #t "~1Tknocked-can-land-timeout: ~D~%" (-> this knocked-can-land-timeout)) + (format #t "~1Tknocked-recover-timeout: ~D~%" (-> this knocked-recover-timeout)) + (format #t "~1Tragdoll-blend-out-time: ~D~%" (-> this ragdoll-blend-out-time)) + (format #t "~1Tragdoll-rotate-velocity-mult: ~f~%" (-> this ragdoll-rotate-velocity-mult)) + (format #t "~1Tjump-height-min: (meters ~m)~%" (-> this jump-height-min)) + (format #t "~1Tjump-height-factor: ~f~%" (-> this jump-height-factor)) + (format #t "~1Tknocked-seek-ry-clamp: ~f~%" (-> this knocked-seek-ry-clamp)) + (format #t "~1Tknocked-soft-vxz-lo: ~f~%" (-> this knocked-soft-vxz-lo)) + (format #t "~1Tknocked-soft-vxz-hi: ~f~%" (-> this knocked-soft-vxz-hi)) + (format #t "~1Tknocked-soft-vy-lo: ~f~%" (-> this knocked-soft-vy-lo)) + (format #t "~1Tknocked-soft-vy-hi: ~f~%" (-> this knocked-soft-vy-hi)) + (format #t "~1Tknocked-medium-vxz-lo: ~f~%" (-> this knocked-medium-vxz-lo)) + (format #t "~1Tknocked-medium-vxz-hi: ~f~%" (-> this knocked-medium-vxz-hi)) + (format #t "~1Tknocked-medium-vy-lo: ~f~%" (-> this knocked-medium-vy-lo)) + (format #t "~1Tknocked-medium-vy-hi: ~f~%" (-> this knocked-medium-vy-hi)) + (format #t "~1Tknocked-hard-vxz-lo: ~f~%" (-> this knocked-hard-vxz-lo)) + (format #t "~1Tknocked-hard-vxz-hi: ~f~%" (-> this knocked-hard-vxz-hi)) + (format #t "~1Tknocked-hard-vy-lo: ~f~%" (-> this knocked-hard-vy-lo)) + (format #t "~1Tknocked-hard-vy-hi: ~f~%" (-> this knocked-hard-vy-hi)) + (format #t "~1Tknocked-huge-vxz-lo: ~f~%" (-> this knocked-huge-vxz-lo)) + (format #t "~1Tknocked-huge-vxz-hi: ~f~%" (-> this knocked-huge-vxz-hi)) + (format #t "~1Tknocked-huge-vy-lo: ~f~%" (-> this knocked-huge-vy-lo)) + (format #t "~1Tknocked-huge-vy-hi: ~f~%" (-> this knocked-huge-vy-hi)) + (format #t "~1Tknocked-yellow-vxz-lo: ~f~%" (-> this knocked-yellow-vxz-lo)) + (format #t "~1Tknocked-yellow-vxz-hi: ~f~%" (-> this knocked-yellow-vxz-hi)) + (format #t "~1Tknocked-yellow-vy-lo: ~f~%" (-> this knocked-yellow-vy-lo)) + (format #t "~1Tknocked-yellow-vy-hi: ~f~%" (-> this knocked-yellow-vy-hi)) + (format #t "~1Tknocked-red-vxz-lo: ~f~%" (-> this knocked-red-vxz-lo)) + (format #t "~1Tknocked-red-vxz-hi: ~f~%" (-> this knocked-red-vxz-hi)) + (format #t "~1Tknocked-red-vy-lo: ~f~%" (-> this knocked-red-vy-lo)) + (format #t "~1Tknocked-red-vy-hi: ~f~%" (-> this knocked-red-vy-hi)) + (format #t "~1Tknocked-blue-vxz-lo: ~f~%" (-> this knocked-blue-vxz-lo)) + (format #t "~1Tknocked-blue-vxz-hi: ~f~%" (-> this knocked-blue-vxz-hi)) + (format #t "~1Tknocked-blue-vy-lo: ~f~%" (-> this knocked-blue-vy-lo)) + (format #t "~1Tknocked-blue-vy-hi: ~f~%" (-> this knocked-blue-vy-hi)) + (format #t "~1Tragdoll-info: #~%" (-> this ragdoll-info)) + (format #t "~1Tshadow-size: (meters ~m)~%" (-> this shadow-size)) + (format #t "~1Tshadow-max-y: (meters ~m)~%" (-> this shadow-max-y)) + (format #t "~1Tshadow-min-y: (meters ~m)~%" (-> this shadow-min-y)) + (format #t "~1Tshadow-locus-dist: (meters ~m)~%" (-> this shadow-locus-dist)) + (format #t "~1Tgem-joint: ~D~%" (-> this gem-joint)) + (format #t "~1Tgem-seg: ~D~%" (-> this gem-seg)) + (format #t "~1Tgem-no-seg: ~D~%" (-> this gem-no-seg)) + (format #t "~1Tgem-offset: #~%" (-> this gem-offset)) + (format #t "~1Tknocked-off: ~A~%" (-> this knocked-off)) + (format #t "~1Tcallback-info: #~%" (-> this callback-info)) + (format #t "~1Tuse-momentum: ~A~%" (-> this use-momentum)) + (format #t "~1Tuse-frustration: ~A~%" (-> this use-frustration)) + (format #t "~1Tuse-stop-chase: ~A~%" (-> this use-stop-chase)) + (format #t "~1Tuse-circling: ~A~%" (-> this use-circling)) + (format #t "~1Tuse-pacing: ~A~%" (-> this use-pacing)) + (format #t "~1Twalk-anim: ~D~%" (-> this walk-anim)) + (format #t "~1Tturn-anim: ~D~%" (-> this turn-anim)) + (format #t "~1Trun-anim: ~D~%" (-> this run-anim)) + (format #t "~1Ttaunt-anim: ~D~%" (-> this taunt-anim)) + (format #t "~1Trun-travel-speed: (meters ~m)~%" (-> this run-travel-speed)) + (format #t "~1Trun-acceleration: (meters ~m)~%" (-> this run-acceleration)) + (format #t "~1Trun-turning-acceleration: (meters ~m)~%" (-> this run-turning-acceleration)) + (format #t "~1Twalk-travel-speed: (meters ~m)~%" (-> this walk-travel-speed)) + (format #t "~1Twalk-acceleration: (meters ~m)~%" (-> this walk-acceleration)) + (format #t "~1Twalk-turning-acceleration: (meters ~m)~%" (-> this walk-turning-acceleration)) + (format #t "~1Tmaximum-rotation-rate: (deg ~r)~%" (-> this maximum-rotation-rate)) + (format #t "~1Tnotice-nav-radius: (meters ~m)~%" (-> this notice-nav-radius)) + (format #t "~1Tfrustration-distance: (meters ~m)~%" (-> this frustration-distance)) + (format #t "~1Tfrustration-time: ~D~%" (-> this frustration-time)) + (format #t "~1Tblocked-time: ~D~%" (-> this blocked-time)) + (format #t "~1Tcircle-dist-lo: ~f~%" (-> this circle-dist-lo)) + (format #t "~1Tcircle-dist-hi: ~f~%" (-> this circle-dist-hi)) + (format #t "~1Tnav-mesh: ~A~%" (-> this nav-mesh)) + (label cfg-4) + this + ) + +;; definition of type nav-enemy +(deftype nav-enemy (enemy) + ((enemy-info nav-enemy-info :override) + (frustration-point vector :inline) + (move-dest vector :inline) + (frustration-time time-frame) + (blocked-start-time time-frame) + (restore-nav-radius-time time-frame) + (nav-radius-backup float) + (circle-radial-dist float :overlay-at desired-angle) + ) + (:state-methods + taunt + pacing + circling + stop-chase + debug-control + ) + (:methods + (normalize-heading! (_type_ nav-control) none) + (nav-enemy-method-161 (_type_ nav-control) none) + (nav-enemy-method-162 (_type_) none) + (nav-enemy-method-163 (_type_) none) + (nav-enemy-method-164 (_type_) none) + (nav-enemy-method-165 (_type_ vector vector) none) + (nav-enemy-method-166 (_type_ vector vector) vector) + (nav-enemy-method-167 (_type_) vector) + (nav-enemy-method-168 (_type_ vector) nav-poly) + (nav-enemy-method-169 (_type_ vector) object) + (is-notice-point-in-mesh? (_type_ vector) symbol) + (nav-enemy-method-171 (_type_) none) + (nav-enemy-method-172 (_type_) none) + (nav-enemy-method-173 (_type_) none) + (nav-enemy-method-174 (_type_) symbol) + (nav-enemy-method-175 (_type_) none) + (nav-enemy-method-176 (_type_) none) + (nav-enemy-method-177 (_type_) none) + (nav-enemy-method-178 (_type_) none) + (nav-enemy-method-179 (_type_) none) + (nav-enemy-method-180 (_type_ float float) none) + (nav-enemy-method-181 (_type_) none) + (nav-enemy-method-182 (_type_) none) + (nav-enemy-method-183 (_type_) none) + (nav-enemy-method-184 (_type_) none) + (nav-enemy-method-185 (_type_) symbol) + (nav-enemy-method-186 (_type_) symbol) + (nav-enemy-method-187 (_type_) none) + (nav-enemy-method-188 (_type_) none) + (copy-nav-state-vel! (_type_ vector) none) + ) + ) + +;; definition for method 3 of type nav-enemy +(defmethod inspect ((this nav-enemy)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tfrustration-point: ~`vector`P~%" (-> this frustration-point)) + (format #t "~2Tmove-dest: ~`vector`P~%" (-> this move-dest)) + (format #t "~2Tfrustration-time: ~D~%" (-> this frustration-time)) + (format #t "~2Tblocked-start-time: ~D~%" (-> this blocked-start-time)) + (format #t "~2Trestore-nav-radius-time: ~D~%" (-> this restore-nav-radius-time)) + (format #t "~2Tnav-radius-backup: ~f~%" (-> this nav-radius-backup)) + (format #t "~2Tcircle-radial-dist: ~f~%" (-> this desired-angle)) + (label cfg-4) + this + ) + +;; definition of type nav-enemy-debug-control-info +(deftype nav-enemy-debug-control-info (basic) + ((enable symbol) + (steering float) + (throttle float) + ) + ) + +;; definition for method 3 of type nav-enemy-debug-control-info +(defmethod inspect ((this nav-enemy-debug-control-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tenable: ~A~%" (-> this enable)) + (format #t "~1Tsteering: ~f~%" (-> this steering)) + (format #t "~1Tthrottle: ~f~%" (-> this throttle)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 diff --git a/test/decompiler/reference/jak3/engine/nav/nav-enemy_REF.gc b/test/decompiler/reference/jak3/engine/nav/nav-enemy_REF.gc new file mode 100644 index 0000000000..de8b519df4 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/nav/nav-enemy_REF.gc @@ -0,0 +1,2534 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 10 of type nav-enemy-info +;; WARN: Return type mismatch int vs none. +(defmethod copy! ((this nav-enemy-info) (arg0 nav-enemy-info)) + (mem-copy! (&-> this type) (&-> arg0 type) 524) + 0 + (none) + ) + +;; definition for method 68 of type nav-enemy +(defmethod get-enemy-aware ((this nav-enemy) (arg0 enemy-aware)) + (let* ((t9-0 (method-of-type enemy get-enemy-aware)) + (s5-0 (t9-0 this arg0)) + ) + (if (and (>= 1 (the-as int (-> this focus aware))) (< 1 (the-as int s5-0))) + (nav-enemy-method-172 this) + ) + s5-0 + ) + ) + +;; definition for method 82 of type nav-enemy +(defmethod event-handler ((this nav-enemy) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('nav-mesh-kill) + (deactivate this) + #t + ) + (('nav-mesh-new) + (set! (-> this water-max-height) (-> this nav state mesh water-max-height)) + #t + ) + (('change-nav-mesh) + (let ((a0-6 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor (the-as int (-> arg3 param 0))))) + (if a0-6 + (change-to a0-6 this) + ) + ) + ) + (('debug-control-on) + (go (method-of-object this debug-control)) + ) + (('debug-control-off) + (go-best-state this) + ) + (else + ((method-of-type enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for symbol *nav-enemy-dummy-shadow-control*, type shadow-control +(define *nav-enemy-dummy-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 4096.0) + :top-plane (new 'static 'plane :y 1.0 :w -4096.0) + ) + ) + ) + +;; definition for method 164 of type nav-enemy +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-164 ((this nav-enemy)) + (cond + ((zero? (-> this path)) + (go process-drawable-art-error "no path") + ) + (else + (let ((s4-0 (-> this path curve num-cverts))) + (if (<= s4-0 0) + (go process-drawable-art-error "no path") + ) + (let ((s2-0 (rnd-int this s4-0)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (countdown (s3-0 s4-0) + (get-point-in-path! (-> this path) s5-0 (the float s2-0) 'interp) + (if (< 4096.0 (vector-vector-xz-distance s5-0 (-> this root trans))) + (goto cfg-11) + ) + (set! s2-0 (mod (+ s2-0 1) s4-0)) + ) + (label cfg-11) + (let ((v1-19 (-> this nav state))) + (logclear! (-> v1-19 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-19 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-19 target-pos quad) (-> s5-0 quad)) + ) + ) + ) + 0 + ) + ) + 0 + (none) + ) + +;; definition for method 165 of type nav-enemy +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-165 ((this nav-enemy) (arg0 vector) (arg1 vector)) + (closest-point-on-mesh (-> this nav) arg0 arg1 (the-as nav-poly #f)) + 0 + (none) + ) + +;; definition for method 166 of type nav-enemy +;; INFO: Used lq/sq +(defmethod nav-enemy-method-166 ((this nav-enemy) (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 7) + (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 167 of type nav-enemy +(defmethod nav-enemy-method-167 ((this nav-enemy)) + (let ((v1-2 (handle->process (-> this focus handle)))) + (if v1-2 + (nav-enemy-method-166 this (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable v1-2) 0)) + ) + ) + ) + +;; definition for method 109 of type nav-enemy +;; INFO: Used lq/sq +(defmethod enemy-method-109 ((this nav-enemy)) + (let ((gp-0 (-> this root)) + (s3-0 (-> this nav state)) + ) + (do-navigation-to-destination s3-0 (-> gp-0 trans)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (cond + ((logtest? (-> s3-0 flags) (nav-state-flag in-mesh)) + (set! (-> s5-0 quad) (-> gp-0 trans quad)) + ) + (else + (if (or (not (closest-point-on-mesh (-> this nav) s5-0 (-> gp-0 trans) (-> s3-0 current-poly))) + (let ((f0-0 32768.0)) + (< (* f0-0 f0-0) (vector-vector-xz-distance-squared s5-0 (-> gp-0 trans))) + ) + (< (- (-> gp-0 trans y) (-> s5-0 y)) -8192.0) + ) + (return #t) + ) + ) + ) + ) + ) + #f + ) + +;; definition for method 59 of type nav-enemy +;; WARN: Return type mismatch int vs none. +(defmethod enemy-common-post ((this nav-enemy)) + (if (and (nonzero? (-> this draw)) (logtest? (-> this draw status) (draw-control-status on-screen))) + (set-time! (-> this last-draw-time)) + ) + (update-focus this) + (when *target* + (if *target* + (look-at! + (-> *target* neck) + (the-as vector (-> this root root-prim prim-core)) + (if (logtest? (-> this enemy-flags) (enemy-flag cam-attack-mode)) + 'attacking + ) + this + ) + ) + ) + (when (nonzero? (-> this neck)) + (cond + ((logtest? (-> this enemy-flags) (enemy-flag look-at-focus)) + (let ((a0-7 (handle->process (-> this focus handle)))) + (if a0-7 + (target-set! (-> this neck) (get-trans (the-as process-focusable a0-7) 2)) + ) + ) + ) + ((logtest? (-> this enemy-flags) (enemy-flag look-at-move-dest)) + (let ((s5-1 (-> this move-dest)) + (v1-39 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data (-> this enemy-info neck-joint))) + ) + (a1-6 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-6 x) (-> s5-1 x)) + (set! (-> a1-6 y) (-> v1-39 y)) + (set! (-> a1-6 z) (-> s5-1 z)) + (set! (-> a1-6 w) 1.0) + (target-set! (-> this neck) a1-6) + ) + ) + ) + ) + (when (and (logtest? (-> this enemy-flags) (enemy-flag auto-reset-penetrate)) + (time-elapsed? (-> this auto-reset-penetrate-time) (seconds 0.1)) + ) + (logclear! (-> this enemy-flags) (enemy-flag auto-reset-penetrate)) + (set! (-> this root penetrated-by) (get-penetrated-by this)) + (let ((v1-54 0)) + (if (logtest? (penetrate knocked) (-> this root penetrate-using)) + (set! v1-54 (logior (shl 2 32) v1-54)) + ) + (set! (-> this root penetrate-using) (the-as penetrate v1-54)) + ) + ) + (if (logtest? (-> this enemy-flags) (enemy-flag victory)) + (check-victory this) + ) + (if (logtest? (enemy-flag check-water checking-water) (-> this enemy-flags)) + (check-water this) + ) + (let ((v1-65 (-> this restore-nav-radius-time))) + (when (nonzero? v1-65) + (when (>= (current-time) v1-65) + (set! (-> this restore-nav-radius-time) 0) + (set! (-> this root nav-radius) (-> this nav-radius-backup)) + ) + ) + ) + (if (and *debug-segment* (-> this enemy-info debug-draw-neck) (nonzero? (-> this neck))) + (joint-mod-debug-draw (-> this neck)) + ) + (ja-post) + 0 + (none) + ) + +;; definition for method 139 of type nav-enemy +;; WARN: Return type mismatch int vs none. +(defmethod move-above-ground! ((this nav-enemy) (arg0 vector) (arg1 move-above-ground-params)) + (let ((t9-0 (method-of-type enemy move-above-ground!))) + (t9-0 this arg0 arg1) + ) + (do-navigation-to-destination (-> this nav state) (-> this root trans)) + 0 + (none) + ) + +;; definition for method 188 of type nav-enemy +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-188 ((this nav-enemy)) + (let ((v1-2 (-> this nav state current-poly))) + (when (and v1-2 (logtest? (-> v1-2 pat) 4) (!= (-> v1-2 link) 255)) + (let ((v1-6 (-> this nav state mesh link-array (-> v1-2 link) dest-mesh))) + (if v1-6 + (change-to v1-6 this) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 187 of type nav-enemy +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-187 ((this nav-enemy)) + (nav-enemy-method-188 this) + (cond + ((nav-enemy-method-185 this) + (let ((s5-0 (-> this nav))) + (when (logtest? (-> s5-0 state flags) (nav-state-flag at-gap)) + (let ((s4-0 (new 'stack-no-clear 'nav-gap-info))) + (when (plan-over-pat1-polys-using-route (-> s5-0 state) s4-0) + (set! (-> this enemy-flags) + (the-as enemy-flag (logior (enemy-flag jump-check-blocked) (-> this enemy-flags))) + ) + (send-event this 'jump 1 (-> s4-0 dest)) + ) + ) + ) + (cond + ((logtest? (enemy-flag ef39) (-> this enemy-flags)) + (set! (-> this enemy-flags) (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag ef39)))) + ) + (else + (when (not (logtest? (enemy-flag ef43) (-> this enemy-flags))) + (normalize-heading! this s5-0) + (nav-enemy-method-161 this s5-0) + ) + ) + ) + (cond + ((logtest? (-> s5-0 state flags) (nav-state-flag blocked)) + (if (zero? (-> this blocked-start-time)) + (set-time! (-> this blocked-start-time)) + ) + ) + (else + (set! (-> this blocked-start-time) 0) + 0 + ) + ) + ) + ) + (else + (set! (-> this blocked-start-time) 0) + 0 + ) + ) + (enemy-common-post this) + (update-transforms (-> this root)) + 0 + (none) + ) + +;; definition for method 163 of type nav-enemy +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-163 ((this nav-enemy)) + (navigate-v1! (-> this nav state)) + 0 + (none) + ) + +;; definition for method 160 of type nav-enemy +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod normalize-heading! ((this nav-enemy) (arg0 nav-control)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (let ((a1-1 (-> arg0 state))) + (set! (-> s5-0 quad) (-> a1-1 heading quad)) + ) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + (quaternion-set! (-> this root quat) 0.0 (-> s5-0 x) 0.0 (+ 1.0 (-> s5-0 z))) + ) + (quaternion-normalize! (-> this root quat)) + 0 + (none) + ) + +;; definition for method 189 of type nav-enemy +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs none. +(defmethod copy-nav-state-vel! ((this nav-enemy) (arg0 vector)) + (set! (-> arg0 quad) (-> this nav state velocity quad)) + (none) + ) + +;; definition for method 161 of type nav-enemy +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-161 ((this nav-enemy) (arg0 nav-control)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (copy-nav-state-vel! this s5-0) + (let ((v1-3 (-> this root transv))) + (set! (-> v1-3 x) (-> s5-0 x)) + (set! (-> v1-3 z) (-> s5-0 z)) + ) + ) + (cond + ((should-move-to-ground? this) + (if (focus-test? this under-water) + (accelerate-fall! this (-> this root transv)) + (+! (-> this root transv y) (* (-> this enemy-info movement-gravity) (seconds-per-frame))) + ) + (let ((a2-0 (new 'stack-no-clear 'move-above-ground-params))) + (let ((v1-17 (-> this enemy-info))) + (set! (-> a2-0 gnd-collide-with) (-> this gnd-collide-with)) + (set! (-> a2-0 popup) 8192.0) + (set! (-> a2-0 dont-move-if-overlaps?) #t) + (set! (-> a2-0 hover-if-no-ground?) (-> v1-17 hover-if-no-ground)) + (set! (-> a2-0 overlaps-params options) (overlaps-others-options oo0 oo2)) + (set! (-> a2-0 overlaps-params collide-with-filter) (-> v1-17 overlaps-others-collide-with-filter)) + ) + (set! (-> a2-0 overlaps-params tlist) *touching-list*) + (-> a2-0 overlaps-params) + (move-above-ground! this (-> this root transv) a2-0) + ) + ) + (else + (let ((a2-1 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a2-1 options) (overlaps-others-options oo0)) + (set! (-> a2-1 collide-with-filter) (-> this enemy-info overlaps-others-collide-with-filter)) + (set! (-> a2-1 tlist) *touching-list*) + (integrate-for-enemy-no-mtg (-> this root) (-> this root transv) a2-1) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 181 of type nav-enemy +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-181 ((this nav-enemy)) + (if (not (logtest? (enemy-flag ef37) (-> this enemy-flags))) + (set! (-> this enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> this enemy-flags)))) + ) + (set! (-> this enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> this enemy-flags)))) + (set! (-> this nav callback-info) (-> this enemy-info callback-info)) + 0 + (none) + ) + +;; definition for method 182 of type nav-enemy +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-182 ((this nav-enemy)) + (set! (-> this enemy-flags) (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag ef37)))) + (set! (-> this nav callback-info) *null-nav-callback-info*) + 0 + (none) + ) + +;; definition for method 183 of type nav-enemy +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-183 ((this nav-enemy)) + (set! (-> this enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> this enemy-flags)))) + 0 + (none) + ) + +;; definition for method 184 of type nav-enemy +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-184 ((this nav-enemy)) + (set! (-> this enemy-flags) (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag ef38)))) + 0 + (none) + ) + +;; definition for method 185 of type nav-enemy +(defmethod nav-enemy-method-185 ((this nav-enemy)) + (logtest? (enemy-flag ef37) (-> this enemy-flags)) + ) + +;; definition for method 186 of type nav-enemy +(defmethod nav-enemy-method-186 ((this nav-enemy)) + (logtest? (enemy-flag ef38) (-> this enemy-flags)) + ) + +;; definition for method 168 of type nav-enemy +(defmethod nav-enemy-method-168 ((this nav-enemy) (arg0 vector)) + (let ((v1-0 (-> this nav)) + (a0-1 arg0) + (a1-1 (new 'stack-no-clear 'nav-poly)) + ) + (vector-! (the-as vector (-> a1-1 vertex)) a0-1 (the-as vector (-> v1-0 state mesh bounds))) + (set! (-> a1-1 vertex1 x) (-> v1-0 nearest-y-threshold)) + (set! (-> a1-1 data 20) (the-as uint 2)) + (nav-mesh-method-45 (-> v1-0 state mesh) a1-1) + ) + ) + +;; definition for method 169 of type nav-enemy +(defmethod nav-enemy-method-169 ((this nav-enemy) (arg0 vector)) + (let ((f1-0 (-> this root trans y)) + (f0-0 (-> arg0 y)) + (v1-1 (-> this fact)) + ) + (and (< f0-0 (+ f1-0 (-> v1-1 notice-top))) + (and (< (- f1-0 (-> v1-1 notice-bottom)) f0-0) + (let ((v1-3 (-> this nav)) + (a0-1 arg0) + (a1-1 (new 'stack-no-clear 'nav-poly)) + ) + (vector-! (the-as vector (-> a1-1 vertex)) a0-1 (the-as vector (-> v1-3 state mesh bounds))) + (set! (-> a1-1 vertex1 x) (-> v1-3 nearest-y-threshold)) + (set! (-> a1-1 data 20) (the-as uint 2)) + (nav-mesh-method-45 (-> v1-3 state mesh) a1-1) + ) + ) + ) + ) + ) + +;; definition for method 170 of type nav-enemy +(defmethod is-notice-point-in-mesh? ((this nav-enemy) (arg0 vector)) + (let ((f1-0 (-> this root trans y)) + (f0-0 (-> arg0 y)) + (v1-1 (-> this fact)) + ) + (and (< f0-0 (+ f1-0 (-> v1-1 notice-top))) + (and (< (- f1-0 (-> v1-1 notice-bottom)) f0-0) + (is-in-mesh? (-> this nav) arg0 (-> this enemy-info notice-nav-radius)) + ) + ) + ) + ) + +;; definition for method 107 of type nav-enemy +(defmethod is-pfoc-in-mesh? ((this nav-enemy) (arg0 process-focusable) (arg1 vector)) + (if (and arg0 (not arg1)) + (set! arg1 (get-trans arg0 1)) + ) + (when arg1 + (let* ((f0-0 (-> arg1 y)) + (v1-4 (-> this root)) + (f1-0 (-> v1-4 trans y)) + (a0-2 (-> this fact)) + ) + (when (and (< f0-0 (+ f1-0 (-> a0-2 notice-top))) (< (- f1-0 (-> a0-2 notice-bottom)) f0-0)) + (let* ((f30-0 (-> this enemy-info notice-nav-radius)) + (f0-1 f30-0) + ) + (or (>= (* f0-1 f0-1) (vector-vector-xz-distance-squared (-> v1-4 trans) arg1)) + (is-in-mesh? (-> this nav) arg1 f30-0) + ) + ) + ) + ) + ) + ) + +;; definition for method 172 of type nav-enemy +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-172 ((this nav-enemy)) + (set! (-> this enemy-flags) (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag ef40)))) + (set-time! (-> this frustration-time)) + (let ((v1-7 (handle->process (-> this focus handle)))) + (if v1-7 + (set! (-> this frustration-point quad) (-> (get-trans (the-as process-focusable v1-7) 1) quad)) + ) + ) + 0 + (none) + ) + +;; definition for method 171 of type nav-enemy +;; WARN: Return type mismatch object vs none. +(defmethod nav-enemy-method-171 ((this nav-enemy)) + (let ((s5-0 (handle->process (-> this focus handle)))) + (cond + ((or (not s5-0) + (< 6144.0 (vector-vector-distance (get-trans (the-as process-focusable s5-0) 1) (-> this frustration-point))) + (< (-> this enemy-info frustration-distance) + (vector-vector-xz-distance (get-trans (the-as process-focusable s5-0) 0) (-> this root trans)) + ) + ) + (nav-enemy-method-172 this) + ) + (else + (when (time-elapsed? (-> this frustration-time) (+ (-> this reaction-time) (-> this enemy-info frustration-time))) + (set! (-> this enemy-flags) (the-as enemy-flag (logior (enemy-flag ef40) (-> this enemy-flags)))) + 0 + ) + ) + ) + ) + (none) + ) + +;; definition for method 173 of type nav-enemy +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-173 ((this nav-enemy)) + (set! (-> this blocked-start-time) 0) + 0 + (none) + ) + +;; definition for method 174 of type nav-enemy +(defmethod nav-enemy-method-174 ((this nav-enemy)) + (let ((v1-0 (-> this blocked-start-time))) + (and (nonzero? v1-0) (time-elapsed? v1-0 (-> this enemy-info blocked-time))) + ) + ) + +;; definition for method 175 of type nav-enemy +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-175 ((this nav-enemy)) + (if (-> this enemy-info use-momentum) + (logior! (-> this nav flags) (nav-control-flag use-momentum)) + (logclear! (-> this nav flags) (nav-control-flag use-momentum)) + ) + 0 + (none) + ) + +;; definition for method 178 of type nav-enemy +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-178 ((this nav-enemy)) + (let ((v1-0 (-> this nav))) + (set! (-> v1-0 target-speed) 0.0) + ) + 0 + (let ((v1-3 (-> this nav state))) + (set! (-> v1-3 speed) 0.0) + ) + 0 + (let ((v1-5 (-> this nav))) + (set! (-> v1-5 acceleration) (-> this enemy-info walk-acceleration)) + ) + 0 + 0 + (none) + ) + +;; definition for method 176 of type nav-enemy +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-176 ((this nav-enemy)) + (let ((v1-0 (-> this nav))) + (set! (-> v1-0 target-speed) (-> this enemy-info walk-travel-speed)) + ) + 0 + (let ((v1-2 (-> this nav))) + (set! (-> v1-2 acceleration) (-> this enemy-info walk-acceleration)) + ) + 0 + (let ((v1-4 (-> this nav))) + (set! (-> v1-4 turning-acceleration) (-> this enemy-info walk-turning-acceleration)) + ) + 0 + 0 + (none) + ) + +;; definition for method 177 of type nav-enemy +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-177 ((this nav-enemy)) + (let ((v1-0 (-> this nav))) + (set! (-> v1-0 target-speed) (-> this enemy-info run-travel-speed)) + ) + 0 + (let ((v1-2 (-> this nav))) + (set! (-> v1-2 acceleration) (-> this enemy-info run-acceleration)) + ) + 0 + (let ((v1-4 (-> this nav))) + (set! (-> v1-4 turning-acceleration) (-> this enemy-info run-turning-acceleration)) + ) + 0 + 0 + (none) + ) + +;; definition for method 118 of type nav-enemy +;; WARN: Return type mismatch float vs none. +(defmethod init-enemy-info! ((this nav-enemy) (arg0 enemy-info)) + (set! (-> this enemy-info) (the-as nav-enemy-info arg0)) + (set! (-> (the-as nav-enemy-info arg0) callback-info) *default-nav-callback-info*) + (when (and (!= (-> this enemy-info neck-joint) -1) (zero? (-> this neck))) + (set! (-> this neck) + (new 'process 'joint-mod (joint-mod-mode flex-blend) this (-> this enemy-info neck-joint)) + ) + (set-vector! (-> this neck twist-max) 8192.0 8192.0 0.0 1.0) + (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 neck max-dist) 102400.0) + (set! (-> this neck ignore-angle) 16384.0) + ) + (none) + ) + +;; definition for method 119 of type nav-enemy +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-defaults! ((this nav-enemy) (arg0 enemy-info)) + (local-vars (sv-16 res-tag)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (when (coin-flip? this) + (let ((a0-2 (-> this node-list data 2))) + (set! (-> a0-2 param0) (the-as (function cspace transformq none) cspace<-parented-matrix-joint-flip-z!)) + (set! (-> a0-2 param1) #f) + (set! (-> a0-2 param2) #f) + ) + (logior! (-> this enemy-flags) (enemy-flag drawn-mirrored)) + ) + (logior! (-> this mask) (process-mask enemy)) + (logior! (-> this mask) (process-mask actor-pause)) + (logior! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (set! (-> this nav-radius-backup) (-> this root nav-radius)) + (init-enemy-info! this arg0) + (set! (-> this enemy-info callback-info) *default-nav-callback-info*) + (set! (-> this ragdoll-proc) (the-as handle #f)) + (let ((a1-2 (-> this enemy-info idle-anim-script))) + (if a1-2 + (init! (-> this idle-anim-player) a1-2) + ) + ) + (if (-> this draw shadow) + (set! (-> this draw shadow-ctrl) (new + 'process + 'shadow-control + (-> this enemy-info shadow-min-y) + (-> this enemy-info shadow-max-y) + (-> this enemy-info shadow-locus-dist) + (the-as vector #f) + (shadow-flags shdf00 shdf04) + 245760.0 + ) + ) + (set! (-> this draw shadow-ctrl) *nav-enemy-dummy-shadow-control*) + ) + (get-nav-control this (-> (the-as nav-enemy-info arg0) nav-mesh)) + (set! (-> this water-max-height) (-> this nav state mesh water-max-height)) + (let ((v1-32 this)) + (set! (-> v1-32 enemy-flags) (the-as enemy-flag (logclear (-> v1-32 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-32 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let ((v1-35 this)) + (set! (-> v1-35 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-35 enemy-flags)))) + ) + 0 + (logior! (-> this nav flags) (nav-control-flag display-marks limit-rotation-rate)) + (logior! (-> this nav flags) (nav-control-flag update-heading-from-facing)) + (set! (-> this enemy-flags) (the-as enemy-flag (logior (enemy-flag ef44) (-> this enemy-flags)))) + (let ((v1-46 (-> this nav))) + (set! (-> v1-46 target-speed) 0.0) + ) + 0 + (let ((v1-48 (-> this nav))) + (set! (-> v1-48 acceleration) (-> this enemy-info walk-acceleration)) + ) + 0 + (let ((v1-50 (-> this nav))) + (set! (-> v1-50 turning-acceleration) (-> this enemy-info walk-turning-acceleration)) + ) + 0 + (let ((v1-52 (-> this nav))) + (set! (-> v1-52 max-rotation-rate) (-> this enemy-info maximum-rotation-rate)) + ) + 0 + (nav-enemy-method-175 this) + (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) 3) + (set! (-> this path curve cverts) (-> (new 'process 'vector-array 3) data)) + (logclear! (-> this path flags) (path-control-flag not-found)) + (let ((v1-69 (-> this path curve cverts 0))) + (let ((a0-33 (-> this entity trans))) + (let ((a1-9 *x-vector*)) + (let ((a2-4 6144.0)) + (.mov vf7 a2-4) + ) + (.lvf vf5 (&-> a1-9 quad)) + ) + (.lvf vf4 (&-> a0-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 (&-> v1-69 quad) vf6) + ) + (let ((v1-72 (-> this path curve cverts 1))) + (let ((a0-35 (-> this entity trans))) + (let ((a1-10 *x-vector*)) + (let ((a2-6 -6144.0)) + (.mov vf7 a2-6) + ) + (.lvf vf5 (&-> a1-10 quad)) + ) + (.lvf vf4 (&-> a0-35 quad)) + ) + (.add.x.vf 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-72 quad) vf6) + ) + (let ((v1-75 (-> this path curve cverts 2))) + (let ((a0-37 (-> this entity trans))) + (let ((a1-11 *z-vector*)) + (let ((a2-8 6144.0)) + (.mov vf7 a2-8) + ) + (.lvf vf5 (&-> a1-11 quad)) + ) + (.lvf vf4 (&-> a0-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 (&-> v1-75 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)) + ) + (if (logtest? (-> *game-info* secrets) (game-secrets hero-mode)) + (set! (-> this hit-points) (* 2.0 (-> this enemy-info default-hit-points))) + (set! (-> this hit-points) (-> this enemy-info default-hit-points)) + ) + (let* ((v1-91 *game-info*) + (a0-42 (+ (-> v1-91 attack-id) 1)) + ) + (set! (-> v1-91 attack-id) a0-42) + (set! (-> this attack-id) a0-42) + ) + (let* ((v1-92 *game-info*) + (a0-44 (+ (-> v1-92 attack-id) 1)) + ) + (set! (-> v1-92 attack-id) a0-44) + (set! (-> this persistent-attack-id) a0-44) + ) + (set! (-> this gnd-collide-with) (-> this enemy-info gnd-collide-with)) + (set! (-> this fact) (new 'process 'fact-info-enemy this (the-as (pointer float) (-> arg0 fact-defaults)))) + (let ((cspec (if (logtest? (enemy-option multi-focus) (-> this fact enemy-options)) + (the-as collide-spec (collide-spec jak bot player-list jak-vehicle)) + (the-as collide-spec (collide-spec jak player-list jak-vehicle)) + ) + ) + ) + (reset-to-collide-spec (-> this focus) (the-as collide-spec cspec)) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-101 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-101 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-101)) + (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 on-notice) (res-lump-struct (-> this entity) 'on-notice pair)) + (set! (-> this on-active) (res-lump-struct (-> this entity) 'on-active pair)) + (set! (-> this on-hostile) (res-lump-struct (-> this entity) 'on-hostile pair)) + (set! (-> this on-death) (res-lump-struct (-> this entity) 'on-death pair)) + (if (-> this on-notice) + (logior! (-> this enemy-flags) (enemy-flag enable-on-notice)) + ) + (if (-> this on-active) + (logior! (-> this enemy-flags) (enemy-flag enable-on-active)) + ) + (if (-> this on-hostile) + (logior! (-> this enemy-flags) (enemy-flag enable-on-hostile)) + ) + (set! (-> this incoming attacker-handle) (the-as handle #f)) + (let ((s4-0 (-> this root))) + (set! (-> this penetrated-by-all) (-> this root penetrated-by)) + (set! (-> this root penetrated-by) (get-penetrated-by this)) + (set! (-> s4-0 event-self) 'touched) + ) + (set! (-> this penetrate-flinch) (-> arg0 penetrate-flinch)) + (set! (-> this penetrate-knocked) (-> arg0 penetrate-knocked)) + (set! (-> this reaction-time) (set-reaction-time! this (seconds 0.1) (seconds 0.8))) + (let* ((v1-132 (-> this enemy-flags)) + (a0-61 (-> this fact enemy-options)) + (v1-133 + (logior (enemy-flag vulnerable vulnerable-backup use-notice-distance attackable-backup trackable trackable-backup) + v1-132 + ) + ) + ) + (if (logtest? (enemy-option multi-focus) a0-61) + (set! v1-133 (logior (enemy-flag multi-focus) v1-133)) + ) + (if (logtest? (enemy-option has-trigger) a0-61) + (set! v1-133 (logior (enemy-flag use-trigger) v1-133)) + ) + (set! (-> this enemy-flags) v1-133) + ) + (do-navigation-to-destination (-> this nav state) (-> this root trans)) + (if (and (should-move-to-ground? this) + (not (logtest? (enemy-flag no-initial-move-to-ground) (-> this enemy-flags))) + (not (logtest? (enemy-option ambush) (-> this fact enemy-options))) + ) + (try-locate-ground this (meters 10) (meters 10) #t (-> this gnd-collide-with)) + ) + (if (zero? (-> this draw light-index)) + (set! (-> this draw light-index) (the-as uint 10)) + ) + 0 + (none) + ) + ) + +;; definition for method 11 of type nav-enemy +;; WARN: Return type mismatch int vs object. +(defmethod init-from-entity! ((this nav-enemy) (arg0 entity-actor)) + (let ((a1-2 (res-lump-struct arg0 'art-level structure))) + (when a1-2 + (let ((a0-3 (level-get *level* (the-as symbol a1-2)))) + (if a0-3 + (set! (-> this level) a0-3) + ) + ) + ) + ) + (init-enemy-collision! this) + (process-drawable-from-entity! this arg0) + (init-enemy! this) + (enemy-setup-gem) + (let ((v1-10 (-> this fact enemy-options))) + (cond + ((logtest? (enemy-option spawner) v1-10) + (process-entity-status! this (entity-perm-status dead) #t) + (go (method-of-object this die-fast)) + ) + (*debug-view-anims* + (go (method-of-object this view-anims)) + ) + ((logtest? (enemy-option dormant) v1-10) + (let ((v1-18 (-> this root root-prim))) + (set! (-> v1-18 prim-core collide-as) (collide-spec)) + (set! (-> v1-18 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> this draw status) (draw-control-status no-draw)) + (go (method-of-object this dormant)) + ) + ((logtest? (enemy-option dormant-aware) v1-10) + (let ((v1-28 (-> this root root-prim))) + (set! (-> v1-28 prim-core collide-as) (collide-spec)) + (set! (-> v1-28 prim-core collide-with) (collide-spec)) + ) + 0 + (logior! (-> this draw status) (draw-control-status no-draw)) + (go (method-of-object this dormant-aware)) + ) + (else + (go-idle2 this) + ) + ) + ) + 0 + ) + +;; definition for function nav-enemy-simple-post +;; WARN: Return type mismatch int vs none. +(defbehavior nav-enemy-simple-post nav-enemy () + (enemy-common-post self) + (update-transforms (-> self root)) + 0 + (none) + ) + +;; definition for function nav-enemy-die-falling-post +(defbehavior nav-enemy-die-falling-post nav-enemy () + (enemy-die-falling-post) + (none) + ) + +;; definition for function nav-enemy-travel-post +(defbehavior nav-enemy-travel-post nav-enemy () + (nav-enemy-method-187 self) + (none) + ) + +;; definition for function nav-enemy-patrol-post +;; WARN: Return type mismatch int vs none. +(defbehavior nav-enemy-patrol-post nav-enemy () + (when (or (logtest? (-> self nav state flags) (nav-state-flag at-target)) (nav-enemy-method-174 self)) + (nav-enemy-method-164 self) + (nav-enemy-method-173 self) + ) + (nav-enemy-method-187 self) + 0 + (none) + ) + +;; definition for function nav-enemy-chase-post +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior nav-enemy-chase-post nav-enemy () + (let ((a0-1 (handle->process (-> self focus handle)))) + (when a0-1 + (let ((gp-0 (-> self nav state)) + (v1-7 (get-trans (the-as process-focusable a0-1) 1)) + ) + (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-7 quad)) + ) + 0 + ) + ) + (nav-enemy-method-187 self) + 0 + (none) + ) + +;; definition for function nav-enemy-flee-post +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior nav-enemy-flee-post nav-enemy () + (let ((a0-1 (handle->process (-> self focus handle)))) + (when a0-1 + (let ((gp-0 (-> self move-dest))) + (if (or (not (nav-enemy-method-166 self gp-0 (get-trans (the-as process-focusable a0-1) 0))) + (nav-enemy-method-174 self) + ) + (go-stare2 self) + ) + (let ((a0-7 (-> self nav state)) + (a1-3 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-3 quad) (-> a0-7 target-pos quad)) + (when (< 2048.0 (vector-vector-xz-distance gp-0 a1-3)) + (let ((v1-18 (-> self nav state))) + (logclear! (-> v1-18 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-18 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-18 target-pos quad) (-> gp-0 quad)) + ) + 0 + ) + ) + ) + ) + ) + (nav-enemy-method-187 self) + 0 + (none) + ) + +;; definition for function nav-enemy-face-focus-post +;; WARN: Return type mismatch int vs none. +(defbehavior nav-enemy-face-focus-post nav-enemy () + (let ((a0-0 self)) + (when (logtest? (enemy-flag ef38) (-> a0-0 enemy-flags)) + (let ((a0-4 (handle->process (-> self focus handle)))) + (if a0-4 + (seek-to-point-toward-point! + (-> self root) + (get-trans (the-as process-focusable a0-4) 0) + (-> self nav max-rotation-rate) + (seconds 0.02) + ) + ) + ) + ) + ) + (nav-enemy-simple-post) + 0 + (none) + ) + +;; definition for method 180 of type nav-enemy +;; WARN: Return type mismatch float vs none. +(defmethod nav-enemy-method-180 ((this nav-enemy) (arg0 float) (arg1 float)) + (if arg1 + (set! (-> this nav-radius-backup) arg0) + ) + (if (zero? (-> this restore-nav-radius-time)) + (set! (-> this root nav-radius) arg0) + ) + (none) + ) + +;; definition for method 179 of type nav-enemy +;; WARN: Return type mismatch float vs none. +(defmethod nav-enemy-method-179 ((this nav-enemy)) + (if (zero? (-> this restore-nav-radius-time)) + (set! (-> this root nav-radius) (-> this nav-radius-backup)) + ) + (none) + ) + +;; definition for method 162 of type nav-enemy +;; WARN: Return type mismatch int vs none. +(defmethod nav-enemy-method-162 ((this nav-enemy)) + (set! (-> this root nav-radius) 4.096) + (set! (-> this restore-nav-radius-time) + (the-as + time-frame + (max (-> this restore-nav-radius-time) (+ (current-time) (set-reaction-time! this (seconds 5) (seconds 8)))) + ) + ) + (none) + ) + +;; definition for function nav-enemy-stare-post +;; WARN: Return type mismatch int vs none. +(defbehavior nav-enemy-stare-post nav-enemy () + (let ((a0-0 self)) + (when (logtest? (enemy-flag ef38) (-> a0-0 enemy-flags)) + (let ((a0-4 (handle->process (-> self focus handle)))) + (if a0-4 + (seek-to-point-toward-point! + (-> self root) + (get-trans (the-as process-focusable a0-4) 0) + (-> self nav max-rotation-rate) + (seconds 0.02) + ) + ) + ) + ) + ) + (nav-enemy-method-187 self) + (if (and (nav-enemy-method-174 self) + (zero? (-> self restore-nav-radius-time)) + (time-elapsed? (-> self blocked-start-time) (seconds 4)) + ) + (nav-enemy-method-162 self) + ) + 0 + (none) + ) + +;; definition for function nav-enemy-falling-post +(defbehavior nav-enemy-falling-post nav-enemy () + (enemy-falling-post) + (none) + ) + +;; definition for function nav-enemy-turn-to-face-dir +;; WARN: Return type mismatch int vs none. +(defbehavior nav-enemy-turn-to-face-dir nav-enemy ((arg0 vector) (arg1 float)) + (local-vars (v1-18 symbol)) + (let ((s4-0 (current-time))) + (ja :group! (-> self draw art-group data (-> self enemy-info turn-anim))) + (ja :num-func num-func-identity :frame-num 0.0) + (until v1-18 + (seek-toward-heading-vec! (-> self root) arg0 (-> self nav max-rotation-rate) (seconds 0.02)) + (suspend) + (ja :num! (loop! 0.75)) + (set! v1-18 (or (time-elapsed? s4-0 (seconds 10)) (enemy-method-103 self arg0 arg1))) + ) + ) + (forward-up->quaternion (-> self root quat) arg0 *y-vector*) + 0 + (none) + ) + +;; definition for function nav-enemy-turn-to-face-point +;; WARN: Return type mismatch int vs none. +(defbehavior nav-enemy-turn-to-face-point nav-enemy ((arg0 vector) (arg1 float)) + (let ((gp-1 (vector-! (new 'stack-no-clear 'vector) arg0 (-> self root trans)))) + (set! (-> gp-1 y) 0.0) + (when (< 0.0 (vector-length gp-1)) + (vector-normalize! gp-1 1.0) + (nav-enemy-turn-to-face-dir gp-1 arg1) + ) + ) + 0 + (none) + ) + +;; definition for method 76 of type nav-enemy +(defmethod go-stare2 ((this nav-enemy)) + (if (!= (-> this enemy-info taunt-anim) -1) + (go (method-of-object this taunt)) + ) + (go (method-of-object this stare)) + ) + +;; definition for method 75 of type nav-enemy +(defmethod go-stare ((this nav-enemy)) + (let ((s5-0 (-> this focus aware))) + (cond + ((or (and (-> this enemy-info use-frustration) (logtest? (enemy-flag ef40) (-> this enemy-flags))) + (nav-enemy-method-174 this) + ) + (go-stare2 this) + ) + ((and (= s5-0 (enemy-aware ea3)) (-> this enemy-info use-circling)) + (go (method-of-object this circling)) + ) + ((= s5-0 (enemy-aware ea4)) + (go-flee this) + ) + (else + (go-stare2 this) + ) + ) + ) + ) + +;; definition for method 78 of type nav-enemy +(defmethod go-hostile ((this nav-enemy)) + (if (or (and (-> this enemy-info use-frustration) (logtest? (enemy-flag ef40) (-> this enemy-flags))) + (nav-enemy-method-174 this) + ) + (go-stare2 this) + (go (method-of-object this hostile)) + ) + ) + +;; definition for method 79 of type nav-enemy +(defmethod go-flee ((this nav-enemy)) + (if (nav-enemy-method-167 this) + (go (method-of-object this flee)) + (go (method-of-object this stare)) + ) + ) + +;; definition for symbol *nav-enemy-debug-control-info*, type nav-enemy-debug-control-info +(define *nav-enemy-debug-control-info* (new 'static 'nav-enemy-debug-control-info)) + +;; definition for function nav-enemy-debug-control-post +;; INFO: Used lq/sq +(defbehavior nav-enemy-debug-control-post nav-enemy () + (let ((gp-0 *nav-enemy-debug-control-info*)) + (let ((f30-0 (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 48.0 110.0 -1.0))) + (seek! (-> gp-0 steering) (fmax -1.0 (fmin 1.0 f30-0)) (seconds-per-frame)) + (if (cpad-hold? 0 x) + (set! (-> gp-0 throttle) 1.0) + (set! (-> gp-0 throttle) 0.0) + ) + (format *stdcon* "input-x ~f steering ~f throttle ~f~%" f30-0 (-> gp-0 steering) (-> gp-0 throttle)) + ) + (format *stdcon* "target-speed ~M, speed ~M~%" (-> self nav target-speed) (-> self nav state speed)) + (let ((v1-16 (-> self nav))) + (set! (-> v1-16 target-speed) (* 24576.0 (-> gp-0 throttle))) + ) + 0 + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (let ((a1-4 (-> self nav state))) + (set! (-> s4-0 quad) (-> a1-4 heading quad)) + ) + (vector-rotate-y! s4-0 s4-0 (* 1820.4445 (-> gp-0 steering))) + (vector-float*! s4-0 s4-0 20480.0) + (vector+! s5-0 (-> self root trans) s4-0) + (let ((v1-26 (-> self nav state))) + (logclear! (-> v1-26 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-26 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-26 target-pos quad) (-> s5-0 quad)) + ) + ) + ) + 0 + (nav-enemy-method-187 self) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy idle) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self state-timeout) (seconds 1)) + (let ((v1-5 self)) + (set! (-> v1-5 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-5 enemy-flags)))) + ) + 0 + (let ((v1-7 self)) + (set! (-> v1-7 enemy-flags) (the-as enemy-flag (logclear (-> v1-7 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-7 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + ) + ) + +;; failed to figure out what this is: +(defstate dormant (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy dormant) 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 + (let ((v1-6 self)) + (set! (-> v1-6 enemy-flags) (the-as enemy-flag (logclear (-> v1-6 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-6 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + ) + ) + +;; failed to figure out what this is: +(defstate dormant-aware (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (-> (method-of-type nav-enemy dormant) enter) + ) + +;; failed to figure out what this is: +(defstate active (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self state-timeout) (seconds 1)) + (logior! (-> self nav state flags) (nav-state-flag at-target)) + (let ((v1-8 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-8 enemy-flags))) + (set! (-> v1-8 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-8 enemy-flags)))) + ) + (set! (-> v1-8 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-8 enemy-flags)))) + (set! (-> v1-8 nav callback-info) (-> v1-8 enemy-info callback-info)) + ) + 0 + (let ((v1-11 self)) + (set! (-> v1-11 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-11 enemy-flags)))) + ) + 0 + (nav-enemy-method-176 self) + ) + :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.6)) + (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.6)) + (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 + ) + :post nav-enemy-patrol-post + ) + +;; failed to figure out what this is: +(defstate notice (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy notice) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((a0-1 (handle->process (-> self focus handle)))) + (when a0-1 + (let ((gp-0 (-> self nav state)) + (v1-11 (get-trans (the-as process-focusable a0-1) 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-11 quad)) + ) + 0 + ) + ) + (let ((v1-14 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-14 enemy-flags))) + (set! (-> v1-14 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-14 enemy-flags)))) + ) + (set! (-> v1-14 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-14 enemy-flags)))) + (set! (-> v1-14 nav callback-info) (-> v1-14 enemy-info callback-info)) + ) + 0 + (let ((v1-17 self)) + (set! (-> v1-17 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-17 enemy-flags)))) + ) + 0 + (let ((v1-19 (-> self nav))) + (set! (-> v1-19 target-speed) 0.0) + ) + 0 + ) + :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)) + ) + (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) + (let ((a1-9 (-> self nav state))) + (set! (-> gp-0 quad) (-> a1-9 travel quad)) + ) + (seek-toward-heading-vec! (-> self root) gp-0 (-> self nav max-rotation-rate) (seconds 0.02)) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (go-best-state self) + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate hostile (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (nav-enemy-method-177 self) + (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 + (let ((v1-9 self)) + (set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-9 enemy-flags)))) + ) + 0 + ) + :trans (behavior () + (nav-enemy-method-171 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)) + (if (nav-enemy-method-174 self) + (go-stare2 self) + ) + (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) + ) + ) + ) + ) + :post nav-enemy-chase-post + ) + +;; failed to figure out what this is: +(defstate stop-chase (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((a1-0 (new 'stack-no-clear 'vector))) + (let ((a2-0 (-> self nav state))) + (set! (-> a1-0 quad) (-> a2-0 target-pos quad)) + ) + (let ((f0-0 (vector-vector-distance (-> self root trans) a1-0))) + (set! (-> self state-timeout) + (the-as + time-frame + (the int (+ (lerp-scale 300.0 1200.0 f0-0 32768.0 122880.0) (rnd-float-range self 0.0 30.0))) + ) + ) + ) + ) + (nav-enemy-method-176 self) + (let ((v1-10 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-10 enemy-flags))) + (set! (-> v1-10 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-10 enemy-flags)))) + ) + (set! (-> v1-10 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-10 enemy-flags)))) + (set! (-> v1-10 nav callback-info) (-> v1-10 enemy-info callback-info)) + ) + 0 + (let ((v1-13 self)) + (set! (-> v1-13 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-13 enemy-flags)))) + ) + 0 + (logclear! (-> self mask) (process-mask actor-pause)) + ) + :trans (behavior () + (nav-enemy-method-171 self) + (if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory)) + (go-virtual victory) + ) + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (if (nav-enemy-method-174 self) + (go-stare2 self) + ) + (let ((gp-0 (-> self focus aware))) + (cond + ((>= 1 (the-as int gp-0)) + (if (time-elapsed? (-> self state-time) (-> self state-timeout)) + (go-virtual active) + ) + ) + ((and (= gp-0 (enemy-aware ea3)) (get-focus! self)) + (go-hostile self) + ) + ((= gp-0 (enemy-aware ea4)) + (go-flee self) + ) + (else + (if (time-elapsed? (-> self state-time) (-> self state-timeout)) + (go-stare self) + ) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data (-> self enemy-info walk-anim))) + (ja :num-func num-func-identity :frame-num 0.0) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (until #f + (suspend) + (ja :num! (loop! f30-0)) + ) + ) + #f + ) + :post nav-enemy-chase-post + ) + +;; failed to figure out what this is: +(defstate stare (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy stare) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self enemy-flags) (the-as enemy-flag (logior (enemy-flag ef43) (-> self enemy-flags)))) + (logclear! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + (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 + (nav-enemy-method-178 self) + (vector-reset! (-> self root transv)) + (set-time! (-> self starting-time)) + ) + :exit (behavior () + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag ef43)))) + (let ((v1-4 (-> self nav state))) + (set! (-> v1-4 speed) 0.0) + ) + 0 + (vector-reset! (-> self root transv)) + (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)) + ) + (when (and (logtest? (-> self nav flags) (nav-control-flag update-heading-from-facing)) + (not (nav-enemy-method-174 self)) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-z-quaternion! gp-0 (-> self root quat)) + (set! (-> gp-0 y) 0.0) + (let ((v1-23 gp-0)) + (let ((f0-2 1.0)) + (.lvf vf1 (&-> v1-23 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-9 f0-2)) + (.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-23 quad) vf1) + ) + (set! (-> self nav state heading quad) (-> gp-0 quad)) + ) + 0 + ) + ) + ) + :trans (behavior () + (nav-enemy-method-171 self) + (if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory)) + (go-virtual victory) + ) + (let ((gp-0 (-> self focus aware))) + (if (< (the-as int gp-0) 2) + (set-time! (-> self starting-time)) + ) + (when (and (time-elapsed? (-> self state-time) (-> self reaction-time)) (not (nav-enemy-method-174 self))) + (cond + ((>= 1 (the-as int gp-0)) + (go-virtual active) + ) + ((= gp-0 (enemy-aware ea3)) + (if (and (get-focus! self) + (not (and (-> self enemy-info use-frustration) (logtest? (enemy-flag ef40) (-> self enemy-flags)))) + (time-elapsed? (-> self starting-time) (-> self reaction-time)) + ) + (go-hostile self) + ) + (if (-> self enemy-info use-circling) + (go-virtual circling) + ) + ) + ((and (= gp-0 (enemy-aware ea4)) (nav-enemy-method-167 self)) + (go-flee self) + ) + ((and (= gp-0 (enemy-aware ea2)) + (-> self enemy-info use-pacing) + (time-elapsed? (-> self starting-time) (-> self reaction-time)) + ) + (go-virtual pacing) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (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) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + #f + ) + :post nav-enemy-stare-post + ) + +;; failed to figure out what this is: +(defstate taunt (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + ((-> (method-of-type nav-enemy stare) enter)) + (let ((gp-0 (handle->process (-> self focus handle)))) + (when (not gp-0) + (if (nav-enemy-method-174 self) + (go-virtual stare) + (go-virtual active) + ) + ) + (set! (-> self focus-pos quad) (-> (get-trans (the-as process-focusable gp-0) 0) quad)) + ) + ) + :exit (-> (method-of-type nav-enemy stare) exit) + :trans (behavior () + (when (and (time-elapsed? (-> self state-time) (-> self reaction-time)) (not (nav-enemy-method-174 self))) + (let ((v1-6 (-> self focus aware))) + (cond + ((>= 1 (the-as int v1-6)) + (go-virtual active) + ) + ((and (= v1-6 (enemy-aware ea3)) (get-focus! self)) + (go-virtual hostile) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (let ((gp-0 (set-reaction-time! self (seconds 0.2) (seconds 0.7))) + (s5-0 (current-time)) + (f28-0 f30-0) + ) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) + :num! (loop! f28-0) + :frame-num 0.0 + ) + (until (time-elapsed? s5-0 gp-0) + (suspend) + (ja :num! (loop! f28-0)) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info taunt-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (go-virtual stare) + ) + :post nav-enemy-stare-post + ) + +;; failed to figure out what this is: +(defstate pacing (nav-enemy) + :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 + (let ((v1-9 self)) + (set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-9 enemy-flags)))) + ) + 0 + (nav-enemy-method-176 self) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self move-dest quad) (-> self root trans quad)) + (set! (-> self state-timeout) (set-reaction-time! self (seconds 7) (seconds 11))) + (set-time! (-> self starting-time)) + (if (zero? (rnd-int self 2)) + (set! (-> self enemy-flags) (the-as enemy-flag (logior (enemy-flag ef41) (-> self enemy-flags)))) + (set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag ef41)))) + ) + (let ((gp-0 (handle->process (-> self focus handle)))) + (if (not gp-0) + (go-virtual active) + ) + (set! (-> self focus-pos quad) (-> (get-trans (the-as process-focusable gp-0) 0) quad)) + ) + ) + :trans (behavior () + (let ((a0-1 (handle->process (-> self focus handle)))) + (if a0-1 + (set! (-> self focus-pos quad) (-> (get-trans (the-as process-focusable a0-1) 0) quad)) + ) + ) + (let ((gp-1 (-> self focus aware))) + (if (or (!= gp-1 3) (not (get-focus! self))) + (set-time! (-> self starting-time)) + ) + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (if (>= 1 (the-as int gp-1)) + (go-virtual active) + ) + (when (= gp-1 (enemy-aware ea3)) + (when (and (get-focus! self) (time-elapsed? (-> self starting-time) (-> self reaction-time))) + (nav-enemy-method-172 self) + (go-virtual hostile) + ) + (if (-> self enemy-info use-circling) + (go-virtual circling) + ) + ) + (if (nav-enemy-method-174 self) + (go-stare2 self) + ) + (when (time-elapsed? (-> self state-time) (-> self state-timeout)) + (nav-enemy-method-172 self) + (go-stare2 self) + ) + ) + ) + (when (>= 1024.0 (vector-vector-xz-distance (-> self root trans) (-> self move-dest))) + (when (and (time-elapsed? (-> self state-time) (-> self reaction-time)) (zero? (rnd-int self 3))) + (nav-enemy-method-172 self) + (go-stare2 self) + ) + (countdown (gp-4 2) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (f30-1 16384.0) + (v1-70 (-> self enemy-flags)) + (s5-0 (-> self move-dest)) + ) + (let ((v1-71 (logxor (shl 512 32) (the-as int v1-70)))) + (set! (-> self enemy-flags) (the-as enemy-flag v1-71)) + (if (logtest? (shl 512 32) v1-71) + (set! f30-1 (- f30-1)) + ) + ) + (set! (-> s5-0 quad) (-> self focus-pos quad)) + (vector-! s4-0 (-> self root trans) s5-0) + (set! (-> s4-0 y) 0.0) + (vector-normalize! s4-0 (rnd-float-range self 16384.0 49152.0)) + (vector-rotate-around-y! s4-0 s4-0 f30-1) + (vector+! s5-0 s5-0 s4-0) + (if (and (closest-point-on-mesh (-> self nav) s5-0 s5-0 (the-as nav-poly #f)) + (< 4096.0 (vector-vector-xz-distance s5-0 (-> self root trans))) + ) + (return #f) + ) + ) + ) + (go-stare2 self) + ) + ) + :code (behavior () + (let ((f30-0 (rnd-float-range self 0.9 1.1)) + (gp-0 (-> self draw art-group data (-> self enemy-info walk-anim))) + ) + (let ((v1-8 (ja-group))) + (if (not (and v1-8 (= v1-8 gp-0))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (until #f + (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)) + ) + ) + ) + #f + ) + :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 circling (nav-enemy) + :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)) + (let ((gp-0 (handle->process (-> self focus handle)))) + (if (not gp-0) + (go-virtual active) + ) + (set! (-> self focus-pos quad) (-> (get-trans (the-as process-focusable gp-0) 0) quad)) + ) + (let ((f30-0 (-> self enemy-info circle-dist-lo)) + (f28-0 (-> self enemy-info circle-dist-hi)) + ) + (if (zero? (rnd-int self 4)) + (set! (-> self desired-angle) (rnd-float-range self f30-0 f28-0)) + (set! (-> self desired-angle) + (fmax (fmin (vector-vector-xz-distance (-> self focus-pos) (-> self root trans)) f28-0) f30-0) + ) + ) + ) + (set! (-> self enemy-flags) (the-as enemy-flag (logxor (shl 512 32) (the-as int (-> self enemy-flags))))) + (set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag ef42)))) + (set-time! (-> self starting-time)) + ) + :trans (behavior () + (let ((a0-1 (handle->process (-> self focus handle)))) + (if a0-1 + (set! (-> self focus-pos quad) (-> (get-trans (the-as process-focusable a0-1) 0) quad)) + ) + ) + (let ((gp-1 (-> self focus aware))) + (if (or (!= gp-1 3) (not (get-focus! self))) + (set-time! (-> self starting-time)) + ) + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (cond + ((>= 1 (the-as int gp-1)) + (nav-enemy-method-172 self) + (if (-> self enemy-info use-stop-chase) + (go-virtual stop-chase) + (go-virtual active) + ) + ) + ((and (= gp-1 (enemy-aware ea3)) + (get-focus! self) + (time-elapsed? (-> self starting-time) (-> self reaction-time)) + ) + (nav-enemy-method-172 self) + (go-hostile self) + ) + ((= gp-1 (enemy-aware ea2)) + (go-stare self) + ) + ((= gp-1 (enemy-aware ea4)) + (go-flee self) + ) + ((or (nav-enemy-method-174 self) (logtest? (enemy-flag ef42) (-> self enemy-flags))) + (go-stare2 self) + ) + ) + ) + ) + ) + :code (behavior () + (let ((f30-0 (rnd-float-range self 0.9 1.1)) + (gp-0 (-> self draw art-group data (-> self enemy-info walk-anim))) + ) + (let ((v1-8 (ja-group))) + (if (not (and v1-8 (= v1-8 gp-0))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (until #f + (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)) + ) + ) + ) + #f + ) + :post (behavior () + (let ((a0-0 self)) + (when (logtest? (enemy-flag ef37) (-> a0-0 enemy-flags)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((f30-0 16384.0)) + (if (logtest? (enemy-flag ef41) (-> self enemy-flags)) + (set! f30-0 (- f30-0)) + ) + (set! (-> s5-0 quad) (-> self focus-pos quad)) + (vector-! gp-0 (-> self root trans) s5-0) + (set! (-> gp-0 y) 0.0) + (vector-normalize! gp-0 (-> self desired-angle)) + (vector+! s5-0 s5-0 gp-0) + (vector-rotate-around-y! gp-0 gp-0 f30-0) + ) + (vector-normalize! gp-0 16384.0) + (vector+! s5-0 s5-0 gp-0) + ) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (set! (-> gp-1 quad) (-> self root trans quad)) + (closest-point-on-mesh (-> self nav) gp-1 s5-0 (the-as nav-poly #f)) + (if (< (vector-vector-xz-distance gp-1 (-> self root trans)) 409.6) + (set! (-> self enemy-flags) (the-as enemy-flag (logior (enemy-flag ef42) (-> self enemy-flags)))) + (set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag ef42)))) + ) + (let ((v1-28 (-> self nav state))) + (logclear! (-> v1-28 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-28 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-28 target-pos quad) (-> gp-1 quad)) + ) + ) + ) + 0 + ) + ) + (nav-enemy-travel-post) + ) + ) + +;; failed to figure out what this is: +(defstate flee (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy flee) enter))) + (if t9-0 + (t9-0) + ) + ) + (nav-enemy-method-177 self) + (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 + (let ((v1-9 self)) + (set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-9 enemy-flags)))) + ) + 0 + (nav-enemy-method-173 self) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (let ((v1-3 (-> self focus aware))) + (if (!= v1-3 (enemy-aware ea4)) + (go-stare self) + ) + ) + (if (nav-enemy-method-174 self) + (go-stare2 self) + ) + ) + ) + :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)) + ) + ) + #f + ) + :post nav-enemy-flee-post + ) + +;; failed to figure out what this is: +(defstate victory (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy victory) 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 ef37)))) + (set! (-> v1-4 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (let ((v1-9 self)) + (set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-9 enemy-flags)))) + ) + 0 + (vector-reset! (-> self root transv)) + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate hit (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy hit) 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 ef37)))) + (set! (-> v1-4 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (let ((v1-9 self)) + (set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-9 enemy-flags)))) + ) + 0 + ) + :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-hostile self) + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate knocked (nav-enemy) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy knocked) 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 ef37)))) + (set! (-> v1-4 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (let ((v1-9 self)) + (set! (-> v1-9 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-9 enemy-flags)))) + ) + 0 + ) + :post nav-enemy-falling-post + ) + +;; failed to figure out what this is: +(defstate die (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy die) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-4 self)) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-4 enemy-flags)))) + ) + 0 + (let ((v1-6 self)) + (set! (-> v1-6 enemy-flags) (the-as enemy-flag (logclear (-> v1-6 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-6 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate die-falling (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy die-falling) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-4 self)) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-4 enemy-flags)))) + ) + 0 + (let ((v1-6 self)) + (set! (-> v1-6 enemy-flags) (the-as enemy-flag (logclear (-> v1-6 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-6 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + ) + :post nav-enemy-die-falling-post + ) + +;; definition for method 91 of type nav-enemy +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs object. +(defmethod enemy-method-91 ((this nav-enemy) (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 #x100068) + ) + ) + +;; definition for method 101 of type nav-enemy +;; WARN: Return type mismatch quaternion vs none. +(defmethod enemy-method-101 ((this nav-enemy) (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 ((a1-4 this)) + (if (logtest? (enemy-flag ef38) (-> a1-4 enemy-flags)) + (seek-to-point-toward-point! (-> this root) (-> arg1 dest-pos) (-> this nav max-rotation-rate) (seconds 0.02)) + ) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate jump (nav-enemy) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy jump) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-4 self)) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-4 enemy-flags)))) + ) + 0 + (let ((v1-6 self)) + (set! (-> v1-6 enemy-flags) (the-as enemy-flag (logclear (-> v1-6 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-6 nav callback-info) *null-nav-callback-info*) + ) + 0 + (logclear! (-> self nav state flags) (nav-state-flag at-gap)) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type enemy jump) exit))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-4 (-> self nav))) + (logclear! (-> v1-4 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + ) + :code (behavior () + (let ((gp-0 (new 'stack-no-clear 'enemy-jump-info))) + (let ((s5-0 0)) + (init-jump-info! self gp-0) + (if (and (-> self enemy-info use-jump-blocked) + (logtest? (enemy-flag jump-check-blocked) (-> self enemy-flags)) + (enemy-method-91 self gp-0) + ) + (go-virtual jump-blocked) + ) + (let* ((v1-13 (-> self nav)) + (a1-2 (-> gp-0 dest-pos)) + (f0-0 (-> v1-13 extra-nav-sphere w)) + ) + (set! (-> v1-13 extra-nav-sphere quad) (-> a1-2 quad)) + (set! (-> v1-13 extra-nav-sphere w) f0-0) + ) + 0 + (let ((v1-16 (-> self nav))) + (set! (-> v1-16 extra-nav-sphere w) (-> self nav-radius-backup)) + ) + 0 + (let ((v1-18 (-> self nav))) + (logior! (-> v1-18 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + (when (logtest? (-> gp-0 flags) (enemy-jump-flags ejf0)) + (until #f + (if (jump-anim-handler self s5-0 gp-0) + (goto cfg-12) + ) + (in-jump-handler self s5-0 gp-0) + (enemy-method-101 self s5-0 gp-0) + (suspend) + (set! s5-0 1) + ) + #f + ) + ) + (label cfg-12) + (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 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) + (enemy-method-101 self s5-1 gp-0) + (suspend) + (set! s5-1 3) + ) + ) + (logclear! (-> self focus-status) (focus-status in-air)) + (let ((v1-51 (-> self nav))) + (logclear! (-> v1-51 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + (let ((v1-55 (-> self nav state))) + (set! (-> v1-55 current-poly) (the-as nav-poly #f)) + ) + 0 + (logclear! (-> self nav state flags) (nav-state-flag at-target)) + (move-to-gspot! self) + (let ((s5-2 4)) + (until #f + (if (jump-anim-handler self s5-2 gp-0) + (goto cfg-19) + ) + (in-jump-handler self s5-2 gp-0) + (enemy-method-101 self s5-2 gp-0) + (suspend) + (set! s5-2 5) + ) + ) + #f + (label cfg-19) + (if (logtest? (enemy-flag directed) (-> self enemy-flags)) + ((lambda :behavior nav-enemy + ((arg0 enemy-jump-info)) + (send-event (ppointer->process (-> self parent)) 'child-jumped) + (none) + ) + gp-0 + ) + ) + ) + (go-directed2 self) + ) + :post (behavior () + (let ((a0-0 self)) + (cond + ((logtest? (enemy-flag ef37) (-> a0-0 enemy-flags)) + (nav-enemy-method-187 self) + ) + (else + (let ((a1-2 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-2 options) (overlaps-others-options)) + (set! (-> a1-2 collide-with-filter) (-> self enemy-info overlaps-others-collide-with-filter)) + (set! (-> a1-2 tlist) *touching-list*) + (find-overlapping-shapes (-> self root) a1-2) + ) + (nav-enemy-simple-post) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate jump-blocked (nav-enemy) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type enemy jump-blocked) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-4 self)) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-4 enemy-flags)))) + ) + 0 + (let ((v1-6 self)) + (set! (-> v1-6 enemy-flags) (the-as enemy-flag (logclear (-> v1-6 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-6 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate directed (nav-enemy) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logior! (-> self enemy-flags) (enemy-flag directed-ready)) + ((-> (method-of-type nav-enemy idle) enter)) + ) + :code (-> (method-of-type nav-enemy idle) code) + :post (-> (method-of-type nav-enemy idle) post) + ) + +;; failed to figure out what this is: +(defstate view-anims (nav-enemy) + :virtual #t + :enter (behavior () + (when (-> self nav) + (let ((v1-1 self)) + (set! (-> v1-1 enemy-flags) (the-as enemy-flag (logclear (-> v1-1 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (let ((v1-3 self)) + (set! (-> v1-3 enemy-flags) (the-as enemy-flag (logclear (-> v1-3 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-3 nav callback-info) *null-nav-callback-info*) + ) + 0 + ) + ) + ) + +;; failed to figure out what this is: +(defstate debug-control (nav-enemy) + :virtual #t + :event enemy-event-handler + :code (behavior () + (let ((v1-0 *nav-enemy-debug-control-info*)) + (set! (-> v1-0 steering) 0.0) + (set! (-> v1-0 throttle) 0.0) + ) + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info walk-anim)) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post nav-enemy-debug-control-post + ) diff --git a/test/decompiler/reference/jak3/engine/nav/nav-engine_REF.gc b/test/decompiler/reference/jak3/engine/nav/nav-engine_REF.gc new file mode 100644 index 0000000000..206e41155f --- /dev/null +++ b/test/decompiler/reference/jak3/engine/nav/nav-engine_REF.gc @@ -0,0 +1,619 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type nav-engine-spr-buffer +(deftype nav-engine-spr-buffer (structure) + ((mem-addr (pointer nav-mesh)) + (mem-nav uint32 :overlay-at mem-addr) + (spr-addr (inline-array nav-control)) + (spr-nav uint32 :overlay-at spr-addr) + (q-size uint32) + (i-nav uint8) + (done int8) + (nav-count int8) + (i-pass int8) + ) + :pack-me + ) + +;; definition for method 3 of type nav-engine-spr-buffer +(defmethod inspect ((this nav-engine-spr-buffer)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'nav-engine-spr-buffer) + (format #t "~1Tmem-addr: ~D~%" (-> this mem-addr)) + (format #t "~1Tmem-nav: #x~X~%" (-> this mem-addr)) + (format #t "~1Tspr-addr: ~D~%" (-> this spr-addr)) + (format #t "~1Tspr-nav: #x~X~%" (-> this spr-addr)) + (format #t "~1Tq-size: ~D~%" (-> this q-size)) + (format #t "~1Ti-nav: ~D~%" (-> this i-nav)) + (format #t "~1Tdone: ~D~%" (-> this done)) + (format #t "~1Tnav-count: ~D~%" (-> this nav-count)) + (format #t "~1Ti-pass: ~D~%" (-> this i-pass)) + (label cfg-4) + this + ) + +;; definition of type nav-engine +(deftype nav-engine (structure) + ((spr-addr uint32) + (nav-work-addr uint32) + (nav-mesh-addr nav-mesh) + (poly-array-addr uint32) + (hash-sphere-addr uint32) + (hash-buckets-addr uint32) + (buf-nav-control-count int8) + (max-pass-count int8) + (output-sphere-hash uint8) + (work-buf-array nav-engine-spr-buffer 3 :inline) + (spr-work nav-mesh-work :overlay-at nav-work-addr) + (mem-work nav-mesh-work) + (spr-mesh nav-mesh :overlay-at nav-mesh-addr) + (mem-mesh nav-mesh) + (spr-poly-array uint32 :overlay-at poly-array-addr) + (mem-poly-array (inline-array nav-poly)) + (hash-sphere-list uint32 :overlay-at hash-sphere-addr) + (hash-buckets uint32 :overlay-at hash-buckets-addr) + (to-spr-wait uint32) + (from-spr-wait uint32) + ) + (:methods + (inc-spr-addr! (_type_ uint) uint) + (lay-out-spad-memory (_type_ nav-mesh) none) + (set-up-mem-work (_type_) none) + (add-spheres-from-mesh-user-list (_type_ sphere-hash nav-mesh) none) + (add-all-spheres (_type_) none) + (do-sphere-lookups (_type_) none) + (update-nav-controls-pipelined-in-spr (_type_) none) + (update-nav-controls-in-spr (_type_) none) + (upload-nav-to-spr (_type_ nav-engine-spr-buffer) none) + (download-nav-from-spr (_type_ nav-engine-spr-buffer) none) + (do-callbacks (_type_ nav-engine-spr-buffer) none) + (reloc-ptrs-to-spad (_type_ nav-engine-spr-buffer) none) + (reloc-ptrs-to-mem (_type_ nav-engine-spr-buffer) none) + ) + ) + +;; definition for method 3 of type nav-engine +(defmethod inspect ((this nav-engine)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'nav-engine) + (format #t "~1Tspr-addr: ~D~%" (-> this spr-addr)) + (format #t "~1Tnav-work-addr: ~D~%" (-> this nav-work-addr)) + (format #t "~1Tnav-mesh-addr: ~D~%" (-> this nav-mesh-addr)) + (format #t "~1Tpoly-array-addr: ~D~%" (-> this poly-array-addr)) + (format #t "~1Thash-sphere-addr: ~D~%" (-> this hash-sphere-addr)) + (format #t "~1Thash-buckets-addr: ~D~%" (-> this hash-buckets-addr)) + (format #t "~1Tbuf-nav-control-count: ~D~%" (-> this buf-nav-control-count)) + (format #t "~1Tmax-pass-count: ~D~%" (-> this max-pass-count)) + (format #t "~1Toutput-sphere-hash: ~D~%" (-> this output-sphere-hash)) + (format #t "~1Twork-buf-array[3] @ #x~X~%" (-> this work-buf-array)) + (format #t "~1Tspr-work: #~%" (-> this nav-work-addr)) + (format #t "~1Tmem-work: #~%" (-> this mem-work)) + (format #t "~1Tspr-mesh: ~A~%" (-> this nav-mesh-addr)) + (format #t "~1Tmem-mesh: ~A~%" (-> this mem-mesh)) + (format #t "~1Tspr-poly-array: #x~X~%" (-> this poly-array-addr)) + (format #t "~1Tmem-poly-array: #x~X~%" (-> this mem-poly-array)) + (format #t "~1Thash-sphere-list: #x~X~%" (-> this hash-sphere-addr)) + (format #t "~1Thash-buckets: #x~X~%" (-> this hash-buckets-addr)) + (format #t "~1Tto-spr-wait: ~D~%" (-> this to-spr-wait)) + (format #t "~1Tfrom-spr-wait: ~D~%" (-> this from-spr-wait)) + (label cfg-4) + this + ) + +;; definition for method 9 of type nav-engine +(defmethod inc-spr-addr! ((this nav-engine) (arg0 uint)) + (let ((v0-0 (-> this spr-addr))) + (+! (-> this spr-addr) arg0) + v0-0 + ) + ) + +;; definition for method 10 of type nav-engine +;; WARN: Return type mismatch int vs none. +(defmethod lay-out-spad-memory ((this nav-engine) (arg0 nav-mesh)) + (let ((s5-0 0)) + (set! (-> this spr-addr) (the-as uint #x70000060)) + (let* ((v1-1 this) + (a1-1 320) + (a0-1 (-> v1-1 spr-addr)) + ) + (+! (-> v1-1 spr-addr) a1-1) + (set! (-> this nav-work-addr) a0-1) + ) + (let* ((v1-2 this) + (a1-3 112) + (a0-2 (-> v1-2 spr-addr)) + ) + (+! (-> v1-2 spr-addr) a1-3) + (set! (-> this nav-mesh-addr) (the-as nav-mesh a0-2)) + ) + (if (and (= (-> arg0 work polys-in-scratch) 1) (< (-> arg0 poly-count) (the-as uint 64))) + (set! s5-0 (the-as int (-> arg0 poly-count))) + ) + (let* ((v1-10 this) + (a1-5 (* s5-0 64)) + (a0-4 (-> v1-10 spr-addr)) + ) + (+! (-> v1-10 spr-addr) a1-5) + (set! (-> this poly-array-addr) a0-4) + ) + (let* ((v1-11 this) + (a1-7 (* (-> arg0 sphere-hash max-object-count) 16)) + (a0-7 (-> v1-11 spr-addr)) + ) + (+! (-> v1-11 spr-addr) a1-7) + (set! (-> this hash-sphere-addr) a0-7) + ) + (let* ((v1-12 this) + (a1-9 0) + (a0-8 (-> v1-12 spr-addr)) + ) + (+! (-> v1-12 spr-addr) a1-9) + (set! (-> this hash-buckets-addr) a0-8) + ) + (set! (-> this buf-nav-control-count) 7) + (dotimes (v1-14 3) + (let ((a0-11 (-> this work-buf-array v1-14))) + (let* ((a1-11 this) + (a3-0 2048) + (a2-5 (-> a1-11 spr-addr)) + ) + (+! (-> a1-11 spr-addr) a3-0) + (set! (-> a0-11 spr-addr) (the-as (inline-array nav-control) a2-5)) + ) + (set! (-> a0-11 mem-addr) (the-as (pointer nav-mesh) 0)) + (set! (-> a0-11 q-size) (the-as uint 0)) + (set! (-> a0-11 nav-count) 0) + (set! (-> a0-11 i-pass) -1) + ) + ) + (set! (-> this output-sphere-hash) (the-as uint 0)) + (set! (-> this mem-mesh) arg0) + (cond + ((= (-> arg0 work mesh-struct-in-scratch) 1) + (set! (-> this nav-mesh-addr) (the-as nav-mesh (&-> (-> this nav-mesh-addr) poly-array))) + (mem-copy! (&-> (-> this nav-mesh-addr) type) (&-> arg0 type) 112) + ) + (else + (set! (-> this nav-mesh-addr) arg0) + ) + ) + (set! (-> this mem-work) (-> arg0 work)) + (if (= (-> arg0 work work-struct-in-scratch) 1) + (quad-copy! (the-as pointer (-> this nav-work-addr)) (the-as pointer (-> this mem-work)) 20) + (set! (-> this nav-work-addr) (the-as uint (-> arg0 work))) + ) + (set! (-> this nav-mesh-addr work) (the-as nav-mesh-work (-> this nav-work-addr))) + (set! (-> this mem-poly-array) (-> arg0 poly-array)) + (when (> s5-0 0) + (quad-copy! (the-as pointer (-> this poly-array-addr)) (the-as pointer (-> this mem-poly-array)) (* s5-0 4)) + (set! (-> this nav-mesh-addr poly-array) (the-as (inline-array nav-poly) (-> this poly-array-addr))) + ) + ) + 0 + (none) + ) + +;; definition for method 11 of type nav-engine +;; WARN: Return type mismatch int vs none. +(defmethod set-up-mem-work ((this nav-engine)) + (let ((v1-0 (-> this mem-mesh))) + (set! (-> v1-0 poly-array) (-> this mem-poly-array)) + (set! (-> v1-0 work) (-> this mem-work)) + ) + 0 + (none) + ) + +;; definition for method 12 of type nav-engine +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod add-spheres-from-mesh-user-list ((this nav-engine) (arg0 sphere-hash) (arg1 nav-mesh)) + (countdown (s3-0 (-> arg1 static-sphere-count)) + (add-a-sphere-with-flag arg0 (-> arg1 static-sphere s3-0) 64) + ) + (let* ((s4-1 (-> arg1 user-list)) + (v1-6 (-> s4-1 alive-list next0)) + (s3-1 (-> (the-as connection v1-6) next0)) + ) + (while (!= v1-6 (-> s4-1 alive-list-end)) + (let ((a0-4 (-> (the-as connection v1-6) param1)) + (s2-0 (the-as object (-> (the-as connection v1-6) param3))) + ) + (cond + ((-> (the-as connection v1-6) param2) + (let ((s1-0 (-> (the-as process-focusable a0-4) nav))) + (set! (-> s1-0 sec-per-frame) (-> (the-as process-focusable a0-4) clock seconds-per-frame)) + (set! (-> s1-0 root-nav-sphere quad) (-> (the-as collide-shape s2-0) trans quad)) + (set! (-> s1-0 root-nav-sphere w) (-> (the-as collide-shape s2-0) nav-radius)) + (if (logtest? (-> s1-0 flags) (nav-control-flag output-sphere-hash)) + (set! (-> this output-sphere-hash) (the-as uint 1)) + ) + (if (logtest? (-> (the-as collide-shape s2-0) nav-flags) (nav-flags has-root-sphere)) + (set! (-> s1-0 root-sphere-id) + (the-as uint (add-a-sphere-with-flag + arg0 + (-> s1-0 root-nav-sphere) + (the-as int (-> (the-as collide-shape s2-0) backup-collide-as)) + ) + ) + ) + ) + (if (logtest? (-> (the-as collide-shape s2-0) nav-flags) (nav-flags has-extra-sphere)) + (add-a-sphere-with-flag + arg0 + (-> s1-0 extra-nav-sphere) + (the-as int (-> (the-as collide-shape s2-0) backup-collide-as)) + ) + ) + ) + ) + (else + (when (logtest? (-> (the-as collide-shape s2-0) nav-flags) (nav-flags has-root-sphere)) + (let ((a1-5 (new 'stack-no-clear 'vector))) + (set! (-> a1-5 quad) (-> (the-as collide-shape s2-0) trans quad)) + (set! (-> a1-5 w) (-> (the-as collide-shape s2-0) nav-radius)) + (add-a-sphere-with-flag arg0 a1-5 (the-as int (-> (the-as collide-shape s2-0) backup-collide-as))) + ) + ) + ) + ) + (when (logtest? (-> (the-as collide-shape s2-0) nav-flags) (nav-flags has-child-spheres)) + (let ((s2-1 (-> (the-as collide-shape s2-0) root-prim)) + (s1-1 1) + ) + (when (zero? (-> s2-1 prim-core prim-type)) + (let ((v1-35 s2-1)) + (set! s2-1 (-> (the-as collide-shape-prim-group v1-35) child 0)) + (set! s1-1 (the-as int (-> v1-35 specific 0))) + ) + ) + (while (nonzero? s1-1) + (+! s1-1 -1) + (when (and (logtest? (collide-action nav-sphere) (-> s2-1 prim-core action)) (= (-> s2-1 prim-core prim-type) -1)) + (let ((a1-6 (new 'stack-no-clear 'vector))) + (set! (-> a1-6 quad) (-> s2-1 prim-core world-sphere quad)) + (set! (-> a1-6 w) (-> (the-as collide-shape-prim-sphere s2-1) nav-radius)) + (add-a-sphere-with-flag arg0 a1-6 (the-as int (-> s2-1 prim-core collide-as))) + ) + ) + (&+! s2-1 80) + ) + ) + ) + ) + (set! v1-6 s3-1) + (set! s3-1 (-> s3-1 next0)) + ) + ) + 0 + (none) + ) + +;; definition for method 13 of type nav-engine +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod add-all-spheres ((this nav-engine)) + (let ((s4-0 (-> this nav-mesh-addr)) + (gp-0 (-> this nav-mesh-addr sphere-hash)) + ) + (clear-objects! gp-0) + (set! (-> gp-0 bucket-array) (the-as (pointer grid-hash-word) (-> this hash-buckets-addr))) + (set! (-> gp-0 sphere-array) (the-as (inline-array sphere) (-> this hash-sphere-addr))) + (when *target* + (let ((a1-0 (new 'stack-no-clear 'vector))) + (let ((v1-8 (-> *target* control))) + (set! (-> a1-0 quad) (-> v1-8 trans quad)) + (set! (-> a1-0 w) (-> v1-8 nav-radius)) + ) + (add-a-sphere-with-flag gp-0 a1-0 2) + ) + ) + (add-spheres-from-mesh-user-list this gp-0 s4-0) + (let ((s3-0 (the-as nav-mesh (-> s4-0 next-nav-mesh)))) + (while (and s3-0 (nonzero? s3-0)) + (add-spheres-from-mesh-user-list this gp-0 s3-0) + (set! s3-0 (the-as nav-mesh (-> s3-0 next-nav-mesh))) + ) + ) + (let ((s4-1 (the-as nav-mesh (-> s4-0 prev-nav-mesh)))) + (while (and s4-1 (nonzero? s4-1)) + (add-spheres-from-mesh-user-list this gp-0 s4-1) + (set! s4-1 (the-as nav-mesh (-> s4-1 prev-nav-mesh))) + ) + ) + (update-from-spheres gp-0) + ) + 0 + (none) + ) + +;; definition for method 14 of type nav-engine +;; WARN: Return type mismatch int vs none. +(defmethod do-sphere-lookups ((this nav-engine)) + (let ((s5-0 (-> this nav-mesh-addr))) + (dotimes (s4-0 (the-as int (-> s5-0 nav-control-count))) + (let ((a0-3 (-> s5-0 nav-control-array s4-0))) + (when (-> a0-3 process) + (set! (-> a0-3 sphere-count) 0) + (set! (-> a0-3 state mesh) (-> this nav-mesh-addr)) + (set! (-> this mem-work nav) (the-as basic a0-3)) + (find-sphere-ids-from-sphere-hash a0-3 #f) + (set! (-> this mem-work nav) #f) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function nav-dma-send-to-spr-no-flush +;; INFO: function output is handled by mips2c +(def-mips2c nav-dma-send-to-spr-no-flush (function pointer pointer int none)) + +;; definition for function nav-dma-send-from-spr-no-flush +;; INFO: function output is handled by mips2c +(def-mips2c nav-dma-send-from-spr-no-flush (function pointer pointer int none)) + +;; definition for function inc-mod3 +(defun inc-mod3 ((arg0 int)) + (local-vars (v0-1 int) (v1-1 int)) + (let ((v0-0 (+ arg0 1))) + (let ((v1-0 2)) + (set-on-less-than v1-1 v1-0 v0-0) + ) + (move-if-not-zero v0-1 0 v1-1 v0-0) + ) + v0-1 + ) + +;; definition for function nav-state-patch-pointers +;; INFO: function output is handled by mips2c +(def-mips2c nav-state-patch-pointers (function nav-state int none)) + +;; definition for method 17 of type nav-engine +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 17 nav-engine)" 17 nav-engine) + +;; definition for method 18 of type nav-engine +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 18 nav-engine)" 18 nav-engine) + +;; definition for method 19 of type nav-engine +;; WARN: Return type mismatch int vs none. +(defmethod do-callbacks ((this nav-engine) (arg0 nav-engine-spr-buffer)) + (local-vars (sv-16 nav-callback-info)) + (with-pp + (dotimes (s4-0 (-> arg0 nav-count)) + (let* ((a1-1 (-> arg0 spr-addr s4-0)) + (a0-3 (-> a1-1 process)) + ) + (set! sv-16 (-> a1-1 callback-info)) + (when a0-3 + (set! (-> a1-1 state nav) a1-1) + (when (and (logtest? (-> a1-1 flags) (nav-control-flag kernel-run)) sv-16) + (let ((s3-0 pp)) + (set! pp a0-3) + (set! (-> this mem-mesh work nav) (the-as basic a1-1)) + (let ((v1-10 (-> sv-16 callback-count))) + (set! (-> this max-pass-count) (max (-> this max-pass-count) v1-10)) + (if (< (-> arg0 i-pass) v1-10) + ((-> sv-16 callback-array (-> arg0 i-pass)) a0-3 a1-1) + ) + ) + (set! pp s3-0) + ) + (set! (-> this mem-mesh work nav) #f) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 20 of type nav-engine +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 20 nav-engine)" 20 nav-engine) + +;; definition for method 21 of type nav-engine +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 21 nav-engine)" 21 nav-engine) + +;; definition for method 15 of type nav-engine +;; WARN: Return type mismatch int vs none. +(defmethod update-nav-controls-pipelined-in-spr ((this nav-engine)) + (local-vars + (v1-33 int) + (v1-45 int) + (v1-66 int) + (a0-14 int) + (a0-19 int) + (a0-26 int) + (sv-16 symbol) + (sv-24 int) + (sv-32 int) + (sv-40 uint) + (sv-44 (inline-array nav-control)) + (sv-48 nav-engine-spr-buffer) + ) + (flush-cache 0) + (set! (-> this max-pass-count) 3) + (set! sv-16 (the-as symbol #f)) + (set! sv-24 0) + (set! sv-32 0) + (set! sv-40 (-> this nav-mesh-addr nav-control-count)) + (set! sv-44 (-> this nav-mesh-addr nav-control-array)) + (let ((s5-0 2) + (s3-0 1) + (s4-0 0) + ) + (while (not sv-16) + (let ((s2-0 (-> this work-buf-array s5-0))) + (set! (-> s2-0 i-nav) (the-as uint sv-32)) + (set! (-> s2-0 nav-count) (min (-> this buf-nav-control-count) (the-as int (- sv-40 (the-as uint sv-32))))) + (set! (-> s2-0 i-pass) sv-24) + (set! (-> s2-0 mem-addr) (the-as (pointer nav-mesh) (-> sv-44 sv-32))) + (set! (-> s2-0 q-size) (the-as uint (* 18 (-> s2-0 nav-count)))) + (set! (-> s2-0 done) 0) + (when (>= sv-24 (-> this max-pass-count)) + (set! (-> s2-0 nav-count) 0) + 0 + ) + (if (> (-> s2-0 nav-count) 0) + (upload-nav-to-spr this s2-0) + (dma-sync (the-as pointer #x1000d400) 0 0) + ) + (set! sv-32 (+ sv-32 (-> s2-0 nav-count))) + (when (>= sv-32 (the-as int sv-40)) + (set! sv-32 0) + (set! sv-24 (+ sv-24 1)) + (if (= sv-24 (-> this max-pass-count)) + (set! (-> s2-0 done) 1) + ) + ) + ) + (let ((v1-32 (+ s5-0 1))) + (let ((a0-13 2)) + (set-on-less-than a0-14 a0-13 v1-32) + ) + (move-if-not-zero v1-33 0 a0-14 v1-32) + ) + (set! s5-0 v1-33) + (let ((s2-1 (-> this work-buf-array s4-0))) + (when (> (-> s2-1 nav-count) 0) + (download-nav-from-spr this s2-1) + (when (= (-> s2-1 done) 1) + (dma-sync (the-as pointer #x1000d000) 0 0) + (set! sv-16 #t) + ) + ) + ) + (let ((v1-44 (+ s4-0 1))) + (let ((a0-18 2)) + (set-on-less-than a0-19 a0-18 v1-44) + ) + (move-if-not-zero v1-45 0 a0-19 v1-44) + ) + (set! s4-0 v1-45) + (set! sv-48 (-> this work-buf-array s3-0)) + (when (> (-> sv-48 nav-count) 0) + (if (zero? (-> sv-48 i-pass)) + (reloc-ptrs-to-spad this sv-48) + ) + (do-callbacks this sv-48) + (if (= (-> sv-48 i-pass) (+ (-> this max-pass-count) -1)) + (reloc-ptrs-to-mem this sv-48) + ) + ) + (let ((v1-65 (+ s3-0 1))) + (let ((a0-25 2)) + (set-on-less-than a0-26 a0-25 v1-65) + ) + (move-if-not-zero v1-66 0 a0-26 v1-65) + ) + (set! s3-0 v1-66) + ) + ) + 0 + (none) + ) + +;; definition for method 16 of type nav-engine +;; WARN: Return type mismatch int vs none. +(defmethod update-nav-controls-in-spr ((this nav-engine)) + (flush-cache 0) + (set! (-> this max-pass-count) 1) + (let ((gp-0 (-> this work-buf-array))) + (set! (-> gp-0 0 i-nav) (the-as uint 0)) + (set! (-> gp-0 0 nav-count) (the-as int (-> this nav-mesh-addr nav-control-count))) + (set! (-> gp-0 0 i-pass) 0) + (set! (-> gp-0 0 mem-addr) (the-as (pointer nav-mesh) (-> this nav-mesh-addr nav-control-array))) + (set! (-> gp-0 0 q-size) (the-as uint (* 18 (-> gp-0 0 nav-count)))) + (set! (-> gp-0 0 done) 0) + (when (> (-> gp-0 0 nav-count) 0) + (upload-nav-to-spr this (the-as nav-engine-spr-buffer gp-0)) + (dma-sync (the-as pointer #x1000d400) 0 0) + (reloc-ptrs-to-spad this (the-as nav-engine-spr-buffer gp-0)) + (while (< (-> gp-0 0 i-pass) (-> this max-pass-count)) + (do-callbacks this (the-as nav-engine-spr-buffer gp-0)) + (+! (-> gp-0 0 i-pass) 1) + ) + (reloc-ptrs-to-mem this (the-as nav-engine-spr-buffer gp-0)) + (dotimes (s4-0 (-> gp-0 0 nav-count)) + (let ((a2-1 (-> gp-0 0 spr-addr s4-0 state mesh))) + (when (>= (the-as uint a2-1) (the-as uint #x70000000)) + (format 0 "nav-engine::update-nav-controls-in-spr: (pre-dma) bad mesh pointer found (#x0~x)~%" a2-1) + (break!) + 0 + ) + ) + ) + (download-nav-from-spr this (the-as nav-engine-spr-buffer gp-0)) + (dma-sync (the-as pointer #x1000d000) 0 0) + (dotimes (s5-1 (-> gp-0 0 nav-count)) + (let ((a2-3 (-> (&+ (-> gp-0 0 mem-addr) (* 288 s5-1)) 31))) + (when (>= (the-as uint a2-3) (the-as uint #x70000000)) + (format 0 "nav-engine::update-nav-controls-in-spr: (post-dma) bad mesh pointer found (#x0~x)~%" a2-3) + (break!) + 0 + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 28 of type nav-mesh +;; WARN: Return type mismatch int vs none. +(defmethod update-navigation ((this nav-mesh)) + (local-vars (sp-0 int)) + (when (zero? (-> this next-nav-mesh)) + (set! (-> this next-nav-mesh) (the-as surface (nav-mesh-from-res-tag (-> this entity) 'next-actor 0))) + (set! (-> this prev-nav-mesh) (the-as surface (nav-mesh-from-res-tag (-> this entity) 'prev-actor 0))) + ) + (when (> (-> this nav-control-count) 0) + (the-as none sp-0) + (set! sp-0 #x70003fc0) + (set! (-> this work mesh) this) + (let ((s4-0 (the-as nav-engine #x70000000))) + (lay-out-spad-memory s4-0 this) + (add-all-spheres s4-0) + (do-sphere-lookups s4-0) + (when (nonzero? (-> s4-0 output-sphere-hash)) + (let ((s3-0 (-> s4-0 nav-mesh-addr sphere-hash))) + (quad-copy! (-> s3-0 mem-bucket-array) (-> s3-0 bucket-array) (/ (-> s3-0 bucket-memory-size) 16)) + (quad-copy! + (the-as pointer (-> s3-0 mem-sphere-array)) + (the-as pointer (-> s3-0 sphere-array)) + (-> s3-0 object-count) + ) + (set! (-> s3-0 bucket-array) (-> s3-0 mem-bucket-array)) + (set! (-> s3-0 sphere-array) (the-as (inline-array sphere) (-> s3-0 mem-sphere-array))) + ) + ) + (if (< (the-as uint (* 3 (-> s4-0 buf-nav-control-count))) (-> this nav-control-count)) + (update-nav-controls-pipelined-in-spr s4-0) + (update-nav-controls-in-spr s4-0) + ) + (set-up-mem-work s4-0) + ) + ) + 0 + (none) + ) + + + + 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 9086f90398..fb02eebe7a 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 @@ -382,47 +382,47 @@ Based on the implementation of point-poly-intersection?, these should likely be (pad2 uint32 7) ) (:methods - (nav-mesh-method-9 () none) - (nav-mesh-method-10 () none) - (nav-mesh-method-11 () none) - (nav-mesh-method-12 () none) - (nav-mesh-method-13 () none) - (nav-mesh-method-14 () none) - (nav-mesh-method-15 () none) - (nav-mesh-method-16 () none) - (nav-mesh-method-17 () none) + (debug-draw (_type_) none) + (nav-mesh-method-10 (_type_ vector vector nav-poly) nav-poly) + (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) + (lookup-poly-on-route-to-target (_type_ nav-poly nav-poly) nav-poly) + (get-route-portal (_type_ nav-poly nav-poly nav-route-portal) (inline-array nav-vertex)) + (initialize-mesh! (_type_) none) (advance-ray-to-nearest-poly-edge-or-dest! (_type_ nav-ray) none) - (nav-mesh-method-19 () none) - (nav-mesh-method-20 () none) - (nav-mesh-method-21 () none) - (nav-mesh-method-22 () none) - (nav-mesh-method-23 () none) - (nav-mesh-method-24 () none) - (nav-mesh-method-25 () none) - (nav-mesh-method-26 () none) - (nav-mesh-method-27 () none) - (nav-mesh-method-28 () none) - (nav-mesh-method-29 () none) - (nav-mesh-method-30 () none) - (nav-mesh-method-31 () none) - (nav-mesh-method-32 () none) - (nav-mesh-method-33 () none) - (nav-mesh-method-34 () none) - (nav-mesh-method-35 () none) - (nav-mesh-method-36 () none) - (nav-mesh-method-37 () none) - (nav-mesh-method-38 () none) - (nav-mesh-method-39 () none) + (try-move-along-ray (_type_ nav-poly vector vector float) meters) + (clamp-vector-to-mesh-cross-gaps (_type_ vector nav-poly vector float symbol clamp-travel-vector-to-mesh-return-info) none) + (clamp-vector-to-mesh-no-gaps (_type_ vector nav-poly vector clamp-travel-vector-to-mesh-return-info) none) + (set-normals-from-adjacent-bounds (_type_ clamp-travel-vector-to-mesh-return-info) none) + (find-adjacent-bounds-one (_type_ vector nav-poly int int) none) + (compute-bounding-box-from-vertices (_type_ vector vector) none) + (init-from-entity (_type_ entity-nav-mesh) none) + (handle-birth (_type_) none) + (handle-kill (_type_) none) + (update-navigation (_type_) none) + (new-nav-control (_type_) nav-control) + (remove-nav-control (_type_ nav-control) none) + (add-process-drawable-to-nav-mesh (_type_ process-drawable symbol) none) + (remove-process-drawable (_type_ process-drawable) none) + (change-to (_type_ process-drawable) none) + (link-by-id (_type_ uint) symbol) + (unlink-by-id (_type_ uint) symbol) + (nav-mesh-method-36 (_type_ vector vector float) float) + (nav-mesh-method-37 (_type_ vector vector float) float) + (nav-mesh-method-38 (_type_ nav-poly) none) + (debug-draw-poly (_type_ nav-poly rgba) none) (point-in-poly? (_type_ nav-poly vector) symbol) - (nav-mesh-method-41 () none) + (nav-mesh-method-41 (_type_ nav-poly vector vector vector (pointer nav-poly)) vector) (closest-point-on-boundary (_type_ nav-poly vector vector) vector) - (nav-mesh-method-43 () none) + (project-point-onto-plane-of-poly-local (_type_ nav-poly vector vector vector) none) (project-point-into-poly-2d (_type_ nav-poly vector vector) vector) - (nav-mesh-method-45 () none) - (nav-mesh-method-46 () none) - (nav-mesh-method-47 () none) - (nav-mesh-method-48 () none) - (nav-mesh-method-49 () none) + (nav-mesh-method-45 (_type_ nav-poly) nav-poly) + (nav-mesh-method-46 (_type_ nav-poly) nav-poly) + (is-in-mesh-local? (_type_ vector float float) symbol) + (link-to-other-mesh (_type_ nav-mesh-link) symbol) + (unlink-mesh (_type_ nav-mesh-link) none) ) ) @@ -799,7 +799,3 @@ Based on the implementation of point-poly-intersection?, these should likely be 0 (none) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/nav/nav-mesh_REF.gc b/test/decompiler/reference/jak3/engine/nav/nav-mesh_REF.gc new file mode 100644 index 0000000000..a604dc8242 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/nav/nav-mesh_REF.gc @@ -0,0 +1,2244 @@ +;;-*-Lisp-*- +(in-package goal) + +(rlet ((vf0 :class vf) (vf4 :class vf) (vf5 :class vf) (vf6 :class vf)) +(init-vf0-vector) + +;; definition for symbol *debug-nav-control-output*, type symbol +(define *debug-nav-control-output* #f) + +;; definition for symbol *debug-nav-control*, type symbol +(define *debug-nav-control* #f) + +;; definition for symbol *debug-nav-mesh-output*, type symbol +(define *debug-nav-mesh-output* #f) + +;; definition for symbol *debug-nav-ray*, type nav-ray +(define *debug-nav-ray* (the-as nav-ray #f)) + +;; definition for symbol *debug-ray-offset*, type vector +(define *debug-ray-offset* (new 'static 'vector)) + +;; definition for symbol *debug-offset*, type vector +(define *debug-offset* (new 'static 'vector :y 4096.0 :w 1.0)) + +;; definition for symbol *nav-mesh-work*, type nav-mesh-work +(define *nav-mesh-work* (new 'static 'nav-mesh-work + :vert0-table (new 'static 'array int8 4 0 1 2 3) + :vert1-table (new 'static 'array int8 4 1 2 3 0) + :edge-mask-table (new 'static 'array uint8 3 #x1 #x2 #x4) + :deg-to-rad 0.000095873795 + :rad-to-deg 10430.379 + :nav-poly-min-dist 204.8 + :nav-poly-epsilon 40.96 + :debug (new 'static 'nav-mesh-work-debug) + :work-struct-in-scratch 1 + :mesh-struct-in-scratch 1 + :polys-in-scratch 1 + ) + ) + +;; definition for symbol *default-nav-mesh*, type nav-mesh +(define *default-nav-mesh* (new 'static 'nav-mesh + :poly-array (new 'static 'inline-array nav-poly 1 + (new 'static 'nav-poly + :vertex (new 'static 'inline-array vector 4 + (new 'static 'vector :w -175458100000000000000000000000000000000.0) + (new 'static 'vector :w (the-as float #xffffffff)) + (new 'static 'vector) + (new 'static 'vector) + ) + ) + ) + :poly-count #x1 + :max-nav-control-count #x80 + :nav-control-array (new 'static 'inline-array nav-control 128 + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + (new 'static 'nav-control) + ) + ) + ) + +;; failed to figure out what this is: +(kmemopen global "nav-mesh") + +;; failed to figure out what this is: +(let ((gp-0 *default-nav-mesh*)) + (set! (-> gp-0 work) *nav-mesh-work*) + (if (zero? (-> gp-0 user-list)) + (set! (-> gp-0 user-list) (new 'global 'engine 'nav-engine 128 connection)) + ) + (when (zero? (-> gp-0 poly-hash)) + (set! (-> gp-0 poly-hash) (new 'global 'grid-hash 16)) + (let ((v1-12 (new 'static 'inline-array vector 2 (new 'static 'vector) (new 'static 'vector)))) + (vector-reset! (-> v1-12 0)) + (vector-reset! (-> v1-12 1)) + (let ((a1-3 (-> v1-12 0))) + (let ((a0-5 (-> v1-12 0))) + (let ((a2-3 -4096.0)) + (.mov vf6 a2-3) + ) + (.lvf vf4 (&-> a0-5 quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> a1-3 quad) vf5) + ) + (let ((a1-4 (-> v1-12 1))) + (let ((a0-6 (-> v1-12 1))) + (let ((a2-5 4096.0)) + (.mov vf6 a2-5) + ) + (.lvf vf4 (&-> a0-6 quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> a1-4 quad) vf5) + ) + (update-grid-for-objects-in-box + (-> gp-0 poly-hash) + (the-as int (-> gp-0 poly-count)) + (-> v1-12 0) + (-> v1-12 1) + ) + ) + ) + ) + +;; failed to figure out what this is: +(kmemclose) + +;; definition for function nav-mesh-connect-from-ent +(defun nav-mesh-connect-from-ent ((arg0 process-drawable)) + (let ((s5-0 (nav-mesh-from-res-tag (-> arg0 entity) 'nav-mesh-actor 0))) + (cond + (s5-0 + (if (zero? (-> s5-0 user-list)) + (format 0 "nav-mesh-connect-from-ent: nav mesh not initialized!~%") + ) + (if (add-connection (-> s5-0 user-list) arg0 nothing arg0 #f (-> arg0 root)) + #t + ) + ) + (else + (if (-> arg0 entity) + (logior! (-> arg0 entity extra perm status) (entity-perm-status error)) + ) + #f + ) + ) + ) + ) + +;; definition (debug) for function connection-validate +;; WARN: Return type mismatch int vs none. +(defun-debug connection-validate ((arg0 connection)) + (when (zero? arg0) + (break!) + 0 + ) + (when (zero? (-> arg0 next1)) + (break!) + 0 + ) + (when (zero? (-> arg0 prev1)) + (break!) + 0 + ) + (when (-> arg0 next1) + (when (!= arg0 (-> arg0 next1 prev1)) + (break!) + 0 + ) + ) + (when (-> arg0 prev1) + (when (!= arg0 (-> arg0 prev1 next1)) + (break!) + 0 + ) + ) + 0 + (none) + ) + +;; definition (debug) for function connection-list-validate +(defun-debug connection-list-validate ((arg0 (inline-array connection))) + (let ((gp-0 (the-as object (&-> arg0 3 prev1)))) + (while gp-0 + (connection-validate (the-as connection gp-0)) + (set! gp-0 (-> (the-as connection gp-0) next1)) + ) + ) + #f + ) + +;; definition (debug) for function nav-control-validate +;; WARN: Return type mismatch int vs none. +(defun-debug nav-control-validate ((arg0 process-drawable)) + (let ((s5-0 (the-as object (-> arg0 nav)))) + (when (and (-> arg0 nav) (!= arg0 (-> arg0 nav process))) + (format 0 "process pointing to wrong nav-control!~%") + (break!) + 0 + ) + (let ((s4-0 (-> arg0 nav state mesh))) + (when (or (not s4-0) (zero? s4-0)) + (format 0 "nav control has invalid mesh~%") + (break!) + 0 + ) + (let ((v1-12 (- (the-as int s5-0) (the-as uint (the-as int (-> s4-0 nav-control-array 0)))))) + (when (or (< (the-as uint v1-12) 0) + (< (the-as uint (* (the-as uint 288) (-> s4-0 nav-control-count))) (the-as uint v1-12)) + ) + (format 0 "nav control (~,,8x) is not in the mesh's nav-control-array!~%" (the-as nav-control s5-0)) + (inspect s4-0) + (break!) + 0 + ) + ) + ) + ) + (connection-list-validate (the-as (inline-array connection) arg0)) + 0 + (none) + ) + +;; definition (debug) for function debug-validate-nav-poly +;; WARN: Return type mismatch int vs none. +(defun-debug debug-validate-nav-poly ((arg0 nav-mesh-link) (arg1 nav-poly)) + (set! (-> *nav-mesh-work* poly1) (-> *nav-mesh-work* poly0)) + (set! (-> *nav-mesh-work* poly0) arg1) + (when arg1 + (let ((a2-1 arg1) + (a3-0 (+ (-> arg0 dest-mesh-id) 0)) + (t0-0 (+ (-> arg0 dest-mesh-id) (* (+ (-> arg0 src-switch-poly-id) -1) 64))) + ) + (when (or (< (the-as uint a2-1) a3-0) (< t0-0 (the-as uint a2-1))) + (format 0 "validate-nav-poly: bad poly pointer ~x range ~x ~x~%" a2-1 a3-0 t0-0) + (break!) + 0 + ) + ) + ) + 0 + (none) + ) + +;; definition for method 27 of type entity-nav-mesh +;; WARN: Return type mismatch int vs none. +(defmethod initialize-nav-mesh! ((this entity-nav-mesh)) + "Initialize the nav-mesh in this entity." + (let ((v1-0 (-> this nav-mesh))) + (if (nonzero? v1-0) + (init-from-entity v1-0 this) + ) + ) + 0 + (none) + ) + +;; definition for method 22 of type entity-nav-mesh +(defmethod birth! ((this entity-nav-mesh)) + (let ((a0-1 (-> this nav-mesh))) + (if (nonzero? a0-1) + (handle-birth a0-1) + ) + ) + this + ) + +;; definition for method 23 of type entity-nav-mesh +(defmethod kill! ((this entity-nav-mesh)) + (if (-> this nav-mesh) + (handle-kill (-> this nav-mesh)) + ) + this + ) + +;; definition for method 28 of type entity-nav-mesh +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this entity-nav-mesh)) + (add-debug-x + #t + (bucket-id debug-no-zbuf1) + (-> this nav-mesh bounds) + (new 'static 'rgba :r #x80 :g #xff :b #x80 :a #x80) + ) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this nav-mesh bounds quad)) + (let ((a0-6 (new 'stack 'random-generator))) + (set! (-> a0-6 seed) (-> this aid)) + (let* ((v1-4 (rand-uint31-gen a0-6)) + (f30-0 (* 182.04445 (the float (logand v1-4 #xffff)))) + ) + (+! (-> s5-0 x) (* 4096.0 (cos f30-0))) + (+! (-> s5-0 z) (* 4096.0 (sin f30-0))) + ) + ) + (add-debug-text-3d + #t + (bucket-id debug-no-zbuf1) + (res-lump-struct this 'name string) + s5-0 + (font-color white) + (new 'static 'vector2h :y 8) + ) + (let ((s4-1 add-debug-text-3d) + (s3-1 #t) + (s2-1 577) + ) + (format (clear *temp-string*) "aid ~D" (-> this aid)) + (s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* s5-0 (font-color white) (new 'static 'vector2h :y 16)) + ) + ) + (debug-draw (-> this nav-mesh)) + 0 + (none) + ) + +;; definition for method 31 of type entity-actor +;; INFO: Used lq/sq +(defmethod get-simple-travel-vector ((this entity-actor) (arg0 vector) (arg1 vector) (arg2 vector) (arg3 object) (arg4 float)) + (local-vars (at-0 int) (at-1 int)) + (with-pp + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (nav-mesh-from-res-tag this 'nav-mesh-actor 0))) + (cond + (gp-0 + (let ((v1-0 arg0)) + (.lvf vf1 (&-> arg2 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 (&-> v1-0 quad) vf1) + ) + (let ((s3-1 (new 'stack-no-clear 'nav-find-poly-parms))) + (vector-! (-> s3-1 point) arg1 (the-as vector (-> gp-0 bounds))) + (set! (-> s3-1 y-threshold) 40960.0) + (set! (-> s3-1 ignore) (the-as uint 3)) + (let ((a2-2 (nav-mesh-method-45 gp-0 (the-as nav-poly s3-1)))) + (cond + (a2-2 + (clamp-vector-to-mesh-cross-gaps + gp-0 + (-> s3-1 point) + a2-2 + arg0 + 2048.0 + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + (let ((v1-7 arg0)) + (.lvf vf1 (&-> arg0 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 (&-> v1-7 quad) vf1) + ) + ) + (else + (set! (-> arg0 x) (* (-> arg0 x) (- arg4))) + (set! (-> arg0 y) (* (-> arg0 y) (-> pp clock frames-per-second))) + (set! (-> arg0 z) (* (-> arg0 z) (- arg4))) + ) + ) + ) + ) + gp-0 + ) + (else + (set! (-> arg0 quad) (-> arg2 quad)) + (the-as nav-mesh #f) + ) + ) + ) + ) + ) + ) + +;; definition for method 32 of type entity-actor +;; INFO: Used lq/sq +(defmethod project-point-to-nav-mesh ((this entity-actor) (arg0 vector) (arg1 vector) (arg2 nav-poly) (arg3 float)) + (local-vars (sv-16 vector)) + (let ((gp-0 (nav-mesh-from-res-tag this 'nav-mesh-actor 0))) + (cond + (gp-0 + (set! sv-16 arg0) + (let ((s5-1 (new 'stack-no-clear 'nav-find-poly-parms))) + (set! (-> s5-1 poly) arg2) + (vector-! (-> s5-1 point) arg1 (the-as vector (-> gp-0 bounds))) + (when (or (not (-> s5-1 poly)) (not (point-in-poly? gp-0 (-> s5-1 poly) (-> s5-1 point)))) + (set! (-> s5-1 y-threshold) arg3) + (set! (-> s5-1 ignore) (the-as uint 3)) + (nav-mesh-method-46 gp-0 (the-as nav-poly s5-1)) + (when (-> s5-1 poly) + (project-point-into-poly-2d gp-0 (-> s5-1 poly) sv-16 (-> s5-1 point)) + (vector+! sv-16 sv-16 (the-as vector (-> gp-0 bounds))) + ) + ) + (-> s5-1 poly) + ) + ) + (else + (set! (-> arg0 quad) (-> arg1 quad)) + (the-as nav-poly #f) + ) + ) + ) + ) + +;; definition for method 4 of type nav-mesh +;; WARN: Return type mismatch uint vs int. +(defmethod length ((this nav-mesh)) + (the-as int (-> this poly-count)) + ) + +;; definition for method 39 of type nav-mesh +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw-poly ((this nav-mesh) (arg0 nav-poly) (arg1 rgba)) + (let ((gp-0 (new 'stack-no-clear 'inline-array 'vector 3))) + (set! (-> gp-0 0 quad) (-> this bounds quad)) + (if (logtest? (-> arg0 pat) 15) + (+! (-> gp-0 0 y) 409.6) + ) + (let ((v1-7 (the-as int (+ (-> arg0 vertex-count) -1)))) + (dotimes (s2-0 (the-as int (-> arg0 vertex-count))) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (vector+! (-> gp-0 1) (-> gp-0 0) (-> arg0 vertex s2-0)) + (vector+! (-> gp-0 2) (-> gp-0 0) (-> arg0 vertex v1-7)) + arg1 + #f + (the-as rgba -1) + ) + (set! v1-7 s2-0) + ) + ) + (when (and (logtest? (-> arg0 pat) 4) (< (-> arg0 link) (-> this link-count))) + (poly-centroid this arg0 (-> gp-0 1)) + (let ((s5-1 (-> this link-array (-> arg0 link)))) + (add-debug-x #t (bucket-id debug-no-zbuf1) (-> gp-0 1) *color-magenta*) + (let ((s4-1 add-debug-text-3d) + (s3-1 #t) + (s2-1 577) + ) + (format (clear *temp-string*) "link ~D" (-> s5-1 id)) + (s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* (-> gp-0 1) (font-color pink) (new 'static 'vector2h :y 8)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 29 of type nav-mesh +(defmethod new-nav-control ((this nav-mesh)) + (let ((gp-0 (the-as nav-control #f))) + (let ((v1-0 0)) + (b! #t cfg-4 :delay (nop!)) + (label cfg-1) + (let ((a1-1 (-> this nav-control-array v1-0))) + (b! (-> a1-1 process) cfg-3 :delay (empty-form)) + (set! gp-0 a1-1) + ) + (set! (-> gp-0 process) (the-as process 0)) + (set! (-> gp-0 state mesh) this) + (b! #t cfg-8 :delay (nop!)) + (label cfg-3) + (+! v1-0 1) + (label cfg-4) + (b! (< v1-0 (the-as int (-> this nav-control-count))) cfg-1) + ) + (let ((v1-3 (-> this nav-control-count))) + (cond + ((< v1-3 (-> this max-nav-control-count)) + (+! (-> this nav-control-count) 1) + (set! gp-0 (-> this nav-control-array v1-3)) + (set! (-> gp-0 state mesh) this) + ) + (else + (format + 0 + "nav-mesh::new-nav-control: too many users for nav-mesh ~s~%" + (res-lump-struct (-> this entity) 'name structure) + ) + ) + ) + ) + (label cfg-8) + gp-0 + ) + ) + +;; definition for method 30 of type nav-mesh +;; WARN: Return type mismatch int vs none. +(defmethod remove-nav-control ((this nav-mesh) (arg0 nav-control)) + (set! (-> arg0 process) #f) + (let ((v1-1 (+ (-> this nav-control-count) -1))) + (while (and (>= v1-1 0) (not (-> this nav-control-array v1-1 process))) + (+! v1-1 -1) + ) + (set! (-> this nav-control-count) (+ v1-1 1)) + ) + 0 + (none) + ) + +;; definition for method 31 of type nav-mesh +;; WARN: Return type mismatch int vs none. +(defmethod add-process-drawable-to-nav-mesh ((this nav-mesh) (arg0 process-drawable) (arg1 symbol)) + (if arg1 + (change-to this arg0) + (add-connection (-> this user-list) arg0 nothing arg0 #f (-> arg0 root)) + ) + 0 + (none) + ) + +;; definition for method 32 of type nav-mesh +;; WARN: Return type mismatch int vs none. +(defmethod remove-process-drawable ((this nav-mesh) (arg0 process-drawable)) + (remove-from-process (-> this user-list) arg0) + (let ((a1-2 (-> arg0 nav))) + (when (nonzero? a1-2) + (remove-nav-control this a1-2) + (set! (-> arg0 nav) #f) + ) + ) + 0 + (none) + ) + +;; definition for method 33 of type nav-mesh +;; WARN: Return type mismatch int vs none. +(defmethod change-to ((this nav-mesh) (arg0 process-drawable)) + (local-vars (s3-0 nav-control)) + (cond + ((zero? (-> this user-list)) + (go process-drawable-art-error "nav mesh not initialized") + ) + ((not arg0) + (go process-drawable-art-error "nav mesh proc pointer is #f") + ) + ((begin + (set! s3-0 (-> arg0 nav)) + (if (zero? s3-0) + (set! s3-0 (the-as nav-control #f)) + ) + (or (not s3-0) (!= this (-> s3-0 state mesh))) + ) + (let ((s4-0 (new-nav-control this))) + (b! s4-0 cfg-14 :delay (empty-form)) + (b! (not *debug-segment*) cfg-13 :delay (empty-form)) + (format 0 "ERROR: nav-mesh::change-to: unable to allocate nav-mesh for ~s~%" arg0) + (label cfg-13) + (b! #t cfg-20 :delay (nop!)) + (label cfg-14) + (cond + (s3-0 + (quad-copy! (the-as pointer s4-0) (the-as pointer s3-0) 18) + (set! (-> s4-0 state mesh) this) + (set! (-> s4-0 state nav) s4-0) + (set! (-> s4-0 state current-poly) #f) + (set! (-> s4-0 state virtual-current-poly) #f) + (set! (-> s4-0 state next-poly) #f) + (set! (-> s4-0 state user-poly) #f) + (set! (-> s4-0 state target-poly) #f) + (let ((s2-0 (-> s3-0 state mesh))) + (remove-nav-control s2-0 s3-0) + (remove-from-process (-> s2-0 user-list) arg0) + ) + ) + (else + (init! s4-0 (the-as collide-shape (-> arg0 root))) + ) + ) + (set-nearest-y-thres! s4-0 (-> this nearest-y-threshold)) + (set! (-> arg0 nav) s4-0) + ) + (add-connection (-> this user-list) arg0 nothing arg0 #t (-> arg0 root)) + (send-event arg0 'nav-mesh-new :from arg0) + ) + ) + (label cfg-20) + 0 + (none) + ) + +;; definition for method 48 of type nav-mesh +(defmethod link-to-other-mesh ((this nav-mesh) (arg0 nav-mesh-link)) + (when (not (-> arg0 dest-mesh)) + (let* ((s4-0 (entity-nav-mesh-by-aid (the-as actor-id (-> arg0 dest-mesh-id)))) + (v1-1 (if (type? s4-0 entity-nav-mesh) + s4-0 + ) + ) + ) + (when v1-1 + (let ((a0-3 (-> v1-1 nav-mesh)) + (v1-2 (the-as nav-mesh-link #f)) + ) + (let ((a1-2 0)) + (b! #t cfg-8 :delay (nop!)) + (label cfg-5) + (let ((a2-1 (-> a0-3 link-array a1-2))) + (let ((a3-1 (-> arg0 id))) + (b! (!= (-> a2-1 id) a3-1) cfg-7 :delay (empty-form)) + ) + (set! v1-2 a2-1) + ) + (b! #t cfg-10 :delay (nop!)) + (label cfg-7) + (+! a1-2 1) + (label cfg-8) + (b! (< a1-2 (the-as int (-> a0-3 link-count))) cfg-5) + ) + (label cfg-10) + (when v1-2 + (set! (-> arg0 dest-mesh) a0-3) + (set! (-> v1-2 dest-mesh) this) + (set! (-> arg0 dest-link-poly-id) (-> v1-2 src-switch-poly-id)) + (set! (-> arg0 dest-switch-poly-id) (-> v1-2 src-link-poly-id)) + (set! (-> v1-2 dest-link-poly-id) (-> arg0 src-switch-poly-id)) + (set! (-> v1-2 dest-switch-poly-id) (-> arg0 src-link-poly-id)) + #t + ) + ) + ) + ) + ) + ) + +;; definition for method 49 of type nav-mesh +;; WARN: Return type mismatch int vs none. +(defmethod unlink-mesh ((this nav-mesh) (arg0 nav-mesh-link)) + (let ((a0-1 (-> arg0 dest-mesh))) + (b! (not a0-1) cfg-9 :delay (empty-form)) + (let ((v1-0 (the-as nav-mesh-link #f))) + (let ((a2-1 0)) + (b! #t cfg-5 :delay (nop!)) + (label cfg-2) + (let ((a3-1 (-> a0-1 link-array a2-1))) + (let ((t0-1 (-> arg0 id))) + (b! (!= (-> a3-1 id) t0-1) cfg-4 :delay (empty-form)) + ) + (set! v1-0 a3-1) + ) + (b! #t cfg-7 :delay (nop!)) + (label cfg-4) + (+! a2-1 1) + (label cfg-5) + (b! (< a2-1 (the-as int (-> a0-1 link-count))) cfg-2) + ) + (label cfg-7) + (when v1-0 + (set! (-> arg0 dest-mesh) #f) + (set! (-> v1-0 dest-mesh) #f) + ) + ) + ) + (label cfg-9) + 0 + (none) + ) + +;; definition for method 34 of type nav-mesh +(defmethod link-by-id ((this nav-mesh) (arg0 uint)) + (let ((v1-0 (the-as nav-mesh-link #f))) + (let ((a2-0 0)) + (b! #t cfg-4 :delay (nop!)) + (label cfg-1) + (let ((a3-1 (-> this link-array a2-0))) + (b! (!= (-> a3-1 id) arg0) cfg-3 :delay (empty-form)) + (set! v1-0 a3-1) + ) + (b! #t cfg-6 :delay (nop!)) + (label cfg-3) + (+! a2-0 1) + (label cfg-4) + (b! (< a2-0 (the-as int (-> this link-count))) cfg-1) + ) + (label cfg-6) + (if v1-0 + (link-to-other-mesh this v1-0) + ) + ) + ) + +;; definition for method 35 of type nav-mesh +(defmethod unlink-by-id ((this nav-mesh) (arg0 uint)) + (let ((v1-0 (the-as nav-mesh-link #f))) + (let ((a2-0 0)) + (b! #t cfg-4 :delay (nop!)) + (label cfg-1) + (let ((a3-1 (-> this link-array a2-0))) + (b! (!= (-> a3-1 id) arg0) cfg-3 :delay (empty-form)) + (set! v1-0 a3-1) + ) + (b! #t cfg-6 :delay (nop!)) + (label cfg-3) + (+! a2-0 1) + (label cfg-4) + (b! (< a2-0 (the-as int (-> this link-count))) cfg-1) + ) + (label cfg-6) + (when v1-0 + (unlink-mesh this v1-0) + #t + ) + ) + ) + +;; definition for method 25 of type nav-mesh +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-from-entity ((this nav-mesh) (arg0 entity-nav-mesh)) + (local-vars (sv-16 res-tag)) + (set! (-> this entity) arg0) + (set! (-> this work) *nav-mesh-work*) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-2 (res-lump-data arg0 'nav-mesh-sphere (inline-array sphere) :tag-ptr (& sv-16)))) + (when v1-2 + (set! (-> this static-sphere-count) (-> sv-16 elt-count)) + (set! (-> this static-sphere) v1-2) + ) + ) + (set! (-> this nearest-y-threshold) (res-lump-float arg0 'nearest-y-threshold :default 40960.0)) + (set! (-> this flags) (res-lump-value arg0 'nav-mesh-flags nav-mesh-flag :time -1000000000.0)) + (set! (-> this water-max-height) (res-lump-float arg0 'water-max-height :default 8192.0)) + (if (nonzero? (-> this poly-hash)) + (set! (-> this poly-hash work) *grid-hash-work*) + ) + (let ((s5-0 (new 'stack-no-clear 'nav-stack-type2))) + (set! (-> s5-0 word00) + (res-lump-value arg0 'nav-max-users int :default (the-as uint128 64) :time -1000000000.0) + ) + (set! (-> this user-list) (new 'loading-level 'engine 'nav-engine (-> s5-0 word00) connection)) + (set! (-> this nav-control-array) + (the-as (inline-array nav-control) (malloc 'loading-level (* 288 (-> s5-0 word00)))) + ) + (set! (-> this nav-control-count) (the-as uint 0)) + (set! (-> this max-nav-control-count) (the-as uint (-> s5-0 word00))) + (set! (-> s5-0 word01) (/ (+ (-> s5-0 word00) 7) 8)) + (dotimes (v1-16 3) + (set! (-> (the-as (pointer float) (+ (* v1-16 4) (the-as int s5-0)))) + (- (-> this poly-hash box-max v1-16) (-> this poly-hash box-min v1-16)) + ) + ) + (set! (-> s5-0 word02) + (the int + (+ 1.0 (* (fmax 1.0 (* 0.000015258789 (-> s5-0 float00))) (fmax 1.0 (* 0.000015258789 (-> s5-0 float01))))) + ) + ) + (set! (-> s5-0 word03) (min 4096 (* (-> s5-0 word01) (-> s5-0 word02)))) + (set! (-> this sphere-hash) + (new 'loading-level 'sphere-hash (-> s5-0 word03) (+ (-> s5-0 word00) (-> this static-sphere-count))) + ) + ) + (initialize-mesh! this) + 0 + (none) + ) + +;; definition for method 26 of type nav-mesh +;; WARN: Return type mismatch int vs none. +(defmethod handle-birth ((this nav-mesh)) + (dotimes (s5-0 (the-as int (-> this link-count))) + (let ((a1-0 (-> this link-array s5-0))) + (if (not (-> a1-0 dest-mesh)) + (link-to-other-mesh this a1-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 27 of type nav-mesh +;; WARN: Return type mismatch int vs none. +(defmethod handle-kill ((this nav-mesh)) + (when (nonzero? (-> this user-list)) + (countdown (s5-0 (-> this nav-control-count)) + (let* ((v1-3 (-> this nav-control-array s5-0)) + (s4-0 (-> v1-3 process)) + ) + (when s4-0 + (when (not (send-event (-> v1-3 process) 'nav-mesh-kill)) + (format 0 "ERROR: object ~A did not accept nav-mesh kill~%" s4-0) + (deactivate s4-0) + ) + ) + ) + ) + (remove-all (-> this user-list)) + (dotimes (s5-1 (the-as int (-> this link-count))) + (let ((a1-2 (-> this link-array s5-1))) + (if (-> a1-2 dest-mesh) + (unlink-mesh this a1-2) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 9 of type nav-mesh +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this nav-mesh)) + (local-vars (sv-32 vector) (sv-36 int)) + (set! sv-32 (new 'stack-no-clear 'vector)) + (set! sv-36 16) + (add-debug-sphere + (logtest? sv-36 4) + (bucket-id debug) + (-> this bounds) + (-> this bounds r) + (new 'static 'rgba :r #xff :g #xff :a #x20) + ) + (add-debug-vector #t (bucket-id debug-no-zbuf1) (-> this bounds) *x-vector* (meters 1) *color-red*) + (add-debug-vector #t (bucket-id debug-no-zbuf1) (-> this bounds) *z-vector* (meters 1) *color-blue*) + (when (logtest? sv-36 16) + (dotimes (s5-0 (the-as int (-> this static-sphere-count))) + (add-debug-sphere + #t + (bucket-id debug) + (-> this static-sphere s5-0) + (-> this static-sphere s5-0 r) + *color-light-blue* + ) + (let ((s4-0 add-debug-text-3d) + (s3-0 #t) + (s2-0 577) + ) + (format (clear *temp-string*) "~D" s5-0) + (s4-0 + s3-0 + (the-as bucket-id s2-0) + *temp-string* + (-> this static-sphere s5-0) + (font-color cyan) + (the-as vector2h #f) + ) + ) + ) + (dotimes (s5-1 (the-as int (-> this poly-count))) + (let ((s4-1 (-> this poly-array s5-1))) + (debug-draw-poly this s4-1 (cond + ((logtest? (-> s4-1 pat) 1) + *color-black* + ) + ((logtest? (-> s4-1 pat) 2) + *color-gray* + ) + ((logtest? (-> s4-1 pat) 4) + (if (-> this link-array (-> s4-1 link) dest-mesh) + *color-green* + *color-light-red* + ) + ) + ((logtest? (-> s4-1 pat) 8) + *color-magenta* + ) + (else + *color-cyan* + ) + ) + ) + (when (logtest? sv-36 32) + (let ((s3-1 add-debug-text-3d) + (s2-1 #t) + (s1-1 577) + ) + (format (clear *temp-string*) "~D" (-> s4-1 id)) + (s3-1 + s2-1 + (the-as bucket-id s1-1) + *temp-string* + (poly-centroid this s4-1 sv-32) + (font-color cyan) + (the-as vector2h #f) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 14 of type nav-mesh +(defmethod poly-centroid-local ((this nav-mesh) (arg0 nav-poly) (arg1 vector)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (vector-reset! v1-0) + (dotimes (a0-2 (the-as int (-> arg0 vertex-count))) + (vector+! v1-0 v1-0 (-> arg0 vertex a0-2)) + ) + (vector-float*! arg1 v1-0 (/ 1.0 (the float (-> arg0 vertex-count)))) + ) + ) + +;; definition for method 13 of type nav-mesh +(defmethod poly-centroid ((this nav-mesh) (arg0 nav-poly) (arg1 vector)) + (poly-centroid-local this arg0 arg1) + (vector+! arg1 arg1 (the-as vector (-> this bounds))) + ) + +;; definition for function vu-point-triangle-intersection? +(defun vu-point-triangle-intersection? ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector)) + (local-vars (v1-0 float) (v1-1 int) (v1-3 int) (a0-1 float) (a0-2 int) (a0-4 int) (a1-1 float) (a1-2 int)) + (rlet ((acc :class vf) + (vf1 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf12 :class vf) + (vf13 :class vf) + (vf14 :class vf) + (vf15 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf9 :class vf) + ) + (.lvf vf1 (&-> arg1 quad)) + (.lvf vf2 (&-> arg2 quad)) + (.sub.vf vf1 vf1 vf1 :mask #b1010) + (.lvf vf3 (&-> arg3 quad)) + (.sub.vf vf2 vf2 vf2 :mask #b1010) + (.lvf vf12 (&-> arg0 quad)) + (.sub.vf vf3 vf3 vf3 :mask #b1010) + (.sub.vf vf4 vf2 vf1) + (.sub.vf vf9 vf1 vf12) + (.sub.vf vf5 vf3 vf2) + (.sub.vf vf10 vf2 vf12) + (.sub.vf vf6 vf1 vf3) + (.sub.vf vf11 vf3 vf12) + (.outer.product.a.vf acc vf9 vf4) + (.outer.product.b.vf vf13 vf4 vf9 acc) + (.outer.product.a.vf acc vf10 vf5) + (.outer.product.b.vf vf14 vf5 vf10 acc) + (.outer.product.a.vf acc vf11 vf6) + (.outer.product.b.vf vf15 vf6 vf11 acc) + (.mov v1-0 vf13) + (.mov a1-1 vf14) + (.mov a0-1 vf15) + (set-on-less-than v1-1 v1-0 0) + (set-on-less-than a1-2 a1-1 0) + (set-on-less-than a0-2 a0-1 0) + (let ((a0-3 (logxor a1-2 a0-2)) + (v1-2 (logxor v1-1 a1-2)) + ) + (set-on-less-than a0-4 a0-3 1) + (set-on-less-than v1-3 v1-2 1) + ) + (logtest? v1-3 a0-4) + ) + ) + +;; definition for function poly-in-height-range? +(defun poly-in-height-range? ((arg0 nav-poly) (arg1 float) (arg2 float)) + (and (>= (+ (-> arg0 vertex3 w) arg2) arg1) (>= arg1 (- (-> arg0 vertex2 w) arg2))) + ) + +;; definition for method 45 of type nav-mesh +(defmethod nav-mesh-method-45 ((this nav-mesh) (arg0 nav-poly)) + (local-vars (v1-15 int) (sv-16 nav-poly)) + (let ((s4-0 (search-for-point (-> this poly-hash) (the-as vector (-> arg0 vertex)))) + (s3-0 (-> this poly-hash bucket-size)) + (s2-0 0) + ) + (until (zero? v1-15) + (let ((s1-0 (* s2-0 8)) + (s0-0 (-> s4-0 0)) + ) + (b! (zero? s0-0) cfg-17 :delay (nop!)) + (let ((v1-2 (logand s0-0 1))) + (nop!) + (b! (zero? v1-2) cfg-16 :delay (nop!)) + ) + (set! sv-16 (-> this poly-array s1-0)) + (let ((v1-5 sv-16) + (f0-0 (-> arg0 vertex0 y)) + (f1-0 (-> arg0 vertex1 x)) + ) + (when (and (and (>= (+ (-> v1-5 vertex3 w) f1-0) f0-0) (>= f0-0 (- (-> v1-5 vertex2 w) f1-0))) + (not (logtest? (-> sv-16 pat) (-> arg0 data 20))) + ) + (if (point-in-poly? this sv-16 (the-as vector (-> arg0 vertex))) + (return sv-16) + ) + ) + ) + (label cfg-16) + (set! s0-0 (/ (the-as int s0-0) 2)) + (nop!) + (b! (nonzero? s0-0) cfg-2 :delay (set! s1-0 (+ s1-0 1))) + ) + (label cfg-17) + (+! s2-0 1) + (set! s4-0 (&-> s4-0 1)) + (set-on-less-than v1-15 s2-0 s3-0) + (nop!) + ) + ) + 0 + (the-as nav-poly #f) + ) + +;; definition for method 47 of type nav-mesh +;; INFO: Used lq/sq +(defmethod is-in-mesh-local? ((this nav-mesh) (arg0 vector) (arg1 float) (arg2 float)) + (local-vars (sv-16 float) (sv-20 vector) (sv-24 float)) + (set! sv-16 arg2) + (set! sv-20 arg0) + (set! sv-24 arg1) + (let* ((f0-3 (+ sv-24 (-> this bounds r))) + (f0-5 (* f0-3 f0-3)) + (v1-1 sv-20) + ) + (when (>= f0-5 (+ (* (-> v1-1 x) (-> v1-1 x)) (* (-> v1-1 z) (-> v1-1 z)))) + (let ((s5-0 (new 'stack-no-clear 'nav-poly))) + (set! (-> s5-0 vertex 0 quad) (-> sv-20 quad)) + (set! (-> s5-0 vertex1 x) sv-16) + (set! (-> s5-0 data 20) (the-as uint 2)) + (nav-mesh-method-46 this s5-0) + (cond + ((-> s5-0 vertex2 x) + #t + ) + (else + (let ((s4-0 (new 'stack-no-clear 'vector))) + (project-point-into-poly-2d this (the-as nav-poly (-> s5-0 vertex1 z)) s4-0 sv-20) + (let ((f0-7 (vector-vector-xz-distance-squared s4-0 sv-20)) + (f1-5 sv-24) + ) + (< f0-7 (* f1-5 f1-5)) + ) + ) + ) + ) + ) + ) + ) + ) + +;; definition for function init-ray-local +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun init-ray-local ((arg0 nav-ray) (arg1 nav-poly) (arg2 vector) (arg3 vector)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (set! (-> arg0 current-pos quad) (-> arg2 quad)) + (set! (-> arg0 dest-pos quad) (-> arg3 quad)) + (set! (-> arg0 current-poly) arg1) + (let ((v1-2 arg0)) + (vector-! (-> v1-2 dir) (-> v1-2 dest-pos) (-> v1-2 current-pos)) + (set! (-> v1-2 dir y) 0.0) + (let ((a0-2 (-> v1-2 dir))) + (let ((f0-1 1.0)) + (.lvf vf1 (&-> a0-2 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a1-3 f0-1)) + (.mov vf3 a1-3) + ) + ) + (.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 (&-> a0-2 quad) vf1) + ) + (set! (-> v1-2 next-poly) #f) + (set! (-> v1-2 len) 0.0) + (set! (-> v1-2 last-edge) -1) + (set! (-> v1-2 terminated) #f) + (set! (-> v1-2 reached-dest) #f) + (set! (-> v1-2 hit-boundary) #f) + (set! (-> v1-2 hit-gap) #f) + (set! (-> v1-2 ignore) (the-as uint 3)) + ) + 0 + (none) + ) + ) + +;; definition for function init-ray-dir-local +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun init-ray-dir-local ((arg0 nav-ray) (arg1 nav-poly) (arg2 vector) (arg3 vector) (arg4 float)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (set! (-> arg0 current-poly) arg1) + (set! (-> arg0 current-pos quad) (-> arg2 quad)) + (let ((a1-3 (-> arg0 dest-pos))) + (let ((v1-1 (-> arg0 current-pos))) + (let ((a2-1 arg3)) + (let ((a3-1 arg4)) + (.mov vf7 a3-1) + ) + (.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-3 quad) vf6) + ) + (let ((v1-2 arg0)) + (vector-! (-> v1-2 dir) (-> v1-2 dest-pos) (-> v1-2 current-pos)) + (set! (-> v1-2 dir y) 0.0) + (let ((a0-2 (-> v1-2 dir))) + (let ((f0-2 1.0)) + (.lvf vf1 (&-> a0-2 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a1-6 f0-2)) + (.mov vf3 a1-6) + ) + ) + (.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 (&-> a0-2 quad) vf1) + ) + (set! (-> v1-2 next-poly) #f) + (set! (-> v1-2 len) 0.0) + (set! (-> v1-2 last-edge) -1) + (set! (-> v1-2 terminated) #f) + (set! (-> v1-2 reached-dest) #f) + (set! (-> v1-2 hit-boundary) #f) + (set! (-> v1-2 hit-gap) #f) + (set! (-> v1-2 ignore) (the-as uint 3)) + ) + 0 + (none) + ) + ) + +;; definition for method 19 of type nav-mesh +(defmethod try-move-along-ray ((this nav-mesh) (arg0 nav-poly) (arg1 vector) (arg2 vector) (arg3 float)) + (local-vars (v1-2 symbol)) + (let ((gp-0 (new 'stack-no-clear 'nav-ray))) + (let ((s4-0 0)) + (init-ray-dir-local gp-0 arg0 arg1 arg2 arg3) + (until v1-2 + (+! s4-0 1) + (advance-ray-to-nearest-poly-edge-or-dest! this gp-0) + (set! v1-2 (or (>= s4-0 15) (-> gp-0 terminated))) + ) + ) + (-> gp-0 len) + ) + ) + +;; definition for function nav-ray-test +(defun nav-ray-test ((arg0 nav-mesh) (arg1 nav-poly) (arg2 vector) (arg3 vector)) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) arg2 (the-as vector (-> arg0 bounds)))) + (s3-1 (vector-! (new 'stack-no-clear 'vector) arg3 arg2)) + ) + 0.0 + (set! (-> s3-1 y) 0.0) + (let ((f30-0 (vector-vector-xz-distance arg2 arg3))) + (vector-xz-normalize! s3-1 1.0) + (try-move-along-ray arg0 arg1 s4-1 s3-1 f30-0) + ) + ) + ) + +;; definition for function point-poly-distance-min +(defun point-poly-distance-min ((arg0 nav-mesh-work) (arg1 nav-poly) (arg2 float) (arg3 nav-poly)) + (let ((t0-0 (-> arg3 vertex-count)) + (a3-1 (-> arg3 vertex)) + (f0-0 arg2) + ) + (let ((v1-0 0)) + (let ((f1-0 (-> arg1 vertex0 x)) + (f2-0 (-> arg1 vertex0 z)) + (a1-1 0) + ) + (b! #t cfg-10 :delay (nop!)) + (label cfg-1) + (let* ((t2-0 (-> a3-1 (-> arg0 vert0-table a1-1))) + (t1-6 (-> a3-1 (-> arg0 vert1-table a1-1))) + (f5-0 (- (-> t1-6 x) (-> t2-0 x))) + (f6-0 (- (-> t1-6 z) (-> t2-0 z))) + (f4-2 (- f1-0 (-> t2-0 x))) + (f3-4 (- f2-0 (-> t2-0 z))) + (f7-1 (- (* f5-0 f3-4) (* f6-0 f4-2))) + ) + (b! (>= 0.0 f7-1) cfg-9 :delay #f) + (+! v1-0 1) + (let* ((f8-2 f5-0) + (f8-4 (* f8-2 f8-2)) + (f9-0 f6-0) + (f8-5 (+ f8-4 (* f9-0 f9-0))) + ) + (let* ((f9-3 arg2) + (f9-6 (* f8-5 (* f9-3 f9-3))) + (f10-0 f7-1) + ) + (b! (< f9-6 (* f10-0 f10-0)) cfg-13) + ) + (let ((f5-2 (+ (* f5-0 f4-2) (* f6-0 f3-4)))) + arg2 + (b! (>= f5-2 0.0) cfg-5) + (let ((f3-8 (sqrtf (+ (* f4-2 f4-2) (* f3-4 f3-4))))) + (b! #t cfg-8 :delay (nop!)) + (label cfg-5) + (b! (>= f8-5 f5-2) cfg-7) + (let* ((f3-10 (- f1-0 (-> t1-6 x))) + (f3-12 (* f3-10 f3-10)) + (f4-6 (- f2-0 (-> t1-6 z))) + ) + (set! f3-8 (sqrtf (+ f3-12 (* f4-6 f4-6)))) + ) + (b! #t cfg-8 :delay (nop!)) + (label cfg-7) + (set! f0-0 (/ f7-1 (sqrtf f8-5))) + (b! #t cfg-13 :delay (nop!)) + (label cfg-8) + (set! f0-0 (fmin f0-0 f3-8)) + ) + ) + ) + ) + (label cfg-9) + (+! a1-1 1) + (label cfg-10) + (b! (< a1-1 (the-as int t0-0)) cfg-1) + ) + (if (zero? v1-0) + (set! f0-0 0.0) + ) + ) + (label cfg-13) + f0-0 + ) + ) + +;; definition for method 46 of type nav-mesh +(defmethod nav-mesh-method-46 ((this nav-mesh) (arg0 nav-poly)) + (local-vars + (v1-16 int) + (v1-31 int) + (sv-16 nav-poly) + (sv-20 (pointer uint8)) + (sv-24 nav-poly) + (sv-28 float) + (sv-32 int) + (sv-40 int) + (sv-48 nav-poly) + (sv-52 float) + ) + (set! sv-16 (the-as nav-poly #f)) + (set! sv-20 (search-for-sphere (-> this poly-hash) (the-as vector (-> arg0 vertex)) 12288.0)) + (set! (-> arg0 vertex2 x) (the-as float #f)) + (let ((s4-0 (-> this poly-hash bucket-size)) + (s3-0 sv-20) + (s2-0 0) + ) + (nop!) + (until (zero? v1-16) + (let ((s1-0 (* s2-0 8)) + (s0-0 (-> s3-0 0)) + ) + (b! (zero? s0-0) cfg-17 :delay (nop!)) + (let ((v1-3 (logand s0-0 1))) + (nop!) + (b! (zero? v1-3) cfg-16 :delay (nop!)) + ) + (set! sv-24 (-> this poly-array s1-0)) + (let ((v1-6 sv-24) + (f0-0 (-> arg0 vertex0 y)) + (f1-0 (-> arg0 vertex1 x)) + ) + (when (and (and (>= (+ (-> v1-6 vertex3 w) f1-0) f0-0) (>= f0-0 (- (-> v1-6 vertex2 w) f1-0))) + (not (logtest? (-> sv-24 pat) (-> arg0 data 20))) + ) + (when (point-in-poly? this sv-24 (the-as vector (-> arg0 vertex))) + (set! (-> arg0 vertex2 x) (the-as float #t)) + (set! (-> arg0 vertex1 w) 0.0) + (set! sv-16 sv-24) + (goto cfg-38) + ) + ) + ) + (label cfg-16) + (set! s0-0 (/ (the-as int s0-0) 2)) + (nop!) + (b! (nonzero? s0-0) cfg-2 :delay (set! s1-0 (+ s1-0 1))) + ) + (label cfg-17) + (+! s2-0 1) + (set! s3-0 (&-> s3-0 1)) + (set-on-less-than v1-16 s2-0 s4-0) + (nop!) + ) + ) + (set! sv-28 (the-as float 10000000000000000000000000000000000000.0)) + (set! sv-32 0) + (set! sv-40 0) + (let ((s4-1 (-> this poly-hash bucket-size)) + (s3-1 sv-20) + (s2-1 0) + ) + (until (zero? v1-31) + (let ((s1-1 (* s2-1 8)) + (s0-1 (-> s3-1 0)) + ) + (b! (zero? s0-1) cfg-34 :delay (nop!)) + (let ((v1-19 (logand s0-1 1))) + (nop!) + (b! (zero? v1-19) cfg-33 :delay (nop!)) + ) + (set! sv-48 (-> this poly-array s1-1)) + (let ((v1-22 sv-48) + (f0-3 (-> arg0 vertex0 y)) + (f1-2 (-> arg0 vertex1 x)) + ) + (when (and (and (>= (+ (-> v1-22 vertex3 w) f1-2) f0-3) (>= f0-3 (- (-> v1-22 vertex2 w) f1-2))) + (not (logtest? (-> sv-48 pat) (-> arg0 data 20))) + ) + (set! sv-40 (+ sv-40 1)) + (set! sv-52 (point-poly-distance-min (-> this work) (the-as nav-poly (-> arg0 vertex)) sv-28 sv-48)) + (when (< sv-52 sv-28) + (set! sv-28 sv-52) + (set! sv-16 sv-48) + (nop!) + ) + ) + ) + (label cfg-33) + (set! s0-1 (/ (the-as int s0-1) 2)) + (nop!) + (b! (nonzero? s0-1) cfg-20 :delay (set! s1-1 (+ s1-1 1))) + ) + (label cfg-34) + (+! s2-1 1) + (set! s3-1 (&-> s3-1 1)) + (set-on-less-than v1-31 s2-1 s4-1) + (nop!) + ) + ) + (if (not sv-16) + (set! sv-16 (-> this poly-array 0)) + ) + (set! (-> arg0 vertex1 w) sv-28) + (label cfg-38) + (set! (-> arg0 vertex1 z) (the-as float sv-16)) + arg0 + ) + +;; definition for function nav-mesh-route-table-bit-index +(defun nav-mesh-route-table-bit-index ((arg0 nav-mesh) (arg1 uint) (arg2 int)) + (* (+ arg2 (* arg1 (-> arg0 poly-count))) 2) + ) + +;; definition for method 16 of type nav-mesh +;; INFO: Used lq/sq +(defmethod get-route-portal ((this nav-mesh) (arg0 nav-poly) (arg1 nav-poly) (arg2 nav-route-portal)) + (set! (-> arg2 next-poly) #f) + (cond + ((and arg0 arg1 (!= arg0 arg1)) + (let* ((a1-1 this) + (v1-1 (-> arg0 id)) + (v1-4 (* (+ (-> arg1 id) (* v1-1 (-> a1-1 poly-count))) 2)) + (s3-0 + (logand (the-as int (ash (the-as int (-> this route (shr v1-4 3))) (- (the-as int (logand v1-4 7))))) 3) + ) + ) + (set! (-> arg2 edge-index) -1) + (let ((s2-0 (-> arg0 adj-poly s3-0))) + (when (= s2-0 255) + (format 0 "nav-mesh::get-route-portal: data error in nav mesh~%") + (break!) + 0 + ) + (set! (-> arg2 edge-index) s3-0) + (set! (-> arg2 next-poly) (-> this poly-array s2-0)) + ) + (let ((a0-7 s3-0) + (v1-16 (+ s3-0 1)) + ) + (if (>= (the-as uint v1-16) (-> arg0 vertex-count)) + (set! v1-16 0) + ) + (set! (-> arg2 vertex 1 quad) (-> arg0 vertex a0-7 quad)) + (let ((v0-1 (-> arg2 vertex))) + (set! (-> v0-1 0 quad) (-> arg0 vertex v1-16 quad)) + v0-1 + ) + ) + ) + ) + (else + (the-as (inline-array nav-vertex) #f) + ) + ) + ) + +;; definition for method 15 of type nav-mesh +(defmethod lookup-poly-on-route-to-target ((this nav-mesh) (arg0 nav-poly) (arg1 nav-poly)) + (cond + ((and arg0 arg1 (!= arg0 arg1)) + (let* ((a3-0 this) + (v1-1 (-> arg0 id)) + (v1-4 (* (+ (-> arg1 id) (* v1-1 (-> a3-0 poly-count))) 2)) + (v1-9 (logand (ash (the-as int (-> this route (shr v1-4 3))) (- (the-as int (logand v1-4 7)))) 3)) + (a2-5 (new 'stack-no-clear 'array 'int8 4)) + ) + (set! (-> a2-5 0) (the-as int (-> arg0 adj-poly0))) + (set! (-> a2-5 1) (the-as int (-> arg0 adj-poly1))) + (set! (-> a2-5 2) (the-as int (-> arg0 adj-poly2))) + (set! (-> a2-5 3) (the-as int (-> arg0 adj-poly3))) + (let ((v1-11 (-> (the-as (pointer uint8) (&+ a2-5 v1-9))))) + (if (= v1-11 255) + (the-as nav-poly #f) + (-> this poly-array v1-11) + ) + ) + ) + ) + (else + (the-as nav-poly #f) + ) + ) + ) + +;; definition for method 24 of type nav-mesh +;; WARN: Return type mismatch int vs none. +(defmethod compute-bounding-box-from-vertices ((this nav-mesh) (arg0 vector) (arg1 vector)) + (let ((f0-0 10000000000000000000000000000000000000.0) + (f1-0 -10000000000000000000000000000000000000.0) + ) + (set! (-> arg0 x) f0-0) + (set! (-> arg0 y) f0-0) + (set! (-> arg0 z) f0-0) + (set! (-> arg1 x) f1-0) + (set! (-> arg1 y) f1-0) + (set! (-> arg1 z) f1-0) + ) + (dotimes (v1-3 (the-as int (-> this poly-count))) + (let ((a3-1 (-> this poly-array v1-3))) + (dotimes (t0-1 (the-as int (-> a3-1 vertex-count))) + (let ((t1-2 (-> a3-1 vertex t0-1))) + (set! (-> arg0 x) (fmin (-> arg0 x) (-> t1-2 x))) + (set! (-> arg0 y) (fmin (-> arg0 y) (-> t1-2 y))) + (set! (-> arg0 z) (fmin (-> arg0 z) (-> t1-2 z))) + (set! (-> arg1 x) (fmax (-> arg1 x) (-> t1-2 x))) + (set! (-> arg1 y) (fmax (-> arg1 y) (-> t1-2 y))) + (set! (-> arg1 z) (fmax (-> arg1 z) (-> t1-2 z))) + ) + ) + ) + ) + (vector+! arg0 arg0 (the-as vector (-> this bounds))) + (vector+! arg1 arg1 (the-as vector (-> this bounds))) + 0 + (none) + ) + +;; definition for method 17 of type nav-mesh +;; WARN: Return type mismatch int vs none. +(defmethod initialize-mesh! ((this nav-mesh)) + (local-vars + (sv-32 vector) + (sv-36 uint) + (sv-40 int) + (sv-48 int) + (sv-56 int) + (sv-64 symbol) + (sv-68 (inline-array vector)) + (sv-72 vector) + (sv-76 vector) + ) + (with-pp + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (set! sv-32 (new 'stack-no-clear 'vector)) + (set! sv-36 (-> this poly-count)) + (set! sv-40 0) + (set! sv-48 0) + (set! sv-56 0) + (set! sv-64 (the-as symbol #f)) + (countdown (s5-0 sv-36) + (let ((v1-3 (-> this poly-array s5-0))) + (if (logtest? (-> v1-3 pat) 1) + (set! sv-56 (+ sv-56 1)) + ) + (set! sv-68 (-> v1-3 vertex)) + (set! sv-72 (-> v1-3 vertex1)) + (set! sv-76 (-> v1-3 vertex2)) + ) + (vector-3pt-cross! sv-32 (the-as vector sv-68) sv-72 sv-76) + (cond + ((= (vector-length sv-32) 0.0) + (set! sv-40 (+ sv-40 1)) + ) + (else + (let ((v1-9 sv-32)) + (let ((f0-1 1.0)) + (.lvf vf1 (&-> v1-9 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a0-11 f0-1)) + (.mov vf3 a0-11) + ) + ) + (.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-9 quad) vf1) + ) + (if (>= 0.0 (-> sv-32 y)) + (set! sv-48 (+ sv-48 1)) + ) + ) + ) + ) + (when (zero? sv-36) + (format #t "WARNING: nav-mesh has no triangles. ") + (set! sv-64 #t) + ) + (when (> sv-40 0) + (format #t "WARNING: nav-mesh has ~D triangles with zero area (out of ~D triangles). " sv-40 sv-36) + (set! sv-64 #t) + ) + (when (> sv-48 0) + (format #t "WARNING: nav-mesh has ~D triangles with inverted normals (out of ~D triangles). " sv-48 sv-36) + (set! sv-64 #t) + ) + (when (< (the-as uint 255) sv-36) + (format #t "WARNING: nav-mesh has ~D triangles (only up to ~D are allowed). " sv-36 255) + (set! sv-64 #t) + ) + (when (= sv-56 sv-36) + (format #t "WARNING: nav-mesh only contains gap triangles (~D triangles total). " sv-36) + (set! sv-64 #t) + ) + (when sv-64 + (if pp + (format #t "current process is ~A~%" (-> pp name)) + (format #t "(no current process).~%") + ) + ) + 0 + (none) + ) + ) + ) + +;; definition for function ray-ccw-line-segment-intersection? +(defun ray-ccw-line-segment-intersection? ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector)) + (let ((f0-2 (- (* (-> arg2 x) (-> arg1 z)) (* (-> arg2 z) (-> arg1 x)))) + (f2-4 (- (* (-> arg3 x) (-> arg1 z)) (* (-> arg3 z) (-> arg1 x)))) + (f3-4 (- (* (-> arg0 x) (-> arg1 z)) (* (-> arg0 z) (-> arg1 x)))) + (v0-0 #f) + ) + (let ((f1-7 (- f2-4 f0-2)) + (f2-5 (- f2-4 f3-4)) + (f3-5 (- f3-4 f0-2)) + ) + (when (and (>= (fabs f1-7) (fmax (fabs f3-5) (fabs f2-5))) (!= f1-7 0.0)) + (let ((f0-7 (+ (* (-> arg1 x) (- (-> arg3 z) (-> arg2 z))) (* (-> arg1 z) (- (-> arg2 x) (-> arg3 x)))))) + (set! v0-0 (< 0.0 f0-7)) + ) + ) + ) + v0-0 + ) + ) + +;; definition for function ray-line-segment-intersection? +(defun ray-line-segment-intersection? ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector)) + (let ((f1-3 (- (* (-> arg2 x) (-> arg1 z)) (* (-> arg2 z) (-> arg1 x)))) + (f0-4 (- (* (-> arg3 x) (-> arg1 z)) (* (-> arg3 z) (-> arg1 x)))) + (f2-6 (- (* (-> arg0 x) (-> arg1 z)) (* (-> arg0 z) (-> arg1 x)))) + (gp-0 #f) + ) + (let ((f30-0 (- f0-4 f1-3)) + (f0-5 (- f0-4 f2-6)) + (f1-4 (- f2-6 f1-3)) + ) + (when (and (>= (fabs f30-0) (fmax (fabs f1-4) (fabs f0-5))) (!= f30-0 0.0)) + (let ((f2-11 (+ (* (-> arg2 x) (-> arg1 x)) (* (-> arg2 z) (-> arg1 z)))) + (f3-11 (+ (* (-> arg3 x) (-> arg1 x)) (* (-> arg3 z) (-> arg1 z)))) + (f28-0 (+ (* (-> arg0 x) (-> arg1 x)) (* (-> arg0 z) (-> arg1 z)))) + ) + (if (>= (* (+ (* f2-11 f0-5) (* f3-11 f1-4)) (sign f30-0)) (* f28-0 (fabs f30-0))) + (set! gp-0 #t) + ) + ) + ) + ) + gp-0 + ) + ) + +;; definition for method 41 of type nav-mesh +;; INFO: Used lq/sq +(defmethod nav-mesh-method-41 ((this nav-mesh) (arg0 nav-poly) (arg1 vector) (arg2 vector) (arg3 vector) (arg4 (pointer nav-poly))) + (local-vars + (s1-0 vector) + (sv-16 int) + (sv-24 nav-mesh-work) + (sv-28 uint) + (sv-32 (pointer int8)) + (sv-36 (pointer int8)) + (sv-40 vector) + (sv-44 vector) + ) + (set! sv-16 -1) + (set! sv-24 (-> this work)) + (set! sv-28 (-> arg0 vertex-count)) + (set! sv-32 (-> sv-24 vert0-table)) + (set! sv-36 (-> sv-24 vert1-table)) + (set! (-> arg2 quad) (-> arg3 quad)) + (dotimes (v1-8 (the-as int sv-28)) + (set! sv-40 (-> arg0 vertex (-> sv-32 v1-8))) + (set! sv-44 (-> arg0 vertex (-> sv-36 v1-8))) + (let* ((f0-1 (- (-> sv-40 z) (-> sv-44 z))) + (f1-2 (- (-> sv-44 x) (-> sv-40 x))) + (f2-4 (+ (* f0-1 (- (-> sv-40 x) (-> arg1 x))) (* f1-2 (- (-> sv-40 z) (-> arg1 z))))) + (f0-3 (+ (* (-> arg2 x) f0-1) (* (-> arg2 z) f1-2))) + ) + (when (< f2-4 f0-3) + (set! sv-16 v1-8) + (let ((f0-4 (/ f2-4 f0-3))) + (set! (-> arg2 x) (* (-> arg2 x) f0-4)) + (set! (-> arg2 z) (* (-> arg2 z) f0-4)) + ) + ) + ) + ) + (when arg4 + (cond + ((= sv-16 -1) + (set! (-> arg4 0) #f) + ) + (else + (while (!= sv-16 -1) + (let ((v1-16 (-> arg0 adj-poly sv-16))) + (cond + ((!= v1-16 255) + (set! (-> arg4 0) (-> this poly-array v1-16)) + (set! sv-16 -1) + ) + ((let ((a1-1 (-> arg0 vertex (-> sv-32 sv-16)))) + (set! s1-0 (-> arg0 vertex (-> sv-36 sv-16))) + (< (vector-vector-xz-distance arg1 a1-1) (-> this work nav-poly-min-dist)) + ) + (set! sv-16 (+ sv-16 -1)) + (if (< sv-16 0) + (set! sv-16 (the-as int (+ sv-28 -1))) + ) + ) + ((< (vector-vector-xz-distance arg1 s1-0) (-> this work nav-poly-min-dist)) + (set! sv-16 (+ sv-16 1)) + (when (>= sv-16 (the-as int sv-28)) + (set! sv-16 0) + 0 + ) + ) + (else + (set! (-> arg4 0) #f) + (set! sv-16 -1) + ) + ) + ) + ) + ) + ) + ) + (set! (-> arg2 y) (-> arg1 y)) + arg2 + ) + +;; definition for function plane-height-at-xz-point +(defun plane-height-at-xz-point ((arg0 plane) (arg1 vector)) + (/ (- (+ (* (-> arg1 x) (-> arg0 x)) (* (-> arg1 z) (-> arg0 z)) (-> arg0 w))) (-> arg0 y)) + ) + +;; definition for function nav-normal-from-3-points +;; WARN: Return type mismatch int vs none. +(defun nav-normal-from-3-points ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector)) + (normal-of-plane arg0 arg1 arg2 arg3) + 0 + (none) + ) + +;; definition for method 43 of type nav-mesh +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod project-point-onto-plane-of-poly-local ((this nav-mesh) (arg0 nav-poly) (arg1 vector) (arg2 vector) (arg3 vector)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (cond + ((= (-> arg0 vertex-count) 3) + (nav-normal-from-3-points s4-0 (the-as vector (-> arg0 vertex)) (-> arg0 vertex1) (-> arg0 vertex2)) + ) + ((let* ((v1-2 (-> arg0 vertex2)) + (a0-3 (-> arg0 vertex)) + (f0-1 (- (-> a0-3 0 x) (-> v1-2 x))) + (f1-2 (- (-> a0-3 0 z) (-> v1-2 z))) + (f2-2 (- (-> arg3 x) (-> v1-2 x))) + (f0-3 (- (* f0-1 (- (-> arg3 z) (-> v1-2 z))) (* f1-2 f2-2))) + ) + (< 0.0 f0-3) + ) + (nav-normal-from-3-points s4-0 (the-as vector (-> arg0 vertex)) (-> arg0 vertex2) (-> arg0 vertex3)) + ) + (else + (nav-normal-from-3-points s4-0 (the-as vector (-> arg0 vertex)) (-> arg0 vertex1) (-> arg0 vertex2)) + ) + ) + (set! (-> arg2 quad) (-> s4-0 quad)) + (set! (-> s4-0 w) (- (vector-dot s4-0 (the-as vector (-> arg0 vertex))))) + (set! (-> s5-0 quad) (-> arg3 quad)) + (set! (-> s5-0 y) (/ (- (+ (* (-> arg3 x) (-> s4-0 x)) (* (-> arg3 z) (-> s4-0 z)) (-> s4-0 w))) (-> s4-0 y))) + ) + (set! (-> arg1 quad) (-> s5-0 quad)) + ) + 0 + (none) + ) + +;; definition for method 8 of type nav-mesh +;; WARN: Return type mismatch int vs nav-mesh. +(defmethod mem-usage ((this nav-mesh) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 47 (-> usage length))) + (set! (-> usage data 46 name) "nav-mesh") + (+! (-> usage data 46 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 46 used) v1-6) + (+! (-> usage data 46 total) (logand -16 (+ v1-6 15))) + ) + (set! (-> usage length) (max 47 (-> usage length))) + (set! (-> usage data 46 name) "nav-mesh") + (+! (-> usage data 46 count) 1) + (let ((v1-16 (* (-> this poly-count) 64))) + (+! (-> usage data 46 used) v1-16) + (+! (-> usage data 46 total) (logand -16 (+ v1-16 15))) + ) + (set! (-> usage length) (max 47 (-> usage length))) + (set! (-> usage data 46 name) "nav-mesh") + (+! (-> usage data 46 count) 1) + (let* ((v1-25 (-> this poly-count)) + (v1-27 (shr (* v1-25 v1-25) 2)) + ) + (+! (-> usage data 46 used) v1-27) + (+! (-> usage data 46 total) (logand -16 (+ v1-27 15))) + ) + (the-as nav-mesh 0) + ) + +;; definition for function get-nav-mesh +(defun get-nav-mesh ((arg0 actor-id)) + (let ((gp-0 (the-as nav-mesh #f))) + (let* ((s5-0 (entity-nav-mesh-by-aid arg0)) + (v1-0 (if (type? s5-0 entity-nav-mesh) + s5-0 + ) + ) + ) + (if v1-0 + (set! gp-0 (-> v1-0 nav-mesh)) + ) + ) + gp-0 + ) + ) + +;; definition for function find-nearest-nav-mesh +(defun find-nearest-nav-mesh ((arg0 vector) (arg1 float)) + (local-vars (v1-15 float) (sv-64 nav-find-poly-parms) (sv-68 nav-mesh) (sv-72 float) (sv-76 vector)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set! sv-64 (new 'stack-no-clear 'nav-find-poly-parms)) + (set! sv-68 (the-as nav-mesh #f)) + (set! sv-72 arg1) + (set! sv-76 arg0) + (set! (-> sv-64 ignore) (the-as uint 7)) + (dotimes (gp-0 (-> *level* length)) + (let ((v1-5 (-> *level* level gp-0))) + (when (= (-> v1-5 status) 'active) + (let ((s5-0 (-> v1-5 bsp nav-meshes))) + (when (nonzero? s5-0) + (dotimes (s4-0 (-> s5-0 length)) + (let ((s3-0 (-> s5-0 s4-0 nav-mesh))) + (when s3-0 + (vector-! (-> sv-64 point) sv-76 (the-as vector (-> s3-0 bounds))) + (.lvf vf1 (&-> (-> sv-64 point) quad)) + (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.mul.vf vf1 vf1 vf1) + (.mul.x.vf acc vf2 vf1 :mask #b1) + (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) + (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mov v1-15 vf1) + (let ((f0-1 v1-15) + (f1-0 (-> s3-0 bounds r)) + ) + (when (< f0-1 (* f1-0 f1-0)) + (set! (-> sv-64 y-threshold) (-> s3-0 nearest-y-threshold)) + (nav-mesh-method-46 s3-0 (the-as nav-poly sv-64)) + (when (>= sv-72 (-> sv-64 dist)) + (set! sv-72 (-> sv-64 dist)) + (set! sv-68 s3-0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + sv-68 + ) + ) + +;; definition for method 10 of type nav-mesh +(defmethod nav-mesh-method-10 ((this nav-mesh) (arg0 vector) (arg1 vector) (arg2 nav-poly)) + (local-vars (sv-16 vector)) + (set! sv-16 arg0) + (let ((gp-0 (new 'stack-no-clear 'nav-find-poly-parms))) + (set! (-> gp-0 poly) arg2) + (vector-! (-> gp-0 point) arg1 (the-as vector (-> this bounds))) + (when (or (not (-> gp-0 poly)) (not (point-in-poly? this (-> gp-0 poly) (-> gp-0 point)))) + (set! (-> gp-0 y-threshold) (-> this nearest-y-threshold)) + (set! (-> gp-0 ignore) (the-as uint 3)) + (nav-mesh-method-46 this (the-as nav-poly gp-0)) + (when (-> gp-0 poly) + (project-point-into-poly-2d this (-> gp-0 poly) sv-16 (-> gp-0 point)) + (vector+! sv-16 sv-16 (the-as vector (-> this bounds))) + ) + ) + (-> gp-0 poly) + ) + ) + +;; definition for function point-to-poly-boundary +;; INFO: Used lq/sq +(defun point-to-poly-boundary ((arg0 nav-poly) (arg1 vector) (arg2 vector)) + (let ((gp-0 (new 'stack-no-clear 'inline-array 'vector 4))) + (set! (-> gp-0 4 x) (the-as float #x7f800000)) + (let* ((s2-0 (-> arg0 vertex-count)) + (v1-1 (the-as int (+ s2-0 -1))) + ) + (dotimes (s1-0 (the-as int s2-0)) + (when (= (-> arg0 adj-poly v1-1) 255) + (set! (-> gp-0 2 quad) (-> arg0 vertex v1-1 quad)) + (set! (-> gp-0 3 quad) (-> arg0 vertex s1-0 quad)) + (set! (-> gp-0 2 y) (-> arg2 y)) + (set! (-> gp-0 3 y) (-> arg2 y)) + (set! (-> gp-0 2 w) 1.0) + (set! (-> gp-0 3 w) 1.0) + (let ((f0-5 (vector-segment-distance-point! arg2 (-> gp-0 2) (-> gp-0 3) (-> gp-0 0)))) + (when (< f0-5 (-> gp-0 4 x)) + (set! (-> gp-0 4 x) f0-5) + (set! (-> gp-0 1 quad) (-> gp-0 0 quad)) + ) + ) + ) + (set! v1-1 s1-0) + ) + ) + (set! (-> arg1 quad) (-> gp-0 1 quad)) + (-> gp-0 4 x) + ) + ) + +;; definition for method 36 of type nav-mesh +;; INFO: Used lq/sq +(defmethod nav-mesh-method-36 ((this nav-mesh) (arg0 vector) (arg1 vector) (arg2 float)) + (local-vars (v1-13 int) (sv-80 vector) (sv-84 (pointer uint8))) + (let ((gp-0 (new 'stack-no-clear 'nav-poly))) + (set! sv-80 arg0) + (set! (-> gp-0 vertex3 y) (the-as float #x7f800000)) + (set! (-> gp-0 vertex3 x) arg2) + (set! (-> gp-0 vertex1 quad) (-> arg1 quad)) + (set! sv-84 (search-for-sphere (-> this poly-hash) (-> gp-0 vertex1) (-> gp-0 vertex3 x))) + (let ((s4-0 (-> this poly-hash bucket-size)) + (s3-0 sv-84) + (s2-0 0) + ) + (until (zero? v1-13) + (let ((s1-0 (* s2-0 8)) + (s0-0 (-> s3-0 0)) + ) + (b! (zero? s0-0) cfg-14 :delay (nop!)) + (let ((v1-5 (logand s0-0 1))) + (nop!) + (b! (zero? v1-5) cfg-13 :delay (nop!)) + ) + (let* ((a0-5 (-> this poly-array s1-0)) + (v1-7 a0-5) + (f0-3 (-> gp-0 vertex1 y)) + (f1-0 (-> this nearest-y-threshold)) + ) + (if (and (>= (+ (-> v1-7 vertex3 w) f1-0) f0-3) (>= f0-3 (- (-> v1-7 vertex2 w) f1-0))) + (set! (-> gp-0 vertex3 z) (point-to-poly-boundary a0-5 (-> gp-0 vertex2) (-> gp-0 vertex1))) + ) + ) + (when (< (-> gp-0 vertex3 z) (-> gp-0 vertex3 y)) + (set! (-> gp-0 vertex3 y) (-> gp-0 vertex3 z)) + (set! (-> gp-0 vertex 0 quad) (-> gp-0 vertex2 quad)) + (nop!) + ) + (label cfg-13) + (set! s0-0 (/ (the-as int s0-0) 2)) + (nop!) + (b! (nonzero? s0-0) cfg-2 :delay (set! s1-0 (+ s1-0 1))) + ) + (label cfg-14) + (+! s2-0 1) + (set! s3-0 (&-> s3-0 1)) + (set-on-less-than v1-13 s2-0 s4-0) + (nop!) + ) + ) + 0 + (set! (-> sv-80 quad) (-> gp-0 vertex 0 quad)) + (-> gp-0 vertex3 y) + ) + ) + +;; definition for method 37 of type nav-mesh +;; INFO: Used lq/sq +;; WARN: new jak 2 until loop case, check carefully +(defmethod nav-mesh-method-37 ((this nav-mesh) (arg0 vector) (arg1 vector) (arg2 float)) + (let ((gp-0 (new 'stack-no-clear 'inline-array 'nav-poly 3))) + (set! (-> gp-0 2 vertex3 y) arg2) + (vector-! (the-as vector (-> gp-0 0)) arg0 (the-as vector (-> this bounds))) + (vector-! (-> gp-0 0 vertex1) arg1 (the-as vector (-> this bounds))) + (set! (-> gp-0 2 vertex1 quad) (-> gp-0 0 vertex0 quad)) + (set! (-> gp-0 2 vertex2 x) (-> this nearest-y-threshold)) + (set! (-> gp-0 2 data 36) (the-as uint 3)) + (let ((a1-4 (nav-mesh-method-45 this (the-as nav-poly (-> gp-0 2 vertex1))))) + (cond + (a1-4 + (init-ray-local (the-as nav-ray (-> gp-0 1)) a1-4 (the-as vector (-> gp-0 0)) (-> gp-0 0 vertex1)) + (until #f + (set! (-> gp-0 2 vertex3 z) + (nav-mesh-method-36 this (-> gp-0 0 vertex3) (the-as vector (-> gp-0 1)) (-> gp-0 2 vertex3 y)) + ) + (when (< (-> gp-0 2 vertex3 z) (-> gp-0 2 vertex3 y)) + (set! (-> gp-0 2 vertex3 y) (-> gp-0 2 vertex3 z)) + (set! (-> gp-0 0 vertex2 quad) (-> gp-0 0 vertex3 quad)) + ) + (b! (-> gp-0 2 vertex0 x) cfg-6 :delay (nop!)) + (advance-ray-to-nearest-poly-edge-or-dest! this (the-as nav-ray (-> gp-0 1))) + ) + #f + (label cfg-6) + (if (-> gp-0 2 vertex0 z) + (set! (-> gp-0 2 vertex3 y) (the-as float #xff800000)) + ) + ) + (else + (set! (-> gp-0 2 vertex3 y) (the-as float #xff800000)) + ) + ) + ) + (-> gp-0 2 vertex3 y) + ) + ) + +;; definition for method 11 of type nav-mesh +(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))) + (set! (-> v1-0 y-threshold) 4096000000.0) + (set! (-> v1-0 ignore) (the-as uint 2)) + (nav-mesh-method-45 this (the-as nav-poly (-> v1-0 point))) + ) + ) + +;; definition of type nav-find-clear-spot-work +(deftype nav-find-clear-spot-work (structure) + ((id-array int8 16) + (sphere-array sphere 16 :inline) + ) + ) + +;; definition for method 3 of type nav-find-clear-spot-work +(defmethod inspect ((this nav-find-clear-spot-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'nav-find-clear-spot-work) + (format #t "~1Tid-array[16] @ #x~X~%" (-> this id-array)) + (format #t "~1Tsphere-array[16] @ #x~X~%" (-> this sphere-array)) + (label cfg-4) + this + ) + +;; definition for method 12 of type nav-mesh +;; INFO: Used lq/sq +(defmethod nav-mesh-method-12 ((this nav-mesh) (arg0 vector) (arg1 float) (arg2 nav-poly)) + (let ((gp-0 (new 'stack-no-clear 'nav-stack-type))) + (set! (-> gp-0 byte03) 0) + (set! (-> gp-0 byte04) 3) + (set! (-> gp-0 vec3 y) arg1) + (set! (-> gp-0 byte02) 0) + (set! (-> gp-0 vec1 quad) (-> arg0 quad)) + (b! #t cfg-9 :delay (nop!)) + (label cfg-1) + (set! (-> gp-0 nav-id-params bsphere quad) (-> gp-0 vec1 quad)) + (set! (-> gp-0 nav-id-params bsphere r) (-> gp-0 vec3 y)) + (set! (-> gp-0 nav-id-params max-len) 16) + (set! (-> gp-0 nav-id-params mask) (the-as uint 255)) + (set! (-> gp-0 nav-id-params array) (-> gp-0 byte-arr)) + (set! (-> gp-0 nav-id-params y-threshold) 4096000000.0) + (sphere-hash-method-29 (-> this sphere-hash) (-> gp-0 nav-id-params)) + (set! (-> gp-0 byte01) (-> gp-0 nav-id-params len)) + (b! (nonzero? (-> gp-0 byte01)) cfg-3 :delay (empty-form)) + (set! (-> arg2 vertex0 quad) (-> gp-0 vec1 quad)) + (set! (-> gp-0 byte03) 1) + (b! #t cfg-11 :delay (nop!)) + (label cfg-3) + (dotimes (v1-15 (-> gp-0 byte01)) + (let ((a1-2 (-> gp-0 byte-arr v1-15))) + (set! (-> gp-0 vec4 quad) (-> this sphere-hash sphere-array a1-2 quad)) + ) + (vector-! (-> gp-0 vec5) (-> gp-0 vec1) (-> gp-0 vec4)) + (set! (-> gp-0 vec5 y) 0.0) + (let ((a0-9 (-> gp-0 vec5))) + (set! (-> gp-0 vec3 z) (+ (* (-> a0-9 x) (-> a0-9 x)) (* (-> a0-9 z) (-> a0-9 z)))) + ) + (let ((f0-8 (-> gp-0 vec3 z)) + (f1-4 (+ (-> gp-0 vec3 y) (-> gp-0 vec4 w))) + ) + (when (< f0-8 (* f1-4 f1-4)) + (set! (-> gp-0 vec2 quad) (-> gp-0 vec1 quad)) + (set! (-> gp-0 vec3 w) (sqrtf (-> gp-0 vec3 z))) + (vector-float*! (-> gp-0 vec6) (-> gp-0 vec5) (/ 1.0 (-> gp-0 vec3 w))) + (vector+float*! + (-> gp-0 vec1) + (-> gp-0 vec1) + (-> gp-0 vec6) + (+ (- 410.0 (-> gp-0 vec3 w)) (-> gp-0 vec4 w) (-> gp-0 vec3 y)) + ) + 0 + ) + ) + ) + (+! (-> gp-0 byte02) 1) + (label cfg-9) + (b! (< (-> gp-0 byte02) (-> gp-0 byte04)) cfg-1) + (label cfg-11) + (= (-> gp-0 byte03) 1) + ) + ) + +;; definition for method 38 of type nav-mesh +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod nav-mesh-method-38 ((this nav-mesh) (arg0 nav-poly)) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (the-as vector arg0) (the-as vector (-> this bounds))))) + (countdown (s3-0 (-> this nav-control-count)) + (let ((v1-2 (-> this nav-control-array s3-0))) + (if (-> v1-2 process) + (send-event (-> v1-2 process) 'nav-mesh-moved s4-1 arg0) + ) + ) + ) + ) + (set! (-> this bounds quad) (-> arg0 vertex0 quad)) + 0 + (none) + ) + +;; failed to figure out what this is: +(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 f297394793..dbc766c01f 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 0000000000..507c362591 --- /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/cloth-h_REF.gc b/test/decompiler/reference/jak3/engine/physics/cloth-h_REF.gc index b993c0c8b7..56eb885528 100644 --- a/test/decompiler/reference/jak3/engine/physics/cloth-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/physics/cloth-h_REF.gc @@ -8,6 +8,7 @@ (constraint-length-sqd float) (particle0 uint16) (particle1 uint16) + (vec vector :inline :overlay-at constraint-length-half) ) ) @@ -651,7 +652,3 @@ ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/engine/physics/ragdoll-edit_REF.gc b/test/decompiler/reference/jak3/engine/physics/ragdoll-edit_REF.gc index 9faa1616ad..1447835010 100644 --- a/test/decompiler/reference/jak3/engine/physics/ragdoll-edit_REF.gc +++ b/test/decompiler/reference/jak3/engine/physics/ragdoll-edit_REF.gc @@ -256,7 +256,7 @@ ) (let ((s3-0 (new 'stack-no-clear 'inline-array 'matrix 60))) (dotimes (v1-0 60) - (let ((a0-2 (the-as matrix (-> s3-0 v1-0 rvec)))) + (let ((a0-2 (-> s3-0 v1-0))) (set! (-> a0-2 rvec quad) (the-as uint128 0)) (set! (-> a0-2 uvec quad) (the-as uint128 0)) (set! (-> a0-2 fvec quad) (the-as uint128 0)) @@ -266,7 +266,7 @@ (dotimes (s2-0 (the-as int (-> arg0 num-joints))) (let ((s0-0 (-> arg0 ragdoll-joints s2-0))) (set! sv-4352 (get-parent-joint arg0 (the-as (inline-array ragdoll-joint) s0-0))) - (set! sv-4368 (the-as matrix (-> s3-0 s2-0 rvec))) + (set! sv-4368 (-> s3-0 s2-0)) (let ((s1-0 (new 'stack-no-clear 'matrix))) (cond (sv-4352 @@ -276,15 +276,11 @@ (set! sv-4432 (new 'stack-no-clear 'vector)) (let* ((v1-11 s1-0) (a3-0 - (the-as - matrix - (-> s3-0 - (/ (the-as uint (&- (the-as pointer sv-4352) (the-as uint (the-as pointer (-> arg0 ragdoll-joints))))) - (the-as uint 192) - ) - rvec - ) - ) + (-> s3-0 + (/ (the-as uint (&- (the-as pointer sv-4352) (the-as uint (the-as pointer (-> arg0 ragdoll-joints))))) + (the-as uint 192) + ) + ) ) (a0-9 (-> a3-0 rvec quad)) (a1-5 (-> a3-0 uvec quad)) @@ -1240,7 +1236,3 @@ 0 (none) ) - - - - 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 332485cd04..d43a08d9eb 100644 --- a/test/decompiler/reference/jak3/engine/physics/ragdoll-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/physics/ragdoll-h_REF.gc @@ -150,7 +150,7 @@ (num-children int8) (old-param0 basic) (hit-sound sound-name) - (ground-pat uint32) + (ground-pat pat-surface) (user0 int32) (original-speed float) ) @@ -225,19 +225,19 @@ (ragdoll-method-10 (_type_ process-drawable symbol vector symbol) none) (turn-off-for-duration! (_type_ time-frame) none) (get-parent-joint (_type_ (inline-array ragdoll-joint)) ragdoll-joint) - (ragdoll-method-13 (_type_ ragdoll-edit-info) none) - (ragdoll-method-14 (_type_) none) - (ragdoll-method-15 (_type_ process-drawable matrix) none) + (ragdoll-method-13 (_type_ ragdoll-edit-info ragdoll-joint matrix matrix) none) + (ragdoll-method-14 (_type_ process-drawable ragdoll-joint object matrix) none) + (ragdoll-method-15 (_type_ process-drawable ragdoll-edit-info) none) (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-20 (_type_ 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) (ragdoll-method-23 (_type_ vector vector float symbol) none) (ragdoll-method-24 (_type_ vector int) none) - (ragdoll-method-25 (_type_ process-drawable) none) + (enable-ragdoll! (_type_ process-drawable) none) ) ) @@ -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) ) @@ -290,9 +291,9 @@ ) (:methods (ragdoll-proc-method-15 (_type_ symbol vector symbol) none) - (ragdoll-proc-method-16 (_type_ int) none) - (ragdoll-proc-method-17 (_type_ matrix) none) - (ragdoll-proc-method-18 (_type_ ragdoll-edit-info process) none) + (disable-for-duration (_type_ time-frame) none) + (ragdoll-proc-method-17 (_type_ ragdoll-edit-info) none) + (ragdoll-proc-method-18 (_type_ ragdoll-edit-info) none) (ragdoll-proc-method-19 (_type_) none) ) ) diff --git a/test/decompiler/reference/jak3/engine/physics/ragdoll_REF.gc b/test/decompiler/reference/jak3/engine/physics/ragdoll_REF.gc new file mode 100644 index 0000000000..a0edf61634 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/physics/ragdoll_REF.gc @@ -0,0 +1,1750 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 18 of type ragdoll +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ragdoll-method-18 ((this ragdoll)) + (when *debug-segment* + (let ((s5-0 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-7 'ragdoll-setup) + (s4-0 *color-white*) + ) + (when (and *dproc* *debug-segment*) + (let ((s3-0 (-> s5-0 data (-> s5-0 count)))) + (let ((s2-0 (-> s5-0 base-time))) + (set! (-> s3-0 name) v1-7) + (set! (-> s3-0 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s2-0)))) + ) + (set! (-> s3-0 depth) (the-as uint (-> s5-0 depth))) + (set! (-> s3-0 color) s4-0) + (set! (-> s5-0 segment (-> s5-0 depth)) s3-0) + ) + (set! (-> s5-0 count) (min 1023 (+ (-> s5-0 count) 1))) + (+! (-> s5-0 depth) 1) + (set! (-> s5-0 max-depth) (max (-> s5-0 max-depth) (-> s5-0 depth))) + ) + ) + 0 + ) + (vector-seek-3d-smooth! (-> this gravity) (-> this gravity-target) 0.05 0.1) + (quaternion*! + (the-as quaternion (-> this ragdoll-joints)) + (-> this rotate-vel) + (the-as quaternion (-> this ragdoll-joints)) + ) + (quaternion-normalize! (the-as quaternion (-> this ragdoll-joints))) + (set! (-> this stable-joints) 0) + (when (logtest? (-> this ragdoll-flags) (ragdoll-flag rf0)) + (let ((s4-1 (new 'stack-no-clear 'collide-query)) + (s5-1 (new 'stack-no-clear 'bounding-box)) + ) + (set! (-> s5-1 min quad) (-> this ragdoll-joints 0 position quad)) + (set! (-> s5-1 max quad) (-> s5-1 min quad)) + (dotimes (v1-25 (the-as int (-> this num-joints))) + (let ((a2-2 (-> this ragdoll-joints v1-25)) + (a0-21 (new 'stack-no-clear 'vector)) + ) + (let ((a1-4 (new 'stack-no-clear 'vector))) + (set-vector! + a1-4 + (+ 2048.0 (-> a2-2 coll-rad)) + (+ 2048.0 (-> a2-2 coll-rad)) + (+ 2048.0 (-> a2-2 coll-rad)) + 1.0 + ) + (+! (-> a1-4 x) (fabs (-> a2-2 velocity x))) + (+! (-> a1-4 y) (fabs (-> a2-2 velocity y))) + (+! (-> a1-4 z) (fabs (-> a2-2 velocity z))) + (vector+! a0-21 (-> a2-2 position) a1-4) + (set! (-> s5-1 max x) (fmax (-> a0-21 x) (-> s5-1 max x))) + (set! (-> s5-1 max y) (fmax (-> a0-21 y) (-> s5-1 max y))) + (set! (-> s5-1 max z) (fmax (-> a0-21 z) (-> s5-1 max z))) + (vector-! a0-21 (-> a2-2 position) a1-4) + ) + (set! (-> s5-1 min x) (fmin (-> a0-21 x) (-> s5-1 min x))) + (set! (-> s5-1 min y) (fmin (-> a0-21 y) (-> s5-1 min y))) + (set! (-> s5-1 min z) (fmin (-> a0-21 z) (-> s5-1 min z))) + ) + ) + (set! (-> s4-1 collide-with) (the-as collide-spec (-> this bg-collide-with))) + (set! (-> s4-1 ignore-process0) #f) + (set! (-> s4-1 ignore-process1) #f) + (set! (-> s4-1 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> s4-1 action-mask) (collide-action solid)) + (mem-copy! (the-as pointer (-> s4-1 bbox)) (the-as pointer s5-1) 32) + (fill-using-bounding-box *collide-cache* s4-1) + (when (not (logtest? (-> this ragdoll-flags) (ragdoll-flag rf11))) + (let ((s4-2 (new 'stack-no-clear 'inline-array 'water-sphere 2))) + (dotimes (s3-1 2) + ((method-of-type water-sphere new) (the-as symbol (-> s4-2 s3-1)) water-sphere) + ) + (get-bounding-sphere s5-1 (the-as vector (-> s4-2 0))) + (set! (-> s4-2 0 flags) (water-flag)) + (set! (-> s4-2 1 sphere quad) (-> s4-2 0 sphere quad)) + (set! (-> s4-2 1 flags) (water-flag)) + (find-water-with-spheres s4-2 2 (-> this water-info)) + ) + ) + ) + ) + (when *debug-segment* + (let ((gp-1 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-55 (+ (-> gp-1 depth) -1)) + (s5-2 (-> gp-1 segment v1-55)) + (s4-3 (-> gp-1 base-time)) + ) + (when (>= v1-55 0) + (set! (-> s5-2 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-3)))) + (+! (-> gp-1 depth) -1) + ) + ) + ) + ) + 0 + ) + 0 + (none) + ) + +;; 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 matrix)) + (local-vars (v1-22 float)) + (with-pp + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (vector-float*! arg0 (-> this gravity) (* 122.88 (-> pp clock time-adjust-ratio))) + (if (logtest? (-> this ragdoll-joints arg1 ragdoll-joint-flags) (ragdoll-joint-flag rjf2)) + (vector-float*! arg0 arg0 0.15) + ) + (cond + ((logtest? (-> this ragdoll-joints arg1 ragdoll-joint-flags) (ragdoll-joint-flag rjf0)) + (vector+float*! + arg0 + arg0 + (the-as vector (+ (the-as uint (-> this ragdoll-joints 0 bounce)) (* 192 arg1))) + 0.5 + ) + (vector+float*! + arg0 + arg0 + (the-as vector (+ (the-as uint (-> this ragdoll-joints 0 velocity)) (* 192 arg1))) + 0.7 + ) + ) + (else + (vector+float*! + arg0 + arg0 + (the-as vector (+ (the-as uint (-> this ragdoll-joints 0 velocity)) (* 192 arg1))) + 1.0 + ) + ) + ) + (.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-22 vf1) + (let ((f0-6 v1-22) + (f1-1 16384.0) + ) + (if (and (zero? arg1) + (not (logtest? (-> this ragdoll-joints arg1 ragdoll-joint-flags) (ragdoll-joint-flag rjf2))) + ) + (set! f1-1 24576.0) + ) + (let ((f2-0 f1-1)) + (if (< (* f2-0 f2-0) f0-6) + (vector-float*! arg0 arg0 (/ f1-1 (sqrtf f0-6))) + ) + ) + ) + (when (nonzero? (-> this rotate-adj-count)) + (quaternion-slerp! (-> this rotate-vel) (-> this rotate-vel) (-> this rotate-adj) 0.5) + (quaternion-identity! (-> this rotate-adj)) + (set! (-> this rotate-adj-count) 0) + 0 + ) + (if (< (-> this rotate-vel w) 0.0) + (quaternion-negate! (-> this rotate-vel) (-> this rotate-vel)) + ) + (when (< (-> this rotate-vel w) (cos 7281.778)) + (let ((a1-4 (vector-normalize! (the-as vector (-> this rotate-vel)) 1.0))) + (quaternion-vector-angle! (-> this rotate-vel) a1-4 7281.778) + ) + ) + 0 + (none) + ) + ) + ) + +;; definition for method 20 of type ragdoll +;; WARN: Return type mismatch int vs none. +(defmethod reset-vec! ((this ragdoll) (arg0 vector)) + (vector-reset! arg0) + 0 + (none) + ) + +;; definition for method 21 of type ragdoll +(defmethod ragdoll-method-21 ((this ragdoll) (arg0 vector) (arg1 vector) (arg2 float)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-! gp-0 arg0 arg1) + (vector-normalize! gp-0 arg2) + (vector+! arg0 gp-0 arg1) + ) + ) + +;; definition for method 22 of type ragdoll +(defmethod get-max-angle-for-joint-idx ((this ragdoll) (idx int)) + (-> this ragdoll-joints idx max-angle) + ) + +;; definition for method 23 of type ragdoll +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; WARN: Function (method 23 ragdoll) has a return type of none, but the expression builder found a return statement. +(defmethod ragdoll-method-23 ((this ragdoll) (arg0 vector) (arg1 vector) (arg2 float) (arg3 symbol)) + (with-pp + (cond + (arg3 + (logclear! (-> this ragdoll-flags) (ragdoll-flag rf2)) + (set! (-> this allow-destabilize) (the-as uint (+ (current-time) (seconds 0.1)))) + ) + ((< (- (current-time) (the-as int (-> this allow-destabilize))) 0) + (return #f) + ) + ) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> this ragdoll-joints 0 position) arg0)) + (a0-4 (new 'stack-no-clear 'vector)) + ) + 0.0 + (set! (-> a0-4 quad) (-> s5-1 quad)) + (let ((f30-0 (vector-normalize-ret-len! a0-4 1.0))) + (if (< f30-0 0.1) + (return #f) + ) + (let ((s3-1 (vector-! (new 'stack-no-clear 'vector) arg1 (-> this ragdoll-joints 0 velocity))) + (s1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s1-1 quad) (-> s3-1 quad)) + (let ((f28-1 (* arg2 (vector-normalize-ret-len! s1-1 1.0) (/ 1.0 (-> pp clock time-adjust-ratio)))) + (a0-7 (vector+float*! (new 'stack-no-clear 'vector) arg0 s1-1 (vector-dot s5-1 s1-1))) + ) + 0.0 + (let* ((f1-2 (/ (vector-vector-distance a0-7 (-> this ragdoll-joints 0 position)) f30-0)) + (f26-0 (fmax 0.0 (+ -0.01 f1-2))) + ) + (when (< 0.0 f26-0) + (let ((s4-1 (new 'stack-no-clear 'vector))) + 0.0 + (let ((s2-1 (new 'stack-no-clear 'quaternion))) + (vector-cross! s4-1 s3-1 s5-1) + (vector-normalize! s4-1 1.0) + (let* ((f0-13 (* 10430.379 (/ f28-1 f30-0) f26-0)) + (f0-14 (fmin 9102.223 f0-13)) + ) + (quaternion-vector-angle! s2-1 s4-1 f0-14) + ) + (quaternion-normalize! (quaternion*! (-> this rotate-adj) s2-1 (-> this rotate-adj))) + ) + ) + (+! (-> this rotate-adj-count) 1) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 24 of type ragdoll +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ragdoll-method-24 ((this ragdoll) (arg0 vector) (arg1 int)) + (local-vars (v1-85 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (when *debug-segment* + (let ((s3-0 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-7 'ragdoll-collision) + (s2-0 *color-white*) + ) + (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-7) + (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 ((s4-1 (-> this ragdoll-joints arg1))) + (when (and (logtest? (-> this ragdoll-flags) (ragdoll-flag rf0)) (!= (-> s4-1 coll-rad) 0.0)) + (when (logtest? (-> this ragdoll-flags) (ragdoll-flag mirror)) + (vector-matrix*! arg0 arg0 (-> this mirror)) + (vector-matrix*! (-> s4-1 position) (-> s4-1 position) (-> this mirror)) + ) + (let ((s2-1 (new 'stack-no-clear 'collide-query)) + (s3-2 (vector-! (new 'stack-no-clear 'vector) arg0 (-> s4-1 position))) + (s1-1 0) + ) + (logclear! (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf1 rjf3)) + (if (logtest? (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf0)) + (logior! (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf1)) + ) + (if (logtest? (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf2)) + (logior! (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf3)) + ) + (logclear! (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf0 rjf2)) + (set! (-> s4-1 original-speed) 0.0) + (set! (-> arg0 quad) (-> s4-1 position quad)) + (until (or (< 6 s1-1) (begin + (.lvf vf1 (&-> s3-2 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-85 vf1) + (let ((f0-13 v1-85) + (f1-4 409.6) + ) + (< f0-13 (* f1-4 f1-4)) + ) + ) + ) + (+! s1-1 1) + (set! (-> s2-1 start-pos quad) (-> arg0 quad)) + (set! (-> s2-1 move-dist quad) (-> s3-2 quad)) + (let ((v1-49 s2-1)) + (set! (-> v1-49 radius) (-> s4-1 coll-rad)) + (set! (-> v1-49 collide-with) (the-as collide-spec (-> this bg-collide-with))) + (set! (-> v1-49 ignore-process0) #f) + (set! (-> v1-49 ignore-process1) #f) + (set! (-> v1-49 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-49 action-mask) (collide-action solid)) + ) + (set! (-> s2-1 best-other-prim) #f) + (let ((f30-0 (probe-using-line-sphere *collide-cache* s2-1))) + (cond + ((>= f30-0 0.0) + (cond + ((logtest? (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf0)) + ) + ((logtest? (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf1)) + (set! (-> s4-1 original-speed) (vector-length s3-2)) + (ragdoll-method-23 this (-> s4-1 position) *zero-vector* 1.0 #f) + ) + (else + (set! (-> s4-1 original-speed) (vector-length s3-2)) + (ragdoll-method-23 this (-> s4-1 position) *zero-vector* 1.0 #f) + ) + ) + (set! (-> s4-1 ground-pat) (-> s2-1 best-other-tri pat)) + (let ((f0-7 (fmin 1.0 f30-0))) + (vector+float*! arg0 arg0 s3-2 f0-7) + (vector-float*! s3-2 s3-2 (- 1.0 f0-7)) + ) + (let ((f0-10 (vector-dot s3-2 (-> s2-1 best-other-tri normal)))) + (vector--float*! s3-2 s3-2 (-> s2-1 best-other-tri normal) (* 1.2 f0-10)) + ) + (logior! (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf0)) + (vector-float*! (-> s4-1 bounce) (-> s2-1 best-other-tri normal) (-> s4-1 original-speed)) + ) + (else + (vector+! arg0 arg0 s3-2) + (goto cfg-34) + ) + ) + ) + ) + ) + (label cfg-34) + (if (and (not (logtest? (-> this ragdoll-flags) (ragdoll-flag rf11))) + (logtest? (water-flag touch-water) (-> this water-info flags)) + (< (- (-> arg0 y) (-> s4-1 coll-rad)) (-> this water-info base-height)) + ) + (logior! (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf2)) + ) + (when (and (nonzero? (-> s4-1 hit-sound)) + (or (and (logtest? (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf0)) + (not (logtest? (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf1 rjf2))) + ) + (and (logtest? (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf2)) + (not (logtest? (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf3))) + ) + ) + ) + (let ((v1-107 (the int (lerp-scale 0.0 1024.0 (-> s4-1 original-speed) 409.6 2867.2))) + (s3-3 (new 'static 'sound-spec)) + ) + (when (nonzero? v1-107) + (set! (-> s3-3 sound-name) (-> s4-1 hit-sound)) + (set! (-> s3-3 volume) v1-107) + (set! (-> s3-3 reg 0) (the-as uint 0)) + (if (logtest? (-> s4-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf2)) + (set! (-> s3-3 reg 0) (the-as uint 127)) + (set! (-> s3-3 reg 0) (the-as uint (-> s4-1 ground-pat material))) + ) + (sound-play-by-spec s3-3 (new-sound-id) (-> s4-1 position)) + ) + ) + ) + (when (logtest? (-> this ragdoll-flags) (ragdoll-flag mirror)) + (vector-matrix*! arg0 arg0 (-> this mirror)) + (vector-matrix*! (-> s4-1 position) (-> s4-1 position) (-> this mirror)) + ) + ) + ) + (when *debug-segment* + (let ((gp-1 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-129 (+ (-> gp-1 depth) -1)) + (s5-1 (-> gp-1 segment v1-129)) + (s4-2 (-> gp-1 base-time)) + ) + (when (>= v1-129 0) + (set! (-> s5-1 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-2)))) + (+! (-> gp-1 depth) -1) + ) + ) + ) + ) + 0 + ) + 0 + (none) + ) + ) + +;; definition for method 25 of type ragdoll +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod enable-ragdoll! ((this ragdoll) (proc process-drawable)) + (let ((s4-0 (-> this ragdoll-joints))) + (logior! (-> proc skel status) (joint-control-status no-joint-callbacks)) + (do-joint-math (-> proc draw) (-> proc node-list) (-> proc skel)) + (logclear! (-> proc skel status) (joint-control-status no-joint-callbacks)) + (let ((s2-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> proc node-list data (-> s4-0 0 joint-index)))) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-0 quad) (-> s4-0 0 position quad)) + (if (logtest? (-> this ragdoll-flags) (ragdoll-flag mirror)) + (vector-matrix*! s3-0 s3-0 (-> this mirror)) + ) + (vector-! s2-0 s3-0 s2-0) + (vector+! (-> proc root trans) s3-0 s2-0) + ) + ) + 0 + (none) + ) + +;; definition for function ragdoll-matrix-interp +;; INFO: Used lq/sq +(defun ragdoll-matrix-interp ((arg0 matrix) (arg1 matrix) (arg2 matrix) (arg3 float)) + (local-vars (sv-208 matrix)) + (set! sv-208 arg1) + (let ((s5-0 arg2) + (s4-0 arg3) + (s1-0 (new 'stack-no-clear 'matrix)) + ) + (dotimes (v1-0 3) + (set! (-> s1-0 quad v1-0) (the-as uint128 0)) + ) + 0.0 + 0.0 + 0.0 + (let ((s3-0 (new-stack-vector0))) + 0.0 + (let ((s2-0 (new 'stack-no-clear 'matrix))) + (set! (-> s2-0 rvec quad) (the-as uint128 0)) + (set! (-> s2-0 uvec quad) (the-as uint128 0)) + (set! (-> s2-0 fvec quad) (the-as uint128 0)) + (set! (-> s2-0 trans quad) (the-as uint128 0)) + (let ((s0-0 (new 'stack-no-clear 'matrix))) + (set! (-> s0-0 rvec quad) (the-as uint128 0)) + (set! (-> s0-0 uvec quad) (the-as uint128 0)) + (set! (-> s0-0 fvec quad) (the-as uint128 0)) + (set! (-> s0-0 trans quad) (the-as uint128 0)) + (vector-normalize-copy! (-> s0-0 rvec) (-> sv-208 rvec) 1.0) + (vector-normalize-copy! (-> s0-0 uvec) (-> sv-208 uvec) 1.0) + (vector-normalize-copy! (-> s0-0 fvec) (-> sv-208 fvec) 1.0) + (set! (-> s0-0 rvec w) 1.0) + (set! (-> s0-0 uvec w) 1.0) + (set! (-> s0-0 fvec w) 1.0) + (set! (-> s0-0 trans w) 1.0) + (vector-! (-> s1-0 rvec) (-> s0-0 rvec) (-> s5-0 rvec)) + (vector-! (-> s1-0 uvec) (-> s0-0 uvec) (-> s5-0 uvec)) + (vector-! (-> s1-0 fvec) (-> s0-0 fvec) (-> s5-0 fvec)) + (let ((f0-8 (vector-length (-> s1-0 rvec))) + (f1-0 (vector-length (-> s1-0 uvec))) + (f2-0 (vector-length (-> s1-0 fvec))) + ) + (cond + ((and (< f0-8 f1-0) (< f0-8 f2-0)) + (vector-cross! s3-0 (-> s1-0 uvec) (-> s1-0 fvec)) + ) + ((and (< f1-0 f0-8) (< f1-0 f2-0)) + (vector-cross! s3-0 (-> s1-0 rvec) (-> s1-0 fvec)) + ) + (else + (vector-cross! s3-0 (-> s1-0 rvec) (-> s1-0 uvec)) + ) + ) + ) + (vector-normalize! s3-0 1.0) + (let ((f0-11 (fabs (vector-dot (-> s0-0 rvec) s3-0))) + (f1-3 (fabs (vector-dot (-> s0-0 uvec) s3-0))) + (f2-3 (fabs (vector-dot (-> s0-0 fvec) s3-0))) + ) + (cond + ((and (< f0-11 f1-3) (< f0-11 f2-3)) + (vector-flatten! (-> s1-0 rvec) (-> s0-0 rvec) s3-0) + (vector-flatten! (-> s1-0 uvec) (-> s5-0 rvec) s3-0) + ) + ((< f1-3 f2-3) + (vector-flatten! (-> s1-0 rvec) (-> s0-0 uvec) s3-0) + (vector-flatten! (-> s1-0 uvec) (-> s5-0 uvec) s3-0) + ) + (else + (vector-flatten! (-> s1-0 rvec) (-> s0-0 fvec) s3-0) + (vector-flatten! (-> s1-0 uvec) (-> s5-0 fvec) s3-0) + ) + ) + ) + ) + (vector-normalize! (-> s1-0 rvec) 1.0) + (vector-normalize! (-> s1-0 uvec) 1.0) + (vector-cross! (-> s1-0 fvec) (-> s1-0 rvec) (-> s1-0 uvec)) + (if (< (vector-dot (-> s1-0 fvec) s3-0) 0.0) + (vector-negate! s3-0 s3-0) + ) + (let ((f30-0 (* (acos (vector-dot (-> s1-0 rvec) (-> s1-0 uvec))) (- 1.0 s4-0)))) + (matrix-axis-sin-cos! s2-0 s3-0 (sin f30-0) (cos f30-0)) + ) + (matrix*! arg0 s5-0 s2-0) + ) + ) + ) + ) + +;; definition for function ragdoll-joint-callback +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun ragdoll-joint-callback ((arg0 cspace) (arg1 transformq) (arg2 process-drawable) (arg3 ragdoll-proc)) + (local-vars (sv-240 int) (sv-256 quaternion) (sv-272 vector) (sv-288 matrix)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (when *debug-segment* + (let ((s2-0 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-7 'ragdoll-callback) + (s1-0 *color-white*) + ) + (when (and *dproc* *debug-segment*) + (let ((s0-0 (-> s2-0 data (-> s2-0 count)))) + (set! sv-240 (-> s2-0 base-time)) + (set! (-> s0-0 name) v1-7) + (set! (-> s0-0 start-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint sv-240)))) + (set! (-> s0-0 depth) (the-as uint (-> s2-0 depth))) + (set! (-> s0-0 color) s1-0) + (set! (-> s2-0 segment (-> s2-0 depth)) s0-0) + ) + (set! (-> s2-0 count) (min 1023 (+ (-> s2-0 count) 1))) + (+! (-> s2-0 depth) 1) + (set! (-> s2-0 max-depth) (max (-> s2-0 max-depth) (-> s2-0 depth))) + ) + ) + 0 + ) + (when arg3 + (let ((s3-1 (-> arg3 ragdoll))) + (when (and s3-1 + (and (< 0.0 (-> s3-1 flex-blend)) (!= (-> s3-1 ragdoll-joint-remap (+ (-> arg0 joint number) 1)) 255)) + ) + (let ((s1-1 (-> s3-1 ragdoll-joints (-> s3-1 ragdoll-joint-remap (+ (-> arg0 joint number) 1))))) + (when s1-1 + (if (and (-> s1-1 old-param0) (!= (-> s1-1 old-param0) ragdoll-other-joint-callback)) + ((the-as (function cspace transformq none) (-> s1-1 old-param0)) arg0 arg1) + (cspace<-parented-transformq-joint! arg0 arg1) + ) + (let ((s2-1 (new 'stack-no-clear 'matrix))) + (set! sv-256 + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) (-> s1-1 geo-tform) (-> s1-1 geo-tform w)) + ) + (quaternion-normalize! (quaternion*! sv-256 (-> s1-1 quat) sv-256)) + (quaternion->matrix s2-1 sv-256) + (when (logtest? (-> s3-1 ragdoll-flags) (ragdoll-flag rf10)) + (let ((v1-40 (&+ s1-1 188))) + (when (and (!= v1-40 (-> s3-1 ragdoll-joints (-> s3-1 num-joints))) (= (-> v1-40 parent-joint) -1)) + (let ((s0-3 (vector-! (new 'stack-no-clear 'vector) (-> v1-40 position) (-> s1-1 position)))) + (set! sv-272 (new 'stack-no-clear 'vector)) + (set! sv-288 (new 'stack-no-clear 'matrix)) + (vector-flatten! sv-272 s0-3 (-> s2-1 rvec)) + (vector-normalize! sv-272 1.0) + (matrix-from-two-vectors! sv-288 (-> s2-1 uvec) sv-272) + (matrix*! s2-1 s2-1 sv-288) + (vector-flatten! sv-272 s0-3 (-> s2-1 fvec)) + ) + (vector-normalize! sv-272 1.0) + (matrix-from-two-vectors! sv-288 (-> s2-1 uvec) sv-272) + (matrix*! s2-1 s2-1 sv-288) + ) + ) + ) + (set! (-> s2-1 trans quad) (-> s1-1 position quad)) + (set! (-> s2-1 trans w) 1.0) + (if (logtest? (-> s3-1 ragdoll-flags) (ragdoll-flag mirror)) + (matrix*! s2-1 s2-1 (-> s3-1 mirror)) + ) + (cond + ((>= (-> s3-1 flex-blend) 1.0) + (let ((a2-10 (-> arg0 bone transform)) + (v1-51 (-> s2-1 rvec quad)) + (a0-45 (-> s2-1 uvec quad)) + (a1-20 (-> s2-1 fvec quad)) + (a3-1 (-> s2-1 trans quad)) + ) + (set! (-> a2-10 rvec quad) v1-51) + (set! (-> a2-10 uvec quad) a0-45) + (set! (-> a2-10 fvec quad) a1-20) + (set! (-> a2-10 trans quad) a3-1) + ) + ) + (else + (let ((s1-3 (vector-lerp! + (new 'stack-no-clear 'vector) + (matrix->trans (-> arg0 bone transform) (new 'stack-no-clear 'vector)) + (-> s2-1 trans) + (-> s3-1 flex-blend) + ) + ) + ) + (ragdoll-matrix-interp (-> arg0 bone transform) (-> arg0 bone transform) s2-1 (-> s3-1 flex-blend)) + (set! (-> arg0 bone transform trans quad) (-> s1-3 quad)) + ) + (set! (-> arg0 bone transform trans w) 1.0) + ) + ) + ) + (let ((v1-60 (new 'stack-no-clear 'vector))) + (let ((a0-50 v1-60)) + (let ((a1-24 (-> s3-1 scale)) + (a2-14 (-> arg2 root scale)) + ) + (.lvf vf4 (&-> a1-24 quad)) + (.lvf vf5 (&-> a2-14 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> a0-50 quad) vf6) + ) + (let ((a1-25 v1-60)) + (let ((a0-51 v1-60) + (a2-15 (-> arg1 scale)) + ) + (.lvf vf4 (&-> a0-51 quad)) + (.lvf vf5 (&-> a2-15 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> a1-25 quad) vf6) + ) + (let ((a0-53 (-> arg0 bone transform))) + (let ((a1-27 (-> arg0 bone transform)) + (a2-16 v1-60) + ) + (.lvf vf4 (&-> a1-27 rvec quad)) + (.lvf vf5 (&-> a2-16 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> a0-53 rvec quad) vf6) + ) + (let ((a0-55 (-> arg0 bone transform uvec))) + (let ((a1-29 (-> arg0 bone transform uvec)) + (a2-17 v1-60) + ) + (.lvf vf4 (&-> a1-29 quad)) + (.lvf vf5 (&-> a2-17 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> a0-55 quad) vf6) + ) + (let ((a0-57 (-> arg0 bone transform fvec))) + (.lvf vf4 (&-> (-> arg0 bone transform fvec) quad)) + (.lvf vf5 (&-> v1-60 quad)) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> a0-57 quad) vf6) + ) + ) + (set! (-> arg0 bone transform rvec w) 0.0) + (set! (-> arg0 bone transform uvec w) 0.0) + (set! (-> arg0 bone transform fvec w) 0.0) + ) + ) + ) + ) + ) + (when *debug-segment* + (let ((gp-1 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-75 (+ (-> gp-1 depth) -1)) + (s5-1 (-> gp-1 segment v1-75)) + (s4-1 (-> gp-1 base-time)) + ) + (when (>= v1-75 0) + (set! (-> s5-1 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-1)))) + (+! (-> gp-1 depth) -1) + ) + ) + ) + ) + 0 + ) + (none) + ) + ) + +;; definition for function ragdoll-other-joint-callback +(defbehavior ragdoll-other-joint-callback ragdoll-proc ((arg0 cspace) (arg1 transformq)) + (local-vars (a3-0 process-tree)) + (let ((gp-0 ragdoll-joint-callback) + (s5-0 arg0) + (s4-0 arg1) + (s3-0 self) + ) + (let ((s2-0 (-> self child))) + (while s2-0 + (let ((s1-0 (ppointer->process s2-0))) + (when (type? s1-0 ragdoll-proc) + (set! a3-0 s1-0) + (goto cfg-9) + ) + ) + (set! s2-0 (-> s2-0 0 brother)) + ) + ) + (set! a3-0 (the-as process-tree #f)) + (label cfg-9) + (gp-0 s5-0 s4-0 (the-as process-drawable s3-0) (the-as ragdoll-proc a3-0)) + ) + (none) + ) + +;; definition for function ragdoll-reflect-matrix +(defun ragdoll-reflect-matrix ((arg0 matrix) (arg1 vector) (arg2 vector)) + (matrix-identity! arg0) + (let ((s4-1 (vector-float*! (new 'stack-no-clear 'vector) arg1 -2.0))) + (vector-float*! (-> arg0 rvec) s4-1 (-> arg1 x)) + (vector-float*! (-> arg0 uvec) s4-1 (-> arg1 y)) + (vector-float*! (-> arg0 fvec) s4-1 (-> arg1 z)) + (+! (-> arg0 rvec x) 1.0) + (+! (-> arg0 uvec y) 1.0) + (+! (-> arg0 fvec z) 1.0) + (set! (-> arg0 rvec w) 0.0) + (set! (-> arg0 uvec w) 0.0) + (set! (-> arg0 fvec w) 0.0) + (vector-negate! s4-1 arg2) + (vector-matrix*! (-> arg0 trans) s4-1 arg0) + ) + (vector+! (-> arg0 trans) (-> arg0 trans) arg2) + ) + +;; definition for method 9 of type ragdoll +;; WARN: Return type mismatch int vs none. +(defmethod ragdoll-method-9 ((this ragdoll) (arg0 matrix) (arg1 process-drawable)) + (cond + ((= (-> arg1 node-list data 2 param0) cspace<-parented-matrix-joint-flip-z!) + (logior! (-> this ragdoll-flags) (ragdoll-flag mirror)) + (let ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> arg1 node-list data 2))) + (a1-5 (vector-normalize-copy! + (new 'stack-no-clear 'vector) + (the-as vector (-> arg1 node-list data 2 bone transform)) + 1.0 + ) + ) + ) + (ragdoll-reflect-matrix arg0 a1-5 s4-0) + ) + ) + (else + (logclear! (-> this ragdoll-flags) (ragdoll-flag mirror)) + (matrix-identity! arg0) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type ragdoll +;; INFO: Used lq/sq +;; WARN: Return type mismatch ragdoll-flag vs none. +(defmethod ragdoll-method-10 ((this ragdoll) (arg0 process-drawable) (arg1 symbol) (arg2 vector) (arg3 symbol)) + (local-vars (sv-144 vector)) + (with-pp + (set! (-> this turn-off-start) 0) + (logclear! (-> this ragdoll-flags) (ragdoll-flag rf2)) + (logior! (-> arg0 skel status) (joint-control-status force-math)) + (do-joint-math (-> arg0 draw) (-> arg0 node-list) (-> arg0 skel)) + (logclear! (-> arg0 skel status) (joint-control-status force-math)) + (ragdoll-method-9 this (-> this mirror) arg0) + (cond + ((and arg1 arg3) + (logior! (-> this ragdoll-flags) (ragdoll-flag rf5)) + (set-time! (-> this copy-velocity-start)) + (set! (-> this flex-blend) 0.0) + (dotimes (s4-1 (the-as int (-> this num-joints))) + (let ((s3-1 (-> this ragdoll-joints s4-1))) + (new 'stack-no-clear 'vector) + (vector<-cspace! (-> s3-1 position) (-> arg0 node-list data (-> s3-1 joint-index))) + (if (logtest? (-> this ragdoll-flags) (ragdoll-flag mirror)) + (vector-matrix*! (-> s3-1 position) (-> s3-1 position) (-> this mirror)) + ) + ) + ) + ) + ((or (not (logtest? (-> this ragdoll-flags) (ragdoll-flag rf5))) + (!= (current-time) (-> this copy-velocity-start)) + ) + (logior! (-> this ragdoll-flags) (ragdoll-flag rf1 rf7 rf9)) + (set! (-> this flex-blend) 1.0) + (when arg3 + (quaternion-identity! (-> this rotate-vel)) + (quaternion-identity! (-> this rotate-adj)) + (set! (-> this rotate-adj-count) 0) + 0 + ) + (set! (-> this stable-joints) 0) + (dotimes (s2-1 (the-as int (-> this num-joints))) + (let ((s1-0 (-> this ragdoll-joints s2-1)) + (s0-0 (new 'stack-no-clear 'vector)) + ) + (when (not (logtest? (-> this ragdoll-flags) (ragdoll-flag rf6))) + (when *debug-segment* + (when (= (-> arg0 node-list data (-> s1-0 joint-index) param0) ragdoll-other-joint-callback) + (break!) + 0 + ) + ) + (set! (-> s1-0 old-param0) (-> arg0 node-list data (-> s1-0 joint-index) param0)) + (let ((a0-19 (-> arg0 node-list data (-> s1-0 joint-index)))) + (set! (-> a0-19 param0) ragdoll-other-joint-callback) + ) + ) + (set! (-> s1-0 ragdoll-joint-flags) (ragdoll-joint-flag)) + (let ((a1-11 (matrix*! + (new 'stack-no-clear 'matrix) + (-> arg0 node-list data (-> s1-0 joint-index) bone transform) + (-> this mirror) + ) + ) + ) + (matrix->quaternion (-> s1-0 quat) a1-11) + ) + (let ((a2-6 + (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) (-> s1-0 geo-tform) (- (-> s1-0 geo-tform w))) + ) + ) + (quaternion*! (-> s1-0 quat) (-> s1-0 quat) a2-6) + ) + (quaternion-normalize! (-> s1-0 quat)) + (cond + ((logtest? (-> this ragdoll-flags) (ragdoll-flag rf5)) + (logclear! (-> this ragdoll-flags) (ragdoll-flag rf5)) + (set! sv-144 (vector<-cspace! (new 'stack-no-clear 'vector) (-> arg0 node-list data (-> s1-0 joint-index)))) + (if (logtest? (-> this ragdoll-flags) (ragdoll-flag mirror)) + (vector-matrix*! sv-144 sv-144 (-> this mirror)) + ) + (vector-! (-> s1-0 velocity) sv-144 (-> s1-0 position)) + (vector-float*! (-> s1-0 velocity) (-> s1-0 velocity) (/ 1.0 (-> pp clock time-adjust-ratio))) + (set! (-> s1-0 position quad) (-> sv-144 quad)) + ) + (else + (vector<-cspace! (-> s1-0 position) (-> arg0 node-list data (-> s1-0 joint-index))) + (if (logtest? (-> this ragdoll-flags) (ragdoll-flag mirror)) + (vector-matrix*! (-> s1-0 position) (-> s1-0 position) (-> this mirror)) + ) + (cond + (arg2 + (vector-float*! (-> s1-0 velocity) arg2 (/ 1.0 (-> pp clock time-adjust-ratio))) + ) + ((not arg3) + ) + (else + (vector-reset! (-> s1-0 velocity)) + ) + ) + ) + ) + (when arg3 + (cond + ((>= (-> s1-0 parent-joint) 0) + (vector<-cspace! s0-0 (-> arg0 node-list data (-> s1-0 parent-joint))) + ) + ((> s2-1 0) + (vector<-cspace! s0-0 (-> arg0 node-list data (-> this ragdoll-joints (+ s2-1 -1) joint-index))) + ) + (else + (set! (-> s0-0 quad) (-> arg0 root trans quad)) + ) + ) + (if (logtest? (-> this ragdoll-flags) (ragdoll-flag mirror)) + (vector-matrix*! s0-0 s0-0 (-> this mirror)) + ) + (set! (-> s1-0 joint-length) (vector-vector-distance (-> s1-0 position) s0-0)) + (if (zero? s2-1) + (vector-! (-> this root-offset) (-> arg0 root trans) (-> s1-0 position)) + ) + ) + ) + ) + (logior! (-> this ragdoll-flags) (ragdoll-flag rf6)) + ) + ) + (none) + ) + ) + +;; definition for method 11 of type ragdoll +;; WARN: Return type mismatch int vs none. +(defmethod turn-off-for-duration! ((this ragdoll) (arg0 time-frame)) + (set-time! (-> this turn-off-start)) + (set! (-> this turn-off-duration) arg0) + 0 + (none) + ) + +;; definition for method 12 of type ragdoll +(defmethod get-parent-joint ((this ragdoll) (arg0 (inline-array ragdoll-joint))) + (when (< (-> arg0 0 parent-joint) 0) + (if (!= arg0 (-> this ragdoll-joints)) + (return (-> arg0 -1)) + ) + (return (the-as ragdoll-joint #f)) + ) + (dotimes (v1-7 (the-as int (-> this num-joints))) + (if (= (-> this ragdoll-joints v1-7 joint-index) (-> arg0 0 parent-joint)) + (return (-> this ragdoll-joints v1-7)) + ) + ) + (the-as ragdoll-joint #f) + ) + +;; definition for method 13 of type ragdoll +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ragdoll-method-13 ((this ragdoll) (arg0 ragdoll-edit-info) (arg1 ragdoll-joint) (arg2 matrix) (arg3 matrix)) + (when (and (nonzero? arg0) (let ((v1-1 (-> arg0 skel-visible))) + (if (or (zero? v1-1) (= v1-1 4)) + #t + ) + ) + ) + (if (or (not (logtest? (-> *display* real-frame-clock integral-frame-counter) 8)) + (!= (-> arg0 analog-func) 4) + (not (ragdoll-edit-info-method-10 arg0 this (the-as ragdoll-joint (-> arg1 joint-index)))) + ) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> arg3 trans) + (-> arg2 trans) + (new 'static 'rgba :r #xff :g #xff :a #x80) + #f + (the-as rgba -1) + ) + ) + (when (or (not (logtest? (-> *display* real-frame-clock integral-frame-counter) 8)) + (nonzero? (-> arg0 analog-func)) + (not (ragdoll-edit-info-method-10 arg0 this (the-as ragdoll-joint (-> arg1 joint-index)))) + ) + (let ((f30-0 0.25)) + (if (and (zero? (-> arg0 analog-func)) + (ragdoll-edit-info-method-10 arg0 this (the-as ragdoll-joint (-> arg1 joint-index))) + ) + (set! f30-0 0.35) + ) + (add-debug-matrix #t (bucket-id debug-no-zbuf1) arg3 (* 4096.0 f30-0)) + ) + ) + (when (or (not (logtest? (-> *display* real-frame-clock integral-frame-counter) 8)) + (zero? (-> arg0 analog-func)) + (not (ragdoll-edit-info-method-10 arg0 this (the-as ragdoll-joint (-> arg1 joint-index)))) + ) + (let ((f30-1 0.25)) + (if (and (nonzero? (-> arg0 analog-func)) + (ragdoll-edit-info-method-10 arg0 this (the-as ragdoll-joint (-> arg1 joint-index))) + ) + (set! f30-1 0.35) + ) + (add-debug-matrix #t (bucket-id debug-no-zbuf1) arg2 (* 4096.0 f30-1)) + ) + ) + ) + (when (and (nonzero? arg0) + (!= (-> arg0 skel-visible) 2) + (= arg1 (-> this ragdoll-joints)) + (not (logtest? (-> *display* real-frame-clock integral-frame-counter) 8)) + (= (-> arg0 analog-func) 7) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix))) + (matrix-axis-angle! s4-1 (-> this orient-tform) (- (-> this orient-tform w))) + (matrix*! s4-1 s4-1 arg2) + (set! (-> s4-1 trans quad) (-> arg2 trans quad)) + (add-debug-matrix #t (bucket-id debug-no-zbuf1) s4-1 (meters 2)) + ) + ) + 0 + (none) + ) + +;; definition for method 14 of type ragdoll +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ragdoll-method-14 ((this ragdoll) (arg0 process-drawable) (arg1 ragdoll-joint) (arg2 object) (arg3 matrix)) + (cond + ((>= (-> arg1 parent-joint) 0) + (let ((s2-0 (get-parent-joint this (the-as (inline-array ragdoll-joint) arg1))) + (s3-0 (new 'stack-no-clear 'matrix)) + ) + (cond + (s2-0 + (quaternion->matrix arg3 (-> s2-0 quat)) + (matrix-axis-angle! s3-0 (-> arg1 pre-tform) (- (-> arg1 pre-tform w))) + (matrix*! arg3 s3-0 arg3) + (set! (-> arg3 trans quad) (-> s2-0 position quad)) + ) + (else + (matrix-axis-angle! s3-0 (-> arg1 pre-tform) (- (-> arg1 pre-tform w))) + (matrix*! arg3 s3-0 (-> arg0 node-list data (-> arg1 parent-joint) bone transform)) + (vector<-cspace! (-> arg3 trans) (-> arg0 node-list data (-> arg1 parent-joint))) + ) + ) + ) + ) + ((> (the-as int arg2) 0) + (let ((s3-1 (new 'stack-no-clear 'matrix)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> arg3 trans quad)) + (matrix-axis-angle! s3-1 (-> arg1 pre-tform) (- (-> arg1 pre-tform w))) + (matrix*! arg3 s3-1 arg3) + (set! (-> arg3 trans quad) (-> s5-1 quad)) + ) + ) + (else + (quaternion->matrix arg3 (-> arg0 root quat)) + (set! (-> arg3 trans quad) (-> arg0 root trans quad)) + ) + ) + 0 + (none) + ) + +;; definition for method 17 of type ragdoll +;; WARN: Return type mismatch int vs none. +(defmethod ragdoll-method-17 ((this ragdoll) (arg0 process-drawable)) + (logclear! (-> this ragdoll-flags) (ragdoll-flag rf1)) + (when (logtest? (-> this ragdoll-flags) (ragdoll-flag rf6)) + (logclear! (-> this ragdoll-flags) (ragdoll-flag rf6)) + (dotimes (v1-7 (the-as int (-> this num-joints))) + (let* ((a2-5 (-> this ragdoll-joints v1-7)) + (a3-3 (-> arg0 node-list data (-> a2-5 joint-index))) + ) + (set! (-> a3-3 param0) (the-as (function cspace transformq none) (-> a2-5 old-param0))) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 15 of type ragdoll +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ragdoll-method-15 ((this ragdoll) (arg0 process-drawable) (arg1 ragdoll-edit-info)) + (local-vars + (at-0 int) + (v1-156 float) + (f0-14 float) + (sv-320 vector) + (sv-336 vector) + (sv-352 (function vector float 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) + (sv-544 vector) + (sv-560 vector) + ) + (with-pp + (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) + (when *debug-segment* + (let ((s3-0 (-> *display* frames (-> *display* on-screen) profile-array data 0)) + (v1-7 'ragdoll-overall) + (s2-0 *color-white*) + ) + (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-7) + (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 + ) + (if (logtest? (-> this ragdoll-flags) (ragdoll-flag rf9)) + (ragdoll-method-9 this (-> this mirror) arg0) + ) + (if (not arg1) + (set! arg1 (the-as ragdoll-edit-info 0)) + ) + (if (logtest? (-> this ragdoll-flags) (ragdoll-flag rf5)) + (ragdoll-method-10 this arg0 #f (the-as vector #f) #t) + ) + (cond + ((or (zero? (the-as object arg1)) + (and (= (-> arg1 single-step) 1) (cpad-pressed? 0 r2)) + (zero? (-> arg1 single-step)) + ) + (if (not (logtest? (-> this ragdoll-flags) (ragdoll-flag rf2))) + (ragdoll-method-18 this) + ) + ) + ((and (nonzero? (the-as object arg1)) (nonzero? (-> this turn-off-start)) (= (-> arg1 single-step) 1)) + (+! (-> this turn-off-start) (-> arg1 last-frame-dur)) + ) + ) + (let ((f30-0 1.0)) + (when (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)))) + ) + ) + ) + ) + (if (= f30-0 0.0) + (ragdoll-method-17 this arg0) + ) + ) + (set! (-> this flex-blend) f30-0) + ) + (when (and (not (logtest? (-> this ragdoll-flags) (ragdoll-flag rf2))) + (not (logtest? (-> this ragdoll-flags) (ragdoll-flag rf5))) + ) + (let ((s3-1 (new 'stack-no-clear 'matrix)) + (s2-1 (new 'stack-no-clear 'matrix)) + ) + (new 'stack-no-clear 'vector) + (dotimes (s1-1 (the-as int (-> this num-joints))) + (let ((s0-1 (-> this ragdoll-joints s1-1))) + (set! sv-560 (new 'stack-no-clear 'vector)) + (let ((v1-74 (-> s0-1 position quad))) + (set! (-> sv-560 quad) v1-74) + ) + (if (and (logtest? (-> s0-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf2)) + (not (logtest? (-> s0-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf3))) + ) + (vector-float*! (-> s0-1 velocity) (-> s0-1 velocity) 0.1) + ) + (ragdoll-method-14 this arg0 s0-1 s1-1 s2-1) + (cond + ((or (zero? (the-as object arg1)) + (and (= (-> arg1 single-step) 1) (cpad-pressed? 0 r2)) + (zero? (-> arg1 single-step)) + ) + (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 s2-1) + (let ((v1-93 sv-560)) + (let ((a0-39 sv-560)) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> a0-39 quad)) + ) + (.lvf vf5 (&-> sv-320 quad)) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-93 quad) vf6) + ) + ) + (when (and (< s1-1 (the-as int (+ (-> this num-joints) -1))) + (= (-> this ragdoll-joints (+ s1-1 1) parent-joint) -1) + ) + (set! sv-336 (new 'stack-no-clear 'vector)) + (reset-vec! this sv-336) + (let ((v1-104 sv-560)) + (let ((a0-45 sv-560)) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> a0-45 quad)) + ) + (.lvf vf5 (&-> sv-336 quad)) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-104 quad) vf6) + ) + ) + (when (or (> s1-1 0) (!= (-> s0-1 parent-joint) -1)) + (ragdoll-method-21 this sv-560 (-> s2-1 trans) (-> s0-1 joint-length)) + (set! sv-432 (new 'stack-no-clear 'vector)) + (let ((v1-110 sv-560) + (a0-50 (-> s2-1 trans)) + ) + (.lvf vf4 (&-> v1-110 quad)) + (.lvf vf5 (&-> a0-50 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-432 quad) vf6) + (let ((f30-2 (vector-normalize-ret-len! sv-432 1.0)) + (f26-0 (vector-dot sv-432 (-> s2-1 uvec))) + (f28-1 (get-max-angle-for-joint-idx this s1-1)) + ) + (when (< f26-0 (cos f28-1)) + (vector--float*! sv-432 sv-432 (-> s2-1 uvec) f26-0) + (set! sv-352 vector-normalize!) + (set! sv-368 sv-432) + (let ((a1-15 (sin f28-1))) + (sv-352 sv-368 a1-15) + ) + (set! sv-416 sv-432) + (set! sv-384 sv-432) + (set! sv-400 (-> s2-1 uvec)) + (let ((f0-9 (cos f28-1))) + (.lvf vf2 (&-> sv-400 quad)) + (.lvf vf1 (&-> sv-384 quad)) + (let ((v1-123 f0-9)) + (.mov vf3 v1-123) + ) + ) + (.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-416 quad) vf4) + (vector+float*! sv-560 (-> s2-1 trans) sv-432 f30-2) + ) + ) + ) + (if (or (zero? (the-as object arg1)) (-> arg1 collision)) + (ragdoll-method-24 this sv-560 s1-1) + ) + (cond + ((or (> s1-1 0) (!= (-> s0-1 parent-joint) -1)) + (set! sv-448 (new 'stack-no-clear 'vector)) + (let ((v1-134 (-> s2-1 trans)) + (a0-63 sv-560) + ) + (.lvf vf4 (&-> v1-134 quad)) + (.lvf vf5 (&-> a0-63 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-448 quad) vf6) + (vector-normalize-ret-len! sv-448 1.0) + (set! sv-464 (new 'stack-no-clear 'vector)) + (let ((v1-137 sv-560) + (a0-65 (-> s0-1 position)) + ) + (.lvf vf4 (&-> v1-137 quad)) + (.lvf vf5 (&-> a0-65 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-464 quad) vf6) + (let ((f30-3 (vector-dot sv-448 sv-464))) + (vector--float*! sv-464 sv-464 sv-448 f30-3) + (cond + ((< f30-3 0.0) + (set! f0-14 (* f30-3 (-> this compress-vel-parallel))) + (vector-float*! sv-464 sv-464 (-> this compress-vel)) + ) + (else + (set! f0-14 (* f30-3 (-> this stretch-vel-parallel))) + (vector-float*! sv-464 sv-464 (-> this stretch-vel)) + ) + ) + ) + (vector+float*! sv-464 sv-464 sv-448 f0-14) + (vector+! sv-560 (-> s0-1 position) sv-464) + (let ((f0-16 (-> this momentum))) + (if (logtest? (-> s0-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf2)) + (set! f0-16 0.1) + ) + (let ((t9-20 vector-lerp!) + (a0-72 (-> s0-1 velocity)) + (a1-23 (-> s0-1 velocity)) + (a3-6 f0-16) + ) + (t9-20 a0-72 a1-23 sv-464 a3-6) + ) + ) + (let ((a2-12 (vector-! (new 'stack-no-clear 'vector) (-> s2-1 trans) sv-560))) + (.lvf vf1 (&-> a2-12 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-156 vf1) + (let* ((f0-17 v1-156) + (f1-6 (* (-> this maximum-stretch) (-> s0-1 joint-length))) + (f2-3 f1-6) + ) + (if (< (* f2-3 f2-3) f0-17) + (vector--float*! sv-560 (-> s2-1 trans) a2-12 (/ f1-6 (sqrtf f0-17))) + ) + ) + ) + ) + (else + (let ((a2-14 (vector-! (new 'stack-no-clear 'vector) sv-560 (-> s0-1 position))) + (f0-20 (-> this momentum)) + ) + (if (logtest? (-> s0-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf2)) + (set! f0-20 0.1) + ) + (vector-lerp! (-> s0-1 velocity) (-> s0-1 velocity) a2-14 f0-20) + ) + ) + ) + (let ((f0-21 (vector-vector-distance-squared (-> s0-1 position) sv-560)) + (f1-7 40.96) + ) + (if (< f0-21 (* f1-7 f1-7)) + (+! (-> this stable-joints) 1) + ) + ) + (when (and (zero? s1-1) (< (-> s0-1 parent-joint) 0) (logtest? (-> this ragdoll-flags) (ragdoll-flag rf7))) + (let ((v1-176 (-> arg0 root transv))) + (.lvf vf1 (&-> (vector-! (new 'stack-no-clear 'vector) sv-560 (-> s0-1 position)) quad)) + (let ((f0-22 (-> pp clock frames-per-second))) + (.mov at-0 f0-22) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> v1-176 quad) vf1) + ) + ) + (set! (-> s0-1 position quad) (-> sv-560 quad)) + (cond + ((or (> s1-1 0) (!= (-> s0-1 parent-joint) -1)) + (vector-! (-> s3-1 uvec) sv-560 (-> s2-1 trans)) + (vector-normalize! (-> s3-1 uvec) 1.0) + (vector-cross! (-> s3-1 rvec) (-> s3-1 uvec) (-> s2-1 fvec)) + (vector-normalize! (-> s3-1 rvec) 1.0) + (set! sv-528 (new 'stack-no-clear 'vector)) + (let ((v1-183 (-> s0-1 old-x)) + (a0-91 (-> s3-1 rvec)) + ) + (.lvf vf1 (&-> v1-183 quad)) + (.lvf vf2 (&-> a0-91 quad)) + ) + (.outer.product.a.vf acc vf1 vf2) + (.outer.product.b.vf vf3 vf2 vf1 acc) + (.svf (&-> sv-528 quad) vf3) + (vector-flatten! sv-528 (-> s0-1 old-x) (-> s3-1 uvec)) + (vector-normalize! sv-528 1.0) + (cond + ((and (< (-> s0-1 axial-slop) 65536.0) (< (vector-dot (-> s3-1 rvec) sv-528) (cos (-> s0-1 axial-slop)))) + (vector-cross! sv-528 sv-528 (-> s3-1 rvec)) + (vector-cross! sv-528 (-> s3-1 rvec) sv-528) + (vector-normalize! sv-528 1.0) + (set! sv-496 (-> s3-1 rvec)) + (set! sv-480 (-> s3-1 rvec)) + (let ((f0-28 (cos (-> s0-1 axial-slop)))) + (.lvf vf1 (&-> sv-480 quad)) + (let ((v1-195 f0-28)) + (.mov vf2 v1-195) + ) + ) + (.add.x.vf vf1 vf0 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> sv-496 quad) vf1) + (set! sv-544 (-> s3-1 rvec)) + (set! sv-512 (-> s3-1 rvec)) + (let ((f0-30 (sin (-> s0-1 axial-slop)))) + (.lvf vf2 (&-> sv-528 quad)) + (.lvf vf1 (&-> sv-512 quad)) + (let ((v1-201 f0-30)) + (.mov vf3 v1-201) + ) + ) + (.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-544 quad) vf4) + (set! (-> s0-1 old-x quad) (-> s3-1 rvec quad)) + ) + (else + (set! (-> s3-1 rvec quad) (-> sv-528 quad)) + (set! (-> s0-1 old-x quad) (-> s3-1 rvec quad)) + ) + ) + (vector-cross! (-> s3-1 fvec) (-> s3-1 rvec) (-> s3-1 uvec)) + (matrix->quaternion (-> s0-1 quat) s3-1) + ) + (else + (quaternion->matrix s3-1 (-> s0-1 quat)) + ) + ) + ) + (else + (quaternion->matrix s3-1 (-> s0-1 quat)) + ) + ) + (set! (-> s3-1 trans quad) (-> sv-560 quad)) + (set! (-> s3-1 rvec w) 0.0) + (set! (-> s3-1 uvec w) 0.0) + (set! (-> s3-1 fvec w) 0.0) + (if (and (zero? s1-1) (< (-> s0-1 parent-joint) 0) (logtest? (-> this ragdoll-flags) (ragdoll-flag rf7))) + (set! (-> arg0 root trans quad) (-> s3-1 trans quad)) + ) + (ragdoll-method-13 this arg1 s0-1 s3-1 s2-1) + ) + (let* ((a2-19 s2-1) + (a3-10 s3-1) + (v1-216 (-> a3-10 rvec quad)) + (a0-119 (-> a3-10 uvec quad)) + (a1-47 (-> a3-10 fvec quad)) + (a3-11 (-> a3-10 trans quad)) + ) + (set! (-> a2-19 rvec quad) v1-216) + (set! (-> a2-19 uvec quad) a0-119) + (set! (-> a2-19 fvec quad) a1-47) + (set! (-> a2-19 trans quad) a3-11) + ) + ) + ) + (if (and (< (min (the-as int (-> this num-joints)) (max 2 (the int (* 0.9 (the float (-> this num-joints)))))) + (-> this stable-joints) + ) + (< (cos 18.204445) (-> this rotate-vel w)) + ) + (logior! (-> this ragdoll-flags) (ragdoll-flag rf2)) + ) + ) + (when *debug-segment* + (let ((gp-1 (-> *display* frames (-> *display* on-screen) profile-array data 0))) + (when (and *dproc* *debug-segment*) + (let* ((v1-238 (+ (-> gp-1 depth) -1)) + (s5-1 (-> gp-1 segment v1-238)) + (s4-1 (-> gp-1 base-time)) + ) + (when (>= v1-238 0) + (set! (-> s5-1 end-time) (the-as int (- (timer-count (the-as timer-bank #x10000800)) (the-as uint s4-1)))) + (+! (-> gp-1 depth) -1) + ) + ) + ) + ) + 0 + ) + 0 + (none) + ) + ) + ) + +;; definition for method 16 of type ragdoll +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod ragdoll-setup! ((this ragdoll) (proc process-drawable) (setup ragdoll-setup)) + "Set up this ragdoll with the given [[ragdoll-setup]]." + (set! (-> this num-joints) (the-as uint (min 60 (-> setup joint-setup length)))) + (if (and (< (-> this num-joints) (the-as uint (-> setup joint-setup length))) (zero? (-> this ragdoll-joints))) + (format 0 "ERROR: too many joints in ragdoll setup~%") + ) + (dotimes (v1-7 100) + (set! (-> this ragdoll-joint-remap 0) (the-as uint 255)) + ) + (dotimes (s3-0 (the-as int (-> this num-joints))) + (let ((s2-0 (-> this ragdoll-joints s3-0))) + (let ((v1-15 (-> setup joint-setup s3-0))) + (set! (-> s2-0 joint-type) (-> v1-15 joint-type)) + (set! (-> s2-0 joint-index) (-> v1-15 joint-index)) + (set! (-> s2-0 parent-joint) (-> v1-15 parent-joint)) + (set! (-> s2-0 pre-tform quad) (-> v1-15 pre-tform quad)) + (set! (-> s2-0 geo-tform quad) (-> v1-15 geo-tform quad)) + (set! (-> s2-0 axial-slop) (-> v1-15 axial-slop)) + (set! (-> s2-0 max-angle) (-> v1-15 max-angle)) + (set! (-> s2-0 coll-rad) (-> v1-15 coll-rad)) + (set! (-> s2-0 hit-sound) (-> v1-15 hit-sound)) + ) + (if (< 100 (-> s2-0 joint-index)) + (format 0 "ERROR: ~S joint index in ragdoll setup exceeds max of ~D~%" (-> proc name) 100) + (set! (-> this ragdoll-joint-remap (-> s2-0 joint-index)) (the-as uint s3-0)) + ) + (set! (-> s2-0 parent-index) -1) + (when (and (nonzero? s3-0) (= (-> s2-0 parent-joint) -1)) + (set! (-> s2-0 parent-index) (+ s3-0 -1)) + (+! (-> this ragdoll-joints (+ s3-0 -1) num-children) 1) + ) + (when (and (nonzero? s3-0) (>= (-> s2-0 parent-joint) 0)) + (dotimes (v1-35 (+ s3-0 -1)) + (when (= (-> this ragdoll-joints v1-35 joint-index) (-> s2-0 parent-joint)) + (set! (-> s2-0 parent-index) v1-35) + (+! (-> this ragdoll-joints v1-35 num-children) 1) + (goto cfg-28) + ) + ) + ) + (label cfg-28) + (set! (-> s2-0 num-children) 0) + ) + 0 + ) + (set! (-> this orient-tform quad) (-> setup orient-tform quad)) + (set! (-> this scale quad) (-> setup scale quad)) + (set! (-> this bg-collide-with) (the-as uint (-> setup bg-collide-with))) + (set-vector! (-> this gravity) 0.0 -1.0 0.0 1.0) + (set! (-> this gravity-target quad) (-> this gravity quad)) + (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.75) + (set! (-> this maximum-stretch) 1.5) + (set! (-> this turn-off-start) 0) + (set! (-> this ragdoll-flags) (ragdoll-flag rf0 rf7 rf9)) + (set! (-> this allow-destabilize) (the-as uint 0)) + 0 + (none) + ) + +;; definition for method 15 of type ragdoll-proc +;; 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) (ppointer->process (-> this parent)) arg0 arg1 arg2) + ) + 0 + (none) + ) + +;; definition for method 16 of type ragdoll-proc +;; WARN: Return type mismatch int vs none. +(defmethod disable-for-duration ((this ragdoll-proc) (arg0 time-frame)) + (if (nonzero? (-> this ragdoll)) + (turn-off-for-duration! (-> this ragdoll) arg0) + ) + 0 + (none) + ) + +;; definition for method 17 of type ragdoll-proc +;; 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) (ppointer->process (-> this parent)) arg0) + ) + 0 + (none) + ) + +;; definition for method 18 of type ragdoll-proc +;; 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) (ppointer->process (-> this parent))) + ) + 0 + (none) + ) + +;; definition for method 19 of type ragdoll-proc +;; WARN: Return type mismatch symbol vs none. +(defmethod ragdoll-proc-method-19 ((this ragdoll-proc)) + (if (nonzero? (-> this ragdoll)) + (logtest? (-> this ragdoll ragdoll-flags) (ragdoll-flag rf2)) + #t + ) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (ragdoll-proc) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (when (nonzero? (-> self ragdoll)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-0 #f) + (gp-0 (the-as object (-> block param 1))) + ) + (let ((s2-0 (ppointer->process (-> self parent)))) + (cond + ((and (logtest? (-> (the-as attack-info gp-0) mask) (attack-mask id)) + (= (-> (the-as attack-info gp-0) id) (-> self last-attack-id)) + ) + ) + ((= proc *target*) + (set! (-> s4-0 quad) (-> (the-as process-drawable proc) root trans quad)) + (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? (-> 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 (-> s2-0 root)) + (the-as touching-shapes-entry a3-1) + ) + ) + (set! (-> s4-0 quad) (-> s5-0 quad)) + (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)) + (set! (-> s5-0 quad) (-> (the-as attack-info gp-0) attacker-velocity quad)) + (when (not s3-0) + (vector-! s4-0 (-> self ragdoll ragdoll-joints 0 position) s5-0) + (set! s3-0 #t) + ) + ) + ) + ) + ) + (when s3-0 + (vector-normalize! s5-0 2048.0) + (ragdoll-method-23 (-> self ragdoll) s4-0 s5-0 1.0 #t) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 409.6) + (+! (-> s5-0 y) 1024.0) + (set! (-> self ragdoll ragdoll-joints 0 velocity quad) (-> s5-0 quad)) + (if (logtest? (-> (the-as attack-info gp-0) mask) (attack-mask id)) + (set! (-> self last-attack-id) (-> (the-as attack-info gp-0) id)) + ) + #t + ) + ) + ) + ) + (('notice) + (if (= (-> block param 0) 'die) + (deactivate self) + ) + ) + ) + ) + :trans (behavior () + (+! (-> self clock ref-count) -1) + (+! (-> self parent 0 clock ref-count) 1) + (set! (-> self clock) (-> self parent 0 clock)) + (when (nonzero? (-> self ragdoll)) + (cond + ((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) (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)))) + ) + (deactivate self) + ) + ) + 0 + ) + ) + :code sleep-code + ) + +;; definition for method 10 of type ragdoll-proc +(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) (ppointer->process (-> this parent))) + ) + ((method-of-type process deactivate) this) + (none) + ) + +;; definition for method 7 of type ragdoll-proc +;; WARN: Return type mismatch process vs ragdoll-proc. +(defmethod relocate ((this ragdoll-proc) (offset int)) + (if (nonzero? (-> this ragdoll)) + (&+! (-> this ragdoll) offset) + ) + (the-as ragdoll-proc ((method-of-type process relocate) this offset)) + ) + +;; definition for function ragdoll-proc-init-by-other +(defbehavior ragdoll-proc-init-by-other ragdoll-proc ((arg0 ragdoll-setup)) + (set! (-> self last-attack-id) (the-as uint 0)) + (set! (-> self ragdoll) (new 'process 'ragdoll)) + (if (nonzero? (-> self ragdoll)) + (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 2131e5586c..656bab19ec 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 @@ -16,7 +16,7 @@ (inertial-tensor-box meters 3) ) (:methods - (rigid-body-info-method-9 () none) + (rigid-body-info-method-9 (_type_) none) ) ) @@ -128,7 +128,7 @@ (velocity vector :inline) (impulse float) (pat pat-surface) - (process basic) + (process process) (prim-id uint32) ) ) @@ -155,9 +155,9 @@ (deftype rigid-body-control (basic) ((flags rigid-body-flag) (info rigid-body-info) - (force-callback basic) + (force-callback (function rigid-body-object float none)) (process process) - (blocked-by basic) + (blocked-by process-focusable) (time-remaining float) (step-count int16) (linear-damping float) @@ -177,32 +177,32 @@ (inv-i-world matrix :inline) ) (:methods - (new (symbol type) _type_) - (rigid-body-control-method-9 () none) - (rigid-body-control-method-10 () none) - (rigid-body-control-method-11 () none) - (rigid-body-control-method-12 () none) - (rigid-body-control-method-13 () none) - (rigid-body-control-method-14 () none) - (rigid-body-control-method-15 () none) - (rigid-body-control-method-16 () none) - (rigid-body-control-method-17 () none) - (rigid-body-control-method-18 () none) - (rigid-body-control-method-19 () none) - (rigid-body-control-method-20 () none) - (rigid-body-control-method-21 () none) - (rigid-body-control-method-22 () none) - (rigid-body-control-method-23 () none) - (rigid-body-control-method-24 () none) - (rigid-body-control-method-25 () none) - (rigid-body-control-method-26 () none) - (rigid-body-control-method-27 () none) - (rigid-body-control-method-28 () none) - (rigid-body-control-method-29 () none) - (rigid-body-control-method-30 () none) - (rigid-body-control-method-31 () none) - (rigid-body-control-method-32 () none) - (rigid-body-control-method-33 () none) + (new (symbol type process) _type_) + (rigid-body-control-method-9 (_type_ collide-shape-moving float) none) + (rigid-body-control-method-10 (_type_ rigid-body-object float float) object) + (update-rbody-transform! (_type_ collide-shape-moving) none) + (rigid-body-control-method-12 (_type_ float) none) + (init-velocities! (_type_) none) + (rigid-body-control-method-14 (_type_ float) none) + (rigid-body-control-method-15 (_type_) none) + (reset-force-and-torque! (_type_) none) + (reset-momentum! (_type_) none) + (apply-impact! (_type_ vector vector) none) + (rigid-body-control-method-19 (_type_ vector vector) none) + (add-force! (_type_ vector) none) + (rigid-body-control-method-21 (_type_ vector vector float) none) + (rigid-body-control-method-22 (_type_ vector vector) none) + (rigid-body-control-method-23 (_type_ vector vector) none) + (rigid-body-control-method-24 (_type_ vector vector) none) + (rigid-body-control-method-25 (_type_ vector) none) + (rigid-body-control-method-26 (_type_) none) + (init! (_type_ rigid-body-info vector quaternion (function rigid-body-object float)) none) + (rigid-body-control-method-28 (_type_ vector quaternion) none) + (debug-print-info (_type_ object) none) + (debug-print-force-torque (_type_ object) none) + (debug-print-pos-rot (_type_ object) none) + (debug-print-momentum (_type_ object) none) + (debug-print-velocity (_type_ object) none) ) ) @@ -262,44 +262,47 @@ ;; 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 + active + ) (:methods - (rigid-body-object-method-28 () none) - (rigid-body-object-method-29 () none) - (rigid-body-object-method-30 () none) - (rigid-body-object-method-31 () none) - (rigid-body-object-method-32 () none) - (rigid-body-object-method-33 () none) - (rigid-body-object-method-34 () none) - (rigid-body-object-method-35 () none) - (rigid-body-object-method-36 () none) - (rigid-body-object-method-37 () none) - (rigid-body-object-method-38 () none) - (rigid-body-object-method-39 () none) - (rigid-body-object-method-40 () none) - (rigid-body-object-method-41 () none) - (rigid-body-object-method-42 () none) - (rigid-body-object-method-43 () none) - (rigid-body-object-method-44 () none) - (rigid-body-object-method-45 () none) - (rigid-body-object-method-46 () none) - (rigid-body-object-method-47 () none) - (rigid-body-object-method-48 () none) - (rigid-body-object-method-49 () none) - (rigid-body-object-method-50 () none) - (rigid-body-object-method-51 () none) - (rigid-body-object-method-52 () none) - (rigid-body-object-method-53 () none) - (rigid-body-object-method-54 () none) - (rigid-body-object-method-55 () none) + (rigid-body-object-method-30 (_type_) none) + (apply-gravity! (_type_ float) none) + (rigid-body-object-method-32 (_type_) none) + (alloc-rbody-control! (_type_ rigid-body-object-constants) none) + (init-collision! (_type_) none) + (init-rbody-control! (_type_) none) + (go-idle (_type_) object) + (rigid-body-object-method-37 (_type_) none) + (rigid-body-object-method-38 (_type_) none) + (rbody-post (_type_) none) + (apply-momentum! (_type_) none) + (disable-physics! (_type_) none) + (rigid-body-object-method-42 (_type_) none) + (rigid-body-object-method-43 (_type_) none) + (impulse-handler (_type_) none) + (go-active (_type_) object) + (apply-damage (_type_ float rigid-body-impact) none) + (impulse-force<-penetrate (_type_ rigid-body-impact attack-info penetrate) none) + (on-impact (_type_ rigid-body-impact) none) + (rbody-event-handler (_type_ process int symbol event-message-block) object) + (attack-handler (_type_ process-drawable attack-info touching-shapes-entry penetrate) symbol) + (touch-handler (_type_ process-focusable touching-shapes-entry) symbol) + (init-rbody-impact-from-tshape! (_type_ rigid-body-impact touching-shapes-entry) none) + (rigid-body-object-method-53 (_type_ float) none) + (rigid-body-object-method-54 (_type_) none) + (clear-impulse-force-flag! (_type_) none) ) ) @@ -357,18 +360,18 @@ ;; definition of type rigid-body-queue (deftype rigid-body-queue (structure) ((count int8) - (manager uint64) + (manager handle) (array handle 128) ) (:methods - (rigid-body-queue-method-9 () none) - (rigid-body-queue-method-10 () none) - (rigid-body-queue-method-11 () none) - (rigid-body-queue-method-12 () none) - (rigid-body-queue-method-13 () none) - (rigid-body-queue-method-14 () none) - (rigid-body-queue-method-15 () none) - (rigid-body-queue-method-16 () none) + (init-queue! (_type_ process) none) + (rigid-body-queue-method-10 (_type_) none) + (rigid-body-queue-method-11 (_type_ process) none) + (rigid-body-queue-method-12 (_type_ int int) none) + (rigid-body-queue-method-13 (_type_ int process) none) + (rigid-body-queue-method-14 (_type_ int) none) + (rigid-body-queue-method-15 (_type_ process) none) + (rigid-body-queue-method-16 (_type_) none) ) ) @@ -388,7 +391,3 @@ ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/engine/physics/rigid-body-queue_REF.gc b/test/decompiler/reference/jak3/engine/physics/rigid-body-queue_REF.gc new file mode 100644 index 0000000000..f9c5d308bf --- /dev/null +++ b/test/decompiler/reference/jak3/engine/physics/rigid-body-queue_REF.gc @@ -0,0 +1,344 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *rigid-body-queue-manager*, type rigid-body-queue-manager +(define *rigid-body-queue-manager* (the-as rigid-body-queue-manager #f)) + +;; definition for method 9 of type rigid-body-queue +;; WARN: Return type mismatch int vs none. +(defmethod init-queue! ((this rigid-body-queue) (arg0 process)) + (set! (-> this count) 0) + (set! (-> this manager) (process->handle arg0)) + (dotimes (v1-3 128) + (set! (-> this array v1-3) (the-as handle #f)) + ) + 0 + (none) + ) + +;; definition for method 16 of type rigid-body-queue +;; WARN: Return type mismatch symbol vs none. +(defmethod rigid-body-queue-method-16 ((this rigid-body-queue)) + (let ((gp-0 0)) + (dotimes (v1-0 (-> this count)) + (let ((a1-2 (-> this array v1-0)) + (a2-0 (+ v1-0 1)) + ) + (while (< a2-0 (-> this count)) + (if (= a1-2 (-> this array a2-0)) + (+! gp-0 1) + ) + (+! a2-0 1) + ) + ) + ) + (if (> gp-0 0) + (format 0 "rigid-body-queue::validate: duplicate count ~d~%" gp-0) + ) + (zero? gp-0) + ) + (none) + ) + +;; definition for method 10 of type rigid-body-queue +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-queue-method-10 ((this rigid-body-queue)) + (with-pp + (let ((f0-0 (seconds-per-frame))) + (countdown (v1-1 (-> this count)) + (let ((a0-4 (handle->process (-> this array v1-1)))) + (cond + (a0-4 + (let ((a0-6 (-> (the-as process-focusable a0-4) rbody))) + (set! (-> a0-6 time-remaining) f0-0) + (set! (-> a0-6 blocked-by) #f) + (set! (-> a0-6 step-count) 0) + (logclear! (-> a0-6 flags) (rigid-body-flag blocker)) + ) + ) + (else + ) + ) + ) + ) + ) + (let ((s5-0 0)) + (let ((s4-0 (-> *kernel-context* prevent-from-run))) + (b! #t cfg-37 :delay (nop!)) + (label cfg-11) + (let ((s3-0 (handle->process (-> this array s5-0)))) + (when s3-0 + (let ((s2-0 (-> (the-as process-focusable s3-0) rbody))) + (when (and (logtest? (-> s2-0 flags) (rigid-body-flag enable-physics)) + (not (logtest? s4-0 (-> s3-0 mask))) + (and (< 0.001 (-> s2-0 time-remaining)) (< (-> s2-0 step-count) 4)) + ) + (let ((s1-0 pp)) + (set! pp s3-0) + (rigid-body-object-method-54 (the-as rigid-body-object s3-0)) + (set! pp s1-0) + ) + (+! (-> s2-0 step-count) 1) + (let ((a2-2 (-> s2-0 blocked-by))) + (when a2-2 + (when #t + (logior! (-> a2-2 rbody flags) (rigid-body-flag blocker)) + (rigid-body-queue-method-13 this s5-0 a2-2) + (let ((v1-34 (process->handle s3-0))) + (b! (!= (-> this array s5-0) v1-34) cfg-11 :delay (nop!)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (+! s5-0 1) + (label cfg-37) + (b! (< s5-0 (-> this count)) cfg-11) + ) + (let ((s5-1 (-> *kernel-context* prevent-from-run))) + (dotimes (s4-1 (-> this count)) + (let ((a0-20 (handle->process (-> this array s4-1)))) + (when (and a0-20 + (logtest? (-> (the-as process-focusable a0-20) rbody flags) (rigid-body-flag enable-physics)) + (not (logtest? s5-1 (-> a0-20 mask))) + ) + (let ((s3-1 pp)) + (set! pp a0-20) + (clear-impulse-force-flag! (the-as rigid-body-object a0-20)) + (set! pp s3-1) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 11 of type rigid-body-queue +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-queue-method-11 ((this rigid-body-queue) (arg0 process)) + (let ((v1-0 -1)) + (let ((a2-0 0)) + (b! #t cfg-9 :delay (nop!)) + (label cfg-1) + (b! (handle->process (-> this array a2-0)) cfg-8 :delay (empty-form)) + (set! v1-0 a2-0) + (b! #t cfg-11 :delay (nop!)) + (label cfg-8) + (+! a2-0 1) + (label cfg-9) + (b! (< a2-0 (-> this count)) cfg-1) + ) + (label cfg-11) + (cond + ((!= v1-0 -1) + (set! (-> this array v1-0) (process->handle arg0)) + ) + (else + (when (< (-> this count) 128) + (set! (-> this array (-> this count)) (process->handle arg0)) + (+! (-> this count) 1) + ) + ) + ) + ) + 0 + 0 + (none) + ) + +;; definition for method 12 of type rigid-body-queue +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-queue-method-12 ((this rigid-body-queue) (arg0 int) (arg1 int)) + (when (< arg0 arg1) + (let ((v1-1 arg1) + (a3-0 (+ arg1 -1)) + (a2-3 (-> this array arg1)) + ) + (while (>= a3-0 arg0) + (set! (-> this array v1-1) (-> this array a3-0)) + (+! a3-0 -1) + (+! v1-1 -1) + ) + (set! (-> this array arg0) a2-3) + ) + ) + 0 + (none) + ) + +;; definition for method 13 of type rigid-body-queue +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-queue-method-13 ((this rigid-body-queue) (arg0 int) (arg1 process)) + (let ((v1-2 (process->handle arg1)) + (a2-4 (+ arg0 1)) + ) + (b! #t cfg-9 :delay (nop!)) + (label cfg-6) + (b! (!= (-> this array a2-4) v1-2) cfg-8 :delay (empty-form)) + (rigid-body-queue-method-12 this arg0 a2-4) + (b! #t cfg-11 :delay (nop!)) + (label cfg-8) + (+! a2-4 1) + (label cfg-9) + (b! (< a2-4 (-> this count)) cfg-6) + ) + (label cfg-11) + 0 + 0 + (none) + ) + +;; definition for method 14 of type rigid-body-queue +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-queue-method-14 ((this rigid-body-queue) (arg0 int)) + (let ((v1-0 arg0) + (a1-1 (+ arg0 1)) + ) + (while (< a1-1 (-> this count)) + (set! (-> this array v1-0) (-> this array a1-1)) + (+! a1-1 1) + (+! v1-0 1) + ) + ) + (+! (-> this count) -1) + 0 + (none) + ) + +;; definition for method 15 of type rigid-body-queue +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-queue-method-15 ((this rigid-body-queue) (arg0 process)) + (let ((v1-2 (process->handle arg0)) + (a1-4 0) + ) + (b! #t cfg-9 :delay (nop!)) + (label cfg-6) + (b! (!= (-> this array a1-4) v1-2) cfg-8 :delay (empty-form)) + (rigid-body-queue-method-14 this a1-4) + (b! #t cfg-11 :delay (nop!)) + (label cfg-8) + (+! a1-4 1) + (label cfg-9) + (b! (< a1-4 (-> this count)) cfg-6) + ) + (label cfg-11) + 0 + 0 + (none) + ) + +;; definition of type rigid-body-queue-manager +(deftype rigid-body-queue-manager (process) + ((queue rigid-body-queue) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type rigid-body-queue-manager +(defmethod inspect ((this rigid-body-queue-manager)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Tqueue: #~%" (-> this queue)) + (label cfg-4) + this + ) + +;; definition for method 10 of type rigid-body-queue-manager +(defmethod deactivate ((this rigid-body-queue-manager)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set! *rigid-body-queue-manager* #f) + ((method-of-type process deactivate) this) + (none) + ) + +;; definition for method 7 of type rigid-body-queue-manager +;; WARN: Return type mismatch process vs rigid-body-queue-manager. +(defmethod relocate ((this rigid-body-queue-manager) (offset int)) + (set! *rigid-body-queue-manager* this) + (if *rigid-body-queue-manager* + (set! *rigid-body-queue-manager* (&+ *rigid-body-queue-manager* offset)) + ) + (the-as rigid-body-queue-manager ((method-of-type process relocate) this offset)) + ) + +;; failed to figure out what this is: +(defstate idle (rigid-body-queue-manager) + :virtual #t + :exit (behavior () + (set! (-> self queue count) 0) + 0 + ) + :code sleep-code + :post (behavior () + (local-vars (a0-3 int) (a0-5 int)) + (let* ((v1-1 (-> *perf-stats* data 17)) + (a0-0 (-> v1-1 ctrl)) + ) + (+! (-> v1-1 count) 1) + (b! (zero? a0-0) cfg-2 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-0) + ) + (.sync.l) + (.sync.p) + (label cfg-2) + 0 + (rigid-body-queue-method-10 (-> self queue)) + (let ((v1-6 (-> *perf-stats* data 17))) + (b! (zero? (-> v1-6 ctrl)) cfg-4 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-3 pcr0) + (+! (-> v1-6 accum0) a0-3) + (.mfpc a0-5 pcr1) + (+! (-> v1-6 accum1) a0-5) + ) + (label cfg-4) + 0 + ) + ) + +;; definition for function rigid-body-queue-manager-init-by-other +(defbehavior rigid-body-queue-manager-init-by-other rigid-body-queue-manager ((arg0 rigid-body-queue)) + (stack-size-set! (-> self main-thread) 128) + (set! (-> self queue) arg0) + (init-queue! (-> self queue) self) + (go-virtual idle) + ) + +;; definition for function rigid-body-queue-manager-spawn +(defun rigid-body-queue-manager-spawn ((arg0 rigid-body-queue) (arg1 process-tree)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn rigid-body-queue-manager arg0 :name "rigid-body-queue-manager" :to arg1))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + gp-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 new file mode 100644 index 0000000000..60597c39b0 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/physics/rigid-body_REF.gc @@ -0,0 +1,1580 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type rigid-body-work +(deftype rigid-body-work (structure) + ((max-ang-momentum float) + (max-ang-velocity float) + ) + ) + +;; definition for method 3 of type rigid-body-work +(defmethod inspect ((this rigid-body-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'rigid-body-work) + (format #t "~1Tmax-ang-momentum: ~f~%" (-> this max-ang-momentum)) + (format #t "~1Tmax-ang-velocity: ~f~%" (-> this max-ang-velocity)) + (label cfg-4) + this + ) + +;; definition for symbol *rigid-body-work*, type rigid-body-work +(define *rigid-body-work* (new 'static 'rigid-body-work)) + +;; definition for method 0 of type rigid-body-control +(defmethod new rigid-body-control ((allocation symbol) (type-to-make type) (arg0 process)) + (let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size))))) + (set! (-> v0-0 process) arg0) + v0-0 + ) + ) + +;; definition for method 7 of type rigid-body-control +(defmethod relocate ((this rigid-body-control) (offset int)) + (&+! (-> this process) offset) + this + ) + +;; definition for method 9 of type rigid-body-info +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-info-method-9 ((this rigid-body-info)) + (let ((f24-0 (-> this mass)) + (f28-0 (-> this inertial-tensor-box 0)) + (f30-0 (-> this inertial-tensor-box 1)) + (f26-0 (-> this inertial-tensor-box 2)) + ) + (let ((f0-0 f24-0)) + (set! (-> this inv-mass) (/ 1.0 f0-0)) + ) + (matrix-identity! (-> this inertial-tensor)) + (matrix-identity! (-> this inv-inertial-tensor)) + (let ((f0-4 (* 0.083333336 f24-0))) + (let* ((f1-1 f30-0) + (f1-3 (* f1-1 f1-1)) + (f2-0 f26-0) + ) + (set! (-> this inertial-tensor rvec x) (* f0-4 (+ f1-3 (* f2-0 f2-0)))) + ) + (let ((f1-6 f28-0)) + (set! (-> this inertial-tensor uvec y) (* f0-4 (+ (* f1-6 f1-6) (* f26-0 f26-0)))) + ) + (set! (-> this inertial-tensor fvec z) (* f0-4 (+ (* f28-0 f28-0) (* f30-0 f30-0)))) + ) + ) + (let ((f0-6 (-> this inertial-tensor rvec x))) + (set! (-> this inv-inertial-tensor rvec x) (/ 1.0 f0-6)) + ) + (let ((f0-9 (-> this inertial-tensor uvec y))) + (set! (-> this inv-inertial-tensor uvec y) (/ 1.0 f0-9)) + ) + (let ((f0-12 (-> this inertial-tensor fvec z))) + (set! (-> this inv-inertial-tensor fvec z) (/ 1.0 f0-12)) + ) + 0 + (none) + ) + +;; definition for method 16 of type rigid-body-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod reset-force-and-torque! ((this rigid-body-control)) + (set! (-> this force quad) (the-as uint128 0)) + (set! (-> this torque quad) (the-as uint128 0)) + 0 + (none) + ) + +;; definition for method 17 of type rigid-body-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod reset-momentum! ((this rigid-body-control)) + (set! (-> this lin-momentum quad) (the-as uint128 0)) + (set! (-> this ang-momentum quad) (the-as uint128 0)) + 0 + (none) + ) + +;; definition for method 26 of type rigid-body-control +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-control-method-26 ((this rigid-body-control)) + (when #t + (quaternion->matrix (-> this matrix) (the-as quaternion (-> this rot))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-rotate*! s5-0 (-> this info cm-offset-joint) (-> this matrix)) + (vector-! (-> this matrix trans) (-> this position) s5-0) + ) + ) + 0 + (none) + ) + +;; definition for method 28 of type rigid-body-control +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-control-method-28 ((this rigid-body-control) (arg0 vector) (arg1 quaternion)) + (let ((s3-0 (new 'stack-no-clear 'rigid-body-impact))) + (quaternion->matrix (the-as matrix (-> s3-0 normal)) arg1) + (vector-rotate*! (-> s3-0 point) (-> this info cm-offset-joint) (the-as matrix (-> s3-0 normal))) + (vector+! (-> this position) arg0 (-> s3-0 point)) + ) + (quaternion-copy! (the-as quaternion (-> this rot)) arg1) + (quaternion-normalize! (the-as quaternion (-> this rot))) + (rigid-body-control-method-26 this) + 0 + (none) + ) + +;; definition for method 27 of type rigid-body-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init! ((this rigid-body-control) + (arg0 rigid-body-info) + (arg1 vector) + (arg2 quaternion) + (arg3 (function rigid-body-object float)) + ) + (set! (-> this info) arg0) + (set! (-> this force-callback) (the-as (function rigid-body-object float none) arg3)) + (rigid-body-info-method-9 (-> this info)) + (let ((v1-2 this)) + (set! (-> v1-2 force quad) (the-as uint128 0)) + (set! (-> v1-2 torque quad) (the-as uint128 0)) + ) + 0 + (reset-momentum! this) + (rigid-body-control-method-28 this arg1 arg2) + (init-velocities! this) + (set! (-> this linear-damping) (-> arg0 linear-damping)) + (set! (-> this angular-damping) (-> arg0 angular-damping)) + (set! (-> this friction-factor) (-> arg0 friction-factor)) + (set! (-> this bounce-factor) (-> arg0 bounce-factor)) + 0 + (none) + ) + +;; definition for method 23 of type rigid-body-control +;; WARN: Return type mismatch vector vs none. +(defmethod rigid-body-control-method-23 ((this rigid-body-control) (arg0 vector) (arg1 vector)) + (let ((v1-0 (new 'stack-no-clear 'inline-array 'vector 2))) + (vector-! (-> v1-0 0) arg0 (-> this position)) + (vector-cross! (-> v1-0 1) (-> this ang-velocity) (-> v1-0 0)) + (vector+! arg1 (-> v1-0 1) (-> this lin-velocity)) + ) + (none) + ) + +;; definition for method 24 of type rigid-body-control +;; WARN: Return type mismatch vector vs none. +(defmethod rigid-body-control-method-24 ((this rigid-body-control) (arg0 vector) (arg1 vector)) + (local-vars (t0-5 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((v1-0 (new 'stack-no-clear 'inline-array 'vector 2))) + (vector-! (-> v1-0 0) arg0 (-> this position)) + (vector-cross! (-> v1-0 1) (-> this torque) (-> v1-0 0)) + (let ((a1-2 (-> v1-0 1)) + (a3-3 (-> v1-0 1)) + (f0-0 1.0) + ) + (.lvf vf1 (&-> (-> v1-0 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 t0-5 vf1) + (vector-float*! a1-2 a3-3 (/ f0-0 t0-5)) + ) + (vector+! arg1 (-> v1-0 1) (-> this force)) + ) + (none) + ) + ) + +;; definition for function matrix-3x3-triple-transpose-product +;; INFO: Used lq/sq +(defun matrix-3x3-triple-transpose-product ((arg0 matrix) (arg1 matrix) (arg2 matrix)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'matrix 3))) + (let* ((v1-0 (-> s5-0 0)) + (a3-0 arg1) + (a0-1 (-> a3-0 rvec quad)) + (a1-1 (-> a3-0 uvec quad)) + (a2-1 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-0 rvec quad) a0-1) + (set! (-> v1-0 uvec quad) a1-1) + (set! (-> v1-0 fvec quad) a2-1) + (set! (-> v1-0 trans quad) a3-1) + ) + (vector-reset! (-> s5-0 0 trans)) + (matrix-transpose! (-> s5-0 1) (-> s5-0 0)) + (matrix*! (-> s5-0 2) arg2 (-> s5-0 0)) + (matrix*! arg0 (-> s5-0 1) (-> s5-0 2)) + ) + arg0 + ) + +;; definition for method 12 of type rigid-body-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-control-method-12 ((this rigid-body-control) (arg0 float)) + (local-vars (v1-6 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 ((a2-0 (-> this lin-momentum))) + (let ((v1-0 (-> this lin-momentum))) + (let ((a0-1 (-> this force))) + (let ((a3-0 arg0)) + (.mov vf7 a3-0) + ) + (.lvf vf5 (&-> a0-1 quad)) + ) + (.lvf vf4 (&-> v1-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 (&-> a2-0 quad) vf6) + ) + (let ((a2-1 (-> this ang-momentum))) + (let ((v1-1 (-> this ang-momentum))) + (let ((a0-2 (-> this torque))) + (let ((a1-1 arg0)) + (.mov vf7 a1-1) + ) + (.lvf vf5 (&-> a0-2 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 (&-> a2-1 quad) vf6) + ) + (let* ((f0-3 (* 500000000.0 (-> this info mass))) + (f1-1 f0-3) + (f1-3 (* f1-1 f1-1)) + ) + (.lvf vf1 (&-> (-> this ang-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-6 vf1) + (if (< f1-3 v1-6) + (vector-normalize! (-> this ang-momentum) f0-3) + ) + ) + (set! (-> this force quad) (the-as uint128 0)) + (set! (-> this torque quad) (the-as uint128 0)) + 0 + 0 + (none) + ) + ) + +;; definition for method 13 of type rigid-body-control +;; WARN: Return type mismatch int vs none. +(defmethod init-velocities! ((this rigid-body-control)) + (let ((v1-0 (-> this info))) + (vector-float*! (-> this lin-velocity) (-> this lin-momentum) (-> v1-0 inv-mass)) + (matrix-3x3-triple-transpose-product (-> this inv-i-world) (-> this matrix) (-> v1-0 inv-inertial-tensor)) + ) + (vector-rotate*! (-> this ang-velocity) (-> this ang-momentum) (-> this inv-i-world)) + 0 + (none) + ) + +;; definition for method 14 of type rigid-body-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-control-method-14 ((this rigid-body-control) (arg0 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((a1-1 (-> this position))) + (let ((v1-0 (-> this position))) + (let ((a0-1 (-> this lin-velocity))) + (let ((a2-0 arg0)) + (.mov vf7 a2-0) + ) + (.lvf vf5 (&-> a0-1 quad)) + ) + (.lvf vf4 (&-> v1-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 (&-> a1-1 quad) vf6) + ) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (set! (-> (the-as vector (&-> s4-0 x)) quad) (-> this ang-velocity quad)) + (set! (-> s4-0 w) 0.0) + (quaternion*! s4-0 s4-0 (the-as quaternion (-> this rot))) + (quaternion-float*! s4-0 s4-0 0.5) + (+! (-> this rot x) (* (-> s4-0 x) arg0)) + (+! (-> this rot y) (* (-> s4-0 y) arg0)) + (+! (-> this rot z) (* (-> s4-0 z) arg0)) + (+! (-> this rot w) (* (-> s4-0 w) arg0)) + ) + (quaternion-normalize! (the-as quaternion (-> this rot))) + (rigid-body-control-method-26 this) + 0 + (none) + ) + ) + +;; definition for function damping-time-adjust +(defun damping-time-adjust ((arg0 float) (arg1 float)) + (let ((f0-0 0.0) + (f1-0 1.0) + (f2-2 (* -1.0 (- 1.0 arg0) arg1)) + (f3-3 0.016666668) + ) + (fmax f0-0 (+ f1-0 (* f2-2 (/ 1.0 f3-3)))) + ) + ) + +;; definition for method 9 of type rigid-body-control +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-control-method-9 ((this rigid-body-control) (arg0 collide-shape-moving) (arg1 float)) + (rigid-body-control-method-12 this arg1) + (-> this info) + (let* ((v1-3 (-> this lin-momentum)) + (a0-2 (-> this lin-momentum)) + (f3-0 (-> this linear-damping)) + (f2-0 arg1) + (f0-0 0.0) + (f1-0 1.0) + (f2-1 (* -1.0 (- 1.0 f3-0) f2-0)) + (f3-3 0.016666668) + ) + (vector-float*! v1-3 a0-2 (fmax f0-0 (+ f1-0 (* f2-1 (/ 1.0 f3-3))))) + ) + (let* ((v1-5 (-> this ang-momentum)) + (a0-3 (-> this ang-momentum)) + (f3-6 (-> this angular-damping)) + (f2-3 arg1) + (f0-3 0.0) + (f1-2 1.0) + (f2-4 (* -1.0 (- 1.0 f3-6) f2-3)) + (f3-9 0.016666668) + ) + (vector-float*! v1-5 a0-3 (fmax f0-3 (+ f1-2 (* f2-4 (/ 1.0 f3-9))))) + ) + (init-velocities! this) + (if (logtest? (-> this flags) (rigid-body-flag enable-collision)) + (rbody-collision arg0 this arg1) + (rigid-body-control-method-14 this arg1) + ) + 0 + (none) + ) + +;; definition for method 67 of type collide-shape-moving +;; WARN: Return type mismatch int vs none. +(defmethod collide-with-all-collide-cache-prims ((this collide-shape-moving) (arg0 matrix) (arg1 collide-query)) + (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) + (vf7 :class vf) + (vf8 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 *collide-cache*) + (s3-0 (-> this root-prim)) + (s2-0 1) + ) + (when (zero? (-> s3-0 prim-core prim-type)) + (let ((v1-2 s3-0)) + (set! s3-0 (-> (the-as collide-shape-prim-group v1-2) child 0)) + (set! s2-0 (the-as int (-> v1-2 specific 0))) + ) + ) + (b! #t cfg-13 :delay (nop!)) + (label cfg-3) + (+! s2-0 -1) + (let ((v1-4 -1)) + (b! (!= (-> s3-0 prim-core prim-type) v1-4) cfg-12 :delay (nop!)) + ) + (.lvf vf5 (&-> s3-0 local-sphere quad)) + (.lvf vf1 (&-> arg0 rvec quad)) + (.lvf vf2 (&-> arg0 uvec quad)) + (.lvf vf3 (&-> arg0 fvec quad)) + (.lvf vf4 (&-> arg0 trans quad)) + (.lvf vf6 (&-> s3-0 prim-core world-sphere 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 vf7 vf4 vf0 acc :mask #b111) + (.sub.vf vf8 vf7 vf6 :mask #b111) + (.svf (&-> arg1 move-dist quad) vf8) + (let ((s1-0 (the-as collide-cache-prim (-> s4-0 prims)))) + (countdown (s0-0 (-> s4-0 num-prims)) + (when (logtest? (-> s3-0 prim-core collide-with) (-> s1-0 prim-core collide-as)) + (if (>= (-> s1-0 prim-core prim-type) 0) + (collide-with-collide-cache-prim-mesh s3-0 arg1 s1-0) + (collide-with-collide-cache-prim-sphere s3-0 arg1 s1-0) + ) + ) + (&+! s1-0 48) + ) + ) + (label cfg-12) + (&+! s3-0 80) + (label cfg-13) + (b! (nonzero? s2-0) cfg-3 :delay (nop!)) + ) + 0 + (none) + ) + ) + +;; definition for function transform-rigid-body-prims +(defun transform-rigid-body-prims ((arg0 collide-shape-prim) (arg1 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) + (let ((v1-0 arg0) + (a0-1 1) + ) + (when (zero? (-> v1-0 prim-core prim-type)) + (let ((a0-2 (the-as collide-shape-prim-group v1-0))) + (set! v1-0 (-> a0-2 child 0)) + (set! a0-1 (the-as int (-> a0-2 num-children))) + ) + ) + (while (nonzero? a0-1) + (+! a0-1 -1) + (.lvf vf5 (&-> v1-0 local-sphere quad)) + (.lvf vf1 (&-> arg1 rvec quad)) + (.lvf vf2 (&-> arg1 uvec quad)) + (.lvf vf3 (&-> arg1 fvec quad)) + (.lvf vf4 (&-> arg1 trans 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 :mask #b111) + (.svf (&-> v1-0 prim-core world-sphere quad) vf5) + (&+! v1-0 80) + ) + ) + #f + ) + ) + +;; definition of type rigid-body-move-work +(deftype rigid-body-move-work (structure) + ((cquery collide-query :inline) + (best-dist float :overlay-at (-> cquery best-u)) + (mat matrix :inline) + (impact-info rigid-body-impact :inline) + (impact-info2 rigid-body-impact :inline) + (orig-position vector :inline) + (orig-rotation quaternion :inline) + (force vector :inline) + (vel vector :inline) + (p-body vector :inline) + (tmp vector :inline) + (tangent-dir vector :inline) + (proc2 process-focusable) + (rbody2 rigid-body-control) + (vel-dot-norm float) + (denom float) + (denom2 float) + (time-step float) + (time-step-scale float) + (step-count int8) + ) + ) + +;; definition for method 3 of type rigid-body-move-work +(defmethod inspect ((this rigid-body-move-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'rigid-body-move-work) + (format #t "~1Tcquery: #~%" (-> this cquery)) + (format #t "~1Tmat: #~%" (-> this mat)) + (format #t "~1Timpact-info: #~%" (-> this impact-info)) + (format #t "~1Timpact-info2: #~%" (-> this impact-info2)) + (format #t "~1Torig-position: #~%" (-> this orig-position)) + (format #t "~1Torig-rotation: #~%" (-> this orig-rotation)) + (format #t "~1Tforce: #~%" (-> this force)) + (format #t "~1Tvel: #~%" (-> this vel)) + (format #t "~1Tp-body: #~%" (-> this p-body)) + (format #t "~1Ttmp: #~%" (-> this tmp)) + (format #t "~1Ttangent-dir: #~%" (-> this tangent-dir)) + (format #t "~1Tproc2: ~A~%" (-> this proc2)) + (format #t "~1Trbody2: ~A~%" (-> this rbody2)) + (format #t "~1Tvel-dot-norm: ~f~%" (-> this vel-dot-norm)) + (format #t "~1Tdenom: ~f~%" (-> this denom)) + (format #t "~1Tdenom2: ~f~%" (-> this denom2)) + (format #t "~1Ttime-step: ~f~%" (-> this time-step)) + (format #t "~1Ttime-step-scale: ~f~%" (-> this time-step-scale)) + (format #t "~1Tstep-count: ~D~%" (-> this step-count)) + (label cfg-4) + this + ) + +;; definition for method 63 of type collide-shape-moving +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod rbody-collision ((this collide-shape-moving) (arg0 rigid-body-control) (arg1 float)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf6 :class vf) + (vf7 :class vf) + (vf8 :class vf) + (vf9 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'rigid-body-move-work))) + (set! (-> s5-0 time-step) arg1) + (set! (-> s5-0 time-step-scale) 1.0) + (set! (-> s5-0 step-count) 0) + (until (not (and (< 0.05 (-> s5-0 time-step-scale)) (< (-> s5-0 step-count) (the-as int (-> this max-iteration-count)))) + ) + (set! (-> s5-0 cquery best-dist) -100000000.0) + (set! (-> s5-0 cquery best-my-prim) #f) + (set! (-> s5-0 cquery best-other-prim) #f) + (set! (-> s5-0 orig-position quad) (-> arg0 position quad)) + (quaternion-copy! (-> s5-0 orig-rotation) (the-as quaternion (-> arg0 rot))) + (rigid-body-control-method-14 arg0 (* (-> s5-0 time-step-scale) (-> s5-0 time-step))) + (mem-copy! (the-as pointer (-> s5-0 mat)) (the-as pointer (-> arg0 matrix)) 64) + (set! (-> arg0 position quad) (-> s5-0 orig-position quad)) + (quaternion-copy! (the-as quaternion (-> arg0 rot)) (-> s5-0 orig-rotation)) + (rigid-body-control-method-26 arg0) + (transform-rigid-body-prims (-> this root-prim) (-> arg0 matrix)) + (collide-with-all-collide-cache-prims this (-> s5-0 mat) (-> s5-0 cquery)) + (let ((f30-0 (-> s5-0 cquery best-dist))) + (b! (>= f30-0 0.0) cfg-3 :delay #f) + (rigid-body-control-method-14 arg0 (* (-> s5-0 time-step-scale) (-> s5-0 time-step))) + (init-velocities! arg0) + (transform-rigid-body-prims (-> this root-prim) (-> arg0 matrix)) + (set! (-> s5-0 time-step-scale) 0.0) + (b! #t cfg-55 :delay (nop!)) + (label cfg-3) + (update-from-step-size *touching-list* f30-0) + (rigid-body-control-method-14 arg0 (* (-> s5-0 time-step-scale) (-> s5-0 time-step) f30-0)) + ) + (init-velocities! arg0) + (transform-rigid-body-prims (-> this root-prim) (-> arg0 matrix)) + (let* ((a2-3 (-> s5-0 mat)) + (a3-0 (-> arg0 matrix)) + (v1-21 (-> a3-0 rvec quad)) + (a0-19 (-> a3-0 uvec quad)) + (a1-12 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> a2-3 rvec quad) v1-21) + (set! (-> a2-3 uvec quad) a0-19) + (set! (-> a2-3 fvec quad) a1-12) + (set! (-> a2-3 trans quad) a3-1) + ) + (set! (-> s5-0 rbody2) #f) + (set! (-> s5-0 proc2) #f) + (when (-> s5-0 cquery best-other-prim) + (set! (-> s5-0 proc2) (the-as process-focusable (-> s5-0 cquery best-other-prim cshape process))) + (let ((v1-28 (-> s5-0 proc2 rbody))) + (when (nonzero? v1-28) + (set! (-> s5-0 rbody2) v1-28) + (cond + ((logtest? (-> v1-28 flags) (rigid-body-flag active)) + (if (not (logtest? (-> v1-28 flags) (rigid-body-flag enable-physics))) + (send-event (-> s5-0 proc2) 'enable-physics) + ) + ) + (else + (set! (-> s5-0 rbody2) #f) + ) + ) + ) + ) + ) + (let ((v1-33 (-> s5-0 cquery best-my-prim))) + (.lvf vf7 (&-> (-> s5-0 cquery) best-other-tri intersect quad)) + (.lvf vf6 (&-> v1-33 prim-core world-sphere quad)) + (.sub.vf vf8 vf6 vf7) + (.mul.vf vf9 vf8 vf8 :mask #b111) + (.mul.x.vf acc vf0 vf9 :mask #b1000) + (.add.mul.y.vf acc vf0 vf9 acc :mask #b1000) + (.add.mul.z.vf vf9 vf0 vf9 acc :mask #b1000) + (.isqrt.vf Q vf0 vf9 :fsf #b11 :ftf #b11) + (.mov.vf vf8 vf0 :mask #b1000) + (.mov.vf vf7 vf0 :mask #b1000) + (.wait.vf) + (.mul.vf vf8 vf8 Q :mask #b111) + (.nop.vf) + (.nop.vf) + (.nop.vf) + (.svf (&-> s5-0 impact-info normal quad) vf8) + (.svf (&-> s5-0 impact-info point quad) vf7) + (set! (-> s5-0 impact-info prim-id) (-> v1-33 prim-id)) + ) + (set! (-> s5-0 impact-info pat) (-> s5-0 cquery best-other-tri pat)) + (rigid-body-control-method-23 arg0 (the-as vector (-> s5-0 impact-info)) (-> s5-0 impact-info velocity)) + (when (-> s5-0 rbody2) + (init-velocities! (-> s5-0 rbody2)) + (rigid-body-control-method-23 (-> s5-0 rbody2) (the-as vector (-> s5-0 impact-info)) (-> s5-0 vel)) + (vector-! (-> s5-0 impact-info velocity) (-> s5-0 impact-info velocity) (-> s5-0 vel)) + ) + (set! (-> s5-0 impact-info impulse) 0.0) + (set! (-> s5-0 vel-dot-norm) + (+ -409.6 (vector-dot (-> s5-0 impact-info velocity) (-> s5-0 impact-info normal))) + ) + (set! (-> s5-0 denom) 0.0) + (set! (-> s5-0 denom2) 0.0) + (b! (>= (-> s5-0 vel-dot-norm) 0.0) cfg-50) + (vector-! (-> s5-0 p-body) (the-as vector (-> s5-0 impact-info)) (-> arg0 position)) + (vector-cross! (-> s5-0 tmp) (-> s5-0 p-body) (-> s5-0 impact-info normal)) + (vector-rotate*! (-> s5-0 tmp) (-> s5-0 tmp) (-> arg0 inv-i-world)) + (vector-cross! (-> s5-0 tmp) (-> s5-0 tmp) (-> s5-0 p-body)) + (set! (-> s5-0 denom) (+ (-> arg0 info inv-mass) (vector-dot (-> s5-0 impact-info normal) (-> s5-0 tmp)))) + (let ((f30-1 (-> arg0 bounce-factor))) + (cond + ((-> s5-0 proc2) + (set! f30-1 + (cond + ((-> s5-0 rbody2) + (vector-! (-> s5-0 p-body) (the-as vector (-> s5-0 impact-info)) (-> s5-0 rbody2 position)) + (vector-cross! (-> s5-0 tmp) (-> s5-0 p-body) (-> s5-0 impact-info normal)) + (vector-rotate*! (-> s5-0 tmp) (-> s5-0 tmp) (-> s5-0 rbody2 inv-i-world)) + (vector-cross! (-> s5-0 tmp) (-> s5-0 tmp) (-> s5-0 p-body)) + (set! (-> s5-0 denom2) + (+ (-> s5-0 rbody2 info inv-mass) (vector-dot (-> s5-0 impact-info normal) (-> s5-0 tmp))) + ) + (fmax + (fmax f30-1 (-> s5-0 rbody2 bounce-factor)) + (* (-> arg0 info bounce-mult-factor) (-> s5-0 rbody2 info bounce-mult-factor)) + ) + ) + (else + (let* ((s3-0 (-> s5-0 proc2)) + (a0-46 (if (type? s3-0 process-focusable) + s3-0 + ) + ) + ) + (if a0-46 + (set! (-> s5-0 denom2) (get-inv-mass a0-46)) + ) + ) + f30-1 + ) + ) + ) + ) + (else + ) + ) + (set! (-> s5-0 impact-info impulse) + (* (+ 1.0 f30-1) (- (-> s5-0 vel-dot-norm)) (/ 1.0 (+ (-> s5-0 denom) (-> s5-0 denom2)))) + ) + ) + (set! (-> s5-0 impact-info process) (-> s5-0 proc2)) + (when (-> s5-0 proc2) + (set! (-> s5-0 impact-info2 point quad) (-> s5-0 impact-info point quad)) + (vector-float*! (-> s5-0 impact-info2 normal) (-> s5-0 impact-info normal) -1.0) + (vector-float*! (-> s5-0 impact-info2 velocity) (-> s5-0 impact-info velocity) -1.0) + (set! (-> s5-0 impact-info2 impulse) (-> s5-0 impact-info impulse)) + (set! (-> s5-0 impact-info2 pat) (-> s5-0 impact-info pat)) + (set! (-> s5-0 impact-info2 prim-id) (-> s5-0 cquery best-other-prim prim-id)) + (set! (-> s5-0 impact-info2 process) (-> arg0 process)) + (send-event (-> s5-0 proc2) 'impact-impulse :from (-> arg0 process) (-> s5-0 impact-info2)) + (if (or (-> s5-0 rbody2) (let ((a0-53 (-> s5-0 proc2 root))) + (logtest? (-> a0-53 penetrated-by) (penetrate vehicle)) + ) + ) + 0 + (set! (-> s5-0 impact-info impulse) + (* (-> s5-0 impact-info impulse) (/ (+ (-> s5-0 denom) (-> s5-0 denom2)) (-> s5-0 denom))) + ) + ) + ) + (send-event (-> arg0 process) 'impact-impulse :from (-> arg0 process) (-> s5-0 impact-info)) + (vector-float*! (-> s5-0 force) (-> s5-0 impact-info normal) (-> s5-0 impact-info impulse)) + (let ((f30-2 (-> arg0 info mass))) + (if (-> s5-0 rbody2) + (set! f30-2 (fmin f30-2 (-> s5-0 rbody2 info mass))) + ) + (vector+float*! + (-> s5-0 tangent-dir) + (-> s5-0 impact-info velocity) + (-> s5-0 impact-info normal) + (- (-> s5-0 vel-dot-norm)) + ) + (vector-normalize! (-> s5-0 tangent-dir) 1.0) + (let ((f0-39 (* -1.0 (fmin + (* (vector-dot (-> s5-0 tangent-dir) (-> s5-0 impact-info velocity)) f30-2) + (* (-> arg0 friction-factor) (-> s5-0 impact-info impulse)) + ) + ) + ) + ) + (vector+float*! (-> s5-0 force) (-> s5-0 force) (-> s5-0 tangent-dir) f0-39) + ) + ) + (apply-impact! arg0 (the-as vector (-> s5-0 impact-info)) (-> s5-0 force)) + (when (-> s5-0 rbody2) + (vector-float*! (-> s5-0 force) (-> s5-0 force) -1.0) + (apply-impact! (-> s5-0 rbody2) (the-as vector (-> s5-0 impact-info)) (-> s5-0 force)) + ) + (rigid-body-control-method-12 arg0 1.0) + (init-velocities! arg0) + (let ((f30-3 (-> s5-0 cquery best-dist))) + (when (< f30-3 0.0001) + (vector+float*! (-> arg0 position) (-> arg0 position) (-> s5-0 impact-info normal) 40.96) + (rigid-body-control-method-26 arg0) + ) + (set! (-> s5-0 time-step-scale) (- (-> s5-0 time-step-scale) (* f30-3 (-> s5-0 time-step-scale)))) + ) + (when (-> s5-0 rbody2) + (rigid-body-control-method-12 (-> s5-0 rbody2) 1.0) + (init-velocities! (-> s5-0 rbody2)) + 0 + ) + (+! (-> s5-0 step-count) 1) + ) + (b! #t cfg-53 :delay (nop!)) + (label cfg-50) + (when (-> s5-0 rbody2) + (set! (-> arg0 blocked-by) (the-as process-focusable (-> s5-0 cquery best-other-prim cshape process))) + 0 + ) + (vector+float*! (-> arg0 position) (-> arg0 position) (-> s5-0 impact-info normal) 40.96) + (rigid-body-control-method-26 arg0) + 0 + (label cfg-53) + (when (< 0.0 (-> s5-0 time-step-scale)) + (rigid-body-control-method-14 arg0 (* (-> s5-0 time-step-scale) (-> s5-0 time-step))) + (init-velocities! arg0) + (transform-rigid-body-prims (-> this root-prim) (-> arg0 matrix)) + (set! (-> s5-0 time-step-scale) 0.0) + ) + (label cfg-55) + (let ((f0-53 (* (- 1.0 (-> s5-0 time-step-scale)) (-> s5-0 time-step)))) + (set! (-> arg0 time-remaining) (- (-> arg0 time-remaining) f0-53)) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 18 of type rigid-body-control +;; WARN: Return type mismatch int vs none. +(defmethod apply-impact! ((this rigid-body-control) (arg0 vector) (arg1 vector)) + (vector+! (-> this force) (-> this force) arg1) + (let ((v1-1 (new 'stack-no-clear 'inline-array 'vector 2))) + (vector-! (-> v1-1 0) arg0 (-> this position)) + (vector-cross! (-> v1-1 1) (-> v1-1 0) arg1) + (vector+! (-> this torque) (-> this torque) (-> v1-1 1)) + ) + 0 + (none) + ) + +;; definition for method 22 of type rigid-body-control +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-control-method-22 ((this rigid-body-control) (arg0 vector) (arg1 vector)) + (let ((v1-0 (new 'stack-no-clear 'inline-array 'vector 2))) + (vector-! (-> v1-0 0) arg0 (-> this position)) + (vector-cross! (-> v1-0 1) (-> v1-0 0) arg1) + (vector+! (-> this torque) (-> this torque) (-> v1-0 1)) + ) + 0 + (none) + ) + +;; definition for method 21 of type rigid-body-control +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-control-method-21 ((this rigid-body-control) (arg0 vector) (arg1 vector) (arg2 float)) + (vector+! (-> this force) (-> this force) arg1) + (let* ((t0-2 (vector-! (new 'stack-no-clear 'vector) arg0 (-> this position))) + (v1-3 (vector-cross! (new 'stack-no-clear 'vector) t0-2 arg1)) + ) + (let ((f0-0 (vector-length t0-2))) + (if (< arg2 f0-0) + (vector-float*! v1-3 v1-3 (/ arg2 f0-0)) + ) + ) + (vector+! (-> this torque) (-> this torque) v1-3) + ) + 0 + (none) + ) + +;; definition for method 19 of type rigid-body-control +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-control-method-19 ((this rigid-body-control) (arg0 vector) (arg1 vector)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (vector-rotate*! s4-0 arg1 (-> this matrix)) + (vector-rotate*! s5-0 arg0 (-> this matrix)) + (vector+! s5-0 s5-0 (-> this position)) + (apply-impact! this s5-0 s4-0) + ) + 0 + (none) + ) + +;; definition for method 20 of type rigid-body-control +;; WARN: Return type mismatch int vs none. +(defmethod add-force! ((this rigid-body-control) (arg0 vector)) + (vector+! (-> this force) (-> this force) arg0) + 0 + (none) + ) + +;; definition for method 25 of type rigid-body-control +;; WARN: Return type mismatch vector vs none. +(defmethod rigid-body-control-method-25 ((this rigid-body-control) (arg0 vector)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-rotate*! gp-0 (-> this info cm-offset-joint) (-> this matrix)) + (vector-! arg0 (-> this position) gp-0) + ) + (none) + ) + +;; definition for method 30 of type rigid-body-control +;; WARN: Return type mismatch int vs none. +(defmethod debug-print-force-torque ((this rigid-body-control) (arg0 object)) + (format arg0 " force ~M ~M ~M" (-> this force x) (-> this force y) (-> this force z)) + (format arg0 " torque ~M ~M ~M~%" (-> this torque x) (-> this torque y) (-> this torque z)) + 0 + (none) + ) + +;; definition for method 32 of type rigid-body-control +;; WARN: Return type mismatch int vs none. +(defmethod debug-print-momentum ((this rigid-body-control) (arg0 object)) + (format arg0 " lin-mom ~M ~M ~M" (-> this lin-momentum x) (-> this lin-momentum y) (-> this lin-momentum z)) + (format + arg0 + " ang-mom ~M ~M ~M~%" + (-> this ang-momentum x) + (-> this ang-momentum y) + (-> this ang-momentum z) + ) + 0 + (none) + ) + +;; definition for method 33 of type rigid-body-control +;; WARN: Return type mismatch int vs none. +(defmethod debug-print-velocity ((this rigid-body-control) (arg0 object)) + (format arg0 " lin-vel ~M ~M ~M" (-> this lin-velocity x) (-> this lin-velocity y) (-> this lin-velocity z)) + (format + arg0 + " ang-vel ~f ~f ~f~%" + (-> this ang-velocity x) + (-> this ang-velocity y) + (-> this ang-velocity z) + ) + 0 + (none) + ) + +;; definition for method 31 of type rigid-body-control +;; WARN: Return type mismatch int vs none. +(defmethod debug-print-pos-rot ((this rigid-body-control) (arg0 object)) + (format arg0 " position ~M ~M ~M" (-> this position x) (-> this position y) (-> this position z)) + (format arg0 " rotation ~f ~f ~f ~f~%" (-> this rot x) (-> this rot y) (-> this rot z) (-> this rot w)) + 0 + (none) + ) + +;; definition for method 29 of type rigid-body-control +;; WARN: Return type mismatch int vs none. +(defmethod debug-print-info ((this rigid-body-control) (arg0 object)) + (debug-print-force-torque this arg0) + (debug-print-pos-rot this arg0) + (debug-print-momentum this arg0) + (debug-print-velocity this arg0) + 0 + (none) + ) + +;; definition for method 10 of type rigid-body-control +;; WARN: Return type mismatch int vs object. +(defmethod rigid-body-control-method-10 ((this rigid-body-control) (arg0 rigid-body-object) (arg1 float) (arg2 float)) + (let* ((s4-1 (max 1 (min 4 (+ (the int (* 0.9999 (/ arg1 arg2))) 1)))) + (f30-0 (/ arg1 (the float s4-1))) + (s3-0 (-> this force-callback)) + ) + (while (nonzero? s4-1) + (+! s4-1 -1) + (s3-0 arg0 f30-0) + (rigid-body-control-method-9 this (-> arg0 root) f30-0) + ) + ) + 0 + ) + +;; definition for method 11 of type rigid-body-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod update-rbody-transform! ((this rigid-body-control) (arg0 collide-shape-moving)) + (quaternion-copy! (-> arg0 quat) (the-as quaternion (-> this rot))) + (rigid-body-control-method-25 this (-> arg0 trans)) + (set! (-> arg0 transv quad) (-> this lin-velocity quad)) + 0 + (none) + ) + +;; definition for method 27 of type rigid-body-object +(defmethod get-inv-mass ((this rigid-body-object)) + (-> this info info inv-mass) + ) + +;; definition for method 37 of type rigid-body-object +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-37 ((this rigid-body-object)) + (let ((a0-1 (-> this info name))) + (when (nonzero? a0-1) + (set! (-> this info) (the-as rigid-body-object-constants (-> a0-1 value))) + (set! (-> this rbody info) (-> this info info)) + ) + ) + (rigid-body-info-method-9 (-> this info info)) + (set! (-> this rbody force-callback) (method-of-object this apply-gravity!)) + 0 + (none) + ) + +;; definition for method 53 of type rigid-body-object +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-53 ((this rigid-body-object) (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)) + ) + 0 + (none) + ) + +;; definition for method 31 of type rigid-body-object +;; WARN: Return type mismatch int vs none. +(defmethod apply-gravity! ((this rigid-body-object) (arg0 float)) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (vector-reset! a1-1) + (set! (-> a1-1 y) (* -1.0 (-> this info extra gravity) (-> this rbody info mass))) + (add-force! (-> this rbody) a1-1) + ) + 0 + (none) + ) + +;; definition for method 32 of type rigid-body-object +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-32 ((this rigid-body-object)) + (rigid-body-control-method-10 (-> this rbody) this (seconds-per-frame) (-> this max-time-step)) + (logclear! (-> this flags) (rigid-body-object-flag player-impulse-force player-contact-force)) + 0 + (none) + ) + +;; definition for method 54 of type rigid-body-object +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-54 ((this rigid-body-object)) + (rigid-body-control-method-10 (-> this rbody) this (-> this rbody time-remaining) (-> this max-time-step)) + 0 + (none) + ) + +;; definition for method 55 of type rigid-body-object +;; WARN: Return type mismatch int vs none. +(defmethod clear-impulse-force-flag! ((this rigid-body-object)) + (logclear! (-> this flags) (rigid-body-object-flag player-impulse-force player-contact-force)) + 0 + (none) + ) + +;; definition for method 36 of type rigid-body-object +;; WARN: Return type mismatch int vs object. +(defmethod go-idle ((this rigid-body-object)) + (go (method-of-object this idle)) + 0 + ) + +;; definition for method 33 of type rigid-body-object +;; WARN: Return type mismatch int vs none. +(defmethod alloc-rbody-control! ((this rigid-body-object) (arg0 rigid-body-object-constants)) + (set! (-> this info) arg0) + (set! (-> this rbody) (new 'process 'rigid-body-control this)) + (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!)) + ) + (rigid-body-object-method-37 this) + (set! (-> this max-time-step) (-> arg0 extra max-time-step)) + (set! (-> this root max-iteration-count) (the-as uint 4)) + (when (nonzero? (-> this skel)) + (let ((v1-16 (-> this skel root-channel 0))) + (set! (-> v1-16 num-func) num-func-identity) + (set! (-> v1-16 frame-num) 0.0) + ) + ) + 0 + (none) + ) + +;; definition for method 34 of type rigid-body-object +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this rigid-body-object)) + (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-sphere s5-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)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 12288.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 symbol *rigid-body-object-constants*, type rigid-body-object-constants +(define *rigid-body-object-constants* (new 'static 'rigid-body-object-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-object-constants* + ) + ) + +;; definition for method 35 of type rigid-body-object +;; WARN: Return type mismatch int vs none. +(defmethod init-rbody-control! ((this rigid-body-object)) + (alloc-rbody-control! this *rigid-body-object-constants*) + 0 + (none) + ) + +;; definition for method 11 of type rigid-body-object +;; WARN: Return type mismatch int vs object. +(defmethod init-from-entity! ((this rigid-body-object) (arg0 entity-actor)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (init-rbody-control! this) + (go-idle this) + 0 + ) + +;; definition for method 38 of type rigid-body-object +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-38 ((this rigid-body-object)) + 0 + (none) + ) + +;; definition for method 30 of type rigid-body-object +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-30 ((this rigid-body-object)) + (ja-post) + 0 + (none) + ) + +;; definition for method 39 of type rigid-body-object +;; WARN: Return type mismatch int vs none. +(defmethod rbody-post ((this rigid-body-object)) + (rigid-body-object-method-32 this) + (rigid-body-object-method-38 this) + (update-rbody-transform! (-> this rbody) (-> this root)) + (rigid-body-object-method-30 this) + (update-transforms (-> this root)) + 0 + (none) + ) + +;; definition for method 42 of type rigid-body-object +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-42 ((this rigid-body-object)) + (logior! (-> this flags) (rigid-body-object-flag enable-collision)) + (let ((v1-3 (-> this root root-prim))) + (set! (-> v1-3 prim-core collide-as) (-> this root backup-collide-as)) + (set! (-> v1-3 prim-core collide-with) (-> this root backup-collide-with)) + ) + 0 + (none) + ) + +;; definition for method 43 of type rigid-body-object +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-43 ((this rigid-body-object)) + (logclear! (-> this flags) (rigid-body-object-flag enable-collision)) + (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 + 0 + (none) + ) + +;; definition for method 40 of type rigid-body-object +;; WARN: Return type mismatch int vs none. +(defmethod apply-momentum! ((this rigid-body-object)) + (when (not (logtest? (-> this rbody flags) (rigid-body-flag enable-physics))) + (logior! (-> this rbody flags) (rigid-body-flag enable-physics)) + (rigid-body-control-method-28 (-> this rbody) (-> this root trans) (-> this root quat)) + (vector-float*! (-> this rbody lin-momentum) (-> this root transv) (-> this info info mass)) + (vector-reset! (-> this rbody ang-momentum)) + ) + 0 + (none) + ) + +;; definition for method 41 of type rigid-body-object +;; WARN: Return type mismatch int vs none. +(defmethod disable-physics! ((this rigid-body-object)) + (logclear! (-> this rbody flags) (rigid-body-flag enable-physics)) + 0 + (none) + ) + +;; definition for method 44 of type rigid-body-object +;; WARN: Return type mismatch int vs none. +(defmethod impulse-handler ((this rigid-body-object)) + (logior! (-> this flags) (rigid-body-object-flag disturbed)) + (set-time! (-> this disturbed-time)) + (if (not (logtest? (-> this rbody flags) (rigid-body-flag enable-physics))) + (apply-momentum! this) + ) + 0 + (none) + ) + +;; definition for method 45 of type rigid-body-object +;; WARN: Return type mismatch int vs object. +(defmethod go-active ((this rigid-body-object)) + (go (method-of-object this active)) + 0 + ) + +;; definition for method 46 of type rigid-body-object +;; WARN: Return type mismatch int vs none. +(defmethod apply-damage ((this rigid-body-object) (arg0 float) (arg1 rigid-body-impact)) + 0 + (none) + ) + +;; definition for method 48 of type rigid-body-object +;; WARN: Return type mismatch int vs none. +(defmethod on-impact ((this rigid-body-object) (arg0 rigid-body-impact)) + 0 + (none) + ) + +;; definition for method 52 of type rigid-body-object +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-rbody-impact-from-tshape! ((this rigid-body-object) (arg0 rigid-body-impact) (arg1 touching-shapes-entry)) + (set! (-> arg0 process) #f) + (set! (-> arg0 prim-id) (the-as uint 0)) + (vector-reset! (-> arg0 normal)) + (vector-reset! (-> arg0 velocity)) + (set! (-> arg0 point quad) (-> this root trans quad)) + (when arg1 + (let ((s3-0 (-> arg1 head))) + (when s3-0 + (get-intersect-point (-> arg0 point) s3-0 (-> this root) arg1) + (let ((s5-1 (get-touched-prim s3-0 (-> this root) arg1))) + (when s5-1 + (set! (-> arg0 prim-id) (-> s5-1 prim-id)) + (vector-! (-> arg0 normal) (-> arg0 point) (the-as vector (-> s5-1 prim-core))) + (vector-normalize! (-> arg0 normal) 1.0) + (vector+float*! + (-> arg0 point) + (the-as vector (-> s5-1 prim-core)) + (-> arg0 normal) + (-> s5-1 prim-core world-sphere w) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 47 of type rigid-body-object +;; WARN: Return type mismatch int vs none. +(defmethod impulse-force<-penetrate ((this rigid-body-object) (arg0 rigid-body-impact) (arg1 attack-info) (arg2 penetrate)) + (local-vars (f1-1 float)) + 0.0 + (let ((f0-1 0.0)) + (cond + ((logtest? (penetrate jak-red-shockwave) arg2) + (set! f0-1 (* 81920.0 (-> arg1 control))) + (set! f1-1 (-> arg1 damage)) + ) + ((logtest? arg2 (penetrate punch)) + (set! f0-1 40960.0) + (set! f1-1 4.0) + ) + ((logtest? arg2 (penetrate flop spin)) + (set! f0-1 20480.0) + (set! f1-1 2.0) + ) + ((logtest? (attack-mask vehicle-damage-factor) (-> arg1 mask)) + (set! f1-1 (* (-> arg1 damage) (-> arg1 vehicle-damage-factor))) + (if (logtest? (attack-mask vehicle-impulse-factor) (-> arg1 mask)) + (set! f0-1 (* 49152.0 (-> arg1 vehicle-impulse-factor) (-> arg1 damage))) + ) + 0 + ) + (else + (set! f0-1 8192.0) + (set! f1-1 2.0) + ) + ) + (set! (-> arg0 impulse) (* f0-1 (-> this info extra attack-force-scale))) + ) + (apply-damage this f1-1 arg0) + 0 + (none) + ) + +;; definition for method 50 of type rigid-body-object +;; INFO: Used lq/sq +(defmethod attack-handler ((this rigid-body-object) + (arg0 process-drawable) + (arg1 attack-info) + (arg2 touching-shapes-entry) + (arg3 penetrate) + ) + (when arg2 + (let ((s5-0 (new 'stack-no-clear 'rigid-body-impact))) + (init-rbody-impact-from-tshape! this s5-0 arg2) + (if (logtest? (attack-mask attacker-velocity) (-> arg1 mask)) + (set! (-> s5-0 velocity quad) (-> arg1 attacker-velocity quad)) + (vector-! (-> s5-0 velocity) (-> s5-0 point) (-> arg0 root trans)) + ) + (impulse-force<-penetrate this s5-0 arg1 arg3) + (impulse-handler this) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (set! (-> s4-1 quad) (-> s5-0 velocity quad)) + (vector-normalize! s4-1 1.0) + (vector-float*! s4-1 s4-1 (-> s5-0 impulse)) + (apply-impact! (-> this rbody) (-> s5-0 point) s4-1) + (rigid-body-control-method-12 (-> this rbody) 1.0) + (init-velocities! (-> this rbody)) + (when #f + (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) s4-1 (meters 0.00024414062) *color-blue*) + ) + ) + (on-impact this s5-0) + ) + (if (and (-> this next-state) (= (-> this next-state name) 'idle)) + (go-active this) + ) + #t + ) + ) + +;; definition for method 51 of type rigid-body-object +;; INFO: Used lq/sq +(defmethod touch-handler ((this rigid-body-object) (arg0 process-focusable) (arg1 touching-shapes-entry)) + (b! + (or (not (logtest? (process-mask target crate enemy) (-> arg0 mask))) + (and (logtest? (-> arg0 mask) (process-mask target)) (focus-test? arg0 dangerous pilot)) + ) + cfg-17 + :delay (nop!) + ) + (let ((s5-0 (new 'stack-no-clear 'rigid-body-impact)) + (s4-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! (-> s4-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) (/ f0-1 (+ f30-0 (-> this info info inv-mass)))) + (vector+float*! s4-0 s4-0 (-> s5-0 normal) (* -3.1 f30-0 (-> s5-0 impulse))) + (set! (-> s4-0 y) (fmax (* 49152.0 f30-0) (-> s4-0 y))) + (impulse-handler this) + (let ((a2-4 (new 'stack-no-clear 'vector))) + (vector-float*! a2-4 (-> s5-0 normal) (-> s5-0 impulse)) + (apply-impact! (-> this rbody) (-> s5-0 point) a2-4) + ) + (rigid-body-control-method-12 (-> this rbody) 1.0) + (init-velocities! (-> this rbody)) + (when #f + (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-active this) + ) + ) + ) + ) + (label cfg-17) + #t + ) + +;; definition for method 49 of type rigid-body-object +;; INFO: Used lq/sq +(defmethod rbody-event-handler ((this rigid-body-object) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('impact-impulse) + (let ((s5-1 (-> arg3 param 0))) + (if (!= this arg0) + (impulse-handler this) + ) + (on-impact this (the-as rigid-body-impact s5-1)) + ) + (if (and (-> this next-state) (= (-> this next-state name) 'idle)) + (go-active this) + ) + #t + ) + (('touched) + (if (= this *debug-actor*) + (format *stdcon* "rigid-body-object got touched~%") + ) + (when (zero? (-> (the-as process-focusable arg0) rbody)) + (let ((s3-0 (if (type? arg0 process-focusable) + arg0 + ) + ) + ) + (when s3-0 + (when (logtest? (-> s3-0 mask) (process-mask target)) + (logior! (-> this flags) (rigid-body-object-flag player-touching)) + (set-time! (-> this player-touch-time)) + (impulse-handler this) + ) + (if (not (logtest? (-> s3-0 mask) (process-mask target))) + (touch-handler this (the-as process-focusable s3-0) (the-as touching-shapes-entry (-> arg3 param 0))) + ) + ) + ) + ) + ) + (('attack) + (let ((s3-1 (the-as object (-> arg3 param 1))) + (t0-1 (get-penetrate-using-from-attack-event (the-as process-drawable arg0) arg3)) + ) + (when (!= (-> (the-as attack-info s3-1) id) (-> this incoming-attack-id)) + (set! (-> this incoming-attack-id) (-> (the-as attack-info s3-1) id)) + (attack-handler + this + (the-as process-drawable arg0) + (the-as attack-info s3-1) + (the-as touching-shapes-entry (-> arg3 param 0)) + t0-1 + ) + ) + ) + ) + (('edge-grabbed 'pilot-edge-grab) + (let ((s5-2 (the-as object (-> arg3 param 0)))) + (when (not (logtest? (-> this flags) (rigid-body-object-flag player-impulse-force))) + (let ((a0-25 (if (type? arg0 process-focusable) + (the-as process-focusable arg0) + ) + ) + ) + (when a0-25 + (let ((f0-1 (/ 163840.0 (get-inv-mass a0-25)))) + (logior! (-> this flags) (rigid-body-object-flag player-touching player-edge-grabbing player-contact-force)) + (set! (-> this player-force-position quad) (-> (the-as attack-info s5-2) attacker-velocity quad)) + (vector-reset! (-> this player-force)) + (set! (-> this player-force y) (* -1.0 f0-1)) + ) + ) + ) + ) + ) + (not (logtest? (-> this focus-status) (focus-status dead inactive))) + ) + (('ridden) + (let ((v1-47 (the-as object (-> arg3 param 0)))) + (when (the-as uint v1-47) + (let* ((s5-3 (handle->process (-> (the-as focus v1-47) handle))) + (a0-34 (if (type? s5-3 process-focusable) + s5-3 + ) + ) + ) + (when (and a0-34 + (logtest? (-> a0-34 mask) (process-mask target)) + (not (logtest? (-> (the-as process-focusable a0-34) 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-touching player-standing-on player-contact-force)) + (set! (-> this player-force-position quad) (-> (the-as process-focusable a0-34) root trans quad)) + (vector-reset! (-> this player-force)) + (let ((f0-4 (/ 163840.0 (get-inv-mass (the-as process-focusable a0-34)))) + (f1-1 1.0) + ) + (set! (-> this player-force y) (* -1.0 f0-4 f1-1)) + ) + ) + ) + ) + ) + ) + ) + (('bonk) + (when #t + (let* ((s3-2 arg0) + (s4-1 (if (type? s3-2 process-focusable) + s3-2 + ) + ) + ) + (when s4-1 + (logior! (-> this flags) (rigid-body-object-flag player-touching player-impulse-force)) + (set-time! (-> this player-touch-time)) + (impulse-handler this) + (set! (-> this player-force-position quad) (-> (the-as process-focusable s4-1) root trans quad)) + (let ((f30-2 (* 0.00012207031 (the-as float (-> arg3 param 1)))) + (f0-9 (/ 163840.0 (get-inv-mass (the-as process-focusable s4-1)))) + ) + (vector-reset! (-> this player-force)) + (set! (-> this player-force y) (* -0.1 f0-9 f30-2)) + ) + ) + ) + ) + ) + (('enable-physics) + (impulse-handler this) + ) + ) + ) + +;; definition for function rigid-body-object-event-handler +(defbehavior rigid-body-object-event-handler rigid-body-object ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (rbody-event-handler self arg0 arg1 arg2 arg3) + ) + +;; failed to figure out what this is: +(defstate idle (rigid-body-object) + :virtual #t + :trans (behavior () + (if (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))) + ) + ) + (go-virtual active) + ) + ) + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate active (rigid-body-object) + :virtual #t + :event rigid-body-object-event-handler + :trans (behavior () + (if (or (not *target*) (or (< (+ 4096.0 (-> self info extra idle-distance)) + (vector-vector-distance (-> self root trans) (-> *target* control trans)) + ) + (focus-test? *target* teleporting) + ) + ) + (go-virtual idle) + ) + ) + :code sleep-code + :post (behavior () + (rbody-post self) + ) + ) diff --git a/test/decompiler/reference/jak3/engine/physics/trajectory_REF.gc b/test/decompiler/reference/jak3/engine/physics/trajectory_REF.gc index 4934134e9c..fca2e2eb7a 100644 --- a/test/decompiler/reference/jak3/engine/physics/trajectory_REF.gc +++ b/test/decompiler/reference/jak3/engine/physics/trajectory_REF.gc @@ -345,16 +345,19 @@ ) ) (when s4-1 - (cond - (((method-of-type nav-control find-poly-containing-point-1) (the-as nav-control s4-1) arg1) - (let ((t9-4 (method-of-type nav-control nav-control-method-20))) - #x45000000 - (t9-4) - ) - ) - (else - (set! (-> arg0 quad) (the-as uint128 0)) - ) + (let ((a2-3 ((method-of-type nav-control find-poly-containing-point-1) (the-as nav-control s4-1) arg1))) + (if a2-3 + ((method-of-type nav-control clamp-vector-to-mesh-cross-gaps) + (the-as nav-control s4-1) + arg1 + a2-3 + arg0 + 2048.0 + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + (set! (-> arg0 quad) (the-as uint128 0)) + ) ) ) ) diff --git a/test/decompiler/reference/jak3/engine/process-drawable/focus_REF.gc b/test/decompiler/reference/jak3/engine/process-drawable/focus_REF.gc index b1e130d3f7..9d5ec7bf29 100644 --- a/test/decompiler/reference/jak3/engine/process-drawable/focus_REF.gc +++ b/test/decompiler/reference/jak3/engine/process-drawable/focus_REF.gc @@ -9,7 +9,7 @@ ) (:methods (clear-focused (_type_) none) - (collide-check? (_type_ process-focusable) object) + (collide-spec-match? (_type_ process-focusable) object) (reset-to-collide-spec (_type_ collide-spec) none) (try-update-focus (_type_ process-focusable) symbol) ) @@ -39,7 +39,7 @@ ) ;; definition for method 10 of type focus -(defmethod collide-check? ((this focus) (proc process-focusable)) +(defmethod collide-spec-match? ((this focus) (proc process-focusable)) "If the focused process is not dead, check that the [[collide-spec]] of the focus and the process match." (when (and proc (not (logtest? (-> proc focus-status) (focus-status disable dead)))) @@ -71,7 +71,3 @@ 0 (none) ) - - - - 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 d4a2ba08c2..dc4f32f6d2 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 @@ -407,16 +407,11 @@ ) (dotimes (s3-1 1) (let* ((v1-11 (-> arg0 data s3-1)) - (t9-2 (-> v1-11 param0)) + (t9-2 (the-as function (-> v1-11 param0))) ) - (when t9-2 - (let ((a0-6 v1-11) - (a1-3 (-> v1-11 param1)) - ) - (-> v1-11 param2) - (t9-2 a0-6 (the-as transformq a1-3)) + (if (the-as (function cspace transformq none) t9-2) + ((the-as (function object object object none) t9-2) v1-11 (-> v1-11 param1) (-> v1-11 param2)) ) - ) ) ) (dotimes (s3-2 2) @@ -593,7 +588,7 @@ ) (let ((a0-3 (-> this nav))) (if (and a0-3 (nonzero? a0-3)) - ((method-of-type nav-control nav-control-method-41)) + (remove! a0-3) ) ) (let* ((s5-0 (-> this root)) @@ -1725,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 8a959166ba..4cd3104d4e 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,8 @@ ;; definition of type process-focusable (deftype process-focusable (process-drawable) - ((root collide-shape :override) + ((self process-focusable :override) + (root collide-shape :override) (focus-status focus-status) ) (:methods diff --git a/test/decompiler/reference/jak3/engine/process-drawable/process-taskable-h_REF.gc b/test/decompiler/reference/jak3/engine/process-drawable/process-taskable-h_REF.gc index 8c6776adfe..eb44506170 100644 --- a/test/decompiler/reference/jak3/engine/process-drawable/process-taskable-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/process-drawable/process-taskable-h_REF.gc @@ -24,13 +24,13 @@ (play-game game-task-event) ) (:methods - (process-taskable-method-33 () none) - (process-taskable-method-34 () none) - (process-taskable-method-35 () none) - (process-taskable-method-36 () none) - (process-taskable-method-37 () none) - (process-taskable-method-38 () none) - (process-taskable-method-39 () none) + (init-collision! (_type_) none) + (init-defaults! (_type_) none) + (init-skeleton! (_type_) none) + (process-taskable-method-36 (_type_) symbol) + (get-art-element (_type_) art-element) + (process-taskable-method-38 (_type_) none) + (update-cloth-and-shadow (_type_) none) ) ) @@ -60,7 +60,3 @@ ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/engine/process-drawable/process-taskable_REF.gc b/test/decompiler/reference/jak3/engine/process-drawable/process-taskable_REF.gc new file mode 100644 index 0000000000..7e6f694f8c --- /dev/null +++ b/test/decompiler/reference/jak3/engine/process-drawable/process-taskable_REF.gc @@ -0,0 +1,542 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 7 of type process-taskable +;; WARN: Return type mismatch process-focusable vs process-taskable. +(defmethod relocate ((this process-taskable) (offset int)) + (if (nonzero? (-> this task)) + (&+! (-> this task) offset) + ) + (the-as process-taskable ((method-of-type process-focusable relocate) this offset)) + ) + +;; definition for function process-taskable-anim-loop +;; WARN: Return type mismatch int vs none. +(defbehavior process-taskable-anim-loop process-taskable ((arg0 (function process-taskable object))) + (while (arg0 self) + (let ((s5-0 (get-art-element self))) + (when (!= (ja-group) s5-0) + (ja-channel-push! 1 0) + (set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim s5-0)) + ) + ) + (suspend) + (if (ja-group) + (ja :num! (loop!)) + ) + (process-taskable-method-38 self) + ) + 0 + (none) + ) + +;; definition for method 36 of type process-taskable +(defmethod process-taskable-method-36 ((this process-taskable)) + #t + ) + +;; definition for method 37 of type process-taskable +;; WARN: Return type mismatch art-joint-anim vs art-element. +(defmethod get-art-element ((this process-taskable)) + (the-as art-element (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + +;; definition for method 38 of type process-taskable +;; WARN: Return type mismatch int vs none. +(defmethod process-taskable-method-38 ((this process-taskable)) + 0 + (none) + ) + +;; definition for method 39 of type process-taskable +;; WARN: Return type mismatch object vs none. +(defmethod update-cloth-and-shadow ((this process-taskable)) + (if (logtest? (-> this draw status) (draw-control-status no-draw)) + (process-drawable-show-all-cloth this #f) + (process-drawable-show-all-cloth this #t) + ) + (let ((a0-3 (-> this draw shadow-ctrl))) + (cond + ((and (-> this draw shadow) + (and (zero? (-> this draw cur-lod)) (logtest? (-> this draw status) (draw-control-status on-screen))) + ) + (probe-line-for-shadow a0-3 (-> this draw origin) -4096.0 4096.0 32768.0) + ) + (else + (let ((v1-14 a0-3)) + (logior! (-> v1-14 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate hide (process-taskable) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('say) + (let ((v0-0 (current-time))) + (set! (-> self want-to-say) v0-0) + v0-0 + ) + ) + ) + ) + :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)) + ) + (process-drawable-show-all-cloth self #t) + ) + :trans (behavior () + (let ((v1-1 (get-current-task-event (-> self task)))) + (if (and (nonzero? (-> v1-1 action)) (or (not (logtest? (-> self draw status) (draw-control-status on-screen))) + (logtest? (-> v1-1 flags) (game-task-flags gatflag-01)) + (not (time-elapsed? (-> self birth-time) (seconds 0.1))) + ) + ) + (go-virtual idle) + ) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate idle (process-taskable) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (cond + ((logtest? (-> self flags) (process-taskable-flags ptf4)) + (go-virtual die) + ) + ((logtest? (-> self flags) (process-taskable-flags ptf0)) + (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)) + ) + ) + ) + ) + ) + ) + (('touch) + (send-shoves (-> self root) proc (the-as touching-shapes-entry (-> block param 0)) 0.7 6144.0 16384.0) + ) + (('say) + (let ((v0-0 (the-as object (current-time)))) + (set! (-> self want-to-say) (the-as time-frame v0-0)) + v0-0 + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw)) + ) + :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)) + ) + (let ((gp-1 (get-current-task-event (-> self task)))) + (cond + ((= (-> gp-1 action) (game-task-action hide)) + (if (or (not (logtest? (-> self draw status) (draw-control-status on-screen))) + (logtest? (-> gp-1 flags) (game-task-flags gatflag-01)) + ) + (go-virtual hide) + ) + ) + ((or (not *target*) *scene-player*) + ) + ((not (logtest? (-> self flags) (process-taskable-flags ptf1))) + (if (>= (- (-> *display* game-clock frame-counter) (-> self last-talk)) (seconds 5)) + (logior! (-> self flags) (process-taskable-flags ptf1)) + ) + ) + ((and (-> gp-1 scene) + (begin + (when (not (or (= (-> gp-1 action) (game-task-action play)) + (-> *setting-control* user-current movie-name) + (name= (-> gp-1 scene) (-> *setting-control* user-current movie-name)) + ) + ) + (let ((v1-42 (scene-lookup (-> gp-1 scene)))) + (gui-control-method-12 + *gui-control* + self + (gui-channel art-load) + (gui-action queue) + (if v1-42 + (-> v1-42 anim) + (-> gp-1 scene) + ) + 0 + -99.0 + (new 'static 'sound-id) + ) + ) + ) + (and (not (logtest? (focus-status dead in-air in-head pole tube mech) (-> *target* focus-status))) + (and (or (and (< (-> (target-pos 0) y) (+ (-> self root root-prim prim-core world-sphere y) (-> self talk-height))) + (let ((s5-1 (get-trans self 2)) + (f30-0 (if (= (-> gp-1 distance) 0.0) + (-> self talk-distance) + (-> gp-1 distance) + ) + ) + ) + (< (vector-vector-distance (target-pos 0) s5-1) f30-0) + ) + ) + (not (time-elapsed? (-> self want-to-say) (seconds 4))) + ) + (or (not (load-in-progress? *level*)) (= (-> gp-1 action) (game-task-action say))) + (and (not (movie?)) + (or (not (logtest? (-> self flags) (process-taskable-flags ptf6))) (not (talker-displayed?))) + (none-reserved? *art-control*) + (not *progress-process*) + (not (-> *setting-control* user-current movie)) + ) + ) + ) + ) + ) + (when (and (or (= (-> gp-1 action) (game-task-action say)) + (= (-> gp-1 action) (game-task-action talk)) + (= (-> gp-1 action) (game-task-action trade)) + (= (-> gp-1 action) (game-task-action play)) + ) + (process-taskable-method-36 self) + ) + (when (or (= (-> gp-1 action) (game-task-action say)) (not (time-elapsed? (-> self want-to-say) (seconds 4)))) + (case (-> gp-1 action) + (((game-task-action play)) + (go-virtual play-game gp-1) + ) + (else + (go-virtual active gp-1) + ) + ) + ) + (kill-current-talker '() '(daxter voicebox ambient) 'exit) + (talker-surpress!) + (when (can-display-query? self "process-taskable" -99.0) + (let ((s5-2 + (new 'stack 'font-context *font-default-matrix* 32 280 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-96 s5-2)) + (set! (-> v1-96 width) (the float 340)) + ) + (let ((v1-97 s5-2)) + (set! (-> v1-97 height) (the float 80)) + ) + (let ((v1-98 s5-2) + (a0-39 (-> *setting-control* user-default language)) + ) + (set! (-> v1-98 scale) (if (or (= a0-39 (language-enum korean)) (= a0-39 (language-enum russian))) + 0.9 + 0.7 + ) + ) + ) + (set! (-> s5-2 flags) (font-flags shadow kerning middle-vert large)) + (print-game-text + (lookup-text! *common-text* (-> self talk-message) #f) + s5-2 + #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)) + (case (-> gp-1 action) + (((game-task-action play)) + (go-virtual play-game gp-1) + ) + (else + (go-virtual active gp-1) + ) + ) + ) + ) + ) + ) + ) + ) + (update-cloth-and-shadow self) + ) + :code (behavior () + (process-taskable-anim-loop (the-as (function process-taskable object) true-func)) + ) + :post (behavior () + (if (and (logtest? (-> self flags) (process-taskable-flags ptf3)) (movie?)) + (logior! (-> self draw status) (draw-control-status no-draw)) + (logclear! (-> self draw status) (draw-control-status no-draw)) + ) + (when (logtest? (-> self flags) (process-taskable-flags ptf2)) + (if *target* + (look-at! (-> *target* neck) (get-trans self 2) 'nothing-special self) + ) + ) + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate active (process-taskable) + :virtual #t + :event (-> (method-of-type process-taskable hide) event) + :enter (behavior ((arg0 game-task-event)) + (set! (-> self want-to-say) 0) + (process-entity-status! self (entity-perm-status no-kill) #t) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + :exit (behavior () + (set! (-> self last-talk) (-> *display* game-clock frame-counter)) + (if (not (time-elapsed? (-> self want-to-say) (seconds 4))) + (logior! (-> self flags) (process-taskable-flags ptf1)) + (logclear! (-> self flags) (process-taskable-flags ptf1)) + ) + (process-entity-status! self (entity-perm-status no-kill) #f) + (logior! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-15 (-> self root root-prim))) + (set! (-> v1-15 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-15 prim-core collide-with) (-> self root backup-collide-with)) + ) + ) + :code (behavior ((arg0 game-task-event)) + (when (-> arg0 scene) + (let ((gp-1 (ppointer->handle + (process-spawn scene-player :init scene-player-init (-> arg0 scene) #t #f :name "scene-player") + ) + ) + ) + (while (and (handle->process (the-as handle gp-1)) (not (movie?))) + (suspend) + ) + (process-drawable-show-all-cloth self #f) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-15 (-> self root root-prim))) + (set! (-> v1-15 prim-core collide-as) (collide-spec)) + (set! (-> v1-15 prim-core collide-with) (collide-spec)) + ) + 0 + (while (handle->process (the-as handle gp-1)) + (suspend) + ) + ) + ) + (go-virtual hide) + ) + ) + +;; failed to figure out what this is: +(defstate die (process-taskable) + :virtual #t + :enter (behavior () + (set! (-> self want-to-say) 0) + (process-entity-status! self (entity-perm-status no-kill) #t) + (logclear! (-> self mask) (process-mask actor-pause)) + ) + :exit (behavior () + (process-entity-status! self (entity-perm-status no-kill) #f) + (logior! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (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)) + ) + ) + :code (behavior () + (if (-> self skel effect) + (do-effect (-> self skel effect) "death-default" 0.0 -1) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (if (logtest? (-> self flags) (process-taskable-flags ptf5)) + (restart-mission) + ) + (cleanup-for-death self) + ) + :post (-> (method-of-type process-taskable idle) post) + ) + +;; failed to figure out what this is: +(defstate play-game (process-taskable) + :virtual #t + :enter (-> (method-of-type process-taskable active) enter) + :exit (-> (method-of-type process-taskable active) exit) + :code (behavior ((arg0 game-task-event)) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (suspend) + ) + ) + (go-virtual hide) + ) + :post (-> (method-of-type process-taskable idle) post) + ) + +;; definition for method 33 of type process-taskable +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this process-taskable)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 3) 0))) + (set! (-> s5-0 total-prims) (the-as uint 4)) + (set! (-> s4-0 prim-core collide-as) (collide-spec civilian)) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set! (-> s4-0 transform-index) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 -1024.0 0.0 7372.8) + (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 civilian)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set! (-> v1-7 transform-index) 0) + (set-vector! (-> v1-7 local-sphere) 0.0 -4096.0 0.0 4096.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 civilian)) + (set! (-> v1-9 prim-core action) (collide-action solid)) + (set! (-> v1-9 transform-index) 0) + (set-vector! (-> v1-9 local-sphere) 0.0 -1024.0 0.0 4096.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 civilian)) + (set! (-> v1-11 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-11 transform-index) 0) + (set-vector! (-> v1-11 local-sphere) 0.0 2048.0 0.0 4096.0) + ) + (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) + ) + +;; definition for method 34 of type process-taskable +;; WARN: Return type mismatch int vs none. +(defmethod init-defaults! ((this process-taskable)) + (logior! (-> this skel status) (joint-control-status eye-anim)) + (set! (-> this talk-message) (text-id press-triangle-to-talk)) + (set! (-> this flags) (process-taskable-flags ptf0 ptf1 ptf2 ptf3 ptf5)) + (set! (-> this neck-joint-index) -1) + (set! (-> this talk-distance) (res-lump-float (-> this entity) 'distance :default 32768.0)) + (set! (-> this talk-height) (res-lump-float (-> this entity) 'height :default 8192.0)) + (set! (-> this slave) (the-as handle #f)) + (set! (-> this 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 + ) + ) + (let ((s5-0 0)) + (let ((v1-12 (the-as joint (get-art-by-name-method (-> this draw jgeo) "main" (the-as type #f))))) + (if v1-12 + (set! s5-0 (+ (-> v1-12 number) 1)) + ) + ) + (let ((v1-16 (-> this root root-prim))) + (set! (-> v1-16 transform-index) s5-0) + (dotimes (a0-7 (the-as int (-> v1-16 specific 0))) + (set! (-> (the-as collide-shape-prim-group v1-16) child a0-7 transform-index) s5-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 35 of type process-taskable +;; WARN: Return type mismatch int vs none. +(defmethod init-skeleton! ((this process-taskable)) + 0 + (none) + ) + +;; definition for method 11 of type process-taskable +(defmethod init-from-entity! ((this process-taskable) (entity entity-actor)) + (stack-size-set! (-> this main-thread) 512) + (init-collision! this) + (process-drawable-from-entity! this entity) + (set! (-> this task) + (new 'process 'game-task-control (res-lump-value entity 'task-actor game-task-actor :time -1000000000.0)) + ) + (init-skeleton! this) + (init-defaults! this) + (logior! (-> this skel status) (joint-control-status blend-shape eye-anim)) + (when (logtest? #x1000000 (res-lump-value entity 'options uint128 :time -1000000000.0)) + (let* ((s5-1 *level*) + (s4-2 (method-of-object s5-1 art-group-get-by-name)) + ) + (format (clear *temp-string*) "skel-~S" (-> this draw art-group name)) + (let ((s4-3 (s4-2 s5-1 *temp-string* (the-as (pointer level) #f)))) + (when s4-3 + (let ((s5-2 (process-spawn + manipy + :init manipy-init + (-> this root trans) + (-> this entity) + s4-3 + #f + 0 + :name "manipy" + :to this + :stack-size #x20000 + ) + ) + ) + (send-event (ppointer->process s5-2) 'anim-mode 'mirror) + (send-event (ppointer->process s5-2) 'mirror #t) + ) + ) + ) + ) + ) + (set! (-> this event-hook) (-> (method-of-object this idle) event)) + (go (method-of-object this hide)) + ) diff --git a/test/decompiler/reference/jak3/engine/process-drawable/simple-nav-sphere_REF.gc b/test/decompiler/reference/jak3/engine/process-drawable/simple-nav-sphere_REF.gc new file mode 100644 index 0000000000..ab8ad2e884 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/process-drawable/simple-nav-sphere_REF.gc @@ -0,0 +1,145 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type simple-nav-sphere +(deftype simple-nav-sphere (process-drawable) + ((first-time? symbol) + (track-joint int32) + ) + (:state-methods + idle + active + ) + ) + +;; definition for method 3 of type simple-nav-sphere +(defmethod inspect ((this simple-nav-sphere)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tfirst-time?: ~A~%" (-> this first-time?)) + (format #t "~2Ttrack-joint: ~D~%" (-> this track-joint)) + (label cfg-4) + this + ) + +;; definition for function simple-nav-sphere-event-handler +(defbehavior simple-nav-sphere-event-handler simple-nav-sphere ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('die-fast) + (go empty-state) + ) + (('move-trans) + (move-to-point! (the-as collide-shape (-> self root)) (the-as vector (-> arg3 param 0))) + #t + ) + (('set-radius) + (let ((f0-0 (the-as float (-> arg3 param 0))) + (a0-7 (-> self root)) + ) + (set! (-> a0-7 nav-radius) f0-0) + (set! (-> (the-as collide-shape a0-7) root-prim local-sphere w) f0-0) + (update-transforms (the-as collide-shape a0-7)) + ) + #t + ) + ) + ) + +;; definition for method 12 of type simple-nav-sphere +(defmethod run-logic? ((this simple-nav-sphere)) + "Should this process be run? Checked by execute-process-tree." + (cond + (*display-nav-marks* + #t + ) + ((>= (-> this track-joint) 0) + #t + ) + ((-> this first-time?) + (set! (-> this first-time?) #f) + #t + ) + ) + ) + +;; failed to figure out what this is: +(defstate idle (simple-nav-sphere) + :virtual #t + :event simple-nav-sphere-event-handler + :trans (behavior () + (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) + ) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate active (simple-nav-sphere) + :virtual #t + :event simple-nav-sphere-event-handler + :trans (behavior () + (let ((v1-0 (ppointer->process (-> self parent))) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (vector<-cspace! gp-0 (-> (the-as process-drawable v1-0) node-list data (-> self track-joint))) + (move-to-point! (the-as collide-shape (-> self root)) gp-0) + ) + ) + :code sleep-code + ) + +;; definition for function simple-nav-sphere-init-by-other +;; INFO: Used lq/sq +(defbehavior simple-nav-sphere-init-by-other simple-nav-sphere ((arg0 float) (arg1 vector) (arg2 nav-mesh) (arg3 int)) + (set! (-> self track-joint) arg3) + (set! (-> self first-time?) #t) + (let ((s5-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (let ((v1-3 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-3 prim-core collide-as) (collide-spec obstacle)) + (set-vector! (-> v1-3 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-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! (-> s5-0 nav-radius) arg0) + (set! (-> s5-0 root-prim local-sphere w) arg0) + (if arg1 + (set! (-> s5-0 trans quad) (-> arg1 quad)) + ) + (vector-identity! (-> s5-0 scale)) + (quaternion-identity! (-> s5-0 quat)) + (let ((v1-11 (-> s5-0 root-prim))) + (set! (-> v1-11 prim-core collide-as) (collide-spec)) + (set! (-> v1-11 prim-core collide-with) (collide-spec)) + ) + 0 + (update-transforms s5-0) + (set! (-> self root) s5-0) + ) + (logclear! (-> self mask) (process-mask actor-pause enemy)) + (set! (-> self event-hook) simple-nav-sphere-event-handler) + (if arg2 + (add-process-drawable-to-nav-mesh arg2 self #f) + (nav-mesh-connect-from-ent self) + ) + (if (>= (-> self track-joint) 0) + (go-virtual active) + (go-virtual idle) + ) + ) diff --git a/test/decompiler/reference/jak3/engine/scene/scene-h_REF.gc b/test/decompiler/reference/jak3/engine/scene/scene-h_REF.gc index 966b087d22..c4bddaad48 100644 --- a/test/decompiler/reference/jak3/engine/scene/scene-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/scene/scene-h_REF.gc @@ -9,24 +9,24 @@ (prefix string) (draw-frames pair) (scissor-frames pair) - (shadow-frames basic) - (cloth-reset-frames basic) - (cloth-commands basic) + (shadow-frames pair) + (cloth-reset-frames pair) + (cloth-commands pair) (camera int16) (light-index uint8) (shadow-mask uint8) (shadow-values uint32) (flags uint32) - (command-list basic) + (command-list pair) (shadow-flags int32) (shadow-volume-joint basic) (draw-seg uint64) (no-draw-seg uint64) (last-frame float) - (process uint64) + (process handle) ) (:methods - (scene-actor-method-9 () none) + (setup-manipy-for-scene! (_type_ scene-player) (pointer process)) ) ) @@ -76,20 +76,20 @@ (wait-air-time time-frame) (wait-ground-time time-frame) (actor (array scene-actor)) - (load-point continue-point) - (end-point continue-point) + (load-point basic) + (end-point basic) (borrow pair) (sfx-volume float) (ambient-volume float) (music-volume float) (music-delay float) (scene-task uint16) - (on-running basic) - (on-complete basic) + (on-running pair) + (on-complete pair) ) (:methods - (scene-method-16 () none) - (scene-method-17 () none) + (init-spool-by-scene! (_type_ spool-anim) spool-anim) + (load-scene (_type_) scene) ) ) @@ -159,17 +159,19 @@ (last-frame float) (end-point basic) (blackout-end basic) - (new-trans-hook basic) - (cur-trans-hook basic) + (new-trans-hook (function none)) + (cur-trans-hook (function none)) (user-data uint64) ) + (:state-methods + (wait symbol) + release + play-anim + ) (:methods - (scene-player-method-20 () none) - (scene-player-method-21 () none) - (scene-player-method-22 () none) - (scene-player-method-23 () none) - (scene-player-method-24 () none) - (scene-player-method-25 () none) + (scene-player-method-23 (_type_ string symbol) none) + (scene-player-method-24 (_type_ scene symbol) scene) + (scene-player-method-25 (_type_ float float) none) ) ) @@ -223,7 +225,3 @@ ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/engine/scene/scene_REF.gc b/test/decompiler/reference/jak3/engine/scene/scene_REF.gc new file mode 100644 index 0000000000..c3a0065b18 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/scene/scene_REF.gc @@ -0,0 +1,2175 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type scene-stage +(deftype scene-stage (process-hidden) + () + ) + +;; definition for method 3 of type scene-stage +(defmethod inspect ((this scene-stage)) + (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 2 of type scene +(defmethod print ((this scene)) + (format #t "#" (-> this art-group) (-> this anim) this) + this + ) + +;; definition for method 16 of type scene +(defmethod init-spool-by-scene! ((this scene) (arg0 spool-anim)) + (set! (-> arg0 name) (-> this anim)) + (set! (-> arg0 anim-name) (-> this anim)) + (set! (-> arg0 parts) (-> this parts)) + (set! (-> arg0 command-list) (-> this command-list)) + arg0 + ) + +;; definition for function scene-decode-continue +;; WARN: Return type mismatch basic vs continue-point. +(defun scene-decode-continue ((arg0 basic)) + (the-as continue-point (cond + ((not arg0) + (the-as basic #f) + ) + ((= (-> arg0 type) continue-point) + arg0 + ) + ((= (-> arg0 type) string) + (get-continue-by-name *game-info* (the-as string arg0)) + ) + (else + (the-as basic #f) + ) + ) + ) + ) + +;; definition for method 9 of type scene-actor +;; INFO: Used lq/sq +(defmethod setup-manipy-for-scene! ((this scene-actor) (arg0 scene-player)) + (local-vars (s4-0 (pointer process)) (sv-96 process)) + (let ((s2-0 (if (-> this level) + (level-get *level* (-> this level)) + (-> *level* level-default) + ) + ) + ) + (cond + ((not s2-0) + (-> *level* level-default) + (set! s4-0 (the-as (pointer process) #f)) + (goto cfg-260) + ) + ((= (-> s2-0 status) 'reserved) + ) + ((!= (-> s2-0 status) 'active) + (set! s4-0 (the-as (pointer process) #f)) + (goto cfg-260) + ) + ) + (let* ((s4-1 (art-group-get-by-name *level* (-> this art-group) (the-as (pointer level) #f))) + (s3-0 (if (type? s4-1 skeleton-group) + s4-1 + ) + ) + (s0-0 (-> arg0 level)) + (s1-0 + (cond + ((or (string= (-> this name) "jak-highres") + (string= (-> this name) "jak-highres-prison") + (string= (-> this name) "darkjak-highres") + ) + 'jakb + ) + ((string= (-> this name) "jakc-highres") + 'jakc + ) + ) + ) + ) + (set! (-> arg0 level) #f) + (set! s4-0 + (when s3-0 + (let ((s2-1 (if (and (nonzero? (-> s2-0 entity)) (> (-> s2-0 entity length) 0)) + (-> s2-0 entity data 0 entity) + (-> arg0 entity) + ) + ) + ) + (set! sv-96 (get-process *default-dead-pool* manipy #x20000 0)) + (set! s4-0 (when sv-96 + (let ((t9-8 (method-of-type manipy activate))) + (t9-8 (the-as manipy sv-96) arg0 (-> this name) (the-as pointer #x70004000)) + ) + (run-now-in-process + sv-96 + manipy-init + (-> arg0 root trans) + s2-1 + s3-0 + #f + (if (and s1-0 (logtest? (game-secrets big-head little-head) (-> *game-info* secrets))) + 1 + 0 + ) + ) + (-> sv-96 ppointer) + ) + ) + (set! (-> arg0 level) s0-0) + (send-event (ppointer->process s4-0) 'anim-mode 'clone-anim) + (send-event (ppointer->process s4-0) 'blend-shape #t) + (send-event (ppointer->process s4-0) 'prefix (-> this prefix)) + (cond + ((zero? (-> this light-index)) + (if (zero? (-> (the-as skeleton-group s3-0) light-index)) + (send-event (ppointer->process s4-0) 'light-index 80) + ) + ) + (else + (send-event (ppointer->process s4-0) 'light-index (* (-> this light-index) 8)) + ) + ) + (send-event (ppointer->process s4-0) 'shadow-disable-smooth #t) + (if (nonzero? (-> this shadow-mask)) + (send-event (ppointer->process s4-0) 'shadow-mask (* (-> this shadow-mask) 8)) + ) + (if (nonzero? (-> this shadow-values)) + (send-event (ppointer->process s4-0) 'shadow-values (* (-> this shadow-values) 8)) + ) + (if (and s4-0 (not (logtest? (-> this flags) 1)) (nonzero? (-> (the-as process-drawable (-> s4-0 0)) draw))) + (logior! (-> (the-as process-drawable (-> s4-0 0)) draw status) (draw-control-status no-draw-bounds)) + ) + (if (-> this shadow-volume-joint) + (send-event (ppointer->process s4-0) 'shadow-volume (-> this shadow-volume-joint) (-> this shadow-flags)) + ) + (when (or (nonzero? (-> this draw-seg)) (nonzero? (-> this no-draw-seg))) + (send-event (ppointer->process s4-0) 'segment 0 (* (-> this no-draw-seg) 8)) + (send-event (ppointer->process s4-0) 'segment (* (-> this draw-seg) 8) 0) + ) + (when (and s1-0 s4-0 (nonzero? (-> (the-as process-drawable (-> s4-0 0)) draw))) + (cond + ((= s1-0 'jakb) + (if (not (-> *setting-control* user-current beard)) + (send-event (ppointer->process s4-0) 'segment 0 16) + ) + ) + ((= s1-0 'jakc) + (if (not (-> *setting-control* user-current beard)) + (send-event (ppointer->process s4-0) 'segment 0 32) + ) + (if (not (logtest? (game-feature armor0) (-> *game-info* features))) + (send-event (ppointer->process s4-0) 'segment 0 16) + ) + (if (not (logtest? (game-feature armor1) (-> *game-info* features))) + (send-event (ppointer->process s4-0) 'segment 0 256) + ) + (if (not (logtest? (game-feature armor2) (-> *game-info* features))) + (send-event (ppointer->process s4-0) 'segment 0 2048) + ) + (if (not (logtest? (game-feature armor3) (-> *game-info* features))) + (send-event (ppointer->process s4-0) 'segment 0 4096) + ) + (let ((v0-28 (log2 (the-as int (-> (the-as process-drawable (-> s4-0 0)) draw mgeo seg-table (log2 16)))))) + (logior! (-> (the-as process-drawable (-> s4-0 0)) draw mgeo effect v0-28 effect-usage) 8) + ) + ) + ) + (when (nonzero? (-> (the-as manipy (-> s4-0 0)) joint 0)) + (cond + ((logtest? (game-secrets little-head) (-> *game-info* secrets)) + (mode-set! (-> (the-as manipy (-> s4-0 0)) joint 0) (joint-mod-mode joint-set*)) + (trs-set! + (-> (the-as manipy (-> s4-0 0)) joint 0) + (the-as vector #f) + (the-as quaternion #f) + (new 'static 'vector :x 0.4 :y 0.4 :z 0.4 :w 1.0) + ) + ) + ((logtest? (game-secrets big-head) (-> *game-info* secrets)) + (mode-set! (-> (the-as manipy (-> s4-0 0)) joint 0) (joint-mod-mode joint-set*)) + (trs-set! + (-> (the-as manipy (-> s4-0 0)) joint 0) + (the-as vector #f) + (the-as quaternion #f) + (new 'static 'vector :x 2.0 :y 2.0 :z 2.0 :w 1.0) + ) + ) + ) + ) + ) + (when (and s4-0 (logtest? (-> this flags) 2)) + (let ((s1-2 (process-spawn + manipy + :init manipy-init + (-> arg0 root trans) + s2-1 + s3-0 + #f + 0 + :name (-> this name) + :to (ppointer->process s4-0) + :stack-size #x20000 + :unk 0 + ) + ) + ) + (send-event (ppointer->process s1-2) 'mirror #t) + (send-event (ppointer->process s1-2) 'anim-mode 'mirror) + (if (nonzero? (-> this light-index)) + (send-event (ppointer->process s1-2) 'light-index (* (-> this light-index) 8)) + ) + (send-event (ppointer->process s4-0) 'shadow-disable-smooth #t) + (if (nonzero? (-> this shadow-mask)) + (send-event (ppointer->process s1-2) 'shadow-mask (* (-> this shadow-mask) 8)) + ) + (if (nonzero? (-> this shadow-values)) + (send-event (ppointer->process s1-2) 'shadow-values (* (-> this shadow-values) 8)) + ) + (if (and s1-2 (not (logtest? (-> this flags) 1)) (nonzero? (-> (the-as process-drawable (-> s1-2 0)) draw))) + (logior! (-> (the-as process-drawable (-> s1-2 0)) draw status) (draw-control-status no-draw-bounds)) + ) + (if (-> this shadow-volume-joint) + (send-event (ppointer->process s1-2) 'shadow-volume (-> this shadow-volume-joint) (-> this shadow-flags)) + ) + (if (or (nonzero? (-> this draw-seg)) (nonzero? (-> this no-draw-seg))) + (send-event (ppointer->process s1-2) 'segment (* (-> this draw-seg) 8) (* (-> this no-draw-seg) 8)) + ) + ) + ) + ) + (when (and s4-0 (nonzero? (-> this camera))) + (cond + ((handle->process (-> arg0 camera)) + (change-parent (handle->process (-> arg0 camera)) (ppointer->process s4-0)) + (send-event (handle->process (-> arg0 camera)) 'target (ppointer->process s4-0)) + (send-event (handle->process (-> arg0 camera)) 'joint (* (-> this camera) 8)) + ) + (else + (let ((v1-341 (process-spawn + othercam + (ppointer->process s4-0) + (-> this camera) + #t + 'scene-player + :name "othercam" + :to (ppointer->process s4-0) + ) + ) + ) + (if v1-341 + (set! (-> arg0 camera) (ppointer->handle v1-341)) + ) + ) + ) + ) + ) + s4-0 + ) + ) + ) + ) + (label cfg-260) + s4-0 + ) + +;; definition for method 10 of type scene-player +(defmethod deactivate ((this scene-player)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set! *debug-menu-scene-play* (the-as object #f)) + (set! *scene-player* (the-as (pointer scene-player) #f)) + (kill-persister *setting-control* (the-as engine-pers 'blackout) 'bg-a-force) + (kill-persister *setting-control* (the-as engine-pers 'blur-a) 'blur-a) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; definition for method 7 of type scene-player +;; WARN: Return type mismatch process-drawable vs scene-player. +(defmethod relocate ((this scene-player) (offset int)) + (let ((v1-0 *kernel-context*)) + (set! (-> v1-0 relocating-process) this) + (set! (-> v1-0 relocating-min) (the-as int (&-> this type))) + (set! (-> v1-0 relocating-max) + (the-as int (+ (+ (-> this allocated-length) -4 (-> process size)) (the-as int this))) + ) + (set! (-> v1-0 relocating-offset) offset) + ) + (let ((v1-2 (-> this scene-list))) + (if (and (>= (the-as int v1-2) (-> *kernel-context* relocating-min)) + (< (the-as int v1-2) (-> *kernel-context* relocating-max)) + ) + (&+! (-> this scene-list) offset) + ) + ) + (the-as scene-player ((method-of-type process-drawable relocate) this offset)) + ) + +;; definition for method 25 of type scene-player +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; WARN: disable def twice: 288. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: disable def twice: 365. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod scene-player-method-25 ((this scene-player) (arg0 float) (arg1 float)) + (local-vars + (v1-12 symbol) + (v1-47 symbol) + (v1-73 symbol) + (v1-105 symbol) + (sv-96 object) + (sv-112 object) + (sv-128 object) + (sv-144 object) + (sv-160 object) + (sv-176 object) + (sv-192 object) + (sv-208 object) + (sv-224 object) + ) + (dotimes (s3-0 (-> this scene actor length)) + (let ((s2-0 (-> this scene actor s3-0))) + (let* ((s1-0 (-> s2-0 draw-frames)) + (s0-0 (car s1-0)) + ) + (while (not (null? s1-0)) + (when (and (pair? s0-0) + (let ((a0-4 (car s0-0))) + (set! sv-96 (car (cdr s0-0))) + (or (= a0-4 'min) (>= arg0 (command-get-float a0-4 0.0))) + ) + (or (= sv-96 'max) (< arg0 (command-get-float (car (cdr s0-0)) 0.0))) + ) + (set! v1-12 #t) + (goto cfg-20) + ) + (set! s1-0 (cdr s1-0)) + (set! s0-0 (car s1-0)) + ) + ) + (set! v1-12 #f) + (label cfg-20) + (cond + (v1-12 + (if (not (handle->process (-> s2-0 process))) + (set! (-> s2-0 process) (ppointer->handle (setup-manipy-for-scene! s2-0 this))) + ) + (let ((s1-1 (handle->process (-> s2-0 process)))) + (when (and s1-1 (nonzero? (-> (the-as process-drawable s1-1) draw))) + (let ((s0-1 (-> s2-0 scissor-frames))) + (set! sv-112 (car s0-1)) + (while (not (null? s0-1)) + (when (and (pair? sv-112) + (let ((a0-21 (car sv-112))) + (set! sv-128 (car (cdr sv-112))) + (or (= a0-21 'min) (>= arg0 (command-get-float a0-21 0.0))) + ) + (or (= sv-128 'max) (< arg0 (command-get-float (car (cdr sv-112)) 0.0))) + ) + (set! v1-47 #t) + (goto cfg-59) + ) + (set! s0-1 (cdr s0-1)) + (set! sv-112 (car s0-1)) + ) + ) + (set! v1-47 #f) + (label cfg-59) + (if v1-47 + (logclear! (-> (the-as process-drawable s1-1) draw status) (draw-control-status force-vu1)) + (logior! (-> (the-as process-drawable s1-1) draw status) (draw-control-status force-vu1)) + ) + (let ((s0-2 (-> s2-0 shadow-frames))) + (set! sv-144 (car s0-2)) + (while (not (null? s0-2)) + (when (and (pair? sv-144) + (let ((a0-30 (car sv-144))) + (set! sv-160 (car (cdr sv-144))) + (or (= a0-30 'min) (>= arg0 (command-get-float a0-30 0.0))) + ) + (or (= sv-160 'max) (< arg0 (command-get-float (car (cdr sv-144)) 0.0))) + ) + (set! v1-73 #t) + (goto cfg-81) + ) + (set! s0-2 (cdr s0-2)) + (set! sv-144 (car s0-2)) + ) + ) + (set! v1-73 #f) + (label cfg-81) + (if v1-73 + (send-event s1-1 'shadow #t) + (send-event s1-1 'shadow #f) + ) + (let ((s0-3 (-> s2-0 cloth-reset-frames))) + (set! sv-192 (car s0-3)) + (while (not (null? s0-3)) + (let ((v1-97 (cond + ((pair? sv-192) + (let ((a0-38 (car sv-192))) + (set! sv-176 (car (cdr sv-192))) + (and (or (= a0-38 'min) (>= arg0 (+ -1.0 (command-get-float a0-38 0.0)))) + (or (= sv-176 'max) (< arg0 (+ 1.0 (command-get-float (car (cdr sv-192)) 0.0)))) + ) + ) + ) + (else + (let* ((t9-11 command-get-float) + (a1-18 0.0) + (f0-10 (t9-11 sv-192 a1-18)) + ) + (and (< arg1 f0-10) (>= arg0 f0-10)) + ) + ) + ) + ) + ) + (when v1-97 + (set! v1-105 #t) + (goto cfg-113) + ) + ) + (set! s0-3 (cdr s0-3)) + (set! sv-192 (car s0-3)) + ) + ) + (set! v1-105 #f) + (label cfg-113) + (if v1-105 + (process-drawable-cloth-command (the-as process-drawable s1-1) '(scene-reset-frame)) + ) + (let* ((s2-1 (-> s2-0 cloth-commands)) + (s0-4 (car s2-1)) + ) + (while (not (null? s2-1)) + (when (pair? s0-4) + (set! sv-224 (car s0-4)) + (let ((v1-121 (cond + ((pair? sv-224) + (let ((a0-44 (car sv-224))) + (set! sv-208 (car (cdr sv-224))) + (and (or (= a0-44 'min) (>= arg0 (command-get-float a0-44 0.0))) + (or (= sv-208 'max) (< arg0 (command-get-float (car (cdr sv-224)) 0.0))) + ) + ) + ) + (else + (let* ((t9-15 command-get-float) + (a1-23 0.0) + (f0-13 (t9-15 sv-224 a1-23)) + ) + (and (< arg1 f0-13) (>= arg0 f0-13)) + ) + ) + ) + ) + ) + (if v1-121 + (process-drawable-cloth-command (the-as process-drawable s1-1) (cdr s0-4)) + ) + ) + ) + (set! s2-1 (cdr s2-1)) + (set! s0-4 (car s2-1)) + ) + ) + ) + ) + 0 + ) + ((handle->process (-> s2-0 process)) + (deactivate (handle->process (-> s2-0 process))) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function scene-lookup +;; WARN: Return type mismatch basic vs scene. +(defun scene-lookup ((arg0 basic)) + (the-as + scene + (case (-> arg0 type) + ((string) + (let ((s5-0 (art-group-get-by-name *level* (the-as string arg0) (the-as (pointer level) #f)))) + (when (type? s5-0 scene) + (let ((gp-0 (get-level-by-heap-ptr-and-status *level* (the-as pointer s5-0) 'active))) + (when (and s5-0 gp-0) + (let ((s4-0 (scene-decode-continue (-> s5-0 data 15)))) + (when s4-0 + (dotimes (s3-0 (-> s4-0 want-count)) + (if (= (-> gp-0 name) (-> s4-0 want s3-0 name)) + (goto cfg-25) + ) + (let ((v1-14 (lookup-level-info (-> s4-0 want s3-0 name)))) + (if (and v1-14 (-> v1-14 borrow) (-> v1-14 borrow alias) (member (-> gp-0 name) (-> v1-14 borrow alias))) + (goto cfg-25) + ) + ) + ) + (format + 0 + "WARNING: can not find scene level ~A in continue ~A, dropping scene until after load~%" + (-> gp-0 name) + (-> s4-0 name) + ) + (return (the-as scene #f)) + ) + ) + ) + ) + (label cfg-25) + s5-0 + ) + ) + ) + ((scene) + arg0 + ) + ) + ) + ) + +;; definition for method 24 of type scene-player +(defmethod scene-player-method-24 ((this scene-player) (arg0 scene) (arg1 symbol)) + (when (= (-> arg0 type) string) + (let ((v1-2 (scene-lookup arg0))) + (if v1-2 + (set! arg0 v1-2) + ) + ) + ) + (when (or (not arg0) (!= (-> arg0 type) scene)) + (format 0 "ERROR: SCENE: scene-player can not find scene ~A~%" arg0) + (go process-drawable-art-error "scene-list format") + ) + (when arg1 + (let ((s4-1 (get-level-by-heap-ptr-and-status *level* (the-as pointer arg0) 'active))) + (init-spool-by-scene! arg0 (-> this anim)) + (set! (-> this level) s4-1) + ) + (set! (-> this scene) arg0) + ) + arg0 + ) + +;; definition for method 23 of type scene-player +;; WARN: Return type mismatch int vs none. +(defmethod scene-player-method-23 ((this scene-player) (arg0 string) (arg1 symbol)) + (let ((gp-0 (scene-player-method-24 this (the-as scene arg0) #t))) + (when (logtest? (-> gp-0 scene-flags) (scene-flags scf3)) + (let ((a0-2 *traffic-manager*)) + (send-event a0-2 'restore-default-settings) + ) + ) + (send-event *target* 'draw (logtest? (-> gp-0 scene-flags) (scene-flags scf0))) + (let ((s3-0 (entity-by-name (-> gp-0 entity)))) + (when (and (-> gp-0 entity) (not s3-0)) + (format 0 "ERROR: SCENE: scene ~A can not find entity ~A~%" (-> gp-0 name) (-> gp-0 entity)) + (go process-drawable-art-error (-> gp-0 entity)) + ) + (set! (-> this main-entity) (the-as entity-actor s3-0)) + (cond + (s3-0 + (process-drawable-from-entity! this (-> this main-entity)) + (logclear! (-> this mask) (process-mask actor-pause)) + ) + (else + (vector-reset! (-> this root trans)) + (quaternion-identity! (-> this root quat)) + ) + ) + ) + (let ((s3-1 (load-to-heap-by-name (-> *level* level-default art-group) (-> gp-0 art-group) 'load global 0))) + (when (not s3-1) + (format 0 "ERROR: SCENE: scene ~A can not find art-group ~A~%" (-> gp-0 name) (-> gp-0 art-group)) + (go process-drawable-art-error (-> gp-0 art-group)) + ) + (set! (-> this draw art-group) s3-1) + (countdown (v1-31 (-> s3-1 length)) + (when (-> s3-1 data v1-31) + (cond + ((= (-> s3-1 data v1-31 type) merc-ctrl) + (set! (-> this draw mgeo) (the-as merc-ctrl (-> s3-1 data v1-31))) + ) + ((= (-> s3-1 data v1-31 type) art-joint-geo) + (set! (-> this draw jgeo) (the-as art-joint-geo (-> s3-1 data v1-31))) + ) + ) + ) + ) + ) + (cond + ((< (+ (-> this scene-index) 1) (-> this scene-list length)) + (let ((a0-34 (scene-player-method-24 this (-> this scene-list (+ (-> this scene-index) 1)) #f))) + (cond + (a0-34 + (init-spool-by-scene! a0-34 (-> this next-anim)) + ) + (else + (set! (-> this next-anim anim-name) (the-as string 0)) + 0 + ) + ) + ) + ) + (else + (set! (-> this next-anim anim-name) (the-as string 0)) + 0 + ) + ) + (dotimes (s3-2 (-> gp-0 actor length)) + (let ((s2-0 (-> gp-0 actor s3-2))) + (set! (-> s2-0 process) (the-as handle #f)) + (let ((s1-0 (if (-> s2-0 level) + (level-get *level* (-> s2-0 level)) + (-> *level* level-default) + ) + ) + (v1-53 (when level + (let ((s0-0 (art-group-get-by-name *level* (-> s2-0 art-group) (the-as (pointer level) #f)))) + (if (type? s0-0 skeleton-group) + s0-0 + ) + ) + ) + ) + ) + (cond + ((or (not s1-0) (not (or (= (-> s1-0 status) 'active) (= (-> s1-0 status) 'reserved)))) + (format + 0 + "ERROR: SCENE: scene actor ~A can not find an active level ~A~%" + (-> s2-0 art-group) + (-> s2-0 level) + ) + ) + ((not v1-53) + (format + 0 + "ERROR: SCENE: scene actor ~A can not find skeleton-group ~A~%" + (-> s2-0 art-group) + (-> s2-0 art-group) + ) + ) + (else + (load-to-heap-by-name (-> s1-0 art-group) (the-as string (-> v1-53 data 0)) 'load global 0) + ) + ) + ) + ) + ) + (process-entity-status! this (entity-perm-status no-kill) #t) + (when arg1 + (kill-persister *setting-control* (the-as engine-pers 'fail-sfx-volume) 'sfx-volume) + (kill-persister *setting-control* (the-as engine-pers 'fail-dialog-volume) 'dialog-volume) + (kill-persister *setting-control* (the-as engine-pers 'fail-music-volume) 'music-volume) + (set-setting! 'region-mode #f 0.0 0) + (set-setting! 'process-mask 'set 0.0 (-> gp-0 mask-to-clear)) + (if (logtest? (-> gp-0 mask-to-clear) (process-mask movie)) + (set-setting! 'letterbox 'abs 1.0 0) + ) + (set-setting! 'sound-bank-load #f 0.0 0) + (set-setting! 'movie (process->ppointer this) 0.0 0) + (set-setting! 'movie-name (-> gp-0 name) 0.0 0) + (let ((f30-0 (if (>= (-> gp-0 music-volume) 0.0) + (-> gp-0 music-volume) + (-> *setting-control* user-current music-volume-movie) + ) + ) + ) + (set-setting! 'music-volume 'rel f30-0 0) + (set-setting! + 'sfx-volume + 'rel + (if (>= (-> gp-0 sfx-volume) 0.0) + (-> gp-0 sfx-volume) + (-> *setting-control* user-current sfx-volume-movie) + ) + 0 + ) + (set-setting! + 'ambient-volume + 'rel + (if (>= (-> gp-0 ambient-volume) 0.0) + (-> gp-0 ambient-volume) + (-> *setting-control* user-current ambient-volume-movie) + ) + 0 + ) + (when (nonzero? (the int (-> gp-0 music-delay))) + (set-setting! 'music-volume 'abs 0.0 0) + (set! f30-0 0.0) + ) + (remove-setting! 'music) + (if (= f30-0 0.0) + (set-setting! 'music #f 0.0 0) + ) + ) + (set-setting! 'gem #f 0.0 0) + (set-setting! 'citizen-fights #f 0.0 0) + (apply-settings *setting-control*) + ) + ) + 0 + (none) + ) + +;; definition of type subtitle-work +(deftype subtitle-work (structure) + ((draw-tmpl dma-gif-packet :inline) + (color0 vector4w :inline) + (color1 vector4w :inline) + ) + ) + +;; definition for method 3 of type subtitle-work +(defmethod inspect ((this subtitle-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'subtitle-work) + (format #t "~1Tdraw-tmpl: #~%" (-> this draw-tmpl)) + (format #t "~1Tcolor0: #~%" (-> this color0)) + (format #t "~1Tcolor1: #~%" (-> this color1)) + (label cfg-4) + this + ) + +;; definition for symbol *subtitle-work*, type subtitle-work +(define *subtitle-work* (new 'static 'subtitle-work + :draw-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) + ) + :gif (new 'static 'array uint64 2 #x50ab400000008001 #x53531) + ) + :color0 (new 'static 'vector4w :w #x80) + :color1 (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) + ) + ) + +;; definition for function draw-subtitle-image +;; INFO: Used lq/sq +;; WARN: Return type mismatch pointer vs none. +(defun draw-subtitle-image ((arg0 subtitle-image) (arg1 font-context)) + (local-vars (sv-16 pointer) (sv-32 int)) + (let ((gp-0 (-> arg0 width)) + (s5-0 (-> arg0 height)) + ) + (let ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf))) + (set! sv-16 (-> s4-0 base)) + (unpack-comp-rle (the-as (pointer int8) sv-16) (the-as (pointer int8) (-> arg0 data))) + (&+! (-> s4-0 base) (logand -16 (+ (shr (* gp-0 s5-0) 1) 15))) + ) + (with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-pris2) + ) + (upload-vram-data s3-0 0 (-> arg0 palette) 2 8) + (let ((s0-0 20)) + (dma-buffer-add-gs-set s3-0 + (bitbltbuf (new 'static 'gs-bitbltbuf :dbp #x1 :dbw (shr gp-0 6) :dpsm s0-0)) + (trxpos (new 'static 'gs-trxpos)) + (trxreg (new 'static 'gs-trxreg :rrw gp-0 :rrh s5-0)) + (trxdir (new 'static 'gs-trxdir)) + ) + (let ((t9-2 dma-buffer-add-ref-texture) + (a0-13 s3-0) + (a2-8 gp-0) + (a3-1 s5-0) + (t0-1 s0-0) + ) + (t9-2 a0-13 sv-16 (the-as int a2-8) (the-as int a3-1) (the-as gs-psm t0-1)) + ) + (set! sv-32 (+ (log2 (the-as int (+ gp-0 -1))) 1)) + (let ((v1-17 (+ (log2 (the-as int (+ s5-0 -1))) 1))) + (dma-buffer-add-gs-set s3-0 + (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)) + (tex0-1 (new 'static 'gs-tex0 :tbp0 #x1 :tcc #x1 :cld #x1 :psm s0-0 :th v1-17 :tw sv-32 :tbw (shr gp-0 6))) + (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-28 (-> s3-0 base)) + (a2-23 + (+ (- 1793 (the-as int (shr (-> arg0 width) 1))) (the int (+ (-> arg1 origin x) (* 0.5 (-> arg1 width))))) + ) + (a3-8 (+ (the int (-> arg1 origin y)) 1841)) + (a0-23 (+ a2-23 (-> arg0 width))) + (a1-33 (+ a3-8 (-> arg0 height))) + ) + (set! (-> (the-as (pointer uint128) v1-28) 0) (-> *subtitle-work* draw-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) v1-28) 1) (-> *subtitle-work* draw-tmpl quad 1)) + (set! (-> (the-as (pointer uint128) v1-28) 2) (-> *subtitle-work* color0 quad)) + (set-vector! (the-as vector4w (&+ v1-28 48)) 0 0 0 0) + (set-vector! (the-as vector4w (&+ v1-28 64)) (the-as int (* a2-23 16)) (* a3-8 16) 0 0) + (set-vector! (the-as vector4w (&+ v1-28 80)) (the-as int (* gp-0 16)) (the-as int (* s5-0 16)) 0 0) + (set-vector! (the-as vector4w (&+ v1-28 96)) (the-as int (* a0-23 16)) (* a1-33 16) 0 0) + ) + (&+! (-> s3-0 base) 112) + (let* ((v1-32 (-> s3-0 base)) + (a1-38 + (+ (- 1792 (the-as int (shr (-> arg0 width) 1))) (the int (+ (-> arg1 origin x) (* 0.5 (-> arg1 width))))) + ) + (a3-11 (+ (the int (-> arg1 origin y)) 1840)) + (a0-30 (+ a1-38 (-> arg0 width))) + (a2-28 (+ a3-11 (-> arg0 height))) + ) + (set! (-> (the-as (pointer uint128) v1-32) 0) (-> *subtitle-work* draw-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) v1-32) 1) (-> *subtitle-work* draw-tmpl quad 1)) + (set! (-> (the-as (pointer uint128) v1-32) 2) (-> *subtitle-work* color1 quad)) + (set-vector! (the-as vector4w (&+ v1-32 48)) 0 0 0 0) + (set-vector! (the-as vector4w (&+ v1-32 64)) (the-as int (* a1-38 16)) (* a3-11 16) 0 0) + (set-vector! (the-as vector4w (&+ v1-32 80)) (the-as int (* gp-0 16)) (the-as int (* s5-0 16)) 0 0) + (set-vector! (the-as vector4w (&+ v1-32 96)) (the-as int (* a0-30 16)) (* a2-28 16) 0 0) + ) + (&+! (-> s3-0 base) 112) + (set-dirty-mask! (-> *level* level-default) 8 (the-as int (* gp-0 s5-0)) 256) + ) + ) + (none) + ) + +;; definition for function process-drawable-draw-subtitles +;; WARN: Return type mismatch int vs none. +(defbehavior process-drawable-draw-subtitles process-drawable () + (when (and (nonzero? (-> self skel)) + (> (-> self skel active-channels) 0) + (-> *setting-control* user-current subtitle) + ) + (let ((v1-9 (-> self skel root-channel 0 frame-group))) + (when v1-9 + (let ((gp-0 (res-lump-struct (-> v1-9 extra) 'subtitle-range (array subtitle-range)))) + (when gp-0 + (let ((f30-0 (ja-aframe-num 0)) + (s5-0 (the-as int (-> *setting-control* user-current subtitle-language))) + ) + (if (and (= (the-as language-enum s5-0) (language-enum english)) (= (scf-get-territory) 1)) + (set! s5-0 11) + ) + (dotimes (s4-0 (-> gp-0 length)) + (let ((v1-16 (-> gp-0 s4-0))) + (when (and (>= f30-0 (-> v1-16 start-frame)) (< f30-0 (-> v1-16 end-frame))) + (let ((s3-0 (-> v1-16 message s5-0))) + (when (and s3-0 (nonzero? s3-0)) + (let ((s2-0 + (new 'stack 'font-context *font-default-matrix* 20 290 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-20 s2-0)) + (set! (-> v1-20 width) (the float 465)) + ) + (let ((v1-21 s2-0)) + (set! (-> v1-21 height) (the float 70)) + ) + (let ((v1-22 s2-0)) + (set! (-> v1-22 scale) 0.5) + ) + (set! (-> s2-0 flags) (font-flags shadow kerning middle large)) + (case (-> s3-0 type) + ((string) + (when (= (-> *setting-control* user-default subtitle-language) (language-enum korean)) + (set! s3-0 (convert-korean-text (the-as string s3-0))) + (let ((v1-27 s2-0)) + (set! (-> v1-27 scale) 0.6) + ) + ) + (when (= (-> *setting-control* user-default subtitle-language) (language-enum russian)) + (let ((v1-30 s2-0)) + (set! (-> v1-30 scale) 0.75) + ) + ) + (set! (-> s2-0 flags) (font-flags kerning middle middle-vert large)) + (+! (-> s2-0 origin x) -1.0) + (+! (-> s2-0 origin y) -1.0) + (set! (-> s2-0 color) (font-color font-color-39)) + (+! (-> s2-0 origin x) 1.0) + (+! (-> s2-0 origin y) 1.0) + (set! (-> s2-0 color) (font-color default)) + (set! (-> s2-0 flags) (font-flags shadow kerning middle middle-vert large)) + (print-game-text (the-as string s3-0) s2-0 #f 44 (bucket-id hud-draw-pris2)) + (gui-control-method-12 + *gui-control* + self + (gui-channel subtitle) + (gui-action play) + "scene" + 0 + 81920.0 + (new 'static 'sound-id) + ) + ) + ((subtitle-image) + (draw-subtitle-image (the-as subtitle-image s3-0) s2-0) + ) + (else + (if *debug-segment* + (format *stdcon* "unknown message ~A~%" s3-0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate wait (scene-player) + :virtual #t + :enter (behavior ((arg0 symbol)) + (set-time! (-> self state-time)) + (if (= (-> *game-info* demo-state) 101) + (set-setting! 'audio-language #f 0.0 5) + ) + (when (or (-> self scene) (-> self preload-continue)) + (let ((gp-0 (scene-decode-continue (if (-> self scene) + (-> self scene load-point) + (-> self preload-continue) + ) + ) + ) + ) + (when gp-0 + (when (-> self scene) + (set-setting! 'borrow (-> self scene borrow) 0.0 0) + (apply-settings *setting-control*) + ) + (cond + ((and *target* + (zero? (-> self scene-index)) + (or (not (-> self scene)) + (!= (status-of-level-and-borrows *level* (-> gp-0 vis-nick) #f) 'active) + (logtest? (-> self scene scene-flags) (scene-flags scf5)) + ) + ) + (send-event *target* 'continue gp-0) + ) + (else + (let ((a0-16 (lookup-level-info (-> gp-0 vis-nick)))) + (set! (-> *load-state* vis-nick) (if a0-16 + (-> a0-16 name) + ) + ) + ) + (dotimes (v1-28 10) + (cond + ((< v1-28 (-> gp-0 want-count)) + (set! (-> *load-state* want v1-28 name) (-> gp-0 want v1-28 name)) + (set! (-> *load-state* want v1-28 display?) (-> gp-0 want v1-28 display?)) + ) + (else + (set! (-> *load-state* want v1-28 name) #f) + (set! (-> *load-state* want v1-28 display?) #f) + ) + ) + (set! (-> *load-state* want v1-28 force-vis?) #f) + (set! (-> *load-state* want v1-28 force-inside?) #f) + ) + (update-task-masks 'event) + ) + ) + ) + ) + ) + ) + :trans (behavior () + (if (and (-> self scene) (nonzero? (-> self anim anim-name)) (not (load-in-progress? *level*))) + (gui-control-method-12 + *gui-control* + self + (gui-channel art-load) + (gui-action queue) + (-> self anim name) + 0 + -1.0 + (new 'static 'sound-id) + ) + ) + (set! (-> *ACTOR-bank* birth-max) 1000) + ) + :code (behavior ((arg0 symbol)) + (local-vars (v1-18 symbol) (v1-124 symbol)) + (when (and (-> self scene) (zero? (-> self scene wait-max-time))) + (while *progress-process* + (suspend) + ) + (set-setting! 'allow-progress #f 0.0 0) + (set-setting! 'bg-a-force 'abs 1.0 0) + (apply-settings *setting-control*) + ) + (if (or (not *target*) + (or (focus-test? *target* grabbed) + (begin + (dotimes (v1-17 10) + (when (and (-> *target* current-level) (= (-> *load-state* target v1-17 name) (-> *target* current-level name))) + (set! v1-18 #f) + (goto cfg-22) + ) + ) + #t + (set! v1-18 #t) + (label cfg-22) + (or v1-18 (not (-> self scene))) + ) + ) + ) + (set! arg0 #f) + ) + (while (and arg0 + (or (focus-test? *target* in-air) + (and (-> *target* next-state) (= (-> *target* next-state name) 'target-flop-hit-ground)) + ) + (-> self scene) + (not (time-elapsed? (-> self state-time) (-> self scene wait-air-time))) + ) + (suspend) + ) + (suspend) + (let ((s5-0 (current-time))) + (when (and *target* (not (logtest? (-> *target* focus-status) (focus-status grabbed)))) + (label cfg-47) + (send-event *target* 'end-mode 'freeze 'force) + (when (not (process-grab? *target* #f)) + (suspend) + (goto cfg-47) + ) + ) + (process-entity-status! self (entity-perm-status no-kill) #t) + (until (not (or (-> *setting-control* user-current talking) + (-> *setting-control* user-current spooling) + (-> *setting-control* user-current hint) + (-> *setting-control* user-current ambient) + ) + ) + (set-setting! 'allow-progress #f 0.0 0) + (apply-settings *setting-control*) + (dotimes (s4-0 2) + (while (or (-> *setting-control* user-current talking) + (-> *setting-control* user-current spooling) + (-> *setting-control* user-current hint) + (-> *setting-control* user-current ambient) + (or (and (-> *setting-control* user-current movie) + (!= (-> *setting-control* user-current movie) (process->ppointer self)) + ) + *progress-process* + (!= (get-status *gui-control* (-> self gui-id)) 3) + ) + ) + (suspend) + ) + ) + (when arg0 + (while (and (-> self scene) (not (or (time-elapsed? s5-0 (-> self scene wait-ground-time)) + (time-elapsed? (-> self state-time) (-> self scene wait-max-time)) + ) + ) + ) + (suspend) + ) + ) + (remove-setting! 'movie) + (remove-setting! 'sound-bank-load) + (remove-setting! 'movie-name) + (remove-setting! 'bg-a-force) + (apply-settings *setting-control*) + (set-blackout-frames (seconds 0.1)) + (suspend) + (set-blackout-frames (seconds 0.1)) + (suspend) + ) + ) + (send-event *target* 'trans 'save (-> self old-target-pos)) + (let ((gp-1 *load-state*)) + (when gp-1 + (dotimes (s5-1 2) + (while (begin + (dotimes (s4-1 10) + (when (not (or (not (-> gp-1 want s4-1 name)) + (not (-> gp-1 want s4-1 display?)) + (= (status-of-level-and-borrows *level* (-> gp-1 want s4-1 name) 'all) 'active) + ) + ) + (set! v1-124 #t) + (goto cfg-114) + ) + ) + (set! v1-124 #f) + (label cfg-114) + v1-124 + ) + (set-blackout-frames (seconds 0.1)) + (suspend) + ) + (when (and (zero? s5-1) (< (-> self scene-index) (-> self scene-list length))) + (scene-player-method-24 self (-> self scene-list (-> self scene-index)) #t) + (when (-> self scene) + (set-setting! 'borrow (-> self scene borrow) 0.0 0) + (apply-settings *setting-control*) + ) + ) + ) + ) + ) + (when (and *target* (focus-test? *target* in-head flut light board pilot mech dark)) + (send-event *target* 'change-mode 'normal) + (set-action! + *gui-control* + (gui-action stop) + (the-as sound-id 1) + (gui-channel jak) + (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 jak-mode) + (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 jak-effect-1) + (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 jak-effect-2) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (when (< (-> self scene-index) (-> self scene-list length)) + (scene-player-method-24 self (-> self scene-list (-> self scene-index)) #t) + (while (and (-> self scene) + (nonzero? (-> self anim anim-name)) + (let ((v1-175 (file-status *art-control* (-> self anim name) 0))) + (or (not (or (= v1-175 'active) (= v1-175 'locked))) + (let* ((a1-32 + (lookup-gui-connection-id *gui-control* (-> self anim anim-name) (gui-channel art-load) (gui-action none)) + ) + (v1-181 (get-status *gui-control* a1-32)) + ) + (not (or (= v1-181 (gui-status ready)) (= v1-181 (gui-status active)))) + ) + ) + ) + ) + (set-blackout-frames (seconds 0.1)) + (suspend) + ) + ) + (go-virtual play-anim) + ) + ) + +;; failed to figure out what this is: +(defstate release (scene-player) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('user-data-set!) + (let ((v0-0 (-> block param 0))) + (set! (-> self user-data) v0-0) + v0-0 + ) + ) + (('user-data) + (-> self user-data) + ) + ) + ) + :code (behavior () + (remove-setting! 'borrow) + (when (scene-select?) + (remove-setting! 'audio-language) + (logclear! (-> self mask) (process-mask pause progress)) + (set-blackout-frames (seconds 0.05)) + (set-setting! 'music-volume 'abs 0.0 0) + (set-setting! 'sfx-volume 'abs 0.0 0) + (set-setting! 'ambient-volume 'abs 0.0 0) + (set-setting! 'allow-pause #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) + (setup + *screen-filter* + (new 'static 'vector) + (new 'static 'vector :w 128.0) + (* 30.0 (seconds-per-frame)) + (bucket-id tex-hud-pris2) + #x3fffff + #x33001 + #t + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.05)) + (suspend) + ) + ) + (set! (-> *setting-control* user-current bg-a) 0.0) + (remove-setting! 'movie) + (remove-setting! 'movie-name) + (while (or (-> *setting-control* user-current movie) + (not *target*) + (or (!= (-> *setting-control* user-current bg-a) 0.0) (load-in-progress? *level*)) + ) + (suspend) + ) + (set! (-> *game-info* blackout-time) 0) + (set! (-> *game-info* demo-state) (the-as uint 1)) + (set! (-> *setting-control* user-current bg-a-force) 0.0) + (set-setting! 'allow-progress #t 0.0 0) + (remove-setting! 'process-mask) + (remove-setting! 'letterbox) + (apply-settings *setting-control*) + (send-event *target* 'draw #t) + (send-event *target* 'trans 'reset) + (send-event *target* 'change-mode 'normal) + (activate-progress *dproc* 'select-scene-special) + (dotimes (gp-1 5) + (suspend) + ) + (disable *screen-filter*) + (deactivate self) + ) + (when (< (-> self scene-index) (+ (-> self scene-list length) -1)) + (set! (-> self scene-index) (+ (-> self scene-list length) -1)) + (scene-player-method-24 self (-> self scene-list (-> self scene-index)) #t) + ) + (let ((gp-2 (or (not (-> self scene)) (if (= (-> self blackout-end) 'none) + (logtest? (-> self scene scene-flags) (scene-flags scf2)) + (-> self blackout-end) + ) + ) + ) + ) + (if gp-2 + (set-blackout-frames (seconds 0.1)) + ) + (send-event *target* 'draw #t) + (send-event *target* 'trans 'reset) + (suspend) + (while (not (process-release? *target*)) + (suspend) + (if gp-2 + (set-blackout-frames (seconds 0.1)) + ) + ) + (if gp-2 + (set-blackout-frames (seconds 0.1)) + ) + ) + (when (nonzero? (the int (-> self scene music-delay))) + (persist-with-delay + *setting-control* + 'music-volume-movie + (the-as time-frame (the int (-> self scene music-delay))) + 'music-volume + 'abs + 0.0 + 0 + ) + (persist-with-delay + *setting-control* + 'music-delay + (the-as time-frame (the int (-> self scene music-delay))) + 'music + #f + 0.0 + 0 + ) + ) + (cond + ((and *target* (-> self scene) (or (-> self end-point) (-> self scene end-point))) + (let ((t9-32 scene-decode-continue) + (a0-37 (-> self end-point)) + ) + (set! a0-37 (cond + (a0-37 + (empty) + a0-37 + ) + (else + (-> self scene end-point) + ) + ) + ) + (let ((gp-4 (t9-32 a0-37))) + (when gp-4 + (persist-with-delay + *setting-control* + 'fail-sfx-volume + (seconds 10) + 'sfx-volume + 'abs + (-> *setting-control* user-target sfx-volume) + 0 + ) + (persist-with-delay + *setting-control* + 'fail-music-volume + (seconds 10) + 'music-volume + 'abs + (-> *setting-control* user-target music-volume) + 0 + ) + (persist-with-delay + *setting-control* + 'fail-dialog-volume + (seconds 10) + 'dialog-volume + 'abs + (-> *setting-control* user-target dialog-volume) + 0 + ) + (set-continue! *game-info* gp-4 #f) + (send-event *target* 'continue gp-4) + ) + ) + ) + ) + (else + (send-event *target* 'trans 'restore (-> self old-target-pos)) + ) + ) + (if (and (-> self scene) (logtest? (-> self scene scene-flags) (scene-flags scf4))) + (auto-save-user) + ) + (when (and (-> self scene) (-> self scene on-complete)) + (while (and *target* (focus-test? *target* teleporting)) + (suspend) + ) + (script-eval (-> self scene on-complete)) + ) + ) + ) + +;; failed to figure out what this is: +(defstate play-anim (scene-player) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 object)) + (case message + (('trans-hook) + (set! v0-0 (-> block param 0)) + (set! (-> self new-trans-hook) (the-as (function none) v0-0)) + v0-0 + ) + (('eval) + ((the-as (function scene-player none) (-> block param 0)) self) + ) + (('abort) + (set! (-> self aborted?) #t) + (set-blackout-frames (seconds 0.2)) + (let ((a0-9 (-> self anim))) + (when (and a0-9 (= (-> *setting-control* user-current spooling) (process->ppointer self))) + (ja-abort-spooled-anim a0-9 (the-as art-joint-anim #f) -1) + (ja-channel-set! 0) + ) + ) + (go-virtual release) + ) + (('change-entity) + (let ((v1-9 (entity-by-name (the-as string (-> block param 0))))) + (set! (-> self main-entity) (the-as entity-actor v1-9)) + (cond + (v1-9 + (process-drawable-from-entity! self (-> self main-entity)) + (set! v0-0 (logclear (-> self mask) (process-mask actor-pause))) + (set! (-> self mask) (the-as process-mask v0-0)) + v0-0 + ) + (else + (format 0 "ERROR: SCENE: scene ~A can not find entity ~A~%" (-> self scene name) (-> block param 0)) + (vector-reset! (-> self root trans)) + (quaternion-identity! (-> self root quat)) + ) + ) + ) + ) + (('user-data-set!) + (set! v0-0 (-> block param 0)) + (set! (-> self user-data) (the-as uint v0-0)) + v0-0 + ) + (('user-data) + (-> self user-data) + ) + ) + ) + :enter (behavior () + (set-setting! 'ambient-wind-scalar #f 0.0 0) + (if (and (logtest? (-> self scene scene-flags) (scene-flags scf6)) *rigid-body-queue-manager*) + (change-parent self *rigid-body-queue-manager*) + ) + ) + :exit (behavior () + (while (-> self child) + (deactivate (-> self child 0)) + ) + (kill-current-talker '() '(daxter voicebox message) 'exit) + (set! (-> *setting-control* user-current bg-a) 0.0) + (kill-persister *setting-control* (the-as engine-pers 'bg-a) 'bg-a) + (kill-persister *setting-control* (the-as engine-pers 'bg-a-speed) 'bg-a-speed) + (if (not (and (-> self next-state) (= (-> self next-state name) 'wait))) + (remove-setting! 'borrow) + ) + (remove-setting! 'gem) + (apply-settings *setting-control*) + ) + :trans (behavior () + (if (!= (-> self cur-trans-hook) (-> self new-trans-hook)) + (set! (-> self cur-trans-hook) (-> self new-trans-hook)) + ) + (cond + ((not (-> *setting-control* user-current spooling)) + (if (and (-> self scene) (nonzero? (-> self anim anim-name))) + (gui-control-method-12 + *gui-control* + self + (gui-channel art-load) + (gui-action queue) + (-> self anim name) + 0 + -1.0 + (new 'static 'sound-id) + ) + ) + ) + (else + (if (and (-> self scene) (nonzero? (-> self next-anim anim-name))) + (gui-control-method-12 + *gui-control* + self + (gui-channel art-load) + (gui-action queue) + (-> self next-anim name) + 0 + -1.0 + (new 'static 'sound-id) + ) + ) + ) + ) + (when (logtest? (-> self scene scene-flags) (scene-flags scf6)) + (let ((v1-26 (handle->process (-> *target* pilot vehicle)))) + (when v1-26 + (set! (-> self root trans quad) (-> (the-as process-drawable v1-26) root trans quad)) + (quaternion-copy! (-> self root quat) (-> (the-as process-drawable v1-26) root quat)) + ) + ) + ) + (if (and (-> self scene) (-> self scene on-running)) + (script-eval (-> self scene on-running)) + ) + (when (and (logtest? (-> self scene scene-flags) (scene-flags scf8)) + (not (-> self preload-sound)) + (-> self scene) + (-> self scene end-point) + (< 10.0 (ja-aframe-num 0)) + ) + (let ((t9-6 scene-decode-continue) + (a0-20 (-> self end-point)) + ) + (set! a0-20 (cond + (a0-20 + (empty) + a0-20 + ) + (else + (-> self scene end-point) + ) + ) + ) + (let ((v1-49 (t9-6 a0-20))) + (when v1-49 + (dotimes (a0-22 3) + (set! (-> *load-state* want-sound a0-22 name) (-> v1-49 want-sound a0-22)) + (set! (-> *load-state* want-sound a0-22 mode) (sound-bank-mode unknown)) + (set! (-> *backup-load-state* want-sound a0-22 name) (-> v1-49 want-sound a0-22)) + (set! (-> *backup-load-state* want-sound a0-22 mode) (sound-bank-mode unknown)) + ) + (remove-setting! 'sound-bank-load) + (add-borrow-levels *load-state*) + ) + ) + ) + (set! (-> self preload-sound) (the-as basic #t)) + ) + ((-> self cur-trans-hook)) + ) + :code (behavior () + (local-vars (a0-29 symbol)) + (when (or *debug-menu-scene-play* (and (scene-select?) (-> self scene) (nonzero? (-> self scene scene-task)))) + (task-node-open! (the-as game-task-node (-> self scene scene-task)) 'event) + (logior! (-> self mask) (process-mask no-kill)) + (if (not (logtest? (-> self scene scene-flags) (scene-flags scf6))) + (reset-actors 'debug) + ) + (logclear! (-> self mask) (process-mask no-kill)) + ) + (dotimes (gp-0 2) + (let ((v1-17 (-> *art-control* buffer gp-0))) + (if (= (-> v1-17 status) 'active) + (link-art-to-master (-> v1-17 art-group)) + ) + ) + ) + (while (and (< (-> self scene-index) (-> self scene-list length)) (not (-> self aborted?))) + (scene-player-method-23 self (the-as string (-> self scene-list (-> self scene-index))) #t) + (kill-persister *setting-control* (the-as engine-pers 'title-control-scene) 'render) + (set-blackout-frames (seconds 0.1)) + (suspend) + (set-blackout-frames (seconds 0.1)) + (suspend) + (when (not (-> *setting-control* user-current border-mode)) + (set! (-> *setting-control* user-default border-mode) #t) + (set! (-> *level* play?) (-> *setting-control* user-default border-mode)) + (apply-settings *setting-control*) + ) + (scene-player-method-25 self 0.0 -1.0) + (set! (-> self cur-speed) 0.0) + (set-time! (-> self scene-start-time)) + (ja-play-spooled-anim + (-> self anim) + (the-as art-joint-anim #f) + (the-as art-joint-anim #f) + (the-as + (function process-drawable symbol) + (if (logtest? (-> self scene scene-flags) (scene-flags scf1)) + (lambda :behavior scene-player + () + (when (cpad-pressed? 0 triangle) + (set! (-> self aborted?) #t) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) + #t + ) + (none) + ) + false-func + ) + ) + (if (logtest? (-> self scene scene-flags) (scene-flags scf7)) + (spooler-flags) + (spooler-flags blackout-on-stall) + ) + ) + (while (-> self child) + (deactivate (-> self child 0)) + ) + (+! (-> self scene-index) 1) + (when (and (< (-> self scene-index) (-> self scene-list length)) (not (-> self aborted?))) + (let ((v1-61 (scene-player-method-24 self (-> self scene-list (-> self scene-index)) #t))) + (when v1-61 + (let ((a0-26 (scene-decode-continue (-> v1-61 load-point)))) + (set! a0-29 (when (and a0-26 (logtest? (-> a0-26 flags) (continue-flags scene-wait))) + (go-virtual wait a0-29) + a0-29 + ) + ) + ) + ) + ) + ) + ) + (if (and (-> self wait) *target* (focus-test? *target* grabbed)) + (go-virtual release) + ) + ) + :post (behavior () + (when (-> self scene) + (let ((gp-0 (-> self scene cut-list)) + (s5-0 (-> self skel root-channel 0 frame-group)) + ) + (when (not (or (null? gp-0) (not s5-0) (zero? s5-0))) + (let ((v1-8 (the int (ja-frame-num 0))) + (a0-2 (car gp-0)) + ) + (while (not (null? gp-0)) + (let ((f0-5 (/ (- (the float (/ (the-as int a0-2) 8)) (-> s5-0 artist-base)) (-> s5-0 artist-step)))) + (when (= v1-8 (if (= f0-5 (the float (the int f0-5))) + (+ (the int f0-5) -1) + (the int f0-5) + ) + ) + (set! (-> self skel root-channel 0 frame-num) (the float (the int (-> self skel root-channel 0 frame-num)))) + (set! (-> self pre-cut-frame) (the-as basic #t)) + ) + ) + (set! gp-0 (cdr gp-0)) + (set! a0-2 (car gp-0)) + ) + ) + ) + ) + (if (-> self pre-cut-frame) + (set! (-> self pre-cut-frame) #f) + ) + ) + (when (and (-> self scene) (nonzero? (-> self skel active-channels))) + (when (and (< (ja-aframe-num 0) 2.0) + (< (-> *display* base-clock frame-counter) (-> *game-info* blackout-time)) + (logtest? (-> self skel status) (joint-control-status valid-spooled-frame)) + ) + (set-blackout-frames 0) + (set-blackout-frames (seconds 0.017)) + ) + (scene-player-method-25 self (ja-aframe-num 0) (-> self last-frame)) + (set! (-> self last-frame) (ja-aframe-num 0)) + (set! (-> self dma-max) + (the-as uint (max + (the-as int (-> self dma-max)) + (* (dma-buffer-length (-> *display* frames (-> *display* last-screen) global-buf)) 16) + ) + ) + ) + (let ((gp-4 *display-scene-control*)) + (when (nonzero? gp-4) + (if (logtest? gp-4 (scene-controls bounds-spheres)) + (debug-print-channels (-> self skel) (the-as symbol *stdcon*)) + ) + (if (logtest? gp-4 (scene-controls actors)) + (format *stdcon* "anim ~-30S " (-> self scene anim)) + ) + (if (logtest? gp-4 (scene-controls actor-marks)) + (format + *stdcon* + "dma ~DK / ~DK" + (shr (* (dma-buffer-length (-> *display* frames (-> *display* last-screen) global-buf)) 16) 10) + (shr (-> self dma-max) 10) + ) + ) + (if (logtest? gp-4 (scene-controls actors actor-marks)) + (format *stdcon* "~%") + ) + (when (logtest? gp-4 (scene-controls special-fma-spheres)) + (dotimes (s5-3 (-> self scene actor length)) + (let* ((s4-1 (handle->process (-> self scene actor s5-3 process))) + (v1-66 (if (type? s4-1 process-drawable) + (the-as process-drawable s4-1) + ) + ) + ) + (if (and v1-66 (nonzero? (-> v1-66 draw))) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + (-> v1-66 draw origin) + (-> v1-66 draw bounds w) + (new 'static 'rgba :b #xff :a #x80) + ) + ) + ) + ) + ) + (when (logtest? gp-4 (scene-controls scene-controls-7)) + (dotimes (s5-4 (-> self scene actor length)) + (let* ((s4-2 (handle->process (-> self scene actor s5-4 process))) + (v1-82 (if (type? s4-2 process-drawable) + (the-as process-drawable s4-2) + ) + ) + ) + (if (and v1-82 (nonzero? (-> v1-82 draw))) + (format + *stdcon* + "~0K ~-30S ~S d:~4,,0m r:~4,,0m~1K~%" + (-> self scene actor s5-4 art-group) + (if (logtest? (-> v1-82 draw status) (draw-control-status on-screen)) + "os" + " " + ) + (-> v1-82 draw distance) + (-> v1-82 draw bounds w) + ) + ) + ) + ) + ) + (when (logtest? gp-4 (scene-controls scene-controls-8)) + (dotimes (gp-5 (-> self scene actor length)) + (let* ((s5-5 (handle->process (-> self scene actor gp-5 process))) + (v1-97 (if (type? s5-5 process-drawable) + (the-as process-drawable s5-5) + ) + ) + ) + (if (and v1-97 (nonzero? (-> v1-97 draw))) + (add-debug-text-3d + #t + (bucket-id debug-no-zbuf1) + (-> v1-97 name) + (-> v1-97 draw origin) + (font-color yellow) + (new 'static 'vector2h :y 8) + ) + ) + ) + ) + ) + ) + ) + ) + (when (cpad-pressed? 0 square) + (set! (-> *setting-control* user-default subtitle) (not (-> *setting-control* user-default subtitle))) + (set-time! (-> self subtitle-change-time)) + ) + (when (and (not (time-elapsed? (-> self subtitle-change-time) (seconds 2))) + (< (mod (- (current-time) (-> self subtitle-change-time)) 300) 210) + ) + (let ((gp-6 + (new 'stack 'font-context *font-default-matrix* 36 60 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-124 gp-6)) + (set! (-> v1-124 width) (the float 440)) + ) + (let ((v1-125 gp-6)) + (set! (-> v1-125 height) (the float 48)) + ) + (let ((v1-126 gp-6)) + (set! (-> v1-126 scale) 0.5) + ) + (set! (-> gp-6 flags) (font-flags shadow kerning middle large)) + (print-game-text + (lookup-text! + *common-text* + (if (-> *setting-control* user-default subtitle) + (text-id text-020b) + (text-id text-020c) + ) + #f + ) + gp-6 + #f + 44 + (bucket-id hud-draw-pris2) + ) + ) + ) + (process-drawable-draw-subtitles) + (when (-> self scene) + (let ((gp-7 + (lookup-gui-connection *gui-control* self (gui-channel art-load) (-> self scene anim) (new 'static 'sound-id)) + ) + ) + (when (and (= *cheat-mode* 'debug) (!= *external-cam-mode* 'pad-0)) + (cond + ((cpad-hold? 0 r1) + (if (cpad-pressed? 0 circle) + (set-time! (-> self speed-press-time)) + ) + (seek! + (-> self speed-change-speed) + 8.0 + (* (lerp-scale 0.01 0.3 (the float (- (current-time) (-> self speed-press-time))) 0.0 300.0) + (-> self clock time-adjust-ratio) + ) + ) + ) + ((cpad-hold? 0 l1) + (if (cpad-pressed? 0 square) + (set-time! (-> self speed-press-time)) + ) + (seek! + (-> self speed-change-speed) + -8.0 + (* (lerp-scale 0.01 0.3 (the float (- (current-time) (-> self speed-press-time))) 0.0 300.0) + (-> self clock time-adjust-ratio) + ) + ) + ) + ((cpad-hold? 0 x) + (when (cpad-pressed? 0 x) + (set-time! (-> self speed-press-time)) + (cond + ((= (-> self cur-speed) 0.0) + (set! (-> self speed-change-speed) -1000.0) + ) + (else + (set! (-> self targ-speed) 0.0) + (set! (-> self speed-change-speed) 0.0) + ) + ) + ) + ) + (else + (set! (-> self speed-change-speed) 0.0) + ) + ) + ) + (cond + ((not gp-7) + ) + ((= (-> self cur-speed) -1000.0) + (format *stdcon* "scene paused~%") + (when (!= (-> self targ-speed) -1000.0) + (sound-continue (-> gp-7 id)) + (when *sound-player-enable* + (let ((v1-190 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-190 command) (sound-command set-param)) + (set! (-> v1-190 id) (-> gp-7 id)) + (set! (-> v1-190 params pitch-mod) 0) + (set! (-> v1-190 params mask) (the-as uint 2)) + (-> v1-190 id) + ) + ) + (set! (-> self targ-speed) 0.0) + (set! (-> self cur-speed) 0.0) + (set-time! (-> self speed-change-time)) + ) + ) + ((= (-> self speed-change-speed) -1000.0) + (when (!= (-> self cur-speed) -1000.0) + (set-time! (-> self speed-change-time)) + (set! (-> self targ-speed) -1000.0) + (set! (-> self cur-speed) -1000.0) + (sound-pause (-> gp-7 id)) + ) + ) + (else + (set! (-> self targ-speed) + (fmax -10.0 (fmin 10.0 (+ (-> self targ-speed) (* (-> self speed-change-speed) (seconds-per-frame))))) + ) + (if (and (= *cheat-mode* 'debug) (not (time-elapsed? (-> self speed-change-time) (seconds 3)))) + (format + *stdcon* + "id ~d speed ~f~%" + (if gp-7 + (the-as int (-> gp-7 id)) + 0 + ) + (-> self targ-speed) + ) + ) + (cond + ((!= (-> self targ-speed) 0.0) + ) + ((logtest? (game-secrets fast-movie) (-> *game-info* secrets)) + (set! (-> self targ-speed) 0.2) + ) + ((logtest? (game-secrets slow-movie) (-> *game-info* secrets)) + (set! (-> self targ-speed) -0.2) + ) + ) + (when (and gp-7 (and (!= (-> self targ-speed) (-> self cur-speed)) + (< (-> self speed-change-time) (current-time)) + (time-elapsed? (-> self scene-start-time) (seconds 1)) + ) + ) + (when *sound-player-enable* + (let ((v1-229 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-229 command) (sound-command set-param)) + (set! (-> v1-229 id) (-> gp-7 id)) + (set! (-> v1-229 params pitch-mod) (the int (* 1524.0 (-> self targ-speed)))) + (set! (-> v1-229 params mask) (the-as uint 2)) + (-> v1-229 id) + ) + ) + (set! (-> self cur-speed) (-> self targ-speed)) + (set-time! (-> self speed-change-time)) + ) + ) + ) + ) + ) + ) + ) + +;; definition for function scene-player-init +;; WARN: Return type mismatch object vs none. +;; INFO: Process stack size was changed from 512 to 1024 +(defbehavior scene-player-init scene-player ((arg0 object) (arg1 symbol) (arg2 string)) + (process-entity-set! self (the-as entity #f)) + (stack-size-set! (-> self main-thread) 1024) + (set! (-> self root) (new 'process 'trsqv)) + (case (rtype-of arg0) + ((array) + (set! (-> self scene-list) (new 'process 'boxed-array scene (-> (the-as (array scene) arg0) length))) + (dotimes (v1-7 (-> self scene-list length)) + (set! (-> self scene-list v1-7) (-> (the-as (array scene) arg0) v1-7)) + ) + ) + ((pair) + (let ((s3-0 (method-of-type array new)) + (s2-0 'process) + (s1-0 array) + (s0-0 scene) + (a0-14 arg0) + ) + (set! (-> self scene-list) + (the-as (array scene) (s3-0 s2-0 s1-0 s0-0 ((method-of-type (rtype-of a0-14) length) a0-14))) + ) + ) + (dotimes (s3-1 (-> self scene-list length)) + (set! (-> self scene-list s3-1) (the-as scene (ref arg0 s3-1))) + ) + ) + (else + (set! (-> self scene-list) (new 'process 'boxed-array scene 1)) + (set! (-> self scene-list 0) (the-as scene arg0)) + ) + ) + (set! (-> self preload-continue) arg2) + (set! (-> self camera) (the-as handle #f)) + (set! (-> self wait) arg1) + (set! (-> self pre-cut-frame) #f) + (set! (-> self aborted?) #f) + (set! (-> self blackout-end) (the-as basic 'none)) + (set! (-> self end-point) #f) + (set! (-> self preload-sound) #f) + (set! (-> self draw) (new 'process 'draw-control self #f)) + (set! (-> self skel) (new 'process 'joint-control 48)) + (set! (-> self anim) (new 'static 'spool-anim)) + (set! (-> self next-anim) (new 'static 'spool-anim)) + (dotimes (s4-1 (-> self scene-list length)) + (let ((v1-30 (scene-lookup (-> self scene-list s4-1)))) + (if v1-30 + (set! (-> self scene-list s4-1) v1-30) + ) + ) + ) + (cond + ((= (-> self scene-list (-> self scene-index) type) scene) + (set! (-> self scene) (-> self scene-list (-> self scene-index))) + (if (-> self scene) + (init-spool-by-scene! (-> self scene) (-> self anim)) + ) + ) + (else + (set-blackout-frames (seconds 0.2)) + (set! (-> self scene) #f) + ) + ) + (set! (-> self gui-id) (add-process + *gui-control* + self + (gui-channel movie) + (gui-action play) + (the-as string (cond + ((= (rtype-of arg0) string) + (empty) + arg0 + ) + (else + "movie" + ) + ) + ) + -99.0 + 0 + ) + ) + (set! *scene-player* (the-as (pointer scene-player) (process->ppointer self))) + (set! *display-entity-errors* #f) + (set-setting! 'speech-control #f 0.0 0) + (set-setting! 'allow-progress #f 0.0 0) + (if (or (= (cond + ((-> self scene) + (if (>= (-> self scene music-volume) 0.0) + (-> self scene music-volume) + (-> *setting-control* user-current music-volume-movie) + ) + ) + (else + 0.0 + ) + ) + 0.0 + ) + (not (-> *setting-control* user-current music)) + (!= (-> *setting-control* user-target music) (-> *setting-control* user-current music)) + ) + (set-setting! 'music #f 0.0 0) + ) + (apply-settings *setting-control*) + (set! (-> self new-trans-hook) nothing) + (set! (-> self cur-trans-hook) nothing) + (go-virtual wait arg1) + (none) + ) + +;; definition for method 17 of type scene +(defmethod load-scene ((this scene)) + (let ((v1-1 (-> *level* loading-level))) + (if v1-1 + (set-loaded-art (-> v1-1 art-group) this) + ) + ) + this + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/sound/gsound-h_REF.gc b/test/decompiler/reference/jak3/engine/sound/gsound-h_REF.gc index 9183f1e966..8392702d66 100644 --- a/test/decompiler/reference/jak3/engine/sound/gsound-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/sound/gsound-h_REF.gc @@ -807,7 +807,7 @@ ;; definition of type sound-bank-state (deftype sound-bank-state (structure) ((name symbol) - (mode uint32) + (mode sound-bank-mode) ) :pack-me ) diff --git a/test/decompiler/reference/jak3/engine/sound/gsound_REF.gc b/test/decompiler/reference/jak3/engine/sound/gsound_REF.gc index 8dd3114d95..6e37a7ad34 100644 --- a/test/decompiler/reference/jak3/engine/sound/gsound_REF.gc +++ b/test/decompiler/reference/jak3/engine/sound/gsound_REF.gc @@ -1409,7 +1409,7 @@ (sound-bank-load (string->sound-name (symbol->string s5-0)) 4 10) (set! (-> *level* sound-bank (* gp-0 2) name) s5-0) ) - (set! (-> *level* sound-bank (* gp-0 2) mode) (the-as uint 4)) + (set! (-> *level* sound-bank (* gp-0 2) mode) (sound-bank-mode full)) ) ;; definition for function loader-test-command diff --git a/test/decompiler/reference/jak3/engine/sound/speech_REF.gc b/test/decompiler/reference/jak3/engine/sound/speech_REF.gc index cd26e9cf98..06ab4b3df8 100644 --- a/test/decompiler/reference/jak3/engine/sound/speech_REF.gc +++ b/test/decompiler/reference/jak3/engine/sound/speech_REF.gc @@ -247,7 +247,7 @@ (with-pp (logclear! (-> this flags) (speech-channel-flag disable)) (if (or (not (-> *setting-control* user-current speech-control)) - (level-group-method-28 *level*) + (load-in-progress? *level*) (nonzero? (-> this id)) ) (logior! (-> this flags) (speech-channel-flag disable)) @@ -626,7 +626,3 @@ 0 (none) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/spatial-hash/actor-hash_REF.gc b/test/decompiler/reference/jak3/engine/spatial-hash/actor-hash_REF.gc new file mode 100644 index 0000000000..604c79b2c9 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/spatial-hash/actor-hash_REF.gc @@ -0,0 +1,1368 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(kmemopen global "actor-hash") + +;; definition for symbol *actor-hash*, type spatial-hash +(define *actor-hash* (new 'global 'spatial-hash 4096 256)) + +;; failed to figure out what this is: +(kmemclose) + +;; definition of type actor-cshape-ptr +(deftype actor-cshape-ptr (structure) + ((cshape collide-shape) + ) + ) + +;; definition for method 3 of type actor-cshape-ptr +(defmethod inspect ((this actor-cshape-ptr)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'actor-cshape-ptr) + (format #t "~1Tcshape: ~A~%" (-> this cshape)) + (label cfg-4) + this + ) + +;; definition of type actor-hash-bucket +(deftype actor-hash-bucket (structure) + ((length int16) + (max-length int16) + (data (inline-array actor-cshape-ptr)) + ) + :allow-misaligned + (:methods + (add-actor-cshape (_type_ collide-shape) none) + ) + ) + +;; definition for method 3 of type actor-hash-bucket +(defmethod inspect ((this actor-hash-bucket)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'actor-hash-bucket) + (format #t "~1Tlength: ~D~%" (-> this length)) + (format #t "~1Tmax-length: ~D~%" (-> this max-length)) + (format #t "~1Tdata: #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition for method 9 of type actor-hash-bucket +;; WARN: Return type mismatch int vs none. +(defmethod add-actor-cshape ((this actor-hash-bucket) (arg0 collide-shape)) + (let ((v1-0 (-> this length))) + (when (< v1-0 (-> this max-length)) + (set! (-> this data v1-0 cshape) arg0) + (set! (-> this length) (+ v1-0 1)) + ) + ) + 0 + (none) + ) + +;; definition of type actor-hash-buckets +(deftype actor-hash-buckets (structure) + ((hash spatial-hash) + (list engine) + (data actor-hash-bucket 4 :inline) + (tpos vector :inline) + ) + (:methods + (hash-actors (_type_) none) + ) + ) + +;; definition for method 3 of type actor-hash-buckets +(defmethod inspect ((this actor-hash-buckets)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'actor-hash-buckets) + (format #t "~1Thash: ~A~%" (-> this hash)) + (format #t "~1Tlist: ~A~%" (-> this list)) + (format #t "~1Tdata[4] @ #x~X~%" (-> this data)) + (format #t "~1Ttpos: #~%" (-> this tpos)) + (label cfg-4) + this + ) + +;; definition for method 9 of type actor-hash-buckets +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod hash-actors ((this actor-hash-buckets)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (set! (-> this hash) *actor-hash*) + (set! (-> this list) *collide-hit-by-others-list*) + (clear-objects! (-> this hash)) + (cond + ((>= 256 (-> this list length)) + (let ((a0-4 (-> this list alive-list next0))) + (-> this list) + (let ((v1-8 (-> a0-4 next0))) + (while (!= a0-4 (-> this list alive-list-end)) + (let* ((a0-5 (-> (the-as connection a0-4) param1)) + (a1-0 (-> this hash)) + (t0-0 (-> (the-as collide-shape a0-5) root-prim prim-core)) + (a3-0 a0-5) + (a2-1 (-> a1-0 object-count)) + ) + (set! a2-1 (cond + ((< a2-1 (-> a1-0 max-object-count)) + (let ((t1-2 (-> a1-0 sphere-array a2-1)) + (t2-2 (-> a1-0 object-array a2-1)) + ) + (let ((t3-1 (new 'stack-no-clear 'inline-array 'vector 2))) + (let ((t5-0 (-> t3-1 0))) + (let ((t4-0 t0-0)) + (let ((t6-0 (- (-> t0-0 world-sphere w)))) + (.mov vf6 t6-0) + ) + (.lvf vf4 (&-> t4-0 world-sphere quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> t5-0 quad) vf5) + ) + (let ((t5-1 (-> t3-1 1))) + (let ((t4-1 t0-0)) + (let ((t6-1 (-> t0-0 world-sphere w))) + (.mov vf6 t6-1) + ) + (.lvf vf4 (&-> t4-1 world-sphere quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> t5-1 quad) vf5) + ) + (dotimes (t4-2 3) + (set! (-> a1-0 box-min t4-2) (fmin (-> a1-0 box-min t4-2) (-> (&-> t3-1 0 data t4-2) 0))) + (set! (-> a1-0 box-max t4-2) (fmax (-> a1-0 box-max t4-2) (-> (&-> t3-1 0 data t4-2) 4))) + ) + ) + (set! (-> t1-2 quad) (-> t0-0 world-sphere quad)) + (set! (-> t2-2 object) a3-0) + ) + (+! (-> a1-0 object-count) 1) + a2-1 + ) + (else + -1 + ) + ) + ) + (set! (-> (the-as collide-shape a0-5) actor-hash-index) a2-1) + ) + (set! a0-4 v1-8) + (-> this list) + (set! v1-8 (-> v1-8 next0)) + ) + ) + ) + ) + (else + (set! (-> this tpos quad) (-> (target-pos 0) quad)) + (dotimes (v1-13 4) + (set! (-> this data v1-13 length) 0) + ) + (let ((v1-17 (-> this list alive-list next0))) + (-> this list) + (let ((s5-1 (-> v1-17 next0))) + (while (!= v1-17 (-> this list alive-list-end)) + (let* ((s4-0 (-> (the-as connection v1-17) param1)) + (f0-7 (vector-vector-distance-squared (-> this tpos) (-> (the-as collide-shape s4-0) trans))) + (f1-2 102400.0) + ) + (cond + ((< f0-7 (* f1-2 f1-2)) + ((method-of-type actor-hash-bucket add-actor-cshape) + (the-as actor-hash-bucket (-> this data)) + (the-as collide-shape s4-0) + ) + ) + ((let ((f1-5 204800.0)) + (< f0-7 (* f1-5 f1-5)) + ) + (add-actor-cshape (-> this data 1) (the-as collide-shape s4-0)) + ) + ((let ((f1-8 307200.0)) + (< f0-7 (* f1-8 f1-8)) + ) + (add-actor-cshape (-> this data 2) (the-as collide-shape s4-0)) + ) + (else + (add-actor-cshape (-> this data 3) (the-as collide-shape s4-0)) + ) + ) + ) + (set! v1-17 s5-1) + (-> this list) + (set! s5-1 (-> s5-1 next0)) + ) + ) + ) + (dotimes (v1-34 4) + (let ((a0-22 (-> this data v1-34))) + (countdown (a1-10 (-> a0-22 length)) + (let* ((a2-4 (-> a0-22 data a1-10 cshape)) + (a3-4 (-> this hash)) + (t2-3 (-> a2-4 root-prim prim-core)) + (t1-3 a2-4) + (t0-3 (-> a3-4 object-count)) + ) + (set! t0-3 + (cond + ((< t0-3 (-> a3-4 max-object-count)) + (let ((t3-6 (-> a3-4 sphere-array t0-3)) + (t4-5 (-> a3-4 object-array t0-3)) + ) + (let ((t5-15 (new 'stack-no-clear 'inline-array 'vector 2))) + (let ((t7-0 (-> t5-15 0))) + (let ((t6-2 t2-3)) + (let ((t8-0 (- (-> t2-3 world-sphere w)))) + (.mov vf6 t8-0) + ) + (.lvf vf4 (&-> t6-2 world-sphere quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> t7-0 quad) vf5) + ) + (let ((t7-1 (-> t5-15 1))) + (let ((t6-3 t2-3)) + (let ((t8-1 (-> t2-3 world-sphere w))) + (.mov vf6 t8-1) + ) + (.lvf vf4 (&-> t6-3 world-sphere quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> t7-1 quad) vf5) + ) + (dotimes (t6-4 3) + (set! (-> a3-4 box-min t6-4) (fmin (-> a3-4 box-min t6-4) (-> (&-> t5-15 0 data t6-4) 0))) + (set! (-> a3-4 box-max t6-4) (fmax (-> a3-4 box-max t6-4) (-> (&-> t5-15 0 data t6-4) 4))) + ) + ) + (set! (-> t3-6 quad) (-> t2-3 world-sphere quad)) + (set! (-> t4-5 object) t1-3) + ) + (+! (-> a3-4 object-count) 1) + t0-3 + ) + (else + -1 + ) + ) + ) + (set! (-> a2-4 actor-hash-index) t0-3) + ) + ) + ) + ) + ) + ) + (update-from-spheres (-> this hash)) + 0 + (none) + ) + ) + +;; definition for symbol *actor-hash-buckets*, type actor-hash-buckets +(define *actor-hash-buckets* + (new 'static 'actor-hash-buckets + :data (new 'static 'inline-array actor-hash-bucket 4 + (new 'static 'actor-hash-bucket :max-length #x100 :data (new 'static 'inline-array actor-cshape-ptr 256 + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + ) + ) + (new 'static 'actor-hash-bucket :max-length #x100 :data (new 'static 'inline-array actor-cshape-ptr 256 + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + ) + ) + (new 'static 'actor-hash-bucket :max-length #x100 :data (new 'static 'inline-array actor-cshape-ptr 256 + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + ) + ) + (new 'static 'actor-hash-bucket :max-length #x100 :data (new 'static 'inline-array actor-cshape-ptr 256 + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + (new 'static 'actor-cshape-ptr) + ) + ) + ) + ) + ) + +;; definition for function update-actor-hash +;; WARN: Return type mismatch int vs none. +(defun update-actor-hash () + (local-vars (a0-3 int) (a0-5 int)) + (let* ((v1-1 (-> *perf-stats* data 6)) + (a0-0 (-> v1-1 ctrl)) + ) + (+! (-> v1-1 count) 1) + (b! (zero? a0-0) cfg-2 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-0) + ) + (.sync.l) + (.sync.p) + (label cfg-2) + 0 + (hash-actors *actor-hash-buckets*) + (let ((v1-6 (-> *perf-stats* data 6))) + (b! (zero? (-> v1-6 ctrl)) cfg-4 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-3 pcr0) + (+! (-> v1-6 accum0) a0-3) + (.mfpc a0-5 pcr1) + (+! (-> v1-6 accum1) a0-5) + ) + (label cfg-4) + 0 + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/spatial-hash/collide-hash-h_REF.gc b/test/decompiler/reference/jak3/engine/spatial-hash/collide-hash-h_REF.gc new file mode 100644 index 0000000000..b37739c549 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/spatial-hash/collide-hash-h_REF.gc @@ -0,0 +1,264 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *collide-list-boxes*, type symbol +(define *collide-list-boxes* #f) + +;; definition for symbol *collide-hash-fragments*, type int +(define *collide-hash-fragments* 0) + +;; definition for symbol *collide-hash-fragments-tfrag*, type int +(define *collide-hash-fragments-tfrag* 0) + +;; definition for symbol *collide-hash-fragments-instance*, type int +(define *collide-hash-fragments-instance* 0) + +;; definition for symbol *already-printed-exeeded-max-cache-tris*, type symbol +(define *already-printed-exeeded-max-cache-tris* #f) + +;; definition of type collide-hash-scratch +(deftype collide-hash-scratch (structure) + "Scratchpad memory layout for collide-hash. Bitmask of things that have already been checked" + ((collidable-bits uint128 128) + (poly-bits uint64 2 :overlay-at (-> collidable-bits 0)) + (id-bits uint32 512 :overlay-at (-> collidable-bits 0)) + (tris uint32) + ) + ) + +;; definition for method 3 of type collide-hash-scratch +(defmethod inspect ((this collide-hash-scratch)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'collide-hash-scratch) + (format #t "~1Tcollidable-bits[128] @ #x~X~%" (-> this collidable-bits)) + (format #t "~1Tpoly-bits[2] @ #x~X~%" (-> this collidable-bits)) + (format #t "~1Tid-bits[512] @ #x~X~%" (-> this collidable-bits)) + (format #t "~1Ttris: ~D~%" (-> this tris)) + (label cfg-4) + this + ) + +;; definition of type collide-hash-bucket +(deftype collide-hash-bucket (structure) + "A bucket is a reference to a list of items that intersect a grid cell. +For the broadphase, the items are collide-hash-item (wrapper of collide-hash-fragment). +For the narrowphase, the items are entries in the index list, which contains poly indices." + ((index int16) + (count int16) + ) + ) + +;; definition for method 3 of type collide-hash-bucket +(defmethod inspect ((this collide-hash-bucket)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'collide-hash-bucket) + (format #t "~1Tindex: ~D~%" (-> this index)) + (format #t "~1Tcount: ~D~%" (-> this count)) + (label cfg-4) + this + ) + +;; definition of type collide-hash-item +(deftype collide-hash-item (structure) + "Items that are 'hashed' in the broadphase. Contains unique ID for checking against already-visited-bitmask +and a pointer to the actual collide-hash-fragment, or possibly a TIE." + ((id uint32) + (collidable basic) + ) + :pack-me + ) + +;; definition for method 3 of type collide-hash-item +(defmethod inspect ((this collide-hash-item)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'collide-hash-item) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tcollidable: ~A~%" (-> this collidable)) + (label cfg-4) + this + ) + +;; definition of type collide-hash-poly +(deftype collide-hash-poly (structure) + "A polygon in the narrow-phase data. This is just indices into the vertex and PAT tables." + ((data uint8 4) + (vert-index0 uint8 :overlay-at (-> data 0)) + (vert-index1 uint8 :overlay-at (-> data 1)) + (vert-index2 uint8 :overlay-at (-> data 2)) + (pat-index uint8 :overlay-at (-> data 3)) + (word uint32 :overlay-at (-> data 0)) + ) + ) + +;; definition for method 3 of type collide-hash-poly +(defmethod inspect ((this collide-hash-poly)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'collide-hash-poly) + (format #t "~1Tdata[4] @ #x~X~%" (-> this data)) + (format #t "~1Tvert-index0: ~D~%" (-> this vert-index0)) + (format #t "~1Tvert-index1: ~D~%" (-> this vert-index1)) + (format #t "~1Tvert-index2: ~D~%" (-> this vert-index2)) + (format #t "~1Tpat-index: ~D~%" (-> this pat-index)) + (format #t "~1Tword: ~D~%" (-> this word)) + (label cfg-4) + this + ) + +;; definition of type collide-hash-fragment-stats +(deftype collide-hash-fragment-stats (structure) + ((num-verts uint16) + (num-polys uint8) + (poly-count uint8) + ) + :pack-me + ) + +;; definition for method 3 of type collide-hash-fragment-stats +(defmethod inspect ((this collide-hash-fragment-stats)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'collide-hash-fragment-stats) + (format #t "~1Tnum-verts: ~D~%" (-> this num-verts)) + (format #t "~1Tnum-polys: ~D~%" (-> this num-polys)) + (format #t "~1Tpoly-count: ~D~%" (-> this poly-count)) + (label cfg-4) + this + ) + +;; definition of type collide-hash-fragment +(deftype collide-hash-fragment (drawable) + "A mesh fragment for the Jak2/Jak3 collision system. This is a 'hash' of triangles into a grid +where the 'hash' function is just identity." + ((num-buckets uint16 :overlay-at id) + (num-indices uint16 :offset 6) + (pat-array uint32 :offset 8) + (bucket-array uint32 :offset 12) + (grid-step vector :inline) + (bbox bounding-box :inline) + (bbox4w bounding-box4w :inline) + (axis-scale vector :inline :overlay-at (-> bbox max)) + (avg-extents vector :inline :overlay-at (-> bbox4w min data 0)) + (dimension-array uint32 4 :overlay-at (-> grid-step data 3)) + (stats collide-hash-fragment-stats :inline :overlay-at (-> bbox min data 3)) + (num-verts uint16 :overlay-at (-> bbox min data 3)) + (num-polys uint8 :offset 62) + (poly-count uint8 :offset 63) + (poly-array uint32 :overlay-at (-> bbox max data 3)) + (vert-array uint32 :overlay-at (-> bbox4w min data 3)) + (index-array uint32 :overlay-at (-> bbox4w max data 3)) + ) + ) + +;; definition for method 3 of type collide-hash-fragment +(defmethod inspect ((this collide-hash-fragment)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere)) + (format #t "~1Tnum-buckets: ~D~%" (-> this num-buckets)) + (format #t "~1Tnum-indices: ~D~%" (-> this num-indices)) + (format #t "~1Tpat-array: #x~X~%" (-> this pat-array)) + (format #t "~1Tbucket-array: #x~X~%" (-> this bucket-array)) + (format #t "~1Tgrid-step: #~%" (-> this grid-step)) + (format #t "~1Tbbox: #~%" (-> this bbox)) + (format #t "~1Tbbox4w: #~%" (-> this bbox4w)) + (format #t "~1Taxis-scale: #~%" (-> this bbox max)) + (format #t "~1Tavg-extents: #~%" (-> this bbox4w)) + (format #t "~1Tdimension-array[4] @ #x~X~%" (&-> this grid-step w)) + (format #t "~1Tstats: #~%" (&-> this bbox min w)) + (format #t "~1Tnum-verts: ~D~%" (-> this stats num-verts)) + (format #t "~1Tnum-polys: ~D~%" (-> this stats num-polys)) + (format #t "~1Tpoly-count: ~D~%" (-> this stats poly-count)) + (format #t "~1Tpoly-array: #x~X~%" (-> this bbox max w)) + (format #t "~1Tvert-array: #x~X~%" (-> this avg-extents w)) + (format #t "~1Tindex-array: #x~X~%" (-> this index-array)) + (label cfg-4) + this + ) + +;; definition of type collide-hash-fragment-array +(deftype collide-hash-fragment-array (array) + "A collection of collide-hash-fragments. These are used by the instanced collision if a single instance +needs more than 1 collide-hash-fragment worth of triangles." + ((fragments collide-hash-fragment :dynamic :offset 16) + ) + ) + +;; definition for method 3 of type collide-hash-fragment-array +(defmethod inspect ((this collide-hash-fragment-array)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Ttype: ~A~%" (-> this type)) + (format #t "~1Tlength: ~D~%" (-> this length)) + (format #t "~1Tallocated-length: ~D~%" (-> this allocated-length)) + (format #t "~1Tcontent-type: ~A~%" (-> this content-type)) + (label cfg-4) + this + ) + +;; definition of type collide-hash +(deftype collide-hash (drawable) + ((num-ids uint16 :overlay-at id) + (id-count uint16 :offset 6) + (num-buckets uint32 :offset 8) + (qwc-id-bits uint32 :offset 12) + (grid-step vector :inline :overlay-at bsphere) + (bbox bounding-box :inline :offset 32) + (bbox4w bounding-box4w :inline :offset 64) + (axis-scale vector :inline :offset 48) + (avg-extents vector :inline :offset 64) + (bucket-array uint32 :offset 44) + (item-array (inline-array collide-hash-item) :overlay-at (-> axis-scale w)) + (dimension-array uint32 3 :overlay-at (-> avg-extents w)) + (num-items uint32 :offset 92) + ) + ) + +;; definition for method 3 of type collide-hash +(defmethod inspect ((this collide-hash)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere)) + (format #t "~1Tnum-ids: ~D~%" (-> this num-ids)) + (format #t "~1Tid-count: ~D~%" (-> this id-count)) + (format #t "~1Tnum-buckets: ~D~%" (-> this num-buckets)) + (format #t "~1Tqwc-id-bits: ~D~%" (-> this qwc-id-bits)) + (format #t "~1Tgrid-step: #~%" (-> this bsphere)) + (format #t "~1Tbbox: #~%" (-> this bbox)) + (format #t "~1Tbbox4w: #~%" (-> this bbox4w)) + (format #t "~1Taxis-scale: #~%" (-> this bbox max)) + (format #t "~1Tavg-extents: #~%" (-> this bbox4w)) + (format #t "~1Tbucket-array: #x~X~%" (-> this bbox min w)) + (format #t "~1Titem-array: #x~X~%" (-> this item-array)) + (format #t "~1Tdimension-array[3] @ #x~X~%" (&-> this bbox4w min w)) + (format #t "~1Tnum-items: ~D~%" (-> this num-items)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 diff --git a/test/decompiler/reference/jak3/engine/spatial-hash/collide-hash_REF.gc b/test/decompiler/reference/jak3/engine/spatial-hash/collide-hash_REF.gc new file mode 100644 index 0000000000..addf297d8e --- /dev/null +++ b/test/decompiler/reference/jak3/engine/spatial-hash/collide-hash_REF.gc @@ -0,0 +1,704 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function add-collide-debug-box +;; WARN: Return type mismatch symbol vs none. +(defun add-collide-debug-box ((arg0 vector) (arg1 rgba)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (let ((a3-0 (new 'stack-no-clear 'bounding-box))) + (nop!) + (.lvf vf1 (&-> arg0 quad)) + (.sub.w.vf vf2 vf1 vf1) + (nop!) + (.add.w.vf vf3 vf1 vf1) + (nop!) + (nop!) + (.svf (&-> a3-0 min quad) vf2) + (nop!) + (.svf (&-> a3-0 max quad) vf3) + (add-debug-box #t (bucket-id debug) (-> a3-0 min) (-> a3-0 max) arg1) + ) + (none) + ) + ) + +;; definition (debug) for function print-collide-cache-tri-count +;; WARN: Return type mismatch object vs none. +(defun-debug print-collide-cache-tri-count () + (let ((gp-0 0) + (s4-0 0) + (s5-0 0) + (s3-0 0) + ) + (let ((v1-0 *collide-cache*)) + (dotimes (a0-0 (-> v1-0 num-tris)) + (case (-> v1-0 tris a0-0 pat mode) + (((pat-mode ground)) + (+! gp-0 1) + ) + (((pat-mode wall)) + (+! s5-0 1) + ) + (((pat-mode obstacle)) + (+! s4-0 1) + ) + (else + (+! s3-0 1) + ) + ) + ) + (format *stdcon* "tris ~d (~4,,1f%) " (-> v1-0 num-tris) (* 0.2173913 (the float (-> v1-0 num-tris)))) + ) + (format *stdcon* "(ground ~d, wall ~d, obstacle ~d, other ~d)~%" gp-0 s5-0 s4-0 s3-0) + ) + (none) + ) + +;; definition (debug) for function print-exceeded-max-cache-tris +;; WARN: Return type mismatch int vs none. +(defun-debug print-exceeded-max-cache-tris () + (with-pp + (when (not (or *already-printed-exeeded-max-cache-tris* *display-capture-mode*)) + (set! *already-printed-exeeded-max-cache-tris* #t) + (if pp + (format *stdcon* "Exceeded collide cache max # of tris (~s)!~%" (-> pp name)) + (format *stdcon* "Exceeded collide cache max # of tris!~%") + ) + (print-collide-cache-tri-count) + ) + 0 + (none) + ) + ) + +;; definition for method 11 of type collide-hash +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 11 collide-hash)" 11 collide-hash) + +;; definition for method 12 of type collide-hash +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 12 collide-hash)" 12 collide-hash) + +;; definition for function fill-bg-using-box-new +;; INFO: function output is handled by mips2c +(def-mips2c fill-bg-using-box-new (function collide-cache object collide-query none)) + +;; definition for function fill-bg-using-line-sphere-new +;; INFO: function output is handled by mips2c +(def-mips2c fill-bg-using-line-sphere-new (function collide-cache object collide-query none)) + +;; definition for function collide-list-fill-bg-using-box +;; INFO: Used lq/sq +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 640 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 640 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 640 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 640 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Return type mismatch int vs none. +(defun collide-list-fill-bg-using-box ((arg0 collide-cache) (arg1 collide-list) (arg2 collide-query)) + (local-vars + (v1-12 uint128) + (v1-14 uint128) + (v1-15 uint128) + (a0-10 uint128) + (a0-11 uint128) + (a1-3 uint128) + (a2-3 uint128) + (a2-4 uint128) + (sv-16 int) + (sv-20 collide-list) + (sv-640 int) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf12 :class vf) + (vf13 :class vf) + (vf14 :class vf) + (vf16 :class vf) + (vf17 :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) + (set! sv-16 (-> arg1 num-items)) + (set! sv-20 arg1) + (dotimes (s4-0 sv-16) + (let ((s3-0 (-> sv-20 items s4-0 mesh))) + (cond + ((= (-> s3-0 type) instance-tie) + (let* ((v1-4 s3-0) + (s1-0 (-> v1-4 bucket-ptr)) + ) + (when (not (or (logtest? (-> s1-0 flags) (prototype-flags no-collide)) + (logtest? (-> v1-4 flags) (instance-flags no-collide)) + ) + ) + (if *collide-list-boxes* + (add-collide-debug-box (-> s3-0 bsphere) (new 'static 'rgba :r #xff :a #x80)) + ) + (let ((s0-0 (new 'stack-no-clear 'matrix)) + (s2-0 (new 'stack-no-clear 'collide-query)) + ) + (mem-copy! (the-as pointer s2-0) (the-as pointer arg2) 540) + (nop!) + (nop!) + (let ((v1-11 (the-as uint128 (-> s3-0 origin long 3)))) + (nop!) + (let ((a2-2 (the-as uint128 (-> s3-0 origin long 0)))) + (.pextlh v1-12 v1-11 0) + (let ((a0-9 (the-as uint128 (-> s3-0 origin long 1)))) + (.pw.sra a1-3 v1-12 10) + (let ((v1-13 (the-as uint128 (-> s3-0 origin long 2)))) + (.pextlh a2-3 a2-2 0) + (nop!) + (.pw.sra a2-4 a2-3 16) + (nop!) + (.pextlh a0-10 a0-9 0) + (.mov vf4 a1-3) + (.pw.sra a0-11 a0-10 16) + (.mov vf1 a2-4) + (.pextlh v1-14 v1-13 0) + ) + ) + ) + ) + (.mov vf2 a0-11) + (.pw.sra v1-15 v1-14 16) + (.lvf vf5 (&-> s3-0 bsphere quad)) + (nop!) + (.mov vf3 v1-15) + (.itof.vf vf4 vf4) + (nop!) + (vitof12.xyzw vf1 vf1) + (nop!) + (vitof12.xyzw vf2 vf2) + (nop!) + (vitof12.xyzw vf3 vf3) + (nop!) + (.add.vf vf4 vf4 vf5 :mask #b111) + (nop!) + (nop!) + (.svf (&-> s2-0 instance-mat rvec quad) vf1) + (nop!) + (.svf (&-> s2-0 instance-mat uvec quad) vf2) + (nop!) + (.svf (&-> s2-0 instance-mat fvec quad) vf3) + (nop!) + (.svf (&-> s2-0 instance-mat trans quad) vf4) + (matrix-4x4-inverse! s0-0 (-> s2-0 instance-mat)) + (nop!) + (nop!) + (.lvf vf7 (&-> arg2 bbox min quad)) + (nop!) + (.lvf vf14 (&-> arg2 bbox max quad)) + (nop!) + (.lvf vf1 (&-> s0-0 rvec quad)) + (nop!) + (.lvf vf2 (&-> s0-0 uvec quad)) + (nop!) + (.lvf vf3 (&-> s0-0 fvec quad)) + (nop!) + (.lvf vf4 (&-> s0-0 trans quad)) + (.mul.w.vf acc vf4 vf0) + (nop!) + (.add.mul.x.vf acc vf1 vf7 acc) + (nop!) + (.add.mul.y.vf acc vf2 vf7 acc) + (nop!) + (.add.mul.z.vf vf8 vf3 vf14 acc) + (nop!) + (.mul.w.vf acc vf4 vf0) + (nop!) + (.add.mul.x.vf acc vf1 vf7 acc) + (nop!) + (.add.mul.y.vf acc vf2 vf14 acc) + (nop!) + (.add.mul.z.vf vf9 vf3 vf7 acc) + (nop!) + (.mul.w.vf acc vf4 vf0) + (nop!) + (.add.mul.x.vf acc vf1 vf7 acc) + (nop!) + (.add.mul.y.vf acc vf2 vf14 acc) + (nop!) + (.add.mul.z.vf vf10 vf3 vf14 acc) + (nop!) + (.min.vf vf5 vf8 vf9) + (nop!) + (.max.vf vf6 vf8 vf9) + (nop!) + (.mul.w.vf acc vf4 vf0) + (nop!) + (.add.mul.x.vf acc vf1 vf14 acc) + (nop!) + (.add.mul.y.vf acc vf2 vf7 acc) + (nop!) + (.add.mul.z.vf vf11 vf3 vf7 acc) + (nop!) + (.min.vf vf5 vf5 vf10) + (nop!) + (.max.vf vf6 vf6 vf10) + (nop!) + (.mul.w.vf acc vf4 vf0) + (nop!) + (.add.mul.x.vf acc vf1 vf14 acc) + (nop!) + (.add.mul.y.vf acc vf2 vf7 acc) + (nop!) + (.add.mul.z.vf vf12 vf3 vf14 acc) + (nop!) + (.min.vf vf5 vf5 vf11) + (nop!) + (.max.vf vf6 vf6 vf11) + (nop!) + (.mul.w.vf acc vf4 vf0) + (nop!) + (.add.mul.x.vf acc vf1 vf14 acc) + (nop!) + (.add.mul.y.vf acc vf2 vf14 acc) + (nop!) + (.add.mul.z.vf vf13 vf3 vf7 acc) + (nop!) + (.min.vf vf5 vf5 vf12) + (nop!) + (.max.vf vf6 vf6 vf12) + (nop!) + (.mul.w.vf acc vf4 vf0) + (nop!) + (.add.mul.x.vf acc vf1 vf14 acc) + (nop!) + (.add.mul.y.vf acc vf2 vf14 acc) + (nop!) + (.add.mul.z.vf vf14 vf3 vf14 acc) + (nop!) + (.min.vf vf5 vf5 vf13) + (nop!) + (.max.vf vf6 vf6 vf13) + (nop!) + (.mul.w.vf acc vf4 vf0) + (nop!) + (.add.mul.x.vf acc vf1 vf7 acc) + (nop!) + (.add.mul.y.vf acc vf2 vf7 acc) + (nop!) + (.add.mul.z.vf vf7 vf3 vf7 acc) + (nop!) + (.min.vf vf5 vf5 vf14) + (nop!) + (.max.vf vf6 vf6 vf14) + (nop!) + (.min.vf vf5 vf5 vf7) + (nop!) + (.max.vf vf6 vf6 vf7) + (nop!) + (.ftoi.vf vf16 vf5) + (nop!) + (.ftoi.vf vf17 vf6) + (nop!) + (nop!) + (.svf (&-> s2-0 bbox min quad) vf5) + (nop!) + (.svf (&-> s2-0 bbox max quad) vf6) + (nop!) + (.svf (&-> s2-0 bbox4w min quad) vf16) + (nop!) + (.svf (&-> s2-0 bbox4w max quad) vf17) + (let ((s1-1 (-> s1-0 collide-hash-fragment-array))) + (set! sv-640 (-> s1-1 length)) + (set! (-> s2-0 instance-ptr) s3-0) + (dotimes (s3-1 sv-640) + (set! (-> (the-as collide-hash-scratch #x70000000) collidable-bits 0) (the-as uint128 0)) + (set! (-> (the-as collide-hash-scratch #x70000000) collidable-bits 1) (the-as uint128 0)) + (set! (-> (the-as collide-hash-scratch #x70000000) tris) (the-as uint 0)) + (fill-bg-using-box-new arg0 (-> s1-1 fragments s3-1) s2-0) + (+! (-> *collide-stats* tris) (-> (the-as collide-hash-scratch #x70000000) tris)) + ) + ) + ) + ) + ) + ) + (else + (if *collide-list-boxes* + (add-collide-debug-box (-> s3-0 bsphere) (new 'static 'rgba :r #xff :g #xff :a #x80)) + ) + (set! (-> (the-as collide-hash-scratch #x70000000) collidable-bits 0) (the-as uint128 0)) + (set! (-> (the-as collide-hash-scratch #x70000000) collidable-bits 1) (the-as uint128 0)) + (set! (-> arg2 instance-ptr) #f) + (set! (-> (the-as collide-hash-scratch #x70000000) tris) (the-as uint 0)) + (fill-bg-using-box-new arg0 s3-0 arg2) + (+! (-> *collide-stats* tris) (-> (the-as collide-hash-scratch #x70000000) tris)) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for function collide-list-fill-bg-using-line-sphere +;; INFO: Used lq/sq +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 640 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 640 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 640 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 640 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Return type mismatch int vs none. +;; ERROR: Unsupported inline assembly instruction kind - [sll v1, v1, 16] +(defun collide-list-fill-bg-using-line-sphere ((arg0 collide-cache) (arg1 collide-list) (arg2 collide-query)) + (local-vars + (v1-12 uint128) + (v1-14 uint128) + (v1-15 uint128) + (v1-17 number) + (v1-26 float) + (a0-10 uint128) + (a0-11 uint128) + (a1-3 uint128) + (a2-3 uint128) + (a2-4 uint128) + (sv-16 int) + (sv-640 int) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf10 :class vf) + (vf11 :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) + (set! sv-16 (-> arg1 num-items)) + (dotimes (s3-0 sv-16) + (let ((s2-0 (-> arg1 items s3-0 mesh))) + (cond + ((= (-> s2-0 type) instance-tie) + (let ((v1-4 s2-0)) + (when (not (or (logtest? (-> v1-4 bucket-ptr flags) (prototype-flags no-collide)) + (logtest? (-> v1-4 flags) (instance-flags no-collide)) + ) + ) + (if *collide-list-boxes* + (add-collide-debug-box (-> s2-0 bsphere) (new 'static 'rgba :r #xff :a #x80)) + ) + (let ((s0-0 (new 'stack-no-clear 'matrix)) + (s1-0 (new 'stack-no-clear 'collide-query)) + ) + (mem-copy! (the-as pointer s1-0) (the-as pointer arg2) 540) + (nop!) + (let ((v1-11 (the-as uint128 (-> s2-0 origin long 3)))) + (nop!) + (let ((a2-2 (the-as uint128 (-> s2-0 origin long 0)))) + (.pextlh v1-12 v1-11 0) + (let ((a0-9 (the-as uint128 (-> s2-0 origin long 1)))) + (.pw.sra a1-3 v1-12 10) + (let ((v1-13 (the-as uint128 (-> s2-0 origin long 2)))) + (.pextlh a2-3 a2-2 0) + (nop!) + (.pw.sra a2-4 a2-3 16) + (nop!) + (.pextlh a0-10 a0-9 0) + (.mov vf4 a1-3) + (.pw.sra a0-11 a0-10 16) + (.mov vf1 a2-4) + (.pextlh v1-14 v1-13 0) + ) + ) + ) + ) + (.mov vf2 a0-11) + (.pw.sra v1-15 v1-14 16) + (.lvf vf5 (&-> s2-0 bsphere quad)) + (nop!) + (.mov vf3 v1-15) + (.itof.vf vf4 vf4) + (nop!) + (vitof12.xyzw vf1 vf1) + (nop!) + (vitof12.xyzw vf2 vf2) + (nop!) + (vitof12.xyzw vf3 vf3) + (nop!) + (.add.vf vf4 vf4 vf5 :mask #b111) + (nop!) + (nop!) + (.svf (&-> s1-0 instance-mat rvec quad) vf1) + (nop!) + (.svf (&-> s1-0 instance-mat uvec quad) vf2) + (nop!) + (.svf (&-> s1-0 instance-mat fvec quad) vf3) + (nop!) + (.svf (&-> s1-0 instance-mat trans quad) vf4) + (matrix-4x4-inverse! s0-0 (-> s1-0 instance-mat)) + (nop!) + (nop!) + (.lvf vf7 (&-> arg2 start-pos quad)) + (nop!) + (.lvf vf8 (&-> arg2 move-dist quad)) + (nop!) + (.lvf vf1 (&-> s0-0 rvec quad)) + (nop!) + (.lvf vf2 (&-> s0-0 uvec quad)) + (nop!) + (.lvf vf3 (&-> s0-0 fvec quad)) + (nop!) + (.lvf vf4 (&-> s0-0 trans quad)) + (.add.vf vf8 vf7 vf8) + (let ((v1-16 (-> s2-0 rmin-scale))) + (.mul.x.vf acc vf1 vf7) + (let ((f2-0 (-> arg2 radius))) + (.add.mul.y.vf acc vf2 vf7 acc) + (.sll v1-17 v1-16 16) + (.add.mul.z.vf acc vf3 vf7 acc) + (let ((f1-0 (the-as float v1-17))) + (.add.mul.w.vf vf7 vf4 vf0 acc) + (nop!) + (.mul.x.vf acc vf1 vf8) + (let ((f2-1 (* f2-0 f1-0))) + (.add.mul.y.vf acc vf2 vf8 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf8 acc) + (nop!) + (.add.mul.w.vf vf8 vf4 vf0 acc) + (nop!) + (nop!) + (.svf (&-> s1-0 start-pos quad) vf7) + (.min.vf vf5 vf7 vf8) + (set! (-> s1-0 radius) f2-1) + ) + ) + ) + ) + (.max.vf vf6 vf7 vf8) + (nop!) + (nop!) + (.lvf vf9 (&-> s1-0 exit-planes 0 quad)) + (.sub.vf vf8 vf8 vf7) + (nop!) + (.sub.w.vf vf5 vf5 vf9) + (nop!) + (.add.w.vf vf6 vf6 vf9) + (nop!) + (nop!) + (.svf (&-> s1-0 move-dist quad) vf8) + (.ftoi.vf vf10 vf5) + (nop!) + (.ftoi.vf vf11 vf6) + (nop!) + (nop!) + (.svf (&-> s1-0 bbox min quad) vf5) + (nop!) + (.svf (&-> s1-0 bbox max quad) vf6) + (nop!) + (.svf (&-> s1-0 bbox4w min quad) vf10) + (nop!) + (.svf (&-> s1-0 bbox4w max quad) vf11) + (set! (-> s1-0 rlength x) (if (= (-> s1-0 move-dist x) 0.0) + 0.0 + (/ 1.0 (-> s1-0 move-dist x)) + ) + ) + (set! (-> s1-0 rlength y) (if (= (-> s1-0 move-dist y) 0.0) + 0.0 + (/ 1.0 (-> s1-0 move-dist y)) + ) + ) + (set! (-> s1-0 rlength z) (if (= (-> s1-0 move-dist z) 0.0) + 0.0 + (/ 1.0 (-> s1-0 move-dist z)) + ) + ) + (let ((f0-12 1.0)) + (.lvf vf1 (&-> (-> s1-0 move-dist) 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) + (set! (-> s1-0 rlength w) (/ f0-12 v1-26)) + ) + (set! (-> s1-0 exit-planes 0 x) (if (< 0.0 (-> s1-0 move-dist x)) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (set! (-> s1-0 exit-planes 0 y) (if (< 0.0 (-> s1-0 move-dist y)) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (set! (-> s1-0 exit-planes 0 z) (if (< 0.0 (-> s1-0 move-dist z)) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (set! (-> s1-0 exit-planes 1 x) (if (< (-> s1-0 move-dist x) 0.0) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (set! (-> s1-0 exit-planes 1 y) (if (< (-> s1-0 move-dist y) 0.0) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (set! (-> s1-0 exit-planes 1 z) (if (< (-> s1-0 move-dist z) 0.0) + 0.0 + 100000000000000000000000000000000000000.0 + ) + ) + (let ((s0-1 (-> s2-0 bucket-ptr collide-hash-fragment-array))) + (set! sv-640 (-> s0-1 length)) + (set! (-> s1-0 instance-ptr) s2-0) + (dotimes (s2-1 sv-640) + (set! (-> (the-as collide-hash-scratch #x70000000) collidable-bits 0) (the-as uint128 0)) + (set! (-> (the-as collide-hash-scratch #x70000000) collidable-bits 1) (the-as uint128 0)) + (set! (-> (the-as collide-hash-scratch #x70000000) tris) (the-as uint 0)) + (fill-bg-using-line-sphere-new arg0 (-> s0-1 fragments s2-1) s1-0) + (+! (-> *collide-stats* tris) (-> (the-as collide-hash-scratch #x70000000) tris)) + ) + ) + ) + ) + ) + ) + (else + (if *collide-list-boxes* + (add-collide-debug-box (-> s2-0 bsphere) (new 'static 'rgba :r #xff :g #xff :a #x80)) + ) + (set! (-> (the-as collide-hash-scratch #x70000000) collidable-bits 0) (the-as uint128 0)) + (set! (-> (the-as collide-hash-scratch #x70000000) collidable-bits 1) (the-as uint128 0)) + (set! (-> arg2 instance-ptr) #f) + (set! (-> (the-as collide-hash-scratch #x70000000) tris) (the-as uint 0)) + (fill-bg-using-line-sphere-new arg0 s2-0 arg2) + (+! (-> *collide-stats* tris) (-> (the-as collide-hash-scratch #x70000000) tris)) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 8 of type collide-hash +;; INFO: Used lq/sq +(defmethod mem-usage ((this collide-hash) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 52 (-> usage length))) + (set! (-> usage data 51 name) "collision") + (+! (-> usage data 51 count) 1) + (let ((v1-8 (+ (* (-> this num-items) 8) 96 (* (-> this num-buckets) 4)))) + (+! (-> usage data 51 used) v1-8) + (+! (-> usage data 51 total) (logand -16 (+ v1-8 15))) + ) + (dotimes (v1-12 (the-as int (-> this qwc-id-bits))) + (set! (-> (the-as collide-hash-scratch #x70000000) collidable-bits v1-12) (the-as uint128 0)) + ) + (dotimes (s3-0 (the-as int (-> this num-items))) + (let* ((a0-11 (-> this item-array s3-0 id)) + (v1-17 (shr a0-11 5)) + ) + (when (not (logtest? (-> (the-as collide-hash-scratch #x70000000) id-bits v1-17) (ash 1 (the-as int (logand a0-11 31)))) + ) + (logior! (-> (the-as collide-hash-scratch #x70000000) id-bits v1-17) (ash 1 (the-as int (logand a0-11 31)))) + (if (= (-> this item-array s3-0 collidable type) collide-hash-fragment) + (mem-usage (-> this item-array s3-0 collidable) usage flags) + ) + ) + ) + ) + this + ) + +;; definition for method 8 of type collide-hash-fragment +(defmethod mem-usage ((this collide-hash-fragment) (usage memory-usage-block) (flags int)) + (cond + ((logtest? flags 1) + (set! (-> usage length) (max 59 (-> usage length))) + (set! (-> usage data 56 name) "prototype-fragment") + (+! (-> usage data 56 count) 1) + (set! (-> usage data 57 name) "prototype-poly") + (+! (-> usage data 57 count) (-> this stats num-polys)) + (set! (-> usage data 58 name) "prototype-vertex") + (+! (-> usage data 58 count) (-> this stats num-verts)) + (let ((a3-0 (+ (-> this num-indices) 112 (* (-> this num-buckets) 4))) + (a2-6 (* (-> this stats num-polys) 4)) + (v1-16 (* (the-as uint 6) (-> this stats num-verts))) + ) + (+! (-> usage data 56 used) a3-0) + (+! (-> usage data 56 total) (- (logand -16 (+ v1-16 15 a2-6 a3-0)) (the-as int (+ a2-6 v1-16)))) + (+! (-> usage data 57 used) a2-6) + (+! (-> usage data 57 total) a2-6) + (+! (-> usage data 58 used) v1-16) + (+! (-> usage data 58 total) v1-16) + ) + ) + (else + (set! (-> usage length) (max 55 (-> usage length))) + (set! (-> usage data 52 name) "collision-fragment") + (+! (-> usage data 52 count) 1) + (set! (-> usage data 53 name) "collision-poly") + (+! (-> usage data 53 count) (-> this stats num-polys)) + (set! (-> usage data 54 name) "collision-vertex") + (+! (-> usage data 54 count) (-> this stats num-verts)) + (let ((a3-8 (+ (-> this num-indices) 112 (* (-> this num-buckets) 4))) + (a2-16 (* (-> this stats num-polys) 4)) + (v1-33 (* (the-as uint 6) (-> this stats num-verts))) + ) + (+! (-> usage data 52 used) a3-8) + (+! (-> usage data 52 total) (- (logand -16 (+ v1-33 15 a2-16 a3-8)) (the-as int (+ a2-16 v1-33)))) + (+! (-> usage data 53 used) a2-16) + (+! (-> usage data 53 total) a2-16) + (+! (-> usage data 54 used) v1-33) + (+! (-> usage data 54 total) v1-33) + ) + ) + ) + this + ) + +;; definition for method 8 of type collide-hash-fragment-array +(defmethod mem-usage ((this collide-hash-fragment-array) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 56 (-> usage length))) + (set! (-> usage data 55 name) "prototype-collision") + (+! (-> usage data 55 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 55 used) v1-6) + (+! (-> usage data 55 total) (logand -16 (+ v1-6 15))) + ) + (dotimes (s3-0 (-> this length)) + (mem-usage (-> this fragments s3-0) usage flags) + ) + this + ) 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 5d5fb65560..0db4e4e9eb 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 @@ -143,8 +143,8 @@ O(n^2) 'check everybody against everybody' collision loop." (add-a-sphere (_type_ vector) int) (add-a-sphere-with-flag (_type_ vector int) int) (update-from-spheres (_type_) none) - (sphere-hash-method-29 (_type_ find-nav-sphere-ids-params int int int) none) - (find-nav-sphere-ids (_type_ find-nav-sphere-ids-params) none) + (sphere-hash-method-29 (_type_ find-nav-sphere-ids-params) none) + (find-nav-sphere-ids (_type_ find-nav-sphere-ids-params int int) symbol) (add-sphere-with-mask-and-id (_type_ vector int int) symbol) (sphere-hash-method-32 (_type_ sphere int) symbol) ) @@ -210,10 +210,10 @@ O(n^2) 'check everybody against everybody' collision loop." ) (:methods (new (symbol type int int) _type_) - (spatial-hash-method-33 () none) - (add-an-object (_type_ vector hash-object-info) int) + (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-sphere (_type_ sphere (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) (spatial-hash-method-39 (_type_ object hash-object-info) int) @@ -258,3 +258,7 @@ 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 new file mode 100644 index 0000000000..44e937d769 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/spatial-hash/spatial-hash_REF.gc @@ -0,0 +1,997 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type grid-hash-work +(deftype grid-hash-work (basic) + ((result-words uint8 32 :offset 16) + (result-bits uint8 32 :overlay-at (-> result-words 0)) + (object-id int32) + (temp-box-min vector :inline) + (temp-box-max vector :inline) + (visit-count int32) + (temp-time uint32) + (queue-object-time uint32) + (make-hash-time uint32) + (search-time uint32) + (add-object-time uint32) + ) + ) + +;; definition for method 3 of type grid-hash-work +(defmethod inspect ((this grid-hash-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tresult-words[32] @ #x~X~%" (-> this result-words)) + (format #t "~1Tresult-bits[32] @ #x~X~%" (-> this result-words)) + (format #t "~1Tobject-id: ~D~%" (-> this object-id)) + (format #t "~1Ttemp-box-min: #~%" (-> this temp-box-min)) + (format #t "~1Ttemp-box-max: #~%" (-> this temp-box-max)) + (format #t "~1Tvisit-count: ~D~%" (-> this visit-count)) + (format #t "~1Ttemp-time: ~D~%" (-> this temp-time)) + (format #t "~1Tqueue-object-time: ~D~%" (-> this queue-object-time)) + (format #t "~1Tmake-hash-time: ~D~%" (-> this make-hash-time)) + (format #t "~1Tsearch-time: ~D~%" (-> this search-time)) + (format #t "~1Tadd-object-time: ~D~%" (-> this add-object-time)) + (label cfg-4) + this + ) + +;; definition for symbol *grid-hash-work*, type grid-hash-work +(define *grid-hash-work* (new 'static 'grid-hash-work)) + +;; definition for method 0 of type grid-hash +;; WARN: Return type mismatch object vs grid-hash. +(defmethod new grid-hash ((allocation symbol) (type-to-make type) (arg0 int)) + (let ((gp-0 (the-as object (object-new allocation type-to-make (the-as int (-> type-to-make size)))))) + (when (zero? (the-as grid-hash gp-0)) + (set! gp-0 0) + (goto cfg-4) + ) + (set! (-> (the-as grid-hash gp-0) work) *grid-hash-work*) + (set! (-> (the-as grid-hash gp-0) object-count) 0) + (set! (-> (the-as grid-hash gp-0) bucket-memory-size) arg0) + (set! (-> (the-as grid-hash gp-0) vertical-cell-count) 1) + (set! (-> (the-as grid-hash gp-0) min-cell-size) 16384.0) + (set! (-> (the-as grid-hash gp-0) mem-bucket-array) + (the-as (pointer grid-hash-word) (malloc allocation arg0)) + ) + (set! (-> (the-as grid-hash gp-0) spr-bucket-array) (the-as (pointer grid-hash-word) #x70000000)) + (set! (-> (the-as grid-hash gp-0) bucket-array) (-> (the-as grid-hash gp-0) mem-bucket-array)) + (set! (-> (the-as grid-hash gp-0) debug-draw) #f) + (set! (-> (the-as grid-hash gp-0) use-scratch-ram) #f) + (label cfg-4) + (the-as grid-hash gp-0) + ) + ) + +;; definition for method 16 of type grid-hash +;; WARN: Return type mismatch int vs none. +(defmethod verify-bits-in-bucket ((this grid-hash) (arg0 grid-hash-box) (arg1 grid-hash-box)) + (let ((s5-0 0)) + 0 + (let ((v1-1 8) + (a0-1 (-> this object-count)) + (a1-2 (* (-> this bucket-size) 8)) + ) + (while (< a0-1 a1-2) + (let ((a3-0 (- a0-1 (* (/ a0-1 v1-1) v1-1)))) + (set! s5-0 (logior s5-0 (ash 1 a3-0))) + ) + (+! a0-1 1) + ) + ) + (dotimes (s4-0 (-> this bucket-count)) + (let ((a3-2 (-> this bucket-array (+ (-> this bucket-size) -1 (* s4-0 (-> this bucket-size)))))) + (when (logtest? a3-2 s5-0) + (format 0 "bad bits in bucket ~d bucket-word ~8x test-word ~8x~%" s4-0 a3-2 s5-0) + (break!) + 0 + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 17 of type grid-hash +;; WARN: Return type mismatch int vs none. +(defmethod box-of-everything ((this grid-hash) (arg0 object) (arg1 grid-hash-box)) + (dotimes (v1-0 3) + (set! (-> arg1 min v1-0) (-> this dimension-array v1-0)) + (set! (-> arg1 max v1-0) -1) + ) + (let* ((v1-3 (-> this bucket-size)) + (a3-4 (* (-> this dimension-array 0) v1-3)) + (t0-3 (* (-> this dimension-array 2) a3-4)) + (t1-0 (-> this dimension-array 0)) + (t2-0 (-> this dimension-array 2)) + (t3-0 (-> this dimension-array 1)) + (a0-2 (&-> (-> this bucket-array) (/ (the-as int arg0) 8))) + (a1-2 (ash 1 (logand (the-as int arg0) 7))) + ) + (dotimes (t4-3 t3-0) + (let ((t5-0 a0-2)) + (dotimes (t6-0 t2-0) + (let ((t7-0 t5-0)) + (dotimes (t8-0 t1-0) + (when (logtest? (-> t7-0 0) a1-2) + (set! (-> arg1 min 0) (min (-> arg1 min 0) t8-0)) + (set! (-> arg1 min 1) (min (-> arg1 min 1) t4-3)) + (set! (-> arg1 min 2) (min (-> arg1 min 2) t6-0)) + (set! (-> arg1 max 0) (max (-> arg1 max 0) t8-0)) + (set! (-> arg1 max 1) (max (-> arg1 max 1) t4-3)) + (set! (-> arg1 max 2) (max (-> arg1 max 2) t6-0)) + ) + (&+! t7-0 v1-3) + ) + ) + (&+! t5-0 a3-4) + ) + ) + (&+! a0-2 t0-3) + ) + ) + 0 + (none) + ) + +;; definition (debug) for function validate-bucket-bits +;; WARN: Return type mismatch int vs symbol. +(defun-debug validate-bucket-bits ((arg0 grid-hash) (arg1 (pointer grid-hash-word))) + (let ((s3-0 (-> arg0 object-count)) + (s2-0 (* (-> arg0 bucket-size) 8)) + (gp-0 0) + (s5-0 0) + ) + (while (< s3-0 s2-0) + (let* ((s1-0 (/ s3-0 8)) + (a0-1 (- s3-0 (* s1-0 8))) + ) + (when (logtest? (-> arg1 s1-0) (ash 1 a0-1)) + (format 0 "bit ~d, " s3-0) + (+! gp-0 1) + (set! s5-0 (the-as int (-> arg1 s1-0))) + ) + ) + (+! s3-0 1) + ) + (when (> gp-0 0) + (format 0 "~%~d bad bits found~%" gp-0) + (format 0 "bad-word ~x~%" s5-0) + (break!) + 0 + ) + ) + (the-as symbol 0) + ) + +;; definition for method 18 of type grid-hash +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 18 grid-hash)" 18 grid-hash) + +;; definition for method 19 of type grid-hash +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 19 grid-hash)" 19 grid-hash) + +;; definition for method 20 of type grid-hash +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 20 grid-hash)" 20 grid-hash) + +;; definition for method 21 of type grid-hash +;; WARN: Return type mismatch int vs none. +(defmethod set-up-box ((this grid-hash) (arg0 grid-hash-box) (arg1 vector) (arg2 vector)) + (dotimes (v1-0 3) + (set! (-> arg0 min v1-0) + (the int + (fmax + 0.0 + (fmin + (* (- (-> arg1 data v1-0) (-> this box-min v1-0)) (-> this axis-scale v1-0)) + (the float (+ (-> this dimension-array v1-0) -1)) + ) + ) + ) + ) + (set! (-> arg0 max v1-0) + (the int (fmax 0.0 (fmin + (* (- (-> arg2 data v1-0) (-> this box-min v1-0)) (-> this axis-scale v1-0)) + (the float (+ (-> this dimension-array v1-0) -1)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 22 of type grid-hash +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 22 grid-hash)" 22 grid-hash) + +;; definition for method 23 of type grid-hash +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod line-sphere-to-grid-box ((this grid-hash) (arg0 grid-hash-box) (arg1 vector) (arg2 vector) (arg3 float)) + (let ((s4-0 (new 'stack-no-clear 'grid-hash-box)) + (s5-0 (new 'stack-no-clear 'grid-hash-box)) + ) + (let ((v1-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-0 quad) (-> arg1 quad)) + (vector+! s2-0 arg1 arg2) + (set! (-> v1-0 w) arg3) + (set! (-> s2-0 w) arg3) + (sphere-to-grid-box this s4-0 (the-as sphere v1-0)) + (sphere-to-grid-box this s5-0 (the-as sphere s2-0)) + ) + (set! (-> arg0 min 0) (min (-> s4-0 min 0) (-> s5-0 min 0))) + (set! (-> arg0 min 1) (min (-> s4-0 min 1) (-> s5-0 min 1))) + (set! (-> arg0 min 2) (min (-> s4-0 min 2) (-> s5-0 min 2))) + (set! (-> arg0 max 0) (max (-> s4-0 max 0) (-> s5-0 max 0))) + (set! (-> arg0 max 1) (max (-> s4-0 max 1) (-> s5-0 max 1))) + (set! (-> arg0 max 2) (max (-> s4-0 max 2) (-> s5-0 max 2))) + ) + 0 + (none) + ) + +;; definition for method 10 of type grid-hash +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod clear-bucket-array ((this grid-hash)) + (let ((v1-5 (/ (+ (* (* (* (-> this dimension-array 0) (-> this dimension-array 1)) (-> this dimension-array 2)) + (-> this bucket-size) + ) + 15 + ) + 16 + ) + ) + (a0-1 (the-as (pointer uinteger) (-> this bucket-array))) + ) + (while (nonzero? v1-5) + (+! v1-5 -1) + (set! (-> (the-as (pointer uint128) a0-1) 0) (the-as uint128 0)) + (set! a0-1 (&-> (the-as (pointer grid-hash-word) a0-1) 16)) + ) + ) + 0 + (none) + ) + +;; definition for method 24 of type grid-hash +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod update-grid ((this grid-hash)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (dotimes (a0-1 3) + (set! (-> v1-0 data a0-1) (fmax (-> this min-cell-size) (- (-> this box-max a0-1) (-> this box-min a0-1)))) + ) + (b! + (and (> (-> this object-count) 0) (< 0.0 (-> v1-0 x)) (< 0.0 (-> v1-0 y)) (< 0.0 (-> v1-0 z))) + cfg-23 + :delay (empty-form) + ) + (set! (-> this bucket-count) 1) + (set! (-> this bucket-size) 1) + (dotimes (v1-3 3) + (set! (-> this box-min v1-3) 0.0) + (set! (-> this box-max v1-3) 0.0) + (set! (-> this axis-scale v1-3) 0.0) + (set! (-> this dimension-array v1-3) 1) + ) + (let ((v1-11 + (/ (+ (* (* (* (-> this dimension-array 0) (-> this dimension-array 1)) (-> this dimension-array 2)) + (-> this bucket-size) + ) + 15 + ) + 16 + ) + ) + (a0-19 (the-as (pointer uinteger) (-> this bucket-array))) + ) + (while (nonzero? v1-11) + (+! v1-11 -1) + (set! (-> (the-as (pointer uint128) a0-19) 0) (the-as uint128 0)) + (set! a0-19 (&-> (the-as (pointer grid-hash-word) a0-19) 16)) + ) + ) + 0 + (b! #t cfg-46 :delay (nop!)) + (label cfg-23) + (let ((a0-20 8)) + (set! (-> this bucket-size) (/ (+ a0-20 -1 (-> this object-count)) a0-20)) + ) + (set! (-> this bucket-count) + (min (* (-> this object-count) 16) (/ (-> this bucket-memory-size) (-> this bucket-size))) + ) + (let ((f0-11 + (sqrtf + (/ (the float (-> this bucket-count)) (* (-> v1-0 x) (-> v1-0 z) (the float (-> this vertical-cell-count)))) + ) + ) + ) + (let ((a0-29 (min 126 (+ (-> this bucket-count) -1)))) + (set! (-> this dimension-array 0) (max 1 (min (the int (* f0-11 (-> v1-0 x))) a0-29))) + (set! (-> this dimension-array 1) (-> this vertical-cell-count)) + (set! (-> this dimension-array 2) (max 1 (min (the int (* f0-11 (-> v1-0 z))) a0-29))) + ) + (let* ((f1-15 (* f0-11 (-> v1-0 z))) + (f1-17 (- f1-15 (the float (the int f1-15)))) + (f0-12 (* f0-11 (-> v1-0 x))) + ) + (cond + ((< f1-17 (- f0-12 (the float (the int f0-12)))) + (if (>= (-> this bucket-count) + (* (* (+ (-> this dimension-array 0) 1) (-> this dimension-array 1)) (-> this dimension-array 2)) + ) + (+! (-> this dimension-array 0) 1) + ) + ) + (else + (if (>= (-> this bucket-count) + (* (* (-> this dimension-array 0) (-> this dimension-array 1)) (+ (-> this dimension-array 2) 1)) + ) + (+! (-> this dimension-array 2) 1) + ) + ) + ) + ) + ) + (dotimes (a0-42 2) + (let* ((a1-26 (* a0-42 2)) + (a2-12 (max 1 (the int (/ (-> v1-0 data a1-26) (-> this min-cell-size))))) + ) + (set! (-> (the-as (pointer uint8) (+ a1-26 (the-as int this))) 24) + (the-as uint (min (-> (the-as (pointer int8) (+ a1-26 (the-as int this))) 24) a2-12)) + ) + ) + ) + (dotimes (a0-45 3) + (set! (-> this axis-scale a0-45) (/ (the float (-> this dimension-array a0-45)) (-> v1-0 data a0-45))) + ) + ) + (let ((a2-13 (* (* (-> this dimension-array 0) (-> this dimension-array 1)) (-> this dimension-array 2)))) + (b! (< (-> this bucket-count) a2-13) cfg-40) + (let* ((v1-20 this) + (a0-53 + (/ (+ (* (* (* (-> v1-20 dimension-array 0) (-> v1-20 dimension-array 1)) (-> v1-20 dimension-array 2)) + (-> v1-20 bucket-size) + ) + 15 + ) + 16 + ) + ) + (v1-21 (the-as (pointer uinteger) (-> v1-20 bucket-array))) + ) + (while (nonzero? a0-53) + (+! a0-53 -1) + (set! (-> (the-as (pointer uint128) v1-21) 0) (the-as uint128 0)) + (set! v1-21 (&-> (the-as (pointer grid-hash-word) v1-21) 16)) + ) + ) + 0 + (b! #t cfg-46 :delay (nop!)) + (label cfg-40) + (when *debug-segment* + (format + *stdcon* + "grid-hash::update-grid: bucket overflow! ~d dim ~d ~d ~d~%" + a2-13 + (-> this dimension-array 0) + (-> this dimension-array 1) + (-> this dimension-array 2) + ) + (break!) + 0 + ) + ) + (set! (-> this bucket-count) 1) + (set! (-> this bucket-size) 1) + (dotimes (v1-30 3) + (set! (-> this axis-scale v1-30) 0.0) + (set! (-> this dimension-array v1-30) 1) + ) + (label cfg-46) + 0 + (none) + ) + +;; definition for method 9 of type grid-hash +;; WARN: Return type mismatch int vs none. +(defmethod update-grid-for-objects-in-box ((this grid-hash) (arg0 int) (arg1 vector) (arg2 vector)) + (set! (-> this object-count) arg0) + (dotimes (v1-0 3) + (set! (-> this box-min v1-0) (-> arg1 data v1-0)) + (set! (-> this box-max v1-0) (-> arg2 data v1-0)) + ) + (update-grid this) + 0 + (none) + ) + +;; definition for method 11 of type grid-hash +;; WARN: Return type mismatch int vs none. +(defmethod setup-search-box ((this grid-hash) (arg0 int) (arg1 vector) (arg2 vector) (arg3 vector)) + (let ((v1-0 (new 'stack-no-clear 'vector)) + (t1-0 (new 'stack-no-clear 'vector)) + ) + (dotimes (t2-0 3) + (set! (-> v1-0 data t2-0) (fmin (fmin (-> arg1 data t2-0) (-> arg2 data t2-0)) (-> arg3 data t2-0))) + (set! (-> t1-0 data t2-0) (fmax (fmax (-> arg1 data t2-0) (-> arg2 data t2-0)) (-> arg3 data t2-0))) + ) + (let ((a2-3 this) + (a3-1 (-> this search-box)) + ) + (dotimes (t0-1 3) + (set! (-> a3-1 min t0-1) + (the int + (fmax + 0.0 + (fmin + (* (- (-> v1-0 data t0-1) (-> a2-3 box-min t0-1)) (-> a2-3 axis-scale t0-1)) + (the float (+ (-> a2-3 dimension-array t0-1) -1)) + ) + ) + ) + ) + (set! (-> a3-1 max t0-1) + (the int (fmax 0.0 (fmin + (* (- (-> t1-0 data t0-1) (-> a2-3 box-min t0-1)) (-> a2-3 axis-scale t0-1)) + (the float (+ (-> a2-3 dimension-array t0-1) -1)) + ) + ) + ) + ) + ) + ) + ) + 0 + (set! (-> this work object-id) arg0) + (let* ((t1-1 this) + (t2-21 (-> this search-box)) + (a3-2 arg0) + (v1-5 (-> t1-1 bucket-size)) + (a0-2 (* (-> t1-1 dimension-array 0) v1-5)) + (a1-2 (* (-> t1-1 dimension-array 2) a0-2)) + (a2-6 (+ (- 1 (-> t2-21 min 0)) (-> t2-21 max 0))) + (t0-6 (+ (- 1 (-> t2-21 min 2)) (-> t2-21 max 2))) + (t3-22 (+ (- 1 (-> t2-21 min 1)) (-> t2-21 max 1))) + (t1-3 (the-as + object + (+ (+ (* (-> t2-21 min 0) v1-5) (* (-> t2-21 min 1) a1-2) (* (-> t2-21 min 2) a0-2) (/ a3-2 8) 0) + (the-as int (the-as pointer (-> t1-1 bucket-array))) + ) + ) + ) + (a3-4 (ash 1 (logand a3-2 7))) + (t2-28 t3-22) + ) + (label cfg-10) + (let ((t3-23 t0-6) + (t4-6 t1-3) + ) + (label cfg-11) + (let ((t5-2 a2-6) + (t6-0 t4-6) + ) + (label cfg-12) + (nop!) + (let ((t7-0 (-> (the-as (pointer uint8) t6-0)))) + (nop!) + (let ((t7-1 (logior t7-0 a3-4))) + (+! t5-2 -1) + (set! (-> (the-as (pointer uint8) t6-0)) t7-1) + ) + ) + (b! (nonzero? t5-2) cfg-12 :delay (set! t6-0 (+ (the-as pointer t6-0) v1-5))) + ) + (+! t3-23 -1) + (nop!) + (b! (nonzero? t3-23) cfg-11 :delay (set! t4-6 (+ (the-as pointer t4-6) a0-2))) + ) + (+! t2-28 -1) + (nop!) + (b! (nonzero? t2-28) cfg-10 :delay (set! t1-3 (+ (the-as pointer t1-3) a1-2))) + ) + 0 + 0 + (none) + ) + +;; definition for method 12 of type grid-hash +(defmethod search-for-point ((this grid-hash) (arg0 vector)) + (let ((v1-0 this) + (a0-1 (-> this search-box)) + (a2-0 arg0) + ) + (dotimes (a3-0 3) + (set! (-> a0-1 min a3-0) + (the int + (fmax + 0.0 + (fmin + (* (- (-> a2-0 data a3-0) (-> v1-0 box-min a3-0)) (-> v1-0 axis-scale a3-0)) + (the float (+ (-> v1-0 dimension-array a3-0) -1)) + ) + ) + ) + ) + (set! (-> a0-1 max a3-0) + (the int (fmax 0.0 (fmin + (* (- (-> arg0 data a3-0) (-> v1-0 box-min a3-0)) (-> v1-0 axis-scale a3-0)) + (the float (+ (-> v1-0 dimension-array a3-0) -1)) + ) + ) + ) + ) + ) + ) + 0 + (do-search! this (-> this search-box) (-> this work result-words)) + (-> this work result-words) + ) + +;; definition for method 13 of type grid-hash +;; WARN: Found some very strange gotos. Check result carefully, this is not well tested. +;; INFO: Used lq/sq +(defmethod search-for-sphere ((this grid-hash) (arg0 vector) (arg1 float)) + (let ((v1-0 (new 'stack-no-clear 'sphere))) + (set! (-> v1-0 quad) (-> arg0 quad)) + (set! (-> v1-0 r) arg1) + (sphere-to-grid-box this (-> this search-box) v1-0) + ) + (let ((s5-0 (-> this work result-words)) + (s4-0 0) + ) + (label cfg-1) + (do-search! this (-> this search-box) s5-0) + (dotimes (v1-5 (-> this bucket-size)) + (set! s4-0 (logior s4-0 (-> s5-0 v1-5))) + ) + (when (zero? s4-0) + (when (or (> (-> this search-box min 0) 0) + (> (-> this search-box min 2) 0) + (< (-> this search-box max 0) (+ (-> this dimension-array 0) -1)) + (< (-> this search-box max 2) (+ (-> this dimension-array 2) -1)) + ) + (set! (-> this search-box min 0) (max 0 (+ (-> this search-box min 0) -1))) + (set! (-> this search-box min 2) (max 0 (+ (-> this search-box min 2) -1))) + (set! (-> this search-box max 0) (min (+ (-> this dimension-array 0) -1) (+ (-> this search-box max 0) 1))) + (set! (-> this search-box max 2) (min (+ (-> this dimension-array 2) -1) (+ (-> this search-box max 2) 1))) + (goto cfg-1) + ) + ) + ) + (-> this work result-words) + ) + +;; definition (debug) for function draw-grid +;; WARN: Return type mismatch int vs none. +(defun-debug draw-grid ((arg0 vector) (arg1 vector) (arg2 (pointer int8)) (arg3 rgba)) + (local-vars (sv-64 vector) (sv-68 vector) (sv-72 vector)) + (set! sv-64 (new 'stack-no-clear 'vector)) + (set! sv-68 (new 'stack-no-clear 'vector)) + (set! sv-72 (new 'stack-no-clear 'vector)) + (dotimes (v1-3 3) + (set! (-> sv-64 data v1-3) (/ (- (-> arg1 data v1-3) (-> arg0 data v1-3)) (the float (-> arg2 v1-3)))) + ) + (set! (-> sv-68 x) (-> arg0 x)) + (set! (-> sv-72 x) (-> arg1 x)) + (dotimes (s2-0 (+ (-> arg2 1) 1)) + (set! (-> sv-68 y) (+ (-> arg0 y) (* (the float s2-0) (-> sv-64 y)))) + (set! (-> sv-72 y) (-> sv-68 y)) + (dotimes (s1-0 (+ (-> arg2 2) 1)) + (set! (-> sv-68 z) (+ (-> arg0 z) (* (the float s1-0) (-> sv-64 z)))) + (set! (-> sv-72 z) (-> sv-68 z)) + (add-debug-line #t (bucket-id debug) sv-68 sv-72 arg3 #f (the-as rgba -1)) + ) + ) + (set! (-> sv-68 z) (-> arg0 z)) + (set! (-> sv-72 z) (-> arg1 z)) + (dotimes (s2-1 (+ (-> arg2 1) 1)) + (set! (-> sv-68 y) (+ (-> arg0 y) (* (the float s2-1) (-> sv-64 y)))) + (set! (-> sv-72 y) (-> sv-68 y)) + (dotimes (s1-1 (+ (-> arg2 0) 1)) + (set! (-> sv-68 x) (+ (-> arg0 x) (* (the float s1-1) (-> sv-64 x)))) + (set! (-> sv-72 x) (-> sv-68 x)) + (add-debug-line #t (bucket-id debug) sv-68 sv-72 arg3 #f (the-as rgba -1)) + ) + ) + (set! (-> sv-68 y) (-> arg0 y)) + (set! (-> sv-72 y) (-> arg1 y)) + (dotimes (s3-1 (+ (-> arg2 0) 1)) + (set! (-> sv-68 x) (+ (-> arg0 x) (* (the float s3-1) (-> sv-64 x)))) + (set! (-> sv-72 x) (-> sv-68 x)) + (dotimes (s2-2 (+ (-> arg2 2) 1)) + (set! (-> sv-68 z) (+ (-> arg0 z) (* (the float s2-2) (-> sv-64 z)))) + (set! (-> sv-72 z) (-> sv-68 z)) + (add-debug-line #t (bucket-id debug) sv-68 sv-72 arg3 #f (the-as rgba -1)) + ) + ) + 0 + (none) + ) + +;; definition for method 14 of type grid-hash +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this grid-hash) (arg0 rgba)) + (let ((v1-0 (new 'stack-no-clear 'vector)) + (t0-0 (new 'stack-no-clear 'vector)) + ) + (dotimes (a2-0 3) + (set! (-> v1-0 data a2-0) (-> this box-min a2-0)) + (set! (-> t0-0 data a2-0) (-> this box-max a2-0)) + ) + (draw-grid v1-0 t0-0 (-> this dimension-array) arg0) + ) + 0 + (none) + ) + +;; definition for method 15 of type grid-hash +;; WARN: Return type mismatch int vs none. +(defmethod dump-grid-info ((this grid-hash)) + (if (-> this debug-draw) + (draw this *color-light-blue*) + ) + (format + *stdcon* + "bucket memory ~d, bucket-size ~d, word-size ~d bits~%" + (-> this bucket-memory-size) + (-> this bucket-size) + 8 + ) + (format + *stdcon* + "bucket dimensions ~d ~d ~d~%" + (-> this dimension-array 0) + (-> this dimension-array 1) + (-> this dimension-array 2) + ) + (format *stdcon* "object-count ~d, bucket-count ~d~%" (-> this object-count) (-> this bucket-count)) + 0 + (none) + ) + +;; definition (debug) for function draw-sphere-box +;; WARN: Return type mismatch int vs none. +(defun-debug draw-sphere-box ((arg0 sphere) (arg1 rgba)) + (let ((a2-0 (new 'stack-no-clear 'vector)) + (a3-0 (new 'stack-no-clear 'vector)) + ) + (dotimes (v1-0 3) + (set! (-> a2-0 data v1-0) (- (-> arg0 data v1-0) (-> arg0 r))) + (set! (-> a3-0 data v1-0) (+ (-> arg0 data v1-0) (-> arg0 r))) + ) + (add-debug-box #t (bucket-id debug-no-zbuf1) a2-0 a3-0 arg1) + ) + 0 + (none) + ) + +;; definition (debug) for function draw-line-sphere +;; WARN: Return type mismatch int vs none. +(defun-debug draw-line-sphere ((arg0 vector) (arg1 vector) (arg2 float) (arg3 rgba)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector+! gp-0 arg0 arg1) + (add-debug-sphere #t (bucket-id debug-no-zbuf1) arg0 arg2 arg3) + (add-debug-sphere #t (bucket-id debug-no-zbuf1) gp-0 arg2 arg3) + ) + 0 + (none) + ) + +;; definition for method 0 of type sphere-hash +;; WARN: Return type mismatch object vs sphere-hash. +(defmethod new sphere-hash ((allocation symbol) (type-to-make type) (arg0 int) (arg1 int)) + (let ((s5-0 (the-as object (object-new allocation type-to-make (the-as int (-> type-to-make size)))))) + (when (zero? (the-as sphere-hash s5-0)) + (set! s5-0 0) + (goto cfg-4) + ) + (set! (-> (the-as sphere-hash s5-0) work) *grid-hash-work*) + (set! (-> (the-as sphere-hash s5-0) object-count) 0) + (set! (-> (the-as sphere-hash s5-0) bucket-memory-size) arg0) + (set! (-> (the-as sphere-hash s5-0) vertical-cell-count) 1) + (set! (-> (the-as sphere-hash s5-0) min-cell-size) 16384.0) + (set! (-> (the-as sphere-hash s5-0) mem-bucket-array) + (the-as (pointer grid-hash-word) (malloc allocation arg0)) + ) + (set! (-> (the-as sphere-hash s5-0) spr-bucket-array) (the-as (pointer grid-hash-word) #x70000000)) + (set! (-> (the-as sphere-hash s5-0) bucket-array) (-> (the-as sphere-hash s5-0) mem-bucket-array)) + (set! (-> (the-as sphere-hash s5-0) debug-draw) #f) + (set! (-> (the-as sphere-hash s5-0) use-scratch-ram) #f) + (set! (-> (the-as sphere-hash s5-0) max-object-count) arg1) + (set! (-> (the-as sphere-hash s5-0) mem-sphere-array) (the-as uint (malloc allocation (* arg1 16)))) + (set! (-> (the-as sphere-hash s5-0) spr-sphere-array) (the-as uint (+ #x70000000 arg0))) + (set! (-> (the-as sphere-hash s5-0) sphere-array) + (the-as (inline-array sphere) (-> (the-as sphere-hash s5-0) mem-sphere-array)) + ) + (label cfg-4) + (the-as sphere-hash s5-0) + ) + ) + +;; definition for method 25 of type sphere-hash +;; WARN: Return type mismatch int vs none. +(defmethod clear-objects! ((this sphere-hash)) + (set! (-> this object-count) 0) + (dotimes (v1-0 3) + (set! (-> this box-min v1-0) 10000000000000000000000000000000000000.0) + (set! (-> this box-max v1-0) -10000000000000000000000000000000000000.0) + ) + (cond + ((-> this use-scratch-ram) + (set! (-> this sphere-array) (the-as (inline-array sphere) (-> this spr-sphere-array))) + (set! (-> this bucket-array) (-> this spr-bucket-array)) + ) + (else + (set! (-> this sphere-array) (the-as (inline-array sphere) (-> this mem-sphere-array))) + (set! (-> this bucket-array) (-> this mem-bucket-array)) + ) + ) + 0 + (none) + ) + +;; definition for method 28 of type sphere-hash +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 28 sphere-hash)" 28 sphere-hash) + +;; definition for method 26 of type sphere-hash +(defmethod add-a-sphere ((this sphere-hash) (arg0 vector)) + (let ((gp-0 (-> this object-count))) + (cond + ((< gp-0 (-> this max-object-count)) + (let ((a0-2 (-> this sphere-array gp-0))) + (mem-copy! (the-as pointer a0-2) (the-as pointer arg0) 16) + ) + (dotimes (v1-2 3) + (set! (-> this box-min v1-2) (fmin (-> this box-min v1-2) (- (-> arg0 data v1-2) (-> arg0 w)))) + (set! (-> this box-max v1-2) (fmax (-> this box-max v1-2) (+ (-> arg0 data v1-2) (-> arg0 w)))) + ) + (+! (-> this object-count) 1) + gp-0 + ) + (else + -1 + ) + ) + ) + ) + +;; definition for method 27 of type sphere-hash +(defmethod add-a-sphere-with-flag ((this sphere-hash) (arg0 vector) (arg1 int)) + (let ((gp-0 (-> this object-count))) + (cond + ((< gp-0 (-> this max-object-count)) + (let ((s2-0 (the-as object (-> this sphere-array gp-0)))) + (mem-copy! (the-as pointer s2-0) (the-as pointer arg0) 16) + (dotimes (v1-2 3) + (set! (-> this box-min v1-2) (fmin (-> this box-min v1-2) (- (-> arg0 data v1-2) (-> arg0 w)))) + (set! (-> this box-max v1-2) (fmax (-> this box-max v1-2) (+ (-> arg0 data v1-2) (-> arg0 w)))) + ) + (set! (-> (the-as (pointer int8) s2-0) 12) arg1) + ) + (+! (-> this object-count) 1) + gp-0 + ) + (else + -1 + ) + ) + ) + ) + +;; definition for method 32 of type sphere-hash +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 32 sphere-hash)" 32 sphere-hash) + +;; definition for method 29 of type sphere-hash +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 29 sphere-hash)" 29 sphere-hash) + +;; definition for method 30 of type sphere-hash +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 30 sphere-hash)" 30 sphere-hash) + +;; definition for method 31 of type sphere-hash +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 31 sphere-hash)" 31 sphere-hash) + +;; definition for method 15 of type sphere-hash +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod dump-grid-info ((this sphere-hash)) + (call-parent-method this) + (new 'stack-no-clear 'vector) + (let ((f30-0 6144.0)) + (set! (-> this work temp-box-min quad) (-> (target-pos 0) quad)) + (+! (-> this work temp-box-min y) f30-0) + ) + (set! (-> this work temp-box-max quad) (-> this work temp-box-min quad)) + (set! (-> this work visit-count) 0) + (set! (-> this debug-draw) #t) + (set! (-> this work add-object-time) (the-as uint 0)) + 0 + (none) + ) + +;; definition for method 0 of type spatial-hash +;; WARN: Return type mismatch object vs spatial-hash. +(defmethod new spatial-hash ((allocation symbol) (type-to-make type) (arg0 int) (arg1 int)) + (let ((gp-0 (the-as object (object-new allocation type-to-make (the-as int (-> type-to-make size)))))) + (when (zero? (the-as spatial-hash gp-0)) + (set! gp-0 0) + (goto cfg-4) + ) + (set! (-> (the-as spatial-hash gp-0) work) *grid-hash-work*) + (set! (-> (the-as spatial-hash gp-0) object-count) 0) + (set! (-> (the-as spatial-hash gp-0) bucket-memory-size) arg0) + (set! (-> (the-as spatial-hash gp-0) vertical-cell-count) 1) + (set! (-> (the-as spatial-hash gp-0) min-cell-size) 16384.0) + (set! (-> (the-as spatial-hash gp-0) mem-bucket-array) + (the-as (pointer grid-hash-word) (malloc allocation arg0)) + ) + (set! (-> (the-as spatial-hash gp-0) spr-bucket-array) (the-as (pointer grid-hash-word) #x70000000)) + (set! (-> (the-as spatial-hash gp-0) bucket-array) (-> (the-as spatial-hash gp-0) mem-bucket-array)) + (set! (-> (the-as spatial-hash gp-0) debug-draw) #f) + (set! (-> (the-as spatial-hash gp-0) use-scratch-ram) #f) + (set! (-> (the-as spatial-hash gp-0) max-object-count) arg1) + (set! (-> (the-as spatial-hash gp-0) mem-sphere-array) (the-as uint (malloc allocation (* arg1 16)))) + (set! (-> (the-as spatial-hash gp-0) mem-object-array) + (the-as (inline-array hash-object-info) (malloc allocation (* arg1 16))) + ) + (set! (-> (the-as spatial-hash gp-0) spr-sphere-array) (the-as uint (+ #x70000000 arg0))) + (set! (-> (the-as spatial-hash gp-0) spr-object-array) + (the-as (inline-array hash-object-info) (+ #x70000000 (* arg1 16) arg0)) + ) + (set! (-> (the-as spatial-hash gp-0) sphere-array) + (the-as (inline-array sphere) (-> (the-as spatial-hash gp-0) mem-sphere-array)) + ) + (set! (-> (the-as spatial-hash gp-0) object-array) (-> (the-as spatial-hash gp-0) mem-object-array)) + (label cfg-4) + (the-as spatial-hash gp-0) + ) + ) + +;; definition for method 25 of type spatial-hash +;; WARN: Return type mismatch int vs none. +(defmethod clear-objects! ((this spatial-hash)) + (set! (-> this object-count) 0) + (dotimes (v1-0 3) + (set! (-> this box-min v1-0) 10000000000000000000000000000000000000.0) + (set! (-> this box-max v1-0) -10000000000000000000000000000000000000.0) + ) + (cond + ((-> this use-scratch-ram) + (set! (-> this sphere-array) (the-as (inline-array sphere) (-> this spr-sphere-array))) + (set! (-> this object-array) (-> this spr-object-array)) + (set! (-> this bucket-array) (-> this spr-bucket-array)) + ) + (else + (set! (-> this sphere-array) (the-as (inline-array sphere) (-> this mem-sphere-array))) + (set! (-> this object-array) (-> this mem-object-array)) + (set! (-> this bucket-array) (-> this mem-bucket-array)) + ) + ) + 0 + (none) + ) + +;; definition for method 32 of type spatial-hash +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 32 spatial-hash)" 32 spatial-hash) + +;; definition for method 33 of type spatial-hash +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod spatial-hash-method-33 ((this spatial-hash) (arg0 vector) (arg1 hash-object-info)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (let ((v0-0 (-> this object-count))) + (cond + ((< v0-0 (-> this max-object-count)) + (let ((v1-2 (-> this sphere-array v0-0)) + (a3-2 (-> this object-array v0-0)) + ) + (let ((t0-1 (new 'stack-no-clear 'inline-array 'vector 2))) + (let ((t2-0 (-> t0-1 0))) + (let ((t1-0 arg0)) + (let ((t3-0 (- (-> arg0 w)))) + (.mov vf6 t3-0) + ) + (.lvf vf4 (&-> t1-0 quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> t2-0 quad) vf5) + ) + (let ((t2-1 (-> t0-1 1))) + (let ((t1-1 arg0)) + (let ((t3-1 (-> arg0 w))) + (.mov vf6 t3-1) + ) + (.lvf vf4 (&-> t1-1 quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> t2-1 quad) vf5) + ) + (dotimes (t1-2 3) + (set! (-> this box-min t1-2) (fmin (-> this box-min t1-2) (-> (&-> t0-1 0 data t1-2) 0))) + (set! (-> this box-max t1-2) (fmax (-> this box-max t1-2) (-> (&-> t0-1 0 data t1-2) 4))) + ) + ) + (set! (-> v1-2 quad) (-> arg0 quad)) + (set! (-> a3-2 object) (the-as basic arg1)) + ) + (+! (-> this object-count) 1) + ) + (else + -1 + ) + ) + ) + (none) + ) + ) + +;; definition for method 38 of type spatial-hash +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 38 spatial-hash)" 38 spatial-hash) + +;; definition for method 35 of type spatial-hash +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 35 spatial-hash)" 35 spatial-hash) + +;; definition for method 36 of type spatial-hash +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 36 spatial-hash)" 36 spatial-hash) + +;; definition for method 34 of type spatial-hash +;; INFO: function output is handled by mips2c +(defmethod-mips2c "(method 34 spatial-hash)" 34 spatial-hash) + +;; definition for method 37 of type spatial-hash +;; INFO: Used lq/sq +(defmethod fill-actor-list-for-line-sphere ((this spatial-hash) + (arg0 vector) + (arg1 vector) + (arg2 float) + (arg3 (pointer collide-shape)) + (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) + (fill-actor-list-for-box this v1-0 (the-as (pointer collide-shape) arg1) (the-as int arg2)) + ) + ) + +;; definition for method 39 of type spatial-hash +(defmethod spatial-hash-method-39 ((this spatial-hash) (arg0 object) (arg1 hash-object-info)) + (dotimes (s5-0 (-> this object-count)) + (let ((a0-2 (-> this object-array s5-0 object))) + (when (not (valid? a0-2 basic "" #t 0)) + (break!) + 0 + ) + ) + ) + 0 + ) 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 4c991fbfe2..e1d4b1faf7 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) @@ -480,7 +481,7 @@ (+! (-> s5-0 2 y) 16384.0) (set! (-> s5-0 2 r) 2867.2) (let ((v1-60 gp-0)) - (set! (-> v1-60 spheres) s5-0) + (set! (-> v1-60 best-dist) (the-as float s5-0)) (set! (-> v1-60 best-other-prim) (the-as collide-shape-prim 3)) (set! (-> v1-60 collide-with) (logclear @@ -512,8 +513,8 @@ ((board-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 3.5) :shadow board-shadow-mg - :shadow-joint-index 3 - :light-index 1 + :sort 1 + :origin-joint-index 3 ) ;; definition for symbol *board-shadow-control*, type shadow-control diff --git a/test/decompiler/reference/jak3/engine/target/board/board-part_REF.gc b/test/decompiler/reference/jak3/engine/target/board/board-part_REF.gc new file mode 100644 index 0000000000..d384192eb8 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/board/board-part_REF.gc @@ -0,0 +1,446 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-board-land-straight + :id 189 + :duration (seconds 0.035) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 249)) + ) + +;; failed to figure out what this is: +(defpartgroup group-board-quick-jump + :id 190 + :duration (seconds 0.035) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 249)) + ) + +;; failed to figure out what this is: +(defpartgroup group-board-launch + :id 191 + :duration (seconds 0.035) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 666 :flags (sp3)) (sp-item 667 :flags (sp3)) (sp-item 668 :flags (sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 668 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (: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 -0.125)) + (: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 667 + :init-specs ((:texture (middot level-default-sprite)) + (:num 100.0) + (:scale-x (meters 0.05) (meters 0.05)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.1125)) + (:vel-y (meters 0.33333334) (meters 0.006666667)) + (:fade-r -0.85333335) + (:fade-g -0.85333335) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.9 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 666 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 30.0) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 32.0 32.0) + (:vel-y (meters 0.033333335) (meters 0.1)) + (:scalevel-x (meters 0.006666667) (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.85333335) + (:fade-g -0.85333335) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.93 0.02) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 60) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-target-board-duck-charge + :id 186 + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 669 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 669 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 0.3) + (:y (meters 0.5)) + (:scale-x (meters 10) (meters 5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.85333335) + (:fade-g 0.85333335) + (:fade-a 0.85333335 0.85333335) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'board-charge-track) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 670 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.05)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-g -0.85 -1.7) + (:fade-b -8.0) + (:fade-a -0.16 -0.16) + (:accel-y (meters -0.0016666667) (meters -0.00066666666)) + (:friction 0.95) + (:timer (seconds 0.167) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 45) (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-target-board + :id 185 + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 671) (sp-item 672 :flags (is-3d)) (sp-item 673)) + ) + +;; failed to figure out what this is: +(defpart 671 + :init-specs ((:num 3.0) + (:y (meters 0.25)) + (:rot-x 7) + (:r 2048.0) + (:g 1638.4) + (:b 1843.2) + (:fade-b -0.08533333) + (:timer (seconds 0.135)) + (:flags (distort)) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 672 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-target-orient) + (:num 1.0) + (:y (meters 0.25)) + (:scale-x (meters 4) (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 64.0 128.0) + (:g :copy r) + (:b 255.0) + (:a 8.0 8.0) + (:scalevel-x (meters -0.02) (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.1) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + ) + ) + +;; failed to figure out what this is: +(defpart 673 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.05)) + (:r 128.0 64.0) + (:g :copy r) + (:b 255.0) + (:a 64.0 32.0) + (:omega (degrees 0.05625)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-r -3.0) + (:fade-g -3.0) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.00033333333) (meters -0.00033333333)) + (:friction 0.95) + (:timer (seconds 0.167) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 80) (degrees 10)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 674 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 0.0) + (:y (meters 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 32.0) + (:a 8.0 56.0) + (:vel-y (meters 0.13333334) (meters 0.16666667)) + (:scalevel-x (meters 0.013333334)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.4222223) + (:fade-a -0.35555556) + (:accel-y (meters 0.00008333333)) + (:friction 0.7) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-board-spin-attack + :id 184 + :duration (seconds 1) + :flags (sp0 sp6) + :bounds (static-bspherem 0 0 0 2) + :rotate ((degrees 90) (degrees 180) (degrees 90)) + :parts ((sp-item 675 :flags (is-3d sp3 sp6 sp7)) + (sp-item 676 :flags (is-3d sp3 sp6 sp7)) + (sp-item 677 :flags (sp3 sp6)) + ) + ) + +;; failed to figure out what this is: +(defpart 677 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3) (meters 0.5)) + (:rot-x (degrees 11.25)) + (:scale-y (meters 4) (meters 0.5)) + (:r 0.0) + (:g 128.0) + (:b 255.0) + (:a 64.0) + (:fade-a -0.4) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + (:func 'sparticle-track-root) + ) + ) + +;; failed to figure out what this is: +(defpart 676 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 12)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 9)) + (:r 0.0) + (:g 128.0 128.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters -0.086666666)) + (:scalevel-y (meters -0.09)) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 675 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 1.4)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 0.9)) + (:r 0.0) + (:g 128.0 128.0) + (:b 255.0) + (:a 255.0) + (:scalevel-x (meters 0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-a -3.1875) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:func 'sparticle-track-root) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-board-zap-attack + :id 188 + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 678 :flags (is-3d) :period (seconds 20) :length (seconds 0.335))) + ) + +;; failed to figure out what this is: +(defpartgroup group-board-green-eco-zap-attack + :id 187 + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 679 :flags (is-3d) :period (seconds 20) :length (seconds 0.335))) + ) + +;; definition for function board-charge-track +;; WARN: Return type mismatch int vs none. +(defun board-charge-track ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((v1-0 *target*) + (a1-1 37) + ) + (when *target* + (let ((v1-2 (vector<-cspace! (new 'stack-no-clear 'vector) (-> v1-0 node-list data a1-1)))) + (set! (-> arg2 x) (-> v1-2 x)) + (set! (-> arg2 y) (-> v1-2 y)) + (set! (-> arg2 z) (-> v1-2 z)) + ) + ) + ) + 0 + (none) + ) + +;; definition for function board-zap-track +;; WARN: Return type mismatch int vs none. +(defun board-zap-track ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let* ((v1-2 (ppointer->process (-> arg1 key proc parent))) + (a1-1 (the int (-> arg1 user-float))) + (v1-5 (vector<-cspace! (new 'stack-no-clear 'vector) (-> (the-as process-drawable v1-2) node-list data a1-1))) + ) + (set! (-> arg2 x) (-> v1-5 x)) + (set! (-> arg2 y) (-> v1-5 y)) + (set! (-> arg2 z) (-> v1-5 z)) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 678 + :init-specs ((:texture (laser-hit-rim level-default-sprite)) + (:num 0.25) + (:y (meters 0.5)) + (:scale-x (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 80.0) + (:b 255.0) + (:a 255.0) + (:scalevel-x (meters 0.16666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.6) + (:fade-g -1.6) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 37.0) + (:func 'board-zap-track) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 680 + :init-specs ((:func 'none)) + ) + +;; failed to figure out what this is: +(defpart 679 + :init-specs ((:texture (laser-hit-rim level-default-sprite)) + (:num 0.25) + (:y (meters 0.5)) + (:scale-x (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 255.0) + (:b 80.0) + (:a 255.0) + (:scalevel-x (meters 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.6) + (:fade-b -1.6) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 37.0) + (:func 'board-zap-track) + (:rotate-y (degrees 0)) + ) + ) + + + + 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 1bf8071bd0..7648b2bcaf 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 @@ -434,50 +434,11 @@ (cond ((logtest? (-> *part-group-id-table* 189 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> gp-2 quad)) - (let ((s5-1 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-1 - (let ((t9-11 (method-of-type part-tracker-subsampler activate))) - (t9-11 (the-as part-tracker-subsampler s5-1) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-12 run-function-in-process) - (a0-15 s5-1) - (a1-9 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 189)) - (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-12) a0-15 a1-9 *part-tracker-subsampler-params-default*) - ) - (-> s5-1 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 189)) ) (else (set! (-> *launch-matrix* trans quad) (-> gp-2 quad)) - (let ((s5-2 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-2 - (let ((t9-14 (method-of-type part-tracker activate))) - (t9-14 (the-as part-tracker s5-2) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-15 run-function-in-process) - (a0-20 s5-2) - (a1-12 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 189)) - (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-15) a0-20 a1-12 *part-tracker-params-default*) - ) - (-> s5-2 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 189)) ) ) (let ((s5-3 (process-spawn @@ -897,53 +858,20 @@ ) (sound-play "board-launch") (when (!= (-> self board charge-progress) 0.0) - (cond - ((logtest? (-> *part-group-id-table* 191 flags) (sp-group-flag sp13)) - (let ((gp-2 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-2 - (let ((t9-8 (method-of-type part-tracker-subsampler activate))) - (t9-8 (the-as part-tracker-subsampler gp-2) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-9 run-function-in-process) - (a0-35 gp-2) - (a1-7 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 191)) - (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) (-> self node-list data 0 bone transform)) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-9) a0-35 a1-7 *part-tracker-subsampler-params-default*) - ) - (-> gp-2 ppointer) - ) - ) - ) - (else - (let ((gp-3 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-3 - (let ((t9-11 (method-of-type part-tracker activate))) - (t9-11 (the-as part-tracker gp-3) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-12 run-function-in-process) - (a0-38 gp-3) - (a1-10 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 191)) - (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) (-> self node-list data 0 bone transform)) - ((the-as (function object object object none) t9-12) a0-38 a1-10 *part-tracker-params-default*) - ) - (-> gp-3 ppointer) - ) + (if (logtest? (-> *part-group-id-table* 191 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 191) + :mat-joint (-> self node-list data 0 bone transform) + ) + (part-tracker-spawn + part-tracker + :to self + :group (-> *part-group-id-table* 191) + :mat-joint (-> self node-list data 0 bone transform) ) ) - ) ) (set-time! (-> self board halfpipe-jump-time)) (set! (-> self board charge-progress) 0.0) @@ -1042,53 +970,20 @@ (when (and (cpad-hold? (-> self control cpad number) l1) (!= (-> self board charge-progress) 0.0)) (+! f30-0 (* (-> self board charge-progress) (-> *TARGET_BOARD-bank* charge-jump-height))) (sound-play "board-launch") - (cond - ((logtest? (-> *part-group-id-table* 191 flags) (sp-group-flag sp13)) - (let ((s3-3 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s3-3 - (let ((t9-7 (method-of-type part-tracker-subsampler activate))) - (t9-7 (the-as part-tracker-subsampler s3-3) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-8 run-function-in-process) - (a0-14 s3-3) - (a1-8 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 191)) - (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) (-> self node-list data 0 bone transform)) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-8) a0-14 a1-8 *part-tracker-subsampler-params-default*) - ) - (-> s3-3 ppointer) - ) - ) - ) - (else - (let ((s3-4 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s3-4 - (let ((t9-10 (method-of-type part-tracker activate))) - (t9-10 (the-as part-tracker s3-4) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-11 run-function-in-process) - (a0-17 s3-4) - (a1-11 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 191)) - (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) (-> self node-list data 0 bone transform)) - ((the-as (function object object object none) t9-11) a0-17 a1-11 *part-tracker-params-default*) - ) - (-> s3-4 ppointer) - ) + (if (logtest? (-> *part-group-id-table* 191 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 191) + :mat-joint (-> self node-list data 0 bone transform) + ) + (part-tracker-spawn + part-tracker + :to self + :group (-> *part-group-id-table* 191) + :mat-joint (-> self node-list data 0 bone transform) ) ) - ) ) (set! (-> self board charge-progress) 0.0) (sound-stop (-> self board charge-sound-id)) @@ -1103,50 +998,11 @@ (cond ((logtest? (-> *part-group-id-table* 190 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> s3-5 quad)) - (let ((s2-2 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s2-2 - (let ((t9-14 (method-of-type part-tracker-subsampler activate))) - (t9-14 (the-as part-tracker-subsampler s2-2) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-15 run-function-in-process) - (a0-28 s2-2) - (a1-14 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 190)) - (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-15) a0-28 a1-14 *part-tracker-subsampler-params-default*) - ) - (-> s2-2 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 190)) ) (else (set! (-> *launch-matrix* trans quad) (-> s3-5 quad)) - (let ((s2-3 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s2-3 - (let ((t9-17 (method-of-type part-tracker activate))) - (t9-17 (the-as part-tracker s2-3) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-18 run-function-in-process) - (a0-33 s2-3) - (a1-17 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 190)) - (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-18) a0-33 a1-17 *part-tracker-params-default*) - ) - (-> s2-3 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 190)) ) ) (let* ((s1-1 (get-process *default-dead-pool* manipy #x20000 1)) @@ -2769,16 +2625,16 @@ (set! (-> self board ride-rot-old) (-> self board ride-rot)) (let ((gp-0 (new 'stack-no-clear 'vector))) (set! (-> gp-0 quad) (-> self control trans quad)) - (let* ((s5-0 (new 'stack-no-clear 'collide-query)) - (a0-16 (-> self control)) - (t9-2 (method-of-object a0-16 find-ground)) - (a1-0 s5-0) - (a2-3 (logclear (-> self control root-prim prim-core collide-with) (collide-spec water))) - (a3-0 8192.0) - (t0-0 81920.0) - (t1-0 1024.0) - ) - (if (t9-2 a0-16 a1-0 a2-3 a3-0 t0-0 t1-0) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (if (find-ground + (-> self control) + s5-0 + (logclear (-> self control root-prim prim-core collide-with) (collide-spec water)) + 8192.0 + 81920.0 + 1024.0 + (the-as process #f) + ) (set! (-> self control gspot-pat-surfce) (-> s5-0 best-other-tri pat)) ) ) @@ -2849,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)) @@ -3011,7 +2867,7 @@ (logclear! (-> gp-2 options) (projectile-options po14 po15 po16)) (set! (-> gp-2 notify-handle) (the-as handle #f)) (set! (-> gp-2 owner-handle) (the-as handle #f)) - (set! (-> gp-2 target-handle) (the-as uint #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-27 *game-info*) @@ -3533,7 +3389,7 @@ (set! (-> v1-8 invinc-time) (-> *TARGET-bank* hit-invulnerable-timeout)) (set! (-> v1-8 speed) 1.0) (set! (-> v1-8 damage) (-> *FACT-bank* health-default-inc)) - (set! (-> v1-8 knock) (knocked-type knocked-type-0)) + (set! (-> v1-8 knock) (knocked-type none)) ) (case arg0 (('shove) @@ -3631,7 +3487,7 @@ ) ) (when (not (and (= (-> self game mode) 'play) (>= 0.0 (-> self fact health)))) - (when (= (-> gp-0 knock) (knocked-type knocked-type-8)) + (when (= (-> gp-0 knock) (knocked-type knocked-off)) (set-quaternion! (-> self control) (-> self control dir-targ)) (set-forward-vel (* -3.0 (-> gp-0 shove-back))) (go target-board-get-off (the-as handle #f) 'hit) @@ -3689,7 +3545,3 @@ (target-board-joint-points) ) ) - - - - 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 30850f0a25..acc3cf82b8 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 02c8339262..a4a93acfd5 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 @@ -699,53 +699,16 @@ ) (case (-> self control danger-mode) (('board-spin) - (cond - ((logtest? (-> *part-group-id-table* 184 flags) (sp-group-flag sp13)) - (let ((gp-2 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-2 - (let ((t9-12 (method-of-type part-tracker-subsampler activate))) - (t9-12 (the-as part-tracker-subsampler gp-2) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-13 run-function-in-process) - (a0-53 gp-2) - (a1-12 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 184)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 37) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-13) a0-53 a1-12 *part-tracker-subsampler-params-default*) - ) - (-> gp-2 ppointer) - ) - ) - ) - (else - (let ((gp-3 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-3 - (let ((t9-15 (method-of-type part-tracker activate))) - (t9-15 (the-as part-tracker gp-3) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-16 run-function-in-process) - (a0-56 gp-3) - (a1-15 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 184)) - (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) self) - (set! (-> *part-tracker-params-default* mat-joint) 37) - ((the-as (function object object object none) t9-16) a0-56 a1-15 *part-tracker-params-default*) - ) - (-> gp-3 ppointer) - ) + (if (logtest? (-> *part-group-id-table* 184 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 184) + :target self + :mat-joint 37 ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 184) :target self :mat-joint 37) ) - ) ) ) (target-timed-invulnerable (seconds 0.5) self 2) @@ -919,6 +882,7 @@ ) ;; definition for function target-board-init +;; WARN: Return type mismatch connection vs none. (defbehavior target-board-init target () (target-lightjak-end-mode #t) (target-darkjak-end-mode #t) @@ -952,7 +916,7 @@ (set! (-> self board sound-air-knob) 0.0) (set! (-> self board sound-bank-knob) 0.0) (set! (-> self board turn-sound-id) (new 'static 'sound-id)) - (set! (-> self board mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modebord 0.0 0))) + (set! (-> self board mode-sound-bank) (add-setting! 'mode-sound-bank 'modebord 0.0 0)) (set-time! (-> self board board-get-on-time)) (set! (-> self board stick-lock) #f) (set! (-> self board stick-off) #f) @@ -1422,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)))) @@ -1442,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))) @@ -1486,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)) @@ -1529,9 +1493,9 @@ ) ) (spawn (-> self board effect-part) (-> self control trans)) - (do-effect (-> self skel effect) (the-as symbol "effect-board-poof") 0.0 -1) + (do-effect (-> self skel effect) "effect-board-poof" 0.0 -1) (if (< (-> self board shock-offset) -2048.0) - (do-effect (-> self skel effect) (the-as symbol "effect-board-poof") 0.0 -1) + (do-effect (-> self skel effect) "effect-board-poof" 0.0 -1) ) ) (vector-lerp! (-> self board slow-transv) (-> self board slow-transv) (-> self control transv) 0.2) @@ -1620,50 +1584,11 @@ (cond ((logtest? (-> *part-group-id-table* 23 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((gp-3 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-3 - (let ((t9-9 (method-of-type part-tracker-subsampler activate))) - (t9-9 (the-as part-tracker-subsampler gp-3) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-10 run-function-in-process) - (a0-31 gp-3) - (a1-8 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 23)) - (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-10) a0-31 a1-8 *part-tracker-subsampler-params-default*) - ) - (-> gp-3 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 23)) ) (else (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((gp-4 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-4 - (let ((t9-12 (method-of-type part-tracker activate))) - (t9-12 (the-as part-tracker gp-4) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-13 run-function-in-process) - (a0-37 gp-4) - (a1-11 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 23)) - (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-13) a0-37 a1-11 *part-tracker-params-default*) - ) - (-> gp-4 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 23)) ) ) ) @@ -2328,100 +2253,30 @@ (focus-test? self board) (< 0.0 (-> self fact eco-green)) ) - (cond - ((logtest? (-> *part-group-id-table* 187 flags) (sp-group-flag sp13)) - (let ((s5-7 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-7 - (let ((t9-52 (method-of-type part-tracker-subsampler activate))) - (t9-52 (the-as part-tracker-subsampler s5-7) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-53 run-function-in-process) - (a0-113 s5-7) - (a1-46 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 187)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 37) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-53) a0-113 a1-46 *part-tracker-subsampler-params-default*) - ) - (-> s5-7 ppointer) - ) - ) - ) - (else - (let ((s5-8 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-8 - (let ((t9-55 (method-of-type part-tracker activate))) - (t9-55 (the-as part-tracker s5-8) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-56 run-function-in-process) - (a0-116 s5-8) - (a1-49 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 187)) - (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) self) - (set! (-> *part-tracker-params-default* mat-joint) 37) - ((the-as (function object object object none) t9-56) a0-116 a1-49 *part-tracker-params-default*) - ) - (-> s5-8 ppointer) - ) + (if (logtest? (-> *part-group-id-table* 187 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 187) + :target self + :mat-joint 37 ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 187) :target self :mat-joint 37) ) - ) (target-board-green-eco-attack #t) (target-board-green-eco-use 5.0) ) ((logtest? (-> *part-group-id-table* 188 flags) (sp-group-flag sp13)) - (let ((s5-9 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-9 - (let ((t9-60 (method-of-type part-tracker-subsampler activate))) - (t9-60 (the-as part-tracker-subsampler s5-9) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-61 run-function-in-process) - (a0-121 s5-9) - (a1-52 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 188)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 37) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-61) a0-121 a1-52 *part-tracker-subsampler-params-default*) - ) - (-> s5-9 ppointer) - ) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 188) + :target self + :mat-joint 37 ) ) (else - (let ((s5-10 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-10 - (let ((t9-63 (method-of-type part-tracker activate))) - (t9-63 (the-as part-tracker s5-10) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-64 run-function-in-process) - (a0-124 s5-10) - (a1-55 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 188)) - (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) self) - (set! (-> *part-tracker-params-default* mat-joint) 37) - ((the-as (function object object object none) t9-64) a0-124 a1-55 *part-tracker-params-default*) - ) - (-> s5-10 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 188) :target self :mat-joint 37) ) ) (target-timed-invulnerable (-> *TARGET_BOARD-bank* zap-duration) self 2) @@ -3373,7 +3228,3 @@ 0 (none) ) - - - - diff --git a/test/decompiler/reference/jak3/engine/target/collide-reaction-target_REF.gc b/test/decompiler/reference/jak3/engine/target/collide-reaction-target_REF.gc index d63fe4303d..6b22ca8010 100644 --- a/test/decompiler/reference/jak3/engine/target/collide-reaction-target_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/collide-reaction-target_REF.gc @@ -222,7 +222,7 @@ (set! (-> sv-88 rvec quad) (-> arg3 quad)) (set! (-> sv-88 uvec quad) (-> arg3 quad)) (let ((a1-3 (new 'stack-no-clear 'vector))) - (vector-float*! a1-3 (-> arg1 move-dist) (the-as float (-> arg1 spheres))) + (vector-float*! a1-3 (-> arg1 move-dist) (-> arg1 best-dist)) (move-by-vector! arg0 a1-3) ) (set! sv-104 (logior sv-104 (react-to-pat! arg0 (-> arg1 best-other-tri pat)))) @@ -249,7 +249,7 @@ (let ((v1-35 (-> sv-80 quad))) (set! (-> sv-84 quad) v1-35) ) - (if (= (the-as float (-> arg1 spheres)) 0.0) + (if (= (-> arg1 best-dist) 0.0) (move-by-vector! arg0 (vector-normalize-copy! (new-stack-vector0) sv-84 3.0)) ) (set! (-> arg0 poly-normal quad) (-> arg1 best-other-tri normal quad)) diff --git a/test/decompiler/reference/jak3/engine/target/darkjak-h_REF.gc b/test/decompiler/reference/jak3/engine/target/darkjak-h_REF.gc index 3cccdba018..008c3ce2a5 100644 --- a/test/decompiler/reference/jak3/engine/target/darkjak-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/darkjak-h_REF.gc @@ -18,11 +18,11 @@ (clock-on symbol) (hud handle 1) (tone sound-id) - (bomb uint32) + (bomb (pointer process)) (mode-sound-bank connection) ) (:methods - (darkjak-info-method-9 () none) + (update-clock! (_type_ int) none) ) ) @@ -56,7 +56,3 @@ ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/engine/target/flut/flut-h_REF.gc b/test/decompiler/reference/jak3/engine/target/flut/flut-h_REF.gc index 65c0c03068..b0a2a2cc21 100644 --- a/test/decompiler/reference/jak3/engine/target/flut/flut-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/flut/flut-h_REF.gc @@ -51,26 +51,29 @@ ;; definition of type flut (deftype flut (process-focusable) - ((extra-trans vector :inline) + ((root collide-shape-moving :override) + (extra-trans vector :inline) (condition int32) (shadow-backup shadow-geo) (rider handle) (nav-sphere-handle handle) (probe-time time-frame) - (count-lock basic) + (count-lock symbol) (flags flut-flag) - (mode basic) + (mode symbol) (color-index int32) (minimap connection-minimap) ) + (:state-methods + wait-for-start + idle + (pickup (state flut)) + wait-for-return + die + ) (:methods - (flut-method-28 () none) - (flut-method-29 () none) - (flut-method-30 () none) - (flut-method-31 () none) - (flut-method-32 () none) - (flut-method-33 () none) - (flut-method-34 () none) + (flut-method-33 (_type_) symbol) + (spawn-part-and-sound! (_type_) none) ) ) @@ -103,12 +106,8 @@ ((flut-saddle-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 3.5) :shadow flut-saddle-shadow-mg - :light-index 1 + :sort 1 ) ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/engine/target/flut/flut-part_REF.gc b/test/decompiler/reference/jak3/engine/target/flut/flut-part_REF.gc new file mode 100644 index 0000000000..3fdf8fadad --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/flut/flut-part_REF.gc @@ -0,0 +1,137 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-flut-trans-pad + :id 237 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1059 :fade-after (meters 160)) + (sp-item 1060 :fade-after (meters 160)) + (sp-item 1061 :fade-after (meters 60) :falloff-to (meters 60) :flags (is-3d)) + ) + ) + +;; failed to figure out what this is: +(defpart 1059 + :init-specs ((:texture (common-white common)) + (:num 0.5) + (:y (meters 7)) + (:scale-x (meters 14) (meters 1)) + (:scale-y (meters 14)) + (:r 40.0) + (:g 60.0 60.0) + (:b 128.0) + (:a 32.0 32.0) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 1060 + :init-specs ((:texture (common-white common)) + (:num 0.5) + (:y (meters 4)) + (:scale-x (meters 7) (meters 1)) + (:scale-y (meters 14)) + (:r 40.0) + (:g 60.0 60.0) + (:b 128.0) + (:a 64.0 64.0) + (:fade-a -8.533334) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 1061 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:y (meters 0.75) (meters 0.1)) + (:scale-x (meters 0)) + (:rot-x (degrees 0) (degrees 15)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 16.0) + (:g 0.0 127.0) + (:b 127.0) + (:a 127.0) + (:vel-y (meters 0)) + (:scalevel-x (meters 0.02)) + (:rotvel-y (degrees -0.6) (degrees 1.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:accel-y (meters -0.00015)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-flut-attack-strike-ground + :id 238 + :duration (seconds 0.035) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 1062) (sp-item 1063)) + ) + +;; failed to figure out what this is: +(defpart 1062 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 24.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 8.0 56.0) + (:vel-y (meters 0.13333334) (meters 0.16666667)) + (:scalevel-x (meters 0.013333334)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.4222223) + (:fade-a -0.35555556) + (:accel-y (meters 0.00008333333)) + (:friction 0.7) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.3)) + (:next-launcher 1064) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 1063 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 32.0) + (:y (meters 1)) + (:scale-x (meters 1) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 8.0) + (:vel-y (meters 0.3)) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-g -2.8444445) + (:fade-a -0.82222223) + (:friction 0.7) + (:timer (seconds 0.3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.15)) + (:next-launcher 1064) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + + + + 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 0000000000..f5c95672d5 --- /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* (the-as bounding-box 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 new file mode 100644 index 0000000000..e3a196231d --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/flut/flut_REF.gc @@ -0,0 +1,640 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *flut-shadow-control*, type shadow-control +(define *flut-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 81920.0) + :top-plane (new 'static 'plane :y 1.0 :w -2867.2) + ) + ) + ) + +;; definition for symbol *flut-color-table*, type (array rgbaf) +(define *flut-color-table* (the-as (array rgbaf) (new 'static 'boxed-array :type vector + (new 'static 'vector :x 1.0 :y 1.0 :z 0.8 :w 1.0) + (new 'static 'vector :x 1.0 :y 1.0 :z 0.7 :w 1.0) + (new 'static 'vector :x 1.0 :y 1.0 :z 0.6 :w 1.0) + (new 'static 'vector :x 1.0 :y 1.0 :z 0.5 :w 1.0) + (new 'static 'vector :x 1.0 :y 1.0 :z 0.4 :w 1.0) + (new 'static 'vector :x 1.0 :y 0.9 :z 0.5 :w 1.0) + (new 'static 'vector :x 1.0 :y 0.8 :z 0.6 :w 1.0) + (new 'static 'vector :x 1.0 :y 0.8 :z 0.5 :w 1.0) + (new 'static 'vector :x 1.0 :y 0.8 :z 0.4 :w 1.0) + (new 'static 'vector :x 0.9 :y 0.9 :z 1.0 :w 1.0) + (new 'static 'vector :x 0.8 :y 0.9 :z 1.0 :w 1.0) + (new 'static 'vector :x 0.8 :y 1.0 :z 1.0 :w 1.0) + (new 'static 'vector :x 0.8 :y 1.0 :z 0.8 :w 1.0) + ) + ) + ) + +;; definition for method 34 of type flut +;; WARN: Return type mismatch int vs none. +(defmethod spawn-part-and-sound! ((this flut)) + (if (nonzero? (-> this part)) + (spawn (-> this part) (-> this root trans)) + ) + (if (nonzero? (-> this sound)) + (update! (-> this sound)) + ) + 0 + (none) + ) + +;; definition for method 10 of type flut +(defmethod deactivate ((this flut)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (when (-> this count-lock) + (set! (-> this count-lock) #f) + (+! (-> *game-info* flut-count) -1) + ) + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; definition for function flut-color-from-index +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior flut-color-from-index flut ((arg0 int)) + (set! (-> self draw color-mult quad) (-> *flut-color-table* (mod arg0 (-> *flut-color-table* length)) quad)) + 0 + (none) + ) + +;; definition for function flut-random-color-index +(defun flut-random-color-index () + (rand-vu-int-range 0 (-> *flut-color-table* length)) + ) + +;; definition for method 33 of type flut +(defmethod flut-method-33 ((this flut)) + (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)) + ) + ) + (let* ((s5-1 (-> gp-0 length)) + (s4-0 0) + (v1-7 (-> gp-0 s4-0)) + ) + (while (< s4-0 s5-1) + (if (type? (-> v1-7 process) flut) + (return #f) + ) + (+! s4-0 1) + (set! v1-7 (-> gp-0 s4-0)) + ) + ) + ) + #t + ) + +;; failed to figure out what this is: +(defstate wait-for-start (flut) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('bonk) + (send-event proc 'target-flut-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 + ) + (('attack) + (cond + ((and (-> self next-state) (= (-> self next-state name) 'wait-for-start)) + #f + ) + ((= (-> self mode) 'normal) + (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)) + ) + ) + ) + (go-virtual die) + ) + (else + (send-event proc 'target-flut-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)) + ) + ) + ) + ) + ) + ) + (('touch) + (send-event proc 'target-flut-get-off 90) + (send-shoves (-> self root) proc (the-as touching-shapes-entry (-> block param 0)) 0.7 6144.0 16384.0) + #f + ) + (('trans) + (vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans)) + ) + (('shadow) + (cond + ((-> block param 0) + (let ((v0-2 (the-as object (-> self shadow-backup)))) + (set! (-> self draw shadow) (the-as shadow-geo v0-2)) + v0-2 + ) + ) + (else + (set! (-> self draw shadow) #f) + #f + ) + ) + ) + ) + ) + :exit (behavior () + (set! (-> self root root-prim prim-core action) (collide-action)) + (set! (-> self root penetrated-by) (the-as penetrate -1)) + (set-vector! (-> self root root-prim local-sphere) 0.0 5734.4 0.0 7372.8) + ) + :code (behavior () + (ja-channel-set! 0) + (while (or (>= (-> *game-info* flut-count) 10) + (and (sphere-in-view-frustum? (sphere<-vector+r! (new 'stack 'sphere) (-> self root trans) 8192.0)) + (and (< (vector-vector-distance (-> self root trans) (camera-pos)) 409600.0) + *target* + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (not (flut-method-33 self)) + ) + (suspend) + ) + (go-virtual idle) + ) + ) + +;; failed to figure out what this is: +(defstate idle (flut) + :virtual #t + :event (-> (method-of-type flut wait-for-start) event) + :enter (behavior () + (set! (-> self nav-sphere-handle) (the-as handle #f)) + (let ((s5-0 (find-nearest-nav-mesh (-> self root trans) 8192.0))) + (when s5-0 + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-z-quaternion! gp-0 (-> self root quat)) + (vector-normalize! gp-0 5120.0) + (vector+! gp-0 gp-0 (-> self root trans)) + (set! (-> self nav-sphere-handle) + (ppointer->handle + (process-spawn simple-nav-sphere #x46266666 gp-0 s5-0 -1 :name "simple-nav-sphere" :to self) + ) + ) + ) + ) + ) + ) + :exit (behavior () + (send-event (handle->process (-> self nav-sphere-handle)) 'die-fast) + ((-> (method-of-type flut wait-for-start) exit)) + ) + :code (behavior () + (when (not (-> self count-lock)) + (set! (-> self count-lock) #t) + (+! (-> *game-info* flut-count) 1) + ) + (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*) + (ja-channel-set! 1) + (ja :group! (-> self draw art-group data 3)) + (set! (-> self root root-prim prim-core action) (collide-action solid can-ride no-standon)) + (set! (-> self root penetrated-by) (penetrate)) + 0.0 + (let ((f30-0 20480.0)) + (until #f + (when (and (logtest? (-> self draw status) (draw-control-status on-screen)) + (time-elapsed? (-> self probe-time) (seconds 1)) + ) + (move-to-ground + (-> self root) + 8192.0 + 40960.0 + #t + (collide-spec backgnd obstacle hit-by-player-list hit-by-others-list pusher) + ) + (set-time! (-> self probe-time)) + ) + (when (and (and *target* (and (>= f30-0 (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (not (focus-test? *target* grabbed in-head pole flut light board dark)) + (can-display-query? self "flut" -99.0) + (-> *setting-control* user-current pilot) + (-> *target* current-level) + ) + (let ((gp-0 + (new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-43 gp-0)) + (set! (-> v1-43 width) (the float 340)) + ) + (let ((v1-44 gp-0)) + (set! (-> v1-44 height) (the float 80)) + ) + (let ((v1-45 gp-0) + (a0-21 (-> *setting-control* user-default language)) + ) + (set! (-> v1-45 scale) (if (or (= a0-21 (language-enum korean)) (= a0-21 (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) + ) + ) + (if (and (cpad-pressed? 0 triangle) + (send-event *target* 'change-mode 'flut self (-> self mode) (-> self color-index)) + ) + (go-virtual pickup (method-of-object self wait-for-return)) + ) + ) + (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 + ) + ) + (spawn-part-and-sound! self) + (suspend) + (ja :num! (loop!)) + ) + ) + #f + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate pickup (flut) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('draw) + (ja-channel-set! 1) + (ja :group! (-> self draw art-group data 3)) + (set! (-> self root root-prim prim-core action) (collide-action solid can-ride no-standon)) + (set! (-> self root penetrated-by) (penetrate)) + (transform-post) + ) + (('trans) + (vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans)) + ) + (('touch 'attack 'bonk) + #f + ) + (('shadow) + (cond + ((-> block param 0) + (let ((v0-1 (the-as object (-> self shadow-backup)))) + (set! (-> self draw shadow) (the-as shadow-geo v0-1)) + v0-1 + ) + ) + (else + (set! (-> self draw shadow) #f) + #f + ) + ) + ) + ) + ) + :enter (behavior ((arg0 (state flut))) + (talker-spawn-func (-> *talker-speech* 86) *entity-pool* (target-pos 0) (the-as region #f)) + (let ((t9-2 (-> arg0 enter))) + (if t9-2 + (t9-2) + ) + ) + ) + :code (behavior ((arg0 (state flut))) + (when (-> self count-lock) + (set! (-> self count-lock) #f) + (+! (-> *game-info* flut-count) -1) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (ja-channel-set! 0) + (ja-post) + (when (not (and (-> self entity) (= (-> self entity extra process) self))) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (seconds 0.1)) + (spawn-part-and-sound! self) + (suspend) + ) + ) + (deactivate self) + ) + (while (zero? (ja-group-size)) + (if (or (not *target*) (or (< 24576.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (focus-test? *target* teleporting) + ) + ) + (go arg0) + ) + (spawn-part-and-sound! self) + (suspend) + ) + (while (and *target* (focus-test? *target* flut)) + (spawn-part-and-sound! self) + (suspend) + ) + (let ((s5-1 (current-time))) + (until (time-elapsed? s5-1 (seconds 1)) + (spawn-part-and-sound! self) + (suspend) + ) + ) + (go arg0) + ) + ) + +;; failed to figure out what this is: +(defstate wait-for-return (flut) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trans) + (vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans)) + ) + (('shadow) + (cond + ((-> block param 0) + (let ((v0-1 (the-as structure (-> self shadow-backup)))) + (set! (-> self draw shadow) (the-as shadow-geo v0-1)) + v0-1 + ) + ) + (else + (set! (-> self draw shadow) #f) + (the-as structure #f) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-set! 0) + (ja-post) + (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) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate die (flut) + :virtual #t + :enter (-> (method-of-type flut idle) enter) + :exit (-> (method-of-type flut idle) exit) + :code (behavior () + (change-parent self *entity-pool*) + (when (-> self count-lock) + (set! (-> self count-lock) #f) + (+! (-> *game-info* flut-count) -1) + ) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (if (-> self skel effect) + (logior! (-> self skel effect flags) (effect-control-flag ecf1)) + ) + (when (logtest? (-> self flags) (flut-flag ff3)) + (set! (-> self root dynam gravity-max) 40960.0) + (set! (-> self root dynam gravity-length) 20480.0) + (vector-float*! + (-> self root dynam gravity) + (-> self root dynam gravity-normal) + (the-as float (-> self root dynam gravity-length)) + ) + ) + (cond + ((logtest? (-> self flags) (flut-flag ff1)) + (set! (-> self root root-prim prim-core action) (collide-action)) + (set! (-> self root penetrated-by) (the-as penetrate -1)) + ) + (else + (set-vector! (-> self root root-prim local-sphere) 0.0 1638.4 0.0 1638.4) + (set! (-> self root root-prim prim-core action) (collide-action solid can-ride no-standon)) + (logior! + (-> self root root-prim prim-core collide-with) + (collide-spec backgnd crate obstacle hit-by-others-list pusher) + ) + (set! (-> self root penetrated-by) (penetrate)) + 0 + ) + ) + (ja-channel-set! 1) + (cond + ((logtest? (-> self flags) (flut-flag ff3)) + (ja-no-eval :group! (-> self draw art-group data 29) + :num! (seek! (ja-aframe 65.0 0)) + :frame-num (ja-aframe 60.0 0) + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 65.0 0))) + ) + ) + (else + (ja-no-eval :group! (-> self draw art-group data 28) + :num! (seek! (ja-aframe 38.0 0)) + :frame-num (ja-aframe 25.0 0) + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 38.0 0))) + ) + ) + ) + (do-effect (-> self skel effect) "death-default" 0.0 -1) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (while (nonzero? (-> self draw death-timer)) + (suspend) + ) + (ja-channel-set! 0) + (ja-post) + (if (and (-> self entity) (= (-> self entity extra process) self)) + (go-virtual wait-for-start) + ) + ) + :post (behavior () + (vector-v++! (-> self root transv) (compute-acc-due-to-gravity (-> self root) (new-stack-vector0) 0.0)) + (if (< (-> self root dynam gravity-max) (vector-length (-> self root transv))) + (vector-normalize! (-> self root transv) (-> self root dynam gravity-max)) + ) + (let ((v1-12 (-> self root)) + (a2-1 (new 'stack-no-clear 'collide-query)) + ) + (set! (-> a2-1 collide-with) (collide-spec backgnd crate obstacle pusher)) + (set! (-> a2-1 ignore-process0) self) + (set! (-> a2-1 ignore-process1) #f) + (set! (-> a2-1 ignore-pat) (-> v1-12 pat-ignore-mask)) + (set! (-> a2-1 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide v1-12 (-> v1-12 transv) a2-1 (meters 0)) + ) + (transform-post) + ) + ) + +;; definition for function flut-init +;; INFO: Used lq/sq +(defbehavior flut-init flut ((arg0 entity-actor) (arg1 transformq) (arg2 handle) (arg3 flut-flag) (arg4 symbol)) + (let ((s1-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player)))) + (set! (-> s1-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s1-0 reaction) cshape-reaction-default) + (set! (-> s1-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((v1-6 (new 'process 'collide-shape-prim-sphere s1-0 (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-6 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-6 prim-core action) (collide-action solid can-ride no-standon)) + (set! (-> v1-6 transform-index) 0) + (set-vector! (-> v1-6 local-sphere) 0.0 5734.4 0.0 7372.8) + (set! (-> s1-0 total-prims) (the-as uint 1)) + (set! (-> s1-0 root-prim) v1-6) + ) + (set! (-> s1-0 nav-radius) (* 0.75 (-> s1-0 root-prim local-sphere w))) + (let ((v1-9 (-> s1-0 root-prim))) + (set! (-> s1-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s1-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> self root) s1-0) + ) + (set! (-> self count-lock) #f) + (set! (-> self rider) arg2) + (set! (-> self flags) arg3) + (set! (-> self mode) arg4) + (set! (-> self minimap) #f) + (when arg0 + (process-entity-set! self arg0) + (if (logtest? (-> self entity extra kill-mask) (task-mask ctywide)) + (ctywide-entity-hack) + ) + (process-drawable-from-entity! self arg0) + (set-yaw-angle-clear-roll-pitch! (-> self root) (res-lump-float arg0 'rotoffset)) + ) + (when arg1 + (set! (-> self root trans quad) (-> arg1 trans quad)) + (quaternion-copy! (-> self root quat) (-> arg1 quat)) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-flut" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self shadow-backup) (-> self draw shadow)) + (set! (-> self draw shadow-ctrl) *flut-shadow-control*) + (let ((v1-33 (-> self node-list data))) + (set! (-> v1-33 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!)) + (set! (-> v1-33 0 param1) (the-as basic (-> self root trans))) + (set! (-> v1-33 0 param2) (the-as basic (-> self extra-trans))) + ) + (set! (-> self condition) (res-lump-value arg0 'index int :time -1000000000.0)) + (set! (-> self fact) + (new 'process 'fact-info self (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc)) + ) + (if (not (logtest? arg3 (flut-flag ff0))) + (setup-masks (-> self draw) 0 2) + ) + (set! (-> self nav-sphere-handle) (the-as handle #f)) + (set! (-> self color-index) (mod (the-as int (sar (the-as int arg3) 32)) (-> *flut-color-table* length))) + (flut-color-from-index (-> self color-index)) + (when (logtest? (-> self flags) (flut-flag ff1)) + (set! (-> self root root-prim prim-core action) (collide-action)) + (set! (-> self root penetrated-by) (the-as penetrate -1)) + ) + (if (and (-> self entity) (not (logtest? arg3 (flut-flag ff2)))) + (move-to-ground + (-> self root) + 8192.0 + 40960.0 + #t + (collide-spec backgnd obstacle hit-by-player-list hit-by-others-list pusher) + ) + ) + (set! (-> self sound) + (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)) + (cond + ((logtest? arg3 (flut-flag ff2)) + (go-virtual die) + ) + ((handle->process arg2) + (go-virtual idle) + ) + (else + (go-virtual wait-for-start) + ) + ) + ) + +;; definition for method 11 of type flut +(defmethod init-from-entity! ((this flut) (arg0 entity-actor)) + (flut-init + arg0 + (the-as transformq #f) + (the-as handle #f) + (the-as flut-flag (+ (shl (flut-random-color-index) 32) 1)) + 'normal + ) + ) 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 new file mode 100644 index 0000000000..c1575508a4 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/flut/target-flut_REF.gc @@ -0,0 +1,3707 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type flut-bank +(deftype flut-bank (basic) + ((jump-height-min meters) + (jump-height-max meters) + (double-jump-height-min meters) + (double-jump-height-max meters) + (air-attack-speed meters) + (ground-timeout uint64) + ) + ) + +;; definition for method 3 of type flut-bank +(defmethod inspect ((this flut-bank)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tjump-height-min: (meters ~m)~%" (-> this jump-height-min)) + (format #t "~1Tjump-height-max: (meters ~m)~%" (-> this jump-height-max)) + (format #t "~1Tdouble-jump-height-min: (meters ~m)~%" (-> this double-jump-height-min)) + (format #t "~1Tdouble-jump-height-max: (meters ~m)~%" (-> this double-jump-height-max)) + (format #t "~1Tair-attack-speed: (meters ~m)~%" (-> this air-attack-speed)) + (format #t "~1Tground-timeout: ~D~%" (-> this ground-timeout)) + (label cfg-4) + this + ) + +;; definition for symbol *FLUT-bank*, type flut-bank +(define *FLUT-bank* (new 'static 'flut-bank + :jump-height-min (meters 5) + :jump-height-max (meters 7) + :double-jump-height-min (meters 1) + :double-jump-height-max (meters 2) + :air-attack-speed (meters 20) + :ground-timeout #x96 + ) + ) + +;; definition for symbol *flut-walk-mods*, type surface +(define *flut-walk-mods* (new 'static 'surface + :name 'run + :turnv 54613.332 + :turnvf 30.0 + :turnvv 524288.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 102400.0 + :target-speed 102400.0 + :seek0 1.5 + :seek90 3.0 + :seek180 2.0 + :fric 1.0 + :nonlin-fric-dist 0.1 + :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 no-turn-around gun-off) + ) + ) + +;; definition for symbol *flut-run-racer-mods*, type surface +(define *flut-run-racer-mods* (new 'static 'surface + :name 'run + :turnv 54613.332 + :turnvf 30.0 + :turnvv 524288.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 122880.0 + :target-speed 122880.0 + :seek0 1.5 + :seek90 3.0 + :seek180 2.0 + :fric 1.0 + :nonlin-fric-dist 0.1 + :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 no-turn-around gun-off) + ) + ) + +;; definition for symbol *flut-run-wild-mods*, type surface +(define *flut-run-wild-mods* (new 'static 'surface + :name 'run + :turnv 54613.332 + :turnvf 30.0 + :turnvv 32768.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 204800.0 + :target-speed 204800.0 + :seek0 1.5 + :seek90 3.0 + :seek180 1.0 + :nonlin-fric-dist 0.1 + :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 no-turn-around gun-off) + ) + ) + +;; definition for symbol *flut-jump-wild-mods*, type surface +(define *flut-jump-wild-mods* (new 'static 'surface + :name 'jump + :turnv 131072.0 + :turnvf 30.0 + :turnvv 16384.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 204800.0 + :target-speed 204800.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 + :mode 'air + :flags (surface-flag air gun-off) + ) + ) + +;; definition for symbol *flut-jump-mods*, type surface +(define *flut-jump-mods* (new 'static 'surface + :name 'jump + :turnv 131072.0 + :turnvf 30.0 + :turnvv 54613.332 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 102400.0 + :target-speed 102400.0 + :seek0 0.9 + :seek90 1.5 + :seek180 1.5 + :fric 0.2 + :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 + :mode 'air + :flags (surface-flag air gun-off) + ) + ) + +;; definition for symbol *flut-jump-racer-mods*, type surface +(define *flut-jump-racer-mods* (new 'static 'surface + :name 'jump + :turnv 131072.0 + :turnvf 30.0 + :turnvv 54613.332 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 122880.0 + :target-speed 122880.0 + :seek0 0.9 + :seek90 1.5 + :seek180 1.5 + :fric 0.2 + :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 + :mode 'air + :flags (surface-flag air gun-off) + ) + ) + +;; definition for symbol *flut-double-jump-mods*, type surface +(define *flut-double-jump-mods* (new 'static 'surface + :name 'jump-double + :turnv 131072.0 + :turnvf 30.0 + :turnvv 54613.332 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 102400.0 + :target-speed 102400.0 + :seek0 0.9 + :seek90 1.5 + :seek180 1.5 + :fric 0.1 + :nonlin-fric-dist 10.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 + :mode 'air + :flags (surface-flag air gun-off) + ) + ) + +;; definition for symbol *flut-double-jump-racer-mods*, type surface +(define *flut-double-jump-racer-mods* (new 'static 'surface + :name 'jump-double + :turnv 131072.0 + :turnvf 30.0 + :turnvv 54613.332 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 122880.0 + :target-speed 122880.0 + :seek0 0.9 + :seek90 1.5 + :seek180 1.5 + :fric 0.1 + :nonlin-fric-dist 10.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 + :mode 'air + :flags (surface-flag air gun-off) + ) + ) + +;; definition for symbol *flut-run-attack-mods*, type surface +(define *flut-run-attack-mods* (new 'static 'surface + :name 'wheel-flip + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 122880.0 + :target-speed 143360.0 + :seek90 0.5 + :seek180 0.15 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 0.25 + :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 + :mode 'attack + :flags (surface-flag no-turn-around turn-to-pad attack gun-off) + ) + ) + +;; definition for symbol *flut-air-attack-mods*, type surface +(define *flut-air-attack-mods* (new 'static 'surface + :name 'flop + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 122880.0 + :target-speed 122880.0 + :seek0 1.0 + :seek90 0.3 + :seek180 1.5 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 0.25 + :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 + :mode 'attack + :flags (surface-flag air attack gun-off) + ) + ) + +;; definition for function flut-leg-ik-callback +;; INFO: Used lq/sq +(defun flut-leg-ik-callback ((arg0 joint-mod-ik) (arg1 object) (arg2 object) (arg3 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 'vector))) + (set! (-> s5-0 quad) (-> arg3 quad)) + (let ((f0-1 (- (-> arg3 y) (-> (target-pos 0) y)))) + (if (< 6144.0 f0-1) + (set! f0-1 6144.0) + ) + (if (< f0-1 -6144.0) + (set! f0-1 -6144.0) + ) + (+! (-> arg0 user-position y) f0-1) + ) + (let ((f0-4 (- (-> arg3 y) (-> arg0 user-position y)))) + (seek! (-> arg0 user-float) f0-4 (* 40960.0 (seconds-per-frame))) + ) + (let* ((f28-0 (-> arg0 user-float)) + (f30-1 (lerp-scale 1.0 0.0 f28-0 0.0 12288.0)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-12 s5-0)) + (let ((a0-4 *up-vector*)) + (let ((a1-4 8192.0)) + (.mov vf7 a1-4) + ) + (.lvf vf5 (&-> a0-4 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 (&-> s3-0 quad) vf6) + (vector-float*! (new 'stack-no-clear 'vector) *up-vector* -16384.0) + (let ((s2-0 (new 'stack-no-clear 'vector))) + 0.0 + (let ((f0-11 (intersect-ray-plane s3-0 *up-vector* (-> arg0 user-position) *up-vector*)) + (a0-7 s2-0) + ) + (let ((v1-15 *up-vector*)) + (let ((a1-7 f0-11)) + (.mov vf7 a1-7) + ) + (.lvf vf5 (&-> v1-15 quad)) + ) + (.lvf vf4 (&-> s3-0 quad)) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf5 vf7 :mask #b111) + (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.svf (&-> a0-7 quad) vf6) + ) + (let ((a0-8 s2-0)) + (let ((v1-16 *up-vector*)) + (let ((a1-8 (- f28-0))) + (.mov vf7 a1-8) + ) + (.lvf vf5 (&-> v1-16 quad)) + ) + (.lvf vf4 (&-> arg3 quad)) + (.add.x.vf 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) + ) + (let ((a1-9 s5-0)) + (let ((v1-17 s5-0)) + (let ((a0-10 (vector-! (new 'stack-no-clear 'vector) s2-0 s5-0))) + (let ((a2-6 (fmin 1.0 (* (-> arg0 user-blend) f30-1)))) + (.mov vf7 a2-6) + ) + (.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-9 quad) vf6) + ) + ) + ) + (set-ik-target! arg0 s5-0) + ) + (none) + ) + ) + +;; definition for function flut-update-ik +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs object. +(defbehavior flut-update-ik target () + (local-vars (sv-720 vector)) + (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 'collide-query)) + (s5-0 (-> (the-as process-drawable (-> self parent 0)) root)) + ) + (let ((a1-0 (-> gp-0 bbox)) + (v1-2 (-> s5-0 trans)) + (a0-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-0 x) 10240.0) + (set! (-> a0-0 y) 10240.0) + (set! (-> a0-0 z) 10240.0) + (set! (-> a0-0 w) 1.0) + (vector-! (the-as vector a1-0) v1-2 a0-0) + ) + (let ((a1-2 (-> gp-0 bbox max)) + (v1-3 (-> s5-0 trans)) + (a0-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-1 x) 10240.0) + (set! (-> a0-1 y) 10240.0) + (set! (-> a0-1 z) 10240.0) + (set! (-> a0-1 w) 1.0) + (vector+! a1-2 v1-3 a0-1) + ) + (set! (-> gp-0 collide-with) (-> (the-as collide-shape s5-0) root-prim prim-core collide-with)) + (set! (-> gp-0 ignore-process0) #f) + (set! (-> gp-0 ignore-process1) #f) + (set! (-> gp-0 ignore-pat) (-> (the-as collide-shape s5-0) pat-ignore-mask)) + (fill-using-bounding-box *collide-cache* gp-0) + (dotimes (s4-0 2) + (let ((s3-0 (-> self mech-ik s4-0))) + #t + (set! (-> s3-0 callback) (the-as (function joint-mod-ik matrix matrix vector object) flut-leg-ik-callback)) + (let ((a1-6 (not (logtest? (target-flags lleg-no-ik rleg-no-ik) (-> *target* target-flags))))) + (enable-set! s3-0 a1-6) + ) + (-> s3-0 shoulder-matrix-no-ik) + (let ((v1-17 (-> s3-0 elbow-matrix-no-ik)) + (s0-0 (new 'stack-no-clear 'vector)) + ) + (set! sv-720 (new 'stack-no-clear 'vector)) + (let ((a0-8 (-> *y-vector* quad))) + (set! (-> sv-720 quad) a0-8) + ) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (let ((s1-0 (new 'stack-no-clear 'vector))) + (let ((a1-8 s0-0)) + (let ((a0-11 (-> v1-17 trans))) + (let ((v1-18 (-> v1-17 uvec))) + (let ((a2-8 (-> s3-0 hand-dist))) + (.mov vf7 a2-8) + ) + (.lvf vf5 (&-> v1-18 quad)) + ) + (.lvf vf4 (&-> a0-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 (&-> a1-8 quad) vf6) + ) + (let ((f0-11 + (lerp-scale 1.0 0.0 (- (-> s0-0 y) (-> (the-as collide-shape-moving s5-0) gspot-pos y)) 2048.0 12288.0) + ) + ) + (seek! (-> s3-0 user-blend) f0-11 (* 4.0 (seconds-per-frame))) + ) + (let ((a1-11 (-> gp-0 start-pos))) + (let ((v1-22 s0-0)) + (let ((a0-14 sv-720)) + (let ((a2-12 6144.0)) + (.mov vf7 a2-12) + ) + (.lvf vf5 (&-> a0-14 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 (&-> a1-11 quad) vf6) + ) + (let ((v1-23 (-> gp-0 move-dist)) + (f0-16 -20480.0) + ) + (vector-float*! v1-23 sv-720 f0-16) + ) + (let ((v1-25 gp-0)) + (set! (-> v1-25 radius) 4.096) + (set! (-> v1-25 collide-with) (-> gp-0 collide-with)) + (set! (-> v1-25 ignore-process0) #f) + (set! (-> v1-25 ignore-process1) #f) + (set! (-> v1-25 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-25 action-mask) (collide-action solid)) + ) + (let ((f30-0 (probe-using-line-sphere *collide-cache* gp-0))) + (cond + ((>= f30-0 0.0) + (set! (-> s1-0 quad) (-> gp-0 best-other-tri normal quad)) + (when (< 8192.0 (vector-vector-angle-safe *y-vector* s1-0)) + (let* ((a1-16 (vector-normalize! (vector-cross! (new 'stack-no-clear 'vector) *y-vector* s1-0) 1.0)) + (a2-14 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) a1-16 8192.0)) + ) + (vector-orient-by-quat! s1-0 *y-vector* a2-14) + ) + ) + (let ((a1-18 s2-0)) + (let ((v1-32 (-> gp-0 start-pos))) + (let ((a0-29 (-> gp-0 move-dist))) + (let ((a2-15 f30-0)) + (.mov vf7 a2-15) + ) + (.lvf vf5 (&-> a0-29 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-18 quad) vf6) + ) + (set! (-> s3-0 user-position quad) (-> s2-0 quad)) + (set! (-> s3-0 user-normal quad) (-> s1-0 quad)) + ) + (else + (set! (-> s0-0 y) (-> (target-pos 0) y)) + (set! (-> s3-0 user-position quad) (-> s0-0 quad)) + (set! (-> s3-0 user-normal quad) (-> *y-vector* quad)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + ) + ) + +;; definition for function target-flut-get-off? +(defbehavior target-flut-get-off? target () + (and (not (and (logtest? (-> self control mod-surface flags) (surface-flag air)) + (not (logtest? (-> self control status) (collide-status on-surface))) + ) + ) + (and (time-elapsed? (-> self control rider-time) (seconds 1)) (-> *setting-control* user-current pilot-exit)) + ) + ) + +;; definition for function target-flut-post-post +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior target-flut-post-post target () + (vector+! (-> self flut flut-trans) (-> self control trans) (-> self control cspace-offset)) + (quaternion-copy! (the-as quaternion (-> self flut flut-quat)) (-> self control quat)) + (set! (-> self flut flut-scale quad) (-> self control scale quad)) + (let ((v1-8 (-> *target-shadow-control* settings shadow-dir quad))) + (set! (-> *flut-shadow-control* settings shadow-dir quad) v1-8) + ) + 0 + (none) + ) + +;; definition for function target-flut-wild-post +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior target-flut-wild-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) + ) + ) + (set-vector! + (-> self control transv-ctrl) + 0.0 + (-> self control transv-ctrl y) + (-> self control current-surface target-speed) + 1.0 + ) + (add-gravity) + (do-rotations2) + (reverse-conversions (-> self control transv)) + (pre-collide-setup) + (let ((a2-3 (new 'stack-no-clear 'collide-query))) + (let ((v1-33 (-> self control))) + (set! (-> a2-3 collide-with) (-> v1-33 root-prim prim-core collide-with)) + (set! (-> a2-3 ignore-process0) self) + (set! (-> a2-3 ignore-process1) #f) + (set! (-> a2-3 ignore-pat) (-> v1-33 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) + ) + (ja-post) + (joint-points) + (do-target-gspot) + (target-powerup-process) + (target-flut-post-post) + 0 + (none) + ) + +;; definition for function target-flut-post +;; WARN: Return type mismatch int vs none. +(defbehavior target-flut-post target () + (cond + ((and (= (-> self flut mode) 'wild) (not (logtest? (-> self focus-status) (focus-status dead hit)))) + (target-flut-wild-post) + ) + (else + (target-post) + (target-flut-post-post) + ) + ) + 0 + (none) + ) + +;; definition for function target-flut-falling-anim-trans +;; WARN: Return type mismatch int vs object. +(defbehavior target-flut-falling-anim-trans target () + (cond + ((not (-> self flut as-daxter?)) + (let ((v1-4 (ja-group))) + (b! + (and v1-4 (or (= v1-4 jakb-flut-jump-loop-ja) (= v1-4 jakb-flut-jump-land-ja))) + cfg-10 + :delay (empty-form) + ) + ) + (ja-channel-push! 1 (seconds 0.33)) + (ja :group! jakb-flut-jump-loop-ja) + (b! #t cfg-35 :delay (nop!)) + (label cfg-10) + (cond + ((and (logtest? (-> self control status) (collide-status on-surface)) + (let ((v1-17 (ja-group))) + (not (and v1-17 (= v1-17 jakb-flut-jump-land-ja))) + ) + ) + (ja-channel-push! 1 (seconds 0.02)) + (ja :group! jakb-flut-jump-land-ja) + ) + ((let ((v1-26 (ja-group))) + (and v1-26 (= v1-26 jakb-flut-jump-loop-ja)) + ) + (ja :num! (loop!)) + ) + ((let ((v1-35 (ja-group))) + (and v1-35 (= v1-35 jakb-flut-jump-land-ja)) + ) + (ja :num! (seek!)) + ) + ) + (label cfg-35) + ) + (else + (let ((v1-47 (ja-group))) + (cond + ((not (and v1-47 (= v1-47 jakb-mech-death-a-ja))) + (ja-channel-push! 1 (seconds 0.33)) + (ja :group! jakb-mech-death-a-ja) + ) + ((let ((v1-56 (ja-group))) + (and v1-56 (= v1-56 jakb-mech-death-a-ja)) + ) + (ja :num! (loop!)) + ) + ) + ) + ) + ) + 0 + ) + +;; definition for function target-flut-hit-ground-anim +;; WARN: Return type mismatch symbol vs object. +(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)) + (if (!= (-> self skel root-channel 0) (-> self skel channel)) + (ja-channel-push! 2 (seconds 0.05)) + (ja-channel-set! 2) + ) + (ja :group! jakb-flut-jump-land-ja :num! min) + (ja :chan 1 :group! jakb-flut-jump-forward-land-ja :num! min) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + (ja :chan 1 :num! (chan 0)) + ) + #f + ) + ((let ((v1-33 (ja-group))) + (and v1-33 (or (= v1-33 jakb-flut-jump-ja) (= v1-33 jakb-flut-jump-land-ja))) + ) + #f + ) + ((let ((v1-39 (ja-group))) + (and v1-39 (= v1-39 jakb-flut-double-jump-ja)) + ) + (ja-channel-set! 1) + (ja-no-eval :group! jakb-flut-jump-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + #f + ) + ((let ((v1-68 (ja-group))) + (and v1-68 (or (= v1-68 jakb-flut-air-attack-ja) (= v1-68 jakb-flut-air-attack-loop-ja))) + ) + (ja-channel-set! 1) + (ja-no-eval :group! jakb-flut-air-attack-land-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!)) + ) + #f + ) + ) + ) + ) + +;; definition for function target-flut-standard-event-handler +(defbehavior target-flut-standard-event-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (cond + ((and (= arg2 'query) (= (-> arg3 param 0) 'mode)) + 'flut + ) + (else + (case arg2 + (('event-step) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 127 (seconds 0.07)) + ) + (('end-mode) + (case (-> arg3 param 0) + (('flut) + (-> self flut mode) + (go target-flut-get-off (process->handle arg0)) + ) + ) + ) + (('touched) + (cond + ((= (-> self flut mode) 'racer) + (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) (-> arg3 param 0)) + (set! (-> a1-2 param 1) + (the-as + uint + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self flut attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'flut) + (penetrate-using (-> self control penetrate-using)) + ) + ) + ) + ) + (let ((s5-0 (send-event-function arg0 a1-2))) + (when s5-0 + (play-effect-sound + (-> self skel effect) + (the-as symbol "sound") + -1.0 + 28 + (the-as basic #f) + (static-sound-name "flut-punch-hit") + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.2)) + (let* ((v1-24 (-> self game)) + (a0-27 (+ (-> v1-24 attack-id) 1)) + ) + (set! (-> v1-24 attack-id) a0-27) + (set! (-> self flut attack-id) a0-27) + ) + ) + s5-0 + ) + ) + ) + (else + (target-generic-event-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-flut-hit + ) + ) + (('shove) + (when (not (and (-> self next-state) (= (-> self next-state name) '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-flut-hit 'shove (-> self attack-info-rec)) + ) + ) + (('falling) + (if (not (and (-> self next-state) (= (-> self next-state name) 'target-flut-death))) + (go target-flut-falling #f) + ) + ) + (('swim) + (send-event + self + '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 'drown)) + ) + ) + ) + (('change-mode) + (case (-> arg3 param 0) + (('grab) + (when (not (focus-test? self dead)) + (if (not (-> arg3 param 1)) + #t + (go target-flut-grab) + ) + ) + ) + (('kanga) + (go target-flut-kanga-catch (process->handle arg0) 'kanga) + ) + (('normal) + (go target-flut-get-off (process->handle arg0)) + ) + ) + ) + (('eject) + (go target-flut-eject #f) + ) + (('clone-anim) + (go target-flut-clone-anim (process->handle (the-as process (-> arg3 param 0)))) + ) + (('mode-time) + (- (current-time) (-> self flut flut-start-time)) + ) + (else + (target-generic-event-handler arg0 arg1 arg2 arg3) + ) + ) + ) + ) + ) + +;; definition for function target-flut-dangerous-event-handler +(defbehavior target-flut-dangerous-event-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('touched) + (if ((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) + ) + (target-flut-standard-event-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-flut-hit + ) + ) + (else + (target-flut-standard-event-handler arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for function target-fldax-enter +(defbehavior target-fldax-enter target () + (ja-channel-set! 0) + (set! (-> self flut 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) + ) + +;; definition for function target-fldax-exit +(defbehavior target-fldax-exit target () + (ja-channel-set! 0) + (set! (-> self draw art-group) (-> self flut art-group-backup)) + (logclear! (-> self draw status) (draw-control-status no-draw-bounds2)) + (send-event (ppointer->process (-> self sidekick)) 'matrix #f) + ) + +;; failed to figure out what this is: +(defstate target-flut-start (target) + :event target-flut-standard-event-handler + :exit (behavior () + (when (not (and (-> self next-state) + (let ((v1-3 (-> self next-state name))) + (or (= v1-3 'target-flut-stance) + (= v1-3 'target-flut-walk) + (= v1-3 'target-flut-run-wild) + (= v1-3 'target-flut-jump) + (= v1-3 'target-flut-double-jump) + (= v1-3 'target-flut-hit-ground) + (= v1-3 'target-flut-falling) + (= v1-3 'target-flut-running-attack) + (= v1-3 'target-flut-air-attack) + (= v1-3 'target-flut-air-attack-hit-ground) + (= v1-3 'target-flut-hit) + (= v1-3 'target-flut-death) + (= v1-3 'target-flut-get-on) + (= v1-3 'target-flut-get-off) + (= v1-3 'target-flut-get-off-jump) + (= v1-3 'target-flut-eject) + (= v1-3 'target-flut-grab) + (= v1-3 'target-flut-clone-anim) + (= v1-3 'target-flut-kanga-catch) + ) + ) + ) + ) + (+! (-> *game-info* flut-count) -1) + (let ((v1-7 (-> self manipy))) + (when v1-7 + (deactivate (-> v1-7 0)) + (set! (-> self manipy) (the-as (pointer manipy) #f)) + ) + ) + (if (-> self flut as-daxter?) + (target-fldax-exit) + ) + (logclear! (-> self focus-status) (focus-status flut)) + (set! (-> self control mod-surface) *walk-mods*) + (logclear! (-> self target-flags) (target-flags tf6)) + (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-collide-set! 'normal 0.0) + (set! (-> self control reaction) target-collision-reaction) + (set! (-> self control cspace-offset quad) (the-as uint128 0)) + (remove-setting! 'sound-flava) + (setting-control-method-14 *setting-control* (-> self flut mode-sound-bank)) + (set! (-> self flut mode-sound-bank) #f) + (set! (-> self control pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :board #x1) + ) + (remove-setting! 'string-spline-accel) + (remove-setting! 'string-spline-max-move) + (remove-setting! 'string-spline-accel-player) + (remove-setting! 'string-spline-max-move-player) + (remove-setting! 'fov) + (remove-setting! 'string-min-length) + (remove-setting! 'string-max-length) + (remove-setting! 'string-min-height) + (remove-setting! 'string-max-height) + (target-exit) + ) + ) + :code (behavior ((arg0 handle) (arg1 symbol) (arg2 int)) + (local-vars + (sv-96 process) + (sv-112 (function vector entity-actor skeleton-group vector manipy-options none :behavior manipy)) + (sv-128 vector) + (sv-144 entity-actor) + ) + (target-exit) + (+! (-> *game-info* flut-count) 1) + (set-setting! 'string-spline-accel 'abs (meters 1) 0) + (set-setting! 'string-spline-max-move 'abs (meters 10) 0) + (set-setting! 'string-spline-accel-player 'abs (meters 1) 0) + (set-setting! 'string-spline-max-move-player 'abs (meters 10) 0) + (case arg1 + (('wild) + (set-setting! 'string-min-length 'abs (meters 5) 0) + (set-setting! 'string-max-length 'abs (meters 5) 0) + (set-setting! 'string-min-height 'abs (meters 3) 0) + (set-setting! 'string-max-height 'abs (meters 3) 0) + (set-setting! 'fov 'abs (degrees 95.0) 0) + ) + ) + (when (zero? (-> self flut)) + (set! (-> self flut) (new 'process 'flut-info)) + (set! (-> self flut mode-sound-bank) #f) + ) + (set! (-> self flut stick-lock) #f) + (set! arg2 (cond + ((>= arg2 0) + (empty) + arg2 + ) + (else + (flut-random-color-index) + ) + ) + ) + (set! (-> self flut color-index) arg2) + (case arg1 + ((#t) + (set! (-> self flut mode) (the-as basic 'normal)) + (set! (-> self flut as-daxter?) #f) + ) + (('racer) + (set! (-> self flut mode) (the-as basic arg1)) + (set! (-> self flut as-daxter?) #f) + ) + (('wild) + (set! (-> self flut mode) (the-as basic arg1)) + (set! (-> self flut as-daxter?) #t) + ) + (else + (set! (-> self flut mode) (the-as basic arg1)) + (set! (-> self flut as-daxter?) #f) + ) + ) + (if (-> self flut as-daxter?) + (target-fldax-enter) + ) + (let* ((v1-34 (-> self game)) + (a0-22 (+ (-> v1-34 attack-id) 1)) + ) + (set! (-> v1-34 attack-id) a0-22) + (set! (-> self flut attack-id) a0-22) + ) + (set! (-> self flut flap-sound-id) (the-as uint (new-sound-id))) + (set! (-> self flut mode-sound-bank) (add-setting! 'mode-sound-bank 'modeflut 0.0 0)) + (set! (-> self flut entity) #f) + (let ((v1-41 (handle->process arg0))) + (if v1-41 + (set! (-> self flut entity) (-> v1-41 entity)) + ) + ) + (when (not (and (-> self flut entity) (logtest? (-> self flut entity extra level info level-flags) (level-flags lf8))) + ) + (dotimes (v1-49 (-> *level* length)) + (let ((a0-40 (-> *level* level v1-49))) + (when (= (-> a0-40 status) 'active) + (when (logtest? (-> a0-40 info level-flags) (level-flags lf8)) + (let ((a0-42 (-> a0-40 entity data 0 entity))) + (when a0-42 + (set! (-> self flut entity) (the-as entity-actor a0-42)) + (goto cfg-36) + ) + ) + ) + ) + ) + ) + ) + (label cfg-36) + (target-collide-set! 'flut 0.0) + (set! (-> self control transv quad) (the-as uint128 0)) + (set! (-> self control ctrl-xz-vel) 0.0) + (logior! (-> self focus-status) (focus-status flut)) + (set-time! (-> self flut flut-start-time)) + (set! (-> self control pat-ignore-mask) (new 'static 'pat-surface :noentity #x1 :nomech #x1)) + (let ((s4-1 (current-time))) + (label cfg-37) + (let ((s3-0 (-> self entity)) + (s2-0 (-> self level)) + ) + (process-entity-set! self (-> self flut entity)) + (let ((s1-0 (get-process *8k-dead-pool* manipy #x20000 1))) + (set! (-> self manipy) + (the-as + (pointer manipy) + (when s1-0 + (let ((t9-18 (method-of-type manipy activate))) + (t9-18 (the-as manipy s1-0) self "manipy" (the-as pointer #x70004000)) + ) + (let ((s0-0 run-function-in-process)) + (set! sv-96 s1-0) + (set! sv-112 manipy-init) + (set! sv-128 (-> self control trans)) + (set! sv-144 (-> self entity)) + (let ((t0-10 (art-group-get-by-name *level* "skel-flut" (the-as (pointer level) #f))) + (t1-10 'collide-shape-moving) + (t2-0 0) + ) + ((the-as (function object object object object object object object none) s0-0) + sv-96 + sv-112 + sv-128 + sv-144 + t0-10 + t1-10 + t2-0 + ) + ) + ) + (-> s1-0 ppointer) + ) + ) + ) + ) + (set! (-> self entity) s3-0) + (set! (-> self level) s2-0) + ) + (when (not (or (-> self manipy) (time-elapsed? s4-1 (seconds 3)))) + (suspend) + (goto cfg-37) + ) + ) + (when (-> self manipy) + (send-event + (ppointer->process (-> self manipy)) + 'trans-hook + (lambda :behavior target + () + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (ppointer->process (-> self parent)))) + (set! (-> self control trans quad) (-> (the-as target gp-0) flut flut-trans quad)) + (let ((v1-5 (-> (the-as target gp-0) flut flut-quat quad))) + (set! (-> self control quat quad) v1-5) + ) + (set! (-> self control scale quad) (-> (the-as target gp-0) flut flut-scale quad)) + (set! (-> self control ground-pat material) + (the-as int (-> (the-as target gp-0) control ground-pat material)) + ) + (set! (-> self draw light-index) (-> (the-as target gp-0) draw light-index)) + (let ((t9-0 flut-color-from-index) + (v1-14 (-> self parent)) + ) + (t9-0 (-> (the-as target (if v1-14 + (the-as target (-> v1-14 0 self)) + ) + ) + flut + color-index + ) + ) + ) + (let ((v1-18 (-> self draw color-mult))) + (let ((a0-19 (-> self draw color-mult)) + (a1-1 (-> (the-as target gp-0) draw color-mult)) + ) + (.lvf vf4 (&-> a0-19 quad)) + (.lvf vf5 (&-> a1-1 quad)) + ) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-18 quad) vf6) + ) + (let ((v0-1 (-> (the-as target gp-0) draw color-emissive quad))) + (set! (-> self draw color-emissive quad) v0-1) + v0-1 + ) + ) + ) + ) + ) + (send-event (ppointer->process (-> self manipy)) 'anim-mode 'loop) + (send-event (ppointer->process (-> self manipy)) 'art-joint-anim "flut-get-on" 0) + (send-event (ppointer->process (-> self manipy)) 'blend-shape #t) + (send-event + (ppointer->process (-> self manipy)) + 'eval + (lambda :behavior target + () + (set! (-> self state-hook) #f) + (let ((v1-1 (-> *target-shadow-control* settings shadow-dir quad))) + (set! (-> *flut-shadow-control* settings shadow-dir quad) v1-1) + ) + (set! (-> self draw shadow-ctrl) *flut-shadow-control*) + (set! (-> self mech-ik 0) (new 'process 'joint-mod-ik self 7 3104.768)) + (set! (-> self mech-ik 1) (new 'process 'joint-mod-ik self 15 3104.768)) + (dotimes (v1-5 2) + (let ((a0-6 (-> self mech-ik v1-5))) + (set! (-> a0-6 elbow-pole-vector-axis) (the-as uint 2)) + (set! (-> a0-6 elbow-rotation-axis) (the-as uint 0)) + (set! (-> a0-6 callback) (the-as (function joint-mod-ik matrix matrix vector object) flut-leg-ik-callback)) + (logior! (-> a0-6 flags) (joint-mod-ik-flags elbow-trans-neg)) + ) + ) + #f + ) + ) + (send-event (ppointer->process (-> self manipy)) 'post-hook (lambda () (flut-update-ik))) + (case (-> self flut mode) + (('wild) + (send-event (ppointer->process (-> self manipy)) 'segment 0 16) + (set! (-> self flut wild-turn-time) (+ (current-time) (rand-vu-int-range (seconds 1) (seconds 2)))) + (set! (-> self flut wild-turn-rate) (rand-vu-float-range -32768.0 32768.0)) + ) + ) + ) + (remove-exit) + (cond + ((or (= arg1 #t) (= arg1 'racer)) + (send-event (ppointer->process (-> self manipy)) 'anim-mode 'clone-anim) + (go target-flut-stance) + ) + (else + (go target-flut-get-on arg0) + ) + ) + ) + :post target-post + ) + +;; failed to figure out what this is: +(defstate target-flut-stance (target) + :event target-flut-standard-event-handler + :enter (behavior () + (set! (-> self control mod-surface) *flut-walk-mods*) + ) + :exit (-> target-flut-start exit) + :trans (behavior () + (if (= (-> self flut mode) 'wild) + (go target-flut-run-wild) + ) + (if (move-legs?) + (go target-flut-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? 'flut) + ) + (go target-flut-jump (-> *FLUT-bank* jump-height-min) (-> *FLUT-bank* jump-height-max)) + ) + (if (and (cpad-pressed? (-> self control cpad number) square) (can-hands? #t)) + (go target-flut-running-attack) + ) + (if (and (not (logtest? (-> self control status) (collide-status on-surface))) + (time-elapsed? (-> self control last-time-on-surface) (the-as time-frame (-> *FLUT-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-flut-falling #f) + ) + (if (and (or (cpad-pressed? (-> self control cpad number) triangle) (not (-> *setting-control* user-current pilot))) + (target-flut-get-off?) + ) + (go target-flut-get-off (the-as handle #f)) + ) + ) + :code (behavior () + (let ((gp-0 22)) + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (or (= v1-2 jakb-flut-walk-ja) (= v1-2 jakb-flut-run-squash-ja))) + (set! gp-0 60) + ) + ((let ((v1-9 (ja-group))) + (and v1-9 (= v1-9 jakb-flut-get-on-ja)) + ) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ((let ((v1-24 (ja-group))) + (and v1-24 (= v1-24 jakb-flut-smack-surface-ja)) + ) + (ja-no-eval :group! jakb-flut-smack-surface-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((let ((v1-54 (ja-group))) + (and v1-54 (= v1-54 jakb-flut-hit-back-ja)) + ) + (ja-no-eval :group! jakb-flut-hit-back-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((let ((v1-84 (ja-group))) + (and v1-84 (= v1-84 jakb-flut-running-attack-ja)) + ) + (ja-no-eval :group! jakb-flut-running-attack-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + (cond + ((-> self flut as-daxter?) + (let ((v1-116 (ja-group))) + (if (not (and v1-116 (= v1-116 jakb-mech-pull-ja))) + (ja-channel-push! 1 (the-as time-frame gp-0)) + ) + ) + (ja :group! jakb-mech-pull-ja) + ) + (else + (let ((v1-126 (ja-group))) + (if (not (and v1-126 (= v1-126 jakb-flut-idle-ja))) + (ja-channel-push! 1 (the-as time-frame gp-0)) + ) + ) + (ja :group! jakb-flut-idle-ja) + ) + ) + ) + (until #f + (can-play-stance-amibent?) + (suspend) + (ja :num! (loop!)) + ) + #f + ) + :post target-flut-post + ) + +;; failed to figure out what this is: +(defstate target-flut-walk (target) + :event target-flut-standard-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (case (-> self flut mode) + (('racer) + (set! (-> self control mod-surface) *flut-run-racer-mods*) + ) + (else + (set! (-> self control mod-surface) *flut-walk-mods*) + ) + ) + (set! (-> self control unknown-word04) (the-as uint (-> self control mod-surface turnv))) + (set! (-> self control did-move-to-pole-or-max-jump-height) (-> self control mod-surface target-speed)) + ) + :exit (behavior () + (set! (-> self control mod-surface turnv) (the-as float (-> self control unknown-word04))) + (set! (-> self control mod-surface target-speed) (-> self control did-move-to-pole-or-max-jump-height)) + (logclear! (-> self target-flags) (target-flags lleg-no-ik rleg-no-ik)) + (let ((v1-9 (-> self skel effect))) + (set! (-> v1-9 channel-offset) 0) + ) + 0 + ((-> target-flut-start exit)) + ) + :trans (behavior () + (if (= (-> self flut mode) 'wild) + (go target-flut-run-wild) + ) + (if (not (move-legs?)) + (go target-flut-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? 'flut) + ) + (go target-flut-jump (-> *FLUT-bank* jump-height-min) (-> *FLUT-bank* jump-height-max)) + ) + (if (and (cpad-pressed? (-> self control cpad number) square) (can-hands? #t)) + (go target-flut-running-attack) + ) + (if (and (not (logtest? (-> self control status) (collide-status on-surface))) + (time-elapsed? (-> self control last-time-on-surface) (the-as time-frame (-> *FLUT-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-flut-falling #f) + ) + (let ((f30-0 (fabs (deg-diff (quaternion-y-angle (-> self control dir-targ)) (y-angle (-> self control)))))) + (set! (-> self control mod-surface turnv) (lerp-scale + (the-as float (-> self control unknown-word04)) + (* 4.0 (the-as float (-> self control unknown-word04))) + f30-0 + 8192.0 + 21845.334 + ) + ) + (if (and (= (-> self control surf name) '*tar-surface*) (< 8192.0 f30-0)) + (seek! (-> self control mod-surface target-speed) 4096.0 (* 245760.0 (seconds-per-frame))) + (seek! + (-> self control mod-surface target-speed) + (-> self control did-move-to-pole-or-max-jump-height) + (* 81920.0 (seconds-per-frame)) + ) + ) + ) + (if (and (or (cpad-pressed? (-> self control cpad number) triangle) (not (-> *setting-control* user-current pilot))) + (target-flut-get-off?) + ) + (go target-flut-get-off (the-as handle #f)) + ) + ) + :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 jakb-flut-idle-ja)) + (set! gp-0 60) + ) + ((let ((v1-9 (ja-group))) + (and v1-9 + (or (= v1-9 jakb-flut-jump-ja) + (= v1-9 jakb-flut-jump-loop-ja) + (= v1-9 jakb-flut-air-attack-ja) + (= v1-9 jakb-flut-air-attack-land-ja) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.08)) + (ja-no-eval :group! jakb-flut-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 jakb-flut-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 jakb-flut-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! jakb-flut-walk-ja :num! (loop!) :dist 20480.0 :frame-num f26-0) + (ja-no-eval :chan 1 + :group! jakb-flut-jog-ja + :num! (identity f26-0) + :frame-interp0 f30-0 + :frame-interp1 f30-0 + :dist 47104.0 + ) + (ja-no-eval :chan 2 + :group! jakb-flut-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 control ctrl-xz-vel) 36864.0 40960.0)) + (f26-1 (lerp-scale 0.0 1.0 (-> self control ctrl-xz-vel) 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) + (cond + ((< 0.5 f28-0) + (let ((v1-97 (-> self skel effect))) + (set! (-> v1-97 channel-offset) 2) + ) + 0 + (logclear! (-> self target-flags) (target-flags lleg-no-ik rleg-no-ik)) + ) + ((< 0.9 f30-0) + (let ((v1-103 (-> self skel effect))) + (set! (-> v1-103 channel-offset) 1) + ) + 0 + (logclear! (-> self target-flags) (target-flags lleg-no-ik rleg-no-ik)) + ) + (else + (let ((v1-108 (-> self skel effect))) + (set! (-> v1-108 channel-offset) 0) + ) + 0 + (logior! (-> self target-flags) (target-flags lleg-no-ik rleg-no-ik)) + ) + ) + (let* ((f0-19 (* (current-cycle-distance (-> self skel)) (-> self control scale x))) + (f0-21 (/ (* 58.0 (-> self control ctrl-xz-vel)) (* 60.0 f0-19))) + ) + (ja :num! (loop! f0-21)) + ) + (ja :chan 1 :num! (chan 0)) + (ja :chan 2 :num! (chan 0)) + ) + ) + #f + ) + :post target-flut-post + ) + +;; failed to figure out what this is: +(defstate target-flut-run-wild (target) + :parent target-flut-walk + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self control mod-surface) *flut-run-wild-mods*) + ) + :exit (behavior () + (logclear! (-> self target-flags) (target-flags lleg-no-ik rleg-no-ik)) + (let ((v1-3 (-> self skel effect))) + (set! (-> v1-3 channel-offset) 0) + ) + 0 + ((-> target-flut-start 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? 'flut) + ) + (go target-flut-jump (-> *FLUT-bank* jump-height-min) (-> *FLUT-bank* jump-height-max)) + ) + (when (and (logtest? (-> self control status) (collide-status touch-wall)) + (< 40960.0 (-> self control ctrl-xz-vel)) + (< 0.7 (-> self control touch-angle)) + (< (vector-dot (-> self control wall-contact-normal) (-> self control dynam gravity-normal)) 0.3) + ) + (if (logtest? (-> self control status) (collide-status touch-actor)) + (send-event self '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 10)) + (shove-up (meters 0.5)) + (angle 'shove) + ) + ) + ) + (send-event self '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-back (meters 10)) + (shove-up (meters 2)) + (angle 'shove) + (mode 'death) + ) + ) + ) + ) + ) + (when (time-elapsed? (-> self flut flut-start-time) (seconds 5)) + (if (and (< (target-move-dist (seconds 1)) 409.6) + (not (and *cheat-mode* (cpad-hold? (-> self control cpad number) r2))) + ) + (send-event + self + '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 'death)) + ) + ) + ) + ) + (if (and (not (logtest? (-> self control status) (collide-status on-surface))) + (time-elapsed? (-> self control last-time-on-surface) (the-as time-frame (-> *FLUT-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-flut-falling #f) + ) + ) + :code (behavior () + (local-vars (f0-17 float) (f1-2 float)) + (let ((f28-0 0.0) + (f30-0 0.0) + ) + (let ((f24-0 0.0) + (f26-0 0.0) + ) + 22 + (let ((gp-0 60) + (v1-3 (ja-group)) + ) + (cond + ((and v1-3 (= v1-3 jakb-mech-pull-ja)) + (set! f28-0 (ja-frame-num 0)) + (set! f24-0 (-> self skel root-channel 1 frame-interp (-> self skel active-frame-interp))) + (set! f26-0 (-> self skel root-channel 2 frame-interp (-> self skel active-frame-interp))) + ) + ((let ((v1-17 (ja-group))) + (and v1-17 (or (= v1-17 jakb-mech-get-on-ja) (= v1-17 jakb-mech-death-a-ja))) + ) + (ja-channel-push! 1 (seconds 0.08)) + (ja-no-eval :group! jakb-mech-dummy7-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 3 (the-as time-frame gp-0)) + ) + (else + (ja-channel-push! 3 (the-as time-frame gp-0)) + ) + ) + ) + (ja-no-eval :group! jakb-mech-pull-ja :num! (loop!) :dist 131072.0 :frame-num f28-0) + (ja-no-eval :chan 1 + :group! jakb-mech-dummy4-ja + :num! (identity f28-0) + :frame-interp0 f24-0 + :frame-interp1 f24-0 + :dist 131072.0 + ) + (ja-no-eval :chan 2 + :group! jakb-mech-dummy5-ja + :num! (identity f28-0) + :frame-interp0 f26-0 + :frame-interp1 f26-0 + :dist 131072.0 + ) + ) + (quaternion-copy! (-> self flut prev-quat) (-> self control quat)) + (until #f + (suspend) + (let* ((f0-12 (if (= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) + 0.0 + (deg-diff (y-angle (-> self control)) (vector-y-angle (-> self control to-target-pt-xz))) + ) + ) + (f0-13 (lerp-scale 1.0 -1.0 f0-12 -21845.334 21845.334)) + ) + (set! f30-0 (seek f30-0 f0-13 (* 2.0 (seconds-per-frame)))) + ) + (cond + ((>= f30-0 0.0) + (set! f0-17 f30-0) + (set! f1-2 0.0) + ) + (else + (set! f1-2 (- f30-0)) + (set! f0-17 0.0) + ) + ) + (ja :chan 1 :frame-interp0 f1-2 :frame-interp1 f1-2) + (ja :chan 2 :frame-interp0 f0-17 :frame-interp1 f0-17) + (quaternion-copy! (-> self flut prev-quat) (-> self control quat)) + (let ((v1-94 (-> self skel effect))) + (set! (-> v1-94 channel-offset) 0) + ) + 0 + (logior! (-> self target-flags) (target-flags lleg-no-ik rleg-no-ik)) + (let* ((f0-19 (* (current-cycle-distance (-> self skel)) (-> self control scale x))) + (f0-21 (/ (* 58.0 (-> self control ctrl-xz-vel)) (* 60.0 f0-19))) + ) + (ja :num! (loop! f0-21)) + ) + (ja :chan 1 :num! (chan 0)) + (ja :chan 2 :num! (chan 0)) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate target-flut-falling (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (when (and (= message 'touched) + ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> block param 0)) + (-> self control) + (the-as uint 6) + ) + (< 0.0 (vector-dot + (-> self control dynam gravity-normal) + (vector-! (new 'stack-no-clear 'vector) (-> self control trans-old) (-> self control trans)) + ) + ) + ) + (send-event proc 'bonk (-> block param 0) (-> self control ground-impact-vel)) + (when (target-send-attack + proc + 'flut-bonk + (the-as touching-shapes-entry (-> block param 0)) + (the-as int (-> self control target-attack-id)) + (the-as int (-> self control attack-count)) + (-> self control penetrate-using) + ) + ) + ) + (case message + (('jump) + (go target-flut-jump (the-as float (-> block param 0)) (the-as float (-> block param 0))) + ) + (else + (target-flut-standard-event-handler proc argc message block) + ) + ) + ) + :enter (behavior ((arg0 object)) + (set! (-> self control mod-surface) *flut-jump-mods*) + (set-time! (-> self state-time)) + ) + :exit (-> target-flut-start exit) + :trans (behavior () + (when (or (logtest? (-> self control status) (collide-status on-surface)) + (if (and (< (target-move-dist (-> *TARGET-bank* stuck-time)) (-> *TARGET-bank* stuck-distance)) + (and (time-elapsed? (-> self state-time) (the-as time-frame (/ (the-as int (-> *TARGET-bank* stuck-time)) 2))) + (not (and *cheat-mode* (cpad-hold? (-> self control cpad number) r2))) + ) + ) + #t + ) + ) + (logior! (-> self control status) (collide-status on-surface)) + (go target-flut-hit-ground) + ) + (seek! + (-> self control unknown-float35) + (fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control ctrl-xz-vel))))) + (seconds-per-frame) + ) + ) + :code (behavior ((arg0 object)) + (cond + ((not (-> self flut as-daxter?)) + (let ((v1-4 (ja-group))) + (cond + ((and v1-4 (= v1-4 jakb-flut-jump-loop-ja)) + ) + (else + (let ((v1-10 (ja-group))) + (if (and v1-10 (= v1-10 jakb-flut-double-jump-ja)) + (ja-channel-push! 2 (seconds 0.2)) + (ja-channel-push! 2 (seconds 0.5)) + ) + ) + ) + ) + ) + (ja-no-eval :group! jakb-flut-jump-loop-ja :num! (loop!) :frame-num 0.0) + (let ((gp-0 (-> self skel root-channel 1))) + (let ((f0-2 (-> self control unknown-float35))) + (set! (-> gp-0 frame-interp 1) f0-2) + (set! (-> gp-0 frame-interp 0) f0-2) + ) + (joint-control-channel-group-eval! + gp-0 + (the-as art-joint-anim jakb-flut-jump-forward-loop-ja) + num-func-identity + ) + (set! (-> gp-0 frame-num) 0.0) + ) + ) + (else + (let ((v1-32 (ja-group))) + (cond + ((and v1-32 (= v1-32 jakb-mech-death-a-ja)) + ) + (else + (ja-channel-push! 1 (seconds 0.5)) + ) + ) + ) + (ja-no-eval :group! jakb-mech-death-a-ja :num! (loop!) :frame-num 0.0) + ) + ) + (until #f + (suspend) + (ja :num! (loop! max)) + (when (>= (ja-group-size) 2) + (let ((a0-20 (-> self skel root-channel 1))) + (let ((f0-8 (-> self control unknown-float35))) + (set! (-> a0-20 frame-interp 1) f0-8) + (set! (-> a0-20 frame-interp 0) f0-8) + ) + (set! (-> a0-20 param 0) 0.0) + (joint-control-channel-group-eval! a0-20 (the-as art-joint-anim #f) num-func-chan) + ) + ) + ) + #f + ) + :post target-flut-post + ) + +;; failed to figure out what this is: +(defstate target-flut-jump (target) + :event (-> target-flut-falling event) + :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)) + (case (-> self flut mode) + (('wild) + (set! (-> self control mod-surface) *flut-jump-wild-mods*) + ) + (('racer) + (set! (-> self control mod-surface) *flut-jump-racer-mods*) + ) + (else + (set! (-> self control mod-surface) *flut-jump-mods*) + ) + ) + (set! (-> self control unknown-float36) + (fmax 0.0 (fmin 1.0 (* 0.00004359654 (+ -11468.8 (-> self control ctrl-xz-vel))))) + ) + (set! (-> self control unknown-float35) + (fmax 0.0 (fmin 1.0 (* 0.000048828126 (+ -10240.0 (-> self control ctrl-xz-vel))))) + ) + ) + :exit (behavior () + (target-exit) + ((-> target-flut-start 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))) + ) + ) + ((-> target-flut-falling trans)) + (case (-> self flut mode) + (('wild) + (when (and (logtest? (-> self control status) (collide-status touch-wall)) + (< 40960.0 (-> self control ctrl-xz-vel)) + (< 0.7 (-> self control touch-angle)) + (< (vector-dot (-> self control wall-contact-normal) (-> self control dynam gravity-normal)) 0.3) + ) + (if (logtest? (-> self control status) (collide-status touch-actor)) + (send-event self '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 10)) + (shove-up (meters 0.5)) + (angle 'shove) + ) + ) + ) + (send-event self '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-back (meters 10)) + (shove-up (meters 2)) + (angle 'shove) + (mode 'death) + ) + ) + ) + ) + ) + ) + (else + (if (and (cpad-pressed? (-> self control cpad number) x) + (< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 40960.0) + (not (logtest? (water-flag touch-water) (-> self water flags))) + (not (logtest? (target-flags prevent-jump prevent-double-jump) (-> self target-flags))) + (< 4096.0 (target-height-above-ground)) + ) + (go target-flut-double-jump (-> *FLUT-bank* double-jump-height-min) (-> *FLUT-bank* double-jump-height-max)) + ) + (if (and (cpad-pressed? (-> self control cpad number) square) + (< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 61440.0) + (and (< -61440.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + (time-elapsed? (-> self control last-time-of-stuck) (the-as time-frame (-> *TARGET-bank* stuck-timeout))) + (not (logtest? (-> self target-flags) (target-flags prevent-attack))) + (not (logtest? (-> self control current-surface flags) (surface-flag no-attack no-hands))) + ) + ) + (go target-flut-air-attack (-> *FLUT-bank* air-attack-speed)) + ) + ) + ) + (when (if (and (< (target-move-dist (-> *TARGET-bank* stuck-time)) (-> *TARGET-bank* stuck-distance)) + (and (time-elapsed? (-> self state-time) (seconds 0.1)) + (not (and *cheat-mode* (cpad-hold? (-> self control cpad number) r2))) + ) + ) + #t + ) + (logior! (-> self control status) (collide-status on-surface)) + enter-state + 'stuck + (go target-flut-hit-ground) + ) + (mod-var-jump #t #t (cpad-hold? (-> self control cpad number) x) (-> self control transv)) + ) + :code (behavior ((arg0 float) (arg1 float)) + (cond + ((not (-> self flut as-daxter?)) + (ja-channel-push! 2 (seconds 0.12)) + (ja :group! jakb-flut-jump-ja :num! min) + (let ((a0-3 (-> self skel root-channel 1))) + (let ((f0-1 (-> self control unknown-float35))) + (set! (-> a0-3 frame-interp 1) f0-1) + (set! (-> a0-3 frame-interp 0) f0-1) + ) + (set! (-> a0-3 frame-group) (the-as art-joint-anim jakb-flut-jump-forward-ja)) + (set! (-> a0-3 param 0) 0.0) + (joint-control-channel-group-eval! a0-3 (the-as art-joint-anim jakb-flut-jump-forward-ja) num-func-chan) + ) + (suspend) + (ja :group! jakb-flut-jump-ja :num! (+!)) + (let ((a0-5 (-> self skel root-channel 1))) + (let ((f0-4 (-> self control unknown-float35))) + (set! (-> a0-5 frame-interp 1) f0-4) + (set! (-> a0-5 frame-interp 0) f0-4) + ) + (set! (-> a0-5 frame-group) (the-as art-joint-anim jakb-flut-jump-forward-ja)) + (set! (-> a0-5 param 0) 0.0) + (joint-control-channel-group-eval! a0-5 (the-as art-joint-anim jakb-flut-jump-forward-ja) num-func-chan) + ) + (suspend) + 0 + ) + (else + (ja-channel-push! 1 (seconds 0.12)) + (ja :group! jakb-mech-get-on-ja :num! min) + (suspend) + (ja :group! jakb-mech-get-on-ja :num! (+!)) + (suspend) + 0 + ) + ) + (until (ja-done? 0) + (let ((f30-0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + (f0-12 (/ (- 10.0 (ja-aframe-num 0)) (* (ja-step 0) (ja-speed 0)))) + ) + (ja :num! (seek! max (if (and (< 0.0 f30-0) (< 0.0 f0-12)) + (fmin (fmin 3.0 f0-12) (/ (* 5.0 f0-12) (the float (time-to-apex f30-0 -245760.0)))) + 1.0 + ) + ) + ) + ) + (when (>= (ja-group-size) 2) + (let ((a0-15 (-> self skel root-channel 1))) + (let ((f0-18 (-> self control unknown-float35))) + (set! (-> a0-15 frame-interp 1) f0-18) + (set! (-> a0-15 frame-interp 0) f0-18) + ) + (set! (-> a0-15 param 0) 0.0) + (joint-control-channel-group-eval! a0-15 (the-as art-joint-anim #f) num-func-chan) + ) + ) + (suspend) + ) + (cond + ((not (-> self flut as-daxter?)) + (ja-no-eval :group! jakb-flut-jump-loop-ja :num! (loop!) :frame-num 0.0) + (let ((a0-18 (-> self skel root-channel 1))) + (let ((f0-22 (-> self control unknown-float35))) + (set! (-> a0-18 frame-interp 1) f0-22) + (set! (-> a0-18 frame-interp 0) f0-22) + ) + (set! (-> a0-18 frame-group) (the-as art-joint-anim jakb-flut-jump-forward-loop-ja)) + (set! (-> a0-18 param 0) 0.0) + (joint-control-channel-group-eval! a0-18 (the-as art-joint-anim jakb-flut-jump-forward-loop-ja) num-func-chan) + ) + (until #f + (suspend) + (ja :group! jakb-flut-jump-loop-ja :num! (loop!)) + (let ((a0-20 (-> self skel root-channel 1))) + (let ((f0-25 (-> self control unknown-float35))) + (set! (-> a0-20 frame-interp 1) f0-25) + (set! (-> a0-20 frame-interp 0) f0-25) + ) + (set! (-> a0-20 frame-group) (the-as art-joint-anim jakb-flut-jump-forward-loop-ja)) + (set! (-> a0-20 param 0) 0.0) + (joint-control-channel-group-eval! a0-20 (the-as art-joint-anim jakb-flut-jump-forward-loop-ja) num-func-chan) + ) + ) + #f + ) + (else + (ja-no-eval :group! jakb-mech-death-a-ja :num! (loop!) :frame-num 0.0) + (until #f + (suspend) + (ja :group! jakb-mech-death-a-ja :num! (loop!)) + ) + #f + ) + ) + ) + :post target-flut-post + ) + +;; failed to figure out what this is: +(defstate target-flut-double-jump (target) + :event (-> target-flut-falling event) + :enter (behavior ((arg0 float) (arg1 float)) + (set-time! (-> self state-time)) + (init-var-jump arg0 arg1 #t #t (-> self control transv) 2.0) + (set! (-> self control dynam gravity-max) 40960.0) + (set! (-> self control dynam gravity-length) 245760.0) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (case (-> self flut mode) + (('racer) + (set! (-> self control mod-surface) *flut-double-jump-racer-mods*) + ) + (else + (set! (-> self control mod-surface) *flut-double-jump-mods*) + ) + ) + ) + :exit (behavior () + (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) + ((-> target-flut-start exit)) + ) + :trans (behavior () + ((-> target-flut-falling trans)) + (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) + ) + (not (logtest? (-> self target-flags) (target-flags prevent-attack))) + (not (logtest? (-> self control current-surface flags) (surface-flag no-attack no-hands))) + (time-elapsed? (-> self control last-time-of-stuck) (the-as time-frame (-> *TARGET-bank* stuck-timeout))) + (< 4096.0 (target-height-above-ground)) + ) + (go target-flut-air-attack (-> *FLUT-bank* air-attack-speed)) + ) + (if (!= (-> self state-time) (current-time)) + (mod-var-jump #t #t (cpad-hold? (-> self control cpad number) x) (-> self control transv)) + ) + (let ((v1-41 (ja-group))) + (if (and v1-41 (= v1-41 jakb-flut-double-jump-ja)) + (sound-play "flut-flap" :id (the-as sound-id (-> self flut flap-sound-id))) + ) + ) + ) + :code (behavior ((arg0 float) (arg1 float)) + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! jakb-flut-double-jump-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 0 3 (seconds 0.1)) + (suspend) + (ja :num! (seek!)) + ) + (set! (-> self control mod-surface) *flut-jump-mods*) + (current-time) + (ja-channel-push! 2 (seconds 0.2)) + (ja-no-eval :group! jakb-flut-jump-loop-ja :num! (loop!) :frame-num 0.0) + (let ((gp-0 (-> self skel root-channel 1))) + (let ((f0-9 (-> self control unknown-float35))) + (set! (-> gp-0 frame-interp 1) f0-9) + (set! (-> gp-0 frame-interp 0) f0-9) + ) + (joint-control-channel-group-eval! + gp-0 + (the-as art-joint-anim jakb-flut-jump-forward-loop-ja) + num-func-identity + ) + (set! (-> gp-0 frame-num) 0.0) + ) + (until #f + (suspend) + (seek! + (-> self control dynam gravity-max) + (-> self control standard-dynamics gravity-max) + (* 163840.0 (seconds-per-frame)) + ) + (seek! + (-> self control dynam gravity-length) + (-> self control standard-dynamics gravity-length) + (* 163840.0 (seconds-per-frame)) + ) + (ja :num! (loop! max)) + (let ((a0-13 (-> self skel root-channel 1))) + (let ((f0-23 (-> self control unknown-float35))) + (set! (-> a0-13 frame-interp 1) f0-23) + (set! (-> a0-13 frame-interp 0) f0-23) + ) + (set! (-> a0-13 param 0) 0.0) + (joint-control-channel-group-eval! a0-13 (the-as art-joint-anim #f) num-func-chan) + ) + ) + #f + ) + :post target-flut-post + ) + +;; failed to figure out what this is: +(defstate target-flut-hit-ground (target) + :event target-flut-standard-event-handler + :enter (behavior () + (target-land-effect) + (when (< 40960.0 (-> self control ground-impact-vel)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 0 255 (seconds 0.1)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 178 (seconds 0.2)) + ) + (set! (-> self control last-running-attack-end-time) 0) + (set! (-> self control last-attack-end-time) 0) + (set! (-> self control mod-surface) *flut-walk-mods*) + ) + :exit (behavior () + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still)) + ((-> target-flut-start 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? 'flut) + ) + (go target-flut-jump (-> *FLUT-bank* jump-height-min) (-> *FLUT-bank* jump-height-max)) + ) + (if (or (move-legs?) (= (-> self flut mode) 'wild)) + (go target-flut-walk) + ) + (if (and (not (logtest? (-> self control status) (collide-status on-surface))) + (time-elapsed? (-> self control last-time-on-surface) (the-as time-frame (-> *FLUT-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-flut-falling #f) + ) + ) + :code (behavior () + (target-flut-hit-ground-anim #f) + (go target-flut-stance) + ) + :post target-flut-post + ) + +;; failed to figure out what this is: +(defstate target-flut-running-attack (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (cond + (((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> block param 0)) + (-> self control) + (the-as uint 1920) + ) + (let ((gp-1 (target-send-attack + proc + (-> self control danger-mode) + (the-as touching-shapes-entry (-> block param 0)) + (the-as int (-> self control target-attack-id)) + (the-as int (-> self control attack-count)) + (-> self control penetrate-using) + ) + ) + ) + (when gp-1 + (set! (-> self control unknown-word04) (the-as uint (current-time))) + (let ((v1-9 (if (type? proc process-drawable) + proc + ) + ) + ) + (when v1-9 + (let* ((s5-1 (-> (the-as process-drawable v1-9) root)) + (v1-10 (if (type? s5-1 collide-shape) + (the-as collide-shape s5-1) + ) + ) + ) + (if (and v1-10 (or (logtest? (-> v1-10 root-prim prim-core collide-as) (collide-spec enemy)) + (logtest? (-> v1-10 root-prim prim-core action) (collide-action no-smack)) + ) + ) + (set! (-> self control unknown-symbol03) (the-as float #x1)) + ) + ) + ) + ) + (when (or (= gp-1 'die) (= gp-1 'push)) + (let ((v0-2 (the-as object (current-time)))) + (set! (-> self control did-move-to-pole-or-max-jump-height) (the-as float v0-2)) + v0-2 + ) + ) + ) + ) + ) + (else + (target-flut-dangerous-event-handler proc argc message block) + ) + ) + ) + (else + (target-flut-dangerous-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self control unknown-word04) (the-as uint 0)) + (set! (-> self control did-move-to-pole-or-max-jump-height) 0.0) + (set! (-> self control unknown-symbol03) 0.0) + (set! (-> self control mod-surface) *flut-run-attack-mods*) + (set! (-> *run-attack-mods* turnv) 655360.0) + (set! (-> *run-attack-mods* turnvv) 655360.0) + (target-start-attack) + (target-danger-set! 'flut-attack #f) + ) + :exit (behavior () + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) + (set! (-> *run-attack-mods* turnv) 0.0) + (set! (-> *run-attack-mods* turnvv) 0.0) + (set-time! (-> self control last-running-attack-end-time)) + (target-exit) + ((-> target-flut-start exit)) + ) + :trans (behavior () + (when (!= (-> self state-time) (current-time)) + (if (and (or (smack-surface? #t) + (and (>= (-> self control surface-slope-z) 0.7) + (not (logtest? (-> self control status) (collide-status touch-actor))) + ) + ) + (begin + (set! (-> self control did-move-to-pole-or-max-jump-height) (the-as float (current-time))) + (set! (-> self control bend-target) 0.0) + (let ((v1-11 (new-stack-vector0)) + (f0-3 (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-3)) + (let* ((f1-3 (vector-length v1-11)) + (f2-0 f1-3) + (f0-4 (fmin 0.0 f0-3)) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f0-4) + (vector-float*! v1-11 v1-11 (/ f1-3 f2-0)) + ) + ) + ) + #t + ) + (or (zero? (-> self control unknown-word04)) + (>= (the-as uint (- (current-time) (the-as int (-> self control unknown-word04)))) (the-as uint 12)) + ) + (!= (the-as int (-> self control unknown-symbol03)) 1) + ) + (target-shoved (meters 2) (-> *TARGET-bank* smack-surface-height) (the-as process #f) target-flut-hit) + ) + (if (and (logtest? (water-flag touch-water) (-> self water flags)) + (zero? (mod (- (current-time) (-> self state-time)) 21)) + ) + (spawn-ripples + (-> self water) + 0.6 + (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node jakb-lod0-jg neckB)) + 0 + (-> self control transv) + #f + ) + ) + ) + ) + :code (behavior () + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 127 (seconds 0.2)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 0 3 (seconds 0.4)) + (ja-channel-push! 1 (seconds 0.02)) + (ja :group! jakb-flut-running-attack-ja :num! min) + (set! (-> self control dynam gravity-max) 368640.0) + (set! (-> self control dynam gravity-length) 368640.0) + (let ((f28-0 0.0) + (f30-0 (if (= (-> self control yellow-eco-last-use-time) (current-time)) + 0.2 + 0.8 + ) + ) + ) + (until (or (ja-done? 0) (< f30-0 0.05)) + (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) (the-as time-frame (-> *FLUT-bank* ground-timeout))) + (>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + (>= (target-height-above-ground) (-> *TARGET-bank* fall-height)) + ) + (>= (the-as uint (- (current-time) (the-as int (-> self control unknown-word04)))) (the-as uint 12)) + ) + ) + (go target-flut-falling #f) + ) + ((and (nonzero? (-> self control did-move-to-pole-or-max-jump-height)) + (>= (the-as + uint + (- (current-time) (the-as int (the-as uint (-> self control did-move-to-pole-or-max-jump-height)))) + ) + (the-as uint 12) + ) + ) + (set-forward-vel 0.0) + (set! f30-0 0.0) + ) + ((ja-done? 0) + (set-forward-vel f28-0) + ) + (else + (set! f28-0 + (* f30-0 (target-align-vel-z-adjust (-> self align delta trans z)) (-> self clock frames-per-second)) + ) + (set-forward-vel f28-0) + ) + ) + ) + (let ((gp-1 (new-stack-vector0))) + (vector-matrix*! gp-1 (-> self control transv) (-> self control w-R-c)) + (set! (-> gp-1 y) 0.0) + (vector-matrix*! (-> self control align-xz-vel) gp-1 (-> self control c-R-w)) + ) + (suspend) + (ja :num! (seek! max (-> self control current-surface align-speed))) + (if (time-elapsed? (-> self state-time) (seconds 0.1)) + (set! (-> *flut-run-attack-mods* turnvv) 0.0) + ) + (if (time-elapsed? (-> self state-time) (seconds 0.1)) + (set! f30-0 (* f30-0 (fmin 1.0 (-> self control zx-vel-frac)))) + ) + ) + (if (and (not (logtest? (-> self control status) (collide-status on-surface))) + (time-elapsed? (-> self control last-time-on-surface) (the-as time-frame (-> *FLUT-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-flut-falling #f) + ) + (when (!= f30-0 0.0) + (set! (-> self trans-hook) (-> target-flut-hit-ground trans)) + (if (not (ja-done? 0)) + (ja-channel-push! 1 (seconds 0.05)) + ) + (ja-no-eval :group! jakb-flut-running-attack-end-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 f30-0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (go target-flut-stance) + ) + :post target-flut-post + ) + +;; failed to figure out what this is: +(defstate target-flut-air-attack (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (if (and (= message 'touched) + ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> block param 0)) + (-> self control) + (the-as uint 6) + ) + (< 0.0 (vector-dot + (-> self control dynam gravity-normal) + (vector-! (new 'stack-no-clear 'vector) (-> self control trans-old) (-> self control trans)) + ) + ) + ) + (send-event proc 'bonk (-> block param 0) (-> self control ground-impact-vel)) + ) + (case message + (('jump) + (go target-flut-jump (the-as float (-> block param 0)) (the-as float (-> block param 0))) + ) + (else + (target-flut-dangerous-event-handler proc argc message block) + ) + ) + ) + :enter (behavior ((arg0 float)) + (set-forward-vel arg0) + (set-time! (-> self state-time)) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (set! (-> self control mod-surface) *flut-air-attack-mods*) + (target-start-attack) + (target-danger-set! 'flut-attack #f) + (let ((v1-5 (new-stack-vector0))) + (let ((f0-1 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-5 (-> self control transv) (vector-float*! v1-5 (-> self control dynam gravity-normal) f0-1)) + ) + (let* ((f0-2 (vector-length v1-5)) + (f1-1 f0-2) + (f2-0 0.0) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f2-0) + (vector-float*! v1-5 v1-5 (/ f0-2 f1-1)) + ) + ) + ) + ) + :exit (behavior () + (target-danger-set! 'harmless #f) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) + (set! (-> self control dynam gravity quad) (-> self control standard-dynamics gravity quad)) + ((-> target-flut-start exit)) + ) + :trans (behavior () + (let ((gp-0 (new-stack-vector0))) + (vector-z-quaternion! gp-0 (-> self control quat-for-control)) + (let ((v1-1 (new-stack-vector0)) + (f0-1 (vector-dot gp-0 (-> self control transv))) + ) + 0.0 + (vector-! v1-1 (-> self control transv) (vector-float*! v1-1 gp-0 f0-1)) + (let* ((f1-2 (vector-length v1-1)) + (f2-0 f1-2) + ) + (if (< f0-1 0.0) + (set! f0-1 0.0) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) gp-0 f0-1) + (vector-float*! v1-1 v1-1 (/ f1-2 f2-0)) + ) + ) + ) + ) + (when (logtest? (-> self control status) (collide-status on-surface)) + (logior! (-> self control status) (collide-status on-surface)) + (remove-exit) + (go target-flut-air-attack-hit-ground) + ) + (when (if (and (< (target-move-dist (-> *TARGET-bank* stuck-time)) 4096.0) + (and (time-elapsed? (-> self state-time) (seconds 0.5)) + (not (and *cheat-mode* (cpad-hold? (-> self control cpad number) r2))) + ) + ) + #t + ) + (logior! (-> self control status) (collide-status on-surface)) + (go target-flut-hit-ground) + ) + ) + :code (behavior ((arg0 float)) + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! jakb-flut-air-attack-ja :num! (seek! (ja-aframe 8.0 0)) :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 1.0) + (suspend) + (ja :num! (seek! (ja-aframe 8.0 0))) + ) + (ja-no-eval :group! jakb-flut-air-attack-ja :num! (seek!) :frame-num (ja-aframe 8.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 1.0) + (suspend) + (ja :num! (seek!)) + ) + (ja :group! jakb-flut-air-attack-loop-ja :num! min) + (until #f + (suspend) + ) + #f + ) + :post target-flut-post + ) + +;; failed to figure out what this is: +(defstate target-flut-air-attack-hit-ground (target) + :event target-flut-standard-event-handler + :enter (behavior () + (target-land-effect) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.4)) + (set! (-> self control last-running-attack-end-time) 0) + (set! (-> self control last-attack-end-time) 0) + (set! (-> self control mod-surface) *flut-air-attack-mods*) + (sound-play "flop-land" :pitch -0.4) + (do-effect (-> self skel effect) "group-flut-attack-strike-ground" (ja-frame-num 0) 0) + (let ((gp-2 + (process-spawn + touch-tracker + :init touch-tracker-init + (-> self control trans) + #x45800000 + 30 + :name "touch-tracker" + :to self + ) + ) + ) + (send-event + (ppointer->process gp-2) + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (-> self control target-attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'flut-attack) + (count (-> self control target-attack-id)) + (penetrate-using (-> self control penetrate-using)) + ) + ) + ) + (send-event + (ppointer->process gp-2) + 'function + (lambda ((arg0 process-focusable)) + (seek! (-> arg0 root root-prim local-sphere w) 28672.0 (* 286720.0 (seconds-per-frame))) + (update-transforms (-> arg0 root)) + ) + ) + ) + ) + :exit (-> target-flut-air-attack exit) + :trans (-> target-flut-hit-ground trans) + :code (behavior () + (ja-channel-set! 1) + (ja-no-eval :group! jakb-flut-air-attack-land-ja :num! (seek! (ja-aframe 22.0 0)) :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-aframe 22.0 0))) + ) + (target-danger-set! 'harmless #f) + (ja-no-eval :group! jakb-flut-air-attack-land-ja :num! (seek!) :frame-num (ja-aframe 22.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!)) + ) + (go target-flut-stance) + ) + :post target-flut-post + ) + +;; failed to figure out what this is: +(defstate target-flut-kanga-catch (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('end-mode) + (case (-> block param 0) + (('kanga) + (go target-jump 16384.0 16384.0 (the-as surface #f)) + ) + ) + ) + (else + (target-generic-event-handler proc argc message block) + ) + ) + ) + :enter (behavior ((arg0 handle) (arg1 symbol)) + (set-time! (-> self state-time)) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (set-setting! 'ignore-target #t 0.0 0) + ) + :exit (behavior () + (remove-setting! 'ignore-target) + ((-> target-flut-start exit)) + ) + ) + +;; failed to figure out what this is: +(defstate target-flut-hit (target) + :event target-flut-standard-event-handler + :exit (behavior () + (if (not (and (-> self next-state) (= (-> self next-state name) 'target-flut-death))) + (logclear! (-> self focus-status) (focus-status dead hit)) + ) + (target-exit) + ((-> target-flut-start 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-flut-stance) + ) + ) + ) + :code (behavior ((arg0 symbol) (arg1 attack-info)) + (set-time! (-> self state-time)) + (let ((s5-0 (-> self attack-info))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (let ((v1-2 s5-0)) + (set! (-> v1-2 attacker) (the-as handle #f)) + (set! (-> v1-2 mode) 'generic) + (set! (-> v1-2 shove-back) 10240.0) + (set! (-> v1-2 shove-up) 9011.2) + (set! (-> v1-2 angle) #f) + (set! (-> v1-2 trans quad) (-> self control trans quad)) + (set! (-> v1-2 control) 0.0) + (set! (-> v1-2 invinc-time) (-> *TARGET-bank* hit-invulnerable-timeout)) + (set! (-> v1-2 damage) (-> *FACT-bank* health-default-inc)) + ) + (case arg0 + (('shove) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.2)) + (let ((v1-6 s5-0)) + (set! (-> v1-6 shove-back) (-> *TARGET-bank* smack-surface-dist)) + (set! (-> v1-6 shove-up) (-> *TARGET-bank* smack-surface-height)) + (set! (-> v1-6 angle) 'shove) + ) + ) + ) + (combine! s5-0 arg1 self) + (when (not (logtest? (-> s5-0 mask) (attack-mask vector))) + (vector-z-quaternion! (-> s5-0 vector) (-> self control quat-for-control)) + (vector-xz-normalize! (-> s5-0 vector) (- (fabs (-> s5-0 shove-back)))) + (set! (-> s5-0 vector y) (-> s5-0 shove-up)) + ) + (set! (-> s4-0 quad) (-> s5-0 vector quad)) + (let ((f0-11 (vector-dot + (vector-normalize-copy! (new 'stack-no-clear 'vector) s4-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-11) + 'front + 'back + ) + ) + ) + ) + (case arg0 + (('attack) + (logior! (-> self focus-status) (focus-status hit)) + (set-time! (-> self game hit-time)) + (case (-> s5-0 mode) + (('endlessfall) + (cond + ((= (-> self game mode) 'debug) + (let ((s3-2 (new-stack-vector0))) + (set! (-> s3-2 quad) (-> self control last-trans-on-ground quad)) + (ja-channel-set! 0) + (let ((s2-0 (current-time))) + (until (time-elapsed? s2-0 (seconds 1)) + (suspend) + ) + ) + (move-to-point! (-> self control) s3-2) + ) + (set! (-> self control camera-pos quad) (-> self control trans quad)) + (send-event *camera* 'teleport) + (go target-flut-stance) + ) + (else + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (go target-flut-death (-> s5-0 mode)) + ) + ) + ) + (('water-vol 'sharkey 'bot 'drown-death 'instant-death 'crush 'tentacle) + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (if (= (-> self game mode) 'play) + (go target-flut-death (-> s5-0 mode)) + ) + ) + (('lava 'melt 'fry 'slime) + (sound-play "death-melt") + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (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)) + ) + ) + (set! (-> s5-0 angle) 'lava) + (set! (-> s5-0 shove-up) 20480.0) + ) + (('death) + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + ) + (('cactus) + (cond + ((= (-> self flut mode) 'normal) + ) + (else + (go target-flut-death (-> s5-0 mode)) + ) + ) + ) + (('drown) + (if (= (-> self flut mode) 'normal) + (go target-flut-eject (-> s5-0 mode)) + (pickup-collectable! (-> self fact) (pickup-type health) (- (-> s5-0 damage)) (the-as handle #f)) + ) + ) + (else + (if (!= (-> self flut mode) 'normal) + (pickup-collectable! (-> self fact) (pickup-type health) (- (-> s5-0 damage)) (the-as handle #f)) + ) + ) + ) + (target-hit-effect s5-0) + (sound-play "flut-hit" :pitch -1) + ) + ) + (set! (-> self control mod-surface) *smack-mods*) + (let ((f30-0 1.0)) + (let ((v1-114 (-> s5-0 angle))) + (cond + ((= v1-114 'shove) + (cond + ((not (-> self flut as-daxter?)) + (let ((v1-119 (ja-group))) + (when (not (and v1-119 (= v1-119 jakb-flut-smack-surface-ja))) + (ja-channel-set! 1) + (ja :group! jakb-flut-smack-surface-ja :num! min) + ) + ) + ) + (else + (let ((v1-130 (ja-group))) + (when (not (and v1-130 (= v1-130 jakb-mech-drag-pickup-ja))) + (ja-channel-set! 1) + (ja :group! jakb-mech-drag-pickup-ja :num! min) + ) + ) + ) + ) + (sound-play "smack-surface") + (sound-play "flut-hit" :pitch 1) + ) + ((not (-> self flut as-daxter?)) + (let ((v1-148 (ja-group))) + (when (not (and v1-148 (= v1-148 jakb-flut-hit-back-ja))) + (ja-channel-push! 1 (seconds 0.075)) + (ja :group! jakb-flut-hit-back-ja :num! min) + ) + ) + ) + (else + (let ((v1-159 (ja-group))) + (when (not (and v1-159 (= v1-159 jakb-mech-drag-pickup-ja))) + (ja-channel-set! 1) + (ja :group! jakb-mech-drag-pickup-ja :num! min) + ) + ) + ) + ) + ) + (target-hit-move + s5-0 + (target-hit-orient s5-0 s4-0) + (the-as (function none :behavior target) target-flut-falling-anim-trans) + f30-0 + ) + ) + ) + (cond + ((and (= (-> self game mode) 'play) (>= 0.0 (-> self fact health))) + (go target-flut-death (-> s5-0 mode)) + ) + ((and (= (-> self flut mode) 'normal) (= arg0 'attack)) + (go target-flut-eject (-> s5-0 mode)) + ) + (else + (go target-flut-hit-ground) + ) + ) + ) + ) + :post target-flut-post + ) + +;; failed to figure out what this is: +(defstate target-flut-death (target) + :event (-> target-death event) + :exit (behavior () + ((-> target-flut-start exit)) + ((-> 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) + ) + ) + +;; failed to figure out what this is: +(defstate target-flut-get-on (target) + :event target-generic-event-handler + :exit (behavior () + (logclear! (-> self target-flags) (target-flags tf5)) + ((-> target-flut-start exit)) + ) + :code (behavior ((arg0 handle)) + (set! (-> self control mod-surface) *flut-walk-mods*) + (set! (-> self control transv quad) (the-as uint128 0)) + (set! (-> self alt-cam-pos quad) (-> self control camera-pos quad)) + (logior! (-> self target-flags) (target-flags tf5 tf6)) + (set-time! (-> self state-time)) + (when (handle->process arg0) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> self control trans quad)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> self control trans quad)) + (quaternion-copy! (the-as quaternion (-> self control unknown-vector39)) (-> self control quat)) + (quaternion-copy! (the-as quaternion (-> self control unknown-vector40)) (-> self control quat-for-control)) + (set! (-> self control unknown-word04) (the-as uint (-> self control draw-offset y))) + (let* ((s2-0 (handle->process arg0)) + (s3-0 (if (type? s2-0 process-drawable) + (the-as process-drawable s2-0) + ) + ) + ) + (when s3-0 + (set! (-> s5-0 quad) (-> s3-0 root trans quad)) + (quaternion-copy! (the-as quaternion (-> self control unknown-vector40)) (-> s3-0 root quat)) + (send-event s3-0 'trans (-> self flut flut-trans)) + (quaternion-copy! (the-as quaternion (-> self flut flut-quat)) (-> s3-0 root quat)) + (set! (-> self flut flut-scale quad) (-> s3-0 root scale quad)) + (set! (-> self control did-move-to-pole-or-max-jump-height) (-> self flut flut-trans y)) + ) + ) + (set! (-> self control unknown-vector37 quad) (-> s4-0 quad)) + (set! (-> self control unknown-vector38 quad) (-> s5-0 quad)) + (let ((s4-1 #f)) + (sound-play "uppercut") + (ja-channel-push! 1 (seconds 0.05)) + (let ((s3-2 (if (-> self flut as-daxter?) + jakb-gun-yellow-fire-twirl-ja + jakb-flut-get-on-ja + ) + ) + (f30-0 (if (-> self flut as-daxter?) + 20.0 + 24.0 + ) + ) + ) + (ja-no-eval :group! s3-2 :num! (seek! (ja-aframe f30-0 0)) :frame-num 0.0) + (until (ja-done? 0) + (let* ((s3-3 (handle->process arg0)) + (v1-66 (if (type? s3-3 process-drawable) + (the-as process-drawable s3-3) + ) + ) + ) + (when v1-66 + (set! (-> s5-0 quad) (-> v1-66 root trans quad)) + (set! (-> self control unknown-vector38 quad) (-> s5-0 quad)) + (quaternion-copy! (the-as quaternion (-> self control unknown-vector40)) (-> v1-66 root quat)) + ) + ) + (when (and (not s4-1) (= (-> self skel root-channel 0) (-> self skel channel))) + (send-event (ppointer->process (-> self manipy)) 'anim-mode 'clone-anim) + (set! s4-1 #t) + ) + (set! (-> self control transv quad) (the-as uint128 0)) + (suspend) + (ja :num! (seek! (ja-aframe f30-0 0))) + ) + ) + ) + ) + ) + (sound-play "flut-coo") + ) + (send-event (ppointer->process (-> self manipy)) 'anim-mode 'clone-anim) + (logclear! (-> self target-flags) (target-flags tf6)) + (set! (-> self control transv quad) (the-as uint128 0)) + (quaternion-copy! (-> self control quat) (-> self control quat-for-control)) + (rot->dir-targ! (-> self control)) + (send-event (handle->process arg0) 'die) + (case (-> self flut mode) + (('wild) + (set-forward-vel 204800.0) + (set! (-> self control ctrl-xz-vel) 204800.0) + (ja-channel-set! 0) + ) + ) + (go target-flut-stance) + ) + :post (behavior () + (let ((gp-0 (new 'stack-no-clear 'vector)) + (f30-0 (fmin 1.0 (* 0.0044444446 (the float (- (current-time) (-> self state-time)))))) + ) + (case (-> self flut mode) + (('wild) + (set! f30-0 (lerp-scale 0.0 1.0 (ja-frame-num 0) 0.0 (the float (+ (-> (ja-group) frames num-frames) -1)))) + ) + ) + (vector-lerp! gp-0 (-> self control unknown-vector37) (-> self control unknown-vector38) f30-0) + (set! (-> gp-0 y) + (lerp + (-> self control unknown-vector37 y) + (-> self control unknown-vector38 y) + (fmax 0.0 (fmin 1.0 (* 0.006666667 (the float (+ (- (the-as int (-> self state-time))) (current-time)))))) + ) + ) + (move-to-point! (-> self control) gp-0) + (quaternion-slerp! + (-> self control quat-for-control) + (the-as quaternion (-> self control unknown-vector39)) + (the-as quaternion (-> self control unknown-vector40)) + f30-0 + ) + ) + (target-no-move-post) + (let ((f30-1 (-> self alt-cam-pos y))) + (if (-> self flut as-daxter?) + (vector<-cspace! (-> self alt-cam-pos) (-> self sidekick 0 node-list data 3)) + (vector<-cspace! (-> self alt-cam-pos) (joint-node jakb-lod0-jg Rankle)) + ) + (set! (-> self alt-cam-pos y) f30-1) + ) + ) + ) + +;; failed to figure out what this is: +(let ((v1-45 (copy *forward-jump-mods* 'loading-level))) + (set! (-> v1-45 fric) 0.0) + (set! (-> v1-45 nonlin-fric-dist) 0.0) + (set! (-> v1-45 turnv) 0.0) + (set! (-> v1-45 turnvv) 0.0) + (set! (-> v1-45 tiltv) 131072.0) + (set! (-> v1-45 tiltvf) 30.0) + (set! (-> v1-45 mult-hook) + (the-as + (function surface surface surface int none) + (lambda :behavior target + ((arg0 surface) (arg1 surface) (arg2 surface) (arg3 int)) + (case arg3 + ((1) + (persist-with-delay *setting-control* 'string-spline-accel (seconds 0.05) 'string-spline-accel 'abs 4096.0 0) + (persist-with-delay + *setting-control* + 'string-spline-max-move + (seconds 0.05) + 'string-spline-max-move + 'abs + 40960.0 + 0 + ) + (persist-with-delay + *setting-control* + 'string-spline-accel-player + (seconds 0.05) + 'string-spline-accel-player + 'abs + 4096.0 + 0 + ) + (persist-with-delay + *setting-control* + 'string-spline-max-move-player + (seconds 0.05) + 'string-spline-max-move-player + 'abs + 40960.0 + 0 + ) + ) + ) + ) + ) + ) + (set! *flut-get-off-mods* v1-45) + ) + +;; failed to figure out what this is: +(defstate target-flut-get-off (target) + :event target-generic-event-handler + :exit (-> target-flut-get-on exit) + :code (behavior ((arg0 handle)) + (logior! (-> self target-flags) (target-flags tf5)) + (set-forward-vel 0.0) + (let ((s5-0 0)) + (while (and (not (logtest? (-> self control status) (collide-status on-surface))) + (not (if (and (< (target-move-dist (-> *TARGET-bank* stuck-time)) (-> *TARGET-bank* stuck-distance)) (< 30 s5-0)) + #t + ) + ) + ) + (target-flut-falling-anim-trans) + (+! s5-0 (- (current-time) (-> self clock old-frame-counter))) + (suspend) + ) + ) + (go target-flut-get-off-jump) + ) + :post (behavior () + (target-no-stick-post) + (target-flut-post-post) + ) + ) + +;; failed to figure out what this is: +(defstate target-flut-get-off-jump (target) + :event target-generic-event-handler + :exit (-> target-flut-start exit) + :code (behavior () + (let ((gp-1 (mem-copy! (the-as pointer (new 'stack 'transformq)) (the-as pointer (-> self control trans)) 48))) + (logior! (-> self target-flags) (target-flags tf5)) + (set! (-> self control mod-surface) *empty-mods*) + (rot->dir-targ! (-> self control)) + (set! (-> self neck flex-blend) 0.0) + (logior! (-> self target-flags) (target-flags tf6)) + (set! (-> self alt-cam-pos quad) (-> self control camera-pos quad)) + (ja-channel-push! 1 (seconds 0.1)) + (let ((s5-0 (if (-> self flut as-daxter?) + jakb-mech-dummy3-ja + jakb-flut-get-off-ja + ) + ) + ) + (ja-no-eval :group! s5-0 :num! (seek! (ja-aframe 18.0 0)) :frame-num 0.0) + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 18.0 0))) + ) + (rot->dir-targ! (-> self control)) + (ja-post) + (let ((s5-2 (new 'stack-no-clear 'vector))) + (vector<-cspace! s5-2 (joint-node jakb-lod0-jg main)) + (move-to-point! (-> self control) s5-2) + ) + (send-event *camera* 'ease-in) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (set-forward-vel 32768.0) + (process-spawn + flut + :init flut-init + (-> self flut entity) + gp-1 + (process->handle self) + (+ (if (= (-> self flut mode) 'wild) + 0 + 1 + ) + (shl (-> self flut color-index) 32) + ) + (-> self flut mode) + :name "flut" + :to self + ) + ) + (go target-jump 10240.0 10240.0 *flut-get-off-mods*) + ) + :post (behavior () + (let ((f30-0 (-> self alt-cam-pos y))) + (vector<-cspace! (-> self alt-cam-pos) (joint-node jakb-lod0-jg Rankle)) + (set! (-> self alt-cam-pos y) f30-0) + ) + (target-no-move-post) + ) + ) + +;; failed to figure out what this is: +(defstate target-flut-eject (target) + :event target-generic-event-handler + :exit (-> target-flut-start exit) + :code (behavior ((arg0 symbol)) + (let ((s5-1 (mem-copy! (the-as pointer (new 'stack 'transformq)) (the-as pointer (-> self control trans)) 48))) + (logior! (-> self target-flags) (target-flags tf5)) + (set! (-> self control mod-surface) *empty-mods*) + (rot->dir-targ! (-> self control)) + (set! (-> self neck flex-blend) 0.0) + (logior! (-> self target-flags) (target-flags tf6)) + (set! (-> self alt-cam-pos quad) (-> self control camera-pos quad)) + (ja-channel-push! 1 (seconds 0.1)) + (case arg0 + (('drown) + (ja-no-eval :group! jakb-flut-death-drown-ja :num! (seek! (ja-aframe 60.0 0)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 60.0 0))) + ) + ) + (else + (ja-no-eval :group! jakb-flut-deathb-ja :num! (seek! (ja-aframe 25.0 0)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 25.0 0))) + ) + ) + ) + (rot->dir-targ! (-> self control)) + (ja-post) + (let ((s4-4 (new 'stack-no-clear 'vector))) + (vector<-cspace! s4-4 (joint-node jakb-lod0-jg main)) + (+! (-> s4-4 y) -9011.2) + (let ((v1-45 (-> self water flags))) + (if (and (logtest? (water-flag touch-water) v1-45) + (logtest? (water-flag under-water swimming) v1-45) + (not (logtest? (focus-status mech) (-> self focus-status))) + ) + (set! (-> s4-4 y) (-> self water collide-height)) + ) + ) + (move-to-point! (-> self control) s4-4) + ) + (send-event *camera* 'ease-in) + (ja-channel-set! 0) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (let ((s4-5 (if (= (-> self flut mode) 'wild) + 4 + 5 + ) + ) + ) + (case arg0 + (('drown) + (set! s4-5 (logior s4-5 10)) + ) + ) + (process-spawn + flut + :init flut-init + (-> self flut entity) + s5-1 + (process->handle self) + (+ s4-5 (shl (-> self flut color-index) 32)) + (-> self flut mode) + :name "flut" + :to self + ) + ) + ) + (cond + ((= arg0 'drown) + (logior! (-> self water flags) (water-flag jump-out)) + (go target-swim-jump 20480.0 20480.0) + ) + (else + (go target-jump 14336.0 14336.0 *flut-get-off-mods*) + ) + ) + ) + :post (behavior () + (let ((f30-0 (-> self alt-cam-pos y))) + (vector<-cspace! (-> self alt-cam-pos) (joint-node jakb-lod0-jg Rankle)) + (set! (-> self alt-cam-pos y) f30-0) + ) + (target-no-move-post) + ) + ) + +;; failed to figure out what this is: +(defstate target-flut-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-flut-stance) + ) + (('flut) + (go target-grab 'stance) + ) + ) + ) + (('clone-anim) + (go target-flut-clone-anim (process->handle (the-as process (-> block param 0)))) + ) + (else + (target-generic-event-handler proc argc message block) + ) + ) + ) + ) + ) + :enter (behavior () + (set! (-> self control mod-surface) *grab-mods*) + (set! (-> self neck flex-blend) 0.0) + (logior! (-> self target-flags) (target-flags tf2)) + (logior! (-> self focus-status) (focus-status grabbed)) + ) + :exit (behavior () + (logclear! (-> self target-flags) (target-flags tf2)) + (logclear! (-> self focus-status) (focus-status grabbed)) + (logclear! (-> self water flags) (water-flag jump-out)) + (target-exit) + ((-> target-flut-start exit)) + ) + :code (-> target-flut-stance code) + :post (behavior () + (target-no-stick-post) + (target-flut-post-post) + ) + ) + +;; failed to figure out what this is: +(defstate target-flut-clone-anim (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (if (and (= message 'trans) (= (-> block param 0) 'restore)) + (set! (-> self control unknown-word04) (the-as uint #f)) + ) + ((-> target-flut-grab event) proc argc message block) + ) + :enter (-> target-clone-anim enter) + :exit (behavior () + (send-event (ppointer->process (-> self sidekick)) 'matrix #f) + ((-> target-clone-anim exit)) + ((-> target-flut-start exit)) + ) + :code (behavior ((arg0 handle)) + (send-event (ppointer->process (-> self sidekick)) 'matrix 'play-anim) + (clone-anim arg0 #t "") + (go target-flut-stance) + ) + :post (behavior () + (target-no-ja-move-post) + (target-flut-post-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 new file mode 100644 index 0000000000..45e55b737e --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-blue-shot_REF.gc @@ -0,0 +1,3196 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function sparticle-fade-alpha-dist +;; WARN: Return type mismatch int vs none. +(defun sparticle-fade-alpha-dist ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) + (let ((a0-1 (math-camera-pos)) + (v1-0 (new 'stack-no-clear 'vector)) + ) + 0.0 + (set! (-> v1-0 x) (- (-> arg2 rvec x) (-> a0-1 x))) + (set! (-> v1-0 y) (- (-> arg2 rvec y) (-> a0-1 y))) + (set! (-> v1-0 z) (- (-> arg2 rvec z) (-> a0-1 z))) + (let ((f1-3 (vector-length v1-0))) + (set! (-> arg2 fvec w) (* 128.0 (- 1.0 (* 0.0000024414062 f1-3)))) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 12) (new 'static 'lightning-spec + :name "lightning-blue-shot-attack-explode" + :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 1.0 + :fade-time 30.0 + :texture (new 'static 'texture-id :index #x8f :page #x4) + :reduction 0.42 + :num-points 16 + :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: +(set! (-> *lightning-spec-id-table* 13) (new 'static 'lightning-spec + :name "lightning-blue-shot-terminal" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x10) + :end-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x10) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 1.0 + :fade-time 30.0 + :texture (new 'static 'texture-id :index #x8f :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 8192.0 + :merge-factor 0.6 + :merge-count 2 + :radius 3276.8 + :duration 75.0 + :sound #f + ) + ) + +;; definition for function gun-fire-blue-1 +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs object. +(defbehavior gun-fire-blue-1 target () + (let ((gp-0 (-> self gun)) + (s4-0 (-> self gun laser-dir)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (let ((s3-0 (new 'stack-no-clear 'quaternion))) + (quaternion-vector-angle! s3-0 s4-0 (* 182.04445 (rand-vu-float-range 0.0 360.0))) + (vector-rotate-y! s5-0 s4-0 (* 182.04445 (rand-vu-float-range 0.0 1.1))) + (vector-orient-by-quat! s5-0 s5-0 s3-0) + ) + (let ((s4-1 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> s4-1 ent) (-> self entity)) + (set! (-> s4-1 charge) 1.0) + (set! (-> s4-1 options) (projectile-options po17)) + (logclear! (-> s4-1 options) (projectile-options po14 po15 po16)) + (set! (-> s4-1 pos quad) (-> gp-0 fire-point quad)) + (set! (-> s4-1 vel quad) (-> s5-0 quad)) + (set! (-> s4-1 notify-handle) (the-as handle #f)) + (set! (-> s4-1 owner-handle) (the-as handle #f)) + (set! (-> s4-1 target-handle) (the-as handle #f)) + (set! (-> s4-1 target-pos quad) (the-as uint128 0)) + (set! (-> s4-1 ignore-handle) (process->handle (send-event self 'get-vehicle))) + (let* ((v1-16 *game-info*) + (a0-16 (+ (-> v1-16 attack-id) 1)) + ) + (set! (-> v1-16 attack-id) a0-16) + (set! (-> s4-1 attack-id) a0-16) + ) + (set! (-> s4-1 timeout) (seconds 4)) + (spawn-projectile gun-blue-shot s4-1 (ppointer->process (-> gp-0 gun)) *default-dead-pool*) + ) + ) + ) + +;; definition for function fmod-2 +(defun fmod-2 ((arg0 float) (arg1 float)) + (- arg0 (* (the float (the int (/ arg0 arg1))) arg1)) + ) + +;; definition of type gun-blue-shot-3 +(deftype gun-blue-shot-3 (projectile) + ((hit-actor? symbol) + (start-pos vector :inline) + (track-mode uint64) + (random-travel-distance float) + ) + ) + +;; definition for method 3 of type gun-blue-shot-3 +(defmethod inspect ((this gun-blue-shot-3)) + (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 "~2Tstart-pos: #~%" (-> this start-pos)) + (format #t "~2Ttrack-mode: ~D~%" (-> this track-mode)) + (format #t "~2Trandom-travel-distance: ~f~%" (-> this random-travel-distance)) + (label cfg-4) + this + ) + +;; definition of type dist-dot-val +(deftype dist-dot-val (structure) + ((dot float) + (dist float) + (current-dir-vec vector :inline) + (vec-to-target vector :inline) + ) + ) + +;; definition for method 3 of type dist-dot-val +(defmethod inspect ((this dist-dot-val)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'dist-dot-val) + (format #t "~1Tdot: ~f~%" (-> this dot)) + (format #t "~1Tdist: ~f~%" (-> this dist)) + (format #t "~1Tcurrent-dir-vec: #~%" (-> this current-dir-vec)) + (format #t "~1Tvec-to-target: #~%" (-> this vec-to-target)) + (label cfg-4) + this + ) + +;; definition for function get-dist-and-dot +;; INFO: Used lq/sq +;; WARN: Return type mismatch float vs object. +(defun get-dist-and-dot ((arg0 gun-blue-shot) (arg1 dist-dot-val)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> arg0 desired-target-pos quad)) + (let ((s5-0 (vector-normalize-copy! (-> arg1 current-dir-vec) (-> arg0 root transv) 1.0))) + (let ((a0-2 (-> arg1 vec-to-target))) + (vector-! a0-2 s4-0 (-> arg0 root trans)) + (set! (-> arg1 dist) (vector-normalize-ret-len! a0-2 1.0)) + ) + (set! (-> arg1 dot) (vector-dot s5-0 (-> arg1 vec-to-target))) + ) + ) + ) + +;; definition for function gun-blue-shot-3-move +;; INFO: Used lq/sq +(defun gun-blue-shot-3-move ((arg0 gun-blue-shot-3)) + (with-pp + (let ((v1-0 (-> arg0 track-mode))) + (cond + ((or (= v1-0 1) (zero? v1-0)) + (let ((s5-0 #f) + (a0-4 (the-as process #f)) + ) + (when (handle->process (-> arg0 desired-target)) + (let ((s4-0 (handle->process (-> arg0 desired-target)))) + (set! a0-4 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (if a0-4 + (set! s5-0 #t) + ) + ) + (cond + (s5-0 + (let ((a0-9 (get-trans (the-as process-focusable a0-4) 3))) + (set! (-> arg0 desired-target-pos quad) (-> a0-9 quad)) + ) + ) + ((= (-> arg0 track-mode) 1) + (set! (-> arg0 track-mode) (the-as uint 2)) + ) + ) + ) + ) + ((= v1-0 2) + (if (< (vector-vector-distance-squared (-> arg0 root trans) (-> arg0 desired-target-pos)) 1073741800.0) + (set! (-> arg0 track-mode) (the-as uint 3)) + ) + ) + ) + ) + (when (zero? (-> arg0 track-mode)) + (let ((f0-1 (vector-vector-distance (-> arg0 start-pos) (-> arg0 root trans)))) + (cond + ((< (-> arg0 random-travel-distance) f0-1) + (set! (-> arg0 track-mode) (the-as uint 1)) + (set-time! (-> arg0 state-time)) + ) + (else + (when (< (vector-vector-distance (-> arg0 root trans) (-> arg0 desired-target-pos)) 40960.0) + (set! (-> arg0 track-mode) (the-as uint 1)) + (set-time! (-> arg0 state-time)) + ) + ) + ) + ) + ) + (if (logtest? (-> arg0 root status) (collide-status touch-surface)) + (go (method-of-object arg0 impact)) + ) + (let ((v1-40 (-> arg0 track-mode))) + (cond + ((zero? v1-40) + (let ((s5-1 (new 'stack-no-clear 'dist-dot-val))) + (get-dist-and-dot (the-as gun-blue-shot arg0) s5-1) + (let* ((f0-4 (* 0.5 (+ 1.0 (-> s5-1 dot)))) + (f0-5 (* f0-4 f0-4)) + ) + (vector-normalize! (-> arg0 root transv) (lerp 122880.0 409600.0 f0-5)) + ) + ) + (let ((s5-3 (-> arg0 child))) + (while s5-3 + (send-event (ppointer->process s5-3) 'notice 'add-crumb) + (set! s5-3 (-> s5-3 0 brother)) + ) + ) + ) + ((or (= v1-40 1) (= v1-40 2)) + (let ((s5-4 (new 'stack-no-clear 'vector))) + (set! (-> s5-4 quad) (-> arg0 root trans quad)) + (let ((f30-0 2.0) + (f24-0 65536.0) + ) + 327680.0 + 0.0 + (let* ((f28-0 (/ (the float (- (current-time) (-> pp clock old-frame-counter))) f30-0)) + (f26-0 f28-0) + ) + (dotimes (s4-2 (the int f30-0)) + (let ((s3-0 (new 'stack-no-clear 'dist-dot-val))) + (get-dist-and-dot (the-as gun-blue-shot arg0) s3-0) + (when (< (-> s3-0 dist) 49152.0) + (let ((f0-12 (* 0.000020345053 (-> s3-0 dist))) + (f24-1 (* 0.5 (+ 1.0 (-> s3-0 dot)))) + ) + (set! f24-0 (* (lerp 65536.0 131072.0 f0-12) (- 2.0 f24-1))) + ) + (when (and (= (-> arg0 track-mode) 1) (time-elapsed? (-> arg0 state-time) (seconds 1))) + (let ((f0-15 (* 1.3333334 (+ -0.75 (* 0.0033333334 (the float (- (current-time) (-> arg0 state-time)))))))) + (set! f24-0 (* f24-0 (lerp 1.0 2.0 f0-15))) + ) + ) + ) + (cond + ((< 0.99 (-> s3-0 dot)) + (set! (-> s3-0 current-dir-vec quad) (-> s3-0 vec-to-target quad)) + ) + (else + (let* ((s2-0 (new 'stack-no-clear 'vector)) + (f22-0 0.0) + (f0-19 (acos (-> s3-0 dot))) + (f22-1 (deg-seek f22-0 f0-19 (/ (* f24-0 (seconds-per-frame)) f30-0))) + ) + (vector-cross! s2-0 (-> s3-0 vec-to-target) (-> s3-0 current-dir-vec)) + (vector-normalize! s2-0 1.0) + (vector-rotate-around-axis! + (-> s3-0 current-dir-vec) + (the-as quaternion (-> s3-0 current-dir-vec)) + (* -1.0 f22-1) + s2-0 + ) + ) + ) + ) + (set! (-> arg0 root transv quad) (-> s3-0 current-dir-vec quad)) + (let* ((f0-26 (* 0.5 (+ 1.0 (-> s3-0 dot)))) + (f0-27 (* f0-26 f0-26)) + (f0-28 (lerp 122880.0 409600.0 f0-27)) + ) + (vector-normalize! (-> arg0 root transv) f0-28) + ) + ) + (let ((a1-27 (vector-float*! (new 'stack-no-clear 'vector) (-> arg0 root transv) (/ 1.0 f30-0)))) + (vector-v++! (-> arg0 root trans) a1-27) + ) + (let ((s3-1 (-> arg0 child))) + (while s3-1 + (send-event (ppointer->process s3-1) 'notice 'add-crumb-elapsed f26-0) + (set! s3-1 (-> s3-1 0 brother)) + ) + ) + (when (< (vector-vector-distance (-> arg0 root trans) (-> arg0 desired-target-pos)) 8192.0) + 0 + (goto cfg-70) + ) + (+! f26-0 f28-0) + ) + ) + ) + (label cfg-70) + (vector-! (-> arg0 root transv) (-> arg0 root trans) s5-4) + (set! (-> arg0 root trans quad) (-> s5-4 quad)) + ) + (vector-float*! (-> arg0 root transv) (-> arg0 root transv) (/ 1.0 (seconds-per-frame))) + ) + ) + ) + (projectile-move-fill-line-sphere arg0) + (none) + ) + ) + +;; definition of type light-trail-tracker-blue-3 +(deftype light-trail-tracker-blue-3 (light-trail-tracker-projectile) + () + ) + +;; definition for method 3 of type light-trail-tracker-blue-3 +(defmethod inspect ((this light-trail-tracker-blue-3)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type light-trail-tracker-projectile inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 17 of type light-trail-tracker-blue-3 +(defmethod light-trail-tracker-method-17 ((this light-trail-tracker-blue-3) (arg0 process-focusable)) + #f + ) + +;; failed to figure out what this is: +(if (or (zero? *blue-shot-trail*) (!= loading-level global)) + (set! *blue-shot-trail* (new 'loading-level 'light-trail-composition)) + ) + +;; failed to figure out what this is: +(set! (-> *blue-shot-trail* color-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *blue-shot-trail* color-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *blue-shot-trail* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *blue-shot-trail* alpha-2-mode) (the-as uint 6)) + +;; failed to figure out what this is: +(set! (-> *blue-shot-trail* base-alpha) 1.0) + +;; failed to figure out what this is: +(set! (-> *blue-shot-trail* alpha-repeat-dist) 94208.0) + +;; failed to figure out what this is: +(set! (-> *blue-shot-trail* width-mode) (the-as uint 2)) + +;; failed to figure out what this is: +(set! (-> *blue-shot-trail* base-width) 2048.0) + +;; failed to figure out what this is: +(set! (-> *blue-shot-trail* width-repeat-dist) 12288.0) + +;; failed to figure out what this is: +(set! (-> *blue-shot-trail* uv-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *blue-shot-trail* uv-repeat-dist) 163840.0) + +;; failed to figure out what this is: +(set! (-> *blue-shot-trail* lie-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *blue-shot-trail* max-age) (seconds 0.5)) + +;; failed to figure out what this is: +(if #f + (set! (-> *blue-shot-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *blue-shot-trail* tex-id) (the-as uint #x500f00)) + ) + +;; failed to figure out what this is: +(set! (-> *blue-shot-trail* width-curve) (the-as curve2d-piecewise *curve-linear-up*)) + +;; failed to figure out what this is: +(set! (-> *blue-shot-trail* color-curve) (the-as curve-color-piecewise *trail-color-curve-white*)) + +;; failed to figure out what this is: +(set! (-> *blue-shot-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +;; failed to figure out what this is: +(set! (-> *blue-shot-trail* alpha-curve-2) #f) + +;; failed to figure out what this is: +(set! (-> *blue-shot-trail* zbuffer?) #f) + +;; failed to figure out what this is: +(set! (-> *blue-shot-trail* lie-vector quad) (-> *up-vector* quad)) + +;; failed to figure out what this is: +(set! (-> *blue-shot-trail* use-tape-mode?) #f) + +;; failed to figure out what this is: +(set! (-> *blue-shot-trail* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *blue-shot-trail* frame-stagger) (the-as uint 1)) + +;; definition for method 31 of type gun-blue-shot-3 +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this gun-blue-shot-3)) + (+! (-> *game-info* shots-fired 2) 1.0) + (set! (-> this attack-mode) 'eco-blue) + (set! (-> this max-speed) 327680.0) + (set! (-> this move) gun-blue-shot-3-move) + (set! (-> this timeout) (seconds 3)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this damage) 1.0) + (set! (-> this vehicle-damage-factor) 2.0) + (set! (-> this vehicle-impulse-factor) 2.0) + (logior! (-> this options) (projectile-options po13)) + (set! (-> this track-mode) (the-as uint 0)) + (set! (-> this start-pos quad) (-> this root trans quad)) + (let* ((f30-0 12288.0) + (f28-0 28672.0) + (v1-16 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-17 (the-as number (logior #x3f800000 v1-16))) + ) + (set! (-> this random-travel-distance) (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-17))))) + ) + (let ((s5-0 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-0 tracked-obj) (process->handle this)) + (set! (-> s5-0 appearance) *blue-shot-trail*) + (set! (-> s5-0 max-num-crumbs) (the int (* 0.2 (the float (-> s5-0 appearance max-age))))) + (set! (-> s5-0 track-immediately?) #t) + (let* ((v1-30 (estimate-light-trail-mem-usage + (the-as uint (-> s5-0 max-num-crumbs)) + (the-as uint (= (-> s5-0 appearance lie-mode) 3)) + ) + ) + (s4-0 (get-process *default-dead-pool* light-trail-tracker-blue-3 (+ v1-30 8192) 1)) + ) + (when s4-0 + (let ((t9-4 (method-of-type process activate))) + (t9-4 s4-0 this "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-0 light-trail-tracker-init-by-other s5-0) + (-> s4-0 ppointer) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 32 of type gun-blue-shot-3 +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-32 ((this gun-blue-shot-3)) + (if (not (do-fire-backcheck (-> this root trans) (-> this root transv))) + (go (method-of-object this impact)) + (call-parent-method this) + ) + 0 + (none) + ) + +;; definition for method 28 of type gun-blue-shot-3 +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this gun-blue-shot-3) (arg0 projectile-options)) + (case arg0 + (((projectile-options po0)) + (sound-play "blue-gun3-ricco" :position (-> this root trans)) + ) + ) + (none) + ) + +;; definition for method 25 of type gun-blue-shot-3 +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this gun-blue-shot-3)) + 0 + (none) + ) + +;; definition of type target-quality-info +(deftype target-quality-info (structure) + ((targ handle) + (value float) + ) + ) + +;; definition for method 3 of type target-quality-info +(defmethod inspect ((this target-quality-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'target-quality-info) + (format #t "~1Ttarg: ~D~%" (-> this targ)) + (format #t "~1Tvalue: ~f~%" (-> this value)) + (label cfg-4) + this + ) + +;; definition for function gun-fire-blue-3 +;; INFO: Used lq/sq +;; WARN: Stack slot offset 1300 signed mismatch +;; WARN: Stack slot offset 1300 signed mismatch +;; WARN: Stack slot offset 1300 signed mismatch +;; WARN: Stack slot offset 1300 signed mismatch +;; WARN: Stack slot offset 1300 signed mismatch +;; WARN: Stack slot offset 1300 signed mismatch +;; WARN: Stack slot offset 1300 signed mismatch +;; WARN: Stack slot offset 1300 signed mismatch +;; WARN: Stack slot offset 1300 signed mismatch +;; WARN: Stack slot offset 1300 signed mismatch +;; WARN: Return type mismatch (pointer process) vs object. +(defbehavior gun-fire-blue-3 target () + (local-vars + (sv-144 gun-info) + (sv-148 projectile-init-by-other-params) + (sv-1280 vector) + (sv-1284 (inline-array target-quality-info)) + (sv-1288 int) + (sv-1296 float) + (sv-1300 object) + ) + (set! sv-144 (-> self gun)) + (set! sv-148 (new 'stack-no-clear 'projectile-init-by-other-params)) + (draw-beam (-> *part-id-table* 364) (-> sv-144 fire-point) (-> sv-144 fire-dir-out) #f) + (set! sv-1280 (new 'stack-no-clear 'vector)) + (set! sv-1284 (new 'stack-no-clear 'inline-array 'target-quality-info 384)) + (set! sv-1288 0) + (set! sv-1296 (the-as float 0.0)) + (set! sv-1300 (send-event *target* 'get-vehicle)) + (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)) + (let* ((s4-0 (-> gp-0 s5-0)) + (v1-16 (if (type? s4-0 collide-shape) + s4-0 + ) + ) + ) + (when v1-16 + (let* ((s3-0 (-> v1-16 process)) + (s4-1 (if (type? s3-0 process-focusable) + s3-0 + ) + ) + ) + (when s4-1 + (when (and (!= *target* s4-1) + (!= sv-1300 s4-1) + (not (focus-test? (the-as process-focusable s4-1) disable dead inactive gun-no-target)) + (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?)) + ) + ) + (let ((s3-1 (new 'stack-no-clear 'collide-query))) + (vector+float*! (-> s3-1 start-pos) (-> sv-144 fire-point) (-> sv-144 fire-dir-out) 40960.0) + (+! (-> s3-1 start-pos y) 24576.0) + (vector-! (-> s3-1 move-dist) (get-trans (the-as process-focusable s4-1) 3) (-> sv-144 fire-point)) + (let ((v1-32 s3-1)) + (set! (-> v1-32 radius) 40.96) + (set! (-> v1-32 collide-with) (collide-spec backgnd)) + (set! (-> v1-32 ignore-process0) #f) + (set! (-> v1-32 ignore-process1) #f) + (set! (-> v1-32 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-32 action-mask) (collide-action solid)) + ) + (when (< (fill-and-probe-using-line-sphere *collide-cache* s3-1) 0.0) + (let ((s3-3 + (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable s4-1) 3) (-> self control trans)) + ) + ) + (vector-normalize! s3-3 1.0) + (when (< (-> s3-3 y) 0.5) + (set! (-> sv-1284 sv-1288 targ) (process->handle s4-1)) + (let ((f30-0 1.0)) + (if (and (nonzero? (-> s4-1 draw)) (logtest? (-> s4-1 draw status) (draw-control-status on-screen))) + (set! f30-0 (+ 2.0 f30-0)) + ) + (if (< (vector-vector-xz-distance-squared (-> sv-144 fire-point) (get-trans (the-as process-focusable s4-1) 3)) + 2415919000.0 + ) + (set! f30-0 (+ 4.0 f30-0)) + ) + (if (logtest? (process-mask enemy guard) (-> s4-1 mask)) + (set! f30-0 (+ 28.0 f30-0)) + ) + (if (logtest? (process-mask vehicle civilian) (-> s4-1 mask)) + (set! f30-0 (* 0.25 f30-0)) + ) + (set! (-> sv-1284 sv-1288 value) f30-0) + (set! sv-1296 (+ sv-1296 f30-0)) + ) + (set! sv-1288 (+ sv-1288 1)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (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)) + ) + ) + ) + ) + ) + ) + ) + (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)) + (s5-7 (the-as process #f)) + ) + (let ((f1-11 0.0) + (gp-2 (new 'stack-no-clear 'vector)) + ) + (dotimes (v1-136 sv-1288) + (+! f1-11 (-> sv-1284 v1-136 value)) + (when (< f0-32 f1-11) + (set! s5-7 (handle->process (-> sv-1284 v1-136 targ))) + 0 + (goto cfg-91) + ) + ) + (label cfg-91) + (let ((s4-5 (new 'stack-no-clear 'vector))) + (let ((s3-5 s4-5)) + (let* ((f30-2 -1.0) + (f28-0 2.0) + (v1-148 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-149 (the-as number (logior #x3f800000 v1-148))) + ) + (set! (-> s3-5 x) (+ f30-2 (* f28-0 (+ -1.0 (the-as float v1-149))))) + ) + (let* ((f30-3 -0.2) + (f28-1 0.7) + (v1-154 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-155 (the-as number (logior #x3f800000 v1-154))) + ) + (set! (-> s3-5 y) (+ f30-3 (* f28-1 (+ -1.0 (the-as float v1-155))))) + ) + (let* ((f30-4 -1.0) + (f28-2 2.0) + (v1-160 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-161 (the-as number (logior #x3f800000 v1-160))) + ) + (set! (-> s3-5 z) (+ f30-4 (* f28-2 (+ -1.0 (the-as float v1-161))))) + ) + (set! (-> s3-5 w) 1.0) + ) + (vector-normalize! s4-5 163840.0) + (vector+! gp-2 (-> sv-144 fire-point) s4-5) + ) + (let ((s4-6 (new 'stack-no-clear 'vector))) + (set! (-> s4-6 quad) (-> gp-2 quad)) + (when s5-7 + (let ((s3-6 s4-6) + (s2-3 s5-7) + ) + (set! (-> s3-6 quad) (-> (get-trans + (the-as process-focusable (if (type? s2-3 process-focusable) + (the-as process-focusable s2-3) + ) + ) + 3 + ) + quad + ) + ) + ) + ) + (let ((s3-7 (vector-rotate-y! (new 'stack-no-clear 'vector) (-> sv-144 fire-dir-out) 2730.6667)) + (v1-174 (vector-rotate-y! (new 'stack-no-clear 'vector) (-> sv-144 fire-dir-out) -2730.6667)) + (a0-114 (vector-! (new 'stack-no-clear 'vector) s4-6 (-> sv-144 fire-point))) + (s4-7 (new 'stack-no-clear 'vector)) + ) + (if (< (vector-dot s3-7 a0-114) (vector-dot v1-174 a0-114)) + (set! (-> s4-7 quad) (-> s3-7 quad)) + (set! (-> s4-7 quad) (-> v1-174 quad)) + ) + (vector-normalize! a0-114 1.0) + (let* ((s3-8 vector-rotate-y!) + (s2-4 s4-7) + (s1-0 s4-7) + (f30-5 -2730.6667) + (f28-3 5461.3335) + (v1-180 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-181 (the-as number (logior #x3f800000 v1-180))) + ) + (s3-8 s2-4 s1-0 (+ f30-5 (* f28-3 (+ -1.0 (the-as float v1-181))))) + ) + (let* ((f30-6 -0.1) + (f28-4 0.5) + (v1-186 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-187 (the-as number (logior #x3f800000 v1-186))) + ) + (set! (-> s4-7 y) (+ f30-6 (* f28-4 (+ -1.0 (the-as float v1-187))) (-> s4-7 y))) + ) + (vector-normalize! s4-7 1.0) + (set! (-> sv-148 ent) (-> self entity)) + (set! (-> sv-148 charge) 1.0) + (set! (-> sv-148 options) (projectile-options)) + (logclear! (-> sv-148 options) (projectile-options po14 po15 po16)) + (set! (-> sv-148 pos quad) (-> sv-144 fire-point quad)) + (set! (-> sv-148 notify-handle) (the-as handle #f)) + (set! (-> sv-148 owner-handle) (the-as handle #f)) + (set! (-> sv-148 target-handle) (process->handle s5-7)) + (set! (-> sv-148 target-pos quad) (-> gp-2 quad)) + (set! (-> sv-148 ignore-handle) (process->handle (send-event self 'get-vehicle))) + (let* ((v1-209 *game-info*) + (a0-143 (+ (-> v1-209 attack-id) 1)) + ) + (set! (-> v1-209 attack-id) a0-143) + (set! (-> sv-148 attack-id) a0-143) + ) + (set! (-> sv-148 timeout) (seconds 4)) + (vector-float*! (-> sv-148 vel) s4-7 327680.0) + ) + ) + ) + ) + (spawn-projectile gun-blue-shot-3 sv-148 (ppointer->process (-> sv-144 gun)) *default-dead-pool*) + ) + +;; definition for function draw-beam-segment +;; WARN: Return type mismatch symbol vs none. +(defun draw-beam-segment () + (none) + ) + +;; definition for symbol *found-objects*, type (pointer handle) +(define *found-objects* (the-as (pointer handle) (malloc 'global 112))) + +;; definition for symbol *gun-blue-2-last-attack-id*, type uint +(define *gun-blue-2-last-attack-id* (the-as uint 0)) + +;; definition of type timeframe-wrapper +(deftype timeframe-wrapper (structure) + ((time time-frame) + ) + ) + +;; definition for method 3 of type timeframe-wrapper +(defmethod inspect ((this timeframe-wrapper)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'timeframe-wrapper) + (format #t "~1Ttime: ~D~%" (-> this time)) + (label cfg-4) + this + ) + +;; definition for symbol *gun-blue-2-last-attack-id-time*, type timeframe-wrapper +(define *gun-blue-2-last-attack-id-time* (new 'static 'timeframe-wrapper)) + +;; definition for function fire-projectile-if-necessary +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs (pointer gun-blue-shot-2). +(defun fire-projectile-if-necessary ((arg0 vector) (arg1 vector) (arg2 handle)) + (let ((s5-0 (new 'stack-no-clear 'collide-query)) + (s3-0 #f) + ) + (vector-! (-> s5-0 move-dist) arg1 arg0) + (set! (-> s5-0 start-pos quad) (-> arg0 quad)) + (vector-float*! (-> s5-0 move-dist) (-> s5-0 move-dist) 2.0) + (let ((v1-5 s5-0)) + (set! (-> v1-5 radius) 12288.0) + (set! (-> v1-5 collide-with) (collide-spec crate civilian enemy obstacle vehicle-sphere hit-by-others-list)) + (set! (-> v1-5 ignore-process0) (handle->process arg2)) + (set! (-> v1-5 ignore-process1) #f) + (set! (-> v1-5 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-5 action-mask) (collide-action solid)) + ) + (let ((f0-2 (fill-and-probe-using-line-sphere *collide-cache* s5-0))) + (if (and (< f0-2 1.0) (!= f0-2 -100000000.0)) + (set! s3-0 #t) + ) + ) + (the-as + (pointer gun-blue-shot-2) + (when s3-0 + (when (>= (- (-> *display* game-clock frame-counter) (-> *gun-blue-2-last-attack-id-time* time)) (seconds 0.4)) + (let* ((v1-19 *game-info*) + (a0-16 (+ (-> v1-19 attack-id) 1)) + ) + (set! (-> v1-19 attack-id) a0-16) + (set! *gun-blue-2-last-attack-id* a0-16) + ) + (set! (-> *gun-blue-2-last-attack-id-time* time) (-> *display* game-clock frame-counter)) + ) + (let ((a1-8 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> a1-8 ent) (-> *target* entity)) + (set! (-> a1-8 charge) 1.0) + (set! (-> a1-8 options) (projectile-options)) + (logclear! (-> a1-8 options) (projectile-options po14 po15 po16)) + (set! (-> a1-8 pos quad) (-> arg0 quad)) + (set! (-> a1-8 vel quad) + (-> (vector-float*! (new 'stack-no-clear 'vector) (-> s5-0 move-dist) (/ 2.0 (seconds-per-frame))) quad) + ) + (set! (-> a1-8 notify-handle) (the-as handle #f)) + (set! (-> a1-8 owner-handle) (process->handle *target*)) + (set! (-> a1-8 target-handle) (the-as handle #f)) + (set! (-> a1-8 target-pos quad) (the-as uint128 0)) + (set! (-> a1-8 ignore-handle) (ppointer->handle (-> arg2 process))) + (set! (-> a1-8 attack-id) *gun-blue-2-last-attack-id*) + (set! (-> a1-8 timeout) (seconds 4)) + (spawn-projectile gun-blue-shot-2 a1-8 (ppointer->process (-> *target* gun gun)) *default-dead-pool*) + ) + ) + ) + ) + ) + +;; definition of type gun-blue-2-lightning-info +(deftype gun-blue-2-lightning-info (structure) + ((pts vector 32 :inline) + (num-pts int8) + (should-draw-terminal-sparks? symbol) + (terminal-spark-pos vector :inline) + (should-draw-extension? symbol) + (extension-end-point vector :inline) + ) + ) + +;; definition for method 3 of type gun-blue-2-lightning-info +(defmethod inspect ((this gun-blue-2-lightning-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'gun-blue-2-lightning-info) + (format #t "~1Tpts[32] @ #x~X~%" (-> this pts)) + (format #t "~1Tnum-pts: ~D~%" (-> this num-pts)) + (format #t "~1Tshould-draw-terminal-sparks?: ~A~%" (-> this should-draw-terminal-sparks?)) + (format #t "~1Tterminal-spark-pos: #~%" (-> this terminal-spark-pos)) + (format #t "~1Tshould-draw-extension?: ~A~%" (-> this should-draw-extension?)) + (format #t "~1Textension-end-point: #~%" (-> this extension-end-point)) + (label cfg-4) + this + ) + +;; definition of type gun-blue-lightning-command +(deftype gun-blue-lightning-command (structure) + ((msg gun-blue-lightning-cmd-msg) + (lightning-info gun-blue-2-lightning-info :inline) + ) + ) + +;; definition for method 3 of type gun-blue-lightning-command +(defmethod inspect ((this gun-blue-lightning-command)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'gun-blue-lightning-command) + (format #t "~1Tmsg: ~D~%" (-> this msg)) + (format #t "~1Tlightning-info: #~%" (-> this lightning-info)) + (label cfg-4) + this + ) + +;; definition of type gun-blue-2-lightning-tracker +(deftype gun-blue-2-lightning-tracker (process-drawable) + ((lt-array (array lightning-bolt)) + (should-draw-this-frame? symbol) + (last-spark-time time-frame :offset 216) + (spark-time-interval time-frame) + (last-deduct-ammo-time time-frame) + (snd-lightning sound-id) + (active-enter-time time-frame) + (revolve-angle float) + (sway-angle float) + (snd-spin sound-id) + (spin-intensity float) + (prev-targ-pos vector :inline) + (last-probe-index int16) + ) + (:state-methods + active + inactive + die + test + ) + (:methods + (setup-draw! (_type_ gun-blue-2-lightning-info) none) + (gun-blue-2-lightning-tracker-method-25 (_type_) object) + (gun-blue-2-lightning-tracker-method-26 (_type_ vector vector gun-blue-lightning-command) symbol) + ) + ) + +;; definition for method 3 of type gun-blue-2-lightning-tracker +(defmethod inspect ((this gun-blue-2-lightning-tracker)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tlt-array: ~A~%" (-> this lt-array)) + (format #t "~2Tshould-draw-this-frame?: ~A~%" (-> this should-draw-this-frame?)) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (format #t "~2Tlast-spark-time: ~D~%" (-> this last-spark-time)) + (format #t "~2Tspark-time-interval: ~D~%" (-> this spark-time-interval)) + (format #t "~2Tlast-deduct-ammo-time: ~D~%" (-> this last-deduct-ammo-time)) + (format #t "~2Tsnd-lightning: ~D~%" (-> this snd-lightning)) + (format #t "~2Tactive-enter-time: ~D~%" (-> this active-enter-time)) + (format #t "~2Trevolve-angle: ~f~%" (-> this revolve-angle)) + (format #t "~2Tsway-angle: ~f~%" (-> this sway-angle)) + (format #t "~2Tsnd-spin: ~D~%" (-> this snd-spin)) + (format #t "~2Tspin-intensity: ~f~%" (-> this spin-intensity)) + (format #t "~2Tprev-targ-pos: #~%" (-> this prev-targ-pos)) + (format #t "~2Tlast-probe-index: ~D~%" (-> this last-probe-index)) + (label cfg-4) + this + ) + +;; definition for method 10 of type gun-blue-2-lightning-tracker +(defmethod deactivate ((this gun-blue-2-lightning-tracker)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this snd-spin)) + (sound-stop (-> this snd-lightning)) + (call-parent-method this) + (none) + ) + +;; definition of type gun-blue-2-target-info +(deftype gun-blue-2-target-info (structure) + ((target handle) + (start-time time-frame) + ) + ) + +;; definition for method 3 of type gun-blue-2-target-info +(defmethod inspect ((this gun-blue-2-target-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'gun-blue-2-target-info) + (format #t "~1Ttarget: ~D~%" (-> this target)) + (format #t "~1Tstart-time: ~D~%" (-> this start-time)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(if (zero? *gun-blue-2-targets*) + (set! *gun-blue-2-targets* (the-as (inline-array gun-blue-2-target-info) (malloc 'global 192))) + ) + +;; definition of type constraint-knot +(deftype constraint-knot (structure) + ((pt vector :inline) + (dir vector :inline) + (length float) + ) + ) + +;; definition for method 3 of type constraint-knot +(defmethod inspect ((this constraint-knot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'constraint-knot) + (format #t "~1Tpt: #~%" (-> this pt)) + (format #t "~1Tdir: #~%" (-> this dir)) + (format #t "~1Tlength: ~f~%" (-> this length)) + (label cfg-4) + this + ) + +;; definition of type rope-constraint +(deftype rope-constraint (structure) + ((constraints constraint-knot 12 :inline) + (num-knots uint8) + ) + (:methods + (rope-constraint-method-9 (_type_ int) symbol) + ) + ) + +;; definition for method 3 of type rope-constraint +(defmethod inspect ((this rope-constraint)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'rope-constraint) + (format #t "~1Tconstraints[12] @ #x~X~%" (-> this constraints)) + (format #t "~1Tnum-knots: ~D~%" (-> this num-knots)) + (label cfg-4) + this + ) + +;; definition for method 9 of type rope-constraint +;; INFO: Used lq/sq +(defmethod rope-constraint-method-9 ((this rope-constraint) (arg0 int)) + (local-vars (sv-64 vector) (sv-80 vector) (sv-96 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) + (let ((s4-0 arg0) + (s3-0 (+ (-> this num-knots) -2)) + ) + (while (>= (the-as int s3-0) s4-0) + (dotimes (s2-0 1) + (set! sv-64 (the-as vector (+ (the-as uint (-> this constraints 0 dir)) (* 48 s4-0)))) + (let ((s1-0 (-> this constraints s4-0)) + (s0-0 (-> this constraints (+ s4-0 1))) + ) + (set! sv-96 (new 'stack-no-clear 'vector)) + (let ((v1-6 s0-0) + (a0-7 s1-0) + ) + (.lvf vf4 (&-> v1-6 pt quad)) + (.lvf vf5 (&-> a0-7 pt quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-96 quad) vf6) + 0.0 + (let ((f30-0 (vector-normalize-ret-len! sv-96 1.0))) + (vector-normalize! sv-64 1.0) + (let ((f0-2 (vector-dot sv-96 sv-64))) + (when (< f0-2 0.9999) + (set! sv-80 (new 'stack-no-clear 'vector)) + 0.0 + (let* ((f28-0 (acos f0-2)) + (f0-4 (* 0.000030517578 f28-0)) + ) + 0.0 + 0.0 + (- 32768.0 f28-0) + (let* ((f0-6 (fmax 0.0 (fmin 1.0 f0-4))) + (f0-7 (* f0-6 f0-6)) + (f28-1 + (fmin (fmin f28-0 (* (lerp 5461.3335 2184533.2 f0-7) (seconds-per-frame))) (* 131072.0 (seconds-per-frame))) + ) + ) + (let ((v1-20 sv-80)) + (.lvf vf1 (&-> sv-96 quad)) + (.lvf vf2 (&-> sv-64 quad)) + (.outer.product.a.vf acc vf1 vf2) + (.outer.product.b.vf vf3 vf2 vf1 acc) + (.svf (&-> v1-20 quad) vf3) + ) + (vector-normalize! sv-80 1.0) + (vector-rotate-around-axis! sv-96 (the-as quaternion sv-96) f28-1 sv-80) + ) + ) + (vector-normalize! sv-96 1.0) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this constraints 0 dir)) (* 48 (+ s4-0 1))))) + (-> sv-96 quad) + ) + (vector+float*! (the-as vector s0-0) (the-as vector s1-0) sv-96 f30-0) + ) + ) + ) + ) + ) + (+! s4-0 1) + ) + ) + (let ((s4-1 (+ (-> this num-knots) -2))) + (while (>= (the-as int s4-1) arg0) + (+ (the-as uint (-> this constraints 0 dir)) (* 48 arg0)) + (let* ((s3-1 (-> this constraints arg0)) + (s2-1 (-> this constraints (+ arg0 1))) + (s1-2 (vector-! (new 'stack-no-clear 'vector) (the-as vector s2-1) (the-as vector s3-1))) + ) + 0.0 + (vector-normalize-ret-len! s1-2 1.0) + (vector+float*! (the-as vector s2-1) (the-as vector s3-1) s1-2 (-> this constraints arg0 length)) + ) + (+! arg0 1) + ) + ) + #f + ) + ) + +;; definition for symbol *blue-2-lightning-shape*, type rope-constraint +(define *blue-2-lightning-shape* (new 'static 'rope-constraint)) + +;; failed to figure out what this is: +(defstate die (gun-blue-2-lightning-tracker) + :virtual #t + :code (behavior () + '() + ) + ) + +;; failed to figure out what this is: +(defstate inactive (gun-blue-2-lightning-tracker) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('gun-blue-lightning) + (when (= (-> (the-as gun-blue-lightning-command (-> block param 0)) msg) (gun-blue-lightning-cmd-msg active)) + (if (= (-> *target* gun using-gun-type) (pickup-type gun-blue-2)) + (go-virtual active) + ) + ) + ) + (('notice) + (case (-> block param 0) + (('die) + (go-virtual die) + ) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :exit (behavior () + (if (not (and (-> self next-state) (= (-> self next-state name) 'active))) + (sound-stop (-> self snd-spin)) + ) + ) + :trans (behavior () + (if (not (time-elapsed? (-> self state-time) (seconds 0.2))) + (sound-play-by-name + (static-sound-name "blue-gun2-loop") + (-> self snd-lightning) + 768 + (the int (* 1524.0 (lerp 0.0 -0.5 (* 0.016666668 (the float (- (current-time) (-> self state-time))))))) + 0 + (sound-group) + #t + ) + (sound-stop (-> self snd-lightning)) + ) + (let ((f0-6 (lerp-scale-clamp 0.0 1.0 (-> *target* gun fire-spinv) 0.0 218453.33))) + 0.0 + (seek! (-> self spin-intensity) f0-6 (* 2.0 (seconds-per-frame))) + ) + (if (< 0.001 (-> self spin-intensity)) + (sound-play-by-name + (static-sound-name "blue-gun2-spin") + (-> self snd-spin) + (the int (* 1024.0 (lerp 0.3 1.0 (-> self spin-intensity)))) + (the int (* 1524.0 (lerp -0.5 0.0 (-> self spin-intensity)))) + 0 + (sound-group) + #t + ) + (sound-stop (-> self snd-spin)) + ) + (if (!= (lightning-bolt-method-14 (-> self lt-array 0)) 3) + (gun-blue-2-lightning-tracker-method-25 self) + ) + (dotimes (gp-3 (-> self lt-array length)) + (let ((s5-2 (-> self lt-array gp-3))) + (lightning-bolt-method-11 s5-2) + (lightning-bolt-method-12 s5-2) + ) + ) + (if (time-elapsed? (-> self state-time) (seconds 8)) + (go-virtual die) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(when (or (zero? *uv-loop-curve*) (!= loading-level global)) + (set! *uv-loop-curve* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *uv-loop-curve* 2 'loading-level (the-as int #t)) + ) + +;; failed to figure out what this is: +(set! (-> *uv-loop-curve* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *uv-loop-curve* pts data 0 second) 0.0) + +;; failed to figure out what this is: +(set! (-> *uv-loop-curve* pts data 1 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *uv-loop-curve* pts data 1 second) 1.0) + +;; failed to figure out what this is: +(if (or (zero? *blue-light-test*) (!= loading-level global)) + (set! *blue-light-test* (new 'loading-level 'lightning-appearance)) + ) + +;; failed to figure out what this is: +(set! (-> *blue-light-test* base-alpha) 1.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test* tex-id) (the-as uint #x408f00)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test* alpha-1-curve) *curve-linear-down*) + +;; failed to figure out what this is: +(set! (-> *blue-light-test* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test* alpha-1-repeat-dist) 262144.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test* alpha-2-curve) #f) + +;; failed to figure out what this is: +(set! (-> *blue-light-test* alpha-2-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test* alpha-2-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test* width-curve) *curve-linear-down*) + +;; failed to figure out what this is: +(set! (-> *blue-light-test* width-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test* width-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test* uv-repeat-dist) 28672.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test* regenerate-time-start) (seconds 0.167)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test* regenerate-time-end) (seconds 0.25)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test* width-range-start) 1228.8) + +;; failed to figure out what this is: +(set! (-> *blue-light-test* width-range-end) 2048.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test* fade-time) (seconds 0.3)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test* uv-shift?) #t) + +;; failed to figure out what this is: +(set! (-> *blue-light-test* uv-shift-speed) (seconds -0.5)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test* use-sprite-bucket?) #t) + +;; failed to figure out what this is: +(set! (-> *blue-light-test* use-accurate-interp?) #t) + +;; failed to figure out what this is: +(if (or (zero? *blue-light-test-end*) (!= loading-level global)) + (set! *blue-light-test-end* (new 'loading-level 'lightning-appearance)) + ) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-end* base-alpha) 1.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-end* tex-id) (the-as uint #x408f00)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-end* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-end* alpha-1-curve) *curve-linear-down*) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-end* alpha-1-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-end* alpha-1-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-end* alpha-2-curve) #f) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-end* alpha-2-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-end* alpha-2-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-end* width-curve) *curve-linear-down*) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-end* width-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-end* width-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-end* uv-repeat-dist) 28672.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-end* regenerate-time-start) (seconds 0.085)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-end* regenerate-time-end) (seconds 0.117)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-end* width-range-start) 5324.8) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-end* width-range-end) 6144.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-end* fade-time) (seconds 0.3)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-end* uv-shift?) #t) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-end* uv-shift-speed) (seconds -0.5)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-end* use-sprite-bucket?) #t) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-end* use-accurate-interp?) #t) + +;; failed to figure out what this is: +(if (or (zero? *blue-light-test-big*) (!= loading-level global)) + (set! *blue-light-test-big* (new 'loading-level 'lightning-appearance)) + ) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big* base-alpha) 1.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big* tex-id) (the-as uint #x403f00)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big* alpha-1-curve) *curve-linear-down*) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big* alpha-1-repeat-dist) 262144.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big* alpha-2-curve) #f) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big* alpha-2-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big* alpha-2-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big* width-curve) *curve-linear-down*) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big* width-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big* width-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big* uv-repeat-dist) 28672.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big* regenerate-time-start) (seconds 0.035)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big* regenerate-time-end) (seconds 0.067)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big* width-range-start) 8192.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big* width-range-end) 8192.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big* fade-time) (seconds 0.3)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big* uv-shift?) #t) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big* uv-shift-speed) (seconds -0.5)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big* use-sprite-bucket?) #t) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big* use-accurate-interp?) #t) + +;; failed to figure out what this is: +(if (or (zero? *blue-light-test-big-intense*) (!= loading-level global)) + (set! *blue-light-test-big-intense* (new 'loading-level 'lightning-appearance)) + ) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big-intense* base-alpha) 0.7) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big-intense* tex-id) (the-as uint #x403f00)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big-intense* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big-intense* alpha-1-curve) *curve-linear-down*) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big-intense* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big-intense* alpha-1-repeat-dist) 409600.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big-intense* alpha-2-curve) #f) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big-intense* alpha-2-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big-intense* alpha-2-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big-intense* width-curve) *curve-linear-down*) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big-intense* width-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big-intense* width-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big-intense* uv-repeat-dist) 28672.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big-intense* regenerate-time-start) (seconds 0.035)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big-intense* regenerate-time-end) (seconds 0.067)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big-intense* width-range-start) 28672.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big-intense* width-range-end) 28672.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big-intense* fade-time) (seconds 0.3)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big-intense* uv-shift?) #t) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big-intense* uv-shift-speed) (seconds -0.5)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big-intense* use-sprite-bucket?) #t) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-big-intense* use-accurate-interp?) #t) + +;; failed to figure out what this is: +(if (or (zero? *blue-light-test-small-fade*) (!= loading-level global)) + (set! *blue-light-test-small-fade* (new 'loading-level 'lightning-appearance)) + ) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-small-fade* base-alpha) 1.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-small-fade* tex-id) (the-as uint #x408f00)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-small-fade* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-small-fade* alpha-1-curve) *curve-linear-down*) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-small-fade* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-small-fade* alpha-1-repeat-dist) 409600.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-small-fade* alpha-2-curve) #f) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-small-fade* alpha-2-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-small-fade* alpha-2-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-small-fade* width-curve) *curve-linear-down*) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-small-fade* width-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-small-fade* width-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-small-fade* uv-repeat-dist) 28672.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-small-fade* regenerate-time-start) (seconds 0.167)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-small-fade* regenerate-time-end) (seconds 0.25)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-small-fade* width-range-start) 32768.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-small-fade* width-range-end) 32768.0) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-small-fade* fade-time) (seconds 0.3)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-small-fade* uv-shift?) #t) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-small-fade* uv-shift-speed) (seconds -0.5)) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-small-fade* use-sprite-bucket?) #t) + +;; failed to figure out what this is: +(set! (-> *blue-light-test-small-fade* use-accurate-interp?) #t) + +;; definition for method 24 of type gun-blue-2-lightning-tracker +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod setup-draw! ((this gun-blue-2-lightning-tracker) (arg0 gun-blue-2-lightning-info)) + (cond + ((-> arg0 should-draw-extension?) + (set! (-> *blue-light-test-big* alpha-1-repeat-dist) 262144.0) + (set! (-> *blue-light-test* alpha-1-repeat-dist) 262144.0) + ) + ((> (-> arg0 num-pts) 0) + (let* ((f0-2 (vector-vector-distance (the-as vector (-> arg0 pts)) (-> arg0 pts (+ (-> arg0 num-pts) -1)))) + (f0-3 (+ 16384.0 f0-2)) + ) + (set! (-> *blue-light-test-big* alpha-1-repeat-dist) (fmin 262144.0 f0-3)) + (set! (-> *blue-light-test* alpha-1-repeat-dist) (fmin 262144.0 f0-3)) + ) + ) + ) + (dotimes (s4-0 4) + (let ((s3-0 (-> this lt-array s4-0))) + (set! (-> s3-0 inner-point-travel-time) (seconds 0.5)) + (set! (-> s3-0 snap-inner-points?) #t) + (set! (-> s3-0 appearance) *blue-light-test*) + (set! (-> s3-0 fractal-reduction) (/ (* 0.4 (logf 9.0)) (logf 12.0))) + (set! (-> s3-0 generate-mode) (the-as uint 1)) + (when (< 1 (-> arg0 num-pts)) + ) + (set! (-> s3-0 num-active-spans) (+ (-> arg0 num-pts) -1)) + (dotimes (v1-31 (-> s3-0 num-active-spans)) + (let ((a0-8 (-> s3-0 spans data v1-31))) + (let ((a1-5 (-> s3-0 spans-internal data v1-31))) + (set! (-> s3-0 span-pts-start data v1-31 quad) (-> arg0 pts v1-31 quad)) + (set! (-> a0-8 random-offset-size-start) 0.0) + (if (> v1-31 0) + (set! (-> a0-8 random-offset-size-start) 8192.0) + ) + (set! (-> a1-5 num-inner-points) 4) + ) + (set! (-> a0-8 inner-random-offset-size) 8192.0) + ) + ) + (let ((v1-37 (-> s3-0 spans data (-> s3-0 num-active-spans)))) + (set! (-> s3-0 span-pts-start data (-> s3-0 num-active-spans) quad) + (-> arg0 pts (-> s3-0 num-active-spans) quad) + ) + (set! (-> v1-37 random-offset-size-start) 0.0) + ) + (lightning-bolt-method-11 s3-0) + (lightning-bolt-method-12 s3-0) + ) + ) + (dotimes (s4-1 2) + (let ((s3-1 (-> this lt-array (+ s4-1 4)))) + (set! (-> s3-1 inner-point-travel-time) (seconds 0.085)) + (set! (-> s3-1 snap-inner-points?) #t) + (set! (-> s3-1 appearance) *blue-light-test-big*) + (set! (-> s3-1 fractal-reduction) (/ (* 0.4 (logf 9.0)) (logf 12.0))) + (set! (-> s3-1 generate-mode) (the-as uint 1)) + (when (< 1 (-> arg0 num-pts)) + ) + (set! (-> s3-1 num-active-spans) (+ (-> arg0 num-pts) -1)) + (dotimes (v1-58 (-> s3-1 num-active-spans)) + (let ((a0-24 (-> s3-1 spans data v1-58))) + (let ((a1-16 (-> s3-1 spans-internal data v1-58))) + (set! (-> s3-1 span-pts-start data v1-58 quad) (-> arg0 pts v1-58 quad)) + (set! (-> a0-24 random-offset-size-start) 0.0) + (if (> v1-58 0) + (set! (-> a0-24 random-offset-size-start) 4096.0) + ) + (set! (-> a1-16 num-inner-points) 3) + ) + (set! (-> a0-24 inner-random-offset-size) 4096.0) + ) + ) + (let ((v1-64 (-> s3-1 spans data (-> s3-1 num-active-spans)))) + (set! (-> s3-1 span-pts-start data (-> s3-1 num-active-spans) quad) + (-> arg0 pts (-> s3-1 num-active-spans) quad) + ) + (set! (-> v1-64 random-offset-size-start) 0.0) + ) + (lightning-bolt-method-11 s3-1) + (lightning-bolt-method-12 s3-1) + ) + ) + (set! (-> this root trans quad) (-> arg0 pts (+ (-> arg0 num-pts) -1) quad)) + (when (-> arg0 should-draw-terminal-sparks?) + (when (time-elapsed? (-> this last-spark-time) (-> this spark-time-interval)) + (set-time! (-> this last-spark-time)) + (set! (-> this spark-time-interval) + (the-as + time-frame + (the int (* 5.0000005 (the float (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 3) 3)))) + ) + ) + (let ((s4-2 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 3) 3))) + (let ((v1-90 (-> this lt-array 5))) + (-> v1-90 spans data (-> v1-90 num-active-spans)) + (set! (-> arg0 terminal-spark-pos quad) (-> v1-90 span-pts-start data (-> v1-90 num-active-spans) quad)) + ) + (set! (-> this root trans quad) (-> arg0 terminal-spark-pos quad)) + (dotimes (s5-1 s4-2) + (process-drawable-shock-effect-replace + this + (-> *lightning-spec-id-table* 13) + lightning-probe-callback + 256 + 0 + 40960.0 + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate active (gun-blue-2-lightning-tracker) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('notice) + (case (-> block param 0) + (('die) + (go-virtual die) + ) + ) + ) + (('gun-blue-lightning) + (case (-> (the-as gun-blue-lightning-command (-> block param 0)) msg) + (((gun-blue-lightning-cmd-msg inactive)) + (go-virtual inactive) + ) + ) + #t + ) + ) + ) + :enter (behavior () + (set! (-> self prev-targ-pos quad) (-> (target-pos 0) quad)) + (set-time! (-> self state-time)) + (set-time! (-> self active-enter-time)) + (set-time! (-> self last-deduct-ammo-time)) + (dotimes (gp-1 (-> self lt-array length)) + (lightning-bolt-method-13 (-> self lt-array gp-1) 0) + ) + (set! (-> *blue-2-lightning-shape* num-knots) (the-as uint 12)) + (let ((v1-17 (new 'stack-no-clear 'vector))) + (set! (-> v1-17 quad) (-> *target* gun fire-point quad)) + (let ((a0-9 (vector-float*! (new 'stack-no-clear 'vector) (-> *target* gun laser-dir) 24576.0))) + (dotimes (a1-4 (the-as int (-> *blue-2-lightning-shape* num-knots))) + (set! (-> *blue-2-lightning-shape* constraints a1-4 pt quad) (-> v1-17 quad)) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> *blue-2-lightning-shape* constraints 0 dir)) (* 48 a1-4)))) + (-> *target* gun laser-dir quad) + ) + (vector+! v1-17 v1-17 a0-9) + (set! (-> *blue-2-lightning-shape* constraints a1-4 length) 24576.0) + ) + ) + ) + (adjust-player-ammo -1.0 (pickup-type ammo-blue)) + (dotimes (v1-20 12) + (set! (-> *gun-blue-2-targets* v1-20 target) (the-as handle #f)) + (set! (-> *gun-blue-2-targets* v1-20 start-time) 0) + ) + (when (or (>= (- (-> *display* game-clock frame-counter) (-> *gun-blue-2-last-attack-id-time* time)) (seconds 0.4)) + (< (-> *display* game-clock frame-counter) (-> *gun-blue-2-last-attack-id-time* time)) + ) + (let* ((v1-31 *game-info*) + (a0-21 (+ (-> v1-31 attack-id) 1)) + ) + (set! (-> v1-31 attack-id) a0-21) + (set! *gun-blue-2-last-attack-id* a0-21) + ) + (set! (-> *gun-blue-2-last-attack-id-time* time) (-> *display* game-clock frame-counter)) + ) + ) + :exit (behavior () + (kill-particles (-> self part)) + (dotimes (gp-0 (-> self lt-array length)) + (let ((s5-0 (-> self lt-array gp-0))) + (when (zero? (lightning-bolt-method-14 s5-0)) + (lightning-bolt-method-13 s5-0 2) + (lightning-bolt-method-11 s5-0) + (lightning-bolt-method-12 s5-0) + ) + ) + ) + ) + :trans (behavior () + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 76 (seconds 0.5)) + (if (not (time-elapsed? (-> self active-enter-time) (seconds 0.2))) + (sound-play-by-name + (static-sound-name "blue-gun2-loop") + (-> self snd-lightning) + 768 + (the int (* 1524.0 (lerp -0.5 0.0 (* 0.016666668 (the float (- (current-time) (-> self state-time))))))) + 0 + (sound-group) + #t + ) + (sound-play "blue-gun2-loop" :id (-> self snd-lightning) :vol 75) + ) + (let ((f0-6 (lerp-scale-clamp 0.0 1.0 (-> *target* gun fire-spinv) 0.0 109226.664))) + 0.0 + (let ((f0-9 (- 1.0 (* (- 1.0 f0-6) (- 1.0 f0-6))))) + (seek! (-> self spin-intensity) f0-9 (* 2.0 (seconds-per-frame))) + ) + ) + (if (< 0.1 (-> self spin-intensity)) + (sound-play-by-name + (static-sound-name "blue-gun2-spin") + (-> self snd-spin) + (the int (* 1024.0 (lerp 0.75 1.0 (-> self spin-intensity)))) + (the int (* 1524.0 (lerp -0.5 0.0 (-> self spin-intensity)))) + 0 + (sound-group) + (-> self root trans) + ) + ) + (+! (-> self revolve-angle) (* 65536.0 (seconds-per-frame))) + (+! (-> self sway-angle) (* 65536.0 (seconds-per-frame))) + (gun-blue-2-lightning-tracker-method-25 self) + (when (time-elapsed? (-> self last-deduct-ammo-time) (seconds 0.1)) + (adjust-player-ammo-over-time + (the-as int (- (current-time) (-> self last-deduct-ammo-time))) + 7.5 + (pickup-type ammo-blue) + 10000.0 + ) + (set-time! (-> self last-deduct-ammo-time)) + ) + (spawn (-> self part) (-> *target* gun fire-point)) + (if (or (not (cpad-hold? 0 r1)) + (or (>= 0.0 (get-remaining-player-ammo (pickup-type ammo-blue))) + (!= (-> *target* gun using-gun-type) 33) + (not (-> *target* gun active?)) + (and (-> *target* next-state) (= (-> *target* next-state name) 'target-attack-air)) + ) + ) + (go-virtual inactive) + ) + ) + :code sleep-code + :post (behavior () + '() + ) + ) + +;; definition for method 7 of type gun-blue-2-lightning-tracker +(defmethod relocate ((this gun-blue-2-lightning-tracker) (offset int)) + (dotimes (v1-0 (-> this lt-array length)) + (if (nonzero? (-> this lt-array v1-0)) + (&+! (-> this lt-array v1-0) offset) + ) + ) + (if (nonzero? (-> this lt-array)) + (&+! (-> this lt-array) offset) + ) + (call-parent-method this offset) + ) + +;; definition of type gun-blue-2-lightning-init-params +(deftype gun-blue-2-lightning-init-params (structure) + ((num-beams int8) + ) + ) + +;; definition for method 3 of type gun-blue-2-lightning-init-params +(defmethod inspect ((this gun-blue-2-lightning-init-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'gun-blue-2-lightning-init-params) + (format #t "~1Tnum-beams: ~D~%" (-> this num-beams)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-gun-blue-2-tracker scenecamera scenecamera-lod0-jg -1 + ((scenecamera-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :texture-level 10 + ) + +;; failed to figure out what this is: +(defstate test (gun-blue-2-lightning-tracker) + :virtual #t + :code sleep-code + ) + +;; definition for function gun-blue-2-lightning-init-by-other +(defbehavior gun-blue-2-lightning-init-by-other gun-blue-2-lightning-tracker ((arg0 gun-blue-2-lightning-init-params)) + (set! (-> self root) (new 'process 'trsqv)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-gun-blue-2-tracker" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self lt-array) (new 'process 'boxed-array lightning-bolt (-> arg0 num-beams))) + (dotimes (v1-5 6) + (set! (-> self lt-array v1-5) (the-as lightning-bolt 0)) + ) + (dotimes (gp-1 4) + (set! (-> self lt-array gp-1) (new 'process 'lightning-bolt)) + (init! (-> self lt-array gp-1) 12 6 *blue-light-test*) + ) + (set! (-> self lt-array 4) (new 'process 'lightning-bolt)) + (init! (-> self lt-array 4) 12 5 *blue-light-test-big*) + (set! (-> self lt-array 5) (new 'process 'lightning-bolt)) + (init! (-> self lt-array 5) 12 5 *blue-light-test-big*) + (set! (-> self revolve-angle) 0.0) + (set! (-> self sway-angle) 0.0) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 107) self)) + (set! (-> self last-spark-time) 0) + (set! (-> self spark-time-interval) 0) + (set! (-> self snd-lightning) (new-sound-id)) + (set! (-> self snd-spin) (new-sound-id)) + (set! (-> self should-draw-this-frame?) #f) + (go-virtual active) + ) + +;; definition for function create-lightning-tracker-if-necessary +;; WARN: Return type mismatch int vs handle. +(defbehavior create-lightning-tracker-if-necessary target () + (the-as + handle + (when (or (not (handle->process (-> self gun gun 0 extra))) + (!= (-> (handle->process (-> self gun gun 0 extra)) type) gun-blue-2-lightning-tracker) + ) + (let ((gp-0 (new 'stack-no-clear 'gun-blue-2-lightning-init-params))) + (set! (-> gp-0 num-beams) 6) + (let ((v0-0 (ppointer->handle (process-spawn + gun-blue-2-lightning-tracker + :init gun-blue-2-lightning-init-by-other + gp-0 + :name "gun-blue-2-lightning-tracker" + :to self + :stack-size #x29400 + ) + ) + ) + ) + (set! (-> self gun gun 0 extra) (the-as handle v0-0)) + v0-0 + ) + ) + ) + ) + ) + +;; definition for function is-valid-blue-2-target +(defun is-valid-blue-2-target ((arg0 process-focusable) (arg1 int)) + (local-vars (v0-1 symbol)) + (with-pp + (when (and (!= *target* arg0) + (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) 'get-vehicle) + (and (!= (send-event-function *target* a1-1) arg0) + (not (focus-test? arg0 disable dead inactive gun-no-target)) + (or (logtest? (process-mask enemy vehicle civilian) (-> arg0 mask)) + (and (logtest? (process-mask guard) (-> arg0 mask)) (-> *setting-control* user-current gun-target-guards?)) + ) + ) + ) + ) + (let ((v1-16 (process->handle arg0))) + (dotimes (a0-11 arg1) + (if (= (-> *found-objects* a0-11) v1-16) + (return #f) + ) + ) + ) + (return #t) + ) + (return #f) + v0-1 + ) + ) + +;; definition for function find-gun-blue-2-target +;; INFO: Used lq/sq +(defun find-gun-blue-2-target ((arg0 vector) (arg1 int)) + (local-vars (sv-32 process-drawable) (sv-36 number) (sv-40 vector)) + (set! sv-32 (the-as process-drawable #f)) + (set! sv-36 4096000.0) + (let ((v1-1 (new 'stack-no-clear 'vector))) + (set! (-> v1-1 quad) (-> arg0 quad)) + (set! sv-40 v1-1) + ) + (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)) + (let* ((s2-0 (-> s4-0 s3-0)) + (a0-5 (if (type? s2-0 collide-shape) + s2-0 + ) + ) + ) + (when a0-5 + (let* ((s1-0 (-> a0-5 process)) + (s2-1 (if (type? s1-0 process-focusable) + s1-0 + ) + ) + ) + (when s2-1 + (when (is-valid-blue-2-target (the-as process-focusable s2-1) arg1) + (let* ((s1-2 (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable s2-1) 3) sv-40)) + (f0-2 (vector-normalize-ret-len! s1-2 1.0)) + ) + (when (< f0-2 (the-as float sv-36)) + (set! sv-32 s2-1) + (set! sv-36 f0-2) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (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) arg0) (-> arg0 w))) + (when (is-valid-blue-2-target s4-1 arg1) + (let* ((gp-2 (vector-! (new 'stack-no-clear 'vector) (get-trans s4-1 3) sv-40)) + (f0-4 (vector-normalize-ret-len! gp-2 1.0)) + ) + (when (< f0-4 (the-as float sv-36)) + (set! sv-32 s4-1) + (set! sv-36 f0-4) + ) + ) + ) + ) + ) + sv-32 + ) + +;; definition for function find-gun-blue-2-target-old +;; INFO: Used lq/sq +(defun find-gun-blue-2-target-old ((arg0 vector) (arg1 int) (arg2 vector)) + (local-vars (sv-32 process-drawable) (sv-36 number) (sv-40 vector)) + (set! sv-32 (the-as process-drawable #f)) + (set! sv-36 16384.0) + (let ((v1-1 (new 'stack-no-clear 'vector))) + (set! (-> v1-1 quad) (-> arg0 quad)) + (set! sv-40 v1-1) + ) + (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)) + (let* ((s1-0 (-> s3-0 s2-0)) + (a0-5 (if (type? s1-0 collide-shape) + s1-0 + ) + ) + ) + (when a0-5 + (let* ((s0-0 (-> a0-5 process)) + (s1-1 (if (type? s0-0 process-focusable) + s0-0 + ) + ) + ) + (when s1-1 + (when (is-valid-blue-2-target (the-as process-focusable s1-1) arg1) + (let* ((s0-2 (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable s1-1) 3) sv-40)) + (f0-3 (vector-normalize-ret-len! s0-2 1.0)) + (f1-1 (vector-dot s0-2 arg2)) + ) + (when (< f0-3 (the-as float sv-36)) + (when (< 0.6 f1-1) + (set! sv-32 s1-1) + (set! sv-36 f0-3) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (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) arg0) (-> arg0 w))) + (when (is-valid-blue-2-target s3-1 arg1) + (let* ((s5-2 (vector-! (new 'stack-no-clear 'vector) (get-trans s3-1 3) sv-40)) + (f0-5 (vector-normalize-ret-len! s5-2 1.0)) + (f1-4 (vector-dot s5-2 arg2)) + ) + (when (< f0-5 (the-as float sv-36)) + (when (< 0.6 f1-4) + (set! sv-32 s3-1) + (set! sv-36 f0-5) + ) + ) + ) + ) + ) + ) + sv-32 + ) + +;; definition for symbol *lightning-pts-cache*, type (inline-array vector) +(define *lightning-pts-cache* (new 'static 'inline-array vector 20 + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + (new 'static 'vector) + ) + ) + +;; definition for method 26 of type gun-blue-2-lightning-tracker +;; INFO: Used lq/sq +(defmethod gun-blue-2-lightning-tracker-method-26 ((this gun-blue-2-lightning-tracker) (arg0 vector) (arg1 vector) (arg2 gun-blue-lightning-command)) + (let ((s3-0 (new 'stack-no-clear 'collide-query)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (vector+float*! + (-> s3-0 start-pos) + arg1 + (vector-normalize-copy! (new 'stack-no-clear 'vector) arg0 1.0) + -7372.8 + ) + (vector-! (-> s3-0 move-dist) arg1 (-> s3-0 start-pos)) + (vector-float*! (-> s3-0 move-dist) (-> s3-0 move-dist) 1.2) + (let ((s2-1 s3-0)) + (set! (-> s2-1 radius) 409.6) + (set! (-> s2-1 collide-with) + (collide-spec backgnd obstacle vehicle-sphere hit-by-others-list pusher impenetrable-obj) + ) + (set! (-> s2-1 ignore-process0) (the-as process-tree (send-event *target* 'get-vehicle))) + (set! (-> s2-1 ignore-process1) #f) + (set! (-> s2-1 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> s2-1 action-mask) (collide-action solid)) + ) + (vector+! s4-0 (-> s3-0 start-pos) (-> s3-0 move-dist)) + (let ((f0-3 (fill-and-probe-using-line-sphere *collide-cache* s3-0))) + (when (>= f0-3 0.0) + (vector-float*! (-> s3-0 move-dist) (-> s3-0 move-dist) f0-3) + (vector+! s4-0 (-> s3-0 start-pos) (-> s3-0 move-dist)) + (set! (-> arg2 lightning-info terminal-spark-pos quad) (-> s4-0 quad)) + (set! (-> arg2 lightning-info num-pts) 1) + (set! (-> arg2 lightning-info pts 0 quad) (-> s4-0 quad)) + (set! (-> arg2 lightning-info should-draw-terminal-sparks?) #t) + (set! (-> arg2 lightning-info should-draw-extension?) #f) + (setup-draw! this (-> arg2 lightning-info)) + (return #f) + ) + ) + (let ((s5-1 fire-projectile-if-necessary) + (s3-1 (-> s3-0 start-pos)) + ) + (s5-1 s3-1 s4-0 (process->handle (send-event this 'get-vehicle))) + ) + ) + #t + ) + +;; definition for method 25 of type gun-blue-2-lightning-tracker +;; INFO: Used lq/sq +(defmethod gun-blue-2-lightning-tracker-method-25 ((this gun-blue-2-lightning-tracker)) + (local-vars + (sv-624 gun-info) + (sv-628 vector) + (sv-632 gun-blue-lightning-command) + (sv-640 int) + (sv-648 int) + (sv-656 (pointer int32)) + (sv-1440 symbol) + (sv-1456 collide-query) + (sv-1472 collide-query) + ) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> this prev-targ-pos)))) + (set! (-> s5-1 y) 0.0) + (dotimes (v1-1 12) + (vector+! + (the-as vector (-> *blue-2-lightning-shape* constraints v1-1)) + (the-as vector (-> *blue-2-lightning-shape* constraints v1-1)) + s5-1 + ) + ) + ) + (set! (-> this prev-targ-pos quad) (-> (target-pos 0) quad)) + (set! sv-624 (-> *target* gun)) + (set! sv-628 (-> *target* gun laser-dir)) + (set! sv-632 (new 'stack-no-clear 'gun-blue-lightning-command)) + (set! sv-640 0) + (set! sv-648 -1) + (set! sv-656 (new 'static 'array int32 12 0 0 0 0 0 0 0 0 0 0 0 0)) + (vector-normalize! sv-628 1.0) + (set! (-> *blue-2-lightning-shape* constraints 0 pt quad) (-> sv-624 fire-point quad)) + (set! (-> *blue-2-lightning-shape* constraints 0 dir quad) (-> sv-628 quad)) + (rope-constraint-method-9 *blue-2-lightning-shape* 0) + (if (zero? (-> this last-probe-index)) + (+! (-> this last-probe-index) 1) + ) + (dotimes (v1-22 12) + (set! (-> *lightning-pts-cache* v1-22 quad) (-> *blue-2-lightning-shape* constraints v1-22 pt quad)) + ) + (if (not (gun-blue-2-lightning-tracker-method-26 this sv-628 (-> sv-624 fire-point) sv-632)) + (return 0) + ) + (set! (-> sv-632 msg) (gun-blue-lightning-cmd-msg active)) + (set! (-> sv-632 lightning-info num-pts) 1) + (set! (-> sv-632 lightning-info should-draw-terminal-sparks?) #f) + (set! (-> sv-632 lightning-info should-draw-extension?) #f) + (let ((s5-3 1) + (s4-0 (+ (-> *blue-2-lightning-shape* num-knots) -1)) + ) + (while (>= (the-as int s4-0) s5-3) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> *lightning-pts-cache* s5-3 quad)) + (let ((s2-0 (the-as process-drawable #f))) + (let ((a0-19 (new 'stack-no-clear 'vector))) + (new 'stack-no-clear 'vector) + (set! (-> a0-19 quad) (-> s3-0 quad)) + (set! (-> a0-19 w) 12288.0) + (if (not (the-as symbol s2-0)) + (set! s2-0 (find-gun-blue-2-target-old + a0-19 + sv-640 + (the-as vector (+ (the-as uint (-> *blue-2-lightning-shape* constraints 0 dir)) (* 48 s5-3))) + ) + ) + ) + ) + (cond + (s2-0 + (set! (-> *found-objects* sv-640) (process->handle s2-0)) + (set! (-> *gun-blue-2-targets* s5-3 target) (process->handle s2-0)) + (set! (-> sv-656 s5-3) 1) + (set! sv-640 (+ sv-640 1)) + (set! sv-648 s5-3) + (set! (-> s3-0 quad) (-> (get-trans (the-as process-focusable s2-0) 3) quad)) + (set! (-> *lightning-pts-cache* s5-3 quad) (-> s3-0 quad)) + (vector-! + (the-as vector (+ (the-as uint (-> *blue-2-lightning-shape* constraints 0 dir)) (* 48 s5-3))) + (-> *lightning-pts-cache* s5-3) + (the-as vector (-> *blue-2-lightning-shape* constraints (+ s5-3 -1))) + ) + (vector-normalize! + (the-as vector (+ (the-as uint (-> *blue-2-lightning-shape* constraints 0 dir)) (* 48 s5-3))) + 1.0 + ) + (dotimes (v1-65 1) + ) + ) + (else + (set! (-> sv-656 s5-3) 0) + 0 + ) + ) + (let ((s0-0 s3-0) + (s1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s1-1 quad) (-> *lightning-pts-cache* (+ s5-3 -1) quad)) + (set! sv-1440 (the-as symbol #f)) + (set! sv-1456 (new 'stack-no-clear 'collide-query)) + (set! (-> sv-1456 start-pos quad) (-> s1-1 quad)) + (vector-! (-> sv-1456 move-dist) s0-0 s1-1) + (set! sv-1472 sv-1456) + (set! (-> sv-1472 radius) 860.16) + (set! (-> sv-1472 collide-with) + (collide-spec backgnd obstacle vehicle-sphere hit-by-others-list pusher impenetrable-obj) + ) + (set! (-> sv-1472 ignore-process0) (the-as process-tree (send-event *target* 'get-vehicle))) + (set! (-> sv-1472 ignore-process1) #f) + (set! (-> sv-1472 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> sv-1472 action-mask) (collide-action solid)) + (let ((f0-3 (fill-and-probe-using-line-sphere *collide-cache* sv-1456))) + (when (>= f0-3 0.0) + (vector-float*! (-> sv-1456 move-dist) (-> sv-1456 move-dist) f0-3) + (vector+! s0-0 s1-1 (-> sv-1456 move-dist)) + (set! sv-1440 #t) + (set! (-> this last-probe-index) s5-3) + (cond + ((> s5-3 0) + (let ((v0-11 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> sv-1456 move-dist) 1.0))) + (vector+float*! (-> sv-632 lightning-info terminal-spark-pos) s0-0 v0-11 -6144.0) + ) + ) + (else + (set! (-> sv-632 lightning-info terminal-spark-pos quad) (-> s0-0 quad)) + ) + ) + ) + ) + (when (not s2-0) + ) + (set! (-> *lightning-pts-cache* s5-3 quad) (-> s3-0 quad)) + (+! (-> sv-632 lightning-info num-pts) 1) + (let ((s3-1 fire-projectile-if-necessary) + (a2-13 (if (< 1 sv-640) + (the-as int (-> *found-objects* (+ sv-640 -2))) + (process->handle (send-event this 'get-vehicle)) + ) + ) + ) + (s3-1 s1-1 s0-0 (the-as handle a2-13)) + ) + ) + ) + ) + (when sv-1440 + (set! (-> sv-632 lightning-info should-draw-terminal-sparks?) #t) + (set! (-> sv-632 lightning-info should-draw-extension?) #f) + 0 + (goto cfg-54) + ) + (+! s5-3 1) + ) + ) + (label cfg-54) + (if (and (= sv-648 (+ (-> sv-632 lightning-info num-pts) -2)) + (not (-> sv-632 lightning-info should-draw-extension?)) + ) + (set! (-> sv-632 lightning-info should-draw-terminal-sparks?) #f) + ) + (dotimes (s5-4 (-> sv-632 lightning-info num-pts)) + (set! (-> sv-632 lightning-info pts s5-4 quad) (-> *lightning-pts-cache* s5-4 quad)) + (when (and (> s5-4 0) (zero? (-> sv-656 s5-4))) + (let ((s4-1 + (matrix-f-u-compose + (new 'stack-no-clear 'matrix) + (the-as vector (+ (the-as uint (-> *blue-2-lightning-shape* constraints 0 dir)) (* 48 s5-4))) + *up-vector* + ) + ) + (f0-9 (the float (sar (shl (the int (+ (-> this revolve-angle) (* 6144.0 (the float s5-4)))) 48) 48))) + (s3-2 (-> sv-632 lightning-info pts s5-4)) + ) + (the float (sar (shl (the int (+ (-> this sway-angle) (* 5461.3335 (the float s5-4)))) 48) 48)) + (vector-rotate-around-axis! + (-> s4-1 uvec) + (the-as quaternion (-> s4-1 uvec)) + f0-9 + (the-as vector (+ (the-as uint (-> *blue-2-lightning-shape* constraints 0 dir)) (* 48 s5-4))) + ) + (vector-normalize! (-> s4-1 uvec) 1.0) + (vector+float*! s3-2 s3-2 (-> s4-1 uvec) 2048.0) + ) + ) + ) + (setup-draw! this (-> sv-632 lightning-info)) + ) + +;; definition for function gun-fire-blue-2 +;; WARN: Return type mismatch int vs object. +(defbehavior gun-fire-blue-2 target () + (if (and (-> *target* next-state) (= (-> *target* next-state name) 'target-attack-air)) + (return (the-as object 0)) + ) + (create-lightning-tracker-if-necessary) + (let ((v1-8 (new 'stack-no-clear 'gun-blue-lightning-command))) + (set! (-> v1-8 msg) (gun-blue-lightning-cmd-msg active)) + (send-event (handle->process (-> self gun gun 0 extra)) 'gun-blue-lightning v1-8) + ) + 0 + ) + +;; definition for function gun-fire-blue-2-old +;; INFO: Used lq/sq +(defbehavior gun-fire-blue-2-old target () + (local-vars + (sv-608 gun-info) + (sv-612 vector) + (sv-616 gun-blue-lightning-command) + (sv-768 vector) + (sv-772 vector) + (sv-776 vector) + (sv-784 int) + (sv-792 int) + (sv-800 vector) + (sv-848 vector) + (sv-852 vector) + ) + (create-lightning-tracker-if-necessary) + (set! sv-608 (-> self gun)) + (set! sv-612 (-> self gun fire-dir-out)) + (set! sv-616 (new 'stack-no-clear 'gun-blue-lightning-command)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.1)) + (set! (-> sv-616 msg) (gun-blue-lightning-cmd-msg active)) + (set! (-> sv-616 lightning-info num-pts) 0) + (set! (-> sv-616 lightning-info should-draw-terminal-sparks?) #f) + (set! (-> sv-616 lightning-info should-draw-extension?) #t) + (vector-normalize! sv-612 1.0) + (when (not (do-fire-backcheck (-> sv-608 fire-point) sv-612)) + (let ((a0-5 (handle->process (-> sv-608 gun 0 extra)))) + (send-event a0-5 'gun-blue-lightning sv-616) + ) + (return 0) + ) + (let ((v1-23 (new 'stack-no-clear 'vector))) + (set! (-> v1-23 quad) (-> sv-608 fire-point quad)) + (set! sv-768 v1-23) + ) + (set! sv-772 (vector+float*! (new 'stack-no-clear 'vector) (-> sv-608 fire-point) sv-612 409600.0)) + (let ((v1-26 (new 'stack-no-clear 'vector))) + (set! (-> v1-26 quad) (-> sv-612 quad)) + (set! sv-776 v1-26) + ) + (set! sv-784 0) + (set! sv-792 -1) + (set! sv-800 (new 'stack-no-clear 'vector)) + (set! (-> sv-616 lightning-info pts (-> sv-616 lightning-info num-pts) quad) (-> sv-768 quad)) + (+! (-> sv-616 lightning-info num-pts) 1) + (vector-! sv-800 sv-772 sv-768) + (dotimes (gp-0 8) + (let ((f30-0 32768.0)) + (set! sv-848 (new 'stack-no-clear 'vector)) + (set! sv-852 (vector+float*! (new 'stack-no-clear 'vector) sv-768 sv-612 f30-0)) + (set! (-> sv-848 quad) (-> sv-852 quad)) + (set! (-> sv-848 w) 20480.0) + (let ((s5-0 (the-as process #f))) + (let ((s4-0 #f)) + (when (< gp-0 7) + (when (and (handle->process (-> *gun-blue-2-targets* gp-0 target)) + (not (time-elapsed? (-> *gun-blue-2-targets* gp-0 start-time) (seconds 0.5))) + ) + (let* ((s2-0 (handle->process (-> *gun-blue-2-targets* gp-0 target))) + (s3-0 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (when (is-valid-blue-2-target (the-as process-focusable s3-0) sv-784) + (let ((s2-2 (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable s3-0) 3) sv-852))) + (vector-normalize-ret-len! s2-2 1.0) + (let ((f0-5 (vector-dot s2-2 sv-776))) + (when (< 0.87 f0-5) + (set! s4-0 #t) + (set! s5-0 s3-0) + ) + ) + ) + ) + ) + ) + (when (not s4-0) + (set! (-> *gun-blue-2-targets* gp-0 target) (the-as handle #f)) + (set-time! (-> *gun-blue-2-targets* gp-0 start-time)) + ) + (if (not s5-0) + (set! s5-0 (find-gun-blue-2-target-old sv-848 sv-784 sv-776)) + ) + ) + ) + (cond + (s5-0 + (set! (-> *found-objects* sv-784) (process->handle s5-0)) + (set! (-> *gun-blue-2-targets* gp-0 target) (process->handle s5-0)) + (set! sv-784 (+ sv-784 1)) + (set! sv-792 gp-0) + (vector-! sv-800 (get-trans (the-as process-focusable s5-0) 3) sv-768) + (vector-normalize! sv-800 1.0) + ) + (else + (vector-normalize! sv-800 1.0) + (let ((f0-7 (vector-dot sv-800 sv-776))) + (when (< f0-7 0.866) + (let ((s5-1 (new 'stack-no-clear 'vector)) + (f28-0 0.0) + ) + (acos f0-7) + 5461.3335 + (vector-cross! s5-1 sv-800 sv-776) + (vector-normalize! s5-1 1.0) + (vector-rotate-around-axis! sv-800 (the-as quaternion sv-776) f28-0 s5-1) + ) + ) + ) + (vector-normalize! sv-800 1.0) + ) + ) + ) + (set! (-> sv-776 quad) (-> sv-800 quad)) + (let ((s5-3 (vector+float*! (new 'stack-no-clear 'vector) sv-768 sv-800 f30-0))) + (let ((s4-3 #f)) + (let ((s3-1 (new 'stack-no-clear 'collide-query))) + (set! (-> s3-1 start-pos quad) (-> sv-768 quad)) + (vector-! (-> s3-1 move-dist) s5-3 sv-768) + (let ((v1-99 s3-1)) + (set! (-> v1-99 radius) 40.96) + (set! (-> v1-99 collide-with) + (collide-spec backgnd vehicle-sphere hit-by-others-list pusher impenetrable-obj) + ) + (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-11 (fill-and-probe-using-line-sphere *collide-cache* s3-1))) + (when (>= f0-11 0.0) + (vector-float*! (-> s3-1 move-dist) (-> s3-1 move-dist) f0-11) + (vector+! s5-3 sv-768 (-> s3-1 move-dist)) + (set! s4-3 #t) + (cond + ((> gp-0 0) + (let ((a0-80 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s3-1 move-dist) 1.0))) + (vector+float*! (-> sv-616 lightning-info terminal-spark-pos) s5-3 a0-80 -12288.0) + ) + ) + (else + (set! (-> sv-616 lightning-info terminal-spark-pos quad) (-> s5-3 quad)) + ) + ) + ) + ) + ) + (set! (-> sv-616 lightning-info pts (-> sv-616 lightning-info num-pts) quad) (-> s5-3 quad)) + (+! (-> sv-616 lightning-info num-pts) 1) + (let ((s3-2 fire-projectile-if-necessary) + (s2-3 sv-768) + (s1-0 s5-3) + (a2-7 (if (< 1 sv-784) + (the-as int (-> *found-objects* (+ sv-784 -2))) + (process->handle (send-event self 'get-vehicle)) + ) + ) + ) + (s3-2 s2-3 s1-0 (the-as handle a2-7)) + ) + (set! (-> sv-768 quad) (-> s5-3 quad)) + (when s4-3 + (set! (-> sv-616 lightning-info should-draw-terminal-sparks?) #t) + (set! (-> sv-616 lightning-info should-draw-extension?) #f) + 0 + (goto cfg-70) + ) + ) + (set! (-> sv-616 lightning-info terminal-spark-pos quad) (-> s5-3 quad)) + ) + ) + ) + (label cfg-70) + (if (and (= sv-792 (+ (-> sv-616 lightning-info num-pts) -2)) + (not (-> sv-616 lightning-info should-draw-extension?)) + ) + (set! (-> sv-616 lightning-info should-draw-terminal-sparks?) #f) + ) + (let ((s5-4 (-> sv-616 lightning-info pts (+ (-> sv-616 lightning-info num-pts) -1)))) + (when (-> sv-616 lightning-info should-draw-extension?) + (let ((gp-2 (vector+float*! (new 'stack-no-clear 'vector) s5-4 sv-800 409600.0)) + (s4-4 (new 'stack-no-clear 'collide-query)) + ) + (set! (-> s4-4 start-pos quad) (-> s5-4 quad)) + (vector-! (-> s4-4 move-dist) gp-2 s5-4) + (let ((v1-154 s4-4)) + (set! (-> v1-154 radius) 40.96) + (set! (-> v1-154 collide-with) + (collide-spec backgnd vehicle-sphere hit-by-others-list pusher impenetrable-obj) + ) + (set! (-> v1-154 ignore-process0) #f) + (set! (-> v1-154 ignore-process1) #f) + (set! (-> v1-154 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-154 action-mask) (collide-action solid)) + ) + (let ((f0-15 (fill-and-probe-using-line-sphere *collide-cache* s4-4))) + (when (>= f0-15 0.0) + (vector-float*! (-> s4-4 move-dist) (-> s4-4 move-dist) f0-15) + (vector+! gp-2 s5-4 (-> s4-4 move-dist)) + ) + ) + (set! (-> sv-616 lightning-info extension-end-point quad) (-> gp-2 quad)) + (set! (-> sv-616 lightning-info should-draw-terminal-sparks?) #t) + (let ((a0-122 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s4-4 move-dist) 1.0))) + (vector+float*! (-> sv-616 lightning-info terminal-spark-pos) gp-2 a0-122 -12288.0) + ) + ) + ) + ) + (let ((a0-124 (handle->process (-> sv-608 gun 0 extra)))) + (send-event a0-124 'gun-blue-lightning sv-616) + ) + ) + +;; definition for function target-gun-can-fire-blue? +(defbehavior target-gun-can-fire-blue? target ((arg0 pickup-type)) + #t + ) + +;; definition for symbol *last-fire-blue-time*, type time-frame +(define *last-fire-blue-time* (the-as time-frame 0)) + +;; definition for function target-gun-fire-blue +;; WARN: Return type mismatch object vs (pointer process). +(defbehavior target-gun-fire-blue target ((arg0 pickup-type)) + (the-as (pointer process) (case arg0 + (((pickup-type gun-blue-1)) + (gun-fire-blue-1) + ) + (((pickup-type gun-blue-2)) + (gun-fire-blue-2) + ) + (((pickup-type gun-blue-3)) + (let ((f0-0 -2.0)) + (if (logtest? (game-secrets gun-upgrade-blue-3) (-> *game-info* secrets)) + (set! f0-0 -1.5) + ) + (adjust-player-ammo f0-0 (pickup-type ammo-blue)) + ) + (when (time-elapsed? *last-fire-blue-time* (seconds 0.1)) + (sound-play "blue-gun3-shot") + (set! *last-fire-blue-time* (current-time)) + ) + (sound-play "blue-gun3-trace") + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 127 (seconds 0.1)) + (dotimes (s5-2 3) + (gun-fire-blue-3) + ) + #f + ) + ) + ) + ) + +;; definition of type gun-blue-shot +(deftype gun-blue-shot (projectile) + ((init-pos vector :inline) + (init-dir vector :inline) + (collide-normal vector :inline) + ) + ) + +;; definition for method 3 of type gun-blue-shot +(defmethod inspect ((this gun-blue-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 of type gun-blue-shot-2 +(deftype gun-blue-shot-2 (gun-blue-shot) + () + ) + +;; definition for method 3 of type gun-blue-shot-2 +(defmethod inspect ((this gun-blue-shot-2)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type gun-blue-shot inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 14) (new 'static 'lightning-spec + :name "lightning-blue-2-impact-shot-attack-thick" + :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 1.0 + :fade-time 30.0 + :texture (new 'static 'texture-id :index #x3f :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 8192.0 + :merge-factor 0.6 + :merge-count 2 + :radius 3276.8 + :duration 60.0 + :sound (static-sound-spec "stretched-zap" :group 0) + ) + ) + +;; definition for method 37 of type gun-blue-shot-2 +(defmethod deal-damage! ((this gun-blue-shot-2) (arg0 process) (arg1 event-message-block)) + (if (and (logtest? (process-mask guard) (-> arg0 mask)) + (not (-> *setting-control* user-current gun-target-guards?)) + ) + (set! (-> this damage) 0.0) + ) + (when (logtest? (game-secrets gun-upgrade-blue-2) (-> *game-info* secrets)) + (if (logtest? (process-mask kg-robot) (-> arg0 mask)) + (set! (-> this damage) (* 2.0 (-> this damage))) + ) + ) + (if (< (mod (the-as int (rand-uint31-gen *random-generator*)) 11) 2) + (process-drawable-shock-effect + (the-as process-drawable arg0) + (-> *lightning-spec-id-table* 12) + lightning-probe-callback + (-> *part-id-table* 664) + 0 + 0 + 40960.0 + ) + ) + (call-parent-method this arg0 arg1) + ) + +;; definition for method 24 of type gun-blue-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-24 ((this gun-blue-shot)) + (with-pp + (let* ((s4-0 (-> *part-id-table* 236)) + (s3-0 (get-field-spec-by-id s4-0 (sp-field-id spt-omega))) + (a1-1 (new 'stack-no-clear 'event-message-block)) + ) + (set! (-> a1-1 from) (process->ppointer pp)) + (set! (-> a1-1 num-params) 1) + (set! (-> a1-1 message) 'eject-point) + (set! (-> a1-1 param 0) (the-as uint (new 'stack-no-clear 'vector))) + (let ((s5-0 (the-as vector (send-event-function (ppointer->process (-> this parent)) a1-1)))) + (when s5-0 + (when s3-0 + (let ((s1-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this starting-dir) 1.0)) + (s2-0 (new 'stack-no-clear 'collide-query)) + ) + (vector-rotate-y! s1-0 s1-0 16384.0) + (vector+float*! s1-0 s5-0 s1-0 -8806.4) + (set! (-> s2-0 start-pos quad) (-> s1-0 quad)) + (vector-float*! (-> s2-0 move-dist) (-> this root dynam gravity-normal) -81920.0) + (let ((v1-15 s2-0)) + (set! (-> v1-15 radius) 1228.8) + (set! (-> v1-15 collide-with) (collide-spec backgnd obstacle hit-by-player-list hit-by-others-list)) + (set! (-> v1-15 ignore-process0) this) + (set! (-> v1-15 ignore-process1) (ppointer->process (-> this parent))) + (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)) + ) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* s2-0) 0.0) + (set! (-> s3-0 initial-valuef) + (fmin (+ 1638.4 (-> s2-0 best-other-tri intersect y)) (+ -1228.8 (-> this starting-pos y))) + ) + (set! (-> s3-0 initial-valuef) (+ -81920.0 (-> this starting-pos y))) + ) + ) + ) + (let ((s4-1 (get-field-spec-by-id s4-0 (sp-field-id spt-rotate-y)))) + (if s4-1 + (set! (-> s4-1 initial-valuef) (y-angle (-> this root))) + ) + ) + (launch-particles (-> *part-id-table* 236) s5-0) + (let ((s4-2 (get-field-spec-by-id (-> *part-id-table* 235) (sp-field-id spt-rotate-y)))) + (if s4-2 + (set! (-> s4-2 initial-valuef) (y-angle (-> this root))) + ) + ) + (launch-particles (-> *part-id-table* 235) s5-0) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 26 of type gun-blue-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this gun-blue-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* 231) (-> this init-pos) s3-1 #t) + (draw-beam (-> *part-id-table* 234) (-> this init-pos) (-> this starting-dir) #f) + (let ((s5-0 (-> *part-id-table* 246)) + (s4-0 (-> *part-id-table* 245)) + ) + (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) + ) + ) + ) + ) + (let ((v1-24 (cond + ((logtest? (-> *part-group-id-table* 90 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* 90)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 90)) + ) + ) + ) + ) + (send-event (ppointer->process v1-24) 'clock this) + ) + 0 + (none) + ) + ) + +;; definition for method 37 of type gun-blue-shot +(defmethod deal-damage! ((this gun-blue-shot) (arg0 process) (arg1 event-message-block)) + (if (and (logtest? (process-mask guard) (-> arg0 mask)) + (not (-> *setting-control* user-current gun-target-guards?)) + ) + (set! (-> this damage) 0.0) + ) + (+! (-> *game-info* shots-hit 2) 1.0) + (call-parent-method this arg0 arg1) + ) + +;; definition for method 27 of type gun-blue-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-27 ((this gun-blue-shot)) + (draw-beam (-> *part-id-table* 231) (-> this init-pos) (-> this init-dir) #f) + (draw-beam (-> *part-id-table* 234) (-> this init-pos) (-> this starting-dir) #f) + 0 + (none) + ) + +;; definition for method 28 of type gun-blue-shot +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this gun-blue-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "blue-shot-fire") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "blue-shot-hit") + ) + ) + ) + (none) + ) + +;; definition for method 38 of type gun-blue-shot +(defmethod made-impact? ((this gun-blue-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) -12288.0 12697.6 -2048.0 t1-0) + ) + ) + +;; definition for function gun-blue-shot-move +;; WARN: Return type mismatch int vs none. +(defun gun-blue-shot-move ((arg0 gun-blue-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 function cshape-reaction-blue-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs collide-status. +(defun cshape-reaction-blue-shot ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector)) + (vector-reset! arg2) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (vector-float*! a1-1 (-> arg1 move-dist) (-> arg1 best-dist)) + (move-by-vector! arg0 a1-1) + ) + (set! (-> (the-as gun-blue-shot (-> arg0 process)) collide-normal quad) (-> arg1 best-other-tri normal quad)) + (let ((v0-1 4)) + (logior! (-> arg0 status) v0-1) + (the-as collide-status v0-1) + ) + ) + +;; definition for method 30 of type gun-blue-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this gun-blue-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-blue-shot) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate jak-blue-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 gun-blue-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this gun-blue-shot)) + (with-pp + (+! (-> *game-info* shots-fired 2) 1.0) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + (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) (* 327680.0 (-> pp clock frames-per-second))) + (set! (-> this attack-mode) 'eco-blue) + (set! (-> this max-speed) (* 327680.0 (-> pp clock frames-per-second))) + (set! (-> this timeout) 1) + (set! (-> this move) gun-blue-shot-move) + (vector-reset! (-> this collide-normal)) + (set! (-> this damage) 2.0) + (if (logtest? (game-secrets gun-upgrade-blue-1) (-> *game-info* secrets)) + (set! (-> this damage) 2.5) + ) + (logior! (-> this options) (projectile-options po13)) + 0 + (none) + ) + ) + +;; definition for method 31 of type gun-blue-shot-2 +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this gun-blue-shot-2)) + (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) (* 327680.0 (-> pp clock frames-per-second))) + (set! (-> this attack-mode) 'eco-blue) + (set! (-> this max-speed) (* 327680.0 (-> pp clock frames-per-second))) + (set! (-> this timeout) 1) + (set! (-> this move) gun-blue-shot-move) + (vector-reset! (-> this collide-normal)) + (set! (-> this damage) 2.5) + (set! (-> this vehicle-damage-factor) 2.0) + (set! (-> this vehicle-impulse-factor) 0.5) + (logior! (-> this options) (projectile-options po13)) + (set! (-> this sound-id) (new-sound-id)) + 0 + (none) + ) + ) + +;; definition for method 24 of type gun-blue-shot-2 +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-24 ((this gun-blue-shot-2)) + 0 + (none) + ) + +;; definition for method 27 of type gun-blue-shot-2 +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-27 ((this gun-blue-shot-2)) + 0 + (none) + ) + +;; definition for method 25 of type gun-blue-shot-2 +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this gun-blue-shot-2)) + 0 + (none) + ) + +;; definition for method 26 of type gun-blue-shot-3 +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this gun-blue-shot-3)) + (let ((s5-0 sphere-in-view-frustum?) + (a0-2 (new 'stack 'sphere)) + ) + (set! (-> a0-2 quad) (-> this root trans quad)) + (set! (-> a0-2 r) 4096.0) + (when (s5-0 a0-2) + (let ((v1-11 + (cond + ((logtest? (-> *part-group-id-table* 108 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* 108)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 108)) + ) + ) + ) + ) + (send-event (ppointer->process v1-11) 'clock this) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate dissipate (gun-blue-shot-3) + :virtual #t + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (suspend) + ) + ) + (go-virtual die) + ) + ) + +;; failed to figure out what this is: +(defstate impact (gun-blue-shot-3) + :virtual #t + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.5)) + (suspend) + ) + ) + (go-virtual die) + ) + ) + +;; definition for method 37 of type gun-blue-shot-3 +(defmethod deal-damage! ((this gun-blue-shot-3) (arg0 process) (arg1 event-message-block)) + (+! (-> *game-info* shots-hit 2) 1.0) + (if (and (logtest? (process-mask guard) (-> arg0 mask)) + (not (-> *setting-control* user-current gun-target-guards?)) + ) + (set! (-> this damage) 0.0) + ) + (call-parent-method this arg0 arg1) + ) + +;; definition for method 26 of type gun-blue-shot-2 +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this gun-blue-shot-2)) + 0 + (none) + ) 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 new file mode 100644 index 0000000000..d2d4ff9c71 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-dark-shot_REF.gc @@ -0,0 +1,4100 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 15) (new 'static 'lightning-spec + :name "lightning-dark-shot-attack" + :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 1.0 + :fade-time 30.0 + :texture (new 'static 'texture-id :index #x8f :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 8192.0 + :merge-factor 0.6 + :merge-count 2 + :radius 3276.8 + :duration 45.0 + :duration-rand 60.0 + :sound (static-sound-spec "stretched-zap" :group 0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 16) (new 'static 'lightning-spec + :name "lightning-dark-shot-attack-thick" + :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 1.0 + :fade-time 30.0 + :texture (new 'static 'texture-id :index #x3f :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 8192.0 + :merge-factor 0.6 + :merge-count 2 + :radius 3276.8 + :duration 60.0 + :sound (static-sound-spec "stretched-zap" :group 0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-lightning-dark-shot-tip-hit + :id 183 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 664)) + ) + +;; failed to figure out what this is: +(defpart 664 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0 3.0) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 0.0 64.0) + (:g 64.0 64.0) + (:b 255.0) + (:a 255.0) + (:vel-z (meters 0.016666668) (meters 0.006666667)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.7) + (:friction 0.99) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-lightning-2d-spline-align-plus-rotz) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 665 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 4)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0 64.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 glow)) + (:userdata 4096.0) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-z (degrees 0) (degrees 3600)) + (:conerot-radius (meters -0.1) (meters 0.5)) + ) + ) + +;; definition for function sparticle-lightning-2d-spline-align-plus-rotz +;; WARN: Return type mismatch float vs none. +(defun sparticle-lightning-2d-spline-align-plus-rotz ((arg0 object) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d) (arg3 object)) + (sparticle-2d-spline-align-instant arg0 arg1 arg2) + (+! (-> arg2 flag-rot-sy z) (-> *part-id-table* 664 init-specs 4 initial-valuef)) + (none) + ) + +;; definition of type gun-dark-shot +(deftype gun-dark-shot (projectile) + ((blast-radius float) + (core-position vector :inline) + (core-velocity vector :inline) + (spin-vector vector :inline) + (track-target handle) + (size-t float) + (result-array handle 16) + (result-count int8) + (charge-sound sound-id) + (fire-sound sound-id) + (trail-sound sound-id) + (explode-sound sound-id) + (start-pilot? symbol) + (spread-timer time-frame) + ) + (:state-methods + startup + fizzle + ) + ) + +;; definition for method 3 of type gun-dark-shot +(defmethod inspect ((this gun-dark-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (format #t "~2Tblast-radius: ~f~%" (-> this blast-radius)) + (format #t "~2Tcore-position: #~%" (-> this core-position)) + (format #t "~2Tcore-velocity: #~%" (-> this core-velocity)) + (format #t "~2Tspin-vector: #~%" (-> this spin-vector)) + (format #t "~2Ttrack-target: ~D~%" (-> this track-target)) + (format #t "~2Tsize-t: ~f~%" (-> this size-t)) + (format #t "~2Tresult-array[16] @ #x~X~%" (-> this result-array)) + (format #t "~2Tresult-count: ~D~%" (-> this result-count)) + (format #t "~2Tcharge-sound: ~D~%" (-> this charge-sound)) + (format #t "~2Tfire-sound: ~D~%" (-> this fire-sound)) + (format #t "~2Ttrail-sound: ~D~%" (-> this trail-sound)) + (format #t "~2Texplode-sound: ~D~%" (-> this explode-sound)) + (format #t "~2Tstart-pilot?: ~A~%" (-> this start-pilot?)) + (format #t "~2Tspread-timer: ~D~%" (-> this spread-timer)) + (label cfg-4) + this + ) + +;; definition for function gun-fire-dark-1 +;; INFO: Used lq/sq +(defbehavior gun-fire-dark-1 target () + (set-last-fire-time 35) + (let ((s5-0 (-> self gun)) + (gp-0 (new 'stack-no-clear 'projectile-init-by-other-params)) + ) + (set! (-> gp-0 ent) (-> self entity)) + (set! (-> gp-0 charge) (-> s5-0 fire-charge)) + (set! (-> gp-0 options) (projectile-options)) + (logclear! (-> gp-0 options) (projectile-options po14 po15 po16)) + (set! (-> gp-0 pos quad) (-> s5-0 fire-point quad)) + (set! (-> gp-0 vel quad) (-> s5-0 fire-dir-out 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 (send-event self 'get-vehicle))) + (let* ((v1-11 *game-info*) + (a0-13 (+ (-> v1-11 attack-id) 1)) + ) + (set! (-> v1-11 attack-id) a0-13) + (set! (-> gp-0 attack-id) a0-13) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (let ((v0-2 (spawn-projectile gun-dark-shot gp-0 (ppointer->process (-> s5-0 gun)) *default-dead-pool*))) + (if v0-2 + (set! (-> self gun charge-active?) (ppointer->handle v0-2)) + ) + v0-2 + ) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-gun-dark-3-sphere gun gun-nuke-sphere-lod0-jg gun-nuke-sphere-idle-ja + ((gun-nuke-sphere-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 30) + :texture-level 10 + :sort 4 + ) + +;; definition of type gun-dark-3-sphere +(deftype gun-dark-3-sphere (process-drawable) + ((alpha-val float) + ) + (:state-methods + active + ) + ) + +;; definition for method 3 of type gun-dark-3-sphere +(defmethod inspect ((this gun-dark-3-sphere)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Talpha-val: ~f~%" (-> this alpha-val)) + (label cfg-4) + this + ) + +;; definition of type gun-dark-3-sphere-init-params +(deftype gun-dark-3-sphere-init-params (structure) + ((pos vector :inline) + (size-x float) + (size-y float) + (alpha-val float) + ) + ) + +;; definition for method 3 of type gun-dark-3-sphere-init-params +(defmethod inspect ((this gun-dark-3-sphere-init-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'gun-dark-3-sphere-init-params) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tsize-x: ~f~%" (-> this size-x)) + (format #t "~1Tsize-y: ~f~%" (-> this size-y)) + (format #t "~1Talpha-val: ~f~%" (-> this alpha-val)) + (label cfg-4) + this + ) + +;; definition for function gun-dark-3-sphere-init-by-other +;; INFO: Used lq/sq +(defbehavior gun-dark-3-sphere-init-by-other gun-dark-3-sphere ((arg0 gun-dark-3-sphere-init-params)) + (set! (-> self root) (new 'process 'trsqv)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-gun-dark-3-sphere" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self root trans quad) (-> arg0 pos quad)) + (quaternion-identity! (-> self root quat)) + (set-vector! + (-> self root scale) + (* 0.00024414062 (-> arg0 size-x)) + (* 0.00024414062 (-> arg0 size-y)) + 1.0 + 1.0 + ) + (go-virtual active) + ) + +;; failed to figure out what this is: +(defstate active (gun-dark-3-sphere) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('set-pos-and-size) + (let ((v1-2 (the-as gun-dark-3-sphere-init-params (-> block param 0)))) + (set! (-> self root trans quad) (-> v1-2 pos quad)) + (set-vector! + (-> self root scale) + (* 0.00024414062 (-> v1-2 size-x)) + (* 0.00024414062 (-> v1-2 size-y)) + 1.0 + 1.0 + ) + (vector-float*! (-> self root scale) (-> self root scale) 1.7) + (set! (-> self alpha-val) (-> v1-2 alpha-val)) + ) + ) + ) + #t + ) + :enter (behavior () + (set-time! (-> self state-time)) + (ja-channel-push! 1 0) + (ja :group! gun-nuke-sphere-fade-ja :num! zero) + (set! (-> self alpha-val) 1.0) + ) + :trans (behavior () + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (math-camera-pos)))) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (vector-float*! s5-1 s5-1 -1.0) + (matrix-fu-compose gp-0 s5-1 *up-vector*) + ) + (matrix->quat gp-0 (-> self root quat)) + ) + (ja :group! gun-nuke-sphere-fade-ja :num! (identity (- 1.0 (-> self alpha-val)))) + ) + :code sleep-code + :post (behavior () + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-gun-dark-3-nuke gun gun-nuke-lod0-jg gun-nuke-idle-ja + ((gun-nuke-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3) + :texture-level 10 + ) + +;; definition of type last-active-nuke-info +(deftype last-active-nuke-info (structure) + ((last-active-nuke handle) + ) + ) + +;; definition for method 3 of type last-active-nuke-info +(defmethod inspect ((this last-active-nuke-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'last-active-nuke-info) + (format #t "~1Tlast-active-nuke: ~D~%" (-> this last-active-nuke)) + (label cfg-4) + this + ) + +;; definition for symbol *last-active-nuke*, type last-active-nuke-info +(define *last-active-nuke* (new 'static 'last-active-nuke-info)) + +;; failed to figure out what this is: +(set! (-> *last-active-nuke* last-active-nuke) (the-as handle #f)) + +;; definition of type gun-dark-3-nuke +(deftype gun-dark-3-nuke (projectile) + ((flash-time time-frame) + (blur-time time-frame) + (spawned-mushroom-cloud? symbol) + (strip prim-strip) + (mushroom-top-pos vector :inline) + (warp handle) + (initial-velocity vector :inline) + (start-y float) + (y-vel-adjust float) + (launch-speed float) + (launch-sin-region-start float) + (launch-sin-region-end float) + (launch-stay-state-time time-frame) + (launch-next-state (state gun-dark-3-nuke)) + (launch-impact-state (state gun-dark-3-nuke)) + (launch-y-scale float) + (launch-height-t float) + (expected-height float) + (total-fly-time time-frame) + (num-dying-vehicles uint8) + (num-dying-guards uint8) + (num-dying-civilians uint8) + (last-death-sound-play-time time-frame) + (blur-curve curve2d-piecewise) + (fade-curve curve-color-piecewise) + (num-blur-segments uint8) + (shook-camera? symbol) + (hit-wall? symbol) + (killed-everything? symbol :offset 696) + (explode-sound sound-id) + (explode-wall-sound sound-id) + (played-trail? symbol) + (smoke-trail sparticle-subsampler) + (killed-objects handle 64) + (num-killed-objects int32) + (last-kill-time time-frame) + ) + (:state-methods + undefined + launching-base-state + launch-0 + launch-1 + launch-2 + launch-3 + impact-small + impact-dud + impact-embedded + wait-for-alive + ) + (:methods + (set-launch-height! (_type_) none) + (do-blur-effect (_type_) none) + (do-white-screen-effect (_type_) none) + (count-casualties (_type_) none) + (send-attack! (_type_ process-focusable) none) + (play-death-sounds (_type_) none) + (do-camera-shake (_type_) none) + (do-vibration (_type_) none) + (check-for-impact (_type_) none) + ) + ) + +;; definition for method 3 of type gun-dark-3-nuke +(defmethod inspect ((this gun-dark-3-nuke)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (format #t "~2Tflash-time: ~D~%" (-> this flash-time)) + (format #t "~2Tblur-time: ~D~%" (-> this blur-time)) + (format #t "~2Tspawned-mushroom-cloud?: ~A~%" (-> this spawned-mushroom-cloud?)) + (format #t "~2Tstrip: ~A~%" (-> this strip)) + (format #t "~2Tmushroom-top-pos: #~%" (-> this mushroom-top-pos)) + (format #t "~2Twarp: ~D~%" (-> this warp)) + (format #t "~2Tinitial-velocity: #~%" (-> this initial-velocity)) + (format #t "~2Tstart-y: ~f~%" (-> this start-y)) + (format #t "~2Ty-vel-adjust: ~f~%" (-> this y-vel-adjust)) + (format #t "~2Tlaunch-speed: ~f~%" (-> this launch-speed)) + (format #t "~2Tlaunch-sin-region-start: ~f~%" (-> this launch-sin-region-start)) + (format #t "~2Tlaunch-sin-region-end: ~f~%" (-> this launch-sin-region-end)) + (format #t "~2Tlaunch-stay-state-time: ~D~%" (-> this launch-stay-state-time)) + (format #t "~2Tlaunch-next-state: ~A~%" (-> this launch-next-state)) + (format #t "~2Tlaunch-impact-state: ~A~%" (-> this launch-impact-state)) + (format #t "~2Tlaunch-y-scale: ~f~%" (-> this launch-y-scale)) + (format #t "~2Tlaunch-height-t: ~f~%" (-> this launch-height-t)) + (format #t "~2Texpected-height: ~f~%" (-> this expected-height)) + (format #t "~2Ttotal-fly-time: ~D~%" (-> this total-fly-time)) + (format #t "~2Tnum-dying-vehicles: ~D~%" (-> this num-dying-vehicles)) + (format #t "~2Tnum-dying-guards: ~D~%" (-> this num-dying-guards)) + (format #t "~2Tnum-dying-civilians: ~D~%" (-> this num-dying-civilians)) + (format #t "~2Tlast-death-sound-play-time: ~D~%" (-> this last-death-sound-play-time)) + (format #t "~2Tblur-curve: ~A~%" (-> this blur-curve)) + (format #t "~2Tfade-curve: ~A~%" (-> this fade-curve)) + (format #t "~2Tnum-blur-segments: ~D~%" (-> this num-blur-segments)) + (format #t "~2Tshook-camera?: ~A~%" (-> this shook-camera?)) + (format #t "~2Thit-wall?: ~A~%" (-> this hit-wall?)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Tkilled-everything?: ~A~%" (-> this killed-everything?)) + (format #t "~2Texplode-sound: ~D~%" (-> this explode-sound)) + (format #t "~2Texplode-wall-sound: ~D~%" (-> this explode-wall-sound)) + (format #t "~2Tplayed-trail?: ~A~%" (-> this played-trail?)) + (format #t "~2Tsmoke-trail: ~A~%" (-> this smoke-trail)) + (format #t "~2Tkilled-objects[64] @ #x~X~%" (-> this killed-objects)) + (format #t "~2Tnum-killed-objects: ~D~%" (-> this num-killed-objects)) + (format #t "~2Tlast-kill-time: ~D~%" (-> this last-kill-time)) + (label cfg-4) + this + ) + +;; definition for method 25 of type gun-dark-3-nuke +;; INFO: Used lq/sq +;; WARN: Return type mismatch matrix vs none. +(defmethod projectile-method-25 ((this gun-dark-3-nuke)) + (when (not (logtest? (-> this draw status) (draw-control-status no-draw))) + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (matrix-f-u-compose s5-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)) *up-vector*) + (set! (-> s5-0 trans quad) (-> this root trans quad)) + (spawn-from-mat (-> this part) s5-0) + (init-with-mat! (-> this smoke-trail) s5-0) + ) + ) + (none) + ) + +;; definition for function gun-dark-reaction +;; INFO: Used lq/sq +(defun gun-dark-reaction ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector)) + (cshape-reaction-update-state arg0 arg1 arg3) + (set! (-> arg2 quad) (-> arg3 quad)) + (cond + ((logtest? (-> arg0 status) (collide-status touch-wall)) + (send-event (-> arg0 process) 'impact-small) + ) + ((let ((f0-1 (vector-dot (vector-normalize-copy! (new 'stack-no-clear 'vector) arg3 1.0) (-> arg0 surface-normal)))) + (< -0.3 f0-1) + ) + (let ((v1-9 (new 'stack-no-clear 'vector))) + (set! (-> v1-9 quad) (-> arg0 trans quad)) + (+ 1228.8 (-> v1-9 y)) + ) + (vector-flatten! arg2 arg3 (-> arg0 surface-normal)) + (send-event (-> arg0 process) 'slide-now (-> arg0 surface-normal)) + ) + (else + (send-event (-> arg0 process) 'impact) + ) + ) + (-> arg0 status) + ) + +;; definition for method 30 of type gun-dark-3-nuke +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this gun-dark-3-nuke)) + (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) gun-dark-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 40.96) + (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 obstacle pusher impenetrable-obj)) + (set-collide-as! (-> this root) (collide-spec projectile)) + (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 gun-dark-3-nuke +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this gun-dark-3-nuke)) + (with-pp + (set! (-> *last-active-nuke* last-active-nuke) (process->handle this)) + (set! (-> this attack-mode) 'eco-dark) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-gun-dark-3-nuke" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this spawned-mushroom-cloud?) #f) + (set! (-> this strip) + (new 'process 'prim-strip 4 (new 'static 'texture-id :index #x1f :page #x5) (the-as string #f)) + ) + (set! (-> this played-trail?) #f) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 112) this)) + pp + (set! (-> this smoke-trail) + (new 'process 'sparticle-subsampler *sp-particle-system-2d* (-> *part-id-table* 388) 8.0) + ) + (set-setting! 'allow-progress #f 0.0 0) + (set! (-> this explode-sound) + (add-process *gui-control* this (gui-channel gun) (gui-action queue) "pg3nxplo" -99.0 0) + ) + (set! (-> this explode-wall-sound) + (add-process *gui-control* this (gui-channel gun) (gui-action queue) "pg3wxplo" -99.0 0) + ) + (let* ((v1-19 *game-info*) + (a0-15 (+ (-> v1-19 attack-id) 1)) + ) + (set! (-> v1-19 attack-id) a0-15) + (set! (-> this attack-id) a0-15) + ) + (set! (-> this initial-velocity quad) (-> this root transv quad)) + (set! (-> this start-y) (-> this root trans y)) + (set! (-> this launch-impact-state) (method-of-object this impact-dud)) + (set! (-> this y-vel-adjust) 0.0) + (set! (-> this warp) (the-as handle #f)) + (set! (-> this shook-camera?) #f) + (set-vector! (-> this root scale) 2.5 2.5 2.5 1.0) + (set! (-> this killed-everything?) #f) + (let ((t9-8 (method-of-type projectile init-proj-settings!))) + (t9-8 this) + ) + (logior! (-> this options) (projectile-options po4)) + (set! (-> this total-fly-time) 0) + 0 + (none) + ) + ) + +;; definition for method 7 of type gun-dark-3-nuke +(defmethod relocate ((this gun-dark-3-nuke) (offset int)) + (if (nonzero? (-> this strip)) + (&+! (-> this strip) offset) + ) + (if (nonzero? (-> this smoke-trail)) + (&+! (-> this smoke-trail) offset) + ) + (call-parent-method this offset) + ) + +;; definition for function nuke-move +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs object. +(defbehavior nuke-move gun-dark-3-nuke () + (let ((gp-0 (-> self root))) + (set! (-> self pre-move-transv quad) (-> gp-0 transv quad)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> gp-0 trans quad)) + ((-> self move) self) + (projectile-method-39 self) + (set! (-> self old-dist (-> self old-dist-count)) (* 0.0625 (vector-vector-distance s5-0 (-> gp-0 trans)))) + ) + ) + (set! (-> self old-dist-count) (logand (+ (-> self old-dist-count) 1) 15)) + (let ((f0-2 0.0)) + (countdown (v1-12 16) + (+! f0-2 (-> self old-dist v1-12)) + ) + ) + #f + ) + +;; definition for method 51 of type gun-dark-3-nuke +;; WARN: Return type mismatch float vs none. +(defmethod set-launch-height! ((this gun-dark-3-nuke)) + (set! (-> this launch-height-t) + (/ (the float (- (current-time) (-> this state-time))) (the float (-> this launch-stay-state-time))) + ) + (set! (-> this launch-height-t) (fmax 0.0 (fmin 1.0 (-> this launch-height-t)))) + (none) + ) + +;; definition for method 35 of type gun-dark-3-nuke +(defmethod proj-event-handler ((this gun-dark-3-nuke) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('impact) + (go (-> this launch-impact-state)) + ) + (('impact-small) + (go (method-of-object this impact-embedded)) + ) + (('slide-now) + (let ((a2-1 (-> arg3 param 0)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (vector-flatten! s5-1 (-> this initial-velocity) (the-as vector a2-1)) + (set! (-> this y-vel-adjust) (-> s5-1 y)) + ) + (set! (-> this start-y) (+ (-> this start-y) (* (-> this y-vel-adjust) (seconds-per-frame)))) + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; failed to figure out what this is: +(defstate launching-base-state (gun-dark-3-nuke) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (proj-event-handler self proc argc message block) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self root transv y) 0.0) + ) + :trans (behavior () + (if *scene-player* + (go empty-state) + ) + (when (and (not (-> self played-trail?)) (>= (+ (current-time) (seconds -0.3)) (-> self total-fly-time))) + (sound-play "purple-3-trail" :position (-> self root trans)) + (set! (-> self played-trail?) #t) + ) + (when (time-elapsed? (-> self state-time) (-> self launch-stay-state-time)) + (set! (-> self start-y) (-> self root trans y)) + (go (-> self launch-next-state)) + ) + (+! (-> self start-y) (* (-> self y-vel-adjust) (seconds-per-frame))) + (let ((f0-3 (-> self launch-height-t))) + 0.0 + 0.0 + (let ((f0-4 (lerp (-> self launch-sin-region-start) (-> self launch-sin-region-end) f0-3))) + 0.0 + (let ((f30-1 (+ (- (* (sin (* 182.04445 f0-4)) (-> self launch-y-scale)) + (* (sin (* 182.04445 (-> self launch-sin-region-start))) (-> self launch-y-scale)) + ) + (-> self start-y) + ) + ) + ) + (set! (-> self expected-height) f30-1) + (vector-normalize-copy! (-> self root transv) (-> self initial-velocity) (-> self launch-speed)) + (set! (-> self root transv y) (- f30-1 (-> self root trans y))) + ) + ) + ) + (set! (-> self root transv y) (/ (-> self root transv y) (seconds-per-frame))) + (let ((t9-8 nuke-move)) + (-> self launch-impact-state) + (t9-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) + ) + (matrix->quaternion (-> self root quat) gp-1) + ) + (+! (-> self total-fly-time) (- (current-time) (-> self clock old-frame-counter))) + ) + :code sleep-code + :post (behavior () + (ja-post) + (projectile-method-25 self) + ) + ) + +;; failed to figure out what this is: +(defstate launch-0 (gun-dark-3-nuke) + :virtual #t + :parent (gun-dark-3-nuke launching-base-state) + :enter (behavior () + (set! (-> self launch-impact-state) (method-of-object self impact-embedded)) + (set! (-> self launch-y-scale) 0.0) + (set! (-> self launch-stay-state-time) (seconds 0.2)) + (set! (-> self launch-next-state) (method-of-object self launch-1)) + (let ((v1-6 (-> self state parent))) + (when v1-6 + (let ((t9-0 (-> v1-6 enter))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + ) + :trans (behavior () + (set-launch-height! self) + (set! (-> self launch-speed) 32768.0) + (let ((v1-4 (-> self state parent))) + (when v1-4 + (let ((t9-1 (-> v1-4 trans))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate launch-1 (gun-dark-3-nuke) + :virtual #t + :parent (gun-dark-3-nuke launching-base-state) + :enter (behavior () + (set! (-> self launch-y-scale) 0.0) + (set! (-> self launch-stay-state-time) (seconds 0.4)) + (set! (-> self launch-next-state) (method-of-object self launch-2)) + (let ((v1-4 (-> self state parent))) + (when v1-4 + (let ((t9-0 (-> v1-4 enter))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + ) + :trans (behavior () + (set-launch-height! self) + (let ((f0-1 (* 0.008333334 (the float (- (current-time) (-> self state-time)))))) + (set! (-> self launch-speed) (lerp 61440.0 204800.0 f0-1)) + ) + (let ((v1-8 (-> self state parent))) + (when v1-8 + (let ((t9-2 (-> v1-8 trans))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate launch-2 (gun-dark-3-nuke) + :virtual #t + :parent (gun-dark-3-nuke launching-base-state) + :enter (behavior () + (set! (-> self launch-sin-region-start) 0.0) + (set! (-> self launch-sin-region-end) 270.0) + (set! (-> self launch-stay-state-time) (seconds 0.5)) + (set! (-> self launch-next-state) (method-of-object self launch-3)) + (set! (-> self launch-y-scale) 34816.0) + (let ((v1-6 (-> self state parent))) + (when v1-6 + (let ((t9-0 (-> v1-6 enter))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + ) + :trans (behavior () + (let ((f30-0 (* 0.006666667 (the float (- (current-time) (-> self state-time)))))) + (if (< 0.7 f30-0) + (set! (-> self launch-impact-state) (method-of-object self impact)) + ) + (set! (-> self launch-speed) (lerp 204800.0 552960.0 f30-0)) + (set! (-> self launch-height-t) (* f30-0 f30-0)) + ) + (let ((v1-10 (-> self state parent))) + (when v1-10 + (let ((t9-1 (-> v1-10 trans))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate launch-3 (gun-dark-3-nuke) + :virtual #t + :parent (gun-dark-3-nuke launching-base-state) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (let ((t9-0 nuke-move)) + (-> self launch-impact-state) + (t9-0) + ) + (if (time-elapsed? (-> self state-time) (seconds 4)) + (go-virtual die) + ) + ) + ) + +;; definition for method 55 of type gun-dark-3-nuke +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod send-attack! ((this gun-dark-3-nuke) (arg0 process-focusable)) + (let* ((s3-0 (get-trans arg0 3)) + (v1-2 (get-trans arg0 1)) + (s5-1 (vector-! (new 'stack-no-clear 'vector) s3-0 (-> this root trans))) + ) + (+! (-> v1-2 y) 409.6) + (let ((v1-5 (cond + ((logtest? (-> *part-group-id-table* 115 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* 115)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-2 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 115)) + ) + ) + ) + ) + (send-event (ppointer->process v1-5) 'clock this) + ) + (send-event + arg0 + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> this attack-id)) + (damage 32.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'eco-dark) + (attacker-velocity s5-1) + (penetrate-using (penetrate explode jak-dark-nuke)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 54 of type gun-dark-3-nuke +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod count-casualties ((this gun-dark-3-nuke)) + (local-vars (sv-1568 vector)) + (set! (-> this num-dying-vehicles) (the-as uint 0)) + (set! (-> this num-dying-guards) (the-as uint 0)) + (set! (-> this num-dying-civilians) (the-as uint 0)) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (s5-0 64) + ) + (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)) + (let* ((s1-0 (-> s3-0 s2-0)) + (v1-5 (if (type? s1-0 collide-shape) + s1-0 + ) + ) + ) + (when v1-5 + (let* ((s0-0 (-> v1-5 process)) + (s1-1 (if (type? s0-0 process-focusable) + s0-0 + ) + ) + ) + (when s1-1 + (when (and (!= *target* s1-1) + (not (focus-test? (the-as process-focusable s1-1) disable dead inactive)) + (or (logtest? (process-mask enemy guard vehicle civilian) (-> s1-1 mask)) + (and (logtest? (process-mask crate) (-> s1-1 mask)) (let ((s0-1 vector-vector-xz-distance)) + (set! sv-1568 (-> s1-1 root trans)) + (let ((a1-3 (camera-pos))) + (< (s0-1 sv-1568 a1-3) 204800.0) + ) + ) + ) + ) + ) + (when (> s5-0 0) + (+! s5-0 -1) + (send-attack! this (the-as process-focusable s1-1)) + (cond + ((logtest? (process-mask civilian) (-> s1-1 mask)) + (+! (-> this num-dying-civilians) 1) + ) + ((logtest? (process-mask guard) (-> s1-1 mask)) + (+! (-> this num-dying-guards) 1) + ) + ((logtest? (process-mask vehicle) (-> s1-1 mask)) + (+! (-> this num-dying-vehicles) 1) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (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) s4-0) (-> s4-0 w))) + (when (and (!= *target* s3-1) + (not (focus-test? s3-1 disable dead inactive)) + (or (logtest? (process-mask enemy guard vehicle civilian) (-> s3-1 mask)) + (and (logtest? (process-mask crate) (-> s3-1 mask)) + (< (vector-vector-xz-distance (-> s3-1 control trans) (camera-pos)) 204800.0) + ) + ) + ) + (when (> s5-0 0) + (+ s5-0 -1) + (send-attack! this s3-1) + (cond + ((logtest? (process-mask civilian) (-> s3-1 mask)) + (+! (-> this num-dying-civilians) 1) + ) + ((logtest? (process-mask guard) (-> s3-1 mask)) + (+! (-> this num-dying-guards) 1) + ) + ((logtest? (process-mask vehicle) (-> s3-1 mask)) + (+! (-> this num-dying-vehicles) 1) + ) + ) + ) + ) + ) + ) + ) + (set! (-> this num-dying-vehicles) (the-as uint (min 4 (the-as int (-> this num-dying-vehicles))))) + (set! (-> this num-dying-guards) (the-as uint (min 6 (the-as int (-> this num-dying-vehicles))))) + (set! (-> this num-dying-civilians) (the-as uint (min 6 (the-as int (-> this num-dying-vehicles))))) + 0 + (none) + ) + +;; definition for method 52 of type gun-dark-3-nuke +;; WARN: Return type mismatch int vs none. +(defmethod do-blur-effect ((this gun-dark-3-nuke)) + (when (= (process->handle this) (-> *last-active-nuke* last-active-nuke)) + 0.0 + (let* ((f0-3 (/ (the float (- (current-time) (-> this state-time))) (the float (-> this blur-time)))) + (f0-4 (curve2d-method-9 (-> this blur-curve) f0-3 3)) + (f0-5 (- 1.0 f0-4)) + ) + (blit-displays-work-method-17 + *blit-displays-work* + (-> this root trans) + (the-as int (-> this num-blur-segments)) + (fmin 1.0 f0-5) + #f + ) + ) + (set! (-> *display* force-sync) (the-as uint 2)) + ) + (none) + ) + +;; definition for method 53 of type gun-dark-3-nuke +(defmethod do-white-screen-effect ((this gun-dark-3-nuke)) + (when (= (process->handle this) (-> *last-active-nuke* last-active-nuke)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + 0.0 + 0.0 + (let ((f0-4 (/ (the float (- (current-time) (-> this state-time))) (the float (-> this flash-time))))) + (curve-color-method-9 (-> this fade-curve) f0-4 (the-as rgbaf gp-0) 3) + ) + (set! (-> gp-0 x) (* 255.0 (-> gp-0 x))) + (set! (-> gp-0 y) (* 255.0 (-> gp-0 y))) + (set! (-> gp-0 z) (* 255.0 (-> gp-0 z))) + (set! (-> gp-0 w) (* 128.0 (-> gp-0 w))) + (setup *screen-filter* gp-0 gp-0 0.0 (bucket-id tex-hud-pris2) #x3fffff #x33001 #t) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate impact-dud (gun-dark-3-nuke) + :virtual #t + :code (behavior () + (if *scene-player* + (go empty-state) + ) + (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) 0.0) + (set! (-> gp-0 scale) 1.0) + (set! (-> gp-0 group) (-> *part-group-id-table* 104)) + (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 self) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-20 (-> self root root-prim))) + (set! (-> v1-20 prim-core collide-as) (collide-spec)) + (set! (-> v1-20 prim-core collide-with) (collide-spec)) + ) + 0 + (ja-post) + (while (-> self child) + (suspend) + ) + ) + ) + +;; definition for method 40 of type gun-dark-3-nuke +(defmethod projectile-method-40 ((this gun-dark-3-nuke)) + 256 + ) + +;; failed to figure out what this is: +(defstate impact-embedded (gun-dark-3-nuke) + :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 + (set! (-> self root transv quad) (the-as uint128 0)) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (if *scene-player* + (go empty-state) + ) + (if (time-elapsed? (-> self state-time) (seconds 1.4)) + (go-virtual impact-small) + ) + ) + :code (behavior () + (until (time-elapsed? (-> self state-time) (seconds 0.3)) + (suspend) + ) + (sound-play "beep") + (until (time-elapsed? (-> self state-time) (seconds 0.5)) + (suspend) + ) + (sound-play "beep") + (until #f + (suspend) + ) + #f + ) + :post (behavior () + (ja-post) + (projectile-method-25 self) + ) + ) + +;; definition for method 56 of type gun-dark-3-nuke +;; WARN: Return type mismatch uint vs none. +(defmethod play-death-sounds ((this gun-dark-3-nuke)) + (when (and (not (time-elapsed? (-> this state-time) (seconds 1.5))) + (time-elapsed? (-> this last-death-sound-play-time) (seconds 0.1)) + ) + (set-time! (-> this last-death-sound-play-time)) + (let* ((v1-11 (+ (-> this num-dying-vehicles) (-> this num-dying-guards) (-> this num-dying-civilians))) + (v1-12 (rand-vu-int-range 0 (the-as int (+ v1-11 -1)))) + ) + (when (> v1-12 0) + (cond + ((< v1-12 (the-as int (-> this num-dying-vehicles))) + (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)))) + (sound-play "guard-die") + (+! (-> this num-dying-guards) -1) + ) + (else + (sound-play "guard-hit") + (+! (-> this num-dying-civilians) -1) + ) + ) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate impact-small (gun-dark-3-nuke) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self draw status) (draw-control-status no-draw)) + (case (get-status *gui-control* (-> self explode-wall-sound)) + (((gui-status ready)) + (set-action! + *gui-control* + (gui-action play) + (-> self explode-wall-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (else + (set-action! + *gui-control* + (gui-action stop) + (-> self explode-wall-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (sound-play "explosion" :pitch 2.5) + ) + ) + (case (get-status *gui-control* (-> self explode-sound)) + (((gui-status ready)) + (set-action! + *gui-control* + (gui-action stop) + (-> self explode-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + (set-setting! 'music-volume 'abs 0.0 0) + (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 last-death-sound-play-time) 0) + (set! (-> self flash-time) *gun-dark-3-nuke-fade-time-small*) + (set! (-> self blur-time) *gun-dark-3-nuke-blur-time-small*) + (set! (-> self blur-curve) *gun-dark-3-nuke-blur-curve-small*) + (set! (-> self fade-curve) *gun-dark-3-nuke-fade-curve-small*) + (set! (-> self num-blur-segments) *gun-dark-3-nuke-blur-segs-small*) + ) + :exit (behavior () + (when (= (process->handle self) (-> *last-active-nuke* last-active-nuke)) + (disable *screen-filter*) + (blit-displays-work-method-17 *blit-displays-work* (-> self root trans) 0 1.0 #f) + ) + ) + :trans (behavior () + (if *scene-player* + (go empty-state) + ) + (do-blur-effect self) + (do-white-screen-effect self) + (if (time-elapsed? (-> self state-time) (seconds 1)) + (do-camera-shake self) + ) + (when (not (-> self spawned-mushroom-cloud?)) + (let ((v1-23 + (cond + ((logtest? (-> *part-group-id-table* 114 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* 114)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 114)) + ) + ) + ) + ) + (send-event (ppointer->process v1-23) 'clock self) + ) + (set! (-> self spawned-mushroom-cloud?) #t) + ) + (if (and (time-elapsed? (-> self state-time) (seconds 0.3)) + (not (time-elapsed? (-> self state-time) (seconds 6))) + ) + (set-setting! 'nuke-active? #t 0.0 0) + (remove-setting! 'nuke-active?) + ) + (when (and (time-elapsed? (-> self state-time) (seconds 0.3)) + (and (not (time-elapsed? (-> self state-time) (seconds 6))) + (time-elapsed? (-> self last-kill-time) (seconds 0.1)) + (not (-> self killed-everything?)) + ) + ) + (count-casualties self) + (set! (-> self killed-everything?) #t) + (set-time! (-> self last-kill-time)) + ) + (play-death-sounds self) + (ja-post) + ) + :code (behavior () + (until (time-elapsed? (-> self state-time) (seconds 8)) + (suspend) + ) + ) + ) + +;; failed to figure out what this is: +(defstate wait-for-alive (gun-dark-3-nuke) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (remove-setting! 'allow-progress) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (if *scene-player* + (go empty-state) + ) + (let ((f0-1 (* 0.00066666666 (the float (- (current-time) (-> self clock old-frame-counter)))))) + (set-setting! 'music-volume 'abs f0-1 0) + ) + ) + :code (behavior () + (until (time-elapsed? (-> self state-time) (seconds 5)) + (suspend) + ) + ) + ) + +;; definition for method 59 of type gun-dark-3-nuke +;; WARN: Return type mismatch object vs none. +(defmethod check-for-impact ((this gun-dark-3-nuke)) + (let ((a1-0 (new 'stack-no-clear 'collide-query))) + (vector+float*! (-> a1-0 start-pos) (-> this root trans) *up-vector* 2048.0) + (set-vector! (-> a1-0 move-dist) 0.0 49152.0 0.0 1.0) + (let ((v1-3 a1-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)) + ) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* a1-0) 0.0) + (go (method-of-object this impact-small)) + ) + ) + (none) + ) + +;; definition for method 58 of type gun-dark-3-nuke +(defmethod do-vibration ((this gun-dark-3-nuke)) + (buzz-stop! 0) + (let* ((f1-2 (* 0.00055555557 (the float (- (current-time) (-> this state-time))))) + (f0-2 (fmax 0.0 (fmin 1.0 f1-2))) + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 (the int (* 255.0 (- 1.0 f0-2))) (seconds 1)) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate impact (gun-dark-3-nuke) + :virtual #t + :enter (behavior () + (check-for-impact self) + (set-setting! 'music-volume 'abs 0.0 0) + (case (get-status *gui-control* (-> self explode-wall-sound)) + (((gui-status ready)) + (set-action! + *gui-control* + (gui-action stop) + (-> self explode-wall-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + (case (get-status *gui-control* (-> self explode-sound)) + (((gui-status ready)) + (set-action! + *gui-control* + (gui-action play) + (-> self explode-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (else + (set-action! + *gui-control* + (gui-action stop) + (-> self explode-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (sound-play "explosion" :pitch 2.5) + ) + ) + (set-time! (-> self state-time)) + (logior! (-> self draw status) (draw-control-status no-draw)) + (vector+float*! (-> self mushroom-top-pos) (-> self root trans) *up-vector* 20480.0) + (let ((v1-25 (-> self root root-prim))) + (set! (-> v1-25 prim-core collide-as) (collide-spec)) + (set! (-> v1-25 prim-core collide-with) (collide-spec)) + ) + 0 + (set! (-> self flash-time) *gun-dark-3-nuke-fade-time*) + (set! (-> self blur-time) *gun-dark-3-nuke-blur-time*) + (set! (-> self blur-curve) *gun-dark-3-nuke-blur-curve*) + (set! (-> self fade-curve) *gun-dark-3-nuke-fade-curve*) + (set! (-> self num-blur-segments) *gun-dark-3-nuke-blur-segs*) + ) + :exit (behavior () + (when (= (process->handle self) (-> *last-active-nuke* last-active-nuke)) + (disable *screen-filter*) + (blit-displays-work-method-17 *blit-displays-work* (-> self root trans) 0 1.0 #f) + ) + ) + :trans (behavior () + (if *scene-player* + (go empty-state) + ) + (do-blur-effect self) + (do-white-screen-effect self) + (do-vibration self) + (if (time-elapsed? (-> self state-time) (seconds 1)) + (do-camera-shake self) + ) + (set! (-> self strip num-verts) (the-as uint 0)) + (when (time-elapsed? (-> self state-time) (seconds 0.035)) + (when (not (-> self spawned-mushroom-cloud?)) + (let ((v1-30 + (cond + ((logtest? (-> *part-group-id-table* 110 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* 110)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 110)) + ) + ) + ) + ) + (send-event (ppointer->process v1-30) 'clock self) + ) + (let ((v1-61 + (cond + ((logtest? (-> *part-group-id-table* 111 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* 111)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 111)) + ) + ) + ) + ) + (send-event (ppointer->process v1-61) 'clock self) + ) + (let ((gp-4 (new 'stack-no-clear 'gun-dark-3-sphere-init-params))) + (set! (-> gp-4 pos quad) (-> self root trans quad)) + (set! (-> gp-4 size-x) 1.0) + (set! (-> gp-4 size-y) 1.0) + (set! (-> self warp) + (ppointer->handle (process-spawn gun-dark-3-sphere gp-4 :name "gun-dark-3-sphere" :to self)) + ) + ) + (set! (-> self spawned-mushroom-cloud?) #t) + ) + (if (and (time-elapsed? (-> self state-time) (seconds 0.3)) + (not (time-elapsed? (-> self state-time) (seconds 6))) + ) + (set-setting! 'nuke-active? #t 0.0 0) + (remove-setting! 'nuke-active?) + ) + (when (and (time-elapsed? (-> self state-time) (seconds 0.3)) + (and (not (time-elapsed? (-> self state-time) (seconds 7))) + (time-elapsed? (-> self last-kill-time) (seconds 0.1)) + (not (-> self killed-everything?)) + ) + ) + (count-casualties self) + (set! (-> self killed-everything?) #t) + (set-time! (-> self last-kill-time)) + ) + (play-death-sounds self) + (+! (-> self mushroom-top-pos y) (* *gun-dark-3-mushroom-speed* (seconds-per-frame))) + (let ((f26-0 (/ (the float (- (current-time) (-> self state-time))) (the float *gun-dark-3-mushroom-size-time*)))) + 0.0 + 0.0 + (let ((f30-0 1.0) + (f28-0 (curve2d-method-9 *gun-dark-3-nuke-mushroom-size-curve-x* f26-0 3)) + (f26-1 (curve2d-method-9 *gun-dark-3-nuke-mushroom-size-curve-y* f26-0 3)) + ) + (when (time-elapsed? (-> self state-time) (seconds 5)) + (let ((f30-1 (* 0.00066666666 (the float (+ (- (seconds -5) (-> self state-time)) (current-time)))))) + 0.0 + (let ((f24-0 (* f30-1 f30-1))) + (set! f28-0 (* f28-0 (lerp 1.0 1.3 f24-0))) + (set! f26-1 (* f26-1 (lerp 1.0 1.3 f24-0))) + ) + (set! f30-0 (lerp 1.0 0.0 f30-1)) + ) + ) + (let ((v1-144 (new 'stack-no-clear 'gun-dark-3-sphere-init-params))) + (set! (-> v1-144 pos quad) (-> self mushroom-top-pos quad)) + (set! (-> v1-144 size-x) f28-0) + (set! (-> v1-144 size-y) f26-1) + (set! (-> v1-144 alpha-val) (* f30-0 f30-0)) + (send-event (handle->process (-> self warp)) 'set-pos-and-size v1-144) + ) + (let ((gp-6 (vector-float*! (new 'stack-no-clear 'vector) *up-vector* f26-1)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> self mushroom-top-pos) (math-camera-pos)))) + (set! (-> s4-1 y) 0.0) + (vector-cross! s5-1 *up-vector* s4-1) + ) + (vector-normalize! s5-1 f28-0) + (dotimes (v1-152 4) + (if (> (logand v1-152 1) 0) + (vector-float*! gp-6 gp-6 -1.0) + ) + (when (= v1-152 2) + (vector-float*! gp-6 gp-6 -1.0) + (vector-float*! s5-1 s5-1 -1.0) + ) + (vector+! (the-as vector (+ (the-as uint (-> self strip data 0 pos)) (* v1-152 32))) s5-1 gp-6) + (vector+! + (the-as vector (+ (the-as uint (-> self strip data 0 pos)) (* v1-152 32))) + (the-as vector (+ (the-as uint (-> self strip data 0 pos)) (* v1-152 32))) + (-> self mushroom-top-pos) + ) + (set! (-> self strip data v1-152 stq z) 0.0) + (set! (-> self strip data v1-152 col) *color-gray*) + (set! (-> self strip data v1-152 col a) (the int (* 127.0 f30-0))) + (set! (-> self strip data v1-152 col g) (the int (* 127.0 f30-0))) + (set! (-> self strip data v1-152 col b) (the int (* 127.0 f30-0))) + ) + ) + ) + ) + (set! (-> self strip alpha) (new 'static 'gs-alpha :b #x1 :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 #x32 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + ) + (set! (-> self strip data 0 stq x) 1.0) + (set! (-> self strip data 0 stq y) 1.0) + (set! (-> self strip data 1 stq x) 1.0) + (set! (-> self strip data 1 stq y) 0.0) + (set! (-> self strip data 3 stq x) 0.0) + (set! (-> self strip data 3 stq y) 0.0) + (set! (-> self strip data 2 stq x) 0.0) + (set! (-> self strip data 2 stq y) 1.0) + (set! (-> self strip num-verts) (the-as uint 4)) + ) + (ja-post) + ) + :code (behavior () + (until (time-elapsed? (-> self state-time) (seconds 10)) + (suspend) + ) + (go-virtual wait-for-alive) + ) + ) + +;; definition for method 32 of type gun-dark-3-nuke +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-32 ((this gun-dark-3-nuke)) + (if (not (do-fire-backcheck (-> this root trans) (-> this root transv))) + (go (method-of-object this impact-dud)) + (go (method-of-object this launch-0)) + ) + 0 + (none) + ) + +;; definition for function target-gun-can-fire-dark? +(defbehavior target-gun-can-fire-dark? target ((arg0 pickup-type)) + (case arg0 + (((pickup-type gun-dark-2)) + (time-elapsed? (get-last-fire-time 36) (seconds 2)) + ) + (((pickup-type gun-dark-3)) + (time-elapsed? (get-last-fire-time 37) (seconds 9)) + ) + (else + #t + ) + ) + ) + +;; definition for function gun-fire-dark-3 +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs (pointer process). +(defbehavior gun-fire-dark-3 target () + (let ((gp-0 (-> self gun)) + (s5-0 (new 'stack-no-clear 'projectile-init-by-other-params)) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> self gun fire-dir-out quad)) + (set-last-fire-time 37) + (sound-play "purple-3-shot" :position (-> gp-0 fire-point)) + (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 pos quad) (-> gp-0 fire-point quad)) + (set! (-> s5-0 vel quad) (-> (vector-float*! (new 'stack-no-clear 'vector) s4-0 81920.0) quad)) + ) + (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 (send-event self 'get-vehicle))) + (let* ((v1-17 *game-info*) + (a0-17 (+ (-> v1-17 attack-id) 1)) + ) + (set! (-> v1-17 attack-id) a0-17) + (set! (-> s5-0 attack-id) a0-17) + ) + (set! (-> s5-0 timeout) (seconds 4)) + (let ((v0-7 (ppointer->handle (process-spawn + gun-dark-3-nuke + :init projectile-init-by-other + s5-0 + :name "projectile" + :to (ppointer->process (-> gp-0 gun)) + :stack *kernel-dram-stack* + ) + ) + ) + ) + (set! (-> gp-0 gun 0 extra) (the-as handle v0-7)) + (the-as (pointer process) v0-7) + ) + ) + ) + +;; definition for method 31 of type gun-dark-shot +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this gun-dark-shot)) + (+! (-> *game-info* shots-fired 3) 1.0) + (set! (-> this attack-mode) 'eco-dark) + (vector-normalize! (-> this root transv) (+ 225280.0 (* 225280.0 (-> this charge-level)))) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 94) this)) + (set! (-> this blast-radius) 40960.0) + (if (logtest? (game-secrets gun-upgrade-dark-1) (-> *game-info* secrets)) + (set! (-> this blast-radius) 81920.0) + ) + (set! (-> this size-t) 0.0) + (set! (-> this notify-handle) (process->handle this)) + (set! (-> this charge-sound) (new-sound-id)) + (set! (-> this fire-sound) (new-sound-id)) + (set! (-> this trail-sound) (new-sound-id)) + (set! (-> this explode-sound) + (add-process *gui-control* this (gui-channel gun) (gui-action queue) "pmkrxplo" -99.0 0) + ) + (sound-params-set! *gui-control* (-> this explode-sound) #t 50 150 11 -1.0) + (set! (-> this start-pilot?) (the-as symbol (and *target* (focus-test? *target* pilot)))) + (set! (-> this damage) 16.0) + (set! (-> this vehicle-damage-factor) 1.0) + (set! (-> this vehicle-impulse-factor) 2.0) + (when (logtest? (game-secrets gun-upgrade-dark-1) (-> *game-info* secrets)) + (set! (-> this vehicle-damage-factor) 6.0) + (set! (-> this vehicle-impulse-factor) 6.0) + ) + ((method-of-type projectile init-proj-settings!) this) + 0 + (none) + ) + +;; definition for method 25 of type gun-dark-shot +(defmethod projectile-method-25 ((this gun-dark-shot)) + (cond + ((and (and (-> this next-state) (= (-> this next-state name) 'startup)) + (and *target* (focus-test? *target* in-head)) + ) + (kill-particles (-> this part)) + ) + (else + (set! (-> *part-id-table* 260 init-specs 2 initial-valuef) (lerp 409.6 9216.0 (-> this size-t))) + (set! (-> *part-id-table* 260 init-specs 8 initial-valuef) (lerp 0.0 32.0 (-> this size-t))) + (set! (-> *part-id-table* 261 init-specs 2 initial-valuef) (lerp 409.6 32768.0 (-> this size-t))) + (set! (-> *part-id-table* 261 init-specs 8 initial-valuef) (lerp 0.0 16.0 (-> this size-t))) + (set! (-> *part-id-table* 259 init-specs 2 initial-valuef) (lerp 409.6 8192.0 (-> this size-t))) + (set! (-> *part-id-table* 258 init-specs 1 initial-valuef) (lerp 0.1 1.0 (-> this size-t))) + (set! (-> *part-id-table* 258 init-specs 2 initial-valuef) (lerp 409.6 3686.4 (-> this size-t))) + (spawn (-> this part) (-> this root trans)) + ) + ) + (ja-post) + (none) + ) + +;; definition for method 32 of type gun-dark-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-32 ((this gun-dark-shot)) + (go (method-of-object this startup)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate startup (gun-dark-shot) + :virtual #t + :exit (behavior () + (send-event (ppointer->process (-> self parent)) 'release) + (set! (-> self size-t) 1.0) + (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 charge-sound)) + (set! (-> v1-6 params volume) -4) + (set! (-> v1-6 auto-time) 24) + (set! (-> v1-6 auto-from) 2) + (set! (-> v1-6 params mask) (the-as uint 17)) + (-> v1-6 id) + ) + ) + :code (behavior () + (set-time! (-> self state-time)) + (until #f + (cond + ((or (and *target* + (focus-test? *target* dead grabbed under-water pole flut board mech dark carry indax teleporting) + ) + (and *target* (not (logtest? (focus-status in-head gun) (-> *target* focus-status)))) + (and *target* (!= (-> self start-pilot?) (focus-test? *target* pilot))) + (not (-> *setting-control* user-current gun)) + ) + (adjust-player-ammo 1.0 (pickup-type ammo-dark)) + (go-virtual dissipate) + ) + ((or (not (time-elapsed? (-> self state-time) (seconds 0.3))) (cpad-hold? 0 r1)) + (set! (-> self size-t) (fmin 1.0 (* 0.016666668 (the float (- (current-time) (-> self state-time)))))) + (let ((t9-2 vector<-cspace!) + (a0-14 (-> self root trans)) + (v1-28 (-> self parent)) + ) + (t9-2 a0-14 (-> (the-as process-focusable (if v1-28 + (the-as process-focusable (-> v1-28 0 self)) + ) + ) + node-list + data + 13 + ) + ) + ) + ) + ((and (logtest? (projectile-options po17) (-> self options)) (made-impact? self)) + (go-virtual impact) + ) + (else + (go-virtual moving) + ) + ) + (suspend) + ) + #f + ) + :post (behavior () + (sound-play "pmkr-charge" :id (-> self charge-sound) :position (-> self root trans)) + (projectile-method-25 self) + ) + ) + +;; failed to figure out what this is: +(defstate moving (gun-dark-shot) + :virtual #t + :enter (behavior () + (if *target* + (set! (-> self track-target) (-> *target* gun track-target 0 handle)) + ) + (let ((t9-0 (-> (method-of-type projectile moving) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self core-position quad) (-> self root trans quad)) + (let ((v1-10 (-> self core-velocity)) + (a0-3 (-> self parent)) + ) + (set! (-> v1-10 quad) (-> (the-as process-focusable (if a0-3 + (the-as process-focusable (-> a0-3 0 self)) + ) + ) + node-list + data + 13 + bone + transform + fvec + quad + ) + ) + ) + (when (and *target* (focus-test? *target* in-head)) + (set! (-> self core-position quad) (-> (camera-pos) quad)) + (set! (-> self core-velocity quad) (-> (camera-matrix) fvec quad)) + ) + (set-vector! (-> self spin-vector) (-> self core-velocity z) 0.0 (- (-> self core-velocity x)) 1.0) + (let ((f0-5 (vector-length (-> self spin-vector)))) + (if (< f0-5 1.0) + (set-vector! (-> self spin-vector) 1.0 0.0 0.0 1.0) + (vector-float*! (-> self spin-vector) (-> self spin-vector) (/ 1.0 f0-5)) + ) + ) + (set-time! (-> self state-time)) + (let ((v1-35 (cond + ((logtest? (-> *part-group-id-table* 92 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* 92)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 92)) + ) + ) + ) + ) + (send-event (ppointer->process v1-35) 'clock self) + ) + (draw-beam (-> *part-id-table* 250) (-> self root trans) (-> self core-velocity) #f) + ) + :trans (behavior () + (local-vars (at-0 int)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-normalize-copy! s4-0 (-> self core-velocity) 1.0) + (let* ((s3-0 (handle->process (-> self track-target))) + (s2-0 (if (type? s3-0 process-drawable) + s3-0 + ) + ) + ) + (when s2-0 + (let ((s3-1 (new 'stack-no-clear 'vector))) + (set! (-> s3-1 quad) (-> (the-as process-focusable s2-0) root trans quad)) + (let ((a0-6 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (if a0-6 + (set! (-> s3-1 quad) (-> (get-trans (the-as process-focusable a0-6) 3) quad)) + ) + ) + (let* ((s2-3 (vector-! (new 'stack-no-clear 'vector) s3-1 (-> self core-position))) + (f0-0 (vector-normalize-ret-len! s2-3 1.0)) + (f0-1 (lerp-scale 182.04445 8192.0 f0-0 61440.0 4096.0)) + (s3-2 (new 'stack-no-clear 'matrix)) + ) + (matrix-from-two-vectors-max-angle! s3-2 s4-0 s2-3 f0-1) + (vector-matrix*! (-> self core-velocity) (-> self core-velocity) s3-2) + ) + ) + ) + ) + (+! (-> self spin-vector x) (-> s4-0 z)) + (set! (-> self spin-vector z) (- (-> self spin-vector z) (-> s4-0 x))) + (vector-flatten! (-> self spin-vector) (-> self spin-vector) s4-0) + (matrix-axis-angle! s5-0 s4-0 (* 2002.4889 (-> self clock time-adjust-ratio))) + (vector-matrix*! (-> self spin-vector) (-> self spin-vector) s5-0) + (let ((f0-9 (the float (- (current-time) (-> self state-time)))) + (f30-0 0.0) + ) + (cond + ((< 450.0 f0-9) + (go-virtual impact) + ) + ((< f0-9 90.0) + (set! f30-0 (lerp-scale 0.0 4096.0 f0-9 0.0 90.0)) + ) + (else + (set! f30-0 (lerp-scale 4096.0 1228.8 f0-9 30.0 300.0)) + ) + ) + (let ((f30-1 (* 0.5 f30-0))) + (vector-normalize! (-> self spin-vector) f30-1) + (vector-normalize! (-> self core-velocity) 7372.8) + (set! (-> s5-0 fvec quad) (-> s4-0 quad)) + (set! (-> s5-0 uvec quad) (-> self spin-vector quad)) + (vector-float*! (-> s5-0 uvec) (-> s5-0 uvec) (/ 1.0 f30-1)) + ) + ) + ) + (vector-cross! (-> s5-0 rvec) (-> s5-0 uvec) (-> s5-0 fvec)) + (matrix->quaternion (-> self root quat) s5-0) + ) + (vector+! (-> self core-position) (-> self core-position) (-> self core-velocity)) + (vector+! gp-0 (-> self core-position) (-> self spin-vector)) + (vector-! (-> self root transv) gp-0 (-> self root trans)) + ) + (let ((v1-39 (-> self root transv))) + (.lvf vf1 (&-> (-> self root transv) quad)) + (let ((f0-13 (-> self clock frames-per-second))) + (.mov at-0 f0-13) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> v1-39 quad) vf1) + ) + (projectile-move-fill-line-sphere self) + (if (logtest? (-> self root status) (collide-status touch-surface)) + (go-virtual impact) + ) + (sound-play "pmkr-fire" :id (-> self fire-sound) :position (-> self root trans)) + (sound-play "pmkr-trail" :id (-> self trail-sound) :position (-> self root trans)) + ) + ) + ) + +;; definition for function process-drawable-shock-effect-bullseye +;; WARN: Check prologue - tricky store of a0 +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun process-drawable-shock-effect-bullseye ((arg0 process-focusable) + (arg1 process-focusable) + (arg2 lightning-spec) + (arg3 (function lightning-tracker none)) + (arg4 sparticle-launcher) + (arg5 sparticle-launcher) + (arg6 sparticle-launcher) + ) + (local-vars (sv-16 process) (sv-32 lightning-spec) (sv-48 process-focusable)) + (set! sv-48 arg0) + (let ((s0-0 arg1)) + (set! sv-32 arg2) + (let ((gp-0 arg4) + (s1-0 arg5) + (s3-0 arg6) + (s4-0 (get-trans sv-48 3)) + (s5-0 (get-trans s0-0 3)) + ) + (set! sv-16 (get-process *default-dead-pool* lightning-tracker #x4000 0)) + (let ((s2-0 (when sv-16 + (let ((t9-3 (method-of-type lightning-tracker activate))) + (t9-3 (the-as lightning-tracker sv-16) s0-0 "lightning-tracker" (the-as pointer #x70004000)) + ) + (let ((t9-4 run-function-in-process) + (a0-5 sv-16) + (a1-5 lightning-tracker-init) + (a3-3 0) + (t0-1 lightning-probe-callback) + (t2-1 256) + (t3-0 256) + ) + ((the-as (function object object object object object object object object none) t9-4) + a0-5 + a1-5 + sv-32 + a3-3 + t0-1 + sv-48 + t2-1 + t3-0 + ) + ) + (-> sv-16 ppointer) + ) + ) + ) + (when s1-0 + (let ((t9-5 sp-launch-particles-var) + (a0-6 *sp-particle-system-2d*) + (a2-4 *launch-matrix*) + ) + (set! (-> a2-4 trans quad) (-> s4-0 quad)) + (t9-5 a0-6 s1-0 a2-4 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + (when s3-0 + (let ((t9-6 sp-launch-particles-var) + (a0-7 *sp-particle-system-2d*) + (a2-5 *launch-matrix*) + ) + (set! (-> a2-5 trans quad) (-> s4-0 quad)) + (t9-6 a0-7 s3-0 a2-5 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + (when (and gp-0 s2-0) + (let ((v1-13 (get-field-spec-by-id gp-0 (sp-field-id spt-timer)))) + (if v1-13 + (set! (-> v1-13 initial-valuef) (the-as float (-> (the-as lightning-tracker (-> s2-0 0)) duration))) + ) + ) + (let ((t9-8 sp-launch-particles-var) + (a0-12 *sp-particle-system-2d*) + (a1-13 gp-0) + (a2-6 *launch-matrix*) + ) + (set! (-> a2-6 trans quad) (-> s4-0 quad)) + (t9-8 a0-12 a1-13 a2-6 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (let ((t9-9 sp-launch-particles-var) + (a0-13 *sp-particle-system-2d*) + (a2-7 *launch-matrix*) + ) + (set! (-> a2-7 trans quad) (-> s5-0 quad)) + (t9-9 a0-13 gp-0 a2-7 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate fizzle (gun-dark-shot) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 1)) + (deactivate self) + ) + (process-drawable-shock-effect-replace + self + (-> *lightning-spec-id-table* 15) + lightning-probe-callback + 256 + 0 + 40960.0 + ) + (launch-particles (-> *part-id-table* 255) (-> self root trans)) + (launch-particles (-> *part-id-table* 257) (-> self root trans)) + (let ((gp-0 (-> *part-id-table* 665))) + (when gp-0 + (let ((v1-13 (get-field-spec-by-id gp-0 (sp-field-id spt-timer)))) + (if v1-13 + (set! (-> v1-13 initial-valuef) (the-as float #xf)) + ) + ) + (let ((t9-5 sp-launch-particles-var) + (a0-8 *sp-particle-system-2d*) + (a2-3 *launch-matrix*) + ) + (set! (-> a2-3 trans quad) (-> self root trans quad)) + (t9-5 a0-8 gp-0 a2-3 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ) + :code sleep-code + ) + +;; definition for function gun-dark-shot-init-fizzle +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defbehavior gun-dark-shot-init-fizzle gun-dark-shot ((arg0 vector)) + (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-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 crate civilian enemy obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set! (-> v1-6 prim-core action) (collide-action solid)) + (set-vector! (-> v1-6 local-sphere) 0.0 5324.8 0.0 5324.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! (-> s5-0 max-iteration-count) (the-as uint 2)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> self root) s5-0) + ) + (set! (-> self root trans quad) (-> arg0 quad)) + (let ((v1-16 (-> self root root-prim))) + (set! (-> v1-16 prim-core collide-as) (collide-spec)) + (set! (-> v1-16 prim-core collide-with) (collide-spec)) + ) + 0 + (logclear! (-> self mask) (process-mask actor-pause)) + (go-virtual fizzle) + (none) + ) + +;; definition for method 57 of type gun-dark-3-nuke +;; WARN: Return type mismatch symbol vs none. +(defmethod do-camera-shake ((this gun-dark-3-nuke)) + (when (not (-> this shook-camera?)) + (activate! *camera-smush-control* 1228.8 45 1275 1.0 0.9 (-> *display* camera-clock)) + (set! (-> this shook-camera?) #t) + ) + (none) + ) + +;; definition for method 40 of type gun-dark-shot +(defmethod projectile-method-40 ((this gun-dark-shot)) + 512 + ) + +;; failed to figure out what this is: +(defstate impact (gun-dark-shot) + :virtual #t + :enter (behavior () + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.2)) + (let ((t9-1 (-> (method-of-type projectile impact) enter))) + (if t9-1 + (t9-1) + ) + ) + (set! (-> self result-count) 0) + (set! (-> self spread-timer) 0) + (if (not (time-elapsed? (-> self spawn-time) (seconds 0.1))) + (send-event (ppointer->process (-> self parent)) 'release) + ) + (sound-stop (-> self trail-sound)) + (case (get-status *gui-control* (-> self explode-sound)) + (((gui-status ready)) + (set-action! + *gui-control* + (gui-action play) + (-> self explode-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (else + (set-action! + *gui-control* + (gui-action stop) + (-> self explode-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (sound-play "explosion" :pitch 2.5) + ) + ) + (let ((v1-23 (-> self root root-prim))) + (set! (-> v1-23 prim-core collide-as) (collide-spec)) + (set! (-> v1-23 prim-core collide-with) (collide-spec)) + ) + 0 + (cond + ((logtest? (-> *part-group-id-table* 93 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* 93)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 93)) + ) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> self root trans quad)) + (let ((gp-3 (the-as (array float) (new 'stack 'boxed-array float 16))) + (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) 'get-vehicle) + (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)) + (let* ((s1-0 (-> s3-0 s2-0)) + (v1-66 (if (type? s1-0 collide-shape) + s1-0 + ) + ) + ) + (when v1-66 + (let* ((s0-0 (-> v1-66 process)) + (s1-1 (if (type? s0-0 process-focusable) + s0-0 + ) + ) + ) + (when s1-1 + (when (and (nonzero? (-> (the-as process-focusable s1-1) root root-prim prim-core collide-as)) + (logtest? (process-mask crate enemy guard vehicle civilian kg-robot metalhead) (-> s1-1 mask)) + (not (focus-test? (the-as process-focusable s1-1) disable dead ignore)) + (!= s1-1 s5-1) + ) + (let* ((s0-1 (get-trans (the-as process-focusable s1-1) 3)) + (f0-2 (vector-vector-distance-squared (-> self root trans) s0-1)) + (f1-0 (-> s0-1 w)) + (f0-3 (- f0-2 (* f1-0 f1-0))) + (v1-80 (+ (-> self result-count) -1)) + ) + (while (and (>= v1-80 0) (< f0-3 (-> gp-3 v1-80))) + (when (< v1-80 15) + (set! (-> gp-3 (+ v1-80 1)) (-> gp-3 v1-80)) + (set! (-> self result-array (+ v1-80 1)) (-> self result-array v1-80)) + ) + (+! v1-80 -1) + ) + (when (< v1-80 15) + (let ((v1-81 (+ v1-80 1))) + (if (< (-> self result-count) 16) + (+! (-> self result-count) 1) + ) + (set! (-> gp-3 v1-81) f0-3) + (set! (-> self result-array v1-81) (process->handle s1-1)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (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) s4-0) (-> s4-0 w))) + (when (and (nonzero? (-> s3-1 control root-prim prim-core collide-as)) + (logtest? (process-mask crate enemy guard vehicle civilian kg-robot metalhead) (-> s3-1 mask)) + (not (focus-test? s3-1 disable dead ignore)) + (!= s3-1 s5-1) + ) + (let* ((s5-2 (get-trans s3-1 3)) + (f0-5 (vector-vector-distance-squared (-> self root trans) s5-2)) + (f1-6 (-> s5-2 w)) + (f0-6 (- f0-5 (* f1-6 f1-6))) + (v1-101 (+ (-> self result-count) -1)) + ) + (while (and (>= v1-101 0) (< f0-6 (-> gp-3 v1-101))) + (when (< v1-101 15) + (set! (-> gp-3 (+ v1-101 1)) (-> gp-3 v1-101)) + (set! (-> self result-array (+ v1-101 1)) (-> self result-array v1-101)) + ) + (+! v1-101 -1) + ) + (when (< v1-101 15) + (let ((v1-102 (+ v1-101 1))) + (if (< (-> self result-count) 16) + (+! (-> self result-count) 1) + ) + (set! (-> gp-3 v1-102) f0-6) + (set! (-> self result-array v1-102) (process->handle s3-1)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (if (zero? (-> self result-count)) + (go-virtual fizzle) + ) + (let ((gp-4 (handle->process (-> self result-array 0)))) + (deal-damage! self gp-4 (the-as event-message-block #f)) + (let ((s5-3 gp-4)) + (if (or (if (type? s5-3 crate) + s5-3 + ) + (let ((s5-4 gp-4)) + (if (type? s5-4 market-object) + s5-4 + ) + ) + (if (type? gp-4 fruit-stand) + gp-4 + ) + ) + (process-spawn gun-dark-shot :init gun-dark-shot-init-fizzle (-> self root trans) :name "gun-dark-shot") + ) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type projectile impact) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (and (> (-> self result-count) 0) (time-elapsed? (-> self spread-timer) (seconds 0.1))) + (set-time! (-> self spread-timer)) + (+! (-> self result-count) -1) + (while (and (>= (-> self result-count) 0) (not (handle->process (-> self result-array (-> self result-count))))) + (+! (-> self result-count) -1) + ) + (when (>= (-> self result-count) 0) + (let ((s5-0 (handle->process (-> self result-array (-> self result-count))))) + (if s5-0 + (process-spawn-function + process + (lambda :behavior process + ((arg0 handle) (arg1 float)) + (let* ((s3-0 (ppointer->process (-> self parent))) + (s5-0 (if (type? s3-0 process-focusable) + s3-0 + ) + ) + (s2-0 0) + (s1-0 (current-time)) + (s3-1 #f) + ) + (+! (-> self clock ref-count) -1) + (+! (-> s5-0 clock ref-count) 1) + (set! (-> self clock) (-> s5-0 clock)) + (while (and (nonzero? (-> (the-as process-focusable s5-0) skel)) + (or (focus-test? (the-as process-focusable s5-0) dead hit) + (and (-> (the-as process-focusable s5-0) next-state) + (= (-> (the-as process-focusable s5-0) next-state name) 'knocked) + ) + (not (time-elapsed? s1-0 (seconds 0.35))) + ) + (not (time-elapsed? s1-0 (seconds 5))) + (not (logtest? (-> (the-as process-focusable s5-0) draw status) (draw-control-status no-draw no-draw-temp))) + (or (not (and (-> (the-as process-focusable s5-0) next-state) + (= (-> (the-as process-focusable s5-0) next-state name) 'fizzle) + ) + ) + (not (type? s5-0 missile-bot)) + ) + ) + (when (time-elapsed? (the-as time-frame s2-0) (seconds 0.05)) + (set! s2-0 (the-as int (current-time))) + (let ((a0-5 (handle->process arg0))) + (if a0-5 + (process-drawable-shock-effect-bullseye + (the-as process-focusable a0-5) + (the-as process-focusable s5-0) + (-> *lightning-spec-id-table* 16) + lightning-probe-callback + (-> *part-id-table* 665) + (-> *part-id-table* 255) + (-> *part-id-table* 257) + ) + ) + ) + (process-drawable-shock-effect-replace + (the-as process-drawable s5-0) + (-> *lightning-spec-id-table* 15) + lightning-probe-callback + 0 + 0 + 40960.0 + ) + ) + (suspend) + (let ((s5-1 (ppointer->process (-> self parent)))) + (set! s5-0 (if (type? s5-1 process-focusable) + s5-1 + ) + ) + ) + (when (and (not s3-1) (time-elapsed? s1-0 (seconds 0.1)) (!= s5-0 (handle->process arg0))) + (set! s3-1 #t) + (send-event + s5-0 + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 16.0) (vehicle-damage-factor arg1) (vehicle-impulse-factor 1.0) (mode 'explode)) + ) + ) + ) + ) + (+! (-> *game-info* shots-hit 3) 1.0) + (when (and (not s3-1) (!= s5-0 (handle->process arg0))) + #t + (send-event + s5-0 + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) (damage 16.0) (vehicle-damage-factor arg1) (vehicle-impulse-factor 1.0) (mode 'explode)) + ) + ) + ) + ) + ) + (-> self result-array 0) + (-> self vehicle-damage-factor) + :to s5-0 + ) + ) + ) + ) + ) + (if (or (time-elapsed? (-> self spread-timer) (seconds 10)) + (and (not (-> self child)) + (= (get-status *gui-control* (-> self explode-sound)) (gui-status unknown)) + (< (-> self result-count) 0) + ) + ) + (deactivate self) + ) + ) + :code sleep-code + ) + +;; definition of type gravity-spinner +(deftype gravity-spinner (process) + ((cached-damage float) + (end-time time-frame) + (time-subtract time-frame) + (parent-hand handle) + (rotation-accel vector :inline) + (original-sphere-offset sphere :inline) + (obj-radius float) + (was-hit-previously? symbol) + (ground-height float) + (next-ground-probe-time time-frame) + ) + (:state-methods + zero-g + zero-g-vehicle + ) + (:methods + (gravity-spinner-method-16 (_type_ vector vector) none) + (update-rotation (_type_ symbol) none) + (gravity-spinner-method-18 (_type_ process) float) + (handle-impact (_type_ symbol) vector) + (probe-ground (_type_) none) + (get-float-speed (_type_) float) + (gravity-spinner-method-22 (_type_) none) + (spawn-part (_type_) none) + (rotate! (_type_ quaternion) none) + ) + ) + +;; definition for method 3 of type gravity-spinner +(defmethod inspect ((this gravity-spinner)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Tcached-damage: ~f~%" (-> this cached-damage)) + (format #t "~2Tend-time: ~D~%" (-> this end-time)) + (format #t "~2Ttime-subtract: ~D~%" (-> this time-subtract)) + (format #t "~2Tparent-hand: ~D~%" (-> this parent-hand)) + (format #t "~2Trotation-accel: #~%" (-> this rotation-accel)) + (format #t "~2Toriginal-sphere-offset: #~%" (-> this original-sphere-offset)) + (format #t "~2Tobj-radius: ~f~%" (-> this obj-radius)) + (format #t "~2Twas-hit-previously?: ~A~%" (-> this was-hit-previously?)) + (format #t "~2Tground-height: ~f~%" (-> this ground-height)) + (format #t "~2Tnext-ground-probe-time: ~D~%" (-> this next-ground-probe-time)) + (label cfg-4) + this + ) + +;; definition for method 7 of type gravity-spinner +(defmethod relocate ((this gravity-spinner) (offset int)) + (call-parent-method this offset) + ) + +;; definition for method 10 of type gravity-spinner +(defmethod deactivate ((this gravity-spinner)) + "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 18 of type gravity-spinner +(defmethod gravity-spinner-method-18 ((this gravity-spinner) (arg0 process)) + 1.0 + ) + +;; definition for method 23 of type gravity-spinner +;; INFO: Used lq/sq +(defmethod spawn-part ((this gravity-spinner)) + (when (zero? (mod (the-as int (rand-uint31-gen *random-generator*)) 5)) + (let* ((s5-0 (handle->process (-> this parent-hand))) + (gp-1 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when gp-1 + (when (and (-> (the-as process-focusable gp-1) node-list) (nonzero? (-> (the-as process-focusable gp-1) node-list))) + (let* ((v1-12 + (+ (mod + (the-as int (rand-uint31-gen *random-generator*)) + (+ (-> (the-as process-focusable gp-1) node-list length) -2) + ) + 2 + ) + ) + (v1-15 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> (the-as process-focusable gp-1) node-list data v1-12)) + ) + (t9-4 sp-launch-particles-var) + (a0-9 *sp-particle-system-2d*) + (a1-5 (-> *part-id-table* 398)) + (a2-0 *launch-matrix*) + ) + (set! (-> a2-0 trans quad) (-> v1-15 quad)) + (t9-4 a0-9 a1-5 a2-0 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 22 of type gravity-spinner +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defmethod gravity-spinner-method-22 ((this gravity-spinner)) + (local-vars (a1-11 float)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + ) + (init-vf0-vector) + (let* ((gp-0 (handle->process (-> this parent-hand))) + (s3-0 (if (type? gp-0 process-focusable) + gp-0 + ) + ) + ) + (when s3-0 + (let* ((gp-1 (-> (the-as process-focusable s3-0) root)) + (s5-0 (-> gp-1 root-prim)) + (s4-0 (-> gp-1 process node-list)) + (v1-5 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> (the-as process-focusable s3-0) root quat))) + ) + (set! (-> v1-5 trans quad) (-> (the-as process-focusable s3-0) root trans quad)) + (when (nonzero? s4-0) + (countdown (a0-7 (-> gp-1 total-prims)) + (when (and (= (-> s5-0 transform-index) -2) (!= s5-0 (-> gp-1 root-prim))) + (.lvf vf5 (&-> v1-5 trans quad)) + (.lvf vf1 (&-> s5-0 local-sphere quad)) + (.lvf vf2 (&-> v1-5 rvec quad)) + (.mul.w.vf acc vf5 vf0) + (.div.vf Q vf0 vf5 :fsf #b11 :ftf #b11) + (.lvf vf3 (&-> v1-5 uvec quad)) + (.add.mul.x.vf acc vf2 vf1 acc) + (.lvf vf4 (&-> v1-5 fvec quad)) + (.add.mul.y.vf acc vf3 vf1 acc) + (.add.mul.z.vf vf1 vf4 vf1 acc :mask #b111) + (.mul.vf vf1 vf1 Q :mask #b111) + (.svf (&-> s5-0 prim-core world-sphere quad) vf1) + (.mov a1-11 vf1) + ) + (&+! s5-0 80) + ) + ) + ) + ) + ) + (none) + ) + ) + +;; definition for method 21 of type gravity-spinner +(defmethod get-float-speed ((this gravity-spinner)) + (let* ((s4-0 (handle->process (-> this parent-hand))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when s5-0 + (let ((f0-2 (- (- (-> (get-trans (the-as process-focusable s5-0) 3) y) + (-> (the-as process-focusable s5-0) root root-prim local-sphere w) + ) + (-> this ground-height) + ) + ) + ) + (cond + ((< f0-2 4096.0) + (* 10.0 (seconds-per-frame) (- 4096.0 f0-2)) + ) + ((< 14336.0 f0-2) + (let* ((f0-5 (+ -14336.0 f0-2)) + (f0-7 (* f0-5 f0-5)) + (f0-9 (* 0.00008138021 (- f0-7))) + (f0-10 (fmax -61440.0 f0-9)) + ) + (* 10.0 (seconds-per-frame) f0-10) + ) + ) + (else + 0.0 + ) + ) + ) + ) + ) + ) + +;; definition for method 20 of type gravity-spinner +;; INFO: Used lq/sq +;; WARN: Return type mismatch float vs none. +(defmethod probe-ground ((this gravity-spinner)) + (let* ((s4-0 (handle->process (-> this parent-hand))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when s5-0 + (let ((s4-1 (get-trans (the-as process-focusable s5-0) 3)) + (s3-0 (new 'stack-no-clear 'collide-query)) + ) + 0.0 + (vector+float*! (-> s3-0 start-pos) s4-1 *up-vector* 24576.0) + (set! (-> s3-0 move-dist quad) (the-as uint128 0)) + (set! (-> s3-0 move-dist y) -81920.0) + (let ((v1-8 s3-0)) + (set! (-> v1-8 radius) 40.96) + (set! (-> v1-8 collide-with) (collide-spec backgnd)) + (set! (-> v1-8 ignore-process0) #f) + (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)) + ) + (set! (-> this ground-height) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* s3-0) 0.0) + (-> s3-0 best-other-tri intersect y) + (fmin + (- (-> s4-1 y) (-> (the-as process-focusable s5-0) root root-prim local-sphere w)) + (-> (target-pos 0) y) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for symbol *gravity-origin-pos*, type vector +(define *gravity-origin-pos* (new 'static 'vector)) + +;; definition for function gravity-spinner-init-by-other +;; INFO: Used lq/sq +(defbehavior gravity-spinner-init-by-other gravity-spinner ((arg0 handle) (arg1 object) (arg2 time-frame)) + (stack-size-set! (-> self main-thread) 512) + (set! (-> self parent-hand) arg0) + (set! (-> self time-subtract) arg2) + (set! (-> self cached-damage) 0.0) + (set! (-> self was-hit-previously?) #f) + (let* ((s5-1 (handle->process (-> self parent-hand))) + (gp-1 (if (type? s5-1 process-focusable) + s5-1 + ) + ) + ) + (when gp-1 + (set! (-> self original-sphere-offset quad) + (-> (the-as process-focusable gp-1) root root-prim local-sphere quad) + ) + (set! (-> *gravity-origin-pos* quad) (-> (get-trans (the-as process-focusable gp-1) 3) quad)) + (iterate-prims + (-> (the-as process-focusable gp-1) root) + (lambda :behavior gravity-spinner + ((arg0 collide-shape-prim)) + (case (-> arg0 prim-core prim-type) + ((-1) + (set! (-> self obj-radius) + (fmax + (-> self obj-radius) + (+ (vector-vector-distance (the-as vector (-> arg0 prim-core)) *gravity-origin-pos*) + (-> arg0 prim-core world-sphere w) + ) + ) + ) + ) + ) + (none) + ) + ) + (set! (-> self obj-radius) + (fmin (-> self obj-radius) (-> (the-as process-focusable gp-1) root root-prim local-sphere w)) + ) + (when (not (logtest? (process-mask vehicle) (-> gp-1 mask))) + (set! (-> self obj-radius) (* 0.75 (-> self obj-radius))) + (set! (-> (the-as process-focusable gp-1) root root-prim local-sphere w) (-> self obj-radius)) + (set! (-> (the-as process-focusable gp-1) root root-prim prim-core world-sphere w) (-> self obj-radius)) + ) + (let* ((v1-23 (get-trans (the-as process-focusable gp-1) 3)) + (s5-4 (vector-! (new 'stack-no-clear 'vector) v1-23 (the-as vector arg1))) + (s4-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-1 quad) (-> v1-23 quad)) + (let* ((f0-8 (- (-> s5-4 y))) + (f0-9 (if (< f0-8 0.0) + (fmax f0-8 (-> (the-as process-focusable gp-1) root root-prim local-sphere w)) + (fmin f0-8 (-> (the-as process-focusable gp-1) root root-prim local-sphere w)) + ) + ) + ) + (+! (-> s4-1 y) f0-9) + ) + (vector+! + s5-4 + s5-4 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> (the-as process-focusable gp-1) root transv) 1.0) + ) + (let ((a0-17 s5-4)) + (set! (-> a0-17 quad) (-> s5-4 quad)) + (set! (-> a0-17 y) 0.0) + (vector-normalize! a0-17 1.0) + ) + (let* ((s3-1 vector-rotate-around-axis!) + (s2-2 s5-4) + (s1-0 s5-4) + (f30-0 -1820.4445) + (f28-0 3640.889) + (v1-39 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-40 (the-as number (logior #x3f800000 v1-39))) + ) + (s3-1 s2-2 (the-as quaternion s1-0) (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-40)))) *up-vector*) + ) + (let ((f0-18 (* 0.000061035156 (-> self obj-radius)))) + 0.0 + (let* ((f30-1 (lerp 1.0 0.2 f0-18)) + (s3-2 s5-4) + (s2-3 s5-4) + (f28-1 12288.0) + (f26-0 8192.0) + (v1-46 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-47 (the-as number (logior #x3f800000 v1-46))) + ) + (vector-float*! s3-2 s2-3 (* f30-1 (+ f28-1 (* f26-0 (+ -1.0 (the-as float v1-47)))))) + ) + ) + (gravity-spinner-method-16 self s4-1 s5-4) + ) + (if (logtest? (process-mask vehicle) (-> gp-1 mask)) + (go-virtual zero-g-vehicle) + (go-virtual zero-g) + ) + ) + ) + ) + +;; definition for method 19 of type gravity-spinner +;; INFO: Used lq/sq +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +(defmethod handle-impact ((this gravity-spinner) (arg0 symbol)) + (local-vars + (sv-144 sphere) + (sv-148 process) + (sv-152 vector) + (sv-156 float) + (sv-160 float) + (sv-164 vector) + (sv-168 symbol) + (sv-172 float) + (sv-1728 vector) + (sv-1732 vector) + (sv-1736 float) + (sv-2304 vector) + (sv-2308 vector) + (sv-2312 float) + ) + (let* ((s3-0 (handle->process (-> this parent-hand))) + (s5-0 (if (type? s3-0 process-focusable) + s3-0 + ) + ) + ) + (when s5-0 + (set! sv-144 (new 'stack 'sphere)) + (set! sv-148 (the-as process (send-event *target* 'get-vehicle))) + (let ((v1-7 (new 'stack-no-clear 'vector))) + (set! (-> v1-7 quad) (-> (the-as process-focusable s5-0) root transv quad)) + (set! sv-152 v1-7) + ) + (set! sv-156 (the-as float 0.0)) + (set! sv-160 (the-as float 102400.0)) + (set! sv-164 (new 'stack-no-clear 'vector)) + (set! sv-168 (the-as symbol #f)) + (set! sv-172 (the-as float 40960000.0)) + (if arg0 + (set! sv-160 (the-as float 163840.0)) + ) + (set! sv-156 (vector-normalize-ret-len! sv-152 1.0)) + (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)) + (let* ((s1-0 (-> s3-2 s2-0)) + (a0-15 (if (type? s1-0 collide-shape) + s1-0 + ) + ) + ) + (when a0-15 + (let* ((s1-1 (-> a0-15 process)) + (a0-17 (if (type? s1-1 process-focusable) + s1-1 + ) + ) + ) + (when a0-17 + (when (and (!= s5-0 a0-17) + (not (focus-test? (the-as process-focusable a0-17) disable dead inactive gun-no-target)) + (logtest? (process-mask enemy guard civilian) (-> a0-17 mask)) + (not (focus-test? (the-as process-focusable a0-17) no-gravity)) + (!= a0-17 sv-148) + ) + (set! sv-1728 (get-trans (the-as process-focusable a0-17) 3)) + (set! sv-1732 (new 'stack-no-clear 'vector)) + (set! sv-1736 (the-as float 0.0)) + (vector-! sv-1732 sv-1728 (the-as vector sv-144)) + (set! sv-1736 (vector-normalize-ret-len! sv-1732 1.0)) + (when (and (>= sv-160 sv-1736) (< sv-1736 sv-172) (< sv-1736 (* 4.5 sv-156))) + (let ((f30-0 (vector-dot sv-152 sv-1732)) + (f0-12 0.707) + ) + (if arg0 + (set! f0-12 0.5) + ) + (when (< f0-12 f30-0) + (let ((a1-19 (new 'stack 'collide-query))) + (set! (-> a1-19 start-pos quad) (-> sv-144 quad)) + (vector-! (-> a1-19 move-dist) sv-1728 (-> a1-19 start-pos)) + (let ((v1-53 a1-19)) + (set! (-> v1-53 radius) (* 0.8 (-> (the-as process-focusable s5-0) root root-prim prim-core world-sphere w))) + (set! (-> v1-53 collide-with) (collide-spec backgnd obstacle)) + (set! (-> v1-53 ignore-process0) #f) + (set! (-> v1-53 ignore-process1) #f) + (set! (-> v1-53 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-53 action-mask) (collide-action solid)) + ) + (when (< (fill-and-probe-using-line-sphere *collide-cache* a1-19) 0.0) + (set! sv-172 (* sv-1736 (* f30-0 f30-0))) + (set! sv-168 #t) + (let ((f0-18 sv-156)) + (when arg0 + (set! f0-18 (fmin (fmax sv-156 (* 1.5 sv-1736)) (* 3.0 sv-156))) + (if (-> this was-hit-previously?) + (set! f0-18 (fmin f0-18 (* 2.0 sv-156))) + ) + ) + (vector-normalize-copy! sv-164 sv-1732 f0-18) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let* ((s2-1 *target*) + (s3-3 (if (type? s2-1 process-focusable) + s2-1 + ) + ) + ) + (when (and s3-3 (< (vector-vector-distance (get-trans s3-3 0) sv-144) (-> sv-144 r))) + (when (and (!= s5-0 s3-3) + (not (focus-test? s3-3 disable dead inactive gun-no-target)) + (logtest? (process-mask enemy guard civilian) (-> s3-3 mask)) + (not (focus-test? s3-3 no-gravity)) + (!= s3-3 sv-148) + ) + (set! sv-2304 (get-trans s3-3 3)) + (set! sv-2308 (new 'stack-no-clear 'vector)) + (set! sv-2312 (the-as float 0.0)) + (vector-! sv-2308 sv-2304 (the-as vector sv-144)) + (set! sv-2312 (vector-normalize-ret-len! sv-2308 1.0)) + (when (and (>= sv-160 sv-2312) (< sv-2312 sv-172) (< sv-2312 (* 4.5 sv-156))) + (let ((f30-1 (vector-dot sv-152 sv-2308)) + (f0-28 0.707) + ) + (if arg0 + (set! f0-28 0.5) + ) + (when (< f0-28 f30-1) + (let ((a1-29 (new 'stack 'collide-query))) + (set! (-> a1-29 start-pos quad) (-> sv-144 quad)) + (vector-! (-> a1-29 move-dist) sv-2304 (-> a1-29 start-pos)) + (let ((v1-103 a1-29)) + (set! (-> v1-103 radius) (* 0.8 (-> (the-as process-focusable s5-0) root root-prim prim-core world-sphere w))) + (set! (-> v1-103 collide-with) (collide-spec backgnd obstacle)) + (set! (-> v1-103 ignore-process0) #f) + (set! (-> v1-103 ignore-process1) #f) + (set! (-> v1-103 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-103 action-mask) (collide-action solid)) + ) + (when (< (fill-and-probe-using-line-sphere *collide-cache* a1-29) 0.0) + (set! sv-172 (* sv-2312 (* f30-1 f30-1))) + (set! sv-168 #t) + (let ((f0-34 sv-156)) + (when arg0 + (set! f0-34 (fmin (fmax sv-156 (* 1.5 sv-2312)) (* 3.0 sv-156))) + (if (-> this was-hit-previously?) + (set! f0-34 (fmin f0-34 (* 2.0 sv-156))) + ) + ) + (vector-normalize-copy! sv-164 sv-2308 f0-34) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (when sv-168 + (let ((v0-1 (-> (the-as process-focusable s5-0) root transv))) + (set! (-> v0-1 quad) (-> sv-164 quad)) + v0-1 + ) + ) + ) + ) + ) + +;; definition for method 16 of type gravity-spinner +;; WARN: Return type mismatch int vs none. +(defmethod gravity-spinner-method-16 ((this gravity-spinner) (arg0 vector) (arg1 vector)) + (local-vars (sv-48 vector) (sv-52 vector) (sv-56 float)) + (let* ((s2-0 (handle->process (-> this parent-hand))) + (s4-0 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (when s4-0 + (set! sv-48 (vector-! (new 'stack-no-clear 'vector) arg0 (get-trans (the-as process-focusable s4-0) 3))) + (set! sv-52 (new 'stack-no-clear 'vector)) + (let ((f30-0 1.0) + (f0-0 (gravity-spinner-method-18 this s4-0)) + (f1-1 (fmin 12288.0 (-> (the-as process-focusable s4-0) root root-prim prim-core world-sphere w))) + ) + (set! sv-56 (/ f30-0 (* f0-0 (* f1-1 f1-1)))) + ) + (vector-cross! sv-52 sv-48 arg1) + (vector+float*! (-> this rotation-accel) (-> this rotation-accel) sv-52 sv-56) + ) + ) + 0 + (none) + ) + +;; definition for method 24 of type gravity-spinner +;; WARN: Return type mismatch quaternion vs none. +(defmethod rotate! ((this gravity-spinner) (arg0 quaternion)) + (let* ((s4-0 (handle->process (-> this parent-hand))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when s5-0 + (let* ((s4-1 (get-trans (the-as process-focusable s5-0) 3)) + (s3-1 (vector-! (new 'stack-no-clear 'vector) (-> (the-as process-focusable s5-0) root trans) s4-1)) + ) + (let ((s2-0 (new 'stack-no-clear 'matrix))) + (quaternion->matrix s2-0 arg0) + (vector-matrix*! s3-1 s3-1 s2-0) + ) + (set! (-> (the-as process-focusable s5-0) root root-prim local-sphere x) (- (-> s3-1 x))) + (set! (-> (the-as process-focusable s5-0) root root-prim local-sphere y) (- (-> s3-1 y))) + (set! (-> (the-as process-focusable s5-0) root root-prim local-sphere z) (- (-> s3-1 z))) + (vector+! (-> (the-as process-focusable s5-0) root trans) s4-1 s3-1) + ) + (quaternion*! + (-> (the-as process-focusable s5-0) root quat) + arg0 + (-> (the-as process-focusable s5-0) root quat) + ) + (quaternion-normalize! (-> (the-as process-focusable s5-0) root quat)) + ) + ) + (none) + ) + +;; definition for method 17 of type gravity-spinner +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod update-rotation ((this gravity-spinner) (arg0 symbol)) + (cond + ((< (current-time) (+ (-> this end-time) (seconds -0.2))) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (set! (-> s5-1 quad) (-> this rotation-accel quad)) + 0.0 + (let* ((f0-1 (vector-normalize-ret-len! s5-1 1.0)) + (f0-2 (* 182.04445 f0-1)) + (f0-3 (* 360.0 f0-2)) + (f0-4 (* 0.2 f0-3)) + (f30-0 (fmin 116508.445 f0-4)) + (s4-0 (handle->process (-> this parent-hand))) + ) + (if (if (type? s4-0 process-focusable) + s4-0 + ) + (rotate! this (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) s5-1 (* f30-0 (seconds-per-frame)))) + ) + ) + ) + (if (< 0.2 (vector-length (-> this rotation-accel))) + (vector-float*! (-> this rotation-accel) (-> this rotation-accel) (- 1.0 (* 0.2 (seconds-per-frame)))) + ) + ) + (else + (let* ((s3-1 (handle->process (-> this parent-hand))) + (s4-2 (if (type? s3-1 process-focusable) + s3-1 + ) + ) + ) + (when s4-2 + (let ((s2-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> (the-as process-focusable s4-2) root quat))) + (s3-2 (new 'stack-no-clear 'quaternion)) + (f30-1 (* 4.0 (seconds-per-frame))) + ) + (let ((a0-18 s2-0)) + (set! (-> a0-18 quad) (-> s2-0 quad)) + (set! (-> a0-18 y) 0.0) + (vector-normalize! a0-18 1.0) + ) + (quaternion-look-at! s3-2 s2-0 *up-vector*) + (let ((s2-1 (quaternion-copy! (new 'stack-no-clear 'quaternion) (-> (the-as process-focusable s4-2) root quat)))) + (if arg0 + (quaternion-copy! s2-1 s3-2) + (quaternion-slerp! s2-1 s2-1 s3-2 f30-1) + ) + (let ((a1-16 + (quaternion*! + (new 'stack-no-clear 'quaternion) + s2-1 + (quaternion-inverse! (new 'stack-no-clear 'quaternion) (-> (the-as process-focusable s4-2) root quat)) + ) + ) + ) + (rotate! this a1-16) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate zero-g-vehicle (gravity-spinner) + :virtual #t + :enter (behavior () + (let* ((gp-0 (current-time)) + (f30-0 300.0) + (f28-0 6.0) + (f26-0 2.0) + (v1-5 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-6 (the-as number (logior #x3f800000 v1-5))) + ) + (set! (-> self end-time) + (+ gp-0 + (the int + (* f30-0 + (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-6)))) + (if (logtest? (game-secrets gun-upgrade-dark-2) (-> *game-info* secrets)) + 1.5 + 1.0 + ) + ) + ) + ) + ) + ) + (set! (-> self end-time) (- (-> self end-time) (-> self time-subtract))) + (set! (-> self end-time) (the-as time-frame (max (-> self end-time) (+ (current-time) (seconds 2))))) + (send-event + (handle->process (-> self parent-hand)) + 'attack + #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) + (mode 'eco-dark) + (attacker-velocity *zero-vector*) + (penetrate-using (penetrate explode jak-dark-blackhole)) + ) + ) + ) + ) + :code (behavior () + (until (< (-> self end-time) (current-time)) + (suspend) + ) + (let* ((f0-1 (+ 0.5 (* 0.0625 (-> self cached-damage)))) + (f0-2 (fmin 0.9 f0-1)) + ) + (send-event (handle->process (-> self parent-hand)) 'gun-dark-2-off f0-2) + ) + (let ((gp-0 (handle->process (-> self parent-hand)))) + (if (if (type? gp-0 process-focusable) + gp-0 + ) + (send-event + (handle->process (-> self parent-hand)) + 'attack + #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) + (penetrate-using (penetrate vehicle)) + (vector *zero-vector*) + (attacker-velocity *zero-vector*) + (mode 'gravity-end) + ) + ) + ) + ) + ) + ) + ) + +;; definition for function zero-g-wait-for-land +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs object. +(defbehavior zero-g-wait-for-land gravity-spinner () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1.5)) + (let* ((s4-0 (handle->process (-> self parent-hand))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (cond + ((and s5-0 + (not (logtest? (-> (the-as process-focusable s5-0) focus-status) (focus-status disable dead inactive))) + ) + (if (or (< (- (-> (get-trans (the-as process-focusable s5-0) 3) y) + (-> (the-as process-focusable s5-0) root root-prim local-sphere w) + ) + (-> self ground-height) + ) + (let ((s4-1 (-> (the-as process-focusable s5-0) root))) + (and (if (type? s4-1 collide-shape-moving) + s4-1 + ) + (logtest? (-> (the-as collide-shape-moving (-> (the-as process-focusable s5-0) root)) status) + (collide-status on-surface touch-surface) + ) + ) + ) + ) + (return (the-as object 0)) + ) + (when (not (logtest? (process-mask vehicle) (-> (the-as process-focusable s5-0) mask))) + (let ((s4-2 (new 'stack 'sphere))) + (vector-lerp! + s4-2 + (-> (the-as process-focusable s5-0) root root-prim local-sphere) + (-> self original-sphere-offset) + (* 3.0 (seconds-per-frame)) + ) + (set! (-> s4-2 r) (lerp + (-> (the-as process-focusable s5-0) root root-prim local-sphere w) + (-> self original-sphere-offset r) + (* 3.0 (seconds-per-frame)) + ) + ) + (set! (-> (the-as process-focusable s5-0) root root-prim local-sphere quad) (-> s4-2 quad)) + ) + (if (>= (+ (current-time) (seconds -1)) gp-0) + (set! (-> (the-as process-focusable s5-0) root root-prim local-sphere quad) + (-> self original-sphere-offset quad) + ) + ) + ) + ) + (else + (return (the-as object 0)) + ) + ) + ) + (suspend) + ) + ) + (the-as int #f) + ) + +;; definition for symbol *zero-g-fake-attack-vec*, type vector +(define *zero-g-fake-attack-vec* (new 'static 'vector :y -0.001 :w 1.0)) + +;; failed to figure out what this is: +(defstate zero-g (gravity-spinner) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (sv-32 vector) (sv-36 float) (sv-40 uint) (sv-48 uint)) + (case message + (('get-float-speed) + (get-float-speed self) + ) + (('update-rotation) + (update-rotation self #f) + ) + (('impact) + (handle-impact self #f) + (let ((s5-1 (handle->process (-> self parent-hand)))) + (when (if (type? s5-1 process-focusable) + s5-1 + ) + (let ((f0-0 (vector-length (the-as vector (-> block param 1))))) + 0.0 + (when (< 40960.0 f0-0) + (let ((f30-0 (* 0.000024414063 f0-0))) + (format 0 "Receving impact damage ~f~%" f30-0) + (+! (-> self cached-damage) f30-0) + ) + ) + ) + ) + ) + (gravity-spinner-method-16 self (the-as vector (-> block param 0)) (the-as vector (-> block param 1))) + ) + (('is-gravity) + #t + ) + (('attack-forward) + (if (!= proc (handle->process (-> self parent-hand))) + (return 0) + ) + (set! sv-32 (vector-normalize-copy! (new 'stack-no-clear 'vector) (the-as vector (-> block param 0)) 1.0)) + (set! sv-36 (the-as float 0.0)) + (set! sv-40 (-> block param 2)) + (set! sv-48 (-> block param 3)) + (set! sv-36 (if (logtest? (attack-mask damage) (-> (the-as attack-info sv-40) mask)) + (-> (the-as attack-info sv-40) damage) + (penetrate-using->damage (the-as penetrate sv-48)) + ) + ) + (vector-float*! sv-32 sv-32 (fmin 184320.0 (vector-length (the-as vector (-> block param 4))))) + (if (!= sv-48 1024) + (vector-float*! sv-32 sv-32 (* 2.0 sv-36)) + ) + (set! (-> sv-32 y) (* 0.15 (-> sv-32 y))) + (+! (-> self cached-damage) sv-36) + (let ((s4-0 (if (type? proc process-focusable) + proc + ) + ) + ) + (when s4-0 + (vector-float*! sv-32 sv-32 (fmax 0.5 (gravity-spinner-method-18 self s4-0))) + (vector+float*! + (-> (the-as process-drawable s4-0) root transv) + (-> (the-as process-drawable s4-0) root transv) + sv-32 + 1.0 + ) + (let ((f0-17 (vector-normalize-ret-len! (-> (the-as process-drawable s4-0) root transv) 1.0))) + (vector-float*! + (-> (the-as process-drawable s4-0) root transv) + (-> (the-as process-drawable s4-0) root transv) + (fmin 143360.0 f0-17) + ) + ) + (handle-impact self #t) + (gravity-spinner-method-16 self (the-as vector (-> block param 5)) sv-32) + ) + ) + (when (< 0.0 sv-36) + (let ((v0-0 (the-as object #t))) + (set! (-> self was-hit-previously?) (the-as symbol v0-0)) + v0-0 + ) + ) + ) + ) + ) + :enter (behavior () + (let* ((gp-0 (current-time)) + (f30-0 300.0) + (f28-0 7.0) + (f26-0 2.0) + (v1-5 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-6 (the-as number (logior #x3f800000 v1-5))) + ) + (set! (-> self end-time) + (+ gp-0 + (the int + (* f30-0 + (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-6)))) + (if (logtest? (game-secrets gun-upgrade-dark-2) (-> *game-info* secrets)) + 1.5 + 1.0 + ) + ) + ) + ) + ) + ) + (set! (-> self end-time) (- (-> self end-time) (-> self time-subtract))) + (set! (-> self end-time) (the-as time-frame (max (-> self end-time) (+ (current-time) (seconds 2))))) + (send-event + (handle->process (-> self parent-hand)) + 'attack + #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) + (mode 'eco-dark) + (attacker (process->handle *target*)) + (attacker-velocity *zero-vector*) + (penetrate-using (penetrate explode jak-dark-blackhole)) + ) + ) + ) + ) + :code (behavior () + (until (< (-> self end-time) (current-time)) + (when (< (-> self next-ground-probe-time) (current-time)) + (probe-ground self) + (set! (-> self next-ground-probe-time) + (the-as time-frame (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 61) 60 (current-time))) + ) + ) + (suspend) + ) + (send-event (handle->process (-> self parent-hand)) 'gun-dark-2-off) + (let* ((s5-0 (handle->process (-> self parent-hand))) + (gp-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when gp-0 + (update-rotation self #t) + (quaternion-normalize! (-> (the-as process-focusable gp-0) root quat)) + (send-event + (handle->process (-> self parent-hand)) + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) + (damage 0.2) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (penetrate-using (penetrate vehicle)) + (vector (-> (the-as process-focusable gp-0) root transv)) + (attacker-velocity (-> (the-as process-focusable gp-0) root transv)) + (mode 'gravity-end) + (attacker (process->handle *target*)) + ) + ) + ) + (let ((f0-5 + (- (- (-> (get-trans (the-as process-focusable gp-0) 3) y) + (-> (the-as process-focusable gp-0) root root-prim local-sphere w) + ) + (-> self ground-height) + ) + ) + ) + 0.0 + (set! (-> self cached-damage) (* 2.0 (-> self cached-damage))) + (let* ((f0-6 (* 0.00012207031 f0-5)) + (f0-7 (fmax 1.0 f0-6)) + ) + (+! (-> self cached-damage) f0-7) + ) + ) + (let* ((gp-1 (-> (the-as process-focusable gp-0) root)) + (v1-37 (if (type? gp-1 collide-shape-moving) + gp-1 + ) + ) + ) + (if v1-37 + (logclear! (-> (the-as collide-shape-moving v1-37) status) (collide-status on-surface touch-surface)) + ) + ) + ) + ) + (probe-ground self) + (zero-g-wait-for-land) + (send-event + (handle->process (-> self parent-hand)) + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (new-attack-id)) + (damage (-> self cached-damage)) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (penetrate-using (penetrate vehicle)) + (vector *zero-g-fake-attack-vec*) + (attacker-velocity *zero-g-fake-attack-vec*) + (mode 'eco-dark) + (attacker (process->handle *target*)) + ) + ) + ) + (let* ((s5-1 (handle->process (-> self parent-hand))) + (gp-2 (if (type? s5-1 process-focusable) + s5-1 + ) + ) + ) + (when gp-2 + (set! (-> (the-as process-focusable gp-2) root root-prim local-sphere quad) + (-> self original-sphere-offset quad) + ) + (let ((s5-2 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> (the-as process-focusable gp-2) root quat)))) + (new 'stack-no-clear 'vector) + (let ((a0-67 s5-2)) + (set! (-> a0-67 quad) (-> s5-2 quad)) + (set! (-> a0-67 y) 0.0) + (vector-normalize! a0-67 1.0) + ) + (quaternion-look-at! (-> (the-as process-focusable gp-2) root quat) s5-2 *up-vector*) + ) + ) + ) + ) + :post (behavior () + (spawn-part self) + (if (>= (-> self end-time) (current-time)) + (gravity-spinner-method-22 self) + ) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-gun-dark-2-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 for symbol *gun-gravity-shadow-control*, type shadow-control +(define *gun-gravity-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 614400.0) + :bot-plane (new 'static 'plane :y 1.0 :w 163840.0) + :top-plane (new 'static 'plane :y 1.0 :w -163840.0) + :shadow-type 2 + ) + ) + ) + +;; definition of type gravity-ring +(deftype gravity-ring (process-drawable) + ((start-pos vector :inline) + (jmod-outer joint-mod-add-local :inline) + (jmod-inner joint-mod-add-local :inline) + (ring-scale-t float) + (current-radius float) + (max-radius float) + (reverse? symbol) + (total-time float) + (ring-width float) + (stop-time time-frame) + ) + (:state-methods + expand + ) + (:methods + (gravity-ring-method-21 (_type_) none) + ) + ) + +;; definition for method 3 of type gravity-ring +(defmethod inspect ((this gravity-ring)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tstart-pos: #~%" (-> this start-pos)) + (format #t "~2Tjmod-outer: #~%" (-> this jmod-outer)) + (format #t "~2Tjmod-inner: #~%" (-> this jmod-inner)) + (format #t "~2Tring-scale-t: ~f~%" (-> this ring-scale-t)) + (format #t "~2Tcurrent-radius: ~f~%" (-> this current-radius)) + (format #t "~2Tmax-radius: ~f~%" (-> this max-radius)) + (format #t "~2Treverse?: ~A~%" (-> this reverse?)) + (format #t "~2Ttotal-time: ~f~%" (-> this total-time)) + (format #t "~2Tring-width: ~f~%" (-> this ring-width)) + (format #t "~2Tstop-time: ~D~%" (-> this stop-time)) + (label cfg-4) + this + ) + +;; definition for function gravity-ring-init-by-other +;; INFO: Used lq/sq +(defbehavior gravity-ring-init-by-other gravity-ring ((arg0 vector) (arg1 symbol) (arg2 float) (arg3 float) (arg4 float) (arg5 time-frame)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-identity! (-> self root quat)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-gun-dark-2-ring" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self draw shadow-ctrl) *gun-gravity-shadow-control*) + (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)) + (let ((v1-13 (-> self draw shadow-ctrl))) + (logclear! (-> v1-13 settings flags) (shadow-flags disable-draw)) + ) + 0 + (logclear! (-> self draw status) (draw-control-status no-draw)) + (set! (-> self total-time) arg3) + (set! (-> self reverse?) arg1) + (set! (-> self max-radius) arg2) + (set! (-> self ring-width) arg4) + (+! (-> self root trans y) (-> self max-radius)) + (ja-post) + (setup-masks (-> self draw) 0 1) + (set-time! (-> self state-time)) + (set! (-> self stop-time) arg5) + (go-virtual expand) + ) + +;; failed to figure out what this is: +(defstate expand (gravity-ring) + :virtual #t + :trans (behavior () + (gravity-ring-method-21 self) + ) + :code sleep-code + :post (behavior () + (ja-post) + ) + ) + +;; definition for method 21 of type gravity-ring +;; WARN: Return type mismatch float vs none. +(defmethod gravity-ring-method-21 ((this gravity-ring)) + (let* ((a0-1 *time-of-day-context*) + (v1-0 (-> a0-1 light-group)) + (s4-0 (-> v1-0 0 ambi color)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (-> a0-1 current-prt-color) + (-> a0-1 current-env-color) + (vector4-lerp! s5-0 (-> v1-0 0 dir0 color) (-> v1-0 0 dir1 color) (-> v1-0 0 dir1 extra x)) + (fmax (fmax (-> s4-0 x) (-> s4-0 y)) (-> s4-0 z)) + (fmax (fmax (-> s5-0 x) (-> s5-0 y)) (-> s5-0 z)) + (let* ((f0-10 (+ (* 0.2 (-> s4-0 x)) (* 0.75 (-> s4-0 y)) (* 0.05 (-> s4-0 z)))) + (f1-12 (+ (* 0.2 (-> s5-0 x)) (* 0.75 (-> s5-0 y)) (* 0.05 (-> s5-0 z)))) + (f0-12 (* 0.5 (+ f0-10 f1-12))) + (f30-0 (lerp-scale-clamp 0.0 1.0 f0-12 0.0 1.0)) + (s5-1 (new 'stack 'rgbaf)) + (s3-0 (new 'stack 'rgbaf)) + (s4-1 0) + ) + (cond + ((or (= (status-of-level-and-borrows *level* 'desert #f) 'active) + (= (status-of-level-and-borrows *level* 'waswide #f) 'active) + (= (status-of-level-and-borrows *level* 'wasdoors #f) 'active) + ) + (set-vector! s5-1 0.85 1.1 1.1 0.25) + ) + (else + (set-vector! s5-1 0.4 2.0 2.0 0.25) + (set-vector! s3-0 0.7 1.15 1.15 0.25) + (vector-lerp! s5-1 s5-1 s3-0 f30-0) + ) + ) + (set! (-> s5-1 w) 0.25) + (let ((t1-0 + (logior (logand (logior (logand (logior (logand (logior (logand s4-1 -256) (shr (shl (the int (* 127.5 (-> s5-1 x))) 56) 56)) -65281) + (shr (shl (the int (* 127.5 (-> s5-1 y))) 56) 48) + ) + -16711681 + ) + (shr (shl (the int (* 127.5 (-> s5-1 z))) 56) 40) + ) + (the-as uint #xffffffff00ffffff) + ) + (shr (shl (the int (* 127.5 (-> s5-1 w))) 56) 32) + ) + ) + ) + (set-setting! 'highlight-color #f 0.0 t1-0) + ) + ) + ) + (let* ((f0-38 (-> this total-time)) + (f24-0 (/ (* 0.0033333334 (the float (- (current-time) (-> this state-time)))) f0-38)) + ) + 0.0 + (let ((f30-1 (-> this ring-width)) + (f22-0 1.0) + ) + 1.0 + (let ((f26-0 1.1) + (f28-0 0.5) + ) + (set! (-> this max-radius) 102400.0) + (if (-> this reverse?) + (set! f24-0 (- 1.0 f24-0)) + ) + (if (time-elapsed? (-> this state-time) (the int (* 1800.0 f0-38))) + (set! f28-0 + (lerp + f28-0 + 0.0 + (fmax 0.0 (fmin 1.0 (- (* 0.0033333334 (the float (- (current-time) (-> this state-time)))) (* 6.0 f0-38)))) + ) + ) + ) + (if (= f28-0 0.0) + (go empty-state) + ) + (let ((f26-1 + (+ (-> this ring-scale-t) + (* (cond + ((time-elapsed? (-> this stop-time) (the int (* 300.0 f26-0))) + (let ((f1-27 1.0)) + (lerp + 0.5 + 0.05 + (fmax 0.0 (fmin 1.0 (/ (- (* 0.0033333334 (the float (- (current-time) (-> this stop-time)))) f26-0) f1-27))) + ) + ) + ) + ((>= f22-0 f24-0) + (lerp 2.3 0.4 (/ f24-0 f22-0)) + ) + (else + 0.4 + ) + ) + (seconds-per-frame) + ) + ) + ) + ) + (let ((f24-1 (* 0.00024414062 (* (-> this max-radius) f26-1)))) + 0.0 + 0.0 + 0.0 + (let* ((f0-56 f26-1) + (f0-57 (* f0-56 f0-56)) + (f1-33 (fmax (lerp f30-1 0.0 f0-57) f28-0)) + (f0-60 (fmax 0.0 (- f24-1 f1-33))) + ) + (set-vector! (-> this jmod-outer transform scale) f24-1 1.0 f24-1 1.0) + (set-vector! (-> this jmod-inner transform scale) f0-60 1.0 f0-60 1.0) + ) + ) + (set! (-> this ring-scale-t) f26-1) + ) + ) + ) + ) + (none) + ) + +;; definition of type gun-gravity +(deftype gun-gravity (process-drawable) + ((current-radius float) + (max-radius float) + (lowest-y float) + (start-pos vector :inline) + (total-time float) + (ring-closest handle) + (ring-furthest handle) + (gravity-sound sound-id) + ) + (:state-methods + expand + ) + (:methods + (gun-gravity-method-21 (_type_) none) + (gun-gravity-method-22 (_type_ symbol) none) + (spawn-gravity-spinner (_type_ process) (pointer gravity-spinner)) + (gun-gravity-method-24 (_type_) none) + ) + ) + +;; definition for method 3 of type gun-gravity +(defmethod inspect ((this gun-gravity)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tcurrent-radius: ~f~%" (-> this current-radius)) + (format #t "~2Tmax-radius: ~f~%" (-> this max-radius)) + (format #t "~2Tlowest-y: ~f~%" (-> this lowest-y)) + (format #t "~2Tstart-pos: #~%" (-> this start-pos)) + (format #t "~2Ttotal-time: ~f~%" (-> this total-time)) + (format #t "~2Tring-closest: ~D~%" (-> this ring-closest)) + (format #t "~2Tring-furthest: ~D~%" (-> this ring-furthest)) + (format #t "~2Tgravity-sound: ~D~%" (-> this gravity-sound)) + (label cfg-4) + this + ) + +;; definition for function gun-gravity-init-by-other +;; INFO: Used lq/sq +(defbehavior gun-gravity-init-by-other gun-gravity ((arg0 vector) (arg1 vector)) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self root trans quad) (-> arg0 quad)) + (let ((s4-0 (new 'stack-no-clear 'collide-query))) + 0.0 + (vector+float*! (-> s4-0 start-pos) (-> self root trans) *up-vector* 24576.0) + (set! (-> s4-0 move-dist quad) (the-as uint128 0)) + (set! (-> s4-0 move-dist y) -81920.0) + (let ((v1-7 s4-0)) + (set! (-> v1-7 radius) 40.96) + (set! (-> v1-7 collide-with) (collide-spec backgnd pusher)) + (set! (-> v1-7 ignore-process0) #f) + (set! (-> v1-7 ignore-process1) #f) + (set! (-> v1-7 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-7 action-mask) (collide-action solid)) + ) + (if (>= (fill-and-probe-using-line-sphere *collide-cache* s4-0) 0.0) + (set! (-> self root trans y) (-> s4-0 best-other-tri intersect y)) + ) + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.2)) + (let ((s4-1 quaternion-look-at!) + (s3-0 (-> self root quat)) + (a0-12 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-12 quad) (-> arg1 quad)) + (set! (-> a0-12 y) 0.0) + (s4-1 s3-0 (vector-normalize! a0-12 1.0) *up-vector*) + ) + (set! (-> self max-radius) 122880.0) + (set! (-> self total-time) 1.0) + (if (logtest? (game-secrets gun-upgrade-dark-2) (-> *game-info* secrets)) + (set! (-> self total-time) (* 1.5 (-> self total-time))) + ) + (set! (-> self start-pos quad) (-> arg0 quad)) + (set! (-> self ring-closest) (the-as handle #f)) + (set! (-> self ring-furthest) (the-as handle #f)) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 118) self)) + (set! (-> self gravity-sound) (new-sound-id)) + (go-virtual expand) + ) + +;; definition for method 10 of type gun-gravity +(defmethod deactivate ((this gun-gravity)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this gravity-sound)) + (call-parent-method this) + (none) + ) + +;; failed to figure out what this is: +(defstate expand (gun-gravity) + :virtual #t + :enter (behavior () + (set! (-> self lowest-y) (-> self root trans y)) + (set-time! (-> self state-time)) + (sound-play "grav-gun" :id (-> self gravity-sound) :position (-> self root trans)) + ) + :trans (behavior () + (cond + ((not (time-elapsed? (-> self state-time) (the int (* 300.0 (-> self total-time))))) + (let* ((f0-4 (* 0.0033333334 (the float (- (current-time) (-> self state-time))))) + (f1-3 (-> self total-time)) + (f0-6 (/ (- f0-4 (* (the float (the int (/ f0-4 f1-3))) f1-3)) (-> self total-time))) + ) + (set! (-> self current-radius) (* (-> self max-radius) f0-6)) + ) + (gun-gravity-method-22 self #f) + ) + (else + (if (not (time-elapsed? (-> self state-time) (the int (* 2025.0 (-> self total-time))))) + (gun-gravity-method-22 self #t) + ) + ) + ) + (cond + ((not (time-elapsed? (-> self state-time) (the int (* 2025.0 (-> self total-time))))) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> self root trans)))) + 0.0 + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((f0-16 (fmin (vector-normalize-ret-len! s5-1 1.0) (-> self current-radius)))) + (vector+float*! gp-0 (-> self root trans) s5-1 f0-16) + ) + (sound-play "grav-gun" :id (-> self gravity-sound) :position gp-0) + ) + ) + (dotimes (gp-1 6) + (let* ((s5-2 vector-rotate-around-y!) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-0 *x-vector*) + (f30-0 65536.0) + (v1-27 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-28 (the-as number (logior #x3f800000 v1-27))) + (s4-1 (s5-2 s4-0 s3-0 (* f30-0 (+ -1.0 (the-as float v1-28))))) + (s5-3 (new 'stack-no-clear 'vector)) + ) + 0.0 + 0.0 + (let* ((f30-1 (-> self current-radius)) + (f28-0 (fmax 0.0 (+ -40960.0 (-> self current-radius)))) + (s3-1 s5-3) + (s2-0 (-> self root trans)) + (v1-33 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-34 (the-as number (logior #x3f800000 v1-33))) + ) + (vector+float*! s3-1 s2-0 s4-1 (+ f28-0 (* (+ -1.0 (the-as float v1-34)) (- f30-1 f28-0)))) + ) + (let ((s4-2 (new 'stack-no-clear 'collide-query))) + 0.0 + (vector+float*! (-> s4-2 start-pos) s5-3 *up-vector* 24576.0) + (set! (-> s4-2 move-dist quad) (the-as uint128 0)) + (set! (-> s4-2 move-dist y) -81920.0) + (let ((v1-40 s4-2)) + (set! (-> v1-40 radius) 40.96) + (set! (-> v1-40 collide-with) (collide-spec backgnd pusher)) + (set! (-> v1-40 ignore-process0) #f) + (set! (-> v1-40 ignore-process1) #f) + (set! (-> v1-40 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-40 action-mask) (collide-action solid)) + ) + (when (>= (fill-and-probe-using-line-sphere *collide-cache* s4-2) 0.0) + (let ((f30-2 (-> s4-2 best-other-tri intersect y)) + (a1-7 (matrix-identity! (new 'stack-no-clear 'matrix))) + ) + (set! (-> a1-7 trans quad) (-> s4-2 start-pos quad)) + (set! (-> a1-7 trans y) f30-2) + (spawn-from-mat (-> self part) a1-7) + ) + ) + ) + ) + ) + ) + (else + (sound-stop (-> self gravity-sound)) + ) + ) + ) + :code (behavior () + (let ((f30-0 4.0) + (gp-0 (current-time)) + ) + (until #f + (dotimes (s5-0 5) + (let ((v1-7 (ppointer->handle (process-spawn + gravity-ring + (-> self root trans) + #f + (-> self max-radius) + (-> self total-time) + f30-0 + gp-0 + :name "gravity-ring" + :to self + ) + ) + ) + (a0-6 s5-0) + ) + (cond + ((zero? a0-6) + (set! (-> self ring-furthest) (the-as handle v1-7)) + ) + ((= a0-6 4) + (set! (-> self ring-closest) (the-as handle v1-7)) + ) + ) + ) + (set! f30-0 (+ -0.6 f30-0)) + (let ((s4-1 (current-time))) + (until (time-elapsed? s4-1 (seconds 0.15)) + (suspend) + ) + ) + ) + (let ((s5-1 (current-time))) + (until (time-elapsed? s5-1 (seconds 13.5)) + (suspend) + ) + ) + (go empty-state) + (set! f30-0 4.0) + ) + ) + #f + ) + ) + +;; definition for method 23 of type gun-gravity +;; WARN: Return type mismatch (pointer process) vs (pointer gravity-spinner). +(defmethod spawn-gravity-spinner ((this gun-gravity) (arg0 process)) + (process-spawn + gravity-spinner + (process->handle arg0) + (-> this root trans) + (- (current-time) (-> this state-time)) + :name "gravity-spinner" + :to arg0 + ) + ) + +;; definition for method 22 of type gun-gravity +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer gravity-spinner) vs none. +(defmethod gun-gravity-method-22 ((this gun-gravity) (arg0 symbol)) + (local-vars (v1-29 symbol) (v1-49 symbol)) + (with-pp + (let ((s5-0 (new 'stack-no-clear 'vector)) + (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) 'get-vehicle) + (let ((s4-0 (the-as process (send-event-function *target* a1-1))) + (f30-0 0.0) + (f28-0 (-> this current-radius)) + ) + (set! (-> s5-0 quad) (-> this root trans quad)) + (when arg0 + (let ((v1-5 (handle->process (-> this ring-closest)))) + (if v1-5 + (set! f30-0 (* (-> (the-as gravity-ring v1-5) max-radius) (-> (the-as gravity-ring v1-5) ring-scale-t))) + ) + ) + (let ((v1-8 (handle->process (-> this ring-furthest)))) + (if v1-8 + (set! f28-0 (* (-> (the-as gravity-ring v1-8) max-radius) (-> (the-as gravity-ring v1-8) ring-scale-t))) + ) + ) + (set! f28-0 (* 0.85 f28-0)) + (set! f30-0 (* 0.85 f30-0)) + (set! (-> this current-radius) (* 0.5 (+ f30-0 f28-0))) + ) + (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)) + (let* ((s1-0 (-> s3-1 s2-0)) + (v1-17 (if (type? s1-0 collide-shape) + s1-0 + ) + ) + ) + (when v1-17 + (let* ((s0-0 (-> v1-17 process)) + (s1-1 (if (type? s0-0 process-focusable) + s0-0 + ) + ) + ) + (when s1-1 + (when (and (!= *target* s1-1) + (not (focus-test? (the-as process-focusable s1-1) disable dead inactive)) + (logtest? (process-mask crate enemy guard vehicle civilian) (-> s1-1 mask)) + (!= s4-0 s1-1) + ) + (let ((f0-6 (vector-vector-distance (get-trans (the-as process-focusable s1-1) 3) s5-0))) + (when (and (>= f28-0 f0-6) (>= f0-6 f30-0)) + (let ((v1-27 (-> s1-1 child))) + (while v1-27 + (when (= (-> v1-27 0 type) gravity-spinner) + (set! v1-29 #t) + (goto cfg-47) + ) + (set! v1-27 (-> v1-27 0 brother)) + ) + ) + (set! v1-29 #f) + (label cfg-47) + (if (not v1-29) + (spawn-gravity-spinner this s1-1) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let* ((s2-1 *target*) + (s3-2 (if (type? s2-1 process-focusable) + s2-1 + ) + ) + ) + (when (and s3-2 (< (vector-vector-distance (get-trans s3-2 0) s5-0) (-> s5-0 w))) + (when (and (!= *target* s3-2) + (not (focus-test? s3-2 disable dead inactive)) + (logtest? (process-mask crate enemy guard vehicle civilian) (-> s3-2 mask)) + (!= s4-0 s3-2) + ) + (let ((f0-8 (vector-vector-distance (get-trans s3-2 3) s5-0))) + (when (and (>= f28-0 f0-8) (>= f0-8 f30-0)) + (let ((v1-47 (-> s3-2 child))) + (while v1-47 + (when (= (-> v1-47 0 type) gravity-spinner) + (set! v1-49 #t) + (goto cfg-79) + ) + (set! v1-47 (-> v1-47 0 brother)) + ) + ) + (set! v1-49 #f) + (label cfg-79) + (if (not v1-49) + (spawn-gravity-spinner this s3-2) + ) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + ) + +;; definition for function gun-fire-dark-2 +;; INFO: Used lq/sq +(defbehavior gun-fire-dark-2 target () + (set-last-fire-time 36) + (cond + ((logtest? (-> *part-group-id-table* 120 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self gun fire-point quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 120)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self gun fire-point quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 120)) + ) + ) + (process-spawn + gun-gravity + (-> self gun fire-point) + (-> self gun fire-dir-out) + :name "gun-gravity" + :to (ppointer->process (-> self gun gun)) + ) + ) + +;; definition for function target-gun-fire-dark +(defbehavior target-gun-fire-dark target ((arg0 pickup-type)) + (case arg0 + (((pickup-type gun-dark-1)) + (gun-fire-dark-1) + ) + (((pickup-type gun-dark-2)) + (gun-fire-dark-2) + ) + (((pickup-type gun-dark-3)) + (gun-fire-dark-3) + ) + ) + ) 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 0b9e67e601..a24d00c829 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) @@ -375,8 +376,8 @@ ((gun-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 1.5) :shadow gun-shadow-mg - :shadow-joint-index 3 - :light-index 1 + :sort 1 + :origin-joint-index 3 ) ;; definition for symbol *gun-shadow-control*, type shadow-control @@ -395,7 +396,7 @@ ((gun-ammo-yellow-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 1) :texture-level 10 - :light-index 1 + :sort 1 ) ;; failed to figure out what this is: @@ -403,7 +404,7 @@ ((gun-ammo-red-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 1) :texture-level 10 - :light-index 1 + :sort 1 ) ;; failed to figure out what this is: @@ -411,7 +412,7 @@ ((gun-ammo-blue-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 1) :texture-level 10 - :light-index 1 + :sort 1 ) ;; failed to figure out what this is: @@ -419,7 +420,7 @@ ((gun-ammo-dark-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 1) :texture-level 10 - :light-index 1 + :sort 1 ) ;; failed to figure out what this is: 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 new file mode 100644 index 0000000000..004ac224f9 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-part_REF.gc @@ -0,0 +1,5150 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +gun + +;; failed to figure out what this is: +(defpart 207 + :init-specs ((:texture (lasersmoke-00 level-default-sprite)) + (:birth-func 'birth-func-laser-pointer) + (:num 1.0) + (:scale-x (meters 0.075) (meters 0.05)) + (:scale-y (meters 40)) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 16.0 8.0) + (:fade-a -1.6) + (:timer (seconds 0.05)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 + 10 + 1 + 0 + #x401a00 + #x401b00 + #x401c00 + #x401d00 + #x401e00 + #x401f00 + #x402000 + #x402100 + #x402200 + #x402300 + #x402400 + #x402500 + #x402600 + #x402700 + #x402800 + #x402900 + #x402a00 + #x402b00 + #x402c00 + #x402d00 + #x402e00 + #x402f00 + #x403000 + #x403100 + #x403200 + #x403300 + #x403400 + #x403500 + #x403600 + #x403700 + #x403800 + #x403900 + ) + ) + (:func 'sparticle-texture-animate) + ) + ) + +;; definition for function sparticle-track-gun-joint +;; WARN: Return type mismatch int vs none. +(defun sparticle-track-gun-joint ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (-> arg1 key) + (let ((v1-1 *target*) + (a1-1 36) + ) + (when v1-1 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> v1-1 node-list data a1-1)) + (set! (-> arg2 x) (-> *target* gun fire-point x)) + (set! (-> arg2 y) (-> *target* gun fire-point y)) + (set! (-> arg2 z) (-> *target* gun fire-point z)) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-laser-glow + :id 83 + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 208 :flags (sp6)) (sp-item 209 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 209 + :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 255.0) + (:g 32.0 8.0) + (:b :copy g) + (:a 48.0 16.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 208 + :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.1)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b :copy g) + (:a 64.0 32.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 210 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.2) (meters 0.05)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0 128.0) + (:b :copy g) + (:a 100.0 28.0) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 glow)) + (:userdata 1.0) + ) + ) + +;; failed to figure out what this is: +(defpart 211 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.2) (meters 0.1)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0 32.0) + (:b :copy g) + (:a 32.0 32.0) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 glow)) + (:userdata 1.0) + ) + ) + +;; failed to figure out what this is: +(defpart 212 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.4) (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 32.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) + ) + ) + +;; failed to figure out what this is: +(defpart 213 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 8)) + (:scale-y (meters 8)) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 128.0) + (:fade-a -2.56) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-red-shot-fired + :id 84 + :duration (seconds 0.017) + :linger-duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 214) (sp-item 215)) + ) + +;; failed to figure out what this is: +(defpart 214 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5) (meters 0.5)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 96.0) + (:scalevel-x (meters 0.053333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -12.75) + (:fade-a -2.4) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + ) + ) + +;; failed to figure out what this is: +(defpart 215 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.5) (meters 0.5)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 96.0) + (:scalevel-x (meters 0.21333334)) + (:scalevel-y :copy scalevel-x) + (:fade-g -12.8) + (:fade-b -3.2) + (:fade-a -4.8) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-red-shot-reload + :id 85 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 216)) + ) + +;; failed to figure out what this is: +(defpart 216 + :init-specs ((:texture (common-white common)) + (:num 2.0) + (:scale-x (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.08)) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.053333335) (meters 0.10666667)) + (:rotvel-z (degrees -1440) (degrees 2880)) + (:fade-a -0.42666668) + (:accel-y (meters -0.005) (meters -0.0016666667)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2)) + (:conerot-x (degrees -60) (degrees 120)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; definition for symbol *red-shot-colors*, type (pointer rgba) +(define *red-shot-colors* (new 'static 'array rgba 36 + (new 'static 'rgba :r #xfe :g #xfe :b #xfe :a #x80) + (new 'static 'rgba :r #xfe :g #xfe :b #xfe) + (new 'static 'rgba :r #xfe :g #xfe :b #xfe) + (new 'static 'rgba :r #xfe :g #xfe :b #xfe) + (new 'static 'rgba :r #xfe :g #x80 :a #x40) + (new 'static 'rgba :r #xfe :g #xfe :b #xfe :a #x80) + (new 'static 'rgba :r #xfe :g #xfe :b #xfe) + (new 'static 'rgba :r #xfe :g #xfe :b #xfe) + (new 'static 'rgba :r #xfe :g #x80 :a #x20) + (new 'static 'rgba :r #xfe :g #x80 :a #x40) + (new 'static 'rgba :r #xfe :g #xfe :b #xfe :a #x80) + (new 'static 'rgba :r #xfe :g #xfe :b #xfe) + (new 'static 'rgba :r #xfe :g #x40 :a #x10) + (new 'static 'rgba :r #xfe :g #x80 :a #x20) + (new 'static 'rgba :r #xfe :g #x80 :a #x40) + (new 'static 'rgba :r #xfe :g #xfe :b #xfe :a #x80) + (new 'static 'rgba :r #xfe :a #x8) + (new 'static 'rgba :r #xfe :g #x40 :a #x10) + (new 'static 'rgba :r #xfe :g #x80 :a #x20) + (new 'static 'rgba :r #xfe :g #x80 :a #x40) + (new 'static 'rgba :r #xfe :a #x4) + (new 'static 'rgba :r #xfe :a #x8) + (new 'static 'rgba :r #xfe :g #x40 :a #x10) + (new 'static 'rgba :r #xfe :g #x80 :a #x20) + (new 'static 'rgba :r #xfe) + (new 'static 'rgba :r #xfe :a #x4) + (new 'static 'rgba :r #xfe :a #x8) + (new 'static 'rgba :r #xfe :g #x40 :a #x10) + (new 'static 'rgba :r #xfe) + (new 'static 'rgba :r #xfe) + (new 'static 'rgba :r #xfe :a #x4) + (new 'static 'rgba :r #xfe :a #x8) + (new 'static 'rgba :r #xfe :g #xfe :b #xfe) + (new 'static 'rgba :r #xfe) + (new 'static 'rgba :r #xfe) + (new 'static 'rgba :r #xfe :a #x4) + ) + ) + +;; failed to figure out what this is: +(defpart 217 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 8)) + (:scale-y (meters 8)) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 128.0) + (:fade-a -2.56) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-red3-shot-fired + :id 86 + :duration (seconds 0.017) + :linger-duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 214) (sp-item 215)) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-red3-shot-glow + :id 87 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 218)) + ) + +;; failed to figure out what this is: +(defpart 218 + :init-specs ((:texture (redpuff level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 0.8)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-red3-shot-explode + :id 88 + :duration (seconds 5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 219 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 220 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 221 :period (seconds 30) :length (seconds 0.035)) + (sp-item 222 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 223 :period (seconds 30) :length (seconds 0.167)) + (sp-item 224 :period (seconds 30) :length (seconds 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 219 + :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 220 + :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 225 + :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 64.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 128.0) + (:vel-y (meters 0.33333334) (meters 0.13333334)) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.7) + (:timer (seconds 1)) + (: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 221 + :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-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 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-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-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-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-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-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 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-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 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-gun-red3-explosion-dust-in-curve-settings*, type particle-curve-settings +(define *part-gun-red3-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* 221 init-specs 14 initial-valuef) + (the-as float *part-gun-red3-explosion-dust-in-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-gun-red3-explosion-dust-in-curve-settings* color-start) *range-explo-dust-color*) + +;; failed to figure out what this is: +(set! (-> *part-gun-red3-explosion-dust-in-curve-settings* alpha-start) *range-explo-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-gun-red3-explosion-dust-in-curve-settings* scale-x-start) *range-explo-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-gun-red3-explosion-dust-in-curve-settings* scale-y-start) *range-explo-dust-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-gun-red3-explosion-dust-in-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-gun-red3-explosion-dust-in-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-gun-red3-explosion-dust-in-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-gun-red3-explosion-dust-in-curve-settings* a-scalar) *curve-explo-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-gun-red3-explosion-dust-in-curve-settings* scale-x-scalar) *curve-explo-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-gun-red3-explosion-dust-in-curve-settings* scale-y-scalar) *curve-explo-dust-scale-y*) + +;; failed to figure out what this is: +(defpart 223 + :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 224 + :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-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-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-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-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-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-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-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-gun-red3-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-gun-red3-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* 224 init-specs 16 initial-valuef) + (the-as float *part-gun-red3-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-gun-red3-explosion-texture-curve-settings* color-start) *range-explo-color*) + +;; failed to figure out what this is: +(set! (-> *part-gun-red3-explosion-texture-curve-settings* alpha-start) *range-explo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-gun-red3-explosion-texture-curve-settings* scale-x-start) *range-explo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-gun-red3-explosion-texture-curve-settings* scale-y-start) *range-explo-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-gun-red3-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-gun-red3-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-gun-red3-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-gun-red3-explosion-texture-curve-settings* a-scalar) *curve-explo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-gun-red3-explosion-texture-curve-settings* scale-x-scalar) *curve-explo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-gun-red3-explosion-texture-curve-settings* scale-y-scalar) *curve-explo-scale-y*) + +;; failed to figure out what this is: +(defpart 222 + :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-gun-red-3-scorched-earth + :id 89 + :flags (sp0 sp1) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 226 :flags (is-3d sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 226 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 2)) + (:scale-y (meters 5) (meters 5)) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:fade-a 0.85333335 0.85333335) + (:timer (seconds 3)) + (:flags (left-multiply-quat)) + (:next-time (seconds 0.25)) + (:next-launcher 227) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 227 + :init-specs ((:fade-a 0.0) (:next-time (seconds 0.75)) (:next-launcher 228)) + ) + +;; failed to figure out what this is: +(defpart 228 + :init-specs ((:fade-a -0.21333334)) + ) + +;; failed to figure out what this is: +(defpart 229 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (: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-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 230 + :init-specs ((:texture (laser-hit2-add level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 1.3333334)) + (:scalevel-y :copy scalevel-x) + (:fade-b -2.56) + (:fade-a -5.1) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(when (or (zero? *curve-linear-up-red*) (!= loading-level global)) + (set! *curve-linear-up-red* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *curve-linear-up-red* 2 'loading-level (the-as int #f)) + ) + +;; failed to figure out what this is: +(set! (-> *curve-linear-up-red* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *curve-linear-up-red* pts data 0 second) 0.3) + +;; failed to figure out what this is: +(set! (-> *curve-linear-up-red* pts data 1 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *curve-linear-up-red* pts data 1 second) 1.0) + +;; failed to figure out what this is: +(if (or (zero? *red-shot-3-trail*) (!= loading-level global)) + (set! *red-shot-3-trail* (new 'loading-level 'light-trail-composition)) + ) + +;; failed to figure out what this is: +(set! (-> *red-shot-3-trail* color-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *red-shot-3-trail* color-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *red-shot-3-trail* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *red-shot-3-trail* alpha-2-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *red-shot-3-trail* base-alpha) 0.5) + +;; failed to figure out what this is: +(set! (-> *red-shot-3-trail* alpha-repeat-dist) 6144.0) + +;; failed to figure out what this is: +(set! (-> *red-shot-3-trail* width-mode) (the-as uint 2)) + +;; failed to figure out what this is: +(set! (-> *red-shot-3-trail* base-width) 2048.0) + +;; failed to figure out what this is: +(set! (-> *red-shot-3-trail* width-repeat-dist) 20480.0) + +;; failed to figure out what this is: +(set! (-> *red-shot-3-trail* uv-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *red-shot-3-trail* uv-repeat-dist) 16384000.0) + +;; failed to figure out what this is: +(set! (-> *red-shot-3-trail* lie-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *red-shot-3-trail* max-age) (seconds 0.5)) + +;; failed to figure out what this is: +(if #f + (set! (-> *red-shot-3-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *red-shot-3-trail* tex-id) (the-as uint #x100300)) + ) + +;; failed to figure out what this is: +(set! (-> *red-shot-3-trail* width-curve) (the-as curve2d-piecewise *curve-linear-up*)) + +;; failed to figure out what this is: +(set! (-> *red-shot-3-trail* color-curve) (the-as curve-color-piecewise *trail-color-curve-red*)) + +;; failed to figure out what this is: +(set! (-> *red-shot-3-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +;; failed to figure out what this is: +(set! (-> *red-shot-3-trail* alpha-curve-2) *curve-linear-up-red*) + +;; failed to figure out what this is: +(set! (-> *red-shot-3-trail* zbuffer?) #f) + +;; failed to figure out what this is: +(set! (-> *red-shot-3-trail* lie-vector quad) (-> *up-vector* quad)) + +;; failed to figure out what this is: +(set! (-> *red-shot-3-trail* use-tape-mode?) #f) + +;; failed to figure out what this is: +(set! (-> *red-shot-3-trail* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *red-shot-3-trail* frame-stagger) (the-as uint 1)) + +;; failed to figure out what this is: +(when (or (zero? *curve-yellow2-shot-alpha*) (!= loading-level global)) + (set! *curve-yellow2-shot-alpha* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *curve-yellow2-shot-alpha* 21 'loading-level (the-as int #f)) + ) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 0 second) 0.0) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 1 first) 0.1) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 1 second) 1.0) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 2 first) 0.4) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 2 second) 1.0) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 3 first) 0.401) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 3 second) 0.0) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 4 first) 0.45) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 4 second) 0.0) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 5 first) 0.451) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 5 second) 1.0) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 6 first) 0.5) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 6 second) 1.0) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 7 first) 0.501) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 7 second) 0.0) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 8 first) 0.55) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 8 second) 0.0) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 9 first) 0.551) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 9 second) 1.0) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 10 first) 0.6) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 10 second) 1.0) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 11 first) 0.601) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 11 second) 0.0) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 12 first) 0.65) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 12 second) 0.0) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 13 first) 0.651) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 13 second) 1.0) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 14 first) 0.7) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 14 second) 1.0) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 15 first) 0.701) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 15 second) 0.0) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 16 first) 0.75) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 16 second) 0.0) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 17 first) 0.751) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 17 second) 1.0) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 18 first) 0.8) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 18 second) 1.0) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 19 first) 0.801) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 19 second) 0.0) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 20 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *curve-yellow2-shot-alpha* pts data 20 second) 0.0) + +;; failed to figure out what this is: +(if #t + (set! *curve-yellow2-shot-color* (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 1.0 :z 1.0 :w 128.0) + (new 'static 'vector :x 1.0 :y 0.8 :z 0.8 :w 128.0) + (new 'static 'vector :x 1.0 :y 0.5 :z 0.5 :w 128.0) + (new 'static 'vector :x 1.0 :y 0.5 :z 0.5 :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-linear-down-long* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.9 :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.1111112 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if (or (zero? *yellow-shot-2-trail*) (!= loading-level global)) + (set! *yellow-shot-2-trail* (new 'loading-level 'light-trail-composition)) + ) + +;; failed to figure out what this is: +(set! (-> *yellow-shot-2-trail* color-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *yellow-shot-2-trail* color-repeat-dist) 286720.0) + +;; failed to figure out what this is: +(set! (-> *yellow-shot-2-trail* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *yellow-shot-2-trail* alpha-2-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *yellow-shot-2-trail* base-alpha) 1.0) + +;; failed to figure out what this is: +(set! (-> *yellow-shot-2-trail* alpha-repeat-dist) 286720.0) + +;; failed to figure out what this is: +(set! (-> *yellow-shot-2-trail* width-mode) (the-as uint 2)) + +;; failed to figure out what this is: +(set! (-> *yellow-shot-2-trail* base-width) 2867.2) + +;; failed to figure out what this is: +(set! (-> *yellow-shot-2-trail* width-repeat-dist) 163840.0) + +;; failed to figure out what this is: +(set! (-> *yellow-shot-2-trail* uv-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *yellow-shot-2-trail* uv-repeat-dist) 20480.0) + +;; failed to figure out what this is: +(set! (-> *yellow-shot-2-trail* lie-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *yellow-shot-2-trail* max-age) (seconds 0.5)) + +;; failed to figure out what this is: +(if #f + (set! (-> *yellow-shot-2-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *yellow-shot-2-trail* tex-id) (the-as uint #x501e00)) + ) + +;; failed to figure out what this is: +(set! (-> *yellow-shot-2-trail* width-curve) (the-as curve2d-piecewise *curve-linear-up*)) + +;; failed to figure out what this is: +(set! (-> *yellow-shot-2-trail* color-curve) (the-as curve-color-piecewise *curve-yellow2-shot-color*)) + +;; failed to figure out what this is: +(set! (-> *yellow-shot-2-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down-long*)) + +;; failed to figure out what this is: +(set! (-> *yellow-shot-2-trail* alpha-curve-2) *curve-yellow2-shot-alpha*) + +;; failed to figure out what this is: +(set! (-> *yellow-shot-2-trail* zbuffer?) #f) + +;; failed to figure out what this is: +(set! (-> *yellow-shot-2-trail* lie-vector quad) (-> *up-vector* quad)) + +;; failed to figure out what this is: +(set! (-> *yellow-shot-2-trail* use-tape-mode?) #f) + +;; failed to figure out what this is: +(set! (-> *yellow-shot-2-trail* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *yellow-shot-2-trail* frame-stagger) (the-as uint 1)) + +;; failed to figure out what this is: +(defpart 231 + :init-specs ((:texture (gun-blue-beam level-default-sprite)) + (:birth-func 'birth-func-setup-beam) + (:num 1.0) + (:scale-x (meters 0.3) (meters 0.1)) + (:scale-y (meters 100) (meters 20)) + (:r 0.0) + (:g 255.0) + (:b 255.0) + (:a 32.0) + (:fade-a 3.2) + (:timer (seconds 2.167)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 30 0 0 #x401000 #x401200)) + (:func 'sparticle-texture-animate) + (:next-time (seconds 0.05)) + (:next-launcher 232) + ) + ) + +;; failed to figure out what this is: +(defpart 232 + :init-specs ((:r 64.0) + (:g 128.0) + (:b 255.0) + (:a 48.0) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y (meters -0.016666668)) + (:fade-r 1.2) + (:fade-g 0.8) + (:fade-a -0.10666667 -0.2) + (:accel-y (meters 0.000033333334)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.5)) + (:next-launcher 233) + ) + ) + +;; failed to figure out what this is: +(defpart 233 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0)) + ) + +;; failed to figure out what this is: +(defpart 234 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1) (meters 1.5)) + (:scale-y (meters 10) (meters 0.6)) + (:r 0.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.08)) + (:fade-r 3.2) + (:fade-g 3.2) + (:fade-a -6.4) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 235 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 5.0) + (:y (meters 0.25)) + (:scale-x (meters 0.2) (meters 0.1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0 128.0) + (:a 32.0 16.0) + (:omega (degrees 0)) + (:vel-y (meters 0.053333335) (meters 0.026666667)) + (:scalevel-x (meters 0.01) (meters 0.006666667)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.4 -0.4) + (:friction 0.85 0.04) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:conerot-x (degrees -45) (degrees 10)) + (:conerot-y (degrees 85) (degrees 10)) + (:rotate-y (degrees 0)) + (:conerot-radius (meters 0) (meters 0.4)) + ) + ) + +;; failed to figure out what this is: +(defpart 236 + :init-specs ((:texture (shell-casing-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:y (meters 0.25)) + (:scale-x (meters 0.35)) + (:rot-z (degrees 260) (degrees 20)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0)) + (:vel-y (meters 0.053333335) (meters 0.026666667)) + (:rotvel-z (degrees -4.8) (degrees 2.4)) + (:accel-y (meters -0.008333334) (meters -0.0016666667)) + (:friction 0.9 0.02) + (:timer (seconds 1.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 30 0 0 #x408700 #x408700 #x408700 #x408800)) + (:func 'check-shell-level1) + (:next-time (seconds 0.017) (seconds 0.53)) + (:next-launcher 237) + (:conerot-x (degrees -40) (degrees 20)) + (:conerot-y (degrees 80) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 237 + :init-specs ((:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:next-time (seconds 0.017) (seconds 0.015)) + (:next-launcher 238) + ) + ) + +;; failed to figure out what this is: +(defpart 238 + :init-specs ((:r 128.0) (:g 128.0) (:b 255.0) (:a 128.0)) + ) + +;; failed to figure out what this is: +(defpart 239 + :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 0)) + (:scale-x (meters 0.35)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0)) + (:vel-y (meters 0.026666667) (meters 0.016666668)) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:accel-y (meters -0.0026666666) (meters -0.00083333335)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 30 0 0 #x408700 #x408800 #x408900)) + (:func 'check-shell-level2) + (:next-time (seconds 0.017) (seconds 0.53)) + (:next-launcher 237) + (:conerot-x (degrees 0) (degrees 45)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 240 + :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 0)) + (:scale-x (meters 0.35)) + (:rot-z (degrees 30) (degrees 120)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:vel-x (meters 0) (meters 0.0033333334)) + (:vel-y (meters 0.016666668)) + (:vel-z (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:accel-y (meters -0.0016666667)) + (:friction 0.9) + (:timer (seconds 40)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 30 0 0 #x408800 #x408800 #x408900)) + (:next-time (seconds 0.25)) + (:next-launcher 241) + (:conerot-x (degrees 30) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 241 + :init-specs ((:sound (static-sound-spec "blue-gun-shell" :group 0)) + (:vel-x (meters 0)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:rotvel-z (degrees 0)) + (:accel-y (meters 0)) + (:next-time (seconds 2) (seconds 0.997)) + (:next-launcher 242) + ) + ) + +;; failed to figure out what this is: +(defpart 242 + :init-specs ((:sound (static-sound-spec "blue-gun-shell" :group 0)) (:fade-a -0.512)) + ) + +;; definition for function check-shell-level1 +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun check-shell-level1 ((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) + (set! (-> *part-id-table* 239 init-specs 11 initial-valuef) (-> gp-0 y)) + (launch-particles (-> *part-id-table* 239) gp-0) + (launch-particles (-> *part-id-table* 243) gp-0) + ) + ) + 0 + (none) + ) + +;; definition for function check-shell-level2 +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun check-shell-level2 ((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) + (launch-particles (-> *part-id-table* 240) gp-0) + (launch-particles (-> *part-id-table* 243) gp-0) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 243 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 0.0 1 2.0) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.03) (meters 0.005)) + (:r 255.0) + (:g 128.0 128.0) + (:b 0.0 128.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.0045)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-g -2.55 -2.55) + (:fade-b -8.0) + (:fade-a -0.64 -0.64) + (:accel-y (meters -0.00033333333) (meters -0.00033333333)) + (:friction 0.8 0.02) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 60) (degrees 20)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-blue-shot-hit + :id 90 + :duration (seconds 0.017) + :linger-duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 244 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 245 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 2) :length (seconds 0.017)) + (sp-item 246 :fade-after (meters 120) :falloff-to (meters 140) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 246 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 1)) + (:rot-x 4) + (:scale-y (meters 0.02) (meters 0.02)) + (:r 0.0) + (:g 64.0 128.0) + (:b 255.0) + (:a 64.0 64.0) + (:omega (degrees 0.0225)) + (:vel-z (meters 0.06666667) (meters 0.2)) + (:fade-r -0.42666668) + (:fade-g -0.42666668) + (:accel-y (meters -0.0013333333) (meters -0.001)) + (:friction 0.875) + (:timer (seconds 0.167) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.017) (seconds 0.98)) + (:next-launcher 247) + (:conerot-x (degrees 80) (degrees 20)) + (:conerot-y (degrees 80) (degrees 20)) + (:conerot-z (degrees 80) (degrees 20)) + (:conerot-radius (meters 0) (meters 0.2)) + ) + ) + +;; failed to figure out what this is: +(defpart 247 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:fade-a -0.42666668)) + ) + +;; failed to figure out what this is: +(defpart 245 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.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 g) + (:a 32.0 32.0) + (:vel-z (meters 0) (meters 0.016666668)) + (:scalevel-x (meters 0.0013333333) (meters 0.0033333334)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-b 0.21333334) + (:fade-a -0.32) + (:friction 0.95) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 90) (degrees 20)) + (:conerot-y (degrees 90) (degrees 20)) + (:conerot-z (degrees 90) (degrees 20)) + (:conerot-radius (meters 0) (meters 0.2)) + ) + ) + +;; failed to figure out what this is: +(defpart 244 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (: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)) + (:scale-y (meters 2) (meters 2)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 96.0) + (:rotvel-z (degrees 0.3)) + (:fade-r -5.1) + (:fade-g -3.92) + (:fade-b 0.0) + (:fade-a -2.56) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:next-time (seconds 0.035)) + (:next-launcher 248) + ) + ) + +;; failed to figure out what this is: +(defpart 248 + :init-specs ((:scale-x (meters 1)) (:scale-y :copy scale-x) (:scalevel-x (meters 0.06)) (:scalevel-y :copy scalevel-x)) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-blue-shot-die + :id 91 + :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 250 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 6)) + (:scale-y (meters 8)) + (:r 0.0) + (:g 0.0) + (:b 255.0) + (:a 128.0) + (:fade-a -2.56) + (:timer (seconds 0.167)) + (: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-dark-shot-fired + :id 92 + :duration (seconds 0.017) + :linger-duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 251 :flags (sp3 sp6)) (sp-item 252)) + ) + +;; failed to figure out what this is: +(defpart 251 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3.5) (meters 0.5)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -6.4) + (:fade-g -6.375) + (:fade-a -3.2) + (: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 252 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 32.0) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.04) (meters 0.03)) + (:r 0.0) + (:g 0.0 128.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:vel-y (meters 0.1) (meters 0.3)) + (:fade-g -2.55 -2.55) + (:fade-a -0.256 -0.256) + (:accel-y (meters -0.0033333334)) + (:friction 0.8 0.02) + (:timer (seconds 0.335) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-jak-peacemaker-shot-hit + :id 93 + :duration (seconds 0.067) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 253 :flags (sp3 sp6)) + (sp-item 254 :flags (sp3 sp6)) + (sp-item 255 :fade-after (meters 160) :falloff-to (meters 160)) + (sp-item 256) + ) + ) + +;; failed to figure out what this is: +(defpart 255 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.08) (meters 0.04)) + (:r 0.0) + (:g 0.0 128.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.005625) (degrees 0.005625)) + (:vel-y (meters 0.3) (meters 0.3)) + (:fade-g -0.85 -0.85) + (:fade-a -0.48 -0.10666667) + (:accel-y (meters -0.0033333334)) + (:friction 0.8 0.02) + (:timer (seconds 1) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 256 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 2)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 128.0) + (:a 16.0) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + ) + ) + +;; failed to figure out what this is: +(defpart 257 + :init-specs ((:texture (laser-hit2-add level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 2)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 32.0 32.0) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + ) + ) + +;; failed to figure out what this is: +(defpart 254 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 32)) + (:rot-x (degrees 22.5)) + (: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 -1.6)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + ) + ) + +;; failed to figure out what this is: +(defpart 253 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (: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 32.0) + (:scalevel-x (meters 0.21333334) (meters 0.21333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -12.75) + (:fade-g -3.1875) + (:fade-a -0.4) + (:timer (seconds 0.267)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + ) + ) + +;; definition for function sparticle-dark-shot-lightning +(defun sparticle-dark-shot-lightning ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((v1-3 (-> arg1 key proc root trans))) + (set! (-> arg2 x) (-> v1-3 x)) + (set! (-> arg2 y) (-> v1-3 y)) + (set! (-> arg2 z) (-> v1-3 z)) + ) + (sparticle-texture-animate arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-dark-shot-trail + :id 94 + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 258) (sp-item 259 :flags (sp6)) (sp-item 260 :flags (sp6)) (sp-item 261 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 260 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2.25) (meters 0.1)) + (:rot-x (degrees 2.25)) + (: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-3 glow)) + (:userdata 2048.0) + ) + ) + +;; failed to figure out what this is: +(defpart 261 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 8) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0) + (:b 255.0) + (:a 16.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + ) + ) + +;; failed to figure out what this is: +(defpart 259 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 0.0 32.0) + (:g :copy r) + (:b 128.0 128.0) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 258 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.9)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0)) + (:r 0.0) + (:g 0.0) + (:b 255.0) + (:a 0.0) + (:scalevel-y (meters 0.04)) + (:fade-r 6.4) + (:fade-g 6.4) + (:fade-a 6.4) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-dark-shot-lightning) + (:next-time (seconds 0.05) (seconds 0.015)) + (:next-launcher 262) + ) + ) + +;; failed to figure out what this is: +(defpart 262 + :init-specs ((:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:scalevel-x (meters 0)) + (:scalevel-y (meters 0)) + (:fade-r -8.533334) + (:fade-g -8.533334) + (:fade-a -8.533334) + (:next-time (seconds 0.05) (seconds 0.015)) + (:next-launcher 263) + ) + ) + +;; failed to figure out what this is: +(defpart 263 + :init-specs ((:scalevel-x (meters -0.00093750004) (meters -0.00093750004)) + (:scalevel-y (meters -0.00078125) (meters -0.00078125)) + (:fade-r -0.8) + (:fade-g -0.8) + (:fade-a -0.8) + ) + ) + +;; failed to figure out what this is: +(defpart 264 + :init-specs ((:texture (gun-yellow-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.5)) + (:scale-y (meters 16)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 64.0) + (:scalevel-x (meters -0.005)) + (:fade-a -3.2) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 265 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 0.2)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 6.0) + (:omega (degrees 6763.5)) + (:fade-a -0.3) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + ) + ) + +;; failed to figure out what this is: +(defpart 266 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 0.5 0.5) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.013333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -2.55 -1.28) + (:fade-b -1.28) + (:fade-a -0.64) + (: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 267 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 4.0 8.0) + (:z (meters 0) (meters -4)) + (:scale-x (meters 0.25) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0) + (:scalevel-x (meters -0.0020833334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 1.6) + (:fade-g -1.6) + (:fade-b -3.2 -6.4) + (:accel-y (meters -0.000033333334) (meters -0.00033333333)) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; definition for function sparticle-track-gun-joint-3d +;; WARN: Return type mismatch int vs none. +(defun sparticle-track-gun-joint-3d ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (-> arg1 key) + (let ((v1-1 *target*) + (a1-1 36) + ) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> v1-1 node-list data a1-1)) + ) + (set! (-> arg2 x) (-> *target* gun fire-point x)) + (set! (-> arg2 y) (-> *target* gun fire-point y)) + (set! (-> arg2 z) (-> *target* gun fire-point z)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 268 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y (meters 4.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0.05)) + (: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 269 + :init-specs ((:texture (gun-yellow-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.5)) + (:scale-y (meters 16)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 64.0) + (:scalevel-x (meters -0.005)) + (:fade-a -3.2) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 270 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.01)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 6.0) + (:fade-a -0.3) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 271 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 4.0 8.0) + (:z (meters 0) (meters -4)) + (:scale-x (meters 0.55) (meters 0.1)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 64.0) + (:vel-z (meters -0.016666668) (meters -0.083333336)) + (:scalevel-x (meters -0.0020833334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 1.6) + (:fade-g -1.6) + (:fade-b -3.2 -6.4) + (: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 272 + :init-specs ((:texture (hitspark level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 3598.0002)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.033333335) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a -5.1) + (:timer (seconds 0.067) (seconds 0.015)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 273 + :init-specs ((:texture (laser-hit2-add level-default-sprite)) + (:num 2.0) + (:scale-x (meters 0.01) (meters 0.1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 3598.0002)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 200.0) + (:b 30.0) + (:a 40.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.026666667) (meters 0.026666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.0) + (:fade-b -0.2) + (:fade-a -0.26666668) + (:timer (seconds 0.25) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 274 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y (meters 4.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0.05)) + (: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 275 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.15)) + (:scale-y (meters 0.8)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0.025)) + (: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 276 + :init-specs ((:texture (gun-yellow-beam level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 0.2)) + (:scale-y (meters 16)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 64.0) + (:scalevel-x (meters -0.005)) + (:fade-a -3.2) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 277 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20) (meters 30.2)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 6763.5)) + (:fade-a -0.3) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + ) + ) + +;; failed to figure out what this is: +(defpart 278 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 4.0 8.0) + (:z (meters 0) (meters -4)) + (:scale-x (meters 0.55) (meters 0.1)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 64.0) + (:vel-z (meters -0.016666668) (meters -0.083333336)) + (:scalevel-x (meters -0.0020833334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 1.6) + (:fade-g -1.6) + (:fade-b -3.2 -6.4) + (: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: +(defpartgroup group-gun-yellow-saucer-lights + :id 95 + :linger-duration (seconds 4) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 279 :flags (sp6)) (sp-item 280 :flags (is-3d sp6 sp7)) (sp-item 281 :flags (is-3d sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-yellow-saucer-lights-dark + :id 96 + :duration (seconds 2) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 282 :flags (sp3)) (sp-item 283 :flags (is-3d sp3 sp7)) (sp-item 284 :flags (is-3d sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-yellow-saucer-fizz + :id 97 + :duration (seconds 30) + :linger-duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 285 :period (seconds 2) :length (seconds 0.017)) + (sp-item 286 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 287 :flags (sp3 sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 287 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 15.0) + (:scale-x (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters 0.05) (meters 0.016666668)) + (:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.07111111) + (:accel-y (meters 0.00033333333)) + (:friction 0.9 0.02) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:next-time (seconds 0.167)) + (:next-launcher 288) + (:conerot-x (degrees 10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 288 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +;; failed to figure out what this is: +(defpart 279 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.1)) + (:scale-y (meters 0.8)) + (:r 40.0) + (:g 40.0) + (:b 40.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + (:func 'sparticle-track-root) + ) + ) + +;; failed to figure out what this is: +(defpart 280 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters -0.16)) + (:scale-x (meters 0.95)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 40.0) + (:b 40.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +;; failed to figure out what this is: +(defpart 281 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters 0.16)) + (:scale-x (meters 0.95)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 40.0) + (:b 40.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +;; failed to figure out what this is: +(defpart 282 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.1)) + (:scale-y (meters 0.8)) + (:r 10.0) + (:g 10.0) + (:b 10.0) + (:a 128.0) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 1.5)) + (:next-launcher 289) + ) + ) + +;; failed to figure out what this is: +(defpart 283 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters -0.16)) + (:scale-x (meters 0.95)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 10.0) + (:b 10.0) + (:a 128.0) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 1.5)) + (:next-launcher 289) + ) + ) + +;; failed to figure out what this is: +(defpart 284 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters 0.16)) + (:scale-x (meters 0.95)) + (:scale-y :copy scale-x) + (:r 10.0) + (:g 10.0) + (:b 10.0) + (:a 128.0) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 1.5)) + (:next-launcher 289) + ) + ) + +;; failed to figure out what this is: +(defpart 289 + :init-specs ((:fade-a -0.85333335)) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-yellow-shot-hit-3 + :id 98 + :duration (seconds 1.5) + :linger-duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 290 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 291 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 290 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.1) (meters 1.2)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.1) (meters 1.2)) + (:r 255.0) + (:g 200.0 55.0) + (:b 128.0) + (:a 32.0 128.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-a -5.12) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 291 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.5) (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) (meters 0.016666668)) + (:scalevel-x (meters 0.0013333333) (meters 0.0033333334)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-yellow-shot-hit-object-3 + :id 99 + :duration (seconds 1.5) + :linger-duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 292 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 293 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 2) :length (seconds 0.167)) + ) + ) + +;; failed to figure out what this is: +(defpart 292 + :init-specs ((:texture (laser-hit2-add level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.4) (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 200.0 55.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (: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 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 293 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0 6.0) + (:scale-x (meters 0.1) (meters 0.4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0 64.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.0033333334) (meters 0.013333334)) + (:fade-g -0.21333334 -0.21333334) + (:fade-a -0.42666668) + (:accel-y (meters -0.001)) + (:timer (seconds 1)) + (:flags (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-gun-yellow3-muzzle-smoke + :id 100 + :duration (seconds 0.067) + :linger-duration (seconds 1.667) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 294 :period (seconds 2) :length (seconds 0.017)) (sp-item 295 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 294 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 200.0 55.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -3.2) + (: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 295 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 30.0) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 28.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 64.0) + (:vel-z (meters 0.16666667) (meters 0.033333335)) + (:scalevel-x (meters 0.006666667) (meters 0.016666668)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:friction 0.95 0.04) + (:timer (seconds 1.667)) + (:flags (sp-cpuinfo-flag-13)) + (:next-time (seconds 0.667)) + (:next-launcher 296) + (:conerot-x (degrees 10) (degrees 10)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 296 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y :copy scalevel-x) (:fade-a -0.26666668) (:friction 0.99)) + ) + +;; failed to figure out what this is: +(defpart 297 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 4)) + (:scale-y (meters 4.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0.05)) + (:fade-a -3.6571429) + (:timer (seconds 0.167)) + (: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-yellow-shot-hit + :id 101 + :duration (seconds 1.5) + :linger-duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 299 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 300 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 301 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 1)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.667)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.5)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.417)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.335)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.25)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.185)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.15)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.117)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.085)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.05)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.035)) + (sp-item 302 :fade-after (meters 100) :falloff-to (meters 100) :period (seconds 2) :length (seconds 0.017)) + (sp-item 303 :fade-after (meters 40) :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 304 :fade-after (meters 130) :falloff-to (meters 130) :period (seconds 2) :length (seconds 0.017) :binding 298) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-yellow-shot-hit-object + :id 102 + :duration (seconds 1.5) + :linger-duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 305 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 306 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 301 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 303 :fade-after (meters 40) :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 304 :fade-after (meters 130) :falloff-to (meters 130) :period (seconds 2) :length (seconds 0.017) :binding 298) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + (sp-item 298 :fade-after (meters 90) :falloff-to (meters 90) :flags (sp1 sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 298 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.0 0.5) + (:scale-x (meters 0.15) (meters 0.1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 64.0) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:fade-g -3.4 -3.4) + (:fade-a -0.21333334 -1.28) + (:accel-y (meters -0.00033333333) (meters -0.00083333335)) + (:friction 0.95 0.02) + (:timer (seconds 0.667) (seconds 0.33)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 304 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 4.0 12.0) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.225) (meters 0.05)) + (:r 255.0) + (:g 255.0) + (:b 0.0) + (:a 64.0 32.0) + (:omega (degrees 0.016875) (degrees 0.03375)) + (:vel-y (meters 0.2)) + (:fade-g -1.7 -1.7) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.95 0.02) + (:timer (seconds 0.667) (seconds 0.33)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.335) (seconds 0.33)) + (:next-launcher 307) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 308 + :init-specs ((:fade-a -0.96 -0.96)) + ) + +;; failed to figure out what this is: +(defpart 301 + :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 128.0 128.0) + (:b 0.0 32.0) + (:a 24.0) + (:scalevel-x (meters 0.33333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.6857143) + (: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 303 + :init-specs ((:num 1.0) + (:rot-x 12) + (:r 4096.0) + (:g 2867.2) + (:b 1638.4) + (:fade-b 5.12) + (:timer (seconds 0.8)) + (:flags (distort)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 302 + :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.026666667) (meters 0.053333335)) + (:scalevel-x (meters -0.0005) (meters -0.0005)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.7) + (:fade-b -0.53333336) + (:accel-y (meters -0.00016666666) (meters -0.00033333333)) + (:friction 0.7) + (: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 309) + (:conerot-x (degrees 0) (degrees 180)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 309 + :init-specs ((:fade-r -1.28) (:fade-a -0.96)) + ) + +;; failed to figure out what this is: +(defpart 300 + :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 255.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 1.335)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.117)) + (:next-launcher 310) + ) + ) + +;; failed to figure out what this is: +(defpart 310 + :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 306 + :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 255.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 1.335)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.117)) + (:next-launcher 311) + ) + ) + +;; failed to figure out what this is: +(defpart 311 + :init-specs ((:scale-x (meters 4.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.05)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.75) + (:fade-b 0.0) + (:fade-a -0.6) + ) + ) + +;; failed to figure out what this is: +(defpart 299 + :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 255.0) + (:b 255.0) + (:a 64.0) + (:scalevel-x (meters 0.16666667)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.05)) + (:next-launcher 312) + ) + ) + +;; failed to figure out what this is: +(defpart 312 + :init-specs ((:scale-x (meters 3.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.02)) + (:scalevel-y :copy scalevel-x) + (:fade-b -5.1) + (:next-time (seconds 0.167)) + (:next-launcher 313) + ) + ) + +;; failed to figure out what this is: +(defpart 313 + :init-specs ((:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.0018691589)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.14222223) + (:fade-b 0.0) + (:next-time (seconds 1.5)) + (:next-launcher 314) + ) + ) + +;; failed to figure out what this is: +(defpart 314 + :init-specs ((:fade-g -2.2588236) (:fade-a -0.7529412)) + ) + +;; failed to figure out what this is: +(defpart 305 + :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 255.0) + (:b 255.0) + (:a 64.0) + (:scalevel-x (meters 0.16666667)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.05)) + (:next-launcher 315) + ) + ) + +;; failed to figure out what this is: +(defpart 315 + :init-specs ((:scale-x (meters 3.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.04)) + (:scalevel-y :copy scalevel-x) + (:fade-b -5.1) + (:next-time (seconds 0.167)) + (:next-launcher 316) + ) + ) + +;; failed to figure out what this is: +(defpart 316 + :init-specs ((:fade-g -4.8) (:fade-a -1.6)) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-yellow-shot-die + :id 103 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 249)) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-dark-shot-hit + :id 104 + :duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 317 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 318 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 319 :period (seconds 3) :length (seconds 0.05)) + (sp-item 320 :fade-after (meters 60) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 321 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 322 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 323 :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 323 + :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 324) + (:conerot-x '*sp-temp*) + ) + ) + +;; failed to figure out what this is: +(defpart 322 + :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 324) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 324 + :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 325) + ) + ) + +;; failed to figure out what this is: +(defpart 325 + :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 326) + ) + ) + +;; failed to figure out what this is: +(defpart 326 + :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 327) + ) + ) + +;; failed to figure out what this is: +(defpart 327 + :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 318 + :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 328) + ) + ) + +;; failed to figure out what this is: +(defpart 328 + :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 317 + :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 329) + ) + ) + +;; failed to figure out what this is: +(defpart 329 + :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 321 + :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 330) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 330 + :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 331) + ) + ) + +;; failed to figure out what this is: +(defpart 331 + :init-specs ((:fade-r 0.0) (:fade-g -0.08695652) (:fade-a -0.18478261)) + ) + +;; failed to figure out what this is: +(defpart 319 + :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 332) + (:conerot-x (degrees -1440) (degrees 2880)) + ) + ) + +;; failed to figure out what this is: +(defpart 332 + :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 333) + ) + ) + +;; failed to figure out what this is: +(defpart 333 + :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 334)) + ) + +;; failed to figure out what this is: +(defpart 334 + :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 320 + :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-gun-green-shot-hit + :id 105 + :duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 335 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 336 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 337 :period (seconds 3) :length (seconds 0.05)) + (sp-item 338 :fade-after (meters 60) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 339 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 340 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 341 :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 341 + :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 -6.2) + (:fade-g 0.0) + (:fade-b -10.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 342) + (:conerot-x '*sp-temp*) + ) + ) + +;; failed to figure out what this is: +(defpart 340 + :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 -6.2) + (:fade-g 0.0) + (:fade-b -10.2) + (:fade-a -0.1254902) + (:friction 0.95) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.085)) + (:next-launcher 342) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 342 + :init-specs ((:fade-r -5.0) + (:fade-g -2.1666667) + (:fade-a -0.062068965 -0.72) + (:next-time (seconds 0.05) (seconds 0.047)) + (:next-launcher 343) + ) + ) + +;; failed to figure out what this is: +(defpart 343 + :init-specs ((:scalevel-x (meters 0.016666668) (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -1.7) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 344) + ) + ) + +;; failed to figure out what this is: +(defpart 344 + :init-specs ((:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.5833333) + (:next-time (seconds 0.5) (seconds 0.097)) + (:next-launcher 345) + ) + ) + +;; failed to figure out what this is: +(defpart 345 + :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 336 + :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 -4.266667) + (:fade-g 0.0) + (:fade-b -8.5) + (: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 346) + ) + ) + +;; failed to figure out what this is: +(defpart 346 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.7066667) + (:fade-g -0.85333335) + (:fade-a -0.64) + ) + ) + +;; failed to figure out what this is: +(defpart 335 + :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 -4.266667) + (:fade-g 0.0) + (:fade-b -8.5) + (: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 347) + ) + ) + +;; failed to figure out what this is: +(defpart 347 + :init-specs ((:scalevel-x (meters -0.2857143)) + (:scalevel-y :copy scalevel-x) + (:fade-r -3.6571429) + (:fade-g -1.8285714) + (:fade-a -1.3714286) + ) + ) + +;; failed to figure out what this is: +(defpart 339 + :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 -3.1) + (:fade-g 0.0) + (:fade-b -5.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 348) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 348 + :init-specs ((:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.33333334) + (:fade-g -0.14444445) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 349) + ) + ) + +;; failed to figure out what this is: +(defpart 349 + :init-specs ((:fade-r -0.08695652) (:fade-g 0.0) (:fade-a -0.18478261)) + ) + +;; failed to figure out what this is: +(defpart 337 + :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 1.2) + (:fade-g 3.3) + (:fade-b 0.4) + (: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 350) + (:conerot-x (degrees -1440) (degrees 2880)) + ) + ) + +;; failed to figure out what this is: +(defpart 350 + :init-specs ((:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.1666667) + (:fade-g -1.0833334) + (:fade-b -2.1666667) + (:fade-a -0.46666667) + (:next-time (seconds 0.15) (seconds 0.047)) + (:next-launcher 351) + ) + ) + +;; failed to figure out what this is: +(defpart 351 + :init-specs ((:fade-r 0.0) (:fade-g -1.7) (:fade-b -0.8) (:fade-a -1.0) (:next-time (seconds 0.167)) (:next-launcher 352)) + ) + +;; failed to figure out what this is: +(defpart 352 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -0.17) + (:fade-b -0.3) + (:fade-a -0.1) + ) + ) + +;; failed to figure out what this is: +(defpart 338 + :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 64.0) + (:g 192.0 64.0) + (:b 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: +(defpart 353 + :init-specs ((:texture (redpuff 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 20.0) + (:b 128.0) + (:a 0.0) + (:omega (degrees 0)) + (:vel-z (meters 0.13333334)) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a 3.4) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'sparticle-red-2-glow-trail-halt) + (:next-time (seconds 0.25)) + (:next-launcher 354) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 354 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.0) + (:next-time (seconds 0.017) (seconds 0.247)) + (:next-launcher 355) + ) + ) + +;; failed to figure out what this is: +(defpart 355 + :init-specs ((:scalevel-x (meters -0.0033333334) (meters -0.006666667)) (:scalevel-y :copy scalevel-x) (:fade-a -1.7)) + ) + +;; failed to figure out what this is: +(defpart 356 + :init-specs ((:texture (blue-beam-dest level-default-water)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1.5)) + (:scale-y (meters 1)) + (:r 128.0 64.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 357 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 2.0) + (:scale-x (meters 1.5)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 40.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-fade-alpha-dist) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup gun-blue-muzzle-flare + :id 106 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 358) (sp-item 359)) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-blue-2-muzzle-flare + :id 107 + :duration (seconds 1) + :linger-duration (seconds 1) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 360) (sp-item 361) (sp-item 362)) + ) + +;; failed to figure out what this is: +(defpart 360 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 1)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3599)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 20.0 10.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 361 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 1.0 20.0) + (:scale-x (meters 0.1) (meters 0.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3598.0002)) + (:scale-y (meters 1) (meters 0.5)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:fade-a -1.6) + (:timer (seconds 0.3) (seconds 0.197)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.035)) + (:next-launcher 363) + ) + ) + +;; failed to figure out what this is: +(defpart 362 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 5.0) + (:scale-x (meters 1) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3598.0002)) + (:scale-y (meters 1) (meters 0.5)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:fade-a -1.6) + (:timer (seconds 0.3) (seconds 0.197)) + (:flags (sp-cpuinfo-flag-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 363) + ) + ) + +;; failed to figure out what this is: +(defpart 363 + :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: +(defpart 364 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:scale-y (meters 3) (meters 0.6)) + (:r 40.0) + (:g 200.0) + (:b 255.0) + (:a 128.0) + (:scalevel-x (meters 0.08)) + (:fade-r -4.0) + (:fade-g -3.2) + (:fade-a -6.4) + (:timer (seconds 0.067)) + (: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-blue3-shot-impact + :id 108 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 285 :fade-after (meters 120) :falloff-to (meters 140) :period (seconds 2) :length (seconds 0.017)) + (sp-item 286 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 285 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 2) (meters 2)) + (:rot-x 4) + (:scale-y (meters 0.05) (meters 0.05)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 128.0) + (:omega (degrees 0.0225)) + (:vel-y (meters 0.016666668) (meters 0.1)) + (:fade-r -10.2 -10.2) + (:fade-g -5.1 -5.1) + (:friction 0.85) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 286 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.1) (meters 0.4)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 200.0) + (:g 200.0 30.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -10.2) + (:fade-g -6.375) + (:fade-a -8.5 -8.5) + (:timer (seconds 0.1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + ) + ) + +;; failed to figure out what this is: +(defpart 358 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 40.0) + (:g 40.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:fade-a -5.1) + (:timer (seconds 0.05) (seconds 0.097)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 4096.0) + (:func 'sparticle-track-gun-joint) + ) + ) + +;; failed to figure out what this is: +(defpart 359 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.0 0.3) + (:scale-x (meters 0.2) (meters 1.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 50.0) + (:g 50.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0) (meters -0.006666667)) + (:rotvel-z (degrees -0.26666668) (degrees 0.53333336)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.017) (seconds 0.247)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-track-gun-joint) + ) + ) + +;; failed to figure out what this is: +(defpart 365 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (: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-3 sp-cpuinfo-flag-14 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 366 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 4.0) + (:scale-x (meters 1) (meters 2)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 1) (meters 2)) + (:r 50.0) + (:g 50.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0) (meters 0.006666667)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.017) (seconds 0.065)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-texture-animate) + ) + ) + +;; failed to figure out what this is: +(defpart 367 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 0.1 0.3) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 100.0) + (:b 255.0) + (:a 128.0 128.0) + (:scalevel-x (meters 0.016666668) (meters 0.033333335)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.64) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (: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: +(defpart 368 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.0 0.3) + (:scale-x (meters 0.2) (meters 1.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 50.0) + (:g 50.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0) (meters -0.006666667)) + (:rotvel-z (degrees -0.26666668) (degrees 0.53333336)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.017) (seconds 0.247)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-track-gun-joint) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-red-2-charge + :id 109 + :duration (seconds 0) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 369 :flags (sp7)) + (sp-item 370 :flags (sp7)) + (sp-item 371 :flags (sp7)) + (sp-item 372 :flags (sp6)) + (sp-item 373 :flags (sp6)) + ) + ) + +;; failed to figure out what this is: +(defpart 369 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-converge) + (:num 0.5 0.5) + (:x (meters 1)) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:scalevel-x (meters -0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.035555556) + (:accel-x (meters -0.00033333333)) + (:friction 0.98 0.01) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'sparticle-red-2-converge) + (: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 370 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-converge) + (:num 0.5 0.5) + (:x (meters 1)) + (:scale-x (meters 5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 0.0) + (:scalevel-x (meters -0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.035555556) + (:accel-x (meters -0.00033333333)) + (:friction 0.98 0.01) + (:timer (seconds 1.5)) + (:flags (left-multiply-quat)) + (:func 'sparticle-red-2-converge) + (: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 371 + :init-specs ((:texture (specs level-default-sprite)) + (:num 0.1) + (:scale-x (meters 5) (meters 2)) + (: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-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-track-gun-joint-player-y) + (:next-time (seconds 0.335)) + (:next-launcher 374) + ) + ) + +;; failed to figure out what this is: +(defpart 374 + :init-specs ((:fade-a 0.0)) + ) + +;; failed to figure out what this is: +(defpart 372 + :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 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 'sparticle-track-gun-joint) + ) + ) + +;; failed to figure out what this is: +(defpart 373 + :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 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) + (:func 'sparticle-track-gun-joint) + ) + ) + +;; definition for function sparticle-track-gun-joint-player-y +;; WARN: Return type mismatch int vs none. +(defun sparticle-track-gun-joint-player-y ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (-> arg1 key) + (let ((v1-1 *target*) + (a1-1 36) + ) + (vector<-cspace! (new 'stack-no-clear 'vector) (-> v1-1 node-list data a1-1)) + ) + (set! (-> arg2 x) (-> *target* gun fire-point x)) + (set! (-> arg2 y) (+ 4096.0 (-> *target* control trans y))) + (set! (-> arg2 z) (-> *target* gun fire-point z)) + 0 + (none) + ) + +;; definition for symbol *last-player-pos*, type vector +(define *last-player-pos* (new 'static 'vector)) + +;; definition for function birth-func-converge +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun birth-func-converge ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (local-vars (v1-2 uint128) (v1-3 uint128)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + ) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack 'vector4w)) + ) + (set! (-> s3-0 quad) (-> *target* gun fire-point quad)) + (set! (-> s5-0 x) (- (-> arg2 x) (-> s3-0 x))) + (set! (-> s5-0 y) (- (-> arg2 y) (-> s3-0 y))) + (set! (-> s5-0 z) (- (-> arg2 z) (-> s3-0 z))) + (vector-normalize! s5-0 1.0) + (.lvf vf1 (&-> s5-0 quad)) + (vftoi12.xyzw vf2 vf1) + (.mov v1-2 vf2) + (.ppach v1-3 (the-as uint128 0) v1-2) + (set! (-> s4-0 quad) v1-3) + (vitof15.xyzw vf1 vf2) + (.svf (&-> s5-0 quad) vf1) + (set! (-> arg1 user-float) (the-as float (-> s4-0 x))) + (set! (-> arg1 omega) (the-as float (-> s4-0 y))) + ) + (none) + ) + ) + +;; definition for function sparticle-red-2-converge +;; INFO: Used lq/sq +;; WARN: Return type mismatch float vs none. +(defun sparticle-red-2-converge ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (local-vars (v1-4 uint128) (v1-5 uint128) (v1-6 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + ) + (-> arg1 key) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-2 (new 'stack 'vector4w))) + (set! (-> v1-2 x) (the-as int (-> arg1 user-float))) + (set! (-> v1-2 y) (the-as int (-> arg1 omega))) + (let ((v1-3 (-> v1-2 quad))) + (.pextlh v1-4 v1-3 0) + ) + ) + (.pw.sra v1-5 v1-4 16) + (.mov vf2 v1-5) + (vitof12.xyzw vf1 vf2) + (.svf (&-> s4-0 quad) vf1) + (.mov v1-6 vf1) + (-> arg1 timer) + 0.0 + 0.0 + (let* ((f0-3 (* 0.0022222223 (the float (-> arg1 timer)))) + (f0-4 (* f0-3 f0-3)) + (f0-5 (- 1.0 f0-4)) + ) + (vector-normalize! s4-0 (lerp 10240.0 0.0 f0-5)) + ) + (set! (-> s5-0 quad) (-> *target* gun fire-point quad)) + (set! (-> arg2 x) (+ (-> s4-0 x) (-> s5-0 x))) + (set! (-> arg2 y) (+ (-> s4-0 y) (-> s5-0 y))) + (set! (-> arg2 z) (+ (-> s4-0 z) (-> s5-0 z))) + ) + (none) + ) + ) + +;; definition for function sparticle-red-2-glow-trail-halt +;; WARN: Return type mismatch float vs none. +(defun sparticle-red-2-glow-trail-halt ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((f30-0 (-> arg1 omega)) + (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* ((f0-4 (vector-normalize-ret-len! s5-0 1.0)) + (f0-6 (- (* 300.0 f0-4) (* f30-0 (seconds-per-frame)))) + (f0-7 (fmax 0.0 f0-6)) + (f0-8 (* 0.0033333334 f0-7)) + ) + (vector-normalize! s5-0 f0-8) + ) + (set! (-> arg1 vel-sxvel x) (-> s5-0 x)) + (set! (-> arg1 vel-sxvel y) (-> s5-0 y)) + (set! (-> arg1 vel-sxvel z) (-> s5-0 z)) + ) + (none) + ) + +;; definition for symbol *gun-dark-3-nuke-fade-time*, type time-frame +(define *gun-dark-3-nuke-fade-time* (seconds 2)) + +;; failed to figure out what this is: +(when (or (zero? *gun-dark-3-nuke-fade-curve*) (!= loading-level global)) + (set! *gun-dark-3-nuke-fade-curve* (new 'loading-level 'curve-color-piecewise)) + (curve-color-piecewise-method-10 *gun-dark-3-nuke-fade-curve* 5 'loading-level (the-as uint #f)) + ) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 0 second x) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 0 second y) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 0 second z) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 0 second w) 0.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 1 first) 0.05) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 1 second x) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 1 second y) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 1 second z) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 1 second w) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 2 first) 0.2) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 2 second x) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 2 second y) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 2 second z) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 2 second w) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 3 first) 0.5) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 3 second x) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 3 second y) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 3 second z) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 3 second w) 0.78125) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 4 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 4 second x) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 4 second y) 0.78125) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 4 second z) 0.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve* pts data 4 second w) 0.0) + +;; definition for symbol *gun-dark-3-nuke-blur-segs*, type uint +(define *gun-dark-3-nuke-blur-segs* (the-as uint 10)) + +;; definition for symbol *gun-dark-3-nuke-blur-time*, type time-frame +(define *gun-dark-3-nuke-blur-time* (seconds 5)) + +;; failed to figure out what this is: +(when (or (zero? *gun-dark-3-nuke-blur-curve*) (!= loading-level global)) + (set! *gun-dark-3-nuke-blur-curve* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *gun-dark-3-nuke-blur-curve* 4 'loading-level (the-as int #f)) + ) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-blur-curve* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-blur-curve* pts data 0 second) 0.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-blur-curve* pts data 1 first) 0.1) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-blur-curve* pts data 1 second) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-blur-curve* pts data 2 first) 0.5) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-blur-curve* pts data 2 second) 0.8) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-blur-curve* pts data 3 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-blur-curve* pts data 3 second) 0.0) + +;; definition for symbol *gun-dark-3-mushroom-speed*, type float +(define *gun-dark-3-mushroom-speed* 8192.0) + +;; definition for symbol *gun-dark-3-mushroom-size-time*, type time-frame +(define *gun-dark-3-mushroom-size-time* (seconds 5)) + +;; failed to figure out what this is: +(when (or (zero? *gun-dark-3-nuke-mushroom-size-curve-x*) (!= loading-level global)) + (set! *gun-dark-3-nuke-mushroom-size-curve-x* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *gun-dark-3-nuke-mushroom-size-curve-x* 2 'loading-level (the-as int #f)) + ) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-mushroom-size-curve-x* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-mushroom-size-curve-x* pts data 0 second) 32768.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-mushroom-size-curve-x* pts data 1 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-mushroom-size-curve-x* pts data 1 second) 49152.0) + +;; failed to figure out what this is: +(when (or (zero? *gun-dark-3-nuke-mushroom-size-curve-y*) (!= loading-level global)) + (set! *gun-dark-3-nuke-mushroom-size-curve-y* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *gun-dark-3-nuke-mushroom-size-curve-y* 2 'loading-level (the-as int #f)) + ) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-mushroom-size-curve-y* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-mushroom-size-curve-y* pts data 0 second) 16384.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-mushroom-size-curve-y* pts data 1 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-mushroom-size-curve-y* pts data 1 second) 20480.0) + +;; failed to figure out what this is: +(defpartgroup group-gun-dark3-stalk + :id 110 + :duration (seconds 0.085) + :linger-duration (seconds 8) + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 375 :flags (sp3)) (sp-item 376) (sp-item 377) (sp-item 378 :flags (sp3))) + ) + +;; failed to figure out what this is: +(defpart 377 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:num 10.0) + (:x (meters 0.5) (meters 1)) + (:y (meters -4) (meters 8)) + (:scale-x (meters 1)) + (:rot-x 4) + (:rot-z (degrees -90)) + (:scale-y (meters 1)) + (:r 255.0) + (:g 120.0 40.0) + (:b 40.0 10.0) + (:a 128.0) + (:scalevel-x (meters 0.0016666667) (meters 0.0033333334)) + (:scalevel-y (meters 0.00066666666) (meters 0.00066666666)) + (:fade-r -0.042666666) + (:fade-g -0.042666666) + (:fade-b -0.042666666) + (:fade-a -0.042666666) + (:accel-y (meters 0.00033333333) (meters 0.0016666667)) + (:friction 0.82) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14)) + (:next-time (seconds 5)) + (:next-launcher 379) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 379 + :init-specs ((:fade-a -0.08533333)) + ) + +;; failed to figure out what this is: +(defpart 376 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:x (meters 0.5) (meters 1)) + (:y (meters -4) (meters 8)) + (:scale-x (meters 1)) + (:rot-x 4) + (:rot-z (degrees -90)) + (:scale-y (meters 1)) + (:r 255.0) + (:g 160.0 40.0) + (:b 90.0 30.0) + (:a 255.0) + (:scalevel-x (meters 0.0016666667) (meters 0.0033333334)) + (:scalevel-y (meters 0.00066666666) (meters 0.00066666666)) + (:fade-a -0.1275 -0.1275) + (:accel-y (meters 0.00033333333) (meters 0.0016666667)) + (:friction 0.82) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 378 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 5.5)) + (:scale-x (meters 17)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 90)) + (:scale-y (meters 7.2)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:omega (degrees 6761.25)) + (:vel-y (meters 0.0056666667)) + (:fade-a -0.10333333) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 375 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 5)) + (:scale-x (meters 30)) + (:rot-x (degrees 22.5)) + (:scale-y (meters 50)) + (:r 255.0) + (:g 128.0) + (:b 40.0) + (:a 255.0) + (:omega (degrees 6761.25)) + (:fade-a -0.102) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-dark3-ring + :id 111 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 380 :flags (is-3d sp3)) + (sp-item 381 :flags (is-3d sp3)) + (sp-item 382 :flags (is-3d sp3)) + (sp-item 383 :period (seconds 10) :length (seconds 3)) + (sp-item 384 :flags (sp7) :period (seconds 10) :length (seconds 6)) + ) + ) + +;; failed to figure out what this is: +(defpart 380 + :init-specs ((:texture (ring level-default-sprite)) + (:num 5.0) + (:y (meters 7) (meters 0.3)) + (:scale-x (meters 6)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 50.0) + (:b 0.0) + (:a 1.0) + (:fade-a 0.000100000005) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 3.335)) + (:next-launcher 385) + ) + ) + +;; failed to figure out what this is: +(defpart 385 + :init-specs ((:scalevel-x (meters 0.008333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.21333334) + (:next-time (seconds 2)) + (:next-launcher 386) + ) + ) + +;; failed to figure out what this is: +(defpart 386 + :init-specs ((:fade-a -0.425)) + ) + +;; failed to figure out what this is: +(defpart 381 + :init-specs ((:texture (ring level-default-sprite)) + (:num 3.0) + (:y (meters 8) (meters 0.3)) + (:scale-x (meters 10)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 50.0) + (:b 0.0) + (:a 1.0) + (:fade-a 0.000100000005) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 3.835)) + (:next-launcher 385) + ) + ) + +;; failed to figure out what this is: +(defpart 382 + :init-specs ((:texture (ring level-default-sprite)) + (:num 1.0) + (:y (meters 9) (meters 0.3)) + (:scale-x (meters 14)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 50.0) + (:b 0.0) + (:a 1.0) + (:fade-a 0.000100000005) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 4.335)) + (:next-launcher 385) + ) + ) + +;; failed to figure out what this is: +(defpart 383 + :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 80.0) + (:b 30.0) + (:a 64.0 64.0) + (:vel-z (meters 0.026666667) (meters 0.026666667)) + (:scalevel-x (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.07111111 -0.07111111) + (:timer (seconds 6)) + (:flags (sp-cpuinfo-flag-3)) + (:conerot-x (degrees -2) (degrees 4)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 384 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 3)) + (:y (meters -2)) + (:scale-x (meters 6)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 30.0) + (:a 64.0) + (:vel-y (meters -0.006666667) (meters -0.01)) + (:scalevel-x (meters -0.006666667) (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees 160) (degrees 40)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for symbol *gun-dark-3-nuke-fade-time-small*, type time-frame +(define *gun-dark-3-nuke-fade-time-small* (seconds 6)) + +;; failed to figure out what this is: +(when (or (zero? *gun-dark-3-nuke-fade-curve-small*) (!= loading-level global)) + (set! *gun-dark-3-nuke-fade-curve-small* (new 'loading-level 'curve-color-piecewise)) + (curve-color-piecewise-method-10 *gun-dark-3-nuke-fade-curve-small* 5 'loading-level (the-as uint #f)) + ) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 0 second x) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 0 second y) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 0 second z) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 0 second w) 0.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 1 first) 0.05) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 1 second x) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 1 second y) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 1 second z) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 1 second w) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 2 first) 0.2) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 2 second x) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 2 second y) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 2 second z) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 2 second w) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 3 first) 0.5) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 3 second x) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 3 second y) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 3 second z) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 3 second w) 0.78125) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 4 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 4 second x) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 4 second y) 0.78125) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 4 second z) 0.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-fade-curve-small* pts data 4 second w) 0.0) + +;; definition for symbol *gun-dark-3-nuke-blur-segs-small*, type uint +(define *gun-dark-3-nuke-blur-segs-small* (the-as uint 10)) + +;; definition for symbol *gun-dark-3-nuke-blur-time-small*, type time-frame +(define *gun-dark-3-nuke-blur-time-small* (seconds 6)) + +;; failed to figure out what this is: +(when (or (zero? *gun-dark-3-nuke-blur-curve-small*) (!= loading-level global)) + (set! *gun-dark-3-nuke-blur-curve-small* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *gun-dark-3-nuke-blur-curve-small* 4 'loading-level (the-as int #f)) + ) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-blur-curve-small* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-blur-curve-small* pts data 0 second) 0.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-blur-curve-small* pts data 1 first) 0.1) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-blur-curve-small* pts data 1 second) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-blur-curve-small* pts data 2 first) 0.5) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-blur-curve-small* pts data 2 second) 0.8) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-blur-curve-small* pts data 3 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *gun-dark-3-nuke-blur-curve-small* pts data 3 second) 0.0) + +;; failed to figure out what this is: +(defpartgroup group-gun-dark3-missile-trail + :id 112 + :duration (seconds 3) + :linger-duration (seconds 3) + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 387)) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-dark3-missile-trail-smoke + :id 113 + :duration (seconds 3) + :linger-duration (seconds 3) + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 388 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 387 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.7) (meters 0.1)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 100.0) + (:b 30.0) + (:a 128.0 55.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 388 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (: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 24.0 32.0) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.32) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-dark3-small + :id 114 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 389 :period (seconds 15) :length (seconds 6)) + (sp-item 390 :period (seconds 15) :length (seconds 3)) + (sp-item 391 :period (seconds 15) :length (seconds 0.035)) + (sp-item 392 :flags (sp3)) + ) + ) + +;; failed to figure out what this is: +(defpart 389 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 8.0) + (:x (meters -10) (meters 20)) + (:y (meters -10) (meters 20)) + (:z (meters -10) (meters 20)) + (:scale-x (meters 0.04) (meters 0.04)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 20.0 40.0) + (:b 0.0) + (:a 128.0 128.0) + (:omega (degrees 0.045)) + (:vel-y (meters 0) (meters 0.01)) + (:fade-a -0.2125 -0.2125) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.017)) + (:next-launcher 393) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 393 + :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 393) + ) + ) + +;; failed to figure out what this is: +(defpart 390 + :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 60.0 20.0) + (:b 30.0) + (:a 64.0) + (:vel-z (meters 0.026666667) (meters 0.026666667)) + (:scalevel-x (meters 0.02)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.07111111 -0.07111111) + (:timer (seconds 6)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:conerot-x (degrees -8) (degrees 16)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 391 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 20.0) + (:scale-x (meters 3)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0 20.0) + (:b 30.0) + (:a 255.0) + (:vel-y (meters 0.00033333333) (meters 0.0033333334)) + (:scalevel-x (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.032) + (:fade-b -0.012) + (:fade-a -0.102 -0.102) + (:friction 0.999) + (:timer (seconds 10)) + (: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 392 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30)) + (:rot-x (degrees 22.5)) + (:scale-y (meters 50)) + (:r 255.0) + (:g 128.0) + (:b 40.0) + (:a 255.0) + (:omega (degrees 6761.25)) + (:fade-a -0.17) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun3-dark-scorched-earth + :id 115 + :flags (sp0 sp1) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 394 :flags (is-3d sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 394 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 3.0) + (:scale-x (meters 4) (meters 6)) + (:scale-y (meters 5) (meters 7)) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 64.0) + (:timer (seconds 10)) + (:flags (left-multiply-quat)) + (:next-time (seconds 6)) + (:next-launcher 395) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 395 + :init-specs ((:fade-a -0.21333334)) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-dark2-black-hole + :id 116 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 396 :flags (sp6)) (sp-item 397 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-dark2-black-hole-glow + :id 117 + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 396 :flags (sp6)) (sp-item 397 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 396 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0) + (:b 0.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags ()) + ) + ) + +;; failed to figure out what this is: +(defpart 397 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 100.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-gravity-gun-rise + :id 118 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 398 :flags (sp7)) (sp-item 399 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpartgroup group-gravity-gun-rise-no-flare + :id 119 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 398 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 398 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters -0.3)) + (:scale-x (meters 0.05) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 200.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 0.1125)) + (:scalevel-y (meters -0.00006666667)) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters 0.0001) (meters 0.0001)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 399 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 0.06) + (:scale-x (meters 0)) + (:rot-x (degrees 45)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 80.0) + (:g 100.0 50.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 glow)) + (:userdata 8192.0) + (:next-time (seconds 0.5) (seconds 0.497)) + (:next-launcher 400) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 400 + :init-specs ((:scalevel-x (meters -0.0033333334) (meters -0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +;; failed to figure out what this is: +(defpartgroup group-gravity-gun-muzzle + :id 120 + :duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 401 :period (seconds 5) :length (seconds 0.017)) + (sp-item 402 :period (seconds 5) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 401 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 6)) + (:rot-x (degrees 22.5)) + (:scale-y (meters 10)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 6767.9995)) + (:scalevel-x (meters -0.033333335)) + (:scalevel-y (meters 0.4)) + (: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 402 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-x (degrees 22.5)) + (:scale-y (meters 15)) + (:r 32.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 6767.9995)) + (:scalevel-x (meters 0.1)) + (:scalevel-y :copy scalevel-x) + (:fade-a -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: +(defpartgroup group-gun-dark-1-upgrade-shot + :id 121 + :duration (seconds 0) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 403 :flags (sp7)) (sp-item 404 :flags (sp7)) (sp-item 405 :flags (sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 403 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 0.5) + (:scale-x (meters 3) (meters 0.25)) + (: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 404 + :init-specs ((:texture (water-radiate level-default-sprite)) + (:num 2.0) + (:scale-x (meters 5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 1) (meters 1)) + (:r 16.0) + (:g 32.0 32.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters -0.016666668)) + (:scalevel-x (meters -0.016666668) (meters 0.033333335)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters -0.0016666667)) + (: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 406) + (:conerot-x (degrees -180) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 406 + :init-specs ((:a 255.0) (:fade-a -1.28)) + ) + +;; failed to figure out what this is: +(defpart 405 + :init-specs ((:num 1.0) + (:rot-x 8) + (:r 16384.0) + (:g 1024.0) + (:b 4096.0) + (:timer (seconds 1.335)) + (:flags (distort)) + (:func 'sparticle-track-root) + (:rotate-y (degrees 0)) + ) + ) + +;; definition for function spt-func-part-gun-dark-1-upgrade-shot-edges +(defun spt-func-part-gun-dark-1-upgrade-shot-edges ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (sparticle-track-root arg0 arg1 arg2) + (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 new file mode 100644 index 0000000000..512bd7b968 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-red-shot_REF.gc @@ -0,0 +1,2931 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type gun-red-shot +(deftype gun-red-shot (process-drawable) + ((parent (pointer gun) :override) + (root collide-shape-moving :override) + (probe-count int32) + (probe-mask uint32) + (actor-count int32) + (attack-id uint32) + (start-pos vector :inline) + (start-dir vector :inline) + (start-rot vector :inline) + (probe-dir vector 19 :inline) + ) + (:state-methods + blocked + debug-idle + idle + ) + (:methods + (init-probes! (_type_ collide-shape) none) + (check-blocked? (_type_) symbol) + (stub (_type_) none) + (find-targets (_type_) none) + (setup-probes (_type_) none) + (do-collision (_type_ vector) none) + (send-attack! (_type_ process-drawable touching-shapes-entry) none) + ) + ) + +;; definition for method 3 of type gun-red-shot +(defmethod inspect ((this gun-red-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tprobe-count: ~D~%" (-> this probe-count)) + (format #t "~2Tprobe-mask: ~D~%" (-> this probe-mask)) + (format #t "~2Tactor-count: ~D~%" (-> this actor-count)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Tstart-pos: #~%" (-> this start-pos)) + (format #t "~2Tstart-dir: #~%" (-> this start-dir)) + (format #t "~2Tstart-rot: #~%" (-> this start-rot)) + (format #t "~2Tprobe-dir[19] @ #x~X~%" (-> this probe-dir)) + (label cfg-4) + this + ) + +;; definition of type gun-red-3-grenade +(deftype gun-red-3-grenade (projectile-bounce) + ((blast-radius float) + (should-explode-soon? symbol) + (explode-tick-time time-frame) + (birth-time time-frame) + (immediate-detonation? symbol) + (explode-delay-time time-frame) + ) + (:state-methods + impact-tiny + ) + (:methods + (check-should-explode (_type_) int) + (go-impact (_type_) object) + (find-and-damage-targets (_type_) object) + ) + ) + +;; definition for method 3 of type gun-red-3-grenade +(defmethod inspect ((this gun-red-3-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)) + (format #t "~2Tshould-explode-soon?: ~A~%" (-> this should-explode-soon?)) + (format #t "~2Texplode-tick-time: ~D~%" (-> this explode-tick-time)) + (format #t "~2Tbirth-time: ~D~%" (-> this birth-time)) + (format #t "~2Timmediate-detonation?: ~A~%" (-> this immediate-detonation?)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Texplode-delay-time: ~D~%" (-> this explode-delay-time)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-gun-red-3-grenade gun gun-grenade-lod0-jg gun-grenade-idle-ja + ((gun-grenade-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 0.2) + :texture-level 10 + ) + +;; definition for method 30 of type gun-red-3-grenade +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this gun-red-3-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 crate civilian enemy obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set-collide-as! (-> this root) (collide-spec projectile)) + (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 36 of type gun-red-3-grenade +;; WARN: Return type mismatch symbol vs object. +(defmethod handle-proj-hit! ((this gun-red-3-grenade) (arg0 process) (arg1 event-message-block)) + (go (method-of-object this impact)) + #t + ) + +;; definition for method 40 of type gun-red-3-grenade +(defmethod projectile-method-40 ((this gun-red-3-grenade)) + 256 + ) + +;; definition for method 31 of type gun-red-3-grenade +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this gun-red-3-grenade)) + (set! (-> this attack-mode) #f) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-gun-red-3-grenade" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((t9-2 (method-of-type projectile-bounce init-proj-settings!))) + (t9-2 this) + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.2)) + (sound-play "red3-fire") + (let* ((v1-6 *game-info*) + (a0-9 (+ (-> v1-6 attack-id) 1)) + ) + (set! (-> v1-6 attack-id) a0-9) + (set! (-> this attack-id) a0-9) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 87) this)) + (set! (-> this blast-radius) 81920.0) + (set! (-> this max-speed) 327680.0) + (set! (-> this timeout) (seconds 3)) + (set! (-> this should-explode-soon?) #f) + (set-time! (-> this birth-time)) + (let ((v1-15 (new 'stack-no-clear 'vector))) + (set! (-> v1-15 x) 2.5) + (set! (-> v1-15 y) 2.5) + (set! (-> v1-15 z) 2.5) + (set! (-> v1-15 w) 1.0) + (set! (-> this root scale quad) (-> v1-15 quad)) + ) + (set! (-> this immediate-detonation?) #f) + (let ((s5-2 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-2 tracked-obj) (process->handle this)) + (set! (-> s5-2 appearance) *red-shot-3-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-28 (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* light-trail-tracker-projectile (+ v1-28 8192) 1)) + ) + (when s4-2 + (let ((t9-9 (method-of-type process activate))) + (t9-9 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 + (none) + ) + +;; definition for method 32 of type gun-red-3-grenade +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-32 ((this gun-red-3-grenade)) + (cond + ((not (do-fire-backcheck (-> this root trans) (-> this root transv))) + (let ((v1-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this root transv) 1.0))) + (vector+float*! (-> this root trans) (-> this root trans) v1-3 -14336.0) + ) + (set! (-> this immediate-detonation?) #t) + (go (method-of-object this impact)) + ) + (else + (call-parent-method this) + ) + ) + 0 + (none) + ) + +;; definition for method 46 of type gun-red-3-grenade +(defmethod go-impact ((this gun-red-3-grenade)) + (cond + ((-> this should-explode-soon?) + (if (time-elapsed? (-> this explode-tick-time) (-> this explode-delay-time)) + (go (method-of-object this impact)) + ) + ) + (else + (case (check-should-explode this) + ((1) + (set! (-> this should-explode-soon?) #t) + (let ((v0-0 (the-as object (current-time)))) + (set! (-> this explode-tick-time) (the-as time-frame v0-0)) + v0-0 + ) + ) + ((2) + (go (method-of-object this impact)) + ) + ) + ) + ) + ) + +;; definition for method 47 of type gun-red-3-grenade +;; INFO: Used lq/sq +(defmethod find-and-damage-targets ((this gun-red-3-grenade)) + (local-vars (v1-21 float) (v1-45 float)) + (with-pp + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (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-vehicle) + (let ((s4-0 (send-event-function *target* a1-0))) + (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)) + (let* ((s1-0 (-> s3-0 s2-0)) + (a0-8 (if (type? s1-0 collide-shape) + s1-0 + ) + ) + ) + (when a0-8 + (let* ((s0-0 (-> a0-8 process)) + (s1-1 (if (type? s0-0 process-focusable) + s0-0 + ) + ) + ) + (when s1-1 + (when (and (!= s4-0 s1-1) + (not (focus-test? (the-as process-focusable s1-1) disable dead inactive)) + (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)) + ) + (+! (-> *game-info* shots-hit 1) 1.0) + (let ((s0-2 + (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable s1-1) 3) (-> this root trans)) + ) + ) + 0.0 + (.lvf vf1 (&-> s0-2 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) + (let ((f0-4 v1-21) + (f1-1 (-> this blast-radius)) + ) + (if (>= (* f1-1 f1-1) f0-4) + (send-event + s1-1 + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> this attack-id)) + (damage 12.0) + (vehicle-damage-factor 3.0) + (vehicle-impulse-factor 1.0) + (mode 'explode) + (attacker-velocity s0-2) + (penetrate-using (penetrate explode)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (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) s5-0) (-> s5-0 w))) + (when (and (!= s4-0 s3-1) + (not (focus-test? s3-1 disable dead inactive)) + (logtest? (process-mask crate enemy guard vehicle civilian) (-> s3-1 mask)) + (nonzero? (-> s3-1 control root-prim prim-core collide-with)) + ) + (+! (-> *game-info* shots-hit 1) 1.0) + (let ((s5-2 (vector-! (new 'stack-no-clear 'vector) (get-trans s3-1 3) (-> this root trans)))) + 0.0 + (.lvf vf1 (&-> s5-2 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-45 vf1) + (let ((f0-12 v1-45) + (f1-6 (-> this blast-radius)) + ) + (if (>= (* f1-6 f1-6) f0-12) + (send-event + s3-1 + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> this attack-id)) + (damage 12.0) + (vehicle-damage-factor 3.0) + (vehicle-impulse-factor 1.0) + (mode 'explode) + (attacker-velocity s5-2) + (penetrate-using (penetrate explode)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 45 of type gun-red-3-grenade +;; INFO: Used lq/sq +(defmethod check-should-explode ((this gun-red-3-grenade)) + (local-vars + (sv-1680 vector) + (sv-1684 vector) + (sv-1688 float) + (sv-1692 float) + (sv-1696 symbol) + (sv-1744 vector) + (sv-1748 vector) + (sv-1752 float) + (sv-1756 float) + (sv-1760 symbol) + ) + (with-pp + (let ((s4-0 (new 'stack-no-clear 'vector)) + (gp-0 #f) + ) + (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-vehicle) + (let ((s3-0 (send-event-function *target* a1-0))) + (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)) + (let* ((s0-0 (-> s2-0 s1-0)) + (a0-8 (if (type? s0-0 collide-shape) + s0-0 + ) + ) + ) + (when a0-8 + (let* ((s0-1 (-> a0-8 process)) + (a0-10 (if (type? s0-1 process-focusable) + s0-1 + ) + ) + ) + (when a0-10 + (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)) + (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?)) + ) + ) + (set! sv-1680 + (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable a0-10) 3) (-> this root trans)) + ) + (set! sv-1684 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this root transv) 1.0)) + (set! sv-1688 (the-as float 0.0)) + (set! sv-1692 (the-as float 0.0)) + (set! sv-1696 (time-elapsed? (-> this birth-time) (seconds 0.05))) + (set! sv-1688 (vector-normalize-ret-len! sv-1680 1.0)) + (set! sv-1692 (vector-dot sv-1680 sv-1684)) + (when (< sv-1688 (-> s4-0 w)) + (cond + ((and (< 0.0 sv-1692) sv-1696) + (set! gp-0 #t) + (set! (-> this explode-delay-time) + (the-as time-frame (min 150 (the int (* 300.0 (/ sv-1688 (vector-length (-> this root transv))) sv-1692)))) + ) + ) + ((< sv-1688 8192.0) + (return 2) + ) + ((and (not sv-1696) (< (seconds 0.05) (- (current-time) (-> this birth-time)))) + (return 2) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let* ((s1-1 *target*) + (s2-1 (if (type? s1-1 process-focusable) + s1-1 + ) + ) + ) + (when (and s2-1 (< (vector-vector-distance (get-trans s2-1 0) s4-0) (-> s4-0 w))) + (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)) + (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?)) + ) + ) + (set! sv-1744 (vector-! (new 'stack-no-clear 'vector) (get-trans s2-1 3) (-> this root trans))) + (set! sv-1748 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this root transv) 1.0)) + (set! sv-1752 (the-as float 0.0)) + (set! sv-1756 (the-as float 0.0)) + (set! sv-1760 (time-elapsed? (-> this birth-time) (seconds 0.05))) + (set! sv-1752 (vector-normalize-ret-len! sv-1744 1.0)) + (set! sv-1756 (vector-dot sv-1744 sv-1748)) + (when (< sv-1752 (-> s4-0 w)) + (cond + ((and (< 0.0 sv-1756) sv-1760) + (set! gp-0 #t) + (set! (-> this explode-delay-time) + (the-as time-frame (min 150 (the int (* 300.0 (/ sv-1752 (vector-length (-> this root transv))) sv-1756)))) + ) + ) + ((< sv-1752 8192.0) + (return 2) + ) + ((and (not sv-1760) (< (seconds 0.05) (- (current-time) (-> this birth-time)))) + (return 2) + ) + ) + ) + ) + ) + ) + ) + ) + (if gp-0 + (return 1) + (return 0) + ) + ) + (the-as int 0) + ) + ) + +;; definition for method 25 of type gun-red-3-grenade +(defmethod projectile-method-25 ((this gun-red-3-grenade)) + (spawn (-> this part) (-> this root trans)) + (if (logtest? (-> this root status) (collide-status touch-surface)) + (sound-play "red3-bounce") + ) + (call-parent-method this) + (none) + ) + +;; definition for method 42 of type gun-red-3-grenade +(defmethod projectile-bounce-method-42 ((this gun-red-3-grenade)) + (spawn (-> this part) (-> this root trans)) + (call-parent-method this) + (none) + ) + +;; definition of type shockwave-collision-pt +(deftype shockwave-collision-pt (structure) + ((collision-pt vector :inline) + (normal vector :inline) + (found? symbol) + (angle degrees) + ) + ) + +;; definition for method 3 of type shockwave-collision-pt +(defmethod inspect ((this shockwave-collision-pt)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'shockwave-collision-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 gun-red-2-shockwave +(deftype gun-red-2-shockwave (process) + ((origin vector :inline) + (max-radius float) + (strength float) + (current-radius float) + (current-intensity float) + (state-time time-frame) + (alpha-scalar float) + (base-damage float) + (snd-charge sound-id) + (min-charge-radius float) + (max-charge-radius float) + (total-charge-time time-frame) + (total-explode-time time-frame) + (ring-expansion-time time-frame) + (burst-expansion-time time-frame) + (warp-expansion-time time-frame) + (previously-attacked-targets handle 64) + (num-previously-attacked-targets int8) + (start-pilot? symbol) + (explosion-0 handle) + (explosion-1 handle) + (generate-order-array uint8 127) + (current-stage-t float) + (ammo-drained float) + (eventual-collision-points shockwave-collision-pt 128 :inline) + (next-computed-collision-point int8) + (num-collision-pts-to-generate int8) + (show-scorch-marks? symbol) + (height-off-ground float) + (max-ground-radius float) + (current-ring-radius float) + (current-ring-alpha float) + (current-warp-radius float) + (current-warp-alpha float) + (current-burst-radius float) + (current-burst-alpha float) + (generating-marks? symbol) + (generated-particles? symbol) + (charge-part-tracker handle) + ) + (:state-methods + charging + explode + die + ) + (:methods + (find-targets-and-attack! (_type_) none) + (send-attack! (_type_ process-focusable symbol) none) + (find-collision-point! (_type_) int) + (generate-collision-points! (_type_) none) + (adjust-height-and-radius (_type_) none) + (gun-red-2-shockwave-method-22 (_type_ int int int int) none) + (generate-shockwave-particles (_type_) none) + (adjust-warp-radius-and-alpha (_type_) object) + (adjust-ring-radius-and-alpha (_type_) none) + (generate-order-array (_type_) none) + (spawn-ring (_type_) none) + ) + ) + +;; definition for method 3 of type gun-red-2-shockwave +(defmethod inspect ((this gun-red-2-shockwave)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Torigin: #~%" (-> this origin)) + (format #t "~2Tmax-radius: ~f~%" (-> this max-radius)) + (format #t "~2Tstrength: ~f~%" (-> this strength)) + (format #t "~2Tcurrent-radius: ~f~%" (-> this current-radius)) + (format #t "~2Tcurrent-intensity: ~f~%" (-> this current-intensity)) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (format #t "~2Talpha-scalar: ~f~%" (-> this alpha-scalar)) + (format #t "~2Tbase-damage: ~f~%" (-> this base-damage)) + (format #t "~2Tsnd-charge: ~D~%" (-> this snd-charge)) + (format #t "~2Tmin-charge-radius: ~f~%" (-> this min-charge-radius)) + (format #t "~2Tmax-charge-radius: ~f~%" (-> this max-charge-radius)) + (format #t "~2Ttotal-charge-time: ~D~%" (-> this total-charge-time)) + (format #t "~2Ttotal-explode-time: ~D~%" (-> this total-explode-time)) + (format #t "~2Tring-expansion-time: ~D~%" (-> this ring-expansion-time)) + (format #t "~2Tburst-expansion-time: ~D~%" (-> this burst-expansion-time)) + (format #t "~2Twarp-expansion-time: ~D~%" (-> this warp-expansion-time)) + (format #t "~2Tpreviously-attacked-targets[64] @ #x~X~%" (-> this previously-attacked-targets)) + (format #t "~2Tnum-previously-attacked-targets: ~D~%" (-> this num-previously-attacked-targets)) + (format #t "~2Tstart-pilot?: ~A~%" (-> this start-pilot?)) + (format #t "~2Texplosion-0: ~D~%" (-> this explosion-0)) + (format #t "~2Texplosion-1: ~D~%" (-> this explosion-1)) + (format #t "~2Tgenerate-order-array[127] @ #x~X~%" (-> this generate-order-array)) + (format #t "~2Tcurrent-stage-t: ~f~%" (-> this current-stage-t)) + (format #t "~2Tammo-drained: ~f~%" (-> this ammo-drained)) + (format #t "~2Teventual-collision-points[128] @ #x~X~%" (-> this eventual-collision-points)) + (format #t "~2Tnext-computed-collision-point: ~D~%" (-> this next-computed-collision-point)) + (format #t "~2Tnum-collision-pts-to-generate: ~D~%" (-> this num-collision-pts-to-generate)) + (format #t "~2Tshow-scorch-marks?: ~A~%" (-> this show-scorch-marks?)) + (format #t "~2Theight-off-ground: ~f~%" (-> this height-off-ground)) + (format #t "~2Tmax-ground-radius: ~f~%" (-> this max-ground-radius)) + (format #t "~2Tcurrent-ring-radius: ~f~%" (-> this current-ring-radius)) + (format #t "~2Tcurrent-ring-alpha: ~f~%" (-> this current-ring-alpha)) + (format #t "~2Tcurrent-warp-radius: ~f~%" (-> this current-warp-radius)) + (format #t "~2Tcurrent-warp-alpha: ~f~%" (-> this current-warp-alpha)) + (format #t "~2Tcurrent-burst-radius: ~f~%" (-> this current-burst-radius)) + (format #t "~2Tcurrent-burst-alpha: ~f~%" (-> this current-burst-alpha)) + (format #t "~2Tgenerating-marks?: ~A~%" (-> this generating-marks?)) + (format #t "~2Tgenerated-particles?: ~A~%" (-> this generated-particles?)) + (format #t "~2Tcharge-part-tracker: ~D~%" (-> this charge-part-tracker)) + (label cfg-4) + this + ) + +;; definition of type gun-red-2-shockwave-init-params +(deftype gun-red-2-shockwave-init-params (structure) + ((pos vector :inline) + (max-radius float) + (strength float) + ) + ) + +;; definition for method 3 of type gun-red-2-shockwave-init-params +(defmethod inspect ((this gun-red-2-shockwave-init-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'gun-red-2-shockwave-init-params) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tmax-radius: ~f~%" (-> this max-radius)) + (format #t "~1Tstrength: ~f~%" (-> this strength)) + (label cfg-4) + this + ) + +;; definition for function part-tracker-move-to-target-gun +;; INFO: Used lq/sq +;; WARN: Return type mismatch float vs none. +(defun part-tracker-move-to-target-gun ((arg0 part-tracker)) + (when *target* + (set! (-> arg0 root trans quad) (-> *target* gun fire-point quad)) + (set! (-> arg0 root trans y) (+ 6553.6 (-> *target* control trans y))) + ) + (none) + ) + +;; definition for function gun-red-2-shockwave-init-by-other +;; INFO: Used lq/sq +(defbehavior gun-red-2-shockwave-init-by-other gun-red-2-shockwave ((arg0 gun-red-2-shockwave-init-params)) + (set! (-> self current-intensity) 0.0) + (set! (-> self current-radius) 0.0) + (set! (-> self current-warp-radius) 0.0) + (set! (-> self current-burst-radius) 0.0) + (set! (-> self height-off-ground) 0.0) + (set! (-> self current-ring-radius) 0.0) + (set! (-> self current-ring-alpha) 0.0) + (set! (-> self total-explode-time) (seconds 0.7)) + (set! (-> self min-charge-radius) 12288.0) + (set! (-> self max-charge-radius) 73728.0) + (set! (-> self total-charge-time) (seconds 1)) + (set! (-> self base-damage) 5.0) + (set! (-> self ring-expansion-time) (seconds 0.35)) + (set! (-> self burst-expansion-time) (seconds 0.3)) + (set! (-> self warp-expansion-time) (seconds 0.4)) + (set! (-> self explosion-0) (the-as handle #f)) + (set! (-> self explosion-1) (the-as handle #f)) + (set! (-> self ammo-drained) 0.0) + (set! (-> self snd-charge) (new-sound-id)) + (set! (-> self num-previously-attacked-targets) 0) + (set! (-> self start-pilot?) (the-as symbol (and *target* (focus-test? *target* pilot)))) + (set! (-> self charge-part-tracker) + (ppointer->handle (cond + ((logtest? (-> *part-group-id-table* 109 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self origin quad)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 109) + :callback (the-as (function part-tracker vector) part-tracker-move-to-target-gun) + ) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self origin quad)) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 109) + :callback (the-as (function part-tracker vector) part-tracker-move-to-target-gun) + ) + ) + ) + ) + ) + (send-event (handle->process (-> self charge-part-tracker)) 'clock self) + (dotimes (v1-49 64) + (set! (-> self eventual-collision-points v1-49 found?) #f) + ) + (set! (-> self next-computed-collision-point) 0) + (set! (-> self show-scorch-marks?) #f) + (set! (-> self generating-marks?) #f) + (set! (-> self generated-particles?) #f) + (go-virtual charging) + ) + +;; definition for method 17 of type gun-red-2-shockwave +;; INFO: Used lq/sq +(defmethod find-targets-and-attack! ((this gun-red-2-shockwave)) + (local-vars + (sv-32 bounding-box) + (sv-2672 (function vector vector float)) + (sv-2688 vector) + (sv-2704 vector) + (sv-2720 collide-query) + ) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (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)) + (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)) + (v1-6 (if (type? s3-0 collide-shape) + s3-0 + ) + ) + ) + (when v1-6 + (let* ((s2-0 (-> v1-6 process)) + (s3-1 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (when s3-1 + (when (and (!= *target* s3-1) + (not (focus-test? (the-as process-focusable s3-1) disable dead inactive)) + (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?)) + ) + ) + (let ((s2-1 #f)) + (let ((s1-0 (process->handle s3-1))) + (dotimes (v1-18 (-> this num-previously-attacked-targets)) + (when (= (-> this previously-attacked-targets v1-18) s1-0) + (set! s2-1 #t) + 0 + (goto cfg-29) + ) + ) + (label cfg-29) + (when (not s2-1) + (let ((s0-0 #f)) + (set! sv-2672 vector-vector-xz-distance-squared) + (set! sv-2688 (-> this origin)) + (let* ((a1-4 (get-trans (the-as process-focusable s3-1) 3)) + (f0-1 (sv-2672 sv-2688 a1-4)) + (f1-0 24576.0) + ) + (cond + ((< f0-1 (* f1-0 f1-0)) + (set! s0-0 #t) + ) + (else + (set! sv-2720 (new 'stack-no-clear 'collide-query)) + (set! (-> sv-2720 start-pos quad) (-> this origin quad)) + (set! sv-2704 (-> sv-2720 move-dist)) + (let ((v1-35 (get-trans (the-as process-focusable s3-1) 3)) + (a0-26 (-> this origin)) + ) + (.lvf vf4 (&-> v1-35 quad)) + (.lvf vf5 (&-> a0-26 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-2704 quad) vf6) + (let ((v1-37 sv-2720)) + (set! (-> v1-37 radius) 40.96) + (set! (-> v1-37 collide-with) (collide-spec backgnd)) + (set! (-> v1-37 ignore-process0) #f) + (set! (-> v1-37 ignore-process1) #f) + (set! (-> v1-37 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-37 action-mask) (collide-action solid)) + ) + (if (= (fill-and-probe-using-line-sphere *collide-cache* sv-2720) -100000000.0) + (set! s0-0 #t) + ) + ) + ) + ) + (when s0-0 + (send-attack! this (the-as process-focusable s3-1) #t) + (set! (-> this previously-attacked-targets (-> this num-previously-attacked-targets)) (the-as handle s1-0)) + (+! (-> this num-previously-attacked-targets) 1) + ) + ) + ) + ) + (if (and s2-1 (logtest? (process-mask vehicle) (-> s3-1 mask))) + (send-attack! this (the-as process-focusable s3-1) #f) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (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) + ) + ) + ) + ) + ) + (none) + ) + ) + +;; definition for method 18 of type gun-red-2-shockwave +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod send-attack! ((this gun-red-2-shockwave) (arg0 process-focusable) (arg1 symbol)) + (let* ((a0-2 (get-trans arg0 3)) + (v1-2 (vector-! (new 'stack-no-clear 'vector) a0-2 (-> this origin))) + ) + 0.0 + (set! (-> v1-2 y) 0.0) + (let* ((f0-3 (* (-> this base-damage) (-> this current-intensity))) + (f0-4 (fmax 1.0 f0-3)) + (a0-4 'eco-red) + ) + (if (not arg1) + (set! a0-4 'eco-red-shove) + ) + (+! (-> *game-info* shots-hit 1) 1.0) + (send-event arg0 'attack #f (static-attack-info + :mask (vehicle-impulse-factor) + ((id (new-attack-id)) + (damage f0-4) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode a0-4) + (attacker-velocity v1-2) + (control (-> this current-intensity)) + (penetrate-using (penetrate jak-red-shot jak-red-shockwave)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate charging (gun-red-2-shockwave) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-0 float)) + (case message + (('charge) + (return (the-as object (-> self strength))) + v0-0 + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self ammo-drained) 0.0) + ) + :exit (behavior () + (send-event (ppointer->process (-> self parent)) 'release) + (send-event (handle->process (-> self charge-part-tracker)) 'die) + (sound-stop (-> self snd-charge)) + ) + :trans (behavior () + (let ((t9-0 vector<-cspace!) + (a0-0 (-> self origin)) + (v1-0 (-> self parent)) + ) + (t9-0 a0-0 (-> (the-as process-drawable (if v1-0 + (the-as process-drawable (-> v1-0 0 self)) + ) + ) + node-list + data + 13 + ) + ) + ) + (sound-play "red2-charge" :id (-> self snd-charge) :position (-> self origin)) + (let ((f0-0 (get-remaining-player-ammo (pickup-type ammo-red)))) + (if (< 0.0 f0-0) + (set! (-> self strength) + (fmin 1.0 (/ (the float (- (current-time) (-> self state-time))) (the float (-> self total-charge-time)))) + ) + ) + ) + (let ((f30-0 (cond + ((time-elapsed? (-> self state-time) (seconds 1)) + 5.0 + ) + ((time-elapsed? (-> self state-time) (seconds 0.75)) + 4.0 + ) + ((time-elapsed? (-> self state-time) (seconds 0.5)) + 3.0 + ) + ((time-elapsed? (-> self state-time) (seconds 0.25)) + 2.0 + ) + ((time-elapsed? (-> self state-time) (seconds 0.1)) + 1.0 + ) + (else + 0.0 + ) + ) + ) + ) + (when (< (-> self ammo-drained) f30-0) + (let ((f0-5 (- f30-0 (-> self ammo-drained)))) + (adjust-player-ammo (- f0-5) (pickup-type ammo-red)) + ) + (set! (-> self ammo-drained) f30-0) + ) + ) + (set! (-> *part-id-table* 372 init-specs 2 initial-valuef) (lerp 3276.8 8192.0 (-> self strength))) + (set! (-> *part-id-table* 373 init-specs 2 initial-valuef) (lerp 8192.0 14336.0 (-> self strength))) + (if (and (time-elapsed? (-> self state-time) (seconds 0.1)) + (or (not (cpad-hold? 0 r1)) + (and *target* + (focus-test? *target* dead grabbed under-water pole flut board mech dark carry indax teleporting) + ) + (and *target* (not (logtest? (focus-status in-head gun) (-> *target* focus-status)))) + (and *target* (!= (-> self start-pilot?) (focus-test? *target* pilot))) + (not (-> *setting-control* user-current gun)) + ) + ) + (go-virtual explode) + ) + ) + :code sleep-code + :post (behavior () + (set! (-> *last-player-pos* x) (-> *target* gun fire-point x)) + (set! (-> *last-player-pos* y) (+ 6553.6 (-> *target* control trans y))) + (set! (-> *last-player-pos* z) (-> *target* gun fire-point z)) + ) + ) + +;; definition for function generate-shockwave-scorch-marks-3 +;; WARN: Return type mismatch object vs none. +(defbehavior generate-shockwave-scorch-marks-3 gun-red-2-shockwave ((arg0 int)) + (let ((s4-0 (-> self eventual-collision-points arg0)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 x) 0.0) + (set! (-> s5-0 y) 409.6) + (set! (-> s5-0 z) 0.0) + (set! (-> s5-0 w) 1.0) + (when (-> s4-0 found?) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (let ((s3-1 (vector-! (new 'stack-no-clear 'vector) (-> s4-0 collision-pt) (-> self origin)))) + (set! (-> s3-1 y) 0.0) + (vector-normalize! s3-1 1.0) + (matrix-u-f-compose gp-0 (-> s4-0 normal) s3-1) + ) + (vector+! (-> gp-0 trans) (-> s4-0 collision-pt) s5-0) + (let ((v1-14 + (if (logtest? (-> *part-group-id-table* 89 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 89) + :mat-joint gp-0 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 89) :mat-joint gp-0) + ) + ) + ) + (send-event (ppointer->process v1-14) 'clock self) + ) + ) + ) + ) + (none) + ) + +;; definition for function generate-shockwave-scorch-marks-2 +;; WARN: Return type mismatch symbol vs none. +(defbehavior generate-shockwave-scorch-marks-2 gun-red-2-shockwave () + (set! (-> self show-scorch-marks?) #t) + (set! (-> self generating-marks?) #t) + (let ((gp-0 0)) + (dotimes (s5-0 (-> self num-collision-pts-to-generate)) + (when (< 30 gp-0) + (set! gp-0 0) + (suspend) + 0 + ) + (+! gp-0 1) + (generate-shockwave-scorch-marks-3 s5-0) + ) + ) + (set! (-> self generating-marks?) #f) + (none) + ) + +;; failed to figure out what this is: +(defstate die (gun-red-2-shockwave) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (when (not (-> self show-scorch-marks?)) + (generate-collision-points! self) + (generate-shockwave-scorch-marks-2) + ) + ) + ) + +;; definition of type gun-red-2-explosion +(deftype gun-red-2-explosion (process-drawable) + () + (:methods + (gun-red-2-explosion-method-20 (_type_) none) + ) + ) + +;; definition for method 3 of type gun-red-2-explosion +(defmethod inspect ((this gun-red-2-explosion)) + (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 gun-red-2-shockwave +(defmethod gun-red-2-shockwave-method-22 ((this gun-red-2-shockwave) (arg0 int) (arg1 int) (arg2 int) (arg3 int)) + (when (< 1 (- arg1 arg0)) + (let ((s2-0 (/ (+ arg0 arg1) 2))) + (let ((a0-4 (+ arg3 -1 (ash 1 arg2)))) + (set! (-> this generate-order-array a0-4) (the-as uint (+ s2-0 -1))) + ) + (gun-red-2-shockwave-method-22 this arg0 s2-0 (+ arg2 1) (* arg3 2)) + (gun-red-2-shockwave-method-22 this s2-0 arg1 (+ arg2 1) (+ (* arg3 2) 1)) + ) + ) + (none) + ) + +;; definition for method 19 of type gun-red-2-shockwave +;; INFO: Used lq/sq +;; WARN: Stack slot offset 564 signed mismatch +;; WARN: Stack slot offset 564 signed mismatch +;; WARN: Stack slot offset 564 signed mismatch +(defmethod find-collision-point! ((this gun-red-2-shockwave)) + (local-vars (sv-560 collide-query) (sv-564 int) (sv-608 vector) (sv-612 vector) (sv-616 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (if (>= (-> this next-computed-collision-point) (-> this num-collision-pts-to-generate)) + (return 0) + ) + (set! sv-560 (new 'stack-no-clear 'collide-query)) + (set! sv-564 (-> this num-collision-pts-to-generate)) + (set! sv-608 (new 'stack-no-clear 'vector)) + (set! sv-612 (new 'stack-no-clear 'vector)) + (set! sv-616 (/ 65536.0 (the float (+ sv-564 -1)))) + (let ((f30-1 + (+ (* sv-616 (the float (-> this generate-order-array (-> this next-computed-collision-point)))) + (rand-vu-float-range (* -0.43478262 sv-616) (* 0.43478262 sv-616)) + ) + ) + ) + (set! (-> this eventual-collision-points (-> this next-computed-collision-point) angle) f30-1) + (set-vector! + sv-608 + (* (rand-vu-float-range 0.7 0.9) (-> this max-ground-radius) (cos f30-1)) + 32768.0 + (* (rand-vu-float-range 0.7 0.9) (-> this max-ground-radius) (sin f30-1)) + 1.0 + ) + ) + (vector+! (-> sv-560 start-pos) (-> this origin) sv-608) + (set! (-> sv-560 start-pos y) (- (-> sv-560 start-pos y) (-> this height-off-ground))) + (+! (-> sv-560 start-pos y) 20480.0) + (set-vector! (-> sv-560 move-dist) 0.0 -65536.0 0.0 1.0) + (let ((v1-29 sv-560)) + (set! (-> v1-29 radius) 40.96) + (set! (-> v1-29 collide-with) (collide-spec backgnd hit-by-others-list pusher impenetrable-obj)) + (set! (-> v1-29 ignore-process0) #f) + (set! (-> v1-29 ignore-process1) #f) + (set! (-> v1-29 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-29 action-mask) (collide-action solid)) + ) + (let ((f0-25 (fill-and-probe-using-line-sphere *collide-cache* sv-560))) + (when (>= f0-25 0.0) + (let ((v1-33 sv-612)) + (let ((a0-17 (-> sv-560 start-pos))) + (let ((a1-7 (-> sv-560 move-dist))) + (let ((a2-0 f0-25)) + (.mov vf7 a2-0) + ) + (.lvf vf5 (&-> a1-7 quad)) + ) + (.lvf vf4 (&-> a0-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 (&-> v1-33 quad) vf6) + ) + (set! (-> this eventual-collision-points (-> this next-computed-collision-point) collision-pt quad) + (-> sv-612 quad) + ) + (+! (-> this eventual-collision-points (-> this next-computed-collision-point) collision-pt y) 204.8) + (set! (-> this eventual-collision-points (-> this next-computed-collision-point) found?) #t) + (set! (-> (the-as + (pointer uint128) + (+ (the-as uint (-> this eventual-collision-points 0 normal)) (* 48 (-> this next-computed-collision-point))) + ) + ) + (-> sv-560 best-other-tri normal quad) + ) + (let ((s5-1 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-1 (vector-float*! (new 'stack-no-clear 'vector) (-> sv-560 best-other-tri normal) 3072.0)) + ) + (let ((s2-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> sv-560 best-other-tri normal) 1.0)) + (s1-0 (new 'stack-no-clear 'vector)) + ) + (vector-get-unique! s1-0 s2-0) + (vector-cross! s5-1 s2-0 s1-0) + ) + (vector-normalize! s5-1 1.0) + (dotimes (s2-1 4) + (vector-rotate-around-axis! + s4-0 + (the-as quaternion s5-1) + (* 16384.0 (the float s2-1)) + (-> sv-560 best-other-tri normal) + ) + (vector-normalize! s4-0 10240.0) + (vector+! s4-0 s4-0 s3-1) + (vector+! (-> sv-560 start-pos) sv-612 s4-0) + (vector-float*! (-> sv-560 move-dist) (-> sv-560 best-other-tri normal) -6144.0) + (let ((v1-59 sv-560)) + (set! (-> v1-59 radius) 40.96) + (set! (-> v1-59 collide-with) (collide-spec backgnd hit-by-others-list pusher impenetrable-obj)) + (set! (-> v1-59 ignore-process0) #f) + (set! (-> v1-59 ignore-process1) #f) + (set! (-> v1-59 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-59 action-mask) (collide-action solid)) + ) + (when (< (fill-and-probe-using-line-sphere *collide-cache* sv-560) 0.0) + (set! (-> this eventual-collision-points (-> this next-computed-collision-point) found?) #f) + 0 + (goto cfg-11) + ) + ) + ) + ) + ) + (label cfg-11) + (let ((v0-0 (+ (-> this next-computed-collision-point) 1))) + (set! (-> this next-computed-collision-point) v0-0) + v0-0 + ) + ) + ) + +;; definition for method 20 of type gun-red-2-shockwave +;; WARN: Return type mismatch symbol vs none. +(defmethod generate-collision-points! ((this gun-red-2-shockwave)) + (while (< (-> this next-computed-collision-point) (-> this num-collision-pts-to-generate)) + (find-collision-point! this) + ) + (none) + ) + +;; definition for method 21 of type gun-red-2-shockwave +;; INFO: Used lq/sq +;; WARN: Return type mismatch float vs none. +(defmethod adjust-height-and-radius ((this gun-red-2-shockwave)) + (let ((a1-0 (new 'stack-no-clear 'collide-query))) + (set! (-> a1-0 start-pos quad) (-> this origin quad)) + (set-vector! (-> a1-0 move-dist) 0.0 (* -1.0 (-> this max-radius)) 0.0 1.0) + (let ((v1-2 a1-0)) + (set! (-> v1-2 radius) 40.96) + (set! (-> v1-2 collide-with) (collide-spec backgnd hit-by-others-list pusher impenetrable-obj)) + (set! (-> v1-2 ignore-process0) #f) + (set! (-> v1-2 ignore-process1) #f) + (set! (-> v1-2 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-2 action-mask) (collide-action solid)) + ) + (let ((f0-6 (fill-and-probe-using-line-sphere *collide-cache* a1-0))) + (if (>= f0-6 0.0) + (set! (-> this height-off-ground) (* f0-6 (-> this max-radius))) + (set! (-> this height-off-ground) (-> this max-radius)) + ) + ) + ) + (set! (-> this max-ground-radius) (-> this max-radius)) + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-gun-red-sphere gun gun-red-sphere-lod0-jg gun-red-sphere-idle-ja + ((gun-red-sphere-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 30) + :texture-level 10 + :sort 4 + ) + +;; definition of type red-2-ring +(deftype red-2-ring (process-drawable) + ((current-alpha float) + (pad uint8 12) + ) + (:state-methods + active + fading + ) + (:methods + (red-2-ring-method-22 () none) + ) + ) + +;; definition for method 3 of type red-2-ring +(defmethod inspect ((this red-2-ring)) + (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)) + (label cfg-4) + this + ) + +;; definition of type red-2-ring-init-params +(deftype red-2-ring-init-params (structure) + ((pos vector :inline) + ) + ) + +;; definition for method 3 of type red-2-ring-init-params +(defmethod inspect ((this red-2-ring-init-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'red-2-ring-init-params) + (format #t "~1Tpos: #~%" (-> this pos)) + (label cfg-4) + this + ) + +;; definition for function red-2-ring-event-handler +;; INFO: Used lq/sq +(defbehavior red-2-ring-event-handler red-2-ring ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('scale) + (let ((v1-1 (the-as object (-> arg3 param 0))) + (v0-0 (the-as object (-> self root scale))) + ) + (set! (-> (the-as vector v0-0) quad) (-> (the-as vector v1-1) quad)) + v0-0 + ) + ) + (('alpha) + (set! (-> self current-alpha) (the-as float (-> arg3 param 0))) + ) + (('start-fade) + (if (not (and (-> self next-state) (= (-> self next-state name) 'fading))) + (go-virtual fading) + ) + ) + ) + ) + +;; definition for function red-2-ring-init-by-other +;; INFO: Used lq/sq +(defbehavior red-2-ring-init-by-other red-2-ring ((arg0 red-2-ring-init-params)) + (set! (-> self root) (new 'process 'trsqv)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-generic-blast" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self root trans quad) (-> arg0 pos quad)) + (quaternion-identity! (-> self root quat)) + (go-virtual active) + ) + +;; failed to figure out what this is: +(defstate active (red-2-ring) + :virtual #t + :event red-2-ring-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set-vector! (-> self root scale) 1.0 1.0 1.0 1.0) + ) + :trans (behavior () + '() + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja :group! (-> self draw art-group data 13) :num! zero) + (let ((gp-0 (ja-num-frames 0))) + (until #f + (ja :group! (-> self draw art-group data 13) + :num! (identity (lerp (the float gp-0) 0.0 (-> self current-alpha))) + ) + (suspend) + ) + ) + #f + ) + :post (behavior () + (ja-post) + ) + ) + +;; definition for method 23 of type gun-red-2-shockwave +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defmethod generate-shockwave-particles ((this gun-red-2-shockwave)) + (local-vars (sv-160 int) (sv-176 shockwave-collision-pt)) + (when (and (not (-> this generated-particles?)) (time-elapsed? (-> this state-time) (seconds 0.067))) + (set! (-> this generated-particles?) #t) + (dotimes (s5-0 150) + (let ((f26-0 (* 436.90668 (the float s5-0))) + (s3-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-0 quad) (-> this origin quad)) + (set-vector! s3-0 (cos f26-0) 0.0 (sin f26-0) 1.0) + (vector-normalize! s3-0 (* 0.9 (-> this max-ground-radius))) + (let ((f30-0 (-> this origin y)) + (f24-0 -32768.0) + (f28-0 (-> this origin y)) + (f22-0 32768.0) + ) + 0.0 + (let ((s0-0 0) + (s2-1 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'vector)) + ) + (set! sv-160 0) + (while (< sv-160 (-> this next-computed-collision-point)) + (set! sv-176 (-> this eventual-collision-points sv-160)) + (when (-> sv-176 found?) + (let ((f0-9 (deg- (-> sv-176 angle) f26-0))) + (cond + ((and (< f0-9 0.0) (< f24-0 f0-9)) + (set! f24-0 f0-9) + (set! f30-0 (-> sv-176 collision-pt y)) + (set! s0-0 (logior s0-0 1)) + (set! (-> s2-1 quad) (-> sv-176 normal quad)) + ) + ((and (>= f0-9 0.0) (< f0-9 f22-0)) + (set! f22-0 f0-9) + (set! f28-0 (-> sv-176 collision-pt y)) + (set! s0-0 (logior s0-0 2)) + (set! (-> s1-0 quad) (-> sv-176 normal quad)) + ) + ) + ) + ) + (set! sv-160 (+ sv-160 1)) + ) + (let ((f26-1 0.0)) + (cond + ((= s0-0 3) + (set! f26-1 (/ (* -1.0 f24-0) (- f22-0 f24-0))) + ) + ((= s0-0 2) + (set! f26-1 1.0) + ) + ((= s0-0 1) + (set! f26-1 0.0) + ) + ) + (when #t + (let ((f0-12 (lerp f30-0 f28-0 f26-1))) + (set! (-> s4-0 y) (- (-> s4-0 y) (-> this height-off-ground))) + (set! (-> s3-0 y) (- f0-12 (-> s4-0 y))) + ) + (let ((s2-2 (vector-lerp! (new 'stack-no-clear 'vector) s2-1 s1-0 f26-1))) + (vector-normalize! s2-2 2048.0) + (vector+! s3-0 s3-0 s2-2) + ) + (vector-normalize! s3-0 1.0) + (let ((s2-3 (new 'stack-no-clear 'matrix))) + (matrix-f-u-compose s2-3 s3-0 *up-vector*) + (set! (-> s2-3 trans quad) (-> s4-0 quad)) + (launch-particles (-> *part-id-table* 353) s2-3 :origin-is-matrix #t) + ) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 24 of type gun-red-2-shockwave +(defmethod adjust-warp-radius-and-alpha ((this gun-red-2-shockwave)) + (let* ((f0-1 (/ (-> this max-radius) (-> this max-charge-radius))) + (f0-3 + (/ (the float (- (current-time) (-> this state-time))) (* f0-1 (the float (-> this warp-expansion-time)))) + ) + (f0-4 (* f0-3 f0-3)) + ) + (set! (-> this current-warp-radius) (lerp (-> this min-charge-radius) (-> this max-radius) f0-4)) + ) + (let ((f0-7 (/ (-> this current-warp-radius) (-> this max-radius)))) + (if (< 1.0 f0-7) + (set! (-> this current-warp-alpha) (fmax 0.0 (- 2.0 f0-7))) + ) + ) + (let ((v1-8 (new 'stack-no-clear 'vector))) + (set! (-> v1-8 x) (* 0.00024414062 (-> this current-warp-radius))) + (set! (-> v1-8 y) 1.0) + (set! (-> v1-8 z) (* 0.00024414062 (-> this current-warp-radius))) + (set! (-> v1-8 w) 1.0) + (send-event (handle->process (-> this explosion-1)) 'scale v1-8) + ) + (send-event (handle->process (-> this explosion-1)) 'alpha (-> this current-warp-alpha)) + ) + +;; definition for method 25 of type gun-red-2-shockwave +;; WARN: Return type mismatch float vs none. +(defmethod adjust-ring-radius-and-alpha ((this gun-red-2-shockwave)) + (let ((f0-2 (/ (the float (- (current-time) (-> this state-time))) (the float (-> this ring-expansion-time))))) + (set! (-> this current-ring-radius) (lerp (-> this min-charge-radius) (-> this max-charge-radius) f0-2)) + ) + (let ((f0-5 (/ (-> this current-ring-radius) (-> this max-radius)))) + (if (< 1.0 f0-5) + (set! (-> this current-ring-alpha) (fmax 0.0 (- 1.7 f0-5))) + ) + ) + (none) + ) + +;; definition for method 26 of type gun-red-2-shockwave +;; WARN: Return type mismatch symbol vs none. +(defmethod generate-order-array ((this gun-red-2-shockwave)) + (gun-red-2-shockwave-method-22 this 0 (-> this num-collision-pts-to-generate) 0 0) + (let ((a0-3 (log2 (-> this num-collision-pts-to-generate)))) + (when (< (ash 1 a0-3) (-> this num-collision-pts-to-generate)) + (let ((v1-7 (+ (ash 1 (+ (log2 (-> this num-collision-pts-to-generate)) 1)) -1)) + (a0-7 0) + ) + (dotimes (a1-1 v1-7) + (set! (-> this generate-order-array a0-7) (-> this generate-order-array a1-1)) + (if (nonzero? (-> this generate-order-array a0-7)) + (+! a0-7 1) + ) + ) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(when (or (zero? *impact-blur*) (!= loading-level global)) + (set! *impact-blur* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *impact-blur* 3 'loading-level (the-as int #f)) + ) + +;; failed to figure out what this is: +(set! (-> *impact-blur* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *impact-blur* pts data 0 second) 0.0) + +;; failed to figure out what this is: +(set! (-> *impact-blur* pts data 1 first) 0.2) + +;; failed to figure out what this is: +(set! (-> *impact-blur* pts data 1 second) 1.0) + +;; failed to figure out what this is: +(set! (-> *impact-blur* pts data 2 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *impact-blur* pts data 2 second) 0.0) + +;; failed to figure out what this is: +(when (or (zero? *shockwave-blur-red-2*) (!= loading-level global)) + (set! *shockwave-blur-red-2* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *shockwave-blur-red-2* 5 'loading-level (the-as int #f)) + ) + +;; failed to figure out what this is: +(set! (-> *shockwave-blur-red-2* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *shockwave-blur-red-2* pts data 0 second) 0.0) + +;; failed to figure out what this is: +(set! (-> *shockwave-blur-red-2* pts data 1 first) 0.7) + +;; failed to figure out what this is: +(set! (-> *shockwave-blur-red-2* pts data 1 second) 0.0) + +;; failed to figure out what this is: +(set! (-> *shockwave-blur-red-2* pts data 2 first) 0.8) + +;; failed to figure out what this is: +(set! (-> *shockwave-blur-red-2* pts data 2 second) 1.0) + +;; failed to figure out what this is: +(set! (-> *shockwave-blur-red-2* pts data 3 first) 0.9) + +;; failed to figure out what this is: +(set! (-> *shockwave-blur-red-2* pts data 3 second) 0.3) + +;; failed to figure out what this is: +(set! (-> *shockwave-blur-red-2* pts data 4 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *shockwave-blur-red-2* pts data 4 second) 0.0) + +;; definition for method 27 of type gun-red-2-shockwave +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod spawn-ring ((this gun-red-2-shockwave)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 quad) (-> this origin quad)) + (set! (-> v1-0 y) (- (-> v1-0 y) (-> this height-off-ground))) + (+! (-> v1-0 y) 2048.0) + (+! (-> v1-0 y) -1433.6) + (let ((s5-0 (new 'stack-no-clear 'red-2-ring-init-params))) + (set! (-> s5-0 pos quad) (-> v1-0 quad)) + (let ((v1-3 (process-spawn red-2-ring s5-0 :name "red-2-ring" :to this))) + (if v1-3 + (set! (-> this explosion-1) (ppointer->handle v1-3)) + ) + ) + ) + ) + (none) + ) + +;; definition for method 10 of type gun-red-2-shockwave +(defmethod deactivate ((this gun-red-2-shockwave)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (blit-displays-work-method-17 *blit-displays-work* (-> this origin) 0 1.0 #f) + (call-parent-method this) + (none) + ) + +;; failed to figure out what this is: +(defstate explode (gun-red-2-shockwave) + :virtual #t + :enter (behavior () + (let ((f30-0 (lerp 0.3 0.8 (-> self strength))) + (a3-0 (the int (* 300.0 (lerp 0.1 0.4 (-> self strength))))) + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 (the int (* 255.0 f30-0)) (the-as time-frame a3-0)) + ) + (sound-play "red2-shot") + (set-time! (-> self state-time)) + (set! (-> self max-radius) (lerp (-> self min-charge-radius) (-> self max-charge-radius) (-> self strength))) + (/ (-> self max-radius) (-> self max-charge-radius)) + (let ((f0-15 (* 0.000012207031 (-> self max-radius)))) + 0.0 + (let ((f1-5 (/ (* 2.0 (- (* 163840.0 f0-15) (-> self max-radius))) (* f0-15 f0-15)))) + (set! (-> *part-id-table* 353 init-specs 9 initial-valuef) (* 1.2 f1-5)) + ) + (let ((v1-15 (the int (* 150.0 f0-15)))) + (set! (-> *part-id-table* 354 init-specs 3 initial-valuef) (the-as float (+ v1-15 -25))) + (set! (-> *part-id-table* 354 init-specs 3 random-rangef) (the-as float (+ v1-15 -5))) + ) + ) + (adjust-height-and-radius self) + (set! (-> self current-intensity) (-> self strength)) + (spawn-ring self) + (set! (-> self num-collision-pts-to-generate) + (the int (fmax 6.0 (fmin 64.0 (* 64.0 (/ (-> self max-ground-radius) (-> self max-charge-radius)))))) + ) + (generate-order-array self) + (set! (-> self current-ring-alpha) 1.0) + (set! (-> self current-burst-alpha) 1.0) + (set! (-> self current-warp-alpha) 1.0) + ) + :exit (behavior () + (blit-displays-work-method-17 *blit-displays-work* (-> self origin) 0 1.0 #f) + ) + :trans (behavior () + (let ((f0-1 + (fmin 1.0 (/ (the float (- (current-time) (-> self state-time))) (the float (-> self total-explode-time)))) + ) + ) + (set! (-> self current-radius) + (fmin (lerp (-> self min-charge-radius) (-> self max-charge-radius) f0-1) (-> self max-radius)) + ) + ) + (set! (-> self current-stage-t) + (/ (- (-> self current-radius) (-> self min-charge-radius)) + (- (-> self max-radius) (-> self min-charge-radius)) + ) + ) + (set! (-> self current-intensity) + (cond + ((logtest? (game-secrets gun-upgrade-red-2) (-> *game-info* secrets)) + (let ((f0-8 (fmin (-> self current-stage-t) (* 1.5 (-> self current-stage-t) (-> self current-stage-t))))) + (fmax 0.3 (lerp (-> self strength) 0.0 f0-8)) + ) + ) + (else + (lerp (-> self strength) 0.0 (-> self current-stage-t)) + ) + ) + ) + (generate-shockwave-particles self) + (adjust-ring-radius-and-alpha self) + (adjust-warp-radius-and-alpha self) + (let ((f0-14 (-> self current-stage-t))) + 0.0 + (let* ((f0-16 (- 1.0 (curve2d-method-9 *impact-blur* f0-14 3))) + (f0-19 (lerp f0-16 1.0 (fmax 0.0 (- 0.5 (-> self strength))))) + ) + (blit-displays-work-method-17 *blit-displays-work* (-> self origin) 2 (fmin 1.0 f0-19) #f) + ) + ) + (if (< (-> self current-stage-t) 1.0) + (find-targets-and-attack! self) + ) + (cond + ((and (not (-> self generating-marks?)) (-> self show-scorch-marks?) (>= 0.0 (-> self current-warp-alpha))) + (go-virtual die) + ) + ((and (not (-> self show-scorch-marks?)) + (< (-> self next-computed-collision-point) (-> self num-collision-pts-to-generate)) + ) + (find-collision-point! self) + (find-collision-point! self) + (find-collision-point! self) + ) + ) + (if (and (not (-> self show-scorch-marks?)) + (time-elapsed? (-> self state-time) (the int (* 0.0036621094 (-> self max-radius)))) + ) + (set! (-> self show-scorch-marks?) #t) + ) + ) + :code (behavior () + (while (not (-> self show-scorch-marks?)) + (suspend) + ) + (generate-collision-points! self) + (generate-shockwave-scorch-marks-2) + (sleep-code) + ) + :post (behavior () + (set-vector! (new 'stack-no-clear 'vector) 1.9 0.0 0.0 (-> self alpha-scalar)) + (set! (-> *part-id-table* 229 init-specs 2 initial-valuef) (* 2.0 (-> self current-ring-radius))) + (set! (-> *part-id-table* 229 init-specs 7 initial-valuef) (* 128.0 (-> self current-ring-alpha))) + (set! (-> *part-id-table* 226 init-specs 3 initial-valuef) + (lerp 20480.0 24576.0 (/ (-> self max-radius) (-> self max-charge-radius))) + ) + (set! (-> *part-id-table* 226 init-specs 3 initial-valuef) + (* 0.5 (-> *part-id-table* 226 init-specs 3 initial-valuef)) + ) + (set! (-> *part-id-table* 226 init-specs 3 random-rangef) + (lerp 0.0 20480.0 (/ (-> self max-radius) (-> self max-charge-radius))) + ) + (launch-particles (-> *part-id-table* 229) (-> self origin)) + ) + ) + +;; definition for function gun-fire-red-2 +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs object. +(defbehavior gun-fire-red-2 target () + (let ((gp-0 (-> self gun)) + (v1-1 (-> self gun fire-point)) + ) + (set! (-> *last-player-pos* x) (-> *target* gun fire-point x)) + (set! (-> *last-player-pos* y) (+ 6553.6 (-> *target* control trans y))) + (set! (-> *last-player-pos* z) (-> *target* gun fire-point z)) + (when #t + (let ((s5-0 (new 'stack-no-clear 'gun-red-2-shockwave-init-params))) + (set! (-> s5-0 pos quad) (-> v1-1 quad)) + (let ((v1-4 (process-spawn + gun-red-2-shockwave + s5-0 + :name "gun-red-2-shockwave" + :to (ppointer->process (-> gp-0 gun)) + :stack *kernel-dram-stack* + ) + ) + ) + (set! (-> gp-0 gun 0 extra) (ppointer->handle v1-4)) + (let ((v0-0 (ppointer->handle v1-4))) + (set! (-> self gun charge-active?) (the-as handle v0-0)) + v0-0 + ) + ) + ) + ) + ) + ) + +;; definition of type red-3-sphere +(deftype red-3-sphere (process-drawable) + ((current-alpha float) + (pad uint8 12) + ) + (:state-methods + active + ) + (:methods + (red-3-sphere-method-21 (_type_) none) + (red-3-sphere-method-22 (_type_) none) + ) + ) + +;; definition for method 3 of type red-3-sphere +(defmethod inspect ((this red-3-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)) + (label cfg-4) + this + ) + +;; definition of type red-3-sphere-init-params +(deftype red-3-sphere-init-params (structure) + ((pos vector :inline) + ) + ) + +;; definition for method 3 of type red-3-sphere-init-params +(defmethod inspect ((this red-3-sphere-init-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'red-3-sphere-init-params) + (format #t "~1Tpos: #~%" (-> this pos)) + (label cfg-4) + this + ) + +;; definition for function red-3-sphere-init-by-other +;; INFO: Used lq/sq +(defbehavior red-3-sphere-init-by-other red-3-sphere ((arg0 red-3-sphere-init-params)) + (set! (-> self root) (new 'process 'trsqv)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-gun-red-sphere" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self root trans quad) (-> arg0 pos quad)) + (quaternion-identity! (-> self root quat)) + (go-virtual active) + ) + +;; failed to figure out what this is: +(defstate active (red-3-sphere) + :virtual #t + :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) + ) + (-> gp-0 fvec) + (-> gp-0 rvec) + (matrix->quat gp-0 (-> self root quat)) + ) + (set! (-> self current-alpha) (* 0.008333334 (the float (- (current-time) (-> self state-time))))) + (let ((f0-3 (+ (-> self root scale x) (* 24.0 (seconds-per-frame))))) + (set-vector! (-> self root scale) f0-3 f0-3 f0-3 1.0) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! gun-red-sphere-burst-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-no-eval :group! gun-red-sphere-fade-ja :num! (seek! max 5.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 5.0)) + ) + (deactivate self) + ) + :post (behavior () + (ja-post) + ) + ) + +;; definition for function gun-fire-red-3 +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs gun-red-3-grenade. +;; ERROR: Unsupported inline assembly instruction kind - [mula.s f1, f4] +;; ERROR: Unsupported inline assembly instruction kind - [madda.s f2, f5] +;; ERROR: Unsupported inline assembly instruction kind - [madd.s f1, f3, f6] +(defbehavior gun-fire-red-3 target () + (local-vars + (f1-2 float) + (sv-16 gun-info) + (sv-20 vector) + (sv-24 vector) + (sv-28 float) + (sv-144 vector) + (sv-148 vector) + (sv-1952 vector) + (sv-1968 vector) + ) + (set! sv-16 (-> self gun)) + (set! sv-20 (-> self gun fire-dir-out)) + (set! sv-24 (-> self gun fire-point)) + (set! sv-28 (the-as float 266240.0)) + (draw-beam (-> *part-id-table* 217) sv-24 sv-20 #f) + (set! (-> sv-20 y) (fmax 0.3 (-> sv-20 y))) + (vector-normalize! sv-20 1.0) + (let ((v1-17 (cond + ((logtest? (-> *part-group-id-table* 86 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> sv-16 fire-point quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 86)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> sv-16 fire-point quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 86)) + ) + ) + ) + ) + (send-event (ppointer->process v1-17) 'clock self) + ) + (set! sv-144 (new 'stack-no-clear 'vector)) + (let ((v1-42 (new 'stack-no-clear 'vector))) + (set! (-> v1-42 quad) (-> sv-20 quad)) + (set! sv-148 v1-42) + ) + (set! (-> sv-148 y) 0.0) + (vector-normalize! sv-148 1.0) + (vector+float*! sv-144 sv-24 sv-148 143360.0) + (set! (-> sv-144 w) 143360.0) + (let ((f30-0 4096000.0) + (s5-0 #f) + (gp-2 (the-as process-focusable #f)) + ) + (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) '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)) + (let* ((s1-0 (-> s3-0 s2-0)) + (v1-54 (if (type? s1-0 collide-shape) + s1-0 + ) + ) + ) + (when v1-54 + (let* ((s0-0 (-> v1-54 process)) + (s1-1 (if (type? s0-0 process-focusable) + s0-0 + ) + ) + ) + (when s1-1 + (when (and (!= *target* s1-1) + (not (focus-test? (the-as process-focusable s1-1) disable dead inactive gun-no-target)) + (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?)) + ) + (!= s4-0 s1-1) + ) + (when (or (not s5-0) (logtest? (process-mask enemy guard) (-> s1-1 mask))) + (set! sv-1952 (new 'stack-no-clear 'vector)) + (let ((v1-71 (-> (get-trans (the-as process-focusable s1-1) 0) quad))) + (set! (-> sv-1952 quad) v1-71) + ) + (set! sv-1968 (vector-normalize-copy! (new 'stack-no-clear 'vector) sv-148 1.0)) + (let ((s0-1 (new 'stack-no-clear 'vector))) + (let ((a1-18 s0-1) + (v1-72 sv-24) + ) + (vector-! a1-18 sv-1952 v1-72) + ) + (let ((f0-7 (vector-normalize-ret-len! s0-1 1.0))) + (let* ((v1-73 s0-1) + (f1-1 (-> sv-1968 x)) + (f2-0 (-> sv-1968 y)) + (f3-0 (-> sv-1968 z)) + (f4-0 (-> v1-73 x)) + (f5-0 (-> v1-73 y)) + (f6-0 (-> v1-73 z)) + ) + (.mula.s f1-1 f4-0) + (.madda.s f2-0 f5-0) + (.madd.s f1-2 f3-0 f6-0) + ) + (let ((f1-3 f1-2) + (v1-75 (and (not s5-0) (logtest? (process-mask enemy guard) (-> s1-1 mask)))) + ) + (when (and (< 0.707 f1-3) (< (fabs (-> s0-1 y)) 28672.0) (or v1-75 (< f0-7 f30-0))) + (set! s5-0 v1-75) + (set! f30-0 f0-7) + (set! gp-2 (the-as process-focusable s1-1)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (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) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (when gp-2 + (let ((s5-1 (new 'stack-no-clear 'vector))) + (set! (-> s5-1 quad) (-> (get-trans gp-2 3) quad)) + (let ((f0-10 (vector-vector-xz-distance s5-1 (-> sv-16 fire-point))) + (f1-13 (fabs (- (-> s5-1 y) (-> sv-16 fire-point y)))) + ) + 0.0 + (when (< f1-13 24576.0) + (let ((f0-14 (* 0.5 (asin (/ (* 184320.0 f0-10) (* sv-28 sv-28)))))) + (set! (-> sv-20 y) (sin f0-14)) + ) + (vector-normalize! sv-20 1.0) + ) + ) + ) + ) + ) + (let ((a1-33 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> a1-33 ent) (-> self entity)) + (set! (-> a1-33 charge) 1.0) + (set! (-> a1-33 options) (projectile-options)) + (logclear! (-> a1-33 options) (projectile-options po14 po15 po16)) + (set! (-> a1-33 pos quad) (-> sv-24 quad)) + (set! (-> a1-33 vel quad) (-> (vector-float*! (new 'stack-no-clear 'vector) sv-20 sv-28) quad)) + (set! (-> a1-33 notify-handle) (the-as handle #f)) + (set! (-> a1-33 owner-handle) (process->handle self)) + (set! (-> a1-33 target-handle) (the-as handle #f)) + (set! (-> a1-33 target-pos quad) (the-as uint128 0)) + (set! (-> a1-33 ignore-handle) (process->handle self)) + (let* ((v1-127 *game-info*) + (a0-100 (+ (-> v1-127 attack-id) 1)) + ) + (set! (-> v1-127 attack-id) a0-100) + (set! (-> a1-33 attack-id) a0-100) + ) + (set! (-> a1-33 timeout) (seconds 4)) + (the-as gun-red-3-grenade (spawn-projectile gun-red-3-grenade a1-33 self *default-dead-pool*)) + ) + ) + +;; definition for method 39 of type gun-red-3-grenade +;; WARN: Return type mismatch sound-id vs none. +(defmethod projectile-method-39 ((this gun-red-3-grenade)) + (let* ((a2-0 (-> this root)) + (v1-0 (-> a2-0 status)) + ) + (if (logtest? v1-0 (collide-status touch-surface)) + (vector-float*! (-> a2-0 transv) (-> a2-0 transv) 0.6) + ) + (when (and (logtest? v1-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 (gun-red-3-grenade) + :virtual #t + :trans (behavior () + (go-impact self) + (let ((t9-2 (-> (find-parent-state) trans))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate sitting (gun-red-3-grenade) + :virtual #t + :trans (behavior () + (go-impact self) + (let ((t9-2 (-> (find-parent-state) trans))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate impact-tiny (gun-red-3-grenade) + :virtual #t + :event projectile-event-handler + :enter (behavior () + '() + ) + :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) 0.0) + (set! (-> gp-0 scale) 1.0) + (set! (-> gp-0 group) (-> *part-group-id-table* 104)) + (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 self) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (while (-> self child) + (suspend) + ) + (deactivate self) + ) + ) + +;; definition for method 10 of type gun-red-3-grenade +(defmethod deactivate ((this gun-red-3-grenade)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (blit-displays-work-method-17 *blit-displays-work* *zero-vector* 0 1.0 #f) + (call-parent-method this) + (none) + ) + +;; failed to figure out what this is: +(defstate impact (gun-red-3-grenade) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (when (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) + ) + ) + ) + (+! (-> *game-info* shots-hit 1) 1.0) + #t + ) + ) + ) + ) + :code (behavior () + (sound-play "red3-blast") + (find-and-damage-targets self) + (set-time! (-> self state-time)) + (when (not (-> self immediate-detonation?)) + (let ((gp-1 (new 'stack-no-clear 'red-3-sphere-init-params))) + (set! (-> gp-1 pos quad) (-> self root trans quad)) + (process-spawn red-3-sphere gp-1 :name "red-3-sphere" :to self) + ) + ) + (cond + ((logtest? (-> *part-group-id-table* 88 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* 88)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 88)) + ) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-49 (-> self root root-prim))) + (set! (-> v1-49 prim-core collide-as) (collide-spec)) + (set! (-> v1-49 prim-core collide-with) (collide-spec)) + ) + 0 + (let ((gp-4 (-> self child))) + (while gp-4 + (send-event (ppointer->process gp-4) 'notice 'die) + (set! gp-4 (-> gp-4 0 brother)) + ) + ) + (let ((gp-6 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (math-camera-pos)))) + 0.0 + (let* ((f0-2 (vector-length gp-6)) + (f30-0 (* 0.0000016276042 f0-2)) + ) + (cpad-set-buzz! + (-> *cpad-list* cpads 0) + 1 + (the int (* 255.0 (lerp-scale-clamp 1.0 0.3 f30-0 0.1 0.8))) + (the-as time-frame (the int (* 300.0 (lerp 0.3 0.1 f30-0)))) + ) + (let ((f30-1 (fmin 1.0 f30-0))) + (while (-> self child) + (let ((f0-11 (* 0.0044444446 (the float (- (current-time) (-> self state-time)))))) + 0.0 + (let* ((f0-13 (- 1.0 (curve2d-method-9 *impact-blur* f0-11 1))) + (f0-14 (lerp f0-13 1.0 f30-1)) + ) + (set! (-> *display* force-sync) (the-as uint 2)) + (blit-displays-work-method-17 *blit-displays-work* (-> self root trans) 2 (fmin 1.0 f0-14) #f) + ) + ) + (let ((gp-8 (-> self child))) + (while gp-8 + (send-event (ppointer->process gp-8) 'notice 'die) + (set! gp-8 (-> gp-8 0 brother)) + ) + ) + (suspend) + ) + ) + ) + ) + (blit-displays-work-method-17 *blit-displays-work* (-> self root trans) 15 1.0 #f) + (deactivate self) + ) + ) + +;; definition for function gun-fire-red-1 +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs object. +(defbehavior gun-fire-red-1 target () + (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 (-> self gun))) + (let ((s5-0 (-> *part-id-table* 216))) + (get-field-spec-by-id s5-0 (sp-field-id spt-omega)) + (let ((s5-1 (get-field-spec-by-id s5-0 (sp-field-id spt-rotate-y)))) + (if s5-1 + (set! (-> s5-1 initial-valuef) (y-angle (-> self control))) + ) + ) + ) + (launch-particles (-> *part-id-table* 216) (-> gp-0 fire-point)) + (let ((s5-2 (new 'stack-no-clear 'vector))) + (let ((v1-10 (-> gp-0 fire-point))) + (let ((a0-4 (-> gp-0 fire-dir-out))) + (let ((a1-4 24576.0)) + (.mov vf7 a1-4) + ) + (.lvf vf5 (&-> a0-4 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 (&-> s5-2 quad) vf6) + (set! (-> s5-2 w) 24576.0) + (when (and (sphere-in-view-frustum? (the-as sphere s5-2)) + (< 24576.0 (vector-vector-distance s5-2 (math-camera-pos))) + ) + (let ((s5-3 + (process-spawn + manipy + :init manipy-init + (-> gp-0 fire-point) + (-> self entity) + (art-group-get-by-name *level* "skel-gun-red-cone" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when s5-3 + (send-event (ppointer->process s5-3) 'anim-mode 'play1) + (send-event (ppointer->process s5-3) 'anim "idle") + (forward-up->quaternion (-> (the-as manipy (-> s5-3 0)) root quat) (-> gp-0 fire-dir-out) *up-vector*) + (let ((f30-1 + (vector-dot + (-> gp-0 fire-dir-out) + (vector-! (new 'stack-no-clear 'vector) (-> gp-0 fire-point) (math-camera-pos)) + ) + ) + (f0-5 (vector-vector-xz-distance (-> gp-0 fire-point) (math-camera-pos))) + ) + (when (and (< f30-1 0.0) (< f0-5 32768.0)) + (set! (-> (the-as manipy (-> s5-3 0)) root scale z) (lerp-scale 0.2 1.0 (fabs f0-5) 20480.0 32768.0)) + (set! (-> (the-as manipy (-> s5-3 0)) root scale x) (-> (the-as manipy (-> s5-3 0)) root scale z)) + ) + ) + ) + ) + ) + ) + (process-spawn + gun-red-shot + (-> gp-0 fire-point) + (-> gp-0 fire-dir-out) + :name "gun-red-shot" + :to (ppointer->process (-> gp-0 gun)) + ) + ) + ) + ) + +;; definition for function target-gun-can-fire-red? +(defbehavior target-gun-can-fire-red? target ((arg0 pickup-type)) + #t + ) + +;; definition for function target-gun-fire-red +;; WARN: Return type mismatch object vs (pointer process). +(defbehavior target-gun-fire-red target ((arg0 pickup-type)) + (+! (-> *game-info* shots-fired 1) 1.0) + (the-as (pointer process) (case arg0 + (((pickup-type gun-red-1)) + (gun-fire-red-1) + ) + (((pickup-type gun-red-2)) + (gun-fire-red-2) + ) + (((pickup-type gun-red-3)) + (gun-fire-red-3) + ) + ) + ) + ) + +;; definition for function gun-red-shot-event-handler +;; WARN: Return type mismatch none vs object. +(defbehavior gun-red-shot-event-handler gun-red-shot ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('touched) + (send-attack! self (the-as process-drawable arg0) (the-as touching-shapes-entry (-> arg3 param 0))) + ) + ) + ) + +;; definition for method 29 of type gun-red-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod send-attack! ((this gun-red-shot) (arg0 process-drawable) (arg1 touching-shapes-entry)) + (let* ((s5-0 arg0) + (v1-0 (if (type? s5-0 process-drawable) + s5-0 + ) + ) + ) + (when v1-0 + (let* ((s5-2 (vector-! (new 'stack-no-clear 'vector) (-> v1-0 root trans) (-> this start-pos))) + (f30-0 (* (if (< (vector-length s5-2) 24576.0) + 3.0 + 2.0 + ) + (if (logtest? (game-feature feature22) (-> *game-info* features)) + 2.0 + 1.0 + ) + ) + ) + ) + (if (and (logtest? (process-mask guard) (-> arg0 mask)) + (not (-> *setting-control* user-current gun-target-guards?)) + ) + (set! f30-0 0.0) + ) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (rot-zxy-from-vector! s2-0 s5-2) + (let ((f28-0 (deg- (-> s2-0 x) (-> this start-rot x))) + (f0-6 (deg- (-> s2-0 y) (-> this start-rot y))) + ) + (when (or (< 2730.6667 (fabs f28-0)) (< 8192.0 (fabs f0-6))) + (let ((f1-5 (fmax -2730.6667 (fmin 2730.6667 f28-0))) + (f0-8 (fmax -8192.0 (fmin 8192.0 f0-6))) + ) + (set! (-> s2-0 x) (+ (-> this start-rot x) f1-5)) + (set! (-> s2-0 y) (+ (-> this start-rot y) f0-8)) + ) + (set-vector! s5-2 0.0 0.0 1.0 1.0) + (vector-rotate-around-x! s5-2 s5-2 (-> s2-0 x)) + (vector-rotate-around-y! s5-2 s5-2 (-> s2-0 y)) + ) + ) + ) + (+! (-> *game-info* shots-hit 1) 1.0) + (send-event + arg0 + 'attack + arg1 + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> this attack-id)) + (damage f30-0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'eco-red) + (attacker-velocity s5-2) + (attacker (process->handle *target*)) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 25 of type gun-red-shot +;; WARN: Return type mismatch int vs none. +(defmethod stub ((this gun-red-shot)) + 0 + (none) + ) + +;; definition for method 23 of type gun-red-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-probes! ((this gun-red-shot) (arg0 collide-shape)) + (let ((s5-0 (-> this probe-count))) + (when (< s5-0 19) + (let* ((s4-0 (-> arg0 process)) + (a0-2 (if (type? s4-0 process-focusable) + (the-as process-focusable s4-0) + ) + ) + (s4-1 (new 'stack-no-clear 'vector)) + ) + (if a0-2 + (set! (-> s4-1 quad) (-> (get-trans a0-2 3) quad)) + (set! (-> s4-1 quad) (-> arg0 root-prim prim-core world-sphere quad)) + ) + (vector-! s4-1 s4-1 (-> this start-pos)) + (vector-normalize! s4-1 1.0) + (let ((s3-2 (new 'stack-no-clear 'vector))) + (rot-zxy-from-vector! s3-2 s4-1) + (let ((f30-0 (deg- (-> s3-2 x) (-> this start-rot x))) + (f0-4 (deg- (-> s3-2 y) (-> this start-rot y))) + ) + (when (or (< 2730.6667 (fabs f30-0)) (< 8192.0 (fabs f0-4))) + (let ((f1-3 (fmax -2730.6667 (fmin 2730.6667 f30-0))) + (f0-6 (fmax -8192.0 (fmin 8192.0 f0-4))) + ) + (set! (-> s3-2 x) (+ (-> this start-rot x) f1-3)) + (set! (-> s3-2 y) (+ (-> this start-rot y) f0-6)) + ) + (set-vector! s4-1 0.0 0.0 1.0 1.0) + (vector-rotate-around-x! s4-1 s4-1 (-> s3-2 x)) + (vector-rotate-around-y! s4-1 s4-1 (-> s3-2 y)) + ) + ) + ) + (set! (-> this probe-dir s5-0 quad) (-> s4-1 quad)) + ) + (set! (-> this probe-count) (+ s5-0 1)) + ) + ) + (none) + ) + +;; definition for method 26 of type gun-red-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod find-targets ((this gun-red-shot)) + (local-vars (a2-5 float) (a2-12 float)) + (rlet ((vf1 :class vf) + (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 ((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)) + (set! *actor-list-length* (fill-actor-list-for-box *actor-hash* s5-0 *actor-list* 256)) + ) + (when (logtest? s4-0 (collide-spec player-list)) + (let ((a0-6 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((v1-18 (-> a0-6 next0))) + (while (!= a0-6 (-> *collide-player-list* alive-list-end)) + (let* ((a0-7 (-> (the-as connection a0-6) param1)) + (a1-4 (-> (the-as collide-shape a0-7) root-prim)) + ) + (when (logtest? s4-0 (-> a1-4 prim-core collide-as)) + (let ((a1-5 (-> a1-4 prim-core))) + (let ((a2-4 a1-5) + (a3-1 s5-0) + ) + (.lvf vf2 (&-> a2-4 world-sphere quad)) + (.lvf vf3 (&-> a3-1 min 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-1 (+ (-> a1-5 world-sphere w) (-> s5-0 min w))) + ) + (when (< f0-2 (* f1-1 f1-1)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-7)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! a0-6 v1-18) + *collide-player-list* + (set! v1-18 (-> v1-18 next0)) + ) + ) + ) + ) + (when (logtest? s4-0 (collide-spec hit-by-player-list)) + (let ((a0-9 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((v1-26 (-> a0-9 next0))) + (while (!= a0-9 (-> *collide-hit-by-player-list* alive-list-end)) + (let* ((a0-10 (-> (the-as connection a0-9) param1)) + (a1-16 (-> (the-as collide-shape a0-10) root-prim)) + ) + (when (logtest? s4-0 (-> a1-16 prim-core collide-as)) + (let ((a1-17 (-> a1-16 prim-core))) + (let ((a2-11 a1-17) + (a3-2 s5-0) + ) + (.lvf vf2 (&-> a2-11 world-sphere quad)) + (.lvf vf3 (&-> a3-2 min 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-5 (+ (-> a1-17 world-sphere w) (-> s5-0 min w))) + ) + (when (< f0-3 (* f1-5 f1-5)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-10)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! a0-9 v1-26) + *collide-hit-by-player-list* + (set! v1-26 (-> v1-26 next0)) + ) + ) + ) + ) + (dotimes (s5-1 *actor-list-length*) + (let ((a1-28 (-> *actor-list* s5-1))) + (if (logtest? s4-0 (-> a1-28 root-prim prim-core collide-as)) + (init-probes! this a1-28) + ) + ) + ) + ) + ) + (set! (-> this actor-count) (-> this probe-count)) + 0 + (none) + ) + ) + +;; definition for method 27 of type gun-red-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-probes ((this gun-red-shot)) + (find-targets this) + (let ((s5-0 (-> this probe-count))) + (while (< s5-0 19) + (let ((f28-0 (rand-vu-float-range -2730.6667 2730.6667)) + (f30-0 (rand-vu-float-range -8192.0 8192.0)) + (s4-0 (-> this probe-dir s5-0)) + ) + (set-vector! s4-0 0.0 0.0 1.0 1.0) + (vector-rotate-around-x! s4-0 s4-0 (+ (-> this start-rot x) f28-0)) + (vector-rotate-around-y! s4-0 s4-0 (+ (-> this start-rot y) f30-0)) + ) + (+! s5-0 1) + ) + (set! (-> this probe-count) s5-0) + ) + 0 + (none) + ) + +;; definition for method 28 of type gun-red-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch sound-id vs none. +(defmethod do-collision ((this gun-red-shot) (arg0 vector)) + (local-vars (at-0 int)) + (with-pp + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (-> this root))) + (let ((v1-0 (new 'stack-no-clear 'collide-query))) + (set! (-> gp-0 trans quad) (-> this start-pos quad)) + (vector-float*! (-> gp-0 transv) arg0 61440.0) + (let ((a1-1 v1-0)) + (set! (-> a1-1 radius) (-> gp-0 root-prim local-sphere w)) + (set! (-> a1-1 collide-with) (-> gp-0 root-prim prim-core collide-with)) + (set! (-> a1-1 ignore-process0) this) + (set! (-> a1-1 ignore-process1) (ppointer->process (-> this parent))) + (set! (-> a1-1 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> a1-1 action-mask) (collide-action solid)) + ) + (set! (-> v1-0 start-pos quad) (-> gp-0 trans quad)) + (set! (-> v1-0 move-dist quad) (-> gp-0 transv quad)) + (fill-using-line-sphere *collide-cache* v1-0) + ) + (let ((v1-2 (-> gp-0 transv))) + (.lvf vf1 (&-> (-> gp-0 transv) quad)) + (let ((f0-2 (-> pp clock frames-per-second))) + (.mov at-0 f0-2) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> v1-2 quad) vf1) + ) + (integrate-and-collide! gp-0 (-> gp-0 transv)) + (if (logtest? (-> gp-0 status) (collide-status touch-surface touch-wall)) + (sound-play "red-shot-hit") + ) + ) + (none) + ) + ) + ) + +;; definition for method 24 of type gun-red-shot +(defmethod check-blocked? ((this gun-red-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)) + ) + (if (fill-and-try-snap-to-surface v1-0 (-> v1-0 transv) -6144.0 0.0 -2048.0 t1-0) + #t + ) + ) + ) + +;; failed to figure out what this is: +(defstate debug-idle (gun-red-shot) + :virtual #t + :code (behavior () + (set-time! (-> self state-time)) + (until (time-elapsed? (-> self state-time) (seconds 3)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (dotimes (s5-0 (-> self probe-count)) + (vector-float*! gp-0 (-> self probe-dir s5-0) 61440.0) + (vector+! gp-0 gp-0 (-> self start-pos)) + (add-debug-sphere + #t + (bucket-id debug-no-zbuf1) + gp-0 + (meters 0.5) + (if (< s5-0 (-> self actor-count)) + (new 'static 'rgba :r #xff :a #x80) + (new 'static 'rgba :r #xff :g #xff :a #x60) + ) + ) + ) + ) + (add-debug-vector + #t + (bucket-id debug) + (-> self start-pos) + (-> self start-dir) + (meters 6) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + ) + (suspend) + ) + ) + ) + +;; failed to figure out what this is: +(defstate blocked (gun-red-shot) + :virtual #t + :event gun-red-shot-event-handler + :code (behavior () + (suspend) + 0 + ) + ) + +;; failed to figure out what this is: +(defstate idle (gun-red-shot) + :virtual #t + :event gun-red-shot-event-handler + :code (behavior () + (let ((gp-0 0)) + (countdown (s5-0 3) + (countdown (s4-0 7) + (when (< gp-0 19) + (do-collision self (-> self probe-dir gp-0)) + (+! gp-0 1) + ) + ) + (suspend) + ) + ) + ) + ) + +;; definition for function gun-red-shot-init-by-other +;; INFO: Used lq/sq +(defbehavior gun-red-shot-init-by-other gun-red-shot ((arg0 vector) (arg1 vector)) + (set! (-> self start-pos quad) (-> arg0 quad)) + (set! (-> self start-dir quad) (-> arg1 quad)) + (rot-zxy-from-vector! (-> self start-rot) arg1) + (let* ((v1-2 *game-info*) + (a0-7 (+ (-> v1-2 attack-id) 1)) + ) + (set! (-> v1-2 attack-id) a0-7) + (set! (-> self attack-id) a0-7) + ) + (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) + (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-red-shot)) + (let ((v1-10 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-10 prim-core collide-with) + (collide-spec backgnd bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set-vector! (-> v1-10 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-10) + ) + (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! (-> s5-0 max-iteration-count) (the-as uint 1)) + (set! (-> s5-0 event-self) 'touched) + (set! (-> self root) s5-0) + ) + (let ((s5-1 (-> self root))) + (set! (-> s5-1 trans quad) (-> arg0 quad)) + (quaternion-copy! (-> s5-1 quat) (-> self parent 0 root quat)) + (vector-identity! (-> s5-1 scale)) + ) + (update-transforms (-> self root)) + (set! (-> self event-hook) gun-red-shot-event-handler) + (logior! (-> self mask) (process-mask projectile)) + (logclear! (-> self mask) (process-mask enemy)) + (setup-probes self) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + (let ((v1-39 (cond + ((logtest? (-> *part-group-id-table* 84 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self start-pos quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 84)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self start-pos quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 84)) + ) + ) + ) + ) + (send-event (ppointer->process v1-39) 'clock self) + ) + (draw-beam (-> *part-id-table* 213) (-> self start-pos) (-> self start-dir) #f) + (sound-play "red-shot-fire") + (vector-float*! (-> self root transv) (-> self start-dir) 61440.0) + (if (check-blocked? self) + (go-virtual blocked) + (go-virtual idle) + ) + ) diff --git a/test/decompiler/reference/jak3/engine/target/gun/gun-states_REF.gc b/test/decompiler/reference/jak3/engine/target/gun/gun-states_REF.gc new file mode 100644 index 0000000000..d4f642fb20 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-states_REF.gc @@ -0,0 +1,478 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defstate target-gun-stance (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('gun) + (let ((gp-0 (-> block param 0)) + (v0-0 (target-standard-event-handler proc argc message block)) + ) + (when v0-0 + (cond + ((= gp-0 26) + (if (logtest? (game-secrets gun-upgrade-red-1) (-> *game-info* secrets)) + (set! (-> self control unknown-word04) (the-as uint jakb-gun-red-fire-fast-ja)) + (set! (-> self control unknown-word04) (the-as uint jakb-gun-red-fire-ja)) + ) + ) + ((= gp-0 28) + (if (logtest? (game-secrets gun-upgrade-red-3) (-> *game-info* secrets)) + (set! (-> self control unknown-word04) (the-as uint jakb-gun-red-fire-fast-ja)) + (set! (-> self control unknown-word04) (the-as uint jakb-gun-red-fire-ja)) + ) + ) + ((= gp-0 27) + (set! (-> self control unknown-word04) (the-as uint jakb-gun-red-fire-2-ja)) + ) + ((or (= gp-0 35) (= gp-0 27) (= gp-0 36) (= gp-0 37)) + (set! (-> self control unknown-word04) (the-as uint jakb-gun-dark-fire-ja)) + ) + ((or (= gp-0 29) (= gp-0 30)) + (set! (-> self control unknown-word04) (the-as uint jakb-gun-yellow-fire-low-ja)) + ) + ((= gp-0 31) + (set! (-> self control unknown-word04) (the-as uint jakb-gun-yellow-fire-3-ja)) + ) + ((or (= gp-0 32) (= gp-0 34)) + (set! (-> self control unknown-word04) (the-as uint jakb-gun-blue-fire-single-ja)) + ) + ((= gp-0 33) + (set! (-> self control unknown-word04) (the-as uint jakb-gun-blue-fire-2-ja)) + ) + ) + ) + v0-0 + ) + ) + (('wade) + #f + ) + (else + (target-standard-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (logior! (-> self target-flags) (target-flags lleg-still rleg-still)) + (set! (-> self control mod-surface) *gun-walk-mods*) + (set! (-> self control unknown-word04) (the-as uint #f)) + (set-time! (-> self state-time)) + ) + :exit (behavior () + (set! (-> self control bend-target) 0.0) + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still)) + (target-state-hook-exit) + (target-gun-exit) + ) + :trans (behavior () + ((-> self state-hook)) + (when (= (-> self control ground-pat material) (pat-material ice)) + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still)) + (set! (-> self control bend-target) 0.0) + (remove-exit) + (go target-ice-stance) + ) + (when (or (move-legs?) (< 8192.0 (fabs (-> self gun gun-roty-rel)))) + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still)) + (set! (-> self control bend-target) 0.0) + (remove-exit) + (go target-gun-walk) + ) + (if (want-to-powerjak?) + (go target-powerjak-get-on) + ) + (when (and (cpad-hold? (-> self control cpad number) l1) (can-duck?)) + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still)) + (set! (-> self control bend-target) 0.0) + (remove-exit) + (go target-duck-stance #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 x) + ) + (can-jump? #f) + ) + (target-jump-go) + ) + (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-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 square) + ) + (can-hands? #t) + ) + (go target-running-attack) + ) + (when (and (and (focus-test? self light) (nonzero? (-> self lightjak))) + (and (cpad-pressed? (-> self control cpad number) triangle) + (logtest? (game-feature lightjak-regen) (-> self game features)) + (and (< (-> self fact health) (-> self fact health-max)) (zero? (-> self lightjak latch-out-time))) + ) + ) + (set! (-> self lightjak lightjak-before-powerjak) #t) + (go target-lightjak-regen 0) + ) + (slide-down-test) + (fall-test target-falling (-> *TARGET-bank* fall-height)) + ) + :code (behavior () + (local-vars (v1-344 object)) + (let ((gp-0 (-> self skel top-anim frame-targ))) + (cond + ((or (= gp-0 jakb-gun-red-takeout-ja) + (= gp-0 jakb-gun-yellow-takeout-ja) + (= gp-0 jakb-gun-blue-takeout-ja) + (= gp-0 jakb-gun-dark-takeout-ja) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! gp-0 :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((or (= gp-0 jakb-gun-red-fire-2-ja) (= gp-0 jakb-gun-dark-fire-ja) (= gp-0 jakb-gun-blue-fire-2-ja)) + (set! (-> self control unknown-word04) (the-as uint gp-0)) + ) + ) + ) + (let ((s5-0 (-> self game gun-type))) + (b! #t cfg-143 :delay (nop!)) + (label cfg-19) + (let* ((v1-47 (gun->eco (-> self gun gun-type))) + (gp-1 (cond + ((= v1-47 (pickup-type eco-blue)) + jakb-gun-stance-blue-ja + ) + ((= v1-47 (pickup-type eco-yellow)) + jakb-gun-stance-yellow-ja + ) + ((= v1-47 (pickup-type eco-dark)) + jakb-gun-stance-dark-ja + ) + (else + jakb-gun-stance-ja + ) + ) + ) + ) + (cond + ((and (ja-group? gp-1) (= s5-0 (-> self gun gun-type))) + ) + ((let ((v1-67 (ja-group))) + (and (and v1-67 (or (= v1-67 jakb-gun-stance-ja) (= v1-67 jakb-gun-stance-dark-ja))) + (or (= gp-1 jakb-gun-stance-ja) (= gp-1 jakb-gun-stance-dark-ja)) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-gun-transformation-twirl-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.1)) + (set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim gp-1)) + ) + ((let ((v1-106 (ja-group))) + (and (and v1-106 (or (= v1-106 jakb-gun-stance-ja) (= v1-106 jakb-gun-stance-dark-ja))) + (or (= gp-1 jakb-gun-stance-yellow-ja) (= gp-1 jakb-gun-stance-blue-ja)) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-gun-front-to-side-hop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.1)) + (set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim gp-1)) + ) + ((let ((v1-146 (ja-group))) + (and (and v1-146 (or (= v1-146 jakb-gun-stance-yellow-ja) (= v1-146 jakb-gun-stance-blue-ja))) + (or (= gp-1 jakb-gun-stance-ja) (= gp-1 jakb-gun-stance-dark-ja)) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-gun-side-to-front-hop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.1)) + (set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim gp-1)) + ) + ((let ((v1-186 (ja-group))) + (and (and v1-186 (or (= v1-186 jakb-gun-stance-yellow-ja) (= v1-186 jakb-gun-stance-blue-ja))) + (or (= gp-1 jakb-gun-stance-blue-ja) (= gp-1 jakb-gun-stance-yellow-ja)) + (!= (gun->eco s5-0) (gun->eco (-> self gun gun-type))) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-gun-blue-to-yellow-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.1)) + (set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim gp-1)) + ) + ((and (!= s5-0 (-> self gun gun-type)) (= (gun->eco s5-0) (gun->eco (-> self gun gun-type)))) + (ja-channel-push! 1 (seconds 0.1)) + (cond + ((= (-> self skel top-anim frame-targ) jakb-gun-side-to-side-hop-1-ja) + (ja-no-eval :group! jakb-gun-side-to-side-hop-1-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= (-> self skel top-anim frame-targ) jakb-gun-side-to-side-hop-2-ja) + (ja-no-eval :group! jakb-gun-side-to-side-hop-2-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= (gun->eco s5-0) (pickup-type eco-yellow)) + ) + (else + (ja-no-eval :group! jakb-gun-transformation-twirl-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim gp-1)) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim gp-1)) + ) + ) + ) + (set! s5-0 (-> self gun gun-type)) + (suspend) + (ja :num! (loop!)) + (when (can-play-stance-amibent?) + (set-time! (-> self ambient-time)) + (target-gun-end-mode #t) + ) + (cond + ((not (-> self control unknown-spool-anim00)) + ) + (else + (b! + (not (or (= (-> self control unknown-spool-anim00) jakb-gun-dark-fire-ja) + (= (-> self control unknown-spool-anim00) jakb-gun-red-fire-2-ja) + (= (-> self control unknown-spool-anim00) jakb-gun-blue-fire-2-ja) + ) + ) + cfg-140 + :delay (nop!) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self control unknown-spool-anim00)) + (suspend) + (b! #t cfg-131 :delay (nop!)) + (label cfg-130) + (suspend) + (label cfg-131) + (let ((v1-343 (get-channel (-> self skel top-anim) 0))) + (b! (not v1-343) cfg-138 :likely-delay (set! v1-344 v1-343)) + (let ((a1-37 (= (-> v1-343 frame-group) (-> self control unknown-spool-anim00)))) + (b! (not a1-37) cfg-138 :likely-delay (set! v1-344 a1-37)) + ) + (let ((a0-110 (-> self skel root-channel 0))) + (set! (-> a0-110 num-func) num-func-identity) + (let ((f0-57 (-> v1-343 frame-num))) + (set! (-> a0-110 frame-num) f0-57) + (let ((v1-345 f0-57)) + (b! (not (the int v1-345)) cfg-138 :likely-delay (set! v1-344 v1-345)) + ) + ) + ) + ) + (set! v1-344 (= s5-0 (-> self game gun-type))) + (label cfg-138) + (b! v1-344 cfg-130 :delay (nop!)) + (set! (-> self control unknown-word04) (the-as uint #f)) + (b! #t cfg-143 :delay (nop!)) + (label cfg-140) + (ja-channel-push! 1 0) + (ja-no-eval :group! (-> self control unknown-spool-anim00) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set! (-> self control unknown-word04) (the-as uint #f)) + ) + ) + ) + (label cfg-143) + (b! (using-gun? self) cfg-19 :delay (nop!)) + (let ((gp-2 (-> self skel top-anim frame-targ))) + (cond + ((or (= gp-2 jakb-gun-red-takeout-ja) (= gp-2 jakb-gun-yellow-takeout-ja) (= gp-2 jakb-gun-dark-takeout-ja)) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! gp-2 :num! (seek! 0.0) :frame-num max) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 0.0)) + ) + ) + ((= gp-2 jakb-gun-blue-takeout-ja) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! gp-2 :num! (seek! 0.0) :frame-num (ja-aframe -34.0 0)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 0.0)) + ) + ) + ) + ) + (go target-stance) + ) + :post target-gun-post + ) + +;; failed to figure out what this is: +(defstate target-gun-walk (target) + :event target-standard-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self control mod-surface) *gun-walk-mods*) + (case (gun->eco (-> self gun gun-type)) + (((pickup-type eco-yellow) (pickup-type eco-blue)) + (set! (-> self control unknown-word04) (the-as uint 0)) + 0 + ) + (else + (set! (-> self control unknown-word04) (the-as uint 1)) + ) + ) + ) + :exit (behavior () + (target-effect-exit) + (target-state-hook-exit) + (target-gun-exit) + ) + :trans (behavior () + (cond + ((zero? (-> self control unknown-spool-anim00)) + (case (gun->eco (-> self gun gun-type)) + (((pickup-type eco-red) (pickup-type eco-dark)) + (remove-exit) + (go target-gun-walk) + ) + ) + ) + (else + (case (gun->eco (-> self gun gun-type)) + (((pickup-type eco-yellow) (pickup-type eco-blue)) + (remove-exit) + (go target-gun-walk) + ) + ) + ) + ) + ((-> self state-hook)) + (if (not (using-gun? self)) + (go target-walk) + ) + (if (logtest? (water-flag wading) (-> self water flags)) + (go target-wade-walk) + ) + (when (= (-> self control ground-pat material) (pat-material ice)) + (target-effect-exit) + (remove-exit) + (go target-ice-walk) + ) + (when (not (or (move-legs?) (< 182.04445 (fabs (-> self gun gun-roty-rel))))) + (target-effect-exit) + (remove-exit) + (go target-gun-stance) + ) + (if (want-to-powerjak?) + (go target-powerjak-get-on) + ) + (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 l1) + ) + (and (!= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) (can-roll?)) + ) + (go target-roll) + ) + (when (and (cpad-hold? (-> self control cpad number) l1) (can-duck?)) + (target-effect-exit) + (remove-exit) + (go target-duck-walk #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 x) + ) + (can-jump? #f) + ) + (target-jump-go) + ) + (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-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 square) + ) + (can-hands? #t) + ) + (go target-running-attack) + ) + (if (wall-hide?) + (go target-hide) + ) + (slide-down-test) + (fall-test target-falling (-> *TARGET-bank* fall-height)) + ) + :code (behavior () + (target-walk-anim -300) + ) + :post target-gun-post + ) 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 a7d0dd7e1c..a0effd2756 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 @@ -21,7 +21,7 @@ ;; definition for method 31 of type gun-eject ;; WARN: Return type mismatch int vs none. -(defmethod projectile-method-31 ((this gun-eject)) +(defmethod init-proj-settings! ((this gun-eject)) (initialize-skeleton this (the-as skeleton-group (art-group-get-by-name *level* "skel-gun" (the-as (pointer level) #f))) @@ -31,7 +31,7 @@ (let ((v1-5 (-> this skel root-channel 0))) (set! (-> v1-5 frame-group) (-> this parent 0 skel channel 0 frame-group)) ) - (let ((t9-3 (method-of-type projectile-bounce projectile-method-31))) + (let ((t9-3 (method-of-type projectile-bounce init-proj-settings!))) (t9-3 this) ) (quaternion-copy! (-> this root quat) (-> this parent 0 root quat)) @@ -62,13 +62,13 @@ ;; definition for method 31 of type gun-mag-yellow ;; WARN: Return type mismatch int vs none. -(defmethod projectile-method-31 ((this gun-mag-yellow)) +(defmethod init-proj-settings! ((this gun-mag-yellow)) (initialize-skeleton this (the-as skeleton-group (art-group-get-by-name *level* "skel-ammo-yellow" (the-as (pointer level) #f))) (the-as pair 0) ) - (let ((t9-2 (method-of-type projectile-bounce projectile-method-31))) + (let ((t9-2 (method-of-type projectile-bounce init-proj-settings!))) (t9-2 this) ) (set! (-> this timeout) (seconds 4)) @@ -97,13 +97,13 @@ ;; definition for method 31 of type gun-mag-red ;; WARN: Return type mismatch int vs none. -(defmethod projectile-method-31 ((this gun-mag-red)) +(defmethod init-proj-settings! ((this gun-mag-red)) (initialize-skeleton this (the-as skeleton-group (art-group-get-by-name *level* "skel-ammo-red" (the-as (pointer level) #f))) (the-as pair 0) ) - (let ((t9-2 (method-of-type projectile-bounce projectile-method-31))) + (let ((t9-2 (method-of-type projectile-bounce init-proj-settings!))) (t9-2 this) ) (set! (-> this timeout) (seconds 4)) @@ -132,13 +132,13 @@ ;; definition for method 31 of type gun-mag-blue ;; WARN: Return type mismatch int vs none. -(defmethod projectile-method-31 ((this gun-mag-blue)) +(defmethod init-proj-settings! ((this gun-mag-blue)) (initialize-skeleton this (the-as skeleton-group (art-group-get-by-name *level* "skel-ammo-blue" (the-as (pointer level) #f))) (the-as pair 0) ) - (let ((t9-2 (method-of-type projectile-bounce projectile-method-31))) + (let ((t9-2 (method-of-type projectile-bounce init-proj-settings!))) (t9-2 this) ) (set! (-> this timeout) (seconds 4)) @@ -167,13 +167,13 @@ ;; definition for method 31 of type gun-mag-dark ;; WARN: Return type mismatch int vs none. -(defmethod projectile-method-31 ((this gun-mag-dark)) +(defmethod init-proj-settings! ((this gun-mag-dark)) (initialize-skeleton this (the-as skeleton-group (art-group-get-by-name *level* "skel-ammo-dark" (the-as (pointer level) #f))) (the-as pair 0) ) - (let ((t9-2 (method-of-type projectile-bounce projectile-method-31))) + (let ((t9-2 (method-of-type projectile-bounce init-proj-settings!))) (t9-2 this) ) (set! (-> this timeout) (seconds 4)) @@ -444,7 +444,7 @@ ) (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 uint #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 self)) (let* ((v1-133 *game-info*) @@ -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) @@ -985,7 +957,7 @@ ) (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 uint #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-16 *game-info*) @@ -1210,7 +1182,7 @@ ;; definition for function adjust-player-ammo ;; WARN: Return type mismatch object vs float. -(defun adjust-player-ammo ((arg0 int) (arg1 pickup-type)) +(defun adjust-player-ammo ((arg0 float) (arg1 pickup-type)) (if (and *target* (and (focus-test? *target* light) (nonzero? (-> *target* lightjak))) (not (logtest? (-> *target* lightjak stage) (lightjak-stage ls1))) @@ -1225,7 +1197,7 @@ (let* ((f0-2 (* 0.0033333334 (the float arg0) arg1)) (f30-0 (fmin (fmax 0.0 f0-2) arg3)) ) - (adjust-player-ammo (the-as int (- f30-0)) arg2) + (adjust-player-ammo (- f30-0) arg2) f30-0 ) ) @@ -1236,7 +1208,7 @@ (let* ((f0-0 (get-remaining-player-ammo arg0)) (f0-1 (- f0-0 (the float (the int f0-0)))) ) - (adjust-player-ammo (the-as int (- f0-1)) arg0) + (adjust-player-ammo (- f0-1) arg0) ) (none) ) 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 new file mode 100644 index 0000000000..5638c123f4 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/gun/gun-yellow-shot_REF.gc @@ -0,0 +1,2390 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type gun-yellow-shot +(deftype gun-yellow-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-launcher) + (main-shot-part sparticle-launcher) + (shot-aim-part sparticle-launcher) + (shot-ring-part sparticle-launcher) + ) + (:methods + (draw-main-shot (_type_ vector vector) none) + (gun-yellow-shot-method-42 (_type_ float float matrix) none) + (spawn-particles (_type_ vector) none) + ) + ) + +;; definition for method 3 of type gun-yellow-shot +(defmethod inspect ((this gun-yellow-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)) + (format #t "~2Tshot-ring-part: ~A~%" (-> this shot-ring-part)) + (label cfg-4) + this + ) + +;; definition of type gun-yellow-2-proc-ignore +(deftype gun-yellow-2-proc-ignore (structure) + ((hand handle) + (time time-frame) + ) + :pack-me + ) + +;; definition for method 3 of type gun-yellow-2-proc-ignore +(defmethod inspect ((this gun-yellow-2-proc-ignore)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'gun-yellow-2-proc-ignore) + (format #t "~1Thand: ~D~%" (-> this hand)) + (format #t "~1Ttime: ~D~%" (-> this time)) + (label cfg-4) + this + ) + +;; definition of type gun-yellow-shot-2 +(deftype gun-yellow-shot-2 (gun-yellow-shot) + ((last-collide-time time-frame) + (snd-trail sound-id) + (hit-yet? symbol) + (actor-deflect? symbol) + (max-actor-deflect-count int32) + (last-hit-enemy handle) + (delay-attack time-frame) + (delay-norm vector :inline) + (enemy-hit-count int32) + (ignore-list gun-yellow-2-proc-ignore 6 :inline) + (last-attack-time time-frame) + ) + (:methods + (on-impact (_type_ handle) object) + (handle-impact (_type_ handle) object) + (is-in-ignore-list? (_type_ handle) symbol) + (add-to-ignore-list! (_type_ handle) int) + ) + ) + +;; definition for method 3 of type gun-yellow-shot-2 +(defmethod inspect ((this gun-yellow-shot-2)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type gun-yellow-shot inspect))) + (t9-0 this) + ) + (format #t "~2Tlast-collide-time: ~D~%" (-> this last-collide-time)) + (format #t "~2Tsnd-trail: ~D~%" (-> this snd-trail)) + (format #t "~2Thit-yet?: ~A~%" (-> this hit-yet?)) + (format #t "~2Tactor-deflect?: ~A~%" (-> this actor-deflect?)) + (format #t "~2Tmax-actor-deflect-count: ~D~%" (-> this max-actor-deflect-count)) + (format #t "~2Tlast-hit-enemy: ~D~%" (-> this last-hit-enemy)) + (format #t "~2Tdelay-attack: ~D~%" (-> this delay-attack)) + (format #t "~2Tdelay-norm: #~%" (-> this delay-norm)) + (format #t "~2Tenemy-hit-count: ~D~%" (-> this enemy-hit-count)) + (format #t "~2Tignore-list[6] @ #x~X~%" (-> this ignore-list)) + (format #t "~2Tlast-attack-time: ~D~%" (-> this last-attack-time)) + (label cfg-4) + this + ) + +;; definition of type gun-yellow-shot-3 +(deftype gun-yellow-shot-3 (gun-yellow-shot) + () + ) + +;; definition for method 3 of type gun-yellow-shot-3 +(defmethod inspect ((this gun-yellow-shot-3)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type gun-yellow-shot inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type gun-yellow-3-saucer +(deftype gun-yellow-3-saucer (projectile-bounce) + ((total-float-time time-frame) + (firing? symbol :offset 568) + (asleep? symbol) + (first-fire-time time-frame) + (activated? symbol) + (collided-with-surface? symbol) + (last-deflect-time time-frame) + (last-fire-time time-frame) + (spawn-part sparticle-launch-control) + (last-blink-time time-frame) + (finished? symbol) + (initial-fire-dir vector :inline) + (initial-fire-pos vector :inline) + (last-deduct-ammo-time time-frame) + (total-ammo-drained float) + (total-ammo-to-drain float) + (total-fire-time time-frame) + (snd-hum sound-id) + (snd-shoot sound-id) + ) + (:state-methods + undefined + navigating + spinning + impact-explode + falling-down + burnt-husk + ) + (:methods + (start-firing (_type_) none) + (init-antigrav (_type_) none) + (find-targets (_type_) int) + (spawn-shot (_type_ vector) (pointer gun-yellow-shot-3)) + ) + (:states + gun-yellow-3-saucer-base-state + ) + ) + +;; definition for method 3 of type gun-yellow-3-saucer +(defmethod inspect ((this gun-yellow-3-saucer)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile-bounce inspect))) + (t9-0 this) + ) + (format #t "~2Ttotal-float-time: ~D~%" (-> this total-float-time)) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (format #t "~2Tfiring?: ~A~%" (-> this firing?)) + (format #t "~2Tasleep?: ~A~%" (-> this asleep?)) + (format #t "~2Tfirst-fire-time: ~D~%" (-> this first-fire-time)) + (format #t "~2Tactivated?: ~A~%" (-> this activated?)) + (format #t "~2Tcollided-with-surface?: ~A~%" (-> this collided-with-surface?)) + (format #t "~2Tlast-deflect-time: ~D~%" (-> this last-deflect-time)) + (format #t "~2Tlast-fire-time: ~D~%" (-> this last-fire-time)) + (format #t "~2Tspawn-part: ~A~%" (-> this spawn-part)) + (format #t "~2Tlast-blink-time: ~D~%" (-> this last-blink-time)) + (format #t "~2Tfinished?: ~A~%" (-> this finished?)) + (format #t "~2Tinitial-fire-dir: #~%" (-> this initial-fire-dir)) + (format #t "~2Tinitial-fire-pos: #~%" (-> this initial-fire-pos)) + (format #t "~2Tlast-deduct-ammo-time: ~D~%" (-> this last-deduct-ammo-time)) + (format #t "~2Ttotal-ammo-drained: ~f~%" (-> this total-ammo-drained)) + (format #t "~2Ttotal-ammo-to-drain: ~f~%" (-> this total-ammo-to-drain)) + (format #t "~2Ttotal-fire-time: ~D~%" (-> this total-fire-time)) + (format #t "~2Tsnd-hum: ~D~%" (-> this snd-hum)) + (format #t "~2Tsnd-shoot: ~D~%" (-> this snd-shoot)) + (label cfg-4) + this + ) + +;; definition for method 7 of type gun-yellow-3-saucer +(defmethod relocate ((this gun-yellow-3-saucer) (offset int)) + (call-parent-method this offset) + ) + +;; definition of type target-quality-info-saucer +(deftype target-quality-info-saucer (structure) + ((targ handle) + (value float) + ) + ) + +;; definition for method 3 of type target-quality-info-saucer +(defmethod inspect ((this target-quality-info-saucer)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'target-quality-info-saucer) + (format #t "~1Ttarg: ~D~%" (-> this targ)) + (format #t "~1Tvalue: ~f~%" (-> this value)) + (label cfg-4) + this + ) + +;; definition for method 53 of type gun-yellow-3-saucer +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs (pointer gun-yellow-shot-3). +(defmethod spawn-shot ((this gun-yellow-3-saucer) (arg0 vector)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 x) (rand-vu-float-range -1.0 1.0)) + (set! (-> s5-0 y) (rand-vu-float-range -1.0 1.0)) + (set! (-> s5-0 z) (rand-vu-float-range -1.0 1.0)) + (set! (-> s5-0 w) 1.0) + (vector+float*! arg0 arg0 s5-0 4096.0) + ) + (let ((s5-2 (vector-! (new 'stack-no-clear 'vector) arg0 (-> this root trans))) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (vector-normalize! s5-2 1.0) + (set! (-> s3-0 quad) (-> s5-2 quad)) + (set! (-> s3-0 y) 0.0) + (vector-normalize! s3-0 1228.8) + (vector+! s3-0 (-> this root trans) s3-0) + (+! (-> s3-0 y) -819.2) + (let ((s4-1 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> s4-1 ent) (-> this entity)) + (set! (-> s4-1 charge) 1.0) + (set! (-> s4-1 options) (projectile-options)) + (logclear! (-> s4-1 options) (projectile-options po14 po15 po16)) + (set! (-> s4-1 pos quad) (-> s3-0 quad)) + (set! (-> s4-1 notify-handle) (the-as handle #f)) + (set! (-> s4-1 owner-handle) (the-as handle #f)) + (set! (-> s4-1 target-handle) (the-as handle #f)) + (set! (-> s4-1 target-pos quad) (the-as uint128 0)) + (set! (-> s4-1 ignore-handle) (process->handle (send-event *target* 'get-vehicle))) + (let* ((v1-20 *game-info*) + (a0-20 (+ (-> v1-20 attack-id) 1)) + ) + (set! (-> v1-20 attack-id) a0-20) + (set! (-> s4-1 attack-id) a0-20) + ) + (set! (-> s4-1 timeout) (seconds 4)) + (vector-float*! (-> s4-1 vel) s5-2 819200.0) + (the-as (pointer gun-yellow-shot-3) (spawn-projectile gun-yellow-shot-3 s4-1 this *default-dead-pool*)) + ) + ) + ) + +;; definition for method 32 of type gun-yellow-3-saucer +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-32 ((this gun-yellow-3-saucer)) + (if (not (do-fire-backcheck (-> this root trans) (-> this root transv))) + (go (method-of-object this impact-explode)) + (call-parent-method this) + ) + 0 + (none) + ) + +;; definition for method 52 of type gun-yellow-3-saucer +;; INFO: Used lq/sq +(defmethod find-targets ((this gun-yellow-3-saucer)) + (local-vars + (sv-16 int) + (sv-1072 vector) + (sv-1076 (inline-array target-quality-info-saucer)) + (sv-1080 int) + (sv-1088 float) + (sv-3792 (pointer int8)) + (sv-3800 int) + (sv-3808 float) + (sv-3812 symbol) + ) + (if (not (-> this firing?)) + (return 0) + ) + (sound-play "yellow3-shot" :id (-> this snd-shoot)) + (if (not (time-elapsed? (-> this last-fire-time) (seconds 0.05))) + (return 0) + ) + (set-time! (-> this last-fire-time)) + (when (and (time-elapsed? (-> this last-deduct-ammo-time) (seconds 0.1)) (< (-> this total-ammo-drained) 50.0)) + (+! (-> this total-ammo-drained) (adjust-player-ammo-over-time + (the-as int (- (current-time) (-> this last-deduct-ammo-time))) + (/ 50.0 (* 0.0033333334 (the float (-> this total-fire-time)))) + (pickup-type ammo-yellow) + (- 50.0 (-> this total-ammo-drained)) + ) + ) + (set-time! (-> this last-deduct-ammo-time)) + ) + (set! sv-16 2) + (set! sv-1072 (new 'stack-no-clear 'vector)) + (set! sv-1076 (new 'stack-no-clear 'inline-array 'target-quality-info-saucer 66)) + (set! sv-1080 0) + (set! sv-1088 (the-as float 0.0)) + (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)) + (let* ((s3-0 (-> s5-0 s4-0)) + (v1-34 (if (type? s3-0 collide-shape) + s3-0 + ) + ) + ) + (when v1-34 + (let* ((s2-0 (-> v1-34 process)) + (s3-1 (if (type? s2-0 process-focusable) + s2-0 + ) + ) + ) + (when s3-1 + (when (and (!= *target* s3-1) + (not (focus-test? (the-as process-focusable s3-1) disable dead inactive gun-no-target)) + (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?)) + ) + ) + (let ((s2-1 (new 'stack-no-clear 'collide-query))) + (set! (-> s2-1 start-pos quad) (-> this root trans quad)) + (vector-! (-> s2-1 move-dist) (get-trans (the-as process-focusable s3-1) 3) (-> this root trans)) + (let ((v1-47 s2-1)) + (set! (-> v1-47 radius) 40.96) + (set! (-> v1-47 collide-with) (collide-spec backgnd)) + (set! (-> v1-47 ignore-process0) #f) + (set! (-> v1-47 ignore-process1) #f) + (set! (-> v1-47 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-47 action-mask) (collide-action solid)) + ) + (when (< (fill-and-probe-using-line-sphere *collide-cache* s2-1) 0.0) + (set! (-> sv-1076 sv-1080 targ) (process->handle s3-1)) + (let ((f0-11 1.0)) + (if (and (nonzero? (-> s3-1 draw)) (logtest? (-> s3-1 draw status) (draw-control-status on-screen))) + (set! f0-11 (+ 2.0 f0-11)) + ) + (if (logtest? (process-mask enemy guard) (-> s3-1 mask)) + (set! f0-11 (+ 28.0 f0-11)) + ) + (if (logtest? (process-mask vehicle civilian) (-> s3-1 mask)) + (set! f0-11 (* 0.25 f0-11)) + ) + (set! (-> sv-1076 sv-1080 value) f0-11) + (set! sv-1088 (+ sv-1088 f0-11)) + ) + (set! sv-1080 (+ sv-1080 1)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (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)) + ) + ) + ) + ) + ) + (set! sv-3792 (new 'stack-no-clear 'array 'int8 100)) + (set! sv-3800 0) + (set! sv-3808 (the-as float 0.0)) + (set! sv-3812 (the-as symbol #f)) + (when (> sv-1080 0) + (dotimes (s5-2 sv-16) + (let ((f0-20 (rand-vu-float-range 0.0 sv-1088))) + (dotimes (v1-127 sv-1080) + (set! sv-3808 (+ sv-3808 (-> sv-1076 v1-127 value))) + (when (< f0-20 sv-3808) + (dotimes (a0-82 sv-3800) + (when (= (-> sv-3792 a0-82) v1-127) + 0 + (goto cfg-91) + ) + ) + (set! (-> sv-3792 sv-3800) v1-127) + (set! sv-3800 (+ sv-3800 1)) + 0 + (goto cfg-94) + ) + (label cfg-91) + ) + ) + (label cfg-94) + ) + ) + (dotimes (s5-3 sv-3800) + (let* ((s4-4 (handle->process (-> sv-1076 (-> sv-3792 s5-3) targ))) + (a0-95 (if (type? s4-4 process-focusable) + s4-4 + ) + ) + (s4-5 this) + (s3-4 (method-of-object s4-5 spawn-shot)) + (s2-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> s2-2 quad) (-> (get-trans (the-as process-focusable a0-95) 0) quad)) + (s3-4 s4-5 s2-2) + ) + ) + (let ((s5-4 sv-3800) + (s4-6 (+ sv-16 -1)) + ) + (while (>= s4-6 s5-4) + (let ((s3-5 (new 'stack-no-clear 'vector))) + (set! (-> s3-5 x) (rand-vu-float-range -1.0 1.0)) + (set! (-> s3-5 y) (rand-vu-float-range -0.85 -0.3)) + (set! (-> s3-5 z) (rand-vu-float-range -1.0 1.0)) + (vector+float*! s3-5 (-> this root trans) s3-5 40960.0) + (spawn-shot this s3-5) + ) + (+! s5-4 1) + ) + ) + (the-as int #f) + ) + +;; failed to figure out what this is: +(defskelgroup skel-gun-yellow-3-saucer gun gun-saucer-lod0-jg gun-saucer-idle-ja + ((gun-saucer-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4096) + :texture-level 10 + :sort 1 + ) + +;; definition for method 30 of type gun-yellow-3-saucer +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this gun-yellow-3-saucer)) + (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 1638.4) + (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 crate vehicle-sphere hit-by-others-list pusher impenetrable-obj shield) + ) + (set-collide-as! (-> this root) (collide-spec projectile)) + (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 gun-yellow-3-saucer +;; WARN: Return type mismatch vector vs none. +(defmethod init-proj-settings! ((this gun-yellow-3-saucer)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-gun-yellow-3-saucer" (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) projectile-move-fill-line-sphere) + (set! (-> this total-float-time) (seconds 0.05)) + (quaternion-identity! (-> this root quat)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 95) this)) + (set! (-> this asleep?) #t) + (set! (-> this firing?) #f) + (set! (-> this first-fire-time) 0) + (set! (-> this timeout) (seconds 30)) + (set! (-> this activated?) #f) + (set! (-> this collided-with-surface?) #f) + (set! (-> this last-blink-time) 0) + (set! (-> this finished?) #f) + (set! (-> this snd-hum) (new-sound-id)) + (set! (-> this snd-shoot) (new-sound-id)) + (set! (-> this total-ammo-to-drain) 50.0) + (set! (-> this total-fire-time) (seconds 4)) + (when (logtest? (game-secrets gun-upgrade-yellow-3) (-> *game-info* secrets)) + (set! (-> this total-ammo-to-drain) 50.0) + (set! (-> this total-fire-time) (seconds 6)) + ) + (set-vector! (-> this root scale) 3.5 3.5 3.5 1.0) + (none) + ) + +;; definition for method 10 of type gun-yellow-3-saucer +(defmethod deactivate ((this gun-yellow-3-saucer)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this snd-hum)) + (sound-stop (-> this snd-shoot)) + (if (nonzero? (-> this spawn-part)) + (kill-particles (-> this spawn-part)) + ) + (call-parent-method this) + (none) + ) + +;; definition of type gun-yellow-3-event-msg +(deftype gun-yellow-3-event-msg (structure) + ((activated? symbol) + (finished? symbol) + ) + ) + +;; definition for method 3 of type gun-yellow-3-event-msg +(defmethod inspect ((this gun-yellow-3-event-msg)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'gun-yellow-3-event-msg) + (format #t "~1Tactivated?: ~A~%" (-> this activated?)) + (format #t "~1Tfinished?: ~A~%" (-> this finished?)) + (label cfg-4) + this + ) + +;; definition for method 50 of type gun-yellow-3-saucer +;; WARN: Return type mismatch time-frame vs none. +(defmethod start-firing ((this gun-yellow-3-saucer)) + (set-time! (-> this first-fire-time)) + (set! (-> this firing?) #t) + (set! (-> this last-fire-time) 0) + (set-time! (-> this last-deduct-ammo-time)) + (none) + ) + +;; definition for method 51 of type gun-yellow-3-saucer +;; WARN: Return type mismatch time-frame vs none. +(defmethod init-antigrav ((this gun-yellow-3-saucer)) + (set! (-> this asleep?) #f) + (set! (-> this root dynam gravity y) 0.0) + (set! (-> this root dynam gravity-length) 0.0) + (set! (-> this root dynam gravity-max) 0.0) + (set-time! (-> this last-blink-time)) + (none) + ) + +;; definition for method 25 of type gun-yellow-3-saucer +;; WARN: Return type mismatch float vs none. +(defmethod projectile-method-25 ((this gun-yellow-3-saucer)) + (if (nonzero? (-> this part)) + (spawn (-> this part) (-> this root trans)) + ) + (when (and (nonzero? (-> this part)) (not (-> this finished?))) + ) + (let ((v1-14 (if (< (mod (- (current-time) (-> this last-blink-time)) 300) 150) + 60 + 128 + ) + ) + ) + (set! (-> *part-id-table* 279 init-specs 4 initial-valuef) (the float v1-14)) + (set! (-> *part-id-table* 280 init-specs 5 initial-valuef) (the float v1-14)) + (set! (-> *part-id-table* 281 init-specs 5 initial-valuef) (the float v1-14)) + (set! (-> *part-id-table* 279 init-specs 5 initial-valuef) (the float v1-14)) + (set! (-> *part-id-table* 280 init-specs 6 initial-valuef) (the float v1-14)) + (set! (-> *part-id-table* 281 init-specs 6 initial-valuef) (the float v1-14)) + ) + (none) + ) + +;; definition for method 42 of type gun-yellow-3-saucer +(defmethod projectile-bounce-method-42 ((this gun-yellow-3-saucer)) + (projectile-method-25 this) + (none) + ) + +;; failed to figure out what this is: +(defstate gun-yellow-3-saucer-base-state (gun-yellow-3-saucer) + :event projectile-event-handler + :trans (behavior () + (if (and (-> self firing?) + (not (and (-> self next-state) (let ((v1-5 (-> self next-state name))) + (or (= v1-5 'falling-down) (= v1-5 'impact-explode)) + ) + ) + ) + (or (< (get-remaining-player-ammo (pickup-type ammo-yellow)) 1.0) + (time-elapsed? (-> self first-fire-time) (-> self total-fire-time)) + ) + ) + (go-virtual falling-down) + ) + ) + :code sleep-code + :post (behavior () + (projectile-method-25 self) + (ja-post) + ) + ) + +;; definition for method 43 of type gun-yellow-3-saucer +;; WARN: Return type mismatch symbol vs none. +(defmethod projectile-bounce-method-43 ((this gun-yellow-3-saucer)) + (set! (-> this collided-with-surface?) #t) + (none) + ) + +;; definition for function saucer-land-move +(defun saucer-land-move ((arg0 gun-yellow-3-saucer)) + (seek-toward-heading-vec! (-> arg0 root) (-> arg0 root transv) 131072.0 (seconds 0.1)) + (new 'stack-no-clear 'vector) + (let ((a2-1 (quaternion-identity! (new 'stack-no-clear 'quaternion)))) + (fmin 1.0 (* 0.006666667 (the float (- (current-time) (-> arg0 state-time))))) + (quaternion-smooth-seek! (-> arg0 root quat) (-> arg0 root quat) a2-1 (* 3.5 (seconds-per-frame))) + ) + (projectile-move-fill-all-dirs arg0) + (none) + ) + +;; failed to figure out what this is: +(defstate sitting (gun-yellow-3-saucer) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (until (time-elapsed? (-> self state-time) (seconds 1)) + (suspend) + ) + (go-virtual burnt-husk) + ) + ) + +;; failed to figure out what this is: +(defstate burnt-husk (gun-yellow-3-saucer) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (cond + ((logtest? (-> *part-group-id-table* 97 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* 97)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 97)) + ) + ) + (let ((gp-2 sound-play-by-name) + (name (static-sound-name "yellow3-zap")) + (a1-6 (new-sound-id)) + (a2-10 1024) + (a3-4 0) + ) + (gp-2 (the-as sound-name name) a1-6 a2-10 a3-4 0 (sound-group) #t) + (set! (-> self draw color-mult quad) (the-as uint128 0)) + (set! (-> self draw color-mult x) 0.15) + (set! (-> self draw color-mult y) 0.15) + (set! (-> self draw color-mult z) 0.15) + (set! (-> self draw color-emissive quad) (the-as uint128 0)) + (let ((gp-3 (new 'stack-no-clear 'matrix))) + (matrix-u-compose + gp-3 + (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (the-as vector a2-10) + (the-as vector a3-4) + ) + (set! (-> gp-3 trans quad) (-> self root trans quad)) + (let ((gp-4 + (ppointer->handle + (if (logtest? (-> *part-group-id-table* 96 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to (-> self parent 0) + :group (-> *part-group-id-table* 96) + :mat-joint gp-3 + ) + (part-tracker-spawn part-tracker :to (-> self parent 0) :group (-> *part-group-id-table* 96) :mat-joint gp-3) + ) + ) + ) + ) + (process-spawn-function + process + (lambda :behavior process + ((arg0 handle)) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (seconds 0.2)) + (suspend) + ) + ) + (send-event (handle->process arg0) 'die) + ) + gp-4 + :to self + ) + ) + ) + ) + ) + :trans (behavior () + (let* ((f1-2 (* 0.016666668 (the float (- (current-time) (-> self state-time))))) + (f0-2 (fmax 0.0 (fmin 1.0 f1-2))) + ) + (set-vector! (-> self root scale) 3.5 (lerp 3.5 0.0 f0-2) 3.5 1.0) + ) + ) + :code (behavior () + (until (time-elapsed? (-> self state-time) (seconds 0.2)) + (suspend) + ) + (when (type? (-> self root) collide-shape) + (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)) + (transform-post) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (deactivate self) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate falling-down (gun-yellow-3-saucer) + :virtual #t + :parent gun-yellow-3-saucer-base-state + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self finished?) #t) + (set! (-> self move) projectile-bounce-move) + (set! (-> self root dynam gravity y) 184320.0) + (set! (-> self root dynam gravity-length) 184320.0) + (set! (-> self root dynam gravity-max) 184320.0) + (set! (-> self root transv quad) (the-as uint128 0)) + (set-time! (-> self state-time)) + (set! (-> self activated?) #t) + (sound-stop (-> self snd-shoot)) + ) + :exit (behavior () + (set! (-> self move) saucer-land-move) + (sound-stop (-> self snd-hum)) + ) + :trans (behavior () + (if (not (time-elapsed? (-> self state-time) (seconds 0.4))) + (sound-play-by-name + (static-sound-name "yellow3-fire") + (-> self snd-hum) + 1024 + (the int (* 1524.0 (lerp 0.0 -0.5 (* 0.008333334 (the float (- (current-time) (-> self state-time))))))) + 0 + (sound-group) + #t + ) + (sound-stop (-> self snd-hum)) + ) + ((-> (method-of-type projectile moving) trans)) + (when (logtest? (-> self root status) (collide-status touch-surface)) + (sound-play "yellow3-bounce") + (set! (-> self move) saucer-land-move) + ) + (let ((v1-19 gun-yellow-3-saucer-base-state)) + (when v1-19 + (let ((t9-6 (-> v1-19 trans))) + (if t9-6 + (t9-6) + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate impact-explode (gun-yellow-3-saucer) + :virtual #t + :event projectile-event-handler + :enter (behavior () + (set! (-> self activated?) #t) + (sound-stop (-> self snd-hum)) + ) + :code (behavior () + (set! (-> self firing?) #t) + (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) 0.0) + (set! (-> gp-0 scale) 1.0) + (set! (-> gp-0 group) (-> *part-group-id-table* 104)) + (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 self) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (while (-> self child) + (suspend) + ) + (deactivate self) + ) + ) + +;; definition for method 35 of type gun-yellow-3-saucer +;; WARN: Return type mismatch symbol vs object. +(defmethod proj-event-handler ((this gun-yellow-3-saucer) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('activate) + (go (method-of-object this spinning)) + ) + (('query) + (let ((v1-3 (the-as gun-yellow-3-event-msg (-> arg3 param 0)))) + (set! (-> v1-3 activated?) (-> this activated?)) + (set! (-> v1-3 finished?) (-> this finished?)) + ) + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + #t + ) + +;; definition for method 39 of type gun-yellow-3-saucer +;; WARN: Return type mismatch object vs none. +(defmethod projectile-method-39 ((this gun-yellow-3-saucer)) + (when (logtest? (-> this root status) (collide-status touch-surface)) + (if (-> this asleep?) + (go (method-of-object this impact-explode)) + (call-parent-method this) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate moving (gun-yellow-3-saucer) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (-> self total-float-time)) + (not (and (-> self next-state) (= (-> self next-state name) 'navigating))) + ) + (go-virtual navigating) + ) + (sound-play "yellow3-fire" :id (-> self snd-hum)) + (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) (* 131072.0 (seconds-per-frame))) + (let ((a0-7 gun-yellow-3-saucer-base-state)) + (when a0-7 + (let ((t9-3 (-> a0-7 trans))) + (if t9-3 + (t9-3) + ) + ) + ) + ) + (let ((t9-5 (-> (find-parent-state) trans))) + (if t9-5 + (t9-5) + ) + ) + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate navigating (gun-yellow-3-saucer) + :virtual #t + :parent gun-yellow-3-saucer-base-state + :enter (behavior () + (init-antigrav self) + (set-time! (-> self state-time)) + (set! (-> self last-deflect-time) 0) + 0 + ) + :trans (behavior () + (sound-play "yellow3-fire" :id (-> self snd-hum)) + (let ((f0-1 (fmin 1.0 (* 0.033333335 (the float (- (current-time) (-> self state-time))))))) + 0.0 + (let ((f0-2 (lerp 409600.0 40960.0 f0-1))) + (vector-normalize! (-> self root transv) f0-2) + ) + ) + (let ((f0-4 (fmin 1.0 (* 0.004761905 (the float (- (current-time) (-> self state-time))))))) + (set! (-> self root transv y) (lerp (-> self root transv y) 0.0 f0-4)) + ) + (when (time-elapsed? (-> self last-deflect-time) (seconds 0.5)) + (let ((v1-19 (-> self root)) + (gp-0 (new 'stack-no-clear 'collide-query)) + ) + (-> v1-19 root-prim) + (set! (-> gp-0 start-pos quad) (-> v1-19 trans quad)) + (vector-normalize-copy! (-> gp-0 move-dist) (-> v1-19 transv) 40960.0) + (let ((v1-20 gp-0)) + (set! (-> v1-20 radius) 0.01) + (set! (-> v1-20 collide-with) (collide-spec backgnd)) + (set! (-> v1-20 ignore-process0) #f) + (set! (-> v1-20 ignore-process1) #f) + (set! (-> v1-20 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-20 action-mask) (collide-action solid)) + ) + (let ((f0-7 (fill-and-probe-using-line-sphere *collide-cache* gp-0))) + (when (and (>= f0-7 0.0) (< f0-7 1.0)) + (let ((s5-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> gp-0 best-other-tri normal) 1.0)) + (gp-1 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self root transv) 1.0)) + ) + 0.0 + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + (vector-dot s5-0 gp-1) + (cond + (#f + (vector-float*! (-> self root transv) (-> self root transv) -1.0) + ) + (else + (vector-reflect! gp-1 gp-1 s5-0) + (set! (-> gp-1 y) 0.0) + (vector-normalize-copy! (-> self root transv) gp-1 32768.0) + (set-time! (-> self last-deflect-time)) + ) + ) + ) + ) + ) + ) + ) + (when (not (-> self firing?)) + (cond + ((time-elapsed? (-> self state-time) (seconds 1)) + (start-firing self) + ) + (else + ) + ) + ) + (find-targets self) + ((-> self move) self) + (projectile-method-39 self) + (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) (* 131072.0 (seconds-per-frame))) + (let ((v1-52 gun-yellow-3-saucer-base-state)) + (when v1-52 + (let ((t9-16 (-> v1-52 trans))) + (if t9-16 + (t9-16) + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate spinning (gun-yellow-3-saucer) + :virtual #t + :parent gun-yellow-3-saucer-base-state + :enter (behavior () + (set! (-> self activated?) #t) + (if (-> self asleep?) + (init-antigrav self) + ) + (if (not (-> self firing?)) + (start-firing self) + ) + (quaternion-identity! (-> self root quat)) + ) + :exit (behavior () + (let ((f0-0 (get-remaining-player-ammo (pickup-type ammo-yellow)))) + 0.0 + (when (< 1.0 f0-0) + (let* ((f0-1 (fmin f0-0 (- 50.0 (-> self total-ammo-drained)))) + (f0-2 (fmax 0.0 f0-1)) + ) + (adjust-player-ammo (- f0-2) (pickup-type ammo-yellow)) + ) + (truncate-player-ammo (pickup-type ammo-yellow)) + ) + ) + ) + :trans (behavior () + (sound-play "yellow3-fire" :id (-> self snd-hum)) + (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) (* 131072.0 (seconds-per-frame))) + (find-targets self) + (let ((v1-7 gun-yellow-3-saucer-base-state)) + (when v1-7 + (let ((t9-3 (-> v1-7 trans))) + (if t9-3 + (t9-3) + ) + ) + ) + ) + ) + ) + +;; definition for function gun-fire-yellow-3 +;; INFO: Used lq/sq +(defbehavior gun-fire-yellow-3 target () + (let ((gp-0 (-> self gun))) + (let ((s5-0 (-> self gun fire-dir-out)) + (s4-0 (-> self gun fire-point)) + (f30-0 409600.0) + ) + (talker-spawn-func (-> *talker-speech* 364) *entity-pool* (target-pos 0) (the-as region #f)) + (set! (-> s5-0 y) 0.6) + (vector-normalize! s5-0 1.0) + (when (handle->process (-> gp-0 gun 0 extra)) + (let ((s3-1 (new 'stack-no-clear 'gun-yellow-3-event-msg))) + (send-event (handle->process (-> gp-0 gun 0 extra)) 'query s3-1) + (when (not (-> s3-1 activated?)) + (send-event (handle->process (-> gp-0 gun 0 extra)) 'activate) + (return 0) + ) + ) + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 229 (seconds 0.2)) + (let ((s3-2 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> s3-2 ent) (-> self entity)) + (set! (-> s3-2 charge) 1.0) + (set! (-> s3-2 options) (projectile-options po13)) + (logclear! (-> s3-2 options) (projectile-options po14 po15 po16)) + (set! (-> s3-2 pos quad) (-> s4-0 quad)) + (set! (-> s3-2 vel quad) (-> (vector-float*! (new 'stack-no-clear 'vector) s5-0 f30-0) quad)) + (set! (-> s3-2 notify-handle) (the-as handle #f)) + (set! (-> s3-2 owner-handle) (the-as handle #f)) + (set! (-> s3-2 target-handle) (the-as handle #f)) + (set! (-> s3-2 target-pos quad) (the-as uint128 0)) + (set! (-> s3-2 ignore-handle) (process->handle (send-event self 'get-vehicle))) + (let* ((v1-45 *game-info*) + (a0-30 (+ (-> v1-45 attack-id) 1)) + ) + (set! (-> v1-45 attack-id) a0-30) + (set! (-> s3-2 attack-id) a0-30) + ) + (set! (-> s3-2 timeout) (seconds 4)) + (set! (-> gp-0 gun 0 extra) + (ppointer->handle + (spawn-projectile gun-yellow-3-saucer s3-2 (ppointer->process (-> gp-0 gun)) *default-dead-pool*) + ) + ) + ) + ) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (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) + ) + ) + ) + (send-event (ppointer->process v1-62) 'clock self) + ) + ) + ) + ) + ) + ) + +;; definition for function gun-fire-yellow-2 +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs (pointer gun-yellow-shot-2). +(defbehavior gun-fire-yellow-2 target () + (let ((s5-0 (-> self gun)) + (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 po17)) + (logclear! (-> gp-0 options) (projectile-options po14 po15 po16)) + (set! (-> gp-0 pos quad) (-> s5-0 fire-point 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 (send-event self 'get-vehicle))) + (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) (seconds 4)) + (vector-float*! (-> gp-0 vel) (-> s5-0 fire-dir-out) 819200.0) + (the-as + (pointer gun-yellow-shot-2) + (spawn-projectile gun-yellow-shot-2 gp-0 (ppointer->process (-> s5-0 gun)) *default-dead-pool*) + ) + ) + ) + +;; definition for function gun-fire-yellow-1 +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs (pointer gun-yellow-shot). +(defbehavior gun-fire-yellow-1 target () + (let ((s5-0 (-> self gun)) + (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 po17)) + (logclear! (-> gp-0 options) (projectile-options po14 po15 po16)) + (set! (-> gp-0 pos quad) (-> s5-0 fire-point 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 (send-event self 'get-vehicle))) + (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) (seconds 4)) + (vector-float*! (-> gp-0 vel) (-> s5-0 fire-dir-out) 819200.0) + (the-as + (pointer gun-yellow-shot) + (spawn-projectile gun-yellow-shot gp-0 (ppointer->process (-> s5-0 gun)) *default-dead-pool*) + ) + ) + ) + +;; definition for function target-gun-can-fire-yellow? +;; WARN: disable def twice: 51. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defbehavior target-gun-can-fire-yellow? target ((arg0 pickup-type)) + (case arg0 + (((pickup-type gun-yellow-3)) + (cond + ((handle->process (-> self gun gun 0 extra)) + (let ((gp-0 (new 'stack-no-clear 'gun-yellow-3-event-msg))) + (set! (-> gp-0 finished?) #t) + (set! (-> gp-0 activated?) #f) + (send-event (handle->process (-> self gun gun 0 extra)) 'query gp-0) + (or (-> gp-0 finished?) (not (-> gp-0 activated?))) + ) + ) + (else + #t + ) + ) + ) + (else + #t + ) + ) + ) + +;; definition for function target-gun-fire-yellow +;; WARN: Return type mismatch object vs (pointer process). +(defbehavior target-gun-fire-yellow target ((arg0 pickup-type)) + (the-as (pointer process) (case arg0 + (((pickup-type gun-yellow-1)) + (gun-fire-yellow-1) + ) + (((pickup-type gun-yellow-2)) + (gun-fire-yellow-2) + ) + (((pickup-type gun-yellow-3)) + (gun-fire-yellow-3) + ) + ) + ) + ) + +;; definition for function someone-fire-yellow +;; INFO: Used lq/sq +(defun someone-fire-yellow ((arg0 process-drawable) (arg1 vector) (arg2 vector)) + (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 po13 po17)) + (logclear! (-> gp-0 options) (projectile-options po14 po15 po16)) + (set! (-> gp-0 pos quad) (-> arg1 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 arg0)) + (let* ((v1-10 *game-info*) + (a0-9 (+ (-> v1-10 attack-id) 1)) + ) + (set! (-> v1-10 attack-id) a0-9) + (set! (-> gp-0 attack-id) a0-9) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (vector-normalize-copy! (-> gp-0 vel) arg2 819200.0) + (spawn-projectile gun-yellow-shot-2 gp-0 arg0 *default-dead-pool*) + ) + ) + +;; definition for method 24 of type gun-yellow-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-24 ((this gun-yellow-shot)) + (draw-beam (-> this muzzle-flash-part) (-> this tail-pos) (-> this starting-dir) #f) + 0 + (none) + ) + +;; definition for method 25 of type gun-yellow-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this gun-yellow-shot)) + (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 root trans)) + (a1-0 (-> this tail-pos)) + (gp-1 (vector-! (new 'stack-no-clear 'vector) s4-0 a1-0)) + ) + (let ((f30-0 (vector-length gp-1))) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (let ((v1-4 a1-0)) + (let ((a0-2 gp-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) + (draw-main-shot this a1-0 gp-1) + (vector-normalize! gp-1 1.0) + (spawn-particles this s3-0) + ) + (let ((s3-1 (new 'stack-no-clear 'matrix)) + (f30-1 (fmin 1.0 (* 0.000015258789 f30-0))) + (f28-0 (-> *part-id-table* 267 init-specs 3 initial-valuef)) + ) + (forward-up->inv-matrix s3-1 gp-1 *up-vector*) + (set! (-> s3-1 trans quad) (-> s4-0 quad)) + (gun-yellow-shot-method-42 this f30-1 f28-0 s3-1) + ) + ) + (let ((f0-3 (vector-dot gp-1 (-> (camera-matrix) fvec)))) + (when (< 0.0 f0-3) + (let ((f2-0 (* f0-3 f0-3)) + (f0-4 (-> *part-id-table* 266 init-specs 8 initial-valuef)) + (f1-3 (-> *part-id-table* 266 init-specs 8 random-rangef)) + ) + (set! (-> *part-id-table* 266 init-specs 8 initial-valuef) (* f0-4 f2-0)) + (set! (-> *part-id-table* 266 init-specs 8 random-rangef) (* f1-3 f2-0)) + (set! (-> *part-id-table* 266 init-specs 8 initial-valuef) f0-4) + (set! (-> *part-id-table* 266 init-specs 8 random-rangef) f1-3) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 37 of type gun-yellow-shot +(defmethod deal-damage! ((this gun-yellow-shot) (arg0 process) (arg1 event-message-block)) + (if (and (logtest? (process-mask guard) (-> arg0 mask)) + (not (-> *setting-control* user-current gun-target-guards?)) + ) + (set! (-> this damage) 0.0) + ) + (let ((t9-0 (method-of-type projectile deal-damage!))) + (when (t9-0 this arg0 arg1) + (+! (-> *game-info* shots-hit 0) 1.0) + (set! (-> this hit-actor?) #t) + #t + ) + ) + ) + +;; definition for method 26 of type gun-yellow-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this gun-yellow-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 gun-yellow-shot +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this gun-yellow-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 28 of type gun-yellow-shot-3 +;; WARN: Return type mismatch int vs none. +(defmethod play-impact-sound ((this gun-yellow-shot-3) (arg0 projectile-options)) + 0 + (none) + ) + +;; definition for method 28 of type gun-yellow-shot-2 +;; WARN: Return type mismatch int vs none. +(defmethod play-impact-sound ((this gun-yellow-shot-2) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "yellow2-fire") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "yellow2-burn") + ) + ((= v1-0 (projectile-options po1)) + ) + ((not (-> this hit-yet?)) + (sound-play-by-name + (static-sound-name "yellow2-trail") + (-> this snd-trail) + 1024 + (the int + (* 1524.0 + (lerp 1.0 0.1 (fmax 0.0 (fmin 1.0 (* 0.011111111 (the float (- (current-time) (-> this last-hit-time))))))) + ) + ) + 0 + (sound-group) + #t + ) + ) + (else + (sound-play-by-name + (static-sound-name "yellow2-trail") + (-> this snd-trail) + 1024 + (the int (* 1524.0 (doppler-pitch-shift (-> this root trans) (-> this root transv)))) + 0 + (sound-group) + #t + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 38 of type gun-yellow-shot +(defmethod made-impact? ((this gun-yellow-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) (handle->process (-> this ignore-handle))) + (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-yellow-shot-move +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun gun-yellow-shot-move ((arg0 gun-yellow-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) + ) + (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 symbol *last-hit-deflect-target-handle*, type (pointer process) +(define *last-hit-deflect-target-handle* (the-as (pointer process) #f)) + +;; definition for function gun-yellow-shot-do-deflect +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defbehavior gun-yellow-shot-do-deflect gun-yellow-shot-2 ((arg0 gun-yellow-shot-2) (arg1 vector) (arg2 vector) (arg3 vector)) + (local-vars + (sv-32 vector) + (sv-36 gun-yellow-shot-2) + (sv-40 process) + (sv-80 vector) + (sv-84 vector) + (sv-112 vector) + (sv-116 number) + (sv-120 int) + (sv-128 symbol) + (sv-136 handle) + (sv-1680 vector) + (sv-1712 vector) + (sv-1716 float) + (sv-1720 float) + (sv-1724 vector) + (sv-1744 vector) + (sv-1748 float) + (sv-1752 float) + ) + (let ((f0-1 (vector-dot arg2 arg3))) + (set! sv-32 (vector-float*! (new 'stack-no-clear 'vector) arg3 (* -2.0 f0-1))) + ) + (vector+! arg1 arg2 sv-32) + (if (< 0.2 (-> arg1 y)) + (set! (-> arg1 y) (fmax 0.2 (-> arg2 y))) + ) + (let ((s4-0 arg0)) + (set! sv-36 s4-0) + (set! sv-40 (handle->process (-> sv-36 last-hit-enemy))) + (when (and (time-elapsed? (-> sv-36 last-collide-time) (seconds 0.05)) (rand-vu-percent? 0.75)) + (set! sv-80 (vector-normalize-copy! (new 'stack-no-clear 'vector) arg1 204800.0)) + (set! sv-84 (new 'stack-no-clear 'vector)) + (set! (-> sv-84 quad) (-> s4-0 root trans quad)) + (vector+! sv-84 sv-84 sv-80) + (set! (-> sv-84 w) 409600.0) + (set! (-> sv-80 y) 0.0) + (vector-normalize! sv-80 1.0) + (set! sv-112 (vector+! (new 'stack-no-clear 'vector) (-> s4-0 root trans) arg1)) + (set! sv-116 409600000000000000000000.0) + (set! sv-120 -55041728) + (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)) + (let* ((s1-0 (-> s3-0 s2-0)) + (v1-31 (if (type? s1-0 collide-shape) + s1-0 + ) + ) + ) + (when v1-31 + (let* ((s0-0 (-> v1-31 process)) + (s1-1 (if (type? s0-0 process-focusable) + s0-0 + ) + ) + ) + (when s1-1 + (when (and (!= s4-0 s1-1) + (!= s1-1 sv-40) + (not (focus-test? (the-as process-focusable s1-1) disable dead inactive gun-no-target)) + (or (logtest? (process-mask enemy civilian) (-> s1-1 mask)) + (and (logtest? (process-mask guard) (-> s1-1 mask)) (-> *setting-control* user-current gun-target-guards?)) + ) + ) + (when (or (not sv-128) + (logtest? (process-mask enemy guard) (-> s1-1 mask)) + (not (is-in-ignore-list? sv-36 (process->handle s1-1))) + ) + (set! sv-1680 (get-trans (the-as process-focusable s1-1) 3)) + (set! sv-1712 (vector-! (new 'stack-no-clear 'vector) sv-1680 (-> s4-0 root trans))) + (set! sv-1716 (the-as float 0.0)) + (set! (-> sv-1712 y) 0.0) + (set! sv-1720 (vector-normalize-ret-len! sv-1712 1.0)) + (set! sv-1716 (vector-dot sv-1712 sv-80)) + (when (or (< (the float sv-120) sv-1716) (and (< 0.707 sv-1716) (= sv-136 *last-hit-deflect-target-handle*))) + (set! sv-116 sv-1720) + (set! sv-120 (the int sv-1716)) + (set! (-> sv-112 quad) (-> sv-1680 quad)) + (set! sv-128 (logtest? (process-mask enemy) (-> s1-1 mask))) + (set! sv-136 (process->handle s1-1)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (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-84) (-> sv-84 w))) + (when (and (!= s4-0 s3-1) + (!= s3-1 sv-40) + (not (focus-test? s3-1 disable dead inactive gun-no-target)) + (or (logtest? (process-mask enemy civilian) (-> s3-1 mask)) + (and (logtest? (process-mask guard) (-> s3-1 mask)) (-> *setting-control* user-current gun-target-guards?)) + ) + ) + (when (or (not sv-128) + (logtest? (process-mask enemy guard) (-> s3-1 mask)) + (not (is-in-ignore-list? sv-36 (process->handle s3-1))) + ) + (set! sv-1724 (get-trans s3-1 3)) + (set! sv-1744 (vector-! (new 'stack-no-clear 'vector) sv-1724 (-> s4-0 root trans))) + (set! sv-1748 (the-as float 0.0)) + (set! (-> sv-1744 y) 0.0) + (set! sv-1752 (vector-normalize-ret-len! sv-1744 1.0)) + (set! sv-1748 (vector-dot sv-1744 sv-80)) + (when (or (< (the float sv-120) sv-1748) (and (< 0.707 sv-1748) (= sv-136 *last-hit-deflect-target-handle*))) + (set! sv-116 sv-1752) + (set! sv-120 (the int sv-1748)) + (set! (-> sv-112 quad) (-> sv-1724 quad)) + (set! sv-128 (logtest? (process-mask enemy) (-> s3-1 mask))) + (set! sv-136 (process->handle s3-1)) + ) + ) + ) + ) + ) + (vector-! arg1 sv-112 (-> s4-0 root trans)) + (set! *last-hit-deflect-target-handle* (the-as (pointer process) sv-136)) + ) + ) + (vector-normalize! arg1 546133.3) + (cond + ((time-elapsed? (-> arg0 last-hit-time) (seconds 0.3)) + ) + ((time-elapsed? (-> arg0 last-hit-time) (seconds 0.05)) + ) + ) + (sound-play "yellow2-ricco") + (set-time! (-> arg0 last-hit-time)) + (set! (-> arg0 hit-yet?) #t) + (none) + ) + +;; definition for function gun-yellow-deflect-reaction +(defun gun-yellow-deflect-reaction ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector)) + (cshape-reaction-update-state arg0 arg1 arg3) + (let ((s3-0 (the-as handle #f))) + (when (and (nonzero? (-> arg1 best-other-tri collide-ptr)) + (-> arg1 best-other-tri collide-ptr) + (let ((s1-0 (-> arg1 best-other-tri collide-ptr))) + (if (type? s1-0 collide-shape-prim) + s1-0 + ) + ) + ) + (let* ((s2-1 (-> arg1 best-other-tri collide-ptr)) + (a0-4 (if (type? s2-1 collide-shape-prim) + s2-1 + ) + ) + (v1-4 a0-4) + ) + (when v1-4 + (set! s3-0 (process->handle (-> (the-as collide-shape-prim a0-4) cshape process))) + (when (and (logtest? (collide-spec obstacle pusher) (-> (the-as collide-shape-prim v1-4) prim-core collide-as)) + (not (logtest? (collide-spec civilian enemy vehicle-sphere vehicle-mesh-probeable) + (-> (the-as collide-shape-prim v1-4) prim-core collide-as) + ) + ) + ) + (let ((v1-7 (-> arg0 process))) + (set! (-> (the-as gun-yellow-shot-2 v1-7) actor-deflect?) #t) + ) + (set! s3-0 (the-as handle #f)) + ) + ) + ) + ) + (let ((s2-2 (the-as gun-yellow-shot-2 (-> arg0 process)))) + (on-impact s2-2 s3-0) + (set! (-> s2-2 delay-attack) 0) + ) + ) + 0 + (gun-yellow-shot-do-deflect (the-as gun-yellow-shot-2 (-> arg0 process)) arg2 arg3 (-> arg0 surface-normal)) + (-> arg0 status) + ) + +;; definition for method 30 of type gun-yellow-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this gun-yellow-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 37 of type gun-yellow-shot-2 +(defmethod deal-damage! ((this gun-yellow-shot-2) (arg0 process) (arg1 event-message-block)) + (if (> (-> this max-actor-deflect-count) 0) + ((method-of-type projectile deal-damage!) this arg0 arg1) + ) + ) + +;; definition for function gun-yellow-shot-2-move +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun gun-yellow-shot-2-move ((arg0 gun-yellow-shot-2)) + (with-pp + (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 (not (handle->process (-> arg0 last-hit-enemy))) + (set! (-> arg0 delay-attack) 0) + 0 + ) + (if (and (> (-> arg0 delay-attack) 0) (time-elapsed? (-> arg0 delay-attack) (seconds 0.1))) + (logior! (-> s5-0 status) (collide-status touch-actor)) + ) + (when (or (logtest? (-> s5-0 status) (collide-status touch-surface)) + (logtest? (-> s5-0 status) (collide-status touch-actor)) + ) + (let ((s2-0 #f) + (s3-0 #f) + (s4-1 (the-as object #f)) + ) + (when (logtest? (-> s5-0 status) (collide-status touch-actor)) + (cond + ((-> arg0 actor-deflect?) + (set! (-> arg0 actor-deflect?) #f) + ) + ((> (-> arg0 max-actor-deflect-count) 0) + (let ((a0-16 (handle->process (-> arg0 last-hit-enemy)))) + (when a0-16 + (set! s2-0 #t) + (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) 'prevent-bounce?) + (set! s4-1 (send-event-function a0-16 a1-5)) + ) + ) + ) + ) + (else + (set! s4-1 #t) + ) + ) + ) + (when s2-0 + (when (> (-> arg0 delay-attack) 0) + ) + (handle-impact arg0 (-> arg0 last-hit-enemy)) + ) + (if (and (> (-> arg0 delay-attack) 0) (and (time-elapsed? (-> arg0 delay-attack) (seconds 0.1)) s2-0 (not s4-1))) + (set! s3-0 #t) + ) + (when s3-0 + (let ((t9-4 gun-yellow-shot-do-deflect) + (a0-23 arg0) + (a1-7 (-> arg0 root transv)) + (a2-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a2-1 quad) (-> arg0 root transv quad)) + (t9-4 a0-23 a1-7 a2-1 (-> arg0 delay-norm)) + ) + ) + (set! (-> arg0 hit-actor?) (the-as symbol s4-1)) + ) + (set! (-> arg0 delay-attack) 0) + (let ((v1-57 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> arg0 tail-pos) (-> s5-0 trans)) 2048.0)) + (a1-10 (-> arg0 hit-pos)) + ) + (set! (-> a1-10 quad) (-> s5-0 trans quad)) + (vector+! a1-10 a1-10 v1-57) + (move-to-point! (-> arg0 root) a1-10) + ) + (cond + ((-> arg0 hit-actor?) + (go (method-of-object arg0 impact)) + ) + (else + (set-time! (-> arg0 last-collide-time)) + (launch-particles (-> *part-id-table* 272) (-> arg0 hit-pos)) + (launch-particles (-> *part-id-table* 273) (-> arg0 hit-pos)) + (let ((a0-32 (new 'stack-no-clear 'vector))) + (set! (-> a0-32 quad) (-> arg0 root transv quad)) + (vector-normalize! a0-32 65536.0) + ) + (vector+! (-> arg0 tail-pos) (-> arg0 root trans) (-> arg0 root transv)) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 31 of type gun-yellow-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this gun-yellow-shot)) + (+! (-> *game-info* shots-fired 0) 1.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) 819200.0) + (set! (-> this move) gun-yellow-shot-move) + (set! (-> this timeout) (seconds 3)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this damage) 2.0) + (if (logtest? (game-secrets gun-upgrade-yellow-1) (-> *game-info* secrets)) + (set! (-> this damage) 3.0) + ) + (logior! (-> this options) (projectile-options po13)) + (set! (-> this muzzle-flash-part) (-> *part-id-table* 268)) + (set! (-> this main-shot-part) (-> *part-id-table* 264)) + (set! (-> this shot-aim-part) (-> *part-id-table* 267)) + (set! (-> this shot-ring-part) (-> *part-id-table* 266)) + 0 + (none) + ) + +;; definition for method 31 of type gun-yellow-shot-2 +;; WARN: Return type mismatch (pointer process) vs none. +(defmethod init-proj-settings! ((this gun-yellow-shot-2)) + (call-parent-method this) + (set! (-> this actor-deflect?) #f) + (set! (-> this last-hit-enemy) (the-as handle #f)) + (set! (-> this damage) 1.5) + (if (logtest? (game-secrets gun-upgrade-yellow-2) (-> *game-info* secrets)) + (set! (-> this damage) 2.0) + ) + (set! (-> this snd-trail) (new-sound-id)) + (set! (-> this hit-yet?) #f) + (sound-play "yellow2-trail" :id (-> this snd-trail) :pitch 1) + (set! (-> this last-collide-time) 0) + (set! (-> this move) gun-yellow-shot-2-move) + (set! (-> this snd-whoosh) (new-sound-id)) + (dotimes (v1-9 6) + (set! (-> this ignore-list v1-9 hand) (the-as handle #f)) + ) + (set! (-> this max-actor-deflect-count) 4) + (set! (-> this timeout) (seconds 3)) + (when (logtest? (game-secrets gun-upgrade-yellow-2) (-> *game-info* secrets)) + (set! (-> this max-actor-deflect-count) 7) + (set! (-> this timeout) (seconds 5)) + ) + (set! (-> this muzzle-flash-part) (-> *part-id-table* 274)) + (sound-play "yellow2-shot" :pitch 1) + (let ((s5-1 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-1 tracked-obj) (process->handle this)) + (set! (-> s5-1 appearance) *yellow-shot-2-trail*) + (set! (-> s5-1 max-num-crumbs) (the int (* 0.25 (the float (-> s5-1 appearance max-age))))) + (set! (-> s5-1 track-immediately?) #t) + (let* ((v1-34 (estimate-light-trail-mem-usage + (the-as uint (-> s5-1 max-num-crumbs)) + (the-as uint (= (-> s5-1 appearance lie-mode) 3)) + ) + ) + (gp-1 (get-process *default-dead-pool* light-trail-tracker-projectile (+ v1-34 8192) 1)) + ) + (when gp-1 + (let ((t9-9 (method-of-type process activate))) + (t9-9 gp-1 *target* "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process gp-1 light-trail-tracker-init-by-other s5-1) + (-> gp-1 ppointer) + ) + ) + ) + (none) + ) + +;; definition for method 47 of type gun-yellow-shot-2 +(defmethod add-to-ignore-list! ((this gun-yellow-shot-2) (arg0 handle)) + (when (and arg0 (not (is-in-ignore-list? this arg0))) + (dotimes (v1-3 6) + (when (not (handle->process (-> this ignore-list v1-3 hand))) + (set! (-> this ignore-list v1-3 hand) arg0) + (set-time! (-> this ignore-list v1-3 time)) + (return 0) + ) + ) + (the-as int #f) + ) + ) + +;; definition for method 46 of type gun-yellow-shot-2 +(defmethod is-in-ignore-list? ((this gun-yellow-shot-2) (arg0 handle)) + (if (not arg0) + (return #f) + ) + (dotimes (v1-2 6) + (if (and (-> this ignore-list v1-2 hand) (time-elapsed? (-> this ignore-list v1-2 time) (seconds 0.15))) + (set! (-> this ignore-list v1-2 hand) (the-as handle #f)) + ) + ) + (dotimes (v1-5 6) + (if (= arg0 (-> this ignore-list v1-5 hand)) + (return #t) + ) + ) + #f + ) + +;; definition for method 45 of type gun-yellow-shot-2 +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs object. +(defmethod handle-impact ((this gun-yellow-shot-2) (arg0 handle)) + (when (> (-> this max-actor-deflect-count) 0) + (let ((s5-0 (handle->process arg0))) + (when s5-0 + (if (and (logtest? (process-mask guard) (-> s5-0 mask)) + (not (-> *setting-control* user-current gun-target-guards?)) + ) + (set! (-> this damage) 0.0) + ) + (when (time-elapsed? (-> this last-attack-time) (seconds 0.25)) + (let* ((v1-15 *game-info*) + (a0-7 (+ (-> v1-15 attack-id) 1)) + ) + (set! (-> v1-15 attack-id) a0-7) + (set! (-> this attack-id) a0-7) + ) + ) + (when (deal-damage! this s5-0 (the-as event-message-block #f)) + (set-time! (-> this last-attack-time)) + (+! (-> this enemy-hit-count) 1) + (when (and (< 1 (-> this enemy-hit-count)) (< (-> this enemy-hit-count) 4)) + (adjust-player-ammo -1.0 (pickup-type ammo-yellow)) + (when (>= 0.0 (get-remaining-player-ammo (pickup-type ammo-yellow))) + (set! (-> this timeout) 0) + 0 + ) + ) + (let ((v1-28 (-> this notify-handle))) + (send-event (handle->process v1-28) 'notify 'attack s5-0) + ) + (if (>= (-> this enemy-hit-count) 1) + (set! (-> this damage) 1.0) + ) + (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)) + ) + ) + (let ((v0-0 (+ (-> this max-actor-deflect-count) -1))) + (set! (-> this max-actor-deflect-count) v0-0) + v0-0 + ) + ) + ) + ) + ) + ) + +;; definition for method 44 of type gun-yellow-shot-2 +;; WARN: Return type mismatch int vs object. +(defmethod on-impact ((this gun-yellow-shot-2) (arg0 handle)) + (let ((a1-1 (-> this last-hit-enemy))) + (set! (-> this last-hit-enemy) arg0) + (if (and (!= a1-1 arg0) (> (-> this delay-attack) 0)) + (handle-impact this a1-1) + ) + ) + (set! (-> this delay-attack) 0) + (add-to-ignore-list! this arg0) + ) + +;; definition for method 36 of type gun-yellow-shot-2 +(defmethod handle-proj-hit! ((this gun-yellow-shot-2) (arg0 process) (arg1 event-message-block)) + (cond + ((-> this hit-actor?) + (call-parent-method this arg0 arg1) + ) + (else + (let ((s4-1 (the-as object (-> arg1 param 0)))) + (when (and (!= arg0 (handle->process (-> this last-hit-enemy))) + (!= arg0 (send-event *target* 'get-vehicle)) + (not (is-in-ignore-list? this (process->handle arg0))) + ) + (new 'stack-no-clear 'vector) + (let ((s3-0 (-> this delay-norm)) + (s1-0 (-> (the-as touching-shapes-entry s4-1) head)) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (get-intersect-point s2-0 s1-0 (-> this root) (the-as touching-shapes-entry s4-1)) + (let ((v1-16 + (get-touched-prim + s1-0 + ((method-of-type touching-shapes-entry get-touched-shape) (the-as touching-shapes-entry s4-1) (-> this root)) + (the-as touching-shapes-entry s4-1) + ) + ) + ) + (when v1-16 + (vector-! s3-0 s2-0 (the-as vector (-> v1-16 prim-core))) + (vector-normalize! s3-0 1.0) + (on-impact this (process->handle arg0)) + (set-time! (-> this delay-attack)) + ) + ) + ) + ) + ) + #t + ) + ) + ) + +;; failed to figure out what this is: +(defstate impact (gun-yellow-shot-2) + :virtual #t + :enter (behavior () + (sound-stop (-> self snd-trail)) + (let ((t9-2 (-> (find-parent-state) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +;; definition for method 31 of type gun-yellow-shot-3 +;; INFO: Used lq/sq +;; WARN: Return type mismatch sparticle-launcher vs none. +(defmethod init-proj-settings! ((this gun-yellow-shot-3)) + (+! (-> *game-info* shots-fired 0) 1.0) + (set! (-> this hit-actor?) #f) + (set! (-> this tail-pos quad) (-> this root trans quad)) + (let ((f0-2 (vector-vector-xz-distance (target-pos 0) (-> this root trans)))) + (cpad-set-buzz! + (-> *cpad-list* cpads 0) + 1 + (the int (* 255.0 (lerp-scale-clamp 0.5 0.0 f0-2 40960.0 245760.0))) + (seconds 0.1) + ) + ) + (set! (-> this attack-mode) 'eco-yellow) + (set! (-> this max-speed) 819200.0) + (set! (-> this move) gun-yellow-shot-move) + (set! (-> this timeout) (seconds 3)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this damage) 2.0) + (when (logtest? (game-feature feature22) (-> *game-info* features)) + (set! (-> this damage) (* 2.0 (-> this damage))) + (set! (-> this vehicle-impulse-factor) (* 0.5 (-> this vehicle-impulse-factor))) + ) + (logior! (-> this options) (projectile-options po13)) + (set! (-> this muzzle-flash-part) (-> *part-id-table* 275)) + (set! (-> this main-shot-part) (-> *part-id-table* 276)) + (set! (-> this shot-aim-part) (-> *part-id-table* 278)) + (set! (-> this shot-ring-part) (-> *part-id-table* 266)) + (none) + ) + +;; definition for method 30 of type gun-yellow-shot-2 +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this gun-yellow-shot-2)) + (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) gun-yellow-deflect-reaction) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (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 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-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec projectile)) + (set! (-> v1-12 prim-core collide-with) + (collide-spec backgnd bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set! (-> v1-12 prim-core action) (collide-action solid)) + (set-vector! (-> v1-12 local-sphere) 0.0 0.0 0.0 819.2) + ) + (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 bot crate civilian enemy obstacle vehicle-sphere hit-by-others-list pusher shield) + ) + (set-vector! (-> v1-14 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-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 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 41 of type gun-yellow-shot +;; WARN: Return type mismatch int vs none. +(defmethod draw-main-shot ((this gun-yellow-shot) (arg0 vector) (arg1 vector)) + (let ((f30-0 (-> *part-id-table* 264 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 264 init-specs 4 initial-valuef) (fmin f30-0 (vector-length arg1))) + (draw-beam (-> this main-shot-part) arg0 arg1 #f) + (set! (-> *part-id-table* 264 init-specs 4 initial-valuef) f30-0) + ) + 0 + (none) + ) + +;; definition for method 41 of type gun-yellow-shot-2 +;; WARN: Return type mismatch int vs none. +(defmethod draw-main-shot ((this gun-yellow-shot-2) (arg0 vector) (arg1 vector)) + 0 + (none) + ) + +;; definition for method 10 of type gun-yellow-shot-2 +(defmethod deactivate ((this gun-yellow-shot-2)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this snd-trail)) + (call-parent-method this) + (none) + ) + +;; definition for method 41 of type gun-yellow-shot-3 +;; WARN: Return type mismatch int vs none. +(defmethod draw-main-shot ((this gun-yellow-shot-3) (arg0 vector) (arg1 vector)) + (let ((f30-0 (-> *part-id-table* 276 init-specs 4 initial-valuef))) + (set! (-> *part-id-table* 276 init-specs 4 initial-valuef) (fmin f30-0 (vector-length arg1))) + (draw-beam (-> this main-shot-part) arg0 arg1 #f) + (set! (-> *part-id-table* 276 init-specs 4 initial-valuef) f30-0) + ) + 0 + (none) + ) + +;; definition for method 42 of type gun-yellow-shot +;; WARN: Return type mismatch int vs none. +(defmethod gun-yellow-shot-method-42 ((this gun-yellow-shot) (arg0 float) (arg1 float) (arg2 matrix)) + (set! (-> *part-id-table* 267 init-specs 3 initial-valuef) (* arg0 arg1)) + (launch-particles (-> *part-id-table* 267) arg2 :origin-is-matrix #t) + (set! (-> *part-id-table* 267 init-specs 3 initial-valuef) arg1) + 0 + (none) + ) + +;; definition for method 42 of type gun-yellow-shot-2 +;; WARN: Return type mismatch int vs none. +(defmethod gun-yellow-shot-method-42 ((this gun-yellow-shot-2) (arg0 float) (arg1 float) (arg2 matrix)) + 0 + (none) + ) + +;; definition for method 42 of type gun-yellow-shot-3 +;; WARN: Return type mismatch int vs none. +(defmethod gun-yellow-shot-method-42 ((this gun-yellow-shot-3) (arg0 float) (arg1 float) (arg2 matrix)) + (set! (-> *part-id-table* 278 init-specs 3 initial-valuef) (* arg0 arg1)) + (set! (-> *part-id-table* 278 init-specs 3 initial-valuef) arg1) + 0 + (none) + ) + +;; definition for method 25 of type gun-yellow-shot-2 +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this gun-yellow-shot-2)) + (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) + (draw-main-shot this a1-0 s4-1) + (vector-normalize! s4-1 1.0) + (launch-particles (-> *part-id-table* 270) s3-0) + ) + (let ((s3-1 (new 'stack-no-clear 'matrix)) + (f30-1 (fmin 1.0 (* 0.000015258789 f30-0))) + (f28-0 (-> *part-id-table* 267 init-specs 3 initial-valuef)) + ) + (forward-up->inv-matrix s3-1 s4-1 *up-vector*) + (set! (-> s3-1 trans quad) (-> s5-0 quad)) + (gun-yellow-shot-method-42 this f30-1 f28-0 s3-1) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 43 of type gun-yellow-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod spawn-particles ((this gun-yellow-shot) (arg0 vector)) + (launch-particles (-> *part-id-table* 265) arg0) + 0 + (none) + ) + +;; definition for method 43 of type gun-yellow-shot-2 +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod spawn-particles ((this gun-yellow-shot-2) (arg0 vector)) + (launch-particles (-> *part-id-table* 270) arg0) + 0 + (none) + ) + +;; definition for method 43 of type gun-yellow-shot-3 +;; WARN: Return type mismatch int vs none. +(defmethod spawn-particles ((this gun-yellow-shot-3) (arg0 vector)) + 0 + (none) + ) + +;; definition for method 26 of type gun-yellow-shot-3 +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this gun-yellow-shot-3)) + (let ((v1-8 + (cond + ((-> this hit-actor?) + (cond + ((logtest? (-> *part-group-id-table* 99 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* 99)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 99)) + ) + ) + ) + ((logtest? (-> *part-group-id-table* 98 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* 98)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 98)) + ) + ) + ) + ) + (send-event (ppointer->process v1-8) 'clock this) + ) + 0 + (none) + ) 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 0000000000..880fb0950a --- /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 0000000000..24a0f17a18 --- /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 e73910cf18..9cd26ff5dc 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 f756c65051..9d852cf315 100644 --- a/test/decompiler/reference/jak3/engine/target/lightjak-wings_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/lightjak-wings_REF.gc @@ -3,7 +3,7 @@ ;; failed to figure out what this is: (defpart 623 - :init-specs ((:texture (new 'static 'texture-id :index #xf :page #x4)) + :init-specs ((:texture (glow-soft level-default-sprite)) (:num 1.0) (:scale-x (meters 3)) (:rot-x (degrees 2.25)) @@ -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) @@ -537,33 +523,16 @@ :exit (behavior () (let ((a0-1 (handle->process (-> self ragdoll-proc)))) (if a0-1 - (ragdoll-proc-method-16 (the-as ragdoll-proc a0-1) 60) + (disable-for-duration (the-as ragdoll-proc a0-1) (seconds 0.2)) ) ) ) :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/logic-target_REF.gc b/test/decompiler/reference/jak3/engine/target/logic-target_REF.gc index 05a33c98f1..98cd3eaaab 100644 --- a/test/decompiler/reference/jak3/engine/target/logic-target_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/logic-target_REF.gc @@ -877,7 +877,7 @@ (set! (-> gp-0 ignore-process0) self) (set! (-> gp-0 ignore-process1) #f) (set! (-> gp-0 ignore-pat) (-> self control pat-ignore-mask)) - ((method-of-object *collide-cache* collide-cache-method-12)) + (fill-using-bounding-box *collide-cache* gp-0) (dotimes (s5-0 3) (set! (-> gp-0 start-pos quad) (-> self control collision-spheres s5-0 prim-core world-sphere quad)) (vector-float*! (-> gp-0 move-dist) (-> self control wall-contact-normal) -8192.0) @@ -1575,7 +1575,7 @@ (set! (-> gp-0 ignore-process0) self) (set! (-> gp-0 ignore-process1) #f) (set! (-> gp-0 ignore-pat) (-> self control pat-ignore-mask)) - ((method-of-object *collide-cache* collide-cache-method-12)) + (fill-using-bounding-box *collide-cache* gp-0) (dotimes (s5-0 2) (let ((a1-4 (not (or (logtest? (target-flags lleg-no-ik rleg-no-ik) (-> self target-flags)) (and (logtest? (-> self control mod-surface flags) (surface-flag air)) @@ -2250,7 +2250,7 @@ (send-event self 'end-mode 'edge-grab) ) (if *display-edge-collision-marks* - ((method-of-type edge-grab-info edge-grab-info-method-10)) + (edge-grab-info-method-10 s5-0) ) (set! (-> self control ground-pat) (-> s5-0 edge-tri-pat)) (vector-normalize! @@ -2406,7 +2406,7 @@ (send-event self 'end-mode 'edge-grab) ) (if *display-edge-collision-marks* - ((method-of-type edge-grab-info edge-grab-info-method-10)) + (edge-grab-info-method-10 gp-0) ) (vector-normalize! (vector-! @@ -2471,7 +2471,7 @@ ) (add-debug-sphere #t - (bucket-id bucket583) + (bucket-id debug) (-> self control midpoint-of-hands) (meters 0.2) (the-as rgba (new 'static 'rgba :r #xff :a #x80)) @@ -2719,6 +2719,7 @@ ;; definition for function do-target-gspot ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. +;; WARN: disable def twice: 76. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. (defbehavior do-target-gspot target () (cond ((and (logtest? (-> self control status) (collide-status on-surface)) @@ -2744,15 +2745,13 @@ (a3-0 8192.0) (t0-0 81920.0) (t1-0 1024.0) + (t2-1 (if (nonzero? (-> self pilot)) + (handle->process (-> self pilot vehicle)) + (the-as process #f) + ) + ) ) - (cond - ((nonzero? (-> self pilot)) - (handle->process (-> self pilot vehicle)) - ) - (else - ) - ) - (if (t9-0 a0-15 a1-0 (the-as collide-spec a2-1) a3-0 t0-0 t1-0) + (if (t9-0 a0-15 a1-0 (the-as collide-spec a2-1) a3-0 t0-0 t1-0 t2-1) (set! (-> self control gspot-pat-surfce) (-> gp-0 best-other-tri pat)) ) ) @@ -3093,7 +3092,7 @@ (set! (-> this game) *game-info*) (set! (-> this ext-geo-control) *target-geo-control*) (set! (-> this pending-ext-geo) - (if (and (logtest? (game-feature feature56) (-> this game features)) + (if (and (logtest? (game-feature jakc) (-> this game features)) (not (logtest? (game-secrets commentary) (-> *game-info* secrets))) ) (target-geo jakc) 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 bfa54970a6..00651e9833 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-h_REF.gc b/test/decompiler/reference/jak3/engine/target/mech/mech-h_REF.gc index 789a1229aa..ee94412385 100644 --- a/test/decompiler/reference/jak3/engine/target/mech/mech-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/mech/mech-h_REF.gc @@ -15,6 +15,7 @@ (drag-sound-id sound-id) (whine-sound-id sound-id) (shield-sound-id sound-id) + (mode-sound-bank connection) (mech-start-time time-frame) (mech-time time-frame) (no-get-off-time time-frame) @@ -44,7 +45,7 @@ (smoke-local-vel vector 2 :inline) (particle-system-2d basic) (particle-system-3d basic) - (part-thruster sparticle-launch-control) + (part-thruster sparticle-launcher) (part-thruster-scale-x sp-field-init-spec) (part-thruster-scale-y sp-field-init-spec) (part-quat quaternion) @@ -134,12 +135,8 @@ (defskelgroup skel-mech-explode mech mech-explode-lod0-jg mech-explode-idle-ja ((mech-explode-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 4.5) - :shadow-joint-index 3 + :origin-joint-index 3 ) ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/engine/target/mech/mech-part_REF.gc b/test/decompiler/reference/jak3/engine/target/mech/mech-part_REF.gc new file mode 100644 index 0000000000..17fd17fcbe --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/mech/mech-part_REF.gc @@ -0,0 +1,435 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpart 1037 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:y (meters 0)) + (:scale-x (meters 1)) + (:scale-y (meters 3)) + (: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)) + ) + ) + +;; failed to figure out what this is: +(defpart 1038 + :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) + (: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 1039 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0 4.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 192.0) + (:g 64.0) + (:b 0.0) + (:a 0.0 16.0) + (:vel-y (meters -0.06666667) (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.0005)) + (:friction 0.94) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.085)) + (:next-launcher 1040) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 1040 + :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.128 -0.256) + ) + ) + +;; failed to figure out what this is: +(defpart 1041 + :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 1042) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 1042 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y (meters 0))) + ) + +;; failed to figure out what this is: +(defpart 1043 + :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 1044) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 1044 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b -4.096)) + ) + +;; definition for function mech-spawn-thruster +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun mech-spawn-thruster ((arg0 mech-info) (arg1 vector) (arg2 vector) (arg3 float) (arg4 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (set! (-> arg0 part-thruster) (-> *part-id-table* 1037)) + (set! (-> arg0 part-thruster-scale-x) (-> *part-id-table* 1037 init-specs 4)) + (set! (-> arg0 part-thruster-scale-y) (-> *part-id-table* 1037 init-specs 5)) + (let ((s1-0 (new 'stack-no-clear 'quaternion)) + (s0-0 (new 'stack-no-clear 'vector)) + ) + (forward-up->quaternion s1-0 arg2 (new 'static 'vector :y 1.0 :w 1.0)) + (quaternion-rotate-local-x! s1-0 s1-0 32768.0) + (let ((a0-3 s0-0)) + (let ((v1-10 arg1)) + (let ((a1-4 (* 0.5 arg4))) + (.mov vf7 a1-4) + ) + (.lvf vf5 (&-> arg2 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 (&-> a0-3 quad) vf6) + ) + (set! (-> arg0 part-thruster-scale-x initial-valuef) arg3) + (set! (-> arg0 part-thruster-scale-y initial-valuef) arg4) + (dotimes (s4-1 2) + (quaternion-rotate-local-z! s1-0 s1-0 16384.0) + (quaternion-copy! (-> arg0 part-quat) s1-0) + (let ((t9-4 sp-launch-particles-var) + (a0-6 (-> arg0 particle-system-3d)) + (a1-7 (-> arg0 part-thruster)) + (a2-4 *launch-matrix*) + ) + (set! (-> a2-4 trans quad) (-> s0-0 quad)) + (t9-4 + (the-as sparticle-system a0-6) + a1-7 + a2-4 + (the-as sparticle-launch-state #f) + (the-as sparticle-launch-control #f) + 1.0 + ) + ) + ) + ) + (launch-particles (-> *part-id-table* 1043) arg1) + (launch-particles (-> *part-id-table* 1038) arg1) + (cond + ((!= (-> *setting-control* user-current under-water-pitch-mod) 0.0) + (launch-particles (-> *part-id-table* 1043) arg1) + ) + (else + (launch-particles (-> *part-id-table* 1039) arg1) + (launch-particles (-> *part-id-table* 1041) arg1) + ) + ) + 0 + (none) + ) + ) + +;; failed to figure out what this is: +(defpart 1045 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 3.0) + (:x (meters -16) (meters 32)) + (:y (meters 0) (meters 12)) + (:z (meters -16) (meters 32)) + (:scale-x (meters 0.1) (meters 0.3)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 0.0 64.0) + (:g 64.0 128.0) + (:b 64.0 196.0) + (:a 0.0) + (:vel-y (meters -0.0033333334) (meters 0.006666667)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:fade-a 0.21333334 0.21333334) + (:timer (seconds 2.5)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata 0.0) + (:func 'check-water-level-above-and-die) + (:next-time (seconds 0.5)) + (:next-launcher 1046) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters -3) (meters 8)) + ) + ) + +;; failed to figure out what this is: +(defpart 1046 + :init-specs ((:fade-a 0.0) (:next-time (seconds 1)) (:next-launcher 1047)) + ) + +;; failed to figure out what this is: +(defpart 1047 + :init-specs ((:fade-a -0.21333334 -0.21333334)) + ) + +;; failed to figure out what this is: +(defpart 1048 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 0.2) + (:x (meters -24) (meters 48)) + (:y (meters -4) (meters 4)) + (:z (meters -24) (meters 48)) + (:scale-x (meters 0.15) (meters 0.15)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.008333334) (meters 0.005)) + (:fade-a 0.16) + (:timer (seconds 16)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'check-water-level-above-and-die) + (:next-time (seconds 0.33) (seconds 0.657)) + (:next-launcher 1049) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1049 + :init-specs ((:fade-a 0.0) (:next-time (seconds 1) (seconds 5.997)) (:next-launcher 1050)) + ) + +;; failed to figure out what this is: +(defpart 1050 + :init-specs ((:scalevel-x (meters -0.00033333333) (meters -0.00066666666)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.16) + (:accel-y (meters -0.0001) (meters -0.0001)) + ) + ) + +;; failed to figure out what this is: +(defpart 1051 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.15) (meters 0.15)) + (:scale-y (meters 0.1) (meters 0.1)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 0.0) + (:vel-y (meters 0.008333334) (meters 0.005)) + (:fade-a 0.16) + (:accel-y (meters 0.0002)) + (:friction 0.97 0.01) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'check-water-level-above-and-die) + (:next-time (seconds 0.33) (seconds 0.657)) + (:next-launcher 1052) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 1052 + :init-specs ((:fade-a 0.0) (:next-time (seconds 1) (seconds 0.997)) (:next-launcher 1050)) + ) + +;; failed to figure out what this is: +(defpartgroup group-mech-explode-death + :id 236 + :duration (seconds 0.25) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 153) (sp-item 154)) + ) + +;; failed to figure out what this is: +(defpart 1053 + :init-specs ((:num 4.0) + (:x (meters -1) (meters 3)) + (:y (meters 0) (meters 4)) + (:rot-x 6) + (:r 4096.0) + (:g 2662.4) + (:b 2867.2) + (:vel-y (meters 0.0033333334) (meters 0.01)) + (:accel-y (meters 0.0016666667) (meters 0.00033333333)) + (:friction 0.9) + (:timer (seconds 0.4)) + (:flags (distort)) + (:next-time (seconds 0.135) (seconds 0.13)) + (:next-launcher 1054) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1054 + :init-specs ((:fade-b -5.12)) + ) + +;; failed to figure out what this is: +(defpart 1055 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 16.0 4.0) + (:x (meters -1) (meters 3)) + (:y (meters 0) (meters 4)) + (:scale-x (meters 0.5) (meters 0.25)) + (:scale-y (meters 1) (meters 0.25)) + (:r 255.0) + (:g 0.0 128.0) + (:b 0.0) + (:a 32.0 32.0) + (:vel-y (meters 0.0033333334) (meters 0.01)) + (:scalevel-x (meters 0.013333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters 0.0016666667) (meters 0.00033333333)) + (:friction 0.9) + (:timer (seconds 0.367)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400f00 #x400f00)) + (:next-time (seconds 0.167)) + (:next-launcher 1056) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1056 + :init-specs ((:fade-a -0.53333336 -0.53333336)) + ) + +;; failed to figure out what this is: +(defpart 1057 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.2) (meters 4)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 8)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 64.0 64.0) + (:b 255.0) + (:a 32.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters -0.1) (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 1058 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 2.0 4.0) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.04) (meters 0.03)) + (:r 0.0) + (:g 64.0 64.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.01125)) + (:vel-y (meters 0.1) (meters 0.2)) + (:fade-g -2.55 -2.55) + (:fade-b -2.0) + (:fade-a -0.64 -0.64) + (:accel-y (meters -0.0033333334) (meters -0.0033333334)) + (:friction 0.8 0.02) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + + + + 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 new file mode 100644 index 0000000000..28f05368d1 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/mech/mech-states_REF.gc @@ -0,0 +1,2782 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *mech-exploder-params*, type joint-exploder-static-params +(define *mech-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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; definition for function check-turn-on-shield +(defun check-turn-on-shield ((arg0 target)) + (when (cpad-hold? (-> arg0 control cpad number) circle) + (if (handle->process (-> arg0 mech shield-handle)) + (go target-mech-shield) + ) + ) + ) + +;; failed to figure out what this is: +(defstate target-mech-start (target) + :event target-mech-handler + :exit target-mech-exit + :code target-mech-init + :post target-post + ) + +;; definition for function mech-can-throw? +;; WARN: Return type mismatch object vs symbol. +(defbehavior mech-can-throw? target () + (let ((v1-1 (vector-float*! (new 'stack-no-clear 'vector) (-> self control local-normal) 0.0))) + (vector+float*! v1-1 v1-1 (-> self control c-R-w fvec) 20480.0) + (the-as symbol (send-event (handle->process (-> self carry other)) 'can-drop? v1-1)) + ) + ) + +;; failed to figure out what this is: +(defstate target-mech-stance (target) + :event target-mech-handler + :enter (behavior () + (set! (-> self control mod-surface) *mech-stance-mods*) + (set! (-> self control mod-surface turnvv) 40049.777) + (set! (-> self control did-move-to-pole-or-max-jump-height) 0.0) + (rot->dir-targ! (-> self control)) + (set! (-> self mech jump-thrust-fuel) (-> *TARGET-bank* mech-jump-thrust-fuel)) + ) + :exit (behavior () + (target-effect-exit) + (target-mech-exit) + (rot->dir-targ! (-> self control)) + ) + :trans (behavior () + (check-turn-on-shield self) + (when (not (cpad-hold? (-> self control cpad number) circle)) + (if (and (move-legs?) + (and (< (fabs + (deg-diff (quaternion-y-angle (-> self control dir-targ)) (vector-y-angle (-> self control to-target-pt-xz))) + ) + 1820.4445 + ) + (time-elapsed? (-> self control time-of-last-zero-input) (seconds 0.05)) + ) + ) + (go target-mech-walk) + ) + (if (and (cpad-pressed? (-> self control cpad number) square) (can-hands? #t)) + (go target-mech-punch) + ) + (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-mech-jump + (-> *TARGET-bank* mech-jump-height-min) + (-> *TARGET-bank* mech-jump-height-max) + (the-as surface #f) + ) + ) + (if (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 r1) + ) + (go target-mech-carry-pickup) + ) + (if (and (or (cpad-pressed? (-> self control cpad number) triangle) (not (-> *setting-control* user-current pilot))) + (target-mech-get-off?) + ) + (go target-mech-shield) + ) + ) + (fall-test target-mech-falling (-> *TARGET-bank* fall-height)) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (when (not (and v1-2 (= v1-2 jakb-mech-turn90-ja))) + (let ((v1-8 (ja-group))) + (if (and v1-8 (= v1-8 jakb-mech-walk-ja)) + (sound-play "mech-stop") + ) + ) + (ja-channel-push! 3 (seconds 0.2)) + (ja :group! jakb-mech-turn90-ja :dist 16384.0) + (ja :chan 1 :group! jakb-mech-turn20-ja :dist 3640.889) + (ja :chan 2 :group! jakb-mech-stance-ja :dist 0.0) + ) + ) + (let ((f28-0 0.0) + (f30-0 0.0) + (gp-1 #f) + ) + (until #f + (let ((f26-0 (y-angle (-> self control)))) + (deg-diff f26-0 (quaternion-y-angle (-> self control dir-targ))) + (suspend) + (let ((f26-1 (* (deg-diff f26-0 (y-angle (-> self control))) (-> self clock frames-per-second)))) + (cond + ((< 910.2222 (fabs f26-1)) + (set! f28-0 (seek f28-0 1.0 (* 16.0 (seconds-per-frame)))) + (set! gp-1 #t) + ) + (else + (set! f28-0 (seek f28-0 0.0 (* 6.0 (seconds-per-frame)))) + (when (and gp-1 (= f28-0 0.0)) + (set! gp-1 #f) + (sound-play "mech-twitch") + ) + ) + ) + (set! f30-0 (seek f30-0 (lerp-scale 1.0 0.0 (fabs f26-1) 3640.889 16384.0) (* 10.0 (seconds-per-frame)))) + (let ((v1-41 (-> self skel effect))) + (set! (-> v1-41 channel-offset) (cond + ((< 0.8 (- 1.0 f28-0)) + 2 + ) + ((< 0.5 f30-0) + 1 + ) + (else + 0 + ) + ) + ) + ) + 0 + (ja :num! (loop! (/ f26-1 (current-cycle-distance (-> self skel))))) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + (ja-no-eval :chan 1 :num! (loop! (/ f26-1 (current-cycle-distance (-> self skel))))) + ) + ) + (let ((a0-44 (-> self skel root-channel 2))) + (let ((f0-22 (- 1.0 f28-0))) + (set! (-> a0-44 frame-interp 1) f0-22) + (set! (-> a0-44 frame-interp 0) f0-22) + ) + (set! (-> a0-44 param 0) 1.0) + (joint-control-channel-group-eval! a0-44 (the-as art-joint-anim #f) num-func-loop!) + ) + (can-play-stance-amibent?) + ) + ) + #f + ) + :post target-mech-post + ) + +;; failed to figure out what this is: +(defstate target-mech-walk (target) + :event target-mech-handler + :enter (behavior () + (set! (-> self control mod-surface) *mech-walk-mods*) + (set! (-> self control unknown-word04) (the-as uint #f)) + (set! (-> self control unknown-word04) (the-as uint 0.0)) + (set! (-> self mech jump-thrust-fuel) (-> *TARGET-bank* mech-jump-thrust-fuel)) + ) + :exit (behavior () + (target-effect-exit) + (target-mech-exit) + ) + :trans (behavior () + (check-turn-on-shield self) + (if (and (cpad-pressed? (-> self control cpad number) square) (can-hands? #t)) + (go target-mech-punch) + ) + (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-mech-jump + (-> *TARGET-bank* mech-jump-height-min) + (-> *TARGET-bank* mech-jump-height-max) + (the-as surface #f) + ) + ) + (let ((gp-0 (ja-group)) + (f0-2 (ja-aframe-num 0)) + ) + (when (if (or (and (= gp-0 jakb-mech-walk-ja) (>= f0-2 5.5) (>= 9.5 f0-2)) + (and (= gp-0 jakb-mech-walk-ja) (>= f0-2 20.5) (>= 24.5 f0-2)) + ) + #t + ) + (case (-> self control unknown-spool-anim00) + (('punch) + (go target-mech-punch) + ) + (('jump) + (if (can-jump? #f) + (go + target-mech-jump + (-> *TARGET-bank* mech-jump-height-min) + (-> *TARGET-bank* mech-jump-height-max) + (the-as surface #f) + ) + (set! (-> self control unknown-word04) (the-as uint #f)) + ) + ) + ) + (when (and (< 5.0 (the-as float (-> self control unknown-word04))) + (= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) + ) + (set-forward-vel 0.0) + (go target-mech-stance) + ) + (if (and (or (cpad-pressed? (-> self control cpad number) triangle) (not (-> *setting-control* user-current pilot))) + (target-mech-get-off?) + ) + (go target-mech-shield) + ) + ) + ) + (if (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 r1) + ) + (go target-mech-carry-pickup) + ) + (fall-test target-mech-falling (-> *TARGET-bank* fall-height)) + ) + :code (behavior () + (let ((f30-0 0.0) + (f28-0 0.0) + ) + (let ((f26-0 (cond + ((zero? (-> self mech walk-anim-leg)) + (set! (-> self mech walk-anim-leg) 1) + 7.0 + ) + (else + (set! (-> self mech walk-anim-leg) 0) + 22.0 + ) + ) + ) + (v1-7 (ja-group)) + ) + (when (not (and v1-7 (= v1-7 jakb-mech-walk-ja))) + (ja-channel-push! 3 (seconds 0.1)) + (ja :group! jakb-mech-walk-ja + :num! (identity (ja-aframe f26-0 0)) + :dist (-> *TARGET-bank* mech-walk-cycle-dist) + ) + (ja :chan 1 :group! jakb-mech-run-ja :dist (-> *TARGET-bank* mech-run-cycle-dist)) + (ja :chan 2 :group! jakb-mech-stance-ja :dist 0.0) + ) + ) + (until #f + (if (< (-> self control ctrl-xz-vel) 8192.0) + (set-forward-vel 8192.0) + ) + (suspend) + (let* ((f0-5 (current-cycle-distance (-> self skel))) + (f26-1 (/ (-> self control ctrl-xz-vel) f0-5)) + ) + (set! (-> self control unknown-word04) + (the-as uint (+ (the-as float (-> self control unknown-word04)) f26-1)) + ) + (set! f30-0 + (seek f30-0 (lerp-scale 0.0 1.0 (-> self control ctrl-xz-vel) 16384.0 32768.0) (* 2.0 (seconds-per-frame))) + ) + (set! f28-0 + (seek f28-0 (lerp-scale 1.0 0.0 (-> self control ctrl-xz-vel) 0.0 12288.0) (* 2.0 (seconds-per-frame))) + ) + (let ((v1-39 (-> self skel effect))) + (set! (-> v1-39 channel-offset) (if (< 0.5 f30-0) + 1 + 0 + ) + ) + ) + 0 + (ja :num! (loop! f26-1)) + ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + (ja :chan 2 :num! (chan 0) :frame-interp0 f28-0 :frame-interp1 f28-0) + ) + ) + #f + ) + :post target-mech-post + ) + +;; definition for function target-mech-punch-pick +;; INFO: Used lq/sq +(defbehavior target-mech-punch-pick target ((arg0 symbol)) + (local-vars (sv-144 control-info) (sv-160 float)) + (combo-tracker-method-12 + (-> self control unknown-combo-tracker00) + *null-vector* + *null-vector* + (the-as process #f) + (current-time) + ) + (let* ((s4-0 (get-trans self 3)) + (s2-0 (combo-tracker-method-13 + (-> self control unknown-combo-tracker00) + (-> self control send-attack-dest) + s4-0 + 32768.0 + (-> self control c-R-w fvec) + 65536.0 + ) + ) + (s5-0 (the-as art-element #f)) + ) + (when s2-0 + (let ((s3-0 (get-trans s2-0 3))) + (set! sv-144 (-> self control)) + (let ((s0-0 s3-0) + (s1-0 deg-diff) + ) + (set! sv-160 (y-angle sv-144)) + (let* ((a1-4 (vector-y-angle (vector-! (new 'stack-no-clear 'vector) s0-0 (-> sv-144 trans)))) + (f0-0 (s1-0 sv-160 a1-4)) + ) + (cond + ((>= f0-0 5461.3335) + (set! (-> self mech walk-anim-leg) 0) + 0 + ) + ((>= -5461.3335 f0-0) + (set! (-> self mech walk-anim-leg) 1) + ) + (else + (set! (-> self mech walk-anim-leg) 2) + ) + ) + ) + ) + (when (< (vector-vector-distance s3-0 s4-0) 32768.0) + (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) 'dont-face?) + (if (not (send-event-function s2-0 a1-6)) + (forward-up-nopitch->quaternion + (-> self control dir-targ) + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) s3-0 s4-0) 1.0) + (vector-y-quaternion! (new-stack-vector0) (-> self control dir-targ)) + ) + ) + ) + ) + ) + ) + (let ((v1-29 (-> self mech walk-anim-leg))) + (cond + ((zero? v1-29) + (set! (-> self mech walk-anim-leg) 1) + (set! s5-0 jakb-mech-punch-l-ja) + ((method-of-type impact-control initialize) + (the-as impact-control (-> self mech state-impact)) + (ppointer->process (-> self manipy)) + 7 + 6963.2 + (logior (collide-spec mech-punch) (-> self control root-prim prim-core collide-with)) + ) + ) + ((= v1-29 1) + (set! (-> self mech walk-anim-leg) 0) + (set! s5-0 jakb-mech-punch-r-ja) + ((method-of-type impact-control initialize) + (the-as impact-control (-> self mech state-impact)) + (ppointer->process (-> self manipy)) + 17 + 6963.2 + (logior (collide-spec mech-punch) (-> self control root-prim prim-core collide-with)) + ) + ) + ((= v1-29 2) + (set! (-> self mech walk-anim-leg) 0) + (set! s5-0 jakb-mech-punch-b-ja) + ((method-of-type impact-control initialize) + (the-as impact-control (-> self mech state-impact)) + (ppointer->process (-> self manipy)) + 39 + 11141.12 + (logior (collide-spec mech-punch) (-> self control root-prim prim-core collide-with)) + ) + ) + ((= v1-29 3) + (set! (-> self mech walk-anim-leg) 0) + (set! s5-0 jakb-mech-punch-u-ja) + ((method-of-type impact-control initialize) + (the-as impact-control (-> self mech state-impact)) + (ppointer->process (-> self manipy)) + 39 + 11141.12 + (logior (collide-spec mech-punch) (-> self control root-prim prim-core collide-with)) + ) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (if (zero? arg0) + (ja-no-eval :group! s5-0 :num! (seek!)) + (ja-no-eval :group! s5-0 :num! (seek!) :frame-num (ja-aframe 10.0 0)) + ) + ) + (-> self mech walk-anim-leg) + ) + +;; failed to figure out what this is: +(defstate target-mech-punch (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (cond + ((focus-test? self dangerous) + (case message + (('touched) + (if ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> block param 0)) + (-> self control) + (the-as uint 1920) + ) + (target-send-attack + proc + (-> self control danger-mode) + (the-as touching-shapes-entry (-> block param 0)) + (the-as int (-> self control target-attack-id)) + (the-as int (-> self control attack-count)) + (-> self control penetrate-using) + ) + (target-mech-handler proc argc message block) + ) + ) + (('impact-control) + (when (-> self control danger-mode) + (-> block param 1) + (let* ((gp-1 (the-as object (-> block param 3))) + (s5-1 (-> (the-as collide-query gp-1) best-other-tri collide-ptr)) + (s4-1 (if (type? s5-1 collide-shape-prim) + s5-1 + ) + ) + (s3-1 (if s4-1 + (-> (the-as collide-shape-prim s4-1) cshape process) + (the-as process-drawable #f) + ) + ) + (s5-2 (if (type? s3-1 process-focusable) + s3-1 + ) + ) + ) + (if (and s4-1 (and (or (and s5-2 (focus-test? (the-as process-focusable s5-2) dead)) + (when (send-event + (-> (the-as collide-shape-prim s4-1) cshape process) + 'attack + #f + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (-> self control target-attack-id)) + (damage 200.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode (-> self control danger-mode)) + (count (-> self control attack-count)) + (penetrate-using (penetrate touch punch mech mech-punch)) + (intersection (-> (the-as collide-query gp-1) best-other-tri intersect)) + ) + ) + ) + (set! (-> self control send-attack-dest) (process->handle s5-2)) + (set-time! (-> self control send-attack-time)) + #t + ) + ) + s5-2 + (focus-test? (the-as process-focusable s5-2) dead) + ) + ) + (set! (-> self mech forward-vel) 0.0) + (set! (-> self mech forward-vel) -40960.0) + ) + (when (or (not s5-2) (= (-> self control send-attack-time) (current-time))) + (cond + ((logtest? (-> *part-group-id-table* 12 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> (the-as collide-query gp-1) best-other-tri intersect quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 12)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> (the-as collide-query gp-1) best-other-tri intersect quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 12)) + ) + ) + (sound-play "mech-punch-hit" :position (+ (the-as uint gp-1) 48)) + (activate! *camera-smush-control* 1638.4 15 75 1.0 0.9 (-> *display* camera-clock)) + ) + ) + ) + ) + (else + (target-mech-handler proc argc message block) + ) + ) + ) + (else + (target-mech-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self control mod-surface) *mech-punch-mods*) + (set! (-> self mech state-impact? 0) #f) + (rot->dir-targ! (-> self control)) + ) + :exit (behavior () + (set! (-> *mech-punch-mods* turnvv) 0.0) + (set! (-> self mech state-impact? 0) #f) + (set-time! (-> self control last-running-attack-end-time)) + (target-exit) + (target-mech-exit) + ) + :code (behavior () + (set! (-> self mech forward-vel) (-> self control ctrl-xz-vel)) + 1.0 + (let ((s5-0 #f) + (gp-0 0) + (s4-0 30) + ) + (target-mech-punch-pick (the-as symbol gp-0)) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (when (and (not (focus-test? self dangerous)) + (let ((v1-10 (ja-group))) + (and v1-10 (or (= v1-10 jakb-mech-punch-l-ja) + (= v1-10 jakb-mech-punch-r-ja) + (= v1-10 jakb-mech-punch-b-ja) + (= v1-10 jakb-mech-punch-u-ja) + ) + ) + ) + (>= (ja-aframe-num 0) 12.0) + ) + (target-start-attack) + (target-danger-set! 'mech-punch #f) + ) + (when (and (cpad-pressed? (-> self control cpad number) square) (< gp-0 2)) + (let ((s3-0 (ja-group)) + (f30-0 (ja-aframe-num 0)) + ) + (if (or (and (= s3-0 jakb-mech-punch-l-ja) + (>= f30-0 2.0) + (>= (the float (+ (-> (the-as art-joint-anim jakb-mech-punch-l-ja) frames num-frames) -1)) (ja-frame-num 0)) + ) + (and (= s3-0 jakb-mech-punch-r-ja) + (>= f30-0 2.0) + (>= (the float (+ (-> (the-as art-joint-anim jakb-mech-punch-r-ja) frames num-frames) -1)) (ja-frame-num 0)) + ) + (and (= s3-0 jakb-mech-punch-b-ja) + (>= f30-0 2.0) + (>= (the float (+ (-> (the-as art-joint-anim jakb-mech-punch-b-ja) frames num-frames) -1)) (ja-frame-num 0)) + ) + (and (= s3-0 jakb-mech-punch-u-ja) + (>= f30-0 2.0) + (>= (the float (+ (-> (the-as art-joint-anim jakb-mech-punch-u-ja) frames num-frames) -1)) (ja-frame-num 0)) + ) + ) + (set! s5-0 #t) + ) + ) + ) + (when s5-0 + (let ((s3-1 (ja-group)) + (f30-2 (ja-aframe-num 0)) + ) + (when (or (and (= s3-1 jakb-mech-punch-l-ja) + (>= f30-2 21.0) + (>= (the float (+ (-> (the-as art-joint-anim jakb-mech-punch-l-ja) frames num-frames) -1)) (ja-frame-num 0)) + ) + (and (= s3-1 jakb-mech-punch-r-ja) + (>= f30-2 21.0) + (>= (the float (+ (-> (the-as art-joint-anim jakb-mech-punch-r-ja) frames num-frames) -1)) (ja-frame-num 0)) + ) + (and (= s3-1 jakb-mech-punch-b-ja) + (>= f30-2 21.0) + (>= (the float (+ (-> (the-as art-joint-anim jakb-mech-punch-b-ja) frames num-frames) -1)) (ja-frame-num 0)) + ) + (and (= s3-1 jakb-mech-punch-u-ja) + (>= f30-2 21.0) + (>= (the float (+ (-> (the-as art-joint-anim jakb-mech-punch-u-ja) frames num-frames) -1)) (ja-frame-num 0)) + ) + ) + (+! gp-0 1) + (target-mech-punch-pick (the-as symbol gp-0)) + (set! (-> self state-time) (+ (current-time) (seconds -0.465))) + (set! (-> self mech forward-vel) (fmax 0.0 (-> self mech forward-vel))) + (set! s4-0 159) + (set! s5-0 #f) + ) + ) + ) + (let ((v1-142 (- (current-time) (-> self state-time))) + (s3-2 #t) + (f30-4 1.0) + ) + (cond + ((< (-> self mech forward-vel) 0.0) + (seek! (-> self mech forward-vel) -0.04096 (* 122880.0 (seconds-per-frame))) + ) + ((let ((a0-43 (ja-group))) + (and a0-43 (or (= a0-43 jakb-mech-punch-b-ja) (= a0-43 jakb-mech-punch-u-ja))) + ) + (cond + ((< v1-142 (seconds 0.465)) + (set! s3-2 #f) + ) + ((< v1-142 (seconds 0.53)) + (set! (-> self mech forward-vel) (lerp-scale 40960.0 81920.0 (the float v1-142) 139.8 159.98999)) + ) + (else + (set! (-> self mech forward-vel) (lerp-scale 81920.0 0.0 (the float v1-142) 159.98999 300.0)) + ) + ) + ) + (else + (let ((a0-50 (ja-group))) + (cond + ((and a0-50 (= a0-50 jakb-mech-punch-l-ja)) + (cond + ((< v1-142 (seconds 0.465)) + (seek! (-> self mech forward-vel) 0.0 (* 20480.0 (seconds-per-frame))) + (set! s3-2 #f) + ) + ((< v1-142 (seconds 0.53)) + (set! (-> self mech forward-vel) (lerp-scale 20480.0 40960.0 (the float v1-142) 139.8 159.98999)) + ) + (else + (set! (-> self mech forward-vel) (lerp-scale 40960.0 0.0 (the float v1-142) 159.98999 300.0)) + ) + ) + ) + ((< v1-142 (seconds 0.465)) + (seek! (-> self mech forward-vel) 0.0 (* 20480.0 (seconds-per-frame))) + (set! s3-2 #f) + ) + ((< v1-142 (seconds 0.53)) + (set! (-> self mech forward-vel) (lerp-scale 20480.0 40960.0 (the float v1-142) 139.8 159.98999)) + ) + (else + (set! (-> self mech forward-vel) (lerp-scale 40960.0 0.0 (the float v1-142) 159.98999 300.0)) + ) + ) + ) + ) + ) + (set! s3-2 (and (time-elapsed? (-> self state-time) s4-0) (and (>= (-> self mech forward-vel) 0.0) s3-2))) + (set! (-> self mech state-impact? 0) s3-2) + (set-forward-vel (-> self mech forward-vel)) + (when (< 20480.0 (vector-length (-> self control transv))) + (do-effect (-> self skel effect) "effect-slide-poof" (ja-frame-num 0) 49) + (do-effect (-> self skel effect) "effect-slide-poof" (ja-frame-num 0) 43) + ) + (suspend) + (ja :num! (seek! max (* (-> self control current-surface align-speed) f30-4))) + ) + ) + ) + (go target-mech-stance) + ) + :post target-mech-post + ) + +;; failed to figure out what this is: +(defstate target-mech-falling (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (let ((v0-0 (target-mech-bonk-event-handler proc argc message block))) + (cond + (v0-0 + (empty) + v0-0 + ) + (else + (target-mech-handler proc argc message block) + ) + ) + ) + ) + :enter (behavior ((arg0 symbol)) + (set-time! (-> self state-time)) + (set! (-> self control mod-surface) *mech-jump-mods*) + (set! (-> self mech jump-thrust) 0.0) + (let* ((v1-4 *game-info*) + (v0-0 (+ (-> v1-4 attack-id) 1)) + ) + (set! (-> v1-4 attack-id) v0-0) + (set! (-> self control target-attack-id) v0-0) + ) + ) + :exit (behavior () + (set! (-> self mech jump-thrust) 0.0) + (set! (-> self mech thruster-flame-width) 0.0) + (set! (-> self mech thruster-flame-length) 0.0) + (target-exit) + (target-mech-exit) + ) + :trans (behavior () + (local-vars (a0-0 none)) + (if (logtest? (-> self control status) (collide-status on-surface)) + (go target-mech-hit-ground (the-as symbol a0-0)) + ) + (let ((f0-0 (target-move-dist (-> *TARGET-bank* stuck-time))) + (v1-9 (ja-group)) + ) + (when (if (and (and v1-9 (= v1-9 jakb-mech-jump-loop-ja)) + (< f0-0 (-> *TARGET-bank* stuck-distance)) + (and (time-elapsed? (-> self state-time) (seconds 2)) + (not (and *cheat-mode* (cpad-hold? (-> self control cpad number) r2))) + ) + ) + #t + ) + (logior! (-> self control status) (collide-status on-surface)) + (go target-mech-hit-ground 'stuck) + ) + ) + (let ((f30-0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + (let ((f0-2 (-> self mech jump-thrust-fuel))) + (cond + ((cpad-hold? (-> self control cpad number) x) + (cond + ((= f0-2 0.0) + (seek! (-> self mech jump-thrust) 0.0 (* 245760.0 (seconds-per-frame))) + ) + ((!= f0-2 (-> *TARGET-bank* mech-jump-thrust-fuel)) + (let ((f28-0 + (lerp-scale 122880.0 8192.0 (-> self mech jump-thrust-fuel) 600.0 (-> *TARGET-bank* mech-jump-thrust-fuel)) + ) + ) + (lerp-scale 409.6 8192.0 (-> self mech jump-thrust-fuel) 600.0 (-> *TARGET-bank* mech-jump-thrust-fuel)) + (seek! + (-> self mech jump-thrust) + (- (- (-> self control dynam gravity-length) f30-0) f28-0) + (* 8192000.0 (seconds-per-frame)) + ) + ) + ) + (else + (set! (-> self mech jump-thrust) 0.0) + ) + ) + (seek! (-> self mech jump-thrust-fuel) 0.0 (the float (- (current-time) (-> self clock old-frame-counter)))) + ) + (else + (seek! (-> self mech jump-thrust) 0.0 (* 491520.0 (seconds-per-frame))) + ) + ) + ) + (let ((v1-72 (new-stack-vector0))) + (let ((f0-29 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-72 (-> self control transv) (vector-float*! v1-72 (-> self control dynam gravity-normal) f0-29)) + ) + (let* ((f0-30 (vector-length v1-72)) + (f1-7 f0-30) + (f2-2 (+ f30-0 (* (-> self mech jump-thrust) (seconds-per-frame)))) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f2-2) + (vector-float*! v1-72 v1-72 (/ f0-30 f1-7)) + ) + ) + ) + ) + ) + :code (behavior ((arg0 symbol)) + (until #f + (cond + ((< 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + (let ((v1-7 (ja-group))) + (when (not (and v1-7 (= v1-7 jakb-mech-jump-thrust-ja))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! jakb-mech-jump-thrust-ja :num! min) + ) + ) + (suspend) + (ja :num! (loop! 0.75)) + ) + (else + (let ((v1-22 (ja-group))) + (when (not (and v1-22 (= v1-22 jakb-mech-jump-loop-ja))) + (ja-channel-push! 1 (seconds 0.5)) + (ja :group! jakb-mech-jump-loop-ja :num! min) + ) + ) + (suspend) + (ja :num! (loop!)) + ) + ) + ) + #f + ) + :post target-mech-post + ) + +;; failed to figure out what this is: +(defstate target-mech-jump (target) + :event (-> target-mech-falling event) + :enter (behavior ((arg0 float) (arg1 float) (arg2 surface)) + (set-time! (-> self state-time)) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (let* ((v1-4 *game-info*) + (a2-5 (+ (-> v1-4 attack-id) 1)) + ) + (set! (-> v1-4 attack-id) a2-5) + (set! (-> self control target-attack-id) a2-5) + ) + (set! (-> self mech jump-thrust) 0.0) + (init-var-jump arg0 arg1 #t #f (-> self control transv) 2.0) + (sound-play "mech-jump") + (set! (-> self control unknown-symbol03) (the-as float arg2)) + (set! (-> self control mod-surface) *mech-jump-mods*) + ) + :exit (-> target-mech-falling exit) + :trans (-> target-mech-falling trans) + :code (behavior ((arg0 float) (arg1 float) (arg2 surface)) + (let ((v1-2 (ja-group))) + (if (and v1-2 (= v1-2 jakb-mech-jump-land-ja)) + (ja-channel-push! 1 (seconds 0.5)) + (ja-channel-push! 1 (seconds 0.05)) + ) + ) + ((the-as (function none) (-> target-mech-falling code))) + ) + :post target-mech-post + ) + +;; failed to figure out what this is: +(defstate target-mech-hit-ground (target) + :event target-mech-handler + :enter (behavior ((arg0 symbol)) + (let ((v1-0 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-0 command) (sound-command set-param)) + (set! (-> v1-0 id) (-> self mech thrust-sound-id)) + (set! (-> v1-0 params volume) -4) + (set! (-> v1-0 auto-time) 48) + (set! (-> v1-0 auto-from) 2) + (set! (-> v1-0 params mask) (the-as uint 17)) + (-> v1-0 id) + ) + (set! (-> self mech jump-thrust-fuel) (-> *TARGET-bank* mech-jump-thrust-fuel)) + (set-time! (-> self state-time)) + (cond + ((= arg0 'stuck) + ) + (else + (target-land-effect) + ) + ) + (set! (-> self control last-running-attack-end-time) 0) + (set! (-> self control last-attack-end-time) 0) + (if (!= (-> self control ground-pat material) (pat-material ice)) + (delete-back-vel) + ) + (set! (-> self control mod-surface) *mech-stance-mods*) + (start-bobbing! + (-> self water) + (lerp-scale 0.0 4096.0 (-> self control ground-impact-vel) 40960.0 102400.0) + 600 + 1500 + ) + (activate! *camera-smush-control* 1638.4 15 75 1.0 0.9 (-> *display* camera-clock)) + ) + :exit (behavior () + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still)) + (target-mech-exit) + ) + :trans (behavior () + (if (and (cpad-pressed? (-> self control cpad number) square) (can-hands? #t)) + (go target-mech-punch) + ) + (when (time-elapsed? (-> self state-time) (seconds 0.25)) + (if (move-legs?) + (go target-mech-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-mech-jump + (-> *TARGET-bank* mech-jump-height-min) + (-> *TARGET-bank* mech-jump-height-max) + (the-as surface #f) + ) + ) + (if (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 r1) + ) + (go target-mech-carry-pickup) + ) + ) + (set-forward-vel 0.0) + ) + :code (behavior ((arg0 symbol)) + (target-hit-ground-anim #f (are-still?)) + (go target-mech-stance) + ) + :post target-mech-post + ) + +;; failed to figure out what this is: +(defstate target-mech-hit (target) + :event target-mech-handler + :exit (behavior () + ((-> target-hit exit)) + (target-mech-exit) + ) + :trans (behavior () + (when (= *cheat-mode* 'debug) + (when (and (not *pause-lock*) (cpad-hold? (-> self control cpad number) r2)) + (set-time! (-> self control time-of-last-debug-heal)) + (pickup-collectable! (-> self fact) (pickup-type health) 100.0 (the-as handle #f)) + (go target-mech-stance) + ) + ) + ) + :code (behavior ((arg0 symbol) (arg1 attack-info)) + (logclear! (-> self water flags) (water-flag jump-out)) + (set-time! (-> self state-time)) + (let ((gp-0 (-> self attack-info)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-4 gp-0)) + (set! (-> v1-4 attacker) (the-as handle #f)) + (set! (-> v1-4 mode) 'generic) + (set! (-> v1-4 shove-back) 10240.0) + (set! (-> v1-4 shove-up) 6144.0) + (set! (-> v1-4 angle) #f) + (set! (-> v1-4 trans quad) (-> self control trans quad)) + (set! (-> v1-4 control) 0.0) + (set! (-> v1-4 invinc-time) (-> *TARGET-bank* hit-invulnerable-timeout)) + ) + (case arg0 + (('shove) + (let ((v1-7 gp-0)) + (set! (-> v1-7 shove-back) (-> *TARGET-bank* smack-surface-dist)) + (set! (-> v1-7 shove-up) (-> *TARGET-bank* smack-surface-height)) + (set! (-> v1-7 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-10 (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-10) + '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-mech-stance) + ) + (else + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (go target-mech-death (-> gp-0 mode)) + ) + ) + ) + ) + (target-hit-effect gp-0) + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (go target-mech-death (-> gp-0 mode)) + ) + (else + (case (-> gp-0 mode) + (('burn 'burnup) + (sound-play "get-burned") + ) + ) + ) + ) + (set! (-> self control mod-surface) *smack-mods*) + (let ((v1-63 (ja-group))) + (when (not (and v1-63 (= v1-63 jakb-mech-hit-front-ja))) + (ja-channel-push! 1 (seconds 0.075)) + (ja :group! jakb-mech-hit-front-ja :num! min) + ) + ) + (target-hit-move gp-0 (target-hit-orient gp-0 s5-0) target-mech-falling-anim-trans 1.0) + ) + (go target-mech-hit-ground #f) + ) + :post (behavior () + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) + (vector-float*! + (-> self control dynam gravity) + (-> self control dynam gravity-normal) + (the-as float (-> self control dynam gravity-length)) + ) + (target-mech-post) + ) + ) + +;; failed to figure out what this is: +(defstate target-mech-death (target) + :event (-> target-death event) + :exit (behavior () + (set! (-> self mech stick-off) #f) + (target-mech-exit) + ((-> target-death exit)) + ) + :trans (-> target-mech-hit trans) + :code (behavior ((arg0 symbol)) + (set! (-> self mech stick-off) (the-as basic #t)) + (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) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (set-setting! 'process-mask 'set 0.0 (process-mask 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)) + ) + ) + (cond + ((or (= arg0 'none) (= arg0 'instant-death) (= arg0 'bot) (= arg0 'big-explosion)) + ) + ((= arg0 'grenade) + (sound-play "explosion") + ) + ((= arg0 'endlessfall) + (sound-play "mech-death-fall") + (set! (-> self control unknown-sound-id00) + (add-process *gui-control* *target* (gui-channel daxter) (gui-action play) "mechfall" -99.0 0) + ) + (sound-params-set! *gui-control* (-> self control unknown-sound-id00) #t -1 100 2 -1.0) + (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-58 (new-stack-vector0))) + (let ((f1-3 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-58 (-> self control transv) (vector-float*! v1-58 (-> self control dynam gravity-normal) f1-3)) + ) + (let* ((f1-4 (vector-length v1-58)) + (f2-1 f1-4) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f0-2) + (vector-float*! v1-58 v1-58 (/ f1-4 f2-1)) + ) + ) + ) + ) + (set! (-> self trans-hook) + (lambda :behavior target + () + (vector-seek! (-> self draw color-mult) *zero-vector* (seconds-per-frame)) + (let ((v1-2 (new-stack-vector0)) + (f0-2 (the-as number (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + ) + 0.0 + (vector-! + v1-2 + (-> self control transv) + (vector-float*! v1-2 (-> self control dynam gravity-normal) (the-as float f0-2)) + ) + (let* ((f1-2 (vector-length v1-2)) + (f2-0 f1-2) + ) + (if (< (the-as float (-> self control unknown-word04)) (the-as float f0-2)) + (set! f0-2 (-> self control unknown-word04)) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) (the-as float f0-2)) + (vector-float*! v1-2 v1-2 (/ f1-2 f2-0)) + ) + ) + ) + ((-> target-mech-hit trans)) + ) + ) + (ja-channel-push! 1 (seconds 0.3)) + (ja-no-eval :group! jakb-mech-jump-loop-ja :num! (loop! 0.5) :frame-num 0.0) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 0.8)) + (ja :group! jakb-mech-jump-loop-ja :num! (loop! 0.5)) + (suspend) + ) + ) + (remove-setting! 'mode-name) + ) + (else + (set! (-> self control mod-surface) *empty-mods*) + (rot->dir-targ! (-> self control)) + (remove-setting! 'slave-options) + (remove-setting! 'fov) + (remove-setting! 'head-offset) + (send-event *camera* 'set-dist #f #f) + (set! (-> self burn-proc) + (ppointer->handle + (process-spawn-function process process-drawable-burn-effect 1200 :to (ppointer->process (-> self manipy))) + ) + ) + (let ((gp-5 (if (zero? (rand-vu-int-count 2)) + jakb-mech-death-a-ja + jakb-mech-death-b-ja + ) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (let ((f30-0 (if (logtest? (-> self water flags) (water-flag under-water)) + 0.55 + 1.0 + ) + ) + ) + (ja-no-eval :group! gp-5 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (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 + (ppointer->process (-> self manipy)) + (-> *lightning-spec-id-table* 1) + lightning-probe-callback + (-> *part-id-table* 160) + 0 + 0 + 40960.0 + ) + ) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + (sound-play "mech-eject") + (cond + ((logtest? (-> *part-group-id-table* 236 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 236)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 236)) + ) + ) + (rot->dir-targ! (-> self control)) + (ja-post) + (let ((gp-9 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (cond + ((logtest? (-> self water flags) (water-flag under-water)) + (set! (-> gp-9 duration) (seconds 8)) + (set! (-> gp-9 gravity) -20480.0) + (set! (-> gp-9 rot-speed) 4.2) + (set-vector! (-> gp-9 fountain-rand-transv-lo) -20480.0 12288.0 -20480.0 1.0) + (set-vector! (-> gp-9 fountain-rand-transv-hi) 20480.0 24576.0 20480.0 1.0) + ) + (else + (set! (-> gp-9 gravity) -204800.0) + (set-vector! (-> gp-9 fountain-rand-transv-lo) -61440.0 12288.0 -61440.0 1.0) + (set-vector! (-> gp-9 fountain-rand-transv-hi) 61440.0 49152.0 61440.0 1.0) + ) + ) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-mech-explode" (the-as (pointer level) #f)) + 41 + gp-9 + *mech-exploder-params* + :name "joint-exploder" + :to (ppointer->process (-> self manipy)) + :unk 0 + ) + ) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (logior! (-> self target-flags) (target-flags tf6)) + (set! (-> self alt-cam-pos quad) (-> self control trans quad)) + (set! (-> self post-hook) target-no-move-post) + (ja-channel-set! 1) + (ja-no-eval :group! jakb-death-painful-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (set! (-> self control transv quad) (the-as uint128 0)) + (vector-seek! + (-> self draw color-mult) + (new 'static 'vector :x 0.5 :y 0.5 :z 0.5 :w 1.0) + (* 5.0 (seconds-per-frame)) + ) + (suspend) + (ja :num! (seek!)) + ) + (let ((gp-10 (current-time))) + (until (time-elapsed? gp-10 (seconds 2)) + (suspend) + ) + ) + ) + ) + (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)) + (if (!= (-> self game mode) 'play) + (go target-jump 16384.0 16384.0 (the-as surface #f)) + ) + (set-time! (-> self state-time)) + (sleep-code) + ) + :post target-mech-post + ) + +;; definition for function target-mech-carry-update +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defbehavior target-mech-carry-update target () + (carry-info-method-9 (-> self carry)) + (when (and (= (-> self control collide-mode) 'mech-carry) (< (-> self control collide-mode-transition) 1.0)) + (let ((gp-0 (new 'stack-no-clear 'collide-query)) + (s5-0 (new 'stack-no-clear 'inline-array 'sphere 1)) + ) + (dotimes (s4-0 1) + ((method-of-type sphere new) (the-as symbol (-> s5-0 s4-0)) sphere) + ) + (let ((f30-0 (seek (-> self control collide-mode-transition) 1.0 (* 0.1 (-> self clock time-adjust-ratio))))) + (set! (-> s5-0 0 quad) (-> self control collision-spheres 2 prim-core world-sphere quad)) + (set! (-> s5-0 0 r) (lerp-scale (-> *TARGET-bank* body-radius) 11468.8 f30-0 0.0 1.0)) + (let ((v1-17 gp-0)) + (set! (-> v1-17 best-dist) (the-as float s5-0)) + (set! (-> v1-17 best-other-prim) (the-as collide-shape-prim 1)) + (set! (-> v1-17 collide-with) (-> self control root-prim prim-core collide-with)) + (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 best-my-prim) (the-as collide-shape-prim #t)) + (set! (-> v1-17 action-mask) (collide-action solid)) + ) + (if (not (fill-and-probe-using-spheres *collide-cache* gp-0)) + (target-collide-set! 'mech-carry f30-0) + ) + ) + ) + ) + (send-event (handle->process (-> self carry other)) 'carry (-> self carry)) + (none) + ) + +;; definition for function target-mech-carry-post +(defbehavior target-mech-carry-post target () + (logior! (-> self focus-status) (focus-status carry)) + (target-mech-post) + (target-mech-carry-update) + (none) + ) + +;; failed to figure out what this is: +(defstate target-mech-carry-pickup (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (cond + (((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> block param 0)) + (-> self control) + (the-as uint 1920) + ) + (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) 'carry?) + (let ((a1-3 (send-event-function proc a1-2))) + (when a1-3 + (let ((f0-0 (distance-from-destination (-> self carry) (the-as carry-info a1-3)))) + (when (and (>= f0-0 0.0) (< f0-0 (-> self carry other-value))) + (set! (-> self carry other) (process->handle proc)) + (set! (-> self carry other-value) f0-0) + ) + ) + ) + ) + ) + #f + ) + (else + (target-mech-handler proc argc message block) + ) + ) + ) + (('change-mode 'end-mode) + #f + ) + (else + (target-mech-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self control mod-surface) *mech-pickup-mods*) + (set! (-> self mech stick-off) (the-as basic #t)) + (set-time! (-> self state-time)) + (set-forward-vel 0.0) + (set! (-> self carry other) (the-as handle #f)) + (set! (-> self carry other-value) 100000000000.0) + (set! (-> self carry max-distance) 32768.0) + (set! (-> self carry mode) (carry-mode carry mech-carry mech-drag)) + (carry-info-method-9 (-> self carry)) + ) + :exit (behavior () + (when (not (and (-> self next-state) (let ((v1-3 (-> self next-state name))) + (or (= v1-3 'target-mech-carry-stance) + (= v1-3 'target-mech-carry-walk) + (= v1-3 'target-mech-carry-drop) + (= v1-3 'target-mech-carry-throw) + (= v1-3 'target-mech-carry-jump) + (= v1-3 'target-mech-carry-falling) + (= v1-3 'target-mech-carry-hit-ground) + (= v1-3 'target-mech-carry-throw) + (= v1-3 'target-mech-carry-drag) + (= v1-3 'target-mech-shield) + ) + ) + ) + ) + (logclear! (-> self focus-status) (focus-status carry)) + (send-event (handle->process (-> self carry other)) 'drop (-> self carry) *null-vector*) + (target-collide-set! 'mech 0.0) + (target-exit) + ) + (set! (-> self mech stick-off) #f) + (target-mech-exit) + ) + :code (behavior () + (let ((f30-0 0.0) + (f28-0 0.0) + (gp-0 #f) + ) + (ja-channel-push! 2 1) + (ja :group! jakb-mech-carry-pickup-high-ja :num! min) + (ja :chan 1 :group! jakb-mech-carry-pickup-low-ja :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + (suspend) + (ja :num! (seek!)) + (ja :chan 1 :num! (chan 0)) + (target-danger-set! 'carry? #f) + (suspend) + (ja :num! (seek!)) + (ja :chan 1 :num! (chan 0)) + (format #t "carry picked ~A~%" (handle->process (-> self carry other))) + (let ((a1-9 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-9 from) (process->ppointer self)) + (set! (-> a1-9 num-params) 0) + (set! (-> a1-9 message) 'carry-info) + (let ((s5-1 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-9)))) + (cond + (s5-1 + (let* ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> s5-1 point) (-> self control trans))) + (s3-0 (new-stack-vector0)) + (f26-0 (vector-dot (-> self control local-normal) s4-1)) + ) + 0.0 + (vector-! s3-0 s4-1 (vector-float*! s3-0 (-> self control local-normal) f26-0)) + (let* ((f24-0 (vector-length s3-0)) + (f22-0 f24-0) + ) + (set! f28-0 (lerp-scale 1.0 0.0 f26-0 3072.0 7168.0)) + (vector+! + s4-1 + (vector-float*! s4-1 (-> self control local-normal) f26-0) + (vector-float*! s3-0 s3-0 (/ f24-0 f22-0)) + ) + ) + ) + (cond + ((logtest? (-> s5-1 mode) (carry-mode mech-drag)) + (sound-play "mech-drag-pikup") + (let ((s4-5 (vector-! (new 'stack-no-clear 'vector) (-> self carry point) (-> s5-1 point)))) + (set! gp-0 #t) + (vector-xz-normalize! s4-5 (-> s5-1 max-pull)) + (vector+! s4-5 s4-5 (-> s5-1 point)) + ) + (let* ((f26-1 (y-angle (-> s5-1 process 0 control))) + (f0-15 (vector-y-angle (vector-! (new 'stack-no-clear 'vector) (-> s5-1 point) (-> self carry point)))) + (f0-21 (the float (the int (* 0.000061035156 (+ 73728.0 (deg- f0-15 f26-1)))))) + (s5-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> self carry face-dir) (the int f0-21)) + (let ((f24-2 (the float (sar (shl (the int (* 16384.0 f0-21)) 48) 48)))) + (set! (-> self control unknown-word04) (the-as uint (+ f26-1 f24-2))) + (set-vector! s5-2 (sin (+ f26-1 f24-2)) 0.0 (cos (+ f26-1 f24-2)) 1.0) + ) + (forward-up-nopitch->quaternion + (-> self control dir-targ) + s5-2 + (vector-y-quaternion! (new-stack-vector0) (-> self control dir-targ)) + ) + ) + ) + (else + (sound-play "mech-drag-pikup") + (forward-up-nopitch->quaternion + (-> self control dir-targ) + (vector-normalize! (vector-! (new-stack-vector0) (-> s5-1 point) (-> self control trans)) 1.0) + (vector-y-quaternion! (new-stack-vector0) (-> self control dir-targ)) + ) + ) + ) + ) + (else + (sound-play "mech-pickup-1") + ) + ) + ) + ) + (target-danger-set! 'harmless #f) + (cond + (gp-0 + (ja-channel-push! 1 (seconds 0.01)) + (ja-no-eval :group! jakb-mech-drag-pickup-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :num! (seek! (ja-aframe 8.0 0))) + (while (not (ja-done? 0)) + (set! f30-0 (seek f30-0 f28-0 (* 5.0 (seconds-per-frame)))) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) + (suspend) + (ja-eval) + ) + ) + ) + (let ((s4-11 (new 'stack-no-clear 'vector)) + (s5-6 (new 'stack-no-clear 'vector)) + ) + (when (send-event (handle->process (-> self carry other)) 'pickup (-> self carry) s4-11 s5-6) + (target-collide-set! 'mech-carry 0.0) + (when gp-0 + (sound-play "mech-drag-grab") + (let ((s3-6 (vector-! (new 'stack-no-clear 'vector) s4-11 (-> self control trans))) + (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) 'carry-info) + (let ((s4-12 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-37)))) + (vector-flatten! s3-6 s3-6 s5-6) + (let ((f0-43 (vector-length s3-6))) + (when (< 1228.8 f0-43) + (vector-normalize! s3-6 (+ -1228.8 f0-43)) + (move-by-vector! (-> self control) s3-6) + (vector+! (-> s4-12 hold-trans) (-> s4-12 hold-trans) s3-6) + ) + ) + ) + ) + (set-yaw-angle-clear-roll-pitch! (-> self control) (the-as float (-> self control unknown-word04))) + (rot->dir-targ! (-> self control)) + (go target-mech-carry-drag) + ) + (sound-play "mech-servo-up") + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (set! f30-0 (seek f30-0 f28-0 (* 5.0 (seconds-per-frame)))) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) + (suspend) + (ja-eval) + ) + (go target-mech-carry-stance) + ) + ) + (cond + (gp-0 + (ja-no-eval :num! (seek! 0.0)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + (else + (ja-no-eval :num! (seek! (ja-aframe 11.0 0))) + (while (not (ja-done? 0)) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) + (suspend) + (ja-eval) + ) + (suspend) + (ja-no-eval :num! (seek! 0.0)) + (while (not (ja-done? 0)) + (ja :chan 1 :frame-interp0 f30-0 :frame-interp1 f30-0) + (suspend) + (ja-eval) + ) + ) + ) + ) + (go target-mech-stance) + ) + :post (behavior () + (target-mech-post) + (carry-info-method-9 (-> self carry)) + (target-mech-carry-update) + ) + ) + +;; failed to figure out what this is: +(defstate target-mech-carry-drop (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('change-mode 'end-mode) + #f + ) + (else + (target-mech-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self control mod-surface) *mech-walk-mods*) + (set-time! (-> self state-time)) + (set-forward-vel 0.0) + (set! (-> self mech stick-off) (the-as basic #t)) + ) + :exit (-> target-mech-carry-pickup exit) + :code (behavior () + (let ((f30-0 1.0) + (gp-1 (sound-play "mech-servo-down")) + ) + (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) 'carry-info) + (let ((a0-8 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-1)))) + (when a0-8 + (let ((s5-1 (new 'stack-no-clear 'vector))) + (set! (-> s5-1 quad) (-> a0-8 point quad)) + (set! (-> s5-1 y) (- (-> s5-1 y) (-> a0-8 process 0 control root-prim prim-core world-sphere w))) + (let ((s4-0 (new-stack-vector0)) + (f28-0 (vector-dot (-> self control local-normal) s5-1)) + ) + 0.0 + (vector-! s4-0 s5-1 (vector-float*! s4-0 (-> self control local-normal) f28-0)) + (let* ((f26-0 (vector-length s4-0)) + (f24-0 f26-0) + ) + (set! f30-0 (lerp-scale 1.0 0.0 f28-0 3072.0 7168.0)) + (vector+! + s5-1 + (vector-float*! s5-1 (-> self control local-normal) f28-0) + (vector-float*! s4-0 s4-0 (/ f26-0 f24-0)) + ) + ) + ) + ) + ) + ) + ) + (ja-channel-push! 2 (seconds 0.1)) + (ja :group! jakb-mech-carry-pickup-high-ja :num! max) + (ja :chan 1 :group! jakb-mech-carry-pickup-low-ja :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + (suspend) + (ja-no-eval :num! (seek! (ja-aframe 8.0 0))) + (while (not (ja-done? 0)) + (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) 'carry-info) + (let ((s5-5 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-10)))) + (when s5-5 + (if (< 20.0 (ja-aframe-num 0)) + (seek! (-> s5-5 grab-trans-blend) 1.0 (* 2.0 (seconds-per-frame))) + ) + (let ((s3-0 (-> s5-5 process 0 control)) + (s5-6 (new 'stack-no-clear 'collide-query)) + ) + (let ((s4-1 (new 'stack-no-clear 'inline-array 'sphere 1))) + (dotimes (s2-0 1) + ((method-of-type sphere new) (the-as symbol (-> s4-1 s2-0)) sphere) + ) + (set! (-> s4-1 0 quad) (-> s3-0 root-prim prim-core world-sphere quad)) + (let ((v1-66 s5-6)) + (set! (-> v1-66 best-dist) (the-as float s4-1)) + (set! (-> v1-66 best-other-prim) (the-as collide-shape-prim 1)) + (set! (-> v1-66 collide-with) (-> self control root-prim prim-core collide-with)) + (set! (-> v1-66 ignore-process0) #f) + (set! (-> v1-66 ignore-process1) #f) + (set! (-> v1-66 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-66 best-my-prim) (the-as collide-shape-prim #t)) + (set! (-> v1-66 action-mask) (collide-action solid)) + ) + ) + (format 0 "frame: ~f~%" (ja-frame-num 0)) + (when (and (fill-and-probe-using-spheres *collide-cache* s5-6) (< 12.5 (ja-frame-num 0))) + (sound-play "mech-setdown") + (let ((v1-73 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-73 command) (sound-command set-param)) + (set! (-> v1-73 id) gp-1) + (set! (-> v1-73 params volume) -4) + (set! (-> v1-73 auto-time) 48) + (set! (-> v1-73 auto-from) 2) + (set! (-> v1-73 params mask) (the-as uint 17)) + (-> v1-73 id) + ) + (set! gp-1 (sound-play "mech-servo-up")) + (let ((v1-77 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-77 command) (sound-command set-param)) + (set! (-> v1-77 id) gp-1) + (set! (-> v1-77 params volume) -4) + (set! (-> v1-77 auto-time) 192) + (set! (-> v1-77 auto-from) 2) + (set! (-> v1-77 params mask) (the-as uint 17)) + (-> v1-77 id) + ) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (go target-mech-carry-stance) + ) + ) + ) + ) + ) + (suspend) + (ja-eval) + ) + ) + (sound-play "mech-setdown") + (let ((v1-93 (vector-float*! (new 'stack-no-clear 'vector) (-> self control local-normal) 0.0))) + (vector+float*! v1-93 v1-93 (-> self control c-R-w fvec) 20480.0) + (send-event (handle->process (-> self carry other)) 'drop (-> self carry) v1-93) + ) + (target-collide-set! 'mech 0.0) + (ja-no-eval :num! (seek! 0.0)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (go target-mech-stance) + ) + :post (-> target-mech-carry-pickup post) + ) + +;; failed to figure out what this is: +(defstate target-mech-carry-stance (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('change-mode) + (case (-> block param 0) + (('falling) + (if (and (-> self next-state) (= (-> self next-state name) 'target-mech-carry-drag)) + #f + (go target-mech-carry-falling) + ) + ) + (('grab) + (if (not (-> block param 1)) + #t + (go target-mech-grab) + ) + ) + ) + ) + (else + (target-mech-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self control mod-surface) *mech-stance-mods*) + (set! (-> self control mod-surface turnvv) 20024.889) + (set! (-> self control did-move-to-pole-or-max-jump-height) 0.0) + (rot->dir-targ! (-> self control)) + (set-time! (-> self state-time)) + ) + :exit (behavior () + ((-> target-mech-carry-pickup exit)) + (rot->dir-targ! (-> self control)) + ) + :trans (behavior () + (if (and (move-legs?) + (and (< (fabs + (deg-diff (quaternion-y-angle (-> self control dir-targ)) (vector-y-angle (-> self control to-target-pt-xz))) + ) + 1820.4445 + ) + (time-elapsed? (-> self control time-of-last-zero-input) (seconds 0.05)) + ) + ) + (go target-mech-carry-walk) + ) + (if (and (cpad-pressed? (-> self control cpad number) r1) + (time-elapsed? (-> self carry pickup-time) (seconds 0.1)) + ) + (go target-mech-carry-drop) + ) + (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) + ) + enter-state + (let ((a0-24 (-> *TARGET-bank* mech-carry-jump-height-min)) + (a1-3 (-> *TARGET-bank* mech-carry-jump-height-max)) + ) + (go target-mech-carry-jump a0-24 a1-3) + ) + ) + (if (and (cpad-pressed? (-> self control cpad number) square) (can-hands? #t) (mech-can-throw?)) + (go target-mech-carry-throw) + ) + (fall-test (the-as (state object target) target-mech-carry-falling) (-> *TARGET-bank* fall-height)) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (when (not (and v1-2 (= v1-2 jakb-mech-carry-turn45-ja))) + (ja-channel-push! 2 (seconds 0.2)) + (ja :group! jakb-mech-carry-turn45-ja :dist 8192.0) + (ja :chan 1 :group! jakb-mech-carry-stance-ja :dist 0.0) + ) + ) + (let ((f30-0 0.0)) + (until #f + (let ((f28-0 (y-angle (-> self control)))) + (deg-diff f28-0 (quaternion-y-angle (-> self control dir-targ))) + (suspend) + (let ((f28-1 (* (deg-diff f28-0 (y-angle (-> self control))) (-> self clock frames-per-second)))) + (set! f30-0 (if (< 910.2222 (fabs f28-1)) + (seek f30-0 1.0 (* 16.0 (seconds-per-frame))) + (seek f30-0 0.0 (* 6.0 (seconds-per-frame))) + ) + ) + (let* ((f0-9 (current-cycle-distance (-> self skel))) + (v1-26 (if (= f0-9 0.0) + 0.0 + (/ f28-1 f0-9) + ) + ) + (f0-11 v1-26) + ) + (ja :num! (loop! f0-11)) + ) + ) + ) + (let ((v1-32 (-> self skel root-channel 1)) + (f0-13 (- 1.0 f30-0)) + ) + (set! (-> v1-32 frame-interp 1) f0-13) + (set! (-> v1-32 frame-interp 0) f0-13) + ) + ) + ) + #f + ) + :post target-mech-carry-post + ) + +;; failed to figure out what this is: +(defstate target-mech-carry-walk (target) + :event (-> target-mech-carry-stance event) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self control mod-surface) *mech-carry-walk-mods*) + (set! (-> self control unknown-word04) (the-as uint 0.0)) + ) + :exit (-> target-mech-carry-pickup exit) + :trans (behavior () + (let ((gp-0 (ja-group)) + (f0-0 (ja-aframe-num 0)) + ) + (when (if (or (and (= gp-0 jakb-mech-carry-walk-ja) (>= f0-0 5.5) (>= 9.5 f0-0)) + (and (= gp-0 jakb-mech-carry-walk-ja) (>= f0-0 20.5) (>= 24.5 f0-0)) + ) + #t + ) + (when (and (< 5.0 (the-as float (-> self control unknown-word04))) + (= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) + ) + (set-forward-vel 0.0) + (go target-mech-carry-stance) + ) + ) + ) + (if (and (cpad-pressed? (-> self control cpad number) r1) + (time-elapsed? (-> self carry pickup-time) (seconds 0.1)) + ) + (go target-mech-carry-drop) + ) + (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) + ) + enter-state + (let ((a0-24 (-> *TARGET-bank* mech-carry-jump-height-min)) + (a1-2 (-> *TARGET-bank* mech-carry-jump-height-max)) + ) + (go target-mech-carry-jump a0-24 a1-2) + ) + ) + (if (and (cpad-pressed? (-> self control cpad number) square) (can-hands? #t) (mech-can-throw?)) + (go target-mech-carry-throw) + ) + (fall-test (the-as (state object target) target-mech-carry-falling) (-> *TARGET-bank* fall-height)) + ) + :code (behavior () + (let ((f30-0 0.0)) + (let ((f28-0 (cond + ((zero? (-> self mech walk-anim-leg)) + (set! (-> self mech walk-anim-leg) 1) + 7.0 + ) + (else + (set! (-> self mech walk-anim-leg) 0) + 22.0 + ) + ) + ) + (v1-7 (ja-group)) + ) + (when (not (and v1-7 (= v1-7 jakb-mech-carry-walk-ja))) + (ja-channel-push! 2 (seconds 0.1)) + (ja :group! jakb-mech-carry-walk-ja + :num! (identity (ja-aframe f28-0 0)) + :dist (-> *TARGET-bank* mech-walk-carry-cycle-dist) + ) + (ja :chan 1 :group! jakb-mech-carry-stance-ja :dist 0.0) + ) + ) + (until #f + (if (< (-> self control ctrl-xz-vel) 4096.0) + (set-forward-vel 4096.0) + ) + (suspend) + (let* ((f0-4 (current-cycle-distance (-> self skel))) + (f28-1 (/ (-> self control ctrl-xz-vel) f0-4)) + ) + (set! (-> self control unknown-word04) + (the-as uint (+ (the-as float (-> self control unknown-word04)) f28-1)) + ) + (set! f30-0 + (seek f30-0 (lerp-scale 1.0 0.0 (-> self control ctrl-xz-vel) 0.0 8192.0) (* 2.0 (seconds-per-frame))) + ) + (ja :num! (loop! f28-1)) + ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + ) + ) + #f + ) + :post target-mech-carry-post + ) + +;; failed to figure out what this is: +(defstate target-mech-carry-drag (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('push) + (when (zero? (-> self control sliding-start-time)) + (set! (-> self control sliding-start-time) (+ (current-time) (the-as time-frame (-> block param 0)))) + (let ((v0-0 (the-as object #t))) + (set! (-> self control unknown-word04) (the-as uint v0-0)) + v0-0 + ) + ) + ) + (('drop) + (logclear! (-> *cpad-list* cpads (-> self control cpad number) button0-abs 0) (pad-buttons r1)) + (logclear! (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) (pad-buttons r1)) + (send-event (handle->process (-> self carry other)) 'drop (-> self carry) *null-vector*) + (target-collide-set! 'mech 0.0) + (go target-mech-stance) + ) + (else + ((-> target-mech-carry-stance event) proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self control sliding-start-time) 0) + (set! (-> self control unknown-word04) (the-as uint #f)) + (set! (-> self control mod-surface) *mech-carry-drag-mods*) + (set-forward-vel 0.0) + ) + :exit (behavior () + (set! (-> self mech jump-thrust) 0.0) + (set! (-> self mech thruster-flame-width) 0.0) + (set! (-> self mech thruster-flame-length) 0.0) + (let ((v1-3 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-3 command) (sound-command set-param)) + (set! (-> v1-3 id) (-> self mech thrust-sound-id)) + (set! (-> v1-3 params volume) -4) + (set! (-> v1-3 auto-time) 48) + (set! (-> v1-3 auto-from) 2) + (set! (-> v1-3 params mask) (the-as uint 17)) + (-> v1-3 id) + ) + (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 mech drag-sound-id)) + (set! (-> v1-5 params volume) -4) + (set! (-> v1-5 auto-time) 48) + (set! (-> v1-5 auto-from) 2) + (set! (-> v1-5 params mask) (the-as uint 17)) + (-> v1-5 id) + ) + ((-> target-mech-carry-pickup exit)) + ) + :trans (behavior () + (when (and (not (cpad-hold? (-> self control cpad number) r1)) + (time-elapsed? (-> self carry pickup-time) (seconds 0.5)) + ) + (sound-play "mech-drag-off") + (if (or (and (>= (-> self mech back-touch-time) (-> self state-time)) + (< (vector-vector-distance (-> self control trans) (-> self mech back-touch-trans)) 4096.0) + ) + (let ((gp-1 (new 'stack-no-clear 'collide-query))) + (let ((s5-1 (new 'stack-no-clear 'inline-array 'sphere 1))) + (dotimes (s4-0 1) + ((method-of-type sphere new) (the-as symbol (-> s5-1 s4-0)) sphere) + ) + (set! (-> s5-1 0 quad) (-> self control collision-spheres 0 prim-core world-sphere quad)) + (vector+float*! (the-as vector (-> s5-1 0)) (the-as vector (-> s5-1 0)) (-> self control c-R-w fvec) -4096.0) + (set! (-> s5-1 0 r) (-> self control collision-spheres 0 prim-core world-sphere w)) + (let ((v1-30 gp-1)) + (set! (-> v1-30 best-dist) (the-as float s5-1)) + (set! (-> v1-30 best-other-prim) (the-as collide-shape-prim 1)) + (set! (-> v1-30 collide-with) (-> self control root-prim prim-core collide-with)) + (set! (-> v1-30 ignore-process0) #f) + (set! (-> v1-30 ignore-process1) #f) + (set! (-> v1-30 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-30 best-my-prim) (the-as collide-shape-prim #t)) + (set! (-> v1-30 action-mask) (collide-action solid)) + ) + ) + (fill-and-probe-using-spheres *collide-cache* gp-1) + ) + ) + (send-event self 'push (seconds 0.5)) + (send-event self 'drop) + ) + ) + ) + :code (behavior () + (let ((f28-0 0.0) + (f30-0 0.0) + ) + (until #f + (let ((f0-2 + (* (vector-dot (-> self control to-target-pt-xz) (-> self control c-R-w fvec)) + (-> self control turn-to-magnitude) + ) + ) + (f26-0 0.0) + ) + (if (and (nonzero? (-> self control sliding-start-time)) (< (-> self control sliding-start-time) (current-time))) + (send-event self 'drop) + (set! f28-0 (cond + ((nonzero? (-> self control sliding-start-time)) + (let ((v1-17 (ja-group))) + (when (not (and v1-17 (= v1-17 jakb-mech-push-ja))) + (let ((v1-23 (ja-group))) + (if (and v1-23 (= v1-23 jakb-mech-pull-ja)) + (set! f26-0 (ja-aframe-num 0)) + ) + ) + (sound-play "mech-drag-push") + (ja-channel-push! 1 (seconds 0.3)) + (ja :group! jakb-mech-push-ja :num! (identity (ja-aframe f26-0 0)) :dist 16384.0) + ) + ) + (when (-> self control unknown-spool-anim00) + (set! (-> self control unknown-word04) (the-as uint #f)) + (set! f28-0 32768.0) + ) + (seek f28-0 0.0 (* 65536.0 (seconds-per-frame))) + ) + ((< 0.0 f0-2) + (let ((v1-47 (ja-group))) + (when (not (and v1-47 (= v1-47 jakb-mech-push-ja))) + (let ((v1-53 (ja-group))) + (if (and v1-53 (= v1-53 jakb-mech-pull-ja)) + (set! f26-0 (ja-aframe-num 0)) + ) + ) + (sound-play "mech-drag-push") + (ja-channel-push! 1 (seconds 0.3)) + (ja :group! jakb-mech-push-ja :num! (identity (ja-aframe f26-0 0)) :dist 16384.0) + ) + ) + (seek f28-0 49152.0 (* 24576.0 (seconds-per-frame))) + ) + ((< f0-2 0.0) + (let ((v1-71 (ja-group))) + (when (not (and v1-71 (= v1-71 jakb-mech-pull-ja))) + (let ((v1-77 (ja-group))) + (if (and v1-77 (= v1-77 jakb-mech-push-ja)) + (set! f26-0 (ja-aframe-num 0)) + ) + ) + (sound-play "mech-drag-pull") + (ja-channel-push! 1 (seconds 0.3)) + (ja :group! jakb-mech-pull-ja :num! (identity (ja-aframe f26-0 0)) :dist 16384.0) + ) + ) + (seek f28-0 -49152.0 (* 24576.0 (seconds-per-frame))) + ) + (else + (seek f28-0 0.0 (* 32768.0 (seconds-per-frame))) + ) + ) + ) + ) + ) + (set! f30-0 + (seek + f30-0 + (lerp-scale + 0.0 + 1.0 + (* (vector-vector-distance (-> self control trans) (-> self control trans-old-old)) + (-> self clock frames-per-second) + ) + 0.0 + 49152.0 + ) + (* 2.0 (seconds-per-frame)) + ) + ) + (sound-play-by-name + (static-sound-name "mech-drag-grind") + (-> self mech drag-sound-id) + (the int (* 1024.0 f30-0)) + 0 + 0 + (sound-group) + #t + ) + (set-forward-vel f28-0) + (let* ((f0-24 (current-cycle-distance (-> self skel))) + (f26-1 (/ f28-0 (* 2.0 f0-24))) + ) + (seek! + (-> self mech jump-thrust) + (lerp-scale 0.0 245760.0 (fabs f28-0) 0.0 49152.0) + (* 491520.0 (seconds-per-frame)) + ) + (let ((v1-114 (ja-group))) + (if (and v1-114 (or (= v1-114 jakb-mech-push-ja) (= v1-114 jakb-mech-pull-ja))) + (ja :num! (loop! f26-1)) + ) + ) + ) + (suspend) + 0 + ) + ) + #f + ) + :post target-mech-carry-post + ) + +;; failed to figure out what this is: +(defstate target-mech-carry-falling (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (let ((v0-0 (target-mech-bonk-event-handler proc argc message block))) + (cond + (v0-0 + (empty) + v0-0 + ) + (else + ((-> target-mech-carry-stance event) proc argc message block) + ) + ) + ) + ) + :enter (behavior () + (set! (-> self control mod-surface) *mech-carry-jump-mods*) + (set-time! (-> self state-time)) + ) + :exit (-> target-mech-carry-pickup exit) + :trans (behavior () + (if (logtest? (-> self control status) (collide-status on-surface)) + (go target-mech-carry-hit-ground #f) + ) + (when (if (and (< (target-move-dist (-> *TARGET-bank* stuck-time)) (-> *TARGET-bank* stuck-distance)) + (time-elapsed? (-> self state-time) (seconds 0.05)) + (not (and *cheat-mode* (cpad-hold? (-> self control cpad number) r2))) + ) + #t + ) + (logior! (-> self control status) (collide-status on-surface)) + (go target-mech-carry-hit-ground 'stuck) + ) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 jakb-mech-carry-jump-loop-ja)) + ) + (else + (ja-channel-push! 1 (seconds 0.33)) + (ja :group! jakb-mech-carry-jump-loop-ja) + (while (!= (-> self skel root-channel 0) (-> self skel channel)) + (suspend) + ) + ) + ) + ) + (ja-no-eval :group! jakb-mech-carry-jump-loop-ja :num! (loop!) :frame-num 0.0) + (until #f + (suspend) + (ja :group! jakb-mech-carry-jump-loop-ja :num! (loop!)) + ) + #f + ) + :post target-mech-carry-post + ) + +;; failed to figure out what this is: +(defstate target-mech-carry-hit-ground (target) + :event (-> target-mech-carry-falling event) + :enter (behavior ((arg0 symbol)) + (let ((v1-0 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-0 command) (sound-command set-param)) + (set! (-> v1-0 id) (-> self mech thrust-sound-id)) + (set! (-> v1-0 params volume) -4) + (set! (-> v1-0 auto-time) 48) + (set! (-> v1-0 auto-from) 2) + (set! (-> v1-0 params mask) (the-as uint 17)) + (-> v1-0 id) + ) + (rot->dir-targ! (-> self control)) + (cond + ((= arg0 'stuck) + ) + (else + (target-land-effect) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.3)) + ) + ) + (set! (-> self control last-running-attack-end-time) 0) + (set! (-> self control last-attack-end-time) 0) + (if (!= (-> self control ground-pat material) (pat-material ice)) + (delete-back-vel) + ) + (set! (-> self control mod-surface) *mech-stance-mods*) + (set! (-> self control mod-surface turnvv) 0.0) + (start-bobbing! + (-> self water) + (lerp-scale 0.0 4096.0 (-> self control ground-impact-vel) 40960.0 102400.0) + 600 + 1500 + ) + ) + :exit (behavior () + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still)) + ((-> target-mech-carry-pickup exit)) + ) + :trans (behavior () + (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) + ) + enter-state + (let ((a0-16 (-> *TARGET-bank* mech-carry-jump-height-min)) + (a1-2 (-> *TARGET-bank* mech-carry-jump-height-max)) + ) + (go target-mech-carry-jump a0-16 a1-2) + ) + ) + (if (and (!= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) + (let ((v1-26 (ja-group))) + (and (and v1-26 (= v1-26 jakb-mech-carry-jump-land-ja)) (>= (ja-aframe-num 0) 30.0)) + ) + ) + (go target-mech-carry-walk) + ) + (fall-test (the-as (state object target) target-mech-carry-falling) (-> *TARGET-bank* fall-height)) + ) + :code (behavior ((arg0 symbol)) + (target-hit-ground-anim #f (are-still?)) + (go target-mech-carry-stance) + ) + :post target-mech-carry-post + ) + +;; failed to figure out what this is: +(defstate target-mech-carry-jump (target) + :event (-> target-mech-carry-falling event) + :enter (behavior ((arg0 float) (arg1 float)) + (set-time! (-> self state-time)) + (init-var-jump arg0 arg1 #t #f (-> self control transv) 2.0) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (sound-play "mech-jump") + (set! (-> self control mod-surface) *mech-carry-jump-mods*) + (set! (-> self control unknown-float36) + (fmax 0.0 (fmin 1.0 (* 0.00004359654 (+ -11468.8 (-> self control ctrl-xz-vel))))) + ) + ) + :exit (behavior () + (rot->dir-targ! (-> self control)) + ((-> target-mech-carry-pickup exit)) + (set! (-> self mech jump-thrust) 0.0) + (set! (-> self mech thruster-flame-width) 0.0) + (set! (-> self mech thruster-flame-length) 0.0) + (target-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))) + ) + ) + ((-> target-mech-carry-falling trans)) + (mod-var-jump #t #f (cpad-hold? (-> self control cpad number) x) (-> self control transv)) + (cond + ((>= (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 0.0) + (set! (-> self mech jump-thrust) 0.0) + ) + (else + (set! (-> self mech jump-thrust) 0.0) + (set! (-> self mech thruster-flame-width) 0.0) + (set! (-> self mech thruster-flame-length) 0.0) + ) + ) + ) + :code (behavior ((arg0 float) (arg1 float)) + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! jakb-mech-carry-jump-ja :num! min) + (suspend) + (ja :group! jakb-mech-carry-jump-ja :num! (+!)) + (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-27 (and (< 0.0 f30-0) (< 0.0 f0-4)))) + (set! (-> gp-1 param 1) + (if v1-27 + (fmin (fmin 3.0 f0-4) (/ (* 5.0 f0-4) (the float (time-to-apex f30-0 -245760.0)))) + 1.8 + ) + ) + ) + (joint-control-channel-group-eval! gp-1 (the-as art-joint-anim #f) num-func-seek!) + ) + (suspend) + ) + (go target-mech-carry-falling) + ) + :post target-mech-carry-post + ) + +;; failed to figure out what this is: +(defstate target-mech-carry-throw (target) + :event (-> target-mech-carry-drop event) + :enter (behavior () + (set! (-> self control mod-surface) *mech-walk-mods*) + (set-time! (-> self state-time)) + (set-forward-vel 0.0) + (set! (-> self mech stick-off) (the-as basic #t)) + ) + :exit (-> target-mech-carry-pickup exit) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-mech-carry-throw-ja :num! (seek! (ja-aframe 16.0 0)) :frame-num 0.0) + (until (ja-done? 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) 'carry-info) + (let ((gp-1 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-3)))) + (if gp-1 + (seek! (-> gp-1 grab-trans-blend) 1.0 (* 4.0 (seconds-per-frame))) + ) + ) + ) + (suspend) + (ja :num! (seek! (ja-aframe 16.0 0))) + ) + (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) 'carry-info) + (let ((v1-30 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-7)))) + (when v1-30 + (let ((s4-0 (-> v1-30 process 0 control)) + (gp-3 (new 'stack-no-clear 'collide-query)) + ) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'sphere 1))) + (dotimes (s3-0 1) + ((method-of-type sphere new) (the-as symbol (-> s5-0 s3-0)) sphere) + ) + (set! (-> s5-0 0 quad) (-> s4-0 root-prim prim-core world-sphere quad)) + (let ((v1-38 gp-3)) + (set! (-> v1-38 best-dist) (the-as float s5-0)) + (set! (-> v1-38 best-other-prim) (the-as collide-shape-prim 1)) + (set! (-> v1-38 collide-with) (-> self control root-prim prim-core collide-with)) + (set! (-> v1-38 ignore-process0) #f) + (set! (-> v1-38 ignore-process1) #f) + (set! (-> v1-38 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-38 best-my-prim) (the-as collide-shape-prim #t)) + (set! (-> v1-38 action-mask) (collide-action solid)) + ) + ) + (when (fill-and-probe-using-spheres *collide-cache* gp-3) + (ja-no-eval :num! (seek! 0.0)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (go target-mech-carry-stance) + ) + ) + ) + ) + ) + (let ((v1-48 (vector-float*! (new 'stack-no-clear 'vector) (-> self control local-normal) 2048.0))) + (vector+float*! v1-48 v1-48 (-> self control c-R-w fvec) 131072.0) + (send-event (handle->process (-> self carry other)) 'drop (-> self carry) v1-48) + ) + (target-collide-set! 'normal 0.0) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (go target-mech-stance) + ) + :post (-> target-mech-carry-pickup post) + ) + +;; failed to figure out what this is: +(defstate target-mech-get-on (target) + :event target-generic-event-handler + :exit (behavior () + (target-mech-exit) + (set! (-> self mech stick-off) #f) + (set! (-> self neck flex-blend) 1.0) + (logclear! (-> self target-flags) (target-flags tf5)) + ) + :code (behavior ((arg0 handle)) + (logior! (-> self target-flags) (target-flags tf5)) + (ja-channel-set! 1) + (set! (-> self control mod-surface) *empty-mods*) + (send-event (ppointer->process (-> self manipy)) 'draw #t) + (set! (-> self neck flex-blend) 0.0) + (set! (-> self control unknown-vector37 quad) (-> self control trans quad)) + (set! (-> self control unknown-vector38 quad) (-> self control trans quad)) + (set! (-> self control unknown-vector39 quad) (-> self control quat quad)) + (set! (-> self control unknown-vector40 quad) (-> self control quat quad)) + (let* ((gp-1 (handle->process arg0)) + (v1-23 (if (type? gp-1 process-drawable) + gp-1 + ) + ) + ) + (when v1-23 + (set! (-> self control unknown-vector38 quad) (-> (the-as process-drawable v1-23) root trans quad)) + (set! (-> self control unknown-vector40 quad) (-> (the-as process-drawable v1-23) root quat quad)) + ) + ) + (set! (-> self mech mech-trans quad) (-> self control unknown-vector38 quad)) + (quaternion-copy! + (the-as quaternion (-> self mech mech-quat)) + (the-as quaternion (-> self control unknown-vector40)) + ) + (set! (-> self mech mech-scale quad) (-> self control scale quad)) + (set! (-> self mech stick-off) (the-as basic #t)) + (ja-no-eval :group! jakb-mech-get-on-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((f30-0 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 70.0 80.0)))) + (let ((f28-0 (lerp-scale 0.0 1.0 (ja-aframe-num 0) 70.0 80.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) + ) + ) + (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)) + (set! (-> self alt-cam-pos quad) (-> self control camera-pos quad)) + (suspend) + (ja :num! (seek!)) + ) + (go target-mech-stance) + ) + :post (behavior () + (target-no-move-post) + (target-mech-effect) + ) + ) + +;; failed to figure out what this is: +(defstate target-mech-get-up (target) + :event target-generic-event-handler + :exit (behavior () + (target-mech-exit) + (set! (-> self mech stick-off) #f) + (set! (-> self neck flex-blend) 1.0) + (logclear! (-> self target-flags) (target-flags tf5)) + ) + :code (behavior ((arg0 handle)) + (logior! (-> self target-flags) (target-flags tf5)) + (ja-channel-set! 1) + (set! (-> self control mod-surface) *empty-mods*) + (send-event (ppointer->process (-> self manipy)) 'draw #t) + (set! (-> self neck flex-blend) 0.0) + (set! (-> self control unknown-vector37 quad) (-> self control trans quad)) + (set! (-> self control unknown-vector38 quad) (-> self control trans quad)) + (set! (-> self control unknown-vector39 quad) (-> self control quat quad)) + (set! (-> self control unknown-vector40 quad) (-> self control quat quad)) + (let* ((gp-1 (handle->process arg0)) + (v1-23 (if (type? gp-1 process-drawable) + gp-1 + ) + ) + ) + (when v1-23 + (set! (-> self control unknown-vector38 quad) (-> (the-as process-drawable v1-23) root trans quad)) + (set! (-> self control unknown-vector40 quad) (-> (the-as process-drawable v1-23) root quat quad)) + ) + ) + (set! (-> self mech mech-trans quad) (-> self control unknown-vector38 quad)) + (quaternion-copy! + (the-as quaternion (-> self mech mech-quat)) + (the-as quaternion (-> self control unknown-vector40)) + ) + (set! (-> self mech mech-scale quad) (-> self control scale quad)) + (set! (-> self mech stick-off) (the-as basic #t)) + (ja-no-eval :group! jakb-mech-get-on-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((f30-0 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 70.0 80.0)))) + (let ((f28-0 (lerp-scale 0.0 1.0 (ja-aframe-num 0) 70.0 80.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) + ) + ) + (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)) + (set! (-> self alt-cam-pos quad) (-> self control camera-pos quad)) + (suspend) + (ja :num! (seek!)) + ) + (go target-mech-stance) + ) + :post (behavior () + (target-no-move-post) + (target-mech-effect) + ) + ) + +;; failed to figure out what this is: +(defstate target-mech-shield (target) + :event target-mech-handler + :enter (behavior () + (vector-reset! (-> self control transv)) + (set! (-> self mech stick-off) (the-as basic #t)) + (send-event (handle->process (-> self mech shield-handle)) 'enabled) + ) + :exit (behavior () + (set! (-> self mech stick-off) #f) + (send-event (handle->process (-> self mech shield-handle)) 'disabled) + (sound-stop (-> self mech shield-sound-id)) + ) + :trans (behavior () + (sound-play "mech-shieldloop" :id (-> self mech shield-sound-id)) + (if (or (not (handle->process (-> self mech shield-handle))) + (not (logtest? (-> *cpad-list* cpads (-> self control cpad number) button0-abs 0) (pad-buttons circle))) + ) + (go target-mech-stance) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-mech-get-off-ja :num! (seek! (ja-aframe 30.0 0)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 30.0 0))) + ) + (sleep-code) + ) + :post target-mech-post + ) + +;; failed to figure out what this is: +(defstate target-mech-get-off (target) + :event target-generic-event-handler + :exit (behavior () + ((-> target-mech-start exit)) + (logclear! (-> self target-flags) (target-flags tf5)) + ) + :code (behavior () + (logior! (-> self target-flags) (target-flags tf5)) + (set! (-> self control mod-surface) *empty-mods*) + (rot->dir-targ! (-> self control)) + (set-setting! 'slave-options 'clear 0.0 (cam-slave-options BIKE_MODE)) + (remove-setting! 'fov) + (remove-setting! 'head-offset) + (send-event *camera* 'set-dist #f #f) + (set! (-> self neck flex-blend) 0.0) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-mech-get-off-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (when (< 51.0 (ja-aframe-num 0)) + (logior! (-> self target-flags) (target-flags tf6)) + (vector<-cspace! (-> self alt-cam-pos) (joint-node jakb-lod0-jg Rankle)) + ) + (suspend) + (ja :num! (seek!)) + ) + (process-spawn + mech + :init mech-init + (-> self mech entity) + (-> self control trans) + (process->handle self) + (-> self mech shield-value) + :name "mech" + :to self + ) + (rot->dir-targ! (-> self control)) + (ja-post) + (let ((gp-1 (new 'stack-no-clear 'vector))) + (vector<-cspace! gp-1 (joint-node jakb-lod0-jg main)) + (+! (-> gp-1 y) -9011.2) + (move-to-point! (-> self control) gp-1) + ) + (send-event *camera* 'ease-in) + (ja-channel-set! 0) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (let ((v1-66 (new-stack-vector0))) + (let ((f0-13 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-66 (-> self control transv) (vector-float*! v1-66 (-> self control dynam gravity-normal) f0-13)) + ) + (let* ((f0-14 (vector-length v1-66)) + (f1-2 f0-14) + (f2-0 -49152.0) + (a0-36 (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f2-0) + (vector-float*! v1-66 v1-66 (/ f0-14 f1-2)) + ) + ) + ) + (go target-falling a0-36) + ) + ) + ) + :post (-> target-mech-get-on post) + ) + +;; failed to figure out what this is: +(defstate target-mech-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-mech-stance) + ) + ) + ) + (('clone-anim) + (go target-mech-clone-anim (process->handle (the-as process (-> block param 0)))) + ) + (else + (target-generic-event-handler proc argc message block) + ) + ) + ) + ) + ) + :enter (behavior () + (set! (-> self control mod-surface) *grab-mods*) + (set! (-> self neck flex-blend) 0.0) + (logior! (-> self target-flags) (target-flags tf2)) + (logior! (-> self focus-status) (focus-status grabbed)) + (set! (-> self mech stick-off) (the-as basic #t)) + (sound-stop (-> self mech engine-sound-id)) + (sound-stop (-> self mech thrust-sound-id)) + (sound-stop (-> self mech drag-sound-id)) + (sound-stop (-> self mech whine-sound-id)) + ) + :exit (behavior () + (target-effect-exit) + (set! (-> self mech stick-off) #f) + (logclear! (-> self target-flags) (target-flags tf2)) + (logclear! (-> self focus-status) (focus-status grabbed)) + (logclear! (-> self water flags) (water-flag jump-out)) + ((-> target-mech-start exit)) + ) + :code (-> target-mech-stance code) + :post target-mech-post + ) + +;; failed to figure out what this is: +(defstate target-mech-clone-anim (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (if (and (= message 'trans) (= (-> block param 0) 'restore)) + (set! (-> self control unknown-word04) (the-as uint #f)) + ) + ((-> target-mech-grab event) proc argc message block) + ) + :enter (-> target-clone-anim enter) + :exit (behavior () + (set! (-> self control draw-offset y) (the-as float (-> self control unknown-word04))) + (set! (-> self control cspace-offset y) (-> self control draw-offset y)) + (send-event (ppointer->process (-> self sidekick)) 'matrix #f) + ((-> target-clone-anim exit)) + ((-> target-mech-start exit)) + (vector-reset! (-> self control transv)) + ) + :code (behavior ((arg0 handle)) + (set! (-> self control unknown-word04) (the-as uint (-> self control draw-offset y))) + (set! (-> self control draw-offset y) 0.0) + (send-event (ppointer->process (-> self sidekick)) 'matrix 'play-anim) + (clone-anim arg0 #t "") + (go target-mech-stance) + ) + :post (behavior () + (vector+! (-> self mech mech-trans) (-> self control trans) (-> self control cspace-offset)) + (quaternion-copy! (the-as quaternion (-> self mech mech-quat)) (-> self control quat)) + (set! (-> self mech mech-scale quad) (-> self control scale quad)) + (target-no-ja-move-post) + ) + ) diff --git a/test/decompiler/reference/jak3/engine/target/mech/mech_REF.gc b/test/decompiler/reference/jak3/engine/target/mech/mech_REF.gc new file mode 100644 index 0000000000..0c8ea04c67 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/mech/mech_REF.gc @@ -0,0 +1,530 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type mech +(deftype mech (process-drawable) + ((root collide-shape-moving :override) + (extra-trans vector :inline) + (condition int32) + (shadow-backup shadow-geo) + (rider handle) + (shield-value float) + (nav-sphere-handle handle) + (probe-time time-frame) + ) + (:state-methods + wait-for-start + idle + (pickup (state mech)) + wait-for-return + ) + (:methods + (mech-method-24 (_type_) none) + ) + ) + +;; definition for method 3 of type mech +(defmethod inspect ((this mech)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Textra-trans: ~`vector`P~%" (-> this extra-trans)) + (format #t "~2Tcondition: ~D~%" (-> this condition)) + (format #t "~2Tshadow-backup: ~A~%" (-> this shadow-backup)) + (format #t "~2Trider: ~D~%" (-> this rider)) + (format #t "~2Tshield-value: ~f~%" (-> this shield-value)) + (format #t "~2Tnav-sphere-handle: ~D~%" (-> this nav-sphere-handle)) + (format #t "~2Tprobe-time: ~D~%" (-> this probe-time)) + (label cfg-4) + this + ) + +;; definition for method 24 of type mech +;; WARN: Return type mismatch int vs none. +(defmethod mech-method-24 ((this mech)) + (if (nonzero? (-> this part)) + (spawn (-> this part) (-> this root trans)) + ) + (update! (-> this sound)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate wait-for-start (mech) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack 'bonk) + (send-event proc 'target-mech-get-off (seconds 0.3)) + (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)) + ) + ) + ) + (the-as structure #f) + ) + (('touch) + (send-event proc 'target-mech-get-off (seconds 0.3)) + (send-shoves (-> self root) proc (the-as touching-shapes-entry (-> block param 0)) 0.7 6144.0 16384.0) + (the-as structure #f) + ) + (('trans) + (vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans)) + ) + (('shadow) + (cond + ((-> block param 0) + (let ((v0-2 (the-as structure (-> self shadow-backup)))) + (set! (-> self draw shadow) (the-as shadow-geo v0-2)) + v0-2 + ) + ) + (else + (set! (-> self draw shadow) #f) + (the-as structure #f) + ) + ) + ) + ) + ) + :exit (behavior () + (set! (-> self root root-prim prim-core action) (collide-action)) + (set! (-> self root penetrated-by) (the-as penetrate -1)) + ) + :code (behavior () + (go-virtual idle) + ) + ) + +;; failed to figure out what this is: +(defstate idle (mech) + :virtual #t + :event (-> (method-of-type mech wait-for-start) event) + :enter (behavior () + (set! (-> self nav-sphere-handle) (the-as handle #f)) + (let ((s5-0 (find-nearest-nav-mesh (-> self root trans) 8192.0))) + (when s5-0 + (let ((gp-0 (new 'stack-no-clear 'vector))) + (vector-z-quaternion! gp-0 (-> self root quat)) + (vector-normalize! gp-0 5120.0) + (vector+! gp-0 gp-0 (-> self root trans)) + (set! (-> self nav-sphere-handle) + (ppointer->handle + (process-spawn simple-nav-sphere #x46266666 gp-0 s5-0 -1 :name "simple-nav-sphere" :to self) + ) + ) + ) + ) + ) + ) + :exit (behavior () + (send-event (handle->process (-> self nav-sphere-handle)) 'die-fast) + ((-> (method-of-type mech wait-for-start) exit)) + ) + :code (behavior () + (change-parent self *entity-pool*) + (ja-channel-set! 1) + (ja :group! mech-mech-idle-ja) + (set! (-> self root root-prim prim-core action) (collide-action solid can-ride no-standon)) + (set! (-> self root penetrated-by) (penetrate)) + 0.0 + (let ((f30-0 20480.0)) + (until #f + (when (and (logtest? (-> self draw status) (draw-control-status on-screen)) + (time-elapsed? (-> self probe-time) (seconds 1)) + ) + (move-to-ground + (-> self root) + 8192.0 + 40960.0 + #t + (collide-spec backgnd obstacle hit-by-player-list hit-by-others-list pusher) + ) + (set-time! (-> self probe-time)) + ) + (when (and (and *target* (and (>= f30-0 (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (not (focus-test? *target* in-head pole light board mech dark)) + (can-display-query? self "mech" -99.0) + (-> *setting-control* user-current pilot) + ) + (let ((gp-0 + (new 'stack 'font-context *font-default-matrix* 32 320 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-31 gp-0)) + (set! (-> v1-31 width) (the float 340)) + ) + (let ((v1-32 gp-0)) + (set! (-> v1-32 height) (the float 80)) + ) + (let ((v1-33 gp-0) + (a0-19 (-> *setting-control* user-default language)) + ) + (set! (-> v1-33 scale) (if (or (= a0-19 (language-enum korean)) (= a0-19 (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) + ) + ) + (if (and (cpad-pressed? 0 triangle) (send-event *target* 'change-mode 'mech self (-> self shield-value))) + (go-virtual pickup (method-of-object self wait-for-return)) + ) + ) + (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 + ) + ) + (mech-method-24 self) + (suspend) + ) + ) + #f + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate pickup (mech) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('draw) + (ja-channel-set! 1) + (ja :group! mech-mech-idle-ja) + (set! (-> self root root-prim prim-core action) (collide-action solid can-ride no-standon)) + (set! (-> self root penetrated-by) (penetrate)) + (transform-post) + ) + (('trans) + (vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans)) + ) + (('touch 'attack 'bonk) + #f + ) + (('shadow) + (cond + ((-> block param 0) + (let ((v0-1 (the-as object (-> self shadow-backup)))) + (set! (-> self draw shadow) (the-as shadow-geo v0-1)) + v0-1 + ) + ) + (else + (set! (-> self draw shadow) #f) + #f + ) + ) + ) + ) + ) + :enter (behavior ((arg0 (state mech))) + (let ((t9-0 (-> arg0 enter))) + (if t9-0 + (t9-0) + ) + ) + ) + :code (behavior ((arg0 (state mech))) + (ja-channel-set! 0) + (ja-post) + (while (zero? (ja-group-size)) + (if (or (not *target*) (or (< 24576.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (focus-test? *target* teleporting) + ) + ) + (go arg0) + ) + (mech-method-24 self) + (suspend) + ) + (while (and *target* (focus-test? *target* mech)) + (mech-method-24 self) + (suspend) + ) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (seconds 1)) + (mech-method-24 self) + (suspend) + ) + ) + (go arg0) + ) + ) + +;; failed to figure out what this is: +(defstate wait-for-return (mech) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trans) + (vector+! (the-as vector (-> block param 0)) (-> self root trans) (-> self extra-trans)) + ) + (('shadow) + (cond + ((-> block param 0) + (let ((v0-1 (the-as structure (-> self shadow-backup)))) + (set! (-> self draw shadow) (the-as shadow-geo v0-1)) + v0-1 + ) + ) + (else + (set! (-> self draw shadow) #f) + (the-as structure #f) + ) + ) + ) + ) + ) + :code (behavior () + (ja-channel-set! 0) + (ja-post) + (cleanup-for-death self) + ) + ) + +;; definition for function mech-init +;; INFO: Used lq/sq +(defbehavior mech-init mech ((arg0 entity-actor) (arg1 matrix3) (arg2 handle) (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 ((v1-6 (new 'process 'collide-shape-prim-sphere s2-0 (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec obstacle obstacle-for-jak)) + (set! (-> v1-6 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-6 prim-core action) (collide-action solid can-ride no-standon)) + (set! (-> v1-6 transform-index) 0) + (set-vector! (-> v1-6 local-sphere) 0.0 6553.6 5324.8 6553.6) + (set! (-> s2-0 total-prims) (the-as uint 1)) + (set! (-> s2-0 root-prim) v1-6) + ) + (set! (-> s2-0 nav-radius) (* 0.75 (-> s2-0 root-prim local-sphere w))) + (let ((v1-9 (-> s2-0 root-prim))) + (set! (-> s2-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s2-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> self root) s2-0) + ) + (set! (-> self rider) arg2) + (when arg0 + (process-entity-set! self arg0) + (process-drawable-from-entity! self arg0) + (set-yaw-angle-clear-roll-pitch! (-> self root) (res-lump-float arg0 'rotoffset)) + ) + (when arg1 + (set! (-> self root trans quad) (-> arg1 vector 0 quad)) + (quaternion-copy! (-> self root quat) (the-as quaternion (-> arg1 vector 1))) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-mech" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self shadow-backup) (-> self draw shadow)) + (set! (-> self draw shadow-ctrl) *mech-shadow-control*) + (let ((v1-27 (-> self node-list data))) + (set! (-> v1-27 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!)) + (set! (-> v1-27 0 param1) (the-as basic (-> self root trans))) + (set! (-> v1-27 0 param2) (the-as basic (-> self extra-trans))) + ) + (set! (-> self condition) (res-lump-value arg0 'index int :time -1000000000.0)) + (set! (-> self fact) + (new 'process 'fact-info self (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc)) + ) + (set! (-> self shield-value) arg3) + (set! (-> self nav-sphere-handle) (the-as handle #f)) + (if (-> self entity) + (move-to-ground + (-> self root) + 8192.0 + 40960.0 + #t + (collide-spec backgnd obstacle hit-by-player-list hit-by-others-list pusher) + ) + ) + (set! (-> self sound) + (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) + (go-virtual idle) + (go-virtual wait-for-start) + ) + ) + +;; definition for method 11 of type mech +(defmethod init-from-entity! ((this mech) (arg0 entity-actor)) + (mech-init arg0 (the-as matrix3 #f) (the-as handle #f) 100.0) + ) + +;; definition of type mech-target +(deftype mech-target (process-drawable) + ((parent (pointer target) :override) + ) + (:state-methods + idle + active + ) + ) + +;; definition for method 3 of type mech-target +(defmethod inspect ((this mech-target)) + (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-mech-target mech mech-target-lod0-jg mech-target-idle-ja + ((mech-target-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; failed to figure out what this is: +(defstate idle (mech-target) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('look-at-point) + (set-time! (-> self state-time)) + (go-virtual active) + ) + ) + ) + :trans (behavior () + (if (and (and *target* (and (>= 98304.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (focus-test? *target* mech) + ) + (go-virtual active) + ) + ) + :code (behavior () + (while (< 0.0 (-> self root scale x)) + (seek! (-> self root scale x) 0.0 (* 8.0 (seconds-per-frame))) + (set! (-> self root scale y) (-> self root scale x)) + (ja-post) + (suspend) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (ja-post) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate active (mech-target) + :virtual #t + :event (-> (method-of-type mech-target idle) event) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (and (or (or (not *target*) (or (< 106496.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (focus-test? *target* teleporting) + ) + ) + (not (logtest? (focus-status mech) (-> *target* focus-status))) + ) + (time-elapsed? (-> self state-time) (seconds 10)) + ) + (go-virtual idle) + ) + ) + :code (behavior () + (sound-play "mech-target") + (let ((f30-0 0.0)) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (while (< (-> self root scale x) 1.0) + (seek! (-> self root scale x) 1.0 (* 8.0 (seconds-per-frame))) + (set! (-> self root scale y) (-> self root scale x)) + (set! f30-0 (seek f30-0 1.0 (* 2.0 (seconds-per-frame)))) + (ja :num! (loop! f30-0)) + (ja-post) + (suspend) + ) + (until #f + (set! f30-0 (seek f30-0 1.0 (* 0.25 (seconds-per-frame)))) + (ja :num! (loop! f30-0)) + (ja-post) + (suspend) + ) + ) + #f + ) + ) + +;; definition for function mech-target-init +;; INFO: Used lq/sq +(defbehavior mech-target-init mech ((arg0 vector) (arg1 quaternion) (arg2 entity-actor)) + (process-entity-set! self arg2) + (when (not (and (-> self level) (logtest? (level-flags lf16) (-> self level info level-flags)))) + (dotimes (v1-4 (-> *level* length)) + (let ((a0-7 (-> *level* level v1-4))) + (when (= (-> a0-7 status) 'active) + (when (logtest? (level-flags lf16) (-> a0-7 info level-flags)) + (set! (-> self level) a0-7) + (goto cfg-12) + ) + ) + ) + ) + ) + (label cfg-12) + (set! (-> self root) (the-as collide-shape-moving (new 'process 'trsqv))) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-copy! (-> self root quat) arg1) + (set! (-> self root scale x) 0.0) + (set! (-> self root scale y) 0.0) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-mech-target" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go-virtual wait-for-start) + ) + +;; definition for function mech-target-spawn +;; WARN: Return type mismatch (pointer process) vs (pointer mech-target). +(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/mech/target-mech_REF.gc b/test/decompiler/reference/jak3/engine/target/mech/target-mech_REF.gc new file mode 100644 index 0000000000..13355c113b --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/mech/target-mech_REF.gc @@ -0,0 +1,1875 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type mech-shield +(deftype mech-shield (shield-sphere) + () + ) + +;; definition for method 3 of type mech-shield +(defmethod inspect ((this mech-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 function mech-shield-init-by-other +;; INFO: Used lq/sq +(defbehavior mech-shield-init-by-other mech-shield ((arg0 shield-sphere-spawn-params)) + (set! (-> self level) (level-get *level* 'precura)) + (stack-size-set! (-> self main-thread) 128) + (set! (-> self sphere-size) (-> arg0 sphere-size)) + (set! (-> self owner) (-> arg0 owner)) + (set! (-> self track-joint) (-> arg0 track-joint)) + (set! (-> self offset-vec quad) (-> arg0 offset-vec quad)) + (init-collision! self) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-shield-sphere" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set-vector! (-> self root scale) (-> self sphere-size) (-> self sphere-size) (-> self sphere-size) 1.0) + (set! (-> self shield-type) (-> arg0 shield-type)) + (case (-> self shield-type) + (((shield-type shield-type-0)) + (set! (-> self heat-info damage-scalar) (/ 1.0 (the float (-> arg0 shield-strength)))) + (let ((s5-1 (new 'stack-no-clear 'shield-sphere-distort-spawn-params))) + (set! (-> s5-1 owner) (process->handle self)) + (set! (-> s5-1 sphere-size) (-> self sphere-size)) + (let ((s4-1 (the-as process #f))) + (let* ((s3-0 (get-process *default-dead-pool* shield-sphere-distort #x4000 1)) + (v1-22 (when s3-0 + (let ((t9-6 (method-of-type process activate))) + (t9-6 s3-0 self "process" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-0 shield-sphere-distort-init-by-other s5-1) + (-> s3-0 ppointer) + ) + ) + ) + (if v1-22 + (set! s4-1 (-> v1-22 0)) + ) + ) + (set! (-> self heat-info distort-handle) (process->handle s4-1)) + ) + ) + ) + (((shield-type shield-type-1)) + (set! (-> self toggle-info enable-time) (-> arg0 enable-time)) + (set! (-> self heat-info last-heat-time) (-> arg0 disable-time)) + ) + ) + (ja-no-eval :group! (ja-group) :num! (loop!) :frame-num 0.0) + (ja-post) + (logior! (-> self draw status) (draw-control-status disable-fog)) + (let ((gp-1 (handle->process (-> arg0 owner)))) + (when (if (type? gp-1 process-focusable) + gp-1 + ) + ) + ) + (set! (-> self event-hook) (-> (method-of-type shield-sphere shield-enabled) event)) + (init-and-go! self) + ) + +;; failed to figure out what this is: +(defstate shield-disabled (mech-shield) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (shield-event-handler self proc argc message block) + ) + :enter (behavior () + (toggle-shield self #f) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (shield-enabled-trans self) + (if (and (= (-> self shield-type) (shield-type shield-type-1)) + (time-elapsed? (-> self state-time) (-> self heat-info last-heat-time)) + ) + (go-virtual shield-enabled) + ) + ) + :code sleep-code + :post (behavior () + (shield-post self) + ) + ) + +;; definition for method 37 of type mech-shield +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this mech-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)) + (let ((v1-6 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-6 prim-core collide-as) (collide-spec obstacle impenetrable-obj)) + (set! (-> v1-6 prim-core action) (collide-action)) + (set-vector! (-> v1-6 local-sphere) 0.0 0.0 -4096.0 (+ 4096.0 (* 4096.0 (-> this sphere-size)))) + (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 15 of type hud-heatmeter +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-heatmeter)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + 256 + (the int (+ 25.0 (* -100.0 (-> this offset)))) + ) + (set! (-> this sprites 0 pos z) #xfffff0) + (set-as-offset-from! + (-> this sprites 1) + (the-as vector4w (-> this sprites)) + (+ (the int (* 0.128 (the float (-> this values 0 current)))) -63) + 1 + ) + (set! (-> this sprites 1 pos z) #xfffff0) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-heatmeter +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-heatmeter)) + (set! (-> this values 0 target) (the int (* 1000.0 (-> *game-info* distance)))) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-heatmeter +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-heatmeter)) + (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 (lookup-texture-by-id (new 'static 'texture-id :index #x2 :page #xa76))) + ) + (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 (lookup-texture-by-id (new 'static 'texture-id :index #x3 :page #xa76))) + ) + (set! (-> this sprites 1 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 1 scale-x) 1.8) + (set! (-> this sprites 1 scale-y) 1.8) + 0 + (none) + ) + +;; definition for symbol *mech-stance-mods*, type surface +(define *mech-stance-mods* + (new 'static 'surface + :name 'run + :turnv 18204262.0 + :turnvf 0.03 + :turnvv 40049.777 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :fric 0.3 + :nonlin-fric-dist 1.0 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 1.0 + :slope-down-factor 4.0 + :slope-slip-angle 1.0 + :impact-fric 1.0 + :bend-factor 1.0 + :bend-speed 1.0 + :slope-up-traction 1.0 + :mult-hook (lambda :behavior target + ((arg0 surface) (arg1 surface) (arg2 surface) (arg3 int)) + (case arg3 + ((1) + (if (= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) + (seek! (-> self control did-move-to-pole-or-max-jump-height) 0.0 (* 127431.11 (seconds-per-frame))) + (seek! + (-> self control did-move-to-pole-or-max-jump-height) + (* (-> self control turn-to-magnitude) (-> arg0 turnvv)) + (* 127431.11 (seconds-per-frame)) + ) + ) + (set! (-> arg0 turnvv) (-> self control did-move-to-pole-or-max-jump-height)) + (when (= (-> arg2 name) '*edge-surface*) + (set! (-> arg0 target-speed) 40960.0) + (set! (-> arg0 transv-max) 40960.0) + (set! (-> arg0 seek0) (* 1.6666 (-> arg2 seek0))) + (set! (-> arg0 seek90) (* 1.6666 (-> arg2 seek90))) + (set! (-> arg0 seek180) (* 1.6666 (-> arg2 seek180))) + ) + ) + ) + ) + :flags (surface-flag look-around no-turn-around) + ) + ) + +;; definition for symbol *mech-walk-mods*, type surface +(define *mech-walk-mods* + (new 'static 'surface + :name 'run + :turnv 32768.0 + :turnvf 120.0 + :turnvv 524288.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :vel-turn -1.0 + :transv-max 40960.0 + :target-speed 40960.0 + :seek0 1.6666 + :seek90 1.6666 + :seek180 1.0 + :fric 0.1 + :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 + :mult-hook (lambda :behavior target + ((arg0 surface) (arg1 surface) (arg2 surface) (arg3 int)) + (case arg3 + ((1) + (when (= (-> arg2 name) '*edge-surface*) + (let ((v1-5 (vector-flatten! + (new 'stack-no-clear 'vector) + (vector-negate! (new-stack-vector0) (-> self control dynam gravity-normal)) + (-> self control local-normal) + ) + ) + ) + (set! (-> arg0 vel-turn) 0.0) + (vector+float*! (-> self control transv) (-> self control transv) v1-5 (* 409600.0 (seconds-per-frame))) + ) + ) + ) + ) + ) + :flags (surface-flag look-around no-turn-around) + ) + ) + +;; definition for symbol *mech-jump-mods*, type surface +(define *mech-jump-mods* (new 'static 'surface + :name 'jump + :turnv 131072.0 + :turnvf 90.0 + :turnvv 18204.445 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 40960.0 + :target-speed 40960.0 + :seek0 0.3 + :seek90 0.3 + :seek180 0.3 + :fric 0.2 + :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 + :mode 'air + :flags (surface-flag no-turn-around air) + ) + ) + +;; definition for symbol *mech-punch-mods*, type surface +(define *mech-punch-mods* (new 'static 'surface + :name 'punch + :turnv 131072.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 91750.4 + :target-speed 122880.0 + :seek90 0.5 + :seek180 0.15 + :slip-factor 1.0 + :slide-factor 1.0 + :slope-up-factor 0.25 + :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 + :mode 'attack + :flags (surface-flag no-turn-around turn-to-pad attack) + ) + ) + +;; definition for symbol *mech-pickup-mods*, type surface +(define *mech-pickup-mods* (new 'static 'surface + :name 'run + :turnv 16384.0 + :turnvf 240.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :vel-turn -1.0 + :transv-max 12288.0 + :target-speed 12288.0 + :seek0 1.0 + :seek90 1.0 + :seek180 1.0 + :fric 0.5 + :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 look-around no-turn-around) + ) + ) + +;; definition for symbol *mech-carry-walk-mods*, type surface +(define *mech-carry-walk-mods* (new 'static 'surface + :name 'run + :turnv 25486.223 + :turnvf 96.0 + :turnvv 524288.0 + :turnvvf 30.0 + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :vel-turn -1.0 + :transv-max 12288.0 + :target-speed 36864.0 + :seek0 1.0 + :seek90 1.0 + :seek180 1.0 + :fric 0.5 + :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 look-around no-turn-around) + ) + ) + +;; failed to figure out what this is: +(set! (-> *mech-carry-walk-mods* mult-hook) (-> *mech-walk-mods* mult-hook)) + +;; definition for symbol *mech-carry-drag-mods*, type surface +(define *mech-carry-drag-mods* (new 'static 'surface + :name 'run + :tiltv 65536.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 12288.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 look-around no-turn-around) + ) + ) + +;; definition for symbol *mech-carry-jump-mods*, type surface +(define *mech-carry-jump-mods* (new 'static 'surface + :name 'jump + :turnv 131072.0 + :turnvf 90.0 + :turnvv 18204.445 + :turnvvf 30.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 36864.0 + :target-speed 36864.0 + :seek0 0.3 + :seek90 0.3 + :seek180 0.3 + :fric 0.2 + :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 + :mode 'air + :flags (surface-flag air) + ) + ) + +;; definition for function target-mech-falling-anim-trans +;; WARN: Return type mismatch int vs none. +(defbehavior target-mech-falling-anim-trans target () + 0 + (none) + ) + +;; definition for function target-mech-mech-effect +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior target-mech-mech-effect mech ((arg0 target)) + (when (!= (-> arg0 mech thruster-flame-length) 0.0) + (let ((f30-0 0.0)) + (if (!= (-> *setting-control* user-current under-water-pitch-mod) 0.0) + (set! f30-0 -2.0) + ) + (sound-play-by-name + (static-sound-name "mech-thrust") + (-> arg0 mech thrust-sound-id) + (the int (* 1024.0 (lerp-scale 0.3 1.0 (-> arg0 mech thruster-flame-length) 0.0 4096.0))) + (the int (* 1524.0 f30-0)) + 0 + (sound-group) + #t + ) + ) + (dotimes (s5-1 2) + (let* ((s3-1 (-> self node-list data (if (zero? s5-1) + 37 + 38 + ) + ) + ) + (s4-1 (vector<-cspace! (new 'stack-no-clear 'vector) s3-1)) + (a2-2 (vector-negate! (new 'stack-no-clear 'vector) (-> s3-1 bone transform uvec))) + ) + (mech-spawn-thruster + (-> arg0 mech) + s4-1 + a2-2 + (-> arg0 mech thruster-flame-width) + (-> arg0 mech thruster-flame-length) + ) + ) + ) + ) + (when (logtest? (water-flag touch-water) (-> arg0 water flags)) + (let ((f30-1 (-> arg0 water height))) + (let ((s5-2 (-> *part-id-table* 1045))) + (let ((v1-28 (get-field-spec-by-id s5-2 (sp-field-id spt-userdata)))) + (if v1-28 + (set! (-> v1-28 initial-valuef) f30-1) + ) + ) + (let ((t9-6 sp-launch-particles-var) + (a0-12 *sp-particle-system-2d*) + (a2-3 *launch-matrix*) + ) + (set! (-> a2-3 trans quad) (-> self root trans quad)) + (t9-6 a0-12 s5-2 a2-3 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + (let ((s5-3 (-> *part-id-table* 1048))) + (let ((v1-34 (get-field-spec-by-id s5-3 (sp-field-id spt-userdata)))) + (if v1-34 + (set! (-> v1-34 initial-valuef) f30-1) + ) + ) + (let ((t9-8 sp-launch-particles-var) + (a0-15 *sp-particle-system-2d*) + (a2-4 *launch-matrix*) + ) + (set! (-> a2-4 trans quad) (-> self root trans quad)) + (t9-8 a0-15 s5-3 a2-4 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + (let* ((s5-4 (-> *part-id-table* 1051)) + (v1-40 (get-field-spec-by-id s5-4 (sp-field-id spt-userdata))) + (s4-2 (new 'stack-no-clear 'vector)) + ) + (if v1-40 + (set! (-> v1-40 initial-valuef) f30-1) + ) + (let ((s3-2 (get-field-spec-by-id s5-4 (sp-field-id spt-num)))) + (if s3-2 + (set! (-> s3-2 initial-valuef) (lerp-scale 0.1 2.0 (-> arg0 control ctrl-xz-vel) 0.0 40960.0)) + ) + ) + (process-drawable-random-point! self s4-2) + (let ((t9-13 sp-launch-particles-var) + (a0-21 *sp-particle-system-2d*) + (a2-6 *launch-matrix*) + ) + (set! (-> a2-6 trans quad) (-> s4-2 quad)) + (t9-13 a0-21 s5-4 a2-6 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function mech-on-ground? +(defbehavior mech-on-ground? target () + (logtest? (-> self control status) (collide-status on-surface)) + ) + +;; definition for function target-mech-get-off? +(defbehavior target-mech-get-off? target () + (when (and (mech-on-ground?) + (< (-> self mech no-get-off-time) (current-time)) + (-> *setting-control* user-current pilot-exit) + ) + (let ((gp-0 (new 'stack-no-clear 'collide-query)) + (s4-0 (new 'stack-no-clear 'inline-array 'sphere 1)) + ) + (dotimes (s5-0 1) + ((method-of-type sphere new) (the-as symbol (-> s4-0 s5-0)) sphere) + ) + (let ((s5-1 (-> self node-list data 0 bone transform))) + (vector-matrix*! (-> s4-0 0) (new 'static 'vector :y 14336.0 :z 12288.0 :w 1.0) s5-1) + (set! (-> s4-0 0 r) 10240.0) + (let ((v1-11 gp-0)) + (set! (-> v1-11 best-dist) (the-as float s4-0)) + (set! (-> v1-11 best-other-prim) (the-as collide-shape-prim 1)) + (set! (-> v1-11 collide-with) (-> self control root-prim prim-core collide-with)) + (set! (-> v1-11 ignore-process0) #f) + (set! (-> v1-11 ignore-process1) #f) + (set! (-> v1-11 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-11 best-my-prim) (the-as collide-shape-prim #t)) + (set! (-> v1-11 action-mask) (collide-action solid)) + ) + (let ((s4-1 (fill-and-probe-using-spheres *collide-cache* gp-0))) + (when (not s4-1) + (vector-matrix*! (-> gp-0 start-pos) (new 'static 'vector :y 8192.0 :z 4096.0 :w 1.0) s5-1) + (set-vector! (-> gp-0 move-dist) 0.0 -40960.0 0.0 0.0) + (let ((v1-15 gp-0)) + (set! (-> v1-15 radius) 409.6) + (set! (-> v1-15 collide-with) (collide-spec backgnd obstacle hit-by-others-list pusher)) + (set! (-> v1-15 ignore-process0) self) + (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)) + ) + (set! s4-1 (< (fill-and-probe-using-line-sphere *collide-cache* gp-0) 0.0)) + ) + (if (and s4-1 (-> *setting-control* user-current pilot)) + (talker-spawn-func (-> *talker-speech* 48) *entity-pool* (target-pos 0) (the-as region #f)) + ) + (not s4-1) + ) + ) + ) + ) + ) + +;; definition for function target-mech-handler +;; INFO: Used lq/sq +(defbehavior target-mech-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object) (a0-19 symbol) (sv-96 target) (sv-112 process)) + (cond + ((and (= arg2 'query) (= (-> arg3 param 0) 'mode)) + 'mech + ) + (else + (case arg2 + (('end-mode) + (case (-> arg3 param 0) + (('mech) + enter-state + (process->handle arg0) + (go target-mech-get-off) + ) + ) + ) + (('change-mode) + (let ((v1-8 (-> arg3 param 0))) + (cond + ((= v1-8 'grab) + (when (not (focus-test? self dead)) + (if (not (-> arg3 param 1)) + #t + (go target-mech-grab) + ) + ) + ) + ((= v1-8 'normal) + enter-state + (process->handle arg0) + (go target-mech-get-off) + ) + ((begin (set! a0-19 'falling) (= v1-8 a0-19)) + (go target-mech-falling a0-19) + ) + ) + ) + ) + (('swim 'slide 'edge-grab) + #f + ) + (('clone-anim) + (go target-mech-clone-anim (process->handle (the-as process (-> arg3 param 0)))) + ) + (('touched) + (cond + ((logtest? (process-mask crate) (-> arg0 mask)) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer self)) + (set! (-> a1-1 num-params) 2) + (set! (-> a1-1 message) 'attack) + (set! (-> a1-1 param 0) (-> arg3 param 0)) + (set! (-> a1-1 param 1) + (the-as + uint + (static-attack-info :mask (vehicle-impulse-factor) ((id (-> self mech attack-id)) + (damage 2.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'mech) + (penetrate-using (-> self control penetrate-using)) + ) + ) + ) + ) + (set! v0-0 (send-event-function arg0 a1-1)) + ) + (when v0-0 + (let* ((v1-28 (-> self game)) + (a0-43 (+ (-> v1-28 attack-id) 1)) + ) + (set! (-> v1-28 attack-id) a0-43) + (set! (-> self mech attack-id) a0-43) + ) + ) + v0-0 + ) + (else + (target-standard-event-handler arg0 arg1 arg2 arg3) + ) + ) + ) + (('attack 'attack-or-shove 'attack-invinc) + (let ((s3-0 + (the-as object (mem-copy! (the-as pointer (-> self attack-info-rec)) (the-as pointer (-> arg3 param 1)) 168)) + ) + ) + (let ((s2-0 (the-as pointer s3-0)) + (s1-0 (method-of-type attack-info compute-intersect-info)) + (s0-0 (-> arg3 param 1)) + ) + (set! sv-96 self) + (set! sv-112 arg0) + (let ((a3-2 (if (type? sv-112 process-drawable) + sv-112 + ) + ) + (t0-0 (-> arg3 param 0)) + ) + (s1-0 (the-as attack-info s2-0) s0-0 sv-96 a3-2 (the-as touching-shapes-entry t0-0)) + ) + ) + (format 0 "info: ~A~%" (-> (the-as attack-info s3-0) mode)) + (let* ((v1-31 (-> (the-as attack-info s3-0) mode)) + (f30-0 (cond + ((= v1-31 'tar) + (set! (-> (the-as attack-info s3-0) id) (the-as uint 2)) + (* 100.0 (seconds-per-frame)) + ) + ((= v1-31 'melt) + (set! (-> (the-as attack-info s3-0) id) (the-as uint 2)) + (let ((s2-1 (if (logtest? (-> (the-as attack-info s3-0) mask) (attack-mask intersection)) + (-> (the-as attack-info s3-0) intersection) + (-> self control trans) + ) + ) + ) + (launch-particles (-> *part-id-table* 1053) s2-1) + (launch-particles (-> *part-id-table* 1055) s2-1) + ) + (* 100.0 (seconds-per-frame)) + ) + ((or (= v1-31 'burn) (= v1-31 'burnup)) + (set! (-> (the-as attack-info s3-0) id) (the-as uint 2)) + (if (logtest? (-> (the-as attack-info s3-0) mask) (attack-mask intersection)) + (-> (the-as attack-info s3-0) intersection) + (-> self control trans) + ) + (launch-particles (-> *part-id-table* 1053) (-> self control trans)) + (launch-particles (-> *part-id-table* 1055) (-> self control trans)) + (* 20.0 (seconds-per-frame)) + ) + ((= v1-31 'shock) + (let ((s2-2 (if (logtest? (-> (the-as attack-info s3-0) mask) (attack-mask intersection)) + (-> (the-as attack-info s3-0) intersection) + (-> self control trans) + ) + ) + ) + (launch-particles (-> *part-id-table* 1057) s2-2) + (launch-particles (-> *part-id-table* 1058) s2-2) + ) + (set! (-> (the-as attack-info s3-0) id) (the-as uint 2)) + 10.0 + ) + ((= v1-31 'explode) + (if (and (-> self next-state) (= (-> self next-state name) 'target-mech-shield)) + 0.0 + 4.0 + ) + ) + ((= v1-31 'grunt) + 1.0 + ) + ((= v1-31 'air) + 100.0 + ) + ((or (= v1-31 'endlessfall) (= v1-31 'crush) (= v1-31 'instant-death)) + 100.0 + ) + (else + (-> (the-as attack-info s3-0) damage) + ) + ) + ) + ) + (when (target-log-attack (the-as attack-info s3-0) 'background) + (case arg2 + (('attack 'attack-or-shove 'attack-invinc) + (if (not (or (logtest? (-> self target-flags) (target-flags tf2)) + (logtest? (game-secrets invulnerable) (-> self game secrets)) + ) + ) + (seek! (-> self mech shield-value) 0.0 f30-0) + ) + ) + ) + (if (and (= arg2 'attack-or-shove) (< 0.0 (-> self mech shield-value))) + (set! arg2 'shove) + ) + (if (= arg2 'attack-invinc) + (set! (-> self mech shield-value) 0.0) + ) + (if (or (= (-> self mech shield-value) 0.0) (= arg2 'shove)) + (target-attacked + arg2 + (the-as attack-info s3-0) + arg0 + (the-as touching-shapes-entry (-> arg3 param 0)) + target-mech-hit + ) + 'block + ) + ) + ) + ) + ) + (('shove) + (when (not (focus-test? self dead 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-mech-hit 'shove (-> self attack-info-rec)) + ) + ) + (('effect-control) + (if (string= (the-as string (-> arg3 param 0)) "target-mech-walk") + (sound-play-by-name + (static-sound-name "mech-walk") + (new-sound-id) + 1024 + (the int (* 1524.0 (lerp-scale -0.2 0.0 (-> self control ctrl-xz-vel) 12288.0 40960.0))) + 0 + (sound-group) + #t + ) + ) + ) + (('target-mech-get-off) + (set! v0-0 (+ (current-time) (the-as time-frame (-> arg3 param 0)))) + (set! (-> self mech no-get-off-time) (the-as time-frame v0-0)) + v0-0 + ) + (else + (target-standard-event-handler arg0 arg1 arg2 arg3) + ) + ) + ) + ) + ) + +;; definition for function target-mech-bonk-event-handler +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs object. +(defbehavior target-mech-bonk-event-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (when (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) + ) + (>= 409.6 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + (begin + (vector-normalize! + (vector-! + s4-0 + (the-as vector (-> self control collision-spheres 0 prim-core)) + (-> self control actor-contact-pt) + ) + 1.0 + ) + (< 0.01 (-> s4-0 y)) + ) + ) + (if (< 0.75 (-> s4-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))) + ) + ) + ) + (when (and (= (target-send-attack + arg0 + 'bonk + (the-as touching-shapes-entry (-> arg3 param 0)) + (the-as int (-> self control target-attack-id)) + (the-as int (-> self control attack-count)) + (penetrate touch bonk mech-bonk) + ) + 'bounce + ) + (not (logtest? (-> self focus-status) (focus-status dead hit))) + ) + (set! (-> self control last-trans-any-surf quad) (-> self control trans quad)) + (target-timed-invulnerable (seconds 0.1) self 1) + (cond + ((focus-test? self carry) + enter-state + (let ((a0-19 (-> *TARGET-bank* mech-carry-jump-height-min)) + (a1-8 (-> *TARGET-bank* mech-carry-jump-height-max)) + ) + (go target-mech-carry-jump a0-19 a1-8) + ) + ) + (else + (go + target-mech-jump + (-> *TARGET-bank* mech-jump-height-min) + (-> *TARGET-bank* mech-jump-height-max) + (the-as surface #f) + ) + ) + ) + ) + #f + ) + ) + ) + +;; definition for function mech-leg-ik-callback +;; INFO: Used lq/sq +;; WARN: Return type mismatch none vs object. +(defbehavior mech-leg-ik-callback target ((arg0 joint-mod-ik) (arg1 matrix) (arg2 matrix) (arg3 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 'vector))) + (set! (-> s5-0 quad) (-> arg3 quad)) + (let ((f0-1 (- (-> arg3 y) (-> (target-pos 0) y)))) + (if (< 6144.0 f0-1) + (set! f0-1 6144.0) + ) + (if (< f0-1 -6144.0) + (set! f0-1 -6144.0) + ) + (+! (-> arg0 user-position y) f0-1) + ) + (let ((f0-4 (- (-> arg3 y) (-> arg0 user-position y)))) + (seek! (-> arg0 user-float) f0-4 (* 40960.0 (seconds-per-frame))) + ) + (let* ((f28-0 (-> arg0 user-float)) + (f30-1 (lerp-scale 1.0 0.0 f28-0 0.0 12288.0)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (let ((v1-12 s5-0)) + (let ((a0-4 *up-vector*)) + (let ((a1-4 8192.0)) + (.mov vf7 a1-4) + ) + (.lvf vf5 (&-> a0-4 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 (&-> s3-0 quad) vf6) + (vector-float*! (new 'stack-no-clear 'vector) *up-vector* -16384.0) + (let ((s2-0 (new 'stack-no-clear 'vector))) + 0.0 + (let ((f0-11 (intersect-ray-plane s3-0 *up-vector* (-> arg0 user-position) *up-vector*)) + (a0-7 s2-0) + ) + (let ((v1-15 *up-vector*)) + (let ((a1-7 f0-11)) + (.mov vf7 a1-7) + ) + (.lvf vf5 (&-> v1-15 quad)) + ) + (.lvf vf4 (&-> s3-0 quad)) + (.add.x.vf vf6 vf0 vf0 :mask #b1000) + (.mul.x.vf acc vf5 vf7 :mask #b111) + (.add.mul.w.vf vf6 vf4 vf0 acc :mask #b111) + (.svf (&-> a0-7 quad) vf6) + ) + (let ((a0-8 s2-0)) + (let ((v1-16 *up-vector*)) + (let ((a1-8 (- f28-0))) + (.mov vf7 a1-8) + ) + (.lvf vf5 (&-> v1-16 quad)) + ) + (.lvf vf4 (&-> arg3 quad)) + (.add.x.vf 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) + ) + (let ((a1-9 s5-0)) + (let ((v1-17 s5-0)) + (let ((a0-10 (vector-! (new 'stack-no-clear 'vector) s2-0 s5-0))) + (let ((a2-6 (fmin 1.0 (* (-> arg0 user-blend) f30-1)))) + (.mov vf7 a2-6) + ) + (.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-9 quad) vf6) + ) + ) + ) + (set-ik-target! arg0 s5-0) + ) + ) + ) + +;; definition for function mech-update-ik +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior mech-update-ik target () + (local-vars (sv-720 vector)) + (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 'collide-query)) + (s5-0 (-> (the-as process-drawable (-> self parent 0)) root)) + ) + (let ((a1-0 (-> gp-0 bbox)) + (v1-2 (-> s5-0 trans)) + (a0-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-0 x) 10240.0) + (set! (-> a0-0 y) 10240.0) + (set! (-> a0-0 z) 10240.0) + (set! (-> a0-0 w) 1.0) + (vector-! (the-as vector a1-0) v1-2 a0-0) + ) + (let ((a1-2 (-> gp-0 bbox max)) + (v1-3 (-> s5-0 trans)) + (a0-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-1 x) 10240.0) + (set! (-> a0-1 y) 10240.0) + (set! (-> a0-1 z) 10240.0) + (set! (-> a0-1 w) 1.0) + (vector+! a1-2 v1-3 a0-1) + ) + (set! (-> gp-0 collide-with) (-> (the-as collide-shape s5-0) root-prim prim-core collide-with)) + (set! (-> gp-0 ignore-process0) #f) + (set! (-> gp-0 ignore-process1) #f) + (set! (-> gp-0 ignore-pat) (-> (the-as collide-shape s5-0) pat-ignore-mask)) + (fill-using-bounding-box *collide-cache* gp-0) + (dotimes (s4-0 2) + (let ((s3-0 (-> self mech-ik s4-0))) + #t + (set! (-> s3-0 callback) mech-leg-ik-callback) + (-> s3-0 shoulder-matrix-no-ik) + (let ((v1-13 (-> s3-0 elbow-matrix-no-ik)) + (s0-0 (new 'stack-no-clear 'vector)) + ) + (set! sv-720 (new 'stack-no-clear 'vector)) + (let ((a0-5 (-> *y-vector* quad))) + (set! (-> sv-720 quad) a0-5) + ) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (new 'stack-no-clear 'vector) + (new 'stack-no-clear 'vector) + (let ((s1-0 (new 'stack-no-clear 'vector))) + (let ((a1-6 s0-0)) + (let ((a0-8 (-> v1-13 trans))) + (let ((v1-14 (-> v1-13 uvec))) + (let ((a2-8 (-> s3-0 hand-dist))) + (.mov vf7 a2-8) + ) + (.lvf vf5 (&-> v1-14 quad)) + ) + (.lvf vf4 (&-> a0-8 quad)) + ) + (.add.x.vf 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) + ) + (let ((f0-11 + (lerp-scale 1.0 0.0 (- (-> s0-0 y) (-> (the-as collide-shape-moving s5-0) gspot-pos y)) 2048.0 12288.0) + ) + ) + (seek! (-> s3-0 user-blend) f0-11 (* 4.0 (seconds-per-frame))) + ) + (let ((a1-9 (-> gp-0 start-pos))) + (let ((v1-18 s0-0)) + (let ((a0-11 sv-720)) + (let ((a2-12 6144.0)) + (.mov vf7 a2-12) + ) + (.lvf vf5 (&-> a0-11 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) + ) + (let ((v1-19 (-> gp-0 move-dist)) + (f0-16 -20480.0) + ) + (vector-float*! v1-19 sv-720 f0-16) + ) + (let ((v1-21 gp-0)) + (set! (-> v1-21 radius) 4.096) + (set! (-> v1-21 collide-with) (-> gp-0 collide-with)) + (set! (-> v1-21 ignore-process0) #f) + (set! (-> v1-21 ignore-process1) #f) + (set! (-> v1-21 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-21 action-mask) (collide-action solid)) + ) + (let ((f30-0 (probe-using-line-sphere *collide-cache* gp-0))) + (cond + ((>= f30-0 0.0) + (set! (-> s1-0 quad) (-> gp-0 best-other-tri normal quad)) + (when (< 8192.0 (vector-vector-angle-safe *y-vector* s1-0)) + (let* ((a1-14 (vector-normalize! (vector-cross! (new 'stack-no-clear 'vector) *y-vector* s1-0) 1.0)) + (a2-14 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) a1-14 8192.0)) + ) + (vector-orient-by-quat! s1-0 *y-vector* a2-14) + ) + ) + (let ((a1-16 s2-0)) + (let ((v1-28 (-> gp-0 start-pos))) + (let ((a0-26 (-> gp-0 move-dist))) + (let ((a2-15 f30-0)) + (.mov vf7 a2-15) + ) + (.lvf vf5 (&-> a0-26 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-16 quad) vf6) + ) + (set! (-> s3-0 user-position quad) (-> s2-0 quad)) + (set! (-> s3-0 user-normal quad) (-> s1-0 quad)) + ) + (else + (set! (-> s0-0 y) (-> (target-pos 0) y)) + (set! (-> s3-0 user-position quad) (-> s0-0 quad)) + (set! (-> s3-0 user-normal quad) (-> *y-vector* quad)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for function target-mech-init +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defbehavior target-mech-init target ((arg0 handle) (arg1 float) (arg2 symbol)) + (local-vars + (sv-160 (function vector entity-actor skeleton-group vector manipy-options none :behavior manipy)) + (sv-176 vector) + (sv-192 entity-actor) + ) + (target-gun-end-mode #f) + (target-exit) + (when (zero? (-> self mech)) + (set! (-> self mech) (new 'process 'mech-info)) + (set! (-> self mech hud 0) (the-as handle #f)) + (set! (-> self mech shield-handle) (the-as handle #f)) + (set! (-> self mech engine-sound-id) (new-sound-id)) + (set! (-> self mech thrust-sound-id) (new-sound-id)) + (set! (-> self mech drag-sound-id) (new-sound-id)) + (set! (-> self mech whine-sound-id) (new-sound-id)) + (set! (-> self mech shield-sound-id) (new-sound-id)) + (set! (-> self mech mode-sound-bank) #f) + ) + (set! (-> self board latch?) #f) + (set! (-> self mech stick-lock) #f) + (set! (-> self mech stick-off) #f) + (set-time! (-> self mech unstuck-time)) + (set! (-> self mech stuck-count) 0) + (set-time! (-> self mech mech-start-time)) + (set! (-> self mech jump-thrust) 0.0) + (set! (-> self mech jump-thrust-fuel) (-> *TARGET-bank* mech-jump-thrust-fuel)) + (set! (-> self mech state-impact? 0) #f) + ((method-of-type impact-control initialize) + (the-as impact-control (-> self mech state-impact)) + self + -1 + 0.0 + (collide-spec) + ) + (set! (-> self mech shield-max) 100.0) + (set! (-> self mech shield-value) arg1) + (set! (-> self mech entity) (entity-by-type mech)) + (let ((v1-31 (handle->process arg0))) + (if v1-31 + (set! (-> self mech entity) (-> v1-31 entity)) + ) + ) + (when (not (and (-> self mech entity) (logtest? (level-flags lf16) (-> self mech entity extra level info level-flags))) + ) + (dotimes (v1-39 (-> *level* length)) + (let ((a0-18 (-> *level* level v1-39))) + (when (= (-> a0-18 status) 'active) + (when (logtest? (level-flags lf16) (-> a0-18 info level-flags)) + (let ((a0-20 (-> a0-18 entity data 0 entity))) + (when a0-20 + (set! (-> self mech entity) (the-as entity-actor a0-20)) + (goto cfg-22) + ) + ) + ) + ) + ) + ) + ) + (label cfg-22) + (let ((v1-44 (-> self mech))) + (set! (-> v1-44 particle-system-2d) *sp-particle-system-2d*) + (set! (-> v1-44 particle-system-3d) *sp-particle-system-3d*) + (set! (-> v1-44 part-quat) *particle-quat*) + (set! (-> v1-44 part-vel) *particle-vel*) + (set! (-> v1-44 part-thruster) (-> *part-id-table* 1037)) + (set! (-> v1-44 part-thruster-scale-x) (-> *part-id-table* 1037 init-specs 4)) + (set! (-> v1-44 part-thruster-scale-y) (-> *part-id-table* 1037 init-specs 5)) + (set! (-> v1-44 thruster-flame-width) 0.0) + (set! (-> v1-44 thruster-flame-length) 0.0) + ) + (set! (-> self control reaction) target-collision-reaction) + (set! (-> self control transv quad) (the-as uint128 0)) + (set! (-> self control ctrl-xz-vel) 0.0) + (logior! (-> self focus-status) (focus-status mech)) + (set! (-> self control bend-target) 0.0) + (let ((v1-54 (-> self node-list data))) + (set! (-> v1-54 0 param0) (the-as (function cspace transformq none) cspace<-transformq+world-trans!)) + (set! (-> v1-54 0 param1) (the-as basic (-> self control trans))) + (set! (-> v1-54 0 param2) (the-as basic (-> self control cspace-offset))) + ) + (target-collide-set! 'mech 0.0) + (set! (-> self control pat-ignore-mask) (new 'static 'pat-surface :noentity #x1 :nomech #x1)) + (logior! (-> self draw status) (draw-control-status no-draw-bounds)) + (set! (-> self draw shadow) #f) + (let ((s4-1 (-> self entity)) + (s3-0 (-> self level)) + ) + (process-entity-set! self (-> self mech entity)) + (let ((s2-0 (get-process *8k-dead-pool* manipy #x20000 1))) + (set! (-> self manipy) + (the-as + (pointer manipy) + (when s2-0 + (let ((t9-13 (method-of-type manipy activate))) + (t9-13 (the-as manipy s2-0) self "manipy" (the-as pointer #x70004000)) + ) + (let ((s1-0 run-function-in-process) + (s0-0 s2-0) + ) + (set! sv-160 manipy-init) + (set! sv-176 (-> self control trans)) + (set! sv-192 (-> self entity)) + (let ((t0-1 (art-group-get-by-name *level* "skel-mech" (the-as (pointer level) #f))) + (t1-0 #f) + (t2-0 0) + ) + ((the-as (function object object object object object object object none) s1-0) + s0-0 + sv-160 + sv-176 + sv-192 + t0-1 + t1-0 + t2-0 + ) + ) + ) + (-> s2-0 ppointer) + ) + ) + ) + ) + (set! (-> self entity) s4-1) + (set! (-> self level) s3-0) + ) + (when (-> self manipy) + (send-event + (ppointer->process (-> self manipy)) + 'trans-hook + (lambda :behavior target + () + (let ((v1-0 (ppointer->process (-> self parent)))) + (set! (-> self control trans quad) (-> (the-as target v1-0) mech mech-trans quad)) + (let ((a0-4 (-> (the-as target v1-0) mech mech-quat quad))) + (set! (-> self control quat quad) a0-4) + ) + (set! (-> self control scale quad) (-> (the-as target v1-0) mech mech-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 draw color-mult quad) a0-10) + ) + (let ((a0-12 (-> (the-as target v1-0) draw color-emissive quad))) + (set! (-> self draw color-emissive quad) a0-12) + ) + (let ((v0-0 (-> (the-as target v1-0) draw shadow-ctrl settings shadow-dir quad))) + (set! (-> self draw shadow-ctrl settings shadow-dir quad) v0-0) + v0-0 + ) + ) + ) + ) + (send-event + (ppointer->process (-> self manipy)) + 'post-hook + (lambda :behavior target + () + (let ((gp-0 (ppointer->process (-> self parent)))) + ((method-of-type impact-control update-from-cspace) + (the-as impact-control (-> (the-as target gp-0) mech state-impact)) + ) + (when (-> (the-as target gp-0) mech state-impact? 0) + (let ((a1-0 (new 'stack-no-clear 'collide-query))) + ((method-of-type impact-control impact-control-method-11) + (the-as impact-control (-> (the-as target gp-0) mech state-impact)) + a1-0 + (the-as process gp-0) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + ) + ) + (mech-update-ik) + (target-mech-mech-effect (the-as target gp-0)) + ) + ) + ) + (send-event (ppointer->process (-> self manipy)) 'anim-mode 'clone-anim) + (send-event (ppointer->process (-> self manipy)) 'sync #t) + (send-event + (ppointer->process (-> self manipy)) + 'eval + (lambda :behavior target + () + (set! (-> self state-hook) #f) + (set! (-> self draw shadow-ctrl) *mech-shadow-control*) + (set! (-> self mech-ik 0) (new 'process 'joint-mod-ik self 27 5283.84)) + (set! (-> self mech-ik 1) (new 'process 'joint-mod-ik self 33 5283.84)) + (dotimes (v1-3 2) + (let ((a0-5 (-> self mech-ik v1-3))) + (set! (-> a0-5 elbow-pole-vector-axis) (the-as uint 2)) + (set! (-> a0-5 elbow-rotation-axis) (the-as uint 0)) + (set! (-> a0-5 callback) mech-leg-ik-callback) + (logior! (-> a0-5 flags) (joint-mod-ik-flags elbow-trans-neg)) + ) + ) + (dotimes (gp-0 2) + (enable-set! (-> self mech-ik gp-0) #t) + ) + #f + ) + ) + ) + (logior! (-> self target-flags) (target-flags tf6)) + (set-setting! 'string-max-length 'low (meters 7) 0) + (set-setting! 'string-min-length 'low (meters 4) 0) + (set-setting! 'string-max-height 'low (meters 3.5) 0) + (set-setting! 'string-min-height 'low (meters 1.5) 0) + (set-setting! 'fov 'abs (degrees 75.0) 0) + (set-setting! 'head-offset 'abs (meters 4.5) 0) + (set! (-> self mech mode-sound-bank) (add-setting! 'mode-sound-bank 'modemech 0.0 0)) + (set! (-> self mech hud 0) + (ppointer->handle (process-spawn hud-heatmeter :init hud-init-by-other :name "hud-heatmeter" :to self)) + ) + (let ((s4-3 (new 'stack-no-clear 'shield-sphere-spawn-params))) + (set! (-> s4-3 owner) (process->handle self)) + (set! (-> s4-3 sphere-size) 3.75) + (set! (-> s4-3 track-joint) 3) + (set! (-> s4-3 enable-time) (seconds 0.1)) + (set! (-> s4-3 disable-time) (seconds 0.1)) + (set! (-> s4-3 shield-strength) 8) + (set! (-> s4-3 shield-type) (shield-type shield-type-0)) + (if (new 'static 'vector :z -4096.0 :w 1.0) + (set! (-> s4-3 offset-vec quad) (-> (new 'static 'vector :z -4096.0 :w 1.0) quad)) + (vector-reset! (-> s4-3 offset-vec)) + ) + (let ((s3-1 (the-as process #f))) + (let* ((s2-1 (get-process *default-dead-pool* mech-shield #x4000 1)) + (v1-129 (when s2-1 + (let ((t9-32 (method-of-type process activate))) + (t9-32 s2-1 self "process" (the-as pointer #x70004000)) + ) + (run-now-in-process s2-1 mech-shield-init-by-other s4-3) + (-> s2-1 ppointer) + ) + ) + ) + (if v1-129 + (set! s3-1 (-> v1-129 0)) + ) + ) + (cond + (s3-1 + (set! (-> self mech shield-handle) (process->handle s3-1)) + (send-event (handle->process (-> self mech shield-handle)) 'disabled) + ) + (else + ) + ) + ) + ) + (remove-exit) + (if arg2 + (go target-mech-stance) + (go target-mech-get-on arg0) + ) + (none) + ) + +;; definition for function target-mech-exit +;; INFO: Used lq/sq +(defbehavior target-mech-exit target () + (when (not (and (-> self next-state) + (let ((v1-3 (-> self next-state name))) + (or (= v1-3 'target-mech-stance) + (= v1-3 'target-mech-walk) + (= v1-3 'target-mech-jump) + (= v1-3 'target-mech-jump-jump) + (= v1-3 'target-mech-falling) + (= v1-3 'target-mech-hit-ground) + (= v1-3 'target-mech-punch) + (= v1-3 'target-mech-hit) + (= v1-3 'target-mech-death) + (= v1-3 'target-mech-carry-drag) + (= v1-3 'target-mech-carry-pickup) + (= v1-3 'target-mech-carry-drop) + (= v1-3 'target-mech-carry-stance) + (= v1-3 'target-mech-carry-walk) + (= v1-3 'target-mech-carry-jump) + (= v1-3 'target-mech-carry-falling) + (= v1-3 'target-mech-carry-hit-ground) + (= v1-3 'target-mech-carry-throw) + (= v1-3 'target-mech-get-off) + (= v1-3 'target-mech-get-off-jump) + (= v1-3 'target-mech-grab) + (= v1-3 'target-mech-clone-anim) + (= v1-3 'target-mech-shield) + ) + ) + ) + ) + (let ((v1-4 (-> self manipy))) + (when v1-4 + (deactivate (-> v1-4 0)) + (set! (-> self manipy) (the-as (pointer manipy) #f)) + ) + ) + (let ((a0-27 (handle->process (-> self mech shield-handle)))) + (if a0-27 + (deactivate a0-27) + ) + ) + (setting-control-method-14 *setting-control* (-> self mech mode-sound-bank)) + (set! (-> self mech mode-sound-bank) #f) + (logclear! (-> self draw status) (draw-control-status no-draw-bounds)) + (logclear! (-> self focus-status) (focus-status mech)) + (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)) + (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! 'sound-flava) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) + (let ((v1-50 (-> self node-list data))) + (set! (-> v1-50 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!)) + (set! (-> v1-50 0 param1) (the-as basic (-> self control trans))) + (set! (-> v1-50 0 param2) (the-as basic (-> self control cspace-offset))) + ) + (target-collide-set! 'normal 0.0) + (set! (-> self control reaction) target-collision-reaction) + (set! (-> self control pat-ignore-mask) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :board #x1) + ) + (sound-stop (-> self mech engine-sound-id)) + (sound-stop (-> self mech thrust-sound-id)) + (sound-stop (-> self mech drag-sound-id)) + (sound-stop (-> self mech whine-sound-id)) + (send-event (handle->process (-> self mech hud 0)) 'hide-and-die) + (set! (-> self draw shadow) (-> self shadow-backup)) + (set! (-> self control cspace-offset quad) (the-as uint128 0)) + (remove-setting! 'sound-flava) + (target-exit) + ) + (none) + ) + +;; definition for function target-mech-effect +;; WARN: Return type mismatch int vs none. +(defbehavior target-mech-effect target () + (sound-play "mech-pulse" :id (-> self mech engine-sound-id)) + (set! (-> self game distance) (/ (-> self mech shield-value) (-> self mech shield-max))) + 0 + (none) + ) + +;; definition for function target-mech-add-thrust +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defbehavior target-mech-add-thrust target () + (let ((s5-0 (-> self control target-transv)) + (gp-0 (-> self control transv-ctrl)) + ) + (set! (-> (new 'stack-no-clear 'vector) quad) (-> self control target-transv quad)) + (target-bend-vel-turn gp-0) + (target-add-slide-factor s5-0) + (let ((t9-2 vector-xz-normalize!) + (a0-5 (new-stack-vector0)) + ) + (set! (-> a0-5 quad) (-> s5-0 quad)) + (let ((s4-0 (t9-2 a0-5 1.0))) + (let ((t9-3 vector-xz-normalize!) + (a0-6 (new-stack-vector0)) + ) + (set! (-> a0-6 quad) (-> gp-0 quad)) + (let ((v1-7 (t9-3 a0-6 1.0))) + (set! (-> s4-0 y) 0.0) + (set! (-> v1-7 y) 0.0) + ) + ) + (let* ((f0-2 (-> s4-0 z)) + (v1-8 gp-0) + (f1-4 (sqrtf (+ (* (-> v1-8 x) (-> v1-8 x)) (* (-> v1-8 z) (-> v1-8 z))))) + (v1-10 s5-0) + (f0-11 + (cond + ((>= f1-4 (sqrtf (+ (* (-> v1-10 x) (-> v1-10 x)) (* (-> v1-10 z) (-> v1-10 z))))) + (let ((f0-3 (-> self control current-surface fric)) + (f1-5 1.0) + (v1-15 gp-0) + ) + (* f0-3 (fmax f1-5 (/ (sqrtf (+ (* (-> v1-15 x) (-> v1-15 x)) (* (-> v1-15 z) (-> v1-15 z)))) + (-> self control current-surface nonlin-fric-dist) + ) + ) + ) + ) + ) + ((>= f0-2 0.0) + (+ (* f0-2 (-> self control current-surface seek0)) (* (- 1.0 f0-2) (-> self control current-surface seek90))) + ) + (else + (+ (* (fabs f0-2) (-> self control current-surface seek180)) + (* (+ 1.0 f0-2) (-> self control current-surface seek90)) + ) + ) + ) + ) + (s4-1 vector-xz-normalize!) + (s3-0 gp-0) + (t9-4 seek) + (v1-30 gp-0) + ) + (s4-1 s3-0 (t9-4 + (sqrtf (+ (* (-> v1-30 x) (-> v1-30 x)) (* (-> v1-30 z) (-> v1-30 z)))) + (sqrtf (+ (* (-> s5-0 x) (-> s5-0 x)) (* (-> s5-0 z) (-> s5-0 z)))) + (* f0-11 (seconds-per-frame)) + ) + ) + ) + ) + ) + (set! (-> self control velocity-after-thrust) (vector-length gp-0)) + ) + (let ((gp-1 (new-stack-vector0))) + (vector-matrix*! gp-1 (-> self control transv-ctrl) (-> self control c-R-w)) + (vector-float*! gp-1 gp-1 0.5) + (vector+! gp-1 gp-1 (-> self control trans)) + (add-debug-text-sphere + *display-target-marks* + (bucket-id debug-no-zbuf1) + gp-1 + (meters 0.2) + "ltransv" + (new 'static 'rgba :g #xff :a #x80) + ) + ) + (none) + ) + +;; definition for function target-mech-collision +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior target-mech-collision target () + (cond + ((and (-> self next-state) (= (-> self next-state name) 'target-mech-carry-drag)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) (process->ppointer self)) + (set! (-> a1-0 num-params) 2) + (set! (-> a1-0 message) 'move) + (set! (-> a1-0 param 0) (the-as uint (-> self control transv))) + (set! (-> a1-0 param 1) (the-as uint s5-0)) + (let ((s3-0 (send-event-function (handle->process (-> self carry other)) a1-0)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-0 quad) (-> self control trans quad)) + (set! (-> (new 'stack-no-clear 'vector) quad) (-> self control transv quad)) + (let ((a2-1 (new 'stack-no-clear 'collide-query)) + (v1-18 (-> self control)) + ) + (set! (-> a2-1 collide-with) (-> v1-18 root-prim prim-core collide-with)) + (set! (-> a2-1 ignore-process0) self) + (set! (-> a2-1 ignore-process1) #f) + (set! (-> a2-1 ignore-pat) (-> v1-18 pat-ignore-mask)) + (set! (-> a2-1 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide v1-18 (-> v1-18 transv) a2-1 (meters 1)) + ) + (vector-! gp-0 (-> self control trans) s4-0) + (let* ((s2-0 (-> self control dynam gravity-normal)) + (f30-0 (- (vector-dot s2-0 gp-0) (vector-dot s2-0 s5-0))) + (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) 'carry-info) + (let* ((s1-0 (the-as carry-info (send-event-function (handle->process (-> self carry other)) a1-4))) + (f0-2 (distance-from-destination (-> self carry) s1-0)) + ) + (cond + ((not s3-0) + ) + ((>= f0-2 0.0) + (let ((v1-38 (vector-float*! (new 'stack-no-clear 'vector) s2-0 f30-0))) + (vector+! (-> s1-0 hold-trans) (-> s1-0 hold-trans) v1-38) + ) + (let ((v1-39 (new-stack-vector0))) + (let ((f0-4 (vector-dot (-> self control dynam gravity-normal) s5-0))) + 0.0 + (vector-! v1-39 s5-0 (vector-float*! v1-39 (-> self control dynam gravity-normal) f0-4)) + ) + (let ((f0-5 (vector-length v1-39))) + f0-5 + (let ((f0-6 f0-5) + (v1-42 (new-stack-vector0)) + ) + (let ((f1-6 (vector-dot (-> self control dynam gravity-normal) gp-0))) + 0.0 + (vector-! v1-42 gp-0 (vector-float*! v1-42 (-> self control dynam gravity-normal) f1-6)) + ) + (let ((f1-7 (vector-length v1-42))) + f1-7 + (when (< f0-6 f1-7) + (let ((v1-46 (new-stack-vector0)) + (f0-8 (vector-dot (-> self control dynam gravity-normal) gp-0)) + ) + 0.0 + (vector-! v1-46 gp-0 (vector-float*! v1-46 (-> self control dynam gravity-normal) f0-8)) + (let ((f1-11 (vector-length v1-46)) + (a0-43 (new-stack-vector0)) + ) + (let ((f2-3 (vector-dot (-> self control dynam gravity-normal) s5-0))) + 0.0 + (vector-! a0-43 s5-0 (vector-float*! a0-43 (-> self control dynam gravity-normal) f2-3)) + ) + (let ((f2-4 (vector-length a0-43))) + f2-4 + (let ((f2-5 f2-4)) + (vector+! + gp-0 + (vector-float*! gp-0 (-> self control dynam gravity-normal) f0-8) + (vector-float*! v1-46 v1-46 (/ f2-5 f1-11)) + ) + ) + ) + ) + ) + (let ((a1-25 (vector+! (new 'stack-no-clear 'vector) s4-0 gp-0))) + (move-to-point! (-> self control) a1-25) + ) + ) + ) + ) + ) + ) + ) + (else + (send-event self 'drop (seconds 0.5)) + ) + ) + ) + ) + ) + ) + ) + ) + (else + (let ((a2-17 (new 'stack-no-clear 'collide-query)) + (v1-54 (-> self control)) + ) + (set! (-> a2-17 collide-with) (-> v1-54 root-prim prim-core collide-with)) + (set! (-> a2-17 ignore-process0) self) + (set! (-> a2-17 ignore-process1) #f) + (set! (-> a2-17 ignore-pat) (-> v1-54 pat-ignore-mask)) + (set! (-> a2-17 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide v1-54 (-> v1-54 transv) a2-17 (meters 1)) + ) + ) + ) + (when (logtest? (-> self control status) (collide-status touch-wall)) + (let ((v1-61 (vector-! (new 'stack-no-clear 'vector) (-> self control wall-contact-pt) (-> self control trans)))) + (set! (-> v1-61 y) 0.0) + (when (< (vector-dot v1-61 (-> self control c-R-w fvec)) 0.0) + (set-time! (-> self mech back-touch-time)) + (set! (-> self mech back-touch-point quad) (-> self control wall-contact-pt quad)) + (set! (-> self mech back-touch-trans quad) (-> self control trans quad)) + ) + ) + ) + 0 + (none) + ) + +;; definition for function target-mech-real-post +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior target-mech-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 (-> self control pad-magnitude))) + (if (or (and (< 0.0 f28-0) + (< 0.3 (-> self control pad-magnitude)) + (< (vector-dot (-> self control pad-xz-dir) (-> self control last-pad-xz-dir)) 0.2) + (< f28-0 0.7) + ) + (-> self mech stick-off) + ) + (set! f28-0 0.0) + ) + (when (!= (-> self control force-turn-to-strength) 0.0) + (let ((f0-15 (fmin 1.0 (-> self control force-turn-to-strength)))) + (set! (-> self control force-turn-to-strength) f0-15) + (let ((a1-2 (vector-float*! + (new 'stack-no-clear 'vector) + (if (= f28-0 0.0) + *zero-vector* + s5-0 + ) + f28-0 + ) + ) + (a2-1 (vector-float*! + (new 'stack-no-clear 'vector) + (-> self control force-turn-to-direction) + (-> self control force-turn-to-speed) + ) + ) + ) + (vector-lerp! s5-0 a1-2 a2-1 f0-15) + ) + ) + (set! f28-0 (vector-length s5-0)) + (vector-normalize! s5-0 1.0) + ) + (turn-to-vector s5-0 f28-0) + ) + ) + (cond + ((and (logtest? (-> self control mod-surface flags) (surface-flag air)) + (not (logtest? (-> self control status) (collide-status on-surface))) + ) + (add-thrust) + ) + (else + (let* ((v1-51 (-> self control target-transv)) + (f0-20 (sqrtf (+ (* (-> v1-51 x) (-> v1-51 x)) (* (-> v1-51 z) (-> v1-51 z))))) + ) + (set-vector! (-> self control target-transv) 0.0 0.0 f0-20 1.0) + ) + (target-mech-add-thrust) + ) + ) + (add-gravity) + (do-rotations2) + (reverse-conversions (-> self control transv)) + (pre-collide-setup) + (target-mech-collision) + (bend-gravity) + (post-flag-setup) + ) + ) + (update-rates! (-> self clock) f30-0) + ) + (ja-post) + (joint-points) + (do-target-gspot) + (target-powerup-process) + (vector+! (-> self mech mech-trans) (-> self control trans) (-> self control cspace-offset)) + (quaternion-copy! (the-as quaternion (-> self mech mech-quat)) (-> self control quat)) + (set! (-> self mech mech-scale quad) (-> self control scale quad)) + (vector+! (-> self alt-cam-pos) (-> self control camera-pos) (new 'static 'vector :y 4096.0 :w 1.0)) + (set-time! (-> self mech mech-time)) + (target-mech-effect) + 0 + (none) + ) + +;; definition for function target-mech-post +(defbehavior target-mech-post target () + (target-mech-real-post) + (none) + ) diff --git a/test/decompiler/reference/jak3/engine/target/pilot-states_REF.gc b/test/decompiler/reference/jak3/engine/target/pilot-states_REF.gc new file mode 100644 index 0000000000..5bd9ae8b42 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/pilot-states_REF.gc @@ -0,0 +1,1174 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defstate target-pilot-start (target) + :event target-pilot-handler + :exit target-pilot-exit + :code (behavior ((arg0 handle) (arg1 symbol) (arg2 symbol)) + (target-pilot-init arg0 arg2) + (suspend) + (remove-exit) + (if arg1 + (go target-pilot-stance) + (go target-pilot-get-on) + ) + ) + :post target-post + ) + +;; definition for function target-pilot-bike-anim-loop +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior target-pilot-bike-anim-loop target () + (ja-channel-push! 3 (seconds 0.1)) + (ja :group! jakb-pilot-bike-turn-back-ja) + (ja :chan 1 :group! jakb-pilot-bike-turn-front-ja) + (ja :chan 2 :group! jakb-pilot-bike-up-down-ja) + (until #f + (let ((gp-0 (-> self pilot))) + (let ((f30-0 (* 5.0 (- 1.0 (-> gp-0 left-right-interp))))) + (ja :num-func num-func-identity :frame-num (ja-aframe f30-0 0)) + (let ((f0-3 (fmax 0.0 (fmin 1.0 (* 0.5 (+ 1.0 (* 1.42 (+ -0.3 (-> gp-0 front-back-interp))))))))) + (ja :chan 1 + :frame-interp0 f0-3 + :frame-interp1 f0-3 + :num-func num-func-identity + :frame-num (ja-aframe f30-0 1) + ) + ) + ) + (let ((f0-6 (* 5.0 (- 1.0 (-> gp-0 up-down-interp)))) + (s5-2 (-> self skel root-channel 2)) + ) + (let ((f1-7 (fabs (-> gp-0 up-down-interp)))) + (set! (-> s5-2 frame-interp 1) f1-7) + (set! (-> s5-2 frame-interp 0) f1-7) + ) + (set! (-> s5-2 num-func) num-func-identity) + (set! (-> s5-2 frame-num) (ja-aframe f0-6 2)) + ) + ) + (can-play-stance-amibent?) + (suspend) + ) + #f + (none) + ) + +;; definition for function target-pilot-car-anim-loop +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior target-pilot-car-anim-loop target () + (ja-channel-push! 3 (seconds 0.1)) + (ja :group! jakb-pilot-car-turn-back-ja) + (ja :chan 1 :group! jakb-pilot-car-turn-front-ja) + (ja :chan 2 :group! jakb-pilot-car-up-down-ja) + (until #f + (let ((gp-0 (-> self pilot))) + (let ((f30-0 (* 5.0 (+ 1.0 (-> gp-0 left-right-interp))))) + (ja :num-func num-func-identity :frame-num (ja-aframe f30-0 0)) + (let ((s5-1 (-> self skel root-channel 1))) + (let ((f0-3 (* 0.5 (+ 1.0 (-> gp-0 front-back-interp))))) + (set! (-> s5-1 frame-interp 1) f0-3) + (set! (-> s5-1 frame-interp 0) f0-3) + ) + (set! (-> s5-1 num-func) num-func-identity) + (set! (-> s5-1 frame-num) (ja-aframe f30-0 1)) + ) + ) + (let ((f0-6 (* 10.0 (- 1.0 (-> gp-0 up-down-interp)))) + (s5-2 (-> self skel root-channel 2)) + ) + (let ((f1-7 (fabs (-> gp-0 up-down-interp)))) + (set! (-> s5-2 frame-interp 1) f1-7) + (set! (-> s5-2 frame-interp 0) f1-7) + ) + (set! (-> s5-2 num-func) num-func-identity) + (set! (-> s5-2 frame-num) (ja-aframe f0-6 2)) + ) + ) + (can-play-stance-amibent?) + (suspend) + ) + #f + (none) + ) + +;; definition for function target-pilot-wcar-anim-loop +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior target-pilot-wcar-anim-loop target () + (ja-channel-push! 3 (seconds 0.1)) + (ja :group! jakb-pilot-wcar-turn-back-ja) + (ja :chan 1 :group! jakb-pilot-wcar-turn-front-ja) + (ja :chan 2 :group! jakb-pilot-car-up-down-ja) + (until #f + (let ((gp-0 (-> self pilot))) + (let ((f30-0 (* 5.0 (+ 1.0 (-> gp-0 left-right-interp))))) + (ja :num-func num-func-identity :frame-num (ja-aframe f30-0 0)) + (let ((s5-1 (-> self skel root-channel 1))) + (let ((f0-3 (* 0.5 (+ 1.0 (-> gp-0 front-back-interp))))) + (set! (-> s5-1 frame-interp 1) f0-3) + (set! (-> s5-1 frame-interp 0) f0-3) + ) + (set! (-> s5-1 num-func) num-func-identity) + (set! (-> s5-1 frame-num) (ja-aframe f30-0 1)) + ) + ) + (let ((f0-6 (* 10.0 (- 1.0 (-> gp-0 up-down-interp)))) + (s5-2 (-> self skel root-channel 2)) + ) + (let ((f1-7 (fabs (-> gp-0 up-down-interp)))) + (set! (-> s5-2 frame-interp 1) f1-7) + (set! (-> s5-2 frame-interp 0) f1-7) + ) + (set! (-> s5-2 num-func) num-func-identity) + (set! (-> s5-2 frame-num) (ja-aframe f0-6 2)) + ) + ) + (can-play-stance-amibent?) + (suspend) + ) + #f + (none) + ) + +;; definition for function target-pilot-glider-anim-loop +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior target-pilot-glider-anim-loop target () + (ja-channel-push! 2 (seconds 0.1)) + (ja :group! jakb-pilot-glider-turn-back-ja) + (ja :chan 1 :group! jakb-pilot-glider-turn-front-ja) + (until #f + (let* ((gp-0 (-> self pilot)) + (f30-0 (* 5.0 (- 1.0 (-> gp-0 left-right-interp)))) + ) + (ja :num-func num-func-identity :frame-num (ja-aframe f30-0 0)) + (let ((s5-1 (-> self skel root-channel 1))) + (let ((f0-3 (* 0.5 (+ 1.0 (-> gp-0 front-back-interp))))) + (set! (-> s5-1 frame-interp 1) f0-3) + (set! (-> s5-1 frame-interp 0) f0-3) + ) + (set! (-> s5-1 num-func) num-func-identity) + (set! (-> s5-1 frame-num) (ja-aframe f30-0 1)) + ) + ) + (can-play-stance-amibent?) + (suspend) + ) + #f + (none) + ) + +;; definition for function target-daxter-pilot-car-anim-loop +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior target-daxter-pilot-car-anim-loop target () + (ja-channel-push! 3 (seconds 0.1)) + (ja :group! jakb-wings-lightjak-stance-ja) + (ja :chan 1 :group! jakb-wings-lightjak-get-on-land-ja) + (ja :chan 2 :group! jakb-wings-lightjak-swoop-fall-loop-ja) + (until #f + (when (or (-> self pilot jumping?) (let ((v1-14 (ja-group))) + (and v1-14 (= v1-14 jakb-wings-lightjak-swoop1-ja)) + ) + ) + (let ((v1-20 (ja-group))) + (if (not (and v1-20 (= v1-20 jakb-wings-lightjak-swoop1-ja))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (ja :group! jakb-wings-lightjak-swoop1-ja :num! (seek!)) + (when (ja-done? 0) + (ja-channel-push! 3 (seconds 0.3)) + (ja :group! jakb-wings-lightjak-stance-ja) + (ja :chan 1 :group! jakb-wings-lightjak-get-on-land-ja) + (ja :chan 2 :group! jakb-wings-lightjak-swoop-fall-loop-ja) + (set! (-> self pilot jumping?) #f) + ) + ) + (when (and (not (-> self pilot jumping?)) (let ((v1-57 (ja-group))) + (not (and v1-57 (= v1-57 jakb-wings-lightjak-swoop1-ja))) + ) + ) + (let ((gp-0 (-> self pilot))) + (let ((f30-0 (* 5.0 (+ 1.0 (-> gp-0 left-right-interp))))) + (ja :num-func num-func-identity :frame-num (ja-aframe f30-0 0)) + (let ((s5-1 (-> self skel root-channel 1))) + (let ((f0-6 (* 0.5 (+ 1.0 (-> gp-0 front-back-interp))))) + (set! (-> s5-1 frame-interp 1) f0-6) + (set! (-> s5-1 frame-interp 0) f0-6) + ) + (set! (-> s5-1 num-func) num-func-identity) + (set! (-> s5-1 frame-num) (ja-aframe f30-0 1)) + ) + ) + (let* ((f30-1 (* 10.0 (- 1.0 (-> gp-0 up-down-interp)))) + (f0-9 (ja-aframe-num 2)) + (f28-0 (-> self skel root-channel 2 frame-interp 0)) + (f30-2 (seek f0-9 f30-1 (* 30.0 (seconds-per-frame)))) + (f0-16 (seek f28-0 (fabs (-> gp-0 up-down-interp)) (* 4.0 (seconds-per-frame)))) + ) + (ja :chan 2 + :frame-interp0 f0-16 + :frame-interp1 f0-16 + :num-func num-func-identity + :frame-num (ja-aframe f30-2 2) + ) + ) + ) + ) + (can-play-stance-amibent?) + (suspend) + ) + #f + (none) + ) + +;; definition for function target-pilot-trans +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defbehavior target-pilot-trans target () + (let ((gp-0 (-> self pilot))) + (process-drawable-set-riding self #t) + (let* ((v1-0 (-> gp-0 vehicle)) + (a0-1 (the-as object (l32-false-check v1-0))) + (s5-0 (and (nonzero? (the-as int a0-1)) + (begin (set! a0-1 (-> v1-0 process 0)) (if (= (-> v1-0 pid) (-> (the-as process a0-1) pid)) + (the-as vehicle a0-1) + ) + ) + ) + ) + ) + (cond + ((not s5-0) + (ja-channel-set! 0) + (go target-falling #f) + ) + (#t + (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)) + (set! (-> gp-0 accel-array 4 quad) (-> gp-0 accel-array 3 quad)) + (set! (-> gp-0 accel-array 3 quad) (-> gp-0 accel-array 2 quad)) + (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 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))))) + (s5-1 (-> gp-0 local-accel)) + ) + (let ((f1-6 + (+ (-> gp-0 controls steering) + (-> gp-0 left-right-bias) + (* 0.03 (sin f30-0)) + (* -1.0 (-> s5-1 x) (-> gp-0 left-right-accel-factor)) + ) + ) + ) + (set! (-> gp-0 left-right-interp) + (fmax + (fmin + (+ (-> gp-0 left-right-interp) (* 8.0 (- f1-6 (-> gp-0 left-right-interp)) (seconds-per-frame))) + (-> gp-0 left-right-max) + ) + (-> gp-0 left-right-min) + ) + ) + ) + (let ((f3-1 + (+ (-> gp-0 controls lean-z) (* 0.03 (cos f30-0)) (* -1.0 (-> s5-1 z) (-> gp-0 front-back-accel-factor))) + ) + ) + (set! (-> gp-0 front-back-interp) + (fmax + -1.0 + (fmin 1.0 (+ (-> gp-0 front-back-interp) (* 8.0 (- f3-1 (-> gp-0 front-back-interp)) (seconds-per-frame)))) + ) + ) + ) + (let ((f3-5 (+ (* 0.03 (cos f30-0)) (* -1.0 (-> s5-1 y) (-> gp-0 up-down-accel-factor))))) + (set! (-> gp-0 up-down-interp) + (fmax + -1.0 + (fmin 1.0 (+ (-> gp-0 up-down-interp) (* 8.0 (- f3-5 (-> gp-0 up-down-interp)) (seconds-per-frame)))) + ) + ) + ) + ) + (when (and (-> self next-state) (= (-> self next-state name) 'target-pilot-stance)) + (let* ((v1-65 (-> gp-0 accel-array)) + (f0-30 (+ (* (-> v1-65 0 x) (-> v1-65 0 x)) (* (-> v1-65 0 z) (-> v1-65 0 z)))) + ) + (if (or (and (-> self pilot as-daxter?) (let ((f1-25 1024000.0)) + (< (* f1-25 f1-25) f0-30) + ) + ) + (let ((f1-28 2048000.0)) + (< (* f1-28 f1-28) f0-30) + ) + ) + (go target-pilot-impact) + ) + ) + ) + ) + (else + (go target-pilot-get-off (the-as handle a0-1)) + ) + ) + ) + ) + (none) + ) + +;; definition for function target-pilot-signal-ready +(defbehavior target-pilot-signal-ready target () + (when (not (focus-test? self pilot-riding)) + (logior! (-> self focus-status) (focus-status pilot-riding)) + (let ((gp-0 (handle->process (-> self pilot vehicle)))) + (when gp-0 + (if (logtest? #x80000 (-> (the-as vehicle gp-0) info flags)) + (set-setting! 'cloth #f 0.0 0) + ) + (if (logtest? #x100000 (-> (the-as vehicle gp-0) info flags)) + (set-setting! 'armor #f 0.0 0) + ) + (send-event gp-0 'pilot-on (-> self pilot seat-index)) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate target-pilot-stance (target) + :event target-pilot-handler + :exit target-pilot-exit + :trans (behavior () + (target-pilot-trans) + ) + :code (behavior () + (local-vars (v1-9 uint)) + (target-pilot-signal-ready) + (logior! (-> self target-flags) (target-flags tf6)) + (set! (-> self control mod-surface) *pilot-mods*) + (logior! (-> self control status) (collide-status on-surface on-ground)) + (cond + ((-> self pilot as-daxter?) + (target-daxter-pilot-car-anim-loop) + ) + ((begin (set! v1-9 (-> self pilot stance)) (zero? v1-9)) + (target-pilot-bike-anim-loop) + ) + ((= v1-9 1) + (target-pilot-car-anim-loop) + ) + ((= v1-9 2) + (target-pilot-wcar-anim-loop) + ) + ((= v1-9 3) + (target-pilot-glider-anim-loop) + ) + (else + (until #f + (suspend) + ) + #f + ) + ) + ) + :post (behavior () + (target-pilot-post) + ) + ) + +;; failed to figure out what this is: +(defstate target-pilot-impact (target) + :event target-pilot-handler + :exit target-pilot-exit + :trans target-pilot-trans + :code (behavior () + (local-vars (v1-1 float) (v1-196 int)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (-> self pilot))) + (.lvf vf1 (&-> (-> gp-0 local-accel) 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-1 vf1) + (let ((f0-0 v1-1) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> gp-0 local-accel quad)) + (set! (-> s5-0 x) (* 4.0 (-> s5-0 x))) + (vector-float*! s5-0 s5-0 (/ 1.0 (sqrtf f0-0))) + (let ((s4-0 (cond + ((< 0.707 (-> s5-0 x)) + 5 + ) + ((< (-> s5-0 x) -0.707) + 4 + ) + ((< 0.707 (-> s5-0 y)) + 3 + ) + ((< (-> s5-0 y) -0.707) + 2 + ) + ((< 0.707 (-> s5-0 z)) + 1 + ) + ((< (-> s5-0 z) -0.707) + 0 + ) + (else + 6 + ) + ) + ) + ) + (cond + ((-> self pilot as-daxter?) + (ja-channel-push! 1 (seconds 0.05)) + (when (and (not (or (= s4-0 4) (= s4-0 5))) (!= s4-0 6)) + (if (< 0.0 (-> s5-0 x)) + (set! s4-0 5) + (set! s4-0 4) + ) + ) + (cond + ((= s4-0 4) + (ja-no-eval :group! jakb-wings-lightjak-swoop-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= s4-0 5) + (ja-no-eval :group! jakb-shield-shield-lod0-jg :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + (else + (let ((v1-73 (-> self pilot stance))) + (cond + ((zero? v1-73) + (ja-channel-push! 1 (seconds 0.05)) + (let ((v1-74 s4-0)) + (cond + ((= v1-74 4) + (ja-no-eval :group! jakb-pilot-bike-smack-left-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= v1-74 5) + (ja-no-eval :group! jakb-pilot-bike-smack-right-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((zero? v1-74) + (ja-no-eval :group! jakb-pilot-bike-smack-front-ja :num! (seek!) :frame-num (ja-aframe 0.0 0)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= v1-74 1) + (ja-no-eval :group! jakb-pilot-bike-smack-back-ja :num! (seek!) :frame-num (ja-aframe 0.0 0)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :group! jakb-pilot-bike-smack-shock-ja :num! (seek!) :frame-num (ja-aframe 0.0 0)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + ) + ((= v1-73 3) + (suspend) + 0 + ) + ((begin (ja-channel-push! 1 (seconds 0.05)) (set! v1-196 s4-0) (= v1-196 4)) + (ja-no-eval :group! jakb-pilot-car-smack-left-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((= v1-196 5) + (ja-no-eval :group! jakb-pilot-car-smack-right-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ((zero? v1-196) + (ja-no-eval :group! jakb-pilot-car-smack-front-ja :num! (seek! max 1.3) :frame-num (ja-aframe 4.0 0)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.3)) + ) + ) + ((= v1-196 1) + (ja-no-eval :group! jakb-pilot-car-smack-back-ja :num! (seek!) :frame-num (ja-aframe 2.0 0)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :group! jakb-pilot-car-smack-shock-ja :num! (seek!) :frame-num (ja-aframe 0.0 0)) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + ) + ) + ) + ) + (.svf (&-> (-> gp-0 accel-array) 0 quad) vf0) + ) + (go target-pilot-stance) + ) + ) + :post target-pilot-post + ) + +;; failed to figure out what this is: +(defstate target-pilot-daxter-perch (target) + :event target-pilot-handler + :exit target-pilot-exit + :trans target-pilot-trans + :code (behavior () + (set! (-> self control unknown-word04) (the-as uint #f)) + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! jakb-pilot-wcar-snake-in-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (loop + (ja-no-eval :group! jakb-pilot-wcar-snake-loop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (if (-> self control unknown-spool-anim00) + (goto cfg-11) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + (label cfg-11) + (ja-no-eval :group! jakb-pilot-wcar-snake-out-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go target-pilot-stance) + ) + :post target-pilot-post + ) + +;; failed to figure out what this is: +(let ((v1-12 (copy *empty-mods* 'loading-level))) + (set! (-> v1-12 flags) (surface-flag)) + (set! *pilot-get-on-mods* v1-12) + ) + +;; failed to figure out what this is: +(defstate target-pilot-get-on (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('end-mode) + (let ((v1-1 (-> block param 0)) + (a0-1 'pilot) + ) + (when (= v1-1 a0-1) + (cond + ((focus-test? self pilot-riding) + (go target-pilot-get-off (the-as handle a0-1)) + ) + (else + (ja-channel-set! 0) + (go target-falling #f) + ) + ) + ) + ) + ) + (else + (target-standard-event-handler proc argc message block) + ) + ) + ) + :exit target-pilot-exit + :trans (behavior () + (let* ((s5-0 (handle->process (-> self pilot vehicle))) + (t9-0 type?) + (a0-3 s5-0) + (gp-0 (if (t9-0 a0-3 vehicle) + s5-0 + ) + ) + ) + (cond + ((not gp-0) + (ja-channel-set! 0) + (go target-falling #f) + ) + ((focus-test? (the-as process-focusable gp-0) dead) + (go target-pilot-get-off (the-as handle a0-3)) + ) + (else + (vehicle-method-66 (the-as vehicle gp-0) (-> self control unknown-vector38) (-> self pilot seat-index)) + (set! (-> self control unknown-vector40 quad) (-> (the-as vehicle gp-0) root quat quad)) + ) + ) + ) + ) + :code (behavior () + (logior! (-> self focus-status) (focus-status pilot)) + (logior! (-> self target-flags) (target-flags tf6)) + (set! (-> self alt-cam-pos quad) (-> self control camera-pos quad)) + (sound-play "jump") + (let ((gp-1 (if (zero? (-> self pilot stance)) + jakb-pilot-bike-get-on-ja + jakb-pilot-car-get-on-ja + ) + ) + ) + (ja-channel-set! 1) + (set! (-> self control mod-surface) *pilot-get-on-mods*) + (send-event (ppointer->process (-> self manipy)) 'draw #t) + (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) + ) + ) + (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)) + (if (>= (ja-aframe-num 0) 20.5) + (target-pilot-signal-ready) + ) + (suspend) + (let ((a1-8 (handle->process (-> self pilot vehicle)))) + (if a1-8 + (set! (-> self alt-cam-pos quad) (-> (the-as vehicle a1-8) rbody position quad)) + ) + ) + (ja :num! (seek!)) + ) + (go target-pilot-stance) + ) + :post target-no-move-post + ) + +;; failed to figure out what this is: +(let ((v1-15 (copy *forward-jump-mods* 'loading-level))) + (set! (-> v1-15 fric) 0.0) + (set! (-> v1-15 nonlin-fric-dist) 0.0) + (set! (-> v1-15 turnv) 0.0) + (set! (-> v1-15 turnvv) 0.0) + (set! (-> v1-15 tiltv) 131072.0) + (set! (-> v1-15 tiltvf) 30.0) + (set! (-> v1-15 mult-hook) + (the-as + (function surface surface surface int none) + (lambda :behavior target + ((arg0 surface) (arg1 surface) (arg2 surface) (arg3 int)) + (case arg3 + ((1) + (persist-with-delay *setting-control* 'rapid-tracking (seconds 0.05) 'rapid-tracking #f 0.0 0) + ) + ) + ) + ) + ) + (set! *pilot-get-off-mods* v1-15) + ) + +;; failed to figure out what this is: +(defstate target-pilot-get-off (target) + :event target-standard-event-handler + :exit target-pilot-exit + :trans (behavior () + (let ((gp-0 (handle->process (-> self pilot vehicle)))) + (when (not (if (type? gp-0 vehicle) + gp-0 + ) + ) + (ja-channel-set! 0) + (go target-falling #f) + ) + ) + ) + :code (behavior ((arg0 handle)) + (local-vars (f30-0 float)) + (let ((v1-1 (-> self control root-prim))) + (set! (-> v1-1 prim-core collide-as) (-> self control backup-collide-as)) + (set! (-> v1-1 prim-core collide-with) (-> self control backup-collide-with)) + ) + (logclear! (-> self focus-status) (focus-status pilot-riding)) + (set! (-> self control mod-surface) *pilot-get-off-mods*) + (rot->dir-targ! (-> self control)) + (send-event *camera* 'set-dist #f #f) + (set! (-> self neck flex-blend) 0.0) + (persist-with-delay *setting-control* 'mode-name (seconds 0.05) 'mode-name 'cam-decel 0.0 0) + (persist-with-delay *setting-control* 'interp-time (seconds 0.05) 'interp-time 'hi 0.0 0) + (persist-with-delay *setting-control* 'interp-time (seconds 0.1) 'interp-time 'lo 300.0 0) + (persist-with-delay + *setting-control* + 'immediate-string-min-max + (seconds 0.05) + 'immediate-string-min-max + #f + 0.0 + 0 + ) + 0.0 + (let ((gp-0 (cond + ((zero? (-> self pilot stance)) + (set! f30-0 7.2) + jakb-pilot-bike-get-off-ja + ) + (else + (set! f30-0 15.2) + jakb-pilot-car-get-off-ja + ) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! gp-0 :num! (seek! (ja-aframe f30-0 0) 2.0) :frame-num 0.0) + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe f30-0 0) 2.0)) + ) + (let ((v1-37 (camera-matrix)) + (gp-2 (new 'stack-no-clear 'matrix)) + ) + (set! (-> gp-2 rvec quad) (-> v1-37 rvec quad)) + (set! (-> gp-2 uvec quad) (-> v1-37 fvec quad)) + (set! (-> gp-2 uvec y) 0.0) + (vector-normalize! (-> gp-2 uvec) 1.0) + (vector-reset! (-> gp-2 fvec)) + (vector+float*! + (-> gp-2 fvec) + (-> gp-2 fvec) + (-> gp-2 rvec) + (* 16384.0 (analog-input (the-as int (-> *cpad-list* cpads 0 leftx)) 128.0 48.0 110.0 -1.0)) + ) + (vector+float*! + (-> gp-2 fvec) + (-> gp-2 fvec) + (-> gp-2 uvec) + (* 16384.0 (analog-input (the-as int (-> *cpad-list* cpads 0 lefty)) 128.0 48.0 110.0 -1.0)) + ) + (vector+! (-> self control transv) (-> self control transv) (-> gp-2 fvec)) + ) + (let* ((f0-12 (vector-normalize-ret-len! (-> self control transv) 1.0)) + (f0-13 (fmin 122880.0 f0-12)) + ) + (vector-float*! (-> self control transv) (-> self control transv) f0-13) + ) + (go target-jump 10240.0 10240.0 *pilot-get-off-mods*) + ) + :post target-pilot-post + ) + +;; failed to figure out what this is: +(defstate target-pilot-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-pilot-stance) + ) + (('gun) + (target-gun-end-mode #t) + ) + ) + ) + (('clone-anim) + (go target-pilot-clone-anim (process->handle (the-as process (-> block param 0)))) + ) + (('vehicle-crash) + (go target-grab 'stance) + ) + (else + (target-generic-event-handler proc argc message block) + ) + ) + ) + ) + ) + :enter (behavior () + (set! (-> self control mod-surface) *grab-mods*) + (set! (-> self neck flex-blend) 0.0) + (logior! (-> self target-flags) (target-flags tf2)) + (logior! (-> self focus-status) (focus-status grabbed)) + ) + :exit (behavior () + (logclear! (-> self target-flags) (target-flags tf2)) + (logclear! (-> self focus-status) (focus-status grabbed)) + (logclear! (-> self water flags) (water-flag jump-out)) + ((-> target-pilot-start exit)) + ) + :code (behavior () + (until #f + (set-forward-vel 0.0) + (suspend) + ) + #f + ) + :post target-pilot-post + ) + +;; failed to figure out what this is: +(defstate target-pilot-clone-anim (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (if (and (= message 'trans) (= (-> block param 0) 'restore)) + (set! (-> self control unknown-word04) (the-as uint #f)) + ) + ((-> target-pilot-grab event) proc argc message block) + ) + :enter (-> target-clone-anim enter) + :exit (behavior () + (set! (-> self control draw-offset y) (the-as float (-> self control unknown-word04))) + (set! (-> self control cspace-offset y) (-> self control draw-offset y)) + (send-event (ppointer->process (-> self sidekick)) 'matrix #f) + ((-> target-clone-anim exit)) + ((-> target-pilot-start exit)) + (vector-reset! (-> self control transv)) + ) + :code (behavior ((arg0 handle)) + (set! (-> self control unknown-word04) (the-as uint (-> self control draw-offset y))) + (set! (-> self control draw-offset y) 0.0) + (send-event (ppointer->process (-> self sidekick)) 'matrix 'play-anim) + (clone-anim arg0 #t "") + (go target-pilot-stance) + ) + :post (behavior () + (vector+! (-> self pilot pilot-trans) (-> self control trans) (-> self control cspace-offset)) + (quaternion-copy! (the-as quaternion (-> self pilot pilot-quat)) (-> self control quat)) + (set! (-> self pilot pilot-scale quad) (-> self control scale quad)) + (target-no-ja-move-post) + ) + ) + +;; failed to figure out what this is: +(defstate target-pilot-edge-grab (target) + :event (-> target-edge-grab event) + :enter (behavior ((arg0 pilot-edge-grab-info)) + (set! (-> self control status) (collide-status)) + (let ((gp-0 *edge-grab-info*)) + (mem-copy! (the-as pointer (-> gp-0 pilot-edge-grab)) (the-as pointer arg0) 40) + (set! (-> gp-0 pilot-grab-interp) 0.0) + (set! (-> gp-0 pilot-start-grab-pos quad) (-> self control trans quad)) + (set! (-> gp-0 actor-handle) (-> arg0 handle)) + ((-> target-edge-grab enter)) + (let* ((s5-1 (handle->process (-> gp-0 actor-handle))) + (a0-9 (if (type? s5-1 process-focusable) + s5-1 + ) + ) + ) + (set! (-> gp-0 pilot-edge-grab?) + (if (and a0-9 + (< 24576.0 (fabs (- (-> (get-trans (the-as process-focusable a0-9) 0) y) (-> self control trans y)))) + ) + 'target-double-jump + 'target-jump + ) + ) + ) + ) + ) + :exit (-> target-edge-grab exit) + :trans (-> target-edge-grab trans) + :code (-> target-edge-grab code) + :post target-no-move-post + ) + +;; failed to figure out what this is: +(defstate target-pilot-hit (target) + :event target-generic-event-handler + :exit (behavior () + (if (not (and (-> self next-state) (= (-> self next-state name) 'target-death))) + (logclear! (-> self focus-status) (focus-status dead hit)) + ) + ((-> target-pilot-start exit)) + ) + :code (behavior ((arg0 symbol) (arg1 attack-info)) + (local-vars (sv-16 attack-info)) + (set-time! (-> self state-time)) + (set! (-> self neck flex-blend) 0.0) + (set! sv-16 (-> self attack-info)) + (let ((v1-4 sv-16)) + (set! (-> v1-4 attacker) (the-as handle #f)) + (set! (-> v1-4 mode) 'generic) + (set! (-> v1-4 shove-back) 6144.0) + (set! (-> v1-4 shove-up) 4915.2) + (set! (-> v1-4 angle) #f) + (set! (-> v1-4 trans quad) (-> self control trans quad)) + (set! (-> v1-4 control) 0.0) + (set! (-> v1-4 invinc-time) (-> *TARGET-bank* hit-invulnerable-timeout)) + (set! (-> v1-4 damage) (-> *FACT-bank* health-default-inc)) + ) + (combine! sv-16 arg1 self) + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (go target-pilot-death (-> sv-16 mode)) + ) + :post target-no-stick-post + ) + +;; failed to figure out what this is: +(defstate target-pilot-death (target) + :event (-> target-death event) + :exit (behavior () + ((-> target-pilot-start exit)) + ((-> target-death exit)) + ) + :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) + (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) + (case arg0 + (('bot) + (set-setting! 'process-mask 'set 0.0 (process-mask platform projectile death)) + ) + (('endlessfall 'instant-death 'lava 'dark-eco-pool 'melt 'explode 'grenade 'drown-death) + (set-setting! 'process-mask 'set 0.0 (process-mask enemy platform projectile death)) + ) + (else + (set-setting! 'process-mask 'set 0.0 (process-mask enemy platform projectile death)) + (when (using-gun? self) + (send-event (ppointer->process (-> self gun gun)) 'notice 'die) + (target-gun-end-mode #f) + ) + ) + ) + (set-setting! 'mode-name 'cam-fixed 0.0 0) + (set-setting! 'interp-time 'abs 0.0 0) + (apply-settings *setting-control*) + (set! (-> self control transv quad) (the-as uint128 0)) + (logior! (-> self focus-status) (focus-status dead)) + (case arg0 + (('melt 'grenade 'explode) + (let ((s5-1 (current-time))) + (until (time-elapsed? s5-1 (seconds 0.2)) + (suspend) + ) + ) + (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)) + ) + ) + ) + (('grenade 'explode) + (sound-play "explosion") + (cond + ((logtest? (-> *part-group-id-table* 65 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* 65)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 65)) + ) + ) + ) + (('lava 'melt) + (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-158 (-> self control root-prim))) + (set! (-> v1-158 prim-core collide-as) (collide-spec)) + (set! (-> v1-158 prim-core collide-with) (collide-spec)) + ) + 0 + (ja-channel-set! 0) + (let ((s5-11 (current-time))) + (until (time-elapsed? s5-11 (seconds 1.8)) + (suspend) + ) + ) + ) + (('endlessfall) + (sound-play "death-fall") + (if (not (-> self pilot as-daxter?)) + (set! (-> self control unknown-sound-id00) + (add-process *gui-control* *target* (gui-channel daxter) (gui-action play) "jakfall" -99.0 0) + ) + ) + (sound-params-set! *gui-control* (-> self control unknown-sound-id00) #t -1 100 2 -1.0) + (logclear! (-> self water flags) (water-flag swim-ground)) + (let ((f0-5 (fmin -4096.0 (- (-> self control ground-impact-vel))))) + (set! (-> self control unknown-word04) (the-as uint f0-5)) + (let ((v1-179 (new-stack-vector0))) + (let ((f1-3 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-179 (-> self control transv) (vector-float*! v1-179 (-> self control dynam gravity-normal) f1-3)) + ) + (let* ((f1-4 (vector-length v1-179)) + (f2-1 f1-4) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f0-5) + (vector-float*! v1-179 v1-179 (/ f1-4 f2-1)) + ) + ) + ) + ) + (let ((s5-13 (current-time))) + (until (time-elapsed? s5-13 (seconds 0.5)) + (suspend) + ) + ) + ) + (('drown-death) + (logclear! (-> self water flags) (water-flag swim-ground)) + (let ((f0-8 (fmin -4096.0 (- (-> self control ground-impact-vel))))) + (set! (-> self control unknown-word04) (the-as uint f0-8)) + (let ((v1-190 (new-stack-vector0))) + (let ((f1-8 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-190 (-> self control transv) (vector-float*! v1-190 (-> self control dynam gravity-normal) f1-8)) + ) + (let* ((f1-9 (vector-length v1-190)) + (f2-3 f1-9) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f0-8) + (vector-float*! v1-190 v1-190 (/ f1-9 f2-3)) + ) + ) + ) + ) + (let ((s5-14 (current-time))) + (until (time-elapsed? s5-14 (seconds 2)) + (suspend) + ) + ) + ) + (('bot) + (set! (-> self trans-hook) #f) + (while (not (-> self control unknown-spool-anim00)) + (set-forward-vel 0.0) + (suspend) + ) + ) + (('big-explosion) + (let ((s5-15 (current-time))) + (until (time-elapsed? s5-15 (seconds 2)) + (suspend) + ) + ) + ) + (else + ) + ) + (target-death-reset arg0 #f) + ) + :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 bac1204183..aee97c58f6 100644 --- a/test/decompiler/reference/jak3/engine/target/sidekick_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/sidekick_REF.gc @@ -8,9 +8,9 @@ :longest-edge (meters 1) :shadow daxter-shadow-mg :texture-level 10 + :sort 1 :origin-joint-index 6 :shadow-joint-index 6 - :light-index 1 ) ;; failed to figure out what this is: @@ -19,9 +19,9 @@ :bounds (static-spherem 0 0 0 3) :longest-edge (meters 1) :shadow daxter-highres-shadow-mg + :sort 1 :origin-joint-index 6 :shadow-joint-index 6 - :light-index 1 ) ;; definition for symbol *sidekick-remap*, type pair @@ -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)) - ) - (else - (logclear! (-> self draw global-effect) (draw-control-global-effect no-textures)) - ) - ) - (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)) + ((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) + (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)) ) - (else - (let ((a0-37 (-> self parent 0 draw color-emissive quad))) - (set! (-> self draw color-emissive quad) a0-37) - ) - ) + (set! gp-0 1) + ) + (else + (joint-control-copy! (-> self skel) (-> self parent 0 skel)) ) ) - (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)) - ) - (the-as vector #f) - ) - (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)) + ) + (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) - ) - (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))) + (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) ) - (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) + ) + ) + (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 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)) ) - (seek! - (-> self flap 1 twist-max z) - (lerp-scale 0.0 5461.3335 f30-0 4096.0 122880.0) - (* 65536.0 (seconds-per-frame)) + (the-as vector #f) + ) + (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)) ) - (seek! (-> self flap 1 twist-speed-x) (lerp-scale 1.0 8.0 f30-0 4096.0 122880.0) (* 10.0 (seconds-per-frame))) + (the-as vector #f) ) - (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))) + (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 1) + (-> 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 1 twist z))) (-> self flap 1 twist-max z)) + (* (sin (* 32768.0 (-> self flap 0 twist z))) (-> self flap 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 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-anim_REF.gc b/test/decompiler/reference/jak3/engine/target/target-anim_REF.gc index e108f93dff..17b23247ba 100644 --- a/test/decompiler/reference/jak3/engine/target/target-anim_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-anim_REF.gc @@ -1284,10 +1284,7 @@ ) ) ) - (let ((v1-257 (-> self skel root-channel 6))) - (set! (-> v1-257 frame-interp 1) f26-0) - (set! (-> v1-257 frame-interp 0) f26-0) - ) + (ja :chan 6 :frame-interp0 f26-0 :frame-interp1 f26-0) (let* ((f1-14 (* (current-cycle-distance (-> self skel)) (-> self control scale x))) (f0-70 (/ (-> self control ctrl-xz-vel) (* 60.0 (/ f1-14 (-> *TARGET-bank* run-cycle-length))))) ) diff --git a/test/decompiler/reference/jak3/engine/target/target-darkjak_REF.gc b/test/decompiler/reference/jak3/engine/target/target-darkjak_REF.gc new file mode 100644 index 0000000000..cb6917893a --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/target-darkjak_REF.gc @@ -0,0 +1,2584 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type darkjak-ball +(deftype darkjak-ball (projectile) + ((impact? symbol) + (fire-point vector :inline) + (explode-sound uint32) + (bolts (array lightning-bolt)) + (ball-pos vector 2 :inline) + (trail sparticle-launch-control) + (ball1 sparticle-launch-control) + (last-ground-height float) + (fire-sound sound-id) + ) + (:methods + (setup-bolts! (_type_ vector vector) none) + ) + ) + +;; definition for method 3 of type darkjak-ball +(defmethod inspect ((this darkjak-ball)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (format #t "~2Timpact?: ~A~%" (-> this impact?)) + (format #t "~2Tfire-point: #~%" (-> this fire-point)) + (format #t "~2Texplode-sound: ~D~%" (-> this explode-sound)) + (format #t "~2Tbolts: ~A~%" (-> this bolts)) + (format #t "~2Tball-pos[2] @ #x~X~%" (-> this ball-pos)) + (format #t "~2Ttrail: ~A~%" (-> this trail)) + (format #t "~2Tball1: ~A~%" (-> this ball1)) + (format #t "~2Tlast-ground-height: ~f~%" (-> this last-ground-height)) + (format #t "~2Tfire-sound: ~D~%" (-> this fire-sound)) + (label cfg-4) + this + ) + +;; definition for method 7 of type darkjak-ball +(defmethod relocate ((this darkjak-ball) (offset int)) + (dotimes (v1-0 (-> this bolts length)) + (if (nonzero? (-> this bolts v1-0)) + (&+! (-> this bolts v1-0) offset) + ) + ) + (if (nonzero? (-> this bolts)) + (&+! (-> this bolts) offset) + ) + (if (nonzero? (-> this trail)) + (&+! (-> this trail) offset) + ) + (if (nonzero? (-> this ball1)) + (&+! (-> this ball1) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 10 of type darkjak-ball +(defmethod deactivate ((this darkjak-ball)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this fire-sound)) + (if (nonzero? (-> this trail)) + (kill-particles (-> this trail)) + ) + (if (nonzero? (-> this ball1)) + (kill-particles (-> this ball1)) + ) + (call-parent-method this) + (none) + ) + +;; definition for function darkjak-ball-slide-reaction +(defun darkjak-ball-slide-reaction ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector)) + (cshape-reaction-update-state arg0 arg1 arg3) + (let ((a0-3 (vector-normalize-copy! (new 'stack-no-clear 'vector) arg3 1.0))) + 0.0 + (if (< (vector-dot a0-3 (-> arg0 surface-normal)) -0.3) + (set! (-> (the-as darkjak-ball (-> arg0 process)) impact?) #t) + ) + ) + (let ((f0-4 (vector-dot arg3 (-> arg0 surface-normal))) + (s3-0 (new 'stack-no-clear 'vector)) + (f30-0 (vector-length arg3)) + ) + (vector-float*! s3-0 (-> arg0 surface-normal) (* 1.2 f0-4)) + (vector-! s3-0 arg3 s3-0) + (vector-normalize! s3-0 1.0) + (set! (-> s3-0 y) (fmin 0.4 (-> s3-0 y))) + (set-vector! arg2 (-> arg3 x) (-> s3-0 y) (-> arg3 z) 1.0) + (vector-normalize! arg2 f30-0) + ) + (-> arg0 status) + ) + +;; definition for method 37 of type darkjak-ball +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs symbol. +(defmethod deal-damage! ((this darkjak-ball) (arg0 process) (arg1 event-message-block)) + (local-vars (sv-288 process) (sv-304 vector)) + (let ((s4-0 (new 'stack 'attack-info))) + (let ((v1-1 s4-0)) + (set! (-> v1-1 mode) (-> this attack-mode)) + (set! (-> v1-1 id) (-> this attack-id)) + (set! (-> v1-1 mask) (attack-mask mode id)) + (set! (-> v1-1 penetrate-using) (penetrate dark-smack)) + ) + (when (!= (-> this owner-handle) #f) + (set! (-> s4-0 attacker) (-> this owner-handle)) + (logior! (-> s4-0 mask) (attack-mask attacker)) + ) + (when (logtest? (-> this options) (projectile-options po13)) + (set! (-> s4-0 attacker-velocity quad) (-> this pre-move-transv quad)) + (logior! (-> s4-0 mask) (attack-mask attacker-velocity)) + ) + (set! (-> s4-0 damage) (-> this damage)) + (set! (-> s4-0 vehicle-damage-factor) (-> this vehicle-damage-factor)) + (set! (-> s4-0 vehicle-impulse-factor) (-> this vehicle-impulse-factor)) + (logior! (-> s4-0 mask) (attack-mask damage vehicle-damage-factor vehicle-impulse-factor)) + (when (logtest? (projectile-options po18) (-> this options)) + (set! (-> s4-0 invinc-time) (-> this invinc-time)) + (logior! (-> s4-0 mask) (attack-mask invinc-time)) + ) + (when arg1 + (let ((s2-0 (new 'stack-no-clear 'vector)) + (s1-0 ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry arg1) + (-> this root) + (the-as uint -1) + ) + ) + ) + (set! sv-288 arg0) + (let ((s0-0 (if (type? sv-288 process-focusable) + sv-288 + ) + ) + ) + (when s0-0 + (set! sv-304 s2-0) + (let ((v1-27 (-> (get-trans (the-as process-focusable s0-0) 3) quad))) + (set! (-> sv-304 quad) v1-27) + ) + (when (not (focus-test? (the-as process-focusable s0-0) hit)) + (if s1-0 + (get-intersect-point s2-0 s1-0 (-> this root) (the-as touching-shapes-entry arg1)) + ) + (cond + ((logtest? (-> *part-group-id-table* 77 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> s2-0 quad)) + (part-tracker-spawn part-tracker-subsampler :to this :group (-> *part-group-id-table* 77)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> s2-0 quad)) + (part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 77)) + ) + ) + (sound-play "djak-strike-ko") + ) + ) + ) + ) + ) + (the-as symbol (send-event + arg0 + (if (logtest? (projectile-options po19) (-> this options)) + 'attack-invinc + 'attack + ) + arg1 + s4-0 + ) + ) + ) + ) + +;; definition for method 30 of type darkjak-ball +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this darkjak-ball)) + (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) darkjak-ball-slide-reaction) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s5-0 penetrate-using) (penetrate dark-smack)) + (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 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 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 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) + ) + 0 + (none) + ) + +;; definition for function darkjak-ball-move +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun darkjak-ball-move ((arg0 darkjak-ball)) + (projectile-move-fill-line-sphere arg0) + (sound-play "hadouken-loop" :id (-> arg0 fire-sound) :position (-> arg0 root trans)) + (seek! (-> arg0 root transv y) 0.0 (* 81920.0 (seconds-per-frame))) + (seek! (-> arg0 root root-prim local-sphere w) 24576.0 (* 24576.0 (seconds-per-frame))) + (let ((v1-16 (-> (the-as collide-shape-prim-group (-> arg0 root root-prim)) child 0)) + (a0-10 (-> (the-as collide-shape-prim-group (-> arg0 root root-prim)) child 1)) + ) + (set! (-> v1-16 local-sphere w) (* 0.1 (-> arg0 root root-prim local-sphere w))) + (set! (-> a0-10 local-sphere w) (-> arg0 root root-prim local-sphere w)) + ) + (let ((s5-0 (new 'stack-no-clear 'collide-query)) + (v1-20 (new 'stack-no-clear 'vector)) + (f30-0 (* 0.5 (-> arg0 root root-prim local-sphere w))) + ) + (set! (-> v1-20 quad) (-> arg0 root trans quad)) + (vector+float*! (-> s5-0 start-pos) v1-20 *up-vector* 0.0) + (set! (-> s5-0 move-dist quad) (the-as uint128 0)) + (set! (-> s5-0 move-dist y) (- f30-0)) + (let ((v1-22 s5-0)) + (set! (-> v1-22 radius) f30-0) + (set! (-> v1-22 collide-with) (collide-spec backgnd)) + (set! (-> v1-22 ignore-process0) #f) + (set! (-> v1-22 ignore-process1) #f) + (set! (-> v1-22 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-22 action-mask) (collide-action solid)) + ) + (when (!= (fill-and-probe-using-line-sphere *collide-cache* s5-0) -100000000.0) + (set! (-> arg0 last-ground-height) (-> s5-0 best-other-tri intersect y)) + (let ((f0-18 (- (+ (-> s5-0 best-other-tri intersect y) f30-0) (-> arg0 root trans y)))) + (if (< 0.0 f0-18) + (seek! (-> arg0 root trans y) (+ (-> s5-0 best-other-tri intersect y) f30-0) (* 40960.0 (seconds-per-frame))) + ) + ) + ) + ) + (if (and (< (fabs (- (-> arg0 root trans y) (-> arg0 fire-point y))) 6144.0) + (< 16384.0 (vector-length (-> arg0 root transv))) + ) + (set! (-> arg0 impact?) #f) + ) + (if (-> arg0 impact?) + (go (method-of-object arg0 impact)) + ) + (sound-play "djak-bolt-throw" :id (-> arg0 sound-id) :position (-> arg0 root trans)) + 0 + (none) + ) + +;; definition for method 26 of type darkjak-ball +;; INFO: Used lq/sq +;; WARN: Return type mismatch smush-control vs none. +(defmethod projectile-method-26 ((this darkjak-ball)) + (sound-play "djak-strike-hit") + (cond + ((logtest? (-> *part-group-id-table* 76 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* 76)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to this :group (-> *part-group-id-table* 76)) + ) + ) + (activate! *camera-smush-control* 819.2 15 75 1.0 0.9 (-> *display* camera-clock)) + (none) + ) + +;; failed to figure out what this is: +(defstate impact (darkjak-ball) + :virtual #t + :enter (behavior () + (sound-stop (-> self fire-sound)) + (dotimes (gp-0 (-> self bolts length)) + (lightning-bolt-method-13 (-> self bolts gp-0) 2) + ) + (when (nonzero? (-> self ball1)) + (kill-particles (-> self ball1)) + (set! (-> self ball1) (the-as sparticle-launch-control 0)) + 0 + ) + (when (nonzero? (-> self part)) + (kill-particles (-> self part)) + (set! (-> self part) (the-as sparticle-launch-control 0)) + 0 + ) + (let ((t9-5 (-> (find-parent-state) enter))) + (if t9-5 + (t9-5) + ) + ) + ) + :trans (behavior () + (dotimes (gp-0 (-> self bolts length)) + (lightning-bolt-method-11 (-> self bolts gp-0)) + (lightning-bolt-method-12 (-> self bolts gp-0)) + ) + ) + :code (behavior () + (set-time! (-> self state-time)) + (while (and (not (time-elapsed? (-> self state-time) (seconds 10))) (-> self child)) + (suspend) + ) + (go-virtual die) + ) + ) + +;; failed to figure out what this is: +(if (or (zero? *darkjak-ball-lightning*) (!= loading-level global)) + (set! *darkjak-ball-lightning* (new 'loading-level 'lightning-appearance)) + ) + +;; failed to figure out what this is: +(set! (-> *darkjak-ball-lightning* base-alpha) 1.0) + +;; failed to figure out what this is: +(set! (-> *darkjak-ball-lightning* tex-id) (the-as uint #x403f00)) + +;; failed to figure out what this is: +(set! (-> *darkjak-ball-lightning* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *darkjak-ball-lightning* alpha-1-curve) *curve-linear-down*) + +;; failed to figure out what this is: +(set! (-> *darkjak-ball-lightning* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *darkjak-ball-lightning* alpha-1-repeat-dist) 262144.0) + +;; failed to figure out what this is: +(set! (-> *darkjak-ball-lightning* alpha-2-curve) #f) + +;; failed to figure out what this is: +(set! (-> *darkjak-ball-lightning* alpha-2-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *darkjak-ball-lightning* alpha-2-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *darkjak-ball-lightning* width-curve) *curve-linear-down*) + +;; failed to figure out what this is: +(set! (-> *darkjak-ball-lightning* width-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *darkjak-ball-lightning* width-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *darkjak-ball-lightning* uv-repeat-dist) 28672.0) + +;; failed to figure out what this is: +(set! (-> *darkjak-ball-lightning* regenerate-time-start) (seconds 0.017)) + +;; failed to figure out what this is: +(set! (-> *darkjak-ball-lightning* regenerate-time-end) (seconds 0.05)) + +;; failed to figure out what this is: +(set! (-> *darkjak-ball-lightning* width-range-start) 12288.0) + +;; failed to figure out what this is: +(set! (-> *darkjak-ball-lightning* width-range-end) 12288.0) + +;; failed to figure out what this is: +(set! (-> *darkjak-ball-lightning* fade-time) (seconds 0.3)) + +;; failed to figure out what this is: +(set! (-> *darkjak-ball-lightning* uv-shift?) #t) + +;; failed to figure out what this is: +(set! (-> *darkjak-ball-lightning* uv-shift-speed) (seconds -0.5)) + +;; failed to figure out what this is: +(set! (-> *darkjak-ball-lightning* use-sprite-bucket?) #t) + +;; failed to figure out what this is: +(set! (-> *darkjak-ball-lightning* use-accurate-interp?) #t) + +;; failed to figure out what this is: +(defpartgroup group-darkjak-hadouken + :id 172 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 624 :flags (sp7) :period (seconds 20) :length (seconds 4)) + (sp-item 625 :flags (sp7) :period (seconds 20) :length (seconds 4)) + (sp-item 626 :flags (sp7) :period (seconds 20) :length (seconds 4)) + (sp-item 627 :flags (sp3 sp7)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-darkjak-hadouken-trail + :id 173 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 628 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 628 + :init-specs ((:texture (redpuff level-default-sprite)) + (:num 1.0) + (:x (meters -1) (meters 2)) + (:scale-x (meters 1) (meters 1)) + (:scale-y :copy scale-x) + (:r 0.0 64.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 32.0 32.0) + (:vel-x (meters -0.0016666667) 2.0 (meters 0.0033333334)) + (:scalevel-y (meters -0.001) (meters -0.006666667)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; definition for method 31 of type darkjak-ball +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this darkjak-ball)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1)) + (set! (-> this attack-mode) 'dark-smack) + (set! (-> this max-speed) 163840.0) + (set! (-> this move) darkjak-ball-move) + (set! (-> this timeout) (seconds 4)) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this explode-sound) (the-as uint (new-sound-id))) + (set! (-> this damage) 8.0) + (set! (-> this vehicle-damage-factor) 2.0) + (set! (-> this vehicle-impulse-factor) 3.0) + (logior! (-> this options) (projectile-options po13)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 172) this)) + (set! (-> this ball1) (create-launch-control (-> *part-group-id-table* 172) this)) + (set! (-> this trail) (create-launch-control (-> *part-group-id-table* 173) this)) + (set! (-> this impact?) #f) + (set! (-> this max-hits) 1000) + (set! (-> this fire-point quad) (-> this root trans quad)) + (set! (-> this bolts) (new 'process 'boxed-array lightning-bolt 3)) + (dotimes (s5-0 (-> this bolts length)) + (set! (-> this bolts s5-0) (new 'process 'lightning-bolt)) + (init! (-> this bolts s5-0) 2 16 *darkjak-ball-lightning*) + ) + (set! (-> this fire-sound) (new-sound-id)) + (let ((a0-13 (-> this root transv))) + (set! (-> a0-13 quad) (-> this root transv quad)) + (set! (-> a0-13 y) 0.0) + (vector-normalize! a0-13 1.0) + ) + (vector-float*! (-> this root transv) (-> this root transv) 245760.0) + 0 + (none) + ) + +;; definition for symbol *darkjak-ball-lightning-colors*, type (array rgba) +(define *darkjak-ball-lightning-colors* (new 'static 'boxed-array :type rgba + (new 'static 'rgba :r #xff :g #x20 :b #x80 :a #x80) + (new 'static 'rgba :r #x20 :g #x20 :b #xff :a #x80) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + ) + ) + +;; definition for method 41 of type darkjak-ball +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defmethod setup-bolts! ((this darkjak-ball) (arg0 vector) (arg1 vector)) + (dotimes (s3-0 (-> this bolts length)) + (let ((s2-0 (-> this bolts s3-0))) + (set! (-> s2-0 base-color) (-> *darkjak-ball-lightning-colors* s3-0)) + (set! (-> s2-0 inner-point-travel-time) (seconds 0.085)) + (set! (-> s2-0 snap-inner-points?) #t) + (set! (-> s2-0 fractal-reduction) 0.7) + (set! (-> s2-0 generate-mode) (the-as uint 1)) + (set! (-> s2-0 appearance) *darkjak-ball-lightning*) + (set! (-> s2-0 num-active-spans) 2) + (set! (-> s2-0 spans data 0 random-offset-size-start) 2048.0) + (set! (-> s2-0 spans data 1 random-offset-size-start) 2048.0) + (set! (-> s2-0 spans-internal data 0 num-inner-points) 14) + (set! (-> s2-0 spans data 0 inner-random-offset-size) 8192.0) + (set! (-> s2-0 spans data 1 inner-random-offset-size) 8192.0) + (if arg0 + (set! (-> s2-0 span-pts-start data 0 quad) (-> arg0 quad)) + ) + (if arg1 + (set! (-> s2-0 span-pts-start data 1 quad) (-> arg1 quad)) + ) + (set! (-> s2-0 spans-internal data 1 num-inner-points) 0) + (lightning-bolt-method-11 s2-0) + (lightning-bolt-method-12 s2-0) + ) + ) + (none) + ) + +;; definition for function sparticle-track-hadouken +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun sparticle-track-hadouken ((arg0 object) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let ((a3-0 (the-as darkjak-ball (-> arg1 key proc))) + (v1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-1 quad) + (-> (the-as (pointer uint128) (+ (+ (* (-> arg1 user-float) 16) 556) (the-as int a3-0)))) + ) + (set! (-> arg2 x) (-> v1-1 x)) + (set! (-> arg2 y) (-> v1-1 y)) + (set! (-> arg2 z) (-> v1-1 z)) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 624 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 2.0) + (:scale-x (meters 1) (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.035)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'sparticle-track-hadouken) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 625 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.1) (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r -5.12) + (:fade-g -10.2) + (:fade-a -2.56) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'sparticle-track-hadouken) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 626 + :init-specs ((:texture (water-radiate level-default-sprite)) + (:num 4.0) + (:scale-x (meters 4)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 2) (meters 2)) + (:r 0.0 16.0) + (:g 0.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-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:userdata 0.0) + (:func 'sparticle-track-hadouken) + (:next-time (seconds 0.017)) + (:next-launcher 629) + (:conerot-x (degrees -180) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 629 + :init-specs ((:a 255.0) (:fade-a -5.12)) + ) + +;; failed to figure out what this is: +(defpart 627 + :init-specs ((:num 1.0) + (:rot-x 8) + (:r 32768.0) + (:g 2048.0) + (:b 8192.0) + (:timer (seconds 4)) + (:flags (distort)) + (:userdata 0.0) + (:func 'sparticle-track-hadouken) + (:rotate-y (degrees 0)) + ) + ) + +;; definition for method 25 of type darkjak-ball +;; INFO: Used lq/sq +(defmethod projectile-method-25 ((this darkjak-ball)) + (let* ((f0-0 0.75) + (f1-0 65536.0) + (f2-1 (* 0.0033333334 (the float (current-time)))) + (f0-2 (* f1-0 (/ (- f2-1 (* (the float (the int (/ f2-1 f0-0))) f0-0)) f0-0))) + (s3-0 (vector-rotate-around-y! (new 'stack-no-clear 'vector) *x-vector* f0-2)) + (s5-0 (-> this ball-pos)) + (s4-0 (-> this ball-pos 1)) + ) + (vector-float*! s3-0 s3-0 (* 0.75 (-> this root root-prim local-sphere w))) + (vector+! (the-as vector s5-0) (-> this root trans) s3-0) + (set! (-> *part-id-table* 625 init-specs 16 initial-valuef) 0.0) + (set! (-> *part-id-table* 626 init-specs 16 initial-valuef) 0.0) + (set! (-> *part-id-table* 627 init-specs 7 initial-valuef) 0.0) + (set! (-> *part-id-table* 624 init-specs 11 initial-valuef) 0.0) + (spawn (-> this part) (the-as vector s5-0)) + (vector+float*! s4-0 (-> this root trans) s3-0 -1.0) + (set! (-> *part-id-table* 625 init-specs 16 initial-valuef) (the-as float #x1)) + (set! (-> *part-id-table* 626 init-specs 16 initial-valuef) (the-as float #x1)) + (set! (-> *part-id-table* 627 init-specs 7 initial-valuef) (the-as float #x1)) + (set! (-> *part-id-table* 624 init-specs 11 initial-valuef) (the-as float #x1)) + (spawn (-> this ball1) s4-0) + (let ((s3-1 (new 'stack-no-clear 'vector))) + (set! (-> s3-1 quad) (-> this root trans quad)) + (let ((s2-0 matrix-f-u-compose) + (s1-0 (new 'stack-no-clear 'matrix)) + (a0-21 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-21 quad) (-> this root transv quad)) + (set! (-> a0-21 y) 0.0) + (let ((a1-10 (s2-0 s1-0 (vector-normalize! a0-21 1.0) *up-vector*))) + (set! (-> s3-1 y) (-> this last-ground-height)) + (+! (-> s3-1 y) 1638.4) + (set! (-> a1-10 trans quad) (-> s3-1 quad)) + (spawn-from-mat (-> this trail) a1-10) + ) + ) + ) + (setup-bolts! this (the-as vector s5-0) s4-0) + ) + (none) + ) + +;; definition for function target-darkjak-setup +;; WARN: Return type mismatch int vs none. +(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))) + (let* ((v1-4 (-> self game)) + (a0-5 (+ (-> v1-4 attack-id) 1)) + ) + (set! (-> v1-4 attack-id) a0-5) + (set! (-> self darkjak attack-id) a0-5) + ) + (set! (-> self darkjak hud 0) (the-as handle #f)) + (set! (-> self darkjak charge-effect) (the-as handle #f)) + (set! (-> self darkjak tone) (new-sound-id)) + (set! (-> self darkjak-giant-interp) 1.0) + (set! (-> self darkjak mode-sound-bank) #f) + (set! (-> self darkjak latch-out-time) 0) + 0 + ) + 0 + (none) + ) + +;; definition for function want-to-darkjak? +(defbehavior want-to-darkjak? target () + (and (not *pause-lock*) + (-> *setting-control* user-current darkjak) + (logtest? (the-as game-feature (logand (game-feature darkjak) (-> *setting-control* user-current features))) + (-> self game features) + ) + (not (focus-test? + self + dead + hit + grabbed + in-head + under-water + edge-grab + pole + flut + tube + light + board + pilot + mech + carry + indax + teleporting + ) + ) + (not (and (logtest? (-> self water flags) (water-flag under-water)) + (not (logtest? (-> self water flags) (water-flag swim-ground))) + ) + ) + (and (and (not (and (focus-test? self dark) (nonzero? (-> self darkjak)))) + (and (time-elapsed? (-> self fact darkjak-start-time) (seconds 0.05)) (< 0.0 (-> self game eco-pill-dark))) + ) + (zero? (-> self darkjak latch-out-time)) + ) + ) + ) + +;; failed to figure out what this is: +(let ((v1-56 (copy *walk-mods* 'global))) + (set! (-> v1-56 name) 'darkjak) + (set! (-> v1-56 flags) (surface-flag gun-off)) + (set! *darkjak-trans-mods* v1-56) + ) + +;; definition for function target-darkjak-end-mode +;; WARN: Return type mismatch int vs none. +(defbehavior target-darkjak-end-mode target ((arg0 symbol)) + (when (and (focus-test? self dark) (nonzero? (-> self darkjak))) + (cond + (arg0 + (set! (-> self lightjak get-off-lock) #f) + (set! (-> self darkjak lightning-count) 0) + (logclear! (-> self focus-status) (focus-status dark)) + (send-event self 'reset-collide) + (logclear! (-> self target-flags) (target-flags tf4)) + (remove-setting! 'sound-flava) + (remove-setting! 'string-min-length) + (remove-setting! 'string-max-length) + (remove-setting! 'string-spline-max-move) + (remove-setting! 'string-spline-accel) + (remove-setting! 'string-spline-max-move-player) + (remove-setting! 'string-spline-accel-player) + (setting-control-method-14 *setting-control* (-> self darkjak mode-sound-bank)) + (set! (-> self darkjak mode-sound-bank) #f) + (sound-stop (-> self darkjak tone)) + (set! (-> self pending-ext-anim) (target-anim default)) + (if (< (-> self game eco-pill-dark) 1.0) + (send-event self 'get-pickup (pickup-type eco-pill-dark) -1.0) + ) + (target-invisible-stop) + (let ((v1-45 (ja-group))) + (when (not (and (and v1-45 + (or (= v1-45 jakb-darkjak-get-off-ja) + (= v1-45 jakb-darkjak-get-off-end-ja) + (= v1-45 jakb-darkjak-get-on-fast-ja) + (= v1-45 (-> self draw art-group data 461)) + ) + ) + (= (-> self skel root-channel 0) (-> self skel channel)) + ) + ) + (sound-play "djak-off") + (countdown (v1-57 (+ (-> self skel active-channels) (-> self skel float-channels))) + (let ((a0-36 (-> self skel channel v1-57))) + (cond + ((= (-> a0-36 frame-group) (-> self draw art-group data 442)) + (set! (-> a0-36 frame-group) (the-as art-joint-anim jakb-walk-ja)) + ) + ((= (-> a0-36 frame-group) (-> self draw art-group data 443)) + (set! (-> a0-36 frame-group) (the-as art-joint-anim jakb-run-ja)) + ) + ) + ) + ) + (joint-control-cleanup + (-> self skel) + (-> self ext-anim-control heap) + (the-as art-joint-anim jakb-stance-loop-ja) + ) + (send-event (ppointer->process (-> self sidekick)) 'cleanup) + ) + ) + (set! (-> self darkjak latch-out-time) 0) + 0 + ) + ((zero? (-> self darkjak latch-out-time)) + (if (!= (-> self darkjak-interp) 0.0) + (set-time! (-> self darkjak latch-out-time)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function target-darkjak-process +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior target-darkjak-process target () + (local-vars (a3-3 vector)) + (cond + ((nonzero? (-> self darkjak latch-out-time)) + (if (time-elapsed? (-> self darkjak latch-out-time) (seconds 0.4)) + (target-darkjak-end-mode #t) + ) + ) + ((and (focus-test? self dark) (nonzero? (-> self darkjak))) + (let ((a1-0 'eco-red)) + (target-danger-set! (-> self control danger-mode) a1-0) + ) + (update-transforms (-> self control)) + (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 control) a1-1) + ) + (target-danger-set! (-> self control danger-mode) #f) + (update-transforms (-> self control)) + (if (and (or (< (-> self game eco-pill-dark) 1.0) + (or (not (logtest? (the-as game-feature (logand (game-feature darkjak) (-> *setting-control* user-current features))) + (-> self game features) + ) + ) + (not (-> *setting-control* user-current darkjak)) + ) + ) + (not (focus-test? self dead dangerous hit grabbed)) + (not (and (-> self next-state) (let ((v1-37 (-> self next-state name))) + (or (= v1-37 'target-darkjak-get-on) (= v1-37 'target-darkjak-get-off)) + ) + ) + ) + (or (not (logtest? (-> self darkjak stage) (darkjak-stage force-on active))) + (not (-> *setting-control* user-current darkjak)) + (not (logtest? (the-as game-feature (logand (game-feature darkjak) (-> *setting-control* user-current features))) + (-> self game features) + ) + ) + ) + ) + (go target-darkjak-get-off) + ) + ) + (else + (seek! (-> self darkjak-interp) 0.0 (* 2.0 (seconds-per-frame))) + (if (= (-> self darkjak-interp) 0.0) + (set! (-> self darkjak-giant-interp) 1.0) + ) + ) + ) + (seekl! (-> self darkjak lightning-count) 0 1) + (let ((f30-0 (-> self darkjak-interp))) + (let ((f28-0 (lerp-scale 1.0 (* 1.05 (-> self darkjak-giant-interp)) f30-0 0.0 1.0)) + (f26-0 (lerp-scale 1.0 (* 0.20000002 (+ 5.0 (-> self darkjak-giant-interp))) f30-0 0.0 1.0)) + ) + (set-vector! (-> self control scale) f28-0 f28-0 f28-0 1.0) + (let ((a3-2 (new 'stack-no-clear 'vector))) + (set! (-> a3-2 x) f26-0) + (set! (-> a3-2 y) 1.0) + (set! (-> a3-2 z) f26-0) + (set! (-> a3-2 w) 1.0) + (trs-set! (-> self upper-body) (the-as vector #f) (the-as quaternion #f) a3-2) + ) + (let ((f0-15 (* 1.1 f26-0))) + (cond + ((= (-> self ext-geo) (target-geo jakb)) + (set! a3-3 (new 'stack-no-clear 'vector)) + (set! (-> a3-3 x) (/ f28-0 (* f28-0 f0-15))) + (set! (-> a3-3 y) (/ f28-0 f28-0)) + (set! (-> a3-3 z) (/ f28-0 (* f28-0 f0-15))) + (set! (-> a3-3 w) 1.0) + ) + (else + (set! a3-3 (new 'stack-no-clear 'vector)) + (set! (-> a3-3 x) (* 0.95 (/ f28-0 (* f28-0 f0-15)))) + (set! (-> a3-3 y) (* 0.92 (/ f28-0 f28-0))) + (set! (-> a3-3 z) (* 0.95 (/ f28-0 (* f28-0 f0-15)))) + (set! (-> a3-3 w) 1.0) + ) + ) + ) + ) + (cond + ((logtest? (game-secrets little-head) (-> self game secrets)) + (dotimes (v1-73 3) + (set! (-> a3-3 data v1-73) (* 0.4 (-> a3-3 data v1-73))) + ) + ) + ((logtest? (game-secrets big-head) (-> self game secrets)) + (dotimes (v1-79 3) + (set! (-> a3-3 data v1-79) (* 2.0 (-> a3-3 data v1-79))) + ) + ) + ) + (trs-set! (-> self neck) (the-as vector #f) (the-as quaternion #f) a3-3) + (let* ((a0-42 (-> self horns)) + (t9-13 (method-of-object a0-42 trs-set!)) + (a1-14 #f) + (a2-6 #f) + (a3-4 (new 'stack-no-clear 'vector)) + ) + (set! (-> a3-4 x) f30-0) + (set! (-> a3-4 y) f30-0) + (set! (-> a3-4 z) f30-0) + (set! (-> a3-4 w) 1.0) + (t9-13 a0-42 (the-as vector a1-14) (the-as quaternion a2-6) a3-4) + ) + (when (and (>= f30-0 0.5) (and (not (focus-test? self in-head)) + (not (logtest? (-> self draw status) (draw-control-status no-draw no-draw-temp))) + (not (movie?)) + ) + ) + (if (= (-> self invisible-interp) 0.0) + (launch-particles + (-> *part-id-table* 173) + (process-drawable-random-point! self (new 'stack-no-clear 'vector)) + ) + ) + (cond + ((!= (-> self invisible-interp) 0.0) + ) + ((rand-vu-percent? 0.25) + (when (>= (- (-> *display* game-clock frame-counter) (-> self shock-effect-time)) (seconds 0.02)) + (set! (-> self shock-effect-time) (-> *display* game-clock frame-counter)) + (process-drawable-shock-wall-effect + self + (-> *lightning-spec-id-table* 9) + lightning-probe-callback + (-> *part-id-table* 187) + ) + ) + ) + ((rand-vu-percent? 0.1) + (when (>= (- (-> *display* game-clock frame-counter) (-> self shock-effect-time)) (seconds 0.02)) + (set! (-> self shock-effect-time) (-> *display* game-clock frame-counter)) + (process-drawable-shock-effect + self + (-> *lightning-spec-id-table* 7) + lightning-probe-callback + (-> *part-id-table* 187) + 0 + 0 + 40960.0 + ) + ) + ) + ) + ) + (set-darkjak-texture-morph! (if (logtest? (-> self target-effect) 64) + 1.0 + f30-0 + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate target-darkjak-get-on (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('darkjak) + (when (zero? (-> self darkjak want-stage)) + (set! (-> self darkjak want-stage) (the-as darkjak-stage (-> block param 0))) + #t + ) + ) + (('touched) + (if ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry (-> block param 0)) + (-> self control) + (the-as uint 1920) + ) + (target-send-attack + proc + (-> self control danger-mode) + (the-as touching-shapes-entry (-> block param 0)) + (the-as int (-> self control target-attack-id)) + (the-as int (-> self control attack-count)) + (-> self control penetrate-using) + ) + (target-generic-event-handler proc argc message block) + ) + ) + (('attack-invinc) + (target-attacked + message + (the-as attack-info (-> block param 1)) + proc + (the-as touching-shapes-entry (-> block param 0)) + target-hit + ) + ) + (else + (target-generic-event-handler proc argc message block) + ) + ) + ) + :exit (behavior () + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still)) + (set! (-> self darkjak-interp) 1.0) + (remove-setting! 'bg-r) + (remove-setting! 'bg-g) + (remove-setting! 'bg-b) + (remove-setting! 'bg-a) + (persist-with-delay *setting-control* 'bg-a-speed (seconds 3) 'bg-a-speed 'abs 0.5 0) + (target-danger-set! 'harmless #f) + (remove-setting! 'gun) + (persist-with-delay *setting-control* 'gun (seconds 0.5) 'gun #f 0.0 0) + (apply-settings *setting-control*) + (target-gun-end-mode #t) + ) + :code (behavior ((arg0 darkjak-stage)) + (send-event (handle->process (-> self notify)) 'notify 'attack 19) + (set-setting! 'gun #f 0.0 0) + (apply-settings *setting-control*) + (target-lightjak-end-mode #t) + (set! (-> self darkjak latch-out-time) 0) + (set! (-> self lightjak get-off-lock) #f) + (set! (-> self darkjak stage) (logior arg0 (darkjak-stage bomb0))) + (if (logtest? (game-feature darkjak-bomb0) (-> self game features)) + (logior! (-> self darkjak stage) (darkjak-stage invinc)) + ) + (if (logtest? (game-feature darkjak-bomb1) (-> self game features)) + (logior! (-> self darkjak stage) (darkjak-stage giant)) + ) + (if (logtest? (game-feature feature45) (-> self game features)) + (logior! (-> self darkjak stage) (darkjak-stage disable-force-on)) + ) + (if (logtest? (game-feature feature44) (-> self game features)) + (logior! (-> self darkjak stage) (darkjak-stage no-anim)) + ) + (if (logtest? (game-feature darkjak-smack) (-> self game features)) + (logior! (-> self darkjak stage) (darkjak-stage bomb1)) + ) + (set! (-> self darkjak want-stage) (-> self darkjak stage)) + (set! (-> self neck flex-blend) 0.0) + (set! (-> self control mod-surface) *darkjak-trans-mods*) + (set-time! (-> self darkjak start-time)) + (set! (-> self darkjak attack-count) (the-as uint 0)) + (set! (-> self darkjak-giant-interp) 1.0) + (logior! (-> self focus-status) (focus-status dark)) + (set! (-> self pending-ext-anim) (target-anim dark)) + (set-time! (-> self fact darkjak-start-time)) + (set! (-> self fact darkjak-effect-time) (seconds 20)) + (set! (-> self darkjak mode-sound-bank) (add-setting! 'mode-sound-bank 'modedark 0.0 0)) + (set! (-> self darkjak lightning-count) 0) + (cond + ((logtest? (-> self darkjak stage) (darkjak-stage ds8)) + (logclear! (-> self target-flags) (target-flags tf4)) + (logclear! (-> self darkjak stage) (darkjak-stage bomb1 invinc giant no-anim disable-force-on)) + (target-invisible-start (-> *TARGET-bank* invisible-duration)) + (set! (-> self fact darkjak-effect-time) (-> *TARGET-bank* invisible-duration)) + ) + ((logtest? (-> self darkjak stage) (darkjak-stage disable-force-on)) + (logior! (-> self target-flags) (target-flags tf4)) + ) + (else + (logclear! (-> self target-flags) (target-flags tf4)) + ) + ) + (if (logtest? arg0 (darkjak-stage ds9)) + (go target-stance) + ) + (target-start-attack) + (target-danger-set! 'get-on #f) + (set-setting! 'bg-r 'abs 0.1 0) + (set-setting! 'bg-b 'abs 0.1 0) + (set-forward-vel 0.0) + (let ((gp-1 0)) + (while (not (logtest? (-> self control status) (collide-status on-surface))) + (target-falling-anim-trans) + (+! gp-1 (- (current-time) (-> self clock old-frame-counter))) + (if (>= gp-1 300) + (go target-falling #f) + ) + (suspend) + ) + ) + (sound-play "djak-transform") + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-darkjak-get-on-fast-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (set! (-> self darkjak-interp) (lerp-scale 0.0 1.0 (ja-aframe-num 0) 5.0 15.0)) + (set-setting! 'bg-a 'abs (* 0.45 (-> self darkjak-interp)) 0) + (suspend) + (ja :num! (seek!)) + ) + (while (!= (-> self ext-anim) (target-anim dark)) + (let ((v1-135 (ja-group))) + (when (not (and v1-135 (= v1-135 jakb-darkjak-get-on-fast-loop-ja))) + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! jakb-darkjak-get-on-fast-loop-ja :num! min) + ) + ) + (suspend) + (ja :num! (loop!)) + ) + (go target-stance) + ) + :post (-> target-grab post) + ) + +;; failed to figure out what this is: +(defstate target-darkjak-get-off (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('pole-grab 'darkjak 'lightjak 'slide 'wade 'launch 'edge-grab) + #f + ) + (('change-mode) + (case (-> block param 0) + (('grab) + (when (not (focus-test? self dead)) + (if (not (-> block param 1)) + #t + (go target-grab 'stance) + ) + ) + ) + ) + ) + (('attack-invinc) + (target-attacked + message + (the-as attack-info (-> block param 1)) + proc + (the-as touching-shapes-entry (-> block param 0)) + target-hit + ) + ) + (else + (target-generic-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (logior! (-> self target-flags) (target-flags lleg-still rleg-still)) + (set! (-> self neck flex-blend) 0.0) + (set! (-> self control mod-surface) *darkjak-trans-mods*) + (kill-persister *setting-control* (the-as engine-pers 'bg-a-speed) 'bg-a-speed) + ) + :exit (behavior () + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still)) + (target-darkjak-end-mode #t) + ) + :trans (-> target-darkjak-get-on trans) + :code (behavior () + (let ((v1-1 (-> self water flags))) + (cond + ((and (logtest? (water-flag touch-water) v1-1) + (logtest? (water-flag under-water swimming) v1-1) + (not (logtest? (focus-status mech) (-> self focus-status))) + ) + (go target-swim-stance) + ) + ((let ((v1-10 (ja-group))) + (not (and v1-10 (= v1-10 jakb-darkjak-get-on-fast-ja))) + ) + (let ((gp-0 0)) + (while (not (logtest? (-> self control status) (collide-status on-surface))) + (target-falling-anim-trans) + (+! gp-0 (- (current-time) (-> self clock old-frame-counter))) + (if (>= gp-0 300) + (go target-falling #f) + ) + (suspend) + ) + ) + ) + ) + ) + (cond + ((logtest? (-> self control status) (collide-status on-water)) + ) + (else + (let ((v1-30 (ja-group))) + (cond + ((and v1-30 (= v1-30 jakb-darkjak-get-on-fast-ja)) + (ja-no-eval :num! (seek! 0.0)) + (while (not (ja-done? 0)) + (seek! (-> self darkjak-interp) 0.0 (* 2.0 (seconds-per-frame))) + (suspend) + (ja-eval) + ) + (ja-channel-push! 1 (seconds 0.1)) + ) + ((let ((v1-43 (ja-group))) + (and v1-43 (or (= v1-43 (-> self draw art-group data 451)) + (= v1-43 (-> self draw art-group data 466)) + (= v1-43 (-> self draw art-group data 467)) + (= v1-43 (-> self draw art-group data 468)) + ) + ) + ) + (sound-play "djak-off") + (ja-no-eval :group! (-> self draw art-group data 461) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (set! (-> self darkjak-interp) (lerp-scale 1.0 0.0 (ja-aframe-num 0) 90.0 115.0)) + (suspend) + (ja :num! (seek!)) + ) + ) + ((let ((v1-74 (ja-group))) + (and v1-74 (= v1-74 (-> self draw art-group data 461))) + ) + (sound-play "djak-off") + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (set! (-> self darkjak-interp) (lerp-scale 1.0 0.0 (ja-aframe-num 0) 90.0 115.0)) + (suspend) + (ja-eval) + ) + ) + (else + (sound-play "djak-off") + (ja-channel-push! 1 (seconds 0.05)) + (ja-no-eval :group! jakb-darkjak-get-off-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (set! (-> self darkjak-interp) (lerp-scale 1.0 0.0 (ja-aframe-num 0) 10.0 60.0)) + (if (and (>= (ja-aframe-num 0) 24.0) (!= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0)) + (goto cfg-79) + ) + (suspend) + (ja :num! (seek!)) + ) + (ja-no-eval :group! jakb-darkjak-get-off-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (set! (-> self darkjak-interp) (lerp-scale 1.0 0.0 (ja-aframe-num 0) 10.0 60.0)) + (if (and (>= (ja-aframe-num 0) 24.0) (!= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0)) + (goto cfg-79) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + ) + ) + (label cfg-79) + (vector-reset! (-> self control transv)) + ((-> target-darkjak-get-off exit)) + (go target-stance) + ) + :post (-> target-grab post) + ) + +;; failed to figure out what this is: +(defstate target-darkjak-running-attack (target) + :event (-> target-running-attack event) + :enter (-> target-running-attack enter) + :exit (behavior () + (remove-setting! 'rapid-tracking) + ((-> target-running-attack exit)) + ) + :trans (-> target-running-attack trans) + :code (behavior () + (local-vars + (sv-16 float) + (sv-20 float) + (sv-24 int) + (sv-32 int) + (sv-40 int) + (sv-48 float) + (sv-56 handle) + (sv-64 int) + ) + (set-setting! 'rapid-tracking #f 0.0 0) + ((lambda :behavior target + () + (set! (-> self control bend-target) (* 0.5 (-> self control bend-target))) + (if (logtest? (water-flag touch-water) (-> self water flags)) + (sound-play "swim-stroke") + ) + (set! (-> self control dynam gravity-max) 368640.0) + (set! (-> self control dynam gravity-length) 368640.0) + (let ((gp-1 (cond + ((zero? (-> self control unknown-word000)) + (set! (-> self control unknown-word000) 1) + (-> self draw art-group data 452) + ) + (else + (set! (-> self control unknown-word000) 0) + (-> self draw art-group data 459) + ) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.02)) + (ja-no-eval :group! gp-1 :num! (seek!)) + ) + (target-start-attack) + (target-danger-set! 'punch #f) + (if (not (logtest? (-> self darkjak stage) (darkjak-stage force-on active))) + (send-event self 'get-pickup (pickup-type eco-pill-dark) (- (-> *FACT-bank* darkjak-punch-inc))) + ) + (let ((a0-11 (-> self control impact-ctrl)) + (t9-7 (method-of-type impact-control initialize)) + (a1-5 self) + (v1-44 (ja-group)) + ) + (t9-7 + a0-11 + a1-5 + (if (and v1-44 (= v1-44 (-> self draw art-group data 452))) + 28 + 19 + ) + 3276.8 + (-> self control root-prim prim-core collide-with) + ) + ) + ) + ) + (set! sv-16 (the-as float 0.0)) + (set! sv-20 (the-as float 1.0)) + (set! sv-24 0) + (set! sv-32 0) + (set! sv-40 0) + (set! sv-48 (the-as float 1.0)) + (set! sv-56 (the-as handle #f)) + (set! sv-64 0) + (until (ja-done? 0) + (if (and (cpad-pressed? (-> self control cpad number) square) + (not (logtest? (-> self target-flags) (target-flags prevent-jump prevent-attack))) + (not (logtest? (-> self control current-surface flags) (surface-flag no-attack))) + (and (focus-test? self dark) + (nonzero? (-> self darkjak)) + (logtest? (-> self darkjak stage) (darkjak-stage bomb0)) + ) + (< sv-32 2) + ) + (set! sv-40 (the-as int (current-time))) + ) + (when (time-elapsed? (the-as time-frame sv-40) (seconds 0.5)) + (set! sv-40 0) + 0 + ) + (if (and (nonzero? sv-40) + (< (- (the float (+ (-> (ja-group) frames num-frames) -1)) (/ 2.0 (-> (ja-group) artist-step))) + (ja-frame-num 0) + ) + ) + ((lambda :behavior target + ((arg0 (pointer float)) (arg1 (pointer int64)) (arg2 (pointer int64))) + (let ((s3-0 (if (and (focus-test? self dark) + (nonzero? (-> self darkjak)) + (logtest? (-> self darkjak stage) (darkjak-stage no-anim)) + ) + (combo-tracker-method-13 + (-> self control unknown-combo-tracker00) + (-> self control send-attack-dest) + (-> self control trans) + 24576.0 + (-> self control c-R-w fvec) + 65536.0 + ) + ) + ) + ) + (when #t + (+! (-> arg1 0) 1) + (if s3-0 + (combo-tracker-method-12 + (-> self control unknown-combo-tracker00) + (-> self control trans) + (get-trans s3-0 3) + s3-0 + (current-time) + ) + ) + (target-start-attack) + (target-danger-set! 'punch #f) + (if (not (logtest? (-> self darkjak stage) (darkjak-stage force-on active))) + (send-event self 'get-pickup (pickup-type eco-pill-dark) (- (-> *FACT-bank* darkjak-punch-inc))) + ) + (let ((v1-34 (ja-group))) + (cond + ((and v1-34 (or (= v1-34 (-> self draw art-group data 452)) (= v1-34 (-> self draw art-group data 459)))) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! (-> self draw art-group data 454) :num! (seek!)) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! (-> self draw art-group data 463) :num! (seek!)) + ) + ) + ) + (initialize (-> self control impact-ctrl) self 28 3276.8 (-> self control root-prim prim-core collide-with)) + (set! (-> arg0 0) (fmax 0.0 (-> arg0 0))) + ) + ) + (set! (-> arg2 0) 0) + 0 + ) + (& sv-16) + (the-as (pointer int64) (& sv-32)) + (the-as (pointer int64) (& sv-40)) + ) + ) + (compute-alignment! (-> self align)) + (when (not (ja-min? 0)) + (cond + ((and (>= (ja-frame-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-falling #f) + ) + ((and (nonzero? sv-32) + (>= sv-16 -40960.0) + (let ((v1-83 (ja-group))) + (not (and (and v1-83 (= v1-83 jakb-darkjak-attack-combo3-ja)) (>= (ja-aframe-num 0) 77.0))) + ) + (send-event (handle->process (-> self control unknown-combo-tracker00 target)) 'combo) + ) + (let* ((s5-0 (handle->process (-> self control unknown-combo-tracker00 target))) + (gp-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (let ((s5-1 (get-trans (the-as process-focusable gp-0) 3))) + (when (and (< 2048.0 (vector-vector-distance (-> self control trans) s5-1)) + (or (and (= gp-0 (handle->process sv-56)) (not (time-elapsed? (the-as time-frame sv-64) (seconds 0.1)))) + (time-elapsed? (the-as time-frame sv-64) (seconds 1)) + ) + ) + (forward-up-nopitch->quaternion + (-> self control dir-targ) + (vector-! (new 'stack-no-clear 'vector) s5-1 (-> self control trans)) + (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self control quat)) + ) + (let ((v1-124 + (point-tracker-method-11 + (-> self control unknown-combo-tracker00) + (new 'stack-no-clear 'vector) + (-> self control trans) + s5-1 + (* 0.009107469 (the float (- (current-time) (-> self control unknown-combo-tracker00 move-start-time)))) + ) + ) + ) + (set! sv-16 (fmin 163840.0 (sqrtf (+ (* (-> v1-124 x) (-> v1-124 x)) (* (-> v1-124 z) (-> v1-124 z)))))) + ) + (set-forward-vel sv-16) + ) + ) + (when (!= gp-0 (handle->process sv-56)) + (set! sv-56 (process->handle gp-0)) + (set! sv-64 (the-as int (current-time))) + ) + ) + ) + ((< sv-16 0.0) + (set! sv-16 (seek sv-16 -0.04096 (* 491520.0 (seconds-per-frame)))) + (set-forward-vel sv-16) + ) + ((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)) + (zero? sv-32) + (time-elapsed? (-> self control unknown-combo-tracker00 move-start-time) (seconds 0.2)) + ) + (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 sv-16) + ) + (else + (set! sv-16 + (* (target-align-vel-z-adjust (-> self align delta trans z)) (-> self clock frames-per-second) sv-20) + ) + (set-forward-vel sv-16) + ) + ) + ) + (let ((gp-1 (new-stack-vector0))) + (vector-matrix*! gp-1 (-> self control transv) (-> self control w-R-c)) + (set! (-> gp-1 y) 0.0) + (vector-matrix*! (-> self control align-xz-vel) gp-1 (-> 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! sv-16 (the-as float (-> self control unknown-word04))) + (set! (-> self control unknown-word04) (the-as uint 0.0)) + ) + (when (and (>= sv-16 0.0) + (let ((gp-2 (ja-group)) + (f30-2 (ja-aframe-num 0)) + ) + (if (or (and (= gp-2 (-> self draw art-group data 452)) + (>= f30-2 11.0) + (>= (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 452)) frames num-frames) -1)) + (ja-frame-num 0) + ) + ) + (and (= gp-2 (-> self draw art-group data 459)) + (>= f30-2 11.0) + (>= (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 459)) frames num-frames) -1)) + (ja-frame-num 0) + ) + ) + (and (= gp-2 (-> self draw art-group data 454)) + (>= f30-2 49.0) + (>= (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 454)) frames num-frames) -1)) + (ja-frame-num 0) + ) + ) + (and (= gp-2 jakb-darkjak-attack-combo3-ja) + (or (and (>= f30-2 62.0) (>= 77.0 f30-2)) + (and (>= f30-2 82.0) + (>= (the float (+ (-> (the-as art-joint-anim jakb-darkjak-attack-combo3-ja) frames num-frames) -1)) + (ja-frame-num 0) + ) + ) + ) + ) + (and (= gp-2 (-> self draw art-group data 463)) + (>= f30-2 62.0) + (>= (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 463)) frames num-frames) -1)) + (ja-frame-num 0) + ) + ) + ) + #t + ) + ) + ) + (let ((gp-3 (new 'stack-no-clear 'collide-query))) + (when (and (>= (impact-control-method-11 + (-> self control impact-ctrl) + gp-3 + (the-as process #f) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + 0.0 + ) + (>= 0.0 (vector-dot (-> gp-3 best-other-tri normal) (-> self control impact-ctrl dir))) + ) + (when (= (-> gp-3 best-other-tri pat mode) (pat-mode wall)) + (cond + ((logtest? (-> *part-group-id-table* 12 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> gp-3 best-other-tri intersect quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 12)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-3 best-other-tri intersect quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 12)) + ) + ) + (let ((name (static-sound-name "djak-punch-hit"))) + (play-effect-sound + (-> self skel effect) + (the-as symbol "punch") + -1.0 + (-> self control impact-ctrl joint) + (the-as basic #f) + (the-as sound-name name) + ) + ) + (activate! *camera-smush-control* 819.2 15 75 1.0 0.9 (-> *display* camera-clock)) + (set! sv-16 (the-as float -61440.0)) + ) + ) + ) + ) + (let ((gp-6 (ja-group)) + (f0-59 (ja-aframe-num 0)) + ) + (if (and (= gp-6 jakb-darkjak-attack-combo3-ja) + (>= f0-59 80.0) + (>= (the float (+ (-> (the-as art-joint-anim jakb-darkjak-attack-combo3-ja) frames num-frames) -1)) + (ja-frame-num 0) + ) + ) + (align! (-> self align) (align-opts adjust-y-vel) 1.0 1.6 1.0) + ) + ) + (suspend) + (ja :num! (seek! max (* (-> self control current-surface align-speed) sv-48))) + (if (time-elapsed? (-> self state-time) (seconds 0.1)) + (set! (-> *run-attack-mods* turnvv) 0.0) + ) + (if (< 2 sv-24) + (set! sv-20 (* sv-20 (fmin 1.0 (-> self control zx-vel-frac)))) + ) + (set! sv-24 (+ sv-24 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-falling #f) + ) + (go target-stance) + ) + :post target-post + ) + +;; failed to figure out what this is: +(defstate target-darkjak-smack-charge (target) + :event target-standard-event-handler + :enter (-> (the-as (state target) target-duck-stance) enter) + :exit (behavior () + (remove-setting! 'bg-r) + (remove-setting! 'bg-g) + (remove-setting! 'bg-b) + (remove-setting! 'bg-a) + (update-rates! (-> *display* entity-clock) 1.0) + (persist-with-delay *setting-control* 'bg-a-speed (seconds 3) 'bg-a-speed 'abs 0.5 0) + (let ((gp-0 (handle->process (-> self darkjak charge-effect)))) + (when gp-0 + (let ((v1-18 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-18 command) (sound-command set-param)) + (set! (-> v1-18 id) (-> self control unknown-sound-id00)) + (set! (-> v1-18 params volume) -4) + (set! (-> v1-18 auto-time) 120) + (set! (-> v1-18 auto-from) 2) + (set! (-> v1-18 params mask) (the-as uint 17)) + (-> v1-18 id) + ) + (deactivate gp-0) + ) + ) + ((-> target-duck-stance exit)) + ) + :trans (behavior () + ((-> self state-hook)) + (if (and (not (cpad-hold? (-> self control cpad number) r1)) + (and (focus-test? self dark) (nonzero? (-> self darkjak))) + (= (-> self ext-anim) (target-anim dark)) + (zero? (-> self darkjak latch-out-time)) + (logtest? (the-as game-feature (logand (game-feature darkjak-smack) (-> *setting-control* user-current features))) + (-> self game features) + ) + (can-hands? #t) + ) + (go target-darkjak-smack) + ) + (if (or (or (not (cpad-hold? (-> self control cpad number) r1)) + (logtest? (-> self target-flags) (target-flags prevent-attack prevent-duck)) + ) + (!= (-> self ext-anim) 2) + ) + (go target-stance) + ) + (if (want-to-powerjak?) + (go target-powerjak-get-on) + ) + (fall-test target-falling (-> *TARGET-bank* fall-height)) + (slide-down-test) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and (and v1-2 (= v1-2 (-> self draw art-group data 478))) + (= (-> self skel root-channel 0) (-> self skel channel)) + ) + ) + ((and (and (focus-test? self dark) (nonzero? (-> self darkjak))) (= (-> self ext-anim) (target-anim dark))) + (ja-channel-push! 1 (seconds 0.2)) + ) + (else + (go target-stance) + ) + ) + ) + (until #f + (set-setting! 'bg-r 'abs 0.1 0) + (set-setting! 'bg-b 'abs 0.1 0) + (set-setting! 'bg-a 'abs 0.45 0) + (update-rates! (-> *display* entity-clock) 0.4) + (ja-no-eval :group! (-> self draw art-group data 478) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((v1-46 (and (= (-> self skel root-channel 0) (-> self skel channel)) + (not (handle->process (-> self darkjak charge-effect))) + ) + ) + ) + (when v1-46 + (set! (-> self control unknown-sound-id00) (sound-play "djak-bolt-charg")) + (set! (-> self darkjak charge-effect) + (ppointer->handle (if (logtest? (-> *part-group-id-table* 75 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 75) + :duration -1 + :target self + :mat-joint 59 + ) + (part-tracker-spawn + part-tracker + :to self + :group (-> *part-group-id-table* 75) + :duration -1 + :target self + :mat-joint 59 + ) + ) + ) + ) + ) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post target-post + ) + +;; failed to figure out what this is: +(defstate target-darkjak-smack (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + ((-> target-running-attack event) proc argc message block) + ) + :enter (behavior () + ((-> target-running-attack enter)) + (set-setting! 'gun #f 0.0 0) + (apply-settings *setting-control*) + ) + :exit (behavior () + (update-rates! (-> *display* entity-clock) 1.0) + (update-rates! (-> *display* bg-clock) 1.0) + (update-rates! (-> *display* part-clock) 1.0) + (remove-setting! 'gun) + ((-> target-darkjak-running-attack exit)) + ) + :trans (-> target-running-attack trans) + :code (behavior () + (target-start-attack) + (target-danger-set! 'dark-smack #f) + (if (not (logtest? (-> self darkjak stage) (darkjak-stage force-on active))) + (send-event self 'get-pickup (pickup-type eco-pill-dark) (- (-> *FACT-bank* darkjak-smack-inc))) + ) + (set! (-> self control lightjak-sound-id) (sound-play "djak-pnch-swing")) + (set! (-> self control dynam gravity-max) 368640.0) + (set! (-> self control dynam gravity-length) 368640.0) + (let ((gp-1 (-> self draw art-group data 476))) + (ja-channel-push! 1 (seconds 0.02)) + (ja-no-eval :group! gp-1 :num! (seek!)) + ) + (initialize (-> self control impact-ctrl) self 28 3276.8 (-> self control root-prim prim-core collide-with)) + (let ((f28-0 (the-as number 0.0))) + 0.8 + (let ((gp-2 0) + (f30-0 1.0) + (s5-1 #f) + (f26-0 0.6) + ) + (until (ja-done? 0) + (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-falling #f) + ) + ((< (the-as float f28-0) 0.0) + (set! f28-0 (seek (the-as float f28-0) -0.04096 (* 491520.0 (seconds-per-frame)))) + (set-forward-vel (the-as float f28-0)) + ) + ((and (nonzero? (-> self control unknown-time-frame18)) + (time-elapsed? (-> self control unknown-time-frame18) (seconds 0.04)) + ) + ) + ((ja-done? 0) + (set-forward-vel (the-as float f28-0)) + ) + (else + (set-forward-vel (the-as float f28-0)) + ) + ) + ) + (set! f26-0 (seek f26-0 0.3 (* 2.0 (seconds-per-frame)))) + (update-rates! (-> *display* entity-clock) f26-0) + (update-rates! (-> *display* bg-clock) f26-0) + (update-rates! (-> *display* part-clock) f26-0) + (let ((s4-0 (new-stack-vector0))) + (vector-matrix*! s4-0 (-> self control transv) (-> self control w-R-c)) + (set! (-> s4-0 y) 0.0) + (vector-matrix*! (-> self control align-xz-vel) s4-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! f28-0 (-> self control unknown-word04)) + (set! (-> self control unknown-word04) (the-as uint (the-as float 0.0))) + ) + (let ((v1-96 + (and (not s5-1) + (let ((s4-1 (ja-group)) + (f0-19 (ja-aframe-num 0)) + ) + (if (and (= s4-1 (-> self draw art-group data 476)) + (>= f0-19 16.0) + (>= (the float (+ (-> (the-as art-joint-anim (-> self draw art-group data 476)) frames num-frames) -1)) + (ja-frame-num 0) + ) + ) + #t + ) + ) + ) + ) + ) + (when v1-96 + (set! s5-1 #t) + (let ((s4-2 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> s4-2 ent) (-> self entity)) + (set! (-> s4-2 charge) 1.0) + (set! (-> s4-2 options) (projectile-options)) + (logclear! (-> s4-2 options) (projectile-options po14 po15 po16)) + (set! (-> s4-2 pos quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node jakb-lod0-jg sk_rhand)) quad) + ) + (set! (-> s4-2 notify-handle) (the-as handle #f)) + (set! (-> s4-2 owner-handle) (the-as handle #f)) + (set! (-> s4-2 target-handle) (the-as handle #f)) + (set! (-> s4-2 target-pos quad) (the-as uint128 0)) + (set! (-> s4-2 ignore-handle) (process->handle self)) + (let* ((v1-125 *game-info*) + (a0-43 (+ (-> v1-125 attack-id) 1)) + ) + (set! (-> v1-125 attack-id) a0-43) + (set! (-> s4-2 attack-id) a0-43) + ) + (set! (-> s4-2 timeout) (seconds 4)) + (vector-float*! (-> s4-2 vel) (-> self control c-R-w fvec) 245760.0) + (let ((s3-1 (get-process *default-dead-pool* darkjak-ball #x8000 1))) + (when s3-1 + (let ((t9-28 (method-of-type process activate))) + (t9-28 s3-1 self "projectile" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-1 projectile-init-by-other s4-2) + (-> s3-1 ppointer) + ) + ) + ) + ) + ) + (suspend) + (ja :num! (seek! max f30-0)) + (if (time-elapsed? (-> self state-time) (seconds 0.1)) + (set! (-> *run-attack-mods* turnvv) 0.0) + ) + (+! gp-2 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-falling #f) + ) + (go target-stance) + ) + :post target-post + ) + +;; definition for method 9 of type darkjak-info +;; WARN: Return type mismatch int vs none. +(defmethod update-clock! ((this darkjak-info) (arg0 int)) + (when (-> this clock-on) + (+! (-> this clock-pos) (* (-> this clock-vel) (seconds-per-frame))) + (+! (-> this clock-vel) (* 4.0 (seconds-per-frame))) + (cond + ((< 1.0 (-> this clock-pos)) + (set! (-> this clock-pos) 1.0) + (set! (-> this clock-vel) 0.0) + ) + ((< (-> this clock-pos) 0.05) + (set! (-> this clock-pos) 0.05) + (set! (-> this clock-vel) 1.0) + ) + ) + (update-rates! (-> *display* entity-clock) (-> this clock-pos)) + (update-rates! (-> *display* bg-clock) (-> this clock-pos)) + (if (= arg0 16) + (update-rates! (-> *display* target-clock) (-> this clock-pos)) + ) + (when *sound-player-enable* + (let ((v1-27 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-27 command) (sound-command set-param)) + (set! (-> v1-27 id) (-> this process 0 control unknown-sound-id00)) + (set! (-> v1-27 params pitch-mod) (the int (* 1524.0 (- (- 1.0 (-> this clock-pos)))))) + (set! (-> v1-27 params mask) (the-as uint 2)) + (-> v1-27 id) + ) + ) + ) + 0 + (none) + ) + +;; definition for function target-darkjak-bomb-collide +;; WARN: Return type mismatch int vs none. +(defbehavior target-darkjak-bomb-collide target ((arg0 (pointer float)) (arg1 float)) + (seek! (-> arg0 0) arg1 (* 4.0 (seconds-per-frame))) + (set! (-> self control bomb-scale) (-> arg0 0)) + (target-danger-set! 'bomb #f) + (update-transforms (-> self control)) + (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 (-> self control) a1-2) + ) + (set! (-> self control bomb-scale) 0.0) + (target-danger-set! 'bomb #f) + (update-transforms (-> self control)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate target-darkjak-bomb0 (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('pole-grab 'darkjak 'slide 'wade 'launch 'edge-grab 'jump 'shove 'attack 'attack-or-shove) + #f + ) + (('hit) + (let ((v1-1 (the-as object (-> block param 1)))) + (when (and (= (-> block param 0) 'bomb) + (logtest? (process-mask enemy) (-> (the-as process v1-1) mask)) + (let ((v1-7 (ja-group))) + (and v1-7 (= v1-7 (-> self draw art-group data 468))) + ) + (>= (ja-aframe-num 0) 35.0) + (not (-> self darkjak clock-on)) + ) + (set! (-> self darkjak clock-vel) -8.0) + (let ((v0-0 (the-as object #t))) + (set! (-> self darkjak clock-on) (the-as symbol v0-0)) + v0-0 + ) + ) + ) + ) + (('change-mode) + #f + ) + (('attack 'attack-or-shove 'swim) + #f + ) + (else + (target-dangerous-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (logior! (-> self target-flags) (target-flags tf4)) + (set-setting! 'gun #f 0.0 0) + (apply-settings *setting-control*) + (set! (-> self darkjak clock-pos) 1.0) + (set! (-> self darkjak clock-vel) 0.0) + (set! (-> self darkjak clock-on) #f) + (set! (-> self control unknown-sound-id00) + (add-process *gui-control* self (gui-channel jak-effect-1) (gui-action queue) "darkbom0" -99.0 0) + ) + ) + :exit (behavior () + (set-action! + *gui-control* + (gui-action fade) + (-> self control unknown-sound-id00) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (logclear! (-> self target-flags) (target-flags tf6)) + (target-exit) + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) + (remove-setting! 'ambient-volume) + (remove-setting! 'gun) + (set! (-> self darkjak clock-pos) 1.0) + (set! (-> self darkjak clock-vel) 0.0) + (set! (-> self darkjak clock-on) #f) + (update-rates! (-> *display* entity-clock) 1.0) + (update-rates! (-> *display* bg-clock) 1.0) + (update-rates! (-> *display* target-clock) 1.0) + (if (not (and (-> self next-state) (= (-> self next-state name) 'target-darkjak-get-off))) + ((-> target-darkjak-get-off exit)) + ) + ) + :trans (behavior () + (update-clock! (-> self darkjak) 16) + ) + :code (behavior () + (local-vars + (v1-100 symbol) + (sv-16 float) + (sv-20 float) + (sv-160 vector) + (sv-164 (function object :behavior target)) + ) + (set! (-> self darkjak stage) (-> self darkjak want-stage)) + (set! (-> self neck flex-blend) 0.0) + (set! (-> self control mod-surface) *roll-flip-mods*) + (set! (-> self alt-cam-pos quad) (-> self control trans quad)) + (set! sv-16 (the-as float 0.0)) + (set! sv-20 (the-as float 1.0)) + (ja-channel-push! 1 (seconds 0.15)) + (when (jump-hit-ground-stuck?) + (ja-no-eval :group! (-> self draw art-group data 451) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (set! (-> self alt-cam-pos x) (-> self control trans x)) + (set! (-> self alt-cam-pos z) (-> self control trans z)) + (set-forward-vel (* 0.85 (-> self control ctrl-xz-vel))) + (suspend) + (ja :num! (seek!)) + ) + ) + (set-setting! 'music-volume 'rel 0.0 0) + (set-setting! 'sfx-volume 'rel 0.0 0) + (set-setting! 'ambient-volume 'rel 0.0 0) + (ja-no-eval :group! (-> self draw art-group data 466) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (align! (-> self align) (align-opts adjust-y-vel) 1.0 1.0 1.0) + (set! (-> self alt-cam-pos x) (-> self control trans x)) + (set! (-> self alt-cam-pos z) (-> self control trans z)) + (set-forward-vel (* 0.98 (-> self control ctrl-xz-vel))) + (suspend) + (ja :num! (seek!)) + ) + (ja-no-eval :group! (-> self draw art-group data 467) :num! (seek!) :frame-num 0.0) + (let ((f30-0 (the float (target-time-to-ground)))) + (until v1-100 + (set! (-> self alt-cam-pos x) (-> self control trans x)) + (set! (-> self alt-cam-pos z) (-> self control trans z)) + (set-forward-vel (* 0.98 (-> self control ctrl-xz-vel))) + (let ((v1-92 (new-stack-vector0)) + (f0-35 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + ) + 0.0 + (vector-! v1-92 (-> self control transv) (vector-float*! v1-92 (-> self control dynam gravity-normal) f0-35)) + (let* ((f1-5 (vector-length v1-92)) + (f2-0 f1-5) + (f0-36 (+ f0-35 (* -491520.0 (seconds-per-frame)))) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f0-36) + (vector-float*! v1-92 v1-92 (/ f1-5 f2-0)) + ) + ) + ) + (suspend) + (ja :num! (seek! max (lerp-scale 1.5 0.3 f30-0 30.0 210.0))) + (set! v1-100 (or (ja-done? 0) (logtest? (-> self control status) (collide-status on-surface)))) + ) + ) + (logclear! (-> self target-flags) (target-flags tf6)) + (while (not (jump-hit-ground-stuck?)) + (let ((v1-105 (new-stack-vector0)) + (f0-42 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + ) + 0.0 + (vector-! + v1-105 + (-> self control transv) + (vector-float*! v1-105 (-> self control dynam gravity-normal) f0-42) + ) + (let* ((f1-8 (vector-length v1-105)) + (f2-1 f1-8) + (f0-43 (+ f0-42 (* -491520.0 (seconds-per-frame)))) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f0-43) + (vector-float*! v1-105 v1-105 (/ f1-8 f2-1)) + ) + ) + ) + (ja :num! (seek! (ja-aframe 33.0 0))) + (suspend) + ) + (set-forward-vel 0.0) + (ja-no-eval :group! (-> self draw art-group data 468) :num! (seek! (ja-aframe 35.0 0)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 35.0 0))) + ) + (set-action! + *gui-control* + (gui-action play) + (-> self control unknown-sound-id00) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.5)) + (activate! *camera-smush-control* 819.2 15 75 1.0 0.9 (-> *display* camera-clock)) + (target-start-attack) + (target-danger-set! 'bomb #f) + (send-event self 'get-pickup (pickup-type eco-pill-dark) (- (-> *FACT-bank* darkjak-bomb0-inc))) + (set! sv-160 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node jakb-lod0-jg sk_lhand))) + (set! sv-164 (lambda :behavior target + () + (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) + ) + ) + ) + ) + ) + (set! (-> sv-160 y) (-> self control root-prim prim-core world-sphere y)) + (cond + ((logtest? (-> *part-group-id-table* 71 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> sv-160 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 71)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> sv-160 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 71)) + ) + ) + (let ((gp-6 (process-spawn + manipy + :init manipy-init + sv-160 + (-> self entity) + (art-group-get-by-name *level* "skel-bomb-blast" (the-as (pointer level) #f)) + #f + 0 + :name "manipy" + :to self + :stack-size #x20000 + ) + ) + ) + (when gp-6 + (send-event (ppointer->process gp-6) 'anim-mode 'play1) + (send-event (ppointer->process gp-6) 'anim "idle") + (set-vector! (-> (the-as process-drawable (-> gp-6 0)) root scale) sv-20 1.0 sv-20 1.0) + (send-event (ppointer->process gp-6) 'trans-hook sv-164) + ) + ) + (let ((gp-8 (process-spawn + manipy + :init manipy-init + sv-160 + (-> 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 gp-8 + (send-event (ppointer->process gp-8) 'anim-mode 'play1) + (send-event (ppointer->process gp-8) 'anim "idle") + (set-vector! (-> (the-as manipy (-> gp-8 0)) root scale) sv-20 1.0 sv-20 1.0) + ) + ) + (ja-no-eval :num! (seek! (ja-aframe 38.0 0))) + (while (not (ja-done? 0)) + (target-darkjak-bomb-collide (& sv-16) sv-20) + (set-forward-vel 0.0) + (suspend) + (ja-eval) + ) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (target-darkjak-bomb-collide (& sv-16) sv-20) + (set-forward-vel 0.0) + (suspend) + (ja-eval) + ) + (remove-setting! 'music-volume) + (remove-setting! 'sfx-volume) + (remove-setting! 'ambient-volume) + (ja-no-eval :group! (-> self draw art-group data 461) :num! (seek! (ja-aframe 90.0 0)) :frame-num 0.0) + (until (ja-done? 0) + (target-darkjak-bomb-collide (& sv-16) sv-20) + (suspend) + (ja :num! (seek! (ja-aframe 90.0 0))) + ) + (logior! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (send-event (handle->process (-> self notify)) 'notify 'attack 20) + (go target-darkjak-get-off) + ) + :post target-no-stick-post + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 11) (new 'static 'lightning-spec + :name "lightning-darkjak-bomb1" + :flags (lightning-spec-flags lsf0 lsf4) + :adjust-distance #xa + :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 #x3a :page #x4) + :reduction 0.42 + :num-points 80 + :box-size 32768.0 + :merge-factor 0.2 + :merge-count 2 + :radius 2048.0 + :duration 300.0 + :duration-rand 90.0 + :sound (static-sound-spec "transform-zap" :group 0) + ) + ) + +;; definition for function target-bomb1-fire-shot +;; INFO: Used lq/sq +(defbehavior target-bomb1-fire-shot target ((arg0 (array handle)) (arg1 int) (arg2 int)) + (local-vars (sv-128 target) (sv-144 int) (sv-160 vector) (sv-176 vector) (sv-192 vector)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (cond + ((and (>= arg1 0) (< arg1 (-> arg0 length))) + (let ((s5-0 (handle->process (-> arg0 arg1)))) + (when s5-0 + (get-trans (the-as process-focusable s5-0) 3) + (process-spawn + lightning-tracker + :init lightning-tracker-init + (-> *lightning-spec-id-table* 11) + 0 + lightning-probe-callback + s5-0 + 3 + 3 + :name "lightning-tracker" + :to self + :unk 0 + ) + (send-event + s5-0 + 'attack + #f + (static-attack-info :mask (vehicle-impulse-factor) ((id (the-as uint arg2)) + (damage 15.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'ice) + (penetrate-using (penetrate touch dark-skin dark-bomb)) + ) + ) + ) + ) + ) + ) + (else + (let ((gp-1 (get-process *default-dead-pool* lightning-tracker #x4000 0))) + (when gp-1 + (let ((t9-6 (method-of-type lightning-tracker activate))) + (t9-6 (the-as lightning-tracker gp-1) self "lightning-tracker" (the-as pointer #x70004000)) + ) + (let ((s5-1 run-function-in-process) + (s4-1 gp-1) + (s3-0 lightning-tracker-init) + (s2-0 (-> *lightning-spec-id-table* 11)) + (s1-0 0) + (s0-0 lightning-probe-callback) + ) + (set! sv-128 self) + (set! sv-144 3) + (set! sv-192 (new 'stack-no-clear 'vector)) + (set! sv-160 (-> self control trans)) + (set! sv-176 (new 'stack-no-clear 'vector)) + (set! (-> sv-176 x) (rand-vu-float-range -40960.0 40960.0)) + (set! (-> sv-176 y) (rand-vu-float-range -8192.0 8192.0)) + (set! (-> sv-176 z) (rand-vu-float-range -40960.0 40960.0)) + (set! (-> sv-176 w) 1.0) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> sv-160 quad)) + (.lvf vf5 (&-> sv-176 quad)) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-192 quad) vf6) + ((the-as (function object object object object object object object object none) s5-1) + s4-1 + s3-0 + s2-0 + s1-0 + s0-0 + sv-128 + sv-144 + sv-192 + ) + ) + (-> gp-1 ppointer) + ) + ) + #f + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate target-darkjak-bomb1 (target) + :event (-> target-darkjak-bomb0 event) + :enter (behavior ((arg0 float) (arg1 float)) + ((-> target-attack-uppercut-jump enter) arg0 arg1) + (set-setting! 'gun #f 0.0 0) + (apply-settings *setting-control*) + ) + :exit (-> target-darkjak-bomb0 exit) + :trans (behavior () + (if (logtest? (-> self control status) (collide-status on-surface)) + (go target-darkjak-get-off) + ) + (mod-var-jump #t #t (cpad-hold? (-> self control cpad number) x) (-> self control transv)) + (if (and (= (-> self control danger-mode) 'uppercut) + (< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) -8192.0) + ) + (target-danger-set! 'harmless #f) + ) + (slide-down-test) + (update-clock! (-> self darkjak) 32) + ) + :code (behavior ((arg0 float) (arg1 float)) + (local-vars + (sv-112 (array collide-shape)) + (sv-120 int) + (sv-128 vector) + (sv-132 (array handle)) + (sv-136 int) + (sv-144 time-frame) + (sv-152 time-frame) + (sv-160 float) + (sv-164 float) + (sv-168 time-frame) + (sv-176 uint) + ) + (logior! (-> self target-flags) (target-flags tf4)) + (set! (-> self neck flex-blend) 0.0) + (set-setting! 'music-volume 'rel 0.0 0) + (set-setting! 'ambient-volume 'rel 0.0 0) + (compute-alignment! (-> self align)) + (set-action! + *gui-control* + (gui-action play) + (-> self control unknown-sound-id00) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (let ((f0-1 0.9)) + (ja-no-eval :num! (seek! max f0-1)) + ) + (while (not (ja-done? 0)) + (compute-alignment! (-> self align)) + (set! (-> self control turn-go-the-long-way) 1.0) + (set! (-> self darkjak clock-vel) -4.0) + (set! (-> self darkjak clock-on) #t) + (align! (-> self align) (align-opts adjust-y-vel) 1.0 1.0 1.0) + (suspend) + (ja-eval) + ) + (send-event self 'get-pickup (pickup-type eco-pill-dark) (- (-> *FACT-bank* darkjak-bomb1-inc))) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.5)) + (activate! *camera-smush-control* 819.2 15 75 1.0 0.9 (-> *display* camera-clock)) + (let ((gp-0 (-> self post-hook))) + (set! (-> self post-hook) target-no-move-post) + (set! sv-112 (-> self focus-search)) + (set! sv-120 0) + (set! sv-128 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node jakb-lod0-jg main))) + (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-112 length) sv-120) + (countdown (s5-0 sv-120) + (let* ((s4-0 (-> sv-112 s5-0 process)) + (v1-56 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when (and v1-56 (logtest? (process-mask crate enemy guard vehicle) (-> v1-56 mask))) + (set! (-> sv-132 (-> sv-132 length)) (process->handle v1-56)) + (+! (-> sv-132 length) 1) + (if (< (-> sv-132 allocated-length) (-> sv-132 length)) + (set! (-> sv-132 length) (-> sv-132 allocated-length)) + ) + ) + ) + ) + (set! (-> self control mod-surface) (new 'static 'surface + :name 'uppercut + :turnv 524288.0 + :turnvf 15.0 + :tiltv 32768.0 + :tiltvf 150.0 + :tiltvv 262144.0 + :tiltvvf 15.0 + :transv-max 32768.0 + :target-speed 32768.0 + :fric 0.2 + :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 + :mode 'air + :flags (surface-flag air attack spin gun-off laser-hide) + ) + ) + (set! sv-136 0) + (set! sv-144 (current-time)) + (set! sv-152 (current-time)) + (set! sv-160 (the-as float 0.0)) + (set! sv-164 (the-as float 0.0)) + (set! sv-168 (current-time)) + (let* ((v1-77 (-> self game)) + (a0-34 (+ (-> v1-77 attack-id) 1)) + ) + (set! (-> v1-77 attack-id) a0-34) + (set! sv-176 a0-34) + ) + (ja-channel-push! 2 (seconds 0.05)) + (ja :group! (-> self draw art-group data 469)) + (ja :chan 1 :group! (-> self draw art-group data 470)) + (while (or (< sv-136 (-> sv-132 length)) (not (time-elapsed? sv-152 (seconds 1.5)))) + (let ((v1-84 (new-stack-vector0))) + (let ((f0-10 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))) + 0.0 + (vector-! v1-84 (-> self control transv) (vector-float*! v1-84 (-> self control dynam gravity-normal) f0-10)) + ) + (let* ((f0-11 (vector-length v1-84)) + (f1-3 f0-11) + (f2-0 0.0) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f2-0) + (vector-float*! v1-84 v1-84 (/ f0-11 f1-3)) + ) + ) + ) + (set! (-> self darkjak clock-vel) -4.0) + (set! (-> self darkjak clock-on) #t) + (send-event *camera* 'joystick -0.25 1.0) + (when (time-elapsed? sv-144 (seconds 0.1)) + (set! sv-144 (current-time)) + (target-bomb1-fire-shot sv-132 sv-136 (the-as int sv-176)) + (set! sv-136 (+ sv-136 1)) + (if (time-elapsed? (-> self state-time) (seconds 1)) + (set! sv-164 (the-as float 1.0)) + ) + ) + (set! sv-160 (seek sv-160 sv-164 (* 6.0 (seconds-per-frame)))) + (ja :num! (loop!)) + (let ((a0-61 (-> self skel root-channel 1))) + (let ((f0-21 sv-160)) + (set! (-> a0-61 frame-interp 1) f0-21) + (set! (-> a0-61 frame-interp 0) f0-21) + ) + (set! (-> a0-61 param 0) 0.0) + (joint-control-channel-group-eval! a0-61 (the-as art-joint-anim #f) num-func-chan) + ) + (suspend) + ) + (set! (-> self post-hook) gp-0) + ) + (set! (-> self control mod-surface) *double-jump-mods*) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! (-> self draw art-group data 471) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (ja-blend-eval) + (compute-alignment! (-> self align)) + (set! (-> self control turn-go-the-long-way) 1.0) + (set! (-> self darkjak clock-vel) 4.0) + (suspend) + (ja :num! (seek!)) + ) + (set-time! (-> self gun surpress-time)) + (send-event (handle->process (-> self notify)) 'notify 'attack 21) + (go target-darkjak-get-off) + ) + :post target-post + ) diff --git a/test/decompiler/reference/jak3/engine/target/target-death_REF.gc b/test/decompiler/reference/jak3/engine/target/target-death_REF.gc index ce18f3ea19..2da1155c7e 100644 --- a/test/decompiler/reference/jak3/engine/target/target-death_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-death_REF.gc @@ -70,7 +70,7 @@ (when a2-0 (set! (-> s5-1 quad) (-> a2-0 extra trans quad)) (+! (-> s5-1 y) 9011.2) - (go target-warp-in s5-1 (-> arg0 trans)) + (go target-warp-in s5-1 (-> arg0 trans) a2-0) ) ) ) @@ -654,20 +654,15 @@ ) (dotimes (v1-107 3) (set! (-> *load-state* want-sound v1-107 name) (-> arg0 want-sound v1-107)) - (set! (-> *load-state* want-sound v1-107 mode) (the-as uint 1)) + (set! (-> *load-state* want-sound v1-107 mode) (sound-bank-mode unknown)) ) - (load-state-method-21 *load-state*) + (add-borrow-levels *load-state*) (when (not (string= (-> arg0 name) "default")) (while (begin (dotimes (s5-0 (-> arg0 want-count)) (when (not (or (not (-> arg0 want s5-0 name)) (not (-> arg0 want s5-0 display?)) - (let* ((a0-73 *level*) - (t9-37 (method-of-object a0-73 level-group-method-26)) - (a1-44 (-> arg0 want s5-0 name)) - ) - (= (t9-37 a0-73 a1-44) 'active) - ) + (= (status-of-level-and-borrows *level* (-> arg0 want s5-0 name) #f) 'active) ) ) (set! v1-126 #t) @@ -678,12 +673,7 @@ (dotimes (s4-0 10) (when (not (or (not (-> s5-1 want s4-0 name)) (not (-> s5-1 want s4-0 display?)) - (let* ((a0-75 *level*) - (t9-38 (method-of-object a0-75 level-group-method-26)) - (a1-45 (-> s5-1 want s4-0 name)) - ) - (= (t9-38 a0-75 a1-45) 'active) - ) + (= (status-of-level-and-borrows *level* (-> s5-1 want s4-0 name) #f) 'active) ) ) (set! v1-126 #t) @@ -984,27 +974,7 @@ quad ) ) - (let ((s5-0 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-0 - (let ((t9-1 (method-of-type part-tracker-subsampler activate))) - (t9-1 (the-as part-tracker-subsampler s5-0) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-2 run-function-in-process) - (a0-9 s5-0) - (a1-2 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 10)) - (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-9 a1-2 *part-tracker-subsampler-params-default*) - ) - (-> s5-0 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 10)) ) (else (set! (-> *launch-matrix* trans quad) @@ -1016,26 +986,7 @@ quad ) ) - (let ((s5-1 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-1 - (let ((t9-4 (method-of-type part-tracker activate))) - (t9-4 (the-as part-tracker s5-1) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-5 run-function-in-process) - (a0-18 s5-1) - (a1-5 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 10)) - (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-18 a1-5 *part-tracker-params-default*) - ) - (-> s5-1 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 10)) ) ) (let ((v1-32 (-> arg0 mode))) @@ -1298,8 +1249,8 @@ (ja-no-eval :group! jakb-jump-ja :num! (seek!) :frame-num 0.0) (when (= (-> arg0 angle) 'air) (sound-play "smack-surface") - (do-effect (-> self skel effect) (the-as symbol "group-smack-surface") 0.0 6) - (do-effect (-> self skel effect) (the-as symbol "group-smack-surface-dizzy") 0.0 9) + (do-effect (-> self skel effect) "group-smack-surface" 0.0 6) + (do-effect (-> self skel effect) "group-smack-surface-dizzy" 0.0 9) ) ) ((= v1-0 'shove) @@ -1556,55 +1507,11 @@ (cond ((logtest? (-> *part-group-id-table* 64 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((gp-3 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-3 - (let ((t9-18 (method-of-type part-tracker-subsampler activate))) - (t9-18 - (the-as part-tracker-subsampler gp-3) - *entity-pool* - "part-tracker-subsampler" - (the-as pointer #x70004000) - ) - ) - (let ((t9-19 run-function-in-process) - (a0-66 gp-3) - (a1-13 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 64)) - (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-19) a0-66 a1-13 *part-tracker-subsampler-params-default*) - ) - (-> gp-3 ppointer) - ) - ) + (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)) - (let ((gp-4 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-4 - (let ((t9-21 (method-of-type part-tracker activate))) - (t9-21 (the-as part-tracker gp-4) *entity-pool* "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-22 run-function-in-process) - (a0-72 gp-4) - (a1-16 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 64)) - (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-22) a0-72 a1-16 *part-tracker-params-default*) - ) - (-> gp-4 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 64)) ) ) ) @@ -1621,55 +1528,11 @@ (cond ((logtest? (-> *part-group-id-table* 64 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((gp-6 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-6 - (let ((t9-28 (method-of-type part-tracker-subsampler activate))) - (t9-28 - (the-as part-tracker-subsampler gp-6) - *entity-pool* - "part-tracker-subsampler" - (the-as pointer #x70004000) - ) - ) - (let ((t9-29 run-function-in-process) - (a0-89 gp-6) - (a1-23 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 64)) - (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-29) a0-89 a1-23 *part-tracker-subsampler-params-default*) - ) - (-> gp-6 ppointer) - ) - ) + (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)) - (let ((gp-7 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-7 - (let ((t9-31 (method-of-type part-tracker activate))) - (t9-31 (the-as part-tracker gp-7) *entity-pool* "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-32 run-function-in-process) - (a0-95 gp-7) - (a1-26 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 64)) - (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-32) a0-95 a1-26 *part-tracker-params-default*) - ) - (-> gp-7 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 64)) ) ) ) @@ -1731,53 +1594,17 @@ ) ) ) - (cond - ((logtest? (-> gp-9 flags) (sp-group-flag sp13)) - (let ((s5-5 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-5 - (let ((t9-44 (method-of-type part-tracker-subsampler activate))) - (t9-44 (the-as part-tracker-subsampler s5-5) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-45 run-function-in-process) - (a0-133 s5-5) - (a1-49 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) gp-9) - (set! (-> *part-tracker-subsampler-params-default* duration) (seconds 1)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 6) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-45) a0-133 a1-49 *part-tracker-subsampler-params-default*) - ) - (-> s5-5 ppointer) - ) - ) - ) - (else - (let ((s5-6 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-6 - (let ((t9-47 (method-of-type part-tracker activate))) - (t9-47 (the-as part-tracker s5-6) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-48 run-function-in-process) - (a0-136 s5-6) - (a1-52 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) gp-9) - (set! (-> *part-tracker-params-default* duration) (seconds 1)) - (set! (-> *part-tracker-params-default* callback) #f) - (set! (-> *part-tracker-params-default* userdata) (the-as uint #f)) - (set! (-> *part-tracker-params-default* target) self) - (set! (-> *part-tracker-params-default* mat-joint) 6) - ((the-as (function object object object none) t9-48) a0-136 a1-52 *part-tracker-params-default*) - ) - (-> s5-6 ppointer) - ) + (if (logtest? (-> gp-9 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group gp-9 + :duration (seconds 1) + :target self + :mat-joint 6 ) + (part-tracker-spawn part-tracker :to self :group gp-9 :duration (seconds 1) :target self :mat-joint 6) ) - ) ) (let ((gp-10 (-> self post-hook))) (set! (-> self control mod-surface) *turn-around-mods*) @@ -2498,55 +2325,11 @@ (cond ((logtest? (-> *part-group-id-table* 62 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((s5-3 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-3 - (let ((t9-15 (method-of-type part-tracker-subsampler activate))) - (t9-15 - (the-as part-tracker-subsampler s5-3) - *entity-pool* - "part-tracker-subsampler" - (the-as pointer #x70004000) - ) - ) - (let ((t9-16 run-function-in-process) - (a0-66 s5-3) - (a1-29 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 62)) - (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-16) a0-66 a1-29 *part-tracker-subsampler-params-default*) - ) - (-> s5-3 ppointer) - ) - ) + (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)) - (let ((s5-4 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-4 - (let ((t9-18 (method-of-type part-tracker activate))) - (t9-18 (the-as part-tracker s5-4) *entity-pool* "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-19 run-function-in-process) - (a0-72 s5-4) - (a1-32 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 62)) - (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-19) a0-72 a1-32 *part-tracker-params-default*) - ) - (-> s5-4 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 62)) ) ) (let ((v1-110 (-> self control root-prim))) @@ -2583,55 +2366,11 @@ (cond ((logtest? (-> *part-group-id-table* 65 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((s5-8 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-8 - (let ((t9-27 (method-of-type part-tracker-subsampler activate))) - (t9-27 - (the-as part-tracker-subsampler s5-8) - *entity-pool* - "part-tracker-subsampler" - (the-as pointer #x70004000) - ) - ) - (let ((t9-28 run-function-in-process) - (a0-92 s5-8) - (a1-41 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 65)) - (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-28) a0-92 a1-41 *part-tracker-subsampler-params-default*) - ) - (-> s5-8 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 65)) ) (else (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((s5-9 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-9 - (let ((t9-30 (method-of-type part-tracker activate))) - (t9-30 (the-as part-tracker s5-9) *entity-pool* "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-31 run-function-in-process) - (a0-98 s5-9) - (a1-44 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 65)) - (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-31) a0-98 a1-44 *part-tracker-params-default*) - ) - (-> s5-9 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 65)) ) ) (set-vector! (-> self control transv) 0.0 65502.96 0.0 1.0) @@ -2816,55 +2555,11 @@ (cond ((logtest? (-> *part-group-id-table* 66 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((s5-12 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-12 - (let ((t9-45 (method-of-type part-tracker-subsampler activate))) - (t9-45 - (the-as part-tracker-subsampler s5-12) - *entity-pool* - "part-tracker-subsampler" - (the-as pointer #x70004000) - ) - ) - (let ((t9-46 run-function-in-process) - (a0-130 s5-12) - (a1-56 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 66)) - (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-46) a0-130 a1-56 *part-tracker-subsampler-params-default*) - ) - (-> s5-12 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 66)) ) (else (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((s5-13 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-13 - (let ((t9-48 (method-of-type part-tracker activate))) - (t9-48 (the-as part-tracker s5-13) *entity-pool* "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-49 run-function-in-process) - (a0-136 s5-13) - (a1-59 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 66)) - (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-49) a0-136 a1-59 *part-tracker-params-default*) - ) - (-> s5-13 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 66)) ) ) (target-death-anim (the-as spool-anim #f)) @@ -2883,55 +2578,11 @@ (cond ((logtest? (-> gp-1 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((s5-1 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-1 - (let ((t9-3 (method-of-type part-tracker-subsampler activate))) - (t9-3 - (the-as part-tracker-subsampler s5-1) - *entity-pool* - "part-tracker-subsampler" - (the-as pointer #x70004000) - ) - ) - (let ((t9-4 run-function-in-process) - (a0-9 s5-1) - (a1-3 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) gp-1) - (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-4) a0-9 a1-3 *part-tracker-subsampler-params-default*) - ) - (-> s5-1 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group gp-1) ) (else (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((s5-2 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-2 - (let ((t9-6 (method-of-type part-tracker activate))) - (t9-6 (the-as part-tracker s5-2) *entity-pool* "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-7 run-function-in-process) - (a0-15 s5-2) - (a1-6 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) gp-1) - (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-7) a0-15 a1-6 *part-tracker-params-default*) - ) - (-> s5-2 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to *entity-pool* :group gp-1) ) ) ) @@ -3140,7 +2791,3 @@ ) :post target-no-stick-post ) - - - - 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 7dcd5bb2ef..95f841c0e3 100644 --- a/test/decompiler/reference/jak3/engine/target/target-gun_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-gun_REF.gc @@ -727,40 +727,40 @@ ((arg0 pickup-type)) (case arg0 (((pickup-type gun-yellow-1)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modeguy1 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modeguy1 0.0 0)) ) (((pickup-type gun-yellow-2)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modeguy2 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modeguy2 0.0 0)) ) (((pickup-type gun-yellow-3)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modeguy3 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modeguy3 0.0 0)) ) (((pickup-type gun-red-1)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modegur1 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modegur1 0.0 0)) ) (((pickup-type gun-red-2)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modegur2 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modegur2 0.0 0)) ) (((pickup-type gun-red-3)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modegur3 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modegur3 0.0 0)) ) (((pickup-type gun-blue-1)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modegub1 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modegub1 0.0 0)) ) (((pickup-type gun-blue-2)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modegub2 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modegub2 0.0 0)) ) (((pickup-type gun-blue-3)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modegub3 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modegub3 0.0 0)) ) (((pickup-type gun-dark-1)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modegud1 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modegud1 0.0 0)) ) (((pickup-type gun-dark-2)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modegud2 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modegud2 0.0 0)) ) (((pickup-type gun-dark-3)) - (set! (-> self gun mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modegud3 0.0 0))) + (set! (-> self gun mode-sound-bank) (add-setting! 'mode-sound-bank 'modegud3 0.0 0)) ) ) (none) @@ -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)) ) ) ) @@ -2110,7 +2110,7 @@ (set! (-> s5-2 0 quad) (-> self control collision-spheres 2 prim-core world-sphere quad)) (set! (-> s5-2 0 r) (lerp-scale (-> *TARGET-bank* body-radius) 7372.8 f30-1 0.0 1.0)) (let ((v1-214 gp-3)) - (set! (-> v1-214 spheres) s5-2) + (set! (-> v1-214 best-dist) (the-as float s5-2)) (set! (-> v1-214 best-other-prim) (the-as collide-shape-prim 1)) (set! (-> v1-214 collide-with) (-> self control root-prim prim-core collide-with)) (set! (-> v1-214 ignore-process0) #f) diff --git a/test/decompiler/reference/jak3/engine/target/target-h_REF.gc b/test/decompiler/reference/jak3/engine/target/target-h_REF.gc index 827ad1982a..352d6a845d 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,8 @@ ;; definition of type target (deftype target (process-focusable) - ((fact fact-info-target :override) + ((self target :override) + (fact fact-info-target :override) (control control-info :overlay-at root) (skel2 joint-control) (shadow-backup shadow-geo) @@ -18,7 +19,8 @@ (leg-ik joint-mod-ik 2) (foot joint-mod 2) (cloth symbol) - (init-time time-frame) + (mech-ik joint-mod-ik 2) + (init-time time-frame :overlay-at (-> mech-ik 0)) (teleport-time time-frame) (state-hook-time time-frame) (state-hook (function none :behavior target)) @@ -53,9 +55,9 @@ (mode-param1 handle) (mode-param2 uint64) (mode-param3 uint64) - (major-mode-exit-hook basic) - (major-mode-event-hook basic) - (sub-mode-exit-hook basic) + (major-mode-exit-hook (function none :behavior target)) + (major-mode-event-hook (function none :behavior target)) + (sub-mode-exit-hook (function none :behavior target)) (ext-geo-control external-art-buffer) (pending-ext-geo target-geo) (ext-geo target-geo) @@ -134,7 +136,7 @@ (target-continue continue-point) (target-credits int) target-darkjak-bomb0 - target-darkjak-bomb1 + (target-darkjak-bomb1 float float) target-darkjak-get-off (target-darkjak-get-on darkjak-stage) target-darkjak-running-attack @@ -151,25 +153,26 @@ target-edge-grab (target-edge-grab-jump float float symbol) target-edge-grab-off - (target-falling symbol) + (target-falling object) target-float (target-flop float float float object) (target-flop-hit-ground symbol) - target-flut-air-attack + (target-flut-air-attack float) target-flut-air-attack-hit-ground - target-flut-clone-anim - target-flut-death - target-flut-double-jump - target-flut-eject - target-flut-falling - target-flut-get-off + (target-flut-clone-anim handle) + (target-flut-death symbol) + (target-flut-double-jump float float) + (target-flut-eject symbol) + (target-flut-falling object) + (target-flut-get-off handle) target-flut-get-off-jump - target-flut-get-on + (target-flut-get-on handle) target-flut-grab - target-flut-hit + (target-flut-hit symbol attack-info) target-flut-hit-ground - target-flut-jump - target-flut-kanga-catch + (target-flut-jump float float) + (target-flut-kanga-catch handle symbol) + target-flut-run-wild target-flut-running-attack target-flut-stance (target-flut-start handle symbol int) @@ -186,16 +189,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) @@ -203,9 +211,15 @@ target-indax-walk (target-invisible-get-on handle time-frame) (target-jump float float surface) - (target-jump-forward float float) + (target-jump-forward float float symbol) target-ladder + target-ladder-jump-off + target-ladder-slide-down + target-ladder-stance (target-ladder-start handle) + target-ladder-switch + target-ladder-walk-down + target-ladder-walk-up (target-launch float symbol vector int) target-launch-dir target-lightjak-freeze @@ -221,35 +235,35 @@ target-mech-carry-drag target-mech-carry-drop target-mech-carry-falling - target-mech-carry-hit-ground - target-mech-carry-jump + (target-mech-carry-hit-ground symbol) + (target-mech-carry-jump float float) target-mech-carry-pickup target-mech-carry-stance target-mech-carry-throw target-mech-carry-walk - target-mech-clone-anim - target-mech-death - target-mech-falling + (target-mech-clone-anim handle) + (target-mech-death symbol) + (target-mech-falling symbol) target-mech-get-off - target-mech-get-on - target-mech-get-up + (target-mech-get-on handle) + (target-mech-get-up handle) target-mech-grab - target-mech-hit - target-mech-hit-ground - target-mech-jump + (target-mech-hit symbol attack-info) + (target-mech-hit-ground symbol) + (target-mech-jump float float surface) target-mech-punch target-mech-shield target-mech-stance (target-mech-start handle float symbol) target-mech-walk - target-pilot-clone-anim + (target-pilot-clone-anim handle) target-pilot-daxter-perch - target-pilot-death + (target-pilot-death symbol) (target-pilot-edge-grab pilot-edge-grab-info) - target-pilot-get-off + (target-pilot-get-off handle) target-pilot-get-on target-pilot-grab - target-pilot-hit + (target-pilot-hit symbol attack-info) target-pilot-impact target-pilot-stance (target-pilot-start handle symbol symbol) @@ -258,7 +272,7 @@ (target-pole-flip-forward float float float) (target-pole-flip-forward-jump float float) (target-pole-flip-up float float float) - (target-pole-flip-up-jump float float) + (target-pole-flip-up-jump float float symbol) target-powerjak-get-on (target-racing-start handle) target-roll @@ -279,7 +293,11 @@ target-swim-walk target-title target-tube + (target-tube-death symbol) + (target-tube-hit symbol attack-info) + (target-tube-jump float float) (target-tube-start handle) + target-tube-walk target-turn-around target-turret-get-off (target-turret-get-on handle) @@ -288,8 +306,8 @@ target-wade-stance target-wade-walk target-walk - (target-warp-in vector vector) - target-warp-out + (target-warp-in vector vector object) + (target-warp-out vector vector handle) target-yellow-jump-blast tobot-stance ) 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 64d528200b..b93c11e408 100644 --- a/test/decompiler/reference/jak3/engine/target/target-handler_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-handler_REF.gc @@ -151,27 +151,7 @@ quad ) ) - (let ((gp-1 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-1 - (let ((t9-7 (method-of-type part-tracker-subsampler activate))) - (t9-7 (the-as part-tracker-subsampler gp-1) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-8 run-function-in-process) - (a0-39 gp-1) - (a1-14 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 10)) - (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-8) a0-39 a1-14 *part-tracker-subsampler-params-default*) - ) - (-> gp-1 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 10)) ) (else (set! (-> *launch-matrix* trans quad) @@ -183,26 +163,7 @@ quad ) ) - (let ((gp-2 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-2 - (let ((t9-10 (method-of-type part-tracker activate))) - (t9-10 (the-as part-tracker gp-2) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-11 run-function-in-process) - (a0-48 gp-2) - (a1-17 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 10)) - (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-11) a0-48 a1-17 *part-tracker-params-default*) - ) - (-> gp-2 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 10)) ) ) (target-timed-invulnerable @@ -219,53 +180,24 @@ (sound-play "oof") ) (else - (cond - ((logtest? (-> *part-group-id-table* 67 flags) (sp-group-flag sp13)) - (let ((gp-4 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-4 - (let ((t9-17 (method-of-type part-tracker-subsampler activate))) - (t9-17 (the-as part-tracker-subsampler gp-4) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-18 run-function-in-process) - (a0-55 gp-4) - (a1-23 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 67)) - (set! (-> *part-tracker-subsampler-params-default* duration) (seconds 1)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 6) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-18) a0-55 a1-23 *part-tracker-subsampler-params-default*) - ) - (-> gp-4 ppointer) - ) - ) - ) - (else - (let ((gp-5 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-5 - (let ((t9-20 (method-of-type part-tracker activate))) - (t9-20 (the-as part-tracker gp-5) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-21 run-function-in-process) - (a0-58 gp-5) - (a1-26 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 67)) - (set! (-> *part-tracker-params-default* duration) (seconds 1)) - (set! (-> *part-tracker-params-default* callback) #f) - (set! (-> *part-tracker-params-default* userdata) (the-as uint #f)) - (set! (-> *part-tracker-params-default* target) self) - (set! (-> *part-tracker-params-default* mat-joint) 6) - ((the-as (function object object object none) t9-21) a0-58 a1-26 *part-tracker-params-default*) - ) - (-> gp-5 ppointer) - ) + (if (logtest? (-> *part-group-id-table* 67 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 67) + :duration (seconds 1) + :target self + :mat-joint 6 + ) + (part-tracker-spawn + part-tracker + :to self + :group (-> *part-group-id-table* 67) + :duration (seconds 1) + :target self + :mat-joint 6 ) ) - ) (process-spawn-function process (lambda :behavior target @@ -356,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) @@ -385,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) @@ -397,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) @@ -574,55 +499,16 @@ (cond ((logtest? (-> *part-group-id-table* 11 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> sv-128 quad)) - (let ((s5-1 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-1 - (let ((t9-13 (method-of-type part-tracker-subsampler activate))) - (t9-13 (the-as part-tracker-subsampler s5-1) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-14 run-function-in-process) - (a0-46 s5-1) - (a1-16 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 11)) - (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-14) a0-46 a1-16 *part-tracker-subsampler-params-default*) - ) - (-> s5-1 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 11)) ) (else (set! (-> *launch-matrix* trans quad) (-> sv-128 quad)) - (let ((s5-2 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-2 - (let ((t9-16 (method-of-type part-tracker activate))) - (t9-16 (the-as part-tracker s5-2) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-17 run-function-in-process) - (a0-51 s5-2) - (a1-19 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 11)) - (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-17) a0-51 a1-19 *part-tracker-params-default*) - ) - (-> s5-2 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 11)) ) ) ) (else - (do-effect (-> self skel effect) (the-as symbol "group-spin-hit") -1.0 49) + (do-effect (-> self skel effect) "group-spin-hit" -1.0 49) ) ) (play-effect-sound @@ -654,50 +540,11 @@ (cond ((logtest? (-> *part-group-id-table* 12 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> sv-128 quad)) - (let ((gp-1 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-1 - (let ((t9-23 (method-of-type part-tracker-subsampler activate))) - (t9-23 (the-as part-tracker-subsampler gp-1) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-24 run-function-in-process) - (a0-71 gp-1) - (a1-26 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 12)) - (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-24) a0-71 a1-26 *part-tracker-subsampler-params-default*) - ) - (-> gp-1 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 12)) ) (else (set! (-> *launch-matrix* trans quad) (-> sv-128 quad)) - (let ((gp-2 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-2 - (let ((t9-26 (method-of-type part-tracker activate))) - (t9-26 (the-as part-tracker gp-2) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-27 run-function-in-process) - (a0-76 gp-2) - (a1-29 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 12)) - (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-27) a0-76 a1-29 *part-tracker-params-default*) - ) - (-> gp-2 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 12)) ) ) ) @@ -727,50 +574,11 @@ (cond ((logtest? (-> *part-group-id-table* 12 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> sv-128 quad)) - (let ((s5-4 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-4 - (let ((t9-31 (method-of-type part-tracker-subsampler activate))) - (t9-31 (the-as part-tracker-subsampler s5-4) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-32 run-function-in-process) - (a0-91 s5-4) - (a1-36 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 12)) - (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-32) a0-91 a1-36 *part-tracker-subsampler-params-default*) - ) - (-> s5-4 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 12)) ) (else (set! (-> *launch-matrix* trans quad) (-> sv-128 quad)) - (let ((s5-5 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-5 - (let ((t9-34 (method-of-type part-tracker activate))) - (t9-34 (the-as part-tracker s5-5) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-35 run-function-in-process) - (a0-96 s5-5) - (a1-39 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 12)) - (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-35) a0-96 a1-39 *part-tracker-params-default*) - ) - (-> s5-5 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 12)) ) ) ) @@ -823,55 +631,16 @@ (cond ((logtest? (-> *part-group-id-table* 12 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> sv-128 quad)) - (let ((gp-3 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-3 - (let ((t9-43 (method-of-type part-tracker-subsampler activate))) - (t9-43 (the-as part-tracker-subsampler gp-3) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-44 run-function-in-process) - (a0-116 gp-3) - (a1-47 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 12)) - (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-44) a0-116 a1-47 *part-tracker-subsampler-params-default*) - ) - (-> gp-3 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 12)) ) (else (set! (-> *launch-matrix* trans quad) (-> sv-128 quad)) - (let ((gp-4 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-4 - (let ((t9-46 (method-of-type part-tracker activate))) - (t9-46 (the-as part-tracker gp-4) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-47 run-function-in-process) - (a0-121 gp-4) - (a1-50 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 12)) - (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-47) a0-121 a1-50 *part-tracker-params-default*) - ) - (-> gp-4 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 12)) ) ) ) ) - (do-effect (-> self skel effect) (the-as symbol "group-uppercut-hit") -1.0 28) + (do-effect (-> self skel effect) "group-uppercut-hit" -1.0 28) (play-effect-sound (-> self skel effect) (the-as symbol "sound") @@ -883,8 +652,8 @@ (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 178 (seconds 0.1)) ) ((or (= v1-57 'flop) (= v1-57 'flop-down)) - (do-effect (-> self skel effect) (the-as symbol "group-flop-hit") -1.0 28) - (do-effect (-> self skel effect) (the-as symbol "group-flop-hit") -1.0 19) + (do-effect (-> self skel effect) "group-flop-hit" -1.0 28) + (do-effect (-> self skel effect) "group-flop-hit" -1.0 19) (play-effect-sound (-> self skel effect) (the-as symbol "sound") @@ -1132,11 +901,11 @@ v0-0 ) (('do-effect) - (do-effect (-> self skel effect) (the-as symbol (-> arg3 param 0)) (the-as float (-> arg3 param 1)) -1) + (do-effect (-> self skel effect) (the-as string (-> arg3 param 0)) (the-as float (-> arg3 param 1)) -1) (if (-> self sidekick) (do-effect (-> self sidekick 0 skel effect) - (the-as symbol (-> arg3 param 0)) + (the-as string (-> arg3 param 0)) (the-as float (-> arg3 param 1)) -1 ) @@ -1402,7 +1171,7 @@ ;; definition for function target-standard-event-handler ;; INFO: Used lq/sq (defbehavior target-standard-event-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) - (local-vars (at-0 int) (v1-317 object) (a2-5 symbol)) + (local-vars (at-0 int) (v1-317 object)) (rlet ((vf0 :class vf) (vf1 :class vf) (vf2 :class vf) @@ -1571,12 +1340,7 @@ (go target-board-start (process->handle (the-as process (-> arg3 param 1)))) ) ) - ((begin (set! a2-5 (= v1-63 'pilot)) (or a2-5 - (begin (set! a2-5 (= v1-63 'pilot-race)) a2-5) - (begin (set! a2-5 (= v1-63 'pilot-daxter)) a2-5) - (= v1-63 'pilot-race-daxter) - ) - ) + ((or (= v1-63 'pilot) (= v1-63 'pilot-race) (= v1-63 'pilot-daxter) (= v1-63 'pilot-race-daxter)) (let ((s5-1 (the-as object (-> arg3 param 1)))) (when (not (the-as uint s5-1)) (let ((s4-0 (new 'stack 'traffic-object-spawn-params))) @@ -1595,13 +1359,7 @@ (set! (-> s4-0 position quad) (-> self control trans quad)) (quaternion-copy! (-> s4-0 rotation) (-> self control quat)) (set! (-> s4-0 id) (the-as uint 0)) - (let ((v1-101 (vehicle-spawn - (the-as process (-> arg3 param 2)) - (the-as type s4-0) - (the-as traffic-object-spawn-params a2-5) - ) - ) - ) + (let ((v1-101 (vehicle-spawn (the-as vehicle-type (-> arg3 param 2)) s4-0))) (if v1-101 (set! s5-1 v1-101) ) @@ -1610,13 +1368,13 @@ ) (when s5-1 (let* ((v1-102 (-> arg3 param 0)) - (a2-6 (if (or (= v1-102 'pilot-daxter) (= v1-102 'pilot-race-daxter)) + (a2-8 (if (or (= v1-102 'pilot-daxter) (= v1-102 'pilot-race-daxter)) #t #f ) ) ) - (go target-pilot-start (process->handle s5-1) (the-as symbol (-> arg3 param 3)) a2-6) + (go target-pilot-start (process->handle s5-1) (the-as symbol (-> arg3 param 3)) a2-8) ) ) ) diff --git a/test/decompiler/reference/jak3/engine/target/target-invisible_REF.gc b/test/decompiler/reference/jak3/engine/target/target-invisible_REF.gc index df0e3b021c..737ba34a34 100644 --- a/test/decompiler/reference/jak3/engine/target/target-invisible_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-invisible_REF.gc @@ -54,7 +54,7 @@ ;; failed to figure out what this is: (defpart 661 - :init-specs ((:texture (new 'static 'texture-id :index #x4b :page #x4)) + :init-specs ((:texture (starflash level-default-sprite)) (:num 1.0) (:scale-x (meters 5)) (:rot-x (degrees 2250)) @@ -75,7 +75,7 @@ ;; failed to figure out what this is: (defpart 662 - :init-specs ((:texture (new 'static 'texture-id :index #x3d :page #x4)) + :init-specs ((:texture (middot level-default-sprite)) (:num 200.0) (:scale-x (meters 0.05) (meters 0.05)) (:scale-y :copy scale-x) @@ -97,7 +97,7 @@ ;; failed to figure out what this is: (defpart 663 - :init-specs ((:texture (new 'static 'texture-id :index #xa0 :page #x4)) + :init-specs ((:texture (big-cloud level-default-sprite)) (:num 30.0) (:scale-x (meters 1) (meters 2)) (:rot-z (degrees 0) (degrees 360)) @@ -365,7 +365,7 @@ (defskelgroup skel-dark-maker-idol dark-maker-idol dark-maker-idol-lod0-jg dark-maker-idol-idle-ja ((dark-maker-idol-lod0-mg (meters 999999))) :bounds (static-spherem 0 1 0 2) - :shadow-joint-index 3 + :origin-joint-index 3 ) ;; failed to figure out what this is: @@ -463,7 +463,7 @@ ) (set! (-> a1-2 trans quad) (-> s5-1 quad)) (if (and (nonzero? (-> self part)) (not gp-0)) - (sparticle-launch-control-method-17 (-> self part) a1-2) + (spawn-from-mat (-> self part) a1-2) ) ) (update-vol! (-> self humming-sound) (if gp-0 @@ -492,50 +492,11 @@ (cond ((logtest? (-> *part-group-id-table* 182 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) - (let ((gp-1 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-1 - (let ((t9-1 (method-of-type part-tracker-subsampler activate))) - (t9-1 (the-as part-tracker-subsampler gp-1) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-2 run-function-in-process) - (a0-5 gp-1) - (a1-2 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 182)) - (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-5 a1-2 *part-tracker-subsampler-params-default*) - ) - (-> gp-1 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 182)) ) (else (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) - (let ((gp-2 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-2 - (let ((t9-4 (method-of-type part-tracker activate))) - (t9-4 (the-as part-tracker gp-2) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-5 run-function-in-process) - (a0-11 gp-2) - (a1-5 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 182)) - (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-11 a1-5 *part-tracker-params-default*) - ) - (-> gp-2 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 182)) ) ) (if *target* @@ -572,7 +533,7 @@ (a1-4 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat))) ) (set! (-> a1-4 trans quad) (-> gp-2 quad)) - (sparticle-launch-control-method-17 (-> self part) a1-4) + (spawn-from-mat (-> self part) a1-4) ) ) (ja-post) diff --git a/test/decompiler/reference/jak3/engine/target/target-ladder_REF.gc b/test/decompiler/reference/jak3/engine/target/target-ladder_REF.gc new file mode 100644 index 0000000000..278ea720e0 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/target-ladder_REF.gc @@ -0,0 +1,641 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type ladder-info +(deftype ladder-info (basic) + ((ladder handle) + (flip degrees) + (interp float) + (start-mat matrix :inline) + ) + ) + +;; definition for method 3 of type ladder-info +(defmethod inspect ((this ladder-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tladder: ~D~%" (-> this ladder)) + (format #t "~1Tflip: (deg ~r)~%" (-> this flip)) + (format #t "~1Tinterp: ~f~%" (-> this interp)) + (format #t "~1Tstart-mat: #~%" (-> this start-mat)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(let ((v1-2 (copy *walk-mods* 'global))) + (set! (-> v1-2 name) 'ladder) + (set! (-> v1-2 flags) (surface-flag turn-when-centered turn-to-alt gun-hide)) + (set! (-> v1-2 bend-factor) 1.0) + (set! (-> v1-2 bend-speed) 1.0) + (set! (-> v1-2 tiltv) 262144.0) + (set! (-> v1-2 tiltvf) 30.0) + (set! (-> v1-2 tiltvv) 1048576.0) + (set! (-> v1-2 tiltvvf) 30.0) + (set! *ladder-mods* v1-2) + ) + +;; failed to figure out what this is: +(defstate target-ladder (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (if (and (= message 'query) (= (-> block param 0) 'mode)) + 'target-ladder + (target-standard-event-handler proc argc message block) + ) + ) + :exit (behavior () + (when (not (and (-> self next-state) (begin (-> self next-state name) (state-type? (-> self next-state) 'target-ladder))) + ) + (target-collide-set! 'normal 0.0) + (logclear! (-> self focus-status) (focus-status pole)) + (set! (-> self ladder ladder) (the-as handle #f)) + (logclear! (-> self target-flags) (target-flags lleg-still rleg-still lleg-no-ik rleg-no-ik)) + ) + ) + :trans (behavior () + (local-vars (gp-0 symbol)) + (b! (not (cpad-pressed? (-> self control cpad number) x)) cfg-2 :delay (empty-form)) + (logclear! (-> *cpad-list* cpads (-> self control cpad number) button0-abs 0) (pad-buttons x)) + (logclear! (-> *cpad-list* cpads (-> self control cpad number) button0-rel 0) (pad-buttons x)) + (go target-ladder-jump-off) + (b! #t cfg-41 :delay (nop!)) + (label cfg-2) + (cond + ((and (cpad-hold? (-> self control cpad number) circle) + (not (and (-> self next-state) (let ((v1-26 (-> self next-state name))) + (or (= v1-26 'target-ladder-slide-down) (= v1-26 'target-ladder-switch)) + ) + ) + ) + (!= (send-event (handle->process (-> self ladder ladder)) 'move 0) 0.0) + ) + (go target-ladder-slide-down) + ) + ((and (cpad-pressed? (-> self control cpad number) square) + (not (and (-> self next-state) (let ((v1-49 (-> self next-state name))) + (or (= v1-49 'target-ladder-slide-down) (= v1-49 'target-ladder-switch)) + ) + ) + ) + (begin + (let ((gp-1 #t) + (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) 'options) + (let ((v1-57 + (the-as int (logand (the-as int (send-event-function (handle->process (-> self ladder ladder)) a1-7)) 3)) + ) + ) + (cmove-#f-nonzero gp-0 v1-57 gp-1) + ) + ) + gp-0 + ) + ) + (go target-ladder-switch) + ) + ) + (label cfg-41) + ) + :code nothing + :post (behavior () + (let ((gp-0 (handle->process (-> self ladder ladder)))) + (seek! (-> self ladder interp) 1.0 (* 10.0 (seconds-per-frame))) + (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) 'matrix) + (set! (-> a1-2 param 0) (the-as uint (new 'stack-no-clear 'matrix))) + (let ((gp-1 (the-as matrix (send-event-function gp-0 a1-2)))) + (if (= (-> self ladder flip) -1.0) + (set! (-> self ladder flip) + (if (< (vector-dot (-> gp-1 fvec) (vector-! (new 'stack-no-clear 'vector) (-> gp-1 trans) (-> self control trans))) + 0.0 + ) + 32768.0 + 0.0 + ) + ) + ) + (cond + (gp-1 + (set! (-> self control bend-amount) 1.0) + (let ((s4-0 (new 'stack-no-clear 'matrix))) + (let ((a1-5 (matrix-rotate-y! (new 'stack-no-clear 'matrix) (-> self ladder flip)))) + (matrix*! s4-0 a1-5 gp-1) + ) + (let ((s5-0 (new 'static 'vector :w 1.0)) + (gp-2 (matrix-lerp! (new 'stack-no-clear 'matrix) (-> self ladder start-mat) s4-0 (-> self ladder interp))) + ) + (set! (-> s5-0 z) (* -1597.44 (-> self ladder interp))) + (vector-matrix*! (-> self control trans) s5-0 gp-2) + (set! (-> self control turn-to-alt-heading quad) (-> gp-2 fvec quad)) + (set! (-> self control local-normal quad) (-> gp-2 uvec quad)) + (set! (-> self control bent-gravity-normal quad) (-> gp-2 uvec quad)) + (set! (-> self control gspot-normal quad) (-> gp-2 uvec quad)) + ) + ) + (update-transforms (-> self control)) + ) + (else + (go target-falling #f) + ) + ) + ) + ) + ) + (target-no-move-post) + ) + ) + +;; failed to figure out what this is: +(defstate target-ladder-start (target) + :parent target-ladder + :enter (behavior ((arg0 handle)) + (when (zero? (-> self ladder)) + (set! (-> self ladder) (new 'process 'ladder-info)) + (set! (-> self ladder ladder) (the-as handle #f)) + ) + (set! (-> self ladder ladder) arg0) + (set! (-> self ladder flip) -1.0) + (set! (-> self ladder interp) 0.0) + (let* ((v1-10 (-> self ladder start-mat)) + (a3-0 (-> self node-list data 0 bone transform)) + (a0-4 (-> a3-0 rvec quad)) + (a1-1 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-10 rvec quad) a0-4) + (set! (-> v1-10 uvec quad) a1-1) + (set! (-> v1-10 fvec quad) a2-0) + (set! (-> v1-10 trans quad) a3-1) + ) + (set! (-> self control bend-target) 1.0) + (set-time! (-> self state-time)) + (set! (-> self control mod-surface) *ladder-mods*) + (logior! (-> self target-flags) (target-flags lleg-still rleg-still lleg-no-ik rleg-no-ik)) + (target-collide-set! 'pole 0.0) + (set! (-> self control unknown-vector37 quad) (-> self control transv quad)) + (set! (-> self control transv quad) (the-as uint128 0)) + ) + :code (behavior ((arg0 handle)) + (cond + ((time-elapsed? (-> self control last-time-on-surface) (seconds 0.05)) + (ja-channel-push! 1 (seconds 0.065)) + (ja-no-eval :group! jakb-ladder-jump-on-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.25)) + (ja-no-eval :group! jakb-ladder-get-on-ja :num! (seek! max 4.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 4.0)) + ) + ) + ) + (go target-ladder-stance) + ) + :post (behavior () + (send-event (handle->process (-> self ladder ladder)) 'stance) + (let ((v1-8 (-> self state parent))) + (when v1-8 + (let ((t9-1 (-> v1-8 post))) + (if t9-1 + ((the-as (function none) t9-1)) + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate target-ladder-stance (target) + :parent target-ladder + :trans (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (if (!= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) + (go target-ladder-walk-up) + ) + (can-play-stance-amibent?) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (or (= v1-2 jakb-ladder-up-to-stance-ja) (= v1-2 jakb-ladder-slide-stop-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 jakb-ladder-slide-start-ja) (= v1-16 jakb-ladder-slide-loop-ja))) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-ladder-slide-stop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (let ((v1-45 (ja-group))) + (cond + ((and v1-45 (or (= v1-45 jakb-ladder-stance-to-up-ja) (= v1-45 jakb-ladder-stance-to-down-ja))) + (ja-no-eval :num! (seek! 0.0)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.25)) + ) + ) + ) + ) + ) + ) + (until #f + (ja-no-eval :group! jakb-ladder-stance-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (-> target-ladder-start post) + ) + +;; failed to figure out what this is: +(defstate target-ladder-walk-up (target) + :parent target-ladder + :trans (behavior () + (local-vars (gp-0 symbol)) + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (cond + ((and (= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) + (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) 'move) + (set! (-> a1-0 param 0) (the-as uint 0)) + (let* ((f0-1 (the-as float (send-event-function (handle->process (-> self ladder ladder)) a1-0))) + (f0-2 (- f0-1 (* (the float (the int (/ f0-1 0.5))) 0.5))) + ) + (or (< 0.4 f0-2) (< f0-2 0.01)) + ) + ) + ) + (go target-ladder-stance) + ) + ((= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) + ) + ((< (the-as uint 128) (-> self control cpad lefty)) + (go target-ladder-walk-down) + ) + ((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) 'pos) + (set! (-> a1-1 param 0) (the-as uint (new 'stack-no-clear 'vector))) + (and (= (send-event-function (handle->process (-> self ladder ladder)) a1-1) 1.0) + (begin + (let ((gp-1 #t) + (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) 'options) + (let ((v1-56 + (the-as int (logand (the-as int (send-event-function (handle->process (-> self ladder ladder)) a1-2)) 4)) + ) + ) + (cmove-#f-nonzero gp-0 v1-56 gp-1) + ) + ) + gp-0 + ) + ) + ) + (go + target-edge-grab-jump + (-> *TARGET-bank* edge-grab-jump-height-min) + (-> *TARGET-bank* edge-grab-jump-height-max) + 'ladder + ) + ) + ) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 jakb-ladder-up-to-stance-ja)) + (ja-no-eval :num! (seek! 0.0)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ((let ((v1-13 (ja-group))) + (and v1-13 (= v1-13 jakb-ladder-stance-to-up-ja)) + ) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! jakb-ladder-up-ja) + (until #f + (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) 'move) + (set! (-> a1-3 param 0) + (the-as + uint + (* (-> *TARGET-bank* ladder-walk-up-speed) (fmax 0.4 (-> self control cpad stick0-speed)) (seconds-per-frame)) + ) + ) + (let ((f0-8 (the-as float (send-event-function (handle->process (-> self ladder ladder)) a1-3))) + (a0-20 (-> self skel root-channel 0)) + ) + (let ((f0-9 (- f0-8 (* (the float (the int (/ f0-8 1.0))) 1.0))) + (v1-49 (ja-group)) + ) + (set! (-> a0-20 param 0) (* f0-9 (the float (+ (-> v1-49 frames num-frames) -1)))) + ) + (set! (-> a0-20 param 1) 1000.0) + (joint-control-channel-group-eval! a0-20 (the-as art-joint-anim #f) num-func-seek!) + ) + ) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate target-ladder-walk-down (target) + :parent target-ladder + :trans (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (cond + ((and (= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) + (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) 'move) + (set! (-> a1-0 param 0) (the-as uint 0)) + (let* ((f0-1 (the-as float (send-event-function (handle->process (-> self ladder ladder)) a1-0))) + (f0-2 (- f0-1 (* (the float (the int (/ f0-1 0.5))) 0.5))) + ) + (or (< 0.49 f0-2) (< f0-2 0.1)) + ) + ) + ) + (go target-ladder-stance) + ) + ((= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0) + ) + ((< (-> self control cpad lefty) (the-as uint 128)) + (go target-ladder-walk-up) + ) + ((= (the-as float (send-event (handle->process (-> self ladder ladder)) 'pos (new 'stack-no-clear 'vector))) + 0.0 + ) + (go target-stance) + ) + ) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (when (and v1-2 (= v1-2 jakb-ladder-stance-to-down-ja)) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! jakb-ladder-down-ja) + (until #f + (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) 'move) + (set! (-> a1-2 param 0) (the-as uint (* (- (-> *TARGET-bank* ladder-walk-down-speed)) + (fmax 0.4 (-> self control cpad stick0-speed)) + (seconds-per-frame) + ) + ) + ) + (let ((f0-7 (the-as float (send-event-function (handle->process (-> self ladder ladder)) a1-2))) + (a0-14 (-> self skel root-channel 0)) + ) + (let ((f0-9 (- 1.0 (- f0-7 (* (the float (the int (/ f0-7 1.0))) 1.0)))) + (v1-39 (ja-group)) + ) + (set! (-> a0-14 param 0) (* f0-9 (the float (+ (-> v1-39 frames num-frames) -1)))) + ) + (set! (-> a0-14 param 1) 1000.0) + (joint-control-channel-group-eval! a0-14 (the-as art-joint-anim #f) num-func-seek!) + ) + ) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate target-ladder-slide-down (target) + :parent target-ladder + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self control unknown-sound-id00) (new-sound-id)) + ) + :exit (behavior () + (let ((v1-0 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-0 command) (sound-command set-param)) + (set! (-> v1-0 id) (-> self control unknown-sound-id00)) + (set! (-> v1-0 params volume) -4) + (set! (-> v1-0 auto-time) 24) + (set! (-> v1-0 auto-from) 2) + (set! (-> v1-0 params mask) (the-as uint 17)) + (-> v1-0 id) + ) + (let ((v1-3 (-> self prev-state parent))) + (when v1-3 + (let ((t9-1 (-> v1-3 exit))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + ) + :trans (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (if (and (not (cpad-hold? (-> self control cpad number) circle)) + (time-elapsed? (-> self state-time) (seconds 0.25)) + ) + (go target-ladder-stance) + ) + (set! (-> self control unknown-sound-id00) + (sound-play "ladder-slide" :id (-> self control unknown-sound-id00)) + ) + ) + :code (behavior () + (set! (-> self control unknown-word04) (the-as uint 0.0)) + (let ((v1-3 (ja-group))) + (cond + ((and v1-3 (= v1-3 jakb-ladder-slide-start-ja)) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ((let ((v1-17 (ja-group))) + (and v1-17 (= v1-17 jakb-ladder-slide-loop-ja)) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-ladder-slide-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + (ja :group! jakb-ladder-slide-loop-ja) + (until #f + (ja :num! (loop!)) + (suspend) + ) + #f + ) + :post (behavior () + (set! (-> self control unknown-word04) + (the-as uint (seek + (the-as float (-> self control unknown-word04)) + (- (-> *TARGET-bank* ladder-slide-speed)) + (* 2.0 (seconds-per-frame) (-> *TARGET-bank* ladder-slide-speed)) + ) + ) + ) + (if (= (the-as float (send-event + (handle->process (-> self ladder ladder)) + 'move + (* (the-as float (-> self control unknown-word04)) (seconds-per-frame)) + ) + ) + 0.0 + ) + (go target-ladder-stance) + ) + (let ((v1-21 (-> self state parent))) + (when v1-21 + (let ((t9-3 (-> v1-21 post))) + (if t9-3 + ((the-as (function none) t9-3)) + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate target-ladder-switch (target) + :parent target-ladder + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (let ((f30-0 (-> self ladder flip))) + (ja-no-eval :group! jakb-ladder-switch-ja :num! (seek! max 1.25) :frame-num 0.0) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (set! (-> self ladder flip) + (the float (sar (shl (the int (lerp-scale f30-0 (+ 32768.0 f30-0) (ja-aframe-num 0) 0.0 30.0)) 48) 48)) + ) + (suspend) + (ja :num! (seek! max 1.25)) + ) + (set! (-> self ladder flip) (the float (sar (shl (the int (+ 32768.0 f30-0)) 48) 48))) + ) + (go target-ladder-stance) + ) + :post (-> target-ladder-start post) + ) + +;; failed to figure out what this is: +(defstate target-ladder-jump-off (target) + :parent target-ladder + :trans #f + :code (behavior () + (set! (-> self control mod-surface) *turn-around-mods*) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-ladder-jump-ja :num! (seek!) :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) + (suspend) + (ja :num! (seek!)) + ) + (rot->dir-targ! (-> self control)) + (set-forward-vel 16384.0) + (go target-jump-forward (-> *TARGET-bank* jump-height-max) (-> *TARGET-bank* jump-height-max) #f) + ) + ) diff --git a/test/decompiler/reference/jak3/engine/target/target-launch_REF.gc b/test/decompiler/reference/jak3/engine/target/target-launch_REF.gc new file mode 100644 index 0000000000..ec0ced4b2d --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/target-launch_REF.gc @@ -0,0 +1,147 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defstate target-launch-dir (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (cond + ((and (= message 'query) (= (-> block param 0) 'mode)) + 'target-launch-dir + ) + ((= message 'launch-dir) + #f + ) + (else + (target-standard-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self control did-move-to-pole-or-max-jump-height) 0.0) + (sound-play "jak-launch") + (set! (-> self control unknown-vector37 y) + (- (-> self control unknown-vector37 y) (* 0.5 (the-as float (-> self control unknown-word04)))) + ) + (set! (-> self control unknown-vector39 quad) (-> self control trans quad)) + ) + :exit (behavior () + (target-state-hook-exit) + ) + :trans (behavior () + (cond + ((not (time-elapsed? (-> self state-time) (-> self control sliding-start-time))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> self control unknown-vector37 quad)) + (let ((gp-0 (new 'stack-no-clear 'quaternion))) + (set! (-> gp-0 quad) (-> self control unknown-vector37 quad)) + (set! (-> gp-0 y) 0.0) + (vector-normalize! (the-as vector gp-0) 1.0) + (let ((f30-0 (vector-normalize-ret-len! s5-0 1.0))) + 0.0 + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self control quat)) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self control dir-targ)) + (quaternion-rotate-y-to-vector! (-> self control dir-targ) (-> self control dir-targ) gp-0 18204.445) + (set-quaternion! (-> self control) (-> self control dir-targ)) + (let* ((f0-4 + (/ (the float (- (current-time) (-> self state-time))) (the float (-> self control sliding-start-time))) + ) + (f0-5 (- 1.0 f0-4)) + ) + (let ((f1-5 (* 1.4 f0-5 (/ f30-0 (* 0.0033333334 (the float (-> self control sliding-start-time))))))) + (* 0.0033333334 f1-5 (the float (- (current-time) (-> self clock old-frame-counter)))) + ) + (let ((f0-6 (- 1.0 f0-5))) + (vector+float*! + (-> self control trans) + (-> self control unknown-vector39) + (-> self control unknown-vector37) + f0-6 + ) + (+! (-> self control trans y) (* 0.5 f0-6 f0-6 (the-as float (-> self control unknown-word04)))) + (set! (-> self control transv quad) (the-as uint128 0)) + (set! (-> self control transv quad) (-> self control unknown-vector37 quad)) + (+! (-> self control transv y) (* f0-6 (the-as float (-> self control unknown-word04)))) + ) + ) + ) + ) + ) + (+! (-> self control did-move-to-pole-or-max-jump-height) + (* (the float (-> self control sliding-start-time)) (seconds-per-frame)) + ) + ) + (else + (let ((v1-53 (logclear (-> self control status) (collide-status on-surface))) + (a0-19 (-> self control)) + ) + (set! (-> a0-19 status) v1-53) + (go target-falling a0-19) + ) + ) + ) + ) + :code (behavior () + (send-event self 'end-mode 'gun) + (ja-channel-push! 1 (seconds 0.15)) + (set-forward-vel 0.0) + (cond + ((and (focus-test? self dark) (nonzero? (-> self darkjak))) + (ja-no-eval :group! (-> self draw art-group data 474) :num! (seek! (ja-aframe 15.0 0) 3.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 15.0 0) 3.0)) + ) + ) + ((= (-> self ext-anim) (target-anim default)) + (ja-no-eval :group! jakb-duck-stance-ja :num! (seek! (ja-aframe 15.0 0) 3.0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 15.0 0) 3.0)) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.2)) + (if (and (focus-test? self dark) (nonzero? (-> self darkjak))) + (ja :group! (-> self draw art-group data 444) :num! min) + (ja :group! jakb-jump-ja :num! min) + ) + (until #f + (ja-no-eval :group! jakb-launch-jump-loop-ja :num! (seek! max 0.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.5)) + ) + ) + #f + (until (time-elapsed? (-> self state-time) (-> self control sliding-start-time)) + (ja :num! (identity + (* 20.0 + (/ (the float (- (current-time) (-> self state-time))) (the float (-> self control sliding-start-time))) + ) + ) + ) + (suspend) + ) + (until #f + (suspend) + ) + #f + ) + :post (behavior () + (target-no-move-post) + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (let ((a2-0 (new 'stack-no-clear 'collide-query))) + (let ((v1-3 (-> self control))) + (set! (-> a2-0 collide-with) (-> v1-3 backup-collide-with)) + (set! (-> a2-0 ignore-process0) self) + (set! (-> a2-0 ignore-process1) #f) + (set! (-> a2-0 ignore-pat) (-> v1-3 pat-ignore-mask)) + ) + (set! (-> a2-0 action-mask) (collide-action solid)) + (fill-cache-for-shape (-> self control) (+ 4096.0 (vector-length (-> self control transv))) a2-0) + ) + (target-method-28 *target* *collide-cache* *collide-edge-spec*) + ) + ) + ) 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 a13e95a2c3..c6a78221e0 100644 --- a/test/decompiler/reference/jak3/engine/target/target-lightjak_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-lightjak_REF.gc @@ -18,7 +18,7 @@ ;; failed to figure out what this is: (defpart 630 - :init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4)) + :init-specs ((:texture (vol-light level-default-sprite)) (:num 1.0) (:x (meters 0)) (:y (meters 0)) @@ -42,7 +42,7 @@ ;; failed to figure out what this is: (defpart 631 - :init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4)) + :init-specs ((:texture (vol-light level-default-sprite)) (:num 1.0) (:x (meters 0)) (:y (meters 0)) @@ -66,7 +66,7 @@ ;; failed to figure out what this is: (defpart 632 - :init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4)) + :init-specs ((:texture (vol-light level-default-sprite)) (:num 1.0) (:x (meters 0)) (:y (meters 0)) @@ -90,7 +90,7 @@ ;; failed to figure out what this is: (defpart 633 - :init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4)) + :init-specs ((:texture (vol-light level-default-sprite)) (:num 1.0) (:x (meters 0)) (:y (meters 0)) @@ -114,7 +114,7 @@ ;; failed to figure out what this is: (defpart 634 - :init-specs ((:texture (new 'static 'texture-id :index #x96 :page #x4)) + :init-specs ((:texture (diamond-star level-default-sprite)) (:num 1.0) (:x (meters -0.5) (meters 1)) (:y (meters 0) (meters 8)) @@ -152,7 +152,7 @@ ;; failed to figure out what this is: (defpart 636 - :init-specs ((:texture (new 'static 'texture-id :index #x93 :page #x4)) + :init-specs ((:texture (colorflash level-default-sprite)) (:num 1.0) (:scale-x (meters 20)) (:rot-x (degrees 22.5)) @@ -187,7 +187,7 @@ ;; failed to figure out what this is: (defpart 637 - :init-specs ((:texture (new 'static 'texture-id :index #x93 :page #x4)) + :init-specs ((:texture (colorflash level-default-sprite)) (:num 1.0) (:scale-x (meters 20)) (:rot-x (degrees 22.5)) @@ -210,7 +210,7 @@ ;; failed to figure out what this is: (defpart 638 - :init-specs ((:texture (new 'static 'texture-id :index #x94 :page #x4)) + :init-specs ((:texture (rainbow-halo level-default-sprite)) (:num 1.0) (:scale-x (meters 10)) (:rot-x (degrees 22.5)) @@ -233,7 +233,7 @@ ;; failed to figure out what this is: (defpart 639 - :init-specs ((:texture (new 'static 'texture-id :index #x3d :page #x4)) + :init-specs ((:texture (middot level-default-sprite)) (:num 60.0) (:y (meters -1.5) (meters 3)) (:scale-x (meters 0.05) (meters 0.05)) @@ -294,7 +294,7 @@ ;; failed to figure out what this is: (defpart 642 - :init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4)) + :init-specs ((:texture (vol-light level-default-sprite)) (:num 0.1 0.1) (:x (meters 0)) (:y (meters 0)) @@ -326,7 +326,7 @@ ;; failed to figure out what this is: (defpart 643 - :init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4)) + :init-specs ((:texture (vol-light level-default-sprite)) (:num 0.1 0.1) (:x (meters 0)) (:y (meters 0)) @@ -353,7 +353,7 @@ ;; failed to figure out what this is: (defpart 644 - :init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4)) + :init-specs ((:texture (vol-light level-default-sprite)) (:num 0.1 0.1) (:x (meters 0)) (:y (meters 0)) @@ -381,7 +381,7 @@ ;; failed to figure out what this is: (defpart 645 - :init-specs ((:texture (new 'static 'texture-id :index #x80 :page #x4)) + :init-specs ((:texture (vol-light level-default-sprite)) (:num 0.1 0.1) (:x (meters 0)) (:y (meters 0)) @@ -409,7 +409,7 @@ ;; failed to figure out what this is: (defpart 646 - :init-specs ((:texture (new 'static 'texture-id :index #x96 :page #x4)) + :init-specs ((:texture (diamond-star level-default-sprite)) (:num 0.5 0.5) (:x (meters -0.5) (meters 1)) (:y (meters 0) (meters 8)) @@ -438,7 +438,7 @@ ;; failed to figure out what this is: (defpart 647 - :init-specs ((:texture (new 'static 'texture-id :index #x64 :page #x4)) + :init-specs ((:texture (laser-hit2 level-default-sprite)) (:num 1.0) (:y (meters 2)) (:scale-x (meters 10) (meters 5)) @@ -458,7 +458,7 @@ ;; failed to figure out what this is: (defpart 650 - :init-specs ((:texture (new 'static 'texture-id :index #xf :page #x4)) + :init-specs ((:texture (glow-soft level-default-sprite)) (:num 1.0) (:y (meters -0.025)) (:scale-x (meters 0.2)) @@ -476,7 +476,7 @@ ;; failed to figure out what this is: (defpart 651 - :init-specs ((:texture (new 'static 'texture-id :index #xd :page #x4)) + :init-specs ((:texture (glow level-default-sprite)) (:num 1.0) (:scale-x (meters 10.5) (meters 0.25)) (:rot-x (degrees 11.25)) @@ -524,7 +524,7 @@ ;; failed to figure out what this is: (defpart 653 - :init-specs ((:texture (new 'static 'texture-id :index #x3d :page #x4)) + :init-specs ((:texture (middot level-default-sprite)) (:num 1.0) (:y (meters -1) (meters 2)) (:scale-x (meters 1)) @@ -540,7 +540,7 @@ ;; failed to figure out what this is: (defpart 652 - :init-specs ((:texture (new 'static 'texture-id :index #x3d :page #x4)) + :init-specs ((:texture (middot level-default-sprite)) (:num 1.0 3.0) (:z (meters 2) (meters 1)) (:scale-x (meters 0.05) (meters 0.05)) @@ -570,7 +570,7 @@ ;; failed to figure out what this is: (defpart 654 - :init-specs ((:texture (new 'static 'texture-id :index #x19 :page #x4)) + :init-specs ((:texture (lakedrop level-default-sprite)) (:num 1.0) (:scale-x (meters 6.1)) (:rot-x (degrees 11.25)) @@ -598,7 +598,7 @@ ;; failed to figure out what this is: (defpart 655 - :init-specs ((:texture (new 'static 'texture-id :index #xe :page #x4)) + :init-specs ((:texture (glow-hotdot level-default-sprite)) (:num 1.0) (:scale-x (meters 1.5)) (:scale-y :copy scale-x) @@ -629,7 +629,7 @@ ;; failed to figure out what this is: (defpart 658 - :init-specs ((:texture (new 'static 'texture-id :index #x4b :page #x4)) + :init-specs ((:texture (starflash level-default-sprite)) (:num 1.0) (:scale-x (meters 5)) (:rot-x (degrees 2250)) @@ -650,7 +650,7 @@ ;; failed to figure out what this is: (defpart 657 - :init-specs ((:texture (new 'static 'texture-id :index #x3d :page #x4)) + :init-specs ((:texture (middot level-default-sprite)) (:num 100.0) (:scale-x (meters 0.1) (meters 0.1)) (:scale-y :copy scale-x) @@ -672,7 +672,7 @@ ;; failed to figure out what this is: (defpart 656 - :init-specs ((:texture (new 'static 'texture-id :index #xa0 :page #x4)) + :init-specs ((:texture (big-cloud level-default-sprite)) (:num 30.0) (:scale-x (meters 1) (meters 2)) (:rot-z (degrees 0) (degrees 360)) @@ -1237,53 +1237,16 @@ ) ) ) - (cond - ((logtest? (-> *part-group-id-table* 176 flags) (sp-group-flag sp13)) - (let ((gp-1 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-1 - (let ((t9-10 (method-of-type part-tracker-subsampler activate))) - (t9-10 (the-as part-tracker-subsampler gp-1) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-11 run-function-in-process) - (a0-23 gp-1) - (a1-15 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 176)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 6) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-11) a0-23 a1-15 *part-tracker-subsampler-params-default*) - ) - (-> gp-1 ppointer) - ) - ) - ) - (else - (let ((gp-2 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-2 - (let ((t9-13 (method-of-type part-tracker activate))) - (t9-13 (the-as part-tracker gp-2) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-14 run-function-in-process) - (a0-26 gp-2) - (a1-18 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 176)) - (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) self) - (set! (-> *part-tracker-params-default* mat-joint) 6) - ((the-as (function object object object none) t9-14) a0-26 a1-18 *part-tracker-params-default*) - ) - (-> gp-2 ppointer) - ) + (if (logtest? (-> *part-group-id-table* 176 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 176) + :target self + :mat-joint 6 ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 176) :target self :mat-joint 6) ) - ) ) (logand! (-> self target-effect) -3) (logand! (-> self target-effect) -17) @@ -1654,7 +1617,7 @@ (set! (-> self pending-ext-anim) (target-anim light)) (set-time! (-> self fact lightjak-start-time)) (set! (-> self fact lightjak-effect-time) (seconds 20)) - (set! (-> self lightjak mode-sound-bank) (the-as connection (add-setting! 'mode-sound-bank 'modelit 0.0 0))) + (set! (-> self lightjak mode-sound-bank) (add-setting! 'mode-sound-bank 'modelit 0.0 0)) (target-start-attack) (target-danger-set! 'get-on #f) (cond @@ -1705,53 +1668,16 @@ (set! (-> self control dynam gravity-length) 0.0) (set! (-> self control transv quad) (the-as uint128 0)) (let ((s5-2 - (cond - ((logtest? (-> *part-group-id-table* 174 flags) (sp-group-flag sp13)) - (let ((s4-1 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s4-1 - (let ((t9-24 (method-of-type part-tracker-subsampler activate))) - (t9-24 (the-as part-tracker-subsampler s4-1) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-25 run-function-in-process) - (a0-42 s4-1) - (a1-16 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 174)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 6) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-25) a0-42 a1-16 *part-tracker-subsampler-params-default*) - ) - (-> s4-1 ppointer) - ) - ) - ) - (else - (let ((s4-2 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s4-2 - (let ((t9-27 (method-of-type part-tracker activate))) - (t9-27 (the-as part-tracker s4-2) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-28 run-function-in-process) - (a0-45 s4-2) - (a1-19 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 174)) - (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) self) - (set! (-> *part-tracker-params-default* mat-joint) 6) - ((the-as (function object object object none) t9-28) a0-45 a1-19 *part-tracker-params-default*) - ) - (-> s4-2 ppointer) - ) + (if (logtest? (-> *part-group-id-table* 174 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 174) + :target self + :mat-joint 6 ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 174) :target self :mat-joint 6) ) - ) ) ) (while (!= (-> self ext-anim) (target-anim light)) @@ -1820,53 +1746,16 @@ (the-as (function gui-connection symbol) #f) (the-as process #f) ) - (cond - ((logtest? (-> *part-group-id-table* 175 flags) (sp-group-flag sp13)) - (let ((s5-4 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-4 - (let ((t9-41 (method-of-type part-tracker-subsampler activate))) - (t9-41 (the-as part-tracker-subsampler s5-4) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-42 run-function-in-process) - (a0-94 s5-4) - (a1-32 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 175)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 6) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-42) a0-94 a1-32 *part-tracker-subsampler-params-default*) - ) - (-> s5-4 ppointer) - ) - ) - ) - (else - (let ((s5-5 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-5 - (let ((t9-44 (method-of-type part-tracker activate))) - (t9-44 (the-as part-tracker s5-5) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-45 run-function-in-process) - (a0-97 s5-5) - (a1-35 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 175)) - (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) self) - (set! (-> *part-tracker-params-default* mat-joint) 6) - ((the-as (function object object object none) t9-45) a0-97 a1-35 *part-tracker-params-default*) - ) - (-> s5-5 ppointer) - ) + (if (logtest? (-> *part-group-id-table* 175 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 175) + :target self + :mat-joint 6 ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 175) :target self :mat-joint 6) ) - ) (cond ((logtest? arg0 (lightjak-stage regen)) (go target-lightjak-regen (the-as int (-> self control lightjak-sound-id))) @@ -2711,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) @@ -2758,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))) ) @@ -2881,100 +2769,26 @@ (send-event (handle->process (-> self notify)) 'notify 'attack 27) (set! (-> self neck flex-blend) 0.0) (set! (-> self alt-cam-pos quad) (-> self control trans quad)) - (cond - ((logtest? (-> *part-group-id-table* 180 flags) (sp-group-flag sp13)) - (let ((gp-0 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-0 - (let ((t9-2 (method-of-type part-tracker-subsampler activate))) - (t9-2 (the-as part-tracker-subsampler gp-0) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-3 run-function-in-process) - (a0-10 gp-0) - (a1-3 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 180)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 19) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-3) a0-10 a1-3 *part-tracker-subsampler-params-default*) - ) - (-> gp-0 ppointer) - ) - ) - ) - (else - (let ((gp-1 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-1 - (let ((t9-5 (method-of-type part-tracker activate))) - (t9-5 (the-as part-tracker gp-1) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-6 run-function-in-process) - (a0-13 gp-1) - (a1-6 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 180)) - (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) self) - (set! (-> *part-tracker-params-default* mat-joint) 19) - ((the-as (function object object object none) t9-6) a0-13 a1-6 *part-tracker-params-default*) - ) - (-> gp-1 ppointer) - ) - ) - ) - ) - (cond - ((logtest? (-> *part-group-id-table* 180 flags) (sp-group-flag sp13)) - (let ((gp-2 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-2 - (let ((t9-8 (method-of-type part-tracker-subsampler activate))) - (t9-8 (the-as part-tracker-subsampler gp-2) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-9 run-function-in-process) - (a0-16 gp-2) - (a1-9 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 180)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 28) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-9) a0-16 a1-9 *part-tracker-subsampler-params-default*) - ) - (-> gp-2 ppointer) - ) - ) - ) - (else - (let ((gp-3 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-3 - (let ((t9-11 (method-of-type part-tracker activate))) - (t9-11 (the-as part-tracker gp-3) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-12 run-function-in-process) - (a0-19 gp-3) - (a1-12 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 180)) - (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) self) - (set! (-> *part-tracker-params-default* mat-joint) 28) - ((the-as (function object object object none) t9-12) a0-19 a1-12 *part-tracker-params-default*) - ) - (-> gp-3 ppointer) - ) - ) + (if (logtest? (-> *part-group-id-table* 180 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 180) + :target self + :mat-joint 19 + ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 180) :target self :mat-joint 19) + ) + (if (logtest? (-> *part-group-id-table* 180 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 180) + :target self + :mat-joint 28 + ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 180) :target self :mat-joint 28) ) - ) (set! (-> self control mod-surface) *roll-flip-mods*) (let ((f30-0 0.0)) (if (time-elapsed? (-> self fact lightjak-start-time) (seconds 2)) @@ -2992,52 +2806,13 @@ (set! (-> *launch-matrix* trans quad) (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node jakb-lod0-jg sk_lhand)) quad) ) - (let ((gp-7 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-7 - (let ((t9-22 (method-of-type part-tracker-subsampler activate))) - (t9-22 (the-as part-tracker-subsampler gp-7) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-23 run-function-in-process) - (a0-33 gp-7) - (a1-22 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 181)) - (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-23) a0-33 a1-22 *part-tracker-subsampler-params-default*) - ) - (-> gp-7 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 181)) ) (else (set! (-> *launch-matrix* trans quad) (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node jakb-lod0-jg sk_lhand)) quad) ) - (let ((gp-9 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-9 - (let ((t9-26 (method-of-type part-tracker activate))) - (t9-26 (the-as part-tracker gp-9) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-27 run-function-in-process) - (a0-37 gp-9) - (a1-26 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 181)) - (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-27) a0-37 a1-26 *part-tracker-params-default*) - ) - (-> gp-9 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 181)) ) ) (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.5)) @@ -3268,55 +3043,11 @@ (cond ((logtest? (-> *part-group-id-table* 177 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((s5-2 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-2 - (let ((t9-19 (method-of-type part-tracker-subsampler activate))) - (t9-19 - (the-as part-tracker-subsampler s5-2) - *entity-pool* - "part-tracker-subsampler" - (the-as pointer #x70004000) - ) - ) - (let ((t9-20 run-function-in-process) - (a0-46 s5-2) - (a1-12 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 177)) - (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-20) a0-46 a1-12 *part-tracker-subsampler-params-default*) - ) - (-> s5-2 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 177)) ) (else (set! (-> *launch-matrix* trans quad) (-> self control trans quad)) - (let ((s5-3 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-3 - (let ((t9-22 (method-of-type part-tracker activate))) - (t9-22 (the-as part-tracker s5-3) *entity-pool* "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-23 run-function-in-process) - (a0-52 s5-3) - (a1-15 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 177)) - (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-23) a0-52 a1-15 *part-tracker-params-default*) - ) - (-> s5-3 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 177)) ) ) ) @@ -3392,53 +3123,16 @@ ) ) :code (behavior () - (cond - ((logtest? (-> *part-group-id-table* 178 flags) (sp-group-flag sp13)) - (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) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-2 run-function-in-process) - (a0-2 gp-0) - (a1-2 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 178)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 3) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-2) a0-2 a1-2 *part-tracker-subsampler-params-default*) - ) - (-> gp-0 ppointer) - ) - ) - ) - (else - (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) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-5 run-function-in-process) - (a0-5 gp-1) - (a1-5 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 178)) - (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) self) - (set! (-> *part-tracker-params-default* mat-joint) 3) - ((the-as (function object object object none) t9-5) a0-5 a1-5 *part-tracker-params-default*) - ) - (-> gp-1 ppointer) - ) + (if (logtest? (-> *part-group-id-table* 178 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 178) + :target self + :mat-joint 3 ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 178) :target self :mat-joint 3) ) - ) (let ((v1-30 (ja-group))) (when (not (and v1-30 (= v1-30 jakb-shield-start-ja))) (ja-channel-push! 1 (seconds 0.1)) @@ -3471,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)) @@ -3560,53 +3254,16 @@ ) (sound-play "shield-hit") (ja-channel-push! 1 (seconds 0.05)) - (cond - ((logtest? (-> *part-group-id-table* 179 flags) (sp-group-flag sp13)) - (let ((gp-1 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when gp-1 - (let ((t9-5 (method-of-type part-tracker-subsampler activate))) - (t9-5 (the-as part-tracker-subsampler gp-1) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-6 run-function-in-process) - (a0-8 gp-1) - (a1-5 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 179)) - (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) self) - (set! (-> *part-tracker-subsampler-params-default* mat-joint) 3) - (set! (-> *part-tracker-subsampler-params-default* subsample-num) 1.0) - ((the-as (function object object object none) t9-6) a0-8 a1-5 *part-tracker-subsampler-params-default*) - ) - (-> gp-1 ppointer) - ) - ) - ) - (else - (let ((gp-2 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when gp-2 - (let ((t9-8 (method-of-type part-tracker activate))) - (t9-8 (the-as part-tracker gp-2) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-9 run-function-in-process) - (a0-11 gp-2) - (a1-8 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 179)) - (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) self) - (set! (-> *part-tracker-params-default* mat-joint) 3) - ((the-as (function object object object none) t9-9) a0-11 a1-8 *part-tracker-params-default*) - ) - (-> gp-2 ppointer) - ) + (if (logtest? (-> *part-group-id-table* 179 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> *part-group-id-table* 179) + :target self + :mat-joint 3 ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 179) :target self :mat-joint 3) ) - ) (ja-no-eval :group! jakb-shield-hit-ja :num! (seek!) :frame-num 0.0) (until (ja-done? 0) (suspend) diff --git a/test/decompiler/reference/jak3/engine/target/target-part_REF.gc b/test/decompiler/reference/jak3/engine/target/target-part_REF.gc new file mode 100644 index 0000000000..c0aa67174e --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/target-part_REF.gc @@ -0,0 +1,4542 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function spt-birth-func-brightness-part-droppings-for +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-part-droppings-for ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d) (arg3 object) (arg4 object)) + (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 r-g-b-a x) (the float (- s5-0 s3-0))) + (set! (-> arg2 r-g-b-a y) (the float (- s5-0 s4-0))) + (set! (-> arg2 r-g-b-a z) (the float (- s5-0 v1-7))) + ) + (none) + ) + +;; definition for function birth-func-copy-target-y-rot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun birth-func-copy-target-y-rot ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((v1-0 *target*)) + (when v1-0 + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (set! (-> s5-0 rvec quad) (the-as uint128 0)) + (set! (-> s5-0 uvec quad) (the-as uint128 0)) + (set! (-> s5-0 fvec quad) (the-as uint128 0)) + (set! (-> s5-0 trans quad) (the-as uint128 0)) + (let ((f0-1 (+ -16384.0 (y-angle (-> v1-0 control))))) + (matrix-rotate-y! s5-0 f0-1) + ) + (vector3s-rotate*! (the-as vector3s (-> arg1 vel-sxvel)) (the-as vector3s (-> arg1 vel-sxvel)) s5-0) + (vector3s-rotate*! (the-as vector3s (-> arg1 acc)) (the-as vector3s (-> arg1 acc)) s5-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for function birth-func-ground-orient +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun birth-func-ground-orient ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (local-vars (v1-10 float) (v1-11 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((s4-0 (new 'stack-no-clear 'collide-query)) + (s5-0 *target*) + ) + (set! (-> s4-0 start-pos quad) (-> arg2 launchrot quad)) + (set-vector! (-> s4-0 move-dist) 0.0 -20480.0 0.0 1.0) + (+! (-> s4-0 start-pos y) 4096.0) + (let ((v1-3 s4-0)) + (set! (-> v1-3 radius) 40.96) + (set! (-> v1-3 collide-with) + (collide-spec + backgnd + bot + crate + civilian + enemy + obstacle + hit-by-player-list + hit-by-others-list + player-list + water + collectable + blocking-plane + tobot + pusher + vehicle-mesh + obstacle-for-jak + shield + vehicle-mesh-no-block-use + ) + ) + (set! (-> v1-3 ignore-process0) s5-0) + (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* s4-0) 0.0) + (let ((s2-0 (new 'stack-no-clear 'vector)) + (s3-1 (new 'stack-no-clear 'quaternion)) + ) + (set! (-> s2-0 x) (-> s4-0 best-other-tri normal z)) + (set! (-> s2-0 y) 0.0) + (set! (-> s2-0 z) (- (-> s4-0 best-other-tri normal x))) + (vector-normalize! s2-0 1.0) + (quaternion-vector-angle! s3-1 s2-0 (acos (-> s4-0 best-other-tri normal y))) + (let ((s4-1 (new 'stack-no-clear 'quaternion))) + (quaternion-vector-angle! s4-1 *up-vector* (+ 32768.0 (y-angle (-> s5-0 control)))) + (quaternion-normalize! (quaternion*! s3-1 s4-1 s3-1)) + ) + (cond + ((< (-> s3-1 w) 0.0) + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s3-1 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-10 vf1) + ) + (else + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s3-1 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-11 vf1) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for function birth-func-target-orient +;; WARN: Return type mismatch int vs none. +(defun birth-func-target-orient ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (local-vars (v1-10 float) (v1-11 float) (sv-16 target)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set! sv-16 *target*) + (when sv-16 + (let ((s3-0 (new 'stack-no-clear 'vector))) + (new 'stack-no-clear 'vector) + (let ((s5-0 (new 'stack-no-clear 'quaternion))) + (let ((s2-0 (-> sv-16 control local-normal))) + (set! (-> s3-0 x) (-> s2-0 z)) + (set! (-> s3-0 y) 0.0) + (set! (-> s3-0 z) (- (-> s2-0 x))) + (vector-normalize! s3-0 1.0) + (quaternion-vector-angle! s5-0 s3-0 (acos (-> s2-0 y))) + ) + (let ((s3-1 (new 'stack-no-clear 'quaternion))) + (quaternion-vector-angle! s3-1 *up-vector* (+ 32768.0 (-> arg1 user-float) (y-angle (-> sv-16 control)))) + (quaternion-normalize! (quaternion*! s5-0 s5-0 s3-1)) + ) + (cond + ((< (-> s5-0 w) 0.0) + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-10 vf1) + ) + (else + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-11 vf1) + ) + ) + ) + ) + 0 + ) + (none) + ) + ) + +;; definition for function birth-func-vector-orient +;; WARN: Return type mismatch int vs none. +(defun birth-func-vector-orient ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (local-vars (v1-3 float) (v1-4 float)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (when *target* + (let ((s4-0 (new 'stack-no-clear 'vector))) + (new 'stack-no-clear 'vector) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s3-0 (the-as sprite-vec-data-2d (-> arg1 user-float))) + ) + (when (nonzero? s3-0) + (set! (-> s4-0 x) (-> s3-0 x-y-z-sx z)) + (set! (-> s4-0 y) 0.0) + (set! (-> s4-0 z) (- (-> s3-0 x-y-z-sx x))) + (vector-normalize! s4-0 1.0) + (quaternion-vector-angle! (the-as quaternion s5-0) s4-0 (acos (-> s3-0 x-y-z-sx y))) + (cond + ((< (-> s5-0 w) 0.0) + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-0 quad)) + (.sub.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-3 vf1) + ) + (else + (.lvf vf1 (&-> arg2 conerot quad)) + (.lvf vf2 (&-> s5-0 quad)) + (.add.vf vf1 vf0 vf2 :mask #b111) + (.svf (&-> arg2 conerot quad) vf1) + (.mov v1-4 vf1) + ) + ) + ) + ) + ) + 0 + ) + (none) + ) + ) + +;; definition for function birth-func-set-alpha-from-userdata +(defun birth-func-set-alpha-from-userdata ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((f0-0 (-> arg1 user-float))) + (set! (-> arg2 coneradius) (* (-> arg2 coneradius) f0-0)) + ) + ) + +;; definition for function part-tracker-track-target-joint +;; WARN: Return type mismatch int vs none. +(defun part-tracker-track-target-joint ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 vector)) + (let* ((v1-0 *target*) + (v1-2 (vector<-cspace! (new 'stack-no-clear 'vector) (-> v1-0 node-list data (the int (-> arg1 user-float))))) + ) + (set! (-> arg2 x) (-> v1-2 x)) + (set! (-> arg2 y) (-> v1-2 y)) + (set! (-> arg2 z) (-> v1-2 z)) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-target-hit + :id 10 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 70 :period (seconds 0.5) :length (seconds 0.017)) + (sp-item 71 :period (seconds 0.5) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 71 + :init-specs ((:texture (suckpart level-default-sprite)) + (:num 16.0) + (:scale-x (meters 6) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.005) (meters 0.005)) + (:r 128.0 128.0) + (:g 128.0 128.0) + (:b 128.0 128.0) + (:a 32.0 12.0) + (:scalevel-x (meters 0.3) (meters 0.2)) + (:scalevel-y (meters 0.00125)) + (:fade-a -0.8 -0.8) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 12288.0) + (:func 'sparticle-track-root) + ) + ) + +;; failed to figure out what this is: +(defpart 70 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 64)) + (:rot-x (degrees 11.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.7)) + (:scalevel-y :copy scalevel-x) + (:fade-a -6.4) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 glow)) + (:userdata 16384.0) + (:func 'sparticle-track-root) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-spin-hit + :id 11 + :duration (seconds 0.017) + :linger-duration (seconds 0.167) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 72 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpartgroup group-punch-hit + :id 12 + :duration (seconds 0.017) + :linger-duration (seconds 0.167) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 72 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 72 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 1)) + (:scale-x (meters 5)) + (:rot-x (degrees 5.625)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 196.0) + (:g 196.0) + (:b 196.0) + (:a 12.0) + (:scalevel-x (meters 1)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.2) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-smack-surface + :id 13 + :duration (seconds 0.035) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 74) + (sp-item 75) + (sp-item 76 :binding 73) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + (sp-item 73 :flags (sp2 sp3)) + ) + ) + +;; failed to figure out what this is: +(defpart 74 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-copy-target-y-rot) + (:num 16.0) + (:scale-x (meters 1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 96.0) + (:g 96.0 32.0) + (:b 96.0 32.0) + (:a 32.0 32.0) + (:vel-y (meters 0.04) (meters 0.02)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85333335) + (:accel-y (meters -0.00033333333)) + (:friction 0.95) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 75 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-copy-target-y-rot) + (:num 8.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 96.0) + (:g 96.0 32.0) + (:b 96.0 32.0) + (:a 32.0 32.0) + (:vel-y (meters 0.08) (meters 0.02)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85333335) + (:accel-y (meters -0.00033333333)) + (:friction 0.95) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 76 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 12.0 8.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:a 0.0) + (:timer (seconds 2.015)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 9.0) + (:func 'part-tracker-track-target-joint) + ) + ) + +;; failed to figure out what this is: +(defpart 73 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters -1.3333334) (meters 2.6666667)) + (:z (meters 0.5) (meters 0.5)) + (:scale-x (meters 0.1) (meters 0.05)) + (:scale-y :copy scale-x) + (:r 32.0 92.0) + (:g 128.0 128.0) + (:b 0.0) + (:a 32.0 96.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.053333335) 1 (meters 0.10666667)) + (:vel-y (meters 0)) + (:vel-z (meters 0.0033333334)) + (:fade-a -0.30476192) + (:timer (seconds 2.015)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 ready-to-launch)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-land-poof-san + :id 14 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 77) (sp-item 78) (sp-item 79)) + ) + +;; failed to figure out what this is: +(defpart 77 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 16.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 78 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 12.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 79 + :init-specs ((:texture (rockbit12 level-default-sprite)) + (:num 32.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)) + (:rot-z (degrees 0) (degrees 360)) + (: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-land-poof-drt + :id 15 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 80) (sp-item 81) (sp-item 82)) + ) + +;; failed to figure out what this is: +(defpart 80 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 16.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 81 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 12.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 82 + :init-specs ((:texture (rockbit07 level-default-sprite)) + (:num 32.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)) + (:rot-z (degrees 0) (degrees 360)) + (: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-land-poof-snw + :id 16 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 83) (sp-item 84) (sp-item 85)) + ) + +;; failed to figure out what this is: +(defpart 83 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 16.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 196.0 64.0) + (:g 196.0 64.0) + (:b 196.0 64.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 84 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 12.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 196.0 64.0) + (:g 196.0 64.0) + (:b 196.0 64.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 85 + :init-specs ((:texture (middot level-default-sprite)) + (:num 32.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 196.0 1 64.0) + (:g 196.0 1 64.0) + (:b 196.0 1 64.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-land-poof-ice + :id 17 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 83) (sp-item 84) (sp-item 85)) + ) + +;; failed to figure out what this is: +(defpartgroup group-land-poof-grs + :id 18 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 86) (sp-item 87) (sp-item 88)) + ) + +;; failed to figure out what this is: +(defpart 86 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 16.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 32.0) + (:g 96.0 32.0) + (:b 0.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 87 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 12.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 32.0) + (:g 96.0 32.0) + (:b 0.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 88 + :init-specs ((:texture (woodchip level-default-sprite)) + (:num 32.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.15) (meters 0.35)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.15)) + (:r 0.0 2.0 64.0) + (:g 64.0 2 64.0) + (:a 64.0 64.0) + (:vel-y (meters 0.015) (meters 0.006666667)) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:fade-a -0.42666668) + (:accel-y (meters -0.0013333333) (meters 0.00083333335)) + (: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-land-poof-for + :id 19 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 89) (sp-item 90) (sp-item 91)) + ) + +;; failed to figure out what this is: +(defpart 89 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 16.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 90 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 12.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 91 + :init-specs ((:texture (leaf1 level-default-sprite)) + (:birth-func 'spt-birth-func-part-land-droppings-for) + (:num 32.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.2) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 0.0 2.0 64.0) + (:g 64.0 2 64.0) + (:a 64.0 64.0) + (:vel-y (meters 0.015) (meters 0.006666667)) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:accel-y (meters -0.0013333333) (meters 0.00083333335)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40b400 #x40b500 #x40b600)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +;; definition for function spt-birth-func-part-land-droppings-for +(defun spt-birth-func-part-land-droppings-for ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d) (arg3 object) (arg4 object)) + (spt-birth-func-brightness-part-droppings-for arg0 arg1 arg2 arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 (the-as sparticle-launchinfo arg2) arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-land-poof-wod + :id 20 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 92) (sp-item 93)) + ) + +;; failed to figure out what this is: +(defpart 92 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 16.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 96.0 32.0) + (:g 64.0) + (:b 0.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 93 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 12.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 96.0 32.0) + (:g 64.0) + (:b 0.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: +(defpartgroup group-land-poof-cwd + :id 21 + :duration (seconds 0.017) + :linger-duration (seconds 2.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 92) (sp-item 93) (sp-item 94) (sp-item 94)) + ) + +;; this part is debug only +(when *debug-segment* +;; failed to figure out what this is: +(defpartgroup group-land-poof-unk + :id 22 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 95) (sp-item 96)) + ) + +;; failed to figure out what this is: +(defpart 95 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-clean) + (:num 16.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 96.0) + (:b 96.0) + (:a 255.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 96 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-clean) + (:num 12.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 96.0) + (:b 96.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: +(defpartgroup group-land-poof-stn + :id 23 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 97) (sp-item 98)) + ) + +;; failed to figure out what this is: +(defpart 97 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 16.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 96.0 32.0) + (:g 96.0) + (:b 96.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 98 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 12.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 96.0 32.0) + (:g 96.0) + (:b 96.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: +(defpartgroup group-land-poof-pmt + :id 24 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 99) (sp-item 100)) + ) + +;; failed to figure out what this is: +(defpart 99 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 16.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 70.0 32.0) + (:b 40.0 20.0) + (:a 24.0 24.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (: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 100 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 12.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 70.0 32.0) + (:b 40.0 20.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)) + ) + ) + +;; this part is debug only +(when *debug-segment* +;; failed to figure out what this is: +(defpartgroup group-run-poof-unk + :id 25 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 101)) + ) + +;; failed to figure out what this is: +(defpartgroup group-just-poof-unk + :id 26 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 101)) + ) + +;; failed to figure out what this is: +(defpart 101 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-clean) + (:num 8.0 16.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0) + (:b 32.0) + (:a 255.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:fade-a -0.45714286) + (:friction 0.965) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +) +;; failed to figure out what this is: +(defpartgroup group-run-poof-stn + :id 27 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 102)) + ) + +;; failed to figure out what this is: +(defpartgroup group-just-poof-stn + :id 28 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 102)) + ) + +;; failed to figure out what this is: +(defpart 102 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 96.0 32.0) + (:g 96.0) + (:b 96.0) + (:a 16.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:fade-a -0.48) + (:friction 0.965) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-run-poof-snw + :id 29 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 103) (sp-item 104 :flags (is-3d))) + ) + +;; failed to figure out what this is: +(defpartgroup group-just-poof-snw + :id 30 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 103)) + ) + +;; failed to figure out what this is: +(defpartgroup group-just-footprint-snw + :id 31 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 104 :flags (is-3d))) + ) + +;; failed to figure out what this is: +(defpart 104 + :init-specs ((:texture (footprntr level-default-sprite)) + (:birth-func 'birth-func-target-orient) + (:num 1.0) + (:x (meters -0.25)) + (:scale-x (meters 0.6)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0) + (:b 16.0) + (:a 64.0) + (:fade-a -0.07111111) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 103 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 196.0 64.0) + (:g 196.0 64.0) + (:b 196.0 64.0) + (:a 24.0 24.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:fade-a -0.48) + (:friction 0.965) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-run-poof-ice + :id 32 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 103)) + ) + +;; failed to figure out what this is: +(defpartgroup group-just-poof-ice + :id 33 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 103)) + ) + +;; failed to figure out what this is: +(defpartgroup group-run-poof-cwd + :id 34 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 105) (sp-item 105) (sp-item 94)) + ) + +;; failed to figure out what this is: +(defpartgroup group-just-poof-cwd + :id 35 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 106)) + ) + +;; failed to figure out what this is: +(defpart 94 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 8.0 16.0) + (:y (meters -1)) + (:scale-x (meters 1) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 64.0 32.0) + (:g 64.0) + (:b 0.0 32.0) + (:a 0.0) + (:vel-y (meters 0) (meters -0.0033333334)) + (:scalevel-x (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.16) + (:accel-y (meters -0.00006666667)) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.25) (seconds 0.247)) + (:next-launcher 107) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0) (meters 3)) + ) + ) + +;; failed to figure out what this is: +(defpart 107 + :init-specs ((:fade-a 0.0) (:next-time (seconds 0.5) (seconds 0.497)) (:next-launcher 108)) + ) + +;; failed to figure out what this is: +(defpart 108 + :init-specs ((:fade-a -0.08)) + ) + +;; failed to figure out what this is: +(defpartgroup group-run-poof-wod + :id 36 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 105)) + ) + +;; failed to figure out what this is: +(defpartgroup group-just-poof-wod + :id 37 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 105)) + ) + +;; failed to figure out what this is: +(defpart 105 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 96.0 32.0) + (:g 64.0) + (:b 0.0 32.0) + (:a 16.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:fade-a -0.48) + (:friction 0.965) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-run-poof-pmt + :id 38 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 109)) + ) + +;; failed to figure out what this is: +(defpartgroup group-just-poof-pmt + :id 39 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 109)) + ) + +;; failed to figure out what this is: +(defpart 109 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 70.0 32.0) + (:b 40.0 20.0) + (:a 16.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:fade-a -0.48) + (:friction 0.965) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-run-poof-grs + :id 40 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 110) (sp-item 111 :flags (is-3d))) + ) + +;; failed to figure out what this is: +(defpartgroup group-just-poof-grs + :id 41 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 110)) + ) + +;; failed to figure out what this is: +(defpartgroup group-just-footprint-grs + :id 42 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 111 :flags (is-3d))) + ) + +;; failed to figure out what this is: +(defpart 110 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 64.0 32.0) + (:g 96.0 32.0) + (:b 0.0 32.0) + (:a 16.0 32.0) + (:vel-y (meters 0.02) (meters 0.01)) + (:fade-a -0.48) + (:friction 0.965) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 111 + :init-specs ((:texture (footprntr level-default-sprite)) + (:birth-func 'birth-func-target-orient) + (:num 1.0) + (:x (meters -0.25)) + (:scale-x (meters 0.6)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0) + (:b 16.0) + (:a 48.0) + (:fade-a -0.053333335) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-run-poof-for + :id 43 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 112) (sp-item 113 :flags (is-3d))) + ) + +;; failed to figure out what this is: +(defpartgroup group-just-poof-for + :id 44 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 110)) + ) + +;; failed to figure out what this is: +(defpartgroup group-just-footprint-for + :id 45 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 111 :flags (is-3d))) + ) + +;; failed to figure out what this is: +(defpart 112 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.5) (meters 0.5)) + (: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)) + (:fade-a -0.48) + (:friction 0.965) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 113 + :init-specs ((:texture (footprntr level-default-sprite)) + (:birth-func 'birth-func-target-orient) + (:num 1.0) + (:x (meters -0.25)) + (:scale-x (meters 0.6)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0) + (:b 16.0) + (:a 48.0) + (:fade-a -0.053333335) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-run-poof-san + :id 46 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 106) (sp-item 114 :flags (is-3d))) + ) + +;; failed to figure out what this is: +(defpartgroup group-just-poof-san + :id 47 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 106)) + ) + +;; failed to figure out what this is: +(defpartgroup group-just-footprint-san + :id 48 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 114 :flags (is-3d))) + ) + +;; failed to figure out what this is: +(defpart 106 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.5) (meters 0.5)) + (: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)) + (:fade-a -0.48) + (:friction 0.965) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 114 + :init-specs ((:texture (footprntr level-default-sprite)) + (:birth-func 'birth-func-target-orient) + (:num 1.0) + (:x (meters -0.25)) + (:scale-x (meters 0.6)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0) + (:b 16.0) + (:a 32.0) + (:fade-a -0.035555556) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-run-poof-drt + :id 49 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 115)) + ) + +;; failed to figure out what this is: +(defpartgroup group-just-poof-drt + :id 50 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 115)) + ) + +;; failed to figure out what this is: +(defpartgroup group-just-footprint-drt + :id 51 + :duration (seconds 0.017) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 116 :flags (is-3d))) + ) + +;; failed to figure out what this is: +(defpart 115 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.5) (meters 0.5)) + (: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)) + (:fade-a -0.48) + (:friction 0.965) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 116 + :init-specs ((:texture (footprntr level-default-sprite)) + (:birth-func 'birth-func-target-orient) + (:num 1.0) + (:x (meters -0.25)) + (:scale-x (meters 0.6)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0) + (:b 16.0) + (:a 32.0) + (:fade-a -0.035555556) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 117 + :init-specs ((:texture (rockbit12 level-default-sprite)) + (:num 0.0 6.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-x (meters -0.00083333335) (meters 0.0016666667)) + (:vel-y (meters 0.005) (meters 0.006666667)) + (:vel-z (meters -0.00083333335) (meters 0.0016666667)) + (:fade-a -0.42666668) + (:accel-y (meters -0.00066666666) (meters 0.00033333333)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:rotate-z (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 118 + :init-specs ((:texture (rockbit15 level-default-sprite)) + (:num 0.0 6.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-x (meters -0.00083333335) (meters 0.0016666667)) + (:vel-y (meters 0.005) (meters 0.006666667)) + (:vel-z (meters -0.00083333335) (meters 0.0016666667)) + (:fade-a -0.42666668) + (:accel-y (meters -0.00066666666) (meters 0.00033333333)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 119 + :init-specs ((:texture (woodchip level-default-sprite)) + (:num 0.0 2.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.2) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.1)) + (:r 0.0 2.0 64.0) + (:g 64.0 2 64.0) + (:a 96.0 32.0) + (:vel-x (meters -0.00083333335) (meters 0.0016666667)) + (:vel-y (meters 0.005) (meters 0.006666667)) + (:vel-z (meters -0.00083333335) (meters 0.0016666667)) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:fade-a -0.42666668) + (:accel-y (meters -0.00066666666) (meters 0.00033333333)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 120 + :init-specs ((:texture (leaf1 level-default-sprite)) + (:birth-func 'spt-birth-func-part-droppings-for) + (:num 0.0 0.5) + (: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.2) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-x (meters -0.00083333335) (meters 0.0016666667)) + (:vel-y (meters 0.005) (meters 0.006666667)) + (:vel-z (meters -0.00083333335) (meters 0.0016666667)) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:accel-y (meters -0.00066666666) (meters 0.00033333333)) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 aux-list sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40b400 #x40b500 #x40b600)) + ) + ) + +;; definition for function spt-birth-func-part-droppings-for +(defun spt-birth-func-part-droppings-for ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (spt-birth-func-brightness-part-droppings-for arg0 arg1 (the-as sprite-vec-data-2d arg2) arg3 arg4) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpart 121 + :init-specs ((:texture (middot level-default-sprite)) + (:num 0.0 6.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 196.0 1 64.0) + (:g 196.0 1 64.0) + (:b 196.0 1 64.0) + (:a 64.0 64.0) + (:vel-x (meters -0.00083333335) (meters 0.0016666667)) + (:vel-y (meters 0.005) (meters 0.006666667)) + (:vel-z (meters -0.00083333335) (meters 0.0016666667)) + (:fade-a -0.42666668) + (:accel-y (meters -0.00066666666) (meters 0.00033333333)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-slide-poof-san + :id 52 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 122) (sp-item 123)) + ) + +;; failed to figure out what this is: +(defpart 122 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 6.0 6.0) + (:scale-x (meters 0.6) (meters 0.6)) + (: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.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.17777778) + (:accel-y (meters -0.00006666667)) + (:friction 0.94) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 123 + :init-specs ((:texture (rockbit12 level-default-sprite)) + (:num 0.0 8.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.008333334) (meters 0.0033333334)) + (:fade-a -0.42666668) + (:accel-y (meters -0.001) (meters 0.0005)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (: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-slide-poof-drt + :id 53 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 124) (sp-item 125)) + ) + +;; failed to figure out what this is: +(defpart 124 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 6.0 6.0) + (:scale-x (meters 0.6) (meters 0.6)) + (: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.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.17777778) + (:accel-y (meters -0.00006666667)) + (:friction 0.94) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 125 + :init-specs ((:texture (rockbit15 level-default-sprite)) + (:num 0.0 8.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.008333334) (meters 0.0033333334)) + (:fade-a -0.42666668) + (:accel-y (meters -0.001) (meters 0.0005)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (: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-slide-poof-grs + :id 54 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 126) (sp-item 127)) + ) + +;; failed to figure out what this is: +(defpart 126 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 6.0 6.0) + (:scale-x (meters 0.6) (meters 0.6)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 32.0) + (:g 96.0 32.0) + (:b 0.0 32.0) + (:a 16.0 16.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.17777778) + (:accel-y (meters -0.00006666667)) + (:friction 0.94) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 127 + :init-specs ((:texture (woodchip level-default-sprite)) + (:num 0.0 8.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.15) (meters 0.35)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.15)) + (:r 0.0 2.0 64.0) + (:g 64.0 2 64.0) + (:a 64.0 64.0) + (:vel-y (meters 0.008333334) (meters 0.0033333334)) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:fade-a -0.42666668) + (:accel-y (meters -0.001) (meters 0.0005)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (: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-slide-poof-for + :id 55 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 128) (sp-item 129)) + ) + +;; failed to figure out what this is: +(defpart 128 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 6.0 6.0) + (:scale-x (meters 0.6) (meters 0.6)) + (: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.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.17777778) + (:accel-y (meters -0.00006666667)) + (:friction 0.94) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 129 + :init-specs ((:texture (leaf1 level-default-sprite)) + (:birth-func 'spt-birth-func-part-slide-droppings-for) + (:num 0.0 8.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.4) (meters 0.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.008333334) (meters 0.0033333334)) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:fade-a -0.42666668) + (:accel-y (meters -0.001) (meters 0.0005)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40b400 #x40b500 #x40b600)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 0.5)) + ) + ) + +;; definition for function spt-birth-func-part-slide-droppings-for +(defun spt-birth-func-part-slide-droppings-for ((arg0 int) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (spt-birth-func-brightness-part-droppings-for + (the-as sparticle-system arg0) + arg1 + (the-as sprite-vec-data-2d arg2) + arg3 + arg4 + ) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-slide-poof-stn + :id 56 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 130)) + ) + +;; failed to figure out what this is: +(defpart 130 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 6.0 6.0) + (:scale-x (meters 0.6) (meters 0.6)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 96.0 32.0) + (:g 96.0) + (:b 96.0) + (:a 16.0 16.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.17777778) + (:accel-y (meters -0.00006666667)) + (:friction 0.94) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-slide-poof-pmt + :id 57 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 131)) + ) + +;; failed to figure out what this is: +(defpart 131 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 6.0 6.0) + (:scale-x (meters 0.6) (meters 0.6)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 70.0 32.0) + (:b 40.0 20.0) + (:a 16.0 16.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.17777778) + (:accel-y (meters -0.00006666667)) + (:friction 0.94) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-slide-poof-snw + :id 58 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 132)) + ) + +;; failed to figure out what this is: +(defpart 132 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 6.0 6.0) + (:scale-x (meters 0.6) (meters 0.6)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 196.0 1 64.0) + (:g 196.0 1 64.0) + (:b 196.0 1 64.0) + (:a 16.0 16.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.17777778) + (:accel-y (meters -0.00006666667)) + (:friction 0.94) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-slide-poof-ice + :id 59 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 132)) + ) + +;; failed to figure out what this is: +(defpartgroup group-slide-poof-wod + :id 60 + :duration (seconds 0.017) + :linger-duration (seconds 1.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 133)) + ) + +;; failed to figure out what this is: +(defpart 133 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 6.0 6.0) + (:scale-x (meters 0.6) (meters 0.6)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 96.0 32.0) + (:g 64.0) + (:b 0.0 32.0) + (:a 16.0 16.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.17777778) + (:accel-y (meters -0.00006666667)) + (:friction 0.94) + (:timer (seconds 0.6)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 60) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-slide-poof-cwd + :id 61 + :duration (seconds 0.017) + :linger-duration (seconds 2.5) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 133)) + ) + +;; failed to figure out what this is: +(defpart 134 + :init-specs ((:texture (rockbit12 level-default-sprite)) + (:num 0.0 8.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) + (:fade-a -0.42666668) + (:accel-y (meters -0.0013333333) (meters 0.00083333335)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 135 + :init-specs ((:texture (rockbit15 level-default-sprite)) + (:num 0.0 8.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) + (:fade-a -0.42666668) + (:accel-y (meters -0.0013333333) (meters 0.00083333335)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 136 + :init-specs ((:texture (middot level-default-sprite)) + (:num 0.0 8.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 196.0 1 64.0) + (:g 196.0 1 64.0) + (:b 196.0 1 64.0) + (:a 64.0 64.0) + (:fade-a -0.42666668) + (:accel-y (meters -0.0013333333) (meters 0.00083333335)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 137 + :init-specs ((:texture (woodchip level-default-sprite)) + (:num 0.0 8.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.15) (meters 0.35)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.15)) + (:r 0.0 2.0 64.0) + (:g 64.0 2 64.0) + (:a 64.0 64.0) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:fade-a -0.42666668) + (:accel-y (meters -0.0013333333) (meters 0.00083333335)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 138 + :init-specs ((:texture (leaf1 level-default-sprite)) + (:birth-func 'spt-birth-func-part-jump-droppings-for) + (:num 0.0 8.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.15) (meters 0.35)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.15)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:fade-a -0.42666668) + (:accel-y (meters -0.0013333333) (meters 0.00083333335)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x40b400 #x40b500 #x40b600)) + ) + ) + +;; definition for function spt-birth-func-part-jump-droppings-for +(defun spt-birth-func-part-jump-droppings-for ((arg0 int) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (spt-birth-func-brightness-part-droppings-for + (the-as sparticle-system arg0) + arg1 + (the-as sprite-vec-data-2d arg2) + arg3 + arg4 + ) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; failed to figure out what this is: +(defpart 139 + ) + +;; failed to figure out what this is: +(defpart 140 + ) + +;; failed to figure out what this is: +(defpart 141 + ) + +;; failed to figure out what this is: +(defpart 142 + ) + +;; failed to figure out what this is: +(defpartgroup group-dark-eco-death + :id 62 + :duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 145 :fade-after (meters 100) :period (seconds 2) :length (seconds 0.017) :binding 143) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 143 :flags (sp2 sp3) :binding 144) + (sp-item 144 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp2)) + (sp-item 146 :period (seconds 2) :length (seconds 0.017)) + (sp-item 147 :fade-after (meters 80) :falloff-to (meters 80) :period (seconds 2) :length (seconds 0.135)) + (sp-item 148 :period (seconds 2) :length (seconds 0.067)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-slime-death + :id 63 + :linger-duration (seconds 3) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 149 :period (seconds 10) :length (seconds 1.667)) + (sp-item 150 :period (seconds 10) :length (seconds 3)) + ) + ) + +;; failed to figure out what this is: +(defpart 149 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-flip-based-on-scale) + (:num 0.8) + (:scale-x (meters -1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 200.0) + (:g 200.0) + (:b 200.0) + (:a 0.0) + (:omega (degrees 0.225)) + (:vel-y (meters 0.06666667)) + (:scalevel-x (meters 0.01) (meters 0.02)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.32 0.32) + (:accel-y (meters 0.0016666667)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.167)) + (:next-launcher 151) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 151 + :init-specs ((:fade-a -0.10666667 -0.10666667) (:func 'none)) + ) + +;; failed to figure out what this is: +(defpart 150 + :init-specs ((:texture (mud-bubble ctywide-sprite)) + (:num 4.0) + (:x (meters 0.2) (meters 1.5)) + (:y (meters 0)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 80.0 40.0) + (:g 110.0) + (:b 60.0) + (:a 128.0) + (:scalevel-x (meters 0.00066666666) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.167) (seconds 0.33)) + (:flags ()) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-lava-death + :id 64 + :duration (seconds 0.25) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 152) (sp-item 153) (sp-item 154) (sp-item 155)) + ) + +;; failed to figure out what this is: +(defpartgroup group-explode-death + :id 65 + :duration (seconds 0.25) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 153) (sp-item 154)) + ) + +;; failed to figure out what this is: +(defpartgroup group-burn-death + :id 66 + :duration (seconds 0.5) + :linger-duration (seconds 2) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 152)) + ) + +;; failed to figure out what this is: +(defpart 155 + :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) + (: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.2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 0) (degrees 60)) + (:conerot-y (degrees 0) (degrees 360)) + (:conerot-radius (meters 1)) + ) + ) + +;; failed to figure out what this is: +(defpart 152 + :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.023529412)) + (:rotvel-z (degrees -0.6) (degrees 1.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.5058824) + (:friction 0.98) + (:timer (seconds 0.27)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (: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 153 + :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.04444444)) + (:rotvel-z (degrees -0.6) (degrees 1.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -2.8444443) + (:friction 0.98) + (:timer (seconds 0.14)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:conerot-x (degrees 90)) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 154 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 8.0) + (:x (meters -1) (meters 2)) + (:y (meters 0) (meters 3)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 2) (meters 3)) + (: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.008888889)) + (: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.15) + (:friction 0.97) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.27) (seconds 0.267)) + (:next-launcher 156) + (:conerot-x (degrees 0) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 156 + :init-specs ((:fade-a -0.08)) + ) + +;; failed to figure out what this is: +(defpart 157 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g 32.0 32.0) + (:b 32.0 32.0) + (:a 0.0) + (:vel-y (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.85333335) + (:friction 0.98) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.05) (seconds 0.197)) + (:next-launcher 158) + ) + ) + +;; failed to figure out what this is: +(defpart 158 + :init-specs ((:fade-a -0.28444445)) + ) + +;; definition for function process-drawable-burn-effect +;; INFO: Used lq/sq +(defbehavior process-drawable-burn-effect target ((arg0 time-frame)) + (sound-play "get-burned") + (let ((s5-1 (new 'stack 'rgbaf)) + (s3-0 (current-time)) + (s4-1 (-> self parent)) + ) + (set! (-> s5-1 quad) (-> (the-as process-drawable (-> s4-1 0)) draw color-mult quad)) + (let ((s2-1 (vector-float*! (the-as vector (new 'stack 'rgbaf)) (the-as vector s5-1) 0.0))) + (while (not (time-elapsed? s3-0 arg0)) + (let ((v1-8 (- (current-time) s3-0))) + (if (< v1-8 (the-as time-frame (/ arg0 2))) + (vector-lerp! + (-> (the-as process-drawable (-> s4-1 0)) draw color-mult) + s5-1 + s2-1 + (/ (the float v1-8) (the float arg0)) + ) + (vector-lerp! + (-> (the-as process-drawable (-> s4-1 0)) draw color-mult) + s5-1 + s2-1 + (- 1.0 (/ (the float v1-8) (the float arg0))) + ) + ) + ) + (let ((v1-13 (process-drawable-random-point! + (the-as process-drawable (ppointer->process s4-1)) + (new 'stack-no-clear 'vector) + ) + ) + (t9-7 sp-launch-particles-var) + (a0-18 *sp-particle-system-2d*) + (a1-7 (-> *part-id-table* 157)) + (a2-3 *launch-matrix*) + ) + (set! (-> a2-3 trans quad) (-> v1-13 quad)) + (t9-7 a0-18 a1-7 a2-3 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (suspend) + 0 + ) + ) + (let ((v0-8 (-> (the-as process-drawable (-> s4-1 0)) draw color-mult))) + (set! (-> v0-8 quad) (-> s5-1 quad)) + v0-8 + ) + ) + ) + +;; failed to figure out what this is: +(defpart 159 + :init-specs ((:texture (gun-blue-puffs level-default-sprite)) + (:birth-func 'birth-func-target-orient) + (:num 1.0) + (:y (meters 0.02)) + (:scale-x (meters 0.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 110.0 32.0) + (:g 128.0 32.0) + (:b 96.0 32.0) + (:a 8.0 40.0) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.2) + (:timer (seconds 0.8)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:userdata -8192.0) + ) + ) + +;; failed to figure out what this is: +(defpart 160 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 128.0 64.0) + (:b 255.0) + (:a 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.017)) + (:next-launcher 161) + ) + ) + +;; failed to figure out what this is: +(defpart 161 + :init-specs ((:scale-x (meters 0.2) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g 128.0 64.0) + (:b 255.0) + (:a 24.0 32.0) + (:next-time (seconds 0.017)) + (:next-launcher 161) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-lightning-glow + :id 67 + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 162 :flags (sp6)) (sp-item 163 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 162 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 4)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 0.0 32.0) + (:g 32.0 96.0) + (:b 128.0 128.0) + (:a 4.0 8.0) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 2)) + ) + ) + +;; failed to figure out what this is: +(defpart 163 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 2)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0 128.0) + (:b 255.0) + (:a 6.0 12.0) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 1)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-lightning-green-glow + :id 68 + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 164 :flags (sp6)) (sp-item 165 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 164 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 4)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 0.0 32.0) + (:g 128.0 128.0) + (:b 32.0 96.0) + (:a 4.0 8.0) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 2)) + ) + ) + +;; failed to figure out what this is: +(defpart 165 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 2)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 0.0 32.0) + (:g 128.0 128.0) + (:b 32.0 96.0) + (:a 4.0 8.0) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 1)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-lightning-red-glow + :id 69 + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 166 :flags (sp6)) (sp-item 167 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 166 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 4)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 32.0 96.0) + (:b 0.0 32.0) + (:a 4.0 8.0) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 2)) + ) + ) + +;; failed to figure out what this is: +(defpart 167 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 2)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 32.0 96.0) + (:b 0.0 32.0) + (:a 4.0 8.0) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 1)) + ) + ) + +;; definition for function lightning-probe-callback +;; WARN: Return type mismatch int vs none. +(defun lightning-probe-callback ((arg0 lightning-tracker)) + (let ((v1-1 (+ (-> arg0 user-time 0) 1))) + (set! (-> arg0 user-time 0) v1-1) + (when (= v1-1 (seconds 0.007)) + (let* ((v1-2 (rand-vu-int-range 64 128)) + (v0-3 (logior (logior (logior #x800000 v1-2) (* v1-2 256)) (shl (rand-vu-int-range 32 64) 24))) + (v1-6 (-> arg0 lightning state)) + ) + (set! (-> v1-6 start-color) (the-as rgba v0-3)) + (set! (-> v1-6 end-color) (the-as rgba v0-3)) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 1) (new 'static 'lightning-spec + :name "lightning-shock" + :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 16384.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: +(set! (-> *lightning-spec-id-table* 2) (new 'static 'lightning-spec + :name "lightning-shock-dim" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x20) + :end-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x20) + :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 16384.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: +(set! (-> *lightning-spec-id-table* 3) (new 'static 'lightning-spec + :name "lightning-shock-red" + :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 #x40 :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 16384.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: +(set! (-> *lightning-spec-id-table* 4) (new 'static 'lightning-spec + :name "lightning-shock-green" + :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 #x3b :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 16384.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: +(set! (-> *lightning-spec-id-table* 5) (new 'static 'lightning-spec + :name "lightning-dark" + :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 #x3a :page #x4) + :reduction 0.52 + :num-points 32 + :box-size 16384.0 + :merge-factor 0.5 + :merge-count 2 + :radius 1228.8 + :duration 30.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-lightning-dark-shot-tip-hit-replace + :id 70 + :duration (seconds 0.017) + :linger-duration (seconds 0.085) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 168 :flags (sp7) :period (seconds 10) :length (seconds 0.017))) + ) + +;; failed to figure out what this is: +(defpart 168 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0 3.0) + (:scale-x (meters 0.1) (meters 0.1)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 0.0 64.0) + (:g 64.0 64.0) + (:b 255.0) + (:a 255.0) + (:vel-z (meters 0.01) (meters 0.0033333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.7) + (:friction 0.99) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-lightning-2d-spline-align-plus-rotz) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function process-drawable-shock-effect-replace +;; INFO: Used lq/sq +;; WARN: Stack slot offset 720 signed mismatch +;; WARN: Stack slot offset 720 signed mismatch +;; WARN: Stack slot offset 720 signed mismatch +;; WARN: Stack slot offset 720 signed mismatch +;; WARN: Stack slot offset 720 signed mismatch +;; WARN: Stack slot offset 720 signed mismatch +;; WARN: Stack slot offset 720 signed mismatch +;; WARN: Return type mismatch int vs none. +(defun process-drawable-shock-effect-replace ((arg0 process-drawable) + (arg1 lightning-spec) + (arg2 (function lightning-tracker none)) + (arg3 int) + (arg4 int) + (arg5 float) + ) + (local-vars + (sv-640 (pointer process)) + (sv-720 float) + (sv-736 int) + (sv-752 matrix) + (sv-768 collide-query) + (sv-784 symbol) + (sv-800 vector) + (sv-816 int) + (sv-832 process) + ) + (set! sv-720 arg5) + (let ((s5-0 *lightning-probe-vars*)) + (if (= arg3 256) + (set! sv-736 arg3) + (set! sv-736 (rand-vu-int-range 3 (/ (+ (-> arg0 node-list length) -1) 2))) + ) + (set! sv-752 (new 'stack-no-clear 'matrix)) + (set! sv-768 (new 'stack-no-clear 'collide-query)) + (set! sv-784 (the-as symbol #f)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> *up-vector* quad)) + (when (nonzero? arg3) + (set! sv-736 arg3) + sv-736 + ) + (if (= arg3 256) + (set! (-> sv-768 start-pos quad) (-> arg0 root trans quad)) + (vector<-cspace! (-> sv-768 start-pos) (-> arg0 node-list data sv-736)) + ) + (set! sv-800 (-> sv-768 move-dist)) + (set! (-> sv-800 x) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-800 y) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-800 z) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-800 w) 1.0) + (matrix-rotate-zyx! sv-752 (-> sv-768 move-dist)) + (set! sv-816 6) + (while (nonzero? sv-816) + (set! sv-816 (+ sv-816 -1)) + (vector-rotate*! (-> sv-768 move-dist) (-> s5-0 probe-dirs sv-816) sv-752) + (vector-normalize! (-> sv-768 move-dist) sv-720) + (let ((v1-31 sv-768)) + (set! (-> v1-31 radius) 409.6) + (set! (-> v1-31 collide-with) (collide-spec backgnd crate obstacle hit-by-others-list pusher)) + (set! (-> v1-31 ignore-process0) arg0) + (set! (-> v1-31 ignore-process1) #f) + (set! (-> v1-31 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-31 action-mask) (collide-action solid)) + ) + (when (>= (fill-and-probe-using-line-sphere *collide-cache* sv-768) 0.0) + (set-time! (-> s5-0 last-valid-time)) + (set! (-> s5-0 src-joint-index) (the-as uint sv-736)) + (set! (-> s5-0 end-pos quad) (-> sv-768 best-other-tri intersect quad)) + (when (< 8192.0 (vector-vector-distance (-> s5-0 end-pos) (-> sv-768 start-pos))) + (set! (-> gp-0 quad) (-> sv-768 best-other-tri normal quad)) + (set! sv-784 #t) + (goto cfg-15) + ) + ) + ) + (label cfg-15) + (when sv-784 + (let* ((a0-24 *default-dead-pool*) + (t9-10 (method-of-object a0-24 get-process)) + (a1-14 lightning-tracker) + (a2-2 (the-as object #x4000)) + (a3-1 0) + ) + (set! sv-832 (t9-10 a0-24 a1-14 (the-as int a2-2) a3-1)) + (set! sv-640 + (when sv-832 + (let ((t9-11 (method-of-type lightning-tracker activate))) + (t9-11 (the-as lightning-tracker sv-832) arg0 "lightning-tracker" (the-as pointer #x70004000)) + ) + (set! a2-2 arg1) + (set! a3-1 arg4) + (run-now-in-process + sv-832 + lightning-tracker-init + (the-as lightning-spec a2-2) + a3-1 + arg2 + arg0 + (if (= arg3 256) + (-> arg0 root trans) + (-> s5-0 src-joint-index) + ) + (-> s5-0 end-pos) + ) + (-> sv-832 ppointer) + ) + ) + (when sv-640 + (set! (-> (the-as lightning-tracker (-> sv-640 0)) user-time 0) 0) + (let ((v1-63 (get-field-spec-by-id (-> *part-id-table* 168) (sp-field-id spt-timer)))) + (if v1-63 + (set! (-> v1-63 initial-valuef) (the-as float (-> (the-as lightning-tracker (-> sv-640 0)) duration))) + ) + ) + (let ((s4-1 (matrix-u-compose (new 'stack-no-clear 'matrix) gp-0 (the-as vector a2-2) (the-as vector a3-1)))) + (set! (-> s4-1 trans quad) (-> s5-0 end-pos quad)) + (vector+float*! (-> s4-1 trans) (-> s4-1 trans) gp-0 409.6) + (if (logtest? (-> *part-group-id-table* 70 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 70) + :mat-joint s4-1 + ) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 70) :mat-joint s4-1) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function process-drawable-shock-effect +;; INFO: Used lq/sq +;; WARN: Stack slot offset 640 signed mismatch +;; WARN: Stack slot offset 640 signed mismatch +;; WARN: Stack slot offset 640 signed mismatch +;; WARN: Stack slot offset 640 signed mismatch +;; WARN: Return type mismatch int vs object. +(defun process-drawable-shock-effect ((arg0 process-drawable) + (arg1 lightning-spec) + (arg2 (function lightning-tracker none)) + (arg3 sparticle-launcher) + (arg4 int) + (arg5 int) + (arg6 float) + ) + (local-vars + (sv-624 (pointer process)) + (sv-640 float) + (sv-656 int) + (sv-672 matrix) + (sv-688 collide-query) + (sv-704 symbol) + (sv-720 vector) + (sv-736 int) + (sv-752 process) + ) + (set! sv-640 arg6) + (when (or (= arg4 256) (and (nonzero? (-> arg0 node-list)) (> (-> arg0 node-list length) 0))) + (let ((s5-0 *lightning-probe-vars*)) + (if (= arg4 256) + (set! sv-656 arg4) + (set! sv-656 (rand-vu-int-range 3 (/ (+ (-> arg0 node-list length) -1) 2))) + ) + (set! sv-672 (new 'stack-no-clear 'matrix)) + (set! sv-688 (new 'stack-no-clear 'collide-query)) + (set! sv-704 (the-as symbol #f)) + (when (nonzero? arg4) + (set! sv-656 arg4) + sv-656 + ) + (if (= arg4 256) + (set! (-> sv-688 start-pos quad) (-> arg0 root trans quad)) + (vector<-cspace! (-> sv-688 start-pos) (-> arg0 node-list data sv-656)) + ) + (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-640) + (let ((v1-35 sv-688)) + (set! (-> v1-35 radius) 409.6) + (set! (-> v1-35 collide-with) (collide-spec backgnd crate obstacle hit-by-others-list pusher)) + (set! (-> v1-35 ignore-process0) arg0) + (set! (-> v1-35 ignore-process1) #f) + (set! (-> v1-35 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-35 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! (-> s5-0 src-joint-index) (the-as uint sv-656)) + (set! (-> s5-0 end-pos quad) (-> sv-688 best-other-tri intersect quad)) + (when (< 8192.0 (vector-vector-distance (-> s5-0 end-pos) (-> sv-688 start-pos))) + (set! sv-704 #t) + (goto cfg-21) + ) + ) + ) + (label cfg-21) + (when sv-704 + (set! sv-752 (get-process *default-dead-pool* lightning-tracker #x4000 0)) + (set! sv-624 + (when sv-752 + (let ((t9-11 (method-of-type lightning-tracker activate))) + (t9-11 (the-as lightning-tracker sv-752) arg0 "lightning-tracker" (the-as pointer #x70004000)) + ) + (run-now-in-process + sv-752 + lightning-tracker-init + arg1 + arg5 + arg2 + arg0 + (if (= arg4 256) + (-> arg0 root trans) + (-> s5-0 src-joint-index) + ) + (-> s5-0 end-pos) + ) + (-> sv-752 ppointer) + ) + ) + (when sv-624 + (set! (-> (the-as lightning-tracker (-> sv-624 0)) user-time 0) 0) + (when arg3 + (let ((v1-66 (get-field-spec-by-id arg3 (sp-field-id spt-timer)))) + (if v1-66 + (set! (-> v1-66 initial-valuef) (the-as float (-> (the-as lightning-tracker (-> sv-624 0)) duration))) + ) + ) + (let ((t9-14 sp-launch-particles-var) + (a0-30 *sp-particle-system-2d*) + (a2-5 *launch-matrix*) + ) + (set! (-> a2-5 trans quad) (-> s5-0 end-pos quad)) + (t9-14 a0-30 arg3 a2-5 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ) + ) + ) + 0 + ) + +;; definition for function process-drawable-shock-wall-effect +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function process-drawable2-shock-effect +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun process-drawable2-shock-effect ((arg0 process-drawable) + (arg1 process-drawable) + (arg2 lightning-spec) + (arg3 (function lightning-tracker none)) + (arg4 sparticle-launcher) + ) + (local-vars (sv-16 int) (sv-64 vector) (sv-68 vector) (sv-72 (pointer process))) + (when (and (nonzero? (-> arg0 skel)) (nonzero? (-> arg1 skel))) + (let* ((v1-7 (-> arg0 draw lod-set lod (-> arg0 draw lod-set max-lod) geo length)) + (s0-0 (-> arg1 draw lod-set lod (-> arg1 draw lod-set max-lod) geo length)) + (s1-0 (rand-vu-int-range 3 (+ v1-7 -1))) + ) + (set! sv-16 (rand-vu-int-range 3 (+ s0-0 -1))) + (set! sv-64 (vector<-cspace! (new 'stack-no-clear 'vector) (-> arg0 node-list data s1-0))) + (set! sv-68 (vector<-cspace! (new 'stack-no-clear 'vector) (-> arg1 node-list data sv-16))) + (set! sv-72 (process-spawn + lightning-tracker + :init lightning-tracker-init + arg2 + 0 + arg3 + arg0 + s1-0 + sv-16 + :name "lightning-tracker" + :to arg1 + :unk 0 + ) + ) + ) + (when (and arg4 sv-72) + (let ((v1-19 (get-field-spec-by-id arg4 (sp-field-id spt-timer)))) + (if v1-19 + (set! (-> v1-19 initial-valuef) (the-as float (-> (the-as lightning-tracker (-> sv-72 0)) duration))) + ) + ) + (let ((t9-8 sp-launch-particles-var) + (a0-20 *sp-particle-system-2d*) + (a1-14 arg4) + (a2-4 *launch-matrix*) + ) + (set! (-> a2-4 trans quad) (-> sv-64 quad)) + (t9-8 a0-20 a1-14 a2-4 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (let ((t9-9 sp-launch-particles-var) + (a0-21 *sp-particle-system-2d*) + (a2-5 *launch-matrix*) + ) + (set! (-> a2-5 trans quad) (-> sv-68 quad)) + (t9-9 a0-21 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* 6) (new 'static 'lightning-spec + :name "lightning-shock-skel" + :flags (lightning-spec-flags lsf0) + :rand-func #x2 + :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 120.0 + :texture (new 'static 'texture-id :index #x3f :page #x4) + :reduction 0.5 + :num-points 32 + :box-size 6144.0 + :merge-factor 0.5 + :merge-count 2 + :radius 2048.0 + :duration 30.0 + :sound #f + ) + ) + +;; definition for function process-drawable-shock-skel-effect +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; WARN: new jak 2 until loop case, check carefully +;; WARN: new jak 2 until loop case, check carefully +(defun process-drawable-shock-skel-effect ((arg0 process-drawable) + (arg1 lightning-spec) + (arg2 (function lightning-tracker none)) + (arg3 sparticle-launcher) + (arg4 float) + (arg5 int) + (arg6 int) + ) + (local-vars + (sv-416 int) + (sv-432 vector) + (sv-448 vector) + (sv-464 vector) + (sv-480 quaternion) + (sv-496 vector) + (sv-512 matrix) + (sv-528 vector) + (sv-544 vector) + (sv-560 process) + (sv-576 int) + (sv-592 (function lightning-control int vector none)) + (sv-608 lightning-control) + (sv-624 int) + (sv-640 vector) + ) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (let ((s1-0 (-> arg0 draw lod-set lod (-> arg0 draw cur-lod) geo length))) + (set! sv-416 (rand-vu-int-range 4 (+ s1-0 -1))) + (let ((s1-1 (rand-vu-int-range 4 (+ s1-0 -1)))) + (when (!= arg5 -1) + (set! sv-416 arg5) + sv-416 + ) + (if (!= arg6 -1) + (set! s1-1 arg6) + ) + (-> arg0 node-list data sv-416) + (let ((s0-1 (-> arg0 node-list data sv-416)) + (a0-9 (-> arg0 node-list data s1-1)) + (v1-18 #t) + ) + (until #f + (let ((a1-3 a0-9)) + (until #f + (cond + ((and (-> a1-3 joint) (>= (-> a1-3 joint number) 2)) + (when (= s0-1 a1-3) + #t + (goto cfg-24) + ) + (set! a1-3 (-> a1-3 parent)) + ) + (else + (set! s0-1 (-> s0-1 parent)) + (when (or (not (-> s0-1 joint)) (< (-> s0-1 joint number) 2)) + (set! v1-18 #f) + (goto cfg-24) + ) + (goto cfg-23) + ) + ) + ) + ) + #f + (label cfg-23) + ) + #f + (label cfg-24) + (when v1-18 + (let ((s5-1 (the-as (array cspace) (new 'stack 'boxed-array cspace 32)))) + (let ((v1-21 0)) + (set! (-> s5-1 length) 0) + (let ((a1-12 (-> arg0 node-list data sv-416)) + (a0-19 (-> arg0 node-list data s1-1)) + ) + (set! (-> s5-1 (-> s5-1 length)) a1-12) + (+! (-> s5-1 length) 1) + (while (!= a1-12 s0-1) + (set! a1-12 (-> a1-12 parent)) + (set! (-> s5-1 (-> s5-1 length)) a1-12) + (+! (-> s5-1 length) 1) + ) + (while (!= a0-19 s0-1) + (set! a0-19 (-> a0-19 parent)) + (+! (-> s5-1 length) 1) + ) + ) + (let ((a0-23 (-> arg0 node-list data s1-1))) + (while (!= a0-23 s0-1) + (let ((a1-18 (-> a0-23 parent))) + (+! v1-21 1) + (set! (-> s5-1 (- (-> s5-1 length) v1-21)) a0-23) + (set! a0-23 a1-18) + ) + ) + ) + ) + (when (< 2 (-> s5-1 length)) + (let ((s1-2 (new 'stack-no-clear 'vector))) + (set! sv-512 (new 'stack-no-clear 'matrix)) + (let ((s0-2 (new 'stack-no-clear 'vector))) + (set! sv-432 (new 'stack-no-clear 'vector)) + (set! sv-448 (new 'stack-no-clear 'vector)) + (set! sv-464 (new 'stack-no-clear 'vector)) + (set! sv-480 (new 'stack-no-clear 'quaternion)) + (set! sv-496 s1-2) + (set! (-> sv-496 x) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-496 y) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-496 z) (rand-vu-float-range 0.0 65536.0)) + (set! (-> sv-496 w) 1.0) + (matrix-rotate-zyx! sv-512 s1-2) + (vector-rotate*! sv-448 *up-vector* sv-512) + (vector<-cspace! sv-432 (-> s5-1 0)) + (set! sv-544 s0-2) + (set! sv-528 (vector<-cspace! (new 'stack-no-clear 'vector) (-> s5-1 0))) + (let ((v0-10 (vector<-cspace! (new 'stack-no-clear 'vector) (-> s5-1 1)))) + (.lvf vf4 (&-> sv-528 quad)) + (.lvf vf5 (&-> v0-10 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-544 quad) vf6) + (vector-normalize! s0-2 1.0) + (set! sv-560 (get-process *default-dead-pool* lightning-tracker #x4000 0)) + (let ((a0-35 (when sv-560 + (let ((t9-13 (method-of-type lightning-tracker activate))) + (t9-13 (the-as lightning-tracker sv-560) arg0 "lightning-tracker" (the-as pointer #x70004000)) + ) + (run-now-in-process sv-560 lightning-tracker-init arg1 0 arg2 arg0 #f #f) + (-> sv-560 ppointer) + ) + ) + ) + (when a0-35 + (set! (-> (the-as lightning-tracker (-> a0-35 0)) user-time 0) 0) + (let ((s4-1 (-> (the-as lightning-tracker (-> a0-35 0)) lightning)) + (s3-1 (new 'stack-no-clear 'vector)) + (s2-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-1 state points-to-draw) 0) + (let ((a1-32 s3-1)) + (let ((v1-44 sv-432)) + (let ((a0-38 sv-448)) + (let ((a2-30 arg4)) + (.mov vf7 a2-30) + ) + (.lvf vf5 (&-> a0-38 quad)) + ) + (.lvf vf4 (&-> v1-44 quad)) + ) + (.add.x.vf 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-32 quad) vf6) + ) + (set-point! s4-1 (-> s4-1 state points-to-draw) s3-1) + (+! (-> s4-1 state points-to-draw) 1) + (set! sv-576 0) + (while (< sv-576 (+ (-> s5-1 length) -1)) + (set! sv-640 (new 'stack-no-clear 'vector)) + (vector<-cspace! sv-640 (-> s5-1 (+ sv-576 1))) + (vector-! sv-464 sv-640 sv-432) + (vector-normalize! sv-464 1.0) + (quaternion-from-two-vectors! sv-480 s0-2 sv-464) + (vector-orient-by-quat! s1-2 sv-448 sv-480) + (set! (-> s1-2 quad) (-> sv-448 quad)) + (let ((a1-40 s2-1)) + (let ((v1-56 sv-640)) + (let ((a0-47 s1-2)) + (let ((a2-34 arg4)) + (.mov vf7 a2-34) + ) + (.lvf vf5 (&-> a0-47 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-40 quad) vf6) + ) + (set! sv-608 s4-1) + (set! sv-592 (method-of-object sv-608 set-point!)) + (set! sv-624 (-> s4-1 state points-to-draw)) + (let ((a2-36 (vector-average! (new 'stack-no-clear 'vector) s2-1 s3-1))) + (sv-592 sv-608 sv-624 a2-36) + ) + (+! (-> s4-1 state points-to-draw) 1) + (set-point! s4-1 (-> s4-1 state points-to-draw) s2-1) + (+! (-> s4-1 state points-to-draw) 1) + (set! (-> s3-1 quad) (-> s2-1 quad)) + (set! (-> s0-2 quad) (-> sv-464 quad)) + (set! (-> sv-448 quad) (-> s1-2 quad)) + (set! (-> sv-432 quad) (-> sv-640 quad)) + (set! sv-576 (+ sv-576 1)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-darkjak-bomb + :id 71 + :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)) + (sp-item 170 :period (seconds 10) :length (seconds 0.017)) + (sp-item 171 :flags (sp6) :period (seconds 10) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 169 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 3.0) + (:scale-x (meters 1)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 128.0 128.0) + (:a 16.0) + (:scalevel-x (meters 0.53333336) (meters 0.53333336)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.45714286) + (: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 170 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.0) + (:b 128.0 128.0) + (:a 24.0) + (:scalevel-x (meters 0.34285715)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-g -3.6571429) + (:fade-b -0.9142857) + (:timer (seconds 1.335)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.117)) + (:next-launcher 172) + ) + ) + +;; failed to figure out what this is: +(defpart 172 + :init-specs ((:scale-x (meters 4.5)) + (:scale-y :copy scale-x) + (:scalevel-x (meters -0.05625)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.875) + (:fade-b 0.0) + (:fade-a -0.15) + ) + ) + +;; failed to figure out what this is: +(defpart 171 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 16)) + (: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) + (:scalevel-x (meters 1.6)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-darkjak-transform + :id 72 + :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)) + (sp-item 170 :period (seconds 10) :length (seconds 0.017)) + (sp-item 171 :period (seconds 10) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 7) (new 'static 'lightning-spec + :name "lightning-darkjak-transform" + :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 #x3a :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 8192.0 + :merge-factor 0.5 + :merge-count 2 + :radius 1638.4 + :duration 30.0 + :duration-rand 90.0 + :sound (static-sound-spec "transform-zap" :group 0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 8) (new 'static 'lightning-spec + :name "lightning-darkjak-pill" + :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 #x3a :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 8192.0 + :merge-factor 0.5 + :merge-count 2 + :radius 1638.4 + :duration 30.0 + :duration-rand 90.0 + :sound (static-sound-spec "transform-zap" :group 0) + :delay 60.0 + :delay-rand 120.0 + ) + ) + +;; definition for symbol *lightning-darkjak-pill*, type lightning-spec +(define *lightning-darkjak-pill* (-> *lightning-spec-id-table* 8)) + +;; failed to figure out what this is: +(defpart 173 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.1) (meters 0.15)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 255.0) + (:a 8.0 12.0) + (:omega (degrees 0.225)) + (:vel-y (meters 0.053333335) (meters 0.026666667)) + (:scalevel-x (meters -0.00033333333)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.26666668) + (:friction 0.99 0.005) + (:timer (seconds 0.25)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-darkjak-smack-trail + :id 73 + :flags (sp0 sp4 sp13) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 174 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 174 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5)) + (:scale-y :copy scale-x) + (:r 32.0) + (:g 32.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters -0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.21333334) + (:fade-g -0.64) + (:fade-b -0.85333335) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-darkjak-smack + :id 74 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 175 :flags (sp3 sp7) :period (seconds 10) :length (seconds 0.017))) + ) + +;; failed to figure out what this is: +(defpart 175 + :init-specs ((:texture (redpuff level-default-sprite)) + (:num 50.0) + (:y (meters 0) (meters 2)) + (:z (meters -2) (meters 4)) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0) + (:b 200.0) + (:a 1.0) + (:omega (degrees 0.1125)) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.006666667) + (:accel-z (meters 0.0026666666)) + (:friction 1.1) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -2) (degrees 4)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-darkjak-smack-charge + :id 75 + :flags (sp12) + :bounds (static-bspherem 0 0 0 1) + :parts ((sp-item 176 :flags (sp6)) (sp-item 177 :flags (sp6)) (sp-item 178)) + ) + +;; failed to figure out what this is: +(defpart 176 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 0.1)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 0.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 177 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.01)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 255.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 178 + :init-specs ((:texture (laser-hit2 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 0.0) + (:g 0.0) + (:b 255.0) + (:a 0.0) + (:scalevel-x (meters -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.42666668) + (: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-darkjak-smack-wall-explode + :id 76 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 179 :flags (sp7) :period (seconds 20) :length (seconds 0.035)) + (sp-item 180 :flags (sp6 sp7) :period (seconds 20) :length (seconds 0.667)) + (sp-item 181 :flags (sp6 sp7) :period (seconds 20) :length (seconds 0.667)) + ) + ) + +;; failed to figure out what this is: +(defpart 179 + :init-specs ((:texture (water-radiate level-default-sprite)) + (:num 100.0) + (:x (meters 0.1) (meters 0.1)) + (:scale-x (meters 4)) + (:scale-y :copy scale-x) + (:r 16.0 1 84.0) + (:g 0.0 1 100.0) + (:b 255.0) + (:a 255.0) + (:vel-z (meters 0.3) (meters 0.033333335)) + (:scalevel-x (meters 0.033333335)) + (:fade-r -0.16666667) + (:fade-g -0.6666667) + (:fade-a -0.85) + (:friction 0.83) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'sparticle-2d-spline-align-instant) + (:next-time (seconds 0.25)) + (:next-launcher 182) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 182 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.033333335) + (:fade-b -0.033333335) + (:friction 0.99) + ) + ) + +;; failed to figure out what this is: +(defpart 180 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 1.0 5.0) + (:scale-x (meters 2) (meters 4)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 2) (meters 3)) + (:r 20.0 1 60.0) + (:g 0.0 1 80.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017) (seconds 0.33)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-texture-animate) + ) + ) + +;; failed to figure out what this is: +(defpart 181 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 4) (meters 8)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 2) (meters 3)) + (:r 20.0 1 60.0) + (:g 0.0 1 80.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017) (seconds 0.33)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-texture-animate) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-darkjak-smack-hit + :id 77 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 183 :flags (sp7) :period (seconds 20) :length (seconds 0.035)) + (sp-item 184 :flags (sp6 sp7) :period (seconds 20) :length (seconds 0.5)) + (sp-item 185 :flags (sp6 sp7) :period (seconds 20) :length (seconds 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 183 + :init-specs ((:texture (water-radiate level-default-sprite)) + (:num 50.0) + (:x (meters 0.1) (meters 0.1)) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 80.0 1 80.0) + (:g 0.0 1 64.0) + (:b 255.0) + (:a 255.0) + (:vel-z (meters 0.1)) + (:fade-g -2.6666667) + (:fade-b -0.6666667 -0.6666667) + (:fade-a -0.85 -0.85) + (:friction 0.83) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'sparticle-2d-spline-align-instant) + (:next-time (seconds 0.25)) + (:next-launcher 186) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 186 + :init-specs ((:fade-g -0.06666667) (:fade-b -0.06666667) (:friction 0.99)) + ) + +;; failed to figure out what this is: +(defpart 184 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 1.0 10.0) + (:scale-x (meters 0.3) (meters 0.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 1) (meters 1)) + (:r 80.0 1 80.0) + (:g 0.0 1 64.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017) (seconds 0.165)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-texture-animate) + ) + ) + +;; failed to figure out what this is: +(defpart 185 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 1.0 1.0) + (:scale-x (meters 1) (meters 3)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 1) (meters 1)) + (:r 80.0 1 80.0) + (:g 0.0 1 64.0) + (:b 255.0) + (:a 128.0) + (:timer (seconds 0.017) (seconds 0.165)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x405700 #x405800 #x405900)) + (:func 'sparticle-texture-animate) + ) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 9) (new 'static 'lightning-spec + :name "lightning-darkjak-local" + :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 #x3a :page #x4) + :reduction 0.42 + :num-points 16 + :box-size 8192.0 + :merge-factor 0.6 + :merge-count 2 + :radius 1638.4 + :duration 30.0 + :duration-rand 150.0 + :sound (static-sound-spec "transform-zap" :group 0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 10) (new 'static 'lightning-spec + :name "lightning-darkjak-attack" + :flags (lightning-spec-flags lsf0 lsf4) + :adjust-distance #xa + :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 #x3a :page #x4) + :reduction 0.42 + :num-points 20 + :box-size 8192.0 + :merge-factor 0.6 + :merge-count 2 + :radius 1638.4 + :duration 30.0 + :duration-rand 150.0 + :sound (static-sound-spec "stretched-zap" :group 0) + ) + ) + +;; failed to figure out what this is: +(defpart 187 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.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 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + (:next-time (seconds 0.017)) + (:next-launcher 188) + ) + ) + +;; failed to figure out what this is: +(defpart 188 + :init-specs ((:scale-x (meters 0.2) (meters 0.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 200.0 55.0) + (:g 0.0 128.0) + (:b 200.0 55.0) + (:a 24.0 8.0) + (:next-time (seconds 0.017)) + (:next-launcher 188) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-daxter-death-freeze + :id 78 + :flags (sp4) + :bounds (static-bspherem 0 -2 0 40) + :parts ((sp-item 189 :flags (is-3d)) (sp-item 190 :flags (is-3d))) + ) + +;; failed to figure out what this is: +(defpart 189 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5)) + (:rot-x (degrees 90)) + (:scale-y (meters 1.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.06666667)) + (:timer (seconds 5)) + (:func 'sparticle-track-root) + (:next-time (seconds 1.835)) + (:next-launcher 191) + ) + ) + +;; failed to figure out what this is: +(defpart 191 + :init-specs ((:rot-x (degrees 90)) (:rotvel-x (degrees -0.6)) (:next-time (seconds 0.45)) (:next-launcher 192)) + ) + +;; failed to figure out what this is: +(defpart 192 + :init-specs ((:rotvel-x (degrees 0))) + ) + +;; failed to figure out what this is: +(defpart 190 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5)) + (:rot-x (degrees 0)) + (:scale-y (meters 0.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters -0.05)) + (:timer (seconds 5)) + (:func 'sparticle-track-root) + (:next-time (seconds 1.835)) + (:next-launcher 193) + ) + ) + +;; failed to figure out what this is: +(defpart 193 + :init-specs ((:rot-x (degrees 0)) (:rotvel-x (degrees -0.6)) (:next-time (seconds 0.45)) (:next-launcher 194)) + ) + +;; failed to figure out what this is: +(defpart 195 + :init-specs ((:rotvel-x (degrees 0))) + ) + +;; failed to figure out what this is: +(defpartgroup group-daxter-death-zap + :id 79 + :flags (sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 196) (sp-item 197) (sp-item 198)) + ) + +;; failed to figure out what this is: +(defpart 196 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 2)) + (:rot-x (degrees 6.7500005)) + (:rot-z (degrees 0) (degrees 3599)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 10.0 5.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 197 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 0.4 1.0) + (:scale-x (meters 0.1) (meters 0.3)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3598.0002)) + (:scale-y (meters 1) (meters 0.5)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:fade-a -1.92) + (:timer (seconds 0.167) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.035)) + (:next-launcher 199) + ) + ) + +;; failed to figure out what this is: +(defpart 198 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.4 1.0) + (:scale-x (meters 0.3) (meters 1.5)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 3598.0002)) + (:scale-y (meters 1) (meters 0.5)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:fade-a -1.92) + (:timer (seconds 0.167) (seconds 0.08)) + (: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 199) + ) + ) + +;; failed to figure out what this is: +(defpart 199 + :init-specs ((:r 64.0) (:g 64.0) (:fade-r -1.2) (:fade-g -0.48) (:fade-a -2.4)) + ) + +;; failed to figure out what this is: +(defpartgroup group-daxter-death-zap-smoke + :id 80 + :flags (sp4) + :bounds (static-bspherem 0 -2 0 24) + :parts ((sp-item 201 :binding 200) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + (sp-item 200 :flags (sp2 sp3)) + ) + ) + +;; failed to figure out what this is: +(defpart 201 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 0.39) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 0.1) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0) + (:b 64.0) + (:a 0.0) + (:vel-y (meters 0.0033333334) (meters 0.00033333333)) + (:timer (seconds 2.5)) + (:flags ()) + ) + ) + +;; failed to figure out what this is: +(defpart 200 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:z (meters 0.1)) + (:scale-x (meters 0.05) (meters 0.03)) + (:scale-y (meters 0.3) (meters 0.03)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:omega (degrees 0)) + (:vel-x (meters 0.029629631)) + (:fade-a -0.08533333) + (:timer (seconds 2.5)) + (:flags (ready-to-launch sp-cpuinfo-flag-13)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-daxter-death-limb-zap + :id 81 + :flags (sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 202) (sp-item 203 :flags (sp3))) + ) + +;; failed to figure out what this is: +(defpart 202 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 6.7500005)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 64.0) + (:b 255.0) + (:a 10.0 5.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 203 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.3)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.2)) + (:r 128.0) + (:g 128.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 6761.25)) + (:vel-y (meters 0.0033333334)) + (:rotvel-z (degrees 0.6)) + (:fade-a -1.28) + (:timer (seconds 0.085) (seconds 0.165)) + (:flags (glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-dark-maker-idol-eye-part + :id 82 + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 204 :flags (sp7)) (sp-item 205 :flags (sp7)) (sp-item 206 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 204 + :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 206 + :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)) + (:next-time (seconds 0.835)) + (: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 205 + :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)) + ) + ) diff --git a/test/decompiler/reference/jak3/engine/target/target-pilot_REF.gc b/test/decompiler/reference/jak3/engine/target/target-pilot_REF.gc new file mode 100644 index 0000000000..0f3478abd8 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/target-pilot_REF.gc @@ -0,0 +1,509 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *pilot-mods*, type surface +(define *pilot-mods* (new 'static 'surface :name 'empty :seek0 1.0 :seek90 1.0 :seek180 1.0 :fric 1.0)) + +;; definition for function target-pilot-handler +;; WARN: disable def twice: 203. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defbehavior target-pilot-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (cond + ((and (= arg2 'query) (= (-> arg3 param 0) 'mode)) + 'pilot + ) + (else + (case arg2 + (('end-mode) + (case (-> arg3 param 0) + (('pilot) + (let ((v1-5 (-> self pilot))) + (when (nonzero? v1-5) + (let ((a0-7 (handle->process (-> v1-5 vehicle)))) + (if a0-7 + (put-rider-in-seat (the-as vehicle a0-7) (-> v1-5 seat-index) (the-as process #f)) + ) + ) + ) + ) + (go target-pilot-get-off (process->handle arg0)) + ) + (('fldax) + (when (and (-> self next-state) (= (-> self next-state name) 'target-pilot-daxter-perch)) + (let ((v0-0 (the-as object #t))) + (set! (-> self control unknown-word04) (the-as uint v0-0)) + v0-0 + ) + ) + ) + (('gun) + (target-gun-end-mode #t) + ) + ) + ) + (('change-mode) + (case (-> arg3 param 0) + (('grab) + (when (not (focus-test? self dead)) + (if (not (-> arg3 param 1)) + #t + (go target-pilot-grab) + ) + ) + ) + (('flut) + (go + target-flut-start + (process->handle (the-as process (-> arg3 param 1))) + (the-as symbol (if (>= arg1 2) + (-> arg3 param 2) + 'normal + ) + ) + (if (>= arg1 4) + (the-as int (-> arg3 param 3)) + -1 + ) + ) + ) + (('normal) + (go target-pilot-get-off (process->handle arg0)) + ) + (('gun) + (when (logtest? (-> self game features) (game-feature gun)) + (let ((gp-1 (-> arg3 param 2))) + (cond + ((using-gun? self) + (when (nonzero? gp-1) + (set! (-> self gun using-gun-type) (the-as pickup-type gp-1)) + gp-1 + ) + ) + (else + (target-gun-init (the-as pickup-type gp-1)) + ) + ) + ) + ) + ) + (('fldax) + (if (and (-> self next-state) (let ((v1-33 (-> self next-state name))) + (or (= v1-33 'target-pilot-stance) (= v1-33 'target-pilot-impact)) + ) + ) + (go target-pilot-daxter-perch) + ) + ) + ) + ) + (('swim) + #f + ) + (('clone-anim) + (go target-pilot-clone-anim (process->handle (the-as process (-> arg3 param 0)))) + ) + (('get-vehicle) + (if (nonzero? (-> self pilot)) + (handle->process (-> self pilot vehicle)) + ) + ) + (('kill-vehicle) + (if (nonzero? (-> self pilot)) + (send-event (handle->process (-> self pilot vehicle)) 'go-die) + ) + ) + (('attack 'attack-or-shove 'attack-invinc) + (set-vector! (-> self draw color-mult) 0.25 0.25 0.25 1.0) + (target-attacked + arg2 + (the-as attack-info (-> arg3 param 1)) + arg0 + (the-as touching-shapes-entry (-> arg3 param 0)) + target-pilot-hit + ) + ) + (('vehicle-hit) + (speech-control-method-12 *speech-control* self (if (-> self pilot as-daxter?) + (speech-type race-daxter-hit) + (speech-type race-jak-hit) + ) + ) + ) + (('vehicle-got-hit) + (speech-control-method-12 *speech-control* self (if (-> self pilot as-daxter?) + (speech-type race-daxter-got-hit) + (speech-type race-jak-got-hit) + ) + ) + ) + (else + (target-standard-event-handler arg0 arg1 arg2 arg3) + ) + ) + ) + ) + ) + +;; definition for function target-pilot-pidax-enter +(defbehavior target-pilot-pidax-enter target () + (set! (-> self pilot 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) + ) + +;; definition for function target-pilot-pidax-exit +(defbehavior target-pilot-pidax-exit target () + (ja-channel-set! 0) + (set! (-> self draw art-group) (-> self pilot art-group-backup)) + (logclear! (-> self draw status) (draw-control-status no-draw-bounds2)) + (send-event (ppointer->process (-> self sidekick)) 'matrix #f) + ) + +;; definition for function target-pilot-exit +;; INFO: Used lq/sq +;; WARN: Return type mismatch none vs object. +(defbehavior target-pilot-exit target () + (when (not (and (-> self next-state) (let ((v1-3 (-> self next-state name))) + (or (= v1-3 'target-pilot-stance) + (= v1-3 'target-pilot-impact) + (= v1-3 'target-pilot-daxter-perch) + (= v1-3 'target-pilot-get-off) + (= v1-3 'target-pilot-grab) + (= v1-3 'target-pilot-clone-anim) + (= v1-3 'target-pilot-hit) + (= v1-3 'target-pilot-death) + ) + ) + ) + ) + (let ((v1-4 (-> self manipy))) + (when v1-4 + (deactivate (-> v1-4 0)) + (set! (-> self manipy) (the-as (pointer manipy) #f)) + ) + ) + (process-drawable-set-riding self #f) + (when (-> self pilot as-daxter?) + (format 0 "Pidax exit~%") + (target-pilot-pidax-exit) + ) + (let ((gp-0 (-> self pilot))) + (when (nonzero? gp-0) + (set! (-> self control nav-radius) (-> gp-0 backup-nav-radius)) + (let ((s5-0 (handle->process (-> gp-0 vehicle)))) + (when s5-0 + (send-event *traffic-manager* 'player-exit-vehicle (-> (the-as vehicle s5-0) info object-type)) + (remove-riders (the-as vehicle s5-0) (the-as handle self)) + (send-event s5-0 'player-get-off) + (when (nonzero? (-> gp-0 hud-health)) + (send-event (handle->process (-> gp-0 hud-health)) 'hide-and-die) + (set! (-> gp-0 hud-health) (new 'static 'handle)) + 0 + ) + (when (nonzero? (-> gp-0 hud-turbo)) + (send-event (handle->process (-> gp-0 hud-turbo)) 'hide-and-die) + (set! (-> gp-0 hud-turbo) (new 'static 'handle)) + 0 + ) + ) + ) + ) + ) + (set! (-> self neck flex-blend) 1.0) + (let ((v1-49 (-> self control root-prim))) + (set! (-> v1-49 prim-core collide-as) (-> self control backup-collide-as)) + (set! (-> v1-49 prim-core collide-with) (-> self control backup-collide-with)) + ) + (logclear! (-> self focus-status) (focus-status pilot-riding pilot)) + (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)) + (remove-setting! 'cloth) + (remove-setting! 'armor) + (enable-set! (-> self arm-ik 0) #f) + (enable-set! (-> self arm-ik 1) #f) + (set! (-> self control dynam gravity-max) (-> self control standard-dynamics gravity-max)) + (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) + (let ((v1-74 (-> self node-list data))) + (set! (-> v1-74 0 param0) (the-as (function cspace transformq none) cspace<-transformq+trans!)) + (set! (-> v1-74 0 param1) (the-as basic (-> self control trans))) + (set! (-> v1-74 0 param2) (the-as basic (-> self control cspace-offset))) + ) + (target-collide-set! 'normal 0.0) + (set! (-> self control reaction) target-collision-reaction) + (vector-identity! (-> self draw color-mult)) + (set! (-> self control cspace-offset quad) (the-as uint128 0)) + (logior! (-> self water flags) (water-flag find-water)) + (target-exit) + ) + ) + +;; definition for function target-pilot-init +;; INFO: Used lq/sq +;; WARN: Return type mismatch water-flag vs object. +(defbehavior target-pilot-init target ((arg0 handle) (arg1 symbol)) + (target-exit) + (target-lightjak-end-mode #f) + (target-darkjak-end-mode #f) + (if (zero? (-> self pilot)) + (set! (-> self pilot) (new 'process 'pilot-info)) + ) + (let ((s5-0 (-> self pilot))) + (set! (-> s5-0 backup-nav-radius) (-> self control nav-radius)) + (set! (-> s5-0 gun?) #t) + (set! (-> s5-0 enable-cam-side-shift) #f) + (set! (-> s5-0 as-daxter?) arg1) + (set! (-> s5-0 entity) #f) + (set! (-> s5-0 cam-side-shift) 0.0) + (if (-> self pilot as-daxter?) + (target-pilot-pidax-enter) + ) + (cond + ((handle->process arg0) + (set! (-> s5-0 vehicle) arg0) + ) + (else + (break!) + 0 + ) + ) + (let ((s4-1 (handle->process (-> s5-0 vehicle)))) + (when s4-1 + (send-event *traffic-manager* 'player-enter-vehicle (-> (the-as vehicle s4-1) info object-type)) + (set! (-> self game current-vehicle) (the-as game-vehicle-u8 (-> (the-as vehicle s4-1) info vehicle-type))) + (set! (-> s5-0 entity) (-> (the-as vehicle s4-1) entity)) + (set! (-> s5-0 gun?) (logtest? (-> (the-as vehicle s4-1) info flags) 32)) + (set! (-> s5-0 enable-cam-side-shift) (logtest? (-> (the-as vehicle s4-1) info flags) 128)) + (if (logtest? (-> (the-as vehicle s4-1) info flags) 256) + (set! (-> s5-0 hud-health) (process->handle (hud-vehicle-health-spawn (the-as vehicle s4-1)))) + ) + (if (logtest? (-> (the-as vehicle s4-1) info flags) 512) + (set! (-> s5-0 hud-turbo) (process->handle (hud-vehicle-turbo-spawn (the-as vehicle s4-1)))) + ) + (set! (-> s5-0 left-right-bias) (-> (the-as vehicle s4-1) info handling player-turn-anim-bias)) + (set! (-> s5-0 left-right-min) (-> (the-as vehicle s4-1) info handling player-turn-anim-min)) + (set! (-> s5-0 left-right-max) (-> (the-as vehicle s4-1) info handling player-turn-anim-max)) + (send-event + (ppointer->process (-> (the-as vehicle s4-1) parent)) + 'player-got-on-vehicle-child + (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))) + (if (and a0-35 (send-event a0-35 'knocked-off)) + (put-rider-in-seat (the-as vehicle s4-1) s2-0 (the-as process #f)) + ) + ) + ) + ) + (let ((v1-68 (get-best-seat (the-as vehicle s4-1) (-> self control trans) (vehicle-seat-flag vsf0) 1))) + (set! (-> s5-0 seat-index) (max 0 v1-68)) + ) + (cond + ((-> s5-0 as-daxter?) + (set! (-> s5-0 left-right-accel-factor) 0.0000012207031) + (set! (-> s5-0 front-back-accel-factor) 0.0000012207031) + (set! (-> s5-0 up-down-accel-factor) 0.00000061035155) + ) + ((zero? (-> s5-0 stance)) + (set! (-> s5-0 left-right-accel-factor) 0.0000012207031) + (set! (-> s5-0 front-back-accel-factor) 0.0000012207031) + (set! (-> s5-0 up-down-accel-factor) 0.00000051879886) + ) + (else + (set! (-> s5-0 left-right-accel-factor) 0.0000012207031) + (set! (-> s5-0 front-back-accel-factor) 0.0000012207031) + (set! (-> s5-0 up-down-accel-factor) 0.00000061035155) + ) + ) + (set! (-> s5-0 left-right-accel-factor) + (* (-> s5-0 left-right-accel-factor) (-> (the-as vehicle s4-1) info handling pilot-x-accel-factor)) + ) + (set! (-> s5-0 up-down-accel-factor) + (* (-> s5-0 up-down-accel-factor) (-> (the-as vehicle s4-1) info handling pilot-y-accel-factor)) + ) + (set! (-> s5-0 front-back-accel-factor) + (* (-> s5-0 front-back-accel-factor) (-> (the-as vehicle s4-1) info handling pilot-z-accel-factor)) + ) + ) + ) + (when (not (-> s5-0 gun?)) + (if arg1 + (logior! (-> self control current-surface flags) (surface-flag gun-fast-exit)) + ) + (target-gun-end-mode arg1) + ) + ) + (set! (-> self board latch?) #f) + (set! (-> self control reaction) target-collision-reaction) + (set! (-> self control transv quad) (the-as uint128 0)) + (set! (-> self control ctrl-xz-vel) 0.0) + (logior! (-> self focus-status) (focus-status pilot)) + (set! (-> self control bend-target) 0.0) + (let ((v1-102 (-> self node-list data))) + (set! (-> v1-102 0 param0) (the-as (function cspace transformq none) cspace<-transformq+world-trans!)) + (set! (-> v1-102 0 param1) (the-as basic (-> self control trans))) + (set! (-> v1-102 0 param2) (the-as basic (-> self control cspace-offset))) + ) + (let ((v1-104 (-> self control root-prim))) + (set! (-> v1-104 prim-core collide-as) (collide-spec)) + (set! (-> v1-104 prim-core collide-with) (collide-spec)) + ) + 0 + (set! (-> self control root-prim prim-core collide-as) (collide-spec jak-vehicle)) + (set! (-> self control root-prim prim-core collide-with) + (collide-spec hit-by-player-list hit-by-others-list player-list collectable) + ) + (set! (-> self neck flex-blend) 0.0) + (set! (-> self control status) (collide-status)) + (let ((v0-16 (logclear (-> self water flags) (water-flag active find-water)))) + (set! (-> self water flags) v0-16) + v0-16 + ) + ) + +;; definition for function pilot-on-ground? +(defbehavior pilot-on-ground? target () + (logtest? (-> self control status) (collide-status on-surface)) + ) + +;; definition for function target-pilot-post +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior target-pilot-post target () + (local-vars (a0-45 int) (a0-47 int)) + (let* ((v1-1 (-> *perf-stats* data 17)) + (a0-0 (-> v1-1 ctrl)) + ) + (+! (-> v1-1 count) 1) + (b! (zero? a0-0) cfg-2 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-0) + ) + (.sync.l) + (.sync.p) + (label cfg-2) + 0 + (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) + (build-conversions (-> self control transv)) + (do-rotations1) + (do-rotations2) + (reverse-conversions (-> self control transv)) + (vector-! + (-> self control cspace-offset) + (-> self control draw-offset) + (-> self control anim-collide-offset-world) + ) + (let ((a1-5 (new 'stack-no-clear 'overlaps-others-params))) + (set! (-> a1-5 options) (overlaps-others-options oo0)) + (set! (-> a1-5 collide-with-filter) (the-as collide-spec -1)) + (set! (-> a1-5 tlist) *touching-list*) + (find-overlapping-shapes (-> self control) a1-5) + ) + (post-flag-setup) + ) + ) + (update-rates! (-> self clock) f30-0) + ) + (let* ((gp-2 (-> self pilot)) + (s5-0 (handle->process (-> gp-2 vehicle))) + ) + (when s5-0 + (vehicle-method-66 (the-as vehicle s5-0) (-> self control trans) (-> gp-2 seat-index)) + (set! (-> self control transv quad) (-> (the-as vehicle s5-0) root transv quad)) + (quaternion-copy! (-> self control quat) (-> (the-as vehicle s5-0) root quat)) + (quaternion-copy! (-> self control quat-for-control) (-> self control quat)) + (quaternion-copy! (-> self control dir-targ) (-> self control quat)) + (let ((s4-0 (-> self alt-cam-pos))) + (when (not (focus-test? self dead)) + (let ((s3-0 (new 'stack-no-clear 'cquery-with-5vec))) + (set! (-> s3-0 vec 2 x) 0.0) + (set! (-> s3-0 vec 2 y) 20480.0) + (let ((a0-18 (-> self node-list data 0 bone transform))) + (set! (-> s3-0 vec 1 quad) (-> a0-18 fvec quad)) + ) + (set! (-> s3-0 vec 1 y) 0.0) + (vector-rotate90-around-y! (-> s3-0 vec 1) (-> s3-0 vec 1)) + (vector-normalize! (-> s3-0 vec 1) 1.0) + (set! (-> s3-0 vec 0 quad) (-> self control trans quad)) + (when (-> gp-2 enable-cam-side-shift) + (dotimes (s2-0 2) + (let ((v1-48 (-> s3-0 cquery))) + (set! (-> v1-48 radius) 2048.0) + (set! (-> v1-48 collide-with) (collide-spec backgnd)) + (set! (-> v1-48 ignore-process0) #f) + (set! (-> v1-48 ignore-process1) #f) + (set! (-> v1-48 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-48 action-mask) (collide-action solid)) + ) + (set! (-> s3-0 cquery start-pos quad) (-> s3-0 vec 0 quad)) + (vector-float*! (-> s3-0 cquery move-dist) (-> s3-0 vec 1) (-> s3-0 vec 2 y)) + (let ((f0-10 (fill-and-probe-using-line-sphere *collide-cache* (-> s3-0 cquery)))) + (when (and (>= f0-10 0.0) (= (-> s3-0 cquery best-other-tri pat mode) (pat-mode wall))) + (+! (-> s3-0 vec 2 x) (* -1.0 (-> s3-0 vec 2 y) (- 1.0 f0-10))) + 0 + ) + ) + (set! (-> s3-0 vec 2 y) (* -1.0 (-> s3-0 vec 2 y))) + ) + (set! (-> s3-0 vec 2 x) + (* (-> s3-0 vec 2 x) (fmax 0.25 (fmin 1.0 (* 0.000008138021 (vector-length (-> self control transv)))))) + ) + (seek! (-> gp-2 cam-side-shift) (-> s3-0 vec 2 x) (* 16384.0 (seconds-per-frame))) + ) + (set! (-> s4-0 x) (+ (-> s3-0 vec 0 x) (* (-> gp-2 cam-side-shift) (-> s3-0 vec 1 x)))) + (set! (-> s4-0 z) (+ (-> s3-0 vec 0 z) (* (-> gp-2 cam-side-shift) (-> s3-0 vec 1 z)))) + (if (type? s5-0 h-warf) + (set! (-> s4-0 y) (-> s3-0 vec 0 y)) + (set! (-> s4-0 y) (fmax (fmin (-> s4-0 y) (+ 2048.0 (-> s3-0 vec 0 y))) (+ -2048.0 (-> s3-0 vec 0 y)))) + ) + ) + 0 + ) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix))) + (vehicle-method-113 (the-as vehicle s5-0) (-> s4-1 rvec) (-> gp-2 seat-index) 0) + (vehicle-method-113 (the-as vehicle s5-0) (-> s4-1 uvec) (-> gp-2 seat-index) 1) + (enable-set! (-> self arm-ik 0) #t) + (enable-set! (-> self arm-ik 1) #t) + (set-ik-target! (-> self arm-ik 0) (-> s4-1 rvec)) + (set-ik-target! (-> self arm-ik 1) (-> s4-1 uvec)) + ) + ) + ) + (ja-post) + (joint-points) + (update-transforms (-> self control)) + (do-target-gspot) + (target-powerup-process) + (let ((v1-95 (-> *perf-stats* data 17))) + (b! (zero? (-> v1-95 ctrl)) cfg-31 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-45 pcr0) + (+! (-> v1-95 accum0) a0-45) + (.mfpc a0-47 pcr1) + (+! (-> v1-95 accum1) a0-47) + ) + (label cfg-31) + 0 + 0 + (none) + ) diff --git a/test/decompiler/reference/jak3/engine/target/target-swim_REF.gc b/test/decompiler/reference/jak3/engine/target/target-swim_REF.gc index 02a9a57177..e819716cbb 100644 --- a/test/decompiler/reference/jak3/engine/target/target-swim_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-swim_REF.gc @@ -266,10 +266,7 @@ (set! f30-1 (seek f30-1 (lerp-scale 1.0 0.0 (-> self control ctrl-xz-vel) 16384.0 32768.0) (* 4.0 (seconds-per-frame))) ) - (let ((v1-107 (-> self skel root-channel 1))) - (set! (-> v1-107 frame-interp 1) f24-1) - (set! (-> v1-107 frame-interp 0) f24-1) - ) + (ja :chan 1 :frame-interp0 f24-1 :frame-interp1 f24-1) (ja :num! (loop! (/ (-> self control ctrl-xz-vel) (* 60.0 diff --git a/test/decompiler/reference/jak3/engine/target/target-tube_REF.gc b/test/decompiler/reference/jak3/engine/target/target-tube_REF.gc new file mode 100644 index 0000000000..23a59c2a26 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/target/target-tube_REF.gc @@ -0,0 +1,1242 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *tube-mods*, type surface +(define *tube-mods* (new 'static 'surface + :name 'tube + :turnv 21845.334 + :turnvv 524288.0 + :tiltv 5461.3335 + :tiltvv 131072.0 + :transv-max 1.0 + :target-speed 32768.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 + ) + ) + +;; definition for symbol *tube-jump-mods*, type surface +(define *tube-jump-mods* (new 'static 'surface + :name 'tube + :turnv 21845.334 + :turnvv 262144.0 + :tiltv 5461.3335 + :tiltvv 131072.0 + :transv-max 1.0 + :seek0 0.8 + :seek90 0.7 + :seek180 0.8 + :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 + :mode 'air + :flags (surface-flag air) + ) + ) + +;; definition for symbol *tube-hit-mods*, type surface +(define *tube-hit-mods* (new 'static 'surface + :name 'tube + :turnv 21845.334 + :turnvv 262144.0 + :tiltv 32768.0 + :tiltvv 131072.0 + :transv-max 1.0 + :target-speed 40960.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 + :mode 'air + ) + ) + +;; failed to figure out what this is: +(let ((v1-3 (new 'static 'surface + :name '*tube-surface* + :turnv 1.0 + :turnvv 1.0 + :tiltv 1.0 + :tiltvv 1.0 + :transv-max 94208.0 + :target-speed 1.0 + :seek0 32768.0 + :seek90 94208.0 + :seek180 8192.0 + :fric 0.98 + :nonlin-fric-dist 4091904.0 + :slip-factor 0.7 + :slope-down-factor 81920.0 + :slope-slip-angle 16384.0 + :bend-speed 4.0 + :alignv 1.0 + :slope-up-traction 1.0 + :align-speed 1.0 + :flags (surface-flag no-turn-around turn-to-vel) + ) + ) + ) + (set! *tube-surface* v1-3) + (set! (-> v1-3 mult-hook) (the-as (function surface surface surface int none) nothing)) + (set! (-> v1-3 touch-hook) nothing) + (set! (-> v1-3 active-hook) nothing) + ) + +;; definition of type tube-info +(deftype tube-info (basic) + ((entity entity) + (tube handle) + (downhill vector :inline) + (centertube vector :inline) + (downtube vector :inline) + (sidetube vector :inline) + (foretube vector :inline) + (old-transv vector :inline) + (mod-x float) + (mod-y float) + (start-time time-frame) + (turn-anim-targ float) + (turn-anim-frame float) + (turn-anim-vel float) + (tube-sound-id sound-id) + (tube-sound-vol float) + (tube-sound-pitch float) + ) + ) + +;; definition for method 3 of type tube-info +(defmethod inspect ((this tube-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tentity: ~A~%" (-> this entity)) + (format #t "~1Ttube: ~D~%" (-> this tube)) + (format #t "~1Tdownhill: ~`vector`P~%" (-> this downhill)) + (format #t "~1Tcentertube: ~`vector`P~%" (-> this centertube)) + (format #t "~1Tdowntube: ~`vector`P~%" (-> this downtube)) + (format #t "~1Tsidetube: ~`vector`P~%" (-> this sidetube)) + (format #t "~1Tforetube: ~`vector`P~%" (-> this foretube)) + (format #t "~1Told-transv: ~`vector`P~%" (-> this old-transv)) + (format #t "~1Tmod-x: ~f~%" (-> this mod-x)) + (format #t "~1Tmod-y: ~f~%" (-> this mod-y)) + (format #t "~1Tstart-time: ~D~%" (-> this start-time)) + (format #t "~1Tturn-anim-targ: ~f~%" (-> this turn-anim-targ)) + (format #t "~1Tturn-anim-frame: ~f~%" (-> this turn-anim-frame)) + (format #t "~1Tturn-anim-vel: ~f~%" (-> this turn-anim-vel)) + (format #t "~1Ttube-sound-id: ~D~%" (-> this tube-sound-id)) + (format #t "~1Ttube-sound-vol: ~f~%" (-> this tube-sound-vol)) + (format #t "~1Ttube-sound-pitch: ~f~%" (-> this tube-sound-pitch)) + (label cfg-4) + this + ) + +;; definition of type tube-bank +(deftype tube-bank (basic) + () + ) + +;; definition for method 3 of type tube-bank +(defmethod inspect ((this tube-bank)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (label cfg-4) + this + ) + +;; definition for symbol *TUBE-bank*, type tube-bank +(define *TUBE-bank* (new 'static 'tube-bank)) + +;; definition for function tube-sounds +(defbehavior tube-sounds target () + (seek! + (-> self tube tube-sound-vol) + (if (logtest? (-> self control status) (collide-status on-surface)) + 1.0 + 0.0 + ) + (* 2.0 (seconds-per-frame)) + ) + (seek! + (-> self tube tube-sound-pitch) + (lerp-scale -0.15 0.15 (-> self control ctrl-xz-vel) 0.0 122880.0) + (* 0.5 (seconds-per-frame)) + ) + (let ((f1-2 (-> self tube tube-sound-vol)) + (f0-9 (-> self tube tube-sound-pitch)) + ) + (sound-play-by-name + (static-sound-name "slide-loop") + (-> self tube tube-sound-id) + (the int (* 1024.0 f1-2)) + (the int (* 1524.0 f0-9)) + 0 + (sound-group) + (-> self control trans) + ) + ) + ) + +;; definition for function tube-thrust +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior tube-thrust target ((arg0 float) (arg1 float)) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> self tube foretube) (-> self control trans)))) + (vector-flatten! s4-1 s4-1 (-> self tube downtube)) + (vector-flatten! s4-1 s4-1 (-> self control local-normal)) + (add-debug-vector + *display-target-marks* + (bucket-id debug-no-zbuf1) + (-> self control trans) + s4-1 + (meters 0.00024414062) + (new 'static 'rgba :g #xff :a #x80) + ) + (vector-matrix*! s4-1 s4-1 (-> self control w-R-c)) + (vector-float*! s4-1 s4-1 2.0) + (if (< (-> self control current-surface target-speed) (vector-length s4-1)) + (vector-normalize! s4-1 (-> self control current-surface target-speed)) + ) + (vector-v++! (-> self control transv-ctrl) s4-1) + (when (logtest? (-> self control status) (collide-status touch-wall)) + (let ((s3-0 (-> self tube old-transv))) + (-> self control transv-ctrl y) + (vector-reflect! s4-1 s3-0 (-> self control wall-contact-poly-normal)) + (let ((f0-5 (vector-dot (-> self tube sidetube) (-> self tube old-transv))) + (v1-28 (new-stack-vector0)) + (f1-2 (vector-dot (-> self tube sidetube) s4-1)) + ) + 0.0 + (vector-! v1-28 s4-1 (vector-float*! v1-28 (-> self tube sidetube) f1-2)) + (let* ((f2-2 (vector-length v1-28)) + (f3-0 f2-2) + ) + (cond + ((< 0.0 f0-5) + (if (< f1-2 (- f0-5)) + (set! f1-2 (- f0-5)) + ) + ) + ((< f0-5 0.0) + (if (< (- f0-5) f1-2) + (set! f1-2 (- f0-5)) + ) + ) + ) + (vector+! s4-1 (vector-float*! s4-1 (-> self tube sidetube) f1-2) (vector-float*! v1-28 v1-28 (/ f2-2 f3-0))) + ) + ) + (vector-flatten! s4-1 s4-1 (-> self control local-normal)) + (let ((v1-30 (new-stack-vector0))) + (let ((f0-8 (vector-dot (-> self tube downtube) s4-1))) + 0.0 + (vector-! v1-30 s4-1 (vector-float*! v1-30 (-> self tube downtube) f0-8)) + ) + (let* ((f0-9 (vector-length v1-30)) + (f1-4 f0-9) + (f2-4 (fmax (-> self control ctrl-xz-vel) (vector-dot s3-0 (-> self tube downtube)))) + ) + (vector+! s4-1 (vector-float*! s4-1 (-> self tube downtube) f2-4) (vector-float*! v1-30 v1-30 (/ f0-9 f1-4))) + ) + ) + ) + (vector-matrix*! s4-1 s4-1 (-> self control w-R-c)) + (let ((f0-11 (-> self control transv-ctrl y))) + (set! (-> self control transv-ctrl quad) (-> s4-1 quad)) + (set! (-> self control transv-ctrl y) f0-11) + ) + ) + ) + (let ((s4-2 (new 'stack-no-clear 'vector))) + (set! (-> s4-2 quad) (-> self tube downtube quad)) + (let ((s3-1 (new 'stack-no-clear 'vector))) + (set! (-> s3-1 quad) (-> self tube sidetube quad)) + (vector-flatten! s3-1 s3-1 (-> self control local-normal)) + (add-debug-vector + *display-target-marks* + (bucket-id debug-no-zbuf1) + (-> self control trans) + s3-1 + (meters 2) + (new 'static 'rgba :r #xff :g #xff :a #x80) + ) + (vector-matrix*! s3-1 s3-1 (-> self control w-R-c)) + (vector-normalize! s3-1 (* arg0 (-> self control current-surface seek90))) + (vector-v++! (-> self control transv-ctrl) s3-1) + ) + (vector-flatten! s4-2 s4-2 (-> self control local-normal)) + (add-debug-vector + *display-target-marks* + (bucket-id debug-no-zbuf1) + (-> self control trans) + s4-2 + (meters 2) + (new 'static 'rgba :r #xff :g #x80 :b #x40 :a #x80) + ) + (vector-matrix*! s4-2 s4-2 (-> self control w-R-c)) + (vector-normalize! + s4-2 + (* (-> self control current-surface slope-down-factor) (fmax 0.2 (-> self control surface-angle))) + ) + (vector-v++! (-> self control transv-ctrl) s4-2) + ) + (let* ((f1-8 (-> self control current-surface fric)) + (f0-17 (- 1.0 (* 60.0 (seconds-per-frame) (- 1.0 f1-8)))) + (f0-19 (* 0.5 (+ 1.0 f0-17))) + ) + (set! (-> self control transv-ctrl x) (* (-> self control transv-ctrl x) f0-19)) + (set! (-> self control transv-ctrl z) (* (-> self control transv-ctrl z) f0-19)) + ) + (let ((f0-22 + (- (-> self control current-surface transv-max) (if (< arg1 0.0) + (* arg1 (-> self control current-surface seek0)) + (* arg1 (-> self control current-surface seek180)) + ) + ) + ) + (v1-78 (-> self control transv-ctrl)) + ) + (if (>= (sqrtf (+ (* (-> v1-78 x) (-> v1-78 x)) (* (-> v1-78 z) (-> v1-78 z)))) f0-22) + (vector-xz-normalize! (-> self control transv-ctrl) f0-22) + ) + ) + (let ((gp-1 (new-stack-vector0))) + (vector-matrix*! gp-1 (-> self control transv-ctrl) (-> self control c-R-w)) + (vector-float*! gp-1 gp-1 0.5) + (add-debug-vector + *display-target-marks* + (bucket-id debug-no-zbuf1) + (-> self control trans) + gp-1 + (meters 0.00024414062) + (new 'static 'rgba :g #xff :b #xff :a #x80) + ) + (vector+! gp-1 gp-1 (-> self control trans)) + (add-debug-text-sphere + *display-target-marks* + (bucket-id debug-no-zbuf1) + gp-1 + (meters 0.2) + "ltransv" + (new 'static 'rgba :g #xff :b #xff :a #x80) + ) + (vector-matrix*! gp-1 (new 'static 'vector :z 40960.0 :w 1.0) (-> self control c-R-w)) + (vector-float*! gp-1 gp-1 0.5) + (vector+! gp-1 gp-1 (-> self control trans)) + (add-debug-text-sphere + *display-target-marks* + (bucket-id debug-no-zbuf1) + gp-1 + (meters 0.2) + "nose" + (new 'static 'rgba :r #xff :g #xff :a #x80) + ) + ) + (tube-sounds) + 0 + (none) + ) + +;; definition for function target-tube-post +;; INFO: Used lq/sq +(defbehavior target-tube-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 tube old-transv quad) (-> self control transv quad)) + (flag-setup) + (build-conversions (-> self control transv)) + (if (logtest? (-> self target-flags) (target-flags tinvuln1)) + (set! (-> self control current-surface turnv) (* 3.0 (-> self control current-surface turnv))) + ) + (forward-up-nopitch->quaternion + (-> self control dir-targ) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self control dir-targ)) + (-> self control local-normal) + ) + (do-rotations1) + (send-event + (handle->process (-> self tube tube)) + 'update + (-> self tube centertube) + (-> self tube downtube) + (-> self tube sidetube) + (-> self tube foretube) + ) + (vector-flatten! + (-> self tube downhill) + (vector-negate! (new-stack-vector0) (-> self control dynam gravity-normal)) + (-> self control local-normal) + ) + (vector-normalize! (-> self tube downhill) 1.0) + (set! (-> self control turn-to-magnitude) 1.0) + (let ((f28-0 (analog-input (the-as int (-> self control cpad leftx)) 128.0 32.0 110.0 1.0))) + (set! (-> self tube mod-x) f28-0) + (let ((f0-8 (analog-input (the-as int (-> self control cpad lefty)) 128.0 32.0 110.0 1.0))) + (set! (-> self tube mod-y) f0-8) + (tube-thrust f28-0 f0-8) + ) + ) + (add-gravity) + (do-rotations2) + (reverse-conversions (-> self control transv)) + (set! (-> self control reaction) target-collision-reaction) + (let ((a2-5 (new 'stack-no-clear 'collide-query))) + (let ((v1-52 (-> self control))) + (set! (-> a2-5 collide-with) (-> v1-52 root-prim prim-core collide-with)) + (set! (-> a2-5 ignore-process0) self) + (set! (-> a2-5 ignore-process1) #f) + (set! (-> a2-5 ignore-pat) (-> v1-52 pat-ignore-mask)) + ) + (set! (-> a2-5 action-mask) (collide-action solid)) + (fill-cache-integrate-and-collide (-> self control) (-> self control transv) a2-5 (meters 1)) + ) + (bend-gravity) + (post-flag-setup) + (set! (-> self control surf) *tube-surface*) + ) + ) + (update-rates! (-> self clock) f30-0) + ) + (ja-post) + (joint-points) + (do-target-gspot) + (target-powerup-process) + (none) + ) + +;; failed to figure out what this is: +(defstate target-tube (target) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (cond + ((and (= message 'query) (= (-> block param 0) 'mode)) + 'tube + ) + (else + (let ((v1-3 message)) + (cond + ((= v1-3 'change-mode) + (case (-> block param 0) + (('grab) + (when (not (focus-test? self dead)) + (if (-> block param 1) + (logior! (-> self focus-status) (focus-status grabbed)) + ) + #t + ) + ) + ) + ) + ((= v1-3 'end-mode) + (case (-> block param 0) + (('grab) + (when (focus-test? self grabbed) + (logclear! (-> self focus-status) (focus-status grabbed)) + #t + ) + ) + (('tube) + (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) + (-> *TARGET-bank* tube-jump-height-max) + (the-as surface #f) + ) + ) + ) + ) + ) + ((= v1-3 'touched) + (send-event proc 'attack (-> block param 0) 'tube 0 0) + #f + ) + ((or (= v1-3 'attack) (= v1-3 'attack-or-shove) (= v1-3 'attack-invinc)) + (target-attacked + 'attack-or-shove + (the-as attack-info (-> block param 1)) + proc + (the-as touching-shapes-entry (-> block param 0)) + target-tube-hit + ) + ) + ((-> self major-mode-event-hook) + ((-> self major-mode-event-hook)) + ) + (else + (target-generic-event-handler proc argc message block) + ) + ) + ) + ) + ) + ) + :exit (behavior () + (when (not (and (-> self next-state) + (let ((v1-3 (-> self next-state name))) + (or (= v1-3 'target-tube-walk) (= v1-3 'target-tube-jump) (= v1-3 'target-tube-hit)) + ) + ) + ) + (logclear! (-> self focus-status) (focus-status tube)) + (set! (-> self control mod-surface) *walk-mods*) + (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-collide-set! 'normal 0.0) + (set! (-> self control reaction) target-collision-reaction) + (remove-setting! 'slave-options) + (sound-stop (-> self tube tube-sound-id)) + (set! (-> self tube tube-sound-id) (new 'static 'sound-id)) + (send-event (handle->process (-> self tube tube)) 'end-mode) + (when (focus-test? self indax) + (remove-setting! 'string-min-length) + (remove-setting! 'string-max-length) + (remove-setting! 'string-min-height) + (remove-setting! 'string-max-height) + (remove-setting! 'fov) + ) + (target-exit) + (let ((t9-10 (-> self sub-mode-exit-hook))) + (if t9-10 + (t9-10) + ) + ) + ) + (let ((t9-11 (-> self major-mode-exit-hook))) + (if t9-11 + (t9-11) + ) + ) + ) + :code nothing + :post (behavior () + (target-tube-post) + ) + ) + +;; failed to figure out what this is: +(defstate target-tube-start (target) + :parent target-tube + :code (behavior ((arg0 handle)) + (set-setting! 'slave-options 'set 0.0 (cam-slave-options BIKE_MODE)) + (target-exit) + (set! (-> self control surf) *tube-surface*) + (if (zero? (-> self tube)) + (set! (-> self tube) (new 'process 'tube-info)) + ) + (set! (-> self tube tube) arg0) + (set! (-> self tube entity) #f) + (let ((a0-4 (handle->process arg0))) + (if a0-4 + (set! (-> self tube entity) (-> a0-4 entity)) + ) + ) + (set-time! (-> self tube start-time)) + (set! (-> self tube tube-sound-id) (new-sound-id)) + (set! (-> self tube tube-sound-vol) 0.0) + (set! (-> self tube tube-sound-pitch) 0.0) + (target-collide-set! 'tube 0.0) + (set! (-> self control transv quad) (the-as uint128 0)) + (set! (-> self control ctrl-xz-vel) 0.0) + (logior! (-> self focus-status) (focus-status tube)) + (when (focus-test? self indax) + (set-setting! 'string-min-length 'abs (meters 4) 0) + (set-setting! 'string-max-length 'abs (meters 4) 0) + (set-setting! 'string-min-height 'abs (meters 6) 0) + (set-setting! 'string-max-height 'abs (meters 6) 0) + (set-setting! 'fov 'abs (degrees 95.0) 0) + ) + (remove-exit) + (cond + ((< (the-as + float + (send-event + (handle->process (-> self tube tube)) + 'update + (-> self tube centertube) + (-> self tube downtube) + (-> self tube sidetube) + (-> self tube foretube) + ) + ) + 0.5 + ) + (vector-normalize-copy! (-> self control transv) (-> self tube downtube) 40960.0) + (forward-up-nopitch->quaternion + (-> self control dir-targ) + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self control transv) 1.0) + (-> self control dynam gravity-normal) + ) + (go target-tube-jump (-> *TARGET-bank* tube-jump-height-min) (-> *TARGET-bank* tube-jump-height-max)) + ) + (else + (go target-tube-walk) + ) + ) + ) + :post target-post + ) + +;; definition for function target-tube-turn-anim +;; WARN: Return type mismatch int vs none. +(defbehavior target-tube-turn-anim 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 tube turn-anim-targ) (fmax -20.0 (fmin 20.0 (-> self tube turn-anim-targ)))) + (or (not (>= (* (-> self tube turn-anim-targ) (-> self tube turn-anim-frame)) 0.0)) + (< (fabs (-> self tube turn-anim-frame)) (fabs (-> self tube turn-anim-targ))) + ) + (+! (-> self tube turn-anim-vel) + (* (- (-> self tube turn-anim-targ) (-> self tube turn-anim-frame)) + (lerp-scale + 20.0 + (if (< (fabs (-> self tube turn-anim-frame)) (fabs (-> self tube turn-anim-targ))) + 30.0 + 60.0 + ) + (-> self control ctrl-xz-vel) + 0.0 + 36864.0 + ) + (seconds-per-frame) + ) + ) + (set! (-> self tube turn-anim-vel) + (fmax + -100.0 + (fmin 100.0 (* (-> self tube turn-anim-vel) (lerp-scale 0.96 0.9 (-> self control ctrl-xz-vel) 0.0 36864.0))) + ) + ) + (+! (-> self tube turn-anim-frame) (* (-> self tube turn-anim-vel) (seconds-per-frame))) + (set! (-> self tube turn-anim-frame) (fmax -20.0 (fmin 20.0 (-> self tube turn-anim-frame)))) + (cond + ((and (>= (-> self tube turn-anim-frame) 20.0) (>= (-> self tube turn-anim-vel) 0.0)) + (set! (-> self tube turn-anim-vel) 0.0) + ) + ((and (>= -20.0 (-> self tube turn-anim-frame)) (>= 0.0 (-> self tube turn-anim-vel))) + (set! (-> self tube turn-anim-vel) 0.0) + ) + ) + ) + ) + (update-rates! (-> self clock) f30-0) + ) + (let ((a1-4 (if (focus-test? self indax) + jakb-lightjak-shield-end-ja + jakb-tube-turn-ja + ) + ) + ) + (ja :group! a1-4 + :num! (identity (ja-aframe + (+ (-> self tube turn-anim-frame) + (* 5.0 (sin (* 145.63556 (the float (- (current-time) (-> self state-time)))))) + ) + 0 + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate target-tube-walk (target) + :parent target-tube + :enter (behavior () + (set! (-> self control mod-surface) *tube-mods*) + (set! (-> self control surf) *tube-surface*) + ) + :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-tube-jump (-> *TARGET-bank* tube-jump-height-min) (-> *TARGET-bank* tube-jump-height-max)) + ) + (when (and (not (logtest? (-> self control status) (collide-status on-surface))) + (time-elapsed? (-> self control last-time-on-surface) (seconds 0.2)) + (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))) + (if (focus-test? self indax) + (go target-indax-falling 'tube) + (go target-falling 'tube) + ) + ) + ) + :code (behavior () + (cond + ((and (not (focus-test? self indax)) + (let ((v1-5 (ja-group))) + (and v1-5 (or (= v1-5 jakb-jump-forward-ja) (= v1-5 jakb-duck-high-jump-ja) (= v1-5 jakb-jump-loop-ja))) + ) + ) + (ja-channel-push! 1 (seconds 0.04)) + (ja-no-eval :group! jakb-tube-jump-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set! (-> self tube turn-anim-frame) 0.0) + ) + ((and (focus-test? self indax) + (let ((v1-39 (ja-group))) + (and v1-39 (or (= v1-39 (-> self draw art-group data 476)) (= v1-39 (-> self draw art-group data 477)))) + ) + ) + (ja-channel-push! 1 (seconds 0.04)) + (ja-no-eval :group! jakb-lightjak-dummy21-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set! (-> self tube turn-anim-frame) 0.0) + ) + (else + (ja-channel-push! 1 (seconds 0.04)) + ) + ) + (until #f + (set! (-> self tube turn-anim-targ) (* 20.0 (-> self tube mod-x))) + (target-tube-turn-anim) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate target-tube-jump (target) + :parent target-tube + :enter (behavior ((arg0 float) (arg1 float)) + (set-time! (-> self state-time)) + (init-var-jump arg0 arg1 #t #f (-> self control transv) 2.0) + (logclear! (-> self control status) (collide-status on-surface on-ground touch-surface)) + (set! (-> self control mod-surface) *tube-jump-mods*) + (set! (-> self control unknown-float0000) (+ -24576.0 (-> self tube centertube y))) + ) + :trans (behavior () + (if (logtest? (-> self control status) (collide-status on-surface)) + (go target-tube-walk) + ) + (mod-var-jump #t #t (cpad-hold? (-> self control cpad number) x) (-> self control transv)) + (seek! + (-> self control unknown-float35) + (fmax 0.0 (fmin 1.0 (* 0.00012207031 (+ -2048.0 (-> self control ctrl-xz-vel))))) + (seconds-per-frame) + ) + (if (and (< (-> self control trans y) (-> self control unknown-float0000)) + (and (< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 0.0) + (not (and (= *cheat-mode* 'debug) (cpad-hold? (-> self control cpad number) r2))) + (focus-test? self indax) + ) + ) + (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 float) (arg1 float)) + (let ((f28-0 35.0) + (f30-0 1.0) + ) + (ja-channel-push! 1 (seconds 0.05)) + (set! f28-0 (cond + ((focus-test? self indax) + (sound-play "dax-effort") + (ja :group! (-> self draw art-group data 476)) + 10.0 + ) + ((= (-> self ext-anim) (target-anim default)) + (ja :group! jakb-duck-high-jump-ja :num! (identity (ja-aframe 16.0 0))) + f28-0 + ) + (else + (ja :group! jakb-jump-forward-ja) + 10.0 + ) + ) + ) + (until (ja-done? 0) + (let* ((f24-0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))) + (f26-0 (- f28-0 (ja-aframe-num 0))) + (f0-8 (fmin (fmin 3.0 f26-0) (/ (* 5.0 f26-0) (the float (time-to-apex f24-0 -245760.0))))) + (a0-16 (-> self skel root-channel 0)) + ) + (set! (-> a0-16 param 0) (the float (+ (-> a0-16 frame-group frames num-frames) -1))) + (let ((v1-35 (and (< 0.0 f24-0) (< 0.0 f26-0)))) + (set! (-> a0-16 param 1) (if v1-35 + f0-8 + f30-0 + ) + ) + ) + (joint-control-channel-group-eval! a0-16 (the-as art-joint-anim #f) num-func-seek!) + ) + (suspend) + ) + ) + (if (focus-test? self indax) + (ja-no-eval :group! (-> self draw art-group data 477) :num! (loop!) :frame-num 0.0) + (ja-no-eval :group! jakb-jump-loop-ja :num! (loop!) :frame-num 0.0) + ) + (until #f + (suspend) + (ja :num! (loop!)) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate target-tube-hit (target) + :parent target-tube + :enter (behavior ((arg0 symbol) (arg1 attack-info)) + (send-event + (handle->process (-> self tube tube)) + 'update + (-> self tube centertube) + (-> self tube downtube) + (-> self tube sidetube) + (-> self tube foretube) + ) + ) + :exit (behavior () + (if (not (and (-> self next-state) (= (-> self next-state name) 'target-tube-death))) + (logclear! (-> self focus-status) (focus-status dead hit)) + ) + (logclear! (-> self focus-status) (focus-status grabbed in-head)) + (logclear! (-> self target-flags) (target-flags tf1 tf5)) + (let ((v1-12 (-> self prev-state parent))) + (when v1-12 + (let ((t9-0 (-> v1-12 exit))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + ) + :code (behavior ((arg0 symbol) (arg1 attack-info)) + (let ((gp-0 (-> self attack-info))) + (set-time! (-> self state-time)) + (logior! (-> self focus-status) (focus-status hit)) + (set-time! (-> self game hit-time)) + (when (not (logtest? (-> arg1 mask) (attack-mask vector))) + (vector-! + (-> arg1 vector) + (vector+float*! (new 'stack-no-clear 'vector) (-> self tube foretube) (-> self tube downtube) 20480.0) + (-> self control trans) + ) + (let ((v1-11 (new-stack-vector0)) + (f0-2 (vector-dot (-> self control wall-contact-poly-normal) (-> arg1 vector))) + ) + 0.0 + (vector-! v1-11 (-> arg1 vector) (vector-float*! v1-11 (-> self control wall-contact-poly-normal) f0-2)) + (let* ((f1-2 (vector-length v1-11)) + (f2-0 f1-2) + ) + (if (< f0-2 0.0) + (set! f0-2 (* 0.5 f0-2)) + ) + (vector+! + (-> arg1 vector) + (vector-float*! (-> arg1 vector) (-> self control wall-contact-poly-normal) f0-2) + (vector-float*! v1-11 v1-11 (/ f1-2 f2-0)) + ) + ) + ) + (logior! (-> arg1 mask) (attack-mask vector)) + ) + (when (and (logtest? (-> arg1 mask) (attack-mask mode)) + (= (-> arg1 mode) 'darkeco) + (not (logtest? (-> arg1 mask) (attack-mask shove-up))) + ) + (set! (-> arg1 shove-up) 12288.0) + (logior! (-> arg1 mask) (attack-mask shove-up)) + ) + (let ((v1-23 gp-0)) + (set! (-> v1-23 attacker) (the-as handle #f)) + (set! (-> v1-23 mode) 'generic) + (set! (-> v1-23 shove-back) 6144.0) + (set! (-> v1-23 shove-up) 12288.0) + (set! (-> v1-23 angle) #f) + (set! (-> v1-23 trans quad) (-> self control trans quad)) + (set! (-> v1-23 control) 0.0) + (set! (-> v1-23 invinc-time) (-> *TARGET-bank* hit-invulnerable-timeout)) + (set! (-> v1-23 damage) (-> *FACT-bank* health-default-inc)) + ) + (combine! gp-0 arg1 self) + (when (= arg0 'attack) + (send-event (handle->process (-> self notify)) 'notify 'hit (-> gp-0 mode)) + (logior! (-> self focus-status) (focus-status hit)) + (set-time! (-> self game hit-time)) + (case (-> gp-0 mode) + (('bot) + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (if (= (-> self game mode) 'play) + (go target-death (-> gp-0 mode)) + ) + ) + (('endlessfall) + (when (= (-> self game mode) 'play) + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (if (focus-test? self indax) + (go target-indax-death (-> gp-0 mode)) + (go target-death (-> gp-0 mode)) + ) + ) + ) + (('lava 'melt) + (when (= (-> self game mode) 'play) + (pickup-collectable! (-> self fact) (pickup-type health) -1000.0 (the-as handle #f)) + (go target-death (-> gp-0 mode)) + ) + ) + (else + (pickup-collectable! (-> self fact) (pickup-type health) (- (-> gp-0 damage)) (the-as handle #f)) + ) + ) + (target-hit-effect gp-0) + ) + (set! (-> self control mod-surface) *smack-mods*) + (target-hit-setup-anim gp-0) + (target-hit-move gp-0 (target-hit-orient gp-0 (-> gp-0 vector)) target-falling-anim-trans 1.0) + (let ((v1-69 (new-stack-vector0)) + (f0-12 (vector-dot (-> self tube downtube) (-> self control transv))) + ) + 0.0 + (vector-! v1-69 (-> self control transv) (vector-float*! v1-69 (-> self tube downtube) f0-12)) + (let ((f1-5 (vector-length v1-69)) + (f2-2 (fmax 40960.0 f0-12)) + (f0-13 0.0) + ) + (vector+! + (-> self control transv) + (vector-float*! (-> self control transv) (-> self tube downtube) f2-2) + (vector-float*! v1-69 v1-69 (/ f0-13 f1-5)) + ) + ) + ) + (let ((s5-2 forward-up-nopitch->quaternion) + (s4-1 (-> self control dir-targ)) + (t9-14 vector-normalize!) + (a0-71 (new-stack-vector0)) + ) + (set! (-> a0-71 quad) (-> self control transv quad)) + (s5-2 s4-1 (t9-14 a0-71 1.0) (vector-y-quaternion! (new-stack-vector0) (-> self control dir-targ))) + ) + (if (and (= (-> self game mode) 'play) (>= 0.0 (-> self fact health))) + (go target-tube-death (-> gp-0 mode)) + ) + ) + (go target-tube-walk) + ) + :post target-post + ) + +;; failed to figure out what this is: +(defstate target-tube-death (target) + :parent target-tube + :event (-> target-death event) + :exit (behavior () + (logclear! (-> self focus-status) (focus-status dead hit)) + (target-exit) + (remove-setting! 'process-mask) + (apply-settings *setting-control*) + (let ((v1-7 (-> self prev-state parent))) + (when v1-7 + (let ((t9-3 (-> v1-7 exit))) + (if t9-3 + (t9-3) + ) + ) + ) + ) + ) + :code (behavior ((arg0 symbol)) + (local-vars (v1-53 symbol)) + (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)) + (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) + (set! (-> self control mod-surface) *neutral-mods*) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! jakb-deatha-ja :num! (seek! (ja-aframe 134.0 0)) :frame-num 0.0) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (let ((gp-2 (new 'stack-no-clear 'vector))) + (when (not (logtest? (-> self align flags) (align-flags disabled))) + (vector-matrix*! gp-2 (the-as vector (-> self align delta)) (-> self control c-R-w)) + (vector-float*! (-> self control transv) gp-2 (-> self clock frames-per-second)) + ) + ) + (suspend) + (ja :num! (seek! (ja-aframe 134.0 0))) + ) + (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)) + (until v1-53 + (suspend) + (set! v1-53 (and (time-elapsed? (-> self state-time) (seconds 1)) (not (movie?)))) + ) + (go target-tube-walk) + ) + :post target-no-stick-post + ) + +;; definition of type slide-control +(deftype slide-control (process-drawable) + ((target handle) + (pos float) + (trans vector :inline) + (rot vector :inline) + (side vector :inline) + ) + (:state-methods + slide-control-watch + slide-control-ride + ) + ) + +;; definition for method 3 of type slide-control +(defmethod inspect ((this slide-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Ttarget: ~D~%" (-> this target)) + (format #t "~2Tpos: ~f~%" (-> this pos)) + (format #t "~2Ttrans: ~`vector`P~%" (-> this trans)) + (format #t "~2Trot: ~`vector`P~%" (-> this rot)) + (format #t "~2Tside: ~`vector`P~%" (-> this side)) + (label cfg-4) + this + ) + +;; definition for function distance-from-tangent +(defun distance-from-tangent ((arg0 path-control) (arg1 float) (arg2 vector) (arg3 vector) (arg4 vector) (arg5 vector)) + (get-point-in-path! arg0 arg2 arg1 'interp) + (displacement-between-two-points-normalized! arg0 arg3 arg1) + (set! (-> arg2 y) (-> arg5 y)) + (set! (-> arg3 y) 0.0) + (let ((s2-1 (new 'stack-no-clear 'vector))) + (vector-rotate-y! arg4 arg3 -16384.0) + (set! (-> arg4 y) 0.0) + (let* ((a2-5 (vector+! (new 'stack-no-clear 'vector) arg2 arg4)) + (f0-3 (vector-line-distance-point! arg5 arg2 a2-5 s2-1)) + ) + (if (< 0.0 (vector-dot arg3 (vector-! (new 'stack-no-clear 'vector) arg5 s2-1))) + (set! f0-3 (- f0-3)) + ) + f0-3 + ) + ) + ) + +;; definition for function find-target-point +;; INFO: Used lq/sq +(defbehavior find-target-point slide-control ((arg0 vector)) + (local-vars (f0-2 float)) + (let* ((s4-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'vector)) + (f28-0 (+ -0.1 (-> self pos))) + (f26-0 (distance-from-tangent (-> self path) f28-0 s4-0 s5-0 gp-0 arg0)) + ) + 0.0 + (let ((f30-0 f28-0)) + (until (or (and (< f26-0 f0-2) (>= f0-2 0.0)) (< (get-num-segments (-> self path)) f28-0)) + (set! f0-2 (distance-from-tangent (-> self path) f28-0 s4-0 s5-0 gp-0 arg0)) + (when (or (>= f26-0 f0-2) (< f26-0 0.0)) + (set! f26-0 f0-2) + (set! f30-0 f28-0) + ) + (set! f28-0 (+ 0.01 f28-0)) + ) + (distance-from-tangent (-> self path) f30-0 s4-0 s5-0 gp-0 arg0) + (set! (-> self trans quad) (-> s4-0 quad)) + (set! (-> self rot quad) (-> s5-0 quad)) + (set! (-> self side quad) (-> gp-0 quad)) + (set! (-> self pos) f30-0) + ) + ) + (-> self pos) + ) + +;; failed to figure out what this is: +(defstate slide-control-watch (slide-control) + :virtual #t + :enter (behavior () + (get-point-in-path! (-> self path) (-> self trans) 0.2 'interp) + (get-point-in-path! (-> self path) (-> self root trans) 0.2 'interp) + (displacement-between-two-points-normalized! (-> self path) (-> self rot) 0.2) + (set! (-> self pos) 0.2) + ) + :trans (behavior () + (if (and (and *target* + (and (>= 81920.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + (< 0.0 + (vector-dot + (vector-! (new 'stack-no-clear 'vector) (-> *target* control trans) (-> self trans)) + (-> self rot) + ) + ) + (and (not (focus-test? *target* in-air)) + (< (-> *target* control trans y) (+ 12288.0 (-> self root trans y))) + (send-event *target* 'change-mode 'tube self) + ) + ) + (go-virtual slide-control-ride) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate slide-control-ride (slide-control) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('end-mode) + (go-virtual slide-control-watch) + ) + (('update) + (let* ((s4-0 proc) + (gp-0 (if (type? s4-0 process-drawable) + s4-0 + ) + ) + ) + (if gp-0 + (find-target-point (-> (the-as process-drawable gp-0) root trans)) + ) + (set! (-> (the-as vector (-> block param 0)) quad) (-> self trans quad)) + (set! (-> (the-as vector (-> block param 1)) quad) (-> self rot quad)) + (set! (-> (the-as vector (-> block param 2)) quad) (-> self side quad)) + (get-point-in-path! (-> self path) (the-as vector (-> block param 3)) (+ 0.2 (-> self pos)) 'interp) + (if (>= (-> self pos) (+ -0.2 (get-num-segments (-> self path)))) + (send-event gp-0 'end-mode 'tube) + ) + ) + (-> self pos) + ) + ) + ) + :enter (behavior () + (set! (-> self pos) 0.0) + (set! (-> self target) (process->handle *target*)) + (process-entity-status! self (entity-perm-status no-kill) #t) + ) + :exit (behavior () + (set! (-> self target) (the-as handle #f)) + (process-entity-status! self (entity-perm-status no-kill) #f) + ) + :trans (behavior () + (let ((gp-0 (handle->process (-> self target)))) + (cond + ((if (type? gp-0 process-drawable) + gp-0 + ) + ) + (else + (go-virtual slide-control-watch) + ) + ) + ) + ) + :code sleep-code + ) + +;; definition for method 11 of type slide-control +(defmethod init-from-entity! ((this slide-control) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (logclear! (-> this mask) (process-mask actor-pause)) + (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 target) (the-as handle #f)) + (go (method-of-object this slide-control-watch)) + ) 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 0000000000..95f3dec60f --- /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 0000000000..91b7992224 --- /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/target-util_REF.gc b/test/decompiler/reference/jak3/engine/target/target-util_REF.gc index 457a0a82d0..278c9a64c1 100644 --- a/test/decompiler/reference/jak3/engine/target/target-util_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target-util_REF.gc @@ -7,9 +7,9 @@ :bounds (static-spherem 0 0 0 3.2) :longest-edge (meters 1) :texture-level 10 + :sort 1 :origin-joint-index 3 :shadow-joint-index 3 - :light-index 1 ) ;; failed to figure out what this is: @@ -19,9 +19,9 @@ :longest-edge (meters 1) :shadow jak-ext-geo-c+0-jakclod0-sash-cg :texture-level 10 + :sort 1 :origin-joint-index 3 :shadow-joint-index 3 - :light-index 1 ) ;; failed to figure out what this is: @@ -30,9 +30,9 @@ :bounds (static-spherem 0 0 0 3.2) :longest-edge (meters 1) :texture-level 10 + :sort 1 :origin-joint-index 3 :shadow-joint-index 3 - :light-index 1 ) ;; failed to figure out what this is: @@ -42,9 +42,9 @@ :longest-edge (meters 1) :shadow jakb-c-shadow-mg :texture-level 10 + :sort 1 :origin-joint-index 3 :shadow-joint-index 3 - :light-index 1 :clothing (((mesh 10) (gravity-constant (meters 16)) (wind-constant 0.5) @@ -106,10 +106,9 @@ :longest-edge (meters 1) :shadow jakb-walk-down-ja :texture-level 10 - :sort 2 + :sort 4 :origin-joint-index 3 :shadow-joint-index 3 - :light-index 4 ) ;; failed to figure out what this is: @@ -118,8 +117,8 @@ :bounds (static-spherem 0 0 0 3.2) :longest-edge (meters 1) :texture-level 10 - :shadow-joint-index 3 - :light-index 5 + :sort 5 + :origin-joint-index 3 ) ;; definition for symbol *target-shadow-control*, type shadow-control @@ -139,9 +138,9 @@ :bounds (static-spherem 0 0 0 3.2) :longest-edge (meters 1) :shadow jak-highres-shadow-mg + :sort 1 :origin-joint-index 3 :shadow-joint-index 3 - :light-index 1 ) ;; failed to figure out what this is: @@ -205,7 +204,7 @@ ((collectables-generic-blast-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 50) :texture-level 10 - :light-index 4 + :sort 4 ) ;; failed to figure out what this is: @@ -213,7 +212,7 @@ ((collectables-generic-ripples-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 6) :texture-level 10 - :light-index 4 + :sort 4 ) ;; failed to figure out what this is: @@ -221,7 +220,7 @@ ((collectables-bomb-blast-lod0-mg (meters 999999))) :bounds (static-spherem 0 0 0 50) :texture-level 10 - :light-index 4 + :sort 4 ) ;; definition of type target-bank @@ -1539,7 +1538,7 @@ ;; definition for function fall-test ;; WARN: Return type mismatch object vs none. -(defbehavior fall-test target ((arg0 (state symbol target)) (arg1 float)) +(defbehavior fall-test target ((arg0 (state object target)) (arg1 float)) (when (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))) @@ -1635,7 +1634,7 @@ (set! (-> s4-0 1 y) (+ 2867.2 (-> *TARGET-bank* body-radius) (-> s4-0 1 y))) (set! (-> s4-0 1 r) (-> *TARGET-bank* body-radius)) (let ((v1-12 gp-0)) - (set! (-> v1-12 spheres) s4-0) + (set! (-> v1-12 best-dist) (the-as float s4-0)) (set! (-> v1-12 best-other-prim) (the-as collide-shape-prim 2)) (set! (-> v1-12 collide-with) (logclear @@ -1805,12 +1804,7 @@ (set! (-> arg1 control invul2-off-time) arg0) ) ) - (let ((t9-0 (method-of-object (-> arg1 control) collide-shape-method-49))) - 2 - #x8000 - 0 - (t9-0) - ) + (modify-collide-as! (-> arg1 control) 2 (collide-spec jak-vulnerable) (collide-spec)) (logior! (-> arg1 focus-status) (focus-status ignore)) 0 (none) @@ -1834,12 +1828,7 @@ ) (when (not (logtest? (target-flags tinvuln1 tinvuln2) (-> arg0 target-flags))) (logclear! (-> arg0 draw status) (draw-control-status no-draw-bounds)) - (let ((t9-0 (method-of-object (-> arg0 control) collide-shape-method-49))) - 2 - 0 - #x8000 - (t9-0) - ) + (modify-collide-as! (-> arg0 control) 2 (collide-spec) (collide-spec jak-vulnerable)) ) 0 (none) diff --git a/test/decompiler/reference/jak3/engine/target/target2_REF.gc b/test/decompiler/reference/jak3/engine/target/target2_REF.gc index df78d5a003..7e7f3bca08 100644 --- a/test/decompiler/reference/jak3/engine/target/target2_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target2_REF.gc @@ -800,15 +800,25 @@ :event target-standard-event-handler :exit (-> target-pole-cycle exit) :code (behavior ((arg0 float) (arg1 float) (arg2 float)) + (local-vars (a2-2 (function joint-control-channel float float float float :behavior process))) (let ((f0-2 (+ 1.0 (fmin 17.0 (ja-aframe-num 0))))) (ja-no-eval :group! jakb-pole-flip-up-ja :num! (seek!) :frame-num (ja-aframe f0-2 0)) ) (until (ja-done? 0) (suspend) - (ja :num! (seek!)) + (let ((a0-4 (-> self skel root-channel 0))) + (set! (-> a0-4 param 0) (the float (+ (-> a0-4 frame-group frames num-frames) -1))) + (set! (-> a0-4 param 1) 1.0) + (let ((t9-3 joint-control-channel-group-eval!) + (a1-3 #f) + ) + (set! a2-2 num-func-seek!) + (t9-3 a0-4 (the-as art-joint-anim a1-3) a2-2) + ) + ) ) (set-forward-vel arg2) - (go target-pole-flip-up-jump arg0 arg1) + (go target-pole-flip-up-jump arg0 arg1 (the-as symbol a2-2)) ) :post target-no-move-post ) @@ -816,8 +826,8 @@ ;; failed to figure out what this is: (defstate target-pole-flip-up-jump (target) :event target-standard-event-handler - :enter (behavior ((arg0 float) (arg1 float)) - ((-> target-jump-forward enter) arg0 arg1) + :enter (behavior ((arg0 float) (arg1 float) (arg2 symbol)) + ((-> target-jump-forward enter) arg0 arg1 arg2) (set! (-> self control mod-surface) *forward-pole-jump-mods*) ) :exit target-exit @@ -825,7 +835,7 @@ ((-> target-jump-forward trans)) (vector-flatten! (-> self control transv) (-> self control transv) (-> self control edge-grab-edge-dir)) ) - :code (behavior ((arg0 float) (arg1 float)) + :code (behavior ((arg0 float) (arg1 float) (arg2 symbol)) (send-event *camera* 'damp-up) (ja :group! jakb-pole-jump-loop-ja :num! min) (let ((f0-1 (target-height-above-ground)) @@ -954,7 +964,7 @@ ((or (< -0.2 (local-pad-angle)) (= (-> *cpad-list* cpads (-> self control cpad number) stick0-speed) 0.0)) (let ((a1-2 (new 'stack-no-clear 'collide-query))) (let ((v1-25 a1-2)) - (set! (-> v1-25 spheres) (-> *collide-edge-work* world-player-leap-up-spheres)) + (set! (-> v1-25 best-dist) (the-as float (-> *collide-edge-work* world-player-leap-up-spheres))) (set! (-> v1-25 best-other-prim) (the-as collide-shape-prim 6)) (set! (-> v1-25 collide-with) (-> self control root-prim prim-core collide-with)) (set! (-> v1-25 ignore-process0) #f) @@ -1094,6 +1104,7 @@ ) :exit (-> target-edge-grab exit) :code (behavior ((arg0 float) (arg1 float) (arg2 symbol)) + (local-vars (a2-4 (function joint-control-channel float float float float :behavior process))) (case arg2 (('ladder) (ja-channel-push! 1 (seconds 0.1)) @@ -1148,7 +1159,16 @@ (move-by-vector! (-> self control) s3-0) ) (suspend) - (ja :num! (seek!)) + (let ((a0-18 (-> self skel root-channel 0))) + (set! (-> a0-18 param 0) (the float (+ (-> a0-18 frame-group frames num-frames) -1))) + (set! (-> a0-18 param 1) 1.0) + (let ((t9-10 joint-control-channel-group-eval!) + (a1-7 #f) + ) + (set! a2-4 num-func-seek!) + (t9-10 a0-18 (the-as art-joint-anim a1-7) a2-4) + ) + ) ) ) (set! (-> self control transv quad) (the-as uint128 0)) @@ -1156,7 +1176,7 @@ (set-forward-vel 16384.0) (set! (-> self gun surpress-time) (+ (current-time) (seconds 0.2))) (send-event *camera* 'damp-up) - (go target-jump-forward arg0 arg1) + (go target-jump-forward arg0 arg1 (the-as symbol a2-4)) ) :post target-no-move-post ) @@ -1766,12 +1786,7 @@ :event target-generic-event-handler :enter (behavior ((arg0 string) (arg1 handle)) (set! (-> self control anim-handle) arg1) - (let ((t9-0 (method-of-object (-> self control) collide-shape-moving-method-60))) - #x47200000 - #x47200000 - (-> self control root-prim prim-core collide-with) - (t9-0) - ) + (move-to-ground (-> self control) 40960.0 40960.0 #f (-> self control root-prim prim-core collide-with)) (logior! (-> self focus-status) (focus-status grabbed)) (set! (-> self neck flex-blend) 0.0) ) @@ -1828,13 +1843,7 @@ (move-to-point! (-> self control) a1-2) (matrix->quaternion (-> self control quat-for-control) (-> gp-0 bone transform)) (quaternion-copy! (-> self control quat) (-> self control quat-for-control)) - (let ((t9-5 (method-of-object (-> self control) collide-shape-moving-method-60))) - #x45800000 - #x47200000 - #t - (-> self control root-prim prim-core collide-with) - (t9-5) - ) + (move-to-ground (-> self control) 4096.0 40960.0 #t (-> self control root-prim prim-core collide-with)) (when (logtest? (-> self control status) (collide-status on-water)) (let ((a1-6 (new-stack-vector0))) (set! (-> a1-6 x) (-> self control trans x)) @@ -1879,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))) @@ -1905,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/target/target_REF.gc b/test/decompiler/reference/jak3/engine/target/target_REF.gc index 15e4b35c52..a786cc8f1f 100644 --- a/test/decompiler/reference/jak3/engine/target/target_REF.gc +++ b/test/decompiler/reference/jak3/engine/target/target_REF.gc @@ -1400,13 +1400,13 @@ ;; failed to figure out what this is: (defstate target-jump-forward (target) :event target-jump-event-handler - :enter (behavior ((arg0 float) (arg1 float)) + :enter (behavior ((arg0 float) (arg1 float) (arg2 symbol)) ((-> target-jump enter) arg0 arg1 (the-as surface #f)) (set! (-> self control mod-surface) *forward-jump-mods*) ) :exit target-exit :trans (-> target-jump trans) - :code (behavior ((arg0 float) (arg1 float)) + :code (behavior ((arg0 float) (arg1 float) (arg2 symbol)) (when (and (using-gun? self) (not (-> self gun charge-active?))) (set! (-> self gun top-anim-low-high) 0.0) (case (gun->eco (-> self gun gun-type)) @@ -1863,7 +1863,7 @@ ;; failed to figure out what this is: (defstate target-falling (target) :event target-jump-event-handler - :enter (behavior ((arg0 symbol)) + :enter (behavior ((arg0 object)) (case arg0 (('uppercut) (set! (-> self control mod-surface) *uppercut-jump-mods*) @@ -1886,7 +1886,7 @@ #t ) ) - :code (behavior ((arg0 symbol)) + :code (behavior ((arg0 object)) (case arg0 (('uppercut) (ja-no-eval :num! (seek!)) @@ -2379,7 +2379,7 @@ ) ) (when (and (= (-> self fact eco-type) 2) (>= (-> self fact eco-level) 1.0)) - (do-effect (-> self skel effect) (the-as symbol "group-red-eco-spinkick") (ja-frame-num 0) 49) + (do-effect (-> self skel effect) "group-red-eco-spinkick" (ja-frame-num 0) 49) (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.1)) (talker-spawn-func (-> *talker-speech* 47) *entity-pool* (target-pos 0) (the-as region #f)) ) @@ -2681,7 +2681,7 @@ ) ) (when (and (= (-> self fact eco-type) 2) (>= (-> self fact eco-level) 1.0)) - (do-effect (-> self skel effect) (the-as symbol "group-red-eco-spinkick") (ja-frame-num 0) 28) + (do-effect (-> self skel effect) "group-red-eco-spinkick" (ja-frame-num 0) 28) (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.1)) (talker-spawn-func (-> *talker-speech* 47) *entity-pool* (target-pos 0) (the-as region #f)) ) @@ -2848,50 +2848,11 @@ (cond ((logtest? (-> *part-group-id-table* 12 flags) (sp-group-flag sp13)) (set! (-> *launch-matrix* trans quad) (-> s5-3 best-other-tri intersect quad)) - (let ((s5-4 (get-process *default-dead-pool* part-tracker-subsampler #x4000 0))) - (when s5-4 - (let ((t9-36 (method-of-type part-tracker-subsampler activate))) - (t9-36 (the-as part-tracker-subsampler s5-4) self "part-tracker-subsampler" (the-as pointer #x70004000)) - ) - (let ((t9-37 run-function-in-process) - (a0-72 s5-4) - (a1-16 part-tracker-subsampler-init) - ) - (set! (-> *part-tracker-subsampler-params-default* group) (-> *part-group-id-table* 12)) - (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-37) a0-72 a1-16 *part-tracker-subsampler-params-default*) - ) - (-> s5-4 ppointer) - ) - ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 12)) ) (else (set! (-> *launch-matrix* trans quad) (-> s5-3 best-other-tri intersect quad)) - (let ((s5-5 (get-process *default-dead-pool* part-tracker #x4000 0))) - (when s5-5 - (let ((t9-39 (method-of-type part-tracker activate))) - (t9-39 (the-as part-tracker s5-5) self "part-tracker" (the-as pointer #x70004000)) - ) - (let ((t9-40 run-function-in-process) - (a0-77 s5-5) - (a1-19 part-tracker-init) - ) - (set! (-> *part-tracker-params-default* group) (-> *part-group-id-table* 12)) - (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-40) a0-77 a1-19 *part-tracker-params-default*) - ) - (-> s5-5 ppointer) - ) - ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 12)) ) ) (let ((name (if (using-gun? self) @@ -3143,7 +3104,7 @@ (set! (-> self control dynam gravity-length) (-> self control standard-dynamics gravity-length)) ) (when (and (= (-> self fact eco-type) 2) (>= (-> self fact eco-level) 1.0)) - (do-effect (-> self skel effect) (the-as symbol "group-red-eco-spinkick") (ja-frame-num 0) 43) + (do-effect (-> self skel effect) "group-red-eco-spinkick" (ja-frame-num 0) 43) (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.1)) (talker-spawn-func (-> *talker-speech* 47) *entity-pool* (target-pos 0) (the-as region #f)) ) @@ -3346,7 +3307,7 @@ (suspend) (ja :num! (seek! (ja-aframe 7.0 0))) ) - (go target-darkjak-bomb1) + (go target-darkjak-bomb1 arg0 arg1) ) (else (ja-no-eval :group! jakb-attack-uppercut-ja :num! (seek! (ja-aframe 7.0 0)) :frame-num (ja-aframe f30-0 0)) @@ -3459,7 +3420,7 @@ ) (mod-var-jump #t #t (cpad-hold? (-> self control cpad number) x) (-> self control transv)) (when (and (= (-> self fact eco-type) 2) (>= (-> self fact eco-level) 1.0)) - (do-effect (-> self skel effect) (the-as symbol "group-red-eco-spinkick") (ja-frame-num 0) 28) + (do-effect (-> self skel effect) "group-red-eco-spinkick" (ja-frame-num 0) 28) (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.1)) ) (if (and (= (-> self control danger-mode) 'uppercut) @@ -3664,7 +3625,7 @@ ) (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.5)) (if (and (= (-> self fact eco-type) 2) (>= (-> self fact eco-level) 1.0)) - (do-effect (-> self skel effect) (the-as symbol "group-red-eco-strike-ground") (ja-frame-num 0) 0) + (do-effect (-> self skel effect) "group-red-eco-strike-ground" (ja-frame-num 0) 0) ) (let ((v1-56 (process-spawn @@ -3694,15 +3655,11 @@ ) ) (when (and (= (-> self fact eco-type) 2) (>= (-> self fact eco-level) 1.0)) - (do-effect - (-> self skel effect) - (the-as symbol "group-red-eco-spinkick") - (ja-frame-num 0) - (if (rand-vu-percent? 0.5) - 28 - 19 - ) - ) + (do-effect (-> self skel effect) "group-red-eco-spinkick" (ja-frame-num 0) (if (rand-vu-percent? 0.5) + 28 + 19 + ) + ) (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.1)) ) (when (and (not (-> self control danger-mode)) @@ -3899,15 +3856,11 @@ (when (and (and (= (-> self fact eco-type) 2) (>= (-> self fact eco-level) 1.0)) (not (time-elapsed? (-> self state-time) (seconds 0.25))) ) - (do-effect - (-> self skel effect) - (the-as symbol "group-red-eco-spinkick") - (ja-frame-num 0) - (if (rand-vu-percent? 0.5) - 28 - 19 - ) - ) + (do-effect (-> self skel effect) "group-red-eco-spinkick" (ja-frame-num 0) (if (rand-vu-percent? 0.5) + 28 + 19 + ) + ) (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 153 (seconds 0.1)) ) (let ((v1-37 (ja-group))) diff --git a/test/decompiler/reference/jak3/engine/ui/bigmap-h_REF.gc b/test/decompiler/reference/jak3/engine/ui/bigmap-h_REF.gc index 2404766e90..c4982b019e 100644 --- a/test/decompiler/reference/jak3/engine/ui/bigmap-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/ui/bigmap-h_REF.gc @@ -81,7 +81,7 @@ (tpage external-art-buffer) (tpage2 basic) (progress-minimap texture-page) - (progress-minimap2 basic) + (progress-minimap2 texture-page) (load-index uint32) (x0 int32) (y0 int32) @@ -104,12 +104,12 @@ (:methods (new (symbol type) _type_) (bigmap-method-9 () none) - (bigmap-method-10 () none) - (bigmap-method-11 () none) + (update (_type_) none) + (bigmap-method-11 (_type_) symbol) (bigmap-method-12 () none) (bigmap-method-13 () none) - (bigmap-method-14 () none) - (bigmap-method-15 () none) + (enable-drawing (_type_) none) + (disable-drawing (_type_) int) (bigmap-method-16 (_type_) none) (bigmap-method-17 () none) (bigmap-method-18 () none) diff --git a/test/decompiler/reference/jak3/engine/ui/hud-classes_REF.gc b/test/decompiler/reference/jak3/engine/ui/hud-classes_REF.gc new file mode 100644 index 0000000000..a5889ea55c --- /dev/null +++ b/test/decompiler/reference/jak3/engine/ui/hud-classes_REF.gc @@ -0,0 +1,1517 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 15 of type hud-map +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-map)) + (set-hud-piece-position! + (-> this sprites 1) + (the int (+ (- 512.0 (* 20.0 (-> *video-params* relative-x-scale))) (* 140.0 (-> this offset)))) + (the int (+ 281.0 (* 140.0 (-> this offset)))) + ) + (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 1)) 11 -11) + (set! (-> this sprites 0 color w) + (the int (+ 70.0 (* 70.0 (sin (* 182.04445 (the float (-> this values 1 current))))))) + ) + (set! (-> *minimap* color y) + (the int (- 96.0 (* 32.0 (sin (* 182.04445 (the float (-> this values 1 current))))))) + ) + (set! (-> *minimap* color z) + (the int (- 96.0 (* 32.0 (sin (* 182.04445 (the float (-> this values 1 current))))))) + ) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (cond + ((>= (-> *setting-control* user-current race-minimap) 1) + (set! (-> this sprites 1 scale-x) 0.0) + (set! (-> this sprites 1 scale-y) 0.0) + ) + (else + (set! (-> this sprites 1 scale-x) 0.85) + (set! (-> this sprites 1 scale-y) 0.85) + ) + ) + (let ((t9-5 (method-of-type hud draw))) + (t9-5 this) + ) + (cond + ((zero? (-> *setting-control* user-current race-minimap)) + (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-hud-alpha) + ) + (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) 2 -3) + (draw-1 *minimap* s4-0 (the-as vector4w (-> this sprites 2)) #t) + ) + ) + ((= (-> *setting-control* user-current race-minimap) 1) + 0 + ) + ((= (-> *setting-control* user-current race-minimap) 2) + (let ((s5-1 (level-get *level* 'destrack))) + (when (and s5-1 (= (-> s5-1 status) 'active)) + (set-race-texture *minimap* (get-texture map-desert-race destrack-minimap) 32768.0 s5-1) + (set-race-corner *minimap* 11321344.0 -1261568.0) + (with-dma-buffer-add-bucket ((s4-2 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-hud-alpha) + ) + (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) 0 -20) + (draw-sprite2 *minimap* s4-2 (the-as vector4w (-> this sprites 2)) #t) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 16 of type hud-map +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-map)) + (cond + ((update! *minimap*) + (logior! (-> this flags) (hud-flags show)) + (let ((t9-1 (method-of-type hud update-values!))) + (t9-1 this) + ) + ) + (else + (send-event this 'force-hide) + ) + ) + (when (not (paused?)) + (let ((v1-10 8)) + (if (and (< (-> this values 1 target) 270) (< 270 (+ (-> this values 1 target) v1-10))) + (set! (-> this values 1 target) 270) + ) + (if (or (-> *game-info* wanted-flash) (!= (-> this values 1 target) 270)) + (set! (-> this values 1 target) (mod (+ (-> this values 1 target) v1-10) 360)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 17 of type hud-map +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-map)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-lower-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-mapring-alarm-01 level-default-minimap))) + (set! (-> this sprites 0 scale-x) 0.0) + (set! (-> this sprites 0 scale-y) 0.0) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 0 pos z) #xffff00) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-mapring-01 level-default-minimap))) + (set! (-> this sprites 1 scale-x) 0.85) + (set! (-> this sprites 1 scale-y) 0.85) + (set! (-> this sprites 1 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 1 pos z) #xffff00) + (set! (-> this values 0 current) 0) + (update! *minimap*) + 0 + (none) + ) + +;; definition for method 25 of type hud-health +;; WARN: Return type mismatch int vs none. +(defmethod update-value-callback ((this hud-health) (arg0 int) (arg1 int)) + (if (and (= arg0 4) (> arg1 0)) + (sound-play "inc-pickup" :pitch 0.5) + ) + 0 + (none) + ) + +;; definition for method 15 of type hud-health +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-health)) + (set-hud-piece-position! + (-> this sprites 3) + (the int (+ (* -130.0 (-> this offset)) (* 18.0 (-> *video-params* relative-x-scale)))) + (the int (+ 305.0 (* 130.0 (-> this offset)))) + ) + (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites 3)) 21 23) + (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 3)) 20 20) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 3)) 10 64) + (set! (-> this sprites 1 scale-y) (* -0.098000005 (the float (-> this values 5 current)))) + (cond + ((nonzero? (-> this values 5 current)) + (let ((f30-1 + (the float + (+ (the int (* 127.0 (sin (* 182.04445 (the float (-> *display* game-clock frame-counter)))))) 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))) + ) + ) + (else + (set! (-> this sprites 1 color x) 128) + (set! (-> this sprites 1 color y) 128) + (set! (-> this sprites 1 color z) 128) + ) + ) + (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 3)) 40 59) + (set! (-> this sprites 2 scale-y) (* -0.096999995 (the float (-> this values 2 current)))) + (cond + ((nonzero? (-> this values 2 current)) + (let ((f0-27 + (+ 0.5 + (* 0.5 + (sin + (* 182.04445 (the float (* (if (>= (-> this values 2 current) (the int (-> *FACT-bank* darkjak-bomb-min))) + 2 + 1 + ) + (-> *display* game-clock frame-counter) + ) + ) + ) + ) + ) + ) + ) + (f1-17 (if (>= (-> this values 2 current) (the int (-> *FACT-bank* darkjak-bomb-min))) + 255.0 + 128.0 + ) + ) + ) + (set! (-> this sprites 2 color x) (the int (* 0.35 f1-17 f0-27))) + (set! (-> this sprites 2 color y) (the int (* 0.1 f1-17 f0-27))) + (set! (-> this sprites 2 color z) (the int (* 0.8 f1-17 f0-27))) + ) + ) + (else + (set! (-> this sprites 2 color x) 44) + (set! (-> this sprites 2 color y) 12) + (set! (-> this sprites 2 color z) 102) + ) + ) + (let ((s5-0 (-> this values 4 current))) + (dotimes (s4-0 s5-0) + (let ((v1-38 + (-> (new 'static 'inline-array vector 16 + (new 'static 'vector :x 23.0 :y 5.0 :w 1.0) + (new 'static 'vector :x 36.0 :y 2.0 :w 1.0) + (new 'static 'vector :x 49.0 :y 5.0 :w 1.0) + (new 'static 'vector :x 60.0 :y 12.0 :w 1.0) + (new 'static 'vector :x 67.0 :y 23.0 :w 1.0) + (new 'static 'vector :x 70.0 :y 36.0 :w 1.0) + (new 'static 'vector :x 67.0 :y 49.0 :w 1.0) + (new 'static 'vector :x 60.0 :y 60.0 :w 1.0) + (new 'static 'vector :x 49.0 :y 67.0 :w 1.0) + (new 'static 'vector :x 36.0 :y 70.0 :w 1.0) + (new 'static 'vector :x 23.0 :y 67.0 :w 1.0) + (new 'static 'vector :x 12.0 :y 60.0 :w 1.0) + (new 'static 'vector :x 5.0 :y 49.0 :w 1.0) + (new 'static 'vector :x 2.0 :y 36.0 :w 1.0) + (new 'static 'vector :x 5.0 :y 23.0 :w 1.0) + (new 'static 'vector :x 12.0 :y 12.0 :w 1.0) + ) + (logand (+ (- 20 (/ s5-0 2)) s4-0) 15) + ) + ) + ) + (set-as-offset-from! + (-> this sprites (+ s4-0 7)) + (the-as vector4w (-> this sprites 3)) + (the int (-> v1-38 x)) + (+ (the int (-> v1-38 y)) 1) + ) + ) + (if (>= s4-0 (-> this values 0 current)) + (set! (-> this sprites (+ s4-0 7) tid) + (the-as texture-id (get-texture hud-newhud-reddot-01 level-default-minimap)) + ) + (set! (-> this sprites (+ s4-0 7) tid) + (the-as texture-id (get-texture hud-newhud-greendot-01 level-default-minimap)) + ) + ) + ) + (let ((s4-1 15)) + (while (>= s4-1 s5-0) + (set-as-offset-from! (-> this sprites (+ s5-0 7)) (the-as vector4w (-> this sprites 3)) -200 0) + (+! s5-0 1) + ) + ) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-health +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-health)) + (set! (-> this values 0 target) (the int (-> *target* fact health))) + (set! (-> this values 1 target) (the-as int (-> *target* fact health-pickup-time))) + (set! (-> this values 2 target) (min 100 (the int (+ 0.5 (-> *target* game eco-pill-dark))))) + (set! (-> this values 3 target) (the-as int (-> *target* fact eco-pill-dark-pickup-time))) + (set! (-> this values 4 target) (the int (-> *target* fact health-max))) + (set! (-> this values 5 target) (min 100 (the int (+ 0.5 (-> *target* game eco-pill-light))))) + (set! (-> this values 6 target) (the-as int (-> *target* fact eco-pill-light-pickup-time))) + (if (focus-test? *target* dark) + (+! (-> this values 7 target) 1) + ) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-health +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-health)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-lower-left-1) (gui-action hidden) (-> this name) 81920.0 0) + ) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture common-white common))) + (set! (-> this sprites 0 pos z) #xfffff1) + (set! (-> this sprites 0 scale-x) 11.0) + (set! (-> this sprites 0 scale-y) 11.0) + (set! (-> this sprites 0 color x) 30) + (set! (-> this sprites 0 color y) 30) + (set! (-> this sprites 0 color z) 20) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture common-white common))) + (set! (-> this sprites 1 pos z) #xfffff2) + (set! (-> this sprites 1 scale-x) 8.0) + (set! (-> this sprites 1 scale-y) 8.0) + (set! (-> this sprites 2 tid) (the-as texture-id (get-texture common-white common))) + (set! (-> this sprites 2 pos z) #xfffff3) + (set! (-> this sprites 2 scale-x) 8.0) + (set! (-> this sprites 2 scale-y) 8.0) + (set! (-> this sprites 3 tid) (the-as texture-id (get-texture hud-newhud-01 level-default-minimap))) + (set! (-> this sprites 4 tid) (the-as texture-id (get-texture hud-newhud-shine-01 level-default-minimap))) + (set! (-> this sprites 4 scale-x) 1.3) + (dotimes (s5-0 16) + (set! (-> this sprites (+ s5-0 7) tid) + (the-as texture-id (get-texture hud-newhud-greendot-01 level-default-minimap)) + ) + ) + (logior! (-> this values 2 flags) 1) + (set! (-> this values 2 inc-time) (the-as uint 3)) + (set! (-> this values 2 inc-unit) (the-as uint 1)) + (logior! (-> this values 5 flags) 1) + (set! (-> this values 5 inc-time) (the-as uint 3)) + (set! (-> this values 5 inc-unit) (the-as uint 1)) + (logior! (-> this values 4 flags) 1) + (set! (-> this values 4 inc-time) (the-as uint 300)) + (set! (-> this values 4 inc-unit) (the-as uint 1)) + 0 + (none) + ) + +;; definition for symbol *hud-skullgem*, type (pointer hud-skullgem) +(define *hud-skullgem* (the-as (pointer hud-skullgem) #f)) + +;; definition for method 15 of type hud-skullgem +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-skullgem)) + (set-hud-piece-position! + (the-as hud-sprite (-> this icons 0 pos)) + (the int (+ (* -130.0 (-> this offset)) (* 60.0 (-> *video-params* relative-x-scale)))) + 150 + ) + (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (-> this icons 0 pos) -28 20) + (set! (-> this sprites 0 scale-x) 0.86) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this icons 0 pos) 0 45) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-skullgem +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-skullgem)) + (set! (-> this values 0 target) (the int (-> *target* game gem))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-skullgem +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-skullgem)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-center-left) (gui-action hidden) (-> this name) 81920.0 0) + ) + (hud-create-icon this 0 (the-as int (art-group-get-by-name *level* "skel-gem" (the-as (pointer level) #f)))) + (set! (-> this icons 0 scale-x) 0.025) + (set! (-> this icons 0 scale-y) 0.035) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-egg-glow level-default-minimap))) + (set! (-> this sprites 0 scale-x) 0.86) + (set! (-> this sprites 0 scale-y) 1.05) + (set! (-> this sprites 0 pos z) #xfff9ff) + (logior! (-> this values 0 flags) 11) + (set! (-> this values 0 inc-time) (the-as uint 45)) + (set! (-> this values 0 inc-unit) (the-as uint 1)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + (set! (-> this strings 0 scale) 0.5) + 0 + (none) + ) + +;; definition for method 25 of type hud-skullgem +;; WARN: Return type mismatch int vs none. +(defmethod update-value-callback ((this hud-skullgem) (arg0 int) (arg1 int)) + (let ((v1-3 (- (-> this values arg0 target) (-> this values arg0 current)))) + (cond + ((< 20 v1-3) + (set! (-> this values arg0 current) (-> this values arg0 target)) + ) + ((> v1-3 0) + (sound-play "inc-pickup" :pitch 0.5) + ) + (else + (sound-play "gem-spawn" :vol 80 :pitch 0.4) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 15 of type hud-skill +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-skill)) + (set-hud-piece-position! + (the-as hud-sprite (-> this icons 0 pos)) + (the int (+ (* -130.0 (-> this offset)) (* 60.0 (-> *video-params* relative-x-scale)))) + 270 + ) + (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (-> this icons 0 pos) -20 -39) + (set! (-> this sprites 0 scale-x) 0.62) + (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current)) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (-> this icons 0 pos) 0 -5) + (when (not (paused?)) + (let ((s5-1 (new 'stack-no-clear 'quaternion))) + (quaternion-axis-angle! s5-1 0.0 1.0 0.0 364.0889) + (quaternion*! (-> this icons 0 icon 0 root quat) s5-1 (-> this icons 0 icon 0 root quat)) + ) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-skill +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-skill)) + (set! (-> this values 0 target) (the int (-> *target* game skill))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-skill +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-skill)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-middle-left) (gui-action hidden) (-> this name) 81920.0 0) + ) + (hud-create-icon this 0 (the-as int (art-group-get-by-name *level* "skel-skill" (the-as (pointer level) #f)))) + (set! (-> this icons 0 scale-x) 0.009) + (set! (-> this icons 0 scale-y) -0.018) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-egg-glow level-default-minimap))) + (set! (-> this sprites 0 scale-x) 0.62) + (set! (-> this sprites 0 scale-y) 1.34) + (set! (-> this sprites 0 pos z) #xfff9ff) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + (set! (-> this strings 0 scale) 0.5) + (logior! (-> this values 0 flags) 9) + (set! (-> this values 0 inc-time) (the-as uint 45)) + (set! (-> this values 0 inc-unit) (the-as uint 1)) + 0 + (none) + ) + +;; definition for method 25 of type hud-skill +;; WARN: Return type mismatch int vs none. +(defmethod update-value-callback ((this hud-skill) (arg0 int) (arg1 int)) + (if (> arg1 0) + (sound-play "inc-pickup" :pitch 0.5) + ) + 0 + (none) + ) + +;; definition for method 15 of type hud-score +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-score)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ (- 512.0 (* 32.0 (-> *video-params* relative-x-scale))) (* 130.0 (-> this offset)))) + 140 + ) + (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)) -12 8) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-score +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-score)) + (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-score +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-score)) + (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 hsf2)) + (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 for method 15 of type hud-timer +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-timer)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (+ (the int (* 8.0 (-> *video-params* relative-x-scale))) 256) + (the int (+ 50.0 (* -100.0 (-> this offset)))) + ) + (format (clear (-> this strings 0 text)) "~1,'0D" (/ (-> this values 0 current) 10)) + (format (clear (-> this strings 1 text)) "~1,'0D" (mod (-> this values 0 current) 10)) + (format (clear (-> this strings 2 text)) ":") + (format (clear (-> this strings 3 text)) "~1,'0D" (/ (-> this values 1 current) 10)) + (format (clear (-> this strings 4 text)) "~1,'0D" (mod (-> this values 1 current) 10)) + (let ((s5-5 20) + (s4-0 -42) + ) + (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) s4-0 -24) + (let ((s4-1 (+ s4-0 s5-5))) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) s4-1 -24) + (let ((s4-2 (+ s4-1 16))) + (set-as-offset-from! (the-as hud-sprite (-> this strings 2 pos)) (the-as vector4w (-> this sprites)) s4-2 -24) + (let ((s4-3 (+ s4-2 16))) + (set-as-offset-from! (the-as hud-sprite (-> this strings 3 pos)) (the-as vector4w (-> this sprites)) s4-3 -24) + (let ((a2-13 (+ s4-3 s5-5))) + (set-as-offset-from! + (the-as hud-sprite (-> this strings 4 pos)) + (the-as vector4w (-> this sprites)) + a2-13 + -24 + ) + ) + ) + ) + ) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 18 of type hud-timer +;; WARN: Return type mismatch uint vs object. +(defmethod event-callback ((this hud-timer) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('alert) + (let ((v0-0 (-> arg3 param 0))) + (set! (-> this values 3 target) (the-as int v0-0)) + v0-0 + ) + ) + ) + ) + +;; definition for method 16 of type hud-timer +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-timer)) + (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) + (if (and (< (-> this values 0 target) 1) + (< (-> this values 1 target) (the-as int (-> *setting-control* user-current timer-warn-seconds))) + ) + (sound-play "timer-warn") + (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 +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-timer)) + (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 (get-texture hud-timerboard-01 level-default-minimap))) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 0 scale-x) 2.2) + (set! (-> this sprites 0 scale-y) 2.0) + (dotimes (s5-0 5) + (alloc-string-if-needed this s5-0) + (set! (-> this strings s5-0 scale) 0.8) + (set! (-> this strings s5-0 flags) (font-flags kerning middle large)) + (set! (-> this strings s5-0 color) (font-color green)) + ) + (set! (-> this values 2 target) (-> this values 1 target)) + (set! (-> this values 3 target) 0) + 0 + (none) + ) + +;; definition for method 15 of type hud-big-score +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-big-score)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (+ (the int (* 8.0 (-> *video-params* relative-x-scale))) 256) + (the int (+ 50.0 (* -100.0 (-> this offset)))) + ) + (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)) -7 -24) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-big-score +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-big-score)) + (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-big-score +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-big-score)) + (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 (get-texture hud-timerboard-01 level-default-minimap))) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 0 scale-x) 2.7) + (set! (-> this sprites 0 scale-y) 2.0) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 scale) 0.8) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + (set! (-> this strings 0 color) (font-color green)) + 0 + (none) + ) + +;; definition for method 15 of type hud-goal +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-goal)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ (* -130.0 (-> this offset)) (* 65.0 (-> *video-params* relative-x-scale)))) + 70 + ) + (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)) -40 -40) + (let ((v1-4 (-> *setting-control* user-default language))) + (set! (-> this strings 1 scale) (cond + ((= v1-4 (language-enum korean)) + 0.75 + ) + ((= v1-4 (language-enum russian)) + 0.75 + ) + (else + 0.65 + ) + ) + ) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-goal +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-goal)) + (set! (-> this values 0 target) (the int (-> *game-info* goal))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-goal +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-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.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.65) + (set! (-> this strings 1 flags) (font-flags kerning 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-0136) #f)) + (s5-0 gp-1 s4-0 *temp-string*) + ) + 0 + (none) + ) + +;; definition for method 15 of type hud-miss +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-miss)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 448.0 (* 130.0 (-> this offset)))) + 70 + ) + (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)) 0 -8) + (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 40 -40) + (let ((v1-3 (-> *setting-control* user-default language))) + (set! (-> this strings 1 scale) (cond + ((= v1-3 (language-enum korean)) + 0.75 + ) + ((= v1-3 (language-enum russian)) + 0.75 + ) + (else + 0.65 + ) + ) + ) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-miss +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-miss)) + (set! (-> this values 0 target) (the int (-> *game-info* miss))) + (set! (-> this values 1 target) (the int (-> *game-info* miss-max))) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-miss +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-miss)) + (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 1) + (set! (-> this strings 1 scale) 0.65) + (set! (-> this strings 1 flags) (font-flags kerning right 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-0546) #f)) + (s5-0 gp-1 s4-0 *temp-string*) + ) + 0 + (none) + ) + +;; definition for method 15 of type hud-progress +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-progress)) + (with-pp + (let ((f0-0 (if (process-by-name "hud-timer" *active-pool*) + 65.0 + 35.0 + ) + ) + ) + (seek! (-> this sprites 2 scale-y) f0-0 (* 2.0 (-> pp clock time-adjust-ratio))) + ) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + 256 + (the int (+ (* -100.0 (-> this offset)) (-> this sprites 2 scale-y))) + ) + (set-as-offset-from! + (-> this sprites 1) + (the-as vector4w (-> this sprites)) + (+ (the int (* 0.09 (the float (-> this values 0 current)))) -42) + 0 + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + ) + +;; definition for method 16 of type hud-progress +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-progress)) + (set! (-> this values 0 target) (the int (* 1000.0 (-> *game-info* distance)))) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-progress +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-progress)) + (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 (lookup-texture-by-id (new 'static 'texture-id)))) + (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 (lookup-texture-by-id (new 'static 'texture-id)))) + (set! (-> this sprites 1 flags) (hud-sprite-flags hsf3)) + (set! (-> this sprites 1 scale-x) 1.8) + (set! (-> this sprites 1 scale-y) 1.8) + (set! (-> this sprites 2 scale-y) (if (process-by-name "hud-timer" *active-pool*) + 65.0 + 35.0 + ) + ) + 0 + (none) + ) + +;; definition for method 11 of type hud-sprite +;; WARN: Return type mismatch int vs none. +(defmethod hud-sprite-method-11 ((this hud-sprite) (arg0 hud-sprite) (arg1 vector4w) (arg2 int) (arg3 int)) + (set! (-> this tid) (the-as texture-id (lookup-texture-by-id (-> arg0 tid)))) + (set! (-> this scale-x) (-> arg0 scale-x)) + (set! (-> this scale-y) (-> arg0 scale-y)) + (set-as-offset-from! + (the-as hud-sprite (-> this pos)) + arg1 + (+ arg2 (the int (-> arg0 offset-x))) + (+ arg3 (the int (-> arg0 offset-y))) + ) + 0 + (none) + ) + +;; definition for symbol *gun-arrow-table*, type (inline-array hud-sprite) +(define *gun-arrow-table* (new 'static 'inline-array hud-sprite 24 + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1056964608 :y -1047003136) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x5 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1056964608 :y -1047003136) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x36 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1056964608 :y -1044381696) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x4d :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1056964608 :y -1044381696) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x4e :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1053818880 :y -1040187392) + :scale-x 1.21 + :scale-y 1.21 + :tid (new 'static 'texture-id :index #x4d :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1053818880 :y -1040187392) + :scale-x 1.21 + :scale-y 1.21 + :tid (new 'static 'texture-id :index #x4e :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1056964608 :y #x41980000) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x2 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1056964608 :y #x41980000) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x33 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1056964608 :y #x41c00000) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x47 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1056964608 :y #x41c00000) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x48 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1053818880 :y #x41e80000) + :scale-x 1.21 + :scale-y 1.21 + :tid (new 'static 'texture-id :index #x47 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1053818880 :y #x41e80000) + :scale-x 1.21 + :scale-y 1.21 + :tid (new 'static 'texture-id :index #x48 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1047003136 :y -1056964608) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x3 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1047003136 :y -1056964608) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x34 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1044381696 :y -1056964608) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x49 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1044381696 :y -1056964608) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x4a :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1040187392 :y -1053818880) + :scale-x 1.21 + :scale-y 1.21 + :tid (new 'static 'texture-id :index #x49 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x -1040187392 :y -1053818880) + :scale-x 1.21 + :scale-y 1.21 + :tid (new 'static 'texture-id :index #x4a :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x #x41980000 :y -1056964608) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x4 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x #x41980000 :y -1056964608) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x35 :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x #x41c00000 :y -1056964608) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x4b :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x #x41c00000 :y -1056964608) + :scale-x 1.0 + :scale-y 1.0 + :tid (new 'static 'texture-id :index #x4c :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x #x41e80000 :y -1053818880) + :scale-x 1.21 + :scale-y 1.21 + :tid (new 'static 'texture-id :index #x4b :page #x9) + ) + (new 'static 'hud-sprite + :pos (new 'static 'vector4w :x #x41e80000 :y -1053818880) + :scale-x 1.21 + :scale-y 1.21 + :tid (new 'static 'texture-id :index #x4c :page #x9) + ) + ) + ) + +;; definition for method 15 of type hud-gun +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-gun)) + (local-vars + (sv-32 int) + (sv-40 int) + (sv-48 int) + (sv-56 int) + (sv-64 hud-sprite) + (sv-72 int) + (sv-80 int) + (sv-88 int) + (sv-96 int) + (sv-104 int) + (sv-112 int) + ) + (set! sv-32 0) + (set! sv-40 0) + (set! sv-48 0) + (set! sv-56 0) + (set! sv-64 (new 'stack-no-clear 'hud-sprite)) + (set! sv-72 (the int (get-max-ammo-for-gun *game-info* (the-as pickup-type (-> this values 0 current))))) + (set! sv-80 20) + (set! sv-88 -1) + (set! sv-96 -1) + (set! sv-104 -1) + (set! sv-112 -1) + (case (gun->eco (the-as pickup-type (-> this values 0 current))) + (((pickup-type eco-yellow)) + (let ((v1-10 (-> this sprites 15 color-ptr))) + (set! (-> v1-10 0) 128) + (set! (-> v1-10 1) 128) + (set! (-> v1-10 2) 96) + (set! (-> v1-10 3) 128) + ) + (set! sv-96 (+ (-> this values 0 current) -29)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-gunyellow-common-01 level-default-minimap))) + (set! (-> this sprites 14 tid) + (the-as texture-id (get-texture hud-gun-yellow-shell-01 level-default-minimap)) + ) + (set! (-> this sprites 0 scale-x) 1.8) + (set! (-> this sprites 0 scale-y) 1.8) + (set! (-> this sprites 1 scale-x) 1.8) + (set! (-> this sprites 1 scale-y) 1.8) + (set! sv-32 10) + (set! sv-40 7) + ) + (((pickup-type eco-dark)) + (let ((v1-19 (-> this sprites 15 color-ptr))) + (set! (-> v1-19 0) 128) + (set! (-> v1-19 1) 96) + (set! (-> v1-19 2) 128) + (set! (-> v1-19 3) 128) + ) + (set! sv-112 (+ (-> this values 0 current) -35)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-gunpurple-common-01 level-default-minimap))) + (set! (-> this sprites 14 tid) + (the-as texture-id (get-texture hud-gun-purple-shell-01 level-default-minimap)) + ) + (set! (-> this sprites 0 scale-x) 1.6) + (set! (-> this sprites 0 scale-y) 1.6) + (set! (-> this sprites 1 scale-x) 1.6) + (set! (-> this sprites 1 scale-y) 1.6) + (set! sv-32 23) + (set! sv-80 10) + ) + (((pickup-type eco-blue)) + (let ((v1-28 (-> this sprites 15 color-ptr))) + (set! (-> v1-28 0) 96) + (set! (-> v1-28 1) 128) + (set! (-> v1-28 2) 128) + (set! (-> v1-28 3) 128) + ) + (set! sv-104 (+ (-> this values 0 current) -32)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-gunblue-common-01 level-default-minimap))) + (set! (-> this sprites 14 tid) (the-as texture-id (get-texture hud-gun-blue-shell-01 level-default-minimap))) + (set! (-> this sprites 0 scale-x) 1.7) + (set! (-> this sprites 0 scale-y) 1.7) + (set! (-> this sprites 1 scale-x) 1.7) + (set! (-> this sprites 1 scale-y) 1.7) + (set! sv-32 6) + (set! sv-40 13) + ) + (else + (let ((v1-37 (-> this sprites 15 color-ptr))) + (set! (-> v1-37 0) 128) + (set! (-> v1-37 1) 64) + (set! (-> v1-37 2) 64) + (set! (-> v1-37 3) 128) + ) + (set! sv-88 (+ (-> this values 0 current) -26)) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-gunred-common-01 level-default-minimap))) + (set! (-> this sprites 14 tid) (the-as texture-id (get-texture hud-gun-red-shell-01 level-default-minimap))) + (set! (-> this sprites 0 scale-x) 1.6) + (set! (-> this sprites 0 scale-y) 1.6) + (set! (-> this sprites 1 scale-x) 1.6) + (set! (-> this sprites 1 scale-y) 1.6) + (set! sv-32 23) + (set! sv-40 -2) + (set! sv-80 20) + ) + ) + (case (-> this values 0 current) + ((26) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunred-01a level-default-minimap))) + (set! sv-48 -102) + ) + ((27) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunred-02a level-default-minimap))) + (set! sv-48 -153) + ) + ((28) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunred-03a level-default-minimap))) + (set! sv-48 -153) + ) + ((29) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunyellow-01a level-default-minimap))) + (set! sv-48 -172) + ) + ((30) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunyellow-02a level-default-minimap))) + (set! sv-48 -172) + ) + ((31) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture hud-gunyellow-03b level-default-minimap))) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunyellow-03a level-default-minimap))) + (set! sv-48 -172) + ) + ((32) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunblue-01a level-default-minimap))) + (set! sv-48 -135) + ) + ((33) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunblue-02a level-default-minimap))) + (set! sv-48 -162) + (set! sv-56 -49) + ) + ((34) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunblue-03a level-default-minimap))) + (set! sv-48 -162) + (set! sv-56 -49) + ) + ((35) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunpurple-01a level-default-minimap))) + (set! sv-48 -153) + ) + ((36) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunpurple-02a level-default-minimap))) + (set! sv-48 -153) + ) + ((37) + (set! (-> this sprites 1 tid) (the-as texture-id (get-texture hud-gunpurple-03a level-default-minimap))) + (set! sv-48 -153) + ) + ) + (set-hud-piece-position! + sv-64 + (- (the int (+ 507.0 (* 130.0 (-> this offset)))) (the int (* 80.0 (-> *video-params* relative-x-scale)))) + (the int (+ 40.0 (* -100.0 (-> this offset)))) + ) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (- (the int (+ 507.0 (* 130.0 (-> this offset)))) + (the int (* (the float sv-32) (-> *video-params* relative-x-scale))) + ) + (the int (+ (- 25.0 (the float sv-40)) (* -100.0 (-> this offset)))) + ) + (let ((f30-0 1.0)) + (cond + ((zero? (-> this values 0 current)) + (set! f30-0 0.0) + (set! (-> this strings 0 pos x) 0) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -3 0) + ) + (else + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) sv-48 sv-56) + (set-as-offset-from! + (the-as hud-sprite (-> this strings 0 pos)) + (the-as vector4w (-> this sprites)) + (+ sv-32 -70) + (+ sv-40 61) + ) + (set-as-offset-from! + (-> this sprites 14) + (the-as vector4w (-> this sprites)) + (+ sv-32 -68) + (+ (if (= sv-80 20) + 122 + 97 + ) + sv-40 + ) + ) + (set! (-> this sprites 14 scale-x) 1.0) + (let ((s5-0 (the int (+ 0.1 (* (the float sv-80) (/ (the float (-> this values 1 current)) (the float sv-72))))))) + (if (and (zero? s5-0) (nonzero? (-> this values 1 current))) + (set! s5-0 1) + ) + (when (not (-> *setting-control* user-current gun-special-mode)) + (with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-hud-alpha) + ) + (dotimes (s2-0 sv-80) + (if (= s2-0 s5-0) + (set! (-> this sprites 14 tid) (the-as texture-id (get-texture hud-gun-empty-shell-01 level-default-minimap))) + ) + (draw (-> this sprites 14) s3-0 (-> this level) #f) + (+! (-> this sprites 14 pos y) -5) + (if (= s2-0 (+ (/ sv-80 2) -1)) + (set-as-offset-from! + (-> this sprites 14) + (the-as vector4w (-> this sprites)) + (+ sv-32 -83) + (+ (if (= sv-80 20) + 122 + 97 + ) + sv-40 + ) + ) + ) + ) + ) + ) + ) + ) + ) + (set! (-> this sprites 14 scale-x) 0.0) + (set-as-offset-from! (-> this sprites 15) (the-as vector4w sv-64) -4 -4) + (dotimes (v1-125 12) + (set! (-> this sprites (+ v1-125 2) scale-x) 0.0) + ) + (let ((s5-1 + (+ (if (and (logtest? (-> *target* game features) (game-feature gun)) + (and (-> *setting-control* user-current gun) + (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-red-1)) + (-> *target* game features) + ) + ) + ) + 1 + 0 + ) + (if (and (logtest? (-> *target* game features) (game-feature gun)) + (and (-> *setting-control* user-current gun) + (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-red-2)) + (-> *target* game features) + ) + ) + ) + 1 + 0 + ) + (if (and (logtest? (-> *target* game features) (game-feature gun)) + (and (-> *setting-control* user-current gun) + (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-red-3)) + (-> *target* game features) + ) + ) + ) + 1 + 0 + ) + ) + ) + ) + (dotimes (s4-1 s5-1) + (let ((s3-1 (- 10 s4-1))) + (hud-sprite-method-11 + (-> this sprites s3-1) + (if (>= sv-88 s4-1) + (-> *gun-arrow-table* (+ (* s4-1 2) 1)) + (-> *gun-arrow-table* (* s4-1 2)) + ) + (the-as vector4w sv-64) + 0 + 0 + ) + (if (= f30-0 0.0) + (set! (-> this sprites s3-1 scale-x) f30-0) + ) + ) + ) + ) + (let ((s5-2 + (+ (if (and (logtest? (-> *target* game features) (game-feature gun)) + (-> *setting-control* user-current gun) + (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-yellow-1)) + (-> *target* game features) + ) + ) + 1 + 0 + ) + (if (and (logtest? (-> *target* game features) (game-feature gun)) + (and (-> *setting-control* user-current gun) + (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-yellow-2)) + (-> *target* game features) + ) + ) + ) + 1 + 0 + ) + (if (and (logtest? (-> *target* game features) (game-feature gun)) + (and (-> *setting-control* user-current gun) + (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-yellow-3)) + (-> *target* game features) + ) + ) + ) + 1 + 0 + ) + ) + ) + ) + (dotimes (s4-2 s5-2) + (let ((s3-2 (- 13 s4-2))) + (hud-sprite-method-11 + (-> this sprites s3-2) + (if (>= sv-96 s4-2) + (-> *gun-arrow-table* (+ (* s4-2 2) 7)) + (-> *gun-arrow-table* (+ (* s4-2 2) 6)) + ) + (the-as vector4w sv-64) + 0 + 0 + ) + (if (= f30-0 0.0) + (set! (-> this sprites s3-2 scale-x) f30-0) + ) + ) + ) + ) + (let ((s5-3 + (+ (if (and (logtest? (-> *target* game features) (game-feature gun)) + (-> *setting-control* user-current gun) + (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-blue-1)) + (-> *target* game features) + ) + ) + 1 + 0 + ) + (if (and (logtest? (-> *target* game features) (game-feature gun)) + (and (-> *setting-control* user-current gun) + (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-blue-2)) + (-> *target* game features) + ) + ) + ) + 1 + 0 + ) + (if (and (logtest? (-> *target* game features) (game-feature gun)) + (and (-> *setting-control* user-current gun) + (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-blue-3)) + (-> *target* game features) + ) + ) + ) + 1 + 0 + ) + ) + ) + ) + (dotimes (s4-3 s5-3) + (let ((s3-3 (- 4 s4-3))) + (hud-sprite-method-11 + (-> this sprites s3-3) + (if (>= sv-104 s4-3) + (-> *gun-arrow-table* (+ (* s4-3 2) 13)) + (-> *gun-arrow-table* (+ (* s4-3 2) 12)) + ) + (the-as vector4w sv-64) + 0 + 0 + ) + (if (= f30-0 0.0) + (set! (-> this sprites s3-3 scale-x) f30-0) + ) + ) + ) + ) + (let ((s5-4 + (+ (if (and (logtest? (-> *target* game features) (game-feature gun)) + (-> *setting-control* user-current gun) + (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-dark-1)) + (-> *target* game features) + ) + ) + 1 + 0 + ) + (if (and (logtest? (-> *target* game features) (game-feature gun)) + (and (-> *setting-control* user-current gun) + (logtest? (logand (game-feature gun-dark-2) (-> *setting-control* user-current features)) + (-> *target* game features) + ) + ) + ) + 1 + 0 + ) + (if (and (logtest? (-> *target* game features) (game-feature gun)) + (and (-> *setting-control* user-current gun) + (logtest? (logand (game-feature gun-dark-3) (-> *setting-control* user-current features)) + (-> *target* game features) + ) + ) + ) + 1 + 0 + ) + ) + ) + ) + (dotimes (s4-4 s5-4) + (let ((s3-4 (- 7 s4-4))) + (hud-sprite-method-11 + (-> this sprites s3-4) + (if (>= sv-112 s4-4) + (-> *gun-arrow-table* (+ (* s4-4 2) 19)) + (-> *gun-arrow-table* (+ (* s4-4 2) 18)) + ) + (the-as vector4w sv-64) + 0 + 0 + ) + (if (= f30-0 0.0) + (set! (-> this sprites s3-4 scale-x) f30-0) + ) + ) + ) + ) + ) + (format (clear (-> this strings 0 text)) "~D/~D" (-> this values 1 current) sv-72) + (if (and *target* + (nonzero? (-> *target* gun)) + (< (-> this values 1 current) (the int (-> *target* gun ammo-required))) + ) + (set! (-> this strings 0 color) (font-color red)) + (set! (-> this strings 0 color) (font-color white)) + ) + (if (and (-> *setting-control* user-current gun-special-mode) (= (-> this values 0 current) 29)) + (clear (-> this strings 0 text)) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-gun +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-gun)) + (cond + ((focus-test? *target* gun) + (let ((v1-2 (-> this values 0 target))) + (set! (-> this values 0 target) (the-as int (-> *target* gun using-gun-type))) + (if (!= v1-2 (-> this values 0 target)) + (sound-play "gun-switch") + ) + ) + (set! (-> this values 1 target) + (the int (-> *target* game gun-ammo (+ (gun->ammo (-> *target* gun using-gun-type)) -15))) + ) + (logclear! (-> this flags) (hud-flags disable)) + (logior! (-> this flags) (hud-flags show)) + ) + (else + (logior! (-> this flags) (hud-flags disable)) + (logclear! (-> this flags) (hud-flags show)) + (send-event this 'hide) + ) + ) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-gun +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-gun)) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-upper-right) (gui-action hidden) (-> this name) 81920.0 0) + ) + (set! (-> this sprites 0 flags) (hud-sprite-flags hsf2)) + (alloc-string-if-needed this 0) + (set! (-> this strings 0 flags) (font-flags kerning middle large)) + (set! (-> this strings 0 scale) 0.4) + (set! (-> this sprites 15 tid) (the-as texture-id (get-texture hud-gun-reticle level-default-minimap))) + (set! (-> this sprites 15 scale-x) 1.0) + (set! (-> this sprites 15 scale-y) 1.0) + (logior! (-> this flags) (hud-flags disable)) + 0 + (none) + ) + +;; definition for function activate-hud +;; WARN: Return type mismatch int vs none. +(defun activate-hud ((arg0 target)) + (process-spawn hud-health :init hud-init-by-other :name "hud-health" :to arg0) + (process-spawn hud-map :init hud-init-by-other :name "hud-map" :to arg0) + (set! *hud-skullgem* (process-spawn hud-skullgem :init hud-init-by-other :name "hud-skullgem" :to arg0)) + (process-spawn hud-skill :init hud-init-by-other :name "hud-skill" :to arg0) + (process-spawn hud-gun :init hud-init-by-other :name "hud-gun" :to arg0) + 0 + (none) + ) 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 c187b421c0..497847171c 100644 --- a/test/decompiler/reference/jak3/engine/ui/hud-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/ui/hud-h_REF.gc @@ -30,21 +30,22 @@ ;; definition of type hud-sprite (deftype hud-sprite (structure) - ((pos vector4w :inline) - (offset-x float :overlay-at (-> pos data 0)) - (offset-y float :overlay-at (-> pos data 1)) - (color vector4w :inline) - (flags uint32) - (scale-x float) - (scale-y float) - (angle float) - (tex texture) - (tid uint32 :overlay-at tex) + ((pos vector4w :inline) + (offset-x float :overlay-at (-> pos data 0)) + (offset-y float :overlay-at (-> pos data 1)) + (color vector4w :inline) + (color-ptr int32 4 :overlay-at (-> color data 0)) + (flags hud-sprite-flags) + (scale-x float) + (scale-y float) + (angle float) + (tex texture) + (tid texture-id :overlay-at tex) ) (:methods - (draw (_type_ dma-buffer level) none) - (hud-sprite-method-10 () none) - (hud-sprite-method-11 () none) + (draw (_type_ dma-buffer level symbol) none) + (hud-sprite-method-10 (_type_ dma-buffer level int int int int) object) + (hud-sprite-method-11 (_type_ hud-sprite vector4w int int) none) ) ) @@ -58,13 +59,13 @@ (format #t "~1Tpos: #~%" (-> this pos)) (format #t "~1Toffset-x: ~f~%" (-> this offset-x)) (format #t "~1Toffset-y: ~f~%" (-> this offset-y)) - (format #t "~1Tcolor: #~%" (-> this color)) + (format #t "~1Tcolor: #~%" (-> this color-ptr)) (format #t "~1Tflags: ~D~%" (-> this flags)) (format #t "~1Tscale-x: ~f~%" (-> this scale-x)) (format #t "~1Tscale-y: ~f~%" (-> this scale-y)) (format #t "~1Tangle: ~f~%" (-> this angle)) - (format #t "~1Ttex: ~A~%" (-> this tex)) - (format #t "~1Ttid: ~D~%" (-> this tex)) + (format #t "~1Ttex: ~A~%" (-> this tid)) + (format #t "~1Ttid: ~D~%" (-> this tid)) (label cfg-4) this ) @@ -77,11 +78,11 @@ (color vector4w :inline) ) (:methods - (hud-box-method-9 () none) - (hud-box-method-10 () none) - (hud-box-method-11 () none) - (hud-box-method-12 () none) - (hud-box-method-13 () none) + (draw-box-prim-only (_type_ dma-buffer) none) + (draw-box-alpha-1 (_type_ dma-buffer) none) + (draw-box-alpha-2 (_type_ dma-buffer) none) + (draw-box-alpha-3 (_type_ dma-buffer) none) + (draw-scan-and-line (_type_ dma-buffer float) int) ) ) @@ -167,25 +168,25 @@ (gui-id sound-id) ) (:methods - (hud-method-14 () none) - (hud-method-15 () none) - (hud-method-16 () none) - (hud-method-17 () none) - (hud-method-18 () none) - (hud-method-19 () none) - (hud-method-20 () none) - (hud-method-21 () none) - (hud-method-22 () none) - (hud-method-23 () none) - (hud-method-24 () none) - (hud-method-25 () none) - (hud-method-26 () none) + (hidden? (_type_) object) + (draw (_type_) none) + (update-values! (_type_) none) + (init-callback (_type_) none) + (event-callback (_type_ process int symbol event-message-block) object) + (hud-method-19 (_type_) none) + (hud-method-20 (_type_) none) + (hud-method-21 (_type_) none) + (hud-method-22 (_type_) none) + (hud-method-23 (_type_) none) + (check-ready-and-maybe-show (_type_ symbol) symbol) + (update-value-callback (_type_ int int) none) + (alloc-string-if-needed (_type_ int) none) ) (:states hud-arriving hud-hidden hud-in - hud-leaving + (hud-leaving float) ) ) @@ -717,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/hud_REF.gc b/test/decompiler/reference/jak3/engine/ui/hud_REF.gc new file mode 100644 index 0000000000..bcc5349ac5 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/ui/hud_REF.gc @@ -0,0 +1,1439 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 24 of type hud +(defmethod check-ready-and-maybe-show ((this hud) (arg0 symbol)) + (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) + (scanline uint32) + ) + ) + +;; 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) + ) + :gif (new 'static 'array uint64 2 #x1000000000008005 #xe) + ) + :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) + ) + :gif (new 'static 'array uint64 2 #x502b400000008001 #x52521) + ) + :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) + ) + :gif (new 'static 'array uint64 2 #xc02a400000008001 #x521521521521) + ) + :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) + ) + :gif (new 'static 'array uint64 2 #x6021400000008001 #x555551) + ) + :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) + ) + :gif (new 'static 'array uint64 2 #x5022400000008001 #x55551) + ) + :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) + ) + :gif (new 'static 'array uint64 2 #x5022400000008001 #x55551) + ) + :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) + ) + :gif (new 'static 'array uint64 2 #x2020c00000008002 #x5555) + ) + :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) + ) + :gif (new 'static 'array uint64 2 #x5020c00000008020 #x55551) + ) + :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 :x 1 :y 1) + (new 'static 'vector4w :x 2 :y 1 :z 1) + (new 'static 'vector4w :x 3 :y 2 :z 1) + (new 'static 'vector4w :x 6 :y 4 :z 2) + (new 'static 'vector4w :x 8 :y 6 :z 2) + (new 'static 'vector4w :x 12 :y 10 :z 4) + (new 'static 'vector4w :x 12 :y 10 :z 4) + (new 'static 'vector4w :x 12 :y 10 :z 4) + (new 'static 'vector4w :x 16 :y 14 :z 6) + (new 'static 'vector4w :x 16 :y 14 :z 6) + (new 'static 'vector4w :x 16 :y 14 :z 6) + (new 'static 'vector4w :x 16 :y 14 :z 6) + (new 'static 'vector4w :x 22 :y 20 :z 10) + (new 'static 'vector4w :x 22 :y 20 :z 10) + (new 'static 'vector4w :x 22 :y 20 :z 10) + (new 'static 'vector4w :x 22 :y 20 :z 10) + (new 'static 'vector4w :x 28 :y 26 :z 12) + (new 'static 'vector4w :x 28 :y 26 :z 12) + (new 'static 'vector4w :x 28 :y 26 :z 12) + (new 'static 'vector4w :x 28 :y 26 :z 12) + (new 'static 'vector4w :x 40 :y 34 :z 18) + (new 'static 'vector4w :x 40 :y 34 :z 18) + (new 'static 'vector4w :x 40 :y 34 :z 18) + (new 'static 'vector4w :x 40 :y 34 :z 18) + (new 'static 'vector4w :x 54 :y 42 :z 26) + (new 'static 'vector4w :x 54 :y 42 :z 26) + (new 'static 'vector4w :x 54 :y 42 :z 26) + (new 'static 'vector4w :x 54 :y 42 :z 26) + (new 'static 'vector4w :x 72 :y 48 :z 34) + (new 'static 'vector4w :x 72 :y 48 :z 34) + (new 'static 'vector4w :x 90 :y 56 :z 44) + (new 'static 'vector4w :x #x7e :y 64 :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*)) + (set! (-> v1-0 line-color a) (the int (* 3.0 arg1))) + (let ((a2-1 (the int (* 64.0 arg1)))) + (dotimes (a3-4 15) + (set! (-> v1-0 scan-colors a3-4 w) a2-1) + ) + ) + (let* ((a2-6 (* (+ (the int (-> this box min x)) 1792) 16)) + (a3-7 (* (+ (the int (-> this box max x)) 1792) 16)) + (t0-9 (* (+ (the int (-> this box min y)) 1840) 16)) + (t2-0 (the int (- (-> this box max y) (-> this box 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 (inline-array vector4w) (-> arg0 base)))) + (set! (-> t3-6 0 quad) (-> v1-0 scan-tmpl dma-vif quad)) + (set! (-> t3-6 1 quad) (-> v1-0 scan-tmpl quad 1)) + ) + (&+! (-> arg0 base) 32) + (let ((a0-2 (+ (the int (-> this box min y)) 1840))) + (dotimes (t3-9 32) + (let ((t4-8 (the-as object (-> 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! (-> (the-as (pointer uint128) t4-8)) (-> v1-0 scan-colors t3-9 quad)) + (let ((t7-4 (the-as (inline-array vector4w) (-> (the-as (inline-array vector4w) t4-8) 1)))) + (set! (-> t7-4 0 x) a2-6) + (set! (-> t7-4 0 y) t5-13) + (set! (-> t7-4 0 z) 0) + (set! (-> t7-4 0 w) 0) + ) + (let ((t7-5 (the-as (inline-array vector4w) (-> (the-as (inline-array vector4w) t4-8) 2)))) + (set! (-> t7-5 0 x) a3-7) + (set! (-> t7-5 0 y) t5-13) + (set! (-> t7-5 0 z) 0) + (set! (-> t7-5 0 w) 0) + ) + (let ((t5-14 (the-as (inline-array vector4w) (-> (the-as (inline-array vector4w) t4-8) 3)))) + (set! (-> t5-14 0 x) a2-6) + (set! (-> t5-14 0 y) t6-6) + (set! (-> t5-14 0 z) 0) + (set! (-> t5-14 0 w) 0) + ) + (let ((t4-9 (the-as (inline-array vector4w) (-> (the-as (inline-array vector4w) t4-8) 4)))) + (set! (-> t4-9 0 x) a3-7) + (set! (-> t4-9 0 y) t6-6) + (set! (-> t4-9 0 z) 0) + (set! (-> t4-9 0 w) 0) + ) + ) + (set! (-> arg0 base) (the-as pointer (-> (the-as (inline-array vector4w) (-> arg0 base)) 5))) + ) + ) + (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 object (-> arg0 base)))) + (set! (-> (the-as (inline-array vector4w) t2-7) 0 quad) (-> v1-0 line-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) t2-7) 1 quad) (-> v1-0 line-tmpl quad 1)) + (set-vector! (-> (the-as (inline-array vector4w) t2-7) 2) a2-6 t0-9 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) t2-7) 3) a3-7 t0-9 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) t2-7) 4) a2-6 (+ t0-9 16) #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) t2-7) 5) a3-7 (+ 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) (arg2 symbol)) + (local-vars + (v1-9 uint128) + (a1-5 int) + (a2-13 int) + (a3-2 int) + (t0-0 int) + (t1-0 int) + (t2-0 int) + (t3-0 int) + (t4-0 int) + ) + (set! arg2 (or (not (get-screen-copied *blit-displays-work*)) arg2)) + (when arg2 + (let ((s4-1 *hud-sprite-work*) + (s3-0 (the-as object (-> this tid))) + (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 (the-as texture-id s3-0) + (when arg1 + (let ((v1-8 (-> arg1 texture-mask 8 mask quad)) + (a0-4 (-> (the-as texture s3-0) masks data 0 mask quad)) + ) + (.por v1-9 v1-8 a0-4) + ) + (set! (-> arg1 texture-mask 8 mask quad) v1-9) + ) + (let ((s2-1 (the-as object (-> arg0 base)))) + (set! (-> (the-as (inline-array vector4w) s2-1) 0 quad) (-> s4-1 adgif-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) s2-1) 1 quad) (-> s4-1 adgif-tmpl quad 1)) + (adgif-shader<-texture-simple! (the-as adgif-shader (&+ (the-as pointer s2-1) 32)) (the-as texture s3-0)) + (cond + ((logtest? (-> this flags) (hud-sprite-flags hsf4)) + (set! (-> (the-as (pointer uint64) (&+ (the-as pointer s2-1) 32)) 8) (the-as uint 72)) + ) + ((logtest? (-> this flags) (hud-sprite-flags hsf5)) + (set! (-> (the-as (pointer uint64) (&+ (the-as pointer s2-1) 32)) 8) (the-as uint 66)) + ) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-22 (the-as object (-> arg0 base))) + (a1-2 + (the int + (* f30-0 (the float (-> (the-as texture s3-0) w)) (-> this scale-x) (-> *video-params* relative-x-scale)) + ) + ) + (a3-1 (the int (* -1.0 (-> this scale-x) (the float (-> (the-as texture s3-0) w)) f28-0))) + (t5-0 + (the int + (* f28-0 (the float (-> (the-as texture s3-0) h)) (-> this scale-y) (-> *video-params* relative-x-scale)) + ) + ) + (t6-0 (the int (* f30-0 (the float (-> (the-as texture s3-0) h)) (-> this scale-y)))) + (a0-16 (if (nonzero? (-> this pos z)) + (-> this pos z) + #xffffff + ) + ) + ) + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + (cond + ((logtest? (-> this flags) (hud-sprite-flags hsf2)) + (set! t2-0 (+ (-> this pos x) 1792)) + (set! t3-0 (+ (-> this pos y) 1840)) + (set! a2-13 (- t2-0 a1-2)) + (set! t4-0 (- t3-0 a3-1)) + (set! t0-0 (+ (- t2-0 a1-2) t5-0)) + (set! t1-0 (+ (- t3-0 a3-1) t6-0)) + (set! a1-5 (+ t2-0 t5-0)) + (set! a3-2 (+ t3-0 t6-0)) + ) + ((logtest? (-> this flags) (hud-sprite-flags hsf3)) + (set! a2-13 (+ (- 1792 (the int (* 0.5 (the float (+ a1-2 t5-0))))) (-> this pos x))) + (set! t4-0 (+ (- 1840 (the int (* 0.5 (the float (+ a3-1 t6-0))))) (-> this pos y))) + (set! t2-0 (+ a2-13 a1-2)) + (set! t3-0 (+ t4-0 a3-1)) + (set! t0-0 (+ a2-13 t5-0)) + (set! t1-0 (+ t4-0 t6-0)) + (set! a1-5 (+ a2-13 a1-2 t5-0)) + (set! a3-2 (+ t4-0 a3-1 t6-0)) + ) + (else + (set! a2-13 (+ (-> this pos x) 1792)) + (set! t4-0 (+ (-> this pos y) 1840)) + (set! t2-0 (+ a2-13 a1-2)) + (set! t3-0 (+ t4-0 a3-1)) + (set! t0-0 (+ a2-13 t5-0)) + (set! t1-0 (+ t4-0 t6-0)) + (set! a1-5 (+ a2-13 a1-2 t5-0)) + (set! a3-2 (+ t4-0 a3-1 t6-0)) + ) + ) + (set! (-> (the-as (inline-array vector4w) v1-22) 0 quad) (-> s4-1 draw-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-22) 1 quad) (-> s4-1 draw-tmpl quad 1)) + (set! (-> (the-as (inline-array vector4w) v1-22) 2 quad) (-> this color quad)) + (set! (-> (the-as (inline-array vector4w) v1-22) 5 quad) (-> this color quad)) + (set! (-> (the-as (inline-array vector4w) v1-22) 8 quad) (-> this color quad)) + (set! (-> (the-as (inline-array vector4w) v1-22) 11 quad) (-> this color quad)) + (let ((f0-31 (if (logtest? (-> this flags) (hud-sprite-flags hsf0)) + 1.0 + 0.0 + ) + ) + (f1-13 (if (logtest? (-> this flags) (hud-sprite-flags hsf1)) + 1.0 + 0.0 + ) + ) + ) + (let ((t5-16 (the-as (inline-array vector) (&+ (the-as pointer v1-22) 48)))) + (set! (-> t5-16 0 x) f0-31) + (set! (-> t5-16 0 y) f1-13) + (set! (-> t5-16 0 z) 1.0) + (set! (-> t5-16 0 w) 0.0) + ) + (let ((t5-17 (the-as object (&+ (the-as pointer v1-22) 96)))) + (set! (-> (the-as (inline-array vector) t5-17) 0 x) (- 1.0 f0-31)) + (set! (-> (the-as (inline-array vector) t5-17) 0 y) f1-13) + (set! (-> (the-as (inline-array vector) t5-17) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) t5-17) 0 w) 0.0) + ) + (let ((t5-18 (the-as (inline-array vector) (&+ (the-as pointer v1-22) 144)))) + (set! (-> t5-18 0 x) f0-31) + (set! (-> t5-18 0 y) (- 1.0 f1-13)) + (set! (-> t5-18 0 z) 1.0) + (set! (-> t5-18 0 w) 0.0) + ) + (let ((t5-19 (the-as object (&+ (the-as pointer v1-22) 192)))) + (set! (-> (the-as (inline-array vector) t5-19) 0 x) (- 1.0 f0-31)) + (set! (-> (the-as (inline-array vector) t5-19) 0 y) (- 1.0 f1-13)) + (set! (-> (the-as (inline-array vector) t5-19) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) t5-19) 0 w) 0.0) + ) + ) + (let ((t5-20 (the-as object (&+ (the-as pointer v1-22) 64)))) + (set! (-> (the-as (inline-array vector4w) t5-20) 0 x) (* a2-13 16)) + (set! (-> (the-as (inline-array vector4w) t5-20) 0 y) (* t4-0 16)) + (set! (-> (the-as (inline-array vector4w) t5-20) 0 z) a0-16) + (set! (-> (the-as (inline-array vector4w) t5-20) 0 w) #x10000) + ) + (let ((a2-22 (the-as object (&+ (the-as pointer v1-22) 112)))) + (set! (-> (the-as (inline-array vector4w) a2-22) 0 x) (* t2-0 16)) + (set! (-> (the-as (inline-array vector4w) a2-22) 0 y) (* t3-0 16)) + (set! (-> (the-as (inline-array vector4w) a2-22) 0 z) a0-16) + (set! (-> (the-as (inline-array vector4w) a2-22) 0 w) #x10000) + ) + (let ((a2-23 (the-as object (&+ (the-as pointer v1-22) 160)))) + (set! (-> (the-as (inline-array vector4w) a2-23) 0 x) (* t0-0 16)) + (set! (-> (the-as (inline-array vector4w) a2-23) 0 y) (* t1-0 16)) + (set! (-> (the-as (inline-array vector4w) a2-23) 0 z) a0-16) + (set! (-> (the-as (inline-array vector4w) a2-23) 0 w) #x10000) + ) + (let ((v1-23 (the-as object (&+ (the-as pointer v1-22) 208)))) + (set! (-> (the-as (inline-array vector4w) v1-23) 0 x) (* a1-5 16)) + (set! (-> (the-as (inline-array vector4w) v1-23) 0 y) (* a3-2 16)) + (set! (-> (the-as (inline-array vector4w) v1-23) 0 z) a0-16) + (set! (-> (the-as (inline-array vector4w) v1-23) 0 w) #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. +(defmethod hud-sprite-method-10 ((this hud-sprite) (arg0 dma-buffer) (arg1 level) (arg2 int) (arg3 int) (arg4 int) (arg5 int)) + (local-vars + (a0-4 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 (the-as object (-> this tid))) + (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 (the-as texture-id s0-0) + (when sv-16 + (let ((v1-8 (-> sv-16 texture-mask 8 mask quad)) + (a0-3 (-> (the-as texture s0-0) masks data 0 mask quad)) + ) + (.por a0-4 v1-8 a0-3) + ) + (set! (-> sv-16 texture-mask 8 mask quad) a0-4) + ) + (let ((v1-10 (the-as object (-> arg0 base)))) + (set! (-> (the-as (inline-array vector4w) v1-10) 0 quad) (-> sv-32 adgif-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-10) 1 quad) (-> sv-32 adgif-tmpl quad 1)) + (adgif-shader<-texture-simple! + (the-as adgif-shader (-> (the-as (inline-array vector4w) v1-10) 2)) + (the-as texture s0-0) + ) + ) + (&+! (-> arg0 base) 112) + (let ((v1-13 (the-as object (-> 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) (hud-sprite-flags hsf2)) + (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) (hud-sprite-flags hsf3)) + (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 (inline-array vector4w) v1-13) 0 quad) (-> sv-32 draw-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-13) 1 quad) (-> sv-32 draw-tmpl quad 1)) + (set! (-> (the-as (inline-array vector4w) v1-13) 2 quad) (-> this color quad)) + (set! (-> (the-as (inline-array vector4w) v1-13) 5 quad) (-> this color quad)) + (set! (-> (the-as (inline-array vector4w) v1-13) 8 quad) (-> this color quad)) + (set! (-> (the-as (inline-array vector4w) v1-13) 11 quad) (-> this color quad)) + (let* ((t5-3 (-> (the-as texture s0-0) w)) + (t4-13 (-> (the-as texture 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) (hud-sprite-flags hsf0)) + (let ((f4-0 f0-55)) + (set! f0-55 f1-28) + (set! f1-28 f4-0) + ) + ) + (when (logtest? (-> this flags) (hud-sprite-flags hsf1)) + (set! f2-3 (the-as float f3-2)) + (set! f3-2 (gpr->fpr t5-3)) + ) + (set-vector! (-> (the-as (inline-array vector) v1-13) 3) f0-55 (the-as float f3-2) 1.0 0.0) + (set-vector! (-> (the-as (inline-array vector) v1-13) 6) f1-28 (the-as float f3-2) 1.0 0.0) + (set-vector! (-> (the-as (inline-array vector) v1-13) 9) f0-55 f2-3 1.0 0.0) + (set-vector! (-> (the-as (inline-array vector) v1-13) 12) f1-28 f2-3 1.0 0.0) + ) + (set-vector! + (-> (the-as (inline-array vector) v1-13) 4) + (the-as float (* a1-14 16)) + (the-as float (* a2-1 16)) + (the-as float a0-14) + (the-as float #x10000) + ) + (set-vector! + (-> (the-as (inline-array vector) v1-13) 7) + (the-as float (* a3-1 16)) + (the-as float (* t2-1 16)) + (the-as float a0-14) + (the-as float #x10000) + ) + (set-vector! + (-> (the-as (inline-array vector) v1-13) 10) + (the-as float (* t3-0 16)) + (the-as float (* t6-0 16)) + (the-as float a0-14) + (the-as float #x10000) + ) + (set-vector! + (-> (the-as (inline-array vector) v1-13) 13) + (the-as float (* t1-3 16)) + (the-as float (* t0-3 16)) + (the-as float a0-14) + (the-as float #x10000) + ) + ) + (&+! (-> 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)) + (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 ((t1-0 *hud-sprite-work*) + (v1-3 (the-as object (-> arg0 base))) + (a2-8 (* (+ (the int (-> this box min x)) 1792) 16)) + (t0-0 (* (+ (the int (-> this box max x)) 1792) 16)) + (a3-13 (* (+ (the int (-> this box min y)) 1840) 16)) + ) + (let ((t2-2 (* (+ (the int (-> this box max y)) 1840) 16))) + (set! (-> (the-as (inline-array vector4w) v1-3) 0 quad) (-> t1-0 box-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) v1-3) 1 quad) (-> t1-0 box-tmpl quad 1)) + (set! (-> (the-as (inline-array vector4w) v1-3) 2 quad) (-> this color quad)) + (set-vector! (-> (the-as (inline-array vector4w) v1-3) 3) a2-8 a3-13 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) v1-3) 4) t0-0 a3-13 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) v1-3) 5) t0-0 t2-2 #xffffff 0) + (set-vector! (-> (the-as (inline-array vector4w) v1-3) 6) a2-8 t2-2 #xffffff 0) + ) + (let ((v1-4 (the-as object (-> (the-as (inline-array vector4w) v1-3) 7)))) + (set! (-> (the-as (inline-array vector4w) v1-4) 0 x) a2-8) + (set! (-> (the-as vector4w v1-4) y) a3-13) + (set! (-> (the-as vector4w v1-4) z) #xffffff) + (set! (-> (the-as vector4w v1-4) w) 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 #x2 :d #x1)) + ) + (let ((t0-0 *hud-sprite-work*) + (v1-3 (the-as (inline-array vector4w) (-> arg0 base))) + (a2-8 (* (+ (the int (-> this box min x)) 1792) 16)) + (a3-11 (* (+ (the int (-> this box max x)) 1792) 16)) + (t2-0 (* (+ (the int (-> this box min y)) 1840) 16)) + (t1-4 (* (+ (the int (-> this box 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) + (dma-buffer-add-gs-set arg0 (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))) + 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 box min x)) 1792) 16)) + (a3-11 (* (+ (the int (-> this box max x)) 1792) 16)) + (t2-0 (* (+ (the int (-> this box min y)) 1840) 16)) + (t1-4 (* (+ (the int (-> this box 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) + (dma-buffer-add-gs-set arg0 (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))) + 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 box min x)) 1792) 16)) + (a3-11 (* (+ (the int (-> this box max x)) 1792) 16)) + (t2-0 (* (+ (the int (-> this box min y)) 1840) 16)) + (t1-4 (* (+ (the int (-> this box 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 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)) + (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-hud-alpha) + ) + (dotimes (s3-0 30) + (if (and (-> this sprites s3-0 tid) (!= (-> this sprites s3-0 scale-x) 0.0)) + (draw (-> this sprites s3-0) s4-0 (-> this level) #f) + ) + ) + (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 x))) + (set-vector! + (-> s3-1 origin) + (the float (-> this strings s2-0 pos x)) + (the float (-> this strings s2-0 pos y)) + (the float (-> this strings s2-0 pos z)) + 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)) + (set-context! *font-work* s3-1) + (draw-string (-> this strings s2-0 text) s4-0 s3-1) + ) + ) + ) + ) + (dotimes (s5-1 2) + (when (-> this icons s5-1 icon) + (set-vector! + (-> this icons s5-1 icon 0 root scale) + (* (-> this icons s5-1 scale-x) (-> *video-params* relative-x-scale)) + (-> this icons s5-1 scale-y) + (* (-> this icons s5-1 scale-x) (-> *video-params* relative-x-scale)) + 1.0 + ) + (if (get-horizontal-flip-flag *blit-displays-work*) + (set! (-> this icons s5-1 icon 0 root trans x) (the float (- 256 (-> this icons s5-1 pos x)))) + (set! (-> this icons s5-1 icon 0 root trans x) (the float (+ (-> this icons s5-1 pos x) -256))) + ) + (set! (-> this icons s5-1 icon 0 root trans y) (the float (* (+ (-> this icons s5-1 pos y) -208) 2))) + (set! (-> this icons s5-1 icon 0 root trans z) (the float (-> this icons s5-1 pos z))) + ) + ) + ) + 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 (or (and (logtest? (-> this values s4-0 flags) 1) (< (-> this values s4-0 current) (-> this values s4-0 target))) + (and (logtest? (-> this values s4-0 flags) 2) (< (-> this values s4-0 target) (-> this values s4-0 current))) + ) + (!= (-> this values s4-0 current) -1) + ) + (when (not (hidden? this)) + (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-42 (abs (- (-> this values s4-0 current) (-> this values s4-0 target)))) + (s3-0 1) + ) + (cond + ((and (logtest? (-> this values s4-0 flags) 8) (>= v1-42 (* (the-as uint 100) (-> this values s4-0 inc-unit)))) + (set! s3-0 (the-as int (* (the-as uint (the-as int 100)) (-> this values s4-0 inc-unit)))) + ) + ((and (logtest? (-> this values s4-0 flags) 4) (>= v1-42 (* (the-as uint 10) (-> this values s4-0 inc-unit)))) + (set! s3-0 (the-as int (* (the-as uint (the-as int 10)) (-> this values s4-0 inc-unit)))) + ) + ((>= v1-42 (the-as int (-> this values s4-0 inc-unit))) + (set! s3-0 (the-as int (-> this values s4-0 inc-unit))) + ) + ) + (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) (-> this values s4-0 inc-time)) + ) + ) + ) + (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-63 (-> *cpad-list* cpads 0))) + (logtest? (logclear (pad-buttons l3) (-> a0-63 button0-abs 0)) + (logior (-> a0-63 button0-abs 2) (-> a0-63 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 +;; WARN: Return type mismatch symbol vs object. +(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 +(defmethod hidden? ((this hud)) + (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 + :name "manipy" + :to arg0 + :stack-size #x20000 + ) + ) + ) + (the-as + (pointer manipy) + (when (and s4-0 (nonzero? (-> (the-as process-drawable (-> s4-0 0)) draw))) + (set! (-> (the-as manipy (-> 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 64 (the-as string #f))) + ) + 0 + (none) + ) + +;; definition for function hud-hidden-event-handler +(defbehavior hud-hidden-event-handler hud ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-1 object)) + (case arg2 + (('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 + ) + (('ready) + (dotimes (v1-27 8) + (if (and (logtest? (-> self values v1-27 flags) 3) + (or (zero? (-> self values v1-27 counter)) (= (-> self values v1-27 target) (-> self values v1-27 current))) + ) + (set! (-> self values v1-27 counter) (if (= (-> arg3 param 0) -1) + (-> self values v1-27 inc-time) + (-> arg3 param 0) + ) + ) + ) + ) + #f + ) + (else + (event-callback self arg0 arg1 arg2 arg3) + ) + ) + ) + +;; failed to figure out what this is: +(defstate hud-hidden (hud) + :event hud-hidden-event-handler + :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)) + (+! (-> self clock ref-count) -1) + (+! (-> *display* real-clock ref-count) 1) + (set! (-> self clock) (-> *display* real-clock)) + (set! (-> self flags) (hud-flags)) + (set-time! (-> self last-hide-time)) + (set! (-> self offset) 1.0) + (dotimes (v1-16 14) + (set! (-> self strings v1-16 text) #f) + (set! (-> self strings v1-16 scale) 1.0) + (set! (-> self strings v1-16 color) (font-color white)) + (set! (-> self strings v1-16 flags) (font-flags shadow kerning large)) + (set! (-> self strings v1-16 pos x) 0) + (set! (-> self strings v1-16 pos z) #xfffffff) + (set! (-> self strings v1-16 pos w) 0) + ) + (dotimes (v1-19 30) + (let ((a0-17 (&+ (-> self sprites 0 color-ptr) (* v1-19 64)))) + (set! (-> a0-17 0) 128) + (set! (-> a0-17 1) 128) + (set! (-> a0-17 2) 128) + (set! (-> a0-17 3) 128) + ) + (set! (-> self sprites v1-19 pos z) #xffffff) + (set! (-> self sprites v1-19 pos w) 0) + (set! (-> self sprites v1-19 scale-x) 1.0) + (set! (-> self sprites v1-19 scale-y) 1.0) + (set! (-> self sprites v1-19 angle) 0.0) + (set! (-> self sprites v1-19 flags) (hud-sprite-flags)) + (set! (-> self sprites v1-19 tid) (the-as texture-id #f)) + ) + (dotimes (v1-22 2) + (set! (-> self icons v1-22 icon) (the-as (pointer manipy) #f)) + (set! (-> self icons v1-22 pos z) 1024) + (set! (-> self icons v1-22 scale-x) 1.0) + (set! (-> self icons v1-22 scale-y) 1.0) + ) + (dotimes (v1-25 8) + (set! (-> self values v1-25 current) -1) + (set! (-> self values v1-25 target) 0) + ) + (init-callback self) + (set! (-> self event-hook) hud-hidden-event-handler) + (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 ready-hud +;; WARN: Return type mismatch int vs none. +(defun ready-hud ((arg0 symbol) (arg1 int)) + (when (and *target* (or (not *progress-process*) (gone? (-> *progress-process* 0)))) + (let ((v1-7 (-> *hud-engine* alive-list next0))) + *hud-engine* + (let ((s4-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)) 'ready arg1) + ) + (set! v1-7 s4-0) + *hud-engine* + (set! s4-0 (-> s4-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/engine/ui/minimap-h_REF.gc b/test/decompiler/reference/jak3/engine/ui/minimap-h_REF.gc index b9718a4ab0..57260c4bbd 100644 --- a/test/decompiler/reference/jak3/engine/ui/minimap-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/ui/minimap-h_REF.gc @@ -4,13 +4,13 @@ ;; definition of type minimap-table-entry (deftype minimap-table-entry (structure) ((corner vector :inline) - (level-name basic) - (tex-name basic) + (level-name symbol) + (tex-name string) (meters-per-texel float) (pos-scale float) (min-inv-scale float) (max-inv-scale float) - (switch-immediate basic) + (switch-immediate symbol) ) ) @@ -37,14 +37,14 @@ (deftype minimap-class-node (structure) ((default-position vector :inline) (flags minimap-flag) - (name basic) + (name string) (icon-xy vector2ub :inline) (class minimap-class) (scale float) (color rgba) ) (:methods - (minimap-class-node-method-9 () none) + (minimap-class-node-method-9 (_type_) symbol) ) ) @@ -703,7 +703,7 @@ (format #t "[~8x] ~A~%" this 'connection-minimap) (format #t "~1Tnext: #~%" (-> this next)) (format #t "~1Tkey: ~A~%" (-> this key)) - (format #t "~1Tupdate-time: ~D~%" (-> this update-time)) + (format #t "~1Tupdate-time: ~D~%" (-> this handle)) (format #t "~1Tparam[4] @ #x~X~%" (-> this param)) (dotimes (s5-0 4) (format #t "~T [~D]~1Tparam: ~A~%" s5-0 (-> this param s5-0)) @@ -721,7 +721,7 @@ (format #t "~T [~D]~1Tparam-float: ~f~%" s5-3 (the-as float (-> this param s5-3))) ) (format #t "~1Tparam-quat: #x~X~%" (-> this param-quat)) - (format #t "~1Thandle: ~D~%" (-> this update-time)) + (format #t "~1Thandle: ~D~%" (-> this handle)) (format #t "~1Tposition: #~%" (-> this position)) (format #t "~1Talpha: ~f~%" (-> this alpha)) (format #t "~1Tflags: #x~X : (minimap-flag " (-> this flags)) @@ -842,7 +842,7 @@ ) (:methods (get-distance-with-path (_type_ vector vector) float) - (minimap-trail-method-10 () none) + (reset (_type_) none) ) ) @@ -930,25 +930,25 @@ (frustum-alpha float) ) (:methods - (minimap-method-9 () none) + (debug-draw (_type_) none) (get-trail-for-connection (_type_ connection-minimap symbol) minimap-trail) - (minimap-method-11 () none) + (get-icon-draw-pos (_type_ connection-minimap minimap-trail vector float vector) symbol) (add-icon! (_type_ process uint int vector int) connection-minimap) - (minimap-method-13 () none) - (minimap-method-14 () none) - (minimap-method-15 () none) - (minimap-method-16 () none) - (minimap-method-17 () none) - (minimap-method-18 () none) - (minimap-method-19 () none) - (minimap-method-20 () none) - (minimap-method-21 () none) - (minimap-method-22 () none) - (minimap-method-23 () none) - (minimap-method-24 () none) - (minimap-method-25 () none) - (minimap-method-26 () none) - (minimap-method-27 () none) + (free-trail-by-connection (_type_ connection-minimap) none) + (update-trails (_type_) none) + (draw-1 (_type_ dma-buffer vector4w symbol) none) + (draw-connection (_type_ minimap-draw-work connection-minimap) none) + (draw-frustum-1 (_type_ minimap-draw-work connection-minimap) none) + (draw-frustum-2 (_type_ minimap-draw-work connection-minimap) none) + (sub-draw-1-2 (_type_ minimap-draw-work) none) + (update! (_type_) symbol) + (sub-draw-1-1 (_type_ minimap-draw-work) none) + (set-color (_type_ vector) none) + (draw-racer-2 (_type_ minimap-draw-work connection-minimap) none) + (draw-sprite2 (_type_ dma-buffer vector4w symbol) none) + (set-race-texture (_type_ texture float level) none) + (draw-racer-1 (_type_ minimap-draw-work connection-minimap float float float) none) + (set-race-corner (_type_ float float) none) ) ) diff --git a/test/decompiler/reference/jak3/engine/ui/minimap_REF.gc b/test/decompiler/reference/jak3/engine/ui/minimap_REF.gc new file mode 100644 index 0000000000..2bd56aa9c3 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/ui/minimap_REF.gc @@ -0,0 +1,4003 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type minimap-texture-name-array +(deftype minimap-texture-name-array (structure) + ((data string 35) + ) + ) + +;; definition for method 3 of type minimap-texture-name-array +(defmethod inspect ((this minimap-texture-name-array)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'minimap-texture-name-array) + (format #t "~1Tdata[35] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition of type minimap-corner-array +(deftype minimap-corner-array (structure) + ((data vector 35 :inline) + ) + ) + +;; definition for method 3 of type minimap-corner-array +(defmethod inspect ((this minimap-corner-array)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'minimap-corner-array) + (format #t "~1Tdata[35] @ #x~X~%" (-> this data)) + (label cfg-4) + this + ) + +;; definition for symbol *minimap-texture-name-array*, type minimap-texture-name-array +(define *minimap-texture-name-array* + (new 'static 'minimap-texture-name-array :data (new 'static 'array string 35 + #f + #f + "map-stadium" + "map-ctyslumc" + #f + #f + "map-ctygena" + "map-ctygenb" + "map-ctyslumb" + #f + #f + "map-ctyfarma" + "map-ctygenc" + #f + "map-ctysluma" + #f + "map-ctymarka" + "map-ctypala" + "map-ctymarkb" + "map-ctyindb" + #f + "map-ctyfarmb" + "map-ctypalb" + #f + "map-ctyinda" + #f + "map-ctyporta" + "map-ctyportb" + "map-ctyportc" + #f + #f + "map-ctyportd" + "map-ctyporte" + "map-ctyportf" + #f + ) + ) + ) + +;; definition for symbol *minimap-corner-array*, type minimap-corner-array +(define *minimap-corner-array* + (new 'static 'minimap-corner-array :data (new 'static 'inline-array vector 35 + (new 'static 'vector :x -4456448.0 :z -4456448.0 :w 1.0) + (new 'static 'vector :x -2883584.0 :z -4456448.0 :w 1.0) + (new 'static 'vector :x -1310720.0 :z -4456448.0 :w 1.0) + (new 'static 'vector :x 262144.0 :z -4456448.0 :w 1.0) + (new 'static 'vector :x 1835008.0 :z -4456448.0 :w 1.0) + (new 'static 'vector :x -4456448.0 :z -2883584.0 :w 1.0) + (new 'static 'vector :x -2883584.0 :z -2883584.0 :w 1.0) + (new 'static 'vector :x -1310720.0 :z -2883584.0 :w 1.0) + (new 'static 'vector :x 262144.0 :z -2883584.0 :w 1.0) + (new 'static 'vector :x 1835008.0 :z -2883584.0 :w 1.0) + (new 'static 'vector :x -4456448.0 :z -1310720.0 :w 1.0) + (new 'static 'vector :x -2883584.0 :z -1310720.0 :w 1.0) + (new 'static 'vector :x -1310720.0 :z -1310720.0 :w 1.0) + (new 'static 'vector :x 262144.0 :z -1310720.0 :w 1.0) + (new 'static 'vector :x 1835008.0 :z -1310720.0 :w 1.0) + (new 'static 'vector :x -4456448.0 :z 262144.0 :w 1.0) + (new 'static 'vector :x -2883584.0 :z 262144.0 :w 1.0) + (new 'static 'vector :x -1310720.0 :z 262144.0 :w 1.0) + (new 'static 'vector :x 262144.0 :z 262144.0 :w 1.0) + (new 'static 'vector :x 1835008.0 :z 262144.0 :w 1.0) + (new 'static 'vector :x -4456448.0 :z 1835008.0 :w 1.0) + (new 'static 'vector :x -2883584.0 :z 1835008.0 :w 1.0) + (new 'static 'vector :x -1310720.0 :z 1835008.0 :w 1.0) + (new 'static 'vector :x 262144.0 :z 1835008.0 :w 1.0) + (new 'static 'vector :x 1835008.0 :z 1835008.0 :w 1.0) + (new 'static 'vector :x -4456448.0 :z 3407872.0 :w 1.0) + (new 'static 'vector :x -2883584.0 :z 3407872.0 :w 1.0) + (new 'static 'vector :x -1310720.0 :z 3407872.0 :w 1.0) + (new 'static 'vector :x 262144.0 :z 3407872.0 :w 1.0) + (new 'static 'vector :x 1835008.0 :z 3407872.0 :w 1.0) + (new 'static 'vector :x -4456448.0 :z 4980736.0 :w 1.0) + (new 'static 'vector :x -2883584.0 :z 4980736.0 :w 1.0) + (new 'static 'vector :x -1310720.0 :z 4980736.0 :w 1.0) + (new 'static 'vector :x 262144.0 :z 4980736.0 :w 1.0) + (new 'static 'vector :x 1835008.0 :z 4980736.0 :w 1.0) + ) + ) + ) + +;; definition for symbol *minimap*, type minimap +(define *minimap* (new 'static 'minimap + :draw-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #xa :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x908a400000008001 #x535353531) + ) + :draw2-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #xa :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x900a400000008001 #x525252521) + ) + :draw3-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #xa :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x90aa400000008001 #x535353531) + ) + :draw4-tmpl (new 'static 'dma-gif-packet + :dma-vif (new 'static 'dma-packet + :dma (new 'static 'dma-tag :qwc #xa :id (dma-tag-id cnt)) + :vif1 (new 'static 'vif-tag :imm #xa :cmd (vif-cmd direct) :msk #x1) + ) + :gif (new 'static 'array uint64 2 #x902a400000008001 #x525252521) + ) + :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) + ) + :gif (new 'static 'array uint64 2 #x50ab400000008001 #x53531) + ) + :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) + ) + :gif (new 'static 'array uint64 2 #x1000000000008005 #xe) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) + :offset (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :last-name #f + :last-tex #f + :engine #f + :engine-key #x800 + :race-tex #f + :race-scale 16384.0 + :race-level #f + :sprite2-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) + ) + :gif (new 'static 'array uint64 2 #x502b400000008001 #x52521) + ) + :frustum-alpha 1.0 + ) + ) + +;; failed to figure out what this is: +(kmemopen global "minimap-engines") + +;; definition for symbol *minimap-class-list*, type (inline-array minimap-class-node) +(define *minimap-class-list* (new 'static 'inline-array minimap-class-node 177 + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag trail bigmap) + :name "none" + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 3190784.0 :y 32768.0 :z 765952.0 :w 1.0) + :flags (minimap-flag trail bigmap) + :name "onintent" + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 4505600.0 :z 4505600.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "vinroom" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x5)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 4197499.0 :y -34734.08 :z 4187750.5 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "sewer-kg" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 775413.75 :y 32727.04 :z -1279795.2 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "sewer-genb" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 3148021.8 :y 8847.36 :z -1200209.9 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "sewer-slumb" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -282624.0 :y 45056.0 :z 5464064.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "hiphog" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x3 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1465712.6 :y 36085.76 :z 5251563.5 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "gungame" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x5 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1843200.0 :y 34816.0 :z 5275648.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "gun-yellow" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x2)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :b #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9143050.0 :y 89169.92 :z 9106391.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "desert-nest-entrance" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x3)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :name "guard" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :name "parking-spot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :g #x40 :b #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag trail bigmap goal) + :name "goal" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "goal-no-trail" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "goal-no-trail-bigmap" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 3906355.2 :y 100352.0 :z 3732922.2 :w 1.0) + :flags (minimap-flag trail bigmap goal ctywide) + :name "cty-sniper-vicinity" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x4c :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -2105467.0 :y 118906.88 :z 3788431.2 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "forest" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x3 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6583542.0 :y 262021.12 :z -1945067.5 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "wascity-gungame" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x3 #x2)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1523712.0 :z 7372800.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only ctywide) + :name "city-transport" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x2)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 839680.0 :z 3756032.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "wascity-leaper-race" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x2)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6039716.0 :y 109895.68 :z -1498153.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "wascity-pre-game" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x5 #x2)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 10678272.0 :z 524288.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "desert-transport" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x2)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 86016.0 :z 7151616.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "waspal" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1458176.0 :z -1499136.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "stadium" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x2)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2895872.0 :z -1855488.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "wasteland-arena" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x3)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag frustum) + :name "guard-frustum" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9286615.0 :y 125091.84 :z 653434.9 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "wasdoors" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x3)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1843200.0 :y 34816.0 :z 5275648.0 :w 1.0) + :flags (minimap-flag trail bigmap) + :name "gun-dark" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x2)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :b #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 3137536.0 :y 34324.48 :z -2962923.5 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport desert) + :name "spargus-city" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x3 #x3)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag racer) + :name "racer" + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag racer) + :name "racer-target" + :scale 1.0 + :color (new 'static 'rgba :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag racer) + :name "racer-errol" + :scale 1.0 + :color (new 'static 'rgba :r #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 166871.05 :y 49192.96 :z -2900009.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "monk-temple" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x5 #x3)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 15650816.0 :y 149913.6 :z 2943385.5 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desd" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 3550003.2 :y 321126.4 :z 5485773.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desc" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 5525913.5 :y 369049.6 :z 3343564.8 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desa" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 12869222.0 :y 158105.6 :z 10319053.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desg" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 12833587.0 :y 79052.8 :z 14444954.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desh" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6352077.0 :y 331366.4 :z 7294976.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desc-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2684108.8 :y 63488.0 :z 10600858.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-dese" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 11691622.0 :y 116326.4 :z 674611.2 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desb" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6981632.0 :y 56115.2 :z 378470.4 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desa-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 832307.2 :y 185958.4 :z 6533529.5 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desc-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 12394496.0 :y 206438.4 :z 12609126.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desg-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 8704819.0 :y 148684.8 :z 5840896.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desd-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 11052646.0 :y 106086.4 :z 11750605.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desg-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 876134.4 :y 251494.4 :z 12136038.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-dese-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 556646.4 :y 184320.0 :z 15724134.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-dese-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 16105472.0 :y 54886.4 :z 5789696.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desd-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 15939994.0 :y 135168.0 :z 1683456.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desb-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9377382.0 :y 93798.4 :z 92160.0 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasa-1" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9970483.0 :y 93388.8 :z 104448.0 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasa-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 10326016.0 :y 131481.6 :z -862208.0 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasa-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9631334.0 :y 88473.6 :z -1377075.2 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasa-4" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 7608729.5 :y 109772.8 :z -1456128.0 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasb-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 7272038.5 :y 371507.2 :z -410828.8 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasb-1" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 5833523.0 :y 110592.0 :z -1670758.4 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasb-4" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6916915.0 :y 389939.2 :z -420659.2 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasb-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 12718080.0 :y 141312.0 :z 10554573.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desg-4" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6378701.0 :y 364134.4 :z -371507.2 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasb-5" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6380749.0 :y 156876.8 :z -1238630.4 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasb-6" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2466611.2 :y 372326.4 :z 2169241.5 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desa-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 8616755.0 :y 108953.6 :z -924876.8 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasa-5" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 11712922.0 :y 240435.2 :z 3998105.5 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desd-4" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 10091315.0 :y 263782.4 :z 3800678.5 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desd-5" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 4193894.5 :y 33177.6 :z 858521.6 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-sluma-1" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 792576.0 :y 33177.6 :z -570982.4 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-genb-1" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1705984.0 :y 8192.0 :z -1542963.2 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-slumb-1" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2126643.2 :y 8192.0 :z -919552.0 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-slumb-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 4290560.0 :y 411238.4 :z 7154483.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desc-4" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 3999744.0 :y 45465.6 :z 4032512.0 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-inda-1" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2407219.2 :y 394035.2 :z 9599795.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-dese-4" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6369689.5 :y 128204.8 :z 7754137.5 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desc-5" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 11148493.0 :y 130662.4 :z 1211596.8 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desb-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9161114.0 :y 140492.8 :z 355532.8 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasa-6" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6171853.0 :y 226508.8 :z -1021132.8 :w 1.0) + :flags (minimap-flag bigmap local-only wasall waswide) + :name "bbush-wasb-7" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 4068556.8 :y 45465.6 :z 2008678.4 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-indb-1" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 4970496.0 :y 108953.6 :z 13683098.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desf" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 86016.0 :y 44236.8 :z 7160217.5 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-port-1" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1570406.4 :y 45875.2 :z -1356185.6 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-genb-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1308672.0 :y 45056.0 :z -833536.0 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-genb-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 505036.8 :y 45465.6 :z -144588.8 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-genb-4" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1736294.4 :y 20480.0 :z -799129.6 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-slumb-4" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2141388.8 :y 7782.4 :z -1939865.6 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-slumc-1" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2992128.0 :y 315801.6 :z 13929677.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-dese-5" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2893824.0 :y 188006.4 :z 14871757.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-post-game" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2445721.5 :y 20070.4 :z -2903654.5 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-slumc-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 4145152.0 :y 45056.0 :z 1143193.6 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-sluma-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 3572121.5 :y 45056.0 :z 1372160.0 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-sluma-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 3889152.0 :y 45056.0 :z 1889075.2 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-indb-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 4385997.0 :y 45056.0 :z 2440396.8 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-indb-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 3716710.5 :y 45056.0 :z 3579494.5 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-inda-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 4198809.5 :y 45056.0 :z 4518297.5 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-inda-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 4687462.5 :y 45056.0 :z 4294246.5 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-inda-4" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 3675750.5 :y 32768.0 :z 4731289.5 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-inda-5" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2622750.8 :y 43950.08 :z 6559170.5 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-port-4" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1377894.4 :y 45056.0 :z 7051264.0 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-port-5" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -1053491.2 :y 45056.0 :z 6554419.0 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-port-6" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -27852.8 :y 43827.2 :z 5318656.0 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-port-7" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1216512.0 :y 45056.0 :z 5433344.0 :w 1.0) + :flags (minimap-flag bigmap local-only ctywide) + :name "bbush-port-8" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9130394.0 :y 122060.8 :z 3092480.0 :w 1.0) + :flags (minimap-flag bigmap local-only desert) + :name "bbush-desb-4" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1542847.2 :y 196168.9 :z -4314233.0 :w 1.0) + :flags (minimap-flag bigmap goal) + :name "atoll-valve" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2277804.5 :y 217672.9 :z -4571725.5 :w 1.0) + :flags (minimap-flag bigmap goal) + :name "atoll-ashelin" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -3100565.5 :y 547275.56 :z 1190112.5 :w 1.0) + :flags (minimap-flag bigmap goal) + :name "mountain-lens" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -2833539.0 :y 496445.44 :z 11345.101 :w 1.0) + :flags (minimap-flag bigmap goal) + :name "mountain-shard" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -3448408.5 :y 567047.8 :z 1029759.4 :w 1.0) + :flags (minimap-flag bigmap goal) + :name "mountain-gear" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 4357507.5 :y 205120.72 :z -2286701.2 :w 1.0) + :flags (minimap-flag bigmap goal) + :name "ruins-hut" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -2575550.8 :y 156067.02 :z 3728844.8 :w 1.0) + :flags (minimap-flag bigmap goal) + :name "forest-samos" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :name "metalhead" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :b #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9633792.0 :y 32768.0 :z -1470464.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "kleever-arena" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9181552.0 :y 28517.172 :z -227204.7 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "seem-wascitya" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x2)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6039716.0 :y 109895.68 :z -1498153.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "seem-wascityb" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x2)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9279857.0 :y 126115.84 :z 725073.94 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "kleever-wasdoors" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9344532.0 :y 126484.48 :z 712171.5 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "damus-wasdoors" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x3)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 8197611.5 :y 1009336.3 :z -1705738.2 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "damus-waspal" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x3)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9527296.0 :y 225280.0 :z -1642496.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "damus-arena" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x3)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6533816.5 :y 86671.36 :z -1681449.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "kleever-wascityb" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "red-clamped-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :name "tiny-red-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 0.5 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 16954164.0 :y 495984.62 :z 17066476.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "desert-temple" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x5 #x3)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2539761.8 :y 74191.26 :z 10381844.0 :w 1.0) + :flags (minimap-flag clamp bigmap local-only transport wasall) + :name "desert-oasis" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x1 #x2)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 12359188.0 :y 90439.68 :z 11306598.0 :w 1.0) + :flags (minimap-flag clamp bigmap local-only transport wasall) + :name "desert-corral" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 9344532.0 :y 126484.48 :z 712171.5 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "sig-wasdoors" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x3)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2669486.0 :y 14131.2 :z -2278359.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "freehq" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x5)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "green-clamped-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp trail bigmap) + :name "nest-cocoon" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp trail bigmap) + :name "nest-bridge" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 0.8 + :color (new 'static 'rgba :g #x40 :b #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 2866749.5 :y 10117.12 :z -2174484.5 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "factory" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x0)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "big-orange-flashing-clamped-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x33 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "big-red-flashing-clamped-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "big-green-flashing-clamped-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "big-purple-flashing-clamped-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :g #x27 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag bigmap) + :name "medium-purple-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :g #x27 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "parked-vehicle" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1603706.9 :y 32522.24 :z -194478.08 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport ctywide) + :name "samos-genb" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp flash) + :name "projectile" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 11540444.0 :y 91835.19 :z 956374.6 :w 1.0) + :flags (minimap-flag trail bigmap goal local-only transport wasall) + :name "desertb-race" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag trail bigmap goal) + :name "big-red-flashing-trail-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag trail bigmap goal) + :name "big-green-flashing-trail-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag frustum) + :name "robot-frustum" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 6036357.0 :y 99532.8 :z 12370657.0 :w 1.0) + :flags (minimap-flag trail bigmap local-only transport wasall) + :name "desert-marauder-village" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x3 #x5)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "gray-clamped-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :g #x40 :b #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -898404.4 :y 450727.94 :z -570347.1 :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "volcano-monk" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :g #x27 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 226181.53 :y -85.1968 :z 239582.4 :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "volcano-collapsing-rock" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -377453.78 :y 83010.766 :z 401777.88 :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "volcano-stone-lid" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -364009.06 :y 4519.936 :z -1827779.0 :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "volcano-dark-maker-idol" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :g #x27 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag bigmap) + :name "medium-green-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag bigmap goal) + :name "big-red-flashing-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "factory-clamped-target" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "factory-clamped-tower" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "desglide-ring-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "desglide-thermal-dot" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -338150.6 :y 344064.0 :z -341446.25 :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "mine-elevator" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -1054895.8 :y 279489.75 :z -77204.69 :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "mine-armor" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "mine-sign-up" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "mine-sign-down" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 1078071.8 :y 418296.62 :z -450073.4 :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "mine-door" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "ruins-elec-gate" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 791688.4 :y 92675.27 :z 1785077.8 :w 1.0) + :flags (minimap-flag clamp bigmap goal) + :name "ruins-goal" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp) + :name "dp-bipedal" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp) + :name "neo-wasp" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x1)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :w 1.0) + :flags (minimap-flag clamp bigmap) + :name "dark-maker" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :b #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 17319976.0 :y 488816.62 :z 16711188.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "templea-door" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 16893830.0 :y 187146.23 :z 17766400.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "templeb-watchers" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 17029612.0 :y 189808.64 :z 19156910.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "templeb-regen" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 16982508.0 :y 180674.56 :z 19045868.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "templeb-warpgate" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 16956294.0 :y 504422.4 :z 16792166.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only) + :name "templex-darkmaker" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x2 #x4)) + :scale 1.0 + :color (new 'static 'rgba :r #x40 :b #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 16744653.0 :y 181903.36 :z 17680548.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "temple-tests-door" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 16833126.0 :y 189808.64 :z 19508510.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "templeb-freeze" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 17827010.0 :y 317647.66 :z 18464536.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "temple-elev" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 386252.8 :y 1760583.6 :z 207462.4 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "factoryc-vehicle" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 17238630.0 :y 189808.64 :z 19509616.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "templeb-defend" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 17585848.0 :y 389857.28 :z 18208850.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only) + :name "templeb-seem" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x4 #x2)) + :scale 1.0 + :color (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 16891248.0 :y 182435.84 :z 17934050.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "temple-defend-door-1" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 0.5 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 17123000.0 :y 199475.2 :z 18286838.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "temple-defend-door-2" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 0.5 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x 17571308.0 :y 181125.12 :z 19067166.0 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "temple-defend-door-3" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 0.5 + :color (new 'static 'rgba :r #x40 :a #x80) + ) + (new 'static 'minimap-class-node + :default-position (new 'static 'vector :x -592445.44 :y 20111.36 :z -1443553.2 :w 1.0) + :flags (minimap-flag clamp bigmap-only goal) + :name "palace-ruins" + :icon-xy (new 'static 'vector2ub :data (new 'static 'array uint8 2 #x0 #x4)) + :scale 1.0 + :color (new 'static 'rgba :g #x40 :a #x80) + ) + ) + ) + +;; failed to figure out what this is: +(let ((gp-0 *minimap*)) + (set! (-> gp-0 engine) (new 'global 'engine-minimap '*minimap* 64 connection-minimap)) + (countdown (v1-9 6) + (set! (-> gp-0 trail v1-9 used-by) #f) + ) + ) + +;; failed to figure out what this is: +(kmemclose) + +;; definition for method 9 of type minimap +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw ((this minimap)) + (when *trail-graph* + (dotimes (s5-0 6) + (let ((s4-0 (-> this trail s5-0))) + (when (and (-> s4-0 used-by) + (>= (-> s4-0 node-count) 0) + (not (time-elapsed? (the-as int (-> s4-0 last-updated)) (seconds 5))) + ) + (let* ((a3-0 (target-pos 0)) + (v1-12 s5-0) + (t1-0 (cond + ((zero? v1-12) + *color-green* + ) + ((= v1-12 1) + *color-blue* + ) + ((= v1-12 2) + *color-white* + ) + ((= v1-12 3) + *color-red* + ) + (else + *color-magenta* + ) + ) + ) + ) + (trail-graph-method-16 + *trail-graph* + (-> s4-0 node-count) + (-> s4-0 node-id) + a3-0 + (-> s4-0 cached-info orig-goal-pos) + t1-0 + (* 1024.0 (the float s5-0)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 14 of type minimap +;; WARN: Return type mismatch int vs none. +;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count] +(defmethod update-trails ((this minimap)) + (let ((s5-0 *trail-graph*)) + (when s5-0 + (.mtc0 Count 0) + (let ((v1-1 0)) + (while (< (the-as uint v1-1) (the-as uint #x605a)) + (let ((v1-2 (-> s5-0 mode))) + (cond + ((= v1-2 1) + (trail-graph-method-31 s5-0 #x605a) + ) + ((zero? v1-2) + (let ((v1-5 -1)) + (let ((a0-5 0)) + (countdown (a1-1 6) + (let* ((a2-3 (-> this trail a1-1)) + (a3-0 (-> a2-3 used-by)) + ) + (when (and a3-0 (and (< 0.0 (-> a3-0 alpha)) (or (< v1-5 0) (< (the-as int (-> a2-3 last-updated)) a0-5)))) + (set! v1-5 a1-1) + (set! a0-5 (the-as int (-> a2-3 last-updated))) + ) + ) + ) + (let ((a1-5 (current-time))) + (if (or (< v1-5 0) (= a0-5 a1-5)) + (goto cfg-68) + ) + ) + ) + (let ((s4-0 (-> this trail v1-5)) + (s3-0 (the-as vector #f)) + ) + (let* ((v1-9 (-> s4-0 used-by)) + (s2-0 (the-as structure (-> v1-9 position))) + ) + (set! s3-0 (cond + ((= (the-as vector s2-0) #t) + (let* ((s2-1 (handle->process (-> v1-9 handle))) + (v1-13 (if (type? s2-1 process-drawable) + s2-1 + ) + ) + ) + (if v1-13 + (set! s3-0 (-> (the-as process-drawable v1-13) root trans)) + ) + ) + s3-0 + ) + ((and (= (logand (the-as int s2-0) 7) 4) (= (-> (the-as basic s2-0) type) entity-actor)) + (let* ((v1-19 (the-as structure s2-0)) + (s3-1 (if (the-as vector v1-19) + (-> (the-as entity-actor v1-19) extra process) + ) + ) + (v1-21 (if (type? s3-1 process-drawable) + s3-1 + ) + ) + ) + (if v1-21 + (set! s3-0 (-> (the-as process-drawable v1-21) root trans)) + (set! s3-0 (-> (the-as entity-actor s2-0) extra trans)) + ) + ) + s3-0 + ) + (else + (the-as vector s2-0) + ) + ) + ) + ) + (when s3-0 + (let* ((s2-2 s5-0) + (s1-0 (method-of-object s2-2 trail-graph-method-29)) + ) + (target-pos 0) + (-> s4-0 cached-info) + (s1-0 s2-2) + ) + (set! (-> s4-0 search-id) (-> s5-0 search-id)) + ) + ) + ) + ) + ((or (= v1-2 3) (= v1-2 2)) + (countdown (v1-33 6) + (let ((s4-1 (-> this trail v1-33))) + (when (and (= (-> s4-1 search-id) (-> s5-0 search-id)) (-> s4-1 used-by)) + (let* ((a0-29 s5-0) + (t9-5 (method-of-object a0-29 trail-graph-method-21)) + ) + (-> s4-1 node-id) + 64 + (&-> s4-1 goal-node-id) + (&-> s4-1 node-path-dist) + (set! (-> s4-1 node-count) (the-as int (t9-5 a0-29))) + ) + (set! (-> s4-1 last-updated) (the-as uint (current-time))) + (goto cfg-64) + ) + ) + ) + (label cfg-64) + (trail-graph-method-26 s5-0) + ) + ) + ) + (.mfc0 v1-1 Count) + ) + ) + (label cfg-68) + 0 + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type minimap +(defmethod get-trail-for-connection ((this minimap) (arg0 connection-minimap) (arg1 symbol)) + (local-vars (gp-0 minimap-trail)) + (countdown (v1-0 6) + (let ((a3-3 (-> this trail v1-0))) + (when (= (-> a3-3 used-by) arg0) + (set! gp-0 a3-3) + (goto cfg-14) + ) + ) + ) + (when arg1 + (dotimes (v1-4 6) + (let ((a3-7 (-> this trail v1-4))) + (when (not (-> a3-7 used-by)) + (set! (-> a3-7 used-by) arg0) + (set! gp-0 a3-7) + (goto cfg-14) + ) + ) + ) + ) + (set! gp-0 (the-as minimap-trail #f)) + (label cfg-14) + (if (and gp-0 arg1) + (reset gp-0) + ) + gp-0 + ) + +;; definition for method 13 of type minimap +;; WARN: Return type mismatch int vs none. +;; WARN: Function (method 13 minimap) has a return type of none, but the expression builder found a return statement. +(defmethod free-trail-by-connection ((this minimap) (arg0 connection-minimap)) + (countdown (v1-0 6) + (let ((a2-3 (-> this trail v1-0))) + (when (= (-> a2-3 used-by) arg0) + (set! (-> a2-3 used-by) #f) + (reset a2-3) + (return #f) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type minimap-trail +;; WARN: Return type mismatch int vs none. +(defmethod reset ((this minimap-trail)) + (set! (-> this node-count) -1) + (set! (-> this search-id) (the-as uint 0)) + (set! (-> this last-updated) (the-as uint 0)) + (set! (-> this cached-info goal-conn-id) -1) + (none) + ) + +;; definition for method 11 of type minimap +;; INFO: Used lq/sq +(defmethod get-icon-draw-pos ((this minimap) (arg0 connection-minimap) (arg1 minimap-trail) (arg2 vector) (arg3 float) (arg4 vector)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'vector 4))) + (vector-reset! (-> s5-0 2)) + (vector-reset! (-> s5-0 1)) + (let ((s1-0 0)) + (while (>= (-> arg1 node-count) s1-0) + (set! (-> s5-0 0 quad) (-> s5-0 1 quad)) + (cond + ((< s1-0 (-> arg1 node-count)) + (trail-graph-method-20 *trail-graph* (-> arg1 node-id s1-0) (-> s5-0 1)) + (+! s1-0 1) + (vector-! (-> s5-0 1) (-> s5-0 1) arg2) + (set! (-> s5-0 1 x) (* (-> s5-0 1 x) arg3)) + (set! (-> s5-0 1 z) (* (-> s5-0 1 z) arg3)) + (set! (-> s5-0 1 y) 0.0) + (set! (-> s5-0 1 w) 1.0) + ) + (else + (vector-negate! (-> s5-0 1) arg4) + (+! s1-0 1) + ) + ) + (let ((v1-12 (-> s5-0 1))) + (when (>= (sqrtf (+ (* (-> v1-12 x) (-> v1-12 x)) (* (-> v1-12 z) (-> v1-12 z)))) 50.0) + (vector-! (-> s5-0 3) (-> s5-0 0) (-> s5-0 1)) + (let* ((f1-6 (ray-sphere-intersect (-> s5-0 1) (-> s5-0 3) (-> s5-0 2) 50.0)) + (f0-12 (fmax 0.0 (fmin 1.0 f1-6))) + ) + (vector-float*! arg4 (-> s5-0 3) f0-12) + ) + (vector+! arg4 arg4 (-> s5-0 1)) + (vector-negate! arg4 arg4) + (return #t) + ) + ) + ) + ) + ) + #f + ) + +;; definition for method 9 of type minimap-trail +(defmethod get-distance-with-path ((this minimap-trail) (arg0 vector) (arg1 vector)) + (local-vars (f30-1 float)) + 0.0 + (let ((s5-0 *trail-graph*)) + (cond + ((and s5-0 (> (-> this node-count) 0)) + (let ((f30-0 (-> this node-path-dist)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (trail-graph-method-20 s5-0 (-> this node-id 0) s3-0) + (set! f30-1 (+ f30-0 (vector-vector-xz-distance arg0 s3-0))) + (trail-graph-method-20 s5-0 (the-as uint (-> this goal-node-id)) s3-0) + ) + ) + (else + (set! f30-1 (vector-vector-xz-distance arg0 arg1)) + ) + ) + ) + f30-1 + ) + +;; definition for method 2 of type connection-minimap +(defmethod print ((this connection-minimap)) + (format + #t + "#" + (-> this class name) + (-> this flags) + (handle->process (-> this handle)) + this + ) + this + ) + +;; definition for method 3 of type engine-minimap +(defmethod inspect ((this engine-minimap)) + (call-parent-method this) + (let ((s5-0 0) + (s4-0 (-> *minimap* engine alive-list)) + ) + (while s4-0 + (let ((a3-0 s4-0)) + (format #t "~2T~3D: ~`connection-minimap`P~%" s5-0 a3-0) + ) + (+! s5-0 1) + (set! s4-0 (-> s4-0 next)) + ) + ) + this + ) + +;; definition for method 14 of type engine-minimap +;; WARN: Return type mismatch int vs none. +(defmethod run-pending-updates! ((this engine-minimap) (arg0 time-frame)) + "Run updates if they scheduled. If something is found that has no pending update, kill it. + Note that we won't kill things on this call if they fail to update their `update-time`. + They will survive until the next call to `run-pending-updates`! + (or you can modify their `update-time` before that to prevent them from being killed.)" + (let ((s2-0 (&-> this alive-list)) + (s3-0 (-> this alive-list)) + ) + (while s3-0 + (let ((s4-0 (-> s3-0 next))) + (when (or (bigmap-method-11 *bigmap*) (not (paused?))) + (cond + ((logtest? (-> s3-0 flags) (minimap-flag fade-out)) + (logclear! (-> s3-0 flags) (minimap-flag fade-in)) + (seek! (-> s3-0 alpha) 0.0 (seconds-per-frame)) + ) + ((and (logtest? (-> s3-0 flags) (minimap-flag task-graph)) + (not (logtest? (-> *setting-control* user-current minimap) 32)) + ) + (logior! (-> s3-0 flags) (minimap-flag fade-in)) + (seek! (-> s3-0 alpha) 0.0 (seconds-per-frame)) + ) + ((logtest? (-> s3-0 flags) (minimap-flag fade-in)) + (let ((f30-0 1.0)) + (when (logtest? (-> s3-0 class flags) (minimap-flag trail)) + (let ((v1-29 (get-trail-for-connection *minimap* s3-0 #f))) + (if (or (not v1-29) (time-elapsed? (the-as int (-> v1-29 last-updated)) (seconds 5))) + (set! f30-0 0.0001) + ) + ) + ) + (seek! (-> s3-0 alpha) f30-0 (seconds-per-frame)) + ) + (if (= (-> s3-0 alpha) 1.0) + (logclear! (-> s3-0 flags) (minimap-flag fade-in)) + ) + ) + ) + ) + (cond + ((and (logtest? (-> s3-0 flags) (minimap-flag fade-out)) (= (-> s3-0 alpha) 0.0)) + (kill-callback this s3-0) + (set! (-> s2-0 0) (-> s3-0 next)) + (set! (-> s3-0 next) (-> this dead-list)) + (set! (-> this dead-list) s3-0) + (+! (-> this length) -1) + ) + ((and (handle->process (-> s3-0 handle)) + (not (and (= (logand (the-as int (-> s3-0 position)) 7) 4) + (= (-> (the-as entity-actor (-> s3-0 position)) type) entity-actor) + (logtest? (-> (the-as entity-actor (-> s3-0 position)) extra perm status) + (entity-perm-status dead subtask-complete bit-12) + ) + ) + ) + ) + (update-callback this) + (set! s2-0 (&-> s3-0 next)) + ) + (else + (logior! (-> s3-0 flags) (minimap-flag fade-out)) + (update-callback this) + (set! s2-0 (&-> s3-0 next)) + ) + ) + (set! s3-0 s4-0) + ) + ) + ) + (set! (-> this execute-time) arg0) + 0 + (none) + ) + +;; definition for method 12 of type minimap +;; INFO: Used lq/sq +(defmethod add-icon! ((this minimap) (arg0 process) (arg1 uint) (arg2 int) (arg3 vector) (arg4 int)) + (when (not arg2) + (let ((v1-3 (+ (-> *minimap* engine-key) 1))) + (set! (-> *minimap* engine-key) v1-3) + (set! arg2 (the-as int v1-3)) + ) + ) + (let ((s3-0 (the-as connection-minimap (schedule-callback (-> this engine) arg2 0)))) + (let ((s2-1 (-> *minimap-class-list* arg1))) + (when s3-0 + (when (not (logtest? (-> s3-0 flags) (minimap-flag active))) + (set! (-> s3-0 class) s2-1) + (set! (-> s3-0 last-world-pos quad) (-> s2-1 default-position quad)) + (vector-! (-> s3-0 last-relative-pos) (target-pos 0) (-> s3-0 last-world-pos)) + (set! (-> s3-0 edge-ry) -131072) + ) + (set! (-> s3-0 handle) (process->handle arg0)) + (set! arg3 (cond + (arg3 + (empty) + arg3 + ) + (else + (-> s2-1 default-position) + ) + ) + ) + (set! (-> s3-0 position) arg3) + (set! (-> s3-0 flags) (minimap-flag active fade-in)) + (set! (-> s3-0 node) (the-as uint arg4)) + ) + ) + s3-0 + ) + ) + +;; definition for method 10 of type engine-minimap +;; WARN: Function (method 10 engine-minimap) has a return type of none, but the expression builder found a return statement. +(defmethod kill-callback ((this engine-minimap) (arg0 connection-pers)) + "Called when a connection is removed." + (if (not arg0) + (return #f) + ) + (if (logtest? (-> (the-as connection-minimap arg0) class flags) (minimap-flag trail)) + (free-trail-by-connection *minimap* (the-as connection-minimap arg0)) + ) + (set! (-> arg0 update-time) (the-as time-frame #f)) + ((method-of-type engine-pers kill-callback) this arg0) + (none) + ) + +;; definition for function lookup-minimap-texture-by-name +;; INFO: Used lq/sq +(defun lookup-minimap-texture-by-name ((arg0 string) (arg1 string) (arg2 (pointer texture-page))) + (local-vars (sv-16 texture-page)) + (dotimes (s3-0 11) + (let ((s2-0 (-> *level* level s3-0))) + (when (or (= (-> s2-0 status) 'active) (= (-> s2-0 status) 'reserved)) + (set! sv-16 (-> s2-0 texture-page 8)) + (when (and sv-16 (or (not arg1) (string= (-> sv-16 name) arg1))) + (dotimes (s1-0 (-> sv-16 length)) + (let ((s0-0 (-> sv-16 data s1-0))) + (when (and s0-0 (string= (-> s0-0 name) arg0)) + (if arg2 + (set! (-> arg2 0) sv-16) + ) + (set! (-> s2-0 texture-mask 8 mask quad) (-> s0-0 masks data 0 mask quad)) + (return s0-0) + ) + ) + ) + ) + ) + ) + ) + (the-as texture #f) + ) + +;; definition for symbol *minimap-table-entry-array*, type (array minimap-table-entry) +(define *minimap-table-entry-array* (new 'static 'boxed-array :type minimap-table-entry + (new 'static 'minimap-table-entry + :corner (new 'static 'vector :x 5270364.0 :z -3660800.0) + :level-name 'waswide + :tex-name "map-wascity" + :meters-per-texel 22118.4 + :pos-scale 5662310.5 + :min-inv-scale 0.5 + :max-inv-scale 1.0 + :switch-immediate #t + ) + (new 'static 'minimap-table-entry + :corner (new 'static 'vector :x -2048000.0 :z -2338816.0) + :level-name 'desert + :tex-name "map-desert" + :meters-per-texel 40960.0 + :pos-scale 20971520.0 + :min-inv-scale 1.0 + :max-inv-scale 1.0 + :switch-immediate #f + ) + (new 'static 'minimap-table-entry + :corner (new 'static 'vector :x 5270364.0 :z -3660800.0) + :level-name 'wasdoors + :tex-name "map-wasdoors" + :meters-per-texel 22118.4 + :pos-scale 5662310.5 + :min-inv-scale 0.5 + :max-inv-scale 0.5 + :switch-immediate #f + ) + (new 'static 'minimap-table-entry + :corner (new 'static 'vector :x 4505600.0 :z 3442688.0) + :level-name 'lwassig + :tex-name "map-nst-lower" + :meters-per-texel 25600.0 + :pos-scale 6553600.0 + :min-inv-scale 0.5 + :max-inv-scale 0.5 + :switch-immediate #f + ) + (new 'static 'minimap-table-entry + :corner (new 'static 'vector :x 1662976.0 :z 163840.0) + :level-name 'nsta + :tex-name "map-nst-upper" + :meters-per-texel 25600.0 + :pos-scale 6553600.0 + :min-inv-scale 0.5 + :max-inv-scale 0.5 + :switch-immediate #t + ) + (new 'static 'minimap-table-entry + :corner (new 'static 'vector :x -1433600.0 :z -1433600.0) + :level-name 'factoryb + :tex-name "map-factoryb" + :meters-per-texel 20480.0 + :pos-scale 5242880.0 + :min-inv-scale 0.4 + :max-inv-scale 0.4 + :switch-immediate #t + ) + (new 'static 'minimap-table-entry + :corner (new 'static 'vector :x -3909755.0 :z 3309977.5) + :level-name 'foresta + :tex-name "map-forest" + :meters-per-texel 8519.68 + :pos-scale 2181038.0 + :min-inv-scale 0.15 + :max-inv-scale 0.15 + :switch-immediate #t + ) + (new 'static 'minimap-table-entry + :corner (new 'static 'vector :x -2129920.0 :z -2338816.0) + :level-name 'jakx + :tex-name "map-desert" + :meters-per-texel 40960.0 + :pos-scale 20971520.0 + :min-inv-scale 1.0 + :max-inv-scale 1.0 + :switch-immediate #t + ) + ) + ) + +;; definition for method 20 of type minimap +;; INFO: Used lq/sq +(defmethod update! ((this minimap)) + (set! (-> this map-bits) (the-as uint 0)) + (let* ((s5-0 (the-as level #f)) + (s4-0 *minimap-table-entry-array*) + (v1-0 (-> s4-0 length)) + (s3-0 99) + ) + (let ((a0-2 (-> *setting-control* user-current minimap-level))) + (dotimes (a1-0 (-> *level* length)) + (let ((a2-3 (-> *level* level a1-0))) + (when (= (-> a2-3 status) 'active) + (set! (-> this map-bits) (logior (the-as city-map-bits (-> this map-bits)) (-> a2-3 info city-map-bits))) + (dotimes (a3-5 v1-0) + (cond + (a0-2 + (when (= a0-2 (-> s4-0 a3-5 level-name)) + (set! s3-0 a3-5) + (set! s5-0 a2-3) + ) + ) + ((and (= (-> a2-3 name) (-> s4-0 a3-5 level-name)) (< a3-5 s3-0)) + (set! s3-0 a3-5) + (set! s5-0 a2-3) + ) + ) + ) + ) + ) + ) + ) + (cond + (s5-0 + (when (not (paused?)) + (seek! (-> this min-inv-scale) (-> s4-0 s3-0 min-inv-scale) (* 0.5 (seconds-per-frame))) + (seek! (-> this max-inv-scale) (-> s4-0 s3-0 max-inv-scale) (* 0.5 (seconds-per-frame))) + ) + (when (or (-> s4-0 s3-0 switch-immediate) + (and (= (-> this min-inv-scale) (-> s4-0 s3-0 min-inv-scale)) + (= (-> this max-inv-scale) (-> s4-0 s3-0 max-inv-scale)) + ) + ) + (set! (-> this last-name) (-> s4-0 s3-0 tex-name)) + (set! (-> this minimap-corner quad) (-> s4-0 s3-0 corner quad)) + (set! (-> this meters-per-texel) (-> s4-0 s3-0 meters-per-texel)) + (set! (-> this pos-scale) (-> s4-0 s3-0 pos-scale)) + (set! (-> this level) s5-0) + (set! (-> this ctywide) s5-0) + (cond + ((= (-> this level name) 'lwassig) + (if (level-get *level* 'nsta) + (set! (-> this map-bits) (the-as uint 1)) + ) + ) + (else + (set! (-> this map-bits) (the-as uint 1)) + ) + ) + ) + ) + (else + (set! (-> this ctywide) (level-get *level* 'ctywide)) + (let ((s5-1 (the int (* 0.0000006357829 (+ 3145728.0 (-> (target-pos 0) x))))) + (s4-1 (the int (* 0.0000006357829 (+ 3145728.0 (-> (target-pos 0) z))))) + ) + (set! (-> this meters-per-texel) 16384.0) + (set! (-> this pos-scale) (* 256.0 (-> this meters-per-texel))) + (when (not (paused?)) + (seek! (-> this min-inv-scale) 0.25 (* 0.5 (seconds-per-frame))) + (seek! (-> this max-inv-scale) 0.5 (* 0.5 (seconds-per-frame))) + ) + (when (and (< s5-1 5) (< s4-1 7) (logtest? (-> this map-bits) (ash 1 (+ (* 5 s4-1) s5-1)))) + (let ((a0-23 (-> *minimap-texture-name-array* data (+ (* 5 s4-1) s5-1)))) + (when a0-23 + (set! (-> this last-name) a0-23) + (set! (-> this minimap-corner quad) (-> *minimap-corner-array* data (+ (* 5 s4-1) s5-1) quad)) + (dotimes (v1-69 (-> *level* length)) + (let ((a0-34 (-> *level* level v1-69))) + (when (= (-> a0-34 status) 'active) + (if (logtest? (-> a0-34 info city-map-bits) (ash 1 (+ (* 5 s4-1) s5-1))) + (set! (-> this level) a0-34) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (cond + ((string= (-> this last-name) "map-nst-upper") + (cond + ((or (and (task-node-closed? (game-task-node nest-eggs-introduction)) + (not (task-node-closed? (game-task-node nest-eggs-gas))) + ) + (and (task-node-closed? (game-task-node nest-hunt-introduction)) + (not (task-node-closed? (game-task-node nest-hunt-resolution))) + ) + ) + (if (task-node-closed? (game-task-node nest-eggs-resolution)) + (set! (-> this last-name) "map-nst-upper-2") + ) + ) + (else + (set! (-> this last-name) #f) + ) + ) + ) + ((string= (-> this last-name) "map-forest") + (if (not (or (and (task-node-closed? (game-task-node forest-kill-plants-introduction)) + (not (task-node-closed? (game-task-node forest-kill-plants-resolution))) + ) + (and (task-node-closed? (game-task-node forest-turn-on-machine-introduction)) + (not (task-node-closed? (game-task-node precursor-tour-introduction))) + ) + ) + ) + (set! (-> this last-name) #f) + ) + ) + ) + (set! (-> this last-tex) + (lookup-minimap-texture-by-name (-> this last-name) (the-as string #f) (the-as (pointer texture-page) #f)) + ) + (let ((f30-2 (seconds-per-frame))) + (let ((v1-84 (-> this last-tex))) + (cond + ((or (not (-> this level)) (zero? (-> this level)) (!= (-> this level status) 'active) (not v1-84)) + (set! (-> this offset w) 0.0) + ) + ((not (logtest? (-> *setting-control* user-current minimap) 128)) + (seek! (-> this offset w) 0.0 f30-2) + ) + ((and *target* (nonzero? (-> this map-bits))) + (set! (-> this offset w) (fmin 0.5 (+ (-> this offset w) f30-2))) + ) + (else + (set! (-> this offset w) 0.0) + ) + ) + ) + (cond + ((and *target* (or (focus-test? *target* board pilot) (= (-> this min-inv-scale) (-> this max-inv-scale)))) + (let ((f0-40 0.000008138021) + (f1-10 122880.0) + (v1-105 (-> *target* control transv)) + ) + (set! (-> this target-inv-scale) + (fmax + (fmin + (* f0-40 (fmin f1-10 (sqrtf (+ (* (-> v1-105 x) (-> v1-105 x)) (* (-> v1-105 z) (-> v1-105 z)))))) + (-> this max-inv-scale) + ) + (-> this min-inv-scale) + ) + ) + ) + ) + (else + (set! (-> this target-inv-scale) 0.5) + ) + ) + (seek! (-> this offset y) (-> this target-inv-scale) (* 0.5 f30-2)) + ) + (set! (-> this icon-inv-scale) (/ (* 32768.0 (-> this offset y)) (-> this meters-per-texel))) + (set! (-> this map-inv-scale) + (/ (* 256.0 (-> this meters-per-texel) (-> this icon-inv-scale)) (-> this pos-scale)) + ) + (set! (-> this icon-inv-scale) (* 1.1428572 (-> this icon-inv-scale))) + (run-pending-updates! (-> this engine) (-> *display* base-clock frame-counter)) + (when (and (-> this ctywide) (and (= (-> this ctywide status) 'active) (!= (-> this offset w) 0.0))) + (update-trails this) + (if *display-trail-graph* + (debug-draw this) + ) + #t + ) + ) + +;; definition for method 23 of type minimap +;; INFO: Used lq/sq +;; WARN: Return type mismatch pointer vs none. +(defmethod draw-racer-2 ((this minimap) (arg0 minimap-draw-work) (arg1 connection-minimap)) + (local-vars + (sv-16 process) + (sv-20 dma-buffer) + (sv-208 pointer) + (sv-212 vector) + (sv-216 vector) + (sv-220 vector) + (sv-224 matrix) + (sv-228 matrix) + ) + (let ((s3-0 (handle->process (-> arg1 handle)))) + (set! sv-16 (if (type? s3-0 process-drawable) + s3-0 + ) + ) + ) + (set! sv-20 (-> arg0 buf)) + (when (and sv-16 (nonzero? (-> (the-as process-drawable sv-16) root))) + (set! sv-208 (-> sv-20 base)) + (set! sv-212 (new 'stack-no-clear 'vector)) + (set! sv-216 (new 'stack-no-clear 'vector)) + (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 y) 0.0) + (vector-normalize! sv-216 1.0) + (vector-z-quaternion! sv-220 (-> (the-as process-drawable sv-16) root quat)) + (vector-xz-normalize! sv-220 1.0) + (set! (-> sv-220 y) 0.0) + (set! (-> sv-220 w) 0.0) + (vector-! sv-212 (target-pos 0) (-> (the-as process-drawable sv-16) root trans)) + (let ((f0-4 (/ (-> sv-212 x) (* (-> this meters-per-texel) (-> this icon-inv-scale)))) + (f1-3 (/ (-> sv-212 z) (* (-> this meters-per-texel) (-> this icon-inv-scale)))) + ) + (set-vector! (-> sv-224 rvec) (-> sv-216 z) 0.0 (- (-> sv-216 x)) 0.0) + (set-vector! (-> sv-224 uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> sv-224 fvec) (-> sv-216 x) 0.0 (-> sv-216 z) 0.0) + (set-vector! (-> sv-224 trans) 164.0 0.0 164.0 1.0) + (set-vector! (-> sv-228 rvec) (-> sv-220 z) 0.0 (- (-> sv-220 x)) 0.0) + (set-vector! (-> sv-228 uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> sv-228 fvec) (-> sv-220 x) 0.0 (-> sv-220 z) 0.0) + (set-vector! (-> sv-228 trans) f0-4 0.0 f1-3 1.0) + ) + (let ((v1-42 (-> sv-228 trans))) + (when (< (sqrtf (+ (* (-> v1-42 x) (-> v1-42 x)) (* (-> v1-42 z) (-> v1-42 z)))) 50.0) + (matrix*! sv-228 sv-228 sv-224) + (let ((f0-12 7.0)) + (set-vector! (-> arg0 corner 0) 0.0 0.0 (- f0-12) 1.0) + (set-vector! (-> arg0 corner 1) f0-12 0.0 0.0 1.0) + (set-vector! (-> arg0 corner 2) (- f0-12) 0.0 0.0 1.0) + (set-vector! (-> arg0 corner 3) 0.0 0.0 f0-12 1.0) + ) + (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) sv-228) + (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) sv-228) + (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) sv-228) + (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) sv-228) + (let* ((a0-38 (-> arg1 class color)) + (a0-45 (copy-and-set-field a0-38 r (shr (* (-> a0-38 r) (the-as uint (-> this color x))) 7))) + (a0-52 (copy-and-set-field a0-45 g (shr (* (-> a0-45 g) (the-as uint (-> this color y))) 7))) + (v1-59 + (copy-and-set-field + (copy-and-set-field a0-52 b (shr (* (-> a0-52 b) (the-as uint (-> this color z))) 7)) + a + (the int (* 128.0 (-> arg1 alpha))) + ) + ) + ) + (let ((a0-65 (-> this draw4-tmpl dma-vif quad))) + (set! (-> (the-as (pointer uint128) sv-208)) a0-65) + ) + (let ((a0-66 (-> this draw4-tmpl quad 1))) + (set! (-> (the-as (pointer uint128) sv-208) 1) a0-66) + ) + (set-vector! + (-> (the-as (inline-array vector4w) sv-208) 2) + (the-as int (-> v1-59 r)) + (the-as int (-> v1-59 g)) + (the-as int (-> v1-59 b)) + (the-as int (-> v1-59 a)) + ) + ) + (let ((v1-62 (the-as object (&+ sv-208 48)))) + (set! (-> (the-as (inline-array vector) v1-62) 0 x) 0.0) + (set! (-> (the-as (inline-array vector) v1-62) 0 y) 0.0) + (set! (-> (the-as (inline-array vector) v1-62) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-62) 0 w) 0.0) + ) + (let ((v1-64 (the-as object (&+ sv-208 64)))) + (set! (-> (the-as (inline-array vector4w) v1-64) 0 x) (the int (* 16.0 (-> arg0 corner 0 x)))) + (set! (-> (the-as (inline-array vector4w) v1-64) 0 y) (the int (* 16.0 (-> arg0 corner 0 z)))) + (set! (-> (the-as (inline-array vector4w) v1-64) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-64) 0 w) 0) + ) + (let ((v1-66 (the-as object (&+ sv-208 80)))) + (set! (-> (the-as (inline-array vector) v1-66) 0 x) 1.0) + (set! (-> (the-as (inline-array vector) v1-66) 0 y) 0.0) + (set! (-> (the-as (inline-array vector) v1-66) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-66) 0 w) 0.0) + ) + (let ((v1-68 (the-as object (&+ sv-208 96)))) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 x) (the int (* 16.0 (-> arg0 corner 1 x)))) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 y) (the int (* 16.0 (-> arg0 corner 1 z)))) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 w) 0) + ) + (let ((v1-70 (the-as object (&+ sv-208 112)))) + (set! (-> (the-as (inline-array vector) v1-70) 0 x) 0.0) + (set! (-> (the-as (inline-array vector) v1-70) 0 y) 1.0) + (set! (-> (the-as (inline-array vector) v1-70) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-70) 0 w) 0.0) + ) + (let ((v1-72 (the-as object (&+ sv-208 128)))) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 x) (the int (* 16.0 (-> arg0 corner 2 x)))) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 y) (the int (* 16.0 (-> arg0 corner 2 z)))) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 w) 0) + ) + (let ((v1-74 (the-as object (&+ sv-208 144)))) + (set! (-> (the-as (inline-array vector) v1-74) 0 x) 1.0) + (set! (-> (the-as (inline-array vector) v1-74) 0 y) 1.0) + (set! (-> (the-as (inline-array vector) v1-74) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-74) 0 w) 0.0) + ) + (let ((v1-76 (the-as object (&+ sv-208 160)))) + (set! (-> (the-as (inline-array vector4w) v1-76) 0 x) (the int (* 16.0 (-> arg0 corner 3 x)))) + (set! (-> (the-as (inline-array vector4w) v1-76) 0 y) (the int (* 16.0 (-> arg0 corner 3 z)))) + (set! (-> (the-as (inline-array vector4w) v1-76) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-76) 0 w) 0) + ) + (&+! (-> sv-20 base) 176) + ) + ) + ) + (none) + ) + +;; definition for method 26 of type minimap +;; INFO: Used lq/sq +;; WARN: Return type mismatch pointer vs none. +(defmethod draw-racer-1 ((this minimap) (arg0 minimap-draw-work) (arg1 connection-minimap) (arg2 float) (arg3 float) (arg4 float)) + (local-vars + (sv-16 process) + (sv-20 float) + (sv-24 dma-buffer) + (sv-128 pointer) + (sv-132 vector) + (sv-136 vector) + (sv-140 matrix) + ) + (let ((s0-0 (handle->process (-> arg1 handle)))) + (set! sv-16 (if (type? s0-0 process-drawable) + s0-0 + ) + ) + ) + (set! sv-20 (-> *video-params* relative-x-scale)) + (set! sv-24 (-> arg0 buf)) + (when (and sv-16 (nonzero? (-> (the-as process-drawable sv-16) root))) + (set! sv-128 (-> sv-24 base)) + (set! sv-132 (new 'stack-no-clear 'vector)) + (set! sv-136 (new 'stack-no-clear 'vector)) + (set! sv-140 (new 'stack-no-clear 'matrix)) + (vector-z-quaternion! sv-136 (-> (the-as process-drawable sv-16) root quat)) + (vector-xz-normalize! sv-136 -1.0) + (set! (-> sv-136 y) 0.0) + (set! (-> sv-136 w) 0.0) + (vector-! sv-132 (-> (the-as process-drawable sv-16) root trans) (-> this race-corner)) + (cond + ((get-horizontal-flip-flag *blit-displays-work*) + (let ((f0-4 (+ arg3 (* (- 128.0 (/ (-> sv-132 x) arg2)) sv-20))) + (f1-4 (+ arg4 (/ (-> sv-132 z) arg2))) + ) + (set-vector! (-> sv-140 rvec) (-> sv-136 z) 0.0 (-> sv-136 x) 0.0) + (set-vector! (-> sv-140 uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> sv-140 fvec) (- (-> sv-136 x)) 0.0 (-> sv-136 z) 0.0) + (set-vector! (-> sv-140 trans) f0-4 0.0 f1-4 1.0) + ) + ) + (else + (let ((f0-8 (+ arg3 (* (/ (-> sv-132 x) arg2) sv-20))) + (f1-9 (+ arg4 (/ (-> sv-132 z) arg2))) + ) + (set-vector! (-> sv-140 rvec) (-> sv-136 z) 0.0 (- (-> sv-136 x)) 0.0) + (set-vector! (-> sv-140 uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> sv-140 fvec) (-> sv-136 x) 0.0 (-> sv-136 z) 0.0) + (set-vector! (-> sv-140 trans) f0-8 0.0 f1-9 1.0) + ) + ) + ) + (let ((f0-11 7.0)) + (set-vector! (-> arg0 corner 0) 0.0 0.0 (- f0-11) 1.0) + (set-vector! (-> arg0 corner 1) f0-11 0.0 0.0 1.0) + (set-vector! (-> arg0 corner 2) (- f0-11) 0.0 0.0 1.0) + (set-vector! (-> arg0 corner 3) 0.0 0.0 f0-11 1.0) + ) + (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) sv-140) + (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) sv-140) + (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) sv-140) + (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) sv-140) + (let* ((a0-33 (-> arg1 class color)) + (a0-40 (copy-and-set-field a0-33 r (shr (* (-> a0-33 r) (the-as uint (-> this color x))) 7))) + (a0-47 (copy-and-set-field a0-40 g (shr (* (-> a0-40 g) (the-as uint (-> this color y))) 7))) + (v1-57 (copy-and-set-field + (copy-and-set-field a0-47 b (shr (* (-> a0-47 b) (the-as uint (-> this color z))) 7)) + a + (the int (* 128.0 (-> arg1 alpha))) + ) + ) + ) + (let ((a0-60 (-> this draw4-tmpl dma-vif quad))) + (set! (-> (the-as (pointer uint128) sv-128)) a0-60) + ) + (let ((a0-61 (-> this draw4-tmpl quad 1))) + (set! (-> (the-as (pointer uint128) sv-128) 1) a0-61) + ) + (let ((a0-63 (the-as object (&+ sv-128 32)))) + (set! (-> (the-as (inline-array vector4w) a0-63) 0 x) (the-as int (-> v1-57 r))) + (set! (-> (the-as (inline-array vector4w) a0-63) 0 y) (the-as int (-> v1-57 g))) + (set! (-> (the-as (inline-array vector4w) a0-63) 0 z) (the-as int (-> v1-57 b))) + (set! (-> (the-as (inline-array vector4w) a0-63) 0 w) (the-as int (-> v1-57 a))) + ) + ) + (let ((v1-60 (the-as object (&+ sv-128 48)))) + (set! (-> (the-as (inline-array vector) v1-60) 0 x) 0.0) + (set! (-> (the-as (inline-array vector) v1-60) 0 y) 0.0) + (set! (-> (the-as (inline-array vector) v1-60) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-60) 0 w) 0.0) + ) + (let ((v1-62 (the-as object (&+ sv-128 64)))) + (set! (-> (the-as (inline-array vector4w) v1-62) 0 x) (the int (* 16.0 (-> arg0 corner 0 x)))) + (set! (-> (the-as (inline-array vector4w) v1-62) 0 y) (the int (* 16.0 (-> arg0 corner 0 z)))) + (set! (-> (the-as (inline-array vector4w) v1-62) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-62) 0 w) 0) + ) + (let ((v1-64 (the-as object (&+ sv-128 80)))) + (set! (-> (the-as (inline-array vector) v1-64) 0 x) 1.0) + (set! (-> (the-as (inline-array vector) v1-64) 0 y) 0.0) + (set! (-> (the-as (inline-array vector) v1-64) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-64) 0 w) 0.0) + ) + (let ((v1-66 (the-as object (&+ sv-128 96)))) + (set! (-> (the-as (inline-array vector4w) v1-66) 0 x) (the int (* 16.0 (-> arg0 corner 1 x)))) + (set! (-> (the-as (inline-array vector4w) v1-66) 0 y) (the int (* 16.0 (-> arg0 corner 1 z)))) + (set! (-> (the-as (inline-array vector4w) v1-66) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-66) 0 w) 0) + ) + (let ((v1-68 (the-as object (&+ sv-128 112)))) + (set! (-> (the-as (inline-array vector) v1-68) 0 x) 0.0) + (set! (-> (the-as (inline-array vector) v1-68) 0 y) 1.0) + (set! (-> (the-as (inline-array vector) v1-68) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-68) 0 w) 0.0) + ) + (let ((v1-70 (the-as object (&+ sv-128 128)))) + (set! (-> (the-as (inline-array vector4w) v1-70) 0 x) (the int (* 16.0 (-> arg0 corner 2 x)))) + (set! (-> (the-as (inline-array vector4w) v1-70) 0 y) (the int (* 16.0 (-> arg0 corner 2 z)))) + (set! (-> (the-as (inline-array vector4w) v1-70) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-70) 0 w) 0) + ) + (let ((v1-72 (the-as object (&+ sv-128 144)))) + (set! (-> (the-as (inline-array vector) v1-72) 0 x) 1.0) + (set! (-> (the-as (inline-array vector) v1-72) 0 y) 1.0) + (set! (-> (the-as (inline-array vector) v1-72) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-72) 0 w) 0.0) + ) + (let ((v1-74 (the-as object (&+ sv-128 160)))) + (set! (-> (the-as (inline-array vector4w) v1-74) 0 x) (the int (* 16.0 (-> arg0 corner 3 x)))) + (set! (-> (the-as (inline-array vector4w) v1-74) 0 y) (the int (* 16.0 (-> arg0 corner 3 z)))) + (set! (-> (the-as (inline-array vector4w) v1-74) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-74) 0 w) 0) + ) + (&+! (-> sv-24 base) 176) + ) + (none) + ) + +;; definition for method 17 of type minimap +;; INFO: Used lq/sq +;; WARN: Return type mismatch pointer vs none. +(defmethod draw-frustum-1 ((this minimap) (arg0 minimap-draw-work) (arg1 connection-minimap)) + (local-vars + (sv-16 process) + (sv-20 dma-buffer) + (sv-208 pointer) + (sv-212 texture) + (sv-216 vector) + (sv-220 vector) + (sv-224 vector) + (sv-228 matrix) + (sv-232 matrix) + ) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (let ((s3-0 (handle->process (-> arg1 handle)))) + (set! sv-16 (if (type? s3-0 process-drawable) + s3-0 + ) + ) + ) + (set! sv-20 (-> arg0 buf)) + (when (and sv-16 (nonzero? (-> (the-as process-drawable sv-16) root))) + (set! sv-208 (-> sv-20 base)) + (set! sv-212 (get-texture map-guard-frustum level-default-minimap)) + (set! sv-216 (new 'stack-no-clear 'vector)) + (set! sv-220 (new 'stack-no-clear 'vector)) + (set! sv-224 (new 'stack-no-clear 'vector)) + (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 y) 0.0) + (vector-normalize! sv-220 1.0) + (vector-z-quaternion! sv-224 (-> (the-as process-drawable sv-16) root quat)) + (vector-xz-normalize! sv-224 1.0) + (set! (-> sv-224 y) 0.0) + (set! (-> sv-224 w) 0.0) + (vector-! sv-216 (target-pos 0) (-> (the-as process-drawable sv-16) root trans)) + (let ((f0-4 (/ (-> sv-216 x) (* (-> this meters-per-texel) (-> this map-inv-scale)))) + (f1-3 (/ (-> sv-216 z) (* (-> this meters-per-texel) (-> this map-inv-scale)))) + ) + (set-vector! (-> sv-228 rvec) (-> sv-220 z) 0.0 (- (-> sv-220 x)) 0.0) + (set-vector! (-> sv-228 uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> sv-228 fvec) (-> sv-220 x) 0.0 (-> sv-220 z) 0.0) + (set-vector! (-> sv-228 trans) 164.0 0.0 164.0 1.0) + (set-vector! (-> sv-232 rvec) (-> sv-224 z) 0.0 (- (-> sv-224 x)) 0.0) + (set-vector! (-> sv-232 uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> sv-232 fvec) (-> sv-224 x) 0.0 (-> sv-224 z) 0.0) + (set-vector! (-> sv-232 trans) f0-4 0.0 f1-3 1.0) + ) + (matrix*! sv-232 sv-232 sv-228) + (let ((f0-8 (/ -10.0 (-> this map-inv-scale)))) + (set-vector! (-> arg0 corner 0) 0.0 0.0 0.0 1.0) + (set-vector! (-> arg0 corner 1) (- f0-8) 0.0 f0-8 1.0) + (set-vector! (-> arg0 corner 2) f0-8 0.0 f0-8 1.0) + (set-vector! (-> arg0 corner 3) 0.0 0.0 (* 2.0 f0-8) 1.0) + ) + (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) sv-232) + (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) sv-232) + (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) sv-232) + (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) sv-232) + (let ((v1-47 (new 'stack-no-clear 'vector)) + (a0-40 (new 'stack-no-clear 'vector)) + ) + (.lvf vf1 (&-> arg0 corner 0 quad)) + (.lvf vf2 (&-> arg0 corner 1 quad)) + (.lvf vf3 (&-> arg0 corner 2 quad)) + (.lvf vf4 (&-> arg0 corner 3 quad)) + (.min.vf vf5 vf1 vf2) + (.min.vf vf5 vf5 vf3) + (.min.vf vf5 vf5 vf4) + (.max.vf vf6 vf1 vf2) + (.max.vf vf6 vf6 vf3) + (.max.vf vf6 vf6 vf4) + (.svf (&-> v1-47 quad) vf5) + (.svf (&-> a0-40 quad) vf6) + (when (and (< (-> a0-40 x) 228.0) (< (-> a0-40 z) 228.0) (< 100.0 (-> v1-47 x)) (< 100.0 (-> v1-47 z))) + (let* ((a0-46 (-> arg1 class color)) + (a0-53 (copy-and-set-field a0-46 r (shr (* (-> a0-46 r) (the-as uint (-> this color x))) 7))) + (a0-60 (copy-and-set-field a0-53 g (shr (* (-> a0-53 g) (the-as uint (-> this color y))) 7))) + (s4-1 (copy-and-set-field + (copy-and-set-field a0-60 b (shr (* (-> a0-60 b) (the-as uint (-> this color z))) 7)) + a + (the int (* 128.0 (-> this frustum-alpha) (-> arg1 alpha))) + ) + ) + ) + (let ((v1-58 (-> this adgif-tmpl dma-vif quad))) + (set! (-> (the-as (pointer uint128) sv-208) 0) v1-58) + ) + (let ((v1-59 (-> this adgif-tmpl quad 1))) + (set! (-> (the-as (pointer uint128) sv-208) 1) v1-59) + ) + (adgif-shader<-texture-simple! (the-as adgif-shader (&+ sv-208 32)) sv-212) + (let ((v1-61 (-> this draw4-tmpl dma-vif quad))) + (set! (-> (the-as (pointer uint128) sv-208) 7) v1-61) + ) + (let ((v1-62 (-> this draw4-tmpl quad 1))) + (set! (-> (the-as (pointer uint128) sv-208) 8) v1-62) + ) + (let ((v1-64 (the-as object (&+ sv-208 144)))) + (set! (-> (the-as (inline-array vector4w) v1-64) 0 x) (the-as int (-> s4-1 r))) + (set! (-> (the-as (inline-array vector4w) v1-64) 0 y) (the-as int (-> s4-1 g))) + (set! (-> (the-as (inline-array vector4w) v1-64) 0 z) (the-as int (-> s4-1 b))) + (set! (-> (the-as (inline-array vector4w) v1-64) 0 w) (the-as int (-> s4-1 a))) + ) + ) + (let ((v1-66 (the-as object (&+ sv-208 160)))) + (set! (-> (the-as (inline-array vector) v1-66) 0 x) 0.0) + (set! (-> (the-as (inline-array vector) v1-66) 0 y) 0.0) + (set! (-> (the-as (inline-array vector) v1-66) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-66) 0 w) 0.0) + ) + (let ((v1-68 (the-as object (&+ sv-208 176)))) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 x) (the int (* 16.0 (-> arg0 corner 0 x)))) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 y) (the int (* 16.0 (-> arg0 corner 0 z)))) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 w) 0) + ) + (let ((v1-70 (the-as object (&+ sv-208 192)))) + (set! (-> (the-as (inline-array vector) v1-70) 0 x) 1.0) + (set! (-> (the-as (inline-array vector) v1-70) 0 y) 0.0) + (set! (-> (the-as (inline-array vector) v1-70) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-70) 0 w) 0.0) + ) + (let ((v1-72 (the-as object (&+ sv-208 208)))) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 x) (the int (* 16.0 (-> arg0 corner 1 x)))) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 y) (the int (* 16.0 (-> arg0 corner 1 z)))) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 w) 0) + ) + (let ((v1-74 (the-as object (&+ sv-208 224)))) + (set! (-> (the-as (inline-array vector) v1-74) 0 x) 0.0) + (set! (-> (the-as (inline-array vector) v1-74) 0 y) 1.0) + (set! (-> (the-as (inline-array vector) v1-74) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-74) 0 w) 0.0) + ) + (let ((v1-76 (the-as object (&+ sv-208 240)))) + (set! (-> (the-as (inline-array vector4w) v1-76) 0 x) (the int (* 16.0 (-> arg0 corner 2 x)))) + (set! (-> (the-as (inline-array vector4w) v1-76) 0 y) (the int (* 16.0 (-> arg0 corner 2 z)))) + (set! (-> (the-as (inline-array vector4w) v1-76) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) v1-76) 0 w) 0) + ) + (let ((v1-78 (the-as object (&+ sv-208 256)))) + (set! (-> (the-as (inline-array vector) v1-78) 0 x) 1.0) + (set! (-> (the-as (inline-array vector) v1-78) 0 y) 1.0) + (set! (-> (the-as (inline-array vector) v1-78) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-78) 0 w) 0.0) + ) + (let ((v1-80 (the-as object (&+ sv-208 272)))) + (set! (-> (the-as (inline-array vector4w) v1-80) 0 x) (the int (* 16.0 (-> arg0 corner 3 x)))) + (set! (-> (the-as (inline-array vector4w) v1-80) 0 y) (the int (* 16.0 (-> arg0 corner 3 z)))) + (set! (-> (the-as (inline-array vector4w) v1-80) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) v1-80) 0 w) 0) + ) + (&+! (-> sv-20 base) 288) + ) + ) + ) + ) + (none) + ) + ) + +;; definition for method 18 of type minimap +;; INFO: Used lq/sq +;; WARN: Return type mismatch pointer vs none. +(defmethod draw-frustum-2 ((this minimap) (arg0 minimap-draw-work) (arg1 connection-minimap)) + (local-vars + (sv-16 process) + (sv-20 dma-buffer) + (sv-208 pointer) + (sv-212 texture) + (sv-216 vector) + (sv-220 vector) + (sv-224 vector) + (sv-228 matrix) + (sv-232 matrix) + ) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (let ((s3-0 (handle->process (-> arg1 handle)))) + (set! sv-16 (if (type? s3-0 process-drawable) + s3-0 + ) + ) + ) + (set! sv-20 (-> arg0 buf)) + (when (and sv-16 (nonzero? (-> (the-as process-drawable sv-16) root))) + (set! sv-208 (-> sv-20 base)) + (set! sv-212 (get-texture map-guard-frustum level-default-minimap)) + (set! sv-216 (new 'stack-no-clear 'vector)) + (set! sv-220 (new 'stack-no-clear 'vector)) + (set! sv-224 (new 'stack-no-clear 'vector)) + (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 y) 0.0) + (vector-normalize! sv-220 1.0) + (vector-z-quaternion! sv-224 (-> (the-as process-drawable sv-16) root quat)) + (vector-xz-normalize! sv-224 1.0) + (set! (-> sv-224 y) 0.0) + (set! (-> sv-224 w) 0.0) + (vector-! sv-216 (target-pos 0) (-> (the-as process-drawable sv-16) root trans)) + (let ((f0-4 (/ (-> sv-216 x) (* (-> this meters-per-texel) (-> this map-inv-scale)))) + (f1-3 (/ (-> sv-216 z) (* (-> this meters-per-texel) (-> this map-inv-scale)))) + ) + (set-vector! (-> sv-228 rvec) (-> sv-220 z) 0.0 (- (-> sv-220 x)) 0.0) + (set-vector! (-> sv-228 uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> sv-228 fvec) (-> sv-220 x) 0.0 (-> sv-220 z) 0.0) + (set-vector! (-> sv-228 trans) 164.0 0.0 164.0 1.0) + (set-vector! (-> sv-232 rvec) (-> sv-224 z) 0.0 (- (-> sv-224 x)) 0.0) + (set-vector! (-> sv-232 uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> sv-232 fvec) (-> sv-224 x) 0.0 (-> sv-224 z) 0.0) + (set-vector! (-> sv-232 trans) f0-4 0.0 f1-3 1.0) + ) + (matrix*! sv-232 sv-232 sv-228) + (let ((f0-7 12.0)) + (set-vector! (-> arg0 corner 0) (- f0-7) 0.0 0.0 1.0) + (set-vector! (-> arg0 corner 1) 0.0 0.0 f0-7 1.0) + (set-vector! (-> arg0 corner 2) 0.0 0.0 (- f0-7) 1.0) + (set-vector! (-> arg0 corner 3) f0-7 0.0 0.0 1.0) + ) + (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) sv-232) + (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) sv-232) + (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) sv-232) + (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) sv-232) + (let ((v1-47 (new 'stack-no-clear 'vector)) + (a0-39 (new 'stack-no-clear 'vector)) + ) + (.lvf vf1 (&-> arg0 corner 0 quad)) + (.lvf vf2 (&-> arg0 corner 1 quad)) + (.lvf vf3 (&-> arg0 corner 2 quad)) + (.lvf vf4 (&-> arg0 corner 3 quad)) + (.min.vf vf5 vf1 vf2) + (.min.vf vf5 vf5 vf3) + (.min.vf vf5 vf5 vf4) + (.max.vf vf6 vf1 vf2) + (.max.vf vf6 vf6 vf3) + (.max.vf vf6 vf6 vf4) + (.svf (&-> v1-47 quad) vf5) + (.svf (&-> a0-39 quad) vf6) + (when (and (< (-> a0-39 x) 228.0) (< (-> a0-39 z) 228.0) (< 100.0 (-> v1-47 x)) (< 100.0 (-> v1-47 z))) + (let* ((a3-0 (-> arg1 class color)) + (a2-6 (+ (* (the-as uint 320) (-> arg1 class icon-xy x)) 8)) + (a1-14 (+ (* (the-as uint 320) (-> arg1 class icon-xy y)) 8)) + (v1-54 (+ a2-6 304)) + (a0-49 (+ a1-14 304)) + ) + (let* ((t0-2 (copy-and-set-field a3-0 r (shr (* (-> a3-0 r) (the-as uint (-> this color x))) 7))) + (t0-9 (copy-and-set-field t0-2 g (shr (* (-> t0-2 g) (the-as uint (-> this color y))) 7))) + (a3-13 (copy-and-set-field + (copy-and-set-field t0-9 b (shr (* (-> t0-9 b) (the-as uint (-> this color z))) 7)) + a + (the int (* 128.0 (-> arg1 alpha))) + ) + ) + ) + (let ((t0-22 (-> this draw3-tmpl dma-vif quad))) + (set! (-> (the-as (pointer uint128) sv-208) 0) t0-22) + ) + (let ((t0-23 (-> this draw3-tmpl quad 1))) + (set! (-> (the-as (pointer uint128) sv-208) 1) t0-23) + ) + (let ((t0-25 (the-as (object object) (&-> (the-as (pointer uint128) sv-208) 2)))) + (set! (-> (the-as (inline-array vector4w) t0-25) 0 x) (the-as int (-> a3-13 r))) + (set! (-> (the-as (inline-array vector4w) t0-25) 0 y) (the-as int (-> a3-13 g))) + (set! (-> (the-as (inline-array vector4w) t0-25) 0 z) (the-as int (-> a3-13 b))) + (set! (-> (the-as (inline-array vector4w) t0-25) 0 w) (the-as int (-> a3-13 a))) + ) + ) + (let ((a3-16 (the-as (inline-array vector4w) (&+ sv-208 48)))) + (set! (-> a3-16 0 x) a2-6) + (set! (-> a3-16 0 y) a1-14) + (set! (-> a3-16 0 z) 0) + (set! (-> a3-16 0 w) 0) + ) + (let ((a3-18 (the-as object (&+ sv-208 64)))) + (set! (-> (the-as (inline-array vector4w) a3-18) 0 x) (the int (* 16.0 (-> arg0 corner 0 x)))) + (set! (-> (the-as (inline-array vector4w) a3-18) 0 y) (the int (* 16.0 (-> arg0 corner 0 z)))) + (set! (-> (the-as (inline-array vector4w) a3-18) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) a3-18) 0 w) 0) + ) + (let ((a3-20 (the-as (inline-array vector4w) (&+ sv-208 80)))) + (set! (-> a3-20 0 x) a2-6) + (set! (-> a3-20 0 y) a0-49) + (set! (-> a3-20 0 z) 0) + (set! (-> a3-20 0 w) 0) + ) + (let ((a2-8 (the-as object (&+ sv-208 96)))) + (set! (-> (the-as (inline-array vector4w) a2-8) 0 x) (the int (* 16.0 (-> arg0 corner 1 x)))) + (set! (-> (the-as (inline-array vector4w) a2-8) 0 y) (the int (* 16.0 (-> arg0 corner 1 z)))) + (set! (-> (the-as (inline-array vector4w) a2-8) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) a2-8) 0 w) 0) + ) + (let ((a2-10 (the-as (inline-array vector4w) (&+ sv-208 112)))) + (set! (-> a2-10 0 x) v1-54) + (set! (-> a2-10 0 y) a1-14) + (set! (-> a2-10 0 z) 0) + (set! (-> a2-10 0 w) 0) + ) + (let ((a1-16 (the-as object (&+ sv-208 128)))) + (set! (-> (the-as (inline-array vector4w) a1-16) 0 x) (the int (* 16.0 (-> arg0 corner 2 x)))) + (set! (-> (the-as (inline-array vector4w) a1-16) 0 y) (the int (* 16.0 (-> arg0 corner 2 z)))) + (set! (-> (the-as (inline-array vector4w) a1-16) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) a1-16) 0 w) 0) + ) + (let ((a1-18 (the-as (inline-array vector4w) (&+ sv-208 144)))) + (set! (-> a1-18 0 x) v1-54) + (set! (-> a1-18 0 y) a0-49) + (set! (-> a1-18 0 z) 0) + (set! (-> a1-18 0 w) 0) + ) + ) + (let ((v1-56 (the-as object (&+ sv-208 160)))) + (set! (-> (the-as (inline-array vector4w) v1-56) 0 x) (the int (* 16.0 (-> arg0 corner 3 x)))) + (set! (-> (the-as (inline-array vector4w) v1-56) 0 y) (the int (* 16.0 (-> arg0 corner 3 z)))) + (set! (-> (the-as (inline-array vector4w) v1-56) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) v1-56) 0 w) 0) + ) + (&+! (-> sv-20 base) 176) + ) + ) + ) + ) + (none) + ) + ) + +;; definition for method 21 of type minimap +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod sub-draw-1-1 ((this minimap) (arg0 minimap-draw-work)) + (let ((s5-0 (-> arg0 buf))) + (set-display-gs-state s5-0 (the-as int (-> *map-texture-base* vram-page)) 128 128 0 0) + (let ((s3-0 (-> s5-0 base))) + (set! (-> (the-as (pointer uint128) s3-0) 0) (-> this adgif-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) s3-0) 1) (-> this adgif-tmpl quad 1)) + (let ((a1-2 (-> this last-tex))) + (if (not a1-2) + (set! a1-2 (get-texture common-white common)) + ) + (adgif-shader<-texture-simple! (the-as adgif-shader (&+ s3-0 32)) (the-as texture a1-2)) + ) + ) + (&+! (-> s5-0 base) 112) + (dma-buffer-add-gs-set s5-0 + (clamp-1 (new 'static 'gs-clamp)) + (test-1 (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))) + (texa (new 'static 'gs-texa :ta1 #x80)) + ) + (let ((s3-1 (-> s5-0 base))) + (let ((f30-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 y) 0.0) + (vector-normalize! s1-0 1.0) + (let ((v1-16 (-> arg0 mat))) + (set! (-> v1-16 rvec x) (* (-> s1-0 z) f30-0)) + (set! (-> v1-16 rvec y) 0.0) + (set! (-> v1-16 rvec z) (- (-> s1-0 x))) + (set! (-> v1-16 rvec w) 0.0) + ) + (set-vector! (-> arg0 mat uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> arg0 mat fvec) (* (-> s1-0 x) f30-0) 0.0 (-> s1-0 z) 0.0) + ) + (vector-! s2-0 (target-pos 0) (-> this minimap-corner)) + (set! (-> s2-0 x) (/ (-> s2-0 x) (-> this pos-scale))) + (set! (-> s2-0 z) (/ (-> s2-0 z) (-> this pos-scale))) + (vector+! (-> arg0 mat trans) s2-0 (-> this offset)) + ) + ) + (set! (-> arg0 mat trans y) 0.0) + (set! (-> arg0 corner 0 x) (* 0.25 (-> this map-inv-scale))) + (set! (-> arg0 corner 0 z) (* 0.25 (-> this map-inv-scale))) + (set! (-> arg0 corner 0 w) 1.0) + (set! (-> arg0 corner 1 x) (* -0.25 (-> this map-inv-scale))) + (set! (-> arg0 corner 1 z) (* 0.25 (-> this map-inv-scale))) + (set! (-> arg0 corner 1 w) 1.0) + (set! (-> arg0 corner 2 x) (* 0.25 (-> this map-inv-scale))) + (set! (-> arg0 corner 2 z) (* -0.25 (-> this map-inv-scale))) + (set! (-> arg0 corner 2 w) 1.0) + (set! (-> arg0 corner 3 x) (* -0.25 (-> this map-inv-scale))) + (set! (-> arg0 corner 3 z) (* -0.25 (-> this map-inv-scale))) + (set! (-> arg0 corner 3 w) 1.0) + (vector-matrix*! (the-as vector (-> arg0 corner)) (the-as vector (-> arg0 corner)) (-> arg0 mat)) + (vector-matrix*! (-> arg0 corner 1) (-> arg0 corner 1) (-> arg0 mat)) + (vector-matrix*! (-> arg0 corner 2) (-> arg0 corner 2) (-> arg0 mat)) + (vector-matrix*! (-> arg0 corner 3) (-> arg0 corner 3) (-> arg0 mat)) + (let ((v1-33 (the-as object (&+ s3-1 32)))) + (set! (-> (the-as (inline-array vector4w) v1-33) 0 x) 128) + (set! (-> (the-as (inline-array vector4w) v1-33) 0 y) 128) + (set! (-> (the-as (inline-array vector4w) v1-33) 0 z) 128) + (set! (-> (the-as (inline-array vector4w) v1-33) 0 w) 128) + ) + (let ((v1-34 (the-as object (&+ s3-1 48)))) + (set! (-> (the-as (inline-array vector) v1-34) 0 x) (-> arg0 corner 0 x)) + (set! (-> (the-as (inline-array vector) v1-34) 0 y) (-> arg0 corner 0 z)) + (set! (-> (the-as (inline-array vector) v1-34) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-34) 0 w) 1.0) + ) + (let ((v1-35 (the-as (inline-array vector4w) (&+ s3-1 64)))) + (set! (-> v1-35 0 x) 0) + (set! (-> v1-35 0 y) 0) + (set! (-> v1-35 0 z) #xffffff) + (set! (-> v1-35 0 w) 0) + ) + (let ((v1-36 (the-as object (&+ s3-1 80)))) + (set! (-> (the-as (inline-array vector) v1-36) 0 x) (-> arg0 corner 1 x)) + (set! (-> (the-as (inline-array vector) v1-36) 0 y) (-> arg0 corner 1 z)) + (set! (-> (the-as (inline-array vector) v1-36) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-36) 0 w) 1.0) + ) + (let ((v1-37 (the-as object (&+ s3-1 96)))) + (set! (-> (the-as (inline-array vector4w) v1-37) 0 x) 2048) + (set! (-> (the-as (inline-array vector4w) v1-37) 0 y) 0) + (set! (-> (the-as (inline-array vector4w) v1-37) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-37) 0 w) 0) + ) + (let ((v1-38 (the-as object (&+ s3-1 112)))) + (set! (-> (the-as (inline-array vector) v1-38) 0 x) (-> arg0 corner 2 x)) + (set! (-> (the-as (inline-array vector) v1-38) 0 y) (-> arg0 corner 2 z)) + (set! (-> (the-as (inline-array vector) v1-38) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-38) 0 w) 1.0) + ) + (let ((v1-39 (the-as (inline-array vector4w) (&+ s3-1 128)))) + (set! (-> v1-39 0 x) 0) + (set! (-> v1-39 0 y) 2048) + (set! (-> v1-39 0 z) #xffffff) + (set! (-> v1-39 0 w) 0) + ) + (let ((v1-40 (the-as object (&+ s3-1 144)))) + (set! (-> (the-as (inline-array vector) v1-40) 0 x) (-> arg0 corner 3 x)) + (set! (-> (the-as (inline-array vector) v1-40) 0 y) (-> arg0 corner 3 z)) + (set! (-> (the-as (inline-array vector) v1-40) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-40) 0 w) 1.0) + ) + (let ((v1-41 (the-as object (&+ s3-1 160)))) + (set! (-> (the-as (inline-array vector4w) v1-41) 0 x) 2048) + (set! (-> (the-as (inline-array vector4w) v1-41) 0 y) 2048) + (set! (-> (the-as (inline-array vector4w) v1-41) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-41) 0 w) 0) + ) + ) + (&+! (-> s5-0 base) 176) + (let ((f0-57 1.0)) + (when *target* + (if (focus-test? *target* pilot) + (set! f0-57 0.0) + ) + ) + (seek! (-> this frustum-alpha) f0-57 (seconds-per-frame)) + ) + (dma-buffer-add-gs-set s5-0 (xyoffset-1 (new 'static 'gs-xy-offset :ofx #x640 :ofy #x640))) + (when (!= (-> this frustum-alpha) 0.0) + (let ((s3-2 (-> *minimap* engine alive-list))) + (while s3-2 + (let ((a2-6 s3-2)) + (if (logtest? (-> a2-6 class flags) (minimap-flag frustum)) + (draw-frustum-1 this arg0 a2-6) + ) + ) + (set! s3-2 (-> s3-2 next)) + ) + ) + ) + (let ((s2-1 (-> arg0 buf base)) + (s3-3 (get-texture mini-map-icons level-default-minimap)) + ) + (when s3-3 + (set! (-> (the-as (pointer uint128) s2-1) 0) (-> this adgif-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) s2-1) 1) (-> this adgif-tmpl quad 1)) + (adgif-shader<-texture-simple! (the-as adgif-shader (&-> (the-as (pointer uint128) s2-1) 2)) s3-3) + (&+! (-> arg0 buf base) 112) + ) + (if (not s3-3) + (format *stdebug* "minimap: mini-map-icons texture is #f~%") + ) + ) + (let ((s3-4 (-> *minimap* engine alive-list))) + (while s3-4 + (let ((a2-7 s3-4)) + (if (logtest? (-> a2-7 class flags) (minimap-flag frustum)) + (draw-frustum-2 this arg0 a2-7) + ) + ) + (set! s3-4 (-> s3-4 next)) + ) + ) + (let ((s3-5 (-> arg0 buf base)) + (a1-37 (get-texture map-target-marker level-default-minimap)) + ) + (when a1-37 + (set! (-> (the-as (pointer uint128) s3-5) 0) (-> this adgif-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) s3-5) 1) (-> this adgif-tmpl quad 1)) + (adgif-shader<-texture-simple! (the-as adgif-shader (&-> (the-as (pointer uint128) s3-5) 2)) a1-37) + (&+! (-> arg0 buf base) 112) + ) + ) + (let ((s3-6 (-> *minimap* engine alive-list))) + (while s3-6 + (let ((a2-8 s3-6)) + (if (logtest? (-> a2-8 class flags) (minimap-flag racer)) + (draw-racer-2 this arg0 a2-8) + ) + ) + (set! s3-6 (-> s3-6 next)) + ) + ) + (dma-buffer-add-gs-set s5-0 + (frame-1 (new 'static 'gs-frame :fbw #x2 :fbmsk #xffffff :fbp (-> *map-texture-base* vram-page))) + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (xyoffset-1 (new 'static 'gs-xy-offset)) + ) + (let ((s3-7 (-> s5-0 base))) + (set! (-> (the-as (pointer uint128) s3-7) 0) (-> this adgif-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) s3-7) 1) (-> this adgif-tmpl quad 1)) + (adgif-shader<-texture-simple! + (the-as adgif-shader (&-> (the-as (pointer uint128) s3-7) 2)) + (get-texture minimap-mask level-default-minimap) + ) + (set! (-> (the-as (pointer uint128) s3-7) 7) (-> this sprite-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) s3-7) 8) (-> this sprite-tmpl quad 1)) + (let ((v1-110 (the-as object (&+ s3-7 144)))) + (set! (-> (the-as (inline-array vector4w) v1-110) 0 x) 128) + (set! (-> (the-as (inline-array vector4w) v1-110) 0 y) 128) + (set! (-> (the-as (inline-array vector4w) v1-110) 0 z) 128) + (set! (-> (the-as (inline-array vector4w) v1-110) 0 w) 128) + ) + (let ((v1-111 (the-as (inline-array vector4w) (&+ s3-7 160)))) + (set! (-> v1-111 0 x) 0) + (set! (-> v1-111 0 y) 0) + (set! (-> v1-111 0 z) 0) + (set! (-> v1-111 0 w) 0) + ) + (let ((v1-112 (the-as (inline-array vector4w) (&+ s3-7 176)))) + (set! (-> v1-112 0 x) 0) + (set! (-> v1-112 0 y) 0) + (set! (-> v1-112 0 z) #xffffff) + (set! (-> v1-112 0 w) 0) + ) + (let ((v1-113 (the-as object (&+ s3-7 192)))) + (set! (-> (the-as (inline-array vector4w) v1-113) 0 x) 1024) + (set! (-> (the-as (inline-array vector4w) v1-113) 0 y) 1024) + (set! (-> (the-as (inline-array vector4w) v1-113) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) v1-113) 0 w) 0) + ) + (let ((v1-114 (the-as object (&+ s3-7 208)))) + (set! (-> (the-as (inline-array vector4w) v1-114) 0 x) 2048) + (set! (-> (the-as (inline-array vector4w) v1-114) 0 y) 2048) + (set! (-> (the-as (inline-array vector4w) v1-114) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-114) 0 w) 0) + ) + ) + (&+! (-> s5-0 base) 224) + (set! (-> arg0 buf) s5-0) + ) + 0 + (none) + ) + +;; definition for method 19 of type minimap +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod sub-draw-1-2 ((this minimap) (arg0 minimap-draw-work)) + (local-vars (sv-48 vector) (sv-52 vector) (sv-56 vector) (sv-64 int) (sv-80 int)) + (let ((s5-0 (-> arg0 buf))) + (reset-display-gs-state *display* s5-0) + (dma-buffer-add-gs-set s5-0 + (test-1 (new 'static 'gs-test :zte #x1 :ztst (gs-ztest greater-equal))) + (alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1)) + (tex0-1 (new 'static 'gs-tex0 + :tbw #x2 + :tcc #x1 + :th (log2 128) + :tw (log2 128) + :tbp0 (-> *map-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))) + (texflush 0) + ) + (let ((f30-0 (-> *video-params* relative-x-scale))) + (let ((s3-1 (the-as object (-> s5-0 base))) + (v1-22 (the int (* 112.0 f30-0))) + ) + 0 + 0 + (let ((s0-0 (* (+ (-> arg0 draw-pos y) 1840) 16)) + (s2-1 (* (+ (-> arg0 draw-pos y) 1952) 16)) + (s1-2 (-> arg0 draw-pos z)) + ) + (cond + ((-> arg0 justify-right) + (set! sv-64 (* (+ (- 1792 v1-22) (-> arg0 draw-pos x)) 16)) + (set! sv-80 (* (+ (-> arg0 draw-pos x) 1792) 16)) + sv-80 + ) + (else + (set! sv-64 (* (+ (-> arg0 draw-pos x) 1792) 16)) + (set! sv-80 (* (+ v1-22 1792 (-> arg0 draw-pos x)) 16)) + sv-80 + ) + ) + (set! (-> (the-as (inline-array vector4w) s3-1) 0 quad) (-> this sprite-tmpl dma-vif quad)) + (set! (-> (the-as (inline-array vector4w) s3-1) 1 quad) (-> this sprite-tmpl quad 1)) + (let ((v1-36 (-> this color quad))) + (set! (-> (the-as (inline-array vector4w) s3-1) 2 quad) v1-36) + ) + (cond + ((get-horizontal-flip-flag *blit-displays-work*) + (set-vector! (-> (the-as (inline-array vector4w) s3-1) 3) 0 0 0 0) + (set-vector! (-> (the-as (inline-array vector4w) s3-1) 4) sv-80 s0-0 s1-2 0) + (set-vector! (-> (the-as (inline-array vector4w) s3-1) 5) 2048 2048 0 0) + (set-vector! (-> (the-as (inline-array vector4w) s3-1) 6) sv-64 s2-1 s1-2 0) + ) + (else + (let ((v1-42 (the-as (inline-array vector4w) (&+ (the-as pointer s3-1) 48)))) + (set! (-> v1-42 0 x) 0) + (set! (-> v1-42 0 y) 0) + (set! (-> v1-42 0 z) 0) + (set! (-> v1-42 0 w) 0) + ) + (let ((a0-31 (the-as object (&+ (the-as pointer s3-1) 64)))) + (set! (-> (the-as (inline-array vector4w) a0-31) 0 x) sv-64) + (set! (-> (the-as (inline-array vector4w) a0-31) 0 y) s0-0) + (set! (-> (the-as (inline-array vector4w) a0-31) 0 z) s1-2) + (set! (-> (the-as (inline-array vector4w) a0-31) 0 w) 0) + ) + (let ((v1-44 (the-as object (&+ (the-as pointer s3-1) 80)))) + (set! (-> (the-as (inline-array vector4w) v1-44) 0 x) 2048) + (set! (-> (the-as (inline-array vector4w) v1-44) 0 y) 2048) + (set! (-> (the-as (inline-array vector4w) v1-44) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) v1-44) 0 w) 0) + ) + (let ((v1-45 (the-as object (&+ (the-as pointer s3-1) 96)))) + (set! (-> (the-as (inline-array vector4w) v1-45) 0 x) sv-80) + (set! (-> (the-as (inline-array vector4w) v1-45) 0 y) s2-1) + (set! (-> (the-as (inline-array vector4w) v1-45) 0 z) s1-2) + (set! (-> (the-as (inline-array vector4w) v1-45) 0 w) 0) + ) + ) + ) + ) + ) + (&+! (-> s5-0 base) 112) + (dma-buffer-add-gs-set s5-0 + (test-1 (new 'static 'gs-test :ate #x1 :atst (gs-atest greater) :zte #x1 :ztst (gs-ztest always))) + ) + (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 y) 0.0) + (vector-normalize! sv-52 1.0) + (cond + ((get-horizontal-flip-flag *blit-displays-work*) + (let ((v1-57 (-> arg0 mat))) + (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))) + (set! (-> v1-57 rvec w) 0.0) + ) + (set-vector! (-> arg0 mat uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> arg0 mat fvec) (* (-> sv-52 x) (- f30-0)) 0.0 (-> sv-52 z) 0.0) + (set-vector! (-> arg0 mat trans) 0.0 0.0 (the float (+ (-> arg0 draw-pos y) 1896)) 1.0) + ) + (else + (let ((v1-61 (-> arg0 mat))) + (set! (-> v1-61 rvec x) (* (-> sv-52 z) f30-0)) + (set! (-> v1-61 rvec y) 0.0) + (set! (-> v1-61 rvec z) (- (-> sv-52 x))) + (set! (-> v1-61 rvec w) 0.0) + ) + (set-vector! (-> arg0 mat uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> arg0 mat fvec) (* (-> sv-52 x) f30-0) 0.0 (-> sv-52 z) 0.0) + (set-vector! (-> arg0 mat trans) 0.0 0.0 (the float (+ (-> arg0 draw-pos y) 1896)) 1.0) + ) + ) + (let ((v1-66 (the int (* 56.0 f30-0)))) + (if (-> arg0 justify-right) + (set! (-> arg0 mat trans x) (the float (+ (- 1792 v1-66) (-> arg0 draw-pos x)))) + (set! (-> arg0 mat trans x) (the float (+ v1-66 1792 (-> arg0 draw-pos x)))) + ) + ) + ) + (set! (-> arg0 buf) s5-0) + ) + 0 + (none) + ) + +;; definition for method 16 of type minimap +;; INFO: Used lq/sq +;; WARN: Return type mismatch pointer vs none. +(defmethod draw-connection ((this minimap) (arg0 minimap-draw-work) (arg1 connection-minimap)) + (let ((s1-0 (target-pos 0))) + (cond + ((= (-> arg1 position) #t) + (let* ((s3-0 (handle->process (-> arg1 handle))) + (v1-4 (if (type? s3-0 process-drawable) + s3-0 + ) + ) + ) + (when (and v1-4 (nonzero? (-> (the-as process-drawable v1-4) root))) + (set! (-> arg1 last-world-pos quad) (-> (the-as process-drawable v1-4) root trans quad)) + (vector-! (-> arg1 last-relative-pos) s1-0 (-> arg1 last-world-pos)) + ) + ) + ) + ((and (= (logand (the-as int (-> arg1 position)) 7) 4) + (= (-> (the-as entity-actor (-> arg1 position)) type) entity-actor) + ) + (let* ((v1-15 (the-as structure (-> arg1 position))) + (s3-1 (if (the-as vector v1-15) + (-> (the-as entity-actor v1-15) extra process) + ) + ) + (a0-16 (if (type? s3-1 process-drawable) + s3-1 + ) + ) + ) + (cond + (a0-16 + (set! (-> arg1 last-world-pos quad) (-> (the-as process-drawable a0-16) root trans quad)) + (vector-! (-> arg1 last-relative-pos) s1-0 (-> arg1 last-world-pos)) + ) + (else + (set! (-> arg1 last-world-pos quad) (-> (the-as entity-actor (-> arg1 position)) extra trans quad)) + (vector-! (-> arg1 last-relative-pos) s1-0 (-> arg1 last-world-pos)) + ) + ) + ) + ) + (else + (set! (-> arg1 last-world-pos quad) (-> arg1 position quad)) + (vector-! (-> arg1 last-relative-pos) s1-0 (-> arg1 last-world-pos)) + ) + ) + (let ((s3-2 (new 'stack-no-clear 'vector)) + (s2-0 #f) + ) + 1.0 + 0.0 + (let ((f30-0 (/ 1.0 (* (-> this icon-inv-scale) (-> this meters-per-texel))))) + (set! (-> s3-2 quad) (-> arg1 last-relative-pos quad)) + (set! (-> s3-2 x) (* (-> s3-2 x) f30-0)) + (set! (-> s3-2 z) (* (-> s3-2 z) f30-0)) + (set! (-> s3-2 y) 0.0) + (set! (-> s3-2 w) 1.0) + (let* ((v1-29 s3-2) + (f28-0 (sqrtf (+ (* (-> v1-29 x) (-> v1-29 x)) (* (-> v1-29 z) (-> v1-29 z))))) + ) + (if (or (and (logtest? (minimap-flag local-only) (-> arg1 class flags)) + (not (logtest? (the-as minimap-flag (logand #x3c0000 (-> arg0 global-flags))) (-> arg1 class flags))) + ) + (logtest? (-> arg1 class flags) (minimap-flag bigmap-only)) + ) + (set! s2-0 #t) + ) + (cond + ((logtest? (-> arg1 class flags) (minimap-flag trail)) + (cond + (*trail-graph* + (let ((a2-2 (get-trail-for-connection this arg1 #f))) + (cond + ((not a2-2) + (when (!= (-> arg1 alpha) 0.0) + (when (not (get-trail-for-connection this arg1 #t)) + (let ((s2-1 (-> *minimap* engine alive-list))) + (while s2-1 + (let ((a1-15 s2-1)) + (if (and (= (-> a1-15 alpha) 0.0) (logtest? (-> arg1 class flags) (minimap-flag trail))) + (free-trail-by-connection *minimap* a1-15) + ) + ) + (set! s2-1 (-> s2-1 next)) + ) + ) + ) + ) + (set! s2-0 #t) + (set! (-> arg1 edge-ry) -131072) + ) + ((time-elapsed? (the-as int (-> a2-2 last-updated)) (seconds 5)) + (set! s2-0 #t) + (set! (-> arg1 edge-ry) -131072) + ) + ((< 50.0 f28-0) + (let ((s0-0 (new 'stack-no-clear 'vector))) + (set! (-> s0-0 quad) (-> s3-2 quad)) + (let ((s1-1 (get-icon-draw-pos *minimap* arg1 a2-2 s1-0 f30-0 s3-2))) + (if (not s1-1) + (vector-normalize-copy! s3-2 s0-0 50.0) + ) + (let ((f30-1 (atan (-> s3-2 x) (-> s3-2 z)))) + (let ((f28-1 (the float (-> arg1 edge-ry)))) + (when (!= f28-1 -131072.0) + (let* ((f0-20 (deg- f30-1 f28-1)) + (f1-7 (fabs f0-20)) + (f2-3 (* 16384.0 (seconds-per-frame))) + ) + (when (< f2-3 f1-7) + (set! f30-1 (+ f28-1 (if (>= f0-20 0.0) + f2-3 + (- f2-3) + ) + ) + ) + (set-vector! s3-2 (sin f30-1) 0.0 (cos f30-1) 1.0) + (vector-normalize! s3-2 (if s1-1 + 50.0 + 66.0 + ) + ) + ) + ) + ) + ) + (set! (-> arg1 edge-ry) (the int f30-1)) + ) + ) + ) + ) + (else + (set! (-> arg1 edge-ry) (the int (atan (-> s3-2 x) (-> s3-2 z)))) + ) + ) + ) + ) + (else + (set! s2-0 #t) + (set! (-> arg1 edge-ry) -131072) + ) + ) + ) + ((logtest? (-> arg1 class flags) (minimap-flag clamp)) + (cond + ((< 50.0 f28-0) + (let ((a1-22 (new 'stack-no-clear 'vector))) + (set! (-> a1-22 quad) (-> s3-2 quad)) + (vector-normalize-copy! s3-2 a1-22 54.0) + ) + (let ((f30-2 (atan (-> s3-2 x) (-> s3-2 z)))) + (let ((f28-2 (the float (-> arg1 edge-ry)))) + (when (!= f28-2 -131072.0) + (let* ((f0-37 (deg- f30-2 f28-2)) + (f1-9 (fabs f0-37)) + (f2-5 (* 16384.0 (seconds-per-frame))) + ) + (when (< f2-5 f1-9) + (set! f30-2 (+ f28-2 (if (>= f0-37 0.0) + f2-5 + (- f2-5) + ) + ) + ) + (set-vector! s3-2 (sin f30-2) 0.0 (cos f30-2) 1.0) + (vector-normalize! s3-2 54.0) + ) + ) + ) + ) + (set! (-> arg1 edge-ry) (the int f30-2)) + ) + ) + (else + (set! (-> arg1 edge-ry) (the int (atan (-> s3-2 x) (-> s3-2 z)))) + ) + ) + ) + (else + (if (< 50.0 f28-0) + (set! s2-0 #t) + ) + ) + ) + ) + ) + (if (or (logtest? (-> arg1 class flags) (minimap-flag frustum)) + (logtest? (-> arg1 class flags) (minimap-flag racer)) + (and (logtest? (-> arg1 class flags) (minimap-flag flash)) + (< (logand (-> *display* base-clock integral-frame-counter) 15) (seconds 0.027)) + ) + ) + (set! s2-0 #t) + ) + (if (logtest? (-> arg1 class flags) (minimap-flag goal)) + (set! (-> arg1 class icon-xy x) (the-as uint (mod (the int (-> this goal-time)) 6))) + ) + (when (not s2-0) + (vector-matrix*! s3-2 s3-2 (-> arg0 mat)) + (let ((v1-122 (-> arg0 buf base))) + (let* ((f0-52 (-> arg1 class scale)) + (a1-28 (-> arg1 class color)) + (a1-35 (copy-and-set-field a1-28 r (shr (* (-> a1-28 r) (the-as uint (-> this color x))) 7))) + (a1-42 (copy-and-set-field a1-35 g (shr (* (-> a1-35 g) (the-as uint (-> this color y))) 7))) + (a0-78 (copy-and-set-field + (copy-and-set-field a1-42 b (shr (* (-> a1-42 b) (the-as uint (-> this color z))) 7)) + a + (the int (* 128.0 (-> arg1 alpha))) + ) + ) + ) + (let ((f1-16 (* 20.0 (-> *video-params* relative-x-scale) f0-52)) + (f0-53 (* 20.0 f0-52)) + ) + (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))))) + (set! (-> arg0 corner 1 x) (+ (-> arg0 corner 0 x) f1-16)) + (set! (-> arg0 corner 1 z) (+ (-> arg0 corner 0 z) f0-53)) + ) + (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-65 (+ a3-1 312)) + (a2-14 (+ t0-1 312)) + ) + (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)) + (let ((t1-3 (the-as object (&+ v1-122 32)))) + (set! (-> (the-as (inline-array vector4w) t1-3) 0 x) (the-as int (-> a0-78 r))) + (set! (-> (the-as (inline-array vector4w) t1-3) 0 y) (the-as int (-> a0-78 g))) + (set! (-> (the-as (inline-array vector4w) t1-3) 0 z) (the-as int (-> a0-78 b))) + (set! (-> (the-as (inline-array vector4w) t1-3) 0 w) (the-as int (-> a0-78 a))) + ) + (let ((a0-80 (the-as (inline-array vector4w) (&+ v1-122 48)))) + (set! (-> a0-80 0 x) a3-1) + (set! (-> a0-80 0 y) t0-1) + (set! (-> a0-80 0 z) 0) + (set! (-> a0-80 0 w) 0) + ) + (let ((a0-81 (the-as object (&+ v1-122 64)))) + (set! (-> (the-as (inline-array vector4w) a0-81) 0 x) (the int (* 16.0 (-> arg0 corner 0 x)))) + (set! (-> (the-as (inline-array vector4w) a0-81) 0 y) (the int (* 16.0 (-> arg0 corner 0 z)))) + (set! (-> (the-as (inline-array vector4w) a0-81) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) a0-81) 0 w) 0) + ) + (let ((a0-82 (the-as (inline-array vector4w) (&+ v1-122 80)))) + (set! (-> a0-82 0 x) a1-65) + (set! (-> a0-82 0 y) a2-14) + (set! (-> a0-82 0 z) 0) + (set! (-> a0-82 0 w) 0) + ) + ) + ) + (let ((v1-123 (the-as object (&+ v1-122 96)))) + (set! (-> (the-as (inline-array vector4w) v1-123) 0 x) (the int (* 16.0 (-> arg0 corner 1 x)))) + (set! (-> (the-as (inline-array vector4w) v1-123) 0 y) (the int (* 16.0 (-> arg0 corner 1 z)))) + (set! (-> (the-as (inline-array vector4w) v1-123) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-123) 0 w) 0) + ) + ) + (&+! (-> arg0 buf base) 112) + ) + ) + ) + (none) + ) + +;; definition for method 15 of type minimap +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw-1 ((this minimap) (arg0 dma-buffer) (arg1 vector4w) (arg2 symbol)) + (local-vars (v1-35 uint128)) + (let ((gp-0 (new 'stack-no-clear 'minimap-draw-work))) + (set! (-> gp-0 buf) arg0) + (set! (-> gp-0 draw-pos quad) (-> arg1 quad)) + (set! (-> gp-0 justify-right) arg2) + (set! (-> gp-0 global-flags) (the-as uint 0)) + (if (= (status-of-level-and-borrows *level* 'ctywide #f) 'active) + (logior! (-> gp-0 global-flags) #x40000) + ) + (if (= (status-of-level-and-borrows *level* 'waswide #f) 'active) + (logior! (-> gp-0 global-flags) #x100000) + ) + (if (= (status-of-level-and-borrows *level* 'wasall #f) 'active) + (logior! (-> gp-0 global-flags) #x80000) + ) + (if (= (status-of-level-and-borrows *level* 'desert #f) 'active) + (logior! (-> gp-0 global-flags) #x200000) + ) + (sub-draw-1-1 this gp-0) + (sub-draw-1-2 this gp-0) + (when #t + (let ((s1-0 (-> gp-0 buf base)) + (s3-4 (get-texture mini-map-icons level-default-minimap)) + (s2-0 (-> *level* level-default texture-mask 8)) + ) + (cond + (s3-4 + (set! (-> (the-as (pointer uint128) s1-0) 0) (-> this adgif-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) s1-0) 1) (-> this adgif-tmpl quad 1)) + (adgif-shader<-texture-simple! (the-as adgif-shader (&-> (the-as (pointer uint128) s1-0) 2)) s3-4) + (&+! (-> gp-0 buf base) 112) + (let ((v1-34 (-> s2-0 mask quad)) + (a0-15 (-> s3-4 masks data 0 mask quad)) + ) + (.por v1-35 v1-34 a0-15) + ) + (set! (-> s2-0 mask quad) v1-35) + ) + (else + (format *stdebug* "minimap: mini-map-icons texture is #f~%") + ) + ) + ) + ) + (let ((s3-5 (-> *minimap* engine alive-list))) + (while s3-5 + (let ((a2-5 s3-5)) + (draw-connection this gp-0 a2-5) + ) + (set! s3-5 (-> s3-5 next)) + ) + ) + (let ((s0-0 (new 'stack-no-clear 'vector)) + (f30-0 (-> *video-params* relative-x-scale)) + ) + (when *target* + (vector-z-quaternion! s0-0 (-> *target* control quat)) + (vector-xz-normalize! s0-0 1.0) + (set! (-> s0-0 y) 0.0) + (set! (-> s0-0 w) 0.0) + (vector-matrix*! s0-0 s0-0 (-> gp-0 mat)) + (let ((s3-6 (-> arg0 base)) + (s2-1 (get-texture map-target-marker level-default-minimap)) + (s1-1 (new 'stack-no-clear 'matrix)) + (v1-48 (the int (* 56.0 f30-0))) + ) + (when s2-1 + (set-vector! (-> s1-1 rvec) (* (-> s0-0 z) f30-0) 0.0 (- (-> s0-0 x)) 0.0) + (set-vector! (-> s1-1 uvec) 0.0 1.0 0.0 0.0) + (set-vector! (-> s1-1 fvec) (* (-> s0-0 x) f30-0) 0.0 (-> s0-0 z) 1.0) + (set-vector! (-> s1-1 trans) 0.0 0.0 (the float (+ (-> gp-0 draw-pos y) 1896)) 1.0) + (if (-> gp-0 justify-right) + (set! (-> s1-1 trans x) (the float (+ (- 1792 v1-48) (-> gp-0 draw-pos x)))) + (set! (-> s1-1 trans x) (the float (+ v1-48 1792 (-> gp-0 draw-pos x)))) + ) + (let ((f0-29 7.0)) + (set-vector! (-> gp-0 corner 0) 0.0 0.0 (- f0-29) 1.0) + (set-vector! (-> gp-0 corner 1) f0-29 0.0 0.0 1.0) + (set-vector! (-> gp-0 corner 2) (- f0-29) 0.0 0.0 1.0) + (set-vector! (-> gp-0 corner 3) 0.0 0.0 f0-29 1.0) + ) + (vector-matrix*! (the-as vector (-> gp-0 corner)) (the-as vector (-> gp-0 corner)) s1-1) + (vector-matrix*! (-> gp-0 corner 1) (-> gp-0 corner 1) s1-1) + (vector-matrix*! (-> gp-0 corner 2) (-> gp-0 corner 2) s1-1) + (vector-matrix*! (-> gp-0 corner 3) (-> gp-0 corner 3) s1-1) + (set! (-> (the-as (pointer uint128) s3-6) 0) (-> this adgif-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) s3-6) 1) (-> this adgif-tmpl quad 1)) + (adgif-shader<-texture-simple! (the-as adgif-shader (&-> (the-as (pointer uint128) s3-6) 2)) s2-1) + (set! (-> (the-as (pointer uint128) s3-6) 7) (-> this draw-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) s3-6) 8) (-> this draw-tmpl quad 1)) + (let ((v1-64 (the-as (inline-array vector4w) (&+ s3-6 144)))) + (set! (-> v1-64 0 x) 0) + (set! (-> v1-64 0 y) 255) + (set! (-> v1-64 0 z) 255) + (set! (-> v1-64 0 w) 128) + ) + (let ((v1-65 (the-as (inline-array vector4w) (&+ s3-6 160)))) + (set! (-> v1-65 0 x) 0) + (set! (-> v1-65 0 y) 0) + (set! (-> v1-65 0 z) #xffffff) + (set! (-> v1-65 0 w) 0) + ) + (let ((v1-66 (the-as object (&+ s3-6 176)))) + (set! (-> (the-as (inline-array vector4w) v1-66) 0 x) (the int (* 16.0 (-> gp-0 corner 0 x)))) + (set! (-> (the-as (inline-array vector4w) v1-66) 0 y) (the int (* 16.0 (-> gp-0 corner 0 z)))) + (set! (-> (the-as (inline-array vector4w) v1-66) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) v1-66) 0 w) 0) + ) + (let ((v1-67 (the-as object (&+ s3-6 192)))) + (set! (-> (the-as (inline-array vector4w) v1-67) 0 x) 256) + (set! (-> (the-as (inline-array vector4w) v1-67) 0 y) 0) + (set! (-> (the-as (inline-array vector4w) v1-67) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-67) 0 w) 0) + ) + (let ((v1-68 (the-as object (&+ s3-6 208)))) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 x) (the int (* 16.0 (-> gp-0 corner 1 x)))) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 y) (the int (* 16.0 (-> gp-0 corner 1 z)))) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) v1-68) 0 w) 0) + ) + (let ((v1-69 (the-as (inline-array vector4w) (&+ s3-6 224)))) + (set! (-> v1-69 0 x) 0) + (set! (-> v1-69 0 y) 256) + (set! (-> v1-69 0 z) #xffffff) + (set! (-> v1-69 0 w) 0) + ) + (let ((v1-70 (the-as object (&+ s3-6 240)))) + (set! (-> (the-as (inline-array vector4w) v1-70) 0 x) (the int (* 16.0 (-> gp-0 corner 2 x)))) + (set! (-> (the-as (inline-array vector4w) v1-70) 0 y) (the int (* 16.0 (-> gp-0 corner 2 z)))) + (set! (-> (the-as (inline-array vector4w) v1-70) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) v1-70) 0 w) 0) + ) + (let ((v1-71 (the-as object (&+ s3-6 256)))) + (set! (-> (the-as (inline-array vector4w) v1-71) 0 x) 256) + (set! (-> (the-as (inline-array vector4w) v1-71) 0 y) 256) + (set! (-> (the-as (inline-array vector4w) v1-71) 0 z) #xffffff) + (set! (-> (the-as (inline-array vector4w) v1-71) 0 w) 0) + ) + (let ((v1-72 (the-as object (&+ s3-6 272)))) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 x) (the int (* 16.0 (-> gp-0 corner 3 x)))) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 y) (the int (* 16.0 (-> gp-0 corner 3 z)))) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 z) 0) + (set! (-> (the-as (inline-array vector4w) v1-72) 0 w) 0) + ) + (&+! (-> arg0 base) 288) + ) + ) + ) + ) + (if (not (paused?)) + (+! (-> this goal-time) (* 14.0 (seconds-per-frame))) + ) + (reset-display-gs-state *display* (-> gp-0 buf)) + ) + 0 + (none) + ) + +;; definition for method 24 of type minimap +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw-sprite2 ((this minimap) (arg0 dma-buffer) (arg1 vector4w) (arg2 symbol)) + (local-vars (v1-47 uint128) (a0-8 uint128) (sv-176 int) (sv-192 int)) + (when (-> this race-tex) + (let ((s5-0 (new 'stack-no-clear 'minimap-draw-work))) + (set! (-> s5-0 buf) arg0) + (set! (-> s5-0 draw-pos quad) (-> arg1 quad)) + (set! (-> s5-0 justify-right) arg2) + (let ((v1-4 (the-as object (-> s5-0 buf base))) + (s3-0 (-> this race-tex)) + (s2-0 (-> this race-level texture-mask 8)) + ) + (when s3-0 + (set! (-> (the-as adgif-shader v1-4) quad 0 quad) (-> this adgif-tmpl dma-vif quad)) + (set! (-> (the-as adgif-shader v1-4) quad 1 quad) (-> this adgif-tmpl quad 1)) + (adgif-shader<-texture-simple! (the-as adgif-shader (&-> (the-as adgif-shader v1-4) miptbp1)) s3-0) + (&+! (-> s5-0 buf base) 112) + (let ((v1-8 (-> s2-0 mask quad)) + (a0-7 (-> s3-0 masks data 0 mask quad)) + ) + (.por a0-8 v1-8 a0-7) + ) + (set! (-> s2-0 mask quad) a0-8) + ) + ) + (let* ((f0-0 (-> *video-params* relative-x-scale)) + (s3-1 (-> arg0 base)) + (v1-11 (the int (* 128.0 f0-0))) + ) + 0 + 0 + (let ((s0-0 (* (+ (-> s5-0 draw-pos y) 1840) 16)) + (s2-1 (* (+ (-> s5-0 draw-pos y) 1968) 16)) + (s1-0 (-> s5-0 draw-pos z)) + ) + (cond + ((-> s5-0 justify-right) + (set! sv-176 (* (+ (- 1792 v1-11) (-> s5-0 draw-pos x)) 16)) + (set! sv-192 (* (+ (-> s5-0 draw-pos x) 1792) 16)) + sv-192 + ) + (else + (set! sv-176 (* (+ (-> s5-0 draw-pos x) 1792) 16)) + (set! sv-192 (* (+ v1-11 1792 (-> s5-0 draw-pos x)) 16)) + sv-192 + ) + ) + (set! (-> s5-0 draw-pos x) sv-176) + (set! (-> s5-0 draw-pos y) s0-0) + (set! (-> (the-as (pointer uint128) s3-1) 0) (-> this sprite2-tmpl dma-vif quad)) + (set! (-> (the-as (pointer uint128) s3-1) 1) (-> this sprite2-tmpl quad 1)) + (let ((v1-26 (-> this color quad))) + (set! (-> (the-as (pointer uint128) (&+ s3-1 32))) v1-26) + ) + (cond + ((get-horizontal-flip-flag *blit-displays-work*) + (let ((v1-28 (the-as object (&+ s3-1 48)))) + (set! (-> (the-as (inline-array vector) v1-28) 0 x) 0.0) + (set! (-> (the-as (inline-array vector) v1-28) 0 y) 0.0) + (set! (-> (the-as (inline-array vector) v1-28) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-28) 0 w) 0.0) + ) + (let ((a0-25 (the-as object (&+ s3-1 64)))) + (set! (-> (the-as (inline-array vector4w) a0-25) 0 x) sv-192) + (set! (-> (the-as (inline-array vector4w) a0-25) 0 y) s0-0) + (set! (-> (the-as (inline-array vector4w) a0-25) 0 z) s1-0) + (set! (-> (the-as (inline-array vector4w) a0-25) 0 w) 0) + ) + (let ((v1-30 (the-as object (&+ s3-1 80)))) + (set! (-> (the-as (inline-array vector) v1-30) 0 x) 1.0) + (set! (-> (the-as (inline-array vector) v1-30) 0 y) 1.0) + (set! (-> (the-as (inline-array vector) v1-30) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-30) 0 w) 0.0) + ) + (let ((v1-31 (the-as object (&+ s3-1 96)))) + (set! (-> (the-as (inline-array vector4w) v1-31) 0 x) sv-176) + (set! (-> (the-as (inline-array vector4w) v1-31) 0 y) s2-1) + (set! (-> (the-as (inline-array vector4w) v1-31) 0 z) s1-0) + (set! (-> (the-as (inline-array vector4w) v1-31) 0 w) 0) + ) + ) + (else + (let ((v1-32 (the-as object (&+ s3-1 48)))) + (set! (-> (the-as (inline-array vector) v1-32) 0 x) 0.0) + (set! (-> (the-as (inline-array vector) v1-32) 0 y) 0.0) + (set! (-> (the-as (inline-array vector) v1-32) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-32) 0 w) 0.0) + ) + (let ((a0-31 (the-as object (&+ s3-1 64)))) + (set! (-> (the-as (inline-array vector4w) a0-31) 0 x) sv-176) + (set! (-> (the-as (inline-array vector4w) a0-31) 0 y) s0-0) + (set! (-> (the-as (inline-array vector4w) a0-31) 0 z) s1-0) + (set! (-> (the-as (inline-array vector4w) a0-31) 0 w) 0) + ) + (let ((v1-34 (the-as object (&+ s3-1 80)))) + (set! (-> (the-as (inline-array vector) v1-34) 0 x) 1.0) + (set! (-> (the-as (inline-array vector) v1-34) 0 y) 1.0) + (set! (-> (the-as (inline-array vector) v1-34) 0 z) 1.0) + (set! (-> (the-as (inline-array vector) v1-34) 0 w) 0.0) + ) + (let ((v1-35 (the-as object (&+ s3-1 96)))) + (set! (-> (the-as (inline-array vector4w) v1-35) 0 x) sv-192) + (set! (-> (the-as (inline-array vector4w) v1-35) 0 y) s2-1) + (set! (-> (the-as (inline-array vector4w) v1-35) 0 z) s1-0) + (set! (-> (the-as (inline-array vector4w) v1-35) 0 w) 0) + ) + ) + ) + ) + ) + (&+! (-> arg0 base) 112) + (let ((s2-2 (the-as object (-> s5-0 buf base))) + (s4-1 (get-texture map-target-marker level-default-minimap)) + (s3-2 (-> this ctywide texture-mask 8)) + ) + (when s4-1 + (set! (-> (the-as (pointer uint128) s2-2)) (-> this adgif-tmpl dma-vif quad)) + (set! (-> (the-as adgif-shader s2-2) quad 1 quad) (-> this adgif-tmpl quad 1)) + (adgif-shader<-texture-simple! (the-as adgif-shader (&-> (the-as adgif-shader s2-2) miptbp1)) s4-1) + (&+! (-> s5-0 buf base) 112) + (let ((v1-46 (-> s3-2 mask quad)) + (a0-39 (-> s4-1 masks data 0 mask quad)) + ) + (.por v1-47 v1-46 a0-39) + ) + (set! (-> s3-2 mask quad) v1-47) + ) + ) + (let ((f30-0 (the float (/ (-> s5-0 draw-pos x) 16))) + (f28-0 (the float (/ (-> s5-0 draw-pos y) 16))) + (s4-2 (the-as connection-minimap #f)) + ) + (let ((s3-3 (-> *minimap* engine alive-list))) + (while s3-3 + (let ((s2-3 s3-3)) + (when (logtest? (-> s2-3 class flags) (minimap-flag racer)) + (if (string= (-> s2-3 class name) "racer-target") + (set! s4-2 s2-3) + (draw-racer-1 this s5-0 s2-3 (-> this race-scale) f30-0 f28-0) + ) + ) + ) + (set! s3-3 (-> s3-3 next)) + ) + ) + (if s4-2 + (draw-racer-1 this s5-0 s4-2 (-> this race-scale) f30-0 f28-0) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 25 of type minimap +;; WARN: Return type mismatch int vs none. +(defmethod set-race-texture ((this minimap) (arg0 texture) (arg1 float) (arg2 level)) + (set! (-> this race-tex) arg0) + (set! (-> this race-scale) arg1) + (set! (-> this race-level) arg2) + 0 + (none) + ) + +;; definition for method 27 of type minimap +;; WARN: Return type mismatch int vs none. +(defmethod set-race-corner ((this minimap) (arg0 float) (arg1 float)) + (set! (-> this race-corner x) arg0) + (set! (-> this race-corner z) arg1) + 0 + (none) + ) + +;; definition for method 22 of type minimap +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod set-color ((this minimap) (arg0 vector)) + (set! (-> this color quad) (-> arg0 quad)) + 0 + (none) + ) + +;; definition for method 9 of type minimap-class-node +(defmethod minimap-class-node-method-9 ((this minimap-class-node)) + (let ((gp-0 (-> this flags))) + (when (and (logtest? (minimap-flag local-only) gp-0) (not (logtest? (minimap-flag transport) gp-0))) + (cond + ((and (logtest? (minimap-flag ctywide) gp-0) + (!= (status-of-level-and-borrows *level* 'ctywide 'ignore-borrow) 'active) + ) + (return #f) + ) + ((and (logtest? (minimap-flag wasall) gp-0) + (!= (status-of-level-and-borrows *level* 'wasall 'ignore-borrow) 'active) + ) + (return #f) + ) + ((and (logtest? (minimap-flag waswide) gp-0) + (!= (status-of-level-and-borrows *level* 'waswide 'ignore-borrow) 'active) + ) + (return #f) + ) + ((and (logtest? (minimap-flag desert) gp-0) + (!= (status-of-level-and-borrows *level* 'desert 'ignore-borrow) 'active) + ) + (return #f) + ) + ) + ) + ) + #t + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/ui/progress/progress-draw_REF.gc b/test/decompiler/reference/jak3/engine/ui/progress/progress-draw_REF.gc new file mode 100644 index 0000000000..f54f7f7382 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/ui/progress/progress-draw_REF.gc @@ -0,0 +1,5247 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *progress-list-level*, type progress-list-level +(define *progress-list-level* (new 'global 'progress-list-level)) + +;; definition for method 4 of type progress-list-level +;; WARN: disable def twice: 28. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod length ((this progress-list-level)) + (let ((gp-0 0)) + (let* ((v1-0 (-> this act)) + (act (cond + ((= v1-0 1) + (the-as game-task-node-flag (game-task-node-flag act1)) + ) + ((= v1-0 2) + (the-as game-task-node-flag (game-task-node-flag act2)) + ) + ((= v1-0 3) + (the-as game-task-node-flag (game-task-node-flag act3)) + ) + (else + (the-as game-task-node-flag (game-task-node-flag act1 act2 act3)) + ) + ) + ) + ) + (dotimes (s3-0 (-> *game-info* play-list length)) + (let* ((v1-3 (-> *game-info* play-list s3-0)) + (a0-6 (-> this mode)) + (a0-8 (cond + ((= a0-6 'select-pre-start) + (or (-> v1-3 play-continue) (-> v1-3 pre-play-continue)) + ) + ((or (= a0-6 'select-kiosk-start) (= a0-6 'select-kiosk-start-special)) + (-> v1-3 kiosk-play-continue) + ) + (else + (-> v1-3 play-continue) + ) + ) + ) + ) + (if (and a0-8 (and (-> v1-3 play-continue) + (let ((a1-5 (-> *game-info* sub-task-list (-> v1-3 play-node) flags))) + (logtest? a1-5 (the-as int act)) + ) + (lookup-text! *common-text* (-> v1-3 text-name) #t) + ) + ) + (+! gp-0 1) + ) + ) + ) + ) + gp-0 + ) + ) + +;; definition for method 9 of type progress-list-level +;; WARN: disable def twice: 29. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod progress-list-method-9 ((this progress-list-level) (arg0 int)) + (let* ((s4-0 0) + (v1-0 (-> this act)) + (act (cond + ((= v1-0 1) + (the-as game-task-node-flag (game-task-node-flag act1)) + ) + ((= v1-0 2) + (the-as game-task-node-flag (game-task-node-flag act2)) + ) + ((= v1-0 3) + (the-as game-task-node-flag (game-task-node-flag act3)) + ) + (else + (the-as game-task-node-flag (game-task-node-flag act1 act2 act3)) + ) + ) + ) + ) + (dotimes (s2-0 (-> *game-info* play-list length)) + (let* ((s1-0 (-> *game-info* play-list s2-0)) + (v1-3 (-> this mode)) + (v1-5 (cond + ((= v1-3 'select-pre-start) + (or (-> s1-0 play-continue) (-> s1-0 pre-play-continue)) + ) + ((or (= v1-3 'select-kiosk-start) (= v1-3 'select-kiosk-start-special)) + (-> s1-0 kiosk-play-continue) + ) + (else + (-> s1-0 play-continue) + ) + ) + ) + ) + (when (and v1-5 (and (-> s1-0 play-continue) + (let ((a0-11 (-> *game-info* sub-task-list (-> s1-0 play-node) flags))) + (logtest? a0-11 (the-as int act)) + ) + (lookup-text! *common-text* (-> s1-0 text-name) #t) + ) + ) + (if (= s4-0 arg0) + (return s1-0) + ) + (+! s4-0 1) + ) + ) + ) + ) + (the-as game-task-info #f) + ) + +;; definition for method 53 of type progress +;; WARN: Return type mismatch int vs none. +(defmethod progress-method-53 ((this progress) (arg0 font-context)) + (let ((v1-1 (get-scissor-stack-top this))) + (let ((a0-1 arg0) + (f0-0 (-> v1-1 x)) + (f1-0 (-> v1-1 y)) + ) + (set! (-> a0-1 origin x) f0-0) + (set! (-> a0-1 origin y) f1-0) + ) + (let ((a0-2 arg0)) + (set! (-> a0-2 width) (- (-> v1-1 z) (-> v1-1 x))) + ) + (set! (-> arg0 height) (- (-> v1-1 w) (-> v1-1 y))) + ) + 0 + (none) + ) + +;; definition for method 36 of type progress +(defmethod get-language-by-idx ((this progress) (arg0 int)) + (if (and (= (scf-get-territory) 1) (zero? (-> this languages arg0))) + 11 + (-> this languages arg0) + ) + ) + +;; definition for method 38 of type progress +;; WARN: Return type mismatch int vs none. +(defmethod progress-method-38 ((this progress) (arg0 font-context) (arg1 float)) + (let ((v1-1 (get-scissor-stack-top this))) + (set! (-> arg0 origin y) (+ (-> v1-1 y) (* (- (-> v1-1 w) (-> v1-1 y)) arg1))) + ) + 0 + (none) + ) + +;; definition for method 37 of type progress +;; WARN: Return type mismatch int vs none. +(defmethod progress-method-37 ((this progress)) + (with-pp + (let ((gp-0 33)) + (if (< (seconds 0.027) (logand (-> pp clock integral-frame-counter) 15)) + (set-font-color + (the-as font-color gp-0) + (the-as int (the-as uint #x80ffffff)) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + ) + (set-font-color + (the-as font-color gp-0) + (the-as int (the-as uint #x80606060)) + (new 'static 'rgba :r #x60 :g #x60 :b #x60 :a #x80) + (new 'static 'rgba :r #x60 :g #x60 :b #x60 :a #x80) + (new 'static 'rgba :r #x60 :g #x60 :b #x60 :a #x80) + ) + ) + ) + (none) + ) + ) + +;; definition for method 44 of type progress +;; WARN: Return type mismatch int vs none. +(defmethod progress-method-44 ((this progress) (arg0 font-context) (arg1 string)) + (let ((f0-1 (- 1.0 (-> this menu-transition)))) + (let ((v1-1 arg0)) + (set! (-> v1-1 scale) 0.5) + ) + (set! (-> arg0 alpha) f0-1) + ) + (print-game-text arg1 arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + 0 + (none) + ) + +;; definition for method 45 of type progress +;; INFO: Used lq/sq +(defmethod progress-method-45 ((this progress) + (arg0 font-context) + (arg1 float) + (arg2 float) + (arg3 string) + (arg4 float) + (arg5 float) + (arg6 int) + ) + (local-vars (sv-16 (function string font-context draw-string-result)) (sv-32 (function _varargs_ object))) + (let ((v1-0 arg0)) + (set! (-> v1-0 width) 10000.0) + ) + (let ((v1-1 arg0)) + (set! (-> v1-1 scale) arg4) + ) + (set! sv-16 get-string-length) + (set! sv-32 format) + (let ((a0-3 (clear *temp-string*)) + (a1-1 "~S") + (a2-1 arg3) + ) + (sv-32 a0-3 a1-1 a2-1) + ) + (let* ((a0-4 *temp-string*) + (a1-2 arg0) + (f0-2 (-> (sv-16 a0-4 a1-2) length)) + ) + (let ((v1-5 arg0)) + (set! (-> v1-5 width) arg1) + ) + (cond + ((< arg1 f0-2) + (cond + ((< (/ arg1 f0-2) arg5) + (let ((v1-6 arg0)) + (set! (-> v1-6 scale) arg4) + ) + ) + (else + (let ((v1-7 arg0)) + (set! (-> v1-7 scale) (/ (* arg1 arg4) f0-2)) + ) + ) + ) + ) + (else + (let ((v1-8 arg0)) + (set! (-> v1-8 scale) arg4) + ) + ) + ) + ) + (let ((s2-1 print-game-text)) + (format (clear *temp-string*) "~S" arg3) + (let ((f30-0 (s2-1 *temp-string* arg0 #t arg6 (bucket-id hud-draw-hud-alpha)))) + (+! (-> arg0 origin y) (* 0.5 (- arg2 f30-0))) + (let ((f28-0 (-> arg0 origin y))) + (let ((s3-1 print-game-text)) + (format (clear *temp-string*) "~S" arg3) + (s3-1 *temp-string* arg0 #f arg6 (bucket-id hud-draw-hud-alpha)) + ) + (set! (-> arg0 origin y) f28-0) + ) + f30-0 + ) + ) + ) + +;; definition for method 40 of type progress +;; WARN: Return type mismatch int vs none. +(defmethod progress-method-40 ((this progress) (arg0 font-context) (arg1 int) (arg2 int) (arg3 float)) + (let* ((v1-1 (get-scissor-stack-top this)) + (a1-1 (the int (-> v1-1 x))) + (a3-1 (the int (- (-> v1-1 z) (-> v1-1 x)))) + (f0-6 (- 1.0 (-> this menu-transition))) + ) + (with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id particles) + ) + (draw-sprite2d-xy + s3-0 + a1-1 + arg1 + a3-1 + arg2 + (new 'static 'rgba :r #x80 :g #x80 :b #x40 :a (the int (* 64.0 f0-6))) + #x3fffff + ) + ) + ) + 0 + (none) + ) + +;; definition for method 41 of type progress +;; WARN: Return type mismatch int vs none. +(defmethod progress-method-41 ((this progress) (arg0 progress-box) (arg1 float)) + (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id particles) + ) + (case (get-aspect-ratio) + (('aspect4x3) + (set! (-> arg0 aspect4x3 color w) (the int arg1)) + (draw-box-prim-only (-> arg0 aspect4x3) s4-0) + ) + (('aspect16x9) + (set! (-> arg0 aspect16x9 color w) (the int arg1)) + (draw-box-prim-only (-> arg0 aspect16x9) s4-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 42 of type progress +;; WARN: Return type mismatch int vs none. +(defmethod progress-method-42 ((this progress) (arg0 progress-box) (arg1 float)) + (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id particles) + ) + (case (get-aspect-ratio) + (('aspect4x3) + (set! (-> arg0 aspect4x3 color w) (the int arg1)) + (draw-box-alpha-2 (-> arg0 aspect4x3) s4-0) + ) + (('aspect16x9) + (set! (-> arg0 aspect16x9 color w) (the int arg1)) + (draw-box-alpha-2 (-> arg0 aspect16x9) s4-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 43 of type progress +;; WARN: Return type mismatch int vs none. +(defmethod progress-method-43 ((this progress) (arg0 progress-box) (arg1 float)) + (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id bucket6) + ) + (case (get-aspect-ratio) + (('aspect4x3) + (set! (-> arg0 aspect4x3 color w) (the int arg1)) + (draw-box-alpha-1 (-> arg0 aspect4x3) s4-0) + ) + (('aspect16x9) + (set! (-> arg0 aspect16x9 color w) (the int arg1)) + (draw-box-alpha-1 (-> arg0 aspect16x9) s4-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 46 of type progress +;; WARN: Return type mismatch int vs none. +(defmethod progress-method-46 ((this progress) (arg0 font-context) (arg1 float) (arg2 int)) + (progress-method-33 this (-> *progress-work* header)) + (let ((s3-0 (get-scissor-stack-top this))) + (let ((s1-0 *progress-work*)) + (progress-method-42 this (-> s1-0 header) (* 64.0 arg1)) + (progress-method-41 this (-> s1-0 header) (* 128.0 arg1)) + ) + (let ((a0-5 arg0)) + (set! (-> a0-5 flags) (font-flags kerning middle large)) + ) + (let ((a0-6 arg0)) + (set! (-> a0-6 color) (font-color font-color-32)) + ) + (let ((v1-12 arg0) + (f0-5 (+ 10.0 (-> s3-0 x))) + (f1-3 (-> s3-0 y)) + ) + (set! (-> v1-12 origin x) f0-5) + (set! (-> v1-12 origin y) f1-3) + ) + (progress-method-45 + this + arg0 + (+ (- -20.0 (-> s3-0 x)) (-> s3-0 z)) + 45.0 + (lookup-text! *common-text* (the-as text-id arg2) #f) + 0.95 + 0.1 + 32 + ) + ) + (progress-method-34 this) + 0 + (none) + ) + +;; definition for method 47 of type progress +;; WARN: Return type mismatch int vs none. +(defmethod progress-method-47 ((this progress) (arg0 font-context) (arg1 symbol) (arg2 symbol)) + (let ((v1-0 arg0)) + (set! (-> v1-0 scale) 0.5) + ) + (let ((a0-2 arg0)) + (set! (-> a0-2 flags) (font-flags kerning large)) + ) + (set! (-> arg0 origin x) 250.0) + (case (get-aspect-ratio) + (('aspect4x3) + (when arg1 + (set! (-> arg0 origin y) 104.0) + (let ((s4-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 160) + (s4-1 *temp-string* arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + (when arg2 + (set! (-> arg0 origin y) 305.0) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 162) + (s5-1 *temp-string* arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + (('aspect16x9) + (when arg1 + (set! (-> arg0 origin y) 70.0) + (let ((s4-3 print-game-text)) + (format (clear *temp-string*) "~33L~C" 160) + (s4-3 *temp-string* arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + (when arg2 + (set! (-> arg0 origin y) 338.0) + (let ((s5-2 print-game-text)) + (format (clear *temp-string*) "~33L~C" 162) + (s5-2 *temp-string* arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 48 of type progress +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw-prev-next-footer ((this progress) (arg0 font-context) (arg1 float)) + (local-vars (sv-16 string)) + (let ((s3-0 *progress-work*)) + (progress-method-33 this (-> s3-0 footer)) + (progress-method-42 this (-> s3-0 footer) (* 64.0 arg1)) + (progress-method-41 this (-> s3-0 footer) (* 128.0 arg1)) + ) + (let ((a0-4 arg0)) + (set! (-> a0-4 color) (font-color font-color-33)) + ) + (let ((v1-6 arg0)) + (set! (-> v1-6 scale) 0.6) + ) + (let ((s4-1 (get-scissor-stack-top this))) + (let ((v1-8 arg0) + (f0-6 (+ 10.0 (-> s4-1 x))) + (f1-4 (+ (-> s4-1 y) (* 0.5 (- (- (-> s4-1 w) (-> s4-1 y)) (* 32.0 (-> arg0 scale)))))) + ) + (set! (-> v1-8 origin x) f0-6) + (set! (-> v1-8 origin y) f1-4) + ) + (let ((v1-9 arg0)) + (set! (-> v1-9 width) (+ (- -20.0 (-> s4-1 x)) (-> s4-1 z))) + ) + (let ((a0-11 arg0)) + (set! (-> a0-11 flags) (font-flags kerning large)) + ) + (let ((s3-1 print-game-text)) + (let ((s2-0 format) + (s1-0 (clear *temp-string*)) + (s0-0 "~S~S") + ) + (set! sv-16 (lookup-text! *common-text* (text-id progress-footer-prev-l1) #f)) + (let ((a3-0 (lookup-text! *common-text* (text-id progress-prev) #f))) + (s2-0 s1-0 s0-0 sv-16 a3-0) + ) + ) + (s3-1 *temp-string* arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (set! (-> arg0 origin x) (+ -10.0 (-> s4-1 z))) + ) + (let ((a0-17 arg0)) + (set! (-> a0-17 flags) (font-flags kerning right large)) + ) + (let ((s4-2 print-game-text)) + (format + (clear *temp-string*) + "~S~S" + (lookup-text! *common-text* (text-id progress-next) #f) + (lookup-text! *common-text* (text-id progress-footer-next-r1) #f) + ) + (s4-2 *temp-string* arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (progress-method-34 this) + 0 + (none) + ) + +;; definition for method 49 of type progress +;; WARN: Return type mismatch int vs none. +(defmethod draw-yes-no-style-footer ((this progress) (arg0 font-context) (arg1 text-id) (arg2 text-id)) + (local-vars (a0-5 string)) + (cond + ((-> this yes-no-choice) + (format + (clear *temp-string*) + "~33L~S~44L ~S" + (lookup-text! *common-text* arg1 #f) + (lookup-text! *common-text* arg2 #f) + ) + (set! a0-5 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~44L~S ~33L~S" + (lookup-text! *common-text* arg1 #f) + (lookup-text! *common-text* arg2 #f) + ) + (set! a0-5 *temp-string*) + ) + ) + (print-game-text a0-5 arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + 0 + (none) + ) + +;; definition for method 50 of type progress +;; INFO: Used lq/sq +;; ERROR: Stack slot load at 80 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 160 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 176 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 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 160 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 176 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 160 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 176 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 160 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 176 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 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 160 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 176 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 96 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 160 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 176 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 160 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 176 mismatch: defined as size 4, got size 16 +;; WARN: Return type mismatch int vs none. +(defmethod progress-method-50 ((this progress) + (arg0 font-context) + (arg1 text-id) + (arg2 text-id) + (arg3 text-id) + (arg4 symbol) + (arg5 symbol) + (arg6 float) + ) + (local-vars + (sv-16 float) + (sv-20 string) + (sv-24 vector) + (sv-32 symbol) + (sv-48 (function progress font-context float float string float float int float)) + (sv-64 font-context) + (sv-80 float) + (sv-96 float) + (sv-112 (function progress font-context float float string float float int float)) + (sv-128 progress) + (sv-144 font-context) + (sv-160 float) + (sv-176 float) + ) + (set! sv-32 arg5) + (let ((s1-0 arg6)) + (set! sv-16 (fmax 0.0 (* 2.0 (- 0.5 (-> this menu-transition))))) + (set! sv-20 (the-as string #f)) + (set! sv-24 (get-scissor-stack-top this)) + (set! (-> arg0 alpha) sv-16) + (let ((a0-2 arg0)) + (set! (-> a0-2 flags) (font-flags kerning middle large)) + ) + (let ((f30-0 0.0)) + (cond + (sv-32 + (let ((a0-3 arg0)) + (set! (-> a0-3 color) (font-color font-color-32)) + ) + (set! (-> arg0 origin x) (+ 10.0 (-> sv-24 x))) + (let ((s0-1 this)) + (set! sv-48 (method-of-object s0-1 progress-method-45)) + (set! sv-64 arg0) + (set! sv-80 (+ (- -20.0 (-> sv-24 x)) (-> sv-24 z))) + (set! sv-96 (the-as float 24.5)) + (let* ((t0-1 (lookup-text! *common-text* arg1 #f)) + (t2-1 0.75) + (t3-1 35) + (t1-1 s1-0) + (f28-0 (sv-48 s0-1 sv-64 sv-80 sv-96 t0-1 t1-1 t2-1 t3-1)) + ) + (set! f30-0 (* 0.5 f28-0)) + (let ((v1-17 arg0)) + (set! (-> v1-17 scale) (* 0.5 (-> arg0 scale))) + ) + (let* ((a0-7 this) + (t9-3 (method-of-object a0-7 progress-method-40)) + (a1-3 arg0) + (a2-3 (the int (+ -1.0 (-> arg0 origin y)))) + (a3-2 (the int (+ 2.0 f28-0))) + (t0-2 sv-16) + ) + (t9-3 a0-7 a1-3 a2-3 a3-2 t0-2) + (+! (-> arg0 origin y) f28-0) + (set! sv-20 (cond + ((-> this yes-no-choice) + (format + (clear *temp-string*) + "~33L~S ~44L~S" + (lookup-text! *common-text* arg2 #f) + (lookup-text! *common-text* arg3 #f) + (the-as none t0-2) + (the-as none t1-1) + ) + *temp-string* + ) + (else + (format + (clear *temp-string*) + "~44L~S~33L ~S" + (lookup-text! *common-text* arg2 #f) + (lookup-text! *common-text* arg3 #f) + (the-as none t0-2) + (the-as none t1-1) + ) + *temp-string* + ) + ) + ) + ) + ) + ) + ) + (else + (cond + (arg4 + (let ((a0-16 arg0)) + (set! (-> a0-16 color) (font-color font-color-33)) + ) + ) + (else + (let ((a0-17 arg0)) + (set! (-> a0-17 color) (font-color font-color-32)) + ) + ) + ) + (set! (-> arg0 origin x) (+ 10.0 (-> sv-24 x))) + (set! sv-128 this) + (set! sv-112 (method-of-object sv-128 progress-method-45)) + (set! sv-144 arg0) + (set! sv-160 (+ (- -20.0 (-> sv-24 x)) (-> sv-24 z))) + (set! sv-176 (the-as float 24.5)) + (let ((t0-3 (the-as object (lookup-text! *common-text* arg1 #f)))) + (let* ((t1-2 s1-0) + (t2-2 0.75) + (t3-2 35) + (f28-1 (sv-112 sv-128 sv-144 sv-160 sv-176 (the-as string t0-3) t1-2 t2-2 t3-2)) + ) + (when arg4 + (let* ((a0-20 this) + (t9-14 (method-of-object a0-20 progress-method-40)) + (a1-12 arg0) + (a2-12 (the int (+ -1.0 (-> arg0 origin y)))) + (a3-6 (the int (+ 1.0 f28-1))) + ) + (set! t0-3 sv-16) + (t9-14 a0-20 a1-12 a2-12 a3-6 (the-as float t0-3)) + ) + ) + (+! (-> arg0 origin y) f28-1) + ) + (set! sv-20 (cond + ((-> this yes-no-choice) + (format + (clear *temp-string*) + "~1L~S~44L ~S" + (lookup-text! *common-text* arg2 #f) + (lookup-text! *common-text* arg3 #f) + (the-as none t0-3) + ) + *temp-string* + ) + (else + (format + (clear *temp-string*) + "~44L~S ~1L~S~1L" + (lookup-text! *common-text* arg2 #f) + (lookup-text! *common-text* arg3 #f) + (the-as none t0-3) + ) + *temp-string* + ) + ) + ) + ) + ) + ) + (progress-method-44 this arg0 sv-20) + (+! (-> arg0 origin y) f30-0) + ) + ) + 0 + (none) + ) + +;; definition for method 51 of type progress +;; WARN: Return type mismatch int vs none. +(defmethod progress-method-51 ((this progress) (arg0 font-context)) + (let ((v1-1 (get-scissor-stack-top this))) + (let ((a0-1 arg0) + (f0-0 (-> v1-1 x)) + (f1-1 (+ (-> v1-1 y) (* 0.5 (- (-> v1-1 w) (-> v1-1 y))))) + ) + (set! (-> a0-1 origin x) f0-0) + (set! (-> a0-1 origin y) f1-1) + ) + (let ((a0-2 arg0)) + (set! (-> a0-2 width) (- (-> v1-1 z) (-> v1-1 x))) + ) + ) + (let ((v1-2 arg0)) + (set! (-> v1-2 scale) 0.6) + ) + (let ((a0-4 arg0)) + (set! (-> a0-4 flags) (font-flags kerning middle large)) + ) + (if (< (mod (current-time) 300) 210) + (print-game-text + (lookup-text! *common-text* (text-id progress-memcard-loading) #f) + arg0 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + 0 + (none) + ) + +;; definition for method 52 of type progress +;; INFO: Used lq/sq +;; WARN: Stack slot offset 80 signed mismatch +;; WARN: Stack slot offset 80 signed mismatch +;; WARN: Stack slot offset 80 signed mismatch +;; WARN: Stack slot offset 80 signed mismatch +;; WARN: Return type mismatch int vs none. +(defmethod progress-method-52 ((this progress) + (arg0 font-context) + (arg1 string) + (arg2 float) + (arg3 float) + (arg4 float) + (arg5 float) + (arg6 float) + ) + (local-vars + (sv-80 float) + (sv-96 float) + (sv-112 vector) + (sv-128 int) + (sv-144 rgba) + (sv-160 dma-buffer) + (sv-176 pointer) + ) + (set! sv-80 arg3) + (let ((s1-0 arg4) + (s5-0 arg5) + ) + (set! sv-96 arg6) + (set! sv-112 (get-scissor-stack-top this)) + (let ((s0-0 (new 'stack 'hud-sprite)) + (f30-0 (* (- (-> sv-112 z) (-> sv-112 x)) s1-0)) + ) + (let ((s1-1 (- (- 256 (if sv-96 + 10 + 0 + ) + ) + (the int (* 0.5 f30-0)) + ) + ) + ) + (set! sv-128 (the int (+ (-> sv-112 y) (* (- (-> sv-112 w) (-> sv-112 y)) sv-80)))) + 1.0 + (let ((f28-0 f30-0)) + (let ((f24-0 (-> *video-params* relative-x-scale-reciprical)) + (f26-0 (-> *video-params* relative-x-scale)) + ) + (set! sv-160 (-> *display* frames (-> *display* on-screen) global-buf)) + (set! sv-176 (-> sv-160 base)) + (set! (-> s0-0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x37 :page #x11))) + ) + (if (-> s0-0 tid) + (set! (-> s0-0 scale-x) (/ (* f30-0 f24-0) (the float (-> (the-as texture (-> s0-0 tid)) w)))) + ) + (set! (-> s0-0 scale-y) 0.7) + (let ((v1-28 (-> s0-0 color-ptr))) + (set! (-> v1-28 0) 128) + (set! (-> v1-28 1) 128) + (set! (-> v1-28 2) 128) + (set! (-> v1-28 3) (the int (* 128.0 arg2))) + ) + (set-vector! (-> s0-0 pos) s1-1 sv-128 #x3fffff 0) + (draw s0-0 sv-160 (-> *level* level-default) #t) + (let ((f24-1 0.2)) + (set! (-> s0-0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x38 :page #x11))) + ) + (set! (-> s0-0 scale-x) f24-1) + (set! (-> s0-0 scale-y) 1.33) + (if (-> s0-0 tid) + (set! f28-0 (- f30-0 (* f24-1 f26-0 (the float (-> (the-as texture (-> s0-0 tid)) w))))) + ) + ) + (let* ((v1-39 (the int (* f28-0 s5-0))) + (a1-3 (+ s1-1 (the int (* 18.0 f26-0)) v1-39)) + (a3-2 (the int (- f28-0 (the float v1-39)))) + (t1-1 (shr (shl (the int (* 128.0 arg2)) 56) 32)) + ) + (draw-sprite2d-xy sv-160 a1-3 (+ sv-128 7) a3-2 9 (the-as rgba t1-1) #x3fffff) + ) + ) + (set-vector! (-> s0-0 pos) (+ s1-1 (the int (* f28-0 s5-0))) (+ sv-128 -4) #x3fffff 0) + ) + (draw s0-0 sv-160 (-> *level* level-default) #t) + (when sv-96 + (set! sv-144 (-> *font-work* color-table 32 color 0)) + (set! (-> s0-0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x39 :page #x11))) + ) + (set! (-> s0-0 scale-x) 1.0) + (set! (-> s0-0 scale-y) 1.0) + (let ((v1-55 (-> s0-0 color-ptr))) + (set! (-> v1-55 0) (the-as int (-> sv-144 r))) + (set! (-> v1-55 1) (the-as int (-> sv-144 g))) + (set! (-> v1-55 2) (the-as int (-> sv-144 b))) + (set! (-> v1-55 3) (the int (* 128.0 arg2))) + ) + (set-vector! (-> s0-0 pos) (+ s1-1 -20) (+ sv-128 -5) #x3fffff 0) + (draw s0-0 sv-160 (-> *level* level-default) #t) + (set! (-> s0-0 tid) + (the-as texture-id (lookup-texture-by-id (new 'static 'texture-id :index #x3a :page #x11))) + ) + (set! (-> s0-0 scale-x) 1.0) + (set! (-> s0-0 scale-y) 1.0) + (set-vector! (-> s0-0 pos) (+ (the int f30-0) 8 s1-1) (+ sv-128 -5) #x3fffff 0) + (draw s0-0 sv-160 (-> *level* level-default) #t) + ) + (let ((a3-6 (-> sv-160 base))) + (when (!= sv-176 a3-6) + (let ((v1-68 (the-as object (-> sv-160 base)))) + (set! (-> (the-as dma-packet v1-68) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-68) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-68) vif1) (new 'static 'vif-tag)) + (set! (-> sv-160 base) (&+ (the-as pointer v1-68) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id hud-draw-hud-alpha) + sv-176 + (the-as (pointer dma-tag) a3-6) + ) + ) + ) + (let ((f0-43 0.5)) + (let ((v1-77 arg0)) + (set! (-> v1-77 scale) f0-43) + ) + (let ((a0-56 arg0)) + (set! (-> a0-56 flags) (font-flags kerning large)) + ) + (let ((v1-79 arg0) + (f1-14 (the float s1-1)) + (f2-3 (+ -20.0 (the float sv-128))) + ) + (set! (-> v1-79 origin x) f1-14) + (set! (-> v1-79 origin y) f2-3) + ) + (let ((f0-44 (progress-method-45 this arg0 f30-0 (* 32.0 f0-43) arg1 f0-43 0.75 32))) + (if (= (-> this option-index) (-> this current-index)) + (progress-method-40 this arg0 (the int (+ -2.0 (-> arg0 origin y))) (the int (+ 4.0 f0-44)) arg2) + ) + ) + ) + ) + (+! (-> arg0 origin x) f30-0) + ) + (let ((a0-62 arg0)) + (set! (-> a0-62 flags) (font-flags kerning right large)) + ) + (let ((s4-1 print-game-text)) + (format (clear *temp-string*) "~D%" (the int (* 100.0 s5-0))) + (s4-1 *temp-string* arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + (set! (-> arg0 flags) (font-flags kerning large)) + 0 + (none) + ) + +;; definition for method 9 of type progress-icon-array +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw-icon-array! ((this progress-icon-array) (arg0 int) (arg1 int) (arg2 float) (arg3 float) (arg4 rgba) (arg5 float)) + (local-vars (sv-96 int) (sv-112 int) (sv-128 dma-buffer) (sv-144 pointer)) + (set! sv-96 arg0) + (set! sv-112 arg1) + (let ((s5-0 arg2) + (s4-0 arg3) + (s1-0 arg4) + (s0-0 arg5) + (s3-0 (new 'stack 'hud-sprite)) + (s2-0 (new 'stack 'vector4w)) + ) + (set-vector! s2-0 sv-96 sv-112 0 1) + (let ((v1-3 (-> s3-0 color-ptr))) + (set! (-> v1-3 0) (the-as int (-> s1-0 r))) + (set! (-> v1-3 1) (the-as int (-> s1-0 g))) + (set! (-> v1-3 2) (the-as int (-> s1-0 b))) + (set! (-> v1-3 3) (the int (* s0-0 (the float (-> s1-0 a))))) + ) + (set! (-> s3-0 pos z) #xffffff) + (set! (-> s3-0 pos w) 1) + (set! (-> s3-0 scale-x) s5-0) + (set! (-> s3-0 scale-y) s4-0) + (dotimes (s1-1 (-> this length)) + (let ((s0-1 (-> this icons s1-1))) + (set! (-> s3-0 tid) (the-as texture-id (lookup-texture-by-id (-> s0-1 tex-id)))) + (set! (-> s3-0 flags) (the-as hud-sprite-flags (-> s0-1 flags))) + (set-as-offset-from! + (the-as hud-sprite (-> s3-0 pos)) + s2-0 + (the int (* (the float (-> s0-1 offset x)) s5-0)) + (the int (* (the float (-> s0-1 offset y)) s4-0)) + ) + (set! sv-128 (-> *display* frames (-> *display* on-screen) global-buf)) + (set! sv-144 (-> sv-128 base)) + (draw s3-0 sv-128 (-> *level* level-default) #t) + (let ((a3-3 (-> sv-128 base))) + (when (!= sv-144 a3-3) + (let ((v1-24 (the-as object (-> sv-128 base)))) + (set! (-> (the-as dma-packet v1-24) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-24) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-24) vif1) (new 'static 'vif-tag)) + (set! (-> sv-128 base) (&+ (the-as pointer v1-24) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (-> s0-1 bucket) + sv-144 + (the-as (pointer dma-tag) a3-3) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + 0 + (none) + ) + +;; definition for method 10 of type menu-bigmap-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-bigmap-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + 0 + (none) + ) + +;; definition for function sort-task-node-result +;; WARN: Return type mismatch symbol vs none. +(defun sort-task-node-result ((arg0 int)) + (let ((v1-1 (-> *game-info* mission-list)) + (a1-1 (max 0 (+ arg0 -1))) + ) + (let ((a0-3 0)) + (while (> a1-1 0) + (while (< a0-3 a1-1) + (when (and (logtest? (-> v1-1 a0-3 flags) (game-task-node-flag closed)) + (logtest? (-> v1-1 (+ a0-3 1) flags) (game-task-node-flag closed)) + (< (-> v1-1 a0-3 close-time) (-> v1-1 (+ a0-3 1) close-time)) + ) + (let ((a2-19 (-> v1-1 a0-3))) + (set! (-> v1-1 a0-3) (-> v1-1 (+ a0-3 1))) + (set! (-> v1-1 (+ a0-3 1)) a2-19) + ) + ) + (+! a0-3 1) + ) + (+! a1-1 -1) + (set! a0-3 0) + ) + ) + ) + (none) + ) + +;; definition for function find-mission-text-at-index +(defun find-mission-text-at-index ((arg0 progress) (arg1 int)) + (local-vars (v1-74 symbol)) + (when (< arg1 (-> arg0 current-line-index)) + (set! (-> arg0 current-task-index) (length (-> *game-info* sub-task-list))) + (set! (-> arg0 current-line-index) -1) + (set! (-> arg0 current-task) (game-task unknown)) + (set! (-> arg0 first-closed-line-index) -1) + (set! (-> arg0 extra-text-state) -1) + (set! (-> arg0 num-open-tasks-found) 0) + (set! (-> arg0 num-closed-tasks-found) 0) + 0 + ) + (let ((s4-0 (-> *game-info* sub-task-list))) + 0 + (let ((s3-0 (the-as game-task-node-info #f))) + (while (and (> (-> arg0 current-task-index) 0) (!= (-> arg0 current-line-index) arg1)) + (cond + ((or (= (-> arg0 extra-text-state) -1) (= (-> arg0 extra-text-state) 3)) + (+! (-> arg0 current-task-index) -1) + (let ((s2-0 (-> s4-0 (-> arg0 current-task-index)))) + (when (and (!= (-> s2-0 task) (-> arg0 current-task)) (nonzero? (-> s2-0 description))) + (cond + ((and (>= (-> arg0 first-closed-line-index) 0) (game-task-node-info-method-12 s2-0)) + (set! (-> arg0 current-task) (-> s2-0 task)) + ) + ((or (and (>= (-> arg0 first-closed-line-index) 0) (logtest? (-> s2-0 flags) (game-task-node-flag closed))) + (and (< (-> arg0 first-closed-line-index) 0) (game-task-node-info-method-12 s2-0)) + ) + (set! (-> arg0 current-task) (-> s2-0 task)) + (set! s3-0 (-> s4-0 (-> arg0 current-task-index))) + (-> s4-0 (-> arg0 current-task-index) description) + (if (< (-> arg0 first-closed-line-index) 0) + (+! (-> arg0 num-open-tasks-found) 1) + (set! (-> arg0 num-closed-tasks-found) 1) + ) + (+! (-> arg0 current-line-index) 1) + ) + ) + ) + ) + (when (and (zero? (-> arg0 current-task-index)) (!= (-> arg0 current-line-index) arg1)) + (set! (-> arg0 current-task-index) (length (-> *game-info* sub-task-list))) + (cond + ((< (-> arg0 first-closed-line-index) 0) + (set! (-> arg0 first-closed-line-index) arg1) + (+! (-> arg0 extra-text-state) (if (nonzero? (-> arg0 num-open-tasks-found)) + 2 + 1 + ) + ) + ) + (else + (+! (-> arg0 extra-text-state) (if (nonzero? (-> arg0 num-closed-tasks-found)) + 2 + 1 + ) + ) + ) + ) + ) + ) + ((zero? (-> arg0 extra-text-state)) + 114 + (+! (-> arg0 extra-text-state) 1) + (+! (-> arg0 current-line-index) 1) + ) + ((= (-> arg0 extra-text-state) 1) + 968 + #t + (let ((v1-73 (the-as symbol (-> arg0 num-open-tasks-found)))) + (set! v1-73 v1-73) + (cmove-#f-zero v1-74 v1-73 v1-73) + ) + (+! (-> arg0 extra-text-state) 1) + (+! (-> arg0 current-line-index) 1) + ) + ((= (-> arg0 extra-text-state) 4) + 114 + (+! (-> arg0 extra-text-state) 1) + (+! (-> arg0 current-line-index) 1) + ) + ((= (-> arg0 extra-text-state) 5) + 969 + (+! (-> arg0 extra-text-state) 2) + (+! (-> arg0 current-line-index) 1) + ) + (else + 0 + (+! (-> arg0 extra-text-state) 1) + (+! (-> arg0 current-line-index) 1) + ) + ) + ) + (cond + ((= (-> arg0 current-line-index) arg1) + (empty) + s3-0 + ) + (else + (the-as game-task-node-info #f) + ) + ) + ) + ) + ) + +;; definition for method 10 of type menu-missions-option +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-missions-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars + (sv-176 float) + (sv-180 game-task-node-info) + (sv-184 game-task-node-info) + (sv-188 float) + (sv-192 int) + (sv-200 symbol) + (sv-208 int) + (sv-216 (array game-task-node-info)) + (sv-224 string) + (sv-240 (function _varargs_ object)) + (sv-256 string) + (sv-272 game-task-node-info) + (sv-288 text-id) + (sv-304 (function string font-context symbol int bucket-id float)) + (sv-320 (function _varargs_ object)) + (sv-336 string) + (sv-352 string) + (sv-368 (function string font-context symbol int bucket-id float)) + (sv-384 (function _varargs_ object)) + ) + (set! sv-176 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (set! sv-180 (new 'stack 'game-task-node-info)) + (set! sv-184 (new 'stack 'game-task-node-info)) + (set! (-> arg0 current-task-index) (length (-> *game-info* sub-task-list))) + (set! (-> arg0 current-line-index) -1) + (set! (-> arg0 current-task) (game-task unknown)) + (set! (-> arg0 first-closed-line-index) -1) + (set! (-> arg0 extra-text-state) -1) + (set! (-> arg0 num-open-tasks-found) 0) + (set! (-> arg0 num-closed-tasks-found) 0) + (set! (-> arg1 alpha) sv-176) + (set! (-> *game-info* mission-list 0) sv-180) + (set! (-> sv-180 description) (text-id progress-missions-todo)) + (set! (-> sv-184 description) (text-id progress-missions-completed)) + (progress-method-33 arg0 (-> *progress-work* body-footer)) + (let ((s3-0 (get-scissor-stack-top arg0))) + (set! sv-188 (- (-> s3-0 w) (-> s3-0 y))) + (set! sv-192 1) + (set! sv-200 #t) + (set! sv-208 (length (-> *game-info* sub-task-list))) + (set! sv-216 (-> *game-info* mission-list)) + (dotimes (s2-0 sv-208) + (let ((v0-6 (find-mission-text-at-index arg0 s2-0))) + (when v0-6 + (when (and (logtest? (-> v0-6 flags) (game-task-node-flag closed)) sv-200) + (set! sv-200 (the-as symbol #f)) + (set! (-> sv-216 sv-192) sv-184) + (set! sv-192 (+ sv-192 1)) + ) + (set! (-> sv-216 sv-192) v0-6) + (set! sv-192 (+ sv-192 1)) + ) + ) + ) + (set! (-> arg0 total-num-tasks) sv-192) + (sort-task-node-result (-> arg0 total-num-tasks)) + (let ((a0-17 arg1)) + (set! (-> a0-17 flags) (font-flags kerning large)) + ) + (let ((v1-40 arg1)) + (set! (-> v1-40 scale) 0.5) + ) + (let ((f30-0 14.0) + (s2-1 get-string-length) + ) + (let ((s1-0 format) + (s0-0 (clear *temp-string*)) + ) + (set! sv-224 "~S") + (let ((a2-2 (lookup-text! *common-text* (text-id progress-missions-complete-icon) #f))) + (s1-0 s0-0 sv-224 a2-2) + ) + ) + (let ((f30-1 (+ f30-0 (-> (s2-1 *temp-string* arg1) length)))) + (let ((v1-45 arg1)) + (set! (-> v1-45 width) (+ (- (- -10.0 f30-1) (-> s3-0 x)) (-> s3-0 z))) + ) + (let ((s2-2 (-> *game-info* mission-list)) + (s1-2 (max 0 (the int (-> this current-index)))) + ) + (let* ((s0-1 (-> s2-2 s1-2)) + (a1-10 + (if (and (logtest? (-> s0-1 flags) (game-task-node-flag closed)) (task-complete? *game-info* (-> s0-1 task))) + (-> *game-info* play-list (-> s0-1 task) text-name) + (-> s0-1 description) + ) + ) + ) + (set! sv-256 (lookup-text! *common-text* a1-10 #f)) + ) + (let ((s0-2 print-game-text)) + (set! sv-240 format) + (let ((a0-29 (clear *temp-string*)) + (a1-11 "~S") + ) + (sv-240 a0-29 a1-11 sv-256) + ) + (let ((f28-0 (s0-2 *temp-string* arg1 #t 44 (bucket-id hud-draw-hud-alpha)))) + (let* ((v1-60 arg1) + (f0-14 (+ 10.0 (-> s3-0 x))) + (f1-6 4.0) + (f2-2 (-> this current-index)) + (f1-8 (+ (- f1-6 (* f28-0 (- f2-2 (* (the float (the int (/ f2-2 1.0))) 1.0)))) (-> s3-0 y))) + ) + (set! (-> v1-60 origin x) f0-14) + (set! (-> v1-60 origin y) f1-8) + ) + (let ((v1-61 arg1)) + (set! (-> v1-61 height) sv-188) + ) + (while (and (< (-> arg1 origin y) (-> s3-0 w)) (< s1-2 (-> arg0 total-num-tasks))) + (set! sv-272 (-> s2-2 s1-2)) + (if (and (logtest? (-> sv-272 flags) (game-task-node-flag closed)) (task-complete? *game-info* (-> sv-272 task))) + (set! sv-288 (-> *game-info* play-list (-> sv-272 task) text-name)) + (set! sv-288 (-> sv-272 description)) + ) + (let ((s0-3 (lookup-text! *common-text* sv-288 #f))) + (set! (-> arg1 origin x) (+ 10.0 (-> s3-0 x))) + (cond + ((or (= sv-288 (text-id progress-missions-todo)) (= sv-288 (text-id progress-missions-completed))) + (let ((a0-41 arg1)) + (set! (-> a0-41 color) (font-color font-color-34)) + ) + ) + (else + (set! sv-304 print-game-text) + (set! sv-320 format) + (set! sv-336 (clear *temp-string*)) + (set! sv-352 "~S") + (let ((a2-8 (lookup-text! + *common-text* + (if (logtest? (-> sv-272 flags) (game-task-node-flag closed)) + (text-id progress-missions-complete-icon) + (text-id progress-missions-todo-icon) + ) + #f + ) + ) + ) + (sv-320 sv-336 sv-352 a2-8) + ) + (let ((a0-45 *temp-string*) + (a1-17 arg1) + (a2-9 #f) + (a3-2 44) + (t0-2 579) + ) + (sv-304 a0-45 a1-17 a2-9 a3-2 (the-as bucket-id t0-2)) + ) + (let ((a0-46 arg1)) + (set! (-> a0-46 color) (font-color font-color-32)) + ) + (set! (-> arg1 origin x) (+ (-> s3-0 x) f30-1)) + ) + ) + (let ((f26-0 (-> arg1 origin y))) + (set! sv-368 print-game-text) + (set! sv-384 format) + (let ((a0-48 (clear *temp-string*)) + (a1-18 "~S") + ) + (sv-384 a0-48 a1-18 s0-3) + ) + (let ((a0-49 *temp-string*) + (a1-19 arg1) + (a2-11 #f) + (a3-3 44) + (t0-3 579) + ) + (set! (-> arg1 origin y) (+ f26-0 (sv-368 a0-49 a1-19 a2-11 a3-3 (the-as bucket-id t0-3)))) + ) + ) + ) + (+! s1-2 1) + ) + (set! (-> this on-screen) (the-as basic (< (-> arg1 origin y) (-> s3-0 w)))) + (seek! + (-> this current-index) + (-> this target-index) + (* (/ (-> this scroll-speed) f28-0) (seconds-per-frame)) + ) + ) + ) + ) + ) + ) + ) + (progress-method-34 arg0) + (let ((s3-1 *progress-work*)) + (progress-method-46 arg0 arg1 sv-176 106) + (progress-method-42 arg0 (-> s3-1 footer) (* 64.0 sv-176)) + (progress-method-41 arg0 (-> s3-1 footer) (* 128.0 sv-176)) + ) + (progress-method-47 + arg0 + arg1 + (!= (-> this current-index) 0.0) + (and (not (-> this on-screen)) (!= (-> this current-index) (the float (+ (-> arg0 total-num-tasks) -1)))) + ) + 0 + (none) + ) + +;; definition for method 12 of type highscore-page-info +(defmethod highscore-time->string ((this highscore-page-info) (arg0 float)) + 0 + 0 + 0 + (let* ((gp-0 (the int (* 0.016666668 arg0))) + (v1-5 (- arg0 (* 60.0 (the float gp-0)))) + (s5-0 (the int v1-5)) + (v1-6 (- v1-5 (the float s5-0))) + (s3-0 (the int (* 100.0 v1-6))) + ) + (format (clear *temp-string*) "~d:~2,'0,d:~2,'0,d" gp-0 s5-0 s3-0) + ) + *temp-string* + ) + +;; definition for method 10 of type highscore-page-info +;; WARN: Return type mismatch int vs none. +(defmethod highscore-page-info-method-10 ((this highscore-page-info) (arg0 font-context) (arg1 float) (arg2 float) (arg3 float)) + (let ((v1-3 (-> *highscore-info-array* (-> this game-score)))) + (let ((a1-2 arg0) + (f0-0 arg2) + (f1-0 arg3) + ) + (set! (-> a1-2 origin x) f0-0) + (set! (-> a1-2 origin y) f1-0) + ) + (cond + ((logtest? (-> v1-3 flags) (highscore-flags hf2)) + (print-game-text + (highscore-time->string this (* 0.0033333334 arg1)) + arg0 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + ((logtest? (-> v1-3 flags) (highscore-flags hf3)) + (let ((s4-1 print-game-text)) + (format (clear *temp-string*) "~,,1Mm" arg1) + (s4-1 *temp-string* arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + (else + (let ((s4-2 print-game-text)) + (format (clear *temp-string*) "~D" (the int arg1)) + (s4-2 *temp-string* arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 11 of type highscore-page-info +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod highscore-page-info-method-11 ((this highscore-page-info) (arg0 font-context) (arg1 int) (arg2 float) (arg3 float) (arg4 float)) + (local-vars (sv-16 string) (sv-32 string)) + (set! (-> arg0 origin x) arg3) + (let ((a0-1 arg0)) + (set! (-> a0-1 flags) (font-flags kerning large)) + ) + (let ((s1-0 print-game-text)) + (let ((s0-0 format)) + (set! sv-16 (clear *temp-string*)) + (set! sv-32 "~S") + (let ((a2-2 (lookup-text! *common-text* (the-as text-id arg1) #f))) + (s0-0 sv-16 sv-32 a2-2) + ) + ) + (s1-0 *temp-string* arg0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (let ((a0-6 arg0)) + (set! (-> a0-6 flags) (font-flags kerning right large)) + ) + (highscore-page-info-method-10 this arg0 arg2 arg4 (-> arg0 origin y)) + 0 + (none) + ) + +;; definition for method 9 of type highscore-page-info +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod highscore-page-info-method-9 ((this highscore-page-info) (arg0 progress) (arg1 font-context) (arg2 float) (arg3 float)) + (local-vars + (sv-16 highscore-info) + (sv-32 (function string font-context symbol int bucket-id float)) + (sv-48 (function _varargs_ object)) + (sv-64 string) + (sv-80 string) + (sv-96 int) + (sv-112 int) + ) + (let ((s3-0 (get-scissor-stack-top arg0))) + (let ((f28-0 (-> *video-params* relative-x-scale))) + (set! sv-16 (-> *highscore-info-array* (-> this game-score))) + (let ((f30-0 (- (-> s3-0 z) (-> s3-0 x))) + (s0-0 *progress-work*) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning large)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 scale) 0.675) + ) + (let ((a0-5 arg1)) + (set! (-> a0-5 color) (font-color font-color-32)) + ) + (set! (-> arg1 origin x) (+ 10.0 arg2 (-> s3-0 x))) + (progress-method-38 arg0 arg1 0.01) + (let ((v1-11 arg1)) + (set! (-> v1-11 width) (* 0.75 f30-0)) + ) + (set! sv-32 print-game-text) + (set! sv-48 format) + (set! sv-64 (clear *temp-string*)) + (set! sv-80 "~S") + (let ((a2-3 (lookup-text! *common-text* (-> this text) #f))) + (sv-48 sv-64 sv-80 a2-3) + ) + (let ((a0-11 *temp-string*) + (a1-4 arg1) + (a2-4 #f) + (a3-1 32) + (t0-1 579) + ) + (sv-32 a0-11 a1-4 a2-4 a3-1 (the-as bucket-id t0-1)) + ) + (draw-icon-array! + (-> *progress-icon-arrays* (-> this icon)) + (the int (+ (- (-> s3-0 z) (* (-> this icon-offsetx) f28-0)) arg2)) + (the int (+ (-> s3-0 y) (-> this icon-offsety))) + (-> this icon-scalex) + (-> this icon-scaley) + (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a (the int (* 128.0 arg3))) + arg3 + ) + (when (not (logtest? (-> sv-16 flags) (highscore-flags hf1))) + (let ((f28-1 (* 20.0 f28-0)) + (f26-0 (+ 50.0 (-> s3-0 y))) + ) + (set! sv-96 (the int (+ 48.0 (-> s3-0 y)))) + (set! sv-112 (logior #x808080 (shr (shl (the int (* 128.0 arg3)) 56) 32))) + (let ((f24-0 0.25) + (f22-0 (+ 10.0 arg2 (-> s3-0 x))) + ) + (let ((v1-33 arg1)) + (set! (-> v1-33 scale) 0.45) + ) + (let ((f20-0 f22-0)) + (draw-icon-array! (-> *progress-icon-arrays* 63) (the int f20-0) sv-96 f24-0 f24-0 (the-as rgba sv-112) arg3) + (highscore-page-info-method-10 this arg1 (-> sv-16 gold-score) (+ f20-0 f28-1) f26-0) + ) + (let ((f20-1 (+ f22-0 (* 0.333 f30-0)))) + (draw-icon-array! (-> *progress-icon-arrays* 64) (the int f20-1) sv-96 f24-0 f24-0 (the-as rgba sv-112) arg3) + (highscore-page-info-method-10 this arg1 (-> sv-16 silver-score) (+ f20-1 f28-1) f26-0) + ) + (let ((f30-1 (+ f22-0 (* 0.667 f30-0)))) + (let* ((a0-23 (-> *progress-icon-arrays* 65)) + (t9-11 (method-of-object a0-23 draw-icon-array!)) + (a1-10 (the int f30-1)) + (a3-7 f24-0) + (t0-7 f24-0) + (t2-3 arg3) + ) + (t9-11 a0-23 a1-10 sv-96 a3-7 t0-7 (the-as rgba sv-112) t2-3) + ) + (highscore-page-info-method-10 this arg1 (-> sv-16 bronze-score) (+ f30-1 f28-1) f26-0) + ) + ) + ) + ) + (progress-method-42 arg0 (-> s0-0 highscore-1) (* 16.0 arg3)) + (progress-method-41 arg0 (-> s0-0 highscore-1) (* 128.0 arg3)) + (progress-method-41 arg0 (-> s0-0 highscore-0) (* 128.0 arg3)) + (progress-method-33 arg0 (-> s0-0 highscore-body)) + ) + ) + (let ((f30-2 (+ 10.0 arg2 (-> s3-0 x))) + (f28-2 (+ -10.0 arg2 (-> s3-0 z))) + (s3-1 (get-game-score-ref *game-info* (the-as int (-> this game-score)))) + ) + (let ((v1-61 arg1)) + (set! (-> v1-61 scale) 0.6) + ) + (progress-method-38 arg0 arg1 0.03) + (highscore-page-info-method-11 this arg1 56 (-> s3-1 0) f30-2 f28-2) + (let ((v1-64 arg1)) + (set! (-> v1-64 scale) 0.5) + ) + (progress-method-38 arg0 arg1 0.18) + (highscore-page-info-method-11 this arg1 57 (-> s3-1 1) f30-2 f28-2) + (let ((v1-67 arg1)) + (set! (-> v1-67 scale) 0.45) + ) + (progress-method-38 arg0 arg1 0.31) + (highscore-page-info-method-11 this arg1 58 (-> s3-1 2) f30-2 f28-2) + (let ((v1-70 arg1)) + (set! (-> v1-70 scale) 0.425) + ) + (progress-method-38 arg0 arg1 0.43) + (highscore-page-info-method-11 this arg1 59 (-> s3-1 3) f30-2 f28-2) + (progress-method-38 arg0 arg1 0.545) + (highscore-page-info-method-11 this arg1 60 (-> s3-1 4) f30-2 f28-2) + (progress-method-38 arg0 arg1 0.66) + (highscore-page-info-method-11 this arg1 61 (-> s3-1 5) f30-2 f28-2) + (progress-method-38 arg0 arg1 0.775) + (highscore-page-info-method-11 this arg1 62 (-> s3-1 6) f30-2 f28-2) + (progress-method-38 arg0 arg1 0.89) + (highscore-page-info-method-11 this arg1 63 (-> s3-1 7) f30-2 f28-2) + ) + ) + (progress-method-34 arg0) + 0 + (none) + ) + +;; definition for method 10 of type menu-highscores-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-highscores-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (s4-0 *progress-work*) + ) + (set! (-> arg1 alpha) f30-0) + (let ((a0-1 arg1)) + (set! (-> a0-1 flags) (font-flags kerning middle large)) + ) + (progress-method-33 arg0 (-> s4-0 body-footer)) + (progress-method-53 arg0 arg1) + (let ((f28-0 (the float (menu-highscores-option-method-12 this)))) + (let* ((f0-2 (-> this current-index)) + (f26-0 (- f0-2 (* (the float (the int (/ f0-2 f28-0))) f28-0))) + (f0-4 (+ 1.0 f26-0)) + (f0-5 (- f0-4 (* (the float (the int (/ f0-4 f28-0))) f28-0))) + (s2-0 (-> this pages (the int f26-0))) + (s3-1 (-> this pages (the int f0-5))) + (s1-0 (get-scissor-stack-top arg0)) + (f0-8 (- (-> s1-0 z) (-> s1-0 x))) + ) + (when (!= f28-0 0.0) + (let ((f26-1 (* (- 1.0 (- f26-0 (* (the float (the int (/ f26-0 1.0))) 1.0))) f0-8))) + (set! (-> arg1 origin x) (+ (- f26-1 f0-8) (-> s1-0 x))) + ((method-of-type highscore-page-info highscore-page-info-method-9) + (the-as highscore-page-info s2-0) + arg0 + arg1 + (- f26-1 f0-8) + f30-0 + ) + (when (< 1.0 f28-0) + (set! (-> arg1 origin x) (+ f26-1 (-> s1-0 x))) + ((method-of-type highscore-page-info highscore-page-info-method-9) + (the-as highscore-page-info s3-1) + arg0 + arg1 + f26-1 + f30-0 + ) + ) + ) + ) + ) + (progress-method-34 arg0) + (progress-method-46 arg0 arg1 f30-0 55) + (cond + ((< 1.0 f28-0) + (draw-prev-next-footer arg0 arg1 f30-0) + ) + (else + (progress-method-42 arg0 (-> s4-0 footer) (* 64.0 f30-0)) + (progress-method-41 arg0 (-> s4-0 footer) (* 128.0 f30-0)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type inventory-item +;; WARN: Return type mismatch int vs none. +(defmethod inventory-item-method-10 ((this inventory-item) (arg0 progress) (arg1 font-context) (arg2 float) (arg3 float) (arg4 symbol)) + (let ((s5-0 #x20000000)) + (when (item-obtained? this) + (if arg4 + (set! s5-0 (the-as int (the-as uint #x80ffffff))) + (set! s5-0 (the-as int (the-as uint #x80808080))) + ) + ) + (let ((s3-1 (new 'stack 'vector2)) + (v1-9 (get-scissor-stack-top arg0)) + (f0-0 (-> this icon-scale)) + ) + (set! (-> s3-1 x) (+ (-> v1-9 x) (* (- (-> v1-9 z) (-> v1-9 x)) (-> this offset x)) arg2)) + (set! (-> s3-1 y) (+ (-> v1-9 y) (* (- (-> v1-9 w) (-> v1-9 y)) (-> this offset y)))) + (draw-icon-array! + (-> *progress-icon-arrays* (-> this icon)) + (the int (-> s3-1 x)) + (the int (-> s3-1 y)) + f0-0 + f0-0 + (the-as rgba s5-0) + arg3 + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type inventory-item-group +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod inventory-item-group-method-10 ((this inventory-item-group) (arg0 progress) (arg1 font-context) (arg2 float) (arg3 float) (arg4 int)) + (local-vars + (sv-16 (function string font-context symbol int bucket-id float)) + (sv-32 (function _varargs_ object)) + (sv-48 string) + (sv-64 string) + ) + (dotimes (s0-0 (-> this items length)) + (when (and arg4 (have-items? this)) + (let ((v1-3 arg1)) + (set! (-> v1-3 scale) 0.45) + ) + (progress-method-38 arg0 arg1 0.9) + (set! sv-16 print-game-text) + (set! sv-32 format) + (set! sv-48 (clear *temp-string*)) + (set! sv-64 "~S") + (let ((a2-3 (lookup-text! *common-text* (-> this name) #f))) + (sv-32 sv-48 sv-64 a2-3) + ) + (let ((a0-7 *temp-string*) + (a1-4 arg1) + (a2-4 #f) + (a3-1 44) + (t0-1 579) + ) + (sv-16 a0-7 a1-4 a2-4 a3-1 (the-as bucket-id t0-1)) + ) + ) + (inventory-item-method-10 (-> this items s0-0) arg0 arg1 arg2 arg3 (the-as symbol arg4)) + ) + 0 + (none) + ) + +;; definition for method 9 of type inventory-screen +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod inventory-screen-method-9 ((this inventory-screen) (arg0 progress) (arg1 font-context) (arg2 float) (arg3 float)) + (local-vars (sv-16 string) (sv-32 string)) + (let ((v1-0 arg1)) + (set! (-> v1-0 scale) 0.45) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color font-color-32)) + ) + (progress-method-38 arg0 arg1 0.01) + (let ((s1-0 print-game-text)) + (let ((s0-0 format)) + (set! sv-16 (clear *temp-string*)) + (set! sv-32 "~S") + (let ((a2-3 (lookup-text! *common-text* (-> this name) #f))) + (s0-0 sv-16 sv-32 a2-3) + ) + ) + (s1-0 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (dotimes (s1-1 (-> this groups length)) + (inventory-item-group-method-10 + (-> this groups s1-1) + arg0 + arg1 + arg2 + arg3 + (the-as int (= s1-1 (-> this current-index))) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-inventory +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-inventory) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (set! (-> arg1 alpha) f30-0) + (let ((a0-1 arg1)) + (set! (-> a0-1 flags) (font-flags kerning middle large)) + ) + (progress-method-33 arg0 (-> *progress-work* body-footer)) + (progress-method-53 arg0 arg1) + (let* ((f0-2 (the float (-> this screens length))) + (f28-0 (-> this current-index)) + (f1-3 (+ 1.0 f28-0)) + (f0-4 (- f1-3 (* (the float (the int (/ f1-3 f0-2))) f0-2))) + (s3-0 (-> this screens (the int f28-0))) + (s4-1 (-> this screens (the int f0-4))) + (s2-0 (get-scissor-stack-top arg0)) + (f0-7 (- (-> s2-0 z) (-> s2-0 x))) + (f28-1 (* (- 1.0 (- f28-0 (* (the float (the int (/ f28-0 1.0))) 1.0))) f0-7)) + ) + (set! (-> arg1 origin x) (+ (- f28-1 f0-7) (-> s2-0 x))) + (inventory-screen-method-9 s3-0 arg0 arg1 (- f28-1 f0-7) f30-0) + (set! (-> arg1 origin x) (+ f28-1 (-> s2-0 x))) + (inventory-screen-method-9 s4-1 arg0 arg1 f28-1 f30-0) + ) + (progress-method-34 arg0) + (progress-method-46 arg0 arg1 f30-0 1995) + (draw-prev-next-footer arg0 arg1 f30-0) + ) + 0 + (none) + ) + +;; definition for method 9 of type controls-string-info +;; INFO: Used lq/sq +;; WARN: Stack slot offset 48 signed mismatch +;; WARN: Stack slot offset 48 signed mismatch +;; WARN: Stack slot offset 48 signed mismatch +;; WARN: Return type mismatch int vs none. +(defmethod controls-string-info-method-9 ((this controls-string-info) + (arg0 progress) + (arg1 font-context) + (arg2 float) + (arg3 float) + (arg4 float) + (arg5 float) + (arg6 float) + ) + (local-vars + (sv-48 float) + (sv-64 (function string font-context symbol int bucket-id float)) + (sv-80 (function _varargs_ object)) + (sv-96 string) + (sv-112 string) + (sv-128 (function _varargs_ object)) + (sv-144 string) + (sv-160 string) + ) + (set! sv-48 arg4) + (let ((s0-0 arg5) + (s3-0 arg6) + (s2-0 (get-scissor-stack-top arg0)) + ) + 0.0 + 0.0 + (set! (-> arg1 origin x) (+ 10.0 arg2)) + (let ((v1-2 arg1)) + (set! (-> v1-2 width) (+ -20.0 sv-48)) + ) + (set! sv-64 print-game-text) + (set! sv-80 format) + (set! sv-96 (clear *temp-string*)) + (set! sv-112 "~S") + (let ((a2-2 (lookup-text! *common-text* (-> this action) #f))) + (sv-80 sv-96 sv-112 a2-2) + ) + (let* ((a0-7 *temp-string*) + (a1-3 arg1) + (a2-3 #f) + (a3-1 40) + (t0-1 579) + (f30-0 (sv-64 a0-7 a1-3 a2-3 a3-1 (the-as bucket-id t0-1))) + ) + (set! (-> arg1 origin x) (+ 10.0 arg3)) + (let ((v1-8 arg1)) + (set! (-> v1-8 width) (+ -20.0 s0-0)) + ) + (let ((s0-1 print-game-text)) + (set! sv-128 format) + (set! sv-144 (clear *temp-string*)) + (set! sv-160 "~S") + (let ((a2-5 (lookup-text! *common-text* (-> this button) #f))) + (sv-128 sv-144 sv-160 a2-5) + ) + (let* ((f0-11 (s0-1 *temp-string* arg1 #f 40 (bucket-id hud-draw-hud-alpha))) + (f30-1 (+ 8.0 (fmax f30-0 f0-11))) + ) + (let ((s1-1 (new 'stack 'hud-box)) + (f28-0 (+ arg3 (* 0.5 (- (-> s2-0 z) (-> s2-0 x))))) + ) + (set! (-> s1-1 box min y) (+ -6.0 (-> arg1 origin y))) + (set! (-> s1-1 box max y) (+ (-> s1-1 box min y) f30-1)) + (set-vector! (-> s1-1 color) 192 192 96 (the int (* 128.0 s3-0))) + (with-dma-buffer-add-bucket ((s2-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id particles) + ) + (set! (-> s1-1 box min x) arg2) + (set! (-> s1-1 box max x) arg3) + (draw-box-prim-only s1-1 s2-1) + (set! (-> s1-1 box min x) arg3) + (set! (-> s1-1 box max x) f28-0) + (draw-box-prim-only s1-1 s2-1) + ) + ) + (+! (-> arg1 origin y) f30-1) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 11 of type controls-page-info +;; INFO: Used lq/sq +;; WARN: Stack slot offset 16 signed mismatch +;; ERROR: Stack slot load at 64 mismatch: defined as size 4, got size 16 +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; ERROR: Stack slot load at 64 mismatch: defined as size 4, got size 16 +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; ERROR: Stack slot load at 64 mismatch: defined as size 4, got size 16 +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Return type mismatch int vs none. +(defmethod controls-page-info-method-11 ((this controls-page-info) (arg0 progress) (arg1 font-context) (arg2 float) (arg3 float)) + (local-vars + (v1-28 int) + (v1-29 int) + (sv-16 float) + (sv-32 (function progress font-context float float string float float int float)) + (sv-48 font-context) + (sv-64 float) + (sv-80 int) + (sv-96 (function string font-context symbol int bucket-id float)) + (sv-112 (function _varargs_ object)) + (sv-128 string) + (sv-144 string) + (sv-160 (function string font-context symbol int bucket-id float)) + (sv-176 (function _varargs_ object)) + (sv-192 string) + (sv-208 string) + ) + (set! sv-16 arg2) + (let ((s2-0 arg3) + (s3-0 *progress-work*) + ) + (let ((s1-0 (get-scissor-stack-top arg0))) + (- (-> s1-0 z) (-> s1-0 x)) + (progress-method-33 arg0 (-> s3-0 sub-header)) + (progress-method-41 arg0 (-> s3-0 sub-header) (* 128.0 s2-0)) + (let ((a0-4 arg1)) + (set! (-> a0-4 flags) (font-flags kerning middle large)) + ) + (let ((v1-5 arg1) + (f0-7 (+ 10.0 sv-16 (-> s1-0 x))) + (f1-4 (-> s1-0 y)) + ) + (set! (-> v1-5 origin x) f0-7) + (set! (-> v1-5 origin y) f1-4) + ) + (let ((a0-7 arg1)) + (set! (-> a0-7 color) (font-color font-color-34)) + ) + (let ((s0-0 arg0)) + (set! sv-32 (method-of-object s0-0 progress-method-45)) + (set! sv-48 arg1) + (let ((s1-1 (+ (- -20.0 (-> s1-0 x)) (-> s1-0 z)))) + (set! sv-64 (the-as float 28.0)) + (let ((t0-1 (lookup-text! *common-text* (-> this title) #f)) + (t1-0 0.7) + (t2-0 0.5) + (t3-0 32) + ) + (sv-32 s0-0 sv-48 s1-1 sv-64 t0-1 t1-0 t2-0 t3-0) + ) + ) + ) + ) + (progress-method-34 arg0) + (progress-method-33 arg0 (-> s3-0 sub-body-footer)) + (progress-method-53 arg0 arg1) + (let ((a0-13 arg1)) + (set! (-> a0-13 flags) (font-flags kerning large)) + ) + (let ((v1-17 arg1)) + (set! (-> v1-17 scale) 0.425) + ) + (let ((a0-15 arg1)) + (set! (-> a0-15 color) (font-color font-color-32)) + ) + (let* ((s0-1 (get-scissor-stack-top arg0)) + (f28-0 (- (-> s0-1 z) (-> s0-1 x))) + (s1-2 (init-text! this)) + ) + (let* ((f30-0 (* 0.5 f28-0)) + (f28-1 (* 0.5 f28-0)) + (f26-0 (+ sv-16 (-> s0-1 x))) + (f24-0 (+ sv-16 (-> s0-1 x) f30-0)) + ) + (let ((v1-25 arg1)) + (set! (-> v1-25 width) (+ -20.0 f30-0)) + ) + (set! sv-80 0) + (let ((v1-27 sv-80) + (a0-20 (min (the int (-> this current-index)) s1-2)) + ) + (set-on-less-than v1-28 v1-27 a0-20) + (move-if-not-zero v1-29 a0-20 v1-28 v1-28) + ) + (set! sv-80 v1-29) + (set! sv-96 print-game-text) + (set! sv-112 format) + (set! sv-128 (clear *temp-string*)) + (set! sv-144 "~S") + (let ((a2-5 (lookup-text! *common-text* (the-as text-id (-> this text sv-80 text)) #f))) + (sv-112 sv-128 sv-144 a2-5) + ) + (let* ((a0-24 *temp-string*) + (a1-10 arg1) + (a2-6 #t) + (a3-2 40) + (t0-2 579) + (f22-0 (sv-96 a0-24 a1-10 a2-6 a3-2 (the-as bucket-id t0-2))) + ) + (set! sv-160 print-game-text) + (set! sv-176 format) + (set! sv-192 (clear *temp-string*)) + (set! sv-208 "~S") + (let ((a2-8 (lookup-text! *common-text* (-> this text sv-80 id) #f))) + (sv-176 sv-192 sv-208 a2-8) + ) + (let* ((a0-28 *temp-string*) + (a1-13 arg1) + (a2-9 #t) + (a3-3 40) + (t0-3 579) + (f0-23 (sv-160 a0-28 a1-13 a2-9 a3-3 (the-as bucket-id t0-3))) + (f22-1 (+ 8.0 (fmax f22-0 f0-23))) + ) + (let* ((v1-47 arg1) + (f0-26 (+ 10.0 (-> s0-1 x))) + (f1-12 4.0) + (f2-0 (-> this current-index)) + (f1-14 (+ (- f1-12 (* f22-1 (- f2-0 (* (the float (the int (/ f2-0 1.0))) 1.0)))) (-> s0-1 y))) + ) + (set! (-> v1-47 origin x) f0-26) + (set! (-> v1-47 origin y) f1-14) + ) + (while (and (< (-> arg1 origin y) (-> s0-1 w)) (< sv-80 s1-2)) + (when (= sv-80 3) + (nop!) + (nop!) + 0 + ) + ((method-of-type controls-string-info controls-string-info-method-9) + (the-as controls-string-info (-> this text sv-80)) + arg0 + arg1 + f26-0 + f24-0 + f30-0 + f28-1 + s2-0 + ) + (set! sv-80 (+ sv-80 1)) + ) + (set! (-> this on-screen) (< (-> arg1 origin y) (-> s0-1 w))) + (seek! (-> this current-index) (-> this target-index) (* (/ 300.0 f22-1) (seconds-per-frame))) + ) + ) + ) + (progress-method-34 arg0) + (progress-method-33 arg0 (-> s3-0 small-screen)) + (progress-method-47 + arg0 + arg1 + (!= (-> this current-index) 0.0) + (and (not (-> this on-screen)) (!= (-> this current-index) (the float s1-2))) + ) + ) + ) + (progress-method-34 arg0) + 0 + (none) + ) + +;; definition for method 10 of type menu-controls-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-controls-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (s2-0 *progress-work*) + ) + (set! (-> arg1 alpha) f30-0) + (progress-method-46 arg0 arg1 f30-0 1581) + (let ((a0-2 arg1)) + (set! (-> a0-2 flags) (font-flags kerning middle large)) + ) + (progress-method-53 arg0 arg1) + (let* ((f28-0 (the float (menu-controls-option-method-12 this))) + (f0-2 (-> this current-index)) + (f26-0 (- f0-2 (* (the float (the int (/ f0-2 f28-0))) f28-0))) + (f0-4 (+ 1.0 f26-0)) + (f0-5 (- f0-4 (* (the float (the int (/ f0-4 f28-0))) f28-0))) + (s0-0 (-> this pages (the int f26-0))) + (s3-0 (-> this pages (the int f0-5))) + (s1-0 (get-scissor-stack-top arg0)) + (f24-0 (- (-> s1-0 z) (-> s1-0 x))) + ) + (cond + ((< 1.0 f28-0) + (draw-prev-next-footer arg0 arg1 f30-0) + ) + (else + (progress-method-42 arg0 (-> s2-0 footer) (* 64.0 f30-0)) + (progress-method-41 arg0 (-> s2-0 footer) (* 128.0 f30-0)) + ) + ) + (progress-method-33 arg0 (-> s2-0 body-footer)) + (when (!= f28-0 0.0) + (let ((f26-1 (* (- 1.0 (- f26-0 (* (the float (the int (/ f26-0 1.0))) 1.0))) f24-0))) + (set! (-> arg1 origin x) (+ (- f26-1 f24-0) (-> s1-0 x))) + (controls-page-info-method-11 s0-0 arg0 arg1 (- f26-1 f24-0) f30-0) + (when (and (< 1.0 f28-0) (!= (-> this current-index) (-> this target-index))) + (set! (-> arg1 origin x) (+ f26-1 (-> s1-0 x))) + (controls-page-info-method-11 s3-0 arg0 arg1 f26-1 f30-0) + ) + ) + ) + ) + ) + (progress-method-34 arg0) + 0 + (none) + ) + +;; definition for method 10 of type menu-language-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-language-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (set! (-> arg1 alpha) f30-0) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 1.0) + ) + (let ((a1-2 arg1)) + (set! (-> a1-2 flags) (font-flags kerning middle large)) + ) + (progress-method-38 arg0 arg1 (-> this offset-y)) + (progress-method-40 arg0 arg1 (the int (-> arg1 origin y)) 44 f30-0) + (+! (-> arg1 origin y) 8.0) + (let ((a0-3 arg1)) + (set! (-> a0-3 color) (font-color font-color-32)) + ) + (let ((v1-11 arg1)) + (set! (-> v1-11 scale) 1.0) + ) + (+! (-> arg1 origin x) -170.0) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) "~33L~C" 163) + (s4-0 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin x) 340.0) + (let ((s4-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 161) + (s4-1 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin x) -170.0) + (let ((a0-11 arg1)) + (set! (-> a0-11 color) (font-color font-color-33)) + ) + (print-game-text + (lookup-text! *common-text* (-> *language-name-remap* (get-language-by-idx arg0 1)) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (progress-method-46 arg0 arg1 f30-0 11) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-sub-menu-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-sub-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (set! (-> arg1 alpha) f30-0) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.85) + ) + (progress-method-38 arg0 arg1 (-> this offset-y)) + (cond + ((= (-> arg0 option-index) arg2) + (progress-method-40 arg0 arg1 (the int (+ -6.0 (-> arg1 origin y))) 35 f30-0) + (let ((a0-4 arg1)) + (set! (-> a0-4 color) (font-color font-color-33)) + ) + ) + (else + (let ((a0-5 arg1)) + (set! (-> a0-5 color) (font-color font-color-32)) + ) + ) + ) + ) + (print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + 0 + (none) + ) + +;; definition for method 10 of type menu-on-off-game-vibrations-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-on-off-game-vibrations-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg0 yes-no-choice) (-> arg0 vibrations)) + (progress-method-38 arg0 arg1 0.19) + (progress-method-50 + arg0 + arg1 + (-> this name) + (text-id progress-on) + (text-id progress-off) + (= (-> arg0 option-index) arg2) + arg3 + 0.65 + ) + (let ((f0-1 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (progress-method-46 arg0 arg1 f0-1 28) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-on-off-game-subtitles-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-on-off-game-subtitles-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg0 yes-no-choice) (-> arg0 subtitles)) + (progress-method-38 arg0 arg1 0.34) + (progress-method-50 + arg0 + arg1 + (-> this name) + (text-id progress-on) + (text-id progress-off) + (= (-> arg0 option-index) arg2) + arg3 + 0.65 + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-language-game-option +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-language-game-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (sv-16 string) (sv-32 string)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.65) + ) + (progress-method-38 arg0 arg1 (-> this offset-y)) + (set! (-> arg1 alpha) f30-0) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle large)) + ) + (let ((s4-0 0)) + (let ((s5-0 *language-name-remap*)) + (case (-> this menu-option-type) + ((5) + (set! s4-0 (get-language-by-idx arg0 0)) + ) + ((6) + (set! s4-0 (get-language-by-idx arg0 1)) + ) + ((7) + (set! s4-0 (get-language-by-idx arg0 2)) + ) + ) + (cond + (arg3 + (let ((a0-12 arg1)) + (set! (-> a0-12 color) (font-color font-color-34)) + ) + (progress-method-40 arg0 arg1 (the int (-> arg1 origin y)) 42 f30-0) + (let ((s2-1 print-game-text)) + (let ((s1-1 format) + (s0-1 (clear *temp-string*)) + ) + (set! sv-16 "~S") + (let ((a2-4 (lookup-text! *common-text* (-> this name) #f))) + (s1-1 s0-1 sv-16 a2-4) + ) + ) + (s2-1 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin y) 24.0) + (let ((a0-18 arg1)) + (set! (-> a0-18 color) (font-color font-color-32)) + ) + (let ((v1-20 arg1)) + (set! (-> v1-20 scale) 0.5) + ) + (let ((a0-20 arg1)) + (set! (-> a0-20 color) (font-color font-color-32)) + ) + (+! (-> arg1 origin x) -70.0) + (let ((s3-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 163) + (s3-1 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin x) 70.0) + (+! (-> arg1 origin x) 70.0) + (let ((s3-2 print-game-text)) + (format (clear *temp-string*) "~33L~C" 161) + (s3-2 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin x) -70.0) + (let ((a0-27 arg1)) + (set! (-> a0-27 color) (font-color font-color-33)) + ) + (print-game-text (lookup-text! *common-text* (-> s5-0 s4-0) #f) arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (else + (cond + ((= (-> arg0 option-index) arg2) + (let ((a0-30 arg1)) + (set! (-> a0-30 color) (font-color font-color-33)) + ) + (progress-method-40 arg0 arg1 (the int (-> arg1 origin y)) 24 f30-0) + ) + (else + (let ((a0-32 arg1)) + (set! (-> a0-32 color) (font-color font-color-32)) + ) + ) + ) + (let ((v1-35 arg1)) + (set! (-> v1-35 scale) 0.65) + ) + (let ((s2-4 print-game-text)) + (let ((s1-2 format) + (s0-2 (clear *temp-string*)) + ) + (set! sv-32 "~S") + (let ((a2-14 (lookup-text! *common-text* (-> this name) #f))) + (s1-2 s0-2 sv-32 a2-14) + ) + ) + (s2-4 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (let ((v1-38 arg1)) + (set! (-> v1-38 scale) 0.5) + ) + (let ((a0-39 arg1)) + (set! (-> a0-39 color) (font-color font-color-32)) + ) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> s5-0 s4-0) #f)) + *temp-string* + (+! (-> arg1 origin y) 24.0) + (let ((a0-43 arg1)) + (set! (-> a0-43 flags) (font-flags kerning middle large)) + ) + (print-game-text (lookup-text! *common-text* (-> s5-0 s4-0) #f) arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-center-screen-graphic-option +;; INFO: Used lq/sq +;; ERROR: Stack slot load at 16 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 16 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 48 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 48 mismatch: defined as size 4, got size 16 +;; ERROR: Stack slot load at 48 mismatch: defined as size 4, got size 16 +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-center-screen-graphic-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (sv-16 float) (sv-32 font-context) (sv-48 float)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (s4-0 (get-scissor-stack-top arg0)) + ) + (set! (-> arg1 alpha) f30-0) + (let ((a0-2 arg1)) + (set! (-> a0-2 flags) (font-flags kerning middle large)) + ) + (cond + (arg3 + (let ((a0-3 arg1)) + (set! (-> a0-3 color) (font-color font-color-34)) + ) + (progress-method-38 arg0 arg1 0.45) + (set! (-> arg1 origin x) (+ 30.0 (-> s4-0 x))) + (let* ((s3-1 arg0) + (s2-1 (method-of-object s3-1 progress-method-45)) + (s1-1 arg1) + (s0-0 (+ (- -60.0 (-> s4-0 x)) (-> s4-0 z))) + ) + (set! sv-16 (the-as float 16.0)) + (let* ((t0-1 (lookup-text! *common-text* (text-id progress-graphics-center-screen-dpad) #f)) + (t1-0 0.5) + (t2-0 0.95) + (t3-0 32) + (f0-7 (s2-1 s3-1 s1-1 s0-0 sv-16 t0-1 t1-0 t2-0 t3-0)) + (f1-6 (* 0.4 (-> arg1 max-x))) + (f2-4 (+ (-> s4-0 x) (* 0.5 (- (-> s4-0 z) (-> s4-0 x))))) + (f30-1 (+ f2-4 f1-6)) + (f28-0 (- f2-4 f1-6)) + (f26-0 (+ -8.0 (* 0.5 f0-7) (-> arg1 origin y))) + ) + (let ((f1-10 (+ -15.0 (-> arg1 origin y))) + (f24-0 (+ 3.0 f0-7 (-> arg1 origin y))) + ) + (let ((v1-17 arg1)) + (set! (-> v1-17 origin x) (-> s4-0 x)) + (set! (-> v1-17 origin y) f1-10) + ) + (let ((v1-18 arg1)) + (set! (-> v1-18 width) (- (-> s4-0 z) (-> s4-0 x))) + ) + (let ((s3-2 print-game-text)) + (format (clear *temp-string*) "~33L~C" 160) + (s3-2 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (set! (-> arg1 origin y) f24-0) + ) + (let ((s3-3 print-game-text)) + (format (clear *temp-string*) "~33L~C" 162) + (s3-3 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (let ((a0-13 arg1)) + (set! (-> a0-13 flags) (font-flags kerning right large)) + ) + (let ((v1-20 arg1) + (f0-12 f26-0) + ) + (set! (-> v1-20 origin x) f28-0) + (set! (-> v1-20 origin y) f0-12) + ) + (let ((s3-4 print-game-text)) + (format (clear *temp-string*) "~33L~C" 163) + (s3-4 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (let ((a0-17 arg1)) + (set! (-> a0-17 flags) (font-flags kerning large)) + ) + (let ((v1-22 arg1)) + (set! (-> v1-22 origin x) f30-1) + (set! (-> v1-22 origin y) f26-0) + ) + ) + ) + (let ((s3-5 print-game-text)) + (format (clear *temp-string*) "~33L~C" 161) + (s3-5 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (let ((a0-21 arg1)) + (set! (-> a0-21 flags) (font-flags kerning middle large)) + ) + (set! (-> arg1 origin x) (-> s4-0 x)) + (progress-method-38 arg0 arg1 0.85) + (let ((v1-26 arg1)) + (set! (-> v1-26 scale) 0.5) + ) + (let ((v1-27 arg1)) + (set! (-> v1-27 width) (- (-> s4-0 z) (-> s4-0 x))) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-graphics-center-screen-reset) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + (else + (let ((f28-1 0.7)) + (progress-method-38 arg0 arg1 (-> this offset-y)) + (cond + ((= (-> arg0 option-index) arg2) + (let ((a0-27 arg1)) + (set! (-> a0-27 color) (font-color font-color-33)) + ) + ) + (else + (let ((a0-28 arg1)) + (set! (-> a0-28 color) (font-color font-color-32)) + ) + ) + ) + (set! (-> arg1 origin x) (+ 10.0 (-> s4-0 x))) + (let* ((s1-2 arg0) + (s0-1 (method-of-object s1-2 progress-method-45)) + ) + (set! sv-32 arg1) + (let ((s4-1 (+ (- -20.0 (-> s4-0 x)) (-> s4-0 z)))) + (set! sv-48 (* 32.0 f28-1)) + (let* ((t0-7 (lookup-text! *common-text* (-> this name) #f)) + (t1-1 f28-1) + (t2-1 0.75) + (t3-1 32) + (f0-26 (s0-1 s1-2 sv-32 s4-1 sv-48 t0-7 t1-1 t2-1 t3-1)) + ) + (if (= (-> arg0 option-index) arg2) + (progress-method-40 arg0 arg1 (the int (+ -1.0 (-> arg1 origin y))) (the int (+ 4.0 f0-26)) f30-0) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-aspect-ratio-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-aspect-ratio-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (when (not (and (zero? (-> arg0 option-index)) (-> arg0 selected-option))) + (set! (-> arg0 yes-no-choice) (the-as basic (= (if arg3 + (-> arg0 aspect-ratio) + (get-aspect-ratio) + ) + 'aspect4x3 + ) + ) + ) + (progress-method-38 arg0 arg1 (-> this offset-y)) + (progress-method-50 + arg0 + arg1 + (-> this name) + (text-id progress-aspect-4x3) + (text-id progress-aspect-16x9) + (= (-> arg0 option-index) arg2) + arg3 + 0.7 + ) + ) + (let ((f0-2 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (progress-method-46 arg0 arg1 f0-2 29) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-on-off-progressive-scan-graphic-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-on-off-progressive-scan-graphic-option) + (arg0 progress) + (arg1 font-context) + (arg2 int) + (arg3 symbol) + ) + (when (not (and (zero? (-> arg0 option-index)) (-> arg0 selected-option))) + (set! (-> arg0 yes-no-choice) (the-as basic (if arg3 + (-> arg0 progressive-scan) + (-> *setting-control* user-default set-video-mode) + ) + ) + ) + (progress-method-38 arg0 arg1 (-> this offset-y)) + (progress-method-50 + arg0 + arg1 + (-> this name) + (text-id progress-on) + (text-id progress-off) + (= (-> arg0 option-index) arg2) + arg3 + 0.7 + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-video-mode-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-video-mode-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (when (not (and (zero? (-> arg0 option-index)) (-> arg0 selected-option))) + (set! (-> arg0 yes-no-choice) (the-as basic (= (if arg3 + (-> arg0 video-mode) + (get-video-mode) + ) + 'pal + ) + ) + ) + (progress-method-38 arg0 arg1 (-> this offset-y)) + (progress-method-50 + arg0 + arg1 + (-> this name) + (text-id progress-refresh-50hz) + (text-id progress-refresh-60hz) + (= (-> arg0 option-index) arg2) + arg3 + 0.7 + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-sound-slider-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-sound-slider-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (set! (-> arg1 alpha) f30-0) + (cond + ((not (bigmap-method-11 *bigmap*)) + (progress-method-51 arg0 arg1) + ) + (else + (let ((f28-0 (-> (the-as (pointer float) (&+ (the-as pointer *setting-control*) (-> this setting-offset)))))) + (progress-method-52 + arg0 + arg1 + (lookup-text! *common-text* (-> this name) #f) + f30-0 + (-> this offset-y) + 0.75 + f28-0 + (the-as float #t) + ) + ) + ) + ) + (if (zero? arg2) + (progress-method-46 arg0 arg1 f30-0 30) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-stereo-mode-sound-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-stereo-mode-sound-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (s5-0 int)) + (let ((f28-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.65) + ) + (set! (-> arg1 alpha) f28-0) + (let ((a0-2 arg1)) + (set! (-> a0-2 flags) (font-flags kerning middle large)) + ) + (cond + ((not (bigmap-method-11 *bigmap*)) + (progress-method-51 arg0 arg1) + ) + ((begin + (progress-method-38 arg0 arg1 (-> this offset-y)) + (set! s5-0 (-> *setting-control* user-default stereo-mode)) + arg3 + ) + (let ((f30-2 + (fmax + (fmax + (-> (get-string-length (lookup-text! *common-text* (text-id progress-sound-mono) #f) arg1) length) + (-> (get-string-length (lookup-text! *common-text* (text-id progress-sound-stereo) #f) arg1) length) + ) + (-> (get-string-length (lookup-text! *common-text* (text-id progress-sound-surround) #f) arg1) length) + ) + ) + ) + (let ((a0-12 arg1)) + (set! (-> a0-12 color) (font-color font-color-34)) + ) + (progress-method-40 arg0 arg1 (the int (+ -1.0 (-> arg1 origin y))) 42 f28-0) + (let ((s3-1 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> this name) #f)) + (s3-1 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin y) 22.0) + (let ((v1-23 arg1)) + (set! (-> v1-23 scale) 0.5) + ) + (let ((a0-19 arg1)) + (set! (-> a0-19 color) (font-color font-color-33)) + ) + (let ((a0-20 arg1)) + (set! (-> a0-20 flags) (font-flags kerning middle large)) + ) + (print-game-text + (lookup-text! *common-text* (-> *stereo-mode-name-remap* s5-0) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (let ((a0-23 arg1)) + (set! (-> a0-23 color) (font-color font-color-32)) + ) + (set! (-> arg1 origin x) (- (-> arg1 origin x) (the float (the int (* 0.5 f30-2))))) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 163) + (s5-1 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin x) (the float (the int f30-2))) + ) + (let ((s5-2 print-game-text)) + (format (clear *temp-string*) "~33L~C" 161) + (s5-2 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + (else + (if (= (-> arg0 option-index) arg2) + (progress-method-40 arg0 arg1 (the int (-> arg1 origin y)) 21 f28-0) + ) + (let ((s3-2 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> this name) #f)) + (s3-2 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin y) 22.0) + (let ((v1-38 arg1)) + (set! (-> v1-38 scale) 0.5) + ) + (let ((a0-36 arg1)) + (set! (-> a0-36 color) (font-color font-color-32)) + ) + (let ((a0-37 arg1)) + (set! (-> a0-37 flags) (font-flags kerning middle large)) + ) + (print-game-text + (lookup-text! *common-text* (-> *stereo-mode-name-remap* s5-0) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-picture-slider-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-picture-slider-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (set! (-> arg1 alpha) f30-0) + (progress-method-33 arg0 (-> *progress-work* body)) + (cond + ((not (bigmap-method-11 *bigmap*)) + (progress-method-51 arg0 arg1) + ) + (else + (let ((f28-0 (-> (the-as (pointer float) (&+ (the-as pointer *setting-control*) (-> this setting-offset)))))) + (progress-method-52 + arg0 + arg1 + (lookup-text! *common-text* (-> this name) #f) + f30-0 + (-> this offset-y) + 0.9 + f28-0 + (the-as float #f) + ) + ) + ) + ) + (when (zero? arg2) + (let ((s4-1 (get-scissor-stack-top arg0))) + (progress-method-46 arg0 arg1 f30-0 1520) + (draw-icon-array! + (-> *progress-icon-arrays* 75) + 256 + (the int (+ (-> s4-1 y) (* 0.75 (- (-> s4-1 w) (-> s4-1 y))))) + (-> *video-params* relative-x-scale-reciprical) + 10.0 + (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + f30-0 + ) + ) + ) + ) + (progress-method-34 arg0) + 0 + (none) + ) + +;; definition for method 10 of type menu-camera-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-camera-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (progress-method-38 arg0 arg1 (-> this offset-y)) + (let* ((v1-2 (-> this menu-option-type)) + (v1-3 (cond + ((= v1-2 12) + (-> arg0 flip-horizontal) + ) + ((= v1-2 13) + (-> arg0 flip-vertical) + ) + ) + ) + ) + (set! (-> arg0 yes-no-choice) (the-as basic (not v1-3))) + ) + (progress-method-50 + arg0 + arg1 + (-> this name) + (text-id progress-camera-default) + (text-id progress-camera-flipped) + (= (-> arg0 option-index) arg2) + arg3 + 0.7 + ) + (when (zero? arg2) + (let ((f0-2 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (progress-method-46 arg0 arg1 f0-2 1534) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-unlocked-sub-menu-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-unlocked-sub-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((s2-0 (memcard-unlocked-secrets? arg0 #t)) + (f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (s1-0 "?????????") + ) + (progress-method-38 arg0 arg1 (-> this offset-y)) + (let ((v1-4 arg1)) + (set! (-> v1-4 scale) 0.5) + ) + (if (= arg2 (-> arg0 option-index)) + 33 + 32 + ) + (let ((f0-3 + (if (logtest? s2-0 (-> this mask)) + (print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + (print-game-text s1-0 arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + (if (= arg2 (-> arg0 option-index)) + (progress-method-40 arg0 arg1 (the int (+ 2.0 (-> arg1 origin y))) (the int (+ -1.0 f0-3)) f30-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-main-menu-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-main-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (-> arg1 flags) + (when (and (nonzero? (-> this name)) (= arg2 (-> arg0 option-index))) + (let ((v1-5 arg1)) + (set! (-> v1-5 scale) 0.75) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color font-color-32)) + ) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags shadow kerning middle large)) + ) + (set! (-> arg1 width) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 235 + 175 + ) + ) + ) + (set! (-> arg1 height) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 80 + 80 + ) + ) + ) + (set! (-> arg1 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 140 + 170 + ) + ) + ) + (set! (-> arg1 origin y) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 180 + 175 + ) + ) + ) + (cond + ((= (-> this name) (text-id progress-bigmap)) + (when (= (-> *setting-control* user-default language) (language-enum french)) + (let ((v1-16 arg1)) + (set! (-> v1-16 scale) 0.7) + ) + ) + (print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + (set! (-> arg1 origin y) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 210 + 200 + ) + ) + ) + (set! (-> arg1 scale) 0.6) + ) + (else + (print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-memcard-slot-option +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-memcard-slot-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars + (sv-48 (function string font-context symbol int bucket-id float)) + (sv-64 (function _varargs_ object)) + (sv-80 string) + (sv-96 string) + (sv-112 (function string font-context symbol int bucket-id float)) + (sv-128 dma-buffer) + (sv-144 pointer) + (sv-160 int) + (sv-176 (function string font-context symbol int bucket-id float)) + (sv-192 (function _varargs_ object)) + ) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (f28-0 (if (= (-> arg0 current) 'select-save-title) + 0.2 + 0.25 + ) + ) + (s3-0 *progress-work*) + (f24-0 (-> *video-params* relative-x-scale)) + ) + (cond + ((not (bigmap-method-11 *bigmap*)) + (progress-method-51 arg0 arg1) + ) + (else + (set! (-> arg1 alpha) f30-0) + (let ((v1-8 arg1)) + (set! (-> v1-8 scale) 0.6) + ) + (progress-method-33 arg0 (-> s3-0 body)) + (let* ((s3-1 (get-scissor-stack-top arg0)) + (s0-0 (new 'stack 'hud-box)) + (f0-4 (* (- (-> s3-1 w) (-> s3-1 y)) f28-0)) + (f26-0 (+ (-> s3-1 y) (* f0-4 (the float arg2)))) + (f28-1 (+ f26-0 f0-4)) + (s1-0 (the int (+ (-> s3-1 x) (* 0.7 (- (-> s3-1 z) (-> s3-1 x))) (* -48.0 f24-0)))) + ) + (set! sv-160 (the int (+ 32.0 (-> s3-1 y)))) + (let ((s2-0 *progress-save-info*)) + (let ((v1-16 arg1) + (f1-12 (+ 10.0 (-> s3-1 x))) + (f2-13 (+ f26-0 (* 0.5 (- f0-4 (* 32.0 (-> arg1 scale)))))) + ) + (set! (-> v1-16 origin x) f1-12) + (set! (-> v1-16 origin y) f2-13) + ) + (set! (-> arg1 height) f0-4) + (let ((a0-11 arg1)) + (set! (-> a0-11 flags) (font-flags kerning large)) + ) + (when (and s2-0 (= (-> s2-0 formatted) 1) (= (-> s2-0 inited) 1)) + (cond + ((= (-> s2-0 file arg2 present) 1) + (set! sv-48 print-game-text) + (set! sv-64 format) + (set! sv-80 (clear *temp-string*)) + (set! sv-96 "~S ~D") + (let ((a2-2 (lookup-text! *common-text* (text-id text-0073) #f)) + (a3-1 (+ arg2 1)) + ) + (sv-64 sv-80 sv-96 a2-2 a3-1) + ) + (let ((a0-21 *temp-string*) + (a1-6 arg1) + (a2-3 #f) + (a3-2 44) + (t0-1 579) + ) + (sv-48 a0-21 a1-6 a2-3 a3-2 (the-as bucket-id t0-1)) + ) + ) + ((zero? (-> s2-0 file arg2 present)) + (set! sv-112 print-game-text) + (let ((a0-23 (lookup-text! *common-text* (text-id progress-empty) #f)) + (a1-8 arg1) + (a2-5 #f) + (a3-3 44) + (t0-2 579) + ) + (sv-112 a0-23 a1-8 a2-5 a3-3 (the-as bucket-id t0-2)) + ) + ) + ) + (when (= arg2 (-> arg0 option-index)) + (let ((v1-39 arg1)) + (set! (-> v1-39 scale) 0.8) + ) + (set! sv-128 (-> *display* frames (-> *display* on-screen) global-buf)) + (set! sv-144 (-> sv-128 base)) + (let ((f24-1 (+ (-> s3-1 x) (* 0.4 (- (-> s3-1 z) (-> s3-1 x)))))) + (set-vector! (-> s0-0 color) 128 128 128 (the int (* 16.0 f30-0))) + (set! (-> (the-as vector (-> s0-0 box)) quad) (-> s3-1 quad)) + (set! (-> s0-0 box min x) f24-1) + (draw-box-alpha-1 s0-0 sv-128) + (set! (-> s0-0 box min x) (-> s3-1 x)) + (set! (-> s0-0 box max x) f24-1) + ) + (set! (-> s0-0 box min y) f26-0) + (set! (-> s0-0 box max y) f28-1) + (draw-box-alpha-1 s0-0 sv-128) + (set-vector! (-> s0-0 color) 128 128 64 (the int (* 128.0 f30-0))) + (when (!= f26-0 (-> s3-1 y)) + (set! (-> s0-0 box min y) (-> s3-1 y)) + (set! (-> s0-0 box max y) f26-0) + (draw-box-prim-only s0-0 sv-128) + ) + (when (!= f28-1 (-> s3-1 w)) + (set! (-> s0-0 box min y) f28-1) + (set! (-> s0-0 box max y) (-> s3-1 w)) + (draw-box-prim-only s0-0 sv-128) + ) + (let ((a3-4 (-> sv-128 base))) + (when (!= sv-144 a3-4) + (let ((v1-63 (the-as object (-> sv-128 base)))) + (set! (-> (the-as dma-packet v1-63) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-63) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-63) vif1) (new 'static 'vif-tag)) + (set! (-> sv-128 base) (&+ (the-as pointer v1-63) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id tex-hud-hud-alpha) + sv-144 + (the-as (pointer dma-tag) a3-4) + ) + ) + ) + ) + (when (= (-> s2-0 file arg2 present) 1) + (when (= arg2 (-> arg0 option-index)) + (let* ((a0-49 (-> *progress-icon-arrays* (-> s2-0 file arg2 level-index))) + (t9-16 (method-of-object a0-49 draw-icon-array!)) + (a3-5 1.0) + (t0-3 1.0) + (t1-0 (the-as uint #x80808080)) + (t2-0 f30-0) + ) + (t9-16 a0-49 s1-0 sv-160 a3-5 t0-3 (the-as rgba t1-0) t2-0) + ) + (let ((v1-84 arg1)) + (set! (-> v1-84 scale) 0.6) + ) + (let ((a0-51 arg1)) + (set! (-> a0-51 color) (font-color font-color-32)) + ) + (progress-method-38 arg0 arg1 0.675) + (let ((a0-53 arg1)) + (set! (-> a0-53 flags) (font-flags kerning right large)) + ) + (let* ((v1-91 (-> s2-0 file arg2 game-time0)) + (v1-92 (logior (shl (-> s2-0 file arg2 game-time1) 32) v1-91)) + (s1-1 (/ (the-as int v1-92) #x107ac0)) + (s0-1 (/ (mod (the-as int v1-92) #x107ac0) #x4650)) + ) + (set! (-> arg1 origin x) (+ (-> s3-1 x) (* 0.675 (- (-> s3-1 z) (-> s3-1 x))))) + (set! sv-176 print-game-text) + (set! sv-192 format) + (let ((a0-63 (clear *temp-string*)) + (a1-16 "~2,'0D:~2,'0D") + ) + (sv-192 a0-63 a1-16 s1-1 s0-1) + ) + ) + (let ((a0-64 *temp-string*) + (a1-17 arg1) + (a2-10 #f) + (a3-7 44) + (t0-4 579) + ) + (sv-176 a0-64 a1-17 a2-10 a3-7 (the-as bucket-id t0-4)) + ) + (draw-icon-array! + (-> *progress-icon-arrays* 66) + (the int (+ 10.0 (* 0.4 (- (-> s3-1 z) (-> s3-1 x))) (-> s3-1 x))) + (the int (-> arg1 origin y)) + 0.65 + 0.65 + (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + f30-0 + ) + (set! (-> arg1 origin x) (+ (- (+ -10.0 (-> s3-1 z)) (-> s3-1 x)) (-> s3-1 x))) + (let ((s1-2 print-game-text)) + (format (clear *temp-string*) "~D%" (the int (-> s2-0 file arg2 completion-percentage))) + (s1-2 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (draw-icon-array! + (-> *progress-icon-arrays* 67) + (the int (+ -8.0 (* 0.75 (- (-> s3-1 z) (-> s3-1 x))) (-> s3-1 x))) + (the int (-> arg1 origin y)) + 0.7 + 0.7 + (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + f30-0 + ) + (progress-method-38 arg0 arg1 0.83) + (set! (-> arg1 origin x) (+ (-> s3-1 x) (* 0.675 (- (-> s3-1 z) (-> s3-1 x))))) + (let ((s1-3 print-game-text)) + (format (clear *temp-string*) "~D" (the int (-> s2-0 file arg2 skill-count))) + (s1-3 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (draw-icon-array! + (-> *progress-icon-arrays* 68) + (the int (+ 10.0 (* 0.4 (- (-> s3-1 z) (-> s3-1 x))) (-> s3-1 x))) + (the int (+ -2.0 (-> arg1 origin y))) + 0.7 + 0.7 + (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + f30-0 + ) + (set! (-> arg1 origin x) (+ (- (+ -10.0 (-> s3-1 z)) (-> s3-1 x)) (-> s3-1 x))) + (let ((s1-4 print-game-text)) + (format (clear *temp-string*) "~D" (the int (-> s2-0 file arg2 gem-count))) + (s1-4 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (draw-icon-array! + (-> *progress-icon-arrays* 69) + (the int (+ -14.0 (* 0.75 (- (-> s3-1 z) (-> s3-1 x))) (-> s3-1 x))) + (the int (-> arg1 origin y)) + 0.5 + 0.5 + (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + f30-0 + ) + (when (logtest? (-> s2-0 file arg2 secrets) 1) + (let ((a0-79 arg1)) + (set! (-> a0-79 flags) (font-flags kerning middle large)) + ) + (set! (-> arg1 origin x) (+ (-> s3-1 x) (* 0.4 (- (-> s3-1 z) (-> s3-1 x))))) + (set! (-> arg1 origin y) (+ 8.0 (-> s3-1 y))) + (let ((v1-140 arg1)) + (set! (-> v1-140 width) (* 0.6 (- (-> s3-1 z) (-> s3-1 x)))) + ) + (let ((s3-2 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (text-id progress-secrets-hero-mode) #f)) + (s3-2 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + ) + ) + ) + (progress-method-34 arg0) + (when (zero? arg2) + (case (-> arg0 current) + (('select-load) + (progress-method-46 arg0 arg1 f30-0 45) + ) + (('select-save-hero) + (progress-method-46 arg0 arg1 f30-0 2198) + ) + (else + (progress-method-46 arg0 arg1 f30-0 44) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-save-sub-menu-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-save-sub-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (f28-0 0.2) + ) + (let ((v1-3 *progress-work*)) + (progress-method-33 arg0 (-> v1-3 body)) + ) + (let ((s2-0 (get-scissor-stack-top arg0)) + (s3-0 (new 'stack 'hud-box)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 width) (+ -10.0 (* 0.4 (- (-> s2-0 z) (-> s2-0 x))))) + ) + (let ((a0-6 arg1)) + (set! (-> a0-6 flags) (font-flags kerning large)) + ) + (let ((v1-9 arg1)) + (set! (-> v1-9 scale) 0.425) + ) + (let* ((f24-0 (* (- (-> s2-0 w) (-> s2-0 y)) f28-0)) + (f28-1 (+ (-> s2-0 y) (* f24-0 (the float arg2)))) + (f26-0 (+ f28-1 f24-0)) + ) + (let* ((f0-7 + (print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #t 44 (bucket-id hud-draw-hud-alpha)) + ) + (v1-11 arg1) + (f1-9 (+ 10.0 (-> s2-0 x))) + (f0-10 (+ f28-1 (* 0.5 (- f24-0 f0-7)))) + ) + (set! (-> v1-11 origin x) f1-9) + (set! (-> v1-11 origin y) f0-10) + ) + (set! (-> arg1 height) f24-0) + (when (= arg2 (-> arg0 option-index)) + (let ((v1-15 arg1)) + (set! (-> v1-15 scale) 0.45) + ) + (with-dma-buffer-add-bucket ((s0-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id tex-hud-hud-alpha) + ) + (let ((f0-13 (+ (-> s2-0 x) (* 0.4 (- (-> s2-0 z) (-> s2-0 x)))))) + (set-vector! (-> s3-0 color) 128 128 128 (the int (* 16.0 f30-0))) + (set! (-> s3-0 box min x) (-> s2-0 x)) + (set! (-> s3-0 box max x) f0-13) + ) + (set! (-> s3-0 box min y) f28-1) + (set! (-> s3-0 box max y) f26-0) + (draw-box-alpha-1 s3-0 s0-1) + (set-vector! (-> s3-0 color) 128 128 64 (the int (* 128.0 f30-0))) + (draw-box-prim-only s3-0 s0-1) + ) + ) + ) + ) + ) + (print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + (progress-method-34 arg0) + 0 + (none) + ) + +;; definition for method 10 of type menu-loading-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-loading-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((v1-3 arg1)) + (set! (-> v1-3 scale) 0.55) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color font-color-33)) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 120.0) + (set! (-> arg1 origin y) 110.0) + (let ((v1-8 arg1)) + (set! (-> v1-8 width) (the float 270)) + ) + (let ((v1-9 arg1)) + (set! (-> v1-9 height) (the float 35)) + ) + (when (or (< (mod (current-time) 300) 150) (!= (-> arg0 menu-transition) 0.0)) + (let ((v1-15 161)) + (case (-> arg0 current) + (('saving) + (set! v1-15 160) + ) + (('formatting) + (set! v1-15 162) + ) + (('creating) + (set! v1-15 163) + ) + ) + (print-game-text + (lookup-text! *common-text* (the-as text-id v1-15) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + ) + (+! (-> arg1 origin y) 45.0) + (let ((v1-18 arg1)) + (set! (-> v1-18 height) (the float 160)) + ) + (let ((a0-16 arg1)) + (set! (-> a0-16 color) (font-color font-color-32)) + ) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-remove-warn) #f) 1) + (s5-1 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-insufficient-space-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-insufficient-space-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (when (!= (-> arg0 current) 'none) + (let ((v1-3 arg1)) + (set! (-> v1-3 scale) 0.5) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 color) (font-color font-color-32)) + ) + (let ((a0-4 arg1)) + (set! (-> a0-4 flags) (font-flags kerning middle middle-vert large)) + ) + (progress-method-53 arg0 arg1) + (+! (-> arg1 origin x) 10.0) + (set! (-> arg1 origin y) 80.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 width) (+ -20.0 (-> arg1 width))) + ) + (let ((v1-11 arg1)) + (set! (-> v1-11 height) (the float 80)) + ) + (let ((s4-0 155)) + (case (-> arg0 current) + (('insufficient-space) + (set! s4-0 153) + ) + (('no-memory-card) + (set! s4-0 154) + ) + ) + (let ((s3-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (the-as text-id s4-0) #f) 1) + (s3-0 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + (+! (-> arg1 origin y) 80.0) + (let ((v1-19 arg1)) + (set! (-> v1-19 height) (the float 50)) + ) + (let ((s4-1 print-game-text)) + (format + (clear *temp-string*) + (lookup-text! *common-text* (text-id progress-memcard-space-requirement) #f) + (if *progress-save-info* + (-> *progress-save-info* mem-required) + 0 + ) + ) + (s4-1 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin y) 55.0) + (let ((v1-24 arg1)) + (set! (-> v1-24 height) (the float 90)) + ) + (cond + ((and (!= (-> arg0 starting-state) 'insufficient-space) (!= (-> arg0 starting-state) 'no-memory-card)) + (print-game-text + (lookup-text! *common-text* (text-id progress-memcard-insert-with-free-space) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 60.0) + (let ((a0-26 arg1)) + (set! (-> a0-26 color) (font-color font-color-33)) + ) + (progress-method-40 arg0 arg1 (the int (+ 30.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-continue) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + (else + (let ((a0-30 arg1)) + (set! (-> a0-30 color) (font-color font-color-33)) + ) + (+! (-> arg1 origin y) 20.0) + (progress-method-40 arg0 arg1 (the int (+ 30.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (draw-yes-no-style-footer + arg0 + arg1 + (text-id progress-memcard-continue?) + (text-id progress-memcard-insufficient-space-retry?) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-hero-mode-message-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-hero-mode-message-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (s4-0 *progress-work*) + ) + (progress-method-33 arg0 (-> s4-0 body-footer)) + (progress-method-53 arg0 arg1) + (set! (-> arg1 alpha) f30-0) + (let ((v1-6 arg1)) + (set! (-> v1-6 scale) 0.5) + ) + (let ((a0-4 arg1)) + (set! (-> a0-4 color) (font-color font-color-32)) + ) + (let ((a0-5 arg1)) + (set! (-> a0-5 flags) (font-flags kerning middle middle-vert large)) + ) + (let ((s3-0 print-game-text)) + (let* ((s2-0 format) + (s1-0 (clear *temp-string*)) + (a0-7 *common-text*) + (t9-3 (method-of-object a0-7 lookup-text!)) + (a1-3 2199) + (a2-1 #f) + ) + (s2-0 s1-0 (t9-3 a0-7 (the-as text-id a1-3) a2-1) (the-as none a2-1)) + ) + (s3-0 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (progress-method-34 arg0) + (progress-method-33 arg0 (-> s4-0 footer)) + ) + (progress-method-53 arg0 arg1) + (let ((a0-13 arg1)) + (set! (-> a0-13 color) (font-color font-color-33)) + ) + (progress-method-38 arg0 arg1 0.1) + (progress-method-40 arg0 arg1 (the int (-> arg1 origin y)) 18 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-continue) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (progress-method-34 arg0) + 0 + (none) + ) + +;; definition for method 10 of type menu-secrets-insufficient-space-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-secrets-insufficient-space-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (s4-0 *progress-work*) + ) + (progress-method-33 arg0 (-> s4-0 body-footer)) + (progress-method-53 arg0 arg1) + (set! (-> arg1 alpha) f30-0) + (let ((v1-6 arg1)) + (set! (-> v1-6 scale) 0.5) + ) + (let ((a0-4 arg1)) + (set! (-> a0-4 color) (font-color font-color-32)) + ) + (let ((a0-5 arg1)) + (set! (-> a0-5 flags) (font-flags kerning middle middle-vert large)) + ) + (let ((s3-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-no-card-in-slot) #f) 1) + (s3-0 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (progress-method-34 arg0) + (progress-method-33 arg0 (-> s4-0 footer)) + ) + (progress-method-53 arg0 arg1) + (let ((a0-13 arg1)) + (set! (-> a0-13 color) (font-color font-color-33)) + ) + (progress-method-38 arg0 arg1 0.1) + (progress-method-40 arg0 arg1 (the int (-> arg1 origin y)) 18 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-continue) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (progress-method-34 arg0) + 0 + (none) + ) + +;; definition for method 10 of type menu-insert-card-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-insert-card-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((v1-1 arg1)) + (set! (-> v1-1 scale) 0.5) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color font-color-32)) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 90.0) + (set! (-> arg1 origin y) 130.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 330)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 95)) + ) + (let ((s4-0 print-game-text)) + (format + (clear *temp-string*) + (lookup-text! *common-text* (text-id progress-memcard-insert-with-jak3-data) #f) + 1 + ) + (s4-0 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin y) 115.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float 60)) + ) + (let ((a0-11 arg1)) + (set! (-> a0-11 color) (font-color font-color-33)) + ) + (progress-method-40 arg0 arg1 (the int (+ 17.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-memcard-go-back?) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-error-loading-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-error-loading-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((v1-1 arg1)) + (set! (-> v1-1 scale) 0.5) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color font-color-32)) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 90.0) + (set! (-> arg1 origin y) 100.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 330)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 45)) + ) + (let ((s4-0 170)) + (case (-> arg0 current) + (('error-saving) + (set! s4-0 171) + ) + (('error-formatting) + (set! s4-0 172) + ) + (('error-creating) + (set! s4-0 173) + ) + ) + (let ((s3-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (the-as text-id s4-0) #f) 1) + (s3-0 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + (+! (-> arg1 origin y) 50.0) + (let ((v1-16 arg1)) + (set! (-> v1-16 height) (the float 105)) + ) + (let ((s4-1 print-game-text)) + (format + (clear *temp-string*) + (lookup-text! *common-text* (text-id progress-memcard-check-and-try-again) #f) + 1 + ) + (s4-1 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin y) 115.0) + (let ((v1-19 arg1)) + (set! (-> v1-19 height) (the float 45)) + ) + (let ((a0-21 arg1)) + (set! (-> a0-21 color) (font-color font-color-33)) + ) + (progress-method-40 arg0 arg1 (the int (+ 9.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-continue) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-error-auto-saving-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-error-auto-saving-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((v1-1 arg1)) + (set! (-> v1-1 scale) 0.5) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color font-color-32)) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 77.0) + (set! (-> arg1 origin y) 85.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 360)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 25)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-memcard-save-error) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 25.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float 60)) + ) + (let ((s4-1 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-check) #f) 1) + (s4-1 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin y) 60.0) + (let ((v1-13 arg1)) + (set! (-> v1-13 height) (the float 45)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-autosave-disabled) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 45.0) + (let ((v1-16 arg1)) + (set! (-> v1-16 height) (the float 95)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-autosave-reenable-info) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 90.0) + (let ((v1-19 arg1)) + (set! (-> v1-19 height) (the float 25)) + ) + (let ((a0-20 arg1)) + (set! (-> a0-20 color) (font-color font-color-33)) + ) + (progress-method-40 arg0 arg1 (the int (-> arg1 origin y)) 22 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-continue) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-card-removed-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-card-removed-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((v1-1 arg1)) + (set! (-> v1-1 scale) 0.5) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color font-color-32)) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 80.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 360)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 70)) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-removed) #f) 1) + (s4-0 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin y) 65.0) + (print-game-text + (lookup-text! *common-text* (text-id progress-autosave-disabled) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 65.0) + (let ((v1-12 arg1)) + (set! (-> v1-12 height) (the float 90)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-autosave-reenable-info) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 85.0) + (let ((v1-15 arg1)) + (set! (-> v1-15 height) (the float 35)) + ) + (let ((a0-16 arg1)) + (set! (-> a0-16 color) (font-color font-color-33)) + ) + (progress-method-40 arg0 arg1 (the int (+ 5.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-continue) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-error-disc-removed-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-error-disc-removed-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color font-color-32)) + ) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.5) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 120.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 360)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 35)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-disc-removed-notice) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 45.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float 85)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-disc-removed-prompt) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (when (is-cd-in?) + (+! (-> arg1 origin y) 95.0) + (let ((v1-14 arg1)) + (set! (-> v1-14 height) (the float 50)) + ) + (let ((a0-12 arg1)) + (set! (-> a0-12 color) (font-color font-color-33)) + ) + (progress-method-40 arg0 arg1 (the int (+ 12.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-continue) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-error-reading-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-error-reading-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color font-color-32)) + ) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.5) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 90.0) + (set! (-> arg1 origin y) 120.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 330)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 35)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-disc-read-error) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 55.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float 85)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-disc-read-error-prompt) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 105.0) + (let ((v1-13 arg1)) + (set! (-> v1-13 height) (the float 50)) + ) + (let ((a0-12 arg1)) + (set! (-> a0-12 color) (font-color font-color-33)) + ) + (progress-method-40 arg0 arg1 (the int (+ 12.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-continue) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-icon-info-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-icon-info-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color font-color-32)) + ) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.5) + ) + (set! (-> *bigmap* auto-save-icon-flag) #t) + (set! (-> this sprites 0 tid) (the-as texture-id (get-texture checkpoint level-default-minimap))) + (set! (-> this sprites 0 scale-x) 1.0) + (set! (-> this sprites 0 scale-y) 1.0) + (let ((v1-6 (-> this sprites 0 color-ptr))) + (set! (-> v1-6 0) 128) + (set! (-> v1-6 1) 128) + (set! (-> v1-6 2) 128) + (set! (-> v1-6 3) (the int (* 128.0 (- 1.0 (-> arg0 menu-transition))))) + ) + (set! (-> this sprites 0 pos z) #xffffff) + (set! (-> this sprites 0 pos w) 0) + (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 240 160) + (with-dma-buffer-add-bucket ((s2-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-hud-alpha) + ) + ((method-of-type hud-sprite draw) (the-as hud-sprite (-> this sprites)) s2-0 (-> *level* level-default) #t) + ) + (let ((a0-16 arg1)) + (set! (-> a0-16 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 90.0) + (set! (-> arg1 origin y) 80.0) + (let ((v1-28 arg1)) + (set! (-> v1-28 width) (the float 330)) + ) + (let ((v1-29 arg1)) + (set! (-> v1-29 height) (the float 85)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-autosave-notice) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 115.0) + (let ((v1-32 arg1)) + (set! (-> v1-32 height) (the float 95)) + ) + (let ((s4-2 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-autosave-remove-warn) #f) 1) + (s4-2 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin y) 90.0) + (let ((v1-35 arg1)) + (set! (-> v1-35 height) (the float 50)) + ) + (let ((a0-27 arg1)) + (set! (-> a0-27 color) (font-color font-color-33)) + ) + (progress-method-40 arg0 arg1 (the int (+ 12.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-continue) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-format-card-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-format-card-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color font-color-32)) + ) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.5) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 80.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 360)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 85)) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-unformatted) #f) 1) + (s4-0 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin y) 95.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float 85)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-memcard-formatting-required-notice) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 95.0) + (let ((v1-13 arg1)) + (set! (-> v1-13 height) (the float 25)) + ) + (progress-method-40 arg0 arg1 (the int (-> arg1 origin y)) 44 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-memcard-format?) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 25.0) + (draw-yes-no-style-footer arg0 arg1 (text-id progress-yes) (text-id progress-no)) + 0 + (none) + ) + +;; definition for method 10 of type menu-already-exists-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-already-exists-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color font-color-32)) + ) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.5) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 120.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 360)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 85)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-memcard-overwrite-warning) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 105.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float 45)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-memcard-overwrite-confirm?) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 45.0) + (progress-method-40 arg0 arg1 (the int (+ 8.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (draw-yes-no-style-footer arg0 arg1 (text-id progress-yes) (text-id progress-no)) + 0 + (none) + ) + +;; definition for method 10 of type menu-create-game-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-create-game-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color font-color-32)) + ) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.5) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 110.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 360)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 90)) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-no-save-data) #f) 1) + (s4-0 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (+! (-> arg1 origin y) 95.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float 60)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-memcard-create-save-data?) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 70.0) + (progress-method-40 arg0 arg1 (the int (+ 18.0 (-> arg1 origin y))) 22 (-> arg1 alpha)) + (draw-yes-no-style-footer arg0 arg1 (text-id progress-yes) (text-id progress-no)) + 0 + (none) + ) + +;; definition for method 10 of type menu-video-mode-warning-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-video-mode-warning-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color font-color-32)) + ) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.5) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 85.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 360)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 45)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-graphics-prog-scan-change-notice) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 50.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float 95)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-graphics-prog-scan-warn-2) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 85.0) + (let ((v1-13 arg1)) + (set! (-> v1-13 height) (the float 55)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-graphics-60hz-change-notice) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 60.0) + (let ((v1-16 arg1)) + (set! (-> v1-16 height) (the float 30)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-memcard-continue?) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 20.0) + (progress-method-40 arg0 arg1 (the int (-> arg1 origin y)) 24 (-> arg1 alpha)) + (draw-yes-no-style-footer arg0 arg1 (text-id progress-yes) (text-id progress-no)) + 0 + (none) + ) + +;; definition for method 10 of type menu-video-mode-ok-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-video-mode-ok-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color font-color-32)) + ) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.5) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 130.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 360)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 50)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-graphics-60hz-change-complete) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 70.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float 50)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-graphics-prog-scan-keep) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 50.0) + (progress-method-40 arg0 arg1 (the int (+ 12.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (draw-yes-no-style-footer arg0 arg1 (text-id progress-yes) (text-id progress-no)) + 0 + (none) + ) + +;; definition for method 10 of type menu-progressive-mode-warning-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-progressive-mode-warning-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color font-color-32)) + ) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.5) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 75.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 360)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 50)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-graphics-prog-scan-warn-1) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 50.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float 90)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-graphics-prog-scan-warn-2) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 85.0) + (let ((v1-13 arg1)) + (set! (-> v1-13 height) (the float 75)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-graphics-60hz-change-notice) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 70.0) + (let ((v1-16 arg1)) + (set! (-> v1-16 height) (the float 30)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-memcard-continue?) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 25.0) + (progress-method-40 arg0 arg1 (the int (-> arg1 origin y)) 24 (-> arg1 alpha)) + (draw-yes-no-style-footer arg0 arg1 (text-id progress-yes) (text-id progress-no)) + 0 + (none) + ) + +;; definition for method 10 of type menu-progressive-mode-ok-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-progressive-mode-ok-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color font-color-32)) + ) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.55) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle middle-vert large)) + ) + (set! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 90.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float 360)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float 80)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-graphics-prog-scan-change-complete) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 100.0) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float 75)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-graphics-prog-scan-keep) #f) + arg1 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (+! (-> arg1 origin y) 70.0) + (progress-method-40 arg0 arg1 (the int (+ 20.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (draw-yes-no-style-footer arg0 arg1 (text-id progress-yes) (text-id progress-no)) + 0 + (none) + ) + +;; definition for method 10 of type menu-select-start-option +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-select-start-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars + (sv-16 string) + (sv-32 string) + (sv-48 (function game-text-info text-id symbol string)) + (sv-64 game-text-info) + (sv-80 (function _varargs_ object)) + (sv-96 string) + (sv-112 string) + (sv-128 (function game-text-info text-id symbol string)) + (sv-144 game-text-info) + ) + (set! (-> *progress-list-level* mode) (-> arg0 current)) + (set! (-> *progress-list-level* act) (-> *progress-work* selected-num)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (let ((s3-0 (length *progress-list-level*))) + (set! (-> arg1 alpha) f30-0) + (let ((a0-4 arg1)) + (set! (-> a0-4 flags) (font-flags kerning large)) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 scale) 0.42) + ) + (progress-method-33 arg0 (-> *progress-work* body-footer)) + (let ((s2-1 (max 0 (the int (-> this current-index)))) + (s1-0 print-game-text) + ) + (let ((s0-0 format)) + (set! sv-16 (clear *temp-string*)) + (set! sv-32 "~S") + (set! sv-64 *common-text*) + (set! sv-48 (method-of-object sv-64 lookup-text!)) + (let* ((a1-3 (-> (progress-list-method-9 *progress-list-level* s2-1) text-name)) + (a2-1 #f) + (a2-2 (sv-48 sv-64 a1-3 a2-1)) + ) + (s0-0 sv-16 sv-32 a2-2) + ) + ) + (let ((f28-0 (s1-0 *temp-string* arg1 #t 44 (bucket-id hud-draw-hud-alpha)))) + (let ((s1-1 (get-scissor-stack-top arg0))) + (let ((f0-5 (- (-> s1-1 w) (-> s1-1 y)))) + (let* ((v1-18 arg1) + (f1-4 (+ 10.0 (-> s1-1 x))) + (f2-3 8.0) + (f3-1 (-> this current-index)) + (f2-5 (+ (- f2-3 (* f28-0 (- f3-1 (* (the float (the int (/ f3-1 1.0))) 1.0)))) (-> s1-1 y))) + ) + (set! (-> v1-18 origin x) f1-4) + (set! (-> v1-18 origin y) f2-5) + ) + (let ((v1-19 arg1)) + (set! (-> v1-19 width) (+ (- -20.0 (-> s1-1 x)) (-> s1-1 z))) + ) + (set! (-> arg1 height) f0-5) + ) + (while (and (< (-> arg1 origin y) (-> s1-1 w)) (< s2-1 s3-0)) + (cond + ((= s2-1 (-> this selected-index)) + (let ((a0-18 arg1)) + (set! (-> a0-18 color) (font-color font-color-34)) + ) + ) + (else + (let ((a0-19 arg1)) + (set! (-> a0-19 color) (font-color font-color-32)) + ) + ) + ) + (let ((s0-1 print-game-text)) + (set! sv-80 format) + (set! sv-96 (clear *temp-string*)) + (set! sv-112 "~S") + (set! sv-144 *common-text*) + (set! sv-128 (method-of-object sv-144 lookup-text!)) + (let* ((a1-7 (-> (progress-list-method-9 *progress-list-level* s2-1) text-name)) + (a2-4 #f) + (a2-5 (sv-128 sv-144 a1-7 a2-4)) + ) + (sv-80 sv-96 sv-112 a2-5) + ) + (let ((f26-0 (s0-1 *temp-string* arg1 #f 40 (bucket-id hud-draw-hud-alpha)))) + (if (= s2-1 (-> this selected-index)) + (progress-method-40 arg0 arg1 (the int (+ -2.0 (-> arg1 origin y))) (the int (+ 2.0 f26-0)) f30-0) + ) + (+! (-> arg1 origin y) f26-0) + ) + ) + (+! s2-1 1) + ) + ) + (seek! + (-> this current-index) + (-> this target-index) + (* (/ (-> this scroll-speed) f28-0) (seconds-per-frame)) + ) + ) + ) + ) + (progress-method-34 arg0) + (let ((s3-1 *progress-work*)) + (let* ((a0-28 arg0) + (t9-16 (method-of-object a0-28 progress-method-46)) + (a1-12 arg1) + (a2-9 f30-0) + (v1-46 (-> *progress-work* selected-num)) + ) + (t9-16 a0-28 a1-12 a2-9 (cond + ((zero? v1-46) + 54 + ) + ((= v1-46 1) + 2126 + ) + ((= v1-46 2) + 2127 + ) + (else + 2128 + ) + ) + ) + ) + (progress-method-42 arg0 (-> s3-1 footer) (* 64.0 f30-0)) + (progress-method-41 arg0 (-> s3-1 footer) (* 128.0 f30-0)) + ) + ) + (progress-method-47 + arg0 + arg1 + (!= (-> this current-index) 0.0) + (!= (-> this current-index) (the float (+ (-> arg0 total-num-tasks) -1))) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-select-scene-option +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-select-scene-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars + (sv-16 (function _varargs_ object)) + (sv-32 string) + (sv-48 string) + (sv-64 (function string font-context symbol int bucket-id float)) + (sv-80 (function _varargs_ object)) + (sv-96 string) + (sv-112 string) + ) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (let* ((v1-3 (-> *progress-work* selected-num)) + (s3-0 (cond + ((zero? v1-3) + *hud-select-scene-act1* + ) + ((= v1-3 1) + *hud-select-scene-act2* + ) + ((= v1-3 2) + *hud-select-scene-act3* + ) + (else + *hud-select-scene-commentary* + ) + ) + ) + (s2-0 (-> s3-0 length)) + ) + (set! (-> arg1 alpha) f30-0) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning large)) + ) + (let ((v1-5 arg1)) + (set! (-> v1-5 scale) 0.42) + ) + (progress-method-33 arg0 (-> *progress-work* body-footer)) + (let ((s1-1 (max 0 (the int (-> this current-index)))) + (s0-0 print-game-text) + ) + (set! sv-16 format) + (set! sv-32 (clear *temp-string*)) + (set! sv-48 "~S") + (let ((a2-2 (lookup-text! *common-text* (-> s3-0 s1-1 text) #f))) + (sv-16 sv-32 sv-48 a2-2) + ) + (let ((f28-0 (s0-0 *temp-string* arg1 #t 44 (bucket-id hud-draw-hud-alpha)))) + (let ((s0-1 (get-scissor-stack-top arg0))) + (let ((f0-5 (- (-> s0-1 w) (-> s0-1 y)))) + (let* ((v1-16 arg1) + (f1-4 (+ 10.0 (-> s0-1 x))) + (f2-3 8.0) + (f3-1 (-> this current-index)) + (f2-5 (+ (- f2-3 (* f28-0 (- f3-1 (* (the float (the int (/ f3-1 1.0))) 1.0)))) (-> s0-1 y))) + ) + (set! (-> v1-16 origin x) f1-4) + (set! (-> v1-16 origin y) f2-5) + ) + (let ((v1-17 arg1)) + (set! (-> v1-17 width) (+ (- -20.0 (-> s0-1 x)) (-> s0-1 z))) + ) + (set! (-> arg1 height) f0-5) + ) + (while (and (< (-> arg1 origin y) (-> s0-1 w)) (< s1-1 s2-0)) + (cond + ((= s1-1 (-> this selected-index)) + (let ((a0-16 arg1)) + (set! (-> a0-16 color) (font-color font-color-34)) + ) + ) + (else + (let ((a0-17 arg1)) + (set! (-> a0-17 color) (font-color font-color-32)) + ) + ) + ) + (set! sv-64 print-game-text) + (set! sv-80 format) + (set! sv-96 (clear *temp-string*)) + (set! sv-112 "~S") + (let ((a2-5 (lookup-text! *common-text* (-> s3-0 s1-1 text) #f))) + (sv-80 sv-96 sv-112 a2-5) + ) + (let* ((a0-21 *temp-string*) + (a1-7 arg1) + (a2-6 #f) + (a3-2 40) + (t0-2 579) + (f26-0 (sv-64 a0-21 a1-7 a2-6 a3-2 (the-as bucket-id t0-2))) + ) + (if (= s1-1 (-> this selected-index)) + (progress-method-40 arg0 arg1 (the int (+ -2.0 (-> arg1 origin y))) (the int (+ 2.0 f26-0)) f30-0) + ) + (+! (-> arg1 origin y) f26-0) + ) + (+! s1-1 1) + ) + ) + (seek! + (-> this current-index) + (-> this target-index) + (* (/ (-> this scroll-speed) f28-0) (seconds-per-frame)) + ) + ) + ) + ) + (progress-method-34 arg0) + (let ((s3-1 *progress-work*)) + (let* ((a0-25 arg0) + (t9-13 (method-of-object a0-25 progress-method-46)) + (a1-10 arg1) + (a2-9 f30-0) + (v1-44 (-> *progress-work* selected-num)) + ) + (t9-13 a0-25 a1-10 a2-9 (cond + ((zero? v1-44) + 91 + ) + ((= v1-44 1) + 92 + ) + ((= v1-44 2) + 93 + ) + (else + 2002 + ) + ) + ) + ) + (progress-method-42 arg0 (-> s3-1 footer) (* 64.0 f30-0)) + (progress-method-41 arg0 (-> s3-1 footer) (* 128.0 f30-0)) + ) + ) + (progress-method-47 + arg0 + arg1 + (!= (-> this current-index) 0.0) + (!= (-> this current-index) (the float (+ (-> arg0 total-num-tasks) -1))) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-qr-option +;; WARN: Return type mismatch int vs none. +(defmethod draw-option ((this menu-qr-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))) + (set! (-> arg1 alpha) f30-0) + (progress-method-38 arg0 arg1 (-> this offset-y)) + (cond + (arg3 + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color font-color-34)) + ) + ) + ((= (-> arg0 option-index) arg2) + (let ((v1-6 arg1)) + (set! (-> v1-6 color) (font-color font-color-33)) + ) + ) + (else + (let ((v1-7 arg1)) + (set! (-> v1-7 color) (font-color font-color-32)) + ) + ) + ) + (let ((v1-8 arg1)) + (set! (-> v1-8 scale) 0.75) + ) + (let ((f28-0 + (print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 24 (bucket-id hud-draw-hud-alpha)) + ) + ) + (when (= (-> arg0 option-index) arg2) + (progress-method-40 arg0 arg1 (the int (+ -2.0 (-> arg1 origin y))) (the int (+ 8.0 f28-0)) f30-0) + (set! (-> arg1 origin y) (+ 4.0 f28-0 (-> arg1 origin y))) + ) + ) + (when arg3 + (let ((v1-19 arg1)) + (set! (-> v1-19 scale) 0.6) + ) + (draw-yes-no-style-footer arg0 arg1 (text-id progress-yes) (text-id progress-no)) + ) + (if (zero? arg2) + (progress-method-46 arg0 arg1 f30-0 116) + ) + ) + 0 + (none) + ) + +;; definition for function unlocked-secret-menu? +(defun unlocked-secret-menu? ((arg0 game-secrets)) + (logtest? arg0 (game-secrets + scene-player-1 + scene-player-2 + scene-player-3 + title-commentary + level-select-1 + level-select-2 + level-select-3 + scrap-book-1 + scrap-book-2 + model-viewer-1 + model-viewer-2 + model-viewer-3 + ) + ) + ) + +;; definition for function memcard-unlocked-secrets? +;; WARN: Return type mismatch object vs game-secrets. +(defun memcard-unlocked-secrets? ((arg0 object) (arg1 symbol)) + (let ((v1-0 *progress-save-info*) + (s5-0 (the-as object 0)) + ) + (let ((a0-1 4) + (s4-0 *progress-work*) + ) + (when (and v1-0 (= (-> v1-0 formatted) 1) (= (-> v1-0 inited) 1)) + (dotimes (a1-6 a0-1) + (set! s5-0 (logior (the-as int s5-0) (-> v1-0 file a1-6 purchase-secrets))) + ) + ) + (if (or (nonzero? (-> *setting-control* user-current subtitle-language)) + (nonzero? (-> *setting-control* user-current language)) + (nonzero? (-> *setting-control* user-current audio-language)) + ) + (set! s5-0 (logand -17 (the-as int s5-0))) + ) + (cond + ((kiosk?) + (set! (-> s4-0 secrets-unlocked) (the-as basic #t)) + (set! s5-0 (logior (the-as int s5-0) 32)) + ) + ((unlocked-secret-menu? (the-as game-secrets s5-0)) + (set! (-> s4-0 secrets-unlocked) (the-as basic #t)) + ) + (else + (set! (-> s4-0 secrets-unlocked) #f) + ) + ) + (when *cheat-mode* + (set! (-> s4-0 secrets-unlocked) (the-as basic #t)) + (set! s5-0 (logior (the-as int s5-0) #x3bfe)) + ) + ) + (the-as game-secrets (cond + (arg1 + (empty) + s5-0 + ) + (else + (unlocked-secret-menu? (the-as game-secrets s5-0)) + ) + ) + ) + ) + ) + +;; definition for function num-unlocked-secret? +(defun num-unlocked-secret? ((arg0 game-secrets)) + (let ((v0-0 0)) + (if (logtest? arg0 (game-secrets scene-player-1)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets scene-player-2)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets scene-player-3)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets title-commentary)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets level-select-1)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets level-select-2)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets level-select-3)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets scrap-book-1)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets scrap-book-2)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets model-viewer-1)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets model-viewer-2)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets model-viewer-3)) + (+! v0-0 1) + ) + (if (logtest? arg0 (game-secrets hero-mode)) + (+! v0-0 1) + ) + v0-0 + ) + ) + +;; definition for method 12 of type secret-item-option +(defmethod secret-item-option-method-12 ((this secret-item-option)) + (cond + ((logtest? (-> this flags) (secret-item-option-flags sf0)) + 5 + ) + ((logtest? (-> *game-info* purchase-secrets) (-> this secret)) + (if (logtest? (-> *game-info* secrets) (-> this secret)) + 1 + 2 + ) + ) + ((and (not (task-node-closed? (-> this avail-after))) + (not (logtest? (-> *game-info* secrets) (game-secrets hero-mode))) + ) + 4 + ) + ((!= (logand (-> *game-info* purchase-secrets) (-> this required-secrets)) (-> this required-secrets)) + 3 + ) + (else + 0 + ) + ) + ) + +;; definition for method 13 of type secret-item-option +(defmethod secret-item-option-method-13 ((this secret-item-option)) + (local-vars (v0-1 game-vehicles)) + (when (zero? (secret-item-option-method-12 this)) + (case (-> this secret) + (((game-secrets hero-mode)) + (logior! (-> *game-info* purchase-secrets) (-> this secret)) + ) + (else + (logior! (-> *game-info* purchase-secrets) (-> this secret)) + (set! (-> *game-info* secrets) + (logclear (logior (-> *game-info* secrets) (-> this secret)) (-> this mask-secrets)) + ) + ) + ) + (case (-> this secret) + (((game-secrets vehicle-fox)) + (set! v0-1 (logior (-> *game-info* vehicles) (game-vehicles v-fox))) + (set! (-> *game-info* vehicles) v0-1) + v0-1 + ) + (((game-secrets vehicle-mirage)) + (set! v0-1 (logior (-> *game-info* vehicles) (game-vehicles v-mirage))) + (set! (-> *game-info* vehicles) v0-1) + v0-1 + ) + (((game-secrets vehicle-x-ride)) + (set! v0-1 (logior (-> *game-info* vehicles) (game-vehicles v-x-ride))) + (set! (-> *game-info* vehicles) v0-1) + v0-1 + ) + ) + ) + ) + +;; definition for method 10 of type menu-secret-option +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; ERROR: Function may read a register that is not set: t1 +(defmethod draw-option ((this menu-secret-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars + (a0-19 string) + (t1-0 int) + (sv-16 float) + (sv-24 int) + (sv-96 int) + (sv-112 int) + (sv-128 int) + (sv-144 string) + (sv-160 string) + (sv-176 (function _varargs_ object)) + (sv-192 string) + (sv-208 text-id) + (sv-224 (function _varargs_ object)) + (sv-240 string) + (sv-256 (function string font-context symbol int bucket-id float)) + (sv-272 (function _varargs_ object)) + (sv-288 int) + (sv-304 (function string font-context symbol int bucket-id float)) + (sv-320 (function _varargs_ object)) + (sv-336 (function _varargs_ object)) + (sv-352 string) + (sv-368 string) + (sv-384 (function _varargs_ object)) + (sv-400 (function _varargs_ object)) + (sv-416 (function _varargs_ object)) + ) + (set! sv-16 (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (set! sv-24 (the int (-> *game-info* skill))) + (set! (-> arg1 alpha) sv-16) + (cond + ((not (bigmap-method-11 *bigmap*)) + (progress-method-51 arg0 arg1) + ) + (else + (new 'stack 'hud-sprite) + (let ((s2-0 (lookup-texture-by-id (new 'static 'texture-id :index #x30 :page #x11)))) + (when (and s2-0 (not (-> this available-title))) + (progress-method-33 arg0 (-> *progress-work* sub-header)) + (let ((s3-0 (get-scissor-stack-top arg0))) + (let* ((f0-5 0.64) + (f30-0 (+ 10.0 (* (the float (-> s2-0 w)) f0-5 (-> *video-params* relative-x-scale)))) + ) + (let ((f1-5 (* (the float (-> s2-0 h)) f0-5))) + (+ (- (- -20.0 f30-0) (-> s3-0 x)) (-> s3-0 z)) + (set! t1-0 (logior #x808080 (shr (shl (the int (* 128.0 sv-16)) 56) 32))) + (draw-icon-array! + (-> *progress-icon-arrays* 68) + (the int (+ 10.0 (-> s3-0 x))) + (the int (+ (-> s3-0 y) (* 0.5 (- 28.0 f1-5)))) + f0-5 + f0-5 + (the-as rgba t1-0) + sv-16 + ) + ) + (let ((v1-26 arg1)) + (set! (-> v1-26 height) 28.0) + ) + (let ((a0-13 arg1)) + (set! (-> a0-13 flags) (font-flags kerning large)) + ) + (let ((f28-0 0.45)) + (let ((a0-14 arg1)) + (set! (-> a0-14 color) (font-color font-color-34)) + ) + (cond + ((-> this buy-menu) + (let ((s2-1 format) + (s1-0 (clear *temp-string*)) + (s0-0 "x~D ~S") + ) + (set! sv-96 (-> *menu-secrets-array* (-> this selected-index) cost)) + (let ((a3-2 (lookup-text! *common-text* (text-id progress-secrets-price) #f))) + (s2-1 s1-0 s0-0 sv-96 a3-2) + ) + ) + (set! a0-19 *temp-string*) + ) + (else + (let ((s2-2 format) + (s1-1 (clear *temp-string*)) + (s0-1 "x~D ~S") + ) + (set! sv-112 sv-24) + (let ((a3-3 (lookup-text! *common-text* (text-id progress-secrets-orbs-available) #f))) + (s2-2 s1-1 s0-1 sv-112 a3-3) + ) + ) + (set! a0-19 *temp-string*) + ) + ) + (let ((v1-42 arg1)) + (set! (-> v1-42 scale) f28-0) + ) + (let ((v1-43 arg1) + (f0-10 (+ (-> s3-0 x) f30-0)) + (f1-11 (+ (-> s3-0 y) (* 0.5 (- 28.0 (* 32.0 f28-0))))) + ) + (set! (-> v1-43 origin x) f0-10) + (set! (-> v1-43 origin y) f1-11) + ) + ) + ) + (print-game-text a0-19 arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + (let ((a0-23 arg1)) + (set! (-> a0-23 flags) (font-flags kerning right large)) + ) + (set! (-> arg1 origin x) (+ -10.0 (-> s3-0 z))) + ) + (let ((s3-1 print-game-text)) + (let ((s2-3 format) + (s1-2 (clear *temp-string*)) + (s0-2 "~D/600 ~S") + ) + (set! sv-128 (the int (-> *game-info* skill-total))) + (let ((a3-5 (lookup-text! *common-text* (text-id progress-secrets-orbs-collected) #f))) + (s2-3 s1-2 s0-2 sv-128 a3-5) + ) + ) + (let ((a0-27 *temp-string*) + (a1-15 arg1) + (a2-9 #f) + (a3-6 44) + ) + (set! arg3 (the-as symbol 579)) + (s3-1 a0-27 a1-15 a2-9 a3-6 (the-as bucket-id arg3)) + ) + ) + (progress-method-34 arg0) + ) + ) + (let ((v1-52 arg1)) + (set! (-> v1-52 scale) 0.42) + ) + (cond + ((-> this available-title) + (progress-method-33 arg0 (-> *progress-work* body-footer)) + (progress-method-53 arg0 arg1) + (let ((a0-32 arg1)) + (set! (-> a0-32 color) (font-color font-color-32)) + ) + (let ((a0-33 arg1)) + (set! (-> a0-33 flags) (font-flags kerning middle middle-vert large)) + ) + (let ((s4-1 print-game-text)) + (let* ((s3-2 format) + (s2-4 (clear *temp-string*)) + (a0-35 *common-text*) + (t9-22 (method-of-object a0-35 lookup-text!)) + (a1-18 128) + (a2-10 #f) + ) + (s3-2 s2-4 (t9-22 a0-35 (the-as text-id a1-18) a2-10) (the-as none a2-10)) + ) + (s4-1 *temp-string* arg1 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + (progress-method-34 arg0) + (progress-method-33 arg0 (-> *progress-work* footer)) + (let ((a0-40 arg1)) + (set! (-> a0-40 flags) (font-flags kerning middle large)) + ) + (progress-method-38 arg0 arg1 0.1) + (let ((a0-42 arg1)) + (set! (-> a0-42 color) (font-color font-color-33)) + ) + (let ((f0-16 (print-game-text + (lookup-text! *common-text* (text-id progress-continue) #f) + arg1 + #f + 32 + (bucket-id hud-draw-hud-alpha) + ) + ) + ) + (progress-method-40 arg0 arg1 (the int (+ -2.0 (-> arg1 origin y))) (the int (+ 4.0 f0-16)) (-> arg1 alpha)) + ) + (progress-method-34 arg0) + ) + ((-> this buy-menu) + (progress-method-33 arg0 (-> *progress-work* body)) + (progress-method-38 arg0 arg1 0.45) + (progress-method-50 + arg0 + arg1 + (-> *menu-secrets-array* (-> this selected-index) name) + (text-id progress-secrets-buy) + (text-id progress-secrets-cancel) + #t + #t + 0.65 + ) + (let ((s4-3 *progress-work*)) + (progress-method-46 arg0 arg1 sv-16 84) + (progress-method-41 arg0 (-> s4-3 sub-header) (* 128.0 sv-16)) + ) + (progress-method-34 arg0) + ) + (else + (progress-method-33 arg0 (-> *progress-work* sub-body-footer)) + (let* ((s3-3 (get-scissor-stack-top arg0)) + (f22-0 (- (-> s3-3 w) (-> s3-3 y))) + (f30-1 (+ 10.0 (* 24.0 (-> *video-params* relative-x-scale) (-> arg1 scale)))) + (f28-1 (+ (- -10.0 (-> s3-3 x)) (-> s3-3 z))) + (s2-5 get-string-length) + ) + (let ((s1-3 format) + (s0-3 (clear *temp-string*)) + ) + (set! sv-144 "~32L~S~44L ~S") + (set! sv-160 (lookup-text! *common-text* (text-id progress-on) #f)) + (let ((a3-12 (lookup-text! *common-text* (text-id progress-off) #f))) + (s1-3 s0-3 sv-144 sv-160 a3-12 (the-as none arg3) (the-as none t1-0)) + ) + ) + (let* ((f0-27 (-> (s2-5 *temp-string* arg1) length)) + (f26-0 (- (- (- f28-1 f30-1) f0-27) f30-1)) + ) + (- f28-1 f26-0) + (let ((a0-60 arg1)) + (set! (-> a0-60 flags) (font-flags kerning large)) + ) + (let ((v1-100 arg1)) + (set! (-> v1-100 width) f26-0) + ) + (let ((s2-6 *menu-secrets-array*) + (s1-5 (max 0 (the int (-> this current-index)))) + ) + (let* ((a0-61 (-> s2-6 s1-5)) + (s0-4 (-> a0-61 name)) + ) + (case (secret-item-option-method-12 a0-61) + ((4) + (set! sv-192 "?????????") + ) + (else + (set! sv-192 (lookup-text! *common-text* s0-4 #f)) + ) + ) + ) + (let ((s0-5 print-game-text)) + (set! sv-176 format) + (let ((a0-65 (clear *temp-string*)) + (a1-37 "~S") + ) + (sv-176 a0-65 a1-37 sv-192) + ) + (let ((f24-0 (s0-5 *temp-string* arg1 #t 40 (bucket-id hud-draw-hud-alpha)))) + (let ((f0-33 4.0) + (f1-25 (-> this current-index)) + ) + (set! (-> arg1 origin y) + (+ (- f0-33 (* f24-0 (- f1-25 (* (the float (the int (/ f1-25 1.0))) 1.0)))) (-> s3-3 y)) + ) + ) + (set! (-> arg1 height) f22-0) + (while (and (< (-> arg1 origin y) (-> s3-3 w)) (< s1-5 (-> *menu-secrets-array* length))) + (let ((s0-6 (-> s2-6 s1-5))) + (set! sv-208 (-> s2-6 s1-5 name)) + (set! sv-288 (secret-item-option-method-12 s0-6)) + (case sv-288 + ((4) + (set! sv-240 "?????????") + ) + (else + (let* ((a0-69 *common-text*) + (t9-51 (method-of-object a0-69 lookup-text!)) + (a2-27 #f) + ) + (set! sv-240 (t9-51 a0-69 sv-208 a2-27)) + ) + ) + ) + (cond + ((logtest? (-> s2-6 s1-5 flags) (secret-item-option-flags sf0)) + (set! (-> arg1 origin x) (+ 10.0 (-> s3-3 x))) + (let ((v1-130 arg1)) + (set! (-> v1-130 width) f28-1) + ) + (let ((a0-70 arg1)) + (set! (-> a0-70 color) (font-color font-color-34)) + ) + (let ((a0-71 arg1)) + (set! (-> a0-71 flags) (font-flags kerning large)) + ) + (let ((f22-1 (-> arg1 origin y)) + (s0-7 print-game-text) + ) + (set! sv-224 format) + (let ((a0-73 (clear *temp-string*)) + (a1-40 "~S") + ) + (sv-224 a0-73 a1-40 sv-240) + ) + (set! (-> arg1 origin y) (+ f22-1 (s0-7 *temp-string* arg1 #f 40 (bucket-id hud-draw-hud-alpha)))) + ) + ) + ((not (and (logtest? (-> s2-6 s1-5 flags) (secret-item-option-flags sf4)) + (or (nonzero? (-> *setting-control* user-current subtitle-language)) + (nonzero? (-> *setting-control* user-current language)) + (nonzero? (-> *setting-control* user-current audio-language)) + ) + ) + ) + (set! (-> arg1 origin x) (+ (-> s3-3 x) f30-1)) + (let ((v1-147 arg1)) + (set! (-> v1-147 width) f26-0) + ) + (let ((v1-148 sv-288)) + (cond + ((or (= v1-148 4) (= v1-148 3)) + (let ((a0-79 arg1)) + (set! (-> a0-79 flags) (font-flags kerning large ff7)) + ) + (let ((v1-150 arg1)) + (set! (-> v1-150 color) (font-color font-color-44)) + ) + ) + ((zero? v1-148) + (let ((a0-81 arg1)) + (set! (-> a0-81 flags) (font-flags kerning large)) + ) + (let ((v1-152 arg1)) + (set! (-> v1-152 color) (font-color font-color-34)) + ) + ) + (else + (let ((a0-83 arg1)) + (set! (-> a0-83 flags) (font-flags kerning large)) + ) + (let ((v1-154 arg1)) + (set! (-> v1-154 color) (font-color font-color-32)) + ) + ) + ) + ) + (let ((f22-2 (-> arg1 origin y))) + (set! sv-256 print-game-text) + (set! sv-272 format) + (let ((a0-86 (clear *temp-string*)) + (a1-44 "~S") + (a2-30 sv-240) + ) + (sv-272 a0-86 a1-44 a2-30) + ) + (let* ((a0-87 *temp-string*) + (a1-45 arg1) + (a2-31 #f) + (a3-15 40) + (t0-9 579) + (f20-0 (sv-256 a0-87 a1-45 a2-31 a3-15 (the-as bucket-id t0-9))) + ) + (when (not (logtest? (-> s2-6 s1-5 flags) (secret-item-option-flags sf0))) + (set! (-> arg1 origin x) (+ (-> s3-3 x) f28-1)) + (let ((a0-88 arg1)) + (set! (-> a0-88 flags) (font-flags kerning right large)) + ) + (set! sv-352 (lookup-text! *common-text* (text-id progress-on) #f)) + (set! sv-368 (lookup-text! *common-text* (text-id progress-off) #f)) + (cond + ((or (zero? sv-288) (= sv-288 3)) + (set! sv-304 print-game-text) + (set! sv-320 format) + (let ((a0-93 (clear *temp-string*)) + (a1-48 "~d") + (a2-34 (-> s0-6 cost)) + ) + (sv-320 a0-93 a1-48 a2-34) + ) + (let ((a0-94 *temp-string*) + (a1-49 arg1) + (a2-35 #f) + (a3-16 40) + (t0-10 579) + ) + (sv-304 a0-94 a1-49 a2-35 a3-16 (the-as bucket-id t0-10)) + ) + ) + ((= sv-288 1) + (cond + ((logtest? (-> s2-6 s1-5 flags) (secret-item-option-flags sf1)) + (let ((s0-8 print-game-text)) + (set! sv-336 format) + (let ((a0-97 (clear *temp-string*)) + (a1-50 "~32L~S~44L ~S") + ) + (sv-336 a0-97 a1-50 sv-352 sv-368 (the-as none t0-9) (the-as none t1-0)) + ) + (s0-8 *temp-string* arg1 #f 40 (bucket-id hud-draw-hud-alpha)) + ) + ) + (else + (let ((s0-9 print-game-text)) + (set! sv-384 format) + (let ((a0-100 (clear *temp-string*)) + (a1-52 "~S") + (a2-38 sv-352) + ) + (sv-384 a0-100 a1-52 a2-38) + ) + (s0-9 *temp-string* arg1 #f 40 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + ((= sv-288 2) + (cond + ((logtest? (-> s2-6 s1-5 flags) (secret-item-option-flags sf1)) + (let ((s0-10 print-game-text)) + (set! sv-400 format) + (let ((a0-104 (clear *temp-string*)) + (a1-54 "~44L~S ~32L~S~1L") + (a2-40 sv-352) + (a3-20 sv-368) + ) + (sv-400 a0-104 a1-54 a2-40 a3-20 (the-as none t0-9) (the-as none t1-0)) + ) + (s0-10 *temp-string* arg1 #f 40 (bucket-id hud-draw-hud-alpha)) + ) + ) + (else + (let ((s0-11 print-game-text)) + (set! sv-416 format) + (let ((a0-107 (clear *temp-string*)) + (a1-56 "~S") + (a2-42 sv-368) + ) + (sv-416 a0-107 a1-56 a2-42) + ) + (s0-11 *temp-string* arg1 #f 40 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + ) + ) + (+! (-> arg1 origin y) f20-0) + (if (= s1-5 (-> this selected-index)) + (progress-method-40 arg0 arg1 (the int (+ -2.0 f22-2)) (the int (+ 3.0 f20-0)) sv-16) + ) + ) + ) + ) + ) + ) + (+! s1-5 1) + ) + (seek! (-> this current-index) (-> this target-index) (* (/ 600.0 f24-0) (seconds-per-frame))) + ) + ) + ) + ) + ) + (progress-method-34 arg0) + (let ((s3-4 *progress-work*)) + (progress-method-46 arg0 arg1 sv-16 84) + (progress-method-41 arg0 (-> s3-4 sub-header) (* 128.0 sv-16)) + (progress-method-42 arg0 (-> s3-4 footer) (* 64.0 sv-16)) + (progress-method-41 arg0 (-> s3-4 footer) (* 128.0 sv-16)) + ) + (progress-method-47 + arg0 + arg1 + (!= (-> this current-index) 0.0) + (!= (-> this current-index) (the float (+ (-> *menu-secrets-array* length) -1))) + ) + ) + ) + ) + ) + 0 + (none) + ) diff --git a/test/decompiler/reference/jak3/engine/ui/progress/progress-h_REF.gc b/test/decompiler/reference/jak3/engine/ui/progress/progress-h_REF.gc index 12b7bbc587..852cb9870f 100644 --- a/test/decompiler/reference/jak3/engine/ui/progress/progress-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/ui/progress/progress-h_REF.gc @@ -5,7 +5,7 @@ (deftype progress-list (basic) () (:methods - (progress-list-method-9 () none) + (progress-list-method-9 (_type_ int) game-task-info) ) ) @@ -122,41 +122,43 @@ (progress-id uint32) (lock-tick-count int32) ) + (:state-methods + come-in + idle + go-away + gone + ) (:methods - (progress-method-20 () none) - (progress-method-21 () none) - (progress-method-22 () none) - (progress-method-23 () none) - (progress-method-24 () none) - (progress-method-25 () none) - (progress-method-26 () none) - (progress-method-27 () none) - (progress-method-28 () none) - (progress-method-29 () none) - (progress-method-30 () none) - (progress-method-31 () none) - (progress-method-32 () none) - (progress-method-33 () none) - (progress-method-34 () none) - (progress-method-35 () none) - (progress-method-36 () none) - (progress-method-37 () none) - (progress-method-38 () none) - (progress-method-39 () none) - (progress-method-40 () none) - (progress-method-41 () none) - (progress-method-42 () none) - (progress-method-43 () none) - (progress-method-44 () none) - (progress-method-45 () none) - (progress-method-46 () none) - (progress-method-47 () none) - (progress-method-48 () none) - (progress-method-49 () none) - (progress-method-50 () none) - (progress-method-51 () none) - (progress-method-52 () none) - (progress-method-53 () none) + (init-defaults (_type_) object) + (respond-to-cpad (_type_) none) + (gone? (_type_) object) + (can-go-back? (_type_) symbol) + (get-state-check-card (_type_ symbol) symbol) + (push-state (_type_) int) + (pop-state (_type_) int) + (set-next-state (_type_ symbol int) int) + (set-menu-options (_type_ symbol) int) + (progress-method-33 (_type_ progress-box) none) + (progress-method-34 (_type_) none) + (get-scissor-stack-top (_type_) vector) + (get-language-by-idx (_type_ int) int) + (progress-method-37 (_type_) none) + (progress-method-38 (_type_ font-context float) none) + (progress-method-39 (_type_) none) + (progress-method-40 (_type_ font-context int int float) none) + (progress-method-41 (_type_ progress-box float) none) + (progress-method-42 (_type_ progress-box float) none) + (progress-method-43 (_type_ progress-box float) none) + (progress-method-44 (_type_ font-context string) none) + (progress-method-45 (_type_ font-context float float string float float int) float) + (progress-method-46 (_type_ font-context float int) none) + (progress-method-47 (_type_ font-context symbol symbol) none) + (draw-prev-next-footer (_type_ font-context float) none) + (draw-yes-no-style-footer (_type_ font-context text-id text-id) none) + (progress-method-50 (_type_ font-context text-id text-id text-id symbol symbol float) none) + (progress-method-51 (_type_ font-context) none) + (progress-method-52 (_type_ font-context string float float float float float) none) + (progress-method-53 (_type_ font-context) none) ) ) @@ -325,7 +327,7 @@ ((icons progress-icon-part :dynamic :offset 16) ) (:methods - (progress-icon-array-method-9 () none) + (draw-icon-array! (_type_ int int float float rgba float) none) ) ) @@ -352,8 +354,8 @@ (box hud-box 1 :inline) ) (:methods - (menu-option-method-9 () none) - (menu-option-method-10 () none) + (respond-progress (_type_ progress symbol) int) + (draw-option (_type_ progress font-context int symbol) none) (menu-option-method-11 () none) ) ) @@ -1081,10 +1083,10 @@ (icon-offsety float) ) (:methods - (highscore-page-info-method-9 () none) - (highscore-page-info-method-10 () none) - (highscore-page-info-method-11 () none) - (highscore-page-info-method-12 () none) + (highscore-page-info-method-9 (_type_ progress font-context float float) none) + (highscore-page-info-method-10 (_type_ font-context float float float) none) + (highscore-page-info-method-11 (_type_ font-context int float float float) none) + (highscore-time->string (_type_ float) string) ) ) @@ -1112,11 +1114,11 @@ ((current-index float) (target-index float) (num-pages int32) - (pages highscore-page-info 16) - (info basic) + (pages paged-menu-option 16) + (info (array highscore-page-info)) ) (:methods - (menu-highscores-option-method-12 () none) + (menu-highscores-option-method-12 (_type_) int) ) ) @@ -1149,7 +1151,7 @@ (vehicle game-vehicles) ) (:methods - (controls-string-info-method-9 () none) + (controls-string-info-method-9 (_type_ progress font-context float float float float float) none) ) ) @@ -1178,14 +1180,14 @@ (current-index float) (target-index float) (num-text int32) - (on-screen basic) - (text text-id 9) + (on-screen symbol) + (text game-text 9) (strings (array controls-string-info)) ) (:methods - (controls-page-info-method-9 () none) - (controls-page-info-method-10 () none) - (controls-page-info-method-11 () none) + (init-text! (_type_) int) + (controls-page-info-method-10 (_type_) none) + (controls-page-info-method-11 (_type_ progress font-context float float) none) ) ) @@ -1215,10 +1217,10 @@ ((current-index float) (target-index float) (pages controls-page-info 7 :offset 76) - (info basic) + (info (array controls-page-info)) ) (:methods - (menu-controls-option-method-12 () none) + (menu-controls-option-method-12 (_type_) int) ) ) @@ -1256,8 +1258,8 @@ (flags secret-item-option-flags) ) (:methods - (secret-item-option-method-12 () none) - (secret-item-option-method-13 () none) + (secret-item-option-method-12 (_type_) int) + (secret-item-option-method-13 (_type_) game-vehicles) ) ) @@ -1641,8 +1643,8 @@ (item game-items) ) (:methods - (inventory-item-method-9 () none) - (inventory-item-method-10 () none) + (item-obtained? (_type_) symbol) + (inventory-item-method-10 (_type_ progress font-context float float symbol) none) ) ) @@ -1673,8 +1675,8 @@ (items (array inventory-item)) ) (:methods - (inventory-item-group-method-9 () none) - (inventory-item-group-method-10 () none) + (have-items? (_type_) symbol) + (inventory-item-group-method-10 (_type_ progress font-context float float int) none) ) ) @@ -1702,7 +1704,7 @@ (groups (array inventory-item-group)) ) (:methods - (inventory-screen-method-9 () none) + (inventory-screen-method-9 (_type_ progress font-context float float) none) ) ) diff --git a/test/decompiler/reference/jak3/engine/ui/progress/progress-static_REF.gc b/test/decompiler/reference/jak3/engine/ui/progress/progress-static_REF.gc index 6ed1cc20ce..620d1710e2 100644 --- a/test/decompiler/reference/jak3/engine/ui/progress/progress-static_REF.gc +++ b/test/decompiler/reference/jak3/engine/ui/progress/progress-static_REF.gc @@ -1179,9 +1179,12 @@ ) ;; definition for symbol *stereo-mode-name-remap*, type (array text-id) -(define *stereo-mode-name-remap* - (new 'static 'boxed-array :type text-id (text-id text-0005) (text-id text-0006) (text-id text-0007)) - ) +(define *stereo-mode-name-remap* (new 'static 'boxed-array :type text-id + (text-id progress-sound-mono) + (text-id progress-sound-stereo) + (text-id progress-sound-surround) + ) + ) ;; definition for symbol *hud-ring-graphic-remap*, type (array uint64) (define *hud-ring-graphic-remap* @@ -1198,9 +1201,9 @@ (new 'static 'boxed-array :type uint64 #x80 #x4 #x2 #x200 #x200 #x200 #x200 #x200 #x200 #x200) ) -;; definition for symbol *hud-ring-demo-shared-graphic-remap*, type array +;; definition for symbol *hud-ring-demo-shared-graphic-remap*, type (array uint64) (define *hud-ring-demo-shared-graphic-remap* - (the-as array (new 'static 'boxed-array :type uint64 #x80 #x8 #x4 #x2 #x200 #x200 #x200 #x200 #x200 #x200)) + (new 'static 'boxed-array :type uint64 #x80 #x8 #x4 #x2 #x200 #x200 #x200 #x200 #x200 #x200) ) ;; definition of type hud-scene-info @@ -3317,7 +3320,7 @@ :icon (inventory-icon pass-wascity) :icon-scale 1.0 :offset (new 'static 'vector2 :data (new 'static 'array float 2 0.225 0.05)) - :item (game-items pass-wascity) + :item (game-items pass-front-gate) ) ) ) @@ -3361,7 +3364,7 @@ :icon (inventory-icon pass-factory) :icon-scale 1.0 :offset (new 'static 'vector2 :data (new 'static 'array float 2 0.825 0.05)) - :item (game-items pass-factory) + :item (game-items cypher-gliph) ) ) ) @@ -3390,7 +3393,7 @@ :icon (inventory-icon artifact-beam-generator) :icon-scale 1.0 :offset (new 'static 'vector2 :data (new 'static 'array float 2 0.225 0.35)) - :item (game-items artifact-beam-generator) + :item (game-items artifact-av-generator) ) ) ) @@ -3405,7 +3408,7 @@ :icon (inventory-icon artifact-prism) :icon-scale 1.0 :offset (new 'static 'vector2 :data (new 'static 'array float 2 0.425 0.35)) - :item (game-items artifact-prism) + :item (game-items artifact-av-prism) ) ) ) @@ -3420,7 +3423,7 @@ :icon (inventory-icon artifact-quantum-reflector) :icon-scale 1.0 :offset (new 'static 'vector2 :data (new 'static 'array float 2 0.625 0.35)) - :item (game-items artifact-quantum-reflector) + :item (game-items artifact-av-reflector) ) ) ) @@ -3435,7 +3438,7 @@ :icon (inventory-icon artifact-time-map) :icon-scale 1.0 :offset (new 'static 'vector2 :data (new 'static 'array float 2 0.825 0.35)) - :item (game-items artifact-time-map) + :item (game-items artifact-av-map) ) ) ) diff --git a/test/decompiler/reference/jak3/engine/ui/progress/progress_REF.gc b/test/decompiler/reference/jak3/engine/ui/progress/progress_REF.gc new file mode 100644 index 0000000000..0ce1b2cf60 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/ui/progress/progress_REF.gc @@ -0,0 +1,4256 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(kmemopen global "progress-data") + +;; definition for symbol *progress-stack*, type (pointer uint8) +(define *progress-stack* (the-as (pointer uint8) (malloc 'global #x3800))) + +;; definition for symbol *progress-process*, type (pointer progress) +(define *progress-process* (the-as (pointer progress) #f)) + +;; definition for symbol *progress-save-info*, type mc-slot-info +(define *progress-save-info* (new 'global 'mc-slot-info)) + +;; definition for symbol *progress-work*, type progress-work +(define *progress-work* + (new 'static 'progress-work + :full-screen (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 :max (new 'static 'vector2 :data (new 'static 'array float 2 512.0 416.0))) + :color (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 :max (new 'static 'vector2 :data (new 'static 'array float 2 512.0 416.0))) + :color (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) + ) + ) + :small-screen (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 70.0 72.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 444.0 329.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 79.0 38.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 434.0 362.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) + ) + ) + :header (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 70.0 72.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 444.0 117.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 79.0 38.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 434.0 83.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + ) + :body (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 70.0 117.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 444.0 329.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 79.0 83.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 434.0 362.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + ) + :body-footer (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 70.0 117.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 444.0 304.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 79.0 83.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 434.0 337.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + ) + :footer (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 70.0 304.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 444.0 329.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 79.0 337.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 434.0 362.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + ) + :sub-header (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 70.0 117.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 444.0 145.0)) + ) + :color (new 'static 'vector4w :x #xc0 :y #xc0 :z 96 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 79.0 83.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 434.0 111.0)) + ) + :color (new 'static 'vector4w :x #xc0 :y #xc0 :z 96 :w #x80) + ) + ) + :sub-body (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 70.0 145.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 444.0 329.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 79.0 111.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 434.0 362.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + ) + :sub-body-footer (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 70.0 145.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 444.0 304.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 79.0 111.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 434.0 337.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + ) + :highscore-0 (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 70.0 117.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 444.0 165.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 79.0 83.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 434.0 131.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + ) + :highscore-1 (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 70.0 165.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 444.0 181.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 79.0 131.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 434.0 147.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + ) + :highscore-body (new 'static 'progress-box + :aspect4x3 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 70.0 181.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 444.0 304.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + :aspect16x9 (new 'static 'hud-box + :box (new 'static 'bounding-box2 + :min (new 'static 'vector2 :data (new 'static 'array float 2 79.0 147.0)) + :max (new 'static 'vector2 :data (new 'static 'array float 2 434.0 337.0)) + ) + :color (new 'static 'vector4w :x #x80 :y #x80 :z 64 :w #x80) + ) + ) + :last-slot-saved -1 + :secrets-unlocked #f + :hero-mode-save #f + ) + ) + +;; failed to figure out what this is: +(kmemclose) + +;; definition for function min-max-wrap-around +(defun min-max-wrap-around ((arg0 int) (arg1 int) (arg2 int)) + (let ((v1-2 (+ (- 1 arg1) arg2))) + (while (< arg0 arg1) + (+! arg0 v1-2) + ) + (while (< arg2 arg0) + (set! arg0 (- arg0 v1-2)) + ) + ) + arg0 + ) + +;; definition for function progress-intro-start +(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) + 0 + ) + +;; definition for method 24 of type progress +;; WARN: Return type mismatch int vs object. +(defmethod init-defaults ((this progress)) + (local-vars (v0-3 int)) + (set! (-> this total-num-tasks) 0) + (set! (-> this clear-screen) #f) + (set! (-> this scanlines-alpha) 0.0) + (set-time! (-> this start-time)) + (set! (-> this which-slot) (-> *progress-work* last-slot-saved)) + (set! (-> this yes-no-choice) #f) + (set-time! (-> this time-out)) + (set-time! (-> this last-sound)) + (set-time! (-> this last-move)) + (set! (-> this center-x-backup) (-> *setting-control* user-default screenx)) + (set! (-> this center-y-backup) (-> *setting-control* user-default screeny)) + (set! (-> this flip-horizontal) (the-as basic (-> *setting-control* cam-default flip-horizontal))) + (set! (-> this flip-vertical) (the-as basic (-> *setting-control* cam-default flip-vertical))) + (set! (-> this progressive-scan) (the-as basic (-> *setting-control* user-default set-video-mode))) + (set! (-> this aspect-ratio) (the-as basic (get-aspect-ratio))) + (set! (-> this video-mode) (the-as basic (get-video-mode))) + (set! (-> this stereo-mode-backup) (-> *setting-control* user-default stereo-mode)) + (set! (-> this vibrations) (the-as basic (-> *setting-control* user-default vibration))) + (set! (-> this subtitles) (the-as basic (-> *setting-control* user-default subtitle))) + (set! (-> this language-index) (the-as int (-> *setting-control* user-default language))) + (set! (-> this subtitle-language-index) (the-as int (-> *setting-control* user-default subtitle-language))) + (set! (-> this audio-language-index) (the-as int (-> *setting-control* user-default audio-language))) + (set! (-> (the-as menu-missions-option (-> *missions-options* options 0)) current-index) 0.0) + (set! (-> (the-as menu-missions-option (-> *missions-options* options 0)) target-index) 0.0) + (set! (-> *progress-work* secrets-unlocked) #f) + (set! (-> *progress-work* hero-mode-save) #f) + (set-setting-by-param *setting-control* 'extra-bank '((force2 menu1)) 0 0) + (cond + ((or (nonzero? (-> *setting-control* user-current subtitle-language)) + (nonzero? (-> *setting-control* user-current language)) + (nonzero? (-> *setting-control* user-current audio-language)) + ) + (set! v0-3 11) + (set! (-> *unlocked-secrets* options length) v0-3) + ) + (else + (set! v0-3 12) + (set! (-> *unlocked-secrets* options length) v0-3) + ) + ) + v0-3 + ) + +;; definition of type hud-ring-cell +(deftype hud-ring-cell (process-drawable) + ((parent (pointer progress) :override) + (joint-idx int32) + (init-angle float) + (graphic-index int32) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type hud-ring-cell +(defmethod inspect ((this hud-ring-cell)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tjoint-idx: ~D~%" (-> this joint-idx)) + (format #t "~2Tinit-angle: ~f~%" (-> this init-angle)) + (format #t "~2Tgraphic-index: ~D~%" (-> this graphic-index)) + (label cfg-4) + this + ) + +;; definition for function hud-ring-cell-remap +(defun hud-ring-cell-remap ((arg0 hud-ring-cell)) + (let ((v1-0 *hud-ring-graphic-remap*)) + (when (not *cheat-mode*) + (case *kernel-boot-message* + (('quote 'kiosk) + (set! v1-0 *hud-ring-kiosk-graphic-remap*) + ) + (('quote 'demo) + (set! v1-0 *hud-ring-demo-graphic-remap*) + ) + (('quote 'demo-shared) + (set! v1-0 *hud-ring-demo-shared-graphic-remap*) + ) + ) + ) + (setup-masks + (-> arg0 draw) + (the-as int (-> v1-0 (mod (+ (-> arg0 graphic-index) (-> arg0 parent 0 graphic-index)) (-> v1-0 length)))) + 0 + ) + ) + (none) + ) + +;; definition for function hud-ring-cell-init-by-other +;; INFO: Used lq/sq +(defbehavior hud-ring-cell-init-by-other hud-ring-cell ((arg0 int) (arg1 float) (arg2 int)) + (set! (-> self root) (new 'process 'trsqv)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-hud-ring-part" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> self mask) (process-mask actor-pause)) + (set! (-> self joint-idx) arg0) + (set! (-> self init-angle) arg1) + (set! (-> self graphic-index) arg2) + (set! (-> self root trans quad) (-> self parent 0 root trans quad)) + (quaternion-copy! (-> self root quat) (-> self parent 0 root quat)) + (quaternion-normalize! (-> self root quat)) + (set! (-> self root scale quad) (-> self parent 0 root scale quad)) + (let ((gp-1 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *z-vector* (-> self init-angle)))) + (quaternion-normalize! gp-1) + (quaternion*! (-> self root quat) (-> self root quat) gp-1) + ) + (quaternion-normalize! (-> self root quat)) + (set-vector! (-> self draw color-mult) 0.8 0.8 0.8 1.0) + (logior! (-> self draw global-effect) (draw-control-global-effect title-light)) + (logior! (-> self draw status) (draw-control-status hud)) + (setup-masks (-> self draw) 1 0) + (setup-masks (-> self draw) 0 2046) + (hud-ring-cell-remap self) + (go-virtual idle) + ) + +;; failed to figure out what this is: +(defstate idle (hud-ring-cell) + :virtual #t + :code (behavior () + (ja :num-func num-func-identity :frame-num 0.0) + (sleep-code) + ) + :post (behavior () + (vector<-cspace! (-> self root trans) (-> self parent 0 node-list data (-> self joint-idx))) + (when (-> self parent 0 main-menu) + (setup-masks (-> self draw) 0 2046) + (hud-ring-cell-remap self) + ) + (when (= (-> self init-angle) 0.0) + (if (= (-> self parent 0 ring-angle) (-> self parent 0 ring-want-angle)) + (set-vector! (-> self draw color-mult) 1.2 1.2 1.2 1.0) + (set-vector! (-> self draw color-mult) 0.8 0.8 0.8 1.0) + ) + ) + (let* ((t9-3 quaternion-vector-angle!) + (a0-11 (new 'stack-no-clear 'quaternion)) + (a1-5 *z-vector*) + (f0-10 (-> self init-angle)) + (f1-2 (-> self parent 0 ring-angle)) + (gp-0 (t9-3 a0-11 a1-5 (+ f0-10 (- f1-2 (* (the float (the int (/ f1-2 6553.6))) 6553.6))))) + ) + (quaternion-normalize! gp-0) + (quaternion-copy! (-> self root quat) (-> self parent 0 root quat)) + (quaternion-normalize! (-> self root quat)) + (quaternion*! (-> self root quat) (-> self root quat) gp-0) + ) + (quaternion-normalize! (-> self root quat)) + (ja-post) + ) + ) + +;; definition for function progress-init-by-other +(defbehavior progress-init-by-other progress ((arg0 symbol)) + (set! (-> self progress-id) + (the-as uint (add-process *gui-control* self (gui-channel progress) (gui-action play) "progress" -99.0 0)) + ) + (disable-level-text-file-loading) + (logclear! (-> self mask) (process-mask menu progress actor-pause)) + (add-setting! 'process-mask 'set 0.0 (process-mask progress)) + (+! (-> self clock ref-count) -1) + (+! (-> *display* real-clock ref-count) 1) + (set! (-> self clock) (-> *display* real-clock)) + (apply-settings *setting-control*) + (set-blackout-frames 0) + (set! *pause-lock* #f) + (set! (-> self root) (new 'process 'trsqv)) + (matrix->quaternion (-> self root quat) (-> *math-camera* inv-camera-rot)) + (let ((a2-3 (quaternion-vector-angle! (new 'stack-no-clear 'quaternion) *y-vector* 32768.0))) + (quaternion*! (-> self root quat) (-> self root quat) a2-3) + ) + (quaternion-normalize! (-> self root quat)) + (quaternion-copy! (-> self init-quat) (-> self root quat)) + (set-vector! (-> self root scale) 0.09 0.09 0.09 1.0) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-hud-ring" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logior! (-> self draw global-effect) (draw-control-global-effect title-light)) + (logior! (-> self skel status) (joint-control-status sync-math)) + (set! (-> self state-pos) 0) + (set! (-> self menu-transition) 1.0) + (set! (-> self anim-frame) 0.0) + (set! (-> self pos-transition) 1.0) + (init-defaults self) + (set-next-state self arg0 0) + (set! (-> self starting-state) (the-as basic (-> self next))) + (set! (-> self current) (-> self next)) + (if (= arg0 'main) + (set! (-> self next) 'none) + ) + (set! (-> self ring-angle) 0.0) + (set! (-> self ring-want-angle) 0.0) + (set! (-> self want-option-index) 0) + (set! (-> self graphic-index) 0) + (set! (-> self swing) 0.0) + (set! (-> self main-menu) #f) + (set-menu-options self (-> self current)) + (logior! (-> self draw status) (draw-control-status hud)) + (set! (-> self option-index) 0) + (when (= (-> self current) 'title) + (mc-get-slot-info 0 *progress-save-info*) + (let ((v1-54 *progress-save-info*)) + (when (and v1-54 (= (-> v1-54 formatted) 1) (= (-> v1-54 inited) 1)) + (dotimes (a0-34 4) + (when (= (-> v1-54 file a0-34 present) 1) + (set! (-> self option-index) 1) + (set! (-> self next-option-index) 1) + ) + ) + ) + ) + ) + (let ((f30-0 -6571.804)) + (process-spawn hud-ring-cell 15 (* 0.0 f30-0) 0 :name "hud-ring-cell" :to self) + (process-spawn hud-ring-cell 9 f30-0 1 :name "hud-ring-cell" :to self) + (process-spawn hud-ring-cell 8 (* 2.0 f30-0) 2 :name "hud-ring-cell" :to self) + (process-spawn hud-ring-cell 7 (* 3.0 f30-0) 3 :name "hud-ring-cell" :to self) + (process-spawn hud-ring-cell 6 (* 4.0 f30-0) 4 :name "hud-ring-cell" :to self) + (process-spawn hud-ring-cell 16 (* -5.0 f30-0) 5 :name "hud-ring-cell" :to self) + (process-spawn hud-ring-cell 14 (* -4.0 f30-0) 6 :name "hud-ring-cell" :to self) + (process-spawn hud-ring-cell 13 (* -3.0 f30-0) 7 :name "hud-ring-cell" :to self) + (process-spawn hud-ring-cell 12 (* -2.0 f30-0) 8 :name "hud-ring-cell" :to self) + (process-spawn hud-ring-cell 11 (* -1.0 f30-0) 9 :name "hud-ring-cell" :to self) + ) + (clear *stdcon1*) + (enable-drawing *bigmap*) + (set-setting! 'scanlines 'abs 0.0 0) + (go-virtual come-in) + ) + +;; definition for function set-ring-position +;; INFO: Used lq/sq +(defun set-ring-position ((arg0 progress)) + (let ((s3-0 (new-stack-vector0)) + (s4-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (+! (-> s3-0 y) -8.0) + (case (get-aspect-ratio) + (('aspect4x3) + (position-in-front-of-screen! s4-0 12288.0 s3-0) + (position-in-front-of-screen! s5-0 -4096.0 s3-0) + ) + (else + (position-in-front-of-screen! s4-0 16384.0 s3-0) + (position-in-front-of-screen! s5-0 -18022.4 s3-0) + ) + ) + (vector-! s5-0 s5-0 s4-0) + (set! (-> arg0 root trans x) (+ (-> s4-0 x) (* (-> arg0 pos-transition) (-> s5-0 x)))) + (set! (-> arg0 root trans y) (+ (-> s4-0 y) (* (-> arg0 pos-transition) (-> s5-0 y)))) + (set! (-> arg0 root trans z) (+ (-> s4-0 z) (* (-> arg0 pos-transition) (-> s5-0 z)))) + ) + ) + +;; definition for function activate-progress +;; WARN: Return type mismatch int vs none. +(defun activate-progress ((arg0 process) (arg1 symbol)) + (when *target* + (when (progress-allowed?) + (when *progress-process* + (deactivate (-> *progress-process* 0)) + (set-menu-mode *blit-displays-work* #t) + ) + (set! *progress-process* + (process-spawn progress arg1 :name "progress" :to arg0 :stack (&-> *progress-stack* 14336)) + ) + (set-master-mode 'progress) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type progress +(defmethod deactivate ((this progress)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set! (-> *progress-work* hero-mode-save) #f) + (remove-setting-by-arg0 *setting-control* 'extra-bank) + (disable-drawing *bigmap*) + (set-menu-mode *blit-displays-work* #f) + (set! *progress-process* (the-as (pointer progress) #f)) + (enable-level-text-file-loading) + (persist-with-delay *setting-control* 'allow-progress (seconds 0.1) 'allow-progress #f 0.0 0) + (persist-with-delay *setting-control* 'allow-pause (seconds 0.1) 'allow-pause #f 0.0 0) + (call-parent-method this) + (none) + ) + +;; definition for function deactivate-progress +;; WARN: Return type mismatch int vs none. +(defun deactivate-progress () + (if *progress-process* + (deactivate (-> *progress-process* 0)) + ) + 0 + (none) + ) + +;; definition for function hide-progress-screen +;; WARN: Return type mismatch int vs none. +(defun hide-progress-screen () + (if (and *progress-process* (!= (-> *progress-process* 0 starting-state) 'title)) + (set-next-state (-> *progress-process* 0) 'go-away 0) + ) + 0 + (none) + ) + +;; definition for method 26 of type progress +(defmethod gone? ((this progress)) + (and *progress-process* + (-> *progress-process* 0 next-state) + (= (-> *progress-process* 0 next-state name) 'gone) + ) + ) + +;; definition for function progress-allowed? +(defun progress-allowed? () + (not (or (-> *setting-control* user-current talking) + (-> *setting-control* user-current movie) + (movie?) + (handle->process (-> *game-info* pov-camera-handle)) + (handle->process (-> *game-info* other-camera-handle)) + (< (-> *display* base-clock frame-counter) (-> *game-info* letterbox-time)) + (< (-> *display* base-clock frame-counter) (-> *game-info* blackout-time)) + (!= (-> *setting-control* user-current bg-a) 0.0) + (!= (-> *setting-control* user-current bg-a-force) 0.0) + (not (-> *setting-control* user-current allow-progress)) + (or (and (handle->process (-> *game-info* auto-save-proc)) + (not (send-event (handle->process (-> *game-info* auto-save-proc)) 'progress-allowed?)) + ) + (not *target*) + (= *cheat-mode* 'camera) + (= *master-mode* 'freeze) + *master-exit* + (not *common-text*) + (< (memory-free *nk-dead-pool*) #x8000) + ) + ) + ) + ) + +;; definition for method 27 of type progress +(defmethod can-go-back? ((this progress)) + (and (= (-> this menu-transition) 0.0) + (not (-> this selected-option)) + (!= (-> this current) 'loading) + (!= (-> this current) 'saving) + (!= (-> this current) 'formatting) + (!= (-> this current) 'creating) + (!= (-> this current) 'error-disc-removed) + (!= (-> this current) 'error-reading) + (!= (-> this current) 'card-removed) + (!= (-> this current) 'error-auto-saving) + (!= (-> this current) 'title) + (!= (-> this current) 'insufficient-space) + (!= (-> this current) 'secrets-insufficient-space) + (!= (-> this current) 'no-memory-card) + (!= (-> this current) 'icon-info) + (!= (-> this current) 'insert-card) + (!= (-> this current) 'progressive-mode-ok) + (!= (-> this current) 'video-mode-ok) + (!= (-> this current) 'progressive-mode-warning) + (!= (-> this current) 'video-mode-warning) + (!= (-> this current) 'select-kiosk-start-special) + (!= (-> this current) 'language-select) + ) + ) + +;; definition for method 28 of type progress +(defmethod get-state-check-card ((this progress) (arg0 symbol)) + (let ((v1-0 *progress-save-info*) + (v0-0 arg0) + ) + (when v1-0 + (when (and v1-0 (= (-> this menu-transition) 0.0)) + (case arg0 + (('insufficient-space 'no-memory-card 'unformatted-card) + (cond + ((zero? (-> v1-0 handle)) + (set! v0-0 'no-memory-card) + ) + ((zero? (-> v1-0 formatted)) + (cond + ((or (zero? (-> this state-pos)) (!= (-> this starting-state) 'title)) + (set! v0-0 'go-away) + ) + (else + (if (!= arg0 'unformatted-card) + (set! v0-0 'format-card) + ) + ) + ) + ) + ((and (zero? (-> v1-0 inited)) (< (-> v1-0 mem-actual) (-> v1-0 mem-required))) + (set! v0-0 'insufficient-space) + ) + ((or (zero? (-> this state-pos)) (!= (-> this starting-state) 'title)) + (set! v0-0 'go-away) + ) + ((-> *progress-work* hero-mode-save) + (set! v0-0 'select-save-hero) + ) + (else + (set! v0-0 'select-save) + ) + ) + ) + (('insert-card) + (if (= (-> v1-0 inited) 1) + (set! v0-0 'select-load) + ) + ) + ) + (cond + ((zero? (-> v1-0 handle)) + (cond + ((-> *setting-control* user-current auto-save) + (set! v0-0 'card-removed) + ) + (else + (case arg0 + (('select-load) + (set! v0-0 'insert-card) + ) + (('format-card + 'insufficient-space + 'unformatted-card + 'select-save + 'select-save-title + 'select-save-hero + 'create-game + 'already-exists + ) + (set! v0-0 'no-memory-card) + ) + ) + ) + ) + ) + ((zero? (-> v1-0 formatted)) + (case arg0 + (('select-load) + (set! v0-0 'insert-card) + ) + (('select-save 'select-save-title 'select-save-hero) + (set! v0-0 'format-card) + ) + ) + ) + ((zero? (-> v1-0 inited)) + (case arg0 + (('select-save 'select-save-title 'select-save-hero) + (if (>= (-> v1-0 mem-actual) (-> v1-0 mem-required)) + (set! v0-0 'create-game) + (set! v0-0 'insufficient-space) + ) + ) + (('select-load) + (set! v0-0 'insert-card) + ) + ) + ) + ) + ) + ) + v0-0 + ) + ) + +;; definition for method 29 of type progress +(defmethod push-state ((this progress)) + (let ((v1-0 (-> this state-pos))) + (cond + ((< v1-0 8) + (set! (-> this state-array v1-0) (-> this current)) + (set! (-> this option-index-stack v1-0) (-> this option-index)) + (set! (-> this state-pos) (+ v1-0 1)) + ) + (else + (format #t "ERROR: Can't push any more states on the state-array.~%") + ) + ) + ) + 0 + ) + +;; definition for method 30 of type progress +(defmethod pop-state ((this progress)) + (let ((v1-0 (-> this state-pos))) + (cond + ((> v1-0 0) + (let ((a2-0 (+ v1-0 -1))) + (set! (-> this state-pos) a2-0) + (set-next-state this (-> this state-array a2-0) (-> this option-index-stack a2-0)) + ) + ) + (else + (set-next-state this 'go-away 0) + ) + ) + ) + 0 + ) + +;; definition for method 31 of type progress +(defmethod set-next-state ((this progress) (arg0 symbol) (arg1 int)) + (set! (-> this clear-screen) #f) + (when (!= arg0 (-> this current)) + (set! (-> this selected-option) #f) + (set! (-> this yes-no-choice) #f) + (set! (-> this next-option-index) arg1) + (set! (-> this next) arg0) + (case (-> this next) + (('select-load 'select-save 'select-save-title 'select-save-hero) + (set! (-> this next) (get-state-check-card this (-> this next))) + ) + ) + (let ((v1-7 *progress-work*) + (a2-1 (-> this which-slot)) + ) + (case (-> this next) + (('main) + (set! (-> *progress-work* hero-mode-save) #f) + ) + (('creating) + (auto-save-command 'create-file 0 0 this #f) + ) + (('loading) + (set! (-> v1-7 last-slot-saved) a2-1) + (auto-save-command 'restore 0 a2-1 this #f) + (set! (-> (the-as menu-missions-option (-> *missions-options* options 0)) current-index) 0.0) + (set! (-> (the-as menu-missions-option (-> *missions-options* options 0)) target-index) 0.0) + ) + (('saving) + (set! (-> v1-7 last-slot-saved) a2-1) + (auto-save-command 'save 0 a2-1 this #f) + ) + (('formatting) + (auto-save-command 'format-card 0 0 this #f) + ) + (('select-save 'select-load) + (set! (-> this next-option-index) (max 0 (-> v1-7 last-slot-saved))) + ) + (('card-removed) + (set! (-> v1-7 last-slot-saved) 0) + 0 + ) + ) + ) + ) + 0 + ) + +;; definition for method 32 of type progress +(defmethod set-menu-options ((this progress) (arg0 symbol)) + (set! (-> this current-options) #f) + (case arg0 + (('go-away) + (go (method-of-object this go-away)) + ) + (('main) + (set! (-> this current-options) (cond + (*cheat-mode* + *main-options* + ) + ((kiosk?) + *main-kiosk-options* + ) + ((= *kernel-boot-message* 'demo) + *main-demo-options* + ) + ((= *kernel-boot-message* 'demo-shared) + *main-demo-shared-options* + ) + (else + *main-options* + ) + ) + ) + ) + (('options) + (set! (-> this current-options) *options-options*) + ) + (('controls) + (set! (-> (the-as paged-menu-option (-> *controls-options* options 0)) page-index) 0) + (set! (-> (the-as paged-menu-option (-> *controls-options* options 0)) prev-page-index) 0) + (set! (-> this current-options) *controls-options*) + ) + (('game-options) + (set! (-> this current-options) (cond + ((demo?) + (if (= (scf-get-territory) 1) + *game-options-demo* + *game-options-demo* + ) + ) + (else + *game-options* + ) + ) + ) + ) + (('graphic-options) + (set! (-> this current-options) + (if (or (= (scf-get-territory) 1) (and (= *progress-cheat* 'pal) (cpad-hold? 0 l2) (cpad-hold? 0 r2))) + *graphic-title-options-pal* + *graphic-options* + ) + ) + ) + (('sound-options) + (set! (-> this current-options) *sound-options*) + ) + (('picture-options) + (set! (-> this current-options) *picture-options*) + ) + (('camera-options) + (set! (-> this current-options) *camera-options*) + ) + (('select-load 'select-save) + (set! (-> this current-options) *load-save-options*) + ) + (('select-save-title) + (set! (-> this current-options) *save-options-title*) + ) + (('select-save-hero) + (logior! (-> *game-info* purchase-secrets) (game-secrets hero-mode)) + (set! (-> *progress-work* hero-mode-save) #t) + (set! (-> this current-options) *load-save-options*) + ) + (('hero-mode-message) + (set! (-> this current-options) *hero-mode-message-options*) + ) + (('loading 'saving 'creating 'formatting) + (set! (-> this current-options) *loading-options*) + ) + (('unformatted-card 'insufficient-space 'no-memory-card) + (set! (-> this current-options) *insufficient-space-options*) + ) + (('secrets-insufficient-space 'secrets-no-memory-card) + (set! (-> this current-options) *secrets-insufficient-space-options*) + ) + (('insert-card) + (set! (-> this current-options) *insert-card-options*) + ) + (('error-loading 'error-saving 'error-formatting 'error-creating) + (set! (-> this current-options) *error-loading-options*) + ) + (('error-auto-saving) + (set! (-> this current-options) *error-auto-saving-options*) + ) + (('card-removed) + (set! (-> this current-options) *card-removed-options*) + ) + (('error-disc-removed) + (set! (-> this current-options) *error-disc-removed-options*) + ) + (('error-reading) + (set! (-> this current-options) *error-reading-options*) + ) + (('icon-info) + (set! (-> this current-options) *icon-info-options*) + ) + (('format-card) + (set! (-> this current-options) *format-card-options*) + ) + (('already-exists) + (set! (-> this current-options) *already-exists-options*) + ) + (('create-game) + (set! (-> this current-options) *create-game-options*) + ) + (('video-mode-warning) + (set! (-> this current-options) *video-mode-warning-options*) + ) + (('video-mode-ok) + (set! (-> this current-options) *video-mode-ok-options*) + ) + (('progressive-mode-warning) + (set! (-> this current-options) *progressive-mode-warning-options*) + ) + (('progressive-mode-ok) + (set! (-> this current-options) *progressive-mode-ok-options*) + ) + (('language-select) + (set! (-> this current-options) *language-options*) + ) + (('title) + (set! (-> this current-options) *title*) + ) + (('title-options) + (set! (-> this current-options) *options-options*) + ) + (('select-start 'select-pre-start 'select-kiosk-start 'select-kiosk-start-special) + (set! (-> this current-options) *select-start-options*) + (set! (-> (the-as menu-select-start-option (-> *select-start-options* options 0)) current-index) 0.0) + (set! (-> (the-as menu-select-start-option (-> *select-start-options* options 0)) target-index) 0.0) + (set! (-> (the-as menu-select-start-option (-> *select-start-options* options 0)) selected-index) 0) + 0 + ) + (('select-scene) + (set! (-> this current-options) *select-scene-options*) + (set! (-> (the-as menu-select-scene-option (-> *select-scene-options* options 0)) current-index) 0.0) + (set! (-> (the-as menu-select-scene-option (-> *select-scene-options* options 0)) target-index) 0.0) + (set! (-> (the-as menu-select-scene-option (-> *select-scene-options* options 0)) selected-index) 0) + 0 + ) + (('select-scene-special) + (set! (-> this starting-state) (the-as basic 'title)) + (set! (-> this state-pos) 0) + (let ((v1-80 (-> this state-pos))) + (set! (-> this state-array v1-80) 'title) + (set! (-> this option-index-stack v1-80) 3) + (let ((v1-81 (+ v1-80 1))) + (set! (-> this state-array v1-81) 'unlocked-secrets) + (set! (-> this option-index-stack v1-81) (-> this option-index)) + (set! (-> this state-pos) (+ v1-81 1)) + ) + ) + (dotimes (s5-1 (-> this state-pos)) + (format #t "select-scene-special: ~S ~D~%" (-> this state-array s5-1) (-> this option-index-stack s5-1)) + ) + (set! (-> this current-options) *select-scene-options*) + ) + (('inventory) + (set! (-> this current-options) *inventory*) + ) + (('bigmap) + (set! (-> this current-options) *bigmap-options*) + ) + (('missions) + (set! (-> this missions-total-spacing) 0.0) + (set! (-> (the-as menu-missions-option (-> *missions-options* options 0)) current-index) 0.0) + (set! (-> (the-as menu-missions-option (-> *missions-options* options 0)) target-index) 0.0) + (set! (-> this current-options) *missions-options*) + ) + (('highscores) + (set! (-> this current-options) *highscores-options*) + ) + (('secret) + (set! (-> this secret-buying) #f) + (set! (-> this current-options) *secret-options*) + ) + (('quit-restart) + (set! (-> this current-options) *quit-restart-options*) + ) + (('unlocked-secrets) + (set! (-> this current-options) *unlocked-secrets*) + ) + ) + (when (= (-> this current-options) #f) + (format #t "Didn't find new menu settings!!~%") + (pop-state this) + ) + 0 + ) + +;; definition for method 25 of type progress +;; WARN: Return type mismatch int vs none. +(defmethod respond-to-cpad ((this progress)) + (mc-get-slot-info 0 *progress-save-info*) + (memcard-unlocked-secrets? this #f) + (when (= (-> this current) 'title) + (cond + ((-> *progress-work* secrets-unlocked) + (set! (-> this current-options) *title-secret*) + ) + (else + (set! (-> this current-options) *title*) + (set! (-> this option-index) (min 2 (-> this option-index))) + ) + ) + ) + (when (-> this current-options) + (let ((s5-0 (-> this current-options options))) + (when (and s5-0 (and (= (-> this menu-transition) 0.0) (< (-> this option-index) (-> s5-0 length)))) + (respond-progress + (-> s5-0 (-> this option-index)) + this + (and (= (-> this menu-transition) 0.0) (-> this selected-option)) + ) + (cond + ((-> this selected-option) + (cond + ((cpad-pressed? 0 confirm) + (sound-play "generic-beep") + (set! (-> this selected-option) #f) + ) + ((cpad-pressed? 0 triangle) + (if (= (-> this current-options) *main-options*) + (sound-play "window-contract") + (sound-play "generic-beep") + ) + (set! (-> this selected-option) #f) + ) + ) + ) + (else + (cond + ((or (cpad-pressed? 0 up l-analog-up) + (and (cpad-hold? 0 up l-analog-up) (time-elapsed? (-> this last-move) (seconds 0.175))) + ) + (set-time! (-> this last-move)) + (cond + ((= (-> this current-options) *main-options*) + (sound-play "ring-select") + ) + ((!= (length s5-0) 1) + (sound-play "roll-over") + ) + ) + (if (and (= *title* (-> this current-options)) + (not (-> *progress-work* secrets-unlocked)) + (zero? (-> this option-index)) + ) + (set! (-> this option-index) 3) + ) + (cond + ((> (-> this want-option-index) 0) + (set! (-> this want-option-index) -1) + ) + ((< -2 (-> this want-option-index)) + (+! (-> this want-option-index) -1) + ) + ) + ) + ((or (cpad-pressed? 0 down l-analog-down) + (and (cpad-hold? 0 down l-analog-down) (time-elapsed? (-> this last-move) (seconds 0.175))) + ) + (set-time! (-> this last-move)) + (cond + ((= (-> this current-options) *main-options*) + (sound-play "ring-select") + ) + ((!= (length s5-0) 1) + (sound-play "roll-over") + ) + ) + (cond + ((< (-> this want-option-index) 0) + (set! (-> this want-option-index) 1) + ) + ((< (-> this want-option-index) 2) + (+! (-> this want-option-index) 1) + ) + ) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (if (not (-> this clear-screen)) + (sound-play "generic-beep") + ) + (set! (-> this selected-option) #t) + ) + ((cpad-pressed? 0 triangle) + (when (can-go-back? this) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) + (if (= (-> this state-pos) 1) + (sound-play "window-contract") + (sound-play "generic-beep") + ) + (pop-state this) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function progress-trans +;; WARN: Return type mismatch int vs none. +(defbehavior progress-trans progress () + (cond + ((and (= (-> self next) 'none) (or (= (-> self starting-state) 'main) (= (-> self anim-frame) 1.0))) + (set! (-> self menu-transition) + (seek-ease + (-> self menu-transition) + 0.0 + (* 0.1 (-> self clock time-adjust-ratio)) + 0.4 + (* 0.01 (-> self clock time-adjust-ratio)) + ) + ) + ) + (else + (seek! (-> self menu-transition) 1.0 (* 0.1 (-> self clock time-adjust-ratio))) + (when (and (= (-> self menu-transition) 1.0) + (or (and (nonzero? (-> self state-pos)) (= (-> self anim-frame) 1.0)) + (or (and (zero? (-> self state-pos)) (= (-> self anim-frame) 0.0)) + (and (!= (-> self starting-state) 'main) (!= (-> self next) 'none)) + ) + ) + ) + (set! (-> self current) (-> self next)) + (set! (-> self next) 'none) + (set! (-> self option-index) (-> self next-option-index)) + (set! (-> self want-option-index) 0) + (set-menu-options self (-> self current)) + (set! (-> self scanlines-alpha) 0.0) + ) + ) + ) + (set! (-> self main-menu) + (and (zero? (-> self state-pos)) (and (= (-> self menu-transition) 0.0) + (= (-> self next) 'none) + (or (= (-> self state-array 0) 'main) (= (-> self current) 'main)) + ) + ) + ) + (when *cheat-mode* + (when (zero? (-> self state-pos)) + (cond + ((and (cpad-hold? 0 l2) (cpad-hold? 0 r1)) + (when (= (-> self current-options) *main-options*) + (set! (-> *progress-work* secrets-unlocked) (the-as basic #t)) + (set! (-> *progress-work* selected-num) 0) + (set! (-> self current-options) *main-options-debug*) + ) + ) + ((= (-> self current-options) *main-options-debug*) + (set! (-> self current-options) *main-options*) + ) + ) + ) + ) + (if (= (-> self ring-angle) (-> self ring-want-angle)) + (respond-to-cpad self) + ) + (let ((f30-0 (* 0.005 (-> self clock time-adjust-ratio)))) + (cond + ((= (-> self menu-transition) 1.0) + (if (and (zero? (-> self state-pos)) (= (-> self starting-state) 'main)) + (seek! (-> self anim-frame) 0.0 (* 0.02 (-> self clock time-adjust-ratio))) + (seek! (-> self anim-frame) 1.0 (* 0.02 (-> self clock time-adjust-ratio))) + ) + (let ((f0-27 (if (and (zero? (-> self state-pos)) (!= (-> self starting-state) 'title)) + 0.0 + 0.2 + ) + ) + ) + (when (= (-> self next) 'bigmap) + (set! f0-27 0.4) + (set! f30-0 (* 0.008 (-> self clock time-adjust-ratio))) + ) + (seek! (-> self pos-transition) f0-27 f30-0) + ) + ) + ((zero? (-> self state-pos)) + (if (= (-> self current) 'bigmap) + (set! f30-0 (* 0.05 (-> self clock time-adjust-ratio))) + ) + (if (!= (-> self starting-state) 'title) + (seek! (-> self pos-transition) 0.0 f30-0) + ) + ) + ) + ) + (if (!= (-> self starting-state) 'main) + (set! (-> self pos-transition) 0.2) + ) + (set-ring-position self) + (when (= (-> self ring-angle) (-> self ring-want-angle)) + (cond + ((< (-> self want-option-index) 0) + (cond + ((and (= *cheat-mode* #f) (or (demo?) (kiosk?))) + (if (> (-> self option-index) 0) + (+! (-> self option-index) -1) + ) + ) + (else + (set! (-> self option-index) + (min-max-wrap-around (+ (-> self option-index) -1) 0 (+ (length (-> self current-options options)) -1)) + ) + ) + ) + (set! (-> self graphic-index) (-> self option-index)) + (+! (-> self want-option-index) 1) + ) + ((> (-> self want-option-index) 0) + (cond + ((and (= *cheat-mode* #f) (or (demo?) (kiosk?))) + (if (< (-> self option-index) (+ (length (-> self current-options options)) -1)) + (+! (-> self option-index) 1) + ) + ) + (else + (set! (-> self option-index) + (min-max-wrap-around (+ (-> self option-index) 1) 0 (+ (length (-> self current-options options)) -1)) + ) + ) + ) + (+! (-> self want-option-index) -1) + ) + ) + ) + (if (= (-> self anim-frame) 0.0) + (set! (-> self swing) (seek-ease + (-> self swing) + 4.0 + (* 0.05 (-> self clock time-adjust-ratio)) + 0.5 + (* 0.005 (-> self clock time-adjust-ratio)) + ) + ) + (set! (-> self swing) (seek-ease + (-> self swing) + 0.0 + (* 0.07 (-> self clock time-adjust-ratio)) + 0.5 + (* 0.007 (-> self clock time-adjust-ratio)) + ) + ) + ) + (when (-> self main-menu) + (set! (-> self ring-want-angle) (ceil (* 182.04445 (* 36.0 (the float (-> self option-index)))))) + (if (and (= (-> self ring-want-angle) 0.0) (< 32768.0 (-> self ring-angle))) + (set! (-> self ring-want-angle) 65536.0) + ) + (let ((f0-54 (- (-> self ring-want-angle) (-> self ring-angle)))) + (when (< 32768.0 (fabs f0-54)) + (if (< 0.0 f0-54) + (+! (-> self ring-angle) 65536.0) + (+! (-> self ring-angle) -65536.0) + ) + ) + ) + (seek! (-> self ring-angle) (-> self ring-want-angle) (* 910.2222 (-> self clock time-adjust-ratio))) + ) + (let ((gp-4 (quaternion-vector-angle! + (new 'stack-no-clear 'quaternion) + *x-vector* + (* 182.04445 (* (-> self swing) (sin (the float (* 40 (current-time)))))) + ) + ) + (s5-4 (quaternion-vector-angle! + (new 'stack-no-clear 'quaternion) + *y-vector* + (* 182.04445 (* (-> self swing) (sin (the float (* 0 (current-time)))))) + ) + ) + ) + (quaternion*! (-> self root quat) (-> self init-quat) gp-4) + (quaternion*! (-> self root quat) (-> self root quat) s5-4) + ) + (quaternion-normalize! (-> self root quat)) + (if (= (-> self ring-angle) (-> self ring-want-angle)) + (set! (-> self graphic-index) (-> self option-index)) + ) + (case *kernel-boot-message* + (('kiosk) + (if (and (nonzero? (-> self start-time)) + (>= (- (-> *display* real-clock frame-counter) (-> self start-time)) (seconds 60)) + (>= (- (-> *display* real-clock frame-counter) (-> *cpad-list* cpads 0 real-change-time)) (seconds 60)) + (or (can-go-back? self) (= (-> self current) 'select-kiosk-start-special)) + (not (handle->process (-> *game-info* auto-save-proc))) + ) + (initialize! *game-info* 'game (the-as game-save #f) (the-as string #f) (the-as resetter-spec #f)) + ) + ) + ) + 0 + (none) + ) + +;; definition for function begin-scan +(defun begin-scan ((arg0 hud-box) (arg1 progress)) + (cond + ((or (= (-> arg1 current) 'bigmap) (= (-> arg1 next) 'bigmap)) + (set! (-> arg0 box min x) 0.0) + (set! (-> arg0 box min y) 0.0) + (set! (-> arg0 box max x) 512.0) + (set! (-> arg0 box max y) 416.0) + ) + ((= (get-aspect-ratio) 'aspect16x9) + (set! (-> arg0 box min x) 79.0) + (set! (-> arg0 box min y) 38.0) + (set! (-> arg0 box max x) 434.0) + (set! (-> arg0 box max y) 362.0) + ) + (else + (set! (-> arg0 box min x) 70.0) + (set! (-> arg0 box min y) 72.0) + (set! (-> arg0 box max x) 444.0) + (set! (-> arg0 box max y) 329.0) + ) + ) + 0 + ) + +;; definition for function end-scan +(defun end-scan ((arg0 hud-box) (arg1 float)) + (with-dma-buffer-add-bucket ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id bucket582) + ) + (draw-scan-and-line arg0 s5-0 arg1) + ) + 0 + ) + +;; definition for method 33 of type progress +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod progress-method-33 ((this progress) (arg0 progress-box)) + (set! (-> this scissor-count) (min 7 (+ (-> this scissor-count) 1))) + (let ((s5-0 (-> this scissor-stack (-> this scissor-count))) + (gp-1 (if (= (get-aspect-ratio) 'aspect4x3) + (-> arg0 aspect4x3) + (-> arg0 aspect16x9) + ) + ) + ) + (set! (-> s5-0 quad) (-> (the-as vector gp-1) quad)) + (with-dma-buffer-add-bucket ((v1-12 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-hud-alpha) + ) + (dma-buffer-add-gs-set v1-12 + (scissor-1 + (new 'static 'gs-scissor + :scax0 (the int (-> (the-as hud-box gp-1) box min x)) + :scay0 (the int (-> (the-as hud-box gp-1) box min y)) + :scax1 (the int (-> (the-as hud-box gp-1) box max x)) + :scay1 (the int (-> (the-as hud-box gp-1) box max y)) + ) + ) + ) + ) + (with-dma-buffer-add-bucket ((v1-23 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id particles) + ) + (dma-buffer-add-gs-set v1-23 + (scissor-1 + (new 'static 'gs-scissor + :scax0 (the int (-> (the-as hud-box gp-1) box min x)) + :scay0 (the int (-> (the-as hud-box gp-1) box min y)) + :scax1 (the int (-> (the-as hud-box gp-1) box max x)) + :scay1 (the int (-> (the-as hud-box gp-1) box max y)) + ) + ) + ) + ) + (with-dma-buffer-add-bucket ((v1-34 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-pris2) + ) + (dma-buffer-add-gs-set v1-34 (scissor-1 (new 'static 'gs-scissor + :scax0 (the int (-> (the-as hud-box gp-1) box min x)) + :scay0 (the int (-> (the-as hud-box gp-1) box min y)) + :scax1 (the int (-> (the-as hud-box gp-1) box max x)) + :scay1 (the int (-> (the-as hud-box gp-1) box max y)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 34 of type progress +;; WARN: Return type mismatch int vs none. +(defmethod progress-method-34 ((this progress)) + (set! (-> this scissor-count) (max 0 (+ (-> this scissor-count) -1))) + (let ((gp-0 (-> this scissor-stack (-> this scissor-count)))) + (with-dma-buffer-add-bucket ((v1-10 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-hud-alpha) + ) + (dma-buffer-add-gs-set v1-10 + (scissor-1 + (new 'static 'gs-scissor + :scax0 (the int (-> gp-0 x)) + :scay0 (the int (-> gp-0 y)) + :scax1 (the int (-> gp-0 z)) + :scay1 (the int (-> gp-0 w)) + ) + ) + ) + ) + (with-dma-buffer-add-bucket ((v1-21 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id particles) + ) + (dma-buffer-add-gs-set v1-21 + (scissor-1 + (new 'static 'gs-scissor + :scax0 (the int (-> gp-0 x)) + :scay0 (the int (-> gp-0 y)) + :scax1 (the int (-> gp-0 z)) + :scay1 (the int (-> gp-0 w)) + ) + ) + ) + ) + (with-dma-buffer-add-bucket ((v1-32 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id hud-draw-pris2) + ) + (dma-buffer-add-gs-set v1-32 (scissor-1 (new 'static 'gs-scissor + :scax0 (the int (-> gp-0 x)) + :scay0 (the int (-> gp-0 y)) + :scax1 (the int (-> gp-0 z)) + :scay1 (the int (-> gp-0 w)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 35 of type progress +(defmethod get-scissor-stack-top ((this progress)) + (-> this scissor-stack (-> this scissor-count)) + ) + +;; definition for function progress-post +;; INFO: Used lq/sq +;; WARN: Stack slot offset 212 signed mismatch +;; WARN: Stack slot offset 212 signed mismatch +;; WARN: Stack slot offset 212 signed mismatch +;; WARN: Stack slot offset 212 signed mismatch +;; WARN: Stack slot offset 212 signed mismatch +;; WARN: Stack slot offset 212 signed mismatch +;; WARN: Stack slot offset 212 signed mismatch +;; WARN: Return type mismatch int vs none. +(defbehavior progress-post progress () + (local-vars (sv-208 font-context) (sv-212 int) (sv-216 hud-box) (sv-220 symbol)) + (when (-> self current-options) + (progress-method-37 self) + (set! (-> self scissor-count) -1) + (progress-method-33 self (-> *progress-work* full-screen)) + (let ((gp-0 (-> self current-options options))) + (let ((s3-0 (-> self current-options y-center)) + (s5-0 (-> self current-options y-space)) + ) + (let ((s2-0 (new 'stack-no-clear 'matrix))) + (set! (-> s2-0 rvec quad) (the-as uint128 0)) + (set! (-> s2-0 uvec quad) (the-as uint128 0)) + (set! (-> s2-0 fvec quad) (the-as uint128 0)) + (set! (-> s2-0 trans quad) (the-as uint128 0)) + (let ((s4-0 *progress-work*)) + (mem-copy! (the-as pointer s2-0) (the-as pointer *font-default-matrix*) 64) + (set! sv-208 (new 'stack 'font-context s2-0 0 0 0.0 (font-color default) (font-flags shadow kerning))) + (set! sv-212 (- s3-0 (/ (* s5-0 (length gp-0)) 2))) + (set! sv-216 (new 'stack-no-clear 'hud-box)) + (set! sv-220 (and (!= (-> self current) 'main) (or (= (-> self next) 'none) (> (-> self state-pos) 0)))) + (progress-method-33 self (-> s4-0 small-screen)) + (when sv-220 + (begin-scan sv-216 self) + (let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> self menu-transition)))))) + (when (not (or (= (-> self current) 'bigmap) (= (-> self next) 'bigmap))) + (progress-method-43 self (-> s4-0 small-screen) (* 144.0 f30-0)) + (progress-method-41 self (-> s4-0 small-screen) (* 128.0 f30-0)) + ) + ) + ) + ) + ) + (if (or (= (-> self current-options) *title*) (= (-> self current-options) *options-options*)) + (+ s5-0 20) + ) + ) + (dotimes (s5-1 (length gp-0)) + (set! (-> self current-index) s5-1) + (let ((v1-43 sv-208)) + (set! (-> v1-43 scale) 0.5) + ) + (set! (-> sv-208 origin x) 70.0) + (set! (-> sv-208 origin y) (the float sv-212)) + (let ((v1-48 sv-208)) + (set! (-> v1-48 width) (the float 375)) + ) + (let ((v1-49 sv-208)) + (set! (-> v1-49 height) (the float 30)) + ) + (set! (-> sv-208 flags) (font-flags kerning middle middle-vert large)) + (let ((v1-51 sv-208)) + (set! (-> v1-51 color) (if (and (= s5-1 (-> self option-index)) (= (-> self menu-transition) 0.0)) + (font-color font-color-33) + (font-color font-color-32) + ) + ) + ) + (draw-option + (-> gp-0 s5-1) + self + sv-208 + s5-1 + (and (= (-> self menu-transition) 0.0) (-> self selected-option) (= s5-1 (-> self option-index))) + ) + ) + ) + (if sv-220 + (set! (-> self scanlines-alpha) (seek-ease + (-> self scanlines-alpha) + (- 1.0 (-> self menu-transition)) + (* 0.05 (-> self clock time-adjust-ratio)) + 0.3 + (* 0.001 (-> self clock time-adjust-ratio)) + ) + ) + ) + (progress-method-34 self) + (end-scan sv-216 (-> self scanlines-alpha)) + ) + (when (and (< 0.8 (-> self anim-frame)) (or (= (-> self current) 'bigmap) (= (-> self next) 'bigmap))) + (progress-method-33 self (-> *progress-work* full-screen)) + (cond + ((>= (-> self pos-transition) 0.38) + (let ((t9-15 (method-of-object *bigmap* bigmap-method-12))) + 1792 + 1840 + 2304 + 2256 + (t9-15) + ) + ) + (else + (let ((s4-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 21))) + (s3-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 24))) + (gp-1 (new 'stack-no-clear 'vector4w)) + ) + (set! (-> gp-1 quad) (the-as uint128 0)) + (let ((s5-2 (new 'stack-no-clear 'vector4w))) + (set! (-> s5-2 quad) (the-as uint128 0)) + (when (and (transform-point-qword! gp-1 s4-1) (transform-point-qword! s5-2 s3-1)) + (let ((t9-20 (method-of-object *bigmap* bigmap-method-12))) + (/ (-> s5-2 x) 16) + (/ (-> s5-2 y) 16) + (/ (-> gp-1 x) 16) + (/ (-> gp-1 y) 16) + (t9-20) + ) + ) + ) + ) + ) + ) + (progress-method-34 self) + ) + (ja-post) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate come-in (progress) + :virtual #t + :enter (behavior () + (set! (-> self pos-transition) 1.0) + (set! (-> self lock-tick-count) 0) + 0 + ) + :trans (behavior () + (let ((f30-0 (if (= (-> self starting-state) 'main) + 0.0 + 0.2 + ) + ) + ) + (when (hud-hidden?) + (set! (-> self pos-transition) (seek-ease + (-> self pos-transition) + f30-0 + (* 0.03 (-> self clock time-adjust-ratio)) + 0.4 + (* 0.003 (-> self clock time-adjust-ratio)) + ) + ) + (when (= (-> self lock-tick-count) 1) + (sound-play "ring-appear") + (set-menu-mode *blit-displays-work* #t) + ) + (+! (-> self lock-tick-count) 1) + ) + (set-ring-position self) + (when (= (-> self pos-transition) f30-0) + (set! (-> self start-time) (-> *display* real-clock frame-counter)) + (go-virtual idle) + ) + ) + ) + :code (behavior () + (until #f + (suspend) + (ja :num-func num-func-identity :frame-num 0.0) + (suspend) + ) + #f + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate idle (progress) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('notify) + (cond + ((= (-> block param 0) 'done) + (let ((t9-0 format) + (a0-3 #t) + (a1-1 "DONE NOTIFY: ~S ~S~%") + (v1-3 (-> block param 1)) + ) + (t9-0 + a0-3 + a1-1 + (cond + ((= v1-3 15) + "bad-version" + ) + ((= v1-3 13) + "no-save" + ) + ((= v1-3 10) + "no-last" + ) + ((= v1-3 14) + "no-space" + ) + ((= v1-3 4) + "internal-error" + ) + ((= v1-3 8) + "no-memory" + ) + ((= v1-3 2) + "bad-handle" + ) + ((zero? v1-3) + "busy" + ) + ((= v1-3 5) + "write-error" + ) + ((= v1-3 6) + "read-error" + ) + ((= v1-3 9) + "no-card" + ) + ((= v1-3 11) + "no-format" + ) + ((= v1-3 1) + "ok" + ) + ((= v1-3 16) + "no-process" + ) + ((= v1-3 17) + "no-auto-save" + ) + ((= v1-3 12) + "no-file" + ) + ((= v1-3 3) + "format-failed" + ) + ((= v1-3 7) + "new-game" + ) + (else + "*unknown*" + ) + ) + (-> self current) + ) + ) + (case (-> self current) + (('saving) + (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) + ) + ) + ) + (('formatting) + (set-next-state self 'creating 0) + ) + (('creating) + (cond + ((= (-> self state-array 0) 'title) + (set-next-state self 'select-save-title 0) + ) + ((-> *progress-work* hero-mode-save) + (set-next-state self 'select-save-hero 0) + ) + (else + (set-next-state self 'select-save 0) + ) + ) + ) + ) + ) + ((= (-> block param 0) 'error) + (let ((t9-9 format) + (a0-18 #t) + (a1-7 "ERROR NOTIFY: ~S ~S ~S~%") + (v1-20 (-> block param 1)) + ) + (t9-9 + a0-18 + a1-7 + (cond + ((= v1-20 15) + "bad-version" + ) + ((= v1-20 13) + "no-save" + ) + ((= v1-20 10) + "no-last" + ) + ((= v1-20 14) + "no-space" + ) + ((= v1-20 4) + "internal-error" + ) + ((= v1-20 8) + "no-memory" + ) + ((= v1-20 2) + "bad-handle" + ) + ((zero? v1-20) + "busy" + ) + ((= v1-20 5) + "write-error" + ) + ((= v1-20 6) + "read-error" + ) + ((= v1-20 9) + "no-card" + ) + ((= v1-20 11) + "no-format" + ) + ((= v1-20 1) + "ok" + ) + ((= v1-20 16) + "no-process" + ) + ((= v1-20 17) + "no-auto-save" + ) + ((= v1-20 12) + "no-file" + ) + ((= v1-20 3) + "format-failed" + ) + ((= v1-20 7) + "new-game" + ) + (else + "*unknown*" + ) + ) + (-> self current) + (-> self next) + ) + ) + (case (-> block param 1) + ((14) + (set-next-state self 'insufficient-space 0) + ) + (else + (case (-> self current) + (('formatting 'format-card) + (set-next-state self 'error-formatting 0) + ) + (('creating 'create-game) + (set-next-state self 'error-creating 0) + ) + (('saving 'select-save 'select-save-title 'select-save-hero 'already-exists) + (set-next-state self 'error-saving 0) + ) + (('loading 'select-load) + (set-next-state self 'error-loading 0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :enter (behavior () + (set! (-> self menu-transition) 1.0) + ) + :trans progress-trans + :code (behavior () + (until #f + (ja :num-func num-func-identity :frame-num (* 12.0 (-> self anim-frame))) + (suspend) + ) + #f + ) + :post progress-post + ) + +;; failed to figure out what this is: +(defstate go-away (progress) + :virtual #t + :enter (behavior () + (remove-setting-by-arg0 *setting-control* 'extra-bank) + (let ((v1-2 *blit-displays-work*)) + (set! (-> v1-2 progress-interp-dest) 0.0) + (set! (-> v1-2 progress-interp-speed) 0.022222223) + ) + ) + :trans (behavior () + (seek! (-> self anim-frame) 0.0 (* 0.02 (-> self clock time-adjust-ratio))) + (cond + ((= (-> self anim-frame) 0.0) + (seek! (-> self pos-transition) 1.0 (* 0.02 (-> self clock time-adjust-ratio))) + (if (= (-> self pos-transition) 1.0) + (go-virtual gone) + ) + ) + (else + (seek! (-> self pos-transition) 0.0 (* 0.02 (-> self clock time-adjust-ratio))) + ) + ) + (set-ring-position self) + ) + :code (behavior () + (let ((gp-0 #f)) + (until #f + (when (and (not gp-0) (= (-> self anim-frame) 0.0)) + (sound-play "ring-disappear") + (set! gp-0 #t) + ) + (ja :num-func num-func-identity :frame-num (* 12.0 (-> self anim-frame))) + (suspend) + ) + ) + #f + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate gone (progress) + :virtual #t + :code (behavior () + (disable-drawing *bigmap*) + (set-menu-mode *blit-displays-work* #f) + (while (or (-> *blit-displays-work* screen-copied) (nonzero? (-> *blit-displays-work* count-down))) + (suspend) + ) + (remove-setting! 'process-mask) + (set-master-mode *last-master-mode*) + (logior! (-> self mask) (process-mask sleep)) + (suspend) + 0 + ) + ) + +;; definition for method 9 of type menu-option +(defmethod respond-progress ((this menu-option) (arg0 progress) (arg1 symbol)) + 0 + ) + +;; definition for method 9 of type menu-slider-option +(defmethod respond-progress ((this menu-slider-option) (arg0 progress) (arg1 symbol)) + (with-pp + (when (bigmap-method-11 *bigmap*) + (let ((s5-0 (&+ (the-as (pointer float) *setting-control*) (-> this setting-offset))) + (s3-0 #f) + ) + (let ((f30-0 (* 0.02 (-> pp clock time-adjust-ratio))) + (f28-0 0.0) + ) + (when (type? this menu-picture-slider-option) + (set! f30-0 (* 0.005 (-> pp clock time-adjust-ratio))) + (set! f28-0 0.25) + ) + (cond + ((cpad-hold? 0 left l-analog-left) + (seek! (-> s5-0 0) f28-0 f30-0) + (if (!= (-> s5-0 0) 0.0) + (set! s3-0 #t) + ) + ) + ((cpad-hold? 0 right l-analog-right) + (seek! (-> s5-0 0) 1.0 f30-0) + (if (!= (-> s5-0 0) 1.0) + (set! s3-0 #t) + ) + ) + ) + ) + (when s3-0 + (let ((f30-1 1.0)) + (case (-> this name) + (((text-id progress-music-volume) (text-id progress-speech-volume)) + (set! f30-1 (-> s5-0 0)) + ) + ) + (when (< (seconds 0.03) (- (current-time) (-> arg0 last-sound))) + (set-time! (-> arg0 last-sound)) + (sound-play-by-name + (static-sound-name "menu-slide") + (new-sound-id) + (the int (* 1024.0 f30-1)) + 0 + 0 + (sound-group) + #t + ) + ) + ) + ) + ) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + ) + 0 + ) + ) + +;; definition for method 9 of type menu-stereo-mode-sound-option +(defmethod respond-progress ((this menu-stereo-mode-sound-option) (arg0 progress) (arg1 symbol)) + (when (bigmap-method-11 *bigmap*) + (let ((a0-2 (-> *setting-control* user-default stereo-mode)) + (v1-4 #f) + ) + (let ((a2-1 2)) + (cond + (arg1 + (cond + ((cpad-pressed? 0 left l-analog-left) + (set! (-> *setting-control* user-default stereo-mode) (min-max-wrap-around (+ a0-2 -1) 0 a2-1)) + (set! v1-4 #t) + ) + ((cpad-pressed? 0 right l-analog-right) + (set! (-> *setting-control* user-default stereo-mode) (min-max-wrap-around (+ a0-2 1) 0 a2-1)) + (set! v1-4 #t) + ) + ((cpad-pressed? 0 triangle) + (set! (-> *setting-control* user-default stereo-mode) (-> arg0 stereo-mode-backup)) + ) + ) + ) + (else + (if (cpad-pressed? 0 confirm) + (set! (-> arg0 stereo-mode-backup) (-> *setting-control* user-default stereo-mode)) + ) + ) + ) + ) + (if v1-4 + (sound-play "generic-beep") + ) + ) + ) + 0 + ) + +;; definition for method 9 of type menu-main-menu-option +(defmethod respond-progress ((this menu-main-menu-option) (arg0 progress) (arg1 symbol)) + (cond + ((cpad-pressed? 0 start) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) + (when (= (-> arg0 ring-angle) (-> arg0 ring-want-angle)) + (cond + ((= (-> this name) (text-id progress-exit-demo)) + (case *kernel-boot-message* + (('demo-shared) + (set! *master-exit* 'force) + (set-master-mode 'game) + ) + (('kiosk 'demo) + (set! (-> *game-info* mode) 'play) + (initialize! *game-info* 'game (the-as game-save #f) "title-restart" (the-as resetter-spec #f)) + ) + ) + ) + ((= (-> this name) (text-id progress-demo-return-to-title)) + (case *kernel-boot-message* + (('kiosk 'demo 'demo-shared) + (set! (-> *game-info* mode) 'play) + (initialize! *game-info* 'game (the-as game-save #f) "title-restart" (the-as resetter-spec #f)) + ) + ) + ) + ((or (= (-> this name) (text-id progress-scene-player-act-1)) + (= (-> this name) (text-id progress-scene-player-act-2)) + (= (-> this name) (text-id progress-scene-player-act-3)) + ) + (let ((v1-40 *progress-work*)) + (case (-> this name) + (((text-id progress-scene-player-act-2)) + (set! (-> v1-40 selected-num) 1) + ) + (((text-id progress-scene-player-act-3)) + (set! (-> v1-40 selected-num) 2) + ) + (else + (set! (-> v1-40 selected-num) 0) + 0 + ) + ) + ) + (sound-play "window-expand") + (push-state arg0) + (set-next-state arg0 (-> this next-state) 0) + ) + ((= (-> this next-state) 'back) + (pop-state arg0) + ) + ((= (-> this next-state) 'restart) + (sound-volume-off) + (restart-mission) + (pop-state arg0) + ) + (else + (sound-play "window-expand") + (push-state arg0) + (set-next-state arg0 (-> this next-state) 0) + ) + ) + ) + ) + ((not (-> arg0 selected-option)) + (let ((a0-59 (-> arg0 current-options options))) + (cond + ((or (cpad-pressed? 0 left l-analog-left) + (cpad-pressed? 0 l1) + (and (or (cpad-hold? 0 left l-analog-left) (cpad-hold? 0 l1)) + (time-elapsed? (-> arg0 last-move) (seconds 0.175)) + ) + ) + (set-time! (-> arg0 last-move)) + (if (!= (length a0-59) 1) + (sound-play "ring-select") + ) + (cond + ((> (-> arg0 want-option-index) 0) + (set! (-> arg0 want-option-index) -1) + ) + ((< -2 (-> arg0 want-option-index)) + (+! (-> arg0 want-option-index) -1) + ) + ) + ) + ((or (cpad-pressed? 0 right l-analog-right) + (and (cpad-pressed? 0 r1) (not (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons l2)))) + (and (or (cpad-hold? 0 right l-analog-right) + (and (cpad-hold? 0 r1) (not (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons l2)))) + ) + (time-elapsed? (-> arg0 last-move) (seconds 0.175)) + ) + ) + (set-time! (-> arg0 last-move)) + (if (!= (length a0-59) 1) + (sound-play "ring-select") + ) + (cond + ((< (-> arg0 want-option-index) 0) + (set! (-> arg0 want-option-index) 1) + ) + ((< (-> arg0 want-option-index) 2) + (+! (-> arg0 want-option-index) 1) + ) + ) + ) + ) + ) + ) + ) + 0 + ) + +;; definition for method 9 of type menu-sub-menu-option +(defmethod respond-progress ((this menu-sub-menu-option) (arg0 progress) (arg1 symbol)) + (let ((s4-0 *progress-work*)) + (when (and (not (-> s4-0 secrets-unlocked)) (or (= (-> arg0 current-options) *unlocked-secrets*) + (= (-> arg0 current-options) *select-scene-options*) + (= (-> arg0 current-options) *select-start-options*) + ) + ) + (set! (-> arg0 state-pos) 0) + (set-next-state arg0 'secrets-insufficient-space 0) + ) + (when (= (-> this name) (text-id progress-continue-without-save)) + (let ((a1-3 (get-state-check-card arg0 (-> arg0 current)))) + (set-next-state arg0 a1-3 0) + ) + ) + (when (and (= (-> this name) (text-id progress-secrets)) + (= *title* (-> arg0 current-options)) + (not (-> s4-0 secrets-unlocked)) + (= (-> arg0 option-index) 3) + ) + (set! (-> arg0 option-index) 0) + 0 + ) + ) + (when (cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (cond + ((= (-> this name) (text-id progress-exit-demo)) + (case *kernel-boot-message* + (('demo-shared) + (set! *master-exit* 'force) + (set-master-mode 'game) + ) + (('demo) + (set! (-> *game-info* mode) 'play) + (initialize! *game-info* 'game (the-as game-save #f) "title-restart" (the-as resetter-spec #f)) + ) + ) + ) + ((= (-> this name) (text-id progress-continue-without-save)) + (progress-intro-start) + ) + ((= (-> this next-state) 'back) + (pop-state arg0) + ) + (else + (sound-play "generic-beep") + (push-state arg0) + (set-next-state arg0 (-> this next-state) 0) + ) + ) + ) + 0 + ) + +;; definition for method 9 of type menu-unlocked-sub-menu-option +(defmethod respond-progress ((this menu-unlocked-sub-menu-option) (arg0 progress) (arg1 symbol)) + (let ((s3-0 (memcard-unlocked-secrets? arg0 #t)) + (s4-0 *progress-work*) + ) + (when (not (-> s4-0 secrets-unlocked)) + (set! (-> arg0 state-pos) 0) + (set-next-state arg0 'secrets-insufficient-space 0) + ) + (when (cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (cond + ((logtest? s3-0 (-> this mask)) + (sound-play "generic-beep") + (cond + ((logtest? (-> this mask) 254) + (set! (-> s4-0 selected-num) (-> this value)) + (push-state arg0) + (set-next-state arg0 (-> this next-state) 0) + ) + ((logtest? (-> this mask) 2048) + (initialize! *game-info* 'game (the-as game-save #f) "title-museum1" (the-as resetter-spec #f)) + (set-master-mode 'game) + ) + ((logtest? (-> this mask) 4096) + (initialize! *game-info* 'game (the-as game-save #f) "title-museum2" (the-as resetter-spec #f)) + (set-master-mode 'game) + ) + ((logtest? (-> this mask) 8192) + (initialize! *game-info* 'game (the-as game-save #f) "title-museum3" (the-as resetter-spec #f)) + (set-master-mode 'game) + ) + (#t + (persist-with-delay *setting-control* 'fail-music-volume (seconds 5) 'music-volume 'abs 0.0 0) + (persist-with-delay *setting-control* 'fail-sfx-volume (seconds 5) 'sfx-volume 'abs 0.0 0) + (persist-with-delay *setting-control* 'fail-dialog-volume (seconds 5) 'dialog-volume 'abs 0.0 0) + (set! (-> *setting-control* user-current sfx-volume) 0.01) + (set! (-> *setting-control* user-current dialog-volume) 0.01) + (set! (-> *setting-control* user-current music-volume) 0.01) + (cond + ((send-event (handle->process (-> *game-info* controller 0)) 'scrap-book (-> this value)) + (set-next-state arg0 (-> this next-state) 0) + ) + (else + (set! (-> *game-info* demo-state) (the-as uint (+ (-> this value) 200))) + (initialize! *game-info* 'game (the-as game-save #f) "title-scrapbook" (the-as resetter-spec #f)) + ) + ) + ) + ) + ) + (else + (sound-play "generic-beep" :pitch -0.6) + ) + ) + ) + ) + 0 + ) + +;; definition for method 9 of type menu-memcard-slot-option +(defmethod respond-progress ((this menu-memcard-slot-option) (arg0 progress) (arg1 symbol)) + (memcard-unlocked-secrets? arg0 #t) + (let ((a1-3 (get-state-check-card arg0 (-> arg0 current)))) + (set-next-state arg0 a1-3 0) + ) + (set! (-> arg0 selected-option) #f) + (when (bigmap-method-11 *bigmap*) + (cond + ((cpad-pressed? 0 triangle) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (let ((s5-0 #f)) + *progress-save-info* + (set! (-> arg0 which-slot) (-> arg0 option-index)) + (cond + ((= (-> arg0 current) 'select-load) + (when (= (-> *progress-save-info* file (-> arg0 option-index) present) 1) + (set! s5-0 #t) + (set-next-state arg0 'loading 0) + ) + ) + ((and (= (-> arg0 current) 'select-save-hero) + (-> *setting-control* user-default auto-save) + (= (-> *game-info* auto-save-card) (-> *progress-save-info* handle)) + (= (-> *game-info* auto-save-which) (-> arg0 which-slot)) + ) + (sound-play "generic-beep" :pitch -0.6) + ) + ((= (-> *progress-save-info* file (-> arg0 which-slot) present) 1) + (set! s5-0 #t) + (set-next-state arg0 'already-exists 0) + ) + (else + (set! s5-0 #t) + (set-next-state arg0 'saving 0) + ) + ) + (if s5-0 + (sound-play "generic-beep") + ) + ) + ) + ) + ) + 0 + ) + +;; definition for method 9 of type menu-already-exists-option +(defmethod respond-progress ((this menu-already-exists-option) (arg0 progress) (arg1 symbol)) + (let ((a1-2 (get-state-check-card arg0 'select-save)) + (gp-0 (the-as object #f)) + ) + (if (!= a1-2 'select-save) + (set-next-state arg0 a1-2 0) + ) + (cond + ((cpad-pressed? 0 left l-analog-left) + (set! gp-0 (not (-> arg0 yes-no-choice))) + (set! (-> arg0 yes-no-choice) (the-as basic #t)) + ) + ((cpad-pressed? 0 right l-analog-right) + (set! gp-0 (-> arg0 yes-no-choice)) + (set! (-> arg0 yes-no-choice) #f) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (cond + ((-> arg0 yes-no-choice) + (sound-play "generic-beep") + (set-next-state arg0 'saving 0) + ) + ((begin (sound-play "generic-beep") (= (-> arg0 state-array 0) 'title)) + (set-next-state arg0 'select-save-title 0) + ) + ((-> *progress-work* hero-mode-save) + (set-next-state arg0 'select-save-hero 0) + ) + (else + (set-next-state arg0 'select-save 0) + ) + ) + ) + ) + (if gp-0 + (sound-play "generic-beep") + ) + ) + 0 + ) + +;; definition for method 9 of type menu-create-game-option +(defmethod respond-progress ((this menu-create-game-option) (arg0 progress) (arg1 symbol)) + (let ((s4-0 (&-> arg0 yes-no-choice)) + (gp-0 (the-as object #f)) + ) + (let ((a1-2 (get-state-check-card arg0 'select-save))) + (if (!= a1-2 'select-save) + (set-next-state arg0 a1-2 0) + ) + ) + (cond + ((cpad-pressed? 0 left l-analog-left) + (set! gp-0 (not (-> s4-0 0))) + (set! (-> s4-0 0) (the-as basic #t)) + ) + ((cpad-pressed? 0 right l-analog-right) + (set! gp-0 (-> s4-0 0)) + (set! (-> s4-0 0) #f) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (cond + ((-> arg0 yes-no-choice) + (set-next-state arg0 'creating 0) + ) + ((= (-> arg0 state-array 0) 'title) + (sound-play "generic-beep") + (sound-volume-off) + (progress-intro-start) + ) + (else + (sound-play "generic-beep") + (pop-state arg0) + ) + ) + ) + ) + (if gp-0 + (sound-play "generic-beep") + ) + ) + 0 + ) + +;; definition for method 9 of type menu-insufficient-space-option +(defmethod respond-progress ((this menu-insufficient-space-option) (arg0 progress) (arg1 symbol)) + (let ((s5-0 (&-> arg0 yes-no-choice)) + (s4-0 (get-state-check-card arg0 'select-save)) + ) + (cond + ((or (= (-> arg0 starting-state) 'insufficient-space) (= (-> arg0 starting-state) 'no-memory-card)) + (cond + ((cpad-pressed? 0 left l-analog-left) + (when (and (not (-> s5-0 0)) (not (-> arg0 clear-screen))) + (sound-play "generic-beep") + (set! (-> s5-0 0) (the-as basic #t)) + ) + ) + ((cpad-pressed? 0 right l-analog-right) + (when (and (-> s5-0 0) (not (-> arg0 clear-screen))) + (sound-play "generic-beep") + (set! (-> s5-0 0) #f) + ) + ) + ((and (cpad-pressed? 0 confirm) (!= (-> arg0 current) 'none)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (set! (-> arg0 clear-screen) #t) + (cond + ((-> s5-0 0) + (sound-play "generic-beep") + (pop-state arg0) + ) + ((and (not (-> s5-0 0)) + (!= (get-state-check-card arg0 'select-save) 'insufficient-space) + (!= (get-state-check-card arg0 'select-save) 'no-memory-card) + ) + (pop-state arg0) + ) + (else + (sound-play "generic-beep") + (set-time! (-> arg0 last-move)) + (set! (-> arg0 current) 'none) + (set-next-state arg0 s4-0 0) + ) + ) + ) + ) + ) + (else + (let ((a1-9 'select-save)) + 'select-save + (cond + ((-> *progress-work* hero-mode-save) + (set! a1-9 'select-save-hero) + ) + ((and (= (-> arg0 starting-state) 'title) + (not (logtest? (-> *game-info* purchase-secrets) (game-secrets hero-mode))) + ) + (set! a1-9 'select-save-title) + ) + ) + (let ((a1-10 (get-state-check-card arg0 a1-9))) + (set-next-state arg0 a1-10 0) + ) + ) + (cond + ((and (cpad-pressed? 0 triangle) (or (= (-> arg0 starting-state) 'title) (= (-> arg0 starting-state) 'main))) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (cond + ((= (-> arg0 state-array 0) 'title) + (sound-play "generic-beep") + (sound-volume-off) + (progress-intro-start) + ) + (else + (sound-play "generic-beep") + (pop-state arg0) + ) + ) + ) + ) + ) + ) + ) + 0 + ) + +;; definition for method 9 of type menu-secrets-insufficient-space-option +(defmethod respond-progress ((this menu-secrets-insufficient-space-option) (arg0 progress) (arg1 symbol)) + (&-> arg0 yes-no-choice) + (cond + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (sound-play "generic-beep") + (set-next-state arg0 'title 0) + ) + ((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)) + ) + ) + 0 + ) + +;; definition for method 9 of type menu-hero-mode-message-option +(defmethod respond-progress ((this menu-hero-mode-message-option) (arg0 progress) (arg1 symbol)) + (&-> arg0 yes-no-choice) + (cond + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (sound-play "generic-beep") + (pop-state arg0) + ) + ((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)) + ) + ) + 0 + ) + +;; definition for method 9 of type menu-video-mode-warning-option +(defmethod respond-progress ((this menu-video-mode-warning-option) (arg0 progress) (arg1 symbol)) + (let ((gp-0 (&-> arg0 yes-no-choice))) + (cond + ((and (cpad-pressed? 0 left l-analog-left) (not (-> gp-0 0))) + (sound-play "generic-beep") + (set! (-> gp-0 0) (the-as basic #t)) + ) + ((and (cpad-pressed? 0 right l-analog-right) (-> gp-0 0)) + (sound-play "generic-beep") + (set! (-> gp-0 0) #f) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (set! (-> arg0 time-out) 0) + (cond + ((-> arg0 yes-no-choice) + (set! (-> *setting-control* user-default video-mode) (the-as symbol (-> arg0 video-mode))) + (set-time! (-> arg0 time-out)) + (set-next-state arg0 'video-mode-ok 0) + ) + (else + (set! (-> arg0 video-mode) (the-as basic 'pal)) + (pop-state arg0) + ) + ) + ) + ) + ) + 0 + ) + +;; definition for method 9 of type menu-video-mode-ok-option +(defmethod respond-progress ((this menu-video-mode-ok-option) (arg0 progress) (arg1 symbol)) + (let ((s5-0 (&-> arg0 yes-no-choice))) + (cond + ((and (cpad-pressed? 0 left l-analog-left) (not (-> s5-0 0))) + (sound-play "generic-beep") + (set! (-> s5-0 0) (the-as basic #t)) + ) + ((and (cpad-pressed? 0 right l-analog-right) (-> s5-0 0)) + (sound-play "generic-beep") + (set! (-> s5-0 0) #f) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (cond + ((-> arg0 yes-no-choice) + (sound-play "generic-beep") + ) + (else + (set! (-> arg0 video-mode) (the-as basic 'pal)) + (set! (-> *setting-control* user-default video-mode) (the-as symbol (-> arg0 video-mode))) + (sound-play "generic-beep") + ) + ) + (set! (-> arg0 time-out) 0) + (pop-state arg0) + ) + ) + ) + (when (and (nonzero? (-> arg0 time-out)) (< (seconds 10) (- (current-time) (-> arg0 time-out)))) + (set! (-> arg0 time-out) 0) + (set! (-> arg0 video-mode) (the-as basic 'pal)) + (set! (-> *setting-control* user-default video-mode) (the-as symbol (-> arg0 video-mode))) + (pop-state arg0) + ) + 0 + ) + +;; definition for method 9 of type menu-progressive-mode-warning-option +(defmethod respond-progress ((this menu-progressive-mode-warning-option) (arg0 progress) (arg1 symbol)) + (let ((s5-0 (&-> arg0 yes-no-choice))) + (cond + ((and (cpad-pressed? 0 left l-analog-left) (not (-> s5-0 0))) + (sound-play "generic-beep") + (set! (-> arg0 progressive-scan) (the-as basic #t)) + (set! (-> s5-0 0) (the-as basic #t)) + ) + ((and (cpad-pressed? 0 right l-analog-right) (-> s5-0 0)) + (sound-play "generic-beep") + (set! (-> arg0 progressive-scan) #f) + (set! (-> s5-0 0) #f) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (set! (-> arg0 time-out) 0) + (cond + ((-> arg0 yes-no-choice) + (sound-play "generic-beep") + (set-progressive-scan #t) + (set! (-> arg0 progressive-scan) (the-as basic #t)) + (set-time! (-> arg0 time-out)) + (set-next-state arg0 'progressive-mode-ok 0) + ) + (else + (set! (-> arg0 progressive-scan) #f) + (set-progressive-scan #f) + (pop-state arg0) + ) + ) + ) + ) + ) + 0 + ) + +;; definition for method 9 of type menu-progressive-mode-ok-option +(defmethod respond-progress ((this menu-progressive-mode-ok-option) (arg0 progress) (arg1 symbol)) + (let ((s5-0 (&-> arg0 yes-no-choice))) + (cond + ((and (cpad-pressed? 0 left l-analog-left) (not (-> s5-0 0))) + (sound-play "generic-beep") + (set! (-> s5-0 0) (the-as basic #t)) + ) + ((and (cpad-pressed? 0 right l-analog-right) (-> s5-0 0)) + (sound-play "generic-beep") + (set! (-> s5-0 0) #f) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (cond + ((not (-> arg0 yes-no-choice)) + (set! (-> *setting-control* user-default set-video-mode) #f) + (set! (-> arg0 progressive-scan) #f) + (sound-play "generic-beep") + ) + (else + (sound-play "generic-beep") + (set! (-> arg0 progressive-scan) (the-as basic #t)) + ) + ) + (set! (-> arg0 time-out) 0) + (pop-state arg0) + ) + ) + ) + (when (and (nonzero? (-> arg0 time-out)) (< (seconds 10) (- (current-time) (-> arg0 time-out)))) + (set! (-> arg0 time-out) 0) + (set! (-> *setting-control* user-default set-video-mode) #f) + (set-progressive-scan #f) + (pop-state arg0) + ) + 0 + ) + +;; definition for method 9 of type menu-card-removed-option +(defmethod respond-progress ((this menu-card-removed-option) (arg0 progress) (arg1 symbol)) + (when (cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (sound-play "generic-beep") + (pop-state arg0) + ) + 0 + ) + +;; definition for method 9 of type menu-insert-card-option +(defmethod respond-progress ((this menu-insert-card-option) (arg0 progress) (arg1 symbol)) + *progress-save-info* + (cond + ((= (get-state-check-card arg0 'select-load) 'select-load) + (set-next-state arg0 'select-load 0) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (sound-play "generic-beep") + (pop-state arg0) + ) + ) + 0 + ) + +;; definition for method 9 of type menu-error-loading-option +(defmethod respond-progress ((this menu-error-loading-option) (arg0 progress) (arg1 symbol)) + (when (cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (sound-play "generic-beep") + (pop-state arg0) + ) + 0 + ) + +;; definition for method 9 of type menu-error-auto-saving-option +(defmethod respond-progress ((this menu-error-auto-saving-option) (arg0 progress) (arg1 symbol)) + (when (cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (sound-play "generic-beep") + (pop-state arg0) + ) + 0 + ) + +;; definition for method 9 of type menu-error-disc-removed-option +(defmethod respond-progress ((this menu-error-disc-removed-option) (arg0 progress) (arg1 symbol)) + (when (cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (when (is-cd-in?) + (sound-play "generic-beep") + (pop-state arg0) + ) + ) + 0 + ) + +;; definition for method 9 of type menu-error-reading-option +(defmethod respond-progress ((this menu-error-reading-option) (arg0 progress) (arg1 symbol)) + (when (cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (sound-play "generic-beep") + (pop-state arg0) + ) + 0 + ) + +;; definition for method 9 of type menu-icon-info-option +(defmethod respond-progress ((this menu-icon-info-option) (arg0 progress) (arg1 symbol)) + (when (cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (sound-play "generic-beep") + (pop-state arg0) + ) + 0 + ) + +;; definition for method 9 of type menu-format-card-option +(defmethod respond-progress ((this menu-format-card-option) (arg0 progress) (arg1 symbol)) + (let ((s4-0 (&-> arg0 yes-no-choice)) + (gp-0 (the-as object #f)) + ) + (let ((a1-2 (get-state-check-card arg0 (-> arg0 current)))) + (set-next-state arg0 a1-2 0) + ) + (cond + ((cpad-pressed? 0 left l-analog-left) + (set! gp-0 (not (-> s4-0 0))) + (set! (-> s4-0 0) (the-as basic #t)) + ) + ((cpad-pressed? 0 right l-analog-right) + (set! gp-0 (-> s4-0 0)) + (set! (-> s4-0 0) #f) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (cond + ((-> arg0 yes-no-choice) + (sound-play "generic-beep") + (set-next-state arg0 'formatting 0) + ) + ((= (-> arg0 state-array 0) 'title) + (sound-play "generic-beep") + (sound-volume-off) + (progress-intro-start) + ) + (else + (sound-play "generic-beep") + (pop-state arg0) + ) + ) + ) + ) + (if gp-0 + (sound-play "generic-beep") + ) + ) + 0 + ) + +;; definition for method 9 of type menu-select-start-option +;; WARN: disable def twice: 259. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod respond-progress ((this menu-select-start-option) (arg0 progress) (arg1 symbol)) + (let ((gp-0 *progress-work*)) + (when (not (-> gp-0 secrets-unlocked)) + (set! (-> arg0 state-pos) 0) + (set-next-state arg0 'secrets-insufficient-space 0) + ) + (set! (-> *progress-list-level* mode) (-> arg0 current)) + (set! (-> *progress-list-level* act) (-> gp-0 selected-num)) + ) + (let ((gp-1 #f)) + (let ((v1-8 (+ (length *progress-list-level*) -1))) + (the float v1-8) + (cond + ((or (cpad-pressed? 0 up l-analog-up) + (and (cpad-hold? 0 up l-analog-up) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((v1-12 (max 0 (+ (-> this selected-index) -1)))) + (if (nonzero? (-> this selected-index)) + (set! gp-1 #t) + ) + (set! (-> this scroll-speed) 300.0) + (set! (-> this selected-index) v1-12) + (set! (-> this target-index) (fmin (-> this target-index) (the float (max 0 (+ v1-12 -1))))) + ) + ) + ((or (cpad-pressed? 0 down l-analog-down) + (and (cpad-hold? 0 down l-analog-down) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((a0-36 (min (+ (-> this selected-index) 1) v1-8))) + (if (!= (-> this selected-index) v1-8) + (set! gp-1 #t) + ) + (set! (-> this scroll-speed) 300.0) + (set! (-> this selected-index) a0-36) + (set! (-> this target-index) (fmax (-> this target-index) (the float (max 0 (+ a0-36 -4))))) + ) + ) + ((or (cpad-pressed? 0 left l-analog-left) + (and (cpad-hold? 0 left l-analog-left) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((v1-24 (max 0 (+ (-> this selected-index) -5)))) + (if (nonzero? (-> this selected-index)) + (set! gp-1 #t) + ) + (set! (-> this scroll-speed) 1000.0) + (set! (-> this selected-index) v1-24) + (set! (-> this target-index) (fmin (-> this target-index) (the float (max 0 (+ v1-24 -1))))) + ) + ) + ((or (cpad-pressed? 0 right l-analog-right) + (and (cpad-hold? 0 right l-analog-right) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((a0-69 (min (+ (-> this selected-index) 5) v1-8))) + (if (!= (-> this selected-index) v1-8) + (set! gp-1 #t) + ) + (set! (-> this scroll-speed) 1000.0) + (set! (-> this selected-index) a0-69) + (set! (-> this target-index) (fmax (-> this target-index) (the float (max 0 (+ a0-69 -4))))) + ) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (sound-play "generic-beep") + (let* ((s5-1 (progress-list-method-9 *progress-list-level* (-> this selected-index))) + (v1-42 (-> arg0 current)) + (s3-1 (cond + ((= v1-42 'select-pre-start) + (or (-> s5-1 play-continue) (-> s5-1 pre-play-continue)) + ) + ((or (= v1-42 'select-kiosk-start) (= v1-42 'select-kiosk-start-special)) + (-> s5-1 kiosk-play-continue) + ) + (else + (-> s5-1 play-continue) + ) + ) + ) + ) + (cond + ((and (or (demo?) (kiosk?)) + (or (= (-> arg0 current) 'select-kiosk-start) (= (-> arg0 current) 'select-kiosk-start-special)) + (= (status-of-level-and-borrows *level* 'title #f) 'active) + ) + (send-event (handle->process (-> *game-info* controller 0)) 'control-spec (get-play-list-idx s5-1)) + (set-master-mode 'game) + ) + (else + (let* ((s2-1 play-task) + (a0-104 (get-play-list-idx s5-1)) + (a1-40 'debug) + (v1-64 (-> arg0 current)) + (s4-2 (s2-1 + (the-as game-task a0-104) + a1-40 + (cond + ((= v1-64 'select-pre-start) + 'pre-play + ) + ((or (= v1-64 'select-kiosk-start) (= v1-64 'select-kiosk-start-special)) + 'kiosk + ) + (else + 'play + ) + ) + ) + ) + ) + (cond + ((pair? s3-1) + (start 'play (get-continue-by-name *game-info* s4-2)) + (process-spawn + scene-player + :init scene-player-init + (-> (the-as pair (-> (the-as pair s3-1) cdr)) car) + #t + s4-2 + :name "scene-player" + ) + ) + (else + (send-event (handle->process (-> *game-info* controller 0)) 'control-spec (get-play-list-idx s5-1)) + (start 'play (get-continue-by-name *game-info* s4-2)) + ) + ) + ) + (set-master-mode 'game) + ) + ) + ) + ) + ) + ) + (if gp-1 + (sound-play "secrets-scroll") + ) + ) + 0 + ) + +;; definition for method 9 of type menu-select-scene-option +(defmethod respond-progress ((this menu-select-scene-option) (arg0 progress) (arg1 symbol)) + (let* ((s4-0 *progress-work*) + (v1-0 (-> s4-0 selected-num)) + (s3-0 (cond + ((zero? v1-0) + *hud-select-scene-act1* + ) + ((= v1-0 1) + *hud-select-scene-act2* + ) + ((= v1-0 2) + *hud-select-scene-act3* + ) + (else + *hud-select-scene-commentary* + ) + ) + ) + ) + (when (not (-> s4-0 secrets-unlocked)) + (set! (-> arg0 state-pos) 0) + (set-next-state arg0 'secrets-insufficient-space 0) + ) + (let ((gp-0 #f)) + (let ((v1-7 (+ (length s3-0) -1))) + (the float v1-7) + (cond + ((or (cpad-pressed? 0 up l-analog-up) + (and (cpad-hold? 0 up l-analog-up) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((v1-11 (max 0 (+ (-> this selected-index) -1)))) + (if (nonzero? (-> this selected-index)) + (set! gp-0 #t) + ) + (set! (-> this scroll-speed) 300.0) + (set! (-> this selected-index) v1-11) + (set! (-> this target-index) (fmin (-> this target-index) (the float (max 0 (+ v1-11 -1))))) + ) + ) + ((or (cpad-pressed? 0 down l-analog-down) + (and (cpad-hold? 0 down l-analog-down) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((a0-36 (min (+ (-> this selected-index) 1) v1-7))) + (if (!= (-> this selected-index) v1-7) + (set! gp-0 #t) + ) + (set! (-> this scroll-speed) 300.0) + (set! (-> this selected-index) a0-36) + (set! (-> this target-index) (fmax (-> this target-index) (the float (max 0 (+ a0-36 -4))))) + ) + ) + ((or (cpad-pressed? 0 left l-analog-left) + (and (cpad-hold? 0 left l-analog-left) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((v1-23 (max 0 (+ (-> this selected-index) -5)))) + (if (nonzero? (-> this selected-index)) + (set! gp-0 #t) + ) + (set! (-> this scroll-speed) 1000.0) + (set! (-> this selected-index) v1-23) + (set! (-> this target-index) (fmin (-> this target-index) (the float (max 0 (+ v1-23 -1))))) + ) + ) + ((or (cpad-pressed? 0 right l-analog-right) + (and (cpad-hold? 0 right l-analog-right) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((a0-69 (min (+ (-> this selected-index) 5) v1-7))) + (if (!= (-> this selected-index) v1-7) + (set! gp-0 #t) + ) + (set! (-> this scroll-speed) 1000.0) + (set! (-> this selected-index) a0-69) + (set! (-> this target-index) (fmax (-> this target-index) (the float (max 0 (+ a0-69 -4))))) + ) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (sound-play "generic-beep") + (let ((s2-2 *display-profile*)) + (play-clean 'debug) + (set! *display-profile* s2-2) + ) + (set! (-> *game-info* mode) 'play) + (let ((s5-1 (-> s3-0 (-> this selected-index)))) + (set! (-> *game-info* demo-state) (the-as uint 100)) + (let ((v1-46 (-> s4-0 selected-num))) + (cond + ((zero? v1-46) + (logior! (-> *game-info* secrets) (game-secrets scene-player-1)) + ) + ((= v1-46 1) + (logior! (-> *game-info* secrets) (game-secrets scene-player-2)) + ) + ((= v1-46 2) + (logior! (-> *game-info* secrets) (game-secrets scene-player-3)) + ) + ((= v1-46 3) + (set! (-> *game-info* demo-state) (the-as uint 101)) + (logior! (-> *game-info* secrets) (game-secrets title-commentary)) + ) + ) + ) + (persist-with-delay *setting-control* 'fail-music-volume (seconds 5) 'music-volume 'abs 0.0 0) + (persist-with-delay *setting-control* 'fail-sfx-volume (seconds 5) 'sfx-volume 'abs 0.0 0) + (persist-with-delay *setting-control* 'fail-dialog-volume (seconds 5) 'dialog-volume 'abs 0.0 0) + (set! (-> *setting-control* user-current sfx-volume) 0.01) + (set! (-> *setting-control* user-current dialog-volume) 0.01) + (set! (-> *setting-control* user-current music-volume) 0.01) + (process-spawn scene-player :init scene-player-init (-> s5-1 info) #t (-> s5-1 continue) :name "scene-player") + ) + (set-master-mode 'game) + ) + ) + ) + (if gp-0 + (sound-play "secrets-scroll") + ) + ) + ) + 0 + ) + +;; definition for method 9 of type menu-bigmap-option +(defmethod respond-progress ((this menu-bigmap-option) (arg0 progress) (arg1 symbol)) + ((method-of-object *bigmap* bigmap-method-13)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + 0 + ) + +;; definition for method 9 of type menu-missions-option +(defmethod respond-progress ((this menu-missions-option) (arg0 progress) (arg1 symbol)) + (let ((v1-0 #f)) + (let ((f0-1 (the float (+ (-> arg0 total-num-tasks) -1)))) + (cond + ((or (cpad-pressed? 0 up l-analog-up) + (and (cpad-hold? 0 up l-analog-up) (= (-> this current-index) (-> this target-index))) + ) + (if (!= (-> this target-index) 0.0) + (set! v1-0 #t) + ) + (set! (-> this scroll-speed) 300.0) + (set! (-> this target-index) (fmax 0.0 (+ -1.0 (-> this target-index)))) + ) + ((and (not (-> this on-screen)) + (or (cpad-pressed? 0 down l-analog-down) + (and (cpad-hold? 0 down l-analog-down) (= (-> this current-index) (-> this target-index))) + ) + ) + (if (!= (-> this target-index) f0-1) + (set! v1-0 #t) + ) + (set! (-> this scroll-speed) 300.0) + (set! (-> this target-index) (fmin (+ 1.0 (-> this target-index)) f0-1)) + ) + ((or (cpad-pressed? 0 left l-analog-left) + (and (cpad-hold? 0 left l-analog-left) (= (-> this current-index) (-> this target-index))) + ) + (if (!= (-> this target-index) 0.0) + (set! v1-0 #t) + ) + (set! (-> this scroll-speed) 1000.0) + (set! (-> this target-index) (fmax 0.0 (+ -5.0 (-> this target-index)))) + ) + ((and (not (-> this on-screen)) + (or (cpad-pressed? 0 right l-analog-right) + (and (cpad-hold? 0 right l-analog-right) (= (-> this current-index) (-> this target-index))) + ) + ) + (if (!= (-> this target-index) f0-1) + (set! v1-0 #t) + ) + (set! (-> this scroll-speed) 1000.0) + (set! (-> this target-index) (fmin (+ 5.0 (-> this target-index)) f0-1)) + ) + ) + ) + (if v1-0 + (sound-play "mission-scroll") + ) + ) + 0 + ) + +;; definition for method 12 of type menu-highscores-option +(defmethod menu-highscores-option-method-12 ((this menu-highscores-option)) + (let ((v0-0 0)) + (dotimes (v1-0 16) + (let ((a1-2 (-> this info v1-0))) + (when (or (zero? (-> a1-2 secret)) (logtest? (-> *game-info* secrets) (-> a1-2 secret))) + (set! (-> this pages v0-0) (the-as paged-menu-option a1-2)) + (+! v0-0 1) + ) + ) + ) + (set! (-> this num-pages) v0-0) + v0-0 + ) + ) + +;; definition for method 9 of type menu-highscores-option +(defmethod respond-progress ((this menu-highscores-option) (arg0 progress) (arg1 symbol)) + (let ((f30-0 (the float (menu-highscores-option-method-12 this))) + (gp-0 #f) + ) + (let ((f0-1 0.0)) + (let ((f1-0 (-> this target-index))) + (set! (-> this target-index) (- f1-0 (* (the float (the int (/ f1-0 f30-0))) f30-0))) + ) + (cond + ((and (cpad-hold? 0 r1) (= (-> this current-index) (-> this target-index))) + (set! gp-0 #t) + (let ((f0-3 (+ 1.0 (-> this target-index)))) + (set! (-> this target-index) (- f0-3 (* (the float (the int (/ f0-3 f30-0))) f30-0))) + ) + (set! f0-1 182.04445) + ) + ((and (cpad-hold? 0 l1) (= (-> this current-index) (-> this target-index))) + (set! gp-0 #t) + (let ((f0-7 (+ -1.0 f30-0 (-> this target-index)))) + (set! (-> this target-index) (- f0-7 (* (the float (the int (/ f0-7 f30-0))) f30-0))) + ) + (set! f0-1 -182.04445) + ) + ) + (let* ((f28-0 (/ 65536.0 f30-0)) + (f1-17 (* 3.0 (seconds-per-frame) f28-0)) + (f0-9 (+ (* (-> this current-index) f28-0) f0-1)) + (f2-10 (* (-> this target-index) f28-0)) + (f0-11 (+ 65536.0 (deg-seek f0-9 f2-10 f1-17))) + ) + (set! (-> this current-index) (/ (- f0-11 (* (the float (the int (/ f0-11 65536.0))) 65536.0)) f28-0)) + ) + ) + (when (< (fabs (- (-> this current-index) (-> this target-index))) 0.01) + (let ((f0-17 (-> this target-index))) + (set! (-> this current-index) (- f0-17 (* (the float (the int (/ f0-17 f30-0))) f30-0))) + ) + ) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (if gp-0 + (sound-play "score-slide") + ) + ) + 0 + ) + +;; definition for method 9 of type controls-page-info +(defmethod init-text! ((this controls-page-info)) + (let ((v0-0 0)) + (dotimes (v1-0 (-> this strings length)) + (let ((a1-2 (-> this strings v1-0))) + (when (or (logtest? (-> *game-info* features) (-> a1-2 feature)) + (logtest? (-> *game-info* secrets) (-> a1-2 secret)) + (logtest? (-> *game-info* vehicles) (-> a1-2 vehicle)) + (and (zero? (-> a1-2 feature)) (zero? (-> a1-2 secret)) (zero? (-> a1-2 vehicle))) + ) + (set! (-> this text v0-0) (the-as game-text a1-2)) + (+! v0-0 1) + ) + ) + ) + (set! (-> this num-text) v0-0) + v0-0 + ) + ) + +;; definition for method 10 of type controls-page-info +;; WARN: Return type mismatch int vs none. +(defmethod controls-page-info-method-10 ((this controls-page-info)) + (let ((f0-1 (the float (max 0 (+ (init-text! this) -1)))) + (v1-3 #f) + ) + (set! (-> this target-index) (fmax 0.0 (fmin (-> this target-index) f0-1))) + (cond + ((and (not (-> this on-screen)) + (cpad-hold? 0 down l-analog-down) + (= (-> this current-index) (-> this target-index)) + ) + (if (!= (-> this target-index) f0-1) + (set! v1-3 #t) + ) + (set! (-> this target-index) (fmin (+ 1.0 (-> this target-index)) f0-1)) + ) + ((and (cpad-hold? 0 up l-analog-up) (= (-> this current-index) (-> this target-index))) + (if (!= (-> this target-index) 0.0) + (set! v1-3 #t) + ) + (set! (-> this target-index) (fmax 0.0 (+ -1.0 (-> this target-index)))) + ) + ) + (if v1-3 + (sound-play "score-slide") + ) + ) + 0 + (none) + ) + +;; definition for method 12 of type menu-controls-option +(defmethod menu-controls-option-method-12 ((this menu-controls-option)) + (let ((v0-0 0)) + (dotimes (v1-0 7) + (let ((a1-2 (-> this info v1-0))) + (when (or (logtest? (-> *game-info* features) (-> a1-2 feature)) + (logtest? (-> *game-info* secrets) (-> a1-2 secret)) + (logtest? (-> *game-info* vehicles) (-> a1-2 vehicle)) + (and (zero? (-> a1-2 feature)) (zero? (-> a1-2 secret)) (zero? (-> a1-2 vehicle))) + ) + (set! (-> this pages v0-0) a1-2) + (+! v0-0 1) + ) + ) + ) + (set! (-> this num-pages) v0-0) + v0-0 + ) + ) + +;; definition for method 9 of type menu-controls-option +(defmethod respond-progress ((this menu-controls-option) (arg0 progress) (arg1 symbol)) + (let ((f30-0 (the float (menu-controls-option-method-12 this))) + (s4-0 #f) + ) + (let ((f0-1 0.0)) + (let ((f1-0 (-> this target-index))) + (set! (-> this target-index) (- f1-0 (* (the float (the int (/ f1-0 f30-0))) f30-0))) + ) + (cond + ((and (cpad-hold? 0 r1) (= (-> this current-index) (-> this target-index))) + (let ((f0-3 (+ 1.0 (-> this target-index)))) + (set! (-> this target-index) (- f0-3 (* (the float (the int (/ f0-3 f30-0))) f30-0))) + ) + (set! f0-1 182.04445) + (set! s4-0 #t) + ) + ((and (cpad-hold? 0 l1) (= (-> this current-index) (-> this target-index))) + (let ((f0-7 (+ -1.0 f30-0 (-> this target-index)))) + (set! (-> this target-index) (- f0-7 (* (the float (the int (/ f0-7 f30-0))) f30-0))) + ) + (set! f0-1 -182.04445) + (set! s4-0 #t) + ) + ) + (let* ((f28-0 (/ 65536.0 f30-0)) + (f1-17 (* 3.0 (seconds-per-frame) f28-0)) + (f0-9 (+ (* (-> this current-index) f28-0) f0-1)) + (f2-10 (* (-> this target-index) f28-0)) + (f0-11 (+ 65536.0 (deg-seek f0-9 f2-10 f1-17))) + ) + (set! (-> this current-index) (/ (- f0-11 (* (the float (the int (/ f0-11 65536.0))) 65536.0)) f28-0)) + ) + ) + (when (< (fabs (- (-> this current-index) (-> this target-index))) 0.01) + (let ((f0-17 (-> this target-index))) + (set! (-> this current-index) (- f0-17 (* (the float (the int (/ f0-17 f30-0))) f30-0))) + ) + ) + (if (= (-> this current-index) (-> this target-index)) + (controls-page-info-method-10 (-> this pages (the int (-> this current-index)))) + ) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (if s4-0 + (sound-play "score-slide") + ) + ) + 0 + ) + +;; definition for method 9 of type menu-secret-option +(defmethod respond-progress ((this menu-secret-option) (arg0 progress) (arg1 symbol)) + (let ((gp-0 (the-as object #f))) + (the float (+ (-> *menu-secrets-array* length) -1)) + (let ((a0-1 (+ (-> *menu-secrets-array* length) -1)) + (v1-5 *menu-secrets-array*) + (s2-0 (the int (-> *game-info* skill))) + (s3-0 (-> *menu-secrets-array* (-> this selected-index))) + ) + (if (or (nonzero? (-> *setting-control* user-current subtitle-language)) + (nonzero? (-> *setting-control* user-current language)) + (nonzero? (-> *setting-control* user-current audio-language)) + ) + (+! a0-1 -1) + ) + (set! (-> this selected-index) (min (-> this selected-index) a0-1)) + (cond + ((-> this available-title) + (when (or (cpad-pressed? 0 confirm) (cpad-pressed? 0 triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) + (set! (-> this available-title) #f) + ) + ) + ((-> this buy-menu) + (cond + ((cpad-pressed? 0 left l-analog-left) + (set! gp-0 (not (-> arg0 yes-no-choice))) + (set! (-> arg0 yes-no-choice) (the-as basic #t)) + ) + ((cpad-pressed? 0 right l-analog-right) + (set! gp-0 (-> arg0 yes-no-choice)) + (set! (-> arg0 yes-no-choice) #f) + ) + ((cpad-pressed? 0 confirm) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (cond + ((-> arg0 yes-no-choice) + (secret-item-option-method-13 s3-0) + (set! (-> *game-info* skill) (- (-> *game-info* skill) (the float (-> s3-0 cost)))) + (sound-play "upgrade-buy") + (set! (-> this buy-menu) #f) + (cond + ((= (-> s3-0 secret) (game-secrets hero-mode)) + (set-next-state arg0 'select-save-hero 0) + ) + ((logtest? (-> s3-0 flags) (secret-item-option-flags sf2)) + (set! (-> this available-title) #t) + ) + ) + ) + (else + (sound-play "generic-beep") + (set! (-> this buy-menu) #f) + ) + ) + ) + ((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 "generic-beep") + (set! (-> this buy-menu) #f) + ) + ) + ) + (else + (cond + ((or (cpad-pressed? 0 up l-analog-up) + (and (cpad-hold? 0 up l-analog-up) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((a0-73 (max 1 (+ (-> this selected-index) -1)))) + (if (!= (-> this selected-index) 1) + (set! gp-0 #t) + ) + (if (logtest? (-> v1-5 a0-73 flags) (secret-item-option-flags sf0)) + (+! a0-73 -1) + ) + (set! (-> this selected-index) a0-73) + (set! (-> this target-index) (fmin (-> this target-index) (the float (max 0 (+ a0-73 -1))))) + ) + ) + ((or (cpad-pressed? 0 down l-analog-down) + (and (cpad-hold? 0 down l-analog-down) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((a1-51 (min (+ (-> this selected-index) 1) a0-1))) + (if (!= (-> this selected-index) a0-1) + (set! gp-0 #t) + ) + (if (logtest? (-> v1-5 a1-51 flags) (secret-item-option-flags sf0)) + (set! a1-51 (min (+ a1-51 1) a0-1)) + ) + (set! (-> this selected-index) a1-51) + (set! (-> this target-index) (fmax (-> this target-index) (the float (max 0 (+ a1-51 -3))))) + ) + ) + ((or (cpad-pressed? 0 left l-analog-left) + (and (cpad-hold? 0 left l-analog-left) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((a0-79 (max 1 (+ (-> this selected-index) -5)))) + (if (!= (-> this selected-index) 1) + (set! gp-0 #t) + ) + (if (logtest? (-> v1-5 a0-79 flags) (secret-item-option-flags sf0)) + (+! a0-79 -1) + ) + (set! (-> this selected-index) a0-79) + (set! (-> this target-index) (fmin (-> this target-index) (the float (max 0 (+ a0-79 -1))))) + ) + ) + ((or (cpad-pressed? 0 right l-analog-right) + (and (cpad-hold? 0 right l-analog-right) (time-elapsed? (-> arg0 last-move) (seconds 0.1))) + ) + (set-time! (-> arg0 last-move)) + (let ((a1-82 (min (+ (-> this selected-index) 5) a0-1))) + (if (!= (-> this selected-index) a0-1) + (set! gp-0 #t) + ) + (if (logtest? (-> v1-5 a1-82 flags) (secret-item-option-flags sf0)) + (set! a1-82 (min (+ a1-82 1) a0-1)) + ) + (set! (-> this selected-index) a1-82) + (set! (-> this target-index) (fmax (-> this target-index) (the float (max 0 (+ a1-82 -3))))) + ) + ) + ((and (cpad-pressed? 0 confirm) (= (-> this current-index) (-> this target-index))) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (let ((v1-112 (secret-item-option-method-12 s3-0))) + (cond + ((zero? v1-112) + (cond + ((>= s2-0 (-> s3-0 cost)) + (sound-play "generic-beep") + (set! (-> arg0 yes-no-choice) #f) + (set! (-> this buy-menu) #t) + ) + (else + (sound-play "generic-beep" :pitch -0.6) + ) + ) + ) + ((or (= v1-112 1) (= v1-112 2)) + (cond + ((logtest? (-> s3-0 flags) (secret-item-option-flags sf1)) + (set! (-> *game-info* secrets) + (logclear (logxor (-> *game-info* secrets) (the-as uint (-> s3-0 secret))) (-> s3-0 mask-secrets)) + ) + (sound-play "generic-beep") + ) + ((and (= (-> s3-0 secret) 1) (not (logtest? (-> *game-info* secrets) (game-secrets hero-mode)))) + (set! (-> *progress-work* hero-mode-save) #t) + (set-next-state arg0 'select-save-hero 0) + ) + ((logtest? (-> s3-0 flags) (secret-item-option-flags sf2)) + (set! (-> this available-title) #t) + (sound-play "generic-beep") + ) + (else + (sound-play "generic-beep" :pitch -0.6) + ) + ) + ) + ((or (= v1-112 3) (= v1-112 4) (= v1-112 5)) + (sound-play "generic-beep" :pitch -0.6) + ) + ) + ) + ) + ) + ) + ) + ) + (if gp-0 + (sound-play "mission-scroll") + ) + ) + 0 + ) + +;; definition for method 9 of type menu-game-option +(defmethod respond-progress ((this menu-game-option) (arg0 progress) (arg1 symbol)) + (-> arg0 vibrations) + (-> arg0 subtitles) + (load-level-text-files (the-as int (-> *setting-control* user-current language))) + (cond + (arg1 + (cond + ((cpad-pressed? 0 left l-analog-left) + (sound-play "generic-beep") + (case (-> this menu-option-type) + ((3) + (when (not (-> arg0 vibrations)) + (set! (-> *cpad-list* cpads 0 buzz-pause-val 0) (the-as uint 255)) + (set! (-> *cpad-list* cpads 0 buzz-pause-time) (the-as uint 15)) + ) + (set! (-> arg0 vibrations) (the-as basic #t)) + ) + ((4) + (set! (-> arg0 subtitles) (the-as basic #t)) + ) + ((5) + (set! (-> arg0 subtitle-language-index) (mod (+ (-> arg0 subtitle-language-index) 9) 10)) + (if (and (= (-> arg0 subtitle-language-index) 7) + (or (= (scf-get-territory) 1) + (and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language)) + ) + ) + (+! (-> arg0 subtitle-language-index) -1) + ) + (if (= (-> arg0 subtitle-language-index) 6) + (+! (-> arg0 subtitle-language-index) -2) + ) + ) + ((6) + (set! (-> arg0 language-index) (mod (+ (-> arg0 language-index) 9) 10)) + (if (and (= (-> arg0 language-index) 7) + (or (= (scf-get-territory) 1) + (and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language)) + ) + ) + (+! (-> arg0 language-index) -1) + ) + (if (= (-> arg0 language-index) 6) + (+! (-> arg0 language-index) -2) + ) + ) + ((7) + (set! (-> arg0 audio-language-index) (mod (+ (-> arg0 audio-language-index) 4) 5)) + ) + ) + ) + ((cpad-pressed? 0 right l-analog-right) + (sound-play "generic-beep") + (case (-> this menu-option-type) + ((3) + (set! (-> arg0 vibrations) #f) + ) + ((4) + (set! (-> arg0 subtitles) #f) + ) + ((5) + (set! (-> arg0 subtitle-language-index) (mod (+ (-> arg0 subtitle-language-index) 1) 10)) + (if (= (-> arg0 subtitle-language-index) 5) + (+! (-> arg0 subtitle-language-index) 2) + ) + (if (and (= (-> arg0 subtitle-language-index) 7) + (or (= (scf-get-territory) 1) + (and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language)) + ) + ) + (+! (-> arg0 subtitle-language-index) 1) + ) + ) + ((6) + (set! (-> arg0 language-index) (mod (+ (-> arg0 language-index) 1) 10)) + (if (= (-> arg0 language-index) 5) + (+! (-> arg0 language-index) 2) + ) + (if (and (= (-> arg0 language-index) 7) + (or (= (scf-get-territory) 1) + (and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language)) + ) + ) + (+! (-> arg0 language-index) 1) + ) + ) + ((7) + (set! (-> arg0 audio-language-index) (mod (+ (-> arg0 audio-language-index) 1) 5)) + ) + ) + ) + ((cpad-pressed? 0 confirm) + (case (-> this menu-option-type) + ((3) + (set! (-> *setting-control* user-default vibration) (the-as symbol (-> arg0 vibrations))) + ) + ((4) + (set! (-> *setting-control* user-default subtitle) (the-as symbol (-> arg0 subtitles))) + ) + ((5) + (set! (-> *setting-control* user-default subtitle-language) + (the-as language-enum (-> arg0 subtitle-language-index)) + ) + ) + ((6) + (set! (-> *setting-control* user-default language) (the-as language-enum (-> arg0 language-index))) + (load-level-text-files (-> arg0 language-index)) + ) + ((7) + (set! (-> *setting-control* user-default audio-language) + (the-as language-enum (-> arg0 audio-language-index)) + ) + ) + ) + (if (or (nonzero? (-> *setting-control* user-default subtitle-language)) + (nonzero? (-> *setting-control* user-default language)) + (nonzero? (-> *setting-control* user-default audio-language)) + ) + (set! (-> *unlocked-secrets* options length) 11) + (set! (-> *unlocked-secrets* options length) 12) + ) + ) + ) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons up l-analog-up)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up l-analog-up)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons down l-analog-down)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down l-analog-down)) + ) + (else + (set! (-> arg0 vibrations) (the-as basic (-> *setting-control* user-default vibration))) + (set! (-> arg0 subtitles) (the-as basic (-> *setting-control* user-default subtitle))) + (set! (-> arg0 language-index) (the-as int (-> *setting-control* user-default language))) + (set! (-> arg0 subtitle-language-index) (the-as int (-> *setting-control* user-default subtitle-language))) + (set! (-> arg0 audio-language-index) (the-as int (-> *setting-control* user-default audio-language))) + ) + ) + 0 + ) + +;; definition for method 9 of type menu-language-option +(defmethod respond-progress ((this menu-language-option) (arg0 progress) (arg1 symbol)) + (enable-level-text-file-loading) + (set! (-> arg0 language-index) (the-as int (-> *setting-control* user-default language))) + (cond + ((cpad-pressed? 0 left l-analog-left) + (sound-play "generic-beep") + (set! (-> arg0 language-index) (mod (+ (-> arg0 language-index) 9) 10)) + (if (and (= (-> arg0 language-index) 7) + (or (= (scf-get-territory) 1) + (and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language)) + ) + ) + (+! (-> arg0 language-index) -1) + ) + (if (= (-> arg0 language-index) 6) + (+! (-> arg0 language-index) -2) + ) + (set! (-> *setting-control* user-default language) (the-as language-enum (-> arg0 language-index))) + (load-level-text-files (-> arg0 language-index)) + ) + ((cpad-pressed? 0 right l-analog-right) + (sound-play "generic-beep") + (set! (-> arg0 language-index) (mod (+ (-> arg0 language-index) 1) 10)) + (if (= (-> arg0 language-index) 5) + (+! (-> arg0 language-index) 2) + ) + (if (and (= (-> arg0 language-index) 7) + (or (= (scf-get-territory) 1) + (and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language)) + ) + ) + (+! (-> arg0 language-index) 1) + ) + (set! (-> *setting-control* user-default language) (the-as language-enum (-> arg0 language-index))) + (load-level-text-files (-> arg0 language-index)) + ) + ((cpad-pressed? 0 confirm) + (set! (-> *setting-control* user-default subtitle-language) (the-as language-enum (-> arg0 language-index))) + (set! (-> *setting-control* user-default audio-language) + (the-as language-enum (-> *audio-language-remap* (-> arg0 language-index))) + ) + (if (or (nonzero? (-> *setting-control* user-default subtitle-language)) + (nonzero? (-> *setting-control* user-default language)) + (nonzero? (-> *setting-control* user-default audio-language)) + ) + (set! (-> *unlocked-secrets* options length) 11) + (set! (-> *unlocked-secrets* options length) 12) + ) + (pop-state arg0) + ) + ) + 0 + ) + +;; definition for method 9 of type menu-graphic-option +(defmethod respond-progress ((this menu-graphic-option) (arg0 progress) (arg1 symbol)) + (cond + (arg1 + (case (-> this menu-option-type) + ((8) + (let ((v1-1 #f)) + (cond + ((cpad-hold? 0 left l-analog-left) + (set! (-> *setting-control* user-default screenx) + (min-max-wrap-around (+ (-> *setting-control* user-default screenx) -2) -96 96) + ) + (set! v1-1 #t) + ) + ((cpad-hold? 0 right l-analog-right) + (set! (-> *setting-control* user-default screenx) + (min-max-wrap-around (+ (-> *setting-control* user-default screenx) 2) -96 96) + ) + (set! v1-1 #t) + ) + ((cpad-hold? 0 up l-analog-up) + (set! (-> *setting-control* user-default screeny) + (min-max-wrap-around (+ (-> *setting-control* user-default screeny) -2) -48 48) + ) + (set! v1-1 #t) + ) + ((cpad-hold? 0 down l-analog-down) + (set! (-> *setting-control* user-default screeny) + (min-max-wrap-around (+ (-> *setting-control* user-default screeny) 2) -48 48) + ) + (set! v1-1 #t) + ) + ((cpad-pressed? 0 square) + (set! (-> *setting-control* user-default screenx) 0) + (set! (-> *setting-control* user-default screeny) 24) + ) + ((cpad-pressed? 0 triangle) + (set! (-> *setting-control* user-default screenx) (-> arg0 center-x-backup)) + (set! (-> *setting-control* user-default screeny) (-> arg0 center-y-backup)) + ) + ) + (when v1-1 + (when (< (seconds 0.1) (- (current-time) (-> arg0 last-sound))) + (set-time! (-> arg0 last-sound)) + (sound-play "roll-over") + ) + ) + ) + ) + ((9) + (cond + ((cpad-pressed? 0 left l-analog-left) + (sound-play "generic-beep") + (set! (-> arg0 aspect-ratio) (the-as basic 'aspect4x3)) + ) + ((cpad-pressed? 0 right l-analog-right) + (sound-play "generic-beep") + (set! (-> arg0 aspect-ratio) (the-as basic 'aspect16x9)) + ) + ((cpad-pressed? 0 triangle) + (set! (-> arg0 aspect-ratio) (the-as basic (get-aspect-ratio))) + ) + ((cpad-pressed? 0 confirm) + (set! (-> *setting-control* user-default aspect-ratio) (the-as symbol (-> arg0 aspect-ratio))) + ) + ) + ) + ((10) + (cond + ((cpad-pressed? 0 left l-analog-left) + (sound-play "generic-beep") + (set! (-> arg0 progressive-scan) (the-as basic #t)) + ) + ((cpad-pressed? 0 right l-analog-right) + (sound-play "generic-beep") + (set! (-> arg0 progressive-scan) #f) + (set! (-> *setting-control* user-default set-video-mode) #f) + ) + ((cpad-pressed? 0 triangle) + (set! (-> arg0 progressive-scan) (the-as basic (-> *setting-control* user-default set-video-mode))) + ) + ((cpad-pressed? 0 confirm) + (push-state arg0) + (set-next-state arg0 'progressive-mode-warning 0) + ) + ) + ) + ((11) + (cond + ((cpad-pressed? 0 left l-analog-left) + (sound-play "generic-beep") + (set! (-> arg0 video-mode) (the-as basic 'pal)) + ) + ((cpad-pressed? 0 right l-analog-right) + (sound-play "generic-beep") + (set! (-> arg0 video-mode) (the-as basic 'ntsc)) + ) + ((cpad-pressed? 0 triangle) + (set! (-> arg0 video-mode) (the-as basic (get-video-mode))) + ) + ((cpad-pressed? 0 confirm) + (when (!= (-> *setting-control* user-default video-mode) (-> arg0 video-mode)) + (let ((v1-88 (-> arg0 video-mode))) + (case v1-88 + (('pal) + (set! (-> *setting-control* user-default video-mode) (the-as symbol v1-88)) + ) + (('ntsc) + (push-state arg0) + (set-next-state arg0 'video-mode-warning 0) + ) + ) + ) + ) + ) + ) + ) + ) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons up l-analog-up)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up l-analog-up)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons down l-analog-down)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down l-analog-down)) + ) + (else + (when (cpad-pressed? 0 confirm) + (case (-> this menu-option-type) + ((8) + (set! (-> arg0 center-x-backup) (-> *setting-control* user-default screenx)) + (set! (-> arg0 center-y-backup) (-> *setting-control* user-default screeny)) + ) + ((9) + (set! (-> arg0 aspect-ratio) (the-as basic (-> *setting-control* user-default aspect-ratio))) + ) + ((10) + (set! (-> arg0 progressive-scan) (the-as basic (-> *setting-control* user-default set-video-mode))) + ) + ((11) + (set! (-> arg0 video-mode) (the-as basic (get-video-mode))) + ) + ) + ) + ) + ) + 0 + ) + +;; definition for method 9 of type menu-camera-option +(defmethod respond-progress ((this menu-camera-option) (arg0 progress) (arg1 symbol)) + (cond + (arg1 + (case (-> this menu-option-type) + ((12) + (cond + ((cpad-pressed? 0 left l-analog-left) + (set! (-> arg0 flip-horizontal) #f) + (sound-play "generic-beep") + ) + ((cpad-pressed? 0 right l-analog-right) + (set! (-> arg0 flip-horizontal) (the-as basic #t)) + (sound-play "generic-beep") + ) + ((cpad-pressed? 0 confirm) + (set! (-> *setting-control* cam-default flip-horizontal) (the-as symbol (-> arg0 flip-horizontal))) + ) + ((cpad-pressed? 0 triangle) + (set! (-> arg0 flip-horizontal) (the-as basic (-> *setting-control* cam-current flip-horizontal))) + ) + ) + ) + ((13) + (cond + ((cpad-pressed? 0 left l-analog-left) + (set! (-> arg0 flip-vertical) #f) + (sound-play "generic-beep") + ) + ((cpad-pressed? 0 right l-analog-right) + (set! (-> arg0 flip-vertical) (the-as basic #t)) + (sound-play "generic-beep") + ) + ((cpad-pressed? 0 confirm) + (set! (-> *setting-control* cam-default flip-vertical) (the-as symbol (-> arg0 flip-vertical))) + ) + ((cpad-pressed? 0 triangle) + (set! (-> arg0 flip-vertical) (the-as basic (-> *setting-control* cam-current flip-vertical))) + ) + ) + ) + ) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons up l-analog-up)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up l-analog-up)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons down l-analog-down)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down l-analog-down)) + ) + (else + (cond + ((cpad-pressed? 0 confirm) + (set! (-> arg0 flip-horizontal) (the-as basic (-> *setting-control* cam-current flip-horizontal))) + (set! (-> arg0 flip-vertical) (the-as basic (-> *setting-control* cam-current flip-vertical))) + ) + ((cpad-pressed? 0 triangle) + (set! (-> arg0 flip-horizontal) (the-as basic (-> *setting-control* cam-current flip-horizontal))) + (set! (-> arg0 flip-vertical) (the-as basic (-> *setting-control* cam-current flip-vertical))) + ) + ) + ) + ) + 0 + ) + +;; definition for method 9 of type inventory-item +(defmethod item-obtained? ((this inventory-item)) + (or (logtest? (-> *game-info* features) (-> this feature)) + (logtest? (-> *game-info* vehicles) (-> this vehicle)) + (logtest? (-> *game-info* items) (-> this item)) + ) + ) + +;; definition for method 9 of type inventory-item-group +(defmethod have-items? ((this inventory-item-group)) + (let ((gp-0 #f)) + (dotimes (s4-0 (-> this items length)) + (if (item-obtained? (-> this items s4-0)) + (set! gp-0 #t) + ) + ) + gp-0 + ) + ) + +;; definition for method 9 of type menu-inventory +(defmethod respond-progress ((this menu-inventory) (arg0 progress) (arg1 symbol)) + (let* ((f30-0 (the float (-> this screens length))) + (s4-0 (-> this screens (min (the int (-> this current-index)) (-> this screens length)))) + (v1-9 (-> s4-0 groups (-> s4-0 current-index))) + (gp-0 #f) + ) + (let ((f28-0 0.0)) + (let ((f0-3 (-> this target-index))) + (set! (-> this target-index) (- f0-3 (* (the float (the int (/ f0-3 f30-0))) f30-0))) + ) + (cond + ((or (cpad-pressed? 0 left l-analog-left) + (and (cpad-hold? 0 left l-analog-left) (time-elapsed? (-> arg0 last-move) (seconds 0.2))) + ) + (set-time! (-> arg0 last-move)) + (let ((s3-0 (-> s4-0 current-index)) + (s2-0 (-> v1-9 index-left)) + ) + (let ((s0-0 (-> s4-0 groups s2-0)) + (s1-0 6) + ) + (while (and (not (have-items? s0-0)) (!= s3-0 s2-0) (nonzero? s1-0)) + (set! s2-0 (-> s0-0 index-left)) + (set! s0-0 (-> s4-0 groups s2-0)) + (+! s1-0 -1) + (if (zero? s1-0) + (set! s2-0 s3-0) + ) + ) + ) + (when (!= s3-0 s2-0) + (set! (-> s4-0 current-index) s2-0) + (sound-play "generic-beep") + ) + ) + ) + ((or (cpad-pressed? 0 right l-analog-right) + (and (cpad-hold? 0 right l-analog-right) (time-elapsed? (-> arg0 last-move) (seconds 0.2))) + ) + (set-time! (-> arg0 last-move)) + (let ((s3-2 (-> s4-0 current-index)) + (s2-1 (-> v1-9 index-right)) + ) + (let ((s0-1 (-> s4-0 groups s2-1)) + (s1-1 6) + ) + (while (and (not (have-items? s0-1)) (!= s3-2 s2-1) (nonzero? s1-1)) + (set! s2-1 (-> s0-1 index-right)) + (set! s0-1 (-> s4-0 groups s2-1)) + (+! s1-1 -1) + (if (zero? s1-1) + (set! s2-1 s3-2) + ) + ) + ) + (when (!= s3-2 s2-1) + (set! (-> s4-0 current-index) s2-1) + (sound-play "generic-beep") + ) + ) + ) + ((or (cpad-pressed? 0 up l-analog-up) + (and (cpad-hold? 0 up l-analog-up) (time-elapsed? (-> arg0 last-move) (seconds 0.2))) + ) + (set-time! (-> arg0 last-move)) + (let ((s3-4 (-> s4-0 current-index)) + (s2-2 (-> v1-9 index-up)) + ) + (let ((s0-2 (-> s4-0 groups s2-2)) + (s1-2 6) + ) + (while (and (not (have-items? s0-2)) (!= s3-4 s2-2) (nonzero? s1-2)) + (set! s2-2 (-> s0-2 index-up)) + (set! s0-2 (-> s4-0 groups s2-2)) + (+! s1-2 -1) + (if (zero? s1-2) + (set! s2-2 s3-4) + ) + ) + ) + (when (!= s3-4 s2-2) + (set! (-> s4-0 current-index) s2-2) + (sound-play "generic-beep") + ) + ) + ) + ((or (cpad-pressed? 0 down l-analog-down) + (and (cpad-hold? 0 down l-analog-down) (time-elapsed? (-> arg0 last-move) (seconds 0.2))) + ) + (set-time! (-> arg0 last-move)) + (let ((s3-6 (-> s4-0 current-index)) + (s2-3 (-> v1-9 index-down)) + ) + (let ((s0-3 (-> s4-0 groups s2-3)) + (s1-3 6) + ) + (while (and (not (have-items? s0-3)) (!= s3-6 s2-3) (nonzero? s1-3)) + (set! s2-3 (-> s0-3 index-down)) + (set! s0-3 (-> s4-0 groups s2-3)) + (+! s1-3 -1) + (if (zero? s1-3) + (set! s2-3 s3-6) + ) + ) + ) + (when (!= s3-6 s2-3) + (set! (-> s4-0 current-index) s2-3) + (sound-play "generic-beep") + ) + ) + ) + ((and (cpad-hold? 0 r1) (= (-> this current-index) (-> this target-index))) + (let ((f0-7 (+ 1.0 (-> this target-index)))) + (set! (-> this target-index) (- f0-7 (* (the float (the int (/ f0-7 f30-0))) f30-0))) + ) + (set! f28-0 182.04445) + (set! gp-0 #t) + ) + ((and (cpad-hold? 0 l1) (= (-> this current-index) (-> this target-index))) + (let ((f0-12 (+ -1.0 f30-0 (-> this target-index)))) + (set! (-> this target-index) (- f0-12 (* (the float (the int (/ f0-12 f30-0))) f30-0))) + ) + (set! f28-0 -182.04445) + (set! gp-0 #t) + ) + ) + (let* ((f26-0 (/ 65536.0 f30-0)) + (f0-17 (* 3.0 (seconds-per-frame) f26-0)) + (f1-19 (+ (* (-> this current-index) f26-0) f28-0)) + (f2-1 (* (-> this target-index) f26-0)) + (f0-19 (+ 65536.0 (deg-seek f1-19 f2-1 f0-17))) + ) + (set! (-> this current-index) (/ (- f0-19 (* (the float (the int (/ f0-19 65536.0))) 65536.0)) f26-0)) + ) + ) + (when (< (fabs (- (-> this current-index) (-> this target-index))) 0.01) + (let ((f0-25 (-> this target-index))) + (set! (-> this current-index) (- f0-25 (* (the float (the int (/ f0-25 f30-0))) f30-0))) + ) + ) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons up l-analog-up)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up l-analog-up)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons down l-analog-down)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down l-analog-down)) + (if gp-0 + (sound-play "score-slide") + ) + ) + 0 + ) + +;; definition for method 9 of type menu-qr-option +(defmethod respond-progress ((this menu-qr-option) (arg0 progress) (arg1 symbol)) + (let ((s5-0 (&-> arg0 yes-no-choice))) + (cond + (arg1 + (cond + ((and (cpad-pressed? 0 left l-analog-left) (not (-> s5-0 0))) + (sound-play "generic-beep") + (set! (-> s5-0 0) (the-as basic #t)) + ) + ((and (cpad-pressed? 0 right l-analog-right) (-> s5-0 0)) + (sound-play "generic-beep") + (set! (-> s5-0 0) #f) + ) + ((and (cpad-pressed? 0 confirm) (-> s5-0 0)) + (case (-> this name) + (((text-id progress-restart-mission)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (restart-mission) + (set-next-state arg0 'go-away 0) + ) + (((text-id progress-quit-game)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) + (initialize! *game-info* 'game (the-as game-save #f) "title-restart" (the-as resetter-spec #f)) + ) + ) + ) + ) + ) + (else + (set! (-> s5-0 0) #f) + ) + ) + ) + 0 + ) + +;; definition for symbol *last-powerup-collect-amount*, type int +(define *last-powerup-collect-amount* 0) + +;; definition for function spawn-secret-notify-message +;; WARN: Return type mismatch (pointer process) vs none. +(defun spawn-secret-notify-message ((arg0 int)) + (process-spawn-function + process + (lambda :behavior process + ((arg0 int)) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (seconds 2.5)) + (suspend) + ) + ) + (while (or (not (handle-command-list *gui-control* (gui-channel alert) (the-as gui-connection #f))) + (= (status-of-level-and-borrows *level* 'title #f) 'active) + ) + (suspend) + ) + (talker-spawn-func (-> *talker-speech* arg0) *entity-pool* (target-pos 0) (the-as region #f)) + (none) + ) + arg0 + :to *entity-pool* + ) + (none) + ) + +;; definition for function menu-secrets-notify-task-node-close +;; WARN: Return type mismatch int vs none. +(defun menu-secrets-notify-task-node-close ((arg0 game-task-node)) + (local-vars (v1-3 symbol)) + (set! v1-3 + (and (not (logtest? (-> *game-info* secrets) (game-secrets hero-mode))) + (begin + (dotimes (v1-4 (-> *menu-secrets-array* length)) + (let ((a1-2 (-> *menu-secrets-array* v1-4))) + (when (and (= (-> *game-info* sub-task-list (-> a1-2 avail-after)) arg0) + (= (logand (-> *game-info* purchase-secrets) (-> a1-2 required-secrets)) (-> a1-2 required-secrets)) + (not (logtest? (-> a1-2 flags) (secret-item-option-flags sf3))) + ) + (set! v1-3 #t) + (goto cfg-14) + ) + ) + ) + #f + ) + ) + ) + (label cfg-14) + (when v1-3 + (set! *last-powerup-collect-amount* (the int (-> *game-info* skill-total))) + (spawn-secret-notify-message 136) + ) + 0 + (none) + ) + +;; definition for function menu-secrets-notify-powerup-collect +(defun menu-secrets-notify-powerup-collect () + (when (>= (-> *game-info* skill-total) 600.0) + (spawn-secret-notify-message 138) + (return 0) + ) + (let ((gp-0 #f) + (s5-0 #f) + ) + (dotimes (s4-0 (-> *menu-secrets-array* length)) + (let ((s3-0 (-> *menu-secrets-array* s4-0))) + (when (zero? (secret-item-option-method-12 s3-0)) + (cond + ((and (>= (the int (-> *game-info* skill)) (-> s3-0 cost)) + (< (the int (-> *game-info* skill-high-watermark)) (-> s3-0 cost)) + (>= (the int (-> *game-info* skill-total)) (+ *last-powerup-collect-amount* 3)) + ) + (set! s5-0 #t) + (set! gp-0 #t) + ) + ((< (-> s3-0 cost) (the int (-> *game-info* skill))) + (set! gp-0 #t) + ) + ) + ) + ) + ) + (cond + (s5-0 + (spawn-secret-notify-message 135) + (set! *last-powerup-collect-amount* (the int (-> *game-info* skill-total))) + ) + (gp-0 + (let ((v1-31 (if (< (-> *game-info* skill-total) 25.0) + 10 + 25 + ) + ) + ) + (when (>= (the int (-> *game-info* skill-total)) (+ *last-powerup-collect-amount* v1-31)) + (set! *last-powerup-collect-amount* (the int (-> *game-info* skill-total))) + (spawn-secret-notify-message 137) + ) + ) + ) + ) + ) + 0 + ) diff --git a/test/decompiler/reference/jak3/engine/ui/text-h_REF.gc b/test/decompiler/reference/jak3/engine/ui/text-h_REF.gc index 75ff1d53a6..6f017de002 100644 --- a/test/decompiler/reference/jak3/engine/ui/text-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/ui/text-h_REF.gc @@ -6,6 +6,7 @@ ((id text-id) (text string) ) + :pack-me ) ;; definition for method 3 of type game-text @@ -26,7 +27,7 @@ ((length int32) (language-id int32) (group-name string) - (data game-text :dynamic) + (data game-text :inline :dynamic) ) (:methods (lookup-text! (_type_ text-id symbol) string) @@ -59,7 +60,3 @@ ;; failed to figure out what this is: 0 - - - - diff --git a/test/decompiler/reference/jak3/engine/ui/text_REF.gc b/test/decompiler/reference/jak3/engine/ui/text_REF.gc new file mode 100644 index 0000000000..64b1d16c07 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/ui/text_REF.gc @@ -0,0 +1,622 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(kmemopen global "text-buffers") + +;; definition for symbol *expand-buf-number*, type int +(define *expand-buf-number* 0) + +;; definition for symbol *game-text-word*, type string +(define *game-text-word* (new 'global 'string 256 (the-as string #f))) + +;; definition for symbol *game-text-line*, type string +(define *game-text-line* (new 'global 'string 1024 (the-as string #f))) + +;; definition for symbol *expanded-text-line0*, type string +(define *expanded-text-line0* (new 'global 'string 1024 (the-as string #f))) + +;; definition for symbol *expanded-text-line1*, type string +(define *expanded-text-line1* (new 'global 'string 1024 (the-as string #f))) + +;; definition for symbol *level-text-file-load-flag*, type symbol +(define *level-text-file-load-flag* #t) + +;; failed to figure out what this is: +(when (zero? (-> *common-text-heap* base)) + (let ((gp-0 *common-text-heap*)) + (set! (-> gp-0 base) (kmalloc global #x12000 (kmalloc-flags) "heap")) + (set! (-> gp-0 current) (-> gp-0 base)) + (set! (-> gp-0 top-base) (&+ (-> gp-0 base) #x12000)) + (set! (-> gp-0 top) (-> gp-0 top-base)) + ) + ) + +;; failed to figure out what this is: +(kmemclose) + +;; definition for method 7 of type game-text-info +(defmethod relocate ((this game-text-info) (offset int)) + (let ((v1-1 (-> *level* loading-level))) + (when v1-1 + (set! (-> v1-1 loaded-text-info (-> v1-1 loaded-text-info-count)) this) + (+! (-> v1-1 loaded-text-info-count) 1) + ) + ) + this + ) + +;; definition for method 4 of type game-text-info +(defmethod length ((this game-text-info)) + (-> this length) + ) + +;; definition for method 5 of type game-text-info +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of ((this game-text-info)) + (the-as int (+ (-> this type size) (* (-> this length) 8))) + ) + +;; definition for method 3 of type game-text-info +(defmethod inspect ((this game-text-info)) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~Tlength: ~D~%" (-> this length)) + (format #t "~Tlanguage-id: ~D~%" (-> this language-id)) + (format #t "~Tgroup-name: ~A~%" (-> this group-name)) + (format #t "~Tdata[~D]: @ #x~X~%" (-> this length) (-> this data)) + (dotimes (s5-0 (-> this length)) + (format #t "~T [~D] #x~X ~A~%" s5-0 (-> this data s5-0 id) (-> this data s5-0 text)) + ) + this + ) + +;; definition for method 8 of type game-text-info +(defmethod mem-usage ((this game-text-info) (usage memory-usage-block) (flags int)) + (set! (-> usage length) (max 85 (-> usage length))) + (set! (-> usage data 84 name) "string") + (+! (-> usage data 84 count) 1) + (let ((v1-6 (asize-of this))) + (+! (-> usage data 84 used) v1-6) + (+! (-> usage data 84 total) (logand -16 (+ v1-6 15))) + ) + (dotimes (s4-0 (-> this length)) + (set! (-> usage length) (max 85 (-> usage length))) + (set! (-> usage data 84 name) "string") + (+! (-> usage data 84 count) 1) + (let ((v1-18 (asize-of (-> this data s4-0 text)))) + (+! (-> usage data 84 used) v1-18) + (+! (-> usage data 84 total) (logand -16 (+ v1-18 15))) + ) + ) + this + ) + +;; definition for function convert-korean-text +(defun convert-korean-text ((arg0 string)) + (local-vars (v1-21 int)) + (let ((gp-0 (-> arg0 data))) + *expanded-text-line0* + (let ((s4-0 0)) + 0 + (let ((s1-0 0) + (s5-0 (length arg0)) + ) + (set! *expand-buf-number* (logxor *expand-buf-number* 1)) + (let ((s3-0 (if (zero? *expand-buf-number*) + *expanded-text-line0* + *expanded-text-line1* + ) + ) + ) + (let ((s2-0 (+ (-> s3-0 allocated-length) -1))) + (clear s3-0) + (while (< s4-0 s5-0) + (cond + ((= (-> gp-0 s4-0) 3) + (+! s4-0 1) + (while (and (< s4-0 s5-0) (!= (-> gp-0 s4-0) 3) (!= (-> gp-0 s4-0) 4)) + (set! (-> s3-0 data s1-0) (-> gp-0 s4-0)) + (+! s4-0 1) + (+! s1-0 1) + ) + ) + (else + (let ((v1-17 (+ s4-0 1))) + (-> gp-0 v1-17) + (set! s4-0 (+ v1-17 1)) + ) + (set! (-> s3-0 data s1-0) (the-as uint 126)) + (let ((v1-19 (+ s1-0 1))) + (set! (-> s3-0 data v1-19) (the-as uint 89)) + (let ((v1-20 (+ v1-19 1))) + (while (and (< s4-0 s5-0) (< v1-20 s2-0) (!= (-> gp-0 s4-0) 3) (!= (-> gp-0 s4-0) 4)) + (cond + ((= (-> gp-0 s4-0) 5) + (set! (-> s3-0 data v1-20) (the-as uint 1)) + (+! s4-0 1) + (set! v1-21 (+ v1-20 1)) + ) + (else + (set! (-> s3-0 data v1-20) (the-as uint 3)) + (set! v1-21 (+ v1-20 1)) + ) + ) + (set! (-> s3-0 data v1-21) (-> gp-0 s4-0)) + (+! s4-0 1) + (let ((v1-22 (+ v1-21 1))) + (set! (-> s3-0 data v1-22) (the-as uint 126)) + (let ((v1-23 (+ v1-22 1))) + (set! (-> s3-0 data v1-23) (the-as uint 90)) + (set! v1-20 (+ v1-23 1)) + ) + ) + ) + (set! (-> s3-0 data v1-20) (the-as uint 126)) + (let ((v1-24 (+ v1-20 1))) + (set! (-> s3-0 data v1-24) (the-as uint 43)) + (let ((v1-25 (+ v1-24 1))) + (set! (-> s3-0 data v1-25) (the-as uint 50)) + (let ((v1-26 (+ v1-25 1))) + (set! (-> s3-0 data v1-26) (the-as uint 54)) + (let ((v1-27 (+ v1-26 1))) + (set! (-> s3-0 data v1-27) (the-as uint 72)) + (set! s1-0 (+ v1-27 1)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (set! (-> s3-0 data s1-0) (the-as uint 0)) + s3-0 + ) + ) + ) + ) + ) + +;; definition for method 9 of type game-text-info +(defmethod lookup-text! ((this game-text-info) (arg0 text-id) (arg1 symbol)) + (cond + ((= this #f) + (cond + (arg1 + (the-as string #f) + ) + (else + (format (clear *temp-string*) "NO GAME TEXT") + *temp-string* + ) + ) + ) + (else + (let* ((a1-2 0) + (a3-0 (+ (-> this length) 1)) + (v1-2 (/ (+ a1-2 a3-0) 2)) + ) + (let ((t0-0 -1)) + (while (and (!= (-> this data v1-2 id) arg0) (!= v1-2 t0-0)) + (if (< (the-as uint arg0) (the-as uint (-> this data v1-2 id))) + (set! a3-0 v1-2) + (set! a1-2 v1-2) + ) + (set! t0-0 v1-2) + (set! v1-2 (/ (+ a1-2 a3-0) 2)) + ) + ) + (cond + ((!= (-> this data v1-2 id) arg0) + (cond + (arg1 + (the-as string #f) + ) + (else + (format (clear *temp-string*) "UNKNOWN ID ~X" arg0) + *temp-string* + ) + ) + ) + ((= (-> this language-id) 7) + (convert-korean-text (-> this data v1-2 text)) + ) + (else + (-> this data v1-2 text) + ) + ) + ) + ) + ) + ) + +;; definition for method 23 of type level +(defmethod lookup-text ((this level) (arg0 text-id) (arg1 symbol)) + (let ((v1-0 *common-text*)) + (dotimes (a3-0 (-> this loaded-text-info-count)) + (if (= (-> this loaded-text-info a3-0 language-id) (-> *setting-control* user-current language)) + (set! v1-0 (-> this loaded-text-info a3-0)) + ) + ) + (lookup-text! v1-0 arg0 arg1) + ) + ) + +;; definition for symbol text-is-loading, type symbol +(define text-is-loading #f) + +;; definition for function load-game-text-info +;; WARN: Found some very strange gotos. Check result carefully, this is not well tested. +(defun load-game-text-info ((arg0 string) (arg1 (pointer object)) (arg2 kheap)) + (local-vars (v0-4 int) (sv-16 object) (sv-20 int) (sv-24 int) (sv-32 int)) + (set! sv-16 (-> arg1 0)) + (set! sv-20 (the-as int (-> *setting-control* user-current language))) + (set! sv-24 0) + (set! sv-32 (&- (-> arg2 top) (the-as uint (-> arg2 base)))) + (if (and (= (scf-get-territory) 1) (= sv-20 (language-enum english)) (not (demo?))) + (set! sv-20 11) + ) + (when (and (or (= sv-16 #f) + (!= (-> (the-as game-text-info sv-16) language-id) sv-20) + (not (string= (-> (the-as game-text-info sv-16) group-name) arg0)) + ) + (not (load-in-progress? *level*)) + ) + (let ((v1-19 arg2)) + (set! (-> v1-19 current) (-> v1-19 base)) + ) + (b! #t cfg-21 :delay (nop!)) + (label cfg-20) + (set! v0-4 0) + (b! #t cfg-34 :delay (nop!)) + (label cfg-21) + (let ((s3-0 str-load)) + (format (clear *temp-string*) "~D~S.TXT" sv-20 arg0) + (b! + (not (s3-0 + *temp-string* + -1 + (logand -64 (&+ (-> arg2 current) 63)) + (&- (-> arg2 top) (the-as uint (-> arg2 current))) + ) + ) + cfg-20 + :delay (nop!) + ) + ) + (label cfg-23) + (let ((v1-23 (str-load-status (the-as (pointer int32) (& sv-24))))) + (cond + ((= v1-23 'error) + (format 0 "Error loading text~%") + (return 0) + ) + ((>= sv-24 (+ sv-32 -300)) + (format 0 "Game text heap overrun!~%") + (return 0) + ) + ((= v1-23 'busy) + (nop!) + (nop!) + (nop!) + (nop!) + (nop!) + (nop!) + (goto cfg-23) + ) + ) + ) + (let ((s2-1 (logand -64 (&+ (-> arg2 current) 63)))) + (flush-cache 0) + (let ((s3-1 link)) + (format (clear *temp-string*) "~D~S.TXT" sv-20 arg0) + (set! (-> arg1 0) (s3-1 s2-1 (-> *temp-string* data) sv-24 arg2 0)) + ) + ) + (if (<= (the-as int (-> arg1 0)) 0) + (set! (-> arg1 0) (the-as object #f)) + ) + ) + (set! v0-4 0) + (label cfg-34) + v0-4 + ) + +;; definition for function load-level-text-files +;; WARN: Return type mismatch int vs none. +(defun load-level-text-files ((arg0 int)) + (if (or *level-text-file-load-flag* (>= arg0 0)) + (load-game-text-info "common" (&-> '*common-text* value) *common-text-heap*) + ) + 0 + (none) + ) + +;; definition for function draw-debug-text-box +;; WARN: Return type mismatch int vs none. +(defun draw-debug-text-box ((arg0 font-context)) + (when *cheat-mode* + (let ((s5-0 (new 'static 'vector4w)) + (gp-0 + (new 'static 'inline-array vector4w 4 + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + (new 'static 'vector4w) + ) + ) + ) + (set-vector! (-> gp-0 0) (the int (+ -256.0 (-> arg0 origin x))) (the int (+ -208.0 (-> arg0 origin y))) 0 1) + (set-vector! + (-> gp-0 1) + (the int (+ -256.0 (-> arg0 width) (-> arg0 origin x))) + (the int (+ -208.0 (-> arg0 origin y))) + 0 + 1 + ) + (set-vector! + (-> gp-0 2) + (the int (+ -256.0 (-> arg0 width) (-> arg0 origin x))) + (the int (+ -208.0 (-> arg0 height) (-> arg0 origin y))) + 0 + 1 + ) + (set-vector! + (-> gp-0 3) + (the int (+ -256.0 (-> arg0 origin x))) + (the int (+ -208.0 (-> arg0 height) (-> arg0 origin y))) + 0 + 1 + ) + (set-vector! s5-0 128 128 128 128) + (add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 0) (-> gp-0 1) s5-0) + (add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 1) (-> gp-0 2) s5-0) + (add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 2) (-> gp-0 3) s5-0) + (add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 3) (-> gp-0 0) s5-0) + ) + ) + 0 + (none) + ) + +;; definition for function print-game-text-scaled +;; WARN: Return type mismatch int vs none. +(defun print-game-text-scaled ((arg0 string) (arg1 float) (arg2 font-context) (arg3 bucket-id)) + (let ((f26-0 (-> arg2 width)) + (f30-0 (-> arg2 height)) + (f24-0 (-> arg2 origin x)) + (f22-0 (-> arg2 origin y)) + (f28-0 (-> arg2 scale)) + ) + (let ((f0-1 (* (-> arg2 width) arg1)) + (f1-2 (* (-> arg2 height) arg1)) + ) + (if (logtest? (-> arg2 flags) (font-flags middle)) + (+! (-> arg2 origin x) (* 0.5 (- f26-0 f0-1))) + ) + (if (logtest? (-> arg2 flags) (font-flags middle-vert)) + (+! (-> arg2 origin y) (* 0.5 (- f30-0 f1-2))) + ) + (let ((v1-10 arg2)) + (set! (-> v1-10 scale) (* f28-0 arg1)) + ) + (set! (-> arg2 width) f0-1) + (set! (-> arg2 height) f1-2) + ) + (print-game-text arg0 arg2 #f 44 (bucket-id hud-draw-hud-alpha)) + (set! (-> arg2 origin x) f24-0) + (set! (-> arg2 origin y) f22-0) + (set! (-> arg2 width) f26-0) + (set! (-> arg2 height) f30-0) + (set! (-> arg2 scale) f28-0) + ) + 0 + (none) + ) + +;; definition for function print-game-text +(defun print-game-text ((arg0 string) (arg1 font-context) (arg2 symbol) (arg3 int) (arg4 bucket-id)) + (local-vars + (sv-16 float) + (sv-20 float) + (sv-24 font-flags) + (sv-28 font-color) + (sv-32 (pointer uint8)) + (sv-36 float) + (sv-40 float) + (sv-44 float) + (sv-48 float) + (sv-52 float) + (sv-56 float) + (sv-64 int) + (sv-72 uint) + (sv-80 int) + (sv-88 int) + (sv-96 int) + (sv-104 uint) + (sv-108 symbol) + (sv-112 int) + (sv-120 int) + ) + (cond + ((< 0.1 (-> arg1 scale)) + (set! sv-16 (-> arg1 origin x)) + (set! sv-20 (-> arg1 origin y)) + (set! sv-24 (-> arg1 flags)) + (set! sv-28 (-> arg1 color)) + (set-context! *font-work* arg1) + (set! (-> arg1 max-x) sv-16) + (when (logtest? (-> arg1 flags) (font-flags middle-vert)) + (logclear! (-> arg1 flags) (font-flags middle-vert)) + (+! (-> arg1 origin y) + (the float + (the int (* 0.5 (- (-> arg1 height) (print-game-text arg0 arg1 #t 44 (bucket-id hud-draw-hud-alpha))))) + ) + ) + ) + (set! sv-32 (-> arg0 data)) + (set! sv-36 (-> arg1 origin x)) + (set! sv-40 (-> arg1 origin x)) + (set! sv-44 (+ (-> arg1 origin x) (-> arg1 width))) + (set! sv-48 (+ (-> arg1 origin y) (-> arg1 height))) + (set! sv-52 (-> (get-string-length " " arg1) length)) + (set! sv-56 (* (if (logtest? (-> arg1 flags) (font-flags large)) + (the float arg3) + 28.0 + ) + (-> arg1 scale) + ) + ) + (set! sv-64 0) + (if (logtest? (-> arg1 flags) (font-flags middle)) + (+! (-> arg1 origin x) (* 0.5 (-> arg1 width))) + ) + (set! sv-72 (-> sv-32 0)) + (set! sv-80 0) + (set! sv-88 0) + (set! sv-96 0) + (set! sv-104 (-> sv-32 1)) + (set! sv-108 (the-as symbol #f)) + (set! sv-112 0) + (set! sv-120 0) + (set! (-> *game-text-line* data 0) (the-as uint 0)) + (while (and (not (and (zero? sv-72) (zero? sv-80) (zero? sv-88))) (>= sv-48 (-> arg1 origin y))) + (set! sv-120 0) + (set! sv-32 (&-> sv-32 1)) + (set! sv-104 (-> sv-32 0)) + (set! sv-32 (&-> sv-32 -1)) + (cond + ((and (> sv-72 0) (< sv-72 (the-as uint 4))) + (set! (-> *game-text-word* data sv-80) sv-72) + (set! sv-80 (+ sv-80 1)) + (set! (-> *game-text-word* data sv-80) sv-104) + (set! sv-80 (+ sv-80 1)) + (set! sv-32 (&-> sv-32 1)) + ) + ((or (= sv-72 32) (= sv-72 47) (and (= sv-72 45) (!= (-> sv-32 -1) 126))) + (set! (-> *game-text-word* data sv-80) sv-72) + (set! sv-80 (+ sv-80 1)) + (set! sv-108 #t) + ) + ((zero? sv-72) + (if (nonzero? sv-80) + (set! sv-108 #t) + ) + (set! sv-112 (+ sv-112 1)) + ) + ((and (= sv-72 92) (= sv-104 92)) + (set! sv-32 (&-> sv-32 1)) + (if (nonzero? sv-80) + (set! sv-108 #t) + ) + (set! sv-112 (+ sv-112 1)) + ) + ((and (= sv-72 95) (= sv-104 95)) + (set! sv-32 (&-> sv-32 1)) + (set! (-> *game-text-word* data sv-80) (the-as uint 32)) + (set! sv-80 (+ sv-80 1)) + ) + (else + (set! (-> *game-text-word* data sv-80) sv-72) + (set! sv-80 (+ sv-80 1)) + ) + ) + (when sv-108 + (set! (-> *game-text-word* data sv-80) (the-as uint 0)) + (let ((f30-1 sv-36)) + (set! sv-120 (the int (-> (get-string-length *game-text-word* arg1) length))) + (let ((f0-27 (+ f30-1 (the float sv-120)))) + (if (= (-> *game-text-word* data (+ sv-80 -1)) 32) + (set! f0-27 (- f0-27 sv-52)) + ) + (cond + ((< sv-44 f0-27) + (set! (-> arg1 max-x) (fmax (-> arg1 max-x) sv-36)) + (set! sv-112 (+ sv-112 1)) + ) + (else + (copy-charp<-charp (&-> *game-text-line* data sv-88) (-> *game-text-word* data)) + (set! sv-88 (+ sv-88 sv-80)) + (set! sv-80 0) + (set! sv-36 (+ sv-36 (the float sv-120))) + (set! (-> arg1 max-x) (fmax (-> arg1 max-x) sv-36)) + (set! sv-108 (the-as symbol #f)) + ) + ) + ) + ) + ) + (while (> sv-112 0) + (let ((f30-2 (+ (-> arg1 origin y) sv-56))) + (when (and (>= sv-96 (the-as int (-> arg1 start-line))) #t) + (when (= (-> *game-text-line* data (+ sv-88 -1)) 32) + (set! (-> *game-text-line* data (+ sv-88 -1)) (the-as uint 0)) + 0 + ) + (if (nonzero? (-> *game-text-line* data 0)) + (set! sv-64 (+ sv-64 1)) + ) + (when (not arg2) + (with-dma-buffer-add-bucket ((s2-1 (-> *display* frames (-> *display* on-screen) global-buf)) + arg4 + ) + (draw-string *game-text-line* s2-1 arg1) + ) + ) + (set! (-> arg1 origin y) f30-2) + ) + ) + (set! sv-96 (+ sv-96 1)) + (set! (-> *game-text-line* data 0) (the-as uint 0)) + (set! sv-88 0) + (set! sv-112 (+ sv-112 -1)) + (set! sv-36 sv-40) + (when sv-108 + (copy-charp<-charp (&-> *game-text-line* data sv-88) (-> *game-text-word* data)) + (set! sv-88 (+ sv-88 sv-80)) + (set! sv-80 0) + (set! sv-108 (the-as symbol #f)) + (set! sv-36 (+ sv-36 (the float sv-120))) + ) + ) + (when (nonzero? sv-72) + (set! sv-32 (&-> sv-32 1)) + (set! sv-72 (-> sv-32 0)) + ) + ) + (set! (-> arg1 origin x) sv-16) + (set! (-> arg1 origin y) sv-20) + (set! (-> arg1 flags) sv-24) + (set! (-> arg1 color) sv-28) + (if (> sv-64 0) + (* sv-56 (the float sv-64)) + 0.0 + ) + ) + (else + 0.0 + ) + ) + ) + +;; definition for function disable-level-text-file-loading +;; WARN: Return type mismatch int vs none. +(defun disable-level-text-file-loading () + (set! *level-text-file-load-flag* #f) + 0 + (none) + ) + +;; definition for function enable-level-text-file-loading +;; WARN: Return type mismatch int vs none. +(defun enable-level-text-file-loading () + (set! *level-text-file-load-flag* #t) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/util/glist-h_REF.gc b/test/decompiler/reference/jak3/engine/util/glist-h_REF.gc new file mode 100644 index 0000000000..a82a870305 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/util/glist-h_REF.gc @@ -0,0 +1,130 @@ +;;-*-Lisp-*- +(in-package goal) + +;; this file is debug only +(declare-file (debug)) + +;; definition of type glst-node +(deftype glst-node (structure) + ((next glst-node) + (prev glst-node) + ) + ) + +;; definition for method 3 of type glst-node +(defmethod inspect ((this glst-node)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'glst-node) + (format #t "~1Tnext: #~%" (-> this next)) + (format #t "~1Tprev: #~%" (-> this prev)) + (label cfg-4) + this + ) + +;; definition of type glst-named-node +(deftype glst-named-node (glst-node) + ((privname string) + ) + ) + +;; definition for method 3 of type glst-named-node +(defmethod inspect ((this glst-named-node)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'glst-named-node) + (format #t "~1Tnext: #~%" (-> this next)) + (format #t "~1Tprev: #~%" (-> this prev)) + (format #t "~1Tprivname: ~A~%" (-> this privname)) + (label cfg-4) + this + ) + +;; definition of type glst-list +(deftype glst-list (structure) + ((head glst-node) + (tail glst-node) + (tailpred glst-node) + (numelem int32) + ) + :pack-me + ) + +;; definition for method 3 of type glst-list +(defmethod inspect ((this glst-list)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'glst-list) + (format #t "~1Thead: #~%" (-> this head)) + (format #t "~1Ttail: #~%" (-> this tail)) + (format #t "~1Ttailpred: #~%" (-> this tailpred)) + (format #t "~1Tnumelem: ~D~%" (-> this numelem)) + (label cfg-4) + this + ) + +;; definition for function glst-next +(defun glst-next ((arg0 glst-node)) + "return the next node in the list" + (-> arg0 next) + ) + +;; definition for function glst-prev +(defun glst-prev ((arg0 glst-node)) + "return the previous node in the list" + (-> arg0 prev) + ) + +;; definition for function glst-head +(defun glst-head ((arg0 glst-list)) + "return the start of the list" + (-> arg0 head) + ) + +;; definition for function glst-tail +(defun glst-tail ((arg0 glst-list)) + "return the tail of the list" + (-> arg0 tailpred) + ) + +;; definition for function glst-end-of-list? +(defun glst-end-of-list? ((arg0 glst-node)) + "is this node the end of the list. #t = end" + (not (-> arg0 next)) + ) + +;; definition for function glst-start-of-list? +(defun glst-start-of-list? ((arg0 glst-node)) + "is this node the start of the list. #t = start" + (not (-> arg0 prev)) + ) + +;; definition for function glst-empty? +(defun glst-empty? ((arg0 glst-list)) + "is the list empty, #t = empty" + (= (-> arg0 tailpred) arg0) + ) + +;; definition for function glst-node-name +(defun glst-node-name ((arg0 glst-named-node)) + (-> arg0 privname) + ) + +;; definition for function glst-set-name! +(defun glst-set-name! ((arg0 glst-named-node) (arg1 string)) + (set! (-> arg0 privname) arg1) + arg1 + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/engine/util/glist_REF.gc b/test/decompiler/reference/jak3/engine/util/glist_REF.gc new file mode 100644 index 0000000000..b4a1d7bb95 --- /dev/null +++ b/test/decompiler/reference/jak3/engine/util/glist_REF.gc @@ -0,0 +1,199 @@ +;;-*-Lisp-*- +(in-package goal) + +;; this file is debug only +(declare-file (debug)) + +;; definition for function glst-num-elements +(defun glst-num-elements ((arg0 glst-list)) + (-> arg0 numelem) + ) + +;; definition for function glst-remove +(defun glst-remove ((arg0 glst-list) (arg1 glst-node)) + (let ((v1-0 arg1)) + "return the previous node in the list" + (let ((v1-1 (-> v1-0 prev)) + (a2-1 arg1) + ) + "return the next node in the list" + (let ((a2-2 (-> a2-1 next))) + (set! (-> v1-1 next) a2-2) + (set! (-> a2-2 prev) v1-1) + ) + ) + ) + (+! (-> arg0 numelem) -1) + arg1 + ) + +;; definition for function glst-remove-tail +(defun glst-remove-tail ((arg0 glst-list)) + (let ((v1-0 arg0)) + "return the tail of the list" + (let* ((a1-1 (-> v1-0 tailpred)) + (v1-1 a1-1) + ) + "is this node the start of the list. #t = start" + (if (not (not (-> v1-1 prev))) + (glst-remove arg0 a1-1) + (the-as glst-node #f) + ) + ) + ) + ) + +;; definition for function glst-remove-head +(defun glst-remove-head ((arg0 glst-list)) + (let ((v1-0 arg0)) + "return the start of the list" + (let* ((a1-1 (-> v1-0 head)) + (v1-1 a1-1) + ) + "is this node the end of the list. #t = end" + (if (not (not (-> v1-1 next))) + (glst-remove arg0 a1-1) + (the-as glst-node #f) + ) + ) + ) + ) + +;; definition for function glst-insert-before +(defun glst-insert-before ((arg0 glst-list) (arg1 glst-node) (arg2 glst-node)) + (let ((v1-0 arg1)) + "return the previous node in the list" + (let ((v1-1 (-> v1-0 prev))) + (set! (-> arg2 prev) v1-1) + (set! (-> arg2 next) arg1) + (set! (-> v1-1 next) arg2) + ) + ) + (set! (-> arg1 prev) arg2) + (+! (-> arg0 numelem) 1) + arg2 + ) + +;; definition for function glst-insert-after +(defun glst-insert-after ((arg0 glst-list) (arg1 glst-node) (arg2 glst-node)) + (let ((v1-0 arg1)) + "return the next node in the list" + (let ((v1-1 (-> v1-0 next))) + (set! (-> arg2 prev) arg1) + (set! (-> arg2 next) v1-1) + (set! (-> v1-1 prev) arg2) + ) + ) + (set! (-> arg1 next) arg2) + (+! (-> arg0 numelem) 1) + arg2 + ) + +;; definition for function glst-add-tail +(defun glst-add-tail ((arg0 glst-list) (arg1 glst-node)) + (glst-insert-before arg0 (the-as glst-node (&-> arg0 tail)) arg1) + arg1 + ) + +;; definition for function glst-add-head +(defun glst-add-head ((arg0 glst-list) (arg1 glst-node)) + (glst-insert-after arg0 (the-as glst-node arg0) arg1) + arg1 + ) + +;; definition for function glst-init-list! +(defun glst-init-list! ((arg0 glst-list)) + (set! (-> arg0 head) (the-as glst-node (&-> arg0 tail))) + (set! (-> arg0 tail) #f) + (set! (-> arg0 tailpred) (the-as glst-node (&-> arg0 head))) + (set! (-> arg0 numelem) 0) + arg0 + ) + +;; definition for function glst-find-node-by-name +(defun glst-find-node-by-name ((arg0 glst-list) (arg1 string)) + (let ((v1-0 arg0)) + "return the start of the list" + (let ((s5-0 (-> v1-0 head))) + (while (let ((v1-6 s5-0)) + "is this node the end of the list. #t = end" + (not (not (-> v1-6 next))) + ) + (if (name= (-> (the-as glst-named-node s5-0) privname) arg1) + (return s5-0) + ) + "return the next node in the list" + (set! s5-0 (-> s5-0 next)) + ) + ) + ) + (the-as glst-node #f) + ) + +;; definition for function glst-get-node-by-index +(defun glst-get-node-by-index ((arg0 glst-list) (arg1 int)) + (when (and (< arg1 (glst-num-elements arg0)) (>= arg1 0)) + "return the start of the list" + (let ((v1-3 (-> arg0 head))) + (dotimes (a0-3 arg1) + (nop!) + (nop!) + (nop!) + (nop!) + "return the next node in the list" + (set! v1-3 (-> v1-3 next)) + ) + (return v1-3) + ) + ) + (the-as glst-node #f) + ) + +;; definition for function glst-length-of-longest-name +(defun glst-length-of-longest-name ((arg0 glst-list)) + (let ((gp-0 0)) + (let ((v1-0 arg0)) + "return the start of the list" + (let ((s5-0 (-> v1-0 head))) + (while (let ((v1-6 s5-0)) + "is this node the end of the list. #t = end" + (not (not (-> v1-6 next))) + ) + (let ((v1-3 (length (-> (the-as glst-named-node s5-0) privname)))) + (if (< gp-0 v1-3) + (set! gp-0 v1-3) + ) + ) + "return the next node in the list" + (set! s5-0 (-> s5-0 next)) + ) + ) + ) + gp-0 + ) + ) + +;; definition for function glst-get-node-index +(defun glst-get-node-index ((arg0 glst-list) (arg1 glst-node)) + (let ((v1-0 0)) + "return the start of the list" + (let ((a0-1 (-> arg0 head))) + (while (let ((a2-3 a0-1)) + "is this node the end of the list. #t = end" + (not (not (-> a2-3 next))) + ) + (if (= a0-1 arg1) + (return v1-0) + ) + (+! v1-0 1) + "return the next node in the list" + (set! a0-1 (-> a0-1 next)) + ) + ) + ) + -1 + ) + + + + diff --git a/test/decompiler/reference/jak3/engine/util/script-h_REF.gc b/test/decompiler/reference/jak3/engine/util/script-h_REF.gc index 6260541f80..b825927c80 100644 --- a/test/decompiler/reference/jak3/engine/util/script-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/util/script-h_REF.gc @@ -7,6 +7,7 @@ (spec pair) (func (function script-context object)) ) + :pack-me (:methods (script-form-method-9 () none) ) @@ -42,8 +43,8 @@ (:methods (new (symbol type object process vector) _type_) (eval! (_type_ pair) object) - (script-context-method-10 () none) - (script-context-method-11 () none) + (script-context-method-10 (_type_ object pair) object) + (script-context-method-11 (_type_ pair pair symbol) symbol) ) ) @@ -95,3 +96,7 @@ ;; failed to figure out what this is: 0 + + + + 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 b128e52c40..71e8afacbb 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 a2068f39fe..06a6f7be34 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) ) ) 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 0000000000..be967934da --- /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 0000000000..81dd385a41 --- /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 0000000000..c7e1fac84b --- /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 0000000000..ce53cd935e --- /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 0000000000..c70abe2d98 --- /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/common/trail-h_REF.gc b/test/decompiler/reference/jak3/levels/city/common/trail-h_REF.gc index 50e87edd14..b4b240e387 100644 --- a/test/decompiler/reference/jak3/levels/city/common/trail-h_REF.gc +++ b/test/decompiler/reference/jak3/levels/city/common/trail-h_REF.gc @@ -15,10 +15,11 @@ (flags trail-node-flag) (conn-count uint8) ) + :pack-me (:methods - (trail-node-method-9 () none) - (trail-node-method-10 () none) - (trail-node-method-11 () none) + (get-dist-score (_type_ vector) uint) + (debug-draw (_type_ int) none) + (get-position (_type_ vector) vector) ) ) @@ -96,8 +97,9 @@ (visgroup-id uint8) (cost uint16) ) + :pack-me (:methods - (trail-conn-method-9 () none) + (debug-draw (_type_ trail-graph int) none) ) ) @@ -124,6 +126,7 @@ (pov-count uint8) (first-pov uint16) ) + :pack-me ) ;; definition for method 3 of type trail-conn-hash-cell @@ -284,31 +287,31 @@ (closed-bits vector16ub 2 :inline :overlay-at closed-quads) ) (:methods - (trail-graph-method-9 () none) - (trail-graph-method-10 () none) - (trail-graph-method-11 () none) - (trail-graph-method-12 () none) - (trail-graph-method-13 () none) - (trail-graph-method-14 () none) - (trail-graph-method-15 () none) - (trail-graph-method-16 () none) - (trail-graph-method-17 () none) - (trail-graph-method-18 () none) - (trail-graph-method-19 () none) - (trail-graph-method-20 () none) - (trail-graph-method-21 () none) - (trail-graph-method-22 () none) - (trail-graph-method-23 () none) - (trail-graph-method-24 () none) - (trail-graph-method-25 () none) - (trail-graph-method-26 () none) - (trail-graph-method-27 () none) - (trail-graph-method-28 () none) - (trail-graph-method-29 () none) - (trail-graph-method-30 () none) - (trail-graph-method-31 () none) - (trail-graph-method-32 () none) - (trail-graph-method-33 () none) + (trail-graph-method-9 (_type_ int) none) + (trail-graph-method-10 (_type_ int) none) + (trail-graph-method-11 (_type_ int int) trail-node) + (trail-graph-method-12 (_type_) none) + (trail-graph-method-13 (_type_ vector vector) none) + (debug-draw (_type_) none) + (trail-graph-method-15 (_type_ int) none) + (trail-graph-method-16 (_type_ int (pointer uint16) vector vector rgba float) none) + (trail-graph-method-17 (_type_) none) + (trail-graph-method-18 (_type_ vector) int) + (trail-graph-method-19 (_type_) none) + (trail-graph-method-20 (_type_ uint vector) none) + (trail-graph-method-21 (_type_) none) + (trail-graph-method-22 (_type_) none) + (trail-graph-method-23 (_type_) none) + (trail-graph-method-24 (_type_) none) + (trail-graph-method-25 (_type_ int) none) + (trail-graph-method-26 (_type_) none) + (trail-graph-method-27 (_type_) none) + (trail-graph-method-28 (_type_) none) + (trail-graph-method-29 (_type_) none) + (trail-graph-method-30 (_type_) none) + (trail-graph-method-31 (_type_ int) none) + (trail-graph-method-32 (_type_) none) + (trail-graph-method-33 (_type_) none) ) ) @@ -356,7 +359,3 @@ ;; definition for symbol *trail-graph*, type trail-graph (define *trail-graph* (the-as trail-graph #f)) - - - - diff --git a/test/decompiler/reference/jak3/levels/city/traffic/traffic-engine-h_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/traffic-engine-h_REF.gc new file mode 100644 index 0000000000..393bad13fb --- /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 0000000000..cb3dc2300f --- /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 0000000000..0591f35583 --- /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-effects_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-effects_REF.gc new file mode 100644 index 0000000000..33ada10397 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-effects_REF.gc @@ -0,0 +1,452 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 38 of type vehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-38 ((this vehicle)) + (cond + ((< 0.0 (-> this scrape-sound-envelope)) + (if (zero? (-> this scrape-sound-id)) + (set! (-> this scrape-sound-id) (new-sound-id)) + ) + (sound-play-by-name + (-> this info sound scrape-sound) + (-> this scrape-sound-id) + (the int (* 1024.0 (-> this scrape-sound-envelope))) + 0 + 0 + (sound-group) + (-> this impact-pos) + ) + ) + (else + (when (nonzero? (-> this scrape-sound-id)) + (sound-stop (-> this scrape-sound-id)) + (set! (-> this scrape-sound-id) (new 'static 'sound-id)) + 0 + ) + ) + ) + 0 + (none) + ) + +;; definition for function calc-fade-vals +;; WARN: Return type mismatch object vs none. +(defun calc-fade-vals ((arg0 float)) + (let* ((f1-1 (* 0.00024414062 arg0)) + (f0-3 (- f1-1 (the float (the int f1-1)))) + (f1-3 (* 4096.0 (- f1-1 f0-3))) + (f1-5 (/ -1.0 (* (- 1.0 f0-3) f1-3))) + (f0-4 (/ f0-3 (- 1.0 f0-3))) + ) + (format #t ":fade-a ~,,10f~%:fade-b ~,,10f~%" f1-5 f0-4) + ) + (none) + ) + +;; definition for symbol *vehicle-headlight-glow-template*, type sprite-glow-data +(define *vehicle-headlight-glow-template* (new 'static 'sprite-glow-data + :position (new 'static 'vector :w 8192.0) + :size-probe 163.84 + :z-offset 819.2 + :size-y 8192.0 + :color (new 'static 'rgbaf :x 255.0 :y 128.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 *vehicle-taillight-glow-template*, type sprite-glow-data +(define *vehicle-taillight-glow-template* (new 'static 'sprite-glow-data + :position (new 'static 'vector :w 3072.0) + :size-probe 122.88 + :z-offset 409.6 + :size-y 3072.0 + :color (new 'static 'rgbaf :x 255.0 :y 64.0 :w 16.0) + :fade-a -0.0000122044 + :fade-b 8.997864 + :tex-id (new 'static 'texture-id :index #xe :page #x4) + ) + ) + +;; definition for symbol *vehicle-thruster-glow-template*, type sprite-glow-data +(define *vehicle-thruster-glow-template* (new 'static 'sprite-glow-data + :position (new 'static 'vector :w 4096.0) + :size-probe 102.4 + :size-y 4096.0 + :color (new 'static 'rgbaf :x 255.0 :y 64.0 :w 16.0) + :fade-a -0.0000122044 + :fade-b 8.997864 + :tex-id (new 'static 'texture-id :index #xf :page #x4) + ) + ) + +;; definition for method 9 of type vehicle-particle-common-info +;; WARN: Return type mismatch int vs none. +(defmethod init! ((this vehicle-particle-common-info)) + (set! (-> this sp-system2d) *sp-particle-system-2d*) + (set! (-> this sp-system3d) *sp-particle-system-3d*) + (set! (-> this part-quat) *particle-quat*) + (set! (-> this part-vel) *particle-vel*) + (set! (-> this part-thruster) (-> *part-id-table* 922)) + (set! (-> this part-thruster-x) (-> *part-id-table* 922 init-specs 2)) + (set! (-> this part-spec2) (-> *part-id-table* 922 init-specs 3)) + (set! (-> this headlight-glow-template) *vehicle-headlight-glow-template*) + (set! (-> this taillight-glow-template) *vehicle-taillight-glow-template*) + (set! (-> this thruster-glow-template) *vehicle-thruster-glow-template*) + 0 + (none) + ) + +;; definition for symbol *vehicle-particle-common-info*, type vehicle-particle-common-info +(define *vehicle-particle-common-info* (new 'static 'vehicle-particle-common-info)) + +;; failed to figure out what this is: +(init! *vehicle-particle-common-info*) + +;; definition for method 78 of type vehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-78 ((this vehicle)) + (local-vars (sv-224 sparticle-launcher) (sv-228 sparticle-launcher)) + (let ((a1-0 (-> this clock)) + (a0-1 (-> this traffic-priority-id)) + ) + (when (not (logtest? (logxor a0-1 (-> a1-0 integral-frame-counter)) 31)) + (let ((f0-1 + (+ (-> *time-of-day-context* time) (* 0.048387095 (the float (logand (-> this traffic-priority-id) 31)))) + ) + ) + (cond + ((and (logtest? (-> this v-flags) (vehicle-flag riding)) (or (< f0-1 7.0) (< 19.0 f0-1))) + (if (not (logtest? (vehicle-flag lights-on) (-> this v-flags))) + (vehicle-method-125 this) + ) + ) + (else + (if (logtest? (vehicle-flag lights-on) (-> this v-flags)) + (vehicle-method-126 this) + ) + ) + ) + ) + ) + ) + (when (logtest? (vehicle-flag lights-update) (-> this v-flags)) + (let ((f30-0 (if (logtest? (vehicle-flag lights-on) (-> this v-flags)) + 1.0 + 0.0 + ) + ) + ) + (seek! (-> this lights-factor) f30-0 (* 2.0 (seconds-per-frame))) + (if (= (-> this lights-factor) f30-0) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag lights-update)))) + ) + ) + ) + (let ((s5-0 (new 'stack-no-clear 'vehicle-stack-type3))) + (let* ((v1-38 (-> s5-0 mat0)) + (a3-0 (-> this node-list data 0 bone transform)) + (a0-14 (-> a3-0 rvec quad)) + (a1-3 (-> a3-0 uvec quad)) + (a2-1 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-38 rvec quad) a0-14) + (set! (-> v1-38 uvec quad) a1-3) + (set! (-> v1-38 fvec quad) a2-1) + (set! (-> v1-38 trans quad) a3-1) + ) + (set-vector! (-> s5-0 vec1) 0.0 0.0 -1.0 1.0) + (vector-rotate*! (-> s5-0 vec1) (-> s5-0 vec1) (-> s5-0 mat0)) + (set! (-> this fog-fade) (calc-fade-from-fog (-> this root trans))) + (set! (-> s5-0 float1) (* (-> this fog-fade) (-> this lights-factor))) + (when (< 0.0 (-> s5-0 float1)) + (dotimes (s4-0 (-> this info particles headlight-count)) + (quad-copy! + (the-as pointer (-> s5-0 glow)) + (the-as pointer (-> this info particle-common headlight-glow-template)) + 4 + ) + (vector-matrix*! (-> s5-0 vec0) (-> this info particles headlight-local-pos s4-0) (-> s5-0 mat0)) + (let* ((v1-46 (-> s5-0 glow)) + (a1-8 (-> s5-0 vec0)) + (f0-15 (-> v1-46 position w)) + ) + (set! (-> v1-46 position quad) (-> a1-8 quad)) + (set! (-> v1-46 position w) f0-15) + ) + 0 + (set! (-> s5-0 glow rot-angle) (* 182.04445 (rand-vu-float-range -17.0 -13.0))) + (set! (-> s5-0 glow color x) 255.0) + (set! (-> s5-0 glow color y) (rand-vu-float-range 192.0 255.0)) + (set! (-> s5-0 glow color w) (* (-> s5-0 float1) (rand-vu-float-range 16.0 18.0))) + (add! *simple-sprite-system* (-> s5-0 glow)) + (let ((f0-22 (-> this camera-dist2)) + (f1-7 245760.0) + ) + (when (< f0-22 (* f1-7 f1-7)) + (let ((f0-23 3276.8)) + (set! (-> s5-0 glow position w) f0-23) + (set! (-> s5-0 glow size-y) f0-23) + ) + (set! (-> s5-0 glow fade-a) -0.00001356) + (set! (-> s5-0 glow fade-b) 2.3332994) + (set! (-> s5-0 glow color z) (rand-vu-float-range 128.0 160.0)) + (set! (-> s5-0 glow color w) (* (-> s5-0 float1) (rand-vu-float-range 32.0 36.0))) + (add! *simple-sprite-system* (-> s5-0 glow)) + ) + ) + ) + (quad-copy! + (the-as pointer (-> s5-0 glow)) + (the-as pointer (-> this info particle-common taillight-glow-template)) + 4 + ) + (dotimes (s4-1 (-> this info particles taillight-count)) + (vector-matrix*! (-> s5-0 vec0) (-> this info particles taillight-local-pos s4-1) (-> s5-0 mat0)) + (let* ((v1-70 (-> s5-0 glow)) + (a1-20 (-> s5-0 vec0)) + (f0-29 (-> v1-70 position w)) + ) + (set! (-> v1-70 position quad) (-> a1-20 quad)) + (set! (-> v1-70 position w) f0-29) + ) + 0 + (set! (-> s5-0 glow rot-angle) (* 182.04445 (rand-vu-float-range -4.0 4.0))) + (set! (-> s5-0 glow color y) (* 64.0 (rand-vu))) + (set! (-> s5-0 glow color w) (* (-> s5-0 float1) (rand-vu-float-range 16.0 21.0))) + (add! *simple-sprite-system* (-> s5-0 glow)) + ) + ) + (when (logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (when (logtest? (vehicle-flag ignition) (-> this v-flags)) + (set! (-> *part-id-table* 923 init-specs 2 initial-valuef) + (* 6.0 (+ 0.25 (-> this engine-power-factor)) (rand-vu)) + ) + (let* ((f0-39 1.0) + (f1-12 (-> this engine-power-factor)) + (f0-40 (- f0-39 (* f1-12 f1-12))) + ) + (set! (-> *part-id-table* 923 init-specs 9 initial-valuef) (* 16.0 f0-40)) + (set! (-> *part-id-table* 923 init-specs 9 random-rangef) (* 48.0 f0-40)) + ) + (set! (-> s5-0 float0) + (* 0.2 (-> this info handling max-engine-thrust) (+ 0.5 (-> this engine-power-factor))) + ) + (let ((s4-2 (-> *part-id-table* 923))) + (dotimes (s3-0 2) + (vector-matrix*! (-> s5-0 vec0) (-> this info particles exhaust-local-pos s3-0) (-> s5-0 mat0)) + (vector-rotate*! (-> s5-0 vec1) (-> this info particles exhaust-local-dir s3-0) (-> s5-0 mat0)) + (vector+float*! (-> s5-0 vec2) (-> this rbody lin-velocity) (-> s5-0 vec1) (-> s5-0 float0)) + (let ((v1-116 (-> this info particle-common part-vel)) + (a0-40 (-> s5-0 vec2)) + (f0-46 300.0) + ) + (vector-float*! v1-116 a0-40 (/ 1.0 f0-46)) + ) + (set! (-> s4-2 birthaccum) (the-as float (-> this exhaust-part-accum s3-0))) + (let ((t9-23 sp-launch-particles-var) + (a0-41 (-> this info particle-common sp-system2d)) + (a1-33 s4-2) + (a2-9 *launch-matrix*) + ) + (set! (-> a2-9 trans quad) (-> s5-0 vec0 quad)) + (t9-23 a0-41 a1-33 a2-9 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (set! (-> this exhaust-part-accum s3-0) (the-as sparticle-launch-control (-> s4-2 birthaccum))) + ) + ) + ) + (when (< (-> this hit-points) 0.75) + (let* ((f28-1 (+ -32768.0 (* 32768.0 (rand-vu)))) + (f24-0 (* 65536.0 (rand-vu))) + (f30-10 (cos f28-1)) + (f28-2 (sin f28-1)) + (f26-0 (cos f24-0)) + ) + (set! (-> s5-0 vec3 x) (* f30-10 (sin f24-0))) + (set! (-> s5-0 vec3 y) f28-2) + (set! (-> s5-0 vec3 z) (* f30-10 f26-0)) + ) + (set! sv-224 (the-as sparticle-launcher #f)) + (set! sv-228 (the-as sparticle-launcher #f)) + (cond + ((< (-> this hit-points) 0.25) + (set! sv-224 (-> *part-id-table* 925)) + (set! sv-228 (-> *part-id-table* 921)) + ) + ((< (-> this hit-points) 0.5) + (set! sv-224 (-> *part-id-table* 928)) + ) + (else + (if (< (rand-vu) 0.05) + (set! sv-224 (-> *part-id-table* 930)) + ) + ) + ) + (when sv-224 + (set! (-> s5-0 byte0) 0) + (dotimes (s4-3 2) + (vector-matrix*! (-> s5-0 vec0) (-> this info particles smoke-local-pos s4-3) (-> s5-0 mat0)) + (vector-rotate*! (-> s5-0 vec2) (-> this info particles smoke-local-vel s4-3) (-> s5-0 mat0)) + (vector+! (-> s5-0 vec2) (-> s5-0 vec2) (-> this rbody lin-velocity)) + (vector+float*! (-> s5-0 vec2) (-> s5-0 vec2) (-> s5-0 vec3) (* 24576.0 (rand-vu))) + (let ((v1-155 (-> this info particle-common part-vel)) + (a0-50 (-> s5-0 vec2)) + (f0-63 300.0) + ) + (vector-float*! v1-155 a0-50 (/ 1.0 f0-63)) + ) + (when (and sv-228 (< (rand-vu) 0.005)) + (let ((t9-35 sp-launch-particles-var) + (a0-51 (-> this info particle-common sp-system2d)) + (a1-43 sv-228) + (a2-12 *launch-matrix*) + ) + (set! (-> a2-12 trans quad) (-> s5-0 vec0 quad)) + (t9-35 a0-51 a1-43 a2-12 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (+! (-> s5-0 byte0) 1) + ) + (set! (-> sv-224 birthaccum) (the-as float (-> this smoke-part-accum s4-3))) + (let ((t9-36 sp-launch-particles-var) + (a0-52 (-> this info particle-common sp-system2d)) + (a1-44 sv-224) + (a2-13 *launch-matrix*) + ) + (set! (-> a2-13 trans quad) (-> s5-0 vec0 quad)) + (t9-36 a0-52 a1-44 a2-13 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + (set! (-> this smoke-part-accum s4-3) (the-as sparticle-launch-control (-> sv-224 birthaccum))) + ) + (if (> (-> s5-0 byte0) 0) + (sound-play "damage-zaps" :id (-> this damage-zap-sound-id)) + ) + ) + ) + (when (>= (-> this scrape-sound-envelope) 0.75) + (let ((a1-46 (-> *part-id-table* 920)) + (t9-38 sp-launch-particles-var) + (a0-55 (-> this info particle-common sp-system2d)) + (a2-15 *launch-matrix*) + ) + (set! (-> a2-15 trans quad) (-> this impact-pos quad)) + (t9-38 a0-55 a1-46 a2-15 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function vehicle-draw-thruster +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun vehicle-draw-thruster ((arg0 vehicle-particle-common-info) (arg1 vehicle-draw-thruster-params)) + (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 'vehicle-thruster-work))) + (set! (-> s5-0 vec2 quad) (-> arg1 trans quad)) + (quaternion-copy! (-> s5-0 quat1) (-> arg1 quat)) + (quaternion-rotate-local-x! (-> s5-0 quat1) (-> s5-0 quat1) 32768.0) + (quaternion->matrix (the-as matrix (-> s5-0 quat0)) (-> s5-0 quat1)) + (set! (-> s5-0 vec4 quad) (-> s5-0 vec0 quad)) + (let ((f0-0 (rand-vu-float-range 1.0 1.33))) + (set! (-> s5-0 float0) (* f0-0 (-> arg1 length) (-> arg1 thrust))) + (set! (-> s5-0 float1) (fmin (* (-> arg1 width) f0-0) (* 0.5 (-> s5-0 float0)))) + ) + (let ((a1-5 (-> s5-0 vec3))) + (let ((v1-4 (-> arg1 trans))) + (let ((a0-9 (-> s5-0 vec4))) + (let ((a2-2 (* 0.25 (-> s5-0 float0)))) + (.mov vf7 a2-2) + ) + (.lvf vf5 (&-> a0-9 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-5 quad) vf6) + ) + (quad-copy! (the-as pointer (-> s5-0 glow)) (the-as pointer (-> arg0 thruster-glow-template)) 4) + (let* ((v1-5 (-> s5-0 glow)) + (a1-7 (-> s5-0 vec3)) + (f0-5 (-> v1-5 position w)) + ) + (set! (-> v1-5 position quad) (-> a1-7 quad)) + (set! (-> v1-5 position w) f0-5) + ) + 0 + (set! (-> s5-0 glow color y) (rand-vu-float-range 0.0 64.0)) + (set! (-> s5-0 glow color w) (* (-> arg1 fog-fade) (+ (* 16.0 (-> arg1 thrust)) (* 4.0 (rand-vu))))) + (let ((f0-13 (* 4.0 (-> s5-0 float1)))) + (set! (-> s5-0 glow position w) f0-13) + (set! (-> s5-0 glow size-y) f0-13) + (set! (-> s5-0 glow size-probe) (* 0.025 f0-13)) + ) + (add! *simple-sprite-system* (-> s5-0 glow)) + (let ((v1-15 (-> s5-0 vec3))) + (let ((a0-14 (-> arg1 trans))) + (let ((a1-11 (-> s5-0 vec4))) + (let ((a2-5 (* 0.5 (-> s5-0 float0)))) + (.mov vf7 a2-5) + ) + (.lvf vf5 (&-> a1-11 quad)) + ) + (.lvf vf4 (&-> a0-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 (&-> v1-15 quad) vf6) + ) + (set! (-> arg0 part-thruster-x initial-valuef) (-> s5-0 float1)) + (set! (-> arg0 part-spec2 initial-valuef) (-> s5-0 float0)) + (set! (-> s5-0 vec1 quad) (-> s5-0 vec3 quad)) + (launch-particles + :system (-> arg0 sp-system3d) + (-> arg0 part-thruster) + (the-as matrix (-> s5-0 quat0)) + :origin-is-matrix #t + ) + (quaternion-rotate-local-z! (-> s5-0 quat1) (-> s5-0 quat1) 10922.667) + (quaternion->matrix (the-as matrix (-> s5-0 quat0)) (-> s5-0 quat1)) + (set! (-> s5-0 vec1 quad) (-> s5-0 vec3 quad)) + (launch-particles + :system (-> arg0 sp-system3d) + (-> arg0 part-thruster) + (the-as matrix (-> s5-0 quat0)) + :origin-is-matrix #t + ) + (quaternion-rotate-local-z! (-> s5-0 quat1) (-> s5-0 quat1) 10922.667) + (quaternion->matrix (the-as matrix (-> s5-0 quat0)) (-> s5-0 quat1)) + (set! (-> s5-0 vec1 quad) (-> s5-0 vec3 quad)) + (launch-particles + :system (-> arg0 sp-system3d) + (-> arg0 part-thruster) + (the-as matrix (-> s5-0 quat0)) + :origin-is-matrix #t + ) + ) + 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 new file mode 100644 index 0000000000..4cc1b6fe95 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-h_REF.gc @@ -0,0 +1,1462 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type vehicle-info +(deftype vehicle-info (structure) + ((handle-by-vehicle-type handle 44) + ) + ) + +;; definition for method 3 of type vehicle-info +(defmethod inspect ((this vehicle-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-info) + (format #t "~1Thandle-by-vehicle-type[44] @ #x~X~%" (-> this handle-by-vehicle-type)) + (label cfg-4) + this + ) + +;; definition of type vehicle-lookup-info +(deftype vehicle-lookup-info (structure) + ((turn-radius meters) + (throttle-turning float) + (throttle-straight float) + ) + ) + +;; definition for method 3 of type vehicle-lookup-info +(defmethod inspect ((this vehicle-lookup-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-lookup-info) + (format #t "~1Tturn-radius: (meters ~m)~%" (-> this turn-radius)) + (format #t "~1Tthrottle-turning: ~f~%" (-> this throttle-turning)) + (format #t "~1Tthrottle-straight: ~f~%" (-> this throttle-straight)) + (label cfg-4) + this + ) + +;; definition of type vehicle-control-point +(deftype vehicle-control-point (structure) + ((local-pos vector :inline) + (normal vector :inline) + ) + ) + +;; definition for method 3 of type vehicle-control-point +(defmethod inspect ((this vehicle-control-point)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-control-point) + (format #t "~1Tlocal-pos: #~%" (-> this local-pos)) + (format #t "~1Tnormal: #~%" (-> this normal)) + (label cfg-4) + this + ) + +;; definition of type vehicle-attach-point +(deftype vehicle-attach-point (structure) + ((local-pos vector :inline) + (rot vector :inline) + ) + ) + +;; definition for method 3 of type vehicle-attach-point +(defmethod inspect ((this vehicle-attach-point)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-attach-point) + (format #t "~1Tlocal-pos: #~%" (-> this local-pos)) + (format #t "~1Trot: #~%" (-> this rot)) + (label cfg-4) + this + ) + +;; definition of type vehicle-wheel-info +(deftype vehicle-wheel-info (structure) + ((local-pos vector :inline) + (flags vehicle-wheel-flag) + (callback (function rigid-body-object vehicle-wheel-state vehicle-wheel-info none)) + (inertia float) + (radius float) + (susp-arm-length float) + (steer-arm-length float) + (scale float) + (travel float) + (probe-y-offset float) + (width float) + (suspension-spring float) + (suspension-damping float) + (forward-grip float) + (side-grip float) + (max-brake-torque float) + (camber float) + (settle-pos float) + (probe-radius float) + (tread-texture string) + (tread-tid texture-id) + ) + ) + +;; definition for method 3 of type vehicle-wheel-info +(defmethod inspect ((this vehicle-wheel-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-wheel-info) + (format #t "~1Tlocal-pos: #~%" (-> this local-pos)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tcallback: ~A~%" (-> this callback)) + (format #t "~1Tinertia: ~f~%" (-> this inertia)) + (format #t "~1Tradius: ~f~%" (-> this radius)) + (format #t "~1Tsusp-arm-length: ~f~%" (-> this susp-arm-length)) + (format #t "~1Tsteer-arm-length: ~f~%" (-> this steer-arm-length)) + (format #t "~1Tscale: ~f~%" (-> this scale)) + (format #t "~1Ttravel: ~f~%" (-> this travel)) + (format #t "~1Tprobe-y-offset: ~f~%" (-> this probe-y-offset)) + (format #t "~1Twidth: ~f~%" (-> this width)) + (format #t "~1Tsuspension-spring: ~f~%" (-> this suspension-spring)) + (format #t "~1Tsuspension-damping: ~f~%" (-> this suspension-damping)) + (format #t "~1Tforward-grip: ~f~%" (-> this forward-grip)) + (format #t "~1Tside-grip: ~f~%" (-> this side-grip)) + (format #t "~1Tmax-brake-torque: ~f~%" (-> this max-brake-torque)) + (format #t "~1Tcamber: ~f~%" (-> this camber)) + (format #t "~1Tsettle-pos: ~f~%" (-> this settle-pos)) + (format #t "~1Tprobe-radius: ~f~%" (-> this probe-radius)) + (format #t "~1Ttread-texture: ~A~%" (-> this tread-texture)) + (format #t "~1Ttread-tid: ~D~%" (-> this tread-tid)) + (label cfg-4) + this + ) + +;; definition of type vehicle-engine-info +(deftype vehicle-engine-info (structure) + ((max-torque float) + (inertia float) + (drag float) + (idle-rpm float) + (clutch-min-rpm float) + (clutch-max-rpm float) + (min-rpm float) + (max-rpm float) + (peak-torque-rpm float) + (powerband-width-rpm float) + ) + :pack-me + ) + +;; definition for method 3 of type vehicle-engine-info +(defmethod inspect ((this vehicle-engine-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-engine-info) + (format #t "~1Tmax-torque: ~f~%" (-> this max-torque)) + (format #t "~1Tinertia: ~f~%" (-> this inertia)) + (format #t "~1Tdrag: ~f~%" (-> this drag)) + (format #t "~1Tidle-rpm: ~f~%" (-> this idle-rpm)) + (format #t "~1Tclutch-min-rpm: ~f~%" (-> this clutch-min-rpm)) + (format #t "~1Tclutch-max-rpm: ~f~%" (-> this clutch-max-rpm)) + (format #t "~1Tmin-rpm: ~f~%" (-> this min-rpm)) + (format #t "~1Tmax-rpm: ~f~%" (-> this max-rpm)) + (format #t "~1Tpeak-torque-rpm: ~f~%" (-> this peak-torque-rpm)) + (format #t "~1Tpowerband-width-rpm: ~f~%" (-> this powerband-width-rpm)) + (label cfg-4) + this + ) + +;; definition of type vehicle-transmission-info +(deftype vehicle-transmission-info (structure) + ((inertia float) + (upshift-rpm float) + (downshift-rpm float) + (final-drive-ratio float) + (gear-ratio-array float 8) + (gear-count int8) + ) + ) + +;; definition for method 3 of type vehicle-transmission-info +(defmethod inspect ((this vehicle-transmission-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-transmission-info) + (format #t "~1Tinertia: ~f~%" (-> this inertia)) + (format #t "~1Tupshift-rpm: ~f~%" (-> this upshift-rpm)) + (format #t "~1Tdownshift-rpm: ~f~%" (-> this downshift-rpm)) + (format #t "~1Tfinal-drive-ratio: ~f~%" (-> this final-drive-ratio)) + (format #t "~1Tgear-ratio-array[8] @ #x~X~%" (-> this gear-ratio-array)) + (format #t "~1Tgear-count: ~D~%" (-> this gear-count)) + (label cfg-4) + this + ) + +;; definition of type vehicle-handling-info +(deftype vehicle-handling-info (structure) + ((max-engine-thrust meters) + (inv-max-engine-thrust float) + (engine-response-rate float) + (engine-intake-factor float) + (brake-factor float) + (turbo-boost-factor float) + (turbo-boost-duration uint16) + (max-xz-speed meters) + (player-turn-anim-bias float) + (player-turn-anim-min float) + (player-turn-anim-max float) + (pilot-x-accel-factor float) + (pilot-y-accel-factor float) + (pilot-z-accel-factor float) + (ground-probe-distance meters) + (ground-probe-offset meters) + (cos-ground-effect-angle float) + (spring-lift-factor float) + (air-steering-factor float) + (air-drag-factor float) + (steering-fin-angle float) + (steering-thruster-factor float) + (steering-thruster-max-gain float) + (steering-thruster-half-gain-speed meters) + (tire-steering-angle float) + (tire-steering-speed-factor float) + (tire-steering-speed-bias float) + (ackermann-factor float) + (tire-friction-factor float) + (tire-static-friction float) + (tire-static-friction-speed meters) + (tire-dynamic-friction float) + (tire-dynamic-friction-speed meters) + (tire-inv-max-friction-speed float) + (airfoil-factor float) + (drag-force-factor float) + (rolling-resistance float) + (speed-scrubbing-drag float) + (speed-limiting-drag float) + (pitch-control-factor float) + (roll-control-factor float) + (roll-angle float) + (jump-thrust-factor float) + (buoyancy-factor float) + (water-drag-factor float) + (player-weight float) + (player-shift-x meters) + (player-shift-z meters) + (air-roll-torque float) + (air-pitch-torque float) + (air-angular-damping float) + (hop-turn-torque float) + (ground-torque-scale float) + (ai-steering-factor float) + (ai-throttle-factor float) + ) + :pack-me + ) + +;; definition for method 3 of type vehicle-handling-info +(defmethod inspect ((this vehicle-handling-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-handling-info) + (format #t "~1Tmax-engine-thrust: (meters ~m)~%" (-> this max-engine-thrust)) + (format #t "~1Tinv-max-engine-thrust: ~f~%" (-> this inv-max-engine-thrust)) + (format #t "~1Tengine-response-rate: ~f~%" (-> this engine-response-rate)) + (format #t "~1Tengine-intake-factor: ~f~%" (-> this engine-intake-factor)) + (format #t "~1Tbrake-factor: ~f~%" (-> this brake-factor)) + (format #t "~1Tturbo-boost-factor: ~f~%" (-> this turbo-boost-factor)) + (format #t "~1Tturbo-boost-duration: ~D~%" (-> this turbo-boost-duration)) + (format #t "~1Tmax-xz-speed: (meters ~m)~%" (-> this max-xz-speed)) + (format #t "~1Tplayer-turn-anim-bias: ~f~%" (-> this player-turn-anim-bias)) + (format #t "~1Tplayer-turn-anim-min: ~f~%" (-> this player-turn-anim-min)) + (format #t "~1Tplayer-turn-anim-max: ~f~%" (-> this player-turn-anim-max)) + (format #t "~1Tpilot-x-accel-factor: ~f~%" (-> this pilot-x-accel-factor)) + (format #t "~1Tpilot-y-accel-factor: ~f~%" (-> this pilot-y-accel-factor)) + (format #t "~1Tpilot-z-accel-factor: ~f~%" (-> this pilot-z-accel-factor)) + (format #t "~1Tground-probe-distance: (meters ~m)~%" (-> this ground-probe-distance)) + (format #t "~1Tground-probe-offset: (meters ~m)~%" (-> this ground-probe-offset)) + (format #t "~1Tcos-ground-effect-angle: ~f~%" (-> this cos-ground-effect-angle)) + (format #t "~1Tspring-lift-factor: ~f~%" (-> this spring-lift-factor)) + (format #t "~1Tair-steering-factor: ~f~%" (-> this air-steering-factor)) + (format #t "~1Tair-drag-factor: ~f~%" (-> this air-drag-factor)) + (format #t "~1Tsteering-fin-angle: ~f~%" (-> this steering-fin-angle)) + (format #t "~1Tsteering-thruster-factor: ~f~%" (-> this steering-thruster-factor)) + (format #t "~1Tsteering-thruster-max-gain: ~f~%" (-> this steering-thruster-max-gain)) + (format #t "~1Tsteering-thruster-half-gain-speed: (meters ~m)~%" (-> this steering-thruster-half-gain-speed)) + (format #t "~1Ttire-steering-angle: ~f~%" (-> this tire-steering-angle)) + (format #t "~1Ttire-steering-speed-factor: ~f~%" (-> this tire-steering-speed-factor)) + (format #t "~1Ttire-steering-speed-bias: ~f~%" (-> this tire-steering-speed-bias)) + (format #t "~1Tackermann-factor: ~f~%" (-> this ackermann-factor)) + (format #t "~1Ttire-friction-factor: ~f~%" (-> this tire-friction-factor)) + (format #t "~1Ttire-static-friction: ~f~%" (-> this tire-static-friction)) + (format #t "~1Ttire-static-friction-speed: (meters ~m)~%" (-> this tire-static-friction-speed)) + (format #t "~1Ttire-dynamic-friction: ~f~%" (-> this tire-dynamic-friction)) + (format #t "~1Ttire-dynamic-friction-speed: (meters ~m)~%" (-> this tire-dynamic-friction-speed)) + (format #t "~1Ttire-inv-max-friction-speed: ~f~%" (-> this tire-inv-max-friction-speed)) + (format #t "~1Tairfoil-factor: ~f~%" (-> this airfoil-factor)) + (format #t "~1Tdrag-force-factor: ~f~%" (-> this drag-force-factor)) + (format #t "~1Trolling-resistance: ~f~%" (-> this rolling-resistance)) + (format #t "~1Tspeed-scrubbing-drag: ~f~%" (-> this speed-scrubbing-drag)) + (format #t "~1Tspeed-limiting-drag: ~f~%" (-> this speed-limiting-drag)) + (format #t "~1Tpitch-control-factor: ~f~%" (-> this pitch-control-factor)) + (format #t "~1Troll-control-factor: ~f~%" (-> this roll-control-factor)) + (format #t "~1Troll-angle: ~f~%" (-> this roll-angle)) + (format #t "~1Tjump-thrust-factor: ~f~%" (-> this jump-thrust-factor)) + (format #t "~1Tbuoyancy-factor: ~f~%" (-> this buoyancy-factor)) + (format #t "~1Twater-drag-factor: ~f~%" (-> this water-drag-factor)) + (format #t "~1Tplayer-weight: ~f~%" (-> this player-weight)) + (format #t "~1Tplayer-shift-x: (meters ~m)~%" (-> this player-shift-x)) + (format #t "~1Tplayer-shift-z: (meters ~m)~%" (-> this player-shift-z)) + (format #t "~1Tair-roll-torque: ~f~%" (-> this air-roll-torque)) + (format #t "~1Tair-pitch-torque: ~f~%" (-> this air-pitch-torque)) + (format #t "~1Tair-angular-damping: ~f~%" (-> this air-angular-damping)) + (format #t "~1Thop-turn-torque: ~f~%" (-> this hop-turn-torque)) + (format #t "~1Tground-torque-scale: ~f~%" (-> this ground-torque-scale)) + (format #t "~1Tai-steering-factor: ~f~%" (-> this ai-steering-factor)) + (format #t "~1Tai-throttle-factor: ~f~%" (-> this ai-throttle-factor)) + (label cfg-4) + this + ) + +;; definition of type vehicle-physics-model-info +(deftype vehicle-physics-model-info (structure) + ((lift-thruster-count int8) + (roll-thruster-count int8) + (stabilizer-count int8) + (inv-lift-thruster-count float) + (lift-thruster-array vehicle-attach-point 4 :inline) + (roll-thruster-array vehicle-attach-point 2 :inline) + (stabilizer-array vehicle-attach-point 6 :inline) + (engine-thrust-local-pos vector :inline) + (brake-local-pos vector :inline) + (wheel-count int8) + (drive-wheel-count int8) + (front-wheel vehicle-wheel-info :inline) + (rear-wheel vehicle-wheel-info :inline) + ) + ) + +;; definition for method 3 of type vehicle-physics-model-info +(defmethod inspect ((this vehicle-physics-model-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-physics-model-info) + (format #t "~1Tlift-thruster-count: ~D~%" (-> this lift-thruster-count)) + (format #t "~1Troll-thruster-count: ~D~%" (-> this roll-thruster-count)) + (format #t "~1Tstabilizer-count: ~D~%" (-> this stabilizer-count)) + (format #t "~1Tinv-lift-thruster-count: ~f~%" (-> this inv-lift-thruster-count)) + (format #t "~1Tlift-thruster-array[4] @ #x~X~%" (-> this lift-thruster-array)) + (format #t "~1Troll-thruster-array[2] @ #x~X~%" (-> this roll-thruster-array)) + (format #t "~1Tstabilizer-array[6] @ #x~X~%" (-> this stabilizer-array)) + (format #t "~1Tengine-thrust-local-pos: #~%" (-> this engine-thrust-local-pos)) + (format #t "~1Tbrake-local-pos: #~%" (-> this brake-local-pos)) + (format #t "~1Twheel-count: ~D~%" (-> this wheel-count)) + (format #t "~1Tdrive-wheel-count: ~D~%" (-> this drive-wheel-count)) + (format #t "~1Tfront-wheel: #~%" (-> this front-wheel)) + (format #t "~1Trear-wheel: #~%" (-> this rear-wheel)) + (label cfg-4) + this + ) + +;; definition of type vehicle-camera-info +(deftype vehicle-camera-info (structure) + ((string-min-height meters) + (string-max-height meters) + (string-min-length meters) + (string-max-length meters) + (min-fov float) + (max-fov float) + (head-offset float) + (foot-offset float) + (normal-max-angle-offset float) + (air-max-angle-offset float) + (max-lookaround-speed float) + (look-pos-array vector 4 :inline) + (look-front vector :inline :overlay-at (-> look-pos-array 0)) + (look-left vector :inline :overlay-at (-> look-pos-array 1)) + (look-right vector :inline :overlay-at (-> look-pos-array 2)) + (look-rear vector :inline :overlay-at (-> look-pos-array 3)) + ) + ) + +;; definition for method 3 of type vehicle-camera-info +(defmethod inspect ((this vehicle-camera-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-camera-info) + (format #t "~1Tstring-min-height: (meters ~m)~%" (-> this string-min-height)) + (format #t "~1Tstring-max-height: (meters ~m)~%" (-> this string-max-height)) + (format #t "~1Tstring-min-length: (meters ~m)~%" (-> this string-min-length)) + (format #t "~1Tstring-max-length: (meters ~m)~%" (-> this string-max-length)) + (format #t "~1Tmin-fov: ~f~%" (-> this min-fov)) + (format #t "~1Tmax-fov: ~f~%" (-> this max-fov)) + (format #t "~1Thead-offset: ~f~%" (-> this head-offset)) + (format #t "~1Tfoot-offset: ~f~%" (-> this foot-offset)) + (format #t "~1Tnormal-max-angle-offset: ~f~%" (-> this normal-max-angle-offset)) + (format #t "~1Tair-max-angle-offset: ~f~%" (-> this air-max-angle-offset)) + (format #t "~1Tmax-lookaround-speed: ~f~%" (-> this max-lookaround-speed)) + (format #t "~1Tlook-pos-array[4] @ #x~X~%" (-> this look-pos-array)) + (format #t "~1Tlook-front: #~%" (-> this look-pos-array)) + (format #t "~1Tlook-left: #~%" (-> this look-left)) + (format #t "~1Tlook-right: #~%" (-> this look-right)) + (format #t "~1Tlook-rear: #~%" (-> this look-rear)) + (label cfg-4) + this + ) + +;; definition of type vehicle-sound-loop-info +(deftype vehicle-sound-loop-info (structure) + ((sound sound-name) + (speed float) + (min-speed float) + (max-speed float) + (pitch-offset float) + (pitch-scale float) + (min-pitch float) + (max-pitch float) + ) + ) + +;; definition for method 3 of type vehicle-sound-loop-info +;; INFO: Used lq/sq +(defmethod inspect ((this vehicle-sound-loop-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-sound-loop-info) + (format #t "~1Tsound: ~D~%" (-> this sound)) + (format #t "~1Tspeed: ~f~%" (-> this speed)) + (format #t "~1Tmin-speed: ~f~%" (-> this min-speed)) + (format #t "~1Tmax-speed: ~f~%" (-> this max-speed)) + (format #t "~1Tpitch-offset: ~f~%" (-> this pitch-offset)) + (format #t "~1Tpitch-scale: ~f~%" (-> this pitch-scale)) + (format #t "~1Tmin-pitch: ~f~%" (-> this min-pitch)) + (format #t "~1Tmax-pitch: ~f~%" (-> this max-pitch)) + (label cfg-4) + this + ) + +;; definition of type vehicle-sound-info +(deftype vehicle-sound-info (structure) + ((engine-pitch-scale float) + (engine-pitch-offset float) + (engine-pitch-mod-amp float) + (engine-sound-select int8) + (thrust-sound sound-name :offset 16) + (scrape-sound sound-name) + (glance-sound sound-name) + (impact-sound sound-name) + (impact2-sound sound-name) + (explode-sound sound-name) + (explode2-sound sound-name) + (extra-sound sound-name) + (water-sound sound-name) + (jump-sound sound-name) + (turbo-sound sound-name) + (damage-sound sound-name) + (bank-replace pair) + (idle-rpm float) + (idle-pitch-scale float) + (idle-crossover-rpm float) + (engine-rpm float) + (engine-crossover-rpm float) + (start-sound sound-name :offset 240) + (stop-sound sound-name) + (idle-sound sound-name) + (engine-sound sound-name) + (engine-load-sound sound-name) + (susp-creak-sound sound-name) + (susp-bottom-out-sound sound-name) + (susp-speed-threshold float) + (tire-roll-sounds vehicle-sound-loop-info 4 :inline) + (tire-slide-sounds vehicle-sound-loop-info 2 :inline) + (tire-roll-hum-sound vehicle-sound-loop-info :inline :overlay-at (-> tire-roll-sounds 0)) + (tire-roll-dirt-sound vehicle-sound-loop-info :inline :offset 416) + (tire-roll-sand-sound vehicle-sound-loop-info :inline :offset 464) + (tire-roll-knobby-sound vehicle-sound-loop-info :inline :offset 512) + (tire-slide-road-sound vehicle-sound-loop-info :inline :overlay-at (-> tire-slide-sounds 0)) + (tire-slide-dirt-sound vehicle-sound-loop-info :inline :offset 608) + ) + ) + +;; definition for method 3 of type vehicle-sound-info +;; INFO: Used lq/sq +(defmethod inspect ((this vehicle-sound-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-sound-info) + (format #t "~1Tengine-pitch-scale: ~f~%" (-> this engine-pitch-scale)) + (format #t "~1Tengine-pitch-offset: ~f~%" (-> this engine-pitch-offset)) + (format #t "~1Tengine-pitch-mod-amp: ~f~%" (-> this engine-pitch-mod-amp)) + (format #t "~1Tengine-sound-select: ~D~%" (-> this engine-sound-select)) + (format #t "~1Tthrust-sound: ~g~%" (-> this thrust-sound)) + (format #t "~1Tscrape-sound: ~g~%" (-> this scrape-sound)) + (format #t "~1Tglance-sound: ~g~%" (-> this glance-sound)) + (format #t "~1Timpact-sound: ~g~%" (-> this impact-sound)) + (format #t "~1Timpact2-sound: ~g~%" (-> this impact2-sound)) + (format #t "~1Texplode-sound: ~g~%" (-> this explode-sound)) + (format #t "~1Texplode2-sound: ~g~%" (-> this explode2-sound)) + (format #t "~1Textra-sound: ~g~%" (-> this extra-sound)) + (format #t "~1Twater-sound: ~g~%" (-> this water-sound)) + (format #t "~1Tjump-sound: ~g~%" (-> this jump-sound)) + (format #t "~1Tturbo-sound: ~g~%" (-> this turbo-sound)) + (format #t "~1Tdamage-sound: ~g~%" (-> this damage-sound)) + (format #t "~1Tbank-replace: ~A~%" (-> this bank-replace)) + (format #t "~1Tidle-rpm: ~f~%" (-> this idle-rpm)) + (format #t "~1Tidle-pitch-scale: ~f~%" (-> this idle-pitch-scale)) + (format #t "~1Tidle-crossover-rpm: ~f~%" (-> this idle-crossover-rpm)) + (format #t "~1Tengine-rpm: ~f~%" (-> this engine-rpm)) + (format #t "~1Tengine-crossover-rpm: ~f~%" (-> this engine-crossover-rpm)) + (format #t "~1Tstart-sound: ~g~%" (-> this start-sound)) + (format #t "~1Tstop-sound: ~g~%" (-> this stop-sound)) + (format #t "~1Tidle-sound: ~g~%" (-> this idle-sound)) + (format #t "~1Tengine-sound: ~g~%" (-> this engine-sound)) + (format #t "~1Tengine-load-sound: ~g~%" (-> this engine-load-sound)) + (format #t "~1Tsusp-creak-sound: ~g~%" (-> this susp-creak-sound)) + (format #t "~1Tsusp-bottom-out-sound: ~g~%" (-> this susp-bottom-out-sound)) + (format #t "~1Tsusp-speed-threshold: ~f~%" (-> this susp-speed-threshold)) + (format #t "~1Ttire-roll-sounds[4] @ #x~X~%" (-> this tire-roll-sounds)) + (format #t "~1Ttire-slide-sounds[2] @ #x~X~%" (-> this tire-slide-sounds)) + (format #t "~1Ttire-roll-hum-sound: #~%" (-> this tire-roll-sounds)) + (format #t "~1Ttire-roll-dirt-sound: #~%" (-> this tire-roll-dirt-sound)) + (format #t "~1Ttire-roll-sand-sound: #~%" (-> this tire-roll-sand-sound)) + (format #t "~1Ttire-roll-knobby-sound: #~%" (-> this tire-roll-knobby-sound)) + (format #t "~1Ttire-slide-road-sound: #~%" (-> this tire-slide-sounds)) + (format #t "~1Ttire-slide-dirt-sound: #~%" (-> this tire-slide-dirt-sound)) + (label cfg-4) + this + ) + +;; definition of type vehicle-particle-info +(deftype vehicle-particle-info (structure) + ((headlight-count int8) + (taillight-count int8) + (thruster-flame-width meters) + (thruster-flame-length meters) + (thruster-local-pos vector 2 :inline) + (exhaust-local-pos vector 2 :inline) + (exhaust-local-dir vector 2 :inline) + (smoke-local-pos vector 2 :inline) + (smoke-local-vel vector 2 :inline) + (headlight-local-pos vector 3 :inline) + (taillight-local-pos vector 2 :inline) + ) + ) + +;; definition for method 3 of type vehicle-particle-info +(defmethod inspect ((this vehicle-particle-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-particle-info) + (format #t "~1Theadlight-count: ~D~%" (-> this headlight-count)) + (format #t "~1Ttaillight-count: ~D~%" (-> this taillight-count)) + (format #t "~1Tthruster-flame-width: (meters ~m)~%" (-> this thruster-flame-width)) + (format #t "~1Tthruster-flame-length: (meters ~m)~%" (-> this thruster-flame-length)) + (format #t "~1Tthruster-local-pos[2] @ #x~X~%" (-> this thruster-local-pos)) + (format #t "~1Texhaust-local-pos[2] @ #x~X~%" (-> this exhaust-local-pos)) + (format #t "~1Texhaust-local-dir[2] @ #x~X~%" (-> this exhaust-local-dir)) + (format #t "~1Tsmoke-local-pos[2] @ #x~X~%" (-> this smoke-local-pos)) + (format #t "~1Tsmoke-local-vel[2] @ #x~X~%" (-> this smoke-local-vel)) + (format #t "~1Theadlight-local-pos[3] @ #x~X~%" (-> this headlight-local-pos)) + (format #t "~1Ttaillight-local-pos[2] @ #x~X~%" (-> this taillight-local-pos)) + (label cfg-4) + this + ) + +;; definition of type vehicle-section-info +(deftype vehicle-section-info (structure) + ((damage-seg-array uint64 3) + (damage-seg-count int8) + ) + :pack-me + ) + +;; definition for method 3 of type vehicle-section-info +(defmethod inspect ((this vehicle-section-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-section-info) + (format #t "~1Tdamage-seg-array[3] @ #x~X~%" (-> this damage-seg-array)) + (format #t "~1Tdamage-seg-count: ~D~%" (-> this damage-seg-count)) + (label cfg-4) + this + ) + +;; definition of type vehicle-damage-info +(deftype vehicle-damage-info (structure) + ((inv-toughness-factor float) + (hit-points float) + (inv-hit-points float) + (hit-threshold float) + (hit-small float) + (hit-big float) + (hit-deadly float) + (impact-damage-factor float) + (section-count int8) + (section-array vehicle-section-info 4 :inline) + (section-bike-front vehicle-section-info :inline :overlay-at (-> section-array 0)) + (section-bike-rear vehicle-section-info :inline :offset 72) + (section-car-front-left vehicle-section-info :inline :overlay-at (-> section-array 0)) + (section-car-rear-left vehicle-section-info :inline :overlay-at section-bike-rear) + (section-car-front-right vehicle-section-info :inline :offset 104) + (section-car-rear-right vehicle-section-info :inline :offset 136) + ) + ) + +;; definition for method 3 of type vehicle-damage-info +(defmethod inspect ((this vehicle-damage-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-damage-info) + (format #t "~1Tinv-toughness-factor: ~f~%" (-> this inv-toughness-factor)) + (format #t "~1Thit-points: ~f~%" (-> this hit-points)) + (format #t "~1Tinv-hit-points: ~f~%" (-> this inv-hit-points)) + (format #t "~1Thit-threshold: ~f~%" (-> this hit-threshold)) + (format #t "~1Thit-small: ~f~%" (-> this hit-small)) + (format #t "~1Thit-big: ~f~%" (-> this hit-big)) + (format #t "~1Thit-deadly: ~f~%" (-> this hit-deadly)) + (format #t "~1Timpact-damage-factor: ~f~%" (-> this impact-damage-factor)) + (format #t "~1Tsection-count: ~D~%" (-> this section-count)) + (format #t "~1Tsection-array[4] @ #x~X~%" (-> this section-array)) + (format #t "~1Tsection-bike-front: #~%" (-> this section-array)) + (format #t "~1Tsection-bike-rear: #~%" (-> this section-bike-rear)) + (format #t "~1Tsection-car-front-left: #~%" (-> this section-array)) + (format #t "~1Tsection-car-rear-left: #~%" (-> this section-bike-rear)) + (format #t "~1Tsection-car-front-right: #~%" (-> this section-car-front-right)) + (format #t "~1Tsection-car-rear-right: #~%" (-> this section-car-rear-right)) + (label cfg-4) + this + ) + +;; definition of type vehicle-setup-info +(deftype vehicle-setup-info (structure) + ((settle-height float) + (settle-rot-x float) + (shadow-bot-clip float) + (shadow-locus-dist float) + (look-select uint8) + (color-option-count int8) + (color-option-select int8) + (color vector) + (gun-yaw-min float) + (gun-yaw-max float) + (gun-pitch-min float) + (gun-pitch-max float) + (gun-z-offset float) + ) + :pack-me + ) + +;; definition for method 3 of type vehicle-setup-info +(defmethod inspect ((this vehicle-setup-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-setup-info) + (format #t "~1Tsettle-height: ~f~%" (-> this settle-height)) + (format #t "~1Tsettle-rot-x: ~f~%" (-> this settle-rot-x)) + (format #t "~1Tshadow-bot-clip: ~f~%" (-> this shadow-bot-clip)) + (format #t "~1Tshadow-locus-dist: ~f~%" (-> this shadow-locus-dist)) + (format #t "~1Tlook-select: ~D~%" (-> this look-select)) + (format #t "~1Tcolor-option-count: ~D~%" (-> this color-option-count)) + (format #t "~1Tcolor-option-select: ~D~%" (-> this color-option-select)) + (format #t "~1Tgun-yaw-min: ~f~%" (-> this gun-yaw-min)) + (format #t "~1Tgun-yaw-max: ~f~%" (-> this gun-yaw-max)) + (format #t "~1Tgun-pitch-min: ~f~%" (-> this gun-pitch-min)) + (format #t "~1Tgun-pitch-max: ~f~%" (-> this gun-pitch-max)) + (format #t "~1Tgun-z-offset: ~f~%" (-> this gun-z-offset)) + (label cfg-4) + this + ) + +;; definition of type vehicle-seat-info +(deftype vehicle-seat-info (structure) + ((data uint8 16) + (position vector :inline :overlay-at (-> data 0)) + (pos-x float :overlay-at (-> data 0)) + (pos-y float :overlay-at (-> data 4)) + (pos-z float :overlay-at (-> data 8)) + (angle int16 :overlay-at (-> data 12)) + (flags vehicle-seat-flag :overlay-at (-> data 14)) + ) + ) + +;; definition for method 3 of type vehicle-seat-info +(defmethod inspect ((this vehicle-seat-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-seat-info) + (format #t "~1Tdata[16] @ #x~X~%" (-> this position)) + (format #t "~1Tposition: #~%" (-> 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 "~1Tflags: ~D~%" (-> this flags)) + (label cfg-4) + this + ) + +;; definition of type vehicle-grab-rail-info +(deftype vehicle-grab-rail-info (structure) + ((local-pos vector 2 :inline) + (normal vector :inline) + ) + ) + +;; definition for method 3 of type vehicle-grab-rail-info +(defmethod inspect ((this vehicle-grab-rail-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-grab-rail-info) + (format #t "~1Tlocal-pos[2] @ #x~X~%" (-> this local-pos)) + (format #t "~1Tnormal: #~%" (-> this normal)) + (label cfg-4) + this + ) + +;; definition of type vehicle-rider-info +(deftype vehicle-rider-info (structure) + ((seat-count int8) + (rider-stance uint8) + (grab-rail-count int8) + (attach-point-count int8) + (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)) + ) + ) + +;; definition for method 3 of type vehicle-rider-info +(defmethod inspect ((this vehicle-rider-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-rider-info) + (format #t "~1Tseat-count: ~D~%" (-> this seat-count)) + (format #t "~1Trider-stance: ~D~%" (-> this rider-stance)) + (format #t "~1Tgrab-rail-count: ~D~%" (-> this grab-rail-count)) + (format #t "~1Tattach-point-count: ~D~%" (-> this attach-point-count)) + (format #t "~1Tgrab-rail-array: #x~X~%" (-> this grab-rail-array)) + (format #t "~1Tseat-array[4] @ #x~X~%" (-> this seat-array)) + (format #t "~1Trider-hand-offset[2] @ #x~X~%" (-> this rider-hand-offset)) + (format #t "~1Tattach-point-array: #x~X~%" (-> this attach-point-array)) + (label cfg-4) + this + ) + +;; definition of type vehicle-explosion-info +(deftype vehicle-explosion-info (joint-exploder-static-params) + ((skel skeleton-group) + (skel-name string) + (anim int32) + ) + ) + +;; definition for method 3 of type vehicle-explosion-info +;; INFO: Used lq/sq +(defmethod inspect ((this vehicle-explosion-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tjoints: ~A~%" (-> this joints)) + (format #t "~1Tcollide-spec: ~D~%" (-> this collide-spec)) + (format #t "~1Tart-level: ~A~%" (-> this art-level)) + (format #t "~1Tcollide-sound: ~D~%" (-> this collide-sound)) + (format #t "~1Tcollide-sound-interval: ~D~%" (-> this collide-sound-interval)) + (format #t "~1Tskel: ~A~%" (-> this skel)) + (format #t "~1Tskel-name: ~A~%" (-> this skel-name)) + (format #t "~1Tanim: ~D~%" (-> this anim)) + (label cfg-4) + this + ) + +;; definition of type vehicle-particle-common-info +(deftype vehicle-particle-common-info (structure) + ((sp-system2d sparticle-system) + (sp-system3d sparticle-system) + (part-thruster sparticle-launcher) + (part-thruster-x sp-field-init-spec) + (part-spec2 sp-field-init-spec) + (part-quat quaternion) + (part-vel vector) + (headlight-glow-template sprite-glow-data) + (taillight-glow-template sprite-glow-data) + (thruster-glow-template sprite-glow-data) + ) + (:methods + (init! (_type_) none) + ) + ) + +;; definition for method 3 of type vehicle-particle-common-info +(defmethod inspect ((this vehicle-particle-common-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-particle-common-info) + (format #t "~1Theadlight-glow-template: #~%" (-> this headlight-glow-template)) + (format #t "~1Ttaillight-glow-template: #~%" (-> this taillight-glow-template)) + (format #t "~1Tthruster-glow-template: #~%" (-> this thruster-glow-template)) + (label cfg-4) + this + ) + +;; definition of type rigid-body-vehicle-constants +(deftype rigid-body-vehicle-constants (rigid-body-object-constants) + ((flags uint32) + (object-type uint8) + (guard-type uint8) + (vehicle-type vehicle-type-u8) + (engine vehicle-engine-info :inline) + (transmission vehicle-transmission-info :inline) + (handling vehicle-handling-info :inline) + (target-speed-offset meters) + (turning-accel meters) + (camera vehicle-camera-info :inline) + (sound vehicle-sound-info :inline) + (particles vehicle-particle-info :inline) + (damage vehicle-damage-info :inline) + (physics-model vehicle-physics-model-info :inline) + (setup vehicle-setup-info :inline) + (rider vehicle-rider-info :inline) + (explosion vehicle-explosion-info) + (explosion-part int32) + (debris debris-static-params) + (name-text text-id) + (particle-common vehicle-particle-common-info) + ) + (:methods + (init-part! (_type_) none) + ) + ) + +;; definition for method 3 of type rigid-body-vehicle-constants +(defmethod inspect ((this rigid-body-vehicle-constants)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'rigid-body-vehicle-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 "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tobject-type: ~D~%" (-> this object-type)) + (format #t "~1Tguard-type: ~D~%" (-> this guard-type)) + (format #t "~1Tvehicle-type: ~D~%" (-> this vehicle-type)) + (format #t "~1Tengine: #~%" (-> this engine)) + (format #t "~1Ttransmission: #~%" (-> this transmission)) + (format #t "~1Thandling: #~%" (-> this handling)) + (format #t "~1Ttarget-speed-offset: (meters ~m)~%" (-> this target-speed-offset)) + (format #t "~1Tturning-accel: (meters ~m)~%" (-> this turning-accel)) + (format #t "~1Tcamera: #~%" (-> this camera)) + (format #t "~1Tsound: #~%" (-> this sound)) + (format #t "~1Tparticles: #~%" (-> this particles)) + (format #t "~1Tdamage: #~%" (-> this damage)) + (format #t "~1Tphysics-model: #~%" (-> this physics-model)) + (format #t "~1Tsetup: #~%" (-> this setup)) + (format #t "~1Trider: #~%" (-> this rider)) + (format #t "~1Texplosion: ~A~%" (-> this explosion)) + (format #t "~1Texplosion-part: ~D~%" (-> this explosion-part)) + (format #t "~1Tdebris: ~A~%" (-> this debris)) + (format #t "~1Tname-text: ~D~%" (-> this name-text)) + (format #t "~1Tparticle-common: #~%" (-> this particle-common)) + (label cfg-4) + this + ) + +;; definition of type vehicle-section +(deftype vehicle-section (structure) + ((damage float) + ) + :allow-misaligned + ) + +;; definition for method 3 of type vehicle-section +(defmethod inspect ((this vehicle-section)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-section) + (format #t "~1Tdamage: ~f~%" (-> this damage)) + (label cfg-4) + this + ) + +;; definition of type vehicle +(deftype vehicle (rigid-body-object) + ((info rigid-body-vehicle-constants :override) + (v-flags vehicle-flag :overlay-at flags) + (unknown-flags vehicle-flag :offset 296) + (squad squad-control) + (control-hook (function vehicle vehicle-controls)) + (controls vehicle-controls :inline) + (prev-controls vehicle-controls :inline) + (engine-power-factor float) + (force-scale float) + (target-distance2 meters) + (water-flags uint32) + (target-acceleration vector :inline) + (impact-pos vector :inline) + (impact-local-pos vector :inline) + (lin-acceleration vector :inline) + (hit-points float) + (damage-factor float) + (crash-level int8) + (force-level int8) + (traffic-hash-id int8) + (traffic-priority-id int8) + (power-fluctuation-factor float) + (power-level float) + (overlap-player-counter uint8) + (physics-counter uint8) + (cam-view int8) + (brake-factor float) + (cam-speed-interp float) + (camera-dist2 float) + (player-dist2 float) + (bound-radius float) + (rider-array handle 4) + (impact-proc handle) + (impact-pat uint32) + (impact-time uint32) + (prev-impact-time uint32) + (sent-attack-time uint32) + (air-time uint32) + (water-time uint32) + (offscreen-time uint32) + (crash-time uint32) + (turbo-boost-time uint32) + (player-dismount-time uint32) + (crash-duration uint16) + (turbo-boost-duration uint16) + (turbo-boost-factor float) + (crash-impulse float) + (water-height float) + (lights-factor float) + (outgoing-attack-id uint32) + (fog-fade float) + (scrape-sound-id sound-id) + (damage-zap-sound-id sound-id) + (scrape-sound-envelope float) + (exhaust-part-accum sparticle-launch-control 2) + (smoke-part-accum sparticle-launch-control 2) + (section-array vehicle-section 4 :inline) + ) + (:state-methods + inactive + waiting + player-control + crash + explode + die + ) + (:methods + (vehicle-method-62 (_type_) none) + (vehicle-method-63 (_type_) none) + (vehicle-method-64 (_type_) none) + (vehicle-method-65 (_type_) int) + (vehicle-method-66 (_type_ vector int) none) + (get-rider-in-seat (_type_ int) process) + (vehicle-method-68 (_type_) process) + (put-rider-in-seat (_type_ int process) 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) + (vehicle-method-74 (_type_ int time-frame) none) + (vehicle-method-75 (_type_) none) + (vehicle-method-76 (_type_) none) + (vehicle-method-77 (_type_) none) + (vehicle-method-78 (_type_) none) + (vehicle-method-79 (_type_) none) + (vehicle-method-80 (_type_) none) + (vehicle-method-81 (_type_) none) + (vehicle-method-82 (_type_) none) + (vehicle-method-83 (_type_) none) + (vehicle-method-84 (_type_) none) + (vehicle-method-85 (_type_) none) + (vehicle-method-86 (_type_) none) + (vehicle-method-87 (_type_) none) + (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) + (vehicle-method-92 (_type_ vehicle-controls) none) + (vehicle-method-93 (_type_) none) + (vehicle-method-94 (_type_) none) + (vehicle-method-95 (_type_ vector float) none) + (vehicle-method-96 (_type_ float) none) + (vehicle-method-97 (_type_ float vehicle-physics-work) none) + (vehicle-method-98 (_type_) none) + (vehicle-method-99 (_type_) none) + (vehicle-method-100 (_type_) none) + (vehicle-method-101 (_type_) none) + (vehicle-method-102 (_type_) symbol) + (vehicle-method-103 (_type_) none) + (vehicle-method-104 (_type_) none) + (vehicle-method-105 (_type_) none) + (vehicle-method-106 (_type_) none) + (vehicle-method-107 (_type_ int process) none) + (vehicle-method-108 (_type_ int) none) + (vehicle-method-109 (_type_) none) + (vehicle-method-110 (_type_) none) + (get-linear-accel! (_type_ vector) none) + (copy-vehicle-controls! (_type_ vehicle-controls) none) + (vehicle-method-113 (_type_ vector int int) none) + (vehicle-method-114 (_type_ int) none) + (vehicle-method-115 (_type_) none) + (vehicle-method-116 (_type_ symbol) none) + (vehicle-method-117 (_type_) none) + (vehicle-method-118 (_type_) none) + (vehicle-method-119 (_type_) none) + (apply-gravity (_type_ float) none) + (apply-gravity1 (_type_ float) none) + (vehicle-method-122 (_type_) none) + (vehicle-method-123 (_type_) none) + (vehicle-method-124 (_type_) none) + (vehicle-method-125 (_type_) none) + (vehicle-method-126 (_type_) none) + (check-player-get-on (_type_ process-focusable) symbol) + (vehicle-method-128 (_type_) symbol) + (vehicle-method-129 (_type_) none) + (vehicle-method-130 (_type_) none) + (vehicle-method-131 (_type_) none) + (vehicle-method-132 (_type_ traffic-object-spawn-params) 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) + (vehicle-method-137 (_type_) none) + (vehicle-method-138 (_type_) none) + (vehicle-method-139 (_type_) none) + (vehicle-method-140 (_type_) none) + (vehicle-method-141 (_type_) symbol) + (vehicle-method-142 (_type_) none) + (vehicle-method-143 (_type_ process) object) + (vehicle-method-144 (_type_) none) + (vehicle-method-145 (_type_) none) + (vehicle-method-146 (_type_ vector) none) + (vehicle-method-147 (_type_) none) + (vehicle-method-148 (_type_) none) + (vehicle-method-149 (_type_) none) + (vehicle-method-150 (_type_) none) + (set-hit-points (_type_ float) none) + ) + ) + +;; definition for method 3 of type vehicle +(defmethod inspect ((this vehicle)) + (when (not this) + (set! this this) + (goto cfg-108) + ) + (let ((t9-0 (method-of-type rigid-body-object inspect))) + (t9-0 this) + ) + (format #t "~2Tflags: #x~X : (vehicle-flag " (-> this v-flags)) + (let ((s5-0 (-> this v-flags))) + (if (= (logand (vehicle-flag lights-update) s5-0) (shl 512 32)) + (format #t "lights-update ") + ) + (if (= (logand (vehicle-flag camera-bike-mode) s5-0) (vehicle-flag camera-bike-mode)) + (format #t "camera-bike-mode ") + ) + (if (= (logand s5-0 (vehicle-flag dead)) (vehicle-flag dead)) + (format #t "dead ") + ) + (if (= (logand s5-0 (vehicle-flag impact)) (vehicle-flag impact)) + (format #t "impact ") + ) + (if (= (logand (vehicle-flag waiting-for-player) s5-0) (vehicle-flag waiting-for-player)) + (format #t "waiting-for-player ") + ) + (if (= (logand (vehicle-flag no-hijack) s5-0) (shl 2048 32)) + (format #t "no-hijack ") + ) + (if (= (logand (vehicle-flag turbo-boost) s5-0) (vehicle-flag turbo-boost)) + (format #t "turbo-boost ") + ) + (if (= (logand (vehicle-flag in-pursuit) s5-0) (shl 4 32)) + (format #t "in-pursuit ") + ) + (if (= (logand (vehicle-flag traffic-managed) s5-0) (vehicle-flag traffic-managed)) + (format #t "traffic-managed ") + ) + (if (= (logand s5-0 (vehicle-flag damaged)) (vehicle-flag damaged)) + (format #t "damaged ") + ) + (if (= (logand s5-0 (vehicle-flag player-contact-force)) (vehicle-flag player-contact-force)) + (format #t "player-contact-force ") + ) + (if (= (logand (vehicle-flag camera-look-mode) s5-0) (shl 1 32)) + (format #t "camera-look-mode ") + ) + (if (= (logand s5-0 (vehicle-flag player-grabbed)) (vehicle-flag player-grabbed)) + (format #t "player-grabbed ") + ) + (if (= (logand (vehicle-flag flight-level-transition-ending) s5-0) (vehicle-flag flight-level-transition-ending)) + (format #t "flight-level-transition-ending ") + ) + (if (= (logand (vehicle-flag alert) s5-0) (shl 2 32)) + (format #t "alert ") + ) + (if (= (logand s5-0 (vehicle-flag disturbed)) (vehicle-flag disturbed)) + (format #t "disturbed ") + ) + (if (= (logand s5-0 (vehicle-flag enable-collision)) (vehicle-flag enable-collision)) + (format #t "enable-collision ") + ) + (if (= (logand s5-0 (vehicle-flag player-edge-grabbing)) (vehicle-flag player-edge-grabbing)) + (format #t "player-edge-grabbing ") + ) + (if (= (logand (vehicle-flag lights-on) s5-0) (shl 256 32)) + (format #t "lights-on ") + ) + (if (= (logand (vehicle-flag reverse-gear) s5-0) (vehicle-flag reverse-gear)) + (format #t "reverse-gear ") + ) + (if (= (logand (vehicle-flag net-player-driving) s5-0) (vehicle-flag net-player-driving)) + (format #t "net-player-driving ") + ) + (if (= (logand (vehicle-flag ai-driving) s5-0) (vehicle-flag ai-driving)) + (format #t "ai-driving ") + ) + (if (= (logand s5-0 (vehicle-flag persistent)) (vehicle-flag persistent)) + (format #t "persistent ") + ) + (if (= (logand s5-0 (vehicle-flag riding)) (vehicle-flag riding)) + (format #t "riding ") + ) + (if (= (logand s5-0 (vehicle-flag on-flight-level)) (vehicle-flag on-flight-level)) + (format #t "on-flight-level ") + ) + (if (= (logand (vehicle-flag nav-spheres) s5-0) (vehicle-flag nav-spheres)) + (format #t "nav-spheres ") + ) + (if (= (logand (vehicle-flag particles) s5-0) (shl 64 32)) + (format #t "particles ") + ) + (if (= (logand (vehicle-flag player-driving) s5-0) (vehicle-flag player-driving)) + (format #t "player-driving ") + ) + (if (= (logand (vehicle-flag camera-rapid-tracking-mode) s5-0) (vehicle-flag camera-rapid-tracking-mode)) + (format #t "camera-rapid-tracking-mode ") + ) + (if (= (logand (vehicle-flag ignore-damage) s5-0) (shl #x10000 32)) + (format #t "ignore-damage ") + ) + (if (= (logand (vehicle-flag ignition) s5-0) (vehicle-flag ignition)) + (format #t "ignition ") + ) + (if (= (logand (vehicle-flag ignore-impulse) s5-0) (shl #x20000 32)) + (format #t "ignore-impulse ") + ) + (if (= (logand (vehicle-flag tracking-mode) s5-0) (shl 8192 32)) + (format #t "tracking-mode ") + ) + (if (= (logand s5-0 (vehicle-flag on-ground)) (vehicle-flag on-ground)) + (format #t "on-ground ") + ) + (if (= (logand (vehicle-flag flight-level-transition) s5-0) (vehicle-flag flight-level-transition)) + (format #t "flight-level-transition ") + ) + (if (= (logand (vehicle-flag sounds) s5-0) (shl 32 32)) + (format #t "sounds ") + ) + (if (= (logand (vehicle-flag joints) s5-0) (shl 128 32)) + (format #t "joints ") + ) + (if (= (logand (vehicle-flag lights-dead) s5-0) (shl 1024 32)) + (format #t "lights-dead ") + ) + (if (= (logand s5-0 (vehicle-flag player-touching)) (vehicle-flag player-touching)) + (format #t "player-touching ") + ) + (if (= (logand (vehicle-flag target-in-sight) s5-0) (shl 8 32)) + (format #t "target-in-sight ") + ) + (if (= (logand s5-0 (vehicle-flag in-air)) (vehicle-flag in-air)) + (format #t "in-air ") + ) + (if (= (logand (vehicle-flag player-killed) s5-0) (shl #x40000 32)) + (format #t "player-killed ") + ) + (if (= (logand (vehicle-flag player-dismounting) s5-0) (vehicle-flag player-dismounting)) + (format #t "player-dismounting ") + ) + (if (= (logand (vehicle-flag draw-marks) s5-0) (shl #x80000 32)) + (format #t "draw-marks ") + ) + (if (= (logand (vehicle-flag camera) s5-0) (vehicle-flag camera)) + (format #t "camera ") + ) + (if (= (logand s5-0 (vehicle-flag player-standing-on)) (vehicle-flag player-standing-on)) + (format #t "player-standing-on ") + ) + (if (= (logand (vehicle-flag overturned) s5-0) (shl #x4000 32)) + (format #t "overturned ") + ) + (if (= (logand s5-0 (vehicle-flag player-impulse-force)) (vehicle-flag player-impulse-force)) + (format #t "player-impulse-force ") + ) + (if (= (logand (vehicle-flag unique) s5-0) (shl 4096 32)) + (format #t "unique ") + ) + (if (= (logand (vehicle-flag rammed-target) s5-0) (shl 16 32)) + (format #t "rammed-target ") + ) + (if (= (logand (vehicle-flag camera-inside-view) s5-0) (shl #x8000 16)) + (format #t "camera-inside-view ") + ) + (if (= (logand (vehicle-flag gun-dark-2-zero-g) s5-0) (shl #x8000 32)) + (format #t "gun-dark-2-zero-g ") + ) + ) + (format #t ")~%") + (format #t "~2Tsquad: ~A~%" (-> this squad)) + (format #t "~2Tcontrol-hook: ~A~%" (-> this control-hook)) + (format #t "~2Tcontrols: #~%" (-> this controls)) + (format #t "~2Tprev-controls: #~%" (-> this prev-controls)) + (format #t "~2Tengine-power-factor: ~f~%" (-> this engine-power-factor)) + (format #t "~2Tforce-scale: ~f~%" (-> this force-scale)) + (format #t "~2Ttarget-distance2: (meters ~m)~%" (-> this target-distance2)) + (format #t "~2Twater-flags: ~D~%" (-> this water-flags)) + (format #t "~2Ttarget-acceleration: #~%" (-> this target-acceleration)) + (format #t "~2Timpact-pos: #~%" (-> this impact-pos)) + (format #t "~2Timpact-local-pos: #~%" (-> this impact-local-pos)) + (format #t "~2Tlin-acceleration: #~%" (-> this lin-acceleration)) + (format #t "~2Thit-points: ~f~%" (-> this hit-points)) + (format #t "~2Tdamage-factor: ~f~%" (-> this damage-factor)) + (format #t "~2Tcrash-level: ~D~%" (-> this crash-level)) + (format #t "~2Tforce-level: ~D~%" (-> this force-level)) + (format #t "~2Ttraffic-hash-id: ~D~%" (-> this traffic-hash-id)) + (format #t "~2Ttraffic-priority-id: ~D~%" (-> this traffic-priority-id)) + (format #t "~2Tpower-fluctuation-factor: ~f~%" (-> this power-fluctuation-factor)) + (format #t "~2Tpower-level: ~f~%" (-> this power-level)) + (format #t "~2Toverlap-player-counter: ~D~%" (-> this overlap-player-counter)) + (format #t "~2Tphysics-counter: ~D~%" (-> this physics-counter)) + (format #t "~2Tcam-view: ~D~%" (-> this cam-view)) + (format #t "~2Tbrake-factor: ~f~%" (-> this brake-factor)) + (format #t "~2Tcam-speed-interp: ~f~%" (-> this cam-speed-interp)) + (format #t "~2Tcamera-dist2: ~f~%" (-> this camera-dist2)) + (format #t "~2Tplayer-dist2: ~f~%" (-> this player-dist2)) + (format #t "~2Tbound-radius: ~f~%" (-> this bound-radius)) + (format #t "~2Trider-array[4] @ #x~X~%" (-> this rider-array)) + (format #t "~2Timpact-proc: ~D~%" (-> this impact-proc)) + (format #t "~2Timpact-pat: ~D~%" (-> this impact-pat)) + (format #t "~2Timpact-time: ~D~%" (-> this impact-time)) + (format #t "~2Tprev-impact-time: ~D~%" (-> this prev-impact-time)) + (format #t "~2Tsent-attack-time: ~D~%" (-> this sent-attack-time)) + (format #t "~2Tair-time: ~D~%" (-> this air-time)) + (format #t "~2Twater-time: ~D~%" (-> this water-time)) + (format #t "~2Toffscreen-time: ~D~%" (-> this offscreen-time)) + (format #t "~2Tcrash-time: ~D~%" (-> this crash-time)) + (format #t "~2Tturbo-boost-time: ~D~%" (-> this turbo-boost-time)) + (format #t "~2Tplayer-dismount-time: ~D~%" (-> this player-dismount-time)) + (format #t "~2Tcrash-duration: ~D~%" (-> this crash-duration)) + (format #t "~2Tturbo-boost-duration: ~D~%" (-> this turbo-boost-duration)) + (format #t "~2Tturbo-boost-factor: ~f~%" (-> this turbo-boost-factor)) + (format #t "~2Tcrash-impulse: ~f~%" (-> this crash-impulse)) + (format #t "~2Twater-height: ~f~%" (-> this water-height)) + (format #t "~2Tlights-factor: ~f~%" (-> this lights-factor)) + (format #t "~2Toutgoing-attack-id: ~D~%" (-> this outgoing-attack-id)) + (format #t "~2Tfog-fade: ~f~%" (-> this fog-fade)) + (format #t "~2Tscrape-sound-id: ~D~%" (-> this scrape-sound-id)) + (format #t "~2Tdamage-zap-sound-id: ~D~%" (-> this damage-zap-sound-id)) + (format #t "~2Tscrape-sound-envelope: ~f~%" (-> this scrape-sound-envelope)) + (format #t "~2Texhaust-part-accum[2] @ #x~X~%" (-> this exhaust-part-accum)) + (format #t "~2Tsmoke-part-accum[2] @ #x~X~%" (-> this smoke-part-accum)) + (format #t "~2Tsection-array[4] @ #x~X~%" (-> this section-array)) + (label cfg-108) + this + ) + +;; definition of type vehicle-probe-work +(deftype vehicle-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) + (tire-force vector :inline) + (wheel-axis vector :inline) + ) + ) + +;; definition for method 3 of type vehicle-probe-work +(defmethod inspect ((this vehicle-probe-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-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 "~1Ttire-force: #~%" (-> this tire-force)) + (format #t "~1Twheel-axis: #~%" (-> this wheel-axis)) + (label cfg-4) + this + ) + +;; definition of type vehicle-physics-work +(deftype vehicle-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) + (impulse float) + (vel-dot-norm float) + (friction-coef float) + (speed-factor float) + (probe-work-array vehicle-probe-work 4 :inline) + ) + ) + +;; definition for method 3 of type vehicle-physics-work +(defmethod inspect ((this vehicle-physics-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-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 "~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 "~1Tprobe-work-array[4] @ #x~X~%" (-> this probe-work-array)) + (label cfg-4) + this + ) + +;; definition of type vehicle-draw-thruster-params +(deftype vehicle-draw-thruster-params (structure) + ((quat quaternion :inline) + (trans vector :inline) + (thrust float) + (width float) + (length float) + (fog-fade float) + ) + ) + +;; definition for method 3 of type vehicle-draw-thruster-params +(defmethod inspect ((this vehicle-draw-thruster-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-draw-thruster-params) + (format #t "~1Tquat: #~%" (-> this quat)) + (format #t "~1Ttrans: #~%" (-> this trans)) + (format #t "~1Tthrust: ~f~%" (-> this thrust)) + (format #t "~1Twidth: ~f~%" (-> this width)) + (format #t "~1Tlength: ~f~%" (-> this length)) + (format #t "~1Tfog-fade: ~f~%" (-> this fog-fade)) + (label cfg-4) + this + ) + +;; definition for function meters-per-sec->mph +(defun meters-per-sec->mph ((arg0 float)) + (* 0.00031568037 arg0) + ) + +;; definition of type debug-vehicle-work +(deftype debug-vehicle-work (basic) + ((impact-time time-frame) + (impact rigid-body-impact :inline) + (prim-sphere1 sphere :inline) + (prim-sphere2 sphere :inline) + ) + ) + +;; failed to figure out what this is: +0 diff --git a/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-part_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-part_REF.gc new file mode 100644 index 0000000000..51831fb418 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-part_REF.gc @@ -0,0 +1,752 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpart 916 + :init-specs ((:texture (common-white common)) + (:birth-func 'birth-func-laser-pointer) + (:num 1.0) + (:scale-x (meters 0.075) (meters 0.05)) + (:scale-y (meters 40)) + (:r 255.0) + (:g 0.0) + (:b :copy g) + (:a 20.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 917 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.2) (meters 0.15)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0 128.0) + (:b :copy g) + (:a 128.0) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 glow)) + (:userdata 1.0) + ) + ) + +;; failed to figure out what this is: +(defpart 918 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.25)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 0.0) + (:b :copy g) + (:a 48.0 16.0) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 glow)) + (:userdata 1.0) + ) + ) + +;; failed to figure out what this is: +(defpart 919 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.2) (meters 0.025)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g 32.0) + (:b :copy g) + (:a 128.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-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 920 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 1.0 2.0) + (:scale-x (meters 1.5)) + (:rot-x 4) + (:scale-y (meters 0.025) (meters 0.01)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 64.0) + (:omega (degrees 0.03375) (degrees 0.0225)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-r -0.85 -0.85) + (:fade-g -1.7 -1.7) + (:fade-b -8.0) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0016666667) (meters -0.00066666666)) + (:friction 0.96) + (:timer (seconds 0.167) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 921 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 5.0 2.0) + (:scale-x (meters 1.5)) + (:rot-x 4) + (:scale-y (meters 0.025) (meters 0.01)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 64.0) + (:omega (degrees 0.03375) (degrees 0.0225)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-r -0.85 -0.85) + (:fade-g -1.7 -1.7) + (:fade-b -8.0) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0016666667) (meters -0.00066666666)) + (:friction 0.96) + (:timer (seconds 0.167) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 922 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.4)) + (:scale-y (meters 3)) + (:r 128.0 128.0) + (:g 32.0 96.0) + (:b :copy g) + (:a 128.0 64.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 923 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-set-vel) + (:num 0.1 0.2) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 196.0) + (:g 160.0) + (:b 96.0) + (:a 1.0 1.0) + (:scalevel-x (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:fade-a -0.64) + (:accel-y (meters 0.00016666666) (meters 0.0005)) + (:friction 0.94) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.167)) + (:next-launcher 924) + ) + ) + +;; failed to figure out what this is: +(defpart 924 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0)) + ) + +;; failed to figure out what this is: +(defpart 925 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-set-vel) + (:num 1.0 0.5) + (: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 128.0) + (:a 64.0 32.0) + (:vel-y (meters 0.00033333333) (meters 0.01)) + (:scalevel-x (meters 0.006666667) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -4.266667) + (:fade-b -4.266667) + (:accel-y (meters 0.00016666666) (meters 0.0005)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 0.1)) + (:next-launcher 926) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0.1)) + ) + ) + +;; failed to figure out what this is: +(defpart 926 + :init-specs ((:scalevel-x (meters 0.005)) + (:scalevel-y :copy scalevel-x) + (:fade-r -8.5) + (:fade-g -4.266667) + (:fade-b 0.0) + (:next-time (seconds 0.1)) + (:next-launcher 927) + ) + ) + +;; failed to figure out what this is: +(defpart 927 + :init-specs ((:r 0.0 64.0) + (:g :copy r) + (:b :copy g) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:fade-a -0.24615385 -0.64) + ) + ) + +;; failed to figure out what this is: +(defpart 928 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-set-vel) + (:num 0.4) + (: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 255.0) + (:a 64.0 32.0) + (:vel-y (meters 0.00033333333) (meters 0.01)) + (:scalevel-x (meters 0.006666667) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r -4.266667 -4.266667) + (:fade-g :copy fade-r) + (:fade-b :copy fade-g) + (:accel-y (meters 0.00016666666) (meters 0.0005)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 0.1)) + (:next-launcher 929) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0.1)) + ) + ) + +;; failed to figure out what this is: +(defpart 929 + :init-specs ((:r 0.0 128.0) + (:g :copy r) + (:b :copy g) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:fade-a -0.24615385 -0.64) + ) + ) + +;; failed to figure out what this is: +(defpart 930 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-set-vel) + (:num 1.0 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 255.0) + (:a 64.0 32.0) + (:vel-y (meters 0.00033333333) (meters 0.01)) + (:scalevel-x (meters 0.006666667) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-r -4.266667 -4.266667) + (:fade-g :copy fade-r) + (:fade-b :copy fade-g) + (:accel-y (meters 0.00016666666) (meters 0.0005)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 40 1 0 #x400000 #x400000 #x400700)) + (:next-time (seconds 0.1)) + (:next-launcher 929) + (:conerot-x (degrees 0) (degrees 360)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0.1)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-vehicle-explosion + :id 224 + :duration (seconds 2) + :linger-duration (seconds 1) + :flags (sp0 sp5 sp6) + :bounds (static-bspherem 0 0 0 15) + :rotate ((degrees 0) (degrees 90) (degrees 0)) + :parts ((sp-item 931 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 932 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 933 :period (seconds 3) :length (seconds 0.05)) + (sp-item 934 :fade-after (meters 60) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 935 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 936 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 937 :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 932 + :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 938) + ) + ) + +;; failed to figure out what this is: +(defpart 938 + :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 937 + :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 939) + (:conerot-x '*sp-temp*) + ) + ) + +;; failed to figure out what this is: +(defpart 936 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 0.2) + (: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 939) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 939 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:next-time (seconds 0.017) (seconds 0.065)) (:next-launcher 940)) + ) + +;; failed to figure out what this is: +(defpart 940 + :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 941) + ) + ) + +;; failed to figure out what this is: +(defpart 941 + :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 942) + ) + ) + +;; failed to figure out what this is: +(defpart 942 + :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 931 + :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 943) + ) + ) + +;; failed to figure out what this is: +(defpart 943 + :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 935 + :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 944) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 944 + :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 945) + ) + ) + +;; failed to figure out what this is: +(defpart 945 + :init-specs ((:fade-r -0.5543478) (:fade-g -0.5543478) (:fade-a -0.13913043)) + ) + +;; failed to figure out what this is: +(defpart 933 + :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 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 946) + (:conerot-x (degrees -1440) (degrees 2880)) + ) + ) + +;; failed to figure out what this is: +(defpart 946 + :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 947) + ) + ) + +;; failed to figure out what this is: +(defpart 947 + :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 934 + :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: +(defpartgroup group-vehicle-engine-start + :id 225 + :duration (seconds 0.535) + :linger-duration (seconds 1) + :flags (sp0 sp4 sp6) + :bounds (static-bspherem 0 0 0 15) + :rotate ((degrees 0) (degrees 90) (degrees 0)) + :parts ((sp-item 948 :flags (sp7) :period (seconds 1) :length (seconds 0.017)) + (sp-item 949 :flags (sp7) :period (seconds 1) :length (seconds 0.535)) + (sp-item 949 :flags (sp7) :period (seconds 1) :length (seconds 0.335)) + (sp-item 949 :flags (sp7) :period (seconds 1) :length (seconds 0.235)) + (sp-item 949 :flags (sp7) :period (seconds 1) :length (seconds 0.135)) + (sp-item 949 :flags (sp7) :period (seconds 1) :length (seconds 0.067)) + (sp-item 949 :flags (sp7) :period (seconds 1) :length (seconds 0.05)) + (sp-item 949 :flags (sp7) :period (seconds 1) :length (seconds 0.035)) + (sp-item 949 :flags (sp7) :period (seconds 1) :length (seconds 0.017)) + (sp-item 950 :flags (sp7) :period (seconds 1) :length (seconds 0.035)) + (sp-item 951 :period (seconds 1) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 951 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0) + (:scalevel-x (meters 0.1)) + (:scalevel-y :copy scalevel-x) + (:fade-r 0.0) + (:fade-g -6.4) + (:fade-b -12.75) + (:fade-a -1.6) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +;; failed to figure out what this is: +(defpart 950 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 3.0 3.0) + (:scale-x (meters 1.5)) + (:rot-x 4) + (:scale-y (meters 0.025) (meters 0.01)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 64.0) + (:omega (degrees 0.03375) (degrees 0.0225)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-r -0.85 -0.85) + (:fade-g -1.7 -1.7) + (:fade-b -8.0) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0016666667) (meters -0.00066666666)) + (:friction 0.96) + (:timer (seconds 0.167) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 948 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 16.0) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 196.0) + (:g 160.0) + (:b 96.0) + (:a 64.0 64.0) + (:vel-y (meters 0.013333334) (meters 0.013333334)) + (:scalevel-x (meters 0.006666667)) + (:rotvel-z (degrees -0.6) (degrees 1.2)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.0) + (:fade-g -1.0) + (:fade-b 1.0) + (:fade-a -0.21333334 -0.85333335) + (:accel-y (meters 0.00033333333) (meters 0.0005)) + (:friction 0.92 0.02) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.085)) + (:next-launcher 952) + (:conerot-x (degrees -30) (degrees 30)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 952 + :init-specs ((:fade-r 0.0 -0.85333335) (:fade-g :copy fade-r) (:fade-b :copy fade-g)) + ) + +;; failed to figure out what this is: +(defpart 949 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 196.0) + (:g 160.0) + (:b 96.0) + (:a 32.0 32.0) + (:vel-y (meters 0.006666667) (meters 0.013333334)) + (:scalevel-x (meters 0.0016666667)) + (:rotvel-z (degrees -0.6) (degrees 1.2)) + (:scalevel-y :copy scalevel-x) + (:fade-r -2.0) + (:fade-g -1.0) + (:fade-b 1.0) + (:fade-a -0.21333334 -0.85333335) + (:accel-y (meters 0.00033333333) (meters 0.0005)) + (:friction 0.92 0.02) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14)) + (:next-time (seconds 0.085)) + (:next-launcher 952) + (:conerot-x (degrees -10) (degrees 20)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-physics_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-physics_REF.gc new file mode 100644 index 0000000000..6632f520db --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-physics_REF.gc @@ -0,0 +1,92 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 95 of type vehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-95 ((this vehicle) (arg0 vector) (arg1 float)) + (let ((f0-1 (- (-> arg0 y) (-> arg0 w)))) + (when (< f0-1 (-> this water-height)) + (let ((s5-0 (new 'stack-no-clear 'matrix))) + (set! (-> s5-0 rvec quad) (-> arg0 quad)) + (let ((s3-0 (-> this info)) + (f1-3 (fmin (-> this water-height) (+ (-> arg0 y) (-> arg0 w)))) + ) + 0.0 + (let* ((f2-4 (fmax -1.0 (fmin 1.0 (/ (- (-> this water-height) (-> arg0 y)) (-> arg0 w))))) + (f30-0 (+ 0.5 (* -0.25 f2-4 f2-4 f2-4) (* 0.75 f2-4))) + ) + (set! (-> s5-0 rvec y) (* 0.5 (+ f0-1 f1-3))) + (rigid-body-control-method-23 (-> this rbody) (-> s5-0 rvec) (-> s5-0 fvec)) + (let* ((f0-8 + (* 0.025132721 (vector-length (-> s5-0 fvec)) (-> s3-0 handling water-drag-factor) (-> s3-0 info mass) f30-0) + ) + (f1-7 (-> arg0 w)) + (f0-9 (* f0-8 (* f1-7 f1-7))) + (f1-10 68719480000.0) + (f0-11 (fmin (* f0-9 (/ 1.0 f1-10)) (* 0.125 (/ 1.0 arg1) (-> s3-0 info mass)))) + ) + (vector-float*! (-> s5-0 uvec) (-> s5-0 fvec) (* -1.0 f0-11)) + ) + (apply-impact! (-> this rbody) (-> s5-0 rvec) (-> s5-0 uvec)) + (vector-reset! (-> s5-0 uvec)) + (let ((f0-18 (* 514718.12 (-> s3-0 handling buoyancy-factor) f30-0 (-> arg0 w) (-> arg0 w) (-> arg0 w))) + (f1-21 68719480000.0) + ) + (set! (-> s5-0 uvec y) (* f0-18 (/ 1.0 f1-21))) + ) + ) + ) + (apply-impact! (-> this rbody) (-> s5-0 rvec) (-> s5-0 uvec)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 96 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-96 ((this vehicle) (arg0 float)) + (let ((s4-0 (-> this root root-prim)) + (s3-0 1) + ) + (when (< (-> this rbody position y) (+ (-> this water-height) (-> s4-0 local-sphere w))) + (when (zero? (-> s4-0 prim-core prim-type)) + (let ((v1-5 s4-0)) + (set! s4-0 (-> (the-as collide-shape-prim-group v1-5) child 0)) + (set! s3-0 (the-as int (-> v1-5 specific 0))) + ) + ) + (while (nonzero? s3-0) + (+! s3-0 -1) + (when (= (-> s4-0 prim-core prim-type) -1) + (let ((a1-1 (-> s4-0 prim-core))) + (if (< (- (-> a1-1 world-sphere y) (-> a1-1 world-sphere w)) (-> this water-height)) + (vehicle-method-95 this (the-as vector a1-1) arg0) + ) + ) + ) + (&+! s4-0 80) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 120 of type vehicle +(defmethod apply-gravity ((this vehicle) (arg0 float)) + (apply-gravity! this arg0) + (none) + ) + +;; definition for method 121 of type vehicle +(defmethod apply-gravity1 ((this vehicle) (arg0 float)) + (apply-gravity! this arg0) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-states_REF.gc b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-states_REF.gc new file mode 100644 index 0000000000..cdfe6ff059 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-states_REF.gc @@ -0,0 +1,384 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defstate idle (vehicle) + :virtual #t + :event vehicle-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (disable-physics! self) + (go-virtual waiting) + ) + :code sleep-code + :post (behavior () + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate inactive (vehicle) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('nav-mesh-kill 'traffic-activate 'traffic-off-force 'traffic-off 'rider-on 'rider-off) + (rbody-event-handler self proc argc message block) + ) + ) + ) + :enter (behavior () + (logior! (-> self focus-status) (focus-status disable inactive)) + (disable-physics! self) + (rigid-body-object-method-43 self) + (vehicle-method-81 self) + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + :exit (behavior () + (rigid-body-object-method-42 self) + (logclear! (-> self focus-status) (focus-status disable inactive)) + (logclear! (-> self draw status) (draw-control-status no-draw)) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate waiting (vehicle) + :virtual #t + :event vehicle-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (vehicle-method-136 self) + (logior! (-> self v-flags) (vehicle-flag waiting-for-player nav-spheres)) + (logclear! (-> self v-flags) (vehicle-flag riding player-driving)) + (update-transforms (-> self root)) + (vehicle-method-140 self) + (let ((v1-13 (find-prim-by-id-logtest (-> self root) (the-as uint 32)))) + (when v1-13 + (set! (-> v1-13 prim-core collide-with) (collide-spec)) + (set! (-> v1-13 prim-core collide-as) (collide-spec)) + 0 + ) + ) + ) + :exit (behavior () + (logclear! (-> self v-flags) (vehicle-flag waiting-for-player)) + (let ((v1-3 (find-prim-by-id-logtest (-> self root) (the-as uint 32)))) + (when v1-3 + (set! (-> v1-3 prim-core collide-with) (collide-spec + backgnd + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> v1-3 prim-core collide-as) (collide-spec vehicle-sphere)) + ) + ) + ) + :trans #f + :code sleep-code + :post (behavior () + (vehicle-method-118 self) + ) + ) + +;; failed to figure out what this is: +(defstate player-control (vehicle) + :virtual #t + :event vehicle-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (iterate-prims (-> self root) (lambda ((arg0 collide-shape-prim)) + (when (!= (-> arg0 prim-core prim-type) 1) + (logior! (-> arg0 prim-core collide-as) (collide-spec jak)) + (logior! (-> arg0 prim-core collide-with) (collide-spec blocking-plane)) + ) + (none) + ) + ) + (vehicle-method-135 self) + (logior! (-> self v-flags) (vehicle-flag riding player-driving nav-spheres)) + (set! (-> self v-flags) + (the-as + vehicle-flag + (logclear (-> self v-flags) (vehicle-flag reverse-gear camera-inside-view camera-look-mode)) + ) + ) + (set! (-> self unknown-flags) + (the-as vehicle-flag (logclear (-> self unknown-flags) (vehicle-flag camera-inside-view))) + ) + (set! (-> self controls flags) (vehicle-controls-flag)) + (set! (-> self controls prev-flags) (vehicle-controls-flag)) + (set! (-> self control-hook) + (the-as (function vehicle vehicle-controls) (method-of-object self control-hook-player)) + ) + (set! (-> self max-time-step) 0.02) + (apply-momentum! self) + (vehicle-method-99 self) + (vehicle-method-80 self) + (logior! (-> self root penetrated-by) (penetrate jak-yellow-shot jak-red-shot jak-blue-shot jak-dark-shot)) + 0 + ) + :exit (behavior () + (logclear! (-> self root penetrated-by) (penetrate jak-yellow-shot jak-red-shot jak-blue-shot jak-dark-shot)) + (iterate-prims (-> self root) (lambda ((arg0 collide-shape-prim)) + (when (!= (-> arg0 prim-core prim-type) 1) + (logclear! (-> arg0 prim-core collide-as) (collide-spec jak)) + (logclear! (-> arg0 prim-core collide-with) (collide-spec blocking-plane)) + ) + (none) + ) + ) + (if (and (not (logtest? (-> self info flags) 9216)) + (not (-> *setting-control* user-current pilot-death)) + (= (send-event *target* 'query 'mode) 'pilot) + ) + (send-event *target* 'end-mode 'pilot) + ) + (set! (-> self max-time-step) 0.033333335) + (vehicle-method-81 self) + (impulse-handler self) + (set! (-> self v-flags) + (the-as + vehicle-flag + (logclear (-> self v-flags) (vehicle-flag player-driving reverse-gear camera-inside-view camera-look-mode)) + ) + ) + (set! (-> self controls flags) (vehicle-controls-flag)) + (set! (-> self controls prev-flags) (vehicle-controls-flag)) + (remove-setting! 'sound-flava) + ) + :trans (behavior () + (set! (-> self v-flags) (the-as vehicle-flag (logclear (-> self v-flags) (vehicle-flag gun-dark-2-zero-g)))) + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (if (not *target*) + (go-virtual waiting) + ) + (when (and (cpad-pressed? 0 triangle) (and (not (logtest? (-> self info flags) 1024)) + (-> *setting-control* user-current pilot-exit) + (not (focus-test? *target* dead hit grabbed)) + (!= (-> self crash-level) 3) + (< (-> self water-height) (-> self rbody position y)) + ) + ) + (when (send-event *target* 'end-mode 'pilot) + (let ((v1-32 (find-prim-by-id-logtest (-> self root) (the-as uint 64)))) + (if v1-32 + (set! (-> v1-32 prim-core collide-as) (collide-spec vehicle-sphere)) + ) + ) + (logior! (-> self v-flags) (vehicle-flag player-dismounting)) + (set! (-> self player-dismount-time) (the-as uint (current-time))) + (go-virtual waiting) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (local-vars (a0-3 int) (a0-5 int)) + (let* ((v1-1 (-> *perf-stats* data 18)) + (a0-0 (-> v1-1 ctrl)) + ) + (+! (-> v1-1 count) 1) + (b! (zero? a0-0) cfg-2 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-0) + ) + (.sync.l) + (.sync.p) + (label cfg-2) + 0 + (vehicle-method-119 self) + (let ((v1-6 (-> *perf-stats* data 18))) + (b! (zero? (-> v1-6 ctrl)) cfg-4 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-3 pcr0) + (+! (-> v1-6 accum0) a0-3) + (.mfpc a0-5 pcr1) + (+! (-> v1-6 accum1) a0-5) + ) + (label cfg-4) + 0 + ) + ) + +;; failed to figure out what this is: +(defstate crash (vehicle) + :virtual #t + :event vehicle-event-handler + :enter (behavior () + (logclear! (-> self v-flags) (vehicle-flag player-driving net-player-driving)) + (set-time! (-> self state-time)) + (vehicle-method-124 self) + (set! (-> self crash-level) 3) + (vehicle-method-81 self) + (dotimes (gp-0 (-> self info rider seat-count)) + (send-event (handle->process (-> self rider-array gp-0)) 'vehicle-crash) + ) + ) + :trans (behavior () + (set! (-> self hit-points) (- (-> self hit-points) (* 0.5 (seconds-per-frame)))) + (if (and (time-elapsed? (-> self state-time) 1) (< (-> self hit-points) -0.25)) + (go-virtual explode) + ) + ) + :code sleep-code + :post (behavior () + (vehicle-method-117 self) + ) + ) + +;; definition for function vehicle-explode-post +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior vehicle-explode-post vehicle () + (local-vars (v1-42 float) (v1-47 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set! (-> self camera-dist2) (vector-vector-distance-squared (-> self root trans) (camera-pos))) + (set! (-> self player-dist2) (vector-vector-distance-squared (-> self root trans) (target-pos 0))) + (cond + ((logtest? (-> self draw status) (draw-control-status on-screen)) + (set! (-> self offscreen-time) (the-as uint (current-time))) + ) + (else + (let ((v1-7 (new 'stack-no-clear 'array 'uint32 1))) + (set! (-> v1-7 0) (the-as uint (current-time))) + (if (or (>= (- (-> v1-7 0) (-> self offscreen-time)) (the-as uint 1500)) + (let ((f0-2 409600.0)) + (< (* f0-2 f0-2) (-> self camera-dist2)) + ) + ) + (go-virtual die) + ) + ) + ) + ) + (let ((f0-5 819200.0)) + (if (< (* f0-5 f0-5) (-> self camera-dist2)) + (go-virtual die) + ) + ) + (cond + ((logtest? (-> self rbody flags) (rigid-body-flag enable-physics)) + (vehicle-method-117 self) + (when (and (logtest? (-> self v-flags) (vehicle-flag disturbed)) (logtest? (-> self v-flags) (vehicle-flag impact))) + (let* ((f0-9 (* 0.0033333334 (the float (- (current-time) (-> self disturbed-time))))) + (f0-12 (* f0-9 f0-9 (-> self camera-dist2))) + (f1-5 0.000016276043) + (f0-13 (* f0-12 (* f1-5 f1-5))) + ) + (.lvf vf1 (&-> (-> self 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-42 vf1) + (if (and (< v1-42 f0-13) (begin + (.lvf vf1 (&-> (-> self 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-47 vf1) + (let ((f1-9 v1-47) + (f2-0 614.4) + ) + (< f1-9 (* f0-13 (* f2-0 f2-0))) + ) + ) + ) + (logclear! (-> self v-flags) (vehicle-flag disturbed)) + ) + ) + ) + (when (not (vehicle-method-102 self)) + (disable-physics! self) + (let ((gp-2 (-> self rbody))) + (logclear! (-> gp-2 flags) (rigid-body-flag enable-physics active)) + (vehicle-method-142 self) + (set! (-> gp-2 force quad) (the-as uint128 0)) + (set! (-> gp-2 torque quad) (the-as uint128 0)) + ) + 0 + (logior! (-> self v-flags) (vehicle-flag nav-spheres)) + (vehicle-method-140 self) + ) + ) + (else + (rigid-body-object-method-30 self) + ) + ) + 0 + (none) + ) + ) + +;; failed to figure out what this is: +(defstate explode (vehicle) + :virtual #t + :event vehicle-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (vehicle-method-116 self 'big-explosion) + (logior! (-> self focus-status) (focus-status dead)) + (set! (-> self crash-level) 3) + (set! (-> self force-level) 3) + (logclear! (-> self v-flags) (vehicle-flag persistent player-driving net-player-driving)) + (set! (-> self v-flags) (the-as vehicle-flag (logior (vehicle-flag lights-dead) (-> self v-flags)))) + (vehicle-method-126 self) + (sound-play-by-name (-> self info sound explode-sound) (new-sound-id) 1024 0 0 (sound-group) #t) + (sound-play-by-name (-> self info sound explode2-sound) (new-sound-id) 1024 0 0 (sound-group) #t) + (vehicle-method-106 self) + (vehicle-method-136 self) + (vehicle-method-100 self) + ) + :code sleep-code + :post (behavior () + (vehicle-explode-post) + ) + ) + +;; failed to figure out what this is: +(defstate die (vehicle) + :virtual #t + :code (behavior () + (cond + ((logtest? (vehicle-flag traffic-managed) (-> self v-flags)) + (send-event (ppointer->process (-> self parent)) 'child-killed) + (vehicle-method-109 self) + ) + (else + (cleanup-for-death self) + ) + ) + ) + ) + + + + 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 new file mode 100644 index 0000000000..35a42ee4de --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle-util_REF.gc @@ -0,0 +1,1446 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 9 of type rigid-body-vehicle-constants +;; WARN: Return type mismatch int vs none. +(defmethod init-part! ((this rigid-body-vehicle-constants)) + (set! (-> this particle-common) *vehicle-particle-common-info*) + (init! (-> this particle-common)) + 0 + (none) + ) + +;; definition of type vehicle-hud-request +(deftype vehicle-hud-request (structure) + ((handle handle) + (hack-handle-init symbol :overlay-at handle) + (priority float) + ) + :pack-me + ) + +;; definition for method 3 of type vehicle-hud-request +(defmethod inspect ((this vehicle-hud-request)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-hud-request) + (format #t "~1Thandle: ~D~%" (-> this handle)) + (format #t "~1Thack-handle-init: ~A~%" (-> this hack-handle-init)) + (format #t "~1Tpriority: ~f~%" (-> this priority)) + (label cfg-4) + this + ) + +;; definition of type vehicle-hud-requests +(deftype vehicle-hud-requests (structure) + ((time time-frame) + (requests vehicle-hud-request 4 :inline) + ) + :pack-me + (:methods + (vehicle-hud-requests-method-9 (_type_) none) + (vehicle-hud-requests-method-10 (_type_) vehicle-hud-request) + (vehicle-hud-requests-method-11 (_type_) vehicle-hud-request) + ) + ) + +;; definition for method 3 of type vehicle-hud-requests +(defmethod inspect ((this vehicle-hud-requests)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-hud-requests) + (format #t "~1Ttime: ~D~%" (-> this time)) + (format #t "~1Trequests[4] @ #x~X~%" (-> this requests)) + (label cfg-4) + this + ) + +;; definition for method 9 of type vehicle-hud-requests +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-hud-requests-method-9 ((this vehicle-hud-requests)) + (dotimes (v1-0 4) + (let ((a1-2 (-> this requests v1-0))) + (set! (-> a1-2 handle) (the-as handle #f)) + (set! (-> a1-2 priority) 0.0) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type vehicle-hud-requests +(defmethod vehicle-hud-requests-method-10 ((this vehicle-hud-requests)) + (let ((v1-0 0)) + (let ((f0-0 0.0)) + (countdown (a1-0 4) + (let ((a2-2 (-> this requests a1-0))) + (when (and (handle->process (-> a2-2 handle)) (< f0-0 (-> a2-2 priority))) + (set! v1-0 a1-0) + (set! f0-0 (-> a2-2 priority)) + ) + ) + ) + ) + (-> this requests v1-0) + ) + ) + +;; definition for method 11 of type vehicle-hud-requests +(defmethod vehicle-hud-requests-method-11 ((this vehicle-hud-requests)) + (let ((v1-0 0)) + (let ((f0-0 (the-as float #x7f800000)) + (a1-1 4) + ) + (b! #t cfg-10 :delay (nop!)) + (label cfg-1) + (+! a1-1 -1) + (let ((a2-2 (-> this requests a1-1))) + (b! (handle->process (-> a2-2 handle)) cfg-8 :delay (empty-form)) + (set! v1-0 a1-1) + (set! (-> a2-2 priority) 0.0) + (b! #t cfg-12 :delay (nop!)) + (label cfg-8) + (when (< (-> a2-2 priority) f0-0) + (set! v1-0 a1-1) + (set! f0-0 (-> a2-2 priority)) + ) + ) + (label cfg-10) + (b! (nonzero? a1-1) cfg-1 :delay (nop!)) + ) + (label cfg-12) + (-> this requests v1-0) + ) + ) + +;; definition of type vehicle-hud-chooser +(deftype vehicle-hud-chooser (structure) + ((cur vehicle-hud-requests :inline) + (last vehicle-hud-requests :inline) + ) + (:methods + (vehicle-hud-chooser-method-9 (_type_ handle float) symbol) + ) + ) + +;; definition for method 3 of type vehicle-hud-chooser +(defmethod inspect ((this vehicle-hud-chooser)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-hud-chooser) + (format #t "~1Tcur: #~%" (-> this cur)) + (format #t "~1Tlast: #~%" (-> this last)) + (label cfg-4) + this + ) + +;; definition for method 9 of type vehicle-hud-chooser +(defmethod vehicle-hud-chooser-method-9 ((this vehicle-hud-chooser) (arg0 handle) (arg1 float)) + (let ((s3-0 (current-time))) + (when (!= s3-0 (-> this cur time)) + (if (zero? (-> this cur time)) + (vehicle-hud-requests-method-9 (-> this cur)) + ) + (mem-copy! (the-as pointer (-> this last)) (the-as pointer (-> this cur)) 72) + (set! (-> this cur time) s3-0) + (vehicle-hud-requests-method-9 (-> this cur)) + ) + ) + (let ((v1-10 (vehicle-hud-requests-method-11 (-> this cur)))) + (when (< (-> v1-10 priority) arg1) + (set! (-> v1-10 handle) arg0) + (set! (-> v1-10 priority) arg1) + ) + ) + (let ((s4-1 #f)) + (let ((v1-12 (vehicle-hud-requests-method-10 (-> this last)))) + (if (and (handle->process arg0) (= (-> v1-12 handle) arg0)) + (set! s4-1 #t) + ) + ) + s4-1 + ) + ) + +;; definition for symbol *vehicle-hud-chooser*, type vehicle-hud-chooser +(define *vehicle-hud-chooser* (new 'static 'vehicle-hud-chooser)) + +;; definition for symbol *pilot-edge-grab-info*, type pilot-edge-grab-info +(define *pilot-edge-grab-info* (new 'static 'pilot-edge-grab-info)) + +;; definition for method 10 of type vehicle +(defmethod deactivate ((this vehicle)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (vehicle-method-106 this) + (call-parent-method this) + (none) + ) + +;; definition for method 11 of type vehicle +;; WARN: Return type mismatch entity-perm-status vs object. +(defmethod init-from-entity! ((this vehicle) (arg0 entity-actor)) + (process-entity-status! this (entity-perm-status dead) #t) + ) + +;; definition for method 37 of type vehicle +(defmethod rigid-body-object-method-37 ((this vehicle)) + (let ((t9-0 (method-of-type rigid-body-object rigid-body-object-method-37))) + (t9-0 this) + ) + (cond + ((logtest? #x10000 (-> this info flags)) + (set! (-> this rbody force-callback) (method-of-object this apply-gravity)) + ) + ((logtest? #x20000 (-> this info flags)) + (set! (-> this rbody force-callback) (method-of-object this apply-gravity1)) + ) + ) + (vehicle-method-62 this) + (init-part! (-> this info)) + (none) + ) + +;; definition for method 127 of type vehicle +(defmethod check-player-get-on ((this vehicle) (arg0 process-focusable)) + (with-pp + (and (not (focus-test? arg0 dead grabbed in-head under-water pole flut tube pilot)) + (or (not (focus-test? arg0 edge-grab)) (logtest? (-> this v-flags) (vehicle-flag player-edge-grabbing))) + (-> *setting-control* user-current pilot) + (let ((v1-8 (new 'stack-no-clear 'event-message-block))) + (set! (-> v1-8 from) (process->ppointer pp)) + (set! (-> v1-8 num-params) 1) + (set! (-> v1-8 message) 'query) + (set! (-> v1-8 param 0) (the-as uint 'mode)) + (let ((v1-9 (send-event-function arg0 v1-8))) + (and (or (= v1-9 #f) (= v1-9 'board)) (or (logtest? (vehicle-flag waiting-for-player) (-> this v-flags)) + (-> *setting-control* user-current vehicle-hijacking) + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 128 of type vehicle +(defmethod vehicle-method-128 ((this vehicle)) + #t + ) + +;; definition for method 129 of type vehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-129 ((this vehicle)) + (let ((f0-0 (-> this player-dist2)) + (f1-0 102400.0) + ) + (when (< f0-0 (* f1-0 f1-0)) + (let ((s5-0 (new 'stack-no-clear 'mystery-vehicle-type0))) + (set! (-> s5-0 floats 4) (+ 8192.0 (-> this root root-prim local-sphere w))) + (if (logtest? (vehicle-flag ai-driving) (-> this v-flags)) + (set! (-> s5-0 floats 4) (* 1.5 (-> s5-0 floats 4))) + ) + (set! (-> s5-0 mat 0 uvec quad) (-> (target-pos 0) quad)) + (+! (-> s5-0 mat 0 uvec y) 8192.0) + (let* ((v1-14 (-> s5-0 mat 1)) + (a3-0 (-> this node-list data 0 bone transform)) + (a0-5 (-> a3-0 rvec quad)) + (a1-0 (-> a3-0 uvec quad)) + (a2-0 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-14 rvec quad) a0-5) + (set! (-> v1-14 uvec quad) a1-0) + (set! (-> v1-14 fvec quad) a2-0) + (set! (-> v1-14 trans quad) a3-1) + ) + (set! (-> s5-0 mat 0 fvec quad) (-> s5-0 mat 1 trans quad)) + (set! (-> s5-0 floats 2) (- (-> s5-0 mat 0 uvec y) (-> s5-0 mat 0 fvec y))) + (let ((f0-9 (vector-vector-xz-distance-squared (-> s5-0 mat 0 uvec) (-> s5-0 mat 0 fvec))) + (f1-7 (-> s5-0 floats 4)) + ) + (when (and (< f0-9 (* f1-7 f1-7)) + (< -81920.0 (-> s5-0 floats 2)) + (and (< (-> s5-0 floats 2) 20480.0) *target* (check-player-get-on this *target*)) + ) + (let ((s2-0 #f) + (s4-1 #f) + (s3-0 #f) + ) + (let ((a2-2 (get-best-seat this (-> s5-0 mat 0 uvec) (vehicle-seat-flag vsf0) 0))) + (when (!= a2-2 -1) + (vehicle-method-66 this (-> s5-0 mat 0 fvec) a2-2) + (vector+float*! (-> s5-0 mat 0 fvec) (-> s5-0 mat 0 fvec) (-> s5-0 mat 1 uvec) 4096.0) + ) + ) + (set! (-> s5-0 floats 1) (vector-vector-distance-squared (-> s5-0 mat 0 fvec) (-> s5-0 mat 0 uvec))) + (let ((f0-14 (-> s5-0 floats 1)) + (f1-12 81920.0) + ) + (when (< f0-14 (* f1-12 f1-12)) + (set! (-> s5-0 cquery start-pos quad) (-> s5-0 mat 0 uvec quad)) + (vector-! (-> s5-0 cquery move-dist) (-> s5-0 mat 0 fvec) (-> s5-0 mat 0 uvec)) + (let ((v1-38 (-> s5-0 cquery))) + (set! (-> v1-38 radius) 4096.0) + (set! (-> v1-38 collide-with) + (collide-spec + backgnd + crate + civilian + enemy + obstacle + hit-by-player-list + hit-by-others-list + player-list + collectable + blocking-plane + tobot + pusher + vehicle-mesh + obstacle-for-jak + shield + ) + ) + (set! (-> v1-38 ignore-process0) this) + (set! (-> v1-38 ignore-process1) #f) + (set! (-> v1-38 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-38 action-mask) (collide-action solid)) + ) + (set! s2-0 (< (fill-and-probe-using-line-sphere *collide-cache* (-> s5-0 cquery)) 0.0)) + 0 + ) + ) + (when s2-0 + (when (and (or (< -14336.0 (-> s5-0 floats 2)) (logtest? (-> this v-flags) (vehicle-flag player-edge-grabbing))) + (not (logtest? (vehicle-flag no-hijack gun-dark-2-zero-g) (-> this v-flags))) + ) + (set! s4-1 #t) + (set! (-> s5-0 floats 3) (* (-> this hit-points) (/ 40960.0 (sqrtf (-> s5-0 floats 1))))) + ) + (when (and (not s4-1) + (and (< (-> s5-0 floats 2) -8192.0) (not (logtest? (-> *target* focus-status) (focus-status edge-grab)))) + ) + (matrix-4x4-inverse! (-> s5-0 mat 2) (-> s5-0 mat 1)) + (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 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 local-pos)) + (-> s1-0 local-pos 1) + (-> s5-0 mat 0 trans) + ) + ) + ) + (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) (-> 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))) + ) + ) + ) + ) + 0 + ) + ) + (set! s3-0 (or s4-1 s3-0)) + (when (and s3-0 (and (vehicle-hud-chooser-method-9 *vehicle-hud-chooser* (process->handle this) (-> s5-0 floats 3)) + (can-display-query? this "vehicle" (/ 1.0 (-> s5-0 floats 3))) + ) + ) + (cond + ((vehicle-method-128 this) + (vehicle-method-144 this) + (when (cpad-pressed? 0 triangle) + (cond + (s4-1 + (when (send-event *target* 'change-mode 'pilot this 0 #f) + (logior! (-> this v-flags) (vehicle-flag player-driving)) + (logclear! (-> this v-flags) (vehicle-flag ai-driving)) + (vehicle-method-80 this) + ) + ) + (else + (set! (-> s5-0 proc 0) (process->handle this)) + (mem-copy! (the-as pointer *pilot-edge-grab-info*) (the-as pointer (-> s5-0 vec)) 40) + (if (send-event *target* 'pilot-edge-grab *pilot-edge-grab-info*) + (format 0 "vehicle::check-player-get-on: (send-event *target* 'pilot-edge-grab self)~%") + ) + ) + ) + ) + ) + (else + (vehicle-method-145 this) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (cond + ((and (logtest? (vehicle-flag player-driving) (-> this v-flags)) *target* (!= (-> this crash-level) 3)) + (if (focus-test? *target* pilot-riding) + (vehicle-method-134 this) + ) + ) + (else + (vehicle-method-81 this) + ) + ) + 0 + (none) + ) + +;; definition for method 144 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-144 ((this vehicle)) + (let ((gp-0 + (new 'stack 'font-context *font-default-matrix* 22 320 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + (let ((v1-1 gp-0)) + (set! (-> v1-1 width) (the float 350)) + ) + (let ((v1-2 gp-0)) + (set! (-> v1-2 height) (the float 80)) + ) + (let ((v1-3 gp-0) + (a0-5 (-> *setting-control* user-default language)) + ) + (set! (-> v1-3 scale) (if (or (= a0-5 (language-enum korean)) (= a0-5 (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) + ) + ) + 0 + (none) + ) + +;; definition for method 145 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-145 ((this vehicle)) + 0 + (none) + ) + +;; definition for method 106 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-106 ((this vehicle)) + (sound-stop (-> this scrape-sound-id)) + (set! (-> this scrape-sound-envelope) 0.0) + 0 + (none) + ) + +;; definition for method 63 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-63 ((this vehicle)) + 0 + (none) + ) + +;; definition for method 64 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-64 ((this vehicle)) + 0 + (none) + ) + +;; definition for method 65 of type vehicle +(defmethod vehicle-method-65 ((this vehicle)) + (-> this info rider seat-count) + ) + +;; definition for method 66 of type vehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-66 ((this vehicle) (arg0 vector) (arg1 int)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (set! (-> v1-0 quad) (-> this info rider seat-array arg1 position quad)) + (set! (-> v1-0 w) 1.0) + (vector-matrix*! arg0 v1-0 (-> this node-list data 0 bone transform)) + ) + 0 + (none) + ) + +;; definition for method 67 of type vehicle +(defmethod get-rider-in-seat ((this vehicle) (arg0 int)) + (let ((v0-0 (the-as process #f))) + (if (< arg0 (-> this info rider seat-count)) + (set! v0-0 (handle->process (-> this rider-array arg0))) + ) + v0-0 + ) + ) + +;; definition for method 68 of type vehicle +(defmethod vehicle-method-68 ((this vehicle)) + (let ((gp-0 (the-as process #f))) + (countdown (s4-0 (-> this info rider seat-count)) + (when (logtest? (-> this info rider seat-array s4-0 flags) (vehicle-seat-flag vsf0)) + (let ((v1-7 (get-rider-in-seat this s4-0))) + (if v1-7 + (set! gp-0 v1-7) + ) + ) + ) + ) + gp-0 + ) + ) + +;; definition for method 71 of type vehicle +(defmethod get-best-seat ((this vehicle) (arg0 vector) (arg1 vehicle-seat-flag) (arg2 int)) + (let ((gp-0 -1)) + (let ((f30-0 (the-as float #x7f800000)) + (s1-0 (new 'stack-no-clear 'vector)) + ) + (countdown (s0-0 (-> this info rider seat-count)) + (when (logtest? arg1 (-> this info rider seat-array s0-0 flags)) + (let ((v1-7 arg2)) + (when (cond + ((zero? v1-7) + #t + ) + ((= v1-7 1) + (not (get-rider-in-seat this s0-0)) + ) + ((= v1-7 2) + (get-rider-in-seat this s0-0) + ) + (else + #f + ) + ) + (vehicle-method-66 this s1-0 s0-0) + (let ((f0-0 (vector-vector-distance-squared arg0 s1-0))) + (when (< f0-0 f30-0) + (set! f30-0 f0-0) + (set! gp-0 s0-0) + ) + ) + ) + ) + ) + ) + ) + gp-0 + ) + ) + +;; definition for method 72 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod remove-riders ((this vehicle) (arg0 handle)) + (let ((v1-1 (-> this info rider seat-count))) + (dotimes (a2-0 v1-1) + (if (= arg0 (handle->process (-> this rider-array a2-0))) + (set! (-> this rider-array a2-0) (the-as handle #f)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 69 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod put-rider-in-seat ((this vehicle) (arg0 int) (arg1 process)) + (if (< arg0 (-> this info rider seat-count)) + (set! (-> this rider-array arg0) (process->handle arg1)) + ) + 0 + (none) + ) + +;; definition for method 113 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-113 ((this vehicle) (arg0 vector) (arg1 int) (arg2 int)) + (let ((v1-0 (new 'stack-no-clear 'vector))) + (vector+! + v1-0 + (the-as vector (-> this info rider seat-array arg1)) + (-> this info rider rider-hand-offset arg2) + ) + (vector-matrix*! arg0 v1-0 (-> this node-list data 0 bone transform)) + ) + 0 + (none) + ) + +;; definition for method 70 of type vehicle +(defmethod vehicle-method-70 ((this vehicle)) + (-> this info rider rider-stance) + ) + +;; definition for method 73 of type vehicle +;; WARN: Return type mismatch float vs none. +(defmethod vehicle-method-73 ((this vehicle)) + (-> this controls steering) + (none) + ) + +;; definition for method 111 of type vehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod get-linear-accel! ((this vehicle) (arg0 vector)) + (set! (-> arg0 quad) (-> this lin-acceleration quad)) + 0 + (none) + ) + +;; definition for method 112 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod copy-vehicle-controls! ((this vehicle) (arg0 vehicle-controls)) + (mem-copy! (the-as pointer arg0) (the-as pointer (-> this controls)) 24) + 0 + (none) + ) + +;; definition for method 150 of type vehicle +;; WARN: Return type mismatch float vs none. +(defmethod vehicle-method-150 ((this vehicle)) + (-> this hit-points) + (none) + ) + +;; definition for method 151 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod set-hit-points ((this vehicle) (arg0 float)) + (set! (-> this hit-points) arg0) + 0 + (none) + ) + +;; definition for method 46 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod apply-damage ((this vehicle) (arg0 float) (arg1 rigid-body-impact)) + (case (-> arg1 pat event) + (((pat-event melt)) + (set! arg0 (* 10.0 arg0)) + (format #t "vehicle::apply-damage: hit melt (damage ~f)~%" arg0) + ) + ) + (if (logtest? (vehicle-flag ignore-damage) (-> this v-flags)) + (set! arg0 0.0) + ) + (when (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (if (or (and (logtest? (game-secrets invulnerable) (-> *game-info* secrets)) (logtest? #x200000 (-> this info flags))) + *debug-player-vehicle-unkillable* + ) + (set! arg0 0.0) + ) + (if (logtest? (game-secrets vehicle-hit-points) (-> *game-info* secrets)) + (set! arg0 (* 0.5 arg0)) + ) + ) + (set! (-> this hit-points) (- (-> this hit-points) (* arg0 (-> this damage-factor)))) + (when (< (-> this hit-points) 0.0) + (logior! (-> this v-flags) (vehicle-flag dead)) + (set! (-> this crash-level) 3) + ) + (let ((s4-1 (-> arg1 prim-id)) + (s3-0 0) + ) + (while (nonzero? s4-1) + (when (and (logtest? s4-1 1) (< s3-0 (-> this info damage section-count))) + (let ((v1-37 (-> this section-array s3-0))) + (+! (-> v1-37 damage) (* 4.0 (-> this damage-factor) arg0)) + ) + (vehicle-method-114 this s3-0) + ) + (set! s4-1 (shr s4-1 1)) + (+! s3-0 1) + ) + ) + 0 + (none) + ) + +;; definition for method 114 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-114 ((this vehicle) (arg0 int)) + (let* ((v1-2 (-> this section-array arg0)) + (s4-0 (-> this info damage section-array arg0)) + (s5-1 + (max + 0 + (min (the int (* (-> v1-2 damage) (the float (-> s4-0 damage-seg-count)))) (+ (-> s4-0 damage-seg-count) -1)) + ) + ) + ) + (let ((a2-0 0)) + (dotimes (v1-6 (-> s4-0 damage-seg-count)) + (if (!= v1-6 s5-1) + (set! a2-0 (logior a2-0 (-> s4-0 damage-seg-array v1-6))) + ) + ) + (setup-masks (-> this draw) 0 a2-0) + ) + (setup-masks (-> this draw) (the-as int (-> s4-0 damage-seg-array s5-1)) 0) + (when (> s5-1 0) + (if (not (logtest? (vehicle-flag lights-dead) (-> this v-flags))) + (sound-play "headlight-pop") + ) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag lights-dead) (-> this v-flags)))) + (vehicle-method-126 this) + ) + ) + 0 + (none) + ) + +;; definition for method 76 of type vehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-76 ((this vehicle)) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag + disturbed + damaged + dead + player-touching + player-edge-grabbing + player-standing-on + persistent + impact + in-air + riding + player-driving + net-player-driving + ai-driving + waiting-for-player + ignition + turbo-boost + reverse-gear + flight-level-transition + alert + in-pursuit + target-in-sight + rammed-target + lights-on + lights-update + lights-dead + ) + ) + ) + ) + (set! (-> this unknown-flags) (-> this v-flags)) + (logior! (-> this rbody flags) (rigid-body-flag active)) + (logclear! (-> this focus-status) (focus-status disable dead inactive)) + (rigid-body-object-method-37 this) + (disable-physics! this) + (set! (-> this hit-points) 1.0) + (set! (-> this damage-factor) (-> this info damage inv-hit-points)) + (set! (-> this crash-level) 0) + (set! (-> this power-fluctuation-factor) 0.02) + (set! (-> this power-level) 1.0) + (set! (-> this lights-factor) 0.0) + (set-time! (-> this state-time)) + (let ((v1-19 (-> this info setup))) + (let ((a1-0 (-> v1-19 color-option-select))) + (set! (-> this draw color-mult quad) + (-> (the-as (pointer uint128) (+ (the-as uint (-> v1-19 color)) (* a1-0 16)))) + ) + ) + (+! (-> v1-19 color-option-select) 1) + (when (>= (-> v1-19 color-option-select) (-> v1-19 color-option-count)) + (set! (-> v1-19 color-option-select) 0) + 0 + ) + ) + (dotimes (s5-0 (-> this info damage section-count)) + (let ((v1-22 (-> this section-array s5-0))) + (set! (-> v1-22 damage) 0.0) + ) + (vehicle-method-114 this s5-0) + ) + 0 + (none) + ) + +;; definition for method 98 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-98 ((this vehicle)) + (set! (-> this hit-points) 1.0) + 0 + (none) + ) + +;; definition for method 130 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-130 ((this vehicle)) + 0 + (none) + ) + +;; definition for method 74 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-74 ((this vehicle) (arg0 int) (arg1 time-frame)) + (when (< (-> this crash-level) arg0) + (set! (-> this crash-level) arg0) + (set! (-> this crash-duration) (the-as uint arg1)) + (set! (-> this crash-time) (the-as uint (current-time))) + (set! (-> this force-scale) 0.0) + ) + (when (and (>= 0.0 (-> this hit-points)) (!= (-> this crash-level) 3)) + (logior! (-> this v-flags) (vehicle-flag dead)) + (set! (-> this crash-level) 3) + (set! (-> this crash-duration) (the-as uint 1500)) + (set! (-> this crash-time) (the-as uint (current-time))) + ) + 0 + (none) + ) + +;; definition for method 75 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-75 ((this vehicle)) + (set! (-> this crash-level) 0) + 0 + (none) + ) + +;; definition for method 125 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-125 ((this vehicle)) + (if (not (logtest? (vehicle-flag lights-dead) (-> this v-flags))) + (set! (-> this v-flags) + (the-as vehicle-flag (logior (vehicle-flag lights-on lights-update) (-> this v-flags))) + ) + ) + 0 + (none) + ) + +;; definition for method 126 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-126 ((this vehicle)) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag lights-on)))) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag lights-update) (-> this v-flags)))) + 0 + (none) + ) + +;; definition for method 135 of type vehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-135 ((this vehicle)) + (when (not (logtest? (vehicle-flag ignition) (-> this v-flags))) + (logior! (-> this v-flags) (vehicle-flag ignition)) + (sound-play-by-name (-> this info sound start-sound) (new-sound-id) 1024 0 0 (sound-group) #t) + (let ((s5-1 (-> this node-list data 0 bone transform)) + (s4-1 (new 'stack-no-clear 'inline-array 'matrix 2)) + ) + (set-vector! (-> s4-1 0 fvec) 0.0 1.0 0.0 1.0) + (mem-copy! (the-as pointer (-> s4-1 1)) (the-as pointer s5-1) 64) + (dotimes (s3-0 2) + (vector-matrix*! (the-as vector (-> s4-1 0)) (-> this info particles exhaust-local-pos s3-0) s5-1) + (vector-rotate*! (-> s4-1 0 uvec) (-> this info particles exhaust-local-dir s3-0) s5-1) + (vector-cross! (-> s4-1 0 trans) (-> s4-1 0 uvec) (-> s4-1 0 fvec)) + (vector-normalize! (-> s4-1 0 trans) 1.0) + (vector-cross! (-> s4-1 1 fvec) (-> s4-1 0 trans) (-> s4-1 0 uvec)) + (set! (-> s4-1 1 rvec quad) (-> s4-1 0 trans quad)) + (set! (-> s4-1 1 uvec quad) (-> s4-1 0 uvec quad)) + (set! (-> s4-1 1 fvec quad) (-> s4-1 0 fvec quad)) + (set! (-> s4-1 1 trans quad) (-> s4-1 0 rvec quad)) + (if (logtest? (-> *part-group-id-table* 225 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 225) + :mat-joint (-> s4-1 1) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 225) + :mat-joint (-> s4-1 1) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 136 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-136 ((this vehicle)) + (if (logtest? (vehicle-flag ignition) (-> this v-flags)) + (logclear! (-> this v-flags) (vehicle-flag ignition)) + ) + 0 + (none) + ) + +;; definition for method 137 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-137 ((this vehicle)) + (let ((a0-2 (find-nearest-nav-mesh (-> this root trans) (the-as float #x7f800000)))) + (when a0-2 + (add-process-drawable-to-nav-mesh a0-2 this #t) + (vehicle-method-139 this) + ) + ) + 0 + (none) + ) + +;; definition for method 139 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-139 ((this vehicle)) + (logior! (-> this nav flags) (nav-control-flag display-marks)) + 0 + (none) + ) + +;; definition for method 138 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-138 ((this vehicle)) + (let ((v1-0 (-> this nav))) + (when v1-0 + (remove-process-drawable (-> v1-0 state mesh) this) + (set! (-> this nav) #f) + ) + ) + 0 + (none) + ) + +;; definition for method 141 of type vehicle +(defmethod vehicle-method-141 ((this vehicle)) + (or (logtest? (vehicle-flag dead waiting-for-player) (-> this v-flags)) + (and (logtest? (vehicle-flag player-driving net-player-driving ai-driving) (-> this v-flags)) + (not (logtest? (-> this v-flags) (vehicle-flag on-flight-level))) + ) + ) + ) + +;; definition for method 140 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-140 ((this vehicle)) + (let ((v1-1 (vehicle-method-141 this)) + (s5-0 (-> this nav)) + ) + (cond + (v1-1 + (cond + (s5-0 + (do-navigation-to-destination (-> s5-0 state) (-> this root trans)) + (when (not (logtest? (-> s5-0 state flags) (nav-state-flag in-mesh))) + (let ((a0-4 (find-nearest-nav-mesh (-> this root trans) (the-as float #x7f800000)))) + (when (and a0-4 (!= a0-4 (-> s5-0 state mesh))) + (change-to a0-4 this) + (logclear! (-> this nav flags) (nav-control-flag output-sphere-hash)) + ) + ) + ) + ) + (else + (vehicle-method-137 this) + ) + ) + ) + (else + (if s5-0 + (vehicle-method-138 this) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 80 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-80 ((this vehicle)) + (when (not (logtest? (vehicle-flag camera) (-> this v-flags))) + (vehicle-method-82 this) + (logior! (-> this v-flags) (vehicle-flag camera)) + ) + 0 + (none) + ) + +;; definition for method 81 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-81 ((this vehicle)) + (when (logtest? (vehicle-flag camera) (-> this v-flags)) + (vehicle-method-83 this) + (logclear! (-> this v-flags) (vehicle-flag camera)) + ) + 0 + (none) + ) + +;; definition for method 82 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-82 ((this vehicle)) + (logclear! (-> this v-flags) (vehicle-flag camera-bike-mode camera-rapid-tracking-mode)) + (set! (-> this cam-speed-interp) 0.0) + (set-setting! 'string-min-height 'abs (-> this info camera string-min-height) 0) + (set-setting! 'string-max-height 'abs (-> this info camera string-max-height) 0) + (set-setting! 'head-offset 'abs (-> this info camera head-offset) 0) + (set-setting! 'foot-offset 'abs (-> this info camera foot-offset) 0) + (set-setting! 'target-height 'abs (meters 0) 0) + (persist-with-delay *setting-control* 'mode-name (seconds 0.2) 'mode-name 'cam-fixed 0.0 0) + (persist-with-delay *setting-control* 'interp-time (seconds 0.05) 'interp-time 'abs 0.0 0) + 0 + (none) + ) + +;; definition for method 83 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-83 ((this vehicle)) + (remove-setting! 'bike-mode) + (remove-setting! 'rapid-tracking) + (remove-setting! 'fov) + (remove-setting! 'string-camera-ceiling) + (remove-setting! 'string-camera-floor) + (remove-setting! 'string-min-height) + (remove-setting! 'string-max-height) + (remove-setting! 'string-min-length) + (remove-setting! 'string-max-length) + (remove-setting! 'extra-follow-height) + (remove-setting! 'head-offset) + (remove-setting! 'foot-offset) + (remove-setting! 'target-height) + (remove-setting! 'slave-options) + (remove-setting! 'vertical-follow-matches-camera) + (remove-setting! 'mode-name) + (remove-setting! 'butt-handle) + (remove-setting! 'lock-sound-camera-to-target) + (remove-setting! 'interp-time) + (vehicle-method-148 this) + 0 + (none) + ) + +;; definition for method 84 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-84 ((this vehicle)) + (when (not (logtest? (vehicle-flag camera-bike-mode) (-> this v-flags))) + (logior! (-> this v-flags) (vehicle-flag camera-bike-mode)) + (set-setting! 'bike-mode #f 0.0 0) + ) + 0 + (none) + ) + +;; definition for method 85 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-85 ((this vehicle)) + (when (logtest? (vehicle-flag camera-bike-mode) (-> this v-flags)) + (logclear! (-> this v-flags) (vehicle-flag camera-bike-mode)) + (remove-setting! 'bike-mode) + ) + 0 + (none) + ) + +;; definition for method 86 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-86 ((this vehicle)) + (when (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (logior! (-> this v-flags) (vehicle-flag camera-rapid-tracking-mode)) + (set-setting! 'rapid-tracking #f 0.0 0) + ) + 0 + (none) + ) + +;; definition for method 87 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-87 ((this vehicle)) + (when (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (logclear! (-> this v-flags) (vehicle-flag camera-rapid-tracking-mode)) + (remove-setting! 'rapid-tracking) + ) + 0 + (none) + ) + +;; definition for method 42 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-42 ((this vehicle)) + (logior! (-> this v-flags) (vehicle-flag enable-collision)) + (let ((v1-3 (-> this root root-prim))) + (set! (-> v1-3 prim-core collide-as) (-> this root backup-collide-as)) + (set! (-> v1-3 prim-core collide-with) (-> this root backup-collide-with)) + ) + 0 + (none) + ) + +;; definition for method 43 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-43 ((this vehicle)) + (logclear! (-> this v-flags) (vehicle-flag enable-collision)) + (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 + 0 + (none) + ) + +;; definition for method 99 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-99 ((this vehicle)) + (let ((v1-1 (-> this draw shadow-ctrl))) + (logclear! (-> v1-1 settings flags) (shadow-flags disable-draw)) + ) + 0 + 0 + (none) + ) + +;; definition for method 100 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-100 ((this vehicle)) + (let ((v1-1 (-> this draw shadow-ctrl))) + (logior! (-> v1-1 settings flags) (shadow-flags disable-draw)) + ) + 0 + 0 + (none) + ) + +;; definition for method 148 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-148 ((this vehicle)) + 0 + (none) + ) + +;; definition for method 147 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-147 ((this vehicle)) + 0 + (none) + ) + +;; definition for method 40 of type vehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod apply-momentum! ((this vehicle)) + (let ((s5-0 (-> this rbody))) + (when (not (logtest? (-> s5-0 flags) (rigid-body-flag enable-physics))) + (logior! (-> s5-0 flags) (rigid-body-flag enable-physics)) + (rigid-body-control-method-28 s5-0 (-> this root trans) (-> this root quat)) + (set! (-> s5-0 lin-velocity quad) (-> this root transv quad)) + (vector-float*! (-> s5-0 lin-momentum) (-> s5-0 lin-velocity) (-> this info info mass)) + (vector-reset! (-> s5-0 ang-momentum)) + (vector-reset! (-> this lin-acceleration)) + ) + ) + 0 + (none) + ) + +;; definition for method 41 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod disable-physics! ((this vehicle)) + (set! (-> this force-scale) 1.0) + (logclear! (-> this rbody flags) (rigid-body-flag enable-physics)) + (vehicle-method-106 this) + 0 + (none) + ) + +;; definition for method 107 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-107 ((this vehicle) (arg0 int) (arg1 process)) + (let ((a0-1 (-> this squad))) + (when (and a0-1 arg1) + (if #t + (squad-control-method-18 a0-1 arg0 arg1) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 108 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-108 ((this vehicle) (arg0 int)) + (set-alert-level0 (-> this squad) arg0) + 0 + (none) + ) + +;; definition for method 44 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod impulse-handler ((this vehicle)) + (if (and (not (focus-test? this inactive)) + (not (and (-> this next-state) (= (-> this next-state name) 'explode))) + ) + ((method-of-type rigid-body-object impulse-handler) this) + ) + 0 + (none) + ) + +;; definition for method 109 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-109 ((this vehicle)) + (vehicle-method-122 this) + (logior! (-> this focus-status) (focus-status inactive)) + (set! (-> this event-hook) (-> (method-of-object this inactive) event)) + (go (method-of-object this inactive)) + 0 + (none) + ) + +;; definition for method 110 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-110 ((this vehicle)) + (if (focus-test? this inactive) + (vehicle-method-123 this) + ) + (go (method-of-object this active)) + 0 + (none) + ) + +;; definition for method 45 of type vehicle +;; WARN: Return type mismatch int vs object. +(defmethod go-active ((this vehicle)) + (go (method-of-object this waiting)) + 0 + ) + +;; definition for method 134 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-134 ((this vehicle)) + (go (method-of-object this player-control)) + 0 + (none) + ) + +;; definition for method 132 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-132 ((this vehicle) (arg0 traffic-object-spawn-params)) + (let ((v1-0 (-> arg0 behavior))) + (cond + ((= v1-0 1) + (vehicle-method-131 this) + (vehicle-method-109 this) + ) + ((zero? v1-0) + (go (method-of-object this idle)) + ) + ((= v1-0 4) + (go (method-of-object this player-control)) + ) + (else + (go (method-of-object this idle)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 124 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-124 ((this vehicle)) + (if (= this *debug-actor*) + (format #t "hook-dead~%") + ) + (logior! (-> this focus-status) (focus-status dead)) + (vehicle-method-136 this) + (set! (-> this v-flags) + (the-as vehicle-flag (logclear + (-> this v-flags) + (vehicle-flag riding player-driving net-player-driving in-pursuit target-in-sight) + ) + ) + ) + (set! (-> this controls throttle) 0.0) + (set! (-> this controls steering) 0.0) + 0 + (none) + ) + +;; definition for method 133 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-133 ((this vehicle) (arg0 traffic-object-spawn-params)) + 0 + (none) + ) + +;; definition for method 102 of type vehicle +(defmethod vehicle-method-102 ((this vehicle)) + (logtest? (vehicle-flag disturbed player-touching player-driving in-pursuit) (-> this v-flags)) + ) + +;; definition for method 142 of type vehicle +(defmethod vehicle-method-142 ((this vehicle)) + (reset-momentum! (-> this rbody)) + (none) + ) + +;; definition for method 103 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-103 ((this vehicle)) + (local-vars (v1-8 float) (v1-13 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)) + (let* ((f0-0 (-> this camera-dist2)) + (f1-0 0.000024414063) + (f0-1 (* f0-0 (* f1-0 f1-0))) + ) + (.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-8 vf1) + (when (and (< v1-8 f0-1) (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-13 vf1) + (let ((f1-4 v1-13) + (f2-0 614.4) + ) + (< f1-4 (* f0-1 (* f2-0 f2-0))) + ) + ) + ) + (logclear! (-> this v-flags) (vehicle-flag disturbed)) + (vehicle-method-142 this) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 79 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-79 ((this vehicle)) + 0 + (none) + ) + +;; definition for method 115 of type vehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-115 ((this vehicle)) + (dotimes (s5-0 (-> this info rider seat-count)) + (let ((s4-0 (handle->process (-> this rider-array s5-0)))) + (when (and s4-0 (focus-test? (the-as process-focusable s4-0) pilot-riding)) + (vehicle-method-66 this (-> (the-as process-focusable s4-0) root trans) s5-0) + (set! (-> (the-as process-focusable s4-0) root transv quad) (-> this root transv quad)) + (let ((f0-1 (the float (-> this info rider seat-array s5-0 angle)))) + (quaternion-rotate-local-y! (-> (the-as process-focusable s4-0) root quat) (-> this root quat) f0-1) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 146 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-146 ((this vehicle) (arg0 vector)) + 0 + (none) + ) + +;; definition for method 149 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-149 ((this vehicle)) + 0 + (none) + ) + +;; definition for method 62 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-62 ((this vehicle)) + (let ((v1-1 (-> this root root-prim)) + (f0-0 0.0) + ) + (dotimes (a0-1 (the-as int (-> v1-1 specific 0))) + (let ((a1-3 (-> (the-as collide-shape-prim-group v1-1) child a0-1 local-sphere))) + (set! f0-0 (fmax f0-0 (+ (vector-length a1-3) (-> a1-3 w)))) + ) + ) + (vector-reset! (-> v1-1 local-sphere)) + (set! (-> v1-1 local-sphere w) f0-0) + ) + 0 + (none) + ) + +;; definition for method 116 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-116 ((this vehicle) (arg0 symbol)) + (dotimes (s4-0 (-> this info rider seat-count)) + (let* ((s3-0 (handle->process (-> this rider-array s4-0))) + (a0-5 (if (type? s3-0 process-focusable) + s3-0 + ) + ) + ) + (send-event + a0-5 + '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 arg0)) + ) + ) + ) + (put-rider-in-seat this s4-0 (the-as process #f)) + ) + 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 new file mode 100644 index 0000000000..c0bb7de206 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/city/traffic/vehicle/vehicle_REF.gc @@ -0,0 +1,1408 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *debug-vehicle-work*, type debug-vehicle-work +(define *debug-vehicle-work* (new 'static 'debug-vehicle-work)) + +;; failed to figure out what this is: +(defskelgroup skel-vehicle-explosion vehicle-explosion vehicle-explosion-lod0-jg vehicle-explosion-idle-ja + ((vehicle-explosion-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 50) + ) + +;; definition for symbol *vehicle-shadow-control*, type shadow-control +(define *vehicle-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 163840.0) + :bot-plane (new 'static 'plane :y 1.0 :w 40960.0) + :top-plane (new 'static 'plane :y 1.0 :w 2048.0) + ) + ) + ) + +;; definition for symbol *vehicle-shadow-control-disabled*, type shadow-control +(define *vehicle-shadow-control-disabled* + (new 'static 'shadow-control :settings (new 'static 'shadow-settings + :center (new 'static 'vector :w (the-as float #x2a)) + :shadow-dir (new 'static 'vector :y -1.0 :w 163840.0) + :bot-plane (new 'static 'plane :y 1.0 :w 40960.0) + :top-plane (new 'static 'plane :y 1.0 :w 2048.0) + ) + ) + ) + +;; definition for function vehicle-event-handler +(defbehavior vehicle-event-handler vehicle ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (rbody-event-handler self arg0 arg1 arg2 arg3) + ) + +;; definition for method 48 of type vehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod on-impact ((this vehicle) (arg0 rigid-body-impact)) + (local-vars (v1-79 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (logior! (-> this v-flags) (vehicle-flag impact)) + (set! (-> this impact-pos quad) (-> arg0 point quad)) + (let ((s4-0 (new 'stack-no-clear 'matrix))) + (matrix-inverse-of-rot-trans! (the-as matrix (-> s4-0 rvec)) (-> this rbody matrix)) + (vector-matrix*! (-> this impact-local-pos) (-> this impact-pos) (the-as matrix (-> s4-0 rvec))) + ) + (set! (-> this prev-impact-time) (-> this impact-time)) + (set! (-> this impact-time) (the-as uint (current-time))) + (set! (-> this impact-pat) (the-as uint (-> arg0 pat))) + (set! (-> this impact-proc) (the-as handle #f)) + (let ((a0-5 (-> arg0 process))) + (if a0-5 + (set! (-> this impact-proc) (process->handle a0-5)) + ) + ) + (let ((s4-1 (-> this info)) + (f0-0 1.0) + ) + (let ((v1-14 (-> arg0 prim-id))) + (if (logtest? v1-14 512) + (set! f0-0 (* 1.5 f0-0)) + ) + (if (logtest? v1-14 1024) + (set! f0-0 (* 2.0 f0-0)) + ) + (if (logtest? v1-14 2048) + (set! f0-0 (* 4.0 f0-0)) + ) + (if (logtest? v1-14 256) + (set! f0-0 (/ 1.0 f0-0)) + ) + ) + (let ((f30-0 (* (-> arg0 impulse) f0-0 (-> s4-1 info inv-mass) (-> s4-1 damage inv-toughness-factor)))) + (set! (-> this crash-impulse) (-> arg0 impulse)) + (cond + ((< f30-0 (-> s4-1 damage hit-threshold)) + ) + ((>= f30-0 (-> s4-1 damage hit-deadly)) + (when (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 1)) + 0 + ) + (apply-damage this (* 2.0 (-> s4-1 damage hit-points)) arg0) + (vehicle-method-74 this 2 (seconds 1)) + ) + ((>= f30-0 (-> s4-1 damage hit-big)) + (when (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.5)) + 0 + ) + (apply-damage this (* 10.0 (-> s4-1 damage impact-damage-factor)) arg0) + (vehicle-method-74 this 1 (seconds 0.25)) + ) + ((>= f30-0 (-> s4-1 damage hit-small)) + (when (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.25)) + 0 + ) + (apply-damage this (* 5.0 (-> s4-1 damage impact-damage-factor)) arg0) + (vehicle-method-74 this 1 (seconds 0.25)) + ) + (else + (let* ((f0-14 0.0) + (f1-10 40.0) + (f2-0 16384000.0) + (f0-15 (fmax f0-14 (* f1-10 (/ 1.0 f2-0) (- f30-0 (-> s4-1 damage hit-threshold))))) + ) + (apply-damage this (* f0-15 (-> s4-1 damage impact-damage-factor)) arg0) + ) + (when (< 32768.0 f30-0) + (if (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.1)) + ) + ) + ) + ) + (let* ((f0-18 1.0) + (f1-14 61440.0) + (f28-0 (fmin f0-18 (* f30-0 (/ 1.0 f1-14)))) + ) + (cond + ((>= f30-0 (-> s4-1 damage hit-small)) + (sound-play-by-name + (-> this info sound impact-sound) + (new-sound-id) + (the int (* 1024.0 f28-0)) + 0 + 0 + (sound-group) + #t + ) + (logclear! (-> this v-flags) (vehicle-flag turbo-boost)) + ) + ((< 0.1 f28-0) + (sound-play-by-name + (-> this info sound glance-sound) + (new-sound-id) + (the int (* 1024.0 f28-0)) + 0 + 0 + (sound-group) + #t + ) + ) + ) + ) + ) + ) + (let ((a0-39 (new 'stack-no-clear 'vector))) + (vector+float*! + a0-39 + (-> arg0 velocity) + (-> arg0 normal) + (- (vector-dot (-> arg0 velocity) (-> arg0 normal))) + ) + (.lvf vf1 (&-> a0-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-79 vf1) + (let ((f0-30 v1-79) + (f1-18 12288.0) + ) + (when (< (* f1-18 f1-18) f0-30) + (set! (-> this scrape-sound-envelope) 1.0) + (if (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 0 255 (seconds 0.05)) + ) + ) + ) + (if (>= 0.0 (-> this hit-points)) + (vehicle-method-74 this 2 (seconds 1)) + ) + 0 + (none) + ) + ) + +;; definition for method 92 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-92 ((this vehicle) (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))) + (+! (-> 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 88 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-88 ((this vehicle) (arg0 vehicle-controls)) + 0 + (none) + ) + +;; definition for method 91 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod control-hook-player ((this vehicle) (arg0 vehicle-controls)) + (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)) + (-> *setting-control* user-current stop-vehicle?) + ) + (set! (-> gp-0 steering) 0.0) + (set! (-> gp-0 lean-z) 0.0) + (set! (-> gp-0 throttle) 0.0) + (set! (-> gp-0 brake) 1.0) + (set! (-> gp-0 handbrake) 0.0) + (set! (-> this v-flags) + (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag reverse-gear camera-look-mode))) + ) + ) + (else + (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 93 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-93 ((this vehicle)) + (let ((s5-0 (new 'stack-no-clear 'mystery-vehicle-type2))) + (set! (-> s5-0 time) (the-as uint (current-time))) + (when (and *target* (logtest? (vehicle-flag ignition) (-> this v-flags))) + (when (and (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (zero? (-> this root num-riders)) + (or (not *target*) (or (< 32768.0 (vector-vector-distance (-> this root trans) (-> *target* control trans))) + (focus-test? *target* teleporting) + ) + ) + ) + (set! (-> this controls throttle) 0.0) + (set! (-> this controls steering) 0.0) + (set! (-> this controls lean-z) 0.0) + (mem-copy! (the-as pointer (-> this prev-controls)) (the-as pointer (-> this controls)) 24) + ) + ) + (cond + ((zero? (-> this crash-level)) + (seek! (-> this force-scale) 1.0 (seconds-per-frame)) + ) + ((< (-> this crash-level) 3) + (set! (-> s5-0 word01) (- (-> s5-0 time) (-> this crash-time))) + (when (>= (-> s5-0 word01) (-> this crash-duration)) + (if (or (>= (-> this rbody matrix uvec y) (cos 18204.445)) (>= (-> s5-0 word01) (the-as uint 900))) + (vehicle-method-75 this) + ) + ) + ) + ) + (set! (-> this force-level) (-> this crash-level)) + (cond + ((>= (-> this hit-points) 0.9) + (set! (-> this power-fluctuation-factor) 0.01) + ) + ((>= (-> this hit-points) 0.75) + (set! (-> this power-fluctuation-factor) 0.02) + ) + ((>= (-> this hit-points) 0.5) + (set! (-> this power-fluctuation-factor) 0.04) + ) + ((>= (-> this hit-points) 0.3) + (set! (-> this power-fluctuation-factor) 0.08) + ) + ((>= (-> this hit-points) 0.15) + (set! (-> this power-fluctuation-factor) 0.16) + ) + ((>= (-> this hit-points) 0.05) + (set! (-> this power-fluctuation-factor) 0.32) + ) + (else + (set! (-> this power-fluctuation-factor) 0.5) + ) + ) + (let ((f1-6 0.0)) + (when (logtest? (vehicle-flag ignition) (-> this v-flags)) + (let ((f0-23 (- 1.0 (* (rand-vu) (-> this power-fluctuation-factor))))) + (set! f1-6 (* f0-23 f0-23)) + ) + (if (not (logtest? (-> this v-flags) (vehicle-flag riding))) + (set! f1-6 (* 0.5 f1-6)) + ) + ) + (+! (-> this power-level) + (* (- f1-6 (-> this power-level)) + (fmin 1.0 (* (+ 1.0 (* 50.0 (-> this power-fluctuation-factor))) (seconds-per-frame))) + ) + ) + ) + (when (logtest? (vehicle-flag turbo-boost) (-> this v-flags)) + (set! (-> s5-0 word00) (- (-> s5-0 time) (-> this turbo-boost-time))) + (if (or (>= (-> s5-0 word00) (-> this turbo-boost-duration)) + (and (>= (-> s5-0 word00) (the-as uint 30)) (>= (-> this controls brake) 0.75)) + ) + (logclear! (-> this v-flags) (vehicle-flag turbo-boost)) + ) + ) + ) + (if (logtest? (-> this v-flags) (vehicle-flag on-ground on-flight-level)) + (set! (-> this air-time) (the-as uint (current-time))) + ) + 0 + (none) + ) + +;; definition for method 94 of type vehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-94 ((this vehicle)) + (let ((s5-0 (new 'stack-no-clear 'mystery-vehicle-type1))) + (set! (-> s5-0 word02) (the-as uint (current-time))) + (cond + ((logtest? (-> this v-flags) (vehicle-flag in-air)) + (when (or (< 55296.0 (-> this rbody lin-velocity y)) (>= (- (-> s5-0 word02) (-> this air-time)) (the-as uint 225))) + (set-setting! 'extra-follow-height 'abs (meters -4) 0) + (send-event *camera* 'set-max-angle-offset (-> this info camera air-max-angle-offset)) + ) + ) + (else + (remove-setting! 'extra-follow-height) + (send-event *camera* 'set-max-angle-offset (-> this info camera normal-max-angle-offset)) + ) + ) + (let ((f0-4 (vector-dot (-> this rbody lin-velocity) (-> this rbody matrix fvec)))) + (cond + ((= (-> this crash-level) 2) + (vehicle-method-85 this) + ) + ((< f0-4 (-> this info camera max-lookaround-speed)) + (vehicle-method-85 this) + ) + ((< (+ 4096.0 (-> this info camera max-lookaround-speed)) f0-4) + (vehicle-method-84 this) + ) + ) + ) + (when (not (logtest? (vehicle-flag flight-level-transition) (-> this v-flags))) + (let* ((f0-5 1.0) + (v1-49 (-> this rbody lin-velocity)) + (f0-6 (fmin f0-5 (/ (sqrtf (+ (* (-> v1-49 x) (-> v1-49 x)) (* (-> v1-49 z) (-> v1-49 z)))) + (-> this info handling max-xz-speed) + ) + ) + ) + ) + (seek! (-> this cam-speed-interp) f0-6 (* 0.1 (seconds-per-frame))) + ) + ) + (let ((f30-0 (-> this cam-speed-interp))) + (if #f + (set! f30-0 + (fmax 0.0 (fmin 1.0 (analog-input (the-as int (-> *cpad-list* cpads 1 righty)) 128.0 48.0 110.0 -1.0))) + ) + ) + (set! (-> s5-0 float00) + (lerp-scale (-> this info camera min-fov) (-> this info camera max-fov) f30-0 0.0 1.0) + ) + (set-setting! 'fov 'abs (-> s5-0 float00) 0) + (let ((f30-2 (lerp-scale 1.0 0.6 f30-0 0.0 1.0))) + (set-setting! 'string-min-length 'abs (* f30-2 (-> this info camera string-min-length)) 0) + (set-setting! 'string-max-length 'abs (* f30-2 (-> this info camera string-max-length)) 0) + ) + ) + (when *target* + (set! (-> s5-0 vec0 quad) (-> *target* draw shadow-ctrl settings shadow-dir quad)) + (let ((v1-75 (-> this draw shadow-ctrl settings shadow-dir))) + (set! (-> s5-0 vec0 w) (-> v1-75 w)) + (set! (-> v1-75 quad) (-> s5-0 vec0 quad)) + ) + ) + (let ((s4-0 (new 'stack-no-clear 'inline-array 'collide-query 2))) + (let* ((v1-76 (-> s4-0 1)) + (a3-7 (-> this rbody matrix)) + (a0-29 (-> a3-7 rvec quad)) + (a1-11 (-> a3-7 uvec quad)) + (a2-9 (-> a3-7 fvec quad)) + (a3-8 (-> a3-7 trans quad)) + ) + (set! (-> v1-76 best-other-tri vertex 0 quad) a0-29) + (set! (-> v1-76 best-other-tri vertex 1 quad) a1-11) + (set! (-> v1-76 best-other-tri vertex 2 quad) a2-9) + (set! (-> v1-76 best-other-tri intersect quad) a3-8) + ) + (cond + ((logtest? (vehicle-flag camera-look-mode) (-> this v-flags)) + (let ((a0-31 *camera*)) + (when a0-31 + (let ((s3-0 (-> a0-31 slave))) + (when s3-0 + (set! (-> s3-0 0 fov) (-> s5-0 float00)) + (let ((v1-83 (-> this cam-view))) + (cond + ((zero? v1-83) + (vector-matrix*! + (the-as vector (-> s4-0 1 bbox)) + (the-as vector (-> this info camera look-pos-array)) + (the-as matrix (-> s4-0 1)) + ) + ) + ((= v1-83 1) + (vector-matrix*! (the-as vector (-> s4-0 1 bbox)) (-> this info camera look-rear) (the-as matrix (-> s4-0 1))) + (matrix-rotate-yx! (the-as matrix (-> s4-0 1 best-other-tri normal)) 32768.0 3640.889) + (matrix*! + (the-as matrix (-> s4-0 1)) + (the-as matrix (-> s4-0 1 best-other-tri normal)) + (the-as matrix (-> s4-0 1)) + ) + ) + ((= v1-83 2) + (vector-matrix*! (the-as vector (-> s4-0 1 bbox)) (-> this info camera look-left) (the-as matrix (-> s4-0 1))) + (matrix-rotate-yx! (the-as matrix (-> s4-0 1 best-other-tri normal)) 16384.0 3640.889) + (matrix*! + (the-as matrix (-> s4-0 1)) + (the-as matrix (-> s4-0 1 best-other-tri normal)) + (the-as matrix (-> s4-0 1)) + ) + ) + ((= v1-83 3) + (vector-matrix*! + (the-as vector (-> s4-0 1 bbox)) + (-> this info camera look-right) + (the-as matrix (-> s4-0 1)) + ) + (matrix-rotate-yx! (the-as matrix (-> s4-0 1 best-other-tri normal)) -16384.0 3640.889) + (matrix*! + (the-as matrix (-> s4-0 1)) + (the-as matrix (-> s4-0 1 best-other-tri normal)) + (the-as matrix (-> s4-0 1)) + ) + ) + (else + (vector-matrix*! + (the-as vector (-> s4-0 1 bbox)) + (the-as vector (-> this info camera look-pos-array)) + (the-as matrix (-> s4-0 1)) + ) + ) + ) + ) + (when (nonzero? (-> this cam-view)) + (let ((v1-96 (-> s4-0 0))) + (set! (-> v1-96 radius) 2048.0) + (set! (-> v1-96 collide-with) + (collide-spec + backgnd + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> v1-96 ignore-process0) this) + (set! (-> v1-96 ignore-process1) #f) + (set! (-> v1-96 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-96 action-mask) (collide-action solid)) + ) + (set! (-> s4-0 0 start-pos quad) (-> this rbody position quad)) + (vector-! (-> s4-0 0 move-dist) (the-as vector (-> s4-0 1 bbox)) (-> s4-0 0 start-pos)) + (let ((f0-23 (fill-and-probe-using-line-sphere *collide-cache* (-> s4-0 0)))) + (if (>= f0-23 0.0) + (vector+float*! (the-as vector (-> s4-0 1 bbox)) (-> s4-0 0 start-pos) (-> s4-0 0 move-dist) f0-23) + ) + ) + ) + (set! (-> s3-0 0 saved-pt quad) (-> s4-0 1 bbox min quad)) + (let ((v1-107 (-> s3-0 0 tracking))) + (set! (-> v1-107 inv-mat rvec quad) (-> s4-0 1 best-other-tri vertex 0 quad)) + (set! (-> v1-107 inv-mat uvec quad) (-> s4-0 1 best-other-tri vertex 1 quad)) + (set! (-> v1-107 inv-mat fvec quad) (-> s4-0 1 best-other-tri vertex 2 quad)) + ) + ) + ) + ) + ) + (if (zero? (-> this cam-view)) + (vehicle-method-147 this) + (vehicle-method-148 this) + ) + (when (not (logtest? (vehicle-flag camera-look-mode) (-> this unknown-flags))) + (set-setting! 'interp-time 'abs 3.0 0) + (set-setting! 'mode-name 'cam-fixed 0.0 0) + (set-setting! 'lock-sound-camera-to-target #t 0.0 0) + ) + ) + (else + (when (logtest? (vehicle-flag camera-look-mode) (-> this unknown-flags)) + (vehicle-method-148 this) + (let ((v1-130 *camera*)) + (when v1-130 + (when (-> v1-130 slave) + (let ((s5-1 (new 'static 'vector))) + (let ((v1-132 (new 'stack-no-clear 'inline-array 'matrix 2))) + (let ((a0-72 (-> v1-132 1))) + (set! (-> a0-72 rvec x) 0.0) + (set! (-> a0-72 rvec y) 0.0) + (set! (-> a0-72 rvec z) -1.0) + (set! (-> a0-72 rvec w) 1.0) + ) + (let* ((a0-73 (-> v1-132 0)) + (t0-10 (-> this rbody matrix)) + (a1-37 (-> t0-10 rvec quad)) + (a2-24 (-> t0-10 uvec quad)) + (a3-12 (-> t0-10 fvec quad)) + (t0-11 (-> t0-10 trans quad)) + ) + (set! (-> a0-73 rvec quad) a1-37) + (set! (-> a0-73 uvec quad) a2-24) + (set! (-> a0-73 fvec quad) a3-12) + (set! (-> a0-73 trans quad) t0-11) + ) + (vector-rotate*! s5-1 (the-as vector (-> v1-132 1)) (-> v1-132 0)) + ) + (persist-with-delay + *setting-control* + 'string-startup-vector + (seconds 0.05) + 'string-startup-vector + 'abs + (the-as float s5-1) + 0 + ) + ) + ) + ) + ) + (set-setting! 'interp-time 'abs 0.0 0) + (remove-setting! 'mode-name) + (remove-setting! 'lock-sound-camera-to-target) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 101 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-101 ((this vehicle)) + 0 + (none) + ) + +;; definition for method 30 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-30 ((this vehicle)) + (cond + ((logtest? (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) + ) + ) + ) + (if (logtest? (vehicle-flag particles) (-> this v-flags)) + (vehicle-method-78 this) + ) + (if (logtest? (vehicle-flag joints) (-> this v-flags)) + (vehicle-method-79 this) + ) + (when (logtest? (vehicle-flag player-dismounting) (-> this v-flags)) + (let ((a0-10 (new 'stack-no-clear 'array 'uint32 1))) + (set! (-> a0-10 0) (the-as uint (current-time))) + (when (< (the-as uint 150) (- (-> a0-10 0) (-> this player-dismount-time))) + (logclear! (-> this v-flags) (vehicle-flag player-dismounting)) + (let ((v1-32 (find-prim-by-id-logtest (-> this root) (the-as uint 64)))) + (if v1-32 + (set! (-> v1-32 prim-core collide-as) (collide-spec vehicle-sphere vehicle-mesh)) + ) + ) + ) + ) + ) + (set! (-> this unknown-flags) (-> this v-flags)) + (ja-post) + 0 + (none) + ) + +;; definition for method 54 of type vehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-54 ((this vehicle)) + (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) + (water-info-init! (-> this root) (the-as water-info (-> s5-0 mat)) (collide-action solid semi-solid)) + (set! (-> this water-flags) (the-as uint (-> s5-0 mat trans x))) + (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)) + (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-15 (-> s5-0 cquery))) + (set! (-> v1-15 radius) (+ 4096.0 (-> this root root-prim local-sphere w))) + (set! (-> v1-15 collide-with) (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + player-list + collectable + blocking-plane + pusher + vehicle-mesh-probeable + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> v1-15 ignore-process0) this) + (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)) + ) + (if (focus-test? this dead) + (set! (-> s5-0 cquery ignore-pat) (new 'static 'pat-surface :noentity #x1 :nopilot #x1 :probe #x1)) + ) + (fill-using-line-sphere *collide-cache* (-> s5-0 cquery)) + ) + (rigid-body-control-method-10 (-> this rbody) this (-> this rbody time-remaining) (-> this max-time-step)) + 0 + (none) + ) + +;; definition for method 77 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-77 ((this vehicle)) + (vehicle-method-115 this) + (if (logtest? (vehicle-flag camera) (-> this v-flags)) + (vehicle-method-94 this) + ) + (if (logtest? (vehicle-flag nav-spheres) (-> this v-flags)) + (vehicle-method-140 this) + ) + (when (< (-> this hit-points) 0.0) + (logior! (-> this v-flags) (vehicle-flag dead)) + (set! (-> this crash-level) 3) + ) + (if (and (logtest? (-> this v-flags) (vehicle-flag dead)) + (not (logtest? (-> this focus-status) (focus-status dead))) + ) + (go (method-of-object this crash)) + ) + 0 + (none) + ) + +;; definition for method 55 of type vehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod clear-impulse-force-flag! ((this vehicle)) + (with-pp + (let ((v1-0 (new 'stack-no-clear 'matrix))) + (set! (-> v1-0 rvec quad) (-> this root transv quad)) + (vector-! (-> v1-0 uvec) (-> this rbody lin-velocity) (-> v1-0 rvec)) + (vector-float*! (-> this lin-acceleration) (-> v1-0 uvec) (-> pp clock frames-per-second)) + ) + (set! (-> this root transv quad) (-> this rbody lin-velocity quad)) + (quaternion-copy! (-> this root quat) (the-as quaternion (-> this rbody rot))) + (rigid-body-control-method-25 (-> this rbody) (-> this root trans)) + (let* ((v1-11 (-> this node-list data 0 bone transform)) + (a3-0 (-> this rbody matrix)) + (a0-12 (-> a3-0 rvec quad)) + (a1-8 (-> a3-0 uvec quad)) + (a2-1 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-11 rvec quad) a0-12) + (set! (-> v1-11 uvec quad) a1-8) + (set! (-> v1-11 fvec quad) a2-1) + (set! (-> v1-11 trans quad) a3-1) + ) + (set! (-> this node-list data 0 bone transform trans quad) (-> this root trans quad)) + (vehicle-method-77 this) + (rigid-body-object-method-30 this) + (update-transforms (-> this root)) + (seek! (-> this scrape-sound-envelope) 0.0 (* 2.0 (seconds-per-frame))) + (mem-copy! (the-as pointer (-> this prev-controls)) (the-as pointer (-> this controls)) 24) + (logclear! (-> this v-flags) (vehicle-flag player-impulse-force player-contact-force)) + 0 + (none) + ) + ) + +;; definition for method 117 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-117 ((this vehicle)) + (if (time-elapsed? (-> this player-touch-time) (seconds 0.1)) + (logclear! (-> this v-flags) (vehicle-flag player-touching player-edge-grabbing player-standing-on)) + ) + (when (logtest? (-> this v-flags) (vehicle-flag player-touching)) + (detect-riders! (-> this root)) + 0 + ) + (if (logtest? (vehicle-flag player-touching player-driving) (-> this v-flags)) + (logior! (-> this skel status) (joint-control-status sync-math)) + (logclear! (-> this skel status) (joint-control-status sync-math)) + ) + (vehicle-method-93 this) + 0 + (none) + ) + +;; definition for method 39 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod rbody-post ((this vehicle)) + (local-vars (a0-14 int) (a0-16 int) (a0-19 int) (a0-21 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))) + (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)) + (vehicle-method-117 this) + (vehicle-method-103 this) + ) + (else + (let* ((v1-26 (-> *perf-stats* data 20)) + (a0-11 (-> v1-26 ctrl)) + ) + (+! (-> v1-26 count) 1) + (b! (zero? a0-11) cfg-12 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-11) + ) + (.sync.l) + (.sync.p) + (label cfg-12) + 0 + (rigid-body-object-method-30 this) + (let ((v1-31 (-> *perf-stats* data 20))) + (b! (zero? (-> v1-31 ctrl)) cfg-14 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-14 pcr0) + (+! (-> v1-31 accum0) a0-14) + (.mfpc a0-16 pcr1) + (+! (-> v1-31 accum1) a0-16) + ) + (label cfg-14) + 0 + ) + ) + (let ((v1-34 (-> *perf-stats* data 37))) + (b! (zero? (-> v1-34 ctrl)) cfg-17 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-19 pcr0) + (+! (-> v1-34 accum0) a0-19) + (.mfpc a0-21 pcr1) + (+! (-> v1-34 accum1) a0-21) + ) + (label cfg-17) + 0 + 0 + (none) + ) + +;; definition for method 89 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod init-reverse ((this vehicle) (arg0 vehicle-controls)) + (set! (-> arg0 steering) 0.0) + (set! (-> arg0 lean-z) 0.0) + (set! (-> arg0 throttle) 0.0) + (set! (-> arg0 brake) 1.0) + (set! (-> arg0 handbrake) 1.0) + (logclear! (-> this v-flags) (vehicle-flag reverse-gear)) + 0 + (none) + ) + +;; definition for method 118 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-118 ((this vehicle)) + (local-vars (a0-25 int) (a0-27 int)) + (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))) + (b! + (not (and (logtest? (vehicle-flag traffic-managed) (-> this v-flags)) + (not (logtest? (-> this v-flags) (vehicle-flag persistent))) + ) + ) + cfg-20 + :delay (empty-form) + ) + (let ((f0-3 (fmin (-> this player-dist2) (-> this camera-dist2)))) + (let ((f1-1 819200.0)) + (b! (>= (* f1-1 f1-1) f0-3) cfg-8) + ) + (let ((f1-4 819200.0)) + (if (< (* f1-4 f1-4) f0-3) + (vehicle-method-109 this) + ) + ) + (b! #t cfg-19 :delay (nop!)) + (label cfg-8) + (let ((f1-7 81920.0)) + (b! (>= (* f1-7 f1-7) f0-3) cfg-18) + ) + (b! (not (logtest? (-> this draw status) (draw-control-status on-screen))) cfg-11 :delay (nop!)) + (set-time! (-> this state-time)) + (b! #t cfg-17 :delay (nop!)) + (label cfg-11) + (if (or (time-elapsed? (-> this state-time) (seconds 10)) (let ((f1-10 409600.0)) + (< (* f1-10 f1-10) f0-3) + ) + ) + (vehicle-method-109 this) + ) + ) + (label cfg-17) + (b! #t cfg-19 :delay (nop!)) + (label cfg-18) + (set-time! (-> this state-time)) + (label cfg-19) + 0 + (label cfg-20) + (vehicle-method-129 this) + (cond + ((logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + (when (not (vehicle-method-102 this)) + (disable-physics! this) + (vehicle-method-142 this) + ) + ) + (else + (if (vehicle-method-102 this) + (apply-momentum! this) + ) + ) + ) + (b! (not (logtest? (-> this rbody flags) (rigid-body-flag enable-physics))) cfg-31 :delay (nop!)) + (vector-reset! (-> this target-acceleration)) + (when (logtest? (-> this v-flags) (vehicle-flag disturbed)) + (if (logtest? (-> this v-flags) (vehicle-flag in-air)) + (set-time! (-> this disturbed-time)) + ) + ) + (let ((s5-2 (new 'stack-no-clear 'vehicle-controls))) + (mem-set32! (&-> s5-2 steering) 6 0) + (init-reverse this (the-as vehicle-controls (&-> s5-2 steering))) + (vehicle-method-92 this (the-as vehicle-controls (&-> s5-2 steering))) + ) + (vehicle-method-117 this) + (vehicle-method-103 this) + (b! #t cfg-36 :delay (nop!)) + (label cfg-31) + (let* ((v1-71 (-> *perf-stats* data 20)) + (a0-22 (-> v1-71 ctrl)) + ) + (+! (-> v1-71 count) 1) + (b! (zero? a0-22) cfg-33 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-22) + ) + (.sync.l) + (.sync.p) + (label cfg-33) + 0 + (rigid-body-object-method-30 this) + (let ((v1-76 (-> *perf-stats* data 20))) + (b! (zero? (-> v1-76 ctrl)) cfg-35 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-25 pcr0) + (+! (-> v1-76 accum0) a0-25) + (.mfpc a0-27 pcr1) + (+! (-> v1-76 accum1) a0-27) + ) + (label cfg-35) + 0 + (label cfg-36) + 0 + (none) + ) + +;; definition for method 119 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-119 ((this vehicle)) + (set! (-> this player-dist2) 0.0) + (set! (-> this camera-dist2) 0.0) + ((-> this control-hook) this) + (vehicle-method-117 this) + 0 + (none) + ) + +;; definition for method 33 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod alloc-rbody-control! ((this vehicle) (arg0 rigid-body-object-constants)) + (if (logtest? (-> (the-as rigid-body-vehicle-constants arg0) flags) 8) + (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 + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> arg0 prim-core collide-as) (collide-spec vehicle-sphere)) + ) + ((= v1-0 1) + (set! (-> arg0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> arg0 prim-core collide-as) (collide-spec 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 vehicle-sphere vehicle-mesh)) + ) + ) + ) + (none) + ) + ) + (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 vehicle-sphere vehicle-mesh)) + (none) + ) + ) + ) + (set! (-> this bound-radius) (-> this draw bounds w)) + (set! (-> this draw shadow-ctrl) + (new 'process 'shadow-control -61440.0 -2048.0 69632.0 (-> this root trans) (shadow-flags shdf03) 245760.0) + ) + (logior! (-> this root root-prim prim-core action) (collide-action pull-rider-can-collide)) + (set! (-> this root pat-ignore-mask) (new 'static 'pat-surface :noentity #x1 :nopilot #x1 :probe #x1)) + (set! (-> this root event-self) 'touched) + (let ((t9-3 (method-of-type rigid-body-object alloc-rbody-control!))) + (t9-3 this (the-as rigid-body-vehicle-constants arg0)) + ) + (logior! (-> this rbody flags) (rigid-body-flag enable-collision)) + (set! (-> this root max-iteration-count) (the-as uint 8)) + (set! (-> this max-time-step) 0.033333335) + (logior! (-> this mask) (process-mask vehicle)) + (logclear! (-> this mask) (process-mask actor-pause movie)) + (logclear! (-> this skel status) (joint-control-status sync-math)) + (process-entity-status! this (entity-perm-status no-kill) #t) + (set! (-> this nav) #f) + (set! (-> this squad) #f) + (let ((v1-29 (-> this root root-prim))) + (set! (-> this root backup-collide-as) (-> v1-29 prim-core collide-as)) + (set! (-> this root backup-collide-with) (-> v1-29 prim-core collide-with)) + ) + (rigid-body-object-method-42 this) + (vehicle-method-76 this) + (set! (-> this power-level) 0.5) + (set! (-> this lights-factor) 0.0) + (set! (-> this turbo-boost-factor) 1.0) + (dotimes (v1-37 4) + (set! (-> this rider-array v1-37) (the-as handle #f)) + ) + (set! (-> this scrape-sound-id) (new 'static 'sound-id)) + (set! (-> this damage-zap-sound-id) (new-sound-id)) + (set! (-> this draw lod-set lod 0 dist) 122880.0) + (set! (-> this draw lod-set lod 1 dist) 204800.0) + (set! (-> this draw lod-set lod 2 dist) 819200.0) + (set! (-> this event-hook) vehicle-event-handler) + 0 + (none) + ) + +;; definition for method 50 of type vehicle +;; INFO: Used lq/sq +(defmethod attack-handler ((this vehicle) (arg0 process-drawable) (arg1 attack-info) (arg2 touching-shapes-entry) (arg3 penetrate)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'rigid-body-impact 2))) + (init-rbody-impact-from-tshape! this (-> s5-0 0) arg2) + (cond + ((logtest? (attack-mask attacker-velocity) (-> arg1 mask)) + (set! (-> s5-0 0 velocity quad) (-> arg1 attacker-velocity quad)) + ) + (else + (let ((s0-0 arg0)) + (cond + ((if (type? s0-0 process-focusable) + s0-0 + ) + (set! (-> s5-0 1 point quad) (-> (get-trans (the-as process-focusable arg0) 3) quad)) + (vector-! (-> s5-0 0 velocity) (the-as vector (-> s5-0 0)) (the-as vector (-> s5-0 1))) + ) + (else + (vector-! (-> s5-0 0 velocity) (the-as vector (-> s5-0 0)) (-> arg0 root trans)) + ) + ) + ) + ) + ) + (let ((f28-0 0.0)) + (let ((f30-0 0.0)) + (if (and (logtest? (penetrate jak-dark-nuke) arg3) + (not (logtest? (vehicle-flag ignore-damage) (-> this v-flags))) + ) + (send-event this 'traffic-off-force) + ) + (set! f28-0 + (cond + ((logtest? (penetrate jak-dark-blackhole) arg3) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag gun-dark-2-zero-g) (-> this v-flags)))) + f28-0 + ) + ((or (logtest? (penetrate dark-punch dark-bomb) arg3) + (and (logtest? (penetrate dark-skin) arg3) (logtest? arg3 (penetrate punch spin))) + ) + (set! f30-0 (* 204800.0 (-> this info info mass))) + (* 0.2 (-> this info damage hit-points)) + ) + ((logtest? (penetrate jak-red-shockwave) arg3) + (case (-> arg1 mode) + (('eco-red-shove) + (set! f30-0 (* (lerp 4096.0 8192.0 (-> arg1 control)) (-> this info info mass))) + (set! f28-0 0.0) + ) + (('eco-red) + (let ((f0-6 (* (lerp 20480.0 122880.0 (-> arg1 control)) (-> this info info mass)))) + (set! f30-0 (* 2.0 f0-6)) + ) + (set! f28-0 (* 8.0 (-> arg1 control))) + ) + ) + f28-0 + ) + (else + (cond + ((logtest? arg3 (penetrate punch)) + (set! f30-0 40960.0) + (set! f28-0 4.0) + ) + ((logtest? arg3 (penetrate flop spin)) + (set! f30-0 20480.0) + (set! f28-0 2.0) + ) + ((logtest? (attack-mask vehicle-damage-factor) (-> arg1 mask)) + (set! f28-0 (* (-> arg1 damage) (-> arg1 vehicle-damage-factor))) + (set! f30-0 (* 49152.0 (-> arg1 vehicle-impulse-factor) (-> arg1 damage))) + 0 + ) + (else + (set! f30-0 8192.0) + (set! f28-0 2.0) + ) + ) + f28-0 + ) + ) + ) + (set! (-> s5-0 0 impulse) f30-0) + ) + (apply-damage this f28-0 (-> s5-0 0)) + ) + (when (not (logtest? (vehicle-flag ignore-impulse) (-> this v-flags))) + (impulse-handler this) + (let ((s3-1 (new 'stack-no-clear 'vector))) + (set! (-> s3-1 quad) (-> s5-0 0 velocity quad)) + (vector-normalize! s3-1 1.0) + (vector-float*! s3-1 s3-1 (-> s5-0 0 impulse)) + (apply-impact! (-> this rbody) (the-as vector (-> s5-0 0)) s3-1) + (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 0)) 64) + (let ((v1-84 (-> arg2 head))) + (set! (-> *debug-vehicle-work* prim-sphere1 quad) (-> v1-84 prim1 cprim prim-core world-sphere quad)) + (set! (-> *debug-vehicle-work* prim-sphere2 quad) (-> v1-84 prim2 cprim prim-core world-sphere quad)) + ) + (add-debug-x #t (bucket-id debug-no-zbuf1) (the-as vector (-> s5-0 0)) *color-blue*) + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + (the-as vector (-> s5-0 0)) + s3-1 + (meters 0.00024414062) + *color-blue* + ) + ) + ) + ) + ) + (if (and (-> this next-state) (= (-> this next-state name) 'idle)) + (go (method-of-object this waiting)) + ) + #t + ) + +;; definition for method 51 of type vehicle +(defmethod touch-handler ((this vehicle) (arg0 process-focusable) (arg1 touching-shapes-entry)) + #t + ) + +;; definition for method 49 of type vehicle +;; WARN: disable def twice: 317. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: disable def twice: 331. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod rbody-event-handler ((this vehicle) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-2 object)) + (when (and (= arg2 'touched) arg0 (logtest? (process-mask collectable) (-> arg0 mask))) + (dotimes (s1-0 4) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) (process->ppointer arg0)) + (set! (-> a1-2 num-params) arg1) + (set! (-> a1-2 message) arg2) + (set! (-> a1-2 param 0) (-> arg3 param 0)) + (set! (-> a1-2 param 1) (-> arg3 param 1)) + (set! (-> a1-2 param 2) (-> arg3 param 2)) + (set! (-> a1-2 param 3) (-> arg3 param 3)) + (set! (-> a1-2 param 4) (-> arg3 param 4)) + (set! (-> a1-2 param 5) (-> arg3 param 5)) + (send-event-function (handle->process (-> this rider-array s1-0)) a1-2) + ) + ) + ) + (case arg2 + (('attack) + (let ((s3-1 (the-as object (-> arg3 param 1))) + (s2-1 (get-penetrate-using-from-attack-event (the-as process-drawable arg0) arg3)) + ) + (when (and (!= (-> (the-as attack-info s3-1) id) (-> this incoming-attack-id)) + (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (or (not (logtest? (vehicle-flag player-driving) (-> this v-flags))) + (not (logtest? (penetrate jak-yellow-shot jak-red-shot jak-blue-shot jak-dark-shot) s2-1)) + ) + ) + (set! (-> this incoming-attack-id) (-> (the-as attack-info s3-1) id)) + (when (and (logtest? (-> this info flags) 4) (logtest? (vehicle-flag ai-driving) (-> this v-flags))) + (let ((a1-6 (find-offending-process-focusable arg0 (the-as attack-info s3-1)))) + (if (and a1-6 (logtest? (-> a1-6 mask) (process-mask target))) + (vehicle-method-130 this) + ) + ) + ) + (attack-handler + this + (the-as process-drawable arg0) + (the-as attack-info s3-1) + (the-as touching-shapes-entry (-> arg3 param 0)) + s2-1 + ) + ) + ) + ) + (('apply-impulse) + (when (not (logtest? (vehicle-flag ignore-impulse) (-> this v-flags))) + (impulse-handler this) + (let ((a1-8 (-> arg3 param 0)) + (a2-3 (-> arg3 param 1)) + ) + (apply-impact! (-> this rbody) (the-as vector a1-8) (the-as vector a2-3)) + ) + (rigid-body-control-method-12 (-> this rbody) 1.0) + (init-velocities! (-> this rbody)) + ) + ) + (('get-offending-focusable) + (if (logtest? (vehicle-flag player-driving) (-> this v-flags)) + *target* + ) + ) + (('pilot-on) + (let* ((s3-2 (-> arg3 param 0)) + (s2-2 arg0) + (s5-1 (if (type? s2-2 process-focusable) + s2-2 + ) + ) + ) + (when s5-1 + (format #t "vehicle::event-handler: pilot-on (pid ~d) from pid ~d~%" (-> this pid) (-> arg0 pid)) + (logior! (-> this v-flags) (vehicle-flag riding)) + (put-rider-in-seat this (the-as int s3-2) s5-1) + (if (logtest? (-> s5-1 mask) (process-mask target)) + (logior! (-> this v-flags) (vehicle-flag player-driving)) + ) + #t + ) + ) + ) + (('player-get-off) + (if (and (logtest? (vehicle-flag player-driving) (-> this v-flags)) (!= (-> this crash-level) 3)) + (go (method-of-object this waiting)) + ) + ) + (('nav-mesh-kill) + (vehicle-method-138 this) + #t + ) + (('go-hostile) + (let ((a1-13 (-> arg3 param 0))) + (vehicle-method-143 this (the-as process a1-13)) + ) + ) + (('go-die) + (let ((v1-71 (-> this root root-prim))) + (set! (-> v1-71 prim-core collide-as) (collide-spec)) + (set! (-> v1-71 prim-core collide-with) (collide-spec)) + ) + 0 + (go (method-of-object this die)) + ) + (('scale-max-hit-points) + (let ((f1-0 (the-as float (-> arg3 param 0)))) + (set! (-> this damage-factor) (* (-> this damage-factor) (/ 1.0 f1-0))) + ) + 0 + ) + (('push-trans) + (let ((a1-14 (-> arg3 param 0))) + (vehicle-method-146 this (the-as vector a1-14)) + ) + #t + ) + (('gun-dark-2-off) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag gun-dark-2-zero-g)))) + (let* ((f1-2 (the-as float (-> arg3 param 0))) + (f30-0 (fmin (-> this hit-points) (- 1.0 f1-2))) + (a2-6 (new 'stack 'rigid-body-impact)) + ) + (apply-damage this (* (-> this info damage hit-points) (- (-> this hit-points) f30-0)) a2-6) + ) + ) + (('set-control-hook-ai) + (set! v0-2 (method-of-object this control-hook-ai)) + (set! (-> this control-hook) (the-as (function vehicle vehicle-controls) v0-2)) + v0-2 + ) + (('set-control-hook-player) + (set! v0-2 (method-of-object this control-hook-player)) + (set! (-> this control-hook) (the-as (function vehicle vehicle-controls) v0-2)) + v0-2 + ) + (('ignore-damage) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag ignore-damage)))) + (when (-> arg3 param 0) + (set! v0-2 (logior (vehicle-flag ignore-damage) (-> this v-flags))) + (set! (-> this v-flags) (the-as vehicle-flag v0-2)) + v0-2 + ) + ) + (('ignore-impulse) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag ignore-impulse)))) + (when (-> arg3 param 0) + (set! v0-2 (logior (vehicle-flag ignore-impulse) (-> this v-flags))) + (set! (-> this v-flags) (the-as vehicle-flag v0-2)) + v0-2 + ) + ) + (else + ((method-of-type rigid-body-object rbody-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 131 of type vehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-131 ((this vehicle)) + 0 + (none) + ) + +;; definition for method 143 of type vehicle +;; WARN: Return type mismatch int vs object. +(defmethod vehicle-method-143 ((this vehicle) (arg0 process)) + 0 + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/common-obs/ladder_REF.gc b/test/decompiler/reference/jak3/levels/common-obs/ladder_REF.gc new file mode 100644 index 0000000000..721f905bb8 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common-obs/ladder_REF.gc @@ -0,0 +1,257 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type ladder +(deftype ladder (process-drawable) + ((root collide-shape :override) + (rider-unit float) + (rider-time time-frame) + (art-height meters) + (set-height meters) + (meters-per-unit meters) + (meters-per-rung meters) + (options ladder-options) + ) + (:state-methods + idle + (active handle) + ) + (:methods + (init-collision! (_type_) none) + (init-skel! (_type_) none) + (init-params! (_type_) none) + (ladder-method-25 (_type_ matrix float) matrix) + (nop (_type_) none) + ) + ) + +;; definition for method 3 of type ladder +(defmethod inspect ((this ladder)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Trider-unit: ~f~%" (-> this rider-unit)) + (format #t "~2Trider-time: ~D~%" (-> this rider-time)) + (format #t "~2Tart-height: (meters ~m)~%" (-> this art-height)) + (format #t "~2Tset-height: (meters ~m)~%" (-> this set-height)) + (format #t "~2Tmeters-per-unit: (meters ~m)~%" (-> this meters-per-unit)) + (format #t "~2Tmeters-per-rung: (meters ~m)~%" (-> this meters-per-rung)) + (format #t "~2Toptions: ~D~%" (-> this options)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-ladder ladder ladder-lod0-jg ladder-idle-ja + ((ladder-lod0-mg (meters 999999))) + :bounds (static-spherem 0 8 0 16) + ) + +;; failed to figure out what this is: +(defstate idle (ladder) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch 'attack) + (let* ((s4-0 proc) + (s2-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when s2-0 + (let ((s4-1 (ladder-method-25 self (new 'stack-no-clear 'matrix) 0.0)) + (s3-0 (ladder-method-25 self (new 'stack-no-clear 'matrix) 1.0)) + (s1-0 (get-trans (the-as process-focusable s2-0) 0)) + (s2-1 (new 'stack-no-clear 'vector)) + ) + (vector-segment-distance-point! s1-0 (-> s4-1 trans) (-> s3-0 trans) s2-1) + (when (and (time-elapsed? (-> self rider-time) (seconds 0.2)) + (if (< 0.0 (vector-dot (vector-! (new 'stack-no-clear 'vector) s1-0 s2-1) (-> s4-1 fvec))) + (not (logtest? (-> self options) (ladder-options lo0))) + (not (logtest? (-> self options) (ladder-options lo1))) + ) + (send-event proc 'ladder (-> block param 0)) + ) + (set! (-> self meters-per-unit) (vector-vector-distance (-> s4-1 trans) (-> s3-0 trans))) + (set! (-> self rider-unit) (/ (vector-vector-distance (-> s4-1 trans) s2-1) (-> self meters-per-unit))) + (set-time! (-> self rider-time)) + (go-virtual active (process->handle proc)) + ) + ) + (the-as ladder-options #f) + ) + ) + ) + (('options) + (-> self options) + ) + ) + ) + :code (behavior () + (until #f + (nop self) + (suspend) + ) + #f + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate active (ladder) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('matrix) + (let ((v0-0 (the-as object (ladder-method-25 self (the-as matrix (-> block param 0)) (-> self rider-unit))))) + (set-time! (-> self rider-time)) + v0-0 + ) + ) + (('move) + (set! (-> self rider-unit) + (fmax 0.0 (fmin 1.0 (+ (-> self rider-unit) (/ (the-as float (-> block param 0)) (-> self meters-per-unit))))) + ) + (* (-> self rider-unit) (/ (-> self meters-per-unit) (-> self meters-per-rung))) + ) + (('pos) + (if (> argc 0) + (set! (-> (the-as vector (-> block param 0)) quad) (-> self node-list data 5 bone transform uvec quad)) + ) + (-> self rider-unit) + ) + (('stance) + (let* ((f0-8 (/ (* 0.5 (-> self meters-per-rung)) (-> self meters-per-unit))) + (f1-12 (* (the float (the int (/ (+ (-> self rider-unit) (* 0.5 f0-8)) f0-8))) f0-8)) + ) + (+! (-> self rider-unit) (* 0.1 (- f1-12 (-> self rider-unit)))) + (set! (-> self rider-unit) (seek (-> self rider-unit) f1-12 (* 2.0 (seconds-per-frame) f0-8))) + ) + ) + (('options) + (-> self options) + ) + ) + ) + :code (behavior ((arg0 handle)) + (set-time! (-> self rider-time)) + (while (let ((s5-0 (handle->process arg0))) + (and (if (type? s5-0 process-focusable) + s5-0 + ) + (not (time-elapsed? (-> self rider-time) (seconds 0.1))) + ) + ) + (nop self) + (suspend) + ) + (go-virtual idle) + ) + ) + +;; definition for method 22 of type ladder +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this ladder)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate)) + (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 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 10240.0 0.0 12288.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) + ) + 0 + (none) + ) + +;; definition for method 23 of type ladder +;; WARN: Return type mismatch int vs none. +(defmethod init-skel! ((this ladder)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-ladder" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (none) + ) + +;; definition for method 24 of type ladder +;; WARN: Return type mismatch int vs none. +(defmethod init-params! ((this ladder)) + (set! (-> this meters-per-rung) 6144.0) + (set! (-> this art-height) 94208.0) + (set! (-> this set-height) (res-lump-float (-> this entity) 'height :default 94208.0)) + (set! (-> this options) (res-lump-value (-> this entity) 'options ladder-options :time -1000000000.0)) + 0 + (none) + ) + +;; definition for method 25 of type ladder +;; INFO: Used lq/sq +(defmethod ladder-method-25 ((this ladder) (arg0 matrix) (arg1 float)) + (let ((s4-0 (-> this node-list data 4 bone transform)) + (s3-0 (new 'stack-no-clear 'matrix)) + ) + (let* ((a2-1 (-> this node-list data 5 bone transform)) + (v1-4 (-> a2-1 rvec quad)) + (a0-1 (-> a2-1 uvec quad)) + (a1-1 (-> a2-1 fvec quad)) + (a2-2 (-> a2-1 trans quad)) + ) + (set! (-> s3-0 rvec quad) v1-4) + (set! (-> s3-0 uvec quad) a0-1) + (set! (-> s3-0 fvec quad) a1-1) + (set! (-> s3-0 trans quad) a2-2) + ) + (vector+! + (-> s3-0 trans) + (-> s3-0 trans) + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> s4-0 trans) (-> s3-0 trans)) 9830.4) + ) + (matrix-lerp! arg0 s4-0 s3-0 arg1) + ) + ) + +;; definition for method 26 of type ladder +;; WARN: Return type mismatch int vs none. +(defmethod nop ((this ladder)) + 0 + (none) + ) + +;; definition for method 11 of type ladder +(defmethod init-from-entity! ((this ladder) (arg0 entity-actor)) + (init-collision! this) + (process-drawable-from-entity! this arg0) + (init-skel! this) + (init-params! this) + (if (logtest? (-> this options) (ladder-options nodraw)) + (logior! (-> this draw status) (draw-control-status no-draw-bounds)) + ) + (set! (-> this root scale y) (/ (-> this set-height) (-> this art-height))) + (set! (-> this draw bounds y) (/ (* 0.5 (-> this set-height)) (-> this root scale y))) + (set! (-> this draw bounds w) (+ 2048.0 (* 0.5 (-> this set-height)))) + (set! (-> this root root-prim local-sphere y) (/ (* 0.5 (-> this set-height)) (-> this root scale y))) + (set! (-> this root root-prim local-sphere w) (+ 2048.0 (* 0.5 (-> this set-height)))) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/common/battle_REF.gc b/test/decompiler/reference/jak3/levels/common/battle_REF.gc new file mode 100644 index 0000000000..36dbe4de6e --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/battle_REF.gc @@ -0,0 +1,1791 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type battle-info +(deftype battle-info (basic) + ((id int8) + (notice-spec uint64) + (pick-logic int8) + (notice-distance float) + (dont-spawn-initial-until-notice? symbol) + (play-battle-music symbol) + (min-battle-spawn-delay uint32) + (max-battle-spawn-delay uint32) + (min-spawner-notice-attack-delay uint32) + (max-spawner-notice-attack-delay uint32) + (spawner-blocked-by-player-xz float) + (spawner-blocked-by-collide-radius float) + (pick-spawner-max-dist float) + (max-count uint32) + (desired-alive-count uint8) + (spawner-collide-with collide-spec) + ) + ) + +;; definition for method 3 of type battle-info +(defmethod inspect ((this battle-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tnotice-spec: ~D~%" (-> this notice-spec)) + (format #t "~1Tpick-logic: ~D~%" (-> this pick-logic)) + (format #t "~1Tnotice-distance: ~f~%" (-> this notice-distance)) + (format #t "~1Tdont-spawn-initial-until-notice?: ~A~%" (-> this dont-spawn-initial-until-notice?)) + (format #t "~1Tplay-battle-music: ~A~%" (-> this play-battle-music)) + (format #t "~1Tmin-battle-spawn-delay: ~D~%" (-> this min-battle-spawn-delay)) + (format #t "~1Tmax-battle-spawn-delay: ~D~%" (-> this max-battle-spawn-delay)) + (format #t "~1Tmin-spawner-notice-attack-delay: ~D~%" (-> this min-spawner-notice-attack-delay)) + (format #t "~1Tmax-spawner-notice-attack-delay: ~D~%" (-> this max-spawner-notice-attack-delay)) + (format #t "~1Tspawner-blocked-by-player-xz: ~f~%" (-> this spawner-blocked-by-player-xz)) + (format #t "~1Tspawner-blocked-by-collide-radius: ~f~%" (-> this spawner-blocked-by-collide-radius)) + (format #t "~1Tpick-spawner-max-dist: ~f~%" (-> this pick-spawner-max-dist)) + (format #t "~1Tmax-count: ~D~%" (-> this max-count)) + (format #t "~1Tdesired-alive-count: ~D~%" (-> this desired-alive-count)) + (format #t "~1Tspawner-collide-with: ~D~%" (-> this spawner-collide-with)) + (label cfg-4) + this + ) + +;; definition of type battle-ally +(deftype battle-ally (structure) + ((entity entity-actor) + ) + ) + +;; definition for method 3 of type battle-ally +(defmethod inspect ((this battle-ally)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'battle-ally) + (format #t "~1Tentity: ~A~%" (-> this entity)) + (label cfg-4) + this + ) + +;; definition of type battle-ally-array +(deftype battle-ally-array (inline-array-class) + ((data battle-ally :inline :dynamic) + ) + ) + +;; definition for method 3 of type battle-ally-array +(defmethod inspect ((this battle-ally-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! (-> battle-ally-array heap-base) (the-as uint 16)) + +;; definition of type battle-breed +(deftype battle-breed (structure) + ((breed-type type) + (percent float) + ) + ) + +;; definition for method 3 of type battle-breed +(defmethod inspect ((this battle-breed)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'battle-breed) + (format #t "~1Tbreed-type: ~A~%" (-> this breed-type)) + (format #t "~1Tpercent: ~f~%" (-> this percent)) + (label cfg-4) + this + ) + +;; definition of type battle-breed-array +(deftype battle-breed-array (inline-array-class) + ((data battle-breed :inline :dynamic) + ) + ) + +;; definition for method 3 of type battle-breed-array +(defmethod inspect ((this battle-breed-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! (-> battle-breed-array heap-base) (the-as uint 16)) + +;; definition of type battle-spawner +(deftype battle-spawner (structure) + ((flags battle-spawner-flags) + (entity entity-actor) + (breeds battle-breed-array) + (creature-index int8) + (ready-index int8) + (attack-index int8) + (mode uint8) + (intro-path path-control) + (notice-attack-delay uint32) + (creature handle) + (last-spawn-time time-frame) + (noticed-attack-time time-frame) + (attack-pos vector :inline) + ) + ) + +;; definition for method 3 of type battle-spawner +(defmethod inspect ((this battle-spawner)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'battle-spawner) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tentity: ~A~%" (-> this entity)) + (format #t "~1Tbreeds: ~A~%" (-> this breeds)) + (format #t "~1Tcreature-index: ~D~%" (-> this creature-index)) + (format #t "~1Tready-index: ~D~%" (-> this ready-index)) + (format #t "~1Tattack-index: ~D~%" (-> this attack-index)) + (format #t "~1Tmode: ~D~%" (-> this mode)) + (format #t "~1Tintro-path: ~A~%" (-> this intro-path)) + (format #t "~1Tnotice-attack-delay: ~D~%" (-> this notice-attack-delay)) + (format #t "~1Tcreature: ~D~%" (-> this creature)) + (format #t "~1Tlast-spawn-time: ~D~%" (-> this last-spawn-time)) + (format #t "~1Tnoticed-attack-time: ~D~%" (-> this noticed-attack-time)) + (format #t "~1Tattack-pos: #~%" (-> this attack-pos)) + (label cfg-4) + this + ) + +;; definition of type battle-spawner-array +(deftype battle-spawner-array (inline-array-class) + ((data battle-spawner :inline :dynamic) + ) + ) + +;; definition for method 3 of type battle-spawner-array +(defmethod inspect ((this battle-spawner-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! (-> battle-spawner-array heap-base) (the-as uint 80)) + +;; definition of type battle +(deftype battle (process-drawable) + ((info battle-info) + (flags battle-flags) + (spawn-initial-creatures? symbol) + (next-spawn-delay uint32) + (on-notice basic) + (on-hostile basic) + (on-beaten basic) + (max-count uint32) + (count uint32) + (die-count uint32) + (stat-child-count uint16) + (cant-spawn-time time-frame) + (jammed-starting-time time-frame) + (spawners battle-spawner-array) + (allies battle-ally-array) + ) + (:state-methods + idle + undefined + notice + hostile + beaten + ) + (:methods + (spawner-blocked? (_type_ battle-spawner) symbol) + (spawner-blocked-by-collide? (_type_ battle-spawner) symbol) + (draw-battle-marks (_type_) none) + (initialize-enemy-lists (_type_) none) + (initialize-spawner-breeds (_type_ battle-spawner entity-actor) none) + (get-spawner-for-enemy (_type_ process) battle-spawner) + (initialize-ally (_type_ battle-ally entity-actor) none) + (initialize-spawner (_type_ battle-spawner entity-actor) none) + (initialize-battle (_type_) none) + (init-go (_type_) int) + (get-spawn-delay (_type_) int) + (get-best-spawner (_type_) battle-spawner) + (spawner-free? (_type_ battle-spawner) symbol) + (spawn-from-breed (_type_ battle-breed enemy-init-by-other-params) handle) + (spawn-from-spawner (_type_ battle-spawner symbol) none) + (spawn-initial-creatures (_type_) none) + (get-random-breed (_type_ battle-spawner) battle-breed) + (spawner-hit (_type_ battle-spawner process) symbol) + (spawner-try-jump (_type_ battle-spawner enemy) symbol) + (spawner-do-jump (_type_ battle-spawner) int) + (spawner-hittable? (_type_ battle-spawner) symbol) + (spawner-in-intro? (_type_ battle-spawner) symbol) + (set-battle-music (_type_) none) + (unset-battle-music (_type_) none) + (update-allies-list (_type_) int) + (beaten? (_type_) symbol) + (spawner-active? (_type_ battle-spawner symbol) symbol) + (spawner-active-count (_type_) int) + ) + ) + +;; definition for method 3 of type battle +(defmethod inspect ((this battle)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tinfo: ~A~%" (-> this info)) + (format #t "~2Tflags: ~D~%" (-> this flags)) + (format #t "~2Tspawn-initial-creatures?: ~A~%" (-> this spawn-initial-creatures?)) + (format #t "~2Tnext-spawn-delay: ~D~%" (-> this next-spawn-delay)) + (format #t "~2Ton-notice: ~A~%" (-> this on-notice)) + (format #t "~2Ton-hostile: ~A~%" (-> this on-hostile)) + (format #t "~2Ton-beaten: ~A~%" (-> this on-beaten)) + (format #t "~2Tmax-count: ~D~%" (-> this max-count)) + (format #t "~2Tcount: ~D~%" (-> this count)) + (format #t "~2Tdie-count: ~D~%" (-> this die-count)) + (format #t "~2Tstat-child-count: ~D~%" (-> this stat-child-count)) + (format #t "~2Tcant-spawn-time: ~D~%" (-> this cant-spawn-time)) + (format #t "~2Tjammed-starting-time: ~D~%" (-> this jammed-starting-time)) + (format #t "~2Tspawners: ~A~%" (-> this spawners)) + (format #t "~2Tallies: ~A~%" (-> this allies)) + (label cfg-4) + this + ) + +;; definition for symbol *battles*, type (array battle-info) +(define *battles* (new 'static 'boxed-array :type battle-info + (new 'static 'battle-info + :notice-spec #x2 + :notice-distance 163840.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x384 + :max-battle-spawn-delay #x708 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #xa + :desired-alive-count #x2 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 1 + :notice-spec #x2 + :notice-distance 163840.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x12c + :max-battle-spawn-delay #x4b0 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #xf + :desired-alive-count #x2 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 2 + :notice-spec #x2 + :notice-distance 204800.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x12c + :max-battle-spawn-delay #x4b0 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x11 + :desired-alive-count #x4 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 3 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x12c + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x1 + :desired-alive-count #x1 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 4 + :notice-spec #x2 + :notice-distance 245760.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x12c + :max-battle-spawn-delay #x4b0 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x14 + :desired-alive-count #x6 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 6 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x12c + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x1e + :desired-alive-count #xf + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 7 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x3c + :max-battle-spawn-delay #x96 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x32 + :desired-alive-count #xf + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 8 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x12c + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #xc + :desired-alive-count #x4 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 9 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x12c + :max-battle-spawn-delay #x258 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #xc + :desired-alive-count #x3 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 10 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x12c + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x8 + :desired-alive-count #x4 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 11 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x12c + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x32 + :desired-alive-count #x6 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 12 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x12c + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x1e + :desired-alive-count #x8 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 13 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x12c + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x20000000 + :desired-alive-count #x8 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 14 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x12c + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #xc + :desired-alive-count #x6 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 15 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x12c + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x28 + :desired-alive-count #xf + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 16 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x12c + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x4 + :desired-alive-count #x3 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 17 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x12c + :max-battle-spawn-delay #x258 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x7 + :desired-alive-count #x4 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 18 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x12c + :max-battle-spawn-delay #x258 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x8 + :desired-alive-count #x3 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 19 + :notice-spec #x1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x12c + :max-battle-spawn-delay #x258 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x22 + :desired-alive-count #x4 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 20 + :notice-spec #x1 + :pick-logic 1 + :notice-distance 122880.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music #f + :min-battle-spawn-delay #x12c + :max-battle-spawn-delay #x258 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x14 + :desired-alive-count #x8 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 21 + :notice-spec #x2 + :notice-distance 1228800.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music 'wasfight + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x258 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x20000000 + :desired-alive-count #x6 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + (new 'static 'battle-info + :id 22 + :notice-spec #x2 + :notice-distance 819200.0 + :dont-spawn-initial-until-notice? #f + :play-battle-music 'wasfight + :min-battle-spawn-delay #x96 + :max-battle-spawn-delay #x258 + :max-spawner-notice-attack-delay #x78 + :spawner-blocked-by-player-xz 24576.0 + :pick-spawner-max-dist 163840.0 + :max-count #x20000000 + :desired-alive-count #x6 + :spawner-collide-with (collide-spec enemy hit-by-others-list) + ) + ) + ) + +;; definition for function battle-event-handler +;; WARN: disable def twice: 9. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: disable def twice: 19. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: disable def twice: 29. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defbehavior battle-event-handler battle ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('query) + (case (-> arg3 param 0) + (('beaten) + (and (-> self next-state) (= (-> self next-state name) 'beaten)) + ) + (('hostile) + (and (-> self next-state) (= (-> self next-state name) 'hostile)) + ) + (('idle) + (and (-> self next-state) (= (-> self next-state name) 'idle)) + ) + (('die-count) + (-> self die-count) + ) + (else + #f + ) + ) + ) + (('child-die) + (+! (-> self die-count) 1) + (let ((v1-14 (get-spawner-for-enemy self arg0))) + (when v1-14 + (set! (-> v1-14 creature) (the-as handle #f)) + #f + ) + ) + ) + (('child-hit) + (let ((a1-3 (get-spawner-for-enemy self arg0))) + (when a1-3 + (logior! (-> a1-3 flags) (battle-spawner-flags hit)) + (spawner-hit self a1-3 arg0) + ) + ) + ) + (('child-jumped) + (let ((a1-5 (get-spawner-for-enemy self arg0))) + (if a1-5 + (spawner-do-jump self a1-5) + ) + ) + ) + (('trigger) + (if (and (-> self next-state) (= (-> self next-state name) 'idle)) + (go-virtual notice) + ) + ) + (('untrigger) + (if (not (and (-> self next-state) (= (-> self next-state name) 'idle))) + (go-virtual idle) + ) + ) + (('beaten) + (logior! (-> self flags) (battle-flags beaten)) + (if (and (-> self next-state) (= (-> self next-state name) 'idle)) + (go-virtual beaten) + ) + ) + (('resume) + (logclear! (-> self flags) (battle-flags beaten)) + (process-entity-status! self (entity-perm-status subtask-complete) #f) + (if (and (-> self next-state) (= (-> self next-state name) 'beaten)) + (go-virtual hostile) + ) + ) + ) + ) + +;; definition for method 27 of type battle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw-battle-marks ((this battle)) + (local-vars (sv-16 string) (sv-32 string)) + (let ((s4-0 (-> this root trans)) + (s5-0 (the-as int (-> this max-count))) + ) + (if (= (the-as uint s5-0) #x20000000) + (set! s5-0 0) + ) + (add-debug-x #t (bucket-id debug-no-zbuf1) s4-0 (new 'static 'rgba :g #xff :b #xff :a #x80)) + (let ((s3-0 add-debug-text-3d) + (s2-0 #t) + (s1-0 577) + ) + (format + (clear *temp-string*) + "~%~S~%count ~d/~d~%child ~d~%ally ~d~%die count ~d" + (-> this name) + (-> this count) + s5-0 + (-> this stat-child-count) + (-> this allies length) + (-> this die-count) + ) + (s3-0 s2-0 (the-as bucket-id s1-0) *temp-string* s4-0 (font-color orange) (the-as vector2h #f)) + ) + ) + (dotimes (s5-1 (-> this spawners length)) + (let ((s4-1 (-> this spawners data s5-1))) + (let ((a0-6 (-> s4-1 intro-path))) + (if a0-6 + (debug-draw a0-6) + ) + ) + (add-debug-x + #t + (bucket-id debug-no-zbuf1) + (-> s4-1 entity extra trans) + (new 'static 'rgba :g #xff :b #xff :a #x80) + ) + (let ((s3-1 add-debug-text-3d) + (s2-1 #t) + (s1-1 577) + ) + (let ((s0-1 format)) + (set! sv-16 (clear *temp-string*)) + (set! sv-32 "~%spawner~%~S") + (let ((a2-5 (res-lump-struct (-> s4-1 entity) 'name structure))) + (s0-1 sv-16 sv-32 a2-5) + ) + ) + (s3-1 + s2-1 + (the-as bucket-id s1-1) + *temp-string* + (-> s4-1 entity extra trans) + (font-color yellow) + (the-as vector2h #f) + ) + ) + ) + 0 + ) + 0 + (none) + ) + +;; definition for method 26 of type battle +;; INFO: Used lq/sq +(defmethod spawner-blocked-by-collide? ((this battle) (arg0 battle-spawner)) + (local-vars (a2-5 float) (a2-12 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (f0-0 (-> this info spawner-blocked-by-collide-radius)) + ) + (set! (-> gp-0 quad) (-> arg0 attack-pos quad)) + (set! (-> gp-0 w) f0-0) + (let ((s5-0 (-> this info spawner-collide-with)) + (f30-0 (* f0-0 f0-0)) + ) + (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)) + ) + (when (logtest? s5-0 (collide-spec player-list)) + (let ((a0-2 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((v1-15 (-> a0-2 next0))) + (while (!= a0-2 (-> *collide-player-list* alive-list-end)) + (let* ((a0-3 (-> (the-as connection a0-2) param1)) + (a1-4 (-> (the-as collide-shape a0-3) root-prim)) + ) + (when (logtest? s5-0 (-> a1-4 prim-core collide-as)) + (let ((a1-5 (-> a1-4 prim-core))) + (let ((a2-4 a1-5) + (a3-1 gp-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-1 (+ (-> a1-5 world-sphere w) (-> gp-0 w))) + ) + (when (< f0-2 (* 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-15) + *collide-player-list* + (set! v1-15 (-> v1-15 next0)) + ) + ) + ) + ) + (when (logtest? s5-0 (collide-spec hit-by-player-list)) + (let ((a0-5 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((v1-23 (-> a0-5 next0))) + (while (!= a0-5 (-> *collide-hit-by-player-list* alive-list-end)) + (let* ((a0-6 (-> (the-as connection a0-5) param1)) + (a1-16 (-> (the-as collide-shape a0-6) root-prim)) + ) + (when (logtest? s5-0 (-> a1-16 prim-core collide-as)) + (let ((a1-17 (-> a1-16 prim-core))) + (let ((a2-11 a1-17) + (a3-2 gp-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-5 (+ (-> a1-17 world-sphere w) (-> gp-0 w))) + ) + (when (< f0-3 (* 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-23) + *collide-hit-by-player-list* + (set! v1-23 (-> v1-23 next0)) + ) + ) + ) + ) + (dotimes (s4-0 *actor-list-length*) + (let ((v1-28 (-> *actor-list* s4-0))) + (when (logtest? s5-0 (-> v1-28 root-prim prim-core collide-as)) + (if (>= f30-0 (vector-vector-xz-distance-squared gp-0 (-> v1-28 trans))) + (return #t) + ) + ) + ) + ) + ) + ) + #f + ) + ) + +;; definition for method 25 of type battle +(defmethod spawner-blocked? ((this battle) (arg0 battle-spawner)) + (when (not (logtest? (-> this flags) (battle-flags no-spawner-block))) + (let ((f0-0 (-> this info spawner-blocked-by-player-xz))) + (if (and (< 0.0 f0-0) (>= (* f0-0 f0-0) (vector-vector-xz-distance-squared (target-pos 0) (-> arg0 attack-pos)))) + (return #t) + ) + ) + (let ((f0-3 (-> this info spawner-blocked-by-collide-radius))) + (if (and (< 0.0 f0-3) (spawner-blocked-by-collide? this arg0)) + (return #t) + ) + ) + ) + #f + ) + +;; definition for method 37 of type battle +(defmethod spawner-free? ((this battle) (arg0 battle-spawner)) + (and (not (handle->process (-> arg0 creature))) + (and (not (-> *setting-control* user-current nuke-active?)) + (or (>= (-> arg0 ready-index) 0) (not (spawner-blocked? this arg0))) + ) + ) + ) + +;; definition for method 36 of type battle +(defmethod get-best-spawner ((this battle)) + (if (-> *setting-control* user-current nuke-active?) + (return (the-as battle-spawner #f)) + ) + (let ((s5-0 (-> this spawners length)) + (v1-6 (-> this info pick-logic)) + ) + (if (not *target*) + (set! v1-6 0) + ) + (cond + ((zero? v1-6) + (let ((s3-0 (rand-vu-int-count s5-0))) + (dotimes (s4-0 s5-0) + (let ((s2-0 (-> this spawners data s3-0))) + (if (spawner-free? this s2-0) + (return s2-0) + ) + ) + (set! s3-0 (mod (+ s3-0 1) s5-0)) + ) + ) + ) + ((= v1-6 1) + (let ((s4-1 0) + (f30-0 -1.0) + ) + (while (nonzero? s5-0) + (+! s5-0 -1) + (let ((s3-1 (-> this spawners data s5-0))) + (when (spawner-free? this s3-1) + (let ((f0-0 (vector-vector-distance (target-pos 0) (-> s3-1 entity extra trans)))) + (when (and (>= (-> this info pick-spawner-max-dist) f0-0) (or (< f30-0 0.0) (< f0-0 f30-0))) + (set! s4-1 s5-0) + (set! f30-0 f0-0) + ) + ) + ) + ) + ) + (if (< 0.0 f30-0) + (return (-> this spawners data s4-1)) + ) + ) + ) + ) + ) + (the-as battle-spawner #f) + ) + +;; definition for method 41 of type battle +(defmethod get-random-breed ((this battle) (arg0 battle-spawner)) + (let ((f0-0 (rand-vu)) + (v1-0 0) + ) + (let ((a0-2 (-> arg0 breeds length))) + (dotimes (a1-1 a0-2) + (when (>= f0-0 0.0) + (set! f0-0 (- f0-0 (-> arg0 breeds data a1-1 percent))) + (if (< f0-0 0.0) + (set! v1-0 a1-1) + ) + ) + ) + ) + (-> arg0 breeds data v1-0) + ) + ) + +;; definition for method 38 of type battle +;; WARN: Return type mismatch int vs handle. +(defmethod spawn-from-breed ((this battle) (arg0 battle-breed) (arg1 enemy-init-by-other-params)) + (let* ((a1-1 (-> arg0 breed-type)) + (s4-0 (get-process *default-dead-pool* a1-1 #x4000 1)) + (v1-1 (when s4-0 + (let ((t9-1 (method-of-type process activate))) + (t9-1 s4-0 this "battle-slave" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-0 enemy-init-by-other this arg1) + (-> s4-0 ppointer) + ) + ) + ) + (if (not v1-1) + (return (the-as handle #f)) + ) + (+! (-> this count) 1) + (the-as handle (ppointer->handle v1-1)) + ) + ) + +;; definition for method 39 of type battle +;; INFO: Used lq/sq +;; WARN: Return type mismatch handle vs none. +(defmethod spawn-from-spawner ((this battle) (arg0 battle-spawner) (arg1 symbol)) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'quaternion)) + (s2-0 (-> arg0 intro-path)) + ) + (cond + (s2-0 + (let ((s1-0 0)) + (when arg1 + (set! s1-0 (-> arg0 ready-index)) + (set! s1-0 (cond + ((>= s1-0 0) + (empty) + s1-0 + ) + (else + (-> arg0 attack-index) + ) + ) + ) + ) + (set! (-> arg0 creature-index) s1-0) + (get-point-in-path! s2-0 s3-0 (the float s1-0) 'exact) + (let ((s0-0 (new 'stack-no-clear 'vector))) + (displacement-between-two-points-normalized! s2-0 s0-0 (the float s1-0)) + (set! (-> s0-0 y) 0.0) + (vector-normalize! s0-0 1.0) + (forward-up->quaternion s4-0 s0-0 *up-vector*) + ) + ) + ) + (else + (set! (-> arg0 creature-index) 0) + (let ((v1-7 (-> arg0 entity))) + (set! (-> s3-0 quad) (-> v1-7 extra trans quad)) + (quaternion-copy! s4-0 (-> v1-7 quat)) + ) + ) + ) + (let ((s1-1 (new 'stack-no-clear 'enemy-init-by-other-params)) + (s2-1 (!= s2-0 #f)) + (s0-1 (get-random-breed this arg0)) + ) + (set! (-> s1-1 trans quad) (-> s3-0 quad)) + (quaternion-copy! (-> s1-1 quat) s4-0) + (set! (-> s1-1 entity) (-> arg0 entity)) + (set! (-> s1-1 directed?) #t) + (set! (-> s1-1 no-initial-move-to-ground?) s2-1) + (set! (-> s1-1 art-level) #f) + (let ((v0-7 (spawn-from-breed this s0-1 s1-1))) + (when (handle->process v0-7) + (set! (-> arg0 creature) v0-7) + (set! (-> arg0 mode) (the-as uint 1)) + (set-time! (-> arg0 last-spawn-time)) + ) + ) + ) + ) + (none) + ) + +;; definition for method 30 of type battle +(defmethod get-spawner-for-enemy ((this battle) (arg0 process)) + (let ((v1-0 (if (type? arg0 nav-enemy) + (the-as nav-enemy arg0) + ) + ) + ) + (when v1-0 + (dotimes (a0-3 (-> this spawners length)) + (let* ((a1-5 (-> this spawners data a0-3)) + (a2-2 (handle->process (-> a1-5 creature))) + ) + (when (and a2-2 (= a2-2 v1-0)) + (when (not (logtest? (enemy-flag directed) (-> (the-as nav-enemy a2-2) enemy-flags))) + (set! (-> a1-5 creature) (the-as handle #f)) + (set! a1-5 (the-as battle-spawner #f)) + ) + (return a1-5) + ) + ) + ) + ) + ) + (the-as battle-spawner #f) + ) + +;; definition for method 51 of type battle +(defmethod spawner-active? ((this battle) (arg0 battle-spawner) (arg1 symbol)) + (when (and (logtest? (-> this flags) (battle-flags active)) (not (logtest? (-> this flags) (battle-flags beaten)))) + (let ((v1-5 (-> arg0 noticed-attack-time))) + (cond + ((zero? v1-5) + (set-time! (-> arg0 noticed-attack-time)) + ) + (else + (if (time-elapsed? v1-5 (the-as time-frame (-> arg0 notice-attack-delay))) + (logior! (-> arg0 flags) (battle-spawner-flags hit)) + ) + ) + ) + ) + ) + (let ((s4-0 (handle->process (-> arg0 creature)))) + (when s4-0 + (when (not (logtest? (enemy-flag directed) (-> (the-as nav-enemy s4-0) enemy-flags))) + (set! (-> arg0 creature) (the-as handle #f)) + (return #f) + ) + (let ((v1-20 (-> arg0 mode))) + (cond + ((= v1-20 1) + (set! (-> arg0 mode) (the-as uint 0)) + 0 + ) + ((zero? v1-20) + (when (or (logtest? (enemy-flag directed-ready) (-> (the-as nav-enemy s4-0) enemy-flags)) (not arg1)) + (cond + ((spawner-in-intro? this arg0) + (if (not (spawner-try-jump this arg0 (the-as enemy s4-0))) + (return #t) + ) + ) + ((spawner-hittable? this arg0) + (spawner-hit this arg0 s4-0) + ) + ) + ) + ) + ) + ) + ) + ) + #f + ) + +;; definition for method 46 of type battle +(defmethod spawner-in-intro? ((this battle) (arg0 battle-spawner)) + (when (-> arg0 intro-path) + (let ((v1-1 (-> arg0 creature-index)) + (a0-1 (-> arg0 attack-index)) + ) + (or (< v1-1 (-> arg0 ready-index)) (and (< v1-1 a0-1) (logtest? (-> arg0 flags) (battle-spawner-flags hit)))) + ) + ) + ) + +;; definition for method 43 of type battle +(defmethod spawner-try-jump ((this battle) (arg0 battle-spawner) (arg1 enemy)) + (let ((s3-0 (+ (-> arg0 creature-index) 1)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (if (and (= s3-0 (-> arg0 attack-index)) (spawner-blocked? this arg0)) + (return #f) + ) + (get-point-in-path! (-> arg0 intro-path) s4-0 (the float s3-0) 'exact) + (let ((s3-1 (-> arg0 mode))) + (set! (-> arg0 mode) (the-as uint 2)) + (set! (-> arg1 enemy-flags) + (the-as enemy-flag (logclear (-> arg1 enemy-flags) (enemy-flag jump-check-blocked))) + ) + (cond + ((send-event arg1 'jump 3 s4-0) + #t + ) + (else + (set! (-> arg0 mode) s3-1) + #f + ) + ) + ) + ) + ) + +;; definition for method 45 of type battle +(defmethod spawner-hittable? ((this battle) (arg0 battle-spawner)) + (when (logtest? (-> arg0 flags) (battle-spawner-flags hit)) + (if (-> arg0 intro-path) + (>= (-> arg0 creature-index) (-> arg0 attack-index)) + #t + ) + ) + ) + +;; definition for method 42 of type battle +(defmethod spawner-hit ((this battle) (arg0 battle-spawner) (arg1 process)) + (let ((s5-0 (-> arg0 creature))) + (set! (-> arg0 creature) (the-as handle #f)) + (cond + ((send-event arg1 'cue-chase) + #t + ) + (else + (set! (-> arg0 creature) s5-0) + #f + ) + ) + ) + ) + +;; definition for method 44 of type battle +(defmethod spawner-do-jump ((this battle) (arg0 battle-spawner)) + (when (= (-> arg0 mode) 2) + (+! (-> arg0 creature-index) 1) + (set! (-> arg0 mode) (the-as uint 0)) + (spawner-active? this arg0 #f) + ) + 0 + ) + +;; definition for method 52 of type battle +(defmethod spawner-active-count ((this battle)) + (let ((gp-0 0)) + (dotimes (s4-0 (-> this spawners length)) + (if (spawner-active? this (-> this spawners data s4-0) #t) + (+! gp-0 1) + ) + ) + gp-0 + ) + ) + +;; definition for method 40 of type battle +;; WARN: Return type mismatch int vs none. +(defmethod spawn-initial-creatures ((this battle)) + (set! (-> this spawn-initial-creatures?) #f) + (let ((s5-0 (-> this spawners))) + (dotimes (s4-0 (-> s5-0 length)) + (let ((s3-0 (-> s5-0 data s4-0))) + (when (spawner-free? this s3-0) + (let ((v1-7 (res-lump-value (-> s3-0 entity) 'enemy-options uint128 :time -1000000000.0))) + (when (logtest? #x100000 v1-7) + (spawn-from-spawner this s3-0 #t) + (+! (-> this stat-child-count) 1) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 35 of type battle +(defmethod get-spawn-delay ((this battle)) + (let ((v1-0 (-> this info))) + (rand-vu-int-range + (the-as int (-> v1-0 min-battle-spawn-delay)) + (the-as int (-> v1-0 max-battle-spawn-delay)) + ) + ) + ) + +;; failed to figure out what this is: +(defstate idle (battle) + :virtual #t + :event battle-event-handler + :enter (behavior () + (if (and (-> self spawn-initial-creatures?) (not (-> self info dont-spawn-initial-until-notice?))) + (spawn-initial-creatures self) + ) + (unset-battle-music self) + ) + :trans (behavior () + (let ((v1-1 (-> self info notice-spec))) + (when (not (logtest? v1-1 1)) + (let ((gp-0 #t)) + (if (and (logtest? v1-1 2) + (not (and *target* + (and (>= (-> self info notice-distance) (vector-vector-distance (-> self root trans) (-> *target* control trans))) + (not (logtest? (focus-status teleporting) (-> *target* focus-status))) + ) + ) + ) + ) + (set! gp-0 #f) + ) + (if gp-0 + (go-virtual notice) + ) + ) + ) + ) + (if *display-battle-marks* + (draw-battle-marks self) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate notice (battle) + :virtual #t + :event battle-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (let ((gp-0 (-> self on-notice))) + (if gp-0 + (script-eval (the-as pair gp-0) :vector (-> self root trans)) + ) + ) + (set-battle-music self) + (if (-> self spawn-initial-creatures?) + (spawn-initial-creatures self) + ) + (if (logtest? (-> self flags) (battle-flags noticed)) + (go-virtual hostile) + ) + (logior! (-> self flags) (battle-flags noticed)) + ) + :trans (behavior () + (if *display-battle-marks* + (draw-battle-marks self) + ) + ) + :code (behavior () + (go-virtual hostile) + ) + ) + +;; definition for method 49 of type battle +(defmethod update-allies-list ((this battle)) + (with-pp + (let ((v1-0 (-> this allies)) + (gp-0 (-> this allies length)) + ) + (when (> gp-0 0) + (let* ((a1-4 (mod (-> pp clock integral-frame-counter) gp-0)) + (a3-0 (-> v1-0 data a1-4)) + ) + (when (logtest? (-> a3-0 entity extra perm status) (entity-perm-status dead)) + (+! (-> this die-count) 1) + (+! gp-0 -1) + (set! (-> v1-0 length) gp-0) + (if (and (nonzero? gp-0) (!= a1-4 gp-0)) + (mem-copy! (the-as pointer a3-0) (the-as pointer (-> v1-0 data gp-0)) 4) + ) + ) + ) + ) + gp-0 + ) + ) + ) + +;; definition for method 50 of type battle +(defmethod beaten? ((this battle)) + (let ((s5-0 (spawner-active-count this)) + (v1-2 (update-allies-list this)) + (a1-0 (-> this child)) + (a0-3 0) + ) + (while a1-0 + (+! a0-3 1) + (set! a1-0 (-> a1-0 0 brother)) + (nop!) + (nop!) + ) + (set! (-> this stat-child-count) (the-as uint a0-3)) + (let ((a0-4 (+ v1-2 a0-3)) + (v1-4 (-> this max-count)) + ) + (if (>= (-> this die-count) v1-4) + (return #t) + ) + (logclear! (-> this flags) (battle-flags no-spawner-block)) + (cond + ((and (> s5-0 0) (>= s5-0 (the-as int (- v1-4 (-> this die-count))))) + (let ((a1-10 (-> this jammed-starting-time))) + (cond + ((zero? (-> this jammed-starting-time)) + (set-time! (-> this jammed-starting-time)) + ) + (else + (if (time-elapsed? a1-10 (seconds 3.5)) + (logior! (-> this flags) (battle-flags no-spawner-block)) + ) + ) + ) + ) + ) + (else + (set! (-> this jammed-starting-time) 0) + 0 + ) + ) + (cond + ((and (not (logtest? (-> this flags) (battle-flags beaten))) + (> (-> this spawners length) 0) + (< a0-4 (the-as int (-> this info desired-alive-count))) + (< (-> this count) v1-4) + ) + (when (time-elapsed? (-> this cant-spawn-time) (the-as time-frame (-> this next-spawn-delay))) + (let ((a1-25 (get-best-spawner this))) + (cond + (a1-25 + (spawn-from-spawner this a1-25 #f) + (set! (-> this next-spawn-delay) (the-as uint (get-spawn-delay this))) + (set-time! (-> this cant-spawn-time)) + ) + (else + (set-time! (-> this cant-spawn-time)) + ) + ) + ) + ) + ) + (else + (set-time! (-> this cant-spawn-time)) + ) + ) + ) + ) + #f + ) + +;; failed to figure out what this is: +(defstate hostile (battle) + :virtual #t + :event battle-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self flags) (battle-flags active)) + (logclear! (-> self flags) (battle-flags no-spawner-block)) + (set! (-> self jammed-starting-time) 0) + (set! (-> self cant-spawn-time) 0) + (set! (-> self next-spawn-delay) (the-as uint 0)) + (set-battle-music self) + (let ((gp-0 (-> self on-hostile))) + (if gp-0 + (script-eval (the-as pair gp-0) :vector (-> self root trans)) + ) + ) + ) + :trans (behavior () + (if (beaten? self) + (go-virtual beaten) + ) + (if *display-battle-marks* + (draw-battle-marks self) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate beaten (battle) + :virtual #t + :event battle-event-handler + :enter (behavior () + (when (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + ) + (let ((gp-0 (-> self on-beaten))) + (if gp-0 + (script-eval (the-as pair gp-0) :vector (-> self root trans)) + ) + ) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (unset-battle-music self) + ) + :code sleep-code + ) + +;; definition for method 47 of type battle +;; WARN: Return type mismatch battle-flags vs none. +(defmethod set-battle-music ((this battle)) + (let ((a3-0 (-> this info play-battle-music))) + (when (and a3-0 (not (logtest? (-> this flags) (battle-flags battle-music-set)))) + (case a3-0 + (('sound-mode) + (set-setting! 'sound-mode #f 0.0 1) + ) + (else + (set-setting! 'music a3-0 0.0 0) + ) + ) + (logior! (-> this flags) (battle-flags battle-music-set)) + ) + ) + (none) + ) + +;; definition for method 48 of type battle +;; WARN: Return type mismatch int vs none. +(defmethod unset-battle-music ((this battle)) + (when (logtest? (-> this flags) (battle-flags battle-music-set)) + (remove-setting! 'sound-mode) + (remove-setting! 'music) + ) + 0 + (none) + ) + +;; definition for method 7 of type battle-spawner-array +(defmethod relocate ((this battle-spawner-array) (offset int)) + (dotimes (v1-0 (-> this length)) + (let ((a2-3 (-> this data v1-0))) + (&+! (-> a2-3 breeds) offset) + (if (-> a2-3 intro-path) + (&+! (-> a2-3 intro-path) offset) + ) + ) + ) + this + ) + +;; definition for method 7 of type battle +(defmethod relocate ((this battle) (offset int)) + (&+! (-> this spawners) offset) + (&+! (-> this allies) offset) + (call-parent-method this offset) + ) + +;; definition for method 29 of type battle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod initialize-spawner-breeds ((this battle) (arg0 battle-spawner) (arg1 entity-actor)) + (local-vars (sv-16 res-tag) (sv-32 res-tag)) + (let ((s2-0 0) + (s5-0 0) + (s4-0 0) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((s1-0 (res-lump-data arg1 'spawn-types pointer :tag-ptr (& sv-16)))) + (dotimes (s0-0 2) + (set! s2-0 0) + (when s1-0 + (set! s4-0 (the-as int (-> sv-16 elt-count))) + (dotimes (v1-5 s4-0) + (let ((a0-4 (-> (the-as (pointer uint32) (&+ s1-0 (* v1-5 4)))))) + (when (nonzero? a0-4) + (set! s5-0 (logior s5-0 (ash 1 v1-5))) + (+! s2-0 1) + (when (= s0-0 1) + (let ((a1-10 (-> arg0 breeds data (+ s2-0 -1)))) + (set! (-> a1-10 breed-type) (the-as type a0-4)) + (set! (-> a1-10 percent) 1.0) + ) + ) + ) + ) + ) + ) + (if (zero? s0-0) + (set! (-> arg0 breeds) (new 'process 'battle-breed-array (max 1 s2-0))) + ) + ) + ) + (cond + ((zero? s2-0) + (let ((v1-15 (-> arg0 breeds data))) + (set! (-> v1-15 0 breed-type) (-> arg1 etype)) + (set! (-> v1-15 0 percent) 1.0) + ) + ) + (else + (set! sv-32 (new 'static 'res-tag)) + (let ((v1-18 (res-lump-data arg1 'spawn-percs pointer :tag-ptr (& sv-32)))) + (when v1-18 + (let ((a0-16 (min (the-as int (-> sv-32 elt-count)) s4-0)) + (a1-14 0) + (a2-7 (-> arg0 breeds)) + ) + (dotimes (a3-2 a0-16) + (when (logtest? s5-0 (ash 1 a3-2)) + (let ((t0-8 (-> a2-7 data a1-14))) + (set! (-> t0-8 percent) (-> (the-as (pointer float) (&+ v1-18 (* a3-2 4))))) + ) + (+! a1-14 1) + ) + ) + ) + ) + ) + (let ((f30-0 0.0) + (s5-1 (-> arg0 breeds)) + ) + (dotimes (v1-20 (-> s5-1 length)) + (+! f30-0 (-> s5-1 data v1-20 percent)) + ) + (when (!= f30-0 1.0) + (format + 0 + "WARNING: battle spawner ~A has spawn percents that don't sum to 1.0.~%" + (res-lump-struct (-> arg0 entity) 'name structure) + ) + (dotimes (v1-26 (-> s5-1 length)) + (let ((a0-27 (-> s5-1 data v1-26))) + (set! (-> a0-27 percent) (/ (-> a0-27 percent) f30-0)) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 32 of type battle +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod initialize-spawner ((this battle) (arg0 battle-spawner) (arg1 entity-actor)) + (set! (-> arg0 flags) (battle-spawner-flags)) + (set! (-> arg0 entity) arg1) + (set! (-> arg0 creature-index) 0) + (set! (-> arg0 ready-index) -1) + (set! (-> arg0 attack-index) 0) + (set! (-> arg0 intro-path) #f) + (set! (-> arg0 notice-attack-delay) + (the-as uint (rand-vu-int-range + (the-as int (-> this info min-spawner-notice-attack-delay)) + (the-as int (-> this info max-spawner-notice-attack-delay)) + ) + ) + ) + (set! (-> arg0 creature) (the-as handle #f)) + (set! (-> arg0 last-spawn-time) 0) + (set! (-> arg0 noticed-attack-time) 0) + (initialize-spawner-breeds this arg0 arg1) + (let ((a0-4 (new 'process 'path-control this 'intro 0.0 arg1 #t))) + (cond + ((nonzero? a0-4) + (set! (-> arg0 intro-path) a0-4) + (logior! (-> a0-4 flags) (path-control-flag display draw-line draw-point draw-text)) + (let ((s5-1 (-> a0-4 curve num-cverts))) + (let ((v1-9 (+ s5-1 -1))) + (set! (-> arg0 attack-index) v1-9) + (get-point-in-path! a0-4 (-> arg0 attack-pos) (the float v1-9) 'exact) + ) + (let ((v0-4 -1)) + (if (< 2 s5-1) + (set! v0-4 1) + ) + (set! (-> arg0 ready-index) v0-4) + ) + ) + ) + (else + (set! (-> arg0 attack-pos quad) (-> arg0 entity extra trans quad)) + ) + ) + ) + (none) + ) + +;; definition for method 31 of type battle +;; WARN: Return type mismatch int vs none. +(defmethod initialize-ally ((this battle) (arg0 battle-ally) (arg1 entity-actor)) + (set! (-> arg0 entity) arg1) + 0 + (none) + ) + +;; definition for method 28 of type battle +;; 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-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))) + (let* ((s5-0 (-> (the-as (pointer actor-group) v0-0) 0)) + (s4-0 (-> s5-0 length)) + ) + (dotimes (s3-0 2) + (let ((s1-0 0) + (s2-0 0) + ) + (dotimes (s0-0 s4-0) + (set! sv-32 (-> s5-0 data s0-0 actor)) + (when sv-32 + (let ((v0-1 (res-lump-value sv-32 'enemy-options uint128 :time -1000000000.0))) + (cond + ((logtest? #x80000 v0-1) + (+! s1-0 1) + (cond + ((zero? s3-0) + 0 + ) + (else + (let ((a1-2 (-> this spawners data (+ s1-0 -1)))) + (initialize-spawner this a1-2 sv-32) + ) + ) + ) + ) + (else + (when (not (logtest? (-> sv-32 extra perm status) (entity-perm-status dead))) + (+! s2-0 1) + (cond + ((zero? s3-0) + 0 + ) + (else + (let ((a1-3 (-> this allies data (+ s2-0 -1)))) + (initialize-ally this a1-3 sv-32) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (set! v0-4 (when (zero? s3-0) + (set! (-> this spawners) (new 'process 'battle-spawner-array s1-0)) + (set! v0-4 (new 'process 'battle-ally-array s2-0)) + (set! (-> this allies) v0-4) + v0-4 + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 33 of type battle +;; WARN: Return type mismatch int vs none. +(defmethod initialize-battle ((this battle)) + (set! (-> this spawn-initial-creatures?) #t) + (set! (-> this count) (the-as uint 0)) + (set! (-> this die-count) (the-as uint 0)) + (set! (-> this stat-child-count) (the-as uint 0)) + (let ((v1-2 (res-lump-value (-> this entity) 'extra-id uint128 :default (the-as uint128 -1) :time -1000000000.0)) + (a0-2 *battles*) + ) + (dotimes (a1-1 (-> a0-2 length)) + (let ((a2-3 (-> a0-2 a1-1))) + (when (= (the-as uint v1-2) (-> a2-3 id)) + (set! (-> this info) a2-3) + (goto cfg-7) + ) + ) + ) + ) + (go process-drawable-art-error "bad battle id") + (label cfg-7) + (set! (-> this on-notice) (res-lump-struct (-> this entity) 'on-notice basic)) + (set! (-> this on-hostile) (res-lump-struct (-> this entity) 'on-hostile basic)) + (set! (-> this on-beaten) (res-lump-struct (-> this entity) 'on-beaten basic)) + (initialize-enemy-lists this) + (+! (-> this count) (-> this allies length)) + (let ((v1-16 (-> this info max-count))) + (cond + ((and (= v1-16 #x20000000) (zero? (-> this spawners length))) + (set! v1-16 (-> this count)) + ) + ((< v1-16 (-> this count)) + (set! v1-16 (-> this count)) + ) + ) + (set! (-> this max-count) v1-16) + ) + 0 + (none) + ) + +;; definition for method 34 of type battle +(defmethod init-go ((this battle)) + (if (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (go (method-of-object this beaten)) + (go (method-of-object this idle)) + ) + 0 + ) + +;; definition for method 11 of type battle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs object. +(defmethod init-from-entity! ((this battle) (arg0 entity-actor)) + (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)) + ) + (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 new file mode 100644 index 0000000000..878d8d6a5d --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/elec-gate_REF.gc @@ -0,0 +1,1070 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type elec-gate-params +(deftype elec-gate-params (structure) + ((bolt-spec lightning-spec) + (ring-spec lightning-spec) + (ring-radius-min float) + (ring-radius-max float) + (speed-mult float) + (min-dist float) + (max-dist float) + (plane-expand-xz float) + (plane-expand-y float) + (plane-shift-z float) + ) + ) + +;; definition for method 3 of type elec-gate-params +(defmethod inspect ((this elec-gate-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'elec-gate-params) + (format #t "~1Tbolt-spec: ~A~%" (-> this bolt-spec)) + (format #t "~1Tring-spec: ~A~%" (-> this ring-spec)) + (format #t "~1Tring-radius-min: ~f~%" (-> this ring-radius-min)) + (format #t "~1Tring-radius-max: ~f~%" (-> this ring-radius-max)) + (format #t "~1Tspeed-mult: ~f~%" (-> this speed-mult)) + (format #t "~1Tmin-dist: ~f~%" (-> this min-dist)) + (format #t "~1Tmax-dist: ~f~%" (-> this max-dist)) + (format #t "~1Tplane-expand-xz: ~f~%" (-> this plane-expand-xz)) + (format #t "~1Tplane-expand-y: ~f~%" (-> this plane-expand-y)) + (format #t "~1Tplane-shift-z: ~f~%" (-> this plane-shift-z)) + (label cfg-4) + this + ) + +;; definition of type elec-gate-bolt +(deftype elec-gate-bolt (structure) + ((ring lightning-control 2) + (bolt lightning-control) + (ring-radius float) + (pos float) + ) + ) + +;; definition for method 3 of type elec-gate-bolt +(defmethod inspect ((this elec-gate-bolt)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'elec-gate-bolt) + (format #t "~1Tring[2] @ #x~X~%" (-> this ring)) + (format #t "~1Tbolt: ~A~%" (-> this bolt)) + (format #t "~1Tring-radius: ~f~%" (-> this ring-radius)) + (format #t "~1Tpos: ~f~%" (-> this pos)) + (label cfg-4) + this + ) + +;; definition of type elec-wall +(deftype elec-wall (structure) + ((pos vector :inline) + (dir vector :inline) + ) + ) + +;; definition for method 3 of type elec-wall +(defmethod inspect ((this elec-wall)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'elec-wall) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Tdir: #~%" (-> this dir)) + (label cfg-4) + this + ) + +;; definition of type elec-gate +(deftype elec-gate (process-drawable) + ((params elec-gate-params) + (path-l path-control :overlay-at path) + (path-r path-control) + (l-bolt elec-gate-bolt 5 :inline) + (part-on sparticle-launch-control :overlay-at part) + (part-off sparticle-launch-control) + (part-spawner-left part-spawner) + (part-spawner-right part-spawner) + (on-start pair) + (on-stop pair) + (on-shutdown pair) + (on-trigger pair) + (dividing-wall elec-wall :inline) + (plane elec-wall 2 :inline) + (wall-y float) + (wall-xz float) + (lightning-quality float) + (quality-enabled? symbol) + ) + (:state-methods + idle + active + shutdown-camera + shutdown + ) + (:methods + (get-params (_type_) elec-gate-params) + (elec-gate-method-25 (_type_) none) + (elec-gate-method-26 (_type_) none) + (go-initial-state (_type_) object) + (spawn-particles (_type_ sparticle-launch-control) none) + (set-elec-scale! (_type_ float) none) + (elec-gate-method-30 (_type_ float) none) + ) + ) + +;; definition for method 3 of type elec-gate +(defmethod inspect ((this elec-gate)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tparams: #~%" (-> this params)) + (format #t "~2Tpath-l: ~A~%" (-> this path)) + (format #t "~2Tpath-r: ~A~%" (-> this path-r)) + (format #t "~2Tl-bolt[5] @ #x~X~%" (-> this l-bolt)) + (format #t "~2Tpart-on: ~A~%" (-> this part)) + (format #t "~2Tpart-off: ~A~%" (-> this part-off)) + (format #t "~2Tpart-spawner-left: ~A~%" (-> this part-spawner-left)) + (format #t "~2Tpart-spawner-right: ~A~%" (-> this part-spawner-right)) + (format #t "~2Ton-start: ~A~%" (-> this on-start)) + (format #t "~2Ton-stop: ~A~%" (-> this on-stop)) + (format #t "~2Ton-shutdown: ~A~%" (-> this on-shutdown)) + (format #t "~2Ton-trigger: ~A~%" (-> this on-trigger)) + (format #t "~2Tdividing-wall: #~%" (-> this dividing-wall)) + (format #t "~2Tplane[2] @ #x~X~%" (-> this plane)) + (format #t "~2Twall-y: ~f~%" (-> this wall-y)) + (format #t "~2Twall-xz: ~f~%" (-> this wall-xz)) + (format #t "~2Tlightning-quality: ~f~%" (-> this lightning-quality)) + (format #t "~2Tquality-enabled?: ~A~%" (-> this quality-enabled?)) + (label cfg-4) + this + ) + +;; definition for symbol *default-elec-gate-params*, type elec-gate-params +(define *default-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 (new 'static 'lightning-spec + :name #f + :flags (lightning-spec-flags lsf2) + :rand-func #x3 + :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 120.0 + :texture (new 'static 'texture-id :index #x3f :page #x4) + :reduction 0.42 + :num-points 12 + :box-size 3072.0 + :merge-factor 0.5 + :radius 2048.0 + :duration -1.0 + :sound #f + ) + :ring-radius-min 1638.4 + :ring-radius-max 2867.2 + :speed-mult 1.0 + :min-dist 163840.0 + :max-dist 491520.0 + :plane-expand-xz 8192.0 + :plane-expand-y 81920.0 + ) + ) + +;; definition for function elec-gate-post +;; INFO: Used lq/sq +(defbehavior elec-gate-post elec-gate () + (local-vars (sv-96 lightning-control) (sv-112 vector)) + (let ((gp-0 (-> self params))) + (dotimes (s5-0 5) + (let* ((s2-0 (-> self l-bolt s5-0)) + (s4-0 (get-point-at-percent-along-path! (-> self path) (new 'stack-no-clear 'vector) (-> s2-0 pos) 'interp)) + (s3-0 (get-point-at-percent-along-path! (-> self path-r) (new 'stack-no-clear 'vector) (-> s2-0 pos) 'interp)) + ) + (let ((a0-2 (-> s2-0 bolt)) + (v1-4 s4-0) + ) + (set! (-> a0-2 state meet data 0 quad) (-> v1-4 quad)) + ) + (let ((a0-5 (-> s2-0 bolt)) + (v1-6 s3-0) + ) + (set! (-> a0-5 state meet data (+ (-> a0-5 state points-to-draw) -1) quad) (-> v1-6 quad)) + ) + (when (-> gp-0 ring-spec) + (let ((s1-0 (-> gp-0 ring-spec num-points)) + (s0-0 (-> s2-0 ring 0)) + ) + (set! sv-96 (-> s2-0 ring 1)) + (set! sv-112 (new 'stack-no-clear 'vector)) + (set! (-> sv-112 x) 0.0) + (set! (-> sv-112 y) 0.0) + (set! (-> sv-112 z) (-> s2-0 ring-radius)) + (set! (-> sv-112 w) 0.0) + (let ((f30-0 (* 65536.0 (/ 1.0 (the float (+ s1-0 -1)))))) + (dotimes (s2-1 s1-0) + (set-point! s0-0 s2-1 (vector+! (new 'stack-no-clear 'vector) s4-0 sv-112)) + (set-point! sv-96 s2-1 (vector+! (new 'stack-no-clear 'vector) s3-0 sv-112)) + (vector-rotate-y! sv-112 sv-112 f30-0) + ) + ) + ) + ) + ) + ) + ) + (debug-draw (-> self path)) + (debug-draw (-> self path-r)) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (elec-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (let ((gp-0 (-> self on-trigger))) + (if gp-0 + (script-eval gp-0 :vector (-> self root trans)) + ) + ) + (go-virtual active) + ) + ) + ) + :enter (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (dotimes (v1-0 5) + (let ((a0-3 (-> self l-bolt v1-0 bolt)) + (a1-1 0) + ) + (let ((a2-2 (!= a1-1 (-> a0-3 state mode)))) + (case a1-1 + ((3) + (if a2-2 + (set! (-> a0-3 state counter) 0.0) + ) + ) + ((1) + (set! (-> a0-3 state start-color) (-> a0-3 spec start-color)) + (set! (-> a0-3 state end-color) (-> a0-3 spec end-color)) + ) + ) + ) + (set! (-> a0-3 state mode) (the-as uint a1-1)) + ) + (when (-> self params ring-spec) + (let ((a0-9 (-> self l-bolt v1-0 ring 0)) + (a1-2 0) + ) + (let ((a2-12 (!= a1-2 (-> a0-9 state mode)))) + (case a1-2 + ((3) + (if a2-12 + (set! (-> a0-9 state counter) 0.0) + ) + ) + ((1) + (set! (-> a0-9 state start-color) (-> a0-9 spec start-color)) + (set! (-> a0-9 state end-color) (-> a0-9 spec end-color)) + ) + ) + ) + (set! (-> a0-9 state mode) (the-as uint a1-2)) + ) + (let ((a0-12 (-> self l-bolt v1-0 ring 1)) + (a1-3 0) + ) + (let ((a2-22 (!= a1-3 (-> a0-12 state mode)))) + (case a1-3 + ((3) + (if a2-22 + (set! (-> a0-12 state counter) 0.0) + ) + ) + ((1) + (set! (-> a0-12 state start-color) (-> a0-12 spec start-color)) + (set! (-> a0-12 state end-color) (-> a0-12 spec end-color)) + ) + ) + ) + (set! (-> a0-12 state mode) (the-as uint a1-3)) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (set-elec-scale! self 0.0) + (if (nonzero? (-> self part-off)) + (spawn-particles self (-> self part-off)) + ) + ) + ) + +;; failed to figure out what this is: +(defstate active (elec-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('shutdown) + (go-virtual shutdown-camera) + ) + ) + ) + :enter (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #f) + (if (-> self on-start) + (script-eval (-> self on-start) :vector (-> self root trans)) + ) + (dotimes (v1-7 5) + (set! (-> self l-bolt v1-7 pos) (+ -1.0 (* 0.2 (the float v1-7)))) + (let ((a0-9 (-> self l-bolt v1-7 bolt)) + (a1-3 0) + ) + (let ((a2-3 (!= a1-3 (-> a0-9 state mode)))) + (case a1-3 + ((3) + (if a2-3 + (set! (-> a0-9 state counter) 0.0) + ) + ) + ((1) + (set! (-> a0-9 state start-color) (-> a0-9 spec start-color)) + (set! (-> a0-9 state end-color) (-> a0-9 spec end-color)) + ) + ) + ) + (set! (-> a0-9 state mode) (the-as uint a1-3)) + ) + (when (-> self params ring-spec) + (let ((a0-15 (-> self l-bolt v1-7 ring 0)) + (a1-4 0) + ) + (let ((a2-13 (!= a1-4 (-> a0-15 state mode)))) + (case a1-4 + ((3) + (if a2-13 + (set! (-> a0-15 state counter) 0.0) + ) + ) + ((1) + (set! (-> a0-15 state start-color) (-> a0-15 spec start-color)) + (set! (-> a0-15 state end-color) (-> a0-15 spec end-color)) + ) + ) + ) + (set! (-> a0-15 state mode) (the-as uint a1-4)) + ) + (let ((a0-18 (-> self l-bolt v1-7 ring 1)) + (a1-5 0) + ) + (let ((a2-23 (!= a1-5 (-> a0-18 state mode)))) + (case a1-5 + ((3) + (if a2-23 + (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-5)) + ) + ) + ) + (let ((gp-0 (new 'stack-no-clear 'inline-array 'vector 2))) + (dotimes (v1-10 2) + (set! (-> gp-0 v1-10 quad) (the-as uint128 0)) + ) + (let ((s5-0 (new 'stack-no-clear 'vector))) + 0.0 + (get-point-in-path! (-> self path) (-> gp-0 0) 0.0 'interp) + (get-point-in-path! (-> self path-r) (-> gp-0 1) 0.0 'interp) + (vector-! s5-0 (-> gp-0 1) (-> gp-0 0)) + (vector-normalize! s5-0 (+ (-> self params plane-expand-xz) (res-lump-float (-> self entity) 'width))) + (vector+! (-> gp-0 1) (-> gp-0 1) s5-0) + (vector-negate! s5-0 s5-0) + (vector+! (-> gp-0 0) (-> gp-0 0) s5-0) + (vector-! s5-0 (-> gp-0 1) (-> gp-0 0)) + (vector-normalize! s5-0 -1.0) + (vector-cross! s5-0 s5-0 *y-vector*) + (vector+float*! (-> gp-0 0) (-> gp-0 0) s5-0 (-> self params plane-shift-z)) + (vector+float*! (-> gp-0 1) (-> gp-0 1) s5-0 (-> self params plane-shift-z)) + (vector-normalize-copy! s5-0 *up-vector* -8192.0) + (vector+! (-> gp-0 0) (-> gp-0 0) s5-0) + (vector+! (-> gp-0 1) (-> gp-0 1) s5-0) + ) + (let ((f0-12 + (+ (- (-> (get-point-in-path! (-> self path) (new 'stack-no-clear 'vector) (get-num-segments (-> self path)) 'interp) + y + ) + (-> (get-point-in-path! (-> self path) (new 'stack-no-clear 'vector) 0.0 'interp) y) + ) + (-> self params plane-expand-y) + ) + ) + ) + (blocking-plane-spawn (the-as curve-control #f) gp-0 f0-12) + ) + ) + ) + :trans (behavior () + (local-vars + (sv-176 lightning-spec) + (sv-192 int) + (sv-208 symbol) + (sv-224 symbol) + (sv-240 int) + (sv-256 symbol) + (sv-272 symbol) + ) + (let ((gp-0 *target*)) + (when gp-0 + (when (not (focus-test? gp-0 disable dead ignore grabbed pilot-riding pilot mech teleporting invulnerable)) + (let* ((v1-5 (get-trans gp-0 0)) + (a1-2 (vector-! (new 'stack-no-clear 'vector) v1-5 (the-as vector (-> self dividing-wall)))) + (s5-0 (-> self plane (if (< 0.0 (vector-dot a1-2 (-> self dividing-wall dir))) + 0 + 1 + ) + ) + ) + (s4-1 (vector-! (new 'stack-no-clear 'vector) v1-5 (-> s5-0 pos))) + ) + (when (and (< (vector-dot (vector-normalize-copy! (new 'stack-no-clear 'vector) s4-1 1.0) (-> s5-0 dir)) 0.0) + (let ((v1-10 s4-1)) + (< (sqrtf (+ (* (-> v1-10 x) (-> v1-10 x)) (* (-> v1-10 z) (-> v1-10 z)))) (-> self wall-xz)) + ) + (< (fabs (-> s4-1 y)) (-> self wall-y)) + ) + (send-event + gp-0 + '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) + (vector (-> s5-0 dir)) + (shove-back (meters 6)) + (shove-up (meters 3)) + (control (if (focus-test? gp-0 board) + 1.0 + 0.0 + ) + ) + ) + ) + ) + (let* ((s5-1 (-> self l-bolt)) + (s4-2 (get-point-at-percent-along-path! (-> self path) (new 'stack-no-clear 'vector) (-> s5-1 0 pos) 'interp)) + (s5-2 + (get-point-at-percent-along-path! (-> self path-r) (new 'stack-no-clear 'vector) (-> s5-1 0 pos) 'interp) + ) + ) + (let ((s3-0 (get-process *default-dead-pool* lightning-tracker #x4000 0))) + (when s3-0 + (let ((t9-6 (method-of-type lightning-tracker activate))) + (t9-6 (the-as lightning-tracker s3-0) *entity-pool* "lightning-tracker" (the-as pointer #x70004000)) + ) + (let ((s2-0 run-function-in-process) + (s1-0 s3-0) + (s0-0 lightning-tracker-init) + ) + (set! sv-176 (-> self params bolt-spec)) + (set! sv-192 15) + (set! sv-208 (the-as symbol #f)) + (set! sv-224 (the-as symbol #f)) + (let ((t3-0 (get-trans gp-0 3))) + ((the-as (function object object object object object object object object none) s2-0) + s1-0 + s0-0 + sv-176 + sv-192 + sv-208 + sv-224 + s4-2 + t3-0 + ) + ) + ) + (-> s3-0 ppointer) + ) + ) + (let ((s4-3 (get-process *default-dead-pool* lightning-tracker #x4000 0))) + (when s4-3 + (let ((t9-10 (method-of-type lightning-tracker activate))) + (t9-10 (the-as lightning-tracker s4-3) *entity-pool* "lightning-tracker" (the-as pointer #x70004000)) + ) + (let ((s3-1 run-function-in-process) + (s2-1 s4-3) + (s1-1 lightning-tracker-init) + (s0-1 (-> self params bolt-spec)) + ) + (set! sv-240 15) + (set! sv-256 (the-as symbol #f)) + (set! sv-272 (the-as symbol #f)) + (let ((t3-1 (get-trans gp-0 3))) + ((the-as (function object object object object object object object object none) s3-1) + s2-1 + s1-1 + s0-1 + sv-240 + sv-256 + sv-272 + s5-2 + t3-1 + ) + ) + ) + (-> s4-3 ppointer) + ) + ) + ) + ) + ) + ) + (set! (-> self lightning-quality) (lerp-scale + 0.0 + 1.0 + (vector-vector-distance (get-trans gp-0 0) (-> self root trans)) + (-> self params max-dist) + (-> self params min-dist) + ) + ) + ) + ) + (let ((gp-1 (+ (the int (* 5.0 (-> self lightning-quality))) 1))) + (dotimes (s5-4 5) + (let ((s3-3 (-> self l-bolt s5-4)) + (s2-3 (-> self params)) + (s4-5 (if (and (-> self quality-enabled?) (zero? (mod s5-4 gp-1))) + 0 + -1 + ) + ) + ) + (seek! (-> s3-3 pos) 1.5 (* (-> s2-3 speed-mult) (+ 0.2 (fabs (-> s3-3 pos))) (seconds-per-frame))) + (cond + ((>= (-> s3-3 pos) 1.5) + (set! (-> s3-3 ring-radius) (rand-vu-float-range (-> s2-3 ring-radius-min) (-> s2-3 ring-radius-max))) + (set! (-> s3-3 pos) 0.0) + ) + ((>= (-> s3-3 pos) 1.0) + (let ((v1-56 (-> self l-bolt s5-4 bolt)) + (a0-40 (logand 0 s4-5)) + ) + (let ((a1-21 (!= a0-40 (-> v1-56 state mode)))) + (case a0-40 + ((3) + (if a1-21 + (set! (-> v1-56 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-56 state start-color) (-> v1-56 spec start-color)) + (set! (-> v1-56 state end-color) (-> v1-56 spec end-color)) + ) + ) + ) + (set! (-> v1-56 state mode) (the-as uint a0-40)) + ) + (when (-> self params ring-spec) + (let ((v1-62 (-> self l-bolt s5-4 ring 0)) + (a0-41 (logand 0 s4-5)) + ) + (let ((a1-31 (!= a0-41 (-> v1-62 state mode)))) + (case a0-41 + ((3) + (if a1-31 + (set! (-> v1-62 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-62 state start-color) (-> v1-62 spec start-color)) + (set! (-> v1-62 state end-color) (-> v1-62 spec end-color)) + ) + ) + ) + (set! (-> v1-62 state mode) (the-as uint a0-41)) + ) + (let ((a0-42 (-> self l-bolt s5-4 ring 1)) + (v1-65 (logand 0 s4-5)) + ) + (let ((a1-41 (!= v1-65 (-> a0-42 state mode)))) + (case v1-65 + ((3) + (if a1-41 + (set! (-> a0-42 state counter) 0.0) + ) + ) + ((1) + (set! (-> a0-42 state start-color) (-> a0-42 spec start-color)) + (set! (-> a0-42 state end-color) (-> a0-42 spec end-color)) + ) + ) + ) + (set! (-> a0-42 state mode) (the-as uint v1-65)) + ) + ) + ) + ((< 0.0 (-> s3-3 pos)) + (when (zero? (-> self l-bolt s5-4 bolt state mode)) + (let ((v1-74 (-> self l-bolt s5-4 bolt)) + (a0-43 (logand s4-5 1)) + ) + (let ((a1-51 (!= a0-43 (-> v1-74 state mode)))) + (case a0-43 + ((3) + (if a1-51 + (set! (-> v1-74 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-74 state start-color) (-> v1-74 spec start-color)) + (set! (-> v1-74 state end-color) (-> v1-74 spec end-color)) + ) + ) + ) + (set! (-> v1-74 state mode) (the-as uint a0-43)) + ) + (when (-> self params ring-spec) + (let ((v1-80 (-> self l-bolt s5-4 ring 0)) + (a0-44 (logand s4-5 1)) + ) + (let ((a1-61 (!= a0-44 (-> v1-80 state mode)))) + (case a0-44 + ((3) + (if a1-61 + (set! (-> v1-80 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-80 state start-color) (-> v1-80 spec start-color)) + (set! (-> v1-80 state end-color) (-> v1-80 spec end-color)) + ) + ) + ) + (set! (-> v1-80 state mode) (the-as uint a0-44)) + ) + (let ((a0-45 (-> self l-bolt s5-4 ring 1)) + (v1-83 (logand s4-5 1)) + ) + (let ((a1-71 (!= v1-83 (-> a0-45 state mode)))) + (case v1-83 + ((3) + (if a1-71 + (set! (-> a0-45 state counter) 0.0) + ) + ) + ((1) + (set! (-> a0-45 state start-color) (-> a0-45 spec start-color)) + (set! (-> a0-45 state end-color) (-> a0-45 spec end-color)) + ) + ) + ) + (set! (-> a0-45 state mode) (the-as uint v1-83)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (set-elec-scale! self 1.0) + (if (nonzero? (-> self part)) + (spawn-particles self (-> self part)) + ) + (update! (-> self sound)) + (elec-gate-post) + ) + ) + +;; failed to figure out what this is: +(defstate shutdown-camera (elec-gate) + :virtual #t + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (format 0 "~s~%" (-> self name)) + (if (res-lump-struct (-> self entity) 'camera-name structure) + (process-spawn + external-camera-controller + (-> self entity) + 600 + #f + :name "external-camera-controller" + :to *entity-pool* + ) + ) + (let ((gp-2 (current-time))) + (until (time-elapsed? gp-2 (seconds 1)) + (suspend) + ) + ) + (go-virtual shutdown) + ) + :post (behavior () + (elec-gate-post) + ) + ) + +;; failed to figure out what this is: +(defstate shutdown (elec-gate) + :virtual #t + :enter (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (stop! (-> self sound)) + (sound-play "elec-gate-off") + (blocking-plane-destroy) + (if (-> self on-stop) + (script-eval (-> self on-stop) :vector (-> self root trans)) + ) + ) + :trans (behavior () + (let ((gp-0 #t)) + (dotimes (s5-0 5) + (let ((s4-0 (-> self l-bolt s5-0))) + (seek! (-> s4-0 pos) 0.0 (seconds-per-frame)) + (set! gp-0 (cond + ((or (< 1.0 (-> s4-0 pos)) (>= 0.0 (-> s4-0 pos))) + (when (= (-> self l-bolt s5-0 bolt state mode) 2) + (let ((v1-9 (-> self l-bolt s5-0 bolt)) + (a0-6 3) + ) + (let ((a1-2 (!= a0-6 (-> v1-9 state mode)))) + (case a0-6 + ((3) + (if a1-2 + (set! (-> v1-9 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-9 state start-color) (-> v1-9 spec start-color)) + (set! (-> v1-9 state end-color) (-> v1-9 spec end-color)) + ) + ) + ) + (set! (-> v1-9 state mode) (the-as uint a0-6)) + ) + (when (-> self params ring-spec) + (let ((v1-14 (-> self l-bolt s5-0 ring 0)) + (a0-8 3) + ) + (let ((a1-12 (!= a0-8 (-> v1-14 state mode)))) + (case a0-8 + ((3) + (if a1-12 + (set! (-> v1-14 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-14 state start-color) (-> v1-14 spec start-color)) + (set! (-> v1-14 state end-color) (-> v1-14 spec end-color)) + ) + ) + ) + (set! (-> v1-14 state mode) (the-as uint a0-8)) + ) + (let ((v1-17 (-> self l-bolt s5-0 ring 1)) + (a0-9 3) + ) + (let ((a1-22 (!= a0-9 (-> v1-17 state mode)))) + (case a0-9 + ((3) + (if a1-22 + (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-9)) + ) + ) + ) + gp-0 + ) + (else + #f + ) + ) + ) + ) + ) + (when gp-0 + (let ((gp-1 (-> self on-shutdown))) + (if gp-1 + (script-eval gp-1 :vector (-> self root trans)) + ) + ) + (go-virtual idle) + ) + ) + ) + :code sleep-code + :post (behavior () + (set-elec-scale! self 0.0) + (if (nonzero? (-> self part-off)) + (spawn-particles self (-> self part-off)) + ) + (elec-gate-post) + ) + ) + +;; definition for method 29 of type elec-gate +;; WARN: Return type mismatch int vs none. +(defmethod set-elec-scale! ((this elec-gate) (arg0 float)) + (if (< (vector-vector-distance (-> this root trans) (target-pos 0)) 327680.0) + (elec-gate-method-30 this arg0) + ) + 0 + (none) + ) + +;; definition for method 30 of type elec-gate +;; WARN: Return type mismatch int vs none. +(defmethod elec-gate-method-30 ((this elec-gate) (arg0 float)) + 0 + (none) + ) + +;; definition for method 28 of type elec-gate +;; WARN: Return type mismatch int vs none. +(defmethod spawn-particles ((this elec-gate) (arg0 sparticle-launch-control)) + (if (-> this part-spawner-left) + (spawn arg0 (the-as vector (&-> (-> this part-spawner-left child) 8))) + ) + (if (-> this part-spawner-right) + (spawn arg0 (the-as vector (&-> (-> this part-spawner-right child) 8))) + ) + 0 + (none) + ) + +;; definition for method 7 of type elec-gate +;; WARN: Return type mismatch process-drawable vs elec-gate. +(defmethod relocate ((this elec-gate) (offset int)) + (dotimes (v1-0 5) + (let ((a2-2 (-> this l-bolt v1-0))) + (if (nonzero? (-> a2-2 bolt)) + (&+! (-> a2-2 bolt) offset) + ) + (if (nonzero? (-> a2-2 ring 0)) + (&+! (-> a2-2 ring 0) offset) + ) + (if (nonzero? (-> a2-2 ring 1)) + (&+! (-> a2-2 ring 1) offset) + ) + ) + ) + (if (nonzero? (-> this path-r)) + (&+! (-> this path-r) offset) + ) + (when (nonzero? (-> this part-off)) + (if (nonzero? (-> this part-off)) + (&+! (-> this part-off) offset) + ) + ) + (the-as elec-gate ((method-of-type process-drawable relocate) this offset)) + ) + +;; definition for method 10 of type elec-gate +(defmethod deactivate ((this elec-gate)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this root)) + (set-elec-scale! this 0.0) + ) + (if (nonzero? (-> this part-off)) + (kill-particles (-> this part-off)) + ) + (call-parent-method this) + (none) + ) + +;; definition for method 24 of type elec-gate +(defmethod get-params ((this elec-gate)) + *default-elec-gate-params* + ) + +;; definition for method 25 of type elec-gate +;; WARN: Return type mismatch int vs none. +(defmethod elec-gate-method-25 ((this elec-gate)) + 0 + (none) + ) + +;; definition for method 26 of type elec-gate +;; WARN: Return type mismatch int vs none. +(defmethod elec-gate-method-26 ((this elec-gate)) + 0 + (none) + ) + +;; definition for method 27 of type elec-gate +;; WARN: Return type mismatch int vs object. +(defmethod go-initial-state ((this elec-gate)) + (if (or (logtest? (actor-option user17) (-> this fact options)) + (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 active)) + ) + 0 + ) + +;; definition for method 11 of type elec-gate +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this elec-gate) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (set! (-> this entity) arg0) + (set! (-> this fact) + (new 'process 'fact-info this (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc)) + ) + (set! (-> this params) (get-params this)) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this path) (new 'process 'path-control this 'pathl 0.0 (the-as entity #f) #f)) + (logior! (-> this path flags) (path-control-flag display draw-line draw-point draw-text)) + (set! (-> this path-r) (new 'process 'path-control this 'pathr 0.0 (the-as entity #f) #f)) + (logior! (-> this path-r flags) (path-control-flag display draw-line draw-point draw-text)) + (set! (-> this part-spawner-left) (the-as part-spawner (entity-actor-lookup arg0 'alt-actor 0))) + (set! (-> this part-spawner-right) (the-as part-spawner (entity-actor-lookup arg0 'alt-actor 1))) + (let ((s5-1 (-> this params))) + (dotimes (s4-0 5) + (let ((s3-0 (-> this l-bolt s4-0))) + (set! (-> s3-0 bolt) (new 'process 'lightning-control (-> s5-1 bolt-spec) this 0.0)) + (when (-> s5-1 ring-spec) + (set! (-> s3-0 ring 0) (new 'process 'lightning-control (-> s5-1 ring-spec) this 0.0)) + (set! (-> s3-0 ring 1) (new 'process 'lightning-control (-> s5-1 ring-spec) this 0.0)) + ) + (set! (-> s3-0 ring-radius) (rand-vu-float-range (-> s5-1 ring-radius-min) (-> s5-1 ring-radius-max))) + (set! (-> s3-0 pos) (* 0.2 (the float s4-0))) + ) + ) + ) + (let* ((s4-1 (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) 0.0 'interp)) + (v1-29 (get-point-in-path! (-> this path-r) (new 'stack-no-clear 'vector) 0.0 'interp)) + (a1-15 (vector-! (new 'stack-no-clear 'vector) v1-29 s4-1)) + (s5-3 (vector+float*! (new 'stack-no-clear 'vector) s4-1 a1-15 0.5)) + (v1-31 (vector-normalize-copy! (new 'stack-no-clear 'vector) a1-15 1.0)) + ) + (vector-cross! v1-31 v1-31 *up-vector*) + (set! (-> this dividing-wall pos quad) (-> s5-3 quad)) + (set! (-> this dividing-wall dir quad) (-> v1-31 quad)) + (vector+float*! (the-as vector (-> this plane)) s5-3 v1-31 12288.0) + (set! (-> this plane 0 dir quad) (-> v1-31 quad)) + (vector-float*! v1-31 v1-31 -1.0) + (vector+float*! (the-as vector (-> this plane 1)) s5-3 v1-31 12288.0) + (set! (-> this plane 1 dir quad) (-> v1-31 quad)) + ) + (set! (-> this wall-xz) + (vector-vector-distance + (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) 0.0 'interp) + (get-point-in-path! (-> this path-r) (new 'stack-no-clear 'vector) 0.0 'interp) + ) + ) + (set! (-> this wall-xz) (* 0.5 (-> this wall-xz))) + (+! (-> this wall-xz) 4096.0) + (set! (-> this wall-y) + (fabs + (- (-> (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) (get-num-segments (-> this path)) 'interp) + y + ) + (-> (get-point-in-path! (-> this path) (new 'stack-no-clear 'vector) 0.0 'interp) y) + ) + ) + ) + (+! (-> this wall-y) 4096.0) + (set! (-> this quality-enabled?) #t) + (set! (-> this lightning-quality) 1.0) + (set! (-> this sound) + (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)) + (set! (-> this on-shutdown) (res-lump-struct (-> this entity) 'on-shutdown pair)) + (set! (-> this on-trigger) (res-lump-struct (-> this entity) 'on-trigger pair)) + (elec-gate-method-25 this) + (elec-gate-method-26 this) + (go-initial-state this) + ) + +;; definition of type sewer-elec-gate +(deftype sewer-elec-gate (elec-gate) + ((gate-index int32) + ) + ) + +;; definition for method 3 of type sewer-elec-gate +(defmethod inspect ((this sewer-elec-gate)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type elec-gate inspect))) + (t9-0 this) + ) + (format #t "~2Tgate-index: ~D~%" (-> this gate-index)) + (label cfg-4) + this + ) + +;; definition for method 29 of type sewer-elec-gate +;; WARN: Return type mismatch int vs none. +(defmethod set-elec-scale! ((this sewer-elec-gate) (arg0 float)) + (set-sewh-electricity-scale! arg0 (-> this gate-index)) + (if (zero? (-> this gate-index)) + (set-sewg-electricity-scale! arg0 (-> this gate-index)) + ) + 0 + (none) + ) + +;; definition for method 11 of type sewer-elec-gate +(defmethod init-from-entity! ((this sewer-elec-gate) (arg0 entity-actor)) + (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 0000000000..21703fa96d --- /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 0000000000..98f972784f --- /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 0000000000..90c901fcf6 --- /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 'bounding-box)) + ) + (set! (-> a1-1 min quad) (-> self entity extra trans quad)) + (set! (-> a1-1 min 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 0000000000..e89d0e87c6 --- /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 0000000000..0ad27a0cb7 --- /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 0000000000..e18aa4ea40 --- /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/grunt_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/grunt_REF.gc new file mode 100644 index 0000000000..180b8cd0f4 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/enemy/grunt_REF.gc @@ -0,0 +1,2024 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-grunt grunt grunt-lod0-jg -1 + ((grunt-lod0-mg (meters 20)) (grunt-lod1-mg (meters 40)) (grunt-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :shadow grunt-shadow-mg + :origin-joint-index 18 + ) + +;; definition of type grunt-anim-info +(deftype grunt-anim-info (structure) + ((anim-index int32) + (travel-speed meters) + ) + :pack-me + ) + +;; definition for method 3 of type grunt-anim-info +(defmethod inspect ((this grunt-anim-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'grunt-anim-info) + (format #t "~1Tanim-index: ~D~%" (-> this anim-index)) + (format #t "~1Ttravel-speed: (meters ~m)~%" (-> this travel-speed)) + (label cfg-4) + this + ) + +;; definition of type grunt-global-info +(deftype grunt-global-info (basic) + ((patrol-anim grunt-anim-info 4 :inline) + (charge-anim grunt-anim-info 3 :inline) + (attack-anim grunt-anim-info 2 :inline) + ) + ) + +;; definition for method 3 of type grunt-global-info +(defmethod inspect ((this grunt-global-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tpatrol-anim[4] @ #x~X~%" (-> this patrol-anim)) + (format #t "~1Tcharge-anim[3] @ #x~X~%" (-> this charge-anim)) + (format #t "~1Tattack-anim[2] @ #x~X~%" (-> this attack-anim)) + (label cfg-4) + this + ) + +;; definition of type grunt +(deftype grunt (nav-enemy) + ((patrol-anim grunt-anim-info) + (charge-anim grunt-anim-info) + (attack-anim grunt-anim-info) + (intro-path path-control) + (use-charge-anim-index int8 :offset 640) + (jumping-ambush-path-pt int8) + (grunt-flags grunt-flags) + (state-timeout2 time-frame) + (next-warn-time time-frame) + (dest vector :inline) + (minimap connection-minimap :offset 704) + ) + (:state-methods + attack + falling-ambush + jumping-ambush + jumping-ambush-cont + wait-for-focus + spin-attack + ) + (:methods + (grunt-method-196 (_type_ float) process-focusable) + (get-enemy-info (_type_) nav-enemy-info) + ) + ) + +;; definition for method 3 of type grunt +(defmethod inspect ((this grunt)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tpatrol-anim: #~%" (-> this patrol-anim)) + (format #t "~2Tcharge-anim: #~%" (-> this charge-anim)) + (format #t "~2Tattack-anim: #~%" (-> this attack-anim)) + (format #t "~2Tintro-path: ~A~%" (-> this intro-path)) + (format #t "~2Tcircle-radial-dist: ~f~%" (-> this desired-angle)) + (format #t "~2Tuse-charge-anim-index: ~D~%" (-> this use-charge-anim-index)) + (format #t "~2Tjumping-ambush-path-pt: ~D~%" (-> this jumping-ambush-path-pt)) + (format #t "~2Tgrunt-flags: ~D~%" (-> this grunt-flags)) + (format #t "~2Tstate-timeout2: ~D~%" (-> this state-timeout2)) + (format #t "~2Tnext-warn-time: ~D~%" (-> this next-warn-time)) + (format #t "~2Tdest: #~%" (-> this dest)) + (format #t "~2Tfocus-pos: #~%" (-> this focus-pos)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (label cfg-4) + this + ) + +;; definition for symbol *grunt-global-info*, type grunt-global-info +(define *grunt-global-info* (new 'static 'grunt-global-info + :patrol-anim (new 'static 'inline-array grunt-anim-info 4 + (new 'static 'grunt-anim-info :anim-index 11 :travel-speed (meters 4)) + (new 'static 'grunt-anim-info :anim-index 12 :travel-speed (meters 7)) + (new 'static 'grunt-anim-info :anim-index 14 :travel-speed (meters 7)) + (new 'static 'grunt-anim-info :anim-index 15 :travel-speed (meters 7)) + ) + :charge-anim (new 'static 'inline-array grunt-anim-info 3 + (new 'static 'grunt-anim-info :anim-index 14 :travel-speed (meters 7)) + (new 'static 'grunt-anim-info :anim-index 15 :travel-speed (meters 7)) + (new 'static 'grunt-anim-info :anim-index 16 :travel-speed (meters 7)) + ) + :attack-anim (new 'static 'inline-array grunt-anim-info 2 + (new 'static 'grunt-anim-info :anim-index 17 :travel-speed (meters 12)) + (new 'static 'grunt-anim-info :anim-index 18 :travel-speed (meters 12)) + ) + ) + ) + +;; definition for symbol *grunt-nav-enemy-info*, type nav-enemy-info +(define *grunt-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 36 + (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 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 #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 30 + :param1 #x69 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 60) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 1 + :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 #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 30 + :param1 #x69 + :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 30 + :param1 #x69 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #xa + :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 push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 1 + :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 #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 30 + :param1 #x69 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #xa + :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 push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 1 + :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 #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 30 + :param1 #x69 + :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 30 + :param1 #x69 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #xa + :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 push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 1 + :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 #x14 + :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 push) :param0 60) + (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 13 + :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 22 + :jump-in-air-anim 23 + :jump-land-anim 24 + :neck-joint 5 + :look-at-joint 6 + :bullseye-joint 18 + :sound-hit (static-sound-name "grunt-hit") + :sound-die (static-sound-name "grunt-die") + :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.5) + :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.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 73728.0 + :knocked-red-vy-hi 114688.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 10625.897) + :scale (new 'static 'vector :x 0.6399 :y 0.6399 :z 0.6399) + :bg-collide-with (collide-spec backgnd crate 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 :w 1170.3455) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 2268.7744 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 4000.9365) + :geo-tform (new 'static 'vector :x 1.0 :w 12817.95) + :axial-slop 2169.078 + :max-angle 2296.8184 + :coll-rad 2867.2 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 10540.374) + :geo-tform (new 'static 'vector :x -1.0 :w 12551.108) + :axial-slop 2169.078 + :max-angle 2226.3489 + :coll-rad 2209.3823 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 13046.233) + :geo-tform (new 'static 'vector :x 1.0 :w 18078.088) + :axial-slop 2169.078 + :max-angle 3210.7178 + :coll-rad 1644.544 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 16901.771) + :geo-tform (new 'static 'vector :x 1.0 :w 359.3193) + :axial-slop 2169.078 + :max-angle 2605.129 + :coll-rad 1722.368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.4178 :z -0.9083 :w 11487.004) + :geo-tform (new 'static 'vector :x -0.5907 :y -0.4565 :z 0.665 :w 25388.248) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1641.6768 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1565 :z -0.9875 :w 12747.589) + :geo-tform (new 'static 'vector :x -0.0123 :y 0.7268 :z 0.6864 :w 28823.824) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1295.1552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.938 :z 0.3463 :w 15464.585) + :geo-tform (new 'static 'vector :x 0.0404 :y 0.9991 :z 0.0016 :w 26660.428) + :axial-slop 2169.078 + :max-angle 2671.921 + :coll-rad 1899.3152 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.938 :z 0.346 :w 14.381512) + :geo-tform (new 'static 'vector :x 0.5827 :y 0.8005 :z 0.1389 :w 27752.074) + :axial-slop 2169.078 + :max-angle 2077.3455 + :coll-rad 1787.904 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.418 :z 0.9082 :w 11484.565) + :geo-tform (new 'static 'vector :x 0.5908 :y -0.4564 :z 0.665 :w 40148.812) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1563.8528 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1563 :z 0.9875 :w 12751.085) + :geo-tform (new 'static 'vector :x 0.0122 :y 0.7266 :z 0.6866 :w 36713.688) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1127.6288 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.938 :z -0.3461 :w 15469.664) + :geo-tform (new 'static 'vector :x -0.0404 :y 0.9991 :z 0.0015 :w 38877.887) + :axial-slop 2169.078 + :max-angle 2330.5876 + :coll-rad 1610.1376 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9377 :z -0.3468 :w 16.074524) + :geo-tform (new 'static 'vector :x -0.2371 :y 0.2169 :z -0.9468 :w 20556.623) + :axial-slop 2169.078 + :max-angle 1879.882 + :coll-rad 1629.3888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 1.0 :w 42847.234) + :geo-tform (new 'static 'vector :x -1.0 :w 16468.232) + :axial-slop 2169.078 + :max-angle 2508.973 + :coll-rad 1812.0704 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 3567.2522) + :geo-tform (new 'static 'vector :x 1.0 :w 42973.14) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1858.3552 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.2349 :z -0.9718 :w 18020.252) + :geo-tform (new 'static 'vector :x 0.3808 :y 0.3151 :z 0.8691 :w 29486.395) + :axial-slop 2169.078 + :max-angle 3698.87 + :coll-rad 877.3632 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9998 :z 0.0086 :w 4412.9214) + :geo-tform (new 'static 'vector :x 0.3995 :y -0.4805 :z 0.7804 :w 25729.781) + :axial-slop 2169.078 + :max-angle 3691.5154 + :coll-rad 1524.9408 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7835 :z 0.621 :w 14960.958) + :geo-tform (new 'static 'vector :x 0.2887 :y 0.6587 :z 0.6945 :w 40555.97) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1127.6288 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7644 :z -0.6445 :w 17272.176) + :geo-tform (new 'static 'vector :x 0.5513 :y 0.3614 :z 0.7516 :w 33063.24) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1127.6288 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9734 :z 0.2283 :w 7149.304) + :geo-tform (new 'static 'vector :x -0.7224 :y -0.6901 :z -0.0373 :w 15253.522) + :axial-slop 2169.078 + :max-angle 1294.1176 + :coll-rad 659.456 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint 22 + :pre-tform (new 'static 'vector :x 0.4934 :z 0.8696 :w 6514.1875) + :geo-tform (new 'static 'vector :x -0.0332 :y 0.8825 :z 0.4687 :w 37613.457) + :axial-slop 2169.078 + :max-angle 1411.5544 + :coll-rad 605.3888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint 18 + :pre-tform (new 'static 'vector :x -1.0 :w 9863.842) + :geo-tform (new 'static 'vector :x -1.0 :w 12698.965) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1488.0768 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -1.0 :w 1462.5452) + :geo-tform (new 'static 'vector :x 0.9995 :y -0.0161 :z -0.0185 :w 7921.737) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1285.7344 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9958 :z -0.09 :w 1956.7229) + :geo-tform (new 'static 'vector :x 0.9998 :y 0.0041 :z 0.0071 :w 33050.805) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1801.8304 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :z 0.0159 :w 6114.891) + :geo-tform (new 'static 'vector :x 0.9998 :y -0.0127 :z 0.0043 :w 8018.73) + :axial-slop 2169.078 + :max-angle 2497.213 + :coll-rad 794.2144 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :z 0.0159 :w 6305.8555) + :geo-tform (new 'static 'vector :x 0.9998 :y -0.0172 :z 0.0018 :w 6908.7324) + :axial-slop 2169.078 + :max-angle 1846.1127 + :coll-rad 556.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :z 0.0159 :w 6830.7266) + :geo-tform (new 'static 'vector :x 0.9993 :y -0.0365 :z -0.006 :w 3790.2383) + :axial-slop 2169.078 + :max-angle 1491.563 + :coll-rad 542.3104 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint 18 + :pre-tform (new 'static 'vector :x -0.2352 :z 0.9718 :w 18022.729) + :geo-tform (new 'static 'vector :x -0.3537 :y 0.3542 :z 0.8654 :w 34566.508) + :axial-slop 2169.078 + :max-angle 3739.2292 + :coll-rad 1540.096 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8967 :z -0.4423 :w 5274.7744) + :geo-tform (new 'static 'vector :x -0.0105 :y 0.862 :z -0.5065 :w 24694.367) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1127.6288 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8194 :z -0.573 :w 13110.112) + :geo-tform (new 'static 'vector :x -0.2576 :y 0.7211 :z 0.6428 :w 24504.475) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1751.4496 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8027 :z 0.596 :w 15135.011) + :geo-tform (new 'static 'vector :x -0.5895 :y 0.2007 :z 0.7821 :w 36329.734) + :axial-slop 2169.078 + :max-angle 3682.7046 + :coll-rad 1127.6288 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8262 :z 0.5632 :w 7707.525) + :geo-tform (new 'static 'vector :x -0.6943 :y 0.7184 :z -0.0381 :w 14762.858) + :axial-slop 2169.078 + :max-angle 2015.6871 + :coll-rad 573.0304 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 36 + :parent-joint 34 + :pre-tform (new 'static 'vector :x 0.9975 :z -0.0684 :w 3277.692) + :geo-tform (new 'static 'vector :x -0.2795 :y 0.7979 :z 0.5336 :w 35258.77) + :axial-slop 2169.078 + :max-angle 1851.9927 + :coll-rad 468.992 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 37 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.5769 :z -0.8166 :w 8297.695) + :geo-tform (new 'static 'vector :x -0.6954 :y -0.0651 :z 0.7153 :w 9511.8955) + :axial-slop 2169.078 + :max-angle 2863.5044 + :coll-rad 1868.5952 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 38 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.5774 :z 0.8162 :w 8293.489) + :geo-tform (new 'static 'vector :x 0.948 :y -0.2986 :z 0.1083 :w 34953.68) + :axial-slop 2169.078 + :max-angle 2569.885 + :coll-rad 1893.9904 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 39 + :parent-joint 12 + :pre-tform (new 'static 'vector :x 0.3449 :z -0.9384 :w 16372.404) + :geo-tform (new 'static 'vector :x 0.088 :y -0.8342 :z 0.5442 :w 20057.604) + :axial-slop 2169.078 + :max-angle 3185.0312 + :coll-rad 1327.9232 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 40 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.6081 :z 0.7936 :w 10429.526) + :geo-tform (new 'static 'vector :x 0.213 :y -0.975 :z -0.061 :w 19499.654) + :axial-slop 2169.078 + :max-angle 2031.8344 + :coll-rad 423.1168 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 41 + :parent-joint 12 + :pre-tform (new 'static 'vector :x 0.9512 :z -0.3084 :w 2006.2573) + :geo-tform (new 'static 'vector :x -0.0464 :y 0.9956 :z 0.0799 :w 26746.152) + :axial-slop 2169.078 + :max-angle 2505.2957 + :coll-rad 533.7088 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 42 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7105 :z 0.7034 :w 3017.6597) + :geo-tform (new 'static 'vector :x 0.0381 :y 0.9847 :z -0.1692 :w 26846.422) + :axial-slop 2169.078 + :max-angle 2064.8572 + :coll-rad 408.3712 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 43 + :parent-joint 10 + :pre-tform (new 'static 'vector :x 0.9371 :z 0.3486 :w 15668.893) + :geo-tform (new 'static 'vector :x -0.2897 :y 0.1004 :z 0.9516 :w 31568.328) + :axial-slop 2169.078 + :max-angle 2784.2424 + :coll-rad 1593.7535 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 44 + :parent-joint 16 + :pre-tform (new 'static 'vector :x 0.3452 :z 0.9383 :w 16373.424) + :geo-tform (new 'static 'vector :x 0.1347 :y 0.823 :z -0.5515 :w 19233.342) + :axial-slop 2169.078 + :max-angle 2773.2288 + :coll-rad 1373.3888 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 45 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.4593 :z -0.888 :w 10428.289) + :geo-tform (new 'static 'vector :x 0.1971 :y 0.977 :z 0.079 :w 17810.5) + :axial-slop 2169.078 + :max-angle 1984.8488 + :coll-rad 616.448 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 46 + :parent-joint 16 + :pre-tform (new 'static 'vector :x 0.9998 :z -0.0063 :w 3668.4868) + :geo-tform (new 'static 'vector :x 0.0529 :y 0.9969 :z 0.056 :w 38759.062) + :axial-slop 2169.078 + :max-angle 1981.1897 + :coll-rad 1127.6288 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 47 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7207 :z -0.6929 :w 3011.8708) + :geo-tform (new 'static 'vector :x -0.0298 :y 0.9808 :z -0.1918 :w 38536.098) + :axial-slop 2169.078 + :max-angle 2276.2654 + :coll-rad 534.528 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 48 + :parent-joint 14 + :pre-tform (new 'static 'vector :x 0.9375 :z -0.3477 :w 15673.973) + :geo-tform (new 'static 'vector :x 0.2894 :y 0.1005 :z 0.9517 :w 33957.168) + :axial-slop 2169.078 + :max-angle 2685.1372 + :coll-rad 1853.0304 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 49 + :parent-joint 22 + :pre-tform (new 'static 'vector :x -0.9829 :z 0.1831 :w 2492.6619) + :geo-tform (new 'static 'vector :x 0.5546 :y 0.2592 :z 0.7904 :w 34067.453) + :axial-slop 2169.078 + :max-angle 1536.3458 + :coll-rad 525.9264 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 50 + :parent-joint 34 + :pre-tform (new 'static 'vector :x -0.275 :z 0.9613 :w 5964.5225) + :geo-tform (new 'static 'vector :x -0.5191 :y 0.2888 :z 0.8042 :w 30864.797) + :axial-slop 2169.078 + :max-angle 1445.3237 + :coll-rad 382.5664 + ) + ) + ) + :shadow-size (meters 2) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint 6 + :gem-seg #x2 + :gem-no-seg #x4 + :gem-offset (new 'static 'sphere :y 614.4 :z -3276.8 :r 327680.0) + :knocked-off #t + :callback-info #f + :use-momentum #t + :use-frustration #t + :use-stop-chase #t + :use-circling #t + :use-pacing #t + :walk-anim 11 + :turn-anim -1 + :run-anim 14 + :taunt-anim 19 + :run-travel-speed (meters 7) + :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! (-> *grunt-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; definition for method 82 of type grunt +(defmethod event-handler ((this grunt) (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) + (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-31 (-> this next-state name))) + (or (= v1-31 'knocked) (= v1-31 'jump) (= v1-31 '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 74 of type grunt +(defmethod go-ambush-delay ((this grunt)) + (cond + ((logtest? (-> this fact enemy-options) (enemy-option user10)) + (go (method-of-object this falling-ambush)) + ) + ((logtest? (-> this fact enemy-options) (enemy-option user11)) + (go (method-of-object this jumping-ambush)) + ) + (else + (format 0 "ERROR: ~A doesn't specify which ambush behavior to use.~%" (-> this name)) + (go-hostile this) + ) + ) + ) + +;; failed to figure out what this is: +(defstate falling-ambush (grunt) + :virtual #t + :event enemy-event-handler + :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* ((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) + ) + ) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (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) + ) + (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 + ) + :exit (behavior () + (let ((v1-1 (-> self root root-prim))) + (set! (-> v1-1 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-1 prim-core collide-with) (-> self root backup-collide-with)) + ) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.2)) + (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 "grunt-notice") + (ja-channel-push! 1 0) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info notice-anim)) + :num! (seek! max 1.8) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.8)) + ) + (until (logtest? (-> self root status) (collide-status on-ground touch-surface touch-wall)) + (suspend) + ) + (go-virtual hostile) + ) + :post nav-enemy-falling-post + ) + +;; definition for method 102 of type grunt +(defmethod go-directed2 ((this grunt)) + (case (-> this jump-why) + ((2) + (go (method-of-object this jumping-ambush-cont)) + ) + (else + ((method-of-type nav-enemy go-directed2) this) + ) + ) + ) + +;; failed to figure out what this is: +(defstate jumping-ambush (grunt) + :virtual #t + :event enemy-event-handler + :enter (behavior () + ((-> (method-of-type nav-enemy ambush) enter)) + (when (zero? (-> self intro-path)) + (format 0 "ERROR: ~A has no intro path, skipping jumping-ambush~%" (-> self name)) + (go-virtual notice) + ) + (get-point-in-path! (-> self intro-path) (-> self root trans) 0.0 'interp) + ) + :code (behavior () + (set! (-> self jumping-ambush-path-pt) 1) + (until #f + (let ((gp-0 (new 'stack-no-clear 'vector))) + (get-point-in-path! (-> self intro-path) gp-0 1.0 'interp) + (set! (-> self enemy-flags) + (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked))) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (let ((v1-5 (process->ppointer self))) + (set! (-> a1-1 from) v1-5) + ) + (set! (-> a1-1 num-params) 2) + (set! (-> a1-1 message) 'jump) + (set! (-> a1-1 param 0) (the-as uint 2)) + (set! (-> a1-1 param 1) (the-as uint gp-0)) + (send-event-function self a1-1) + ) + ) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate jumping-ambush-cont (grunt) + :virtual #t + :event enemy-event-handler + :code (behavior () + (let ((a0-0 (-> self intro-path)) + (v1-1 (+ (-> self jumping-ambush-path-pt) 1)) + ) + (if (< v1-1 (-> a0-0 curve num-cverts)) + (set! (-> self jumping-ambush-path-pt) v1-1) + (go-best-state self) + ) + ) + (until #f + (let ((gp-0 (new 'stack-no-clear 'vector))) + (get-point-in-path! (-> self intro-path) gp-0 (the float (-> self jumping-ambush-path-pt)) 'interp) + (set! (-> self enemy-flags) + (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked))) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (let ((v1-9 (process->ppointer self))) + (set! (-> a1-1 from) v1-9) + ) + (set! (-> a1-1 num-params) 2) + (set! (-> a1-1 message) 'jump) + (set! (-> a1-1 param 0) (the-as uint 2)) + (set! (-> a1-1 param 1) (the-as uint gp-0)) + (send-event-function self a1-1) + ) + ) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate active (grunt) + :virtual #t + :code (behavior () + (let ((v1-2 (ja-group))) + (when (or (and v1-2 (or (= v1-2 grunt-charge0-ja) (= v1-2 grunt-charge1-ja) (= v1-2 grunt-charge2-ja))) + (let ((v1-8 (ja-group))) + (and v1-8 + (or (= v1-8 grunt-patrol0-ja) (= v1-8 grunt-patrol1-ja) (= v1-8 grunt-charge0-ja) (= v1-8 grunt-charge1-ja)) + ) + ) + ) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (until #f + (set! (-> self patrol-anim) (-> *grunt-global-info* patrol-anim (rnd-int self 4))) + (let ((v1-28 (-> self nav))) + (set! (-> v1-28 target-speed) (-> self patrol-anim travel-speed)) + ) + 0 + (let ((gp-0 (-> self draw art-group data (-> self patrol-anim anim-index))) + (s5-0 (set-reaction-time! self 1 (seconds 0.027))) + ) + (let ((v1-37 (ja-group))) + (if (not (and v1-37 (= v1-37 gp-0))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (dotimes (s4-0 s5-0) + (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)) + ) + ) + ) + (when (nonzero? (-> self patrol-anim anim-index)) + (ja-no-eval :num! (loop!)) + (ja-channel-push! 1 (seconds 0.2)) + (set! (-> self patrol-anim) (the-as grunt-anim-info (-> *grunt-global-info* patrol-anim))) + (let ((v1-67 (-> self nav))) + (set! (-> v1-67 target-speed) (-> self patrol-anim travel-speed)) + ) + 0 + (let ((gp-1 (-> self draw art-group data (-> self patrol-anim anim-index))) + (s5-1 (set-reaction-time! self (seconds 0.007) (seconds 0.017))) + ) + (ja-no-eval :group! gp-1 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (ja-blend-eval) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (dotimes (s4-1 s5-1) + (ja-no-eval :group! gp-1 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + ) + (when (zero? (rnd-int self 3)) + (let ((v1-107 self)) + (set! (-> v1-107 enemy-flags) (the-as enemy-flag (logclear (-> v1-107 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-107 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (ja-channel-push! 1 (seconds 0.3)) + (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)) + ) + (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-171 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-171 enemy-flags))) + (set! (-> v1-171 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-171 enemy-flags)))) + ) + (set! (-> v1-171 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-171 enemy-flags)))) + (set! (-> v1-171 nav callback-info) (-> v1-171 enemy-info callback-info)) + ) + 0 + ) + ) + ) + #f + ) + ) + +;; definition for method 196 of type grunt +(defmethod grunt-method-196 ((this grunt) (arg0 float)) + (local-vars (v1-5 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (get-focus! this))) + (when gp-0 + (let ((v1-3 (get-trans gp-0 0)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (vector-! s4-0 v1-3 (-> this root trans)) + (.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-5 vf1) + (let* ((f30-0 v1-5) + (f0-0 arg0) + (f28-0 (* f0-0 f0-0)) + (f0-2 12288.0) + ) + (when (or (>= (* f0-2 f0-2) f30-0) (>= f28-0 f30-0)) + (let ((f26-0 (quaternion-y-angle (-> this root quat))) + (f0-7 (atan (-> s4-0 x) (-> s4-0 z))) + (f1-0 1228.8) + ) + (cond + ((and (< (* f1-0 f1-0) f30-0) (>= f28-0 f30-0) (>= 8192.0 (fabs (deg- f26-0 f0-7)))) + (go (method-of-object this attack)) + ) + ((let ((f0-10 12288.0)) + (< f30-0 (* f0-10 f0-10)) + ) + (go (method-of-object this spin-attack)) + ) + ) + ) + ) + ) + ) + ) + gp-0 + ) + ) + ) + +;; failed to figure out what this is: +(defstate hostile (grunt) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (let ((a0-1 (grunt-method-196 self 13312.0)) + (gp-0 (current-time)) + ) + (when (and (>= gp-0 (-> self next-warn-time)) + (not (logtest? (-> self draw status) (draw-control-status on-screen))) + ) + (when (and a0-1 (let ((f0-0 65536.0)) + (>= (* f0-0 f0-0) (vector-vector-xz-distance-squared (get-trans a0-1 0) (-> self root trans))) + ) + ) + (sound-play "grunt-warn") + (set! (-> self next-warn-time) (+ gp-0 (set-reaction-time! self (seconds 1) (seconds 1.2)))) + ) + ) + ) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (when (and v1-2 (or (= v1-2 grunt-charge0-ja) (= v1-2 grunt-charge1-ja) (= v1-2 grunt-charge2-ja))) + (let ((v1-6 (-> self nav))) + (set! (-> v1-6 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (let ((v1-19 (-> self use-charge-anim-index))) + (cond + ((>= v1-19 0) + (set! (-> self charge-anim) (-> *grunt-global-info* charge-anim v1-19)) + (set! (-> self use-charge-anim-index) -1) + ) + (else + (set! (-> self charge-anim) (-> *grunt-global-info* charge-anim (rnd-int self 3))) + ) + ) + ) + (until #f + (grunt-method-196 self 22528.0) + (let ((gp-0 (-> self draw art-group data (-> self charge-anim anim-index)))) + (let ((v1-37 (ja-group))) + (when (not (and v1-37 (= v1-37 gp-0))) + (ja-channel-push! 1 (seconds 0.1)) + (let ((v1-41 (-> self nav))) + (set! (-> v1-41 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + ) + ) + (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)) + ) + ) + ) + #f + ) + :post nav-enemy-chase-post + ) + +;; failed to figure out what this is: +(defstate attack (grunt) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((v1-1 (-> self nav state))) + (set! (-> v1-1 speed) (-> self enemy-info run-travel-speed)) + ) + 0 + (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-10 *game-info*) + (v0-1 (+ (-> v1-10 attack-id) 1)) + ) + (set! (-> v1-10 attack-id) v0-1) + (set! (-> self attack-id) v0-1) + ) + ) + :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)) + ) + ) + :trans (behavior () + (reset-penetrate! self) + (when (logtest? (-> self enemy-flags) (enemy-flag victory)) + (logclear! (-> self enemy-flags) (enemy-flag victory)) + (sound-play "grunt-hit") + ) + ) + :code (behavior () + (set! (-> self attack-anim) (-> *grunt-global-info* attack-anim (rnd-int self 2))) + (let ((v1-5 (-> self nav))) + (set! (-> v1-5 target-speed) (-> self attack-anim travel-speed)) + ) + 0 + (let ((v1-7 (-> self nav))) + (set! (-> v1-7 turning-acceleration) 49152.0) + ) + 0 + (let ((gp-0 (-> self draw art-group data (-> self attack-anim anim-index))) + (f30-0 (rnd-float-range self 0.9 1.1)) + ) + (let ((v1-17 (ja-group))) + (if (not (and v1-17 (= v1-17 gp-0))) + (ja-channel-push! 1 (seconds 0.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)) + ) + ) + (let ((v1-36 (-> self nav))) + (set! (-> v1-36 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + (let ((v1-38 (-> self nav))) + (set! (-> v1-38 turning-acceleration) (-> self enemy-info run-turning-acceleration)) + ) + 0 + (let ((gp-1 (-> self draw art-group data (-> self charge-anim anim-index)))) + (ja-channel-push! 1 (seconds 0.1)) + (set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim gp-1)) + ) + (ja :num-func num-func-identity :frame-num (ja-aframe 3.0 0)) + (let ((gp-3 (-> self focus aware))) + (if (or (not (get-focus! self)) (!= gp-3 3)) + (go-stare self) + ) + ) + (let ((v1-57 0)) + (let ((a0-22 (the-as object (-> *grunt-global-info* charge-anim))) + (a1-7 (-> self charge-anim)) + ) + (dotimes (a2-3 3) + (when (= a0-22 a1-7) + (set! v1-57 a2-3) + (goto cfg-21) + ) + (set! a0-22 (-> (the-as grunt-global-info a0-22) patrol-anim 1)) + ) + ) + (label cfg-21) + (set! (-> self use-charge-anim-index) v1-57) + ) + (go-virtual hostile) + ) + :post nav-enemy-chase-post + ) + +;; failed to figure out what this is: +(defstate spin-attack (grunt) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (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 + (let ((gp-0 (handle->process (-> self focus handle)))) + (if (not gp-0) + (go-stare self) + ) + (set! (-> self focus-pos quad) (-> (get-trans (the-as process-focusable gp-0) 0) quad)) + ) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-21 *game-info*) + (v0-3 (+ (-> v1-21 attack-id) 1)) + ) + (set! (-> v1-21 attack-id) v0-3) + (set! (-> self attack-id) v0-3) + ) + ) + :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)) + ) + ) + :trans (behavior () + (when (logtest? (-> self enemy-flags) (enemy-flag victory)) + (logclear! (-> self enemy-flags) (enemy-flag victory)) + (sound-play "grunt-hit") + ) + ) + :code (behavior () + (set! (-> self attack-anim) (-> *grunt-global-info* attack-anim (rnd-int self 2))) + (let ((gp-0 (-> self draw art-group data (-> self attack-anim anim-index))) + (f30-0 (rnd-float-range self 0.9 1.1)) + ) + (let ((v1-13 (ja-group))) + (if (not (and v1-13 (= v1-13 gp-0))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (ja-no-eval :group! gp-0 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (let ((a0-9 (handle->process (-> self focus handle)))) + (if a0-9 + (set! (-> self focus-pos quad) (-> (get-trans (the-as process-focusable a0-9) 0) quad)) + ) + ) + (seek-to-point-toward-point! (-> self root) (-> self focus-pos) 546133.3 (seconds 0.1)) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (let ((gp-3 (-> self focus aware))) + (if (or (not (get-focus! self)) (!= gp-3 3)) + (go-stare self) + ) + ) + (go-virtual hostile) + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate circling (grunt) + :virtual #t + :code (behavior () + (let ((v1-2 (ja-group))) + (when (and v1-2 (or (= v1-2 grunt-charge0-ja) (= v1-2 grunt-charge1-ja) (= v1-2 grunt-charge2-ja))) + (let ((v1-6 (-> self nav))) + (set! (-> v1-6 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (until #f + (set! (-> self charge-anim) (-> *grunt-global-info* charge-anim (rnd-int self 3))) + (let ((v1-22 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-22 enemy-flags))) + (set! (-> v1-22 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-22 enemy-flags)))) + ) + (set! (-> v1-22 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-22 enemy-flags)))) + (set! (-> v1-22 nav callback-info) (-> v1-22 enemy-info callback-info)) + ) + 0 + (let ((v1-25 self)) + (set! (-> v1-25 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-25 enemy-flags)))) + ) + 0 + (let ((v1-27 (-> self nav))) + (set! (-> v1-27 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + (let ((v1-29 (-> self nav))) + (set! (-> v1-29 acceleration) (-> self enemy-info run-acceleration)) + ) + 0 + (let ((v1-31 (-> self nav))) + (set! (-> v1-31 turning-acceleration) (-> self enemy-info run-turning-acceleration)) + ) + 0 + (let ((gp-0 (-> self draw art-group data (-> self charge-anim anim-index)))) + (let ((v1-39 (ja-group))) + (if (not (and v1-39 (= v1-39 gp-0))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (let ((s5-0 (rnd-int self 8)) + (f30-0 (rnd-float-range self 0.9 1.1)) + ) + (while (nonzero? s5-0) + (+! s5-0 -1) + (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)) + ) + ) + ) + ) + (when (< 20480.0 (vector-vector-xz-distance (-> self focus-pos) (-> self root trans))) + (let ((v1-66 self)) + (set! (-> v1-66 enemy-flags) (the-as enemy-flag (logclear (-> v1-66 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-66 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (let ((v1-71 self)) + (set! (-> v1-71 enemy-flags) (the-as enemy-flag (logclear (-> v1-71 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (vector-reset! (-> self root transv)) + (let ((v1-77 (ja-group))) + (if (not (and v1-77 (= v1-77 grunt-celebrate-start-ja))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (let ((f30-2 (rnd-float-range self 0.9 1.1))) + (ja-no-eval :group! grunt-celebrate-start-ja :num! (seek! max f30-2) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-2)) + ) + (ja-no-eval :group! grunt-celebrate-finish-ja :num! (seek! max f30-2) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-2)) + ) + ) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate pacing (grunt) + :virtual #t + :code (behavior () + (let ((v1-2 (ja-group))) + (when (and v1-2 (or (= v1-2 grunt-charge0-ja) (= v1-2 grunt-charge1-ja) (= v1-2 grunt-charge2-ja))) + (let ((v1-6 (-> self nav))) + (set! (-> v1-6 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (set! (-> self patrol-anim) (-> *grunt-global-info* patrol-anim (rnd-int self 4))) + (let ((f30-0 (rnd-float-range self 0.9 1.1)) + (gp-0 (-> self draw art-group data (-> self patrol-anim anim-index))) + ) + (let ((v1-28 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-28 enemy-flags))) + (set! (-> v1-28 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-28 enemy-flags)))) + ) + (set! (-> v1-28 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-28 enemy-flags)))) + (set! (-> v1-28 nav callback-info) (-> v1-28 enemy-info callback-info)) + ) + 0 + (let ((v1-31 self)) + (set! (-> v1-31 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-31 enemy-flags)))) + ) + 0 + (let ((v1-33 (-> self nav))) + (set! (-> v1-33 target-speed) (-> self patrol-anim travel-speed)) + ) + 0 + (let ((v1-35 (-> self nav))) + (set! (-> v1-35 acceleration) (-> self enemy-info walk-acceleration)) + ) + 0 + (let ((v1-37 (-> self nav))) + (set! (-> v1-37 turning-acceleration) (-> self enemy-info walk-turning-acceleration)) + ) + 0 + (let ((v1-41 (ja-group))) + (if (not (and v1-41 (= v1-41 gp-0))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (until #f + (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)) + ) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate stop-chase (grunt) + :virtual #t + :code (behavior () + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (set! (-> self patrol-anim) (-> *grunt-global-info* patrol-anim (rnd-int self 4))) + (let ((v1-14 (-> self nav))) + (set! (-> v1-14 target-speed) (-> self patrol-anim travel-speed)) + ) + 0 + (let ((f30-0 (rnd-float-range self 0.9 1.1)) + (gp-0 (-> self draw art-group data (-> self patrol-anim anim-index))) + ) + (let ((v1-24 (ja-group))) + (if (not (and v1-24 (= v1-24 gp-0))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (until #f + (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)) + ) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate wait-for-focus (grunt) + :virtual #t + :event enemy-event-handler + :enter (-> (method-of-type nav-enemy idle) enter) + :trans (behavior () + (let ((s5-0 (handle->process (-> self focus handle)))) + (when s5-0 + (let ((gp-0 (get-trans (the-as process-focusable s5-0) 0))) + (when (and (or (not (logtest? (-> self enemy-flags) (enemy-flag use-notice-distance))) + (>= 163840.0 (vector-vector-distance (-> self root trans) gp-0)) + ) + (or (not (logtest? (-> self fact enemy-options) (enemy-option user8))) + (and (not (focus-test? (the-as process-focusable s5-0) in-air)) + (>= 4096.0 (fabs (- (-> gp-0 y) (-> self root trans y)))) + ) + ) + ) + (cond + ((and (logtest? (-> self fact enemy-options) (enemy-option user9)) + (logtest? (-> self enemy-flags) (enemy-flag use-notice-distance)) + ) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (vector-! s5-1 gp-0 (-> self root trans)) + (let ((f0-2 32768.0) + (v1-26 s5-1) + ) + (if (or (>= f0-2 (sqrtf (+ (* (-> v1-26 x) (-> v1-26 x)) (* (-> v1-26 z) (-> v1-26 z))))) + (>= 20024.889 (fabs (deg- (y-angle (-> self root)) (atan (-> s5-1 x) (-> s5-1 z))))) + ) + (go-virtual notice) + ) + ) + ) + ) + (else + (go-virtual notice) + ) + ) + ) + ) + ) + ) + ) + :code (-> (method-of-type nav-enemy idle) code) + :post (-> (method-of-type nav-enemy idle) post) + ) + +;; failed to figure out what this is: +(defstate knocked-recover (grunt) + :virtual #t + :code (behavior () + (local-vars (v1-49 object)) + (ja-channel-push! 1 0) + (let ((gp-0 (-> (the-as ragdoll-proc (handle->process (-> self ragdoll-proc))) ragdoll))) + (when gp-0 + (let ((a0-5 (-> gp-0 ragdoll-joints))) + (if (< 0.0 (vector-dot (-> self node-list data (-> a0-5 0 joint-index) bone transform fvec) *y-vector*)) + (ja-no-eval :group! grunt-getup-front-ja :num! (seek!) :frame-num 0.0) + (ja-no-eval :group! grunt-getup-back-ja :num! (seek!) :frame-num 0.0) + ) + ) + (enable-ragdoll! gp-0 self) + ) + ) + (until v1-49 + (suspend) + (ja :num! (seek!)) + (set! v1-49 (and (ja-done? 0) (let ((a0-15 (handle->process (-> self ragdoll-proc)))) + (or (not a0-15) (ragdoll-proc-method-19 (the-as ragdoll-proc a0-15))) + ) + ) + ) + ) + (if (enemy-method-109 self) + (go-die self) + (go-hostile self) + ) + ) + ) + +;; definition for method 125 of type grunt +(defmethod ragdoll-settled? ((this grunt)) + (let ((t9-0 (method-of-type nav-enemy ragdoll-settled?))) + (and (t9-0 this) (or (= (-> this root gspot-pos y) -40959590.0) + (< (- (-> this root trans y) (-> this root gspot-pos y)) 4096.0) + ) + ) + ) + ) + +;; definition for method 143 of type grunt +(defmethod on-dying ((this grunt)) + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + (call-parent-method this) + (none) + ) + +;; definition for method 7 of type grunt +;; WARN: Return type mismatch nav-enemy vs grunt. +(defmethod relocate ((this grunt) (offset int)) + (if (nonzero? (-> this intro-path)) + (&+! (-> this intro-path) offset) + ) + (the-as grunt ((method-of-type nav-enemy relocate) this offset)) + ) + +;; definition for method 120 of type grunt +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this grunt)) + (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-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-with) (collide-spec backgnd crate obstacle hit-by-others-list)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set-vector! (-> v1-15 local-sphere) 0.0 9830.4 0.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 collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-17 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-17 transform-index) 4) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 4915.2) + ) + (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 semi-solid deadly)) + (set! (-> v1-19 transform-index) 18) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 2252.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 jak bot player-list)) + (set! (-> v1-21 prim-core action) (collide-action deadly)) + (set! (-> v1-21 transform-index) 16) + (set-vector! (-> v1-21 local-sphere) 0.0 0.0 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 collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-23 prim-core action) (collide-action deadly)) + (set! (-> v1-23 transform-index) 12) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 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 collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-25 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-25 transform-index) 6) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (let ((v1-27 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-27 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-27 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 197 of type grunt +(defmethod get-enemy-info ((this grunt)) + *grunt-nav-enemy-info* + ) + +;; definition for method 67 of type grunt +(defmethod coin-flip? ((this grunt)) + #f + ) + +;; definition for method 121 of type grunt +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this grunt)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-grunt" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this (get-enemy-info this)) + (let ((v1-6 (-> this neck))) + (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-vector! (-> v1-6 twist-max) 11832.889 11832.889 0.0 1.0) + (set! (-> v1-6 ignore-angle) 30947.555) + ) + (let ((v1-8 (-> this nav))) + (set! (-> v1-8 speed-scale) 1.0) + ) + 0 + (set-gravity-length (-> this root dynam) 573440.0) + (let ((s5-2 *grunt-global-info*)) + (set! (-> this patrol-anim) (-> s5-2 patrol-anim (rnd-int this 4))) + (set! (-> this charge-anim) (-> s5-2 charge-anim (rnd-int this 3))) + (set! (-> this attack-anim) (-> s5-2 attack-anim (rnd-int this 2))) + ) + (set! (-> this use-charge-anim-index) -1) + (if (zero? (rnd-int this 2)) + (logior! (-> this grunt-flags) (grunt-flags gf0)) + ) + (if (zero? (rnd-int this 2)) + (logior! (-> this grunt-flags) (grunt-flags gf2)) + ) + (set! (-> this intro-path) (new 'process 'path-control this 'intro 0.0 (the-as entity #f) #t)) + (add-connection + *part-engine* + this + 6 + this + 468 + (new 'static 'vector :x 1433.6 :y 2785.28 :z -1761.28 :w 163840.0) + ) + (add-connection + *part-engine* + this + 6 + this + 468 + (new 'static 'vector :x -1433.6 :y 2785.28 :z -1761.28 :w 163840.0) + ) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 108) (the-as int #f) (the-as vector #t) 0)) + 0 + (none) + ) + +;; definition for method 122 of type grunt +;; WARN: Return type mismatch int vs object. +(defmethod go-idle2 ((this grunt)) + (if (logtest? (-> this fact enemy-options) (enemy-option user9)) + (go (method-of-object this wait-for-focus)) + (go (method-of-object this idle)) + ) + 0 + ) 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 0000000000..e18dc09010 --- /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 0000000000..76e32d4505 --- /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 0000000000..16622ba1a7 --- /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 0000000000..f8bbaf34d6 --- /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 0000000000..ef7711be67 --- /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_) + (nav-network-method-9 (_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 0000000000..eabcf7bcad --- /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 nav-network-method-9 ((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 0000000000..c20571ae32 --- /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/kg-grunt_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/kg-grunt_REF.gc new file mode 100644 index 0000000000..a691f467df --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/enemy/kg-grunt_REF.gc @@ -0,0 +1,2034 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-kg-grunt kg-grunt kg-grunt-lod0-jg -1 + ((kg-grunt-lod1-mg (meters 20)) (kg-grunt-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :shadow kg-grunt-shadow-mg + :origin-joint-index 18 + ) + +;; failed to figure out what this is: +(defskelgroup skel-kg-grunt-lowres kg-grunt kg-grunt-lod0-jg -1 + ((kg-grunt-lod1-mg (meters 20)) (kg-grunt-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :shadow kg-grunt-shadow-mg + :origin-joint-index 18 + ) + +;; definition for symbol *kg-grunt-debris-params*, type debris-static-params +(define *kg-grunt-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-c") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-kg-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 12 :group "skel-kg-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 13 :group "skel-kg-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 14 :group "skel-kg-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 19 :group "skel-kg-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 20 :group "skel-kg-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 30 :group "skel-kg-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 31 :group "skel-kg-debris-d") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + ) + ) + +;; definition for symbol *kg-grunt-debris-elbow-shoulder-params*, type debris-static-params +(define *kg-grunt-debris-elbow-shoulder-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 10 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 14 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 6 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 18 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + ) + ) + +;; definition for symbol *kg-grunt-debris-array-params*, type (array debris-static-params) +(define *kg-grunt-debris-array-params* + (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 22 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 21 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 10 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 40 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 9 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 19 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 22 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 12 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 22 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 33 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 32 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 14 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 44 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 13 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 30 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 33 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 16 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 33 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 6 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-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 27 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + ) + ) + ) + +;; definition for symbol *kg-grunt-debris-knee-hip-params*, type debris-static-params +(define *kg-grunt-debris-knee-hip-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 9 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 13 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 20 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 31 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 26 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + ) + ) + +;; definition of type kg-grunt-anim-info +(deftype kg-grunt-anim-info (structure) + ((anim-index int32) + (travel-speed meters) + ) + :pack-me + ) + +;; definition for method 3 of type kg-grunt-anim-info +(defmethod inspect ((this kg-grunt-anim-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'kg-grunt-anim-info) + (format #t "~1Tanim-index: ~D~%" (-> this anim-index)) + (format #t "~1Ttravel-speed: (meters ~m)~%" (-> this travel-speed)) + (label cfg-4) + this + ) + +;; definition of type kg-grunt-global-info +(deftype kg-grunt-global-info (basic) + ((prev-knocked-anim-index int32) + (prev-yellow-hit-anim-index int32) + (prev-blue-hit-anim-index int32) + (patrol-anim kg-grunt-anim-info 4 :inline) + (charge-anim kg-grunt-anim-info 3 :inline) + (attack-anim kg-grunt-anim-info 2 :inline) + (knocked-anim kg-grunt-anim-info 4 :inline) + (knocked-land-anim kg-grunt-anim-info 4 :inline) + (yellow-hit-anim kg-grunt-anim-info 4 :inline) + (blue-hit-anim kg-grunt-anim-info 6 :inline) + ) + ) + +;; definition for method 3 of type kg-grunt-global-info +(defmethod inspect ((this kg-grunt-global-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tprev-knocked-anim-index: ~D~%" (-> this prev-knocked-anim-index)) + (format #t "~1Tprev-yellow-hit-anim-index: ~D~%" (-> this prev-yellow-hit-anim-index)) + (format #t "~1Tprev-blue-hit-anim-index: ~D~%" (-> this prev-blue-hit-anim-index)) + (format #t "~1Tpatrol-anim[4] @ #x~X~%" (-> this patrol-anim)) + (format #t "~1Tcharge-anim[3] @ #x~X~%" (-> this charge-anim)) + (format #t "~1Tattack-anim[2] @ #x~X~%" (-> this attack-anim)) + (format #t "~1Tknocked-anim[4] @ #x~X~%" (-> this knocked-anim)) + (format #t "~1Tknocked-land-anim[4] @ #x~X~%" (-> this knocked-land-anim)) + (format #t "~1Tyellow-hit-anim[4] @ #x~X~%" (-> this yellow-hit-anim)) + (format #t "~1Tblue-hit-anim[6] @ #x~X~%" (-> this blue-hit-anim)) + (label cfg-4) + this + ) + +;; definition of type kg-grunt +(deftype kg-grunt (nav-enemy) + ((patrol-anim kg-grunt-anim-info) + (charge-anim kg-grunt-anim-info) + (attack-anim kg-grunt-anim-info) + (knocked-anim kg-grunt-anim-info) + (yellow-hit-anim kg-grunt-anim-info) + (blue-hit-anim kg-grunt-anim-info) + (intro-path path-control) + (use-charge-anim-index int8 :offset 652) + (knocked-anim-index int8) + (jumping-ambush-path-pt int8) + (kg-grunt-flags uint8) + (state-timeout2 time-frame) + (next-warn-time time-frame) + (dest vector :inline) + (minimap connection-minimap :offset 704) + (debris-count uint32) + (debris-mask uint32) + ) + (:state-methods + attack + falling-ambush + jumping-ambush + jumping-ambush-cont + wait-for-focus + spin-attack + explode + ) + (:methods + (go-attack (_type_ float) process-focusable) + (get-nav-enemy-info (_type_) nav-enemy-info) + ) + ) + +;; definition for method 3 of type kg-grunt +(defmethod inspect ((this kg-grunt)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tpatrol-anim: #~%" (-> this patrol-anim)) + (format #t "~2Tcharge-anim: #~%" (-> this charge-anim)) + (format #t "~2Tattack-anim: #~%" (-> this attack-anim)) + (format #t "~2Tknocked-anim: #~%" (-> this knocked-anim)) + (format #t "~2Tyellow-hit-anim: #~%" (-> this yellow-hit-anim)) + (format #t "~2Tblue-hit-anim: #~%" (-> this blue-hit-anim)) + (format #t "~2Tintro-path: ~A~%" (-> this intro-path)) + (format #t "~2Tcircle-radial-dist: ~f~%" (-> this desired-angle)) + (format #t "~2Tuse-charge-anim-index: ~D~%" (-> this use-charge-anim-index)) + (format #t "~2Tknocked-anim-index: ~D~%" (-> this knocked-anim-index)) + (format #t "~2Tjumping-ambush-path-pt: ~D~%" (-> this jumping-ambush-path-pt)) + (format #t "~2Tkg-grunt-flags: ~D~%" (-> this kg-grunt-flags)) + (format #t "~2Tstate-timeout2: ~D~%" (-> this state-timeout2)) + (format #t "~2Tnext-warn-time: ~D~%" (-> this next-warn-time)) + (format #t "~2Tdest: #~%" (-> this dest)) + (format #t "~2Tfocus-pos: #~%" (-> this focus-pos)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tdebris-count: ~D~%" (-> this debris-count)) + (format #t "~2Tdebris-mask: ~D~%" (-> this debris-mask)) + (label cfg-4) + this + ) + +;; definition for symbol *kg-grunt-global-info*, type kg-grunt-global-info +(define *kg-grunt-global-info* (new 'static 'kg-grunt-global-info + :patrol-anim (new 'static 'inline-array kg-grunt-anim-info 4 + (new 'static 'kg-grunt-anim-info :anim-index 11 :travel-speed (meters 4)) + (new 'static 'kg-grunt-anim-info :anim-index 12 :travel-speed (meters 7)) + (new 'static 'kg-grunt-anim-info :anim-index 14 :travel-speed (meters 7)) + (new 'static 'kg-grunt-anim-info :anim-index 15 :travel-speed (meters 7)) + ) + :charge-anim (new 'static 'inline-array kg-grunt-anim-info 3 + (new 'static 'kg-grunt-anim-info :anim-index 14 :travel-speed (meters 7)) + (new 'static 'kg-grunt-anim-info :anim-index 15 :travel-speed (meters 7)) + (new 'static 'kg-grunt-anim-info :anim-index 16 :travel-speed (meters 7)) + ) + :attack-anim (new 'static 'inline-array kg-grunt-anim-info 2 + (new 'static 'kg-grunt-anim-info :anim-index 17 :travel-speed (meters 12)) + (new 'static 'kg-grunt-anim-info :anim-index 18 :travel-speed (meters 12)) + ) + :knocked-anim (new 'static 'inline-array kg-grunt-anim-info 4 + (new 'static 'kg-grunt-anim-info :anim-index 22) + (new 'static 'kg-grunt-anim-info :anim-index 24) + (new 'static 'kg-grunt-anim-info :anim-index 26) + (new 'static 'kg-grunt-anim-info :anim-index 28) + ) + :knocked-land-anim (new 'static 'inline-array kg-grunt-anim-info 4 + (new 'static 'kg-grunt-anim-info :anim-index 23) + (new 'static 'kg-grunt-anim-info :anim-index 25) + (new 'static 'kg-grunt-anim-info :anim-index 27) + (new 'static 'kg-grunt-anim-info :anim-index 29) + ) + :yellow-hit-anim (new 'static 'inline-array kg-grunt-anim-info 4 + (new 'static 'kg-grunt-anim-info :anim-index 34) + (new 'static 'kg-grunt-anim-info :anim-index 35) + (new 'static 'kg-grunt-anim-info :anim-index 36) + (new 'static 'kg-grunt-anim-info :anim-index 37) + ) + :blue-hit-anim (new 'static 'inline-array kg-grunt-anim-info 6 + (new 'static 'kg-grunt-anim-info :anim-index 38) + (new 'static 'kg-grunt-anim-info :anim-index 39) + (new 'static 'kg-grunt-anim-info :anim-index 40) + (new 'static 'kg-grunt-anim-info :anim-index 41) + (new 'static 'kg-grunt-anim-info :anim-index 42) + (new 'static 'kg-grunt-anim-info :anim-index 43) + ) + ) + ) + +;; definition for symbol *fact-info-kg-grunt-defaults*, type fact-info-enemy-defaults +(define *fact-info-kg-grunt-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 48 :pickup-amount 10.0) + ) + +;; definition for symbol *kg-grunt-nav-enemy-info*, type nav-enemy-info +(define *kg-grunt-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 36 + (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 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 #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 30 + :param1 #x69 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 60) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 1 + :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 #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 30 + :param1 #x69 + :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 30 + :param1 #x69 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #xa + :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 push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 1 + :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 #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 30 + :param1 #x69 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #xa + :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 push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 1 + :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 #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 30 + :param1 #x69 + :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 30 + :param1 #x69 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #xa + :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 push) :param0 30) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 1 + :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 #x1e + :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 push) :param0 60) + (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 13 + :hostile-anim -1 + :hit-anim 34 + :knocked-anim -1 + :knocked-land-anim -1 + :die-anim 19 + :die-falling-anim 32 + :victory-anim -1 + :jump-wind-up-anim 45 + :jump-in-air-anim 46 + :jump-land-anim 47 + :neck-joint 5 + :look-at-joint 6 + :bullseye-joint 18 + :sound-hit (static-sound-name "kg-impact") + :sound-die (static-sound-name "kg-explo") + :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 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.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 #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 #t + :use-circling #t + :use-pacing #t + :walk-anim 11 + :turn-anim -1 + :run-anim 14 + :taunt-anim 20 + :run-travel-speed (meters 7) + :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! (-> *kg-grunt-nav-enemy-info* fact-defaults) *fact-info-kg-grunt-defaults*) + +;; definition for method 27 of type kg-grunt +(defmethod get-inv-mass ((this kg-grunt)) + 2.0 + ) + +;; definition for method 82 of type kg-grunt +;; INFO: Used lq/sq +(defmethod event-handler ((this kg-grunt) (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) + (cond + ((= (-> this hit-points) 0.0) + (go (method-of-object this explode)) + ) + (else + (let ((s5-1 (new 'stack 'debris-tuning (the-as uint 1)))) + (set! (-> s5-1 hit-xz-reaction) 0.95) + (set! (-> s5-1 hit-y-reaction) 0.6) + (set! (-> s5-1 fountain-rand-transv-lo quad) (-> this incoming attack-position quad)) + (dotimes (s4-0 8) + (let ((v1-32 (rand-vu-int-count-excluding 18 (the-as int (-> this debris-mask))))) + (logior! (-> this debris-mask) (ash 1 v1-32)) + (debris-spawn this s5-1 (-> *kg-grunt-debris-array-params* v1-32) (the-as process-drawable #f)) + ) + ) + ) + (setup-masks (-> this draw) 0 (the-as int (* (-> this debris-mask) 2))) + (go (method-of-object this knocked)) + ) + ) + #t + ) + (('impact-impulse) + (let ((v1-44 (the-as object (-> arg3 param 0)))) + (when (< 4096.0 (-> (the-as rigid-body-impact v1-44) impulse)) + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.1)) + (set! (-> this hit-points) 0.0) + (send-event arg0 'lawsuit (-> this root trans)) + (go (method-of-object this explode)) + #t + ) + ) + ) + (('death-start) + (set! (-> this draw death-timer) (the-as uint 0)) + ((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 74 of type kg-grunt +(defmethod go-ambush-delay ((this kg-grunt)) + (cond + ((logtest? (-> this fact enemy-options) (enemy-option user10)) + (go (method-of-object this falling-ambush)) + ) + ((logtest? (-> this fact enemy-options) (enemy-option user11)) + (go (method-of-object this jumping-ambush)) + ) + (else + (format 0 "ERROR: ~A doesn't specify which ambush behavior to use.~%" (-> this name)) + (go-hostile this) + ) + ) + ) + +;; failed to figure out what this is: +(defstate explode (kg-grunt) + :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-play "kg-explo") + (send-event self 'death-start) + ) + :code (behavior () + (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) (-> self incoming attack-position quad)) + (debris-spawn self a1-1 *kg-grunt-debris-params* (the-as process-drawable #f)) + ) + (let ((v1-6 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node kg-grunt-lod0-jg chest)))) + (cond + ((logtest? (-> *part-group-id-table* 220 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-6 quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 220)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-6 quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 220)) + ) + ) + ) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; failed to figure out what this is: +(defstate falling-ambush (kg-grunt) + :virtual #t + :event enemy-event-handler + :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* ((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) + ) + ) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (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) + ) + (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 + ) + :exit (behavior () + (let ((v1-1 (-> self root root-prim))) + (set! (-> v1-1 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-1 prim-core collide-with) (-> self root backup-collide-with)) + ) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.2)) + (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 "kg-grunt-notice") + (ja-channel-push! 1 0) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info notice-anim)) + :num! (seek! max 1.8) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.8)) + ) + (until (logtest? (-> self root status) (collide-status on-ground touch-surface touch-wall)) + (suspend) + ) + (go-virtual hostile) + ) + :post nav-enemy-falling-post + ) + +;; definition for method 102 of type kg-grunt +(defmethod go-directed2 ((this kg-grunt)) + (case (-> this jump-why) + ((2) + (go (method-of-object this jumping-ambush-cont)) + ) + (else + ((method-of-type nav-enemy go-directed2) this) + ) + ) + ) + +;; failed to figure out what this is: +(defstate jumping-ambush (kg-grunt) + :virtual #t + :event enemy-event-handler + :enter (behavior () + ((-> (method-of-type nav-enemy ambush) enter)) + (when (zero? (-> self intro-path)) + (format 0 "ERROR: ~A has no intro path, skipping jumping-ambush~%" (-> self name)) + (go-virtual notice) + ) + (get-point-in-path! (-> self intro-path) (-> self root trans) 0.0 'interp) + ) + :code (behavior () + (set! (-> self jumping-ambush-path-pt) 1) + (until #f + (let ((gp-0 (new 'stack-no-clear 'vector))) + (get-point-in-path! (-> self intro-path) gp-0 1.0 'interp) + (set! (-> self enemy-flags) + (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked))) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (let ((v1-5 (process->ppointer self))) + (set! (-> a1-1 from) v1-5) + ) + (set! (-> a1-1 num-params) 2) + (set! (-> a1-1 message) 'jump) + (set! (-> a1-1 param 0) (the-as uint 2)) + (set! (-> a1-1 param 1) (the-as uint gp-0)) + (send-event-function self a1-1) + ) + ) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate jumping-ambush-cont (kg-grunt) + :virtual #t + :event enemy-event-handler + :code (behavior () + (let ((a0-0 (-> self intro-path)) + (v1-1 (+ (-> self jumping-ambush-path-pt) 1)) + ) + (if (and (nonzero? a0-0) (< v1-1 (-> a0-0 curve num-cverts))) + (set! (-> self jumping-ambush-path-pt) v1-1) + (go-best-state self) + ) + ) + (until #f + (let ((gp-0 (new 'stack-no-clear 'vector))) + (get-point-in-path! (-> self intro-path) gp-0 (the float (-> self jumping-ambush-path-pt)) 'interp) + (set! (-> self enemy-flags) + (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked))) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (let ((v1-9 (process->ppointer self))) + (set! (-> a1-1 from) v1-9) + ) + (set! (-> a1-1 num-params) 2) + (set! (-> a1-1 message) 'jump) + (set! (-> a1-1 param 0) (the-as uint 2)) + (set! (-> a1-1 param 1) (the-as uint gp-0)) + (send-event-function self a1-1) + ) + ) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate active (kg-grunt) + :virtual #t + :code (behavior () + (let ((v1-2 (ja-group))) + (when (or (and v1-2 (or (= v1-2 kg-grunt-charge0-ja) (= v1-2 kg-grunt-charge1-ja) (= v1-2 kg-grunt-charge2-ja))) + (let ((v1-8 (ja-group))) + (and v1-8 (or (= v1-8 kg-grunt-patrol0-ja) + (= v1-8 kg-grunt-patrol1-ja) + (= v1-8 kg-grunt-charge0-ja) + (= v1-8 kg-grunt-charge1-ja) + ) + ) + ) + ) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (until #f + (set! (-> self patrol-anim) (-> *kg-grunt-global-info* patrol-anim (rnd-int self 4))) + (let ((v1-28 (-> self nav))) + (set! (-> v1-28 target-speed) (-> self patrol-anim travel-speed)) + ) + 0 + (let ((gp-0 (-> self draw art-group data (-> self patrol-anim anim-index))) + (s5-0 (set-reaction-time! self 1 (seconds 0.027))) + ) + (let ((v1-37 (ja-group))) + (if (not (and v1-37 (= v1-37 gp-0))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (dotimes (s4-0 s5-0) + (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)) + ) + ) + ) + (when (nonzero? (-> self patrol-anim anim-index)) + (ja-no-eval :num! (loop!)) + (ja-channel-push! 1 (seconds 0.2)) + (set! (-> self patrol-anim) (the-as kg-grunt-anim-info (-> *kg-grunt-global-info* patrol-anim))) + (let ((v1-67 (-> self nav))) + (set! (-> v1-67 target-speed) (-> self patrol-anim travel-speed)) + ) + 0 + (let ((gp-1 (-> self draw art-group data (-> self patrol-anim anim-index))) + (s5-1 (set-reaction-time! self (seconds 0.007) (seconds 0.017))) + ) + (ja-no-eval :group! gp-1 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (ja-blend-eval) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (dotimes (s4-1 s5-1) + (ja-no-eval :group! gp-1 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + ) + (when (zero? (rnd-int self 3)) + (let ((v1-107 self)) + (set! (-> v1-107 enemy-flags) (the-as enemy-flag (logclear (-> v1-107 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-107 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (ja-channel-push! 1 (seconds 0.3)) + (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)) + ) + (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-171 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-171 enemy-flags))) + (set! (-> v1-171 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-171 enemy-flags)))) + ) + (set! (-> v1-171 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-171 enemy-flags)))) + (set! (-> v1-171 nav callback-info) (-> v1-171 enemy-info callback-info)) + ) + 0 + ) + ) + ) + #f + ) + ) + +;; definition for method 197 of type kg-grunt +(defmethod go-attack ((this kg-grunt) (arg0 float)) + (local-vars (v1-5 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 (get-focus! this))) + (when gp-0 + (let ((v1-3 (get-trans gp-0 0)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (vector-! s4-0 v1-3 (-> this root trans)) + (.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-5 vf1) + (let* ((f30-0 v1-5) + (f0-0 arg0) + (f28-0 (* f0-0 f0-0)) + (f0-2 12288.0) + ) + (when (or (>= (* f0-2 f0-2) f30-0) (>= f28-0 f30-0)) + (let ((f26-0 (quaternion-y-angle (-> this root quat))) + (f0-7 (atan (-> s4-0 x) (-> s4-0 z))) + (f1-0 1228.8) + ) + (cond + ((and (< (* f1-0 f1-0) f30-0) (>= f28-0 f30-0) (>= 8192.0 (fabs (deg- f26-0 f0-7)))) + (go (method-of-object this attack)) + ) + ((let ((f0-10 12288.0)) + (< f30-0 (* f0-10 f0-10)) + ) + (go (method-of-object this spin-attack)) + ) + ) + ) + ) + ) + ) + ) + gp-0 + ) + ) + ) + +;; failed to figure out what this is: +(defstate hostile (kg-grunt) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (let ((a0-1 (go-attack self 13312.0)) + (gp-0 (current-time)) + ) + (when (and (>= gp-0 (-> self next-warn-time)) + (not (logtest? (-> self draw status) (draw-control-status on-screen))) + ) + (when (and a0-1 (let ((f0-0 65536.0)) + (>= (* f0-0 f0-0) (vector-vector-xz-distance-squared (get-trans a0-1 0) (-> self root trans))) + ) + ) + (sound-play "kg-grunt-warn") + (set! (-> self next-warn-time) (+ gp-0 (set-reaction-time! self (seconds 1) (seconds 1.2)))) + ) + ) + ) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (when (and v1-2 (or (= v1-2 kg-grunt-charge0-ja) (= v1-2 kg-grunt-charge1-ja) (= v1-2 kg-grunt-charge2-ja))) + (let ((v1-6 (-> self nav))) + (set! (-> v1-6 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (let ((v1-19 (-> self use-charge-anim-index))) + (cond + ((>= v1-19 0) + (set! (-> self charge-anim) (-> *kg-grunt-global-info* charge-anim v1-19)) + (set! (-> self use-charge-anim-index) -1) + ) + (else + (set! (-> self charge-anim) (-> *kg-grunt-global-info* charge-anim (rnd-int self 3))) + ) + ) + ) + (until #f + (go-attack self 22528.0) + (let ((gp-0 (-> self draw art-group data (-> self charge-anim anim-index)))) + (let ((v1-37 (ja-group))) + (when (not (and v1-37 (= v1-37 gp-0))) + (ja-channel-push! 1 (seconds 0.1)) + (let ((v1-41 (-> self nav))) + (set! (-> v1-41 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + ) + ) + (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)) + ) + ) + ) + #f + ) + :post nav-enemy-chase-post + ) + +;; failed to figure out what this is: +(defstate attack (kg-grunt) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((v1-1 (-> self nav state))) + (set! (-> v1-1 speed) (-> self enemy-info run-travel-speed)) + ) + 0 + (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-10 *game-info*) + (v0-1 (+ (-> v1-10 attack-id) 1)) + ) + (set! (-> v1-10 attack-id) v0-1) + (set! (-> self attack-id) v0-1) + ) + ) + :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)) + ) + ) + :trans (behavior () + (reset-penetrate! self) + (when (logtest? (-> self enemy-flags) (enemy-flag victory)) + (logclear! (-> self enemy-flags) (enemy-flag victory)) + (sound-play "kg-grunt-hit") + ) + ) + :code (behavior () + (set! (-> self attack-anim) (-> *kg-grunt-global-info* attack-anim (rnd-int self 2))) + (let ((v1-5 (-> self nav))) + (set! (-> v1-5 target-speed) (-> self attack-anim travel-speed)) + ) + 0 + (let ((v1-7 (-> self nav))) + (set! (-> v1-7 turning-acceleration) 49152.0) + ) + 0 + (let ((gp-0 (-> self draw art-group data (-> self attack-anim anim-index))) + (f30-0 (rnd-float-range self 0.9 1.1)) + ) + (let ((v1-17 (ja-group))) + (if (not (and v1-17 (= v1-17 gp-0))) + (ja-channel-push! 1 (seconds 0.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)) + ) + ) + (let ((v1-36 (-> self nav))) + (set! (-> v1-36 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + (let ((v1-38 (-> self nav))) + (set! (-> v1-38 turning-acceleration) (-> self enemy-info run-turning-acceleration)) + ) + 0 + (let ((gp-1 (-> self draw art-group data (-> self charge-anim anim-index)))) + (ja-channel-push! 1 (seconds 0.1)) + (set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim gp-1)) + ) + (ja :num-func num-func-identity :frame-num (ja-aframe 3.0 0)) + (let ((gp-3 (-> self focus aware))) + (if (or (not (get-focus! self)) (!= gp-3 3)) + (go-stare self) + ) + ) + (let ((v1-57 0)) + (let ((a0-22 (the-as object (-> *kg-grunt-global-info* charge-anim))) + (a1-7 (-> self charge-anim)) + ) + (dotimes (a2-3 3) + (when (= (the-as kg-grunt-anim-info a0-22) a1-7) + (set! v1-57 a2-3) + (goto cfg-21) + ) + (set! a0-22 (&+ (the-as kg-grunt-anim-info a0-22) 8)) + ) + ) + (label cfg-21) + (set! (-> self use-charge-anim-index) v1-57) + ) + (go-virtual hostile) + ) + :post nav-enemy-chase-post + ) + +;; failed to figure out what this is: +(defstate spin-attack (kg-grunt) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (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 + (let ((gp-0 (handle->process (-> self focus handle)))) + (if (not gp-0) + (go-stare self) + ) + (set! (-> self focus-pos quad) (-> (get-trans (the-as process-focusable gp-0) 0) quad)) + ) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-21 *game-info*) + (v0-3 (+ (-> v1-21 attack-id) 1)) + ) + (set! (-> v1-21 attack-id) v0-3) + (set! (-> self attack-id) v0-3) + ) + ) + :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)) + ) + ) + :trans (behavior () + (when (logtest? (-> self enemy-flags) (enemy-flag victory)) + (logclear! (-> self enemy-flags) (enemy-flag victory)) + (sound-play "kg-grunt-hit") + ) + ) + :code (behavior () + (set! (-> self attack-anim) (-> *kg-grunt-global-info* attack-anim (rnd-int self 2))) + (let ((gp-0 (-> self draw art-group data (-> self attack-anim anim-index))) + (f30-0 (rnd-float-range self 0.9 1.1)) + ) + (let ((v1-13 (ja-group))) + (if (not (and v1-13 (= v1-13 gp-0))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (ja-no-eval :group! gp-0 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (let ((a0-9 (handle->process (-> self focus handle)))) + (if a0-9 + (set! (-> self focus-pos quad) (-> (get-trans (the-as process-focusable a0-9) 0) quad)) + ) + ) + (seek-to-point-toward-point! (-> self root) (-> self focus-pos) 546133.3 (seconds 0.1)) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (let ((gp-3 (-> self focus aware))) + (if (or (not (get-focus! self)) (!= gp-3 3)) + (go-stare self) + ) + ) + (go-virtual hostile) + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate circling (kg-grunt) + :virtual #t + :code (behavior () + (let ((v1-2 (ja-group))) + (when (and v1-2 (or (= v1-2 kg-grunt-charge0-ja) (= v1-2 kg-grunt-charge1-ja) (= v1-2 kg-grunt-charge2-ja))) + (let ((v1-6 (-> self nav))) + (set! (-> v1-6 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (until #f + (set! (-> self charge-anim) (-> *kg-grunt-global-info* charge-anim (rnd-int self 3))) + (let ((v1-22 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-22 enemy-flags))) + (set! (-> v1-22 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-22 enemy-flags)))) + ) + (set! (-> v1-22 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-22 enemy-flags)))) + (set! (-> v1-22 nav callback-info) (-> v1-22 enemy-info callback-info)) + ) + 0 + (let ((v1-25 self)) + (set! (-> v1-25 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-25 enemy-flags)))) + ) + 0 + (let ((v1-27 (-> self nav))) + (set! (-> v1-27 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + (let ((v1-29 (-> self nav))) + (set! (-> v1-29 acceleration) (-> self enemy-info run-acceleration)) + ) + 0 + (let ((v1-31 (-> self nav))) + (set! (-> v1-31 turning-acceleration) (-> self enemy-info run-turning-acceleration)) + ) + 0 + (let ((gp-0 (-> self draw art-group data (-> self charge-anim anim-index)))) + (let ((v1-39 (ja-group))) + (if (not (and v1-39 (= v1-39 gp-0))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (let ((s5-0 (rnd-int self 8)) + (f30-0 (rnd-float-range self 0.9 1.1)) + ) + (while (nonzero? s5-0) + (+! s5-0 -1) + (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)) + ) + ) + ) + ) + (when (< 20480.0 (vector-vector-xz-distance (-> self focus-pos) (-> self root trans))) + (let ((v1-66 self)) + (set! (-> v1-66 enemy-flags) (the-as enemy-flag (logclear (-> v1-66 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-66 nav callback-info) *null-nav-callback-info*) + ) + 0 + (nav-enemy-method-178 self) + (let ((v1-71 self)) + (set! (-> v1-71 enemy-flags) (the-as enemy-flag (logclear (-> v1-71 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (vector-reset! (-> self root transv)) + (let ((v1-77 (ja-group))) + (if (not (and v1-77 (= v1-77 kg-grunt-celebrate-start-ja))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (let ((f30-2 (rnd-float-range self 0.9 1.1))) + (ja-no-eval :group! kg-grunt-celebrate-start-ja :num! (seek! max f30-2) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-2)) + ) + (ja-no-eval :group! kg-grunt-celebrate-finish-ja :num! (seek! max f30-2) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-2)) + ) + ) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate pacing (kg-grunt) + :virtual #t + :code (behavior () + (let ((v1-2 (ja-group))) + (when (and v1-2 (or (= v1-2 kg-grunt-charge0-ja) (= v1-2 kg-grunt-charge1-ja) (= v1-2 kg-grunt-charge2-ja))) + (let ((v1-6 (-> self nav))) + (set! (-> v1-6 target-speed) (-> self charge-anim travel-speed)) + ) + 0 + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (set! (-> self patrol-anim) (-> *kg-grunt-global-info* patrol-anim (rnd-int self 4))) + (let ((f30-0 (rnd-float-range self 0.9 1.1)) + (gp-0 (-> self draw art-group data (-> self patrol-anim anim-index))) + ) + (let ((v1-28 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-28 enemy-flags))) + (set! (-> v1-28 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-28 enemy-flags)))) + ) + (set! (-> v1-28 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-28 enemy-flags)))) + (set! (-> v1-28 nav callback-info) (-> v1-28 enemy-info callback-info)) + ) + 0 + (let ((v1-31 self)) + (set! (-> v1-31 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-31 enemy-flags)))) + ) + 0 + (let ((v1-33 (-> self nav))) + (set! (-> v1-33 target-speed) (-> self patrol-anim travel-speed)) + ) + 0 + (let ((v1-35 (-> self nav))) + (set! (-> v1-35 acceleration) (-> self enemy-info walk-acceleration)) + ) + 0 + (let ((v1-37 (-> self nav))) + (set! (-> v1-37 turning-acceleration) (-> self enemy-info walk-turning-acceleration)) + ) + 0 + (let ((v1-41 (ja-group))) + (if (not (and v1-41 (= v1-41 gp-0))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (until #f + (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)) + ) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate stop-chase (kg-grunt) + :virtual #t + :code (behavior () + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (set! (-> self patrol-anim) (-> *kg-grunt-global-info* patrol-anim (rnd-int self 4))) + (let ((v1-14 (-> self nav))) + (set! (-> v1-14 target-speed) (-> self patrol-anim travel-speed)) + ) + 0 + (let ((f30-0 (rnd-float-range self 0.9 1.1)) + (gp-0 (-> self draw art-group data (-> self patrol-anim anim-index))) + ) + (let ((v1-24 (ja-group))) + (if (not (and v1-24 (= v1-24 gp-0))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (until #f + (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)) + ) + ) + ) + #f + ) + ) + +;; definition for method 85 of type kg-grunt +(defmethod knocked-anim ((this kg-grunt) (arg0 enemy-knocked-info)) + (local-vars (v1-72 int) (a2-3 int) (a2-5 int)) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot)) + (let ((v1-2 (ash 1 (-> *kg-grunt-global-info* prev-yellow-hit-anim-index))) + (a0-7 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (if (and a0-7 (or (= a0-7 (-> this draw art-group data 16)) + (= a0-7 (-> this draw art-group data 38)) + (= a0-7 (-> this draw art-group data 39)) + (= a0-7 (-> this draw art-group data 40)) + ) + ) + (set! a2-3 (logior v1-2 4)) + (set! a2-3 (logior v1-2 8)) + ) + ) + (let ((s4-0 (enemy-method-131 this 4 a2-3))) + (set! (-> *kg-grunt-global-info* prev-yellow-hit-anim-index) s4-0) + (set! (-> this yellow-hit-anim) (-> *kg-grunt-global-info* yellow-hit-anim s4-0)) + (let ((v1-11 (rnd-int this 3))) + (if (= s4-0 3) + (set! v1-11 2) + ) + (set! (-> this use-charge-anim-index) v1-11) + ) + ) + (let ((s4-1 (-> this draw art-group data (-> this yellow-hit-anim anim-index)))) + (ja-channel-push! 1 0) + (let ((a0-19 (-> this skel root-channel 0))) + (set! (-> a0-19 frame-group) (the-as art-joint-anim s4-1)) + (set! (-> a0-19 param 0) (the float (+ (-> (the-as art-joint-anim s4-1) frames num-frames) -1))) + (set! (-> a0-19 param 1) (-> arg0 anim-speed)) + (set! (-> a0-19 frame-num) 0.0) + (joint-control-channel-group! a0-19 (the-as art-joint-anim s4-1) num-func-seek!) + ) + ) + #t + ) + (((knocked-type blue-shot)) + (let* ((v1-24 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + (s4-2 (and v1-24 (or (= v1-24 (-> this draw art-group data 16)) + (= v1-24 (-> this draw art-group data 38)) + (= v1-24 (-> this draw art-group data 39)) + (= v1-24 (-> this draw art-group data 40)) + ) + ) + ) + ) + (if (>= (-> this incoming blue-juggle-count) (the-as uint 2)) + (logior! (-> this kg-grunt-flags) 2) + ) + (cond + ((and (not s4-2) (logtest? (-> this kg-grunt-flags) 2)) + (set! s4-2 #t) + (ja-channel-push! 1 (seconds 0.17)) + ) + (else + (let ((v1-36 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (if (and v1-36 (= v1-36 (-> this draw art-group data 44))) + (ja-channel-push! 1 (seconds 0.17)) + (ja-channel-push! 1 (seconds 0.02)) + ) + ) + ) + ) + (let ((v1-42 (ash 1 (-> *kg-grunt-global-info* prev-blue-hit-anim-index)))) + (if s4-2 + (set! a2-5 (logior v1-42 56)) + (set! a2-5 (logior v1-42 7)) + ) + ) + (let ((v1-46 (enemy-method-131 this 6 a2-5))) + (set! (-> *kg-grunt-global-info* prev-blue-hit-anim-index) v1-46) + (set! (-> this blue-hit-anim) (-> *kg-grunt-global-info* blue-hit-anim v1-46)) + ) + (let ((a2-6 0)) + (when (not (logtest? (-> this kg-grunt-flags) 2)) + (if s4-2 + (set! a2-6 (logior a2-6 3)) + (set! a2-6 (logior a2-6 4)) + ) + ) + (set! (-> this use-charge-anim-index) (enemy-method-131 this 3 a2-6)) + ) + ) + (let ((a1-26 (-> this draw art-group data (-> this blue-hit-anim anim-index))) + (a0-51 (-> this skel root-channel 0)) + ) + (set! (-> a0-51 frame-group) (the-as art-joint-anim a1-26)) + (set! (-> a0-51 param 0) (the float (+ (-> (the-as art-joint-anim a1-26) frames num-frames) -1))) + (set! (-> a0-51 param 1) (-> arg0 anim-speed)) + (set! (-> a0-51 frame-num) 0.0) + (joint-control-channel-group! a0-51 (the-as art-joint-anim a1-26) num-func-seek!) + ) + #t + ) + (else + 0 + (cond + ((or (= (-> this incoming knocked-type) (knocked-type explode-or-darkjak)) + (= (-> this incoming knocked-type) (knocked-type dark-shot)) + ) + (set! v1-72 3) + ) + (else + (let ((s4-3 (ash 1 (-> *kg-grunt-global-info* prev-knocked-anim-index)))) + (let ((s3-0 (-> this root))) + (if (>= 16384.0 (fabs (deg- (quaternion-y-angle (-> s3-0 quat)) (atan (-> s3-0 transv x) (-> s3-0 transv z))))) + (set! s4-3 (logior s4-3 4)) + ) + ) + (set! v1-72 (enemy-method-131 this 3 s4-3)) + ) + ) + ) + (set! (-> *kg-grunt-global-info* prev-knocked-anim-index) v1-72) + (set! (-> this knocked-anim-index) v1-72) + (set! (-> this knocked-anim) (-> *kg-grunt-global-info* knocked-anim v1-72)) + (let ((s4-4 (-> this draw art-group data (-> this knocked-anim anim-index)))) + (ja-channel-push! 1 0) + (let ((a0-68 (-> this skel root-channel 0))) + (set! (-> a0-68 frame-group) (the-as art-joint-anim s4-4)) + (set! (-> a0-68 param 0) (the float (+ (-> (the-as art-joint-anim s4-4) frames num-frames) -1))) + (set! (-> a0-68 param 1) (-> arg0 anim-speed)) + (set! (-> a0-68 frame-num) 0.0) + (joint-control-channel-group! a0-68 (the-as art-joint-anim s4-4) num-func-seek!) + ) + ) + #t + ) + ) + ) + +;; definition for method 86 of type kg-grunt +(defmethod knocked-land-anim ((this kg-grunt) (arg0 enemy-knocked-info)) + (cond + ((= (-> this incoming knocked-type) (knocked-type blue-shot)) + #f + ) + ((!= (-> this incoming knocked-type) (knocked-type yellow-shot)) + (let ((v1-8 (-> this + draw + art-group + data + (-> *kg-grunt-global-info* knocked-land-anim (-> this knocked-anim-index) anim-index) + ) + ) + (a0-3 (-> this skel root-channel 0)) + ) + (set! (-> a0-3 frame-group) (the-as art-joint-anim v1-8)) + (set! (-> a0-3 param 0) (the float (+ (-> (the-as art-joint-anim v1-8) 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-8) num-func-seek!) + ) + #t + ) + ) + ) + +;; definition for method 81 of type kg-grunt +(defmethod go-die ((this kg-grunt)) + (go (method-of-object this explode)) + ) + +;; failed to figure out what this is: +(defstate wait-for-focus (kg-grunt) + :virtual #t + :event enemy-event-handler + :enter (-> (method-of-type nav-enemy idle) enter) + :trans (behavior () + (let ((s5-0 (handle->process (-> self focus handle)))) + (when s5-0 + (let ((gp-0 (get-trans (the-as process-focusable s5-0) 0))) + (when (and (or (not (logtest? (-> self enemy-flags) (enemy-flag use-notice-distance))) + (>= 163840.0 (vector-vector-distance (-> self root trans) gp-0)) + ) + (or (not (logtest? (-> self fact enemy-options) (enemy-option user8))) + (and (not (focus-test? (the-as process-focusable s5-0) in-air)) + (>= 4096.0 (fabs (- (-> gp-0 y) (-> self root trans y)))) + ) + ) + ) + (cond + ((and (logtest? (-> self fact enemy-options) (enemy-option user9)) + (logtest? (-> self enemy-flags) (enemy-flag use-notice-distance)) + ) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (vector-! s5-1 gp-0 (-> self root trans)) + (let ((f0-2 32768.0) + (v1-26 s5-1) + ) + (if (or (>= f0-2 (sqrtf (+ (* (-> v1-26 x) (-> v1-26 x)) (* (-> v1-26 z) (-> v1-26 z))))) + (>= 20024.889 (fabs (deg- (y-angle (-> self root)) (atan (-> s5-1 x) (-> s5-1 z))))) + ) + (go-virtual notice) + ) + ) + ) + ) + (else + (go-virtual notice) + ) + ) + ) + ) + ) + ) + ) + :code (-> (method-of-type nav-enemy idle) code) + :post (-> (method-of-type nav-enemy idle) post) + ) + +;; definition for method 143 of type kg-grunt +(defmethod on-dying ((this kg-grunt)) + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + (call-parent-method this) + (none) + ) + +;; definition for method 7 of type kg-grunt +;; WARN: Return type mismatch nav-enemy vs kg-grunt. +(defmethod relocate ((this kg-grunt) (offset int)) + (if (nonzero? (-> this intro-path)) + (&+! (-> this intro-path) offset) + ) + (the-as kg-grunt ((method-of-type nav-enemy relocate) this offset)) + ) + +;; definition for method 120 of type kg-grunt +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this kg-grunt)) + (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-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-with) (collide-spec backgnd crate obstacle hit-by-others-list)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set-vector! (-> v1-15 local-sphere) 0.0 9830.4 0.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 collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-17 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-17 transform-index) 4) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 4915.2) + ) + (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 semi-solid deadly)) + (set! (-> v1-19 transform-index) 18) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 2252.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 jak bot player-list)) + (set! (-> v1-21 prim-core action) (collide-action deadly)) + (set! (-> v1-21 transform-index) 16) + (set-vector! (-> v1-21 local-sphere) 0.0 0.0 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 collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-23 prim-core action) (collide-action deadly)) + (set! (-> v1-23 transform-index) 12) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 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 collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-25 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-25 transform-index) 6) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (let ((v1-27 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-27 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-27 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 198 of type kg-grunt +(defmethod get-nav-enemy-info ((this kg-grunt)) + *kg-grunt-nav-enemy-info* + ) + +;; definition for method 121 of type kg-grunt +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this kg-grunt)) + (if (and (-> this entity) (= (-> this entity extra level name) 'factoryd)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-kg-grunt-lowres" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-kg-grunt" (the-as (pointer level) #f))) + (the-as pair 0) + ) + ) + (logior! (-> this mask) (process-mask kg-robot)) + (init-enemy-defaults! this (get-nav-enemy-info this)) + (let ((v1-17 (-> this neck))) + (set! (-> v1-17 up) (the-as uint 1)) + (set! (-> v1-17 nose) (the-as uint 2)) + (set! (-> v1-17 ear) (the-as uint 0)) + (set-vector! (-> v1-17 twist-max) 11832.889 11832.889 0.0 1.0) + (set! (-> v1-17 ignore-angle) 30947.555) + ) + (let ((v1-19 (-> this nav))) + (set! (-> v1-19 speed-scale) 1.0) + ) + 0 + (set-gravity-length (-> this root dynam) 573440.0) + (let ((s5-3 *kg-grunt-global-info*)) + (set! (-> this patrol-anim) (-> s5-3 patrol-anim (rnd-int this 4))) + (set! (-> this charge-anim) (-> s5-3 charge-anim (rnd-int this 3))) + (set! (-> this attack-anim) (-> s5-3 attack-anim (rnd-int this 2))) + ) + (set! (-> this use-charge-anim-index) -1) + (if (zero? (rnd-int this 2)) + (logior! (-> this kg-grunt-flags) 1) + ) + (if (zero? (rnd-int this 2)) + (logior! (-> this kg-grunt-flags) 4) + ) + (set! (-> this intro-path) (new 'process 'path-control this 'intro 0.0 (the-as entity #f) #t)) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 108) (the-as int #f) (the-as vector #t) 0)) + (set-vector! (-> this root scale) 1.25 1.25 1.25 1.0) + (setup-masks (-> this draw) -1 0) + 0 + (none) + ) + +;; definition for method 122 of type kg-grunt +;; WARN: Return type mismatch int vs object. +(defmethod go-idle2 ((this kg-grunt)) + (if (logtest? (-> this fact enemy-options) (enemy-option user9)) + (go (method-of-object this wait-for-focus)) + (go (method-of-object this idle)) + ) + 0 + ) + + + + 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 0000000000..18685e4fab --- /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 new file mode 100644 index 0000000000..c55e0d0cd4 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/enemy/prebot-eco-creature_REF.gc @@ -0,0 +1,3625 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-prebot-critter-trail + :id 440 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1754 :fade-after (meters 120) :falloff-to (meters 120)) + (sp-item 1755 :flags (sp6)) + (sp-item 1756 :fade-after (meters 120) :falloff-to (meters 120)) + ) + ) + +;; failed to figure out what this is: +(defpart 1756 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0 4.0) + (:scale-x (meters 0.3) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 48.0 16.0) + (:b 64.0) + (:a 128.0) + (:omega (degrees 6761.25)) + (:vel-y (meters 0) (meters 0.01)) + (:fade-a -0.10666667) + (:accel-y (meters -0.000033333334) (meters -0.000016666667)) + (:friction 0.96) + (:timer (seconds 0.5) (seconds 3.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.017) (seconds 0.497)) + (:next-launcher 1757) + (:conerot-x (degrees 0) (degrees 3600)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters 0) (meters 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 1757 + :init-specs ((:r 32.0) (:g 128.0 128.0) (:b 255.0) (:next-time (seconds 0.017)) (:next-launcher 1758)) + ) + +;; failed to figure out what this is: +(defpart 1758 + :init-specs ((:r 0.0) (:g 48.0 16.0) (:b 64.0) (:next-time (seconds 0.017) (seconds 0.497)) (:next-launcher 1757)) + ) + +;; failed to figure out what this is: +(defpart 1755 + :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 0.0) + (:g 192.0 64.0) + (:b 255.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 1754 + :init-specs ((:texture (bigpuff 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 0.0) + (:g 128.0) + (:b 255.0) + (:a 64.0 8.0) + (:vel-y (meters -0.006666667) (meters -0.006666667)) + (:scalevel-x (meters 0.005) (meters 0.008333334)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-r 3.2) + (:fade-g 0.0) + (:fade-b -3.2) + (:fade-a -0.8) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.97) + (: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.135)) + (:next-launcher 1759) + ) + ) + +;; failed to figure out what this is: +(defpart 1759 + :init-specs ((:r 128.0) + (:g 128.0) + (:b 128.0) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:fade-a -0.10666667 -0.21333334) + (:func 'nothing) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-cav-eco-lg cav-eco-lg cav-eco-lg-lod0-jg cav-eco-lg-idle-ja + ((cav-eco-lg-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +;; definition of type prebot-large-eco-creature +(deftype prebot-large-eco-creature (nav-enemy) + ((old-y-deg float) + (diff-angle float) + (attack-anims (array int32)) + (victory-anims (array int32)) + (turn-left-anim int32) + (turn-right-anim int32) + (split-type type) + (attack-stop-frame float) + (traj trajectory :inline) + (which-trajectory int8) + (x-rotate float) + (y-rotate float) + (launch-pos vector :inline) + (launch vector :inline) + (spin-jm joint-mod) + (trail-part sparticle-launch-control) + (trail-sound sound-id) + (flags eco-creature-flag) + ) + (:state-methods + unfold + fly-to-dest + attack + wait-for-children + ) + (:methods + (prebot-large-eco-creature-method-194 (_type_) none) + (prebot-large-eco-creature-method-195 (_type_) none) + ) + ) + +;; definition for method 3 of type prebot-large-eco-creature +(defmethod inspect ((this prebot-large-eco-creature)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Told-y-deg: ~f~%" (-> this old-y-deg)) + (format #t "~2Tdiff-angle: ~f~%" (-> this diff-angle)) + (format #t "~2Tattack-anims: ~A~%" (-> this attack-anims)) + (format #t "~2Tvictory-anims: ~A~%" (-> this victory-anims)) + (format #t "~2Tturn-left-anim: ~D~%" (-> this turn-left-anim)) + (format #t "~2Tturn-right-anim: ~D~%" (-> this turn-right-anim)) + (format #t "~2Tsplit-type: ~A~%" (-> this split-type)) + (format #t "~2Tattack-stop-frame: ~f~%" (-> this attack-stop-frame)) + (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 "~2Tlaunch-pos: #~%" (-> this launch-pos)) + (format #t "~2Tlaunch: #~%" (-> this launch)) + (format #t "~2Tspin-jm: ~A~%" (-> this spin-jm)) + (format #t "~2Ttrail-part: ~A~%" (-> this trail-part)) + (format #t "~2Ttrail-sound: ~D~%" (-> this trail-sound)) + (format #t "~2Tflags: ~D~%" (-> this flags)) + (label cfg-4) + this + ) + +;; definition for symbol *prebot-large-eco-creature-nav-enemy-info*, type nav-enemy-info +(define *prebot-large-eco-creature-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 2 + :notice-anim 2 + :hostile-anim 3 + :hit-anim 2 + :knocked-anim 2 + :knocked-land-anim 2 + :die-anim 2 + :die-falling-anim 2 + :victory-anim 10 + :jump-wind-up-anim 2 + :jump-in-air-anim 2 + :jump-land-anim 2 + :neck-joint 5 + :look-at-joint 5 + :bullseye-joint 4 + :notice-distance (meters 200) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 20) + :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) + :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 16384.0 + :knocked-red-vxz-hi 40960.0 + :knocked-red-vy-lo 49152.0 + :knocked-red-vy-hi 61440.0 + :knocked-blue-vxz-lo 20480.0 + :knocked-blue-vxz-hi 28672.0 + :knocked-blue-vy-lo 16384.0 + :knocked-blue-vy-hi 40960.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 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 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 10.176285) + :geo-tform (new 'static 'vector :x 1.0 :w 35404.914) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 8223.438) + :geo-tform (new 'static 'vector :x 1.0 :w 27181.492) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 14248.819) + :geo-tform (new 'static 'vector :x -1.0 :w 10623.986) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 12262.859) + :geo-tform (new 'static 'vector :x 1.0 :w 33438.652) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.137 :z -0.9905 :w 11373.791) + :geo-tform (new 'static 'vector :x 0.2271 :y 0.9734 :z 0.0279 :w 36639.176) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5102 :z -0.86 :w 20530.754) + :geo-tform (new 'static 'vector :x 0.409 :y -0.0529 :z 0.9109 :w 32271.676) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6644 :z -0.7473 :w 1968.9199) + :geo-tform (new 'static 'vector :x 0.4093 :y 0.033 :z 0.9117 :w 33077.91) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9613 :z -0.2752 :w 2214.5525) + :geo-tform (new 'static 'vector :x 0.4059 :y -0.0481 :z 0.9126 :w 34502.54) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5153 :z 0.8569 :w 2080.0034) + :geo-tform (new 'static 'vector :x 0.4027 :y -0.0356 :z 0.9146 :w 32440.574) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint 10 + :pre-tform (new 'static 'vector :x 0.4859 :z 0.8739 :w 3273.5598) + :geo-tform (new 'static 'vector :x 0.414 :y 0.0464 :z 0.909 :w 29818.152) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8326 :z -0.5538 :w 3106.5886) + :geo-tform (new 'static 'vector :x 0.419 :y -0.032 :z 0.9073 :w 32459.652) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint 10 + :pre-tform (new 'static 'vector :x -0.9421 :z -0.3352 :w 6646.0605) + :geo-tform (new 'static 'vector :x 0.3914 :y -0.2 :z 0.8982 :w 37623.16) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3413 :z -0.9399 :w 1832.5868) + :geo-tform (new 'static 'vector :x 0.4204 :y -0.1424 :z 0.896 :w 38915.023) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.1371 :z 0.9905 :w 11369.786) + :geo-tform (new 'static 'vector :x -0.2272 :y 0.9734 :z 0.0279 :w 28896.426) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5101 :z 0.86 :w 20534.176) + :geo-tform (new 'static 'vector :x -0.026 :y 0.9979 :z 0.0579 :w 23979.531) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6645 :z 0.7472 :w 1958.0337) + :geo-tform (new 'static 'vector :x 0.016 :y 0.9992 :z -0.0358 :w 23969.791) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9615 :z 0.2744 :w 2230.645) + :geo-tform (new 'static 'vector :x 0.0911 :y 0.9943 :z 0.0536 :w 24079.475) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5098 :z -0.8602 :w 2098.3352) + :geo-tform (new 'static 'vector :x -0.0178 :y 0.999 :z 0.0406 :w 24125.459) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint 19 + :pre-tform (new 'static 'vector :x 0.4819 :z -0.8762 :w 3256.2107) + :geo-tform (new 'static 'vector :x -0.1538 :y 0.9868 :z -0.0491 :w 23956.574) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8364 :z 0.548 :w 3087.583) + :geo-tform (new 'static 'vector :x -0.017 :y 0.9991 :z 0.0369 :w 23745.531) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint 19 + :pre-tform (new 'static 'vector :x -0.9425 :z 0.3339 :w 6655.1807) + :geo-tform (new 'static 'vector :x 0.2492 :y 0.945 :z 0.2115 :w 24615.268) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3403 :z 0.9402 :w 1852.0657) + :geo-tform (new 'static 'vector :x 0.3178 :y 0.9363 :z 0.1493 :w 24121.836) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -1.0 :w 20948.764) + :geo-tform (new 'static 'vector :x -1.0 :w 9182.285) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9999 :z 0.0068 :w 7387.509) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.003 :z -0.0014 :w 16198.405) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9697 :z -0.244 :w 191.6382) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint -1 + :pre-tform (new 'static 'vector :y -1.0 :w 10.176285) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint -1 + :pre-tform (new 'static 'vector :y -1.0 :w 10.176285) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint -1 + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint 26 + :pre-tform (new 'static 'vector :x -0.4854 :z -0.8742 :w 21186.406) + :geo-tform (new 'static 'vector :x 0.6599 :y 0.6796 :z 0.3201 :w 35879.65) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9993 :z 0.0363 :w 2717.3774) + :geo-tform (new 'static 'vector :x 0.6708 :y 0.7057 :z 0.2277 :w 34044.242) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint 26 + :pre-tform (new 'static 'vector :x 0.3584 :z -0.9335 :w 11286.792) + :geo-tform (new 'static 'vector :x -0.4444 :y 0.7119 :z -0.5437 :w 28463.65) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1147 :z -0.9933 :w 2024.0066) + :geo-tform (new 'static 'vector :x -0.5154 :y 0.6809 :z -0.5201 :w 27281.908) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 36 + :parent-joint 26 + :pre-tform (new 'static 'vector :x -0.4859 :z 0.8739 :w 21191.012) + :geo-tform (new 'static 'vector :x 0.1968 :y 0.4177 :z -0.8869 :w 17933.508) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 37 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9993 :z -0.0361 :w 2729.0828) + :geo-tform (new 'static 'vector :x 0.0825 :y 0.3055 :z -0.9485 :w 17459.846) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 38 + :parent-joint 26 + :pre-tform (new 'static 'vector :x 0.3588 :z 0.9333 :w 11281.3125) + :geo-tform (new 'static 'vector :x 0.2273 :y 0.5912 :z 0.7738 :w 23386.34) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 39 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1145 :z 0.9934 :w 2026.6462) + :geo-tform (new 'static 'vector :x 0.2996 :y 0.5792 :z 0.758 :w 21904.426) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + ) + ) + :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 #t + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 3 + :turn-anim -1 + :run-anim 3 + :taunt-anim -1 + :run-travel-speed (meters 5) + :run-acceleration (meters 32) + :run-turning-acceleration (meters 40) + :walk-travel-speed (meters 5) + :walk-acceleration (meters 16) + :walk-turning-acceleration (meters 40) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 4) + :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! (-> *prebot-large-eco-creature-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; definition for method 74 of type prebot-large-eco-creature +(defmethod go-ambush-delay ((this prebot-large-eco-creature)) + (if (type? (ppointer->process (-> this parent)) prebot-large-eco-creature) + (go-idle2 this) + ((method-of-type nav-enemy go-ambush-delay) this) + ) + ) + +;; definition for method 71 of type prebot-large-eco-creature +(defmethod go-dormant ((this prebot-large-eco-creature)) + (if (type? (ppointer->process (-> this parent)) prebot-large-eco-creature) + (go-idle2 this) + ((method-of-type nav-enemy go-dormant) this) + ) + ) + +;; definition for method 72 of type prebot-large-eco-creature +(defmethod go-dormant-aware ((this prebot-large-eco-creature)) + (if (type? (ppointer->process (-> this parent)) prebot-large-eco-creature) + (go-idle2 this) + ((method-of-type nav-enemy go-dormant-aware) this) + ) + ) + +;; definition for method 82 of type prebot-large-eco-creature +(defmethod event-handler ((this prebot-large-eco-creature) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('attack) + (let ((s4-0 (the-as object (-> arg3 param 1)))) + (cond + ((or (not (logtest? (attack-mask penetrate-using) (-> (the-as attack-info s4-0) mask))) + (logand (penetrate + vehicle + dark-skin + dark-punch + dark-bomb + dark-smack + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + jak-red-shockwave + jak-dark-nuke + jak-dark-blackhole + ) + (-> (the-as attack-info s4-0) penetrate-using) + ) + ) + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + (else + (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)) + ) + ) + ) + (when (and (logtest? (-> (the-as attack-info s4-0) mask) (attack-mask id)) + (!= (-> (the-as attack-info s4-0) id) (-> this incoming attack-id)) + ) + (set! (-> this incoming attack-id) (-> (the-as attack-info s4-0) id)) + #t + ) + ) + ) + ) + ) + (('death-end) + (prebot-large-eco-creature-method-195 this) + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + (('eco-creature-died) + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer arg0)) + (set! (-> a1-4 num-params) arg1) + (set! (-> a1-4 message) arg2) + (set! (-> a1-4 param 0) (-> arg3 param 0)) + (set! (-> a1-4 param 1) (-> arg3 param 1)) + (set! (-> a1-4 param 2) (-> arg3 param 2)) + (set! (-> a1-4 param 3) (-> arg3 param 3)) + (set! (-> a1-4 param 4) (-> arg3 param 4)) + (set! (-> a1-4 param 5) (-> arg3 param 5)) + (send-event-function (ppointer->process (-> this parent)) a1-4) + ) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 67 of type prebot-large-eco-creature +(defmethod coin-flip? ((this prebot-large-eco-creature)) + #f + ) + +;; definition for method 59 of type prebot-large-eco-creature +;; WARN: Return type mismatch int vs none. +(defmethod enemy-common-post ((this prebot-large-eco-creature)) + (let ((t9-0 (method-of-type nav-enemy enemy-common-post))) + (t9-0 this) + ) + (let ((f0-0 (quaternion-y-angle (-> this root quat)))) + (set! (-> this diff-angle) (- (-> this old-y-deg) f0-0)) + (cond + ((< 32768.0 (-> this diff-angle)) + (+! (-> this diff-angle) -65536.0) + ) + ((< (-> this diff-angle) -32768.0) + (+! (-> this diff-angle) 65536.0) + ) + ) + (set! (-> this old-y-deg) f0-0) + ) + (if (< (+ 0.5 (* 0.00024414062 (-> this nav state speed))) (* 0.005493164 (fabs (-> this diff-angle)))) + (logior! (-> this flags) (eco-creature-flag ecf0)) + (logclear! (-> this flags) (eco-creature-flag ecf0)) + ) + 0 + (none) + ) + +;; definition for method 194 of type prebot-large-eco-creature +;; WARN: Return type mismatch int vs none. +(defmethod prebot-large-eco-creature-method-194 ((this prebot-large-eco-creature)) + (cond + ((< 0.0 (-> this diff-angle)) + (let ((v1-2 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (cond + ((not (and v1-2 (= v1-2 (-> this draw art-group data (-> this turn-left-anim))))) + (ja-channel-push! 1 (seconds 0.1)) + (let ((s5-0 (-> this skel root-channel 0))) + (joint-control-channel-group-eval! + s5-0 + (the-as art-joint-anim (-> this draw art-group data (-> this turn-left-anim))) + num-func-identity + ) + (set! (-> s5-0 frame-num) 0.0) + ) + ) + (else + (let ((a0-8 (-> this skel root-channel 0))) + (set! (-> a0-8 param 0) (* 0.0019975142 (-> this diff-angle))) + (joint-control-channel-group-eval! a0-8 (the-as art-joint-anim #f) num-func-loop!) + ) + ) + ) + ) + ) + (else + (let ((v1-17 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (cond + ((not (and v1-17 (= v1-17 (-> this draw art-group data (-> this turn-right-anim))))) + (ja-channel-push! 1 (seconds 0.1)) + (let ((s5-1 (-> this skel root-channel 0))) + (joint-control-channel-group-eval! + s5-1 + (the-as art-joint-anim (-> this draw art-group data (-> this turn-right-anim))) + num-func-identity + ) + (set! (-> s5-1 frame-num) 0.0) + ) + ) + (else + (let ((a0-16 (-> this skel root-channel 0))) + (set! (-> a0-16 param 0) (* -0.0019975142 (-> this diff-angle))) + (joint-control-channel-group-eval! a0-16 (the-as art-joint-anim #f) num-func-loop!) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 195 of type prebot-large-eco-creature +;; WARN: Return type mismatch int vs none. +(defmethod prebot-large-eco-creature-method-195 ((this prebot-large-eco-creature)) + (when (not (logtest? (-> this flags) (eco-creature-flag ecf2))) + (logior! (-> this flags) (eco-creature-flag ecf2)) + (send-event (ppointer->process (-> this parent)) 'eco-creature-died (-> this root trans)) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate knocked (prebot-large-eco-creature) + :virtual #t + :enter (behavior () + (cond + ((and (-> self split-type) (or (= (-> self hit-points) 0.0) (nonzero? (-> self fated-time)))) + (large-eco-creature-split) + (go-virtual wait-for-children) + ) + (else + (let ((t9-2 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate wait-for-children (prebot-large-eco-creature) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('eco-creature-died) + (let ((v1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> v1-1 from) (process->ppointer proc)) + (set! (-> v1-1 num-params) argc) + (set! (-> v1-1 message) message) + (set! (-> v1-1 param 0) (-> block param 0)) + (set! (-> v1-1 param 1) (-> block param 1)) + (set! (-> v1-1 param 2) (-> block param 2)) + (set! (-> v1-1 param 3) (-> block param 3)) + (set! (-> v1-1 param 4) (-> block param 4)) + (set! (-> v1-1 param 5) (-> block param 5)) + (send-event-function (ppointer->process (-> self parent)) v1-1) + ) + ) + ) + ) + :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)) + (let ((v1-6 (-> self nav))) + (logclear! (-> v1-6 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + (logclear! (-> self root nav-flags) (nav-flags has-root-sphere)) + ) + :code (behavior () + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + ) + ) + +;; failed to figure out what this is: +(defstate attack (prebot-large-eco-creature) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logclear! (-> self flags) (eco-creature-flag ecf1)) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (set! (-> self root penetrate-using) (penetrate generic-attack lunge)) + (reset-penetrate! self) + (logior! (-> self focus-status) (focus-status dangerous)) + (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) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data (-> self attack-anims (rand-vu-int-count (-> self attack-anims length)))) + ) + ) + :exit (behavior () + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (nav-enemy-method-179 self) + (let ((v1-4 (-> self nav))) + (set! (-> v1-4 target-speed) (-> self enemy-info run-travel-speed)) + ) + 0 + (let ((v1-6 (-> self nav))) + (set! (-> v1-6 max-rotation-rate) (-> self enemy-info maximum-rotation-rate)) + ) + 0 + (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 () + (reset-penetrate! self) + nav-state + (if (logtest? (-> self enemy-flags) (enemy-flag victory)) + (logior! (-> self flags) (eco-creature-flag ecf1)) + ) + (cond + ((ja-group-in-array? (-> self attack-anims)) + (ja :num! (seek!)) + (when (>= (ja-aframe-num 0) (-> self attack-stop-frame)) + (let ((v1-17 (-> self nav))) + (set! (-> v1-17 target-speed) 0.0) + ) + 0 + (let ((v1-20 (-> self nav state))) + (set! (-> v1-20 speed) 0.0) + ) + 0 + (let ((v1-22 (-> self nav))) + (set! (-> v1-22 max-rotation-rate) 0.0) + ) + 0 + ) + (when (ja-done? 0) + (if (logtest? (-> self flags) (eco-creature-flag ecf1)) + (go-virtual victory) + (go-hostile self) + ) + ) + ) + ((logtest? (-> self flags) (eco-creature-flag ecf1)) + (go-virtual victory) + ) + (else + (go-hostile self) + ) + ) + ) + :code sleep-code + :post nav-enemy-chase-post + ) + +;; failed to figure out what this is: +(defstate notice (prebot-large-eco-creature) + :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 hostile (prebot-large-eco-creature) + :virtual #t + :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 (and a0-1 (time-elapsed? (-> self state-time) (seconds 0.1))) + (let ((gp-1 + (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable a0-1) 0) (-> self root trans)) + ) + ) + (if (and (< (vector-normalize-ret-len! gp-1 1.0) 18432.0) + (< (cos 5461.3335) (vector-dot gp-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + ) + (go-virtual attack) + ) + ) + ) + ) + (cond + ((not (logtest? (-> self flags) (eco-creature-flag ecf0))) + (let ((v1-29 (ja-group))) + (when (not (and v1-29 (= v1-29 (-> self draw art-group data (-> self enemy-info hostile-anim))))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data (-> self enemy-info hostile-anim)) :num! min) + ) + ) + (ja :num! (loop! (/ (-> self nav state speed) (* 0.5 (-> self enemy-info run-travel-speed))))) + ) + (else + (prebot-large-eco-creature-method-194 self) + ) + ) + ) + :code (behavior () + (until #f + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate circling (prebot-large-eco-creature) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy circling) trans))) + (if t9-0 + (t9-0) + ) + ) + (cond + ((not (logtest? (-> self flags) (eco-creature-flag ecf0))) + (let ((v1-8 (ja-group))) + (when (not (and v1-8 (= v1-8 (-> self draw art-group data (-> self enemy-info walk-anim))))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data (-> self enemy-info walk-anim)) :num! min) + ) + ) + (ja :num! (loop! (/ (-> self nav state speed) (* 0.5 (-> self enemy-info run-travel-speed))))) + ) + (else + (prebot-large-eco-creature-method-194 self) + ) + ) + ) + :code (behavior () + (nav-enemy-method-176 self) + (until #f + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate pacing (prebot-large-eco-creature) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy pacing) trans))) + (if t9-0 + (t9-0) + ) + ) + (cond + ((not (logtest? (-> self flags) (eco-creature-flag ecf0))) + (let ((v1-8 (ja-group))) + (when (not (and v1-8 (= v1-8 (-> self draw art-group data (-> self enemy-info walk-anim))))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data (-> self enemy-info walk-anim)) :num! min) + ) + ) + (ja :num! (loop! (/ (-> self nav state speed) (* 0.5 (-> self enemy-info run-travel-speed))))) + ) + (else + (prebot-large-eco-creature-method-194 self) + ) + ) + ) + :code (behavior () + (until #f + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate stare (prebot-large-eco-creature) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy stare) trans))) + (if t9-0 + (t9-0) + ) + ) + (cond + ((not (logtest? (-> self flags) (eco-creature-flag ecf0))) + (let ((v1-8 (ja-group))) + (when (not (and v1-8 (= v1-8 (-> self draw art-group data (-> self enemy-info idle-anim))))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data (-> self enemy-info idle-anim)) :num! min) + ) + ) + (ja :num! (loop!)) + ) + (else + (prebot-large-eco-creature-method-194 self) + ) + ) + ) + :code (behavior () + (until #f + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate victory (prebot-large-eco-creature) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (ja-no-eval :group! (-> self draw art-group data (-> self victory-anims (rand-vu-int-count (-> self victory-anims length)))) + :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 unfold (prebot-large-eco-creature) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (event-handler self proc argc message block) + ) + :enter (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data 13) :num! min) + ) + :trans (behavior () + (ja :num! (seek!)) + (if (ja-done? 0) + (go-best-state self) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate fly-to-dest (prebot-large-eco-creature) + :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)))) + (if (or (not (logtest? (attack-mask penetrate-using) (-> (the-as attack-info v1-1) mask))) + (logand (penetrate + vehicle + dark-skin + dark-punch + dark-bomb + dark-smack + explode + jak-yellow-shot + jak-red-shot + jak-blue-shot + jak-dark-shot + jak-red-shockwave + jak-dark-nuke + jak-dark-blackhole + ) + (-> (the-as attack-info v1-1) penetrate-using) + ) + ) + (enemy-event-handler proc argc message block) + (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)) + ) + ) + ) + ) + ) + #f + ) + (('touch 'bonk) + (if (and (< (-> self which-trajectory) 2) (= proc *target*)) + (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)) + ) + ) + ) + (event-handler self proc argc message block) + ) + #t + ) + (('set-dest) + (let ((s5-0 (the-as object (-> block param 0))) + (gp-0 (the-as object (-> block param 1))) + ) + (let ((f30-0 (the-as float (-> block param 2))) + (f28-0 (the-as float (-> block param 3))) + ) + (if (< (-> (the-as vector s5-0) y) (-> (the-as vector gp-0) y)) + (+! f30-0 (- (-> (the-as vector gp-0) y) (-> (the-as vector s5-0) y))) + ) + (let ((f0-15 (* 0.0000061035157 (vector-vector-xz-distance (the-as vector s5-0) (the-as vector gp-0)) f28-0))) + (setup-from-to-duration-and-height! (-> self traj) (the-as vector s5-0) (the-as vector gp-0) f0-15 f30-0) + ) + ) + (let ((v1-27 (new 'stack-no-clear 'vector))) + (vector-! v1-27 (the-as vector gp-0) (the-as vector s5-0)) + (set! (-> v1-27 y) 0.0) + (let ((f30-1 (atan (-> v1-27 x) (-> v1-27 z)))) + (quaternion-set! (-> self root quat) 0.0 (sin (* 0.5 f30-1)) 0.0 (cos (* 0.5 f30-1))) + ) + ) + (set! (-> self which-trajectory) 0) + (set! (-> self x-rotate) 0.0) + (set! (-> self y-rotate) 0.0) + (set! (-> self root trans quad) (-> (the-as vector s5-0) quad)) + (set! (-> self launch-pos quad) (-> (the-as vector s5-0) quad)) + (set! (-> self launch quad) (-> (the-as vector s5-0) quad)) + (let* ((v1-36 (-> self nav)) + (f0-25 (-> v1-36 extra-nav-sphere w)) + ) + (set! (-> v1-36 extra-nav-sphere quad) (-> (the-as vector gp-0) quad)) + (set! (-> v1-36 extra-nav-sphere w) f0-25) + ) + ) + 0 + (let ((v1-39 (-> self nav))) + (set! (-> v1-39 extra-nav-sphere w) 16384.0) + ) + 0 + (let ((v1-41 (-> self nav))) + (logior! (-> v1-41 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + ) + (else + (if (> (-> self which-trajectory) 0) + (event-handler self proc argc message block) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (ja :group! (-> self draw art-group data 12) :num! min) + ) + :exit (behavior () + (quaternion-identity! (-> self spin-jm quat)) + (let ((v1-1 (-> self nav))) + (logclear! (-> v1-1 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + ) + :trans (behavior () + (let ((v1-0 (-> self which-trajectory))) + (cond + ((zero? v1-0) + (sound-play "launch-trail" :id (-> self trail-sound) :position (-> self root trans)) + (logior! (-> self flags) (eco-creature-flag ecf4)) + (+! (-> self x-rotate) 4369.067) + (+! (-> self y-rotate) 3458.8445) + ) + ((= v1-0 1) + (when (logtest? (-> self flags) (eco-creature-flag ecf4)) + (sound-stop (-> self trail-sound)) + (logclear! (-> self flags) (eco-creature-flag ecf4)) + ) + (+! (-> self x-rotate) 7281.778) + (set! (-> self y-rotate) 0.0) + ) + (else + (seek! (-> self x-rotate) 65353.957 7281.778) + ) + ) + ) + (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 spin-jm quat) gp-0 s5-0)) + ) + (cond + ((time-elapsed? (-> self state-time) (the int (-> self traj time))) + (let ((v1-34 (-> self which-trajectory))) + (cond + ((zero? v1-34) + (set! (-> self which-trajectory) 1) + (sound-play "caveco-land" :position (-> self root trans)) + (compute-trans-at-time + (-> self traj) + (fmin (-> self traj time) (the float (- (current-time) (-> self state-time)))) + (-> self root trans) + ) + (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)) + (setup-from-to-duration-and-height! (-> self traj) (-> self root trans) gp-3 75.0 4096.0) + ) + ) + ((= v1-34 1) + (set! (-> self which-trajectory) 2) + (compute-trans-at-time + (-> self traj) + (fmin (-> self traj time) (the float (- (current-time) (-> self state-time)))) + (-> self root trans) + ) + (set-time! (-> self state-time)) + (let ((gp-5 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (the-as vector (-> self traj))))) + (set! (-> gp-5 y) 0.0) + (vector-normalize! gp-5 4096.0) + (vector+! gp-5 gp-5 (-> self root trans)) + (setup-from-to-duration-and-height! (-> self traj) (-> self root trans) gp-5 37.5 1024.0) + ) + ) + ((= v1-34 2) + (compute-trans-at-time + (-> self traj) + (fmin (-> self traj time) (the float (- (current-time) (-> self state-time)))) + (-> self root trans) + ) + (set! (-> self which-trajectory) 3) + (let* ((gp-6 (-> self state-time)) + (f30-0 300.0) + (v1-76 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-77 (the-as number (logior #x3f800000 v1-76))) + ) + (set! (-> self state-time) (+ gp-6 (the int (* f30-0 (+ -1.0 (the-as float v1-77)))))) + ) + ) + (else + (go-virtual unfold) + ) + ) + ) + ) + ((< (-> self which-trajectory) 3) + (compute-trans-at-time + (-> self traj) + (fmin (-> self traj time) (the float (- (current-time) (-> self state-time)))) + (-> self root trans) + ) + (if (logtest? (-> self flags) (eco-creature-flag ecf3)) + (spawn-from-cspace (-> self trail-part) (-> self node-list data 3)) + ) + ) + ) + (ja :num! (loop! 0.2)) + ) + :code sleep-code + :post (behavior () + (transform-post) + (logior! (-> self flags) (eco-creature-flag ecf3)) + (do-push-aways (-> self root)) + ) + ) + +;; definition for method 122 of type prebot-large-eco-creature +(defmethod go-idle2 ((this prebot-large-eco-creature)) + (set! (-> this event-hook) (-> (method-of-object this fly-to-dest) event)) + (go (method-of-object this fly-to-dest)) + ) + +;; definition for method 120 of type prebot-large-eco-creature +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this prebot-large-eco-creature)) + (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 16) 0))) + (set! (-> s5-0 total-prims) (the-as uint 17)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd jak bot hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid deadly)) + (set! (-> s4-0 transform-index) 26) + (set-vector! (-> s4-0 local-sphere) 1076.4288 -3118.6943 2700.0833 18061.312) + (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)) + (set! (-> v1-14 prim-core action) (collide-action solid)) + (set-vector! (-> v1-14 local-sphere) 0.0 5734.4 0.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 enemy)) + (set! (-> v1-16 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid deadly)) + (set! (-> v1-16 transform-index) 3) + (set-vector! (-> v1-16 local-sphere) 0.0 0.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 bot hit-by-others-list player-list)) + (set! (-> v1-18 prim-core action) (collide-action solid deadly)) + (set! (-> v1-18 transform-index) 4) + (set-vector! (-> v1-18 local-sphere) -26.2144 -2495.2832 378.88 4096.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 hit-by-others-list player-list)) + (set! (-> v1-20 prim-core action) (collide-action solid deadly)) + (set! (-> v1-20 transform-index) 6) + (set-vector! (-> v1-20 local-sphere) -32.3584 281.8048 1412.7104 2940.109) + ) + (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 hit-by-others-list player-list)) + (set! (-> v1-22 prim-core action) (collide-action solid deadly)) + (set! (-> v1-22 transform-index) 9) + (set-vector! (-> v1-22 local-sphere) -12.288 84.3776 -2.4576 2387.5583) + ) + (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 hit-by-others-list player-list)) + (set! (-> v1-24 prim-core action) (collide-action solid deadly)) + (set! (-> v1-24 transform-index) 10) + (set-vector! (-> v1-24 local-sphere) 178.5856 -1004.3392 81.5104 2358.4768) + ) + (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 hit-by-others-list player-list)) + (set! (-> v1-26 prim-core action) (collide-action solid deadly)) + (set! (-> v1-26 transform-index) 18) + (set-vector! (-> v1-26 local-sphere) 0.0 0.0 0.0 2896.6912) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-28 prim-core action) (collide-action solid deadly)) + (set! (-> v1-28 transform-index) 19) + (set-vector! (-> v1-28 local-sphere) -130.2528 1489.7152 -119.1936 2784.8704) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-30 prim-core action) (collide-action solid deadly)) + (set! (-> v1-30 transform-index) 28) + (set-vector! (-> v1-30 local-sphere) 0.0 0.0 0.0 2600.5503) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-32 prim-core action) (collide-action solid deadly)) + (set! (-> v1-32 transform-index) 29) + (set-vector! (-> v1-32 local-sphere) 0.0 0.0 0.0 2296.6272) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-34 prim-core action) (collide-action solid deadly)) + (set! (-> v1-34 transform-index) 30) + (set-vector! (-> v1-34 local-sphere) 82.7392 -43.008 -394.0352 1869.824) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-36 prim-core action) (collide-action solid deadly)) + (set! (-> v1-36 transform-index) 31) + (set-vector! (-> v1-36 local-sphere) 151.9616 0.0 -608.256 1713.3568) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-38 prim-core action) (collide-action solid deadly)) + (set! (-> v1-38 transform-index) 33) + (set-vector! (-> v1-38 local-sphere) -1664.2048 -741.7856 -648.8064 3235.4304) + ) + (let ((v1-40 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-40 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-40 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-40 prim-core action) (collide-action solid deadly)) + (set! (-> v1-40 transform-index) 35) + (set-vector! (-> v1-40 local-sphere) 1078.4768 509.1328 511.1808 3509.8623) + ) + (let ((v1-42 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-42 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-42 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-42 prim-core action) (collide-action solid deadly)) + (set! (-> v1-42 transform-index) 37) + (set-vector! (-> v1-42 local-sphere) 791.7568 571.8016 355.9424 3460.3008) + ) + (let ((v1-44 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-44 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-44 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> v1-44 prim-core action) (collide-action solid deadly)) + (set! (-> v1-44 transform-index) 39) + (set-vector! (-> v1-44 local-sphere) -593.1008 -499.712 -635.6992 3313.2544) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (let ((v1-46 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-46 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-46 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 7 of type prebot-large-eco-creature +(defmethod relocate ((this prebot-large-eco-creature) (offset int)) + (if (nonzero? (-> this spin-jm)) + (&+! (-> this spin-jm) offset) + ) + (if (nonzero? (-> this trail-part)) + (&+! (-> this trail-part) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 10 of type prebot-large-eco-creature +(defmethod deactivate ((this prebot-large-eco-creature)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this trail-part)) + (kill-particles (-> this trail-part)) + ) + (when (logtest? (-> this flags) (eco-creature-flag ecf4)) + (sound-stop (-> this trail-sound)) + (logclear! (-> this flags) (eco-creature-flag ecf4)) + ) + (call-parent-method this) + (none) + ) + +;; definition for method 121 of type prebot-large-eco-creature +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this prebot-large-eco-creature)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-cav-eco-lg" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *prebot-large-eco-creature-nav-enemy-info*) + (logior! (-> this draw global-effect) (draw-control-global-effect rim-lights2)) + (let ((v1-8 (-> this neck))) + (set! (-> v1-8 up) (the-as uint 1)) + (set! (-> v1-8 nose) (the-as uint 2)) + (set! (-> v1-8 ear) (the-as uint 0)) + (set-vector! (-> v1-8 twist-max) 3640.889 11832.889 0.0 1.0) + (set! (-> v1-8 ignore-angle) 15473.777) + ) + (let ((v1-10 (-> this nav))) + (set! (-> v1-10 speed-scale) 1.0) + ) + 0 + (set-gravity-length (-> this root dynam) 573440.0) + (logior! (-> this nav flags) (nav-control-flag momentum-ignore-heading)) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (logior! (-> this focus-status) (focus-status dangerous)) + (logior! (-> this enemy-flags) (enemy-flag dangerous-backup)) + (set! (-> this attack-anims) (new 'static 'boxed-array :type int32 8 9)) + (set! (-> this victory-anims) (new 'static 'boxed-array :type int32 10 11)) + (set! (-> this turn-left-anim) 6) + (set! (-> this turn-right-anim) 7) + (set! (-> this split-type) prebot-medium-eco-creature) + (set! (-> this attack-stop-frame) 0.0) + (set! (-> this which-trajectory) 0) + (set! (-> this spin-jm) (new 'process 'joint-mod (joint-mod-mode joint-set*) this 3)) + (set! (-> this trail-part) (create-launch-control (-> *part-group-id-table* 440) this)) + (set! (-> this flags) (eco-creature-flag)) + (set! (-> this trail-sound) (new-sound-id)) + (send-event (ppointer->process (-> this parent)) 'start-critter) + 0 + (none) + ) + +;; definition of type prebot-medium-eco-creature +(deftype prebot-medium-eco-creature (prebot-large-eco-creature) + ((is-top basic) + (is-bottom basic) + (initial-scale float) + (final-scale float) + ) + (:methods + (prebot-medium-eco-creature-method-196 (_type_) none) + (prebot-medium-eco-creature-method-197 (_type_) none) + ) + ) + +;; definition for method 3 of type prebot-medium-eco-creature +(defmethod inspect ((this prebot-medium-eco-creature)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type prebot-large-eco-creature inspect))) + (t9-0 this) + ) + (format #t "~2Tis-top: ~A~%" (-> this is-top)) + (format #t "~2Tis-bottom: ~A~%" (-> this is-bottom)) + (format #t "~2Tinitial-scale: ~f~%" (-> this initial-scale)) + (format #t "~2Tfinal-scale: ~f~%" (-> this final-scale)) + (label cfg-4) + this + ) + +;; definition for function large-eco-creature-split +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior large-eco-creature-split prebot-large-eco-creature () + (sound-play "caveco-spawn" :position (-> self root trans)) + (let ((gp-1 (new 'stack-no-clear 'enemy-init-by-other-params))) + (let ((v1-2 (new 'stack-no-clear 'vector))) + (-> self root transv) + (set! (-> v1-2 quad) (-> self root trans quad)) + (set! (-> gp-1 trans quad) (-> v1-2 quad)) + ) + (quaternion-copy! (-> gp-1 quat) (-> self root quat)) + (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) (-> 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))) + (t9-4 s5-1 self "eco-creature" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-1 enemy-init-by-other self gp-1) + (-> s5-1 ppointer) + ) + ) + ) + (when v1-9 + (set-vector! + (-> (the-as (pointer prebot-medium-eco-creature) v1-9) 0 incoming attack-direction) + (-> self incoming attack-direction z) + (-> self incoming attack-direction y) + (- (-> self incoming attack-direction x)) + 1.0 + ) + (set! (-> (the-as (pointer prebot-medium-eco-creature) v1-9) 0 incoming knocked-type) + (knocked-type blue-shot) + ) + (if (logtest? (-> self flags) (eco-creature-flag ecf2)) + (set! (-> (the-as prebot-medium-eco-creature (-> (the-as (pointer prebot-medium-eco-creature) v1-9) 0)) flags) + (logior (-> (the-as prebot-large-eco-creature (-> (the-as (pointer prebot-medium-eco-creature) v1-9) 0)) flags) + (eco-creature-flag ecf2) + ) + ) + (logclear! + (-> (the-as prebot-medium-eco-creature (-> (the-as (pointer prebot-medium-eco-creature) v1-9) 0)) flags) + (eco-creature-flag ecf2) + ) + ) + (prebot-medium-eco-creature-method-196 + (the-as prebot-medium-eco-creature (-> (the-as (pointer prebot-medium-eco-creature) v1-9) 0)) + ) + ) + ) + (let* ((s5-2 (get-process *default-dead-pool* (-> self split-type) #x4000 1)) + (v1-13 (when s5-2 + (let ((t9-8 (method-of-type process activate))) + (t9-8 s5-2 self "eco-creature" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-2 enemy-init-by-other self gp-1) + (-> s5-2 ppointer) + ) + ) + ) + (when v1-13 + (set-vector! + (-> (the-as (pointer prebot-medium-eco-creature) v1-13) 0 incoming attack-direction) + (- (-> self incoming attack-direction z)) + (-> self incoming attack-direction y) + (-> self incoming attack-direction x) + 1.0 + ) + (set! (-> (the-as (pointer prebot-medium-eco-creature) v1-13) 0 incoming knocked-type) + (knocked-type blue-shot) + ) + (if (logtest? (-> self flags) (eco-creature-flag ecf2)) + (logior! + (-> (the-as prebot-medium-eco-creature (-> (the-as (pointer prebot-medium-eco-creature) v1-13) 0)) flags) + (eco-creature-flag ecf2) + ) + (logclear! + (-> (the-as prebot-medium-eco-creature (-> (the-as (pointer prebot-medium-eco-creature) v1-13) 0)) flags) + (eco-creature-flag ecf2) + ) + ) + (prebot-medium-eco-creature-method-197 + (the-as prebot-medium-eco-creature (-> (the-as (pointer prebot-medium-eco-creature) v1-13) 0)) + ) + ) + ) + ) + (prebot-large-eco-creature-method-195 self) + 0 + (none) + ) + +;; definition for symbol *prebot-medium-eco-creature-nav-enemy-info*, type nav-enemy-info +(define *prebot-medium-eco-creature-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 2 + :notice-anim 2 + :hostile-anim 15 + :hit-anim 2 + :knocked-anim 2 + :knocked-land-anim 2 + :die-anim 2 + :die-falling-anim 2 + :victory-anim 2 + :jump-wind-up-anim 2 + :jump-in-air-anim 2 + :jump-land-anim 2 + :neck-joint 5 + :look-at-joint 5 + :bullseye-joint 4 + :notice-distance (meters 200) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 20) + :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) + :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 49152.0 + :knocked-red-vy-lo 57344.0 + :knocked-red-vy-hi 69632.0 + :knocked-blue-vxz-lo 32768.0 + :knocked-blue-vxz-hi 40960.0 + :knocked-blue-vy-lo 20480.0 + :knocked-blue-vy-hi 53248.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 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 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 10.176285) + :geo-tform (new 'static 'vector :x 1.0 :w 35404.914) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 8223.438) + :geo-tform (new 'static 'vector :x 1.0 :w 27181.492) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 14248.819) + :geo-tform (new 'static 'vector :x -1.0 :w 10623.986) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 12262.859) + :geo-tform (new 'static 'vector :x 1.0 :w 33438.652) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.137 :z -0.9905 :w 11373.791) + :geo-tform (new 'static 'vector :x 0.2271 :y 0.9734 :z 0.0279 :w 36639.176) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5102 :z -0.86 :w 20530.754) + :geo-tform (new 'static 'vector :x 0.409 :y -0.0529 :z 0.9109 :w 32271.676) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6644 :z -0.7473 :w 1968.9199) + :geo-tform (new 'static 'vector :x 0.4093 :y 0.033 :z 0.9117 :w 33077.91) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9613 :z -0.2752 :w 2214.5525) + :geo-tform (new 'static 'vector :x 0.4059 :y -0.0481 :z 0.9126 :w 34502.54) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5153 :z 0.8569 :w 2080.0034) + :geo-tform (new 'static 'vector :x 0.4027 :y -0.0356 :z 0.9146 :w 32440.574) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint 10 + :pre-tform (new 'static 'vector :x 0.4859 :z 0.8739 :w 3273.5598) + :geo-tform (new 'static 'vector :x 0.414 :y 0.0464 :z 0.909 :w 29818.152) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8326 :z -0.5538 :w 3106.5886) + :geo-tform (new 'static 'vector :x 0.419 :y -0.032 :z 0.9073 :w 32459.652) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint 10 + :pre-tform (new 'static 'vector :x -0.9421 :z -0.3352 :w 6646.0605) + :geo-tform (new 'static 'vector :x 0.3914 :y -0.2 :z 0.8982 :w 37623.16) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3413 :z -0.9399 :w 1832.5868) + :geo-tform (new 'static 'vector :x 0.4204 :y -0.1424 :z 0.896 :w 38915.023) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.1371 :z 0.9905 :w 11369.786) + :geo-tform (new 'static 'vector :x -0.2272 :y 0.9734 :z 0.0279 :w 28896.426) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5101 :z 0.86 :w 20534.176) + :geo-tform (new 'static 'vector :x -0.026 :y 0.9979 :z 0.0579 :w 23979.531) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6645 :z 0.7472 :w 1958.0337) + :geo-tform (new 'static 'vector :x 0.016 :y 0.9992 :z -0.0358 :w 23969.791) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9615 :z 0.2744 :w 2230.645) + :geo-tform (new 'static 'vector :x 0.0911 :y 0.9943 :z 0.0536 :w 24079.475) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5098 :z -0.8602 :w 2098.3352) + :geo-tform (new 'static 'vector :x -0.0178 :y 0.999 :z 0.0406 :w 24125.459) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint 19 + :pre-tform (new 'static 'vector :x 0.4819 :z -0.8762 :w 3256.2107) + :geo-tform (new 'static 'vector :x -0.1538 :y 0.9868 :z -0.0491 :w 23956.574) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8364 :z 0.548 :w 3087.583) + :geo-tform (new 'static 'vector :x -0.017 :y 0.9991 :z 0.0369 :w 23745.531) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint 19 + :pre-tform (new 'static 'vector :x -0.9425 :z 0.3339 :w 6655.1807) + :geo-tform (new 'static 'vector :x 0.2492 :y 0.945 :z 0.2115 :w 24615.268) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3403 :z 0.9402 :w 1852.0657) + :geo-tform (new 'static 'vector :x 0.3178 :y 0.9363 :z 0.1493 :w 24121.836) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -1.0 :w 20948.764) + :geo-tform (new 'static 'vector :x -1.0 :w 9182.285) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9999 :z 0.0068 :w 7387.509) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.003 :z -0.0014 :w 16198.405) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9697 :z -0.244 :w 191.6382) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint -1 + :pre-tform (new 'static 'vector :y -1.0 :w 10.176285) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint -1 + :pre-tform (new 'static 'vector :y -1.0 :w 10.176285) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint -1 + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint 26 + :pre-tform (new 'static 'vector :x -0.4854 :z -0.8742 :w 21186.406) + :geo-tform (new 'static 'vector :x 0.6599 :y 0.6796 :z 0.3201 :w 35879.65) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9993 :z 0.0363 :w 2717.3774) + :geo-tform (new 'static 'vector :x 0.6708 :y 0.7057 :z 0.2277 :w 34044.242) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint 26 + :pre-tform (new 'static 'vector :x 0.3584 :z -0.9335 :w 11286.792) + :geo-tform (new 'static 'vector :x -0.4444 :y 0.7119 :z -0.5437 :w 28463.65) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1147 :z -0.9933 :w 2024.0066) + :geo-tform (new 'static 'vector :x -0.5154 :y 0.6809 :z -0.5201 :w 27281.908) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 36 + :parent-joint 26 + :pre-tform (new 'static 'vector :x -0.4859 :z 0.8739 :w 21191.012) + :geo-tform (new 'static 'vector :x 0.1968 :y 0.4177 :z -0.8869 :w 17933.508) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 37 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9993 :z -0.0361 :w 2729.0828) + :geo-tform (new 'static 'vector :x 0.0825 :y 0.3055 :z -0.9485 :w 17459.846) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 38 + :parent-joint 26 + :pre-tform (new 'static 'vector :x 0.3588 :z 0.9333 :w 11281.3125) + :geo-tform (new 'static 'vector :x 0.2273 :y 0.5912 :z 0.7738 :w 23386.34) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 39 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1145 :z 0.9934 :w 2026.6462) + :geo-tform (new 'static 'vector :x 0.2996 :y 0.5792 :z 0.758 :w 21904.426) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + ) + ) + :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 #t + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 15 + :turn-anim -1 + :run-anim 15 + :taunt-anim -1 + :run-travel-speed (meters 5) + :run-acceleration (meters 32) + :run-turning-acceleration (meters 40) + :walk-travel-speed (meters 5) + :walk-acceleration (meters 16) + :walk-turning-acceleration (meters 40) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 3) + :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! (-> *prebot-medium-eco-creature-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; definition for function prebot-eco-creature-joint-callback +(defun prebot-eco-creature-joint-callback ((arg0 cspace) (arg1 transformq)) + (when (and (= (the-as float (-> arg0 param1)) 1.0) (= (-> arg0 param0) prebot-eco-creature-joint-callback)) + (let ((a2-1 arg0)) + (set! (-> a2-1 param0) cspace<-parented-transformq-joint!) + ) + ) + (set-vector! + (-> arg1 scale) + (the-as float (-> arg0 param1)) + (the-as float (-> arg0 param1)) + (the-as float (-> arg0 param1)) + 1.0 + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (none) + ) + +;; definition for method 196 of type prebot-medium-eco-creature +;; WARN: Return type mismatch int vs none. +(defmethod prebot-medium-eco-creature-method-196 ((this prebot-medium-eco-creature)) + (set! (-> this is-top) (the-as basic #t)) + (let ((v1-2 (-> this node-list data 32))) + (set! (-> v1-2 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-2 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-4 (-> this node-list data 33))) + (set! (-> v1-4 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-4 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-6 (-> this node-list data 36))) + (set! (-> v1-6 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-6 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-8 (-> this node-list data 37))) + (set! (-> v1-8 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-8 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-10 (-> this node-list data 34))) + (set! (-> v1-10 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-10 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-12 (-> this node-list data 35))) + (set! (-> v1-12 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-12 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-14 (-> this node-list data 38))) + (set! (-> v1-14 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-14 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-16 (-> this node-list data 39))) + (set! (-> v1-16 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-16 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-18 (-> this node-list data 27))) + (set! (-> v1-18 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-18 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-20 (-> this node-list data 28))) + (set! (-> v1-20 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-20 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-22 (-> this node-list data 29))) + (set! (-> v1-22 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-22 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-24 (-> this node-list data 30))) + (set! (-> v1-24 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-24 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-26 (-> this node-list data 31))) + (set! (-> v1-26 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-26 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-28 (-> this node-list data 26))) + (set! (-> v1-28 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-28 param1) (the-as basic #x3e99999a)) + ) + 0 + (none) + ) + +;; definition for method 197 of type prebot-medium-eco-creature +;; WARN: Return type mismatch int vs none. +(defmethod prebot-medium-eco-creature-method-197 ((this prebot-medium-eco-creature)) + (set! (-> this is-bottom) (the-as basic #t)) + (let ((v1-2 (-> this node-list data 4))) + (set! (-> v1-2 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-2 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-4 (-> this node-list data 5))) + (set! (-> v1-4 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-4 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-6 (-> this node-list data 6))) + (set! (-> v1-6 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-6 param1) (the-as basic #x3d23d70a)) + ) + (let ((v1-8 (-> this node-list data 7))) + (set! (-> v1-8 param0) prebot-eco-creature-joint-callback) + (set! (-> v1-8 param1) (the-as basic #x3d23d70a)) + ) + 0 + (none) + ) + +;; definition for method 122 of type prebot-medium-eco-creature +(defmethod go-idle2 ((this prebot-medium-eco-creature)) + (set-vector! (-> this root scale) (-> this initial-scale) (-> this initial-scale) (-> this initial-scale) 1.0) + (go (method-of-object this knocked)) + ) + +;; definition for method 120 of type prebot-medium-eco-creature +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this prebot-medium-eco-creature)) + (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 12) 0))) + (set! (-> s5-0 total-prims) (the-as uint 13)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd jak bot hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid deadly)) + (set! (-> s4-0 transform-index) 26) + (set-vector! (-> s4-0 local-sphere) 532.48 -1556.48 1310.72 9011.2) + (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)) + (set! (-> v1-14 prim-core action) (collide-action solid)) + (set-vector! (-> v1-14 local-sphere) 0.0 2867.2 0.0 4096.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 bot hit-by-others-list player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid deadly)) + (set! (-> v1-16 transform-index) 3) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 0.0 2048.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 hit-by-others-list player-list)) + (set! (-> v1-18 prim-core action) (collide-action solid deadly)) + (set! (-> v1-18 transform-index) 4) + (set-vector! (-> v1-18 local-sphere) 0.0 -1228.8 204.8 2048.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 hit-by-others-list player-list)) + (set! (-> v1-20 prim-core action) (collide-action solid deadly)) + (set! (-> v1-20 transform-index) 6) + (set-vector! (-> v1-20 local-sphere) 0.0 163.84 696.32 1474.56) + ) + (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 hit-by-others-list player-list)) + (set! (-> v1-22 prim-core action) (collide-action solid deadly)) + (set! (-> v1-22 transform-index) 28) + (set-vector! (-> v1-22 local-sphere) 0.0 0.0 0.0 1269.76) + ) + (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 hit-by-others-list player-list)) + (set! (-> v1-24 prim-core action) (collide-action solid deadly)) + (set! (-> v1-24 transform-index) 29) + (set-vector! (-> v1-24 local-sphere) 0.0 0.0 0.0 1146.88) + ) + (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 hit-by-others-list player-list)) + (set! (-> v1-26 prim-core action) (collide-action solid deadly)) + (set! (-> v1-26 transform-index) 30) + (set-vector! (-> v1-26 local-sphere) 40.96 0.0 -204.8 942.08) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-28 prim-core action) (collide-action solid deadly)) + (set! (-> v1-28 transform-index) 31) + (set-vector! (-> v1-28 local-sphere) 81.92 0.0 -286.72 860.16) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-30 prim-core action) (collide-action solid deadly)) + (set! (-> v1-30 transform-index) 33) + (set-vector! (-> v1-30 local-sphere) -819.2 -368.64 -327.68 1597.44) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-32 prim-core action) (collide-action solid deadly)) + (set! (-> v1-32 transform-index) 35) + (set-vector! (-> v1-32 local-sphere) 532.48 245.76 245.76 1761.28) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-34 prim-core action) (collide-action solid deadly)) + (set! (-> v1-34 transform-index) 37) + (set-vector! (-> v1-34 local-sphere) 368.64 286.72 163.84 1720.32) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-36 prim-core action) (collide-action solid deadly)) + (set! (-> v1-36 transform-index) 39) + (set-vector! (-> v1-36 local-sphere) -286.72 -245.76 -327.68 1638.4) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (let ((v1-38 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-38 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-38 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 121 of type prebot-medium-eco-creature +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this prebot-medium-eco-creature)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-cav-eco-lg" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *prebot-medium-eco-creature-nav-enemy-info*) + (logior! (-> this draw global-effect) (draw-control-global-effect rim-lights2)) + (let ((v1-8 (-> this neck))) + (set! (-> v1-8 up) (the-as uint 1)) + (set! (-> v1-8 nose) (the-as uint 2)) + (set! (-> v1-8 ear) (the-as uint 0)) + (set-vector! (-> v1-8 twist-max) 3640.889 11832.889 0.0 1.0) + (set! (-> v1-8 ignore-angle) 15473.777) + ) + (let ((v1-10 (-> this nav))) + (set! (-> v1-10 speed-scale) 1.0) + ) + 0 + (set-gravity-length (-> this root dynam) 573440.0) + (logior! (-> this nav flags) (nav-control-flag momentum-ignore-heading)) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (logior! (-> this focus-status) (focus-status dangerous)) + (logior! (-> this enemy-flags) (enemy-flag dangerous-backup)) + (set! (-> this attack-anims) (new 'static 'boxed-array :type int32 14)) + (set! (-> this victory-anims) (new 'static 'boxed-array :type int32 10 11)) + (set! (-> this turn-left-anim) 6) + (set! (-> this turn-right-anim) 7) + (setup-masks (-> this draw) 0 2) + (set! (-> this is-top) #f) + (set! (-> this is-bottom) #f) + (set! (-> this initial-scale) 1.0) + (set! (-> this final-scale) 0.6) + (set! (-> this split-type) prebot-small-eco-creature) + (set! (-> this attack-stop-frame) 7.0) + (when (type? this medium-eco-creature-launched) + (set! (-> this spin-jm) (new 'process 'joint-mod (joint-mod-mode joint-set*) this 3)) + (set! (-> this trail-part) (create-launch-control (-> *part-group-id-table* 440) this)) + (logclear! (-> this flags) (eco-creature-flag ecf3)) + ) + (set! (-> this flags) (eco-creature-flag)) + (send-event (ppointer->process (-> this parent)) 'start-critter) + 0 + (none) + ) + +;; definition for function adjust-split-joints +;; WARN: Return type mismatch float vs none. +(defbehavior adjust-split-joints prebot-medium-eco-creature () + (cond + ((-> self is-top) + (let ((f0-2 (lerp-scale (-> self initial-scale) (-> self final-scale) (ja-aframe-num 0) 3.0 8.0))) + (set-vector! (-> self root scale) f0-2 f0-2 f0-2 1.0) + ) + (let ((f0-4 (lerp-scale 0.04 1.0 (ja-aframe-num 0) 2.0 7.0))) + (set! (-> self node-list data 32 param1) (the-as basic f0-4)) + (set! (-> self node-list data 33 param1) (the-as basic f0-4)) + (set! (-> self node-list data 36 param1) (the-as basic f0-4)) + (set! (-> self node-list data 37 param1) (the-as basic f0-4)) + (set! (-> self node-list data 34 param1) (the-as basic f0-4)) + (set! (-> self node-list data 35 param1) (the-as basic f0-4)) + (set! (-> self node-list data 38 param1) (the-as basic f0-4)) + (set! (-> self node-list data 39 param1) (the-as basic f0-4)) + (set! (-> self node-list data 27 param1) (the-as basic f0-4)) + (set! (-> self node-list data 28 param1) (the-as basic f0-4)) + (set! (-> self node-list data 29 param1) (the-as basic f0-4)) + (set! (-> self node-list data 30 param1) (the-as basic f0-4)) + (set! (-> self node-list data 31 param1) (the-as basic f0-4)) + (set! (-> self node-list data 26 param1) (the-as basic f0-4)) + ) + ) + (else + (let ((f0-7 (lerp-scale (-> self initial-scale) (-> self final-scale) (ja-aframe-num 0) 4.0 8.0))) + (set-vector! (-> self root scale) f0-7 f0-7 f0-7 1.0) + ) + (let ((f0-9 (lerp-scale 0.04 1.0 (ja-aframe-num 0) 3.0 7.0))) + (set! (-> self node-list data 4 param1) (the-as basic f0-9)) + (set! (-> self node-list data 5 param1) (the-as basic f0-9)) + (set! (-> self node-list data 6 param1) (the-as basic f0-9)) + (set! (-> self node-list data 7 param1) (the-as basic f0-9)) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate knocked-recover (prebot-medium-eco-creature) + :virtual #t + :code (behavior () + (cond + ((or (-> self is-top) (-> self is-bottom)) + (let ((gp-0 (if (-> self is-top) + (-> self draw art-group data 4) + (-> self draw art-group data 5) + ) + ) + ) + (cond + ((handle->process (-> self ragdoll-proc)) + (ja-channel-push! 1 0) + (ja-no-eval :group! gp-0 :num! (seek!) :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!)) + (adjust-split-joints) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! gp-0 :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (adjust-split-joints) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + (set! (-> self is-top) #f) + (set! (-> self is-bottom) #f) + (if (enemy-method-109 self) + (go-die self) + (go-hostile self) + ) + ) + (else + (let ((t9-14 (-> (method-of-type prebot-large-eco-creature knocked-recover) code))) + (if t9-14 + ((the-as (function none) t9-14)) + ) + ) + ) + ) + ) + ) + +;; definition of type prebot-small-eco-creature +(deftype prebot-small-eco-creature (prebot-medium-eco-creature) + () + ) + +;; definition for method 3 of type prebot-small-eco-creature +(defmethod inspect ((this prebot-small-eco-creature)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type prebot-medium-eco-creature inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for symbol *prebot-small-eco-creature-nav-enemy-info*, type nav-enemy-info +(define *prebot-small-eco-creature-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 2 + :notice-anim 2 + :hostile-anim 19 + :hit-anim 2 + :knocked-anim 2 + :knocked-land-anim 2 + :die-anim 2 + :die-falling-anim 2 + :victory-anim 2 + :jump-wind-up-anim 2 + :jump-in-air-anim 2 + :jump-land-anim 2 + :neck-joint 5 + :look-at-joint 5 + :bullseye-joint 4 + :sound-die (static-sound-name "caveco-death") + :notice-distance (meters 200) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 20) + :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 32768.0 + :knocked-red-vxz-hi 57344.0 + :knocked-red-vy-lo 65536.0 + :knocked-red-vy-hi 77824.0 + :knocked-blue-vxz-lo 40960.0 + :knocked-blue-vxz-hi 49152.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 61440.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 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 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 10.176285) + :geo-tform (new 'static 'vector :x 1.0 :w 35404.914) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 8223.438) + :geo-tform (new 'static 'vector :x 1.0 :w 27181.492) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 14248.819) + :geo-tform (new 'static 'vector :x -1.0 :w 10623.986) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 12262.859) + :geo-tform (new 'static 'vector :x 1.0 :w 33438.652) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.137 :z -0.9905 :w 11373.791) + :geo-tform (new 'static 'vector :x 0.2271 :y 0.9734 :z 0.0279 :w 36639.176) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5102 :z -0.86 :w 20530.754) + :geo-tform (new 'static 'vector :x 0.409 :y -0.0529 :z 0.9109 :w 32271.676) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6644 :z -0.7473 :w 1968.9199) + :geo-tform (new 'static 'vector :x 0.4093 :y 0.033 :z 0.9117 :w 33077.91) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9613 :z -0.2752 :w 2214.5525) + :geo-tform (new 'static 'vector :x 0.4059 :y -0.0481 :z 0.9126 :w 34502.54) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5153 :z 0.8569 :w 2080.0034) + :geo-tform (new 'static 'vector :x 0.4027 :y -0.0356 :z 0.9146 :w 32440.574) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint 10 + :pre-tform (new 'static 'vector :x 0.4859 :z 0.8739 :w 3273.5598) + :geo-tform (new 'static 'vector :x 0.414 :y 0.0464 :z 0.909 :w 29818.152) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8326 :z -0.5538 :w 3106.5886) + :geo-tform (new 'static 'vector :x 0.419 :y -0.032 :z 0.9073 :w 32459.652) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint 10 + :pre-tform (new 'static 'vector :x -0.9421 :z -0.3352 :w 6646.0605) + :geo-tform (new 'static 'vector :x 0.3914 :y -0.2 :z 0.8982 :w 37623.16) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3413 :z -0.9399 :w 1832.5868) + :geo-tform (new 'static 'vector :x 0.4204 :y -0.1424 :z 0.896 :w 38915.023) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.1371 :z 0.9905 :w 11369.786) + :geo-tform (new 'static 'vector :x -0.2272 :y 0.9734 :z 0.0279 :w 28896.426) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5101 :z 0.86 :w 20534.176) + :geo-tform (new 'static 'vector :x -0.026 :y 0.9979 :z 0.0579 :w 23979.531) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6645 :z 0.7472 :w 1958.0337) + :geo-tform (new 'static 'vector :x 0.016 :y 0.9992 :z -0.0358 :w 23969.791) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9615 :z 0.2744 :w 2230.645) + :geo-tform (new 'static 'vector :x 0.0911 :y 0.9943 :z 0.0536 :w 24079.475) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5098 :z -0.8602 :w 2098.3352) + :geo-tform (new 'static 'vector :x -0.0178 :y 0.999 :z 0.0406 :w 24125.459) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint 19 + :pre-tform (new 'static 'vector :x 0.4819 :z -0.8762 :w 3256.2107) + :geo-tform (new 'static 'vector :x -0.1538 :y 0.9868 :z -0.0491 :w 23956.574) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8364 :z 0.548 :w 3087.583) + :geo-tform (new 'static 'vector :x -0.017 :y 0.9991 :z 0.0369 :w 23745.531) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint 19 + :pre-tform (new 'static 'vector :x -0.9425 :z 0.3339 :w 6655.1807) + :geo-tform (new 'static 'vector :x 0.2492 :y 0.945 :z 0.2115 :w 24615.268) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3403 :z 0.9402 :w 1852.0657) + :geo-tform (new 'static 'vector :x 0.3178 :y 0.9363 :z 0.1493 :w 24121.836) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -1.0 :w 20948.764) + :geo-tform (new 'static 'vector :x -1.0 :w 9182.285) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9999 :z 0.0068 :w 7387.509) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.003 :z -0.0014 :w 16198.405) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9697 :z -0.244 :w 191.6382) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint -1 + :pre-tform (new 'static 'vector :y -1.0 :w 10.176285) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint -1 + :pre-tform (new 'static 'vector :y -1.0 :w 10.176285) + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint -1 + :geo-tform (new 'static 'vector :x 0.9999 :y -0.0008 :z 0.0008 :w 16384.0) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint 26 + :pre-tform (new 'static 'vector :x -0.4854 :z -0.8742 :w 21186.406) + :geo-tform (new 'static 'vector :x 0.6599 :y 0.6796 :z 0.3201 :w 35879.65) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9993 :z 0.0363 :w 2717.3774) + :geo-tform (new 'static 'vector :x 0.6708 :y 0.7057 :z 0.2277 :w 34044.242) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint 26 + :pre-tform (new 'static 'vector :x 0.3584 :z -0.9335 :w 11286.792) + :geo-tform (new 'static 'vector :x -0.4444 :y 0.7119 :z -0.5437 :w 28463.65) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1147 :z -0.9933 :w 2024.0066) + :geo-tform (new 'static 'vector :x -0.5154 :y 0.6809 :z -0.5201 :w 27281.908) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 36 + :parent-joint 26 + :pre-tform (new 'static 'vector :x -0.4859 :z 0.8739 :w 21191.012) + :geo-tform (new 'static 'vector :x 0.1968 :y 0.4177 :z -0.8869 :w 17933.508) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 37 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9993 :z -0.0361 :w 2729.0828) + :geo-tform (new 'static 'vector :x 0.0825 :y 0.3055 :z -0.9485 :w 17459.846) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 38 + :parent-joint 26 + :pre-tform (new 'static 'vector :x 0.3588 :z 0.9333 :w 11281.3125) + :geo-tform (new 'static 'vector :x 0.2273 :y 0.5912 :z 0.7738 :w 23386.34) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 39 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1145 :z 0.9934 :w 2026.6462) + :geo-tform (new 'static 'vector :x 0.2996 :y 0.5792 :z 0.758 :w 21904.426) + :axial-slop 1780.067 + :max-angle 4683.2207 + :coll-rad 1734.656 + ) + ) + ) + :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 #t + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 19 + :turn-anim -1 + :run-anim 19 + :taunt-anim -1 + :run-travel-speed (meters 6) + :run-acceleration (meters 32) + :run-turning-acceleration (meters 40) + :walk-travel-speed (meters 6) + :walk-acceleration (meters 16) + :walk-turning-acceleration (meters 40) + :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! (-> *prebot-small-eco-creature-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; definition for method 120 of type prebot-small-eco-creature +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this prebot-small-eco-creature)) + (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 12) 0))) + (set! (-> s5-0 total-prims) (the-as uint 13)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd jak bot hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid deadly)) + (set! (-> s4-0 transform-index) 26) + (set-vector! (-> s4-0 local-sphere) 532.48 -1556.48 1310.72 9011.2) + (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)) + (set! (-> v1-14 prim-core action) (collide-action solid)) + (set-vector! (-> v1-14 local-sphere) 0.0 2867.2 0.0 4096.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 bot hit-by-others-list player-list)) + (set! (-> v1-16 prim-core action) (collide-action solid deadly)) + (set! (-> v1-16 transform-index) 3) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 0.0 2048.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 hit-by-others-list player-list)) + (set! (-> v1-18 prim-core action) (collide-action solid deadly)) + (set! (-> v1-18 transform-index) 4) + (set-vector! (-> v1-18 local-sphere) 0.0 -1228.8 204.8 2048.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 hit-by-others-list player-list)) + (set! (-> v1-20 prim-core action) (collide-action solid deadly)) + (set! (-> v1-20 transform-index) 6) + (set-vector! (-> v1-20 local-sphere) 0.0 163.84 696.32 1474.56) + ) + (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 hit-by-others-list player-list)) + (set! (-> v1-22 prim-core action) (collide-action solid deadly)) + (set! (-> v1-22 transform-index) 28) + (set-vector! (-> v1-22 local-sphere) 0.0 0.0 0.0 1269.76) + ) + (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 hit-by-others-list player-list)) + (set! (-> v1-24 prim-core action) (collide-action solid deadly)) + (set! (-> v1-24 transform-index) 29) + (set-vector! (-> v1-24 local-sphere) 0.0 0.0 0.0 1146.88) + ) + (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 hit-by-others-list player-list)) + (set! (-> v1-26 prim-core action) (collide-action solid deadly)) + (set! (-> v1-26 transform-index) 30) + (set-vector! (-> v1-26 local-sphere) 40.96 0.0 -204.8 942.08) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-28 prim-core action) (collide-action solid deadly)) + (set! (-> v1-28 transform-index) 31) + (set-vector! (-> v1-28 local-sphere) 81.92 0.0 -286.72 860.16) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-30 prim-core action) (collide-action solid deadly)) + (set! (-> v1-30 transform-index) 33) + (set-vector! (-> v1-30 local-sphere) -819.2 -368.64 -327.68 1597.44) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-32 prim-core action) (collide-action solid deadly)) + (set! (-> v1-32 transform-index) 35) + (set-vector! (-> v1-32 local-sphere) 532.48 245.76 245.76 1761.28) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-34 prim-core action) (collide-action solid deadly)) + (set! (-> v1-34 transform-index) 37) + (set-vector! (-> v1-34 local-sphere) 368.64 286.72 163.84 1720.32) + ) + (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 bot hit-by-others-list player-list)) + (set! (-> v1-36 prim-core action) (collide-action solid deadly)) + (set! (-> v1-36 transform-index) 39) + (set-vector! (-> v1-36 local-sphere) -286.72 -245.76 -327.68 1638.4) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (let ((v1-38 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-38 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-38 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 121 of type prebot-small-eco-creature +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this prebot-small-eco-creature)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-cav-eco-lg" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *prebot-small-eco-creature-nav-enemy-info*) + (logior! (-> this draw global-effect) (draw-control-global-effect rim-lights2)) + (let ((v1-8 (-> this neck))) + (set! (-> v1-8 up) (the-as uint 1)) + (set! (-> v1-8 nose) (the-as uint 2)) + (set! (-> v1-8 ear) (the-as uint 0)) + (set-vector! (-> v1-8 twist-max) 3640.889 11832.889 0.0 1.0) + (set! (-> v1-8 ignore-angle) 15473.777) + ) + (let ((v1-10 (-> this nav))) + (set! (-> v1-10 speed-scale) 1.0) + ) + 0 + (set-gravity-length (-> this root dynam) 573440.0) + (logior! (-> this nav flags) (nav-control-flag momentum-ignore-heading)) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (logior! (-> this focus-status) (focus-status dangerous)) + (logior! (-> this enemy-flags) (enemy-flag dangerous-backup)) + (set! (-> this attack-anims) (new 'static 'boxed-array :type int32 18)) + (set! (-> this victory-anims) (new 'static 'boxed-array :type int32 10 11)) + (set! (-> this turn-left-anim) 16) + (set! (-> this turn-right-anim) 17) + (setup-masks (-> this draw) 0 2) + (set! (-> this is-top) #f) + (set! (-> this is-bottom) #f) + (set! (-> this initial-scale) 0.6) + (set! (-> this final-scale) 0.4) + (set! (-> this split-type) #f) + (set! (-> this attack-stop-frame) 10.0) + (when (type? this small-eco-creature-launched) + (set! (-> this spin-jm) (new 'process 'joint-mod (joint-mod-mode joint-set*) this 3)) + (set! (-> this trail-part) (create-launch-control (-> *part-group-id-table* 440) this)) + (logclear! (-> this flags) (eco-creature-flag ecf3)) + ) + (set! (-> this flags) (eco-creature-flag)) + (send-event (ppointer->process (-> this parent)) 'start-critter) + (let ((a0-21 (-> this skel root-channel 0))) + (set! (-> a0-21 frame-group) (the-as art-joint-anim (-> this draw art-group data 2))) + (set! (-> a0-21 frame-num) 0.0) + (joint-control-channel-group! a0-21 (the-as art-joint-anim (-> this draw art-group data 2)) num-func-identity) + ) + (transform-post) + 0 + (none) + ) + +;; definition of type medium-eco-creature-launched +(deftype medium-eco-creature-launched (prebot-medium-eco-creature) + () + ) + +;; definition for method 3 of type medium-eco-creature-launched +(defmethod inspect ((this medium-eco-creature-launched)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type prebot-medium-eco-creature inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 121 of type medium-eco-creature-launched +;; WARN: Return type mismatch vector vs none. +(defmethod init-enemy! ((this medium-eco-creature-launched)) + (call-parent-method this) + (set-vector! (-> this root scale) (-> this final-scale) (-> this final-scale) (-> this final-scale) 1.0) + (none) + ) + +;; definition for method 122 of type medium-eco-creature-launched +(defmethod go-idle2 ((this medium-eco-creature-launched)) + ((method-of-type prebot-large-eco-creature go-idle2) this) + ) + +;; definition of type small-eco-creature-launched +(deftype small-eco-creature-launched (prebot-small-eco-creature) + () + ) + +;; definition for method 3 of type small-eco-creature-launched +(defmethod inspect ((this small-eco-creature-launched)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type prebot-small-eco-creature inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 121 of type small-eco-creature-launched +;; WARN: Return type mismatch vector vs none. +(defmethod init-enemy! ((this small-eco-creature-launched)) + (call-parent-method this) + (set-vector! (-> this root scale) (-> this final-scale) (-> this final-scale) (-> this final-scale) 1.0) + (none) + ) + +;; definition for method 122 of type small-eco-creature-launched +(defmethod go-idle2 ((this small-eco-creature-launched)) + ((method-of-type prebot-large-eco-creature go-idle2) this) + ) + +;; definition of type large-eco-creature +(deftype large-eco-creature (prebot-large-eco-creature) + () + ) + +;; definition for method 3 of type large-eco-creature +(defmethod inspect ((this large-eco-creature)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type prebot-large-eco-creature inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 122 of type large-eco-creature +(defmethod go-idle2 ((this large-eco-creature)) + ((method-of-type nav-enemy go-idle2) this) + ) + +;; definition for method 121 of type large-eco-creature +;; WARN: Return type mismatch eco-creature-flag vs none. +(defmethod init-enemy! ((this large-eco-creature)) + (call-parent-method this) + (logior! (-> this flags) (eco-creature-flag ecf2)) + (none) + ) + +;; definition of type medium-eco-creature +(deftype medium-eco-creature (prebot-medium-eco-creature) + () + ) + +;; definition for method 3 of type medium-eco-creature +(defmethod inspect ((this medium-eco-creature)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type prebot-medium-eco-creature inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 122 of type medium-eco-creature +(defmethod go-idle2 ((this medium-eco-creature)) + ((method-of-type nav-enemy go-idle2) this) + ) + +;; definition for method 121 of type medium-eco-creature +;; WARN: Return type mismatch eco-creature-flag vs none. +(defmethod init-enemy! ((this medium-eco-creature)) + (call-parent-method this) + (set-vector! (-> this root scale) (-> this final-scale) (-> this final-scale) (-> this final-scale) 1.0) + (logior! (-> this flags) (eco-creature-flag ecf2)) + (none) + ) + +;; definition of type small-eco-creature +(deftype small-eco-creature (prebot-small-eco-creature) + () + ) + +;; definition for method 3 of type small-eco-creature +(defmethod inspect ((this small-eco-creature)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type prebot-small-eco-creature inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 122 of type small-eco-creature +(defmethod go-idle2 ((this small-eco-creature)) + ((method-of-type nav-enemy go-idle2) this) + ) + +;; definition for method 121 of type small-eco-creature +;; WARN: Return type mismatch eco-creature-flag vs none. +(defmethod init-enemy! ((this small-eco-creature)) + (call-parent-method this) + (set-vector! (-> this root scale) (-> this final-scale) (-> this final-scale) (-> this final-scale) 1.0) + (logior! (-> this flags) (eco-creature-flag ecf2)) + (none) + ) diff --git a/test/decompiler/reference/jak3/levels/common/enemy/roboguard_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/roboguard_REF.gc new file mode 100644 index 0000000000..08ba1bfe15 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/enemy/roboguard_REF.gc @@ -0,0 +1,1833 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-roboguard-armor-explode + :id 223 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 810) (sp-item 812) (sp-item 814)) + ) + +;; definition of type roboguard +(deftype roboguard (nav-enemy) + ((los los-control :inline) + (rotation-matrix matrix :inline) + (upper-rotation-matrix matrix :inline) + (fire-at-pos vector :inline) + (formation-position vector :inline) + (focus-formation-source vector :inline) + (me-to-focus-dir vector :inline) + (me-to-focus-angle float) + (flags roboguard-flag) + (torso-aim-blend float) + (torso-angle float) + (torso-seek-speed float) + (torso-to-focus-angle float) + (last-torso-frame-num float) + (stand-angle-threshold float) + (arm-rot-mult float 2) + (arm-rot degrees 2) + (fire-time time-frame) + (fire-count uint32) + (last-attack-time time-frame) + (update-focus-pos symbol) + (formation-angle-sign float) + (last-hit-points int32) + ) + (:state-methods + hostile-stand + close-attack + shoot-attack + explode + ) + (:methods + (roboguard-method-194 (_type_ vector float) symbol) + (roboguard-method-195 (_type_) none) + (roboguard-method-196 (_type_ int) none) + ) + ) + +;; definition for method 3 of type roboguard +(defmethod inspect ((this roboguard)) + (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 "~2Trotation-matrix: #~%" (-> this rotation-matrix)) + (format #t "~2Tupper-rotation-matrix: #~%" (-> this upper-rotation-matrix)) + (format #t "~2Tfire-at-pos: #~%" (-> this fire-at-pos)) + (format #t "~2Tformation-position: #~%" (-> this formation-position)) + (format #t "~2Tfocus-formation-source: #~%" (-> this focus-formation-source)) + (format #t "~2Tme-to-focus-dir: #~%" (-> this me-to-focus-dir)) + (format #t "~2Tme-to-focus-angle: ~f~%" (-> this me-to-focus-angle)) + (format #t "~2Tflags: ~D~%" (-> this flags)) + (format #t "~2Ttorso-aim-blend: ~f~%" (-> this torso-aim-blend)) + (format #t "~2Ttorso-angle: ~f~%" (-> this torso-angle)) + (format #t "~2Ttorso-seek-speed: ~f~%" (-> this torso-seek-speed)) + (format #t "~2Ttorso-to-focus-angle: ~f~%" (-> this torso-to-focus-angle)) + (format #t "~2Tlast-torso-frame-num: ~f~%" (-> this last-torso-frame-num)) + (format #t "~2Tstand-angle-threshold: ~f~%" (-> this stand-angle-threshold)) + (format #t "~2Tarm-rot-mult[2] @ #x~X~%" (-> this arm-rot-mult)) + (format #t "~2Tarm-rot[2] @ #x~X~%" (-> this arm-rot)) + (format #t "~2Tfire-time: ~D~%" (-> this fire-time)) + (format #t "~2Tfire-count: ~D~%" (-> this fire-count)) + (format #t "~2Tlast-attack-time: ~D~%" (-> this last-attack-time)) + (format #t "~2Tupdate-focus-pos: ~A~%" (-> this update-focus-pos)) + (format #t "~2Tformation-angle-sign: ~f~%" (-> this formation-angle-sign)) + (format #t "~2Tlast-hit-points: ~D~%" (-> this last-hit-points)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-roboguard roboguard roboguard-lod0-jg roboguard-idle0-ja + ((roboguard-lod0-mg (meters 20)) (roboguard-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3) + :shadow roboguard-shadow-mg + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-roboguard-explode roboguard roboguard-explode-lod0-jg roboguard-explode-idle-ja + ((roboguard-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 80) + ) + +;; definition for symbol *roboguard-exploder-params*, type joint-exploder-static-params +(define *roboguard-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 8 :parent-joint-index 15) + (new 'static 'joint-exploder-static-joint-params :joint-index 9 :parent-joint-index 11) + (new 'static 'joint-exploder-static-joint-params :joint-index 15 :parent-joint-index 9) + (new 'static 'joint-exploder-static-joint-params :joint-index 16 :parent-joint-index 13) + (new 'static 'joint-exploder-static-joint-params :joint-index 4 :parent-joint-index 24) + (new 'static 'joint-exploder-static-joint-params :joint-index 5 :parent-joint-index 27) + (new 'static 'joint-exploder-static-joint-params :joint-index 6 :parent-joint-index 18) + (new 'static 'joint-exploder-static-joint-params :joint-index 7 :parent-joint-index 21) + (new 'static 'joint-exploder-static-joint-params :joint-index 10 :parent-joint-index 12) + (new 'static 'joint-exploder-static-joint-params :joint-index 11 :parent-joint-index 8) + (new 'static 'joint-exploder-static-joint-params :joint-index 12 :parent-joint-index 6) + (new 'static 'joint-exploder-static-joint-params :joint-index 13 :parent-joint-index 17) + (new 'static 'joint-exploder-static-joint-params :joint-index 14 :parent-joint-index 4) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; definition for symbol *roboguard-explode-joints*, type (array int32) +(define *roboguard-explode-joints* (new 'static 'boxed-array :type int32 0 10 19 9 14 22 13 6)) + +;; definition for symbol *roboguard-debris-array-params*, type (array debris-static-params) +(define *roboguard-debris-array-params* + (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 -1 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + :art-level 'sewg + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index -1 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + :art-level 'sewg + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index -1 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + :art-level 'sewg + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index -1 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + :art-level 'sewg + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index -1 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + :art-level 'sewg + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index -1 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + :art-level 'sewg + ) + (new 'static 'debris-static-params + :joints (new 'static 'boxed-array :type debris-static-joint-params + (new 'static 'debris-static-joint-params :parent-joint-index -1 :group "skel-kg-debris-b") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + :art-level 'sewg + ) + ) + ) + +;; failed to figure out what this is: +(dotimes (v1-27 (-> *roboguard-debris-array-params* length)) + (set! (-> *roboguard-debris-array-params* v1-27 joints 0 parent-joint-index) + (-> *roboguard-explode-joints* (+ v1-27 1)) + ) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 17) (new 'static 'lightning-spec + :name "lightning-shock-roboguard" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + :end-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.2 + :fade-time 15.0 + :texture (new 'static 'texture-id :index #x3f :page #x4) + :reduction 0.42 + :num-points 8 + :box-size 8192.0 + :merge-factor 0.5 + :merge-count 2 + :radius 819.2 + :duration 90.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *lightning-spec-id-table* 18) (new 'static 'lightning-spec + :name "lightning-awe-roboguard" + :flags (lightning-spec-flags lsf0) + :start-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + :end-color (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + :fade-to-color (new 'static 'rgba :r #xbf :b #x8f :a #x5) + :fade-start-factor 0.2 + :fade-time 15.0 + :texture (new 'static 'texture-id :index #x3f :page #x4) + :reduction 0.42 + :num-points 8 + :box-size 8192.0 + :merge-factor 0.5 + :merge-count 2 + :radius 2048.0 + :duration 90.0 + :sound (static-sound-spec "shock" :group 0) + ) + ) + +;; definition for symbol *fact-info-roboguard-defaults*, type fact-info-enemy-defaults +(define *fact-info-roboguard-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 48 :pickup-amount 10.0) + ) + +;; definition for symbol *roboguard-nav-enemy-info*, type nav-enemy-info +(define *roboguard-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 #f + :idle-anim 5 + :notice-anim -1 + :hostile-anim 14 + :hit-anim 5 + :knocked-anim 27 + :knocked-land-anim 28 + :die-anim 18 + :die-falling-anim 29 + :victory-anim 5 + :jump-wind-up-anim 5 + :jump-in-air-anim 5 + :jump-land-anim 5 + :neck-joint -1 + :look-at-joint 6 + :bullseye-joint 4 + :notice-distance (meters 50) + :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 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.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 32768.0 + :knocked-soft-vxz-hi 61440.0 + :knocked-soft-vy-lo 49152.0 + :knocked-soft-vy-hi 65536.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 73728.0 + :knocked-hard-vxz-hi 114688.0 + :knocked-hard-vy-lo 49152.0 + :knocked-hard-vy-hi 73728.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 #t + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 13 + :turn-anim 4 + :run-anim 14 + :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! (-> *roboguard-nav-enemy-info* fact-defaults) *fact-info-roboguard-defaults*) + +;; failed to figure out what this is: +(defpart 913 + :init-specs ((:texture (pal-lightning level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1)) + (: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: +(defpart 914 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 128.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-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 915 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 128.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-3 sp-cpuinfo-flag-14)) + ) + ) + +;; definition for method 120 of type roboguard +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this roboguard)) + (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 4) 0))) + (set! (-> s5-0 total-prims) (the-as uint 5)) + (set! (-> s4-0 prim-core collide-as) (collide-spec enemy camera-blocker los-blocker)) + (set! (-> s4-0 prim-core collide-with) + (collide-spec backgnd jak bot enemy obstacle vehicle-sphere 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 enemy)) + (set! (-> v1-12 prim-core collide-with) + (collide-spec backgnd jak bot enemy obstacle vehicle-sphere hit-by-others-list player-list) + ) + (set! (-> v1-12 prim-core action) (collide-action solid)) + (set-vector! (-> v1-12 local-sphere) 0.0 6144.0 0.0 6144.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 enemy obstacle vehicle-sphere hit-by-others-list player-list) + ) + (set! (-> v1-14 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> v1-14 local-sphere) 0.0 12697.6 0.0 6144.0) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-16 prim-core action) (collide-action)) + (set! (-> v1-16 transform-index) 11) + (set-vector! (-> v1-16 local-sphere) 0.0 0.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 los-blocker)) + (set! (-> v1-18 prim-core action) (collide-action solid)) + (set-vector! (-> v1-18 local-sphere) 0.0 8192.0 0.0 11468.8) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (let ((v1-20 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-20 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-20 prim-core collide-with)) + ) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for function roboguard-turn-torso-post +;; INFO: Used lq/sq +(defbehavior roboguard-turn-torso-post roboguard () + (seek! (-> self torso-aim-blend) 1.0 (* 5.0 (seconds-per-frame))) + (let ((v1-3 (joint-node roboguard-lod0-jg chest)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> gp-0 quad) (-> v1-3 bone transform fvec quad)) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> self focus-pos) (-> v1-3 bone transform trans)))) + (set! (-> gp-0 y) 0.0) + (set! (-> s5-1 y) 0.0) + (vector-xz-normalize! gp-0 1.0) + (vector-xz-normalize! s5-1 1.0) + (set! (-> self torso-to-focus-angle) (acos (vector-dot gp-0 s5-1))) + ) + ) + (if (>= 2730.6667 (-> self torso-to-focus-angle)) + (seek! (-> self torso-seek-speed) 0.0 (* 54613.332 (seconds-per-frame))) + (seek! (-> self torso-seek-speed) 43690.668 (* 72817.78 (seconds-per-frame))) + ) + (nav-enemy-simple-post) + (none) + ) + +;; definition for function roboguard-turret-code +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior roboguard-turret-code roboguard () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! roboguard-idle-shoot0-loop-ja :num! zero) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.2)) + (suspend) + ) + ) + (let ((gp-1 + (lambda ((arg0 roboguard) (arg1 symbol)) + (quaternion-rotate-y! (-> arg0 root quat) (-> arg0 root quat) (* 20480.0 (seconds-per-frame) (if arg1 + 1.0 + -1.0 + ) + ) + ) + ) + ) + (f30-0 (-> self stand-angle-threshold)) + ) + (until #f + (when (< (fabs (-> self me-to-focus-angle)) f30-0) + (let ((s5-0 (current-time))) + (until (time-elapsed? s5-0 (seconds 0.5)) + (suspend) + ) + ) + (while (< (fabs (-> self me-to-focus-angle)) f30-0) + (suspend) + ) + ) + (ja-channel-push! 1 0) + (let ((v1-20 (if (< 0.0 (-> self me-to-focus-angle)) + 7 + 9 + ) + ) + (s5-1 (< 0.0 (-> self me-to-focus-angle))) + ) + (ja-no-eval :group! (-> self draw art-group data v1-20) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (gp-1 self s5-1) + (suspend) + (ja :num! (seek!)) + ) + ) + (when (< (fabs (-> self me-to-focus-angle)) f30-0) + (let ((s5-2 (current-time))) + (until (time-elapsed? s5-2 (seconds 0.5)) + (suspend) + ) + ) + (while (< (fabs (-> self me-to-focus-angle)) f30-0) + (suspend) + ) + ) + (ja-channel-push! 1 0) + (let ((v1-40 (if (< 0.0 (-> self me-to-focus-angle)) + 8 + 10 + ) + ) + (s5-3 (< 0.0 (-> self me-to-focus-angle))) + ) + (ja-no-eval :group! (-> self draw art-group data v1-40) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (gp-1 self s5-3) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + #f + (none) + ) + +;; failed to figure out what this is: +(defstate idle (roboguard) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (ja-no-eval :group! roboguard-idle0-ja :num! (seek! 2.0 (rand-vu-float-range 0.1 0.15)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 2.0 (rand-vu-float-range 0.1 0.15))) + ) + (ja-no-eval :group! roboguard-idle0-ja :num! (seek! 3.0 (rand-vu-float-range 0.1 0.15)) :frame-num 2.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 3.0 (rand-vu-float-range 0.1 0.15))) + ) + (ja-no-eval :group! roboguard-idle0-ja :num! (seek! 4.0 (rand-vu-float-range 0.1 0.15)) :frame-num 3.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 4.0 (rand-vu-float-range 0.1 0.15))) + ) + (ja-no-eval :group! roboguard-idle0-ja :num! (seek! 5.0 (rand-vu-float-range 0.1 0.15)) :frame-num 4.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 5.0 (rand-vu-float-range 0.1 0.15))) + ) + (ja-no-eval :group! roboguard-idle0-ja :num! (seek! 6.0 (rand-vu-float-range 0.1 0.15)) :frame-num 5.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 6.0 (rand-vu-float-range 0.1 0.15))) + ) + (ja-no-eval :group! roboguard-idle0-ja :num! (seek! 7.0 0.07) :frame-num 6.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 7.0 0.07)) + ) + (ja-no-eval :group! roboguard-idle0-ja :num! (seek! 8.0 0.07) :frame-num 7.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 8.0 0.07)) + ) + (ja-no-eval :group! roboguard-idle0-ja :num! (seek! 9.0 0.07) :frame-num 8.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 9.0 0.07)) + ) + (ja-no-eval :group! roboguard-idle0-ja :num! (seek! 10.0 (rand-vu-float-range 0.02 0.05)) :frame-num 9.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! 10.0 (rand-vu-float-range 0.02 0.05))) + ) + ) + #f + ) + :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 notice (roboguard) + :virtual #t + :exit (behavior () + (set! (-> self formation-position quad) (-> self root trans quad)) + (let ((t9-0 (-> (method-of-type nav-enemy notice) exit))) + (if t9-0 + (t9-0) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (ja-no-eval :group! roboguard-notice-jump-ja :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 131072.0 (seconds 0.05)) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (ja-no-eval :group! roboguard-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 stare (roboguard) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy stare) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self stand-angle-threshold) 9102.223) + ) + :code roboguard-turret-code + :post roboguard-turn-torso-post + ) + +;; failed to figure out what this is: +(defstate hostile (roboguard) + :virtual #t + :exit (behavior () + (let ((v1-0 (-> self nav))) + (logclear! (-> v1-0 shape nav-flags) (nav-flags has-extra-sphere)) + ) + 0 + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (cond + ((< (vector-vector-xz-distance (-> self root trans) (-> self formation-position)) 8192.0) + (go-virtual hostile-stand) + ) + ((and (< (fabs (-> self torso-to-focus-angle)) 3640.889) + (and (get-focus! self) (>= 24576.0 (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)))) + ) + (go-virtual close-attack) + ) + ) + ) + ) + :post (behavior () + (seek! (-> self torso-aim-blend) 0.0 (seconds-per-frame)) + (seek! (-> self arm-rot-mult 0) 0.0 (* 10.0 (seconds-per-frame))) + (seek! (-> self arm-rot-mult 1) 0.0 (* 10.0 (seconds-per-frame))) + (roboguard-method-195 self) + (let ((a0-4 (-> self nav state)) + (v1-8 (-> self formation-position)) + ) + (logclear! (-> a0-4 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-4 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-4 target-pos quad) (-> v1-8 quad)) + ) + 0 + (nav-enemy-method-187 self) + ) + ) + +;; failed to figure out what this is: +(defstate hostile-stand (roboguard) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self stand-angle-threshold) 9102.223) + (nav-enemy-method-180 self 8192.0 (the-as float #f)) + ) + :exit (behavior () + (nav-enemy-method-179 self) + ) + :trans (behavior () + (when (and (time-elapsed? (-> self state-time) (-> self reaction-time)) (ja-done? 0)) + (if (or (and (< 65536.0 (vector-vector-xz-distance (-> self focus-pos) (-> self root trans))) + (< 2048.0 (vector-vector-xz-distance (-> self root trans) (-> self formation-position))) + ) + (< 14336.0 (vector-vector-xz-distance (-> self root trans) (-> self formation-position))) + ) + (go-virtual hostile) + ) + (when (and (time-elapsed? (-> self state-time) (seconds 0.3)) + (and (< (fabs (-> self torso-to-focus-angle)) 3640.889) (get-focus! self)) + ) + (cond + ((>= 24576.0 (vector-vector-xz-distance (-> self root trans) (-> self focus-pos))) + (go-virtual close-attack) + ) + ((should-check-los? (-> self los) (seconds 0.4)) + (go-virtual shoot-attack) + ) + ) + ) + ) + ) + :code roboguard-turret-code + :post (behavior () + (seek! (-> self arm-rot-mult 0) 0.0 (* 10.0 (seconds-per-frame))) + (seek! (-> self arm-rot-mult 1) 0.0 (* 10.0 (seconds-per-frame))) + (roboguard-method-195 self) + (roboguard-turn-torso-post) + ) + ) + +;; failed to figure out what this is: +(defstate close-attack (roboguard) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set-time! (-> self fire-time)) + (nav-enemy-method-180 self 8192.0 (the-as float #f)) + ) + :exit (behavior () + (nav-enemy-method-179 self) + ) + :code (behavior () + (let ((f30-0 + (lerp-scale 0.0 1.0 (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) 12288.0 20480.0) + ) + ) + (ja-channel-push! 2 (seconds 0.3)) + (ja-no-eval :group! roboguard-punch-close-rotate-ja :num! (seek!) :frame-num 0.0) + (ja-no-eval :chan 1 :group! roboguard-punch-far-rotate-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + (seek-to-point-toward-point! + (-> self root) + (-> self focus-pos) + (* 1.2 (-> self nav max-rotation-rate)) + (seconds 0.02) + ) + (seek! (-> self torso-aim-blend) 0.0 (* 3.0 (seconds-per-frame))) + (suspend) + (ja :num! (seek!)) + ) + (let ((f28-0 8192.0)) + (let* ((a0-10 (-> self root root-prim)) + (v1-53 (-> (the-as collide-shape-prim-group a0-10) child 2)) + ) + (+! (-> a0-10 local-sphere w) f28-0) + (set! (-> v1-53 prim-core action) (collide-action solid deadly)) + (set! (-> v1-53 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-53 prim-core collide-with) (collide-spec jak bot obstacle player-list)) + ) + (logior! (-> self focus-status) (focus-status dangerous)) + (ja-no-eval :group! roboguard-punch-close-go-ja :num! (seek!) :frame-num 0.0) + (ja-no-eval :chan 1 :group! roboguard-punch-far-go-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + (suspend) + (ja :num! (seek! max 1.2)) + ) + (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! roboguard-punch-close-hold-ja :num! (seek!) :frame-num 0.0) + (ja-no-eval :chan 1 :group! roboguard-punch-far-hold-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + (suspend) + (ja :num! (seek! max 4.0)) + ) + (let* ((v1-147 (-> self root root-prim)) + (a0-26 (-> (the-as collide-shape-prim-group v1-147) child 2)) + ) + (set! (-> v1-147 local-sphere w) (- (-> v1-147 local-sphere w) f28-0)) + (set! (-> a0-26 prim-core action) (collide-action)) + (set! (-> a0-26 prim-core collide-as) (collide-spec)) + (set! (-> a0-26 prim-core collide-with) (collide-spec)) + ) + ) + ) + 0 + (go-virtual hostile-stand) + ) + :post (behavior () + (seek! (-> self arm-rot-mult 0) 0.0 (* 10.0 (seconds-per-frame))) + (seek! (-> self arm-rot-mult 1) 0.0 (* 10.0 (seconds-per-frame))) + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate shoot-attack (roboguard) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self fire-time) (+ (current-time) (seconds -0.4))) + (set! (-> self fire-count) (the-as uint 0)) + (set! (-> self last-torso-frame-num) 0.0) + (set! (-> self stand-angle-threshold) 16384.0) + (set! (-> self update-focus-pos) #f) + (nav-enemy-method-180 self 8192.0 (the-as float #f)) + ) + :exit (behavior () + (when (> (-> self skel float-channels) 0) + (let ((a0-1 (joint-control-method-12 (-> self skel) 0))) + (joint-channel-float-delete! a0-1) + ) + ) + (set! (-> self update-focus-pos) #t) + (nav-enemy-method-179 self) + ) + :trans (behavior () + (when (and (time-elapsed? (-> self state-time) (seconds 0.2)) (zero? (-> self skel float-channels))) + (if (or (= (-> self fire-count) 8) (los-control-method-11 (-> self los) (seconds 0.1))) + (go-virtual hostile-stand) + ) + (let ((f0-0 (vector-vector-xz-distance (-> self focus-pos) (-> self root trans)))) + (if (>= 24576.0 f0-0) + (go-virtual close-attack) + ) + ) + (let ((v1-22 (ja-channel-float! (the-as art-joint-anim roboguard-idle-shoot0-loop-ja) 0.0 1.0 0.0))) + (when v1-22 + (set! (-> self skel interp-select 0) #x1bbf8) + (set! (-> self skel interp-select 1) 0) + (set! (-> v1-22 param 0) 1.0) + (set! (-> v1-22 param 1) 1.0) + (set! (-> v1-22 param 2) 2.0) + (set! (-> v1-22 num-func) num-func-interp1-play!) + ) + ) + (set-time! (-> self fire-time)) + ) + (let ((gp-0 (joint-control-method-12 (-> self skel) 0))) + (when gp-0 + (let ((f1-1 (-> gp-0 frame-num)) + (f0-4 (-> self last-torso-frame-num)) + ) + (cond + ((and (< 0.5 f1-1) (>= 0.5 f0-4)) + (roboguard-method-196 self 11) + ) + ((and (< 3.0 f1-1) (>= 3.0 f0-4)) + (roboguard-method-196 self 15) + ) + ) + ) + (set! (-> self last-torso-frame-num) (-> gp-0 frame-num)) + ) + ) + ) + :code roboguard-turret-code + :post (behavior () + (seek! (-> self arm-rot-mult 0) 1.0 (* 30.0 (seconds-per-frame))) + (seek! (-> self arm-rot-mult 1) 1.0 (* 30.0 (seconds-per-frame))) + (let ((gp-1 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (-> self focus-pos)))) + (let ((s5-0 vector-normalize!) + (s4-0 gp-1) + (f0-8 -8192.0) + (v1-7 gp-1) + ) + (s5-0 s4-0 (fmin + (+ f0-8 (sqrtf (+ (* (-> v1-7 x) (-> v1-7 x)) (* (-> v1-7 z) (-> v1-7 z))))) + (lerp-scale 0.0 32768.0 (the float (- (current-time) (-> self state-time))) 600.0 60.0) + ) + ) + ) + (vector+! (-> self fire-at-pos) (-> self focus-pos) gp-1) + ) + 0 + (let ((gp-2 + (lambda :behavior roboguard + ((arg0 int) (arg1 int) (arg2 float)) + (let* ((s5-0 (-> self node-list data arg0)) + (v1-2 (vector<-cspace! (new 'stack-no-clear 'vector) s5-0)) + ) + (vector-float*! (new 'stack-no-clear 'vector) (-> s5-0 bone transform uvec) -1.0) + (let ((s5-1 (new 'stack-no-clear 'matrix))) + (vector-! (-> s5-1 rvec) (-> self fire-at-pos) v1-2) + (set! (-> s5-1 uvec quad) (-> s5-1 rvec quad)) + (set! (-> s5-1 uvec y) 0.0) + (vector-normalize! (-> s5-1 uvec) 1.0) + (vector-normalize-copy! (-> s5-1 fvec) (-> s5-1 rvec) 1.0) + (vector-flatten! (-> s5-1 fvec) (-> s5-1 fvec) (the-as vector (-> self upper-rotation-matrix))) + (set! (-> self arm-rot-mult arg1) + (* (-> self arm-rot-mult arg1) (vector-dot (-> s5-1 uvec) (-> self upper-rotation-matrix fvec))) + ) + (let ((f0-6 (* arg2 (acos (vector-dot (-> s5-1 fvec) (-> self upper-rotation-matrix fvec)))))) + (set! (-> self arm-rot arg1) + (seek + (-> self arm-rot arg1) + (fmax -8192.0 (fmin 13653.333 (if (< 0.0 (vector-dot (-> s5-1 fvec) *y-vector*)) + (- f0-6) + f0-6 + ) + ) + ) + (* 65536.0 (seconds-per-frame)) + ) + ) + ) + ) + ) + ) + ) + ) + (gp-2 11 0 1.0) + (gp-2 15 1 1.0) + ) + (roboguard-turn-torso-post) + ) + ) + +;; failed to figure out what this is: +(defstate knocked (roboguard) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-0 + (t9-0) + ) + ) + (dotimes (gp-0 (- (-> self last-hit-points) (the int (-> self hit-points)))) + (let ((s5-0 (enemy-method-131 self 8 (the-as int (logior (-> self draw seg-mask) 1))))) + (when (> s5-0 0) + (let ((a1-2 (new 'stack 'debris-tuning (the-as uint 1)))) + (set! (-> a1-2 hit-xz-reaction) 0.5) + (set! (-> a1-2 hit-y-reaction) 0.3) + (set! (-> a1-2 fountain-rand-transv-lo quad) (-> self root root-prim prim-core world-sphere quad)) + (let ((s3-0 (-> *roboguard-debris-array-params* (+ s5-0 -1)))) + (debris-spawn self a1-2 s3-0 (the-as process-drawable #f)) + (cond + ((logtest? (-> *part-group-id-table* 223 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> s3-0 joints 0 parent-joint-index))) + quad + ) + ) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 223)) + ) + (else + (set! (-> *launch-matrix* trans quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data (-> s3-0 joints 0 parent-joint-index))) + quad + ) + ) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 223)) + ) + ) + ) + ) + (setup-masks (-> self draw) 0 (ash 1 s5-0)) + ) + ) + ) + (set! (-> self last-hit-points) (the int (-> self hit-points))) + ) + :post (behavior () + (seek! (-> self arm-rot-mult 0) 0.0 (* 10.0 (seconds-per-frame))) + (seek! (-> self arm-rot-mult 1) 0.0 (* 10.0 (seconds-per-frame))) + (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 knocked-recover (roboguard) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked-recover) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (enemy-method-109 self) + (go-die self) + (go-hostile self) + ) + ) + :post (behavior () + (seek! (-> self arm-rot-mult 0) 0.0 (* 10.0 (seconds-per-frame))) + (seek! (-> self arm-rot-mult 1) 0.0 (* 10.0 (seconds-per-frame))) + (let ((t9-2 (-> (method-of-type nav-enemy knocked-recover) post))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate die (roboguard) + :virtual #t + :enter (behavior () + (on-dying self) + (set-time! (-> self state-time)) + (set! (-> self hit-points) 0.0) + ) + :code (behavior () + (when (!= (-> self incoming knocked-type) (knocked-type blue-shot)) + (ja-channel-push! 1 (seconds 0.075)) + (ja-no-eval :group! roboguard-death-standing-ja + :num! (seek! (ja-aframe 20.0 0) 1.5) + :frame-num (ja-aframe 13.0 0) + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! (ja-aframe 20.0 0) 1.5)) + ) + ) + (go-virtual explode) + ) + :post (behavior () + (seek! (-> self arm-rot-mult 0) 0.0 (* 10.0 (seconds-per-frame))) + (seek! (-> self arm-rot-mult 1) 0.0 (* 10.0 (seconds-per-frame))) + (let ((t9-2 (-> (method-of-type nav-enemy die) post))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate explode (roboguard) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (sound-play "robo-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 + (logior! (-> self draw status) (draw-control-status no-draw)) + (set! (-> self root root-prim local-sphere w) 491520.0) + (send-event self 'death-start) + (let ((gp-1 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (let ((v1-14 (-> gp-1 fountain-rand-transv-lo))) + (let ((a0-8 (-> self root trans))) + (let ((a1-3 *up-vector*)) + (let ((a2-3 2048.0)) + (.mov vf7 a2-3) + ) + (.lvf vf5 (&-> a1-3 quad)) + ) + (.lvf vf4 (&-> a0-8 quad)) + ) + (.add.x.vf 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-14 quad) vf6) + ) + (set! (-> s5-1 quad) (-> self incoming attack-direction quad)) + (vector-normalize-copy! (-> gp-1 fountain-rand-transv-lo) s5-1 -20480.0) + (vector-normalize-copy! (-> gp-1 fountain-rand-transv-hi) s5-1 122880.0) + ) + (set! (-> gp-1 fountain-rand-transv-lo y) 40960.0) + (set! (-> gp-1 fountain-rand-transv-hi y) 81920.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-roboguard-explode" (the-as (pointer level) #f)) + 35 + gp-1 + *roboguard-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (let ((v1-25 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node roboguard-lod0-jg chest)))) + (cond + ((logtest? (-> *part-group-id-table* 219 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-25 quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 219)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-25 quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 219)) + ) + ) + ) + ) + ) + :code (behavior () + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; definition for method 194 of type roboguard +;; INFO: Used lq/sq +(defmethod roboguard-method-194 ((this roboguard) (arg0 vector) (arg1 float)) + (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))) + (< (vector-x-angle a0-5) 5461.3335) + ) + (let ((s3-0 (-> this nav)) + (s2-0 (-> this focus-pos)) + (s4-0 (new 'stack 'nav-find-poly-parms)) + ) + (vector-! (-> s4-0 point) s2-0 (the-as vector (-> s3-0 state mesh bounds))) + (set! (-> s4-0 y-threshold) (-> s3-0 nearest-y-threshold)) + (set! (-> s4-0 ignore) (the-as uint 2)) + (nav-mesh-method-46 (-> s3-0 state mesh) (the-as nav-poly s4-0)) + (let ((s4-1 (-> s4-0 poly)) + (s3-2 (vector-! (new 'stack-no-clear 'vector) arg0 (-> this focus-pos))) + (s5-1 (new 'stack 'clamp-travel-vector-to-mesh-return-info)) + ) + (or (not s4-1) (begin + (clamp-vector-to-mesh-no-gaps (-> this nav) (-> this focus-pos) s4-1 s3-2 s5-1) + (not (-> s5-1 found-boundary)) + ) + ) + ) + ) + ) + ) + ) + +;; definition for symbol *roboguard-formation-table*, type (array float) +(define *roboguard-formation-table* (new 'static 'boxed-array :type float + 0.0 + 1820.4445 + 3640.889 + 5461.3335 + -1820.4445 + -3640.889 + -5461.3335 + 7281.778 + 9102.223 + 10922.667 + -7281.778 + -9102.223 + -10922.667 + 12743.111 + 14563.556 + 16384.0 + -12743.111 + -14563.556 + -16384.0 + 18204.445 + 20024.889 + 21845.334 + -18204.445 + -20024.889 + -21845.334 + 23665.777 + 25486.223 + 27306.666 + -23665.777 + -25486.223 + -27306.666 + 29127.111 + 30947.555 + 32768.0 + -29127.111 + -30947.555 + ) + ) + +;; definition for method 195 of type roboguard +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod roboguard-method-195 ((this roboguard)) + (when (or (< 8192.0 (vector-vector-xz-distance (-> this focus-pos) (-> this focus-formation-source))) + (let ((f0-1 (vector-vector-distance (-> this formation-position) (-> this focus-formation-source))) + (f1-0 40960.0) + (f2-0 65536.0) + ) + (or (>= f1-0 f0-1) (>= f0-1 f2-0)) + ) + (not (roboguard-method-194 this (-> this formation-position) 9011.2)) + ) + (set! (-> this focus-formation-source quad) (-> this focus-pos quad)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this root trans quad)) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this formation-position) (-> this focus-formation-source))) + ) + (when (< 0.0 (vector-length s4-1)) + (set! (-> s4-1 y) 0.0) + (dotimes (s3-0 (-> *roboguard-formation-table* length)) + (let ((s1-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (vector-normalize-copy! s1-0 s4-1 1.0) + (vector-rotate-y! s1-0 s1-0 (* (-> this formation-angle-sign) (-> *roboguard-formation-table* s3-0))) + (vector-normalize! s1-0 53248.0) + (vector+! s2-0 (-> this focus-formation-source) s1-0) + (when (and (closest-point-on-mesh (-> this nav) s2-0 s2-0 (the-as nav-poly #f)) + (roboguard-method-194 this s2-0 9011.2) + ) + (set! (-> s5-0 quad) (-> s2-0 quad)) + #t + (goto cfg-26) + ) + ) + ) + ) + ) + (label cfg-26) + (set! (-> this formation-angle-sign) (* -1.0 (-> this formation-angle-sign))) + (set! (-> this formation-position quad) (-> s5-0 quad)) + ) + ) + 0 + (none) + ) + +;; definition for method 196 of type roboguard +;; WARN: Return type mismatch int vs none. +(defmethod roboguard-method-196 ((this roboguard) (arg0 int)) + (let* ((s5-0 (-> this node-list data arg0)) + (v1-2 (vector<-cspace! (new 'stack-no-clear 'vector) s5-0)) + (a3-1 (vector-float*! (new 'stack-no-clear 'vector) (-> s5-0 bone transform uvec) -1.0)) + ) + (spawn-guard-projectile + this + v1-2 + (vector+! (new 'stack-no-clear 'vector) v1-2 a3-1) + 819200.0 + (the-as vector #f) + ) + ) + (sound-play "robo-fire" :position (-> this root trans)) + (+! (-> this fire-count) 1) + 0 + (none) + ) + +;; definition for method 85 of type roboguard +(defmethod knocked-anim ((this roboguard) (arg0 enemy-knocked-info)) + (ja-channel-push! 1 0) + (case (-> this incoming knocked-type) + (((knocked-type none) (knocked-type mech-punch) (knocked-type yellow-shot) (knocked-type blue-shot)) + (let ((a0-5 (-> this skel root-channel 0))) + (set! (-> a0-5 frame-group) (the-as art-joint-anim (-> this draw art-group data 27))) + (set! (-> a0-5 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 27)) 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 27)) num-func-seek!) + ) + ) + (else + (let ((a0-6 (-> this skel root-channel 0))) + (set! (-> a0-6 frame-group) (the-as art-joint-anim (-> this draw art-group data 29))) + (set! (-> a0-6 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 29)) frames num-frames) -1)) + ) + (set! (-> a0-6 param 1) (-> arg0 anim-speed)) + (set! (-> a0-6 frame-num) 0.0) + (joint-control-channel-group! a0-6 (the-as art-joint-anim (-> this draw art-group data 29)) num-func-seek!) + ) + ) + ) + #t + ) + +;; definition for method 86 of type roboguard +(defmethod knocked-land-anim ((this roboguard) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type none) (knocked-type mech-punch) (knocked-type yellow-shot) (knocked-type blue-shot)) + (let ((v1-4 (-> this skel root-channel 0))) + (set! (-> v1-4 frame-group) (the-as art-joint-anim (-> this draw art-group data 28))) + (set! (-> v1-4 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 28)) frames num-frames) -1)) + ) + (set! (-> v1-4 param 1) (-> arg0 anim-speed)) + (set! (-> v1-4 frame-num) 0.0) + (joint-control-channel-group! v1-4 (the-as art-joint-anim (-> this draw art-group data 28)) num-func-seek!) + ) + ) + (else + (let ((v1-8 (-> this skel root-channel 0))) + (set! (-> v1-8 frame-group) (the-as art-joint-anim (-> this draw art-group data 30))) + (set! (-> v1-8 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 30)) 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 30)) num-func-seek!) + ) + ) + ) + #t + ) + +;; definition for method 66 of type roboguard +;; WARN: Return type mismatch int vs penetrate. +(defmethod get-penetrated-by ((this roboguard)) + (the-as penetrate 0) + ) + +;; definition for method 27 of type roboguard +(defmethod get-inv-mass ((this roboguard)) + 2.0 + ) + +;; definition for method 109 of type roboguard +;; INFO: Used lq/sq +(defmethod enemy-method-109 ((this roboguard)) + (let ((gp-0 (-> this root)) + (s3-0 (-> this nav state)) + ) + (do-navigation-to-destination s3-0 (-> gp-0 trans)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (cond + ((logtest? (-> s3-0 flags) (nav-state-flag in-mesh)) + (set! (-> s5-0 quad) (-> gp-0 trans quad)) + ) + (else + (if (or (not (closest-point-on-mesh (-> this nav) s5-0 (-> gp-0 trans) (-> s3-0 current-poly))) + (let ((f0-0 8192.0)) + (< (* f0-0 f0-0) (vector-vector-xz-distance-squared s5-0 (-> gp-0 trans))) + ) + (< (- (-> gp-0 trans y) (-> s5-0 y)) -4096.0) + ) + (return #t) + ) + ) + ) + ) + ) + #f + ) + +;; definition for method 82 of type roboguard +(defmethod event-handler ((this roboguard) (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) + (cond + ((or (= (-> this hit-points) 0.0) + (and (>= 1.0 (-> this hit-points)) (= (-> this incoming knocked-type) (knocked-type blue-shot))) + ) + (on-dying this) + (go (method-of-object this explode)) + ) + (else + (go (method-of-object this knocked)) + ) + ) + #t + ) + (('impact-impulse) + (let ((v1-38 (the-as object (-> arg3 param 0)))) + (when (< 4096.0 (-> (the-as rigid-body-impact v1-38) impulse)) + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.1)) + (set! (-> this hit-points) 0.0) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 17) + lightning-probe-callback + (-> *part-id-table* 160) + 10 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 17) + lightning-probe-callback + (-> *part-id-table* 160) + 14 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 17) + lightning-probe-callback + (-> *part-id-table* 160) + 8 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 17) + lightning-probe-callback + (-> *part-id-table* 160) + 12 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 17) + lightning-probe-callback + (-> *part-id-table* 160) + 19 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 17) + lightning-probe-callback + (-> *part-id-table* 160) + 22 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 17) + lightning-probe-callback + (-> *part-id-table* 160) + 18 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 17) + lightning-probe-callback + (-> *part-id-table* 160) + 21 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 18) + lightning-probe-callback + (-> *part-id-table* 160) + 10 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 18) + lightning-probe-callback + (-> *part-id-table* 160) + 14 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 18) + lightning-probe-callback + (-> *part-id-table* 160) + 8 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 18) + lightning-probe-callback + (-> *part-id-table* 160) + 12 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 18) + lightning-probe-callback + (-> *part-id-table* 160) + 19 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 18) + lightning-probe-callback + (-> *part-id-table* 160) + 22 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 18) + lightning-probe-callback + (-> *part-id-table* 160) + 18 + 210 + 16384.0 + ) + (process-drawable-shock-effect + this + (-> *lightning-spec-id-table* 18) + lightning-probe-callback + (-> *part-id-table* 160) + 21 + 210 + 16384.0 + ) + (send-event arg0 'lawsuit (-> this root trans)) + (go (method-of-object this explode)) + #t + ) + ) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 59 of type roboguard +;; INFO: Used lq/sq +(defmethod enemy-common-post ((this roboguard)) + (quaternion->matrix (-> this rotation-matrix) (-> this root quat)) + (vector-rotate-around-y! + (the-as vector (-> this upper-rotation-matrix)) + (the-as vector (-> this rotation-matrix)) + (-> this torso-angle) + ) + (set! (-> this upper-rotation-matrix uvec quad) (-> this rotation-matrix uvec quad)) + (vector-rotate-around-y! + (-> this upper-rotation-matrix fvec) + (-> this rotation-matrix fvec) + (-> this torso-angle) + ) + (when (< 1 (the-as int (-> this focus aware))) + (when (-> this update-focus-pos) + (let ((s5-0 (handle->process (-> this focus handle)))) + (when s5-0 + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable s5-0) 5) quad)) + (los-control-method-9 (-> this los) (the-as process-focusable s5-0) (-> this focus-pos) 819.2 4096.0) + ) + ) + ) + (vector-! (-> this me-to-focus-dir) (-> this focus-pos) (-> this root trans)) + (set! (-> this me-to-focus-dir y) 0.0) + (vector-xz-normalize! (-> this me-to-focus-dir) 1.0) + (let* ((a1-9 (-> this rotation-matrix fvec)) + (s5-1 (-> this rotation-matrix)) + (f0-3 (vector-vector-angle-safe (-> this me-to-focus-dir) a1-9)) + ) + (if (< (vector-dot (-> this me-to-focus-dir) (the-as vector s5-1)) 0.0) + (set! f0-3 (* -1.0 f0-3)) + ) + (set! (-> this me-to-focus-angle) f0-3) + ) + ) + ((method-of-type nav-enemy enemy-common-post) this) + (none) + ) + +;; definition for method 67 of type roboguard +(defmethod coin-flip? ((this roboguard)) + #f + ) + +;; definition for method 121 of type roboguard +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this roboguard)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-roboguard" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logior! (-> this mask) (process-mask kg-robot)) + (set! (-> this enemy-flags) + (the-as enemy-flag (logior (enemy-flag no-initial-move-to-ground) (-> this enemy-flags))) + ) + (init-enemy-defaults! this *roboguard-nav-enemy-info*) + (init-los! + (-> this los) + this + (seconds 0.1) + 327680.0 + (collide-spec backgnd obstacle hit-by-others-list los-blocker) + ) + (set! (-> this torso-aim-blend) 0.0) + (set! (-> this torso-angle) 0.0) + (set! (-> this torso-seek-speed) 0.0) + (set! (-> this torso-to-focus-angle) 0.0) + (let ((v1-13 (-> this node-list data 4))) + (set! (-> v1-13 param0) + (lambda ((arg0 cspace) (arg1 transformq)) + (local-vars (sv-96 vector)) + (let ((s3-0 (the-as roboguard (-> arg0 param1))) + (gp-0 (new 'stack-no-clear 'quaternion)) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (set! (-> s2-0 quad) (-> s3-0 rotation-matrix rvec quad)) + (let ((s0-0 (new 'stack-no-clear 'vector))) + (set! (-> s0-0 quad) (-> s3-0 rotation-matrix fvec quad)) + (let ((s1-0 (new 'stack-no-clear 'vector))) + (set! sv-96 (-> s3-0 focus-pos)) + (let* ((v0-1 (vector<-cspace! (new 'stack-no-clear 'vector) arg0)) + (s1-1 (vector-! s1-0 sv-96 v0-1)) + ) + (set! (-> s1-1 y) 0.0) + (set! (-> s2-0 y) 0.0) + (set! (-> s0-0 y) 0.0) + (vector-xz-normalize! s1-1 1.0) + (vector-xz-normalize! s2-0 1.0) + (vector-xz-normalize! s0-0 1.0) + (let ((f0-5 (fmin 18204.445 (acos (vector-dot s0-0 s1-1))))) + (if (< (vector-dot s2-0 s1-1) 0.0) + (set! f0-5 (* -1.0 f0-5)) + ) + (seek! (-> s3-0 torso-angle) f0-5 (* (-> s3-0 torso-seek-speed) (seconds-per-frame))) + ) + ) + ) + ) + ) + (quaternion-vector-angle! gp-0 *y-vector* (* (-> s3-0 torso-angle) (-> s3-0 torso-aim-blend))) + (quaternion*! (-> arg1 quat) (-> arg1 quat) gp-0) + ) + (quaternion-normalize! (-> arg1 quat)) + (cspace<-parented-transformq-joint! arg0 arg1) + (none) + ) + ) + (set! (-> v1-13 param1) this) + ) + (let ((v1-14 (lambda ((arg0 cspace) (arg1 transformq)) + (let ((s3-0 (-> arg0 param1)) + (s2-0 (the-as object (-> arg0 param2))) + (s4-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (quaternion-vector-angle! + (the-as quaternion s4-0) + (the-as vector (-> (the-as roboguard s3-0) upper-rotation-matrix)) + (* (-> (the-as roboguard s3-0) arm-rot (the-as int s2-0)) + (-> (the-as roboguard s3-0) arm-rot-mult (the-as int s2-0)) + ) + ) + (matrix->trans (-> arg0 bone transform) gp-0) + (matrix*! + (-> arg0 bone transform) + (-> arg0 bone transform) + (quaternion->matrix (new 'stack-no-clear 'matrix) (the-as quaternion s4-0)) + ) + (matrix<-trans (-> arg0 bone transform) gp-0) + ) + (none) + ) + ) + ) + (let ((a0-9 (-> this node-list data 10))) + (set! (-> a0-9 param0) v1-14) + (set! (-> a0-9 param1) this) + (set! (-> a0-9 param2) (the-as basic 0)) + ) + (let ((a0-11 (-> this node-list data 14))) + (set! (-> a0-11 param0) v1-14) + (set! (-> a0-11 param1) this) + (set! (-> a0-11 param2) (the-as basic 1)) + ) + ) + (set! (-> this arm-rot-mult 0) 0.0) + (set! (-> this arm-rot-mult 1) 0.0) + (set! (-> this flags) (roboguard-flag)) + (set! (-> this last-attack-time) 0) + (set! (-> this update-focus-pos) #t) + (set! (-> this formation-angle-sign) (if (not (logtest? (-> this pid) 1)) + 1.0 + -1.0 + ) + ) + (set! (-> this last-hit-points) (the int (-> this enemy-info default-hit-points))) + (setup-masks (-> this draw) -1 0) + 0 + (none) + ) + +;; 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 0000000000..08957b0a4d --- /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/enemy/spydroid-orig_REF.gc b/test/decompiler/reference/jak3/levels/common/enemy/spydroid-orig_REF.gc new file mode 100644 index 0000000000..e7d37a742d --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/enemy/spydroid-orig_REF.gc @@ -0,0 +1,1772 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-spydroid-orig-trail + :id 1521 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4976 :fade-after (meters 120) :falloff-to (meters 160)) + (sp-item 4977 :flags (sp6)) + (sp-item 4978 :fade-after (meters 120) :falloff-to (meters 160)) + ) + ) + +;; failed to figure out what this is: +(defpart 4977 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:scale-x (meters 1.7) (meters 1)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees -17) (degrees 17)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 192.0 64.0) + (:b 255.0) + (:a 16.0) + (:omega (degrees 6761.25)) + (:fade-a -1.0666667) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 3072.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4978 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 2.0 2.0) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.033)) + (:r 128.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.03375)) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:fade-r -8.0) + (:fade-g -0.85 -0.85) + (:fade-a -0.10666667 -0.42666668) + (:accel-y (meters -0.0016666667) (meters -0.00066666666)) + (:friction 0.96) + (:timer (seconds 1) (seconds 0.997)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 135) (degrees 90)) + (:conerot-y (degrees 0) (degrees 3600)) + (:conerot-radius (meters -0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 4976 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 2.5 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 128.0) + (:b 255.0) + (:a 64.0 8.0) + (:vel-x (meters -0.0033333334) (meters 0.006666667)) + (:vel-y (meters -0.006666667) (meters -0.006666667)) + (:vel-z (meters -0.0033333334) (meters 0.006666667)) + (:scalevel-x (meters 0.006666667) (meters 0.008333334)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-r 3.2) + (:fade-g 0.0) + (:fade-b -3.2) + (:fade-a -0.8) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.99) + (: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.135)) + (:next-launcher 4979) + ) + ) + +;; failed to figure out what this is: +(defpart 4979 + :init-specs ((:r 128.0) + (:g 128.0) + (:b 128.0) + (:fade-r 0.0) + (:fade-g 0.0) + (:fade-b 0.0) + (:fade-a -0.10666667 -0.21333334) + (:func 'nothing) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-spydroid-orig-explode + :id 1522 + :duration (seconds 3) + :linger-duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4980 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 4981 :flags (sp6) :period (seconds 3) :length (seconds 0.017)) + (sp-item 4982 :period (seconds 3) :length (seconds 0.05)) + (sp-item 4983 :fade-after (meters 60) :period (seconds 3) :length (seconds 0.035) :offset 10) + (sp-item 4984 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 3) :length (seconds 0.167) :offset 20) + (sp-item 4985 :fade-after (meters 200) :falloff-to (meters 200) :period (seconds 3) :length (seconds 0.085) :offset 20) + (sp-item 4986 :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 4981 + :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 -8.5) + (: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 4987) + ) + ) + +;; failed to figure out what this is: +(defpart 4987 + :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 4986 + :init-specs ((:texture (explosion-wave factoryc-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 4988) + (:conerot-x '*sp-temp*) + ) + ) + +;; failed to figure out what this is: +(defpart 4985 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:num 1.0 0.2) + (: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)) + (:next-time (seconds 0.085)) + (:next-launcher 4988) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 4988 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:next-time (seconds 0.017) (seconds 0.065)) (:next-launcher 4989)) + ) + +;; failed to figure out what this is: +(defpart 4989 + :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 4990) + ) + ) + +;; failed to figure out what this is: +(defpart 4990 + :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 4991) + ) + ) + +;; failed to figure out what this is: +(defpart 4991 + :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 4980 + :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 4992) + ) + ) + +;; failed to figure out what this is: +(defpart 4992 + :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 4984 + :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 4993) + (:conerot-x (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 4993 + :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 4994) + ) + ) + +;; failed to figure out what this is: +(defpart 4994 + :init-specs ((:fade-r -0.5543478) (:fade-g -0.5543478) (:fade-a -0.13913043)) + ) + +;; failed to figure out what this is: +(defpart 4982 + :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 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 4995) + (:conerot-x (degrees -1440) (degrees 2880)) + ) + ) + +;; failed to figure out what this is: +(defpart 4995 + :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 4996) + ) + ) + +;; failed to figure out what this is: +(defpart 4996 + :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 4983 + :init-specs ((:texture (flamingstick factoryc-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: +(defpart 4997 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.75)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 16.0) + (:omega (degrees 1361.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 4998 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0 64.0) + (:b 255.0) + (:a 16.0 4.0) + (:omega (degrees 1361.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 4999 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 2) (meters 0.2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees -2) (degrees 4)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 128.0 64.0) + (:b 255.0) + (:a 6.0 2.0) + (:omega (degrees 1811.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 5000 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.75) (meters 0.1)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees -2) (degrees 4)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 128.0 64.0) + (:b 255.0) + (:a 32.0 4.0) + (:omega (degrees 1811.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: +(defskelgroup skel-spydroid-orig spydroid-orig spydroid-orig-lod0-jg spydroid-orig-idle-ja + ((spydroid-orig-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :shadow spydroid-orig-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-spydroid-orig-exploding spydroid-orig spydroid-orig-exploding-lod0-jg spydroid-orig-exploding-idle-ja + ((spydroid-orig-exploding-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 12) + ) + +;; definition for symbol *spydroid-orig-exploder-params*, type joint-exploder-static-params +(define *spydroid-orig-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 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 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 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 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 12 :parent-joint-index -1) + (new 'static 'joint-exploder-static-joint-params :joint-index 23 :parent-joint-index -1) + ) + :collide-spec (collide-spec backgnd obstacle hit-by-others-list) + ) + ) + +;; definition of type spydroid-orig +(deftype spydroid-orig (nav-enemy) + ((old-y-deg float) + (diff-angle float) + (flags spydroid-orig-flag) + (lightning lightning-control 4) + (floor float) + (explode-part sparticle-launch-control) + ) + (:state-methods + attack + explode + ) + ) + +;; definition for method 3 of type spydroid-orig +(defmethod inspect ((this spydroid-orig)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Told-y-deg: ~f~%" (-> this old-y-deg)) + (format #t "~2Tdiff-angle: ~f~%" (-> this diff-angle)) + (format #t "~2Tflags: ~D~%" (-> this flags)) + (format #t "~2Tlightning[4] @ #x~X~%" (-> this lightning)) + (format #t "~2Tfloor: ~f~%" (-> this floor)) + (format #t "~2Texplode-part: ~A~%" (-> this explode-part)) + (label cfg-4) + this + ) + +;; definition for symbol *fact-info-spydroid-orig-defaults*, type fact-info-enemy-defaults +(define *fact-info-spydroid-orig-defaults* (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80))) + +;; definition for symbol *spydroid-orig-nav-enemy-info*, type nav-enemy-info +(define *spydroid-orig-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 3 + :hostile-anim 5 + :hit-anim 15 + :knocked-anim 11 + :knocked-land-anim 12 + :die-anim 15 + :die-falling-anim 15 + :victory-anim -1 + :jump-wind-up-anim 8 + :jump-in-air-anim 9 + :jump-land-anim 10 + :neck-joint 4 + :look-at-joint 4 + :bullseye-joint 4 + :sound-hit (static-sound-name "spydroid-orig-h") + :sound-die (static-sound-name "droid-explode") + :notice-distance (meters 200) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 20) + :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 #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 #t + :use-frustration #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 4 + :turn-anim -1 + :run-anim 5 + :taunt-anim -1 + :run-travel-speed (meters 8) + :run-acceleration (meters 32) + :run-turning-acceleration (meters 40) + :walk-travel-speed (meters 4) + :walk-acceleration (meters 16) + :walk-turning-acceleration (meters 40) + :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! (-> *spydroid-orig-nav-enemy-info* fact-defaults) *fact-info-spydroid-orig-defaults*) + +;; definition for method 59 of type spydroid-orig +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod enemy-common-post ((this spydroid-orig)) + (let ((t9-0 (method-of-type nav-enemy enemy-common-post))) + (t9-0 this) + ) + (when (< (-> this root scale x) 1.0) + (let ((f0-2 (fmin 1.0 (+ 0.025 (-> this root scale x))))) + (set-vector! (-> this root scale) f0-2 f0-2 f0-2 1.0) + ) + ) + (when (logtest? (-> this flags) (spydroid-orig-flag sof0)) + (let ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (vector<-cspace! s5-0 (-> this node-list data 12)) + (dotimes (s3-0 4) + (let ((a0-4 (-> this lightning s3-0)) + (v1-15 s5-0) + ) + (set! (-> a0-4 state meet data 0 quad) (-> v1-15 quad)) + ) + (let ((v1-17 s3-0)) + (cond + ((zero? v1-17) + (vector<-cspace! s4-0 (-> this node-list data 16)) + ) + ((= v1-17 1) + (vector<-cspace! s4-0 (-> this node-list data 20)) + ) + ((= v1-17 2) + (vector<-cspace! s4-0 (-> this node-list data 28)) + ) + (else + (vector<-cspace! s4-0 (-> this node-list data 24)) + ) + ) + ) + (let ((a0-13 (-> this lightning s3-0)) + (v1-28 s4-0) + ) + (set! (-> a0-13 state meet data (+ (-> a0-13 state points-to-draw) -1) quad) (-> v1-28 quad)) + ) + (when (not (and (-> this next-state) (let ((v1-33 (-> this next-state name))) + (or (= v1-33 'die-falling) (= v1-33 'explode)) + ) + ) + ) + (let ((v1-38 (-> this lightning s3-0 state mode))) + (when (or (zero? v1-38) (= v1-38 3)) + (let ((v1-42 (-> this lightning s3-0)) + (a0-20 1) + ) + (let ((a1-11 (!= a0-20 (-> v1-42 state mode)))) + (case a0-20 + ((3) + (if a1-11 + (set! (-> v1-42 state counter) 0.0) + ) + ) + ((1) + (set! (-> v1-42 state start-color) (-> v1-42 spec start-color)) + (set! (-> v1-42 state end-color) (-> v1-42 spec end-color)) + ) + ) + ) + (set! (-> v1-42 state mode) (the-as uint a0-20)) + ) + ) + ) + ) + ) + ) + ) + (let ((f0-5 (quaternion-y-angle (-> this root quat)))) + (set! (-> this diff-angle) (- (-> this old-y-deg) f0-5)) + (cond + ((< 32768.0 (-> this diff-angle)) + (+! (-> this diff-angle) -65536.0) + ) + ((< (-> this diff-angle) -32768.0) + (+! (-> this diff-angle) 65536.0) + ) + ) + (set! (-> this old-y-deg) f0-5) + ) + (if (< (+ 0.5 (* 0.00024414062 (-> this nav state speed))) (* 0.005493164 (fabs (-> this diff-angle)))) + (logior! (-> this flags) (spydroid-orig-flag sof1)) + (logclear! (-> this flags) (spydroid-orig-flag sof1)) + ) + (if (and (< (-> this root trans y) (+ -122880.0 (-> this floor))) + (-> this next-state) + (= (-> this next-state name) 'jump) + ) + (deactivate this) + ) + (if (and (-> this next-state) (= (-> this next-state name) 'jump)) + (spawn (-> this part) (-> this root trans)) + ) + 0 + (none) + ) + +;; definition for method 82 of type spydroid-orig +;; INFO: Used lq/sq +(defmethod event-handler ((this spydroid-orig) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v1-8 structure) (sv-144 vector)) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (case arg2 + (('touch 'bonk 'attack) + (cond + ((logtest? (-> this flags) (spydroid-orig-flag sof0)) + (set! sv-144 (the-as vector (send-event (ppointer->process (-> this parent)) 'widow-get-center))) + (let* ((s1-0 arg0) + (s0-0 (if (type? s1-0 process-drawable) + s1-0 + ) + ) + ) + (let ((v1-7 sv-144)) + (b! (not v1-7) cfg-16 :likely-delay (set! v1-8 sv-144)) + ) + (set! v1-8 s0-0) + (label cfg-16) + (cond + (v1-8 + (let ((v1-12 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) sv-144)) + (s1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s1-1 x) (- (-> v1-12 z))) + (set! (-> s1-1 y) 0.0) + (set! (-> s1-1 z) (-> v1-12 x)) + (set! (-> s1-1 w) 1.0) + (let ((v1-15 + (vector-! (new 'stack-no-clear 'vector) (-> (the-as process-drawable s0-0) root trans) (-> this root trans)) + ) + ) + (set! (-> s1-1 y) 0.0) + (set! (-> v1-15 y) 0.0) + (if (< (vector-dot v1-15 s1-1) 0.0) + (vector-negate! s1-1 s1-1) + ) + ) + (vector-normalize! s1-1 16384.0) + (vector+! s1-1 s1-1 (-> (the-as process-drawable s0-0) root trans)) + (vector-! s1-1 s1-1 sv-144) + (set! (-> s1-1 y) 0.0) + (vector-normalize! s1-1 204800.0) + (let ((v1-20 s1-1)) + (let ((a0-19 s1-1)) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> a0-19 quad)) + ) + (.lvf vf5 (&-> sv-144 quad)) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-20 quad) vf6) + ) + (vector-! s1-1 s1-1 (-> (the-as process-drawable s0-0) root trans)) + (set! (-> s1-1 y) 8192.0) + (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) + (vector s1-1) + ) + ) + ) + ) + ) + ((and s0-0 (= (-> s0-0 type) target)) + (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)) + ) + ) + ) + ) + ) + ) + (let ((v1-36 (the-as object (-> arg3 param 1)))) + (if (or (!= arg0 *target*) + (and (= arg2 'attack) + (logtest? (attack-mask penetrate-using) (-> (the-as attack-info v1-36) mask)) + (logtest? (penetrate vehicle dark-bomb) (-> (the-as attack-info v1-36) penetrate-using)) + ) + ) + ((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) + ) + ) + ) + (('jump) + (set! (-> this floor) (-> (the-as vector (-> arg3 param 1)) y)) + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + (('use-lightning) + (cond + ((-> arg3 param 0) + (let ((v0-7 (the-as object (logior (-> this flags) (spydroid-orig-flag sof0))))) + (set! (-> this flags) (the-as spydroid-orig-flag v0-7)) + v0-7 + ) + ) + (else + (logclear! (-> this flags) (spydroid-orig-flag sof0)) + (dotimes (v1-47 4) + (let ((a0-56 (-> this lightning v1-47 state mode))) + (cond + ((or (zero? a0-56) (= a0-56 3)) + ) + (else + (let ((a0-60 (-> this lightning v1-47)) + (a1-28 3) + ) + (let ((a2-9 (!= a1-28 (-> a0-60 state mode)))) + (case a1-28 + ((3) + (if a2-9 + (set! (-> a0-60 state counter) 0.0) + ) + ) + ((1) + (set! (-> a0-60 state start-color) (-> a0-60 spec start-color)) + (set! (-> a0-60 state end-color) (-> a0-60 spec end-color)) + ) + ) + ) + (set! (-> a0-60 state mode) (the-as uint a1-28)) + ) + ) + ) + ) + ) + #f + ) + ) + ) + (('impact-impulse) + (let ((v1-49 (the-as object (-> arg3 param 0)))) + (when (< 4096.0 (-> (the-as rigid-body-impact v1-49) impulse)) + (logior! (-> this root penetrated-by) (penetrate vehicle)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.1)) + (set! (-> this hit-points) 0.0) + (send-event arg0 'lawsuit (-> this root trans)) + (go (method-of-object this explode)) + #t + ) + ) + ) + (('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 + ((or (= (-> this hit-points) 0.0) (nonzero? (-> this fated-time))) + (on-dying this) + (go (method-of-object this explode)) + ) + (else + (go (method-of-object this knocked)) + ) + ) + #t + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate explode (spydroid-orig) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (send-event self 'death-start) + (sound-play "droid-explode") + (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)) + (set! (-> self root root-prim local-sphere w) 491520.0) + (when (logtest? (-> self flags) (spydroid-orig-flag sof0)) + (dotimes (v1-16 4) + (let ((a0-7 (-> self lightning v1-16)) + (a1-2 3) + ) + (let ((a2-2 (!= a1-2 (-> a0-7 state mode)))) + (case a1-2 + ((3) + (if a2-2 + (set! (-> a0-7 state counter) 0.0) + ) + ) + ((1) + (set! (-> a0-7 state start-color) (-> a0-7 spec start-color)) + (set! (-> a0-7 state end-color) (-> a0-7 spec end-color)) + ) + ) + ) + (set! (-> a0-7 state mode) (the-as uint a1-2)) + ) + ) + ) + (let ((gp-1 (new 'stack 'joint-exploder-tuning (the-as uint 0)))) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-spydroid-orig-exploding" (the-as (pointer level) #f)) + 20 + gp-1 + *spydroid-orig-exploder-params* + :name "joint-exploder" + :to self + ) + ) + (let ((v1-25 (new 'stack-no-clear 'vector))) + (set! (-> v1-25 quad) (-> self root trans quad)) + (cond + ((logtest? (-> *part-group-id-table* 219 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-25 quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 219)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-25 quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 219)) + ) + ) + ) + (let ((gp-4 (-> self child))) + (while gp-4 + (send-event (ppointer->process gp-4) 'notice 'die) + (set! gp-4 (-> gp-4 0 brother)) + ) + ) + ) + :trans (behavior () + (when (not (-> self child)) + (cleanup-for-death self) + (deactivate self) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate die-falling (spydroid-orig) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy die-falling) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-time! (-> self state-time)) + (send-event self 'death-start) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy die-falling) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (not (time-elapsed? (-> self state-time) (seconds 2))) + (spawn (-> self explode-part) (-> self root trans)) + ) + ) + :code (behavior () + (when (logtest? (-> self flags) (spydroid-orig-flag sof0)) + (dotimes (v1-3 4) + (let ((a0-2 (-> self lightning v1-3)) + (a1-0 3) + ) + (let ((a2-1 (!= a1-0 (-> a0-2 state mode)))) + (case a1-0 + ((3) + (if a2-1 + (set! (-> a0-2 state counter) 0.0) + ) + ) + ((1) + (set! (-> a0-2 state start-color) (-> a0-2 spec start-color)) + (set! (-> a0-2 state end-color) (-> a0-2 spec end-color)) + ) + ) + ) + (set! (-> a0-2 state mode) (the-as uint a1-0)) + ) + ) + ) + (suspend) + (ja-channel-set! 0) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (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) + ) + ) + +;; failed to figure out what this is: +(defstate attack (spydroid-orig) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logclear! (-> self flags) (spydroid-orig-flag sof2)) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (let ((v1-4 (-> self nav))) + (set! (-> v1-4 target-speed) (+ 8192.0 (-> self enemy-info run-travel-speed))) + ) + 0 + (let ((v1-7 (-> self nav state))) + (set! (-> v1-7 speed) (+ 8192.0 (-> self enemy-info run-travel-speed))) + ) + 0 + (let ((v1-9 (-> self nav))) + (set! (-> v1-9 turning-acceleration) (* 4.0 (-> self enemy-info run-turning-acceleration))) + ) + 0 + (set! (-> self root penetrate-using) (penetrate generic-attack lunge)) + (reset-penetrate! self) + (let* ((v1-14 *game-info*) + (a0-11 (+ (-> v1-14 attack-id) 1)) + ) + (set! (-> v1-14 attack-id) a0-11) + (set! (-> self attack-id) a0-11) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! spydroid-orig-attack-jump-ja :num! min) + ) + :exit (behavior () + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (nav-enemy-method-179 self) + (let ((v1-4 (-> self nav))) + (set! (-> v1-4 target-speed) (-> self enemy-info run-travel-speed)) + ) + 0 + (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 () + (reset-penetrate! self) + nav-state + (if (logtest? (-> self enemy-flags) (enemy-flag victory)) + (logior! (-> self flags) (spydroid-orig-flag sof2)) + ) + (let ((v1-10 (ja-group))) + (cond + ((and v1-10 (= v1-10 spydroid-orig-attack-jump-ja)) + (ja :num! (seek!)) + (if (and (< 4.0 (ja-aframe-num 0)) (not (logtest? (-> self flags) (spydroid-orig-flag sof0)))) + (logior! (-> self focus-status) (focus-status dangerous)) + ) + (when (ja-done? 0) + (let ((v1-28 (-> self nav))) + (set! (-> v1-28 target-speed) 0.0) + ) + 0 + (let ((v1-30 (-> self nav))) + (set! (-> v1-30 acceleration) 262144.0) + ) + 0 + (let ((v1-32 (-> self nav))) + (set! (-> v1-32 turning-acceleration) 0.0) + ) + 0 + (ja :group! spydroid-orig-attack-land-ja :num! min) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + ) + ) + (else + (let ((v1-45 (ja-group))) + (cond + ((and v1-45 (= v1-45 spydroid-orig-attack-land-ja)) + (ja :num! (seek!)) + (cond + ((ja-done? 0) + (go-hostile self) + ) + ((not (logtest? (-> self flags) (spydroid-orig-flag sof1))) + ) + ((< 0.0 (-> self diff-angle)) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! spydroid-orig-turn-left-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! spydroid-orig-turn-right-ja :num! min) + ) + ) + ) + ((let ((v1-69 (ja-group))) + (and (and v1-69 (= v1-69 spydroid-orig-turn-left-ja)) + (and (logtest? (-> self flags) (spydroid-orig-flag sof1)) (< 0.0 (-> self diff-angle))) + ) + ) + (ja :num! (loop! (* 0.0019975142 (-> self diff-angle)))) + ) + (else + (let ((v1-80 (ja-group))) + (if (and (and v1-80 (= v1-80 spydroid-orig-turn-right-ja)) + (and (logtest? (-> self flags) (spydroid-orig-flag sof1)) (< (-> self diff-angle) 0.0)) + ) + (ja :num! (loop! (* -0.0019975142 (-> self diff-angle)))) + (go-hostile self) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :code sleep-code + :post nav-enemy-chase-post + ) + +;; failed to figure out what this is: +(defstate notice (spydroid-orig) + :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 hostile (spydroid-orig) + :virtual #t + :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)))) + (if (and (time-elapsed? (-> self state-time) (-> self reaction-time)) + (and a0-1 + (let ((f0-0 (vector-vector-xz-distance-squared (get-trans (the-as process-focusable a0-1) 0) (-> self root trans))) + (f1-0 16384.0) + ) + (< f0-0 (* f1-0 f1-0)) + ) + ) + ) + (go-virtual attack) + ) + ) + (cond + ((not (logtest? (-> self flags) (spydroid-orig-flag sof1))) + (let ((v1-24 (ja-group))) + (when (not (and v1-24 (= v1-24 (-> self draw art-group data (-> self enemy-info hostile-anim))))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data (-> self enemy-info hostile-anim)) :num! min) + ) + ) + (ja :num! (loop! (/ (-> self nav state speed) (* 0.5 (-> self enemy-info run-travel-speed))))) + ) + ((< 0.0 (-> self diff-angle)) + (let ((v1-44 (ja-group))) + (cond + ((not (and v1-44 (= v1-44 spydroid-orig-turn-left-ja))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! spydroid-orig-turn-left-ja :num! min) + ) + (else + (ja :num! (loop! (* 0.0019975142 (-> self diff-angle)))) + ) + ) + ) + ) + (else + (let ((v1-56 (ja-group))) + (cond + ((not (and v1-56 (= v1-56 spydroid-orig-turn-right-ja))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! spydroid-orig-turn-right-ja :num! min) + ) + (else + (ja :num! (loop! (* -0.0019975142 (-> self diff-angle)))) + ) + ) + ) + ) + ) + ) + :code (behavior () + (until #f + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate circling (spydroid-orig) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy circling) trans))) + (if t9-0 + (t9-0) + ) + ) + (cond + ((not (logtest? (-> self flags) (spydroid-orig-flag sof1))) + (let ((v1-8 (ja-group))) + (when (not (and v1-8 (= v1-8 (-> self draw art-group data (-> self enemy-info walk-anim))))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data (-> self enemy-info walk-anim)) :num! min) + ) + ) + (ja :num! (loop! (/ (-> self nav state speed) (* 0.5 (-> self enemy-info run-travel-speed))))) + ) + ((< 0.0 (-> self diff-angle)) + (let ((v1-28 (ja-group))) + (cond + ((not (and v1-28 (= v1-28 spydroid-orig-turn-left-ja))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! spydroid-orig-turn-left-ja :num! min) + ) + (else + (ja :num! (loop! (* 0.0019975142 (-> self diff-angle)))) + ) + ) + ) + ) + (else + (let ((v1-40 (ja-group))) + (cond + ((not (and v1-40 (= v1-40 spydroid-orig-turn-right-ja))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! spydroid-orig-turn-right-ja :num! min) + ) + (else + (ja :num! (loop! (* -0.0019975142 (-> self diff-angle)))) + ) + ) + ) + ) + ) + ) + :code (behavior () + (nav-enemy-method-176 self) + (until #f + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate pacing (spydroid-orig) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy pacing) trans))) + (if t9-0 + (t9-0) + ) + ) + (cond + ((not (logtest? (-> self flags) (spydroid-orig-flag sof1))) + (let ((v1-8 (ja-group))) + (when (not (and v1-8 (= v1-8 (-> self draw art-group data (-> self enemy-info walk-anim))))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data (-> self enemy-info walk-anim)) :num! min) + ) + ) + (ja :num! (loop! (/ (-> self nav state speed) (* 0.5 (-> self enemy-info run-travel-speed))))) + ) + ((< 0.0 (-> self diff-angle)) + (let ((v1-28 (ja-group))) + (cond + ((not (and v1-28 (= v1-28 spydroid-orig-turn-left-ja))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! spydroid-orig-turn-left-ja :num! min) + ) + (else + (ja :num! (loop! (* 0.0019975142 (-> self diff-angle)))) + ) + ) + ) + ) + (else + (let ((v1-40 (ja-group))) + (cond + ((not (and v1-40 (= v1-40 spydroid-orig-turn-right-ja))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! spydroid-orig-turn-right-ja :num! min) + ) + (else + (ja :num! (loop! (* -0.0019975142 (-> self diff-angle)))) + ) + ) + ) + ) + ) + ) + :code (behavior () + (until #f + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate stare (spydroid-orig) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy stare) trans))) + (if t9-0 + (t9-0) + ) + ) + (cond + ((not (logtest? (-> self flags) (spydroid-orig-flag sof1))) + (let ((v1-8 (ja-group))) + (when (not (and v1-8 (= v1-8 (-> self draw art-group data (-> self enemy-info idle-anim))))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! (-> self draw art-group data (-> self enemy-info idle-anim)) :num! min) + ) + ) + (ja :num! (loop!)) + ) + ((< 0.0 (-> self diff-angle)) + (let ((v1-24 (ja-group))) + (cond + ((not (and v1-24 (= v1-24 spydroid-orig-turn-left-ja))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! spydroid-orig-turn-left-ja :num! min) + ) + (else + (ja :num! (loop! (* 0.0019975142 (-> self diff-angle)))) + ) + ) + ) + ) + (else + (let ((v1-36 (ja-group))) + (cond + ((not (and v1-36 (= v1-36 spydroid-orig-turn-right-ja))) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! spydroid-orig-turn-right-ja :num! min) + ) + (else + (ja :num! (loop! (* -0.0019975142 (-> self diff-angle)))) + ) + ) + ) + ) + ) + ) + :code (behavior () + (until #f + (logior! (-> self mask) (process-mask sleep-code)) + (suspend) + ) + #f + ) + ) + +;; definition for method 120 of type spydroid-orig +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this spydroid-orig)) + (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 obstacle hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid deadly)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 4300.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 jak bot player-list)) + (set! (-> v1-14 prim-core action) (collide-action deadly)) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 0.0 4096.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 obstacle hit-by-others-list 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 3686.4) + ) + (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! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 67 of type spydroid-orig +(defmethod coin-flip? ((this spydroid-orig)) + #f + ) + +;; definition for method 27 of type spydroid-orig +(defmethod get-inv-mass ((this spydroid-orig)) + 3.3333333 + ) + +;; definition for method 10 of type spydroid-orig +(defmethod deactivate ((this spydroid-orig)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this explode-part)) + (kill-particles (-> this explode-part)) + ) + (call-parent-method this) + (none) + ) + +;; definition for method 7 of type spydroid-orig +;; WARN: Return type mismatch nav-enemy vs spydroid-orig. +(defmethod relocate ((this spydroid-orig) (offset int)) + (dotimes (v1-0 4) + (if (nonzero? (-> this lightning v1-0)) + (&+! (-> this lightning v1-0) offset) + ) + ) + (when (nonzero? (-> this explode-part)) + (if (nonzero? (-> this explode-part)) + (&+! (-> this explode-part) offset) + ) + ) + (the-as spydroid-orig ((method-of-type nav-enemy relocate) this offset)) + ) + +;; definition for method 121 of type spydroid-orig +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this spydroid-orig)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-spydroid-orig" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *spydroid-orig-nav-enemy-info*) + (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 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-10 (-> this lightning s5-1)) + (a0-5 0) + ) + (let ((a1-5 (!= a0-5 (-> v1-10 state mode)))) + (case a0-5 + ((3) + (if a1-5 + (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-5)) + ) + ) + (let ((v1-13 (-> this neck))) + (set! (-> v1-13 up) (the-as uint 1)) + (set! (-> v1-13 nose) (the-as uint 2)) + (set! (-> v1-13 ear) (the-as uint 0)) + (set-vector! (-> v1-13 twist-max) 3640.889 11832.889 0.0 1.0) + (set! (-> v1-13 ignore-angle) 15473.777) + ) + (set-vector! (-> this root scale) 0.5 0.5 0.5 1.0) + (let ((v1-17 (-> this nav))) + (set! (-> v1-17 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* 1521) this)) + (set! (-> this explode-part) (create-launch-control (-> *part-group-id-table* 1522) this)) + (add-connection + *part-engine* + this + 8 + this + 4997 + (new 'static 'vector :x -204.8 :y 122.88 :z 1720.32 :w 163840.0) + ) + (add-connection + *part-engine* + this + 10 + this + 4997 + (new 'static 'vector :x -245.76 :y -122.88 :z 901.12 :w 163840.0) + ) + (add-connection + *part-engine* + this + 4 + this + 4998 + (new 'static 'vector :x 819.2 :y -122.88 :z 3358.72 :w 163840.0) + ) + (add-connection *part-engine* this 6 this 4999 (new 'static 'vector :w 163840.0)) + (add-connection *part-engine* this 6 this 5000 (new 'static 'vector :w 163840.0)) + (logclear! (-> this mask) (process-mask actor-pause)) + (logclear! (-> this enemy-flags) (enemy-flag actor-pause-backup)) + (set! (-> this flags) (spydroid-orig-flag)) + (if (-> this entity) + (set! (-> this flags) + (res-lump-value (-> this entity) 'spydroid-flags spydroid-orig-flag :time -1000000000.0) + ) + ) + (logclear! (-> this flags) (spydroid-orig-flag sof1 sof2)) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/common/hvehicle/squad-control-h_REF.gc b/test/decompiler/reference/jak3/levels/common/hvehicle/squad-control-h_REF.gc new file mode 100644 index 0000000000..1f94e1e64d --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/hvehicle/squad-control-h_REF.gc @@ -0,0 +1,238 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type squad-unit-settings +(deftype squad-unit-settings (structure) + ((target-count int8) + (shot-count int8) + (rand-shot-count int8) + (inaccuracy float) + (acquire-delay uint16) + (shot-delay uint16) + (burst-delay uint16) + (rand-burst-delay uint16) + (rand-shot-delay uint16) + ) + ) + +;; definition for method 3 of type squad-unit-settings +(defmethod inspect ((this squad-unit-settings)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'squad-unit-settings) + (format #t "~1Ttarget-count: ~D~%" (-> this target-count)) + (format #t "~1Tshot-count: ~D~%" (-> this shot-count)) + (format #t "~1Trand-shot-count: ~D~%" (-> this rand-shot-count)) + (format #t "~1Tinaccuracy: ~f~%" (-> this inaccuracy)) + (format #t "~1Tacquire-delay: ~D~%" (-> this acquire-delay)) + (format #t "~1Tshot-delay: ~D~%" (-> this shot-delay)) + (format #t "~1Tburst-delay: ~D~%" (-> this burst-delay)) + (format #t "~1Trand-burst-delay: ~D~%" (-> this rand-burst-delay)) + (format #t "~1Trand-shot-delay: ~D~%" (-> this rand-shot-delay)) + (label cfg-4) + this + ) + +;; definition of type squad-target-status +(deftype squad-target-status (structure) + ((flags squad-target-flag) + (handle handle) + (last-seen-time time-frame) + (position vector :inline) + (velocity vector :inline) + (threat-level float) + ) + ) + +;; definition for method 3 of type squad-target-status +(defmethod inspect ((this squad-target-status)) + (when (not this) + (set! this this) + (goto cfg-14) + ) + (format #t "[~8x] ~A~%" this 'squad-target-status) + (format #t "~1Tflags: #x~X : (squad-target-flag " (-> this flags)) + (let ((s5-0 (-> this flags))) + (if (= (logand s5-0 (squad-target-flag visible-now)) (squad-target-flag visible-now)) + (format #t "visible-now ") + ) + (if (= (logand s5-0 (squad-target-flag visible-ever)) (squad-target-flag visible-ever)) + (format #t "visible-ever ") + ) + (if (= (logand s5-0 (squad-target-flag force-visible)) (squad-target-flag force-visible)) + (format #t "force-visible ") + ) + (if (= (logand s5-0 (squad-target-flag visible-recently)) (squad-target-flag visible-recently)) + (format #t "visible-recently ") + ) + (if (= (logand s5-0 (squad-target-flag updated)) (squad-target-flag updated)) + (format #t "updated ") + ) + ) + (format #t ")~%") + (format #t "~1Thandle: ~D~%" (-> this handle)) + (format #t "~1Tlast-seen-time: ~D~%" (-> this last-seen-time)) + (format #t "~1Tposition: #~%" (-> this position)) + (format #t "~1Tvelocity: #~%" (-> this velocity)) + (format #t "~1Tthreat-level: ~f~%" (-> this threat-level)) + (label cfg-14) + this + ) + +;; definition of type squad-alert-state +(deftype squad-alert-state (structure) + ((flags squad-alert-flag) + (level uint8) + (max-level uint8) + (guards-in-sight-of-target int8) + (guard-aim-count int8) + (guard-inaccuracy-factor float) + (guard-target-level float) + (duration uint32) + (start-time time-frame) + (notify-time time-frame) + (alarm-sound-id sound-id) + (target-status-array squad-target-status 3 :inline) + (target-status squad-target-status :inline :overlay-at (-> target-status-array 0)) + ) + (:methods + (init! (_type_) none) + ) + ) + +;; definition for method 3 of type squad-alert-state +(defmethod inspect ((this squad-alert-state)) + (when (not this) + (set! this this) + (goto cfg-18) + ) + (format #t "[~8x] ~A~%" this 'squad-alert-state) + (format #t "~1Tflags: #x~X : (squad-alert-flag " (-> this flags)) + (let ((s5-0 (-> this flags))) + (if (= (logand s5-0 (squad-alert-flag update-target-search)) (squad-alert-flag update-target-search)) + (format #t "update-target-search ") + ) + (if (= (logand s5-0 (squad-alert-flag disable-pursuit-control)) (squad-alert-flag disable-pursuit-control)) + (format #t "disable-pursuit-control ") + ) + (if (= (logand s5-0 (squad-alert-flag sticky-guard-settings)) (squad-alert-flag sticky-guard-settings)) + (format #t "sticky-guard-settings ") + ) + (if (= (logand s5-0 (squad-alert-flag alarm-on)) (squad-alert-flag alarm-on)) + (format #t "alarm-on ") + ) + (if (= (logand s5-0 (squad-alert-flag war)) (squad-alert-flag war)) + (format #t "war ") + ) + (if (= (logand s5-0 (squad-alert-flag alert-ending)) (squad-alert-flag alert-ending)) + (format #t "alert-ending ") + ) + (if (= (logand s5-0 (squad-alert-flag guard-multi-focus)) (squad-alert-flag guard-multi-focus)) + (format #t "guard-multi-focus ") + ) + ) + (format #t ")~%") + (format #t "~1Tlevel: ~D~%" (-> this level)) + (format #t "~1Tmax-level: ~D~%" (-> this max-level)) + (format #t "~1Tguards-in-sight-of-target: ~D~%" (-> this guards-in-sight-of-target)) + (format #t "~1Tguard-aim-count: ~D~%" (-> this guard-aim-count)) + (format #t "~1Tguard-inaccuracy-factor: ~f~%" (-> this guard-inaccuracy-factor)) + (format #t "~1Tguard-target-level: ~f~%" (-> this guard-target-level)) + (format #t "~1Tduration: ~D~%" (-> this duration)) + (format #t "~1Tstart-time: ~D~%" (-> this start-time)) + (format #t "~1Tnotify-time: ~D~%" (-> this notify-time)) + (format #t "~1Talarm-sound-id: ~D~%" (-> this alarm-sound-id)) + (format #t "~1Ttarget-status-array[3] @ #x~X~%" (-> this target-status-array)) + (format #t "~1Ttarget-status: #~%" (-> this target-status-array)) + (label cfg-18) + this + ) + +;; definition of type primary-target-pos-vel +(deftype primary-target-pos-vel (structure) + ((position vector :inline) + (velocity vector :inline) + (time uint32 :overlay-at (-> velocity data 3)) + ) + ) + +;; definition for method 3 of type primary-target-pos-vel +(defmethod inspect ((this primary-target-pos-vel)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'primary-target-pos-vel) + (format #t "~1Tposition: #~%" (-> this position)) + (format #t "~1Tvelocity: #~%" (-> this velocity)) + (format #t "~1Ttime: ~D~%" (-> this time)) + (label cfg-4) + this + ) + +;; definition of type squad-control +(deftype squad-control (basic) + ((sync-clock uint8) + (sync-mask-8 uint8) + (sync-mask-16 uint16) + (sync-mask-32 uint32) + (alert-state squad-alert-state :inline) + (primary-target-history primary-target-pos-vel 16 :inline) + ) + (:methods + (initialize (_type_ process) none) + (squad-control-method-10 (_type_) none) + (stop-alarm-sound (_type_) none) + (init-alert (_type_) none) + (update (_type_) none) + (set-sync-mask (_type_) none) + (probe-backgnd-collision (_type_ vector vector) symbol) + (squad-control-method-16 (_type_ vector process-focusable squad-target-status) none) + (squad-control-method-17 (_type_ vector int squad-target-status) none) + (squad-control-method-18 (_type_ int process) int) + (set-alert-level0 (_type_ int) int) + (start-alert (_type_ int) none) + (set-alert-level (_type_ int) none) + (get-alert-level (_type_) int) + (set-alert-duration (_type_ time-frame) none) + (squad-control-method-24 (_type_) int) + (squad-control-method-25 (_type_ primary-target-pos-vel time-frame) none) + (set-pos-vel (_type_ primary-target-pos-vel) primary-target-pos-vel) + (squad-control-method-27 (_type_ process float) none) + (get-idx-in-status-arr (_type_ handle) int) + (valid-target-handle? (_type_ handle) symbol) + (get-target-focus (_type_) process-focusable) + (squad-control-method-31 (_type_ vector process-focusable handle float float) none) + (get-handle-pos (_type_ handle vector) vector) + (get-focus-in-range (_type_ process-focusable) process-focusable) + ) + ) + +;; definition for method 3 of type squad-control +(defmethod inspect ((this 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)) + (label cfg-4) + this + ) + +;; definition for symbol *waswide-squad-control*, type squad-control +(define *waswide-squad-control* (the-as squad-control #f)) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/common/hvehicle/squad-control_REF.gc b/test/decompiler/reference/jak3/levels/common/hvehicle/squad-control_REF.gc new file mode 100644 index 0000000000..6a5f15ac0b --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/hvehicle/squad-control_REF.gc @@ -0,0 +1,556 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 9 of type squad-alert-state +;; WARN: Return type mismatch int vs none. +(defmethod init! ((this squad-alert-state)) + (set! (-> this flags) (squad-alert-flag)) + (set! (-> this level) (the-as uint 0)) + (set! (-> this duration) (the-as uint 9000)) + (set! (-> this alarm-sound-id) (new-sound-id)) + (set! (-> this guard-inaccuracy-factor) 1.0) + (dotimes (v1-2 3) + (let ((a0-4 (-> this target-status-array v1-2))) + (set! (-> a0-4 flags) (squad-target-flag)) + (set! (-> a0-4 handle) (the-as handle #f)) + (vector-reset! (-> a0-4 position)) + (vector-reset! (-> a0-4 velocity)) + (set! (-> a0-4 threat-level) 0.0) + ) + ) + 0 + (none) + ) + +;; definition for method 9 of type squad-control +;; WARN: Return type mismatch int vs none. +(defmethod initialize ((this squad-control) (arg0 process)) + 0 + (none) + ) + +;; definition for method 10 of type squad-control +;; WARN: Return type mismatch int vs none. +(defmethod squad-control-method-10 ((this squad-control)) + (init! (-> this alert-state)) + (init-alert this) + 0 + (none) + ) + +;; definition for method 11 of type squad-control +;; WARN: Return type mismatch int vs none. +(defmethod stop-alarm-sound ((this squad-control)) + (sound-stop (-> this alert-state alarm-sound-id)) + 0 + (none) + ) + +;; definition for method 12 of type squad-control +;; WARN: Return type mismatch int vs none. +(defmethod init-alert ((this squad-control)) + (logclear! + (-> this alert-state flags) + (squad-alert-flag guard-multi-focus sticky-guard-settings disable-pursuit-control war) + ) + (let ((v1-2 (-> this alert-state target-status-array))) + (logclear! (-> v1-2 0 flags) (squad-target-flag force-visible)) + ) + (set-alert-duration this (seconds 30)) + (set-alert-level this 4) + 0 + (none) + ) + +;; definition for method 14 of type squad-control +;; WARN: Return type mismatch int vs none. +(defmethod set-sync-mask ((this squad-control)) + (+! (-> this sync-clock) 1) + (let ((v1-2 (-> this sync-clock))) + (set! (-> this sync-mask-8) (the-as uint (ash 1 (the-as int (logand v1-2 7))))) + (set! (-> this sync-mask-16) (the-as uint (ash 1 (the-as int (logand v1-2 15))))) + (set! (-> this sync-mask-32) (the-as uint (ash 1 (the-as int (logand v1-2 31))))) + ) + 0 + (none) + ) + +;; definition for method 13 of type squad-control +;; WARN: Return type mismatch int vs none. +(defmethod update ((this squad-control)) + (set-sync-mask this) + 0 + (none) + ) + +;; definition for method 17 of type squad-control +;; INFO: this function exists in multiple non-identical object files +;; WARN: Return type mismatch squad-target-status vs none. +(defmethod squad-control-method-17 ((this squad-control) (arg0 vector) (arg1 int) (arg2 squad-target-status)) + (empty) + (none) + ) + +;; definition for method 18 of type squad-control +(defmethod squad-control-method-18 ((this squad-control) (arg0 int) (arg1 process)) + (if (logtest? (-> this alert-state flags) (squad-alert-flag war)) + (return 0) + ) + (when (valid-target-handle? this (process->handle arg1)) + (let ((v1-10 (min arg0 (the-as int (-> this alert-state max-level))))) + (if (< (-> this alert-state level) (the-as uint v1-10)) + (logior! (-> this alert-state flags) (squad-alert-flag update-target-search)) + ) + (set-time! (-> this alert-state start-time)) + (logclear! (-> this alert-state flags) (squad-alert-flag alert-ending)) + (set! (-> this alert-state level) (the-as uint (max (the-as int (-> this alert-state level)) v1-10))) + ) + ) + 0 + ) + +;; definition for method 19 of type squad-control +(defmethod set-alert-level0 ((this squad-control) (arg0 int)) + (if (logtest? (-> this alert-state flags) (squad-alert-flag war)) + (return 0) + ) + (set! (-> this alert-state level) (the-as uint (min (the-as int (-> this alert-state level)) arg0))) + 0 + ) + +;; definition for method 20 of type squad-control +;; WARN: Return type mismatch int vs none. +(defmethod start-alert ((this squad-control) (arg0 int)) + (set! (-> this alert-state level) (the-as uint arg0)) + (set-time! (-> this alert-state start-time)) + (logclear! (-> this alert-state flags) (squad-alert-flag alert-ending)) + 0 + (none) + ) + +;; definition for method 21 of type squad-control +;; WARN: Return type mismatch int vs none. +(defmethod set-alert-level ((this squad-control) (arg0 int)) + (set! (-> this alert-state max-level) (the-as uint arg0)) + (set! (-> this alert-state level) (the-as uint (min (the-as int (-> this alert-state level)) arg0))) + 0 + (none) + ) + +;; definition for method 22 of type squad-control +(defmethod get-alert-level ((this squad-control)) + (if (logtest? (-> this alert-state flags) (squad-alert-flag war)) + (return 0) + ) + (the-as int (-> this alert-state level)) + ) + +;; definition for method 23 of type squad-control +;; WARN: Return type mismatch int vs none. +(defmethod set-alert-duration ((this squad-control) (arg0 time-frame)) + (set! (-> this alert-state duration) (the-as uint arg0)) + 0 + (none) + ) + +;; definition for method 15 of type squad-control +;; INFO: Used lq/sq +(defmethod probe-backgnd-collision ((this squad-control) (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-4 v1-0)) + (set! (-> a0-4 radius) 2048.0) + (set! (-> a0-4 collide-with) (collide-spec backgnd)) + (set! (-> a0-4 ignore-process0) #f) + (set! (-> a0-4 ignore-process1) #f) + (set! (-> a0-4 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> a0-4 action-mask) (collide-action solid)) + ) + (< (fill-and-probe-using-line-sphere *collide-cache* v1-0) 0.0) + ) + ) + +;; definition for method 16 of type squad-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod squad-control-method-16 ((this squad-control) (arg0 vector) (arg1 process-focusable) (arg2 squad-target-status)) + (cond + ((zero? (get-idx-in-status-arr this (process->handle arg1))) + (let ((s5-1 (-> this alert-state target-status-array))) + (let ((s4-0 (new 'stack-no-clear 'inline-array 'primary-target-pos-vel 2))) + (set-pos-vel this (-> s4-0 0)) + (set! (-> s4-0 1 position quad) (-> s4-0 0 position quad)) + (logior! (-> s5-1 0 flags) (squad-target-flag updated)) + (cond + ((or (logtest? (-> s5-1 0 flags) (squad-target-flag force-visible)) + (probe-backgnd-collision this arg0 (the-as vector (-> s4-0 1))) + ) + (logior! (-> s5-1 0 flags) (squad-target-flag visible-now visible-recently visible-ever)) + (set-time! (-> s5-1 0 last-seen-time)) + (set! (-> s5-1 0 position quad) (-> s4-0 1 position quad)) + (set! (-> s5-1 0 velocity quad) (-> s4-0 0 velocity quad)) + ) + (else + (logclear! (-> s5-1 0 flags) (squad-target-flag visible-now)) + (if (time-elapsed? (-> s5-1 0 last-seen-time) (seconds 2)) + (logclear! (-> s5-1 0 flags) (squad-target-flag visible-recently)) + ) + ) + ) + ) + (mem-copy! (the-as pointer arg2) (the-as pointer s5-1) 68) + ) + 0 + ) + (else + (logior! (-> arg2 flags) (squad-target-flag visible-now visible-recently visible-ever)) + (set-time! (-> arg2 last-seen-time)) + (set! (-> arg2 position quad) (-> (get-trans arg1 3) quad)) + (set! (-> arg2 velocity quad) (-> (get-transv arg1) quad)) + ) + ) + 0 + (none) + ) + +;; definition for method 29 of type squad-control +;; WARN: Return type mismatch object vs symbol. +(defmethod valid-target-handle? ((this squad-control) (arg0 handle)) + (the-as symbol (and (handle->process arg0) (= (get-idx-in-status-arr this arg0) 0))) + ) + +;; definition for method 17 of type squad-control +;; INFO: this function exists in multiple non-identical object files +;; INFO: Used lq/sq +;; WARN: Return type mismatch squad-target-status vs none. +(defmethod squad-control-method-17 ((this squad-control) (arg0 vector) (arg1 int) (arg2 squad-target-status)) + (logclear! (-> arg2 flags) (squad-target-flag visible-now updated)) + (cond + ((or (= (-> this sync-mask-16) (ash 1 (logand arg1 15))) + (or (logtest? (-> this alert-state flags) (squad-alert-flag update-target-search)) + (< (get-idx-in-status-arr this (-> arg2 handle)) 0) + ) + ) + (logclear! (-> this alert-state flags) (squad-alert-flag update-target-search)) + (logior! (-> arg2 flags) (squad-target-flag updated)) + (let ((a2-1 (handle->process (-> arg2 handle)))) + (if a2-1 + (squad-control-method-16 this arg0 (the-as process-focusable a2-1) arg2) + ) + ) + ) + (else + (when (and (handle->process (-> arg2 handle)) (valid-target-handle? this (-> arg2 handle))) + (let ((s4-1 (-> this alert-state target-status-array))) + (when (logtest? (-> s4-1 0 flags) (squad-target-flag visible-recently)) + (let ((s3-0 (new 'stack-no-clear 'primary-target-pos-vel))) + (set-pos-vel this (the-as primary-target-pos-vel (-> s3-0 position))) + (set! (-> s4-1 0 position quad) (-> s3-0 position quad)) + (set! (-> s4-1 0 velocity quad) (-> s3-0 velocity quad)) + ) + ) + (mem-copy! (the-as pointer arg2) (the-as pointer s4-1) 68) + ) + ) + (logclear! (-> arg2 flags) (squad-target-flag updated)) + ) + ) + (none) + ) + +;; definition for method 24 of type squad-control +;; INFO: Used lq/sq +(defmethod squad-control-method-24 ((this squad-control)) + (if (not (handle->process (-> this alert-state target-status handle))) + (return 0) + ) + (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 'primary-target-pos-vel))) + (set! (-> s5-1 position quad) (-> (get-trans (the-as process-focusable s4-0) 3) quad)) + (set! (-> s5-1 velocity quad) (-> (get-transv (the-as process-focusable s4-0)) quad)) + (set! (-> s5-1 time) (the-as uint (current-time))) + (if (>= (- (-> s5-1 time) (-> this primary-target-history 1 time)) (the-as uint 30)) + (qmem-copy->! + (the-as pointer (-> this primary-target-history 1)) + (the-as pointer (-> this primary-target-history)) + 480 + ) + ) + (mem-copy! (the-as pointer (-> this primary-target-history)) (the-as pointer (-> s5-1 position)) 32) + ) + 0 + ) + ) + 0 + ) + +;; definition for method 25 of type squad-control +;; WARN: Return type mismatch primary-target-pos-vel vs none. +(defmethod squad-control-method-25 ((this squad-control) (arg0 primary-target-pos-vel) (arg1 time-frame)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'primary-target-pos-vel 2))) + (set! (-> s5-0 0 time) (the-as uint (- (current-time) arg1))) + (let ((v1-3 0)) + (let ((a1-1 0)) + (b! #t cfg-7 :delay (nop!)) + (label cfg-1) + (b! + (not (and (>= (-> this primary-target-history a1-1 time) (-> s5-0 0 time)) + (>= (-> s5-0 0 time) (-> this primary-target-history (+ a1-1 1) time)) + ) + ) + cfg-6 + :delay (empty-form) + ) + (set! v1-3 a1-1) + (b! #t cfg-9 :delay (nop!)) + (label cfg-6) + (+! a1-1 1) + (label cfg-7) + (b! (< a1-1 14) cfg-1) + ) + (set! (-> s5-0 0 time) (-> this primary-target-history 0 time)) + (label cfg-9) + (let ((s4-0 (-> this primary-target-history v1-3)) + (s3-0 (-> this primary-target-history (+ v1-3 1))) + ) + (set! (-> s5-0 1 position x) + (/ (the float (- (-> s5-0 0 time) (-> s4-0 time))) (the float (- (-> s3-0 time) (-> s4-0 time)))) + ) + (vector-lerp! (-> arg0 position) (-> s4-0 position) (-> s3-0 position) (-> s5-0 1 position x)) + (vector-lerp! (-> arg0 velocity) (-> s4-0 velocity) (-> s3-0 velocity) (-> s5-0 1 position x)) + ) + ) + (set! (-> arg0 time) (-> s5-0 0 time)) + ) + (none) + ) + +;; definition for method 26 of type squad-control +;; INFO: Used lq/sq +(defmethod set-pos-vel ((this squad-control) (arg0 primary-target-pos-vel)) + (let* ((s4-0 (handle->process (-> this alert-state target-status handle))) + (s5-0 (if (type? s4-0 process-focusable) + s4-0 + ) + ) + ) + (when s5-0 + (set! (-> arg0 position quad) (-> (get-trans (the-as process-focusable s5-0) 3) quad)) + (set! (-> arg0 velocity quad) (-> (get-transv (the-as process-focusable s5-0)) quad)) + ) + ) + arg0 + ) + +;; definition for method 27 of type squad-control +;; WARN: Return type mismatch float vs none. +(defmethod squad-control-method-27 ((this squad-control) (arg0 process) (arg1 float)) + (let ((a1-4 (process->handle arg0)) + (v1-2 (-> this alert-state target-status-array)) + ) + (when (!= (-> v1-2 0 handle) a1-4) + (set! (-> v1-2 0 handle) (the-as handle a1-4)) + (set! (-> v1-2 0 flags) (squad-target-flag)) + (vector-reset! (-> v1-2 0 position)) + (vector-reset! (-> v1-2 0 velocity)) + (set! (-> v1-2 0 threat-level) arg1) + ) + ) + (none) + ) + +;; definition for method 28 of type squad-control +(defmethod get-idx-in-status-arr ((this squad-control) (arg0 handle)) + (if (not (handle->process arg0)) + (return -1) + ) + (dotimes (v1-5 3) + (if (= (-> this alert-state target-status-array v1-5 handle) arg0) + (return v1-5) + ) + ) + -1 + ) + +;; definition for method 30 of type squad-control +;; WARN: Return type mismatch process vs process-focusable. +(defmethod get-target-focus ((this squad-control)) + (let ((gp-0 (handle->process (-> this alert-state target-status handle)))) + (the-as process-focusable (if (type? gp-0 process-focusable) + gp-0 + ) + ) + ) + ) + +;; definition for method 33 of type squad-control +;; WARN: Return type mismatch process vs process-focusable. +(defmethod get-focus-in-range ((this squad-control) (arg0 process-focusable)) + (let* ((f0-0 4915200.0) + (f30-0 (* f0-0 f0-0)) + (s4-0 (the-as process #f)) + ) + (dotimes (s3-0 3) + (let* ((s1-0 (handle->process (-> this alert-state target-status-array s3-0 handle))) + (s2-0 (if (type? s1-0 process-focusable) + s1-0 + ) + ) + ) + (when s2-0 + (let ((f0-2 (vector-vector-xz-distance-squared (-> arg0 root trans) (get-trans (the-as process-focusable s2-0) 0))) + ) + (when (< f0-2 f30-0) + (set! f30-0 f0-2) + (set! s4-0 s2-0) + ) + ) + ) + ) + ) + (the-as process-focusable s4-0) + ) + ) + +;; definition for method 31 of type squad-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs none. +(defmethod squad-control-method-31 ((this squad-control) (arg0 vector) (arg1 process-focusable) (arg2 handle) (arg3 float) (arg4 float)) + (local-vars (v1-40 float) (sv-672 float) (sv-688 vector) (sv-704 int)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (set! sv-672 arg4) + (let ((s5-0 (get-handle-pos this arg2 (new 'stack-no-clear 'vector)))) + (let ((s3-1 (vector-! (new 'stack-no-clear 'vector) s5-0 (-> arg1 root trans)))) + (set! sv-688 s5-0) + (set! (-> s3-1 y) 0.0) + (vector-normalize! s3-1 1.0) + (let ((s2-0 (new 'stack-no-clear 'squad-control-stack-type0)) + (s1-0 (the-as nav-mesh #f)) + (f30-0 sv-672) + ) + (if (and (nonzero? (-> arg1 nav)) (-> arg1 nav)) + (set! s1-0 (-> arg1 nav state mesh)) + ) + (if (not s1-0) + (set! s1-0 (find-nearest-nav-mesh sv-688 (the-as float #x7f800000))) + ) + (when s1-0 + (nav-mesh-method-10 s1-0 sv-688 sv-688 (the-as nav-poly #f)) + (set! (-> s2-0 float0) 40960.0) + (set! (-> s2-0 byte0) 2) + (vector-! (-> s2-0 vec1) sv-688 (the-as vector (-> s1-0 bounds))) + (nav-mesh-method-46 s1-0 (the-as nav-poly (-> s2-0 vec1))) + (let ((s0-1 (-> s2-0 mesh))) + (when s0-1 + (project-point-into-poly-2d s1-0 (the-as nav-poly s0-1) (-> s2-0 vec1) (-> s2-0 vec1)) + (let ((v1-18 (-> s2-0 vec1)) + (a0-9 (-> s1-0 bounds)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> v1-18 quad)) + (.lvf vf5 (&-> a0-9 quad)) + ) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-688 quad) vf6) + (set! sv-704 0) + (while (< sv-704 16) + (when #t + (set! (-> s2-0 float1) + (the float (sar (shl (the int (+ f30-0 (* 182.04445 (* 22.5 (the float sv-704))))) 48) 48)) + ) + (set! (-> s2-0 float2) arg3) + (vector-rotate-around-y! (-> s2-0 vec0) s3-1 (-> s2-0 float1)) + (vector-float*! (-> s2-0 vec0) (-> s2-0 vec0) (-> s2-0 float2)) + (clamp-vector-to-mesh-cross-gaps + s1-0 + (-> s2-0 vec1) + (the-as nav-poly s0-1) + (-> s2-0 vec0) + (-> s2-0 float2) + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + (set! (-> s2-0 cquery start-pos quad) (-> s5-0 quad)) + (set! (-> s2-0 cquery move-dist quad) (-> s2-0 vec0 quad)) + (let ((v1-34 (-> s2-0 cquery))) + (set! (-> v1-34 radius) 2048.0) + (set! (-> v1-34 collide-with) (collide-spec backgnd)) + (set! (-> v1-34 ignore-process0) #f) + (set! (-> v1-34 ignore-process1) #f) + (set! (-> v1-34 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-34 action-mask) (collide-action solid)) + ) + (set! (-> s2-0 float3) (fill-and-probe-using-line-sphere *collide-cache* (-> s2-0 cquery))) + (if (< 0.0 (-> s2-0 float3)) + (vector-float*! (-> s2-0 vec0) (-> s2-0 vec0) (-> s2-0 float3)) + ) + (.lvf vf1 (&-> (-> s2-0 vec0) 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-17 v1-40) + (f1-4 (* 0.5 arg3)) + ) + (when (< (* f1-4 f1-4) f0-17) + (vector+! s5-0 s5-0 (-> s2-0 vec0)) + 0 + (goto cfg-19) + ) + ) + ) + (set! sv-704 (+ sv-704 1)) + ) + ) + ) + ) + ) + ) + (label cfg-19) + (set! (-> arg0 quad) (-> s5-0 quad)) + ) + (none) + ) + ) + +;; definition for method 32 of type squad-control +;; INFO: Used lq/sq +(defmethod get-handle-pos ((this squad-control) (arg0 handle) (arg1 vector)) + (let* ((s5-0 (handle->process arg0)) + (a0-5 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (new 'stack-no-clear 'vector) + (if a0-5 + (set! (-> arg1 quad) (-> (get-trans (the-as process-focusable a0-5) 0) quad)) + ) + ) + arg1 + ) + + + + 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 0000000000..6805408e97 --- /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-hud_REF.gc b/test/decompiler/reference/jak3/levels/common/hvehicle/vehicle-hud_REF.gc new file mode 100644 index 0000000000..ab7c5d94bb --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/hvehicle/vehicle-hud_REF.gc @@ -0,0 +1,95 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type hud-vehicle-health +(deftype hud-vehicle-health (hud) + () + ) + +;; definition for method 3 of type hud-vehicle-health +(defmethod inspect ((this hud-vehicle-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-vehicle-health +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-vehicle-health)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (+ (the int (* -100.0 (-> this offset))) 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-4 (fmax 0.0 (fmin 1.0 (-> *game-info* health-bar-vehicle))))) + (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) (* 20.5 f0-4)) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-vehicle-health +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-vehicle-health)) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-vehicle-health +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-vehicle-health)) + (vehicle-entity-hack 27) + (set! (-> this gui-id) + (add-process *gui-control* this (gui-channel hud-lower-left-2) (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-01" + (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-vehicle-health-spawn +;; WARN: Return type mismatch process vs hud-vehicle-health. +(defun hud-vehicle-health-spawn ((arg0 vehicle)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn hud-vehicle-health :init hud-init-by-other :name "hud-vehicle-health" :to arg0))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as hud-vehicle-health gp-0) + ) + ) + + + + 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 new file mode 100644 index 0000000000..aa56085376 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/hvehicle/vehicle-manager_REF.gc @@ -0,0 +1,452 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *vehicle-rigid-body-queue*, type rigid-body-queue +(define *vehicle-rigid-body-queue* (new 'static 'rigid-body-queue)) + +;; definition for symbol *vehicle-info*, type vehicle-info +(define *vehicle-info* (new 'static 'vehicle-info)) + +;; failed to figure out what this is: +(dotimes (v1-2 44) + (set! (-> *vehicle-info* handle-by-vehicle-type v1-2) (the-as handle #f)) + ) + +;; definition for function vehicle-entity-hack +;; WARN: Return type mismatch int vs none. +(defun vehicle-entity-hack ((arg0 int)) + (with-pp + (case arg0 + ((27) + (set! (-> pp level) (-> *traffic-info* vehicle-level)) + ) + (else + (set! (-> pp level) (level-get *level* (-> *traffic-info* vehicle-levels arg0))) + ) + ) + 0 + (none) + ) + ) + +;; definition of type vehicle-manager +(deftype vehicle-manager (process) + () + (:state-methods + idle + active + ) + (:methods + (vehicle-manager-method-16 (_type_) none) + (vehicle-manager-method-17 (_type_) none) + ) + ) + +;; definition for method 3 of type vehicle-manager +(defmethod inspect ((this vehicle-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 7 of type vehicle-manager +;; WARN: Return type mismatch process vs vehicle-manager. +(defmethod relocate ((this vehicle-manager) (offset int)) + (set! *vehicle-manager* this) + (if *vehicle-manager* + (set! *vehicle-manager* (&+ *vehicle-manager* offset)) + ) + (the-as vehicle-manager ((method-of-type process relocate) this offset)) + ) + +;; definition for method 10 of type vehicle-manager +(defmethod deactivate ((this vehicle-manager)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set! *vehicle-manager* #f) + (remove-setting *setting-control* this 'task-mask) + (apply-settings *setting-control*) + ((method-of-type process deactivate) this) + (none) + ) + +;; definition for method 17 of type vehicle-manager +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-manager-method-17 ((this vehicle-manager)) + 0 + (none) + ) + +;; definition for function vehicle-manager-event-handler +(defbehavior vehicle-manager-event-handler vehicle-manager ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('no-extra-bank) + (remove-setting! 'extra-bank) + ) + (('extra-bank) + (let ((a3-1 (-> arg3 param 0))) + (set-setting! 'extra-bank a3-1 0.0 0) + ) + ) + ) + ) + +;; definition for function vehicle-manager-init-by-other +(defbehavior vehicle-manager-init-by-other vehicle-manager () + (stack-size-set! (-> self main-thread) 128) + (vehicle-entity-hack 27) + (set! *vehicle-manager* self) + (vehicle-manager-method-17 self) + (add-setting! 'task-mask 'clear 0.0 (task-mask vehicle)) + (set! (-> self event-hook) vehicle-manager-event-handler) + (set! *rigid-body-queue-manager* + (the-as rigid-body-queue-manager (rigid-body-queue-manager-spawn *vehicle-rigid-body-queue* self)) + ) + (go-virtual idle) + ) + +;; failed to figure out what this is: +(defstate idle (vehicle-manager) + :virtual #t + :event vehicle-manager-event-handler + :code (behavior () + (suspend) + (suspend) + (go-virtual active) + ) + ) + +;; failed to figure out what this is: +(defstate active (vehicle-manager) + :virtual #t + :event vehicle-manager-event-handler + :code sleep-code + ) + +;; definition for function vehicle-manager-start +;; WARN: Return type mismatch int vs none. +(defun vehicle-manager-start ((arg0 process)) + (if *vehicle-manager* + (change-parent *vehicle-manager* arg0) + (process-spawn vehicle-manager :name "vehicle-manager" :to arg0) + ) + 0 + (none) + ) + +;; definition for function vehicle-manager-kill +;; WARN: Return type mismatch symbol vs none. +(defun vehicle-manager-kill () + (kill-by-type vehicle-manager *active-pool*) + (none) + ) + +;; definition for function vehicle-init-by-other +;; INFO: Used lq/sq +;; WARN: Return type mismatch none vs object. +(defbehavior vehicle-init-by-other vehicle ((arg0 int) (arg1 traffic-object-spawn-params)) + (stack-size-set! (-> self main-thread) 16) + (logior! (-> self mask) (process-mask vehicle)) + (init-collision! self) + (set! (-> self root trans quad) (-> arg1 position quad)) + (quaternion-copy! (-> self root quat) (-> arg1 rotation)) + (set! (-> self root transv quad) (-> arg1 velocity quad)) + (if (logtest? (-> arg1 flags) (traffic-spawn-flags tsf6)) + (vehicle-method-149 self) + ) + (if (not (logtest? (-> arg1 flags) (traffic-spawn-flags tsf0))) + (vehicle-entity-hack arg0) + ) + (init-rbody-control! self) + (rigid-body-queue-method-11 *vehicle-rigid-body-queue* self) + (if (logtest? (-> arg1 flags) (traffic-spawn-flags tsf5)) + (set! (-> self v-flags) (the-as vehicle-flag (logior (vehicle-flag unique) (-> self v-flags)))) + ) + (set! (-> self traffic-priority-id) (the-as int (-> arg1 id))) + (vehicle-method-132 self arg1) + ) + +;; definition for function vehicle-spawn-hack +;; WARN: Return type mismatch process vs vehicle. +(defun vehicle-spawn-hack ((arg0 type) (arg1 traffic-object-spawn-params) (arg2 process)) + (let ((gp-0 (the-as process #f))) + (let* ((s3-0 (get-process *default-dead-pool* arg0 #x4000 1)) + (v1-1 (when s3-0 + (let ((t9-1 (method-of-type process activate))) + (t9-1 s3-0 arg2 "vehicle" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-0 vehicle-init-by-other 27 arg1) + (-> s3-0 ppointer) + ) + ) + ) + (when v1-1 + (set! gp-0 (-> v1-1 0)) + (change-parent gp-0 *vehicle-manager*) + ) + ) + (if (and gp-0 (logtest? (-> arg1 flags) (traffic-spawn-flags tsf1))) + (vehicle-method-133 (the-as vehicle gp-0) arg1) + ) + (the-as vehicle gp-0) + ) + ) + +;; definition for function vehicle-spawn +;; WARN: Return type mismatch process vs process-drawable. +(defun vehicle-spawn ((arg0 vehicle-type) (arg1 traffic-object-spawn-params)) + (let ((gp-0 (the-as process #f))) + (cond + ((level-get *level* (-> *traffic-info* vehicle-levels arg0)) + (let* ((a1-3 (type-from-vehicle-type arg0)) + (s3-0 (get-process *default-dead-pool* a1-3 #x4000 1)) + (a0-4 (when s3-0 + (let ((t9-3 (method-of-type process activate))) + (t9-3 s3-0 *vehicle-manager* "vehicle" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-0 vehicle-init-by-other arg0 arg1) + (-> s3-0 ppointer) + ) + ) + ) + (when a0-4 + (set! gp-0 (-> a0-4 0)) + (when (logtest? (-> arg1 flags) (traffic-spawn-flags tsf5)) + (send-event (handle->process (-> *vehicle-info* handle-by-vehicle-type arg0)) 'go-die) + (set! (-> *vehicle-info* handle-by-vehicle-type arg0) (process->handle gp-0)) + ) + ) + ) + ) + (else + 0 + ) + ) + (if (and gp-0 (logtest? (-> arg1 flags) (traffic-spawn-flags tsf1))) + (vehicle-method-133 (the-as vehicle gp-0) arg1) + ) + (the-as process-drawable gp-0) + ) + ) + +;; definition for function type-from-vehicle-type +(defun type-from-vehicle-type ((arg0 vehicle-type)) + (case arg0 + (((vehicle-type h-bike-a)) + h-bike-a + ) + (((vehicle-type h-bike-b)) + h-bike-b + ) + (((vehicle-type h-bike-c)) + h-bike-c + ) + (((vehicle-type h-bike-d)) + h-bike-d + ) + (((vehicle-type h-car-a)) + h-car-a + ) + (((vehicle-type h-car-b)) + h-car-b + ) + (((vehicle-type h-car-c)) + h-car-c + ) + (((vehicle-type h-hellcat)) + h-hellcat + ) + (((vehicle-type h-warf)) + h-warf + ) + (((vehicle-type h-glider)) + h-glider + ) + (((vehicle-type h-sled)) + h-sled + ) + (((vehicle-type h-kg-pickup)) + h-kg-pickup + ) + (((vehicle-type v-turtle)) + v-turtle + ) + (((vehicle-type v-snake)) + v-snake + ) + (((vehicle-type v-scorpion)) + v-scorpion + ) + (((vehicle-type v-toad)) + v-toad + ) + (((vehicle-type v-fox)) + v-fox + ) + (((vehicle-type v-rhino)) + v-rhino + ) + (((vehicle-type v-mirage)) + v-mirage + ) + (((vehicle-type v-x-ride)) + v-x-ride + ) + (((vehicle-type v-marauder)) + v-marauder + ) + (((vehicle-type v-faccar)) + v-faccar + ) + (((vehicle-type v-catapult)) + v-catapult + ) + (((vehicle-type v-marauder-b)) + v-marauder-b + ) + (((vehicle-type evan-test-bike)) + evan-test-bike + ) + (((vehicle-type wbike-test)) + wbike-test + ) + (((vehicle-type test-car)) + test-car + ) + (else + (the-as type #f) + ) + ) + ) diff --git a/test/decompiler/reference/jak3/levels/common/race/race-control_REF.gc b/test/decompiler/reference/jak3/levels/common/race/race-control_REF.gc new file mode 100644 index 0000000000..e562e28403 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/race/race-control_REF.gc @@ -0,0 +1,142 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type race-control +(deftype race-control (structure) + ((state race-state) + (mesh race-mesh) + (path-select int8) + (path-group race-path-group) + (path race-path) + (path-t float) + (racer-state racer-state) + (path-sample race-path-sample :inline) + (lin-velocity vector :inline) + (ang-velocity vector :inline) + ) + (:methods + (race-control-method-9 (_type_ int vector) none) + (race-control-method-10 (_type_ race-state racer-state) none) + (race-control-method-11 (_type_ float) none) + (race-control-method-12 (_type_ vector) none) + ) + ) + +;; definition for method 3 of type race-control +(defmethod inspect ((this race-control)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'race-control) + (format #t "~1Tstate: #~%" (-> this state)) + (format #t "~1Tmesh: ~A~%" (-> this mesh)) + (format #t "~1Tpath-select: ~D~%" (-> this path-select)) + (format #t "~1Tpath-group: #~%" (-> this path-group)) + (format #t "~1Tpath: #~%" (-> this path)) + (format #t "~1Tpath-t: ~f~%" (-> this path-t)) + (format #t "~1Tracer-state: #~%" (-> this racer-state)) + (format #t "~1Tpath-sample: #~%" (-> this path-sample)) + (format #t "~1Tlin-velocity: #~%" (-> this lin-velocity)) + (format #t "~1Tang-velocity: #~%" (-> this ang-velocity)) + (label cfg-4) + this + ) + +;; definition for method 12 of type race-control +;; WARN: Return type mismatch int vs none. +(defmethod race-control-method-12 ((this race-control) (arg0 vector)) + (let* ((f0-0 (-> this path-t)) + (f0-2 (race-path-method-12 (-> this path) arg0 (+ -1.0 f0-0) (+ 1.0 f0-0))) + ) + (set! (-> this path-t) f0-2) + (race-path-method-11 (-> this path) (-> this path-sample) (-> this lin-velocity) f0-2) + ) + 0 + (none) + ) + +;; definition for method 11 of type race-control +;; WARN: Return type mismatch int vs none. +(defmethod race-control-method-11 ((this race-control) (arg0 float)) + (let ((f0-1 (+ (-> this path-t) (* 15.0 arg0)))) + (set! f0-1 (cond + ((logtest? (-> this mesh flags) (race-mesh-flag rmf0)) + (let ((f1-3 (the float (-> this path sample-count)))) + (if (>= f0-1 f1-3) + (set! f0-1 (- f0-1 f1-3)) + ) + ) + f0-1 + ) + (else + (fmin f0-1 (the float (+ (-> this path sample-count) -1))) + ) + ) + ) + (set! (-> this path-t) f0-1) + (race-path-method-11 (-> this path) (-> this path-sample) (-> this lin-velocity) f0-1) + ) + (vector-reset! (-> this ang-velocity)) + 0 + (none) + ) + +;; definition for method 9 of type race-control +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod race-control-method-9 ((this race-control) (arg0 int) (arg1 vector)) + (let ((v1-1 (-> this path-group path-count))) + (if (>= arg0 v1-1) + (set! arg0 0) + ) + (set! (-> this path-select) arg0) + (cond + ((> v1-1 0) + (let ((s4-0 (-> this path-group paths arg0))) + (set! (-> this path) s4-0) + (let ((s3-0 (new 'stack-no-clear 'race-mesh-slice-query))) + (set! (-> s3-0 search-sphere quad) (-> arg1 quad)) + (set! (-> s3-0 search-sphere r) 61440.0) + (race-mesh-method-13 (-> this mesh) (the-as race-mesh-slice-query (&-> s3-0 slice-id))) + (when (!= (-> s3-0 slice-id) -1) + (let* ((v1-12 (-> this mesh slices (-> s3-0 slice-id))) + (f0-1 (-> (the-as (pointer float) (+ (* (-> v1-12 start-edge) 4) (the-as int (-> s4-0 edge-infos)))))) + (f1-0 (-> (the-as (pointer float) (+ (* (-> v1-12 end-edge) 4) (the-as int (-> s4-0 edge-infos)))))) + ) + (when (and (>= f0-1 0.0) (>= f1-0 0.0)) + (let ((f0-2 (race-path-method-12 s4-0 arg1 f0-1 f1-0))) + (set! (-> this path-t) f0-2) + (race-path-method-11 (-> this path) (-> this path-sample) (-> this lin-velocity) f0-2) + ) + ) + ) + ) + ) + ) + ) + (else + (set! (-> this path) #f) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type race-control +;; WARN: Return type mismatch int vs none. +(defmethod race-control-method-10 ((this race-control) (arg0 race-state) (arg1 racer-state)) + (set! (-> this state) arg0) + (set! (-> this mesh) (-> arg0 info mesh)) + (if (-> this mesh) + (set! (-> this path-group) (-> this mesh path-groups 0)) + ) + (set! (-> this racer-state) arg1) + 0 + (none) + ) + + + + 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 new file mode 100644 index 0000000000..f8187f76c0 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/race/race-h_REF.gc @@ -0,0 +1,420 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type race-turbo-pad +(deftype race-turbo-pad (structure) + ((position vector :inline) + (handle handle) + ) + ) + +;; definition for method 3 of type race-turbo-pad +(defmethod inspect ((this race-turbo-pad)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'race-turbo-pad) + (format #t "~1Tposition: #~%" (-> this position)) + (format #t "~1Thandle: ~D~%" (-> this handle)) + (label cfg-4) + this + ) + +;; definition of type race-decision-point +(deftype race-decision-point (structure) + ((pos float) + (decision-type uint8) + (shortcuts uint8) + (safe-paths uint8) + ) + ) + +;; definition for method 3 of type race-decision-point +(defmethod inspect ((this race-decision-point)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'race-decision-point) + (format #t "~1Tpos: ~f~%" (-> this pos)) + (format #t "~1Tdecision-type: ~D~%" (-> this decision-type)) + (format #t "~1Tshortcuts: ~D~%" (-> this shortcuts)) + (format #t "~1Tsafe-paths: ~D~%" (-> this safe-paths)) + (label cfg-4) + this + ) + +;; definition of type race-racer-info +(deftype race-racer-info (structure) + ((rider uint8) + (vehicle uint8) + (flags racer-info-flag) + (seek-offset int8) + ) + ) + +;; definition for method 3 of type race-racer-info +(defmethod inspect ((this race-racer-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'race-racer-info) + (format #t "~1Trider: ~D~%" (-> this rider)) + (format #t "~1Tvehicle: ~D~%" (-> this vehicle)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tseek-offset: ~D~%" (-> this seek-offset)) + (label cfg-4) + this + ) + +;; definition of type race-info +(deftype race-info (basic) + ((race-mesh-name string) + (path-group-name string) + (task-node game-task-node) + (mesh race-mesh) + (ai-min-speed-factor float) + (ai-max-speed-factor float) + (ai-spread-factor float) + (start-sphere sphere :inline) + (start-dir vector :inline) + (finish-sphere sphere :inline) + (finish-dir vector :inline) + (player-intro-pos vector :inline) + (flags racer-info-flag) + (score uint8) + (lap-count int8) + (racer-count int8) + (turbo-pad-count int8) + (map-index int8) + (decision-point-count int8) + (safe-paths uint8) + (turbo-pad-array (inline-array race-turbo-pad)) + (racer-array (inline-array race-racer-info)) + (decision-point-array (inline-array race-decision-point)) + (level symbol) + (borrow-level symbol) + (borrow pair) + (manager handle) + (manager-handle-init-hack symbol :overlay-at manager) + (hatch-actor-name string) + (countdown-scene string) + (complete-continue string) + (start-camera string) + (go-speech uint16) + ) + (:methods + (init-by-mesh! (_type_) none) + ) + ) + +;; definition for method 3 of type race-info +(defmethod inspect ((this race-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Trace-mesh-name: ~A~%" (-> this race-mesh-name)) + (format #t "~1Tpath-group-name: ~A~%" (-> this path-group-name)) + (format #t "~1Ttask-node: ~D~%" (-> this task-node)) + (format #t "~1Tmesh: ~A~%" (-> this mesh)) + (format #t "~1Tai-min-speed-factor: ~f~%" (-> this ai-min-speed-factor)) + (format #t "~1Tai-max-speed-factor: ~f~%" (-> this ai-max-speed-factor)) + (format #t "~1Tai-spread-factor: ~f~%" (-> this ai-spread-factor)) + (format #t "~1Tstart-sphere: #~%" (-> this start-sphere)) + (format #t "~1Tstart-dir: #~%" (-> this start-dir)) + (format #t "~1Tfinish-sphere: #~%" (-> this finish-sphere)) + (format #t "~1Tfinish-dir: #~%" (-> this finish-dir)) + (format #t "~1Tplayer-intro-pos: #~%" (-> this player-intro-pos)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tscore: ~D~%" (-> this score)) + (format #t "~1Tlap-count: ~D~%" (-> this lap-count)) + (format #t "~1Tracer-count: ~D~%" (-> this racer-count)) + (format #t "~1Tturbo-pad-count: ~D~%" (-> this turbo-pad-count)) + (format #t "~1Tmap-index: ~D~%" (-> this map-index)) + (format #t "~1Tdecision-point-count: ~D~%" (-> this decision-point-count)) + (format #t "~1Tsafe-paths: ~D~%" (-> this safe-paths)) + (format #t "~1Tturbo-pad-array: #x~X~%" (-> this turbo-pad-array)) + (format #t "~1Tracer-array: #x~X~%" (-> this racer-array)) + (format #t "~1Tdecision-point-array: #x~X~%" (-> this decision-point-array)) + (format #t "~1Tlevel: ~A~%" (-> this level)) + (format #t "~1Tborrow-level: ~A~%" (-> this borrow-level)) + (format #t "~1Tborrow: ~A~%" (-> this borrow)) + (format #t "~1Tmanager: ~D~%" (-> this manager)) + (format #t "~1Tmanager-handle-init-hack: ~A~%" (-> this manager-handle-init-hack)) + (format #t "~1Thatch-actor-name: ~A~%" (-> this hatch-actor-name)) + (format #t "~1Tcountdown-scene: ~A~%" (-> this countdown-scene)) + (format #t "~1Tcomplete-continue: ~A~%" (-> this complete-continue)) + (format #t "~1Tstart-camera: ~A~%" (-> this start-camera)) + (format #t "~1Tgo-speech: ~D~%" (-> this go-speech)) + (label cfg-4) + this + ) + +;; definition of type racer-state +(deftype racer-state (structure) + ((position vector :inline) + (racer handle) + (flags racer-state-flags) + (rank int8) + (finish-count int8) + (lap-count int8) + (lap-quadrant int8) + (rider uint8) + (lap-distance float) + (lap-distance-prev float) + (pos float) + (target-pos-offset float) + (speed-factor float) + (finish-time uint32) + (lap-start uint32) + (best-lap-time uint32) + (lap-time-array float 5) + (start-position vector :inline) + ) + (:methods + (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) + ) + ) + +;; definition for method 3 of type racer-state +(defmethod inspect ((this racer-state)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'racer-state) + (format #t "~1Tposition: #~%" (-> this position)) + (format #t "~1Tracer: ~D~%" (-> this racer)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Trank: ~D~%" (-> this rank)) + (format #t "~1Tfinish-count: ~D~%" (-> this finish-count)) + (format #t "~1Tlap-count: ~D~%" (-> this lap-count)) + (format #t "~1Tlap-quadrant: ~D~%" (-> this lap-quadrant)) + (format #t "~1Trider: ~D~%" (-> this rider)) + (format #t "~1Tlap-distance: ~f~%" (-> this lap-distance)) + (format #t "~1Tlap-distance-prev: ~f~%" (-> this lap-distance-prev)) + (format #t "~1Tpos: ~f~%" (-> this pos)) + (format #t "~1Ttarget-pos-offset: ~f~%" (-> this target-pos-offset)) + (format #t "~1Tspeed-factor: ~f~%" (-> this speed-factor)) + (format #t "~1Tfinish-time: ~D~%" (-> this finish-time)) + (format #t "~1Tlap-start: ~D~%" (-> this lap-start)) + (format #t "~1Tbest-lap-time: ~D~%" (-> this best-lap-time)) + (format #t "~1Tlap-time-array[5] @ #x~X~%" (-> this lap-time-array)) + (format #t "~1Tstart-position: #~%" (-> this start-position)) + (label cfg-4) + this + ) + +;; definition of type race-state +(deftype race-state (structure) + ((info race-info) + (flags race-flag) + (state race-state-enum) + (racer-count int8) + (finished-count int8) + (i-player int8) + (i-countdown int8) + (manager handle) + (scene-player handle) + (race-signal handle) + (arrow handle) + (hud-timer handle) + (hud-lap-counter handle) + (hud-turbo-counter handle) + (hud-position handle) + (current-time uint32) + (countdown-start-time uint32) + (race-start-time uint32) + (rankings int8 10) + (target-pos float) + (suck-factor float) + (player-win? symbol) + (new-score? symbol) + (racer-array racer-state 10 :inline) + (player-intro-curve cubic-curve :inline) + ) + (:methods + (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) + (setup-race (_type_) none) + (get-racer-count (_type_) int) + ) + ) + +;; definition for method 3 of type race-state +(defmethod inspect ((this race-state)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'race-state) + (format #t "~1Tinfo: ~A~%" (-> this info)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tstate: ~D~%" (-> this state)) + (format #t "~1Tracer-count: ~D~%" (-> this racer-count)) + (format #t "~1Tfinished-count: ~D~%" (-> this finished-count)) + (format #t "~1Ti-player: ~D~%" (-> this i-player)) + (format #t "~1Ti-countdown: ~D~%" (-> this i-countdown)) + (format #t "~1Tmanager: #x~X~%" (-> this manager)) + (format #t "~1Tscene-player: #x~X~%" (-> this scene-player)) + (format #t "~1Trace-signal: #x~X~%" (-> this race-signal)) + (format #t "~1Tarrow: #x~X~%" (-> this arrow)) + (format #t "~1Thud-timer: #x~X~%" (-> this hud-timer)) + (format #t "~1Thud-lap-counter: #x~X~%" (-> this hud-lap-counter)) + (format #t "~1Thud-turbo-counter: #x~X~%" (-> this hud-turbo-counter)) + (format #t "~1Thud-position: #x~X~%" (-> this hud-position)) + (format #t "~1Tcurrent-time: ~D~%" (-> this current-time)) + (format #t "~1Tcountdown-start-time: ~D~%" (-> this countdown-start-time)) + (format #t "~1Trace-start-time: ~D~%" (-> this race-start-time)) + (format #t "~1Trankings[10] @ #x~X~%" (-> this rankings)) + (format #t "~1Ttarget-pos: ~f~%" (-> this target-pos)) + (format #t "~1Tsuck-factor: ~f~%" (-> this suck-factor)) + (format #t "~1Tplayer-win?: ~A~%" (-> this player-win?)) + (format #t "~1Tnew-score?: ~A~%" (-> this new-score?)) + (format #t "~1Tracer-array[10] @ #x~X~%" (-> this racer-array)) + (format #t "~1Tplayer-intro-curve: #~%" (-> this player-intro-curve)) + (label cfg-4) + this + ) + +;; definition of type race-manager +(deftype race-manager (process) + ((race-state race-state) + (state-time time-frame) + (player-on-track-time time-frame) + (message-id sound-id) + (finish-sound-id sound-id) + (show-stats? symbol) + ) + (:state-methods + idle + active + fail + win + lose + die + ) + (:methods + (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) + ) + ) + +;; definition for method 3 of type race-manager +(defmethod inspect ((this race-manager)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Trace-state: #~%" (-> this race-state)) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (format #t "~2Tplayer-on-track-time: ~D~%" (-> this player-on-track-time)) + (format #t "~2Tmessage-id: ~D~%" (-> this message-id)) + (format #t "~2Tfinish-sound-id: ~D~%" (-> this finish-sound-id)) + (format #t "~2Tshow-stats?: ~A~%" (-> this show-stats?)) + (label cfg-4) + this + ) + +;; definition of type hud-race-timer +(deftype hud-race-timer (hud) + () + ) + +;; definition for method 3 of type hud-race-timer +(defmethod inspect ((this hud-race-timer)) + (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-race-lap-counter +(deftype hud-race-lap-counter (hud) + () + ) + +;; definition for method 3 of type hud-race-lap-counter +(defmethod inspect ((this hud-race-lap-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 hud-race-turbo-counter +(deftype hud-race-turbo-counter (hud) + () + ) + +;; definition for method 3 of type hud-race-turbo-counter +(defmethod inspect ((this hud-race-turbo-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 hud-race-position +(deftype hud-race-position (hud) + () + ) + +;; definition for method 3 of type hud-race-position +(defmethod inspect ((this hud-race-position)) + (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 symbol *race-manager*, type (pointer race-manager) +(define *race-manager* (the-as (pointer race-manager) #f)) + +;; 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 0000000000..cfe16b254b --- /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 0000000000..ea2c85aad3 --- /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 0000000000..c170ed1ac7 --- /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/common/race/race-mesh_REF.gc b/test/decompiler/reference/jak3/levels/common/race/race-mesh_REF.gc new file mode 100644 index 0000000000..b7fd293bab --- /dev/null +++ b/test/decompiler/reference/jak3/levels/common/race/race-mesh_REF.gc @@ -0,0 +1,987 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type race-mesh-hash-search +(deftype race-mesh-hash-search (structure) + ((best-dist float) + (debug-cells-searched int32) + (debug-slices-searched int32) + (bounds bounding-box4w :inline) + (cell-quads vector 2 :inline) + (slice-quads vector 4 :inline) + (cell-bits vector16ub 2 :inline :overlay-at cell-quads) + (slice-bits vector16ub 2 :inline :overlay-at slice-quads) + ) + ) + +;; definition for method 3 of type race-mesh-hash-search +(defmethod inspect ((this race-mesh-hash-search)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'race-mesh-hash-search) + (format #t "~1Tbest-dist: ~f~%" (-> this best-dist)) + (format #t "~1Tdebug-cells-searched: ~D~%" (-> this debug-cells-searched)) + (format #t "~1Tdebug-slices-searched: ~D~%" (-> this debug-slices-searched)) + (format #t "~1Tbounds: #~%" (-> this bounds)) + (format #t "~1Tcell-quads[2] @ #x~X~%" (-> this cell-quads)) + (format #t "~1Tslice-quads[4] @ #x~X~%" (-> this slice-quads)) + (format #t "~1Tcell-bits[2] @ #x~X~%" (-> this cell-quads)) + (format #t "~1Tslice-bits[2] @ #x~X~%" (-> this slice-quads)) + (label cfg-4) + this + ) + +;; definition of type race-mesh-slice-query +(deftype race-mesh-slice-query (structure) + ((slice-id int16) + (lap-dist float) + (pt-on-slice vector :inline) + (slice-corners vector 4 :inline) + (search-sphere sphere :inline) + ) + ) + +;; definition for method 3 of type race-mesh-slice-query +(defmethod inspect ((this race-mesh-slice-query)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'race-mesh-slice-query) + (format #t "~1Tslice-id: ~D~%" (-> this slice-id)) + (format #t "~1Tlap-dist: ~f~%" (-> this lap-dist)) + (format #t "~1Tpt-on-slice: #~%" (-> this pt-on-slice)) + (format #t "~1Tslice-corners[4] @ #x~X~%" (-> this slice-corners)) + (format #t "~1Tsearch-sphere: #~%" (-> this search-sphere)) + (label cfg-4) + this + ) + +;; definition of type race-path-edge-info +(deftype race-path-edge-info (structure) + ((sample-t float) + ) + ) + +;; definition for method 3 of type race-path-edge-info +(defmethod inspect ((this race-path-edge-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'race-path-edge-info) + (format #t "~1Tsample-t: ~f~%" (-> this sample-t)) + (label cfg-4) + this + ) + +;; definition of type race-path-sample +(deftype race-path-sample (structure) + ((bytes uint8 32) + (pos vector :inline :overlay-at (-> bytes 0)) + (quat quaternion :inline :overlay-at (-> bytes 16)) + (stick-x int8 :overlay-at (-> bytes 12)) + (stick-y int8 :overlay-at (-> bytes 13)) + (throttle uint8 :overlay-at (-> bytes 14)) + (flags uint8 :overlay-at (-> bytes 15)) + ) + ) + +;; definition for method 3 of type race-path-sample +(defmethod inspect ((this race-path-sample)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'race-path-sample) + (format #t "~1Tbytes[32] @ #x~X~%" (-> this pos)) + (format #t "~1Tpos: ~`vector`P~%" (-> this pos)) + (format #t "~1Tquat: #~%" (-> this quat)) + (format #t "~1Tstick-x: ~D~%" (-> this stick-x)) + (format #t "~1Tstick-y: ~D~%" (-> this stick-y)) + (format #t "~1Tthrottle: ~D~%" (-> this throttle)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (label cfg-4) + this + ) + +;; definition of type race-path +(deftype race-path (structure) + ((sample-count uint16) + (record-id int8) + (pad uint8) + (samples (inline-array race-path-sample)) + (edge-infos (inline-array race-path-edge-info)) + ) + (:methods + (draw-path-debug (_type_ rgba rgba) none) + (race-path-method-10 (_type_ vector float float) none) + (race-path-method-11 (_type_ race-path-sample vector float) none) + (race-path-method-12 (_type_ vector float float) float) + ) + ) + +;; definition for method 3 of type race-path +(defmethod inspect ((this race-path)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'race-path) + (format #t "~1Tsample-count: ~D~%" (-> this sample-count)) + (format #t "~1Trecord-id: ~D~%" (-> this record-id)) + (format #t "~1Tpad: ~D~%" (-> this pad)) + (format #t "~1Tsamples: #x~X~%" (-> this samples)) + (format #t "~1Tedge-infos: #x~X~%" (-> this edge-infos)) + (label cfg-4) + this + ) + +;; definition of type race-path-group +(deftype race-path-group (structure) + ((name string) + (path-count int8) + (pad uint8 3) + (paths (inline-array race-path)) + ) + ) + +;; definition for method 3 of type race-path-group +(defmethod inspect ((this race-path-group)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'race-path-group) + (format #t "~1Tname: ~A~%" (-> this name)) + (format #t "~1Tpath-count: ~D~%" (-> this path-count)) + (format #t "~1Tpad[3] @ #x~X~%" (-> this pad)) + (format #t "~1Tpaths: #x~X~%" (-> this paths)) + (label cfg-4) + this + ) + +;; definition of type race-mesh-edge +(deftype race-mesh-edge (structure) + ((left vector :inline) + (right vector :inline) + (lap-dist float :overlay-at (-> left data 3)) + ) + ) + +;; definition for method 3 of type race-mesh-edge +(defmethod inspect ((this race-mesh-edge)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'race-mesh-edge) + (format #t "~1Tleft: ~`vector`P~%" (-> this left)) + (format #t "~1Tright: ~`vector`P~%" (-> this right)) + (format #t "~1Tlap-dist: ~f~%" (-> this left w)) + (label cfg-4) + this + ) + +;; definition of type race-mesh-slice +(deftype race-mesh-slice (structure) + ((edge-index-array uint16 2) + (start-edge int16 :overlay-at (-> edge-index-array 0)) + (end-edge int16 :overlay-at (-> edge-index-array 1)) + ) + :pack-me + ) + +;; definition for method 3 of type race-mesh-slice +(defmethod inspect ((this race-mesh-slice)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'race-mesh-slice) + (format #t "~1Tedge-index-array[2] @ #x~X~%" (-> this edge-index-array)) + (format #t "~1Tstart-edge: ~D~%" (-> this start-edge)) + (format #t "~1Tend-edge: ~D~%" (-> this end-edge)) + (label cfg-4) + this + ) + +;; definition of type race-mesh-hash-cell +(deftype race-mesh-hash-cell (structure) + ((first-slice int16) + (slice-count uint8) + (pad uint8) + ) + ) + +;; definition for method 3 of type race-mesh-hash-cell +(defmethod inspect ((this race-mesh-hash-cell)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'race-mesh-hash-cell) + (format #t "~1Tfirst-slice: ~D~%" (-> this first-slice)) + (format #t "~1Tslice-count: ~D~%" (-> this slice-count)) + (format #t "~1Tpad: ~D~%" (-> this pad)) + (label cfg-4) + this + ) + +;; definition of type race-mesh-hash +(deftype race-mesh-hash (structure) + ((cells-wide int8) + (cells-tall int8) + (cell-length float) + (cells (inline-array race-mesh-hash-cell)) + (slice-table (inline-array race-mesh-slice)) + (origin vector :inline) + ) + ) + +;; definition for method 3 of type race-mesh-hash +(defmethod inspect ((this race-mesh-hash)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'race-mesh-hash) + (format #t "~1Tcells-wide: ~D~%" (-> this cells-wide)) + (format #t "~1Tcells-tall: ~D~%" (-> this cells-tall)) + (format #t "~1Tcell-length: ~f~%" (-> this cell-length)) + (format #t "~1Tcells: #x~X~%" (-> this cells)) + (format #t "~1Tslice-table: #x~X~%" (-> this slice-table)) + (format #t "~1Torigin: ~`vector`P~%" (-> this origin)) + (label cfg-4) + this + ) + +;; definition of type race-mesh +(deftype race-mesh (basic) + ((version uint8) + (path-group-count uint8) + (flags race-mesh-flag) + (pad uint8 1) + (slice-count int16) + (edge-count int16) + (slices (inline-array race-mesh-slice)) + (edges (inline-array race-mesh-edge)) + (hash race-mesh-hash) + (path-groups (inline-array race-path-group)) + ) + (:methods + (debug-draw-path (_type_ int int rgba rgba) none) + (debug-draw-path-from-history (_type_ int int) symbol) + (debug-draw-slice (_type_ int) none) + (debug-draw-edges (_type_) none) + (race-mesh-method-13 (_type_ race-mesh-slice-query) none) + (race-mesh-method-14 (_type_ race-mesh-slice-query) none) + (race-mesh-method-15 (_type_ int race-mesh-slice-query) none) + (race-mesh-method-16 (_type_ race-mesh-slice-query) none) + (race-mesh-method-17 (_type_ race-mesh-slice-query) symbol) + (race-mesh-method-18 (_type_ race-mesh-hash-search int int race-mesh-slice-query) none) + (race-mesh-method-19 (_type_ int race-mesh-slice-query) symbol) + ) + ) + +;; definition for method 3 of type race-mesh +(defmethod inspect ((this race-mesh)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tversion: ~D~%" (-> this version)) + (format #t "~1Tpath-group-count: ~D~%" (-> this path-group-count)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tpad[1] @ #x~X~%" (-> this pad)) + (format #t "~1Tslice-count: ~D~%" (-> this slice-count)) + (format #t "~1Tedge-count: ~D~%" (-> this edge-count)) + (format #t "~1Tslices: #x~X~%" (-> this slices)) + (format #t "~1Tedges: #x~X~%" (-> this edges)) + (format #t "~1Thash: #~%" (-> this hash)) + (format #t "~1Tpath-groups: #x~X~%" (-> this path-groups)) + (label cfg-4) + this + ) + +;; definition for method 10 of type race-path +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod race-path-method-10 ((this race-path) (arg0 vector) (arg1 float) (arg2 float)) + (let ((v1-0 (new 'stack-no-clear 'inline-array 'vector 4)) + (a3-1 (the int arg1)) + ) + (set! (-> v1-0 0 quad) (-> this samples a3-1 pos quad)) + (set! (-> v1-0 1 quad) (-> this samples (+ a3-1 1) pos quad)) + (let ((f0-3 (- arg1 (the float a3-1)))) + (vector-lerp! arg0 (-> v1-0 0) (-> v1-0 1) f0-3) + ) + ) + 0 + (none) + ) + +;; definition for method 11 of type race-path +;; WARN: Return type mismatch int vs none. +(defmethod race-path-method-11 ((this race-path) (arg0 race-path-sample) (arg1 vector) (arg2 float)) + (let ((gp-0 (new 'stack-no-clear 'inline-array 'race-path-sample 6))) + (let ((f0-1 (the float (-> this sample-count)))) + (if (< f0-1 arg2) + (set! arg2 (- arg2 f0-1)) + ) + (if (< arg2 0.0) + (set! arg2 (+ arg2 f0-1)) + ) + ) + (let ((s1-0 (the int arg2))) + (mem-copy! (the-as pointer (-> gp-0 0)) (the-as pointer (-> this samples s1-0)) 32) + (mem-copy! (the-as pointer (-> gp-0 1)) (the-as pointer (-> this samples (+ s1-0 1))) 32) + (let ((v1-7 (+ s1-0 2))) + (if (< (the-as int (-> this sample-count)) v1-7) + (set! v1-7 (- v1-7 (the-as int (-> this sample-count)))) + ) + (mem-copy! (the-as pointer (-> gp-0 2)) (the-as pointer (-> this samples v1-7)) 32) + ) + (let ((f30-0 (- arg2 (the float s1-0)))) + (vector-lerp! (-> arg0 pos) (the-as vector (-> gp-0 0)) (the-as vector (-> gp-0 1)) f30-0) + (quaternion-slerp! (-> arg0 quat) (-> gp-0 0 quat) (-> gp-0 1 quat) f30-0) + (set! (-> arg0 stick-x) + (the int (+ 0.5 (* (the float (-> gp-0 1 stick-x)) f30-0) (* (the float (-> gp-0 0 stick-x)) (- 1.0 f30-0)))) + ) + (set! (-> arg0 stick-y) (-> gp-0 0 stick-y)) + (set! (-> arg0 throttle) + (the-as + uint + (the int + (+ 0.5 (* (the float (-> gp-0 1 throttle)) f30-0) (* (the float (-> gp-0 0 throttle)) (- 1.0 f30-0))) + ) + ) + ) + (set! (-> arg0 flags) (-> gp-0 0 flags)) + (vector-! (the-as vector (-> gp-0 4)) (the-as vector (-> gp-0 1)) (the-as vector (-> gp-0 0))) + (vector-float*! (the-as vector (-> gp-0 3)) (the-as vector (-> gp-0 4)) 15.0) + (vector-! (the-as vector (-> gp-0 4)) (the-as vector (-> gp-0 2)) (the-as vector (-> gp-0 1))) + (vector-float*! (the-as vector (-> gp-0 3 quat)) (the-as vector (-> gp-0 4)) 15.0) + (vector-lerp! arg1 (the-as vector (-> gp-0 3)) (the-as vector (-> gp-0 3 quat)) f30-0) + ) + ) + ) + 0 + 0 + (none) + ) + +;; definition for method 12 of type race-path +(defmethod race-path-method-12 ((this race-path) (arg0 vector) (arg1 float) (arg2 float)) + (local-vars (v1-15 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((gp-0 arg2) + (s4-0 (new 'stack-no-clear 'matrix)) + (f30-0 (the float (-> this sample-count))) + ) + (if (< f30-0 gp-0) + (set! gp-0 (- gp-0 f30-0)) + ) + (if (< arg1 0.0) + (set! arg1 (+ arg1 f30-0)) + ) + (race-path-method-10 this (-> s4-0 rvec) arg1 arg2) + (race-path-method-10 this (-> s4-0 uvec) gp-0 arg2) + (vector-! (-> s4-0 fvec) (-> s4-0 uvec) (-> s4-0 rvec)) + (vector-! (-> s4-0 trans) arg0 (-> s4-0 rvec)) + (let ((f0-7 0.0) + (f1-1 1.0) + (f2-1 (vector-dot (-> s4-0 fvec) (-> s4-0 trans))) + ) + (.lvf vf1 (&-> (-> s4-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 v1-15 vf1) + (let ((f0-8 (fmax f0-7 (fmin f1-1 (/ f2-1 v1-15))))) + (if (< gp-0 arg1) + (set! gp-0 (+ gp-0 f30-0)) + ) + (let ((f0-10 (+ (* arg1 (- 1.0 f0-8)) (* gp-0 f0-8)))) + (if (< f30-0 f0-10) + (set! f0-10 (- f0-10 f30-0)) + ) + (if (< f0-10 0.0) + (+! f0-10 f30-0) + ) + f0-10 + ) + ) + ) + ) + ) + ) + +;; definition for method 9 of type race-path +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod draw-path-debug ((this race-path) (arg0 rgba) (arg1 rgba)) + (local-vars (sv-32 vector) (sv-48 race-path-sample)) + (let ((s0-0 0) + (s3-0 1) + (s2-0 (+ (-> this sample-count) -1)) + (s1-0 (new 'stack-no-clear 'vector)) + ) + (set! sv-32 s1-0) + (let ((v1-1 (-> (math-camera-pos) quad))) + (set! (-> sv-32 quad) v1-1) + ) + (while (< s0-0 (the-as int s2-0)) + (let ((s0-1 (-> this samples s0-0))) + (set! sv-48 (-> this samples s3-0)) + (let ((f0-0 (vector-vector-distance-squared (-> s0-1 pos) s1-0)) + (f1-0 819200.0) + ) + (if (< f0-0 (* f1-0 f1-0)) + (add-debug-line #t (bucket-id debug) (-> s0-1 pos) (-> sv-48 pos) arg0 #f arg1) + ) + ) + ) + (set! s0-0 s3-0) + (set! s3-0 (min (+ s3-0 1) (the-as int s2-0))) + ) + ) + (format + *stdcon* + "path ~d time ~5,,3f~%" + (-> this record-id) + (* 0.06666667 (the float (-> this sample-count))) + ) + 0 + (none) + ) + +;; definition for method 9 of type race-mesh +(defmethod debug-draw-path ((this race-mesh) (arg0 int) (arg1 int) (arg2 rgba) (arg3 rgba)) + (when (< arg1 (the-as int (-> this path-group-count))) + (let ((v1-2 (-> this path-groups arg1))) + (if (< arg0 (-> v1-2 path-count)) + (draw-path-debug (-> v1-2 paths arg0) arg2 arg3) + ) + ) + ) + (none) + ) + +;; definition for method 10 of type race-mesh +(defmethod debug-draw-path-from-history ((this race-mesh) (arg0 int) (arg1 int)) + (when (< arg1 (the-as int (-> this path-group-count))) + (let ((v1-2 (-> this path-groups arg1))) + (countdown (a2-1 (-> v1-2 path-count)) + (let ((a0-3 (-> v1-2 paths a2-1))) + (when (= (-> a0-3 record-id) arg0) + (let ((v1-3 (new 'static 'array rgba 16 + (new 'static 'rgba :r #x40 :a #x80) + (new 'static 'rgba :r #xff :g #x30 :b #x30 :a #x80) + (new 'static 'rgba :g #xff :a #x80) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + (new 'static 'rgba :b #xff :a #x80) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + (new 'static 'rgba :r #x60 :g #x60 :b #x60 :a #x80) + (new 'static 'rgba :r #xff :g #xff :a #x80) + (new 'static 'rgba :g #xff :b #xff :a #x80) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + (new 'static 'rgba :r #xff :b #xff :a #x80) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + (new 'static 'rgba :r #xff :g #x80 :b #x40 :a #x80) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + (new 'static 'rgba :a #x80) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + ) + ) + (a2-2 (* arg0 2)) + ) + (draw-path-debug a0-3 (-> v1-3 a2-2) (-> v1-3 (+ a2-2 1))) + ) + (return #f) + ) + ) + ) + ) + #f + ) + ) + +;; definition for method 11 of type race-mesh +;; WARN: Return type mismatch symbol vs none. +(defmethod debug-draw-slice ((this race-mesh) (arg0 int)) + (let* ((v1-1 (-> this slices arg0)) + (s3-0 (-> this edges (-> v1-1 start-edge))) + (s4-0 (-> this edges (-> v1-1 end-edge))) + ) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> s3-0 left) + (-> s3-0 right) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + #f + (the-as rgba -1) + ) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> s3-0 right) + (-> s4-0 right) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + #f + (the-as rgba -1) + ) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> s4-0 right) + (-> s4-0 left) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + #f + (the-as rgba -1) + ) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> s4-0 left) + (-> s3-0 left) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + #f + (the-as rgba -1) + ) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector+! s5-0 (-> s3-0 left) (-> s3-0 right)) + (vector+! s5-0 s5-0 (-> s4-0 left)) + (vector+! s5-0 s5-0 (-> s4-0 right)) + (vector-float*! s5-0 s5-0 0.25) + (let ((s4-1 add-debug-text-3d) + (s3-1 #t) + (s2-0 577) + ) + (format (clear *temp-string*) "~D" arg0) + (s4-1 s3-1 (the-as bucket-id s2-0) *temp-string* s5-0 (font-color white) (the-as vector2h #f)) + ) + ) + ) + (none) + ) + +;; definition for method 12 of type race-mesh +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw-edges ((this race-mesh)) + (let ((s5-0 0) + (s4-0 (+ (-> this slice-count) -1)) + ) + (while (>= s4-0 s5-0) + (let* ((v1-2 (-> this slices s5-0)) + (s3-0 (-> this edges (-> v1-2 start-edge))) + (s2-0 (-> this edges (-> v1-2 end-edge))) + ) + (add-debug-line #t (bucket-id debug-no-zbuf1) (-> s3-0 left) (-> s2-0 left) *color-white* #f (the-as rgba -1)) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> s3-0 right) + (-> s2-0 right) + *color-white* + #f + (the-as rgba -1) + ) + (add-debug-line #t (bucket-id debug-no-zbuf1) (-> s2-0 left) (-> s2-0 right) *color-gray* #f (the-as rgba -1)) + ) + (+! s5-0 1) + ) + ) + (let ((v1-8 (-> this edges 0))) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> v1-8 left) + (-> v1-8 right) + *color-green* + #f + (the-as rgba -1) + ) + ) + (let ((s5-1 (+ (-> this edge-count) -1))) + (let ((v1-12 (-> this edges s5-1))) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> v1-12 left) + (-> v1-12 right) + *color-red* + #f + (the-as rgba -1) + ) + ) + (format *stdcon* "edge-count ~d last-edge ~d~%" (-> this edge-count) s5-1) + ) + 0 + (none) + ) + +;; definition for method 19 of type race-mesh +;; INFO: Used lq/sq +(defmethod race-mesh-method-19 ((this race-mesh) (arg0 int) (arg1 race-mesh-slice-query)) + (set! (-> arg1 slice-id) -1) + (let* ((v1-2 (-> this slices arg0)) + (a1-3 (-> this edges (-> v1-2 start-edge))) + (v1-5 (-> this edges (-> v1-2 end-edge))) + ) + (set! (-> arg1 slice-corners 0 quad) (-> a1-3 left quad)) + (set! (-> arg1 slice-corners 1 quad) (-> a1-3 right quad)) + (set! (-> arg1 slice-corners 2 quad) (-> v1-5 right quad)) + (set! (-> arg1 slice-corners 3 quad) (-> v1-5 left quad)) + ) + (let ((v1-8 (new 'stack-no-clear 'vector)) + (a0-6 (new 'stack-no-clear 'vector)) + ) + (countdown (a1-8 4) + (vector-! a0-6 (-> arg1 slice-corners (logand (+ a1-8 1) 3)) (-> arg1 slice-corners a1-8)) + (vector-! v1-8 (the-as vector (-> arg1 search-sphere)) (-> arg1 slice-corners a1-8)) + (if (< (- (* (-> a0-6 z) (-> v1-8 x)) (* (-> a0-6 x) (-> v1-8 z))) 0.0) + (return #f) + ) + ) + ) + (let ((v1-11 (new 'stack-no-clear 'vector)) + (a0-7 (new 'stack-no-clear 'vector)) + ) + (vector-! v1-11 (-> arg1 slice-corners 2) (the-as vector (-> arg1 slice-corners))) + (vector-! a0-7 (the-as vector (-> arg1 search-sphere)) (the-as vector (-> arg1 slice-corners))) + (let ((f0-5 (- (* (-> v1-11 z) (-> a0-7 x)) (* (-> v1-11 x) (-> a0-7 z)))) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + ) + (cond + ((< f0-5 0.0) + (vector-! s4-0 (-> arg1 slice-corners 1) (the-as vector (-> arg1 slice-corners))) + (vector-cross! s3-0 s4-0 v1-11) + ) + (else + (vector-! s4-0 (-> arg1 slice-corners 3) (the-as vector (-> arg1 slice-corners))) + (vector-cross! s3-0 v1-11 s4-0) + ) + ) + (vector-normalize! s3-0 1.0) + (set-vector! s4-0 0.0 -1.0 0.0 1.0) + (let ((f0-10 (intersect-ray-plane (-> arg1 search-sphere) s4-0 (the-as vector (-> arg1 slice-corners)) s3-0))) + (vector+float*! (-> arg1 pt-on-slice) (the-as vector (-> arg1 search-sphere)) s4-0 f0-10) + ) + ) + ) + (if (< (- (-> arg1 search-sphere y) (-> arg1 pt-on-slice y)) -8192.0) + (return #f) + ) + (set! (-> arg1 slice-id) arg0) + #t + ) + +;; definition for method 17 of type race-mesh +(defmethod race-mesh-method-17 ((this race-mesh) (arg0 race-mesh-slice-query)) + (set! (-> arg0 slice-id) -1) + (let* ((s4-0 (-> this hash)) + (v1-2 (max 0 (min + (the int (/ (- (-> arg0 search-sphere x) (-> s4-0 origin x)) (-> s4-0 cell-length))) + (+ (-> s4-0 cells-wide) -1) + ) + ) + ) + (a0-4 (max 0 (min + (the int (/ (- (-> arg0 search-sphere z) (-> s4-0 origin z)) (-> s4-0 cell-length))) + (+ (-> s4-0 cells-tall) -1) + ) + ) + ) + (s3-0 (the-as object (+ (the-as uint (-> s4-0 cells)) (* (+ (* a0-4 (-> s4-0 cells-wide)) v1-2) 4)))) + (s1-0 (-> (the-as race-mesh-hash-cell s3-0) slice-count)) + ) + (when (nonzero? s1-0) + (let ((s2-0 (new 'stack-no-clear 'race-mesh-slice-query))) + (mem-copy! (the-as pointer s2-0) (the-as pointer arg0) 112) + (while (nonzero? s1-0) + (+! s1-0 -1) + (let ((a1-7 (-> (&-> (-> s4-0 slice-table) 0 edge-index-array (+ (-> (the-as (pointer int16) s3-0)) s1-0)) 0))) + (when (race-mesh-method-19 this (the-as int a1-7) s2-0) + (if (or (= (-> arg0 slice-id) -1) + (< (vector-vector-distance-squared (-> s2-0 pt-on-slice) (-> arg0 search-sphere)) + (vector-vector-distance-squared (-> arg0 pt-on-slice) (-> arg0 search-sphere)) + ) + ) + (mem-copy! (the-as pointer arg0) (the-as pointer s2-0) 112) + ) + ) + ) + ) + ) + #f + ) + ) + ) + +;; definition for method 15 of type race-mesh +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs none. +(defmethod race-mesh-method-15 ((this race-mesh) (arg0 int) (arg1 race-mesh-slice-query)) + (local-vars (v1-8 symbol)) + (set! (-> arg1 slice-id) arg0) + (let* ((v1-1 (-> this slices arg0)) + (a1-3 (-> this edges (-> v1-1 start-edge))) + (v1-4 (-> this edges (-> v1-1 end-edge))) + ) + (set! (-> arg1 slice-corners 0 quad) (-> a1-3 left quad)) + (set! (-> arg1 slice-corners 1 quad) (-> a1-3 right quad)) + (set! (-> arg1 slice-corners 2 quad) (-> v1-4 right quad)) + (set! (-> arg1 slice-corners 3 quad) (-> v1-4 left quad)) + ) + (let ((v1-7 (new 'stack-no-clear 'vector)) + (a0-6 (new 'stack-no-clear 'vector)) + ) + (countdown (a1-8 4) + (vector-! a0-6 (-> arg1 slice-corners (logand (+ a1-8 1) 3)) (-> arg1 slice-corners a1-8)) + (vector-! v1-7 (the-as vector (-> arg1 search-sphere)) (-> arg1 slice-corners a1-8)) + (when (< (- (* (-> a0-6 z) (-> v1-7 x)) (* (-> a0-6 x) (-> v1-7 z))) 0.0) + (set! v1-8 #f) + (goto cfg-6) + ) + ) + ) + (set! v1-8 #t) + (label cfg-6) + (cond + (v1-8 + (let ((v1-11 (new 'stack-no-clear 'vector)) + (a0-7 (new 'stack-no-clear 'vector)) + ) + (vector-! v1-11 (-> arg1 slice-corners 2) (the-as vector (-> arg1 slice-corners))) + (vector-! a0-7 (the-as vector (-> arg1 search-sphere)) (the-as vector (-> arg1 slice-corners))) + (let ((f0-5 (- (* (-> v1-11 z) (-> a0-7 x)) (* (-> v1-11 x) (-> a0-7 z)))) + (s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (cond + ((< f0-5 0.0) + (vector-! s5-0 (-> arg1 slice-corners 1) (the-as vector (-> arg1 slice-corners))) + (vector-cross! s4-0 s5-0 v1-11) + ) + (else + (vector-! s5-0 (-> arg1 slice-corners 3) (the-as vector (-> arg1 slice-corners))) + (vector-cross! s4-0 v1-11 s5-0) + ) + ) + (vector-normalize! s4-0 1.0) + (set-vector! s5-0 0.0 -1.0 0.0 1.0) + (let ((f0-10 (intersect-ray-plane (-> arg1 search-sphere) s5-0 (the-as vector (-> arg1 slice-corners)) s4-0))) + (vector+float*! (-> arg1 pt-on-slice) (the-as vector (-> arg1 search-sphere)) s5-0 f0-10) + ) + ) + ) + ) + (else + (let ((s5-1 (new 'stack-no-clear 'vector)) + (f30-0 -1.0) + ) + (countdown (s4-1 4) + (let ((f0-11 (vector-segment-distance-point! + (-> arg1 search-sphere) + (-> arg1 slice-corners s4-1) + (-> arg1 slice-corners (logand (+ s4-1 1) 3)) + s5-1 + ) + ) + ) + (when (or (< f30-0 0.0) (< f0-11 f30-0)) + (set! f30-0 f0-11) + (set! (-> arg1 pt-on-slice quad) (-> s5-1 quad)) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 18 of type race-mesh +;; WARN: Return type mismatch symbol vs none. +(defmethod race-mesh-method-18 ((this race-mesh) (arg0 race-mesh-hash-search) (arg1 int) (arg2 int) (arg3 race-mesh-slice-query)) + (let* ((v1-3 (+ (* arg2 (-> this hash cells-wide)) arg1)) + (a0-1 (/ v1-3 8)) + (a1-2 (ash 1 (logand v1-3 7))) + (a2-4 (-> (the-as race-mesh-hash-search (+ a0-1 (the-as int arg0))) cell-bits 0 data 0)) + ) + (when (not (logtest? a2-4 a1-2)) + (set! (-> arg0 cell-bits 0 data a0-1) (logior a2-4 a1-2)) + (let* ((v1-5 (the-as object (+ (the-as uint (-> this hash cells)) (* v1-3 4)))) + (s3-0 (&-> (-> this hash slice-table) 0 edge-index-array (-> (the-as (pointer int16) v1-5)))) + (s1-0 (-> (the-as race-mesh-hash-cell v1-5) slice-count)) + ) + (when (nonzero? s1-0) + (let ((s2-0 (new 'stack-no-clear 'race-mesh-slice-query))) + (mem-copy! (the-as pointer s2-0) (the-as pointer arg3) 112) + (while (nonzero? s1-0) + (+! s1-0 -1) + (let* ((a1-7 (-> s3-0 0)) + (v1-6 (shr a1-7 3)) + (a0-10 (ash 1 (the-as int (logand a1-7 7)))) + (a2-9 (-> arg0 slice-bits 0 data v1-6)) + ) + (when (not (logtest? a2-9 a0-10)) + (set! (-> arg0 slice-bits 0 data v1-6) (logior a2-9 a0-10)) + (race-mesh-method-15 this (the-as int a1-7) s2-0) + (let ((f0-0 (vector-vector-distance-squared (-> s2-0 pt-on-slice) (-> arg3 search-sphere)))) + (when (or (= (-> arg3 slice-id) -1) (< f0-0 (-> arg0 best-dist))) + (set! (-> arg0 best-dist) f0-0) + (mem-copy! (the-as pointer arg3) (the-as pointer s2-0) 112) + ) + ) + ) + ) + (set! s3-0 (&-> s3-0 1)) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 16 of type race-mesh +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod race-mesh-method-16 ((this race-mesh) (arg0 race-mesh-slice-query)) + (set! (-> arg0 slice-id) -1) + (let ((s4-0 (-> this hash)) + (s3-0 (new 'stack-no-clear 'race-mesh-hash-search)) + ) + (let ((v1-3 (/ (+ (-> this slice-count) 127) 128))) + (when (< 4 v1-3) + (break!) + 0 + ) + (while (nonzero? v1-3) + (+! v1-3 -1) + (set! (-> s3-0 slice-bits v1-3 quad) (the-as uint128 0)) + ) + ) + (set! (-> s3-0 cell-bits 0 quad) (the-as uint128 0)) + (set! (-> s3-0 cell-bits 1 quad) (the-as uint128 0)) + (let ((f0-1 (/ 1.0 (-> s4-0 cell-length))) + (f1-2 (fmin (-> arg0 search-sphere r) (* 0.5 (-> s4-0 cell-length)))) + ) + (let ((f3-1 (- (-> arg0 search-sphere x) f1-2)) + (f2-4 (- (-> arg0 search-sphere z) f1-2)) + ) + (set! (-> s3-0 bounds min x) + (max 0 (min (the int (* (- f3-1 (-> s4-0 origin x)) f0-1)) (+ (-> s4-0 cells-wide) -1))) + ) + (set! (-> s3-0 bounds min z) + (max 0 (min (the int (* (- f2-4 (-> s4-0 origin z)) f0-1)) (+ (-> s4-0 cells-tall) -1))) + ) + ) + (let ((f2-9 (+ (-> arg0 search-sphere x) f1-2)) + (f1-3 (+ (-> arg0 search-sphere z) f1-2)) + ) + (set! (-> s3-0 bounds max x) + (max 0 (min (the int (* (- f2-9 (-> s4-0 origin x)) f0-1)) (+ (-> s4-0 cells-wide) -1))) + ) + (set! (-> s3-0 bounds max z) + (max 0 (min (the int (* (- f1-3 (-> s4-0 origin z)) f0-1)) (+ (-> s4-0 cells-tall) -1))) + ) + ) + ) + (let ((s2-0 (-> s3-0 bounds min z))) + (until (< (-> s3-0 bounds max z) s2-0) + (let ((s1-0 (-> s3-0 bounds min x))) + (until (< (-> s3-0 bounds max x) s1-0) + (race-mesh-method-18 this s3-0 s1-0 s2-0 arg0) + (+! s1-0 1) + ) + ) + (+! s2-0 1) + ) + ) + (when (and (= (-> arg0 slice-id) -1) (< (* 0.5 (-> s4-0 cell-length)) (-> arg0 search-sphere r))) + (while (= (-> arg0 slice-id) -1) + (set! (-> s3-0 bounds min x) (max 0 (+ (-> s3-0 bounds min x) -1))) + (set! (-> s3-0 bounds min z) (max 0 (+ (-> s3-0 bounds min z) -1))) + (set! (-> s3-0 bounds max x) (min (+ (-> s3-0 bounds max x) 1) (+ (-> s4-0 cells-wide) -1))) + (set! (-> s3-0 bounds max z) (min (+ (-> s3-0 bounds max z) 1) (+ (-> s4-0 cells-tall) -1))) + (let ((s2-1 (-> s3-0 bounds min x))) + (until (< (-> s3-0 bounds max x) s2-1) + (race-mesh-method-18 this s3-0 s2-1 (-> s3-0 bounds min z) arg0) + (race-mesh-method-18 this s3-0 s2-1 (-> s3-0 bounds max z) arg0) + (+! s2-1 1) + ) + ) + (let ((s2-2 (-> s3-0 bounds min z))) + (until (< (-> s3-0 bounds max z) s2-2) + (race-mesh-method-18 this s3-0 (-> s3-0 bounds min x) s2-2 arg0) + (race-mesh-method-18 this s3-0 (-> s3-0 bounds max x) s2-2 arg0) + (+! s2-2 1) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 14 of type race-mesh +;; WARN: Return type mismatch float vs none. +(defmethod race-mesh-method-14 ((this race-mesh) (arg0 race-mesh-slice-query)) + (let* ((f30-0 (vector-line-distance-point! + (-> arg0 pt-on-slice) + (the-as vector (-> arg0 slice-corners)) + (-> arg0 slice-corners 1) + (the-as vector #f) + ) + ) + (f1-0 (vector-line-distance-point! + (-> arg0 pt-on-slice) + (-> arg0 slice-corners 2) + (-> arg0 slice-corners 3) + (the-as vector #f) + ) + ) + (f0-0 (+ f30-0 f1-0)) + (v1-1 (-> this slices (-> arg0 slice-id))) + (f2-0 (-> this edges (-> v1-1 start-edge) left w)) + (f3-0 (-> this edges (-> v1-1 end-edge) left w)) + ) + (set! (-> arg0 lap-dist) (+ (* (/ f1-0 f0-0) f2-0) (* (/ f30-0 f0-0) f3-0))) + ) + (none) + ) + +;; definition for method 13 of type race-mesh +;; WARN: Return type mismatch int vs none. +(defmethod race-mesh-method-13 ((this race-mesh) (arg0 race-mesh-slice-query)) + (race-mesh-method-17 this arg0) + (if (and (= (-> arg0 slice-id) -1) (< 0.0 (-> arg0 search-sphere r))) + (race-mesh-method-16 this arg0) + ) + (when (!= (-> arg0 slice-id) -1) + (race-mesh-method-14 this arg0) + 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 0000000000..c5b8c283e7 --- /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 0000000000..e9576e48bc --- /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 0000000000..cad9196b96 --- /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 0000000000..a74da003b7 --- /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 0000000000..99a28b70b6 --- /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 0000000000..74bfdd7b54 --- /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 0000000000..ef9e5ca1e9 --- /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 0000000000..5e160b43dc --- /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 0000000000..67929ca50c --- /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-cactus_REF.gc b/test/decompiler/reference/jak3/levels/desert/des-cactus_REF.gc new file mode 100644 index 0000000000..c5258801d7 --- /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 0000000000..ab595b7748 --- /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 0000000000..4b6d1b772c --- /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 0000000000..38cd99ede2 --- /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 0000000000..84a17fb400 --- /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 0000000000..b58814e612 --- /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 0000000000..8e4b1f21d4 --- /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 0000000000..666e035649 --- /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 0000000000..6af13d39a0 --- /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 0000000000..c0490877ed --- /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 0000000000..369ba80d89 --- /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 0000000000..e8b6f16b0d --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/hover/des-beast_REF.gc @@ -0,0 +1,2754 @@ +;;-*-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_ bounding-box) 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 (the-as bounding-box 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 bounding-box)) + (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 0000000000..c4ccad06a9 --- /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 0000000000..9ea96db979 --- /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 0000000000..ca87f35042 --- /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 0000000000..4901a3284d --- /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 0000000000..71a5bf0729 --- /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* (the-as bounding-box 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 0000000000..880a678958 --- /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 0000000000..c5e4f30253 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/lizard/desert-lizard-task_REF.gc @@ -0,0 +1,1064 @@ +;;-*-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 'bounding-box)) + (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 min 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 0000000000..f84c260b3f --- /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/race/course-race_REF.gc b/test/decompiler/reference/jak3/levels/desert/race/course-race_REF.gc new file mode 100644 index 0000000000..912ae23abc --- /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 0000000000..d67a904dd9 --- /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 0000000000..d319ee1ebd --- /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/w-parking-spot_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/w-parking-spot_REF.gc new file mode 100644 index 0000000000..8b4cec1548 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/w-parking-spot_REF.gc @@ -0,0 +1,305 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type w-parking-spot +(deftype w-parking-spot (process-drawable) + ((vehicle handle) + (should-spawn? symbol) + (should-cleanup? symbol) + (v-type game-vehicle-u8) + (minimap connection-minimap) + (test-sphere sphere :inline) + (arrow handle) + ) + (:state-methods + idle + ) + (:methods + (w-parking-spot-method-21 (_type_) none) + (w-parking-spot-method-22 (_type_) none) + (w-parking-spot-method-23 (_type_) none) + (w-parking-spot-method-24 (_type_) none) + (w-parking-spot-method-25 (_type_) symbol) + (w-parking-spot-method-26 (_type_) int) + ) + ) + +;; definition for method 3 of type w-parking-spot +(defmethod inspect ((this w-parking-spot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tvehicle: ~D~%" (-> this vehicle)) + (format #t "~2Tshould-spawn?: ~A~%" (-> this should-spawn?)) + (format #t "~2Tshould-cleanup?: ~A~%" (-> this should-cleanup?)) + (format #t "~2Tv-type: ~D~%" (-> this v-type)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Ttest-sphere: #~%" (-> this test-sphere)) + (format #t "~2Tarrow: ~D~%" (-> this arrow)) + (label cfg-4) + this + ) + +;; definition for method 24 of type w-parking-spot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod w-parking-spot-method-24 ((this w-parking-spot)) + (let ((gp-0 (new 'stack-no-clear 'cquery-with-5vec))) + (set! (-> gp-0 vec 0 quad) (-> this root trans quad)) + (set! (-> gp-0 cquery start-pos quad) (-> gp-0 vec 0 quad)) + (vector-reset! (-> gp-0 vec 1)) + (set! (-> gp-0 vec 1 y) 1.0) + (vector-z-quaternion! (-> gp-0 vec 2) (-> this root quat)) + (set! (-> gp-0 vec 2 y) 0.0) + (vector-normalize! (-> gp-0 vec 2) 1.0) + (set-vector! (-> gp-0 cquery move-dist) 0.0 -40960.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 ((f30-0 (fill-and-probe-using-line-sphere *collide-cache* (-> gp-0 cquery)))) + (when (>= f30-0 0.0) + (vector+float*! (the-as vector (-> gp-0 vec)) (-> gp-0 cquery start-pos) (-> gp-0 cquery move-dist) f30-0) + (set! (-> gp-0 vec 1 quad) (-> gp-0 cquery best-other-tri normal quad)) + (when (< (-> gp-0 vec 1 y) (cos 3640.889)) + (vector-reset! (-> gp-0 vec 1)) + (set! (-> gp-0 vec 1 y) 1.0) + ) + (set! (-> this root trans quad) (-> gp-0 vec 0 quad)) + (format #t "w-parking-spot::find-ground: ground y ~M~%" (-> gp-0 vec 0 y)) + ) + (if (< f30-0 0.0) + (format #t "w-parking-spot::find-ground: could not find ground~%") + ) + ) + (set! (-> this root trans quad) (-> gp-0 vec 0 quad)) + (forward-up-nopitch->quaternion (-> this root quat) (-> gp-0 vec 2) (-> gp-0 vec 1)) + ) + 0 + (none) + ) + +;; definition for method 25 of type w-parking-spot +(defmethod w-parking-spot-method-25 ((this w-parking-spot)) + (let ((v1-1 (handle->process (-> this vehicle)))) + (if v1-1 + (or (focus-test? (the-as vehicle v1-1) dead inactive) + (not (logtest? (vehicle-flag waiting-for-player) (-> (the-as vehicle v1-1) v-flags))) + (let ((f0-0 (-> this test-sphere r))) + (< (* f0-0 f0-0) (vector-vector-distance-squared (-> (the-as vehicle v1-1) root trans) (-> this test-sphere))) + ) + (let ((v1-5 *target*)) + (when v1-5 + (if (focus-test? v1-5 pilot-riding) + (= (-> v1-5 pilot vehicle) (-> this vehicle)) + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 21 of type w-parking-spot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod w-parking-spot-method-21 ((this w-parking-spot)) + (let ((s5-0 (handle->process (-> this vehicle)))) + (cond + (s5-0 + (cond + ((w-parking-spot-method-25 this) + (logclear! (-> (the-as vehicle s5-0) v-flags) (vehicle-flag persistent)) + (set! (-> this vehicle) (the-as handle #f)) + ) + ((and (nonzero? (-> *setting-control* user-current vehicles)) + (have-vehicle-v-type? (the-as int (-> this v-type))) + ) + (when (not (handle->process (-> this arrow))) + (let ((s5-1 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> s5-1 pos quad) (-> this root trans quad)) + (quaternion-identity! (-> s5-1 quat)) + (set! (-> s5-1 flags) (task-arrow-flags taf8)) + (set! (-> s5-1 map-icon) (the-as uint 12)) + (set! (-> this arrow) (process->handle (task-arrow-spawn s5-1 this))) + ) + ) + ) + (else + (let ((a0-21 (handle->process (-> this arrow)))) + (if a0-21 + (send-event a0-21 'leave) + ) + ) + ) + ) + ) + (else + (let ((a0-25 (handle->process (-> this arrow)))) + (if a0-25 + (send-event a0-25 'leave) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 23 of type w-parking-spot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod w-parking-spot-method-23 ((this w-parking-spot)) + (let ((v1-0 #t) + (s5-0 (-> this v-type)) + ) + (if (= s5-0 (game-vehicle-u8 v-scorpion v-toad v-fox)) + (set! s5-0 (-> *game-info* current-vehicle)) + ) + (when *target* + (let ((v1-3 (-> *vehicle-info* handle-by-vehicle-type s5-0))) + (-> *target* pilot) + (set! v1-0 (not (handle->process v1-3))) + ) + ) + (when (and v1-0 (!= s5-0 27) *vehicle-manager*) + (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) #f) + (vector-reset! (-> s4-0 velocity)) + (set! (-> s4-0 position quad) (-> this root trans quad)) + (quaternion-copy! (-> s4-0 rotation) (-> this root quat)) + (let ((a0-22 (vehicle-spawn (the-as vehicle-type s5-0) s4-0))) + (when a0-22 + (set! (-> this vehicle) (process->handle a0-22)) + (set! (-> this should-spawn?) #f) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 26 of type w-parking-spot +(defmethod w-parking-spot-method-26 ((this w-parking-spot)) + (let ((gp-0 0)) + (let ((v1-1 + (res-lump-value (-> this entity) 'vehicle-type-mask int :default (the-as uint128 4096) :time -1000000000.0) + ) + ) + (while (not (logtest? v1-1 1)) + (+! gp-0 1) + (set! v1-1 (the-as int (/ v1-1 2))) + ) + ) + gp-0 + ) + ) + +;; definition for method 11 of type w-parking-spot +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this w-parking-spot) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (logclear! (-> this mask) (process-mask actor-pause movie)) + (set! (-> this minimap) #f) + (set! (-> this vehicle) (the-as handle #f)) + (set! (-> this arrow) (the-as handle #f)) + (set! (-> this should-spawn?) #t) + (set! (-> this should-cleanup?) (= (-> this level name) 'wasdoors)) + (set! (-> this v-type) (the-as game-vehicle-u8 (w-parking-spot-method-26 this))) + (let ((v1-9 (res-lump-struct arg0 'spawn-trans vector))) + (cond + (v1-9 + (set! (-> this root trans quad) (-> v1-9 quad)) + (let ((a1-5 (res-lump-struct arg0 'spawn-quat structure))) + (when a1-5 + (quaternion-copy! (-> this root quat) (the-as quaternion a1-5)) + 0 + ) + ) + ) + (else + (w-parking-spot-method-24 this) + ) + ) + ) + (let ((s5-1 (res-lump-struct (-> this entity) 'on-activate structure))) + (if s5-1 + (set! (-> this should-spawn?) (the-as symbol (script-eval (the-as pair s5-1)))) + ) + ) + (set! (-> this test-sphere quad) (-> this root trans quad)) + (set! (-> this test-sphere r) 24576.0) + (set-time! (-> this state-time)) + (go (method-of-object this idle)) + ) + +;; failed to figure out what this is: +(defstate idle (w-parking-spot) + :virtual #t + :exit (behavior () + (w-parking-spot-method-21 self) + (if (and (-> self should-cleanup?) (not (w-parking-spot-method-25 self))) + (send-event (handle->process (-> self vehicle)) 'go-die) + ) + ) + :code (behavior () + (suspend) + (if (-> self should-spawn?) + (w-parking-spot-method-23 self) + ) + (until #f + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.25)) + (suspend) + ) + ) + (w-parking-spot-method-21 self) + (when (-> self should-spawn?) + (let ((f0-0 (vector-vector-distance-squared (camera-pos) (-> self test-sphere))) + (f1-0 327680.0) + ) + (when (< (* f1-0 f1-0) f0-0) + (let ((f1-3 614400.0)) + (if (or (< (* f1-3 f1-3) f0-0) (not (sphere-in-view-frustum? (-> self test-sphere)))) + (w-parking-spot-method-23 self) + ) + ) + ) + ) + ) + ) + #f + (sleep-code) + ) + :post (behavior () + 0 + ) + ) + + + + 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 0000000000..a5b4442ca7 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/was-squad-control_REF.gc @@ -0,0 +1,617 @@ +;;-*-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 +;; WARN: Return type mismatch (pointer process) vs none. +(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) + (none) + ) + +;; 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-fox_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-fox_REF.gc new file mode 100644 index 0000000000..5e9873fa1a --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-fox_REF.gc @@ -0,0 +1,137 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type v-fox +(deftype v-fox (wcar-snake-base) + () + ) + +;; definition for method 3 of type v-fox +(defmethod inspect ((this v-fox)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type wcar-snake-base inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 62 of type v-fox +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-62 ((this v-fox)) + (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 3317.76 :z 9011.2 :w 4915.2)) + 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 -14336.0 :w 6144.0)) + 16 + ) + (set! (-> (the-as collide-shape-prim-group s5-0) child 7 local-sphere w) 20889.6) + ) + ((method-of-type wcar-base vehicle-method-62) this) + 0 + (none) + ) + +;; definition for method 35 of type v-fox +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-rbody-control! ((this v-fox)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-fox" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! this *v-fox-constants*) + (setup-masks (-> this draw) 0 -1) + (setup-masks (-> this draw) 1 0) + (setup-masks (-> this draw) 2 0) + (set! (-> this shoot-delay) (the-as uint 18)) + (set! (-> this local-gun-pos 0 quad) (-> (new 'static 'vector :x 2048.0 :y 3686.4 :z 14336.0 :w 1.0) quad)) + (set! (-> this local-gun-pos 1 quad) (-> (new 'static 'vector :x -2048.0 :y 3686.4 :z 14336.0 :w 1.0) quad)) + (set! (-> this rider-hand-joint-array 0) 8) + ((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 6) (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 7) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + this + (the-as uint 11) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-shock-tops 1) this (the-as uint 15) (joint-mod-base-flags attached)) + (init (-> this jmod-shock-tops 2) this (the-as uint 9) (joint-mod-base-flags attached)) + (init (-> this jmod-shock-tops 3) this (the-as uint 13) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-set-local init) + (the-as joint-mod-set-local (-> this jmod-shock-mids)) + this + (the-as uint 12) + (joint-mod-base-flags attached trans) + ) + (init (-> this jmod-shock-mids 1) this (the-as uint 16) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-mids 2) this (the-as uint 10) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-mids 3) this (the-as uint 14) (joint-mod-base-flags attached trans)) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this jmod-guns)) + this + (the-as uint 17) + (joint-mod-base-flags attached trans) + ) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this jmod-guns 1)) + this + (the-as uint 18) + (joint-mod-base-flags attached trans) + ) + (spawn-wheels! + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-toad-wheel" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-toad-wheel-blur" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-toad-wheel" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-toad-wheel-blur" (the-as (pointer level) #f))) + ) + 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 0000000000..d510382c79 --- /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-mirage_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-mirage_REF.gc new file mode 100644 index 0000000000..115573fffd --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-mirage_REF.gc @@ -0,0 +1,243 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type v-mirage +(deftype v-mirage (wcar-snake-base) + () + ) + +;; definition for method 3 of type v-mirage +(defmethod inspect ((this v-mirage)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type wcar-snake-base inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 169 of type v-mirage +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs none. +(defmethod wvehicle-method-169 ((this v-mirage)) + (sound-play "toad-shot-fire") + (set! (-> this i-barrel) (logand (+ (-> this i-barrel) 1) 1)) + (let ((gp-1 (new 'stack-no-clear 'wcar-toad-stack-var0))) + (set! (-> gp-1 barrel-idx) (-> this i-barrel)) + (set! (-> gp-1 vec10 x) 61440.0) + (set! (-> gp-1 vec10 y) 204800.0) + (set! (-> gp-1 vec10 z) 409600.0) + (set! (-> gp-1 vec10 w) 163840.0) + (let* ((v1-9 (-> gp-1 mat0)) + (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-9 rvec quad) a0-4) + (set! (-> v1-9 uvec quad) a1-1) + (set! (-> v1-9 fvec quad) a2-1) + (set! (-> v1-9 trans quad) a3-2) + ) + (let ((v1-10 (new 'static 'vector :x 3686.4 :y 5324.8 :z 6144.0 :w 1.0))) + (vector-matrix*! + (-> gp-1 vec0) + (the-as vector (+ (the-as uint v1-10) (* (-> gp-1 barrel-idx) 16))) + (-> gp-1 mat0) + ) + ) + 0 + (vector-reset! (-> gp-1 vec4)) + (set! (-> gp-1 vec4 z) (-> gp-1 vec10 y)) + (set! (-> gp-1 vec4 y) (* 0.2678 (-> gp-1 vec10 y))) + (set! (-> gp-1 vec8 quad) (-> gp-1 mat0 fvec quad)) + (vector-float*! (-> gp-1 vec9) (-> gp-1 vec8) (- (-> gp-1 vec10 z) (-> gp-1 vec10 x))) + (vector+float*! (-> gp-1 vec3) (-> gp-1 vec0) (-> gp-1 vec8) (+ 32768.0 (-> gp-1 vec10 x))) + (let ((s4-1 (new 'stack 'boxed-array collide-shape 128))) + (set! (-> s4-1 length) (fill-actor-list-for-sphere + *actor-hash* + (-> gp-1 vec3) + (-> gp-1 vec9) + (-> gp-1 vec10 x) + (the-as (pointer collide-shape) (-> s4-1 data)) + (-> s4-1 allocated-length) + -1 + ) + ) + (let ((s4-2 (find-nearest-focusable + (the-as (array collide-shape) s4-1) + (-> gp-1 vec3) + (-> gp-1 vec10 z) + (search-info-flag attackable enemy attackable-priority high-priority) + (search-info-flag) + (-> gp-1 vec1) + (the-as vector #f) + 8192.0 + ) + ) + ) + (when s4-2 + (set! (-> gp-1 vec6 quad) (-> (get-trans s4-2 3) quad)) + (set! (-> gp-1 vec7 quad) (-> (get-transv s4-2) quad)) + (vector+float*! (-> gp-1 vec2) (-> this rbody lin-velocity) (-> gp-1 vec8) (-> gp-1 vec10 y)) + (vector-! (-> gp-1 vec5) (-> gp-1 vec6) (-> gp-1 vec0)) + (set! (-> gp-1 vec11 x) (vector-dot (-> gp-1 vec8) (-> gp-1 vec5))) + (vector-! (-> gp-1 vec5) (-> gp-1 vec7) (-> gp-1 vec2)) + (set! (-> gp-1 vec11 y) (vector-dot (-> gp-1 vec8) (-> gp-1 vec5))) + (set! (-> gp-1 vec11 w) (fmax 0.1 (/ (-> gp-1 vec11 x) (fmax 4096.0 (- (-> gp-1 vec11 y)))))) + (set! (-> gp-1 vec11 z) (+ (-> gp-1 vec6 y) (* (-> gp-1 vec11 w) (-> gp-1 vec7 y)))) + (set! (-> gp-1 vec4 y) (+ (* (/ 1.0 (-> gp-1 vec11 w)) (- (-> gp-1 vec11 z) (-> gp-1 vec0 y))) + (* 0.5 (-> gp-1 vec11 w) (-> gp-1 vec10 w)) + ) + ) + (set! (-> gp-1 vec4 y) (* (-> gp-1 vec4 y) (/ 1.0 (fmax 0.1 (-> gp-1 mat0 uvec y))))) + (set! (-> gp-1 vec4 y) (fmax (fmin (-> gp-1 vec4 y) (* 0.3638 (-> gp-1 vec10 y))) (* 0.0 (-> gp-1 vec10 y)))) + 0 + ) + ) + ) + (vector-rotate*! (-> gp-1 vec2) (-> gp-1 vec4) (-> gp-1 mat0)) + (vector+! (-> gp-1 vec2) (-> gp-1 vec2) (-> this rbody lin-velocity)) + (set! (-> gp-1 params ent) (-> this entity)) + (set! (-> gp-1 params charge) 1.0) + (set! (-> gp-1 params options) (projectile-options)) + (logclear! (-> gp-1 params options) (projectile-options po14 po15 po16)) + (set! (-> gp-1 params pos quad) (-> gp-1 vec0 quad)) + (set! (-> gp-1 params vel quad) (-> gp-1 vec2 quad)) + (set! (-> gp-1 params notify-handle) (the-as handle #f)) + (set! (-> gp-1 params owner-handle) (process->handle this)) + (set! (-> gp-1 params target-handle) (the-as handle #f)) + (set! (-> gp-1 params target-pos quad) (the-as uint128 0)) + (set! (-> gp-1 params ignore-handle) (process->handle this)) + (let* ((v1-60 *game-info*) + (a0-37 (+ (-> v1-60 attack-id) 1)) + ) + (set! (-> v1-60 attack-id) a0-37) + (set! (-> gp-1 params attack-id) a0-37) + ) + (set! (-> gp-1 params timeout) (seconds 4)) + (spawn-projectile v-toad-shot (-> gp-1 params) *rigid-body-queue-manager* *default-dead-pool*) + ) + (none) + ) + +;; definition for method 62 of type v-mirage +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-62 ((this v-mirage)) + (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 + ) + (set! (-> (the-as collide-shape-prim-group s5-0) child 7 local-sphere w) 20889.6) + ) + ((method-of-type wcar-base vehicle-method-62) this) + 0 + (none) + ) + +;; definition for method 35 of type v-mirage +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-rbody-control! ((this v-mirage)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-mirage" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (setup-masks (-> this draw) 0 -1) + (setup-masks (-> this draw) 1 0) + (setup-masks (-> this draw) 2 0) + (alloc-rbody-control! this *v-mirage-constants*) + (set! (-> this shoot-delay) (the-as uint 240)) + (set! (-> this local-gun-pos 0 quad) (-> (new 'static 'vector :x 3686.4 :y 5324.8 :z 6144.0 :w 1.0) quad)) + (set! (-> this local-gun-pos 1 quad) (-> (new 'static 'vector :x -3686.4 :y 5324.8 :z 6144.0 :w 1.0) quad)) + (set! (-> this rider-hand-joint-array 0) 17) + ((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 6) (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 7) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + this + (the-as uint 11) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-shock-tops 1) this (the-as uint 15) (joint-mod-base-flags attached)) + (init (-> this jmod-shock-tops 2) this (the-as uint 9) (joint-mod-base-flags attached)) + (init (-> this jmod-shock-tops 3) this (the-as uint 13) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-set-local init) + (the-as joint-mod-set-local (-> this jmod-shock-mids)) + this + (the-as uint 12) + (joint-mod-base-flags attached trans) + ) + (init (-> this jmod-shock-mids 1) this (the-as uint 16) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-mids 2) this (the-as uint 10) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-mids 3) this (the-as uint 14) (joint-mod-base-flags attached trans)) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this jmod-guns)) + this + (the-as uint 18) + (joint-mod-base-flags attached trans) + ) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this jmod-guns 1)) + this + (the-as uint 19) + (joint-mod-base-flags attached trans) + ) + (spawn-wheels! + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-fox-wheel" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-fox-wheel-blur" (the-as (pointer level) #f))) + (the-as skeleton-group #f) + (the-as skeleton-group #f) + ) + 0 + (none) + ) + + + + 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 new file mode 100644 index 0000000000..c8d38a2d3f --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-projectiles_REF.gc @@ -0,0 +1,745 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type v-scorp-shot +(deftype v-scorp-shot (projectile) + ((init-pos vector :inline) + (init-dir vector :inline) + (collide-normal vector :inline) + ) + ) + +;; definition for method 3 of type v-scorp-shot +(defmethod inspect ((this v-scorp-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 v-scorp-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-24 ((this v-scorp-shot)) + 0 + (none) + ) + +;; definition for method 26 of type v-scorp-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this v-scorp-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) + (when (not (logtest? (projectile-options po20) (-> this options))) + (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-15 s3-2)) + (let ((v1-19 s3-2)) + (let ((a1-10 -3640.889)) + (.mov vf6 a1-10) + ) + (.lvf vf4 (&-> v1-19 quad)) + ) + (.add.x.vf vf5 vf0 vf0 :mask #b1000) + (.add.x.vf vf5 vf4 vf6 :mask #b111) + (.svf (&-> a0-15 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 v-scorp-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-27 ((this v-scorp-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 v-scorp-shot +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this v-scorp-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 v-scorp-shot-move +;; WARN: Return type mismatch int vs none. +(defun v-scorp-shot-move ((arg0 v-scorp-shot)) + (projectile-move-fill-line-sphere arg0) + (cond + ((logtest? (-> arg0 root status) (collide-status touch-actor)) + (projectile-method-26 arg0) + ) + ((logtest? (-> arg0 root status) (collide-status touch-surface)) + (go (method-of-object arg0 impact)) + ) + ) + 0 + (none) + ) + +;; definition for function cshape-reaction-scorp-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs collide-status. +(defun cshape-reaction-scorp-shot ((arg0 control-info) (arg1 collide-query) (arg2 vector) (arg3 vector)) + (vector-reset! arg2) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (vector-float*! a1-1 (-> arg1 move-dist) (-> arg1 best-dist)) + (move-by-vector! arg0 a1-1) + ) + (set! (-> (the-as v-scorp-shot (-> arg0 process)) collide-normal quad) (-> arg1 best-other-tri normal quad)) + (let* ((s5-1 (-> arg1 best-other-tri collide-ptr)) + (v1-7 (if (type? s5-1 collide-shape-prim) + s5-1 + ) + ) + (v0-2 4) + ) + (cond + (v1-7 + (set! v0-2 32) + ) + (else + ) + ) + (logior! (-> arg0 status) v0-2) + (the-as collide-status v0-2) + ) + ) + +;; definition for method 30 of type v-scorp-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this v-scorp-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 v-scorp-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this v-scorp-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) (* 491520.0 (-> pp clock frames-per-second))) + (set! (-> this attack-mode) 'eco-blue) + (set! (-> this max-speed) (* 491520.0 (-> pp clock frames-per-second))) + (set! (-> this timeout) 1) + (set! (-> this move) v-scorp-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 v-snake-shot +(deftype v-snake-shot (v-scorp-shot) + () + ) + +;; definition for method 3 of type v-snake-shot +(defmethod inspect ((this v-snake-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type v-scorp-shot inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 28 of type v-snake-shot +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this v-snake-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "snake-gun-fire") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "blue-shot-hit") + ) + ) + ) + (none) + ) + +;; definition for method 37 of type v-snake-shot +(defmethod deal-damage! ((this v-snake-shot) (arg0 process) (arg1 event-message-block)) + (let ((gp-0 ((method-of-type v-scorp-shot deal-damage!) this arg0 arg1))) + (when gp-0 + (if (logtest? (process-mask vehicle) (-> arg0 mask)) + (sound-play "snake-riccos") + ) + ) + gp-0 + ) + ) + +;; definition of type v-rhino-shot +(deftype v-rhino-shot (guard-shot) + () + ) + +;; definition for method 3 of type v-rhino-shot +(defmethod inspect ((this v-rhino-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 v-rhino-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-24 ((this v-rhino-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* 855)) + (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 v-rhino-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this v-rhino-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) + (set! (-> *part-id-table* 980 init-specs 4 initial-valuef) (vector-length s5-1)) + (draw-beam (-> *part-id-table* 980) a1-0 s5-1 #f) + (vector-normalize! s5-1 1.0) + (launch-particles (-> *part-id-table* 981) s4-0) + ) + (let ((s4-1 (new 'stack-no-clear 'matrix)) + (f26-0 (* 0.000008138021 f30-0)) + (f30-1 (-> *part-id-table* 982 init-specs 3 initial-valuef)) + (f28-0 (-> *part-id-table* 982 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* 982 init-specs 3 initial-valuef) (* f26-0 f30-1)) + (set! (-> *part-id-table* 982 init-specs 5 initial-valuef) (* f26-0 f28-0)) + (launch-particles (-> *part-id-table* 982) s4-1 :origin-is-matrix #t) + (set! (-> *part-id-table* 982 init-specs 3 initial-valuef) f30-1) + (set! (-> *part-id-table* 982 init-specs 5 initial-valuef) f28-0) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 26 of type v-rhino-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this v-rhino-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?) + (cond + ((logtest? (-> *part-group-id-table* 211 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-1 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 211)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-1 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) (-> v1-1 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 212)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-1 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 212)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 28 of type v-rhino-shot +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this v-rhino-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "rhino-gun-fire") + ) + ((= v1-0 (projectile-options po0)) + (sound-play "blue-shot-hit") + ) + ) + ) + (none) + ) + +;; definition for method 37 of type v-rhino-shot +(defmethod deal-damage! ((this v-rhino-shot) (arg0 process) (arg1 event-message-block)) + (let ((gp-0 ((method-of-type v-scorp-shot deal-damage!) (the-as v-scorp-shot this) arg0 arg1))) + (when gp-0 + (if (logtest? (process-mask vehicle) (-> arg0 mask)) + (sound-play "rhino-riccos") + ) + ) + gp-0 + ) + ) + +;; definition for method 31 of type v-rhino-shot +;; WARN: Return type mismatch sound-id vs none. +(defmethod init-proj-settings! ((this v-rhino-shot)) + (let ((t9-0 (method-of-type guard-shot init-proj-settings!))) + (t9-0 this) + ) + (set! (-> this damage) 6.0) + (set! (-> this vehicle-damage-factor) 1.0) + (set! (-> this vehicle-impulse-factor) 0.5) + (set! (-> this timeout) (seconds 0.5)) + (set! (-> this sound-id) (new-sound-id)) + (none) + ) + +;; definition of type v-toad-shot +(deftype v-toad-shot (projectile) + ((trail-tracker handle) + (blast-radius float) + ) + (:methods + (set-y-vel (_type_) none) + ) + ) + +;; definition for method 3 of type v-toad-shot +(defmethod inspect ((this v-toad-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (format #t "~2Ttrail-tracker: ~D~%" (-> this trail-tracker)) + (format #t "~2Tblast-radius: ~f~%" (-> this blast-radius)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-toad-shot 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 v-toad-shot +;; WARN: Return type mismatch int vs none. +(defmethod play-impact-sound ((this v-toad-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + ) + ((= v1-0 (projectile-options po0)) + (sound-play "toad-shot-hit") + ) + ) + ) + 0 + (none) + ) + +;; definition for method 41 of type v-toad-shot +;; WARN: Return type mismatch int vs none. +(defmethod set-y-vel ((this v-toad-shot)) + (+! (-> this root transv y) (* -163840.0 (seconds-per-frame))) + 0 + (none) + ) + +;; definition for method 30 of type v-toad-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this v-toad-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-default) + (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 event-self) 'touched) + (set! (-> this root) s5-0) + ) + (set-collide-with! + (-> this root) + (collide-spec + backgnd + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set-collide-as! (-> this root) (collide-spec projectile)) + (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 40 of type v-toad-shot +(defmethod projectile-method-40 ((this v-toad-shot)) + 256 + ) + +;; definition for method 31 of type v-toad-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this v-toad-shot)) + (set! (-> this attack-mode) 'explode) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-toad-shot" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((t9-2 (method-of-type projectile init-proj-settings!))) + (t9-2 this) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 213) this)) + (set! (-> this blast-radius) 102400.0) + (set! (-> this max-speed) 90112.0) + (set! (-> this timeout) (seconds 4)) + (set! (-> this update-velocity) (method-of-object this set-y-vel)) + (set! (-> this damage) 0.0) + (let ((v1-13 (new 'stack-no-clear 'vector))) + (set! (-> v1-13 x) 2.0) + (set! (-> v1-13 y) 2.0) + (set! (-> v1-13 z) 2.0) + (set! (-> v1-13 w) 1.0) + (set! (-> this root scale quad) (-> v1-13 quad)) + ) + (let ((s5-1 (new 'stack-no-clear 'light-trail-tracker-spawn-params))) + (set! (-> s5-1 tracked-obj) (process->handle this)) + (set! (-> s5-1 appearance) *toad-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-26 + (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-26 8192) 1)) + ) + (set! (-> this trail-tracker) + (ppointer->handle (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) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 24 of type v-toad-shot +(defmethod projectile-method-24 ((this v-toad-shot)) + (draw-beam (-> *part-id-table* 979) (-> this root trans) (-> this starting-dir) #f) + (none) + ) + +;; definition for method 25 of type v-toad-shot +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this v-toad-shot)) + (spawn (-> this part) (-> this root trans)) + (ja-post) + 0 + (none) + ) + +;; definition for method 39 of type v-toad-shot +;; WARN: Return type mismatch object vs none. +(defmethod projectile-method-39 ((this v-toad-shot)) + (if (logtest? (-> this root status) (collide-status impact-surface)) + (go (method-of-object this impact)) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate impact (v-toad-shot) + :virtual #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) 2.0) + (set! (-> gp-0 group) (-> *part-group-id-table* 230)) + (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) 20.0) + (set! (-> gp-0 damage-scale) 3.0) + (set! (-> gp-0 vehicle-damage-factor) 1.0) + (set! (-> gp-0 vehicle-impulse-factor) 1.0) + (set! (-> gp-0 ignore-proc) (process->handle (handle->process (-> self ignore-handle)))) + (explosion-spawn gp-0 self) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + (let ((v1-20 (-> self root root-prim))) + (set! (-> v1-20 prim-core collide-as) (collide-spec)) + (set! (-> v1-20 prim-core collide-with) (collide-spec)) + ) + 0 + (send-event (handle->process (-> self trail-tracker)) 'notice 'die) + (while (-> self child) + (suspend) + ) + (deactivate self) + ) + ) + +;; definition of type v-marauder-shot +(deftype v-marauder-shot (guard-shot) + () + ) + +;; definition for method 3 of type v-marauder-shot +(defmethod inspect ((this v-marauder-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 v-marauder-shot +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this v-marauder-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "inter-gun-fire") + ) + ((= 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 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 "guard-shot-hit") + ) + ) + ) + (none) + ) + +;; definition for method 31 of type v-marauder-shot +;; WARN: Return type mismatch sound-id vs none. +(defmethod init-proj-settings! ((this v-marauder-shot)) + (let ((t9-0 (method-of-type guard-shot init-proj-settings!))) + (t9-0 this) + ) + (set! (-> this vehicle-damage-factor) 0.333) + (set! (-> this vehicle-impulse-factor) 0.25) + (set! (-> this timeout) (seconds 1.25)) + (set! (-> this sound-id) (new-sound-id)) + (none) + ) + +;; definition for method 37 of type v-marauder-shot +(defmethod deal-damage! ((this v-marauder-shot) (arg0 process) (arg1 event-message-block)) + (when ((method-of-type guard-shot deal-damage!) this arg0 arg1) + (if (logtest? (process-mask vehicle) (-> arg0 mask)) + (sound-play "inter-riccos") + ) + #t + ) + ) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-rhino_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-rhino_REF.gc new file mode 100644 index 0000000000..fc21c4a3dc --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-rhino_REF.gc @@ -0,0 +1,274 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type v-rhino +(deftype v-rhino (wcar-base) + ((jmod-axles joint-mod-rotate-local 4 :inline) + (jmod-gun-kick joint-mod-add-local :inline) + (jmod-gun-turn joint-mod-rotate-local :inline) + ) + ) + +;; definition for method 3 of type v-rhino +(defmethod inspect ((this v-rhino)) + (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-kick: #~%" (-> this jmod-gun-kick)) + (format #t "~2Tjmod-gun-turn: #~%" (-> this jmod-gun-turn)) + (label cfg-4) + this + ) + +;; definition for method 169 of type v-rhino +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod wvehicle-method-169 ((this v-rhino)) + (set! (-> this shoot-time) (the-as uint (current-time))) + (set! (-> this gun-kick) 1638.4) + (let ((gp-0 (new 'stack-no-clear 'wcar-rhino-proj-params))) + (let* ((v1-3 (-> gp-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-3 rvec quad) a0-3) + (set! (-> v1-3 uvec quad) a1-0) + (set! (-> v1-3 fvec quad) a2-0) + (set! (-> v1-3 trans quad) a3-1) + ) + (vector-matrix*! (-> gp-0 gun-local-pos) (-> this gun-local-pos) (-> gp-0 mat)) + (vector-rotate*! (-> gp-0 gun-local-dir) (-> this gun-local-dir) (-> gp-0 mat)) + (vector-float*! (-> gp-0 gun-dir) (-> gp-0 gun-local-dir) 409600.0) + (set! (-> gp-0 params ent) (-> this entity)) + (set! (-> gp-0 params charge) 1.0) + (set! (-> gp-0 params options) (projectile-options)) + (logclear! (-> gp-0 params options) (projectile-options po14 po15 po16)) + (set! (-> gp-0 params pos quad) (-> gp-0 gun-local-pos quad)) + (set! (-> gp-0 params vel quad) (-> gp-0 gun-dir quad)) + (set! (-> gp-0 params notify-handle) (the-as handle #f)) + (set! (-> gp-0 params owner-handle) (process->handle this)) + (set! (-> gp-0 params target-handle) (the-as handle #f)) + (set! (-> gp-0 params target-pos quad) (the-as uint128 0)) + (set! (-> gp-0 params ignore-handle) (process->handle this)) + (let* ((v1-19 *game-info*) + (a0-20 (+ (-> v1-19 attack-id) 1)) + ) + (set! (-> v1-19 attack-id) a0-20) + (set! (-> gp-0 params attack-id) a0-20) + ) + (set! (-> gp-0 params timeout) (seconds 4)) + (spawn-projectile v-rhino-shot (-> gp-0 params) *rigid-body-queue-manager* *default-dead-pool*) + ) + 0 + (none) + ) + +;; definition for method 34 of type v-rhino +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this v-rhino)) + (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 2305)))) + (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 2308)))) + (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 2309)))) + (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 1040)))) + (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 10)))) + (set! (-> a0-18 prim-core action) (collide-action solid)) + (set! (-> a0-18 transform-index) 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 28262.4) + ) + (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 v-rhino +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-62 ((this v-rhino)) + (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 14336.0 :y -2867.2 :z 15769.6 :w 7372.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 -14336.0 :y -2867.2 :z 15769.6 :w 7372.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 15155.2 :y -2867.2 :z -12902.4 :w 7372.8)) + 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 -15155.2 :y -2867.2 :z -12902.4 :w 7372.8)) + 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 1638.4 :z 15769.6 :w 9830.4)) + 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 4505.6 :w 11878.4)) + 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 2457.6 :z -13516.8 :w 9830.4)) + 16 + ) + ) + (set! (-> this turret-local-pos quad) (-> (new 'static 'vector :y 6553.6 :z 14745.6 :w 1.0) quad)) + ((method-of-type wcar-base vehicle-method-62) this) + 0 + (none) + ) + +;; definition for method 88 of type v-rhino +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-88 ((this v-rhino) (arg0 vehicle-controls)) + (let ((t9-0 (method-of-type wcar-base vehicle-method-88))) + (t9-0 this arg0) + ) + (wvehicle-method-199 this) + 0 + (none) + ) + +;; definition for method 94 of type v-rhino +(defmethod vehicle-method-94 ((this v-rhino)) + (let ((f0-0 (vector-length (-> this lin-acceleration)))) + (if (and (< 327680.0 f0-0) (and (not (logtest? (-> this controls flags) (vehicle-controls-flag vcf0))) + (not (-> *setting-control* cam-current entity-name)) + ) + ) + (activate! *camera-smush-control* (fmin 1331.2 (* 0.5 f0-0)) 120 360 1.0 0.9 (-> *display* camera-clock)) + ) + ) + ((method-of-type wcar-base vehicle-method-94) this) + (none) + ) + +;; definition for method 79 of type v-rhino +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-79 ((this v-rhino)) + (set! (-> this turbo-supply) 3.0) + (seek! (-> this gun-kick) 0.0 (* 32768.0 (seconds-per-frame))) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'quaternion 2))) + (set! (-> this jmod-gun-kick transform trans z) (-> this gun-kick)) + (quaternion-axis-angle! (-> s5-0 1) 1.0 0.0 0.0 (- (-> this gun-pitch))) + (quaternion-axis-angle! (-> s5-0 2) 0.0 1.0 0.0 (-> this gun-yaw)) + (quaternion*! (-> this jmod-gun-turn rotation) (-> s5-0 2) (-> s5-0 1)) + ) + 0 + (let ((s5-1 (new 'stack-no-clear 'inline-array 'quaternion 2))) + (set-vector! (-> s5-1 2) 0.0 0.0 0.0 0.0) + (dotimes (s4-0 (-> this info physics-model wheel-count)) + (let ((v1-8 (-> this wheel s4-0))) + (-> v1-8 info) + (quaternion-set! (-> s5-1 0) 0.0 0.0 (-> v1-8 sin-susp-ang) (+ 1.0 (-> v1-8 cos-susp-ang))) + ) + (quaternion-normalize! (-> s5-1 0)) + (quaternion-axis-angle! (-> s5-1 1) 0.0 1.0 0.0 (-> (&-> s5-1 0 data s4-0) 8)) + (let ((v1-13 (-> this jmod-axles s4-0))) + (quaternion*! (-> v1-13 rotation) (-> s5-1 0) (-> s5-1 1)) + ) + 0 + ) + ) + 0 + (none) + ) + +;; definition for method 35 of type v-rhino +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-rbody-control! ((this v-rhino)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-rhino" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! this *v-rhino-constants*) + (set! (-> this rider-hand-joint-array 0) 8) + (init (-> this jmod-gun-turn) this (the-as uint 9) (joint-mod-base-flags attached)) + (init (-> this jmod-gun-kick) this (the-as uint 10) (joint-mod-base-flags attached trans)) + (set! (-> this turret-local-pos quad) (-> (new 'static 'vector :y 10485.76 :z 12288.0 :w 1.0) quad)) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-axles)) + this + (the-as uint 4) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-axles 1) this (the-as uint 6) (joint-mod-base-flags attached)) + (init (-> this jmod-axles 2) this (the-as uint 5) (joint-mod-base-flags attached)) + (init (-> this jmod-axles 3) this (the-as uint 7) (joint-mod-base-flags attached)) + (spawn-wheels! + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-rhino-wheel" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-rhino-wheel" (the-as (pointer level) #f))) + (the-as skeleton-group #f) + (the-as skeleton-group #f) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-scorpion_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-scorpion_REF.gc new file mode 100644 index 0000000000..978ea5d8d1 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-scorpion_REF.gc @@ -0,0 +1,413 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type v-scorpion +(deftype v-scorpion (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-shock-bots joint-mod-set-local 4 :inline) + (jmod-gun-kick joint-mod-add-local :inline) + (jmod-gun-tilt joint-mod-add-local :inline) + (jmod-gun-turn joint-mod-rotate-local :inline) + ) + ) + +;; definition for method 3 of type v-scorpion +(defmethod inspect ((this v-scorpion)) + (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-shock-bots[4] @ #x~X~%" (-> this jmod-shock-bots)) + (format #t "~2Tjmod-gun-kick: #~%" (-> this jmod-gun-kick)) + (format #t "~2Tjmod-gun-tilt: #~%" (-> this jmod-gun-tilt)) + (format #t "~2Tjmod-gun-turn: #~%" (-> this jmod-gun-turn)) + (label cfg-4) + this + ) + +;; definition for method 34 of type v-scorpion +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this v-scorpion)) + (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 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 10)))) + (set! (-> a0-18 prim-core action) (collide-action solid)) + (set! (-> a0-18 transform-index) 0) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (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 27033.6) + ) + (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 v-scorpion +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-62 ((this v-scorpion)) + (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 12697.6 :y -819.2 :z 14336.0 :w 7782.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 -12697.6 :y -819.2 :z 14336.0 :w 7782.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 12697.6 :y -819.2 :z -12492.8 :w 7782.4)) + 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 -12697.6 :y -819.2 :z -12492.8 :w 7782.4)) + 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 1638.4 :z 14336.0 :w 9830.4)) + 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 2457.6 :w 9830.4)) + 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 2457.6 :z -12492.8 :w 9830.4)) + 16 + ) + ) + ((method-of-type wcar-base vehicle-method-62) this) + 0 + (none) + ) + +;; definition for method 169 of type v-scorpion +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs none. +(defmethod wvehicle-method-169 ((this v-scorpion)) + (set! (-> this shoot-time) (the-as uint (current-time))) + (set! (-> this gun-kick) 1638.4) + (let ((gp-0 (new 'stack-no-clear 'wcar-rhino-proj-params))) + (let* ((v1-3 (-> gp-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-3 rvec quad) a0-3) + (set! (-> v1-3 uvec quad) a1-0) + (set! (-> v1-3 fvec quad) a2-0) + (set! (-> v1-3 trans quad) a3-1) + ) + (vector-matrix*! (-> gp-0 gun-local-pos) (-> this gun-local-pos) (-> gp-0 mat)) + (vector-rotate*! (-> gp-0 gun-local-dir) (-> this gun-local-dir) (-> gp-0 mat)) + (vector-float*! (-> gp-0 gun-dir) (-> gp-0 gun-local-dir) 409600.0) + (set! (-> gp-0 params ent) (-> this entity)) + (set! (-> gp-0 params charge) 1.0) + (set! (-> gp-0 params options) (projectile-options)) + (logclear! (-> gp-0 params options) (projectile-options po14 po15 po16)) + (set! (-> gp-0 params pos quad) (-> gp-0 gun-local-pos quad)) + (set! (-> gp-0 params vel quad) (-> gp-0 gun-dir quad)) + (set! (-> gp-0 params notify-handle) (the-as handle #f)) + (set! (-> gp-0 params owner-handle) (process->handle this)) + (set! (-> gp-0 params target-handle) (the-as handle #f)) + (set! (-> gp-0 params target-pos quad) (the-as uint128 0)) + (set! (-> gp-0 params ignore-handle) (process->handle this)) + (let* ((v1-19 *game-info*) + (a0-20 (+ (-> v1-19 attack-id) 1)) + ) + (set! (-> v1-19 attack-id) a0-20) + (set! (-> gp-0 params attack-id) a0-20) + ) + (set! (-> gp-0 params timeout) (seconds 4)) + (spawn-projectile v-scorp-shot (-> gp-0 params) *rigid-body-queue-manager* *default-dead-pool*) + (let ((v1-23 (get-field-spec-by-id (-> *part-id-table* 967) (sp-field-id spt-omega)))) + (if v1-23 + (set! (-> v1-23 initial-valuef) (+ -20480.0 (-> gp-0 gun-local-pos y))) + ) + ) + (set! (-> gp-0 mat fvec quad) (-> gp-0 gun-local-dir quad)) + (vector-cross! (the-as vector (-> gp-0 mat)) (-> gp-0 mat uvec) (-> gp-0 mat fvec)) + (vector+float*! (-> gp-0 mat trans) (-> gp-0 gun-local-pos) (-> gp-0 gun-local-dir) -12288.0) + (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 (-> gp-0 mat) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 227) + :duration 1 + :mat-joint (-> gp-0 mat) + ) + ) + ) + (none) + ) + +;; definition for method 88 of type v-scorpion +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-88 ((this v-scorpion) (arg0 vehicle-controls)) + (let ((t9-0 (method-of-type wcar-base vehicle-method-88))) + (t9-0 this arg0) + ) + (wvehicle-method-199 this) + 0 + (none) + ) + +;; definition for method 94 of type v-scorpion +(defmethod vehicle-method-94 ((this v-scorpion)) + (let ((f0-0 (vector-length (-> this lin-acceleration)))) + (if (and (< 327680.0 f0-0) (not (logtest? (-> this controls flags) (vehicle-controls-flag vcf0)))) + (activate! *camera-smush-control* (fmin 2048.0 (* 0.5 f0-0)) 60 210 1.0 0.9 (-> *display* camera-clock)) + ) + ) + ((method-of-type wcar-base vehicle-method-94) this) + (none) + ) + +;; definition for method 79 of type v-scorpion +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-79 ((this v-scorpion)) + (seek! (-> this gun-kick) 0.0 (* 32768.0 (seconds-per-frame))) + (new 'stack-no-clear 'vector) + (set! (-> this jmod-gun-kick transform trans z) (-> this gun-kick)) + (set! (-> this jmod-gun-tilt transform trans z) (-> this gun-kick)) + (quaternion-axis-angle! (-> this jmod-gun-tilt transform quat) 1.0 0.0 0.0 (-> this gun-pitch)) + (quaternion-axis-angle! (-> this jmod-gun-turn rotation) 0.0 1.0 0.0 (+ 32768.0 (-> this gun-yaw))) + 0 + (let ((s5-0 (new 'stack-no-clear 'inline-array 'quaternion 2))) + (set-vector! (-> s5-0 2) -1638.4 -1638.4 1638.4 1638.4) + (dotimes (s4-0 (-> this info physics-model wheel-count)) + (let ((v1-9 (-> this wheel s4-0))) + (-> v1-9 info) + (quaternion-set! (-> s5-0 0) 0.0 0.0 (-> v1-9 sin-susp-ang) (+ 1.0 (-> v1-9 cos-susp-ang))) + ) + (quaternion-normalize! (-> s5-0 0)) + (quaternion-axis-angle! (-> s5-0 1) 0.0 1.0 0.0 (-> (&-> s5-0 0 data s4-0) 8)) + (let ((v1-14 (-> this jmod-axles s4-0))) + (quaternion*! (-> v1-14 rotation) (-> s5-0 0) (-> s5-0 1)) + ) + 0 + ) + ) + (let ((s5-1 (new 'stack-no-clear 'wvehicle-physics-work))) + (let* ((v1-20 (-> s5-1 mat)) + (a3-4 (-> this node-list data 0 bone transform)) + (a0-15 (-> a3-4 rvec quad)) + (a1-6 (-> a3-4 uvec quad)) + (a2-6 (-> a3-4 fvec quad)) + (a3-5 (-> a3-4 trans quad)) + ) + (set! (-> v1-20 rvec quad) a0-15) + (set! (-> v1-20 uvec quad) a1-6) + (set! (-> v1-20 fvec quad) a2-6) + (set! (-> v1-20 trans quad) a3-5) + ) + (set! (-> s5-1 force quad) (-> (new 'static 'vector :x 7905.28 :y 5324.8 :z 5120.0 :w 1.0) quad)) + (set! (-> s5-1 velocity quad) (-> (new 'static 'vector :x 7905.28 :y 5324.8 :z 5120.0 :w 1.0) quad)) + (set! (-> s5-1 world-pos quad) (-> (new 'static 'vector :x 7905.28 :y 5324.8 :z -6635.52 :w 1.0) quad)) + (set! (-> s5-1 world-normal quad) (-> (new 'static 'vector :x 7905.28 :y 5324.8 :z -6635.52 :w 1.0) quad)) + (set-vector! (-> s5-1 local-pos) 27670.756 27670.756 28398.934 28398.934) + (dotimes (s4-1 4) + (let ((s3-0 (-> this wheel s4-1))) + (let ((v1-29 (-> s3-0 info))) + (set! (-> s5-1 ground-pos x) (+ -3276.8 (-> v1-29 susp-arm-length))) + (set! (-> s5-1 tmp quad) (-> (the-as (pointer uint128) (+ (+ (* s4-1 16) 64) (the-as int s5-1))))) + (set! (-> s5-1 steering-axis quad) (-> v1-29 local-pos quad)) + ) + (+! (-> s5-1 steering-axis x) (* (-> s5-1 ground-pos x) (-> s3-0 cos-susp-ang))) + (+! (-> s5-1 steering-axis y) (* (-> s5-1 ground-pos x) (-> s3-0 sin-susp-ang))) + (set! (-> s5-1 p-body quad) (-> s5-1 steering-axis quad)) + (set! (-> s5-1 p-body x) (* (-> s5-1 p-body x) (-> s3-0 x-scale))) + (set! (-> s5-1 tmp x) (* (-> s5-1 tmp x) (-> s3-0 x-scale))) + (vector-! (-> s5-1 axis) (-> s5-1 p-body) (-> s5-1 tmp)) + (set! (-> s5-1 ground-pos z) (vector-length (-> s5-1 axis))) + (set! (-> s5-1 ground-pos y) + (- (-> s5-1 local-pos data s4-1) (* (atan (-> s5-1 axis x) (-> s5-1 axis y)) (-> s3-0 x-scale))) + ) + (let ((v1-40 (-> this jmod-shock-tops s4-1))) + (quaternion-axis-angle! (-> v1-40 rotation) 0.0 0.0 1.0 (-> s5-1 ground-pos y)) + ) + 0 + (let ((v1-44 (-> this jmod-shock-mids s4-1))) + (set! (-> v1-44 transform trans y) (* -0.5 (-> s5-1 ground-pos z) (-> s3-0 x-scale))) + ) + 0 + (let ((v1-48 (-> this jmod-shock-bots s4-1))) + (set! (-> v1-48 transform trans y) (* -1.0 (+ -2048.0 (* 0.5 (-> s5-1 ground-pos z))) (-> s3-0 x-scale))) + ) + ) + 0 + 0 + ) + ) + 0 + (none) + ) + +;; definition for method 35 of type v-scorpion +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-rbody-control! ((this v-scorpion)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-scorpion" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! this *v-scorpion-constants*) + (set! (-> this rider-hand-joint-array 0) 3) + (init (-> this jmod-gun-turn) this (the-as uint 4) (joint-mod-base-flags attached)) + (init (-> this jmod-gun-tilt) this (the-as uint 5) (joint-mod-base-flags attached trans quat)) + (init (-> this jmod-gun-kick) this (the-as uint 6) (joint-mod-base-flags attached trans)) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-axles)) + this + (the-as uint 7) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-axles 1) this (the-as uint 15) (joint-mod-base-flags attached)) + (init (-> this jmod-axles 2) this (the-as uint 8) (joint-mod-base-flags attached)) + (init (-> this jmod-axles 3) this (the-as uint 16) (joint-mod-base-flags attached)) + (set! (-> this turret-local-pos quad) (-> (new 'static 'vector :y 10485.76 :z -10240.0 :w 1.0) quad)) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + this + (the-as uint 9) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-shock-tops 1) this (the-as uint 17) (joint-mod-base-flags attached)) + (init (-> this jmod-shock-tops 2) this (the-as uint 12) (joint-mod-base-flags attached)) + (init (-> this jmod-shock-tops 3) this (the-as uint 20) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-set-local init) + (the-as joint-mod-set-local (-> this jmod-shock-mids)) + this + (the-as uint 10) + (joint-mod-base-flags attached trans) + ) + (init (-> this jmod-shock-mids 1) this (the-as uint 18) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-mids 2) this (the-as uint 13) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-mids 3) this (the-as uint 21) (joint-mod-base-flags attached trans)) + ((method-of-type joint-mod-set-local init) + (the-as joint-mod-set-local (-> this jmod-shock-bots)) + this + (the-as uint 11) + (joint-mod-base-flags attached trans) + ) + (init (-> this jmod-shock-bots 1) this (the-as uint 19) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-bots 2) this (the-as uint 14) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-bots 3) this (the-as uint 22) (joint-mod-base-flags attached trans)) + (spawn-wheels! + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-scorpion-wheel" (the-as (pointer level) #f))) + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-v-scorpion-wheel-blur" (the-as (pointer level) #f)) + ) + (the-as skeleton-group #f) + (the-as skeleton-group #f) + ) + (set! (-> this gun-aim-yaw) 0.0) + (set! (-> this gun-aim-yaw-vel) 0.0) + (set! (-> this gun-yaw) 0.0) + (set! (-> this gun-pitch) 0.0) + (set! (-> this shoot-delay) (the-as uint 30)) + (set! (-> this lock-turret) #f) + 0 + (none) + ) + +;; definition for method 49 of type v-scorpion +(defmethod rbody-event-handler ((this v-scorpion) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('set-string-height) + (set-setting! 'string-min-height 'abs (-> arg3 param 0) 0) + (set-setting! 'string-max-height 'abs (-> arg3 param 0) 0) + #t + ) + (('draw-turret) + (if (-> arg3 param 0) + (setup-masks (-> this draw) 2 0) + (setup-masks (-> this draw) 0 2) + ) + ) + (('use-camera) + (if (-> arg3 param 0) + (vehicle-method-80 this) + (vehicle-method-81 this) + ) + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-snake_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-snake_REF.gc new file mode 100644 index 0000000000..741152ee2f --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-snake_REF.gc @@ -0,0 +1,137 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type v-snake +(deftype v-snake (wcar-snake-base) + () + ) + +;; definition for method 3 of type v-snake +(defmethod inspect ((this v-snake)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type wcar-snake-base inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 62 of type v-snake +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-62 ((this v-snake)) + (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 + ) + (set! (-> (the-as collide-shape-prim-group s5-0) child 7 local-sphere w) 20889.6) + ) + ((method-of-type wcar-base vehicle-method-62) this) + 0 + (none) + ) + +;; definition for method 35 of type v-snake +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-rbody-control! ((this v-snake)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-snake" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (setup-masks (-> this draw) 0 -1) + (setup-masks (-> this draw) 1 0) + (setup-masks (-> this draw) 4 0) + (alloc-rbody-control! this *v-snake-constants*) + (set! (-> this shoot-delay) (the-as uint 18)) + (set! (-> this local-gun-pos 0 quad) (-> (new 'static 'vector :x 3686.4 :y 5324.8 :z 6144.0 :w 1.0) quad)) + (set! (-> this local-gun-pos 1 quad) (-> (new 'static 'vector :x -3686.4 :y 5324.8 :z 6144.0 :w 1.0) quad)) + (set! (-> this rider-hand-joint-array 0) 17) + ((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 6) (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 7) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + this + (the-as uint 11) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-shock-tops 1) this (the-as uint 15) (joint-mod-base-flags attached)) + (init (-> this jmod-shock-tops 2) this (the-as uint 9) (joint-mod-base-flags attached)) + (init (-> this jmod-shock-tops 3) this (the-as uint 13) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-set-local init) + (the-as joint-mod-set-local (-> this jmod-shock-mids)) + this + (the-as uint 12) + (joint-mod-base-flags attached trans) + ) + (init (-> this jmod-shock-mids 1) this (the-as uint 16) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-mids 2) this (the-as uint 10) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-mids 3) this (the-as uint 14) (joint-mod-base-flags attached trans)) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this jmod-guns)) + this + (the-as uint 18) + (joint-mod-base-flags attached trans) + ) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this jmod-guns 1)) + this + (the-as uint 19) + (joint-mod-base-flags attached trans) + ) + (spawn-wheels! + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-snake-wheel" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-snake-wheel-blur" (the-as (pointer level) #f))) + (the-as skeleton-group #f) + (the-as skeleton-group #f) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-toad_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-toad_REF.gc new file mode 100644 index 0000000000..d798df4027 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-toad_REF.gc @@ -0,0 +1,546 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type v-toad +(deftype v-toad (wcar-base) + ((jmod-axles joint-mod-rotate-local 4 :inline) + (jmod-shock-tops joint-mod-rotate-local 2 :inline) + (jmod-shock-bots joint-mod-set-local 2 :inline) + ) + (:methods + (v-toad-method-203 (_type_ vehicle-wheel-state vehicle-wheel-info) none) + ) + ) + +;; definition for method 3 of type v-toad +(defmethod inspect ((this v-toad)) + (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[2] @ #x~X~%" (-> this jmod-shock-tops)) + (format #t "~2Tjmod-shock-bots[2] @ #x~X~%" (-> this jmod-shock-bots)) + (label cfg-4) + this + ) + +;; definition for method 169 of type v-toad +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs none. +(defmethod wvehicle-method-169 ((this v-toad)) + (sound-play "toad-shot-fire") + (set! (-> this i-barrel) (logand (+ (-> this i-barrel) 1) 1)) + (let ((gp-1 (new 'stack-no-clear 'wcar-toad-stack-var0))) + (set! (-> gp-1 barrel-idx) (-> this i-barrel)) + (set! (-> gp-1 vec10 x) 61440.0) + (set! (-> gp-1 vec10 y) 204800.0) + (set! (-> gp-1 vec10 z) 409600.0) + (set! (-> gp-1 vec10 w) 163840.0) + (let* ((v1-9 (-> gp-1 mat0)) + (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-9 rvec quad) a0-4) + (set! (-> v1-9 uvec quad) a1-1) + (set! (-> v1-9 fvec quad) a2-1) + (set! (-> v1-9 trans quad) a3-2) + ) + (let ((v1-10 (new 'static 'inline-array vector 2 + (new 'static 'vector :x 2048.0 :y 7372.8 :z 6144.0 :w 1.0) + (new 'static 'vector :x -2048.0 :y 7372.8 :z 6144.0 :w 1.0) + ) + ) + ) + (vector-matrix*! (-> gp-1 vec0) (-> v1-10 (-> gp-1 barrel-idx)) (-> gp-1 mat0)) + ) + 0 + (vector-reset! (-> gp-1 vec4)) + (set! (-> gp-1 vec4 z) (-> gp-1 vec10 y)) + (set! (-> gp-1 vec4 y) (* 0.2678 (-> gp-1 vec10 y))) + (set! (-> gp-1 vec8 quad) (-> gp-1 mat0 fvec quad)) + (vector-float*! (-> gp-1 vec9) (-> gp-1 vec8) (- (-> gp-1 vec10 z) (-> gp-1 vec10 x))) + (vector+float*! (-> gp-1 vec3) (-> gp-1 vec0) (-> gp-1 vec8) (+ 32768.0 (-> gp-1 vec10 x))) + (let ((s4-1 (new 'stack 'boxed-array collide-shape 128))) + (set! (-> s4-1 length) (fill-actor-list-for-sphere + *actor-hash* + (-> gp-1 vec3) + (-> gp-1 vec9) + (-> gp-1 vec10 x) + (the-as (pointer collide-shape) (-> s4-1 data)) + (-> s4-1 allocated-length) + -1 + ) + ) + (let ((s4-2 (find-nearest-focusable + (the-as (array collide-shape) s4-1) + (-> gp-1 vec3) + (-> gp-1 vec10 z) + (search-info-flag attackable enemy attackable-priority high-priority) + (search-info-flag) + (-> gp-1 vec1) + (the-as vector #f) + 8192.0 + ) + ) + ) + (when s4-2 + (set! (-> gp-1 vec6 quad) (-> (get-trans s4-2 3) quad)) + (set! (-> gp-1 vec7 quad) (-> (get-transv s4-2) quad)) + (vector+float*! (-> gp-1 vec2) (-> this rbody lin-velocity) (-> gp-1 vec8) (-> gp-1 vec10 y)) + (vector-! (-> gp-1 vec5) (-> gp-1 vec6) (-> gp-1 vec0)) + (set! (-> gp-1 vec11 x) (vector-dot (-> gp-1 vec8) (-> gp-1 vec5))) + (vector-! (-> gp-1 vec5) (-> gp-1 vec7) (-> gp-1 vec2)) + (set! (-> gp-1 vec11 y) (vector-dot (-> gp-1 vec8) (-> gp-1 vec5))) + (set! (-> gp-1 vec11 w) (fmax 0.1 (/ (-> gp-1 vec11 x) (fmax 4096.0 (- (-> gp-1 vec11 y)))))) + (set! (-> gp-1 vec11 z) (+ (-> gp-1 vec6 y) (* (-> gp-1 vec11 w) (-> gp-1 vec7 y)))) + (set! (-> gp-1 vec4 y) (+ (* (/ 1.0 (-> gp-1 vec11 w)) (- (-> gp-1 vec11 z) (-> gp-1 vec0 y))) + (* 0.5 (-> gp-1 vec11 w) (-> gp-1 vec10 w)) + ) + ) + (set! (-> gp-1 vec4 y) (* (-> gp-1 vec4 y) (/ 1.0 (fmax 0.1 (-> gp-1 mat0 uvec y))))) + (set! (-> gp-1 vec4 y) (fmax (fmin (-> gp-1 vec4 y) (* 0.3638 (-> gp-1 vec10 y))) (* 0.0 (-> gp-1 vec10 y)))) + 0 + ) + ) + ) + (vector-rotate*! (-> gp-1 vec2) (-> gp-1 vec4) (-> gp-1 mat0)) + (vector+! (-> gp-1 vec2) (-> gp-1 vec2) (-> this rbody lin-velocity)) + (set! (-> gp-1 params ent) (-> this entity)) + (set! (-> gp-1 params charge) 1.0) + (set! (-> gp-1 params options) (projectile-options)) + (logclear! (-> gp-1 params options) (projectile-options po14 po15 po16)) + (set! (-> gp-1 params pos quad) (-> gp-1 vec0 quad)) + (set! (-> gp-1 params vel quad) (-> gp-1 vec2 quad)) + (set! (-> gp-1 params notify-handle) (the-as handle #f)) + (set! (-> gp-1 params owner-handle) (process->handle this)) + (set! (-> gp-1 params target-handle) (the-as handle #f)) + (set! (-> gp-1 params target-pos quad) (the-as uint128 0)) + (set! (-> gp-1 params ignore-handle) (process->handle this)) + (let* ((v1-60 *game-info*) + (a0-37 (+ (-> v1-60 attack-id) 1)) + ) + (set! (-> v1-60 attack-id) a0-37) + (set! (-> gp-1 params attack-id) a0-37) + ) + (set! (-> gp-1 params timeout) (seconds 4)) + (spawn-projectile v-toad-shot (-> gp-1 params) *rigid-body-queue-manager* *default-dead-pool*) + ) + (none) + ) + +;; definition for method 88 of type v-toad +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-88 ((this v-toad) (arg0 vehicle-controls)) + ((method-of-type wcar-base vehicle-method-88) this arg0) + 0 + (none) + ) + +;; definition for method 48 of type v-toad +(defmethod on-impact ((this v-toad) (arg0 rigid-body-impact)) + (when (and (logtest? (vehicle-flag vf56) (-> this v-flags)) (-> arg0 process)) + (let ((a0-2 (-> arg0 process))) + (if a0-2 + (send-event + a0-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 (process->handle this)) + ) + ) + ) + ) + ) + ) + ((method-of-type wcar-base on-impact) this arg0) + (none) + ) + +;; definition for method 93 of type v-toad +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-93 ((this v-toad)) + (let ((t9-0 (method-of-type wcar-base vehicle-method-93))) + (t9-0 this) + ) + (if (logtest? (vehicle-flag vf56) (-> this v-flags)) + (set! (-> this rbody lin-momentum y) (* -409600.0 (-> this info info mass))) + ) + 0 + (none) + ) + +;; definition for method 34 of type v-toad +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this v-toad)) + (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-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 18432.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (let ((a0-6 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1)))) + (set! (-> a0-6 prim-core action) (collide-action solid)) + (set! (-> a0-6 transform-index) 0) + ) + (let ((a0-8 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 4)))) + (set! (-> a0-8 prim-core action) (collide-action solid)) + (set! (-> a0-8 transform-index) 0) + ) + (let ((a0-10 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 2)))) + (set! (-> a0-10 prim-core action) (collide-action solid)) + (set! (-> a0-10 transform-index) 0) + ) + (let ((a0-12 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 8)))) + (set! (-> a0-12 prim-core action) (collide-action solid)) + (set! (-> a0-12 transform-index) 0) + ) + (let ((a0-14 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 5)))) + (set! (-> a0-14 prim-core action) (collide-action solid)) + (set! (-> a0-14 transform-index) 0) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 1168)))) + (set! (-> v1-21 prim-core action) (collide-action solid nav-sphere)) + (set! (-> v1-21 transform-index) 0) + (set! (-> v1-21 nav-radius) 20480.0) + ) + (let ((a0-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 16)))) + (set! (-> a0-19 prim-core action) (collide-action solid)) + (set! (-> a0-19 transform-index) 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 action) (collide-action solid rideable)) + (set! (-> v1-25 transform-index) 3) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 28672.0) + ) + (set! (-> s5-0 nav-radius) 20480.0) + (let ((v1-27 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-27 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-27 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-toad +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-62 ((this v-toad)) + (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 11264.0 :y 2252.8 :z 20275.2 :w 5120.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 :x -11264.0 :y 2252.8 :z 20275.2 :w 5120.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 :x 12697.6 :y 3481.6 :z -12083.2 :w 6553.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 -12697.6 :y 3481.6 :z -12083.2 :w 6553.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 4096.0 :z 14336.0 :w 6963.2)) + 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 5324.8 :z 1228.8 :w 8192.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 5324.8 :z -10649.6 :w 6963.2)) + 16 + ) + ) + ((method-of-type wcar-base vehicle-method-62) this) + 0 + (none) + ) + +;; definition for method 203 of type v-toad +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod v-toad-method-203 ((this v-toad) (arg0 vehicle-wheel-state) (arg1 vehicle-wheel-info)) + (let ((gp-0 (new 'stack-no-clear 'wvehicle-physics-work))) + (set-vector! (-> gp-0 p-body) 1.0 0.0 0.0 1.0) + (set-vector! (-> gp-0 axis) 0.0 1.0 0.0 1.0) + (quaternion-copy! (the-as quaternion (-> gp-0 world-normal)) (-> this root quat)) + (let* ((v1-3 (-> gp-0 mat)) + (a3-0 (-> this rbody matrix)) + (a0-7 (-> a3-0 rvec quad)) + (a1-2 (-> a3-0 uvec quad)) + (a2-1 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-3 rvec quad) a0-7) + (set! (-> v1-3 uvec quad) a1-2) + (set! (-> v1-3 fvec quad) a2-1) + (set! (-> v1-3 trans quad) a3-1) + ) + (set! (-> gp-0 wsphere y) (* (-> arg1 radius) (-> arg1 scale))) + (set! (-> gp-0 wsphere z) 13590.528) + (set! (-> gp-0 wsphere r) 0.0) + (set! (-> gp-0 friction-coef) + (+ (-> gp-0 wsphere r) (* 2.0 (asin (/ (* 0.5 (-> arg1 travel)) (-> gp-0 wsphere z))))) + ) + (set! (-> gp-0 steering-axis quad) (-> (new 'static 'vector :x 10649.6 :y 2662.4 :z 7618.56 :w 1.0) quad)) + (set-vector! + (-> gp-0 ground-pos) + 0.0 + (* -1.0 (- (sin (-> gp-0 friction-coef)) (sin (-> gp-0 wsphere r))) (-> gp-0 wsphere z)) + (* (- (cos (-> gp-0 friction-coef)) (cos (-> gp-0 wsphere r))) (-> gp-0 wsphere z)) + 1.0 + ) + (vector-normalize! (-> gp-0 ground-pos) 1.0) + (set! (-> gp-0 tmp quad) (-> gp-0 steering-axis quad)) + (+! (-> gp-0 tmp z) (* (-> gp-0 wsphere z) (cos (-> gp-0 wsphere r)))) + (+! (-> gp-0 tmp y) (* -1.0 (sin (-> gp-0 wsphere r)) (-> gp-0 wsphere z))) + (set! (-> gp-0 tmp y) (- (-> gp-0 tmp y) (-> gp-0 wsphere y))) + (set! (-> gp-0 tmp x) (* (-> gp-0 tmp x) (-> arg0 x-scale))) + (vector+float*! + (-> gp-0 tmp) + (-> gp-0 tmp) + (-> arg0 local-axis) + (* (-> arg1 steer-arm-length) (-> arg0 x-scale)) + ) + (set! (-> arg0 probe-local-pos quad) (-> gp-0 tmp quad)) + (set! (-> arg0 probe-local-dir quad) (-> gp-0 ground-pos quad)) + (vector-matrix*! (-> gp-0 side-dir) (-> gp-0 tmp) (-> gp-0 mat)) + (vector-rotate*! (-> gp-0 forward-dir) (-> gp-0 ground-pos) (-> gp-0 mat)) + (set! (-> gp-0 wsphere x) + (- (+ (-> arg0 probe-local-pos y) + (-> gp-0 wsphere y) + (* (-> arg0 probe-local-dir y) (-> arg0 pos2) (-> arg1 travel)) + ) + (-> gp-0 steering-axis y) + ) + ) + (set! (-> arg0 sin-susp-ang) (fmax -1.0 (fmin 1.0 (/ (- (-> gp-0 wsphere x)) (-> gp-0 wsphere z))))) + (let ((f0-52 1.0) + (f1-16 (-> arg0 sin-susp-ang)) + ) + (set! (-> arg0 cos-susp-ang) (sqrtf (- f0-52 (* f1-16 f1-16)))) + ) + (quaternion-identity! (the-as quaternion (-> gp-0 local-pos))) + (set! (-> gp-0 local-pos z) (* (sin (-> arg1 camber)) (-> arg0 x-scale))) + (set! (-> gp-0 local-pos w) (cos (-> arg1 camber))) + (when (logtest? (-> arg1 flags) (vehicle-wheel-flag vwf5)) + (quaternion-set! + (the-as quaternion (-> gp-0 force)) + 0.0 + 0.0 + (* (-> arg0 sin-susp-ang) (-> arg0 x-scale)) + (+ 1.0 (-> arg0 cos-susp-ang)) + ) + (quaternion-normalize! (the-as quaternion (-> gp-0 force))) + (quaternion*! + (the-as quaternion (-> gp-0 local-pos)) + (the-as quaternion (-> gp-0 local-pos)) + (the-as quaternion (-> gp-0 force)) + ) + ) + (set! (-> gp-0 dir quad) (-> gp-0 steering-axis quad)) + (+! (-> gp-0 dir z) (* (-> gp-0 wsphere z) (-> arg0 cos-susp-ang))) + (+! (-> gp-0 dir y) (* -1.0 (-> arg0 sin-susp-ang) (-> gp-0 wsphere z))) + (set! (-> gp-0 dir x) (* (-> gp-0 dir x) (-> arg0 x-scale))) + (vector+float*! + (-> gp-0 dir) + (-> gp-0 dir) + (-> arg0 local-axis) + (* (-> arg1 steer-arm-length) (-> arg0 x-scale)) + ) + (vector-matrix*! (-> gp-0 ground-normal-sum) (-> gp-0 dir) (-> gp-0 mat)) + (quaternion-vector-angle! (the-as quaternion (-> gp-0 world-pos)) (-> gp-0 axis) (-> arg0 steer-angle)) + (quaternion-vector-angle! (the-as quaternion (-> gp-0 velocity)) (-> gp-0 p-body) (-> arg0 angle)) + (quaternion*! + (the-as quaternion (-> gp-0 force)) + (the-as quaternion (-> gp-0 world-pos)) + (the-as quaternion (-> gp-0 local-pos)) + ) + (quaternion*! + (the-as quaternion (-> gp-0 force)) + (the-as quaternion (-> gp-0 force)) + (the-as quaternion (-> gp-0 velocity)) + ) + (quaternion*! (-> arg0 quat) (the-as quaternion (-> gp-0 world-normal)) (the-as quaternion (-> gp-0 force))) + (set! (-> arg0 trans quad) (-> gp-0 ground-normal-sum quad)) + ) + 0 + (none) + ) + +;; definition for method 79 of type v-toad +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-79 ((this v-toad)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'quaternion 2))) + (quaternion-axis-angle! (-> s5-0 1) 1.0 0.0 0.0 -5355.7476) + (dotimes (s4-0 2) + (let ((v1-3 (-> this wheel s4-0))) + (-> v1-3 info) + (quaternion-set! (-> s5-0 0) (-> v1-3 sin-susp-ang) 0.0 0.0 (+ 1.0 (-> v1-3 cos-susp-ang))) + ) + (quaternion-normalize! (-> s5-0 0)) + (let ((v1-6 (-> this jmod-axles s4-0))) + (quaternion*! (-> v1-6 rotation) (-> s5-0 1) (-> s5-0 0)) + ) + 0 + ) + ) + (let ((s5-1 (new 'stack-no-clear 'inline-array 'quaternion 1)) + (s4-1 2) + ) + (while (< s4-1 4) + (let ((v1-13 (-> this wheel s4-1))) + (-> v1-13 info) + (quaternion-set! + (-> s5-1 0) + 0.0 + 0.0 + (* (-> v1-13 sin-susp-ang) (-> v1-13 x-scale)) + (+ 1.0 (-> v1-13 cos-susp-ang)) + ) + ) + (quaternion-normalize! (-> s5-1 0)) + (let ((v1-16 (-> this jmod-axles s4-1))) + (quaternion-copy! (-> v1-16 rotation) (-> s5-1 0)) + ) + 0 + (+! s4-1 1) + ) + ) + (let ((s5-2 (new 'stack-no-clear 'wvehicle-physics-work))) + (let* ((v1-19 (-> s5-2 mat)) + (a3-3 (-> this node-list data 0 bone transform)) + (a0-12 (-> a3-3 rvec quad)) + (a1-5 (-> a3-3 uvec quad)) + (a2-4 (-> a3-3 fvec quad)) + (a3-4 (-> a3-3 trans quad)) + ) + (set! (-> v1-19 rvec quad) a0-12) + (set! (-> v1-19 uvec quad) a1-5) + (set! (-> v1-19 fvec quad) a2-4) + (set! (-> v1-19 trans quad) a3-4) + ) + (set! (-> s5-2 force quad) (-> (new 'static 'vector :x 8806.4 :y 5324.8 :z -11878.4 :w 1.0) quad)) + (set! (-> s5-2 velocity quad) (-> (new 'static 'vector :x 8806.4 :y 5324.8 :z -11878.4 :w 1.0) quad)) + (set-vector! (-> s5-2 local-pos) 32768.0 32768.0 0.0 0.0) + (dotimes (s4-2 2) + (let ((v1-26 (-> this wheel (+ s4-2 2)))) + (let ((a0-20 (-> v1-26 info))) + (set! (-> s5-2 ground-pos y) (+ -2048.0 (-> a0-20 susp-arm-length))) + (set! (-> s5-2 tmp quad) (-> (the-as (pointer uint128) (+ (+ (* s4-2 16) 64) (the-as int s5-2))))) + (set! (-> s5-2 steering-axis quad) (-> a0-20 local-pos quad)) + ) + (+! (-> s5-2 steering-axis x) (* (-> s5-2 ground-pos y) (-> v1-26 cos-susp-ang))) + (+! (-> s5-2 steering-axis y) (* (-> s5-2 ground-pos y) (-> v1-26 sin-susp-ang))) + (set! (-> s5-2 p-body quad) (-> s5-2 steering-axis quad)) + (set! (-> s5-2 p-body x) (* (-> s5-2 p-body x) (-> v1-26 x-scale))) + (set! (-> s5-2 tmp x) (* (-> s5-2 tmp x) (-> v1-26 x-scale))) + ) + (vector-! (-> s5-2 axis) (-> s5-2 p-body) (-> s5-2 tmp)) + (set! (-> s5-2 ground-pos x) (vector-length (-> s5-2 axis))) + (set! (-> s5-2 ground-pos z) (- (-> s5-2 local-pos data s4-2) (atan (-> s5-2 axis x) (-> s5-2 axis y)))) + (let ((v1-34 (-> this jmod-shock-tops s4-2))) + (quaternion-axis-angle! (-> v1-34 rotation) 0.0 0.0 1.0 (-> s5-2 ground-pos z)) + ) + 0 + (let ((v1-38 (-> this jmod-shock-bots s4-2))) + (set! (-> v1-38 transform trans y) (* -1.0 (+ -3686.4 (-> s5-2 ground-pos x)))) + ) + 0 + 0 + ) + ) + 0 + (none) + ) + +;; definition for method 37 of type v-toad +;; WARN: Return type mismatch (function v-toad vehicle-wheel-state vehicle-wheel-info none) vs none. +(defmethod rigid-body-object-method-37 ((this v-toad)) + (let ((t9-0 (method-of-type wcar-base rigid-body-object-method-37))) + (t9-0 this) + ) + (set! (-> this info physics-model front-wheel callback) (method-of-object this v-toad-method-203)) + (none) + ) + +;; definition for method 35 of type v-toad +;; WARN: Return type mismatch int vs none. +(defmethod init-rbody-control! ((this v-toad)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-toad" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! this *v-toad-constants*) + (set! (-> this rider-hand-joint-array 0) 14) + (set! (-> this shoot-delay) (the-as uint 300)) + ((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 6) (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 7) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + this + (the-as uint 10) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-shock-tops 1) this (the-as uint 12) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-set-local init) + (the-as joint-mod-set-local (-> this jmod-shock-bots)) + this + (the-as uint 11) + (joint-mod-base-flags attached trans) + ) + (init (-> this jmod-shock-bots 1) this (the-as uint 13) (joint-mod-base-flags attached trans)) + (spawn-wheels! + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-toad-wheel" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-toad-wheel-blur" (the-as (pointer level) #f))) + (the-as skeleton-group #f) + (the-as skeleton-group #f) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-turtle_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-turtle_REF.gc new file mode 100644 index 0000000000..4fc6c471fd --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-turtle_REF.gc @@ -0,0 +1,292 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type v-turtle +(deftype v-turtle (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) + (ant-tip-vel vector :inline) + (spring-pos vector :inline) + (spring-vel vector :inline) + ) + ) + +;; definition for method 3 of type v-turtle +(defmethod inspect ((this v-turtle)) + (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)) + (format #t "~2Tant-tip-vel: #~%" (-> this ant-tip-vel)) + (format #t "~2Tspring-pos: #~%" (-> this spring-pos)) + (format #t "~2Tspring-vel: #~%" (-> this spring-vel)) + (label cfg-4) + this + ) + +;; definition for method 34 of type v-turtle +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this v-turtle)) + (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! (-> 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 ((v1-22 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-22 prim-core action) (collide-action solid rideable)) + (set! (-> v1-22 transform-index) 3) + (set-vector! (-> v1-22 local-sphere) 0.0 0.0 0.0 16384.0) + ) + (set! (-> s5-0 nav-radius) 20480.0) + (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! (-> s5-0 nav-flags) (nav-flags has-child-spheres)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 62 of type v-turtle +(defmethod vehicle-method-62 ((this v-turtle)) + (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 7782.4 :y 1638.4 :z 7987.2 :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 -7782.4 :y 1638.4 :z 7987.2 :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 7372.8 :y 4096.0 :z -8601.6 :w 3686.4)) + 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 -8601.6 :w 3686.4)) + 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 4096.0 :w 6144.0)) + 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 5324.8 :z -6553.6 :w 6144.0)) + 16 + ) + ) + ((method-of-type wcar-base vehicle-method-62) this) + (none) + ) + +;; definition for method 79 of type v-turtle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-79 ((this v-turtle)) + (local-vars (v1-33 float) (v1-47 float) (v1-52 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set-vector! (-> this root scale) 1.0 1.0 1.07 1.0) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'quaternion 2))) + (set-vector! (-> s5-0 2) -3640.889 3640.889 3640.889 -3640.889) + (dotimes (s4-0 (-> this info physics-model wheel-count)) + (let ((v1-6 (-> this wheel s4-0))) + (-> v1-6 info) + (let ((s3-0 (-> this jmod-axles s4-0))) + (quaternion-set! + (-> s5-0 0) + 0.0 + 0.0 + (* (-> v1-6 sin-susp-ang) (-> v1-6 x-scale)) + (+ 1.0 (-> v1-6 cos-susp-ang)) + ) + (quaternion-normalize! (-> s5-0 0)) + (quaternion-axis-angle! (-> s5-0 1) 0.0 1.0 0.0 (-> (&-> s5-0 0 data s4-0) 8)) + (quaternion*! (-> s3-0 rotation) (-> s5-0 0) (-> s5-0 1)) + ) + ) + 0 + ) + ) + (let ((s5-1 (new 'stack-no-clear 'wvehicle-physics-work))) + (set! (-> s5-1 mat trans x) (seconds-per-frame)) + (vector-matrix*! (-> s5-1 mat uvec) (new 'static 'vector :y 20480.0 :z -8192.0 :w 1.0) (-> this rbody matrix)) + (rigid-body-control-method-23 (-> this rbody) (-> s5-1 mat uvec) (the-as vector (-> s5-1 mat))) + (vector-! (-> s5-1 mat fvec) (the-as vector (-> s5-1 mat)) (-> this ant-tip-vel)) + (set! (-> this ant-tip-vel quad) (-> s5-1 mat rvec quad)) + (vector-float*! (-> s5-1 mat fvec) (-> s5-1 mat fvec) (/ 1.0 (-> s5-1 mat trans x))) + (vector+float*! + (-> this spring-vel) + (-> this spring-vel) + (-> s5-1 mat fvec) + (* -0.00024414062 (-> s5-1 mat trans x)) + ) + (set! (-> s5-1 mat trans y) 500.0) + (set! (-> s5-1 mat trans z) 5.0) + (vector+float*! + (-> this spring-vel) + (-> this spring-vel) + (-> this spring-pos) + (* -1.0 (-> s5-1 mat trans x) (-> s5-1 mat trans y)) + ) + (vector-float*! + (-> this spring-vel) + (-> this spring-vel) + (fmax 0.0 (+ 1.0 (* -1.0 (-> s5-1 mat trans z) (-> s5-1 mat trans x)))) + ) + (vector+float*! (-> this spring-pos) (-> this spring-pos) (-> this spring-vel) (-> s5-1 mat trans 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-33 vf1) + (let ((f0-27 v1-33)) + (when (< 1.0 f0-27) + (vector-float*! (-> this spring-pos) (-> this spring-pos) (/ 1.0 (sqrtf f0-27))) + (vector-reset! (-> this spring-vel)) + ) + ) + (let ((s5-2 (new 'stack-no-clear 'wvehicle-jmod-work))) + (quaternion-conjugate! (-> s5-2 quat1) (-> this root quat)) + (quaternion->matrix (-> s5-2 mat0) (-> s5-2 quat1)) + (set! (-> s5-2 float0) 8192.0) + (set! (-> s5-2 float2) (sin (* 0.5 (-> s5-2 float0)))) + (set! (-> s5-2 float1) (cos (* 0.5 (-> s5-2 float0)))) + (vector-rotate90-around-y! (-> s5-2 vec0) (-> this spring-pos)) + (vector-float*! (-> s5-2 vec0) (-> s5-2 vec0) (* -1.0 (-> s5-2 float2))) + (vector-rotate*! (-> s5-2 vec0) (-> s5-2 vec0) (-> s5-2 mat0)) + (set! (-> s5-2 quat0 x) (-> s5-2 vec0 x)) + (set! (-> s5-2 quat0 y) (-> s5-2 vec0 y)) + (set! (-> s5-2 quat0 z) (-> s5-2 vec0 z)) + (let ((f0-42 1.0)) + (.lvf vf1 (&-> (-> s5-2 vec0) 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-47 vf1) + (set! (-> s5-2 quat0 w) (sqrtf (- f0-42 v1-47))) + ) + (quaternion-copy! (-> this jmod-antenna 0 rotation) (-> s5-2 quat0)) + (vector-float*! (-> s5-2 vec0) (-> s5-2 vec0) 1.0) + (set! (-> s5-2 quat0 x) (-> s5-2 vec0 x)) + (set! (-> s5-2 quat0 y) (-> s5-2 vec0 y)) + (set! (-> s5-2 quat0 z) (-> s5-2 vec0 z)) + (let ((f0-49 1.0)) + (.lvf vf1 (&-> (-> s5-2 vec0) 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-52 vf1) + (set! (-> s5-2 quat0 w) (sqrtf (- f0-49 v1-52))) + ) + (quaternion-copy! (-> this jmod-antenna 1 rotation) (-> s5-2 quat0)) + (quaternion-copy! (-> this jmod-antenna 2 rotation) (-> s5-2 quat0)) + (quaternion-copy! (-> this jmod-antenna 3 rotation) (-> s5-2 quat0)) + ) + 0 + (none) + ) + ) + +;; definition for method 35 of type v-turtle +;; WARN: Return type mismatch int vs none. +(defmethod init-rbody-control! ((this v-turtle)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-turtle" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (alloc-rbody-control! this *v-turtle-constants*) + (set! (-> this rider-hand-joint-array 0) 8) + ((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 6) (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 7) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-antenna)) + this + (the-as uint 9) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-antenna 1) this (the-as uint 10) (joint-mod-base-flags attached)) + (init (-> this jmod-antenna 2) this (the-as uint 11) (joint-mod-base-flags attached)) + (init (-> this jmod-antenna 3) this (the-as uint 12) (joint-mod-base-flags attached)) + (vector-reset! (-> this ant-tip-vel)) + (vector-reset! (-> this spring-pos)) + (vector-reset! (-> this spring-vel)) + (spawn-wheels! + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-turtle-wheel" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-turtle-wheel-blur" (the-as (pointer level) #f))) + (the-as skeleton-group #f) + (the-as skeleton-group #f) + ) + 0 + (none) + ) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-x-ride_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-x-ride_REF.gc new file mode 100644 index 0000000000..7abf851bae --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar-x-ride_REF.gc @@ -0,0 +1,137 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type v-x-ride +(deftype v-x-ride (wcar-snake-base) + () + ) + +;; definition for method 3 of type v-x-ride +(defmethod inspect ((this v-x-ride)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type wcar-snake-base inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 62 of type v-x-ride +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-62 ((this v-x-ride)) + (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 3317.76 :z 9011.2 :w 4915.2)) + 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 -14336.0 :w 6144.0)) + 16 + ) + (set! (-> (the-as collide-shape-prim-group s5-0) child 7 local-sphere w) 20889.6) + ) + ((method-of-type wcar-base vehicle-method-62) this) + 0 + (none) + ) + +;; definition for method 35 of type v-x-ride +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-rbody-control! ((this v-x-ride)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-x-ride" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (setup-masks (-> this draw) 0 -1) + (setup-masks (-> this draw) 1 0) + (setup-masks (-> this draw) 4 0) + (alloc-rbody-control! this *v-x-ride-constants*) + (set! (-> this shoot-delay) (the-as uint 18)) + (set! (-> this local-gun-pos 0 quad) (-> (new 'static 'vector :x 2048.0 :y 3686.4 :z 14336.0 :w 1.0) quad)) + (set! (-> this local-gun-pos 1 quad) (-> (new 'static 'vector :x -2048.0 :y 3686.4 :z 14336.0 :w 1.0) quad)) + (set! (-> this rider-hand-joint-array 0) 8) + ((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 6) (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 7) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-rotate-local init) + (the-as joint-mod-rotate-local (-> this jmod-shock-tops)) + this + (the-as uint 11) + (joint-mod-base-flags attached) + ) + (init (-> this jmod-shock-tops 1) this (the-as uint 15) (joint-mod-base-flags attached)) + (init (-> this jmod-shock-tops 2) this (the-as uint 9) (joint-mod-base-flags attached)) + (init (-> this jmod-shock-tops 3) this (the-as uint 13) (joint-mod-base-flags attached)) + ((method-of-type joint-mod-set-local init) + (the-as joint-mod-set-local (-> this jmod-shock-mids)) + this + (the-as uint 12) + (joint-mod-base-flags attached trans) + ) + (init (-> this jmod-shock-mids 1) this (the-as uint 16) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-mids 2) this (the-as uint 10) (joint-mod-base-flags attached trans)) + (init (-> this jmod-shock-mids 3) this (the-as uint 14) (joint-mod-base-flags attached trans)) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this jmod-guns)) + this + (the-as uint 17) + (joint-mod-base-flags attached trans) + ) + ((method-of-type joint-mod-add-local init) + (the-as joint-mod-add-local (-> this jmod-guns 1)) + this + (the-as uint 18) + (joint-mod-base-flags attached trans) + ) + (spawn-wheels! + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-fox-wheel" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-fox-wheel-blur" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-snake-wheel" (the-as (pointer level) #f))) + (the-as skeleton-group (art-group-get-by-name *level* "skel-v-snake-wheel-blur" (the-as (pointer level) #f))) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar_REF.gc new file mode 100644 index 0000000000..2c8312217a --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wcar_REF.gc @@ -0,0 +1,4324 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *v-turtle-constants*, type rigid-body-vehicle-constants +(define *v-turtle-constants* + (new 'static 'rigid-body-vehicle-constants + :info (new 'static 'rigid-body-info + :mass 3.0 + :inv-mass 0.33333334 + :linear-damping 1.0 + :angular-damping 1.0 + :bounce-factor 0.4 + :friction-factor 0.5 + :cm-offset-joint (new 'static 'vector :y 819.2 :z -409.6 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 3.5) (meters 2.5) (meters 5.5)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 40) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*v-turtle-constants* + :flags #x387318 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 v-turtle) + :engine (new 'static 'vehicle-engine-info + :max-torque 83886080.0 + :inertia 8192.0 + :drag 0.2 + :idle-rpm 900.0 + :clutch-min-rpm 2000.0 + :clutch-max-rpm 4000.0 + :min-rpm 700.0 + :max-rpm 6000.0 + :peak-torque-rpm 3200.0 + :powerband-width-rpm 4000.0 + ) + :transmission (new 'static 'vehicle-transmission-info + :inertia 4096.0 + :upshift-rpm 4500.0 + :downshift-rpm 2500.0 + :final-drive-ratio 9.0 + :gear-ratio-array (new 'static 'array float 8 -3.375 3.375 2.25 1.5 1.0 0.0 0.0 0.0) + :gear-count 5 + ) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 10.0 + :engine-intake-factor 1.0 + :brake-factor 5033165000.0 + :turbo-boost-factor 0.7 + :turbo-boost-duration (seconds 3.5) + :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 3) + :cos-ground-effect-angle 0.42261827 + :spring-lift-factor 1.0 + :air-drag-factor 1.0 + :steering-fin-angle 1820.4445 + :steering-thruster-factor 1.0 + :steering-thruster-max-gain 1.0 + :steering-thruster-half-gain-speed (meters 30) + :tire-steering-angle 4551.1113 + :tire-steering-speed-factor 34816.0 + :tire-steering-speed-bias 40960.0 + :ackermann-factor 0.3 + :tire-friction-factor 1.0 + :tire-static-friction 1.516 + :tire-static-friction-speed (meters 2) + :tire-dynamic-friction 0.98539996 + :tire-dynamic-friction-speed (meters 4) + :tire-inv-max-friction-speed 0.000024414063 + :airfoil-factor 1.0 + :drag-force-factor 0.35 + :rolling-resistance 0.08 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 1.0 + :pitch-control-factor 1.0 + :roll-control-factor 1.0 + :jump-thrust-factor 1.5 + :buoyancy-factor 0.03 + :water-drag-factor 0.25 + :player-weight 122880.0 + :air-roll-torque 40960.0 + :air-pitch-torque 81920.0 + :air-angular-damping 0.97 + :hop-turn-torque 225280.0 + :ground-torque-scale 0.45 + :ai-steering-factor 4.0 + :ai-throttle-factor 0.5 + ) + :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 9011.2 :z -4915.2 :w 1.0) + (new 'static 'vector :x -20480.0 :y 12288.0 :w 1.0) + (new 'static 'vector :x 20480.0 :y 12288.0 :w 1.0) + (new 'static 'vector :y 12288.0 :z 20480.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.5 + :engine-pitch-mod-amp 0.05 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "turt-scrape") + :glance-sound (static-sound-name "turt-glance") + :impact-sound (static-sound-name "turt-crash") + :explode-sound (static-sound-name "car-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "turt-flutter") + :water-sound (static-sound-name "turt-water") + :jump-sound (static-sound-name "turt-hop") + :turbo-sound (static-sound-name "turt-boost") + :bank-replace '((wasall1 wasturt)) + :idle-rpm 900.0 + :idle-pitch-scale 0.5 + :idle-crossover-rpm 1000.0 + :engine-rpm 3000.0 + :engine-crossover-rpm 4000.0 + :start-sound (static-sound-name "turt-start") + :stop-sound (static-sound-name "turt-stop") + :idle-sound (static-sound-name "turt-idle") + :engine-sound (static-sound-name "turt-steady") + :susp-creak-sound (static-sound-name "turt-bounce") + :susp-bottom-out-sound (static-sound-name "turt-bottom") + :susp-speed-threshold 81920.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "turt-road") + :speed 40960.0 + :min-speed 20480.0 + :max-speed 61440.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "turt-dirt") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "turt-sand") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "turt-knobby") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 40960.0 + :pitch-scale 0.125 + :min-pitch -0.2 + :max-pitch 0.2 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "turt-skid-road") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "turt-skid-dirt") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :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-flame-length (meters 2) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 5120.0 :y 3276.8 :z -12697.6 :w 1.0) + (new 'static 'vector :x -5120.0 :y 3276.8 :z -12697.6 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 5242.88 :y 3399.68 :z -12288.0 :w 1.0) + (new 'static 'vector :x -5242.88 :y 3399.68 :z -12288.0 :w 1.0) + ) + :exhaust-local-dir (new 'static 'inline-array vector 2 + (new 'static 'vector :x 0.4 :y 0.1 :z -1.0 :w 1.0) + (new 'static 'vector :x -0.4 :y 0.1 :z -1.0 :w 1.0) + ) + :smoke-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1024.0 :y 5120.0 :z -10240.0 :w 1.0) + (new 'static 'vector :x -1024.0 :y 5120.0 :z -10240.0 :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 1843.2 :y 2867.2 :z 8601.6 :w 1.0) + (new 'static 'vector :x -1843.2 :y 2867.2 :z 8601.6 :w 1.0) + (new 'static 'vector) + ) + :taillight-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 2457.6 :y 6758.4 :z -11264.0 :w 1.0) + (new 'static 'vector :x -2457.6 :y 6758.4 :z -11264.0 :w 1.0) + ) + ) + :damage (new 'static 'vehicle-damage-info + :inv-toughness-factor 0.8333333 + :hit-points 29.997 + :inv-hit-points 0.033336665 + :hit-threshold 8192.0 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 0.3333 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :inv-lift-thruster-count 1.0 + :engine-thrust-local-pos (new 'static 'vector :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 :x 4300.8 :y -491.52 :z 9420.8 :w 1.0) + :flags (vehicle-wheel-flag vwf1 vwf4) + :inertia 4300800.0 + :radius 2334.72 + :susp-arm-length 2867.2 + :steer-arm-length 1638.4 + :scale 1.4 + :travel 2867.2 + :probe-y-offset -2048.0 + :width 2867.2 + :suspension-spring 0.6 + :suspension-damping 0.4 + :forward-grip 1.0 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.79 + :probe-radius 2048.0 + :tread-texture "tread-turtle" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :x 3891.2 :y 409.6 :z -10035.199 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf2) + :inertia 4915200.0 + :radius 2334.72 + :susp-arm-length 3481.6 + :steer-arm-length 2048.0 + :scale 1.6 + :travel 3440.6401 + :probe-y-offset -1474.56 + :width 2867.2 + :suspension-spring 0.7 + :suspension-damping 0.4 + :forward-grip 1.15 + :side-grip 1.15 + :max-brake-torque 1.0 + :settle-pos 0.79 + :probe-radius 2457.6 + :tread-texture "tread-turtle" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 4341.76 + :settle-rot-x -546.13336 + :shadow-bot-clip -61440.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 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 1 + :rider-stance #x2 + :grab-rail-array #f + :seat-array (new 'static 'inline-array vehicle-seat-info 4 + (new 'static 'vehicle-seat-info :position (new 'static 'vector :y 2007.04 :z 819.2 :w (the-as float #x10000))) + (new 'static 'vehicle-seat-info) + (new 'static 'vehicle-seat-info) + (new 'static 'vehicle-seat-info) + ) + :rider-hand-offset (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1228.8 :y 614.4 :z -368.64 :w 1.0) + (new 'static 'vector :x -1228.8 :y 614.4 :z -368.64 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xda + :debris #f + :name-text (text-id progress-inventory-v-turtle) + ) + ) + +;; definition for symbol *v-snake-constants*, type rigid-body-vehicle-constants +(define *v-snake-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.4 + :friction-factor 0.5 + :cm-offset-joint (new 'static 'vector :y 409.6 :z -2048.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 5) (meters 2.5) (meters 6.5)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 40) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*v-snake-constants* + :flags #x387318 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 v-snake) + :engine (new 'static 'vehicle-engine-info + :max-torque 167772160.0 + :inertia 16384.0 + :drag 0.2 + :idle-rpm 900.0 + :clutch-min-rpm 2000.0 + :clutch-max-rpm 5500.0 + :min-rpm 600.0 + :max-rpm 7500.0 + :peak-torque-rpm 3800.0 + :powerband-width-rpm 4100.0 + ) + :transmission (new 'static 'vehicle-transmission-info + :inertia 8192.0 + :upshift-rpm 5500.0 + :downshift-rpm 3200.0 + :final-drive-ratio 14.0 + :gear-ratio-array (new 'static 'array float 8 -2.25 3.375 2.25 1.5 1.0 0.0 0.0 0.0) + :gear-count 5 + ) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 10.0 + :engine-intake-factor 1.0 + :brake-factor 3355443200.0 + :turbo-boost-factor 0.75 + :turbo-boost-duration (seconds 2) + :max-xz-speed (meters 30) + :player-turn-anim-bias 0.5 + :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 1.0 + :air-drag-factor 1.0 + :steering-fin-angle 1820.4445 + :steering-thruster-factor 1.0 + :steering-thruster-max-gain 1.0 + :steering-thruster-half-gain-speed (meters 30) + :tire-steering-angle 4369.067 + :tire-steering-speed-factor 38912.0 + :tire-steering-speed-bias 36864.0 + :ackermann-factor 0.45 + :tire-friction-factor 1.0 + :tire-static-friction 2.178 + :tire-static-friction-speed (meters 2) + :tire-dynamic-friction 1.4157 + :tire-dynamic-friction-speed (meters 4) + :tire-inv-max-friction-speed 0.000024414063 + :airfoil-factor 1.0 + :drag-force-factor 0.35 + :rolling-resistance 0.08 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 1.0 + :pitch-control-factor 1.0 + :roll-control-factor 1.0 + :jump-thrust-factor 1.0 + :buoyancy-factor 0.03 + :water-drag-factor 0.25 + :player-weight 122880.0 + :air-roll-torque 81920.0 + :air-pitch-torque 163840.0 + :air-angular-damping 0.98 + :hop-turn-torque 737280.0 + :ground-torque-scale 0.55 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :turning-accel (meters 20) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 4.5) + :string-max-height (meters 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 :x -2048.0 :y 6144.0 :w 1.0) + (new 'static 'vector :x -20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :x 20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :y 19251.2 :z 20480.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.5 + :engine-pitch-mod-amp 0.05 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "snake-scrape") + :glance-sound (static-sound-name "snake-glance") + :impact-sound (static-sound-name "snake-crash") + :explode-sound (static-sound-name "car-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "snake-flutter") + :water-sound (static-sound-name "snake-water") + :jump-sound (static-sound-name "snake-hop") + :turbo-sound (static-sound-name "snake-boost") + :bank-replace '((wasall1 wassnake)) + :idle-rpm 1300.0 + :idle-pitch-scale 0.5 + :idle-crossover-rpm 1000.0 + :engine-rpm 4700.0 + :engine-crossover-rpm 2500.0 + :start-sound (static-sound-name "snake-start") + :stop-sound (static-sound-name "snake-stop") + :idle-sound (static-sound-name "snake-idle") + :engine-sound (static-sound-name "snake-steady") + :susp-creak-sound (static-sound-name "snake-bounce") + :susp-bottom-out-sound (static-sound-name "snake-bottom") + :susp-speed-threshold 61440.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-road") + :speed 40960.0 + :min-speed 20480.0 + :max-speed 61440.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-dirt") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-sand") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-knobby") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 40960.0 + :pitch-scale 0.125 + :min-pitch -0.2 + :max-pitch 0.2 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-skid-road") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-skid-dirt") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :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-flame-length (meters 2) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 4505.6 :z -15564.8 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4505.6 :z -15564.8 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 4096.0 :z -15974.4 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4096.0 :z -15974.4 :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 39.996 + :inv-hit-points 0.025002502 + :hit-threshold 8192.0 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 0.3333 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :inv-lift-thruster-count 1.0 + :engine-thrust-local-pos (new 'static 'vector :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 :x 1843.2 :y 901.12 :z 7864.32 :w 1.0) + :flags (vehicle-wheel-flag vwf1 vwf3 vwf4) + :inertia 6144000.0 + :radius 3399.68 + :susp-arm-length 5939.2 + :steer-arm-length 1638.4 + :scale 1.2 + :travel 4055.04 + :probe-y-offset -2580.48 + :width 3276.8 + :suspension-spring 0.6 + :suspension-damping 0.3 + :forward-grip 0.9 + :side-grip 1.0 + :max-brake-torque 1.0 + :camber 546.13336 + :settle-pos 0.78 + :probe-radius 2457.6 + :tread-texture "tread-snake" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :x 1351.68 :y 1638.4 :z -12083.2 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf2 vwf3 vwf5) + :inertia 10240000.0 + :radius 3399.68 + :susp-arm-length 8069.12 + :steer-arm-length 1638.4 + :scale 1.5 + :travel 4300.8 + :probe-y-offset -4710.4 + :width 3276.8 + :suspension-spring 0.5 + :suspension-damping 0.3 + :forward-grip 1.5 + :side-grip 1.0 + :max-brake-torque 1.0 + :camber 1820.4445 + :settle-pos 0.76 + :probe-radius 2867.2 + :tread-texture "tread-snake" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 5324.8 + :settle-rot-x 764.5866 + :shadow-bot-clip -61440.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 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 2 + :rider-stance #x2 + :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 819.2 :z -720.896 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x 2252.8 :y 819.2 :z -720.896 :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 1310.72 :y 409.6 :z -614.4 :w 1.0) + (new 'static 'vector :x -1310.72 :y 409.6 :z -409.6 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xda + :debris #f + :name-text (text-id progress-inventory-v-snake) + ) + ) + +;; definition for symbol *v-scorpion-constants*, type rigid-body-vehicle-constants +(define *v-scorpion-constants* + (new 'static 'rigid-body-vehicle-constants + :info (new 'static 'rigid-body-info + :mass 24.0 + :inv-mass 0.041666668 + :linear-damping 1.0 + :angular-damping 1.0 + :bounce-factor 0.4 + :friction-factor 0.5 + :cm-offset-joint (new 'static 'vector :y -4096.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 8) (meters 4) (meters 8)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 40) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*v-scorpion-constants* + :flags #x387318 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 v-scorpion) + :engine (new 'static 'vehicle-engine-info + :max-torque 335544320.0 + :inertia 65536.0 + :drag 0.4 + :idle-rpm 500.0 + :clutch-min-rpm 800.0 + :clutch-max-rpm 5100.0 + :min-rpm 300.0 + :max-rpm 6500.0 + :peak-torque-rpm 3400.0 + :powerband-width-rpm 4180.0 + ) + :transmission (new 'static 'vehicle-transmission-info + :inertia 16384.0 + :upshift-rpm 5000.0 + :downshift-rpm 1000.0 + :final-drive-ratio 30.0 + :gear-ratio-array (new 'static 'array float 8 -1.35 1.8225001 1.35 1.0 0.0 0.0 0.0 0.0) + :gear-count 4 + ) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 10.0 + :engine-intake-factor 1.0 + :brake-factor 5033165000.0 + :turbo-boost-factor 0.5 + :turbo-boost-duration (seconds 2) + :max-xz-speed (meters 30) + :player-turn-anim-bias 0.2 + :player-turn-anim-min -0.2 + :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 1.0 + :air-drag-factor 1.0 + :steering-fin-angle 1820.4445 + :steering-thruster-factor 1.0 + :steering-thruster-max-gain 1.0 + :steering-thruster-half-gain-speed (meters 30) + :tire-steering-angle 2002.4889 + :tire-steering-speed-factor 40960.0 + :tire-steering-speed-bias 40960.0 + :ackermann-factor 0.8 + :tire-friction-factor 1.0 + :tire-static-friction 1.0 + :tire-static-friction-speed (meters 2) + :tire-dynamic-friction 0.65 + :tire-dynamic-friction-speed (meters 4) + :tire-inv-max-friction-speed 0.000024414063 + :airfoil-factor 1.0 + :drag-force-factor 0.4 + :rolling-resistance 0.16 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 1.0 + :pitch-control-factor 1.0 + :roll-control-factor 3.0 + :jump-thrust-factor 1.5 + :buoyancy-factor 0.03 + :water-drag-factor 0.25 + :player-weight 122880.0 + :air-roll-torque 512000.0 + :air-pitch-torque 1024000.0 + :air-angular-damping 0.98 + :hop-turn-torque 2580480.0 + :ground-torque-scale 0.75 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :turning-accel (meters 20) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 6.5) + :string-max-height (meters 6.5) + :string-min-length (meters 10.049999) + :string-max-length (meters 13.125) + :min-fov 16384.0 + :max-fov 18204.445 + :head-offset 4096.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 :x -2867.2 :y 6144.0 :z 8601.6 :w 1.0) + (new 'static 'vector :x -40960.0 :y 30720.0 :w 1.0) + (new 'static 'vector :x 40960.0 :y 30720.0 :w 1.0) + (new 'static 'vector :y 30720.0 :z 40960.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.5 + :engine-pitch-mod-amp 0.05 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "scorp-scrape") + :glance-sound (static-sound-name "scorp-glance") + :impact-sound (static-sound-name "scorp-crash") + :explode-sound (static-sound-name "car-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "scorp-flutter") + :water-sound (static-sound-name "scorp-water") + :jump-sound (static-sound-name "scorp-hop") + :turbo-sound (static-sound-name "scorp-boost") + :bank-replace '((wasall1 wasscorp)) + :idle-rpm 700.0 + :idle-pitch-scale 0.5 + :idle-crossover-rpm 800.0 + :engine-rpm 2500.0 + :engine-crossover-rpm 2500.0 + :start-sound (static-sound-name "scorp-start") + :stop-sound (static-sound-name "scorp-stop") + :idle-sound (static-sound-name "scorp-idle") + :engine-sound (static-sound-name "scorp-steady") + :susp-creak-sound (static-sound-name "scorp-bounce") + :susp-bottom-out-sound (static-sound-name "scorp-bottom") + :susp-speed-threshold 40960.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "scorp-road") + :speed 40960.0 + :min-speed 20480.0 + :max-speed 61440.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "scorp-dirt") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "scorp-sand") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "scorp-knobby") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 40960.0 + :pitch-scale 0.125 + :min-pitch -0.2 + :max-pitch 0.2 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "scorp-skid-road") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "scorp-skid-dirt") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :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-flame-length (meters 2) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 3686.4 :y 4096.0 :z -7372.8 :w 1.0) + (new 'static 'vector :x -3686.4 :y 4096.0 :z -7372.8 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 3686.4 :y 4915.2 :z -4096.0 :w 1.0) + (new 'static 'vector :x -3686.4 :y 4915.2 :z -4096.0 :w 1.0) + ) + :exhaust-local-dir (new 'static 'inline-array vector 2 (new 'static 'vector :y 1.0 :w 1.0) (new 'static 'vector :y 1.0 :w 1.0)) + :smoke-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 6144.0 :z -1638.4 :w 1.0) + (new 'static 'vector :x -6144.0 :z -1638.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 5939.2 :y -1228.8 :z 18841.6 :w 1.0) + (new 'static 'vector :x -5939.2 :y -1228.8 :z 18841.6 :w 1.0) + (new 'static 'vector) + ) + :taillight-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 7577.6 :y -2048.0 :z -18022.4 :w 1.0) + (new 'static 'vector :x -7577.6 :y -2048.0 :z -18022.4 :w 1.0) + ) + ) + :damage (new 'static 'vehicle-damage-info + :inv-toughness-factor 1.0 + :hit-points 79.992 + :inv-hit-points 0.012501251 + :hit-threshold 8192.0 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 0.3333 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :inv-lift-thruster-count 1.0 + :engine-thrust-local-pos (new 'static 'vector :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 :x 3686.4 :y -4096.0 :z 14336.0 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf4) + :inertia 32768000.0 + :radius 2048.0 + :susp-arm-length 12288.0 + :steer-arm-length 2048.0 + :scale 4.0 + :travel 7864.3203 + :probe-y-offset -4423.68 + :width 2048.0 + :suspension-spring 0.36 + :suspension-damping 0.2 + :forward-grip 1.3 + :side-grip 1.4 + :max-brake-torque 1.0 + :camber 546.13336 + :settle-pos 0.81 + :probe-radius 4096.0 + :tread-texture "tread-scorpion" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :x 3686.4 :y -4096.0 :z -12492.8 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf2 vwf4) + :inertia 32768000.0 + :radius 2048.0 + :susp-arm-length 12288.0 + :steer-arm-length 2048.0 + :scale 4.0 + :travel 7864.3203 + :probe-y-offset -4423.68 + :width 2048.0 + :suspension-spring 0.36 + :suspension-damping 0.2 + :forward-grip 1.3 + :side-grip 1.4 + :max-brake-torque 1.0 + :camber 546.13336 + :settle-pos 0.78 + :probe-radius 4096.0 + :tread-texture "tread-scorpion" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 13598.72 + :settle-rot-x -163.84 + :shadow-bot-clip -61440.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 -2730.6667 + :gun-pitch-max 5461.3335 + :gun-z-offset 11059.2 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 2 + :rider-stance #x2 + :attach-point-count 14 + :grab-rail-array #f + :seat-array (new 'static 'inline-array vehicle-seat-info 4 + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x -3072.0 :y 204.8 :z 12697.6 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x 3072.0 :y 204.8 :z 12697.6 :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 -1638.4 :y 6963.2 :z 13107.2 :w 1.0) + (new 'static 'vector :x -4300.8 :y 6963.2 :z 13107.2 :w 1.0) + ) + :attach-point-array (new 'static 'inline-array vehicle-attach-point 14 + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 2867.2 :z 16384.0 :w 1.0) + :rot (new 'static 'vector :x -3640.889 :y 32768.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -2867.2 :z 16384.0 :w 1.0) + :rot (new 'static 'vector :x -3640.889 :y 32768.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 6144.0 :y 2048.0 :z 14336.0 :w 1.0) + :rot (new 'static 'vector :x -7281.778 :y 32768.0 :z 7281.778 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -6144.0 :y 2048.0 :z 14336.0 :w 1.0) + :rot (new 'static 'vector :x -7281.778 :y 32768.0 :z -7281.778 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 8192.0 :z 4096.0 :w 1.0) + :rot (new 'static 'vector :x -12743.111 :y -16384.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -8192.0 :z 4096.0 :w 1.0) + :rot (new 'static 'vector :x -12743.111 :y 16384.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 7372.8 :z -2048.0 :w 1.0) + :rot (new 'static 'vector :x -12743.111 :y -16384.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -7372.8 :z -2048.0 :w 1.0) + :rot (new 'static 'vector :x -12743.111 :y 16384.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 2867.2 :y 4096.0 :z 2048.0 :w 1.0) + :rot (new 'static 'vector :x -1820.4445 :y -1820.4445 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -2867.2 :y 4096.0 :z 2048.0 :w 1.0) + :rot (new 'static 'vector :x -1820.4445 :y 1820.4445 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 2867.2 :y 2048.0 :z -16384.0 :w 1.0) + :rot (new 'static 'vector :x -12743.111 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -2867.2 :z -15155.2 :w 1.0) + :rot (new 'static 'vector :x -9102.223 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 6144.0 :y 2048.0 :z -14336.0 :w 1.0) + :rot (new 'static 'vector :x -8192.0 :z -7281.778 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -6144.0 :y 2048.0 :z -14336.0 :w 1.0) + :rot (new 'static 'vector :x -8192.0 :z 7281.778 :w 1.0) + ) + ) + ) + :explosion #f + :explosion-part #xda + :debris #f + :name-text (text-id progress-inventory-v-scorpion) + ) + ) + +;; definition for symbol *v-toad-constants*, type rigid-body-vehicle-constants +(define *v-toad-constants* + (new 'static 'rigid-body-vehicle-constants + :info (new 'static 'rigid-body-info + :mass 16.0 + :inv-mass 0.0625 + :linear-damping 1.0 + :angular-damping 1.0 + :bounce-factor 0.4 + :friction-factor 0.5 + :cm-offset-joint (new 'static 'vector :y 819.2 :z 2048.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 6) (meters 4) (meters 10)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 40) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*v-toad-constants* + :flags #x386318 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 v-toad) + :engine (new 'static 'vehicle-engine-info + :max-torque 117440510.0 + :inertia 8192.0 + :drag 0.4 + :idle-rpm 500.0 + :clutch-min-rpm 800.0 + :clutch-max-rpm 5100.0 + :min-rpm 300.0 + :max-rpm 6500.0 + :peak-torque-rpm 3400.0 + :powerband-width-rpm 4180.0 + ) + :transmission (new 'static 'vehicle-transmission-info + :inertia 4096.0 + :upshift-rpm 5000.0 + :downshift-rpm 2000.0 + :final-drive-ratio 20.0 + :gear-ratio-array (new 'static 'array float 8 -1.8225001 2.4603753 1.8225001 1.35 1.0 0.0 0.0 0.0) + :gear-count 5 + ) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 60.0 + :engine-intake-factor 1.0 + :brake-factor 3355443200.0 + :turbo-boost-factor 0.8 + :turbo-boost-duration (seconds 2) + :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 3) + :cos-ground-effect-angle 0.42261827 + :spring-lift-factor 1.0 + :air-drag-factor 1.0 + :steering-fin-angle 1820.4445 + :steering-thruster-factor 1.0 + :steering-thruster-max-gain 1.0 + :steering-thruster-half-gain-speed (meters 30) + :tire-steering-angle 4551.1113 + :tire-steering-speed-factor 45056.0 + :tire-steering-speed-bias 36864.0 + :ackermann-factor 0.45 + :tire-friction-factor 1.0 + :tire-static-friction 1.694 + :tire-static-friction-speed (meters 2) + :tire-dynamic-friction 1.1011 + :tire-dynamic-friction-speed (meters 4) + :tire-inv-max-friction-speed 0.000024414063 + :airfoil-factor 1.0 + :drag-force-factor 0.3 + :rolling-resistance 0.08 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 1.0 + :pitch-control-factor 1.0 + :roll-control-factor 2.0 + :jump-thrust-factor 2.4 + :buoyancy-factor 0.03 + :water-drag-factor 0.25 + :player-weight 122880.0 + :air-roll-torque 151552.0 + :air-pitch-torque 307200.0 + :air-angular-damping 0.98 + :hop-turn-torque 614400.0 + :ground-torque-scale 0.4 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :turning-accel (meters 20) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 3) + :string-max-height (meters 4.5) + :string-min-length (meters 6) + :string-max-length (meters 9) + :min-fov 16384.0 + :max-fov 18204.445 + :head-offset 4096.0 + :foot-offset -4096.0 + :normal-max-angle-offset 21845.334 + :air-max-angle-offset 5461.3335 + :max-lookaround-speed 40960.0 + :look-pos-array (new 'static 'inline-array vector 4 + (new 'static 'vector :x -2048.0 :y 10649.6 :z -4915.2 :w 1.0) + (new 'static 'vector :x -40960.0 :y 19251.2 :w 1.0) + (new 'static 'vector :x 40960.0 :y 19251.2 :w 1.0) + (new 'static 'vector :y 19251.2 :z 40960.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.5 + :engine-pitch-mod-amp 0.05 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "toad-scrape") + :glance-sound (static-sound-name "toad-glance") + :impact-sound (static-sound-name "toad-crash") + :explode-sound (static-sound-name "car-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "toad-flutter") + :water-sound (static-sound-name "toad-water") + :jump-sound (static-sound-name "toad-hop") + :turbo-sound (static-sound-name "toad-boost") + :bank-replace '((wasall1 wastoad)) + :idle-rpm 900.0 + :idle-pitch-scale 0.5 + :idle-crossover-rpm 700.0 + :engine-rpm 5300.0 + :engine-crossover-rpm 2500.0 + :start-sound (static-sound-name "toad-start") + :stop-sound (static-sound-name "toad-stop") + :idle-sound (static-sound-name "toad-idle") + :engine-sound (static-sound-name "toad-steady") + :susp-creak-sound (static-sound-name "toad-bounce") + :susp-bottom-out-sound (static-sound-name "toad-bottom") + :susp-speed-threshold 40960.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "toad-road") + :speed 40960.0 + :min-speed 20480.0 + :max-speed 61440.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "toad-dirt") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "toad-sand") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "toad-knobby") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 40960.0 + :pitch-scale 0.125 + :min-pitch -0.2 + :max-pitch 0.2 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "toad-skid-road") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "toad-skid-dirt") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + ) + ) + :particles (new 'static 'vehicle-particle-info + :taillight-count 2 + :thruster-flame-width (meters 1) + :thruster-flame-length (meters 6) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :y 5447.68 :z -14336.0 :w 1.0) + (new 'static 'vector :y 5447.68 :z -14336.0 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 2457.6 :y -1228.8 :z -5324.8 :w 1.0) + (new 'static 'vector :x -2457.6 :y -1228.8 :z -5324.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 3072.0 :z -1638.4 :w 1.0) + (new 'static 'vector :x -3072.0 :z -1638.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) + ) + :taillight-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 2457.6 :y 9830.4 :z -8192.0 :w 1.0) + (new 'static 'vector :x -2457.6 :y 9830.4 :z -8192.0 :w 1.0) + ) + ) + :damage (new 'static 'vehicle-damage-info + :inv-toughness-factor 0.6666667 + :hit-points 49.995 + :inv-hit-points 0.020002 + :hit-threshold 8192.0 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 0.3333 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :inv-lift-thruster-count 1.0 + :engine-thrust-local-pos (new 'static 'vector :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 :y -3686.4 :z 19456.0 :w 1.0) + :flags (vehicle-wheel-flag vwf1 vwf4) + :inertia 2048000.0 + :radius 4915.2 + :susp-arm-length 12288.0 + :steer-arm-length 2048.0 + :scale 1.0 + :travel 12288.0 + :width 4096.0 + :suspension-spring 0.3 + :suspension-damping 0.051 + :forward-grip 1.0 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.606 + :probe-radius 4096.0 + :tread-texture "tread-toad" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :x 2048.0 :y 819.2 :z -12083.2 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf2 vwf3 vwf5) + :inertia 10240000.0 + :radius 4915.2 + :susp-arm-length 13516.8 + :scale 1.5 + :travel 8601.6 + :probe-y-offset -3686.4001 + :width 2867.2 + :suspension-spring 0.65 + :suspension-damping 0.1 + :forward-grip 1.5 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.8 + :probe-radius 4096.0 + :tread-texture "tread-toad" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 9338.88 + :settle-rot-x 91.022224 + :shadow-bot-clip -61440.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 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 1 + :rider-stance #x2 + :grab-rail-array #f + :seat-array (new 'static 'inline-array vehicle-seat-info 4 + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x -2457.6 :y 3276.8 :z -1228.8 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info) + (new 'static 'vehicle-seat-info) + (new 'static 'vehicle-seat-info) + ) + :rider-hand-offset (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1228.8 :y 942.08 :z -860.16 :w 1.0) + (new 'static 'vector :x -1433.6 :y 942.08 :z -860.16 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xda + :debris #f + :name-text (text-id progress-inventory-v-toad) + ) + ) + +;; definition for symbol *v-fox-constants*, type rigid-body-vehicle-constants +(define *v-fox-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.4 + :friction-factor 0.5 + :cm-offset-joint (new 'static 'vector :y 409.6 :z -2048.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 4) (meters 3) (meters 6.5)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 40) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*v-fox-constants* + :flags #x387318 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 v-fox) + :engine (new 'static 'vehicle-engine-info + :max-torque 218103800.0 + :inertia 16384.0 + :drag 0.2 + :idle-rpm 900.0 + :clutch-min-rpm 2000.0 + :clutch-max-rpm 5500.0 + :min-rpm 600.0 + :max-rpm 7500.0 + :peak-torque-rpm 3800.0 + :powerband-width-rpm 4100.0 + ) + :transmission (new 'static 'vehicle-transmission-info + :inertia 8192.0 + :upshift-rpm 5500.0 + :downshift-rpm 3200.0 + :final-drive-ratio 11.0 + :gear-ratio-array (new 'static 'array float 8 -2.25 3.375 2.25 1.5 1.0 0.0 0.0 0.0) + :gear-count 5 + ) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 10.0 + :engine-intake-factor 1.0 + :brake-factor 3355443200.0 + :turbo-boost-factor 0.9 + :turbo-boost-duration (seconds 2) + :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 3) + :cos-ground-effect-angle 0.42261827 + :spring-lift-factor 1.0 + :air-drag-factor 1.0 + :steering-fin-angle 1820.4445 + :steering-thruster-factor 1.0 + :steering-thruster-max-gain 1.0 + :steering-thruster-half-gain-speed (meters 30) + :tire-steering-angle 4369.067 + :tire-steering-speed-factor 38379.52 + :tire-steering-speed-bias 20480.0 + :ackermann-factor 0.45 + :tire-friction-factor 1.0 + :tire-static-friction 1.3310001 + :tire-static-friction-speed (meters 2) + :tire-dynamic-friction 0.86515 + :tire-dynamic-friction-speed (meters 4) + :tire-inv-max-friction-speed 0.000024414063 + :airfoil-factor 1.0 + :drag-force-factor 0.32 + :rolling-resistance 0.08 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 1.0 + :pitch-control-factor 1.0 + :roll-control-factor 1.0 + :jump-thrust-factor 1.5 + :buoyancy-factor 0.03 + :water-drag-factor 0.25 + :player-weight 122880.0 + :air-roll-torque 81920.0 + :air-pitch-torque 163840.0 + :air-angular-damping 0.98 + :hop-turn-torque 491520.0 + :ground-torque-scale 1.0 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :turning-accel (meters 20) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 4.5) + :string-max-height (meters 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 6144.0 :w 1.0) + (new 'static 'vector :x -20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :x 20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :y 19251.2 :z 20480.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.5 + :engine-pitch-mod-amp 0.05 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "snake-scrape") + :glance-sound (static-sound-name "snake-glance") + :impact-sound (static-sound-name "snake-crash") + :explode-sound (static-sound-name "car-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "snake-flutter") + :water-sound (static-sound-name "snake-water") + :jump-sound (static-sound-name "snake-hop") + :turbo-sound (static-sound-name "snake-boost") + :bank-replace '((wasall1 wassnake)) + :idle-rpm 1300.0 + :idle-pitch-scale 0.5 + :idle-crossover-rpm 1000.0 + :engine-rpm 4700.0 + :engine-crossover-rpm 2500.0 + :start-sound (static-sound-name "snake-start") + :stop-sound (static-sound-name "snake-stop") + :idle-sound (static-sound-name "snake-idle") + :engine-sound (static-sound-name "snake-steady") + :susp-creak-sound (static-sound-name "snake-bounce") + :susp-bottom-out-sound (static-sound-name "snake-bottom") + :susp-speed-threshold 61440.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-road") + :speed 40960.0 + :min-speed 20480.0 + :max-speed 61440.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-dirt") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-sand") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-knobby") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 40960.0 + :pitch-scale 0.125 + :min-pitch -0.2 + :max-pitch 0.2 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-skid-road") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-skid-dirt") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + ) + ) + :particles (new 'static 'vehicle-particle-info + :headlight-count 2 + :taillight-count 2 + :thruster-flame-width (meters 1) + :thruster-flame-length (meters 6) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :y 3686.4 :z -15564.8 :w 1.0) + (new 'static 'vector :y 3686.4 :z -15564.8 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 4096.0 :z -15974.4 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4096.0 :z -15974.4 :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 33.329998 + :inv-hit-points 0.030003002 + :hit-threshold 8192.0 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 0.3333 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :inv-lift-thruster-count 1.0 + :engine-thrust-local-pos (new 'static 'vector :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 :x 1843.2 :y 901.12 :z 7864.32 :w 1.0) + :flags (vehicle-wheel-flag vwf1 vwf3 vwf4) + :inertia 6144000.0 + :radius 4915.2 + :susp-arm-length 5939.2 + :steer-arm-length 1638.4 + :scale 0.83199996 + :travel 4055.04 + :probe-y-offset -2580.48 + :width 4096.0 + :suspension-spring 0.6 + :suspension-damping 0.3 + :forward-grip 0.9 + :side-grip 1.0 + :max-brake-torque 1.0 + :camber 546.13336 + :settle-pos 0.78 + :probe-radius 2457.6 + :tread-texture "tread-toad" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :x 1351.68 :y 1638.4 :z -12083.2 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf2 vwf3 vwf5) + :inertia 10240000.0 + :radius 4915.2 + :susp-arm-length 8069.12 + :steer-arm-length 1638.4 + :scale 1.04 + :travel 4300.8 + :probe-y-offset -4710.4 + :width 4096.0 + :suspension-spring 0.5 + :suspension-damping 0.3 + :forward-grip 1.5 + :side-grip 1.0 + :max-brake-torque 1.0 + :camber 1820.4445 + :settle-pos 0.76 + :probe-radius 2867.2 + :tread-texture "tread-toad" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 5324.8 + :settle-rot-x 764.5866 + :shadow-bot-clip -61440.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 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 1 + :rider-stance #x2 + :grab-rail-array #f + :seat-array (new 'static 'inline-array vehicle-seat-info 4 + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :y 1638.4 :z -5324.8 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info) + (new 'static 'vehicle-seat-info) + (new 'static 'vehicle-seat-info) + ) + :rider-hand-offset (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1310.72 :y 409.6 :z -614.4 :w 1.0) + (new 'static 'vector :x -1310.72 :y 409.6 :z -409.6 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xda + :debris #f + :name-text (text-id progress-inventory-v-fox) + ) + ) + +;; definition for symbol *v-rhino-constants*, type rigid-body-vehicle-constants +(define *v-rhino-constants* + (new 'static 'rigid-body-vehicle-constants + :info (new 'static 'rigid-body-info + :mass 30.0 + :inv-mass 0.033333335 + :linear-damping 1.0 + :angular-damping 1.0 + :bounce-factor 0.4 + :friction-factor 0.5 + :cm-offset-joint (new 'static 'vector :y -4096.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 7) (meters 4) (meters 8)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 40) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*v-rhino-constants* + :flags #x387318 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 v-rhino) + :engine (new 'static 'vehicle-engine-info + :max-torque 335544320.0 + :inertia 65536.0 + :drag 0.4 + :idle-rpm 500.0 + :clutch-min-rpm 800.0 + :clutch-max-rpm 5100.0 + :min-rpm 300.0 + :max-rpm 6500.0 + :peak-torque-rpm 3400.0 + :powerband-width-rpm 4180.0 + ) + :transmission (new 'static 'vehicle-transmission-info + :inertia 16384.0 + :upshift-rpm 5000.0 + :downshift-rpm 1000.0 + :final-drive-ratio 28.0 + :gear-ratio-array (new 'static 'array float 8 -1.35 2.4603753 1.8225001 1.35 1.0 0.0 0.0 0.0) + :gear-count 5 + ) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 10.0 + :engine-intake-factor 1.0 + :brake-factor 5033165000.0 + :turbo-boost-factor 4.0 + :turbo-boost-duration (seconds 0.25) + :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 3) + :cos-ground-effect-angle 0.42261827 + :spring-lift-factor 1.0 + :air-drag-factor 1.0 + :steering-fin-angle 1820.4445 + :steering-thruster-factor 1.0 + :steering-thruster-max-gain 1.0 + :steering-thruster-half-gain-speed (meters 30) + :tire-steering-angle 2002.4889 + :tire-steering-speed-factor 51200.0 + :tire-steering-speed-bias 40960.0 + :ackermann-factor 0.8 + :tire-friction-factor 1.0 + :tire-static-friction 0.9 + :tire-static-friction-speed (meters 2) + :tire-dynamic-friction 0.585 + :tire-dynamic-friction-speed (meters 4) + :tire-inv-max-friction-speed 0.000024414063 + :airfoil-factor 1.0 + :drag-force-factor 0.4 + :rolling-resistance 0.16 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 1.0 + :pitch-control-factor 1.0 + :roll-control-factor 3.0 + :jump-thrust-factor 1.5 + :buoyancy-factor 0.03 + :water-drag-factor 0.125 + :player-weight 122880.0 + :air-roll-torque 512000.0 + :air-pitch-torque 1024000.0 + :air-angular-damping 0.98 + :hop-turn-torque 4300800.0 + :ground-torque-scale 0.37 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :turning-accel (meters 20) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 5.655) + :string-max-height (meters 5.655) + :string-min-length (meters 10.049999) + :string-max-length (meters 13.125) + :min-fov 16384.0 + :max-fov 18204.445 + :head-offset 4096.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 :x -4915.2 :y 14336.0 :z -8192.0 :w 1.0) + (new 'static 'vector :x -40960.0 :y 30720.0 :w 1.0) + (new 'static 'vector :x 40960.0 :y 30720.0 :w 1.0) + (new 'static 'vector :y 30720.0 :z 40960.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.5 + :engine-pitch-mod-amp 0.05 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "rhino-scrape") + :glance-sound (static-sound-name "rhino-glance") + :impact-sound (static-sound-name "rhino-crash") + :explode-sound (static-sound-name "car-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "car-by-1") + :water-sound (static-sound-name "rhino-water") + :jump-sound (static-sound-name "rhino-hop") + :turbo-sound (static-sound-name "rhino-boost") + :bank-replace '((wasall1 wasrhino)) + :idle-rpm 500.0 + :idle-pitch-scale 0.5 + :idle-crossover-rpm 800.0 + :engine-rpm 3785.0 + :engine-crossover-rpm 1400.0 + :start-sound (static-sound-name "rhino-start") + :stop-sound (static-sound-name "rhino-stop") + :idle-sound (static-sound-name "rhino-idle") + :engine-sound (static-sound-name "rhino-steady") + :susp-creak-sound (static-sound-name "rhino-bounce") + :susp-bottom-out-sound (static-sound-name "rhino-bottom") + :susp-speed-threshold 40960.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "rhino-road") + :speed 40960.0 + :min-speed 20480.0 + :max-speed 61440.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "rhino-dirt") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "rhino-sand") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "rhino-knobby") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 40960.0 + :pitch-scale 0.125 + :min-pitch -0.2 + :max-pitch 0.2 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "rhino-skid-road") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "rhino-skid-dirt") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + ) + ) + :particles (new 'static 'vehicle-particle-info + :headlight-count 2 + :taillight-count 2 + :thruster-flame-width (meters 1.5) + :thruster-flame-length (meters 5) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 4915.2 :y 2744.32 :z -19660.8 :w 1.0) + (new 'static 'vector :x -4915.2 :y 2744.32 :z -19660.8 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 3686.4 :y 4915.2 :z -4096.0 :w 1.0) + (new 'static 'vector :x -3686.4 :y 4915.2 :z -4096.0 :w 1.0) + ) + :exhaust-local-dir (new 'static 'inline-array vector 2 (new 'static 'vector :y 1.0 :w 1.0) (new 'static 'vector :y 1.0 :w 1.0)) + :smoke-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 6144.0 :z -1638.4 :w 1.0) + (new 'static 'vector :x -6144.0 :z -1638.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 5939.2 :y -1228.8 :z 18841.6 :w 1.0) + (new 'static 'vector :x -5939.2 :y -1228.8 :z 18841.6 :w 1.0) + (new 'static 'vector) + ) + :taillight-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 7577.6 :y -2048.0 :z -18022.4 :w 1.0) + (new 'static 'vector :x -7577.6 :y -2048.0 :z -18022.4 :w 1.0) + ) + ) + :damage (new 'static 'vehicle-damage-info + :inv-toughness-factor 1.0 + :hit-points 79.992 + :inv-hit-points 0.012501251 + :hit-threshold 8192.0 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 0.3333 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :inv-lift-thruster-count 1.0 + :engine-thrust-local-pos (new 'static 'vector :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 :x 7372.8 :y -4096.0 :z 15769.6 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf4) + :inertia 32768000.0 + :radius 2048.0 + :susp-arm-length 7372.8 + :steer-arm-length 2048.0 + :scale 4.0 + :travel 7208.9604 + :probe-y-offset -5079.0396 + :width 1638.4 + :suspension-spring 0.55 + :suspension-damping 0.3 + :forward-grip 1.3 + :side-grip 1.4 + :max-brake-torque 1.0 + :camber 546.13336 + :settle-pos 0.81 + :probe-radius 4505.6 + :tread-texture "tread-interceptor-rhino" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :x 7372.8 :y -4096.0 :z -12902.4 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf2 vwf4) + :inertia 32768000.0 + :radius 2048.0 + :susp-arm-length 8192.0 + :steer-arm-length 2048.0 + :scale 4.0 + :travel 7208.9604 + :probe-y-offset -5079.0396 + :width 1638.4 + :suspension-spring 0.55 + :suspension-damping 0.3 + :forward-grip 1.3 + :side-grip 1.4 + :max-brake-torque 1.0 + :camber 546.13336 + :settle-pos 0.78 + :probe-radius 4505.6 + :tread-texture "tread-interceptor-rhino" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 14663.68 + :settle-rot-x -163.84 + :shadow-bot-clip -61440.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 -21845.334 + :gun-yaw-max 21845.334 + :gun-pitch-min -5461.3335 + :gun-pitch-max 8192.0 + :gun-z-offset 6963.2 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 2 + :rider-stance #x2 + :attach-point-count 14 + :grab-rail-array #f + :seat-array (new 'static 'inline-array vehicle-seat-info 4 + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x -4915.2 :y 4915.2 :z -4096.0 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x 4915.2 :y 4915.2 :z -4096.0 :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 1638.4 :y 614.4 :z -1024.0 :w 1.0) + (new 'static 'vector :x -1638.4 :y 614.4 :z -1024.0 :w 1.0) + ) + :attach-point-array (new 'static 'inline-array vehicle-attach-point 14 + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 2867.2 :z 16384.0 :w 1.0) + :rot (new 'static 'vector :x -3640.889 :y 32768.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -2867.2 :z 16384.0 :w 1.0) + :rot (new 'static 'vector :x -3640.889 :y 32768.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 6144.0 :y 2048.0 :z 14336.0 :w 1.0) + :rot (new 'static 'vector :x -7281.778 :y 32768.0 :z 7281.778 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -6144.0 :y 2048.0 :z 14336.0 :w 1.0) + :rot (new 'static 'vector :x -7281.778 :y 32768.0 :z -7281.778 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 8192.0 :z 4096.0 :w 1.0) + :rot (new 'static 'vector :x -12743.111 :y -16384.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -8192.0 :z 4096.0 :w 1.0) + :rot (new 'static 'vector :x -12743.111 :y 16384.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 7372.8 :z -2048.0 :w 1.0) + :rot (new 'static 'vector :x -12743.111 :y -16384.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -7372.8 :z -2048.0 :w 1.0) + :rot (new 'static 'vector :x -12743.111 :y 16384.0 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 2867.2 :y 4096.0 :z 2048.0 :w 1.0) + :rot (new 'static 'vector :x -1820.4445 :y -1820.4445 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -2867.2 :y 4096.0 :z 2048.0 :w 1.0) + :rot (new 'static 'vector :x -1820.4445 :y 1820.4445 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 2867.2 :y 2048.0 :z -16384.0 :w 1.0) + :rot (new 'static 'vector :x -12743.111 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -2867.2 :z -15155.2 :w 1.0) + :rot (new 'static 'vector :x -9102.223 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x 6144.0 :y 2048.0 :z -14336.0 :w 1.0) + :rot (new 'static 'vector :x -8192.0 :z -7281.778 :w 1.0) + ) + (new 'static 'vehicle-attach-point + :local-pos (new 'static 'vector :x -6144.0 :y 2048.0 :z -14336.0 :w 1.0) + :rot (new 'static 'vector :x -8192.0 :z 7281.778 :w 1.0) + ) + ) + ) + :explosion #f + :explosion-part #xda + :debris #f + :name-text (text-id progress-inventory-v-rhino) + ) + ) + +;; definition for symbol *v-mirage-constants*, type rigid-body-vehicle-constants +(define *v-mirage-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.5 + :cm-offset-joint (new 'static 'vector :y 409.6 :z -2048.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 5.5) (meters 3) (meters 7)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 40) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*v-mirage-constants* + :flags #x387318 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 v-mirage) + :engine (new 'static 'vehicle-engine-info + :max-torque 218103800.0 + :inertia 16384.0 + :drag 0.2 + :idle-rpm 900.0 + :clutch-min-rpm 2000.0 + :clutch-max-rpm 5500.0 + :min-rpm 600.0 + :max-rpm 7500.0 + :peak-torque-rpm 3800.0 + :powerband-width-rpm 4100.0 + ) + :transmission (new 'static 'vehicle-transmission-info + :inertia 8192.0 + :upshift-rpm 5500.0 + :downshift-rpm 3200.0 + :final-drive-ratio 12.5 + :gear-ratio-array (new 'static 'array float 8 -2.25 3.375 2.25 1.5 1.0 0.0 0.0 0.0) + :gear-count 5 + ) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 10.0 + :engine-intake-factor 1.0 + :brake-factor 3355443200.0 + :turbo-boost-factor 0.9 + :turbo-boost-duration (seconds 2) + :max-xz-speed (meters 30) + :player-turn-anim-bias 0.5 + :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 1.0 + :air-drag-factor 1.0 + :steering-fin-angle 1820.4445 + :steering-thruster-factor 1.0 + :steering-thruster-max-gain 1.0 + :steering-thruster-half-gain-speed (meters 30) + :tire-steering-angle 4369.067 + :tire-steering-speed-factor 38379.52 + :tire-steering-speed-bias 20480.0 + :ackermann-factor 0.45 + :tire-friction-factor 1.0 + :tire-static-friction 1.3310001 + :tire-static-friction-speed (meters 2) + :tire-dynamic-friction 0.86515 + :tire-dynamic-friction-speed (meters 4) + :tire-inv-max-friction-speed 0.000024414063 + :airfoil-factor 1.0 + :drag-force-factor 0.35 + :rolling-resistance 0.08 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 1.0 + :pitch-control-factor 1.0 + :roll-control-factor 2.0 + :jump-thrust-factor 1.0 + :buoyancy-factor 0.03 + :water-drag-factor 0.25 + :player-weight 122880.0 + :air-roll-torque 81920.0 + :air-pitch-torque 163840.0 + :air-angular-damping 0.98 + :hop-turn-torque 1392640.0 + :ground-torque-scale 1.0 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :turning-accel (meters 20) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 4.5) + :string-max-height (meters 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 :x -2048.0 :y 6144.0 :w 1.0) + (new 'static 'vector :x -20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :x 20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :y 19251.2 :z 20480.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.5 + :engine-pitch-mod-amp 0.05 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "mir-scrape") + :glance-sound (static-sound-name "mir-glance") + :impact-sound (static-sound-name "mir-crash") + :explode-sound (static-sound-name "car-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "mir-flutter") + :water-sound (static-sound-name "mir-water") + :jump-sound (static-sound-name "mir-hop") + :turbo-sound (static-sound-name "mir-boost") + :bank-replace '((wasall1 wasmir)) + :idle-rpm 1300.0 + :idle-pitch-scale 0.5 + :idle-crossover-rpm 1000.0 + :engine-rpm 4700.0 + :engine-crossover-rpm 2500.0 + :start-sound (static-sound-name "mir-start") + :stop-sound (static-sound-name "mir-stop") + :idle-sound (static-sound-name "mir-idle") + :engine-sound (static-sound-name "mir-steady") + :susp-creak-sound (static-sound-name "mir-bounce") + :susp-bottom-out-sound (static-sound-name "mir-bottom") + :susp-speed-threshold 61440.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "mir-road") + :speed 40960.0 + :min-speed 20480.0 + :max-speed 61440.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "mir-dirt") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "mir-sand") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "mir-knobby") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 40960.0 + :pitch-scale 0.125 + :min-pitch -0.2 + :max-pitch 0.2 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "mir-skid-road") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "mir-skid-dirt") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :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-flame-length (meters 2) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 4505.6 :z -15564.8 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4505.6 :z -15564.8 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 4096.0 :z -15974.4 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4096.0 :z -15974.4 :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 0.8 + :hit-points 46.662 + :inv-hit-points 0.021430716 + :hit-threshold 8192.0 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 0.3333 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :inv-lift-thruster-count 1.0 + :engine-thrust-local-pos (new 'static 'vector :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 :x 1843.2 :y 901.12 :z 7864.32 :w 1.0) + :flags (vehicle-wheel-flag vwf1 vwf3 vwf4) + :inertia 6144000.0 + :radius 3399.68 + :susp-arm-length 5939.2 + :steer-arm-length 1638.4 + :scale 1.1 + :travel 4055.04 + :probe-y-offset -2580.48 + :width 3276.8 + :suspension-spring 0.6 + :suspension-damping 0.3 + :forward-grip 0.9 + :side-grip 1.0 + :max-brake-torque 1.0 + :camber 546.13336 + :settle-pos 0.78 + :probe-radius 2457.6 + :tread-texture "tread-interceptor-rhino" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :x 1351.68 :y 1638.4 :z -12083.2 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf2 vwf3 vwf5) + :inertia 10240000.0 + :radius 3399.68 + :susp-arm-length 8069.12 + :steer-arm-length 1638.4 + :scale 1.5 + :travel 4300.8 + :probe-y-offset -4710.4 + :width 3276.8 + :suspension-spring 0.5 + :suspension-damping 0.3 + :forward-grip 1.5 + :side-grip 1.0 + :max-brake-torque 1.0 + :camber 1820.4445 + :settle-pos 0.76 + :probe-radius 2867.2 + :tread-texture "tread-interceptor-rhino" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 5324.8 + :settle-rot-x 764.5866 + :shadow-bot-clip -61440.0 + :shadow-locus-dist 204800.0 + :color-option-count 1 + :color (new 'static 'vector :x 0.75 :y 0.9 :z 1.05 :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 #x2 + :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 819.2 :z -720.896 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x 2252.8 :y 819.2 :z -720.896 :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 1310.72 :y 409.6 :z -614.4 :w 1.0) + (new 'static 'vector :x -1310.72 :y 409.6 :z -409.6 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xda + :debris #f + :name-text (text-id progress-inventory-v-mirage) + ) + ) + +;; definition for symbol *v-x-ride-constants*, type rigid-body-vehicle-constants +(define *v-x-ride-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.4 + :friction-factor 0.5 + :cm-offset-joint (new 'static 'vector :y 409.6 :z -2048.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 4) (meters 3) (meters 6.5)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 40) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*v-x-ride-constants* + :flags #x387318 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 v-x-ride) + :engine (new 'static 'vehicle-engine-info + :max-torque 234881020.0 + :inertia 16384.0 + :drag 0.2 + :idle-rpm 900.0 + :clutch-min-rpm 2000.0 + :clutch-max-rpm 5500.0 + :min-rpm 600.0 + :max-rpm 7500.0 + :peak-torque-rpm 3800.0 + :powerband-width-rpm 4100.0 + ) + :transmission (new 'static 'vehicle-transmission-info + :inertia 8192.0 + :upshift-rpm 5500.0 + :downshift-rpm 3200.0 + :final-drive-ratio 10.0 + :gear-ratio-array (new 'static 'array float 8 -2.25 3.375 2.25 1.5 1.0 0.0 0.0 0.0) + :gear-count 5 + ) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 10.0 + :engine-intake-factor 1.0 + :brake-factor 3355443200.0 + :turbo-boost-factor 0.9 + :turbo-boost-duration (seconds 2) + :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 3) + :cos-ground-effect-angle 0.42261827 + :spring-lift-factor 1.0 + :air-drag-factor 1.0 + :steering-fin-angle 1820.4445 + :steering-thruster-factor 1.0 + :steering-thruster-max-gain 1.0 + :steering-thruster-half-gain-speed (meters 30) + :tire-steering-angle 4369.067 + :tire-steering-speed-factor 38379.52 + :tire-steering-speed-bias 20480.0 + :ackermann-factor 0.45 + :tire-friction-factor 1.0 + :tire-static-friction 1.694 + :tire-static-friction-speed (meters 2) + :tire-dynamic-friction 1.1011 + :tire-dynamic-friction-speed (meters 4) + :tire-inv-max-friction-speed 0.000024414063 + :airfoil-factor 1.0 + :drag-force-factor 0.3 + :rolling-resistance 0.08 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 1.0 + :pitch-control-factor 1.0 + :roll-control-factor 1.0 + :jump-thrust-factor 1.6 + :buoyancy-factor 0.03 + :water-drag-factor 0.25 + :player-weight 122880.0 + :air-roll-torque 81920.0 + :air-pitch-torque 163840.0 + :air-angular-damping 0.98 + :hop-turn-torque 491520.0 + :ground-torque-scale 0.75 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :turning-accel (meters 20) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 4.5) + :string-max-height (meters 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 6144.0 :w 1.0) + (new 'static 'vector :x -20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :x 20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :y 19251.2 :z 20480.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.5 + :engine-pitch-mod-amp 0.05 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "snake-scrape") + :glance-sound (static-sound-name "snake-glance") + :impact-sound (static-sound-name "snake-crash") + :explode-sound (static-sound-name "car-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "snake-flutter") + :water-sound (static-sound-name "snake-water") + :jump-sound (static-sound-name "snake-hop") + :turbo-sound (static-sound-name "snake-boost") + :bank-replace '((wasall1 wassnake)) + :idle-rpm 1300.0 + :idle-pitch-scale 0.5 + :idle-crossover-rpm 1000.0 + :engine-rpm 4700.0 + :engine-crossover-rpm 2500.0 + :start-sound (static-sound-name "snake-start") + :stop-sound (static-sound-name "snake-stop") + :idle-sound (static-sound-name "snake-idle") + :engine-sound (static-sound-name "snake-steady") + :susp-creak-sound (static-sound-name "snake-bounce") + :susp-bottom-out-sound (static-sound-name "snake-bottom") + :susp-speed-threshold 61440.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-road") + :speed 40960.0 + :min-speed 20480.0 + :max-speed 61440.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-dirt") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-sand") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-knobby") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 40960.0 + :pitch-scale 0.125 + :min-pitch -0.2 + :max-pitch 0.2 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-skid-road") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "snake-skid-dirt") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + ) + ) + :particles (new 'static 'vehicle-particle-info + :headlight-count 2 + :taillight-count 2 + :thruster-flame-width (meters 1) + :thruster-flame-length (meters 6) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :y 3686.4 :z -15564.8 :w 1.0) + (new 'static 'vector :y 3686.4 :z -15564.8 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 4096.0 :z -15974.4 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4096.0 :z -15974.4 :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 39.996 + :inv-hit-points 0.025002502 + :hit-threshold 8192.0 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 0.3333 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :inv-lift-thruster-count 1.0 + :engine-thrust-local-pos (new 'static 'vector :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 :x 1843.2 :y 901.12 :z 7864.32 :w 1.0) + :flags (vehicle-wheel-flag vwf1 vwf3 vwf4) + :inertia 6144000.0 + :radius 3399.68 + :susp-arm-length 5939.2 + :steer-arm-length 1638.4 + :scale 1.2 + :travel 4055.04 + :probe-y-offset -2580.48 + :width 3276.8 + :suspension-spring 0.6 + :suspension-damping 0.3 + :forward-grip 0.9 + :side-grip 1.0 + :max-brake-torque 1.0 + :camber 546.13336 + :settle-pos 0.78 + :probe-radius 2457.6 + :tread-texture "tread-snake" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :x 1351.68 :y 1638.4 :z -12083.2 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf2 vwf3 vwf5) + :inertia 10240000.0 + :radius 3399.68 + :susp-arm-length 8069.12 + :steer-arm-length 1638.4 + :scale 1.5 + :travel 4300.8 + :probe-y-offset -4710.4 + :width 3276.8 + :suspension-spring 0.5 + :suspension-damping 0.3 + :forward-grip 1.5 + :side-grip 1.0 + :max-brake-torque 1.0 + :camber 1820.4445 + :settle-pos 0.76 + :probe-radius 2867.2 + :tread-texture "tread-snake" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 5324.8 + :settle-rot-x 764.5866 + :shadow-bot-clip -61440.0 + :shadow-locus-dist 204800.0 + :color-option-count 1 + :color (new 'static 'vector :x 0.9 :y 1.1 :z 0.9 :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 1 + :rider-stance #x2 + :grab-rail-array #f + :seat-array (new 'static 'inline-array vehicle-seat-info 4 + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :y 1638.4 :z -5324.8 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info) + (new 'static 'vehicle-seat-info) + (new 'static 'vehicle-seat-info) + ) + :rider-hand-offset (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1310.72 :y 409.6 :z -614.4 :w 1.0) + (new 'static 'vector :x -1310.72 :y 409.6 :z -409.6 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xda + :debris #f + :name-text (text-id progress-inventory-v-x-ride) + ) + ) + +;; definition for symbol *v-marauder-constants*, type rigid-body-vehicle-constants +(define *v-marauder-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.4 + :friction-factor 0.5 + :cm-offset-joint (new 'static 'vector :y 409.6 :z -2048.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 5) (meters 2.5) (meters 6.5)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 40) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*v-marauder-constants* + :flags #x81310 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 v-marauder) + :engine (new 'static 'vehicle-engine-info + :max-torque 117440510.0 + :inertia 16384.0 + :drag 0.4 + :idle-rpm 900.0 + :clutch-min-rpm 2000.0 + :clutch-max-rpm 5500.0 + :min-rpm 700.0 + :max-rpm 6500.0 + :peak-torque-rpm 3800.0 + :powerband-width-rpm 4100.0 + ) + :transmission (new 'static 'vehicle-transmission-info + :inertia 8192.0 + :upshift-rpm 5500.0 + :downshift-rpm 2000.0 + :final-drive-ratio 12.5 + :gear-ratio-array (new 'static 'array float 8 -2.25 3.375 2.25 1.5 1.0 0.0 0.0 0.0) + :gear-count 5 + ) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 10.0 + :engine-intake-factor 1.0 + :brake-factor 1677721600.0 + :turbo-boost-factor 0.9 + :turbo-boost-duration (seconds 2) + :max-xz-speed (meters 30) + :player-turn-anim-bias 0.5 + :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 1.0 + :air-drag-factor 1.0 + :steering-fin-angle 1820.4445 + :steering-thruster-factor 1.0 + :steering-thruster-max-gain 1.0 + :steering-thruster-half-gain-speed (meters 30) + :tire-steering-angle 4369.067 + :tire-steering-speed-factor 38379.52 + :tire-steering-speed-bias 20480.0 + :ackermann-factor 0.45 + :tire-friction-factor 1.0 + :tire-static-friction 1.3310001 + :tire-static-friction-speed (meters 2) + :tire-dynamic-friction 0.86515 + :tire-dynamic-friction-speed (meters 4) + :tire-inv-max-friction-speed 0.000024414063 + :airfoil-factor 1.0 + :drag-force-factor 0.35 + :rolling-resistance 0.08 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 1.0 + :pitch-control-factor 1.0 + :roll-control-factor 1.0 + :jump-thrust-factor 1.0 + :buoyancy-factor 0.03 + :water-drag-factor 0.25 + :player-weight 122880.0 + :air-roll-torque 81920.0 + :air-pitch-torque 163840.0 + :air-angular-damping 0.98 + :hop-turn-torque 1392640.0 + :ground-torque-scale 1.0 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :turning-accel (meters 20) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 4.5) + :string-max-height (meters 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 6963.2 :z -6144.0 :w 1.0) + (new 'static 'vector :x -20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :x 20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :y 19251.2 :z 20480.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.5 + :engine-pitch-mod-amp 0.05 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "inter-scrape") + :glance-sound (static-sound-name "inter-glance") + :impact-sound (static-sound-name "inter-crash") + :explode-sound (static-sound-name "car-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "inter-flutter") + :water-sound (static-sound-name "inter-water") + :jump-sound (static-sound-name "snake-hop") + :turbo-sound (static-sound-name "snake-boost") + :bank-replace '((wasall1 wassnake)) + :idle-rpm 1300.0 + :idle-pitch-scale 0.5 + :idle-crossover-rpm 1000.0 + :engine-rpm 4700.0 + :engine-crossover-rpm 2500.0 + :start-sound (static-sound-name "snake-start") + :stop-sound (static-sound-name "snake-stop") + :idle-sound (static-sound-name "inter-idle") + :engine-sound (static-sound-name "inter-steady") + :susp-creak-sound (static-sound-name "inter-bounce") + :susp-bottom-out-sound (static-sound-name "inter-bottom") + :susp-speed-threshold 61440.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-road") + :speed 40960.0 + :min-speed 20480.0 + :max-speed 61440.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-dirt") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-sand") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-knobby") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 40960.0 + :pitch-scale 0.125 + :min-pitch -0.2 + :max-pitch 0.2 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-skid-road") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-skid-dirt") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :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-flame-length (meters 2) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 4505.6 :z -15564.8 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4505.6 :z -15564.8 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 4096.0 :z -15974.4 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4096.0 :z -15974.4 :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 2.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 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :inv-lift-thruster-count 1.0 + :engine-thrust-local-pos (new 'static 'vector :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 :x 1843.2 :y 901.12 :z 7864.32 :w 1.0) + :flags (vehicle-wheel-flag vwf1 vwf3 vwf4) + :inertia 6144000.0 + :radius 3399.68 + :susp-arm-length 5939.2 + :steer-arm-length 1638.4 + :scale 1.2 + :travel 4055.04 + :probe-y-offset -2580.48 + :width 3276.8 + :suspension-spring 0.6 + :suspension-damping 0.3 + :forward-grip 0.9 + :side-grip 1.0 + :max-brake-torque 1.0 + :camber 546.13336 + :settle-pos 0.78 + :probe-radius 2457.6 + :tread-texture "tread-interceptor-rhino" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :x 1351.68 :y 1638.4 :z -12083.2 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf2 vwf3 vwf5) + :inertia 10240000.0 + :radius 3399.68 + :susp-arm-length 8069.12 + :steer-arm-length 1638.4 + :scale 1.5 + :travel 4300.8 + :probe-y-offset -4710.4 + :width 3276.8 + :suspension-spring 0.5 + :suspension-damping 0.3 + :forward-grip 1.5 + :side-grip 1.0 + :max-brake-torque 1.0 + :camber 1820.4445 + :settle-pos 0.8 + :probe-radius 2867.2 + :tread-texture "tread-interceptor-rhino" + ) + ) + :setup (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 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 2 + :rider-stance #x2 + :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 819.2 :z -720.896 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x 2252.8 :y 819.2 :z -720.896 :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 1310.72 :y 409.6 :z -614.4 :w 1.0) + (new 'static 'vector :x -1310.72 :y 409.6 :z -409.6 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xda + :debris #f + ) + ) + +;; definition for symbol *v-faccar-constants*, type rigid-body-vehicle-constants +(define *v-faccar-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.4 + :friction-factor 0.5 + :cm-offset-joint (new 'static 'vector :y 819.2 :z -409.6 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 6.5) (meters 3) (meters 8)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 40) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*v-faccar-constants* + :flags #x287318 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 v-faccar) + :engine (new 'static 'vehicle-engine-info + :max-torque 83886080.0 + :inertia 8192.0 + :drag 0.2 + :idle-rpm 900.0 + :clutch-min-rpm 2000.0 + :clutch-max-rpm 4000.0 + :min-rpm 700.0 + :max-rpm 6000.0 + :peak-torque-rpm 3200.0 + :powerband-width-rpm 4000.0 + ) + :transmission (new 'static 'vehicle-transmission-info + :inertia 4096.0 + :upshift-rpm 4500.0 + :downshift-rpm 2900.0 + :final-drive-ratio 9.0 + :gear-ratio-array (new 'static 'array float 8 -3.375 3.375 2.25 1.5 1.0 0.0 0.0 0.0) + :gear-count 5 + ) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 10.0 + :engine-intake-factor 1.0 + :brake-factor 5033165000.0 + :turbo-boost-factor 2.0 + :turbo-boost-duration (seconds 0.25) + :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 3) + :cos-ground-effect-angle 0.42261827 + :spring-lift-factor 1.0 + :air-drag-factor 1.0 + :steering-fin-angle 1820.4445 + :steering-thruster-factor 1.0 + :steering-thruster-max-gain 1.0 + :steering-thruster-half-gain-speed (meters 30) + :tire-steering-angle 4551.1113 + :tire-steering-speed-factor 34816.0 + :tire-steering-speed-bias 40960.0 + :ackermann-factor 0.3 + :tire-friction-factor 1.0 + :tire-static-friction 1.516 + :tire-static-friction-speed (meters 2) + :tire-dynamic-friction 0.98539996 + :tire-dynamic-friction-speed (meters 4) + :tire-inv-max-friction-speed 0.000024414063 + :airfoil-factor 1.0 + :drag-force-factor 0.35 + :rolling-resistance 0.08 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 1.0 + :pitch-control-factor 1.0 + :roll-control-factor 2.0 + :jump-thrust-factor 1.5 + :buoyancy-factor 0.03 + :water-drag-factor 0.25 + :player-weight 122880.0 + :air-roll-torque 40960.0 + :air-pitch-torque 81920.0 + :air-angular-damping 0.97 + :hop-turn-torque 1228800.0 + :ground-torque-scale 0.45 + :ai-steering-factor 4.0 + :ai-throttle-factor 0.5 + ) + :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 :x -2457.6 :y 9011.2 :z -4915.2 :w 1.0) + (new 'static 'vector :x -20480.0 :y 12288.0 :w 1.0) + (new 'static 'vector :x 20480.0 :y 12288.0 :w 1.0) + (new 'static 'vector :y 12288.0 :z 20480.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.25 + :engine-pitch-mod-amp 0.05 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "fac-scrape-mtl") + :glance-sound (static-sound-name "fac-glance") + :impact-sound (static-sound-name "fac-impact-hard") + :explode-sound (static-sound-name "fac-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "fac-flutter") + :water-sound (static-sound-name "fac-water") + :jump-sound (static-sound-name "fac-hop") + :turbo-sound (static-sound-name "fac-boost") + :bank-replace '((factory6 facveh)) + :idle-rpm 1400.0 + :idle-pitch-scale 0.25 + :idle-crossover-rpm 1500.0 + :engine-rpm 2500.0 + :engine-crossover-rpm 2500.0 + :start-sound (static-sound-name "fac-start") + :stop-sound (static-sound-name "fac-stop") + :idle-sound (static-sound-name "fac-idle") + :engine-sound (static-sound-name "fac-steady") + :susp-creak-sound (static-sound-name "fac-bounce") + :susp-bottom-out-sound (static-sound-name "fac-bottom") + :susp-speed-threshold 81920.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "fac-hum") + :speed 40960.0 + :min-speed 20480.0 + :max-speed 61440.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "fac-dirt") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "fac-sand") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "fac-knobby") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 40960.0 + :pitch-scale 0.125 + :min-pitch -0.2 + :max-pitch 0.2 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "fac-skid-road") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "fac-skid-dirt") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + ) + ) + :particles (new 'static 'vehicle-particle-info + :headlight-count 1 + :taillight-count 2 + :thruster-flame-width (meters 0.6) + :thruster-flame-length (meters 2) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 2048.0 :y 1843.2 :z -14336.0 :w 1.0) + (new 'static 'vector :x -2048.0 :y 1843.2 :z -14336.0 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 2048.0 :y 1843.2 :z -14336.0 :w 1.0) + (new 'static 'vector :x -2048.0 :y 1843.2 :z -14336.0 :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 1024.0 :y 5120.0 :z -10240.0 :w 1.0) + (new 'static 'vector :x -1024.0 :y 5120.0 :z -10240.0 :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 6963.2 :z 11059.2 :w 1.0) + (new 'static 'vector) + (new 'static 'vector) + ) + :taillight-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 7987.2 :z -12083.2 :w 1.0) + (new 'static 'vector :x -1638.4 :y 7987.2 :z -12083.2 :w 1.0) + ) + ) + :damage (new 'static 'vehicle-damage-info + :inv-toughness-factor 0.8333333 + :hit-points 29.997 + :inv-hit-points 0.033336665 + :hit-threshold 8192.0 + :hit-small 102400.0 + :hit-big 131072.0 + :hit-deadly 286720.0 + :impact-damage-factor 0.3333 + ) + :physics-model (new 'static 'vehicle-physics-model-info + :inv-lift-thruster-count 1.0 + :engine-thrust-local-pos (new 'static 'vector :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 :x 4464.64 :y -655.36 :z 7864.32 :w 1.0) + :flags (vehicle-wheel-flag vwf1 vwf4) + :inertia 4300800.0 + :radius 3481.6 + :susp-arm-length 4096.0 + :steer-arm-length 1638.4 + :scale 1.0 + :travel 2457.6 + :probe-y-offset -3276.8 + :width 4096.0 + :suspension-spring 0.4 + :suspension-damping 0.5 + :forward-grip 1.0 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.79 + :probe-radius 1720.32 + :tread-texture "tread-scorpion" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :x 4444.16 :y -532.48 :z -12083.2 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf2) + :inertia 4915200.0 + :radius 3481.6 + :susp-arm-length 4096.0 + :steer-arm-length 2048.0 + :scale 1.2 + :travel 2867.2 + :probe-y-offset -3276.8 + :width 4096.0 + :suspension-spring 0.7 + :suspension-damping 0.4 + :forward-grip 1.15 + :side-grip 1.15 + :max-brake-torque 1.0 + :settle-pos 0.79 + :probe-radius 2048.0 + :tread-texture "tread-scorpion" + ) + ) + :setup (new 'static 'vehicle-setup-info + :settle-height 5693.44 + :settle-rot-x -691.76886 + :shadow-bot-clip -61440.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 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 1 + :rider-stance #x2 + :grab-rail-array #f + :seat-array (new 'static 'inline-array vehicle-seat-info 4 + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x -2457.6 :y 1187.84 :z -819.2 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info) + (new 'static 'vehicle-seat-info) + (new 'static 'vehicle-seat-info) + ) + :rider-hand-offset (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1228.8 :y 614.4 :z -368.64 :w 1.0) + (new 'static 'vector :x -1228.8 :y 614.4 :z -368.64 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xda + :debris #f + ) + ) + +;; definition for symbol *v-catapult-constants*, type rigid-body-vehicle-constants +(define *v-catapult-constants* + (new 'static 'rigid-body-vehicle-constants + :info (new 'static 'rigid-body-info + :mass 32.0 + :inv-mass 0.03125 + :linear-damping 1.0 + :angular-damping 1.0 + :bounce-factor 0.4 + :friction-factor 0.5 + :cm-offset-joint (new 'static 'vector :y 409.6 :z -2048.0 :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 12) (meters 8) (meters 25)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 40) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*v-catapult-constants* + :flags #x80010 + :object-type #x17 + :guard-type #xb + :vehicle-type (vehicle-type-u8 v-catapult) + :engine (new 'static 'vehicle-engine-info + :max-torque 117440510.0 + :inertia 16384.0 + :drag 0.4 + :idle-rpm 900.0 + :clutch-min-rpm 2000.0 + :clutch-max-rpm 5500.0 + :min-rpm 700.0 + :max-rpm 6500.0 + :peak-torque-rpm 3800.0 + :powerband-width-rpm 4100.0 + ) + :transmission (new 'static 'vehicle-transmission-info + :inertia 8192.0 + :upshift-rpm 5500.0 + :downshift-rpm 2000.0 + :final-drive-ratio 25.0 + :gear-ratio-array (new 'static 'array float 8 -2.25 3.375 2.25 1.5 1.0 0.0 0.0 0.0) + :gear-count 5 + ) + :handling (new 'static 'vehicle-handling-info + :max-engine-thrust (meters 50) + :inv-max-engine-thrust 0.0000048828124 + :engine-response-rate 10.0 + :engine-intake-factor 1.0 + :brake-factor 1677721600.0 + :turbo-boost-factor 0.9 + :turbo-boost-duration (seconds 2) + :max-xz-speed (meters 30) + :player-turn-anim-bias 0.5 + :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 1.0 + :air-drag-factor 1.0 + :steering-fin-angle 1820.4445 + :steering-thruster-factor 1.0 + :steering-thruster-max-gain 1.0 + :steering-thruster-half-gain-speed (meters 30) + :tire-steering-angle 4369.067 + :tire-steering-speed-factor 38379.52 + :tire-steering-speed-bias 20480.0 + :ackermann-factor 0.45 + :tire-friction-factor 1.0 + :tire-static-friction 1.3310001 + :tire-static-friction-speed (meters 2) + :tire-dynamic-friction 0.86515 + :tire-dynamic-friction-speed (meters 4) + :tire-inv-max-friction-speed 0.000024414063 + :airfoil-factor 1.0 + :drag-force-factor 0.35 + :rolling-resistance 0.08 + :speed-scrubbing-drag 10.0 + :speed-limiting-drag 1.0 + :pitch-control-factor 1.0 + :roll-control-factor 1.0 + :jump-thrust-factor 1.0 + :buoyancy-factor 0.03 + :water-drag-factor 0.25 + :player-weight 122880.0 + :air-roll-torque 81920.0 + :air-pitch-torque 163840.0 + :air-angular-damping 0.98 + :hop-turn-torque 1392640.0 + :ground-torque-scale 1.0 + :ai-steering-factor 1.0 + :ai-throttle-factor 1.0 + ) + :turning-accel (meters 20) + :camera (new 'static 'vehicle-camera-info + :string-min-height (meters 4.5) + :string-max-height (meters 15) + :string-min-length (meters 5) + :string-max-length (meters 15.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 6963.2 :z -6144.0 :w 1.0) + (new 'static 'vector :x -20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :x 20480.0 :y 19251.2 :w 1.0) + (new 'static 'vector :y 19251.2 :z 20480.0 :w 1.0) + ) + ) + :sound (new 'static 'vehicle-sound-info + :engine-pitch-scale 0.5 + :engine-pitch-mod-amp 0.05 + :thrust-sound (static-sound-name "bike-thrust") + :scrape-sound (static-sound-name "inter-scrape") + :glance-sound (static-sound-name "inter-glance") + :impact-sound (static-sound-name "inter-crash") + :explode-sound (static-sound-name "car-explode") + :explode2-sound (static-sound-name "vehicle-explo-b") + :extra-sound (static-sound-name "inter-load") + :water-sound (static-sound-name "inter-water") + :jump-sound (static-sound-name "snake-hop") + :turbo-sound (static-sound-name "snake-boost") + :bank-replace '((wasall1 wassnake)) + :idle-rpm 1300.0 + :idle-pitch-scale 0.5 + :idle-crossover-rpm 1000.0 + :engine-rpm 4700.0 + :engine-crossover-rpm 2500.0 + :start-sound (static-sound-name "snake-start") + :stop-sound (static-sound-name "snake-stop") + :idle-sound (static-sound-name "inter-idle") + :engine-sound (static-sound-name "inter-steady") + :susp-creak-sound (static-sound-name "inter-bounce") + :susp-bottom-out-sound (static-sound-name "inter-bottom") + :susp-speed-threshold 61440.0 + :tire-roll-sounds (new 'static 'inline-array vehicle-sound-loop-info 4 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-road") + :speed 40960.0 + :min-speed 20480.0 + :max-speed 61440.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-dirt") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-sand") + :speed 40960.0 + :max-speed 40960.0 + :pitch-offset -0.5 + :pitch-scale 0.25 + :min-pitch -2.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-knobby") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 40960.0 + :pitch-scale 0.125 + :min-pitch -0.2 + :max-pitch 0.2 + ) + ) + :tire-slide-sounds (new 'static 'inline-array vehicle-sound-loop-info 2 + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-skid-road") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :min-pitch -10.0 + :max-pitch 10.0 + ) + (new 'static 'vehicle-sound-loop-info + :sound (static-sound-name "inter-skid-dirt") + :speed 40960.0 + :min-speed 8192.0 + :max-speed 16384.0 + :pitch-offset -0.0625 + :pitch-scale 0.0625 + :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-flame-length (meters 2) + :thruster-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 4505.6 :z -15564.8 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4505.6 :z -15564.8 :w 1.0) + ) + :exhaust-local-pos (new 'static 'inline-array vector 2 + (new 'static 'vector :x 1638.4 :y 4096.0 :z -15974.4 :w 1.0) + (new 'static 'vector :x -1638.4 :y 4096.0 :z -15974.4 :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 0.6666667 + :hit-points 80.0 + :inv-hit-points 0.0125 + :hit-threshold 8192.0 + :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 + :inv-lift-thruster-count 1.0 + :engine-thrust-local-pos (new 'static 'vector :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 :x 20480.0 :y -2048.0 :z 15687.68 :w 1.0) + :flags (vehicle-wheel-flag vwf1 vwf3 vwf4) + :inertia 6144000.0 + :radius 3399.68 + :susp-arm-length 9420.8 + :steer-arm-length 2457.6 + :scale 2.4 + :travel 9011.2 + :probe-y-offset -4096.0 + :width 4096.0 + :suspension-spring 0.6 + :suspension-damping 0.3 + :forward-grip 0.9 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.78 + :probe-radius 409.6 + :tread-texture "tread-interceptor-rhino" + ) + :rear-wheel (new 'static 'vehicle-wheel-info + :local-pos (new 'static 'vector :x 14336.0 :y -4096.0 :z -24166.4 :w 1.0) + :flags (vehicle-wheel-flag vwf0 vwf1 vwf2 vwf3 vwf5) + :inertia 10240000.0 + :radius 3399.68 + :susp-arm-length 10240.0 + :steer-arm-length 3276.8 + :scale 2.4 + :travel 8192.0 + :probe-y-offset -2867.2 + :width 4096.0 + :suspension-spring 0.6 + :suspension-damping 0.3 + :forward-grip 1.5 + :side-grip 1.0 + :max-brake-torque 1.0 + :settle-pos 0.8 + :probe-radius 409.6 + :tread-texture "tread-interceptor-rhino" + ) + ) + :setup (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 + ) + :rider (new 'static 'vehicle-rider-info + :seat-count 2 + :rider-stance #x2 + :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 819.2 :z -720.896 :w (the-as float #x10000)) + ) + (new 'static 'vehicle-seat-info + :position (new 'static 'vector :x 2252.8 :y 819.2 :z -720.896 :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 1310.72 :y 409.6 :z -614.4 :w 1.0) + (new 'static 'vector :x -1310.72 :y 409.6 :z -409.6 :w 1.0) + ) + :attach-point-array #f + ) + :explosion #f + :explosion-part #xda + :debris #f + ) + ) + +;; definition for symbol *wcar-explosion-info*, type vehicle-explosion-info +(define *wcar-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 'wasall + :skel #f + :skel-name "skel-vehicle-explosion" + :anim 2 + ) + ) + +;; failed to figure out what this is: +(set! (-> *v-turtle-constants* explosion) *wcar-explosion-info*) + +;; failed to figure out what this is: +(set! (-> *v-snake-constants* explosion) *wcar-explosion-info*) + +;; failed to figure out what this is: +(set! (-> *v-scorpion-constants* explosion) *wcar-explosion-info*) + +;; failed to figure out what this is: +(set! (-> *v-toad-constants* explosion) *wcar-explosion-info*) + +;; failed to figure out what this is: +(set! (-> *v-fox-constants* explosion) *wcar-explosion-info*) + +;; failed to figure out what this is: +(set! (-> *v-rhino-constants* explosion) *wcar-explosion-info*) + +;; failed to figure out what this is: +(set! (-> *v-mirage-constants* explosion) *wcar-explosion-info*) + +;; failed to figure out what this is: +(set! (-> *v-x-ride-constants* explosion) *wcar-explosion-info*) + +;; failed to figure out what this is: +(set! (-> *v-marauder-constants* explosion) *wcar-explosion-info*) + +;; failed to figure out what this is: +(set! (-> *v-faccar-constants* explosion) *wcar-explosion-info*) + +;; failed to figure out what this is: +(set! (-> *v-catapult-constants* explosion) *wcar-explosion-info*) + +;; definition of type wcar-base +(deftype wcar-base (wvehicle) + ((rider-hand-joint-array int8 2) + ) + ) + +;; definition for method 3 of type wcar-base +(defmethod inspect ((this wcar-base)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type wvehicle inspect))) + (t9-0 this) + ) + (format #t "~2Trider-hand-joint-array[2] @ #x~X~%" (-> this rider-hand-joint-array)) + (label cfg-4) + this + ) + +;; definition for method 113 of type wcar-base +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-113 ((this wcar-base) (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 of type wcar-snake-base +(deftype wcar-snake-base (wcar-base) + ((local-gun-pos vector 2 :inline) + (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-guns joint-mod-set-local 2 :inline) + ) + ) + +;; definition for method 3 of type wcar-snake-base +(defmethod inspect ((this wcar-snake-base)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type wcar-base inspect))) + (t9-0 this) + ) + (format #t "~2Tlocal-gun-pos[2] @ #x~X~%" (-> this local-gun-pos)) + (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-guns[2] @ #x~X~%" (-> this jmod-guns)) + (label cfg-4) + this + ) + +;; definition for method 169 of type wcar-snake-base +;; INFO: Used lq/sq +;; WARN: Return type mismatch float vs none. +(defmethod wvehicle-method-169 ((this wcar-snake-base)) + (set! (-> this i-barrel) (logand (+ (-> this i-barrel) 1) 1)) + (let ((s5-0 (new 'stack-no-clear 'wcar-proj-init-by-other-params))) + (set! (-> s5-0 barrel-idx) (-> this i-barrel)) + (set! (-> s5-0 vec0 7 x) 16384.0) + (set! (-> s5-0 vec0 7 y) 409600.0) + (set! (-> s5-0 vec0 7 w) 0.1736) + (set! (-> s5-0 vec0 7 z) 0.0) + (when (and (task-node-closed? (game-task-node desert-final-boss-introduction)) + (not (task-node-closed? (game-task-node desert-final-boss-resolution))) + ) + (set! (-> s5-0 vec0 7 x) 32768.0) + (set! (-> s5-0 vec0 7 w) 0.3419) + (set! (-> s5-0 vec0 7 z) -0.1736) + ) + (let* ((v1-13 (-> s5-0 mat0)) + (a3-0 (-> this rbody matrix)) + (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-13 rvec quad) a0-4) + (set! (-> v1-13 uvec quad) a1-0) + (set! (-> v1-13 fvec quad) a2-0) + (set! (-> v1-13 trans quad) a3-1) + ) + (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*! (the-as vector (-> s5-0 vec0)) (-> this local-gun-pos (-> s5-0 barrel-idx)) (-> s5-0 mat0)) + 0 + (set! (-> s5-0 vec0 2 quad) (-> (new 'static 'vector :y 0.0871 :z 0.9961 :w 1.0) quad)) + (vector-rotate*! (-> s5-0 vec0 3) (-> s5-0 vec0 2) (-> s5-0 mat0)) + (vector-float*! (-> s5-0 vec0 4) (-> s5-0 vec0 3) (- (-> s5-0 vec0 7 y) (-> s5-0 vec0 7 x))) + (vector+float*! + (-> s5-0 vec0 1) + (the-as vector (-> s5-0 vec0)) + (-> s5-0 vec0 3) + (+ 16384.0 (-> s5-0 vec0 7 x)) + ) + (let ((s4-0 (new 'stack 'boxed-array collide-shape 128))) + (set! (-> s4-0 length) (fill-actor-list-for-sphere + *actor-hash* + (-> s5-0 vec0 1) + (-> s5-0 vec0 4) + (-> s5-0 vec0 7 x) + (the-as (pointer collide-shape) (-> s4-0 data)) + (-> s4-0 allocated-length) + -1 + ) + ) + (let ((a0-14 (find-nearest-focusable + (the-as (array collide-shape) s4-0) + (-> s5-0 vec0 1) + (-> s5-0 vec0 7 y) + (search-info-flag attackable enemy attackable-priority high-priority) + (search-info-flag) + (-> s5-0 vec0 3) + (the-as vector #f) + 2730.6667 + ) + ) + ) + (when a0-14 + (set! (-> s5-0 vec0 6 quad) (-> (get-trans a0-14 3) quad)) + (vector-! (-> s5-0 vec0 5) (-> s5-0 vec0 6) (the-as vector (-> s5-0 vec0))) + (matrix-transpose! (-> s5-0 mat1) (-> s5-0 mat0)) + (vector-matrix*! (-> s5-0 vec0 2) (-> s5-0 vec0 5) (-> s5-0 mat1)) + (set! (-> s5-0 vec0 2 x) 0.0) + (vector-normalize! (-> s5-0 vec0 2) 1.0) + (cond + ((< (-> s5-0 vec0 7 w) (-> s5-0 vec0 2 y)) + (set! (-> s5-0 vec0 2 y) (-> s5-0 vec0 7 w)) + (let ((f0-16 1.0) + (f1-3 (-> s5-0 vec0 7 w)) + ) + (set! (-> s5-0 vec0 2 z) (sqrtf (- f0-16 (* f1-3 f1-3)))) + ) + ) + ((< (-> s5-0 vec0 2 y) (-> s5-0 vec0 7 z)) + (set! (-> s5-0 vec0 2 y) (-> s5-0 vec0 7 z)) + (let ((f0-21 1.0) + (f1-7 (-> s5-0 vec0 7 z)) + ) + (set! (-> s5-0 vec0 2 z) (sqrtf (- f0-21 (* f1-7 f1-7)))) + ) + ) + ) + (if (< 0.0 (-> s5-0 vec0 2 z)) + (vector-rotate*! (-> s5-0 vec0 3) (-> s5-0 vec0 2) (-> s5-0 mat0)) + ) + ) + ) + ) + (vector-float*! (-> s5-0 vec0 4) (-> s5-0 vec0 3) (-> s5-0 vec0 7 y)) + (set! (-> s5-0 params ent) (-> this 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) (-> s5-0 vec0 0 quad)) + (set! (-> s5-0 params vel quad) (-> s5-0 vec0 4 quad)) + (set! (-> s5-0 params notify-handle) (the-as handle #f)) + (set! (-> s5-0 params owner-handle) (process->handle this)) + (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 this)) + (let* ((v1-58 *game-info*) + (a0-35 (+ (-> v1-58 attack-id) 1)) + ) + (set! (-> v1-58 attack-id) a0-35) + (set! (-> s5-0 params attack-id) a0-35) + ) + (set! (-> s5-0 params timeout) (seconds 4)) + (spawn-projectile v-snake-shot (-> s5-0 params) *rigid-body-queue-manager* *default-dead-pool*) + (let ((v1-63 (-> this jmod-guns (-> s5-0 barrel-idx)))) + (set! (-> v1-63 transform trans z) -3276.8) + ) + ) + (none) + ) + +;; definition for method 34 of type wcar-snake-base +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this wcar-snake-base)) + (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! (-> 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 wcar-snake-base +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-62 ((this wcar-snake-base)) + (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 3317.76 :z 9011.2 :w 4915.2)) + 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 -14336.0 :w 6144.0)) + 16 + ) + (set! (-> (the-as collide-shape-prim-group s5-0) child 7 local-sphere w) 20889.6) + ) + ((method-of-type wcar-base vehicle-method-62) this) + 0 + (none) + ) + +;; definition for method 79 of type wcar-snake-base +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-79 ((this wcar-snake-base)) + (let ((s5-0 (new 'stack-no-clear 'inline-array 'quaternion 2))) + (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 + ) + ) + (let ((s5-1 (new 'stack-no-clear 'wcar-stack-type1))) + (let* ((v1-16 (-> s5-1 vec0)) + (a3-2 (-> this node-list data 0 bone transform)) + (a0-9 (-> a3-2 rvec quad)) + (a1-3 (-> a3-2 uvec quad)) + (a2-3 (-> a3-2 fvec quad)) + (a3-3 (-> a3-2 trans quad)) + ) + (set! (-> v1-16 0 quad) a0-9) + (set! (-> v1-16 1 quad) a1-3) + (set! (-> v1-16 2 quad) a2-3) + (set! (-> v1-16 3 quad) a3-3) + ) + (set! (-> s5-1 vec0 4 quad) (-> (new 'static 'vector :x 3768.32 :y 3686.4 :z 6758.4 :w 1.0) quad)) + (set! (-> s5-1 vec0 5 quad) (-> (new 'static 'vector :x 3768.32 :y 3686.4 :z 6758.4 :w 1.0) quad)) + (set! (-> s5-1 vec0 6 quad) (-> (new 'static 'vector :x 5816.32 :y 5242.88 :z -11960.32 :w 1.0) quad)) + (set! (-> s5-1 vec0 7 quad) (-> (new 'static 'vector :x 5816.32 :y 5242.88 :z -11960.32 :w 1.0) quad)) + (set-vector! (-> s5-1 vec0 8) 25486.223 25486.223 29127.111 29127.111) + (dotimes (s4-1 4) + (let ((s3-1 (-> this wheel s4-1))) + (let ((v1-25 (-> s3-1 info))) + (set! (-> s5-1 float0) (+ -2048.0 (-> v1-25 susp-arm-length))) + (set! (-> s5-1 vec1 0 quad) (-> (the-as (pointer uint128) (+ (+ (* s4-1 16) 64) (the-as int s5-1))))) + (set! (-> s5-1 vec0 9 quad) (-> v1-25 local-pos quad)) + ) + (+! (-> s5-1 vec0 9 x) (* (-> s5-1 float0) (-> s3-1 cos-susp-ang))) + (+! (-> s5-1 vec0 9 y) (* (-> s5-1 float0) (-> s3-1 sin-susp-ang))) + (set! (-> s5-1 vec1 1 quad) (-> s5-1 vec0 9 quad)) + (set! (-> s5-1 vec1 1 x) (* (-> s5-1 vec1 1 x) (-> s3-1 x-scale))) + (set! (-> s5-1 vec1 0 x) (* (-> s5-1 vec1 0 x) (-> s3-1 x-scale))) + (vector-! (-> s5-1 vec1 2) (-> s5-1 vec1 1) (the-as vector (-> s5-1 vec1))) + (set! (-> s5-1 float2) + (- (-> s5-1 vec0 8 data s4-1) (* (atan (-> s5-1 vec1 2 x) (-> s5-1 vec1 2 y)) (-> s3-1 x-scale))) + ) + (let ((v1-34 (-> this jmod-shock-tops s4-1))) + (quaternion-axis-angle! (-> v1-34 rotation) 0.0 0.0 1.0 (-> s5-1 float2)) + ) + 0 + (let ((v1-38 (-> this jmod-shock-mids s4-1))) + (set! (-> v1-38 transform trans y) (* -1.0 (+ -3276.8 (vector-length (-> s5-1 vec1 2))) (-> s3-1 x-scale))) + ) + ) + 0 + 0 + ) + ) + (let ((f30-1 (seconds-per-frame))) + (dotimes (s5-2 2) + (let ((s4-2 (-> this jmod-guns s5-2))) + (seek! (-> s4-2 transform trans z) 0.0 (* 32768.0 f30-1)) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-turtle turtle turtle-lod0-jg turtle-idle-ja + ((turtle-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 3.5) + :shadow turtle-shadow-mg + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-turtle-wheel turtle turtle-wheel-lod0-jg turtle-wheel-idle-ja + ((turtle-wheel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 0.75) + :shadow turtle-wheel-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-turtle-wheel-blur turtle turtle-wheel-blur-lod0-jg turtle-wheel-blur-idle-ja + ((turtle-wheel-blur-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 0.75) + :shadow turtle-wheel-blur-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-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 + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-snake-wheel snake snake-wheel-lod0-jg snake-wheel-idle-ja + ((snake-wheel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.15) + :shadow snake-wheel-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-snake-wheel-blur snake snake-wheel-blur-lod0-jg snake-wheel-blur-idle-ja + ((snake-wheel-blur-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.15) + :shadow snake-wheel-blur-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-scorpion scorpion scorpion-lod0-jg scorpion-idle-ja + ((scorpion-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 7) + :shadow scorpion-shadow-mg + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-scorpion-wheel scorpion scorpion-wheel-lod0-jg scorpion-wheel-idle-ja + ((scorpion-wheel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 0.55) + :shadow scorpion-wheel-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-scorpion-wheel-blur scorpion scorpion-wheel-blur-lod0-jg scorpion-wheel-blur-idle-ja + ((scorpion-wheel-blur-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 0.55) + :shadow scorpion-wheel-blur-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-toad toad toad-lod0-jg toad-idle-ja + ((toad-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + :shadow toad-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-toad-wheel toad toad-wheel-lod0-jg toad-wheel-idle-ja + ((toad-wheel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.44) + :shadow toad-wheel-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-toad-wheel-blur toad toad-wheel-blur-lod0-jg toad-wheel-blur-idle-ja + ((toad-wheel-blur-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.44) + :shadow toad-wheel-blur-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-fox fox fox-lod0-jg fox-idle-ja + ((fox-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :shadow fox-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-fox-wheel fox fox-wheel-lod0-jg fox-wheel-idle-ja + ((fox-wheel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.15) + :shadow fox-wheel-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-fox-wheel-blur fox fox-wheel-blur-lod0-jg fox-wheel-blur-idle-ja + ((fox-wheel-blur-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.15) + :shadow fox-wheel-blur-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-rhino rhino rhino-lod0-jg rhino-idle-ja + ((rhino-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + :shadow rhino-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-rhino-wheel rhino rhino-wheel-lod0-jg rhino-wheel-idle-ja + ((rhino-wheel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 0.59) + :shadow rhino-wheel-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-mirage snake snake-lod0-jg snake-idle-ja + ((snake-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :shadow snake-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-mirage-wheel snake snake-wheel-lod0-jg snake-wheel-idle-ja + ((snake-wheel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.15) + :shadow snake-wheel-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-mirage-wheel-blur snake snake-wheel-blur-lod0-jg snake-wheel-blur-idle-ja + ((snake-wheel-blur-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.15) + :shadow snake-wheel-blur-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-x-ride fox fox-lod0-jg fox-idle-ja + ((fox-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :shadow fox-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-x-ride-wheel fox fox-wheel-lod0-jg fox-wheel-idle-ja + ((fox-wheel-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.15) + :shadow fox-wheel-shadow-mg + ) + +;; failed to figure out what this is: +(defskelgroup skel-v-x-ride-wheel-blur fox fox-wheel-blur-lod0-jg fox-wheel-blur-idle-ja + ((fox-wheel-blur-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 1.15) + :shadow fox-wheel-blur-shadow-mg + ) 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 0000000000..da02febddb --- /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 new file mode 100644 index 0000000000..2a97c55549 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-h_REF.gc @@ -0,0 +1,637 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type wvehicle-sound-loop-state +(deftype wvehicle-sound-loop-state (structure) + ((id sound-id) + (vol float) + (pitch float) + ) + :allow-misaligned + ) + +;; definition for method 3 of type wvehicle-sound-loop-state +(defmethod inspect ((this wvehicle-sound-loop-state)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'wvehicle-sound-loop-state) + (format #t "~1Tid: ~D~%" (-> this id)) + (format #t "~1Tvol: ~f~%" (-> this vol)) + (format #t "~1Tpitch: ~f~%" (-> this pitch)) + (label cfg-4) + this + ) + +;; definition of type vehicle-wheel-surface +(deftype vehicle-wheel-surface (structure) + ((flags vehicle-wheel-surface-flag) + (surface-type uint8) + (friction float) + (drag float) + (depth float) + (damage float) + (tire-roll-mix float 4) + (tire-roll-hum float :overlay-at (-> tire-roll-mix 0)) + (tire-roll-dirt float :overlay-at (-> tire-roll-mix 1)) + (tire-roll-sand float :overlay-at (-> tire-roll-mix 2)) + (tire-roll-knobby float :overlay-at (-> tire-roll-mix 3)) + (tire-slide-mix float 2) + (tire-slide-road float :overlay-at (-> tire-slide-mix 0)) + (tire-slide-dirt float :overlay-at (-> tire-slide-mix 1)) + ) + ) + +;; definition for method 3 of type vehicle-wheel-surface +(defmethod inspect ((this vehicle-wheel-surface)) + (when (not this) + (set! this this) + (goto cfg-23) + ) + (format #t "[~8x] ~A~%" this 'vehicle-wheel-surface) + (format #t "~1Tflags: #x~X : (vehicle-wheel-surface-flag " (-> this flags)) + (let ((a0-3 (-> this flags))) + (if (= (logand a0-3 (vehicle-wheel-surface-flag moving)) (vehicle-wheel-surface-flag moving)) + (format #t "moving ") + ) + ) + (format #t ")~%") + (let ((t9-4 format) + (a0-7 #t) + (a1-4 "~1Tsurface-type: #x~X : ~S~%") + (a2-2 (-> this surface-type)) + (v1-5 (-> this surface-type)) + ) + (t9-4 a0-7 a1-4 a2-2 (cond + ((= v1-5 5) + "wall" + ) + ((= v1-5 6) + "conveyor" + ) + ((zero? v1-5) + "stone" + ) + ((= v1-5 1) + "dirt" + ) + ((= v1-5 4) + "water" + ) + ((= v1-5 3) + "quicksand" + ) + ((= v1-5 7) + "none" + ) + ((= v1-5 2) + "sand" + ) + (else + "*unknown*" + ) + ) + ) + ) + (format #t "~1Tfriction: ~f~%" (-> this friction)) + (format #t "~1Tdrag: ~f~%" (-> this drag)) + (format #t "~1Tdepth: ~f~%" (-> this depth)) + (format #t "~1Tdamage: ~f~%" (-> this damage)) + (format #t "~1Ttire-roll-mix[4] @ #x~X~%" (-> this tire-roll-mix)) + (format #t "~1Ttire-roll-hum: ~f~%" (-> this tire-roll-hum)) + (format #t "~1Ttire-roll-dirt: ~f~%" (-> this tire-roll-dirt)) + (format #t "~1Ttire-roll-sand: ~f~%" (-> this tire-roll-sand)) + (format #t "~1Ttire-roll-knobby: ~f~%" (-> this tire-roll-knobby)) + (format #t "~1Ttire-slide-mix[2] @ #x~X~%" (-> this tire-slide-mix)) + (format #t "~1Ttire-slide-road: ~f~%" (-> this tire-slide-road)) + (format #t "~1Ttire-slide-dirt: ~f~%" (-> this tire-slide-dirt)) + (label cfg-23) + this + ) + +;; definition of type vehicle-wheel-state +(deftype vehicle-wheel-state (structure) + ((info vehicle-wheel-info) + (flags uint8) + (prev-flags uint8) + (handle handle) + (probe-local-pos vector :inline) + (probe-local-dir vector :inline) + (local-axis vector :inline) + (surface-pos vector :inline) + (ground-pos vector :inline) + (ground-normal vector :inline) + (trans vector :inline) + (quat quaternion :inline) + (trail-pos vector 2 :inline) + (surface vehicle-wheel-surface) + (pos float) + (pos2 float) + (inertia float) + (steer-angle float) + (angle float) + (rev float) + (x-scale float) + (torque float) + (braking-torque float) + (up-force float) + (drive-diff float) + (side-vel float) + (up-vel float) + (forward-vel float) + (forward-slip-vel float) + (friction-coef float) + (sink-depth float) + (sin-susp-ang float) + (cos-susp-ang float) + (part-birth-accum sparticle-launch-control 4) + (tread-time uint32) + (tread-tracker handle) + ) + ) + +;; definition for method 3 of type vehicle-wheel-state +(defmethod inspect ((this vehicle-wheel-state)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-wheel-state) + (format #t "~1Tinfo: #~%" (-> this info)) + (format #t "~1Tflags: ~D~%" (-> this flags)) + (format #t "~1Tprev-flags: ~D~%" (-> this prev-flags)) + (format #t "~1Thandle: ~D~%" (-> this handle)) + (format #t "~1Tprobe-local-pos: #~%" (-> this probe-local-pos)) + (format #t "~1Tprobe-local-dir: #~%" (-> this probe-local-dir)) + (format #t "~1Tlocal-axis: #~%" (-> this local-axis)) + (format #t "~1Tsurface-pos: #~%" (-> this surface-pos)) + (format #t "~1Tground-pos: #~%" (-> this ground-pos)) + (format #t "~1Tground-normal: #~%" (-> this ground-normal)) + (format #t "~1Ttrans: #~%" (-> this trans)) + (format #t "~1Tquat: #~%" (-> this quat)) + (format #t "~1Ttrail-pos[2] @ #x~X~%" (-> this trail-pos)) + (format #t "~1Tsurface: #~%" (-> this surface)) + (format #t "~1Tpos: ~f~%" (-> this pos)) + (format #t "~1Tpos2: ~f~%" (-> this pos2)) + (format #t "~1Tinertia: ~f~%" (-> this inertia)) + (format #t "~1Tsteer-angle: ~f~%" (-> this steer-angle)) + (format #t "~1Tangle: ~f~%" (-> this angle)) + (format #t "~1Trev: ~f~%" (-> this rev)) + (format #t "~1Tx-scale: ~f~%" (-> this x-scale)) + (format #t "~1Ttorque: ~f~%" (-> this torque)) + (format #t "~1Tbraking-torque: ~f~%" (-> this braking-torque)) + (format #t "~1Tup-force: ~f~%" (-> this up-force)) + (format #t "~1Tdrive-diff: ~f~%" (-> this drive-diff)) + (format #t "~1Tside-vel: ~f~%" (-> this side-vel)) + (format #t "~1Tup-vel: ~f~%" (-> this up-vel)) + (format #t "~1Tforward-vel: ~f~%" (-> this forward-vel)) + (format #t "~1Tforward-slip-vel: ~f~%" (-> this forward-slip-vel)) + (format #t "~1Tfriction-coef: ~f~%" (-> this friction-coef)) + (format #t "~1Tsink-depth: ~f~%" (-> this sink-depth)) + (format #t "~1Tsin-susp-ang: ~f~%" (-> this sin-susp-ang)) + (format #t "~1Tcos-susp-ang: ~f~%" (-> this cos-susp-ang)) + (format #t "~1Tpart-birth-accum[4] @ #x~X~%" (-> this part-birth-accum)) + (format #t "~1Ttread-time: ~D~%" (-> this tread-time)) + (format #t "~1Ttread-tracker: ~D~%" (-> this tread-tracker)) + (label cfg-4) + this + ) + +;; definition of type wvehicle-probe-work +(deftype wvehicle-probe-work (structure) + ((local-pos vector :inline) + (local-normal vector :inline) + (world-pos vector :inline) + (world-normal vector :inline) + (wheel-axis vector :inline) + (side-dir vector :inline) + (forward-dir vector :inline) + (velocity vector :inline) + (probe-uu float) + ) + ) + +;; definition for method 3 of type wvehicle-probe-work +(defmethod inspect ((this wvehicle-probe-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'wvehicle-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 "~1Twheel-axis: #~%" (-> this wheel-axis)) + (format #t "~1Tside-dir: #~%" (-> this side-dir)) + (format #t "~1Tforward-dir: #~%" (-> this forward-dir)) + (format #t "~1Tvelocity: #~%" (-> this velocity)) + (format #t "~1Tprobe-uu: ~f~%" (-> this probe-uu)) + (label cfg-4) + this + ) + +;; definition of type wvehicle-physics-work +(deftype wvehicle-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) + (probe-dir vector :inline) + (tmp vector :inline) + (p-body vector :inline) + (axis vector :inline) + (dir vector :inline) + (ground-normal-sum vector :inline) + (ground-pos vector :inline) + (forward-dir vector :inline) + (side-dir vector :inline) + (wheel-axis vector :inline) + (wsphere sphere :inline) + (friction-coef float) + (wheel-radius float) + (side-force float) + (forward-force float) + (max-forward-tire-grip float) + (max-side-tire-grip float) + (inertia-eff float) + (ground-torque float) + (braking-torque float) + (total-torque float) + (limit-braking-torque float) + (max-braking-torque float) + (surface-drag float) + (water-y float) + (cur-time uint32) + (surface-type uint8) + (surface-depth float) + (material uint64) + (probe-work-array wvehicle-probe-work 4 :inline) + (cquery collide-query :inline) + ) + ) + +;; definition for method 3 of type wvehicle-physics-work +(defmethod inspect ((this wvehicle-physics-work)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'wvehicle-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 "~1Tprobe-dir: #~%" (-> this probe-dir)) + (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-sum: #~%" (-> this ground-normal-sum)) + (format #t "~1Tground-pos: #~%" (-> this ground-pos)) + (format #t "~1Tforward-dir: #~%" (-> this forward-dir)) + (format #t "~1Tside-dir: #~%" (-> this side-dir)) + (format #t "~1Twheel-axis: #~%" (-> this wheel-axis)) + (format #t "~1Twsphere: #~%" (-> this wsphere)) + (format #t "~1Tfriction-coef: ~f~%" (-> this friction-coef)) + (format #t "~1Twheel-radius: ~f~%" (-> this wheel-radius)) + (format #t "~1Tside-force: ~f~%" (-> this side-force)) + (format #t "~1Tforward-force: ~f~%" (-> this forward-force)) + (format #t "~1Tmax-forward-tire-grip: ~f~%" (-> this max-forward-tire-grip)) + (format #t "~1Tmax-side-tire-grip: ~f~%" (-> this max-side-tire-grip)) + (format #t "~1Tinertia-eff: ~f~%" (-> this inertia-eff)) + (format #t "~1Tground-torque: ~f~%" (-> this ground-torque)) + (format #t "~1Tbraking-torque: ~f~%" (-> this braking-torque)) + (format #t "~1Ttotal-torque: ~f~%" (-> this total-torque)) + (format #t "~1Tlimit-braking-torque: ~f~%" (-> this limit-braking-torque)) + (format #t "~1Tmax-braking-torque: ~f~%" (-> this max-braking-torque)) + (format #t "~1Tsurface-drag: ~f~%" (-> this surface-drag)) + (format #t "~1Twater-y: ~f~%" (-> this water-y)) + (format #t "~1Tcur-time: ~D~%" (-> this cur-time)) + (format #t "~1Tsurface-type: ~D~%" (-> this surface-type)) + (format #t "~1Tsurface-depth: ~f~%" (-> this surface-depth)) + (format #t "~1Tmaterial: ~D~%" (-> this material)) + (format #t "~1Tprobe-work-array[4] @ #x~X~%" (-> this probe-work-array)) + (format #t "~1Tcquery: #~%" (-> this cquery)) + (label cfg-4) + this + ) + +;; definition of type wvehicle +(deftype wvehicle (vehicle) + ((race race-control :inline) + (target-status squad-target-status :inline) + (ai-controls vehicle-controls :inline) + (minimap connection-minimap) + (net basic) + (engine-rev float) + (engine-inertia float) + (engine-torque float) + (engine-max-torque float) + (engine-rpm float) + (sound-engine-rpm float) + (wheel-rev float) + (wheel-inertia float) + (wheel-torque float) + (wheel-braking-torque float) + (wheel-ground-torque float) + (clutch-grab float) + (gear-ratio float) + (final-drive-ratio float) + (total-gear-ratio float) + (inv-total-gear-ratio float) + (avg-drive-wheel-radius float) + (drive-wheel-inertia float) + (clutch-inertia float) + (idle-throttle float) + (susp-spring-control float) + (jump-control float) + (ai-min-speed float) + (ai-max-speed float) + (shortcut-speed-factor float) + (path-deviation float) + (turbo-supply float) + (turbo-ready float) + (ai-state uint8) + (return-ai-state uint8) + (i-barrel int8) + (shift-state uint8) + (gear-select int8) + (next-gear-select int8) + (shift-time uint32) + (impact rigid-body-impact :inline) + (wheel vehicle-wheel-state 4 :inline) + (gravity-dir vector :inline) + (ai-target-point vector :inline) + (surface-velocity vector :inline) + (turret-local-pos vector :inline) + (gun-local-pos vector :inline) + (gun-local-dir vector :inline) + (gun-aim-yaw float) + (gun-aim-yaw-vel float) + (gun-targ-yaw float) + (gun-targ-pitch float) + (gun-yaw float) + (gun-pitch float) + (gun-yaw-vel float) + (gun-pitch-vel float) + (gun-kick float) + (lock-turret basic) + (tire-roll-loop-state wvehicle-sound-loop-state 4 :inline) + (tire-slide-loop-state wvehicle-sound-loop-state 2 :inline) + (engine1-sound-id sound-id :offset 2472) + (engine2-sound-id sound-id) + (engine3-sound-id sound-id) + (damage-sound-id sound-id) + (water-sound-id sound-id) + (turbo-sound-id sound-id) + (shortcut-time uint32) + (overturned-time uint32) + (splash-time uint32) + (knobby-time uint32) + (susp-creak-time uint32) + (shoot-time uint32) + (shoot-delay uint32) + (jump-time uint32) + (ground-time uint32) + (ram-time uint32) + (attached-array handle 16) + (eng1-vol float) + (eng2-vol float) + (eng3-vol float) + (eng-pitch-variance float) + (eng-pitch-variance-seek float) + (eng-vol-variance float) + (eng-vol-variance-seek float) + (eng-pitch-offset float) + (eng-flutter-envelope float) + (water-sound-envelope float) + (other-proc handle) + (other-pos vector :inline) + ) + :allow-misaligned + (:state-methods + hostile + undefined0 + race-waiting + race-racing + race-finished + undefined1 + explode-into-nothing + sink + ) + (:methods + (wvehicle-method-160 (_type_ wvehicle-physics-work) none) + (spawn-wheels! (_type_ skeleton-group skeleton-group skeleton-group skeleton-group) none) + (wvehicle-method-162 (_type_ float) none) + (wvehicle-method-163 (_type_) none) + (wvehicle-method-164 (_type_ vehicle-wheel-state vehicle-wheel-info) none) + (wvehicle-method-165 (_type_) none) + (wvehicle-method-166 (_type_ float float) float) + (wvehicle-method-167 (_type_) none) + (wvehicle-method-168 (_type_) none) + (wvehicle-method-169 (_type_) none) + (wvehicle-method-170 (_type_) none) + (wvehicle-method-171 (_type_ vector int) none) + (wvehicle-method-172 (_type_ quaternion int) none) + (wvehicle-method-173 (_type_ vector) int) + (get-attached-by-idx (_type_ int) process-focusable) + (add-attached-at-idx (_type_ int process-focusable) none) + (remove-attached-from-arr (_type_ process-focusable) symbol) + (wvehicle-method-177 (_type_ vehicle-controls) none) + (wvehicle-method-178 (_type_) none) + (wvehicle-method-179 (_type_) none) + (race-select-path-randomly-from-mask (_type_ uint) none) + (wvehicle-method-181 (_type_) none) + (wvehicle-method-182 (_type_) none) + (wvehicle-method-183 (_type_ vehicle-controls) none) + (wvehicle-method-184 (_type_) none) + (wvehicle-method-185 (_type_) none) + (wvehicle-method-186 (_type_) none) + (wvehicle-method-187 (_type_) none) + (wvehicle-method-188 (_type_) none) + (wvehicle-method-189 (_type_ vehicle-wheel-state wvehicle-part-work wvehicle-wheel-launcher-spec) none) + (wvehicle-method-190 (_type_ vehicle-wheel-state wvehicle-part-work) none) + (wvehicle-method-191 (_type_ vehicle-wheel-state wvehicle-part-work) symbol) + (wvehicle-method-192 (_type_ vehicle-wheel-state wvehicle-part-work) none) + (wvehicle-method-193 (_type_ vehicle-wheel-state wvehicle-part-work) none) + (wvehicle-method-194 (_type_ vehicle-wheel-state wvehicle-part-work) none) + (wvehicle-method-195 (_type_) none) + (wvehicle-method-196 (_type_) none) + (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_ float) none) + (wvehicle-method-202 (_type_ float) none) + ) + ) + +;; definition for method 3 of type wvehicle +(defmethod inspect ((this wvehicle)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type vehicle inspect))) + (t9-0 this) + ) + (format #t "~2Trace: #~%" (-> this race)) + (format #t "~2Ttarget-status: #~%" (-> this target-status)) + (format #t "~2Tai-controls: #~%" (-> this ai-controls)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (format #t "~2Tnet: ~A~%" (-> this net)) + (format #t "~2Tengine-rev: ~f~%" (-> this engine-rev)) + (format #t "~2Tengine-inertia: ~f~%" (-> this engine-inertia)) + (format #t "~2Tengine-torque: ~f~%" (-> this engine-torque)) + (format #t "~2Tengine-max-torque: ~f~%" (-> this engine-max-torque)) + (format #t "~2Tengine-rpm: ~f~%" (-> this engine-rpm)) + (format #t "~2Tsound-engine-rpm: ~f~%" (-> this sound-engine-rpm)) + (format #t "~2Twheel-rev: ~f~%" (-> this wheel-rev)) + (format #t "~2Twheel-inertia: ~f~%" (-> this wheel-inertia)) + (format #t "~2Twheel-torque: ~f~%" (-> this wheel-torque)) + (format #t "~2Twheel-braking-torque: ~f~%" (-> this wheel-braking-torque)) + (format #t "~2Twheel-ground-torque: ~f~%" (-> this wheel-ground-torque)) + (format #t "~2Tclutch-grab: ~f~%" (-> this clutch-grab)) + (format #t "~2Tgear-ratio: ~f~%" (-> this gear-ratio)) + (format #t "~2Tfinal-drive-ratio: ~f~%" (-> this final-drive-ratio)) + (format #t "~2Ttotal-gear-ratio: ~f~%" (-> this total-gear-ratio)) + (format #t "~2Tinv-total-gear-ratio: ~f~%" (-> this inv-total-gear-ratio)) + (format #t "~2Tavg-drive-wheel-radius: ~f~%" (-> this avg-drive-wheel-radius)) + (format #t "~2Tdrive-wheel-inertia: ~f~%" (-> this drive-wheel-inertia)) + (format #t "~2Tclutch-inertia: ~f~%" (-> this clutch-inertia)) + (format #t "~2Tidle-throttle: ~f~%" (-> this idle-throttle)) + (format #t "~2Tsusp-spring-control: ~f~%" (-> this susp-spring-control)) + (format #t "~2Tjump-control: ~f~%" (-> this jump-control)) + (format #t "~2Tai-min-speed: ~f~%" (-> this ai-min-speed)) + (format #t "~2Tai-max-speed: ~f~%" (-> this ai-max-speed)) + (format #t "~2Tshortcut-speed-factor: ~f~%" (-> this shortcut-speed-factor)) + (format #t "~2Tpath-deviation: ~f~%" (-> this path-deviation)) + (format #t "~2Tturbo-supply: ~f~%" (-> this turbo-supply)) + (format #t "~2Tturbo-ready: ~f~%" (-> this turbo-ready)) + (format #t "~2Tai-state: ~D~%" (-> this ai-state)) + (format #t "~2Treturn-ai-state: ~D~%" (-> this return-ai-state)) + (format #t "~2Ti-barrel: ~D~%" (-> this i-barrel)) + (format #t "~2Tshift-state: ~D~%" (-> this shift-state)) + (format #t "~2Tgear-select: ~D~%" (-> this gear-select)) + (format #t "~2Tnext-gear-select: ~D~%" (-> this next-gear-select)) + (format #t "~2Tshift-time: ~D~%" (-> this shift-time)) + (format #t "~2Timpact: #~%" (-> this impact)) + (format #t "~2Twheel[4] @ #x~X~%" (-> this wheel)) + (format #t "~2Tgravity-dir: #~%" (-> this gravity-dir)) + (format #t "~2Tai-target-point: #~%" (-> this ai-target-point)) + (format #t "~2Tsurface-velocity: #~%" (-> this surface-velocity)) + (format #t "~2Tturret-local-pos: #~%" (-> this turret-local-pos)) + (format #t "~2Tgun-local-pos: #~%" (-> this gun-local-pos)) + (format #t "~2Tgun-local-dir: #~%" (-> this gun-local-dir)) + (format #t "~2Tgun-aim-yaw: ~f~%" (-> this gun-aim-yaw)) + (format #t "~2Tgun-aim-yaw-vel: ~f~%" (-> this gun-aim-yaw-vel)) + (format #t "~2Tgun-targ-yaw: ~f~%" (-> this gun-targ-yaw)) + (format #t "~2Tgun-targ-pitch: ~f~%" (-> this gun-targ-pitch)) + (format #t "~2Tgun-yaw: ~f~%" (-> this gun-yaw)) + (format #t "~2Tgun-pitch: ~f~%" (-> this gun-pitch)) + (format #t "~2Tgun-yaw-vel: ~f~%" (-> this gun-yaw-vel)) + (format #t "~2Tgun-pitch-vel: ~f~%" (-> this gun-pitch-vel)) + (format #t "~2Tgun-kick: ~f~%" (-> this gun-kick)) + (format #t "~2Tlock-turret: ~A~%" (-> this lock-turret)) + (format #t "~2Ttire-roll-loop-state[4] @ #x~X~%" (-> this tire-roll-loop-state)) + (format #t "~2Ttire-slide-loop-state[2] @ #x~X~%" (-> this tire-slide-loop-state)) + (format #t "~2Tengine1-sound-id: ~D~%" (-> this engine1-sound-id)) + (format #t "~2Tengine2-sound-id: ~D~%" (-> this engine2-sound-id)) + (format #t "~2Tengine3-sound-id: ~D~%" (-> this engine3-sound-id)) + (format #t "~2Tdamage-sound-id: ~D~%" (-> this damage-sound-id)) + (format #t "~2Twater-sound-id: ~D~%" (-> this water-sound-id)) + (format #t "~2Tturbo-sound-id: ~D~%" (-> this turbo-sound-id)) + (format #t "~2Tshortcut-time: ~D~%" (-> this shortcut-time)) + (format #t "~2Toverturned-time: ~D~%" (-> this overturned-time)) + (format #t "~2Tsplash-time: ~D~%" (-> this splash-time)) + (format #t "~2Tknobby-time: ~D~%" (-> this knobby-time)) + (format #t "~2Tsusp-creak-time: ~D~%" (-> this susp-creak-time)) + (format #t "~2Tshoot-time: ~D~%" (-> this shoot-time)) + (format #t "~2Tshoot-delay: ~D~%" (-> this shoot-delay)) + (format #t "~2Tjump-time: ~D~%" (-> this jump-time)) + (format #t "~2Tground-time: ~D~%" (-> this ground-time)) + (format #t "~2Tram-time: ~D~%" (-> this ram-time)) + (format #t "~2Tattached-array[16] @ #x~X~%" (-> this attached-array)) + (format #t "~2Teng1-vol: ~f~%" (-> this eng1-vol)) + (format #t "~2Teng2-vol: ~f~%" (-> this eng2-vol)) + (format #t "~2Teng3-vol: ~f~%" (-> this eng3-vol)) + (format #t "~2Teng-pitch-variance: ~f~%" (-> this eng-pitch-variance)) + (format #t "~2Teng-pitch-variance-seek: ~f~%" (-> this eng-pitch-variance-seek)) + (format #t "~2Teng-vol-variance: ~f~%" (-> this eng-vol-variance)) + (format #t "~2Teng-vol-variance-seek: ~f~%" (-> this eng-vol-variance-seek)) + (format #t "~2Teng-pitch-offset: ~f~%" (-> this eng-pitch-offset)) + (format #t "~2Teng-flutter-envelope: ~f~%" (-> this eng-flutter-envelope)) + (format #t "~2Twater-sound-envelope: ~f~%" (-> this water-sound-envelope)) + (format #t "~2Tother-proc: ~D~%" (-> this other-proc)) + (format #t "~2Tother-pos: #~%" (-> this other-pos)) + (label cfg-4) + this + ) + +;; definition for function rpm->radians-per-sec +;; WARN: Return type mismatch float vs degrees. +(defun rpm->radians-per-sec ((arg0 float)) + (the-as degrees (* 0.10471976 arg0)) + ) + +;; definition for function radians-per-sec->rpm +(defun radians-per-sec->rpm ((arg0 degrees)) + (* 9.549297 arg0) + ) + +;; definition of type wvehicle-ai-drop-off-params +(deftype wvehicle-ai-drop-off-params (structure) + ((dest vector :inline) + (proc process) + ) + ) + +;; definition for method 3 of type wvehicle-ai-drop-off-params +(defmethod inspect ((this wvehicle-ai-drop-off-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'wvehicle-ai-drop-off-params) + (format #t "~1Tdest: #~%" (-> this dest)) + (format #t "~1Tproc: ~A~%" (-> this proc)) + (label cfg-4) + this + ) + +;; definition for function wvehicle-surface-type-from-material +(defun wvehicle-surface-type-from-material ((arg0 int)) + (let ((v1-0 arg0)) + (cond + ((or (= v1-0 23) (= v1-0 6)) + 0 + ) + ((or (= v1-0 15) (zero? v1-0)) + 1 + ) + ((= v1-0 5) + 2 + ) + ((= v1-0 2) + 3 + ) + ((= v1-0 16) + 6 + ) + (else + 1 + ) + ) + ) + ) + +;; failed to figure out what this is: +0 diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-hud_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-hud_REF.gc new file mode 100644 index 0000000000..89339c23d1 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-hud_REF.gc @@ -0,0 +1,117 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type hud-vehicle-turbo +(deftype hud-vehicle-turbo (hud) + ((tex-rim texture) + (tex-on texture) + (tex-off texture) + ) + ) + +;; definition for method 3 of type hud-vehicle-turbo +(defmethod inspect ((this hud-vehicle-turbo)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 this) + ) + (format #t "~2Ttex-rim: ~A~%" (-> this tex-rim)) + (format #t "~2Ttex-on: ~A~%" (-> this tex-on)) + (format #t "~2Ttex-off: ~A~%" (-> this tex-off)) + (label cfg-4) + this + ) + +;; definition for method 15 of type hud-vehicle-turbo +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-vehicle-turbo)) + (set-hud-piece-position! (the-as hud-sprite (-> this sprites)) (the int (* -100.0 (-> this offset))) 336) + (let* ((f0-5 (the float (the int (-> *game-info* vehicle-turbo-ready)))) + (f0-7 (* 120.0 (fmax 0.33 f0-5))) + (v1-5 (-> *game-info* race-number-turbos)) + ) + (dotimes (a0-2 3) + (let ((a1-3 (-> this sprites a0-2))) + (cond + ((< a0-2 v1-5) + (set! (-> a1-3 tid) (the-as texture-id (-> this tex-on))) + (set! (-> a1-3 color w) (the int f0-7)) + ) + (else + (set! (-> a1-3 tid) (the-as texture-id (-> this tex-off))) + (set! (-> a1-3 color w) (the int (* 0.5 f0-7))) + ) + ) + ) + ) + ) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) 32 0) + (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) 32 0) + (dotimes (s5-0 3) + (set-as-offset-from! (-> this sprites (+ s5-0 3)) (the-as vector4w (-> this sprites s5-0)) 0 0) + ) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-vehicle-turbo +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-vehicle-turbo)) + (logclear! (-> this flags) (hud-flags disable)) + ((method-of-type hud update-values!) this) + 0 + (none) + ) + +;; definition for method 17 of type hud-vehicle-turbo +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-vehicle-turbo)) + (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) + ) + (set! (-> this tex-on) + (lookup-level-texture-by-name "hud-turbo-boost-on-01" (-> this level) (the-as (pointer texture-page) #f)) + ) + (set! (-> this tex-off) + (lookup-level-texture-by-name "hud-turbo-boost-off-01" (-> this level) (the-as (pointer texture-page) #f)) + ) + (set! (-> this tex-rim) + (lookup-level-texture-by-name "hud-turbo-boost-rim-01" (-> this level) (the-as (pointer texture-page) #f)) + ) + (logior! (-> this flags) (hud-flags show)) + (dotimes (v1-4 6) + (let ((a0-8 (-> this sprites v1-4))) + (set! (-> a0-8 scale-x) 1.0) + (set! (-> a0-8 scale-y) 1.0) + ) + ) + (dotimes (v1-7 3) + (let ((a0-13 (-> this sprites (+ v1-7 3)))) + (set! (-> a0-13 tid) (the-as texture-id (-> this tex-rim))) + ) + ) + 0 + (none) + ) + +;; definition for function hud-vehicle-turbo-spawn +;; WARN: Return type mismatch process vs hud-vehicle-turbo. +(defun hud-vehicle-turbo-spawn ((arg0 process)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn hud-vehicle-turbo :init hud-init-by-other :name "hud-vehicle-turbo" :to arg0))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as hud-vehicle-turbo gp-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 new file mode 100644 index 0000000000..b932f6f183 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-obs_REF.gc @@ -0,0 +1,506 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-turbo-pickup + :id 231 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 998 :flags (sp6 sp7)) + (sp-item 999 :flags (sp6 sp7)) + (sp-item 1000 :flags (sp6 sp7)) + (sp-item 1001 :flags (sp7)) + (sp-item 1002 :flags (sp3) :binding 994) + (sp-item 994 :flags (sp2 sp3) :binding 995) + (sp-item 1002 :flags (sp3) :binding 996) + (sp-item 996 :flags (sp2 sp3) :binding 995) + (sp-item 1002 :flags (sp3) :binding 997) + (sp-item 997 :flags (sp2 sp3) :binding 995) + (sp-item 995 :flags (sp2)) + (sp-item 995 :flags (sp2)) + (sp-item 995 :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 998 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 100.0) + (:b 0.0) + (:a 200.0 2.0) + (:omega (degrees 18011.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 409.6) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 999 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 12)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 30.0) + (:omega (degrees 18011.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 409.6) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 1000 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 20.0 1.0) + (:omega (degrees 18011.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 409.6) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 1002 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 80.0) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 994 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters 2)) + (:z (meters 2)) + (:scale-x (meters 0.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 0)) + (:vel-x (meters 0.10666667)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 996 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters -2)) + (:z (meters 2)) + (:scale-x (meters 0.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 45)) + (:vel-x (meters -0.10666667)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 997 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:z (meters 2)) + (:scale-x (meters 0.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 90)) + (:vel-x (meters 0.10666667)) + (:vel-y (meters 0)) + (:timer (seconds -0.005)) + (:flags (ready-to-launch)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 995 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:fade-r 6.4) + (:fade-g -6.4) + (:fade-b -6.4) + (:fade-a -2.56) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 1001 + :init-specs ((:texture (light-burst level-default-sprite)) + (:num 0.06 0.06) + (:scale-x (meters 2) (meters 4)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.3) (meters 0.3)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:scalevel-x (meters 0) (meters 0.0033333334)) + (:scalevel-y (meters -0.001) (meters 0.002)) + (:fade-a 0.42666668) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:next-time (seconds 1)) + (:next-launcher 1003) + ) + ) + +;; failed to figure out what this is: +(defpart 1003 + :init-specs ((:scalevel-y (meters -0.0013333333) (meters 0.002)) (:fade-a -0.42666668)) + ) + +;; failed to figure out what this is: +(defpartgroup group-turbo-pickup-explode + :id 232 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 1006 :period (seconds 20) :length (seconds 0.3)) + (sp-item 1007 :flags (sp3) :binding 1004) + (sp-item 1004 :flags (sp2) :period (seconds 20) :length (seconds 0.335) :binding 1005) + (sp-item 1004 :flags (sp2) :period (seconds 20) :length (seconds 0.335) :binding 1005) + (sp-item 1004 :flags (sp2) :period (seconds 20) :length (seconds 0.335) :binding 1005) + (sp-item 1004 :flags (sp2) :period (seconds 20) :length (seconds 0.335) :binding 1005) + (sp-item 1004 :flags (sp2) :period (seconds 20) :length (seconds 0.335) :binding 1005) + (sp-item 1005 :flags (sp2)) + (sp-item 1005 :flags (sp2)) + (sp-item 1005 :flags (sp2)) + (sp-item 1005 :flags (sp2)) + (sp-item 1005 :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 1006 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:num 0.5) + (:scale-x (meters 20)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 32.0 32.0) + (:b :copy g) + (:a 128.0) + (:scalevel-x (meters -0.16666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-track-root) + ) + ) + +;; failed to figure out what this is: +(defpart 1007 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.001)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 64.0) + (:a 128.0) + (:timer (seconds -0.005)) + (:func 'sparticle-track-root) + ) + ) + +;; failed to figure out what this is: +(defpart 1004 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 4.0) + (:y (meters -4) (meters 16)) + (:scale-x (meters 1.3)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 0.0) + (:a 255.0) + (:omega (degrees 0) (degrees 360)) + (:vel-x (meters -0.017777778) 1 (meters 0.035555556)) + (:vel-z (meters 0.16666667)) + (:scalevel-x (meters -0.006666667)) + (:scalevel-y :copy scalevel-x) + (:accel-z (meters -0.011333333)) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 ready-to-launch)) + ) + ) + +;; failed to figure out what this is: +(defpart 1005 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:y (meters -0.05)) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 0.0) + (:a 128.0) + (:scalevel-x (meters -0.002)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.13333334 -0.13333334) + (:accel-y (meters -0.00066666666)) + (:friction 0.6 0.3) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + ) + ) + +;; definition of type turbo-pickup +(deftype turbo-pickup (process-drawable) + ((root collide-shape :override) + (available symbol) + (persistent symbol) + (birth-time time-frame) + (collector handle) + ) + (:state-methods + idle + die + ) + (:methods + (find-ground (_type_) symbol) + ) + ) + +;; definition for method 3 of type turbo-pickup +(defmethod inspect ((this turbo-pickup)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tavailable: ~A~%" (-> this available)) + (format #t "~2Tpersistent: ~A~%" (-> this persistent)) + (format #t "~2Tbirth-time: ~D~%" (-> this birth-time)) + (format #t "~2Tcollector: ~D~%" (-> this collector)) + (label cfg-4) + this + ) + +;; definition for method 22 of type turbo-pickup +;; INFO: Used lq/sq +(defmethod find-ground ((this turbo-pickup)) + (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)) + (vector-reset! (-> gp-0 vec1)) + (set! (-> gp-0 vec1 y) 1.0) + (set-vector! (-> gp-0 cquery move-dist) 0.0 -40960.0 0.0 1.0) + (let ((v1-5 (-> gp-0 cquery))) + (set! (-> v1-5 radius) 1024.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)) + ) + (let ((f0-6 (fill-and-probe-using-line-sphere *collide-cache* (-> gp-0 cquery)))) + (when (>= f0-6 0.0) + (vector+float*! (-> gp-0 vec0) (-> gp-0 cquery start-pos) (-> gp-0 cquery move-dist) f0-6) + (set! (-> gp-0 vec1 quad) (-> gp-0 cquery best-other-tri normal quad)) + (+! (-> gp-0 vec0 y) 4915.2) + (set! s4-0 #t) + (format #t "turbo-pickup::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 + ) + ) + +;; failed to figure out what this is: +(defstate idle (turbo-pickup) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (when (-> self available) + (set! (-> self collector) (process->handle proc)) + (when (send-event proc 'turbo-pickup) + (set! (-> self available) #f) + (go-virtual die) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (spawn (-> self part) (-> self root trans)) + (if (and (not (-> self persistent)) (time-elapsed? (-> self birth-time) (seconds 10))) + (go-virtual die) + ) + 0 + ) + ) + +;; failed to figure out what this is: +(defstate die (turbo-pickup) + :virtual #t + :code (behavior () + (set-time! (-> self state-time)) + (let* ((s5-0 (handle->process (-> self collector))) + (gp-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when gp-0 + (if (logtest? (-> *part-group-id-table* 232 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 232) + :target (the-as process-drawable gp-0) + :mat-joint (the-as object 0) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 232) + :target (the-as process-drawable gp-0) + :mat-joint (the-as object 0) + ) + ) + ) + ) + (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 + (when (nonzero? (-> self part)) + (kill-particles (-> self part)) + (set! (-> self part) (the-as sparticle-launch-control 0)) + 0 + ) + (until (time-elapsed? (-> self state-time) (seconds 2)) + (suspend) + ) + ) + ) + +;; definition for function turbo-pickup-init-by-other +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defbehavior turbo-pickup-init-by-other turbo-pickup ((arg0 vector) (arg1 symbol)) + (let ((s4-0 (new 'process 'collide-shape self (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 penetrate-using) (the-as penetrate -1)) + (set! (-> s4-0 penetrated-by) (the-as penetrate -1)) + (let ((v1-4 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (set! (-> v1-4 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-4 prim-core collide-with) (collide-spec vehicle-sphere hit-by-others-list)) + (set-vector! (-> v1-4 local-sphere) 0.0 0.0 0.0 14336.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! (-> s4-0 event-self) 'touched) + (set! (-> self root) s4-0) + ) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-identity! (-> self root quat)) + (update-transforms (-> self root)) + (set! (-> self available) #t) + (set! (-> self persistent) arg1) + (set-time! (-> self birth-time)) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 231) self)) + (set! (-> self collector) (the-as handle #f)) + (go-virtual idle) + (none) + ) + +;; definition for function race-turbo-pickup-spawn +;; WARN: Return type mismatch process vs turbo-pickup. +(defun race-turbo-pickup-spawn ((arg0 process) (arg1 vector)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn turbo-pickup arg1 #t :name "turbo-pickup" :to arg0))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as turbo-pickup gp-0) + ) + ) + +;; definition for function turbo-pickup-spawn +;; WARN: Return type mismatch process vs turbo-pickup. +(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 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as turbo-pickup gp-0) + ) + ) + + + + 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 new file mode 100644 index 0000000000..ab5fb9fef5 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-part_REF.gc @@ -0,0 +1,1338 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function sparticle-motion-blur-dirt +;; INFO: function output is handled by mips2c +(def-mips2c sparticle-motion-blur-dirt (function sparticle-system sparticle-cpuinfo vector none)) + +;; definition for function spt-birth-func-brightness-buggy-rocks +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-buggy-rocks ((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 953 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-buggy-rocks) + (:num 1.0) + (:x (meters 0) (meters 0.2)) + (:scale-x (meters 0.1) (meters 0.2)) + (: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.01)) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:accel-y (meters -0.001)) + (:timer (seconds 1.5)) + (: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 'sparticle-texture-animate) + (:conerot-x (degrees -5) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-buggy-rocks +(defun spt-birth-func-part-buggy-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-buggy-rocks arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpart 954 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-dbuggy-debris) + (:num 1.0) + (:x (meters -1) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 1)) + (:r 200.0) + (:g 200.0) + (:b 200.0) + (:a 128.0) + (:vel-y (meters 0.033333335)) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:accel-y (meters -0.0016666667) (meters -0.00066666666)) + (:friction 0.96) + (:timer (seconds 1)) + (: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 -5) (degrees 10)) + (:rotate-y (degrees 0)) + ) + ) + +;; definition for function spt-birth-func-part-dbuggy-debris +(defun spt-birth-func-part-dbuggy-debris ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (birth-func-set-vel-2d arg0 arg1 arg2) + (spt-birth-func-brightness-buggy-rocks arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpart 955 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-set-vel) + (:num 1.0) + (:x (meters -1) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 128.0) + (:vel-y (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.0016666667) (meters -0.00066666666)) + (:friction 0.96) + (:timer (seconds 0.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-z (degrees -5) (degrees 10)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 956 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.05) + (:scale-x (meters 0.5)) + (:scale-y (meters 0.5)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0 16.0) + (:scalevel-x (meters 0.008333334) (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.07111111 -0.07111111) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-wv-water-splash + :id 226 + :duration (seconds 5) + :flags (sp0) + :bounds (static-bspherem 0 -12 0 14) + :parts ((sp-item 957 :fade-after (meters 60) :flags (sp7) :period (seconds 10) :length (seconds 0.2)) + (sp-item 958 :fade-after (meters 60) :flags (sp7) :period (seconds 10) :length (seconds 0.067) :offset 125) + (sp-item 959 :fade-after (meters 60) :flags (is-3d sp7) :period (seconds 10) :length (seconds 0.067)) + (sp-item 960 :fade-after (meters 60) :flags (is-3d sp7) :period (seconds 10) :length (seconds 0.167) :offset 125) + ) + ) + +;; failed to figure out what this is: +(defpart 957 + :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.016666668)) + (: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-wv-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-wv-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-wv-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 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-wv-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 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-wv-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-wv-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-wv-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-wv-water-splash-curve-settings*, type particle-curve-settings +(define *part-wv-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* 957 init-specs 13 initial-valuef) + (the-as float *part-wv-water-splash-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-wv-water-splash-curve-settings* color-start) *range-wv-wsplash-color*) + +;; failed to figure out what this is: +(set! (-> *part-wv-water-splash-curve-settings* alpha-start) *range-wv-wsplash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-wv-water-splash-curve-settings* scale-x-start) *range-wv-wsplash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-wv-water-splash-curve-settings* scale-y-start) *range-wv-wsplash-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-wv-water-splash-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-wv-water-splash-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-wv-water-splash-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-wv-water-splash-curve-settings* a-scalar) *curve-wv-wsplash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-wv-water-splash-curve-settings* scale-x-scalar) *curve-wv-wsplash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-wv-water-splash-curve-settings* scale-y-scalar) *curve-wv-wsplash-scale-y*) + +;; failed to figure out what this is: +(defpart 958 + :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-wv-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-wv-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-wv-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 5.0 :z 6.0 :w 7.0) + :one-over-x-deltas (new 'static 'vector :x 4.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-wv-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 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-wv-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-wv-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-wv-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-wv-water-splash-center-curve-settings*, type particle-curve-settings +(define *part-wv-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* 958 init-specs 11 initial-valuef) + (the-as float *part-wv-water-splash-center-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-wv-water-splash-center-curve-settings* color-start) *range-wv-splash-color*) + +;; failed to figure out what this is: +(set! (-> *part-wv-water-splash-center-curve-settings* alpha-start) *range-wv-splash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-wv-water-splash-center-curve-settings* scale-x-start) *range-wv-splash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-wv-water-splash-center-curve-settings* scale-y-start) *range-wv-splash-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-wv-water-splash-center-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-wv-water-splash-center-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-wv-water-splash-center-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-wv-water-splash-center-curve-settings* a-scalar) *curve-wv-splash-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-wv-water-splash-center-curve-settings* scale-x-scalar) *curve-wv-splash-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-wv-water-splash-center-curve-settings* scale-y-scalar) *curve-wv-splash-scale-y*) + +;; failed to figure out what this is: +(defpart 959 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.4) + (:scale-x (meters 2) (meters 0.5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 2) (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 set-conerot)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 960 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.2) + (:scale-x (meters 0) (meters 0.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.00033333333) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (: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: +(defpart 961 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 5.0) + (:x (meters 0) (meters 1)) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-z (degrees 0) (degrees 3600)) + (: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)) + (: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 2)) + (:flags (sp-cpuinfo-flag-3 set-conerot)) + (:conerot-x (degrees -40) (degrees 80)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 962 + :init-specs ((:texture (ripples level-default-sprite)) + (: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 set-conerot)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 963 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 2.0 2.0) + (: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.026666667) (meters 0.026666667)) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3 set-conerot)) + (:func 'check-water-level-drop) + (:conerot-x (degrees -2) (degrees 4)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 964 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-set-vel) + (:num 0.4) + (:scale-x (meters 2)) + (:rot-z (degrees 0) (degrees 3598.0002)) + (:scale-y (meters 2)) + (:r 150.0) + (:g 120.0) + (:b 90.0) + (:a 20.0) + (:vel-y (meters 0) (meters 0.013333334)) + (:scalevel-x (meters 0.016666668)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.07111111 -0.07111111) + (:accel-y (meters 0) (meters 0.000033333334)) + (:friction 0.98) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:next-time (seconds 1)) + (:next-launcher 965) + (:launchrot-x (degrees -90)) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-x (degrees 30)) + (:rotate-z (degrees -20) (degrees 40)) + ) + ) + +;; failed to figure out what this is: +(defpart 965 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-scorp-shells + :id 227 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 966 :flags (sp7)) (sp-item 967 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 966 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 5.0) + (:y (meters 0.25)) + (:scale-x (meters 0.2) (meters 0.1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0 128.0) + (:a 32.0 16.0) + (:omega (degrees 0)) + (:vel-y (meters 0.053333335) (meters 0.026666667)) + (:scalevel-x (meters 0.01) (meters 0.006666667)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.4 -0.4) + (:friction 0.85 0.04) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:conerot-x (degrees -45) (degrees 10)) + (:conerot-y (degrees 85) (degrees 10)) + (:rotate-y (degrees 0)) + (:conerot-radius (meters 0) (meters 0.4)) + ) + ) + +;; failed to figure out what this is: +(defpart 967 + :init-specs ((:texture (shell-casing-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:y (meters 0.25)) + (:scale-x (meters 0.35)) + (:rot-z (degrees 260) (degrees 20)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 20.0) + (:a 128.0) + (:omega (degrees 0)) + (:vel-y (meters 0.06666667) (meters 0.026666667)) + (:rotvel-z (degrees -4.8) (degrees 2.4)) + (:accel-y (meters -0.008333334) (meters -0.0016666667)) + (:timer (seconds 1.2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 30 0 0 #x408700 #x408700 #x408700 #x408800)) + (:func 'check-scorp-shell-level1) + (:next-time (seconds 0.017) (seconds 0.53)) + (:next-launcher 968) + (:conerot-x (degrees -40) (degrees 20)) + (:conerot-y (degrees 80) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 968 + :init-specs ((:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:next-time (seconds 0.017) (seconds 0.015)) + (:next-launcher 969) + ) + ) + +;; failed to figure out what this is: +(defpart 969 + :init-specs ((:r 128.0) (:g 128.0) (:b 20.0) (:a 128.0)) + ) + +;; failed to figure out what this is: +(defpart 970 + :init-specs ((:texture (shell-casing-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:scale-x (meters 0.35)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 20.0) + (:a 128.0) + (:omega (degrees 0)) + (:vel-y (meters 0.026666667) (meters 0.016666668)) + (:rotvel-z (degrees -2.4) (degrees 4.8)) + (:accel-y (meters -0.0026666666) (meters -0.00083333335)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 30 0 0 #x408700 #x408800 #x408900)) + (:func 'check-scorp-shell-level2) + (:next-time (seconds 0.017) (seconds 0.53)) + (:next-launcher 968) + (:conerot-x (degrees 0) (degrees 45)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 971 + :init-specs ((:texture (shell-casing-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:scale-x (meters 0.35)) + (:rot-z (degrees 30) (degrees 120)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 20.0) + (:a 128.0) + (:vel-x (meters 0) (meters 0.0033333334)) + (:vel-y (meters 0.016666668)) + (:vel-z (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:accel-y (meters -0.0016666667)) + (:friction 0.9) + (:timer (seconds 40)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 30 0 0 #x408800 #x408800 #x408900)) + (:next-time (seconds 0.25)) + (:next-launcher 972) + (:conerot-x (degrees 30) (degrees 30)) + (:conerot-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 972 + :init-specs ((:vel-x (meters 0)) + (:vel-y (meters 0)) + (:vel-z (meters 0)) + (:rotvel-z (degrees 0)) + (:accel-y (meters 0)) + (:next-time (seconds 2) (seconds 0.997)) + (:next-launcher 973) + ) + ) + +;; failed to figure out what this is: +(defpart 973 + :init-specs ((:fade-a -0.512)) + ) + +;; failed to figure out what this is: +(defpart 974 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 0.0 1 2.0) + (:scale-x (meters 2.5)) + (:rot-x 4) + (:scale-y (meters 0.03) (meters 0.005)) + (:r 255.0) + (:g 128.0 128.0) + (:b 0.0 128.0) + (:a 128.0) + (:omega (degrees 0.01125) (degrees 0.0045)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-g -2.55 -2.55) + (:fade-b -8.0) + (:fade-a -0.64 -0.64) + (:accel-y (meters -0.00033333333) (meters -0.00033333333)) + (:friction 0.8 0.02) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 60) (degrees 20)) + (:conerot-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function check-scorp-shell-level1 +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun check-scorp-shell-level1 ((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) + (set! (-> *part-id-table* 970 init-specs 10 initial-valuef) (-> gp-0 y)) + (launch-particles (-> *part-id-table* 970) gp-0) + (launch-particles (-> *part-id-table* 974) gp-0) + ) + ) + 0 + (none) + ) + +;; definition for function check-scorp-shell-level2 +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun check-scorp-shell-level2 ((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) + (launch-particles (-> *part-id-table* 971) gp-0) + (launch-particles (-> *part-id-table* 974) gp-0) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 975 + :init-specs ((:texture (gun-blue-beam level-default-sprite)) + (:birth-func 'birth-func-setup-beam) + (:num 1.0) + (:scale-x (meters 0.3) (meters 0.1)) + (:scale-y (meters 100) (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 16.0) + (:fade-a 0.8) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-14 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 30 0 0 #x401000 #x401200)) + (:func 'sparticle-texture-animate) + (:next-time (seconds 0.05)) + (:next-launcher 976) + ) + ) + +;; failed to figure out what this is: +(defpart 976 + :init-specs ((:scalevel-x (meters 0.033333335)) + (:scalevel-y (meters -0.13333334)) + (:fade-r 0.85333335) + (:fade-g 0.85333335) + (:fade-b 0.85333335) + (:fade-a -0.21333334 -0.42666668) + (:accel-y (meters 0.000033333334)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.5)) + (:next-launcher 977) + ) + ) + +;; failed to figure out what this is: +(defpart 977 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0)) + ) + +;; failed to figure out what this is: +(defpart 978 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2) (meters 5)) + (:scale-y (meters 10) (meters 0.6)) + (:r 128.0) + (:g 110.0) + (:b 64.0) + (:a 128.0) + (:scalevel-x (meters 0.08)) + (:fade-r -3.2) + (:fade-g -3.2) + (:fade-b -6.4) + (:fade-a -6.4) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 979 + :init-specs ((:texture (gun-yellow-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2) (meters 5)) + (:scale-y (meters 10) (meters 0.6)) + (:r 128.0) + (:g 110.0) + (:b 64.0) + (:a 128.0) + (:scalevel-x (meters 0.08)) + (:fade-r -3.2) + (:fade-g -3.2) + (:fade-b -6.4) + (:fade-a -6.4) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 980 + :init-specs ((:texture (gun-enemy-beam level-default-sprite)) + (:birth-func 'birth-func-setup-beam) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y (meters 30)) + (:r 128.0) + (:g 128.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 981 + :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 0.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)) + ) + ) + +;; failed to figure out what this is: +(defpart 982 + :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 0.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: +(when (or (zero? *curve-toad-linear-up-red*) (!= loading-level global)) + (set! *curve-toad-linear-up-red* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *curve-toad-linear-up-red* 2 'loading-level (the-as int #f)) + ) + +;; failed to figure out what this is: +(set! (-> *curve-toad-linear-up-red* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *curve-toad-linear-up-red* pts data 0 second) 0.3) + +;; failed to figure out what this is: +(set! (-> *curve-toad-linear-up-red* pts data 1 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *curve-toad-linear-up-red* pts data 1 second) 1.0) + +;; failed to figure out what this is: +(if #t + (set! *trail-color-curve-toad-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.3 :w 128.0) + (new 'static 'vector :x 1.0 :w 128.0) + (new 'static 'vector :x 1.0 :w 128.0) + (new 'static 'vector :x 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-toad-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? *toad-grenade-trail*) (!= loading-level global)) + (set! *toad-grenade-trail* (new 'loading-level 'light-trail-composition)) + ) + +;; failed to figure out what this is: +(set! (-> *toad-grenade-trail* color-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *toad-grenade-trail* color-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *toad-grenade-trail* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *toad-grenade-trail* alpha-2-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *toad-grenade-trail* base-alpha) 0.5) + +;; failed to figure out what this is: +(set! (-> *toad-grenade-trail* alpha-repeat-dist) 6144.0) + +;; failed to figure out what this is: +(set! (-> *toad-grenade-trail* width-mode) (the-as uint 2)) + +;; failed to figure out what this is: +(set! (-> *toad-grenade-trail* base-width) 2048.0) + +;; failed to figure out what this is: +(set! (-> *toad-grenade-trail* width-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *toad-grenade-trail* uv-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *toad-grenade-trail* uv-repeat-dist) 16384000.0) + +;; failed to figure out what this is: +(set! (-> *toad-grenade-trail* lie-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *toad-grenade-trail* max-age) (seconds 0.5)) + +;; failed to figure out what this is: +(if #f + (set! (-> *toad-grenade-trail* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *toad-grenade-trail* tex-id) (the-as uint #x100300)) + ) + +;; failed to figure out what this is: +(set! (-> *toad-grenade-trail* width-curve) (the-as curve2d-piecewise *curve-grenade-linear-toad-trail*)) + +;; failed to figure out what this is: +(set! (-> *toad-grenade-trail* color-curve) (the-as curve-color-piecewise *trail-color-curve-toad-grenade*)) + +;; failed to figure out what this is: +(set! (-> *toad-grenade-trail* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +;; failed to figure out what this is: +(set! (-> *toad-grenade-trail* alpha-curve-2) *curve-toad-linear-up-red*) + +;; failed to figure out what this is: +(set! (-> *toad-grenade-trail* zbuffer?) #f) + +;; failed to figure out what this is: +(set! (-> *toad-grenade-trail* lie-vector quad) (-> *up-vector* quad)) + +;; failed to figure out what this is: +(set! (-> *toad-grenade-trail* use-tape-mode?) #f) + +;; failed to figure out what this is: +(set! (-> *toad-grenade-trail* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *toad-grenade-trail* frame-stagger) (the-as uint 1)) + +;; failed to figure out what this is: +(defpart 983 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 5.0) + (:y (meters 0.25)) + (:scale-x (meters 18) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 16.0) + (:omega (degrees 0)) + (:vel-y (meters 0.053333335) (meters 0.026666667)) + (:scalevel-x (meters 0.01) (meters 0.006666667)) + (:rotvel-z (degrees -0.4) (degrees 0.8)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.2 -0.2) + (:friction 0.85 0.04) + (:timer (seconds 0.535)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:conerot-x (degrees -45) (degrees 10)) + (:conerot-y (degrees 85) (degrees 10)) + (:rotate-y (degrees 0)) + (:conerot-radius (meters 0) (meters 0.4)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-scorp-shot-hit + :id 228 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 984 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 985 :fade-after (meters 60) :falloff-to (meters 60) :period (seconds 2) :length (seconds 0.017)) + (sp-item 986 :fade-after (meters 120) :falloff-to (meters 140) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 986 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 1.5)) + (:rot-x 4) + (:scale-y (meters 0.05) (meters 0.05)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 64.0) + (:omega (degrees 0.0675)) + (:vel-z (meters 0.06666667) (meters 0.33333334)) + (:fade-r -0.053333335) + (:fade-g -2.55) + (:fade-b -5.1) + (:fade-a -0.42666668 -0.42666668) + (:accel-y (meters -0.0013333333) (meters -0.001)) + (:friction 0.875) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 80) (degrees 40)) + (:conerot-y (degrees 80) (degrees 40)) + (:conerot-z (degrees 80) (degrees 40)) + (:conerot-radius (meters 0) (meters 0.2)) + ) + ) + +;; failed to figure out what this is: +(defpart 985 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 8.0 16.0) + (:scale-x (meters 0.5) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 100.0) + (:b 80.0) + (:a 32.0 32.0) + (:vel-z (meters 0) (meters 0.016666668)) + (:scalevel-x (meters 0.0013333333) (meters 0.0033333334)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 90) (degrees 20)) + (:conerot-y (degrees 90) (degrees 20)) + (:conerot-z (degrees 90) (degrees 20)) + (:conerot-radius (meters 0) (meters 0.2)) + ) + ) + +;; failed to figure out what this is: +(defpart 984 + :init-specs ((:texture (hitspark level-default-sprite)) + (:num 1.0) + (: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)) + (:scale-y :copy scale-x) + (:r 230.0 25.0) + (:g 230.0 25.0) + (:b 230.0 25.0) + (:a 128.0) + (:fade-a -5.12) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:next-time (seconds 0.035)) + (:next-launcher 987) + ) + ) + +;; failed to figure out what this is: +(defpart 987 + :init-specs ((:scalevel-x (meters 0.12) (meters 0.12)) (:scalevel-y :copy scalevel-x)) + ) + +;; failed to figure out what this is: +(defpartgroup group-gun-scorp-shot-die + :id 229 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 249)) + ) + +;; failed to figure out what this is: +(defpartgroup group-toad-grenade-shot-explode + :id 230 + :duration (seconds 5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 988 :flags (sp3)) + (sp-item 989 :flags (sp3)) + (sp-item 990 :flags (sp3)) + (sp-item 991 :period (seconds 30) :length (seconds 0.167)) + (sp-item 992 :flags (sp3)) + ) + ) + +;; failed to figure out what this is: +(defpart 988 + :init-specs ((:texture (shockwave level-default-sprite)) + (:num 1.0) + (:scale-x (meters 20)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters 0.6666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -1.28) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 989 + :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 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 990 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 50)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0) + (:b 40.0) + (:a 255.0) + (:omega (degrees 6767.9995)) + (:scalevel-x (meters -0.6666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 991 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:birth-func 'birth-func-flip-based-on-scale) + (:num 10.0) + (:scale-x (meters -4) 2.0 (meters 8)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 200.0 20.0) + (:b 130.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.6666667)) + (:scalevel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.26666668) + (:fade-b -0.1) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.8) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 992 + :init-specs ((:texture (water-radiate level-default-sprite)) + (:birth-func 'birth-func-flip-based-on-scale) + (:num 100.0) + (:x (meters 0) (meters 0.1)) + (:scale-x (meters -4) 2.0 (meters 8)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 200.0) + (:a 255.0) + (:vel-y (meters 0.6666667) (meters 0.033333335)) + (:scalevel-x (meters 0.033333335)) + (:fade-g -1.7) + (:fade-b -1.7) + (:fade-a -0.85) + (:friction 0.83) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'sparticle-2d-spline-align-instant) + (:next-time (seconds 0.25)) + (:next-launcher 993) + (:conerot-x (degrees -90) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 993 + :init-specs ((:scalevel-x (meters 0)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.33333334) + (:fade-b -0.6666667) + (: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 new file mode 100644 index 0000000000..8e9cb2e489 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-physics_REF.gc @@ -0,0 +1,640 @@ +;;-*-Lisp-*- +(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) + ) + ) + ) + +;; definition for method 160 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod wvehicle-method-160 ((this wvehicle) (arg0 wvehicle-physics-work)) + (let ((v1-0 (-> this rbody))) + (mem-copy! (the-as pointer (-> arg0 mat)) (the-as pointer (-> v1-0 matrix)) 64) + ) + (logior! (-> this v-flags) (vehicle-flag in-air)) + (logclear! (-> this v-flags) (vehicle-flag on-ground on-flight-level)) + (vector-reset! (-> arg0 ground-normal-sum)) + (let ((v1-6 (-> arg0 cquery))) + (set! (-> v1-6 radius) 1.0) + (set! (-> v1-6 collide-with) (collide-spec + backgnd + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + player-list + collectable + blocking-plane + pusher + vehicle-mesh-probeable + shield + ) + ) + (set! (-> v1-6 ignore-process0) #f) + (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)) + ) + (countdown (s4-0 (-> this info physics-model wheel-count)) + (let* ((s3-0 (-> this wheel s4-0)) + (s1-0 (-> s3-0 info)) + (s2-0 (-> arg0 probe-work-array s4-0)) + ) + (vector-matrix*! (-> arg0 world-pos) (-> s3-0 probe-local-pos) (-> arg0 mat)) + (vector-rotate*! (-> arg0 probe-dir) (-> s3-0 probe-local-dir) (-> arg0 mat)) + (vector-rotate*! (-> s2-0 wheel-axis) (-> s3-0 local-axis) (-> arg0 mat)) + (vector-float*! (-> arg0 cquery move-dist) (-> arg0 probe-dir) (-> s1-0 travel)) + (set! (-> arg0 cquery radius) (-> s1-0 probe-radius)) + (vector-reset! (-> s3-0 ground-normal)) + (vector+float*! + (-> arg0 cquery start-pos) + (-> arg0 world-pos) + (-> arg0 probe-dir) + (- (-> arg0 cquery radius)) + ) + (logand! (-> s3-0 flags) -7) + (set! (-> s3-0 sink-depth) 0.0) + (set! (-> arg0 surface-depth) 0.0) + (set! (-> s2-0 probe-uu) (probe-using-line-sphere *collide-cache* (-> arg0 cquery))) + (cond + ((>= (-> s2-0 probe-uu) 0.0) + (set! (-> arg0 material) (the-as uint (-> arg0 cquery best-other-tri pat material))) + (let ((v1-26 (-> arg0 material))) + (set! (-> arg0 surface-type) (the-as uint (cond + ((or (= v1-26 23) (= v1-26 6)) + 0 + ) + ((or (= v1-26 15) (zero? v1-26)) + 1 + ) + ((= v1-26 5) + 2 + ) + ((= v1-26 2) + 3 + ) + ((= v1-26 16) + 6 + ) + (else + 1 + ) + ) + ) + ) + ) + (if (or (= (-> arg0 cquery best-other-tri pat mode) (pat-mode wall)) + (= (-> arg0 cquery best-other-tri pat event) (pat-event slippery)) + ) + (set! (-> arg0 surface-type) (the-as uint 5)) + ) + (set! (-> s3-0 surface) (-> *wvehicle-surfaces* (-> arg0 surface-type))) + (logclear! (-> this v-flags) (vehicle-flag in-air)) + (logior! (-> this v-flags) (vehicle-flag on-ground)) + (logior! (-> s3-0 flags) 2) + (set! (-> arg0 surface-depth) (-> s3-0 surface depth)) + (vector+float*! (-> arg0 tmp) (-> arg0 cquery start-pos) (-> arg0 cquery move-dist) (-> s2-0 probe-uu)) + (vector-! (-> s3-0 ground-normal) (-> arg0 tmp) (-> arg0 cquery best-other-tri intersect)) + (vector-normalize! (-> s3-0 ground-normal) 1.0) + (vector+! (-> arg0 ground-normal-sum) (-> arg0 ground-normal-sum) (-> s3-0 ground-normal)) + 0 + ) + (else + (set! (-> s2-0 probe-uu) 1.0) + (set! (-> s3-0 surface) #f) + ) + ) + (vector+float*! + (-> s3-0 surface-pos) + (-> arg0 world-pos) + (-> arg0 probe-dir) + (* (-> s1-0 travel) (-> s2-0 probe-uu)) + ) + (+! (-> s2-0 probe-uu) (/ (-> arg0 surface-depth) (-> s1-0 travel))) + (set! (-> s2-0 probe-uu) (fmax 0.0 (fmin 1.0 (-> s2-0 probe-uu)))) + (vector+float*! (-> s3-0 ground-pos) (-> s3-0 surface-pos) (-> arg0 probe-dir) (-> arg0 surface-depth)) + (set! (-> s3-0 sink-depth) (fmax 0.0 (- (-> this water-height) (-> s3-0 ground-pos y)))) + (set! (-> s3-0 pos) (-> s2-0 probe-uu)) + ) + 0 + ) + 0 + (none) + ) + +;; definition for method 97 of type wvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-97 ((this wvehicle) (arg0 float) (arg1 vehicle-physics-work)) + (local-vars (sv-16 rigid-body-control)) + (set! sv-16 (-> this rbody)) + (dotimes (s3-0 (-> this info physics-model wheel-count)) + (let* ((s2-0 (-> this wheel s3-0)) + (s1-0 (-> s2-0 info)) + (f30-0 + (fmax + 0.0 + (- 1.0 (-> (the-as wvehicle-physics-work (+ (the-as uint arg1) (* 144 s3-0))) probe-work-array 0 probe-uu)) + ) + ) + ) + (if (>= (-> this info handling cos-ground-effect-angle) (vector-dot (-> s2-0 ground-normal) (-> arg1 mat uvec))) + (set! f30-0 0.0) + ) + (set! (-> s2-0 up-force) 0.0) + (when (< 0.0 f30-0) + (rigid-body-control-method-23 sv-16 (-> s2-0 ground-pos) (-> arg1 velocity)) + (let* ((f0-4 0.0) + (f1-9 (* 2.0 + (-> this info info mass) + (-> this info extra gravity) + f30-0 + (-> this susp-spring-control) + (-> s1-0 suspension-spring) + ) + ) + (f2-5 0.25) + (f3-0 arg0) + (f0-5 (fmax f0-4 (+ f1-9 (* f2-5 + (/ 1.0 f3-0) + (-> this info info mass) + (-> s1-0 suspension-damping) + (fmax 0.0 (- (vector-dot (-> arg1 velocity) (-> s2-0 ground-normal)))) + ) + ) + ) + ) + ) + (set! (-> s2-0 up-force) f0-5) + (vector-float*! (-> arg1 force) (-> s2-0 ground-normal) f0-5) + ) + (apply-impact! sv-16 (-> s2-0 ground-pos) (-> arg1 force)) + ) + ) + ) + (dotimes (s3-1 (-> this info physics-model wheel-count)) + (let* ((s2-1 (-> this wheel s3-1)) + (s1-1 (-> s2-1 info)) + ) + (set! (-> arg1 probe-work-array 0 world-normal y) (* (-> s1-1 scale) (-> s1-1 radius))) + (set! (-> arg1 probe-work-array 0 ground-normal x) 1.0) + (when (< 0.0 (-> s2-1 up-force)) + (rigid-body-control-method-23 sv-16 (-> s2-1 ground-pos) (-> arg1 velocity)) + (if (logtest? (-> s2-1 surface flags) (vehicle-wheel-surface-flag moving)) + (vector-! (-> arg1 velocity) (-> arg1 velocity) (-> this surface-velocity)) + ) + (let ((s0-0 (the-as object (+ (+ (* 144 s3-1) 416) (the-as int arg1))))) + (set! (-> arg1 probe-work-array 0 local-normal quad) (-> (the-as wvehicle-physics-work s0-0) force quad)) + (vector+float*! + (-> (the-as wvehicle-physics-work s0-0) velocity) + (-> arg1 probe-work-array 0 local-normal) + (-> s2-1 ground-normal) + (- (vector-dot (-> arg1 probe-work-array 0 local-normal) (-> s2-1 ground-normal))) + ) + (vector-normalize! (the-as vector (+ (the-as int s0-0) 80)) 1.0) + (vector-cross! + (the-as vector (+ (the-as int s0-0) 96)) + (-> arg1 probe-work-array 0 local-normal) + (-> s2-1 ground-normal) + ) + (vector-normalize! (-> (the-as wvehicle-physics-work s0-0) world-pos) 1.0) + (set! (-> (the-as wvehicle-physics-work arg1) forward-dir quad) + (-> (the-as wvehicle-physics-work s0-0) world-pos quad) + ) + (set! (-> (the-as wvehicle-physics-work arg1) side-dir quad) + (-> (the-as wvehicle-physics-work s0-0) velocity quad) + ) + (set! (-> (the-as wvehicle-physics-work s0-0) world-normal quad) + (-> (the-as wvehicle-physics-work arg1) velocity quad) + ) + ) + (set! (-> s2-1 side-vel) + (vector-dot + (-> (the-as wvehicle-physics-work arg1) velocity) + (-> (the-as wvehicle-physics-work arg1) side-dir) + ) + ) + (set! (-> s2-1 forward-vel) (vector-dot (-> arg1 velocity) (the-as vector (&-> arg1 impulse)))) + (set! (-> s2-1 up-vel) (vector-dot (-> arg1 velocity) (-> s2-1 ground-normal))) + (set! (-> s2-1 forward-slip-vel) + (+ (-> s2-1 forward-vel) (* -1.0 (-> arg1 probe-work-array 0 world-normal y) (-> s2-1 rev))) + ) + (let* ((f0-21 (-> s2-1 side-vel)) + (f0-23 (* f0-21 f0-21)) + (f1-16 (-> s2-1 forward-slip-vel)) + (f0-25 (sqrtf (+ f0-23 (* f1-16 f1-16)))) + ) + (set! (-> s2-1 friction-coef) + (* (smooth-interp + (-> this info handling tire-static-friction) + (-> this info handling tire-dynamic-friction) + f0-25 + (-> this info handling tire-static-friction-speed) + (-> this info handling tire-dynamic-friction-speed) + ) + (-> s2-1 surface friction) + ) + ) + ) + (set! (-> arg1 probe-work-array 0 ground-normal x) (-> s2-1 surface drag)) + ) + (set! (-> arg1 probe-work-array 0 ground-pos y) (-> s2-1 torque)) + (when (< 0.0 (-> s2-1 up-force)) + (let ((f0-36 + (* (-> s2-1 up-force) + (-> s2-1 friction-coef) + (-> s1-1 forward-grip) + (-> arg1 probe-work-array 0 world-normal y) + ) + ) + (f1-29 + (/ (* 0.5 (-> s2-1 inertia) (-> s2-1 forward-slip-vel)) (* arg0 (-> arg1 probe-work-array 0 world-normal y))) + ) + ) + (if (logtest? (-> s1-1 flags) (vehicle-wheel-flag vwf0)) + (set! f1-29 (* f1-29 (/ 1.0 (the float (-> this info physics-model drive-wheel-count))))) + ) + (set! (-> arg1 probe-work-array 0 probe-pos w) (fmax (fmin f1-29 f0-36) (- f0-36))) + ) + (+! (-> arg1 probe-work-array 0 ground-pos y) (-> arg1 probe-work-array 0 probe-pos w)) + ) + (set! (-> arg1 probe-work-array 0 ground-pos z) + (- (* -0.25 (/ 1.0 arg0) (-> s2-1 rev) (-> s2-1 inertia)) (-> arg1 probe-work-array 0 ground-pos y)) + ) + (set! (-> arg1 probe-work-array 0 ground-pos w) (fabs (-> s2-1 braking-torque))) + (set! (-> arg1 probe-work-array 0 ground-pos x) + (fmax + (fmin (-> arg1 probe-work-array 0 ground-pos z) (-> arg1 probe-work-array 0 ground-pos w)) + (- (-> arg1 probe-work-array 0 ground-pos w)) + ) + ) + (+! (-> arg1 probe-work-array 0 ground-pos y) (-> arg1 probe-work-array 0 ground-pos x)) + (let ((f0-57 (* -1.0 + (-> s2-1 rev) + (-> s2-1 inertia) + (-> arg1 probe-work-array 0 ground-normal x) + (-> this info handling rolling-resistance) + ) + ) + ) + (if (logtest? (vehicle-flag turbo-boost) (-> this v-flags)) + (set! f0-57 (* 0.05 f0-57)) + ) + (+! (-> arg1 probe-work-array 0 ground-pos y) f0-57) + ) + (cond + ((logtest? (-> s1-1 flags) (vehicle-wheel-flag vwf0)) + (+! (-> this wheel-torque) (-> arg1 probe-work-array 0 ground-pos y)) + ) + (else + (let ((f0-61 (-> s2-1 rev)) + (f1-49 (* (-> arg1 probe-work-array 0 ground-pos y) arg0)) + (f2-20 (-> s2-1 inertia)) + ) + (set! (-> s2-1 rev) (+ f0-61 (* f1-49 (/ 1.0 f2-20)))) + ) + (set! (-> s2-1 rev) (fmax -125.6637 (fmin 125.6637 (-> s2-1 rev)))) + ) + ) + ) + 0 + ) + (let ((f0-65 (-> this wheel-rev)) + (f1-54 (* arg0 (-> this wheel-torque))) + (f2-25 (-> this wheel-inertia)) + ) + (set! (-> this wheel-rev) (+ f0-65 (* f1-54 (/ 1.0 f2-25)))) + ) + (set! (-> this wheel-rev) (fmax -125.6637 (fmin 125.6637 (-> this wheel-rev)))) + (dotimes (v1-110 (-> this info physics-model wheel-count)) + (let ((a0-28 (-> this wheel v1-110))) + (if (logtest? (-> a0-28 info flags) (vehicle-wheel-flag vwf0)) + (set! (-> a0-28 rev) (* (-> this wheel-rev) (-> a0-28 drive-diff))) + ) + ) + ) + (let* ((f0-71 (-> this info engine inertia)) + (f1-59 (-> this clutch-grab)) + (f2-29 (-> this clutch-inertia)) + (f3-12 (-> this gear-ratio)) + (f3-14 (/ 1.0 f3-12)) + (f3-16 (* f3-14 f3-14)) + (f4-5 (-> this info transmission inertia)) + (f5-0 (-> this final-drive-ratio)) + (f5-2 (/ 1.0 f5-0)) + ) + (set! (-> arg1 probe-work-array 0 probe-pos z) + (+ f0-71 (* f1-59 (+ f2-29 (* f3-16 (+ f4-5 (* f5-2 f5-2 (-> this drive-wheel-inertia))))))) + ) + ) + (let* ((f3-18 (- (* (- (fmax 0.0 (* (-> this total-gear-ratio) (-> this wheel-rev))) (-> this engine-rev)) + (-> arg1 probe-work-array 0 probe-pos z) + (/ 1.0 arg0) + ) + (-> this engine-torque) + ) + ) + (f0-78 (-> this engine-rev)) + (f1-69 (* arg0 (+ (-> this engine-torque) (* f3-18 (-> this clutch-grab))))) + (f2-35 (-> arg1 probe-work-array 0 probe-pos z)) + ) + (set! (-> this engine-rev) (+ f0-78 (* f1-69 (/ 1.0 f2-35)))) + ) + (let* ((f0-80 (-> this engine-rev)) + (f1-71 (-> this info engine max-rpm)) + (f0-81 (fmin f0-80 (* 0.10471976 f1-71))) + (f1-74 (-> this info engine min-rpm)) + ) + (set! (-> this engine-rev) (fmax f0-81 (* 0.10471976 f1-74))) + ) + (dotimes (s3-2 (-> this info physics-model wheel-count)) + (let* ((s1-2 (-> this wheel s3-2)) + (s2-2 (-> s1-2 info)) + ) + (when (< 0.0 (-> s1-2 up-force)) + (set! (-> arg1 probe-work-array 0 world-normal y) (* (-> s2-2 scale) (-> s2-2 radius))) + (let ((v1-138 (-> (the-as wvehicle-physics-work arg1) probe-work-array s3-2))) + (set! (-> (the-as wvehicle-physics-work arg1) forward-dir quad) (-> v1-138 forward-dir quad)) + (set! (-> (the-as wvehicle-physics-work arg1) side-dir quad) (-> v1-138 side-dir quad)) + (set! (-> (the-as wvehicle-physics-work arg1) velocity quad) (-> v1-138 velocity quad)) + ) + (set! (-> (the-as wvehicle-physics-work arg1) ground-pos quad) (-> s1-2 ground-pos quad)) + (vector-! + (-> (the-as wvehicle-physics-work arg1) p-body) + (-> (the-as wvehicle-physics-work arg1) ground-pos) + (-> sv-16 position) + ) + (vector-cross! (-> arg1 normal) (-> arg1 tmp) (the-as vector (-> arg1 probe-work-array))) + (vector-rotate*! (-> arg1 normal) (-> arg1 normal) (-> sv-16 inv-i-world)) + (vector-cross! (-> arg1 normal) (-> arg1 normal) (-> arg1 tmp)) + (set! (-> arg1 probe-work-array 0 world-normal z) + (/ (* -0.5 (-> s1-2 side-vel)) + (* arg0 (+ (-> sv-16 info inv-mass) (vector-dot (the-as vector (-> arg1 probe-work-array)) (-> arg1 normal)))) + ) + ) + (set! (-> arg1 probe-work-array 0 world-normal w) 0.0) + (set! (-> s1-2 forward-slip-vel) + (+ (-> s1-2 forward-vel) (* -1.0 (-> arg1 probe-work-array 0 world-normal y) (-> s1-2 rev))) + ) + (vector-cross! (-> arg1 normal) (-> arg1 tmp) (the-as vector (&-> arg1 impulse))) + (vector-rotate*! (-> arg1 normal) (-> arg1 normal) (-> sv-16 inv-i-world)) + (vector-cross! (-> arg1 normal) (-> arg1 normal) (-> arg1 tmp)) + (let ((f0-94 + (/ (* -0.25 (-> s1-2 forward-slip-vel)) + (* arg0 (+ (-> sv-16 info inv-mass) (vector-dot (the-as vector (&-> arg1 impulse)) (-> arg1 normal)))) + ) + ) + ) + (+! (-> arg1 probe-work-array 0 world-normal w) f0-94) + ) + (set! (-> arg1 probe-work-array 0 probe-pos y) + (* (-> s1-2 friction-coef) (-> s1-2 up-force) (-> s2-2 side-grip)) + ) + (set! (-> arg1 probe-work-array 0 probe-pos x) + (* (-> s1-2 friction-coef) (-> s1-2 up-force) (-> s2-2 forward-grip)) + ) + (let* ((f0-103 (/ (-> arg1 probe-work-array 0 world-normal z) (-> arg1 probe-work-array 0 probe-pos y))) + (f0-105 (* f0-103 f0-103)) + (f1-95 (/ (-> arg1 probe-work-array 0 world-normal w) (-> arg1 probe-work-array 0 probe-pos x))) + (f0-106 (+ f0-105 (* f1-95 f1-95))) + ) + (when (< 1.0 f0-106) + (let ((f0-108 (/ 1.0 (sqrtf f0-106)))) + (set! (-> arg1 probe-work-array 0 world-normal z) (* (-> arg1 probe-work-array 0 world-normal z) f0-108)) + (set! (-> arg1 probe-work-array 0 world-normal w) (* (-> arg1 probe-work-array 0 world-normal w) f0-108)) + ) + ) + ) + (vector-float*! + (-> arg1 force) + (the-as vector (-> arg1 probe-work-array)) + (-> arg1 probe-work-array 0 world-normal z) + ) + (vector+float*! + (-> arg1 force) + (-> arg1 force) + (the-as vector (&-> arg1 impulse)) + (-> arg1 probe-work-array 0 world-normal w) + ) + (let ((f0-114 + (* (vector-dot (-> arg1 tmp) (-> arg1 mat uvec)) (+ -1.0 (-> this info handling ground-torque-scale))) + ) + ) + (vector+float*! (-> arg1 ground-normal) (-> arg1 ground-normal) (-> arg1 mat uvec) f0-114) + ) + (apply-impact! sv-16 (-> arg1 ground-normal) (-> arg1 force)) + 0 + ) + ) + ) + 0 + (none) + ) + +;; definition for method 31 of type wvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod apply-gravity! ((this wvehicle) (arg0 float)) + (local-vars (v1-51 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (wvehicle-method-162 this arg0) + (wvehicle-method-163 this) + (let ((gp-0 (new 'stack-no-clear 'wvehicle-physics-work)) + (s5-0 (-> this rbody)) + (s4-0 (-> this info)) + ) + (set! (-> gp-0 cur-time) (the-as uint (current-time))) + (cond + ((logtest? (-> this v-flags) (vehicle-flag dead)) + (vector-reset! (-> gp-0 ground-normal-sum)) + ) + (else + (wvehicle-method-160 this gp-0) + (vector-reset! (-> gp-0 force)) + (set! (-> gp-0 force y) (* 2.0 (-> s4-0 info mass) (-> s4-0 extra gravity) (-> this jump-control))) + (add-force! s5-0 (-> gp-0 force)) + (vehicle-method-97 this arg0 (the-as vehicle-physics-work gp-0)) + ) + ) + (when (logtest? (vehicle-flag turbo-boost) (-> this v-flags)) + (let ((f0-6 (* (-> this turbo-boost-factor) (-> s4-0 info mass) (-> s4-0 extra gravity)))) + (vector-float*! (-> gp-0 force) (-> gp-0 mat fvec) f0-6) + ) + (add-force! s5-0 (-> gp-0 force)) + ) + (when (logtest? (-> this v-flags) (vehicle-flag in-air)) + (let* ((v1-29 (-> this rbody ang-momentum)) + (a0-10 (-> this rbody ang-momentum)) + (f3-0 (-> s4-0 handling air-angular-damping)) + (f2-0 arg0) + (f0-7 0.0) + (f1-5 1.0) + (f2-1 (* -1.0 (- 1.0 f3-0) f2-0)) + (f3-3 0.016666668) + ) + (vector-float*! v1-29 a0-10 (fmax f0-7 (+ f1-5 (* f2-1 (/ 1.0 f3-3))))) + ) + (let* ((v1-31 (-> s5-0 lin-velocity)) + (f0-13 (+ (* (-> v1-31 x) (-> v1-31 x)) (* (-> v1-31 z) (-> v1-31 z)))) + (f1-10 40960.0) + ) + (cond + ((< f0-13 (* f1-10 f1-10)) + (set! (-> gp-0 local-pos quad) (-> s4-0 info cm-offset-joint quad)) + (+! (-> gp-0 local-pos z) 4096.0) + (vector-matrix*! (-> gp-0 world-pos) (-> gp-0 local-pos) (-> gp-0 mat)) + (vector-reset! (-> gp-0 force)) + (set! (-> gp-0 force x) (* (-> s4-0 handling hop-turn-torque) (-> this controls steering))) + (set! (-> gp-0 force y) (* -1.0 (-> this controls lean-z) (-> s4-0 handling air-pitch-torque))) + (vector-rotate*! (-> gp-0 force) (-> gp-0 force) (-> gp-0 mat)) + (rigid-body-control-method-22 s5-0 (-> gp-0 world-pos) (-> gp-0 force)) + ) + (else + (set! (-> gp-0 local-pos quad) (-> s4-0 info cm-offset-joint quad)) + (+! (-> gp-0 local-pos y) 4096.0) + (vector-matrix*! (-> gp-0 world-pos) (-> gp-0 local-pos) (-> gp-0 mat)) + (vector-reset! (-> gp-0 force)) + (set! (-> gp-0 force x) (* (-> s4-0 handling air-roll-torque) (-> this controls steering))) + (set! (-> gp-0 force z) (* (-> s4-0 handling air-pitch-torque) (-> this controls lean-z))) + (vector-rotate*! (-> gp-0 force) (-> gp-0 force) (-> gp-0 mat)) + (rigid-body-control-method-22 s5-0 (-> gp-0 world-pos) (-> gp-0 force)) + ) + ) + ) + ) + (when (not (logtest? (vehicle-flag gun-dark-2-zero-g) (-> this v-flags))) + (let ((f0-27 0.0)) + (.lvf vf1 (&-> (-> gp-0 ground-normal-sum) 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-51 vf1) + (if (= f0-27 v1-51) + (set! (-> gp-0 ground-normal-sum y) 1.0) + ) + ) + (+! (-> gp-0 ground-normal-sum y) 6.0) + (vector-normalize! (-> gp-0 ground-normal-sum) 1.0) + (vector-float*! (-> this gravity-dir) (-> gp-0 ground-normal-sum) -1.0) + (vector-float*! (-> gp-0 force) (-> this gravity-dir) (* (-> s4-0 extra gravity) (-> s4-0 info mass))) + (add-force! s5-0 (-> gp-0 force)) + ) + (rigid-body-object-method-53 this arg0) + (vehicle-method-96 this arg0) + (countdown (s1-0 (-> s4-0 physics-model wheel-count)) + (let* ((a1-25 (-> this wheel s1-0)) + (v1-69 (-> a1-25 info)) + ) + (set! (-> gp-0 wsphere quad) (-> a1-25 trans quad)) + (set! (-> gp-0 wsphere r) (* (-> v1-69 scale) (-> v1-69 radius))) + ) + (vehicle-method-95 this (-> gp-0 wsphere) arg0) + 0 + ) + (let ((f0-38 (* -0.000012207031 (vector-length (-> s5-0 lin-velocity)) (-> s4-0 handling drag-force-factor)))) + (vector-float*! (-> gp-0 force) (-> s5-0 lin-velocity) f0-38) + ) + (add-force! s5-0 (-> gp-0 force)) + (when (or (and (logtest? (-> this v-flags) (vehicle-flag in-air)) + (and (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (and (< (-> s5-0 matrix uvec y) 0.0) (< (- (-> gp-0 cur-time) (-> this impact-time)) (the-as uint 10))) + ) + ) + (logtest? (vehicle-flag overturned) (-> this v-flags)) + ) + (vector-reset! (-> gp-0 local-pos)) + (set! (-> gp-0 local-pos y) -6144.0) + (when (logtest? (vehicle-flag overturned) (-> this v-flags)) + (let ((f0-42 (* 0.0033333334 (the float (- (current-time) (the-as int (-> this overturned-time))))))) + (set! (-> gp-0 local-pos y) (* (+ -32768.0 (* -16384.0 f0-42)) + (-> s4-0 handling roll-control-factor) + (fmax 0.1 (- (-> s5-0 matrix uvec y))) + ) + ) + ) + ) + (vector-matrix*! (-> gp-0 world-pos) (-> gp-0 local-pos) (-> gp-0 mat)) + (vector-reset! (-> gp-0 force)) + (set! (-> gp-0 force y) (* -0.5 (-> s4-0 extra gravity) (-> s4-0 info mass))) + (rigid-body-control-method-22 s5-0 (-> gp-0 world-pos) (-> gp-0 force)) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 120 of type wvehicle +(defmethod apply-gravity ((this wvehicle) (arg0 float)) + (apply-gravity! this arg0) + (none) + ) + +;; definition for method 121 of type wvehicle +(defmethod apply-gravity1 ((this wvehicle) (arg0 float)) + (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 0000000000..19bb906892 --- /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-states_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-states_REF.gc new file mode 100644 index 0000000000..c66c64151b --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-states_REF.gc @@ -0,0 +1,425 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defstate idle (wvehicle) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (go-virtual waiting) + ) + ) + +;; failed to figure out what this is: +(defstate player-control (wvehicle) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type vehicle player-control) enter))) + (if t9-0 + (t9-0) + ) + ) + (send-event *vehicle-manager* 'extra-bank (-> self info sound bank-replace)) + (iterate-prims (-> self root) (lambda ((arg0 collide-shape-prim)) + (logclear! (-> arg0 prim-core collide-as) (collide-spec camera-blocker)) + (none) + ) + ) + (wvehicle-method-195 self) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type vehicle player-control) exit))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self sound-engine-rpm) 0.0) + (iterate-prims (-> self root) (lambda ((arg0 collide-shape-prim)) + (logior! (-> arg0 prim-core collide-as) (collide-spec camera-blocker)) + (none) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate crash (wvehicle) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type vehicle crash) enter))) + (if t9-0 + (t9-0) + ) + ) + (go-virtual explode) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate explode (wvehicle) + :virtual #t + :enter (behavior () + (rlet ((vf0 :class vf)) + (init-vf0-vector) + (let ((t9-0 (-> (method-of-type vehicle explode) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (dotimes (s5-0 (-> self info physics-model wheel-count)) + (let ((s4-0 (-> self wheel s5-0))) + (cond + ((or (not (logtest? (-> self info flags) #x4000)) (< (rand-vu) 0.6)) + (rigid-body-control-method-23 (-> self rbody) (-> s4-0 trans) (-> gp-0 rvec)) + (vector-! (-> gp-0 uvec) (-> s4-0 trans) (-> self rbody position)) + (vector+float*! (-> gp-0 rvec) (-> gp-0 rvec) (-> gp-0 uvec) 6.0) + (+! (-> gp-0 rvec y) 81920.0) + (send-event (handle->process (-> s4-0 handle)) 'explode (-> gp-0 rvec)) + (set! (-> s4-0 handle) (the-as handle #f)) + ) + (else + (send-event (handle->process (-> s4-0 handle)) 'explode #f) + ) + ) + ) + ) + ) + (if (not (logtest? (-> self info flags) #x4000)) + (go-virtual explode-into-nothing) + ) + (let ((a0-14 (-> self draw color-mult))) + (vector-float*! (the-as vector a0-14) (the-as vector a0-14) 0.25) + ) + (impulse-handler self) + (let ((s4-1 (new 'stack-no-clear 'vector)) + (s5-1 (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-1) + (set! (-> s4-1 y) (* 122880.0 (-> self info info mass))) + (dotimes (s3-0 3) + (set! (-> s5-1 data s3-0) (* 12288.0 (+ -1.0 (* 2.0 (rand-vu))))) + ) + (vector+! s5-1 s5-1 (-> gp-1 position)) + (apply-impact! gp-1 s5-1 s4-1) + (rigid-body-control-method-12 gp-1 1.0) + (init-velocities! gp-1) + ) + (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-100 + (process-spawn joint-exploder (-> gp-3 skel) (-> gp-3 anim) s5-2 gp-3 :name "joint-exploder" :to self :unk 0) + ) + ) + (when v1-100 + (let ((v1-103 (-> (the-as process-drawable (-> v1-100 0)) draw))) + (if v1-103 + (.svf (&-> (-> v1-103 color-mult) quad) vf0) + ) + ) + ) + ) + ) + ) + ) + (if (and (logtest? (vehicle-flag unique) (-> self v-flags)) + (not (logtest? (vehicle-flag player-killed) (-> self v-flags))) + (-> *setting-control* user-current unique-vehicle-mission-critical) + ) + (fail-mission) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate explode-into-nothing (wvehicle) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self v-flags) (the-as vehicle-flag (logclear (-> self v-flags) (vehicle-flag rammed-target)))) + (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) 4096.0) + (set! (-> gp-0 scale) (* 0.00008877841 (-> self draw bounds w))) + (set! (-> gp-0 group) (-> *part-group-id-table* (-> self info explosion-part))) + (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*)) + ) + (logior! (-> self focus-status) (focus-status disable inactive)) + (disable-physics! self) + (rigid-body-object-method-43 self) + ) + :code sleep-code + :post (behavior () + (when (and (not (logtest? (vehicle-flag rammed-target) (-> self v-flags))) + (time-elapsed? (-> self state-time) (seconds 0.035)) + ) + (set! (-> self v-flags) (the-as vehicle-flag (logior (vehicle-flag rammed-target) (-> self v-flags)))) + (let ((a1-1 (new 'stack 'debris-tuning (the-as uint 0))) + (a2-1 (-> self info debris)) + ) + (when a2-1 + (set! (-> a1-1 duration) (seconds 5)) + (set! (-> a1-1 hit-xz-reaction) 0.95) + (set! (-> a1-1 hit-y-reaction) 0.6) + (set! (-> a1-1 gravity) -163840.0) + (set! (-> a1-1 scale-rand-lo) 2.0) + (set! (-> a1-1 scale-rand-hi) (* 2.0 (-> a1-1 scale-rand-lo))) + (set! (-> a1-1 rot-speed) 1000.0) + (vector+! + (-> a1-1 fountain-rand-transv-lo) + (-> self root transv) + (new 'static 'vector :x -81920.0 :y 61440.0 :z -81920.0 :w 1.0) + ) + (vector+! + (-> a1-1 fountain-rand-transv-hi) + (-> self root transv) + (new 'static 'vector :x 81920.0 :y 131072.0 :z 81920.0 :w 1.0) + ) + (debris-spawn self a1-1 a2-1 (the-as process-drawable #f)) + ) + ) + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + (if (not (-> self child)) + (go-virtual die) + ) + ) + ) + +;; failed to figure out what this is: +(defstate waiting (wvehicle) + :virtual #t + :enter (behavior () + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :exit (behavior () + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + (let ((t9-1 (-> (find-parent-state) exit))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate hostile (wvehicle) + :virtual #t + :event vehicle-event-handler + :enter (behavior () + (wvehicle-method-195 self) + (if (not (-> self minimap)) + (set! (-> self minimap) (add-icon! *minimap* self (the-as uint 10) (the-as int #f) (the-as vector #t) 0)) + ) + (set! (-> self control-hook) + (the-as (function vehicle vehicle-controls) (method-of-object self control-hook-ai)) + ) + (set! (-> self ai-state) (the-as uint 1)) + (logior! (-> self v-flags) (vehicle-flag ai-driving ignition)) + (set-time! (-> self state-time)) + ) + :exit (behavior () + (logclear! (-> self v-flags) (vehicle-flag ai-driving ignition)) + (when (-> self minimap) + (logior! (-> self minimap flags) (minimap-flag fade-out)) + (set! (-> self minimap) #f) + ) + ) + :trans #f + :code sleep-code + :post (behavior () + (wvehicle-method-168 self) + ) + ) + +;; failed to figure out what this is: +(defstate sink (wvehicle) + :virtual #t + :event vehicle-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (vehicle-method-116 self 'drown-death) + (set! (-> self crash-level) 3) + (set! (-> self force-level) 3) + (logior! (-> self focus-status) (focus-status dead)) + (logclear! (-> self v-flags) (vehicle-flag persistent player-driving net-player-driving)) + (set! (-> self v-flags) (the-as vehicle-flag (logior (vehicle-flag dead lights-dead) (-> self v-flags)))) + (vehicle-method-126 self) + (sound-play "car-bubbles") + (vehicle-method-106 self) + (vehicle-method-136 self) + (vehicle-method-100 self) + (let ((v1-21 (-> self rbody))) + (set! (-> v1-21 linear-damping) 0.95) + (set! (-> v1-21 angular-damping) 0.25) + ) + (if (and (logtest? (vehicle-flag unique) (-> self v-flags)) + (not (logtest? (vehicle-flag player-killed) (-> self v-flags))) + (-> *setting-control* user-current unique-vehicle-mission-critical) + ) + (fail-mission) + ) + ) + :code sleep-code + :post (behavior () + (let ((v1-1 (-> self draw color-mult))) + (let ((f0-1 (fmax 0.0 (- 1.0 (* 0.0033333334 (the float (- (current-time) (-> self state-time)))))))) + (set-vector! v1-1 f0-1 f0-1 f0-1 1.0) + ) + (dotimes (a0-6 (-> self info physics-model wheel-count)) + (let ((a1-6 (handle->process (-> self wheel a0-6 handle)))) + (if a1-6 + (set! (-> (the-as process-drawable a1-6) draw color-mult quad) (-> v1-1 quad)) + ) + ) + ) + ) + (vehicle-explode-post) + ) + ) + +;; failed to figure out what this is: +(defstate race-waiting (wvehicle) + :virtual #t + :event vehicle-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (wvehicle-method-195 self) + (vehicle-method-140 self) + (logior! (-> self v-flags) (vehicle-flag ignition)) + ) + :code sleep-code + :post (behavior () + (vector-reset! (-> self target-acceleration)) + (logclear! (-> self v-flags) (vehicle-flag player-impulse-force player-contact-force)) + (let ((v1-3 (-> self rbody))) + (set! (-> v1-3 force quad) (the-as uint128 0)) + (set! (-> v1-3 torque quad) (the-as uint128 0)) + ) + 0 + (reset-momentum! (-> self rbody)) + (rigid-body-object-method-30 self) + (vehicle-method-115 self) + ) + ) + +;; failed to figure out what this is: +(defstate race-racing (wvehicle) + :virtual #t + :event vehicle-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self v-flags) (vehicle-flag riding ai-driving ignition)) + (set! (-> self controls throttle) 0.0) + (set! (-> self controls brake) 0.0) + (set! (-> self controls steering) 0.0) + (set! (-> self control-hook) + (the-as (function vehicle vehicle-controls) (method-of-object self wvehicle-method-177)) + ) + ) + :exit (behavior () + (logclear! (-> self v-flags) (vehicle-flag waiting-for-player)) + (let ((v1-3 (find-prim-by-id-logtest (-> self root) (the-as uint 32)))) + (when v1-3 + (set! (-> v1-3 prim-core collide-with) (collide-spec + backgnd + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> v1-3 prim-core collide-as) (collide-spec vehicle-sphere)) + ) + ) + ) + :trans #f + :code sleep-code + :post (behavior () + (wvehicle-method-182 self) + ) + ) + +;; failed to figure out what this is: +(defstate race-finished (wvehicle) + :virtual #t + :event vehicle-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self v-flags) (vehicle-flag persistent riding nav-spheres)) + (set! (-> self controls throttle) 0.0) + (set! (-> self controls brake) 0.0) + (set! (-> self controls steering) 0.0) + ) + :trans #f + :code sleep-code + :post (behavior () + (wvehicle-method-185 self) + ) + ) + +;; failed to figure out what this is: +(defstate die (wvehicle) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + + + + 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 new file mode 100644 index 0000000000..1936749785 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-util_REF.gc @@ -0,0 +1,1039 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 167 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod wvehicle-method-167 ((this wvehicle)) + (let* ((v1-0 (-> this info)) + (f0-1 (* (-> v1-0 engine drag) (-> v1-0 engine idle-rpm))) + (f1-2 (* (-> v1-0 engine peak-torque-rpm) (+ 1.0 (-> v1-0 engine drag)))) + (f2-2 1.0) + (f3-3 (/ (- (-> v1-0 engine idle-rpm) (-> v1-0 engine peak-torque-rpm)) (-> v1-0 engine powerband-width-rpm))) + ) + (set! (-> this idle-throttle) (/ f0-1 (* f1-2 (- f2-2 (* f3-3 f3-3))))) + ) + (set! (-> this idle-throttle) (fmax 0.0 (fmin 1.0 (-> this idle-throttle)))) + 0 + (none) + ) + +;; definition for method 37 of type wvehicle +(defmethod rigid-body-object-method-37 ((this wvehicle)) + (let ((t9-0 (method-of-type vehicle rigid-body-object-method-37))) + (t9-0 this) + ) + (set! (-> this wheel 0 info) (-> this info physics-model front-wheel)) + (set! (-> this wheel 1 info) (-> this info physics-model front-wheel)) + (set! (-> this wheel 2 info) (-> this info physics-model rear-wheel)) + (set! (-> this wheel 3 info) (-> this info physics-model rear-wheel)) + (dotimes (s5-0 (-> this info physics-model wheel-count)) + (let ((s4-0 (-> this wheel s5-0 info))) + (set! (-> s4-0 tread-tid) (lookup-texture-id-by-name (-> s4-0 tread-texture) (the-as string #f))) + ) + ) + (set! (-> this info physics-model front-wheel callback) (method-of-object this wvehicle-method-164)) + (set! (-> this info physics-model rear-wheel callback) (method-of-object this wvehicle-method-164)) + (let ((v1-22 (-> this draw shadow-ctrl))) + (set! (-> v1-22 settings shadow-dir w) (-> this info setup shadow-locus-dist)) + (set! (-> v1-22 settings top-plane w) 0.0) + (set! (-> v1-22 settings bot-plane w) (- (-> this info setup shadow-bot-clip))) + ) + (wvehicle-method-167 this) + (none) + ) + +;; definition for function have-earned-vehicle-v-type? +(defun have-earned-vehicle-v-type? ((arg0 int)) + (case arg0 + ((12) + (let ((v1-2 (-> *game-info* vehicles))) + (logtest? v1-2 (game-vehicles v-turtle)) + ) + ) + ((13) + (let ((v1-5 (-> *game-info* vehicles))) + (logtest? v1-5 (game-vehicles v-snake)) + ) + ) + ((14) + (let ((v1-8 (-> *game-info* vehicles))) + (logtest? v1-8 (game-vehicles v-scorpion)) + ) + ) + ((15) + (let ((v1-11 (-> *game-info* vehicles))) + (logtest? v1-11 (game-vehicles v-toad)) + ) + ) + ((16) + (let ((v1-14 (-> *game-info* vehicles))) + (logtest? v1-14 (game-vehicles v-fox)) + ) + ) + ((17) + (let ((v1-17 (-> *game-info* vehicles))) + (logtest? v1-17 (game-vehicles v-rhino)) + ) + ) + ((18) + (let ((v1-20 (-> *game-info* vehicles))) + (logtest? v1-20 (game-vehicles v-mirage)) + ) + ) + ((19) + (let ((v1-23 (-> *game-info* vehicles))) + (logtest? v1-23 (game-vehicles v-x-ride)) + ) + ) + ((21) + #t + ) + (else + #f + ) + ) + ) + +;; definition for function have-vehicle-v-type? +(defun have-vehicle-v-type? ((arg0 int)) + (case arg0 + ((12) + (let ((v1-2 (-> *game-info* vehicles))) + (let ((a0-3 (-> *setting-control* user-current vehicles))) + (if (nonzero? a0-3) + (set! v1-2 (logand v1-2 a0-3)) + ) + ) + (logtest? v1-2 (game-vehicles v-turtle)) + ) + ) + ((13) + (let ((v1-5 (-> *game-info* vehicles))) + (let ((a0-6 (-> *setting-control* user-current vehicles))) + (if (nonzero? a0-6) + (set! v1-5 (logand v1-5 a0-6)) + ) + ) + (logtest? v1-5 (game-vehicles v-snake)) + ) + ) + ((14) + (let ((v1-8 (-> *game-info* vehicles))) + (let ((a0-9 (-> *setting-control* user-current vehicles))) + (if (nonzero? a0-9) + (set! v1-8 (logand v1-8 a0-9)) + ) + ) + (logtest? v1-8 (game-vehicles v-scorpion)) + ) + ) + ((15) + (let ((v1-11 (-> *game-info* vehicles))) + (let ((a0-12 (-> *setting-control* user-current vehicles))) + (if (nonzero? a0-12) + (set! v1-11 (logand v1-11 a0-12)) + ) + ) + (logtest? v1-11 (game-vehicles v-toad)) + ) + ) + ((16) + (let ((v1-14 (-> *game-info* vehicles))) + (let ((a0-15 (-> *setting-control* user-current vehicles))) + (if (nonzero? a0-15) + (set! v1-14 (logand v1-14 a0-15)) + ) + ) + (logtest? v1-14 (game-vehicles v-fox)) + ) + ) + ((17) + (let ((v1-17 (-> *game-info* vehicles))) + (let ((a0-18 (-> *setting-control* user-current vehicles))) + (if (nonzero? a0-18) + (set! v1-17 (logand v1-17 a0-18)) + ) + ) + (logtest? v1-17 (game-vehicles v-rhino)) + ) + ) + ((18) + (let ((v1-20 (-> *game-info* vehicles))) + (let ((a0-21 (-> *setting-control* user-current vehicles))) + (if (nonzero? a0-21) + (set! v1-20 (logand v1-20 a0-21)) + ) + ) + (logtest? v1-20 (game-vehicles v-mirage)) + ) + ) + ((19) + (let ((v1-23 (-> *game-info* vehicles))) + (let ((a0-24 (-> *setting-control* user-current vehicles))) + (if (nonzero? a0-24) + (set! v1-23 (logand v1-23 a0-24)) + ) + ) + (logtest? v1-23 (game-vehicles v-x-ride)) + ) + ) + ((21) + #t + ) + (else + #f + ) + ) + ) + +;; definition for method 146 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-146 ((this wvehicle) (arg0 vector)) + (with-pp + (vector-float*! (-> this surface-velocity) arg0 (-> pp clock frames-per-second)) + 0 + (none) + ) + ) + +;; definition for method 54 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-54 ((this wvehicle)) + ((method-of-type vehicle rigid-body-object-method-54) this) + 0 + (none) + ) + +;; definition for method 128 of type wvehicle +(defmethod vehicle-method-128 ((this wvehicle)) + (have-vehicle-v-type? (the-as int (-> this info vehicle-type))) + ) + +;; definition for method 144 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-144 ((this wvehicle)) + (send-event *vehicle-manager* 'extra-bank (-> this info sound bank-replace)) + (let ((gp-0 + (new 'stack 'font-context *font-default-matrix* 22 320 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + 1.0 + (let* ((v1-9 (-> *setting-control* user-default language)) + (f30-0 (cond + ((= v1-9 (language-enum korean)) + 1.3 + ) + ((= v1-9 (language-enum russian)) + 1.3 + ) + (else + 1.0 + ) + ) + ) + ) + (let ((v1-11 gp-0)) + (set! (-> v1-11 width) (the float 350)) + ) + (let ((v1-12 gp-0)) + (set! (-> v1-12 height) (the float 80)) + ) + (let ((v1-13 gp-0)) + (set! (-> v1-13 scale) (* 0.7 f30-0)) + ) + (set! (-> gp-0 flags) (font-flags shadow kerning large)) + (print-game-text + (lookup-text! *common-text* (text-id text-0779) #f) + gp-0 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + (let ((a1-4 (-> this info name-text))) + (when (nonzero? a1-4) + (let ((a0-11 gp-0)) + (set! (-> a0-11 color) (font-color cyan)) + ) + (+! (-> gp-0 origin y) (the float (the int (* 30.0 f30-0)))) + (let ((v1-20 gp-0)) + (set! (-> v1-20 scale) (* 0.6 f30-0)) + ) + (print-game-text (lookup-text! *common-text* a1-4 #f) gp-0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 145 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-145 ((this wvehicle)) + (when (not (have-earned-vehicle-v-type? (the-as int (-> this info vehicle-type)))) + (let ((gp-0 + (new 'stack 'font-context *font-default-matrix* 22 320 0.0 (font-color default) (font-flags shadow kerning)) + ) + ) + 1.0 + (let* ((v1-5 (-> *setting-control* user-default language)) + (f30-0 (cond + ((= v1-5 (language-enum korean)) + 1.3 + ) + ((= v1-5 (language-enum russian)) + 1.3 + ) + (else + 1.0 + ) + ) + ) + ) + (let ((v1-7 gp-0)) + (set! (-> v1-7 width) (the float 350)) + ) + (let ((v1-8 gp-0)) + (set! (-> v1-8 height) (the float 80)) + ) + (let ((v1-9 gp-0)) + (set! (-> v1-9 scale) (* 0.7 f30-0)) + ) + (set! (-> gp-0 flags) (font-flags shadow kerning large)) + (let ((a1-1 (-> this info name-text))) + (when (nonzero? a1-1) + (let ((a0-8 gp-0)) + (set! (-> a0-8 color) (font-color cyan)) + ) + (let ((v1-14 gp-0)) + (set! (-> v1-14 scale) (* 0.6 f30-0)) + ) + (print-game-text (lookup-text! *common-text* a1-1 #f) gp-0 #f 44 (bucket-id hud-draw-hud-alpha)) + ) + ) + (+! (-> gp-0 origin y) (the float (the int (* 30.0 f30-0)))) + ) + (let ((a0-12 gp-0)) + (set! (-> a0-12 color) (font-color default)) + ) + (print-game-text + (lookup-text! *common-text* (text-id text-0887) #f) + gp-0 + #f + 44 + (bucket-id hud-draw-hud-alpha) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 170 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod wvehicle-method-170 ((this wvehicle)) + (-> this info rider attach-point-count) + (none) + ) + +;; definition for method 171 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod wvehicle-method-171 ((this wvehicle) (arg0 vector) (arg1 int)) + (vector-matrix*! arg0 (the-as vector (-> this info rider attach-point-array arg1)) (-> this rbody matrix)) + 0 + (none) + ) + +;; definition for method 172 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod wvehicle-method-172 ((this wvehicle) (arg0 quaternion) (arg1 int)) + (let ((gp-0 (new 'stack-no-clear 'inline-array 'quaternion 2))) + (quaternion-zxy! (-> gp-0 0) (-> this info rider attach-point-array arg1 rot)) + (quaternion*! arg0 (the-as quaternion (-> this rbody rot)) (-> gp-0 0)) + ) + 0 + (none) + ) + +;; definition for method 173 of type wvehicle +(defmethod wvehicle-method-173 ((this wvehicle) (arg0 vector)) + (let ((gp-0 (new 'stack-no-clear 'wvehicle-stack-type1))) + (set! (-> gp-0 float00) (the-as float #x7f800000)) + (set! (-> gp-0 byte00) -1) + (dotimes (s3-0 (-> this info rider attach-point-count)) + (let ((s2-0 (handle->process (-> this attached-array s3-0)))) + (when (not (if (type? s2-0 process-focusable) + s2-0 + ) + ) + (wvehicle-method-171 this (-> gp-0 vec00) s3-0) + (set! (-> gp-0 float01) (vector-vector-distance-squared arg0 (-> gp-0 vec00))) + (when (< (-> gp-0 float01) (-> gp-0 float00)) + (set! (-> gp-0 float00) (-> gp-0 float01)) + (set! (-> gp-0 byte00) s3-0) + ) + ) + ) + ) + (-> gp-0 byte00) + ) + ) + +;; definition for method 174 of type wvehicle +;; WARN: Return type mismatch process vs process-focusable. +(defmethod get-attached-by-idx ((this wvehicle) (arg0 int)) + (let ((gp-0 (handle->process (-> this attached-array arg0)))) + (the-as process-focusable (if (type? gp-0 process-focusable) + gp-0 + ) + ) + ) + ) + +;; definition for method 175 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod add-attached-at-idx ((this wvehicle) (arg0 int) (arg1 process-focusable)) + (if arg1 + (set! (-> this attached-array arg0) (process->handle arg1)) + ) + 0 + (none) + ) + +;; definition for method 176 of type wvehicle +(defmethod remove-attached-from-arr ((this wvehicle) (arg0 process-focusable)) + (let ((v1-2 (process->handle arg0))) + (dotimes (a1-4 (-> this info rider attach-point-count)) + (if (= v1-2 (-> this attached-array a1-4)) + (set! (-> this attached-array a1-4) (the-as handle #f)) + ) + ) + ) + #f + ) + +;; definition for method 142 of type wvehicle +;; WARN: Return type mismatch symbol vs none. +(defmethod vehicle-method-142 ((this wvehicle)) + (reset-momentum! (-> this rbody)) + (set! (-> this wheel-rev) 0.0) + (dotimes (v1-2 (-> this info physics-model wheel-count)) + (let ((a0-5 (-> this wheel v1-2))) + (set! (-> a0-5 rev) 0.0) + (set! (-> a0-5 up-vel) 0.0) + (set! (-> a0-5 side-vel) 0.0) + (set! (-> a0-5 forward-vel) 0.0) + (set! (-> a0-5 forward-slip-vel) 0.0) + ) + ) + (none) + ) + +;; definition for method 40 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod apply-momentum! ((this wvehicle)) + (let ((t9-0 (method-of-type vehicle apply-momentum!))) + (t9-0 this) + ) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag particles joints) (-> this v-flags)))) + (none) + ) + +;; definition for method 41 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod disable-physics! ((this wvehicle)) + (let ((t9-0 (method-of-type vehicle disable-physics!))) + (t9-0 this) + ) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag particles joints) (-> this v-flags)))) + (none) + ) + +;; definition for method 124 of type wvehicle +(defmethod vehicle-method-124 ((this wvehicle)) + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + ((method-of-type vehicle vehicle-method-124) this) + (none) + ) + +;; definition for method 169 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod wvehicle-method-169 ((this wvehicle)) + 0 + (none) + ) + +;; definition for method 64 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-64 ((this wvehicle)) + (when (and (not (logtest? (vehicle-flag turbo-boost) (-> this v-flags))) (>= (-> this turbo-supply) 1.0)) + (cond + ((< (-> this turbo-supply) 1.0) + (if (not (logtest? (-> this controls prev-flags) (vehicle-controls-flag vcf2))) + (sound-play "turbo-dud") + ) + ) + ((< (-> this turbo-ready) 1.0) + (if (not (logtest? (-> this controls prev-flags) (vehicle-controls-flag vcf2))) + (sound-play "turbo-out") + ) + ) + (else + (set! (-> this turbo-ready) 0.0) + (+! (-> this turbo-supply) -1.0) + (set! (-> this turbo-boost-time) (the-as uint (current-time))) + (set! (-> this turbo-boost-factor) (-> this info handling turbo-boost-factor)) + (set! (-> this turbo-boost-duration) (-> this info handling turbo-boost-duration)) + (logior! (-> this v-flags) (vehicle-flag turbo-boost)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 143 of type wvehicle +(defmethod vehicle-method-143 ((this wvehicle) (arg0 process)) + (set! (-> this target-status handle) (process->handle arg0)) + (set! (-> this ai-state) (the-as uint 1)) + (go (method-of-object this hostile)) + ) + +;; definition for method 132 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-132 ((this wvehicle) (arg0 traffic-object-spawn-params)) + (case (-> arg0 behavior) + ((3) + (set! (-> this target-status handle) (-> arg0 handle)) + (go (method-of-object this hostile)) + ) + ((10) + (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)) + ) + ) + ) + ((13) + (go (method-of-object this undefined1)) + ) + (else + ((method-of-type vehicle vehicle-method-132) this arg0) + ) + ) + 0 + (none) + ) + +;; definition for method 102 of type wvehicle +(defmethod vehicle-method-102 ((this wvehicle)) + (logtest? (vehicle-flag disturbed player-driving in-pursuit) (-> this v-flags)) + ) + +;; definition for method 103 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-103 ((this wvehicle)) + (local-vars (v1-8 float) (v1-13 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)) + (let* ((f0-0 (-> this camera-dist2)) + (f1-0 0.000024414063) + (f0-1 (* f0-0 (* f1-0 f1-0))) + ) + (.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-8 vf1) + (when (and (< v1-8 f0-1) (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-13 vf1) + (let ((f1-4 v1-13) + (f2-0 614.4) + ) + (< f1-4 (* f0-1 (* f2-0 f2-0))) + ) + ) + ) + (logclear! (-> this v-flags) (vehicle-flag disturbed)) + (vehicle-method-142 this) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 161 of type wvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod spawn-wheels! ((this wvehicle) (arg0 skeleton-group) (arg1 skeleton-group) (arg2 skeleton-group) (arg3 skeleton-group)) + (local-vars (sv-96 vehicle-wheel-state)) + (let ((s1-0 (new 'stack-no-clear 'vehicle-wheel-init-params))) + (set! (-> s1-0 position quad) (-> this root trans quad)) + (quaternion-identity! (-> s1-0 rotation)) + (vector-identity! (-> s1-0 scale)) + (set! (-> s1-0 skel) arg0) + (set! (-> s1-0 skel-blur) arg1) + (set! (-> s1-0 level) (the-as symbol (-> this level))) + (set! (-> s1-0 radius) 4096.0) + (set! (-> s1-0 collision-mesh-index) -1) + (&-> s1-0 skel) + (dotimes (s0-0 (-> this info physics-model wheel-count)) + (cond + ((and arg2 (>= s0-0 2)) + (set! (-> s1-0 skel) arg2) + (set! (-> s1-0 skel-blur) arg3) + ) + (else + (set! (-> s1-0 skel) arg0) + (set! (-> s1-0 skel-blur) arg1) + ) + ) + (set! sv-96 (-> this wheel s0-0)) + (set! (-> s1-0 radius) (* 1.3 (-> sv-96 info scale) (-> sv-96 info radius))) + (vector-identity! (-> s1-0 scale)) + (set! (-> s1-0 scale x) (-> sv-96 x-scale)) + (vector-float*! (-> s1-0 scale) (-> s1-0 scale) (-> sv-96 info scale)) + (if (logtest? (-> this info flags) #x4000) + (set! (-> s1-0 collision-mesh-index) (if (>= (-> sv-96 x-scale) 0.0) + 0 + 1 + ) + ) + ) + (set! (-> sv-96 handle) + (process->handle (vehicle-wheel-spawn this (the-as vehicle-wheel-init-params (&-> s1-0 skel)))) + ) + (set! (-> sv-96 pos) (-> sv-96 info settle-pos)) + (set! (-> sv-96 pos2) (-> sv-96 pos)) + ) + ) + (wvehicle-method-165 this) + (vehicle-method-79 this) + 0 + (none) + ) + +;; definition for method 82 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-82 ((this wvehicle)) + (call-parent-method this) + (set-setting! 'rapid-tracking #f 0.0 0) + (let ((v1-2 (process->ppointer this))) + (persist-with-delay + *setting-control* + 'butt-handle + (seconds 1.5) + 'butt-handle + (the-as symbol v1-2) + 32768.0 + (-> v1-2 0 pid) + ) + ) + 0 + (none) + ) + +;; definition for method 83 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-83 ((this wvehicle)) + (call-parent-method this) + (logclear! (-> this draw status) (draw-control-status force-vu1)) + 0 + (none) + ) + +;; definition for method 148 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-148 ((this wvehicle)) + (send-event *target* 'draw #t) + 0 + (none) + ) + +;; definition for method 147 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-147 ((this wvehicle)) + (send-event *target* 'draw #f) + 0 + (none) + ) + +;; definition for method 20 of type wvehicle +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this wvehicle)) + (let ((v0-0 0)) + (if (logtest? (vehicle-flag ai-driving) (-> this v-flags)) + (set! v0-0 (logior v0-0 40)) + ) + (if (logtest? (vehicle-flag dead ignore-damage ignore-impulse) (-> this v-flags)) + (set! v0-0 0) + ) + (the-as search-info-flag v0-0) + ) + ) + +;; definition for method 149 of type wvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-149 ((this wvehicle)) + (let ((gp-0 (new 'stack-no-clear 'wvehicle-stack-type2))) + (set! (-> gp-0 float0) 4096.0) + (quaternion->matrix (-> gp-0 mat0) (-> this root quat)) + (set! (-> gp-0 mat0 trans quad) (-> this root trans quad)) + (set! (-> gp-0 vec3 quad) (-> gp-0 mat0 fvec quad)) + (set! (-> gp-0 vec1 quad) (-> this root trans quad)) + (set! (-> gp-0 cquery start-pos quad) (-> gp-0 vec1 quad)) + (+! (-> gp-0 cquery start-pos y) 4096.0) + (vector-reset! (-> gp-0 vec2)) + (set! (-> gp-0 vec2 y) 1.0) + (vector-z-quaternion! (-> gp-0 vec3) (-> this root quat)) + (set-vector! (-> gp-0 cquery move-dist) 0.0 -40960.0 0.0 1.0) + (let ((v1-11 (-> gp-0 cquery))) + (set! (-> v1-11 radius) (-> gp-0 float0)) + (set! (-> v1-11 collide-with) (collide-spec backgnd)) + (set! (-> v1-11 ignore-process0) #f) + (set! (-> v1-11 ignore-process1) #f) + (set! (-> v1-11 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-11 action-mask) (collide-action solid)) + ) + (let ((f30-0 (fill-and-probe-using-line-sphere *collide-cache* (-> gp-0 cquery)))) + (when (>= f30-0 0.0) + (vector+float*! (-> gp-0 vec1) (-> gp-0 cquery start-pos) (-> gp-0 cquery move-dist) f30-0) + (set! (-> gp-0 vec1 y) (- (-> gp-0 vec1 y) (-> gp-0 float0))) + (let* ((v1-19 (-> gp-0 cquery best-other-tri pat material)) + (a0-22 (cond + ((or (= v1-19 (pat-material stone)) (= v1-19 (pat-material wood))) + 0 + ) + ((or (= v1-19 (pat-material dirt)) (= v1-19 (pat-material unknown))) + 1 + ) + ((= v1-19 (pat-material sand)) + 2 + ) + ((= v1-19 (pat-material quicksand)) + 3 + ) + ((= v1-19 (pat-material metal)) + 6 + ) + (else + 1 + ) + ) + ) + (v1-21 (-> *wvehicle-surfaces* (the-as uint a0-22))) + ) + (set! (-> gp-0 vec1 y) (- (-> gp-0 vec1 y) (-> v1-21 depth))) + ) + (set! (-> gp-0 vec2 quad) (-> gp-0 cquery best-other-tri normal quad)) + (when (< (-> gp-0 vec2 y) (cos 3640.889)) + (vector-reset! (-> gp-0 vec2)) + (set! (-> gp-0 vec2 y) 1.0) + ) + (set! (-> this root trans quad) (-> gp-0 vec1 quad)) + 0 + ) + (if (< f30-0 0.0) + 0 + ) + ) + (set! (-> this root trans quad) (-> gp-0 vec1 quad)) + (forward-up-nopitch->quaternion (-> this root quat) (-> gp-0 vec3) (-> gp-0 vec2)) + ) + 0 + (none) + ) + +;; definition for method 198 of type wvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod wvehicle-method-198 ((this wvehicle)) + (let ((gp-0 (new 'stack-no-clear 'wvehicle-physics-work))) + (set! (-> gp-0 ground-pos z) (seconds-per-frame)) + (let ((v1-2 (-> this info setup))) + (set! (-> gp-0 ground-pos y) (fmax (fmin (-> this gun-aim-yaw) (-> v1-2 gun-yaw-max)) (-> v1-2 gun-yaw-min))) + ) + (let* ((v1-4 (-> gp-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-4 rvec quad) a0-3) + (set! (-> v1-4 uvec quad) a1-0) + (set! (-> v1-4 fvec quad) a2-0) + (set! (-> v1-4 trans quad) a3-1) + ) + (set! (-> gp-0 tmp quad) (-> this turret-local-pos quad)) + (set-vector! (-> gp-0 probe-dir) (sin (-> gp-0 ground-pos y)) 0.0 (cos (-> gp-0 ground-pos y)) 1.0) + (vector+float*! (-> gp-0 steering-axis) (-> gp-0 tmp) (-> gp-0 probe-dir) 204800.0) + (vector-matrix*! (-> gp-0 local-pos) (-> gp-0 tmp) (-> gp-0 mat)) + (set! (-> this gun-targ-pitch) 0.0) + (set! (-> this gun-targ-yaw) (-> gp-0 ground-pos y)) + (vector-matrix*! (-> gp-0 p-body) (-> gp-0 steering-axis) (-> gp-0 mat)) + (set! (-> gp-0 p-body w) 163840.0) + (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)) + (the-as (pointer collide-shape) (-> s4-1 data)) + (-> s4-1 allocated-length) + ) + ) + ) + (set! (-> s4-1 length) (the-as int (-> gp-0 ground-normal-sum x))) + (let ((a0-14 (find-nearest-focusable + (the-as (array collide-shape) s4-1) + (-> gp-0 p-body) + 655360.0 + (search-info-flag attackable enemy attackable-priority high-priority) + (search-info-flag) + (-> gp-0 mat fvec) + (-> gp-0 local-pos) + 27306.666 + ) + ) + ) + (when a0-14 + (vector-! (-> gp-0 axis) (get-trans a0-14 3) (-> gp-0 local-pos)) + (matrix-transpose! (the-as matrix (-> gp-0 force)) (-> gp-0 mat)) + (vector-matrix*! (-> gp-0 dir) (-> gp-0 axis) (the-as matrix (-> gp-0 force))) + (vector-normalize! (-> gp-0 dir) 1.0) + (set! (-> this gun-targ-yaw) (atan (-> gp-0 dir x) (-> gp-0 dir z))) + (set! (-> this gun-targ-pitch) (asin (-> gp-0 dir y))) + 0 + ) + ) + ) + (let ((s4-4 (-> this info setup))) + (set! (-> this gun-targ-yaw) (fmax (fmin (-> this gun-targ-yaw) (-> s4-4 gun-yaw-max)) (-> s4-4 gun-yaw-min))) + (set! (-> this gun-targ-pitch) + (fmax (fmin (-> this gun-targ-pitch) (-> s4-4 gun-pitch-max)) (-> s4-4 gun-pitch-min)) + ) + (if (>= (-> s4-4 gun-yaw-max) 65536.0) + (set! (-> this gun-yaw) + (deg-seek + (-> this gun-yaw) + (-> this gun-targ-yaw) + (* 10.0 (fabs (deg- (-> this gun-yaw) (-> this gun-targ-yaw))) (-> gp-0 ground-pos z)) + ) + ) + (+! (-> this gun-yaw) + (* (- (-> this gun-targ-yaw) (-> this gun-yaw)) (fmin 1.0 (* 10.0 (-> gp-0 ground-pos z)))) + ) + ) + (+! (-> this gun-pitch) + (* (- (-> this gun-targ-pitch) (-> this gun-pitch)) (fmin 1.0 (* 10.0 (-> gp-0 ground-pos z)))) + ) + (set! (-> gp-0 ground-normal-sum y) (sin (-> this gun-yaw))) + (set! (-> gp-0 ground-normal-sum z) (cos (-> this gun-yaw))) + (set! (-> gp-0 ground-normal-sum w) (sin (-> this gun-pitch))) + (set! (-> gp-0 ground-pos x) (cos (-> this gun-pitch))) + (set-vector! + (-> gp-0 probe-dir) + (* (-> gp-0 ground-pos x) (-> gp-0 ground-normal-sum y)) + (-> gp-0 ground-normal-sum w) + (* (-> gp-0 ground-pos x) (-> gp-0 ground-normal-sum z)) + 1.0 + ) + (vector+float*! (-> gp-0 steering-axis) (-> gp-0 tmp) (-> gp-0 probe-dir) (-> s4-4 gun-z-offset)) + ) + (set! (-> this gun-local-dir quad) (-> gp-0 probe-dir quad)) + (set! (-> this gun-local-pos quad) (-> gp-0 steering-axis quad)) + ) + 0 + (none) + ) + +;; definition for method 199 of type wvehicle +;; INFO: Used lq/sq +(defmethod wvehicle-method-199 ((this wvehicle)) + (let ((s5-0 (new 'stack-no-clear 'wvehicle-stack-type3))) + (set! (-> s5-0 float0) (vector-dot (-> this rbody lin-velocity) (-> this rbody matrix fvec))) + (if (and (cpad-hold? 0 square) (< (-> s5-0 float0) -20480.0)) + (set! (-> this lock-turret) (the-as basic #t)) + ) + (if (or (< 0.0 (-> s5-0 float0)) + (or (< 0.25 (fabs (analog-input (the-as int (-> *cpad-list* cpads 0 rightx)) 128.0 48.0 110.0 1.0))) + (logtest? (vehicle-flag camera-look-mode) (-> this v-flags)) + ) + ) + (set! (-> this lock-turret) #f) + ) + (cond + ((-> this lock-turret) + (set! (-> this gun-aim-yaw) 0.0) + ) + (else + (matrix-transpose! (-> s5-0 mat0) (-> this rbody matrix)) + (matrix*! (-> s5-0 mat0) (camera-matrix) (-> s5-0 mat0)) + (set! (-> s5-0 vec0 quad) (-> s5-0 mat0 fvec quad)) + (set! (-> this gun-aim-yaw) (atan (-> s5-0 vec0 x) (-> s5-0 vec0 z))) + ) + ) + ) + 0 + (wvehicle-method-198 this) + (none) + ) + +;; definition for method 201 of type wvehicle +;; WARN: Return type mismatch int vs none. +(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) (arg0 float)) + 0 + (none) + ) + +;; definition of type kill-player-process +(deftype kill-player-process (process) + ((player handle) + (mode symbol) + ) + (:state-methods + idle + die + ) + ) + +;; definition for method 3 of type kill-player-process +(defmethod inspect ((this kill-player-process)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Tplayer: ~D~%" (-> this player)) + (format #t "~2Tmode: ~A~%" (-> this mode)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (kill-player-process) + :virtual #t + :trans (behavior () + (let* ((s5-0 (handle->process (-> self player))) + (gp-0 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (if (not gp-0) + (go-virtual die) + ) + (if (focus-test? (the-as process-focusable gp-0) dead) + (go-virtual die) + ) + (when (not (focus-test? (the-as process-focusable gp-0) grabbed)) + (if (send-event + gp-0 + '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 (-> self mode)) + ) + ) + ) + (go-virtual die) + ) + ) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate die (kill-player-process) + :virtual #t + :code (behavior () + '() + ) + ) + +;; definition for function kill-player-process-init-by-other +(defbehavior kill-player-process-init-by-other kill-player-process ((arg0 process) (arg1 symbol)) + (set! (-> self player) (process->handle arg0)) + (set! (-> self mode) arg1) + (go-virtual idle) + ) + +;; definition for function kill-player-process-spawn +;; WARN: Return type mismatch process vs kill-player-process. +(defun kill-player-process-spawn ((arg0 process) (arg1 process) (arg2 symbol)) + (let ((gp-0 (the-as process #f))) + (let ((v1-1 (process-spawn kill-player-process arg0 arg2 :name "kill-player-process" :to arg1))) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as kill-player-process gp-0) + ) + ) + +;; definition for method 116 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-116 ((this wvehicle) (arg0 symbol)) + (dotimes (s4-0 (-> this info rider seat-count)) + (let* ((s3-0 (handle->process (-> this rider-array s4-0))) + (a1-3 (if (type? s3-0 process-focusable) + s3-0 + ) + ) + ) + (when (and a1-3 (logtest? (-> a1-3 mask) (process-mask target))) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag player-killed) (-> this v-flags)))) + (kill-player-process-spawn a1-3 a1-3 arg0) + ) + ) + (put-rider-in-seat this s4-0 (the-as process #f)) + ) + 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 new file mode 100644 index 0000000000..35a60cac4a --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle-wheel_REF.gc @@ -0,0 +1,488 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type vehicle-wheel-init-params +(deftype vehicle-wheel-init-params (structure) + ((skel skeleton-group) + (skel-blur skeleton-group) + (level symbol) + (radius float) + (collision-mesh-index int8) + (position vector :inline) + (rotation quaternion :inline) + (scale vector :inline) + ) + ) + +;; definition for method 3 of type vehicle-wheel-init-params +(defmethod inspect ((this vehicle-wheel-init-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'vehicle-wheel-init-params) + (format #t "~1Tskel: ~A~%" (-> this skel)) + (format #t "~1Tskel-blur: ~A~%" (-> this skel-blur)) + (format #t "~1Tlevel: ~A~%" (-> this level)) + (format #t "~1Tradius: ~f~%" (-> this radius)) + (format #t "~1Tcollision-mesh-index: ~D~%" (-> this collision-mesh-index)) + (format #t "~1Tposition: #~%" (-> this position)) + (format #t "~1Trotation: #~%" (-> this rotation)) + (format #t "~1Tscale: #~%" (-> this scale)) + (label cfg-4) + this + ) + +;; definition for symbol *vehicle-wheel-constants*, type rigid-body-object-constants +(define *vehicle-wheel-constants* (new 'static 'rigid-body-object-constants + :info (new 'static 'rigid-body-info + :mass 1.0 + :inv-mass 1.0 + :linear-damping 0.995 + :angular-damping 0.995 + :bounce-factor 0.5 + :friction-factor 0.5 + :bounce-mult-factor 1.22 + :cm-offset-joint (new 'static 'vector :w 1.0) + :inertial-tensor-box (new 'static 'array meters 3 (meters 2) (meters 3) (meters 3)) + ) + :extra (new 'static 'rigid-body-object-extra-info + :max-time-step 0.033333335 + :gravity (meters 50) + :idle-distance (meters 50) + :attack-force-scale 1.0 + ) + :name '*vehicle-wheel-constants* + ) + ) + +;; definition of type vehicle-wheel +(deftype vehicle-wheel (rigid-body-object) + ((collision-enable? symbol) + (normal-look lod-set :inline) + (blur-look lod-set :inline) + ) + (:state-methods + explode + fade-out + die + ) + (:methods + (init-collision! (_type_ vehicle-wheel-init-params) none :replace) + ) + ) + +;; definition for method 3 of type vehicle-wheel +(defmethod inspect ((this vehicle-wheel)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type rigid-body-object inspect))) + (t9-0 this) + ) + (format #t "~2Tcollision-enable?: ~A~%" (-> this collision-enable?)) + (format #t "~2Tnormal-look: #~%" (-> this normal-look)) + (format #t "~2Tblur-look: #~%" (-> this blur-look)) + (label cfg-4) + this + ) + +;; definition for method 34 of type vehicle-wheel +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this vehicle-wheel) (arg0 vehicle-wheel-init-params)) + (cond + ((< (-> arg0 collision-mesh-index) 0) + (let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-0 reaction) cshape-reaction-default) + (set! (-> s4-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s4-0 penetrate-using) (penetrate vehicle)) + (let ((v1-8 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 0)))) + (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 (-> arg0 radius)) + (set! (-> s4-0 total-prims) (the-as uint 1)) + (set! (-> s4-0 root-prim) v1-8) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-11 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-11 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-11 prim-core collide-with)) + ) + (set! (-> this root) s4-0) + ) + ) + (else + (let ((s4-1 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-1 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-1 reaction) cshape-reaction-default) + (set! (-> s4-1 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (set! (-> s4-1 penetrate-using) (penetrate vehicle)) + (let ((s3-0 (new 'process 'collide-shape-prim-group s4-1 (the-as uint 2) 0))) + (set! (-> s4-1 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 (-> arg0 radius)) + (set! (-> s4-1 root-prim) s3-0) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-sphere s4-1 (the-as uint 0)))) + (set! (-> v1-24 prim-core action) (collide-action solid)) + (set! (-> v1-24 transform-index) 0) + (set-vector! (-> v1-24 local-sphere) 0.0 0.0 0.0 (-> arg0 radius)) + ) + (let ((v1-26 + (new 'process 'collide-shape-prim-mesh s4-1 (the-as uint (-> arg0 collision-mesh-index)) (the-as uint 0)) + ) + ) + (set! (-> v1-26 prim-core action) (collide-action solid rideable)) + (set! (-> v1-26 transform-index) 3) + (set-vector! (-> v1-26 local-sphere) 0.0 0.0 0.0 (-> arg0 radius)) + ) + (set! (-> s4-1 nav-radius) (* 0.75 (-> s4-1 root-prim local-sphere w))) + (let ((v1-29 (-> s4-1 root-prim))) + (set! (-> s4-1 backup-collide-as) (-> v1-29 prim-core collide-as)) + (set! (-> s4-1 backup-collide-with) (-> v1-29 prim-core collide-with)) + ) + (set! (-> this root) s4-1) + ) + ) + ) + (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 + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> arg0 prim-core collide-as) (collide-spec vehicle-sphere-no-probe)) + ) + ((= v1-0 1) + (set! (-> arg0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> arg0 prim-core collide-as) (collide-spec vehicle-mesh-no-block-use)) + ) + ((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 vehicle-mesh-no-block-use vehicle-sphere-no-probe)) + ) + ) + ) + (none) + ) + ) + 0 + (none) + ) + +;; definition for method 35 of type vehicle-wheel +;; WARN: Return type mismatch int vs none. +(defmethod init-rbody-control! ((this vehicle-wheel)) + (alloc-rbody-control! this *vehicle-wheel-constants*) + (logior! (-> this rbody flags) (rigid-body-flag enable-collision)) + (set! (-> this root max-iteration-count) (the-as uint 3)) + (set! (-> this max-time-step) 0.033333335) + (set! (-> this draw shadow-ctrl) + (new 'process 'shadow-control -43008.0 -2048.0 69632.0 (the-as vector #f) (shadow-flags) 245760.0) + ) + (set! (-> this focus-status) + (the-as focus-status (logior (focus-status gun-no-target) (-> this focus-status))) + ) + 0 + (none) + ) + +;; definition for method 30 of type vehicle-wheel +;; WARN: Return type mismatch int vs none. +(defmethod rigid-body-object-method-30 ((this vehicle-wheel)) + (ja-post) + (if (logtest? (-> this rbody flags) (rigid-body-flag enable-collision)) + (update-transforms (-> this root)) + ) + 0 + (none) + ) + +;; definition for method 39 of type vehicle-wheel +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod rbody-post ((this vehicle-wheel)) + (let ((v1-0 (new 'stack-no-clear 'rigid-body-move-work))) + (set! (-> v1-0 cquery start-pos quad) (-> this rbody position quad)) + (vector-float*! (-> v1-0 cquery move-dist) (-> this rbody lin-velocity) (seconds-per-frame)) + (let ((a0-4 (-> v1-0 cquery))) + (set! (-> a0-4 radius) (+ 4096.0 (-> this root root-prim local-sphere w))) + (set! (-> a0-4 collide-with) (collide-spec + backgnd + jak + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + player-list + collectable + blocking-plane + pusher + vehicle-mesh-probeable + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> a0-4 ignore-process0) this) + (set! (-> a0-4 ignore-process1) #f) + (set! (-> a0-4 ignore-pat) (new 'static 'pat-surface :noentity #x1 :nopilot #x1 :probe #x1)) + (set! (-> a0-4 action-mask) (collide-action solid)) + ) + (fill-using-line-sphere *collide-cache* (-> v1-0 cquery)) + ) + (if *display-collide-cache* + (debug-draw *collide-cache*) + ) + (rigid-body-object-method-32 this) + (rigid-body-object-method-38 this) + (update-rbody-transform! (-> this rbody) (-> this root)) + (rigid-body-object-method-30 this) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate idle (vehicle-wheel) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-2 object)) + (case message + (('explode) + (lods-assign! (-> self draw) (-> self normal-look)) + (let ((a0-4 (-> self draw color-mult))) + (vector-float*! (the-as vector a0-4) (the-as vector a0-4) 0.25) + ) + (set! (-> self rbody position quad) (-> self root trans quad)) + (quaternion-copy! (the-as quaternion (-> self rbody rot)) (-> self root quat)) + (let ((v1-10 (-> block param 0))) + (when v1-10 + (vector-float*! (-> self rbody lin-momentum) (the-as vector v1-10) (-> self info info mass)) + (go-virtual explode) + ) + ) + ) + (('enable-collision) + (set! v0-2 (logior (-> self rbody flags) (rigid-body-flag enable-collision))) + (set! (-> self rbody flags) (the-as rigid-body-flag v0-2)) + v0-2 + ) + (('disable-collision) + (set! v0-2 (logclear (-> self rbody flags) (rigid-body-flag enable-collision))) + (set! (-> self rbody flags) (the-as rigid-body-flag v0-2)) + v0-2 + ) + (('hide) + (set! v0-2 (logior (-> self draw status) (draw-control-status no-draw))) + (set! (-> self draw status) (the-as draw-control-status v0-2)) + v0-2 + ) + (('unhide) + (set! v0-2 (logclear (-> self draw status) (draw-control-status no-draw))) + (set! (-> self draw status) (the-as draw-control-status v0-2)) + v0-2 + ) + ) + ) + :enter (behavior () + (iterate-prims + (-> self 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)) + (set! (-> arg0 prim-core collide-as) (collide-spec)) + 0 + ) + ((or (= v1-0 1) (zero? v1-0)) + (set! (-> arg0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> arg0 prim-core collide-as) (collide-spec vehicle-mesh-no-block-use)) + ) + ) + ) + (none) + ) + ) + ) + :trans #f + :post (behavior () + (rigid-body-object-method-30 self) + ) + ) + +;; failed to figure out what this is: +(defstate explode (vehicle-wheel) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('impact-impulse) + (logior! (-> self root penetrated-by) (penetrate vehicle)) + #t + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self rbody flags) (rigid-body-flag enable-physics)) + (iterate-prims + (-> self root) + (lambda ((arg0 collide-shape-prim)) + (let ((v1-0 (-> arg0 prim-core prim-type))) + (cond + ((or (= v1-0 -1) (zero? v1-0)) + (set! (-> arg0 prim-core collide-with) (collide-spec + backgnd + bot + crate + civilian + enemy + obstacle + vehicle-sphere + hit-by-player-list + hit-by-others-list + collectable + pusher + shield + vehicle-sphere-no-probe + ) + ) + (set! (-> arg0 prim-core collide-as) (collide-spec vehicle-sphere-no-probe)) + ) + ((= v1-0 1) + (set! (-> arg0 prim-core collide-with) (collide-spec)) + (set! (-> arg0 prim-core collide-as) (collide-spec)) + 0 + ) + ) + ) + (none) + ) + ) + ) + :trans #f + :code sleep-code + :post (behavior () + (rbody-post self) + (if (time-elapsed? (-> self state-time) (seconds 4)) + (go-virtual fade-out) + ) + ) + ) + +;; failed to figure out what this is: +(defstate fade-out (vehicle-wheel) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self draw status) (draw-control-status force-fade)) + ) + :code sleep-code + :post (behavior () + (set! (-> self draw force-fade) + (the-as + uint + (the int (fmax 0.0 (- 128.0 (* 0.42666668 (the float (- (current-time) (-> self state-time))))))) + ) + ) + (if (< (-> self draw force-fade) (the-as uint 2)) + (go-virtual die) + ) + (rbody-post self) + ) + ) + +;; failed to figure out what this is: +(defstate die (vehicle-wheel) + :virtual #t + :code (behavior () + (cleanup-for-death self) + ) + ) + +;; definition for function vehicle-wheel-init-by-other +;; INFO: Used lq/sq +(defbehavior vehicle-wheel-init-by-other vehicle-wheel ((arg0 vehicle-wheel-init-params)) + (logior! (-> self mask) (process-mask vehicle)) + (init-collision! self arg0) + (set! (-> self root trans quad) (-> arg0 position quad)) + (quaternion-copy! (-> self root quat) (-> arg0 rotation)) + (set! (-> self root scale quad) (-> arg0 scale quad)) + (set! (-> self level) (the-as level (-> arg0 level))) + (initialize-skeleton self (-> arg0 skel) (the-as pair 0)) + (setup-lods! (-> self normal-look) (-> arg0 skel) (-> self draw art-group) (-> self entity)) + (setup-lods! (-> self blur-look) (-> arg0 skel-blur) (-> self draw art-group) (-> self entity)) + (set! (-> self normal-look lod 0 dist) 819200.0) + (set! (-> self blur-look lod 0 dist) 819200.0) + (set! (-> self draw lod-set lod 0 dist) 819200.0) + (let ((f0-6 (fmax (fmax (fabs (-> arg0 scale x)) (fabs (-> arg0 scale y))) (fabs (-> arg0 scale z))))) + (set! (-> self draw bounds w) (* (-> arg0 skel bounds w) f0-6)) + (set! (-> self draw longest-edge) (* (-> arg0 skel longest-edge) f0-6)) + ) + (init-rbody-control! self) + (go-virtual idle) + ) + +;; definition for function vehicle-wheel-spawn +;; WARN: Return type mismatch process vs vehicle-wheel. +(defun vehicle-wheel-spawn ((arg0 process) (arg1 vehicle-wheel-init-params)) + (let ((gp-0 (the-as process #f))) + (let* ((s3-0 (get-process *default-dead-pool* vehicle-wheel #x4000 1)) + (v1-1 (when s3-0 + (let ((t9-1 (method-of-type process activate))) + (t9-1 s3-0 arg0 "vehicle-wheel" (the-as pointer #x70004000)) + ) + (run-now-in-process s3-0 vehicle-wheel-init-by-other arg1) + (-> s3-0 ppointer) + ) + ) + ) + (if v1-1 + (set! gp-0 (-> v1-1 0)) + ) + ) + (the-as vehicle-wheel gp-0) + ) + ) diff --git a/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle_REF.gc b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle_REF.gc new file mode 100644 index 0000000000..e892662a1d --- /dev/null +++ b/test/decompiler/reference/jak3/levels/desert/wvehicle/wvehicle_REF.gc @@ -0,0 +1,1319 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 166 of type wvehicle +(defmethod wvehicle-method-166 ((this wvehicle) (arg0 float) (arg1 float)) + (let* ((v1-0 (-> this info)) + (f0-0 (-> this engine-max-torque)) + (f1-3 (* (+ 1.0 (-> v1-0 engine drag)) + (if (< arg0 (-> v1-0 engine max-rpm)) + 1.0 + 0.0 + ) + (fmax (-> this idle-throttle) arg1) + ) + ) + (f2-5 0.2) + (f3-2 1.0) + (f4-2 (/ (- arg0 (-> v1-0 engine peak-torque-rpm)) (-> v1-0 engine powerband-width-rpm))) + ) + (* f0-0 (+ (* f1-3 (fmax f2-5 (- f3-2 (* f4-2 f4-2)))) + (* -1.0 (/ arg0 (-> v1-0 engine peak-torque-rpm)) (-> v1-0 engine drag)) + ) + ) + ) + ) + +;; definition for method 164 of type wvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod wvehicle-method-164 ((this wvehicle) (arg0 vehicle-wheel-state) (arg1 vehicle-wheel-info)) + (let ((gp-0 (new 'stack-no-clear 'wvehicle-stack-type6))) + (set-vector! (-> gp-0 vec0) 1.0 0.0 0.0 1.0) + (set-vector! (-> gp-0 vec1) 0.0 1.0 0.0 1.0) + (quaternion-copy! (-> gp-0 quat3) (-> this root quat)) + (let* ((v1-3 (-> gp-0 mat0)) + (a3-0 (-> this rbody matrix)) + (a0-7 (-> a3-0 rvec quad)) + (a1-2 (-> a3-0 uvec quad)) + (a2-1 (-> a3-0 fvec quad)) + (a3-1 (-> a3-0 trans quad)) + ) + (set! (-> v1-3 rvec quad) a0-7) + (set! (-> v1-3 uvec quad) a1-2) + (set! (-> v1-3 fvec quad) a2-1) + (set! (-> v1-3 trans quad) a3-1) + ) + (set! (-> gp-0 vec2 quad) (-> arg1 local-pos quad)) + (+! (-> gp-0 vec2 x) (-> arg1 susp-arm-length)) + (set! (-> gp-0 vec2 x) (* (-> gp-0 vec2 x) (-> arg0 x-scale))) + (+! (-> gp-0 vec2 y) (-> arg1 probe-y-offset)) + (vector+float*! + (-> arg0 probe-local-pos) + (-> gp-0 vec2) + (-> arg0 local-axis) + (* (-> arg1 steer-arm-length) (-> arg0 x-scale)) + ) + (set! (-> gp-0 float0) + (+ (-> arg1 probe-y-offset) (* (-> arg1 radius) (-> arg1 scale)) (* -1.0 (-> arg0 pos2) (-> arg1 travel))) + ) + (set! (-> arg0 sin-susp-ang) (fmax -1.0 (fmin 1.0 (/ (-> gp-0 float0) (-> arg1 susp-arm-length))))) + (let ((f0-21 1.0) + (f1-11 (-> arg0 sin-susp-ang)) + ) + (set! (-> arg0 cos-susp-ang) (sqrtf (- f0-21 (* f1-11 f1-11)))) + ) + (quaternion-identity! (-> gp-0 quat4)) + (set! (-> gp-0 quat4 z) (* (sin (-> arg1 camber)) (-> arg0 x-scale))) + (set! (-> gp-0 quat4 w) (cos (-> arg1 camber))) + (when (logtest? (-> arg1 flags) (vehicle-wheel-flag vwf5)) + (quaternion-set! + (-> gp-0 quat0) + 0.0 + 0.0 + (* (-> arg0 sin-susp-ang) (-> arg0 x-scale)) + (+ 1.0 (-> arg0 cos-susp-ang)) + ) + (quaternion-normalize! (-> gp-0 quat0)) + (quaternion*! (-> gp-0 quat4) (-> gp-0 quat4) (-> gp-0 quat0)) + ) + (set! (-> gp-0 vec2 quad) (-> arg1 local-pos quad)) + (+! (-> gp-0 vec2 x) (* (-> arg1 susp-arm-length) (-> arg0 cos-susp-ang))) + (set! (-> gp-0 vec2 x) (* (-> gp-0 vec2 x) (-> arg0 x-scale))) + (+! (-> gp-0 vec2 y) (-> gp-0 float0)) + (vector+float*! + (-> gp-0 vec2) + (-> gp-0 vec2) + (-> arg0 local-axis) + (* (-> arg1 steer-arm-length) (-> arg0 x-scale)) + ) + (vector-matrix*! (-> gp-0 vec3) (-> gp-0 vec2) (-> gp-0 mat0)) + (quaternion-vector-angle! (-> gp-0 quat2) (-> gp-0 vec1) (-> arg0 steer-angle)) + (quaternion-vector-angle! (-> gp-0 quat1) (-> gp-0 vec0) (-> arg0 angle)) + (quaternion*! (-> gp-0 quat0) (-> gp-0 quat2) (-> gp-0 quat4)) + (quaternion*! (-> gp-0 quat0) (-> gp-0 quat0) (-> gp-0 quat1)) + (quaternion*! (-> arg0 quat) (-> gp-0 quat3) (-> gp-0 quat0)) + (set! (-> arg0 trans quad) (-> gp-0 vec3 quad)) + ) + 0 + (none) + ) + +;; definition for method 165 of type wvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod wvehicle-method-165 ((this wvehicle)) + (let ((s5-0 (new 'stack-no-clear 'vehicle-controls))) + (set! (-> s5-0 steering) (seconds-per-frame)) + (dotimes (s4-0 (-> this info physics-model wheel-count)) + (let* ((a1-0 (-> this wheel s4-0)) + (a2-0 (-> a1-0 info)) + ) + (let* ((f0-1 (-> a1-0 pos2)) + (f1-1 (- (-> a1-0 pos) (-> a1-0 pos2))) + (f2-1 1.0) + (f3-0 (-> s5-0 steering)) + (f4-0 (-> a1-0 forward-vel)) + (f4-2 (* f4-0 f4-0)) + (f5-0 (-> a1-0 up-vel)) + (f4-3 (+ f4-2 (* f5-0 f5-0))) + (f5-3 8192.0) + (f3-1 (* f3-0 (fmin f4-3 (* f5-3 f5-3)))) + (f4-5 15.0) + (f5-6 8192.0) + ) + (set! (-> a1-0 pos2) (+ f0-1 (* f1-1 (fmin f2-1 (* f3-1 (/ f4-5 (* f5-6 f5-6))))))) + ) + (set! (-> a1-0 angle) + (the float (sar (shl (the int (+ (-> a1-0 angle) (* 10430.379 (-> a1-0 rev) (-> s5-0 steering)))) 48) 48)) + ) + ((-> a2-0 callback) this a1-0 a2-0) + ) + ) + ) + (let ((s5-1 (new 'stack-no-clear 'matrix))) + (let ((a2-1 (-> this draw shadow-ctrl settings))) + (vector+float*! (-> s5-1 rvec) (-> a2-1 center) (-> a2-1 shadow-dir) (-> a2-1 shadow-dir w)) + ) + 0 + (dotimes (s4-1 (-> this info physics-model wheel-count)) + (let ((s3-0 (-> this wheel s4-1))) + (-> s3-0 info) + (let ((s2-0 (handle->process (-> s3-0 handle)))) + (cond + (s2-0 + (let ((s1-0 (-> (the-as process-focusable s2-0) draw shadow-ctrl settings))) + (vector-! (-> s5-1 uvec) (-> s5-1 rvec) (-> s1-0 center)) + (vector-normalize! (-> s5-1 uvec) 1.0) + (mem-copy! (the-as pointer s1-0) (the-as pointer (-> this draw shadow-ctrl settings)) 80) + (set! (-> s5-1 uvec w) (-> s1-0 shadow-dir w)) + (set! (-> s1-0 shadow-dir quad) (-> s5-1 uvec quad)) + ) + (let ((v1-39 (-> (the-as process-focusable s2-0) root))) + (set! (-> v1-39 trans quad) (-> s3-0 trans quad)) + (quaternion-copy! (-> v1-39 quat) (-> s3-0 quat)) + ) + (logand! (-> s3-0 flags) -9) + (cond + ((< 11.780972 (fabs (-> s3-0 rev))) + (when (not (logtest? (-> s3-0 flags) 1)) + (logior! (-> s3-0 flags) 1) + (lods-assign! (-> (the-as process-focusable s2-0) draw) (the-as lod-set (&-> s2-0 stack 216))) + ) + ) + (else + (when (logtest? (-> s3-0 flags) 1) + (logand! (-> s3-0 flags) -2) + (lods-assign! (-> (the-as process-focusable s2-0) draw) (the-as lod-set (&-> s2-0 stack 164))) + ) + ) + ) + ) + (else + (logior! (-> s3-0 flags) 8) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 55 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod clear-impulse-force-flag! ((this wvehicle)) + (let ((t9-0 (method-of-type vehicle clear-impulse-force-flag!))) + (t9-0 this) + ) + (when (logtest? (vehicle-flag waiting-for-player) (-> this v-flags)) + (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 77 of type wvehicle +(defmethod vehicle-method-77 ((this wvehicle)) + (local-vars (a0-19 float) (a0-23 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (if (-> this nav) + (logior! (-> this nav flags) (nav-control-flag output-sphere-hash)) + ) + (if (not (logtest? (-> this rbody flags) (rigid-body-flag enable-physics))) + (vehicle-method-142 this) + ) + (if (logtest? (-> this v-flags) (vehicle-flag in-air)) + (set! (-> this ground-time) (the-as uint (current-time))) + ) + (let ((v1-16 (-> this rbody))) + (cond + ((logtest? (vehicle-flag overturned) (-> this v-flags)) + (if (and (not (logtest? (-> this v-flags) (vehicle-flag in-air))) (< 0.0 (-> v1-16 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-16 matrix uvec y) 0.0) + (let ((a0-18 (-> v1-16 lin-velocity)) + (f1-2 16384.0) + ) + (.lvf vf1 (&-> a0-18 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-19 vf1) + (< a0-19 (* f1-2 f1-2)) + ) + (let ((a0-22 (-> v1-16 ang-velocity)) + (f1-5 4.0) + ) + (.lvf vf1 (&-> a0-22 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-23 vf1) + (< a0-23 (* f1-5 f1-5)) + ) + ) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag overturned) (-> this v-flags)))) + (set! (-> this overturned-time) (the-as uint (current-time))) + ) + ) + ) + (if (and (not (logtest? (-> this v-flags) (vehicle-flag dead))) + (< (+ 8192.0 (-> v1-16 position y)) (-> this water-height)) + ) + (go (method-of-object this sink)) + ) + ) + (when (logtest? (vehicle-flag player-driving net-player-driving) (-> this v-flags)) + (when (and (logtest? (-> this controls flags) (vehicle-controls-flag vcf1)) + (>= (the-as uint (- (current-time) (the-as int (-> this shoot-time)))) (-> this shoot-delay)) + ) + (set! (-> this shoot-time) (the-as uint (current-time))) + (wvehicle-method-169 this) + ) + ) + (when (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (let ((v1-39 *game-info*)) + (set! (-> v1-39 health-bar-vehicle) (-> this hit-points)) + (set! (-> v1-39 race-number-turbos) (the int (-> this turbo-supply))) + (set! (-> v1-39 vehicle-turbo-ready) (-> this turbo-ready)) + ) + (new 'stack-no-clear 'vector) + (dotimes (s5-0 (-> this info rider attach-point-count)) + (let* ((s3-0 (handle->process (-> this attached-array s5-0))) + (s4-0 (if (type? s3-0 process-focusable) + s3-0 + ) + ) + ) + (when (and s4-0 (focus-test? (the-as process-focusable s4-0) pilot-riding)) + (wvehicle-method-171 this (-> (the-as process-focusable s4-0) root trans) s5-0) + (wvehicle-method-172 this (-> (the-as process-focusable s4-0) root quat) s5-0) + ) + ) + ) + 0 + ) + ((method-of-type vehicle vehicle-method-77) this) + (none) + ) + ) + +;; definition for method 30 of type wvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defmethod rigid-body-object-method-30 ((this wvehicle)) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag sounds)))) + (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)))) + ) + ) + (let ((v1-8 (new 'stack-no-clear 'matrix))) + (set! (-> v1-8 fvec x) (seconds-per-frame)) + (set! (-> v1-8 uvec quad) (-> this draw color-emissive quad)) + (set! (-> v1-8 uvec x) (fmax 0.0 (+ (-> v1-8 uvec x) (* -2.0 (-> v1-8 fvec x))))) + (set! (-> this draw color-emissive quad) (-> v1-8 uvec quad)) + ) + (let ((t9-0 (method-of-type vehicle rigid-body-object-method-30))) + (t9-0 this) + ) + (wvehicle-method-165 this) + (vector-reset! (-> this surface-velocity)) + (dotimes (v1-15 (-> this info physics-model wheel-count)) + (let ((a0-13 (-> this wheel v1-15))) + (set! (-> a0-13 prev-flags) (-> a0-13 flags)) + ) + ) + (none) + ) + +;; definition for method 162 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod wvehicle-method-162 ((this wvehicle) (arg0 float)) + (let ((s5-0 (-> this info))) + (let ((s4-0 (new 'stack-no-clear 'wvehicle-physics-work))) + (let ((f0-0 (-> this engine-rev))) + (set! (-> s4-0 mat uvec x) (* 9.549297 f0-0)) + ) + (set! (-> s4-0 mat uvec z) 1.0) + (if (or (= 0.0 (-> this controls throttle)) + (and (logtest? (vehicle-flag turbo-boost) (-> this v-flags)) + (= (-> this gear-select) (+ (-> s5-0 transmission gear-count) -1)) + (< (-> s5-0 transmission upshift-rpm) (-> s4-0 mat uvec x)) + ) + ) + (set! (-> s4-0 mat uvec z) 0.0) + ) + (set! (-> this engine-rpm) (-> s4-0 mat uvec x)) + (set! (-> s4-0 mat uvec w) (the-as float (current-time))) + (vector-! (the-as vector (-> s4-0 mat)) (-> this rbody lin-velocity) (-> this surface-velocity)) + (when (not (logtest? (-> this v-flags) (vehicle-flag in-air))) + (let ((f0-12 (* (/ (fmax 0.0 (vector-dot (the-as vector (-> s4-0 mat)) (-> this rbody matrix fvec))) + (-> this avg-drive-wheel-radius) + ) + (-> this gear-ratio) + (-> this final-drive-ratio) + ) + ) + ) + (set! (-> s4-0 mat uvec y) (* 9.549297 f0-12)) + ) + (cond + ((logtest? (vehicle-flag reverse-gear) (-> this v-flags)) + (set! (-> this next-gear-select) 0) + 0 + ) + ((and (zero? (-> this gear-select)) (not (logtest? (vehicle-flag reverse-gear) (-> this v-flags)))) + (set! (-> this next-gear-select) 1) + ) + ((and (< (-> s5-0 transmission upshift-rpm) (-> s4-0 mat uvec y)) + (and (< (-> this gear-select) (+ (-> s5-0 transmission gear-count) -1)) + (> (-> this gear-select) 0) + (= (-> this clutch-grab) 1.0) + (< 0.5 (-> this controls throttle)) + ) + ) + (set! (-> this next-gear-select) (+ (-> this gear-select) 1)) + ) + ((and (< (-> s4-0 mat uvec y) (-> s5-0 transmission downshift-rpm)) (< 1 (-> this gear-select))) + (set! (-> this next-gear-select) (+ (-> this gear-select) -1)) + ) + ) + ) + (let ((v1-47 (-> this shift-state))) + (cond + ((zero? v1-47) + (cond + ((>= 1 (-> this gear-select)) + (cond + ((or (< (-> s4-0 mat uvec x) (-> s5-0 engine clutch-min-rpm)) (= (-> this controls throttle) 0.0)) + (seek! (-> this clutch-grab) 0.0 (* 16.0 arg0)) + ) + ((or (< (-> s5-0 engine clutch-max-rpm) (-> s4-0 mat uvec x)) + (and (< 0.0 (-> this clutch-grab)) (< (-> s5-0 engine peak-torque-rpm) (-> s4-0 mat uvec x))) + ) + (seek! (-> this clutch-grab) (-> s4-0 mat uvec z) (* 3.0 arg0)) + ) + (else + (seek! (-> this clutch-grab) 0.0 (* 3.0 arg0)) + ) + ) + ) + (else + (seek! (-> this clutch-grab) (-> s4-0 mat uvec z) (* 8.0 arg0)) + ) + ) + (when (!= (-> this next-gear-select) (-> this gear-select)) + (set! (-> this shift-state) (the-as uint 1)) + (set! (-> this shift-time) (the-as uint (-> s4-0 mat uvec w))) + ) + ) + ((= v1-47 1) + (seek! (-> this clutch-grab) 0.0 (* 16.0 arg0)) + (when (= (-> this clutch-grab) 0.0) + (set! (-> this shift-state) (the-as uint 2)) + (set! (-> this shift-time) (the-as uint (-> s4-0 mat uvec w))) + ) + ) + ((= v1-47 2) + (set! (-> this gear-select) (-> this next-gear-select)) + (when (< (the-as uint 15) (- (the-as uint (-> s4-0 mat uvec w)) (the-as uint (-> this shift-time)))) + (set! (-> this shift-state) (the-as uint 3)) + (set! (-> this shift-time) (the-as uint (-> s4-0 mat uvec w))) + ) + ) + ((= v1-47 3) + (seek! (-> this clutch-grab) (-> s4-0 mat uvec z) (* 8.0 arg0)) + (when (!= (-> this next-gear-select) (-> this gear-select)) + (set! (-> this shift-state) (the-as uint 1)) + (set! (-> this shift-time) (the-as uint (-> s4-0 mat uvec w))) + ) + (when (= (-> this clutch-grab) (-> s4-0 mat uvec z)) + (set! (-> this shift-state) (the-as uint 0)) + (set! (-> this shift-time) (the-as uint (-> s4-0 mat uvec w))) + ) + ) + ) + ) + ) + (set! (-> this gear-ratio) (-> s5-0 transmission gear-ratio-array (-> this gear-select))) + (set! (-> this final-drive-ratio) (-> s5-0 transmission final-drive-ratio)) + (set! (-> this total-gear-ratio) (* (-> this final-drive-ratio) (-> this gear-ratio))) + (set! (-> this inv-total-gear-ratio) (/ 1.0 (-> this total-gear-ratio))) + (set! (-> this engine-max-torque) (-> s5-0 engine max-torque)) + (set! (-> this clutch-inertia) (* 0.0 (-> s5-0 transmission inertia))) + ) + 0 + (none) + ) + +;; definition for method 163 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod wvehicle-method-163 ((this wvehicle)) + (let ((s5-0 (-> this info)) + (s4-0 (new 'stack-no-clear 'matrix)) + ) + (set! (-> s4-0 rvec z) (-> this controls throttle)) + (set! (-> s4-0 uvec x) (vector-dot (the-as vector (-> this rbody matrix)) (-> this rbody ang-velocity))) + (set! (-> s4-0 rvec w) (-> this rbody matrix fvec y)) + (set! (-> s4-0 uvec y) (+ (-> s4-0 rvec w) (* -1.0 (-> s4-0 uvec x)))) + (if (and (< (cos 12743.111) (-> s4-0 rvec w)) + (< (-> s4-0 uvec x) -0.1) + (and (< 1.0 (-> s4-0 uvec y)) + (not (logtest? (-> this wheel 0 flags) 2)) + (not (logtest? (-> this wheel 1 flags) 2)) + (logtest? (-> this wheel 2 flags) 2) + (logtest? (-> this wheel 3 flags) 2) + ) + ) + (set! (-> s4-0 rvec z) 0.0) + ) + (set! (-> this engine-torque) (wvehicle-method-166 this (-> this engine-rpm) (-> s4-0 rvec z))) + (let ((f0-13 0.0)) + (dotimes (v1-23 (-> s5-0 physics-model wheel-count)) + (let ((a0-9 (-> this wheel v1-23 info))) + (if (logtest? (-> a0-9 flags) (vehicle-wheel-flag vwf0)) + (+! f0-13 (-> a0-9 inertia)) + ) + ) + ) + (set! (-> this drive-wheel-inertia) f0-13) + (let* ((f1-6 (-> this final-drive-ratio)) + (f1-8 (* f1-6 f1-6)) + (f2-1 (-> s5-0 transmission inertia)) + (f3-0 (-> this gear-ratio)) + ) + (set! (-> this wheel-inertia) + (+ f0-13 + (* f1-8 + (+ f2-1 (* f3-0 f3-0 (+ (-> this clutch-inertia) (* (-> s5-0 engine inertia) (-> this clutch-grab))))) + ) + ) + ) + ) + ) + (set! (-> s4-0 rvec x) (* (/ 1.0 (the float (-> s5-0 physics-model drive-wheel-count))) + (-> this engine-torque) + (-> this clutch-grab) + (-> this total-gear-ratio) + ) + ) + (set! (-> this wheel-torque) 0.0) + (set! (-> this wheel-braking-torque) 0.0) + (set! (-> this wheel-ground-torque) 0.0) + (dotimes (v1-31 (-> s5-0 physics-model wheel-count)) + (let* ((a0-14 (-> this wheel v1-31)) + (a1-5 (-> a0-14 info)) + ) + (set! (-> a0-14 torque) 0.0) + (set! (-> a0-14 braking-torque) 0.0) + (set! (-> a0-14 inertia) (-> a1-5 inertia)) + (let ((f0-26 0.0)) + (if (logtest? (-> a1-5 flags) (vehicle-wheel-flag vwf1)) + (+! f0-26 (-> this controls brake)) + ) + (if (logtest? (-> a1-5 flags) (vehicle-wheel-flag vwf2)) + (+! f0-26 (-> this controls handbrake)) + ) + (+! (-> a0-14 braking-torque) (* (fmin 1.0 f0-26) (-> a1-5 max-brake-torque) (-> s5-0 handling brake-factor))) + ) + (+! (-> this wheel-braking-torque) (-> a0-14 braking-torque)) + (when (logtest? (-> a1-5 flags) (vehicle-wheel-flag vwf0)) + (set! (-> a0-14 inertia) (-> this wheel-inertia)) + (set! (-> a0-14 torque) (-> s4-0 rvec x)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 92 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-92 ((this wvehicle) (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))) + (set! (-> this controls handbrake) (-> arg0 handbrake)) + (let ((f0-11 (-> arg0 throttle)) + (f30-0 (-> arg0 brake)) + ) + (set! f30-0 + (cond + ((< 0.0 f0-11) + (logclear! (-> this v-flags) (vehicle-flag reverse-gear)) + (if (< (-> this wheel-rev) -1.5) + (set! f30-0 1.0) + ) + f30-0 + ) + ((< 0.0 f30-0) + (cond + ((logtest? (vehicle-flag reverse-gear) (-> this v-flags)) + (set! f0-11 f30-0) + 0.0 + ) + (else + (let ((v1-13 (new 'stack-no-clear 'vector))) + (vector-! (the-as vector (&-> v1-13 x)) (-> this rbody lin-velocity) (-> this surface-velocity)) + (if (< (vector-dot (the-as vector (&-> v1-13 x)) (-> this rbody matrix fvec)) 40960.0) + (logior! (-> this v-flags) (vehicle-flag reverse-gear)) + ) + ) + f30-0 + ) + ) + ) + (else + (logclear! (-> this v-flags) (vehicle-flag reverse-gear)) + f30-0 + ) + ) + ) + (case (-> this shift-state) + ((1 2) + (set! f0-11 0.0) + ) + ) + (seek! (-> this controls throttle) f0-11 (* 8.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 88 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-88 ((this wvehicle) (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))))) + (set! (-> arg0 handbrake) (fmin 1.0 (* 0.023529412 (the float (-> *cpad-list* cpads 0 abutton 5))))) + (cond + ((-> *setting-control* user-current jump) + (if (cpad-hold? 0 l1) + (logior! (-> arg0 flags) (vehicle-controls-flag vcf0)) + ) + ) + (else + (logclear! (-> this controls flags) (vehicle-controls-flag vcf0)) + (logclear! (-> this controls prev-flags) (vehicle-controls-flag vcf0)) + ) + ) + (if (and (cpad-hold? 0 r1) (-> *setting-control* user-current gun)) + (logior! (-> arg0 flags) (vehicle-controls-flag vcf1)) + ) + (if (and (cpad-hold? 0 r2) (-> *setting-control* user-current turbo)) + (logior! (-> arg0 flags) (vehicle-controls-flag vcf2)) + ) + (if (cpad-pressed? 0 r3) + (set! (-> this v-flags) (the-as vehicle-flag (logxor (shl #x8000 16) (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-inside-view)))) + ) + (set! (-> this v-flags) (the-as vehicle-flag (logclear (-> this v-flags) (vehicle-flag camera-look-mode)))) + (if (logtest? (vehicle-flag camera-inside-view) (-> this v-flags)) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag camera-look-mode) (-> this v-flags)))) + ) + (if (cpad-pressed? 0 l2) + (set! (-> this cam-view) 1) + ) + (cond + ((cpad-hold? 0 l2) + (let ((f30-0 (analog-input (the-as int (-> *cpad-list* cpads 0 rightx)) 128.0 48.0 110.0 -1.0)) + (f0-8 (analog-input (the-as int (-> *cpad-list* cpads 0 righty)) 128.0 48.0 110.0 -1.0)) + ) + (cond + ((< (fabs f0-8) (fabs f30-0)) + (cond + ((< f30-0 -0.5) + (set! (-> this cam-view) 3) + ) + ((< 0.5 f30-0) + (set! (-> this cam-view) 2) + ) + ) + ) + (else + (cond + ((< 0.5 f0-8) + (set! (-> this cam-view) 0) + 0 + ) + ((< f0-8 -0.5) + (set! (-> this cam-view) 1) + ) + ) + ) + ) + ) + ) + (else + (set! (-> this cam-view) 0) + 0 + ) + ) + (if (nonzero? (-> this cam-view)) + (set! (-> this v-flags) (the-as vehicle-flag (logior (vehicle-flag camera-look-mode) (-> this v-flags)))) + ) + 0 + (none) + ) + +;; definition for method 94 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-94 ((this wvehicle)) + (let ((t9-0 (method-of-type vehicle vehicle-method-94))) + (t9-0 this) + ) + (set-setting! 'string-camera-floor 'abs (+ 12288.0 (-> this water-height)) 0) + (cond + ((logtest? (vehicle-flag reverse-gear) (-> this v-flags)) + (let ((v1-6 (process->ppointer this))) + (set-setting! 'butt-handle v1-6 32768.0 (-> v1-6 0 pid)) + ) + ) + (else + (remove-setting! 'butt-handle) + ) + ) + (let ((f0-2 (vector-vector-distance-squared (-> this draw origin) (math-camera-pos))) + (f1-1 (-> this draw origin w)) + ) + (if (< f0-2 (* f1-1 f1-1)) + (logclear! (-> this draw status) (draw-control-status force-vu1)) + (logior! (-> this draw status) (draw-control-status force-vu1)) + ) + ) + 0 + (none) + ) + +;; definition for method 93 of type wvehicle +;; INFO: Used lq/sq +(defmethod vehicle-method-93 ((this wvehicle)) + (let ((t9-0 (method-of-type vehicle vehicle-method-93))) + (t9-0 this) + ) + (let ((s4-0 (-> this info)) + (s5-0 (new 'stack-no-clear 'inline-array 'matrix 2)) + ) + (set! (-> s5-0 0 trans z) (vector-dot (-> this rbody lin-velocity) (-> this rbody matrix fvec))) + (set! (-> s5-0 0 trans w) (vector-dot (-> this rbody lin-velocity) (the-as vector (-> this rbody matrix)))) + (set! (-> s5-0 0 trans y) (/ (* 2.0 (fabs (-> s5-0 0 trans w))) (fmax 409.6 (-> s5-0 0 trans z)))) + (set! (-> s5-0 0 trans x) + (/ (-> s4-0 handling tire-steering-speed-factor) + (fmax 409.6 (- (-> s5-0 0 trans z) (-> s4-0 handling tire-steering-speed-bias))) + ) + ) + (set! (-> s5-0 0 fvec y) (fmin 1.0 (fmax (-> s5-0 0 trans y) (-> s5-0 0 trans x)))) + (set! (-> s5-0 0 fvec x) (* (-> this controls steering) (-> s5-0 0 fvec y))) + (set! (-> s5-0 0 fvec z) (* (-> this info handling tire-steering-angle) (-> s5-0 0 fvec x))) + (set! (-> s5-0 0 fvec w) + (* (-> s5-0 0 fvec z) (+ 1.0 (* (-> this info handling ackermann-factor) (fabs (-> s5-0 0 fvec x))))) + ) + (set! (-> s5-0 1 uvec y) + (* 2.0 + (+ (-> s4-0 physics-model rear-wheel local-pos x) + (-> s4-0 physics-model rear-wheel susp-arm-length) + (-> s4-0 physics-model rear-wheel steer-arm-length) + ) + ) + ) + (set! (-> s5-0 1 uvec z) + (- (-> s4-0 physics-model front-wheel local-pos z) (-> s4-0 physics-model rear-wheel local-pos z)) + ) + (set! (-> s5-0 1 uvec w) 0.0) + (when (< 18.204445 (fabs (-> s5-0 0 fvec z))) + (cond + ((logtest? (-> s4-0 physics-model rear-wheel flags) (vehicle-wheel-flag vwf4)) + (set! (-> s5-0 1 rvec w) (/ (* 0.5 (-> s5-0 1 uvec z)) (sin (fabs (-> s5-0 0 fvec z))))) + (let ((f0-32 + (- (* (-> s5-0 1 rvec w) (cos (fabs (-> s5-0 0 fvec z)))) + (* 2.0 (+ (-> s4-0 physics-model rear-wheel local-pos x) (-> s4-0 physics-model rear-wheel susp-arm-length))) + ) + ) + (f1-22 (* 0.5 (-> s5-0 1 uvec z))) + ) + (set! (-> s5-0 1 rvec z) (sqrtf (+ (* f1-22 f1-22) (* f0-32 f0-32)))) + ) + (+! (-> s5-0 1 rvec w) (-> s4-0 physics-model rear-wheel steer-arm-length)) + (set! (-> s5-0 1 rvec z) (- (-> s5-0 1 rvec z) (-> s4-0 physics-model rear-wheel steer-arm-length))) + ) + (else + (set! (-> s5-0 1 rvec w) (/ (-> s5-0 1 uvec z) (tan (fabs (-> s5-0 0 fvec z))))) + (set! (-> s5-0 1 rvec w) + (- (-> s5-0 1 rvec w) + (+ (-> s4-0 physics-model front-wheel local-pos x) + (-> s4-0 physics-model front-wheel susp-arm-length) + (* -0.5 (-> s5-0 1 uvec y)) + ) + ) + ) + (set! (-> s5-0 1 rvec z) (- (-> s5-0 1 rvec w) (-> s5-0 1 uvec y))) + ) + ) + (set! (-> s5-0 1 uvec w) + (/ (- (-> s5-0 1 rvec w) (-> s5-0 1 rvec z)) (+ (-> s5-0 1 rvec w) (-> s5-0 1 rvec z))) + ) + ) + (set! (-> s5-0 1 rvec x) (- 1.0 (-> s5-0 1 uvec w))) + (set! (-> s5-0 1 rvec y) (+ 1.0 (-> s5-0 1 uvec w))) + (cond + ((< (-> s5-0 0 fvec z) 0.0) + (set! (-> s5-0 0 rvec x) (-> s5-0 0 fvec z)) + (set! (-> s5-0 0 rvec y) (-> s5-0 0 fvec w)) + (set! (-> s5-0 0 uvec x) (-> s5-0 1 rvec y)) + (set! (-> s5-0 0 uvec y) (-> s5-0 1 rvec x)) + ) + (else + (set! (-> s5-0 0 rvec x) (-> s5-0 0 fvec w)) + (set! (-> s5-0 0 rvec y) (-> s5-0 0 fvec z)) + (set! (-> s5-0 0 uvec x) (-> s5-0 1 rvec x)) + (set! (-> s5-0 0 uvec y) (-> s5-0 1 rvec y)) + ) + ) + (dotimes (s4-1 (-> this info physics-model wheel-count)) + (let* ((s3-0 (-> this wheel s4-1)) + (s2-0 (-> s3-0 info)) + ) + (if (logtest? (-> s2-0 flags) (vehicle-wheel-flag vwf4)) + (set! (-> s3-0 steer-angle) (* (-> (&-> s5-0 0 rvec data (logand s4-1 1)) 0) (sign (-> s2-0 local-pos z)))) + ) + (if (logtest? (-> s2-0 flags) (vehicle-wheel-flag vwf0)) + (set! (-> s3-0 drive-diff) (-> (&-> s5-0 0 rvec data (logand s4-1 1)) 4)) + ) + ) + ) + ) + (dotimes (s5-1 (-> this info physics-model wheel-count)) + (let ((s3-1 (-> this wheel s5-1))) + (set-vector! (-> s3-1 local-axis) (cos (-> s3-1 steer-angle)) 0.0 (- (sin (-> s3-1 steer-angle))) 1.0) + ) + ) + (let ((s5-2 (new 'stack-no-clear 'wvehicle-physics-work))) + (set! (-> s5-2 mat rvec x) (the-as float (current-time))) + (cond + ((logtest? (-> this info flags) 4096) + (when (and (logtest? (-> this controls flags) (vehicle-controls-flag vcf0)) + (not (logtest? (-> this controls prev-flags) (vehicle-controls-flag vcf0))) + (< (the-as uint 45) (- (the-as uint (-> s5-2 mat rvec x)) (the-as uint (-> this jump-time)))) + (< (the-as uint 45) (- (the-as uint (-> s5-2 mat rvec x)) (the-as uint (-> this ground-time)))) + ) + (let ((v1-77 0)) + (dotimes (a0-15 4) + (let ((a1-5 (-> this wheel a0-15))) + (if (and (logtest? (-> a1-5 flags) 2) (< 0.0 (-> a1-5 up-force))) + (+! v1-77 1) + ) + ) + ) + (when (>= v1-77 2) + (let ((v1-79 (new 'stack-no-clear 'matrix))) + (vector-float*! (-> v1-79 rvec) (-> this rbody matrix uvec) (* 0.3 + (-> this rbody matrix uvec y) + (-> this info info mass) + (-> this info extra gravity) + (-> this info handling jump-thrust-factor) + ) + ) + (add-force! (-> this rbody) (-> v1-79 rvec)) + ) + (rigid-body-control-method-12 (-> this rbody) 1.0) + (init-velocities! (-> this rbody)) + (set! (-> this jump-time) (the-as uint (-> s5-2 mat rvec x))) + (sound-play-by-name (-> this info sound jump-sound) (new-sound-id) 1024 0 0 (sound-group) #t) + ) + ) + ) + ) + ((logtest? (-> this controls flags) (vehicle-controls-flag vcf0)) + (set! (-> this susp-spring-control) 0.5) + (set! (-> this jump-control) 0.0) + (if (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 0 255 (seconds 0.05)) + ) + (if (and (not (logtest? (-> this controls prev-flags) (vehicle-controls-flag vcf0))) + (logtest? (-> this v-flags) (vehicle-flag on-ground)) + ) + (sound-play "toad-prehop") + ) + ) + (else + (set! (-> this susp-spring-control) 1.0) + (when (and (logtest? (-> this controls prev-flags) (vehicle-controls-flag vcf0)) + (< (the-as uint 300) (- (the-as uint (-> s5-2 mat rvec x)) (the-as uint (-> this jump-time)))) + (< (the-as uint 45) (- (the-as uint (-> s5-2 mat rvec x)) (the-as uint (-> this ground-time)))) + ) + 0 + (when (>= (-> this rbody matrix uvec y) 0.707) + (set! (-> this jump-time) (the-as uint (-> s5-2 mat rvec x))) + (set! (-> this jump-control) (-> this info handling jump-thrust-factor)) + (sound-play-by-name (-> this info sound jump-sound) (new-sound-id) 1024 0 0 (sound-group) #t) + ) + ) + (if (< (the-as uint 60) (- (the-as uint (-> s5-2 mat rvec x)) (the-as uint (-> this jump-time)))) + (set! (-> this jump-control) 0.0) + ) + ) + ) + ) + (if (not (logtest? (vehicle-flag turbo-boost) (-> this v-flags))) + (set! (-> this turbo-ready) (fmin 1.0 (+ (-> this turbo-ready) (* 0.5 (seconds-per-frame))))) + ) + (if (logtest? (-> this controls flags) (vehicle-controls-flag vcf2)) + (vehicle-method-64 this) + ) + (none) + ) + +;; definition for method 33 of type wvehicle +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defmethod alloc-rbody-control! ((this wvehicle) (arg0 rigid-body-object-constants)) + (let ((s4-0 (new 'stack-no-clear 'inline-array 'quaternion 2))) + (vector-y-quaternion! (the-as vector (-> s4-0 0)) (-> this root quat)) + (vector+float*! + (-> this root trans) + (-> this root trans) + (the-as vector (-> s4-0 0)) + (-> (the-as rigid-body-vehicle-constants arg0) setup settle-height) + ) + (quaternion-axis-angle! + (-> 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) (-> s4-0 1)) + ) + (let ((t9-3 (method-of-type vehicle alloc-rbody-control!))) + (t9-3 this (the-as rigid-body-vehicle-constants arg0)) + ) + (iterate-prims (-> this root) (lambda ((arg0 collide-shape-prim)) + (logior! (-> arg0 prim-core collide-as) (collide-spec camera-blocker)) + (none) + ) + ) + (set! (-> this control-hook) #f) + (set! (-> this ai-min-speed) 61440.0) + (set! (-> this ai-max-speed) 102400.0) + (set! (-> this minimap) #f) + (set! (-> this clutch-grab) 0.0) + (set! (-> this gear-select) 1) + (set! (-> this shoot-delay) (the-as uint 60)) + (wvehicle-method-167 this) + (set! (-> this info physics-model wheel-count) 4) + (set! (-> this susp-spring-control) 1.0) + (set! (-> this jump-control) 0.0) + (set! (-> this turbo-ready) 1.0) + (set! (-> this net) #f) + (let ((v1-19 (new 'stack-no-clear 'wvehicle-stack-type4))) + (set! (-> v1-19 float2) (vector-dot (-> this root transv) (-> this rbody matrix fvec))) + (set! (-> v1-19 byte0) 0) + (set! (-> v1-19 float0) 0.0) + (dotimes (a0-14 (-> this info physics-model wheel-count)) + (let ((a1-11 (-> this wheel a0-14))) + (let ((a2-2 (-> a1-11 info))) + (set! (-> a1-11 x-scale) (if (= (logand a0-14 1) 1) + -1.0 + 1.0 + ) + ) + (set! (-> a1-11 surface) #f) + (set! (-> v1-19 float1) (* (-> a2-2 radius) (-> a2-2 scale))) + (set! (-> a1-11 rev) (/ (-> v1-19 float2) (-> v1-19 float1))) + (when (logtest? (-> a2-2 flags) (vehicle-wheel-flag vwf0)) + (+! (-> v1-19 byte0) 1) + (+! (-> v1-19 float0) (-> v1-19 float1)) + (set! (-> a1-11 drive-diff) 1.0) + ) + (set! (-> a1-11 handle) (the-as handle #f)) + (set! (-> a1-11 tread-tracker) (the-as handle #f)) + (set! (-> a1-11 inertia) (-> a2-2 inertia)) + ) + (set! (-> a1-11 probe-local-dir quad) (-> (new 'static 'vector :y -1.0 :w 1.0) quad)) + (set! (-> a1-11 local-axis quad) (-> (new 'static 'vector :x 1.0 :w 1.0) quad)) + ) + ) + (set! (-> (the-as rigid-body-vehicle-constants arg0) physics-model drive-wheel-count) (-> v1-19 byte0)) + (set! (-> this avg-drive-wheel-radius) (/ (-> v1-19 float0) (the float (-> v1-19 byte0)))) + (set! (-> this wheel-rev) (/ (-> v1-19 float2) (-> this avg-drive-wheel-radius))) + (when (< 0.0 (-> v1-19 float2)) + (set! (-> this gear-select) (+ (-> (the-as rigid-body-vehicle-constants arg0) transmission gear-count) -1)) + (let ((f0-25 (-> (the-as rigid-body-vehicle-constants arg0) engine idle-rpm))) + (set! (-> this engine-rev) (* 0.10471976 f0-25)) + ) + ) + ) + (dotimes (v1-26 (-> this info rider attach-point-count)) + (set! (-> this attached-array v1-26) (the-as handle #f)) + ) + (vector-reset! (-> this surface-velocity)) + (set! (-> this draw light-index) (the-as uint 30)) + (set! (-> this draw lod-set lod 0 dist) 1228800.0) + (set! (-> this draw lod-set lod 1 dist) 1232896.0) + (set! (-> this draw lod-set lod 2 dist) 1236992.0) + (set! (-> this gun-aim-yaw) 0.0) + (set! (-> this gun-aim-yaw-vel) 0.0) + (set! (-> this gun-yaw) 0.0) + (set! (-> this gun-pitch) 0.0) + (set! (-> this shoot-delay) (the-as uint 30)) + (set! (-> this lock-turret) #f) + (none) + ) + +;; definition for method 134 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-134 ((this wvehicle)) + (if (focus-test? this grabbed) + (go (method-of-object this race-waiting)) + (go (method-of-object this player-control)) + ) + 0 + (none) + ) + +;; definition for method 48 of type wvehicle +(defmethod on-impact ((this wvehicle) (arg0 rigid-body-impact)) + (mem-copy! (the-as pointer (-> this impact)) (the-as pointer arg0) 64) + ((method-of-type vehicle on-impact) this arg0) + (none) + ) + +;; definition for method 49 of type wvehicle +;; INFO: Used lq/sq +;; WARN: disable def twice: 12. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: disable def twice: 59. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod rbody-event-handler ((this wvehicle) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('test-ready) + (and (and (-> this next-state) (= (-> this next-state name) 'race-waiting)) + (logtest? (-> this v-flags) (vehicle-flag riding)) + ) + ) + (('repair) + (let ((f0-0 (the-as float (-> arg3 param 0))) + (f1-0 (-> this hit-points)) + ) + (if (< 0.0 f1-0) + (set! (-> this hit-points) (fmin 1.0 (+ f1-0 f0-0))) + ) + ) + ) + (('touched) + (when (zero? (-> (the-as process-drawable arg0) rbody)) + (let* ((s5-0 arg0) + (v1-10 (if (type? s5-0 process-focusable) + s5-0 + ) + ) + ) + (when (and v1-10 + (logtest? (-> v1-10 mask) (process-mask target)) + (logtest? (vehicle-flag waiting-for-player) (-> this v-flags)) + (logtest? (-> this rbody flags) (rigid-body-flag enable-physics)) + ) + (logior! (-> this v-flags) (vehicle-flag player-touching)) + (set! v0-0 (current-time)) + (set! (-> this player-touch-time) (the-as time-frame v0-0)) + v0-0 + ) + ) + ) + ) + (('begin-race) + (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 + ((logtest? (vehicle-flag player-driving) (-> this v-flags)) + (logclear! (-> this v-flags) (vehicle-flag player-grabbed)) + (go (method-of-object this player-control)) + ) + (else + (go (method-of-object this race-racing)) + ) + ) + ) + ) + (('turbo-pickup) + (when (< (-> this turbo-supply) 3.0) + (sound-play "turbo-pickup") + (if (logtest? (vehicle-flag player-driving) (-> this v-flags)) + (sound-play "turbo-pickup") + ) + (+! (-> this turbo-supply) 1.0) + (set! (-> this turbo-supply) (fmin 3.0 (-> this turbo-supply))) + (let ((v1-47 (-> this draw color-emissive))) + (set! (-> v1-47 x) 2.0) + ) + ) + #t + ) + (('race-decision-point) + (when (logtest? (vehicle-flag ai-driving) (-> this v-flags)) + (let* ((v1-51 (the-as race-decision-point (-> arg3 param 0))) + (a0-25 (-> v1-51 decision-type)) + ) + (cond + ((zero? a0-25) + (cond + ((and (nonzero? (-> v1-51 shortcuts)) + (>= (-> this race racer-state speed-factor) (-> this race state info ai-max-speed-factor)) + (< 0.1 (- (+ (-> this race state target-pos) (-> this race racer-state target-pos-offset)) + (-> this race racer-state pos) + ) + ) + ) + (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 + (race-select-path-randomly-from-mask this (-> v1-51 safe-paths)) + (set! (-> this shortcut-speed-factor) 0.0) + ) + ) + ) + ((= a0-25 1) + (when (and (>= (-> this turbo-supply) 1.0) + (< (-> this path-deviation) 1.0) + (>= (-> this race racer-state speed-factor) (-> this race state info ai-max-speed-factor)) + ) + (apply-momentum! this) + (vehicle-method-64 this) + ) + ) + ) + ) + ) + ) + (('hide) + (logior! (-> this draw status) (draw-control-status no-draw)) + (dotimes (s5-3 (-> this info physics-model wheel-count)) + (send-event (handle->process (-> this wheel s5-3 handle)) 'hide) + ) + (let ((gp-1 (-> this child))) + (while gp-1 + (send-event (ppointer->process gp-1) 'hide) + (set! gp-1 (-> gp-1 0 brother)) + ) + ) + #f + ) + (('unhide) + (logclear! (-> this draw status) (draw-control-status no-draw)) + (dotimes (s5-4 (-> this info physics-model wheel-count)) + (send-event (handle->process (-> this wheel s5-4 handle)) 'unhide) + ) + (let ((gp-2 (-> this child))) + (while gp-2 + (send-event (ppointer->process gp-2) 'unhide) + (set! gp-2 (-> gp-2 0 brother)) + ) + ) + #f + ) + (('race-pass) + (send-event (vehicle-method-68 this) 'race-pass) + ) + (('race-got-passed) + (send-event (vehicle-method-68 this) 'race-got-passed) + ) + (('race-finished) + (-> arg3 param 0) + (cond + ((logtest? (vehicle-flag player-driving) (-> this v-flags)) + (set! (-> this damage-factor) 0.0) + (set! v0-0 (method-of-object this wvehicle-method-177)) + (set! (-> this control-hook) (the-as (function vehicle vehicle-controls) v0-0)) + v0-0 + ) + (else + (go (method-of-object this race-finished)) + ) + ) + ) + (('race-deactivate) + (set! (-> this damage-factor) (-> this info damage inv-hit-points)) + (set! (-> this race path) #f) + (cond + ((logtest? (vehicle-flag player-driving) (-> this v-flags)) + (logclear! (-> this v-flags) (vehicle-flag player-grabbed)) + (set! v0-0 (method-of-object this control-hook-player)) + (set! (-> this control-hook) (the-as (function vehicle vehicle-controls) v0-0)) + v0-0 + ) + (else + (go (method-of-object this die)) + ) + ) + ) + (('set-control-hook-race-ai) + (set! v0-0 (method-of-object this wvehicle-method-177)) + (set! (-> this control-hook) (the-as (function vehicle vehicle-controls) v0-0)) + v0-0 + ) + (('ai-set-target-speed) + (let ((f0-18 (the-as float (-> arg3 param 0)))) + (set! (-> this ai-min-speed) f0-18) + (set! (-> this ai-max-speed) f0-18) + f0-18 + ) + ) + (('ai-set-target-process) + (let* ((s5-7 (-> arg3 param 0)) + (a0-77 (if (type? s5-7 process-drawable) + s5-7 + ) + ) + ) + (cond + ((the-as uint a0-77) + (set! v0-0 (process->handle (the-as uint a0-77))) + (set! (-> this target-status handle) (the-as handle v0-0)) + v0-0 + ) + (else + (set! (-> this target-status handle) (the-as handle #f)) + #f + ) + ) + ) + ) + (('ai-set-target-position) + (let ((v1-138 (the-as object (-> arg3 param 0)))) + (set! (-> this ai-state) (the-as uint 2)) + (set! v0-0 (-> this ai-target-point)) + (set! (-> (the-as vector v0-0) quad) (-> (the-as vector v1-138) quad)) + ) + v0-0 + ) + (('ai-set-mode) + (set! v0-0 (-> arg3 param 0)) + (set! (-> this ai-state) (the-as uint v0-0)) + v0-0 + ) + (('ai-drop-off) + (let ((v1-140 (the-as object (-> arg3 param 0)))) + (set! (-> this other-pos quad) (-> (the-as wvehicle-ai-drop-off-params v1-140) dest quad)) + (set! (-> this other-proc) (process->handle (-> (the-as wvehicle-ai-drop-off-params v1-140) proc))) + ) + (set! v0-0 (logior (vehicle-flag vf53) (-> this v-flags))) + (set! (-> this v-flags) (the-as vehicle-flag v0-0)) + v0-0 + ) + (('ai-ignore-nav-mesh) + (cond + ((-> arg3 param 0) + (set! v0-0 (logior (vehicle-flag vf52) (-> this v-flags))) + (set! (-> this v-flags) (the-as vehicle-flag v0-0)) + ) + (else + (set! v0-0 (logclear (-> this v-flags) (vehicle-flag vf52))) + (set! (-> this v-flags) (the-as vehicle-flag v0-0)) + ) + ) + v0-0 + ) + (('ai-set-inaccuracy-factor) + (wvehicle-method-202 this (the-as float (-> arg3 param 0))) + ) + (('ai-set-attack-delay-factor) + (wvehicle-method-201 this (the-as float (-> arg3 param 0))) + ) + (('go-player-control) + (go (method-of-object this player-control)) + ) + (('set-rigid-body-info) + (set! (-> this info) (the-as rigid-body-vehicle-constants (-> arg3 param 0))) + (rigid-body-object-method-37 this) + ) + (('no-pickup) + (set! v0-0 (logior (vehicle-flag vf55) (-> this v-flags))) + (set! (-> this v-flags) (the-as vehicle-flag v0-0)) + v0-0 + ) + (else + ((method-of-type vehicle rbody-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 119 of type wvehicle +;; WARN: Return type mismatch int vs none. +(defmethod vehicle-method-119 ((this wvehicle)) + (cond + ((and (logtest? (-> this v-flags) (vehicle-flag player-grabbed)) (-> this race path)) + (wvehicle-method-185 this) + ) + (else + (let ((t9-1 (method-of-type vehicle vehicle-method-119))) + (t9-1 this) + ) + ) + ) + (if (logtest? (game-secrets unlimited-turbos) (-> *game-info* secrets)) + (set! (-> this turbo-supply) 3.0) + ) + 0 + (none) + ) + +;; definition for method 118 of type wvehicle +(defmethod vehicle-method-118 ((this wvehicle)) + (when (not (logtest? (-> this rbody flags) (rigid-body-flag enable-physics))) + (if (handle->process (-> this wheel 0 tread-tracker)) + (wvehicle-method-196 this) + ) + ) + (cond + ((have-vehicle-v-type? (the-as int (-> this info vehicle-type))) + (if (not (-> this minimap)) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 133) (the-as int #f) (the-as vector #t) 0)) + ) + ) + (else + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + ) + ) + ((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 0000000000..b828d5fc6a --- /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 0000000000..b643f32329 --- /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 0000000000..838dc38663 --- /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 0000000000..05312aac36 --- /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 0000000000..29f1d99465 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/factory/car/hvehicle_REF.gc @@ -0,0 +1,1340 @@ +;;-*-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) (arg0 vehicle-controls)) + (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/wcar-faccar_REF.gc b/test/decompiler/reference/jak3/levels/factory/car/wcar-faccar_REF.gc new file mode 100644 index 0000000000..902b4f5696 --- /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/forest/eco-green-collider_REF.gc b/test/decompiler/reference/jak3/levels/forest/eco-green-collider_REF.gc new file mode 100644 index 0000000000..992848b87b --- /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 0000000000..575ca2a54f --- /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 0000000000..0ff76b3e51 --- /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 0000000000..b3816d7721 --- /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 0000000000..13cc8fd6a8 --- /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 0000000000..ea661f90ca --- /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-obs-h_REF.gc b/test/decompiler/reference/jak3/levels/forest/forest-obs-h_REF.gc new file mode 100644 index 0000000000..d4a963ff0b --- /dev/null +++ b/test/decompiler/reference/jak3/levels/forest/forest-obs-h_REF.gc @@ -0,0 +1,68 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type shaker +(deftype shaker (structure) + ((axis vector :inline) + (start-time time-frame) + (decay-time float) + (amplitude float) + (freq float) + (y-decay-time float) + (y-amplitude float) + (y-freq float) + (shake float) + (y-shake float) + ) + (:methods + (shaker-method-9 (_type_) none) + ) + ) + +;; definition for method 3 of type shaker +;; INFO: this function exists in multiple non-identical object files +(defmethod inspect ((this shaker)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'shaker) + (format #t "~1Taxis: #~%" (-> this axis)) + (format #t "~1Tstart-time: ~D~%" (-> this start-time)) + (format #t "~1Tdecay-time: ~f~%" (-> this decay-time)) + (format #t "~1Tamplitude: ~f~%" (-> this amplitude)) + (format #t "~1Tfreq: ~f~%" (-> this freq)) + (format #t "~1Ty-decay-time: ~f~%" (-> this y-decay-time)) + (format #t "~1Ty-amplitude: ~f~%" (-> this y-amplitude)) + (format #t "~1Ty-freq: ~f~%" (-> this y-freq)) + (format #t "~1Tshake: ~f~%" (-> this shake)) + (format #t "~1Ty-shake: ~f~%" (-> this y-shake)) + (label cfg-4) + this + ) + +;; definition for method 9 of type shaker +;; INFO: this function exists in multiple non-identical object files +;; WARN: Return type mismatch float vs none. +(defmethod shaker-method-9 ((this shaker)) + (let ((s5-0 (- (current-time) (-> this start-time)))) + (set! (-> this shake) (* (-> this amplitude) + (lerp-scale 1.0 0.0 (the float s5-0) 0.0 (-> this decay-time)) + (cos (* 65536.0 (/ (the float s5-0) (-> this freq)))) + ) + ) + (set! (-> this y-shake) (* (-> this y-amplitude) + (lerp-scale 1.0 0.0 (the float s5-0) 0.0 (-> this y-decay-time)) + (cos (* 65536.0 (/ (the float s5-0) (-> this y-freq)))) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +0 + + + + 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 0000000000..c472666dc6 --- /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 0000000000..43f4261bbd --- /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 0000000000..a724832c3f --- /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 0000000000..7316fb94f9 --- /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 0000000000..4f7ef84b36 --- /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 0000000000..70f8857c23 --- /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 0000000000..ac642b459c --- /dev/null +++ b/test/decompiler/reference/jak3/levels/forest/neo-spawner_REF.gc @@ -0,0 +1,965 @@ +;;-*-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)) + (nav-network-method-9 *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 () + (local-vars (a2-1 (function joint-control-channel float float float float :behavior process))) + (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) + (let ((a0-2 (-> self skel root-channel 0))) + (set! (-> a0-2 param 0) (the float (+ (-> a0-2 frame-group frames num-frames) -1))) + (set! (-> a0-2 param 1) 1.0) + (let ((t9-2 joint-control-channel-group-eval!) + (a1-2 #f) + ) + (set! a2-1 num-func-seek!) + (t9-2 a0-2 (the-as art-joint-anim a1-2) a2-1) + ) + ) + ) + (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 (the-as float a2-1)) + ) + (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 0000000000..0e41af8a20 --- /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 0000000000..cfed4fdce2 --- /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 0000000000..ccf40949ef --- /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 0000000000..a3135ed36e --- /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 0000000000..9ef7318466 --- /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 0000000000..bc10154437 --- /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 0000000000..572c35a308 --- /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/mhcity-obs2_REF.gc b/test/decompiler/reference/jak3/levels/mhcity/mhcity-obs2_REF.gc new file mode 100644 index 0000000000..44841a9827 --- /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 0000000000..452bec635a --- /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 0000000000..6c3139e5c1 --- /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/gekko_REF.gc b/test/decompiler/reference/jak3/levels/mine/gekko_REF.gc new file mode 100644 index 0000000000..bf82e546bf --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mine/gekko_REF.gc @@ -0,0 +1,3125 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-gekko gekko gekko-lod0-jg -1 + ((gekko-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :shadow gekko-shadow-mg + :origin-joint-index 16 + ) + +;; definition of type gekko-foot-info +(deftype gekko-foot-info (structure) + ((ground-pos vector :inline) + (ground-normal vector :inline) + (foot-transform transformq :inline) + (leg-ik joint-mod-ik) + ) + ) + +;; definition for method 3 of type gekko-foot-info +(defmethod inspect ((this gekko-foot-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'gekko-foot-info) + (format #t "~1Tground-pos: #~%" (-> this ground-pos)) + (format #t "~1Tground-normal: #~%" (-> this ground-normal)) + (format #t "~1Tfoot-transform: #~%" (-> this foot-transform)) + (format #t "~1Tleg-ik: ~A~%" (-> this leg-ik)) + (label cfg-4) + this + ) + +;; definition of type gekko-ik-setup +(deftype gekko-ik-setup (structure) + ((elbow-index int32) + (hand-index int32) + (effector-index int32) + (hand-dist float) + ) + ) + +;; definition for method 3 of type gekko-ik-setup +(defmethod inspect ((this gekko-ik-setup)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'gekko-ik-setup) + (format #t "~1Telbow-index: ~D~%" (-> this elbow-index)) + (format #t "~1Thand-index: ~D~%" (-> this hand-index)) + (format #t "~1Teffector-index: ~D~%" (-> this effector-index)) + (format #t "~1Thand-dist: ~f~%" (-> this hand-dist)) + (label cfg-4) + this + ) + +;; definition for symbol *gekko-ik-setup*, type (inline-array gekko-ik-setup) +(define *gekko-ik-setup* + (new 'static 'inline-array gekko-ik-setup 4 + (new 'static 'gekko-ik-setup :elbow-index 9 :hand-index 10 :effector-index 10 :hand-dist 1224.704) + (new 'static 'gekko-ik-setup :elbow-index 13 :hand-index 14 :effector-index 14 :hand-dist 1224.704) + (new 'static 'gekko-ik-setup :elbow-index 19 :hand-index 20 :effector-index 20 :hand-dist 1638.4) + (new 'static 'gekko-ik-setup :elbow-index 29 :hand-index 30 :effector-index 30 :hand-dist 1638.4) + ) + ) + +;; definition for symbol *gekko-foot-offset*, type (array gekko-foot-info) +(define *gekko-foot-offset* + (the-as (array gekko-foot-info) (new 'static 'boxed-array :type vector + (new 'static 'vector :x 2281.472 :z 2424.832 :w 1.0) + (new 'static 'vector :x -2281.472 :z 2424.832 :w 1.0) + (new 'static 'vector :x 2301.952 :z -2424.832 :w 1.0) + (new 'static 'vector :x -2301.952 :z -2424.832 :w 1.0) + ) + ) + ) + +;; definition of type gekko-shadow-spot +(deftype gekko-shadow-spot (structure) + ((position vector :inline) + (normal vector :inline) + (valid? symbol) + (pat uint32) + ) + ) + +;; definition for method 3 of type gekko-shadow-spot +(defmethod inspect ((this gekko-shadow-spot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'gekko-shadow-spot) + (format #t "~1Tposition: #~%" (-> this position)) + (format #t "~1Tnormal: #~%" (-> this normal)) + (format #t "~1Tvalid?: ~A~%" (-> this valid?)) + (format #t "~1Tpat: ~D~%" (-> this pat)) + (label cfg-4) + this + ) + +;; definition of type gekko +(deftype gekko (nav-enemy) + ((shadow-spot gekko-shadow-spot :inline) + (foot gekko-foot-info 4 :inline) + (rot-matrix matrix :inline) + (gspot-normal vector :inline) + (tilt-quat quaternion :inline) + (dest-to-me-dir vector :inline) + (turn-face-point vector :inline) + (flags gekko-flag) + (attack-time time-frame) + (last-turn-time time-frame) + (fade float) + (rot-mult float) + (move-speed float) + (move-decel float) + (turn-next-state (state gekko)) + (path-wall path-control) + (scared-timer time-frame) + (scale float) + (probe-len float) + ) + (:state-methods + active-wall + hostile-wall + turn-wall + attack-wall + knocked-wall + jump-off-wall + jump-off-wall-falling + jump-off-wall-recover + pre-attack + attack + turn + turn-quick + ) + (:methods + (gekko-method-202 (_type_) none) + (gekko-method-203 (_type_) none) + (gekko-method-204 (_type_) none) + (gekko-method-205 (_type_) none) + (gekko-method-206 (_type_) none) + (gekko-method-207 (_type_) none) + (gekko-method-208 (_type_) none) + ) + ) + +;; definition for method 3 of type gekko +(defmethod inspect ((this gekko)) + (when (not this) + (set! this this) + (goto cfg-14) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tshadow-spot: #~%" (-> this shadow-spot)) + (format #t "~2Tfoot[4] @ #x~X~%" (-> this foot)) + (format #t "~2Trot-matrix: #~%" (-> this rot-matrix)) + (format #t "~2Tgspot-normal: #~%" (-> this gspot-normal)) + (format #t "~2Ttilt-quat: #~%" (-> this tilt-quat)) + (format #t "~2Tdest-to-me-dir: #~%" (-> this dest-to-me-dir)) + (format #t "~2Tturn-face-point: #~%" (-> this turn-face-point)) + (format #t "~2Tflags: #x~X : (gekko-flag " (-> this flags)) + (let ((s5-0 (-> this flags))) + (if (= (logand s5-0 (gekko-flag update-tilt)) (gekko-flag update-tilt)) + (format #t "update-tilt ") + ) + (if (= (logand s5-0 (gekko-flag follow-terrain)) (gekko-flag follow-terrain)) + (format #t "follow-terrain ") + ) + (if (= (logand s5-0 (gekko-flag on-wall?)) (gekko-flag on-wall?)) + (format #t "on-wall? ") + ) + (if (= (logand s5-0 (gekko-flag update-foot-position?)) (gekko-flag update-foot-position?)) + (format #t "update-foot-position? ") + ) + (if (= (logand s5-0 (gekko-flag falling-off-wall?)) (gekko-flag falling-off-wall?)) + (format #t "falling-off-wall? ") + ) + ) + (format #t ")~%") + (format #t "~2Tattack-time: ~D~%" (-> this attack-time)) + (format #t "~2Tlast-turn-time: ~D~%" (-> this last-turn-time)) + (format #t "~2Tfade: ~f~%" (-> this fade)) + (format #t "~2Trot-mult: ~f~%" (-> this rot-mult)) + (format #t "~2Tmove-speed: ~f~%" (-> this move-speed)) + (format #t "~2Tmove-decel: ~f~%" (-> this move-decel)) + (format #t "~2Tturn-next-state: ~A~%" (-> this turn-next-state)) + (format #t "~2Tpath-wall: ~A~%" (-> this path-wall)) + (format #t "~2Tscared-timer: ~D~%" (-> this scared-timer)) + (format #t "~2Tscale: ~f~%" (-> this scale)) + (format #t "~2Tprobe-len: ~f~%" (-> this probe-len)) + (label cfg-14) + this + ) + +;; definition for symbol *fact-info-gekko-defaults*, type fact-info-enemy-defaults +(define *fact-info-gekko-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 140) :pickup-type 9) + ) + +;; definition for symbol *gekko-nav-enemy-info*, type nav-enemy-info +(define *gekko-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 #x4 + :param0 5 + :param1 5 + :param2 '((new 'static 'bfloat :data 0.5) (new 'static 'bfloat :data 0.5)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 3 + :notice-anim 4 + :hostile-anim 14 + :hit-anim 3 + :knocked-anim 23 + :knocked-land-anim 18 + :die-anim 32 + :die-falling-anim 3 + :victory-anim -1 + :jump-wind-up-anim 33 + :jump-in-air-anim 34 + :jump-land-anim 35 + :neck-joint 6 + :look-at-joint 6 + :bullseye-joint 16 + :sound-hit (static-sound-name "gekko-get-hit") + :sound-die (static-sound-name "gekko-die") + :notice-distance (meters 80) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 5) + :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 7) + :attack-shove-up (meters 4) + :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.5 + :jump-height-min (meters 3) + :jump-height-factor 0.5 + :knocked-seek-ry-clamp -1.0 + :knocked-soft-vxz-lo 113049.6 + :knocked-soft-vxz-hi 149094.4 + :knocked-soft-vy-lo 122880.0 + :knocked-soft-vy-hi 163840.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.9169 :y -0.314 :z 0.2441 :w 2358.841) + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :bg-collide-with (collide-spec backgnd jak obstacle player-list) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9998 :z -0.0145 :w 18690.63) + :geo-tform (new 'static 'vector :x 0.9998 :y -0.0109 :z 0.0086 :w 14092.443) + :axial-slop 426.98523 + :max-angle 1820.4445 + :coll-rad 2079.5393 + :hit-sound (static-sound-name "gekko-bf") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :z 0.0177 :w 29970.05) + :geo-tform (new 'static 'vector :x 0.9998 :z 0.0088 :w 32808.543) + :axial-slop 426.98523 + :max-angle 1456.3556 + :coll-rad 1224.2944 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :z 0.0185 :w 31347.709) + :geo-tform (new 'static 'vector :x 0.9998 :y -0.0016 :z 0.0092 :w 28653.906) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 1338.9824 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :z 0.0186 :w 6233.548) + :geo-tform (new 'static 'vector :x -0.9994 :y -0.0202 :z -0.0091 :w 8968.311) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 1183.3344 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.2363 :y -0.0265 :z -0.971 :w 16298.385) + :geo-tform (new 'static 'vector :x 0.7523 :y 0.6222 :z -0.2161 :w 22609.957) + :axial-slop 426.98523 + :max-angle 3640.889 + :coll-rad 1150.5664 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9842 :y 0.081 :z 0.1544 :w 6309.4785) + :geo-tform (new 'static 'vector :x -0.6984 :y 0.5454 :z 0.4627 :w 18388.328) + :axial-slop 426.98523 + :max-angle 4619.2505 + :coll-rad 1282.4576 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3794 :y -0.0126 :z 0.925 :w 14670.799) + :geo-tform (new 'static 'vector :x -0.2831 :y 0.9394 :z 0.1922 :w 13051.641) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 1127.2192 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3743 :y -0.0189 :z 0.9269 :w 4210.943) + :geo-tform (new 'static 'vector :x 0.8507 :y -0.4889 :z -0.1902 :w 19701.232) + :axial-slop 426.98523 + :max-angle 4029.8452 + :coll-rad 1333.248 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.3447 :y 0.1703 :z 0.9229 :w 16305.849) + :geo-tform (new 'static 'vector :x 0.7264 :y -0.5892 :z 0.3528 :w 20835.006) + :axial-slop 426.98523 + :max-angle 3640.889 + :coll-rad 1124.352 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9835 :y -0.1776 :z 0.0185 :w 3334.3625) + :geo-tform (new 'static 'vector :x -0.6955 :y -0.5474 :z -0.4643 :w 18426.193) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 1088.3073 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3701 :y 0.0165 :z -0.9283 :w 14670.671) + :geo-tform (new 'static 'vector :x -0.2795 :y -0.9402 :z -0.1922 :w 13170.697) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 1053.4912 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3607 :y 0.023 :z -0.932 :w 4213.7646) + :geo-tform (new 'static 'vector :x -0.8814 :y -0.119 :z 0.456 :w 16534.57) + :axial-slop 426.98523 + :max-angle 4029.8452 + :coll-rad 1327.104 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -0.9993 :y -0.005 :z -0.0354 :w 5877.141) + :geo-tform (new 'static 'vector :x -0.9998 :y -0.0126 :z -0.0087 :w 12748.154) + :axial-slop 426.98523 + :max-angle 1367.4814 + :coll-rad 1144.832 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9994 :z -0.0227 :w 17.585493) + :geo-tform (new 'static 'vector :x -0.9998 :y -0.0126 :z -0.0087 :w 12762.499) + :axial-slop 426.98523 + :max-angle 1537.784 + :coll-rad 1164.0833 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.514 :y 0.0096 :z -0.8572 :w 14720.624) + :geo-tform (new 'static 'vector :x -0.9145 :y -0.3788 :z 0.1386 :w 11441.111) + :axial-slop 426.98523 + :max-angle 2730.6667 + :coll-rad 924.0576 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9968 :y 0.0073 :z 0.075 :w 8037.281) + :geo-tform (new 'static 'vector :x 0.7911 :y -0.1717 :z 0.5867 :w 14446.993) + :axial-slop 426.98523 + :max-angle 3665.7927 + :coll-rad 924.0576 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7222 :y 0.0125 :z 0.6908 :w 14193.806) + :geo-tform (new 'static 'vector :x -0.9861 :y -0.1063 :z -0.1272 :w 19499.127) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 924.0576 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9636 :y 0.0018 :z -0.2657 :w 19342.15) + :geo-tform (new 'static 'vector :x 0.3582 :y -0.8755 :z -0.3234 :w 7445.891) + :axial-slop 426.98523 + :max-angle 4029.8452 + :coll-rad 924.0576 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9163 :y -0.0016 :z -0.3995 :w 3475.2285) + :geo-tform (new 'static 'vector :x -0.8003 :y -0.5296 :z -0.2795 :w 11328.59) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 1264.8448 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint 16 + :pre-tform (new 'static 'vector :x -0.9998 :y 0.0016 :z 0.0099 :w 1182.9977) + :geo-tform (new 'static 'vector :x 0.9958 :y -0.0876 :z 0.0087 :w 2150.4365) + :axial-slop 426.98523 + :max-angle 1456.3556 + :coll-rad 924.0576 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9998 :y -0.0055 :z 0.0172 :w 2143.81) + :geo-tform (new 'static 'vector :x -0.0003 :y -1.0 :w 177.23846) + :axial-slop 426.98523 + :max-angle 2002.4889 + :coll-rad 924.0576 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.4534 :y -0.8907 :z -0.0071 :w 14.345102) + :geo-tform (new 'static 'vector :y -1.0 :w 167.15321) + :axial-slop 426.98523 + :max-angle 2730.6667 + :coll-rad 638.5664 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9993 :z 0.0309) + :geo-tform (new 'static 'vector :x -0.0002 :y -1.0 :w 167.15321) + :axial-slop 426.98523 + :max-angle 3458.8445 + :coll-rad 526.7456 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9993 :z 0.0309) + :geo-tform (new 'static 'vector :x -0.0003 :y -0.9998 :w 167.15321) + :axial-slop 426.98523 + :max-angle 4187.0225 + :coll-rad 355.5328 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint 16 + :pre-tform (new 'static 'vector :x -0.5197 :y 0.0089 :z 0.8538 :w 14715.818) + :geo-tform (new 'static 'vector :x -0.921 :y 0.3571 :z -0.1527 :w 11310.513) + :axial-slop 426.98523 + :max-angle 3640.889 + :coll-rad 935.936 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9975 :y 0.0082 :z -0.0651 :w 8052.2993) + :geo-tform (new 'static 'vector :x 0.8026 :y 0.1536 :z -0.5763 :w 14394.364) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 924.0576 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7269 :y 0.0057 :z -0.6861 :w 14192.44) + :geo-tform (new 'static 'vector :x -0.9887 :y 0.0952 :z 0.1121 :w 19467.068) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 924.0576 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9719 :y -0.0073 :z 0.2335 :w 19440.309) + :geo-tform (new 'static 'vector :x 0.3657 :y 0.866 :z 0.3398 :w 7188.9897) + :axial-slop 426.98523 + :max-angle 4029.8452 + :coll-rad 924.0576 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9024 :y 0.0007 :z 0.4302 :w 3461.2112) + :geo-tform (new 'static 'vector :x -0.8144 :y 0.5124 :z 0.2716 :w 11174.926) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 1215.2832 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint 10 + :pre-tform (new 'static 'vector :x -0.6151 :y -0.6097 :z -0.4993 :w 12937.025) + :geo-tform (new 'static 'vector :x -0.0868 :y -0.921 :z -0.3792 :w 8346.01) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 650.4448 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.921 :y 0.1397 :z -0.3634 :w 2869.6938) + :geo-tform (new 'static 'vector :x -0.319 :y -0.9406 :z -0.1124 :w 8966.345) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 489.8816 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint 10 + :pre-tform (new 'static 'vector :x 0.7723 :y 0.6006 :z -0.2057 :w 11225.279) + :geo-tform (new 'static 'vector :x 0.0707 :y 0.9922 :z -0.0988 :w 20417.65) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 575.0784 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3531 :y -0.0993 :z -0.9298 :w 2126.9346) + :geo-tform (new 'static 'vector :y 0.9937 :z 0.1082 :w 35917.625) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 545.9968 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 36 + :parent-joint 10 + :pre-tform (new 'static 'vector :x 0.9417 :y 0.2245 :z 0.2487 :w 15554.733) + :geo-tform (new 'static 'vector :x 0.07 :y 0.9965 :z 0.0389 :w 36169.848) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 541.4912 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 37 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3319 :y -0.0751 :z -0.9401 :w 1665.7977) + :geo-tform (new 'static 'vector :x 0.3686 :y 0.9253 :z -0.0855 :w 33224.6) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 489.0624 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 38 + :parent-joint 14 + :pre-tform (new 'static 'vector :x 0.9477 :y -0.2105 :z -0.239 :w 14735.951) + :geo-tform (new 'static 'vector :x 0.477 :y 0.0276 :z 0.8779 :w 34298.176) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 596.7872 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 39 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.1272 :y 0.0794 :z 0.9883 :w 1645.9913) + :geo-tform (new 'static 'vector :x 0.5577 :y 0.3476 :z 0.7531 :w 36094.316) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 496.4352 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 40 + :parent-joint 14 + :pre-tform (new 'static 'vector :x 0.7784 :y -0.6029 :z 0.1728 :w 8814.884) + :geo-tform (new 'static 'vector :x -0.3 :y 0.025 :z 0.9532 :w 34750.32) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 620.9536 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 41 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5386 :y 0.0881 :z 0.8378 :w 2062.2178) + :geo-tform (new 'static 'vector :x -0.2608 :y -0.1063 :z 0.9592 :w 33021.97) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 600.064 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 42 + :parent-joint 14 + :pre-tform (new 'static 'vector :x -0.6597 :y 0.605 :z 0.4453 :w 10974.531) + :geo-tform (new 'static 'vector :x 0.8782 :y 0.1516 :z -0.4526 :w 32356.781) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 614.4 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 43 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9724 :y -0.131 :z 0.1908 :w 2849.3416) + :geo-tform (new 'static 'vector :x 0.8708 :y 0.0597 :z -0.4875 :w 30132.617) + :axial-slop 426.98523 + :max-angle 4576.015 + :coll-rad 458.752 + :hit-sound (static-sound-name "gekko-ragdoll") + ) + ) + ) + :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 14 + :taunt-anim -1 + :run-travel-speed (meters 14) + :run-acceleration (meters 6) + :run-turning-acceleration (meters 60) + :walk-travel-speed (meters 5) + :walk-acceleration (meters 6) + :walk-turning-acceleration (meters 30) + :maximum-rotation-rate (degrees 450) + :notice-nav-radius (meters 40) + :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! (-> *gekko-nav-enemy-info* fact-defaults) *fact-info-gekko-defaults*) + +;; definition for method 120 of type gekko +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this gekko)) + (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 pusher) + ) + (set! (-> s4-0 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 4915.2 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-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list pusher) + ) + (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 action) (collide-action solid)) + (set! (-> v1-15 transform-index) 3) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 2457.6) + ) + (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 3276.8) + ) + (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 solid deadly)) + (set! (-> v1-19 transform-index) 6) + (set-vector! (-> v1-19 local-sphere) 0.0 -819.2 1638.4 1638.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 enemy)) + (set! (-> v1-21 prim-core action) (collide-action solid)) + (set! (-> v1-21 transform-index) 16) + (set-vector! (-> v1-21 local-sphere) 0.0 0.0 0.0 1638.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 enemy)) + (set! (-> v1-23 prim-core action) (collide-action solid)) + (set! (-> v1-23 transform-index) 24) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 1228.8) + ) + (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 solid deadly)) + (set! (-> v1-25 transform-index) 10) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 1228.8) + ) + (set-vector! + (-> (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)) local-sphere) + 0.0 + 4096.0 + 0.0 + 8192.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! (-> s5-0 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate idle (gekko) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy idle) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (time-elapsed? (-> self state-time) (seconds 0.5)) + (logclear! (-> self flags) (gekko-flag update-foot-position? follow-terrain update-tilt)) + ) + ) + ) + +;; failed to figure out what this is: +(defstate active-wall (gekko) + :virtual #t + :enter (behavior () + ((-> (method-of-type nav-enemy active) enter)) + (let ((v1-3 (-> self draw shadow-ctrl))) + (logclear! (-> v1-3 settings flags) (shadow-flags disable-draw)) + ) + 0 + (dotimes (gp-0 4) + (enable-set! (-> self foot gp-0 leg-ik) #t) + ) + ) + :trans (-> (method-of-type nav-enemy active) trans) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (ja-no-eval :group! gekko-wall-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate notice (gekko) + :virtual #t + :enter (behavior () + (set! (-> self attack-time) (+ (current-time) (seconds -3.5))) + (set! (-> self last-turn-time) (+ (current-time) (seconds -100))) + (if (logtest? (-> self flags) (gekko-flag on-wall?)) + (gekko-method-206 self) + (go-virtual hostile) + ) + ) + ) + +;; definition for function hostile-wall-trans +;; WARN: Return type mismatch object vs none. +(defbehavior hostile-wall-trans gekko () + (local-vars (gp-2 vector) (f0-0 float)) + (if (rnd-chance? self 0.75) + (sound-play "gekko-slither") + ) + (cond + ((and (time-elapsed? (-> self attack-time) (seconds 3)) + (and (get-focus! self) + (begin + (set! gp-2 (vector-! (new 'stack-no-clear 'vector) (-> self focus-pos) (-> self root trans))) + (set! f0-0 (vector-length gp-2)) + (< f0-0 163840.0) + ) + (or (< 20480.0 f0-0) (not (logtest? (-> self flags) (gekko-flag on-wall?)))) + (< (vector-dot + (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (vector-normalize-copy! (new 'stack-no-clear 'vector) gp-2 1.0) + ) + (cos 30.0) + ) + ) + ) + (gekko-method-207 self) + ) + ((or (< (vector-vector-planar-distance (-> self root trans) (-> self move-dest) (-> self rot-matrix uvec)) 8192.0) + (or (< (vector-dot + (-> self dest-to-me-dir) + (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (-> self move-dest)) + ) + 0.0 + ) + (time-elapsed? (-> self state-time) (seconds 5)) + ) + ) + (gekko-method-206 self) + ) + ((and (< (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) 61440.0) + (let ((gp-3 (new 'stack-no-clear 'vector))) + (and (closest-point-on-mesh (-> self nav) gp-3 (-> self focus-pos) (the-as nav-poly #f)) + (< (vector-vector-xz-distance gp-3 (-> self focus-pos)) 409.6) + ) + ) + ) + (go-virtual jump-off-wall) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate hostile-wall (gekko) + :virtual #t + :event enemy-event-handler + :enter (behavior () + ((-> (method-of-type nav-enemy hostile) enter)) + (set-time! (-> self state-time)) + (logior! (-> self flags) (gekko-flag update-foot-position? follow-terrain update-tilt)) + (set-look-at-mode! self 2) + ) + :trans (behavior () + '() + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.017)) + (let ((f30-0 (/ 1.0 (-> self scale)))) + (until #f + (hostile-wall-trans) + (ja-no-eval :group! gekko-wall-run0-a-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (hostile-wall-trans) + (ja-no-eval :group! gekko-wall-run0-b-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + #f + ) + :post (behavior () + (let ((gp-0 (-> self root))) + (vector-normalize-copy! + (-> gp-0 transv) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> gp-0 quat)) + 40960.0 + ) + (vector-v++! (-> gp-0 trans) (-> gp-0 transv)) + ) + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate turn-wall (gekko) + :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 + (logior! (-> self flags) (gekko-flag follow-terrain update-tilt)) + (logior! (-> self flags) (gekko-flag update-foot-position?)) + ) + :exit (behavior () + (set-time! (-> self last-turn-time)) + ) + :trans (behavior () + '() + ) + :code (behavior () + (when (!= (-> self turn-next-state) (method-of-type gekko attack-wall)) + (set-look-at-mode! self 1) + (let* ((v1-7 (ja-group)) + (gp-0 (if (and v1-7 (= v1-7 gekko-wall-run0-a-ja)) + 25 + 24 + ) + ) + ) + (ja-channel-push! 1 (seconds 0.03)) + (dotimes (s5-0 (if (time-elapsed? (-> self last-turn-time) (seconds 1)) + 1 + 6 + ) + ) + (ja-no-eval :group! (-> self draw art-group data gp-0) :num! (seek! max 0.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.5)) + ) + ) + ) + ) + (set-look-at-mode! self 2) + (let* ((f0-8 (vector-dot + (vector-cross! + (new 'stack-no-clear 'vector) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (vector-negate! (new 'stack-no-clear 'vector) (-> self dest-to-me-dir)) + ) + (-> self rot-matrix uvec) + ) + ) + (gp-3 (if (< f0-8 0.0) + 8 + 9 + ) + ) + ) + (set! (-> self rot-mult) (if (< f0-8 0.0) + 1.0 + -1.0 + ) + ) + (let ((v1-47 self)) + (set! (-> v1-47 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-47 enemy-flags)))) + ) + 0 + (logior! (-> self flags) (gekko-flag update-foot-position?)) + (if (rnd-chance? self 0.75) + (sound-play "gekko-slither") + ) + (ja-channel-push! 1 (seconds 0.017)) + (ja-no-eval :group! (-> self draw art-group data gp-3) :num! (loop!) :frame-num 0.0) + ) + (until (enemy-method-104 self (-> self turn-face-point) 910.2222) + (suspend) + (ja :num! (loop!)) + ) + (go (-> self turn-next-state)) + ) + :post (behavior () + (let ((a0-0 self)) + (if (logtest? (enemy-flag ef38) (-> a0-0 enemy-flags)) + (quaternion-rotate-local-y! + (-> self root quat) + (-> self root quat) + (* -81920.0 (seconds-per-frame) (-> self rot-mult)) + ) + ) + ) + (vector-float*! (-> self root transv) (-> self root transv) 0.6) + (vector-v++! (-> self root trans) (-> self root transv)) + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate attack-wall (gekko) + :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 + (logior! (-> self flags) (gekko-flag follow-terrain update-tilt)) + (set-look-at-mode! self 1) + ) + :exit (behavior () + (set-time! (-> self attack-time)) + ) + :code (behavior () + (let* ((v1-2 (ja-group)) + (gp-0 (if (and v1-2 (= v1-2 gekko-wall-run0-a-ja)) + 25 + 24 + ) + ) + ) + (ja-channel-push! 1 (seconds 0.03)) + (let ((s5-0 (current-time)) + (s4-0 150) + (f30-0 0.5) + ) + (ja-no-eval :group! (-> self draw art-group data gp-0) :num! (loop! f30-0) :frame-num 0.0) + (until (time-elapsed? s5-0 s4-0) + (suspend) + (ja :num! (loop! f30-0)) + ) + ) + (let ((s5-1 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node gekko-lod0-jg head))) + (s4-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-1 quad) (-> self focus-pos quad)) + (set! (-> s4-1 y) (- (-> s4-1 y) (* 4096.0 (rnd-float-range self 0.0 10.0)))) + (sound-play "gekko-shot") + (spawn-metalhead-projectile (the-as metalhead-shot self) s5-1 s4-1 532480.0) + ) + (logclear! (-> self flags) (gekko-flag update-foot-position?)) + (ja-channel-push! 1 1) + (ja-no-eval :group! gekko-wall-shoot0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.06)) + (logior! (-> self flags) (gekko-flag update-foot-position?)) + (dotimes (s5-2 2) + (ja-no-eval :group! (-> self draw art-group data gp-0) :num! (seek! max 0.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.5)) + ) + ) + ) + (gekko-method-206 self) + ) + :post (behavior () + (seek! (-> self fade) 1.0 (seconds-per-frame)) + (set! (-> self draw force-fade) (the-as uint (the int (-> self fade)))) + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate knocked-wall (gekko) + :virtual #t + :event enemy-event-handler + :enter (behavior () + ((-> (method-of-type nav-enemy knocked) enter)) + (dotimes (gp-0 4) + (enable-set! (-> self foot gp-0 leg-ik) #f) + ) + (logclear! (-> self flags) (gekko-flag follow-terrain update-tilt on-wall?)) + (logior! (-> self flags) (gekko-flag update-foot-position? falling-off-wall?)) + (set! (-> self probe-len) 18432.0) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) exit))) + (if t9-0 + (t9-0) + ) + ) + (logclear! (-> self flags) (gekko-flag falling-off-wall?)) + ) + :trans (behavior () + ((-> (method-of-type nav-enemy knocked) trans)) + (let ((a1-1 (quaternion-from-two-vectors-max-angle! + (new 'stack-no-clear 'quaternion) + (-> self rot-matrix uvec) + *y-vector* + (* 49152.0 (seconds-per-frame)) + ) + ) + (v1-4 (-> self root)) + ) + (quaternion*! (-> v1-4 quat) a1-1 (-> v1-4 quat)) + ) + ) + :code (-> (method-of-type nav-enemy knocked) code) + :post (behavior () + ((the-as (function none) (-> (method-of-type nav-enemy knocked) post))) + 0 + ) + ) + +;; failed to figure out what this is: +(defstate jump-off-wall (gekko) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (stop-look-at! self) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self mask) (process-mask actor-pause)) + (let* ((v1-8 *game-info*) + (a0-4 (+ (-> v1-8 attack-id) 1)) + ) + (set! (-> v1-8 attack-id) a0-4) + (set! (-> self attack-id) a0-4) + ) + (set! (-> self root penetrate-using) (penetrate lunge vehicle knocked)) + (logclear! (-> self root status) (collide-status + on-surface + on-ground + touch-surface + touch-wall + touch-ceiling + touch-actor + on-special-surface + touch-edge + blocked + on-water + impact-surface + touch-background + stuck + glance + ) + ) + (when (not (logtest? (-> self root root-prim prim-core action) (collide-action no-normal-reset))) + (let ((v1-20 (-> self root dynam gravity-normal))) + (set! (-> self root local-normal quad) (-> v1-20 quad)) + (set! (-> self root surface-normal quad) (-> v1-20 quad)) + (set! (-> self root poly-normal quad) (-> v1-20 quad)) + ) + (set! (-> self root coverage) 0.0) + (set! (-> self root touch-angle) 0.0) + ) + (logior! (-> self focus-status) (focus-status dangerous)) + (enemy-method-50 self 3) + (dotimes (gp-0 4) + (enable-set! (-> self foot gp-0 leg-ik) #f) + ) + (set! (-> self probe-len) 18432.0) + (logclear! (-> self flags) (gekko-flag follow-terrain update-tilt on-wall?)) + (logior! (-> self flags) (gekko-flag update-foot-position?)) + ) + :trans (behavior () + '() + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! gekko-jump-to-ground-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual jump-off-wall-falling) + ) + :post (behavior () + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate jump-off-wall-falling (gekko) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((v1-1 (vector-! (new 'stack-no-clear 'vector) (-> self focus-pos) (-> self root trans)))) + (set! (-> v1-1 y) 0.0) + (vector-float*! (-> self root transv) v1-1 1.5) + ) + (set-time! (-> self state-time)) + ) + :trans #f + :code (behavior () + (local-vars (s4-0 collide-shape-moving)) + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! gekko-jump-to-ground-in-air-ja :num! (seek!)) + (let ((gp-0 0) + (s5-0 0) + ) + (until (or (>= gp-0 3) + (and (logtest? (-> s4-0 status) (collide-status on-ground)) (>= 16384.0 (-> s4-0 transv y))) + (and (>= s5-0 3) + (let ((f0-7 40.96)) + (>= (* f0-7 f0-7) (vector-vector-distance-squared (-> s4-0 trans-old) (-> s4-0 trans-old-old))) + ) + (let ((f0-10 40.96)) + (>= (* f0-10 f0-10) (vector-vector-distance-squared (-> s4-0 trans-old-old) (-> s4-0 trans-old-old-old))) + ) + ) + ) + (if (time-elapsed? (-> self state-time) (seconds 2)) + (go-die self) + ) + (if (logtest? (-> self root status) (collide-status on-surface)) + (+! gp-0 1) + ) + (suspend) + (ja :num! (seek!)) + (+! s5-0 1) + (set! s4-0 (-> self root)) + ) + ) + (go-virtual jump-off-wall-recover) + ) + :post (behavior () + (let ((a1-1 (quaternion-from-two-vectors-max-angle! + (new 'stack-no-clear 'quaternion) + (-> self rot-matrix uvec) + *y-vector* + (* 49152.0 (seconds-per-frame)) + ) + ) + (v1-2 (-> self root)) + ) + (quaternion*! (-> v1-2 quat) a1-1 (-> v1-2 quat)) + ) + (nav-enemy-falling-post) + ) + ) + +;; failed to figure out what this is: +(defstate jump-off-wall-recover (gekko) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (gekko-method-208 self) + (set! (-> self root penetrate-using) (penetrate)) + 0 + ) + :exit (behavior () + (local-vars (v1-9 enemy-flag) (v1-11 enemy-flag) (v1-13 enemy-flag)) + (enemy-method-50 self 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-8 (-> self enemy-flags))) + (if (logtest? v1-8 (enemy-flag vulnerable-backup)) + (set! v1-9 (logior v1-8 (enemy-flag vulnerable))) + (set! v1-9 (logclear v1-8 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-9) + (let ((v1-10 (-> self enemy-flags))) + (if (logtest? v1-10 (enemy-flag attackable-backup)) + (set! v1-11 (logior v1-10 (enemy-flag attackable))) + (set! v1-11 (logclear v1-10 (enemy-flag attackable))) + ) + ) + (set! (-> self enemy-flags) v1-11) + (let ((v1-12 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-12) + (set! v1-13 (logior (enemy-flag trackable) v1-12)) + (set! v1-13 (logclear v1-12 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-13) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (dotimes (gp-0 4) + (enable-set! (-> self foot gp-0 leg-ik) #t) + ) + (logior! (-> self flags) (gekko-flag follow-terrain update-tilt)) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (seconds 0.2)) (within-gspot-range? self)) + (go-die self) + ) + ) + :code (behavior () + (ja-channel-set! 1) + (ja-no-eval :group! gekko-jump-to-ground-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (dotimes (gp-0 2) + (ja-no-eval :group! gekko-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (if (enemy-method-109 self) + (go-die self) + (go-best-state self) + ) + ) + :post (behavior () + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate active (gekko) + :virtual #t + :enter (behavior () + (if (logtest? (-> self flags) (gekko-flag on-wall?)) + (go-virtual active-wall) + ) + (let ((t9-1 (-> (method-of-type nav-enemy active) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :code (behavior () + (until #f + (let* ((f30-1 (* 0.5 (rnd-float-range self 0.9 1.1))) + (v1-5 (ja-group)) + (s5-0 (if (and v1-5 (= v1-5 gekko-run0-a-ja)) + 25 + 24 + ) + ) + (s4-0 (set-reaction-time! self (seconds 0.007) (seconds 0.017))) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (nav-enemy-method-164 self) + (let ((a1-2 (-> self nav state))) + (set! (-> gp-0 quad) (-> a1-2 target-pos quad)) + ) + (let ((v1-13 self)) + (set! (-> v1-13 enemy-flags) (the-as enemy-flag (logclear (-> v1-13 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-13 nav callback-info) *null-nav-callback-info*) + ) + 0 + (ja-channel-push! 1 (seconds 0.2)) + (dotimes (s3-0 s4-0) + (ja-no-eval :group! (-> self draw art-group data s5-0) :num! (seek! max f30-1) :frame-num 0.0) + (until (ja-done? 0) + (if (= (-> self skel root-channel 0) (-> self skel channel)) + (logclear! (-> self flags) (gekko-flag update-foot-position?)) + ) + (suspend) + (ja :num! (seek! max f30-1)) + ) + ) + (when (not (enemy-method-104 self gp-0 8192.0)) + (let ((v1-48 self)) + (set! (-> v1-48 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-48 enemy-flags)))) + ) + 0 + (logior! (-> self flags) (gekko-flag update-foot-position?)) + (ja-channel-push! 1 (seconds 0.06)) + (let ((a0-26 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (v1-54 (vector-! (new 'stack-no-clear 'vector) gp-0 (-> self root trans))) + (f30-2 0.5) + (f28-0 1.0) + ) + (cond + ((< 0.0 (vector-dot a0-26 v1-54)) + (ja-no-eval :group! gekko-turn-left0-ja :num! (loop! f30-2) :frame-num 0.0) + ) + (else + (ja-no-eval :group! gekko-turn-right0-ja :num! (loop! f30-2) :frame-num 0.0) + (set! f28-0 (* -1.0 f28-0)) + ) + ) + (until (enemy-method-104 self gp-0 6371.5557) + (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) (* -81920.0 (seconds-per-frame) f28-0)) + (suspend) + (ja :num! (loop! f30-2)) + ) + ) + ) + ) + (let* ((v1-86 (ja-group)) + (gp-1 (if (and v1-86 (= v1-86 gekko-idle0-ja)) + 14 + 15 + ) + ) + (v1-91 (ja-group)) + (s5-1 (if (and v1-91 (= v1-91 gekko-idle0-ja)) + 15 + 14 + ) + ) + (s4-1 (set-reaction-time! self (seconds 0.017) (seconds 0.027))) + ) + (let ((v1-95 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-95 enemy-flags))) + (set! (-> v1-95 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-95 enemy-flags)))) + ) + (set! (-> v1-95 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-95 enemy-flags)))) + (set! (-> v1-95 nav callback-info) (-> v1-95 enemy-info callback-info)) + ) + 0 + (ja-channel-push! 1 (seconds 0.2)) + (let ((f30-3 (/ 0.5 (-> self scale)))) + (dotimes (s3-1 s4-1) + (ja-no-eval :group! (-> self draw art-group data gp-1) :num! (seek! max f30-3) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-3)) + ) + (ja-no-eval :group! (-> self draw art-group data s5-1) :num! (seek! max f30-3) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-3)) + ) + ) + ) + ) + ) + #f + ) + ) + +;; definition for function gekko-stare-code +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior gekko-stare-code gekko () + (let* ((f30-1 (* 0.5 (rnd-float-range self 0.9 1.1))) + (v1-5 (ja-group)) + (gp-0 (if (and v1-5 (= v1-5 gekko-run0-a-ja)) + 25 + 24 + ) + ) + ) + (until #f + (cond + ((enemy-method-104 self (-> self focus-pos) 8192.0) + (let ((v1-10 self)) + (set! (-> v1-10 enemy-flags) (the-as enemy-flag (logclear (-> v1-10 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (let ((v1-14 (ja-group))) + (if (not (and v1-14 (= v1-14 (-> self draw art-group data gp-0)))) + (ja-channel-push! 1 (seconds 0.12)) + ) + ) + (ja-no-eval :group! (-> self draw art-group data gp-0) :num! (seek! max f30-1) :frame-num 0.0) + (until (ja-done? 0) + (if (= (-> self skel root-channel 0) (-> self skel channel)) + (logclear! (-> self flags) (gekko-flag update-foot-position?)) + ) + (suspend) + (ja :num! (seek! max f30-1)) + ) + ) + ((or (enemy-method-104 self (-> self focus-pos) 30947.555) (rnd-chance? self 0.3)) + (let ((v1-50 self)) + (set! (-> v1-50 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-50 enemy-flags)))) + ) + 0 + (logior! (-> self flags) (gekko-flag update-foot-position?)) + (ja-channel-push! 1 (seconds 0.06)) + (let ((a0-28 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (v1-56 (vector-! (new 'stack-no-clear 'vector) (-> self focus-pos) (-> self root trans))) + (f28-0 0.5) + ) + (if (< 0.0 (vector-dot a0-28 v1-56)) + (ja-no-eval :group! gekko-turn-left0-ja :num! (loop! f28-0) :frame-num 0.0) + (ja-no-eval :group! gekko-turn-right0-ja :num! (loop! f28-0) :frame-num 0.0) + ) + (until (enemy-method-104 self (-> self focus-pos) 6371.5557) + (suspend) + (ja :num! (loop! f28-0)) + ) + ) + ) + (else + (go-virtual turn-quick) + ) + ) + ) + ) + #f + (none) + ) + +;; failed to figure out what this is: +(defstate stare (gekko) + :virtual #t + :code gekko-stare-code + ) + +;; failed to figure out what this is: +(defstate flee (gekko) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy flee) enter))) + (if t9-0 + (t9-0) + ) + ) + (dotimes (gp-0 4) + (enable-set! (-> self foot gp-0 leg-ik) #t) + ) + (logior! (-> self flags) (gekko-flag update-foot-position? follow-terrain update-tilt)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.015)) + (until #f + (let ((f30-0 (/ (rnd-float-range self 0.9 1.1) (-> self scale)))) + (ja-no-eval :group! gekko-run0-a-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! gekko-run0-b-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate hostile (gekko) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (dotimes (gp-0 4) + (enable-set! (-> self foot gp-0 leg-ik) #t) + ) + (logior! (-> self flags) (gekko-flag update-foot-position? follow-terrain update-tilt)) + (let ((v1-13 self)) + (set! (-> v1-13 enemy-flags) (the-as enemy-flag (logclear (-> v1-13 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + :trans (behavior () + '() + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.12)) + (until #f + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (ja-no-eval :group! gekko-run0-a-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (gekko-method-203 self) + (ja-no-eval :group! gekko-run0-b-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (gekko-method-203 self) + ) + #f + ) + :post (behavior () + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> self root trans) (-> self focus-pos))) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-1 y) 0.0) + (vector-xz-normalize! s4-1 24576.0) + (vector+! gp-0 (-> self focus-pos) s4-1) + (set! (-> s5-0 quad) (-> gp-0 quad)) + (closest-point-on-mesh (-> self nav) s5-0 gp-0 (the-as nav-poly #f)) + (set! (-> self move-dest quad) (-> s5-0 quad)) + ) + (let ((v1-8 (-> self nav state))) + (logclear! (-> v1-8 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-8 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-8 target-pos quad) (-> gp-0 quad)) + ) + ) + 0 + (nav-enemy-method-187 self) + ) + ) + +;; failed to figure out what this is: +(defstate pre-attack (gekko) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set! (-> self move-speed) (vector-length (-> self root transv))) + (set! (-> self move-decel) (fmax 163840.0 (* 0.00012207031 (-> self move-speed) (-> self move-speed)))) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.3)) + (cond + ((and (get-focus! self) + (enemy-method-104 self (-> self focus-pos) 8192.0) + (let ((f0-0 (vector-vector-distance (-> self root trans) (-> self focus-pos)))) + (< f0-0 40960.0) + (and (< 4096.0 f0-0) (gekko-method-204 self)) + ) + ) + (go-virtual attack) + ) + (else + (set! (-> self scared-timer) (+ (current-time) (the int (* 300.0 (rnd-float-range self 0.8 2.1))))) + (go-best-state self) + ) + ) + ) + ) + :code gekko-stare-code + :post (behavior () + (seek! (-> self move-speed) 0.0 (* (-> self move-decel) (seconds-per-frame))) + (vector-normalize-copy! + (-> self root transv) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (-> self move-speed) + ) + (vector+! (-> self move-dest) (-> self root trans) (-> self root transv)) + (vector-v++! (-> self root trans) (-> self root transv)) + (nav-enemy-face-focus-post) + ) + ) + +;; failed to figure out what this is: +(defstate attack (gekko) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (dotimes (gp-0 4) + (enable-set! (-> self foot gp-0 leg-ik) #f) + ) + (logclear! (-> self flags) (gekko-flag update-foot-position? update-tilt)) + (set-look-at-mode! self 1) + (logior! (-> self focus-status) (focus-status dangerous)) + (let ((v1-14 (-> self root root-prim))) + (let ((a0-4 (-> (the-as collide-shape-prim-group v1-14) child 6))) + (set! (-> a0-4 prim-core collide-as) (collide-spec enemy)) + (+! (-> a0-4 local-sphere w) 3276.8) + ) + (+! (-> v1-14 local-sphere w) 6144.0) + ) + (let ((v1-16 self)) + (set! (-> v1-16 enemy-flags) (the-as enemy-flag (logclear (-> v1-16 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-16 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let ((v1-19 self)) + (set! (-> v1-19 enemy-flags) (the-as enemy-flag (logclear (-> v1-19 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + :exit (behavior () + (dotimes (gp-0 4) + (enable-set! (-> self foot gp-0 leg-ik) #t) + ) + (logior! (-> self flags) (gekko-flag update-foot-position? follow-terrain update-tilt)) + (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-16 (-> self root root-prim))) + (let ((a0-3 (-> (the-as collide-shape-prim-group v1-16) child 6))) + (set! (-> a0-3 prim-core collide-as) (collide-spec)) + (+! (-> a0-3 local-sphere w) -3276.8) + ) + (+! (-> v1-16 local-sphere w) -6144.0) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! gekko-attack0-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((v1-24 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-24 enemy-flags))) + (set! (-> v1-24 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-24 enemy-flags)))) + ) + (set! (-> v1-24 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-24 enemy-flags)))) + (set! (-> v1-24 nav callback-info) (-> v1-24 enemy-info callback-info)) + ) + 0 + (let ((gp-0 (-> self nav))) + (set! (-> gp-0 target-speed) (lerp-scale + 24576.0 + 110592.0 + (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) + 4096.0 + 24576.0 + ) + ) + ) + 0 + (ja-no-eval :group! gekko-attack0-mid-ja :num! (seek! max (/ 1.0 (-> self scale))) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (/ 1.0 (-> self scale)))) + ) + (nav-enemy-method-177 self) + (let ((v1-55 self)) + (set! (-> v1-55 enemy-flags) (the-as enemy-flag (logclear (-> v1-55 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-55 nav callback-info) *null-nav-callback-info*) + ) + 0 + (set-time! (-> self attack-time)) + (ja-no-eval :group! gekko-attack0-land-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-best-state self) + ) + :post nav-enemy-chase-post + ) + +;; failed to figure out what this is: +(defstate turn (gekko) + :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 + (logclear! (-> self flags) (gekko-flag follow-terrain)) + ) + :trans (behavior () + (if (enemy-method-104 self (-> self focus-pos) 2730.6667) + (go-best-state self) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (let ((a0-2 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (v1-2 (vector-! (new 'stack-no-clear 'vector) (-> self focus-pos) (-> self root trans))) + (f30-0 (/ 1.0 (-> self scale))) + ) + (cond + ((< 0.0 (vector-dot a0-2 v1-2)) + (ja-no-eval :group! gekko-turn-left0-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (else + (ja-no-eval :group! gekko-turn-right0-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + ) + ) + #f + ) + :post nav-enemy-face-focus-post + ) + +;; failed to figure out what this is: +(defstate turn-quick (gekko) + :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 + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! gekko-turn-hop0-ja :num! (seek! max (/ 1.0 (-> self scale))) :frame-num 0.0) + (until (ja-done? 0) + (quaternion-rotate-local-y! (-> self root quat) (-> self root quat) (* 98304.0 (seconds-per-frame))) + (suspend) + (ja :num! (seek! max (/ 1.0 (-> self scale)))) + ) + (ja-no-eval :group! gekko-turn-hop0-land-ja :num! (seek! max (/ 1.0 (-> self scale))) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (/ 1.0 (-> self scale)))) + ) + (if (nav-enemy-method-174 self) + (go-stare2 self) + ) + (go-best-state self) + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate jump (gekko) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy jump) enter))) + (if t9-0 + (t9-0) + ) + ) + (dotimes (gp-0 4) + (enable-set! (-> self foot gp-0 leg-ik) #f) + ) + (logclear! (-> self flags) (gekko-flag follow-terrain update-tilt on-wall?)) + (logior! (-> self flags) (gekko-flag update-foot-position? falling-off-wall?)) + ) + ) + +;; failed to figure out what this is: +(defstate knocked (gekko) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-0 + (t9-0) + ) + ) + (dotimes (gp-0 4) + (enable-set! (-> self foot gp-0 leg-ik) #f) + ) + (set! (-> self probe-len) 18432.0) + (logclear! (-> self flags) (gekko-flag follow-terrain update-tilt on-wall?)) + (logior! (-> self flags) (gekko-flag update-foot-position?)) + (set-vector! + (-> (the-as ragdoll-proc (handle->process (-> self ragdoll-proc))) ragdoll gravity-target) + 0.0 + -1.5 + 0.0 + 1.0 + ) + ) + :post (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + 0 + ) + ) + +;; failed to figure out what this is: +(defstate knocked-recover (gekko) + :virtual #t + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked-recover) exit))) + (if t9-0 + (t9-0) + ) + ) + (dotimes (gp-0 4) + (enable-set! (-> self foot gp-0 leg-ik) #t) + ) + (logior! (-> self flags) (gekko-flag follow-terrain update-tilt)) + ) + :code (behavior () + (gekko-method-208 self) + (ja-channel-push! 1 (seconds 0.4)) + (ja-no-eval :group! gekko-run0-a-ja :num! (seek!) :frame-num 0.0) + (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.4)) + (suspend) + ) + ) + (if (enemy-method-109 self) + (go-die self) + (go-hostile self) + ) + ) + :post (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked-recover) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + +;; definition for function gekko-foot-rot-handler +;; WARN: Return type mismatch matrix vs none. +(defun gekko-foot-rot-handler ((arg0 cspace) (arg1 transformq)) + (let ((v1-0 (-> arg0 param2))) + (cspace<-transformq! arg0 (the-as transformq (&-> (the-as gekko v1-0) pool))) + ) + (none) + ) + +;; definition for function gekko-postbind +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun gekko-postbind ((arg0 draw-control) (arg1 cspace-array)) + (local-vars + (sv-560 float) + (sv-640 vector) + (sv-688 float) + (sv-692 vector) + (sv-696 vector) + (sv-976 cspace) + (sv-980 gekko-foot-info) + (sv-984 vector) + (sv-988 vector) + (sv-992 (function vector vector vector vector float)) + (sv-1008 vector) + (sv-1024 vector) + (sv-1040 vector) + (sv-1056 joint-mod-ik) + (sv-1072 vector) + (sv-1088 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) + (let ((gp-0 (the-as gekko (-> arg0 process)))) + (let ((s3-0 (-> gp-0 root))) + (let ((s2-0 (new 'stack-no-clear 'collide-query)) + (f30-0 (-> gp-0 probe-len)) + ) + (set! sv-560 (the-as float 2048.0)) + (quaternion->matrix (-> gp-0 rot-matrix) (-> gp-0 root quat)) + (let ((v1-2 1) + (a0-2 (new 'stack-no-clear 'inline-array 'vector 1)) + ) + (set! (-> a0-2 0 quad) (-> s3-0 trans quad)) + (set! (-> a0-2 0 w) + (+ 409.6 sv-560 (sqrtf (+ (* 25600.0 (-> gp-0 scale) (-> gp-0 scale)) (* 0.25 f30-0 f30-0)))) + ) + (let ((a1-6 s2-0)) + (set! (-> a1-6 best-dist) (the-as float a0-2)) + (set! (-> a1-6 best-other-prim) (the-as collide-shape-prim v1-2)) + (set! (-> a1-6 collide-with) (collide-spec backgnd)) + (set! (-> a1-6 ignore-process0) gp-0) + (set! (-> a1-6 ignore-process1) #f) + (set! (-> a1-6 ignore-pat) (-> gp-0 root pat-ignore-mask)) + (set! (-> a1-6 best-my-prim) (the-as collide-shape-prim #t)) + (set! (-> a1-6 action-mask) (collide-action solid)) + ) + ) + (fill-using-spheres *collide-cache* s2-0) + (dotimes (s1-0 4) + (let ((s0-0 (-> gp-0 foot s1-0))) + (set! sv-1056 (-> s0-0 leg-ik)) + (set! sv-1008 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> arg1 data (-> *gekko-ik-setup* s1-0 hand-index))) + ) + (let ((v0-3 + (vector<-cspace! (new 'stack-no-clear 'vector) (-> arg1 data (-> *gekko-ik-setup* s1-0 effector-index))) + ) + ) + (set! sv-640 (vector-! (new 'stack-no-clear 'vector) v0-3 sv-1008)) + ) + (let ((v1-28 (if (logtest? (-> gp-0 flags) (gekko-flag on-wall?)) + (-> gp-0 rot-matrix uvec) + *y-vector* + ) + ) + ) + (vector+float*! (-> s2-0 start-pos) sv-1008 v1-28 (* 0.5 f30-0)) + (vector-float*! (-> s2-0 move-dist) v1-28 (- f30-0)) + ) + (let ((v1-29 s2-0)) + (set! (-> v1-29 radius) sv-560) + (set! (-> v1-29 collide-with) (collide-spec backgnd)) + (set! (-> v1-29 ignore-process0) #f) + (set! (-> v1-29 ignore-process1) #f) + (set! (-> v1-29 ignore-pat) (-> gp-0 root pat-ignore-mask)) + (set! (-> v1-29 action-mask) (collide-action solid)) + ) + (set! sv-688 (probe-using-line-sphere *collide-cache* s2-0)) + (set! sv-692 (new 'stack-no-clear 'vector)) + (set! sv-696 (new 'stack-no-clear 'vector)) + (cond + ((>= sv-688 0.0) + (let ((v0-5 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> s2-0 move-dist) 1.0))) + (vector+float*! sv-692 (-> s2-0 start-pos) (-> s2-0 move-dist) sv-688) + (vector-! sv-696 sv-692 (-> s2-0 best-other-tri intersect)) + (vector+float*! sv-692 sv-692 v0-5 (-> s2-0 radius)) + ) + (vector-normalize! sv-696 1.0) + ) + (else + (set! (-> sv-692 quad) (-> sv-1008 quad)) + (set! (-> sv-692 y) (-> gp-0 root gspot-pos y)) + (set! (-> sv-696 quad) (-> gp-0 rot-matrix uvec quad)) + ) + ) + (if (logtest? (-> gp-0 flags) (gekko-flag on-wall?)) + (set! (-> s0-0 ground-normal quad) (-> sv-696 quad)) + (set! (-> s0-0 ground-normal quad) (-> *y-vector* quad)) + ) + (when (logtest? (-> gp-0 flags) (gekko-flag update-foot-position?)) + (set! sv-992 intersect-ray-plane) + (let* ((a1-22 (vector-negate! (new 'stack-no-clear 'vector) (-> gp-0 rot-matrix uvec))) + (a2-4 (-> gp-0 root trans)) + (a3-1 (-> gp-0 rot-matrix uvec)) + (f0-13 (sv-992 sv-1008 a1-22 a2-4 a3-1)) + ) + (vector+float*! sv-692 sv-692 (-> s0-0 ground-normal) f0-13) + ) + (vector+! sv-692 sv-692 sv-640) + ) + 0.0 + (let ((f28-0 (* 2457.6 (-> gp-0 scale))) + (v0-9 (vector<-cspace! (new 'stack-no-clear 'vector) (-> gp-0 node-list data 3))) + ) + (set! sv-1024 (new 'stack-no-clear 'vector)) + (set! sv-1040 (new 'stack-no-clear 'vector)) + (vector+float*! v0-9 v0-9 (-> gp-0 rot-matrix uvec) 3072.0) + (let ((f28-1 (+ 3072.0 f28-0))) + (when (< (vector-line-distance-point! + sv-692 + v0-9 + (vector+! (new 'stack-no-clear 'vector) v0-9 (-> gp-0 rot-matrix fvec)) + sv-1024 + ) + f28-1 + ) + (vector-! sv-1040 sv-692 sv-1024) + (vector-normalize! sv-1040 f28-1) + (let ((v1-64 sv-692)) + (.mov.vf vf6 vf0 :mask #b1000) + (.lvf vf4 (&-> sv-1024 quad)) + (.lvf vf5 (&-> sv-1040 quad)) + (.add.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> v1-64 quad) vf6) + ) + 0 + ) + ) + ) + (vector-seek! + (-> s0-0 ground-pos) + sv-692 + (* (fmax 61440.0 (* 1.2 (vector-length (-> s3-0 transv)))) (seconds-per-frame)) + ) + (let ((t9-13 (method-of-object sv-1056 set-ik-target!)) + (a1-33 (-> s0-0 ground-pos)) + ) + (t9-13 sv-1056 a1-33) + ) + ) + ) + ) + (let ((s2-1 (new 'stack-no-clear 'vector))) + (let ((s1-1 (new 'stack-no-clear 'vector))) + (vector-reset! s2-1) + (vector-reset! s1-1) + (dotimes (s0-1 4) + (vector+! s2-1 s2-1 (the-as vector (-> gp-0 foot s0-1))) + (when (> s0-1 0) + (set! sv-1072 + (vector-normalize! + (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> gp-0 foot s0-1)) (the-as vector (-> gp-0 foot))) + 1.0 + ) + ) + (set! sv-1088 (new 'stack-no-clear 'vector)) + (let ((v1-83 (-> gp-0 rot-matrix uvec)) + (a0-46 sv-1072) + ) + (.lvf vf1 (&-> v1-83 quad)) + (.lvf vf2 (&-> a0-46 quad)) + ) + (.outer.product.a.vf acc vf1 vf2) + (.outer.product.b.vf vf3 vf2 vf1 acc) + (.svf (&-> sv-1088 quad) vf3) + (vector-normalize! sv-1088 1.0) + (let ((a1-41 s1-1) + (v1-85 s1-1) + (a0-48 (new 'stack-no-clear 'vector)) + ) + (.lvf vf1 (&-> sv-1072 quad)) + (.lvf vf2 (&-> sv-1088 quad)) + (.outer.product.a.vf acc vf1 vf2) + (.outer.product.b.vf vf3 vf2 vf1 acc) + (.svf (&-> a0-48 quad) vf3) + (vector+! a1-41 v1-85 a0-48) + ) + ) + ) + (vector-float*! s2-1 s2-1 0.25) + (vector-normalize-copy! (-> gp-0 gspot-normal) s1-1 1.0) + ) + (when (logtest? (-> gp-0 flags) (gekko-flag follow-terrain)) + (set! (-> gp-0 root gspot-pos quad) (-> s2-1 quad)) + (let ((a2-15 (vector-! (new 'stack-no-clear 'vector) s2-1 (-> s3-0 trans)))) + (vector+float*! + (-> s3-0 trans) + (-> s3-0 trans) + (-> gp-0 rot-matrix uvec) + (* 0.9 (vector-dot a2-15 (-> gp-0 rot-matrix uvec))) + ) + ) + ) + ) + (when (logtest? (-> gp-0 flags) (gekko-flag update-tilt)) + (let ((s2-2 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> s3-0 quat))) + (a2-18 (quaternion-from-two-vectors-max-angle-partial! + (new 'stack-no-clear 'quaternion) + (-> gp-0 rot-matrix uvec) + (-> gp-0 gspot-normal) + 21845.334 + (* 8.0 (seconds-per-frame)) + ) + ) + (s1-2 (new 'stack-no-clear 'vector)) + ) + (quaternion-slerp! (-> gp-0 tilt-quat) (-> gp-0 tilt-quat) a2-18 1.0) + (vector-orient-by-quat! s1-2 (-> gp-0 rot-matrix uvec) (-> gp-0 tilt-quat)) + (forward-up-nopitch->quaternion (-> s3-0 quat) s2-2 s1-2) + ) + ) + ) + (dotimes (s3-1 4) + (set! sv-976 (-> arg1 data (-> *gekko-ik-setup* s3-1 effector-index))) + (set! sv-980 (the-as gekko-foot-info (+ (the-as uint (-> gp-0 foot 0 foot-transform)) (* 96 s3-1)))) + (set! sv-984 (new 'stack-no-clear 'vector)) + (set! sv-988 (new 'stack-no-clear 'vector)) + (quaternion-from-two-vectors! + (the-as quaternion sv-988) + (-> gp-0 rot-matrix uvec) + (the-as vector (+ (the-as uint (-> gp-0 foot 0 ground-normal)) (* 96 s3-1))) + ) + (vector<-cspace! (-> sv-980 ground-pos) sv-976) + (matrix->quaternion (the-as quaternion sv-984) (-> sv-976 bone transform)) + (quaternion*! + (the-as quaternion (-> sv-980 ground-normal)) + (the-as quaternion sv-988) + (the-as quaternion sv-984) + ) + ) + (logclear! (-> gp-0 skel status) (joint-control-status no-joint-callbacks)) + (draw-control-method-14 arg0 arg1 (-> gp-0 skel)) + (logior! (-> gp-0 skel status) (joint-control-status no-joint-callbacks)) + ) + 0 + 0 + (none) + ) + ) + +;; definition for function gekko-postbind-callback +(defun gekko-postbind-callback ((arg0 draw-control) (arg1 cspace-array) (arg2 joint-control)) + (gekko-postbind arg0 arg1) + (none) + ) + +;; definition for method 203 of type gekko +;; WARN: Return type mismatch int vs none. +(defmethod gekko-method-203 ((this gekko)) + ((-> (method-of-type nav-enemy hostile) trans)) + (when (< (vector-vector-xz-distance (-> this root trans) (-> this move-dest)) 8192.0) + (let* ((s5-0 (-> this focus-pos)) + (v1-6 (vector-! (new 'stack-no-clear 'vector) s5-0 (-> this root trans))) + (f30-0 (sqrtf (+ (* (-> v1-6 x) (-> v1-6 x)) (* (-> v1-6 z) (-> v1-6 z))))) + ) + (cond + ((and (get-focus! this) (and (and (< f30-0 32768.0) (< 16384.0 f30-0)) (enemy-method-104 this s5-0 6371.5557))) + (go (method-of-object this pre-attack)) + ) + ((< 32768.0 f30-0) + (cond + ((not (enemy-method-104 this s5-0 29127.111)) + (go (method-of-object this turn-quick)) + ) + ((not (enemy-method-104 this s5-0 6371.5557)) + (go (method-of-object this turn)) + ) + ) + ) + ) + ) + (set! (-> this scared-timer) (+ (current-time) (the int (* 300.0 (rnd-float-range this 1.3 2.25))))) + (go-best-state this) + ) + 0 + (none) + ) + +;; definition for method 204 of type gekko +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defmethod gekko-method-204 ((this gekko)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> this root trans quad)) + (let* ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (closest-point-on-mesh (-> this nav) s5-0 s3-0 (the-as nav-poly #f))) + ) + (when (and s4-0 (< (vector-vector-xz-distance s5-0 s3-0) 4096.0)) + (let* ((s3-2 (vector-! (new 'stack-no-clear 'vector) (-> this focus-pos) s5-0)) + (f30-0 (vector-length s3-2)) + (s2-0 (new 'stack 'clamp-travel-vector-to-mesh-return-info)) + ) + (vector-float*! s3-2 s3-2 (/ (* 8192.0 (-> this scale)) f30-0)) + (clamp-vector-to-mesh-no-gaps (-> this nav) s5-0 s4-0 s3-2 s2-0) + (not (-> s2-0 found-boundary)) + ) + ) + ) + ) + (none) + ) + +;; definition for method 107 of type gekko +(defmethod is-pfoc-in-mesh? ((this gekko) (arg0 process-focusable) (arg1 vector)) + (if (and arg0 (not arg1)) + (set! arg1 (get-trans arg0 1)) + ) + (when arg1 + (let* ((f0-0 (-> arg1 y)) + (v1-4 (-> this root)) + (f1-0 (-> v1-4 trans y)) + (a0-2 (-> this fact)) + ) + (when (and (< f0-0 (+ f1-0 (-> a0-2 notice-top))) (< (- f1-0 (-> a0-2 notice-bottom)) f0-0)) + (let* ((f30-0 (if (logtest? (-> this flags) (gekko-flag on-wall?)) + (-> this enemy-info notice-nav-radius) + 8192.0 + ) + ) + (f0-2 f30-0) + ) + (or (>= (* f0-2 f0-2) (vector-vector-xz-distance-squared (-> v1-4 trans) arg1)) + (is-in-mesh? (-> this nav) arg1 f30-0) + ) + ) + ) + ) + ) + ) + +;; definition for method 109 of type gekko +;; INFO: Used lq/sq +(defmethod enemy-method-109 ((this gekko)) + (let ((gp-0 (-> this root)) + (s3-0 (-> this nav state)) + ) + (do-navigation-to-destination s3-0 (-> gp-0 trans)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (cond + ((logtest? (-> s3-0 flags) (nav-state-flag in-mesh)) + (set! (-> s5-0 quad) (-> gp-0 trans quad)) + ) + (else + (if (or (not (closest-point-on-mesh (-> this nav) s5-0 (-> gp-0 trans) (-> s3-0 current-poly))) + (let ((f0-0 16384.0)) + (< (* f0-0 f0-0) (vector-vector-xz-distance-squared s5-0 (-> gp-0 trans))) + ) + (and (and (-> this next-state) (= (-> this next-state name) 'knocked-recover)) + (< (-> gp-0 trans y) (+ -8192.0 (-> s5-0 y))) + (< (+ 12288.0 (-> s5-0 y)) (-> gp-0 trans y)) + ) + ) + (return #t) + ) + ) + ) + ) + ) + #f + ) + +;; definition for method 206 of type gekko +;; WARN: Return type mismatch object vs none. +(defmethod gekko-method-206 ((this gekko)) + (set-look-at-mode! this 2) + (gekko-method-205 this) + (set! (-> this turn-next-state) (method-of-type gekko hostile-wall)) + (go (method-of-object this turn-wall)) + (none) + ) + +;; definition for method 207 of type gekko +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod gekko-method-207 ((this gekko)) + (set-look-at-mode! this 1) + (set! (-> this turn-face-point quad) (-> this focus-pos quad)) + (set! (-> this turn-next-state) (method-of-type gekko attack-wall)) + (go (method-of-object this turn-wall)) + (none) + ) + +;; definition for method 113 of type gekko +(defmethod get-focus! ((this gekko)) + (let* ((t9-0 (method-of-type nav-enemy get-focus!)) + (v0-0 (t9-0 this)) + ) + (cond + ((and v0-0 + (or (logtest? (-> this flags) (gekko-flag on-wall?)) (time-elapsed? (-> this attack-time) (seconds 3))) + ) + (empty) + v0-0 + ) + (else + (the-as process-focusable #f) + ) + ) + ) + ) + +;; definition for method 205 of type gekko +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod gekko-method-205 ((this gekko)) + (cond + ((zero? (-> this path-wall)) + (go process-drawable-art-error "no path-wall") + ) + (else + (let ((s5-0 (-> this path-wall curve num-cverts))) + (if (<= s5-0 0) + (go process-drawable-art-error "no path-wall") + ) + (let ((s2-0 (rnd-int this s5-0)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (countdown (s3-0 s5-0) + (get-point-in-path! (-> this path-wall) s4-0 (the float s2-0) 'interp) + (if (< 8192.0 (vector-vector-xz-distance s4-0 (-> this root trans))) + (goto cfg-11) + ) + (set! s2-0 (mod (+ s2-0 1) s5-0)) + ) + (label cfg-11) + (set! (-> this move-dest quad) (-> s4-0 quad)) + (set! (-> this turn-face-point quad) (-> s4-0 quad)) + ) + ) + (vector-! (-> this dest-to-me-dir) (-> this root trans) (-> this move-dest)) + ) + ) + 0 + (none) + ) + +;; definition for method 108 of type gekko +;; WARN: disable def twice: 33. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod enemy-method-108 ((this gekko) (arg0 process-focusable)) + (or (< (current-time) (-> this scared-timer)) + (let ((v1-4 (handle->process (-> this focus handle)))) + (if v1-4 + (and (or (focus-test? (the-as process-focusable v1-4) disable dead ignore grabbed) + (and (not (logtest? (-> this flags) (gekko-flag on-wall?))) + (not (time-elapsed? (-> this attack-time) (seconds 3))) + ) + ) + (< (vector-vector-distance (-> this focus-pos) (-> this root trans)) 49152.0) + ) + #f + ) + ) + ) + ) + +;; definition for method 85 of type gekko +(defmethod knocked-anim ((this gekko) (arg0 enemy-knocked-info)) + (ja-channel-push! 1 0) + (cond + ((logtest? (-> this flags) (gekko-flag falling-off-wall?)) + (let ((a0-2 (-> this skel root-channel 0))) + (set! (-> a0-2 frame-group) (the-as art-joint-anim (-> this draw art-group data 23))) + (set! (-> a0-2 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 23)) 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 23)) 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 29))) + (set! (-> a0-3 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 29)) 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 29)) num-func-seek!) + ) + ) + ) + #t + ) + +;; definition for method 86 of type gekko +(defmethod knocked-land-anim ((this gekko) (arg0 enemy-knocked-info)) + (let ((v1-2 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (cond + ((and v1-2 (= v1-2 (-> this draw art-group data 23))) + (let ((v1-7 (-> this skel root-channel 0))) + (set! (-> v1-7 frame-group) (the-as art-joint-anim (-> this draw art-group data 18))) + (set! (-> v1-7 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 18)) frames num-frames) -1)) + ) + (set! (-> v1-7 param 1) (-> arg0 anim-speed)) + (set! (-> v1-7 frame-num) 0.0) + (joint-control-channel-group! v1-7 (the-as art-joint-anim (-> this draw art-group data 18)) num-func-seek!) + ) + ) + ((= (-> this hit-points) 0.0) + (let ((v1-11 (-> this skel root-channel 0))) + (set! (-> v1-11 frame-group) (the-as art-joint-anim (-> this draw art-group data 31))) + (set! (-> v1-11 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 31)) 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 31)) num-func-seek!) + ) + ) + (else + (let ((v1-15 (-> this skel root-channel 0))) + (set! (-> v1-15 frame-group) (the-as art-joint-anim (-> this draw art-group data 30))) + (set! (-> v1-15 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 30)) frames num-frames) -1)) + ) + (set! (-> v1-15 param 1) (-> arg0 anim-speed)) + (set! (-> v1-15 frame-num) 0.0) + (joint-control-channel-group! v1-15 (the-as art-joint-anim (-> this draw art-group data 30)) num-func-seek!) + ) + ) + ) + ) + #t + ) + +;; definition for method 78 of type gekko +(defmethod go-hostile ((this gekko)) + (if (logtest? (-> this flags) (gekko-flag on-wall?)) + (gekko-method-206 this) + (go (method-of-object this hostile)) + ) + ) + +;; definition for method 54 of type gekko +;; INFO: Used lq/sq +(defmethod get-knockback-dir! ((this gekko) (arg0 vector)) + (local-vars (v1-2 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set! (-> arg0 quad) (-> this incoming attack-direction quad)) + (.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-2 vf1) + (when (= v1-2 0.0) + (vector-z-quaternion! arg0 (-> this root quat)) + (vector-negate-in-place! arg0) + ) + (vector-flatten! arg0 arg0 (-> this rot-matrix uvec)) + (vector-normalize! arg0 1.0) + ) + ) + +;; definition for method 56 of type gekko +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs object. +(defmethod knocked-handler ((this gekko) (arg0 vector)) + (get-knockback-dir! this arg0) + (let ((s4-0 (-> this enemy-info)) + (f28-0 0.0) + (f30-0 0.0) + ) + (let ((v1-2 (-> this incoming knocked-type))) + (set! f30-0 (cond + ((= v1-2 (knocked-type explode-or-darkjak)) + (let ((f30-1 (rnd-float-range this 0.0 1.0))) + (set! f28-0 (lerp (-> s4-0 knocked-hard-vxz-lo) (-> s4-0 knocked-hard-vxz-hi) f30-1)) + (lerp (-> s4-0 knocked-hard-vy-lo) (-> s4-0 knocked-hard-vy-hi) f30-1) + ) + ) + ((= v1-2 (knocked-type mech-punch)) + (let ((f30-2 (rnd-float-range this 0.0 1.0))) + (set! f28-0 (lerp (-> s4-0 knocked-medium-vxz-lo) (-> s4-0 knocked-medium-vxz-hi) f30-2)) + (lerp (-> s4-0 knocked-medium-vy-lo) (-> s4-0 knocked-medium-vy-hi) f30-2) + ) + ) + ((= v1-2 (knocked-type dark-shot)) + (let ((f30-3 (rnd-float-range this 0.0 1.0))) + (set! f28-0 (lerp (-> s4-0 knocked-huge-vxz-lo) (-> s4-0 knocked-huge-vxz-hi) f30-3)) + (lerp (-> s4-0 knocked-huge-vy-lo) (-> s4-0 knocked-huge-vy-hi) f30-3) + ) + ) + ((= v1-2 (knocked-type yellow-shot)) + (vector-rotate90-around-y! arg0 arg0) + (let ((v1-12 (new 'stack-no-clear 'vector))) + (vector-! v1-12 (-> this incoming attacker-pos) (-> this root trans)) + (set! (-> v1-12 y) 0.0) + (if (< 0.0 (vector-dot v1-12 arg0)) + (vector-negate! arg0 arg0) + ) + ) + (let ((f30-4 (rnd-float-range this 0.0 1.0))) + (set! f28-0 (lerp (-> s4-0 knocked-yellow-vxz-lo) (-> s4-0 knocked-yellow-vxz-hi) f30-4)) + (lerp (-> s4-0 knocked-yellow-vy-lo) (-> s4-0 knocked-yellow-vy-hi) f30-4) + ) + ) + ((= v1-2 (knocked-type red-shot)) + (let* ((f1-2 (vector-vector-xz-distance-squared (target-pos 0) (-> this root trans))) + (f0-18 1.0) + (f2-0 61440.0) + (f1-3 (fmin f1-2 (* f2-0 f2-0))) + (f2-3 61440.0) + (f30-6 (* (- f0-18 (/ f1-3 (* f2-3 f2-3))) (rnd-float-range this 0.8 1.0))) + ) + (set! f28-0 (lerp (-> s4-0 knocked-red-vxz-lo) (-> s4-0 knocked-red-vxz-hi) f30-6)) + (lerp (-> s4-0 knocked-red-vy-lo) (-> s4-0 knocked-red-vy-hi) f30-6) + ) + ) + ((= v1-2 (knocked-type blue-shot)) + (let* ((f1-5 (vector-vector-xz-distance-squared (target-pos 0) (-> this root trans))) + (f0-24 1.0) + (f2-6 122880.0) + (f1-6 (fmin f1-5 (* f2-6 f2-6))) + (f2-9 122880.0) + (f26-0 (* (- f0-24 (/ f1-6 (* f2-9 f2-9))) (rnd-float-range this 0.8 1.0))) + ) + (set! f28-0 (lerp (-> s4-0 knocked-blue-vxz-lo) (-> s4-0 knocked-blue-vxz-hi) f26-0)) + (cond + ((>= (the-as uint 4) (-> this incoming blue-juggle-count)) + (lerp (-> s4-0 knocked-blue-vy-lo) (-> s4-0 knocked-blue-vy-hi) f26-0) + ) + (else + (if (zero? (rnd-int this 3)) + (set! f30-0 40960.0) + ) + f30-0 + ) + ) + ) + ) + ((= v1-2 (knocked-type vehicle)) + (set! (-> arg0 quad) (-> this incoming attack-direction quad)) + f30-0 + ) + (else + (let ((f30-7 (rnd-float-range this 0.0 1.0))) + (set! f28-0 (lerp (-> s4-0 knocked-soft-vxz-lo) (-> s4-0 knocked-soft-vxz-hi) f30-7)) + (lerp (-> s4-0 knocked-soft-vy-lo) (-> s4-0 knocked-soft-vy-hi) f30-7) + ) + ) + ) + ) + ) + (vector-float*! arg0 arg0 f28-0) + (vector-flatten! arg0 arg0 (-> this rot-matrix uvec)) + (vector+float*! arg0 arg0 (-> this rot-matrix uvec) f30-0) + ) + ) + +;; definition for method 103 of type gekko +;; INFO: Used lq/sq +(defmethod enemy-method-103 ((this gekko) (arg0 vector) (arg1 float)) + (let ((s4-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> arg0 quad)) + (vector-flatten! s4-0 s4-0 (-> this rot-matrix uvec)) + (vector-normalize! s4-0 1.0) + (vector-flatten! s5-0 s5-0 (-> this rot-matrix uvec)) + (vector-normalize! s5-0 1.0) + (>= (vector-dot s4-0 s5-0) (cos arg1)) + ) + ) + +;; definition for method 125 of type gekko +(defmethod ragdoll-settled? ((this gekko)) + (local-vars (v1-18 gekko-shadow-spot)) + (let ((s5-0 (handle->process (-> this ragdoll-proc)))) + (or (not s5-0) + (or (ragdoll-proc-method-19 (the-as ragdoll-proc s5-0)) + (and (time-elapsed? (-> this state-time) (seconds 2)) + (< (vector-length (-> (the-as ragdoll-proc s5-0) ragdoll ragdoll-joints 0 velocity)) + (* 49152.0 (seconds-per-frame)) + ) + (< (cos (* 16384.0 (seconds-per-frame))) (-> (the-as ragdoll-proc s5-0) ragdoll rotate-vel w)) + (begin (set! v1-18 (-> this shadow-spot)) (< (- (-> this root trans y) (-> v1-18 position y)) 6144.0)) + (>= (fabs (vector-dot (-> v1-18 normal) *y-vector*)) + (-> *pat-mode-info* (shr (shl (-> v1-18 pat) 54) 61) wall-angle) + ) + ) + ) + ) + ) + ) + +;; definition for method 208 of type gekko +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod gekko-method-208 ((this gekko)) + (dotimes (s5-0 4) + (let ((s4-0 (-> this foot s5-0)) + (s3-0 (-> *gekko-ik-setup* s5-0)) + ) + (set! (-> s4-0 ground-normal quad) (-> this rot-matrix uvec quad)) + (vector<-cspace! (-> s4-0 ground-pos) (-> this node-list data (-> s3-0 hand-index))) + (vector+float*! (-> s4-0 ground-pos) (-> s4-0 ground-pos) (-> s4-0 ground-normal) (-> s3-0 hand-dist)) + ) + ) + 0 + (none) + ) + +;; definition for method 110 of type gekko +(defmethod send-attack ((this gekko) (arg0 process) (arg1 touching-shapes-entry) (arg2 uint)) + (sound-play "gekko-impact") + ((method-of-type nav-enemy send-attack) this arg0 arg1 arg2) + ) + +;; definition for method 59 of type gekko +;; INFO: Used lq/sq +(defmethod enemy-common-post ((this gekko)) + (let ((a0-2 (handle->process (-> this focus handle)))) + (if a0-2 + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable a0-2) 3) quad)) + ) + ) + (if (and (nonzero? (-> this path-wall)) (not (logtest? (-> this path-wall flags) (path-control-flag not-found)))) + (debug-draw (-> this path-wall)) + ) + (gekko-method-202 this) + ((method-of-type nav-enemy enemy-common-post) this) + (none) + ) + +;; definition for method 202 of type gekko +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod gekko-method-202 ((this gekko)) + (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)) + (s5-0 (vector-negate! (new 'stack-no-clear 'vector) (-> this rot-matrix uvec))) + (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-10 s4-0)) + (set! (-> v1-10 radius) 3276.8) + (set! (-> v1-10 collide-with) (collide-spec backgnd)) + (set! (-> v1-10 ignore-process0) this) + (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)) + ) + (let ((f28-0 (fill-and-probe-using-line-sphere *collide-cache* s4-0))) + (cond + ((>= f28-0 0.0) + (let ((v1-14 (-> this draw shadow-ctrl))) + (logclear! (-> v1-14 settings flags) (shadow-flags disable-draw)) + ) + 0 + (set! (-> this shadow-spot valid?) #t) + (let ((s3-0 (-> s4-0 best-other-tri))) + (let ((v1-18 (vector+float*! (new 'stack-no-clear 'vector) (-> s4-0 start-pos) (-> s4-0 move-dist) f28-0))) + (set! (-> this shadow-spot position quad) (-> s3-0 intersect quad)) + (vector-! (-> this shadow-spot normal) v1-18 (-> s3-0 intersect)) + ) + (vector-normalize! (-> this shadow-spot normal) 1.0) + (set! (-> this shadow-spot pat) (the-as uint (-> s3-0 pat))) + ) + (let ((a1-10 (-> this root trans)) + (f0-3 (* f28-0 f30-0)) + ) + (shadow-control-method-14 + (-> this draw shadow-ctrl) + a1-10 + s5-0 + (fmax 32768.0 (* 409600.0 f28-0)) + (+ -12288.0 f0-3) + (+ 12288.0 f0-3) + ) + ) + ) + (else + (let ((v1-29 (-> this draw shadow-ctrl))) + (logior! (-> v1-29 settings flags) (shadow-flags disable-draw)) + ) + 0 + (set! (-> this shadow-spot valid?) #f) + ) + ) + ) + ) + ) + (else + (let ((v1-33 (-> this draw shadow-ctrl))) + (logior! (-> v1-33 settings flags) (shadow-flags disable-draw)) + ) + 0 + (set! (-> this shadow-spot valid?) #f) + ) + ) + 0 + (none) + ) + +;; definition for method 50 of type gekko +;; WARN: Return type mismatch int vs none. +(defmethod enemy-method-50 ((this gekko) (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 0)) + (a0-4 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 7)) + ) + (set! (-> v1-4 prim-core action) (collide-action)) + (set! (-> a0-4 prim-core action) (collide-action)) + (set! (-> v1-4 prim-core collide-as) (collide-spec)) + (set! (-> a0-4 prim-core collide-as) (collide-spec)) + ) + 0 + ) + ((= v1-0 1) + (let ((v1-8 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 0))) + (set! (-> v1-8 prim-core action) (collide-action solid deadly)) + (set! (-> v1-8 prim-core collide-as) (collide-spec enemy)) + ) + ) + ((= v1-0 3) + (let ((v1-12 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 0)) + (a0-9 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 7)) + ) + (set! (-> v1-12 prim-core action) (collide-action solid deadly)) + (set! (-> a0-9 prim-core action) (collide-action solid deadly)) + (set! (-> v1-12 prim-core collide-as) (collide-spec enemy)) + (set! (-> a0-9 prim-core collide-as) (collide-spec enemy)) + ) + ) + ) + ) + (none) + ) + +;; definition for method 82 of type gekko +(defmethod event-handler ((this gekko) (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 (logtest? (-> this flags) (gekko-flag on-wall?)) + (go (method-of-object this knocked-wall)) + (go (method-of-object this knocked)) + ) + #t + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 67 of type gekko +(defmethod coin-flip? ((this gekko)) + #f + ) + +;; definition for method 7 of type gekko +(defmethod relocate ((this gekko) (offset int)) + (dotimes (v1-0 4) + (if (nonzero? (-> this foot v1-0 leg-ik)) + (&+! (-> this foot v1-0 leg-ik) offset) + ) + ) + (if (nonzero? (-> this path-wall)) + (&+! (-> this path-wall) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 121 of type gekko +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this gekko)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-gekko" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *gekko-nav-enemy-info*) + (set! (-> this scale) (rnd-float-range this 1.15 1.35)) + (let ((f0-1 (-> this scale))) + (set-vector! (-> this root scale) f0-1 f0-1 f0-1 1.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! (-> v1-9 max-dist) 167936.0) + (set-vector! (-> v1-9 twist-max) 11832.889 15473.777 0.0 1.0) + (set! (-> v1-9 ignore-angle) 16384.0) + ) + (set! (-> this align) (new 'process 'align-control this)) + (set! (-> this path-wall) (new 'process 'path-control this 'wall 0.0 (the-as entity #f) #t)) + (if (nonzero? (-> this path-wall)) + (logior! (-> this path-wall flags) (path-control-flag display draw-line draw-point draw-text)) + ) + (dotimes (s5-1 4) + (let ((s4-1 (-> this foot s5-1))) + (set! (-> s4-1 leg-ik) + (new 'process 'joint-mod-ik this (-> *gekko-ik-setup* s5-1 elbow-index) (-> *gekko-ik-setup* s5-1 hand-dist)) + ) + (set! (-> s4-1 leg-ik user-float) (the float s5-1)) + (set! (-> s4-1 leg-ik elbow-pole-vector-axis) (the-as uint 2)) + (set! (-> s4-1 leg-ik elbow-rotation-axis) (the-as uint 0)) + (let ((a0-18 (-> this node-list data (-> *gekko-ik-setup* s5-1 effector-index)))) + (set! (-> a0-18 param0) gekko-foot-rot-handler) + (set! (-> a0-18 param1) this) + (set! (-> a0-18 param2) (the-as basic s4-1)) + ) + (set! (-> s4-1 foot-transform scale quad) (-> *identity-vector* quad)) + ) + ) + (logior! (-> this foot 2 leg-ik flags) (joint-mod-ik-flags elbow-trans-neg)) + (logior! (-> this foot 3 leg-ik flags) (joint-mod-ik-flags elbow-trans-neg)) + (logior! (-> this foot 0 leg-ik flags) (joint-mod-ik-flags elbow-rot-neg)) + (logior! (-> this foot 1 leg-ik flags) (joint-mod-ik-flags elbow-rot-neg)) + (set! (-> this skel postbind-function) gekko-postbind-callback) + (logior! (-> this skel status) (joint-control-status no-joint-callbacks)) + (quaternion-rotate-local-y! + (-> this root quat) + (-> this root quat) + (* 182.04445 (rnd-float-range this 170.0 190.0)) + ) + (quaternion-copy! (-> this tilt-quat) *unity-quaternion*) + (set! (-> this scared-timer) 0) + (set! (-> this root pause-adjust-distance) 368640.0) + (let ((s5-3 (new 'stack-no-clear 'vector)) + (s4-3 (vector-y-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + ) + (dotimes (s3-1 4) + (vector-orient-by-quat! s5-3 (the-as vector (-> *gekko-foot-offset* s3-1)) (-> this root quat)) + (vector+float*! (the-as vector (-> this foot s3-1)) (-> this root trans) s5-3 (-> this scale)) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> this foot 0 ground-normal)) (* 96 s3-1)))) + (-> s4-3 quad) + ) + ) + ) + (logior! (-> this flags) (gekko-flag update-foot-position? follow-terrain update-tilt on-wall?)) + (set! (-> this probe-len) 24576.0) + 0 + (none) + ) + +;; definition for method 89 of type gekko +(defmethod within-gspot-range? ((this gekko)) + (let ((s5-0 (-> this root)) + (a1-0 (new 'stack-no-clear 'collide-query)) + (gp-0 #t) + ) + (when (find-ground + s5-0 + a1-0 + (-> this enemy-info recover-gnd-collide-with) + 8192.0 + 81920.0 + 1024.0 + (the-as process #f) + ) + (let ((f0-1 (- (-> s5-0 trans y) (-> s5-0 gspot-pos y)))) + (if (and (>= f0-1 -4096.0) (>= 8192.0 f0-1)) + (set! gp-0 #f) + ) + ) + ) + gp-0 + ) + ) + +;; definition of type gecko +(deftype gecko (gekko) + () + ) + +;; definition for method 3 of type gecko +(defmethod inspect ((this gecko)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type gekko inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 diff --git a/test/decompiler/reference/jak3/levels/mine/manta_REF.gc b/test/decompiler/reference/jak3/levels/mine/manta_REF.gc new file mode 100644 index 0000000000..b9b33940c6 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mine/manta_REF.gc @@ -0,0 +1,2077 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type manta +(deftype manta (nav-enemy) + ((info rigid-body-object-constants) + (move-matrix matrix :inline) + (curve-matrix matrix :inline) + (move-vel vector :inline) + (move-u float) + (move-du float) + (move-force float) + (flags manta-flags) + (go-enable symbol) + (orbit-speed float) + (max-time-step float) + (gravity float) + (landed-pos vector :inline) + (dest-pos vector :inline) + (attack-pos vector :inline) + (up-dir vector :inline) + (forward-dir vector :inline) + (knocked-force vector :inline) + (knocked-force-mult float) + (default-y-offset float) + (y-offset float) + (last-attack-time time-frame) + (attack-y-offset float) + (attack-path-blocked-time time-frame) + (track-timer time-frame) + (angle-to-player float) + (offset-difference float) + (sound-volume float) + (restart-fly-anims symbol) + (fly-anim-speed float) + (hit-ground-count uint32) + (fade-level float) + (pad uint8 8) + ) + (:state-methods + land-approach + land + notice-to-fly + attack + attack-end + ) + (:methods + (manta-method-195 (_type_) none) + (manta-method-196 (_type_) symbol) + (manta-method-197 (_type_) none) + (manta-method-198 (_type_) none) + (manta-method-199 (_type_) none) + (manta-method-200 (_type_) none) + (manta-method-201 (_type_ float) none) + (do-impact (_type_) none) + (manta-method-203 (_type_ float) none) + (manta-method-204 (_type_) none) + (update-target-pos! (_type_) none) + (manta-method-206 (_type_) none) + (alloc-rbody! (_type_ rigid-body-object-constants) none) + (manta-method-208 (_type_) none) + ) + ) + +;; definition for method 3 of type manta +(defmethod inspect ((this manta)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tinfo: #~%" (-> this info)) + (format #t "~2Tmove-matrix: #~%" (-> this move-matrix)) + (format #t "~2Tcurve-matrix: #~%" (-> this curve-matrix)) + (format #t "~2Tmove-vel: #~%" (-> this move-vel)) + (format #t "~2Tmove-u: ~f~%" (-> this move-u)) + (format #t "~2Tmove-du: ~f~%" (-> this move-du)) + (format #t "~2Tmove-force: ~f~%" (-> this move-force)) + (format #t "~2Tflags: ~D~%" (-> this flags)) + (format #t "~2Tgo-enable: ~A~%" (-> this go-enable)) + (format #t "~2Torbit-speed: ~f~%" (-> this orbit-speed)) + (format #t "~2Tmax-time-step: ~f~%" (-> this max-time-step)) + (format #t "~2Tgravity: ~f~%" (-> this gravity)) + (format #t "~2Tlanded-pos: #~%" (-> this landed-pos)) + (format #t "~2Tdest-pos: #~%" (-> this dest-pos)) + (format #t "~2Tattack-pos: #~%" (-> this attack-pos)) + (format #t "~2Tup-dir: #~%" (-> this up-dir)) + (format #t "~2Tforward-dir: #~%" (-> this forward-dir)) + (format #t "~2Tknocked-force: #~%" (-> this knocked-force)) + (format #t "~2Tknocked-force-mult: ~f~%" (-> this knocked-force-mult)) + (format #t "~2Tdefault-y-offset: ~f~%" (-> this default-y-offset)) + (format #t "~2Ty-offset: ~f~%" (-> this y-offset)) + (format #t "~2Tlast-attack-time: ~D~%" (-> this last-attack-time)) + (format #t "~2Tattack-y-offset: ~f~%" (-> this attack-y-offset)) + (format #t "~2Tattack-path-blocked-time: ~D~%" (-> this attack-path-blocked-time)) + (format #t "~2Ttrack-timer: ~D~%" (-> this track-timer)) + (format #t "~2Tangle-to-player: ~f~%" (-> this angle-to-player)) + (format #t "~2Toffset-difference: ~f~%" (-> this offset-difference)) + (format #t "~2Tsound-volume: ~f~%" (-> this sound-volume)) + (format #t "~2Trestart-fly-anims: ~A~%" (-> this restart-fly-anims)) + (format #t "~2Tfly-anim-speed: ~f~%" (-> this fly-anim-speed)) + (format #t "~2Thit-ground-count: ~D~%" (-> this hit-ground-count)) + (format #t "~2Tfade-level: ~f~%" (-> this fade-level)) + (format #t "~2Tactor-group: #x~X~%" (-> this actor-group)) + (dotimes (s5-0 (-> this actor-group-count)) + (format #t "~T [~D]~2Tactor-group: ~`actor-group`P~%" s5-0 (-> this actor-group s5-0)) + ) + (format #t "~2Tactor-group-count: ~D~%" (-> this actor-group-count)) + (label cfg-7) + this + ) + +;; definition for symbol *manta-rigid-body-constants*, type rigid-body-object-constants +(define *manta-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 '*manta-rigid-body-constants* + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-manta manta manta-lod0-jg manta-idle0-ja + ((manta-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :shadow manta-shadow-mg + :shadow-joint-index 3 + ) + +;; definition for symbol *fact-info-manta-defaults*, type fact-info-enemy-defaults +(define *fact-info-manta-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9) + ) + +;; definition for symbol *manta-nav-enemy-info*, type nav-enemy-info +(define *manta-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 #t + :idle-anim-script #f + :idle-anim 3 + :notice-anim 5 + :hostile-anim 8 + :hit-anim 13 + :knocked-anim 13 + :knocked-land-anim 13 + :die-anim 19 + :die-falling-anim 17 + :victory-anim 3 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 6 + :look-at-joint 6 + :bullseye-joint 3 + :sound-hit (static-sound-name "manta-impact") + :notice-distance (meters 60) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 15) + :default-hit-points 3.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 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 81920.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 -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 8 + :turn-anim -1 + :run-anim -1 + :taunt-anim -1 + :run-travel-speed (meters 12) + :run-acceleration (meters 0.2) + :run-turning-acceleration (meters 8) + :walk-travel-speed (meters 4) + :walk-acceleration (meters 0.1) + :walk-turning-acceleration (meters 4) + :maximum-rotation-rate (degrees 1440) + :notice-nav-radius (meters 3) + :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! (-> *manta-nav-enemy-info* fact-defaults) *fact-info-manta-defaults*) + +;; definition for method 120 of type manta +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this manta)) + (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)) + (set! (-> s4-0 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action semi-solid deadly)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 13107.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 enemy)) + (set! (-> v1-13 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-13 prim-core action) (collide-action semi-solid)) + (set-vector! (-> v1-13 local-sphere) 0.0 4096.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 enemy)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot player-list)) + (set-vector! (-> v1-15 local-sphere) 0.0 -4096.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-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 0.0 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) 6) + (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 deadly)) + (set! (-> v1-21 transform-index) 10) + (set-vector! (-> v1-21 local-sphere) 0.0 0.0 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 deadly)) + (set! (-> v1-23 transform-index) 12) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 2048.0) + ) + (set! (-> s5-0 nav-radius) 6144.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! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for function manta-hostile-post +;; INFO: Used lq/sq +(defbehavior manta-hostile-post manta () + (update-target-pos! self) + (let* ((s4-0 (-> self root)) + (s3-0 (-> self focus-pos)) + (gp-1 (vector-! (new 'stack-no-clear 'vector) (-> s4-0 trans) s3-0)) + ) + (set! (-> gp-1 y) 0.0) + (vector-xz-normalize! gp-1 1.0) + (vector-rotate-y! gp-1 gp-1 (* (-> self orbit-speed) (seconds-per-frame))) + (vector-xz-normalize! gp-1 81920.0) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (set! (-> s2-0 quad) (-> s4-0 trans quad)) + (let ((s5-0 (-> self dest-pos))) + (closest-point-on-mesh (-> self nav) s2-0 (-> s4-0 trans) (the-as nav-poly #f)) + (cond + ((< (vector-vector-xz-distance (-> s4-0 trans) s2-0) 4096.0) + (vector+! s5-0 s3-0 gp-1) + (closest-point-on-mesh (-> self nav) s5-0 s5-0 (the-as nav-poly #f)) + ) + (else + (vector+! + s5-0 + (-> s4-0 trans) + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) s2-0 (-> s4-0 trans)) 32768.0) + ) + ) + ) + (let ((v1-15 (-> self nav state))) + (logclear! (-> v1-15 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-15 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-15 target-pos quad) (-> s5-0 quad)) + ) + ) + ) + 0 + (let ((s5-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (vector-normalize! gp-1 -1.0) + (set! (-> self angle-to-player) (acos (vector-dot s5-1 gp-1))) + ) + ) + 0 + (set! (-> self dest-pos y) (+ (-> self root gspot-pos y) (-> self y-offset))) + (set! (-> self offset-difference) (- (-> self dest-pos y) (-> self root trans y))) + (vector-! (-> self forward-dir) (-> self focus-pos) (-> self root trans)) + (vector-normalize! (-> self forward-dir) 1.0) + (set! (-> self up-dir quad) (-> *y-vector* quad)) + (manta-method-200 self) + (do-impact self) + (manta-method-203 self -4096.0) + (nav-enemy-travel-post) + (none) + ) + +;; definition for function manta-attack-post +(defbehavior manta-attack-post manta () + (update-target-pos! self) + (set! (-> self offset-difference) (- (-> self root trans y) (-> self attack-pos y))) + (if (time-elapsed? (-> self attack-path-blocked-time) (seconds 1)) + (manta-method-195 self) + ) + (when (logtest? (enemy-flag ef37) (-> self enemy-flags)) + (let ((s2-0 (-> self curve-matrix)) + (f0-2 (-> self move-u)) + (a1-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (a0-4 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (gp-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 x) 0.0) + (set! (-> s5-0 y) 0.0) + (set! (-> s5-0 z) 4096.0) + (set! (-> s5-0 w) 1.0) + (set-vector! a1-0 (* f0-2 f0-2 f0-2) (* f0-2 f0-2) f0-2 1.0) + (set-vector! s3-0 (* 3.0 f0-2 f0-2) (* 2.0 f0-2) 1.0 0.0) + (vector-matrix*! a0-4 a1-0 s2-0) + (vector-matrix*! s4-0 s3-0 s2-0) + (let ((s3-1 (new 'stack-no-clear 'vector))) + (let ((f0-6 4.0)) + (vector-float*! gp-0 s4-0 f0-6) + ) + (vector-orient-by-quat! s3-1 s5-0 (-> self root quat)) + (vector+! s3-1 s3-1 (-> self root trans)) + (apply-impact! (-> self rbody) s3-1 gp-0) + ) + ) + (seek! (-> self move-u) 1.0 (* (-> self move-du) (seconds-per-frame))) + ) + (do-impact self) + (manta-method-203 self -4096.0) + (nav-enemy-simple-post) + (none) + ) + +;; definition for function manta-fly-code +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior manta-fly-code manta () + (cond + ((-> self restart-fly-anims) + (ja-channel-push! 3 (seconds 0.2)) + (ja :group! manta-flap-ja) + (let ((v1-6 (-> self skel root-channel 1))) + (let ((f0-0 0.0)) + (set! (-> v1-6 frame-interp 1) f0-0) + (set! (-> v1-6 frame-interp 0) f0-0) + ) + (set! (-> v1-6 frame-group) (the-as art-joint-anim manta-flap-fast-ja)) + ) + (let ((v1-9 (-> self skel root-channel 2))) + (let ((f0-1 0.0)) + (set! (-> v1-9 frame-interp 1) f0-1) + (set! (-> v1-9 frame-interp 0) f0-1) + ) + (set! (-> v1-9 frame-group) (the-as art-joint-anim manta-flap-back-ja)) + ) + (set! (-> self restart-fly-anims) #f) + ) + (else + (ja :group! manta-flap-ja) + (let ((v1-16 (-> self skel root-channel 1))) + (let ((f0-2 0.0)) + (set! (-> v1-16 frame-interp 1) f0-2) + (set! (-> v1-16 frame-interp 0) f0-2) + ) + (set! (-> v1-16 frame-group) (the-as art-joint-anim manta-flap-fast-ja)) + ) + (let ((v1-19 (-> self skel root-channel 2))) + (let ((f0-3 0.0)) + (set! (-> v1-19 frame-interp 1) f0-3) + (set! (-> v1-19 frame-interp 0) f0-3) + ) + (set! (-> v1-19 frame-group) (the-as art-joint-anim manta-flap-back-ja)) + ) + ) + ) + (until #f + (until (ja-done? 0) + (set! (-> self go-enable) #t) + (suspend) + (set! (-> self go-enable) #f) + (let ((a0-19 (-> self skel root-channel 0))) + (let ((f0-4 1.0)) + (set! (-> a0-19 frame-interp 1) f0-4) + (set! (-> a0-19 frame-interp 0) f0-4) + ) + (set! (-> a0-19 param 0) (the float (+ (-> a0-19 frame-group frames num-frames) -1))) + (set! (-> a0-19 param 1) (-> self fly-anim-speed)) + (joint-control-channel-group-eval! a0-19 (the-as art-joint-anim #f) num-func-seek!) + ) + (let* ((f30-0 (lerp-scale 0.0 1.0 (-> self fly-anim-speed) 1.0 1.5)) + (gp-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> self root transv) 1.0)) + (f28-0 (vector-dot (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) gp-0)) + ) + (let ((a0-23 (-> self skel root-channel 1))) + (let ((f0-11 (fmax 0.0 (* f28-0 f30-0)))) + (set! (-> a0-23 frame-interp 1) f0-11) + (set! (-> a0-23 frame-interp 0) f0-11) + ) + (set! (-> a0-23 param 0) 0.0) + (joint-control-channel-group-eval! a0-23 (the-as art-joint-anim #f) num-func-chan) + ) + (let ((a0-24 (-> self skel root-channel 2))) + (let ((f0-14 (fmax 0.0 (* (- 1.0 f28-0) f30-0)))) + (set! (-> a0-24 frame-interp 1) f0-14) + (set! (-> a0-24 frame-interp 0) f0-14) + ) + (set! (-> a0-24 param 0) 0.0) + (joint-control-channel-group-eval! a0-24 (the-as art-joint-anim #f) num-func-chan) + ) + ) + ) + (if (rnd-chance? self 0.5) + (ja-no-eval :group! manta-flap-ja :num! (seek! max (-> self fly-anim-speed)) :frame-num 0.0) + (ja-no-eval :group! manta-flap1-ja :num! (seek! max (-> self fly-anim-speed)) :frame-num 0.0) + ) + ) + #f + (none) + ) + +;; failed to figure out what this is: +(defstate idle (manta) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy idle) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-5 (-> self draw shadow-ctrl))) + (logior! (-> v1-5 settings flags) (shadow-flags disable-draw)) + ) + 0 + (try-locate-ground self (meters 10) (meters 10) #t (collide-spec backgnd)) + (set! (-> self landed-pos quad) (-> self root trans quad)) + (logior! (-> self draw status) (draw-control-status no-draw)) + ) + :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) (-> self state-timeout)) (< 1 (the-as int (-> self focus aware)))) + (go-virtual ambush) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (until #f + (let ((s5-0 (set-reaction-time! self (seconds 0.007) (seconds 0.015))) + (f28-0 (rnd-float-range self 0.5 0.3)) + (gp-0 (set-reaction-time! self (seconds 0.007) (seconds 0.01))) + (f30-0 (rnd-float-range self 0.5 0.3)) + ) + (dotimes (s4-0 s5-0) + (ja-no-eval :group! manta-idle0-ja :num! (seek! max f28-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f28-0)) + ) + ) + (dotimes (s5-1 gp-0) + (ja-no-eval :group! manta-idle1-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + ) + #f + ) + :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 land-approach (manta) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logclear! (-> self flags) (manta-flags mf0)) + (set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag ef43)))) + (logclear! (-> self nav flags) (nav-control-flag limit-rotation-rate update-heading-from-facing)) + (set! (-> self dest-pos quad) (-> self landed-pos quad)) + (set! (-> self dest-pos y) (+ 8192.0 (-> self default-y-offset) (-> self landed-pos y))) + (let ((a0-7 (-> self nav state)) + (v1-9 (-> self dest-pos)) + ) + (logclear! (-> a0-7 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-7 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-7 target-pos quad) (-> v1-9 quad)) + ) + 0 + (set! (-> self go-enable) #t) + (let ((v1-13 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-13 enemy-flags))) + (set! (-> v1-13 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-13 enemy-flags)))) + ) + (set! (-> v1-13 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-13 enemy-flags)))) + (set! (-> v1-13 nav callback-info) (-> v1-13 enemy-info callback-info)) + ) + 0 + (let ((v1-16 (-> self nav))) + (set! (-> v1-16 target-speed) 24576.0) + ) + 0 + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (and (< (vector-vector-xz-distance (-> self root trans) (-> self dest-pos)) 8192.0) (-> self go-enable)) + (go-virtual land) + ) + (if (and (time-elapsed? (-> self state-time) (-> self state-timeout)) (< 1 (the-as int (-> self focus aware)))) + (go-virtual notice) + ) + (seek! (-> self fly-anim-speed) 1.0 (seconds-per-frame)) + (vector-! (-> self forward-dir) (-> self dest-pos) (-> self root trans)) + (vector-normalize! (-> self forward-dir) 1.0) + 0 + ) + :code manta-fly-code + :post (behavior () + (do-impact self) + (manta-method-203 self -4096.0) + (nav-enemy-travel-post) + ) + ) + +;; failed to figure out what this is: +(defstate land (manta) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logclear! (-> self flags) (manta-flags mf0)) + (set! (-> self dest-pos quad) (-> self landed-pos quad)) + (set! (-> self dest-pos y) (+ (-> self landed-pos y) (-> self default-y-offset))) + (set! (-> self restart-fly-anims) #t) + ) + :exit (behavior () + (manta-method-206 self) + ) + :trans (behavior () + (seek! (-> self fly-anim-speed) 1.0 (seconds-per-frame)) + (vector-! (-> self forward-dir) (-> self dest-pos) (-> self root trans)) + (vector-normalize! (-> self forward-dir) 1.0) + 0 + ) + :code (behavior () + (ja-no-eval :num! (seek! max (-> self fly-anim-speed))) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + (ja-channel-push! 1 0) + (while (< 2048.0 (vector-vector-distance (-> self root trans) (-> self landed-pos))) + (ja-no-eval :group! manta-flap-ja :num! (seek! max (-> self fly-anim-speed)) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (-> self fly-anim-speed))) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! manta-land-ja :num! (seek! max 0.8) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.8)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! manta-idle0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual dormant-aware) + ) + :post (behavior () + (let ((gp-0 (new 'stack-no-clear 'vector)) + (a1-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-0 x) 0.0) + (set! (-> a1-0 y) -819.2) + (set! (-> a1-0 z) 0.0) + (set! (-> a1-0 w) 1.0) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-! gp-0 (-> self landed-pos) (-> self root trans)) + (vector-float*! gp-0 gp-0 2.0) + (vector-orient-by-quat! s5-0 a1-0 (-> self root quat)) + (vector+! s5-0 s5-0 (-> self root trans)) + (apply-impact! (-> self rbody) s5-0 gp-0) + ) + ) + (vector-seek! (-> self dest-pos) (-> self landed-pos) (* 8192.0 (seconds-per-frame))) + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate active (manta) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy active) enter))) + (if t9-0 + (t9-0) + ) + ) + (logior! (-> self flags) (manta-flags mf0)) + (set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag ef43)))) + (logclear! (-> self nav flags) (nav-control-flag limit-rotation-rate update-heading-from-facing)) + (set! (-> self y-offset) (-> self default-y-offset)) + (set! (-> self orbit-speed) (* 182.04445 (rnd-float-range self 0.5 2.0))) + (let ((v1-13 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-13 enemy-flags))) + (set! (-> v1-13 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-13 enemy-flags)))) + ) + (set! (-> v1-13 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-13 enemy-flags)))) + (set! (-> v1-13 nav callback-info) (-> v1-13 enemy-info callback-info)) + ) + 0 + (let ((v1-16 (-> self nav))) + (set! (-> v1-16 target-speed) 49152.0) + ) + 0 + ) + :code manta-fly-code + :post manta-hostile-post + ) + +;; failed to figure out what this is: +(defstate ambush (manta) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy ambush) enter))) + (if t9-0 + (t9-0) + ) + ) + (try-locate-ground self (meters 10) (meters 10) #t (collide-spec backgnd)) + (set! (-> self landed-pos quad) (-> self root trans quad)) + (manta-method-206 self) + (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) + ) + :exit (behavior () + (logclear! (-> self draw status) (draw-control-status force-fade)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (let ((f30-0 (rnd-float-range self 1.0 1.5))) + (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)) + ) + (ja-no-eval :group! manta-alert-idle-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (go-virtual notice-to-fly) + ) + :post (behavior () + (seek! (-> self fade-level) 128.0 (* 196.0 (seconds-per-frame))) + (set! (-> self draw force-fade) (the-as uint (the int (-> self fade-level)))) + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate notice-to-fly (manta) + :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! (-> self fly-anim-speed) 1.5) + (set! (-> self y-offset) (-> self default-y-offset)) + (set! (-> self dest-pos quad) (-> self root trans quad)) + (set! (-> self dest-pos y) (+ (-> self root gspot-pos y) (-> self y-offset))) + ) + :exit (behavior () + (set-time! (-> self last-attack-time)) + (set! (-> self restart-fly-anims) #t) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (ja-no-eval :group! manta-alert-to-fly-ja :num! (seek! max (-> self fly-anim-speed)) :frame-num 0.0) + (until (ja-done? 0) + (cond + ((< 15.0 (ja-frame-num 0)) + (do-impact self) + (manta-method-203 self -4096.0) + (nav-enemy-simple-post) + ) + (else + (nav-enemy-simple-post) + ) + ) + (suspend) + (ja :num! (seek! max (-> self fly-anim-speed))) + ) + (ja-channel-push! 1 (seconds 0.075)) + (dotimes (gp-0 5) + (ja-no-eval :group! manta-flap-fast-ja :num! (seek! max (-> self fly-anim-speed)) :frame-num 0.0) + (until (ja-done? 0) + (seek! (-> self fly-anim-speed) 1.2 (* 0.5 (seconds-per-frame))) + (do-impact self) + (manta-method-203 self -4096.0) + (nav-enemy-simple-post) + (suspend) + (ja :num! (seek! max (-> self fly-anim-speed))) + ) + ) + (go-virtual hostile) + ) + ) + +;; failed to figure out what this is: +(defstate stare (manta) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy stare) enter))) + (if t9-0 + (t9-0) + ) + ) + (logior! (-> self flags) (manta-flags mf0)) + (set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag ef43)))) + (logclear! (-> self nav flags) (nav-control-flag limit-rotation-rate update-heading-from-facing)) + (set! (-> self y-offset) (-> self default-y-offset)) + (set! (-> self orbit-speed) (* 182.04445 (rnd-float-range self 0.5 2.0))) + (let ((v1-13 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-13 enemy-flags))) + (set! (-> v1-13 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-13 enemy-flags)))) + ) + (set! (-> v1-13 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-13 enemy-flags)))) + (set! (-> v1-13 nav callback-info) (-> v1-13 enemy-info callback-info)) + ) + 0 + (let ((v1-16 (-> self nav))) + (set! (-> v1-16 target-speed) 49152.0) + ) + 0 + ) + :code manta-fly-code + :post manta-hostile-post + ) + +;; failed to figure out what this is: +(defstate hostile (manta) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (logior! (-> self flags) (manta-flags mf0)) + (set! (-> self enemy-flags) (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag ef43)))) + (logclear! (-> self nav flags) (nav-control-flag limit-rotation-rate update-heading-from-facing)) + (set! (-> self y-offset) (-> self default-y-offset)) + (set! (-> self orbit-speed) (* 182.04445 (rnd-float-range self 0.8 2.4))) + (set! (-> self go-enable) #t) + (let ((v1-14 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-14 enemy-flags))) + (set! (-> v1-14 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-14 enemy-flags)))) + ) + (set! (-> v1-14 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-14 enemy-flags)))) + (set! (-> v1-14 nav callback-info) (-> v1-14 enemy-info callback-info)) + ) + 0 + (let ((v1-17 (-> self nav))) + (set! (-> v1-17 target-speed) 49152.0) + ) + 0 + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (and (-> self go-enable) (< (fabs (- (-> self focus-pos y) (-> self root gspot-pos y))) 16384.0)) + (if (and (time-elapsed? (-> self last-attack-time) (seconds 3)) + (< (fabs (-> self angle-to-player)) 6371.5557) + (< (-> self offset-difference) 12288.0) + (< (vector-vector-xz-distance (-> self root trans) (-> self dest-pos)) 28672.0) + (< (vector-vector-distance (-> self root trans) (-> self focus-pos)) 110592.0) + (< (vector-length (-> self root transv)) 16384.0) + (let ((f0-10 (- (-> self root trans y) (-> self focus-pos y)))) + (and (and (< f0-10 24576.0) (< 0.0 f0-10)) (get-focus! self)) + ) + ) + (go-virtual attack) + ) + (if (and (time-elapsed? (-> self last-attack-time) (seconds 1)) + (< (fabs (-> self angle-to-player)) 8192.0) + (< (current-time) (+ (-> self track-timer) (seconds 0.5))) + (< (-> self offset-difference) 12288.0) + (< -4096.0 (-> self root transv y)) + ) + (go-virtual attack) + ) + ) + ) + :code manta-fly-code + :post manta-hostile-post + ) + +;; failed to figure out what this is: +(defstate attack (manta) + :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 + (nav-enemy-method-177 self) + (logior! (-> self focus-status) (focus-status dangerous)) + (set-time! (-> self state-time)) + (set-look-at-mode! self 1) + (let ((f30-0 1.13)) + (cond + ((and (get-focus! self) (manta-method-197 self)) + (set! (-> self attack-y-offset) (+ (- 4096.0 (-> self root trans y)) (-> self focus-pos y))) + (logior! (-> self flags) (manta-flags mf1)) + ) + (else + (set! (-> self attack-y-offset) 14336.0) + ) + ) + (let* ((f0-4 (vector-vector-xz-distance (-> self focus-pos) (-> self root trans))) + (f0-7 (/ (fmin 69632.0 (/ f0-4 f30-0)) f30-0)) + ) + (set! (-> self move-force) (* (-> self info info mass) f0-7)) + ) + (set! (-> self move-u) 0.0) + (set! (-> self move-du) (* 0.94 f30-0)) + ) + (set! (-> self attack-pos quad) (-> self focus-pos quad)) + (set! (-> self y-offset) (+ 24576.0 (-> self default-y-offset))) + (set! (-> self move-matrix rvec quad) (-> self root trans quad)) + (manta-method-195 self) + (dotimes (gp-0 (-> self actor-group-count)) + (let ((s5-0 (-> self actor-group gp-0))) + (dotimes (s4-0 (-> s5-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) 'attacking) + (let ((t9-6 send-event-function) + (v1-38 (-> s5-0 data s4-0 actor)) + ) + (t9-6 + (if v1-38 + (-> v1-38 extra process) + ) + a1-3 + ) + ) + ) + ) + ) + ) + ) + :exit (behavior () + (logclear! (-> self flags) (manta-flags mf1)) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (-> self reaction-time)) (>= 2 (the-as int (-> self focus aware)))) + (go-stare self) + ) + (if (and (logtest? (-> self flags) (manta-flags mf1)) + (< (vector-vector-xz-distance (-> self root trans) (-> self focus-pos)) 36864.0) + (< (fabs (- (-> self root trans y) (-> self focus-pos y))) 7782.4) + ) + (go-virtual attack-end) + ) + ) + :code (behavior () + (let ((f28-0 (-> self fly-anim-speed)) + (f30-0 1.5) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! manta-flap-fast-ja :num! (seek! max f28-0) :frame-num 0.0) + (until (ja-done? 0) + (set! f28-0 (seek f28-0 f30-0 (seconds-per-frame))) + (suspend) + (ja :num! (seek! max f28-0)) + ) + (if (logtest? (-> self flags) (manta-flags mf1)) + (sound-play "manta-attack") + ) + (let ((v1-29 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-29 enemy-flags))) + (set! (-> v1-29 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-29 enemy-flags)))) + ) + (set! (-> v1-29 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-29 enemy-flags)))) + (set! (-> v1-29 nav callback-info) (-> v1-29 enemy-info callback-info)) + ) + 0 + (ja-no-eval :group! manta-flap-fast-ja :num! (seek! max f28-0) :frame-num 0.0) + (until (ja-done? 0) + (set! f28-0 (seek f28-0 f30-0 (seconds-per-frame))) + (suspend) + (ja :num! (seek! max f28-0)) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! manta-attack-start-ja :num! (seek! max 1.2) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.2)) + ) + (ja-no-eval :group! manta-glide-end-ja :num! (seek! max 1.1) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.1)) + ) + (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)) + ) + (set-time! (-> self last-attack-time)) + (go-virtual hostile) + ) + :post manta-attack-post + ) + +;; failed to figure out what this is: +(defstate attack-end (manta) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (let ((a0-0 (-> self root root-prim))) + (set! (-> (the-as collide-shape-prim-group a0-0) child 1 prim-core action) (collide-action deadly)) + ) + (sound-play "manta-hit-jak") + ) + :exit (behavior () + (set! (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1 prim-core action) + (collide-action) + ) + 0 + (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)) + ) + (set-time! (-> self last-attack-time)) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (-> self reaction-time)) (>= 2 (the-as int (-> self focus aware)))) + (go-stare self) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (let ((f30-0 1.0)) + (ja-no-eval :group! manta-attack-end-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (go-virtual hostile) + ) + :post manta-attack-post + ) + +;; failed to figure out what this is: +(defstate knocked (manta) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-0 + (t9-0) + ) + ) + (logior! (-> self rbody flags) (rigid-body-flag enable-collision)) + (manta-method-206 self) + (set! (-> self restart-fly-anims) #t) + (set! (-> self gravity) 327680.0) + (set! (-> self hit-ground-count) (the-as uint 0)) + (set! (-> self knocked-force-mult) 1.0) + (knocked-handler self (-> self knocked-force)) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) exit))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self gravity) 81920.0) + ) + :trans (behavior () + (set-time! (-> self attack-path-blocked-time)) + (cond + ((!= (-> self hit-points) 0.0) + (if (and (zero? (-> self fated-time)) + (>= (-> self knocked-force-mult) 0.0) + (or (time-elapsed? (-> self state-time) (seconds 0.8)) + (and (< (-> self root trans y) (+ 8192.0 (-> self default-y-offset) (-> self root gspot-pos y))) + (< (-> self root transv y) 0.0) + ) + ) + ) + (go-virtual knocked-recover) + ) + ) + (else + (if (and (< (-> self root trans y) (+ -40960.0 (-> self default-y-offset) (-> self root gspot-pos y))) + (< (-> self root transv y) 0.0) + ) + (go-die self) + ) + ) + ) + ) + :post (behavior () + (seek! (-> self sound-volume) 0.0 (* 0.5 (seconds-per-frame))) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 x) (* 4096.0 (rnd-float-range self -0.3 0.3))) + (set! (-> s5-0 y) 0.0) + (set! (-> s5-0 z) (* 4096.0 (rnd-float-range self -0.2 0.2))) + (set! (-> s5-0 w) 1.0) + (let ((s4-0 (new 'stack-no-clear 'vector)) + (f30-2 4.0) + ) + (vector-float*! gp-0 (-> self knocked-force) (* 2.0 (-> self knocked-force-mult) f30-2 f30-2)) + (vector-orient-by-quat! s4-0 s5-0 (-> self root quat)) + (vector+! s4-0 s4-0 (-> self root trans)) + (apply-impact! (-> self rbody) s4-0 gp-0) + (seek! (-> self knocked-force-mult) 0.0 (* f30-2 (seconds-per-frame))) + ) + ) + (let ((a1-9 (new 'stack-no-clear 'collide-query))) + (set! (-> a1-9 start-pos quad) (-> self rbody position quad)) + (vector-float*! (-> a1-9 move-dist) (-> self rbody lin-velocity) (seconds-per-frame)) + (let ((v1-21 a1-9)) + (set! (-> v1-21 radius) (+ 4096.0 (-> self root root-prim local-sphere w))) + (set! (-> v1-21 collide-with) (collide-spec backgnd jak bot obstacle player-list)) + (set! (-> v1-21 ignore-process0) self) + (set! (-> v1-21 ignore-process1) #f) + (set! (-> v1-21 ignore-pat) (-> self root pat-ignore-mask)) + (set! (-> v1-21 action-mask) (collide-action solid)) + ) + (fill-using-line-sphere *collide-cache* a1-9) + ) + (manta-method-203 self 0.0) + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate knocked-recover (manta) + :virtual #t + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked-recover) exit))) + (if t9-0 + (t9-0) + ) + ) + (logclear! (-> self rbody flags) (rigid-body-flag enable-collision)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (dotimes (gp-0 2) + (ja-no-eval :group! manta-flap-fast-ja :num! (seek! max 1.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.5)) + ) + ) + (if (enemy-method-109 self) + (go-die self) + (go-hostile self) + ) + ) + :post (behavior () + (let ((a1-0 (new 'stack-no-clear 'collide-query))) + (set! (-> a1-0 start-pos quad) (-> self rbody position quad)) + (vector-float*! (-> a1-0 move-dist) (-> self rbody lin-velocity) (seconds-per-frame)) + (let ((v1-3 a1-0)) + (set! (-> v1-3 radius) (+ 4096.0 (-> self root root-prim local-sphere w))) + (set! (-> v1-3 collide-with) (collide-spec backgnd jak bot obstacle player-list)) + (set! (-> v1-3 ignore-process0) self) + (set! (-> v1-3 ignore-process1) #f) + (set! (-> v1-3 ignore-pat) (-> self root pat-ignore-mask)) + (set! (-> v1-3 action-mask) (collide-action solid)) + ) + (fill-using-line-sphere *collide-cache* a1-0) + ) + (manta-method-203 self 0.0) + (nav-enemy-simple-post) + ) + ) + +;; definition for method 80 of type manta +(defmethod go-best-state ((this manta)) + (let ((s5-0 (-> this focus aware))) + (cond + ((and (= s5-0 (enemy-aware ea3)) (get-focus! this)) + (go-hostile this) + ) + ((<= (the-as int s5-0) 0) + (go (method-of-object this land-approach)) + ) + ((>= 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 195 of type manta +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod manta-method-195 ((this manta)) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (-> this focus-pos) (the-as vector (-> this move-matrix))))) + (set! (-> s5-1 y) (-> this attack-y-offset)) + (vector-normalize! s5-1 (-> this move-force)) + (set! (-> this move-matrix fvec quad) (-> s5-1 quad)) + (vector+! (-> this move-matrix uvec) (the-as vector (-> this move-matrix)) s5-1) + ) + (vector-! (-> this move-matrix trans) (-> this focus-pos) (-> this move-matrix uvec)) + (vector-normalize! (-> this move-matrix trans) 24576.0) + (set! (-> this move-matrix trans y) (* -0.5 (-> this move-matrix trans y))) + (matrix*! (-> this curve-matrix) *hermite-matrix* (-> this move-matrix)) + 0 + (none) + ) + +;; definition for method 196 of type manta +;; INFO: Used lq/sq +(defmethod manta-method-196 ((this manta)) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (set! (-> s3-0 quad) (-> this root trans quad)) + (let* ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (closest-point-on-mesh (-> this nav) s5-0 s3-0 (the-as nav-poly #f))) + ) + (when (and s4-0 (< (vector-vector-xz-distance s5-0 s3-0) 4096.0)) + (let ((s3-2 (vector-! (new 'stack-no-clear 'vector) (-> this focus-pos) s5-0))) + (vector-length s3-2) + (let ((s2-0 (new 'stack 'clamp-travel-vector-to-mesh-return-info))) + (vector-float*! s3-2 s3-2 1.3) + (clamp-vector-to-mesh-no-gaps (-> this nav) s5-0 s4-0 s3-2 s2-0) + (if (-> s2-0 found-boundary) + #f + #t + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 113 of type manta +(defmethod get-focus! ((this manta)) + (let* ((t9-0 (method-of-type nav-enemy get-focus!)) + (v0-0 (t9-0 this)) + ) + (cond + ((and v0-0 (time-elapsed? (-> this attack-path-blocked-time) (seconds 1))) + (empty) + v0-0 + ) + (else + (the-as process-focusable #f) + ) + ) + ) + ) + +;; definition for method 197 of type manta +;; WARN: Return type mismatch symbol vs none. +(defmethod manta-method-197 ((this manta)) + (and (logtest? (-> this draw status) (draw-control-status on-screen)) + (let ((gp-0 (camera-matrix))) + (camera-pos) + (let* ((s4-0 (-> this focus-pos)) + (gp-1 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> gp-0 fvec) 1.0)) + (v1-6 (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> this root trans) s4-0) 1.0)) + ) + (< 0.0 (vector-dot gp-1 v1-6)) + ) + ) + ) + (none) + ) + +;; definition for method 89 of type manta +(defmethod within-gspot-range? ((this manta)) + #f + ) + +;; definition for method 88 of type manta +(defmethod enemy-method-88 ((this manta) (arg0 enemy-knocked-info)) + (let ((v1-0 (-> this root))) + (or (>= (-> arg0 on-surface-count) 3) + (>= (-> this hit-ground-count) (the-as uint 1)) + (and (logtest? (-> v1-0 status) (collide-status on-ground)) (>= 16384.0 (-> v1-0 transv y))) + ) + ) + ) + +;; definition for method 198 of type manta +;; WARN: Return type mismatch int vs none. +(defmethod manta-method-198 ((this manta)) + (let ((a1-0 (-> this info name))) + (when (nonzero? a1-0) + (set! (-> this info) (the-as rigid-body-object-constants (-> a1-0 value))) + (set! (-> this rbody info) (-> this info info)) + ) + ) + (rigid-body-info-method-9 (-> this info info)) + 0 + (none) + ) + +;; definition for method 199 of type manta +;; WARN: Return type mismatch int vs none. +(defmethod manta-method-199 ((this manta)) + 0 + (none) + ) + +;; definition for method 200 of type manta +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod manta-method-200 ((this manta)) + (local-vars (a2-5 float) (a2-12 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s5-0 (-> this root root-prim prim-core)) + ) + (set! (-> s3-0 quad) (-> s5-0 world-sphere quad)) + (set! (-> s3-0 w) (-> s5-0 world-sphere w)) + (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)) + ) + (when (logtest? s4-0 1024) + (let ((a0-4 (-> *collide-player-list* alive-list next0))) + *collide-player-list* + (let ((v1-14 (-> a0-4 next0))) + (while (!= a0-4 (-> *collide-player-list* alive-list-end)) + (let* ((a0-5 (-> (the-as connection a0-4) param1)) + (a1-1 (-> (the-as collide-shape a0-5) 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-1 a2-5) + (f1-1 (+ (-> a1-2 world-sphere w) (-> s3-0 w))) + ) + (when (< f0-1 (* f1-1 f1-1)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-5)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! a0-4 v1-14) + *collide-player-list* + (set! v1-14 (-> v1-14 next0)) + ) + ) + ) + ) + (when (logtest? s4-0 256) + (let ((a0-7 (-> *collide-hit-by-player-list* alive-list next0))) + *collide-hit-by-player-list* + (let ((v1-22 (-> a0-7 next0))) + (while (!= a0-7 (-> *collide-hit-by-player-list* alive-list-end)) + (let* ((a0-8 (-> (the-as connection a0-7) param1)) + (a1-13 (-> (the-as collide-shape a0-8) 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-2 a2-12) + (f1-5 (+ (-> a1-14 world-sphere w) (-> s3-0 w))) + ) + (when (< f0-2 (* f1-5 f1-5)) + (when (< *actor-list-length* 256) + (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-8)) + (set! *actor-list-length* (+ *actor-list-length* 1)) + ) + ) + ) + ) + ) + ) + (set! a0-7 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)) + (when (!= v1-27 (-> this root)) + (let* ((s2-1 + (vector-! (new 'stack-no-clear 'vector) (the-as vector s5-0) (the-as vector (-> v1-27 root-prim prim-core))) + ) + (f0-3 (vector-length s2-1)) + ) + (when (< 40.96 f0-3) + (let ((f0-6 (lerp-scale 131072.0 0.0 f0-3 2048.0 (* 1.5 (-> s5-0 world-sphere w))))) + (vector-normalize! s2-1 f0-6) + ) + (add-force! (-> this rbody) s2-1) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 201 of type manta +;; INFO: Used lq/sq +(defmethod manta-method-201 ((this manta) (arg0 float)) + (let ((gp-0 (new 'stack-no-clear 'inline-array 'matrix 2))) + (set! (-> gp-0 0 rvec quad) (-> this move-vel quad)) + (vector-normalize! + (the-as vector (-> gp-0 0)) + (vector-vector-distance (-> this dest-pos) (-> this root trans)) + ) + (let ((v1-2 (-> gp-0 1))) + (set! (-> v1-2 rvec x) 0.0) + (set! (-> v1-2 rvec y) 0.0) + (set! (-> v1-2 rvec z) 4096.0) + (set! (-> v1-2 rvec w) 1.0) + ) + (set-vector! (-> gp-0 1 uvec) 0.0 16384.0 0.0 1.0) + (set! (-> gp-0 0 uvec quad) (-> gp-0 0 rvec quad)) + (set! (-> gp-0 0 uvec y) 0.0) + (let* ((v1-5 (-> gp-0 0)) + (f30-0 (sqrtf (+ (* (-> v1-5 rvec x) (-> v1-5 rvec x)) (* (-> v1-5 rvec z) (-> v1-5 rvec z))))) + (f0-13 (lerp-scale 0.0 49152.0 f30-0 4096.0 61440.0)) + (f0-15 (/ (* (-> this info info mass) f0-13 f0-13) (* 2.0 f30-0))) + ) + (vector-normalize! (-> gp-0 0 uvec) (fmin arg0 f0-15)) + ) + (set! (-> this fly-anim-speed) (lerp-scale 1.0 1.5 (vector-length (-> gp-0 0 uvec)) 0.0 32768.0)) + (if (and (< (vector-dot (-> gp-0 0 uvec) (-> this forward-dir)) 0.0) + (let ((v1-15 (-> gp-0 0))) + (< (sqrtf (+ (* (-> v1-15 rvec x) (-> v1-15 rvec x)) (* (-> v1-15 rvec z) (-> v1-15 rvec z)))) 131072.0) + ) + ) + (set! (-> gp-0 1 rvec z) (* -1.0 (-> gp-0 1 rvec z))) + ) + (vector-float*! (-> gp-0 0 fvec) (-> gp-0 0 uvec) 4.0) + (vector-float*! (-> gp-0 0 trans) (-> gp-0 0 uvec) 0.5) + (vector-orient-by-quat! (-> gp-0 1 fvec) (the-as vector (-> gp-0 1)) (-> this root quat)) + (vector+! (-> gp-0 1 fvec) (-> gp-0 1 fvec) (-> this root trans)) + (apply-impact! (-> this rbody) (-> gp-0 1 fvec) (-> gp-0 0 fvec)) + (vector-orient-by-quat! (-> gp-0 1 fvec) (-> gp-0 1 uvec) (-> this root quat)) + (vector+! (-> gp-0 1 fvec) (-> gp-0 1 fvec) (-> this root trans)) + (apply-impact! (-> this rbody) (-> gp-0 1 fvec) (-> gp-0 0 trans)) + (when (logtest? (-> this flags) (manta-flags mf0)) + (let* ((s4-2 (vector-! (new 'stack-no-clear 'vector) (-> this focus-pos) (-> this root trans))) + (t9-9 lerp-scale) + (a0-27 32768.0) + (a1-16 0.0) + (v1-36 (-> gp-0 0)) + (f30-1 (t9-9 + a0-27 + a1-16 + (sqrtf (+ (* (-> v1-36 rvec x) (-> v1-36 rvec x)) (* (-> v1-36 rvec z) (-> v1-36 rvec z)))) + 4096.0 + 61440.0 + ) + ) + (s3-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-1 x) 0.0) + (set! (-> s3-1 y) 0.0) + (set! (-> s3-1 z) 10240.0) + (set! (-> s3-1 w) 1.0) + (let ((f30-2 + (* f30-1 + (lerp-scale + 0.5 + 1.0 + (vector-dot (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)) (-> this forward-dir)) + 1.0 + -1.0 + ) + ) + ) + ) + (vector-orient-by-quat! (-> gp-0 1 fvec) s3-1 (-> this root quat)) + (vector+! (-> gp-0 1 fvec) (-> gp-0 1 fvec) (-> this root trans)) + (apply-impact! + (-> this rbody) + (-> gp-0 1 fvec) + (vector-normalize-copy! (new 'stack-no-clear 'vector) s4-2 f30-2) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 202 of type manta +;; WARN: Return type mismatch int vs none. +(defmethod do-impact ((this manta)) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (f0-1 (* (-> this rbody info mass) (-> this gravity))) + (f1-2 (fmax 0.0 (fmin 1.0 (/ (- (-> this dest-pos y) (-> this root trans y)) (-> this y-offset))))) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-0 x) 0.0) + (set! (-> s4-0 y) 12288.0) + (set! (-> s4-0 z) 0.0) + (set! (-> s4-0 w) 1.0) + (let ((s3-0 (new 'stack-no-clear 'vector))) + (vector-reset! gp-0) + (set! (-> gp-0 y) (fmax 0.0 (fmin 450560.0 (* 4.0 f0-1 f1-2)))) + (set! (-> this fly-anim-speed) (fmax (lerp-scale 1.0 1.5 f1-2 0.35 0.6) (-> this fly-anim-speed))) + (vector-orient-by-quat! s3-0 s4-0 (-> this root quat)) + (vector+! s3-0 s3-0 (-> this root trans)) + (apply-impact! (-> this rbody) s3-0 gp-0) + ) + ) + 0 + (none) + ) + +;; definition for method 203 of type manta +;; WARN: Return type mismatch int vs none. +(defmethod manta-method-203 ((this manta) (arg0 float)) + (let ((gp-0 (new 'stack-no-clear 'vector)) + (v1-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-0 x) 0.0) + (set! (-> v1-0 y) arg0) + (set! (-> v1-0 z) 0.0) + (set! (-> v1-0 w) 1.0) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-reset! gp-0) + (set! (-> gp-0 y) (* -1.0 (-> this gravity) (-> this rbody info mass))) + (vector-orient-by-quat! s4-0 v1-0 (-> this root quat)) + (vector+! s4-0 s4-0 (-> this root trans)) + (apply-impact! (-> this rbody) s4-0 gp-0) + ) + ) + 0 + (none) + ) + +;; definition for method 204 of type manta +;; WARN: Return type mismatch int vs none. +(defmethod manta-method-204 ((this manta)) + (rigid-body-control-method-10 + (-> this rbody) + (the-as rigid-body-object this) + (seconds-per-frame) + (-> this max-time-step) + ) + 0 + (none) + ) + +;; definition for method 161 of type manta +;; INFO: Used lq/sq +(defmethod nav-enemy-method-161 ((this manta) (arg0 nav-control)) + (let ((a2-0 (-> arg0 state))) + (set! (-> this move-vel quad) (-> a2-0 velocity quad)) + ) + (manta-method-201 this 201326600.0) + (none) + ) + +;; definition for method 160 of type manta +;; WARN: Return type mismatch int vs none. +(defmethod normalize-heading! ((this manta) (arg0 nav-control)) + 0 + (none) + ) + +;; definition for method 208 of type manta +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod manta-method-208 ((this manta)) + (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 81920.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-28 (-> this draw shadow-ctrl))) + (logior! (-> v1-28 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + ) + ) + ) + (else + (let ((v1-31 (-> this draw shadow-ctrl))) + (logior! (-> v1-31 settings flags) (shadow-flags disable-draw)) + ) + 0 + ) + ) + 0 + (none) + ) + +;; definition for method 59 of type manta +;; INFO: Used lq/sq +(defmethod enemy-common-post ((this manta)) + (set! (-> this root gspot-pos quad) (-> this root trans quad)) + (cond + ((and (-> this next-state) (= (-> this next-state name) 'knocked)) + (let ((a1-0 (new 'stack-no-clear 'collide-query))) + (set-ground-pat! + this + a1-0 + (-> this enemy-info recover-gnd-collide-with) + 8192.0 + 81920.0 + 1024.0 + (the-as process #f) + ) + ) + ) + (else + (let ((s5-0 (-> this nav)) + (s3-0 (-> this root trans)) + (s4-0 (new 'stack 'nav-find-poly-parms)) + ) + (vector-! (-> s4-0 point) s3-0 (the-as vector (-> s5-0 state mesh bounds))) + (set! (-> s4-0 y-threshold) (-> s5-0 nearest-y-threshold)) + (set! (-> s4-0 ignore) (the-as uint 2)) + (nav-mesh-method-46 (-> s5-0 state mesh) (the-as nav-poly s4-0)) + (let ((v1-16 (-> s4-0 poly))) + (if v1-16 + (set! (-> this root gspot-pos y) (+ (-> v1-16 vertex0 y) (-> this nav state mesh bounds y))) + ) + ) + ) + ) + ) + (manta-method-204 this) + (update-rbody-transform! (-> this rbody) (-> this root)) + (manta-method-208 this) + ((method-of-type nav-enemy enemy-common-post) this) + (none) + ) + +;; definition for method 82 of type manta +;; WARN: disable def twice: 150. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +;; WARN: disable def twice: 100. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod event-handler ((this manta) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-4 object)) + (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)) + ) + (('impact-impulse) + (let ((v1-27 (-> arg3 param 0))) + (when (and (< 0.8 (vector-dot (the-as vector (+ v1-27 16)) *y-vector*)) + (< (vector-dot (the-as vector (+ v1-27 16)) (the-as vector (+ v1-27 32))) -0.8) + ) + (set! v0-4 (+ (-> this hit-ground-count) 1)) + (set! (-> this hit-ground-count) (the-as uint v0-4)) + v0-4 + ) + ) + ) + (('tracked) + (set! v0-4 (current-time)) + (set! (-> this track-timer) (the-as time-frame v0-4)) + v0-4 + ) + (('cue-chase 'trigger) + (if (and (-> this next-state) (let ((v1-37 (-> this next-state name))) + (or (= v1-37 'idle) (= v1-37 'dormant-aware) (= v1-37 'dormant)) + ) + ) + (go (method-of-object this ambush)) + ) + ) + (('attacking) + (when (and (!= arg0 this) (time-elapsed? (-> this last-attack-time) (seconds 1))) + (set! v0-4 (+ (current-time) (seconds -1))) + (set! (-> this last-attack-time) (the-as time-frame v0-4)) + v0-4 + ) + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 205 of type manta +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod update-target-pos! ((this manta)) + (let ((a0-2 (handle->process (-> this focus handle)))) + (cond + (a0-2 + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable a0-2) 3) quad)) + (if (not (manta-method-196 this)) + (set-time! (-> this attack-path-blocked-time)) + ) + ) + (else + (set! (-> this focus-pos quad) (-> (target-pos 0) quad)) + (set! (-> this dest-pos quad) (-> this root trans quad)) + ) + ) + ) + (none) + ) + +;; definition for method 50 of type manta +;; WARN: Return type mismatch int vs none. +(defmethod enemy-method-50 ((this manta) (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 ((v1-4 (-> (the-as collide-shape-prim-group v1-2) child 0))) + (set! (-> v1-4 prim-core action) (collide-action solid deadly)) + (set! (-> v1-4 prim-core collide-with) (collide-spec backgnd jak bot obstacle hit-by-others-list player-list)) + (set! (-> v1-4 local-sphere w) 6144.0) + ) + ) + ) + ((or (= v1-0 2) (zero? v1-0)) + (let ((v1-8 (-> this root root-prim))) + (let ((a0-5 v1-8)) + (set! (-> a0-5 prim-core action) (collide-action semi-solid deadly)) + (set! (-> a0-5 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + ) + (let ((v1-10 (-> (the-as collide-shape-prim-group v1-8) child 0))) + (set! (-> v1-10 prim-core action) (collide-action semi-solid deadly)) + (set! (-> v1-10 prim-core collide-with) (collide-spec backgnd jak bot player-list)) + (set! (-> v1-10 local-sphere w) 2048.0) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 87 of type manta +(defmethod knocked-anim-handler ((this manta) (arg0 int) (arg1 enemy-knocked-info)) + (case arg0 + ((1) + (let ((s5-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 (and s5-0 (= (-> this hit-points) 0.0)) + (let ((a0-4 (-> this skel root-channel 0))) + (set! (-> a0-4 frame-group) (the-as art-joint-anim (-> this draw art-group data 16))) + (set! (-> a0-4 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 16)) frames num-frames) -1)) + ) + (set! (-> a0-4 param 1) (-> arg1 anim-speed)) + (set! (-> a0-4 frame-num) 8.0) + (joint-control-channel-group! a0-4 (the-as art-joint-anim (-> this draw art-group data 16)) num-func-seek!) + ) + ) + s5-0 + ) + ) + (else + ((method-of-type nav-enemy knocked-anim-handler) this arg0 arg1) + ) + ) + ) + +;; definition for method 85 of type manta +(defmethod knocked-anim ((this manta) (arg0 enemy-knocked-info)) + (cond + ((= (-> this hit-points) 0.0) + (ja-channel-push! 1 (seconds 0.1)) + (set! (-> arg0 anim-speed) 0.5) + (let ((a0-2 (-> this skel root-channel 0))) + (set! (-> a0-2 frame-group) (the-as art-joint-anim (-> this draw art-group data 16))) + (set! (-> a0-2 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 16)) 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 16)) num-func-seek!) + ) + #t + ) + ((let ((v1-15 (-> this incoming knocked-type))) + (= v1-15 (knocked-type blue-shot)) + ) + (ja-channel-push! 1 0) + (let ((a0-5 (-> this skel root-channel 0))) + (set! (-> a0-5 frame-group) (the-as art-joint-anim (-> this draw art-group data 14))) + (set! (-> a0-5 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 14)) 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 14)) num-func-seek!) + ) + #t + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (let ((a0-7 (-> this skel root-channel 0))) + (set! (-> a0-7 frame-group) (the-as art-joint-anim (-> this draw art-group data 13))) + (set! (-> a0-7 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 13)) 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 13)) num-func-seek!) + ) + #t + ) + ) + ) + +;; definition for method 86 of type manta +(defmethod knocked-land-anim ((this manta) (arg0 enemy-knocked-info)) + (set! (-> arg0 anim-speed) 0.5) + (ja-channel-push! 1 (seconds 0.1)) + (let ((a0-2 (-> this skel root-channel 0))) + (set! (-> a0-2 frame-group) (the-as art-joint-anim (-> this draw art-group data 18))) + (set! (-> a0-2 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 18)) 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 18)) num-func-seek!) + ) + #t + ) + +;; definition for method 206 of type manta +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod manta-method-206 ((this manta)) + (rigid-body-control-method-28 (-> this rbody) (-> this root trans) (-> this root quat)) + (let ((v1-4 (-> this rbody))) + (set! (-> v1-4 force quad) (the-as uint128 0)) + (set! (-> v1-4 torque quad) (the-as uint128 0)) + ) + 0 + (reset-momentum! (-> this rbody)) + 0 + (none) + ) + +;; definition for method 207 of type manta +;; WARN: Return type mismatch int vs none. +(defmethod alloc-rbody! ((this manta) (arg0 rigid-body-object-constants)) + (set! (-> this info) arg0) + (set! (-> this rbody) (new 'process 'rigid-body-control this)) + (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 manta-method-199)) + ) + (manta-method-198 this) + (set! (-> this max-time-step) (-> arg0 extra max-time-step)) + (set! (-> this root max-iteration-count) (the-as uint 4)) + 0 + (none) + ) + +;; definition for method 121 of type manta +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this manta)) + (local-vars (sv-16 res-tag)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-manta" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *manta-nav-enemy-info*) + (let ((f0-0 (res-lump-float (-> this entity) 'rotoffset))) + (quaternion-rotate-y! (-> this root quat) (-> this root quat) f0-0) + ) + (alloc-rbody! this *manta-rigid-body-constants*) + (set! (-> this flags) (manta-flags)) + (logclear! (-> this nav flags) (nav-control-flag limit-rotation-rate update-heading-from-facing use-momentum)) + (let ((v1-13 (-> this neck))) + (set! (-> v1-13 up) (the-as uint 1)) + (set! (-> v1-13 nose) (the-as uint 2)) + (set! (-> v1-13 ear) (the-as uint 0)) + (set-vector! (-> v1-13 twist-max) 11832.889 11832.889 0.0 1.0) + (set! (-> v1-13 ignore-angle) 30947.555) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-16 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-16 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-16)) + (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 default-y-offset) (res-lump-float (-> this entity) 'y-offset :default 32768.0)) + (set! (-> this root dynam gravity y) 81920.0) + (set! (-> this root dynam gravity-length) 81920.0) + (set! (-> this root dynam gravity-max) 81920.0) + (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)))) + (set! (-> this go-enable) #t) + (set! (-> this up-dir quad) (-> *y-vector* quad)) + (set! (-> this forward-dir quad) (-> *z-vector* quad)) + (set! (-> this last-attack-time) 0) + (set! (-> this attack-path-blocked-time) 0) + (set! (-> this track-timer) 0) + (set! (-> this gravity) 81920.0) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/mine/mine-mood_REF.gc b/test/decompiler/reference/jak3/levels/mine/mine-mood_REF.gc new file mode 100644 index 0000000000..7bedc5b228 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mine/mine-mood_REF.gc @@ -0,0 +1,219 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function init-mood-minea +(defun init-mood-minea ((arg0 mood-context)) + (let ((v1-0 (-> arg0 light-group 1))) + (let ((a1-0 (-> v1-0 dir0))) + (set! (-> a1-0 direction x) 0.0) + (set! (-> a1-0 direction y) 1.0) + (set! (-> a1-0 direction z) 0.0) + (set! (-> a1-0 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.25) + (set! (-> v1-0 dir1 extra x) 0.0) + (set! (-> v1-0 dir2 extra x) 0.0) + (set! (-> v1-0 ambi extra x) 0.25) + ) + (let ((v1-2 (-> arg0 light-group 2))) + (let ((a1-5 (-> v1-2 dir0))) + (set! (-> a1-5 direction x) 0.0) + (set! (-> a1-5 direction y) 1.0) + (set! (-> a1-5 direction z) 0.0) + (set! (-> a1-5 direction w) 0.0) + ) + (set-vector! (-> v1-2 dir0 color) 0.667 0.667 0.667 1.0) + (set-vector! (-> v1-2 ambi color) 0.333 0.333 0.333 1.0) + (set! (-> v1-2 dir0 extra x) 0.75) + (set! (-> v1-2 dir1 extra x) 0.0) + (set! (-> v1-2 dir2 extra x) 0.0) + (set! (-> v1-2 ambi extra x) 0.25) + ) + (let ((v1-4 (-> arg0 light-group 3))) + (let ((a0-1 (-> v1-4 dir0))) + (set! (-> a0-1 direction x) -0.2357) + (set! (-> a0-1 direction y) 0.9428) + (set! (-> a0-1 direction z) -0.2357) + (set! (-> a0-1 direction w) 0.0) + ) + (set-vector! (-> v1-4 dir0 color) 0.667 0.667 0.667 1.0) + (set-vector! (-> v1-4 ambi color) 0.3 0.25 0.4 1.0) + (set! (-> v1-4 dir0 extra x) 0.75) + (set! (-> v1-4 dir1 extra x) 0.0) + (set! (-> v1-4 dir2 extra x) 0.0) + (set! (-> v1-4 ambi extra x) 0.5) + ) + ) + +;; definition for function update-mood-minea +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-minea time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (if (< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + (set! (-> arg0 times 0 w) 1.0) + ) + 0 + (none) + ) + +;; definition of type mineb-light-state +(deftype mineb-light-state (structure) + ((current float) + (target float) + ) + ) + +;; definition for method 3 of type mineb-light-state +(defmethod inspect ((this mineb-light-state)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'mineb-light-state) + (format #t "~1Tcurrent: ~f~%" (-> this current)) + (format #t "~1Ttarget: ~f~%" (-> this target)) + (label cfg-4) + this + ) + +;; definition of type mineb-states +(deftype mineb-states (structure) + ((lights mineb-light-state 3 :inline) + ) + ) + +;; definition for method 3 of type mineb-states +(defmethod inspect ((this mineb-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'mineb-states) + (format #t "~1Tlights[3] @ #x~X~%" (-> this lights)) + (label cfg-4) + this + ) + +;; definition for function init-mood-mineb +;; WARN: Return type mismatch symbol vs float. +(defun init-mood-mineb ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state))) + (dotimes (a0-1 3) + (set! (-> (&+ v1-0 (* a0-1 16)) 0) (the-as uint 0.0)) + (set! (-> (&+ v1-0 (* a0-1 16)) 1) (the-as uint 0.0)) + ) + ) + (the-as float #f) + ) + +;; definition for function update-mood-mineb +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-mineb time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (let ((v1-0 (-> arg0 light-group))) + (set! (-> v1-0 0 dir0 extra x) 0.8) + (set! (-> v1-0 0 ambi extra x) 0.8) + ) + (cond + ((< (the-as uint 8) (the-as uint (-> *time-of-day-context* mode))) + (palette-select-special arg0) + ) + (else + (let ((gp-0 (-> arg0 state))) + (set! (-> arg0 times 0 w) 1.0) + (set! (-> arg0 times 1 w) (the-as float (-> gp-0 0))) + (set! (-> arg0 times 2 w) (the-as float (-> gp-0 4))) + (set! (-> arg0 times 3 w) (the-as float (-> gp-0 8))) + (when (not (paused?)) + (dotimes (s5-1 3) + (set! (-> (&+ gp-0 (* s5-1 16)) 0) + (the-as + uint + (seek (the-as float (-> (&+ gp-0 (* s5-1 16)) 0)) (the-as float (-> (&+ gp-0 (* s5-1 16)) 1)) 0.05) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function set-mineb-lights! +;; WARN: Return type mismatch float vs none. +(defun set-mineb-lights! ((arg0 int) (arg1 float)) + (let ((v1-1 (level-get *level* 'mineb))) + (when (and v1-1 (= (-> v1-1 status) 'active)) + (let ((v1-2 (-> v1-1 mood-context state))) + (set! (-> (&+ v1-2 (* arg0 16)) 1) (the-as uint arg1)) + (if (= arg1 0.0) + (set! (-> (&+ v1-2 (* arg0 16)) 0) (the-as uint arg1)) + ) + ) + ) + ) + (none) + ) + +;; definition of type minec-states +(deftype minec-states (structure) + ((light light-state :inline) + (electricity electricity-state :inline) + ) + ) + +;; definition for method 3 of type minec-states +(defmethod inspect ((this minec-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'minec-states) + (format #t "~1Tlight: #~%" (-> this light)) + (format #t "~1Telectricity: #~%" (-> this electricity)) + (label cfg-4) + this + ) + +;; definition for function init-mood-minec +(defun init-mood-minec ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state)) + (f0-0 0.0) + ) + (set! (-> v1-0 3) (the-as uint f0-0)) + f0-0 + ) + ) + +;; definition for function update-mood-minec +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-minec 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 (-> arg0 state))) + (set! (-> arg0 times 6 w) 1.0) + (update-mood-light arg0 5 0 -1.0 0.0 arg1 0.0 2.0) + (cond + ((!= (the-as float (-> s4-1 3)) 0.0) + (update-mood-electricity arg0 7 8 1.2 1.7) + ) + ((or (>= arg1 18.0) (>= 6.0 arg1)) + (set! (-> arg0 times 7 w) 1.0) + ) + ) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/mine/mine-obs-h_REF.gc b/test/decompiler/reference/jak3/levels/mine/mine-obs-h_REF.gc new file mode 100644 index 0000000000..8e4b1f21d4 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mine/mine-obs-h_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/mine/mine-obs_REF.gc b/test/decompiler/reference/jak3/levels/mine/mine-obs_REF.gc new file mode 100644 index 0000000000..4e0ec94c8a --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mine/mine-obs_REF.gc @@ -0,0 +1,2412 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function mineb-activate +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun mineb-activate () + (local-vars (sv-16 res-tag)) + (let ((a0-1 (entity-by-name "minb-part-1"))) + (when a0-1 + (let ((gp-0 (the-as (pointer actor-group) #f)) + (s5-0 0) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-2 (res-lump-data a0-1 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))) + (when (and v1-2 (nonzero? (-> sv-16 elt-count))) + (set! gp-0 v1-2) + (set! s5-0 (the-as int (-> sv-16 elt-count))) + ) + ) + (when (> s5-0 0) + (dotimes (s5-1 (-> gp-0 0 length)) + (let ((a0-7 (-> gp-0 0 data s5-1 actor))) + (if a0-7 + (toggle-status a0-7 (entity-perm-status subtask-complete) #t) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition of type rat-light-manager +(deftype rat-light-manager (process) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + ) + (:state-methods + idle + ) + (:methods + (rat-light-manager-method-15 (_type_ int int symbol) none) + (rat-light-manager-method-16 (_type_ int symbol) none) + ) + ) + +;; definition for method 3 of type rat-light-manager +(defmethod inspect ((this rat-light-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)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defstate idle (rat-light-manager) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('enter) + (rat-light-manager-method-16 self (command-get-int (-> block param 0) 0) #t) + ) + (('exit) + (rat-light-manager-method-16 self (command-get-int (-> block param 0) 0) #f) + ) + ) + ) + :code sleep-code + ) + +;; definition for method 12 of type rat-light-manager +(defmethod run-logic? ((this rat-light-manager)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; definition for method 15 of type rat-light-manager +;; WARN: Return type mismatch int vs none. +(defmethod rat-light-manager-method-15 ((this rat-light-manager) (arg0 int) (arg1 int) (arg2 symbol)) + (let ((v1-5 (-> this actor-group 0 data arg0 actor extra perm))) + (logior! (-> v1-5 status) (entity-perm-status bit-5)) + (set! (-> v1-5 user-object 0) (if arg2 + 1 + 0 + ) + ) + (if arg2 + (set-mineb-lights! arg1 (if (logtest? (-> v1-5 status) (entity-perm-status subtask-complete)) + 1.0 + 0.0 + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 16 of type rat-light-manager +;; WARN: Return type mismatch int vs none. +(defmethod rat-light-manager-method-16 ((this rat-light-manager) (arg0 int) (arg1 symbol)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (if arg1 + (rat-light-manager-method-15 this 0 0 #t) + ) + ) + ((= v1-0 1) + (if arg1 + (rat-light-manager-method-15 this 1 1 #t) + ) + ) + ((= v1-0 2) + (if arg1 + (rat-light-manager-method-15 this 2 2 #t) + ) + ) + ((= v1-0 3) + (cond + (arg1 + (rat-light-manager-method-15 this 0 0 #f) + (rat-light-manager-method-15 this 3 0 #t) + ) + (else + (rat-light-manager-method-15 this 0 0 #t) + (rat-light-manager-method-15 this 3 0 #f) + ) + ) + ) + ((= v1-0 4) + (cond + (arg1 + (rat-light-manager-method-15 this 1 1 #f) + (rat-light-manager-method-15 this 4 1 #t) + ) + (else + (rat-light-manager-method-15 this 1 1 #t) + (rat-light-manager-method-15 this 4 1 #f) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 11 of type rat-light-manager +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this rat-light-manager) (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 + ) + ) + ) + (dotimes (s5-0 5) + (rat-light-manager-method-16 this s5-0 #f) + ) + (go (method-of-object this idle)) + ) + +;; definition of type min-rat-engine +(deftype min-rat-engine (process-drawable) + ((root collide-shape-moving :override) + (init-quat quaternion :inline) + (force-pos vector :inline) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (rot-speed float) + (ang-momentum float) + (rat-timer time-frame) + (notify-actor entity-actor) + (sound-id sound-id) + (rat-sound-id sound-id) + (rat-wheel-sound-id sound-id) + (light-index uint32) + (light-target float) + (wheel-angle float) + (wheel-sound-volume float) + (last-turn-time time-frame) + (rat-count uint32) + ) + (:state-methods + inactive + active + running + shutdown + ) + (:methods + (min-rat-engine-method-24 (_type_) none) + (min-rat-engine-method-25 (_type_) none) + (min-rat-engine-method-26 (_type_ float float float float) symbol) + (min-rat-engine-method-27 (_type_ process focus) none) + (min-rat-engine-method-28 (_type_) none) + ) + ) + +;; definition for method 3 of type min-rat-engine +(defmethod inspect ((this min-rat-engine)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tinit-quat: #~%" (-> this init-quat)) + (format #t "~2Tforce-pos: #~%" (-> this force-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 "~2Trot-speed: ~f~%" (-> this rot-speed)) + (format #t "~2Tang-momentum: ~f~%" (-> this ang-momentum)) + (format #t "~2Trat-timer: ~D~%" (-> this rat-timer)) + (format #t "~2Tnotify-actor: ~A~%" (-> this notify-actor)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (format #t "~2Trat-sound-id: ~D~%" (-> this rat-sound-id)) + (format #t "~2Trat-wheel-sound-id: ~D~%" (-> this rat-wheel-sound-id)) + (format #t "~2Tlight-index: ~D~%" (-> this light-index)) + (format #t "~2Tlight-target: ~f~%" (-> this light-target)) + (format #t "~2Twheel-angle: ~f~%" (-> this wheel-angle)) + (format #t "~2Twheel-sound-volume: ~f~%" (-> this wheel-sound-volume)) + (format #t "~2Tlast-turn-time: ~D~%" (-> this last-turn-time)) + (format #t "~2Trat-count: ~D~%" (-> this rat-count)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-min-rat-engine min-rat-engine min-rat-engine-lod0-jg min-rat-engine-idle-ja + ((min-rat-engine-lod0-mg (meters 20)) (min-rat-engine-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 3 11) + :origin-joint-index 5 + ) + +;; definition for method 24 of type min-rat-engine +;; WARN: Return type mismatch collide-shape vs none. +(defmethod min-rat-engine-method-24 ((this min-rat-engine)) + (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 4) 0))) + (set! (-> s5-0 total-prims) (the-as uint 5)) + (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-vector! (-> s4-0 local-sphere) 0.0 4096.0 0.0 45056.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 bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid rideable)) + (set! (-> v1-8 transform-index) 6) + (set-vector! (-> v1-8 local-sphere) 0.0 0.0 9011.2 30720.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) -13516.8 6553.6 -16384.0 9830.4) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-12 prim-core action) (collide-action solid)) + (set! (-> v1-12 transform-index) 3) + (set-vector! (-> v1-12 local-sphere) -1638.4 13926.4 -13926.4 22118.4) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 0.0 13516.8 40960.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) (the-as collide-shape-moving s5-0)) + ) + (none) + ) + +;; definition for function min-rat-engine-handler +(defbehavior min-rat-engine-handler min-rat-engine ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('ridden) + (min-rat-engine-method-27 self arg0 (the-as focus (-> arg3 param 0))) + ) + (('inside?) + (if (min-rat-engine-method-26 self (the-as float arg0) 25395.2 21299.2 8192.0) + #t + ) + ) + (('near?) + (if (min-rat-engine-method-26 self (the-as float arg0) 30720.0 24780.8 32768.0) + #t + ) + ) + (('wait-pos) + (let ((s5-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node min-rat-engine-lod0-jg ratrotation))) + (v1-7 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self init-quat))) + ) + (vector+float*! (the-as vector (-> arg3 param 0)) s5-0 v1-7 32768.0) + ) + ) + (('run-dir) + (vector-normalize! + (vector-cross! + (the-as vector (-> arg3 param 0)) + *y-vector* + (vector-z-quaternion! (the-as vector (-> arg3 param 0)) (-> self root quat)) + ) + 1.0 + ) + ) + (('run-pos) + (let* ((s2-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node min-rat-engine-lod0-jg ratrotation))) + (s1-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self init-quat))) + (s5-2 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self init-quat))) + (s3-2 (vector-flatten! + (new 'stack-no-clear 'vector) + (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> arg3 param 0)) s2-0) + s1-0 + ) + ) + (gp-0 (the-as object (-> arg3 param 1))) + ) + (let ((f30-0 2.0)) + (vector+float*! (the-as vector gp-0) s2-0 s1-0 12288.0) + (+! (-> s3-2 y) -8192.0) + (vector-normalize! s3-2 20480.0) + (vector+! (the-as vector gp-0) (the-as vector gp-0) s3-2) + (vector+float*! + (the-as vector gp-0) + (the-as vector gp-0) + s5-2 + (* 4096.0 + (+ 0.3 + (* 1.5 (sin (* 65536.0 (/ (the float (mod (current-time) (the int (* 300.0 f30-0)))) (* 300.0 f30-0))))) + ) + ) + ) + ) + gp-0 + ) + ) + (('run-up) + (let* ((a0-28 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node min-rat-engine-lod0-jg ratrotation))) + (a1-26 (vector-flatten! + (new 'stack-no-clear 'vector) + (vector-! (new 'stack-no-clear 'vector) (the-as vector (-> arg3 param 0)) a0-28) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + ) + ) + ) + (vector-normalize-copy! (the-as vector (-> arg3 param 1)) a1-26 -1.0) + ) + ) + ) + ) + +;; definition for function min-rat-engine-post +(defbehavior min-rat-engine-post min-rat-engine () + (let ((v1-2 (-> self entity extra perm))) + (when (logtest? (-> v1-2 status) (entity-perm-status bit-5)) + (if (= (-> v1-2 user-object 0) 1) + (set-mineb-lights! (the-as int (-> self light-index)) (-> self light-target)) + ) + ) + ) + (min-rat-engine-method-28 self) + (min-rat-engine-method-25 self) + (rider-post) + (none) + ) + +;; failed to figure out what this is: +(defstate inactive (min-rat-engine) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual running) + ) + (('turn) + (go-virtual running) + ) + (('claim-wheel?) + (let ((v1-6 (+ (-> self rat-count) 1))) + (set! (-> self rat-count) v1-6) + (= v1-6 1) + ) + ) + (else + (min-rat-engine-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self force-pos quad) (-> self root trans quad)) + ) + :trans (behavior () + (if (< (vector-vector-xz-distance (target-pos 0) (-> self root trans)) 204800.0) + (go-virtual active) + ) + ) + :code sleep-code + :post (behavior () + (min-rat-engine-method-28 self) + (if (< 0.0 (-> self ang-momentum)) + (ja-post) + ) + ) + ) + +;; failed to figure out what this is: +(defstate active (min-rat-engine) + :virtual #t + :event (-> (method-of-type min-rat-engine inactive) event) + :trans (behavior () + (set! (-> self force-pos quad) (-> self root trans quad)) + (rider-trans) + (if (< 245760.0 (vector-vector-xz-distance (target-pos 0) (-> self root trans))) + (go-virtual inactive) + ) + ) + :code (behavior () + (sleep-code) + ) + :post (behavior () + (min-rat-engine-post) + ) + ) + +;; failed to figure out what this is: +(defstate running (min-rat-engine) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('turn) + (let ((f0-0 2.0)) + (seek! + (-> self ang-momentum) + (* 8192.0 + (+ -91.68 + (* 16.68 (sin (* 65536.0 (/ (the float (mod (current-time) (the int (* 300.0 f0-0)))) (* 300.0 f0-0))))) + ) + ) + (* 409600.0 (seconds-per-frame)) + ) + ) + (let ((v0-2 (the-as object (current-time)))) + (set! (-> self last-turn-time) (the-as time-frame v0-2)) + v0-2 + ) + ) + (('running?) + #t + ) + (else + (min-rat-engine-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (set! (-> self rot-speed) 0.0) + (set-time! (-> self state-time)) + (set-time! (-> self last-turn-time)) + (logior! (-> self entity extra perm status) (entity-perm-status subtask-complete)) + (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-10 (-> self notify-actor)) + ) + (t9-0 + (if v1-10 + (-> v1-10 extra process) + ) + a1-0 + ) + ) + ) + (dotimes (gp-0 (+ (-> self actor-group-count) -1)) + (let ((s5-0 (-> self actor-group gp-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) 'trigger) + (let ((t9-1 send-event-function) + (v1-19 (-> s5-0 data s4-0 actor)) + ) + (t9-1 + (if v1-19 + (-> v1-19 extra process) + ) + a1-1 + ) + ) + ) + ) + ) + ) + (let ((v1-32 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 3))) + (set! (-> v1-32 prim-core action) (collide-action solid)) + (set! (-> v1-32 prim-core collide-as) (collide-spec obstacle camera-blocker)) + ) + (sound-play "rat-wheel-raise") + (set! (-> self wheel-sound-volume) 0.0) + ) + :trans (behavior () + (rider-trans) + (if (time-elapsed? (-> self last-turn-time) (seconds 0.5)) + (go-virtual shutdown) + ) + ) + :code (behavior () + (ja-no-eval :group! min-rat-engine-raise-ja :num! (seek! max 0.04) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.04)) + ) + (when (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status bit-13)))) + (if (res-lump-struct (-> self entity) 'camera-name structure) + (process-spawn + external-camera-controller + (-> self entity) + 1200 + #f + :name "external-camera-controller" + :to *entity-pool* + ) + ) + (process-entity-status! self (entity-perm-status bit-13) #t) + ) + (let ((gp-1 (+ (-> self actor-group-count) -1))) + (dotimes (s5-0 (-> self actor-group gp-1 length)) + (toggle-status + (the-as entity-actor (-> self actor-group gp-1 data s5-0 actor)) + (entity-perm-status subtask-complete) + #f + ) + ) + ) + (until #f + (ja-no-eval :group! min-rat-engine-spin-ja :num! (seek! max 0.4) :frame-num 0.0) + (until (ja-done? 0) + (seek! (-> self light-target) 1.0 (seconds-per-frame)) + (let ((gp-2 (-> self actor-group (+ (-> self actor-group-count) -1)))) + (dotimes (s5-1 (-> gp-2 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) 'start) + (let ((t9-11 send-event-function) + (v1-70 (-> gp-2 data s5-1 actor)) + ) + (t9-11 + (if v1-70 + (-> v1-70 extra process) + ) + a1-10 + ) + ) + ) + ) + ) + (suspend) + (ja :num! (seek! max 0.4)) + ) + ) + #f + ) + :post (behavior () + (sound-play "rat-whl-squeak" :id (-> self rat-sound-id)) + (sound-play-by-name + (static-sound-name "rat-wheel-gear") + (-> self rat-wheel-sound-id) + (the int (* 1024.0 (-> self wheel-sound-volume))) + 0 + 0 + (sound-group) + #t + ) + (seek! (-> self wheel-sound-volume) 1.0 (* 2.0 (seconds-per-frame))) + (min-rat-engine-post) + ) + ) + +;; failed to figure out what this is: +(defstate shutdown (min-rat-engine) + :virtual #t + :event min-rat-engine-handler + :enter (behavior () + (let ((v1-3 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 3))) + (set! (-> v1-3 prim-core action) (collide-action)) + (set! (-> v1-3 prim-core collide-as) (collide-spec)) + ) + 0 + ) + :trans rider-trans + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! min-rat-engine-lower-ja :num! (seek! max 0.03) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.03)) + ) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (go-virtual inactive) + ) + :post (behavior () + (seek! (-> self wheel-sound-volume) 1.0 (* 2.0 (seconds-per-frame))) + (min-rat-engine-post) + ) + ) + +;; definition for method 25 of type min-rat-engine +;; WARN: Return type mismatch sound-id vs none. +(defmethod min-rat-engine-method-25 ((this min-rat-engine)) + (if (!= (-> this ang-momentum) 0.0) + (sound-play-by-name + (static-sound-name "rat-wheel-loop") + (-> this sound-id) + (the int (* 1024.0 (lerp-scale 0.0 1.0 (fabs (-> this ang-momentum)) 0.0 409600.0))) + (the int (* 1524.0 (lerp-scale -1.0 0.0 (fabs (-> this ang-momentum)) 0.0 409600.0))) + 0 + (sound-group) + #t + ) + ) + (none) + ) + +;; definition for method 27 of type min-rat-engine +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod min-rat-engine-method-27 ((this min-rat-engine) (arg0 process) (arg1 focus)) + (when (= arg0 this) + (let ((a2-1 (handle->process (-> arg1 handle)))) + (if a2-1 + (set! (-> this force-pos quad) (-> (the-as process-focusable a2-1) root trans quad)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 28 of type min-rat-engine +;; WARN: Return type mismatch int vs none. +(defmethod min-rat-engine-method-28 ((this min-rat-engine)) + (let ((a0-2 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> this init-quat))) + (v1-1 (vector-! (new 'stack-no-clear 'vector) (-> this force-pos) (-> this root trans))) + ) + (+! (-> this ang-momentum) (* 10.0 (seconds-per-frame) (- (vector-dot a0-2 v1-1)))) + ) + (set! (-> this wheel-angle) + (the float + (sar + (shl + (the int (+ (-> this wheel-angle) (* 182.04445 (seconds-per-frame) (* 0.00024414062 (-> this ang-momentum))))) + 48 + ) + 48 + ) + ) + ) + (set! (-> this ang-momentum) (* 0.99 (-> this ang-momentum))) + 0 + (none) + ) + +;; definition for method 26 of type min-rat-engine +(defmethod min-rat-engine-method-26 ((this min-rat-engine) (arg0 float) (arg1 float) (arg2 float) (arg3 float)) + (with-pp + (let ((v1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> v1-0 from) (process->ppointer pp)) + (set! (-> v1-0 num-params) 1) + (set! (-> v1-0 message) 'trans) + (set! (-> v1-0 param 0) (the-as uint (new 'stack-no-clear 'vector))) + (let ((s2-0 (send-event-function (the-as process-tree arg0) v1-0))) + (when s2-0 + (let* ((s1-0 (-> this root trans)) + (a2-2 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (a1-4 (vector-! (new 'stack-no-clear 'vector) (the-as vector s2-0) s1-0)) + (f30-0 (vector-dot a1-4 a2-2)) + (s3-1 (vector-flatten! (new 'stack-no-clear 'vector) a1-4 a2-2)) + ) + (and (< 0.0 f30-0) + (< f30-0 arg1) + (< (vector-length s3-1) arg2) + (< (cos arg3) (fabs (vector-dot s3-1 (vector-negate! (new 'stack-no-clear 'vector) *y-vector*)))) + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 10 of type min-rat-engine +(defmethod deactivate ((this min-rat-engine)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this sound-id)) + (sound-stop (-> this rat-sound-id)) + (sound-stop (-> this rat-wheel-sound-id)) + (call-parent-method this) + (none) + ) + +;; definition for function joint-mod-rat-engine-callback +(defun joint-mod-rat-engine-callback ((arg0 cspace) (arg1 transformq)) + (let ((v1-0 (-> arg0 param1))) + (quaternion-rotate-z! (-> arg1 quat) (-> arg1 quat) (-> (the-as min-rat-engine v1-0) wheel-angle)) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + (none) + ) + +;; definition for method 11 of type min-rat-engine +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this min-rat-engine) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (min-rat-engine-method-24 this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-min-rat-engine" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((a0-5 (-> this skel root-channel 0))) + (set! (-> a0-5 frame-group) (the-as art-joint-anim (-> this draw art-group data 3))) + (set! (-> a0-5 frame-num) 0.0) + (joint-control-channel-group! a0-5 (the-as art-joint-anim (-> this draw art-group data 3)) num-func-identity) + ) + (transform-post) + (set! (-> this notify-actor) (entity-actor-lookup (-> this entity) 'alt-actor 0)) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-14 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-14 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-14)) + (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-10 (-> this node-list data 6))) + (set! (-> a0-10 param0) joint-mod-rat-engine-callback) + (set! (-> a0-10 param1) this) + ) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this rat-sound-id) (new-sound-id)) + (set! (-> this rat-wheel-sound-id) (new-sound-id)) + (set! (-> this light-index) (res-lump-value (-> this entity) 'extra-id uint :time -1000000000.0)) + (set! (-> this light-target) + (if (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + 1.0 + 0.0 + ) + ) + (set! (-> this wheel-angle) 0.0) + (set! (-> this rat-count) (the-as uint 0)) + (set! (-> this ang-momentum) 0.0) + (quaternion-copy! (-> this init-quat) (-> this root quat)) + (go (method-of-object this inactive)) + ) + +;; definition of type min-crane +(deftype min-crane (process-drawable) + () + (:state-methods + idle + ) + (:methods + (min-crane-method-21 (_type_) none) + ) + ) + +;; definition for method 3 of type min-crane +(defmethod inspect ((this min-crane)) + (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-min-crane min-crane min-crane-lod0-jg min-crane-idle-ja + ((min-crane-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -2 0 12) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defstate idle (min-crane) + :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 21 of type min-crane +;; WARN: Return type mismatch int vs none. +(defmethod min-crane-method-21 ((this min-crane)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 9) 0))) + (set! (-> s5-0 total-prims) (the-as uint 10)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 82.7392 -16090.727 1494.6304 47322.727) + (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 action) (collide-action solid)) + (set! (-> v1-8 transform-index) 6) + (set-vector! (-> v1-8 local-sphere) 8350.516 3842.048 -22282.24 10069.197) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 6) + (set-vector! (-> v1-10 local-sphere) 8350.516 3842.048 -1823.9489 10069.197) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-mesh s5-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) 5) + (set-vector! (-> v1-12 local-sphere) 8362.394 -8660.173 -23385.293 18361.959) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 3) (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) 5) + (set-vector! (-> v1-14 local-sphere) 8362.394 -8660.173 -2926.592 18361.959) + ) + (let ((v1-16 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 4) (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) 9) + (set-vector! (-> v1-16 local-sphere) -8350.516 -3841.2288 22282.24 10069.197) + ) + (let ((v1-18 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 5) (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) 9) + (set-vector! (-> v1-18 local-sphere) -8350.516 -3841.2288 1823.9489 10069.197) + ) + (let ((v1-20 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 6) (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) 8) + (set-vector! (-> v1-20 local-sphere) -8362.394 8660.173 23385.293 18361.959) + ) + (let ((v1-22 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 7) (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) 8) + (set-vector! (-> v1-22 local-sphere) -8362.394 8660.173 2926.592 18361.959) + ) + (let ((v1-24 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 8) (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) 4) + (set-vector! (-> v1-24 local-sphere) 0.0 -4455.629 0.0 23633.51) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-27 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-27 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-27 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 11 of type min-crane +(defmethod init-from-entity! ((this min-crane) (arg0 entity-actor)) + (min-crane-method-21 this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-min-crane" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +;; definition of type min-target-sign +(deftype min-target-sign (mine-platform-base) + ((off-part sparticle-launch-control) + (on-part sparticle-launch-control) + (track-pos vector :inline) + (alt-actor entity-actor) + (touched-train? symbol) + ) + (:state-methods + dormant + idle + lowering + idle-down + ) + (:methods + (spawn-on-off-part (_type_ symbol) object) + ) + ) + +;; definition for method 3 of type min-target-sign +(defmethod inspect ((this min-target-sign)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type mine-platform-base inspect))) + (t9-0 this) + ) + (format #t "~2Toff-part: ~A~%" (-> this off-part)) + (format #t "~2Ton-part: ~A~%" (-> this on-part)) + (format #t "~2Ttrack-pos: #~%" (-> this track-pos)) + (format #t "~2Talt-actor: ~A~%" (-> this alt-actor)) + (format #t "~2Ttouched-train?: ~A~%" (-> this touched-train?)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-min-target-sign min-target-sign min-target-sign-lod0-jg min-target-sign-idle-ja + ((min-target-sign-lod0-mg (meters 999999))) + :bounds (static-spherem 0 3 3 22) + ) + +;; definition for function target-sign-event-handler +;; WARN: Return type mismatch symbol vs object. +(defbehavior target-sign-event-handler min-target-sign ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('down?) + (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete)) + ) + ) + ) + +;; failed to figure out what this is: +(defstate dormant (min-target-sign) + :virtual #t + :event (the-as (function process int symbol event-message-block object) eco-door-event-handler) + :enter (behavior () + (setup-masks (-> self draw) 4 10) + ) + :trans (behavior () + (if (task-node-open? (game-task-node mine-blow-resolution)) + (go-virtual idle) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate idle (min-target-sign) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (-> block param 1) + (let ((gp-0 (the-as touching-shapes-entry (-> block param 0)))) + (cond + (gp-0 + (let ((s5-0 (-> gp-0 head))) + (while s5-0 + (let ((v1-5 (get-touched-prim s5-0 (-> self root) gp-0))) + (when (= (-> v1-5 prim-id) #x7400e700) + (sound-play "target-hit") + (go-virtual lowering) + ) + ) + (set! s5-0 (-> s5-0 next)) + ) + ) + #f + ) + (else + (sound-play "target-hit") + (go-virtual lowering) + ) + ) + ) + ) + (('hit) + (logior! (-> self entity extra perm status) (entity-perm-status subtask-complete)) + (go-virtual lowering) + ) + (else + (target-sign-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (logior! (-> self mask) (process-mask enemy)) + (setup-masks (-> self draw) 8 6) + ) + :trans (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (spawn-on-off-part self #f) + ) + :code transform-and-sleep-code + ) + +;; failed to figure out what this is: +(defstate lowering (min-target-sign) + :virtual #t + :parent (min-target-sign plat-base-state) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touched) + (when (send-event proc 'go-explode) + (let ((v0-1 (the-as object #t))) + (set! (-> self touched-train?) (the-as symbol v0-1)) + v0-1 + ) + ) + ) + (else + (target-sign-event-handler proc argc message block) + ) + ) + ) + :enter (behavior () + (setup-masks (-> self draw) 2 12) + ) + :trans (behavior () + (when (>= 2.75 (ja-frame-num 0)) + (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) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (let ((gp-0 0)) + (ja-no-eval :group! min-target-sign-trackdown-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((f30-0 (ja-frame-num 0)) + (s5-0 (ja-num-frames 0)) + ) + (when (and (< 2.75 f30-0) + (not (-> self touched-train?)) + (not (logtest? (-> self entity extra perm status) (entity-perm-status subtask-complete))) + ) + (logior! (-> self entity extra perm status) (entity-perm-status subtask-complete)) + (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) 'rail-down) + (let ((t9-4 send-event-function) + (v1-27 (-> self alt-actor)) + ) + (t9-4 + (if v1-27 + (-> v1-27 extra process) + ) + a1-2 + ) + ) + ) + ) + (when (< gp-0 (the int f30-0)) + (if (= (the int f30-0) (+ s5-0 -13)) + (sound-play "track-fall") + ) + ) + ) + (set! gp-0 (the int (ja-frame-num 0))) + (spawn-on-off-part self #t) + (suspend) + (ja :num! (seek!)) + ) + ) + (go-virtual idle-down) + ) + ) + +;; failed to figure out what this is: +(defstate idle-down (min-target-sign) + :virtual #t + :parent (min-target-sign plat-base-state) + :event target-sign-event-handler + :trans (behavior () + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (spawn-on-off-part self #t) + ) + :code (behavior () + (ja :group! min-target-sign-idleb-ja :num! none :frame-num 0.0) + (transform-and-sleep-code) + ) + ) + +;; definition for method 42 of type min-target-sign +(defmethod spawn-on-off-part ((this min-target-sign) (arg0 symbol)) + (spawn + (if arg0 + (-> this on-part) + (-> this off-part) + ) + (-> this node-list data 15 bone transform trans) + ) + (spawn + (if arg0 + (-> this on-part) + (-> this off-part) + ) + (-> this node-list data 16 bone transform trans) + ) + ) + +;; definition for method 7 of type min-target-sign +;; WARN: Return type mismatch mine-platform-base vs min-target-sign. +(defmethod relocate ((this min-target-sign) (offset int)) + (if (nonzero? (-> this off-part)) + (&+! (-> this off-part) offset) + ) + (if (nonzero? (-> this on-part)) + (&+! (-> this on-part) offset) + ) + (the-as min-target-sign ((method-of-type mine-platform-base relocate) this offset)) + ) + +;; definition for method 10 of type min-target-sign +(defmethod deactivate ((this min-target-sign)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this off-part)) + (kill-particles (-> this off-part)) + ) + (if (nonzero? (-> this on-part)) + (kill-particles (-> this on-part)) + ) + ((method-of-type mine-platform-base deactivate) this) + (none) + ) + +;; definition for method 36 of type min-target-sign +(defmethod get-skel ((this min-target-sign)) + (art-group-get-by-name *level* "skel-min-target-sign" (the-as (pointer level) #f)) + ) + +;; definition for method 32 of type min-target-sign +;; WARN: Return type mismatch symbol vs none. +(defmethod init-collision! ((this min-target-sign)) + (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 5) 0))) + (set! (-> s5-0 total-prims) (the-as uint 6)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak obstacle hit-by-others-list player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable pull-rider-can-collide)) + (set! (-> s4-0 transform-index) 14) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 24576.0 69632.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (let ((v1-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-with) (collide-spec obstacle hit-by-others-list)) + (set! (-> v1-11 prim-core action) (collide-action)) + (set! (-> v1-11 transform-index) 14) + (set-vector! (-> v1-11 local-sphere) 0.0 0.0 49152.0 32768.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 camera-blocker pusher)) + (set! (-> v1-13 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-13 prim-core action) (collide-action solid rideable pull-rider-can-collide)) + (set! (-> v1-13 transform-index) 14) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 38912.0 53248.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)) + (set! (-> v1-15 transform-index) 3) + (set-vector! (-> v1-15 local-sphere) 0.0 -20480.0 4096.0 24576.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint #x7400e700)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-17 prim-core action) (collide-action)) + (set! (-> v1-17 transform-index) 3) + (set-vector! (-> v1-17 local-sphere) 10240.0 -23756.8 1228.8 10240.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint #x7400e700)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-19 prim-core action) (collide-action)) + (set! (-> v1-19 transform-index) 3) + (set-vector! (-> v1-19 local-sphere) -10240.0 -23756.8 1228.8 10240.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) + ) + (set! (-> this root event-self) 'touched) + (none) + ) + +;; definition for method 21 of type min-target-sign +;; WARN: Return type mismatch structure vs vector. +(defmethod get-trans ((this min-target-sign) (arg0 int)) + "Get the `trans` for this process." + (the-as vector (cond + ((= arg0 3) + (let* ((s4-0 (-> this root)) + (gp-0 (-> s4-0 root-prim)) + ) + (if (< 0.0 (vector-dot + (vector-! (new 'stack-no-clear 'vector) (target-pos 0) (-> s4-0 trans)) + (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> s4-0 quat)) + ) + ) + (-> (the-as collide-shape-prim-group gp-0) child 3 prim-core) + (-> (the-as collide-shape-prim-group gp-0) child 4 prim-core) + ) + ) + ) + (else + ((method-of-type process-focusable get-trans) this arg0) + ) + ) + ) + ) + +;; definition for method 20 of type min-target-sign +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this min-target-sign)) + (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 11 of type min-target-sign +(defmethod init-from-entity! ((this min-target-sign) (arg0 entity-actor)) + (let ((t9-0 (method-of-type mine-platform-base init-from-entity!))) + (t9-0 this arg0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this off-part) (create-launch-control (-> *part-group-id-table* 598) this)) + (set! (-> this on-part) (create-launch-control (-> *part-group-id-table* 599) this)) + (set! (-> this alt-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (set! (-> this touched-train?) #f) + (let ((v1-11 (-> *game-info* sub-task-list (game-task-node mine-blow-resolution)))) + (when (and v1-11 (< (the-as uint 2) (-> v1-11 death-count))) + (let ((f0-1 (/ 1.0 (- 1.0 (* 0.04 (the float (max 0 (min 5 (the-as int (+ (-> v1-11 death-count) -2))))))))) + (v1-15 (the-as collide-shape-prim-group (-> this root root-prim))) + ) + (set! (-> v1-15 child 3 local-sphere w) (* (-> v1-15 child 3 local-sphere w) f0-1)) + (set! (-> v1-15 child 4 local-sphere w) (* (-> v1-15 child 4 local-sphere w) f0-1)) + ) + ) + ) + (cond + ((or (task-node-closed? (game-task-node mine-blow-resolution)) + (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + ) + (let ((a0-23 (-> this skel root-channel 0))) + (set! (-> a0-23 frame-group) (the-as art-joint-anim (-> this draw art-group data 5))) + (set! (-> a0-23 frame-num) 0.0) + (joint-control-channel-group-eval! + a0-23 + (the-as art-joint-anim (-> this draw art-group data 5)) + num-func-none + ) + ) + (ja-post) + (go (method-of-object this idle-down)) + ) + ((task-node-open? (game-task-node mine-blow-resolution)) + (let ((a0-25 (-> this skel root-channel 0))) + (set! (-> a0-25 frame-group) (the-as art-joint-anim (-> this draw art-group data 3))) + (set! (-> a0-25 frame-num) 1.0) + (joint-control-channel-group-eval! + a0-25 + (the-as art-joint-anim (-> this draw art-group data 3)) + num-func-none + ) + ) + (ja-post) + (go (method-of-object this idle)) + ) + (else + (let ((a0-26 (-> this skel root-channel 0))) + (set! (-> a0-26 frame-group) (the-as art-joint-anim (-> this draw art-group data 2))) + (set! (-> a0-26 frame-num) 0.0) + (joint-control-channel-group-eval! + a0-26 + (the-as art-joint-anim (-> this draw art-group data 2)) + num-func-none + ) + ) + (ja-post) + (go (method-of-object this dormant)) + ) + ) + ) + +;; definition of type min-bomb-elevator +(deftype min-bomb-elevator (elevator) + ((alt-actor entity-actor) + (bomb-train-offset float) + (wheel-angle float) + ) + ) + +;; definition for method 3 of type min-bomb-elevator +(defmethod inspect ((this min-bomb-elevator)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type elevator inspect))) + (t9-0 this) + ) + (format #t "~2Talt-actor: ~A~%" (-> this alt-actor)) + (format #t "~2Tbomb-train-offset: ~f~%" (-> this bomb-train-offset)) + (format #t "~2Twheel-angle: ~f~%" (-> this wheel-angle)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-min-bomb-elevator min-bomb-elevator min-bomb-elevator-lod0-jg min-bomb-elevator-idle-ja + ((min-bomb-elevator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 50) + ) + +;; failed to figure out what this is: +(defstate waiting (min-bomb-elevator) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('ridden) + (process-grab? *target* #f) + ) + ) + ((-> (method-of-type elevator waiting) event) proc argc message block) + ) + :post (behavior () + (let ((t9-0 (-> (method-of-type elevator waiting) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (when (task-node-closed? (game-task-node mine-blow-elevator)) + (send-event self 'jump-to 'top) + (go-virtual dormant) + ) + ) + ) + +;; failed to figure out what this is: +(defstate running (min-bomb-elevator) + :virtual #t + :enter (behavior () + (set-setting! 'music #f 0.0 0) + (let ((t9-1 (-> (method-of-type elevator running) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :post (behavior () + (let ((t9-0 (-> (method-of-type elevator running) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (let* ((a0-0 (-> self alt-actor)) + (v1-4 (if a0-0 + (-> a0-0 extra process) + ) + ) + ) + (if v1-4 + (set! (-> (the-as process-drawable v1-4) root trans y) (+ (-> self root trans y) (-> self bomb-train-offset))) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate arrived (min-bomb-elevator) + :virtual #t + :enter (behavior () + (remove-setting! 'music) + (let ((t9-1 (-> (method-of-type elevator arrived) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (let ((a1-0 (new 'stack-no-clear 'array 'symbol 3))) + (set! (-> a1-0 2) 'mine6) + (set! (-> a1-0 1) 'mine5) + (set! (-> a1-0 0) 'mine4) + (want-sound-banks *load-state* a1-0) + ) + (go-virtual dormant) + ) + ) + +;; definition for function min-bomb-elevator-callback +;; WARN: Return type mismatch int vs none. +(defun min-bomb-elevator-callback ((arg0 cspace) (arg1 transformq)) + (let ((v1-0 (the-as min-bomb-elevator (-> arg0 param1)))) + (when (and (-> v1-0 next-state) (= (-> v1-0 next-state name) 'running)) + (set! (-> v1-0 wheel-angle) + (the float + (sar (shl (the int (+ (-> v1-0 wheel-angle) (* -0.52040726 (seconds-per-frame) (-> v1-0 speed)))) 48) 48) + ) + ) + (quaternion-rotate-local-x! (-> arg1 quat) (-> arg1 quat) (-> v1-0 wheel-angle)) + (cspace<-parented-transformq-joint! arg0 arg1) + ) + ) + 0 + (none) + ) + +;; definition for method 31 of type min-bomb-elevator +(defmethod get-art-group ((this min-bomb-elevator)) + (art-group-get-by-name *level* "skel-min-bomb-elevator" (the-as (pointer level) #f)) + ) + +;; definition for method 32 of type min-bomb-elevator +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-collision! ((this min-bomb-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 11) 0))) + (set! (-> s5-0 total-prims) (the-as uint 12)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list pusher)) + (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 204800.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 0)))) + (set! (-> v1-13 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-13 prim-core collide-with) (collide-spec jak bot player-list pusher)) + (set! (-> v1-13 prim-core action) (collide-action solid rideable)) + (set! (-> v1-13 transform-index) 3) + (set-vector! (-> v1-13 local-sphere) 61.0304 4443.7505 -46.6944 153172.38) + ) + (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 bot player-list pusher)) + (set! (-> v1-15 prim-core action) (collide-action solid rideable)) + (set! (-> v1-15 transform-index) 3) + (set-vector! (-> v1-15 local-sphere) 30.72 13204.275 -46.6944 137356.9) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak bot player-list pusher)) + (set! (-> v1-17 prim-core action) (collide-action solid rideable)) + (set! (-> v1-17 transform-index) 3) + (set-vector! (-> v1-17 local-sphere) -7494.0415 18259.148 -1234.1248 130382.234) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak bot player-list pusher)) + (set! (-> v1-19 prim-core action) (collide-action solid rideable)) + (set! (-> v1-19 transform-index) 3) + (set-vector! (-> v1-19 local-sphere) 13039.616 18259.148 -1234.1248 130382.234) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 4) (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak bot player-list pusher)) + (set! (-> v1-21 prim-core action) (collide-action solid rideable)) + (set! (-> v1-21 transform-index) 3) + (set-vector! (-> v1-21 local-sphere) -51408.895 58564.61 -18715.443 124619.984) + ) + (let ((v1-23 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 5) (the-as uint 0)))) + (set! (-> v1-23 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-23 prim-core collide-with) (collide-spec jak bot player-list pusher)) + (set! (-> v1-23 prim-core action) (collide-action solid rideable)) + (set! (-> v1-23 transform-index) 3) + (set-vector! (-> v1-23 local-sphere) 51921.305 58564.61 -18715.443 124619.984) + ) + (let ((v1-25 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 6) (the-as uint 0)))) + (set! (-> v1-25 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-25 prim-core collide-with) (collide-spec jak bot player-list pusher)) + (set! (-> v1-25 prim-core action) (collide-action solid rideable)) + (set! (-> v1-25 transform-index) 3) + (set-vector! (-> v1-25 local-sphere) 56478.926 37066.344 -122880.0 32969.113) + ) + (let ((v1-27 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 7) (the-as uint 0)))) + (set! (-> v1-27 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-27 prim-core collide-with) (collide-spec jak bot player-list pusher)) + (set! (-> v1-27 prim-core action) (collide-action solid rideable)) + (set! (-> v1-27 transform-index) 3) + (set-vector! (-> v1-27 local-sphere) -56412.98 37066.344 -122880.0 32969.113) + ) + (let ((v1-29 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 8) (the-as uint 0)))) + (set! (-> v1-29 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-29 prim-core collide-with) (collide-spec jak bot player-list pusher)) + (set! (-> v1-29 prim-core action) (collide-action solid rideable)) + (set! (-> v1-29 transform-index) 3) + (set-vector! (-> v1-29 local-sphere) -78.2336 100379.03 -123167.945 81738.14) + ) + (let ((v1-31 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 9) (the-as uint 0)))) + (set! (-> v1-31 prim-core collide-as) (collide-spec obstacle camera-blocker)) + (set! (-> v1-31 prim-core collide-with) (collide-spec jak bot player-list pusher)) + (set! (-> v1-31 prim-core action) (collide-action solid rideable)) + (set! (-> v1-31 transform-index) 3) + (set-vector! (-> v1-31 local-sphere) -78.2336 39539.918 -123167.945 50748.62) + ) + (let ((v1-34 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 10) (the-as uint (shl #xfe00 16))))) + (set! (-> v1-34 prim-core action) (collide-action solid)) + (set! (-> v1-34 transform-index) 3) + (set-vector! (-> v1-34 local-sphere) 0.0 0.0 0.0 204800.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-37 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-37 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-37 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (none) + ) + +;; definition for method 34 of type min-bomb-elevator +;; WARN: Return type mismatch sound-spec vs none. +(defmethod base-plat-method-34 ((this min-bomb-elevator)) + (set! (-> this bounce-scale) 0.0) + (set! (-> this alt-actor) (entity-actor-lookup (-> this entity) 'alt-actor 0)) + (if (-> this alt-actor) + (set! (-> this bomb-train-offset) (- (-> this alt-actor extra trans y) (-> this entity extra trans y))) + ) + (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) + (let ((a0-7 (-> this node-list data 4))) + (set! (-> a0-7 param0) min-bomb-elevator-callback) + (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 0)) + (set! (-> this sound-arrived) (static-sound-spec "mine-elev-stop" :group 0)) + (none) + ) + +;; definition for method 42 of type min-bomb-elevator +;; WARN: Return type mismatch object vs none. +(defmethod go-arrived-or-waiting ((this min-bomb-elevator)) + (if (task-node-closed? (game-task-node mine-blow-introduction)) + (go (method-of-object this waiting)) + ) + (go (method-of-object this dormant)) + (none) + ) + +;; definition of type min-elev-doors +(deftype min-elev-doors (process-drawable) + () + (:state-methods + idle + open + opened + ) + (:methods + (min-elev-doors-method-23 (_type_) none) + ) + ) + +;; definition for method 3 of type min-elev-doors +(defmethod inspect ((this min-elev-doors)) + (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-min-elev-doors min-elev-doors min-elev-doors-lod0-jg min-elev-doors-idle-ja + ((min-elev-doors-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 50) + ) + +;; failed to figure out what this is: +(defstate idle (min-elev-doors) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual open) + ) + (('open?) + #f + ) + ) + ) + :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 open (min-elev-doors) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('open?) + #t + ) + ) + ) + :code (behavior () + (sound-play "mine-door") + (ja-no-eval :group! min-elev-doors-open-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) + (go-virtual opened) + ) + :post transform-post + ) + +;; failed to figure out what this is: +(defstate opened (min-elev-doors) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('open?) + #t + ) + ) + ) + :code (behavior () + (ja-channel-set! 1) + (ja :group! min-elev-doors-open-ja :num! (identity (the float (ja-num-frames 0)))) + (transform-post) + (sleep-code) + ) + ) + +;; definition for method 23 of type min-elev-doors +;; WARN: Return type mismatch int vs none. +(defmethod min-elev-doors-method-23 ((this min-elev-doors)) + (let ((s5-0 (new 'process 'collide-shape this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 penetrated-by) (penetrate)) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 2) 0))) + (set! (-> s5-0 total-prims) (the-as uint 3)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 409600.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 -40960.0 184320.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 4) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 40960.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 min-elev-doors +(defmethod init-from-entity! ((this min-elev-doors) (arg0 entity-actor)) + (min-elev-doors-method-23 this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-min-elev-doors" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (if (or (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (task-node-open? (game-task-node mine-blow-resolution)) + ) + (go (method-of-object this opened)) + ) + (go (method-of-object this idle)) + ) + +;; definition of type min-crane-switch +(deftype min-crane-switch (basebutton) + ((rog handle) + ) + ) + +;; definition for method 3 of type min-crane-switch +(defmethod inspect ((this min-crane-switch)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type basebutton inspect))) + (t9-0 this) + ) + (format #t "~2Trog: ~D~%" (-> this rog)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-min-crane-switch min-crane-switch min-crane-switch-lod0-jg min-crane-switch-idle-ja + ((min-crane-switch-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; failed to figure out what this is: +(defstate down-idle (min-crane-switch) + :virtual #t + :code (behavior () + (sound-play "floor-switch") + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 0.5)) + (suspend) + ) + ) + (when (not (task-node-closed? (game-task-node mine-blow-introduction))) + (let ((a1-1 (new 'stack-no-clear 'array 'symbol 3))) + (set! (-> a1-1 2) 'mine6) + (set! (-> a1-1 1) 'mine5) + (set! (-> a1-1 0) 'mine10) + (want-sound-banks *load-state* a1-1) + ) + (suspend) + (process-spawn scene-player :init scene-player-init "mine-train-intro" #t #f :name "scene-player") + ) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate up-idle (min-crane-switch) + :virtual #t + :exit (behavior () + (send-event (handle->process (-> self rog)) 'leave) + (let ((t9-1 (-> (method-of-type basebutton up-idle) exit))) + (if t9-1 + (t9-1) + ) + ) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type basebutton up-idle) trans))) + (if t9-0 + (t9-0) + ) + ) + (when (and (or (task-node-closed? (game-task-node mine-explore-armor)) + (and (kiosk?) (task-node-open? (game-task-node mine-explore-armor))) + ) + (= (-> self rog) #f) + ) + (let ((gp-0 (new 'stack-no-clear 'task-arrow-params))) + (set! (-> gp-0 pos quad) (-> self root trans 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 rog) (process->handle (task-arrow-spawn gp-0 self))) + ) + ) + ) + ) + +;; definition for method 35 of type min-crane-switch +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this min-crane-switch)) + (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 obstacle)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 4096.0 0.0 8192.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 3072.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 4) + (set-vector! (-> v1-10 local-sphere) 0.0 3686.4 1843.2 5324.8) + ) + (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 34 of type min-crane-switch +;; WARN: Return type mismatch int vs none. +(defmethod init-skel-and-ja! ((this min-crane-switch)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-min-crane-switch" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (ja-channel-set! 1) + (cond + ((logtest? (-> this button-status) (button-status pressed)) + (let ((s5-1 (-> this skel root-channel 0))) + (joint-control-channel-group-eval! + s5-1 + (the-as art-joint-anim (-> this draw art-group data 2)) + num-func-identity + ) + (set! (-> s5-1 frame-num) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 2)) frames num-frames) -1)) + ) + ) + ) + (else + (let ((s5-2 (-> this skel root-channel 0))) + (joint-control-channel-group-eval! + s5-2 + (the-as art-joint-anim (-> this draw art-group data 2)) + num-func-identity + ) + (set! (-> s5-2 frame-num) 0.0) + ) + ) + ) + (set! (-> this anim-speed) 2.0) + (set! (-> this rog) (the-as handle #f)) + (transform-post) + (none) + ) + +;; definition for method 36 of type min-crane-switch +;; WARN: Return type mismatch int vs none. +(defmethod prepare-trigger-event! ((this min-crane-switch)) + (logior! (-> this button-status) (button-status button-status-3)) + 0 + (none) + ) + +;; definition of type min-door +(deftype min-door (process-drawable) + () + (:state-methods + idle + exploded + ) + (:methods + (min-door-method-22 (_type_) none) + (min-door-method-23 (_type_) none) + ) + ) + +;; definition for method 3 of type min-door +(defmethod inspect ((this min-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-min-door min-door min-door-lod0-jg min-door-idle-ja + ((min-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 25) + ) + +;; failed to figure out what this is: +(defskelgroup skel-min-door-break min-door-break min-door-break-lod0-jg min-door-break-idle-ja + ((min-door-break-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 100) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defstate idle (min-door) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('subtask-complete) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + ) + ) + ) + :code (behavior () + (ja :group! (ja-group) :num! min) + (transform-and-sleep) + ) + ) + +;; failed to figure out what this is: +(defstate exploded (min-door) + :virtual #t + :code (behavior () + (ja :group! (ja-group) :num! min) + (transform-and-sleep) + ) + ) + +;; definition for method 22 of type min-door +;; WARN: Return type mismatch int vs none. +(defmethod min-door-method-22 ((this min-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 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 action) (collide-action solid)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 143360.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 143360.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) 0.0 0.0 0.0 81920.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 23 of type min-door +;; WARN: Return type mismatch int vs none. +(defmethod min-door-method-23 ((this min-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 4) 0))) + (set! (-> s5-0 total-prims) (the-as uint 5)) + (set! (-> s4-0 prim-core collide-as) (collide-spec obstacle)) + (set! (-> s4-0 prim-core action) (collide-action solid)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 163840.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 38912.0 0.0 102400.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 3) + (set-vector! (-> v1-10 local-sphere) -71680.0 -51200.0 71680.0 40960.0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-12 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-12 prim-core action) (collide-action solid)) + (set! (-> v1-12 transform-index) 3) + (set-vector! (-> v1-12 local-sphere) -61440.0 -51200.0 0.0 61440.0) + ) + (let ((v1-14 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-14 prim-core collide-as) (collide-spec obstacle)) + (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) 40960.0 -40960.0 20480.0 81920.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 11 of type min-door +(defmethod init-from-entity! ((this min-door) (arg0 entity-actor)) + (cond + ((or (task-node-closed? (game-task-node mine-blow-resolution)) + (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + ) + (min-door-method-23 this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-min-door-break" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this exploded)) + ) + (else + (min-door-method-22 this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-min-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + ) + ) + +;; definition of type min-elec-gate +(deftype min-elec-gate (elec-gate) + () + ) + +;; definition for method 3 of type min-elec-gate +(defmethod inspect ((this min-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 30 of type min-elec-gate +;; WARN: Return type mismatch int vs none. +(defmethod elec-gate-method-30 ((this min-elec-gate) (arg0 float)) + (let ((v1-1 (level-get *level* 'minec))) + (when v1-1 + (let ((v1-2 (-> v1-1 mood-context state))) + (set! (-> v1-2 3) (the-as uint arg0)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 27 of type min-elec-gate +;; WARN: Return type mismatch int vs object. +(defmethod go-initial-state ((this min-elec-gate)) + (if (task-node-closed? (game-task-node mine-blow-elevator)) + ((method-of-type elec-gate go-initial-state) this) + (go (method-of-object this idle)) + ) + 0 + ) + +;; definition of type min-boss-elev +(deftype min-boss-elev (elevator) + ((going-down? symbol) + (sound-rotating-loop sound-spec) + ) + ) + +;; definition for method 3 of type min-boss-elev +(defmethod inspect ((this min-boss-elev)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type elevator inspect))) + (t9-0 this) + ) + (format #t "~2Tgoing-down?: ~A~%" (-> this going-down?)) + (format #t "~2Tsound-rotating-loop: ~A~%" (-> this sound-rotating-loop)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-min-boss-elev min-boss-elev min-boss-elev-lod0-jg min-boss-elev-idle-ja + ((min-boss-elev-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 15) + ) + +;; failed to figure out what this is: +(defstate dormant (min-boss-elev) + :virtual #t + :enter (behavior () + (quaternion-copy! (-> self root quat) (-> self entity quat)) + ) + ) + +;; failed to figure out what this is: +(defstate running (min-boss-elev) + :virtual #t + :post (behavior () + (let ((gp-0 (-> self root quat)) + (s5-0 (-> self entity quat)) + ) + (quaternion-pseudo-seek gp-0 gp-0 s5-0 0.005) + (if (nonzero? (-> self sound-rotating-loop)) + (sound-play-by-spec (-> self sound-rotating-loop) (-> self sound-id) (-> self root trans)) + ) + (cond + ((< 0.9999976 (fabs (-> (quaternion*! + (new 'stack-no-clear 'quaternion) + (quaternion-inverse! (new 'stack-no-clear 'quaternion) gp-0) + s5-0 + ) + w + ) + ) + ) + (when (not (-> self going-down?)) + (set! (-> self going-down?) #t) + (sound-stop (-> self sound-id)) + (set! (-> self sound-id) (new-sound-id)) + ) + (let ((t9-6 (-> (method-of-type elevator running) post))) + (if t9-6 + ((the-as (function none) t9-6)) + ) + ) + ) + (else + (move-post) + ) + ) + ) + ) + ) + +;; definition for method 31 of type min-boss-elev +(defmethod get-art-group ((this min-boss-elev)) + (art-group-get-by-name *level* "skel-min-boss-elev" (the-as (pointer level) #f)) + ) + +;; definition for method 32 of type min-boss-elev +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-collision! ((this min-boss-elev)) + (let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum usually-hit-by-player)))) + (set! (-> s5-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s5-0 reaction) cshape-reaction-default) + (set! (-> s5-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 1) 0))) + (set! (-> s5-0 total-prims) (the-as uint 2)) + (set! (-> s4-0 prim-core collide-as) (collide-spec pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 61440.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 61440.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-18 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-18 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-18 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + (none) + ) + +;; definition for method 34 of type min-boss-elev +;; WARN: Return type mismatch sound-spec vs none. +(defmethod base-plat-method-34 ((this min-boss-elev)) + (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 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) + ) + +;; failed to figure out what this is: +(defskelgroup skel-min-airlock-door min-airlock-door min-airlock-door-lod0-jg min-airlock-door-idle-ja + ((min-airlock-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 10 0 20) + ) + +;; definition of type min-airlock-door +(deftype min-airlock-door (com-airlock) + () + ) + +;; definition for method 3 of type min-airlock-door +(defmethod inspect ((this min-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 min-airlock-door +(defmethod init-from-entity! ((this min-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 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) 4) + (set-vector! (-> v1-8 local-sphere) 51200.0 40960.0 0.0 61440.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 5) + (set-vector! (-> v1-10 local-sphere) -51200.0 40960.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-min-airlock-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this open-frame) 30.0) + (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) + ) + +;; definition of type mine-music-manager +(deftype mine-music-manager (task-manager) + () + ) + +;; definition for method 3 of type mine-music-manager +(defmethod inspect ((this mine-music-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 + ) + +;; 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 0000000000..3a027fab8d --- /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-part_REF.gc b/test/decompiler/reference/jak3/levels/mine/mine-part_REF.gc new file mode 100644 index 0000000000..6b6a826497 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mine/mine-part_REF.gc @@ -0,0 +1,1784 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-minb-light-glow + :id 597 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2310 :fade-after (meters 120) :flags (sp6)) + (sp-item 2311 :fade-after (meters 120) :flags (sp6)) + (sp-item 2312 :fade-after (meters 120) :flags (sp6)) + ) + ) + +;; failed to figure out what this is: +(defpart 2310 + :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 2311 + :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 2312 + :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-min-target-sign-off + :id 598 + :bounds (static-bspherem 0 0 0 2.5) + :parts ((sp-item 2313 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2313 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 9)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 16.0) + (:b 16.0) + (:a 28.0 2.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-min-target-sign-on + :id 599 + :bounds (static-bspherem 0 0 0 2.5) + :parts ((sp-item 2314 :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 2314 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 9)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 16.0) + (:g 16.0) + (:b 255.0) + (:a 28.0 2.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 glow)) + (:userdata 4096.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2315 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 2.0 1.0) + (:scale-x (meters 0.3) (meters 0.1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.3) (meters 0.1)) + (:r 120.0 5.0) + (:g 120.0 5.0) + (:b 80.0 5.0) + (:a 128.0) + (:vel-z (meters -0.016666668) (meters -0.083333336)) + (:scalevel-x (meters -0.00066666666)) + (:rotvel-z (degrees -0.6666667) (degrees 1.3333334)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667) (meters -0.00033333333)) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-13 launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x408b00 #x40a200 #x40a600 #x40aa00)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -40) (degrees 80)) + (:conerot-y (degrees -40) (degrees 80)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 2316 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 0.4) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 60.0) + (:g 70.0) + (:b 50.0) + (:a 40.0 40.0) + (:vel-z (meters -0.033333335) (meters -0.06666667)) + (:scalevel-x (meters 0.016666668)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.94) + (:timer (seconds 2.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees -40) (degrees 80)) + (:conerot-y (degrees -40) (degrees 80)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-minc-round-light-glow-always-on + :id 600 + :flags (sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2317 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2318 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2319 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2320 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2321 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2322 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2323 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2324 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2325 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2326 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2327 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2328 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2329 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-minc-round-light-glow + :id 601 + :flags (sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 2317 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2318 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2319 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2320 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2321 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2322 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2323 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2324 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2325 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2326 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2327 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2328 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2329 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + ) + ) + +;; failed to figure out what this is: +(defpart 2317 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters -0.1)) + (:y (meters 0)) + (:z (meters -0.2)) + (:scale-x (meters 10)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 30.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 2048.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2318 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters 1.55)) + (:y (meters -0.05)) + (:z (meters -1.1)) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 20.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2319 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters -0.2)) + (:y (meters -1.7)) + (:z (meters -1.15)) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 20.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2320 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters -2)) + (:y (meters 0.1)) + (:z (meters -1.13)) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 20.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2321 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters -0.1)) + (:y (meters 1.7)) + (:z (meters -1.05)) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 20.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2322 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters 1.2)) + (:y (meters 1.2)) + (:z (meters -1)) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 20.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2323 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters -1.25)) + (:y (meters 1.1)) + (:z (meters -1)) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 20.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2324 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters -1.4)) + (:y (meters -1.1)) + (:z (meters -1.1)) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 20.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2325 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters 1.05)) + (:y (meters -1.3)) + (:z (meters -1)) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 20.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2326 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 9.8)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.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 2327 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 9.8)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 45)) + ) + ) + +;; failed to figure out what this is: +(defpart 2328 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 9.8)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees -45)) + ) + ) + +;; failed to figure out what this is: +(defpart 2329 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 9)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-minc-t-light-glow-always-on + :id 602 + :flags (sp4) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 2330 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2331 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2332 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2333 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2334 :fade-after (meters 200) :flags (sp6 sp7)) + (sp-item 2335 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2336 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2337 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2338 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2339 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2340 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2341 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2342 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2343 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2344 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2345 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2346 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2347 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2348 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2349 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2350 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2351 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2352 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2353 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + (sp-item 2354 :fade-after (meters 200) :flags (is-3d sp6 sp7)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-minc-t-light-glow + :id 603 + :flags (sp4) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 2330 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2331 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2332 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2333 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2334 :fade-after (meters 200) :flags (sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2335 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2336 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2337 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2338 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2339 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2340 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2341 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2342 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2343 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2344 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2345 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2346 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2347 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2348 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2349 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2350 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2351 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2352 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2353 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + (sp-item 2354 :fade-after (meters 200) :flags (is-3d sp6 sp7) :hour-mask #b111111111111000000) + ) + ) + +;; failed to figure out what this is: +(defpart 2330 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters -0.2)) + (:scale-x (meters 3)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 30.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2331 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters -2.12)) + (:z (meters 0)) + (:scale-x (meters 3)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 30.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2332 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters -4)) + (:y (meters -2.2)) + (:z (meters -0.78)) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 30.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2333 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters 3.65)) + (:y (meters -2.2)) + (:z (meters -0.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 30.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2334 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:x (meters -0.07)) + (:y (meters -3.6)) + (:z (meters -0.2)) + (:scale-x (meters 2)) + (:rot-x (degrees 1.125)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 128.0) + (:a 30.0) + (:omega (degrees 4515.75)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 409.6) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2335 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.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 2336 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 45)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.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 2337 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -45)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.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 2338 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 9)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.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 2339 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters -2.12)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.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 2340 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters -2.12)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 45)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.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 2341 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters -2.12)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -45)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.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 2342 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 0)) + (:y (meters -2.12)) + (:z (meters 9)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.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 2343 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -4)) + (:y (meters -2.2)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.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 2344 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -4)) + (:y (meters -2.2)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 45)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.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 2345 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -4)) + (:y (meters -2.2)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -45)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.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 2346 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -4)) + (:y (meters -2.2)) + (:z (meters 9)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.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 2347 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 3.65)) + (:y (meters -2.2)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.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 2348 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 3.65)) + (:y (meters -2.2)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 45)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.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 2349 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 3.65)) + (:y (meters -2.2)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -45)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.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 2350 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters 3.65)) + (:y (meters -2.2)) + (:z (meters 9)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.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 2351 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -0.07)) + (:y (meters -3.6)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.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 2352 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -0.07)) + (:y (meters -3.6)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 45)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.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 2353 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -0.07)) + (:y (meters -3.6)) + (:z (meters 9.8)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -45)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.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 2354 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 1.0) + (:x (meters -0.07)) + (:y (meters -3.6)) + (:z (meters 9)) + (:scale-x (meters 2)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 20)) + (:r 128.0) + (:g 128.0) + (:b 64.0) + (:a 20.0 2.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-bomb-train-explode + :id 604 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 80) + :parts ((sp-item 2355 :flags (sp3) :period (seconds 30) :length (seconds 0.035)) + (sp-item 2356 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2357 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2358 :period (seconds 30) :length (seconds 0.5)) + (sp-item 2359 :period (seconds 30) :length (seconds 0.5)) + (sp-item 2360 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 2355 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 60)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 100.0) + (:a 128.0) + (:omega (degrees 18011.25)) + (:fade-a -0.85333335) + (: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 2361 + :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 255.0) + (:g 160.0) + (:b 40.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.13333334)) + (:scalevel-x (meters 0.016666668)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.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 2362 + :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 64.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 128.0) + (:vel-y (meters 0.6666667) (meters 0.26666668)) + (:scalevel-x (meters 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.7) + (:timer (seconds 1)) + (: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 2356 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 30.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 1.0) + (:g 1.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.1)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13 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-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 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-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-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 16.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 4.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-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 16.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 4.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-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-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 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-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 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-bomb-train-explosion-dust-in-curve-settings*, type particle-curve-settings +(define *part-bomb-train-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* 2356 init-specs 14 initial-valuef) + (the-as float *part-bomb-train-explosion-dust-in-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-bomb-train-explosion-dust-in-curve-settings* color-start) *range-explo-dust-color*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-train-explosion-dust-in-curve-settings* alpha-start) *range-explo-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-train-explosion-dust-in-curve-settings* scale-x-start) *range-explo-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-train-explosion-dust-in-curve-settings* scale-y-start) *range-explo-dust-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-train-explosion-dust-in-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-bomb-train-explosion-dust-in-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-bomb-train-explosion-dust-in-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-bomb-train-explosion-dust-in-curve-settings* a-scalar) *curve-explo-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-train-explosion-dust-in-curve-settings* scale-x-scalar) *curve-explo-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-train-explosion-dust-in-curve-settings* scale-y-scalar) *curve-explo-dust-scale-y*) + +;; failed to figure out what this is: +(defpart 2358 + :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 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.85) + (: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 2359 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 8.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.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-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-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-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 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! *range-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 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! *curve-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-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-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-bomb-train-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-bomb-train-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* 2359 init-specs 16 initial-valuef) + (the-as float *part-bomb-train-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-bomb-train-explosion-texture-curve-settings* color-start) *range-explo-color*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-train-explosion-texture-curve-settings* alpha-start) *range-explo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-train-explosion-texture-curve-settings* scale-x-start) *range-explo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-train-explosion-texture-curve-settings* scale-y-start) *range-explo-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-train-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-bomb-train-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-bomb-train-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-bomb-train-explosion-texture-curve-settings* a-scalar) *curve-explo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-train-explosion-texture-curve-settings* scale-x-scalar) *curve-explo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-train-explosion-texture-curve-settings* scale-y-scalar) *curve-explo-scale-y*) + +;; failed to figure out what this is: +(defpart 2357 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 100)) + (:rot-x (degrees 225)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 100.0) + (:a 128.0) + (:omega (degrees 18011.25)) + (:scalevel-x (meters -2)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2360 + :init-specs ((:texture (laser-hit2-add level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (: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 128.0) + (:omega (degrees 18011.25)) + (:scalevel-x (meters 1.3333334)) + (:scalevel-y :copy scalevel-x) + (:fade-b -1.7066667) + (:fade-a -1.7066667) + (:timer (seconds 0.25)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-bomb-train-sparks + :id 605 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2363 :flags (sp7)) (sp-item 2364 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2363 + :init-specs ((:texture (hitspark level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (: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)) + ) + ) + +;; failed to figure out what this is: +(defpart 2364 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 0.5 0.5) + (:scale-x (meters 0.05) (meters 0.05)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:omega (degrees 0.0225)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-g -0.64) + (:fade-b -2.56) + (:fade-a -1.28 -1.28) + (:accel-y (meters -0.0013333333)) + (:friction 0.9) + (:timer (seconds 0.335)) + (: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: +(defpartgroup group-bomb-train-smoke + :id 606 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2365 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2365 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 1.0) + (:x (meters -1) (meters 2)) + (:y (meters -1) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 128.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a 1.28 1.28) + (:accel-y (meters 0.0016666667)) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 2366) + ) + ) + +;; failed to figure out what this is: +(defpart 2366 + :init-specs ((:fade-a -0.23272727 -0.23272727)) + ) + +;; failed to figure out what this is: +(defpartgroup group-bomb-train-light + :id 607 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 2367 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 2367 + :init-specs ((:texture (glow level-default-sprite)) + (:num 4.0) + (:scale-x (meters 1)) + (:rot-x (degrees 4.5)) + (:scale-y :copy scale-x) + (:r 200.0) + (:g 200.0) + (:b 128.0) + (:a 32.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 409.6) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-min-elec-gate + :id 608 + :bounds (static-bspherem 0 -3.5 0 4) + :parts ((sp-item 2368 :fade-after (meters 160) :flags (sp6) :period (seconds 0.1) :length (seconds 0.05)) + (sp-item 2369 :fade-after (meters 160) :flags (sp6)) + ) + ) + +;; failed to figure out what this is: +(defpart 2369 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 2.0) + (:y (meters -1.2) 6 (meters -1)) + (:scale-x (meters 1.6) (meters 0.1)) + (:rot-x (degrees 1.125)) + (:scale-y (meters 3.6) (meters 0.1)) + (:r 0.0) + (:g 128.0 64.0) + (:b 255.0) + (:a 32.0 4.0) + (:omega (degrees 3615.75)) + (:timer (seconds 0.035)) + (: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 2368 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.6) (meters 0.1)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 32.0 4.0) + (:omega (degrees 3615.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1024.0) + (:rotate-y (degrees 0)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/mine/mine-platforms_REF.gc b/test/decompiler/reference/jak3/levels/mine/mine-platforms_REF.gc new file mode 100644 index 0000000000..255c65330c --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mine/mine-platforms_REF.gc @@ -0,0 +1,2284 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type mine-platform-base +(deftype mine-platform-base (base-plat) + () + (:state-methods + plat-base-state + ) + (:methods + (get-skel (_type_) art-group) + (alloc-path! (_type_ entity) none) + ) + ) + +;; definition for method 3 of type mine-platform-base +(defmethod inspect ((this mine-platform-base)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type base-plat inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate plat-base-state (mine-platform-base) + :virtual #t + :event plat-event + :trans plat-trans + :code sleep-code + :post plat-post + ) + +;; definition for method 37 of type mine-platform-base +;; WARN: Return type mismatch symbol vs none. +(defmethod alloc-path! ((this mine-platform-base) (arg0 entity)) + (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)) + (not (logtest? (-> this path flags) (path-control-flag not-found))) + (none) + ) + +;; definition for method 11 of type mine-platform-base +;; WARN: Return type mismatch none vs object. +(defmethod init-from-entity! ((this mine-platform-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)) + (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) + ) + +;; definition of type min-moving-plat-spooler +(deftype min-moving-plat-spooler (process-drawable) + ((spool-sound sound-id) + ) + (:state-methods + active + ) + (:methods + (queue-drill-sound (_type_) none) + ) + ) + +;; definition for method 3 of type min-moving-plat-spooler +(defmethod inspect ((this min-moving-plat-spooler)) + (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: ~D~%" (-> this spool-sound)) + (label cfg-4) + this + ) + +;; definition for function min-moving-plat-spooler-init-by-other +;; INFO: Used lq/sq +(defbehavior min-moving-plat-spooler-init-by-other min-moving-plat-spooler ((arg0 vector)) + (stack-size-set! (-> self main-thread) 32) + (set! (-> self root) (new 'process 'trsqv)) + (set! (-> self spool-sound) (new-sound-id)) + (set! (-> self root trans quad) (-> arg0 quad)) + (queue-drill-sound self) + (go-virtual active) + ) + +;; definition for method 21 of type min-moving-plat-spooler +;; WARN: Return type mismatch gui-connection vs none. +(defmethod queue-drill-sound ((this min-moving-plat-spooler)) + (remove-process *gui-control* this (gui-channel guard)) + (set! (-> this spool-sound) + (add-process *gui-control* this (gui-channel guard) (gui-action queue) "lng-dril" -99.0 0) + ) + (sound-params-set! + *gui-control* + (-> this spool-sound) + #t + 35 + 70 + 9 + (-> *setting-control* user-current sfx-volume) + ) + (none) + ) + +;; definition for method 10 of type min-moving-plat-spooler +(defmethod deactivate ((this min-moving-plat-spooler)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set-action! + *gui-control* + (gui-action stop) + (-> this spool-sound) + (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) + (none) + ) + +;; failed to figure out what this is: +(defstate active (min-moving-plat-spooler) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('play-sound) + (set-action! + *gui-control* + (gui-action play) + (-> self spool-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + (('queue-sound) + (set-action! + *gui-control* + (gui-action stop) + (-> self spool-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + (queue-drill-sound self) + ) + ) + ) + :trans (behavior () + (case (get-status *gui-control* (-> self spool-sound)) + (((gui-status active)) + (when *sound-player-enable* + (let ((v1-3 (the-as sound-rpc-set-param (get-sound-buffer-entry)))) + (set! (-> v1-3 command) (sound-command set-param)) + (set! (-> v1-3 id) (-> self spool-sound)) + (set! (-> v1-3 params volume) (the int (* 1024.0 (-> *setting-control* user-current sfx-volume)))) + (set! (-> v1-3 params mask) (the-as uint 1)) + (-> v1-3 id) + ) + ) + ) + ) + ) + :code sleep-code + ) + +;; definition of type min-moving-plat +(deftype min-moving-plat (mine-platform-base) + ((animation-speed float) + (sync sync-linear :inline) + (min-frame-num float) + (max-frame-num float) + (sound-drill-spool uint32) + (sound-loop uint32) + (sound-bit uint32) + (sound-gear uint32) + (last-frame float) + (spooler handle) + (sync-offset float) + ) + (:state-methods + idle + active + ) + ) + +;; definition for method 3 of type min-moving-plat +(defmethod inspect ((this min-moving-plat)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type mine-platform-base inspect))) + (t9-0 this) + ) + (format #t "~2Tanimation-speed: ~f~%" (-> this animation-speed)) + (format #t "~2Tsync: #~%" (-> this sync)) + (format #t "~2Tmin-frame-num: ~f~%" (-> this min-frame-num)) + (format #t "~2Tmax-frame-num: ~f~%" (-> this max-frame-num)) + (format #t "~2Tsound-drill-spool: ~D~%" (-> this sound-drill-spool)) + (format #t "~2Tsound-loop: ~D~%" (-> this sound-loop)) + (format #t "~2Tsound-bit: ~D~%" (-> this sound-bit)) + (format #t "~2Tsound-gear: ~D~%" (-> this sound-gear)) + (format #t "~2Tlast-frame: ~f~%" (-> this last-frame)) + (format #t "~2Tspooler: ~D~%" (-> this spooler)) + (format #t "~2Tsync-offset: ~f~%" (-> this sync-offset)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-min-moving-plat min-moving-plat min-moving-plat-lod0-jg min-moving-plat-idle-ja + ((min-moving-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 24) + ) + +;; definition for method 32 of type min-moving-plat +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this min-moving-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 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 98304.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (let ((v1-11 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec pusher)) + (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) 5) + (set-vector! (-> v1-11 local-sphere) 0.0 0.0 0.0 43008.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 pusher)) + (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 12288.0 81920.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 player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 3) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 43008.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 36 of type min-moving-plat +(defmethod get-skel ((this min-moving-plat)) + (art-group-get-by-name *level* "skel-min-moving-plat" (the-as (pointer level) #f)) + ) + +;; definition for method 11 of type min-moving-plat +(defmethod init-from-entity! ((this min-moving-plat) (arg0 entity-actor)) + (let ((t9-0 (method-of-type mine-platform-base init-from-entity!))) + (t9-0 this arg0) + ) + (let ((a1-2 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-1 0)) + (if #f + (set! v1-1 (logior v1-1 1)) + ) + (set! (-> a1-2 sync-type) 'sync-linear) + (set! (-> a1-2 sync-flags) (the-as sync-flags v1-1)) + ) + (set! (-> a1-2 entity) arg0) + (set! (-> a1-2 period) (the-as uint 3000)) + (set! (-> a1-2 percent) 0.0) + (initialize! (-> this sync) a1-2) + ) + (let ((f0-1 (res-lump-float (-> this entity) 'scale :default 1.0))) + (set! (-> this root scale x) f0-1) + (set! (-> this root scale y) f0-1) + (set! (-> this root scale z) f0-1) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (ja-channel-push! 1 0) + (let ((s5-1 (-> this skel root-channel 0))) + (joint-control-channel-group! s5-1 (the-as art-joint-anim (-> this draw art-group data 3)) num-func-identity) + (set! (-> s5-1 frame-num) 0.0) + ) + (sync-now! (-> this sync) 0.6) + (let ((f0-5 (* (get-norm! (-> this sync) 0) (the float (ja-num-frames 0)))) + (v1-24 (-> this skel root-channel 0)) + ) + (set! (-> v1-24 num-func) num-func-identity) + (set! (-> v1-24 frame-num) f0-5) + ) + (ja-post) + (set! (-> this sound-drill-spool) (the-as uint (new-sound-id))) + (set! (-> this sound-loop) (the-as uint (new-sound-id))) + (set! (-> this sound-bit) (the-as uint (new-sound-id))) + (set! (-> this sound-gear) (the-as uint (new-sound-id))) + (set! (-> this spooler) (the-as handle #f)) + (when (string= (-> this name) "min-moving-plat-2") + (let ((s5-2 (get-process *default-dead-pool* min-moving-plat-spooler #x4000 1))) + (set! (-> this spooler) + (process->handle + (-> (when s5-2 + (let ((t9-15 (method-of-type min-moving-plat-spooler activate))) + (t9-15 (the-as min-moving-plat-spooler s5-2) this "min-moving-plat-spooler" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-2 min-moving-plat-spooler-init-by-other (-> this root trans)) + (-> s5-2 ppointer) + ) + 0 + ) + ) + ) + ) + ) + (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 for method 10 of type min-moving-plat +(defmethod deactivate ((this min-moving-plat)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (the-as sound-id (-> this sound-loop))) + (sound-stop (the-as sound-id (-> this sound-bit))) + (sound-stop (the-as sound-id (-> this sound-gear))) + (set-action! + *gui-control* + (gui-action stop) + (the-as sound-id (-> this sound-drill-spool)) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ((method-of-type mine-platform-base deactivate) this) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (min-moving-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (sync-now! (-> self sync) 0.6) + (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: +(when (or (zero? *drill-loop-mid-curve*) (!= loading-level global)) + (set! *drill-loop-mid-curve* (new 'loading-level 'curve2d-piecewise)) + (curve2d-piecewise-method-10 *drill-loop-mid-curve* 3 'loading-level (the-as int #t)) + ) + +;; failed to figure out what this is: +(set! (-> *drill-loop-mid-curve* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *drill-loop-mid-curve* pts data 0 second) 0.0) + +;; failed to figure out what this is: +(set! (-> *drill-loop-mid-curve* pts data 1 first) 0.5) + +;; failed to figure out what this is: +(set! (-> *drill-loop-mid-curve* pts data 1 second) 1.0) + +;; failed to figure out what this is: +(set! (-> *drill-loop-mid-curve* pts data 2 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *drill-loop-mid-curve* pts data 2 second) 0.0) + +;; failed to figure out what this is: +(defstate active (min-moving-plat) + :virtual #t + :event plat-event + :trans (behavior () + (sound-play "mine-drill-bit" :id (the-as sound-id (-> self sound-bit))) + (let ((f30-0 (ja-frame-num 0))) + (cond + ((and (< 15.0 f30-0) (< f30-0 28.0)) + (let ((f0-3 (* 0.07692308 (+ -15.0 f30-0)))) + 0.0 + 0.0 + (let* ((f26-0 (curve2d-method-9 *drill-loop-mid-curve* f0-3 3)) + (f28-0 (lerp -0.5 0.25 f26-0)) + ) + (sound-play-by-name + (static-sound-name "mine-drill-loop") + (the-as sound-id (-> self sound-loop)) + (the int (* 1024.0 f26-0)) + 0 + 0 + (sound-group) + #t + ) + (sound-play-by-name + (static-sound-name "mine-drill-gear") + (the-as sound-id (-> self sound-gear)) + (the int (* 1024.0 f26-0)) + (the int (* 1524.0 f28-0)) + 0 + (sound-group) + #t + ) + ) + ) + ) + ((< f30-0 46.0) + (let ((f0-15 (* 0.055555556 (+ -28.0 f30-0)))) + 0.0 + 0.0 + (let* ((f26-1 (curve2d-method-9 *drill-loop-mid-curve* f0-15 3)) + (f28-1 (lerp -0.5 0.25 f26-1)) + ) + (sound-play-by-name + (static-sound-name "mine-drill-loop") + (the-as sound-id (-> self sound-loop)) + (the int (* 1024.0 f26-1)) + 0 + 0 + (sound-group) + #t + ) + (sound-play-by-name + (static-sound-name "mine-drill-gear") + (the-as sound-id (-> self sound-gear)) + (the int (* 1024.0 f26-1)) + (the int (* 1524.0 f28-1)) + 0 + (sound-group) + #t + ) + ) + ) + ) + (else + (sound-play "mine-drill-loop" :id (the-as sound-id (-> self sound-loop)) :vol 0) + (sound-play "mine-drill-gear" :id (the-as sound-id (-> self sound-gear)) :vol 0) + ) + ) + (if (or (and (< (-> self last-frame) 50.0) (>= f30-0 50.0)) (and (< (-> self last-frame) 8.75) (>= f30-0 8.75))) + (sound-play "drill-arm-snap") + ) + (if (and (< (-> self last-frame) 50.0) (>= f30-0 50.0)) + (send-event (handle->process (-> self spooler)) 'play-sound) + ) + (if (and (< (-> self last-frame) 12.0) (>= f30-0 12.0)) + (send-event (handle->process (-> self spooler)) 'queue-sound) + ) + (set! (-> self last-frame) f30-0) + ) + (plat-trans) + ) + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 2)) + (suspend) + ) + ) + (let ((gp-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (s5-0 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (s4-0 #t) + ) + (ja-channel-push! 1 0) + (ja-no-eval :group! min-moving-plat-idle-ja :num! min) + (sync-now! (-> self sync) 0.6) + (until #f + (let ((f30-1 (* (get-norm! (-> self sync) 0) (the float (ja-num-frames 0))))) + (let ((a0-8 (-> self skel root-channel 0))) + (set! (-> a0-8 param 0) f30-1) + (joint-control-channel-group-eval! a0-8 (the-as art-joint-anim #f) num-func-loop-set!) + ) + (cond + ((or (< 55.0 f30-1) (< f30-1 5.0)) + (if s4-0 + (set! s4-0 #f) + ) + (let ((s3-1 (new 'stack-no-clear 'matrix))) + (vector+float*! (-> s3-1 trans) (-> self root trans) *up-vector* (* 40960.0 (-> self root scale x))) + (vector+float*! (-> s3-1 trans) (-> s3-1 trans) gp-1 (* 106496.0 (-> self root scale x))) + (vector+float*! (-> s3-1 trans) (-> s3-1 trans) s5-0 (* -8192.0 (-> self root scale x))) + (vector-float*! (-> s3-1 fvec) gp-1 1.0) + (set! (-> s3-1 uvec quad) (-> *up-vector* quad)) + (set! (-> s3-1 rvec quad) (-> s5-0 quad)) + (launch-particles (-> *part-id-table* 2316) s3-1 :origin-is-matrix #t) + (launch-particles (-> *part-id-table* 2315) s3-1 :origin-is-matrix #t) + ) + ) + (else + (set! s4-0 #t) + ) + ) + ) + (suspend) + ) + ) + #f + ) + :post plat-post + ) + +;; definition of type min-rotating-plat +(deftype min-rotating-plat (mine-platform-base) + ((animation-speed float) + (sync sync-linear :inline) + (sound-loop-id sound-id) + ) + (:state-methods + idle + active + ) + ) + +;; definition for method 3 of type min-rotating-plat +(defmethod inspect ((this min-rotating-plat)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type mine-platform-base inspect))) + (t9-0 this) + ) + (format #t "~2Tanimation-speed: ~f~%" (-> this animation-speed)) + (format #t "~2Tsync: #~%" (-> this sync)) + (format #t "~2Tsound-loop-id: ~D~%" (-> this sound-loop-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-min-rotating-plat min-rotating-plat min-rotating-plat-lod0-jg min-rotating-plat-idle-ja + ((min-rotating-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 24) + ) + +;; definition for method 32 of type min-rotating-plat +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this min-rotating-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 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 81920.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (let ((v1-11 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec pusher)) + (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) 0.0 0.0 12288.0 81920.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 pusher)) + (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) 4) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 43008.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 player-list)) + (set! (-> v1-15 prim-core action) (collide-action solid rideable)) + (set! (-> v1-15 transform-index) 5) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 43008.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 36 of type min-rotating-plat +(defmethod get-skel ((this min-rotating-plat)) + (art-group-get-by-name *level* "skel-min-rotating-plat" (the-as (pointer level) #f)) + ) + +;; definition for method 11 of type min-rotating-plat +(defmethod init-from-entity! ((this min-rotating-plat) (arg0 entity-actor)) + (let ((t9-0 (method-of-type mine-platform-base init-from-entity!))) + (t9-0 this arg0) + ) + (set! (-> this bounce-scale) 0.0) + (let ((a1-2 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-1 0)) + (if #f + (set! v1-1 (logior v1-1 1)) + ) + (set! (-> a1-2 sync-type) 'sync-linear) + (set! (-> a1-2 sync-flags) (the-as sync-flags v1-1)) + ) + (set! (-> a1-2 entity) arg0) + (set! (-> a1-2 period) (the-as uint 4500)) + (set! (-> a1-2 percent) 0.0) + (initialize! (-> this sync) a1-2) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (ja-channel-push! 1 0) + (let ((s5-1 (-> this skel root-channel 0))) + (joint-control-channel-group! s5-1 (the-as art-joint-anim (-> this draw art-group data 2)) num-func-identity) + (set! (-> s5-1 frame-num) 0.0) + ) + (sync-now! (-> this sync) 0.0) + (let ((f0-5 (* (get-norm! (-> this sync) 0) (the float (ja-num-frames 0)))) + (a0-12 (-> this skel root-channel 0)) + ) + (set! (-> a0-12 param 0) f0-5) + (joint-control-channel-group! a0-12 (the-as art-joint-anim #f) num-func-loop-set!) + ) + (ja-post) + (set! (-> this sound-loop-id) (new-sound-id)) + (if (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this active)) + ) + (go (method-of-object this idle)) + ) + +;; failed to figure out what this is: +(defstate idle (min-rotating-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 (min-rotating-plat) + :virtual #t + :event plat-event + :exit (behavior () + (if (nonzero? (-> self sound-loop-id)) + (sound-stop (-> self sound-loop-id)) + ) + ) + :trans plat-trans + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 2)) + (suspend) + ) + ) + (ja-channel-push! 1 0) + (ja-no-eval :group! min-rotating-plat-idle-ja :num! min) + (sync-now! (-> self sync) 0.0) + (until #f + (let ((f0-3 (* (get-norm! (-> self sync) 0) (the float (ja-num-frames 0)))) + (a0-6 (-> self skel root-channel 0)) + ) + (set! (-> a0-6 param 0) f0-3) + (joint-control-channel-group-eval! a0-6 (the-as art-joint-anim #f) num-func-loop-set!) + ) + (if (nonzero? (-> self sound-loop-id)) + (sound-play "min-rotate-plat" :id (-> self sound-loop-id)) + ) + (suspend) + ) + #f + ) + :post plat-post + ) + +;; definition of type min-falling-elevator +(deftype min-falling-elevator (elevator) + ((wheel-angle float) + (stop-sound symbol) + (pad uint8 4) + ) + (:state-methods + unstable + falling + resetting + ) + ) + +;; definition for method 3 of type min-falling-elevator +(defmethod inspect ((this min-falling-elevator)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type elevator inspect))) + (t9-0 this) + ) + (format #t "~2Twheel-angle: ~f~%" (-> this wheel-angle)) + (format #t "~2Tstop-sound: ~A~%" (-> this stop-sound)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-min-falling-elevator min-falling-elevator min-falling-elevator-lod0-jg min-falling-elevator-idle-ja + ((min-falling-elevator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 5 10) + ) + +;; definition for function min-falling-elevator-callback +;; WARN: Return type mismatch int vs none. +(defun min-falling-elevator-callback ((arg0 cspace) (arg1 transformq)) + (let ((v1-0 (the-as min-falling-elevator (-> arg0 param1)))) + (when (and (-> v1-0 next-state) (= (-> v1-0 next-state name) 'running)) + (set! (-> v1-0 wheel-angle) + (the float + (sar (shl (the int (+ (-> v1-0 wheel-angle) (* -4.956458 (seconds-per-frame) (-> v1-0 speed)))) 48) 48) + ) + ) + (quaternion-rotate-local-x! (-> arg1 quat) (-> arg1 quat) (-> v1-0 wheel-angle)) + (cspace<-parented-transformq-joint! arg0 arg1) + ) + ) + 0 + (none) + ) + +;; definition for method 34 of type min-falling-elevator +;; 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 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) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (ja-post) + (let ((v0-1 (-> this node-list data 4))) + (set! (-> v0-1 param0) min-falling-elevator-callback) + (set! (-> v0-1 param1) this) + (set! (-> v0-1 param2) (the-as basic 0)) + ) + (none) + ) + +;; definition for method 32 of type min-falling-elevator +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this min-falling-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 20480.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 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 20480.0 40960.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak 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 16384.0) + ) + (set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w))) + (let ((v1-20 (-> s5-0 root-prim))) + (set! (-> s5-0 backup-collide-as) (-> v1-20 prim-core collide-as)) + (set! (-> s5-0 backup-collide-with) (-> v1-20 prim-core collide-with)) + ) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 31 of type min-falling-elevator +(defmethod get-art-group ((this min-falling-elevator)) + (art-group-get-by-name *level* "skel-min-falling-elevator" (the-as (pointer level) #f)) + ) + +;; failed to figure out what this is: +(defstate running (min-falling-elevator) + :virtual #t + :enter (behavior () + (if (task-node-closed? (game-task-node mine-blow-resolution)) + (go-virtual dormant) + ) + (let ((t9-2 (-> (method-of-type elevator running) enter))) + (if t9-2 + (t9-2) + ) + ) + (set! (-> self sound-id) + (add-process *gui-control* self (gui-channel background) (gui-action queue) "mfal-end" -99.0 0) + ) + (set! (-> self stop-sound) #t) + ) + :post (behavior () + (let ((t9-0 (-> (method-of-type elevator running) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (if (not (send-event self 'query 'player-standing-on?)) + (send-event self 'use-camera #f) + ) + ) + ) + +;; failed to figure out what this is: +(defstate arrived (min-falling-elevator) + :virtual #t + :post (behavior () + (let ((t9-0 (-> (method-of-type elevator arrived) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + (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) 'query) + (set! (-> a1-0 param 0) (the-as uint 'player-standing-on?)) + (cond + ((and (send-event-function self a1-0) (!= (-> self prev-state name) 'resetting)) + (go-virtual unstable) + ) + (else + (send-event self 'use-camera #f) + (if (-> self stop-sound) + (set-action! + *gui-control* + (gui-action stop) + (-> self sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate unstable (min-falling-elevator) + :virtual #t + :parent (min-falling-elevator dormant) + :event elevator-event + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 2)) + (go-virtual falling) + ) + (if (not (send-event self 'query 'player-standing-on?)) + (send-event self 'use-camera #f) + ) + (let ((v1-18 (-> self state parent))) + (when v1-18 + (let ((t9-3 (-> v1-18 trans))) + (if t9-3 + (t9-3) + ) + ) + ) + ) + ) + :code (behavior () + (when (-> self stop-sound) + (set! (-> self stop-sound) #f) + (sound-params-set! *gui-control* (-> self sound-id) #t -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) + ) + ) + (ja-no-eval :group! min-falling-elevator-start-unstable-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (until #f + (ja-no-eval :group! min-falling-elevator-unstable-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate falling (min-falling-elevator) + :virtual #t + :parent (min-falling-elevator dormant) + :event elevator-event + :enter (behavior () + (send-event self 'use-camera #f) + (set-time! (-> self state-time)) + ) + :code (behavior () + (ja-no-eval :group! min-falling-elevator-drop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (until (time-elapsed? (-> self state-time) (seconds 2)) + (suspend) + ) + (go-virtual resetting) + ) + :post transform-post + ) + +;; failed to figure out what this is: +(defstate resetting (min-falling-elevator) + :virtual #t + :parent (min-falling-elevator dormant) + :event elevator-event + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (sound-play "falling-step-up") + (ja-no-eval :group! min-falling-elevator-reset-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (until (time-elapsed? (-> self state-time) (seconds 2)) + (suspend) + ) + (go-virtual arrived) + ) + ) + +;; definition of type min-falling-step +(deftype min-falling-step (mine-platform-base) + ((should-fall symbol) + (actor-group (pointer actor-group)) + (actor-group-count int32) + ) + (:state-methods + idle + lowering + lowered + ) + ) + +;; definition for method 3 of type min-falling-step +(defmethod inspect ((this min-falling-step)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type mine-platform-base inspect))) + (t9-0 this) + ) + (format #t "~2Tshould-fall: ~A~%" (-> this should-fall)) + (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: +(defskelgroup skel-min-falling-step min-falling-step min-falling-step-lod0-jg min-falling-step-idle-ja + ((min-falling-step-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 4 20) + :origin-joint-index 4 + ) + +;; definition for method 20 of type min-falling-step +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this min-falling-step)) + (let ((v0-0 0)) + (cond + ((and (-> this next-state) (= (-> this next-state name) 'idle)) + (set! v0-0 (logior v0-0 32)) + ) + ((and (-> this next-state) (= (-> this next-state name) 'lowering)) + (set! v0-0 (logior v0-0 1)) + ) + ) + (the-as search-info-flag v0-0) + ) + ) + +;; definition for method 21 of type min-falling-step +(defmethod get-trans ((this min-falling-step) (arg0 int)) + "Get the `trans` for this process." + (cond + ((= arg0 3) + (let ((a2-0 (-> this node-list data 4 bone transform)) + (gp-0 (new 'static 'vector)) + ) + (set-vector! gp-0 0.0 0.0 24576.0 1.0) + (vector-matrix*! gp-0 gp-0 a2-0) + (set! (-> gp-0 w) 16384.0) + gp-0 + ) + ) + (else + ((method-of-type process-focusable get-trans) this arg0) + ) + ) + ) + +;; definition for method 32 of type min-falling-step +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this min-falling-step)) + (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 projectile)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable pull-rider-can-collide)) + (set! (-> s4-0 transform-index) 4) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 16384.0 81920.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 36 of type min-falling-step +(defmethod get-skel ((this min-falling-step)) + (art-group-get-by-name *level* "skel-min-falling-step" (the-as (pointer level) #f)) + ) + +;; failed to figure out what this is: +(defstate idle (min-falling-step) + :virtual #t + :parent (min-falling-step plat-base-state) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (go-virtual lowering) + ) + (else + (plat-event proc argc message block) + ) + ) + ) + :trans (behavior () + (let ((v1-1 (-> self state parent))) + (when v1-1 + (let ((t9-0 (-> v1-1 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (if (not (and v1-2 (= v1-2 min-falling-step-idle-ja))) + (ja-channel-push! 1 0) + ) + ) + (until #f + (ja-no-eval :group! min-falling-step-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate lowering (min-falling-step) + :virtual #t + :parent (min-falling-step plat-base-state) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (plat-event proc argc message block) + ) + :code (behavior () + (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-6 (-> s5-0 data s4-0 actor)) + ) + (t9-0 + (if v1-6 + (-> v1-6 extra process) + ) + a1-0 + ) + ) + ) + ) + ) + ) + (ja-channel-push! 1 0) + (sound-play "fall-step-hinge") + (let ((gp-2 0)) + (ja-no-eval :group! min-falling-step-falling-a-ja :num! (seek! max 0.6) :frame-num 0.0) + (until (ja-done? 0) + (let ((f30-0 (ja-frame-num 0)) + (v1-31 (ja-num-frames 0)) + ) + (when (< gp-2 (the int f30-0)) + (if (= (the int f30-0) (+ v1-31 -17)) + (sound-play "falling-step") + ) + ) + ) + (set! gp-2 (the int (ja-frame-num 0))) + (suspend) + (ja :num! (seek! max 0.6)) + ) + ) + (go-virtual lowered) + ) + ) + +;; failed to figure out what this is: +(defstate lowered (min-falling-step) + :virtual #t + :parent (min-falling-step plat-base-state) + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (ja :group! min-falling-step-falling-a-ja :num! max) + (transform-post) + (sleep-code) + ) + ) + +;; definition for method 11 of type min-falling-step +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this min-falling-step) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (let ((t9-0 (method-of-type mine-platform-base init-from-entity!))) + (t9-0 this arg0) + ) + (set! (-> this bounce-scale) 204.8) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-3 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-3 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-3)) + (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 (and (-> this entity) (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete))) + (go (method-of-object this lowered)) + (go (method-of-object this idle)) + ) + ) + +;; definition of type min-elev-track +(deftype min-elev-track (elevator) + () + ) + +;; definition for method 3 of type min-elev-track +(defmethod inspect ((this min-elev-track)) + (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-min-elev-track min-elev-track min-elev-track-lod0-jg min-elev-track-idle-ja + ((min-elev-track-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 4 8) + ) + +;; definition for method 31 of type min-elev-track +(defmethod get-art-group ((this min-elev-track)) + (art-group-get-by-name *level* "skel-min-elev-track" (the-as (pointer level) #f)) + ) + +;; definition for method 32 of type min-elev-track +;; WARN: Return type mismatch collide-shape vs none. +(defmethod init-collision! ((this min-elev-track)) + (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 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! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) 0.0 -8192.0 16384.0 28672.0) + (set! (-> s5-0 root-prim) s4-0) + ) + (pusher-init s5-0) + (let ((v1-11 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-11 prim-core collide-as) (collide-spec obstacle camera-blocker pusher)) + (set! (-> v1-11 prim-core collide-with) (collide-spec jak bot 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 -8192.0 16384.0 28672.0) + ) + (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) + ) + (none) + ) + +;; definition for method 30 of type min-elev-track +;; WARN: Return type mismatch int vs none. +(defmethod start-bounce! ((this min-elev-track)) + 0 + (none) + ) + +;; 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 0)) + (set! (-> this sound-arrived) (static-sound-spec "min-elev-end" :group 0)) + (none) + ) + +;; definition of type min-folding-plat +(deftype min-folding-plat (process-drawable) + ((root collide-shape-moving :override) + (stop-sound symbol) + (sound-id sound-id) + ) + (:state-methods + idle + extend + extended + ) + (:methods + (set-bounds! (_type_) none) + ) + ) + +;; definition for method 3 of type min-folding-plat +(defmethod inspect ((this min-folding-plat)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tstop-sound: ~A~%" (-> this stop-sound)) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-min-folding-plat min-folding-plat min-folding-plat-lod0-jg min-folding-plat-idle-ja + ((min-folding-plat-lod0-mg (meters 20)) (min-folding-plat-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 4 10) + :origin-joint-index 5 + ) + +;; failed to figure out what this is: +(defstate idle (min-folding-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual extend) + ) + ) + ) + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #f) + (ja-channel-set! 1) + (ja-no-eval :group! min-folding-plat-idle-ja :num! zero) + (transform-post) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate extend (min-folding-plat) + :virtual #t + :enter (behavior () + (set! (-> self stop-sound) #t) + (set! (-> self sound-id) + (add-process *gui-control* self (gui-channel background) (gui-action queue) "minbridg" -99.0 0) + ) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (set-bounds! self) + ) + :exit (behavior () + (if (-> self stop-sound) + (set-action! + *gui-control* + (gui-action stop) + (-> self sound-id) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + :trans rider-trans + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1.5)) + (suspend) + ) + ) + (when (-> self stop-sound) + (set! (-> self stop-sound) #f) + (sound-params-set! *gui-control* (-> self sound-id) #t -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) + ) + ) + (ja-no-eval :group! min-folding-plat-extend-ja :num! (seek! max 0.1) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.1)) + ) + (go-virtual extended) + ) + :post rider-post + ) + +;; failed to figure out what this is: +(defstate extended (min-folding-plat) + :virtual #t + :code (behavior () + (set-bounds! self) + (ja-no-eval :group! min-folding-plat-extend-ja + :num! (identity (the float (+ (-> (the-as art-joint-anim min-folding-plat-extend-ja) frames num-frames) -1))) + ) + (transform-post) + (sleep-code) + ) + ) + +;; definition for method 23 of type min-folding-plat +;; WARN: Return type mismatch int vs none. +(defmethod set-bounds! ((this min-folding-plat)) + (set! (-> this root root-prim local-sphere w) 69632.0) + (set! (-> this draw bounds w) 71680.0) + 0 + (none) + ) + +;; definition for method 11 of type min-folding-plat +(defmethod init-from-entity! ((this min-folding-plat) (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 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) 5) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 16384.0 32768.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 2) (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 8192.0 32768.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 bot 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 8192.0 32768.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid rideable)) + (set! (-> v1-19 transform-index) 7) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 8192.0 32768.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 sound-id) (new-sound-id)) + (set! (-> this stop-sound) #f) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-min-folding-plat" (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 extended)) + (go (method-of-object this idle)) + ) + ) + +;; definition of type min-ramp +(deftype min-ramp (process-drawable) + ((angle degrees) + (play-anim? symbol) + (play-ramp-sound? symbol) + (stop-ramp-sound symbol) + (ramp-sound sound-id) + ) + (:state-methods + idle + rotating + rotated + ) + ) + +;; definition for method 3 of type min-ramp +(defmethod inspect ((this min-ramp)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tangle: ~f~%" (-> this angle)) + (format #t "~2Tplay-anim?: ~A~%" (-> this play-anim?)) + (format #t "~2Tplay-ramp-sound?: ~A~%" (-> this play-ramp-sound?)) + (format #t "~2Tstop-ramp-sound: ~A~%" (-> this stop-ramp-sound)) + (format #t "~2Tramp-sound: ~D~%" (-> this ramp-sound)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-min-ramp min-ramp min-ramp-lod0-jg min-ramp-idle-ja + ((min-ramp-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 2 5.5) + :origin-joint-index 4 + ) + +;; failed to figure out what this is: +(defstate idle (min-ramp) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual rotating) + ) + ) + ) + :code (behavior () + (ja-no-eval :group! min-ramp-idle-ja :num! zero) + (transform-post) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate rotating (min-ramp) + :virtual #t + :enter (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (when (-> self play-ramp-sound?) + (set! (-> self stop-ramp-sound) #t) + (set! (-> self ramp-sound) + (add-process *gui-control* self (gui-channel background) (gui-action queue) "min-ramp" -99.0 0) + ) + ) + ) + :exit (behavior () + (if (and (-> self play-ramp-sound?) (-> self stop-ramp-sound)) + (set-action! + *gui-control* + (gui-action stop) + (-> self ramp-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + :trans (behavior () + (when (-> self play-anim?) + (when (time-elapsed? (-> self state-time) (seconds 0.75)) + (let ((gp-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> gp-0 from) (process->ppointer self)) + (set! (-> gp-0 num-params) 0) + (set! (-> gp-0 message) 'trigger) + (let ((s5-0 send-event-function) + (v1-7 (entity-actor-lookup (-> self entity) 'alt-actor 0)) + ) + (s5-0 + (if v1-7 + (-> v1-7 extra process) + ) + gp-0 + ) + ) + ) + ) + (if (= (-> self angle) 0.0) + (go-virtual rotated) + ) + (set! (-> self angle) + (seek-ease (-> self angle) 0.0 (* 8192.0 (seconds-per-frame)) 3640.889 (* 2048.0 (seconds-per-frame))) + ) + (rider-trans) + ) + ) + :code (behavior () + (when (-> self play-ramp-sound?) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 3)) + (suspend) + ) + ) + (until (= (get-status *gui-control* (-> self ramp-sound)) (gui-status ready)) + (suspend) + ) + (when (-> self stop-ramp-sound) + (set! (-> self stop-ramp-sound) #f) + (sound-params-set! *gui-control* (-> self ramp-sound) #t -1 150 2 -1.0) + (set-action! + *gui-control* + (gui-action play) + (-> self ramp-sound) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + ) + (set-time! (-> self state-time)) + (set! (-> self play-anim?) #t) + (sleep-code) + ) + :post rider-post + ) + +;; failed to figure out what this is: +(defstate rotated (min-ramp) + :virtual #t + :code (behavior () + (set! (-> self angle) 0.0) + (transform-post) + (sleep-code) + ) + ) + +;; definition for function min-ramp-callback +;; WARN: Return type mismatch int vs none. +(defun min-ramp-callback ((arg0 cspace) (arg1 transformq)) + (quaternion-rotate-local-x! (-> arg1 quat) (-> arg1 quat) (-> (the-as min-ramp (-> arg0 param1)) angle)) + (cspace<-parented-transformq-joint! arg0 arg1) + 0 + (none) + ) + +;; definition for method 11 of type min-ramp +(defmethod init-from-entity! ((this min-ramp) (arg0 entity-actor)) + (local-vars (s5-3 symbol)) + (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 pusher)) + (set! (-> s3-0 prim-core collide-with) (collide-spec jak enemy hit-by-others-list 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 8192.0 20480.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-min-ramp" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this play-anim?) #f) + (let* ((s5-2 #t) + (a0-10 (-> this entity)) + (v1-18 (the-as uint128 ((method-of-object a0-10 get-property-value) + a0-10 + 'play-sound + 'interp + -1000000000.0 + (the-as uint128 0) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + ) + (cmove-#f-zero s5-3 v1-18 s5-2) + ) + (set! (-> this play-ramp-sound?) s5-3) + (set! (-> this ramp-sound) (new-sound-id)) + (set! (-> this stop-ramp-sound) #f) + (set! (-> this angle) 8192.0) + (let ((a0-11 (-> this node-list data 4))) + (set! (-> a0-11 param0) min-ramp-callback) + (set! (-> a0-11 param1) this) + (set! (-> a0-11 param2) (the-as basic 0)) + ) + (if (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this rotated)) + ) + (go (method-of-object this idle)) + ) + +;; definition of type min-bridge +(deftype min-bridge (process-drawable) + ((stop-bridge-sound symbol) + (bridge-sound sound-id) + ) + (:state-methods + idle + extend + extended + ) + (:methods + (init-collision! (_type_) none) + ) + ) + +;; definition for method 3 of type min-bridge +(defmethod inspect ((this min-bridge)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (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-min-bridge min-bridge min-bridge-lod0-jg min-bridge-idle-ja + ((min-bridge-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 10 25) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defstate idle (min-bridge) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual extend) + ) + ) + ) + :code (behavior () + (ja-no-eval :group! min-bridge-idle-ja :num! zero) + (transform-post) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate extend (min-bridge) + :virtual #t + :enter (behavior () + (set! (-> self stop-bridge-sound) #t) + (set! (-> self bridge-sound) + (add-process *gui-control* self (gui-channel background) (gui-action queue) "minbridg" -99.0 0) + ) + ) + :exit (behavior () + (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) + ) + ) + ) + :trans rider-trans + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1.5)) + (suspend) + ) + ) + (when (-> self stop-bridge-sound) + (set! (-> self stop-bridge-sound) #f) + (sound-params-set! *gui-control* (-> self bridge-sound) #t -1 150 2 -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-no-eval :group! min-bridge-move-ja :num! (seek! max 0.1) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 0.1)) + ) + (go-virtual extended) + ) + :post rider-post + ) + +;; failed to figure out what this is: +(defstate extended (min-bridge) + :virtual #t + :code (behavior () + (ja-no-eval :group! min-bridge-move-ja + :num! (identity (the float (+ (-> (the-as art-joint-anim min-bridge-move-ja) frames num-frames) -1))) + ) + (transform-post) + (sleep-code) + ) + ) + +;; definition for method 23 of type min-bridge +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-collision! ((this min-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-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 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 0.0 61440.0 122880.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 enemy 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 32768.0) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 0) (the-as uint 0)))) + (set! (-> v1-17 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak enemy 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 32768.0) + ) + (let ((v1-19 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 3) (the-as uint 0)))) + (set! (-> v1-19 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak enemy hit-by-others-list player-list)) + (set! (-> v1-19 prim-core action) (collide-action solid rideable)) + (set! (-> v1-19 transform-index) 8) + (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 2) (the-as uint 0)))) + (set! (-> v1-21 prim-core collide-as) (collide-spec pusher)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak enemy 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 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) + ) + (none) + ) + +;; definition for method 11 of type min-bridge +(defmethod init-from-entity! ((this min-bridge) (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-min-bridge" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this bridge-sound) (new-sound-id)) + (set! (-> this stop-bridge-sound) #f) + (if (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this extended)) + ) + (go (method-of-object this idle)) + ) + +;; definition of type min-plat-updown +(deftype min-plat-updown (base-plat) + ((sync sync-eased :inline) + (path-pos float) + ) + (:state-methods + idle + active + ) + (:methods + (get-skel (_type_) art-group) + ) + ) + +;; definition for method 3 of type min-plat-updown +(defmethod inspect ((this min-plat-updown)) + (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 "~2Tpath-pos: ~f~%" (-> this path-pos)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (min-plat-updown) + :virtual #t + :event (the-as (function process int symbol event-message-block object) eco-door-event-handler) + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate active (min-plat-updown) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (plat-event proc argc message block) + ) + :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) + (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 for method 34 of type min-plat-updown +;; WARN: Return type mismatch object vs none. +(defmethod base-plat-method-34 ((this min-plat-updown)) + (cond + ((logtest? (-> this path flags) (path-control-flag not-found)) + (go (method-of-object this idle)) + ) + ((> (-> this sync period) 0) + (go (method-of-object this active)) + ) + (else + (go (method-of-object this idle)) + ) + ) + (none) + ) + +;; definition for method 11 of type min-plat-updown +;; WARN: Return type mismatch none vs object. +(defmethod init-from-entity! ((this min-plat-updown) (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)) + (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) + (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)) + (set! (-> this fact) + (new 'process 'fact-info this (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc)) + ) + (let ((a1-6 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-24 0)) + (if (not (logtest? (-> this fact options) (actor-option loop))) + (set! v1-24 (logior v1-24 1)) + ) + (set! (-> a1-6 sync-type) 'sync-eased) + (set! (-> a1-6 sync-flags) (the-as sync-flags v1-24)) + ) + (set! (-> a1-6 period) (the-as uint 1500)) + (set! (-> a1-6 entity) arg0) + (set! (-> a1-6 percent) 0.0) + (set! (-> a1-6 ease-in) 0.15) + (set! (-> a1-6 ease-out) 0.15) + (set! (-> a1-6 pause-in) 0.1) + (set! (-> a1-6 pause-out) 0.0) + (initialize! (-> this sync) a1-6) + ) + (base-plat-method-34 this) + ) + +;; definition of type min-moving-step +(deftype min-moving-step (min-plat-updown) + ((holding? basic) + ) + (:state-methods + dormant + ) + ) + +;; definition for method 3 of type min-moving-step +(defmethod inspect ((this min-moving-step)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type min-plat-updown inspect))) + (t9-0 this) + ) + (format #t "~2Tholding?: ~A~%" (-> this holding?)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-min-moving-step min-moving-step min-moving-step-lod0-jg min-moving-step-idle-ja + ((min-moving-step-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 3 8) + ) + +;; failed to figure out what this is: +(defstate dormant (min-moving-step) + :virtual #t + :event (the-as (function process int symbol event-message-block object) eco-door-event-handler) + :code (behavior () + (set! (-> self path-pos) 0.0) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) (-> self path-pos) 'interp) + (plat-trans) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate active (min-moving-step) + :virtual #t + :trans (behavior () + (if (and (not (-> self holding?)) (or (= (-> self path-pos) 0.0) (= (-> self path-pos) 1.0))) + (set! (-> self holding?) (the-as basic #t)) + ) + (when (and (and (< 0.0 (-> self path-pos)) (< (-> self path-pos) 1.0)) (-> self holding?)) + (set! (-> self holding?) #f) + (sound-play "min-moving-step") + ) + (let ((t9-2 (-> (method-of-type min-plat-updown active) trans))) + (if t9-2 + (t9-2) + ) + ) + ) + ) + +;; definition for method 37 of type min-moving-step +(defmethod get-skel ((this min-moving-step)) + (art-group-get-by-name *level* "skel-min-moving-step" (the-as (pointer level) #f)) + ) + +;; definition for method 32 of type min-moving-step +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this min-moving-step)) + (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 player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> s4-0 transform-index) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 12288.0 32768.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-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 34 of type min-moving-step +;; WARN: Return type mismatch object vs none. +(defmethod base-plat-method-34 ((this min-moving-step)) + (set! (-> this holding?) #f) + (cond + ((logtest? (-> this path flags) (path-control-flag not-found)) + (go (method-of-object this idle)) + ) + ((and (or (task-node-open? (game-task-node mine-blow-resolution)) + (task-node-closed? (game-task-node mine-blow-resolution)) + ) + (> (-> this sync period) 0) + ) + (go (method-of-object this active)) + ) + (else + (go (method-of-object this dormant)) + ) + ) + (none) + ) + +;; definition of type min-elevator +(deftype min-elevator (elevator) + () + ) + +;; definition for method 3 of type min-elevator +(defmethod inspect ((this min-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-min-elevator min-elevator min-elevator-lod0-jg min-elevator-idle-ja + ((min-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 (min-elevator) + :virtual #t + :enter (behavior () + (setup-masks (-> self draw) 3 0) + (let ((t9-1 (-> (method-of-type elevator running) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :exit (behavior () + (setup-masks (-> self draw) 1 2) + (let ((t9-1 (-> (method-of-type elevator running) exit))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + +;; definition for method 31 of type min-elevator +(defmethod get-art-group ((this min-elevator)) + (art-group-get-by-name *level* "skel-min-elevator" (the-as (pointer level) #f)) + ) + +;; definition for method 32 of type min-elevator +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-collision! ((this min-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 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! (-> 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 obstacle 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 min-elevator +;; WARN: Return type mismatch int vs none. +(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 0)) + (set! (-> this draw light-index) (the-as uint 2)) + (none) + ) diff --git a/test/decompiler/reference/jak3/levels/mine/mine-scenes_REF.gc b/test/decompiler/reference/jak3/levels/mine/mine-scenes_REF.gc new file mode 100644 index 0000000000..836d771c11 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mine/mine-scenes_REF.gc @@ -0,0 +1,1568 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-leggings-fma leggings-fma leggings-fma-lod0-jg leggings-fma-idle-ja + ((leggings-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-min-elevator-movie min-elevator min-elevator-lod0-jg min-elevator-idle-ja + ((min-elevator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 11) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defpartgroup group-min-door-explode + :id 609 + :duration (seconds 3) + :linger-duration (seconds 2) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2370 :flags (sp3) :period (seconds 30) :length (seconds 0.035)) + (sp-item 2371 :period (seconds 30) :length (seconds 0.035)) + (sp-item 2372 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 2373 :period (seconds 30) :length (seconds 0.667)) + (sp-item 2374 :period (seconds 30) :length (seconds 0.667)) + (sp-item 2375 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 2370 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 60)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 100.0) + (:a 128.0) + (:omega (degrees 18011.25)) + (:fade-a -0.21333334) + (: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 2371 + :init-specs ((:texture (edge-cloud level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 30.0) + (:scale-x (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 1.0) + (:g 1.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.1)) + (:friction 0.97) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-13 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-explo-door-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 90.0 :y 90.0 :z 90.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-explo-door-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-explo-door-dust-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 16.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 4.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-explo-door-dust-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 16.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 4.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-explo-door-dust-alpha* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.5 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x 2.0 :y -2.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-explo-door-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-explo-door-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-bomb-door-explosion-dust-in-curve-settings*, type particle-curve-settings +(define *part-bomb-door-explosion-dust-in-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 1) + :lifetime-offset (seconds 4) + :flags (particle-curve-flags pcf0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 2371 init-specs 14 initial-valuef) + (the-as float *part-bomb-door-explosion-dust-in-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-bomb-door-explosion-dust-in-curve-settings* color-start) *range-explo-door-dust-color*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-door-explosion-dust-in-curve-settings* alpha-start) *range-explo-door-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-door-explosion-dust-in-curve-settings* scale-x-start) *range-explo-door-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-door-explosion-dust-in-curve-settings* scale-y-start) *range-explo-door-dust-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-door-explosion-dust-in-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-bomb-door-explosion-dust-in-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-bomb-door-explosion-dust-in-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-bomb-door-explosion-dust-in-curve-settings* a-scalar) *curve-explo-door-dust-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-door-explosion-dust-in-curve-settings* scale-x-scalar) *curve-explo-door-dust-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-door-explosion-dust-in-curve-settings* scale-y-scalar) *curve-explo-door-dust-scale-y*) + +;; failed to figure out what this is: +(defpart 2373 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 10.0) + (:scale-x (meters 6) (meters 4)) + (: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.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.85 0.05) + (: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 2374 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 10.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.033333335)) + (:friction 0.99) + (: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-explo-door-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-explo-door-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-explo-door-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 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! *range-explo-door-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 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! *curve-explo-door-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-explo-door-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.8 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 0.9 :z 1.0 :w 2.0) + :one-over-x-deltas (new 'static 'vector :x 1.125 :y 0.5000002 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-explo-door-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.8 :z -1.0 :w -2.0) + :ys (new 'static 'vector :y 0.9 :z 1.0 :w 2.0) + :one-over-x-deltas (new 'static 'vector :x 1.125 :y 0.5000002 :z 1.0 :w 1.0) + ) + ) + ) + +;; definition for symbol *part-bomb-door-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-bomb-door-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* 2374 init-specs 16 initial-valuef) + (the-as float *part-bomb-door-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-bomb-door-explosion-texture-curve-settings* color-start) *range-explo-door-color*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-door-explosion-texture-curve-settings* alpha-start) *range-explo-door-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-door-explosion-texture-curve-settings* scale-x-start) *range-explo-door-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-door-explosion-texture-curve-settings* scale-y-start) *range-explo-door-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-door-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-bomb-door-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-bomb-door-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-bomb-door-explosion-texture-curve-settings* a-scalar) *curve-explo-door-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-door-explosion-texture-curve-settings* scale-x-scalar) *curve-explo-door-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-bomb-door-explosion-texture-curve-settings* scale-y-scalar) *curve-explo-door-scale-y*) + +;; failed to figure out what this is: +(defpart 2372 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 100)) + (:rot-x (degrees 225)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 100.0) + (:a 128.0) + (:omega (degrees 18011.25)) + (:scalevel-x (meters -2)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2375 + :init-specs ((:texture (laser-hit2-add level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (: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 128.0) + (:omega (degrees 18011.25)) + (:scalevel-x (meters 1.3333334)) + (:scalevel-y :copy scalevel-x) + (:fade-b -1.7066667) + (:fade-a -1.7066667) + (:timer (seconds 0.25)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +;; failed to figure out what this is: +(defpart 2376 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 16.0 10.0) + (:y (meters -2.5)) + (:scale-x (meters 3) (meters 2)) + (:rot-z (degrees 0)) + (:scale-y (meters 3.4) (meters 0.6)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 32.0 32.0) + (:vel-y (meters 0) (meters 0.13333334)) + (:scalevel-x (meters 0.06666667) (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.32) + (:friction 0.94) + (: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 2377) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 90)) + (:conerot-radius (meters 0) (meters 8)) + ) + ) + +;; failed to figure out what this is: +(defpart 2377 + :init-specs ((:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0) (:next-time (seconds 0.017) (seconds 0.065)) (:next-launcher 2378)) + ) + +;; failed to figure out what this is: +(defpart 2378 + :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 2379) + ) + ) + +;; failed to figure out what this is: +(defpart 2379 + :init-specs ((:scalevel-x (meters 0.008333334) (meters 0.008333334)) + (:scalevel-y :copy scalevel-x) + (:fade-r -1.2) + (:fade-g -0.7111111) + (:fade-b -0.2) + (:fade-a -0.06545454 -0.06545454) + (:next-time (seconds 0.5) (seconds 0.097)) + (:next-launcher 2380) + ) + ) + +;; failed to figure out what this is: +(defpart 2380 + :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 2381 + :init-specs ((:texture (specs level-default-sprite)) + (:num 6.0 8.0) + (:x (meters 0.25)) + (:y (meters -2.5)) + (:scale-x (meters 3) (meters 5)) + (: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.06666667) (meters 0.4)) + (:scalevel-x (meters 0.013333334) (meters 0.013333334)) + (: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.00033333333) (meters -0.0023333333)) + (:friction 0.88 0.02) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 2382) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 90)) + (:conerot-radius (meters 3) (meters 5)) + ) + ) + +;; failed to figure out what this is: +(defpart 2382 + :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 2383) + ) + ) + +;; failed to figure out what this is: +(defpart 2383 + :init-specs ((:fade-r -0.5543478) (:fade-g -0.5543478) (:fade-b -0.5543478) (:fade-a -0.10666667 -0.10666667)) + ) + +;; failed to figure out what this is: +(defpart 2384 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 4.0 8.0) + (:x (meters 0) (meters 0.6)) + (:y (meters -2.5)) + (:scale-x (meters 8.5) (meters 8)) + (: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.2)) + (:scalevel-x (meters 0.033333335) (meters 0.086666666)) + (: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.89) + (:timer (seconds 2.367)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.117) (seconds 0.047)) + (:next-launcher 2385) + (:conerot-x (degrees -1440) (degrees 2880)) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 2385 + :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 2386) + ) + ) + +;; failed to figure out what this is: +(defpart 2386 + :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 2387 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 9.0) + (:y (meters -2.5)) + (:scale-x (meters 4) (meters 8)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 1) (meters 0.5)) + (:r 128.0 128.0) + (:g 96.0) + (:b 64.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.13333334) (meters 0.4)) + (: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: +(defpartgroup group-min-door-trailer + :id 610 + :duration (seconds 3) + :linger-duration (seconds 2) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 2388 :flags (sp7) :period (seconds 30) :length (seconds 0.5))) + ) + +;; failed to figure out what this is: +(defpart 2388 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters -0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-g -1.28) + (:fade-b -2.56) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 2389) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 2389 + :init-specs ((:fade-g 0.0) (:fade-b 0.0)) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "catacombs-travel-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-140" + :art-group "scenecamera" + :anim "catacombs-travel-res" + :parts 6 + :command-list '((0 (fadein (frame-time-30 10)) (send-event "pecker-ingame-1" 'die)) + (620 (fadeout (frame-time-30 10))) + (10000 (task-close! "mine-explore-introduction")) + ) + :cut-list '(40 122 255 301 440 491) + :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 'minea + :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 'minea + :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-ingame" + :level 'minea + :art-group "skel-pecker-ingame" + :prefix "" + :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 "minec-start" + :end-point "minec-intro" + :borrow '() + :sfx-volume -1.0 + :music-delay 1500.0 + :on-running '(sound-play-loop "mine-amb-mov") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "mine-explore-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4 scf8) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-195" + :art-group "scenecamera" + :anim "mine-explore-res" + :parts 3 + :command-list '((0 (fadein (frame-time-30 10)) (kill "leggings-2")) + (140 (send-event "jakc-highres" 'segment 32 0)) + (290 (fadeout (frame-time-30 10))) + (10000 + (send-event self 'user-data-set! (task-closed? "mine-explore-resolution")) + (task-close! "mine-explore-resolution") + ) + ) + :cut-list '(80 140) + :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 'minea + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(140) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #xa0 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'minea + :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 "leggings-fma" + :level 'minea + :art-group "skel-leggings-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 "mineb-elevator-room" + :end-point "mineb-after-armor" + :borrow '() + :sfx-volume -1.0 + :music-delay 1500.0 + :scene-task #x72 + :on-running '(sound-play-loop "mine-amb-mov") + :on-complete '(unless (send-event self 'user-data) (talker-spawn "powup005")) + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "mine-train-intro" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-109" + :art-group "scenecamera" + :anim "mine-train-intro" + :parts 3 + :command-list '((0 (kill "min-crane-8") (kill "min-bomb-train-1")) + (335 (fadeout (frame-time-30 15))) + (10000 (task-close! "mine-blow-introduction") (send-event "min-bomb-elevator-1" 'trigger)) + ) + :cut-list '(95 208) + :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 'minea + :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 'minea + :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 "min-crane" + :level 'mineb + :art-group "skel-min-crane" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "min-bomb-train" + :level 'minea + :art-group "skel-min-bomb-train" + :prefix "" + :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 "mineb-elevator-room" + :end-point "mineb-on-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 "comb-exit" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-171" + :art-group "scenecamera" + :anim "comb-exit" + :parts 6 + :command-list '((0 + (kill "comb-elevator-1") + (kill "min-elevator-7") + (send-event "pecker-ingame-2" 'die) + (send-event "min-elevator-movie" 'segment 1 2) + (want-display 'minea 'display) + ) + (105 (send-event "min-elevator-movie" 'segment 3)) + (155 (want-load 'minea 'minec)) + (526 (want-display 'minec 'display)) + (609 (send-event "min-elevator-movie" 'segment 1 2)) + (10000 (restore "comb-elevator-1") (restore "min-elevator-7") (save) (task-close! "comb-travel-resolution")) + ) + :cut-list '(155 526 571) + :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 'minea + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '((145 575)) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x80 + ) + (new 'static 'scene-actor + :name "sidekick-highres" + :level 'minea + :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 "min-elevator-movie" + :level 'minea + :art-group "skel-min-elevator-movie" + :prefix "" + :draw-frames '((min max)) + :scissor-frames '((min max)) + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :light-index #x2 + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "pecker-ingame" + :level 'minea + :art-group "skel-pecker-ingame" + :prefix "" + :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 "combn-start" + :end-point "minec-start" + :borrow '() + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running '(sound-play-loop "tunnel-amb-mov") + :on-complete #f + ) + ) + +;; failed to figure out what this is: +(load-scene (new 'static 'scene + :name "mine-train-res" + :extra #f + :info #f + :scene-flags (scene-flags scf1 scf2 scf3 scf4) + :mask-to-clear (process-mask movie projectile) + :entity "scene-stage-113" + :art-group "scenecamera" + :anim "mine-train-res" + :parts 2 + :command-list '((0 + (send-event "min-door-1" 'subtask-complete) + (kill "min-door-1") + (kill "manta-1") + (kill "manta-3") + (kill "manta-4") + (part-tracker + "group-bomb-train-sparks" + entity + "min-bomb-train" + joint + "sparks" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-bomb-train-smoke" + entity + "min-bomb-train" + joint + "sparks1" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-bomb-train-sparks" + entity + "min-bomb-train" + joint + "sparks2" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-bomb-train-smoke" + entity + "min-bomb-train" + joint + "sparks3" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-bomb-train-sparks" + entity + "min-bomb-train" + joint + "sparks4" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-bomb-train-light" + entity + "min-bomb-train" + joint + "light" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-bomb-train-light" + entity + "min-bomb-train" + joint + "light1" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-bomb-train-light" + entity + "min-bomb-train" + joint + "light2" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + ) + (78 + (part-tracker + "group-min-door-explode" + entity + "min-bomb-train" + joint + "main" + track + #f + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (send-event "min-bomb-train-3" 'doors-exploded) + ) + (80 + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "h" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "i" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "k" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "l" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "n" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "o" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "s" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "t" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "u" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "v" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "x" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "y" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "ad" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "ag" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + ) + (81 + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "m" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "w" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "z" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + ) + (82 + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "g" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "zz" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + ) + (83 (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "d" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + ) + (88 (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "aa" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + ) + (93 (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "ab" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + ) + (95 + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "f" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "ac" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + ) + (98 (part-tracker + "group-min-door-trailer" + entity + "min-door-break" + joint + "e" + track + #t + duration + (seconds (new 'static 'bfloat :data 5.0)) + ) + ) + (10000 (kill "min-boss-elev-1") (task-close! "mine-blow-resolution")) + ) + :cut-list '(95 208) + :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 "min-door-break" + :level 'minec + :art-group "skel-min-door-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 "min-bomb-train" + :level 'minea + :art-group "skel-min-bomb-train" + :prefix "" + :draw-frames '((min 88)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "minec-train" + :end-point "minec-resolution" + :borrow '() + :sfx-volume 1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :on-running #f + :on-complete #f + ) + ) + +;; definition of type leggings +(deftype leggings (process-drawable) + ((alt-actor entity-actor) + ) + (:state-methods + idle + die + ) + ) + +;; definition for method 3 of type leggings +(defmethod inspect ((this leggings)) + (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-leggings leggings leggings-lod0-jg leggings-idle-ja + ((leggings-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; failed to figure out what this is: +(defstate idle (leggings) + :virtual #t + :code (behavior () + (ja :group! (ja-group) :num! min) + (ja-post) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate die (leggings) + :virtual #t + :code (behavior () + (suspend) + 0 + ) + ) + +;; definition for method 11 of type leggings +(defmethod init-from-entity! ((this leggings) (arg0 entity-actor)) + (when (task-node-closed? (game-task-node mine-explore-resolution)) + (cleanup-for-death this) + (return #f) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (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-leggings" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this alt-actor) (entity-actor-lookup arg0 'alt-actor 0)) + (if (or (kiosk?) (demo?)) + (go (method-of-object this die)) + (go (method-of-object this idle)) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/mine/mine-train_REF.gc b/test/decompiler/reference/jak3/levels/mine/mine-train_REF.gc new file mode 100644 index 0000000000..ae7c27ff1f --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mine/mine-train_REF.gc @@ -0,0 +1,995 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *min-bomb-train-times*, type (array float) +(define *min-bomb-train-times* + (new 'static 'boxed-array :type float 12.0 15.0 27.0 33.0 55.0 59.0 90.0 92.0 106.0 127.0 131.0 143.0 146.0) + ) + +;; definition of type min-bomb-train +(deftype min-bomb-train (process-focusable) + ((path-pos float) + (path-length float) + (speed float) + (fall-travel-time float) + (actor-group (pointer actor-group)) + (actor-group-count int32) + (wheel-angle degrees) + (sound-loop-id sound-id) + (attack-id uint32) + (spark-part sparticle-launch-control) + (smoke-part sparticle-launch-control) + (light-part sparticle-launch-control) + (doors-exploded? symbol) + (taskman handle) + (current-rail uint8) + (suck-level float) + (minimap (array connection-minimap)) + ) + (:state-methods + idle + wait + active + explode + fall + die + explode-doors + ) + (:methods + (alloc-path! (_type_) symbol) + (init-collision! (_type_) none) + (get-path-progress (_type_ float float) float) + (update-task-manager (_type_) object) + (spawn-debris (_type_) none) + (explode-sound (_type_) none) + ) + ) + +;; definition for method 3 of type min-bomb-train +(defmethod inspect ((this min-bomb-train)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tpath-pos: ~f~%" (-> this path-pos)) + (format #t "~2Tpath-length: ~f~%" (-> this path-length)) + (format #t "~2Tspeed: ~f~%" (-> this speed)) + (format #t "~2Tfall-travel-time: ~f~%" (-> this fall-travel-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 "~2Twheel-angle: ~f~%" (-> this wheel-angle)) + (format #t "~2Tsound-loop-id: ~D~%" (-> this sound-loop-id)) + (format #t "~2Tattack-id: ~D~%" (-> this attack-id)) + (format #t "~2Tspark-part: ~A~%" (-> this spark-part)) + (format #t "~2Tsmoke-part: ~A~%" (-> this smoke-part)) + (format #t "~2Tlight-part: ~A~%" (-> this light-part)) + (format #t "~2Tdoors-exploded?: ~A~%" (-> this doors-exploded?)) + (format #t "~2Ttaskman: ~D~%" (-> this taskman)) + (format #t "~2Tcurrent-rail: ~D~%" (-> this current-rail)) + (format #t "~2Tsuck-level: ~f~%" (-> this suck-level)) + (format #t "~2Tminimap: ~A~%" (-> this minimap)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-min-bomb-train min-bomb-train min-bomb-train-lod0-jg min-bomb-train-idle-ja + ((min-bomb-train-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 18) + :shadow min-bomb-train-shadow-mg + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-min-bomb-train-debris-a min-bomb-train-debris min-bomb-train-debris-a-lod0-jg -1 + ((min-bomb-train-debris-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +;; failed to figure out what this is: +(defskelgroup skel-min-bomb-train-debris-b min-bomb-train-debris min-bomb-train-debris-b-lod0-jg -1 + ((min-bomb-train-debris-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-min-bomb-train-debris-c min-bomb-train-debris min-bomb-train-debris-c-lod0-jg -1 + ((min-bomb-train-debris-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-min-bomb-train-debris-d min-bomb-train-debris min-bomb-train-debris-d-lod0-jg -1 + ((min-bomb-train-debris-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; definition for symbol *min-bomb-train-debris-params*, type debris-static-params +(define *min-bomb-train-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-min-bomb-train-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 13 :group "skel-min-bomb-train-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 14 :group "skel-min-bomb-train-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 15 :group "skel-min-bomb-train-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 16 :group "skel-min-bomb-train-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 4 :group "skel-min-bomb-train-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 5 :group "skel-min-bomb-train-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 6 :group "skel-min-bomb-train-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 7 :group "skel-min-bomb-train-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 12 :group "skel-min-bomb-train-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 8 :group "skel-min-bomb-train-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-min-bomb-train-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-min-bomb-train-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 11 :group "skel-min-bomb-train-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 3 :group "skel-min-bomb-train-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 3 :group "skel-min-bomb-train-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 3 :group "skel-min-bomb-train-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 3 :group "skel-min-bomb-train-debris-c") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "train-pieces") + ) + ) + +;; definition for method 36 of type min-bomb-train +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this min-bomb-train)) + (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)) + (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 0.0 40960.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 action) (collide-action solid no-standon)) + (set! (-> v1-12 transform-index) 3) + (set-vector! (-> v1-12 local-sphere) 0.0 0.0 0.0 40960.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 action) (collide-action solid no-standon)) + (set! (-> v1-14 transform-index) 3) + (set-vector! (-> v1-14 local-sphere) 0.0 4096.0 28672.0 12288.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 action) (collide-action solid no-standon)) + (set! (-> v1-16 transform-index) 3) + (set-vector! (-> v1-16 local-sphere) 0.0 12288.0 0.0 20480.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 39 of type min-bomb-train +;; WARN: Return type mismatch int vs none. +(defmethod spawn-debris ((this min-bomb-train)) + (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.5) + (set-vector! (-> a1-1 fountain-rand-transv-lo) -327680.0 163840.0 -327680.0 1.0) + (set-vector! (-> a1-1 fountain-rand-transv-hi) 327680.0 163840.0 327680.0 1.0) + (debris-spawn this a1-1 *min-bomb-train-debris-params* (the-as process-drawable #f)) + ) + 0 + (none) + ) + +;; definition for method 40 of type min-bomb-train +;; WARN: Return type mismatch int vs none. +(defmethod explode-sound ((this min-bomb-train)) + (set-setting! 'music #f 0.0 0) + (sound-play "train-explode") + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate idle (min-bomb-train) + :virtual #t + :trans (behavior () + (if (and (task-node-open? (game-task-node mine-blow-resolution)) + (not (logtest? (-> self path flags) (path-control-flag not-found))) + ) + (go-virtual active) + ) + (when (task-node-closed? (game-task-node mine-blow-resolution)) + (cleanup-for-death self) + (deactivate self) + ) + ) + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate wait (min-bomb-train) + :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 + ) + :exit (behavior () + (let ((v1-1 (-> self root root-prim))) + (set! (-> v1-1 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-1 prim-core collide-with) (-> self root backup-collide-with)) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + ) + :trans (behavior () + (if (or (task-open? (the-as string ((method-of-type res-lump get-property-struct) + (-> self entity) + 'task-name + 'interp + -1000000000.0 + "mine-blow-resolution" + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (task-node-open? (game-task-node mine-blow-resolution)) + ) + (go-virtual idle) + ) + ) + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate active (min-bomb-train) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch 'attack) + (let ((s4-0 (the-as object (-> block param 0))) + (s3-0 (if (= message 'attack) + (-> block param 1) + #f + ) + ) + (s2-0 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1)) + ) + (when (the-as touching-shapes-entry s4-0) + (let ((s1-0 (-> (the-as touching-shapes-entry s4-0) head))) + (while s1-0 + (when (= (get-touched-prim s1-0 (-> self root) (the-as touching-shapes-entry s4-0)) s2-0) + (let ((s4-1 (if (type? proc process-focusable) + (the-as process-focusable proc) + ) + ) + ) + (when (and s4-1 + (= (-> s4-1 type) target) + (or (not (the-as uint s3-0)) + (not (logtest? (penetrate dark-bomb dark-smack) (-> (the-as attack-info s3-0) penetrate-using))) + ) + ) + (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 + (send-event + s4-1 + 'attack-invinc + (the-as touching-shapes-entry (-> block param 0)) + (static-attack-info + :mask (vehicle-impulse-factor) + ((id (-> self attack-id)) + (damage 1000.0) + (vehicle-damage-factor 1.0) + (vehicle-impulse-factor 1.0) + (mode 'smush) + (vector (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (angle 'back) + ) + ) + ) + ) + ) + (return #f) + ) + (set! s1-0 (-> s1-0 next)) + ) + ) + #f + ) + ) + ) + (('rail-down) + (when (>= (-> self actor-group-count) 3) + (dotimes (s5-2 (-> self actor-group 3 length)) + (let ((s4-2 (-> self actor-group 3 data s5-2 actor))) + (cond + ((and s4-2 (not (logtest? (-> s4-2 extra perm status) (entity-perm-status subtask-complete)))) + (let* ((s4-3 (handle->process (-> self taskman))) + (v1-42 (if (type? s4-3 task-manager) + s4-3 + ) + ) + ) + (when v1-42 + (set! (-> self current-rail) (the-as uint s5-2)) + (let ((f0-3 (-> *min-bomb-train-times* s5-2))) + (if (< 0.0 (-> self suck-level)) + (set! f0-3 (* f0-3 (/ 1.0 (-> self suck-level)))) + ) + (set! (-> (the-as task-manager v1-42) time-limit) (the-as time-frame (the int (* 300.0 f0-3)))) + ) + (return #t) + ) + ) + ) + ((= s4-2 (-> proc entity)) + (when (and (nonzero? (-> self minimap s5-2)) *minimap*) + (kill-callback (-> *minimap* engine) (-> self minimap s5-2)) + (set! (-> self minimap s5-2) + (add-icon! *minimap* self (the-as uint 155) (the-as int #f) (-> s4-2 extra trans) 0) + ) + ) + ) + ) + ) + ) + #f + ) + ) + (('go-explode) + (go-virtual explode) + ) + (('go-explode-doors) + (go-virtual explode-doors) + ) + ) + ) + :enter (behavior () + (set-setting! 'music 'mineblow 0.0 0) + (when (not (handle->process (-> self taskman))) + (let ((v1-8 (-> *game-info* sub-task-list (game-task-node mine-blow-resolution)))) + (set! (-> self taskman) (if (-> v1-8 manager) + (-> v1-8 manager manager) + (the-as handle #f) + ) + ) + ) + ) + (let ((v1-13 (-> *game-info* sub-task-list (game-task-node mine-blow-resolution)))) + (if (and v1-13 (< (the-as uint 2) (-> v1-13 death-count))) + (set! (-> self suck-level) + (- 1.0 (* 0.04 (the float (max 0 (min 5 (the-as int (+ (-> v1-13 death-count) -2))))))) + ) + ) + ) + (add-icon! *minimap* self (the-as uint 129) (the-as int #f) (the-as vector #t) 0) + 0 + ) + :trans (behavior () + (if (not (task-node-open? (game-task-node mine-blow-resolution))) + (go-virtual idle) + ) + (set! (-> self path-pos) (get-path-progress self (-> self path-pos) (* (-> self speed) (seconds-per-frame)))) + (spawn-from-cspace (-> self spark-part) (joint-node min-bomb-train-lod0-jg sparks)) + (spawn-from-cspace (-> self smoke-part) (joint-node min-bomb-train-lod0-jg sparks1)) + (spawn-from-cspace (-> self spark-part) (joint-node min-bomb-train-lod0-jg sparks2)) + (spawn-from-cspace (-> self smoke-part) (joint-node min-bomb-train-lod0-jg sparks3)) + (spawn-from-cspace (-> self spark-part) (joint-node min-bomb-train-lod0-jg sparks4)) + (spawn-from-cspace (-> self light-part) (joint-node min-bomb-train-lod0-jg light)) + (spawn-from-cspace (-> self light-part) (joint-node min-bomb-train-lod0-jg light1)) + (spawn-from-cspace (-> self light-part) (joint-node min-bomb-train-lod0-jg light2)) + (spawn-from-cspace (-> self light-part) (joint-node min-bomb-train-lod0-jg light3)) + (if (nonzero? (-> self sound-loop-id)) + (sound-play-by-name + (static-sound-name "bomb-train") + (-> self sound-loop-id) + 1024 + (the int (* 1524.0 (lerp-scale -0.25 0.0 (-> self speed) 28672.0 57344.0))) + 0 + (sound-group) + #t + ) + ) + (let ((f1-1 (* 28672.0 ((method-of-type res-lump get-property-value-float) + (-> self entity) + 'speed + 'interp + (-> self path-pos) + 1.0 + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + (f0-10 1.0) + ) + (when (< 0.0 (-> self suck-level)) + (set! f0-10 (-> self suck-level)) + (set! f1-1 (* f1-1 f0-10)) + ) + (let ((f0-14 (seek (-> self speed) f1-1 (* 7168.0 (seconds-per-frame) (* f0-10 f0-10))))) + (set! (-> self speed) f0-14) + (set! (-> self speed) f0-14) + ) + ) + 0 + (update-task-manager self) + ) + :code (behavior () + (local-vars (v1-8 process)) + (let* ((s5-0 (handle->process (-> self taskman))) + (gp-0 (if (type? s5-0 task-manager) + (the-as task-manager s5-0) + ) + ) + ) + (when gp-0 + (logior! (-> gp-0 info mask) (task-manager-mask time-limit)) + (until v1-8 + (suspend) + (set! v1-8 (handle->process (-> gp-0 hud-timer))) + ) + (let ((f0-0 (-> *min-bomb-train-times* 0))) + (if (< 0.0 (-> self suck-level)) + (set! f0-0 (* f0-0 (/ 1.0 (-> self suck-level)))) + ) + (set! (-> gp-0 time-limit) (the-as time-frame (the int (* 300.0 f0-0)))) + ) + ) + ) + (sleep-code) + ) + :post transform-post + ) + +;; failed to figure out what this is: +(defstate die (min-bomb-train) + :virtual #t + :code (behavior () + (cleanup-for-death self) + (send-event (handle->process (-> self taskman)) 'fail) + ) + ) + +;; failed to figure out what this is: +(defstate fall (min-bomb-train) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('go-explode) + (go-virtual explode) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self root transv quad) (the-as uint128 0)) + (if (nonzero? (-> self sound-loop-id)) + (sound-stop (-> self sound-loop-id)) + ) + (set! (-> self fall-travel-time) (/ 2764800.0 (-> self speed))) + ) + :trans (behavior () + (cond + ((not (time-elapsed? (-> self state-time) (the int (-> self fall-travel-time)))) + (set! (-> self path-pos) + (path-control-method-26 (-> self path) (-> self path-pos) (* (-> self speed) (seconds-per-frame))) + ) + (get-point-at-percent-along-path! (-> self path) (-> self root trans) (-> self path-pos) 'interp) + ) + (else + (let ((gp-0 (displacement-between-points-at-percent-normalized! + (-> self path) + (new 'stack-no-clear 'vector) + (-> self path-pos) + ) + ) + ) + (vector-normalize! gp-0 (-> self speed)) + (set! (-> self root transv y) (- (-> self root transv y) (* 3.3333333 (seconds-per-frame) (-> self speed)))) + (+! (-> gp-0 y) (-> self root transv y)) + (vector+float*! (-> self root trans) (-> self root trans) gp-0 (seconds-per-frame)) + ) + ) + ) + (let ((a1-6 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (gp-1 (new 'stack-no-clear 'quaternion)) + ) + (quaternion-vector-angle! gp-1 a1-6 (* 0.26666668 (seconds-per-frame) (-> self speed))) + (quaternion*! (-> self root quat) gp-1 (-> self root quat)) + ) + (quaternion-normalize! (-> self root quat)) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (when (type? (-> self root) collide-shape) + (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)) + (transform-post) + (spawn-debris self) + (explode-sound self) + (cond + ((logtest? (-> *part-group-id-table* 604 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* 604)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 604)) + ) + ) + (activate! *camera-smush-control* 819.2 36 210 0.5 1.0 (-> self clock)) + (activate! *camera-smush-control-horizontal* 3276.8 24 210 0.5 1.0 (-> self clock)) + (while (-> self child) + (suspend) + ) + (go-virtual die) + ) + :post transform-post + ) + +;; failed to figure out what this is: +(defstate explode (min-bomb-train) + :virtual #t + :enter (behavior () + (set-setting! 'allow-progress #f 0.0 0) + (if (nonzero? (-> self sound-loop-id)) + (sound-stop (-> self sound-loop-id)) + ) + ) + :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) + (spawn-debris self) + (explode-sound self) + (cond + ((logtest? (-> *part-group-id-table* 604 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* 604)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 604)) + ) + ) + (activate! *camera-smush-control* 819.2 36 210 0.5 1.0 (-> self clock)) + (activate! *camera-smush-control-horizontal* 3276.8 24 210 0.5 1.0 (-> self clock)) + (while (-> self child) + (suspend) + ) + (go-virtual die) + ) + ) + +;; failed to figure out what this is: +(defstate explode-doors (min-bomb-train) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('doors-exploded) + (let ((v0-0 #t)) + (set! (-> self doors-exploded?) v0-0) + v0-0 + ) + ) + ) + ) + :exit (behavior () + (if (nonzero? (-> self sound-loop-id)) + (sound-stop (-> self sound-loop-id)) + ) + ) + :trans (behavior () + (if (nonzero? (-> self sound-loop-id)) + (sound-play "bomb-train" :id (-> self sound-loop-id)) + ) + ) + :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) + (get-point-at-percent-along-path! (-> self path) (-> self root trans) 1.0 'interp) + (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) 'complete) + (let ((t9-3 send-event-function) + (v1-14 (-> *game-info* sub-task-list (game-task-node mine-blow-resolution))) + ) + (t9-3 + (handle->process (if (-> v1-14 manager) + (-> v1-14 manager manager) + (the-as handle #f) + ) + ) + a1-2 + ) + ) + ) + (until (-> self doors-exploded?) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; definition for method 7 of type min-bomb-train +;; WARN: Return type mismatch process-focusable vs min-bomb-train. +(defmethod relocate ((this min-bomb-train) (offset int)) + (if (nonzero? (-> this minimap)) + (&+! (-> this minimap) offset) + ) + (if (nonzero? (-> this spark-part)) + (&+! (-> this spark-part) offset) + ) + (if (nonzero? (-> this smoke-part)) + (&+! (-> this smoke-part) offset) + ) + (if (nonzero? (-> this light-part)) + (&+! (-> this light-part) offset) + ) + (the-as min-bomb-train ((method-of-type process-focusable relocate) this offset)) + ) + +;; definition for method 35 of type min-bomb-train +(defmethod alloc-path! ((this min-bomb-train)) + (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)) + (not (logtest? (-> this path flags) (path-control-flag not-found))) + ) + +;; definition for method 38 of type min-bomb-train +;; WARN: Return type mismatch int vs object. +(defmethod update-task-manager ((this min-bomb-train)) + (if (or (< (-> this actor-group-count) 3) (not (handle->process (-> this taskman)))) + (return (the-as object 0)) + ) + (let ((s4-0 0) + (s5-0 #t) + ) + (let ((v1-10 (-> this actor-group 3 data (-> this current-rail) actor))) + (when v1-10 + (dotimes (a0-9 2) + (let ((f28-0 (if (zero? a0-9) + 94208.0 + 40960.0 + ) + ) + (s3-0 (if (zero? a0-9) + (method-of-object this fall) + (method-of-object this explode) + ) + ) + ) + (dotimes (a1-4 (-> this actor-group a0-9 length)) + (let ((a2-4 (-> this actor-group a0-9 data a1-4 actor))) + (when (and a2-4 (= v1-10 a2-4) (not (logtest? (-> a2-4 extra perm status) (entity-perm-status subtask-complete)))) + (set! s5-0 #f) + 0.0 + (let* ((s2-0 (-> a2-4 extra trans)) + (f1-0 (path-control-method-23 (-> this path) s2-0)) + (f30-0 (* (-> this path-length) (- f1-0 (-> this path-pos)))) + ) + (when (and (< f30-0 f28-0) (< (vector-vector-distance (-> this root trans) s2-0) f28-0)) + (let ((v1-19 (handle->process (-> this taskman)))) + (when (and v1-19 (handle->process (-> (the-as task-manager v1-19) hud-timer))) + (logclear! (-> (the-as task-manager v1-19) info mask) (task-manager-mask time-limit)) + (send-event (handle->process (-> (the-as task-manager v1-19) hud-timer)) 'hide-and-die) + ) + ) + (go s3-0) + ) + (cond + ((and (< s4-0 3) (< f30-0 163840.0)) + (set! s4-0 3) + ) + ((and (< s4-0 2) (< f30-0 286720.0)) + (set! s4-0 2) + ) + ((and (< s4-0 1) (< f30-0 409600.0)) + (set! s4-0 1) + ) + ) + ) + #t + (goto cfg-81) + ) + ) + ) + ) + ) + ) + ) + (label cfg-81) + (let ((v1-42 (handle->process (-> this taskman)))) + (if (and v1-42 (handle->process (-> (the-as task-manager v1-42) hud-timer))) + (send-event (handle->process (-> (the-as task-manager v1-42) hud-timer)) 'alert s4-0) + ) + ) + (let ((a0-48 (-> this actor-group 2 data 0 actor))) + (if (and a0-48 s5-0 (logtest? (-> a0-48 extra perm status) (entity-perm-status subtask-complete))) + (go (method-of-object this explode-doors)) + ) + ) + ) + 0 + ) + +;; definition for method 37 of type min-bomb-train +;; INFO: Used lq/sq +(defmethod get-path-progress ((this min-bomb-train) (arg0 float) (arg1 float)) + (rlet ((acc :class vf) + (Q :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (init-vf0-vector) + (when (nonzero? (-> this path)) + (/ 28672.0 (-> this path-length)) + 0.0 + 0.0 + (let ((f30-0 (path-control-method-26 (-> this path) arg0 arg1))) + (let ((f28-0 (path-control-method-26 (-> this path) arg0 -28672.0)) + (f26-0 (path-control-method-26 (-> this path) arg0 28672.0)) + (s5-1 (get-point-at-percent-along-path! (-> this path) (new 'stack-no-clear 'vector) f30-0 'interp)) + ) + (let ((s4-0 (get-point-at-percent-along-path! (-> this path) (new 'stack-no-clear 'vector) f28-0 'interp)) + (a2-6 (get-point-at-percent-along-path! (-> this path) (new 'stack-no-clear 'vector) f26-0 'interp)) + (v1-11 (new 'stack-no-clear 'vector)) + (a1-7 (new 'stack-no-clear 'matrix)) + ) + (let ((a0-7 (new 'stack-no-clear 'vector))) + (set! (-> a0-7 quad) (-> *up-vector* quad)) + (vector-! v1-11 a2-6 s4-0) + (let ((a2-7 v1-11)) + (let ((f0-4 1.0)) + (.lvf vf1 (&-> a2-7 quad)) + (.mul.vf vf2 vf1 vf1 :mask #b111) + (let ((a3-8 f0-4)) + (.mov vf3 a3-8) + ) + ) + (.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-7 quad) vf1) + ) + (let ((a2-8 a1-7)) + (set! (-> a2-8 fvec quad) (-> v1-11 quad)) + (set! (-> a2-8 uvec quad) (-> a0-7 quad)) + (vector-cross! (-> a2-8 rvec) (-> a2-8 uvec) v1-11) + ) + ) + (matrix->quaternion (-> this root quat) a1-7) + ) + (set! (-> this root trans quad) (-> s5-1 quad)) + ) + f30-0 + ) + ) + ) + ) + +;; definition for function min-bomb-train-callback +;; WARN: Return type mismatch int vs none. +(defun min-bomb-train-callback ((arg0 cspace) (arg1 transformq)) + (let ((v1-0 (the-as min-bomb-train (-> arg0 param1)))) + (when (and (-> v1-0 next-state) (= (-> v1-0 next-state name) 'active)) + (set! (-> v1-0 wheel-angle) + (the float + (sar (shl (the int (+ (-> v1-0 wheel-angle) (* -8.439792 (seconds-per-frame) (-> v1-0 speed)))) 48) 48) + ) + ) + (quaternion-rotate-local-x! (-> arg1 quat) (-> arg1 quat) (-> v1-0 wheel-angle)) + ) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + 0 + (none) + ) + +;; definition for method 10 of type min-bomb-train +(defmethod deactivate ((this min-bomb-train)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this sound-loop-id)) + (sound-stop (-> this sound-loop-id)) + ) + (if (nonzero? (-> this spark-part)) + (kill-particles (-> this spark-part)) + ) + (if (nonzero? (-> this smoke-part)) + (kill-particles (-> this smoke-part)) + ) + (if (nonzero? (-> this light-part)) + (kill-particles (-> this light-part)) + ) + ((method-of-type process-focusable deactivate) this) + (none) + ) + +;; definition for method 12 of type min-bomb-train +(defmethod run-logic? ((this min-bomb-train)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; definition for method 11 of type min-bomb-train +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this min-bomb-train) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (when (task-node-closed? (game-task-node mine-blow-resolution)) + (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-min-bomb-train" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (if (not (alloc-path! this)) + (go (method-of-object this idle)) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((a0-9 (-> this skel root-channel 0))) + (set! (-> a0-9 frame-group) (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + (set! (-> a0-9 param 0) 1.0) + (set! (-> a0-9 frame-num) 0.0) + (joint-control-channel-group! + a0-9 + (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + num-func-loop! + ) + ) + (ja-post) + (let ((a0-10 (-> this node-list data 13))) + (set! (-> a0-10 param0) min-bomb-train-callback) + (set! (-> a0-10 param1) this) + (set! (-> a0-10 param2) (the-as basic 0)) + ) + (let ((a0-11 (-> this node-list data 14))) + (set! (-> a0-11 param0) min-bomb-train-callback) + (set! (-> a0-11 param1) this) + (set! (-> a0-11 param2) (the-as basic 0)) + ) + (let ((a0-12 (-> this node-list data 15))) + (set! (-> a0-12 param0) min-bomb-train-callback) + (set! (-> a0-12 param1) this) + (set! (-> a0-12 param2) (the-as basic 0)) + ) + (let ((a0-13 (-> this node-list data 16))) + (set! (-> a0-13 param0) min-bomb-train-callback) + (set! (-> a0-13 param1) this) + (set! (-> a0-13 param2) (the-as basic 0)) + ) + (set! (-> this speed) 0.0) + (if (nonzero? (-> this path)) + (set! (-> this path-length) (total-distance (-> this path))) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-44 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-44 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-44)) + (set! (-> this actor-group-count) (the-as int (-> sv-16 elt-count))) + (when (>= (-> this actor-group-count) 3) + (let ((s5-1 (-> this actor-group 3 length))) + (set! (-> this minimap) (new 'process 'boxed-array connection-minimap s5-1)) + (dotimes (s4-1 s5-1) + (let ((v1-57 (-> this actor-group 3 data s4-1 actor))) + (if v1-57 + (set! (-> this minimap s4-1) + (add-icon! *minimap* this (the-as uint 154) (the-as int #f) (-> v1-57 extra trans) 0) + ) + ) + ) + ) + ) + ) + ) + (else + (set! (-> this actor-group) (the-as (pointer actor-group) #f)) + (set! (-> this actor-group-count) 0) + 0 + ) + ) + ) + (set! (-> this sound-loop-id) (new-sound-id)) + (let* ((v1-64 *game-info*) + (a0-24 (+ (-> v1-64 attack-id) 1)) + ) + (set! (-> v1-64 attack-id) a0-24) + (set! (-> this attack-id) a0-24) + ) + (set! (-> this spark-part) (create-launch-control (-> *part-group-id-table* 605) this)) + (set! (-> this smoke-part) (create-launch-control (-> *part-group-id-table* 606) this)) + (set! (-> this light-part) (create-launch-control (-> *part-group-id-table* 607) this)) + (set! (-> this doors-exploded?) #f) + (set! (-> this taskman) (the-as handle #f)) + (when (not (task-open? (the-as string ((method-of-type res-lump get-property-struct) + (-> this entity) + 'task-name + 'interp + -1000000000.0 + "mine-blow-resolution" + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + ) + (logior! (-> this draw status) (draw-control-status no-draw)) + (go (method-of-object this wait)) + ) + (if (task-node-open? (game-task-node mine-explore-resolution)) + (go (method-of-object this idle)) + ) + (go (method-of-object this active)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/mine/mined-mood_REF.gc b/test/decompiler/reference/jak3/levels/mine/mined-mood_REF.gc new file mode 100644 index 0000000000..7b290b0259 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mine/mined-mood_REF.gc @@ -0,0 +1,96 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type mined-states +(deftype mined-states (structure) + ((filter vector 2 :inline) + (light light-sphere 2) + ) + ) + +;; definition for method 3 of type mined-states +(defmethod inspect ((this mined-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'mined-states) + (format #t "~1Tfilter[2] @ #x~X~%" (-> this filter)) + (format #t "~1Tlight[2] @ #x~X~%" (-> this light)) + (label cfg-4) + this + ) + +;; definition for function set-mined-filter-light! +(defun set-mined-filter-light! ((arg0 string) (arg1 light-hash) (arg2 vector) (arg3 light-sphere)) + (cond + ((and arg3 (nonzero? arg3)) + (let ((v1-1 (-> arg3 color))) + (set! (-> v1-1 x) (-> arg2 x)) + (set! (-> v1-1 y) (-> arg2 y)) + (set! (-> v1-1 z) (-> arg2 z)) + ) + (set! (-> arg3 brightness) (-> arg2 w)) + arg3 + ) + (else + (lookup-light-sphere-by-name arg0 arg1) + ) + ) + ) + +;; definition for function init-mood-mined +(defun init-mood-mined ((arg0 mood-context)) + (let ((v1-0 (-> arg0 light-group 1))) + (set-vector! (-> v1-0 ambi color) 0.333 0.333 0.333 1.0) + (set! (-> v1-0 dir0 extra x) 0.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) + ) + ) + +;; definition for function update-mood-mined +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-mined 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 + (let ((s5-0 (the-as mined-states (-> arg0 state)))) + (let ((s4-1 (-> *level* level arg2 bsp light-hash))) + (set! (-> s5-0 light 0) + (set-mined-filter-light! "light-3802" s4-1 (the-as vector (-> s5-0 filter)) (-> s5-0 light 0)) + ) + (set! (-> s5-0 light 1) (set-mined-filter-light! "light-3803" s4-1 (-> s5-0 filter 1) (-> s5-0 light 1))) + ) + (set! (-> arg0 times 0 w) 1.0) + (set! (-> arg0 times 1 quad) (-> s5-0 filter 0 quad)) + (set! (-> arg0 times 2 quad) (-> s5-0 filter 1 quad)) + ) + ) + ) + 0 + (none) + ) + +;; definition for function set-mined-filter! +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs none. +(defun set-mined-filter! ((arg0 vector) (arg1 int)) + (let ((v1-1 (level-get *level* 'mined))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as mined-states v1-2) filter arg1 quad) (-> arg0 quad)) + ) + ) + ) + (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 0000000000..23922149ed --- /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 0000000000..338ce35dca --- /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/monster-frog_REF.gc b/test/decompiler/reference/jak3/levels/mine/monster-frog_REF.gc new file mode 100644 index 0000000000..3fc7fc68fb --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mine/monster-frog_REF.gc @@ -0,0 +1,991 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-monster-frog monster-frog monster-frog-lod0-jg monster-frog-idle0-ja + ((monster-frog-lod0-mg (meters 20)) (monster-frog-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + :shadow monster-frog-shadow-mg + :origin-joint-index 12 + ) + +;; definition of type monster-frog +(deftype monster-frog (nav-enemy) + () + (:state-methods + (attack vector) + attack-recover + turn + ) + ) + +;; definition for method 3 of type monster-frog +(defmethod inspect ((this monster-frog)) + (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 + ) + +;; definition for symbol *fact-info-monster-frog-defaults*, type fact-info-enemy-defaults +(define *fact-info-monster-frog-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9) + ) + +;; definition for symbol *monster-frog-nav-enemy-info*, type nav-enemy-info +(define *monster-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 8 + :hostile-anim 18 + :hit-anim 30 + :knocked-anim 30 + :knocked-land-anim 31 + :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 5 + :look-at-joint 5 + :bullseye-joint 4 + :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.25) + :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 #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 #t + :use-stop-chase #f + :use-circling #t + :use-pacing #t + :walk-anim 16 + :turn-anim 16 + :run-anim 18 + :taunt-anim -1 + :run-travel-speed (meters 18) + :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! (-> *monster-frog-nav-enemy-info* fact-defaults) *fact-info-monster-frog-defaults*) + +;; definition for function monster-frog-hop-slow-code +;; WARN: new jak 2 until loop case, check carefully +(defbehavior monster-frog-hop-slow-code monster-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 monster-frog-idle0-ja))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (ja-no-eval :group! monster-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 monster-frog-idle1-ja))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (ja-no-eval :group! monster-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! monster-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! monster-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 + ) + +;; definition for function monster-frog-hop-fast-code +;; WARN: new jak 2 until loop case, check carefully +(defbehavior monster-frog-hop-fast-code monster-frog () + (until #f + (nav-enemy-method-177 self) + (ja-no-eval :group! monster-frog-hop-slow-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (nav-enemy-method-178 self) + (ja-no-eval :group! monster-frog-hop-slow-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + +;; failed to figure out what this is: +(defstate ambush (monster-frog) + :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)) + ) + :code (behavior () + (update-focus self) + (let ((a0-2 (handle->process (-> self focus handle)))) + (when a0-2 + (let* ((gp-0 (-> self root)) + (s3-0 + (vector-normalize! + (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable a0-2) 0) (-> gp-0 trans)) + 1.0 + ) + ) + (f0-0 (deg-diff (quaternion-y-angle (-> gp-0 quat)) (vector-y-angle s3-0))) + ) + (quaternion-rotate-y! (-> gp-0 quat) (-> gp-0 quat) f0-0) + ) + ) + ) + (logclear! (-> self draw status) (draw-control-status no-draw)) + (ja-no-eval :group! monster-frog-popup0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((v1-37 (-> self root root-prim))) + (set! (-> v1-37 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-37 prim-core collide-with) (-> self root backup-collide-with)) + ) + (go-best-state self) + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate notice (monster-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! monster-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! monster-frog-notice0-jump-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (let ((a0-7 (handle->process (-> self focus handle)))) + (if a0-7 + (seek-to-point-toward-point! + (-> self root) + (get-trans (the-as process-focusable a0-7) 0) + (* 98304.0 f30-0) + (seconds 0.02) + ) + ) + ) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (ja-no-eval :group! monster-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 (monster-frog) + :virtual #t + :code (behavior () + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (until #f + (nav-enemy-method-176 self) + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! monster-frog-hop-slow-start-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (nav-enemy-method-178 self) + (ja-no-eval :group! monster-frog-hop-slow-end-ja :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.6)) + (let ((v1-57 self)) + (set! (-> v1-57 enemy-flags) (the-as enemy-flag (logclear (-> v1-57 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-57 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-121 self)) + (if (not (logtest? (enemy-flag ef37) (-> v1-121 enemy-flags))) + (set! (-> v1-121 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef39) (-> v1-121 enemy-flags)))) + ) + (set! (-> v1-121 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef37) (-> v1-121 enemy-flags)))) + (set! (-> v1-121 nav callback-info) (-> v1-121 enemy-info callback-info)) + ) + 0 + (nav-enemy-method-176 self) + (ja-no-eval :num! (loop!)) + (ja-channel-push! 1 (seconds 0.6)) + (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 pacing (monster-frog) + :virtual #t + :code monster-frog-hop-slow-code + ) + +;; failed to figure out what this is: +(defstate circling (monster-frog) + :virtual #t + :code monster-frog-hop-slow-code + ) + +;; failed to figure out what this is: +(defstate stare (monster-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 + ) + ) + +;; failed to figure out what this is: +(defstate hostile (monster-frog) + :virtual #t + :enter (behavior () + (logclear! (-> self enemy-flags) (enemy-flag alert)) + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-6 self)) + (set! (-> v1-6 enemy-flags) (the-as enemy-flag (logclear (-> v1-6 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + :trans (behavior () + (nav-enemy-method-171 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)) + (if (nav-enemy-method-174 self) + (go-stare2 self) + ) + (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) + ) + ) + ) + ) + :code (behavior () + (until #f + (let* ((gp-0 (handle->process (-> self focus handle))) + (a0-4 (if (type? gp-0 process-focusable) + (the-as process-focusable gp-0) + ) + ) + ) + (cond + (a0-4 + (let* ((s5-0 (get-trans a0-4 0)) + (a1-4 (vector-! (new 'stack-no-clear 'vector) s5-0 (-> self root trans))) + (f30-0 (vector-length a1-4)) + (gp-1 (-> self enemy-info)) + ) + (let ((a1-5 (vector-normalize-copy! (new 'stack-no-clear 'vector) a1-4 1.0))) + (if (not (enemy-method-103 self a1-5 6371.5557)) + (go-virtual turn) + ) + ) + (if (< f30-0 32768.0) + (go-virtual attack s5-0) + ) + (let* ((f28-0 (fmax 0.0 (fmin 1.0 (* 0.000034877234 (+ -32768.0 f30-0))))) + (f26-0 (lerp 0.5 1.0 f28-0)) + (f30-1 (lerp 0.0 1.0 f28-0)) + (f28-1 (lerp 1.4 1.0 f28-0)) + ) + (let ((v1-21 (-> self nav))) + (set! (-> v1-21 target-speed) (/ (* f26-0 (-> gp-1 run-travel-speed)) f28-1)) + ) + 0 + (let ((v1-23 (-> self nav))) + (set! (-> v1-23 acceleration) (-> gp-1 run-acceleration)) + ) + 0 + (let ((v1-25 (-> self nav))) + (set! (-> v1-25 turning-acceleration) (-> gp-1 run-turning-acceleration)) + ) + 0 + (ja-channel-push! 2 (seconds 0.01)) + (ja-no-eval :group! monster-frog-hop-small-start-ja :num! (seek! max f28-1) :frame-num 0.0) + (ja-no-eval :chan 1 + :group! monster-frog-hop-slow-start-ja + :num! (chan 0) + :frame-interp0 f30-1 + :frame-interp1 f30-1 + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f28-1)) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-1 :frame-interp1 f30-1) + ) + (nav-enemy-method-178 self) + (ja-no-eval :group! monster-frog-hop-small-end-ja :num! (seek! max f28-1) :frame-num 0.0) + (ja-no-eval :chan 1 + :group! monster-frog-hop-slow-end-ja + :num! (chan 0) + :frame-interp0 f30-1 + :frame-interp1 f30-1 + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f28-1)) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-1 :frame-interp1 f30-1) + ) + ) + ) + ) + (else + (suspend) + 0 + ) + ) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate turn (monster-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! monster-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! monster-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)) + (when (logtest? (enemy-flag ef38) (-> a0-0 enemy-flags)) + (let ((a0-4 (handle->process (-> self focus handle)))) + (if a0-4 + (seek-to-point-toward-point! + (-> self root) + (get-trans (the-as process-focusable a0-4) 0) + 81920.0 + (seconds 0.02) + ) + ) + ) + ) + ) + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate attack (monster-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! monster-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 (monster-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! monster-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 monster-frog-idle0-ja))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (ja-no-eval :group! monster-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 monster-frog-idle1-ja))) + (ja-channel-push! 1 (seconds 0.1)) + ) + ) + (ja-no-eval :group! monster-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 + ) + +;; definition for method 85 of type monster-frog +(defmethod knocked-anim ((this monster-frog) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot)) + (ja-channel-push! 1 0) + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 26))) + (set! (-> a0-3 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 26)) 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 26)) num-func-seek!) + ) + #t + ) + (((knocked-type blue-shot)) + (ja-channel-push! 1 0) + (let ((a0-6 (-> this skel root-channel 0))) + (set! (-> a0-6 frame-group) (the-as art-joint-anim (-> this draw art-group data 22))) + (set! (-> a0-6 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 22)) frames num-frames) -1)) + ) + (set! (-> a0-6 param 1) (-> arg0 anim-speed)) + (set! (-> a0-6 frame-num) 0.0) + (joint-control-channel-group! a0-6 (the-as art-joint-anim (-> this draw art-group data 22)) num-func-seek!) + ) + #t + ) + (else + (cond + ((= (-> this incoming knocked-type) (knocked-type none)) + (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 30))) + (set! (-> a0-8 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 30)) 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 30)) num-func-seek!) + ) + ) + (else + (ja-channel-push! 1 0) + (let ((a0-10 (-> this skel root-channel 0))) + (set! (-> a0-10 frame-group) (the-as art-joint-anim (-> this draw art-group data 32))) + (set! (-> a0-10 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 32)) frames num-frames) -1)) + ) + (set! (-> a0-10 param 1) (-> arg0 anim-speed)) + (set! (-> a0-10 frame-num) 0.0) + (joint-control-channel-group! a0-10 (the-as art-joint-anim (-> this draw art-group data 32)) num-func-seek!) + ) + ) + ) + #t + ) + ) + ) + +;; definition for method 86 of type monster-frog +(defmethod knocked-land-anim ((this monster-frog) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot)) + (ja-channel-push! 1 (seconds 0.17)) + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data 27))) + (set! (-> a0-3 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 27)) 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 27)) num-func-seek!) + ) + #t + ) + (((knocked-type blue-shot)) + (ja-channel-push! 1 (seconds 0.17)) + (let ((a0-6 (-> this skel root-channel 0))) + (set! (-> a0-6 frame-group) (the-as art-joint-anim (-> this draw art-group data 23))) + (set! (-> a0-6 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 23)) frames num-frames) -1)) + ) + (set! (-> a0-6 param 1) (-> arg0 anim-speed)) + (set! (-> a0-6 frame-num) 0.0) + (joint-control-channel-group! a0-6 (the-as art-joint-anim (-> this draw art-group data 23)) num-func-seek!) + ) + #t + ) + (else + (cond + ((= (-> this incoming knocked-type) (knocked-type none)) + (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 31))) + (set! (-> a0-8 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 31)) 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 31)) num-func-seek!) + ) + ) + (else + (ja-channel-push! 1 0) + (let ((a0-10 (-> this skel root-channel 0))) + (set! (-> a0-10 frame-group) (the-as art-joint-anim (-> this draw art-group data 33))) + (set! (-> a0-10 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 33)) frames num-frames) -1)) + ) + (set! (-> a0-10 param 1) (-> arg0 anim-speed)) + (set! (-> a0-10 frame-num) 0.0) + (joint-control-channel-group! a0-10 (the-as art-joint-anim (-> this draw art-group data 33)) num-func-seek!) + ) + ) + ) + #t + ) + ) + ) + +;; definition for method 59 of type monster-frog +(defmethod enemy-common-post ((this monster-frog)) + (water-control-method-10 (-> this water)) + ((method-of-type nav-enemy enemy-common-post) this) + (none) + ) + +;; definition for method 120 of type monster-frog +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this monster-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 4096.0 1638.4 3276.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 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) 5) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 2048.0 2662.4) + ) + (set! (-> s5-0 nav-radius) 4915.2) + (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 121 of type monster-frog +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this monster-frog)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-monster-frog" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *monster-frog-nav-enemy-info*) + (set! (-> this water) (new 'process 'water-control this 5 0.0 8192.0 2048.0)) + (set! (-> this water flags) + (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)) + (set! (-> this water ripple-size) 12288.0) + (set! (-> this water wake-size) 6144.0) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/mine/prebot-extras_REF.gc b/test/decompiler/reference/jak3/levels/mine/prebot-extras_REF.gc new file mode 100644 index 0000000000..b7bf623a95 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mine/prebot-extras_REF.gc @@ -0,0 +1,1393 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type cav-break-bridge +(deftype cav-break-bridge (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type cav-break-bridge +(defmethod inspect ((this cav-break-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: +(defstate idle (cav-break-bridge) + :virtual #t + :enter (behavior () + (transform-post) + ) + :code sleep-code + ) + +;; definition for method 11 of type cav-break-bridge +(defmethod init-from-entity! ((this cav-break-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 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) 4) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 49152.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) 3) + (set-vector! (-> v1-9 local-sphere) 21.7088 769.2288 5129.8306 14745.19) + ) + (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) 4) + (set-vector! (-> v1-11 local-sphere) -10593.075 -778.24 26691.584 37455.87) + ) + (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-cav-break-bridge" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (when (task-node-closed? (game-task-node mine-boss-introduction)) + (cleanup-for-death this) + (deactivate this) + ) + (go (method-of-object this idle)) + ) + +;; definition for method 20 of type cav-railblocker +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this cav-railblocker)) + (the-as search-info-flag (if (-> this trackable) + 24 + 1 + ) + ) + ) + +;; definition for method 30 of type cav-railblocker +;; WARN: Return type mismatch connection vs none. +(defmethod cav-railblocker-method-30 ((this cav-railblocker) (arg0 symbol)) + (when (>= (- (current-time) (-> this red-tip-change-time)) 0) + (set! (-> this alt-red-tip-on) (not (-> this alt-red-tip-on))) + (let* ((f30-0 37.5) + (v1-8 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-9 (the-as number (logior #x3f800000 v1-8))) + ) + (set! (-> this red-tip-change-time) + (the-as time-frame (+ (the int (* f30-0 (+ -1.0 (the-as float v1-9)))) 150 (current-time))) + ) + ) + (set! arg0 #t) + ) + (when arg0 + (remove-from-process *part-engine* this) + (if (-> this alt-red-tip-on) + (add-connection *part-engine* this 5 this 4490 (new 'static 'vector :w 819200.0)) + (add-connection *part-engine* this 6 this 4490 (new 'static 'vector :w 819200.0)) + ) + (add-connection *part-engine* this 7 this 4489 (new 'static 'vector :w 819200.0)) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (cav-railblocker) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (when (or (not (-> self notify-on-die)) (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) 'railblocker-hittable?) + (set! (-> a1-1 param 0) (the-as uint #t)) + (let ((t9-0 send-event-function) + (v1-7 (-> self notify-on-die)) + ) + (t9-0 + (if v1-7 + (-> v1-7 extra process) + ) + a1-1 + ) + ) + ) + ) + (let ((f0-0 1.0) + (v1-11 (the-as attack-info (-> block param 1))) + ) + (when (and (or (not (logtest? (-> v1-11 mask) (attack-mask id))) (!= (-> self incoming-attack-id) (-> v1-11 id))) + (!= (-> self hit-points) 0.0) + ) + (if (logtest? (-> v1-11 mask) (attack-mask id)) + (set! (-> self incoming-attack-id) (-> v1-11 id)) + ) + (if (logtest? (attack-mask damage) (-> v1-11 mask)) + (set! f0-0 (-> v1-11 damage)) + ) + (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))) + (cond + ((= (-> self hit-points) 0.0) + (go-virtual fall) + ) + ((< (-> self hit-points) 5.0) + (setup-masks (-> self draw) 8 22) + ) + ((< (-> self hit-points) 10.0) + (setup-masks (-> self draw) 6 24) + ) + (else + (setup-masks (-> self draw) 0 12) + ) + ) + ) + ) + ) + #t + ) + ) + ) + :enter (behavior () + (transform-post) + (cav-railblocker-method-30 self #t) + ) + :trans (behavior () + (set! (-> self trackable) + (the-as symbol (or (not (-> self notify-on-die)) (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) 'railblocker-hittable?) + (set! (-> a1-0 param 0) (the-as uint #f)) + (let ((t9-0 send-event-function) + (v1-5 (-> self notify-on-die)) + ) + (t9-0 + (if v1-5 + (-> v1-5 extra process) + ) + a1-0 + ) + ) + ) + ) + ) + ) + (cav-railblocker-method-30 self #f) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate fall (cav-railblocker) + :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-cav-railblocker-explode" (the-as (pointer level) #f)) + 5 + gp-0 + *cav-railblocker-exploder-params* + :name "joint-exploder" + :to self + :unk 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* 218)) + (set! (-> gp-1 collide-with) (collide-spec)) + (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 (the-as process-drawable *default-pool*)) + ) + (set-time! (-> self state-time)) + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let ((v1-22 (-> self root root-prim))) + (set! (-> v1-22 prim-core collide-as) (collide-spec)) + (set! (-> v1-22 prim-core collide-with) (collide-spec)) + ) + 0 + ) + :trans (behavior () + (when (+ (current-time) -1) + (ja-channel-set! 0) + (ja-post) + ) + (let ((gp-0 (res-lump-value (-> self entity) 'animation-select uint128 :time -1000000000.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) 'blocker-died) + (set! (-> a1-1 param 0) (the-as uint gp-0)) + (let ((t9-3 send-event-function) + (v1-9 (-> self notify-on-die)) + ) + (t9-3 + (if v1-9 + (-> v1-9 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) 'blocker-died) + (set! (-> a1-2 param 0) (the-as uint gp-0)) + (let ((t9-4 send-event-function) + (v1-15 (-> self notify-on-die-2)) + ) + (t9-4 + (if v1-15 + (-> v1-15 extra process) + ) + a1-2 + ) + ) + ) + ) + (when (time-elapsed? (-> self state-time) (seconds 1)) + (cleanup-for-death self) + (deactivate self) + ) + ) + :code sleep-code + ) + +;; definition for method 11 of type cav-railblocker +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this cav-railblocker) (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-vector! (-> v1-2 local-sphere) 0.0 8192.0 0.0 12288.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-cav-railblocker" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this root pause-adjust-distance) 409600.0) + (set! (-> this draw light-index) (the-as uint 10)) + (set! (-> this incoming-attack-id) (the-as uint 0)) + (set! (-> this hit-points) 10.0) + (set! (-> this trackable) #t) + (set! (-> this notify-on-die) #f) + (set! (-> this notify-on-die-2) #f) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-17 (res-lump-data arg0 'actor-groups (pointer actor-group) :tag-ptr (& sv-16)))) + (when (and v1-17 (nonzero? (-> sv-16 elt-count))) + (let ((v1-18 (-> v1-17 0))) + (if (> (-> v1-18 length) 0) + (set! (-> this notify-on-die) (-> v1-18 data 0 actor)) + ) + (if (< 1 (-> v1-18 length)) + (set! (-> this notify-on-die-2) (-> v1-18 data 1 actor)) + ) + ) + ) + ) + (set! (-> this red-tip-change-time) 0) + (set! (-> this alt-red-tip-on) #f) + (setup-masks (-> this draw) 0 12) + (when (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (cleanup-for-death this) + (deactivate this) + ) + (go (method-of-object this idle)) + ) + +;; failed to figure out what this is: +(defstate idle (cav-minecar) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('blocker-died) + (cleanup-for-death self) + (deactivate self) + ) + ) + ) + :enter (behavior () + (transform-post) + ) + :code sleep-code + ) + +;; definition for method 11 of type cav-minecar +(defmethod init-from-entity! ((this cav-minecar) (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 bot player-list)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set-vector! (-> v1-2 local-sphere) 0.0 8192.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! (-> 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-cav-minecar" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this draw light-index) (the-as uint 10)) + (when (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (cleanup-for-death this) + (deactivate this) + ) + (go (method-of-object this idle)) + ) + +;; failed to figure out what this is: +(defstate idle (prebot-sword) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (local-vars (v0-1 object)) + (case message + (('touch 'bonk 'attack) + (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) 'attack) + (set! (-> a1-3 param 0) (the-as uint #f)) + (set! (-> a1-3 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)) + ) + ) + ) + ) + (if (and (send-event-function proc a1-3) (= proc *target*)) + (sound-play "sword-hit-jak" :position (-> (the-as process-drawable proc) root trans)) + ) + ) + ) + (('scale) + (set! (-> self blade-scale target) (the-as float (-> block param 0))) + ) + (('use-pos-pitch) + (set! v0-1 (-> block param 0)) + (set! (-> self use-pos-pitch) (the-as symbol v0-1)) + v0-1 + ) + (('whoosh-lead) + (set! (-> self whoosh-lead) (the-as float (-> block param 0))) + (set! v0-1 #t) + (set! (-> self allow-whoosh) (the-as symbol v0-1)) + v0-1 + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (local-vars (at-0 int)) + (rlet ((vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (clone-anim-once (ppointer->handle (-> self parent)) #t (-> self prefix)) + (update! (-> self blade-scale) 0.0) + (set-vector! (-> self blade-jm scale) 1.0 (-> self blade-scale value) 1.0 1.0) + (let ((gp-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node prebot-sword-lod0-jg blade))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + 0.0 + (vector-float*! gp-0 gp-0 0.5) + (vector+float*! + gp-0 + gp-0 + (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node prebot-sword-lod0-jg tip)) + 0.5 + ) + (vector-! s5-0 gp-0 (-> self prev-position)) + (set! (-> self prev-position quad) (-> gp-0 quad)) + (let ((v1-13 s5-0)) + (.lvf vf1 (&-> s5-0 quad)) + (let ((f0-7 (-> self clock frames-per-second))) + (.mov at-0 f0-7) + ) + (.mov vf2 at-0) + (.mov.vf vf1 vf0 :mask #b1000) + (.mul.x.vf vf1 vf1 vf2 :mask #b111) + (.svf (&-> v1-13 quad) vf1) + ) + (let ((f30-1 (fabs (- (-> gp-0 x) (-> (target-pos 0) x))))) + (when (time-elapsed? (-> self state-time) (seconds 0.05)) + (set! (-> self sword-sound-playing) #t) + (let* ((s2-0 (new 'stack-no-clear 'vector)) + (v1-19 gp-0) + (a0-19 (-> self parent)) + (s2-1 (vector-! s2-0 v1-19 (-> (the-as prebot (if a0-19 + (the-as prebot (-> a0-19 0 self)) + ) + ) + entity + extra + trans + ) + ) + ) + (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 0 :volume 0.0 :mask (pitch reg0)) + (static-sound-spec "boss-sword" :group 0 :volume 0.0 :mask (pitch reg0)) + ) + ) + ) + 1.0 + (let ((f26-0 (lerp-scale + 0.0 + 1.0 + f30-1 + (if (< f30-1 (-> self old-target-dist)) + 40960.0 + 20480.0 + ) + 0.0 + ) + ) + ) + (let ((f0-13 (* 0.002 f28-0))) + (fmin 0.1 f0-13) + ) + (let ((f28-4 (+ 0.0 + (lerp-scale 0.0 0.1 (-> s2-1 y) 20480.0 122880.0) + (lerp-scale 0.0 0.1 (-> s5-0 y) 204800.0 1024000.0) + (lerp-scale 0.0 -0.2 (-> s5-0 y) -204800.0 -1024000.0) + ) + ) + ) + (when (-> self use-pos-pitch) + (+! f28-4 (* 0.2 f26-0)) + (when (and (-> self allow-whoosh) (< (fabs (-> s3-2 x)) (-> self whoosh-lead))) + (set! (-> self allow-whoosh) #f) + (sound-play "sword-whoosh-by" :position gp-0) + ) + ) + (seek! (-> self current-volume) (lerp-scale 1.0 1.5 (vector-length s5-0) 204800.0 1024000.0) 0.02) + (set! (-> s4-3 volume) (the int (* 1024.0 (-> self current-volume)))) + (set! (-> s4-3 pitch-mod) (the int (* 1524.0 f28-4))) + ) + ) + (sound-play-by-spec s4-3 (-> self sword-sound) gp-0) + ) + ) + (set! (-> self old-target-dist) f30-1) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + ) + ) + +;; definition for method 7 of type prebot-sword +(defmethod relocate ((this prebot-sword) (offset int)) + (if (nonzero? (-> this blade-jm)) + (&+! (-> this blade-jm) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 10 of type prebot-sword +(defmethod deactivate ((this prebot-sword)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (-> this sword-sound-playing) + (sound-stop (-> this sword-sound)) + ) + ((method-of-type process-focusable deactivate) (the-as process-focusable this)) + (none) + ) + +;; definition of type prebot-shockwave-joint-position +(deftype prebot-shockwave-joint-position (structure) + ((joint-index int8) + (position vector :inline) + ) + ) + +;; definition for method 3 of type prebot-shockwave-joint-position +(defmethod inspect ((this prebot-shockwave-joint-position)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'prebot-shockwave-joint-position) + (format #t "~1Tjoint-index: ~D~%" (-> this joint-index)) + (format #t "~1Tposition: #~%" (-> this position)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (prebot-shockwave) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('touch 'bonk) + (if (= proc *target*) + (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)) + ) + ) + ) + ) + ) + ) + ) + :trans (behavior () + (ja :num! (seek!)) + (if (ja-done? 0) + (deactivate self) + ) + (let ((gp-0 (new 'stack-no-clear 'collide-query)) + (s4-0 (new 'stack-no-clear 'bounding-box)) + (s5-0 + (new 'static 'boxed-array :type prebot-shockwave-joint-position + (new 'static 'prebot-shockwave-joint-position :joint-index 33) + (new 'static 'prebot-shockwave-joint-position :joint-index 15) + (new 'static 'prebot-shockwave-joint-position :joint-index 29) + (new 'static 'prebot-shockwave-joint-position :joint-index 13) + (new 'static 'prebot-shockwave-joint-position :joint-index 27) + (new 'static 'prebot-shockwave-joint-position :joint-index 11) + (new 'static 'prebot-shockwave-joint-position :joint-index 25) + (new 'static 'prebot-shockwave-joint-position :joint-index 19) + (new 'static 'prebot-shockwave-joint-position :joint-index 31) + (new 'static 'prebot-shockwave-joint-position :joint-index 17) + (new 'static 'prebot-shockwave-joint-position :joint-index 36) + ) + ) + ) + (vector<-cspace! (-> s4-0 min) (-> self node-list data (-> s5-0 (+ (-> s5-0 length) -1) joint-index))) + (set! (-> s4-0 max quad) (-> s4-0 min quad)) + (set! (-> s5-0 (+ (-> s5-0 length) -1) position quad) (-> s4-0 min quad)) + (dotimes (s3-0 (+ (-> s5-0 length) -1)) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (vector<-cspace! (-> s5-0 s3-0 position) (-> self node-list data (-> s5-0 s3-0 joint-index))) + (vector+! s2-0 (-> s5-0 s3-0 position) (new 'static 'vector :x 2048.0 :y 2048.0 :z 2048.0)) + (set! (-> s4-0 max x) (fmax (-> s2-0 x) (-> s4-0 max x))) + (set! (-> s4-0 max y) (fmax (-> s2-0 y) (-> s4-0 max y))) + (set! (-> s4-0 max z) (fmax (-> s2-0 z) (-> s4-0 max z))) + (vector-! s2-0 (-> s5-0 s3-0 position) (new 'static 'vector :x 2048.0 :y 2048.0 :z 2048.0)) + (set! (-> s4-0 min x) (fmin (-> s2-0 x) (-> s4-0 min x))) + (set! (-> s4-0 min y) (fmin (-> s2-0 y) (-> s4-0 min y))) + (set! (-> s4-0 min z) (fmin (-> s2-0 z) (-> s4-0 min z))) + ) + ) + (set! (-> gp-0 collide-with) (collide-spec jak player-list)) + (set! (-> gp-0 ignore-process0) #f) + (set! (-> gp-0 ignore-process1) #f) + (set! (-> gp-0 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> gp-0 action-mask) (collide-action solid)) + (mem-copy! (the-as pointer (-> gp-0 bbox)) (the-as pointer s4-0) 32) + (fill-using-bounding-box *collide-cache* gp-0) + (dotimes (s4-1 (+ (-> s5-0 length) -1)) + (set! (-> gp-0 start-pos quad) (-> s5-0 s4-1 position quad)) + (vector-! (-> gp-0 move-dist) (-> s5-0 (+ s4-1 1) position) (-> gp-0 start-pos)) + (let ((v1-52 gp-0)) + (set! (-> v1-52 radius) 2048.0) + (set! (-> v1-52 collide-with) (collide-spec jak player-list)) + (set! (-> v1-52 ignore-process0) #f) + (set! (-> v1-52 ignore-process1) #f) + (set! (-> v1-52 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-52 action-mask) (collide-action solid)) + ) + (if (>= (probe-using-line-sphere *collide-cache* gp-0) 0.0) + (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)) + ) + ) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + ) + ) + +;; definition of type prebot-gun-shot +(deftype prebot-gun-shot (projectile) + ((whoosh-sound uint32) + ) + ) + +;; definition for method 3 of type prebot-gun-shot +(defmethod inspect ((this prebot-gun-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (format #t "~2Twhoosh-sound: ~D~%" (-> this whoosh-sound)) + (label cfg-4) + this + ) + +;; definition for method 40 of type prebot-gun-shot +(defmethod projectile-method-40 ((this prebot-gun-shot)) + 256 + ) + +;; definition for method 30 of type prebot-gun-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this prebot-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-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 prebot-gun-shot +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this prebot-gun-shot)) + (set! (-> this attack-mode) 'eco-dark) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1335) this)) + (set! (-> this sound-id) (new-sound-id)) + ((method-of-type projectile init-proj-settings!) this) + 0 + (none) + ) + +;; definition for method 28 of type prebot-gun-shot +;; WARN: Return type mismatch sound-id vs none. +(defmethod play-impact-sound ((this prebot-gun-shot) (arg0 projectile-options)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (sound-play "launch-bomb" :position (-> this root trans)) + (set! (-> this whoosh-sound) (the-as uint (sound-play "bomb-whoosh" :position (-> this root trans)))) + ) + ((= v1-0 (projectile-options po0)) + (sound-stop (the-as sound-id (-> this whoosh-sound))) + (sound-play "bomb-explode" :position (-> this root trans)) + ) + ((= 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 0 :volume 0.0 :mask (pitch reg0))) + ) + (set! (-> a0-16 volume) 1024) + (set! (-> a0-16 pitch-mod) (the int (* 1524.0 f0-0))) + (sound-play-by-spec a0-16 (-> this sound-id) (-> this root trans)) + ) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate moving (prebot-gun-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 (prebot-gun-shot) + :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 + (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) 8192.0) + (set! (-> gp-0 scale) 1.0) + (set! (-> gp-0 group) (-> *part-group-id-table* 1343)) + (set! (-> gp-0 collide-with) + (collide-spec backgnd jak crate enemy obstacle vehicle-sphere hit-by-others-list player-list pusher shield) + ) + (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 (ppointer->process (-> self parent))) + ) + (send-event (ppointer->process (-> self parent)) 'shot-hit (-> self root trans)) + (let ((gp-1 (current-time))) + (while (or (-> self child) (not (time-elapsed? gp-1 (seconds 10)))) + (suspend) + ) + ) + (deactivate self) + ) + ) + +;; failed to figure out what this is: +(defstate idle (prebot-gun) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('fire) + (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 pos quad) + (-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node prebot-gun-lod0-jg gunTip)) quad) + ) + (set! (-> gp-0 vel quad) (-> (vector-normalize-copy! + (new 'stack-no-clear 'vector) + (-> self node-list data 7 bone transform uvec) + (* 4096.0 (-> self clock frames-per-second)) + ) + 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-18 *game-info*) + (a0-10 (+ (-> v1-18 attack-id) 1)) + ) + (set! (-> v1-18 attack-id) a0-10) + (set! (-> gp-0 attack-id) a0-10) + ) + (set! (-> gp-0 timeout) (seconds 4)) + (spawn-projectile prebot-gun-shot gp-0 (ppointer->process (-> self parent)) *default-dead-pool*) + ) + (if (logtest? (-> *part-group-id-table* 1334 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 1334) + :duration (seconds 1) + :mat-joint (-> self node-list data 7 bone transform) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 1334) + :duration (seconds 1) + :mat-joint (-> self node-list data 7 bone transform) + ) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (clone-anim-once (ppointer->handle (-> self parent)) #t (-> self prefix)) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; definition for method 7 of type prebot-tentacle +(defmethod relocate ((this prebot-tentacle) (offset int)) + (if (nonzero? (-> this aim-jm)) + (&+! (-> this aim-jm) offset) + ) + (if (nonzero? (-> this half-aim-jm)) + (&+! (-> this half-aim-jm) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 10 of type prebot-tentacle +(defmethod deactivate ((this prebot-tentacle)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (-> this laser-sound-playing) + (sound-stop (-> this laser-sound)) + ) + (call-parent-method this) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (prebot-tentacle) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('look-at) + (cond + ((-> block param 0) + (let ((s5-0 (-> block param 0))) + (blend-on! (-> self aim-jm) (seconds 0.25) 1.0 #f) + (set-target! (-> self aim-jm) (the-as vector s5-0)) + (blend-on! (-> self half-aim-jm) (seconds 0.25) 0.5 #f) + (set-target! (-> self half-aim-jm) (the-as vector s5-0)) + ) + ) + (else + (blend-to-off! (-> self aim-jm) (seconds 0.25) #f) + (blend-to-off! (-> self half-aim-jm) (seconds 0.25) #f) + ) + ) + (cond + ((-> block param 1) + (let ((t2-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node prebot-tentacle-lod0-jg gun)))) + (sound-play "prebot-laser" :id (-> self laser-sound) :position t2-0) + ) + (let ((v0-0 #t)) + (set! (-> self laser-sound-playing) v0-0) + v0-0 + ) + ) + ((-> self laser-sound-playing) + (sound-stop (-> self laser-sound)) + (set! (-> self laser-sound-playing) #f) + #f + ) + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (clone-anim-once (ppointer->handle (-> self parent)) #t (-> self prefix)) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; definition for symbol *prebot-eco-pillar-debris-params*, type debris-static-params +(define *prebot-eco-pillar-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-cav-molten-pil-debris-a") + (new 'static 'debris-static-joint-params + :parent-joint-index 3 + :group "skel-cav-molten-pil-debris-b" + :offset (new 'static 'vector :y -4096.0 :w 1.0) + ) + (new 'static 'debris-static-joint-params + :parent-joint-index 3 + :group "skel-cav-molten-pil-debris-c" + :offset (new 'static 'vector :y -20480.0 :w 1.0) + ) + (new 'static 'debris-static-joint-params + :parent-joint-index 3 + :group "skel-cav-molten-pil-debris-d" + :offset (new 'static 'vector :y -36864.0 :w 1.0) + ) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; definition for method 7 of type prebot-eco-pillar +(defmethod relocate ((this prebot-eco-pillar) (offset int)) + (if (nonzero? (-> this heat-part)) + (&+! (-> this heat-part) offset) + ) + (if (nonzero? (-> this cool-part)) + (&+! (-> this cool-part) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 10 of type prebot-eco-pillar +(defmethod deactivate ((this prebot-eco-pillar)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this heat-part)) + (kill-particles (-> this heat-part)) + ) + (if (nonzero? (-> this cool-part)) + (kill-particles (-> this cool-part)) + ) + (call-parent-method this) + (none) + ) + +;; definition for function prebot-eco-pillar-handler +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs object. +(defbehavior prebot-eco-pillar-handler prebot-eco-pillar ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('touch 'bonk) + (when (and (= arg0 *target*) (-> self hot)) + (if (send-event + *target* + 'attack-or-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-up (meters 1)) + (shove-back (meters 3)) + ) + ) + ) + (send-event (ppointer->process (-> self parent)) 'touched-hot-pillar) + ) + ) + #t + ) + (('vulnerable) + (let ((v0-2 #t)) + (set! (-> self vulnerable) v0-2) + v0-2 + ) + ) + (('attack) + (when (and (-> self vulnerable) (type? arg0 prebot-gun-shot)) + (let ((a1-12 (new 'stack 'debris-tuning (the-as uint 1)))) + (set! (-> a1-12 hit-xz-reaction) 0.95) + (set! (-> a1-12 hit-y-reaction) 0.6) + (set! (-> a1-12 fountain-rand-transv-lo quad) (-> self root trans quad)) + (+! (-> a1-12 fountain-rand-transv-lo z) 4096.0) + (debris-spawn + (the-as process-drawable (ppointer->process (-> self parent))) + a1-12 + *prebot-eco-pillar-debris-params* + self + ) + ) + (sound-play "columns-break" :position (-> self root trans)) + (cond + ((logtest? (-> *part-group-id-table* 1344 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* 1344)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> self root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1344)) + ) + ) + (go-virtual wait-to-die) + ) + #f + ) + ) + ) + +;; failed to figure out what this is: +(defstate wait-to-die (prebot-eco-pillar) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (+ (current-time) -1) + (deactivate self) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate idle (prebot-eco-pillar) + :virtual #t + :event prebot-eco-pillar-handler + :code sleep-code + :post (behavior () + (do-push-aways (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate cool-down (prebot-eco-pillar) + :virtual #t + :event prebot-eco-pillar-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :exit (behavior () + (set! (-> self hot) #f) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 1)) + (go-virtual idle) + ) + (let ((f30-0 (lerp-scale 0.0 1.0 (the float (- (current-time) (-> self state-time))) 0.0 300.0))) + (let ((f28-0 (lerp-scale 1.0 0.0 f30-0 0.5 1.0))) + (set-mined-pillar-texture! f30-0) + (set-vector! (-> self draw color-emissive) f28-0 f28-0 f28-0 1.0) + ) + (set-vector! (-> self draw color-mult) f30-0 f30-0 f30-0 1.0) + ) + (let ((a1-2 (new 'stack-no-clear 'vector))) + (set! (-> a1-2 quad) (-> self root trans quad)) + (set! (-> a1-2 y) (-> self start-y)) + (spawn (-> self cool-part) a1-2) + ) + ) + :code sleep-code + :post (behavior () + (do-push-aways (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate wait-to-cool (prebot-eco-pillar) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('cool-down) + (go-virtual cool-down) + ) + (else + (prebot-eco-pillar-handler proc argc message block) + ) + ) + ) + :trans (behavior () + (let ((a1-0 (new 'stack-no-clear 'vector))) + (set! (-> a1-0 quad) (-> self root trans quad)) + (set! (-> a1-0 y) (-> self start-y)) + (spawn (-> self part) a1-0) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate grow (prebot-eco-pillar) + :virtual #t + :event prebot-eco-pillar-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set-zero! *camera-smush-control*) + (activate! *camera-smush-control* 819.2 37 600 1.0 1.1 (-> *display* camera-clock)) + (sound-play "columns-raise" :position (-> self root trans)) + ) + :exit (behavior () + (set-zero! *camera-smush-control*) + (activate! *camera-smush-control* 819.2 37 300 1.0 1.1 (-> *display* camera-clock)) + ) + :trans (behavior () + (set! (-> self root trans y) (lerp-scale + (+ 4300.8 (-> self start-y)) + (-> self end-y) + (the float (- (current-time) (-> self state-time))) + 0.0 + 75.0 + ) + ) + (if (time-elapsed? (-> self state-time) (seconds 0.25)) + (go-virtual wait-to-cool) + ) + (let ((a1-1 (new 'stack-no-clear 'vector))) + (set! (-> a1-1 quad) (-> self root trans quad)) + (set! (-> a1-1 y) (-> self start-y)) + (spawn (-> self part) a1-1) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate heat-up (prebot-eco-pillar) + :virtual #t + :event prebot-eco-pillar-handler + :enter (behavior () + (ja :num-func num-func-identity :frame-num max) + (set-time! (-> self state-time)) + (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 1.0) + ) + :exit (behavior () + (set! (-> self hot) #t) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (seconds 0.5)) + (set! (-> self hot) #t) + ) + (if (time-elapsed? (-> self state-time) (seconds 5)) + (go-virtual grow) + ) + (let ((a1-0 (new 'stack-no-clear 'vector))) + (set! (-> a1-0 quad) (-> self root trans quad)) + (set! (-> a1-0 y) (-> self start-y)) + (spawn (-> self heat-part) a1-0) + ) + (set! (-> self root trans y) (lerp-scale + (-> self start-y) + (+ 4300.8 (-> self start-y)) + (the float (- (current-time) (-> self state-time))) + 0.0 + 300.0 + ) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; definition of type cav-exit-door +(deftype cav-exit-door (process-drawable) + ((initial-y float) + ) + (:state-methods + idle + rise + ) + ) + +;; definition for method 3 of type cav-exit-door +(defmethod inspect ((this cav-exit-door)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tinitial-y: ~f~%" (-> this initial-y)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate rise (cav-exit-door) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (sound-play "mb-door-open") + ) + :trans (behavior () + (set! (-> self root trans y) + (+ (-> self initial-y) (lerp-scale 0.0 32768.0 (the float (- (current-time) (-> self state-time))) 0.0 300.0)) + ) + (when (time-elapsed? (-> self state-time) (seconds 1)) + (sound-play "mb-door-hit") + (cleanup-for-death self) + (deactivate self) + ) + ) + :code sleep-code + :post transform-post + ) + +;; failed to figure out what this is: +(defstate idle (cav-exit-door) + :virtual #t + :enter (behavior () + (transform-post) + ) + :trans (behavior () + (let ((f0-0 (vector-vector-distance-squared (-> self root trans) (target-pos 0))) + (f1-0 16384.0) + ) + (if (< f0-0 (* f1-0 f1-0)) + (go-virtual rise) + ) + ) + ) + :code sleep-code + ) + +;; definition for method 11 of type cav-exit-door +(defmethod init-from-entity! ((this cav-exit-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)) + (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 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 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) 74.1376 13979.238 -22.528 20222.771) + ) + (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-cav-exit-door" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this initial-y) (-> this root trans y)) + (set! (-> this draw light-index) (the-as uint 10)) + (go (method-of-object this idle)) + ) diff --git a/test/decompiler/reference/jak3/levels/mine/prebot-part_REF.gc b/test/decompiler/reference/jak3/levels/mine/prebot-part_REF.gc new file mode 100644 index 0000000000..5f5ee1d8bc --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mine/prebot-part_REF.gc @@ -0,0 +1,1709 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function birth-func-pillar-rocks-bounce +;; WARN: Return type mismatch float vs none. +(defun birth-func-pillar-rocks-bounce ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (set! (-> arg1 omega) (-> arg2 launchrot y)) + (none) + ) + +;; definition for function spt-func-pillar-rocks-bounce1 +;; INFO: Used lq/sq +(defun spt-func-pillar-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (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* 4464) s4-0) + ) + ) + (none) + ) + +;; definition for function spt-func-pillar-rocks-bounce2 +;; INFO: Used lq/sq +(defun spt-func-pillar-rocks-bounce2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (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* 4465) s4-0) + ) + ) + (none) + ) + +;; definition for function spt-func-pillar-rocks-bounce3 +;; WARN: Return type mismatch object vs none. +(defun spt-func-pillar-rocks-bounce3 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (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: +(defpartgroup group-prebot-launch-critter + :id 1334 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4466 :flags (sp7) :period (seconds 2) :length (seconds 0.017)) + (sp-item 4467 :flags (sp7) :period (seconds 2) :length (seconds 0.017)) + (sp-item 4468 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 4466 + :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 4467 + :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 4468 + :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: +(defpart 4469 + :init-specs ((:texture (pal-lightning-red level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1) (meters 2)) + (: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 4470 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (: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 4511.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 4471 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:y (meters 1)) + (:scale-x (meters 1) (meters 3)) + (: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: +(defpartgroup group-prebot-gun-shot-trail + :id 1335 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4472 :flags (sp6)) + (sp-item 4473 :fade-after (meters 120) :falloff-to (meters 120)) + (sp-item 4474 :flags (sp6)) + (sp-item 4475 :fade-after (meters 120) :falloff-to (meters 120)) + ) + ) + +;; failed to figure out what this is: +(defpart 4472 + :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 10.0 30.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 4475 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0 6.0) + (:scale-x (meters 0.3) (meters 0.2)) + (:scale-y :copy scale-x) + (:r 30.0 30.0) + (:g :copy r) + (:b 255.0) + (:a 128.0) + (:vel-y (meters 0) (meters 0.016666668)) + (:fade-a -0.42666668) + (:accel-y (meters -0.000033333334) (meters -0.000016666667)) + (:friction 0.96 0.01) + (:timer (seconds 0.5) (seconds 3.997)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.017) (seconds 0.497)) + (:next-launcher 4476) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4476 + :init-specs ((:r 255.0) (:g 255.0) (:b 255.0) (:next-time (seconds 0.017)) (:next-launcher 4477)) + ) + +;; failed to figure out what this is: +(defpart 4477 + :init-specs ((:r 30.0 30.0) (:g :copy r) (:b 255.0) (:next-time (seconds 0.017) (seconds 0.497)) (:next-launcher 4476)) + ) + +;; failed to figure out what this is: +(defpart 4474 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.067)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 3072.0) + (:next-time (seconds 0.035)) + (:next-launcher 4478) + ) + ) + +;; failed to figure out what this is: +(defpart 4478 + :init-specs ((:scale-x (meters 2.5)) (:scale-y :copy scale-x) (:r 0.0) (:g 0.0) (:b 255.0) (:a 16.0) (:fade-a -1.6)) + ) + +;; failed to figure out what this is: +(defpart 4473 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (: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 0.0) + (:g 0.0) + (:b 255.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.005) (meters 0.008333334)) + (:rotvel-z (degrees -0.3) (degrees 0.6)) + (:scalevel-y :copy scalevel-x) + (:fade-r 3.2) + (:fade-g 3.2) + (:fade-b -3.2) + (:fade-a -0.10666667 -0.10666667) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x400000 #x405c00)) + (:next-time (seconds 0.135)) + (:next-launcher 4479) + ) + ) + +;; failed to figure out what this is: +(defpart 4479 + :init-specs ((:r 128.0) (:g 128.0) (:b 128.0) (:fade-r 0.0) (:fade-g 0.0) (:fade-b 0.0)) + ) + +;; failed to figure out what this is: +(defpartgroup group-prebot-eco-pillar-heat-up + :id 1336 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4480) (sp-item 4481) (sp-item 4482 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 4480 + :init-specs ((:texture (lava-drop-01 mined-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:x (meters 1) (meters 0.2)) + (:scale-x (meters 0.1) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0 60.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:rotvel-z (degrees -2) (degrees 4)) + (:accel-y (meters -0.0023333333)) + (:timer (seconds 1)) + (:flags (launch-along-z)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 -1384120320 -1384120064 -1384119808 -1384119552)) + (:func 'check-drop-group-center) + (:next-time (seconds 0.167) (seconds 0.165)) + (:next-launcher 4483) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4483 + :init-specs ((:fade-r -1.275) (:fade-g -0.7) (:fade-b 0.05)) + ) + +;; failed to figure out what this is: +(defpart 4481 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 1.0) + (:x (meters -1) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0 60.0) + (:b 0.0) + (:a 128.0) + (:vel-y (meters 0.016666668) (meters 0.016666668)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0023333333)) + (:timer (seconds 1)) + (:flags (launch-along-z)) + (:func 'check-drop-group-center) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4482 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 0.1) + (:y (meters 1)) + (:scale-x (meters 10) (meters 1)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0 60.0) + (:b 0.0) + (:a 0.0) + (:fade-a 1.7066667) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3)) + (:next-time (seconds 0.25)) + (:next-launcher 4484) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4484 + :init-specs ((:fade-a -1.7066667)) + ) + +;; definition for function spt-birth-func-brightness-prebot-eco-pillar-rocks +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-prebot-eco-pillar-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 160)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 60)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 100)) + ) + (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-prebot-eco-pillar-rocks2 +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-prebot-eco-pillar-rocks2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (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*)) 31) 60)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 80)) + ) + (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-prebot-eco-pillar-rocks3 +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-prebot-eco-pillar-rocks3 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (let ((s5-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 70)) + (s3-0 (logand 0 (rand-uint31-gen *random-generator*))) + (s4-0 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 31) 40)) + (v1-6 (+ (mod (the-as int (rand-uint31-gen *random-generator*)) 21) 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-prebot-eco-pillar-grow + :id 1337 + :duration (seconds 0.017) + :linger-duration (seconds 10) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4485) + (sp-item 4486 :flags (is-3d sp3 sp7)) + (sp-item 4487 :period (seconds 20) :length (seconds 0.167)) + ) + ) + +;; failed to figure out what this is: +(defpart 4485 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 0.3) + (:x (meters 1) (meters 1)) + (:scale-x (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 0.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-g 0.14166667) + (:fade-b 0.20833333) + (:fade-a -0.053333335) + (:accel-y (meters 0.00033333333) (meters 0.00033333333)) + (:friction 0.95 0.01) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4486 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 1)) + (:scale-x (meters 11)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0 60.0) + (:b 0.0) + (:a 128.0) + (:fade-a -0.08533333) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4487 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-prebot-eco-pillar-rocks) + (:num 3.0) + (:x (meters 1) (meters 0.5)) + (:y (meters 0.5)) + (:scale-x (meters 0.3) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.3) (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.023333333) (meters 0.06666667)) + (:rotvel-z (degrees -1) (degrees 2)) + (:fade-r -0.33333334) + (:fade-g -0.33333334) + (:fade-b -0.33333334) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0)) + (: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-prebot-eco-pillar-rocks) + (:conerot-x (degrees 20)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-prebot-eco-pillar-rocks +(defun spt-birth-func-part-prebot-eco-pillar-rocks ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-pillar-rocks-bounce arg0 arg1 arg2) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-prebot-eco-pillar-rocks arg0 arg1 arg2) + (none) + ) + +;; definition for function spt-func-part-prebot-eco-pillar-rocks +(defun spt-func-part-prebot-eco-pillar-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-pillar-rocks-bounce1 arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpart 4464 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-prebot-eco-pillar-rocks-bounce1) + (:num 0.5) + (:scale-x (meters 0.3) (meters 1) :store) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.3) (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)) + (:fade-r -0.33333334) + (:fade-g -0.33333334) + (:fade-b -0.33333334) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0)) + (: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-prebot-eco-pillar-rocks-bounce1) + (:conerot-x (degrees 5) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-prebot-eco-pillar-rocks-bounce1 +(defun spt-birth-func-part-prebot-eco-pillar-rocks-bounce1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-pillar-rocks-bounce arg0 arg1 arg2) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-prebot-eco-pillar-rocks2 arg0 arg1 arg2) + (none) + ) + +;; definition for function spt-func-part-prebot-eco-pillar-rocks-bounce1 +(defun spt-func-part-prebot-eco-pillar-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-pillar-rocks-bounce2 arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpart 4465 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-prebot-eco-pillar-rocks-bounce2) + (:num 0.5) + (:scale-x '*sp-temp*) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y (meters 0.3) (meters 1)) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:vel-y (meters 0.01) (meters 0.016666668)) + (:scalevel-x (meters -0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-r -0.33333334) + (:fade-g -0.33333334) + (:fade-b -0.33333334) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-0)) + (: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-pillar-rocks-bounce3) + (:conerot-x (degrees 5) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; definition for function spt-birth-func-part-prebot-eco-pillar-rocks-bounce2 +(defun spt-birth-func-part-prebot-eco-pillar-rocks-bounce2 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (birth-func-pillar-rocks-bounce arg0 arg1 arg2) + (birth-func-texture-group-2d arg0 arg1 arg2 arg3 arg4) + (spt-birth-func-brightness-prebot-eco-pillar-rocks3 arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-prebot-eco-pillar-cool-down + :id 1338 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4488)) + ) + +;; failed to figure out what this is: +(defpart 4488 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 0.3) + (:x (meters 1) (meters 1)) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 80.0) + (:b 0.0) + (:a 16.0 16.0) + (:scalevel-x (meters 0.0016666667) (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g 0.14166667) + (:fade-b 0.20833333) + (:fade-a -0.026666667) + (:accel-y (meters 0.00033333333) (meters 0.00033333333)) + (:friction 0.95 0.01) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4489 + :init-specs ((:texture (radial-gradient level-default-sprite)) + (:num 1.0) + (:scale-x (meters 5) (meters 1)) + (:rot-x (degrees 22.725)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 150.0) + (:b 60.0) + (:a 100.0 30.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: +(defpart 4490 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5)) + (: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 16.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-prebot-stuck-flame + :id 1339 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 4491)) + ) + +;; failed to figure out what this is: +(defpart 4491 + :init-specs ((:texture (flame01 level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 1.0) + (:scale-x (meters 1)) + (: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)) + (:friction 0.99 0.01) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'live-func-curve) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-mine-boss-stuck-flame-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 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-mine-boss-stuck-flame-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 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-mine-boss-stuck-flame-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 6.0 :y 3.0 :z 4.0 :w 5.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-mine-boss-stuck-flame-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 6.0 :y 3.0 :z 4.0 :w 5.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-mine-boss-stuck-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :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 2.6666665 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *g-curve-mine-boss-stuck-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -0.4 :w -1.0) + :ys (new 'static 'vector :y 1.0 :z 0.5 :w 0.3) + :one-over-x-deltas (new 'static 'vector :x 3.3333333 :y -5.0000005 :z -0.3333333 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-mine-boss-stuck-flame* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.3 :z -1.0 :w -2.0) + :ys (new 'static 'vector :x 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :x -3.3333333 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-mine-boss-stuck-flame-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-mine-boss-stuck-flame-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 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! *curve-mine-boss-stuck-flame-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 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) + ) + ) + ) + +;; definition for symbol *part-prebot-stuck-flame-curve-settings*, type particle-curve-settings +(define *part-prebot-stuck-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* 4491 init-specs 13 initial-valuef) + (the-as float *part-prebot-stuck-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-prebot-stuck-flame-curve-settings* color-start) *range-mine-boss-stuck-flame-color*) + +;; failed to figure out what this is: +(set! (-> *part-prebot-stuck-flame-curve-settings* alpha-start) *range-mine-boss-stuck-flame-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-prebot-stuck-flame-curve-settings* scale-x-start) *range-mine-boss-stuck-flame-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-prebot-stuck-flame-curve-settings* scale-y-start) *range-mine-boss-stuck-flame-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-prebot-stuck-flame-curve-settings* r-scalar) *r-curve-mine-boss-stuck-flame*) + +;; failed to figure out what this is: +(set! (-> *part-prebot-stuck-flame-curve-settings* g-scalar) *g-curve-mine-boss-stuck-flame*) + +;; failed to figure out what this is: +(set! (-> *part-prebot-stuck-flame-curve-settings* b-scalar) *b-curve-mine-boss-stuck-flame*) + +;; failed to figure out what this is: +(set! (-> *part-prebot-stuck-flame-curve-settings* a-scalar) *curve-mine-boss-stuck-flame-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-prebot-stuck-flame-curve-settings* scale-x-scalar) *curve-mine-boss-stuck-flame-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-prebot-stuck-flame-curve-settings* scale-y-scalar) *curve-mine-boss-stuck-flame-scale-y*) + +;; failed to figure out what this is: +(defpartgroup group-prebot-chasm-explosion + :id 1340 + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 4492 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4493 :period (seconds 30) :length (seconds 1)) + (sp-item 4494 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4495 :period (seconds 30) :length (seconds 0.5)) + (sp-item 4496 :period (seconds 30) :length (seconds 0.5)) + ) + ) + +;; failed to figure out what this is: +(defpart 4494 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 100)) + (:rot-x (degrees 450)) + (: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 -1.3333334)) + (:scalevel-y :copy scalevel-x) + (:fade-g -2.56) + (:fade-b -5.1) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4492 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 150)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 40.0) + (:a 64.0) + (:fade-a -0.14222223) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4493 + :init-specs ((:texture (middot level-default-sprite)) + (:num 10.0) + (:scale-x (meters 0.05) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 0.00225)) + (:vel-y (meters 0.33333334) (meters 1.6666666)) + (:fade-g -0.128) + (:fade-b -0.42666668) + (:friction 0.95) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.335)) + (:next-launcher 4497) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-z (degrees -20) (degrees 40)) + ) + ) + +;; failed to figure out what this is: +(defpart 4497 + :init-specs ((:omega (degrees 0.0225)) (:friction 0.97)) + ) + +;; failed to figure out what this is: +(defpart 4495 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 10.0) + (:scale-x (meters 5) (meters 5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0 20.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 1) (meters 0.33333334)) + (:scalevel-x (meters 0.033333335) (meters 0.033333335)) + (:scalevel-y (meters 0.06666667) (meters 0.06666667)) + (:fade-g -0.13333334) + (:fade-b -0.05) + (:fade-a -0.21333334 -0.21333334) + (:friction 0.9) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4496 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 10.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.6666667) (meters 0.33333334)) + (:friction 0.9) + (:timer (seconds 1)) + (:flags ()) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 0) (degrees 30)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-mine-boss-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-mine-boss-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-mine-boss-explo-scale-x* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 10.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-mine-boss-explo-scale-y* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -1.0 :z -2.0 :w -3.0) + :ys (new 'static 'vector :x 10.0 :y 20.0 :z 21.0 :w 22.0) + :one-over-x-deltas (new 'static 'vector :x 10.0 :y 1.0 :z 1.0 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-mine-boss-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-mine-boss-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-mine-boss-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-prebot-chasm-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-prebot-chasm-explosion-texture-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 0.3) + :lifetime-offset (seconds 0.6) + :flags (particle-curve-flags pcf0) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 4496 init-specs 16 initial-valuef) + (the-as float *part-prebot-chasm-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-prebot-chasm-explosion-texture-curve-settings* color-start) *range-mine-boss-explo-color*) + +;; failed to figure out what this is: +(set! (-> *part-prebot-chasm-explosion-texture-curve-settings* alpha-start) *range-mine-boss-explo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-prebot-chasm-explosion-texture-curve-settings* scale-x-start) *range-mine-boss-explo-scale-x*) + +;; failed to figure out what this is: +(set! (-> *part-prebot-chasm-explosion-texture-curve-settings* scale-y-start) *range-mine-boss-explo-scale-y*) + +;; failed to figure out what this is: +(set! (-> *part-prebot-chasm-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-prebot-chasm-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-prebot-chasm-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-prebot-chasm-explosion-texture-curve-settings* a-scalar) *curve-mine-boss-explo-alpha*) + +;; failed to figure out what this is: +(set! (-> *part-prebot-chasm-explosion-texture-curve-settings* scale-x-scalar) + *curve-mine-boss-explo-scale-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-prebot-chasm-explosion-texture-curve-settings* scale-y-scalar) + *curve-mine-boss-explo-scale-y* + ) + +;; failed to figure out what this is: +(defpartgroup group-final-prebot-chasm-explosion + :id 1341 + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 4498 :flags (sp3) :period (seconds 10) :length (seconds 0.017)) + (sp-item 4499 :flags (sp3) :period (seconds 10) :length (seconds 0.017)) + (sp-item 4500 :period (seconds 10) :length (seconds 0.085)) + (sp-item 4501 :period (seconds 10) :length (seconds 1)) + (sp-item 4502 :period (seconds 10) :length (seconds 1)) + ) + ) + +;; failed to figure out what this is: +(defpart 4498 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 30)) + (:rot-x (degrees 450)) + (: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.6666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -2.56) + (:fade-b -5.1) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4499 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 120)) + (:rot-x (degrees 225)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 40.0) + (:a 64.0) + (:fade-a -0.14222223) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40960.0) + ) + ) + +;; failed to figure out what this is: +(defpart 4500 + :init-specs ((:texture (middot level-default-sprite)) + (:num 50.0) + (:scale-x (meters 0.05) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 0.0225)) + (:vel-y (meters 0.06666667) (meters 0.33333334)) + (:fade-g -1.28) + (:fade-b -2.56) + (:friction 0.9) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees -130) (degrees 260)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4501 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 5.0) + (:scale-x (meters 1) (meters 1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 80.0 20.0) + (:b 30.0) + (:a 128.0) + (:vel-y (meters 0.2) (meters 0.16666667)) + (:scalevel-x (meters 0.006666667) (meters 0.016666668)) + (:scalevel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-g -0.26666668) + (:fade-b -0.1) + (:fade-a -0.42666668 -0.42666668) + (:friction 0.8) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-2d-spline-align-instant) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4502 + :init-specs ((:texture (explo-texture level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 3.0) + (:x (meters -1) (meters 2)) + (:y (meters 0) (meters 1)) + (: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)) + (:friction 0.85 0.05) + (:timer (seconds 1)) + (:flags ()) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-final-mine-boss-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-final-mine-boss-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-final-mine-boss-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-final-mine-boss-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-final-mine-boss-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-final-mine-boss-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-final-mine-boss-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-final-prebot-chasm-explosion-texture-curve-settings*, type particle-curve-settings +(define *part-final-prebot-chasm-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* 4502 init-specs 16 initial-valuef) + (the-as float *part-final-prebot-chasm-explosion-texture-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-final-prebot-chasm-explosion-texture-curve-settings* color-start) + *range-final-mine-boss-explo-color* + ) + +;; failed to figure out what this is: +(set! (-> *part-final-prebot-chasm-explosion-texture-curve-settings* alpha-start) + *range-final-mine-boss-explo-alpha* + ) + +;; failed to figure out what this is: +(set! (-> *part-final-prebot-chasm-explosion-texture-curve-settings* scale-x-start) + *range-final-mine-boss-explo-scale-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-final-prebot-chasm-explosion-texture-curve-settings* scale-y-start) + *range-final-mine-boss-explo-scale-y* + ) + +;; failed to figure out what this is: +(set! (-> *part-final-prebot-chasm-explosion-texture-curve-settings* r-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-final-prebot-chasm-explosion-texture-curve-settings* g-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-final-prebot-chasm-explosion-texture-curve-settings* b-scalar) #f) + +;; failed to figure out what this is: +(set! (-> *part-final-prebot-chasm-explosion-texture-curve-settings* a-scalar) + *curve-final-mine-boss-explo-alpha* + ) + +;; failed to figure out what this is: +(set! (-> *part-final-prebot-chasm-explosion-texture-curve-settings* scale-x-scalar) + *curve-final-mine-boss-explo-scale-x* + ) + +;; failed to figure out what this is: +(set! (-> *part-final-prebot-chasm-explosion-texture-curve-settings* scale-y-scalar) + *curve-final-mine-boss-explo-scale-y* + ) + +;; failed to figure out what this is: +(defpartgroup group-prebot-chasm-explosion-comets + :id 1342 + :flags (sp0) + :bounds (static-bspherem 0 0 0 600) + :parts ((sp-item 4504 :flags (sp3) :binding 4503) + (sp-item 4504 :flags (sp3) :binding 4503) + (sp-item 4504 :flags (sp3) :binding 4503) + (sp-item 4503 :flags (sp2)) + (sp-item 4503 :flags (sp2)) + (sp-item 4503 :flags (sp2)) + ) + ) + +;; failed to figure out what this is: +(defpart 4504 + :init-specs ((:texture (hotdot level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:scale-x (meters 30)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 100.0) + (:a 1.0) + (:vel-y (meters 0.53333336) (meters 0.06666667)) + (:scalevel-x (meters -0.083333336)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.1 -0.1) + (:fade-b -0.05 -0.05) + (:accel-y (meters -0.00066666666)) + (:friction 0.99) + (:timer (seconds 6.667)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-3)) + (:userdata :data (new 'static 'boxed-array :type int32 20 1 0 #x405c00 #x406500 #x400000 #x400700)) + (:conerot-x (degrees 10) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4503 + :init-specs ((:texture (explosion-nebula level-default-sprite)) + (:birth-func 'birth-func-inherit-size) + (:num 1.2) + (:scale-x (meters 0.00024414062) (meters 0.00012207031)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 130.0) + (:g 60.0 20.0) + (:b 20.0 10.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.01)) + (:rotvel-z (degrees -0.13333334) (degrees 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-g -0.1 -0.1) + (:fade-b -0.05 -0.05) + (:fade-a -0.016666668 -0.1) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-prebot-gun-shot-explosion + :id 1343 + :duration (seconds 2) + :linger-duration (seconds 1) + :flags (sp0 sp5) + :bounds (static-bspherem 0 0 0 15) + :parts ((sp-item 4505 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4506 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4507 :flags (sp3) :period (seconds 30) :length (seconds 0.017)) + (sp-item 4508 :period (seconds 30) :length (seconds 0.335)) + ) + ) + +;; failed to figure out what this is: +(defpart 4505 + :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 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 4506 + :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 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 4507 + :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 4508 + :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 :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)) + ) + ) + +;; definition for function spt-birth-func-brightness-prebot-pillar-shatter-rocks +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-prebot-pillar-shatter-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) 90)) + (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) 40)) + ) + (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-prebot-pillar-shatter + :id 1344 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 4509 :period (seconds 20) :length (seconds 0.035))) + ) + +;; failed to figure out what this is: +(defpart 4509 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-prebot-eco-pillar-shatter) + (:num 30.0) + (:x (meters 0) (meters 1)) + (:y (meters 0) (meters -10)) + (:scale-x (meters 0.1) (meters 1.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.06666667)) + (:scalevel-x (meters 0) (meters 0.06666667)) + (:rotvel-z (degrees -2) (degrees 4)) + (:scalevel-y (meters 0) (meters 0.06666667)) + (:fade-r -0.06666667) + (:fade-g -0.06666667) + (:fade-b -0.06666667) + (:accel-y (meters -0.0033333334)) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-0 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 'spt-func-part-prebot-eco-pillar-shatter) + (:next-time (seconds 0.017)) + (:next-launcher 4510) + (:conerot-x (degrees 0) (degrees 180)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4510 + :init-specs ((:scalevel-x (meters 0)) (:scalevel-y (meters 0))) + ) + +;; definition for function spt-birth-func-part-prebot-eco-pillar-shatter +(defun spt-birth-func-part-prebot-eco-pillar-shatter ((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-prebot-pillar-shatter-rocks arg0 arg1 arg2 arg3 arg4) + (none) + ) + +;; definition for function spt-func-part-prebot-eco-pillar-shatter +(defun spt-func-part-prebot-eco-pillar-shatter ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 object) (arg4 object)) + (sparticle-texture-animate arg0 arg1 (the-as vector arg2)) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/mine/prebot-setup_REF.gc b/test/decompiler/reference/jak3/levels/mine/prebot-setup_REF.gc new file mode 100644 index 0000000000..20453fba5a --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mine/prebot-setup_REF.gc @@ -0,0 +1,1351 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-prebot-camera prebot-camera prebot-camera-lod0-jg -1 + ((prebot-camera-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + ) + +;; failed to figure out what this is: +(defskelgroup skel-cav-exit-door cav-exit-door cav-exit-door-lod0-jg cav-exit-door-idle-ja + ((cav-exit-door-lod0-mg (meters 20)) (cav-exit-door-lod1-mg (meters 999999))) + :bounds (static-spherem 0 10 0 20) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-cav-break-bridge cav-break-bridge cav-break-bridge-lod0-jg cav-break-bridge-idle-ja + ((cav-break-bridge-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -20 0 50) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-cav-molten-pil cav-pillar cav-pillar-lod0-jg cav-pillar-idle-ja + ((cav-pillar-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -10 0 10) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-cav-molten-pil-b cav-pillar cav-pillar-b-lod0-jg cav-pillar-b-idle-ja + ((cav-pillar-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -10 0 10) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-cav-molten-pil-c cav-pillar cav-pillar-c-lod0-jg cav-pillar-c-idle-ja + ((cav-pillar-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -10 0 10) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-cav-molten-pil-d cav-pillar cav-pillar-d-lod0-jg cav-pillar-d-idle-ja + ((cav-pillar-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -10 0 10) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-cav-molten-pil-debris-a cav-pillar cav-pillar-debris-a-lod0-jg cav-pillar-debris-a-idle-ja + ((cav-pillar-debris-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-cav-molten-pil-debris-b cav-pillar cav-pillar-debris-b-lod0-jg cav-pillar-debris-b-idle-ja + ((cav-pillar-debris-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-cav-molten-pil-debris-c cav-pillar cav-pillar-debris-c-lod0-jg cav-pillar-debris-c-idle-ja + ((cav-pillar-debris-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-cav-molten-pil-debris-d cav-pillar cav-pillar-debris-d-lod0-jg cav-pillar-debris-d-idle-ja + ((cav-pillar-debris-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; failed to figure out what this is: +(defskelgroup skel-cav-railblocker cav-railblocker cav-railblocker-lod0-jg cav-railblocker-idle-ja + ((cav-railblocker-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-cav-railblocker-explode cav-railblocker cav-railblocker-explode-lod0-jg cav-railblocker-explode-idle-ja + ((cav-railblocker-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +;; definition for symbol *cav-railblocker-exploder-params*, type joint-exploder-static-params +(define *cav-railblocker-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 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) + ) + :collide-spec (collide-spec backgnd) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-cav-minecar min-bomb-train min-bomb-train-lod0-jg min-bomb-train-idle-ja + ((min-bomb-train-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-prebot-tentacle prebot-tentacle prebot-tentacle-lod0-jg prebot-tentacle-idle-ja + ((prebot-tentacle-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-prebot-shockwave prebot-shockwave prebot-shockwave-lod0-jg prebot-shockwave-shockwave-ja + ((prebot-shockwave-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 62) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-prebot-sword prebot 80 prebot-sword-shadow-mg + ((prebot-sword-lod0-jg (meters 999999))) + :bounds (static-spherem 0 20 0 20) + :origin-joint-index 4 + ) + +;; failed to figure out what this is: +(defskelgroup skel-prebot-gun prebot prebot-sword-r-swords-horizontal-L2R-complete-ja prebot-gun-shadow-mg + ((prebot-gun-lod0-jg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + :origin-joint-index 3 + ) + +;; failed to figure out what this is: +(defskelgroup skel-prebot prebot prebot-lod0-jg prebot-idle-ja + ((prebot-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -2 0 13.5) + :shadow prebot-shadow-mg + :origin-joint-index 3 + ) + +;; definition of type prebot-eco-pillar-launch-spec +(deftype prebot-eco-pillar-launch-spec (structure) + ((offset vector) + (height float) + (style int8) + ) + ) + +;; definition for method 3 of type prebot-eco-pillar-launch-spec +(defmethod inspect ((this prebot-eco-pillar-launch-spec)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'prebot-eco-pillar-launch-spec) + (format #t "~1Toffset: #~%" (-> this offset)) + (format #t "~1Theight: ~f~%" (-> this height)) + (format #t "~1Tstyle: ~D~%" (-> this style)) + (label cfg-4) + this + ) + +;; definition of type prebot-eco-pillar +(deftype prebot-eco-pillar (process-drawable) + ((root collide-shape-moving :override) + (vulnerable symbol) + (hot symbol) + (start-y float) + (end-y float) + (heat-part sparticle-launch-control) + (cool-part sparticle-launch-control) + ) + (:state-methods + wait-to-die + heat-up + grow + cool-down + wait-to-cool + idle + ) + ) + +;; definition for method 3 of type prebot-eco-pillar +(defmethod inspect ((this prebot-eco-pillar)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tvulnerable: ~A~%" (-> this vulnerable)) + (format #t "~2Thot: ~A~%" (-> this hot)) + (format #t "~2Tstart-y: ~f~%" (-> this start-y)) + (format #t "~2Tend-y: ~f~%" (-> this end-y)) + (format #t "~2Theat-part: ~A~%" (-> this heat-part)) + (format #t "~2Tcool-part: ~A~%" (-> this cool-part)) + (label cfg-4) + this + ) + +;; definition of type cav-railblocker +(deftype cav-railblocker (process-focusable) + ((incoming-attack-id uint32) + (hit-points float) + (notify-on-die entity) + (notify-on-die-2 entity) + (trackable symbol) + (red-tip-change-time time-frame) + (alt-red-tip-on symbol) + ) + (:state-methods + idle + fall + ) + (:methods + (cav-railblocker-method-30 (_type_ symbol) none) + ) + ) + +;; definition for method 3 of type cav-railblocker +(defmethod inspect ((this cav-railblocker)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tincoming-attack-id: ~D~%" (-> this incoming-attack-id)) + (format #t "~2Thit-points: ~f~%" (-> this hit-points)) + (format #t "~2Tnotify-on-die: ~A~%" (-> this notify-on-die)) + (format #t "~2Tnotify-on-die-2: ~A~%" (-> this notify-on-die-2)) + (format #t "~2Ttrackable: ~A~%" (-> this trackable)) + (format #t "~2Tred-tip-change-time: ~D~%" (-> this red-tip-change-time)) + (format #t "~2Talt-red-tip-on: ~A~%" (-> this alt-red-tip-on)) + (label cfg-4) + this + ) + +;; definition of type cav-minecar +(deftype cav-minecar (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type cav-minecar +(defmethod inspect ((this cav-minecar)) + (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 prebot-sword +(deftype prebot-sword (process-drawable) + ((parent (pointer prebot) :override) + (root collide-shape-moving :override) + (prefix string) + (blade-scale cam-float-seeker :inline) + (blade-jm joint-mod) + (sword-sound sound-id) + (sword-sound-playing symbol) + (prev-position vector :inline) + (use-pos-pitch symbol) + (old-target-dist float) + (alternate-sound sound-spec) + (whoosh-lead float) + (allow-whoosh symbol) + (current-volume float) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type prebot-sword +(defmethod inspect ((this prebot-sword)) + (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 "~2Tblade-scale: #~%" (-> this blade-scale)) + (format #t "~2Tblade-jm: ~A~%" (-> this blade-jm)) + (format #t "~2Tsword-sound: ~D~%" (-> this sword-sound)) + (format #t "~2Tsword-sound-playing: ~A~%" (-> this sword-sound-playing)) + (format #t "~2Tprev-position: #~%" (-> this prev-position)) + (format #t "~2Tuse-pos-pitch: ~A~%" (-> this use-pos-pitch)) + (format #t "~2Told-target-dist: ~f~%" (-> this old-target-dist)) + (format #t "~2Talternate-sound: ~A~%" (-> this alternate-sound)) + (format #t "~2Twhoosh-lead: ~f~%" (-> this whoosh-lead)) + (format #t "~2Tallow-whoosh: ~A~%" (-> this allow-whoosh)) + (format #t "~2Tcurrent-volume: ~f~%" (-> this current-volume)) + (label cfg-4) + this + ) + +;; definition of type prebot-shockwave +(deftype prebot-shockwave (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type prebot-shockwave +(defmethod inspect ((this prebot-shockwave)) + (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 prebot-gun +(deftype prebot-gun (process-drawable) + ((parent (pointer prebot) :override) + (root collide-shape-moving :override) + (prefix string) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type prebot-gun +(defmethod inspect ((this prebot-gun)) + (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)) + (label cfg-4) + this + ) + +;; definition of type prebot-tentacle +(deftype prebot-tentacle (process-drawable) + ((parent (pointer prebot) :override) + (root collide-shape-moving :override) + (prefix string) + (aim-jm joint-mod-polar-look-at) + (half-aim-jm joint-mod-polar-look-at) + (laser-sound sound-id) + (laser-sound-playing symbol) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type prebot-tentacle +(defmethod inspect ((this prebot-tentacle)) + (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 "~2Taim-jm: ~A~%" (-> this aim-jm)) + (format #t "~2Thalf-aim-jm: ~A~%" (-> this half-aim-jm)) + (format #t "~2Tlaser-sound: ~D~%" (-> this laser-sound)) + (format #t "~2Tlaser-sound-playing: ~A~%" (-> this laser-sound-playing)) + (label cfg-4) + this + ) + +;; definition of type prebot-ammo-tracker +(deftype prebot-ammo-tracker (structure) + ((handle handle) + (where vector :inline) + (birth-next-time symbol) + (timer time-frame) + ) + ) + +;; definition for method 3 of type prebot-ammo-tracker +(defmethod inspect ((this prebot-ammo-tracker)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'prebot-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 prebot +(deftype prebot (process-focusable) + ((critters handle 28) + (critters-to-launch int8) + (gun handle) + (swords handle 2) + (tentacles handle 5) + (beam-projectile handle) + (pillars handle 5) + (original-position vector :inline) + (position cam-vector-seeker :inline) + (stage int8) + (stage-hit-points float) + (last-attack-id uint32) + (neck-angle cam-float-seeker :inline) + (no-collision-timer time-frame) + (num-attacks uint8) + (shoulder-aim-jm joint-mod-polar-look-at) + (shot-extra-y float) + (shot-extra-xz float) + (which-movie int8) + (light-flash cam-vector-seeker :inline) + (light-pulse oscillating-vector :inline) + (light-pulse-flicker delayed-rand-vector :inline) + (laugh-played symbol) + (grunt-played symbol) + (trythis-played symbol) + (laugh-timer time-frame) + (blocker handle) + (flags prebot-flag) + (pillar-hint-timer time-frame) + (minecar-hint-timer time-frame) + (ammo prebot-ammo-tracker 20 :inline) + ) + (:state-methods + beaten + play-fma + play-hit-movie + destroy-pillars + watch-pillars + create-pillars + activate-tentacles + watch-critters + launch-critters + sweep-done + sweep + slam-done + slam + pre-slam + jump-to-hover + hidden + test + ) + (:methods + (prebot-method-45 (_type_) none) + (prebot-method-46 (_type_) none) + ) + ) + +;; definition for method 3 of type prebot +(defmethod inspect ((this prebot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tcritters[28] @ #x~X~%" (-> this critters)) + (format #t "~2Tcritters-to-launch: ~D~%" (-> this critters-to-launch)) + (format #t "~2Tgun: ~D~%" (-> this gun)) + (format #t "~2Tswords[2] @ #x~X~%" (-> this swords)) + (format #t "~2Ttentacles[5] @ #x~X~%" (-> this tentacles)) + (format #t "~2Tbeam-projectile: ~D~%" (-> this beam-projectile)) + (format #t "~2Tpillars[5] @ #x~X~%" (-> this pillars)) + (format #t "~2Toriginal-position: #~%" (-> this original-position)) + (format #t "~2Tposition: #~%" (-> this position)) + (format #t "~2Tstage: ~D~%" (-> this stage)) + (format #t "~2Tstage-hit-points: ~f~%" (-> this stage-hit-points)) + (format #t "~2Tlast-attack-id: ~D~%" (-> this last-attack-id)) + (format #t "~2Tneck-angle: #~%" (-> this neck-angle)) + (format #t "~2Tno-collision-timer: ~D~%" (-> this no-collision-timer)) + (format #t "~2Tnum-attacks: ~D~%" (-> this num-attacks)) + (format #t "~2Tshoulder-aim-jm: ~A~%" (-> this shoulder-aim-jm)) + (format #t "~2Tshot-extra-y: ~f~%" (-> this shot-extra-y)) + (format #t "~2Tshot-extra-xz: ~f~%" (-> this shot-extra-xz)) + (format #t "~2Twhich-movie: ~D~%" (-> this which-movie)) + (format #t "~2Tlight-flash: #~%" (-> this light-flash)) + (format #t "~2Tlight-pulse: #~%" (-> this light-pulse)) + (format #t "~2Tlight-pulse-flicker: #~%" (-> this light-pulse-flicker)) + (format #t "~2Tlaugh-played: ~A~%" (-> this laugh-played)) + (format #t "~2Tgrunt-played: ~A~%" (-> this grunt-played)) + (format #t "~2Ttrythis-played: ~A~%" (-> this trythis-played)) + (format #t "~2Tlaugh-timer: ~D~%" (-> this laugh-timer)) + (format #t "~2Tblocker: ~D~%" (-> this blocker)) + (format #t "~2Tflags: ~D~%" (-> this flags)) + (format #t "~2Tpillar-hint-timer: ~D~%" (-> this pillar-hint-timer)) + (format #t "~2Tminecar-hint-timer: ~D~%" (-> this minecar-hint-timer)) + (format #t "~2Tammo[20] @ #x~X~%" (-> this ammo)) + (label cfg-4) + this + ) + +;; definition for function prebot-eco-pillar-init-by-other +;; INFO: Used lq/sq +(defbehavior prebot-eco-pillar-init-by-other prebot-eco-pillar ((arg0 vector) (arg1 prebot-eco-pillar-launch-spec)) + (let ((v1-0 (-> arg1 style))) + (cond + ((zero? v1-0) + (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) + ) + (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 hit-by-others-list player-list)) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set! (-> v1-7 transform-index) 3) + (set-vector! (-> v1-7 local-sphere) 1337.7535 -32947.812 542.3104 36864.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! (-> self root) s4-0) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-cav-molten-pil" (the-as (pointer level) #f))) + (the-as pair 0) + ) + ) + ((= v1-0 1) + (let ((s4-2 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-2 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-2 reaction) cshape-reaction-default) + (set! (-> s4-2 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((v1-21 (new 'process 'collide-shape-prim-mesh s4-2 (the-as uint 0) (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)) + (set! (-> v1-21 transform-index) 3) + (set-vector! (-> v1-21 local-sphere) 1337.7535 -32947.812 542.3104 36864.0) + (set! (-> s4-2 total-prims) (the-as uint 1)) + (set! (-> s4-2 root-prim) v1-21) + ) + (set! (-> s4-2 nav-radius) (* 0.75 (-> s4-2 root-prim local-sphere w))) + (let ((v1-24 (-> s4-2 root-prim))) + (set! (-> s4-2 backup-collide-as) (-> v1-24 prim-core collide-as)) + (set! (-> s4-2 backup-collide-with) (-> v1-24 prim-core collide-with)) + ) + (set! (-> self root) s4-2) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-cav-molten-pil-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + ) + ((= v1-0 2) + (let ((s4-4 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-4 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-4 reaction) cshape-reaction-default) + (set! (-> s4-4 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((v1-35 (new 'process 'collide-shape-prim-mesh s4-4 (the-as uint 0) (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)) + (set! (-> v1-35 transform-index) 3) + (set-vector! (-> v1-35 local-sphere) 1337.7535 -32947.812 542.3104 36864.0) + (set! (-> s4-4 total-prims) (the-as uint 1)) + (set! (-> s4-4 root-prim) v1-35) + ) + (set! (-> s4-4 nav-radius) (* 0.75 (-> s4-4 root-prim local-sphere w))) + (let ((v1-38 (-> s4-4 root-prim))) + (set! (-> s4-4 backup-collide-as) (-> v1-38 prim-core collide-as)) + (set! (-> s4-4 backup-collide-with) (-> v1-38 prim-core collide-with)) + ) + (set! (-> self root) s4-4) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-cav-molten-pil-c" (the-as (pointer level) #f))) + (the-as pair 0) + ) + ) + (else + (let ((s4-6 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player)))) + (set! (-> s4-6 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s4-6 reaction) cshape-reaction-default) + (set! (-> s4-6 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((v1-49 (new 'process 'collide-shape-prim-mesh s4-6 (the-as uint 0) (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)) + (set! (-> v1-49 transform-index) 3) + (set-vector! (-> v1-49 local-sphere) 1337.7535 -32947.812 542.3104 36864.0) + (set! (-> s4-6 total-prims) (the-as uint 1)) + (set! (-> s4-6 root-prim) v1-49) + ) + (set! (-> s4-6 nav-radius) (* 0.75 (-> s4-6 root-prim local-sphere w))) + (let ((v1-52 (-> s4-6 root-prim))) + (set! (-> s4-6 backup-collide-as) (-> v1-52 prim-core collide-as)) + (set! (-> s4-6 backup-collide-with) (-> v1-52 prim-core collide-with)) + ) + (set! (-> self root) s4-6) + ) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-cav-molten-pil-d" (the-as (pointer level) #f))) + (the-as pair 0) + ) + ) + ) + ) + (set! (-> self root event-self) 'touched) + (let ((s4-8 (new 'stack-no-clear 'vector))) + (let* ((s3-4 sincos!) + (s2-0 s4-8) + (f30-0 -16384.0) + (f28-0 32768.0) + (v1-61 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-62 (the-as number (logior #x3f800000 v1-61))) + ) + (s3-4 s2-0 (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-62))))) + ) + (quaternion-set! (-> self root quat) 0.0 (-> s4-8 x) 0.0 (-> s4-8 y)) + ) + (set! (-> self root trans quad) (-> arg0 quad)) + (set! (-> self start-y) (-> self root trans y)) + (set! (-> self end-y) (+ (-> arg0 y) (-> arg1 height))) + (set! (-> self vulnerable) #f) + (set! (-> self hot) #f) + (set! (-> self heat-part) (create-launch-control (-> *part-group-id-table* 1336) self)) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1337) self)) + (set! (-> self cool-part) (create-launch-control (-> *part-group-id-table* 1338) self)) + (go-virtual heat-up) + ) + +;; failed to figure out what this is: +(when (or (zero? *prebot-sword-color-curve*) (!= loading-level global)) + (set! *prebot-sword-color-curve* (new 'loading-level 'curve-color-piecewise)) + (curve-color-piecewise-method-10 *prebot-sword-color-curve* 2 'loading-level (the-as uint #t)) + ) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-curve* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-curve* pts data 0 second x) 1.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-curve* pts data 0 second y) 0.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-curve* pts data 0 second z) 0.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-curve* pts data 0 second w) 1.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-curve* pts data 1 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-curve* pts data 1 second x) 1.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-curve* pts data 1 second y) 1.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-curve* pts data 1 second z) 0.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-curve* pts data 1 second w) 1.0) + +;; failed to figure out what this is: +(when (or (zero? *prebot-sword-white-red-curve*) (!= loading-level global)) + (set! *prebot-sword-white-red-curve* (new 'loading-level 'curve-color-piecewise)) + (curve-color-piecewise-method-10 *prebot-sword-white-red-curve* 3 'loading-level (the-as uint #t)) + ) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-white-red-curve* pts data 0 first) 0.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-white-red-curve* pts data 0 second x) 1.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-white-red-curve* pts data 0 second y) 0.3125) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-white-red-curve* pts data 0 second z) 0.3125) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-white-red-curve* pts data 0 second w) 1.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-white-red-curve* pts data 1 first) 0.5) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-white-red-curve* pts data 1 second x) 1.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-white-red-curve* pts data 1 second y) 0.078125) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-white-red-curve* pts data 1 second z) 0.078125) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-white-red-curve* pts data 1 second w) 1.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-white-red-curve* pts data 2 first) 1.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-white-red-curve* pts data 2 second x) 1.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-white-red-curve* pts data 2 second y) 0.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-white-red-curve* pts data 2 second z) 0.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-white-red-curve* pts data 2 second w) 1.0) + +;; failed to figure out what this is: +(if #t + (set! *prebot-sword-width-curve* (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 (or (zero? *prebot-sword-color-array*) (!= loading-level global)) + (set! *prebot-sword-color-array* (new 'loading-level 'light-trail-composition)) + ) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-array* color-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-array* color-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-array* alpha-1-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-array* alpha-2-mode) (the-as uint 6)) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-array* base-alpha) 1.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-array* alpha-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-array* width-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-array* base-width) 1.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-array* width-repeat-dist) 4096.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-array* uv-mode) (the-as uint 3)) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-array* uv-repeat-dist) 40960.0) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-array* lie-mode) (the-as uint 0)) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-array* max-age) (seconds 0.3)) + +;; failed to figure out what this is: +(if #f + (set! (-> *prebot-sword-color-array* tex-id) + (the-as uint (lookup-texture-id-by-name (the-as string #f) (the-as string #f))) + ) + (set! (-> *prebot-sword-color-array* tex-id) (the-as uint #x100300)) + ) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-array* width-curve) (the-as curve2d-piecewise *prebot-sword-width-curve*)) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-array* color-curve) *prebot-sword-white-red-curve*) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-array* alpha-curve-1) (the-as curve2d-piecewise *curve-linear-down*)) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-array* alpha-curve-2) #f) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-array* zbuffer?) #t) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-array* lie-vector quad) (-> *up-vector* quad)) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-array* use-tape-mode?) #t) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-array* blend-mode) (the-as uint 1)) + +;; failed to figure out what this is: +(set! (-> *prebot-sword-color-array* frame-stagger) (the-as uint 1)) + +;; definition for function prebot-sword-init-by-other +;; INFO: Used lq/sq +(defbehavior prebot-sword-init-by-other prebot-sword ((arg0 string) (arg1 vector) (arg2 basic) (arg3 sound-spec)) + (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 ((v1-6 (new 'process 'collide-shape-prim-mesh s2-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 bot hit-by-others-list player-list)) + (set! (-> v1-6 prim-core action) (collide-action solid)) + (set! (-> v1-6 transform-index) 4) + (set-vector! (-> v1-6 local-sphere) 0.0 45056.0 0.0 49152.0) + (set! (-> s2-0 total-prims) (the-as uint 1)) + (set! (-> s2-0 root-prim) v1-6) + ) + (set! (-> s2-0 nav-radius) (* 0.75 (-> s2-0 root-prim local-sphere w))) + (let ((v1-9 (-> s2-0 root-prim))) + (set! (-> s2-0 backup-collide-as) (-> v1-9 prim-core collide-as)) + (set! (-> s2-0 backup-collide-with) (-> v1-9 prim-core collide-with)) + ) + (set! (-> s2-0 event-self) 'touched) + (set! (-> self root) s2-0) + ) + (set! (-> self root pause-adjust-distance) 409600.0) + (set! (-> self root trans quad) (-> arg1 quad)) + (set! (-> self prev-position quad) (-> arg1 quad)) + (set! (-> self old-target-dist) 204800.0) + (set! (-> self prefix) arg0) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-prebot-sword" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((v1-21 (-> self parent))) + (set! (-> self draw light-index) (-> (the-as prebot (if v1-21 + (the-as prebot (-> v1-21 0 self)) + ) + ) + draw + light-index + ) + ) + ) + (logior! (-> self mask) (process-mask enemy)) + (let ((v1-28 (-> self node-list data))) + (set! (-> v1-28 0 param0) (the-as (function cspace transformq none) cspace<-parent-joint!)) + (set! (-> v1-28 0 param1) (the-as basic (-> self parent))) + (set! (-> v1-28 0 param2) arg2) + ) + (set! (-> self event-hook) (-> (method-of-object self idle) event)) + (let ((s5-1 (new 'stack-no-clear 'weapon-trail-tracker-spawn-params))) + (set! (-> s5-1 tracked-obj) (process->handle self)) + (set! (-> s5-1 max-num-crumbs) 200) + (set! (-> s5-1 joint0) 3) + (set! (-> s5-1 joint1) 5) + (set! (-> s5-1 appearance) *prebot-sword-color-array*) + (set! (-> *prebot-sword-color-array* tex-id) + (the-as uint (lookup-texture-id-by-name "sword-trail-low" (the-as string #f))) + ) + (let* ((v1-43 (estimate-light-trail-mem-usage + (the-as uint (-> s5-1 max-num-crumbs)) + (the-as uint (= (-> s5-1 appearance lie-mode) 3)) + ) + ) + (s4-2 (get-process *default-dead-pool* weapon-trail-tracker (+ v1-43 8192) 1)) + (s5-2 (-> (when s4-2 + (let ((t9-8 (method-of-type process activate))) + (t9-8 s4-2 (ppointer->process (-> self parent)) "light-trail" (the-as pointer #x70004000)) + ) + (run-now-in-process s4-2 weapon-trail-tracker-init-by-other s5-1) + (-> s4-2 ppointer) + ) + 0 + ) + ) + (s3-2 (-> (level-get *level* 'mined) draw-index)) + (s4-3 (vu1-bucket-map s3-2 4 (merc-mode mercneric2))) + (v1-50 (vu1-bucket-map s3-2 4 (merc-mode mm5))) + ) + (set! (-> (the-as weapon-trail-tracker s5-2) trail strip bucket) s4-3) + (set! (-> (the-as weapon-trail-tracker s5-2) trail strip sink) (the-as uint v1-50)) + ) + ) + (init (-> self blade-scale) 1.0 0.03 0.2 0.9) + (set! (-> self blade-jm) (new 'process 'joint-mod (joint-mod-mode joint-set*) self 4)) + (set! (-> self blade-jm track-mode) (track-mode no-trans no-rotate)) + (set-vector! (-> self blade-jm scale) 1.0 1.0 1.0 1.0) + (set! (-> self sword-sound) (new-sound-id)) + (set! (-> self sword-sound-playing) #f) + (set! (-> self use-pos-pitch) #f) + (set! (-> self alternate-sound) arg3) + (set! (-> self allow-whoosh) #f) + (set! (-> self whoosh-lead) 20480.0) + (set! (-> self current-volume) 1.0) + (go-virtual idle) + ) + +;; definition for function prebot-shockwave-init-by-other +;; INFO: Used lq/sq +(defbehavior prebot-shockwave-init-by-other prebot-shockwave ((arg0 vector) (arg1 quaternion)) + (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) + ) + (let ((v1-6 (new 'process 'collide-shape-prim-sphere s4-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 bot hit-by-others-list 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 4096.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! (-> s4-0 event-self) 'touched) + (set! (-> self root) s4-0) + ) + (set! (-> self root pause-adjust-distance) 409600.0) + (set! (-> self root trans quad) (-> arg0 quad)) + (quaternion-copy! (-> self root quat) arg1) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-prebot-shockwave" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> self event-hook) (-> (method-of-object self idle) event)) + (go-virtual idle) + ) + +;; definition for function prebot-gun-init-by-other +;; INFO: Used lq/sq +(defbehavior prebot-gun-init-by-other prebot-gun ((arg0 string) (arg1 vector)) + (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) + ) + (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)) + (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 -32768.0 0.0 49152.0) + (set! (-> s4-0 root-prim) s3-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 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) 3) + (set-vector! (-> v1-13 local-sphere) 0.0 0.0 0.0 4096.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! (-> s4-0 event-self) 'touched) + (set! (-> self root) s4-0) + ) + (set! (-> self root pause-adjust-distance) 409600.0) + (set! (-> self root trans quad) (-> arg1 quad)) + (set! (-> self prefix) arg0) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-prebot-gun" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((v1-26 (-> self parent))) + (set! (-> self draw light-index) (-> (the-as prebot (if v1-26 + (the-as prebot (-> v1-26 0 self)) + ) + ) + draw + light-index + ) + ) + ) + (logior! (-> self mask) (process-mask enemy)) + (let ((v1-33 (-> self node-list data))) + (set! (-> v1-33 0 param0) (the-as (function cspace transformq none) cspace<-parent-joint!)) + (set! (-> v1-33 0 param1) (the-as basic (-> self parent))) + (set! (-> v1-33 0 param2) (the-as basic 44)) + ) + (set! (-> self event-hook) (-> (method-of-object self idle) event)) + (go-virtual idle) + ) + +;; definition for function prebot-tentacle-init-by-other +;; INFO: Used lq/sq +(defbehavior prebot-tentacle-init-by-other prebot-tentacle ((arg0 string) (arg1 vector) (arg2 int)) + (let ((s3-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player)))) + (set! (-> s3-0 dynam) (copy *standard-dynamics* 'process)) + (set! (-> s3-0 reaction) cshape-reaction-default) + (set! (-> s3-0 no-reaction) + (the-as (function collide-shape-moving collide-query vector vector object) nothing) + ) + (let ((s2-0 (new 'process 'collide-shape-prim-group s3-0 (the-as uint 1) 0))) + (set! (-> s3-0 total-prims) (the-as uint 2)) + (set! (-> s2-0 prim-core collide-as) (collide-spec enemy)) + (set! (-> s2-0 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list)) + (set! (-> s2-0 prim-core action) (collide-action solid)) + (set! (-> s2-0 transform-index) 4) + (set-vector! (-> s2-0 local-sphere) 0.0 -32768.0 0.0 49152.0) + (set! (-> s3-0 root-prim) s2-0) + ) + (let ((v1-13 (new 'process 'collide-shape-prim-sphere s3-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)) + (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 4096.0) + ) + (set! (-> s3-0 nav-radius) (* 0.75 (-> s3-0 root-prim local-sphere w))) + (let ((v1-16 (-> s3-0 root-prim))) + (set! (-> s3-0 backup-collide-as) (-> v1-16 prim-core collide-as)) + (set! (-> s3-0 backup-collide-with) (-> v1-16 prim-core collide-with)) + ) + (set! (-> s3-0 event-self) 'touched) + (set! (-> self root) s3-0) + ) + (set! (-> self root pause-adjust-distance) 409600.0) + (set! (-> self root trans quad) (-> arg1 quad)) + (set! (-> self prefix) arg0) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-prebot-tentacle" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((v1-26 (-> self parent))) + (set! (-> self draw light-index) (-> (the-as prebot (if v1-26 + (the-as prebot (-> v1-26 0 self)) + ) + ) + draw + light-index + ) + ) + ) + (logior! (-> self mask) (process-mask enemy)) + (let ((v1-33 (-> self node-list data))) + (set! (-> v1-33 0 param0) (the-as (function cspace transformq none) cspace<-parent-joint!)) + (set! (-> v1-33 0 param1) (the-as basic (-> self parent))) + (set! (-> v1-33 0 param2) (the-as basic arg2)) + ) + (set! (-> self aim-jm) (new 'process 'joint-mod-polar-look-at)) + (initialize (-> self aim-jm) self 13) + (set! (-> self aim-jm ear) 2) + (set! (-> self aim-jm up) 0) + (set! (-> self aim-jm nose) 1) + (set! (-> self half-aim-jm) (new 'process 'joint-mod-polar-look-at)) + (initialize (-> self half-aim-jm) self 12) + (set! (-> self half-aim-jm ear) 2) + (set! (-> self half-aim-jm up) 0) + (set! (-> self half-aim-jm nose) 1) + (set! (-> self laser-sound) (new-sound-id)) + (set! (-> self laser-sound-playing) #f) + (set! (-> self event-hook) (-> (method-of-object self idle) event)) + (go-virtual idle) + ) + +;; definition for method 11 of type prebot +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this prebot) (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 18) 0))) + (set! (-> s4-0 total-prims) (the-as uint 19)) + (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 projectile)) + (set! (-> s3-0 prim-core action) (collide-action solid)) + (set! (-> s3-0 transform-index) 8) + (set-vector! (-> s3-0 local-sphere) 0.0 -20480.0 0.0 61440.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 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) 10) + (set-vector! (-> v1-13 local-sphere) 0.0 2957.7217 3380.8384 20891.238) + ) + (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 enemy)) + (set! (-> v1-15 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-15 prim-core action) (collide-action solid)) + (set! (-> v1-15 transform-index) 15) + (set-vector! (-> v1-15 local-sphere) 0.0 7224.115 0.0 16506.88) + ) + (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 enemy)) + (set! (-> v1-17 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-17 prim-core action) (collide-action solid)) + (set! (-> v1-17 transform-index) 13) + (set-vector! (-> v1-17 local-sphere) 423.5264 3772.0063 0.0 10656.973) + ) + (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 enemy)) + (set! (-> v1-19 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-19 prim-core action) (collide-action solid)) + (set! (-> v1-19 transform-index) 12) + (set-vector! (-> v1-19 local-sphere) -0.4096 0.0 0.0 11988.992) + ) + (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 enemy)) + (set! (-> v1-21 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-21 prim-core action) (collide-action solid)) + (set! (-> v1-21 transform-index) 31) + (set-vector! (-> v1-21 local-sphere) 0.0 7223.7056 0.0 16506.88) + ) + (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 enemy)) + (set! (-> v1-23 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-23 prim-core action) (collide-action solid)) + (set! (-> v1-23 transform-index) 29) + (set-vector! (-> v1-23 local-sphere) -423.5264 3772.0063 0.0 10656.973) + ) + (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 enemy)) + (set! (-> v1-25 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-25 prim-core action) (collide-action solid)) + (set! (-> v1-25 transform-index) 28) + (set-vector! (-> v1-25 local-sphere) 0.0 0.0 0.0 11988.992) + ) + (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 enemy)) + (set! (-> v1-27 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-27 prim-core action) (collide-action solid)) + (set! (-> v1-27 transform-index) 8) + (set-vector! (-> v1-27 local-sphere) 0.0 1914.0608 1339.392 24913.51) + ) + (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 enemy)) + (set! (-> v1-29 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-29 prim-core action) (collide-action solid)) + (set! (-> v1-29 transform-index) 5) + (set-vector! (-> v1-29 local-sphere) 0.0 0.0 0.0 13063.373) + ) + (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 enemy)) + (set! (-> v1-31 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-31 prim-core action) (collide-action solid)) + (set! (-> v1-31 transform-index) 56) + (set-vector! (-> v1-31 local-sphere) 791.3472 14204.108 -1401.6512 12302.336) + ) + (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 enemy)) + (set! (-> v1-33 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-33 prim-core action) (collide-action solid)) + (set! (-> v1-33 transform-index) 57) + (set-vector! (-> v1-33 local-sphere) 120.0128 13062.144 1252.1472 11315.609) + ) + (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 enemy)) + (set! (-> v1-35 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-35 prim-core action) (collide-action solid)) + (set! (-> v1-35 transform-index) 54) + (set-vector! (-> v1-35 local-sphere) 557.056 12469.043 1004.3392 23741.234) + ) + (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 enemy)) + (set! (-> v1-37 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-37 prim-core action) (collide-action solid)) + (set! (-> v1-37 transform-index) 52) + (set-vector! (-> v1-37 local-sphere) 1070.2848 7083.6226 264.6016 14952.857) + ) + (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 enemy)) + (set! (-> v1-39 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-39 prim-core action) (collide-action solid)) + (set! (-> v1-39 transform-index) 63) + (set-vector! (-> v1-39 local-sphere) -790.528 14204.519 -1401.6512 12301.927) + ) + (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 enemy)) + (set! (-> v1-41 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-41 prim-core action) (collide-action solid)) + (set! (-> v1-41 transform-index) 64) + (set-vector! (-> v1-41 local-sphere) -120.4224 13062.963 1252.5568 11315.2) + ) + (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 enemy)) + (set! (-> v1-43 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-43 prim-core action) (collide-action solid)) + (set! (-> v1-43 transform-index) 61) + (set-vector! (-> v1-43 local-sphere) -556.6464 12469.453 1004.3392 23741.645) + ) + (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 enemy)) + (set! (-> v1-45 prim-core collide-with) (collide-spec jak bot hit-by-others-list player-list projectile)) + (set! (-> v1-45 prim-core action) (collide-action solid)) + (set! (-> v1-45 transform-index) 59) + (set-vector! (-> v1-45 local-sphere) -1069.8752 7083.6226 264.192 14952.448) + ) + (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 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) 50) + (set-vector! (-> v1-47 local-sphere) 0.0 -3032.2688 430.08 11688.755) + ) + (set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w))) + (let ((v1-50 (-> s4-0 root-prim))) + (set! (-> s4-0 backup-collide-as) (-> v1-50 prim-core collide-as)) + (set! (-> s4-0 backup-collide-with) (-> v1-50 prim-core collide-with)) + ) + (set! (-> s4-0 event-self) 'touched) + (set! (-> this root) s4-0) + ) + (set! (-> this root pause-adjust-distance) 409600.0) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-prebot" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logior! (-> this mask) (process-mask enemy)) + (set! (-> this original-position quad) (-> this root trans quad)) + (init (-> this position) (-> this original-position) 0.004096 2048.0 0.125) + (set! (-> this draw light-index) (the-as uint 10)) + (dotimes (v1-64 28) + (set! (-> this critters v1-64) (the-as handle #f)) + ) + (set! (-> this gun) (the-as handle #f)) + (dotimes (v1-67 2) + (set! (-> this swords v1-67) (the-as handle #f)) + ) + (dotimes (v1-70 5) + (set! (-> this tentacles v1-70) (the-as handle #f)) + ) + (set! (-> this beam-projectile) (the-as handle #f)) + (dotimes (v1-73 5) + (set! (-> this pillars v1-73) (the-as handle #f)) + ) + (set! (-> this last-attack-id) (the-as uint 0)) + (let ((a0-133 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor 0))) + (if a0-133 + (change-to a0-133 this) + ) + ) + (init (-> this neck-angle) 0.0 0.01 0.1 0.9) + (let ((a0-135 (-> this node-list data 9))) + (set! (-> a0-135 param0) prebot-neck-callback) + ) + (prebot-method-45 this) + (set! (-> this shoulder-aim-jm) (new 'process 'joint-mod-polar-look-at)) + (initialize (-> this shoulder-aim-jm) this 28) + (set! (-> this shoulder-aim-jm ear) 2) + (set! (-> this shoulder-aim-jm up) 0) + (set! (-> this shoulder-aim-jm nose) 1) + (let ((v1-92 (-> this root root-prim))) + (set! (-> this root backup-collide-as) (-> v1-92 prim-core collide-as)) + (set! (-> this root backup-collide-with) (-> v1-92 prim-core collide-with)) + ) + (set! (-> this no-collision-timer) 0) + (init (-> this light-flash) (the-as vector #f) 0.01 0.1 0.9) + (set-params! (-> this light-pulse) (the-as vector #f) 0.01 0.1 0.9) + (prebot-light-pulse-off) + (set-params! (-> this light-pulse-flicker) 15 120 0.1 0.1) + (set! (-> this laugh-timer) 0) + (set! (-> this blocker) (the-as handle #f)) + (let ((v1-102 (-> this entity extra perm))) + (logior! (-> v1-102 status) (entity-perm-status bit-5)) + (set! (-> this flags) (the-as prebot-flag (-> v1-102 user-object 0))) + ) + (dotimes (v1-104 20) + (set! (-> this ammo v1-104 handle) (the-as handle #f)) + (set! (-> this ammo v1-104 birth-next-time) #f) + ) + (prebot-go-next-stage) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/mine/prebot-states_REF.gc b/test/decompiler/reference/jak3/levels/mine/prebot-states_REF.gc new file mode 100644 index 0000000000..d8f1e3cef7 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mine/prebot-states_REF.gc @@ -0,0 +1,2596 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function prebot-neck-callback +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior prebot-neck-callback prebot ((arg0 cspace) (arg1 transformq)) + (cspace<-parented-transformq-joint! arg0 arg1) + (let* ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) arg0)) + (s5-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> arg0 bone transform fvec) 1.0)) + (s2-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> arg0 bone transform uvec) 1.0)) + (s3-1 (vector-! (new 'stack-no-clear 'vector) (target-pos 0) s4-0)) + (f28-0 (vector-normalize-ret-len! s3-1 1.0)) + ) + (vector-flatten! s3-1 s3-1 s5-0) + (vector-normalize! s3-1 1.0) + (let ((s4-1 self)) + (let ((f30-0 (vector-dot s3-1 s2-0))) + (cond + ((or (< 163840.0 f28-0) + (and (< 143360.0 f28-0) (= (fabs (-> s4-1 neck-angle target)) 0.0)) + (< f30-0 (cos 15473.777)) + (and (< f30-0 (cos 8192.0)) (= (fabs (-> s4-1 neck-angle target)) 0.0)) + (not (-> arg0 param1)) + ) + (set! (-> s4-1 neck-angle target) 0.0) + ) + (else + (set! (-> s4-1 neck-angle target) (fmin 1.0 (* 0.00012207031 (acos f30-0)))) + (if (< (vector-dot s3-1 (the-as vector (-> arg0 bone transform))) 0.0) + (set! (-> s4-1 neck-angle target) (- (-> s4-1 neck-angle target))) + ) + ) + ) + ) + (update! (-> s4-1 neck-angle) 0.0) + (let ((a1-9 (matrix-axis-angle! (new 'stack-no-clear 'matrix) s5-0 (* 8192.0 (-> s4-1 neck-angle value)))) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-1 quad) (-> arg0 bone transform trans quad)) + (vector-reset! (-> arg0 bone transform trans)) + (matrix*! (-> arg0 bone transform) a1-9 (-> arg0 bone transform)) + (set! (-> arg0 bone transform trans quad) (-> s5-1 quad)) + ) + ) + ) + 0 + (none) + ) + +;; definition for function prebot-light-pulse-off +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior prebot-light-pulse-off prebot () + (set! (-> self light-pulse target quad) (the-as uint128 0)) + (set! (-> self light-pulse value quad) (the-as uint128 0)) + (set! (-> self light-pulse vel quad) (the-as uint128 0)) + 0 + (none) + ) + +;; definition for function prebot-light-pulse-on +(defbehavior prebot-light-pulse-on prebot ((arg0 float) (arg1 float) (arg2 float)) + (let ((v0-0 (-> self light-pulse target))) + (set! (-> v0-0 x) arg0) + (set! (-> v0-0 y) arg1) + (set! (-> v0-0 z) arg2) + (set! (-> v0-0 w) 1.0) + v0-0 + ) + ) + +;; definition for function prebot-light-flash +;; INFO: Used lq/sq +(defbehavior prebot-light-flash prebot ((arg0 float) (arg1 float) (arg2 float)) + (local-vars (v1-1 float) (a3-2 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) arg0) + (set! (-> v1-0 y) arg1) + (set! (-> v1-0 z) arg2) + (set! (-> v1-0 w) 1.0) + (.lvf vf1 (&-> (-> self light-flash value) 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 a3-2 vf1) + (let ((f0-4 a3-2)) + (.lvf vf1 (&-> v1-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-1 vf1) + (when (< f0-4 v1-1) + (set-vector! (-> self light-flash value) arg0 arg1 arg2 1.0) + (let ((v0-0 (-> self light-flash vel))) + (set! (-> v0-0 quad) (the-as uint128 0)) + v0-0 + ) + ) + ) + ) + ) + ) + +;; definition for function prebot-prespool +(defbehavior prebot-prespool prebot () + (case (-> self stage) + ((1) + (script-eval '(want-anim "prebot-hit-a")) + ) + ((2) + (script-eval '(want-anim "prebot-hit-b")) + ) + (else + (script-eval '(want-anim "mine-boss-res")) + ) + ) + ) + +;; definition for function prebot-common +;; INFO: Used lq/sq +;; WARN: Return type mismatch none vs object. +(defbehavior prebot-common prebot () + (dotimes (gp-0 20) + (cond + ((handle->process (-> self ammo gp-0 handle)) + (if (and (nonzero? (-> self ammo gp-0 timer)) (time-elapsed? (-> self ammo gp-0 timer) (seconds 20))) + (send-event (handle->process (-> self ammo gp-0 handle)) 'die) + ) + ) + ((-> self ammo gp-0 birth-next-time) + (set! (-> self ammo gp-0 birth-next-time) #f) + (set-time! (-> self ammo gp-0 timer)) + (let ((a0-16 (new 'static 'fact-info))) + (set-vector! (new 'stack-no-clear 'vector) 0.0 57001.605 0.0 1.0) + (set! (-> a0-16 options) (actor-option fade-out fall no-distance-check-fadeout)) + (set! (-> a0-16 fade-time) (seconds 10)) + (set! (-> a0-16 pickup-spawn-amount) 1.0) + (set! (-> a0-16 pickup-type) (pickup-type ammo-random)) + (set! (-> a0-16 pickup-amount) 10.0) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> self root trans quad)) + (set! (-> self root trans quad) + (-> (the-as (pointer uint128) (+ (the-as uint (-> self ammo 0 where)) (* 48 gp-0)))) + ) + (set! (-> a0-16 process) self) + (set! (-> self ammo gp-0 handle) + (ppointer->handle (drop-pickup a0-16 #t *entity-pool* (the-as fact-info #f) 0 #t)) + ) + (set! (-> self root trans quad) (-> s5-0 quad)) + ) + ) + ) + ) + ) + (update! (-> self light-flash) (the-as vector #f)) + (when (!= (-> self light-pulse target w) 0.0) + (update-with-delay! (-> self light-pulse-flicker)) + (update! (-> self light-pulse) (-> self light-pulse-flicker value)) + ) + (let ((a0-27 (new 'stack-no-clear 'vector))) + (vector+! a0-27 (-> self light-flash value) (the-as vector (-> self light-pulse))) + (set! (-> a0-27 x) (fmax 0.0 (-> a0-27 x))) + (set! (-> a0-27 y) (fmax 0.0 (-> a0-27 y))) + (set! (-> a0-27 z) (fmax 0.0 (-> a0-27 z))) + (set! (-> a0-27 w) 1.0) + (set-mined-filter! a0-27 0) + ) + (set! (-> *game-info* counter) (the float (-> self stage))) + (prebot-prespool) + (update! (-> self position) (the-as vector #f)) + (set! (-> self root trans quad) (-> self position value quad)) + (let* ((f0-17 (* 54.613335 (the float (current-time)))) + (f0-18 (- f0-17 (* (the float (the int (/ f0-17 65536.0))) 65536.0))) + ) + (+! (-> self root trans y) (* 2048.0 (cos f0-18))) + ) + (cond + ((and (-> self next-state) (= (-> self next-state name) 'watch-critters)) + (remove-setting! 'point-of-interest) + ) + (else + (let ((t0-1 (new 'static 'vector))) + (set! (-> t0-1 quad) (-> self root trans quad)) + (+! (-> t0-1 y) 16384.0) + (set-setting! 'point-of-interest 'abs t0-1 0) + ) + ) + ) + ) + +;; definition for method 10 of type prebot +(defmethod deactivate ((this prebot)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (set-mined-filter! *zero-vector* 0) + ((method-of-type process-focusable deactivate) this) + (none) + ) + +;; definition for method 7 of type prebot +;; WARN: Return type mismatch process-focusable vs prebot. +(defmethod relocate ((this prebot) (offset int)) + (if (nonzero? (-> this shoulder-aim-jm)) + (&+! (-> this shoulder-aim-jm) offset) + ) + (the-as prebot ((method-of-type process-focusable relocate) this offset)) + ) + +;; definition for function prebot-go-next-stage +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs object. +(defbehavior prebot-go-next-stage prebot () + (local-vars (v1-4 (pointer actor-group)) (sv-16 res-tag)) + (cond + ((not (task-node-closed? (game-task-node mine-boss-introduction))) + (set! (-> self stage) 0) + 0 + ) + ((task-node-closed? (game-task-node mine-boss-resolution)) + (set! (-> self stage) 4) + ) + ((begin + (set! (-> self stage) 1) + (set! sv-16 (new 'static 'res-tag)) + (set! v1-4 (res-lump-data (-> self entity) 'actor-groups (pointer actor-group) :tag-ptr (& sv-16))) + (and v1-4 (nonzero? (-> sv-16 elt-count))) + ) + (let ((v1-5 (-> v1-4 0))) + (dotimes (a0-5 (-> v1-5 length)) + (let ((a1-7 (-> v1-5 data a0-5 actor))) + (when a1-7 + (if (logtest? (-> a1-7 extra perm status) (entity-perm-status subtask-complete)) + (+! (-> self stage) 1) + ) + ) + ) + ) + ) + ) + (else + (format #t "ERROR: could not find actor-group for ~S~%" (-> self name)) + ) + ) + (set! (-> self stage-hit-points) 1.0) + (remove-setting! 'entity-name) + (when (and (< (-> self stage) 4) (not (handle->process (-> self blocker)))) + (let ((gp-0 (new 'static 'inline-array vector 2 (new 'static 'vector) (new 'static 'vector)))) + (set! (-> gp-0 0 quad) (-> self entity extra trans quad)) + (+! (-> gp-0 0 x) 163840.0) + (+! (-> gp-0 0 y) -81920.0) + (+! (-> gp-0 0 z) 4096.0) + (set! (-> gp-0 1 quad) (-> self entity extra trans quad)) + (+! (-> gp-0 1 x) -163840.0) + (+! (-> gp-0 1 y) -81920.0) + (+! (-> gp-0 1 z) 4096.0) + (set! (-> self blocker) + (ppointer->handle (process-spawn blocking-plane gp-0 #x48c80000 :name "blocking-plane" :to self)) + ) + ) + (send-event (handle->process (-> self blocker)) 'collide-as #x4000000) + ) + (let ((v1-39 (-> self stage))) + (cond + ((zero? v1-39) + (go-virtual hidden) + ) + ((= v1-39 1) + (set-setting! 'entity-name "camera-308" 0.0 0) + (set! (-> self laugh-played) #f) + (go-virtual jump-to-hover) + ) + ((or (= v1-39 2) (= v1-39 3)) + (set-setting! 'entity-name "camera-308" 0.0 0) + (set! (-> self laugh-played) #f) + (go-virtual pre-slam) + ) + (else + (go-virtual beaten) + ) + ) + ) + 0 + ) + +;; definition for method 20 of type prebot +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this prebot)) + (the-as search-info-flag 0) + ) + +;; definition for method 45 of type prebot +;; WARN: Return type mismatch symbol vs none. +(defmethod prebot-method-45 ((this prebot)) + (set! (-> this node-list data 9 param1) (the-as basic #t)) + (none) + ) + +;; definition for method 46 of type prebot +;; WARN: Return type mismatch symbol vs none. +(defmethod prebot-method-46 ((this prebot)) + (set! (-> this node-list data 9 param1) #f) + (none) + ) + +;; definition for function prebot-handler +;; INFO: Used lq/sq +(defbehavior prebot-handler prebot ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('touched-hot-pillar) + (when (not (logtest? (-> self flags) (prebot-flag pf0))) + (logior! (-> self flags) (prebot-flag pf0)) + (let ((v1-7 (-> self entity extra perm))) + (logior! (-> v1-7 status) (entity-perm-status bit-5)) + (set! (-> v1-7 user-object 0) (-> self flags)) + ) + (talker-spawn-func (-> *talker-speech* 331) *entity-pool* (target-pos 0) (the-as region #f)) + ) + ) + (('shot-hit) + (if (line-in-view-frustum? (the-as vector (-> arg3 param 0)) (the-as vector (-> arg3 param 0))) + (prebot-light-flash 0.0 0.4 1.0) + ) + ) + (('skip 'blocker-died) + (if (= arg2 'blocker-died) + (prebot-light-flash 1.0 0.4 0.0) + ) + (set! (-> self which-movie) (the-as int (-> arg3 param 0))) + (go-virtual play-hit-movie) + ) + (('railblocker-hittable?) + (when (-> arg3 param 0) + (set! (-> self minecar-hint-timer) 0) + 0 + ) + (and (and (-> self next-state) (let ((v1-21 (-> self next-state name))) + (or (= v1-21 'watch-pillars) (= v1-21 'destroy-pillars)) + ) + ) + (< (+ 32358.4 (-> self entity extra trans y)) (-> (target-pos 0) y)) + ) + ) + (('attack) + (when (>= (+ (current-time) (seconds -5.1)) (-> self laugh-timer)) + (set-time! (-> self laugh-timer)) + (sound-play "prebot-laugh" :position (-> self root trans)) + ) + #t + ) + (('start-critter) + (dotimes (v1-34 28) + (when (not (handle->process (-> self critters v1-34))) + (set! (-> self critters v1-34) (process->handle arg0)) + (set! v0-0 #f) + (goto cfg-50) + ) + ) + (set! v0-0 #f) + (label cfg-50) + v0-0 + ) + (('eco-creature-died) + (dotimes (v1-38 20) + (when (and (not (-> self ammo v1-38 birth-next-time)) (not (handle->process (-> self ammo v1-38 handle)))) + (set! (-> (the-as (pointer uint128) (+ (the-as uint (-> self ammo 0 where)) (* 48 v1-38)))) + (-> (the-as vector (-> arg3 param 0)) quad) + ) + (set! (-> self ammo v1-38 birth-next-time) #t) + (return 0) + ) + ) + #f + ) + ) + ) + +;; failed to figure out what this is: +(defstate beaten (prebot) + :virtual #t + :enter (behavior () + (ja-channel-set! 0) + (ja-post) + (let ((a0-2 (handle->process (-> self blocker)))) + (if a0-2 + (deactivate a0-2) + ) + ) + (remove-setting! 'point-of-interest) + ) + :exit (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! prebot-idle-ja :num! min) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate play-fma (prebot) + :virtual #t + :enter (behavior () + (set-blackout-frames (seconds 0.007)) + (set-time! (-> self state-time)) + (case (-> self stage) + ((1) + (process-spawn scene-player :init scene-player-init "prebot-hit-a" #t #f :name "scene-player") + ) + ((2) + (process-spawn scene-player :init scene-player-init "prebot-hit-b" #t #f :name "scene-player") + ) + (else + (let* ((v1-13 (-> *game-info* sub-task-list (game-task-node mine-boss-resolution))) + (v1-15 (if (-> v1-13 manager) + (-> v1-13 manager manager) + (the-as handle #f) + ) + ) + ) + (send-event (handle->process v1-15) 'complete) + ) + ) + ) + (deactivate self) + ) + :trans (behavior () + (remove-setting! 'point-of-interest) + (if (time-elapsed? (-> self state-time) (seconds 0.5)) + (deactivate self) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate play-hit-movie (prebot) + :virtual #t + :enter (behavior () + (kill-by-type eco-pill *active-pool*) + (kill-by-type ammo-collectable *active-pool*) + (prebot-light-pulse-off) + ) + :exit (behavior () + (process-release? *target*) + ) + :trans (behavior () + (remove-setting! 'point-of-interest) + (prebot-prespool) + (set-letterbox-frames (seconds 0.007)) + (let ((v1-4 (ja-group))) + (cond + ((and v1-4 (or (= v1-4 prebot-mine-boss-train-1-ja) + (= v1-4 prebot-mine-boss-train-2-ja) + (= v1-4 prebot-mine-boss-train-3-ja) + ) + ) + (process-grab? *target* #f) + (ja :num! (seek!)) + (when (ja-done? 0) + (set! (-> self root trans quad) (-> self entity extra trans quad)) + (process-release? *target*) + (go-virtual play-fma) + ) + ) + (else + (let ((gp-0 (quaternion-identity! (new 'stack-no-clear 'quaternion)))) + (let ((v1-19 (the-as entity-actor (entity-by-name "scene-stage-133")))) + (when v1-19 + (set! (-> self root trans quad) (-> v1-19 extra trans quad)) + (quaternion-copy! gp-0 (-> v1-19 quat)) + ) + ) + (ja-channel-push! 1 0) + (let ((v1-20 (-> self which-movie))) + (cond + ((zero? v1-20) + (ja :group! prebot-mine-boss-train-1-ja :num! min) + ) + ((= v1-20 1) + (ja :group! prebot-mine-boss-train-2-ja :num! min) + ) + (else + (ja :group! prebot-mine-boss-train-3-ja :num! min) + ) + ) + ) + (process-grab? *target* #f) + (let ((s5-3 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-cav-minecar" (the-as (pointer level) #f)) + #f + 0 + :name "cav-minecar" + :to self + :stack-size #x20000 + ) + ) + ) + (when s5-3 + (send-event (ppointer->process s5-3) 'anim-mode 'clone-anim) + (send-event (ppointer->process s5-3) 'clone-copy-trans #f) + (send-event (ppointer->process s5-3) 'rot-quat gp-0) + ) + ) + (let ((s5-5 (process-spawn + manipy + :init manipy-init + (-> self root trans) + (-> self entity) + (art-group-get-by-name *level* "skel-prebot-camera" (the-as (pointer level) #f)) + #f + 0 + :name "prebot-camera" + :to self + :stack-size #x20000 + ) + ) + ) + (when s5-5 + (send-event (ppointer->process s5-5) 'anim-mode 'clone-anim) + (send-event (ppointer->process s5-5) 'clone-copy-trans #f) + (send-event (ppointer->process s5-5) 'rot-quat gp-0) + (let ((v1-83 + (process-spawn othercam (ppointer->process s5-5) 4 #f #f :name "othercam" :to (ppointer->process s5-5)) + ) + ) + (if v1-83 + (send-event (ppointer->process v1-83) 'mask 0) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; definition for function prebot-set-cam-slave-fov +(defbehavior prebot-set-cam-slave-fov prebot ((arg0 float)) + (let ((v1-1 (-> *camera* slave))) + (if v1-1 + (set! (-> v1-1 0 fov) arg0) + ) + ) + ) + +;; failed to figure out what this is: +(defstate destroy-pillars (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (set! (-> self state-time) 0) + (set! (-> self num-attacks) (the-as uint 0)) + (set-setting! 'entity-name "camera-312" 0.0 0) + (dotimes (gp-0 5) + (send-event (handle->process (-> self pillars gp-0)) 'vulnerable) + ) + ) + :exit (behavior () + (prebot-set-cam-slave-fov 11650.845) + (set-setting! 'entity-name "camera-308" 0.0 0) + (blend-to-off! (-> self shoulder-aim-jm) (seconds 0.1) #f) + ) + :trans (behavior () + (if (= (get-aspect-ratio) 'aspect16x9) + (prebot-set-cam-slave-fov 13653.333) + (prebot-set-cam-slave-fov 11650.845) + ) + (let ((v1-4 (ja-group))) + (cond + ((and v1-4 (= v1-4 prebot-gun-stow-again-ja)) + (ja :num! (seek!)) + (when (and (= (-> self stage) 1) (not (-> self laugh-played)) (>= (ja-aframe-num 0) 280.0)) + (set-time! (-> self laugh-timer)) + (set! (-> self laugh-played) #t) + (sound-play "prebot-laugh" :position (-> self root trans)) + ) + (when (ja-done? 0) + (let ((a0-14 (handle->process (-> self gun)))) + (if a0-14 + (deactivate a0-14) + ) + ) + (go-virtual slam) + ) + ) + ((let ((v1-39 (ja-group))) + (and v1-39 (= v1-39 prebot-gun-fire-ja)) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-gun-target-ja :num! min) + (set-time! (-> self state-time)) + ) + ) + ((let ((v1-60 (ja-group))) + (and v1-60 (= v1-60 prebot-gun-target-ja)) + ) + (ja :num! (loop!)) + (while (and (< (-> self num-attacks) (the-as uint 4)) + (not (handle->process (-> self pillars (-> self num-attacks)))) + ) + (+! (-> self num-attacks) 1) + ) + (let ((gp-3 (handle->process (-> self pillars (-> self num-attacks))))) + (when gp-3 + (blend-on! (-> self shoulder-aim-jm) (seconds 0.25) 1.0 #f) + (let ((a1-10 (new 'stack-no-clear 'vector))) + (set! (-> a1-10 quad) (-> (the-as process-drawable gp-3) root trans quad)) + (+! (-> a1-10 y) -14336.0) + (set-target! (-> self shoulder-aim-jm) a1-10) + ) + ) + ) + (when (time-elapsed? (-> self state-time) (seconds 1)) + (set-time! (-> self state-time)) + (blend-to-off! (-> self shoulder-aim-jm) (seconds 0.1) #f) + (ja-channel-push! 1 (seconds 0.1)) + (cond + ((and (>= (-> self num-attacks) (the-as uint 4)) + (not (handle->process (-> self pillars (-> self num-attacks)))) + ) + (ja :group! prebot-gun-stow-again-ja :num! min) + (set! (-> self laugh-played) #f) + ) + (else + (ja :group! prebot-gun-fire-ja :num! min) + (send-event (handle->process (-> self gun)) 'fire) + (prebot-light-flash 1.0 0.4 0.0) + ) + ) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-gun-target-ja :num! min) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; definition for function prebot-setup-shot-offsets +;; WARN: Return type mismatch float vs object. +(defbehavior prebot-setup-shot-offsets prebot () + (let* ((f30-0 -2048.0) + (f28-0 12288.0) + (v1-3 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-4 (the-as number (logior #x3f800000 v1-3))) + ) + (set! (-> self shot-extra-y) (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-4))))) + ) + (let* ((f30-1 12288.0) + (f28-1 8192.0) + (v1-9 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-10 (the-as number (logior #x3f800000 v1-9))) + ) + (set! (-> self shot-extra-xz) (+ f30-1 (* f28-1 (+ -1.0 (the-as float v1-10))))) + ) + (let* ((v1-13 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-14 (the-as number (logior #x3f800000 v1-13))) + ) + (if (< (+ -1.0 (the-as float v1-14)) 0.5) + (set! (-> self shot-extra-xz) (- (-> self shot-extra-xz))) + ) + ) + ) + +;; failed to figure out what this is: +(defstate watch-pillars (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (set-time! (-> self state-time)) + (cond + ((and (logtest? (-> self flags) (prebot-flag pf1)) (logtest? (-> self flags) (prebot-flag pf2))) + (set! (-> self pillar-hint-timer) 0) + 0 + ) + (else + (set-time! (-> self pillar-hint-timer)) + ) + ) + (set-time! (-> self minecar-hint-timer)) + (case (-> self stage) + ((1) + (set! (-> self num-attacks) (the-as uint 20)) + ) + ((2) + (set! (-> self num-attacks) (the-as uint 15)) + ) + (else + (set! (-> self num-attacks) (the-as uint 10)) + ) + ) + (prebot-setup-shot-offsets) + (set-setting! 'entity-name "camera-312" 0.0 0) + ) + :exit (behavior () + (blend-to-off! (-> self shoulder-aim-jm) (seconds 0.1) #f) + (prebot-set-cam-slave-fov 11650.845) + (set-setting! 'entity-name "camera-308" 0.0 0) + ) + :trans (behavior () + (when (send-event self 'railblocker-hittable? #f) + (set! (-> self pillar-hint-timer) 0) + 0 + ) + (when (nonzero? (-> self pillar-hint-timer)) + (set! (-> self minecar-hint-timer) (+ (current-time) (seconds -4))) + (when (time-elapsed? (-> self pillar-hint-timer) (seconds 10)) + (set! (-> self pillar-hint-timer) 0) + (cond + ((not (logtest? (-> self flags) (prebot-flag pf1))) + (talker-spawn-func (-> *talker-speech* 328) *entity-pool* (target-pos 0) (the-as region #f)) + (logior! (-> self flags) (prebot-flag pf1)) + ) + ((not (logtest? (-> self flags) (prebot-flag pf2))) + (talker-spawn-func (-> *talker-speech* 330) *entity-pool* (target-pos 0) (the-as region #f)) + (logior! (-> self flags) (prebot-flag pf2)) + ) + ) + (let ((v1-28 (-> self entity extra perm))) + (logior! (-> v1-28 status) (entity-perm-status bit-5)) + (set! (-> v1-28 user-object 0) (-> self flags)) + ) + ) + ) + (when (and (nonzero? (-> self minecar-hint-timer)) (time-elapsed? (-> self minecar-hint-timer) (seconds 10))) + (set! (-> self minecar-hint-timer) 0) + (cond + ((< 1 (-> self stage)) + (when (not (logtest? (-> self flags) (prebot-flag pf6))) + (talker-spawn-func (-> *talker-speech* 333) *entity-pool* (target-pos 0) (the-as region #f)) + (logior! (-> self flags) (prebot-flag pf6)) + ) + ) + ((not (logtest? (-> self flags) (prebot-flag pf3))) + (talker-spawn-func (-> *talker-speech* 327) *entity-pool* (target-pos 0) (the-as region #f)) + (logior! (-> self flags) (prebot-flag pf3)) + ) + ((not (logtest? (-> self flags) (prebot-flag pf4))) + (talker-spawn-func (-> *talker-speech* 329) *entity-pool* (target-pos 0) (the-as region #f)) + (logior! (-> self flags) (prebot-flag pf4)) + ) + ((not (logtest? (-> self flags) (prebot-flag pf5))) + (talker-spawn-func (-> *talker-speech* 332) *entity-pool* (target-pos 0) (the-as region #f)) + (logior! (-> self flags) (prebot-flag pf5)) + ) + ) + (let ((v1-63 (-> self entity extra perm))) + (logior! (-> v1-63 status) (entity-perm-status bit-5)) + (set! (-> v1-63 user-object 0) (-> self flags)) + ) + ) + (if (= (get-aspect-ratio) 'aspect16x9) + (prebot-set-cam-slave-fov 13653.333) + (prebot-set-cam-slave-fov 11650.845) + ) + (let ((v1-68 (ja-group))) + (cond + ((and v1-68 (= v1-68 prebot-gun-from-tentacle-ja)) + (ja :num! (seek!)) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-gun-target-ja :num! min) + (set-time! (-> self state-time)) + (prebot-setup-shot-offsets) + ) + ) + ((let ((v1-90 (ja-group))) + (and v1-90 (= v1-90 prebot-gun-fire-ja)) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (if (>= (the-as uint 1) (-> self num-attacks)) + (go-virtual destroy-pillars) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-gun-target-ja :num! min) + (set-time! (-> self state-time)) + (prebot-setup-shot-offsets) + ) + ) + ((let ((v1-117 (ja-group))) + (and v1-117 (= v1-117 prebot-gun-target-ja)) + ) + (ja :num! (loop!)) + (cond + ((time-elapsed? (-> self state-time) (seconds 1)) + (send-event (handle->process (-> self gun)) 'fire) + (prebot-light-flash 1.0 0.4 0.0) + (+! (-> self num-attacks) -1) + (set-time! (-> self state-time)) + (blend-to-off! (-> self shoulder-aim-jm) (seconds 0.1) #f) + (ja-channel-push! 1 (seconds 0.1)) + (ja :group! prebot-gun-fire-ja :num! min) + ) + (else + (blend-on! (-> self shoulder-aim-jm) (seconds 0.25) 1.0 #f) + (let ((gp-10 (new 'stack-no-clear 'vector))) + (set! (-> gp-10 quad) (-> (target-pos 0) quad)) + (let ((s5-6 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node prebot-lod0-jg shoulderL)))) + (+! (-> gp-10 y) (-> self shot-extra-y)) + (set! (-> s5-6 y) (-> s5-6 x)) + (set! (-> s5-6 x) (-> s5-6 z)) + (set! (-> s5-6 z) (- (-> s5-6 y))) + (set! (-> s5-6 y) 0.0) + (vector-normalize! s5-6 (-> self shot-extra-xz)) + (vector+! gp-10 gp-10 s5-6) + ) + (set-target! (-> self shoulder-aim-jm) gp-10) + ) + ) + ) + ) + ((let ((v1-154 (ja-group))) + (and v1-154 (= v1-154 prebot-tentacle-stow-ja)) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-gun-from-tentacle-ja :num! min) + (set! (-> self gun) + (ppointer->handle (process-spawn prebot-gun "gun-" (-> self root trans) :name "prebot-gun" :to self)) + ) + (setup-masks (-> self draw) 0 0) + (dotimes (gp-13 5) + (let ((a0-81 (handle->process (-> self tentacles gp-13)))) + (if a0-81 + (deactivate a0-81) + ) + ) + ) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-tentacle-stow-ja :num! min) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; definition for function prebot-fire-tentacle +;; INFO: Used lq/sq +;; WARN: Return type mismatch none vs object. +(defbehavior prebot-fire-tentacle prebot ((arg0 handle) (arg1 vector)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> self root trans quad)) + (let ((v1-2 (handle->process arg0))) + (if v1-2 + (vector<-cspace! s5-0 (-> (the-as prebot-tentacle v1-2) node-list data 14)) + ) + ) + (let ((a2-0 (new 'stack-no-clear 'vector))) + (vector-! a2-0 arg1 s5-0) + (set! (-> *part-id-table* 4469 init-specs 4 initial-valuef) (vector-length a2-0)) + (draw-beam (-> *part-id-table* 4469) s5-0 a2-0 #f) + ) + (launch-particles (-> *part-id-table* 4470) s5-0) + ) + (launch-particles (-> *part-id-table* 4471) arg1) + ) + +;; failed to figure out what this is: +(defstate create-pillars (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self num-attacks) (the-as uint 0)) + (set-setting! 'entity-name "camera-309" 0.0 0) + (set-mined-pillar-texture! 0.0) + ) + :exit (behavior () + (set-setting! 'entity-name "camera-312" 0.0 0) + (set-mined-pillar-texture! 1.0) + (let ((a0-3 (handle->process (-> self beam-projectile)))) + (when a0-3 + (deactivate a0-3) + (set! (-> self beam-projectile) (the-as handle #f)) + ) + ) + ) + :trans (behavior () + (let* ((s5-0 (new 'stack-no-clear 'vector)) + (s4-0 (new 'stack-no-clear 'vector)) + (v1-0 (-> self stage)) + (gp-0 (cond + ((= v1-0 1) + (new 'static 'boxed-array :type prebot-eco-pillar-launch-spec + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x 40960.0 :z 163840.0 :w 1.0) + :height 12288.0 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x 20480.0 :z 204800.0 :w 1.0) + :height 22528.0 + :style 1 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x -20480.0 :z 204800.0 :w 1.0) + :height 32768.0 + :style 2 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :z 184320.0 :w 1.0) + :height 43008.0 + :style 3 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x -40960.0 :z 163840.0 :w 1.0) + :height 53248.0 + ) + ) + ) + ((= v1-0 2) + (new 'static 'boxed-array :type prebot-eco-pillar-launch-spec + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x 12288.0 :z 184320.0 :w 1.0) + :height 12288.0 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x -40960.0 :z 204800.0 :w 1.0) + :height 22528.0 + :style 1 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x -32768.0 :z 163840.0 :w 1.0) + :height 32768.0 + :style 2 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :z 131072.0 :w 1.0) + :height 43008.0 + :style 3 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x 49152.0 :z 143360.0 :w 1.0) + :height 53248.0 + ) + ) + ) + (else + (new 'static 'boxed-array :type prebot-eco-pillar-launch-spec + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x -73728.0 :z 163840.0 :w 1.0) + :height 12288.0 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x -40960.0 :z 204800.0 :w 1.0) + :height 22528.0 + :style 1 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x -20480.0 :z 163840.0 :w 1.0) + :height 32768.0 + :style 2 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x 24576.0 :z 163840.0 :w 1.0) + :height 43008.0 + :style 3 + ) + (new 'static 'prebot-eco-pillar-launch-spec + :offset (new 'static 'vector :x 8192.0 :z 204800.0 :w 1.0) + :height 53248.0 + ) + ) + ) + ) + ) + ) + (let ((f30-0 0.0)) + (set! (-> self num-attacks) (the-as uint 0)) + (dotimes (s3-0 (min 5 (-> gp-0 length))) + (vector+! s5-0 (-> gp-0 s3-0 offset) (-> self original-position)) + (set! (-> s4-0 quad) (-> s5-0 quad)) + (+! (-> s4-0 x) + (* 4096.0 (cos (* 1747.6267 (the float (+ (* 30 s3-0) (- (current-time) (-> self state-time))))))) + ) + (cond + ((not (time-elapsed? (-> self state-time) (+ (* 240 s3-0) 75))) + (send-event (handle->process (-> self tentacles s3-0)) 'look-at s5-0 #f) + ) + ((not (handle->process (-> self pillars s3-0))) + (let ((v1-27 (process-spawn prebot-eco-pillar s5-0 (-> gp-0 s3-0) :name "prebot-eco-pillar" :to self))) + (if v1-27 + (set! (-> self pillars s3-0) (ppointer->handle v1-27)) + ) + ) + (send-event (handle->process (-> self tentacles s3-0)) 'look-at s5-0 #t) + ) + (else + (set! f30-0 (cond + ((not (time-elapsed? (-> self state-time) (+ (* 240 s3-0) 1575))) + (prebot-fire-tentacle (-> self tentacles s3-0) s4-0) + (+ 1.0 f30-0) + ) + (else + (send-event (handle->process (-> self tentacles s3-0)) 'look-at #f #f) + f30-0 + ) + ) + ) + ) + ) + (let ((v1-63 (handle->process (-> self pillars s3-0)))) + (when v1-63 + (if (and (-> v1-63 next-state) (= (-> v1-63 next-state name) 'wait-to-cool)) + (+! (-> self num-attacks) 1) + ) + ) + ) + ) + (if (= f30-0 0.0) + (prebot-light-pulse-off) + (prebot-light-pulse-on (+ 0.2 (* 0.1 f30-0)) (+ 0.1 (* 0.04 f30-0)) 0.0) + ) + ) + (when (>= (-> self num-attacks) (the-as uint (min 5 (-> gp-0 length)))) + (dotimes (s5-1 (min 5 (-> gp-0 length))) + (send-event (handle->process (-> self pillars s5-1)) 'cool-down) + ) + (sound-play "pillar-cool") + (go-virtual watch-pillars) + ) + ) + (ja :num! (loop!)) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate activate-tentacles (prebot) + :virtual #t + :event prebot-handler + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 prebot-tentacle-launch-ja)) + (ja :num! (seek!)) + (when (and (not (-> self grunt-played)) (or (and (= (-> self stage) 1) (>= (ja-aframe-num 0) 165.0)) + (and (= (-> self stage) 2) (>= (ja-aframe-num 0) 167.0)) + (and (= (-> self stage) 3) (>= (ja-aframe-num 0) 178.0)) + ) + ) + (set! (-> self grunt-played) #t) + (case (-> self stage) + ((1) + (sound-play "prebot-grunts" :position (-> self root trans)) + ) + ((2) + (sound-play "prebot-trythis" :position (-> self root trans)) + ) + ((3) + (sound-play "prebot-greeting" :position (-> self root trans)) + ) + ) + ) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-hatch-hover-ja :num! min) + (go-virtual create-pillars) + ) + ) + (else + (let ((v1-53 (ja-group))) + (cond + ((and v1-53 (= v1-53 prebot-tentacle-launch-pre-ja)) + (ja :num! (seek!)) + (when (ja-done? 0) + (set! (-> self tentacles 0) + (ppointer->handle + (process-spawn prebot-tentacle "a-" (-> self root trans) 47 :name "prebot-tentacle" :to self) + ) + ) + (set! (-> self tentacles 1) + (ppointer->handle + (process-spawn prebot-tentacle "b-" (-> self root trans) 48 :name "prebot-tentacle" :to self) + ) + ) + (set! (-> self tentacles 2) + (ppointer->handle + (process-spawn prebot-tentacle "c-" (-> self root trans) 49 :name "prebot-tentacle" :to self) + ) + ) + (set! (-> self tentacles 3) + (ppointer->handle + (process-spawn prebot-tentacle "d-" (-> self root trans) 45 :name "prebot-tentacle" :to self) + ) + ) + (set! (-> self tentacles 4) + (ppointer->handle + (process-spawn prebot-tentacle "e-" (-> self root trans) 46 :name "prebot-tentacle" :to self) + ) + ) + (ja-channel-push! 1 0) + (ja :group! prebot-tentacle-launch-ja :num! min) + (set! (-> self grunt-played) #f) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-tentacle-launch-pre-ja :num! min) + (setup-masks (-> self draw) 0 0) + ) + ) + ) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate watch-critters (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 prebot-idle-ja)) + (ja :num! (loop!)) + (dotimes (gp-0 28) + (let ((a0-6 (handle->process (-> self critters gp-0)))) + (when a0-6 + (if (or (time-elapsed? (-> self state-time) (seconds 45)) + (< (-> (the-as process-drawable a0-6) root trans y) (+ -40960.0 (-> self entity extra trans y))) + ) + (send-event a0-6 'instant-death) + (goto cfg-26) + ) + ) + ) + ) + (go-virtual activate-tentacles) + (label cfg-26) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-idle-ja :num! min) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; definition for function prebot-launch-critter +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs object. +(defbehavior prebot-launch-critter prebot () + (cond + ((zero? (-> self nav)) + (format #t "ERROR: ~s nav mesh not found~%" (-> self name)) + (set! (-> self critters-to-launch) 0) + 0 + ) + (else + (let ((s4-0 (new 'stack-no-clear 'enemy-init-by-other-params)) + (gp-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (let ((s3-0 (handle->process (-> self gun)))) + (cond + (s3-0 + (vector<-cspace! gp-0 (-> (the-as process-drawable s3-0) node-list data 7)) + (if (logtest? (-> *part-group-id-table* 1334 flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to *entity-pool* + :group (-> *part-group-id-table* 1334) + :duration (seconds 1) + :mat-joint (-> (the-as process-drawable s3-0) node-list data 7 bone transform) + ) + (part-tracker-spawn + part-tracker + :to *entity-pool* + :group (-> *part-group-id-table* 1334) + :duration (seconds 1) + :mat-joint (-> (the-as process-drawable s3-0) node-list data 7 bone transform) + ) + ) + ) + (else + (vector<-cspace! gp-0 (joint-node prebot-lod0-jg head)) + ) + ) + ) + (set! (-> s5-0 quad) (-> self nav state mesh bounds quad)) + (case (-> self stage) + ((1) + (+! (-> s5-0 x) 61440.0) + (set! (-> s5-0 x) (- (-> s5-0 x) (* 32768.0 (the float (-> self critters-to-launch))))) + ) + (else + (+! (-> s5-0 x) 61440.0) + (set! (-> s5-0 x) (- (-> s5-0 x) (* 28672.0 (the float (-> self critters-to-launch))))) + ) + ) + (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) #f) + (let ((v1-53 (process-spawn + prebot-large-eco-creature + :init enemy-init-by-other + self + s4-0 + :name "prebot-large-eco-creature" + :to self + ) + ) + ) + (when v1-53 + (send-event (ppointer->process v1-53) 'set-dest gp-0 s5-0 #x46c00000 #x44160000) + (+! (-> self critters-to-launch) -1) + (prebot-light-flash 1.0 0.4 0.0) + (sound-play "launch-cav-eco" :position gp-0) + (the-as int (sound-play "launch-whoosh" :position gp-0)) + ) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate launch-critters (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (case (-> self stage) + ((1) + (set! (-> self critters-to-launch) 2) + ) + (else + (set! (-> self critters-to-launch) 3) + ) + ) + ) + :exit (behavior () + (sound-play "boss-win-vox" :position (-> self root trans)) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 prebot-gun-stow-ja)) + (ja :num! (seek!)) + (when (ja-done? 0) + (let ((a0-7 (handle->process (-> self gun)))) + (if a0-7 + (deactivate a0-7) + ) + ) + (go-virtual watch-critters) + ) + ) + (else + (let ((v1-25 (ja-group))) + (cond + ((and v1-25 (= v1-25 prebot-gun-launch-ja)) + (ja :num! (seek!)) + (when (ja-done? 0) + (cond + ((= (-> self critters-to-launch) 1) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-gun-stow-ja :num! min) + ) + (else + (ja :num-func num-func-identity :frame-num 0.0) + ) + ) + (prebot-launch-critter) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-gun-launch-ja :num! min) + (prebot-launch-critter) + ) + ) + ) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate sweep-done (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (set! (-> self position target quad) (-> self original-position quad)) + (set! (-> self position target y) (-> self original-position y)) + ) + :exit (behavior () + (dotimes (gp-0 2) + (let ((a0-1 (handle->process (-> self swords gp-0)))) + (if a0-1 + (deactivate a0-1) + ) + ) + ) + (prebot-light-pulse-off) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 prebot-swords-horizontal-R2L-hold-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-horizontal-R2L-complete-ja :num! min) + ) + ((let ((v1-12 (ja-group))) + (and v1-12 (= v1-12 prebot-sword-R-horizontal-R2L-hold-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-horizontal-R2L-complete-ja :num! min) + ) + ((let ((v1-22 (ja-group))) + (and v1-22 (= v1-22 prebot-sword-R-horizontal-L2R-hold-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-horizontal-L2R-complete-ja :num! min) + ) + ((let ((v1-32 (ja-group))) + (and v1-32 (= v1-32 prebot-swords-horizontal-R2L-hold-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-horizontal-R2L-complete-ja :num! min) + ) + ((let ((v1-42 (ja-group))) + (and v1-42 (= v1-42 prebot-sword-L-horizontal-R2L-hold-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-horizontal-R2L-complete-ja :num! min) + ) + ((let ((v1-52 (ja-group))) + (and v1-52 (= v1-52 prebot-sword-L-horizontal-L2R-hold-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-horizontal-L2R-complete-ja :num! min) + ) + ((let ((v1-62 (ja-group))) + (and v1-62 (or (= v1-62 prebot-sword-R-horizontal-L2R-complete-ja) + (= v1-62 prebot-sword-R-horizontal-R2L-complete-ja) + (= v1-62 prebot-sword-L-horizontal-L2R-complete-ja) + (= v1-62 prebot-sword-L-horizontal-R2L-complete-ja) + (= v1-62 prebot-swords-horizontal-L2R-complete-ja) + (= v1-62 prebot-swords-horizontal-R2L-complete-ja) + ) + ) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (dotimes (gp-6 2) + (let ((a0-58 (handle->process (-> self swords gp-6)))) + (if a0-58 + (deactivate a0-58) + ) + ) + ) + (setup-masks (-> self draw) 28 0) + (prebot-light-pulse-off) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-gun-from-sword-R-ja :num! min) + (set! (-> self gun) + (ppointer->handle (process-spawn prebot-gun "gun-" (-> self root trans) :name "prebot-gun" :to self)) + ) + ) + ) + (else + (let ((v1-99 (ja-group))) + (cond + ((and v1-99 (= v1-99 prebot-gun-from-sword-R-ja)) + (ja :num! (seek!)) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-gun-aim-ja :num! min) + ) + ) + (else + (let ((f0-14 (vector-vector-distance-squared (the-as vector (-> self position)) (-> self position value))) + (f1-0 1024.0) + ) + (if (< f0-14 (* f1-0 f1-0)) + (go-virtual launch-critters) + ) + ) + (ja :num! (loop!)) + ) + ) + ) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate sweep (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (prebot-method-46 self) + (case (-> self stage) + ((1) + (set! (-> self num-attacks) (the-as uint 2)) + (set! (-> self position max-vel) 1638.4) + ) + ((2) + (set! (-> self num-attacks) (the-as uint 3)) + (set! (-> self position max-vel) 2048.0) + ) + (else + (set! (-> self num-attacks) (the-as uint 3)) + (set! (-> self position max-vel) 2457.6) + ) + ) + (set! (-> self position accel) 409.6) + (set! (-> self position max-partial) 0.99) + (dotimes (gp-0 2) + (send-event (handle->process (-> self swords gp-0)) 'whoosh-lead (* 15.0 (-> self position max-vel))) + (send-event (handle->process (-> self swords gp-0)) 'use-pos-pitch #t) + ) + ) + :exit (behavior () + (prebot-method-45 self) + (set! (-> self position accel) 0.004096) + (set! (-> self position max-vel) 2048.0) + (set! (-> self position max-partial) 0.125) + (dotimes (gp-0 2) + (send-event (handle->process (-> self swords gp-0)) 'scale #x3f800000) + (send-event (handle->process (-> self swords gp-0)) 'use-pos-pitch #f) + ) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 prebot-swords-horizontal-R2L-strike-ja)) + (ja :num! (seek!)) + (cond + ((>= (ja-aframe-num 0) 195.0) + (set! (-> self position target x) (+ -94208.0 (-> self original-position x))) + ) + ((>= (ja-aframe-num 0) 190.0) + (dotimes (gp-0 2) + (send-event (handle->process (-> self swords gp-0)) 'scale #x3ff33333) + ) + ) + ) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-horizontal-R2L-hold-ja :num! min) + ) + ) + ((let ((v1-39 (ja-group))) + (and v1-39 (= v1-39 prebot-swords-horizontal-L2R-strike-ja)) + ) + (ja :num! (seek!)) + (when (>= (ja-aframe-num 0) 231.0) + (set! (-> self position target x) (+ 94208.0 (-> self original-position x))) + (dotimes (gp-2 2) + (send-event (handle->process (-> self swords gp-2)) 'scale #x3ff33333) + ) + ) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-horizontal-L2R-hold-ja :num! min) + ) + ) + ((let ((v1-73 (ja-group))) + (and v1-73 (= v1-73 prebot-sword-R-horizontal-R2L-strike-ja)) + ) + (ja :num! (seek!)) + (cond + ((>= (ja-aframe-num 0) 252.0) + (set! (-> self position target x) (+ -94208.0 (-> self original-position x))) + ) + ((>= (ja-aframe-num 0) 248.0) + (dotimes (gp-4 2) + (send-event (handle->process (-> self swords gp-4)) 'scale #x3ff33333) + ) + ) + ) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-horizontal-R2L-hold-ja :num! min) + ) + ) + ((let ((v1-110 (ja-group))) + (and v1-110 (= v1-110 prebot-sword-R-horizontal-L2R-strike-ja)) + ) + (ja :num! (seek!)) + (when (>= (ja-aframe-num 0) 207.0) + (set! (-> self position target x) (+ 94208.0 (-> self original-position x))) + (dotimes (gp-6 2) + (send-event (handle->process (-> self swords gp-6)) 'scale #x3ff33333) + ) + ) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-horizontal-L2R-hold-ja :num! min) + ) + ) + ((let ((v1-144 (ja-group))) + (and v1-144 (= v1-144 prebot-sword-L-horizontal-R2L-strike-ja)) + ) + (ja :num! (seek!)) + (when (>= (ja-aframe-num 0) 207.0) + (set! (-> self position target x) (+ -94208.0 (-> self original-position x))) + (dotimes (gp-8 2) + (send-event (handle->process (-> self swords gp-8)) 'scale #x3ff33333) + ) + ) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-horizontal-R2L-hold-ja :num! min) + ) + ) + ((let ((v1-178 (ja-group))) + (and v1-178 (= v1-178 prebot-sword-L-horizontal-L2R-strike-ja)) + ) + (ja :num! (seek!)) + (cond + ((>= (ja-aframe-num 0) 252.0) + (set! (-> self position target x) (+ 94208.0 (-> self original-position x))) + ) + ((>= (ja-aframe-num 0) 248.0) + (dotimes (gp-10 2) + (send-event (handle->process (-> self swords gp-10)) 'scale #x3ff33333) + ) + ) + ) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-horizontal-L2R-hold-ja :num! min) + ) + ) + ((let ((v1-215 (ja-group))) + (and v1-215 (or (= v1-215 prebot-sword-R-horizontal-R2L-hold-ja) + (= v1-215 prebot-sword-R-horizontal-L2R-hold-ja) + (= v1-215 prebot-sword-L-horizontal-R2L-hold-ja) + (= v1-215 prebot-sword-L-horizontal-L2R-hold-ja) + (= v1-215 prebot-swords-horizontal-R2L-hold-ja) + (= v1-215 prebot-swords-horizontal-L2R-hold-ja) + ) + ) + ) + (ja :num! (loop!)) + (dotimes (gp-12 2) + (send-event (handle->process (-> self swords gp-12)) 'scale #x3ff33333) + ) + (let ((f0-46 (vector-vector-distance-squared (the-as vector (-> self position)) (-> self position value))) + (f1-15 1024.0) + ) + (when (< f0-46 (* f1-15 f1-15)) + (dotimes (gp-13 2) + (send-event (handle->process (-> self swords gp-13)) 'scale #x3f800000) + ) + (+! (-> self num-attacks) -1) + (if (<= (-> self num-attacks) 0) + (go-virtual sweep-done) + ) + (let ((v1-258 (ja-group))) + (cond + ((and v1-258 (= v1-258 prebot-swords-horizontal-R2L-hold-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-horizontal-R2L-return-ja :num! min) + (set! (-> self position target y) (+ -34816.0 (-> self original-position y))) + ) + ((let ((v1-270 (ja-group))) + (and v1-270 (= v1-270 prebot-swords-horizontal-L2R-hold-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-horizontal-L2R-return-ja :num! min) + (set! (-> self position target y) (+ -34816.0 (-> self original-position y))) + ) + ((let ((v1-282 (ja-group))) + (and v1-282 (= v1-282 prebot-sword-R-horizontal-R2L-hold-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-horizontal-R2L-return-ja :num! min) + (set! (-> self position target y) (+ -36864.0 (-> self original-position y))) + ) + ((let ((v1-294 (ja-group))) + (and v1-294 (= v1-294 prebot-sword-R-horizontal-L2R-hold-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-horizontal-L2R-return-ja :num! min) + (set! (-> self position target y) (+ -36864.0 (-> self original-position y))) + ) + (else + (let ((v1-306 (ja-group))) + (cond + ((and v1-306 (= v1-306 prebot-sword-L-horizontal-R2L-hold-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-horizontal-R2L-return-ja :num! min) + (set! (-> self position target y) (+ -36864.0 (-> self original-position y))) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-horizontal-L2R-return-ja :num! min) + (set! (-> self position target y) (+ -36864.0 (-> self original-position y))) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ((let ((v1-325 (ja-group))) + (and v1-325 (or (= v1-325 prebot-sword-R-horizontal-R2L-return-ja) + (= v1-325 prebot-sword-L-horizontal-R2L-return-ja) + (= v1-325 prebot-swords-horizontal-R2L-return-ja) + ) + ) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (dotimes (gp-20 2) + (send-event (handle->process (-> self swords gp-20)) 'whoosh-lead (* 15.0 (-> self position max-vel))) + ) + (let ((v1-352 (ja-group))) + (cond + ((and v1-352 (= v1-352 prebot-swords-horizontal-R2L-return-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-horizontal-L2R-strike-ja :num! min) + ) + (else + (let ((v1-362 (ja-group))) + (cond + ((and v1-362 (= v1-362 prebot-sword-R-horizontal-R2L-return-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-horizontal-L2R-strike-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-horizontal-L2R-strike-ja :num! min) + ) + ) + ) + ) + ) + ) + ) + ) + ((let ((v1-377 (ja-group))) + (and v1-377 (or (= v1-377 prebot-sword-R-horizontal-L2R-return-ja) + (= v1-377 prebot-sword-L-horizontal-L2R-return-ja) + (= v1-377 prebot-swords-horizontal-L2R-return-ja) + ) + ) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (dotimes (gp-24 2) + (send-event (handle->process (-> self swords gp-24)) 'whoosh-lead (* 15.0 (-> self position max-vel))) + ) + (let ((v1-404 (ja-group))) + (cond + ((and v1-404 (= v1-404 prebot-swords-horizontal-L2R-return-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-horizontal-R2L-strike-ja :num! min) + ) + (else + (let ((v1-414 (ja-group))) + (cond + ((and v1-414 (= v1-414 prebot-sword-R-horizontal-L2R-return-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-horizontal-R2L-strike-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-horizontal-R2L-strike-ja :num! min) + ) + ) + ) + ) + ) + ) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-horizontal-L2R-strike-ja :num! min) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate slam-done (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (case (-> self stage) + ((1) + (set! (-> self position target x) (+ -94208.0 (-> self original-position x))) + (set! (-> self position target y) (+ -36864.0 (-> self original-position y))) + ) + ((2) + (set! (-> self position target x) (+ 94208.0 (-> self original-position x))) + (set! (-> self position target y) (+ -36864.0 (-> self original-position y))) + ) + (else + (set! (-> self position target x) (+ 94208.0 (-> self original-position x))) + (set! (-> self position target y) (+ -34816.0 (-> self original-position y))) + ) + ) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (or (= v1-2 prebot-sword-R-strike2pose-ja) + (= v1-2 prebot-sword-L-strike2pose-ja) + (= v1-2 prebot-swords-strike2pose-ja) + ) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (set! (-> self trythis-played) #f) + (let ((v1-16 (ja-group))) + (cond + ((and v1-16 (= v1-16 prebot-swords-strike2pose-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-pose-ja :num! min) + ) + (else + (let ((v1-26 (ja-group))) + (cond + ((and v1-26 (= v1-26 prebot-sword-R-strike2pose-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-pose-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-pose-ja :num! min) + ) + ) + ) + ) + ) + ) + ) + ) + ((let ((v1-41 (ja-group))) + (and v1-41 + (or (= v1-41 prebot-sword-R-pose-ja) (= v1-41 prebot-sword-L-pose-ja) (= v1-41 prebot-swords-pose-ja)) + ) + ) + (ja :num! (seek!)) + (when (and (not (-> self trythis-played)) (or (and (= (-> self stage) 1) + (let ((v1-59 (ja-group))) + (and v1-59 (= v1-59 prebot-sword-R-pose-ja)) + ) + (>= (ja-aframe-num 0) 162.0) + ) + (and (= (-> self stage) 2) + (let ((v1-68 (ja-group))) + (and v1-68 (= v1-68 prebot-sword-L-pose-ja)) + ) + (>= (ja-aframe-num 0) 156.0) + ) + (and (= (-> self stage) 3) + (let ((v1-76 (ja-group))) + (and v1-76 (= v1-76 prebot-swords-pose-ja)) + ) + (>= (ja-aframe-num 0) 166.0) + ) + ) + ) + (set! (-> self trythis-played) #t) + (case (-> self stage) + ((1) + (sound-play "prebot-trythis" :position (-> self root trans)) + ) + ((2) + (sound-play "prebot-grunts" :position (-> self root trans)) + ) + ((2) + (sound-play "prebot-harumph" :position (-> self root trans)) + ) + ) + ) + (when (ja-done? 0) + (let ((v1-99 (ja-group))) + (cond + ((and v1-99 (= v1-99 prebot-swords-pose-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-horizontal-R2L-pre-ja :num! min) + ) + (else + (let ((v1-109 (ja-group))) + (cond + ((and v1-109 (= v1-109 prebot-sword-R-pose-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-horizontal-L2R-pre-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-horizontal-R2L-pre-ja :num! min) + ) + ) + ) + ) + ) + ) + ) + ) + (else + (let ((v1-124 (ja-group))) + (cond + ((and v1-124 (or (= v1-124 prebot-sword-R-horizontal-L2R-pre-ja) + (= v1-124 prebot-sword-L-horizontal-R2L-pre-ja) + (= v1-124 prebot-swords-horizontal-R2L-pre-ja) + ) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (let ((v1-138 (ja-group))) + (cond + ((and v1-138 (= v1-138 prebot-swords-horizontal-R2L-pre-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-horizontal-R2L-strike-ja :num! min) + ) + (else + (let ((v1-148 (ja-group))) + (cond + ((and v1-148 (= v1-148 prebot-sword-R-horizontal-L2R-pre-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-horizontal-L2R-strike-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-horizontal-R2L-strike-ja :num! min) + ) + ) + ) + ) + ) + ) + (go-virtual sweep) + ) + ) + ((let ((v1-166 (ja-group))) + (and v1-166 (= v1-166 prebot-swords-L-vertical-strike-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-strike2pose-ja :num! min) + ) + (else + (let ((v1-176 (ja-group))) + (cond + ((and v1-176 (= v1-176 prebot-sword-R-vertical-strike-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-strike2pose-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-strike2pose-ja :num! min) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; definition for function prebot-spawn-shockwave +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs object. +(defbehavior prebot-spawn-shockwave prebot () + (let ((gp-0 (new 'stack-no-clear 'vector))) + (set! (-> gp-0 quad) (-> self root trans quad)) + (let ((s5-0 (quaternion-identity! (new 'stack-no-clear 'quaternion)))) + L162 + (let* ((v1-6 (ja-group)) + (v1-13 (handle->process (-> self swords (if (and v1-6 (= v1-6 prebot-swords-R-vertical-strike-ja)) + 1 + 0 + ) + ) + ) + ) + ) + (when v1-13 + (vector<-cspace! gp-0 (-> (the-as process-drawable v1-13) node-list data 5)) + (+! (-> gp-0 z) -90112.0) + (set! (-> gp-0 y) (+ 4096.0 (-> self original-position y))) + ) + ) + (quaternion-set! s5-0 0.0 1.0 0.0 0.0) + (process-spawn prebot-shockwave gp-0 s5-0 :name "prebot-shockwave" :to self) + ) + (set-zero! *camera-smush-control*) + (activate! *camera-smush-control* 819.2 37 300 1.0 1.1 (-> *display* camera-clock)) + (prebot-light-flash 1.0 0.0 0.0) + (sound-play "shockwave" :position gp-0) + (sound-play "sword-hit" :position gp-0) + ) + 0 + ) + +;; failed to figure out what this is: +(defstate slam (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (set! (-> self position target x) (-> self original-position x)) + (set! (-> self position target y) (+ 6144.0 (-> self original-position y))) + (set! (-> self position target z) (+ 61440.0 (-> self original-position z))) + (case (-> self stage) + ((1) + (set! (-> self num-attacks) (the-as uint 2)) + ) + ((2) + (set! (-> self num-attacks) (the-as uint 3)) + ) + (else + (set! (-> self num-attacks) (the-as uint 4)) + ) + ) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 prebot-sword-grab-both-ja)) + (ja :num! (seek!)) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.02)) + (ja :group! prebot-swords-vertical-pre-ja :num! min) + (setup-masks (-> self draw) 0 24) + (prebot-light-pulse-on 0.7 0.2 0.0) + (set! (-> self swords 0) + (ppointer->handle + (process-spawn prebot-sword "sword-l-" (-> self root trans) 43 #f :name "prebot-sword" :to self) + ) + ) + (set! (-> self swords 1) + (ppointer->handle + (process-spawn prebot-sword "sword-r-" (-> self root trans) 27 #t :name "prebot-sword" :to self) + ) + ) + ) + ) + (else + (let ((v1-35 (ja-group))) + (cond + ((and v1-35 (= v1-35 prebot-sword-grab-AR-ja)) + (ja :num! (seek!)) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.02)) + (ja :group! prebot-sword-R-vertical-pre-ja :num! min) + (setup-masks (-> self draw) 0 4) + (prebot-light-pulse-on 0.7 0.2 0.0) + (set! (-> self swords 0) + (ppointer->handle + (process-spawn prebot-sword "sword-" (-> self root trans) 27 #f :name "prebot-sword" :to self) + ) + ) + ) + ) + ((let ((v1-62 (ja-group))) + (and v1-62 (= v1-62 prebot-sword-grab-AL-ja)) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (ja-channel-push! 1 (seconds 0.02)) + (ja :group! prebot-sword-L-vertical-pre-ja :num! min) + (setup-masks (-> self draw) 0 2) + (prebot-light-pulse-on 0.7 0.2 0.0) + (set! (-> self swords 0) + (ppointer->handle + (process-spawn prebot-sword "sword-" (-> self root trans) 43 #f :name "prebot-sword" :to self) + ) + ) + ) + ) + ((not (handle->process (-> self swords 0))) + (case (-> self stage) + ((1) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-grab-AR-ja :num! min) + ) + ((2) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-grab-AL-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-grab-both-ja :num! min) + ) + ) + ) + ((let ((v1-108 (ja-group))) + (and v1-108 (or (= v1-108 prebot-sword-R-vertical-pre-ja) + (= v1-108 prebot-sword-L-vertical-pre-ja) + (= v1-108 prebot-swords-vertical-pre-ja) + ) + ) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (let ((f0-18 (vector-vector-distance-squared (the-as vector (-> self position)) (-> self position value))) + (f1-0 1024.0) + ) + (cond + ((< f0-18 (* f1-0 f1-0)) + (let ((v1-124 (ja-group))) + (cond + ((and v1-124 (= v1-124 prebot-swords-vertical-pre-ja)) + (ja-channel-push! 1 (seconds 0.02)) + (ja :group! prebot-swords-R-vertical-strike-ja :num! min) + ) + (else + (let ((v1-134 (ja-group))) + (cond + ((and v1-134 (= v1-134 prebot-sword-R-vertical-pre-ja)) + (ja-channel-push! 1 (seconds 0.02)) + (ja :group! prebot-sword-R-vertical-strike-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.02)) + (ja :group! prebot-sword-L-vertical-strike-ja :num! min) + ) + ) + ) + ) + ) + ) + ) + ((let ((v1-149 (ja-group))) + (and v1-149 (= v1-149 prebot-swords-vertical-pre-ja)) + ) + (ja-channel-push! 1 (seconds 0.02)) + (ja :group! prebot-swords-vertical-hold-ja :num! min) + ) + (else + (let ((v1-159 (ja-group))) + (cond + ((and v1-159 (= v1-159 prebot-sword-R-vertical-pre-ja)) + (ja-channel-push! 1 (seconds 0.02)) + (ja :group! prebot-sword-R-vertical-hold-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.02)) + (ja :group! prebot-sword-R-vertical-hold-ja :num! min) + ) + ) + ) + ) + ) + ) + ) + ) + ((let ((v1-174 (ja-group))) + (and (and v1-174 (or (= v1-174 prebot-sword-R-vertical-hold-ja) + (= v1-174 prebot-sword-L-vertical-hold-ja) + (= v1-174 prebot-swords-vertical-hold-ja) + ) + ) + (let ((f0-25 (vector-vector-distance-squared (the-as vector (-> self position)) (-> self position value))) + (f1-3 1024.0) + ) + (< f0-25 (* f1-3 f1-3)) + ) + ) + ) + (let ((v1-182 (ja-group))) + (cond + ((and v1-182 (= v1-182 prebot-swords-vertical-hold-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-R-vertical-strike-ja :num! min) + ) + (else + (let ((v1-192 (ja-group))) + (cond + ((and v1-192 (= v1-192 prebot-sword-R-vertical-hold-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-vertical-strike-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-vertical-strike-ja :num! min) + ) + ) + ) + ) + ) + ) + ) + ((let ((v1-207 (ja-group))) + (and v1-207 (or (= v1-207 prebot-sword-R-vertical-strike-ja) + (= v1-207 prebot-sword-L-vertical-strike-ja) + (= v1-207 prebot-swords-L-vertical-strike-ja) + (= v1-207 prebot-swords-R-vertical-strike-ja) + ) + ) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (prebot-spawn-shockwave) + (+! (-> self num-attacks) -1) + (cond + ((zero? (-> self num-attacks)) + (go-virtual slam-done) + ) + ((let ((v1-227 (ja-group))) + (and v1-227 (= v1-227 prebot-swords-R-vertical-strike-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-R-vertical-between-ja :num! min) + ) + ((let ((v1-237 (ja-group))) + (and v1-237 (= v1-237 prebot-swords-L-vertical-strike-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-L-vertical-between-ja :num! min) + ) + (else + (let ((v1-247 (ja-group))) + (cond + ((and v1-247 (= v1-247 prebot-sword-R-vertical-strike-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-vertical-between-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-vertical-between-ja :num! min) + ) + ) + ) + ) + ) + ) + ) + ((let ((v1-262 (ja-group))) + (and v1-262 (or (= v1-262 prebot-sword-R-vertical-between-ja) + (= v1-262 prebot-sword-L-vertical-between-ja) + (= v1-262 prebot-swords-R-vertical-between-ja) + (= v1-262 prebot-swords-L-vertical-between-ja) + ) + ) + ) + (ja :num! (seek!)) + (when (ja-done? 0) + (let ((v1-276 (ja-group))) + (cond + ((and v1-276 (= v1-276 prebot-swords-R-vertical-between-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-L-vertical-strike-ja :num! min) + ) + ((let ((v1-286 (ja-group))) + (and v1-286 (= v1-286 prebot-swords-L-vertical-between-ja)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-swords-R-vertical-strike-ja :num! min) + ) + (else + (let ((v1-296 (ja-group))) + (cond + ((and v1-296 (= v1-296 prebot-sword-R-vertical-between-ja)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-R-vertical-strike-ja :num! min) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-sword-L-vertical-strike-ja :num! min) + ) + ) + ) + ) + ) + ) + ) + ) + (else + (ja :num! (loop!)) + ) + ) + ) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate pre-slam (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self laugh-played) #f) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 prebot-idle-ja)) + (ja :num! (loop!)) + (when (and (not (-> self laugh-played)) (or (and (= (-> self stage) 1) (>= (ja-aframe-num 0) 3.0)) + (and (= (-> self stage) 2) (>= (ja-aframe-num 0) 4.0)) + (and (= (-> self stage) 3) (>= (ja-aframe-num 0) 5.0)) + ) + ) + (set-time! (-> self laugh-timer)) + (set! (-> self laugh-played) #t) + (sound-play "prebot-laugh" :position (-> self root trans)) + ) + (if (or (-> self laugh-played) (time-elapsed? (-> self state-time) (seconds 0.25))) + (go-virtual slam) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-idle-ja :num! min) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate jump-to-hover (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (when (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status bit-13)))) + (talker-spawn-func (-> *talker-speech* 326) *entity-pool* (target-pos 0) (the-as region #f)) + (process-entity-status! self (entity-perm-status bit-13) #t) + ) + ) + :trans (behavior () + (let ((v1-2 (ja-group))) + (cond + ((and v1-2 (= v1-2 prebot-jump-to-hover-ja)) + (ja :num! (seek!)) + (if (or (ja-done? 0) (< -40.0 (ja-aframe-num 0))) + (go-virtual pre-slam) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! prebot-jump-to-hover-ja :num! min) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate hidden (prebot) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (remove-setting! 'point-of-interest) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (if (task-node-closed? (game-task-node mine-boss-introduction)) + (prebot-go-next-stage) + ) + (set-time! (-> self state-time)) + ) + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate test (prebot) + :virtual #t + :event prebot-handler + :enter (behavior () + (set-time! (-> self state-time)) + (cond + ((zero? (-> self nav)) + (format #t "ERROR: ~s nav mesh not found~%" (-> self name)) + ) + (else + (let ((gp-0 (new 'stack-no-clear 'enemy-init-by-other-params))) + (let ((v1-4 (new 'stack-no-clear 'vector))) + (set! (-> v1-4 quad) (-> self nav state mesh bounds quad)) + (set! (-> gp-0 trans quad) (-> v1-4 quad)) + ) + (quaternion-copy! (-> gp-0 quat) (-> self root quat)) + (set! (-> gp-0 entity) (-> self entity)) + (set! (-> gp-0 directed?) #f) + (set! (-> gp-0 no-initial-move-to-ground?) #f) + (set! (-> gp-0 art-level) #f) + (process-spawn + prebot-large-eco-creature + :init enemy-init-by-other + self + gp-0 + :name "prebot-large-eco-creature" + :to self + ) + ) + ) + ) + (ja-channel-push! 1 0) + (ja :group! prebot-idle-ja :num! min) + (set! (-> self position target z) (+ -61440.0 (-> self original-position z))) + ) + :trans (behavior () + (if (and (time-elapsed? (-> self state-time) (seconds 0.017)) (cpad-pressed? 1 x)) + (go-virtual test) + ) + (ja :num! (loop!)) + (show-maya-skeleton self -1 #x45800000) + (let ((gp-0 (handle->process (-> self gun)))) + (cond + ((>= (ja-aframe-num 0) 60.0) + (if (not gp-0) + (set! (-> self gun) + (ppointer->handle (process-spawn prebot-gun "gun-" (-> self root trans) :name "prebot-gun" :to self)) + ) + ) + ) + (gp-0 + (deactivate gp-0) + ) + ) + ) + (prebot-common) + ) + :code sleep-code + :post (behavior () + (transform-post) + (do-push-aways (-> self root)) + ) + ) + +;; definition for method 15 of type hud-prebot +;; WARN: Return type mismatch int vs none. +(defmethod draw ((this hud-prebot)) + (set-hud-piece-position! + (the-as hud-sprite (-> this sprites)) + (the int (+ 472.0 (* 130.0 (-> this offset)))) + 150 + ) + (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) -9 70) + (case (-> this values 0 current) + ((1) + (set! (-> this sprites 4 scale-x) 6.0) + (set! (-> this sprites 4 color x) 0) + (set! (-> this sprites 4 color y) 255) + (set! (-> this sprites 4 color z) 0) + 0 + ) + ((2) + (set! (-> this sprites 4 scale-x) 4.0) + (set! (-> this sprites 4 color x) 128) + (set! (-> this sprites 4 color y) 128) + (set! (-> this sprites 4 color z) 0) + 0 + ) + (else + (set! (-> this sprites 4 scale-x) 2.0) + (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)) -8 68) + (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) -51 68) + (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -12 68) + ((method-of-type hud draw) this) + 0 + (none) + ) + +;; definition for method 16 of type hud-prebot +;; WARN: Return type mismatch int vs none. +(defmethod update-values! ((this hud-prebot)) + (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-prebot +;; WARN: Return type mismatch int vs none. +(defmethod init-callback ((this hud-prebot)) + (set! (-> this level) (level-get *level* 'mined)) + (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-caveboss-01 mined-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-caveboss-health-01 mined-minimap))) + (set! (-> this sprites 4 scale-x) 1.0) + (set! (-> this sprites 4 scale-y) 0.5) + (set! (-> this sprites 4 flags) (hud-sprite-flags hsf2)) + (set! (-> this sprites 3 tid) (the-as texture-id (get-texture hud-small-frame-01 mined-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 mined-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 mined-minimap))) + (set! (-> this sprites 1 scale-x) 10.0) + (set! (-> this sprites 1 scale-y) 1.0) + (set! (-> this sprites 1 flags) (hud-sprite-flags hsf2)) + 0 + (none) + ) + +;; definition of type task-manager-prebot +(deftype task-manager-prebot (task-manager) + ((manager-entity entity) + (check-timer time-frame) + ) + ) + +;; definition for method 3 of type task-manager-prebot +(defmethod inspect ((this task-manager-prebot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (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)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate active (task-manager-prebot) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type task-manager active) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self check-timer) 0) + 0 + ) + ) + +;; definition for method 26 of type task-manager-prebot +;; WARN: Return type mismatch time-frame vs none. +(defmethod task-manager-method-26 ((this task-manager-prebot)) + (let ((t9-0 (method-of-type task-manager task-manager-method-26))) + (t9-0 this) + ) + (when (and (not (-> this manager-entity)) (time-elapsed? (-> this check-timer) (seconds 0.1))) + (let* ((a0-3 "prebot-2") + (v1-6 (entity-by-name a0-3)) + ) + (when v1-6 + (set! (-> this manager-entity) v1-6) + (set! (-> this hud-counter) + (ppointer->handle (process-spawn hud-prebot :init hud-init-by-other :name "hud-prebot" :to this)) + ) + ) + ) + (set-time! (-> this check-timer)) + ) + (none) + ) + +;; definition for method 21 of type task-manager-prebot +(defmethod set-time-limit ((this task-manager-prebot)) + (let ((t9-0 (method-of-type task-manager set-time-limit))) + (t9-0 this) + ) + (set! (-> this manager-entity) #f) + (set-setting! 'music 'mineboss 0.0 0) + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/mine/rat_REF.gc b/test/decompiler/reference/jak3/levels/mine/rat_REF.gc new file mode 100644 index 0000000000..1ffc9e541a --- /dev/null +++ b/test/decompiler/reference/jak3/levels/mine/rat_REF.gc @@ -0,0 +1,2128 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-rat rat rat-lod0-jg -1 + ((rat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :shadow rat-shadow-mg + :origin-joint-index 18 + ) + +;; definition of type rat +(deftype rat (nav-enemy) + ((init-quat quaternion :inline) + (roll-transform transformq :inline) + (face-dir vector :inline) + (flee-focus-pos vector :inline) + (wheel-actor entity-actor) + (permanently-scared symbol) + (slide-sound-id uint32) + (scared-timer time-frame) + (scared-interval time-frame) + (return-to-nav-mesh? symbol) + ) + (:state-methods + wait-by-wheel-seek + wait-by-wheel-wait + active-turn + attack + flee-stare + undefined + running-in-wheel + wheel-die + ) + ) + +;; definition for method 3 of type rat +(defmethod inspect ((this rat)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tinit-quat: #~%" (-> this init-quat)) + (format #t "~2Troll-transform: #~%" (-> this roll-transform)) + (format #t "~2Tface-dir: #~%" (-> this face-dir)) + (format #t "~2Tflee-focus-pos: #~%" (-> this flee-focus-pos)) + (format #t "~2Twheel-actor: ~A~%" (-> this wheel-actor)) + (format #t "~2Tpermanently-scared: ~A~%" (-> this permanently-scared)) + (format #t "~2Tslide-sound-id: ~D~%" (-> this slide-sound-id)) + (format #t "~2Tscared-timer: ~D~%" (-> this scared-timer)) + (format #t "~2Tscared-interval: ~D~%" (-> this scared-interval)) + (format #t "~2Treturn-to-nav-mesh?: ~A~%" (-> this return-to-nav-mesh?)) + (label cfg-4) + this + ) + +;; definition for symbol *fact-info-rat-defaults*, type fact-info-enemy-defaults +(define *fact-info-rat-defaults* (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80))) + +;; definition for symbol *rat-nav-enemy-info*, type nav-enemy-info +(define *rat-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 7 + (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 3 + :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 3 + :param2 '((new 'static 'bfloat :data 0.75) (new 'static 'bfloat :data 1.5)) + ) + (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 + :command (idle-control-cmd play) + :anim #x3 + :param0 2 + :param1 5 + :param2 '((new 'static 'bfloat :data 0.75) (new 'static 'bfloat :data 1.5)) + ) + (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 6 + :notice-anim 5 + :hostile-anim 11 + :hit-anim 6 + :knocked-anim 16 + :knocked-land-anim 17 + :die-anim 24 + :die-falling-anim 24 + :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 6 + :sound-hit (static-sound-name "rat-squeal") + :sound-die (static-sound-name "rat-die") + :notice-distance (meters 40) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 5) + :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.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 49152.0 + :knocked-soft-vxz-hi 77824.0 + :knocked-soft-vy-lo 65536.0 + :knocked-soft-vy-hi 102400.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.9898 :y 0.0756 :z 0.1191 :w 16871.352) + :scale (new 'static 'vector :x 1.0 :y 1.0 :z 1.0) + :bg-collide-with (collide-spec backgnd obstacle hit-by-others-list pusher) + :joint-setup (new 'static 'boxed-array :type ragdoll-joint-setup + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9975 :y 0.0623 :z -0.0291 :w 23209.137) + :geo-tform (new 'static 'vector :x 1.0 :w 12952.898) + :axial-slop 1800.5653 + :max-angle 3301.7039 + :coll-rad 2231.0913 + :hit-sound (static-sound-name "rat-bf") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 3 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9999 :z 0.0004 :w 32758.518) + :geo-tform (new 'static 'vector :x 1.0 :z 0.0004 :w 32768.02) + :axial-slop 1800.5653 + :max-angle 3299.4827 + :coll-rad 1563.4432 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7428 :y -0.0498 :z 0.6675 :w 33924.785) + :geo-tform (new 'static 'vector :x 0.6487 :y 0.4895 :z 0.5825 :w 43181.707) + :axial-slop 1800.5653 + :max-angle 4193.594 + :coll-rad 1294.7456 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.1409 :y -0.1438 :z 0.9794 :w 5063.1294) + :geo-tform (new 'static 'vector :x 0.7137 :y 0.3672 :z 0.5963 :w 41407.32) + :axial-slop 1800.5653 + :max-angle 4537.8584 + :coll-rad 1197.6704 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.4227 :y 0.5005 :z 0.7554 :w 43021.234) + :geo-tform (new 'static 'vector :x -0.48 :y -0.8771 :z 0.0154 :w 16837.107) + :axial-slop 1800.5653 + :max-angle 4537.8584 + :coll-rad 1030.144 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint 6 + :pre-tform (new 'static 'vector :x -0.4637 :y -0.5607 :z 0.6859 :w 24477.533) + :geo-tform (new 'static 'vector :x -0.5132 :y -0.0929 :z 0.8532 :w 39898.88) + :axial-slop 1800.5653 + :max-angle 4806.5015 + :coll-rad 991.6416 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.5308 :y -0.0302 :z -0.8469 :w 9008.215) + :geo-tform (new 'static 'vector :x 0.8575 :y 0.4582 :z -0.2339 :w 23058.24) + :axial-slop 1800.5653 + :max-angle 3692.2073 + :coll-rad 1030.144 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9113 :y 0.3345 :z -0.2396 :w 9324.316) + :geo-tform (new 'static 'vector :x -0.6075 :y 0.6787 :z 0.4125 :w 11790.964) + :axial-slop 1800.5653 + :max-angle 3223.1514 + :coll-rad 1030.144 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5485 :y 0.0296 :z 0.8355 :w 8436.723) + :geo-tform (new 'static 'vector :x -0.5367 :y 0.8135 :z 0.2236 :w 9872.307) + :axial-slop 1800.5653 + :max-angle 2035.4388 + :coll-rad 697.5488 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7012 :y -0.0152 :z 0.7127 :w 6800.543) + :geo-tform (new 'static 'vector :x 0.7478 :y -0.0492 :z 0.662 :w 16398.764) + :axial-slop 1800.5653 + :max-angle 3487.4438 + :coll-rad 556.2368 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.4697 :y 0.169 :z 0.8664 :w 9123.412) + :geo-tform (new 'static 'vector :x 0.8284 :y -0.482 :z 0.2849 :w 23692.027) + :axial-slop 1800.5653 + :max-angle 3475.6653 + :coll-rad 1030.144 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8702 :y -0.3516 :z 0.3448 :w 9364.0205) + :geo-tform (new 'static 'vector :x -0.5482 :y -0.7233 :z -0.4196 :w 12565.746) + :axial-slop 1800.5653 + :max-angle 3745.783 + :coll-rad 1030.144 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5319 :y -0.3084 :z -0.7885 :w 8845.867) + :geo-tform (new 'static 'vector :x -0.6153 :y -0.7608 :z -0.2061 :w 8654.2295) + :axial-slop 1800.5653 + :max-angle 2274.791 + :coll-rad 757.76 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.8155 :y -0.1199 :z -0.5661 :w 6821.0957) + :geo-tform (new 'static 'vector :x 0.7005 :y 0.2295 :z -0.6757 :w 16967.252) + :axial-slop 1800.5653 + :max-angle 3639.3962 + :coll-rad 397.7216 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -0.9985 :y -0.0463 :z 0.0288 :w 11897.897) + :geo-tform (new 'static 'vector :x -0.997 :y 0.0705 :z 0.0292 :w 8203.996) + :axial-slop 1800.5653 + :max-angle 3417.666 + :coll-rad 1127.2192 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3436 :y -0.9382 :z 0.0401 :w 1372.5969) + :geo-tform (new 'static 'vector :x -0.984 :y 0.1534 :z 0.0897 :w 11190.399) + :axial-slop 1800.5653 + :max-angle 3380.966 + :coll-rad 1597.8496 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3309 :y 0.0632 :z -0.9415 :w 15700.951) + :geo-tform (new 'static 'vector :x 0.7557 :y 0.568 :z 0.3258 :w 34107.156) + :axial-slop 1800.5653 + :max-angle 3795.7178 + :coll-rad 1286.144 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9673 :y -0.2207 :z 0.1243 :w 10359.821) + :geo-tform (new 'static 'vector :x 0.7738 :y -0.299 :z 0.5583 :w 23514.645) + :axial-slop 1800.5653 + :max-angle 3626.18 + :coll-rad 1030.144 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.4253 :y -0.0324 :z 0.9044 :w 21694.164) + :geo-tform (new 'static 'vector :x -0.816 :y -0.3366 :z -0.4697 :w 21449.367) + :axial-slop 1800.5653 + :max-angle 3774.4185 + :coll-rad 591.4624 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5431 :y -0.0261 :z -0.8392 :w 19577.861) + :geo-tform (new 'static 'vector :x 0.4968 :y -0.8225 :z 0.2766 :w 11542.782) + :axial-slop 1800.5653 + :max-angle 2293.8694 + :coll-rad 626.2784 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5367 :y 0.0778 :z 0.8401 :w 6345.687) + :geo-tform (new 'static 'vector :x -0.62 :y -0.7018 :z -0.3505 :w 13527.996) + :axial-slop 1800.5653 + :max-angle 2710.7876 + :coll-rad 445.2352 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint 18 + :pre-tform (new 'static 'vector :x 0.9719 :y -0.1118 :z -0.2067 :w 4947.2944) + :geo-tform (new 'static 'vector :x 0.9852 :y 0.1266 :z -0.1151 :w 13674.414) + :axial-slop 1800.5653 + :max-angle 1986.9968 + :coll-rad 1030.144 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3961 :y -0.884 :z -0.248 :w 1440.9546) + :geo-tform (new 'static 'vector :x -0.4417 :y 0.8968 :z 0.0222 :w 3241.5017) + :axial-slop 1800.5653 + :max-angle 2815.7542 + :coll-rad 791.3472 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7521 :y -0.6312 :z 0.1891 :w 1846.6588) + :geo-tform (new 'static 'vector :x 0.1732 :y 0.9842 :z -0.0343 :w 4142.276) + :axial-slop 1800.5653 + :max-angle 3795.7178 + :coll-rad 760.2176 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5148 :y -0.8218 :z -0.2441 :w 1278.8622) + :geo-tform (new 'static 'vector :x 0.0427 :y 0.999 :z -0.0107 :w 5133.7627) + :axial-slop 1800.5653 + :max-angle 4537.8584 + :coll-rad 575.0784 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.1457 :y -0.9851 :z -0.0908 :w 1308.1167) + :geo-tform (new 'static 'vector :x -0.0891 :y 0.9956 :z 0.0283 :w 6443.0444) + :axial-slop 1800.5653 + :max-angle 5359.261 + :coll-rad 513.2288 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint 18 + :pre-tform (new 'static 'vector :x -0.084 :y 0.0546 :z 0.9949 :w 15687.553) + :geo-tform (new 'static 'vector :x 0.7291 :y -0.57 :z -0.3786 :w 33257.48) + :axial-slop 1800.5653 + :max-angle 3678.281 + :coll-rad 1030.144 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7243 :y 0.6445 :z -0.2448 :w 13605.893) + :geo-tform (new 'static 'vector :x 0.9233 :y 0.1682 :z -0.345 :w 22198.062) + :axial-slop 1800.5653 + :max-angle 3652.5945 + :coll-rad 931.0208 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8853 :y 0.1044 :z -0.4529 :w 21871.893) + :geo-tform (new 'static 'vector :x -0.9877 :y 0.0861 :z 0.1303 :w 19674.363) + :axial-slop 1800.5653 + :max-angle 3709.101 + :coll-rad 675.4304 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9484 :y -0.0508 :z 0.3126 :w 19602.928) + :geo-tform (new 'static 'vector :x 0.8427 :y 0.5037 :z -0.1896 :w 7369.013) + :axial-slop 1800.5653 + :max-angle 3767.8103 + :coll-rad 740.5568 + :hit-sound (static-sound-name "rat-ragdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 33 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8652 :y -0.2236 :z -0.4486 :w 6495.9824) + :geo-tform (new 'static 'vector :x -0.854 :y 0.4607 :z 0.2416 :w 10556.411) + :axial-slop 1800.5653 + :max-angle 2548.5496 + :coll-rad 1030.144 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 34 + :parent-joint 6 + :pre-tform (new 'static 'vector :x 0.5956 :y -0.5418 :z 0.5929 :w 18988.164) + :geo-tform (new 'static 'vector :x -0.75 :y -0.6581 :z -0.0655 :w 2752.0388) + :axial-slop 1800.5653 + :max-angle 4537.8584 + :coll-rad 1277.1328 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 35 + :parent-joint 7 + :pre-tform (new 'static 'vector :x -0.8792 :y 0.2318 :z -0.4161 :w 7033.5786) + :geo-tform (new 'static 'vector :x -0.0562 :y -0.9874 :z -0.1475 :w 16494.428) + :axial-slop 1800.5653 + :max-angle 4537.8584 + :coll-rad 744.2432 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 36 + :parent-joint 8 + :pre-tform (new 'static 'vector :x -0.5619 :y -0.0979 :z 0.8213 :w 6875.181) + :geo-tform (new 'static 'vector :x -0.5163 :y -0.1113 :z 0.8491 :w 33034.82) + :axial-slop 1800.5653 + :max-angle 4537.8584 + :coll-rad 645.5296 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 37 + :parent-joint 6 + :pre-tform (new 'static 'vector :x 0.8388 :y -0.5396 :z -0.0716 :w 22881.477) + :geo-tform (new 'static 'vector :x -0.0691 :y 0.6797 :z 0.7301 :w 12063.759) + :axial-slop 1800.5653 + :max-angle 4537.8584 + :coll-rad 1030.144 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 38 + :parent-joint 6 + :pre-tform (new 'static 'vector :x 0.2823 :y -0.5464 :z 0.7884 :w 23099.492) + :geo-tform (new 'static 'vector :x 0.9118 :y -0.3801 :z 0.1549 :w 29933.094) + :axial-slop 1800.5653 + :max-angle 4537.8584 + :coll-rad 1030.144 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 39 + :parent-joint 12 + :pre-tform (new 'static 'vector :x -0.7122 :y 0.0482 :z 0.7002 :w 7344.5103) + :geo-tform (new 'static 'vector :x 0.5743 :y 0.7856 :z -0.2297 :w 9826.541) + :axial-slop 1800.5653 + :max-angle 4537.8584 + :coll-rad 1135.8208 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 40 + :parent-joint 16 + :pre-tform (new 'static 'vector :x -0.755 :y 0.3048 :z -0.5805 :w 6001.295) + :geo-tform (new 'static 'vector :x 0.9264 :y 0.104 :z 0.3618 :w 38196.477) + :axial-slop 1800.5653 + :max-angle 4537.8584 + :coll-rad 1147.6992 + ) + ) + ) + :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 10 + :turn-anim -1 + :run-anim 11 + :taunt-anim -1 + :run-travel-speed (meters 8) + :run-acceleration (meters 6) + :run-turning-acceleration (meters 60) + :walk-travel-speed (meters 3) + :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! (-> *rat-nav-enemy-info* fact-defaults) *fact-info-rat-defaults*) + +;; definition for method 120 of type rat +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this rat)) + (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)) + (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 can-ride deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 4915.2 0.0 10240.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 can-ride)) + (set-vector! (-> v1-13 local-sphere) 0.0 819.2 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-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list pusher) + ) + (set-vector! (-> v1-15 local-sphere) 0.0 4956.16 0.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 solid no-standon)) + (set! (-> v1-17 transform-index) 4) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 1228.8 3276.8) + ) + (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 solid deadly no-standon)) + (set! (-> v1-19 transform-index) 34) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 1228.8 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 action) (collide-action solid no-standon)) + (set! (-> v1-21 transform-index) 18) + (set-vector! (-> v1-21 local-sphere) 0.0 0.0 0.0 2867.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 enemy)) + (set! (-> v1-23 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-23 transform-index) 25) + (set-vector! (-> v1-23 local-sphere) 0.0 0.0 0.0 1638.4) + ) + (set! (-> s5-0 nav-radius) 8192.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 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for function rat-run-code +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior rat-run-code rat () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! rat-run0-ja + :num! (seek! max (lerp-scale 0.5 1.333 (vector-length (-> self root transv)) 0.0 32768.0)) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (lerp-scale 0.5 1.333 (vector-length (-> self root transv)) 0.0 32768.0))) + ) + ) + #f + (none) + ) + +;; definition for function rat-falling-post +(defbehavior rat-falling-post rat () + (nav-enemy-falling-post) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (rat) + :virtual #t + :enter (behavior () + (if (enemy-method-109 self) + (go-virtual die) + ) + (let ((t9-3 (-> (find-parent-state) enter))) + (if t9-3 + (t9-3) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate ambush (rat) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy ambush) enter))) + (if t9-0 + (t9-0) + ) + ) + (logior! (-> self focus-status) (focus-status dangerous)) + (set-vector! (-> self draw color-mult) 0.0 0.0 0.0 1.0) + (let ((v1-8 self)) + (set! (-> v1-8 enemy-flags) (the-as enemy-flag (logclear (-> v1-8 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-8 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let ((v1-11 self)) + (set! (-> v1-11 enemy-flags) (the-as enemy-flag (logclear (-> v1-11 enemy-flags) (enemy-flag ef38)))) + ) + 0 + (set-time! (-> self state-time)) + (logclear! (-> self enemy-flags) (enemy-flag alert)) + (let ((s5-0 (new 'stack-no-clear 'collide-query)) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (let ((a0-8 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (vector+float*! gp-0 (-> self root trans) a0-8 32768.0) + ) + (if (enemy-above-ground? self s5-0 gp-0 (collide-spec backgnd) 8192.0 81920.0 1024.0) + (set! (-> gp-0 y) (-> s5-0 best-other-tri intersect y)) + ) + (set! (-> self root gspot-pos quad) (-> gp-0 quad)) + ) + (sound-play "rat-spawner") + ) + :exit (behavior () + (set-vector! (-> self draw color-mult) 1.0 1.0 1.0 1.0) + (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* ((v1-2 (- (current-time) (-> self state-time))) + (f0-1 (fmin 1.0 (* 0.0016666667 (the float v1-2)))) + ) + (set-vector! (-> self draw color-mult) f0-1 f0-1 f0-1 1.0) + ) + 0 + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! rat-pipe-jump0-start-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 1.0) + (vector-v++! (-> self root trans) (-> self root transv)) + (suspend) + (ja :num! (seek!)) + ) + (ja-no-eval :group! rat-pipe-jump0-end-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) + (cond + ((>= (-> self root gspot-pos y) (-> self root trans y)) + (set! (-> self root trans y) (-> self root gspot-pos y)) + ) + (else + (vector-v++! + (-> self root transv) + (compute-acc-due-to-gravity (-> self root) (new 'stack-no-clear 'vector) (-> self enemy-info slip-factor)) + ) + (vector-v++! (-> self root trans) (-> self root transv)) + ) + ) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! rat-idle-stand-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-hostile self) + ) + :post (behavior () + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate active (rat) + :virtual #t + :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 + (nav-enemy-method-176 self) + (set-look-at-mode! self 2) + (let ((gp-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (f0-1 (* 4096.0 (rnd-float-range self 8.0 20.0))) + ) + (vector+float*! (-> self move-dest) (-> self root trans) gp-0 f0-1) + ) + (closest-point-on-mesh (-> self nav) (-> self move-dest) (-> self move-dest) (the-as nav-poly #f)) + (let ((a0-22 (-> self nav state)) + (v1-18 (-> self move-dest)) + ) + (logclear! (-> a0-22 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-22 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-22 target-pos quad) (-> v1-18 quad)) + ) + 0 + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (if (< (vector-vector-distance (-> self root trans) (-> self move-dest)) 8192.0) + (go-virtual active-turn) + ) + (ja-no-eval :group! rat-walk0-ja + :num! (seek! max (lerp-scale 0.0 1.0 (vector-length (-> self root transv)) 0.0 12288.0)) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max (lerp-scale 0.0 1.0 (vector-length (-> self root transv)) 0.0 12288.0))) + ) + ) + #f + ) + :post (behavior () + (nav-enemy-travel-post) + ) + ) + +;; failed to figure out what this is: +(defstate active-turn (rat) + :virtual #t + :parent (rat active) + :enter (behavior () + (local-vars (v1-20 symbol)) + (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 + (nav-enemy-method-176 self) + (set-look-at-mode! self 2) + (let ((gp-0 (-> self root trans))) + (let ((s5-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + (f30-0 0.0) + ) + (until v1-20 + (+! f30-0 (* 182.04445 (rnd-float-range self 42.0 198.0))) + (vector-rotate-around-y! s4-0 s5-0 f30-0) + (vector+float*! s3-0 gp-0 s4-0 24576.0) + (closest-point-on-mesh (-> self nav) s2-0 s3-0 (the-as nav-poly #f)) + (set! v1-20 (or (>= 2048.0 (vector-vector-distance s2-0 s3-0)) (>= f30-0 65536.0))) + ) + (vector-rotate-around-y! (-> self face-dir) s5-0 f30-0) + ) + (vector+float*! (-> self move-dest) gp-0 (-> self face-dir) 24576.0) + ) + ) + :trans (behavior () + (let ((a0-0 (method-of-type nav-enemy active))) + (when a0-0 + (let ((t9-0 (-> a0-0 trans))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (if (enemy-method-103 self (-> self face-dir) 1820.4445) + (go-virtual active) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (until #f + (cond + ((< 0.0 (deg-diff (quaternion-y-angle (-> self root quat)) (vector-y-angle (-> self face-dir)))) + (ja-no-eval :group! rat-turn-left-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :group! rat-turn-right-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + #f + ) + :post (behavior () + (seek-toward-heading-vec! + (-> self root) + (-> self face-dir) + (* 0.5 (-> self nav max-rotation-rate)) + (seconds 0.02) + ) + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate notice (rat) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy notice) enter))) + (if t9-0 + (t9-0) + ) + ) + (stop-look-at! 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! rat-walk-to-sit-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (seek-to-point-toward-point! + (-> self root) + (-> self focus-pos) + (-> self nav max-rotation-rate) + (seconds 0.02) + ) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (ja-no-eval :group! rat-sit-to-alert-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set-look-at-mode! self 1) + (dotimes (gp-0 (set-reaction-time! self (seconds 0.007) (seconds 0.015))) + (ja-no-eval :group! rat-sit-alert-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (ja-no-eval :group! rat-sit-to-run-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 wait-by-wheel-seek (rat) + :virtual #t + :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 + (nav-enemy-method-177 self) + (set-time! (-> self state-time)) + (let ((v1-9 (-> self nav))) + (set! (-> v1-9 sphere-mask) (the-as uint #x1000fe)) + ) + 0 + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (if (< (vector-vector-xz-distance (-> self root trans) (-> self move-dest)) 8192.0) + (go-virtual wait-by-wheel-wait) + ) + ) + ) + :code rat-run-code + :post (behavior () + (let ((gp-0 (new 'stack-no-clear 'vector))) + (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) 'wait-pos) + (set! (-> a1-0 param 0) (the-as uint gp-0)) + (let ((t9-0 send-event-function) + (v1-3 (-> self wheel-actor)) + ) + (if (not (t9-0 + (if v1-3 + (-> v1-3 extra process) + ) + a1-0 + ) + ) + (set! (-> gp-0 quad) (-> self wheel-actor extra trans quad)) + ) + ) + ) + (closest-point-on-mesh (-> self nav) (-> self move-dest) gp-0 (the-as nav-poly #f)) + ) + (let ((a0-7 (-> self nav state)) + (v1-11 (-> self move-dest)) + ) + (logclear! (-> a0-7 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-7 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-7 target-pos quad) (-> v1-11 quad)) + ) + 0 + (nav-enemy-method-187 self) + ) + ) + +;; failed to figure out what this is: +(defstate wait-by-wheel-wait (rat) + :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 + (nav-enemy-method-178 self) + (vector-reset! (-> self root transv)) + (set-look-at-mode! self 1) + ) + :code (behavior () + (until #f + (when (not (enemy-method-105 self 4551.1113 #t)) + (let ((v1-3 self)) + (set! (-> v1-3 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-3 enemy-flags)))) + ) + 0 + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! rat-turn-left-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!)) + ) + (let ((v1-19 self)) + (set! (-> v1-19 enemy-flags) (the-as enemy-flag (logclear (-> v1-19 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + (let ((v1-23 (ja-group))) + (if (not (and v1-23 (= v1-23 rat-idle-stand-ja))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (ja-no-eval :group! rat-idle-stand-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post nav-enemy-stare-post + ) + +;; failed to figure out what this is: +(defstate hostile (rat) + :virtual #t + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (and (time-elapsed? (-> self state-time) (-> self reaction-time)) + (and (< (vector-vector-xz-distance (-> self focus-pos) (-> self root trans)) 20480.0) (get-focus! self)) + ) + (go-virtual attack) + ) + ) + :code rat-run-code + ) + +;; failed to figure out what this is: +(defstate attack (rat) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (logior! (-> self focus-status) (focus-status dangerous)) + (set-time! (-> self scared-timer)) + (set! (-> self scared-interval) (seconds 3)) + ) + :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)) + (ja-no-eval :group! rat-run0-ja :num! (seek! max 1.5) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max 1.5)) + ) + (go-best-state self) + ) + :post nav-enemy-chase-post + ) + +;; failed to figure out what this is: +(defstate flee (rat) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy flee) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-look-at-mode! self 2) + ) + :code rat-run-code + ) + +;; failed to figure out what this is: +(defstate flee-stare (rat) + :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 ef38)))) + ) + 0 + (set-look-at-mode! self 1) + (set! (-> self flee-focus-pos quad) (-> self focus-pos quad)) + ) + :trans (behavior () + (when (time-elapsed? (-> self state-time) (seconds 1)) + (if (and (handle->process (-> self focus handle)) + (< 12288.0 (vector-vector-distance (-> self flee-focus-pos) (-> self focus-pos))) + ) + (go-virtual flee) + ) + ) + ) + :code (behavior () + (until #f + (when (not (enemy-method-105 self 4551.1113 #t)) + (let ((v1-3 self)) + (set! (-> v1-3 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-3 enemy-flags)))) + ) + 0 + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! rat-turn-left-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!)) + ) + (let ((v1-19 self)) + (set! (-> v1-19 enemy-flags) (the-as enemy-flag (logclear (-> v1-19 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + (let ((v1-23 (ja-group))) + (if (not (and v1-23 (= v1-23 rat-idle-stand-ja))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (ja-no-eval :group! rat-idle-stand-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 stare (rat) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy stare) enter))) + (if t9-0 + (t9-0) + ) + ) + (set-look-at-mode! self 1) + ) + :code (behavior () + (until #f + (when (not (enemy-method-105 self 4551.1113 #t)) + (let ((v1-3 self)) + (set! (-> v1-3 enemy-flags) (the-as enemy-flag (logior (enemy-flag ef38) (-> v1-3 enemy-flags)))) + ) + 0 + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! rat-turn-left-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!)) + ) + (let ((v1-19 self)) + (set! (-> v1-19 enemy-flags) (the-as enemy-flag (logclear (-> v1-19 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + (let ((v1-23 (ja-group))) + (if (not (and v1-23 (= v1-23 rat-idle-stand-ja))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (ja-no-eval :group! rat-idle-stand-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate knocked (rat) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked) enter))) + (if t9-0 + (t9-0) + ) + ) + (if (nonzero? (-> self slide-sound-id)) + (sound-stop (the-as sound-id (-> self slide-sound-id))) + ) + ) + :post (behavior () + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate knocked-recover (rat) + :virtual #t + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy knocked-recover) exit))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self return-to-nav-mesh?) #t) + ) + :trans #f + :code (behavior () + (cond + ((handle->process (-> self ragdoll-proc)) + (vector-reset! (-> self root transv)) + (try-locate-ground self (meters 10) (meters 10) #t (collide-spec backgnd)) + (ja-channel-push! 1 0) + (ja-no-eval :group! rat-ground-to-run-ja :num! (seek!) :frame-num 0.0) + (let ((gp-0 (-> (the-as ragdoll-proc (-> self ragdoll-proc process 0)) ragdoll))) + (enable-ragdoll! gp-0 self) + (quaternion-copy! (-> self root quat) (the-as quaternion (-> gp-0 ragdoll-joints))) + ) + (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) 'inside?) + (let ((t9-5 send-event-function) + (v1-31 (-> self wheel-actor)) + ) + (when (t9-5 + (if v1-31 + (-> v1-31 extra process) + ) + a1-6 + ) + (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) 'claim-wheel?) + (let ((t9-6 send-event-function) + (v1-37 (-> self wheel-actor)) + ) + (if (t9-6 + (if v1-37 + (-> v1-37 extra process) + ) + a1-7 + ) + (go-virtual running-in-wheel) + (go-virtual die) + ) + ) + ) + ) + ) + ) + (let ((f30-0 0.12)) + (ja-channel-push! 1 (the-as time-frame (the int (* 300.0 f30-0)))) + (ja-no-eval :group! rat-ground-to-run-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((gp-1 (new 'stack-no-clear 'quaternion)) + (f28-0 (lerp-scale 0.0 1.0 (the float (- (current-time) (-> self state-time))) 0.0 (* 300.0 f30-0))) + ) + (forward-up-nopitch->quaternion + gp-1 + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + *y-vector* + ) + (quaternion-slerp! (-> self root quat) (-> self root quat) gp-1 f28-0) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! rat-on-back-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (if (enemy-method-109 self) + (go-die self) + (go-virtual flee) + ) + ) + :post rat-falling-post + ) + +;; failed to figure out what this is: +(defstate running-in-wheel (rat) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (logclear! (-> self enemy-flags) (enemy-flag trackable)) + (logclear! (-> self enemy-flags) (enemy-flag vulnerable)) + (let ((gp-0 (-> self parent 0 child))) + (while gp-0 + (if (!= gp-0 self) + (send-event (ppointer->process gp-0) 'scared) + ) + (set! gp-0 (-> gp-0 0 brother)) + ) + ) + (let ((v1-18 (-> self root root-prim))) + (logclear! (-> v1-18 prim-core action) (collide-action can-ride)) + (dotimes (a0-6 (the-as int (-> v1-18 specific 0))) + (logclear! (-> (the-as collide-shape-prim-group v1-18) child a0-6 prim-core action) (collide-action can-ride)) + ) + ) + ) + :trans (behavior () + (let ((v1-0 (-> self wheel-actor))) + (if (not (if v1-0 + (-> v1-0 extra process) + ) + ) + (go empty-state) + ) + ) + (if (and (time-elapsed? (-> self state-time) (seconds 8)) + (< 204800.0 (vector-vector-xz-distance (-> self root trans) (target-pos 0))) + ) + (go-virtual wheel-die) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! rat-ground-to-run-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (ja-channel-push! 1 (seconds 0.1)) + (let ((f30-0 2.0)) + (until #f + (ja-no-eval :group! rat-run-wheel0-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (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) 'turn) + (let* ((t9-6 send-event-function) + (v1-41 (-> self wheel-actor)) + (a0-6 (if v1-41 + (-> v1-41 extra process) + ) + ) + ) + (t9-6 a0-6 a1-5) + ) + ) + (set! f30-0 (seek f30-0 1.5 (* 0.1 (seconds-per-frame)))) + (suspend) + (ja :num! (seek! max f30-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) 1) + (set! (-> a1-0 message) 'run-dir) + (set! (-> a1-0 param 0) (the-as uint (new 'stack-no-clear 'vector))) + (let* ((t9-0 send-event-function) + (v1-4 (-> self wheel-actor)) + (a1-1 (t9-0 + (if v1-4 + (-> v1-4 extra process) + ) + a1-0 + ) + ) + ) + (seek-toward-heading-vec! (-> self root) (the-as vector a1-1) (-> self nav max-rotation-rate) (seconds 0.02)) + ) + ) + (let ((gp-0 (-> self root)) + (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) 'run-pos) + (set! (-> a1-2 param 0) (the-as uint (-> gp-0 trans))) + (set! (-> a1-2 param 1) (the-as uint (new 'stack-no-clear 'vector))) + (let* ((t9-2 send-event-function) + (v1-14 (-> self wheel-actor)) + (s5-0 (t9-2 + (if v1-14 + (-> v1-14 extra process) + ) + a1-2 + ) + ) + (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) 'run-up) + (set! (-> a1-3 param 0) (the-as uint (-> gp-0 trans))) + (set! (-> a1-3 param 1) (the-as uint (new 'stack-no-clear 'vector))) + (let* ((t9-3 send-event-function) + (v1-21 (-> self wheel-actor)) + (s4-0 (t9-3 + (if v1-21 + (-> v1-21 extra process) + ) + a1-3 + ) + ) + ) + (vector-seek! (-> gp-0 trans) (the-as vector s5-0) (* 10240.0 (seconds-per-frame))) + (let ((s5-1 (new 'stack-no-clear 'quaternion))) + (forward-up-nopitch->quaternion + s5-1 + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> gp-0 quat)) + (the-as vector s4-0) + ) + (quaternion-slerp! (-> gp-0 quat) (-> gp-0 quat) s5-1 (* 4.0 (seconds-per-frame))) + ) + ) + ) + ) + 0 + (transform-post) + ) + ) + +;; failed to figure out what this is: +(defstate wheel-die (rat) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (logclear! (-> self enemy-flags) (enemy-flag vulnerable vulnerable-backup)) + (logclear! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logclear! (-> self enemy-flags) (enemy-flag attackable attackable-backup)) + (logclear! (-> self mask) (process-mask actor-pause)) + (logclear! (-> self enemy-flags) (enemy-flag actor-pause-backup)) + (logior! (-> self focus-status) (focus-status dead)) + (if (-> self skel effect) + (logior! (-> self skel effect flags) (effect-control-flag ecf1)) + ) + (stop-look-at! self) + (let ((v1-24 (-> self root root-prim))) + (set! (-> v1-24 prim-core collide-as) (collide-spec)) + (set! (-> v1-24 prim-core collide-with) (collide-spec)) + ) + 0 + (set-time! (-> self state-time)) + (send-event (ppointer->process (-> self parent)) 'die) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! rat-run-wheel0-die-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (send-event self 'death-end) + (cleanup-for-death self) + ) + :post nav-enemy-simple-post + ) + +;; definition for function rat-joint-mod-roll +;; WARN: Return type mismatch vector vs none. +(defun rat-joint-mod-roll ((arg0 cspace) (arg1 transformq)) + (let ((gp-0 (-> arg0 param1))) + (cspace<-parented-transformq-joint! arg0 arg1) + (vector+! + (-> arg0 bone transform trans) + (-> arg0 bone transform trans) + (the-as vector (-> (the-as rat gp-0) roll-transform)) + ) + ) + (none) + ) + +;; definition for method 108 of type rat +(defmethod enemy-method-108 ((this rat) (arg0 process-focusable)) + (or (not (time-elapsed? (-> this scared-timer) (-> this scared-interval))) (-> this permanently-scared)) + ) + +;; definition for method 109 of type rat +(defmethod enemy-method-109 ((this rat)) + (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) 'near?) + (let ((t9-0 send-event-function) + (v1-2 (-> this wheel-actor)) + ) + (when (not (t9-0 + (if v1-2 + (-> v1-2 extra process) + ) + a1-0 + ) + ) + (let ((s5-0 (-> this root)) + (gp-0 (new 'stack-no-clear 'vector)) + (v1-6 (-> this nav state)) + ) + (new 'stack-no-clear 'vector) + (or (not (closest-point-on-mesh (-> v1-6 nav) gp-0 (-> s5-0 trans) (the-as nav-poly #f))) + (< 24576.0 (vector-vector-xz-distance (-> s5-0 trans) gp-0)) + (< (-> s5-0 trans y) (+ -16384.0 (-> gp-0 y))) + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 89 of type rat +(defmethod within-gspot-range? ((this rat)) + (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) 'near?) + (let ((t9-0 send-event-function) + (v1-2 (-> this wheel-actor)) + ) + (if (not (t9-0 + (if v1-2 + (-> v1-2 extra process) + ) + a1-0 + ) + ) + ((method-of-type nav-enemy within-gspot-range?) this) + ) + ) + ) + ) + ) + +;; definition for method 125 of type rat +(defmethod ragdoll-settled? ((this rat)) + (with-pp + (and (or (time-elapsed? (-> this state-time) (seconds 3)) (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) 'inside?) + (let ((t9-0 send-event-function) + (v1-6 (-> this wheel-actor)) + ) + (t9-0 + (if v1-6 + (-> v1-6 extra process) + ) + a1-0 + ) + ) + ) + ) + (call-parent-method this) + ) + ) + ) + +;; definition for method 56 of type rat +;; WARN: Return type mismatch float vs object. +(defmethod knocked-handler ((this rat) (arg0 vector)) + (get-knockback-dir! this arg0) + (let ((f30-0 (rnd-float-range this 0.9 1.0))) + (let ((f0-0 0.0) + (f1-0 98304.0) + ) + (vector-float*! arg0 arg0 (lerp f0-0 f1-0 f30-0)) + ) + (set! (-> arg0 y) (lerp 0.0 73728.0 f30-0)) + ) + ) + +;; definition for method 63 of type rat +(defmethod enemy-method-63 ((this rat) (arg0 float)) + (if (= (-> this hit-points) (-> this enemy-info default-hit-points)) + 1.0 + 0.0 + ) + ) + +;; definition for method 142 of type rat +;; WARN: Return type mismatch int vs knocked-type. +(defmethod penetrate->knocked-type ((this rat) (arg0 penetrate)) + (the-as knocked-type (cond + ((logtest? arg0 (penetrate vehicle)) + 7 + ) + ((logtest? (penetrate jak-blue-shot) arg0) + 6 + ) + ((logtest? (penetrate dark-bomb dark-smack) arg0) + 3 + ) + ((logtest? (penetrate explode jak-dark-shot enemy-dark-shot) arg0) + 2 + ) + (else + 0 + ) + ) + ) + ) + +;; definition for method 78 of type rat +(defmethod go-hostile ((this rat)) + (if (logtest? (-> this fact enemy-options) (enemy-option user8)) + (go (method-of-object this wait-by-wheel-seek)) + (go (method-of-object this hostile)) + ) + ) + +;; definition for method 67 of type rat +(defmethod coin-flip? ((this rat)) + #f + ) + +;; definition for method 59 of type rat +;; INFO: Used lq/sq +(defmethod enemy-common-post ((this rat)) + (let ((a0-2 (handle->process (-> this focus handle)))) + (if a0-2 + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable a0-2) 3) quad)) + ) + ) + (when (-> this return-to-nav-mesh?) + (format *stdebug* "~s ~d off nav-mesh~%" (-> this name) (-> this pid)) + (when (enemy-method-109 this) + (set! (-> this return-to-nav-mesh?) #f) + (go-die this) + ) + (let ((s5-2 (new 'stack-no-clear 'vector)) + (s4-0 (-> this root)) + ) + (if (and (closest-point-on-mesh (-> this nav state nav) s5-2 (-> s4-0 trans) (the-as nav-poly #f)) + (< (vector-vector-xz-distance (-> s4-0 trans) s5-2) 409.6) + (< (fabs (- (-> s4-0 trans y) (-> s5-2 y))) 8192.0) + ) + (set! (-> this return-to-nav-mesh?) #f) + ) + ) + ) + ((method-of-type nav-enemy enemy-common-post) this) + (none) + ) + +;; definition for method 50 of type rat +;; WARN: Return type mismatch int vs none. +(defmethod enemy-method-50 ((this rat) (arg0 int)) + (let ((v1-0 arg0)) + (cond + ((= v1-0 1) + (let ((v1-4 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 1))) + (set! (-> v1-4 prim-core action) (collide-action solid)) + (set! (-> v1-4 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list pusher) + ) + ) + ) + ((or (= v1-0 2) (zero? v1-0)) + (let ((v1-8 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 1))) + (set! (-> v1-8 prim-core action) (collide-action)) + (set! (-> v1-8 prim-core collide-with) (collide-spec)) + ) + 0 + ) + ) + ) + (none) + ) + +;; definition for method 20 of type rat +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this rat)) + (the-as search-info-flag 8) + ) + +;; definition for method 82 of type rat +;; INFO: Used lq/sq +(defmethod event-handler ((this rat) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-5 object)) + (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) + (go (method-of-object this knocked)) + #t + ) + (('rat?) + #t + ) + (('scared) + (set! v0-5 #t) + (set! (-> this permanently-scared) (the-as symbol v0-5)) + v0-5 + ) + (('trans) + (set! v0-5 (-> arg3 param 0)) + (set! (-> (the-as vector v0-5) quad) (-> this root trans quad)) + v0-5 + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 10 of type rat +(defmethod deactivate ((this rat)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this slide-sound-id)) + (sound-stop (the-as sound-id (-> this slide-sound-id))) + ) + (call-parent-method this) + (none) + ) + +;; definition for method 121 of type rat +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this rat)) + (with-pp + (rlet ((vf0 :class vf)) + (init-vf0-vector) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-rat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *rat-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 15473.777 0.0 1.0) + (set! (-> v1-5 ignore-angle) 30947.555) + ) + (set! (-> this align) (new 'process 'align-control this)) + (set! (-> this slide-sound-id) (the-as uint (new-sound-id))) + (set! (-> this wheel-actor) (entity-actor-lookup (-> this entity) 'alt-actor 0)) + (.svf (&-> (-> this roll-transform) trans quad) vf0) + (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) 'running?) + (let ((t9-6 send-event-function) + (v1-11 (-> this wheel-actor)) + ) + (set! (-> this permanently-scared) (the-as symbol (t9-6 + (if v1-11 + (-> v1-11 extra process) + ) + a1-8 + ) + ) + ) + ) + ) + (set! (-> this scared-timer) 0) + (set! (-> this scared-interval) 0) + (set! (-> this return-to-nav-mesh?) #f) + 0 + (none) + ) + ) + ) + +;; definition of type rat-spawner +(deftype rat-spawner (process) + ((rats-spawned uint32) + (wheel-entity entity-actor) + (state-time time-frame) + (active? symbol) + (rats-to-spawn uint32) + (actor-group (pointer actor-group)) + (actor-group-count int32) + ) + (:state-methods + idle + die + ) + ) + +;; definition for method 3 of type rat-spawner +(defmethod inspect ((this rat-spawner)) + (when (not this) + (set! this this) + (goto cfg-7) + ) + (let ((t9-0 (method-of-type process inspect))) + (t9-0 this) + ) + (format #t "~2Trats-spawned: ~D~%" (-> this rats-spawned)) + (format #t "~2Twheel-entity: ~A~%" (-> this wheel-entity)) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (format #t "~2Tactive?: ~A~%" (-> this active?)) + (format #t "~2Trats-to-spawn: ~D~%" (-> this rats-to-spawn)) + (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 (rat-spawner) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('die) + (go-virtual die) + ) + (('child-die) + (let ((v0-0 (the-as object (max 0 (the-as int (+ (-> self rats-spawned) -1)))))) + (set! (-> self rats-spawned) (the-as uint v0-0)) + v0-0 + ) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self active?) #f) + ) + :code sleep-code + :post (behavior () + (local-vars (v1-19 symbol) (v1-37 symbol)) + (when (and (time-elapsed? (-> self state-time) (seconds 0.5)) + (< (-> self rats-spawned) (-> self rats-to-spawn)) + (or (-> self active?) (< (vector-vector-xz-distance (-> self entity extra trans) (target-pos 0)) 163840.0)) + ) + (set! (-> self active?) #t) + (if (logtest? (-> self wheel-entity extra perm status) (entity-perm-status subtask-complete)) + (go-virtual die) + ) + (dotimes (v1-18 (-> self actor-group-count)) + (dotimes (a0-6 (-> self actor-group v1-18 length)) + (let ((a1-4 (-> self actor-group v1-18 data a0-6 actor))) + (when (if a1-4 + (-> a1-4 extra process) + ) + (set! v1-19 #f) + (goto cfg-23) + ) + ) + ) + ) + (set! v1-19 #t) + (label cfg-23) + (when (and v1-19 + (begin + (let ((gp-1 (-> self entity extra trans)) + (s5-1 (-> self child)) + ) + (while s5-1 + (let ((a1-11 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-11 from) (process->ppointer self)) + (set! (-> a1-11 num-params) 1) + (set! (-> a1-11 message) 'trans) + (set! (-> a1-11 param 0) (the-as uint (new 'stack-no-clear 'vector))) + (let ((s4-0 (the-as vector (send-event-function (ppointer->process s5-1) a1-11)))) + (when (and s4-0 (< (vector-vector-xz-distance gp-1 s4-0) 40960.0) (< (fabs (- (-> s4-0 y) (-> gp-1 y))) 16384.0)) + (set! v1-37 #t) + (goto cfg-44) + ) + ) + ) + (set! s5-1 (-> s5-1 0 brother)) + ) + ) + (set! v1-37 #f) + (label cfg-44) + (not v1-37) + ) + ) + (let ((s5-2 (-> self entity)) + (gp-2 (new 'stack-no-clear 'enemy-init-by-other-params)) + ) + (set! (-> gp-2 trans quad) (-> s5-2 extra trans quad)) + (quaternion-copy! (-> gp-2 quat) (-> s5-2 quat)) + (set! (-> gp-2 entity) s5-2) + (set! (-> gp-2 directed?) #f) + (set! (-> gp-2 no-initial-move-to-ground?) #f) + (set! (-> gp-2 art-level) #f) + (let ((s5-3 (get-process *default-dead-pool* rat #x4000 1))) + (if (ppointer->handle (when s5-3 + (let ((t9-7 (method-of-type process activate))) + (t9-7 s5-3 self "rat" (the-as pointer #x70004000)) + ) + (run-now-in-process s5-3 enemy-init-by-other self gp-2) + (-> s5-3 ppointer) + ) + ) + (+! (-> self rats-spawned) 1) + ) + ) + ) + ) + (set-time! (-> self state-time)) + ) + ) + ) + +;; failed to figure out what this is: +(defstate die (rat-spawner) + :virtual #t + :enter (behavior () + (logior! (-> self entity extra perm status) (entity-perm-status subtask-complete)) + ) + :code (behavior () + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (while (-> self child) + (suspend) + ) + (process-entity-status! self (entity-perm-status dead) #t) + ) + ) + +;; definition for method 11 of type rat-spawner +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this rat-spawner) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (set! (-> this wheel-entity) (entity-actor-lookup (-> this entity) 'alt-actor 0)) + (set! (-> this rats-spawned) (the-as uint 0)) + (set! (-> this rats-to-spawn) + (res-lump-value (-> this entity) 'extra-id uint :default (the-as uint128 1) :time -1000000000.0) + ) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-2 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-2 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-2)) + (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 (logtest? (-> arg0 extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this die)) + (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 0000000000..d60dc966e3 --- /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/nest-scenes_REF.gc b/test/decompiler/reference/jak3/levels/nest/nest-scenes_REF.gc new file mode 100644 index 0000000000..8e4b1f21d4 --- /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 0000000000..09b8172d9f --- /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 0000000000..5bc2aa3f32 --- /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 0000000000..42395960f0 --- /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 0000000000..3c245a5ca8 --- /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 0000000000..76a1fbfae5 --- /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 0000000000..7f5d1d96e9 --- /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 0000000000..6e065b85f1 --- /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 0000000000..fe9d46b979 --- /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 0000000000..94dc5f90e9 --- /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/jump-pad_REF.gc b/test/decompiler/reference/jak3/levels/sewer/jump-pad_REF.gc new file mode 100644 index 0000000000..462c4d2be0 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/jump-pad_REF.gc @@ -0,0 +1,176 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type jump-pad +(deftype jump-pad (bouncer) + ((fan-quat quaternion :inline) + (rot-vel float) + (fan-loop-sound-id sound-id) + (fan-loop-sound sound-spec) + (jump-sound sound-spec) + ) + (:methods + (get-skel (_type_) art-group) + (get-fan-joint-idx (_type_) int) + (init-sounds (_type_) none) + ) + ) + +;; definition for method 3 of type jump-pad +(defmethod inspect ((this jump-pad)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type bouncer inspect))) + (t9-0 this) + ) + (format #t "~2Tfan-quat: #~%" (-> this fan-quat)) + (format #t "~2Trot-vel: ~f~%" (-> this rot-vel)) + (format #t "~2Tfan-loop-sound-id: ~D~%" (-> this fan-loop-sound-id)) + (format #t "~2Tfan-loop-sound: ~A~%" (-> this fan-loop-sound)) + (format #t "~2Tjump-sound: ~A~%" (-> this jump-sound)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (jump-pad) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual fire) + ) + (('attack) + (let ((v1-3 (the-as object (-> block param 1))) + (a0-3 (-> block param 0)) + (a2-1 0) + ) + 0.0 + (let ((f30-0 (-> self spring-height))) + (cond + ((= (-> (the-as attack-info v1-3) mode) 'flop) + (set! a2-1 1) + ) + ((= (-> (the-as attack-info v1-3) mode) 'board) + (set! a2-1 9) + ) + ) + (when (and (nonzero? a2-1) (and ((method-of-type touching-shapes-entry prims-touching?) + (the-as touching-shapes-entry a0-3) + (-> self root) + (the-as uint a2-1) + ) + (send-event proc 'jump f30-0 f30-0 (-> self mods)) + ) + ) + (sound-play "trampoline") + (go-virtual fire) + #f + ) + ) + ) + ) + (else + ((-> (method-of-type bouncer idle) event) proc argc message block) + ) + ) + ) + :trans (behavior () + (seek! (-> self rot-vel) 10922.667 (* 21845.334 (seconds-per-frame))) + ) + :code (behavior () + (ja :group! (get-art-by-name (-> self draw art-group) "idle" art-joint-anim) :num! min) + (transform-post) + (sleep-code) + ) + :post (behavior () + (when (-> self fan-loop-sound) + (set! (-> self fan-loop-sound pitch-mod) + (the int (* 1524.0 (lerp-scale -0.9 0.6 (-> self rot-vel) 10922.667 87381.336))) + ) + (sound-play-by-spec (-> self fan-loop-sound) (-> self fan-loop-sound-id) (-> self root trans)) + ) + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate fire (jump-pad) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (seek! (-> self rot-vel) 87381.336 (* 87381.336 (seconds-per-frame))) + ) + :code (behavior () + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 178 (seconds 0.1)) + (if (-> self jump-sound) + (sound-play-by-spec (-> self jump-sound) (new-sound-id) (the-as vector #t)) + ) + (until (time-elapsed? (-> self state-time) (seconds 2)) + (suspend) + ) + (go-virtual idle) + ) + :post (behavior () + (when (-> self fan-loop-sound) + (set! (-> self fan-loop-sound pitch-mod) + (the int (* 1524.0 (lerp-scale -0.9 0.6 (-> self rot-vel) 10922.667 87381.336))) + ) + (sound-play-by-spec (-> self fan-loop-sound) (-> self fan-loop-sound-id) (-> self root trans)) + ) + (let ((t9-2 (-> (method-of-type bouncer fire) post))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + +;; definition for function jump-pad-joint-fan +;; WARN: Return type mismatch int vs none. +(defun jump-pad-joint-fan ((arg0 cspace) (arg1 quaternion)) + (let ((gp-0 (-> arg0 param1))) + (quaternion-rotate-local-y! + (-> (the-as jump-pad gp-0) fan-quat) + (-> (the-as jump-pad gp-0) fan-quat) + (* (-> (the-as jump-pad gp-0) rot-vel) (seconds-per-frame)) + ) + (quaternion-copy! (&+ arg1 16) (-> (the-as jump-pad gp-0) fan-quat)) + ) + (cspace<-parented-transformq-joint! arg0 (the-as transformq arg1)) + 0 + (none) + ) + +;; definition for method 23 of type jump-pad +;; WARN: Return type mismatch int vs none. +(defmethod bouncer-method-23 ((this jump-pad)) + (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) + (quaternion-copy! (-> this fan-quat) (-> this root quat)) + (let ((a0-6 (-> this node-list data (get-fan-joint-idx this)))) + (set! (-> a0-6 param0) (the-as (function cspace transformq none) jump-pad-joint-fan)) + (set! (-> a0-6 param1) this) + (set! (-> a0-6 param2) (the-as basic 0)) + ) + 0 + (none) + ) + +;; definition for method 11 of type jump-pad +(defmethod init-from-entity! ((this jump-pad) (arg0 entity-actor)) + (set! (-> this fan-loop-sound) #f) + (set! (-> this jump-sound) #f) + (init-sounds this) + (if (-> this fan-loop-sound) + (set! (-> this fan-loop-sound-id) (new-sound-id)) + ) + (call-parent-method this arg0) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/sewer/kg-hopper_REF.gc b/test/decompiler/reference/jak3/levels/sewer/kg-hopper_REF.gc new file mode 100644 index 0000000000..6319389dab --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/kg-hopper_REF.gc @@ -0,0 +1,1047 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type kg-hopper +(deftype kg-hopper (nav-enemy) + ((speed-y float) + (accel-y float) + (next-jump-time int32) + (path-intro path-control) + (can-go-knocked? symbol) + (land-anim-index int32) + (step-num int32) + (best-point vector :inline) + (best-score float) + (origin vector :inline) + (direction vector :inline) + (jump-dist float) + (side float) + (jump-start-anim uint32) + (jump-air-anim uint32) + (jump-land-anim uint32) + (jump-height-min float) + (jump-anim-start-frame float) + (minimap connection-minimap) + ) + (:state-methods + explode + ) + (:methods + (kg-hopper-method-191 (_type_) symbol) + (kg-hopper-method-192 () none) + (get-skel (_type_) art-group) + ) + ) + +;; definition for method 3 of type kg-hopper +(defmethod inspect ((this kg-hopper)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tspeed-y: ~f~%" (-> this speed-y)) + (format #t "~2Taccel-y: ~f~%" (-> this accel-y)) + (format #t "~2Tnext-jump-time: ~D~%" (-> this next-jump-time)) + (format #t "~2Tpath-intro: ~A~%" (-> this path-intro)) + (format #t "~2Tcan-go-knocked?: ~A~%" (-> this can-go-knocked?)) + (format #t "~2Tland-anim-index: ~D~%" (-> this land-anim-index)) + (format #t "~2Tstep-num: ~D~%" (-> this step-num)) + (format #t "~2Tbest-point: #~%" (-> this best-point)) + (format #t "~2Tbest-score: ~f~%" (-> this best-score)) + (format #t "~2Torigin: #~%" (-> this origin)) + (format #t "~2Tdirection: #~%" (-> this direction)) + (format #t "~2Tjump-dist: ~f~%" (-> this jump-dist)) + (format #t "~2Tside: ~f~%" (-> this side)) + (format #t "~2Tjump-start-anim: ~D~%" (-> this jump-start-anim)) + (format #t "~2Tjump-air-anim: ~D~%" (-> this jump-air-anim)) + (format #t "~2Tjump-land-anim: ~D~%" (-> this jump-land-anim)) + (format #t "~2Tjump-height-min: ~f~%" (-> this jump-height-min)) + (format #t "~2Tjump-anim-start-frame: ~f~%" (-> this jump-anim-start-frame)) + (format #t "~2Tminimap: #~%" (-> this minimap)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-kg-hopper kg-hopper kg-hopper-lod0-jg kg-hopper-idle-ja + ((kg-hopper-lod0-mg (meters 20)) (kg-hopper-lod1-mg (meters 999999))) + :bounds (static-spherem 0 1 0 3.5) + :shadow kg-hopper-shadow-mg + ) + +;; definition for symbol *kg-hopper-debris-params*, type debris-static-params +(define *kg-hopper-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 5 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 6 :group "skel-kg-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 7 :group "skel-kg-debris-d") + (new 'static 'debris-static-joint-params :parent-joint-index 8 :group "skel-kg-debris-a") + (new 'static 'debris-static-joint-params :parent-joint-index 9 :group "skel-kg-debris-b") + (new 'static 'debris-static-joint-params :parent-joint-index 10 :group "skel-kg-debris-c") + (new 'static 'debris-static-joint-params :parent-joint-index 11 :group "skel-kg-debris-d") + ) + :collide-spec (collide-spec backgnd) + :sound-hit (static-sound-name "kg-debris") + ) + ) + +;; definition of type kg-hopper-anim-info +(deftype kg-hopper-anim-info (structure) + ((hit-anim-index int32) + (land-anim-index int32) + ) + :pack-me + ) + +;; definition for method 3 of type kg-hopper-anim-info +(defmethod inspect ((this kg-hopper-anim-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'kg-hopper-anim-info) + (format #t "~1Thit-anim-index: ~D~%" (-> this hit-anim-index)) + (format #t "~1Tland-anim-index: ~D~%" (-> this land-anim-index)) + (label cfg-4) + this + ) + +;; definition of type kg-hopper-global-info +(deftype kg-hopper-global-info (basic) + ((prev-yellow-hit int8) + (prev-blue-hit int8) + (yellow-hit-anim kg-hopper-anim-info 3 :inline) + (blue-hit-anim kg-hopper-anim-info 3 :inline) + ) + ) + +;; definition for method 3 of type kg-hopper-global-info +(defmethod inspect ((this kg-hopper-global-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tprev-yellow-hit: ~D~%" (-> this prev-yellow-hit)) + (format #t "~1Tprev-blue-hit: ~D~%" (-> this prev-blue-hit)) + (format #t "~1Tyellow-hit-anim[3] @ #x~X~%" (-> this yellow-hit-anim)) + (format #t "~1Tblue-hit-anim[3] @ #x~X~%" (-> this blue-hit-anim)) + (label cfg-4) + this + ) + +;; definition for symbol *kg-hopper-global-info*, type kg-hopper-global-info +(define *kg-hopper-global-info* (new 'static 'kg-hopper-global-info + :yellow-hit-anim (new 'static 'inline-array kg-hopper-anim-info 3 + (new 'static 'kg-hopper-anim-info :hit-anim-index 25 :land-anim-index 26) + (new 'static 'kg-hopper-anim-info :hit-anim-index 27 :land-anim-index 28) + (new 'static 'kg-hopper-anim-info :hit-anim-index 29 :land-anim-index 30) + ) + :blue-hit-anim (new 'static 'inline-array kg-hopper-anim-info 3 + (new 'static 'kg-hopper-anim-info :hit-anim-index 21 :land-anim-index 24) + (new 'static 'kg-hopper-anim-info :hit-anim-index 22 :land-anim-index 24) + (new 'static 'kg-hopper-anim-info :hit-anim-index 23 :land-anim-index 24) + ) + ) + ) + +;; definition for method 85 of type kg-hopper +(defmethod knocked-anim ((this kg-hopper) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type blue-shot)) + (let* ((a2-0 (ash 1 (-> *kg-hopper-global-info* prev-blue-hit))) + (v1-3 (enemy-method-131 this 3 a2-0)) + (a1-5 (-> this draw art-group data (-> *kg-hopper-global-info* blue-hit-anim v1-3 hit-anim-index))) + ) + (set! (-> *kg-hopper-global-info* prev-blue-hit) v1-3) + (let ((a0-12 (-> this skel root-channel 0))) + (set! (-> a0-12 frame-group) (the-as art-joint-anim a1-5)) + (set! (-> a0-12 param 0) (the float (+ (-> (the-as art-joint-anim a1-5) frames num-frames) -1))) + (set! (-> a0-12 param 1) 1.0) + (set! (-> a0-12 frame-num) 0.0) + (joint-control-channel-group! a0-12 (the-as art-joint-anim a1-5) num-func-seek!) + ) + ) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (let* ((a2-2 (ash 1 (-> *kg-hopper-global-info* prev-yellow-hit))) + (v1-13 (enemy-method-131 this 3 a2-2)) + (a1-11 (-> this draw art-group data (-> *kg-hopper-global-info* yellow-hit-anim v1-13 hit-anim-index))) + ) + (set! (-> this land-anim-index) (-> *kg-hopper-global-info* yellow-hit-anim v1-13 land-anim-index)) + (set! (-> *kg-hopper-global-info* prev-yellow-hit) v1-13) + (let ((a0-27 (-> this skel root-channel 0))) + (set! (-> a0-27 frame-group) (the-as art-joint-anim a1-11)) + (set! (-> a0-27 param 0) (the float (+ (-> (the-as art-joint-anim a1-11) frames num-frames) -1))) + (set! (-> a0-27 param 1) (-> arg0 anim-speed)) + (set! (-> a0-27 frame-num) 0.0) + (joint-control-channel-group! a0-27 (the-as art-joint-anim a1-11) num-func-seek!) + ) + ) + ) + ) + #t + ) + +;; definition for method 86 of type kg-hopper +(defmethod knocked-land-anim ((this kg-hopper) (arg0 enemy-knocked-info)) + (cond + ((= (-> this incoming knocked-type) (knocked-type blue-shot)) + #f + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim (-> this draw art-group data (-> this land-anim-index)))) + (set! (-> a0-3 param 0) + (the float + (+ (-> (the-as art-joint-anim (-> this draw art-group data (-> this land-anim-index))) 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 (-> this land-anim-index))) + num-func-seek! + ) + ) + #t + ) + ) + ) + +;; definition for symbol *kg-hopper-nav-enemy-info*, type nav-enemy-info +(define *kg-hopper-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 5 + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x4 + :param0 1 + :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 #x5 + :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 #x4 + :param0 1 + :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 #x6 + :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 7 + :hostile-anim 4 + :hit-anim 4 + :knocked-anim 25 + :knocked-land-anim 26 + :die-anim 19 + :die-falling-anim 20 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 5 + :look-at-joint 5 + :bullseye-joint 4 + :sound-hit (static-sound-name "kg-impact") + :sound-die (static-sound-name "kg-explo") + :notice-distance (meters 40) + :notice-distance-delta (meters 40) + :proximity-notice-distance (meters 4) + :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.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 4551.1113 + :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 #t + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 4 + :turn-anim 9 + :run-anim 13 + :taunt-anim -1 + :run-travel-speed (meters 1) + :run-acceleration (meters 1) + :run-turning-acceleration (meters 2) + :walk-travel-speed (meters 1) + :walk-acceleration (meters 1) + :walk-turning-acceleration (meters 3) + :maximum-rotation-rate (degrees 720) + :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! (-> *kg-hopper-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; definition for method 81 of type kg-hopper +(defmethod go-die ((this kg-hopper)) + (go (method-of-object this explode)) + ) + +;; failed to figure out what this is: +(defstate explode (kg-hopper) + :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 "kg-explo") + ) + :code (behavior () + (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 scale-rand-lo) 0.5) + (set! (-> a1-1 scale-rand-hi) 1.2) + (set! (-> a1-1 fountain-rand-transv-lo quad) (-> self incoming attack-position quad)) + (debris-spawn self a1-1 *kg-hopper-debris-params* (the-as process-drawable #f)) + ) + (let ((v1-8 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node kg-hopper-lod0-jg chest)))) + (cond + ((logtest? (-> *part-group-id-table* 221 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-8 quad)) + (part-tracker-spawn part-tracker-subsampler :to self :group (-> *part-group-id-table* 221)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-8 quad)) + (part-tracker-spawn part-tracker :to self :group (-> *part-group-id-table* 221)) + ) + ) + ) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + ) + +;; definition for method 82 of type kg-hopper +(defmethod event-handler ((this kg-hopper) (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 explode)) + (go (method-of-object this knocked)) + ) + #t + ) + (('death-start) + (set! (-> this draw death-timer) (the-as uint 0)) + ((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 99 of type kg-hopper +;; INFO: Used lq/sq +(defmethod jump-anim-handler ((this kg-hopper) (arg0 int) (arg1 enemy-jump-info)) + (when (= (-> this jump-why) 2) + (cond + ((zero? arg0) + (logior! (-> this focus-status) (focus-status touch-water under-water)) + ) + (else + (when (focus-test? this touch-water) + (let ((s3-0 (new 'stack-no-clear 'water-info))) + (water-info-init! (-> this root) s3-0 (collide-action solid semi-solid)) + (let ((v1-7 #f)) + (cond + ((not (logtest? (water-flag touch-water) (-> s3-0 flags))) + (if (focus-test? this under-water) + (set! v1-7 #t) + ) + (logclear! (-> this focus-status) (focus-status touch-water under-water)) + ) + ((focus-test? this under-water) + (let ((f0-1 (+ 11264.0 (-> this root trans y)))) + (if (< (-> s3-0 trans y) f0-1) + (set! v1-7 #t) + ) + ) + ) + ) + (when v1-7 + (logclear! (-> this focus-status) (focus-status under-water)) + (let ((v1-10 (new 'stack-no-clear 'vector))) + (set! (-> v1-10 quad) (-> this root trans quad)) + (when (logtest? (water-flag touch-water) (-> s3-0 flags)) + (set! (-> v1-10 y) (-> s3-0 trans y)) + (cond + ((logtest? (-> *part-group-id-table* 192 flags) (sp-group-flag sp13)) + (set! (-> *launch-matrix* trans quad) (-> v1-10 quad)) + (part-tracker-spawn part-tracker-subsampler :to *entity-pool* :group (-> *part-group-id-table* 192)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> v1-10 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 192)) + ) + ) + (sound-play "splash-out") + ) + ) + ) + ) + ) + ) + ) + ) + ) + ((method-of-type nav-enemy jump-anim-handler) this arg0 arg1) + ) + +;; definition for method 98 of type kg-hopper +(defmethod jump-wind-up-anim ((this kg-hopper) (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 kg-hopper +(defmethod jump-in-air-anim ((this kg-hopper) (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 97 of type kg-hopper +(defmethod jump-land-anim ((this kg-hopper) (arg0 enemy-jump-info)) + (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 + ) + +;; failed to figure out what this is: +(defstate jump (kg-hopper) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy jump) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy jump) exit))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-5 (-> self draw shadow-ctrl))) + (logclear! (-> v1-5 settings flags) (shadow-flags shdf03)) + (let ((a0-2 v1-5)) + (set! (-> a0-2 settings top-plane w) (- 4096.0)) + ) + 0 + (set! (-> v1-5 settings bot-plane w) (- -4096.0)) + ) + 0 + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy jump) trans))) + (if t9-0 + (t9-0) + ) + ) + (let ((v1-5 (-> self draw shadow-ctrl))) + (logior! (-> v1-5 settings flags) (shadow-flags shdf03)) + (let ((a0-2 v1-5)) + (set! (-> a0-2 settings bot-plane w) (- (+ (- -4096.0 (-> self root trans y)) (-> self root gspot-pos y)))) + ) + 0 + (set! (-> v1-5 settings top-plane w) (- (+ (- 8192.0 (-> self root trans y)) (-> self root gspot-pos y)))) + ) + 0 + ) + ) + +;; definition for method 191 of type kg-hopper +;; INFO: Used lq/sq +(defmethod kg-hopper-method-191 ((this kg-hopper)) + (local-vars (sv-752 collide-query)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + ) + (init-vf0-vector) + (+! (-> this step-num) -1) + (cond + ((>= (-> this step-num) 0) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (vector-rotate-around-y! + s3-0 + (-> this direction) + (* 182.04445 (the float (+ (* (-> this step-num) 16) -135))) + ) + (let ((a1-1 s5-0)) + (let ((v1-7 (-> this origin))) + (let ((a0-2 s3-0)) + (let ((a2-1 (-> this jump-dist))) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-2 quad)) + ) + (.lvf vf4 (&-> v1-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 (&-> a1-1 quad) vf6) + ) + (let ((v1-8 (-> this nav)) + (a0-3 s5-0) + (a1-2 (new 'stack-no-clear 'nav-poly)) + ) + (vector-! (the-as vector (-> a1-2 vertex)) a0-3 (the-as vector (-> v1-8 state mesh bounds))) + (set! (-> a1-2 vertex1 x) (-> v1-8 nearest-y-threshold)) + (set! (-> a1-2 data 20) (the-as uint 2)) + (let ((s4-0 (nav-mesh-method-45 (-> v1-8 state mesh) a1-2))) + (when s4-0 + (let ((f30-0 (vector-dot s3-0 (-> this direction)))) + (new 'stack-no-clear 'vector) + (let ((a1-3 (new 'stack-no-clear 'vector))) + (set! (-> a1-3 quad) (-> s5-0 quad)) + (set! (-> a1-3 w) 6144.0) + (when (not (add-root-sphere-to-hash! (-> this nav) a1-3 #x10006c)) + (when (< (-> this best-score) f30-0) + (set! (-> this best-score) f30-0) + (let ((s2-0 (new 'stack-no-clear 'vector))) + (set! sv-752 (new 'stack-no-clear 'collide-query)) + (let ((s3-1 (new 'stack 'collide-query))) + (let ((s0-0 (-> this nav)) + (s1-0 s2-0) + ) + (let* ((v1-21 s5-0) + (a0-10 (-> s0-0 state mesh)) + (t9-4 (method-of-object a0-10 project-point-onto-plane-of-poly-local)) + (a2-5 s1-0) + (t0-1 (vector-! (new 'stack-no-clear 'vector) v1-21 (the-as vector (-> s0-0 state mesh bounds)))) + ) + (t9-4 a0-10 s4-0 a2-5 (the-as vector sv-752) t0-1) + ) + (vector+! s1-0 s1-0 (the-as vector (-> s0-0 state mesh bounds))) + ) + 0 + (set! (-> s5-0 y) (-> s2-0 y)) + (if (enemy-above-ground? this s3-1 s5-0 (collide-spec backgnd) 8192.0 81920.0 1024.0) + (set! (-> s5-0 y) (-> s3-1 best-other-tri intersect y)) + ) + ) + ) + (set! (-> this best-point quad) (-> s5-0 quad)) + ) + ) + ) + ) + ) + ) + ) + ) + #t + ) + (else + #f + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate stare (kg-hopper) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy stare) enter))) + (if t9-0 + (t9-0) + ) + ) + (nav-enemy-method-184 self) + ) + ) + +;; definition for symbol *kg-hopper-next-jump-time*, type time-frame +(define *kg-hopper-next-jump-time* (the-as time-frame 0)) + +;; failed to figure out what this is: +(defstate hostile (kg-hopper) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (nav-enemy-method-182 self) + (nav-enemy-method-183 self) + (set! (-> self speed-y) 0.0) + (set! (-> self accel-y) 0.0) + (set! (-> self next-jump-time) (the-as int (+ (current-time) (set-reaction-time! self 0 (seconds 0.4))))) + (set! (-> self step-num) 0) + (set! (-> self best-score) -2.0) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) exit))) + (if t9-0 + (t9-0) + ) + ) + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate active (kg-hopper) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy active) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + :code (behavior () + (nav-enemy-method-164 self) + (let ((v1-2 (new 'stack-no-clear 'vector))) + (let ((a2-0 (-> self nav state))) + (set! (-> v1-2 quad) (-> a2-0 target-pos quad)) + ) + (set! (-> self enemy-flags) + (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked))) + ) + (send-event self 'jump 2 v1-2) + ) + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate notice (kg-hopper) + :virtual #t + :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)) + ) + (if (zero? (rnd-int self 2)) + (ja :group! kg-hopper-notice-ja) + (ja :group! kg-hopper-notice-alt-ja) + ) + (ja-no-eval :group! (ja-group) :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (let ((a1-4 (-> self nav state))) + (set! (-> gp-0 quad) (-> a1-4 travel quad)) + ) + (seek-toward-heading-vec! (-> self root) gp-0 (-> self nav max-rotation-rate) (seconds 0.02)) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (go-best-state self) + ) + ) + +;; failed to figure out what this is: +(defstate ambush (kg-hopper) + :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! (-> self root backup-collide-as) (-> v1-12 prim-core collide-as)) + (set! (-> self root backup-collide-with) (-> v1-12 prim-core collide-with)) + ) + (let ((v1-15 (-> self root root-prim))) + (set! (-> v1-15 prim-core collide-as) (collide-spec)) + (set! (-> v1-15 prim-core collide-with) (collide-spec)) + ) + 0 + (when (handle->process (-> self focus handle)) + (let ((gp-1 (-> self root)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + 0.0 + (get-point-in-path! (-> self path-intro) s5-0 0.0 'exact) + (+! (-> s5-0 y) -16384.0) + (get-point-in-path! (-> self path-intro) s4-0 1.0 'exact) + (let ((f0-3 (deg-diff + (quaternion-y-angle (-> gp-1 quat)) + (vector-y-angle (vector-normalize! (vector-! (new 'stack-no-clear 'vector) s4-0 s5-0) 1.0)) + ) + ) + ) + (quaternion-rotate-y! (-> gp-1 quat) (-> gp-1 quat) f0-3) + ) + ) + (set! (-> gp-1 trans quad) (-> s5-0 quad)) + ) + ) + ) + :exit (behavior () + (let ((v1-1 (-> self root root-prim))) + (set! (-> v1-1 prim-core collide-as) (-> self root backup-collide-as)) + (set! (-> v1-1 prim-core collide-with) (-> self root backup-collide-with)) + ) + ) + :trans (behavior () + '() + ) + :code (behavior () + (logclear! (-> self draw status) (draw-control-status no-draw)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((s5-0 (new 'stack 'collide-query))) + (get-point-in-path! (-> self path-intro) gp-0 1.0 'exact) + (if (enemy-above-ground? self s5-0 gp-0 (collide-spec backgnd) 8192.0 81920.0 1024.0) + (set! (-> gp-0 y) (-> s5-0 best-other-tri intersect y)) + ) + ) + (set! (-> self enemy-flags) + (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked))) + ) + (send-event self 'jump 2 gp-0) + ) + (go-virtual hostile) + ) + ) + +;; definition for method 143 of type kg-hopper +(defmethod on-dying ((this kg-hopper)) + (when (-> this minimap) + (logior! (-> this minimap flags) (minimap-flag fade-out)) + (set! (-> this minimap) #f) + ) + (call-parent-method this) + (none) + ) + +;; definition for method 7 of type kg-hopper +(defmethod relocate ((this kg-hopper) (offset int)) + (if (nonzero? (-> this path-intro)) + (&+! (-> this path-intro) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 120 of type kg-hopper +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this kg-hopper)) + (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! (-> s4-0 transform-index) 12) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 9216.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 no-standon)) + (set-vector! (-> v1-14 local-sphere) 0.0 3686.4 0.0 3686.4) + ) + (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) 5) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 819.2 3276.8) + ) + (set! (-> s5-0 nav-radius) 4096.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 193 of type kg-hopper +(defmethod get-skel ((this kg-hopper)) + (art-group-get-by-name *level* "skel-kg-hopper" (the-as (pointer level) #f)) + ) + +;; definition for method 121 of type kg-hopper +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this kg-hopper)) + (stack-size-set! (-> this main-thread) 256) + (logior! (-> this mask) (process-mask kg-robot)) + (initialize-skeleton this (the-as skeleton-group (get-skel this)) (the-as pair 0)) + (set! (-> this skel generate-frame-function) create-interpolated2-joint-animation-frame) + (init-enemy-defaults! this *kg-hopper-nav-enemy-info*) + (set! (-> this can-go-knocked?) #t) + (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) 10922.667 12743.111 0.0 1.0) + (set! (-> v1-11 ignore-angle) 18204.445) + ) + (set! (-> this jump-start-anim) (the-as uint 10)) + (set! (-> this jump-air-anim) (the-as uint 13)) + (set! (-> this jump-land-anim) (the-as uint 14)) + (set! (-> this jump-height-min) 12288.0) + (set! (-> this jump-anim-start-frame) 8.0) + (set! (-> this land-anim-index) 26) + (set! (-> this side) (rnd-float-range this -1.5 1.5)) + (when (logtest? (enemy-option ambush) (-> this fact enemy-options)) + (set! (-> this path-intro) (new 'process 'path-control this 'intro 0.0 (-> this entity) #f)) + (if (-> this path-intro) + (logior! (-> this path-intro flags) (path-control-flag display draw-line draw-point draw-text)) + ) + ) + (logior! (-> this nav flags) (nav-control-flag output-sphere-hash)) + (let ((v1-32 (-> this nav))) + (set! (-> v1-32 speed-scale) 1.0) + ) + 0 + (set-gravity-length (-> this root dynam) 327680.0) + (let ((v1-37 (-> this nav))) + (set! (-> v1-37 nav-cull-radius) 61440.0) + ) + 0 + (set! (-> this fact pickup-type) (pickup-type ammo-light-random)) + (set! (-> this fact pickup-amount) 5.0) + (set! (-> this fact pickup-spawn-amount) 1.0) + (set! (-> this minimap) (add-icon! *minimap* this (the-as uint 108) (the-as int #f) (the-as vector #t) 0)) + 0 + (none) + ) diff --git a/test/decompiler/reference/jak3/levels/sewer/neo-grenadier_REF.gc b/test/decompiler/reference/jak3/levels/sewer/neo-grenadier_REF.gc new file mode 100644 index 0000000000..3496e9d228 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/neo-grenadier_REF.gc @@ -0,0 +1,1461 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-neo-grenadier-drip + :id 1523 + :duration (seconds 0.5) + :flags (sp0) + :bounds (static-bspherem 0 0 0 2) + :parts ((sp-item 5001 :fade-after (meters 140) :falloff-to (meters 140))) + ) + +;; failed to figure out what this is: +(defpart 5002 + :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: +(defskelgroup skel-neo-grenadier neo-grenadier neo-grenadier-lod0-jg -1 + ((neo-grenadier-lod0-mg (meters 20)) + (neo-grenadier-lod1-mg (meters 40)) + (neo-grenadier-lod2-mg (meters 999999)) + ) + :bounds (static-spherem 0 0 0 5) + :shadow neo-grenadier-shadow-mg + :origin-joint-index 4 + ) + +;; definition of type bank-info +(deftype bank-info (structure) + ((circle sphere :inline) + (tangent-pos vector :inline) + (final-pos vector :inline) + (final-dir vector :inline) + ) + ) + +;; definition for method 3 of type bank-info +(defmethod inspect ((this bank-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'bank-info) + (format #t "~1Tcircle: #~%" (-> this circle)) + (format #t "~1Ttangent-pos: #~%" (-> this tangent-pos)) + (format #t "~1Tfinal-pos: #~%" (-> this final-pos)) + (format #t "~1Tfinal-dir: #~%" (-> this final-dir)) + (label cfg-4) + this + ) + +;; definition of type neo-grenadier +(deftype neo-grenadier (nav-enemy) + ((shot-trajectory trajectory :inline) + (hostile-path path-control) + (bank bank-info :inline) + (joint joint-mod-blend-world) + (heading symbol) + (move-pos vector :inline) + (move-angle float) + (status-flags grenadier-status-flag) + (suppress-knockaside-timer time-frame) + ) + (:state-methods + attack + backup + spin-kick + ) + (:methods + (neo-grenadier-method-193 (_type_) none) + (set-bank-info! (_type_ vector) none) + (neo-grenadier-method-195 (_type_) none) + ) + ) + +;; definition for method 3 of type neo-grenadier +(defmethod inspect ((this neo-grenadier)) + (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 "~2Thostile-path: ~A~%" (-> this hostile-path)) + (format #t "~2Tbank: #~%" (-> this bank)) + (format #t "~2Tjoint: #~%" (-> this joint)) + (format #t "~2Theading: ~A~%" (-> this heading)) + (format #t "~2Tmove-pos: #~%" (-> this move-pos)) + (format #t "~2Tmove-angle: ~f~%" (-> this move-angle)) + (format #t "~2Tstatus-flags: ~D~%" (-> this status-flags)) + (format #t "~2Tsuppress-knockaside-timer: ~D~%" (-> this suppress-knockaside-timer)) + (label cfg-4) + this + ) + +;; definition for symbol *fact-info-neo-grenadier-defaults*, type fact-info-enemy-defaults +(define *fact-info-neo-grenadier-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9) + ) + +;; definition for symbol *neo-grenadier-nav-enemy-info*, type nav-enemy-info +(define *neo-grenadier-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 17 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 39) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 4 + :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 39) + (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 push) :param0 39) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 4 + :param1 6 + :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 + :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 push) :param0 39) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x5 + :param0 4 + :param1 8 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 39) + (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 push) :param0 39) + (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) + ) + :idle-anim 5 + :notice-anim 11 + :hostile-anim 13 + :hit-anim 23 + :knocked-anim 31 + :knocked-land-anim 32 + :die-anim 33 + :die-falling-anim 34 + :victory-anim 22 + :jump-wind-up-anim 5 + :jump-in-air-anim 5 + :jump-land-anim 5 + :neck-joint 24 + :look-at-joint 24 + :bullseye-joint 18 + :sound-hit (static-sound-name "grenadier-hit") + :sound-die (static-sound-name "grenadier-die") + :notice-distance (meters 80) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 20) + :default-hit-points 14.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 0.18204445 + :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 24 + :gem-seg #x2 + :gem-no-seg #x4 + :gem-offset (new 'static 'sphere :y 1802.24 :z 286.72 :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 9 + :turn-anim -1 + :run-anim 13 + :taunt-anim -1 + :run-travel-speed (meters 12) + :run-acceleration (meters 1) + :run-turning-acceleration (meters 50) + :walk-travel-speed (meters 2) + :walk-acceleration (meters 1) + :walk-turning-acceleration (meters 3) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 80) + :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! (-> *neo-grenadier-nav-enemy-info* fact-defaults) *fact-info-neo-grenadier-defaults*) + +;; definition for method 82 of type neo-grenadier +(defmethod event-handler ((this neo-grenadier) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit-knocked) + (when (= (-> this incoming knocked-type) (knocked-type yellow-shot)) + (if (and (not (time-elapsed? (-> this suppress-knockaside-timer) (seconds 0.6))) + (and (-> this next-state) (= (-> this next-state name) 'attack)) + (!= (-> this hit-points) 0.0) + ) + (return #t) + ) + (logior! (-> this status-flags) (grenadier-status-flag gsf0)) + (set-time! (-> this suppress-knockaside-timer)) + ) + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + (('notify) + (cond + ((and (= (-> arg3 param 0) 'attack) (= (-> arg3 param 1) *target*)) + (let ((v1-22 (new 'stack-no-clear 'event-message-block))) + (set! (-> v1-22 from) (process->ppointer arg0)) + (set! (-> v1-22 num-params) arg1) + (set! (-> v1-22 message) 'victory) + (set! (-> v1-22 param 0) (-> arg3 param 0)) + (set! (-> v1-22 param 1) (-> arg3 param 1)) + (set! (-> v1-22 param 2) (-> arg3 param 2)) + (set! (-> v1-22 param 3) (-> arg3 param 3)) + (set! (-> v1-22 param 4) (-> arg3 param 4)) + (set! (-> v1-22 param 5) (-> arg3 param 5)) + (send-event-function this v1-22) + ) + ) + (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) + ) + ) + ) + +;; definition for function pos-rotate-y<-vector+vector +(defun pos-rotate-y<-vector+vector ((arg0 vector) (arg1 vector)) + (let ((f0-0 (rotate-y<-vector+vector arg0 arg1))) + (if (< f0-0 0.0) + (+ 65536.0 f0-0) + f0-0 + ) + ) + ) + +;; definition for method 194 of type neo-grenadier +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs none. +(defmethod set-bank-info! ((this neo-grenadier) (arg0 vector)) + (closest-point-on-mesh (-> this nav) arg0 arg0 (the-as nav-poly #f)) + (set! (-> this bank final-pos quad) (-> arg0 quad)) + (set! (-> this bank tangent-pos quad) (-> arg0 quad)) + (set! (-> this move-pos quad) (-> this bank tangent-pos quad)) + (none) + ) + +;; definition for method 193 of type neo-grenadier +;; WARN: Return type mismatch int vs none. +(defmethod neo-grenadier-method-193 ((this neo-grenadier)) + (let ((s5-0 (handle->process (-> this focus handle)))) + (when s5-0 + (cond + ((-> this hostile-path) + (let* ((s4-0 (-> this hostile-path)) + (f30-0 (path-control-method-23 s4-0 (get-trans (the-as process-focusable s5-0) 0))) + (s3-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> this heading) (not (-> this heading))) + (let* ((f0-0 (rand-vu-float-range 0.2 0.45)) + (f0-1 (if (-> this heading) + (+ f30-0 f0-0) + (- f30-0 f0-0) + ) + ) + ) + (if (< f0-1 0.0) + (set! f0-1 (+ 1.0 f0-1)) + ) + (if (< 1.0 f0-1) + (set! f0-1 (+ -1.0 f0-1)) + ) + (get-point-at-percent-along-path! s4-0 s3-1 f0-1 'interp) + ) + (set-bank-info! this s3-1) + ) + ) + (else + (let* ((s4-1 (-> this root)) + (a0-10 (get-trans (the-as process-focusable s5-0) 0)) + (v1-27 (vector-! (new 'stack-no-clear 'vector) a0-10 (-> s4-1 trans))) + ) + (vector-length v1-27) + (let ((s3-2 (new 'stack-no-clear 'vector)) + (s2-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> this heading) (not (-> this heading))) + (if (-> this heading) + (set-vector! s3-2 (-> v1-27 z) (-> v1-27 y) (- (-> v1-27 x)) 1.0) + (set-vector! s3-2 (- (-> v1-27 z)) (-> v1-27 y) (-> v1-27 x) 1.0) + ) + (vector-normalize! s3-2 (* 4096.0 (rand-vu-float-range 14.0 18.0))) + (set-bank-info! this (vector+! s2-1 (-> s4-1 trans) s3-2)) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate active (neo-grenadier) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let* ((f30-0 (rnd-float-range self 0.9 1.1)) + (a0-2 '((neo-grenadier-patrol-ja) (neo-grenadier-patrol1-ja))) + (gp-0 ((method-of-type (rtype-of a0-2) length) a0-2)) + (s5-0 (new 'static 'array uint64 2 #x9 #xa)) + (s4-0 (-> (the-as (pointer int32) (+ (* (rnd-int self gp-0) 8) (the-as int s5-0))))) + ) + (until #f + (ja-no-eval :group! (-> self draw art-group data s4-0) :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.6)) + (nav-enemy-method-182 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)) + ) + ) + (nav-enemy-method-181 self) + (ja-no-eval :num! (loop!)) + (set! s4-0 (-> (the-as (pointer int32) (+ (* (rnd-int self gp-0) 8) (the-as int s5-0))))) + (ja-channel-push! 1 (seconds 0.6)) + (ja-no-eval :group! (-> self draw art-group data s4-0) :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 (neo-grenadier) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy notice) enter))) + (if t9-0 + (t9-0) + ) + ) + (vector-reset! (-> self root transv)) + ) + ) + +;; failed to figure out what this is: +(defstate hostile (neo-grenadier) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (neo-grenadier-method-193 self) + (set-look-at-mode! self 2) + (logclear! (-> self status-flags) (grenadier-status-flag gsf0)) + ) + :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* ((s5-0 (get-trans (the-as process-focusable a0-1) 0)) + (gp-0 (-> self root trans)) + (f30-0 (vector-vector-distance gp-0 s5-0)) + ) + (cond + ((and (< f30-0 12288.0) (get-focus! self)) + (go-virtual spin-kick) + ) + ((< f30-0 40960.0) + (let ((s3-1 (vector-! (new 'stack-no-clear 'vector) gp-0 s5-0)) + (s4-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s4-0 quad) (-> self root trans quad)) + (new 'stack-no-clear 'vector) + (vector-normalize! s3-1 49152.0) + (closest-point-on-mesh (-> self nav) s4-0 (vector+! s4-0 s5-0 s3-1) (the-as nav-poly #f)) + (when (< 32768.0 (vector-vector-distance gp-0 s4-0)) + (set! (-> self move-pos quad) (-> s4-0 quad)) + (let ((a0-11 (-> self nav state)) + (v1-32 (-> self move-pos)) + ) + (logclear! (-> a0-11 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-11 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-11 target-pos quad) (-> v1-32 quad)) + ) + 0 + (go-virtual backup) + ) + ) + ) + ) + ) + ) + ) + (when (or (time-elapsed? (-> self state-time) (rand-vu-int-range (seconds 3) (seconds 9))) + (>= 8192.0 (vector-vector-xz-distance (-> self root trans) (-> self bank final-pos))) + ) + (if (and (handle->process (-> self focus handle)) + (not (logtest? (-> (the-as process-focusable (handle->process (-> self focus handle))) focus-status) + (focus-status disable dead ignore grabbed) + ) + ) + ) + (go-virtual attack) + (go-stare self) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (let* ((a0-1 '((neo-grenadier-run-ja) (neo-grenadier-run1-ja))) + (a1-3 ((method-of-type (rtype-of a0-1) length) a0-1)) + (gp-0 (new 'static 'array uint64 2 #xd #xe)) + (gp-1 + (-> self draw art-group data (-> (the-as (pointer int32) (+ (* (rnd-int self a1-3) 8) (the-as int gp-0))))) + ) + (f30-0 (rnd-float-range self 0.9 1.1)) + ) + (until #f + (ja-no-eval :group! gp-1 :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + #f + ) + :post (behavior () + (let ((gp-0 (-> self bank))) + (if (< (vector-vector-xz-distance (-> self root trans) (-> gp-0 tangent-pos)) 9830.4) + (set! (-> self move-pos quad) (-> gp-0 final-pos quad)) + ) + ) + (let ((a0-3 (-> self nav state)) + (v1-5 (-> self move-pos)) + ) + (logclear! (-> a0-3 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-3 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-3 target-pos quad) (-> v1-5 quad)) + ) + 0 + (nav-enemy-travel-post) + ) + ) + +;; failed to figure out what this is: +(defstate backup (neo-grenadier) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (nav-enemy-method-181 self) + ) + :trans (behavior () + (let ((f0-0 (vector-vector-xz-distance (-> self root trans) (-> self move-pos)))) + (if (or (>= 12288.0 f0-0) (time-elapsed? (-> self state-time) (seconds 6))) + (go-hostile self) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! neo-grenadier-run-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (let ((a0-0 (-> self nav state)) + (v1-1 (-> self move-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 spin-kick (neo-grenadier) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + (nav-enemy-method-182 self) + (nav-enemy-method-183 self) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-8 *game-info*) + (a0-3 (+ (-> v1-8 attack-id) 1)) + ) + (set! (-> v1-8 attack-id) a0-3) + (set! (-> self attack-id) a0-3) + ) + (let ((v1-12 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1))) + (set! (-> v1-12 prim-core action) (collide-action deadly)) + (set! (-> v1-12 local-sphere w) 7372.8) + ) + ) + :exit (behavior () + (let ((v1-3 (-> (the-as collide-shape-prim-group (-> self root root-prim)) child 1))) + (set! (-> v1-3 prim-core action) (collide-action)) + (set! (-> v1-3 local-sphere w) 4096.0) + ) + (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.135)) + (ja-no-eval :group! neo-grenadier-spin-kick-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-hostile self) + ) + :post (behavior () + (when (nav-enemy-method-186 self) + (let ((a0-2 (handle->process (-> self focus handle)))) + (if a0-2 + (seek-to-point-toward-point! + (-> self root) + (get-trans (the-as process-focusable a0-2) 0) + (-> self nav max-rotation-rate) + (seconds 0.02) + ) + ) + ) + ) + (nav-enemy-simple-post) + ) + ) + +;; definition for method 85 of type neo-grenadier +;; INFO: Used lq/sq +(defmethod knocked-anim ((this neo-grenadier) (arg0 enemy-knocked-info)) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot) (knocked-type none)) + (let ((s4-1 (-> this + draw + art-group + data + (cond + ((= (-> this hit-points) 0.0) + (-> this enemy-info knocked-anim) + ) + ((= (-> this incoming knocked-type) (knocked-type yellow-shot)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (set! (-> s4-0 quad) (-> this root transv quad)) + (let* ((s3-0 quaternion-rotate-y-to-vector!) + (s2-0 (new 'stack-no-clear 'quaternion)) + (s1-0 (-> this root quat)) + (a1-3 (get-knockback-dir! this (new 'stack-no-clear 'vector))) + (s3-1 (s3-0 s2-0 s1-0 (the-as quaternion (vector-negate! a1-3 a1-3)) 32768.0)) + ) + (set! (-> s4-0 y) 0.0) + (vector-normalize! s4-0 1.0) + (vector-inv-orient-by-quat! s4-0 s4-0 s3-1) + ) + (if (< 0.0 (-> s4-0 x)) + 24 + 25 + ) + ) + ) + (else + (-> this enemy-info knocked-anim) + ) + ) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.067)) + (let ((a0-12 (-> this skel root-channel 0))) + (set! (-> a0-12 frame-group) (the-as art-joint-anim s4-1)) + (set! (-> a0-12 param 0) (the float (+ (-> (the-as art-joint-anim s4-1) 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 s4-1) num-func-seek!) + ) + ) + #t + ) + (((knocked-type blue-shot)) + (let* ((a0-14 '((neo-grenadier-blue-hit0-ja) (neo-grenadier-blue-hit1-ja) (neo-grenadier-blue-hit2-ja))) + (a1-11 ((method-of-type (rtype-of a0-14) length) a0-14)) + (s5-1 (new 'static 'array uint64 3 #x1b #x1c #x1d)) + (s4-2 (new 'static 'array int32 4 0 0 0 0)) + (a2-3 (ash 1 (-> s4-2 0))) + (v1-23 (enemy-method-131 this a1-11 a2-3)) + (s5-2 (-> this draw art-group data (-> (the-as (pointer int32) (+ (* v1-23 8) (the-as int s5-1)))))) + ) + (set! (-> s4-2 0) v1-23) + (let ((v1-26 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (if (and v1-26 (= v1-26 (-> this draw art-group data 30))) + (ja-channel-push! 1 (seconds 0.17)) + (ja-channel-push! 1 (seconds 0.067)) + ) + ) + (let ((a0-29 (-> this skel root-channel 0))) + (set! (-> a0-29 frame-group) (the-as art-joint-anim s5-2)) + (set! (-> a0-29 param 0) (the float (+ (-> (the-as art-joint-anim s5-2) frames num-frames) -1))) + (set! (-> a0-29 param 1) 1.0) + (set! (-> a0-29 frame-num) 0.0) + (joint-control-channel-group! a0-29 (the-as art-joint-anim s5-2) num-func-seek!) + ) + ) + #t + ) + (else + ((method-of-type nav-enemy knocked-anim) this arg0) + ) + ) + ) + +;; definition for method 86 of type neo-grenadier +(defmethod knocked-land-anim ((this neo-grenadier) (arg0 enemy-knocked-info)) + (cond + ((= (-> this incoming knocked-type) (knocked-type blue-shot)) + (when (>= (-> this incoming blue-juggle-count) (the-as uint 2)) + (let ((s4-0 (-> this draw art-group data 30))) + (ja-channel-push! 1 (seconds 0.067)) + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim s4-0)) + (set! (-> a0-3 param 0) (the float (+ (-> (the-as art-joint-anim s4-0) 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 s4-0) num-func-seek!) + ) + ) + ) + #t + ) + ((or (= (-> this incoming knocked-type) (knocked-type yellow-shot)) (zero? (-> this incoming knocked-type))) + #f + ) + ((< 0.0 (-> this hit-points)) + (ja-channel-push! 1 (seconds 0.067)) + (let ((a1-4 (-> this draw art-group data (-> this enemy-info knocked-land-anim))) + (a0-9 (-> this skel root-channel 0)) + ) + (set! (-> a0-9 frame-group) (the-as art-joint-anim a1-4)) + (set! (-> a0-9 param 0) (the float (+ (-> (the-as art-joint-anim a1-4) frames num-frames) -1))) + (set! (-> a0-9 param 1) (-> arg0 anim-speed)) + (set! (-> a0-9 frame-num) 0.0) + (joint-control-channel-group! a0-9 (the-as art-joint-anim a1-4) num-func-seek!) + ) + #t + ) + (else + (ja-channel-push! 1 (seconds 0.067)) + (let ((a0-11 (-> this skel root-channel 0))) + (set! (-> a0-11 frame-group) (the-as art-joint-anim (-> this draw art-group data 33))) + (set! (-> a0-11 param 0) + (the float (+ (-> (the-as art-joint-anim (-> this draw art-group data 33)) 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 33)) num-func-seek!) + ) + #t + ) + ) + ) + +;; failed to figure out what this is: +(defstate attack (neo-grenadier) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('event-attack) + (let ((s4-0 (handle->process (-> self focus handle)))) + (when s4-0 + (let ((gp-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node neo-grenadier-lod0-jg bomb)))) + (let ((s5-1 (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable s4-0) 0) gp-0))) + (let ((s4-1 (new 'stack-no-clear 'vector))) + (let ((f0-0 (vector-length s5-1))) + 0.0 + (let ((f0-1 (fmin 245760.0 f0-0))) + (vector-normalize! s5-1 f0-1) + ) + ) + (vector+! s4-1 gp-0 s5-1) + (let ((f0-2 122880.0)) + (setup-from-to-xz-vel! (-> self shot-trajectory) gp-0 s4-1 f0-2 -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-9 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> a1-9 ent) (-> self entity)) + (set! (-> a1-9 charge) 1.0) + (set! (-> a1-9 options) (projectile-options)) + (logclear! (-> a1-9 options) (projectile-options po14 po15 po16)) + (set! (-> a1-9 pos quad) (-> gp-0 quad)) + (set! (-> a1-9 vel quad) (-> self shot-trajectory initial-velocity quad)) + (set! (-> a1-9 notify-handle) (process->handle self)) + (set! (-> a1-9 owner-handle) (the-as handle #f)) + (set! (-> a1-9 target-handle) (the-as handle #f)) + (set! (-> a1-9 target-pos quad) (the-as uint128 0)) + (set! (-> a1-9 ignore-handle) (process->handle self)) + (let* ((v1-30 *game-info*) + (a0-28 (+ (-> v1-30 attack-id) 1)) + ) + (set! (-> v1-30 attack-id) a0-28) + (set! (-> a1-9 attack-id) a0-28) + ) + (set! (-> a1-9 timeout) (seconds 4)) + (let ((v1-32 (-> (spawn-projectile metalhead-grenade-shot a1-9 self *default-dead-pool*) 0)) + (v0-0 (the-as object 'neo-grenadier-shot)) + ) + (set! (-> (the-as metalhead-grenade-shot v1-32) attack-mode) (the-as symbol v0-0)) + v0-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 + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-10 *game-info*) + (a0-6 (+ (-> v1-10 attack-id) 1)) + ) + (set! (-> v1-10 attack-id) a0-6) + (set! (-> self attack-id) a0-6) + ) + (set-look-at-mode! self 1) + ) + :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)) + ) + (logclear! (-> self status-flags) (grenadier-status-flag gsf1)) + (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 ((f30-0 (rnd-float-range self 0.9 1.1))) + (let ((f28-0 (vector-length (-> self root transv)))) + (ja-channel-push! 1 (seconds 0.2)) + (when (< 4096.0 f28-0) + (let* ((v1-8 (vector-float*! (new 'stack-no-clear 'vector) (-> self root transv) 0.3)) + (a2-2 (vector+! (new 'stack-no-clear 'vector) (-> self root trans) v1-8)) + ) + (set! (-> self move-pos quad) (-> self root trans quad)) + (closest-point-on-mesh (-> self nav) (-> self move-pos) a2-2 (the-as nav-poly #f)) + ) + (let ((a0-10 (-> self nav state)) + (v1-13 (-> self move-pos)) + ) + (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-13 quad)) + ) + 0 + (logclear! (-> self nav flags) (nav-control-flag update-heading-from-facing)) + (logior! (-> self status-flags) (grenadier-status-flag gsf1)) + (ja-no-eval :group! neo-grenadier-run-to-throw-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (ja-channel-push! 1 (seconds 0.067)) + (logclear! (-> self status-flags) (grenadier-status-flag gsf1)) + (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)) + ) + ) + ) + (nav-enemy-method-182 self) + (cond + ((logtest? (-> self status-flags) (grenadier-status-flag gsf0)) + (ja-channel-push! 1 (seconds 0.135)) + (ja-no-eval :group! neo-grenadier-throw-quick-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (logclear! (-> self status-flags) (grenadier-status-flag gsf0)) + ) + (else + (when (not (enemy-method-105 self 1820.4445 #t)) + (nav-enemy-method-183 self) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! neo-grenadier-throw-turn-in-place-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)) + ) + (nav-enemy-method-184 self) + ) + (nav-enemy-method-184 self) + (ja-channel-push! 1 (seconds 0.067)) + (let ((a0-44 (handle->process (-> self focus handle)))) + (when a0-44 + (let ((f0-14 (vector-vector-distance (-> self root trans) (get-trans (the-as process-focusable a0-44) 0)))) + (cond + ((< 102400.0 f0-14) + (ja-no-eval :group! neo-grenadier-throw-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (else + (ja-no-eval :group! neo-grenadier-throw1-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (go-hostile self) + ) + :post (behavior () + (when (nav-enemy-method-186 self) + (let ((a0-2 (handle->process (-> self focus handle)))) + (if a0-2 + (seek-to-point-toward-point! + (-> self root) + (get-trans (the-as process-focusable a0-2) 0) + (-> self nav max-rotation-rate) + (seconds 0.02) + ) + ) + ) + ) + (nav-enemy-travel-post) + ) + ) + +;; failed to figure out what this is: +(defstate hit (neo-grenadier) + :virtual #t + :code (behavior () + (local-vars (v1-10 int) (v1-44 enemy-flag) (v1-46 enemy-flag) (v1-48 enemy-flag)) + (let ((gp-0 (get-knockback-dir! self (new 'stack-no-clear 'vector)))) + 0 + (add-debug-vector + #t + (bucket-id debug-no-zbuf1) + (-> self root trans) + gp-0 + (meters 6) + (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80) + ) + (add-debug-quaternion #t (bucket-id debug-no-zbuf1) (-> self root trans) (-> self root quat)) + (let ((f0-0 (quaternion-vector-y-angle (-> self root quat) gp-0))) + (cond + ((and (< -8192.0 f0-0) (>= 8192.0 f0-0)) + (set! v1-10 26) + ) + ((and (< 8192.0 f0-0) (>= 24576.0 f0-0)) + (set! v1-10 24) + ) + ((and (< -24576.0 f0-0) (>= -8192.0 f0-0)) + (set! v1-10 25) + ) + (else + (set! v1-10 23) + ) + ) + ) + ) + (let ((gp-1 (-> self draw art-group data v1-10))) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! gp-1 :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-43 (-> self enemy-flags))) + (if (logtest? v1-43 (enemy-flag vulnerable-backup)) + (set! v1-44 (logior v1-43 (enemy-flag vulnerable))) + (set! v1-44 (logclear v1-43 (enemy-flag vulnerable))) + ) + ) + (set! (-> self enemy-flags) v1-44) + (let ((v1-45 (-> self enemy-flags))) + (if (logtest? v1-45 (enemy-flag attackable-backup)) + (set! v1-46 (logior v1-45 (enemy-flag attackable))) + (set! v1-46 (logclear v1-45 (enemy-flag attackable))) + ) + ) + (set! (-> self enemy-flags) v1-46) + (let ((v1-47 (-> self enemy-flags))) + (if (logtest? (enemy-flag trackable-backup) v1-47) + (set! v1-48 (logior (enemy-flag trackable) v1-47)) + (set! v1-48 (logclear v1-47 (enemy-flag trackable))) + ) + ) + (set! (-> self enemy-flags) v1-48) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (logclear! (-> self focus-status) (focus-status hit)) + (cond + ((= (-> self focus aware) (enemy-aware ea3)) + (if (and (handle->process (-> self focus handle)) + (not (logtest? (-> (the-as process-focusable (handle->process (-> self focus handle))) focus-status) + (focus-status disable dead ignore grabbed) + ) + ) + ) + (go-virtual attack) + ) + (go-hostile self) + ) + (else + (go-stare self) + ) + ) + ) + ) + +;; definition for method 78 of type neo-grenadier +(defmethod go-hostile ((this neo-grenadier)) + (if (and (and (-> this next-state) (= (-> this next-state name) 'knocked)) + (and (logtest? (-> this status-flags) (grenadier-status-flag gsf0)) + (handle->process (-> this focus handle)) + (not (logtest? (-> (the-as process-focusable (handle->process (-> this focus handle))) focus-status) + (focus-status disable dead ignore grabbed) + ) + ) + ) + ) + (go (method-of-object this attack)) + ) + ((method-of-type nav-enemy go-hostile) this) + ) + +;; failed to figure out what this is: +(defstate victory (neo-grenadier) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (cond + ((zero? (rand-vu-int-range 0 1)) + (ja-no-eval :group! neo-grenadier-victory-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (else + (ja-no-eval :group! neo-grenadier-notice-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) + ) + ) + +;; definition for method 160 of type neo-grenadier +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod normalize-heading! ((this neo-grenadier) (arg0 nav-control)) + (local-vars (a0-4 int) (a0-6 int)) + (when (not (logtest? (-> this status-flags) (grenadier-status-flag gsf1))) + (let ((v1-3 (new 'stack-no-clear 'vector)) + (a2-0 (new 'stack-no-clear 'vector)) + ) + (vector-reset! a2-0) + (set! (-> a2-0 y) 1.0) + (let ((t0-0 (-> arg0 state))) + (set! (-> v1-3 quad) (-> t0-0 heading quad)) + ) + (let* ((a1-3 (-> *perf-stats* data 33)) + (a3-3 (-> a1-3 ctrl)) + ) + (+! (-> a1-3 count) 1) + (b! (zero? a3-3) cfg-3 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 0) + (.mtpc pcr1 0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a3-3) + ) + (.sync.l) + (.sync.p) + (label cfg-3) + 0 + (forward-up-nopitch->quaternion (-> this root quat) v1-3 a2-0) + ) + (let ((v1-5 (-> *perf-stats* data 33))) + (b! (zero? (-> v1-5 ctrl)) cfg-5 :delay (nop!)) + (.mtc0 Perf 0) + (.sync.l) + (.sync.p) + (.mfpc a0-4 pcr0) + (+! (-> v1-5 accum0) a0-4) + (.mfpc a0-6 pcr1) + (+! (-> v1-5 accum1) a0-6) + ) + (label cfg-5) + 0 + ) + 0 + (none) + ) + +;; definition for method 59 of type neo-grenadier +;; WARN: Return type mismatch object vs none. +(defmethod enemy-common-post ((this neo-grenadier)) + (let ((t9-0 (method-of-type nav-enemy enemy-common-post))) + (t9-0 this) + ) + (let ((a1-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 34)))) + (spawn (-> this part) a1-1) + ) + (none) + ) + +;; definition for method 120 of type neo-grenadier +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this neo-grenadier)) + (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)) + (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 no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 12288.0 0.0 22528.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 crate hit-by-others-list player-list)) + (set! (-> v1-13 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> v1-13 local-sphere) 0.0 6553.6 0.0 6553.6) + ) + (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)) + (set! (-> v1-15 transform-index) 31) + (set-vector! (-> v1-15 local-sphere) 0.0 0.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-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 deadly)) + (set! (-> v1-17 transform-index) 34) + (set-vector! (-> v1-17 local-sphere) 0.0 0.0 0.0 4096.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 deadly)) + (set! (-> v1-19 transform-index) 23) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 0.0 4096.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 deadly)) + (set! (-> v1-21 transform-index) 16) + (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-with) (collide-spec backgnd obstacle hit-by-others-list)) + (set! (-> v1-23 prim-core action) (collide-action solid)) + (set-vector! (-> v1-23 local-sphere) 0.0 12288.0 0.0 12288.0) + ) + (set! (-> s5-0 nav-radius) 8192.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 max-iteration-count) (the-as uint 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for method 7 of type neo-grenadier +(defmethod relocate ((this neo-grenadier) (offset int)) + (when (-> this hostile-path) + (if (nonzero? (-> this hostile-path)) + (&+! (-> this hostile-path) offset) + ) + ) + (call-parent-method this offset) + ) + +;; definition for method 121 of type neo-grenadier +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this neo-grenadier)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-neo-grenadier" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *neo-grenadier-nav-enemy-info*) + (let ((v1-5 (-> this neck))) + (when v1-5 + (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-6 (-> this nav))) + (set! (-> v1-6 speed-scale) 1.0) + ) + 0 + (set-gravity-length (-> this root dynam) 573440.0) + (set! (-> this heading) (if (rand-vu-percent? 0.5) + #t + #f + ) + ) + (set! (-> this move-angle) 5461.3335) + (set! (-> this status-flags) (grenadier-status-flag)) + (set! (-> this suppress-knockaside-timer) 0) + (set-vector! (-> this root scale) 1.5 1.5 1.5 1.0) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1523) this)) + (set! (-> this hostile-path) (new 'process 'path-control this 'hostile 0.0 (-> this entity) #t)) + (if (zero? (-> this hostile-path)) + (set! (-> this hostile-path) #f) + ) + (if (-> this hostile-path) + (logior! (-> this hostile-path flags) (path-control-flag display draw-line draw-point draw-text)) + ) + (add-connection + *part-engine* + this + 24 + this + 468 + (new 'static 'vector :x 532.48 :y -81.92 :z 1515.52 :w 163840.0) + ) + (add-connection + *part-engine* + this + 24 + this + 468 + (new 'static 'vector :x -532.48 :y -81.92 :z 1515.52 :w 163840.0) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/sewer/neo-juicer_REF.gc b/test/decompiler/reference/jak3/levels/sewer/neo-juicer_REF.gc new file mode 100644 index 0000000000..f64e9aa327 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/neo-juicer_REF.gc @@ -0,0 +1,1869 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-neo-juicer-shot-hit + :id 1524 + :duration (seconds 0.017) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 5003)) + ) + +;; failed to figure out what this is: +(defpart 5003 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 96.0 64.0) + (:g 64.0 32.0) + (:b 96.0 64.0) + (:a 64.0) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:fade-r -0.35555556) + (:fade-g -0.35555556) + (:fade-b 0.0) + (:fade-a -0.30476192) + (:accel-y (meters -0.00016666666) (meters 0.00016666666)) + (:timer (seconds 0.7)) + (:flags (sp-cpuinfo-flag-2)) + (:next-time (seconds 0.2)) + (:next-launcher 5004) + (:rotate-y (degrees 0) (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpart 5005 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3.5)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.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: +(defpart 5006 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5) (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 48.0 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: +(defpart 5007 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5) (meters 0.5)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 16)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 16.0 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: +(defpart 5008 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 0.2)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 196.0 128.0) + (:b 64.0 64.0) + (:a 32.0 16.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 819.2) + ) + ) + +;; definition of type neo-juicer-shot +(deftype neo-juicer-shot (projectile) + ((lightning lightning-control 5) + (victim handle) + ) + ) + +;; definition for method 3 of type neo-juicer-shot +(defmethod inspect ((this neo-juicer-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (format #t "~2Tlightning[5] @ #x~X~%" (-> this lightning)) + (format #t "~2Tvictim: ~D~%" (-> this victim)) + (label cfg-4) + this + ) + +;; definition for method 35 of type neo-juicer-shot +;; INFO: Used lq/sq +(defmethod proj-event-handler ((this neo-juicer-shot) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('reset) + (let ((v1-1 (the-as object (-> arg3 param 0)))) + (set! (-> this root trans quad) (-> (the-as (inline-array vector) v1-1) 0 quad)) + (set! (-> this starting-pos quad) (-> (the-as (inline-array vector) v1-1) 0 quad)) + (set! (-> this root transv quad) (-> (the-as (inline-array vector) v1-1) 1 quad)) + (set! (-> this pre-move-transv quad) (-> (the-as (inline-array vector) v1-1) 1 quad)) + ) + (set! (-> this hits) 0) + (set-time! (-> this spawn-time)) + (if (made-impact? this) + (go (method-of-object this impact)) + (go (method-of-object this moving)) + ) + #t + ) + (else + ((method-of-type projectile proj-event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; failed to figure out what this is: +(defstate dissipate (neo-juicer-shot) + :virtual #t + :enter (behavior () + (go-virtual impact) + ) + ) + +;; definition for method 37 of type neo-juicer-shot +(defmethod deal-damage! ((this neo-juicer-shot) (arg0 process) (arg1 event-message-block)) + (let ((a0-2 (if (type? arg0 process-focusable) + arg0 + ) + ) + ) + (when a0-2 + (set! (-> this victim) (process->handle a0-2)) + #t + ) + ) + ) + +;; definition for method 25 of type neo-juicer-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this neo-juicer-shot)) + (let ((s5-0 (-> this starting-pos)) + (s4-0 (-> this root trans)) + ) + (when (line-in-view-frustum? s5-0 s4-0) + (let ((s3-0 (new 'stack-no-clear 'vector)) + (s2-0 (new 'stack-no-clear 'vector)) + (s1-0 (new 'stack-no-clear 'matrix)) + ) + (launch-particles (-> *part-id-table* 5007) s5-0) + (launch-particles (-> *part-id-table* 5008) s5-0) + (when (not (handle->process (-> this victim))) + (launch-particles (-> *part-id-table* 5007) s4-0) + (launch-particles (-> *part-id-table* 5008) s4-0) + ) + (vector-! s2-0 s4-0 s5-0) + (vector-normalize! s2-0 1.0) + (matrix-axis-angle! s1-0 s2-0 13107.2) + (vector-reset! (-> s1-0 trans)) + (set-vector! s3-0 (-> s2-0 z) 0.0 (- (-> s2-0 x)) 1.0) + (vector-normalize! s3-0 409.6) + (dotimes (s0-0 5) + (vector-matrix*! s3-0 s3-0 s1-0) + (vector+! s2-0 s3-0 s5-0) + (let ((a0-17 (-> this lightning s0-0)) + (v1-21 s2-0) + ) + (set! (-> a0-17 state meet data 0 quad) (-> v1-21 quad)) + ) + (let ((a0-20 (-> this lightning s0-0)) + (v1-25 s4-0) + ) + (set! (-> a0-20 state meet data (+ (-> a0-20 state points-to-draw) -1) quad) (-> v1-25 quad)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 26 of type neo-juicer-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this neo-juicer-shot)) + (projectile-method-25 this) + (cond + ((logtest? (-> *part-group-id-table* 1524 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* 1524)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> this root trans quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1524)) + ) + ) + 0 + (none) + ) + +;; definition for method 38 of type neo-juicer-shot +(defmethod made-impact? ((this neo-juicer-shot)) + (let ((gp-0 (-> this root)) + (s5-0 (new 'stack-no-clear 'collide-query)) + ) + (let ((v1-0 s5-0)) + (set! (-> v1-0 radius) (-> gp-0 root-prim prim-core world-sphere w)) + (set! (-> v1-0 collide-with) (-> gp-0 root-prim prim-core collide-with)) + (set! (-> v1-0 ignore-process0) this) + (set! (-> v1-0 ignore-process1) (ppointer->process (-> this parent))) + (set! (-> v1-0 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-0 action-mask) (collide-action solid)) + ) + (let ((a0-2 (handle->process (-> this notify-handle)))) + (when a0-2 + (let* ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> gp-0 trans) (get-trans (the-as process-focusable a0-2) 3))) + (f0-2 (- (vector-length s4-1))) + ) + (fill-and-try-snap-to-surface gp-0 s4-1 f0-2 0.0 -3072.0 s5-0) + ) + ) + ) + ) + ) + +;; definition for function neo-juicer-proj-move +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defun neo-juicer-proj-move ((arg0 neo-juicer-shot)) + (let ((s5-0 (handle->process (-> arg0 victim)))) + (cond + (s5-0 + (set! (-> arg0 root trans quad) (-> (get-trans (the-as process-focusable s5-0) 3) quad)) + ((method-of-type projectile deal-damage!) arg0 s5-0 (the-as event-message-block #f)) + ) + (else + (projectile-move-fill-line-sphere arg0) + (if (logtest? (-> arg0 root status) (collide-status touch-surface)) + (go (method-of-object arg0 impact)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 30 of type neo-juicer-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this neo-juicer-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-default) + (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 ((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 backgnd jak bot crate civilian enemy vehicle-sphere hit-by-others-list player-list) + ) + (set! (-> v1-7 prim-core action) (collide-action solid)) + (set-vector! (-> v1-7 local-sphere) 0.0 0.0 0.0 1228.8) + (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 event-self) 'touched) + (set! (-> s5-0 max-iteration-count) (the-as uint 1)) + (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 7 of type neo-juicer-shot +;; WARN: Return type mismatch projectile vs neo-juicer-shot. +(defmethod relocate ((this neo-juicer-shot) (offset int)) + (dotimes (v1-0 5) + (if (nonzero? (-> this lightning v1-0)) + (&+! (-> this lightning v1-0) offset) + ) + ) + (the-as neo-juicer-shot ((method-of-type projectile relocate) this offset)) + ) + +;; definition for method 31 of type neo-juicer-shot +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this neo-juicer-shot)) + (logior! (-> this options) (projectile-options po17)) + (set! (-> this move) neo-juicer-proj-move) + (set! (-> this root dynam gravity y) 0.0) + (set! (-> this root dynam gravity-length) 0.0) + (set! (-> this root dynam gravity-max) 0.0) + (set! (-> this attack-mode) 'neo-juicer-shot) + (dotimes (s5-0 5) + (set! (-> this lightning s5-0) (new + 'process + 'lightning-control + (new 'static 'lightning-spec + :name #f + :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 120.0 + :texture (new 'static 'texture-id :index #x40 :page #x4) + :reduction 0.42 + :num-points 8 + :box-size 8192.0 + :merge-factor 0.5 + :merge-count 2 + :radius 1433.6 + :duration -1.0 + :sound #f + ) + this + 0.0 + ) + ) + ) + (set! (-> this victim) (the-as handle #f)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-neo-juicer neo-juicer neo-juicer-lod0-jg -1 + ((neo-juicer-lod0-mg (meters 20)) (neo-juicer-lod1-mg (meters 40)) (neo-juicer-lod2-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5.3) + :shadow neo-juicer-shadow-mg + :origin-joint-index 21 + ) + +;; definition of type neo-juicer-anim-info +(deftype neo-juicer-anim-info (structure) + ((anim-index int32) + ) + :pack-me + ) + +;; definition for method 3 of type neo-juicer-anim-info +(defmethod inspect ((this neo-juicer-anim-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'neo-juicer-anim-info) + (format #t "~1Tanim-index: ~D~%" (-> this anim-index)) + (label cfg-4) + this + ) + +;; definition of type neo-juicer-global-info +(deftype neo-juicer-global-info (basic) + ((prev-yellow-hit int8) + (prev-blue-hit int8) + (idle-anim neo-juicer-anim-info 3 :inline) + (patrol-anim neo-juicer-anim-info 2 :inline) + (notice-anim neo-juicer-anim-info 2 :inline) + (charge-anim neo-juicer-anim-info 2 :inline) + (knocked-anim neo-juicer-anim-info 2 :inline) + (celebrate-anim neo-juicer-anim-info 2 :inline) + (yellow-hit-anim neo-juicer-anim-info 4 :inline) + (blue-hit-anim neo-juicer-anim-info 6 :inline) + ) + ) + +;; definition for method 3 of type neo-juicer-global-info +(defmethod inspect ((this neo-juicer-global-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this (-> this type)) + (format #t "~1Tprev-yellow-hit: ~D~%" (-> this prev-yellow-hit)) + (format #t "~1Tprev-blue-hit: ~D~%" (-> this prev-blue-hit)) + (format #t "~1Tidle-anim[3] @ #x~X~%" (-> this idle-anim)) + (format #t "~1Tpatrol-anim[2] @ #x~X~%" (-> this patrol-anim)) + (format #t "~1Tnotice-anim[2] @ #x~X~%" (-> this notice-anim)) + (format #t "~1Tcharge-anim[2] @ #x~X~%" (-> this charge-anim)) + (format #t "~1Tknocked-anim[2] @ #x~X~%" (-> this knocked-anim)) + (format #t "~1Tcelebrate-anim[2] @ #x~X~%" (-> this celebrate-anim)) + (format #t "~1Tyellow-hit-anim[4] @ #x~X~%" (-> this yellow-hit-anim)) + (format #t "~1Tblue-hit-anim[6] @ #x~X~%" (-> this blue-hit-anim)) + (label cfg-4) + this + ) + +;; definition of type neo-juicer +(deftype neo-juicer (nav-enemy) + ((los los-control :inline) + (intro-path path-control) + (joint joint-mod) + (joint-enable symbol) + (joint-blend float) + (last-fire-time time-frame) + (heading symbol) + (move-angle float) + (torso-track-player joint-mod) + (circle-backward? symbol :offset 832) + (using-turn-anim symbol) + (hit-focus focus) + (ambush-path-pt int8) + (charge-index int8) + (hostile-dest vector :inline) + (current-projectile handle) + ) + (:state-methods + ambush-cont + attack + ) + (:methods + (go-die-or-knocked (_type_) object) + (spawn-proj! (_type_ process-focusable uint) none) + (track-focus! (_type_) none) + (start-tracking (_type_) none) + (toggle-deadly-flag (_type_ symbol) none) + ) + ) + +;; definition for method 3 of type neo-juicer +(defmethod inspect ((this neo-juicer)) + (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 "~2Tintro-path: ~A~%" (-> this intro-path)) + (format #t "~2Tjoint: ~A~%" (-> this joint)) + (format #t "~2Tjoint-enable: ~A~%" (-> this joint-enable)) + (format #t "~2Tjoint-blend: ~f~%" (-> this joint-blend)) + (format #t "~2Tlast-fire-time: ~D~%" (-> this last-fire-time)) + (format #t "~2Theading: ~A~%" (-> this heading)) + (format #t "~2Tmove-angle: ~f~%" (-> this move-angle)) + (format #t "~2Ttorso-track-player: ~A~%" (-> this torso-track-player)) + (format #t "~2Tcircle-radial-dist: ~f~%" (-> this desired-angle)) + (format #t "~2Tcircle-backward?: ~A~%" (-> this circle-backward?)) + (format #t "~2Tusing-turn-anim: ~A~%" (-> this using-turn-anim)) + (format #t "~2Thit-focus: ~A~%" (-> this hit-focus)) + (format #t "~2Tambush-path-pt: ~D~%" (-> this ambush-path-pt)) + (format #t "~2Tcharge-index: ~D~%" (-> this charge-index)) + (format #t "~2Thostile-dest: #~%" (-> this hostile-dest)) + (format #t "~2Tcurrent-projectile: ~D~%" (-> this current-projectile)) + (label cfg-4) + this + ) + +;; definition for symbol *neo-juicer-global-info*, type neo-juicer-global-info +(define *neo-juicer-global-info* (new 'static 'neo-juicer-global-info + :idle-anim (new 'static 'inline-array neo-juicer-anim-info 3 + (new 'static 'neo-juicer-anim-info :anim-index 5) + (new 'static 'neo-juicer-anim-info :anim-index 6) + (new 'static 'neo-juicer-anim-info :anim-index 7) + ) + :patrol-anim (new 'static 'inline-array neo-juicer-anim-info 2 + (new 'static 'neo-juicer-anim-info :anim-index 8) + (new 'static 'neo-juicer-anim-info :anim-index 23) + ) + :notice-anim (new 'static 'inline-array neo-juicer-anim-info 2 + (new 'static 'neo-juicer-anim-info :anim-index 21) + (new 'static 'neo-juicer-anim-info :anim-index 22) + ) + :charge-anim (new 'static 'inline-array neo-juicer-anim-info 2 + (new 'static 'neo-juicer-anim-info :anim-index 9) + (new 'static 'neo-juicer-anim-info :anim-index 20) + ) + :knocked-anim (new 'static 'inline-array neo-juicer-anim-info 2 + (new 'static 'neo-juicer-anim-info :anim-index 16) + (new 'static 'neo-juicer-anim-info :anim-index 18) + ) + :celebrate-anim (new 'static 'inline-array neo-juicer-anim-info 2 + (new 'static 'neo-juicer-anim-info :anim-index 24) + (new 'static 'neo-juicer-anim-info :anim-index 25) + ) + :yellow-hit-anim (new 'static 'inline-array neo-juicer-anim-info 4 + (new 'static 'neo-juicer-anim-info :anim-index 33) + (new 'static 'neo-juicer-anim-info :anim-index 34) + (new 'static 'neo-juicer-anim-info :anim-index 35) + (new 'static 'neo-juicer-anim-info :anim-index 36) + ) + :blue-hit-anim (new 'static 'inline-array neo-juicer-anim-info 6 + (new 'static 'neo-juicer-anim-info :anim-index 26) + (new 'static 'neo-juicer-anim-info :anim-index 27) + (new 'static 'neo-juicer-anim-info :anim-index 28) + (new 'static 'neo-juicer-anim-info :anim-index 29) + (new 'static 'neo-juicer-anim-info :anim-index 30) + (new 'static 'neo-juicer-anim-info :anim-index 31) + ) + ) + ) + +;; definition for symbol *fact-info-neo-juicer-defaults*, type fact-info-enemy-defaults +(define *fact-info-neo-juicer-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9) + ) + +;; definition for symbol *neo-juicer-nav-enemy-info*, type nav-enemy-info +(define *neo-juicer-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 #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 21 + :hostile-anim 9 + :hit-anim 11 + :knocked-anim 18 + :knocked-land-anim 19 + :die-anim 40 + :die-falling-anim 41 + :victory-anim 24 + :jump-wind-up-anim 37 + :jump-in-air-anim 38 + :jump-land-anim 39 + :neck-joint 34 + :look-at-joint 34 + :bullseye-joint 6 + :sound-hit (static-sound-name "juicer-hit") + :sound-die (static-sound-name "juicer-die") + :notice-distance (meters 30) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 24) + :default-hit-points 9.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.9 + :attack-shove-back (meters 3) + :attack-shove-up (meters 2) + :attack-mode 'shock-red + :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 65536.0 + :knocked-soft-vxz-hi 94208.0 + :knocked-soft-vy-lo 77824.0 + :knocked-soft-vy-hi 98304.0 + :knocked-medium-vxz-lo 81920.0 + :knocked-medium-vxz-hi 98304.0 + :knocked-medium-vy-lo 81920.0 + :knocked-medium-vy-hi 122880.0 + :knocked-hard-vxz-lo 65536.0 + :knocked-hard-vxz-hi 95846.4 + :knocked-hard-vy-lo 122880.0 + :knocked-hard-vy-hi 163840.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 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 98304.0 + :knocked-red-vy-lo 90112.0 + :knocked-red-vy-hi 131072.0 + :knocked-blue-vxz-lo 24576.0 + :knocked-blue-vxz-hi 32768.0 + :knocked-blue-vy-lo 24576.0 + :knocked-blue-vy-hi 73728.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 34 + :gem-seg #x2 + :gem-no-seg #x4 + :gem-offset (new 'static 'sphere :y 942.08 :z 40.96 :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 8 + :turn-anim 10 + :run-anim 9 + :taunt-anim -1 + :run-travel-speed (meters 8) + :run-acceleration (meters 8) + :run-turning-acceleration (meters 20) + :walk-travel-speed (meters 2) + :walk-acceleration (meters 2) + :walk-turning-acceleration (meters 3) + :maximum-rotation-rate (degrees 360) + :notice-nav-radius (meters 7.5) + :frustration-distance (meters 8) + :frustration-time (seconds 4) + :blocked-time (seconds 0.3) + :circle-dist-lo 28672.0 + :circle-dist-hi 53248.0 + :nav-mesh #f + ) + ) + +;; failed to figure out what this is: +(set! (-> *neo-juicer-nav-enemy-info* fact-defaults) *fact-info-neo-juicer-defaults*) + +;; definition for method 194 of type neo-juicer +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod track-focus! ((this neo-juicer)) + (let ((s3-0 (handle->process (-> this focus handle)))) + (when s3-0 + (let ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 4))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> (get-trans (the-as process-focusable s3-0) 3) quad)) + (let ((s3-1 + (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this node-list data 4 bone transform fvec) 1.0) + ) + ) + (vector-! s5-0 s5-0 s4-0) + (vector-normalize! s5-0 1.0) + (quaternion-from-two-vectors-partial! (-> this joint quat) s3-1 s5-0 (-> this joint-blend)) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 195 of type neo-juicer +;; WARN: Return type mismatch int vs none. +(defmethod start-tracking ((this neo-juicer)) + (cond + ((-> this torso-track-player) + (set! (-> this joint-enable) #t) + (seek! (-> this joint-blend) 1.0 (* 2.0 (seconds-per-frame))) + (track-focus! this) + ) + ((-> this joint-enable) + (seek! (-> this joint-blend) 0.0 (* 4.0 (seconds-per-frame))) + (track-focus! this) + (if (= (-> this joint-blend) 0.0) + (set! (-> this joint-enable) #f) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 59 of type neo-juicer +(defmethod enemy-common-post ((this neo-juicer)) + (let ((t9-0 (method-of-type nav-enemy enemy-common-post))) + (t9-0 this) + ) + (los-control-method-9 + (-> this los) + (the-as process-focusable (handle->process (-> this focus handle))) + (the-as vector #f) + 819.2 + 4096.0 + ) + (start-tracking this) + (none) + ) + +;; definition for method 192 of type neo-juicer +(defmethod go-die-or-knocked ((this neo-juicer)) + (if (and (= (-> this incoming knocked-type) (knocked-type yellow-shot)) + (not (and (-> this next-state) (let ((v1-6 (-> this next-state name))) + (or (= v1-6 'knocked) (= v1-6 'jump) (= v1-6 'jump-land)) + ) + ) + ) + (zero? (rnd-int this 3)) + (let ((f0-0 (vector-vector-distance-squared (-> this root trans) (target-pos 0))) + (f1-0 32768.0) + ) + (>= f0-0 (* f1-0 f1-0)) + ) + ) + (go-die this) + (go (method-of-object this knocked)) + ) + ) + +;; definition for method 82 of type neo-juicer +(defmethod event-handler ((this neo-juicer) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('hit-flinch) + (cond + ((= (-> this hit-points) 0.0) + (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-die-or-knocked this) + ) + (else + (let ((v1-29 (ja-channel-float! (the-as art-joint-anim (-> this draw art-group data 11)) 0.0 0.0 0.0))) + (when v1-29 + (set! (-> v1-29 param 0) 1.0) + (set! (-> v1-29 param 1) 0.75) + (set! (-> v1-29 param 2) 2.0) + (set! (-> v1-29 num-func) num-func-interp-play!) + ) + ) + ) + ) + #t + ) + (('hit) + (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-die-or-knocked this) + (go (method-of-object this hit)) + ) + #t + ) + (('instant-death) + (when (< 0.0 (-> this hit-points)) + (set! (-> this hit-points) 0.0) + (set! (-> this root penetrated-by) (get-penetrated-by this)) + (let ((s4-0 (get-knockback-dir! this (new 'stack-no-clear 'vector)))) + (vector-z-quaternion! s4-0 (-> this root quat)) + (vector-float*! s4-0 s4-0 -1.0) + (vector-normalize! s4-0 1.0) + ) + (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-die-or-knocked this) + ) + #t + ) + (('notify) + (if (and (= (-> arg3 param 0) 'attack) (= (-> arg3 param 1) (handle->process (-> this focus handle)))) + (set! (-> this hit-focus) (the-as focus #t)) + ) + ((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) + ) + ) + ) + +;; failed to figure out what this is: +(defstate active (neo-juicer) + :virtual #t + :code (behavior () + (let ((v1-2 (ja-group))) + (when (or (and v1-2 (or (= v1-2 neo-juicer-charge0-ja) (= v1-2 neo-juicer-charge1-ja))) + (let ((v1-8 (ja-group))) + (and v1-8 (or (= v1-8 neo-juicer-patrol0-ja) (= v1-8 neo-juicer-patrol1-ja))) + ) + ) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (until #f + (let ((gp-0 (-> self draw art-group data (-> *neo-juicer-global-info* patrol-anim (rnd-int self 2) anim-index))) + (s5-0 (set-reaction-time! self 1 (seconds 0.027))) + ) + (let ((v1-34 (ja-group))) + (if (not (and v1-34 (= v1-34 gp-0))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (dotimes (s4-0 s5-0) + (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)) + ) + ) + ) + (when (zero? (rnd-int self 2)) + (nav-enemy-method-182 self) + (ja-channel-push! 1 (seconds 0.3)) + (let ((gp-1 0)) + (until (not (enemy-method-134 self 0.4)) + (let* ((v1-61 (enemy-method-131 self 3 gp-1)) + (a1-15 (-> self draw art-group data (-> *neo-juicer-global-info* idle-anim v1-61 anim-index))) + ) + (set! gp-1 (ash 1 v1-61)) + (ja-no-eval :group! a1-15 :num! (seek! max f30-0) :frame-num 0.0) + ) + (ja-no-eval :group! (ja-group) :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + (nav-enemy-method-181 self) + ) + ) + ) + #f + ) + ) + +;; definition for method 93 of type neo-juicer +(defmethod setup-jump! ((this neo-juicer) (arg0 enemy-jump-info)) + ((method-of-type nav-enemy setup-jump!) this arg0) + (none) + ) + +;; definition for method 102 of type neo-juicer +(defmethod go-directed2 ((this neo-juicer)) + (case (-> this jump-why) + ((2) + (go (method-of-object this ambush-cont)) + ) + (else + ((method-of-type nav-enemy go-directed2) this) + ) + ) + ) + +;; failed to figure out what this is: +(defstate ambush (neo-juicer) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy ambush) enter))) + (if t9-0 + (t9-0) + ) + ) + (when (zero? (-> self intro-path)) + (format 0 "ERROR: ~A has no intro path, skipping ambush~%" (-> self name)) + (go-virtual notice) + ) + (get-point-in-path! (-> self intro-path) (-> self root trans) 0.0 'interp) + ) + :code (behavior () + (set! (-> self ambush-path-pt) 1) + (until #f + (let ((gp-0 (new 'stack-no-clear 'vector))) + (get-point-in-path! (-> self intro-path) gp-0 1.0 'interp) + (set! (-> self enemy-flags) + (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked))) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (let ((v1-5 (process->ppointer self))) + (set! (-> a1-1 from) v1-5) + ) + (set! (-> a1-1 num-params) 2) + (set! (-> a1-1 message) 'jump) + (set! (-> a1-1 param 0) (the-as uint 2)) + (set! (-> a1-1 param 1) (the-as uint gp-0)) + (send-event-function self a1-1) + ) + ) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate ambush-cont (neo-juicer) + :virtual #t + :event enemy-event-handler + :code (behavior () + (let ((a0-0 (-> self intro-path)) + (v1-1 (+ (-> self ambush-path-pt) 1)) + ) + (if (< v1-1 (-> a0-0 curve num-cverts)) + (set! (-> self ambush-path-pt) v1-1) + (go-best-state self) + ) + ) + (until #f + (let ((gp-0 (new 'stack-no-clear 'vector))) + (get-point-in-path! (-> self intro-path) gp-0 (the float (-> self ambush-path-pt)) 'interp) + (set! (-> self enemy-flags) + (the-as enemy-flag (logclear (-> self enemy-flags) (enemy-flag jump-check-blocked))) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (let ((v1-9 (process->ppointer self))) + (set! (-> a1-1 from) v1-9) + ) + (set! (-> a1-1 num-params) 2) + (set! (-> a1-1 message) 'jump) + (set! (-> a1-1 param 0) (the-as uint 2)) + (set! (-> a1-1 param 1) (the-as uint gp-0)) + (send-event-function self a1-1) + ) + ) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate notice (neo-juicer) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.075)) + (let ((s5-0 0)) + (let ((s4-0 (quaternion->matrix (new 'stack-no-clear 'matrix) (-> self root quat))) + (gp-1 (vector-! + (new 'stack-no-clear 'vector) + (get-trans (the-as process-focusable (handle->process (-> self focus handle))) 0) + (-> self root trans) + ) + ) + ) + (vector-flatten! gp-1 gp-1 (-> s4-0 uvec)) + (vector-normalize! gp-1 1.0) + (cond + ((< (vector-dot gp-1 (-> s4-0 fvec)) (cos 8192.0)) + ) + (else + (set! s5-0 (logior s5-0 1)) + ) + ) + ) + (let ((f30-1 (rnd-float-range self 0.8 1.2)) + (gp-2 (new 'stack-no-clear 'vector)) + ) + (let* ((a0-13 (enemy-method-131 self 2 s5-0)) + (a1-8 (-> self draw art-group data (-> *neo-juicer-global-info* notice-anim a0-13 anim-index))) + ) + (ja-no-eval :group! a1-8 :num! (seek! max f30-1) :frame-num 0.0) + ) + (until (ja-done? 0) + (let ((a1-9 (-> self nav state))) + (set! (-> gp-2 quad) (-> a1-9 travel quad)) + ) + (seek-toward-heading-vec! (-> self root) gp-2 (-> self nav max-rotation-rate) (seconds 0.02)) + (suspend) + (ja :num! (seek! max f30-1)) + ) + ) + ) + (go-best-state self) + ) + ) + +;; failed to figure out what this is: +(defstate victory (neo-juicer) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.15)) + (let ((gp-1 (-> self draw art-group data (-> *neo-juicer-global-info* celebrate-anim (rnd-int self 2) anim-index))) + (f30-0 (rnd-float-range self 0.9 1.1)) + ) + (ja-no-eval :group! gp-1 :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 (neo-juicer) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy hostile) exit))) + (if t9-0 + (t9-0) + ) + ) + ) + :code (behavior () + (let ((v1-2 (ja-group))) + (when (and v1-2 (or (= v1-2 neo-juicer-charge0-ja) (= v1-2 neo-juicer-charge1-ja))) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (let* ((v1-16 (rnd-int self 2)) + (gp-0 (-> self draw art-group data (-> *neo-juicer-global-info* charge-anim v1-16 anim-index))) + ) + (set! (-> self charge-index) v1-16) + (let ((v1-19 (ja-group))) + (if (not (and v1-19 (= v1-19 gp-0))) + (ja-channel-push! 1 (seconds 0.2)) + ) + ) + (set! (-> self skel root-channel 0 frame-group) (the-as art-joint-anim gp-0)) + ) + (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)) + ) + ) + #f + ) + :post (behavior () + (let ((a0-1 (handle->process (-> self focus handle)))) + (when a0-1 + (let* ((gp-0 (get-trans (the-as process-focusable a0-1) 1)) + (f0-0 (vector-vector-xz-distance (-> self root trans) gp-0)) + ) + (let ((v1-8 (-> self nav state))) + (logclear! (-> v1-8 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-8 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-8 target-pos quad) (-> gp-0 quad)) + ) + 0 + (if (and (>= 53248.0 f0-0) (should-check-los? (-> self los) 0) (get-focus! self)) + (go-virtual attack) + ) + ) + ) + ) + (nav-enemy-travel-post) + ) + ) + +;; definition for method 113 of type neo-juicer +(defmethod get-focus! ((this neo-juicer)) + (let* ((t9-0 (method-of-type nav-enemy get-focus!)) + (v1-1 (t9-0 this)) + ) + (if (and v1-1 (time-elapsed? (-> this last-fire-time) (seconds 7))) + v1-1 + ) + ) + ) + +;; definition for function neo-juicer-face-player-post +;; WARN: Return type mismatch int vs none. +(defbehavior neo-juicer-face-player-post neo-juicer () + (let ((gp-0 (handle->process (-> self focus handle)))) + (when (and (nav-enemy-method-186 self) gp-0) + (let ((f0-1 + (fabs + (deg-diff + (quaternion-y-angle (-> self root quat)) + (vector-y-angle + (vector-! (new 'stack-no-clear 'vector) (get-trans (the-as process-focusable gp-0) 0) (-> self root trans)) + ) + ) + ) + ) + ) + (cond + ((or (< 5461.3335 f0-1) (and (-> self using-turn-anim) (< 910.2222 f0-1))) + (set! (-> self using-turn-anim) #t) + (seek-to-point-toward-point! + (-> self root) + (get-trans (the-as process-focusable gp-0) 0) + (-> self nav max-rotation-rate) + (seconds 0.2) + ) + ) + (else + (set! (-> self using-turn-anim) #f) + ) + ) + ) + ) + ) + (nav-enemy-simple-post) + 0 + (none) + ) + +;; definition for method 193 of type neo-juicer +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod spawn-proj! ((this neo-juicer) (arg0 process-focusable) (arg1 uint)) + (with-pp + (let ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 20))) + (s5-0 (new 'stack-no-clear 'projectile-init-by-other-params)) + ) + (when (not (handle->process (-> this current-projectile))) + (set! (-> s5-0 ent) (-> this 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 this)) + (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 this)) + (set! (-> s5-0 attack-id) arg1) + (set! (-> s5-0 timeout) (seconds 4)) + ) + (vector-normalize! (vector-! (-> s5-0 pos) (get-trans arg0 3) s4-0) 1.0) + (vector-float*! (-> s5-0 vel) (-> s5-0 pos) (* 24576.0 (-> pp clock frames-per-second))) + (vector+float*! (-> s5-0 pos) s4-0 (-> s5-0 pos) -1024.0) + (let ((a0-21 (handle->process (-> this current-projectile)))) + (if a0-21 + (send-event a0-21 'reset s5-0) + (set! (-> this current-projectile) + (ppointer->handle (spawn-projectile neo-juicer-shot s5-0 this *default-dead-pool*)) + ) + ) + ) + ) + (none) + ) + ) + +;; failed to figure out what this is: +(defstate attack (neo-juicer) + :virtual #t + :event enemy-event-handler + :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 + (set! (-> self torso-track-player) (the-as joint-mod #t)) + (logior! (-> self enemy-flags) (enemy-flag lock-focus)) + (set! (-> self hit-focus) #f) + (logior! (-> self focus-status) (focus-status dangerous)) + (let* ((v1-9 *game-info*) + (v0-0 (+ (-> v1-9 attack-id) 1)) + ) + (set! (-> v1-9 attack-id) v0-0) + (set! (-> self attack-id) v0-0) + ) + ) + :exit (behavior () + (set! (-> self torso-track-player) #f) + (logclear! (-> self enemy-flags) (enemy-flag lock-focus)) + (toggle-deadly-flag self #f) + (set-time! (-> self last-fire-time)) + (if (logtest? (-> self enemy-flags) (enemy-flag dangerous-backup)) + (logior! (-> self focus-status) (focus-status dangerous)) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + (send-event (handle->process (-> self current-projectile)) 'die) + ) + :trans (behavior () + '() + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! neo-juicer-attack0-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (if (< 11.0 (ja-aframe-num 0)) + (toggle-deadly-flag self #t) + ) + (suspend) + (ja :num! (seek!)) + ) + 0 + (let* ((gp-0 #f) + (v1-29 *game-info*) + (s5-0 (+ (-> v1-29 attack-id) 1)) + ) + (set! (-> v1-29 attack-id) s5-0) + (let ((s4-0 (current-time))) + (until (time-elapsed? s4-0 (seconds 0.25)) + (ja-no-eval :group! neo-juicer-attack0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((s3-0 (handle->process (-> self focus handle)))) + (when s3-0 + (when (< 28672.0 (vector-vector-distance (-> self root trans) (get-trans (the-as process-focusable s3-0) 0))) + (spawn-proj! self (the-as process-focusable s3-0) s5-0) + (current-time) + (if (not gp-0) + (set! gp-0 #t) + ) + ) + ) + ) + (if (and (logtest? (-> self enemy-flags) (enemy-flag victory)) (-> self enemy-info use-victory)) + (go-virtual victory) + ) + (b! + (not (and (-> self using-turn-anim) (let ((v1-73 (ja-group))) + (not (and v1-73 (= v1-73 neo-juicer-attack-turn-ja))) + ) + ) + ) + cfg-31 + :delay (empty-form) + ) + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! neo-juicer-attack-turn-ja) + (b! #t cfg-42 :delay (nop!)) + (label cfg-31) + (when (and (not (-> self using-turn-anim)) (let ((v1-84 (ja-group))) + (not (and v1-84 (= v1-84 neo-juicer-attack0-ja))) + ) + ) + (ja-channel-push! 1 (seconds 0.05)) + (ja :group! neo-juicer-attack0-ja) + ) + (label cfg-42) + (suspend) + (ja :num! (seek!)) + ) + (send-event (handle->process (-> self current-projectile)) 'die) + (let ((a0-37 (handle->process (-> self focus handle)))) + (when a0-37 + (if (>= 28672.0 (vector-vector-distance (-> self root trans) (get-trans (the-as process-focusable a0-37) 0))) + (go-virtual circling) + ) + ) + ) + (suspend) + ) + ) + ) + (if (-> self hit-focus) + (go-virtual victory) + ) + (go-hostile self) + ) + :post neo-juicer-face-player-post + ) + +;; failed to figure out what this is: +(defstate circling (neo-juicer) + :virtual #t + :code (behavior () + (let ((v1-2 (ja-group))) + (when (and v1-2 (or (= v1-2 neo-juicer-charge0-ja) (= v1-2 neo-juicer-charge1-ja))) + (ja-no-eval :num! (seek!)) + (while (not (ja-done? 0)) + (suspend) + (ja-eval) + ) + ) + ) + (until #f + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (nav-enemy-method-177 self) + (let* ((v1-22 (rnd-int self 2)) + (gp-0 (-> self draw art-group data (-> *neo-juicer-global-info* charge-anim v1-22 anim-index))) + ) + (set! (-> self charge-index) v1-22) + (let ((v1-25 (ja-group))) + (if (not (and v1-25 (= v1-25 gp-0))) + (ja-channel-push! 1 (seconds 0.15)) + ) + ) + (let ((s5-0 (+ (rnd-int self 6) 2)) + (f30-0 (rnd-float-range self 0.9 1.1)) + ) + (while (nonzero? s5-0) + (+! s5-0 -1) + (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)) + ) + ) + ) + ) + (when (< 20480.0 (vector-vector-xz-distance (-> self focus-pos) (-> self root trans))) + (nav-enemy-method-182 self) + (nav-enemy-method-184 self) + (vector-reset! (-> self root transv)) + (ja-channel-push! 1 (seconds 0.1)) + (let ((gp-2 (-> self draw art-group data (-> *neo-juicer-global-info* celebrate-anim (rnd-int self 2) anim-index))) + (f30-2 (rnd-float-range self 0.9 1.1)) + ) + (ja-no-eval :group! gp-2 :num! (seek! max f30-2) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-2)) + ) + ) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate hit (neo-juicer) + :virtual #t + :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-virtual hostile) + ) + ) + +;; failed to figure out what this is: +(defstate stare (neo-juicer) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 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) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate taunt (neo-juicer) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.6)) + (let ((f30-0 (rnd-float-range self 0.8 1.2))) + (let ((gp-0 (set-reaction-time! self (seconds 0.2) (seconds 0.7))) + (s5-0 (current-time)) + (f28-0 f30-0) + ) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info idle-anim)) + :num! (loop! f28-0) + :frame-num 0.0 + ) + (until (time-elapsed? s5-0 gp-0) + (suspend) + (ja :num! (loop! f28-0)) + ) + ) + (ja-channel-push! 1 (seconds 0.1)) + (ja-no-eval :group! (-> self draw art-group data (-> self enemy-info taunt-anim)) + :num! (seek! max f30-0) + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + (go-virtual stare) + ) + ) + +;; definition for method 85 of type neo-juicer +(defmethod knocked-anim ((this neo-juicer) (arg0 enemy-knocked-info)) + (local-vars (a2-2 int)) + (case (-> this incoming knocked-type) + (((knocked-type yellow-shot)) + (ja-channel-push! 1 0) + (let* ((a2-0 (ash 1 (-> *neo-juicer-global-info* prev-yellow-hit))) + (v1-3 (enemy-method-131 this 4 a2-0)) + (a1-6 (-> this draw art-group data (-> *neo-juicer-global-info* yellow-hit-anim v1-3 anim-index))) + ) + (set! (-> *neo-juicer-global-info* prev-yellow-hit) v1-3) + (let ((a0-13 (-> this skel root-channel 0))) + (set! (-> a0-13 frame-group) (the-as art-joint-anim a1-6)) + (set! (-> a0-13 param 0) (the float (+ (-> (the-as art-joint-anim a1-6) frames num-frames) -1))) + (set! (-> a0-13 param 1) (-> arg0 anim-speed)) + (set! (-> a0-13 frame-num) 0.0) + (joint-control-channel-group! a0-13 (the-as art-joint-anim a1-6) num-func-seek!) + ) + ) + ) + (((knocked-type blue-shot)) + (let ((v1-11 (ash 1 (-> *neo-juicer-global-info* prev-blue-hit)))) + (if (zero? (-> this charge-index)) + (set! a2-2 (logior v1-11 56)) + (set! a2-2 (logior v1-11 7)) + ) + ) + (let* ((v1-15 (enemy-method-131 this 6 a2-2)) + (s5-1 (-> this draw art-group data (-> *neo-juicer-global-info* blue-hit-anim v1-15 anim-index))) + ) + (set! (-> *neo-juicer-global-info* prev-blue-hit) v1-15) + (let ((v1-18 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + ) + (if (and v1-18 (= v1-18 (-> this draw art-group data 32))) + (ja-channel-push! 1 (seconds 0.17)) + (ja-channel-push! 1 (seconds 0.02)) + ) + ) + (let ((a0-32 (-> this skel root-channel 0))) + (set! (-> a0-32 frame-group) (the-as art-joint-anim s5-1)) + (set! (-> a0-32 param 0) (the float (+ (-> (the-as art-joint-anim s5-1) frames num-frames) -1))) + (set! (-> a0-32 param 1) 1.0) + (set! (-> a0-32 frame-num) 0.0) + (joint-control-channel-group! a0-32 (the-as art-joint-anim s5-1) num-func-seek!) + ) + ) + ) + (else + (let ((s4-1 (-> this draw art-group data (-> *neo-juicer-global-info* knocked-anim (rnd-int this 2) anim-index)))) + (ja-channel-push! 1 (seconds 0.17)) + (let ((a0-37 (-> this skel root-channel 0))) + (set! (-> a0-37 frame-group) (the-as art-joint-anim s4-1)) + (set! (-> a0-37 param 0) (the float (+ (-> (the-as art-joint-anim s4-1) frames num-frames) -1))) + (set! (-> a0-37 param 1) (-> arg0 anim-speed)) + (set! (-> a0-37 frame-num) 0.0) + (joint-control-channel-group! a0-37 (the-as art-joint-anim s4-1) num-func-seek!) + ) + ) + ) + ) + #t + ) + +;; definition for method 86 of type neo-juicer +(defmethod knocked-land-anim ((this neo-juicer) (arg0 enemy-knocked-info)) + (cond + ((= (-> this incoming knocked-type) (knocked-type blue-shot)) + (when (>= (-> this incoming blue-juggle-count) (the-as uint 2)) + (let ((s4-0 (-> this draw art-group data 32))) + (ja-channel-push! 1 (seconds 0.17)) + (let ((a0-3 (-> this skel root-channel 0))) + (set! (-> a0-3 frame-group) (the-as art-joint-anim s4-0)) + (set! (-> a0-3 param 0) (the float (+ (-> (the-as art-joint-anim s4-0) 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 s4-0) num-func-seek!) + ) + ) + #t + ) + ) + ((!= (-> this incoming knocked-type) (knocked-type yellow-shot)) + (let* ((v1-14 (if (> (-> this skel active-channels) 0) + (-> this skel root-channel 0 frame-group) + ) + ) + (s4-1 (if (and v1-14 (= v1-14 (-> this draw art-group data 18))) + (-> this draw art-group data 19) + (-> this draw art-group data 17) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.17)) + (let ((a0-10 (-> this skel root-channel 0))) + (set! (-> a0-10 frame-group) (the-as art-joint-anim s4-1)) + (set! (-> a0-10 param 0) (the float (+ (-> (the-as art-joint-anim s4-1) frames num-frames) -1))) + (set! (-> a0-10 param 1) (-> arg0 anim-speed)) + (set! (-> a0-10 frame-num) 0.0) + (joint-control-channel-group! a0-10 (the-as art-joint-anim s4-1) num-func-seek!) + ) + ) + #t + ) + ) + ) + +;; definition for method 196 of type neo-juicer +;; WARN: Return type mismatch symbol vs none. +(defmethod toggle-deadly-flag ((this neo-juicer) (arg0 symbol)) + (let ((v1-1 (-> this root root-prim))) + (dotimes (a0-1 (the-as int (-> v1-1 specific 0))) + (let ((a2-1 (-> (the-as collide-shape-prim-group v1-1) child a0-1))) + (if arg0 + (logior! (-> a2-1 prim-core action) (collide-action deadly)) + (logclear! (-> a2-1 prim-core action) (collide-action deadly)) + ) + ) + ) + ) + (none) + ) + +;; definition for method 108 of type neo-juicer +(defmethod enemy-method-108 ((this neo-juicer) (arg0 process-focusable)) + (focus-test? arg0 invulnerable) + ) + +;; definition for method 120 of type neo-juicer +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this neo-juicer)) + (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 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 deadly no-standon)) + (set! (-> s4-0 transform-index) 21) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 -4096.0 18432.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 no-standon)) + (set-vector! (-> v1-14 local-sphere) 0.0 6144.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 enemy)) + (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) 6) + (set-vector! (-> v1-16 local-sphere) 0.0 0.0 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 solid)) + (set! (-> v1-18 transform-index) 16) + (set-vector! (-> v1-18 local-sphere) 0.0 0.0 0.0 2048.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 solid)) + (set! (-> v1-20 transform-index) 11) + (set-vector! (-> v1-20 local-sphere) 0.0 0.0 0.0 2048.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 bot player-list)) + (set! (-> v1-22 prim-core action) (collide-action solid)) + (set! (-> v1-22 transform-index) 34) + (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 solid)) + (set! (-> v1-24 transform-index) 20) + (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 los-blocker)) + (set! (-> v1-26 prim-core action) (collide-action solid)) + (set-vector! (-> v1-26 local-sphere) 0.0 8192.0 0.0 8192.0) + ) + (set! (-> s5-0 nav-radius) 8192.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 neo-juicer +(defmethod relocate ((this neo-juicer) (offset int)) + (if (nonzero? (-> this intro-path)) + (&+! (-> this intro-path) offset) + ) + (if (nonzero? (-> this joint)) + (&+! (-> this joint) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 121 of type neo-juicer +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this neo-juicer)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-neo-juicer" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *neo-juicer-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! (-> this last-fire-time) 0) + (set! (-> this heading) (if (rand-vu-percent? 0.5) + #t + #f + ) + ) + (set! (-> this move-angle) 5461.3335) + (set! (-> this torso-track-player) #f) + (init-los! (-> this los) this (seconds 0.2) 327680.0 (collide-spec backgnd hit-by-others-list los-blocker)) + (set! (-> this joint) (new 'process 'joint-mod (joint-mod-mode polar-look-at) this 5)) + (set! (-> this using-turn-anim) #f) + (let ((v1-18 (new 'process 'path-control this 'intro 0.0 (the-as entity #f) #t))) + (set! (-> this intro-path) v1-18) + (if (nonzero? v1-18) + (logior! (-> v1-18 flags) (path-control-flag display draw-line draw-point draw-text)) + ) + ) + (add-connection + *part-engine* + this + 34 + this + 468 + (new 'static 'vector :x 901.12 :y -1146.88 :z 1269.76 :w 163840.0) + ) + (add-connection + *part-engine* + this + 34 + this + 468 + (new 'static 'vector :x -901.12 :y -1146.88 :z 1269.76 :w 163840.0) + ) + (add-connection *part-engine* this 20 this 5005 (new 'static 'vector :w 163840.0)) + (set! (-> this root pause-adjust-distance) 81920.0) + (set! (-> this current-projectile) (the-as handle #f)) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/sewer/saberfish-spawner_REF.gc b/test/decompiler/reference/jak3/levels/sewer/saberfish-spawner_REF.gc new file mode 100644 index 0000000000..83b3a88a53 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/saberfish-spawner_REF.gc @@ -0,0 +1,1696 @@ +;;-*-Lisp-*- +(in-package goal) + +;; 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 1)) + +;; definition of type nav-mesh-jump +(deftype nav-mesh-jump (structure) + ((mesh nav-mesh) + (paths path-index-array) + (in-water? symbol) + ) + ) + +;; definition for method 3 of type nav-mesh-jump +(defmethod inspect ((this nav-mesh-jump)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'nav-mesh-jump) + (format #t "~1Tmesh: ~A~%" (-> this mesh)) + (format #t "~1Tpaths: ~A~%" (-> this paths)) + (format #t "~1Tin-water?: ~A~%" (-> this in-water?)) + (label cfg-4) + this + ) + +;; definition of type nav-mesh-jump-array +(deftype nav-mesh-jump-array (inline-array-class) + ((data nav-mesh-jump :inline :dynamic) + ) + ) + +;; definition for method 3 of type nav-mesh-jump-array +(defmethod inspect ((this nav-mesh-jump-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-mesh-jump-array heap-base) (the-as uint 16)) + +;; definition of type saberfish-spawner-command +(deftype saberfish-spawner-command (structure) + ((command symbol) + (message symbol) + (initial-state symbol) + (parent handle) + ) + ) + +;; definition for method 3 of type saberfish-spawner-command +(defmethod inspect ((this saberfish-spawner-command)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'saberfish-spawner-command) + (format #t "~1Tcommand: ~A~%" (-> this command)) + (format #t "~1Tmessage: ~A~%" (-> this message)) + (format #t "~1Tinitial-state: ~A~%" (-> this initial-state)) + (format #t "~1Tparent: ~D~%" (-> this parent)) + (label cfg-4) + this + ) + +;; definition of type saberfish-spawn-query +(deftype saberfish-spawn-query (structure) + ((alive-count int16) + ) + ) + +;; definition for method 3 of type saberfish-spawn-query +(defmethod inspect ((this saberfish-spawn-query)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'saberfish-spawn-query) + (format #t "~1Talive-count: ~D~%" (-> this alive-count)) + (label cfg-4) + this + ) + +;; definition of type saberfish-spawner +(deftype saberfish-spawner (process-drawable) + ((jump-paths (array path-control)) + (nav-mesh-jumps nav-mesh-jump-array) + (live-count int8) + (last-spawned-process handle) + (mgr-parent handle) + (spawned-saberfish handle 128) + (num-spawned-saberfish int32) + ) + (:state-methods + saberfish-spawner-base-state + ) + (:methods + (saberfish-spawner-method-21 (_type_) none) + (saberfish-spawner-method-22 (_type_ vector saberfish-find-behavior) int) + (draw-paths (_type_) none) + (saberfish-spawner-method-24 (_type_ saberfish) int) + (spawn-saberfish (_type_ symbol symbol process) none) + (saberfish-spawner-method-26 (_type_ process int symbol event-message-block) object) + ) + ) + +;; definition for method 3 of type saberfish-spawner +(defmethod inspect ((this saberfish-spawner)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tjump-paths: ~A~%" (-> this jump-paths)) + (format #t "~2Tnav-mesh-jumps: ~A~%" (-> this nav-mesh-jumps)) + (format #t "~2Tlive-count: ~D~%" (-> this live-count)) + (format #t "~2Tlast-spawned-process: ~D~%" (-> this last-spawned-process)) + (format #t "~2Tmgr-parent: ~D~%" (-> this mgr-parent)) + (format #t "~2Tspawned-saberfish[128] @ #x~X~%" (-> this spawned-saberfish)) + (format #t "~2Tnum-spawned-saberfish: ~D~%" (-> this num-spawned-saberfish)) + (label cfg-4) + this + ) + +;; definition for method 11 of type saberfish-spawner +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this saberfish-spawner) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (process-entity-set! this arg0) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (set! (-> this num-spawned-saberfish) 0) + (set! (-> this last-spawned-process) (the-as handle #f)) + (let ((s5-1 0)) + (let ((s4-0 (-> ((method-of-type res-lump lookup-tag-idx) (-> this entity) 'path 'base -1000000000.0) lo))) + (when (>= (the-as int s4-0) 0) + (let ((s3-0 (the-as int s4-0)) + (v1-6 (-> this entity tag s4-0)) + ) + 0 + (while (= (-> v1-6 name) (-> this entity tag s4-0 name)) + (make-property-data (-> this entity) 0.0 (the-as res-tag-pair s3-0) (the-as pointer #f)) + (+! s5-1 1) + (+! s3-0 1) + (set! v1-6 (-> this entity tag s3-0)) + ) + ) + ) + ) + (let ((a3-2 (* (/ s5-1 2) 2))) + (set! (-> this jump-paths) (new 'process 'boxed-array path-control a3-2)) + ) + ) + 0.0 + (dotimes (s5-2 (-> this jump-paths length)) + (set! (-> this jump-paths s5-2) + (new 'process 'path-control this 'path (the float s5-2) (the-as entity #f) #f) + ) + (logior! (-> this jump-paths s5-2 flags) (path-control-flag display draw-line draw-point draw-text)) + ) + 0 + (set! sv-16 (new 'static 'res-tag)) + (res-lump-struct (-> this entity) 'nav-mesh-actor structure :tag-ptr (& sv-16)) + (let ((s5-3 (-> sv-16 elt-count))) + (set! (-> this nav-mesh-jumps) (new 'process 'nav-mesh-jump-array (the-as int s5-3))) + (dotimes (s4-1 (the-as int s5-3)) + (let ((v1-38 (nav-mesh-from-res-tag (-> this entity) 'nav-mesh-actor s4-1))) + (if v1-38 + (set! (-> this nav-mesh-jumps data s4-1 mesh) v1-38) + ) + ) + ) + ) + (saberfish-spawner-method-21 this) + (let ((f0-3 (res-lump-float (-> this entity) 'rotoffset))) + (quaternion-rotate-y! (-> this root quat) (-> this root quat) f0-3) + ) + (let ((t9-13 (method-of-type res-lump get-property-struct)) + (a0-32 (-> this entity)) + (a1-16 'trans-offset) + (a2-9 'interp) + (a3-6 -1000000000.0) + (t0-3 (new 'stack-no-clear 'vector)) + ) + (set! (-> t0-3 x) 0.0) + (set! (-> t0-3 y) 0.0) + (set! (-> t0-3 z) 0.0) + (set! (-> t0-3 w) 1.0) + (let ((v1-49 (the-as vector (t9-13 a0-32 a1-16 a2-9 a3-6 t0-3 (the-as (pointer res-tag) #f) *res-static-buf*)))) + (vector+! (-> this root trans) (-> this root trans) v1-49) + ) + ) + (go (method-of-object this saberfish-spawner-base-state)) + ) + +;; failed to figure out what this is: +(defstate saberfish-spawner-base-state (saberfish-spawner) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (saberfish-spawner-method-26 self proc argc message block) + ) + :enter (behavior () + '() + ) + :trans (behavior () + (draw-paths self) + ) + :code sleep-code + ) + +;; definition for symbol *temporary-closest-nav-mesh-indices*, type (pointer int8) +(define *temporary-closest-nav-mesh-indices* (new 'static 'array int8 64 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ) + ) + +;; definition for symbol *temporary-num-paths-per-nav-mesh-count*, type (pointer uint8) +(define *temporary-num-paths-per-nav-mesh-count* (the-as (pointer uint8) (new 'static 'array int8 64 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ) + ) + ) + +;; definition for method 21 of type saberfish-spawner +;; WARN: Return type mismatch symbol vs none. +(defmethod saberfish-spawner-method-21 ((this saberfish-spawner)) + (dotimes (v1-0 64) + (set! (-> *temporary-closest-nav-mesh-indices* v1-0) -1) + (set! (-> *temporary-num-paths-per-nav-mesh-count* v1-0) (the-as uint 0)) + ) + (dotimes (s5-0 (-> this jump-paths length)) + (let ((a0-5 (-> this jump-paths s5-0))) + -1 + (let ((s4-0 (new 'stack-no-clear 'vector))) + (get-point-at-percent-along-path! a0-5 s4-0 0.5 'interp) + (let ((v1-9 (saberfish-spawner-method-22 this s4-0 (saberfish-find-behavior none)))) + (set! (-> *temporary-closest-nav-mesh-indices* s5-0) v1-9) + (cond + ((>= v1-9 0) + (+! (-> *temporary-num-paths-per-nav-mesh-count* v1-9) 1) + ) + (else + ) + ) + ) + ) + ) + ) + (dotimes (s5-1 (-> this nav-mesh-jumps length)) + (let* ((s4-1 (-> this nav-mesh-jumps data s5-1)) + (s3-0 s5-1) + (a2-2 (-> *temporary-num-paths-per-nav-mesh-count* s3-0)) + (s2-0 0) + ) + (set! (-> s4-1 paths) (new 'process 'path-index-array (the-as int a2-2))) + (dotimes (v1-20 (-> this jump-paths length)) + (when (= (-> *temporary-closest-nav-mesh-indices* v1-20) s3-0) + (set! (-> s4-1 paths data s2-0) v1-20) + (set! (-> s4-1 in-water?) (= (logand v1-20 1) 1)) + (+! s2-0 1) + ) + ) + ) + ) + (none) + ) + +;; definition for method 22 of type saberfish-spawner +(defmethod saberfish-spawner-method-22 ((this saberfish-spawner) (arg0 vector) (arg1 saberfish-find-behavior)) + (local-vars (v1-16 float) (sv-64 nav-poly) (sv-72 int) (sv-80 number) (sv-84 vector) (sv-88 symbol)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (set! sv-64 (new 'stack-no-clear 'nav-poly)) + (set! sv-72 -1) + (set! sv-80 24576.0) + (set! sv-84 arg0) + (set! sv-88 (in-water<-find-behavior arg1)) + (set! (-> sv-64 data 20) (the-as uint 7)) + (dotimes (s4-0 (-> this nav-mesh-jumps length)) + (let ((a0-4 (-> this nav-mesh-jumps data s4-0 mesh))) + (when a0-4 + (when (or (= arg1 (saberfish-find-behavior none)) (= (-> this nav-mesh-jumps data s4-0 in-water?) sv-88)) + (vector-! (the-as vector (-> sv-64 vertex)) sv-84 (the-as vector (-> a0-4 bounds))) + (.lvf vf1 (&-> (-> sv-64 vertex) 0 quad)) + (.add.w.vf vf2 vf0 vf0 :mask #b1) + (.mul.vf vf1 vf1 vf1) + (.mul.x.vf acc vf2 vf1 :mask #b1) + (.add.mul.y.vf acc vf2 vf1 acc :mask #b1) + (.add.mul.z.vf vf1 vf2 vf1 acc :mask #b1) + (.mov v1-16 vf1) + (let ((f0-1 v1-16) + (f1-0 (-> a0-4 bounds r)) + ) + (when (< f0-1 (* f1-0 f1-0)) + (set! (-> sv-64 vertex1 x) 409600.0) + (nav-mesh-method-46 a0-4 sv-64) + (when (>= (the-as float sv-80) (-> sv-64 vertex1 w)) + (set! sv-80 (-> sv-64 vertex1 w)) + (set! sv-72 s4-0) + ) + ) + ) + ) + ) + ) + ) + sv-72 + ) + ) + +;; definition for method 7 of type saberfish-spawner +(defmethod relocate ((this saberfish-spawner) (offset int)) + (when (nonzero? (-> this jump-paths)) + (dotimes (v1-2 (-> this jump-paths length)) + (if (nonzero? (-> this jump-paths v1-2)) + (&+! (-> this jump-paths v1-2) offset) + ) + ) + ) + (when (nonzero? (-> this nav-mesh-jumps)) + (dotimes (v1-7 (-> this nav-mesh-jumps length)) + (if (nonzero? (-> this nav-mesh-jumps data v1-7 paths)) + (&+! (-> this nav-mesh-jumps data v1-7 paths) offset) + ) + ) + ) + (if (nonzero? (-> this jump-paths)) + (&+! (-> this jump-paths) offset) + ) + (if (nonzero? (-> this nav-mesh-jumps)) + (&+! (-> this nav-mesh-jumps) offset) + ) + (call-parent-method this offset) + ) + +;; definition for method 23 of type saberfish-spawner +;; WARN: Return type mismatch symbol vs none. +(defmethod draw-paths ((this saberfish-spawner)) + (dotimes (s5-0 (-> this jump-paths length)) + (debug-draw (-> this jump-paths s5-0)) + ) + (none) + ) + +;; definition for method 24 of type saberfish-spawner +;; INFO: Used lq/sq +(defmethod saberfish-spawner-method-24 ((this saberfish-spawner) (arg0 saberfish)) + (local-vars + (sv-48 float) + (sv-56 int) + (sv-64 number) + (sv-68 vector) + (sv-72 vector) + (sv-160 (function path-control vector vector symbol float)) + (sv-176 vector) + (sv-192 vector) + (sv-208 vector) + ) + (set! (-> arg0 dest-nav-mesh-index) (-> arg0 desired-dest-mesh-index)) + (set! sv-48 (the-as float -1.0)) + (set! sv-56 -1) + (set! sv-64 40960000000.0) + (let ((v1-4 (new 'stack-no-clear 'vector))) + (set! (-> v1-4 quad) (-> arg0 root trans quad)) + (set! sv-68 v1-4) + ) + (set! sv-72 (new 'stack-no-clear 'vector)) + (cond + ((saberfish-method-243 arg0) + (vector-! sv-72 (-> arg0 desired-dest-nav-point) (-> arg0 root trans)) + (set! (-> sv-72 y) 0.0) + ) + (else + (vector-z-quaternion! sv-72 (-> arg0 root quat)) + (set! (-> sv-72 y) 0.0) + (vector-normalize! sv-72 61440.0) + ) + ) + (set! sv-56 -1) + (when (>= (-> arg0 current-nav-mesh-index) 0) + (let ((s4-0 (-> this nav-mesh-jumps data (-> arg0 current-nav-mesh-index)))) + (dotimes (s3-0 (-> s4-0 paths length)) + (let* ((s2-0 (-> s4-0 paths data s3-0)) + (s1-0 (-> this jump-paths s2-0)) + ) + 0.0 + 0.0 + (let* ((f0-6 (cond + (#f + (path-control-method-23 s1-0 sv-68) + ) + (else + (let ((s0-0 s1-0)) + (set! sv-160 (method-of-object s0-0 path-control-method-28)) + (set! sv-176 sv-68) + (set! sv-192 sv-72) + (let ((a3-0 (not (saberfish-method-243 arg0)))) + (sv-160 s0-0 sv-176 sv-192 a3-0) + ) + ) + ) + ) + ) + (f30-0 (fmax 0.0 (fmin 1.0 f0-6))) + (s0-1 vector-vector-xz-distance) + ) + (set! sv-208 sv-68) + (let* ((a1-8 (get-point-at-percent-along-path! s1-0 (new 'stack-no-clear 'vector) f30-0 'interp)) + (f0-8 (s0-1 sv-208 a1-8)) + ) + (when (< f0-8 (the-as float sv-64)) + (set! sv-64 f0-8) + (set! sv-56 s2-0) + (set! sv-48 f30-0) + ) + ) + ) + ) + ) + ) + ) + (cond + ((>= sv-56 0) + (let* ((v1-41 (if (saberfish-method-243 arg0) + -1 + 1 + ) + ) + (s3-1 (-> this jump-paths sv-56)) + (s4-1 (-> this jump-paths (+ sv-56 v1-41))) + ) + (if (or (< (+ sv-56 v1-41) 0) (>= (+ sv-56 v1-41) (-> this jump-paths length))) + (return 0) + ) + (let ((s2-1 (new 'stack-no-clear 'vector)) + (s5-1 (new 'stack-no-clear 'vector)) + ) + (let ((s0-2 (new 'stack-no-clear 'vector)) + (s1-1 (new 'stack-no-clear 'vector)) + (f30-1 0.4) + ) + (get-point-at-percent-along-path! s3-1 (-> arg0 jump-point-start) sv-48 'interp) + (if (saberfish-method-243 arg0) + (set! f30-1 0.24) + ) + (vector-! s5-1 (-> arg0 jump-point-start) (-> arg0 root trans)) + (get-point-at-percent-along-path! s3-1 s0-2 (+ -0.05 sv-48) 'interp) + (get-point-at-percent-along-path! s3-1 s1-1 (+ 0.05 sv-48) 'interp) + (vector-! s2-1 s1-1 s0-2) + (vector-normalize! s2-1 1.0) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + (when (< f30-1 (fabs (vector-dot s5-1 s2-1))) + (set! sv-48 (path-control-method-23 s3-1 sv-68)) + (get-point-at-percent-along-path! s3-1 (-> arg0 jump-point-start) sv-48 'interp) + ) + ) + (cond + ((saberfish-method-243 arg0) + (let ((f0-20 (path-control-method-28 s4-1 (-> arg0 jump-point-start) sv-72 #f))) + (get-point-at-percent-along-path! s4-1 (-> arg0 jump-point-end) f0-20 'interp) + ) + ) + (else + (let ((f0-21 (path-control-method-23 s4-1 (-> arg0 jump-point-start)))) + (get-point-at-percent-along-path! s4-1 (-> arg0 jump-point-end) f0-21 'interp) + ) + ) + ) + (vector-! s5-1 (-> arg0 jump-point-end) (-> arg0 jump-point-start)) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 1.0) + ) + ) + (let ((v1-74 (-> arg0 nav state)) + (a0-46 (-> arg0 jump-point-start)) + ) + (logclear! (-> v1-74 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-74 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-74 target-pos quad) (-> a0-46 quad)) + ) + 0 + ) + (else + ) + ) + 0 + ) + +;; definition for method 26 of type saberfish-spawner +(defmethod saberfish-spawner-method-26 ((this saberfish-spawner) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (local-vars (v0-0 object)) + (case arg2 + (('transition-terrain-begin) + (saberfish-spawner-method-24 this (the-as saberfish arg0)) + ) + (('saberfish-query) + (let ((gp-0 (the-as saberfish-spawner-query-msg (-> arg3 param 0)))) + (case (-> gp-0 query-type) + (((saberfish-query-type set-nav-idx)) + (set! v0-0 (saberfish-spawner-method-22 this (the-as vector (&-> gp-0 mesh)) (-> gp-0 behavior))) + (set! (-> gp-0 closest-nav-mesh-index) (the-as int v0-0)) + v0-0 + ) + (((saberfish-query-type set-mesh)) + (set! v0-0 (-> this nav-mesh-jumps data (-> gp-0 closest-nav-mesh-index) mesh)) + (set! (-> gp-0 mesh) (the-as nav-mesh v0-0)) + v0-0 + ) + (((saberfish-query-type set-in-water)) + (set! v0-0 (-> this nav-mesh-jumps data (-> gp-0 closest-nav-mesh-index) in-water?)) + (set! (-> gp-0 in-water?) (the-as symbol v0-0)) + v0-0 + ) + (((saberfish-query-type can-go-to-ground?)) + (send-event (handle->process (-> this mgr-parent)) 'query-can-go-to-ground? gp-0) + ) + ) + ) + ) + (('spawn-command) + (set! (-> this mgr-parent) (process->handle arg0)) + (let ((v1-17 (the-as saberfish-spawner-command (-> arg3 param 0)))) + (case (-> v1-17 command) + (('spawn-enemy) + (spawn-saberfish this (-> v1-17 message) (-> v1-17 initial-state) (handle->process (-> v1-17 parent))) + ) + ) + ) + ) + (('child-die) + (set! v0-0 (+ (-> this live-count) -1)) + (set! (-> this live-count) (the-as int v0-0)) + v0-0 + ) + (('saberfish-spawn-query) + (let ((v1-22 (the-as saberfish-spawn-query (-> arg3 param 0)))) + (set! v0-0 (-> this live-count)) + (set! (-> v1-22 alive-count) (the-as int v0-0)) + ) + v0-0 + ) + (('saberfish-ground-query) + (let ((v1-23 (the-as saberfish-spawn-query (-> arg3 param 0)))) + (set! (-> v1-23 alive-count) 0) + (dotimes (a1-21 (-> this num-spawned-saberfish)) + (let ((a2-14 (-> this spawned-saberfish a1-21))) + (when (handle->process a2-14) + (let ((a2-15 (the-as saberfish (handle->process a2-14)))) + (if (or (= (-> a2-15 ground-state) 4) + (and (-> a2-15 next-state) (let ((a2-19 (-> a2-15 next-state name))) + (or (= a2-19 'transition-terrain-move-towards-initial-jump) + (= a2-19 'jump) + (= a2-19 'transition-terrain-jump-from-water) + ) + ) + ) + ) + (+! (-> v1-23 alive-count) 1) + ) + ) + ) + ) + ) + ) + #f + ) + (('forward-event) + (send-event + (handle->process (-> this last-spawned-process)) + (the-as symbol (-> arg3 param 0)) + (-> arg3 param 1) + ) + ) + ) + ) + +;; definition for method 25 of type saberfish-spawner +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod spawn-saberfish ((this saberfish-spawner) (arg0 symbol) (arg1 symbol) (arg2 process)) + (if (not arg2) + (set! arg2 this) + ) + (let ((s4-0 (new 'stack-no-clear 'saberfish-init-by-other-params))) + (if (= arg1 'saberfish-crawl-out-of-tube) + (sound-play "sf-spawner") + ) + (set! (-> s4-0 trans quad) (-> this entity extra trans quad)) + (quaternion-copy! (-> s4-0 quat) (-> this entity quat)) + (set! (-> s4-0 entity) (-> this entity)) + (set! (-> s4-0 directed?) #f) + (set! (-> s4-0 no-initial-move-to-ground?) #f) + (set! (-> s4-0 art-level) #f) + (set! (-> s4-0 spawn-parent) (process->handle this)) + (set! (-> s4-0 message) arg0) + (set! (-> s4-0 initial-state) arg1) + (set! (-> s4-0 pos quad) (-> this root trans quad)) + (quaternion-copy! (-> s4-0 orient) (-> this root quat)) + (set! (-> this last-spawned-process) + (ppointer->handle (process-spawn saberfish this s4-0 :name "saberfish" :to arg2)) + ) + ) + (+! (-> this live-count) 1) + (set! (-> this spawned-saberfish (-> this num-spawned-saberfish)) (-> this last-spawned-process)) + (+! (-> this num-spawned-saberfish) 1) + (when (>= (-> this num-spawned-saberfish) 128) + (set! (-> this num-spawned-saberfish) 0) + 0 + ) + 0 + (none) + ) + +;; definition of type saberfish-spawn-manager-base +(deftype saberfish-spawn-manager-base (process) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + (total-num-spawned int32) + (total-alive int32) + (spawn-timer time-frame) + (state-time time-frame) + (allowed-on-land-count int8) + ) + (:state-methods + active + idle + ) + (:methods + (go-active (_type_) object) + (get-alive-count (_type_) int) + (get-alive-count-grounded (_type_ int) int) + ) + ) + +;; definition for method 3 of type saberfish-spawn-manager-base +(defmethod inspect ((this saberfish-spawn-manager-base)) + (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-num-spawned: ~D~%" (-> this total-num-spawned)) + (format #t "~2Ttotal-alive: ~D~%" (-> this total-alive)) + (format #t "~2Tspawn-timer: ~D~%" (-> this spawn-timer)) + (format #t "~2Tstate-time: ~D~%" (-> this state-time)) + (format #t "~2Tallowed-on-land-count: ~D~%" (-> this allowed-on-land-count)) + (label cfg-7) + this + ) + +;; definition for method 11 of type saberfish-spawn-manager-base +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this saberfish-spawn-manager-base) (arg0 entity-actor)) + (local-vars (sv-16 res-tag)) + (set-setting! 'gem-pool-index #f 0.0 2) + (set! sv-16 (new 'static 'res-tag)) + (let ((v1-3 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-3 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-3)) + (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 allowed-on-land-count) 2) + (logclear! (-> this mask) (process-mask actor-pause)) + (set! (-> this total-num-spawned) 0) + (set! (-> this total-alive) 0) + (set! (-> this spawn-timer) 0) + (go-active this) + ) + +;; definition for method 18 of type saberfish-spawn-manager-base +(defmethod get-alive-count-grounded ((this saberfish-spawn-manager-base) (arg0 int)) + (with-pp + (let ((s4-0 (new 'stack-no-clear 'saberfish-spawn-query)) + (gp-0 0) + ) + (dotimes (s3-0 (-> this actor-group-count)) + (dotimes (s2-0 (-> this actor-group s3-0 length)) + (set! (-> s4-0 alive-count) 0) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) (process->ppointer pp)) + (set! (-> a1-1 num-params) 1) + (set! (-> a1-1 message) 'saberfish-ground-query) + (set! (-> a1-1 param 0) (the-as uint s4-0)) + (let ((t9-0 send-event-function) + (v1-7 (-> this actor-group s3-0 data s2-0 actor)) + ) + (t9-0 + (if v1-7 + (-> v1-7 extra process) + ) + a1-1 + ) + ) + ) + (+! gp-0 (-> s4-0 alive-count)) + ) + ) + gp-0 + ) + ) + ) + +;; definition for method 17 of type saberfish-spawn-manager-base +(defmethod get-alive-count ((this saberfish-spawn-manager-base)) + (with-pp + (let ((s4-0 (new 'stack-no-clear 'saberfish-spawn-query)) + (gp-0 0) + ) + (dotimes (s3-0 (-> this actor-group-count)) + (dotimes (s2-0 (-> this actor-group s3-0 length)) + (set! (-> s4-0 alive-count) 0) + (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) 'saberfish-spawn-query) + (set! (-> a1-0 param 0) (the-as uint s4-0)) + (let ((t9-0 send-event-function) + (v1-7 (-> this actor-group s3-0 data s2-0 actor)) + ) + (t9-0 + (if v1-7 + (-> v1-7 extra process) + ) + a1-0 + ) + ) + ) + (+! gp-0 (-> s4-0 alive-count)) + ) + ) + gp-0 + ) + ) + ) + +;; failed to figure out what this is: +(defstate active (saberfish-spawn-manager-base) + :virtual #t + :trans (behavior () + '() + ) + :code (behavior () + (until #f + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate idle (saberfish-spawn-manager-base) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual active) + ) + ) + ) + :code sleep-code + ) + +;; definition for function saberfish-mgr-event-handler +(defbehavior saberfish-mgr-event-handler saberfish-spawn-manager-base ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('trigger) + (if (and (-> self next-state) (= (-> self next-state name) 'idle)) + (go-virtual active) + ) + ) + (('query-can-go-to-ground?) + (let ((gp-0 (the-as saberfish-spawner-query-msg (-> arg3 param 0))) + (v0-0 (the-as object (< (get-alive-count-grounded self arg1) (-> self allowed-on-land-count)))) + ) + (set! (-> gp-0 in-water?) (the-as symbol v0-0)) + v0-0 + ) + ) + ) + ) + +;; definition for method 16 of type saberfish-spawn-manager-base +(defmethod go-active ((this saberfish-spawn-manager-base)) + (go (method-of-object this active)) + ) + +;; definition of type saberfish-mgr-room1 +(deftype saberfish-mgr-room1 (saberfish-spawn-manager-base) + () + ) + +;; definition for method 3 of type saberfish-mgr-room1 +(defmethod inspect ((this saberfish-mgr-room1)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type saberfish-spawn-manager-base inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate active (saberfish-mgr-room1) + :virtual #t + :event saberfish-mgr-event-handler + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + '() + ) + :code (behavior () + (let ((gp-0 (new 'stack-no-clear 'saberfish-spawner-command)) + (s4-0 (-> self actor-group 0 data)) + (s5-0 (-> self actor-group 0 data 1)) + ) + (set! (-> gp-0 parent) (process->handle self)) + (set! (-> gp-0 command) 'spawn-enemy) + (set! (-> gp-0 initial-state) 'saberfish-crawl-out-of-tube) + (set! (-> self allowed-on-land-count) 2) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.1)) + (suspend) + ) + (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) 'spawn-command) + (set! (-> a1-0 param 0) (the-as uint gp-0)) + (let ((t9-0 send-event-function) + (v1-20 (-> s4-0 0 actor)) + ) + (t9-0 + (if v1-20 + (-> v1-20 extra process) + ) + a1-0 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.5)) + (suspend) + ) + (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) 'spawn-command) + (set! (-> a1-1 param 0) (the-as uint gp-0)) + (let ((t9-1 send-event-function) + (v1-33 (-> s5-0 actor)) + ) + (t9-1 + (if v1-33 + (-> v1-33 extra process) + ) + a1-1 + ) + ) + ) + (until (>= 1 (get-alive-count self)) + (suspend) + ) + (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) 'spawn-command) + (set! (-> a1-2 param 0) (the-as uint gp-0)) + (let ((t9-3 send-event-function) + (v1-43 (-> s4-0 0 actor)) + ) + (t9-3 + (if v1-43 + (-> v1-43 extra process) + ) + a1-2 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 1.5)) + (suspend) + ) + (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) 'spawn-command) + (set! (-> a1-3 param 0) (the-as uint gp-0)) + (let ((t9-4 send-event-function) + (v1-56 (-> s5-0 actor)) + ) + (t9-4 + (if v1-56 + (-> v1-56 extra process) + ) + a1-3 + ) + ) + ) + (until (>= 2 (get-alive-count self)) + (suspend) + ) + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer self)) + (set! (-> a1-4 num-params) 1) + (set! (-> a1-4 message) 'spawn-command) + (set! (-> a1-4 param 0) (the-as uint gp-0)) + (let ((t9-6 send-event-function) + (v1-66 (-> s4-0 0 actor)) + ) + (t9-6 + (if v1-66 + (-> v1-66 extra process) + ) + a1-4 + ) + ) + ) + (set! (-> self allowed-on-land-count) 3) + (until (>= 1 (get-alive-count self)) + (suspend) + ) + (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) 'spawn-command) + (set! (-> a1-5 param 0) (the-as uint gp-0)) + (let ((t9-8 send-event-function) + (v1-77 (-> s5-0 actor)) + ) + (t9-8 + (if v1-77 + (-> v1-77 extra process) + ) + a1-5 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.3)) + (suspend) + ) + (let ((a1-6 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-6 from) (process->ppointer self)) + (set! (-> a1-6 num-params) 1) + (set! (-> a1-6 message) 'spawn-command) + (set! (-> a1-6 param 0) (the-as uint gp-0)) + (let ((t9-9 send-event-function) + (v1-90 (-> s4-0 0 actor)) + ) + (t9-9 + (if v1-90 + (-> v1-90 extra process) + ) + a1-6 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.7)) + (suspend) + ) + (let ((a1-7 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-7 from) (process->ppointer self)) + (set! (-> a1-7 num-params) 1) + (set! (-> a1-7 message) 'spawn-command) + (set! (-> a1-7 param 0) (the-as uint gp-0)) + (let ((t9-10 send-event-function) + (v1-102 (-> s4-0 0 actor)) + ) + (t9-10 + (if v1-102 + (-> v1-102 extra process) + ) + a1-7 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 2.5)) + (suspend) + ) + (let ((a1-8 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-8 from) (process->ppointer self)) + (set! (-> a1-8 num-params) 1) + (set! (-> a1-8 message) 'spawn-command) + (set! (-> a1-8 param 0) (the-as uint gp-0)) + (let ((t9-11 send-event-function) + (v1-115 (-> s5-0 actor)) + ) + (t9-11 + (if v1-115 + (-> v1-115 extra process) + ) + a1-8 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 1)) + (suspend) + ) + (until (>= 3 (get-alive-count self)) + (suspend) + ) + (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) 'spawn-command) + (set! (-> a1-9 param 0) (the-as uint gp-0)) + (let ((t9-13 send-event-function) + (v1-130 (-> s5-0 actor)) + ) + (t9-13 + (if v1-130 + (-> v1-130 extra process) + ) + a1-9 + ) + ) + ) + ) + (until #f + (suspend) + ) + #f + ) + ) + +;; definition for method 16 of type saberfish-mgr-room1 +(defmethod go-active ((this saberfish-mgr-room1)) + (go (method-of-object this idle)) + ) + +;; definition of type saberfish-mgr-room2 +(deftype saberfish-mgr-room2 (saberfish-spawn-manager-base) + () + (:state-methods + stage-0 + stage-1 + stage-2 + ) + ) + +;; definition for method 3 of type saberfish-mgr-room2 +(defmethod inspect ((this saberfish-mgr-room2)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type saberfish-spawn-manager-base inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 16 of type saberfish-mgr-room2 +(defmethod go-active ((this saberfish-mgr-room2)) + (cond + ((task-node-closed? (game-task-node sewer-kg-met-button0-pressed)) + (process-entity-status! this (entity-perm-status dead) #t) + (go empty-state) + ) + (else + (go (method-of-object this stage-0)) + ) + ) + ) + +;; failed to figure out what this is: +(defstate stage-0 (saberfish-mgr-room2) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger-start) + (go-virtual stage-1) + ) + (else + (saberfish-mgr-event-handler proc argc message block) + ) + ) + ) + :code (behavior () + (let ((gp-0 (new 'stack-no-clear 'saberfish-spawner-command))) + (set! (-> gp-0 parent) (process->handle self)) + (set! (-> gp-0 command) 'spawn-enemy) + (set! (-> gp-0 initial-state) 'saberfish-sitting-on-land) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.1)) + (suspend) + ) + (set! (-> self allowed-on-land-count) 3) + (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) 'spawn-command) + (set! (-> a1-0 param 0) (the-as uint gp-0)) + (let ((t9-0 send-event-function) + (v1-18 (-> self actor-group 1 data 0 actor)) + ) + (t9-0 + (if v1-18 + (-> v1-18 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) 'spawn-command) + (set! (-> a1-1 param 0) (the-as uint gp-0)) + (let ((t9-1 send-event-function) + (v1-27 (-> self actor-group 1 data 1 actor)) + ) + (t9-1 + (if v1-27 + (-> v1-27 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) 'spawn-command) + (set! (-> a1-2 param 0) (the-as uint gp-0)) + (let ((t9-2 send-event-function) + (v1-36 (-> self actor-group 1 data 2 actor)) + ) + (t9-2 + (if v1-36 + (-> v1-36 extra process) + ) + a1-2 + ) + ) + ) + ) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate stage-1 (saberfish-mgr-room2) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual stage-2) + ) + (else + (saberfish-mgr-event-handler proc argc message block) + ) + ) + ) + :code (behavior () + (let ((v1-0 (new 'stack-no-clear 'saberfish-spawner-command))) + (set! (-> v1-0 parent) (process->handle self)) + ) + (set! (-> self allowed-on-land-count) 4) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.7)) + (suspend) + ) + (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) 'forward-event) + (set! (-> a1-4 param 0) (the-as uint 'saberfish-command)) + (set! (-> a1-4 param 1) (the-as uint 'go-alive)) + (let ((t9-0 send-event-function) + (v1-16 (-> self actor-group 1 data 0 actor)) + ) + (t9-0 + (if v1-16 + (-> v1-16 extra process) + ) + a1-4 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.7)) + (suspend) + ) + (let ((a1-5 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-5 from) (process->ppointer self)) + (set! (-> a1-5 num-params) 2) + (set! (-> a1-5 message) 'forward-event) + (set! (-> a1-5 param 0) (the-as uint 'saberfish-command)) + (set! (-> a1-5 param 1) (the-as uint 'go-alive)) + (let ((t9-1 send-event-function) + (v1-33 (-> self actor-group 1 data 1 actor)) + ) + (t9-1 + (if v1-33 + (-> v1-33 extra process) + ) + a1-5 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.7)) + (suspend) + ) + (let ((a1-6 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-6 from) (process->ppointer self)) + (set! (-> a1-6 num-params) 2) + (set! (-> a1-6 message) 'forward-event) + (set! (-> a1-6 param 0) (the-as uint 'saberfish-command)) + (set! (-> a1-6 param 1) (the-as uint 'go-alive)) + (let ((t9-2 send-event-function) + (v1-50 (-> self actor-group 1 data 2 actor)) + ) + (t9-2 + (if v1-50 + (-> v1-50 extra process) + ) + a1-6 + ) + ) + ) + (sleep-code) + ) + ) + +;; failed to figure out what this is: +(defstate stage-2 (saberfish-mgr-room2) + :virtual #t + :event saberfish-mgr-event-handler + :enter (behavior () + '() + ) + :code (behavior () + (let ((gp-0 (new 'stack-no-clear 'saberfish-spawner-command))) + (set! (-> gp-0 parent) (process->handle self)) + (set! (-> gp-0 command) 'spawn-enemy) + (set! (-> gp-0 initial-state) 'saberfish-swimming) + (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) 'spawn-command) + (set! (-> a1-0 param 0) (the-as uint gp-0)) + (let ((t9-0 send-event-function) + (v1-11 (-> self actor-group 2 data 0 actor)) + ) + (t9-0 + (if v1-11 + (-> v1-11 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) 'spawn-command) + (set! (-> a1-1 param 0) (the-as uint gp-0)) + (let ((t9-1 send-event-function) + (v1-20 (-> self actor-group 2 data 1 actor)) + ) + (t9-1 + (if v1-20 + (-> v1-20 extra process) + ) + a1-1 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 1)) + (suspend) + ) + (until (>= 3 (get-alive-count self)) + (suspend) + ) + (set! (-> gp-0 initial-state) 'saberfish-crawl-out-of-tube) + (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) 'spawn-command) + (set! (-> a1-2 param 0) (the-as uint gp-0)) + (let ((t9-3 send-event-function) + (v1-39 (-> self actor-group 0 data 1 actor)) + ) + (t9-3 + (if v1-39 + (-> v1-39 extra process) + ) + a1-2 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.5)) + (suspend) + ) + (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) 'spawn-command) + (set! (-> a1-3 param 0) (the-as uint gp-0)) + (let ((t9-4 send-event-function) + (v1-54 (-> self actor-group 0 data 0 actor)) + ) + (t9-4 + (if v1-54 + (-> v1-54 extra process) + ) + a1-3 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 1)) + (suspend) + ) + (until (>= 3 (get-alive-count self)) + (suspend) + ) + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) (process->ppointer self)) + (set! (-> a1-4 num-params) 1) + (set! (-> a1-4 message) 'spawn-command) + (set! (-> a1-4 param 0) (the-as uint gp-0)) + (let ((t9-6 send-event-function) + (v1-72 (-> self actor-group 0 data 0 actor)) + ) + (t9-6 + (if v1-72 + (-> v1-72 extra process) + ) + a1-4 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.5)) + (suspend) + ) + (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) 'spawn-command) + (set! (-> a1-5 param 0) (the-as uint gp-0)) + (let ((t9-7 send-event-function) + (v1-87 (-> self actor-group 0 data 1 actor)) + ) + (t9-7 + (if v1-87 + (-> v1-87 extra process) + ) + a1-5 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.5)) + (suspend) + ) + (until (>= 4 (get-alive-count self)) + (suspend) + ) + (let ((a1-6 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-6 from) (process->ppointer self)) + (set! (-> a1-6 num-params) 1) + (set! (-> a1-6 message) 'spawn-command) + (set! (-> a1-6 param 0) (the-as uint gp-0)) + (let ((t9-9 send-event-function) + (v1-105 (-> self actor-group 0 data 0 actor)) + ) + (t9-9 + (if v1-105 + (-> v1-105 extra process) + ) + a1-6 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 1)) + (suspend) + ) + (until (>= 2 (get-alive-count self)) + (suspend) + ) + (let ((a1-7 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-7 from) (process->ppointer self)) + (set! (-> a1-7 num-params) 1) + (set! (-> a1-7 message) 'spawn-command) + (set! (-> a1-7 param 0) (the-as uint gp-0)) + (let ((t9-11 send-event-function) + (v1-123 (-> self actor-group 0 data 0 actor)) + ) + (t9-11 + (if v1-123 + (-> v1-123 extra process) + ) + a1-7 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 0.5)) + (suspend) + ) + (let ((a1-8 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-8 from) (process->ppointer self)) + (set! (-> a1-8 num-params) 1) + (set! (-> a1-8 message) 'spawn-command) + (set! (-> a1-8 param 0) (the-as uint gp-0)) + (let ((t9-12 send-event-function) + (v1-138 (-> self actor-group 0 data 0 actor)) + ) + (t9-12 + (if v1-138 + (-> v1-138 extra process) + ) + a1-8 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 1.5)) + (suspend) + ) + (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) 'spawn-command) + (set! (-> a1-9 param 0) (the-as uint gp-0)) + (let ((t9-13 send-event-function) + (v1-153 (-> self actor-group 0 data 1 actor)) + ) + (t9-13 + (if v1-153 + (-> v1-153 extra process) + ) + a1-9 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 1)) + (suspend) + ) + (let ((a1-10 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-10 from) (process->ppointer self)) + (set! (-> a1-10 num-params) 1) + (set! (-> a1-10 message) 'spawn-command) + (set! (-> a1-10 param 0) (the-as uint gp-0)) + (let ((t9-14 send-event-function) + (v1-168 (-> self actor-group 0 data 0 actor)) + ) + (t9-14 + (if v1-168 + (-> v1-168 extra process) + ) + a1-10 + ) + ) + ) + (until (>= 3 (get-alive-count self)) + (suspend) + ) + (let ((a1-11 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-11 from) (process->ppointer self)) + (set! (-> a1-11 num-params) 1) + (set! (-> a1-11 message) 'spawn-command) + (set! (-> a1-11 param 0) (the-as uint gp-0)) + (let ((t9-16 send-event-function) + (v1-180 (-> self actor-group 0 data 1 actor)) + ) + (t9-16 + (if v1-180 + (-> v1-180 extra process) + ) + a1-11 + ) + ) + ) + (set-time! (-> self spawn-timer)) + (until (time-elapsed? (-> self spawn-timer) (seconds 1)) + (suspend) + ) + (let ((a1-12 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-12 from) (process->ppointer self)) + (set! (-> a1-12 num-params) 1) + (set! (-> a1-12 message) 'spawn-command) + (set! (-> a1-12 param 0) (the-as uint gp-0)) + (let ((t9-17 send-event-function) + (v1-195 (-> self actor-group 0 data 1 actor)) + ) + (t9-17 + (if v1-195 + (-> v1-195 extra process) + ) + a1-12 + ) + ) + ) + ) + (sleep-code) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/sewer/saberfish_REF.gc b/test/decompiler/reference/jak3/levels/sewer/saberfish_REF.gc new file mode 100644 index 0000000000..05823a74a4 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/saberfish_REF.gc @@ -0,0 +1,3905 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-saberfish saberfish saberfish-lod0-jg saberfish-idle-ja + ((saberfish-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + :shadow saberfish-shadow-mg + ) + +;; definition of type saberfish-jump-info +(deftype saberfish-jump-info (structure) + ((windup-anim uint32) + (air-anim uint32) + (land-anim uint32) + ) + :pack-me + ) + +;; definition for method 3 of type saberfish-jump-info +(defmethod inspect ((this saberfish-jump-info)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'saberfish-jump-info) + (format #t "~1Twindup-anim: ~D~%" (-> this windup-anim)) + (format #t "~1Tair-anim: ~D~%" (-> this air-anim)) + (format #t "~1Tland-anim: ~D~%" (-> this land-anim)) + (label cfg-4) + this + ) + +;; definition of type saberfish-init-by-other-params +(deftype saberfish-init-by-other-params (enemy-init-by-other-params) + ((spawn-parent handle) + (message symbol) + (pos vector :inline) + (orient quaternion :inline) + (initial-state symbol) + ) + ) + +;; definition for method 3 of type saberfish-init-by-other-params +(defmethod inspect ((this saberfish-init-by-other-params)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'saberfish-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 "~1Tspawn-parent: ~D~%" (-> this spawn-parent)) + (format #t "~1Tmessage: ~A~%" (-> this message)) + (format #t "~1Tpos: #~%" (-> this pos)) + (format #t "~1Torient: #~%" (-> this orient)) + (format #t "~1Tinitial-state: ~A~%" (-> this initial-state)) + (label cfg-4) + this + ) + +;; definition of type saberfish-spawner-query-msg +(deftype saberfish-spawner-query-msg (structure) + ((query-type saberfish-query-type) + (closest-nav-mesh-index int8) + (pos vector :inline) + (behavior saberfish-find-behavior) + (nav-mesh-index int8 :overlay-at closest-nav-mesh-index) + (mesh nav-mesh :overlay-at (-> pos data 0)) + (in-water? symbol :offset 40) + (can-go-to-ground? symbol :overlay-at in-water?) + ) + ) + +;; definition for method 3 of type saberfish-spawner-query-msg +(defmethod inspect ((this saberfish-spawner-query-msg)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'saberfish-spawner-query-msg) + (format #t "~1Tquery-type: ~D~%" (-> this query-type)) + (format #t "~1Tclosest-nav-mesh-index: ~D~%" (-> this closest-nav-mesh-index)) + (format #t "~1Tpos: #~%" (&-> this mesh)) + (format #t "~1Tbehavior: ~D~%" (-> this behavior)) + (format #t "~1Tnav-mesh-index: ~D~%" (-> this closest-nav-mesh-index)) + (format #t "~1Tmesh: ~A~%" (-> this mesh)) + (format #t "~1Tin-water?: ~A~%" (-> this in-water?)) + (format #t "~1Tcan-go-to-ground?: ~A~%" (-> this in-water?)) + (label cfg-4) + this + ) + +;; definition for function find-behavior<-in-water? +;; WARN: Return type mismatch int vs saberfish-find-behavior. +(defun find-behavior<-in-water? ((arg0 symbol)) + (the-as saberfish-find-behavior (if arg0 + (the-as saberfish-find-behavior (saberfish-find-behavior behavior1)) + (the-as saberfish-find-behavior (saberfish-find-behavior behavior2)) + ) + ) + ) + +;; definition for function in-water<-find-behavior +(defun in-water<-find-behavior ((arg0 saberfish-find-behavior)) + (case arg0 + (((saberfish-find-behavior behavior1)) + #t + ) + (((saberfish-find-behavior behavior2)) + #f + ) + (else + #f + ) + ) + ) + +;; definition of type saberfish +(deftype saberfish (nav-enemy) + ((initial-y-angle float) + (last-attack-time time-frame) + (in-pursuit? symbol) + (flee-to-readjust? symbol) + (use-stored-flee-point? symbol) + (scare-start-time time-frame) + (scare-time time-frame) + (jump-point-start vector :inline) + (jump-point-end vector :inline) + (jump saberfish-jump-info :inline :offset 708) + (flee-point-temp vector :inline) + (last-land-check-time time-frame) + (last-target-check-time time-frame) + (is-submerged? symbol) + (current-nav-mesh-index int8) + (dest-nav-mesh-index int8) + (desired-dest-nav-point vector :inline) + (desired-dest-mesh-index int8) + (flee-point vector :inline) + (spawn-parent handle) + (pos-start vector :inline) + (quat-start quaternion :inline) + (move-to-ground? symbol) + (swim-final-rotate-deg float) + (swim-travel-anim int8) + (swim-speed float) + (swim-rotate-last-dot float) + (swim-anim-last-dot float) + (last-swim-flip-time time-frame) + (saberfish-y-rotate float) + (doing-180-spin? symbol) + (adjusted-y-yet? symbol) + (attack-dir vector :inline) + (rotate-anim-quat quaternion :inline) + (post-spinflip-expected-heading vector :inline) + (nav-velocity vector :inline) + (nav-dir vector :inline) + (initial-state symbol) + (knocked-under-water? symbol) + (ground-state uint8) + (jump-start-ground-state uint8) + (ground-only? symbol) + ) + (:state-methods + attack + hostile-orient + swimming-hostile + spin-attack + stare-idle + undefined0 + transition-terrain-move-towards-initial-jump + transition-terrain-orient-towards-initial-jump + transition-terrain-jump + undefined1 + water-land + undefined2 + undefined3 + base-saberfish-state + diving-into-water + water-impact + command-mode + swim-180-spin + swimming-base + saberfish-crawl-out-of-tube + undefined4 + saberfish-sitting-on-land + knocked-recover-water + saberfish-swimming + ) + (:methods + (saberfish-method-214 (_type_ vector) float) + (saberfish-method-215 (_type_) float) + (get-cmd (_type_) saberfish-command) + (saberfish-method-217 (_type_) none) + (saberfish-method-218 (_type_) none) + (saberfish-method-219 (_type_) none) + (saberfish-method-220 (_type_) none) + (handle-cmd (_type_ saberfish-command) object) + (attack-delay-elapsed? (_type_) symbol) + (saberfish-method-223 (_type_) none) + (go-terrain-transition (_type_ symbol) object) + (get-nav-mesh-idx (_type_ vector saberfish-find-behavior) int) + (start-terrain-transition (_type_) object) + (desired-nav-idx-valid? (_type_) symbol) + (saberfish-method-228 (_type_) symbol) + (set-dest-nav! (_type_ vector saberfish-find-behavior) none) + (change-nav-mesh (_type_) none) + (saberfish-method-231 (_type_ vector float symbol vector) symbol) + (do-jump (_type_) object) + (saberfish-method-233 (_type_) nav-poly) + (saberfish-method-234 (_type_ vector) none) + (on-submerged (_type_ symbol) none) + (saberfish-method-236 (_type_ int) nav-mesh) + (saberfish-method-237 (_type_ int) symbol) + (saberfish-method-238 (_type_ symbol float float) object) + (saberfish-method-239 (_type_ vector) float) + (saberfish-method-240 (_type_ time-frame) none) + (saberfish-method-241 (_type_) symbol) + (get-ground-state (_type_) int) + (saberfish-method-243 (_type_) symbol) + (set-should-move-to-ground (_type_) none) + ) + (:states + transition-terrain-jump-from-land + transition-terrain-jump-from-water + ) + ) + +;; definition for method 3 of type saberfish +(defmethod inspect ((this saberfish)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Tinitial-y-angle: ~f~%" (-> this initial-y-angle)) + (format #t "~2Tlast-attack-time: ~D~%" (-> this last-attack-time)) + (format #t "~2Tin-pursuit?: ~A~%" (-> this in-pursuit?)) + (format #t "~2Tflee-to-readjust?: ~A~%" (-> this flee-to-readjust?)) + (format #t "~2Tuse-stored-flee-point?: ~A~%" (-> this use-stored-flee-point?)) + (format #t "~2Tscare-start-time: ~D~%" (-> this scare-start-time)) + (format #t "~2Tscare-time: ~D~%" (-> this scare-time)) + (format #t "~2Tjump-point-start: #~%" (-> this jump-point-start)) + (format #t "~2Tjump-point-end: #~%" (-> this jump-point-end)) + (format #t "~2Talign: ~A~%" (-> this align)) + (format #t "~2Tjump: #~%" (-> this jump)) + (format #t "~2Tflee-point-temp: #~%" (-> this flee-point-temp)) + (format #t "~2Tlast-land-check-time: ~D~%" (-> this last-land-check-time)) + (format #t "~2Tlast-target-check-time: ~D~%" (-> this last-target-check-time)) + (format #t "~2Tis-submerged?: ~A~%" (-> this is-submerged?)) + (format #t "~2Tcurrent-nav-mesh-index: ~D~%" (-> this current-nav-mesh-index)) + (format #t "~2Tdest-nav-mesh-index: ~D~%" (-> this dest-nav-mesh-index)) + (format #t "~2Tdesired-dest-nav-point: #~%" (-> this desired-dest-nav-point)) + (format #t "~2Tdesired-dest-mesh-index: ~D~%" (-> this desired-dest-mesh-index)) + (format #t "~2Tflee-point: #~%" (-> this flee-point)) + (format #t "~2Tspawn-parent: ~D~%" (-> this spawn-parent)) + (format #t "~2Tpos-start: #~%" (-> this pos-start)) + (format #t "~2Tquat-start: #~%" (-> this quat-start)) + (format #t "~2Tmove-to-ground?: ~A~%" (-> this move-to-ground?)) + (format #t "~2Tswim-final-rotate-deg: ~f~%" (-> this swim-final-rotate-deg)) + (format #t "~2Tswim-travel-anim: ~D~%" (-> this swim-travel-anim)) + (format #t "~2Tswim-speed: ~f~%" (-> this swim-speed)) + (format #t "~2Tswim-rotate-last-dot: ~f~%" (-> this swim-rotate-last-dot)) + (format #t "~2Tswim-anim-last-dot: ~f~%" (-> this swim-anim-last-dot)) + (format #t "~2Tlast-swim-flip-time: ~D~%" (-> this last-swim-flip-time)) + (format #t "~2Tsaberfish-y-rotate: ~f~%" (-> this saberfish-y-rotate)) + (format #t "~2Tdoing-180-spin?: ~A~%" (-> this doing-180-spin?)) + (format #t "~2Tadjusted-y-yet?: ~A~%" (-> this adjusted-y-yet?)) + (format #t "~2Tattack-dir: #~%" (-> this attack-dir)) + (format #t "~2Trotate-anim-quat: #~%" (-> this rotate-anim-quat)) + (format #t "~2Tpost-spinflip-expected-heading: #~%" (-> this post-spinflip-expected-heading)) + (format #t "~2Tnav-velocity: #~%" (-> this nav-velocity)) + (format #t "~2Tnav-dir: #~%" (-> this nav-dir)) + (format #t "~2Tinitial-state: ~A~%" (-> this initial-state)) + (format #t "~2Tknocked-under-water?: ~A~%" (-> this knocked-under-water?)) + (format #t "~2Tground-state: ~D~%" (-> this ground-state)) + (format #t "~2Tjump-start-ground-state: ~D~%" (-> this jump-start-ground-state)) + (format #t "~2Tground-only?: ~A~%" (-> this ground-only?)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate base-saberfish-state (saberfish) + :virtual #t + :event enemy-event-handler + :code sleep-code + :post (behavior () + (enemy-common-post self) + (update-transforms (-> self root)) + ) + ) + +;; definition for symbol *saberfish-nav-enemy-info*, type nav-enemy-info +(define *saberfish-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 4 + (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 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 #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 5 + :hit-anim 3 + :knocked-anim 11 + :knocked-land-anim 12 + :die-anim 11 + :die-falling-anim -1 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 13 + :look-at-joint 14 + :bullseye-joint 20 + :notice-distance (meters 40) + :notice-distance-delta (meters 10) + :proximity-notice-distance (meters 5) + :default-hit-points 6.0 + :gnd-collide-with (collide-spec backgnd water) + :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 water 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 61440.0 + :knocked-medium-vxz-hi 61440.0 + :knocked-medium-vy-lo 49152.0 + :knocked-medium-vy-hi 69632.0 + :knocked-hard-vxz-lo 61440.0 + :knocked-hard-vxz-hi 90112.0 + :knocked-hard-vy-lo 49152.0 + :knocked-hard-vy-hi 73728.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 61440.0 + :knocked-yellow-vxz-hi 61440.0 + :knocked-yellow-vy-lo 49152.0 + :knocked-yellow-vy-hi 69632.0 + :knocked-red-vxz-lo 61440.0 + :knocked-red-vxz-hi 90112.0 + :knocked-red-vy-lo 49152.0 + :knocked-red-vy-hi 73728.0 + :knocked-blue-vxz-lo 20480.0 + :knocked-blue-vxz-hi 28672.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.9983 :y -0.0558 :z 0.0132 :w 27913.42) + :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 + :pre-tform (new 'static 'vector :x 0.9155 :y 0.3114 :z -0.2546 :w 18151.014) + :geo-tform (new 'static 'vector :x -1.0 :w 10.176285) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 1.0 :w 27209.91) + :geo-tform (new 'static 'vector :x -0.9985 :y 0.0536 :z -0.0019 :w 20896.482) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.0165 :z -0.9998 :w 19429.002) + :geo-tform (new 'static 'vector :x 0.2521 :y 0.9606 :z -0.1166 :w 20369.662) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.2289 :z -0.9734 :w 4466.9336) + :geo-tform (new 'static 'vector :x 0.2309 :y 0.4174 :z 0.8788 :w 26025.31) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9134 :z 0.407 :w 21663.545) + :geo-tform (new 'static 'vector :x -0.4328 :y 0.8967 :z 0.0917 :w 27352.541) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.21 :z 0.9776 :w 14450.142) + :geo-tform (new 'static 'vector :x 0.6331 :y -0.6641 :z 0.3975 :w 19916.846) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.262 :z 0.965 :w 13256.131) + :geo-tform (new 'static 'vector :x -0.0466 :y 0.5681 :z 0.8215 :w 40370.1) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8605 :z -0.5094 :w 18296.832) + :geo-tform (new 'static 'vector :x 0.3835 :y -0.2752 :z 0.8815 :w 26565.291) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.8653 :z -0.5012 :w 1296.8118) + :geo-tform (new 'static 'vector :x -0.9994 :y 0.0297 :z 0.015 :w 17863.275) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3818 :z -0.9242 :w 259.39514) + :geo-tform (new 'static 'vector :x -0.9903 :y -0.0926 :z 0.1029 :w 15323.264) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint 14 + :pre-tform (new 'static 'vector :x 0.5325 :z 0.8464 :w 2252.818) + :geo-tform (new 'static 'vector :x -0.9999 :y 0.0039 :z 0.0062 :w 16416.531) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 1966.4896 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.794 :z 0.6078 :w 42.30713) + :geo-tform (new 'static 'vector :x -0.9999 :y 0.005 :z 0.005 :w 16384.236) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 1553.6128 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint 3 + :pre-tform (new 'static 'vector :x -1.0 :w 862.1079) + :geo-tform (new 'static 'vector :x -0.9972 :y -0.006 :z -0.0739 :w 5204.942) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2452.6848 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9971 :z -0.0754 :w 5204.851) + :geo-tform (new 'static 'vector :x -0.4775 :y -0.1888 :z -0.858 :w 1142.2561) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7479 :z -0.6637 :w 1560.7944) + :geo-tform (new 'static 'vector :x -0.7484 :y -0.1026 :z -0.6552 :w 1775.261) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7465 :z -0.6652 :w 1765.8129) + :geo-tform (new 'static 'vector :x -0.9932 :y -0.107 :z -0.0452 :w 16973.86) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.119 :z -0.9928 :w 16093.275) + :geo-tform (new 'static 'vector :x 0.5242 :y 0.8508 :z 0.035 :w 33237.656) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.3382 :z -0.941 :w 11515.366) + :geo-tform (new 'static 'vector :x -0.2239 :y -0.4468 :z 0.8661 :w 25938.275) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9222 :z 0.3865 :w 21078.58) + :geo-tform (new 'static 'vector :x 0.4237 :y 0.5776 :z 0.6976 :w 37524.24) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5995 :z -0.8003 :w 19175.633) + :geo-tform (new 'static 'vector :x 0.0961 :y 0.9634 :z 0.2499 :w 40414.94) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2235.5967 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint 20 + :pre-tform (new 'static 'vector :x -0.9723 :z 0.2333 :w 1824.8136) + :geo-tform (new 'static 'vector :x -0.9803 :y -0.1799 :z -0.0811 :w 15291.715) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8223 :z 0.5689 :w 2307.7227) + :geo-tform (new 'static 'vector :x 0.2202 :y -0.8918 :z 0.3952 :w 3410.111) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.3544 :z 0.935 :w 1537.347) + :geo-tform (new 'static 'vector :x -0.0081 :y -0.9942 :z 0.1065 :w 2835.7427) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 1642.0864 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.2096 :z 0.9777 :w 302.33942) + :geo-tform (new 'static 'vector :x -0.6496 :y -0.7587 :z 0.0484 :w 5384.1646) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 1437.2864 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint 20 + :pre-tform (new 'static 'vector :x -0.1904 :z 0.9817 :w 17496.0) + :geo-tform (new 'static 'vector :x -0.6922 :y 0.5601 :z -0.455 :w 15608.09) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 30 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9013 :z -0.4331 :w 10963.08) + :geo-tform (new 'static 'vector :x 0.7074 :y -0.0914 :z -0.7007 :w 22558.492) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 31 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8192 :z -0.5734 :w 22395.672) + :geo-tform (new 'static 'vector :x 0.9857 :y -0.1663 :z -0.0232 :w 40309.043) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + (new 'static 'ragdoll-joint-setup + :joint-index 32 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9055 :z -0.4242 :w 41043.812) + :geo-tform (new 'static 'vector :x -0.4884 :y 0.8434 :z 0.2236 :w 10095.093) + :axial-slop 1973.8533 + :max-angle 3703.2754 + :coll-rad 2348.2368 + ) + ) + ) + :shadow-size (meters 1) + :shadow-max-y (meters 1) + :shadow-min-y (meters -1) + :shadow-locus-dist (meters 150) + :gem-joint 14 + :gem-seg #x2 + :gem-offset (new 'static 'sphere :y 1511.424 :z 700.416 :r 327680.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 6 + :turn-anim -1 + :run-anim 5 + :taunt-anim -1 + :run-travel-speed (meters 6) + :run-acceleration (meters 6) + :run-turning-acceleration (meters 60) + :walk-travel-speed (meters 3) + :walk-acceleration (meters 6) + :walk-turning-acceleration (meters 1) + :maximum-rotation-rate (degrees 180) + :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! (-> *saberfish-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; definition for method 120 of type saberfish +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this saberfish)) + (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 player-list water)) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 8192.0 0.0 24576.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 water)) + (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 -4096.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 water)) + (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 4096.0 0.0 6144.0) + ) + (set-vector! + (-> (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)) local-sphere) + 0.0 + 4505.6 + 0.0 + 4505.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 collide-with) (collide-spec jak player-list)) + (set! (-> v1-19 prim-core action) (collide-action semi-solid deadly no-standon)) + (set! (-> v1-19 transform-index) 14) + (set-vector! (-> v1-19 local-sphere) 0.0 0.0 6144.0 4505.6) + ) + (set! (-> s5-0 nav-radius) 10240.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) + (set! (-> s5-0 max-iteration-count) (the-as uint 3)) + ) + (set! (-> this root penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + ) + ) + 0 + (none) + ) + +;; definition for function get-spawn-parent +(defbehavior get-spawn-parent saberfish () + (handle->process (-> self spawn-parent)) + ) + +;; definition for method 121 of type saberfish +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this saberfish)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-saberfish" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *saberfish-nav-enemy-info*) + (set! (-> this last-attack-time) 0) + (set! (-> this scare-start-time) 0) + (set! (-> this scare-time) 0) + (set! (-> this water) (new 'process 'water-control this 0 0.0 8192.0 2048.0)) + (set! (-> this water flags) (water-flag part-splash part-water find-water)) + (water-control-method-10 (-> this water)) + (set! (-> this last-swim-flip-time) 0) + (set! (-> this doing-180-spin?) #f) + (set! (-> this fact pickup-type) (pickup-type eco-pill-dark)) + (if (zero? (mod (the-as int (rand-uint31-gen *random-generator*)) 11)) + (set! (-> this fact pickup-type) (pickup-type eco-pill-light)) + ) + (set! (-> this fact pickup-amount) 1.0) + (set! (-> this fact pickup-spawn-amount) 1.0) + (when (nonzero? (-> this neck)) + (let ((v1-20 (-> this neck))) + (set! (-> v1-20 ear) (the-as uint 0)) + (set! (-> v1-20 up) (the-as uint 1)) + (set! (-> v1-20 nose) (the-as uint 2)) + (set-vector! (-> v1-20 twist-max) 8192.0 11832.889 0.0 1.0) + (set! (-> v1-20 ignore-angle) 30947.555) + ) + ) + (set! (-> this current-nav-mesh-index) -1) + (cond + ((not (-> this ground-only?)) + (change-nav-mesh this) + ) + (else + (set! (-> this current-nav-mesh-index) 0) + (change-to (-> *saberfish-nav-enemy-info* nav-mesh) this) + ) + ) + (set! (-> *saberfish-nav-enemy-info* nav-mesh) #f) + (set-should-move-to-ground this) + (set! (-> this align) (new 'process 'align-control this)) + (set! (-> this in-pursuit?) #t) + (logclear! (-> this enemy-flags) (enemy-flag use-notice-distance)) + (set! (-> this scare-time) 0) + (set! (-> this desired-dest-mesh-index) (-> this current-nav-mesh-index)) + (set! (-> this is-submerged?) #f) + (set! (-> this root trans quad) (-> this pos-start quad)) + (quaternion-copy! (-> this root quat) (-> this quat-start)) + (set! (-> this move-to-ground?) #f) + (let ((s5-1 (-> this skel root-channel 0))) + (joint-control-channel-group-eval! + s5-1 + (the-as art-joint-anim (-> this draw art-group data 3)) + num-func-identity + ) + (set! (-> s5-1 frame-num) 0.0) + ) + (ja-post) + (logior! (-> this fact options) (actor-option suck-in)) + 0 + (none) + ) + +;; definition for method 220 of type saberfish +;; INFO: Used lq/sq +(defmethod saberfish-method-220 ((this saberfish)) + (when (< 2 (the-as int (-> this focus aware))) + (let ((s4-0 (handle->process (-> this focus handle)))) + (when s4-0 + (let ((s5-0 (or (focus-test? (the-as process-focusable s4-0) touch-water on-water under-water) + (and (-> (the-as process-focusable s4-0) water) + (logtest? (water-flag touch-water) (-> (the-as process-focusable s4-0) water flags)) + ) + ) + ) + ) + (when (not s5-0) + (case (find-ground-for-obj (the-as process-focusable s4-0)) + ((3 1) + (set! s5-0 #t) + ) + ) + ) + (set! (-> this focus-pos quad) (-> (get-trans (the-as process-focusable s4-0) 0) quad)) + (set-dest-nav! this (-> this focus-pos) (find-behavior<-in-water? (the-as symbol s5-0))) + ) + ) + ) + ) + (none) + ) + +;; definition for method 217 of type saberfish +;; WARN: Return type mismatch symbol vs none. +(defmethod saberfish-method-217 ((this saberfish)) + (cond + ((and (< (vector-vector-distance (-> this focus-pos) (-> this root trans)) 28672.0) + (get-focus! this) + (time-elapsed? (-> this last-attack-time) (seconds 1)) + ) + #t + ) + (else + ) + ) + (none) + ) + +;; definition for method 216 of type saberfish +;; WARN: Return type mismatch int vs saberfish-command. +(defmethod get-cmd ((this saberfish)) + (saberfish-method-220 this) + (let ((f30-0 (vector-vector-distance (-> this focus-pos) (-> this root trans))) + (f28-0 28672.0) + (gp-0 #f) + ) + (if (not (and (-> this next-state) (= (-> this next-state name) 'hostile))) + (set! f28-0 (* 1.5 f28-0)) + ) + (let ((s4-1 + (cond + ((and (-> this ground-only?) (!= (find-nearest-nav-mesh (target-pos 0) 8192.0) (-> this nav state mesh))) + (the-as saberfish-command (saberfish-command stare)) + ) + ((and (not (-> this ground-only?)) (or (saberfish-method-228 this) (nav-enemy-method-174 this))) + (the-as saberfish-command (saberfish-command start-terrain-transition)) + ) + (else + (the-as + saberfish-command + (cond + ((< 61440.0 f30-0) + (saberfish-command hostile) + ) + (else + (let ((f0-2 (saberfish-method-215 this))) + 0.0 + (if (and (!= (* 20480.0 (the float (the int (* 0.000048828126 (+ 10240.0 (fabs f0-2)))))) 0.0) + (not (logtest? (-> this nav state flags) (nav-state-flag avoiding-sphere))) + ) + (set! gp-0 #t) + ) + (cond + ((and (>= 8192.0 (fabs f0-2)) (>= f28-0 f30-0) (< 16384.0 f30-0)) + (the-as saberfish-command (saberfish-command attack)) + ) + ((>= 28672.0 f30-0) + (the-as saberfish-command (saberfish-command spin-attack)) + ) + ((and (>= 10922.667 (fabs f0-2)) (< f28-0 f30-0)) + (the-as saberfish-command (saberfish-command hostile)) + ) + (else + (the-as saberfish-command (saberfish-command stare)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (let ((v1-43 (handle->process (-> this focus handle)))) + (when (or (not v1-43) + (or (not (and v1-43 + (not (logtest? (-> (the-as process-focusable v1-43) focus-status) (focus-status disable dead ignore grabbed))) + ) + ) + (not (attack-delay-elapsed? this)) + ) + ) + (let ((v1-51 (the-as int s4-1))) + (if (or (zero? v1-51) (= v1-51 3)) + (set! s4-1 (saberfish-command stare)) + ) + ) + ) + ) + (set! gp-0 (and (= (the-as int s4-1) 4) gp-0)) + (if gp-0 + (set! s4-1 (saberfish-command hostile-orient)) + ) + (the-as saberfish-command s4-1) + ) + ) + ) + +;; definition for function saberfish-water-post +;; WARN: Return type mismatch symbol vs none. +(defbehavior saberfish-water-post saberfish () + (none) + ) + +;; definition for function saberfish-chase-post +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior saberfish-chase-post saberfish () + (local-vars (v1-10 float)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + ) + (init-vf0-vector) + (let ((a0-1 (handle->process (-> self focus handle)))) + (when a0-1 + (let ((gp-0 (get-trans (the-as process-focusable a0-1) 1))) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-! s5-0 (-> self root trans) gp-0) + (let ((f0-0 16384.0)) + (.lvf vf1 (&-> s5-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-10 vf1) + (if (< f0-0 v1-10) + (vector-normalize! s5-0 16384.0) + ) + ) + (vector+! gp-0 gp-0 s5-0) + ) + (let ((v1-15 (-> self nav state))) + (logclear! (-> v1-15 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-15 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-15 target-pos quad) (-> gp-0 quad)) + ) + ) + 0 + ) + ) + (nav-enemy-method-187 self) + 0 + (none) + ) + ) + +;; failed to figure out what this is: +(defstate hit (saberfish) + :virtual #t + :enter (behavior () + (sound-play "sabfish-gethit") + (let ((t9-3 (-> (find-parent-state) enter))) + (if t9-3 + (t9-3) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate hostile (saberfish) + :virtual #t + :enter (behavior () + (if (saberfish-method-243 self) + (go-virtual swimming-hostile) + ) + (let ((t9-3 (-> (find-parent-state) enter))) + (if t9-3 + (t9-3) + ) + ) + ) + :trans (behavior () + (let ((a0-1 (handle->process (-> self focus handle)))) + (if a0-1 + (set! (-> self focus-pos quad) (-> (get-trans (the-as process-focusable a0-1) 0) quad)) + ) + ) + (let ((a1-2 (get-cmd self))) + (if (or (not (and (-> self next-state) (= (-> self next-state name) 'hostile))) (!= a1-2 2)) + (handle-cmd self a1-2) + ) + ) + (let ((t9-4 (-> (find-parent-state) trans))) + (if t9-4 + (t9-4) + ) + ) + ) + :post saberfish-chase-post + ) + +;; definition for method 221 of type saberfish +(defmethod handle-cmd ((this saberfish) (arg0 saberfish-command)) + (case arg0 + (((saberfish-command start-terrain-transition)) + (start-terrain-transition this) + ) + (((saberfish-command attack)) + (go (method-of-object this attack)) + ) + (((saberfish-command hostile)) + (if (not (and (-> this next-state) (= (-> this next-state name) 'hostile))) + (go (method-of-object this hostile)) + ) + ) + (((saberfish-command spin-attack)) + (go (method-of-object this spin-attack)) + ) + (((saberfish-command hostile-orient)) + (if (not (and (-> this next-state) (= (-> this next-state name) 'hostile-orient))) + (go (method-of-object this hostile-orient)) + ) + ) + (((saberfish-command stare)) + (if (and (not (and (-> this next-state) (= (-> this next-state name) 'stare))) + (not (and (-> this next-state) (= (-> this next-state name) 'stare-idle))) + ) + (go (method-of-object this stare)) + ) + ) + ) + ) + +;; definition for method 215 of type saberfish +(defmethod saberfish-method-215 ((this saberfish)) + (let ((a0-2 (handle->process (-> this focus handle)))) + (when a0-2 + (let ((a1-2 (get-trans (the-as process-focusable a0-2) 0))) + (saberfish-method-214 this a1-2) + ) + ) + ) + ) + +;; definition for method 214 of type saberfish +(defmethod saberfish-method-214 ((this saberfish) (arg0 vector)) + (let ((gp-0 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (s5-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + ) + 0.0 + 0.0 + (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 3 prim-core) + (let ((s4-1 (vector-! (new 'stack-no-clear 'vector) arg0 (-> this root trans)))) + 0.0 + (set! (-> s4-1 y) 0.0) + (set! (-> gp-0 y) 0.0) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s4-1 1.0) + (vector-normalize! gp-0 1.0) + (vector-normalize! s5-0 1.0) + (let ((f0-7 (acos (vector-dot s4-1 s5-0)))) + (if (< (vector-dot s4-1 gp-0) 0.0) + (set! f0-7 (* -1.0 f0-7)) + ) + f0-7 + ) + ) + ) + ) + +;; definition for function saberfish-orient-code-setup +;; WARN: Return type mismatch int vs none. +(defbehavior saberfish-orient-code-setup saberfish () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! saberfish-turn-ja :num! (loop!) :frame-num 0.0) + (none) + ) + +;; definition for function saberfish-orient-code-single-pass +;; WARN: new jak 2 until loop case, check carefully +(defbehavior saberfish-orient-code-single-pass saberfish ((arg0 float)) + (* 0.00006510417 (the float (ja-num-frames 0))) + (let ((f30-1 (if (< arg0 0.0) + -1.0 + 1.0 + ) + ) + (f24-0 (ja-frame-num 0)) + (f28-0 1.3333333) + ) + 0.0 + (let ((f26-0 (if (logtest? (enemy-flag drawn-mirrored) (-> self enemy-flags)) + -1.0 + 1.0 + ) + ) + (gp-1 (* 20480.0 (the float (the int (* 0.000048828126 (+ arg0 (* 10240.0 f30-1))))))) + ) + (when (!= gp-1 0.0) + (until #f + (let ((f22-0 (ja-frame-num 0))) + 0.0 + (let ((f0-10 (* f30-1 f26-0))) + (when (or (and (< f0-10 0.0) (< f24-0 f22-0)) (and (< 0.0 f0-10) (< f22-0 f24-0))) + 0 + (goto cfg-25) + ) + ) + (let ((f0-15 (* (fmin (* 15360.0 (seconds-per-frame) f28-0) (fabs gp-1)) f30-1))) + (quaternion-rotate-y! (-> self root quat) (-> self root quat) f0-15) + ) + (ja :num! (loop! (* f28-0 f30-1 f26-0))) + (set! f24-0 f22-0) + ) + (suspend) + 0 + ) + #f + ) + (label cfg-25) + gp-1 + ) + ) + ) + +;; definition for function saberfish-orient-code +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior saberfish-orient-code saberfish () + (saberfish-orient-code-setup) + (until #f + (let ((f0-0 (saberfish-method-215 self))) + (saberfish-orient-code-single-pass f0-0) + ) + (let ((a1-0 (get-cmd self))) + (handle-cmd self a1-0) + ) + ) + #f + (none) + ) + +;; failed to figure out what this is: +(defstate hostile-orient (saberfish) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (stop-look-at! self) + ) + :exit (behavior () + (set-look-at-mode! self 1) + ) + :code saberfish-orient-code + :post (behavior () + (enemy-common-post self) + (update-transforms (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate stare-idle (saberfish) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-182 self) + (set-look-at-mode! self 1) + ) + :trans (behavior () + (let ((a1-0 (get-cmd self))) + (if (!= a1-0 (saberfish-command stare)) + (handle-cmd self a1-0) + ) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (ja-no-eval :group! saberfish-idle-ja :num! (seek! max f30-0) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek! max f30-0)) + ) + ) + ) + #f + ) + :post (behavior () + (enemy-common-post self) + (update-transforms (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate stare (saberfish) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (if (saberfish-method-243 self) + (go-virtual swimming-hostile) + ) + (nav-enemy-method-182 self) + (stop-look-at! self) + ) + :exit (behavior () + (set-look-at-mode! self 1) + ) + :trans (behavior () + '() + ) + :code (behavior () + (saberfish-orient-code-setup) + (until #f + (let ((f0-0 (saberfish-method-215 self))) + (saberfish-orient-code-single-pass f0-0) + ) + (let ((a1-0 (get-cmd self))) + (case a1-0 + (((saberfish-command stare)) + (go-virtual stare-idle) + ) + (else + (handle-cmd self a1-0) + ) + ) + ) + ) + #f + ) + :post (behavior () + (enemy-common-post self) + (update-transforms (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate attack (saberfish) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-182 self) + (stop-look-at! self) + ) + :exit (behavior () + (set-look-at-mode! self 1) + (set-time! (-> self last-attack-time)) + ) + :trans (behavior () + '() + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (logior! (-> self focus-status) (focus-status dangerous)) + (ja-no-eval :group! saberfish-attack-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((gp-0 5)) + 0.0 + (let ((f0-5 (saberfish-method-215 self))) + 0.0 + (let ((f30-0 (* 0.06666667 (the float gp-0)))) + (let ((f1-5 (fmin (* (/ 8192.0 f30-0) (seconds-per-frame)) (fabs f0-5)))) + (if (< f0-5 0.0) + (set! f1-5 (* -1.0 f1-5)) + ) + (quaternion-rotate-y! (-> self root quat) (-> self root quat) f1-5) + ) + (when (>= 5.0 (ja-frame-num 0)) + (let ((v1-29 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (vector+float*! (-> self root trans) (-> self root trans) v1-29 (* (/ 8192.0 f30-0) (seconds-per-frame))) + ) + ) + ) + ) + ) + (suspend) + (ja :num! (seek!)) + ) + (dotimes (gp-1 1) + (ja-no-eval :group! saberfish-attack-loop-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (logclear! (-> self focus-status) (focus-status dangerous)) + (ja-no-eval :group! saberfish-attack-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((gp-2 (ja-num-frames 0)) + (v1-83 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + ) + (vector+float*! + (-> self root trans) + (-> self root trans) + v1-83 + (* -8192.0 (seconds-per-frame) (/ 15.0 (the float gp-2))) + ) + ) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual hostile) + ) + :post (behavior () + (enemy-common-post self) + (update-transforms (-> self root)) + ) + ) + +;; definition for method 218 of type saberfish +;; WARN: Return type mismatch int vs none. +(defmethod saberfish-method-218 ((this saberfish)) + 0 + (none) + ) + +;; definition for method 234 of type saberfish +;; WARN: Return type mismatch int vs none. +(defmethod saberfish-method-234 ((this saberfish) (arg0 vector)) + (let ((s4-0 (saberfish-method-233 this)) + (a0-3 (saberfish-method-236 this (-> this current-nav-mesh-index))) + (t0-0 (new 'stack-no-clear 'clamp-travel-vector-to-mesh-return-info)) + ) + (vector-! (new 'stack-no-clear 'vector) (-> this focus-pos) (-> this root trans)) + (when a0-3 + (set! (-> arg0 y) 0.0) + (clamp-vector-to-mesh-no-gaps a0-3 (-> this root trans) s4-0 arg0 t0-0) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate water-land (saberfish) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-181 self) + (on-submerged self #f) + (let ((s5-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + (vector+float*! gp-0 (-> self root trans) s5-0 81920.0) + (let ((v1-8 (-> self nav state))) + (logclear! (-> v1-8 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-8 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-8 target-pos quad) (-> gp-0 quad)) + ) + ) + 0 + ) + :exit (behavior () + (logclear! (-> self nav flags) (nav-control-flag use-momentum)) + ) + :trans (behavior () + (vector+float*! + (-> self root trans) + (-> self root trans) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (* 81920.0 (seconds-per-frame)) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (dotimes (gp-0 1) + (ja-no-eval :group! saberfish-swim-burst-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (go-virtual swimming-hostile) + ) + :post (behavior () + (nav-enemy-method-187 self) + ) + ) + +;; failed to figure out what this is: +(defstate swim-180-spin (saberfish) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (set! (-> self saberfish-y-rotate) 0.0) + (logclear! (-> self nav flags) (nav-control-flag limit-rotation-rate update-heading-from-facing)) + (set! (-> self swim-final-rotate-deg) 0.0) + (set! (-> self swim-travel-anim) 0) + (stop-look-at! self) + (set! (-> self swim-speed) 57344.0) + (set-time! (-> self state-time)) + (let ((a1-0 (-> self nav state)) + (v1-8 (new 'stack-no-clear 'vector)) + ) + (set! (-> v1-8 quad) (-> a1-0 target-pos quad)) + (let ((gp-0 (new 'stack-no-clear 'vector))) + 0.0 + (vector-! gp-0 (-> self root trans) v1-8) + (set! (-> gp-0 y) 0.0) + (when (< (vector-normalize-ret-len! gp-0 1.0) 20480.0) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (saberfish-method-231 self s5-0 4551.1113 #t gp-0) + (let ((v1-13 (-> self nav state))) + (logclear! (-> v1-13 flags) (nav-state-flag directional-mode)) + (logior! (-> v1-13 flags) (nav-state-flag target-poly-dirty)) + (set! (-> v1-13 target-pos quad) (-> s5-0 quad)) + ) + ) + 0 + ) + ) + ) + ) + :exit (behavior () + (set! (-> self root transv y) 0.0) + (set! (-> self adjusted-y-yet?) #f) + (set! (-> self saberfish-y-rotate) 0.0) + (vector-z-quaternion! (-> self nav-velocity) (-> self root quat)) + (set! (-> self nav-velocity y) 0.0) + (vector-normalize! (-> self nav-velocity) 1.0) + (set! (-> self nav-dir quad) (-> self nav-velocity quad)) + (set! (-> self doing-180-spin?) #f) + (set-time! (-> self last-swim-flip-time)) + (set! (-> self saberfish-y-rotate) 0.0) + ) + :code (behavior () + (local-vars (sv-144 vector)) + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! saberfish-swim-180-turn-ja) + (set! (-> self doing-180-spin?) #t) + (quaternion-copy! (-> self rotate-anim-quat) (-> self root quat)) + (vector-z-quaternion! (-> self post-spinflip-expected-heading) (-> self root quat)) + (set! (-> self post-spinflip-expected-heading y) 0.0) + (vector-normalize! (-> self post-spinflip-expected-heading) 1.0) + (vector-float*! (-> self post-spinflip-expected-heading) (-> self post-spinflip-expected-heading) -1.0) + (let ((gp-0 #f)) + (until (ja-done? 0) + (compute-alignment! (-> self align)) + (set! (-> self root transv quad) (the-as uint128 0)) + (vector-float*! (-> self root transv) (-> self root transv) -1.0) + (vector-v++! (-> self root trans) (-> self root transv)) + (set! (-> self root transv quad) (the-as uint128 0)) + (when (not (logtest? (-> self align flags) (align-flags disabled))) + (quaternion-normalize! + (quaternion*! (-> self rotate-anim-quat) (-> self rotate-anim-quat) (-> self align delta quat)) + ) + (quaternion-copy! (-> self root quat) (-> self rotate-anim-quat)) + (when (< 3.0 (ja-frame-num 0)) + (let ((a0-16 (-> self nav state)) + (s2-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s2-0 quad) (-> a0-16 travel quad)) + (let ((s3-0 (new 'stack-no-clear 'quaternion)) + (s5-1 (new 'stack-no-clear 'quaternion)) + ) + (let ((s4-0 (quaternion-identity! (new 'stack-no-clear 'quaternion)))) + 0.0 + (vector-normalize! s2-0 1.0) + (when (< 4.0 (ja-frame-num 0)) + (when (not gp-0) + (set! gp-0 #t) + (let ((a1-10 (new 'stack-no-clear 'vector))) + (set! (-> a1-10 quad) (-> self root trans quad)) + (splash-spawn 0.0 a1-10 1) + ) + ) + ) + (when (< 5.0 (ja-frame-num 0)) + (let ((s1-0 (new 'stack-no-clear 'vector)) + (f30-5 (/ (+ -5.0 (ja-frame-num 0)) (+ -5.0 (the float (ja-num-frames 0))))) + ) + (let ((s0-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (set! (-> s0-0 y) 0.0) + (vector-normalize! s0-0 1.0) + (vector-lerp! s1-0 s0-0 s2-0 f30-5) + ) + (let ((s1-1 (-> self root trans)) + (s0-1 (-> self root trans)) + ) + (set! sv-144 s2-0) + (let ((f0-13 (* (lerp 0.0 57344.0 f30-5) (seconds-per-frame)))) + (vector+float*! s1-1 s0-1 sv-144 f0-13) + ) + ) + ) + ) + (let ((f30-6 (vector-dot (-> self post-spinflip-expected-heading) s2-0))) + (cond + ((< 0.9999 f30-6) + (quaternion-identity! s3-0) + ) + (else + (let ((s1-4 (vector-cross! (new 'stack-no-clear 'vector) (-> self post-spinflip-expected-heading) s2-0))) + (vector-normalize! s1-4 1.0) + (quaternion-vector-angle! s3-0 s1-4 (acos f30-6)) + ) + ) + ) + ) + (let ((f0-20 (/ (+ -3.0 (ja-frame-num 0)) (+ -3.0 (the float (ja-num-frames 0)))))) + (quaternion-slerp! s5-1 s4-0 s3-0 f0-20) + ) + ) + (quaternion*! (-> self root quat) (-> self rotate-anim-quat) s5-1) + ) + ) + ) + ) + (ja :num! (seek!)) + (suspend) + ) + ) + (go-virtual swimming-hostile) + ) + :post (behavior () + (enemy-common-post self) + (update-transforms (-> self root)) + ) + ) + +;; definition for function saberfish-swim-code +;; WARN: Return type mismatch symbol vs none. +;; WARN: new jak 2 until loop case, check carefully +(defbehavior saberfish-swim-code saberfish () + (let ((v1-2 (ja-group))) + (when (not (and v1-2 (= v1-2 saberfish-swim-burst-ja))) + (ja-channel-push! 3 (seconds 0.2)) + (ja :group! saberfish-swim-burst-ja) + (ja :chan 1 :group! saberfish-swim-turn-left-ja) + (ja :chan 2 :group! saberfish-swim-turn-right-ja) + ) + ) + (until #f + (let* ((f0-1 (* 0.000061035156 (-> self swim-final-rotate-deg))) + (f0-2 (fmin 1.0 f0-1)) + ) + (let ((v1-19 (-> self skel root-channel 0)) + (f1-3 (- 1.0 f0-2)) + ) + (set! (-> v1-19 frame-interp 1) f1-3) + (set! (-> v1-19 frame-interp 0) f1-3) + ) + (ja :chan (-> self swim-travel-anim) :frame-interp0 f0-2 :frame-interp1 f0-2) + ) + (let ((v1-27 (-> self skel root-channel (- 3 (-> self swim-travel-anim)))) + (f0-3 0.0) + ) + (set! (-> v1-27 frame-interp 1) f0-3) + (set! (-> v1-27 frame-interp 0) f0-3) + ) + (ja :num! (loop!)) + (ja :chan 1 :num! (chan 0)) + (ja :chan 2 :num! (chan 0)) + (suspend) + ) + #f + (none) + ) + +;; definition for method 239 of type saberfish +;; INFO: Used lq/sq +(defmethod saberfish-method-239 ((this saberfish) (arg0 vector)) + (when (logtest? (enemy-flag ef37) (-> this enemy-flags)) + (let ((v1-3 (new 'stack-no-clear 'vector)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (let ((f0-0 (-> this swim-speed))) + 0.0 + 0.0 + (set! (-> v1-3 quad) (-> arg0 quad)) + (set! (-> v1-3 y) (fmin (-> v1-3 y) (+ -8192.0 (-> this water surface-height)))) + (vector-! s5-0 v1-3 (-> this root trans)) + (let ((f1-4 (-> s5-0 y)) + (v1-4 s5-0) + ) + (set! (-> this root transv y) + (/ f1-4 (/ (sqrtf (+ (* (-> v1-4 x) (-> v1-4 x)) (* (-> v1-4 z) (-> v1-4 z)))) f0-0)) + ) + ) + ) + (set! (-> this root transv y) (fmin 16384.0 (-> this root transv y))) + (vector-normalize! s5-0 1.0) + (set! (-> this saberfish-y-rotate) + (deg-seek (-> this saberfish-y-rotate) (* -16384.0 (-> s5-0 y)) (* 16384.0 (seconds-per-frame))) + ) + ) + ) + ) + +;; definition for method 161 of type saberfish +(defmethod nav-enemy-method-161 ((this saberfish) (arg0 nav-control)) + (if (and (not (-> this doing-180-spin?)) + (not (and (-> this next-state) (= (-> this next-state name) 'hostile-orient))) + ) + (call-parent-method this arg0) + ) + (none) + ) + +;; definition for function saberfish-swim-travel-trans +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs none. +(defbehavior saberfish-swim-travel-trans saberfish () + (local-vars (f26-0 float) (f28-0 float)) + (when (not (-> self doing-180-spin?)) + (let ((a0-0 (-> self nav state)) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> s5-0 quad) (-> a0-0 travel quad)) + (let ((gp-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + (let ((f30-0 (-> self swim-speed))) + (let ((s4-0 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)))) + 0.0 + 0.0 + (let ((v1-6 (-> self nav state))) + (set! (-> v1-6 speed) f30-0) + ) + 0 + (set! (-> gp-0 y) 0.0) + (set! (-> s4-0 y) 0.0) + (vector-normalize! s4-0 1.0) + (vector-normalize! gp-0 1.0) + (vector-normalize! s5-0 1.0) + (cond + (#f + (set! f26-0 (-> self swim-anim-last-dot)) + (set! f28-0 (-> self swim-rotate-last-dot)) + (set! (-> s5-0 quad) (-> gp-0 quad)) + ) + (else + (let ((f0-6 (vector-dot s4-0 s5-0))) + (if (logtest? (enemy-flag drawn-mirrored) (-> self enemy-flags)) + (set! f0-6 (* -1.0 f0-6)) + ) + (let ((f0-7 (* -1.0 f0-6))) + (set! f26-0 (seek (-> self swim-anim-last-dot) f0-7 (* 4.0 (seconds-per-frame)))) + ) + ) + (set! (-> self swim-anim-last-dot) f26-0) + (let ((f0-11 (vector-dot gp-0 s5-0))) + (set! f28-0 (seek (-> self swim-rotate-last-dot) f0-11 (* 2.0 (seconds-per-frame)))) + ) + (set! (-> self swim-rotate-last-dot) f28-0) + (set! (-> self swim-rotate-last-dot) f28-0) + ) + ) + ) + (set! (-> self swim-final-rotate-deg) (- 16384.0 (acos (fabs f26-0)))) + (if (>= f26-0 0.0) + (set! (-> self swim-travel-anim) 2) + (set! (-> self swim-travel-anim) 1) + ) + (cond + ((and (< f28-0 -0.1) + (let ((f26-1 61440.0) + (t9-8 vector-vector-xz-distance) + (a0-15 (-> self root trans)) + (a2-2 (-> self nav state)) + (a1-7 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-7 quad) (-> a2-2 target-pos quad)) + (< f26-1 (t9-8 a0-15 a1-7)) + ) + (let ((v1-37 (ja-group))) + (and (not (and v1-37 (= v1-37 saberfish-swim-180-turn-ja))) #f) + ) + ) + (set! (-> self swim-travel-anim) -1) + ) + ((< 0.99999 f28-0) + (set! (-> gp-0 quad) (-> s5-0 quad)) + ) + (else + (let ((s4-1 (new 'stack-no-clear 'vector))) + 0.0 + (let ((f30-1 (fmin (acos f28-0) (* 0.53333336 (seconds-per-frame) f30-0)))) + (vector-cross! s4-1 gp-0 s5-0) + (vector-normalize! s4-1 1.0) + (vector-rotate-around-axis! gp-0 (the-as quaternion gp-0) f30-1 s4-1) + ) + ) + (set! (-> gp-0 y) 0.0) + (vector-normalize! gp-0 1.0) + ) + ) + ) + (let ((a0-27 (-> self nav state)) + (v1-48 gp-0) + ) + (set! (-> a0-27 heading quad) (-> v1-48 quad)) + ) + 0 + (set! (-> self nav-dir quad) (-> gp-0 quad)) + (vector-normalize! gp-0 (-> self swim-speed)) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (set! (-> s5-1 quad) (-> gp-0 quad)) + (set! (-> s5-1 y) 0.0) + (vector-normalize! s5-1 24576.0) + (saberfish-method-234 self s5-1) + (when (< (vector-length s5-1) 6144.0) + (set! (-> self swim-travel-anim) -1) + (set! (-> gp-0 quad) (the-as uint128 0)) + (go-virtual swim-180-spin) + ) + ) + (let ((a0-34 (-> self nav state)) + (v1-65 gp-0) + ) + (set! (-> a0-34 velocity quad) (-> v1-65 quad)) + ) + 0 + (set! (-> self nav-velocity quad) (-> gp-0 quad)) + ) + ) + ) + (none) + ) + +;; definition for function swimming-base-exit +;; WARN: Return type mismatch symbol vs none. +(defbehavior swimming-base-exit saberfish () + (set! (-> self root transv y) 0.0) + (set! (-> self saberfish-y-rotate) 0.0) + (set! (-> self doing-180-spin?) #f) + (none) + ) + +;; failed to figure out what this is: +(defstate swimming-base (saberfish) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-181 self) + (set! (-> self saberfish-y-rotate) 0.0) + (logclear! (-> self nav flags) (nav-control-flag limit-rotation-rate update-heading-from-facing)) + (set! (-> self swim-final-rotate-deg) 0.0) + (set! (-> self swim-travel-anim) 0) + (stop-look-at! self) + (set! (-> self swim-speed) 57344.0) + (set-time! (-> self state-time)) + ) + :exit swimming-base-exit + :trans (behavior () + (saberfish-method-220 self) + (saberfish-swim-travel-trans) + (if (saberfish-method-228 self) + (start-terrain-transition self) + ) + ) + :code saberfish-swim-code + :post (behavior () + (nav-enemy-method-187 self) + ) + ) + +;; failed to figure out what this is: +(defstate swimming-hostile (saberfish) + :virtual #t + :parent (saberfish swimming-base) + :enter (behavior () + (logior! (-> self focus-status) (focus-status dangerous)) + (let ((a0-0 (-> self state parent))) + (when a0-0 + (let ((t9-0 (-> a0-0 enter))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + (let ((a0-2 (handle->process (-> self focus handle)))) + (when a0-2 + (vector-! (-> self attack-dir) (get-trans (the-as process-focusable a0-2) 1) (-> self root trans)) + (set! (-> self attack-dir y) 0.0) + (vector-normalize! (-> self attack-dir) 1.0) + ) + ) + ) + :exit (behavior () + (logclear! (-> self focus-status) (focus-status dangerous)) + (let ((a0-1 (-> self prev-state parent))) + (when a0-1 + (let ((t9-0 (-> a0-1 exit))) + (if t9-0 + (t9-0) + ) + ) + ) + ) + (set! (-> self root transv y) 0.0) + ) + :trans (behavior () + (let ((s5-0 (handle->process (-> self focus handle))) + (gp-0 (new 'stack-no-clear 'vector)) + ) + (when #t + (let ((s4-0 #f)) + (let ((s3-0 #f)) + (when s5-0 + (set! (-> gp-0 quad) (-> (get-trans (the-as process-focusable s5-0) 3) quad)) + (let ((f0-2 (- (vector-dot (-> self root trans) (-> self attack-dir)) (vector-dot gp-0 (-> self attack-dir))))) + (if (< -61440.0 f0-2) + (set! s3-0 #t) + ) + (when (< 0.0 f0-2) + #t + (vector+float*! gp-0 gp-0 (-> self attack-dir) 32768.0) + (if (< 12288.0 f0-2) + (set! s4-0 #t) + ) + ) + ) + ) + (let ((a0-7 (-> self nav state)) + (v1-27 gp-0) + ) + (logclear! (-> a0-7 flags) (nav-state-flag directional-mode)) + (logior! (-> a0-7 flags) (nav-state-flag target-poly-dirty)) + (set! (-> a0-7 target-pos quad) (-> v1-27 quad)) + ) + 0 + (when (or (not (-> self adjusted-y-yet?)) (not s3-0)) + (saberfish-method-239 self gp-0) + (set! (-> self adjusted-y-yet?) #t) + ) + ) + (when (or (not s5-0) + (or s4-0 + (not (and (handle->process (-> self focus handle)) + (not (logtest? (-> (the-as process-focusable (handle->process (-> self focus handle))) focus-status) + (focus-status disable dead ignore grabbed) + ) + ) + ) + ) + ) + ) + (set! (-> self flee-to-readjust?) #f) + (set! (-> self use-stored-flee-point?) #f) + (set-time! (-> self scare-start-time)) + (let* ((f30-0 300.0) + (f28-0 2.5) + (f26-0 1.5) + (v1-50 (/ (the-as int (rand-uint31-gen *random-generator*)) 256)) + (v1-51 (the-as number (logior #x3f800000 v1-50))) + ) + (set! (-> self scare-time) + (the-as time-frame (the int (* f30-0 (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-51))))))) + ) + ) + (saberfish-method-231 + self + (-> self flee-point-temp) + 4551.1113 + #t + (vector-! (new 'stack-no-clear 'vector) (-> self root trans) gp-0) + ) + (go-flee self) + ) + ) + ) + ) + (let ((v1-61 (-> self state parent))) + (when v1-61 + (let ((t9-5 (-> v1-61 trans))) + (if t9-5 + (t9-5) + ) + ) + ) + ) + ) + ) + +;; definition for method 219 of type saberfish +;; WARN: Return type mismatch int vs none. +(defmethod saberfish-method-219 ((this saberfish)) + (set! (-> this enemy-info idle-anim) 3) + (set! (-> this enemy-info walk-anim) 6) + (set! (-> this enemy-info run-anim) 5) + (set! (-> this enemy-info hostile-anim) 5) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate active (saberfish) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((f30-0 (rnd-float-range self 0.9 1.1))) + (if (saberfish-method-243 self) + (set! f30-0 (* 0.65 f30-0)) + ) + (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)) + ) + ) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate spin-attack (saberfish) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-182 self) + (stop-look-at! self) + (logior! (-> self focus-status) (focus-status dangerous)) + (set-time! (-> self last-attack-time)) + ) + :exit (behavior () + (set-look-at-mode! self 1) + (logclear! (-> self focus-status) (focus-status dangerous)) + ) + :code (behavior () + (local-vars (f22-0 float) (f28-0 float) (f30-0 float)) + (let ((f24-0 (saberfish-method-215 self)) + (f26-0 1.0) + ) + 0.0 + 0.0 + 0.0 + 0.0 + (let ((f0-4 f24-0)) + (if (logtest? (enemy-flag drawn-mirrored) (-> self enemy-flags)) + (set! f0-4 (* -1.0 f0-4)) + ) + (cond + ((< 0.0 f0-4) + (ja-channel-push! 1 (seconds 0.2)) + (set! f30-0 3.0) + (set! f28-0 9.0) + (set! f22-0 6.0) + (ja-no-eval :group! saberfish-spin-attack-right-ja :num! (loop!) :frame-num 0.0) + ) + (else + (ja-channel-push! 1 (seconds 0.1)) + (set! f30-0 3.0) + (set! f28-0 9.0) + (set! f22-0 6.0) + (ja-no-eval :group! saberfish-spin-attack-left-ja :num! (loop!) :frame-num 0.0) + ) + ) + ) + (if (< f24-0 0.0) + (set! f26-0 -1.0) + ) + (let* ((f0-10 (fabs f24-0)) + (f0-11 (+ 16384.0 f0-10)) + (f26-1 (* (fmax 16384.0 (fmin 32768.0 f0-11)) f26-0 (/ 15.0 f22-0))) + ) + (until (ja-done? 0) + (let ((f0-15 (ja-frame-num 0))) + (if (and (>= f0-15 f30-0) (>= f28-0 f0-15)) + (quaternion-rotate-y! (-> self root quat) (-> self root quat) (* f26-1 (seconds-per-frame))) + ) + ) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (go-virtual hostile) + ) + :post (behavior () + (enemy-common-post self) + (update-transforms (-> self root)) + ) + ) + +;; definition for method 222 of type saberfish +(defmethod attack-delay-elapsed? ((this saberfish)) + (time-elapsed? (-> this last-attack-time) (seconds 1)) + ) + +;; definition for method 67 of type saberfish +(defmethod coin-flip? ((this saberfish)) + #f + ) + +;; definition for method 108 of type saberfish +(defmethod enemy-method-108 ((this saberfish) (arg0 process-focusable)) + (not (time-elapsed? (-> this scare-start-time) (-> this scare-time))) + ) + +;; definition for method 76 of type saberfish +(defmethod go-stare2 ((this saberfish)) + (if (not (and (-> this next-state) (let ((v1-3 (-> this next-state name))) + (or (= v1-3 'swimming-hostile) (= v1-3 'flee)) + ) + ) + ) + (call-parent-method this) + ) + ) + +;; definition for method 92 of type saberfish +;; WARN: Return type mismatch enemy-jump-flags vs none. +(defmethod init-jump-info! ((this saberfish) (arg0 enemy-jump-info)) + (call-parent-method this arg0) + (if (saberfish-method-243 this) + (logior! (-> arg0 flags) (enemy-jump-flags ejf0)) + (logclear! (-> arg0 flags) (enemy-jump-flags ejf0)) + ) + (logclear! (-> arg0 flags) (enemy-jump-flags ejf0)) + (none) + ) + +;; definition for method 232 of type saberfish +(defmethod do-jump ((this saberfish)) + (stop-look-at! this) + (cond + ((saberfish-method-243 this) + (set! (-> this jump windup-anim) (the-as uint 18)) + (set! (-> this jump air-anim) (the-as uint 19)) + (set! (-> this jump land-anim) (the-as uint 20)) + (set! (-> this move-to-ground?) #t) + ) + (else + (set! (-> this jump air-anim) (the-as uint 21)) + (set! (-> this jump land-anim) (the-as uint 22)) + (set! (-> this move-to-ground?) #f) + ) + ) + (let ((s3-1 (vector-! (new 'stack-no-clear 'vector) (-> this jump-point-end) (-> this jump-point-start))) + (s4-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + 0.0 + (+ (vector-length s3-1) (if (saberfish-method-243 this) + 49152.0 + 20480.0 + ) + ) + (set! (-> s4-0 y) 0.0) + (vector-normalize! s4-0 (if (saberfish-method-243 this) + 49152.0 + 20480.0 + ) + ) + (vector+! s5-0 (-> this jump-point-start) s4-0) + (set! (-> s5-0 y) (-> this jump-point-end y)) + (set! (-> this jump-start-ground-state) (the-as uint (get-ground-state this))) + (set! (-> this enemy-flags) + (the-as enemy-flag (logclear (-> this enemy-flags) (enemy-flag jump-check-blocked))) + ) + (send-event this 'jump 0 s5-0) + ) + ) + +;; failed to figure out what this is: +(defstate water-impact (saberfish) + :virtual #t + :parent (saberfish base-saberfish-state) + :enter (behavior () + (let ((v1-1 (-> self state parent))) + (when v1-1 + (let ((t9-0 (-> v1-1 enter))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + ) + :code (behavior () + (ja-no-eval :group! (-> self draw art-group data (-> self jump land-anim)) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (set! (-> self root transv quad) (the-as uint128 0)) + (compute-alignment! (-> self align)) + (align! (-> self align) (align-opts adjust-x-vel adjust-y-vel adjust-xz-vel) 1.0 1.0 1.0) + (vector-v++! (-> self root trans) (-> self root transv)) + (set! (-> self root transv quad) (the-as uint128 0)) + (vector+float*! + (-> self root trans) + (-> self root trans) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (* (lerp 40960.0 40960.0 (/ (ja-frame-num 0) (the float (ja-num-frames 0)))) (seconds-per-frame)) + ) + (set! (-> self root trans y) + (- (-> self root trans y) (* (lerp 83968.0 0.0 (* 0.2 (ja-frame-num 0))) (seconds-per-frame))) + ) + (suspend) + (ja :num! (seek!)) + ) + (logior! (-> self root root-prim prim-core collide-with) (collide-spec backgnd)) + (go-virtual swimming-hostile) + ) + ) + +;; failed to figure out what this is: +(defstate diving-into-water (saberfish) + :virtual #t + :parent (saberfish base-saberfish-state) + :enter (behavior () + (set! (-> self state-time) (+ (current-time) (seconds 8))) + (logclear! (-> self root status) (collide-status touch-surface)) + (set! (-> self root transv quad) (the-as uint128 0)) + (set! (-> self root transv y) -61440.0) + ) + :exit (behavior () + '() + ) + :trans (behavior () + (water-control-method-10 (-> self water)) + (vector+float*! + (-> self root trans) + (-> self root trans) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (* 40960.0 (seconds-per-frame)) + ) + (set! (-> self root trans y) (- (-> self root trans y) (* 81920.0 (seconds-per-frame)))) + (set! (-> self root transv quad) (the-as uint128 0)) + (if (or (< (-> self root trans y) (+ -8192.0 (-> self water surface-height))) + (logtest? (-> self root status) (collide-status touch-surface)) + (time-elapsed? (-> self state-time) (seconds 0.05)) + ) + (go-virtual water-impact) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (let ((gp-0 (-> self draw art-group data (-> self jump air-anim))) + (s5-0 #f) + ) + (ja-no-eval :group! gp-0 + :num! (identity (the float (+ (-> (the-as art-joint-anim gp-0) frames num-frames) -1))) + ) + (until #f + (ja :group! gp-0 :num! (identity (the float (+ (-> (the-as art-joint-anim gp-0) frames num-frames) -1)))) + (suspend) + (when (and (not s5-0) (< (-> self root trans y) (-> self water surface-height))) + (set! s5-0 #t) + (set-time! (-> self state-time)) + ) + ) + ) + #f + ) + :post enemy-falling-post + ) + +;; failed to figure out what this is: +(defstate transition-terrain-jump-from-water (saberfish) + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-182 self) + (set! (-> self saberfish-y-rotate) 0.0) + (quaternion-look-at! + (-> self root quat) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + *up-vector* + ) + ) + :exit (behavior () + (logior! (-> self enemy-flags) (enemy-flag vulnerable vulnerable-backup)) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja-no-eval :group! saberfish-jump-to-land-windup-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (let ((gp-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (f30-0 (ja-frame-num 0)) + ) + (set! (-> gp-0 y) 0.0) + (vector-normalize! gp-0 (-> self swim-speed)) + (vector-v++! (-> self root trans) gp-0) + (compute-alignment! (-> self align)) + (align! (-> self align) (align-opts adjust-y-vel) 1.0 1.0 1.0) + (set! (-> self root transv x) 0.0) + (set! (-> self root transv z) 0.0) + (vector-v++! (-> self root trans) (-> self root transv)) + (set! (-> self root transv quad) (the-as uint128 0)) + (if (>= f30-0 6.0) + (do-jump self) + ) + ) + (suspend) + (ja :num! (seek!)) + ) + (do-jump self) + ) + :post (behavior () + (enemy-common-post self) + (update-transforms (-> self root)) + ) + ) + +;; definition for function jump-from-land-dive-anim +;; WARN: Return type mismatch int vs none. +(defbehavior jump-from-land-dive-anim saberfish () + (let ((f30-0 1.0)) + (compute-alignment! (-> self align)) + (cond + ((< (ja-frame-num 0) 4.5) + (align! (-> self align) (align-opts adjust-x-vel adjust-y-vel adjust-xz-vel) 1.0 1.0 1.0) + (vector-v++! (-> self root trans) (-> self root transv)) + ) + ((< 4.5 (ja-frame-num 0)) + (vector+float*! + (-> self root trans) + (-> self root trans) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (* (lerp 81920.0 40960.0 (* 0.22222222 (+ -4.5 (ja-frame-num 0)))) (seconds-per-frame)) + ) + (set! (-> self root trans y) + (- (-> self root trans y) + (* (lerp 2048.0 81920.0 (* 0.22222222 (+ -4.5 (ja-frame-num 0)))) (seconds-per-frame)) + ) + ) + ) + ) + (suspend) + (ja :num! (seek! max f30-0)) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate transition-terrain-jump-from-land (saberfish) + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-182 self) + ) + :exit (behavior () + '() + ) + :code (behavior () + (logclear! (-> self water flags) (water-flag swim-ground)) + (ja-channel-push! 1 (seconds 0.2)) + (stop-look-at! self) + (logclear! (-> self root root-prim prim-core collide-with) (collide-spec backgnd)) + (set! (-> self jump air-anim) (the-as uint 21)) + (set! (-> self jump land-anim) (the-as uint 22)) + (ja-no-eval :group! (-> self draw art-group data (-> self jump air-anim)) :num! (seek!) :frame-num 0.0) + (set! (-> self root transv quad) (the-as uint128 0)) + (until (ja-done? 0) + (jump-from-land-dive-anim) + ) + (set! (-> self move-to-ground?) #f) + (go-virtual diving-into-water) + ) + :post (behavior () + (enemy-common-post self) + (update-transforms (-> self root)) + ) + ) + +;; failed to figure out what this is: +(defstate transition-terrain-jump (saberfish) + :virtual #t + :enter (behavior () + (if (saberfish-method-243 self) + (go transition-terrain-jump-from-water) + (go transition-terrain-jump-from-land) + ) + ) + :code sleep-code + ) + +;; definition for function transition-pursue-behavior +(defbehavior transition-pursue-behavior saberfish () + (when (-> self in-pursuit?) + (saberfish-method-220 self) + (if (desired-nav-idx-valid? self) + (go-virtual hostile) + ) + ) + (nav-enemy-method-187 self) + (none) + ) + +;; failed to figure out what this is: +(defstate transition-terrain-orient-towards-initial-jump (saberfish) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-182 self) + ) + :trans (behavior () + (if (< (fabs (saberfish-method-214 self (-> self jump-point-end))) 2730.6667) + (go transition-terrain-jump-from-land) + ) + ) + :code (behavior () + (saberfish-orient-code-setup) + (until #f + (let ((f0-0 (saberfish-method-214 self (-> self jump-point-end)))) + (if (= (saberfish-orient-code-single-pass f0-0) 0.0) + (go transition-terrain-jump-from-land) + ) + ) + ) + #f + ) + :post (behavior () + (enemy-common-post self) + (update-transforms (-> self root)) + ) + ) + +;; definition for function turbo-swim +;; WARN: new jak 2 until loop case, check carefully +(defbehavior turbo-swim saberfish () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! saberfish-swim-burst-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + +;; failed to figure out what this is: +(defstate transition-terrain-move-towards-initial-jump (saberfish) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-181 self) + (nav-enemy-method-183 self) + (set! (-> self swim-speed) 57344.0) + (when (saberfish-method-243 self) + (set! (-> self saberfish-y-rotate) 0.0) + (logclear! (-> self nav flags) (nav-control-flag limit-rotation-rate update-heading-from-facing)) + (set! (-> self swim-final-rotate-deg) 0.0) + (set! (-> self swim-travel-anim) 0) + 0 + ) + ) + :exit (behavior () + (if (saberfish-method-243 self) + (swimming-base-exit) + ) + ) + :trans (behavior () + (go-terrain-transition self #f) + (if (saberfish-method-243 self) + (saberfish-swim-travel-trans) + ) + ) + :code (behavior () + (cond + ((saberfish-method-243 self) + (saberfish-swim-code) + ) + (else + (let ((v1-3 (method-of-type enemy hostile))) + (when v1-3 + (let ((t9-2 (-> v1-3 code))) + (if t9-2 + ((the-as (function none) t9-2)) + ) + ) + ) + ) + ) + ) + ) + :post transition-pursue-behavior + ) + +;; definition for method 238 of type saberfish +;; INFO: Used lq/sq +;; ERROR: Unsupported inline assembly instruction kind - [mula.s f1, f4] +;; ERROR: Unsupported inline assembly instruction kind - [madda.s f2, f5] +;; ERROR: Unsupported inline assembly instruction kind - [madd.s f1, f3, f6] +(defmethod saberfish-method-238 ((this saberfish) (arg0 symbol) (arg1 float) (arg2 float)) + (local-vars + (f1-5 float) + (sv-192 vector) + (sv-196 float) + (sv-200 vector) + (sv-204 vector) + (sv-240 vector) + (sv-244 vector) + (sv-248 vector) + (sv-252 float) + (sv-256 float) + (sv-512 vector) + (sv-516 vector) + (sv-520 vector) + (sv-524 vector) + (sv-528 float) + (sv-532 float) + (sv-536 vector) + (sv-540 vector) + (sv-592 vector) + (sv-608 vector) + ) + (rlet ((vf0 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + ) + (init-vf0-vector) + (-> this swim-speed) + #t + (let ((s3-0 (new 'stack-no-clear 'saberfish-spawner-query-msg))) + (set! (-> s3-0 query-type) (saberfish-query-type can-go-to-ground?)) + (set! (-> s3-0 in-water?) #f) + (send-event (get-spawn-parent) 'saberfish-query s3-0) + (let ((v1-6 (-> s3-0 in-water?)) + (s3-1 #f) + ) + (cond + ((and arg0 (not v1-6)) + (set! s3-1 #t) + ) + (arg0 + (set! s3-1 #t) + (set! sv-192 (new 'stack-no-clear 'vector)) + (set! sv-196 (the-as float 30720.0)) + (set! sv-200 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (set! sv-204 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + (set! (-> sv-204 y) 0.0) + (vector-normalize! sv-204 1.0) + (set! sv-240 (vector-! (new 'stack-no-clear 'vector) (-> this jump-point-start) (-> this root trans))) + (set! sv-244 sv-204) + (set! sv-248 (vector-float*! (new 'stack-no-clear 'vector) sv-204 -1.0)) + (set! sv-252 (the-as float 0.0)) + (set! sv-256 (the-as float 0.0)) + (set! (-> sv-240 y) 0.0) + (vector-normalize! sv-240 1.0) + (set! sv-252 (vector-dot sv-244 sv-240)) + (set! sv-256 (vector-dot sv-248 sv-240)) + (cond + ((< sv-256 sv-252) + (vector+float*! sv-192 (-> this root trans) sv-244 sv-196) + (set! (-> sv-204 quad) (-> sv-244 quad)) + ) + (else + (vector+float*! sv-192 (-> this root trans) sv-248 sv-196) + (set! (-> sv-204 quad) (-> sv-248 quad)) + ) + ) + (when (< (* sv-196 sv-196) (vector-vector-xz-distance-squared sv-192 (-> this jump-point-start))) + (set! sv-592 (new 'stack-no-clear 'vector)) + (let ((v1-33 (-> this jump-point-start)) + (a0-22 sv-192) + ) + (.lvf vf4 (&-> v1-33 quad)) + (.lvf vf5 (&-> a0-22 quad)) + ) + (.mov.vf vf6 vf0 :mask #b1000) + (.sub.vf vf6 vf4 vf5 :mask #b111) + (.svf (&-> sv-592 quad) vf6) + (set! sv-608 (new 'stack-no-clear 'vector)) + (let ((s0-1 (new 'stack-no-clear 'vector)) + (s2-1 (new 'stack-no-clear 'vector)) + ) + (let ((s3-2 (new 'stack-no-clear 'vector)) + (s1-1 (new 'stack-no-clear 'vector)) + ) + 0.0 + 0.0 + (set! (-> sv-592 y) 0.0) + (let* ((f0-19 (vector-length sv-592)) + (f30-1 (sqrtf (- (* f0-19 f0-19) (* sv-196 sv-196)))) + ) + (let ((f28-0 (atan sv-196 f30-1))) + (vector-normalize! sv-592 -1.0) + (vector-rotate-y! sv-608 sv-592 f28-0) + (let ((t9-10 vector-rotate-y!) + (a0-26 s0-1) + (a2-2 (- f28-0)) + ) + (t9-10 a0-26 sv-592 a2-2) + ) + ) + (vector-normalize! sv-608 f30-1) + (vector-normalize! s0-1 f30-1) + ) + (vector+float*! s3-2 (-> this jump-point-start) sv-608 1.0) + (vector+float*! s1-1 (-> this jump-point-start) s0-1 1.0) + (vector-! sv-608 s3-2 (-> this root trans)) + (vector-! s0-1 s1-1 (-> this root trans)) + (set! (-> sv-608 y) 0.0) + (set! (-> s0-1 y) 0.0) + (let ((f30-2 (vector-normalize-ret-len! sv-608 1.0)) + (f0-28 (vector-normalize-ret-len! s0-1 1.0)) + ) + (let* ((v1-47 sv-200) + (f1-4 (-> sv-608 x)) + (f2-1 (-> sv-608 y)) + (f3-0 (-> sv-608 z)) + (f4-0 (-> v1-47 x)) + (f5-0 (-> v1-47 y)) + (f6-0 (-> v1-47 z)) + ) + (.mula.s f1-4 f4-0) + (.madda.s f2-1 f5-0) + (.madd.s f1-5 f3-0 f6-0) + ) + (set! sv-252 f1-5) + (set! sv-256 (vector-dot s0-1 sv-200)) + (cond + ((< f30-2 40.96) + (set! (-> s2-1 quad) (-> s3-2 quad)) + ) + ((< f0-28 40.96) + (set! (-> s2-1 quad) (-> s1-1 quad)) + ) + ((< sv-256 sv-252) + (set! (-> s2-1 quad) (-> s3-2 quad)) + ) + (else + (set! (-> s2-1 quad) (-> s1-1 quad)) + ) + ) + ) + ) + (set! (-> s2-1 y) (-> this root trans y)) + (cond + ((< (vector-vector-xz-distance-squared (-> this jump-point-start) s2-1) 822083600.0) + (if (< 8192.0 arg1) + (set! s3-1 #t) + (set! s3-1 #f) + ) + ) + ((begin + (let ((s3-4 (vector-! (new 'stack-no-clear 'vector) (-> this jump-point-start) (-> this jump-point-end))) + (s0-2 (new 'stack-no-clear 'vector)) + (s1-2 (new 'stack-no-clear 'vector)) + ) + (set! (-> s3-4 y) 0.0) + (vector-normalize! s3-4 1.0) + (vector-rotate-y! s0-2 s3-4 -8192.0) + (vector-rotate-y! s1-2 s3-4 8192.0) + (vector-normalize! s0-2 arg2) + (vector-normalize! s1-2 arg2) + (set! s3-1 #f) + (set! sv-512 (vector+! (new 'stack-no-clear 'vector) (-> this jump-point-start) s0-2)) + (set! sv-516 (vector+! (new 'stack-no-clear 'vector) (-> this jump-point-start) s1-2)) + (set! sv-520 (new 'stack-no-clear 'vector)) + (set! sv-524 (new 'stack-no-clear 'vector)) + (set! sv-528 (the-as float 0.0)) + (set! sv-532 (the-as float 0.0)) + (set! sv-536 (new 'stack-no-clear 'vector)) + (set! sv-540 (new 'stack-no-clear 'vector)) + (set! (-> sv-536 quad) (-> this root trans quad)) + (set! (-> sv-540 quad) (-> s2-1 quad)) + (set! (-> sv-536 y) (-> sv-512 y)) + (set! (-> sv-540 y) (-> sv-512 y)) + (let ((a1-37 (vector-! (new 'stack-no-clear 'vector) sv-516 sv-512)) + (a0-60 (new 'stack-no-clear 'vector)) + (v1-76 (new 'stack-no-clear 'vector)) + ) + (set-vector! a0-60 (-> s0-2 z) 0.0 (- (-> s0-2 x)) 1.0) + (set-vector! v1-76 (- (-> s0-2 z)) 0.0 (-> s0-2 x) 1.0) + (set! sv-252 (vector-dot a0-60 a1-37)) + (if (< 0.0 sv-252) + (set! (-> sv-520 quad) (-> a0-60 quad)) + (set! (-> sv-520 quad) (-> v1-76 quad)) + ) + (set-vector! a0-60 (-> s1-2 z) 0.0 (- (-> s1-2 x)) 1.0) + (set-vector! v1-76 (- (-> s1-2 z)) 0.0 (-> s1-2 x) 1.0) + (set! sv-252 (vector-dot a0-60 a1-37)) + (if (< 0.0 sv-252) + (set! (-> sv-524 quad) (-> v1-76 quad)) + (set! (-> sv-524 quad) (-> a0-60 quad)) + ) + ) + ) + (vector-normalize! sv-520 1.0) + (vector-normalize! sv-524 1.0) + (set! sv-528 (vector-dot sv-520 sv-512)) + (set! sv-252 (vector-dot sv-520 sv-536)) + (set! sv-256 (vector-dot sv-520 sv-540)) + (or (< sv-252 sv-528) (< sv-256 sv-528)) + ) + (set! s3-1 #t) + ) + (else + (set! sv-532 (vector-dot sv-524 sv-516)) + (set! sv-252 (vector-dot sv-524 sv-536)) + (set! sv-256 (vector-dot sv-524 sv-540)) + (if (or (< sv-252 sv-532) (< sv-256 sv-532)) + (set! s3-1 #t) + ) + ) + ) + ) + ) + ) + ) + (when (< 26624.0 (- (-> this water surface-height) (-> this root trans y))) + ) + (cond + (s3-1 + (set-time! (-> this scare-start-time)) + (set! (-> this scare-time) (seconds 12.5)) + (set! (-> this flee-to-readjust?) #t) + (set! (-> this use-stored-flee-point?) #t) + (saberfish-method-231 this (-> this flee-point-temp) 1820.4445 #f (the-as vector #f)) + (set-time! (-> this last-land-check-time)) + (let* ((a0-70 this) + (t9-24 (method-of-object a0-70 saberfish-method-218)) + ) + #t + (t9-24 a0-70) + ) + (if (not (and (-> this next-state) (= (-> this next-state name) 'flee))) + (go-flee this) + ) + ) + ((and (< arg2 49152.0) (< arg1 8192.0)) + (go transition-terrain-jump-from-water) + ) + ((not (and (-> this next-state) (= (-> this next-state name) 'transition-terrain-move-towards-initial-jump))) + (go (method-of-object this transition-terrain-move-towards-initial-jump)) + ) + ) + ) + ) + ) + ) + +;; definition for method 224 of type saberfish +(defmethod go-terrain-transition ((this saberfish) (arg0 symbol)) + (let ((f30-0 (vector-vector-xz-distance (-> this root trans) (-> this jump-point-start))) + (s4-1 (vector-! (new 'stack-no-clear 'vector) (-> this jump-point-end) (-> this jump-point-start))) + (s3-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat))) + ) + (set! (-> s4-1 y) 0.0) + (vector-normalize! s4-1 1.0) + (let* ((f0-2 (vector-dot s3-0 s4-1)) + (f28-0 (acos f0-2)) + ) + (cond + ((saberfish-method-243 this) + (saberfish-method-238 this arg0 f28-0 f30-0) + ) + (else + (cond + ((and (< f30-0 4096.0) (< f28-0 2730.6667)) + (go transition-terrain-jump-from-land) + ) + ((< f30-0 8192.0) + (nav-enemy-method-176 this) + (go (method-of-object this transition-terrain-orient-towards-initial-jump)) + ) + ((not (and (-> this next-state) (= (-> this next-state name) 'transition-terrain-move-towards-initial-jump))) + (nav-enemy-method-177 this) + (go (method-of-object this transition-terrain-move-towards-initial-jump)) + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 233 of type saberfish +(defmethod saberfish-method-233 ((this saberfish)) + (let ((gp-0 (new 'stack-no-clear 'nav-poly)) + (a0-2 (saberfish-method-236 this (-> this current-nav-mesh-index))) + ) + (if (not a0-2) + (return (the-as nav-poly #f)) + ) + (vector-! (the-as vector (-> gp-0 vertex)) (-> this root trans) (the-as vector (-> a0-2 bounds))) + (set! (-> gp-0 vertex1 x) 40960.0) + (set! (-> gp-0 data 20) (the-as uint 3)) + (nav-mesh-method-45 a0-2 gp-0) + ) + ) + +;; definition for method 231 of type saberfish +;; INFO: Used lq/sq +(defmethod saberfish-method-231 ((this saberfish) (arg0 vector) (arg1 float) (arg2 symbol) (arg3 vector)) + (local-vars (sv-64 vector) (sv-68 vector) (sv-72 float) (sv-76 float) (sv-80 vector) (sv-84 float)) + (set! sv-64 (new 'stack-no-clear 'vector)) + (set! sv-68 (new 'stack-no-clear 'vector)) + (set! sv-72 (the-as float 0.0)) + (set! sv-76 (the-as float 0.0)) + (set! sv-80 (new 'stack-no-clear 'vector)) + (set! sv-84 (the-as float -1.0)) + (if arg2 + (set! (-> sv-64 quad) (-> arg3 quad)) + (vector-! sv-64 (-> this jump-point-start) (-> this jump-point-end)) + ) + (set! (-> sv-64 y) 0.0) + (set! sv-76 arg1) + (vector-normalize-copy! sv-68 sv-64 1.0) + (let ((s3-0 (saberfish-method-236 this (-> this current-nav-mesh-index))) + (s2-0 (new 'stack-no-clear 'clamp-travel-vector-to-mesh-return-info)) + (s1-0 (saberfish-method-233 this)) + ) + 0.0 + (when s1-0 + (dotimes (s0-0 13) + (vector-rotate-y! sv-64 sv-68 sv-72) + (vector-normalize! sv-64 94208.0) + (clamp-vector-to-mesh-no-gaps s3-0 (-> this root trans) s1-0 sv-64 s2-0) + (vector+! arg0 (-> this root trans) sv-64) + (let ((f0-7 (vector-length sv-64))) + (when (< 84787.195 f0-7) + (set! (-> arg0 y) (-> this water surface-height)) + (return #t) + ) + (when (< sv-84 f0-7) + (set! sv-84 f0-7) + (set! (-> sv-80 quad) (-> arg0 quad)) + ) + ) + (if (= (logand s0-0 1) 1) + (set! sv-72 (+ sv-72 sv-76)) + (set! sv-72 (- sv-72 sv-76)) + ) + (set! sv-76 (+ sv-76 arg1)) + ) + (set! (-> arg0 quad) (-> sv-80 quad)) + (set! (-> arg0 y) (-> this water surface-height)) + (return #t) + ) + ) + #f + ) + +;; definition for method 230 of type saberfish +(defmethod change-nav-mesh ((this saberfish)) + (let* ((s5-0 (get-nav-mesh-idx this (-> this root trans) (saberfish-find-behavior none))) + (a0-3 (saberfish-method-236 this s5-0)) + ) + (when (and (>= s5-0 0) (or (!= s5-0 (-> this current-nav-mesh-index)) (!= (-> this nav state mesh) a0-3))) + (set! (-> this current-nav-mesh-index) s5-0) + (change-to a0-3 this) + ) + ) + (none) + ) + +;; definition for method 227 of type saberfish +(defmethod desired-nav-idx-valid? ((this saberfish)) + (!= (-> this desired-dest-mesh-index) (-> this dest-nav-mesh-index)) + ) + +;; definition for method 229 of type saberfish +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod set-dest-nav! ((this saberfish) (arg0 vector) (arg1 saberfish-find-behavior)) + (set! (-> this desired-dest-nav-point quad) (-> arg0 quad)) + (set! (-> this desired-dest-mesh-index) (get-nav-mesh-idx this arg0 arg1)) + (when (= (-> this desired-dest-mesh-index) -1) + ) + 0 + (none) + ) + +;; definition for method 228 of type saberfish +(defmethod saberfish-method-228 ((this saberfish)) + (and (not (-> this ground-only?)) + (>= (+ (current-time) (seconds -0.1)) (-> this last-swim-flip-time)) + (!= (-> this desired-dest-mesh-index) (-> this current-nav-mesh-index)) + (!= (-> this current-nav-mesh-index) -1) + ) + ) + +;; definition for method 226 of type saberfish +(defmethod start-terrain-transition ((this saberfish)) + (set-should-move-to-ground this) + (send-event (get-spawn-parent) 'transition-terrain-begin) + (go-terrain-transition this #t) + ) + +;; definition for method 160 of type saberfish +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod normalize-heading! ((this saberfish) (arg0 nav-control)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (cond + ((and (not (and (-> this next-state) (= (-> this next-state name) 'transition-terrain-orient-towards-initial-jump))) + (and (logtest? (enemy-flag ef37) (-> this enemy-flags)) + (not (logtest? (enemy-flag ef39) (-> this enemy-flags))) + ) + ) + (cond + ((or (saberfish-method-243 this) (not (logtest? (enemy-flag ef37) (-> this enemy-flags)))) + (set! (-> s5-0 quad) (-> this nav-dir quad)) + ) + (else + (let ((a1-3 (-> this nav state))) + (set! (-> s5-0 quad) (-> a1-3 heading quad)) + ) + ) + ) + (set! (-> s5-0 y) 0.0) + (vector-normalize! s5-0 1.0) + (let ((s4-0 (new 'stack-no-clear 'quaternion))) + (quaternion-set! s4-0 0.0 (-> s5-0 x) 0.0 (+ 1.0 (-> s5-0 z))) + (quaternion-normalize! s4-0) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> this root quat)) + (vector-z-quaternion! (new 'stack-no-clear 'vector) s4-0) + (if (>= (+ (current-time) (seconds -0.6)) (-> this last-swim-flip-time)) + (quaternion-copy! (-> this root quat) s4-0) + (quaternion-slerp! (-> this root quat) (-> this root quat) s4-0 (* 4.0 (seconds-per-frame))) + ) + ) + ) + (else + ) + ) + ) + (if (saberfish-method-243 this) + (quaternion-rotate-local-x! (-> this root quat) (-> this root quat) (-> this saberfish-y-rotate)) + ) + 0 + (none) + ) + +;; definition for method 98 of type saberfish +(defmethod jump-wind-up-anim ((this saberfish) (arg0 enemy-jump-info)) + (when (not (saberfish-method-243 this)) + (ja-channel-push! 1 (seconds 0.1)) + (let ((a1-2 (-> this draw art-group data (-> this jump windup-anim))) + (a0-5 (-> this skel root-channel 0)) + ) + (set! (-> a0-5 frame-group) (the-as art-joint-anim a1-2)) + (set! (-> a0-5 param 0) (the float (+ (-> (the-as art-joint-anim a1-2) 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-2) num-func-seek!) + ) + ) + #t + ) + +;; definition for method 96 of type saberfish +(defmethod jump-in-air-anim ((this saberfish) (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 97 of type saberfish +(defmethod jump-land-anim ((this saberfish) (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 93 of type saberfish +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs none. +(defmethod setup-jump! ((this saberfish) (arg0 enemy-jump-info)) + (let ((f0-0 (vector-vector-xz-distance (-> arg0 start-pos) (-> arg0 dest-pos)))) + (fmax (-> this enemy-info jump-height-min) (* (-> this enemy-info jump-height-factor) f0-0)) + ) + (let ((f0-4 (- (-> arg0 dest-pos y) (-> arg0 start-pos y))) + (v1-3 (vector-! (new 'stack-no-clear 'vector) (-> arg0 dest-pos) (-> arg0 start-pos))) + ) + (set! (-> v1-3 y) 0.0) + (let ((f0-6 (* (/ f0-4 (vector-length v1-3)) (if (saberfish-method-243 this) + 49152.0 + 20480.0 + ) + ) + ) + ) + (+ 2048.0 f0-6) + ) + ) + (let ((s4-0 (new 'stack-no-clear 'traj3d-params))) + (set! (-> s4-0 dest quad) (-> arg0 dest-pos quad)) + (set! (-> s4-0 src quad) (-> arg0 start-pos quad)) + (let ((f30-1 11832.889)) + (if (not (saberfish-method-243 this)) + (set! f30-1 8192.0) + ) + (set! (-> s4-0 initial-tilt) f30-1) + ) + (set! (-> s4-0 gravity) 4.551111) + (traj3d-calc-initial-velocity-using-tilt s4-0) + (set! (-> arg0 traj initial-position quad) (-> arg0 start-pos quad)) + (set! (-> arg0 traj gravity) -4.551111) + (set! (-> arg0 traj time) (-> s4-0 time)) + (set! (-> arg0 traj initial-velocity quad) (-> s4-0 initial-velocity quad)) + ) + (none) + ) + +;; definition for method 225 of type saberfish +;; INFO: Used lq/sq +(defmethod get-nav-mesh-idx ((this saberfish) (arg0 vector) (arg1 saberfish-find-behavior)) + (let ((gp-0 (new 'stack-no-clear 'saberfish-spawner-query-msg))) + (set! (-> gp-0 query-type) (saberfish-query-type set-nav-idx)) + (set! (-> gp-0 behavior) arg1) + (set! (-> (the-as vector (&-> gp-0 mesh)) quad) (-> arg0 quad)) + (send-event (get-spawn-parent) 'saberfish-query gp-0) + (-> gp-0 closest-nav-mesh-index) + ) + ) + +;; definition for method 164 of type saberfish +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defmethod nav-enemy-method-164 ((this saberfish)) + (call-parent-method this) + (let* ((a0-3 this) + (t9-2 (method-of-object a0-3 set-dest-nav!)) + (a2-0 (-> this nav state)) + (a1-1 (new 'stack-no-clear 'vector)) + ) + (set! (-> a1-1 quad) (-> a2-0 target-pos quad)) + (t9-2 a0-3 a1-1 (saberfish-find-behavior none)) + ) + (if (saberfish-method-228 this) + (start-terrain-transition this) + ) + (none) + ) + +;; definition for method 166 of type saberfish +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs vector. +(defmethod nav-enemy-method-166 ((this saberfish) (arg0 vector) (arg1 vector)) + (cond + (#t + (set! (-> arg0 quad) (-> this flee-point-temp quad)) + #t + ) + (else + (call-parent-method this arg0 arg1) + ) + ) + (if (saberfish-method-243 this) + (set! (-> arg0 y) (-> this water surface-height)) + ) + (the-as vector #t) + ) + +;; failed to figure out what this is: +(defstate flee (saberfish) + :virtual #t + :enter (behavior () + (set! (-> self swim-speed) 57344.0) + (when (saberfish-method-243 self) + (set! (-> self saberfish-y-rotate) 0.0) + (logclear! (-> self nav flags) (nav-control-flag limit-rotation-rate update-heading-from-facing)) + (set! (-> self swim-final-rotate-deg) 0.0) + (set! (-> self swim-travel-anim) 0) + 0 + ) + (let ((t9-2 (-> (find-parent-state) enter))) + (if t9-2 + (t9-2) + ) + ) + ) + :exit (behavior () + (set! (-> self scare-time) 0) + (if (saberfish-method-243 self) + (swimming-base-exit) + ) + (let ((t9-3 (-> (find-parent-state) exit))) + (if t9-3 + (t9-3) + ) + ) + ) + :trans (behavior () + (when (-> self flee-to-readjust?) + (when (time-elapsed? (-> self state-time) (-> self reaction-time)) + (when (time-elapsed? (-> self last-target-check-time) (seconds 0.2)) + (set-time! (-> self last-target-check-time)) + (saberfish-method-220 self) + (when (desired-nav-idx-valid? self) + (set! (-> self scare-time) 0) + 0 + ) + ) + (saberfish-method-239 self (-> self flee-point-temp)) + ) + ) + (when (< (vector-vector-xz-distance (-> self root trans) (-> self flee-point-temp)) 16384.0) + (set! (-> self scare-time) 0) + 0 + ) + (when (time-elapsed? (-> self last-land-check-time) (seconds 2.5)) + (saberfish-method-220 self) + (set-time! (-> self last-land-check-time)) + (if (saberfish-method-228 self) + (start-terrain-transition self) + ) + ) + (saberfish-swim-travel-trans) + (when (>= (the-as int (-> self focus aware)) 2) + (let ((t9-9 (-> (find-parent-state) trans))) + (if t9-9 + (t9-9) + ) + ) + ) + ) + :code (behavior () + (saberfish-swim-code) + ) + ) + +;; definition for method 107 of type saberfish +(defmethod is-pfoc-in-mesh? ((this saberfish) (arg0 process-focusable) (arg1 vector)) + (if (and arg0 (not arg1)) + (set! arg1 (get-trans arg0 1)) + ) + (when arg1 + (let* ((f0-0 (-> arg1 y)) + (v1-4 (-> this root)) + (f1-0 (-> v1-4 trans y)) + (a0-2 (-> this fact)) + ) + (when (and (< f0-0 (+ f1-0 (-> a0-2 notice-top))) (< (- f1-0 (-> a0-2 notice-bottom)) f0-0)) + (let ((f0-1 (-> this enemy-info notice-nav-radius))) + (or (>= (* f0-1 f0-1) (vector-vector-xz-distance-squared (-> v1-4 trans) arg1)) + (>= (get-nav-mesh-idx this arg1 (saberfish-find-behavior none)) 0) + ) + ) + ) + ) + ) + ) + +;; definition for method 59 of type saberfish +;; INFO: Used lq/sq +(defmethod enemy-common-post ((this saberfish)) + (if (not (handle->process (-> this spawn-parent))) + (go (method-of-object this die)) + ) + (water-control-method-10 (-> this water)) + (let ((a1-1 (-> this nav state)) + (a0-6 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-6 quad) (-> a1-1 heading quad)) + (set! (-> a0-6 y) 0.0) + (vector-normalize! a0-6 1.0) + ) + (when (= (-> this pid) 275) + ) + (set-should-move-to-ground this) + (if (and (-> this next-state) + (let ((v1-19 (-> this next-state name))) + (or (= v1-19 'diving-into-water) (= v1-19 'water-impact) (= v1-19 'jump) (= v1-19 'knocked)) + ) + ) + (change-nav-mesh this) + ) + (let ((a1-8 (-> this nav state)) + (a0-14 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-14 quad) (-> a1-8 travel quad)) + (set! (-> a0-14 y) 0.0) + (vector-normalize! a0-14 1.0) + ) + (cond + ((saberfish-method-243 this) + (logclear! (-> this nav flags) (nav-control-flag limit-rotation-rate update-heading-from-facing)) + (stop-look-at! this) + ) + ((= (-> this ground-state) 4) + (logior! (-> this nav flags) (nav-control-flag limit-rotation-rate update-heading-from-facing)) + ) + ) + (call-parent-method this) + (none) + ) + +;; definition for method 99 of type saberfish +;; INFO: Used lq/sq +(defmethod jump-anim-handler ((this saberfish) (arg0 int) (arg1 enemy-jump-info)) + (when (saberfish-method-243 this) + (case arg0 + ((5) + (compute-alignment! (-> this align)) + (align! (-> this align) (align-opts adjust-x-vel adjust-y-vel adjust-xz-vel) 1.0 1.0 1.0) + (vector-v++! (-> this root trans) (-> this root transv)) + (when (< (ja-frame-num 0) 8.0) + (let ((f0-1 (vector-length (-> this root transv)))) + (let ((v1-17 (-> this nav state))) + (set! (-> v1-17 speed) f0-1) + ) + 0 + (let ((v1-19 (-> this nav))) + (set! (-> v1-19 target-speed) f0-1) + ) + 0 + (set! (-> this swim-speed) f0-1) + ) + ) + (set! (-> this root transv quad) (the-as uint128 0)) + ) + ) + ) + (call-parent-method this arg0 arg1) + ) + +;; definition for method 102 of type saberfish +(defmethod go-directed2 ((this saberfish)) + (if (saberfish-method-243 this) + (go (method-of-object this water-land)) + (call-parent-method this) + ) + ) + +;; definition for method 50 of type saberfish +;; WARN: Return type mismatch int vs none. +(defmethod enemy-method-50 ((this saberfish) (arg0 int)) + (let ((v1-0 arg0)) + (cond + ((= v1-0 1) + (let ((v1-4 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 2))) + (set! (-> v1-4 prim-core action) (collide-action solid)) + (set! (-> v1-4 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list water pusher) + ) + ) + ) + ((or (= v1-0 2) (zero? v1-0)) + (let ((v1-8 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 2))) + (set! (-> v1-8 prim-core action) (collide-action)) + (set! (-> v1-8 prim-core collide-with) (collide-spec)) + ) + 0 + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate knocked (saberfish) + :virtual #t + :enter (behavior () + (set! (-> self knocked-under-water?) #f) + (set! (-> self move-to-ground?) #f) + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate knocked-recover-water (saberfish) + :virtual #t + :parent (saberfish knocked-recover) + :enter (behavior () + '() + ) + :code (behavior () + (when (handle->process (-> self ragdoll-proc)) + (enable-ragdoll! (-> (the-as ragdoll-proc (handle->process (-> self ragdoll-proc))) ragdoll) self) + (saberfish-method-240 self (seconds 1)) + ) + (ja-channel-push! 1 0) + (ja-no-eval :group! saberfish-swim-180-turn-ja :num! (seek!) :frame-num 0.0) + (let ((gp-0 (current-time))) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (go-virtual swimming-hostile) + ) + :post (behavior () + (enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate knocked-recover (saberfish) + :virtual #t + :enter (behavior () + (set-should-move-to-ground self) + (if (saberfish-method-243 self) + (go-virtual knocked-recover-water) + ) + (let ((t9-4 (-> (find-parent-state) enter))) + (if t9-4 + (t9-4) + ) + ) + ) + :code (behavior () + (if (handle->process (-> self ragdoll-proc)) + (enable-ragdoll! (-> (the-as ragdoll-proc (handle->process (-> self ragdoll-proc))) ragdoll) self) + ) + (ja-channel-push! 1 0) + (ja-no-eval :group! saberfish-flip-up-start-ja :num! (seek!) :frame-num 0.0) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 0.4)) + (suspend) + ) + ) + (ja-channel-push! 1 0) + (ja-no-eval :group! saberfish-flip-up-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (change-nav-mesh self) + (water-control-method-10 (-> self water)) + (if (enemy-method-109 self) + (go-die self) + (go-hostile self) + ) + ) + ) + +;; definition for method 81 of type saberfish +(defmethod go-die ((this saberfish)) + (sound-play "sabfish-death") + (send-event (handle->process (-> this spawn-parent)) 'child-die) + (call-parent-method this) + ) + +;; definition for method 20 of type saberfish +(defmethod process-mask->search-info-flag ((this saberfish)) + (let ((v0-1 (call-parent-method this))) + (if (-> this is-submerged?) + (set! v0-1 (logior v0-1 (search-info-flag abort))) + ) + v0-1 + ) + ) + +;; definition for method 235 of type saberfish +;; WARN: Return type mismatch int vs none. +(defmethod on-submerged ((this saberfish) (arg0 symbol)) + (if arg0 + (logclear! (-> this enemy-flags) (enemy-flag vulnerable vulnerable-backup)) + (logior! (-> this enemy-flags) (enemy-flag vulnerable vulnerable-backup)) + ) + (set! (-> this is-submerged?) arg0) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate idle (saberfish) + :virtual #t + :trans (behavior () + (when (time-elapsed? (-> self state-time) (-> self state-timeout)) + (cond + ((= (-> self focus aware) (enemy-aware ea1)) + (go-virtual active) + ) + ((< 1 (the-as int (-> self focus aware))) + (go-virtual notice) + ) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate notice (saberfish) + :virtual #t + :enter (behavior () + (go-virtual hostile) + ) + ) + +;; definition for function saberfish-command-event-handler +(defbehavior saberfish-command-event-handler saberfish ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('saberfish-command) + (case (-> arg3 param 0) + (('go-alive) + (go-virtual idle) + ) + ) + ) + (else + (event-handler self arg0 arg1 arg2 arg3) + ) + ) + ) + +;; failed to figure out what this is: +(defstate command-mode (saberfish) + :virtual #t + :event saberfish-command-event-handler + :trans (behavior () + '() + ) + :code sleep-code + ) + +;; failed to figure out what this is: +(defstate saberfish-swimming (saberfish) + :virtual #t + :parent (saberfish command-mode) + :enter (behavior () + (set! (-> self swim-travel-anim) 0) + (set! (-> self saberfish-y-rotate) 0.0) + (set! (-> self swim-final-rotate-deg) 0.0) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (vector+float*! + (-> self root trans) + (-> self root trans) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (* 57344.0 (seconds-per-frame)) + ) + (when (time-elapsed? (-> self state-time) (seconds 1)) + (set! (-> self current-nav-mesh-index) -1) + (change-nav-mesh self) + (go-virtual swimming-hostile) + ) + (let ((v1-15 (-> self state parent))) + (when v1-15 + (let ((t9-3 (-> v1-15 trans))) + (if t9-3 + (t9-3) + ) + ) + ) + ) + ) + :code (behavior () + (saberfish-swim-code) + ) + ) + +;; failed to figure out what this is: +(defstate saberfish-crawl-out-of-tube (saberfish) + :virtual #t + :parent (saberfish command-mode) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :code (behavior () + (logclear! (-> self water flags) (water-flag swim-ground)) + (ja-channel-push! 1 0) + (stop-look-at! self) + (logclear! (-> self root root-prim prim-core collide-with) (collide-spec backgnd)) + (set! (-> self jump air-anim) (the-as uint 21)) + (set! (-> self jump land-anim) (the-as uint 22)) + (ja-no-eval :group! saberfish-crawl-out-of-tube-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (vector+float*! + (-> self root trans) + (-> self root trans) + (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat)) + (* 40960.0 (seconds-per-frame)) + ) + (suspend) + (ja :num! (seek!)) + ) + (set! (-> self root transv quad) (the-as uint128 0)) + (ja-channel-push! 1 0) + (ja :group! saberfish-jump-to-water-air-ja :num! (identity 5.0)) + (until (ja-done? 0) + (jump-from-land-dive-anim) + ) + (set! (-> self move-to-ground?) #f) + (go-virtual diving-into-water) + ) + :post (behavior () + (ja-post) + ) + ) + +;; failed to figure out what this is: +(defstate saberfish-sitting-on-land (saberfish) + :virtual #t + :parent (saberfish command-mode) + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('saberfish-command) + (case (-> block param 0) + (('go-alive) + (go transition-terrain-jump-from-land) + ) + ) + ) + (else + (event-handler self proc argc message block) + ) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! saberfish-idle-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post (behavior () + (ja-post) + ) + ) + +;; definition for method 122 of type saberfish +(defmethod go-idle2 ((this saberfish)) + (case (-> this initial-state) + (('saberfish-crawl-out-of-tube) + (go (method-of-object this saberfish-crawl-out-of-tube)) + ) + (('saberfish-sitting-on-land) + (go (method-of-object this saberfish-sitting-on-land)) + ) + (('saberfish-swimming) + (go (method-of-object this saberfish-swimming)) + ) + (('idle) + (go (method-of-object this hostile)) + ) + ) + ) + +;; definition for method 11 of type saberfish +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this saberfish) (arg0 entity-actor)) + (set! (-> this ground-only?) #t) + (set! (-> this spawn-parent) (process->handle this)) + (set! (-> *saberfish-nav-enemy-info* nav-mesh) + (find-nearest-nav-mesh (-> arg0 extra trans) (the-as float #x7f800000)) + ) + (set! (-> this initial-state) 'idle) + (set! (-> this pos-start quad) (-> arg0 extra trans quad)) + (quaternion-copy! (-> this quat-start) (-> arg0 quat)) + (call-parent-method this arg0) + ) + +;; definition for function saberfish-init-by-other +;; INFO: Used lq/sq +(defbehavior saberfish-init-by-other saberfish ((arg0 process-drawable) (arg1 saberfish-init-by-other-params)) + (set! (-> self pos-start quad) (-> arg1 pos quad)) + (quaternion-copy! (-> self quat-start) (-> arg1 orient)) + (set! (-> self spawn-parent) (-> arg1 spawn-parent)) + (set! (-> self initial-state) (-> arg1 initial-state)) + (stack-size-set! (-> self main-thread) 512) + (set! (-> self ground-only?) #f) + (enemy-init-by-other arg0 arg1) + ) + +;; definition for method 236 of type saberfish +(defmethod saberfish-method-236 ((this saberfish) (arg0 int)) + (let ((gp-0 (new 'stack-no-clear 'saberfish-spawner-query-msg))) + (set! (-> gp-0 query-type) (saberfish-query-type set-mesh)) + (set! (-> gp-0 closest-nav-mesh-index) arg0) + (set! (-> gp-0 mesh) #f) + (send-event (get-spawn-parent) 'saberfish-query gp-0) + (-> gp-0 mesh) + ) + ) + +;; definition for method 237 of type saberfish +(defmethod saberfish-method-237 ((this saberfish) (arg0 int)) + (let ((gp-0 (new 'stack-no-clear 'saberfish-spawner-query-msg))) + (set! (-> gp-0 query-type) (saberfish-query-type set-in-water)) + (set! (-> gp-0 closest-nav-mesh-index) arg0) + (send-event (get-spawn-parent) 'saberfish-query gp-0) + (-> gp-0 in-water?) + ) + ) + +;; definition for method 151 of type saberfish +(defmethod should-move-to-ground? ((this saberfish)) + (-> this move-to-ground?) + ) + +;; definition for method 189 of type saberfish +;; INFO: Used lq/sq +;; WARN: Return type mismatch vector vs none. +(defmethod copy-nav-state-vel! ((this saberfish) (arg0 vector)) + (cond + ((saberfish-method-243 this) + (set! (-> arg0 quad) (-> this nav-velocity quad)) + ) + (else + (let ((a0-2 (-> this nav state))) + (set! (-> arg0 quad) (-> a0-2 velocity quad)) + ) + ) + ) + (none) + ) + +;; definition for method 79 of type saberfish +(defmethod go-flee ((this saberfish)) + (go (method-of-object this flee)) + ) + +;; definition for method 240 of type saberfish +;; WARN: Return type mismatch int vs none. +(defmethod saberfish-method-240 ((this saberfish) (arg0 time-frame)) + (let ((s5-0 (handle->process (-> this ragdoll-proc)))) + (when s5-0 + (disable-for-duration (the-as ragdoll-proc s5-0) arg0) + (logclear! (-> (the-as ragdoll-proc s5-0) ragdoll ragdoll-flags) (ragdoll-flag rf9)) + (enemy-method-90 this (the-as ragdoll-proc s5-0)) + ) + ) + 0 + (none) + ) + +;; definition for method 241 of type saberfish +(defmethod saberfish-method-241 ((this saberfish)) + (let ((a1-4 (-> (the-as ragdoll-proc (handle->process (-> this ragdoll-proc))) ragdoll)) + (v1-3 0) + ) + (dotimes (a2-1 (the-as int (-> a1-4 num-joints))) + (if (logtest? (-> a1-4 ragdoll-joints a2-1 ragdoll-joint-flags) (ragdoll-joint-flag rjf2)) + (+! v1-3 1) + ) + ) + (set! (-> this knocked-under-water?) (>= v1-3 (the-as int (shr (-> a1-4 num-joints) 1)))) + (>= v1-3 (the int (* 0.6666667 (the float (-> a1-4 num-joints))))) + ) + ) + +;; definition for method 125 of type saberfish +(defmethod ragdoll-settled? ((this saberfish)) + (let* ((s5-0 (handle->process (-> this ragdoll-proc))) + (v0-0 + (or (not s5-0) + (or (ragdoll-proc-method-19 (the-as ragdoll-proc s5-0)) + (and (not (saberfish-method-243 this)) + (time-elapsed? (-> this state-time) (seconds 0.1)) + (< (vector-length (-> (the-as ragdoll-proc s5-0) ragdoll ragdoll-joints 0 velocity)) + (* 49152.0 (seconds-per-frame)) + ) + (< (cos (* 16384.0 (seconds-per-frame))) (-> (the-as ragdoll-proc 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) + ) + ) + ) + ) + ) + ) + (if (not v0-0) + (set! v0-0 (saberfish-method-241 this)) + ) + v0-0 + ) + ) + +;; definition for method 89 of type saberfish +(defmethod within-gspot-range? ((this saberfish)) + (if (-> this knocked-under-water?) + #f + (call-parent-method this) + ) + ) + +;; definition for function find-ground-for-obj +(defun find-ground-for-obj ((arg0 process-focusable)) + (let ((gp-0 (new 'stack-no-clear 'water-info))) + (water-info-init! (-> arg0 root) gp-0 (collide-action solid semi-solid)) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (let ((v1-5 (above-ground? (-> arg0 root) s5-0 (-> arg0 root trans) (collide-spec backgnd) 8192.0 81920.0 1024.0))) + (cond + ((and (logtest? (water-flag touch-water) (-> gp-0 flags)) + v1-5 + (>= (+ 819.2 (-> s5-0 best-other-tri intersect y)) (-> arg0 root trans y)) + ) + (if (< (-> gp-0 base-height) (-> s5-0 best-other-tri intersect y)) + 4 + 3 + ) + ) + ((logtest? (water-flag touch-water) (-> gp-0 flags)) + 3 + ) + ((and v1-5 (>= (+ 819.2 (-> s5-0 best-other-tri intersect y)) (-> arg0 root trans y))) + 4 + ) + ((and v1-5 (logtest? (water-flag over-water) (-> gp-0 flags))) + (if (< (-> gp-0 base-height) (-> s5-0 best-other-tri intersect y)) + 2 + 1 + ) + ) + (v1-5 + 2 + ) + ((logtest? (water-flag over-water) (-> gp-0 flags)) + 1 + ) + (else + 0 + ) + ) + ) + ) + ) + ) + +;; definition for method 242 of type saberfish +(defmethod get-ground-state ((this saberfish)) + (if (-> this ground-only?) + (return 4) + ) + (when (and (and (-> this next-state) (let ((v1-6 (-> this next-state name))) + (or (= v1-6 'knocked) (= v1-6 'knocked-recover)) + ) + ) + (handle->process (-> this ragdoll-proc)) + ) + (let ((v1-11 0) + (a1-6 0) + ) + (let ((a2-5 (-> (the-as ragdoll-proc (handle->process (-> this ragdoll-proc))) ragdoll))) + 0 + (dotimes (a3-5 (the-as int (-> a2-5 num-joints))) + (if (logtest? (-> a2-5 ragdoll-joints a3-5 ragdoll-joint-flags) (ragdoll-joint-flag rjf2)) + (+! a1-6 1) + ) + (if (logtest? (-> a2-5 ragdoll-joints a3-5 ragdoll-joint-flags) (ragdoll-joint-flag rjf0)) + (+! v1-11 1) + ) + ) + ) + (when (or (> v1-11 0) (> a1-6 0)) + (if (< a1-6 v1-11) + (return 4) + (return 3) + ) + (the-as none 0) + ) + ) + ) + (find-ground-for-obj this) + ) + +;; definition for method 243 of type saberfish +(defmethod saberfish-method-243 ((this saberfish)) + (= (-> this ground-state) 3) + ) + +;; definition for method 244 of type saberfish +;; WARN: Return type mismatch nav-flags vs none. +(defmethod set-should-move-to-ground ((this saberfish)) + (set! (-> this ground-state) (the-as uint (get-ground-state this))) + (when #t + (case (-> this ground-state) + ((4 1 2) + (set! (-> this move-to-ground?) #t) + ) + (else + (set! (-> this move-to-ground?) #f) + ) + ) + ) + (cond + ((= (-> this ground-state) 3) + (logclear! (-> this root nav-flags) (nav-flags has-root-sphere)) + ) + (else + (set! (-> this root nav-radius) 8192.0) + (logior! (-> this root nav-flags) (nav-flags has-root-sphere)) + ) + ) + (none) + ) + +;; definition for method 181 of type saberfish +(defmethod nav-enemy-method-181 ((this saberfish)) + (call-parent-method this) + (none) + ) + +;; definition for method 7 of type saberfish +(defmethod relocate ((this saberfish) (offset int)) + (call-parent-method this offset) + ) + +;; definition for method 75 of type saberfish +(defmethod go-stare ((this saberfish)) + (if (and (-> this next-state) (= (-> this next-state name) 'flee)) + (go (method-of-object this swimming-hostile)) + (call-parent-method this) + ) + ) + +;; definition for method 82 of type saberfish +(defmethod event-handler ((this saberfish) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('saberfish-query) + (let ((s5-1 (the-as saberfish-spawner-query-msg (-> arg3 param 0)))) + (case (-> s5-1 query-type) + (((saberfish-query-type set-nav-idx)) + (set! (-> s5-1 closest-nav-mesh-index) 0) + 0 + ) + (((saberfish-query-type set-mesh)) + (set! (-> s5-1 mesh) (find-nearest-nav-mesh (-> this entity extra trans) (the-as float #x7f800000))) + (nop!) + 0 + ) + (((saberfish-query-type set-in-water)) + (set! (-> s5-1 in-water?) #f) + #f + ) + (((saberfish-query-type can-go-to-ground?)) + (break!) + 0 + ) + ) + ) + ) + (else + (call-parent-method this arg0 arg1 arg2 arg3) + ) + ) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/sewer/sew-laser-guard_REF.gc b/test/decompiler/reference/jak3/levels/sewer/sew-laser-guard_REF.gc new file mode 100644 index 0000000000..4c6d723674 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/sew-laser-guard_REF.gc @@ -0,0 +1,819 @@ +;;-*-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-guard +(deftype sew-laser-guard (enemy) + ((params gun-turret-params) + (aim-pos vector :inline) + (smoke-part sparticle-launch-control) + (casing-part sparticle-launch-control) + (sync-orient sync-linear :inline) + (start-orient quaternion :inline) + (end-orient quaternion :inline) + (last-play-sweep-dir-positive? symbol) + (last-play-sweep-sync float) + (sound-hum sound-id) + (sound-scorch sound-id) + ) + (:methods + (sew-laser-guard-method-155 (_type_) none) + (sew-laser-guard-method-156 (_type_) none) + ) + ) + +;; definition for method 3 of type sew-laser-guard +(defmethod inspect ((this sew-laser-guard)) + (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 "~2Tsync-orient: #~%" (-> this sync-orient)) + (format #t "~2Tstart-orient: #~%" (-> this start-orient)) + (format #t "~2Tend-orient: #~%" (-> this end-orient)) + (format #t "~2Tlast-play-sweep-dir-positive?: ~A~%" (-> this last-play-sweep-dir-positive?)) + (format #t "~2Tlast-play-sweep-sync: ~f~%" (-> this last-play-sweep-sync)) + (format #t "~2Tsound-hum: ~D~%" (-> this sound-hum)) + (format #t "~2Tsound-scorch: ~D~%" (-> this sound-scorch)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defpart 4935 + :init-specs ((:texture (pal-lightning level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 1)) + (:scale-y (meters 1)) + (:r 128.0 64.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 128.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14 left-multiply-quat)) + ) + ) + +;; failed to figure out what this is: +(defpart 4936 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 0.2)) + (:rot-x (degrees 2.25)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 64.0 64.0) + (:omega (degrees 4511.25)) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + ) + ) + +;; failed to figure out what this is: +(defpart 4937 + :init-specs ((:texture (rainbow-halo level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.4) (meters 0.1)) + (:rot-x (degrees 6.7500005)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 0.0 30.0) + (:b 128.0) + (:a 128.0 128.0) + (:omega (degrees 4511.25)) + (:rotvel-z (degrees 0.3)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 409.6) + ) + ) + +;; failed to figure out what this is: +(defpart 4938 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 2.0 6.0) + (:z (meters 0.1)) + (:scale-x (meters 0.05) (meters 0.1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 32.0 1 128.0) + (:g :copy r) + (:b 255.0) + (:a 255.0) + (:omega (degrees 0.03375)) + (:vel-y (meters 0.02) (meters 0.02)) + (:fade-a -2.56 -2.56) + (:friction 0.9) + (:timer (seconds 0.167)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z left-multiply-quat)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4939 + :init-specs ((:texture (starflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-x (degrees 2.25)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0 64.0) + (:b 128.0 64.0) + (:a 64.0 64.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 40.96) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sew-laser-guard-hit + :id 1505 + :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)) + ) + ) + +;; definition of type sew-laser-shot +(deftype sew-laser-shot (projectile) + () + ) + +;; definition for method 3 of type sew-laser-shot +(defmethod inspect ((this sew-laser-shot)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type projectile inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate dissipate (sew-laser-shot) + :virtual #t + :enter (behavior () + (go-virtual impact) + ) + ) + +;; definition for method 38 of type sew-laser-shot +(defmethod made-impact? ((this sew-laser-shot)) + (let ((gp-0 (-> this root)) + (s5-0 (new 'stack-no-clear 'collide-query)) + ) + (let ((v1-0 s5-0)) + (set! (-> v1-0 radius) (-> gp-0 root-prim prim-core world-sphere w)) + (set! (-> v1-0 collide-with) (-> gp-0 root-prim prim-core collide-with)) + (set! (-> v1-0 ignore-process0) this) + (set! (-> v1-0 ignore-process1) (ppointer->process (-> this parent))) + (set! (-> v1-0 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-0 action-mask) (collide-action solid)) + ) + (let ((a0-2 (handle->process (-> this notify-handle)))) + (when a0-2 + (let* ((s4-1 (vector-! (new 'stack-no-clear 'vector) (-> gp-0 trans) (get-trans (the-as process-focusable a0-2) 3))) + (f0-2 (- (vector-length s4-1))) + ) + (fill-and-try-snap-to-surface gp-0 s4-1 f0-2 0.0 -3072.0 s5-0) + ) + ) + ) + ) + ) + +;; definition for function sew-laser-shot-move +;; WARN: Return type mismatch int vs none. +(defun sew-laser-shot-move ((arg0 sew-laser-shot)) + (projectile-move-fill-line-sphere arg0) + (if (logtest? (-> arg0 root status) (collide-status touch-surface)) + (go (method-of-object arg0 impact)) + ) + 0 + (none) + ) + +;; definition for method 30 of type sew-laser-shot +;; WARN: Return type mismatch int vs none. +(defmethod setup-collision! ((this sew-laser-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-default) + (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 ((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 + backgnd + jak + bot + 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 1228.8) + (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 31 of type sew-laser-shot +;; WARN: Return type mismatch int vs none. +(defmethod init-proj-settings! ((this sew-laser-shot)) + (set! (-> this attack-mode) 'shock) + (set! (-> this max-speed) 131072.0) + (set! (-> this timeout) (seconds 0.125)) + (set! (-> this move) sew-laser-shot-move) + (set! (-> this root dynam gravity y) 0.0) + (set! (-> this root dynam gravity-length) 0.0) + (set! (-> this root dynam gravity-max) 0.0) + (set! (-> this vehicle-damage-factor) 0.5) + (logior! (-> this options) (projectile-options po13)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-sew-laser-guard sew-laser-guard sew-laser-guard-lod0-jg sew-laser-guard-idle-ja + ((sew-laser-guard-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 30) + ) + +;; definition for symbol *sew-laser-guard-enemy-info*, type enemy-info +(define *sew-laser-guard-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 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! (-> *sew-laser-guard-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; definition for function fire-laser! +;; INFO: Used lq/sq +(defun fire-laser! ((arg0 vector) (arg1 vector) (arg2 sew-laser-guard) (arg3 float)) + (let ((s5-0 (new 'stack-no-clear 'collide-query))) + (set! (-> s5-0 start-pos quad) (-> arg0 quad)) + (vector-float*! (-> s5-0 move-dist) arg1 arg3) + (let ((v1-3 s5-0)) + (set! (-> v1-3 radius) 40.96) + (set! (-> v1-3 collide-with) (collide-spec backgnd jak enemy obstacle hit-by-others-list player-list)) + (set! (-> v1-3 ignore-process0) arg2) + (set! (-> v1-3 ignore-process1) #f) + (set! (-> v1-3 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-3 action-mask) (collide-action solid)) + ) + (let ((f0-2 (fill-and-probe-using-line-sphere *collide-cache* s5-0))) + (if (>= f0-2 0.0) + (vector-float*! (-> s5-0 move-dist) (-> s5-0 move-dist) f0-2) + (set! (-> s5-0 best-other-tri collide-ptr) #f) + ) + ) + (cond + ((and (-> s5-0 best-other-tri collide-ptr) (let ((s3-0 (-> s5-0 best-other-tri collide-ptr))) + (if (type? s3-0 collide-shape-prim-sphere) + s3-0 + ) + ) + ) + (let ((s3-1 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> s3-1 ent) (-> arg2 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 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 arg2)) + (let* ((v1-19 *game-info*) + (a0-17 (+ (-> v1-19 attack-id) 1)) + ) + (set! (-> v1-19 attack-id) a0-17) + (set! (-> s3-1 attack-id) a0-17) + ) + (set! (-> s3-1 timeout) (seconds 4)) + (set! (-> s3-1 pos quad) (-> s5-0 start-pos quad)) + (vector-normalize-copy! (-> s3-1 vel) (-> s5-0 move-dist) 4096000.0) + (spawn-projectile sew-laser-shot s3-1 arg2 *default-dead-pool*) + ) + (sound-play + "laser-hit-jak" + :position (vector+! (new 'stack-no-clear 'vector) (-> s5-0 start-pos) (-> s5-0 move-dist)) + ) + (vector-normalize! (-> s5-0 move-dist) (+ 2048.0 (vector-length (-> s5-0 move-dist)))) + ) + (else + (when arg2 + (let ((v1-30 arg2)) + (sound-play + "laser-sizzle" + :id (-> v1-30 sound-scorch) + :position (vector+! (new 'stack-no-clear 'vector) (-> s5-0 start-pos) (-> s5-0 move-dist)) + ) + ) + ) + ) + ) + (set! (-> *part-id-table* 4935 init-specs 4 initial-valuef) (vector-length (-> s5-0 move-dist))) + (draw-beam (-> *part-id-table* 4935) arg0 (-> s5-0 move-dist) #f) + (launch-particles (-> *part-id-table* 4936) arg0) + (launch-particles (-> *part-id-table* 4937) arg0) + (launch-particles (-> *part-id-table* 4938) (vector+! (new 'stack-no-clear 'vector) (-> s5-0 move-dist) arg0)) + (launch-particles (-> *part-id-table* 4939) (vector+! (new 'stack-no-clear 'vector) (-> s5-0 move-dist) arg0)) + ) + (none) + ) + +;; definition for method 155 of type sew-laser-guard +(defmethod sew-laser-guard-method-155 ((this sew-laser-guard)) + (let ((s5-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data 5)))) + (new 'stack-no-clear 'vector) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector-z-quaternion! s4-0 (-> this root quat)) + (vector-normalize! s4-0 1.0) + (fire-laser! s5-0 s4-0 this 491520.0) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate hostile (sew-laser-guard) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (if (= proc *target*) + (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)) + ) + ) + ) + ) + ) + ) + ) + :exit (behavior () + (let ((t9-0 (-> (method-of-type enemy hostile) exit))) + (if t9-0 + (t9-0) + ) + ) + (ja :group! sew-laser-guard-idle-ja) + ) + :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 + (let ((f30-0 (get-norm! (-> self sync-orient) 0))) + (cond + ((-> self last-play-sweep-dir-positive?) + (when (and (< (- f30-0 (-> self last-play-sweep-sync)) 0.0) (< 0.8 f30-0)) + (sound-play "laser-sweep") + (set! (-> self last-play-sweep-dir-positive?) #f) + ) + ) + (else + (when (and (< 0.0 (- f30-0 (-> self last-play-sweep-sync))) (< f30-0 0.2)) + (sound-play "laser-sweep") + (set! (-> self last-play-sweep-dir-positive?) #t) + ) + ) + ) + (quaternion-slerp! (-> self root quat) (-> self start-orient) (-> self end-orient) f30-0) + (quaternion-normalize! (-> self root quat)) + (set! (-> self last-play-sweep-sync) f30-0) + ) + (sound-play "laser-guard" :id (-> self sound-hum)) + (let ((t9-8 (method-of-object self sew-laser-guard-method-155)) + (a0-9 self) + ) + #t + (t9-8 a0-9) + ) + (suspend) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate stare (sew-laser-guard) + :virtual #t + :trans (behavior () + (go-hostile self) + ) + :code sleep-code + ) + +;; definition for method 20 of type sew-laser-guard +;; WARN: Return type mismatch int vs search-info-flag. +(defmethod process-mask->search-info-flag ((this sew-laser-guard)) + (the-as search-info-flag 1) + ) + +;; definition for method 82 of type sew-laser-guard +(defmethod event-handler ((this sew-laser-guard) (arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('start) + #f + ) + (('attack) + #f + ) + (('touched 'touch) + #f + ) + (('stop) + #f + ) + (('bonk) + (when (= (-> arg0 type) target) + (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 + ) + (else + ((method-of-type enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; failed to figure out what this is: +(defstate die (sew-laser-guard) + :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) + ) + :code (behavior () + (activate! *camera-smush-control* 819.2 37 210 1.0 0.995 (-> self clock)) + (sound-play "turret-explode") + (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-guard +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this sew-laser-guard)) + (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-sphere s5-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 no-standon)) + (set! (-> v1-6 transform-index) 3) + (set-vector! (-> v1-6 local-sphere) 0.0 3686.4 0.0 7372.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 for method 10 of type sew-laser-guard +(defmethod deactivate ((this sew-laser-guard)) + "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)) + ) + ((method-of-type enemy deactivate) this) + (none) + ) + +;; definition for method 67 of type sew-laser-guard +(defmethod coin-flip? ((this sew-laser-guard)) + #f + ) + +;; definition for method 7 of type sew-laser-guard +;; WARN: Return type mismatch enemy vs sew-laser-guard. +(defmethod relocate ((this sew-laser-guard) (offset int)) + (the-as sew-laser-guard ((method-of-type enemy relocate) this offset)) + ) + +;; definition for method 156 of type sew-laser-guard +;; WARN: Return type mismatch int vs none. +(defmethod sew-laser-guard-method-156 ((this sew-laser-guard)) + 0 + (none) + ) + +;; definition for method 121 of type sew-laser-guard +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this sew-laser-guard)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-sew-laser-guard" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *sew-laser-guard-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* 1505) this)) + (let ((f30-0 (res-lump-float (-> this entity) 'rotoffset)) + (f28-0 (res-lump-float (-> this entity) 'rotmax :default 8192.0)) + (f26-0 (res-lump-float (-> this entity) 'rotmin :default -8192.0)) + (s5-1 (new 'stack-no-clear 'sync-info-params)) + ) + (if (!= f30-0 0.0) + (quaternion-rotate-y! (-> this root quat) (-> this root quat) f30-0) + ) + (quaternion-rotate-y! (-> this start-orient) (-> this root quat) f26-0) + (quaternion-rotate-y! (-> this end-orient) (-> this start-orient) (- f28-0 f26-0)) + (let ((v1-20 0)) + (if #t + (set! v1-20 (logior v1-20 1)) + ) + (set! (-> s5-1 sync-type) 'sync-linear) + (set! (-> s5-1 sync-flags) (the-as sync-flags v1-20)) + ) + (set! (-> s5-1 entity) (-> this entity)) + (set! (-> s5-1 period) (the-as uint 1200)) + (set! (-> s5-1 percent) 0.0) + (initialize! (-> this sync-orient) s5-1) + ) + (set! (-> this last-play-sweep-dir-positive?) #t) + (set! (-> this last-play-sweep-sync) (get-norm! (-> this sync-orient) 0)) + (set! (-> this sound-hum) (new-sound-id)) + (set! (-> this sound-scorch) (new-sound-id)) + (logclear! (-> this mask) (process-mask enemy)) + 0 + (none) + ) + +;; definition for method 122 of type sew-laser-guard +(defmethod go-idle2 ((this sew-laser-guard)) + (go (method-of-object this hostile)) + ) + +;; definition for method 52 of type sew-laser-guard +(defmethod damage-enemy! ((this sew-laser-guard) (arg0 object) (arg1 event-message-block)) + (send-event + (the-as process-tree 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)) + ) + ) + ) + 0.0 + ) + +;; failed to figure out what this is: +(defstate hit (sew-laser-guard) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (go-hostile self) + ) + :code sleep-code + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/sewer/sew-platforms_REF.gc b/test/decompiler/reference/jak3/levels/sewer/sew-platforms_REF.gc new file mode 100644 index 0000000000..4f1075ba0a --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/sew-platforms_REF.gc @@ -0,0 +1,1022 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type sew-plat-updown +(deftype sew-plat-updown (base-plat) + ((sync sync-eased :inline) + (path-pos float) + ) + (:state-methods + idle + active + ) + (:methods + (get-skel (_type_) art-group) + ) + ) + +;; definition for method 3 of type sew-plat-updown +(defmethod inspect ((this sew-plat-updown)) + (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 "~2Tpath-pos: ~f~%" (-> this path-pos)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate idle (sew-plat-updown) + :virtual #t + :event (the-as (function process int symbol event-message-block object) eco-door-event-handler) + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate active (sew-plat-updown) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (plat-event proc argc message block) + ) + :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) + (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 for method 34 of type sew-plat-updown +;; WARN: Return type mismatch int vs none. +(defmethod base-plat-method-34 ((this sew-plat-updown)) + 0 + (none) + ) + +;; definition for method 11 of type sew-plat-updown +(defmethod init-from-entity! ((this sew-plat-updown) (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)) + (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) + (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)) + (set! (-> this fact) + (new 'process 'fact-info this (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc)) + ) + (let ((a1-6 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-24 0)) + (if (not (logtest? (-> this fact options) (actor-option loop))) + (set! v1-24 (logior v1-24 1)) + ) + (set! (-> a1-6 sync-type) 'sync-eased) + (set! (-> a1-6 sync-flags) (the-as sync-flags v1-24)) + ) + (set! (-> a1-6 period) (the-as uint 1800)) + (set! (-> a1-6 entity) arg0) + (set! (-> a1-6 percent) 0.0) + (set! (-> a1-6 ease-in) 0.15) + (set! (-> a1-6 ease-out) 0.15) + (set! (-> a1-6 pause-in) 0.2) + (set! (-> a1-6 pause-out) 0.0) + (initialize! (-> this sync) a1-6) + ) + (base-plat-method-34 this) + (cond + ((logtest? (-> this path flags) (path-control-flag not-found)) + (go (method-of-object this idle)) + ) + ((> (-> this sync period) 0) + (go (method-of-object this active)) + ) + (else + (go (method-of-object this idle)) + ) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-sew-slide-step sew-slide-step sew-slide-step-lod0-jg sew-slide-step-idle-ja + ((sew-slide-step-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 9) + ) + +;; definition of type sew-slide-step +(deftype sew-slide-step (sew-plat-updown) + ((last-played-start? symbol) + ) + ) + +;; definition for method 3 of type sew-slide-step +(defmethod inspect ((this sew-slide-step)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type sew-plat-updown inspect))) + (t9-0 this) + ) + (format #t "~2Tlast-played-start?: ~A~%" (-> this last-played-start?)) + (label cfg-4) + this + ) + +;; definition for method 37 of type sew-slide-step +(defmethod get-skel ((this sew-slide-step)) + (art-group-get-by-name *level* "skel-sew-slide-step" (the-as (pointer level) #f)) + ) + +;; failed to figure out what this is: +(defstate active (sew-slide-step) + :virtual #t + :enter (behavior () + (set! (-> self last-played-start?) #f) + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + ) + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + (cond + ((and (-> self last-played-start?) (< 0.9 (-> self path-pos))) + (sound-play "moving-step-out") + (set! (-> self last-played-start?) #f) + ) + ((and (not (-> self last-played-start?)) (< (-> self path-pos) 0.1)) + (set! (-> self last-played-start?) #t) + (sound-play "moving-step-in") + ) + ) + ) + ) + +;; definition for method 32 of type sew-slide-step +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this sew-slide-step)) + (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 player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> s4-0 transform-index) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 32768.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-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) + ) + +;; failed to figure out what this is: +(defskelgroup skel-sew-moving-step-a sew-moving-step-a sew-moving-step-a-lod0-jg sew-moving-step-a-idle-ja + ((sew-moving-step-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6 0 4) + ) + +;; definition of type sew-moving-step-a +(deftype sew-moving-step-a (sew-plat-updown) + ((last-played-start? symbol) + (last-val float) + ) + ) + +;; definition for method 3 of type sew-moving-step-a +(defmethod inspect ((this sew-moving-step-a)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type sew-plat-updown inspect))) + (t9-0 this) + ) + (format #t "~2Tlast-played-start?: ~A~%" (-> this last-played-start?)) + (format #t "~2Tlast-val: ~f~%" (-> this last-val)) + (label cfg-4) + this + ) + +;; definition for method 34 of type sew-moving-step-a +;; WARN: Return type mismatch sparticle-launch-control vs none. +(defmethod base-plat-method-34 ((this sew-moving-step-a)) + (call-parent-method this) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 1496) this)) + (none) + ) + +;; definition for method 28 of type sew-moving-step-a +;; WARN: Return type mismatch int vs none. +(defmethod update-part-and-sfx! ((this sew-moving-step-a)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate active (sew-moving-step-a) + :virtual #t + :enter (behavior () + (set! (-> self last-played-start?) #f) + (let ((t9-1 (-> (find-parent-state) enter))) + (if t9-1 + (t9-1) + ) + ) + (set! (-> self last-val) -1.0) + ) + :trans (behavior () + (let ((t9-1 (-> (find-parent-state) trans))) + (if t9-1 + (t9-1) + ) + ) + (when (< (-> self path-pos) 0.5) + (new 'stack-no-clear 'vector) + (let ((gp-0 (new 'stack-no-clear 'matrix))) + (let ((s5-0 (new 'stack-no-clear 'quaternion))) + (quaternion-copy! s5-0 (-> self entity quat)) + (quaternion->matrix gp-0 s5-0) + ) + (set! (-> gp-0 trans quad) (-> self entity extra trans quad)) + (+! (-> gp-0 trans y) 20480.0) + (spawn-from-mat (-> self part) gp-0) + ) + ) + (if (and (< 0.65 (-> self last-val)) (>= 0.65 (-> self path-pos))) + (sound-play "mv-stp-a-splash") + ) + (if (and (< (-> self last-val) 0.95) (>= (-> self path-pos) 0.95)) + (sound-play "move-step-a-hit") + ) + (set! (-> self last-val) (-> self path-pos)) + ) + ) + +;; definition for method 37 of type sew-moving-step-a +(defmethod get-skel ((this sew-moving-step-a)) + (art-group-get-by-name *level* "skel-sew-moving-step-a" (the-as (pointer level) #f)) + ) + +;; definition for method 32 of type sew-moving-step-a +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this sew-moving-step-a)) + (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 player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid rideable pull-rider-can-collide)) + (set! (-> s4-0 transform-index) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 24576.0 0.0 16384.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-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 of type sew-moving-step-b +(deftype sew-moving-step-b (process-drawable) + ((sync sync-linear :inline) + (num-steps int8) + (step-delay time-frame) + (start-step-pos vector :inline) + (end-step-pos vector :inline) + (last-sync-val float) + (sound-idle sound-id) + ) + (:state-methods + idle + active + ) + (:methods + (sew-moving-step-b-method-22 (_type_ float) int) + (sew-moving-step-b-method-23 (_type_) float) + (sew-moving-step-b-method-24 (_type_) int) + (alloc-trsqv! (_type_) none) + (sew-moving-step-b-method-26 (_type_ int float) float) + ) + ) + +;; definition for method 3 of type sew-moving-step-b +(defmethod inspect ((this sew-moving-step-b)) + (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 "~2Tnum-steps: ~D~%" (-> this num-steps)) + (format #t "~2Tstep-delay: ~D~%" (-> this step-delay)) + (format #t "~2Tstart-step-pos: #~%" (-> this start-step-pos)) + (format #t "~2Tend-step-pos: #~%" (-> this end-step-pos)) + (format #t "~2Tlast-sync-val: ~f~%" (-> this last-sync-val)) + (format #t "~2Tsound-idle: ~D~%" (-> this sound-idle)) + (label cfg-4) + this + ) + +;; definition for method 25 of type sew-moving-step-b +;; WARN: Return type mismatch int vs none. +(defmethod alloc-trsqv! ((this sew-moving-step-b)) + (set! (-> this root) (new 'process 'trsqv)) + 0 + (none) + ) + +;; definition for method 11 of type sew-moving-step-b +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this sew-moving-step-b) (arg0 entity-actor)) + (alloc-trsqv! this) + (process-drawable-from-entity! this arg0) + (set! (-> this sound-idle) (new-sound-id)) + (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)) + (let ((a1-3 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-6 0)) + (if #f + (set! v1-6 (logior v1-6 1)) + ) + (set! (-> a1-3 sync-type) 'sync-linear) + (set! (-> a1-3 sync-flags) (the-as sync-flags v1-6)) + ) + (set! (-> a1-3 entity) arg0) + (set! (-> a1-3 period) (the-as uint 4800)) + (set! (-> a1-3 percent) 0.0) + (initialize! (-> this sync) a1-3) + ) + (set! (-> this num-steps) + (res-lump-value (-> this entity) 'sesc-num-steps int :default (the-as uint128 4) :time -1000000000.0) + ) + (set! (-> this step-delay) + (the-as time-frame (the int (* 300.0 (res-lump-float (-> this entity) 'sesc-step-delay :default 4.0)))) + ) + (set! (-> this num-steps) (min (-> this num-steps) (sew-moving-step-b-method-24 this))) + (set! (-> this last-sync-val) (- 1.0 (* 0.5 (sew-moving-step-b-method-23 this)))) + (cond + ((logtest? (-> this path flags) (path-control-flag not-found)) + (go (method-of-object this idle)) + ) + ((> (-> this sync period) 0) + (let ((s4-0 (get-point-at-percent-along-path! (-> this path) (new 'stack-no-clear 'vector) 0.0 'interp)) + (s5-3 (get-point-at-percent-along-path! (-> this path) (new 'stack-no-clear 'vector) 1.0 'interp)) + ) + (let ((s3-1 (vector-! (new 'stack-no-clear 'vector) s5-3 s4-0))) + (set! (-> s3-1 y) 0.0) + (vector-normalize! s3-1 16384.0) + (vector-! s4-0 s4-0 s3-1) + (vector-! s5-3 s5-3 s3-1) + ) + (set! (-> this start-step-pos quad) (-> s4-0 quad)) + (set! (-> this end-step-pos quad) (-> s5-3 quad)) + ) + (go (method-of-object this active)) + ) + (else + (go (method-of-object this idle)) + ) + ) + ) + +;; failed to figure out what this is: +(defstate idle (sew-moving-step-b) + :virtual #t + :code sleep-code + :post ja-post + ) + +;; definition for method 24 of type sew-moving-step-b +(defmethod sew-moving-step-b-method-24 ((this sew-moving-step-b)) + (the int (/ (the float (-> this sync period)) (the float (-> this step-delay)))) + ) + +;; definition for method 23 of type sew-moving-step-b +(defmethod sew-moving-step-b-method-23 ((this sew-moving-step-b)) + (/ (the float (-> this step-delay)) (the float (-> this sync period))) + ) + +;; definition for method 22 of type sew-moving-step-b +(defmethod sew-moving-step-b-method-22 ((this sew-moving-step-b) (arg0 float)) + (the int (/ arg0 (sew-moving-step-b-method-23 this))) + ) + +;; definition for method 26 of type sew-moving-step-b +(defmethod sew-moving-step-b-method-26 ((this sew-moving-step-b) (arg0 int) (arg1 float)) + (let ((f30-1 (- arg1 (* (the float arg0) (sew-moving-step-b-method-23 this))))) + (if (< f30-1 0.0) + (+! f30-1 (* (the float (-> this num-steps)) (sew-moving-step-b-method-23 this))) + ) + f30-1 + ) + ) + +;; definition of type sew-moving-step-b-step +(deftype sew-moving-step-b-step (base-plat) + ((start-pos vector :inline) + (end-pos vector :inline) + (start-path-pos vector :inline) + (end-path-pos vector :inline) + (sync sync-linear :inline) + (path-pos float) + (last-t-val float) + ) + (:state-methods + active + die + ) + ) + +;; definition for method 3 of type sew-moving-step-b-step +(defmethod inspect ((this sew-moving-step-b-step)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type base-plat inspect))) + (t9-0 this) + ) + (format #t "~2Tstart-pos: #~%" (-> this start-pos)) + (format #t "~2Tend-pos: #~%" (-> this end-pos)) + (format #t "~2Tstart-path-pos: #~%" (-> this start-path-pos)) + (format #t "~2Tend-path-pos: #~%" (-> this end-path-pos)) + (format #t "~2Tsync: #~%" (-> this sync)) + (format #t "~2Tpath-pos: ~f~%" (-> this path-pos)) + (format #t "~2Tlast-t-val: ~f~%" (-> this last-t-val)) + (label cfg-4) + this + ) + +;; definition of type sew-moving-step-b-step-param +(deftype sew-moving-step-b-step-param (structure) + ((start-pos vector :inline) + (end-pos vector :inline) + (ent entity-actor) + (period time-frame) + (offset float) + ) + ) + +;; definition for method 3 of type sew-moving-step-b-step-param +(defmethod inspect ((this sew-moving-step-b-step-param)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'sew-moving-step-b-step-param) + (format #t "~1Tstart-pos: #~%" (-> this start-pos)) + (format #t "~1Tend-pos: #~%" (-> this end-pos)) + (format #t "~1Tent: ~A~%" (-> this ent)) + (format #t "~1Tperiod: ~D~%" (-> this period)) + (format #t "~1Toffset: ~f~%" (-> this offset)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-sew-moving-step-b sew-moving-step-b sew-moving-step-b-lod0-jg sew-moving-step-b-idle-ja + ((sew-moving-step-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6) + ) + +;; definition for function sew-moving-step-b-step-init-by-other +;; INFO: Used lq/sq +(defbehavior sew-moving-step-b-step-init-by-other sew-moving-step-b-step ((arg0 sew-moving-step-b-step-param)) + (process-entity-set! self (-> arg0 ent)) + (init-collision! self) + (set! (-> self root trans quad) (-> arg0 start-pos quad)) + (set! (-> self start-pos quad) (-> arg0 start-pos quad)) + (set! (-> self end-pos quad) (-> arg0 end-pos quad)) + (initialize-skeleton + self + (the-as skeleton-group (art-group-get-by-name *level* "skel-sew-moving-step-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (quaternion-rotate-y! (-> self root quat) (-> self root quat) 16384.0) + (set! (-> self path) (new 'process 'path-control self 'path 0.0 (-> arg0 ent) #f)) + (get-point-at-percent-along-path! (-> self path) (-> self start-path-pos) 0.0 'interp) + (get-point-at-percent-along-path! (-> self path) (-> self end-path-pos) 1.0 'interp) + (let ((a1-7 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-16 0)) + (if #f + (set! v1-16 (logior v1-16 1)) + ) + (set! (-> a1-7 sync-type) 'sync-linear) + (set! (-> a1-7 sync-flags) (the-as sync-flags v1-16)) + ) + (set! (-> a1-7 entity) #f) + (set! (-> a1-7 period) (the-as uint (-> arg0 period))) + (set! (-> a1-7 percent) 0.0) + (initialize! (-> self sync) a1-7) + ) + (sync-now! (-> self sync) (-> arg0 offset)) + (set! (-> self last-t-val) -1.0) + (set! (-> self part) (create-launch-control (-> *part-group-id-table* 1497) self)) + (go-virtual active) + ) + +;; definition for function fmod +(defun fmod ((arg0 float) (arg1 float)) + (- arg0 (* (the float (the int (/ arg0 arg1))) arg1)) + ) + +;; definition for function spawn-moving-step-b-step +;; INFO: Used lq/sq +;; WARN: Return type mismatch process vs sew-moving-step-b-step. +(defun spawn-moving-step-b-step ((arg0 sew-moving-step-b) (arg1 float)) + (let ((gp-0 (new 'stack-no-clear 'sew-moving-step-b-step-param))) + (set! (-> gp-0 start-pos quad) (-> arg0 start-step-pos quad)) + (set! (-> gp-0 end-pos quad) (-> arg0 end-step-pos quad)) + (set! (-> gp-0 ent) (-> arg0 entity)) + (set! (-> gp-0 period) (the-as time-frame (-> arg0 sync period))) + (set! (-> gp-0 offset) arg1) + (let ((s5-0 (the-as process #f))) + (let ((v1-5 (process-spawn sew-moving-step-b-step gp-0 :name "sew-moving-step-b-step"))) + (if v1-5 + (set! s5-0 (-> v1-5 0)) + ) + ) + (the-as sew-moving-step-b-step s5-0) + ) + ) + ) + +;; definition for method 10 of type sew-moving-step-b +(defmethod deactivate ((this sew-moving-step-b)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (if (nonzero? (-> this sound-idle)) + (sound-stop (-> this sound-idle)) + ) + (call-parent-method this) + (none) + ) + +;; failed to figure out what this is: +(defstate active (sew-moving-step-b) + :virtual #t + :enter (behavior () + '() + ) + :trans (behavior () + (sound-play "move-step-b-lp" :id (-> self sound-idle)) + (let ((f30-0 (get-norm! (-> self sync) 0))) + (let* ((s5-0 (sew-moving-step-b-method-22 self (-> self last-sync-val))) + (gp-0 (- (sew-moving-step-b-method-22 self f30-0) s5-0)) + (f28-1 (fmod f30-0 (* (the float (-> self num-steps)) (sew-moving-step-b-method-23 self)))) + ) + (if (< gp-0 0) + (+! gp-0 (sew-moving-step-b-method-24 self)) + ) + (dotimes (s4-1 gp-0) + (set! s5-0 (mod (+ s5-0 1) (sew-moving-step-b-method-24 self))) + (if (< s5-0 (-> self num-steps)) + (spawn-moving-step-b-step self (sew-moving-step-b-method-26 self s5-0 f28-1)) + ) + ) + ) + (set! (-> self last-sync-val) f30-0) + ) + ) + :code sleep-code + ) + +;; definition for method 32 of type sew-moving-step-b-step +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this sew-moving-step-b-step)) + (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 player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> s4-0 transform-index) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 0.0 0.0 61440.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-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 28 of type sew-moving-step-b-step +;; WARN: Return type mismatch int vs none. +(defmethod update-part-and-sfx! ((this sew-moving-step-b-step)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate die (sew-moving-step-b-step) + :virtual #t + :event (the-as (function process int symbol event-message-block object) eco-door-event-handler) + :code (behavior () + '() + ) + ) + +;; failed to figure out what this is: +(defstate active (sew-moving-step-b-step) + :virtual #t + :event plat-event + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (if (time-elapsed? (-> self state-time) (the-as time-frame (-> self sync period))) + (go-virtual die) + ) + (let ((f30-0 (get-norm! (-> self sync) 0))) + (if (< f30-0 (-> self last-t-val)) + (go-virtual die) + ) + (if (and (< (-> self last-t-val) 0.5) (>= f30-0 0.5)) + (sound-play "move-step-b-hit") + ) + (set! (-> self last-t-val) f30-0) + (cond + ((< f30-0 0.2) + (let ((f0-5 (* 5.0 f30-0))) + (vector-lerp! (-> self basetrans) (-> self start-pos) (-> self start-path-pos) f0-5) + ) + (spawn (-> self part) (-> self start-path-pos)) + ) + ((< 0.8 f30-0) + (let ((f0-8 (* 5.0 (+ -0.8 f30-0)))) + (vector-lerp! (-> self basetrans) (-> self end-path-pos) (-> self end-pos) f0-8) + ) + ) + (else + (let ((f28-0 (* 1.6666666 (+ -0.2 f30-0)))) + (set! (-> self path-pos) f28-0) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) (-> self path-pos) 'interp) + (let ((f0-12 (fmax 0.25 (fmin 1.0 (* 2.0 (- 1.0 f28-0)))))) + (set-vector! (-> self draw color-mult) f0-12 f0-12 f0-12 1.0) + ) + ) + (if (< f30-0 0.48) + (spawn (-> self part) (-> self basetrans)) + ) + ) + ) + ) + (plat-trans) + ) + :code (behavior () + (until #f + (suspend) + ) + #f + ) + :post plat-post + ) + +;; failed to figure out what this is: +(defskelgroup skel-sew-rove-plat sew-rove-plat sew-rove-plat-lod0-jg sew-rove-plat-idle-ja + ((sew-rove-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 6.5) + ) + +;; definition of type sew-rove-plat +(deftype sew-rove-plat (sew-plat-updown) + ((sound-id sound-id) + ) + ) + +;; definition for method 3 of type sew-rove-plat +(defmethod inspect ((this sew-rove-plat)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type sew-plat-updown inspect))) + (t9-0 this) + ) + (format #t "~2Tsound-id: ~D~%" (-> this sound-id)) + (label cfg-4) + this + ) + +;; definition for method 37 of type sew-rove-plat +(defmethod get-skel ((this sew-rove-plat)) + (art-group-get-by-name *level* "skel-sew-rove-plat" (the-as (pointer level) #f)) + ) + +;; definition for method 12 of type sew-rove-plat +(defmethod run-logic? ((this sew-rove-plat)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + +;; definition for method 10 of type sew-rove-plat +(defmethod deactivate ((this sew-rove-plat)) + "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 32 of type sew-rove-plat +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this sew-rove-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 pusher)) + (set! (-> s4-0 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> s4-0 prim-core action) (collide-action solid semi-solid rideable pull-rider-can-collide)) + (set! (-> s4-0 transform-index) 3) + (set-vector! (-> s4-0 local-sphere) -15.5648 -3650.3552 0.8192 29212.262) + (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 sound-id) (new-sound-id)) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate active (sew-rove-plat) + :virtual #t + :trans (behavior () + (sound-play "rove-plat-loop" :id (-> self sound-id)) + (set! (-> self path-pos) (get-norm! (-> self sync) 0)) + (get-point-at-percent-along-path! (-> self path) (-> self basetrans) (-> self path-pos) 'interp) + (plat-trans) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-sew-move-plat sew-move-plat sew-move-plat-lod0-jg sew-move-plat-idle-ja + ((sew-move-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 8) + ) + +;; definition of type sew-move-plat +(deftype sew-move-plat (base-plat) + ((sound-id sound-id) + (positions vector 2 :inline) + (current-pos-index int8) + (dest-pos-index int8) + (speed float) + ) + (:state-methods + waiting + active + ) + (:methods + (sew-move-plat-method-37 (_type_) int) + ) + ) + +;; definition for method 3 of type sew-move-plat +(defmethod inspect ((this sew-move-plat)) + (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 "~2Tpositions[2] @ #x~X~%" (-> this positions)) + (format #t "~2Tcurrent-pos-index: ~D~%" (-> this current-pos-index)) + (format #t "~2Tdest-pos-index: ~D~%" (-> this dest-pos-index)) + (format #t "~2Tspeed: ~f~%" (-> this speed)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defstate waiting (sew-move-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('bonk) + (go-virtual active) + ) + ) + (plat-event proc argc message block) + ) + :enter (behavior () + (set! (-> self basetrans quad) (-> self positions (-> self current-pos-index) quad)) + ) + :trans (behavior () + (plat-trans) + (if (> (-> self root num-riders) 0) + (go-virtual active) + ) + ) + :code sleep-code + :post (behavior () + (plat-post) + ) + ) + +;; definition for method 37 of type sew-move-plat +(defmethod sew-move-plat-method-37 ((this sew-move-plat)) + (let ((f30-0 (vector-vector-xz-distance-squared (target-pos 0) (the-as vector (-> this positions))))) + (logand (+ (-> this dest-pos-index) 1) 1) + (if (< f30-0 (vector-vector-xz-distance-squared (target-pos 0) (-> this positions 1))) + 0 + 1 + ) + ) + ) + +;; failed to figure out what this is: +(defstate active (sew-move-plat) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('foo) + (format 0 "FOo~%") + ) + ) + ) + :enter (behavior () + (set! (-> self dest-pos-index) (logand (+ (-> self current-pos-index) 1) 1)) + (set-time! (-> self state-time)) + ) + :trans (behavior () + (sound-play "move-plat-loop" :id (-> self sound-id)) + (when (time-elapsed? (-> self state-time) (seconds 2)) + (if (>= (vector-vector-xz-distance (-> self basetrans) (target-pos 0)) 40960.0) + (set! (-> self dest-pos-index) (sew-move-plat-method-37 self)) + ) + (set-time! (-> self state-time)) + ) + (let ((gp-2 + (vector-! (new 'stack-no-clear 'vector) (-> self positions (-> self dest-pos-index)) (-> self basetrans)) + ) + ) + 0.0 + (let ((f0-2 (vector-normalize-ret-len! gp-2 1.0)) + (f1-2 (* 20480.0 (seconds-per-frame))) + ) + (cond + ((< f0-2 f1-2) + (set! (-> self current-pos-index) (-> self dest-pos-index)) + (sound-stop (-> self sound-id)) + (sound-play "move-plat-hit") + (go-virtual waiting) + ) + (else + (vector+float*! (-> self basetrans) (-> self basetrans) gp-2 f1-2) + (set! (-> self root trans quad) (-> self basetrans quad)) + ) + ) + ) + ) + (plat-trans) + ) + :code sleep-code + :post plat-post + ) + +;; definition for method 32 of type sew-move-plat +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this sew-move-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 pusher)) + (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) 0) + (set-vector! (-> s4-0 local-sphere) 0.0 24576.0 0.0 32768.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-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) + ) + (set! (-> this sound-id) (new-sound-id)) + 0 + (none) + ) + +;; definition for method 11 of type sew-move-plat +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this sew-move-plat) (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-move-plat" (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) + (set! (-> this current-pos-index) 0) + (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)) + (get-point-at-percent-along-path! (-> this path) (the-as vector (-> this positions)) 0.0 'interp) + (get-point-at-percent-along-path! (-> this path) (-> this positions 1) 1.0 'interp) + (set! (-> this basetrans quad) (-> this root trans quad)) + (set! (-> this current-pos-index) (sew-move-plat-method-37 this)) + (logclear! (-> this mask) (process-mask actor-pause)) + (go (method-of-object this waiting)) + ) + +;; definition for method 10 of type sew-move-plat +(defmethod deactivate ((this sew-move-plat)) + "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) + ) + +;; definition for method 12 of type sew-move-plat +(defmethod run-logic? ((this sew-move-plat)) + "Should this process be run? Checked by execute-process-tree." + #t + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/sewer/sew-whirlpool_REF.gc b/test/decompiler/reference/jak3/levels/sewer/sew-whirlpool_REF.gc new file mode 100644 index 0000000000..333ce317bd --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/sew-whirlpool_REF.gc @@ -0,0 +1,123 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type sew-whirlpool +(deftype sew-whirlpool (process-drawable) + ((spool-sound-id sound-id) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type sew-whirlpool +(defmethod inspect ((this sew-whirlpool)) + (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: +(defstate idle (sew-whirlpool) + :virtual #t + :trans (behavior () + (when (and *target* + (or (logtest? (water-flag touch-water) (-> *target* water flags)) + (logtest? (-> *target* control status) (collide-status on-water)) + ) + (not (logtest? (-> *target* focus-status) (focus-status grabbed))) + ) + (let* ((gp-0 (target-pos 0)) + (f30-0 (vector-vector-xz-distance (-> self root trans) gp-0)) + ) + (when (< f30-0 61440.0) + (let* ((f26-0 (* 0.000016276043 (- 61440.0 f30-0))) + (f24-0 98304.0) + (f0-6 (atan (- (-> gp-0 x) (-> self root trans x)) (- (-> gp-0 z) (-> self root trans z)))) + (f28-0 (* 0.5 f26-0 f24-0 (seconds-per-frame))) + (f22-0 (+ f0-6 f28-0)) + (f26-1 (- f30-0 (fmin f30-0 (* 0.16874999 f26-0 (fabs f24-0) (seconds-per-frame))))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (set-vector! s5-0 (* (sin f22-0) f26-1) 0.0 (* (cos f22-0) f26-1) 1.0) + (vector+! s5-0 s5-0 (-> self root trans)) + (set! (-> s5-0 x) (* (- (-> s5-0 x) (-> gp-0 x)) (-> self clock frames-per-second))) + (set! (-> s5-0 y) 0.0) + (set! (-> s5-0 z) (* (- (-> s5-0 z) (-> gp-0 z)) (-> self clock frames-per-second))) + (let ((gp-1 (-> *target* control))) + (let ((s4-1 (new 'stack-no-clear 'collide-query))) + (send-event (-> gp-1 process) 'rotate-y-angle f28-0) + (set! (-> s4-1 collide-with) (-> gp-1 root-prim prim-core collide-with)) + (set! (-> s4-1 ignore-process0) self) + (set! (-> s4-1 ignore-process1) #f) + (set! (-> s4-1 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> s4-1 action-mask) (collide-action solid)) + (fill-cache-for-shape gp-1 8192.0 s4-1) + ) + (let ((s4-2 (-> gp-1 status))) + (integrate-and-collide! gp-1 s5-0) + (set! (-> gp-1 status) s4-2) + ) + ) + ) + (when (and (< f30-0 4096.0) (not (logtest? (-> *target* focus-status) (focus-status dead)))) + (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) + ) + (sound-params-set! *gui-control* (-> self spool-sound-id) #f -1 -1 -1 0.5) + (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 'drown-death) + ) + ) + ) + ) + ) + ) + ) + ) + :code sleep-code + ) + +;; definition for method 10 of type sew-whirlpool +(defmethod deactivate ((this sew-whirlpool)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + ((method-of-type process-drawable deactivate) this) + (none) + ) + +;; definition for method 11 of type sew-whirlpool +(defmethod init-from-entity! ((this sew-whirlpool) (arg0 entity-actor)) + (set! (-> this root) (new 'process 'trsqv)) + (process-drawable-from-entity! this arg0) + (set! (-> this spool-sound-id) + (add-process *gui-control* this (gui-channel gun) (gui-action queue) "whrlpool" -99.0 0) + ) + (go (method-of-object this idle)) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/sewer/sewer-frog_REF.gc b/test/decompiler/reference/jak3/levels/sewer/sewer-frog_REF.gc new file mode 100644 index 0000000000..523003521c --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/sewer-frog_REF.gc @@ -0,0 +1,1157 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-sewer-frog sewer-frog sewer-frog-lod0-jg -1 + ((sewer-frog-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :shadow sewer-frog-shadow-mg + :origin-joint-index 19 + ) + +;; definition of type sewer-frog +(deftype sewer-frog (nav-enemy) + ((scared-timer time-frame) + ) + (:state-methods + attack + turn-to-face-focus + ) + (:methods + (sewer-frog-method-192 (_type_) none) + ) + ) + +;; definition for method 3 of type sewer-frog +(defmethod inspect ((this sewer-frog)) + (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)) + (label cfg-4) + this + ) + +;; definition for symbol *fact-info-sewer-frog-defaults*, type fact-info-enemy-defaults +(define *fact-info-sewer-frog-defaults* + (new 'static 'fact-info-enemy-defaults :idle-distance (meters 80) :pickup-type 9) + ) + +;; definition for symbol *sewer-frog-nav-enemy-info*, type nav-enemy-info +(define *sewer-frog-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 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 9 + :hostile-anim 5 + :hit-anim 17 + :knocked-anim 17 + :knocked-land-anim 3 + :die-anim 17 + :die-falling-anim 17 + :victory-anim -1 + :jump-wind-up-anim -1 + :jump-in-air-anim -1 + :jump-land-anim -1 + :neck-joint 13 + :look-at-joint 14 + :bullseye-joint 4 + :sound-hit (static-sound-name "frog-hit") + :sound-die (static-sound-name "frog-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 + 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 (new 'static 'ragdoll-setup + :orient-tform (new 'static 'vector :x 0.0676 :y -0.6016 :z 0.7959 :w 30666.041) + :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 + :pre-tform (new 'static 'vector :x 0.1444 :z 0.9894 :w 28642.4) + :geo-tform (new 'static 'vector :x 0.0925 :y -0.3416 :z 0.9349 :w 31829.453) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 1984.512 + :hit-sound (static-sound-name "frog-bf") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 4 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9735 :z -0.2274 :w 40103.246) + :geo-tform (new 'static 'vector :x 0.6954 :y -0.5427 :z 0.4701 :w 20942.34) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 2285.9775 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 13 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9656 :z -0.2587 :w 9536.927) + :geo-tform (new 'static 'vector :x 0.1274 :y -0.3552 :z 0.9257 :w 31935.02) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 2165.5552 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 14 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9743 :z -0.2249 :w 4085.8784) + :geo-tform (new 'static 'vector :x 0.1327 :y -0.1756 :z 0.9751 :w 32268.125) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 1615.4624 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 15 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5322 :z 0.8462 :w 9507.29) + :geo-tform (new 'static 'vector :x 0.2871 :y 0.8561 :z 0.4289 :w 28150.988) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 806.5024 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 16 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9435 :z -0.3305 :w 10984.38) + :geo-tform (new 'static 'vector :x -0.1293 :y 0.9912 :z -0.0126 :w 27502.092) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 318.6688 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 17 + :parent-joint 13 + :pre-tform (new 'static 'vector :x -0.9599 :z 0.2795 :w 8485.092) + :geo-tform (new 'static 'vector :x 0.0847 :y 0.7561 :z 0.6485 :w 34826.777) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 1267.3024 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 5 + :parent-joint 4 + :pre-tform (new 'static 'vector :x 0.2587 :z 0.9657 :w 16383.618) + :geo-tform (new 'static 'vector :x -0.0125 :y -0.0002 :z 0.9998 :w 15964.989) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 806.5024 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 6 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.9998 :z -0.0125 :w 16512.342) + :geo-tform (new 'static 'vector :x -0.4189 :y -0.8113 :z -0.4067 :w 18265.03) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 806.5024 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 7 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.0273 :z -0.9994 :w 9645.098) + :geo-tform (new 'static 'vector :x 0.3147 :y -0.9196 :z 0.2348 :w 17491.832) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 1064.96 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 8 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.0536 :z -0.9983 :w 10284.383) + :geo-tform (new 'static 'vector :y 1.0 :w 16905.375) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 363.3152 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 9 + :parent-joint 4 + :pre-tform (new 'static 'vector :x -0.2587 :z -0.9657 :w 16384.346) + :geo-tform (new 'static 'vector :x -0.3909 :y 0.397 :z -0.8299 :w 18671.133) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 806.5024 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 10 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.7246 :z 0.6887 :w 16217.065) + :geo-tform (new 'static 'vector :x -0.1156 :y 0.9519 :z 0.2825 :w 24950.34) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 806.5024 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 11 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.7086 :z 0.7052 :w 5922.1064) + :geo-tform (new 'static 'vector :x -0.3934 :y 0.2208 :z 0.8921 :w 31601.842) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 1087.488 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 12 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.66 :z 0.7508 :w 11664.098) + :geo-tform (new 'static 'vector :y -1.0 :w 8004.1665) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 452.608 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 18 + :parent-joint 3 + :pre-tform (new 'static 'vector :x 0.9763 :z -0.2153 :w 10854.364) + :geo-tform (new 'static 'vector :x -0.0517 :y 0.8422 :z -0.536 :w 34465.51) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 1393.4592 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 19 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9814 :z -0.1916 :w 12053.145) + :geo-tform (new 'static 'vector :x 0.0117 :y 0.992 :z 0.1236 :w 34765.535) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 1039.9744 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 20 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.2473 :z 0.9686 :w 14074.312) + :geo-tform (new 'static 'vector :x 0.4625 :y 0.8439 :z 0.2713 :w 24201.445) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 806.5024 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 21 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.8453 :z -0.5342 :w 10724.566) + :geo-tform (new 'static 'vector :x -0.4236 :y -0.3812 :z 0.8213 :w 36821.477) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 806.5024 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 22 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.5795 :z 0.8146 :w 41836.6) + :geo-tform (new 'static 'vector :x -0.3352 :y 0.2062 :z 0.9189 :w 30666.19) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 1061.6832 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 23 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.6926 :z 0.721 :w 27957.91) + :geo-tform (new 'static 'vector :x -0.148 :y 0.9414 :z 0.302 :w 23747.88) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 562.7904 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 24 + :parent-joint 19 + :pre-tform (new 'static 'vector :x -0.1352 :z -0.9905 :w 14070.961) + :geo-tform (new 'static 'vector :x 0.304 :y -0.8482 :z -0.4328 :w 20045.35) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 806.5024 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 25 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9968 :z -0.0763 :w 9360.489) + :geo-tform (new 'static 'vector :x 0.5934 :y -0.3585 :z 0.7204 :w 26778.32) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 806.5024 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 26 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.1915 :z 0.9814 :w 23136.174) + :geo-tform (new 'static 'vector :x 0.4151 :y 0.3163 :z 0.8526 :w 36129.96) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 1043.2512 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 27 + :parent-joint -1 + :pre-tform (new 'static 'vector :x -0.5995 :z 0.8 :w 40254.598) + :geo-tform (new 'static 'vector :x 0.1548 :y 0.9404 :z 0.3018 :w 42156.035) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 652.0832 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 28 + :parent-joint 14 + :pre-tform (new 'static 'vector :x 0.0201 :z -0.9995 :w 9496.604) + :geo-tform (new 'static 'vector :x 0.4419 :y -0.494 :z 0.7483 :w 35945.93) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 547.6352 + :hit-sound (static-sound-name "frog-rgdoll") + ) + (new 'static 'ragdoll-joint-setup + :joint-index 29 + :parent-joint -1 + :pre-tform (new 'static 'vector :x 0.9733 :z -0.2282 :w 11187.232) + :geo-tform (new 'static 'vector :x 0.5046 :y 0.0354 :z 0.8622 :w 30183.021) + :axial-slop 1939.356 + :max-angle 4553.2773 + :coll-rad 349.3888 + :hit-sound (static-sound-name "frog-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 7 + :turn-anim -1 + :run-anim 5 + :taunt-anim 3 + :run-travel-speed (meters 11.6667) + :run-acceleration (meters 6) + :run-turning-acceleration (meters 0.5) + :walk-travel-speed (meters 5) + :walk-acceleration (meters 6) + :walk-turning-acceleration (meters 0.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! (-> *sewer-frog-nav-enemy-info* fact-defaults) *fact-info-sewer-frog-defaults*) + +;; definition for method 120 of type sewer-frog +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this sewer-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 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 pusher) + ) + (set! (-> s4-0 prim-core action) (collide-action solid can-ride deadly no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 4915.2 0.0 10240.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 obstacle hit-by-others-list player-list pusher) + ) + (set! (-> v1-13 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-13 transform-index) 4) + (set-vector! (-> v1-13 local-sphere) 0.0 0.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 obstacle hit-by-others-list player-list pusher) + ) + (set! (-> v1-15 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-15 transform-index) 18) + (set-vector! (-> v1-15 local-sphere) 0.0 0.0 0.0 1228.8) + ) + (let ((v1-17 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0)))) + (set! (-> v1-17 prim-core action) (collide-action solid deadly no-standon)) + (set! (-> v1-17 transform-index) 14) + (set-vector! (-> v1-17 local-sphere) 0.0 409.6 1228.8 4096.0) + ) + (set! (-> s5-0 nav-radius) 8192.0) + (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 3)) + (set! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; definition for function sewer-frog-hop +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defbehavior sewer-frog-hop sewer-frog () + (let ((a1-0 (-> self nav state)) + (a0-0 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-0 quad) (-> a1-0 target-pos quad)) + (let* ((f0-0 (vector-vector-xz-distance a0-0 (-> self root trans))) + (gp-0 (-> self enemy-info)) + (f30-0 (lerp-scale 0.0 1.0 f0-0 12288.0 28672.0)) + (f28-0 1.0) + ) + (let ((s5-0 (-> self nav))) + (set! (-> s5-0 target-speed) (lerp (-> gp-0 walk-travel-speed) (-> gp-0 run-travel-speed) f30-0)) + ) + 0 + (let ((s5-1 (-> self nav))) + (set! (-> s5-1 acceleration) (lerp (-> gp-0 walk-acceleration) (-> gp-0 run-acceleration) f30-0)) + ) + 0 + (let ((v1-6 (-> self nav))) + (set! (-> v1-6 turning-acceleration) (-> gp-0 run-turning-acceleration)) + ) + 0 + (ja-channel-push! 2 (seconds 0.01)) + (ja-no-eval :group! sewer-frog-hop-small-start-ja :num! (seek! max f28-0) :frame-num 0.0) + (ja-no-eval :chan 1 + :group! sewer-frog-hop0-start-ja + :num! (chan 0) + :frame-interp0 f30-0 + :frame-interp1 f30-0 + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (let ((a0-7 (-> self skel root-channel 0))) + (let ((f0-14 (- 1.0 f30-0))) + (set! (-> a0-7 frame-interp 1) f0-14) + (set! (-> a0-7 frame-interp 0) f0-14) + ) + (set! (-> a0-7 param 0) (the float (+ (-> a0-7 frame-group frames num-frames) -1))) + (set! (-> a0-7 param 1) f28-0) + (joint-control-channel-group-eval! a0-7 (the-as art-joint-anim #f) num-func-seek!) + ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + ) + (nav-enemy-method-178 self) + (ja-no-eval :group! sewer-frog-hop-small-end-ja :num! (seek! max f28-0) :frame-num 0.0) + (ja-no-eval :chan 1 + :group! sewer-frog-hop0-end-ja + :num! (chan 0) + :frame-interp0 f30-0 + :frame-interp1 f30-0 + :frame-num 0.0 + ) + (until (ja-done? 0) + (suspend) + (let ((a0-13 (-> self skel root-channel 0))) + (let ((f0-24 (- 1.0 f30-0))) + (set! (-> a0-13 frame-interp 1) f0-24) + (set! (-> a0-13 frame-interp 0) f0-24) + ) + (set! (-> a0-13 param 0) (the float (+ (-> a0-13 frame-group frames num-frames) -1))) + (set! (-> a0-13 param 1) f28-0) + (joint-control-channel-group-eval! a0-13 (the-as art-joint-anim #f) num-func-seek!) + ) + (ja :chan 1 :num! (chan 0) :frame-interp0 f30-0 :frame-interp1 f30-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for function sewer-frog-turn-to-face +;; WARN: Return type mismatch int vs none. +(defbehavior sewer-frog-turn-to-face sewer-frog ((arg0 vector)) + (let ((s2-1 (vector-! (new 'stack-no-clear 'vector) arg0 (-> self root trans))) + (s4-0 (new 'stack-no-clear 'vector)) + (s3-0 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + (gp-0 (vector-x-quaternion! (new 'stack-no-clear 'vector) (-> self root quat))) + ) + (vector-normalize-copy! s4-0 s2-1 1.0) + (let* ((f0-1 (vector-dot s4-0 s3-0)) + (f30-0 (vector-dot s4-0 gp-0)) + (gp-1 (the int (+ 0.5 (* 0.00012207031 (acos f0-1))))) + ) + (cond + ((>= (the-as uint gp-1) (the-as uint 3)) + (ja-channel-push! 1 (seconds 0.08)) + (dotimes (s4-1 (+ (shr gp-1 2) 1)) + (cond + ((< 0.0 f30-0) + (ja-no-eval :group! sewer-frog-turn-left-180-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (seek-to-point-toward-point! (-> self root) arg0 49152.0 (seconds 0.02)) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :group! sewer-frog-turn-right-180-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (seek-to-point-toward-point! (-> self root) arg0 49152.0 (seconds 0.02)) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + ) + ((> (the-as uint gp-1) 0) + (ja-channel-push! 1 (seconds 0.1)) + (dotimes (s5-1 (+ gp-1 1)) + (cond + ((< 0.0 f30-0) + (ja-no-eval :group! sewer-frog-turn-left-45-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (quaternion-rotate-y! (-> self root quat) (-> self root quat) (* 20480.0 (seconds-per-frame))) + (suspend) + (ja :num! (seek!)) + ) + ) + (else + (ja-no-eval :group! sewer-frog-turn-right-45-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (quaternion-rotate-y! (-> self root quat) (-> self root quat) (* -20480.0 (seconds-per-frame))) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate turn-to-face-focus (sewer-frog) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-182 self) + (nav-enemy-method-184 self) + (set-look-at-mode! self 1) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (sewer-frog-turn-to-face (-> self focus-pos)) + (go-stare self) + ) + :post nav-enemy-simple-post + ) + +;; failed to figure out what this is: +(defstate active (sewer-frog) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy active) enter))) + (if t9-0 + (t9-0) + ) + ) + (nav-enemy-method-182 self) + ) + :trans #f + :code (behavior () + (until #f + (when (or (logtest? (-> self nav state flags) (nav-state-flag at-target)) (nav-enemy-method-174 self)) + (nav-enemy-method-164 self) + (nav-enemy-method-173 self) + ) + (let ((t9-3 sewer-frog-turn-to-face) + (a1-0 (-> self nav state)) + (a0-3 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-3 quad) (-> a1-0 target-pos quad)) + (t9-3 a0-3) + ) + ((-> (method-of-type nav-enemy active) trans)) + (nav-enemy-method-181 self) + (sewer-frog-hop) + (nav-enemy-method-182 self) + (let ((gp-0 (the int (* 300.0 (rnd-float-range self 1.0 3.0))))) + (ja-channel-push! 1 (seconds 0.2)) + (let ((s5-0 (current-time)) + (f30-1 1.0) + ) + (ja-no-eval :group! sewer-frog-idle0-ja :num! (loop! f30-1) :frame-num 0.0) + (until (time-elapsed? s5-0 gp-0) + ((-> (method-of-type nav-enemy active) trans)) + (suspend) + (ja :num! (loop! f30-1)) + ) + ) + ) + ) + #f + ) + :post (behavior () + (nav-enemy-travel-post) + ) + ) + +;; failed to figure out what this is: +(defstate stare (sewer-frog) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy stare) enter))) + (if t9-0 + (t9-0) + ) + ) + (nav-enemy-method-184 self) + ) + :trans (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy stare) trans))) + (if t9-0 + (t9-0) + ) + ) + (if (and (time-elapsed? (-> self state-time) (-> self reaction-time)) + (not (enemy-method-104 self (-> self focus-pos) 10012.444)) + ) + (go-virtual turn-to-face-focus) + ) + ) + ) + +;; failed to figure out what this is: +(defstate hostile (sewer-frog) + :virtual #t + :enter (behavior () + (logclear! (-> self enemy-flags) (enemy-flag alert)) + (let ((t9-0 (-> (method-of-type nav-enemy hostile) enter))) + (if t9-0 + (t9-0) + ) + ) + (nav-enemy-method-184 self) + (nav-enemy-method-182 self) + ) + :trans (behavior () + '() + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.12)) + (let ((gp-0 (current-time)) + (s5-0 60) + (f30-0 1.0) + ) + (ja-no-eval :group! sewer-frog-idle0-ja :num! (loop! f30-0) :frame-num 0.0) + (until (time-elapsed? gp-0 s5-0) + (suspend) + (ja :num! (loop! f30-0)) + ) + ) + (sewer-frog-method-192 self) + (until #f + (let ((t9-4 sewer-frog-turn-to-face) + (a1-3 (-> self nav state)) + (a0-4 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-4 quad) (-> a1-3 target-pos quad)) + (t9-4 a0-4) + ) + (sewer-frog-method-192 self) + (nav-enemy-method-181 self) + (sewer-frog-hop) + (nav-enemy-method-182 self) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate attack (sewer-frog) + :virtual #t + :event enemy-event-handler + :enter (behavior () + (nav-enemy-method-181 self) + (nav-enemy-method-184 self) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (let ((gp-0 (-> self enemy-info))) + (nav-enemy-method-178 self) + (ja-no-eval :group! sewer-frog-attack0-start-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (let ((v1-26 (-> self nav))) + (set! (-> v1-26 target-speed) 122880.0) + ) + 0 + (let ((v1-28 (-> self nav))) + (set! (-> v1-28 acceleration) (-> gp-0 run-acceleration)) + ) + 0 + (let ((v1-30 (-> self nav))) + (set! (-> v1-30 turning-acceleration) (-> gp-0 run-turning-acceleration)) + ) + ) + 0 + (let* ((a0-6 (-> self root root-prim)) + (v1-34 (-> (the-as collide-shape-prim-group a0-6) child 2)) + ) + (+! (-> a0-6 local-sphere w) 4096.0) + (set! (-> v1-34 prim-core collide-as) (collide-spec enemy)) + (set! (-> v1-34 prim-core collide-with) (collide-spec jak bot player-list)) + ) + (logior! (-> self focus-status) (focus-status dangerous)) + (ja-no-eval :group! sewer-frog-attack0-mid-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (if (logtest? (-> self water flags) (water-flag active)) + (spawn-ripples (-> self water) 1.0 (-> self root trans) 1 *null-vector* #f) + ) + (let* ((v1-69 (-> self root root-prim)) + (a0-14 (-> (the-as collide-shape-prim-group v1-69) child 2)) + ) + (+! (-> v1-69 local-sphere w) -4096.0) + (set! (-> a0-14 prim-core collide-as) (collide-spec)) + (set! (-> a0-14 prim-core collide-with) (collide-spec)) + ) + 0 + (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-178 self) + (ja-no-eval :group! sewer-frog-attack0-end-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (set! (-> self scared-timer) (+ (current-time) (the int (* 300.0 (rnd-float-range self 3.8 5.6))))) + (go-best-state self) + ) + :post nav-enemy-chase-post + ) + +;; definition for function sewer-frog-check-hop +;; INFO: Used lq/sq +;; WARN: Return type mismatch object vs none. +(defbehavior sewer-frog-check-hop sewer-frog () + (let ((a1-0 (new 'stack-no-clear 'vector))) + (set! (-> a1-0 quad) (-> self move-dest quad)) + (set! (-> a1-0 w) (-> self nav-radius-backup)) + (if (add-root-sphere-to-hash! (-> self nav) a1-0 #x100068) + (go-virtual stare) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate flee (sewer-frog) + :virtual #t + :trans (behavior () + '() + ) + :code (behavior () + (nav-enemy-method-182 self) + (ja-channel-push! 1 (seconds 0.12)) + (let ((gp-0 (current-time)) + (s5-0 60) + (f30-0 1.0) + ) + (ja-no-eval :group! sewer-frog-idle0-ja :num! (loop! f30-0) :frame-num 0.0) + (until (time-elapsed? gp-0 s5-0) + (suspend) + (ja :num! (loop! f30-0)) + ) + ) + ((-> (method-of-type nav-enemy flee) trans)) + (until #f + (let ((t9-5 sewer-frog-turn-to-face) + (a1-3 (-> self nav state)) + (a0-4 (new 'stack-no-clear 'vector)) + ) + (set! (-> a0-4 quad) (-> a1-3 target-pos quad)) + (t9-5 a0-4) + ) + ((-> (method-of-type nav-enemy flee) trans)) + (sewer-frog-check-hop) + (nav-enemy-method-181 self) + (sewer-frog-hop) + (nav-enemy-method-182 self) + ) + #f + ) + ) + +;; failed to figure out what this is: +(defstate knocked (sewer-frog) + :virtual #t + :post (behavior () + (let ((v1-1 (handle->process (-> self ragdoll-proc)))) + (when v1-1 + (if (< 0.0 (-> self root transv y)) + (logior! (-> (the-as ragdoll-proc v1-1) ragdoll ragdoll-flags) (ragdoll-flag rf11)) + (logtest? (-> (the-as ragdoll-proc v1-1) ragdoll ragdoll-flags) (ragdoll-flag rf11)) + ) + ) + ) + (let ((t9-0 (-> (method-of-type nav-enemy knocked) post))) + (if t9-0 + ((the-as (function none) t9-0)) + ) + ) + ) + ) + +;; definition for method 167 of type sewer-frog +;; WARN: Return type mismatch symbol vs vector. +(defmethod nav-enemy-method-167 ((this sewer-frog)) + (let ((a0-2 (handle->process (-> this focus handle))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (the-as + vector + (when (and a0-2 (nav-enemy-method-166 this s5-0 (get-trans (the-as process-focusable a0-2) 0))) + (set! (-> s5-0 w) (-> this nav-radius-backup)) + (not (add-root-sphere-to-hash! (-> this nav) s5-0 #x100068)) + ) + ) + ) + ) + +;; definition for method 76 of type sewer-frog +(defmethod go-stare2 ((this sewer-frog)) + (if (not (enemy-method-104 this (-> this focus-pos) 6371.5557)) + (go (method-of-object this turn-to-face-focus)) + (go (method-of-object this stare)) + ) + ) + +;; definition for method 192 of type sewer-frog +;; WARN: Return type mismatch int vs none. +(defmethod sewer-frog-method-192 ((this sewer-frog)) + ((-> (method-of-type nav-enemy hostile) trans)) + (let* ((a0-1 (-> this focus-pos)) + (v1-3 (vector-! (new 'stack-no-clear 'vector) a0-1 (-> this root trans))) + (f0-4 (sqrtf (+ (* (-> v1-3 x) (-> v1-3 x)) (* (-> v1-3 z) (-> v1-3 z))))) + ) + (when (< f0-4 40960.0) + (if (< 12288.0 f0-4) + (go (method-of-object this attack)) + (set! (-> this scared-timer) (+ (current-time) (the int (* 300.0 (rnd-float-range this 1.8 3.6))))) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 125 of type sewer-frog +(defmethod ragdoll-settled? ((this sewer-frog)) + (let ((a0-2 (handle->process (-> this ragdoll-proc)))) + (or (not a0-2) + (ragdoll-proc-method-19 (the-as ragdoll-proc a0-2)) + (time-elapsed? (-> this state-time) (seconds 5)) + ) + ) + ) + +;; definition for method 108 of type sewer-frog +;; WARN: disable def twice: 22. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. +(defmethod enemy-method-108 ((this sewer-frog) (arg0 process-focusable)) + (or (< (current-time) (-> this scared-timer)) + (let ((v1-4 (handle->process (-> this focus handle)))) + (if v1-4 + (and (focus-test? (the-as process-focusable v1-4) disable dead ignore grabbed) + (< (vector-vector-xz-distance (-> this focus-pos) (-> this root trans)) 163840.0) + ) + #f + ) + ) + ) + ) + +;; definition for method 146 of type sewer-frog +(defmethod play-damage-sound ((this sewer-frog) (arg0 int)) + (case arg0 + ((2) + (if (and (-> this next-state) (= (-> this next-state name) 'knocked)) + (sound-play "frog-splash") + (sound-play "frog-waterhop") + ) + ) + (else + ((method-of-type nav-enemy play-damage-sound) this arg0) + ) + ) + ) + +;; definition for method 59 of type sewer-frog +;; INFO: Used lq/sq +(defmethod enemy-common-post ((this sewer-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) 3) quad)) + ) + ) + ) + (water-control-method-10 (-> this water)) + ((method-of-type nav-enemy enemy-common-post) this) + (none) + ) + +;; definition for method 82 of type sewer-frog +(defmethod event-handler ((this sewer-frog) (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)) + #t + ) + (else + ((method-of-type nav-enemy event-handler) this arg0 arg1 arg2 arg3) + ) + ) + ) + +;; definition for method 121 of type sewer-frog +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy! ((this sewer-frog)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-sewer-frog" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *sewer-frog-nav-enemy-info*) + (set! (-> this water) (new 'process 'water-control this 0 4096.0 8192.0 2048.0)) + (set! (-> this water flags) + (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 ((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)) + (set! (-> v1-11 nose) (the-as uint 2)) + (set! (-> v1-11 ear) (the-as uint 0)) + (set-vector! (-> v1-11 twist-max) 11832.889 15473.777 0.0 1.0) + (set! (-> v1-11 ignore-angle) 30947.555) + ) + (set! (-> this scared-timer) 0) + 0 + (none) + ) diff --git a/test/decompiler/reference/jak3/levels/sewer/sewer-mood_REF.gc b/test/decompiler/reference/jak3/levels/sewer/sewer-mood_REF.gc new file mode 100644 index 0000000000..bf7f25f850 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/sewer-mood_REF.gc @@ -0,0 +1,487 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type sewa-states +(deftype sewa-states (structure) + () + ) + +;; definition for method 3 of type sewa-states +(defmethod inspect ((this sewa-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'sewa-states) + (label cfg-4) + this + ) + +;; definition for function update-sewer-lights +;; WARN: Return type mismatch vector vs none. +(defun update-sewer-lights ((arg0 mood-context)) + (let ((v1-0 (-> arg0 light-group))) + (let ((a1-0 (-> v1-0 0))) + (set! (-> a1-0 dir0 direction x) -0.372) + (set! (-> a1-0 dir0 direction y) 0.853) + (set! (-> a1-0 dir0 direction z) 0.363) + (set! (-> a1-0 dir0 direction w) 0.0) + ) + (set-vector! (-> v1-0 0 dir0 color) 0.65 0.855 0.82 1.0) + (let ((a1-2 (-> v1-0 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 0 dir1 color) 0.65 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) 0.85) + (set! (-> v1-0 0 dir1 extra x) 0.3) + (set! (-> v1-0 0 dir2 extra x) 0.0) + (set! (-> v1-0 0 ambi extra x) 0.3) + ) + (let ((v1-2 (-> arg0 current-fog))) + (set! (-> v1-2 fog-color x) 150.0) + (set! (-> v1-2 fog-color y) 165.0) + (set! (-> v1-2 fog-color z) 220.0) + (set! (-> v1-2 fog-color w) 128.0) + ) + (set-vector! (-> arg0 current-fog fog-dists) 2048000.0 12288000.0 255.0 150.0) + (none) + ) + +;; definition for function update-mood-sewa +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-sewa time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-sewer-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) + (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 sewb-states +(deftype sewb-states (structure) + ((pulse pulse-state :inline) + ) + ) + +;; definition for method 3 of type sewb-states +(defmethod inspect ((this sewb-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'sewb-states) + (format #t "~1Tpulse: #~%" (-> this pulse)) + (label cfg-4) + this + ) + +;; definition for function init-mood-sewb +(defun init-mood-sewb ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state))) + (set! (-> v1-0 1) (the-as uint 1.0)) + (set! (-> v1-0 2) (the-as uint 1.0)) + (let ((f0-2 1.0)) + (set! (-> v1-0 3) (the-as uint f0-2)) + f0-2 + ) + ) + ) + +;; definition for function update-mood-sewb +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-sewb time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-sewer-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) + (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) + (update-mood-pulse arg0 7 0 1.0 0.25 (* 65536.0 (seconds-per-frame)) 0.0) + ) + ) + 0 + (none) + ) + +;; definition of type sewc-states +(deftype sewc-states (structure) + ((pulse pulse-state :inline) + (electricity electricity-state :inline) + (rot float) + ) + ) + +;; definition for method 3 of type sewc-states +(defmethod inspect ((this sewc-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'sewc-states) + (format #t "~1Tpulse: #~%" (-> this pulse)) + (format #t "~1Telectricity: #~%" (-> this electricity)) + (format #t "~1Trot: ~f~%" (-> this rot)) + (label cfg-4) + this + ) + +;; definition for function init-mood-sewc +(defun init-mood-sewc ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state))) + (set! (-> v1-0 5) (the-as uint 1.0)) + (set! (-> v1-0 1) (the-as uint 1.0)) + (set! (-> v1-0 2) (the-as uint 1.0)) + (let ((f0-3 1.0)) + (set! (-> v1-0 3) (the-as uint f0-3)) + f0-3 + ) + ) + ) + +;; definition for function update-mood-sewc +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-sewc time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-sewer-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 sewc-states (-> arg0 state)))) + (set! (-> arg0 times 0 w) 1.0) + (set! (-> arg0 times 1 w) 1.0) + (update-mood-electricity arg0 2 16 0.8 1.0) + (update-mood-pulse arg0 3 0 1.0 0.25 (* 87381.336 (seconds-per-frame)) 0.0) + (set! (-> arg0 times 4 w) 1.0) + (update-mood-caustics arg0 5 (-> gp-0 rot) 0.0 0.66 0.4) + (update-mood-caustics arg0 6 (-> gp-0 rot) 21845.334 0.66 0.4) + (update-mood-caustics arg0 7 (-> gp-0 rot) 43690.668 0.66 0.4) + (if (not (paused?)) + (+! (-> gp-0 rot) (* 65536.0 (seconds-per-frame))) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition of type sewd-states +(deftype sewd-states (structure) + ((pulse pulse-state :inline) + (electricity electricity-state :inline) + (rot float) + ) + ) + +;; definition for method 3 of type sewd-states +(defmethod inspect ((this sewd-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'sewd-states) + (format #t "~1Tpulse: #~%" (-> this pulse)) + (format #t "~1Telectricity: #~%" (-> this electricity)) + (format #t "~1Trot: ~f~%" (-> this rot)) + (label cfg-4) + this + ) + +;; definition for function init-mood-sewd +(defun init-mood-sewd ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state))) + (set! (-> v1-0 5) (the-as uint 0.0)) + (set! (-> v1-0 1) (the-as uint 1.0)) + (set! (-> v1-0 2) (the-as uint 1.0)) + (let ((f0-3 1.0)) + (set! (-> v1-0 3) (the-as uint f0-3)) + f0-3 + ) + ) + ) + +;; definition for function update-mood-sewd +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-sewd time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-sewer-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 sewd-states (-> arg0 state)))) + (set! (-> arg0 times 0 w) 1.0) + (set! (-> arg0 times 1 w) 1.0) + (update-mood-electricity arg0 2 16 0.8 1.0) + (update-mood-pulse arg0 3 0 1.0 0.25 (* 87381.336 (seconds-per-frame)) 0.0) + (set! (-> arg0 times 4 w) 1.0) + (update-mood-caustics arg0 5 (-> gp-0 rot) 0.0 0.66 0.4) + (update-mood-caustics arg0 6 (-> gp-0 rot) 21845.334 0.66 0.4) + (update-mood-caustics arg0 7 (-> gp-0 rot) 43690.668 0.66 0.4) + (if (not (paused?)) + (+! (-> gp-0 rot) (* 65536.0 (seconds-per-frame))) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function set-sewd-light! +;; WARN: Return type mismatch float vs none. +(defun set-sewd-light! ((arg0 float)) + (let ((v1-1 (level-get *level* 'sewd))) + (when (and v1-1 (= (-> v1-1 status) 'active)) + (let ((v1-2 (-> v1-1 mood-context state))) + (set! (-> v1-2 5) (the-as uint arg0)) + ) + ) + ) + (none) + ) + +;; definition of type sewg-states +(deftype sewg-states (structure) + ((electricity electricity-state 2 :inline) + (rot float :offset 32) + ) + ) + +;; definition for method 3 of type sewg-states +(defmethod inspect ((this sewg-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'sewg-states) + (format #t "~1Telectricity[2] @ #x~X~%" (-> this electricity)) + (format #t "~1Trot: ~f~%" (-> this rot)) + (label cfg-4) + this + ) + +;; definition for function init-mood-sewg +(defun init-mood-sewg ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state))) + (set! (-> v1-0 1) (the-as uint 1.0)) + (let ((f0-1 1.0)) + (set! (-> v1-0 5) (the-as uint f0-1)) + f0-1 + ) + ) + ) + +;; definition for function update-mood-sewg +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-sewg time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-sewer-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 sewg-states (-> arg0 state)))) + (set! (-> arg0 times 0 w) 1.0) + (set! (-> arg0 times 1 w) 1.0) + (set! (-> arg0 times 4 w) 1.0) + (update-mood-electricity arg0 2 0 1.2 1.7) + (update-mood-electricity arg0 3 16 1.2 1.7) + (update-mood-caustics arg0 5 (-> gp-0 rot) 0.0 0.66 0.4) + (update-mood-caustics arg0 6 (-> gp-0 rot) 21845.334 0.66 0.4) + (update-mood-caustics arg0 7 (-> gp-0 rot) 43690.668 0.66 0.4) + (if (not (paused?)) + (+! (-> gp-0 rot) (* 65536.0 (seconds-per-frame))) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function set-sewg-electricity-scale! +;; WARN: Return type mismatch int vs none. +(defun set-sewg-electricity-scale! ((arg0 float) (arg1 int)) + (let ((v1-1 (level-get *level* 'sewg))) + (when v1-1 + (let ((v1-2 (the-as sewg-states (-> v1-1 mood-context state)))) + (set! (-> (the-as sewg-states (+ (the-as uint v1-2) (* arg1 16))) electricity 0 scale) arg0) + ) + ) + ) + 0 + (none) + ) + +;; definition of type sewh-states +(deftype sewh-states (structure) + ((electricity electricity-state 5 :inline) + (turret-value float :offset 80) + ) + ) + +;; definition for method 3 of type sewh-states +(defmethod inspect ((this sewh-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'sewh-states) + (format #t "~1Telectricity[5] @ #x~X~%" (-> this electricity)) + (format #t "~1Tturret-value: ~f~%" (-> this turret-value)) + (label cfg-4) + this + ) + +;; definition for function init-mood-sewh +(defun init-mood-sewh ((arg0 mood-context)) + (let ((v1-0 (-> arg0 state))) + (set! (-> v1-0 1) (the-as uint 1.0)) + (set! (-> v1-0 5) (the-as uint 1.0)) + (set! (-> v1-0 9) (the-as uint 1.0)) + (set! (-> v1-0 13) (the-as uint 1.0)) + (let ((f0-4 1.0)) + (set! (-> v1-0 17) (the-as uint f0-4)) + f0-4 + ) + ) + ) + +;; definition for function update-mood-sewh +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-sewh time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-sewer-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 sewh-states (-> arg0 state)))) + (set! (-> arg0 times 0 w) 1.0) + (set! (-> arg0 times 1 w) 1.0) + (update-mood-electricity arg0 2 0 1.2 1.7) + (update-mood-electricity arg0 3 16 1.2 1.7) + (update-mood-electricity arg0 5 48 1.2 1.7) + (update-mood-electricity arg0 6 64 1.2 1.7) + (set! (-> arg0 times 7 w) (-> gp-0 turret-value)) + (if (not (paused?)) + (set! (-> gp-0 turret-value) (fmax 0.0 (+ -0.1 (-> gp-0 turret-value)))) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function set-sewh-electricity-scale! +;; WARN: Return type mismatch int vs none. +(defun set-sewh-electricity-scale! ((arg0 float) (arg1 int)) + (let ((v1-1 (level-get *level* 'sewh))) + (when v1-1 + (let ((v1-2 (the-as object (-> v1-1 mood-context state)))) + (set! (-> (the-as sewh-states (+ (the-as uint v1-2) (* arg1 16))) electricity 0 scale) arg0) + ) + ) + ) + 0 + (none) + ) + +;; definition for function set-sewh-turret-flash! +;; WARN: Return type mismatch float vs none. +(defun set-sewh-turret-flash! () + (let ((v1-1 (level-get *level* 'sewh))) + (when v1-1 + (let ((v1-2 (-> v1-1 mood-context state))) + (set! (-> v1-2 20) (the-as uint 1.2)) + ) + ) + ) + (none) + ) + +;; definition of type sewj-states +(deftype sewj-states (structure) + ((rot float) + ) + ) + +;; definition for method 3 of type sewj-states +(defmethod inspect ((this sewj-states)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'sewj-states) + (format #t "~1Trot: ~f~%" (-> this rot)) + (label cfg-4) + this + ) + +;; definition for function update-mood-sewj +;; WARN: Return type mismatch int vs none. +(defbehavior update-mood-sewj time-of-day-proc ((arg0 mood-context) (arg1 float) (arg2 int)) + (update-mood-interior arg0 #f) + (update-sewer-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 sewj-states (-> arg0 state)))) + (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) + (update-mood-caustics arg0 5 (-> gp-0 rot) 0.0 0.66 0.4) + (update-mood-caustics arg0 6 (-> gp-0 rot) 21845.334 0.66 0.4) + (update-mood-caustics arg0 7 (-> gp-0 rot) 43690.668 0.66 0.4) + (if (not (paused?)) + (+! (-> gp-0 rot) (* 65536.0 (seconds-per-frame))) + ) + ) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak3/levels/sewer/sewer-move-turret_REF.gc b/test/decompiler/reference/jak3/levels/sewer/sewer-move-turret_REF.gc new file mode 100644 index 0000000000..f0583a5b83 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/sewer-move-turret_REF.gc @@ -0,0 +1,596 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type sew-move-turret +(deftype sew-move-turret (process-drawable) + ((sound-id sound-id) + (use-doppler? symbol) + ) + (:state-methods + idle + active + ) + (:methods + (sew-move-turret-method-22 (_type_ int) none) + ) + ) + +;; definition for method 3 of type sew-move-turret +(defmethod inspect ((this sew-move-turret)) + (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)) + (format #t "~2Tuse-doppler?: ~A~%" (-> this use-doppler?)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-sew-move-turret sew-move-turret sew-move-turret-lod0-jg sew-move-turret-idle-ja + ((sew-move-turret-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 20) + ) + +;; failed to figure out what this is: +(defstate idle (sew-move-turret) + :virtual #t + :trans (behavior () + (let ((f30-0 (vector-vector-distance (-> self root trans) (target-pos 0))) + (gp-1 (new 'stack-no-clear 'vector)) + ) + (vector-! gp-1 (target-pos 0) (-> self root trans)) + (let ((f0-1 (vector-dot gp-1 (-> self node-list data 5 bone transform fvec))) + (f1-2 (fabs (vector-dot gp-1 (the-as vector (-> self node-list data 5 bone transform))))) + ) + (if (and (< 4096.0 f0-1) (>= 81920.0 f1-2) (< f30-0 450560.0)) + (go-virtual active) + ) + ) + ) + ) + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate active (sew-move-turret) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('use-doppler?) + (-> self use-doppler?) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self use-doppler?) #f) + ) + :trans (behavior () + (let ((f30-0 (vector-vector-distance (-> self root trans) (target-pos 0))) + (gp-1 (new 'stack-no-clear 'vector)) + ) + (vector-! gp-1 (target-pos 0) (-> self root trans)) + (let ((f0-1 (vector-dot gp-1 (-> self node-list data 5 bone transform fvec))) + (f1-2 (fabs (vector-dot gp-1 (the-as vector (-> self node-list data 5 bone transform))))) + ) + (when (or (>= 0.0 f0-1) (< 81920.0 f1-2) (>= f30-0 450560.0)) + (if (nonzero? (-> self sound-id)) + (sound-stop (-> self sound-id)) + ) + (go-virtual idle) + ) + ) + ) + (logior! (-> self skel status) (joint-control-status sync-math)) + ) + :code (behavior () + (until #f + (sound-play "turret-move-lp" :id (-> self sound-id)) + (let ((f30-0 -10.0)) + (until (ja-done? 0) + (when (time-elapsed? (-> self state-time) (seconds 0.05)) + (let ((f28-0 (ja-frame-num 0))) + (let ((v1-6 #f)) + (if (or (and (< f30-0 23.0) (>= f28-0 23.0)) (and (< f30-0 67.0) (>= f28-0 67.0))) + (set! v1-6 #t) + ) + (set! (-> self use-doppler?) v1-6) + ) + (set-time! (-> self state-time)) + (sound-play "turret-gun-fire") + (sew-move-turret-method-22 self 5) + (set! f30-0 f28-0) + ) + ) + (suspend) + (ja :num! (seek! max 2.0)) + ) + ) + (ja-no-eval :group! sew-move-turret-move-shoot-ja :num! (seek!) :frame-num 0.0) + ) + #f + ) + :post transform-post + ) + +;; definition for method 22 of type sew-move-turret +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod sew-move-turret-method-22 ((this sew-move-turret) (arg0 int)) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (set! (-> s5-0 quad) (-> this node-list data arg0 bone transform fvec quad)) + (let ((s4-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> this node-list data arg0)))) + (let ((f0-0 (ja-frame-num 0))) + (cond + ((< f0-0 45.0) + (let ((f1-1 1228.8)) + (cond + ((< f0-0 5.0) + (set! f1-1 (* 0.2 f0-0 f1-1)) + ) + ((< 40.0 f0-0) + (set! f1-1 (* 0.2 (- 45.0 f0-0) f1-1)) + ) + ) + (vector+float*! s4-0 s4-0 (the-as vector (-> this node-list data arg0 bone transform)) f1-1) + ) + ) + (else + (let ((f1-2 -1228.8)) + (cond + ((< f0-0 50.0) + (set! f1-2 (* 0.2 (+ -45.0 f0-0) f1-2)) + ) + ((< 85.0 f0-0) + (set! f1-2 (* 0.2 (- 90.0 f0-0) f1-2)) + ) + ) + (vector+float*! s4-0 s4-0 (the-as vector (-> this node-list data arg0 bone transform)) f1-2) + ) + ) + ) + ) + (vector-normalize! s5-0 40960.0) + (spawn-sew-move-turret-projectile + this + s4-0 + (vector+! (new 'stack-no-clear 'vector) s4-0 s5-0) + 122880.0 + (the-as vector #f) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 11 of type sew-move-turret +(defmethod init-from-entity! ((this sew-move-turret) (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 no-standon)) + (set! (-> s3-0 transform-index) 3) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 12288.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 1)))) + (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 no-standon)) + (set! (-> v1-9 transform-index) 4) + (set-vector! (-> v1-9 local-sphere) 0.0 0.0 0.0 12288.0) + ) + (let ((v1-11 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 1)))) + (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 no-standon)) + (set! (-> v1-11 transform-index) 3) + (set-vector! (-> v1-11 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-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! (-> s4-0 penetrated-by) (penetrate)) + (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-move-turret" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (let ((v1-23 (-> this skel root-channel 0))) + (set! (-> v1-23 frame-group) (the-as art-joint-anim (-> this draw art-group data 3))) + ) + (set! (-> this sound-id) (new-sound-id)) + (transform-post) + (go (method-of-object this idle)) + ) + +;; definition for method 10 of type sew-move-turret +(defmethod deactivate ((this sew-move-turret)) + "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) + ) + +;; definition of type sew-move-turret-shot +(deftype sew-move-turret-shot (guard-shot) + ((doppler-sound sound-id) + (use-doppler? symbol) + ) + ) + +;; definition for method 3 of type sew-move-turret-shot +(defmethod inspect ((this sew-move-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 "~2Tdoppler-sound: ~D~%" (-> this doppler-sound)) + (format #t "~2Tuse-doppler?: ~A~%" (-> this use-doppler?)) + (label cfg-4) + this + ) + +;; definition for function sew-turret-shot-move +;; WARN: Return type mismatch int vs none. +(defun sew-turret-shot-move ((arg0 sew-move-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 (< 16384.0 f0-0) + (vector-normalize! s4-0 16384.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) + ) + +;; failed to figure out what this is: +(defpart 4940 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.9)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 32.0) + (:b 0.0) + (:a 255.0) + (:scalevel-x (meters -0.013333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 4941 + :init-specs ((:texture (hotdot level-default-sprite)) + (:num 1.0) + (:x (meters 0.3)) + (:scale-x (meters 0.9)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 32.0) + (:b 0.0) + (:a 255.0) + (:scalevel-x (meters -0.013333334)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + ) + ) + +;; failed to figure out what this is: +(defpart 4942 + :init-specs ((:texture (gun-enemy-muzzleflash level-default-sprite)) + (:birth-func 'birth-func-set-quat) + (:num 1.0) + (:scale-x (meters 2) (meters 1)) + (:scale-y (meters 1) (meters 0.5)) + (:r 128.0) + (:g 64.0 128.0) + (:b 32.0) + (:a 128.0) + (:timer (seconds 0.035)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 4943 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.5) (meters 1.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 0.0) + (:a 255.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sew-move-turret-hit-object + :id 1506 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4944 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 4945 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sew-move-turret-hit + :id 1507 + :duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4944 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 4945 :flags (sp6) :period (seconds 2) :length (seconds 0.017)) + (sp-item 4946 :period (seconds 2) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 4946 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.75) (meters 0.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 16.0 48.0) + (:vel-y (meters 0.013333334) (meters 0.013333334)) + (: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 4944 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 3)) + (: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.026666667)) + (:rotvel-z (degrees 0.3)) + (:scalevel-y :copy scalevel-x) + (:fade-g -3.2) + (:fade-b -6.375) + (:fade-a -2.4) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; definition for method 25 of type sew-move-turret-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-25 ((this sew-move-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* ((a1-0 (-> this root trans)) + (v1-1 (-> this tail-pos)) + (a0-2 (vector-! (new 'stack-no-clear 'vector) a1-0 v1-1)) + ) + (vector-length a0-2) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((a1-4 0.8)) + (.mov vf7 a1-4) + ) + (.lvf vf5 (&-> a0-2 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 (&-> gp-0 quad) vf6) + (launch-particles (-> *part-id-table* 4940) gp-0) + (launch-particles (-> *part-id-table* 4941) gp-0) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 24 of type sew-move-turret-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-24 ((this sew-move-turret-shot)) + (draw-beam (-> *part-id-table* 4942) (-> this tail-pos) (-> this starting-dir) #f) + (let* ((v1-1 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> this starting-dir) 2048.0)) + (gp-1 (vector+! (new 'stack-no-clear 'vector) (-> this tail-pos) v1-1)) + ) + (set-sewh-turret-flash!) + (launch-particles (-> *part-id-table* 4943) gp-1) + ) + 0 + (none) + ) + +;; definition for method 26 of type sew-move-turret-shot +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod projectile-method-26 ((this sew-move-turret-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 "bullet-hit-jak") + (cond + ((logtest? (-> *part-group-id-table* 1506 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* 1506)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-0 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1506)) + ) + ) + ) + ((begin (sound-play "bullet-ricco") (logtest? (-> *part-group-id-table* 1507 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* 1507)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-0 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 1507)) + ) + ) + ) + 0 + (none) + ) + +;; definition for function spawn-sew-move-turret-projectile +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs (pointer sew-move-turret-shot). +(defun spawn-sew-move-turret-projectile ((arg0 sew-move-turret) (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 40960.0) + ) + (the-as (pointer sew-move-turret-shot) (spawn-projectile sew-move-turret-shot gp-0 arg0 *default-dead-pool*)) + ) + ) + +;; definition for method 31 of type sew-move-turret-shot +;; WARN: Return type mismatch (function sew-move-turret-shot none) vs none. +(defmethod init-proj-settings! ((this sew-move-turret-shot)) + (call-parent-method this) + (set! (-> this doppler-sound) (new-sound-id)) + (set! (-> this use-doppler?) (the-as symbol (send-event (ppointer->process (-> this parent)) 'use-doppler?))) + (set! (-> this max-speed) 163840.0) + (set! (-> this timeout) (the-as time-frame (the int (* 300.0 (/ 819200.0 (-> this max-speed)))))) + (set! (-> this move) sew-turret-shot-move) + (none) + ) + +;; definition for method 28 of type sew-move-turret-shot +;; WARN: Return type mismatch object vs none. +(defmethod play-impact-sound ((this sew-move-turret-shot) (arg0 projectile-options)) + (cond + ((and (= arg0 3) (-> this use-doppler?)) + (let ((s5-2 (vector-! (new 'stack-no-clear 'vector) (-> this root trans) (target-pos 0)))) + 0.0 + (let ((s4-1 (< 0.0 (vector-dot s5-2 (-> this root transv)))) + (f0-2 (vector-normalize-ret-len! s5-2 1.0)) + ) + (if (or (and s4-1 (< f0-2 40960.0)) (and (not s4-1) (< f0-2 102400.0))) + (sound-play-by-name + (static-sound-name "bullet-by-loop") + (-> this doppler-sound) + 1024 + (the int + (* 1524.0 (fmax -0.08 (fmin 1.0 (* 0.5 (doppler-pitch-shift (-> this root trans) (-> this root transv)))))) + ) + 0 + (sound-group) + (-> this root trans) + ) + (sound-stop (-> this doppler-sound)) + ) + ) + ) + ) + (else + (call-parent-method this arg0) + ) + ) + (none) + ) + +;; definition for method 10 of type sew-move-turret-shot +(defmethod deactivate ((this sew-move-turret-shot)) + "Make a process dead, clean it up, remove it from the active pool, and return to dead pool." + (sound-stop (-> this doppler-sound)) + (call-parent-method this) + (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 new file mode 100644 index 0000000000..8f8e3baf30 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/sewer-obs2_REF.gc @@ -0,0 +1,666 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type sew-laser-beam +(deftype sew-laser-beam (process-drawable) + ((sync sync-linear :inline) + (sound-id sound-id) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type sew-laser-beam +(defmethod inspect ((this sew-laser-beam)) + (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 "~2Tsound-id: ~D~%" (-> this sound-id)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-sew-laser-beam sew-laser-beam sew-laser-beam-lod0-jg sew-laser-beam-idle-ja + ((sew-laser-beam-lod0-mg (meters 20)) (sew-laser-beam-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 5.75 12) + :shadow sew-laser-beam-shadow-mg + :shadow-joint-index 4 + ) + +;; definition for function fire-sew-laser-beam! +;; INFO: Used lq/sq +(defun fire-sew-laser-beam! ((arg0 vector) (arg1 vector) (arg2 sew-laser-beam)) + (let ((s4-0 (new 'stack-no-clear 'collide-query)) + (f30-0 47104.0) + ) + (set! (-> s4-0 start-pos quad) (-> arg0 quad)) + (vector-normalize-copy! (-> s4-0 move-dist) arg1 f30-0) + (let ((v1-2 s4-0)) + (set! (-> v1-2 radius) 40.96) + (set! (-> v1-2 collide-with) (collide-spec backgnd jak enemy obstacle hit-by-others-list player-list)) + (set! (-> v1-2 ignore-process0) arg2) + (set! (-> v1-2 ignore-process1) #f) + (set! (-> v1-2 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-2 action-mask) (collide-action solid)) + ) + (let ((f0-1 (fill-and-probe-using-line-sphere *collide-cache* s4-0))) + (if (>= f0-1 0.0) + (vector-float*! (-> s4-0 move-dist) (-> s4-0 move-dist) f0-1) + (set! (-> s4-0 best-other-tri collide-ptr) #f) + ) + ) + (when (and (-> s4-0 best-other-tri collide-ptr) (let ((s2-0 (-> s4-0 best-other-tri collide-ptr))) + (if (type? s2-0 collide-shape-prim-sphere) + s2-0 + ) + ) + ) + (let ((s2-1 (new 'stack-no-clear 'projectile-init-by-other-params))) + (set! (-> s2-1 ent) (-> arg2 entity)) + (set! (-> s2-1 charge) 1.0) + (set! (-> s2-1 options) (projectile-options)) + (logclear! (-> s2-1 options) (projectile-options po14 po15 po16)) + (set! (-> s2-1 notify-handle) (the-as handle #f)) + (set! (-> s2-1 owner-handle) (the-as handle #f)) + (set! (-> s2-1 target-handle) (the-as handle #f)) + (set! (-> s2-1 target-pos quad) (the-as uint128 0)) + (set! (-> s2-1 ignore-handle) (process->handle arg2)) + (let* ((v1-19 *game-info*) + (a0-17 (+ (-> v1-19 attack-id) 1)) + ) + (set! (-> v1-19 attack-id) a0-17) + (set! (-> s2-1 attack-id) a0-17) + ) + (set! (-> s2-1 timeout) (seconds 4)) + (set! (-> s2-1 pos quad) (-> s4-0 start-pos quad)) + (vector-normalize-copy! (-> s2-1 vel) (-> s4-0 move-dist) 491520.0) + (sound-play "laser-hit-jak") + (spawn-projectile sew-laser-shot s2-1 arg2 *default-dead-pool*) + ) + (vector-normalize! (-> s4-0 move-dist) (+ 2048.0 (vector-length (-> s4-0 move-dist)))) + ) + (set! (-> *part-id-table* 4935 init-specs 4 initial-valuef) f30-0) + (let ((a2-5 (new 'stack-no-clear 'vector))) + (vector-float*! a2-5 arg1 f30-0) + (draw-beam (-> *part-id-table* 4935) arg0 a2-5 #t) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (sew-laser-beam) + :virtual #t + :trans (behavior () + (sound-play "laser-beam-loop" :id (-> self sound-id)) + (let ((gp-0 (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node sew-laser-beam-lod0-jg laser)))) + (new 'stack-no-clear 'vector) + (let ((s5-0 (new 'stack-no-clear 'vector))) + (vector-z-quaternion! s5-0 (-> self root quat)) + (vector-normalize! s5-0 1.0) + (fire-sew-laser-beam! gp-0 s5-0 self) + ) + ) + ) + :code (behavior () + (until #f + (let ((f0-2 (* (get-norm! (-> self sync) 0) (the float (ja-num-frames 0)))) + (a0-2 (-> self skel root-channel 0)) + ) + (set! (-> a0-2 param 0) f0-2) + (joint-control-channel-group-eval! a0-2 (the-as art-joint-anim #f) num-func-loop-set!) + ) + (suspend) + ) + #f + ) + :post ja-post + ) + +;; definition for symbol *sew-laser-beam-shadow-control*, type shadow-control +(define *sew-laser-beam-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 614400.0) + :bot-plane (new 'static 'plane :y 1.0 :w 163840.0) + :top-plane (new 'static 'plane :y 1.0 :w -163840.0) + :shadow-type 1 + ) + ) + ) + +;; definition for method 11 of type sew-laser-beam +(defmethod init-from-entity! ((this sew-laser-beam) (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-sew-laser-beam" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (let ((a1-5 (new 'stack-no-clear 'sync-info-params))) + (let ((v1-4 0)) + (if #f + (set! v1-4 (logior v1-4 1)) + ) + (set! (-> a1-5 sync-type) 'sync-linear) + (set! (-> a1-5 sync-flags) (the-as sync-flags v1-4)) + ) + (set! (-> a1-5 entity) arg0) + (set! (-> a1-5 period) (the-as uint 2700)) + (set! (-> a1-5 percent) 0.0) + (initialize! (-> this sync) a1-5) + ) + (set! (-> this sound-id) (new-sound-id)) + (set! (-> this draw shadow-ctrl) *sew-laser-beam-shadow-control*) + (set-setting! 'spotlight-color #f 0.0 (the-as uint #x80ffc000)) + (go (method-of-object this idle)) + ) + +;; definition for method 10 of type sew-laser-beam +(defmethod deactivate ((this sew-laser-beam)) + "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) + ) + +;; definition of type sew-m-gate +(deftype sew-m-gate (process-drawable) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + ) + (:state-methods + idle + open + raised + ) + ) + +;; definition for method 3 of type sew-m-gate +(defmethod inspect ((this sew-m-gate)) + (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)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-sew-m-gate sew-m-gate sew-m-gate-lod0-jg sew-m-gate-idle-ja + ((sew-m-gate-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -0.5 0 6.5) + ) + +;; failed to figure out what this is: +(defstate idle (sew-m-gate) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual open) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (local-vars (v1-6 symbol)) + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (when (> (-> self actor-group-count) 0) + (dotimes (v1-5 (-> self actor-group 0 length)) + (let ((a1-1 (-> self actor-group 0 data v1-5 actor))) + (when (or (not a1-1) (not (logtest? (-> a1-1 extra perm status) (entity-perm-status subtask-complete)))) + (set! v1-6 #f) + (goto cfg-13) + ) + ) + ) + ) + (set! v1-6 #t) + (label cfg-13) + (if v1-6 + (go-virtual open) + ) + ) + ) + :code sleep-code + :post #f + ) + +;; failed to figure out what this is: +(defstate open (sew-m-gate) + :virtual #t + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (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-353" 0.0 0) + (process-grab? *target* #f) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 2)) + (suspend) + ) + ) + (sound-play "gate-open") + (ja-no-eval :group! sew-m-gate-gate-open-ja :num! (seek! max 0.1) :frame-num 0.0) + (until (ja-done? 0) + (transform-post) + (suspend) + (ja :num! (seek! max 0.1)) + ) + (remove-setting! 'mode-name) + (remove-setting! 'interp-time) + (remove-setting! 'entity-name) + (let ((gp-3 (current-time))) + (until (time-elapsed? gp-3 (seconds 0.5)) + (suspend) + ) + ) + (process-release? *target*) + (go-virtual raised) + ) + :post #f + ) + +;; failed to figure out what this is: +(defstate raised (sew-m-gate) + :virtual #t + :enter (behavior () + (ja :group! sew-m-gate-gate-open-ja :num! max) + (transform-post) + ) + :code sleep-code + :post #f + ) + +;; 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 (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)) + (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) 0.0 -2048.0 0.0 26624.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-m-gate" (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-13 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-13 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-13)) + (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 ((v1-21 (-> this skel root-channel 0))) + (set! (-> v1-21 frame-group) (the-as art-joint-anim (-> this draw art-group data 2))) + ) + (transform-post) + (if (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this raised)) + (go (method-of-object this idle)) + ) + ) + +;; definition of type sew-pipe +(deftype sew-pipe (process-drawable) + ((actor-group (pointer actor-group)) + (actor-group-count int32) + ) + (:state-methods + idle + lower + down + ) + ) + +;; definition for method 3 of type sew-pipe +(defmethod inspect ((this sew-pipe)) + (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)) + (label cfg-7) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-sew-pipe sew-pipe sew-pipe-lod0-jg sew-pipe-idle-ja + ((sew-pipe-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -7.5 0 27) + ) + +;; failed to figure out what this is: +(defstate idle (sew-pipe) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('trigger) + (go-virtual lower) + ) + ) + ) + :enter (behavior () + (set-time! (-> self state-time)) + ) + :trans (behavior () + (local-vars (v1-6 symbol)) + (when (time-elapsed? (-> self state-time) (seconds 0.1)) + (when (> (-> self actor-group-count) 0) + (dotimes (v1-5 (-> self actor-group 0 length)) + (let ((a1-1 (-> self actor-group 0 data v1-5 actor))) + (when (or (not a1-1) (not (logtest? (-> a1-1 extra perm status) (entity-perm-status subtask-complete)))) + (set! v1-6 #f) + (goto cfg-13) + ) + ) + ) + ) + (set! v1-6 #t) + (label cfg-13) + (if v1-6 + (go-virtual lower) + ) + ) + ) + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate lower (sew-pipe) + :virtual #t + :code (behavior () + (process-entity-status! self (entity-perm-status subtask-complete) #t) + (let ((gp-0 (current-time))) + (until (time-elapsed? gp-0 (seconds 1)) + (suspend) + ) + ) + (set-setting! 'mode-name 'cam-fixed 0.0 0) + (set-setting! 'interp-time 'abs 0.0 0) + (set-setting! 'entity-name "camera-352" 0.0 0) + (process-grab? *target* #f) + (let ((gp-1 (current-time))) + (until (time-elapsed? gp-1 (seconds 1)) + (suspend) + ) + ) + (sound-play "pipe-lower") + (set-time! (-> self state-time)) + (ja-no-eval :group! sew-pipe-down-ja :num! (seek! max 0.1) :frame-num 0.0) + (until (ja-done? 0) + (if (time-elapsed? (-> self state-time) (seconds 1.557)) + (sound-play "pipe-lower-hit") + ) + (transform-post) + (suspend) + (ja :num! (seek! max 0.1)) + ) + (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 down) + ) + :post #f + ) + +;; failed to figure out what this is: +(defstate down (sew-pipe) + :virtual #t + :enter (behavior () + (ja :group! sew-pipe-down-ja :num! max) + (transform-post) + ) + :code sleep-code + :post #f + ) + +;; definition for method 11 of type sew-pipe +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this sew-pipe) (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-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) 0.0 -30720.0 0.0 110592.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-pipe" (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-13 (res-lump-data (-> this entity) 'actor-groups pointer :tag-ptr (& sv-16)))) + (cond + ((and v1-13 (nonzero? (-> sv-16 elt-count))) + (set! (-> this actor-group) (the-as (pointer actor-group) v1-13)) + (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 (logtest? (-> this entity extra perm status) (entity-perm-status subtask-complete)) + (go (method-of-object this down)) + (go (method-of-object this idle)) + ) + ) + +;; definition of type sew-grate-plat +(deftype sew-grate-plat (process-drawable) + ((test-pos vector :inline) + (closed-x float) + (opened-x float) + ) + (:state-methods + closed + open + opened + close + ) + ) + +;; definition for method 3 of type sew-grate-plat +(defmethod inspect ((this sew-grate-plat)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Ttest-pos: #~%" (-> this test-pos)) + (format #t "~2Tclosed-x: ~f~%" (-> this closed-x)) + (format #t "~2Topened-x: ~f~%" (-> this opened-x)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-sew-grate-plat sew-grate-plat sew-grate-plat-lod0-jg sew-grate-plat-idle-ja + ((sew-grate-plat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + ) + +;; failed to figure out what this is: +(defstate closed (sew-grate-plat) + :virtual #t + :trans (behavior () + (let ((gp-0 (-> self test-pos)) + (a0-1 (target-pos 0)) + ) + (if (and (< 0.0 (- (-> a0-1 y) (-> gp-0 y))) (< (vector-vector-xz-distance a0-1 gp-0) 61440.0)) + (go-virtual open) + ) + ) + ) + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate open (sew-grate-plat) + :virtual #t + :enter (behavior () + (sound-play "sew-grate-slide") + ) + :trans (behavior () + (seek! (-> self root trans x) (-> self opened-x) (* 327680.0 (seconds-per-frame))) + (if (= (-> self root trans x) (-> self opened-x)) + (go-virtual opened) + ) + ) + :code sleep-code + :post transform-post + ) + +;; failed to figure out what this is: +(defstate opened (sew-grate-plat) + :virtual #t + :trans (behavior () + (let ((gp-0 (-> self test-pos)) + (a0-1 (target-pos 0)) + ) + (if (not (and (< 0.0 (- (-> a0-1 y) (-> gp-0 y))) (< (vector-vector-xz-distance a0-1 gp-0) 61440.0))) + (go-virtual close) + ) + ) + ) + :code sleep-code + :post ja-post + ) + +;; failed to figure out what this is: +(defstate close (sew-grate-plat) + :virtual #t + :enter (behavior () + (sound-play "sew-grate-slide" :pitch -0.25) + ) + :trans (behavior () + (seek! (-> self root trans x) (-> self closed-x) (* 327680.0 (seconds-per-frame))) + (if (= (-> self root trans x) (-> self closed-x)) + (go-virtual closed) + ) + ) + :code sleep-code + :post transform-post + ) + +;; definition for method 11 of type sew-grate-plat +;; INFO: Used lq/sq +(defmethod init-from-entity! ((this sew-grate-plat) (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) 0.0 0.0 0.0 40960.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-grate-plat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this test-pos quad) (-> this root trans quad)) + (+! (-> this test-pos x) -40960.0) + (set! (-> this closed-x) (-> this root trans x)) + (set! (-> this opened-x) (+ -32768.0 (-> this root trans x))) + (go (method-of-object this closed)) + ) + + + + 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 0000000000..5b28d055f5 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/sewer-obs_REF.gc @@ -0,0 +1,2296 @@ +;;-*-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)) + (nav-network-method-9 *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-part_REF.gc b/test/decompiler/reference/jak3/levels/sewer/sewer-part_REF.gc new file mode 100644 index 0000000000..88006ba2ee --- /dev/null +++ b/test/decompiler/reference/jak3/levels/sewer/sewer-part_REF.gc @@ -0,0 +1,2171 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-sewer-gas + :id 1470 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 4856 :fade-after (meters 200) :falloff-to (meters 300) :flags (is-3d))) + ) + +;; failed to figure out what this is: +(defpart 4856 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.15) + (:x (meters 10) (meters 50)) + (:y (meters 20) (meters 40)) + (:scale-x (meters 20) (meters 20)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0 128.0) + (:b 128.0 64.0) + (:a 0.0) + (:vel-x (meters -0.016666668) (meters 0.033333335)) + (:vel-y (meters 0) (meters 0.0033333334)) + (:scalevel-x (meters 0) (meters 0.033333335)) + (:scalevel-y (meters 0) (meters 0.033333335)) + (:fade-a 0.053333335) + (:timer (seconds 8)) + (:flags (sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 4)) + (:next-launcher 4857) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4857 + :init-specs ((:fade-a -0.053333335)) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-steamvent + :id 1471 + :flags (sp1 sp4) + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 4858 :fade-after (meters 200) :falloff-to (meters 300) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4858 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-curve) + (:num 0.15) + (:x (meters -1) (meters 2)) + (:y (meters -2) (meters 4)) + (:z (meters 2)) + (:scale-x (meters 4) (meters 8)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 255.0) + (:b 20.0) + (:a 0.0) + (:vel-y (meters 0.0033333334) (meters 0.0016666667)) + (:vel-z (meters 0.006666667) (meters 0.02)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters 0.000033333334)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata 0.0) + (:func 'live-func-curve) + (:launchrot-x (degrees -5) (degrees 10)) + (:launchrot-y (degrees -5) (degrees 10)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *range-color-sewer-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 8.0 :y 8.0 :z 8.0 :w 128.0) + (new 'static 'vector :x 64.0 :y 64.0 :z 64.0 :w 128.0) + (new 'static 'vector :x 64.0 :y 64.0 :z 64.0 :w 128.0) + (new 'static 'vector :x 64.0 :y 64.0 :z 64.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-sewer-gas* (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-sewer-gas-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 4.0 :z 5.0 :w 6.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-scale-sewer-gas-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 4.0 :z 5.0 :w 6.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! *r-curve-sewer-gas* (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 0.5 :z 0.3) + :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! *g-curve-sewer-gas* (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 :z 1.0 :w 1.0) + :one-over-x-deltas (new 'static 'vector :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *b-curve-sewer-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-sewer-gas* (new 'static 'curve2d-fast + :xs (new 'static 'vector :y -0.2 :z -0.7 :w -1.0) + :ys (new 'static 'vector :y 0.5 :z 1.0) + :one-over-x-deltas (new 'static 'vector :x 2.5 :y 1.0 :z -3.3333333 :w 1.0) + ) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *curve-sewer-gas-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 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-sewer-gas-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) + ) + ) + ) + +;; definition for symbol *part-sewer-steam-puff-curve-settings*, type particle-curve-settings +(define *part-sewer-steam-puff-curve-settings* (new 'static 'particle-curve-settings + :lifetime-base (seconds 3) + :lifetime-offset (seconds 2) + :flags (particle-curve-flags pcf0 pcf1) + ) + ) + +;; failed to figure out what this is: +(set! (-> *part-id-table* 4858 init-specs 21 initial-valuef) + (the-as float *part-sewer-steam-puff-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-sewer-steam-puff-curve-settings* color-start) *range-color-sewer-gas*) + +;; failed to figure out what this is: +(set! (-> *part-sewer-steam-puff-curve-settings* alpha-start) *range-alpha-sewer-gas*) + +;; failed to figure out what this is: +(set! (-> *part-sewer-steam-puff-curve-settings* scale-x-start) *range-scale-sewer-gas-x*) + +;; failed to figure out what this is: +(set! (-> *part-sewer-steam-puff-curve-settings* scale-y-start) *range-scale-sewer-gas-y*) + +;; failed to figure out what this is: +(set! (-> *part-sewer-steam-puff-curve-settings* r-scalar) *r-curve-sewer-gas*) + +;; failed to figure out what this is: +(set! (-> *part-sewer-steam-puff-curve-settings* g-scalar) *g-curve-sewer-gas*) + +;; failed to figure out what this is: +(set! (-> *part-sewer-steam-puff-curve-settings* b-scalar) *b-curve-sewer-gas*) + +;; failed to figure out what this is: +(set! (-> *part-sewer-steam-puff-curve-settings* a-scalar) *curve-alpha-sewer-gas*) + +;; failed to figure out what this is: +(set! (-> *part-sewer-steam-puff-curve-settings* scale-x-scalar) *curve-sewer-gas-x*) + +;; failed to figure out what this is: +(set! (-> *part-sewer-steam-puff-curve-settings* scale-y-scalar) *curve-sewer-gas-y*) + +;; failed to figure out what this is: +(defpartgroup group-sewer-hard-blowing-steam + :id 1472 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 4859 :flags (sp7))) + ) + +;; definition for symbol *steam-particle-list*, type (array int32) +(define *steam-particle-list* (new 'static 'boxed-array :type int32 #x405c00 #x400000)) + +;; definition for function birth-func-texture-group-steam +;; WARN: Return type mismatch int vs none. +(defun birth-func-texture-group-steam ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (particle-adgif-callback + (-> arg1 adgif) + (the-as + texture-id + (-> *steam-particle-list* + (mod (the-as int (rand-uint31-gen *random-generator*)) (-> *steam-particle-list* length)) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defpart 4859 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group-steam) + (:num 2.0) + (:scale-x (meters 0.3)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:omega (degrees 0.1575)) + (:vel-z (meters 0.2) (meters 0.033333335)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.16) + (:friction 0.92) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-13 left-multiply-quat)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.335)) + (:next-launcher 4860) + (:conerot-x (degrees 0) (degrees 10)) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4860 + :init-specs ((:fade-a -0.32)) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-green-steam + :id 1473 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 6) + :parts ((sp-item 4861 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4861 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group-steam) + (:num 2.0) + (:x (meters 0) (meters 2)) + (:scale-x (meters 1) (meters 2)) + (:scale-y :copy scale-x) + (:r 90.0 30.0) + (:g 130.0) + (:b 32.0) + (:a 0.0) + (:omega (degrees 0.1575)) + (:vel-y (meters 0.2) (meters 0.033333335)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.32) + (:friction 0.92 0.02) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-13 left-multiply-quat)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.167)) + (:next-launcher 4862) + (:conerot-x (degrees 0) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4862 + :init-specs ((:fade-a -0.16)) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-deadly-mist + :id 1474 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4863 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4863 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.5) + (:x (meters 0) (meters 2)) + (:scale-x (meters 1) (meters 2)) + (:scale-y :copy scale-x) + (:r 90.0 30.0) + (:g 130.0) + (:b 32.0) + (:a 0.0) + (:vel-y (meters 0.0033333334) (meters 0.016666668)) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.32) + (:accel-y (meters 0.00033333333)) + (:friction 0.98) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4864) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4864 + :init-specs ((:fade-a -0.018823529)) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-light-glow + :id 1475 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4865 :fade-after (meters 200) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4865 + :init-specs ((:texture (glow 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 255.0) + (:b 64.0) + (:a 12.0 4.0) + (:omega (degrees 4515.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-sewer-panel-light-glow + :id 1476 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4866 :fade-after (meters 200) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 4866 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 7) (meters 0.1)) + (:rot-x (degrees 4.5)) + (:rot-z (degrees -17)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 255.0) + (:b 255.0) + (:a 12.0 4.0) + (:omega (degrees 4515.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-sew-little-ridge-wake + :id 1477 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 4867 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4867 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 0.3 0.8) + (:scale-x (meters 0.5) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters 0.006666667) (meters 0.006666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.001)) + (:accel-z (meters 0.001)) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-13)) + (:conerot-x (degrees -5) (degrees 10)) + (:conerot-z (degrees -5) (degrees 10)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sew-fan-lasersight + :id 1478 + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 4868 :flags (sp6 sp7)) (sp-item 4869 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 4868 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5)) + (: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 64.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: +(defpart 4869 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:z (meters -1)) + (:scale-x (meters 1.5)) + (: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 64.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-sew-fan-lasersight-hostile + :id 1479 + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 4870 :flags (sp6 sp7)) (sp-item 4871 :flags (sp6 sp7))) + ) + +;; failed to figure out what this is: +(defpart 4870 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 1.5)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 112.0) + (:g 16.0) + (:b 10.0) + (:a 64.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: +(defpart 4871 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:z (meters -1)) + (:scale-x (meters 1.5)) + (:rot-x (degrees 11.25)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 112.0) + (:g 16.0) + (:b 10.0) + (:a 64.0 1.0) + (:omega (degrees 6761.25)) + (:timer (seconds 0.017)) + (:flags (glow)) + (:userdata 1228.8) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4872 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:z (meters -1)) + (:scale-x (meters 3) (meters 0.1)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0) + (:b 0.0) + (:a 30.0 2.0) + (: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 4873 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:z (meters -1)) + (:scale-x (meters 3) (meters 0.1)) + (:rot-x (degrees 11.25)) + (:scale-y :copy scale-x) + (:r 0.0) + (:g 64.0) + (:b 0.0) + (:a 30.0 2.0) + (: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-sew-wake-small + :id 1480 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 4874 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 4874 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.2) + (:scale-x (meters 1) (meters 1)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:scalevel-x (meters 0.008333334) (meters 0.0016666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.07111111 -0.07111111) + (:accel-z (meters 0.00033333333)) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sew-grate-wake + :id 1481 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 4875 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 4875 + :init-specs ((:texture (water-wake sewa-sprite)) + (:num 0.5) + (:x (meters 0)) + (:z (meters -6) 6 (meters 2.1)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-x (degrees 0) 1 (degrees 180)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:scalevel-x (meters 0.016666668) (meters 0.0016666667)) + (:scalevel-y (meters 0.006666667) (meters 0.0016666667)) + (:fade-a -0.10666667 -0.10666667) + (:accel-z (meters 0.00033333333)) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sew-yellow-grate-wake + :id 1482 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 4876 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 4876 + :init-specs ((:texture (water-wake sewa-sprite)) + (:num 1.0) + (:x (meters 0)) + (:z (meters -7.6) 4 (meters 3)) + (:scale-x (meters 0.5) (meters 0.3)) + (:rot-x (degrees 0) 1 (degrees 180)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 64.0) + (:scalevel-x (meters 0.016666668) (meters 0.0016666667)) + (:scalevel-y (meters 0.013333334) (meters 0.0016666667)) + (:fade-a -0.21333334 -0.21333334) + (:accel-x (meters 0.00033333333)) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 launch-along-z)) + (:rotate-y (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-falls-froth + :id 1483 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 4877 :flags (is-3d sp7)) + (sp-item 4878 :fade-after (meters 60) :falloff-to (meters 100) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 4877 + :init-specs ((:texture (water-froth sewa-sprite)) + (:num 0.02 0.02) + (:x (meters -4) (meters 8)) + (:z (meters -10)) + (:scale-x (meters 5) (meters 20)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 110.0) + (:b 60.0 20.0) + (:a 32.0 32.0) + (:vel-z (meters 0.02) (meters 0.006666667)) + (:rotvel-y (degrees -0.010000001) (degrees 0.020000001)) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 launch-along-z left-multiply-quat)) + (:next-time (seconds 5)) + (:next-launcher 4879) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4879 + :init-specs ((:fade-a -0.042666666)) + ) + +;; failed to figure out what this is: +(defpart 4878 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters -5) (meters 10)) + (:y (meters 0)) + (:z (meters -0.3) (meters 0.6)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters -0.01)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.256) + (:accel-y (meters 0.00033333333)) + (:accel-z (meters 0.00016666666)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-whirlpool-center + :id 1484 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 4880 :fade-after (meters 60) :falloff-to (meters 100) :flags (sp7)) + (sp-item 4881 :fade-after (meters 60) :falloff-to (meters 100) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 4881 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 0.5) + (:x (meters 0) (meters 1)) + (:y (meters -0.5)) + (:scale-x (meters 0.2) (meters 0.2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 16.0) + (:vel-y (meters 0.016666668)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335) + (:accel-y (meters -0.00033333333)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 2)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 4880 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.5) + (:x (meters 0) (meters 2)) + (:y (meters 1)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 0.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.32) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.95) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 0.167)) + (:next-launcher 4882) + (:conerot-x (degrees 0) (degrees 90)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4882 + :init-specs ((:fade-a -0.018823529)) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-falls-tilt + :id 1485 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 4883 :fade-after (meters 60) :falloff-to (meters 100) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4883 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 6.0) + (:x (meters -9) (meters 18)) + (:y (meters 0.4)) + (:z (meters -0.3) (meters 0.6)) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters -0.01)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.256) + (:accel-x (meters -0.00066666666)) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-waterfall-base + :id 1486 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 4884 :fade-after (meters 60) :falloff-to (meters 100) :flags (is-3d sp7)) + (sp-item 4885 :fade-after (meters 60) :falloff-to (meters 100) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 4884 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5) + (:z (meters 1)) + (:scale-x (meters 3) (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 16.0) + (:scalevel-x (meters 0.006666667) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:accel-z (meters 0.00033333333)) + (: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 0 0 #x406400 #x408200)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4885 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters -1.5) (meters 3)) + (:y (meters 0)) + (:z (meters -0.3) (meters 0.6)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters -0.01)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.256) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-waterfall-base-big + :id 1487 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4886 :fade-after (meters 100) :falloff-to (meters 400) :flags (sp7)) + (sp-item 4887 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 4886 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.3 0.3) + (:x (meters -10) (meters 15)) + (:y (meters -0.4)) + (:z (meters 0)) + (:scale-x (meters 1) (meters 4)) + (: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-z (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.021333333 0.021333333) + (:accel-y (meters 0.000033333334) (meters 0.000033333334)) + (:friction 0.95) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 2.5)) + (:next-launcher 4888) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4888 + :init-specs ((:fade-a -0.042666666 -0.042666666)) + ) + +;; failed to figure out what this is: +(defpart 4889 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1) + (:z (meters 1)) + (:scale-x (meters 12) (meters 0.5)) + (:rot-y (degrees 0) 1 (degrees 180)) + (:scale-y (meters 3) (meters 0.5)) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:scalevel-x (meters 0.013333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:accel-z (meters 0.00033333333)) + (:friction 0.9) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406400 #x408200)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4890 + :init-specs ((:texture (laser-hit2 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1) + (:z (meters 1)) + (:scale-x (meters 3) (meters 0.5)) + (:rot-y (degrees 90) 1 (degrees 180)) + (:scale-y (meters 12) (meters 0.5)) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:scalevel-x (meters 0.013333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:accel-z (meters 0.00033333333)) + (:friction 0.9) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406400 #x408200)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4887 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters -6) (meters 12)) + (:y (meters 0)) + (:z (meters -0.3) (meters 0.6)) + (:scale-x (meters 1) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters -0.01)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.256) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-waterfall-base-tube + :id 1488 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4891 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4891 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters -6) (meters 12)) + (:y (meters 0)) + (:z (meters -0.3) (meters 0.6)) + (:scale-x (meters 1) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 50.0 50.0) + (:b 40.0) + (:a 32.0 32.0) + (:vel-y (meters -0.01)) + (:vel-z (meters 0.0033333334) (meters 0.02)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.256) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sew-wake-medium + :id 1489 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 4892 :flags (sp7)) (sp-item 4893 :flags (sp7)) (sp-item 4894 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 4892 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 5.0) + (:x (meters -3.5)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 100.0 28.0) + (:vel-y (meters 0.0033333334) (meters 0.026666667)) + (:scalevel-x (meters 0.01)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85333335) + (:accel-y (meters -0.001)) + (:accel-z (meters 0.0016666667)) + (:friction 0.96) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-drop-group-center) + (:conerot-z (degrees -5) (degrees 10)) + (:rotate-y (degrees -10) (degrees -90)) + ) + ) + +;; failed to figure out what this is: +(defpart 4893 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 5.0) + (:x (meters -3.5)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 100.0 28.0) + (:vel-y (meters 0.0033333334) (meters 0.026666667)) + (:scalevel-x (meters 0.01)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85333335) + (:accel-y (meters -0.001)) + (:accel-z (meters -0.0016666667)) + (:friction 0.96) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-drop-group-center) + (:conerot-z (degrees -5) (degrees 10)) + (:rotate-y (degrees 180) (degrees 100.00001)) + ) + ) + +;; failed to figure out what this is: +(defpart 4894 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.5) + (:scale-x (meters 8) (meters 1)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-z (meters 0.02)) + (:scalevel-x (meters -0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.07111111) + (:accel-x (meters -0.00013333333)) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sew-wake-large + :id 1490 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 4895 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 4895 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1) + (:scale-x (meters 3.3)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 64.0) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667) + (:accel-x (meters 0.00066666666)) + (:friction 0.98) + (: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 0 0 #x406500 #x408200)) + (:next-time (seconds 0.335)) + (:next-launcher 4896) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 4896 + :init-specs ((:scalevel-x (meters -0.006666667)) (:scalevel-y :copy scalevel-x)) + ) + +;; failed to figure out what this is: +(defpartgroup group-sew-wake-tiny + :id 1491 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 4897 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 4897 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.2) + (:scale-x (meters 2)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 64.0) + (:scalevel-x (meters -0.0026666666)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667) + (:accel-x (meters 0.00066666666)) + (: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 5 0 0 #x406500 #x408200)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-deep-mist + :id 1492 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 200) + :parts ((sp-item 4898 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4898 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0) (meters 10)) + (:scale-x (meters 10) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 20.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-x (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.008 0.008) + (:accel-y (meters 0.0001) (meters 0.000033333334)) + (:friction 0.99) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 6.667)) + (:next-launcher 4899) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 4899 + :init-specs ((:fade-a -0.032 -0.032)) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-waterfall-base-huge + :id 1493 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 30) + :parts ((sp-item 4900 :fade-after (meters 50) :falloff-to (meters 100) :flags (sp7)) + (sp-item 4901 :fade-after (meters 50) :falloff-to (meters 100) :flags (sp7)) + (sp-item 4902 :fade-after (meters 50) :falloff-to (meters 100) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 4900 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.3 0.3) + (:x (meters 0)) + (:y (meters -0.4)) + (:z (meters -40) (meters 80)) + (:scale-x (meters 1) (meters 4)) + (: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-x (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.013333334) (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.021333333 0.021333333) + (:accel-y (meters 0.000033333334) (meters 0.000033333334)) + (:friction 0.95) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 2.5)) + (:next-launcher 4903) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4903 + :init-specs ((:fade-a -0.042666666 -0.042666666)) + ) + +;; failed to figure out what this is: +(defpart 4901 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:x (meters -0.3) (meters 0.6)) + (:y (meters 0)) + (:z (meters -40) (meters 40)) + (:scale-x (meters 1) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters -0.01)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.256) + (:accel-x (meters 0.00033333333) (meters 0.00066666666)) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4902 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:x (meters -0.3) (meters 0.6)) + (:y (meters 0)) + (:z (meters 0) (meters 40)) + (:scale-x (meters 1) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters -0.01)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.256) + (:accel-x (meters 0.00033333333) (meters 0.00066666666)) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-waterfall-base-top + :id 1494 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 4904 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + (sp-item 4905 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 4904 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.3 0.3) + (:x (meters 0)) + (:y (meters -0.4)) + (:z (meters -30) (meters 60)) + (:scale-x (meters 1) (meters 4)) + (: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-x (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.013333334) (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.021333333 0.021333333) + (:accel-y (meters 0.000033333334) (meters 0.000033333334)) + (:friction 0.95) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 2.5)) + (:next-launcher 4903) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4905 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 20.0) + (:x (meters -0.3) (meters 0.6)) + (:y (meters 0)) + (:z (meters -30) (meters 60)) + (:scale-x (meters 1) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:vel-y (meters -0.01)) + (:scalevel-x (meters 0.0033333334) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.256) + (:accel-x (meters 0.00033333333) (meters 0.00066666666)) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sew-4-waterfalls + :id 1495 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4906 :fade-after (meters 60) :falloff-to (meters 100) :flags (sp7)) + (sp-item 4907 :fade-after (meters 60) :falloff-to (meters 100) :flags (is-3d sp7)) + (sp-item 4908 :fade-after (meters 60) :falloff-to (meters 100) :flags (sp7)) + (sp-item 4909 :fade-after (meters 60) :falloff-to (meters 100) :flags (is-3d sp7)) + (sp-item 4910 :fade-after (meters 60) :falloff-to (meters 100) :flags (sp7)) + (sp-item 4911 :fade-after (meters 60) :falloff-to (meters 100) :flags (is-3d sp7)) + (sp-item 4912 :fade-after (meters 60) :falloff-to (meters 100) :flags (sp7)) + (sp-item 4913 :fade-after (meters 60) :falloff-to (meters 100) :flags (is-3d sp7)) + (sp-item 4914 :fade-after (meters 60) :falloff-to (meters 100) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 4906 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.5 0.5) + (:x (meters 0)) + (:y (meters -0.4)) + (:z (meters -20) (meters 35)) + (:scale-x (meters 1) (meters 4)) + (: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-x (meters 0) (meters 0.06666667)) + (:scalevel-x (meters 0.006666667) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.021333333 0.021333333) + (:accel-y (meters 0.000033333334) (meters 0.000033333334)) + (:friction 0.95) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 2.5)) + (:next-launcher 4915) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4915 + :init-specs ((:fade-a -0.042666666 -0.042666666)) + ) + +;; failed to figure out what this is: +(defpart 4907 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5) + (:x (meters 1)) + (:z (meters 13)) + (:scale-x (meters 6) (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 16.0) + (:scalevel-x (meters 0.006666667) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:accel-x (meters 0.00066666666)) + (: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 0 0 #x406500 #x408200)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4908 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters -0.5) (meters 1)) + (:y (meters 0)) + (:z (meters 10) (meters 6)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:vel-y (meters -0.013333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.4 -0.4) + (:accel-x (meters 0.00033333333) (meters 0.00033333333)) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4909 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5) + (:x (meters 1)) + (:z (meters 4.6)) + (:scale-x (meters 6) (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 16.0) + (:scalevel-x (meters 0.006666667) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:accel-x (meters 0.00066666666)) + (: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 0 0 #x406500 #x408200)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4910 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters -0.5) (meters 1)) + (:y (meters 0)) + (:z (meters 1.4) (meters 6)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:vel-y (meters -0.013333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.4 -0.4) + (:accel-x (meters 0.00033333333) (meters 0.00033333333)) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4911 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5) + (:x (meters 1)) + (:z (meters -3)) + (:scale-x (meters 6) (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 16.0) + (:scalevel-x (meters 0.006666667) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:accel-x (meters 0.00066666666)) + (: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 0 0 #x406500 #x408200)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4912 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters -0.5) (meters 1)) + (:y (meters 0)) + (:z (meters -6.5) (meters 6)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:vel-y (meters -0.013333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.4 -0.4) + (:accel-x (meters 0.00033333333) (meters 0.00033333333)) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4913 + :init-specs ((:texture (water-drops level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5) + (:x (meters 1)) + (:z (meters -11.5)) + (:scale-x (meters 6) (meters 0.5)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 16.0) + (:scalevel-x (meters 0.006666667) (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:accel-x (meters 0.00066666666)) + (: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 0 0 #x406500 #x408200)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4914 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 4.0) + (:x (meters -0.5) (meters 1)) + (:y (meters 0)) + (:z (meters -15) (meters 6)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:vel-y (meters -0.013333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.4 -0.4) + (:accel-x (meters 0.00033333333) (meters 0.00033333333)) + (:accel-y (meters 0.00033333333)) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sew-moving-step-a-wake + :id 1496 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 4916 :flags (sp7)) (sp-item 4917 :flags (sp7)) (sp-item 4918 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 4916 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 2.0) + (:x (meters -3.5)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 100.0 28.0) + (:vel-y (meters 0.0033333334) (meters 0.026666667)) + (:scalevel-x (meters 0.01)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85333335) + (:accel-y (meters -0.001)) + (:accel-z (meters 0.0016666667)) + (:friction 0.96) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-drop-group-center) + (:conerot-z (degrees -5) (degrees 10)) + (:rotate-y (degrees 80) (degrees -90)) + ) + ) + +;; failed to figure out what this is: +(defpart 4917 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 2.0) + (:x (meters -3.5)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 100.0 28.0) + (:vel-y (meters 0.0033333334) (meters 0.026666667)) + (:scalevel-x (meters 0.01)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.85333335) + (:accel-y (meters -0.001)) + (:accel-z (meters -0.0016666667)) + (:friction 0.96) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-drop-group-center) + (:conerot-z (degrees -5) (degrees 10)) + (:rotate-y (degrees 260) (degrees 100.00001)) + ) + ) + +;; failed to figure out what this is: +(defpart 4918 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.1) + (:scale-x (meters 6.5) (meters 0.5)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 64.0) + (:scalevel-x (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667) + (:accel-x (meters 0.00066666666)) + (:friction 0.98) + (: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 0 0 #x406500 #x408200)) + (:next-time (seconds 0.335)) + (:next-launcher 4919) + (:rotate-y (degrees 0) (degrees 360)) + ) + ) + +;; failed to figure out what this is: +(defpart 4919 + :init-specs ((:scalevel-x (meters -0.006666667)) (:scalevel-y :copy scalevel-x)) + ) + +;; failed to figure out what this is: +(defpartgroup group-sew-moving-step-b-wake + :id 1497 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 5) + :parts ((sp-item 4920 :fade-after (meters 80) :falloff-to (meters 100) :flags (sp7)) + (sp-item 4921 :fade-after (meters 80) :falloff-to (meters 100) :flags (is-3d sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 4920 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 3.0) + (:x (meters -4.2) (meters 8.4)) + (:z (meters 1.2)) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 100.0 28.0) + (:vel-y (meters 0.0033333334) (meters 0.013333334)) + (:scalevel-x (meters 0.01)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.42666668) + (:accel-y (meters -0.0016666667)) + (:accel-z (meters 0.001)) + (:friction 0.96) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-drop-group-center) + (:conerot-z (degrees -5) (degrees 10)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4921 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.4) + (:y (meters 0.8)) + (:z (meters 1.5)) + (:scale-x (meters 9) (meters 1)) + (:rot-y (degrees 0)) + (:scale-y (meters 1) (meters 1)) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.0 32.0) + (:scalevel-y (meters 0.013333334)) + (:fade-a -0.21333334) + (:accel-z (meters 0.001)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406500 #x408200)) + (:rotate-x (degrees 55)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sew-grate-bubbles + :id 1498 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4922 :fade-after (meters 80) :falloff-to (meters 100) :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 4922 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.2) + (:z (meters -1)) + (:scale-x (meters 4) (meters 0.5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 16.0) + (:vel-z (meters 0.033333335)) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.017777778 -0.017777778) + (:accel-z (meters 0.00066666666)) + (:friction 0.9) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406500 #x408200)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-slide-froth + :id 1499 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 4923 :fade-after (meters 80) :falloff-to (meters 100) :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 4923 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 0.5) + (:x (meters -2) (meters 4)) + (:z (meters -1)) + (:scale-x (meters 4) (meters 0.5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 120.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-z (meters 0.033333335)) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.32) + (:accel-z (meters 0.00066666666)) + (:friction 0.9 0.03) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #x406500 #x58300600)) + (:next-time (seconds 0.335)) + (:next-launcher 4924) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4924 + :init-specs ((:fade-a -0.04)) + ) + +;; failed to figure out what this is: +(defpartgroup group-flyingsaw-sparks + :id 1500 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 4925 :flags (sp7)) (sp-item 4926 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4925 + :init-specs ((:texture (hitspark level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.1) (meters 0.5)) + (:rot-z (degrees 0) (degrees 360)) + (: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)) + ) + ) + +;; failed to figure out what this is: +(defpart 4926 + :init-specs ((:texture (motion-blur-part level-default-sprite)) + (:num 0.5 0.5) + (:scale-x (meters 0.05) (meters 0.05)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 255.0) + (:omega (degrees 0.0225)) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:fade-g -0.64) + (:fade-b -2.56) + (:fade-a -1.28 -1.28) + (:accel-y (meters -0.0013333333)) + (:friction 0.9) + (:timer (seconds 0.335)) + (: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: +(defpartgroup group-sew-fan-gust + :id 1501 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 4927 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4927 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 6.0) + (:y (meters 1) (meters 0.5)) + (: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 8.0 8.0) + (:vel-z (meters 0.1)) + (:scalevel-x (meters 0.013333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.064) + (:timer (seconds 0.835)) + (:flags (sp-cpuinfo-flag-2)) + (:conerot-x (degrees 0) (degrees 20)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-rising-bubbles + :id 1502 + :flags (sp0) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 4928 :fade-after (meters 100) :falloff-to (meters 200) :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 4928 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 0.01 0.5) + (:x (meters 0) (meters 2)) + (:y (meters 0)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 0.0) + (:accel-y (meters 0.00083333335)) + (:timer (seconds 3.667)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'spt-func-birth-on-bubble-pop) + (:next-time (seconds 0.017)) + (:next-launcher 4929) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 4929 + :init-specs ((:scale-x (meters 0.2) (meters 0.2)) + (:scale-y :copy scale-x) + (:fade-a -0.04 0.16) + (:accel-x (meters -0.00033333333) 1 (meters 0.00066666666)) + (:accel-z (meters -0.00033333333) 1 (meters 0.00066666666)) + (:friction 0.9) + (:next-time (seconds 0.1) (seconds 0.03)) + (:next-launcher 4929) + ) + ) + +;; definition for function spt-func-birth-on-bubble-pop +;; INFO: Used lq/sq +;; WARN: Return type mismatch (pointer process) vs none. +(defun spt-func-birth-on-bubble-pop ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (when (zero? (-> arg1 timer)) + (cond + ((logtest? (-> *part-group-id-table* 1503 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* 1503)) + ) + (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* 1503)) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-rising-bubbles-pop + :id 1503 + :duration (seconds 1.5) + :linger-duration (seconds 0) + :flags (sp0) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 4930 :fade-after (meters 100) :falloff-to (meters 200) :flags (is-3d sp7) :period (seconds 20) :length (seconds 0.035)) + ) + ) + +;; failed to figure out what this is: +(defpart 4930 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 1.0) + (:scale-x (meters 0.3) (meters 0.3)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 32.0) + (:scalevel-x (meters 0.0033333334)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-sewer-abyss-waterfall-mist + :id 1504 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 4931 :fade-after (meters 200) :falloff-to (meters 400) :flags (sp7)) + (sp-item 4932 :fade-after (meters 200) :falloff-to (meters 400) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 4932 + :init-specs ((:texture (ceiling-dust sewa-sprite)) + (:num 0.04 0.02) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0)) + (:scale-x (meters 4) (meters 2)) + (:scale-y :copy scale-x) + (:r 180.0 70.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-z (meters 0.046666667)) + (:scalevel-x (meters 0.00033333333) (meters 0.0016666667)) + (:scalevel-y (meters 0.0033333334) (meters 0.0033333334)) + (:fade-a 0.021333333 0.021333333) + (:accel-y (meters -0.0005)) + (:friction 0.99) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 2.5)) + (:next-launcher 4933) + (:conerot-y (degrees -20) (degrees 40)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4933 + :init-specs ((:fade-a -0.042666666 -0.042666666)) + ) + +;; failed to figure out what this is: +(defpart 4931 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 0.2 0.2) + (:x (meters -5) (meters 10)) + (:y (meters 1)) + (:z (meters -10)) + (:scale-x (meters 6) (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 0.0) + (:vel-z (meters 0.046666667)) + (:scalevel-x (meters 0.006666667) (meters 0.026666667)) + (:rotvel-z (degrees -0.13333334) (degrees 0.26666668)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.064 0.064) + (:accel-y (meters -0.00006666667) (meters -0.00006666667)) + (:friction 0.99) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:next-time (seconds 0.835)) + (:next-launcher 4934) + (:conerot-y (degrees -30) (degrees 60)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 4934 + :init-specs ((:fade-a -0.032 -0.032)) + ) + + + + 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 0000000000..3d642fe6a8 --- /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 0000000000..8ec5192811 --- /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 0000000000..fed3b95445 --- /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 0000000000..adc798d79c --- /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 0000000000..e03637d02a --- /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 0000000000..7c3e323faa --- /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 0000000000..df1fd9bc4c --- /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 0000000000..94ba50fc65 --- /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 0000000000..ad540ffd15 --- /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 0000000000..0dee34217a --- /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 0000000000..bca2484f81 --- /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 0000000000..d1232ee639 --- /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 0000000000..dcc697f612 --- /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 0000000000..18ac3970e3 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/temple/temple-obs_REF.gc @@ -0,0 +1,2811 @@ +;;-*-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)) + (nav-network-method-9 *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 0000000000..2f42f99862 --- /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 0000000000..fc8be967e6 --- /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 0000000000..6ba91c8d80 --- /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 0000000000..e01003943b --- /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 0000000000..e627473074 --- /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 0000000000..8cc4f23c8c --- /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 0000000000..61096a10bc --- /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 0000000000..0a0bdeb6d0 --- /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 0000000000..011aeb39ab --- /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 0000000000..db4d849029 --- /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 0000000000..8c23f7c108 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/tower/tower-obs_REF.gc @@ -0,0 +1,1168 @@ +;;-*-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)) + (nav-network-method-9 *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 'bounding-box)) + (s4-0 (the-as (array collide-shape) (new 'stack 'boxed-array collide-shape 8))) + ) + (set! (-> s3-0 min quad) (-> arg0 quad)) + (set! (-> s3-0 min 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 0000000000..4fe1b4e235 --- /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 0000000000..baccb7d9e9 --- /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 0000000000..495dd04411 --- /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 0000000000..8969607d68 --- /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 0000000000..aa82bba473 --- /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 0000000000..c90129d9c5 --- /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 0000000000..7b39e48e6a --- /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 0000000000..b3879b96f8 --- /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 0000000000..f60e60693a --- /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 0000000000..8bdd5a1413 --- /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 0000000000..3ee8ed9489 --- /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 0000000000..703922746a --- /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 0000000000..1f4c30d837 --- /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/chase/kanga-lizard_REF.gc b/test/decompiler/reference/jak3/levels/wascity/chase/kanga-lizard_REF.gc new file mode 100644 index 0000000000..3aa58e2aa7 --- /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-h_REF.gc b/test/decompiler/reference/jak3/levels/wascity/ctymark-obs-h_REF.gc new file mode 100644 index 0000000000..3d064573d4 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/ctymark-obs-h_REF.gc @@ -0,0 +1,302 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type market-object +(deftype market-object (crate) + ((sound-explode sound-spec) + (part-explode sparticle-launch-group) + (explode-matrix matrix :inline) + ) + ) + +;; definition for method 3 of type market-object +(defmethod inspect ((this market-object)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type crate inspect))) + (t9-0 this) + ) + (format #t "~2Tsound-explode: ~A~%" (-> this sound-explode)) + (format #t "~2Tpart-explode: ~A~%" (-> this part-explode)) + (format #t "~2Texplode-matrix: #~%" (-> this explode-matrix)) + (label cfg-4) + this + ) + +;; definition for method 38 of type market-object +;; WARN: Return type mismatch int vs none. +(defmethod init-collision! ((this market-object)) + (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 crate)) + (set! (-> v1-2 prim-core action) (collide-action solid)) + (set! (-> v1-2 transform-index) 3) + (set-vector! (-> v1-2 local-sphere) 0.0 7372.8 0.0 8192.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 penetrated-by) (penetrate + generic-attack + lunge + flop + punch + spin + roll + uppercut + bonk + tube + flut-attack + board + mech-punch + dark-punch + dark-smack + flut + knocked + ) + ) + (set! (-> this root) (the-as collide-shape-moving s5-0)) + ) + 0 + (none) + ) + +;; definition for method 37 of type market-object +;; INFO: Used lq/sq +;; WARN: Return type mismatch market-object vs none. +(defmethod init-skel! ((this market-object)) + (set! (-> this draw light-index) (the-as uint 10)) + (set! (-> this look) (-> this type symbol)) + (when (= (-> this fact pickup-type) (pickup-type eco-pill-random)) + (set! (-> this fact pickup-type) (pickup-type none)) + 0 + ) + (set! (-> this base quad) (-> this root trans quad)) + (crate-post) + (nav-mesh-connect-from-ent this) + (none) + ) + +;; failed to figure out what this is: +(defstate idle (market-object) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((a1-1 (the-as object (-> block param 1))) + (a0-2 proc) + ) + (-> (the-as attack-info a1-1) id) + (let ((gp-0 (-> (the-as attack-info a1-1) count))) + (cond + ((and (logtest? (attack-mask penetrate-using) (-> (the-as attack-info a1-1) mask)) + (logtest? (penetrate jak-dark-nuke) (-> (the-as attack-info a1-1) penetrate-using)) + ) + (go-virtual die #t 0) + ) + (else + (when a0-2 + (let ((v1-9 (find-offending-process-focusable a0-2 (the-as attack-info a1-1)))) + (when v1-9 + (forward-up-nopitch->inv-matrix + (-> self explode-matrix) + (vector-! (new 'stack-no-clear 'vector) (-> v1-9 root trans) (-> self root trans)) + *up-vector* + ) + (set! (-> self explode-matrix trans quad) (-> self root trans quad)) + ) + ) + ) + (send-event proc 'get-attack-count 1) + (process-contact-action proc) + (set! (-> self target) (process->handle proc)) + (go-virtual die #f (the-as int gp-0)) + ) + ) + ) + ) + ) + (else + (crate-standard-event-handler proc argc message block) + ) + ) + ) + ) + +;; failed to figure out what this is: +(defstate die (market-object) + :virtual #t + :enter (behavior ((arg0 symbol) (arg1 int)) + (when (not arg0) + (when (and (logtest? (-> self draw status) (draw-control-status on-screen)) + (< (vector-vector-xz-distance (-> self root trans) (camera-pos)) 409600.0) + ) + (if (logtest? (-> self part-explode flags) (sp-group-flag sp13)) + (part-tracker-spawn + part-tracker-subsampler + :to self + :group (-> self part-explode) + :mat-joint (-> self explode-matrix) + ) + (part-tracker-spawn part-tracker :to self :group (-> self part-explode) :mat-joint (-> self explode-matrix)) + ) + ) + (if (nonzero? (-> self sound-explode)) + (sound-play-by-spec (-> self sound-explode) (new-sound-id) (the-as vector #t)) + ) + ) + (let* ((t9-10 find-parent-method) + (a0-9 market-object) + (a1-9 30) + (t9-11 (-> (the-as (state symbol int market-object) (t9-10 a0-9 a1-9)) enter)) + ) + (if t9-11 + (t9-11 (the-as symbol a0-9) a1-9) + ) + ) + ) + ) + +;; definition of type market-basket-a +(deftype market-basket-a (market-object) + () + ) + +;; definition for method 3 of type market-basket-a +(defmethod inspect ((this market-basket-a)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type market-object inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type market-basket-b +(deftype market-basket-b (market-object) + () + ) + +;; definition for method 3 of type market-basket-b +(defmethod inspect ((this market-basket-b)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type market-object inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type market-crate +(deftype market-crate (market-object) + () + ) + +;; definition for method 3 of type market-crate +(defmethod inspect ((this market-crate)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type market-object inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type market-sack-a +(deftype market-sack-a (market-object) + () + ) + +;; definition for method 3 of type market-sack-a +(defmethod inspect ((this market-sack-a)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type market-object inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type market-sack-b +(deftype market-sack-b (market-object) + () + ) + +;; definition for method 3 of type market-sack-b +(defmethod inspect ((this market-sack-b)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type market-object inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type fruit-stand +(deftype fruit-stand (process-focusable) + ((incoming-attack-id uint32) + (hack-counter uint32) + (count-sparts uint32) + (first-sparts uint32) + (num-sparts uint32) + (sparts-index uint32 4) + (sparts-pos vector 4 :inline) + (parts-alive? symbol) + ) + (:state-methods + idle + ) + (:methods + (fruit-stand-method-29 (_type_) none) + (fruit-stand-method-30 (_type_) none) + ) + ) + +;; definition for method 3 of type fruit-stand +(defmethod inspect ((this fruit-stand)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tincoming-attack-id: ~D~%" (-> this incoming-attack-id)) + (format #t "~2Thack-counter: ~D~%" (-> this hack-counter)) + (format #t "~2Tcount-sparts: ~D~%" (-> this count-sparts)) + (format #t "~2Tfirst-sparts: ~D~%" (-> this first-sparts)) + (format #t "~2Tnum-sparts: ~D~%" (-> this num-sparts)) + (format #t "~2Tsparts-index[4] @ #x~X~%" (-> this sparts-index)) + (format #t "~2Tsparts-pos[4] @ #x~X~%" (-> this sparts-pos)) + (format #t "~2Tparts-alive?: ~A~%" (-> this parts-alive?)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +0 + + + + diff --git a/test/decompiler/reference/jak3/levels/wascity/ctymark-obs_REF.gc b/test/decompiler/reference/jak3/levels/wascity/ctymark-obs_REF.gc new file mode 100644 index 0000000000..385baa5a14 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/ctymark-obs_REF.gc @@ -0,0 +1,1621 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-mcrate-explode + :id 248 + :duration (seconds 3.335) + :flags (sp0 sp6) + :bounds (static-bspherem 0 0 0 12) + :rotate ((degrees 0) (degrees 90) (degrees 0)) + :parts ((sp-item 1117 :fade-after (meters 40) :falloff-to (meters 80) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.035)) + (sp-item 1118 :fade-after (meters 100) :falloff-to (meters 120) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1119 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp7) :period (seconds 4) :length (seconds 0.135)) + (sp-item 1120 :fade-after (meters 60) :falloff-to (meters 90) :flags (sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1121 :fade-after (meters 50) :period (seconds 4) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 1119 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 16.0 3.0) + (:y (meters 0) (meters 1)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 2) (meters 2)) + (:r 128.0) + (:g 64.0 32.0) + (:b 0.0 32.0) + (:a 16.0 8.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:scalevel-x (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters 0) (meters 0.0033333334)) + (:fade-a -0.02 -0.02) + (:accel-y (meters -0.00033333333) (meters -0.00083333335)) + (:friction 0.82 0.07) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1120 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 8.0 3.0) + (:y (meters 0) (meters 1)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 2) (meters 2)) + (:r 0.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 16.0 8.0) + (:vel-y (meters 0.05) (meters 0.033333335)) + (:scalevel-x (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters 0) (meters 0.0033333334)) + (:fade-a -0.02 -0.02) + (:accel-y (meters -0.00033333333) (meters -0.00083333335)) + (:friction 0.82 0.07) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1121 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 1)) + (:scale-x (meters 4)) + (:rot-x (degrees 0.675)) + (:scale-y (meters 6)) + (:r 255.0) + (:g 196.0) + (:b 128.0) + (:a 64.0) + (:omega (degrees 1136.25)) + (:scalevel-x (meters 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -2.56) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1024.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1118 + :init-specs ((:texture (new 'static 'texture-id :index #x15 :page #xc1)) + (:num 12.0 6.0) + (:y (meters 0) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 0.1) (meters 0.5)) + (: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.5)) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.083333336) (meters 0.05)) + (:scalevel-x (meters -0.00022222222)) + (:rotvel-x (degrees -4.8) (degrees 9.6)) + (:rotvel-y (degrees -4.8) (degrees 9.6)) + (:rotvel-z (degrees -4.8) (degrees 9.6)) + (:scalevel-y (meters -0.00022222222)) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.92 0.07) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-market-piece-ground) + (:next-time (seconds 4)) + (:next-launcher 1122) + (:conerot-x (degrees 0) (degrees 110)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1117 + :init-specs ((:texture (new 'static 'texture-id :index #x15 :page #xc1)) + (:num 6.0 3.0) + (:y (meters 0) (meters 2)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 0.3) (meters 2)) + (:rot-x (degrees 0) (degrees 3600)) + (:rot-y (degrees 0) (degrees 3600)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.3) (meters 0.6)) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.1) (meters 0.06666667)) + (:rotvel-x (degrees -4.8) (degrees 9.6)) + (:rotvel-y (degrees -4.8) (degrees 9.6)) + (:rotvel-z (degrees -4.8) (degrees 9.6)) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.92 0.07) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-market-piece-ground) + (:next-time (seconds 0.4)) + (:next-launcher 1122) + (:conerot-x (degrees 0) (degrees 110)) + (:conerot-y (degrees 15) (degrees 150)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mbasket-a-explode + :id 249 + :duration (seconds 3.335) + :flags (sp0 sp6) + :bounds (static-bspherem 0 0 0 12) + :rotate ((degrees 0) (degrees 90) (degrees 0)) + :parts ((sp-item 1123 :fade-after (meters 40) :falloff-to (meters 80) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.035)) + (sp-item 1124 :fade-after (meters 100) :falloff-to (meters 120) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1125 :fade-after (meters 40) :falloff-to (meters 60) :flags (sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1126 :fade-after (meters 100) :falloff-to (meters 120) :flags (sp7) :period (seconds 4) :length (seconds 0.1)) + (sp-item 1127 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp7) :period (seconds 4) :length (seconds 0.135)) + (sp-item 1128 :fade-after (meters 60) :falloff-to (meters 90) :flags (sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1129 :fade-after (meters 50) :period (seconds 4) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 1126 + :init-specs ((:texture (specs level-default-sprite)) + (:num 32.0) + (:y (meters 0) (meters 3)) + (:z (meters -1.5) (meters 3)) + (:scale-x (meters 2) (meters 0.5)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y :copy scale-x) + (:r 64.0 64.0) + (:g :copy r) + (:b 128.0 64.0) + (:a 92.0 32.0) + (:vel-y (meters 0.033333335) (meters 0.06666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:fade-a -0.16 -0.16) + (:accel-y (meters -0.0016666667) (meters -0.00083333335)) + (:friction 0.95 0.03) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1125 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 32.0) + (:y (meters 0.5) (meters 1)) + (:scale-x (meters 0.1) (meters 0.05)) + (:rot-x 4) + (:scale-y :copy scale-x) + (:r 32.0 32.0) + (:g :copy r) + (:b 64.0 32.0) + (:a 128.0) + (:omega (degrees 0.01575) (degrees 0.009)) + (:vel-y (meters 0.033333335) (meters 0.083333336)) + (:accel-y (meters -0.003) (meters -0.00066666666)) + (:friction 0.96 0.02) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 set-conerot)) + (:userdata 30720.0) + (:func 'check-water-level-drop-motion) + (:next-time (seconds 0) (seconds 0.58)) + (:next-launcher 41) + (:conerot-x (degrees 0) (degrees 85)) + (:conerot-y (degrees 0) (degrees 3600)) + (:rotate-y (degrees 0)) + (:conerot-radius (meters 0) (meters 1)) + ) + ) + +;; failed to figure out what this is: +(defpart 1127 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 6.0 2.0) + (:y (meters 0) (meters 2)) + (:z (meters -1.5) (meters 3)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 2) (meters 2)) + (:r 64.0 64.0) + (:g 128.0 128.0) + (:b 255.0) + (:a 16.0 8.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:scalevel-x (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters 0) (meters 0.0033333334)) + (:fade-a -0.02 -0.02) + (:accel-y (meters -0.00083333335) (meters -0.00083333335)) + (:friction 0.82 0.07) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1128 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 4.0 3.0) + (:y (meters 0) (meters 4)) + (:z (meters -1.5) (meters 3)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 2) (meters 2)) + (:r 0.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 16.0 8.0) + (:vel-y (meters 0.05) (meters 0.033333335)) + (:scalevel-x (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters 0) (meters 0.0033333334)) + (:fade-a -0.02 -0.02) + (:accel-y (meters -0.00033333333) (meters -0.00083333335)) + (:friction 0.82 0.07) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1129 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 2)) + (:scale-x (meters 7)) + (:rot-x (degrees 0.675)) + (:scale-y (meters 5)) + (:r 64.0) + (:g 196.0) + (:b 255.0) + (:a 64.0) + (:omega (degrees 1136.25)) + (:scalevel-x (meters 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -2.56) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1024.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1124 + :init-specs ((:texture (new 'static 'texture-id :index #x2 :page #xc1)) + (:birth-func 'birth-func-texture-group) + (:num 12.0 6.0) + (:y (meters 0.5) (meters 4)) + (:z (meters -1.5) 1 (meters 3)) + (:scale-x (meters 0.2) (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.2) (meters 0.3)) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.083333336) (meters 0.05)) + (:scalevel-x (meters -0.00022222222)) + (:rotvel-x (degrees -4.8) (degrees 9.6)) + (:rotvel-y (degrees -4.8) (degrees 9.6)) + (:rotvel-z (degrees -4.8) (degrees 9.6)) + (:scalevel-y (meters -0.00022222222)) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.92 0.07) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #xc100200 #xc100c00)) + (:func 'check-market-piece-ground) + (:next-time (seconds 4)) + (:next-launcher 1122) + (:conerot-x (degrees 0) (degrees 110)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1123 + :init-specs ((:texture (new 'static 'texture-id :index #x2 :page #xc1)) + (:birth-func 'birth-func-texture-group) + (:num 6.0 3.0) + (:y (meters 0.5) (meters 4)) + (:z (meters -1.5) 1 (meters 3)) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-x (degrees 0) (degrees 3600)) + (:rot-y (degrees 0) (degrees 3600)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.5) (meters 0.5)) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.1) (meters 0.06666667)) + (:rotvel-x (degrees -4.8) (degrees 9.6)) + (:rotvel-y (degrees -4.8) (degrees 9.6)) + (:rotvel-z (degrees -4.8) (degrees 9.6)) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.92 0.07) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 5 0 0 #xc100200 #xc100c00)) + (:func 'check-market-piece-ground) + (:next-time (seconds 0.4)) + (:next-launcher 1122) + (:conerot-x (degrees 0) (degrees 110)) + (:conerot-y (degrees 15) (degrees 150)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-mbasket-b-explode + :id 250 + :duration (seconds 3.335) + :flags (sp0 sp6) + :bounds (static-bspherem 0 0 0 12) + :rotate ((degrees 0) (degrees 90) (degrees 0)) + :parts ((sp-item 1130 :fade-after (meters 40) :falloff-to (meters 80) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.035)) + (sp-item 1131 :fade-after (meters 100) :falloff-to (meters 120) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1132 :fade-after (meters 60) :falloff-to (meters 90) :flags (sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1133 :fade-after (meters 60) :falloff-to (meters 90) :flags (sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1134 :fade-after (meters 100) :falloff-to (meters 120) :flags (sp7) :period (seconds 4) :length (seconds 0.1)) + (sp-item 1135 :fade-after (meters 30) :falloff-to (meters 40) :flags (is-3d) :period (seconds 4) :length (seconds 0.335)) + (sp-item 1136 :fade-after (meters 50) :period (seconds 4) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 1134 + :init-specs ((:texture (specs level-default-sprite)) + (:num 32.0) + (:y (meters 0) (meters 1)) + (:z (meters -1.5) (meters 3)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 1) (meters 1)) + (:r 255.0) + (:g :copy r) + (:b :copy g) + (:a 92.0 32.0) + (:vel-y (meters 0.033333335) (meters 0.06666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:fade-a -0.16 -0.16) + (:accel-y (meters -0.0016666667) (meters -0.00083333335)) + (:friction 0.95 0.03) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1135 + :init-specs ((:texture (specs level-default-sprite)) + (:num 2.0) + (:x (meters -3) (meters 6)) + (:y (meters 0.05)) + (:z (meters -3) (meters 6)) + (:scale-x (meters 1.5) (meters 1)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 1.5) (meters 1)) + (:r 255.0) + (:g :copy r) + (:b :copy g) + (:a 0.0) + (:fade-a 3.2) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 0.135)) + (:next-launcher 1137) + ) + ) + +;; failed to figure out what this is: +(defpart 1137 + :init-specs ((:fade-a 0.0) (:next-time (seconds 1) (seconds 0.997)) (:next-launcher 1138)) + ) + +;; failed to figure out what this is: +(defpart 1138 + :init-specs ((:fade-a -0.21333334 -0.21333334)) + ) + +;; failed to figure out what this is: +(defpart 1132 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 6.0 3.0) + (:y (meters 0) (meters 1)) + (:z (meters -1.5) (meters 3)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 2) (meters 2)) + (:r 192.0 64.0) + (:g :copy r) + (:b :copy g) + (:a 16.0 8.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:scalevel-x (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters 0) (meters 0.0033333334)) + (:fade-a -0.02 -0.02) + (:accel-y (meters -0.00033333333) (meters -0.00083333335)) + (:friction 0.82 0.07) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1133 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 12.0 3.0) + (:y (meters 0) (meters 1)) + (:z (meters -1.5) (meters 3)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 2) (meters 2)) + (:r 0.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 16.0 8.0) + (:vel-y (meters 0.05) (meters 0.033333335)) + (:scalevel-x (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters 0) (meters 0.0033333334)) + (:fade-a -0.02 -0.02) + (:accel-y (meters -0.00033333333) (meters -0.00083333335)) + (:friction 0.82 0.07) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1136 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 0.5)) + (:scale-x (meters 3)) + (:rot-x (degrees 0.675)) + (:scale-y (meters 7)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0) + (:omega (degrees 1136.25)) + (:scalevel-x (meters 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -2.56) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1024.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1131 + :init-specs ((:texture (new 'static 'texture-id :page #xc1)) + (:num 6.0 3.0) + (:y (meters 0.5) (meters 0.5)) + (:z (meters -1.5) 1 (meters 3)) + (:scale-x (meters 0.2) (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.2) (meters 0.3)) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.083333336) (meters 0.05)) + (:scalevel-x (meters -0.00022222222)) + (:rotvel-x (degrees -4.8) (degrees 9.6)) + (:rotvel-y (degrees -4.8) (degrees 9.6)) + (:rotvel-z (degrees -4.8) (degrees 9.6)) + (:scalevel-y (meters -0.00022222222)) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.92 0.07) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-market-piece-ground) + (:next-time (seconds 4)) + (:next-launcher 1122) + (:conerot-x (degrees 0) (degrees 110)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1130 + :init-specs ((:texture (new 'static 'texture-id :page #xc1)) + (:num 4.0 2.0) + (:y (meters 0.5) (meters 0.5)) + (:z (meters -1.5) 1 (meters 3)) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-x (degrees 0) (degrees 3600)) + (:rot-y (degrees 0) (degrees 3600)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.5) (meters 0.5)) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.1) (meters 0.06666667)) + (:rotvel-x (degrees -4.8) (degrees 9.6)) + (:rotvel-y (degrees -4.8) (degrees 9.6)) + (:rotvel-z (degrees -4.8) (degrees 9.6)) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.92 0.07) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-market-piece-ground) + (:next-time (seconds 0.4)) + (:next-launcher 1122) + (:conerot-x (degrees 0) (degrees 110)) + (:conerot-y (degrees 15) (degrees 150)) + (:rotate-y (degrees 0)) + ) + ) + +;; definition for function check-market-piece-ground +;; WARN: Return type mismatch number vs none. +(defun check-market-piece-ground ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (if (and (>= 35225.6 (-> arg2 launchrot y)) (>= 0.0 (-> arg1 vel-sxvel y))) + (set! (-> arg2 launchrot y) 35225.6) + (set! (-> arg1 next-time) + (the-as uint (* (max 1 (the-as int (-> *display* clock (-> arg1 clock-index) sparticle-data x))) 2)) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defpart 1122 + :init-specs ((:rot-x (degrees 0)) + (:rot-y (degrees 0) (degrees 3600)) + (:rot-z (degrees 0)) + (:vel-y (meters 0)) + (:rotvel-x (degrees 0)) + (:rotvel-y (degrees 0)) + (:rotvel-z (degrees 0)) + (:accel-y (meters 0)) + (:friction 0.8 0.1) + (:timer (seconds 4)) + (:next-time (seconds 0.5) (seconds 0.997)) + (:next-launcher 1139) + ) + ) + +;; failed to figure out what this is: +(defpart 1139 + :init-specs ((:fade-a -0.21333334 -0.21333334) (:flags (sp-cpuinfo-flag-2 left-multiply-quat))) + ) + +;; failed to figure out what this is: +(defpartgroup group-msack-a-explode + :id 251 + :duration (seconds 3.335) + :flags (sp0 sp6) + :bounds (static-bspherem 0 0 0 12) + :rotate ((degrees 0) (degrees 90) (degrees 0)) + :parts ((sp-item 1140 :fade-after (meters 40) :falloff-to (meters 80) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.035)) + (sp-item 1141 :fade-after (meters 100) :falloff-to (meters 120) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1142 :fade-after (meters 100) :falloff-to (meters 120) :flags (sp7) :period (seconds 4) :length (seconds 0.1)) + (sp-item 1143 :fade-after (meters 30) :falloff-to (meters 40) :flags (is-3d) :period (seconds 4) :length (seconds 0.335)) + (sp-item 1144 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp7) :period (seconds 4) :length (seconds 0.135)) + (sp-item 1145 :fade-after (meters 60) :falloff-to (meters 90) :flags (sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1146 :fade-after (meters 50) :period (seconds 4) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 1142 + :init-specs ((:texture (new 'static 'texture-id :index #x10 :page #xc1)) + (:num 32.0) + (:y (meters 0) (meters 1)) + (:z (meters -1.5) (meters 3)) + (:scale-x (meters 0.1) (meters 0.05)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.3) (meters 0.6)) + (:r 128.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 96.0 32.0) + (:vel-y (meters 0.033333335) (meters 0.06666667)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:scalevel-y (meters 0.00033333333)) + (:fade-a -0.16 -0.16) + (:accel-y (meters -0.0016666667) (meters -0.00083333335)) + (:friction 0.95 0.03) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 0) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1143 + :init-specs ((:texture (new 'static 'texture-id :index #x11 :page #xc1)) + (:num 1.0 1.0) + (:x (meters -3) (meters 6)) + (:y (meters 0.05)) + (:z (meters -3) (meters 6)) + (:scale-x (meters 1.5) (meters 1.5)) + (:rot-y (degrees 0) (degrees 3600)) + (:scale-y (meters 1.5) (meters 1.5)) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 0.0) + (:fade-a 1.6) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 0.2) (seconds 0.065)) + (:next-launcher 1137) + ) + ) + +;; failed to figure out what this is: +(defpart 1144 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 8.0 3.0) + (:y (meters 0) (meters 3)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 2) (meters 2)) + (:r 150.0 60.0) + (:g 96.0 64.0) + (:b 0.0 32.0) + (:a 16.0 8.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:scalevel-x (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters 0) (meters 0.0033333334)) + (:fade-a -0.02 -0.02) + (:accel-y (meters -0.00033333333) (meters -0.00083333335)) + (:friction 0.82 0.07) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1145 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 6.0 3.0) + (:y (meters 0) (meters 3)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 2) (meters 2)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 2) (meters 2)) + (:r 0.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 16.0 8.0) + (:vel-y (meters 0.05) (meters 0.033333335)) + (:scalevel-x (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters 0) (meters 0.0033333334)) + (:fade-a -0.02 -0.02) + (:accel-y (meters -0.00033333333) (meters -0.00083333335)) + (:friction 0.82 0.07) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1146 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 1)) + (:scale-x (meters 5)) + (:rot-x (degrees 0.675)) + (:scale-y (meters 4.5)) + (:r 255.0) + (:g 255.0) + (:b 32.0) + (:a 64.0) + (:omega (degrees 1136.25)) + (:scalevel-x (meters 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -2.56) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1024.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1141 + :init-specs ((:texture (new 'static 'texture-id :index #x3 :page #xc1)) + (:num 8.0 3.0) + (:y (meters 0) (meters 3)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 0.2) (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.2) (meters 0.3)) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.083333336) (meters 0.05)) + (:scalevel-x (meters -0.00022222222)) + (:rotvel-x (degrees -4.8) (degrees 9.6)) + (:rotvel-y (degrees -4.8) (degrees 9.6)) + (:rotvel-z (degrees -4.8) (degrees 9.6)) + (:scalevel-y (meters -0.00022222222)) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.92 0.07) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-market-piece-ground) + (:next-time (seconds 4)) + (:next-launcher 1122) + (:conerot-x (degrees 0) (degrees 110)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1140 + :init-specs ((:texture (new 'static 'texture-id :index #x3 :page #xc1)) + (:num 4.0 2.0) + (:y (meters 0) (meters 3)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 0.5) (meters 0.5)) + (:rot-x (degrees 0) (degrees 3600)) + (:rot-y (degrees 0) (degrees 3600)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 0.5) (meters 0.5)) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.1) (meters 0.06666667)) + (:rotvel-x (degrees -4.8) (degrees 9.6)) + (:rotvel-y (degrees -4.8) (degrees 9.6)) + (:rotvel-z (degrees -4.8) (degrees 9.6)) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.92 0.07) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-market-piece-ground) + (:next-time (seconds 0.4)) + (:next-launcher 1122) + (:conerot-x (degrees 0) (degrees 110)) + (:conerot-y (degrees 15) (degrees 150)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-msack-b-explode + :id 252 + :duration (seconds 3.335) + :flags (sp0 sp6) + :bounds (static-bspherem 0 0 0 12) + :rotate ((degrees 0) (degrees 90) (degrees 0)) + :parts ((sp-item 1147 :fade-after (meters 100) :falloff-to (meters 120) :flags (is-3d sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1148 :fade-after (meters 100) :falloff-to (meters 120) :flags (sp7) :period (seconds 4) :length (seconds 0.1)) + (sp-item 1149 :fade-after (meters 90) :falloff-to (meters 110) :flags (sp7) :period (seconds 4) :length (seconds 0.135)) + (sp-item 1150 :fade-after (meters 60) :falloff-to (meters 90) :flags (sp7) :period (seconds 4) :length (seconds 0.05)) + (sp-item 1151 :fade-after (meters 50) :period (seconds 4) :length (seconds 0.017)) + ) + ) + +;; failed to figure out what this is: +(defpart 1148 + :init-specs ((:texture (new 'static 'texture-id :index #x1 :page #xc1)) + (:num 32.0) + (:y (meters 0) (meters 1)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 0.2) (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:fade-a -0.16 -0.16) + (:accel-y (meters -0.0033333334) (meters -0.00083333335)) + (:friction 0.95 0.03) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-market-piece-ground) + (:next-time (seconds 3.335)) + (:next-launcher 1152) + (:conerot-x (degrees 0) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1152 + :init-specs ((:vel-y (meters 0)) + (:rotvel-z (degrees 0)) + (:accel-y (meters 0)) + (:friction 0.8 0.1) + (:timer (seconds 5.667)) + (:next-time (seconds 1.5) (seconds 0.997)) + (:next-launcher 1139) + ) + ) + +;; failed to figure out what this is: +(defpart 1149 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 6.0 2.0) + (:y (meters 0) (meters 1)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 1) (meters 1)) + (:r 150.0 60.0) + (:g 0.0 64.0) + (:b 0.0) + (:a 16.0 8.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:scalevel-x (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters 0) (meters 0.0033333334)) + (:fade-a -0.02 -0.02) + (:accel-y (meters -0.00033333333) (meters -0.00083333335)) + (:friction 0.82 0.07) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1150 + :init-specs ((:texture (bigpuff level-default-sprite)) + (:num 5.0 2.0) + (:y (meters 0) (meters 1)) + (:z (meters -0.5) (meters 1)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 3600)) + (:scale-y (meters 1) (meters 1)) + (:r 0.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 16.0 8.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:scalevel-x (meters 0) (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y (meters 0) (meters 0.0033333334)) + (:fade-a -0.02 -0.02) + (:accel-y (meters -0.00033333333) (meters -0.00083333335)) + (:friction 0.82 0.07) + (:timer (seconds 4)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-x (degrees 30) (degrees 50.000004)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1151 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:y (meters 1)) + (:scale-x (meters 3)) + (:rot-x (degrees 0.675)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 64.0) + (:b 64.0) + (:a 64.0) + (:omega (degrees 1136.25)) + (:scalevel-x (meters 0.2)) + (:scalevel-y :copy scalevel-x) + (:fade-a -2.56) + (:timer (seconds 0.085)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1024.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1147 + :init-specs ((:texture (new 'static 'texture-id :index #x3 :page #xc1)) + (:num 6.0 2.0) + (:y (meters 0) (meters 3)) + (:z (meters -1) (meters 2)) + (:scale-x (meters 0.1) (meters 0.2)) + (: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.2)) + (:r 64.0 128.0) + (:g :copy r) + (:b :copy g) + (:a 128.0) + (:vel-y (meters 0.083333336) (meters 0.05)) + (:scalevel-x (meters -0.00022222222)) + (:rotvel-x (degrees -4.8) (degrees 9.6)) + (:rotvel-y (degrees -4.8) (degrees 9.6)) + (:rotvel-z (degrees -4.8) (degrees 9.6)) + (:scalevel-y (meters -0.00022222222)) + (:fade-a -0.21333334 -0.21333334) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.92 0.07) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:func 'check-market-piece-ground) + (:next-time (seconds 4)) + (:next-launcher 1122) + (:conerot-x (degrees 0) (degrees 110)) + (:conerot-y (degrees 0) (degrees 180)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defskelgroup skel-market-basket-a market-basket-a market-basket-a-lod0-jg market-basket-a-idle-ja + ((market-basket-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 2 0 2.5) + ) + +;; definition for method 37 of type market-basket-a +;; WARN: Return type mismatch market-basket-a vs none. +(defmethod init-skel! ((this market-basket-a)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-market-basket-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part-explode) (-> *part-group-id-table* 249)) + (set! (-> this sound-explode) (static-sound-spec "break-vase" :group 0)) + (call-parent-method this) + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-market-basket-b market-basket-b market-basket-b-lod0-jg market-basket-b-idle-ja + ((market-basket-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; definition for method 37 of type market-basket-b +;; WARN: Return type mismatch market-basket-b vs none. +(defmethod init-skel! ((this market-basket-b)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-market-basket-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part-explode) (-> *part-group-id-table* 250)) + (set! (-> this sound-explode) (static-sound-spec "break-flour" :group 0)) + (call-parent-method this) + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-market-crate market-crate market-crate-lod0-jg market-crate-idle-ja + ((market-crate-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 2) + ) + +;; definition for method 37 of type market-crate +;; WARN: Return type mismatch market-crate vs none. +(defmethod init-skel! ((this market-crate)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-market-crate" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part-explode) (-> *part-group-id-table* 248)) + (set! (-> this sound-explode) (static-sound-spec "break-crate" :group 0)) + (call-parent-method this) + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-market-sack-a market-sack-a market-sack-a-lod0-jg market-sack-a-idle-ja + ((market-sack-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1 0 2) + ) + +;; definition for method 37 of type market-sack-a +;; WARN: Return type mismatch market-sack-a vs none. +(defmethod init-skel! ((this market-sack-a)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-market-sack-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part-explode) (-> *part-group-id-table* 251)) + (set! (-> this sound-explode) (static-sound-spec "break-crate" :group 0)) + (call-parent-method this) + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-market-sack-b market-sack-b market-sack-b-lod0-jg market-sack-b-idle-ja + ((market-sack-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1 0 2) + ) + +;; definition for method 37 of type market-sack-b +;; WARN: Return type mismatch market-sack-b vs none. +(defmethod init-skel! ((this market-sack-b)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-market-sack-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part-explode) (-> *part-group-id-table* 252)) + (set! (-> this sound-explode) (static-sound-spec "break-veg-straw" :group 0)) + (call-parent-method this) + (none) + ) + +;; definition for function market-activate +;; WARN: Return type mismatch int vs none. +(defun market-activate ((arg0 level)) + (let* ((v1-0 (-> arg0 name)) + (gp-0 (cond + ((= v1-0 'ctymarka) + (new 'static 'boxed-array :type int32 5 0 0 #xc100200 #xc100c00) + ) + ((= v1-0 'ctymarkb) + (new 'static 'boxed-array :type int32 5 0 0 #xcd00200 #xcd00c00) + ) + ((= v1-0 'waswide) + (new 'static 'boxed-array :type int32 5 0 0 #x29a01400 #x29a01500) + ) + (else + (format 0 "ERROR: market-activate called for unknown level ~A~%" (-> arg0 name)) + ) + ) + ) + ) + (set! (-> (get-field-spec-by-id (-> *part-id-table* 1124) (sp-field-id spt-userdata)) initial-valuef) + (the-as float gp-0) + ) + (set! (-> (get-field-spec-by-id (-> *part-id-table* 1123) (sp-field-id spt-userdata)) initial-valuef) + (the-as float gp-0) + ) + ) + (setup-special-textures (-> *part-id-table* 1118) "wood-plain-debris") + (setup-special-textures (-> *part-id-table* 1117) "wood-plain-debris") + (setup-special-textures (-> *part-id-table* 1124) "clay-pot-debris-01") + (setup-special-textures (-> *part-id-table* 1123) "clay-pot-debris-01") + (setup-special-textures (-> *part-id-table* 1131) "basket-debris-01") + (setup-special-textures (-> *part-id-table* 1130) "basket-debris-01") + (setup-special-textures (-> *part-id-table* 1141) "cotton-wrap-debris") + (setup-special-textures (-> *part-id-table* 1140) "cotton-wrap-debris") + (setup-special-textures (-> *part-id-table* 1147) "basket-debris-01") + (setup-special-textures (-> *part-id-table* 1142) "straw-bit") + (setup-special-textures (-> *part-id-table* 1143) "straw-ground") + (setup-special-textures (-> *part-id-table* 1148) "cherry") + 0 + (none) + ) + +;; definition for symbol *fruit-check-ground-counter*, type int +(define *fruit-check-ground-counter* 0) + +;; definition for function fruit-check-ground-bounce +(defun fruit-check-ground-bounce ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo) (arg3 matrix)) + (let ((v1-1 (-> arg1 key proc)) + (f0-0 (-> arg1 user-float)) + ) + (set! (-> (the-as fruit-stand (+ (* (-> (the-as fruit-stand v1-1) num-sparts) 4) (the-as uint v1-1))) + sparts-index + 0 + ) + (the-as uint arg3) + ) + (when (and (>= (-> (the-as fruit-stand v1-1) count-sparts) (-> (the-as fruit-stand v1-1) first-sparts)) + (nonzero? (-> (the-as fruit-stand v1-1) hack-counter)) + ) + (set-vector! + (-> (the-as fruit-stand v1-1) sparts-pos (-> (the-as fruit-stand v1-1) num-sparts)) + (-> arg2 launchrot x) + (-> arg2 launchrot y) + (-> arg2 launchrot z) + 1.0 + ) + (+! (-> (the-as fruit-stand v1-1) num-sparts) 1) + (+! (-> (the-as fruit-stand v1-1) hack-counter) -1) + ) + (+! (-> (the-as fruit-stand v1-1) count-sparts) 1) + (when (and (< (-> arg2 launchrot y) f0-0) (< (-> arg1 vel-sxvel y) 0.0)) + (set! (-> arg2 launchrot y) f0-0) + (if (and (< (-> arg1 vel-sxvel y) -122.88) (< (rand-vu-int-count 10) 3)) + (set-vector! + (new 'stack-no-clear 'vector) + (-> arg2 launchrot x) + (-> arg2 launchrot y) + (-> arg2 launchrot z) + 1.0 + ) + ) + (set! (-> arg1 vel-sxvel y) (* (-> arg1 vel-sxvel y) (- (rand-vu-float-range 0.6 0.8)))) + ) + ) + ) + +;; definition for function fruit-sparticle-next-on-mode-1 +(defun fruit-sparticle-next-on-mode-1 ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sparticle-launchinfo)) + (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 (-> arg1 key))) + (cond + ((zero? (-> s5-0 state-mode 0)) + (set! (-> arg1 next-time) + (the-as uint (* (max 1 (the-as int (-> *display* clock (-> arg1 clock-index) sparticle-data x))) 2)) + ) + ) + (else + (let ((s4-0 (new 'stack-no-clear 'vector))) + 0.0 + 0.0 + 0.0 + (let* ((f28-0 (/ 1.0 (* 0.00024414062 (-> arg1 omega)))) + (f26-0 (* (rand-vu-float-range -136.53334 136.53334) f28-0)) + (f30-0 (* (rand-vu-float-range 0.0 136.53334) f28-0)) + (f0-8 (* (rand-vu-float-range -13.653334 54.613335) f28-0)) + ) + (vector-float*! s4-0 (the-as vector (-> s5-0 origin)) f26-0) + (let ((a1-5 s4-0)) + (let ((v1-8 s4-0)) + (let ((a0-10 (-> s5-0 origin uvec))) + (let ((a2-1 f30-0)) + (.mov vf7 a2-1) + ) + (.lvf vf5 (&-> a0-10 quad)) + ) + (.lvf vf4 (&-> v1-8 quad)) + ) + (.add.x.vf 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 ((a1-6 s4-0)) + (let ((v1-9 s4-0)) + (let ((a0-11 (-> s5-0 origin fvec))) + (let ((a2-2 f0-8)) + (.mov vf7 a2-2) + ) + (.lvf vf5 (&-> a0-11 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 (&-> a1-6 quad) vf6) + ) + ) + (set! (-> arg1 vel-sxvel x) (-> s4-0 x)) + (set! (-> arg1 vel-sxvel y) (-> s4-0 y)) + (set! (-> arg1 vel-sxvel z) (-> s4-0 z)) + ) + (-> arg1 vel-sxvel) + (set! (-> arg1 user-float) (+ (-> s5-0 origin trans y) (-> arg1 omega))) + ) + ) + ) + 0.0 + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-ctywide-fruit + :id 253 + :flags (sp0 sp6) + :bounds (static-bspherem 0 0 0 6) + :rotate ((degrees 30) (degrees 0) (degrees 0)) + :parts ((sp-item 1153 :flags (sp3 sp7)) + (sp-item 1154 :flags (sp3 sp7)) + (sp-item 1155 :flags (sp3 sp7)) + (sp-item 1156 :flags (sp3 sp7)) + (sp-item 1157 :flags (sp3 sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 1153 + :init-specs ((:texture (fruit1 waswide-sprite)) + (:num 8.0 2.0) + (:x (meters 2.2) 2 (meters 0.75)) + (:y (meters 1.1)) + (:z (meters -1.25) 2 (meters 0.75)) + (:scale-x (meters 0.6) (meters 0.15)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0 40.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 9)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 aux-list sp-cpuinfo-flag-13 launch-along-z)) + (:userdata 1638.4) + (:func 'fruit-sparticle-next-on-mode-1) + (:next-launcher 1158) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1158 + :init-specs ((:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.96 0.02) + (:func 'fruit-check-ground-bounce) + (:next-time (seconds 2) (seconds 3.997)) + (:next-launcher 1159) + ) + ) + +;; failed to figure out what this is: +(defpart 1157 + :init-specs ((:texture (fruit1 waswide-sprite)) + (:num 40.0) + (:x (meters -3.7) 7 (meters 0.25)) + (:y (meters 1.1)) + (:z (meters -1.1) 7 (meters 0.25)) + (:scale-x (meters 0.25) (meters 0.1)) + (:scale-y (meters 0.35) (meters 0.1)) + (:r 0.0 1 120.0) + (:g 90.0 20.0) + (:b 0.0 1 80.0) + (:a 128.0) + (:omega (degrees 4.5)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 aux-list sp-cpuinfo-flag-13 launch-along-z)) + (:userdata 819.2) + (:func 'fruit-sparticle-next-on-mode-1) + (:next-launcher 1160) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1156 + :init-specs ((:texture (fruit1 waswide-sprite)) + (:num 24.0) + (:x (meters -3.6) 7 (meters 0.25)) + (:y (meters 1.25)) + (:z (meters -1.075) 6 (meters 0.25)) + (:scale-x (meters 0.25) (meters 0.1)) + (:scale-y (meters 0.35) (meters 0.1)) + (:r 0.0 1 120.0) + (:g 90.0 20.0) + (:b 0.0 1 80.0) + (:a 128.0) + (:omega (degrees 4.5)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 aux-list sp-cpuinfo-flag-13 launch-along-z)) + (:userdata 819.2) + (:func 'fruit-sparticle-next-on-mode-1) + (:next-launcher 1160) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1160 + :init-specs ((:rot-z (degrees 0) (degrees 360)) + (:rotvel-z (degrees -1.2) (degrees 2.4)) + (:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.97 0.02) + (:func 'fruit-check-ground-bounce) + (:next-time (seconds 1.5) (seconds 2.997)) + (:next-launcher 1161) + ) + ) + +;; failed to figure out what this is: +(defpart 1161 + :init-specs ((:rotvel-z (degrees 0)) (:fade-a -0.42666668)) + ) + +;; failed to figure out what this is: +(defpart 1155 + :init-specs ((:texture (fruit1 waswide-sprite)) + (:num 32.0) + (:x (meters -0.8) 3 (meters 0.5)) + (:y (meters 1)) + (:z (meters -1) 3 (meters 0.5)) + (:scale-x (meters 0.4) (meters 0.15)) + (:scale-y :copy scale-x) + (:r 128.0 64.0) + (:g 100.0) + (:b 100.0) + (:a 128.0) + (:omega (degrees 6.7500005)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 aux-list sp-cpuinfo-flag-13 launch-along-z)) + (:userdata 1228.8) + (:func 'fruit-sparticle-next-on-mode-1) + (:next-launcher 1162) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1154 + :init-specs ((:texture (fruit1 waswide-sprite)) + (:num 32.0) + (:x (meters -0.55) 2 (meters 0.5)) + (:y (meters 1.25)) + (:z (meters -0.8) 2 (meters 0.5)) + (:scale-x (meters 0.4) (meters 0.15)) + (:scale-y :copy scale-x) + (:r 140.0 64.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 6.7500005)) + (:timer (seconds -0.005)) + (:flags (sp-cpuinfo-flag-2 aux-list sp-cpuinfo-flag-13 launch-along-z)) + (:userdata 1228.8) + (:func 'fruit-sparticle-next-on-mode-1) + (:next-launcher 1162) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1162 + :init-specs ((:accel-y (meters -0.0033333334) (meters -0.0016666667)) + (:friction 0.97 0.02) + (:func 'fruit-check-ground-bounce) + (:next-time (seconds 2) (seconds 3.997)) + (:next-launcher 1159) + ) + ) + +;; failed to figure out what this is: +(defpart 1159 + :init-specs ((:fade-a -0.42666668)) + ) + +;; failed to figure out what this is: +(defskelgroup skel-fruit-stand cty-fruit-stand cty-fruit-stand-lod0-jg cty-fruit-stand-idle-ja + ((cty-fruit-stand-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +;; definition for function fruit-stand-event-handler +;; WARN: Return type mismatch none vs object. +(defbehavior fruit-stand-event-handler fruit-stand ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('attack) + (let ((gp-0 (the-as attack-info (-> arg3 param 1)))) + (when (and (!= (-> gp-0 id) (-> self incoming-attack-id)) + (nonzero? (-> self part)) + (zero? (-> self part state-mode 0)) + ) + (sound-play "break-veg-wood") + (set! (-> self incoming-attack-id) (-> gp-0 id)) + (set! (-> self part state-mode 0) (the-as uint 1)) + (when (not (run-logic? self)) + (format 0 "Killing self!~%") + (when (-> self parts-alive?) + (set! (-> self parts-alive?) #f) + (kill-particles (-> self part)) + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 12 of type fruit-stand +(defmethod run-logic? ((this fruit-stand)) + "Should this process be run? Checked by execute-process-tree." + (if (-> this parts-alive?) + (call-parent-method this) + #t + ) + ) + +;; failed to figure out what this is: +(defstate idle (fruit-stand) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (fruit-stand-event-handler proc argc message block) + ) + :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 () + (when (-> self parts-alive?) + (dotimes (gp-0 (the-as int (-> self num-sparts))) + (let ((s5-0 (new 'stack-no-clear 'collide-query)) + (s4-0 (-> *sp-particle-system-2d* cpuinfo-table (-> self sparts-index gp-0))) + ) + (when (and (nonzero? (-> s4-0 key)) (= (-> s4-0 key group) (lookup-part-group-by-name "group-ctywide-fruit"))) + (set! (-> s5-0 start-pos quad) (-> self sparts-pos gp-0 quad)) + (+! (-> s5-0 start-pos y) 4096.0) + (set-vector! (-> s5-0 move-dist) 0.0 -40960.0 0.0 1.0) + (let ((v1-11 s5-0)) + (set! (-> v1-11 radius) (-> s4-0 omega)) + (set! (-> v1-11 collide-with) (collide-spec backgnd)) + (set! (-> v1-11 ignore-process0) #f) + (set! (-> v1-11 ignore-process1) #f) + (set! (-> v1-11 ignore-pat) + (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1) + ) + (set! (-> v1-11 action-mask) (collide-action solid)) + ) + (let ((f0-7 (fill-and-probe-using-line-sphere *collide-cache* s5-0))) + (if (>= f0-7 0.0) + (set! (-> s4-0 user-float) (+ (-> s5-0 start-pos y) (* (-> s5-0 move-dist y) f0-7))) + ) + (when (< f0-7 0.0) + ) + ) + ) + ) + ) + (+! (-> self first-sparts) (-> self num-sparts)) + (when (>= (-> self first-sparts) (-> self count-sparts)) + (set! (-> self first-sparts) (the-as uint 0)) + 0 + ) + (set! (-> self num-sparts) (the-as uint 0)) + (set! (-> self hack-counter) (the-as uint 4)) + (set! (-> self count-sparts) (the-as uint 0)) + 0 + ) + (let ((a0-16 (new 'stack 'sphere))) + (set! (-> a0-16 quad) (-> self root trans quad)) + (set! (-> a0-16 r) (-> self root root-prim local-sphere w)) + (cond + ((or (= (-> self part state-mode 0) 1) + (and (sphere-in-view-frustum? a0-16) + (< (vector-vector-distance (-> self root trans) (math-camera-pos)) 491520.0) + ) + ) + (when (not (-> self parts-alive?)) + (initialize (-> self part) (-> *part-group-id-table* 253) self) + (set! (-> self parts-alive?) #t) + ) + (spawn-from-cspace (-> self part) (the-as cspace (-> self node-list data))) + ) + (else + (when (-> self parts-alive?) + (set! (-> self parts-alive?) #f) + (kill-particles (-> self part)) + ) + ) + ) + ) + (ja-post) + ) + ) + +;; definition for method 29 of type fruit-stand +;; WARN: Return type mismatch int vs none. +(defmethod fruit-stand-method-29 ((this fruit-stand)) + (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 fruit-stand +;; WARN: Return type mismatch int vs none. +(defmethod fruit-stand-method-30 ((this fruit-stand)) + (logior! (-> this mask) (process-mask crate)) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 253) this)) + (set! (-> this parts-alive?) #t) + 0 + (none) + ) + +;; definition for method 11 of type fruit-stand +(defmethod init-from-entity! ((this fruit-stand) (arg0 entity-actor)) + (fruit-stand-method-29 this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-fruit-stand" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (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 0000000000..cd9106ec79 --- /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 0000000000..f724eca064 --- /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/dogat_REF.gc b/test/decompiler/reference/jak3/levels/wascity/dogat_REF.gc new file mode 100644 index 0000000000..32d9af0dbc --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/dogat_REF.gc @@ -0,0 +1,560 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type dogat +(deftype dogat (nav-enemy) + ((rotation-matrix matrix :inline) + (scared-timer time-frame) + ) + (:state-methods + sit-idle + ) + (:methods + (dogat-method-191 (_type_) none) + ) + ) + +;; definition for method 3 of type dogat +(defmethod inspect ((this dogat)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type nav-enemy inspect))) + (t9-0 this) + ) + (format #t "~2Trotation-matrix: #~%" (-> this rotation-matrix)) + (format #t "~2Tscared-timer: ~D~%" (-> this scared-timer)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-dogat dogat dogat-lod0-jg dogat-idle-ja + ((dogat-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 4) + :shadow dogat-shadow-mg + ) + +;; definition for symbol *dogat-nav-enemy-info*, type nav-enemy-info +(define *dogat-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 7 + (new 'static 'idle-control-frame :command (idle-control-cmd push) :param0 15) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x4 + :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 15) + (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 15) + (new 'static 'idle-control-frame + :command (idle-control-cmd play) + :anim #x6 + :param0 2 + :param1 4 + :param2 '((new 'static 'bfloat :data 1.0) (new 'static 'bfloat :data 1.0)) + ) + (new 'static 'idle-control-frame) + ) + :idle-anim 4 + :notice-anim 3 + :hostile-anim 7 + :hit-anim -1 + :knocked-anim 8 + :knocked-land-anim 9 + :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 + :look-at-joint 23 + :bullseye-joint 3 + :sound-hit (static-sound-name "dogat-hit") + :sound-die (static-sound-name "dogat-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 + 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 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 #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 #f + :use-stop-chase #f + :use-circling #f + :use-pacing #f + :walk-anim 7 + :turn-anim -1 + :run-anim 7 + :taunt-anim -1 + :run-travel-speed (meters 15) + :run-acceleration (meters 6) + :run-turning-acceleration (meters 50) + :walk-travel-speed (meters 7.5) + :walk-acceleration (meters 6) + :walk-turning-acceleration (meters 25) + :maximum-rotation-rate (degrees 1440) + :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! (-> *dogat-nav-enemy-info* fact-defaults) *fact-info-enemy-defaults*) + +;; definition for function dogat-travel-post +;; WARN: Return type mismatch symbol vs none. +(defbehavior dogat-travel-post dogat () + (none) + ) + +;; failed to figure out what this is: +(defstate idle (dogat) + :virtual #t + :enter (behavior () + (let ((t9-0 (-> (method-of-type nav-enemy idle) enter))) + (if t9-0 + (t9-0) + ) + ) + (set! (-> self scared-timer) 0) + 0 + ) + ) + +;; failed to figure out what this is: +(defstate sit-idle (dogat) + :virtual #t + :enter (behavior () + (set-time! (-> self state-time)) + (set! (-> self state-timeout) (the-as time-frame (the int (* 300.0 (rand-vu-float-range 0.6 2.1))))) + (let ((v1-4 self)) + (set! (-> v1-4 enemy-flags) (the-as enemy-flag (logclear (-> v1-4 enemy-flags) (enemy-flag ef37)))) + (set! (-> v1-4 nav callback-info) *null-nav-callback-info*) + ) + 0 + (let ((v1-7 self)) + (set! (-> v1-7 enemy-flags) (the-as enemy-flag (logclear (-> v1-7 enemy-flags) (enemy-flag ef38)))) + ) + 0 + ) + :trans (behavior () + (let ((v1-0 (-> self focus aware))) + (cond + ((= v1-0 (enemy-aware ea4)) + (go-flee self) + ) + ((< (the-as int v1-0) 1) + (go-virtual idle) + ) + ) + ) + (if (time-elapsed? (-> self state-time) (-> self state-timeout)) + (go-virtual active) + ) + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (let ((gp-0 (rand-vu-int-range 2 4))) + (dotimes (s5-0 gp-0) + (ja-no-eval :group! dogat-idle-sit-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.02)) + (let ((gp-1 (rand-vu-int-range 2 4))) + (dotimes (s5-1 gp-1) + (ja-no-eval :group! dogat-idle-situp-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.02)) + (let ((gp-2 (rand-vu-int-range 2 4))) + (dotimes (s5-2 gp-2) + (ja-no-eval :group! dogat-idle-eat-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + ) + (ja-channel-push! 1 (seconds 0.02)) + ) + #f + ) + :post (behavior () + (nav-enemy-simple-post) + ) + ) + +;; failed to figure out what this is: +(defstate active (dogat) + :virtual #t + :enter (behavior () + (local-vars (v1-12 symbol) (v1-15 vector) (f0-4 float)) + (let ((t9-0 (-> (method-of-type nav-enemy active) enter))) + (if t9-0 + (t9-0) + ) + ) + (let* ((a2-0 (-> self root trans)) + (gp-0 (new 'stack-no-clear 'vector)) + (s4-0 (closest-point-on-mesh (-> self nav) gp-0 a2-0 (the-as nav-poly #f))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (let ((s3-0 0)) + (until (< f0-4 (sqrtf (+ (* (-> v1-15 x) (-> v1-15 x)) (* (-> v1-15 z) (-> v1-15 z))))) + (vector-rotate-around-y! s5-0 (-> self rotation-matrix fvec) (* 182.04445 (rand-vu-float-range -175.0 175.0))) + (vector-normalize! s5-0 (* 4096.0 (rand-vu-float-range 10.0 24.0))) + (clamp-vector-to-mesh-cross-gaps + (-> self nav) + gp-0 + s4-0 + s5-0 + 204.8 + #f + (the-as clamp-travel-vector-to-mesh-return-info #f) + ) + (+! s3-0 1) + (when (< 6 s3-0) + (set! v1-12 #f) + (goto cfg-8) + ) + (set! f0-4 16384.0) + (set! v1-15 s5-0) + ) + ) + (set! v1-12 #t) + (label cfg-8) + (if v1-12 + (vector+! (-> self move-dest) gp-0 s5-0) + (set! (-> self move-dest quad) (-> gp-0 quad)) + ) + ) + ) + :trans (behavior () + '() + ) + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (until #f + (ja-no-eval :group! dogat-run0-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ((-> (method-of-type nav-enemy active) trans)) + (if (< (vector-vector-xz-distance (-> self move-dest) (-> self root trans)) 8192.0) + (go-virtual sit-idle) + ) + ) + #f + ) + :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-method-187 self) + ) + ) + +;; failed to figure out what this is: +(defstate notice (dogat) + :virtual #t + :enter (behavior () + (go-virtual flee) + ) + ) + +;; failed to figure out what this is: +(defstate flee (dogat) + :virtual #t + :code (behavior () + (ja-channel-push! 1 (seconds 0.2)) + (ja :group! (-> self draw art-group data (-> self enemy-info hostile-anim))) + (ja :num-func num-func-identity :frame-num 0.0) + (until #f + (suspend) + (ja :num! (loop! 2.0)) + ) + #f + ) + ) + +;; definition for method 78 of type dogat +(defmethod go-hostile ((this dogat)) + (set-time! (-> this scared-timer)) + (go (method-of-object this flee)) + ) + +;; definition for method 108 of type dogat +(defmethod enemy-method-108 ((this dogat) (arg0 process-focusable)) + (or (< (vector-vector-xz-distance (-> this root trans) (get-trans arg0 0)) 143360.0) + (not (time-elapsed? (-> this scared-timer) (seconds 4))) + ) + ) + +;; definition for method 114 of type dogat +(defmethod send-attack-to-all-tshapes ((this dogat) (arg0 process-focusable) (arg1 event-message-block)) + 0 + ) + +;; definition for method 120 of type dogat +;; WARN: Return type mismatch int vs none. +(defmethod init-enemy-collision! ((this dogat)) + (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 projectile) + ) + (set! (-> s4-0 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> s4-0 local-sphere) 0.0 8192.0 0.0 9011.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 enemy)) + (set! (-> v1-13 prim-core action) (collide-action solid no-standon)) + (set-vector! (-> v1-13 local-sphere) 0.0 4915.2 0.0 4915.2) + ) + (set! (-> s5-0 nav-radius) 4096.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) + ) + 0 + (none) + ) + +;; definition for method 50 of type dogat +;; WARN: Return type mismatch int vs none. +(defmethod enemy-method-50 ((this dogat) (arg0 int)) + (let ((v1-0 arg0)) + (cond + ((= v1-0 1) + (let ((v1-4 (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 0))) + (set! (-> v1-4 prim-core collide-with) + (collide-spec backgnd jak bot crate obstacle hit-by-others-list player-list) + ) + ) + ) + ((or (= v1-0 2) (zero? v1-0)) + (set! (-> (the-as collide-shape-prim-group (-> this root root-prim)) child 0 prim-core collide-with) + (collide-spec) + ) + 0 + ) + ) + ) + (none) + ) + +;; definition for method 121 of type dogat +;; WARN: Return type mismatch shadow-control vs none. +(defmethod init-enemy! ((this dogat)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-dogat" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-enemy-defaults! this *dogat-nav-enemy-info*) + (set-vector! (-> this root scale) 2.5 2.5 2.5 1.0) + (quaternion->matrix (-> this rotation-matrix) (-> this root quat)) + (logior! (-> this skel status) (joint-control-status sync-math)) + (logclear! (-> this mask) (process-mask enemy)) + (logior! (-> this mask) (process-mask civilian)) + (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 + ) + ) + (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 0000000000..0946c95e20 --- /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 0000000000..4f8e626a58 --- /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 0000000000..7b56f878ca --- /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 0000000000..55246dcca7 --- /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 0000000000..ebc84c096d --- /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/palace/throne-scenes_REF.gc b/test/decompiler/reference/jak3/levels/wascity/palace/throne-scenes_REF.gc new file mode 100644 index 0000000000..a321792971 --- /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 0000000000..76489847fe --- /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 0000000000..e1163208fa --- /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 0000000000..0b3ef2044c --- /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 0000000000..5b74dbba55 --- /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 0000000000..299343104a --- /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 new file mode 100644 index 0000000000..0ad4744615 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wasall-init_REF.gc @@ -0,0 +1,105 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *wasall-reserve*, type symbol +(define *wasall-reserve* #f) + +;; definition for function wasall-login +;; WARN: Return type mismatch int vs none. +(defun wasall-login ((arg0 level)) + (let ((gp-0 (the-as int (-> *game-info* current-vehicle)))) + (when (or (< (the-as uint gp-0) (the-as uint 12)) + (< (the-as uint 19) (the-as uint gp-0)) + (not (have-vehicle-v-type? gp-0)) + ) + (let ((s5-0 12)) + (countdown (s4-0 8) + (if (have-vehicle-v-type? s5-0) + (set! gp-0 s5-0) + ) + (+! s5-0 1) + ) + ) + (set! (-> *game-info* current-vehicle) (the-as game-vehicle-u8 gp-0)) + ) + ) + 0 + (none) + ) + +;; definition for function wasall-logout +;; WARN: Return type mismatch int vs none. +(defun wasall-logout ((arg0 level)) + (set! *trail-graph* #f) + 0 + (none) + ) + +;; definition for function wasall-activate +;; WARN: Return type mismatch int vs none. +(defun wasall-activate ((arg0 level)) + (let ((v1-0 *traffic-info*) + (a1-0 (-> arg0 name)) + ) + (set! (-> v1-0 vehicle-level) arg0) + (set! (-> v1-0 vehicle-levels 12) a1-0) + (set! (-> v1-0 vehicle-levels 13) a1-0) + (set! (-> v1-0 vehicle-levels 14) a1-0) + (set! (-> v1-0 vehicle-levels 15) a1-0) + (set! (-> v1-0 vehicle-levels 16) a1-0) + (set! (-> v1-0 vehicle-levels 17) a1-0) + (set! (-> v1-0 vehicle-levels 18) a1-0) + (set! (-> v1-0 vehicle-levels 19) a1-0) + ) + (vehicle-manager-start (the-as process *entity-pool*)) + 0 + (none) + ) + +;; definition for function wasall-deactivate +;; WARN: Return type mismatch int vs none. +(defun wasall-deactivate ((arg0 level)) + (let ((v1-0 *traffic-info*)) + (set! (-> v1-0 vehicle-level) (the-as level #f)) + ) + (vehicle-manager-kill) + 0 + (none) + ) + +;; definition for function desert-game-activate +;; WARN: Return type mismatch int vs none. +(defun desert-game-activate ((arg0 level)) + (let ((v1-0 *traffic-info*) + (a0-1 (-> arg0 name)) + ) + (set! (-> v1-0 vehicle-levels 20) a0-1) + (set! (-> v1-0 vehicle-levels 22) a0-1) + (set! (-> v1-0 vehicle-levels 23) a0-1) + ) + 0 + (none) + ) + +;; definition for function desert-race-level-activate +;; WARN: Return type mismatch int vs none. +(defun desert-race-level-activate ((arg0 level)) + (let ((v1-0 *traffic-info*) + (a1-0 (-> arg0 name)) + ) + (set! (-> v1-0 race-vehicle-level) arg0) + (set! (-> v1-0 vehicle-levels 20) a1-0) + ) + 0 + (none) + ) + +;; definition for function desert-race-level-deactivate +;; 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 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 new file mode 100644 index 0000000000..53e0334be0 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wasall-obs_REF.gc @@ -0,0 +1,1753 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-wascity-airlock wascity-airlock wascity-airlock-lod0-jg wascity-airlock-idle-ja + ((wascity-airlock-lod0-mg (meters 999999))) + :bounds (static-spherem 0 12 0 40) + ) + +;; definition of type wascity-airlock +(deftype wascity-airlock (com-airlock) + () + ) + +;; definition for method 3 of type wascity-airlock +(defmethod inspect ((this wascity-airlock)) + (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 wascity-airlock +(defmethod init-from-entity! ((this wascity-airlock) (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 49152.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)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid)) + (set! (-> v1-8 transform-index) 4) + (set-vector! (-> v1-8 local-sphere) 81920.0 40960.0 0.0 81920.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 1) (the-as uint 0)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak bot player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid)) + (set! (-> v1-10 transform-index) 5) + (set-vector! (-> v1-10 local-sphere) -81920.0 40960.0 0.0 81920.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-wascity-airlock" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (init-airlock! this) + (set! (-> this allow-pilot?) #t) + (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 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) + ) + +;; failed to figure out what this is: +(defskelgroup skel-wascity-airlock-small wascity-airlock-small wascity-airlock-small-lod0-jg wascity-airlock-small-idle-ja + ((wascity-airlock-small-lod0-mg (meters 999999))) + :bounds (static-spherem 0 10 0 20) + ) + +;; definition of type wascity-airlock-small +(deftype wascity-airlock-small (com-airlock) + () + ) + +;; definition for method 3 of type wascity-airlock-small +(defmethod inspect ((this wascity-airlock-small)) + (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 wascity-airlock-small +(defmethod init-from-entity! ((this wascity-airlock-small) (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 3) 0))) + (set! (-> s5-0 total-prims) (the-as uint 4)) + (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 81920.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) 6) + (set-vector! (-> v1-8 local-sphere) 32768.0 0.0 0.0 40960.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s5-0 (the-as uint 2) (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) 7) + (set-vector! (-> v1-10 local-sphere) -32768.0 0.0 0.0 40960.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 jak bot player-list)) + (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 40960.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) + ) + (initialize-skeleton + this + (the-as + skeleton-group + (art-group-get-by-name *level* "skel-wascity-airlock-small" (the-as (pointer level) #f)) + ) + (the-as pair 0) + ) + (init-airlock! this) + (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 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) + ) + +;; failed to figure out what this is: +(defskelgroup skel-wascity-elevator-door wascity-elevator-door wascity-elevator-door-lod0-jg wascity-elevator-door-idle-ja + ((wascity-elevator-door-lod0-mg (meters 20)) + (wascity-elevator-door-lod1-mg (meters 40)) + (wascity-elevator-door-lod2-mg (meters 999999)) + ) + :bounds (static-spherem 0 10 0 20) + ) + +;; definition of type wascity-elevator-door +(deftype wascity-elevator-door (com-airlock) + () + ) + +;; definition for method 3 of type wascity-elevator-door +(defmethod inspect ((this wascity-elevator-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: +(defstate open (wascity-elevator-door) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (let ((v1-0 message) + (a0-1 'front) + ) + (cond + ((= v1-0 a0-1) + (let ((f30-0 (check-crossing-distance self (target-pos 0) #f)) + (f0-0 (check-crossing-distance self (camera-pos) #f)) + ) + (and (logtest? (-> self draw status) (draw-control-status on-screen)) + (< 2048.0 f30-0) + (>= (* f30-0 f0-0) 0.0) + ) + ) + ) + (else + (let ((t9-4 (-> (method-of-type com-airlock open) event))) + (if t9-4 + (t9-4 (the-as process a0-1) argc message block) + ) + ) + ) + ) + ) + ) + ) + +;; definition for method 11 of type wascity-elevator-door +(defmethod init-from-entity! ((this wascity-elevator-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 0.0 0.0 53248.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-wascity-elevator-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 "ver-open-hit" :group 0)) + (go (method-of-object this close) #t) + ) + +;; definition of type tentacle +(deftype tentacle (process-drawable) + ((init-pos vector :inline) + (focus-pos vector :inline) + (nav-mesh nav-mesh) + (active-timer time-frame) + (fade-level float) + (sound-id-loop sound-id) + (sound-id-attack sound-id) + ) + (:state-methods + dormant + un-dive-player + attacking-0 + attacking-1 + kill-player + wait + ) + ) + +;; definition for method 3 of type tentacle +(defmethod inspect ((this tentacle)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 this) + ) + (format #t "~2Tinit-pos: #~%" (-> this init-pos)) + (format #t "~2Tfocus-pos: #~%" (-> this focus-pos)) + (format #t "~2Tnav-mesh: ~A~%" (-> this nav-mesh)) + (format #t "~2Tactive-timer: ~D~%" (-> this active-timer)) + (format #t "~2Tfade-level: ~f~%" (-> this fade-level)) + (format #t "~2Tsound-id-loop: ~D~%" (-> this sound-id-loop)) + (format #t "~2Tsound-id-attack: ~D~%" (-> this sound-id-attack)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-tentacle tentacle tentacle-lod0-jg tentacle-emerge-ja + ((tentacle-lod0-mg (meters 999999))) + :bounds (static-spherem 0 20 0 20) + ) + +;; definition for function tentacle-follow-post +;; INFO: Used lq/sq +(defbehavior tentacle-follow-post tentacle () + (let ((a0-0 *target*)) + (when a0-0 + (set! (-> self focus-pos quad) (-> (get-trans a0-0 0) quad)) + (set-vector! (-> self root trans) (-> self focus-pos x) (-> self root trans y) (-> self focus-pos z) 1.0) + ) + ) + (ja-post) + (none) + ) + +;; definition for function tentacle-attack-handler +(defbehavior tentacle-attack-handler tentacle ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (case arg2 + (('target) + (case (-> arg3 param 0) + (('die) + (when (= (-> arg3 param 1) 'tentacle) + (go-virtual kill-player) + #t + ) + ) + ) + ) + (('joint) + 3 + ) + ) + ) + +;; failed to figure out what this is: +(defstate dormant (tentacle) + :virtual #t + :enter (behavior () + (set! (-> self active-timer) 0) + 0 + ) + :exit (behavior () + (set-setting! 'dive #f 0.0 0) + (set-setting! 'board #f 0.0 0) + (set-setting! 'gun #f 0.0 0) + (set-setting! 'jump #f 0.0 0) + (set-setting! 'double-jump #f 0.0 0) + (logior! (-> self draw status) (draw-control-status force-fade)) + (set! (-> self fade-level) 0.0) + (set! (-> self draw force-fade) (the-as uint (the int (* 128.0 (-> self fade-level))))) + ) + :trans (behavior () + (local-vars (v1-13 target)) + (if (not (-> self nav-mesh)) + (set! (-> self nav-mesh) (nav-mesh-from-res-tag (-> self entity) 'nav-mesh-actor 0)) + ) + (let ((gp-0 *target*)) + (if (not (and gp-0 + (not (focus-test? *target* dead flut)) + (-> self nav-mesh) + (= (-> *game-info* mode) 'play) + (nav-mesh-method-11 (-> self nav-mesh) (get-trans gp-0 0)) + (begin (set! v1-13 gp-0) v1-13) + (or (focus-test? v1-13 on-water under-water) + (= (-> v1-13 control ground-pat material) (pat-material waterbottom)) + ) + ) + ) + (set-time! (-> self active-timer)) + ) + (when (and gp-0 (time-elapsed? (-> self active-timer) (seconds 0.1))) + (set! (-> self root trans quad) (-> (get-trans gp-0 0) quad)) + (set! (-> self root trans y) (+ -114688.0 (get-base-height *ocean-map*))) + (set! (-> self init-pos quad) (-> self root trans quad)) + (if (focus-test? gp-0 under-water) + (go-virtual un-dive-player) + (go-virtual attacking-0) + ) + ) + ) + ) + :code sleep-code + :post #f + ) + +;; failed to figure out what this is: +(defstate un-dive-player (tentacle) + :virtual #t + :trans (behavior () + (let ((v1-0 *target*)) + (cond + ((not v1-0) + (go empty-state) + ) + ((not (focus-test? v1-0 under-water)) + (go-virtual attacking-0) + ) + ) + ) + ) + :code sleep-code + :post tentacle-follow-post + ) + +;; failed to figure out what this is: +(defstate attacking-0 (tentacle) + :virtual #t + :event tentacle-attack-handler + :trans (behavior () + (set! (-> self sound-id-attack) + (add-process *gui-control* self (gui-channel background) (gui-action queue) "tentacle" -99.0 0) + ) + (sound-play "tentacle-loop" :id (-> self sound-id-loop)) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! tentacle-emerge-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual attacking-1) + ) + :post (behavior () + (set! (-> self fade-level) (/ (ja-frame-num 0) (the float (ja-num-frames 0)))) + (set! (-> self draw force-fade) (the-as uint (the int (* 128.0 (-> self fade-level))))) + (let ((f30-2 (fmax 0.0 (fmin 1.0 (/ (ja-frame-num 0) (the float (ja-num-frames 0))))))) + (set! (-> *part-id-table* 1644 init-specs 11 initial-valuef) (lerp 6.826667 54.613335 f30-2)) + (set! (-> *part-id-table* 1644 init-specs 11 random-rangef) + (the-as float (the int (lerp 6.826667 54.613335 f30-2))) + ) + (set! (-> *part-id-table* 1644 init-specs 10 initial-valuef) (the-as float (the int (lerp 4.0 16.0 f30-2)))) + (set! (-> *part-id-table* 1644 init-specs 10 random-rangef) (the-as float (the int (lerp 4.0 16.0 f30-2)))) + ) + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((s4-0 (-> self root))) + (set-vector! gp-0 (-> s4-0 trans x) (get-base-height *ocean-map*) (-> s4-0 trans z) 1.0) + ) + (spawn (-> self part) gp-0) + ) + (tentacle-follow-post) + ) + ) + +;; failed to figure out what this is: +(defstate attacking-1 (tentacle) + :virtual #t + :event tentacle-attack-handler + :exit (behavior () + (sound-stop (-> self sound-id-loop)) + ) + :trans (behavior () + (while (and *target* (not (logtest? (-> *target* focus-status) (focus-status dead)))) + (send-event + *target* + '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 'tentacle)) + ) + ) + ) + ) + :code sleep-code + :post (behavior () + (let ((gp-0 (new 'stack-no-clear 'vector))) + (let ((s4-0 (-> self root))) + (set-vector! gp-0 (-> s4-0 trans x) (get-base-height *ocean-map*) (-> s4-0 trans z) 1.0) + ) + (cond + ((logtest? (-> *part-group-id-table* 409 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* 409)) + ) + (else + (set! (-> *launch-matrix* trans quad) (-> gp-0 quad)) + (part-tracker-spawn part-tracker :to *entity-pool* :group (-> *part-group-id-table* 409)) + ) + ) + ) + (tentacle-follow-post) + ) + ) + +;; failed to figure out what this is: +(defstate kill-player (tentacle) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('joint) + 3 + ) + ) + ) + :enter (behavior () + (sound-params-set! *gui-control* (-> self sound-id-attack) #f -1 -1 -1 1.0) + (set-action! + *gui-control* + (gui-action play) + (-> self sound-id-attack) + (gui-channel none) + (gui-action none) + (the-as string #f) + (the-as (function gui-connection symbol) #f) + (the-as process #f) + ) + ) + :exit (behavior () + (if *target* + (send-event *target* 'end-mode 'bot) + ) + ) + :code (behavior () + (ja-channel-push! 1 0) + (ja-no-eval :group! tentacle-tentacle-attack-ja :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + (go-virtual wait) + ) + :post ja-post + ) + +;; failed to figure out what this is: +(defstate wait (tentacle) + :virtual #t + :code sleep-code + ) + +;; definition for method 11 of type tentacle +(defmethod init-from-entity! ((this tentacle) (arg0 entity-actor)) + (stack-size-set! (-> this main-thread) 64) + (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-tentacle" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (set! (-> this part) (create-launch-control (-> *part-group-id-table* 408) this)) + (set! (-> this nav-mesh) #f) + (set! (-> this sound-id-loop) (new-sound-id)) + (set! (-> this sound-id-attack) (new-sound-id)) + (go (method-of-object this dormant)) + ) + +;; failed to figure out what this is: +(defskelgroup skel-terraformer-des-fma-2 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: +(load-scene (new 'static 'scene + :name "desert-final-boss-intro" + :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-intro" + :parts 24 + :command-list '((0 + (kill "terraformer-1") + (apply ,(lambda () + (set! (-> *sky-work* disable-day-star) (the-as basic #t)) + (set-cloud-and-fog-interp! *mood-control* 0.0 0.5 0.0 0.0) + (set-cloud-and-fog-interp! *mood-control* 0.0 0.5 1.0 1.0) + (set-time-for-random-weather! *mood-control* 180.0 180.0) + ) + ) + (apply ,(lambda () + (set-setting! 'fog-special-interp-targ #f 0.15 0) + (set-setting! 'dust-storm-fog-scalar #f 0.5 0) + (set-setting! 'fog-special-interp-rate #f 1000.0 0) + ) + ) + ) + (1 (part-tracker + "group-cloud-spread" + entity + "particleman" + joint + "particleK" + track + #t + duration + (frame-range 1 2000) + ) + ) + (10 (part-tracker + "group-desert-final-boss-gate" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 10 20) + ) + ) + (21 (part-tracker + "group-desert-boss-slide-dust" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 21 22) + ) + ) + (25 (part-tracker + "group-desert-boss-slide-dust" + entity + "particleman" + joint + "particleE" + track + #t + duration + (frame-range 25 26) + ) + ) + (26 (part-tracker + "group-desert-boss-slide-dust" + entity + "particleman" + joint + "particleF" + track + #t + duration + (frame-range 26 27) + ) + ) + (27 (part-tracker + "group-desert-boss-slide-dust" + entity + "particleman" + joint + "particleG" + track + #t + duration + (frame-range 27 28) + ) + ) + (41 (part-tracker + "group-desert-final-boss-gate" + entity + "particleman" + joint + "particleB" + track + #t + duration + (frame-range 41 51) + ) + ) + (57 (part-tracker + "group-desert-boss-slide-dust" + entity + "particleman" + joint + "particleH" + track + #t + duration + (frame-range 57 58) + ) + ) + (59 (part-tracker + "group-desert-boss-slide-dust" + entity + "particleman" + joint + "particleI" + track + #t + duration + (frame-range 59 75) + ) + ) + (125 + (part-tracker + "group-desert-fireball-shot" + entity + "particleman" + joint + "particleJ" + track + #t + duration + (frame-range 125 260) + ) + (part-tracker + "group-desert-fireball-shot-trail" + entity + "particleman" + joint + "particleJ" + track + #t + duration + (frame-range 125 260) + subsample-num + (new 'static 'bfloat :data 5.0) + ) + ) + (192 (part-tracker + "group-desert-fireball-explosion" + entity + "particleman" + joint + "particleJ" + track + #f + duration + (frame-range 192 193) + ) + ) + (275 (apply ,(lambda () + (set-setting! 'fog-special-interp-targ #f 0.4 0) + (set-setting! 'dust-storm-fog-scalar #f 0.4 0) + (set-setting! 'fog-special-interp-rate #f 0.03 0) + ) + ) + ) + (696 (apply ,(lambda () + (set-setting! 'fog-special-interp-targ #f 0.15 0) + (set-setting! 'dust-storm-fog-scalar #f 1.0 0) + (set-setting! 'fog-special-interp-rate #f 1000.1 0) + ) + ) + ) + (1066 (fadeout (frame-time-30 10))) + (10000 (task-close! "desert-final-boss-introduction")) + ) + :cut-list '(0 87 136 260 696 768 875 1013) + :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 'desboss1 + :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 'desboss1 + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((16 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(1013) + :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 '((50 max)) + :scissor-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 'deserrol + :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 "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 '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 + ) + (new 'static 'scene-actor + :name "terraformer-des-fma-2" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-2" + :prefix "" + :draw-frames '((260 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 "terraformer-des-fma-leg-a" + :level 'desboss1 + :art-group "skel-terraformer-des-fma-leg-a" + :prefix "lf-" + :draw-frames '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 '((260 max)) + :scissor-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 'desboss1 + :art-group "skel-terraformer-head" + :prefix "" + :draw-frames '((260 max)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "wasall-final-boss-intro-movie" + :end-point "desertb-final-boss-start" + :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: +(load-scene + (new 'static 'scene + :name "arena-outro" + :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-outro" + :parts #xb4 + :command-list '((0 (fadein (frame-time-30 10)) (send-event *time-of-day* 'change 'hour (int 14))) + (10 + (part-tracker + "group-precursor-staff-shot-glow" + entity + "particleman" + joint + "particleA" + track + #t + duration + (frame-range 10 5300) + ) + ) + (2744 + (part-tracker + "group-precursor-staff-shot" + entity + "particleman" + joint + "particleA" + track + #f + duration + (frame-range 2744 2750) + ) + ) + (2763 + (part-tracker + "group-precursor-staff-hit" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 2763 2764) + ) + ) + (2985 + (part-tracker + "group-precursor-staff-shot" + entity + "particleman" + joint + "particleA" + track + #f + duration + (frame-range 2985 2996) + ) + ) + (3009 + (part-tracker + "group-precursor-staff-hit" + entity + "particleman" + joint + "particleC" + track + #t + duration + (frame-range 3009 3010) + ) + ) + (3320 + (part-tracker + "group-ship-door-light" + entity + "precursor-ship" + joint + "door_glow" + track + #t + duration + (frame-range 3320 4385) + ) + ) + (4371 + (part-tracker + "group-mothership-thrusters" + entity + "precursor-ship" + joint + "thruster_a" + track + #t + duration + (frame-range 4371 4577) + ) + (part-tracker + "group-mothership-thrusters" + entity + "precursor-ship" + joint + "thruster_b" + track + #t + duration + (frame-range 4371 4577) + ) + (part-tracker + "group-mothership-thrusters" + entity + "precursor-ship" + joint + "thruster_c" + track + #t + duration + (frame-range 4371 4577) + ) + ) + (5380) + (5390 (fadeout (frame-time-30 10))) + (10000) + (10000 (task-close! "city-win-introduction")) + ) + :cut-list '(208 + 327 + 495 + 672 + 786 + 916 + 1061 + 1168 + 1245 + 1300 + 1387 + 1526 + 1678 + 1749 + 1803 + 1883 + 1954 + 2276 + 2385 + 2557 + 2722 + 2750 + 2918 + 2996 + 3225 + 3292 + 3380 + 3453 + 3598 + 3689 + 3827 + 3894 + 4028 + 4169 + 4318 + 4371 + 4513 + 4578 + 4629 + 4683 + 4857 + 5020 + 5300 + ) + :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 'outrocst + :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 'outrocst + :art-group "skel-jakc-highres" + :prefix "" + :draw-frames '((0 208) (786 916) (1300 1678) (1803 1954) (3292 3380) (3598 3689) (4169 4399) (4683 5401)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(4371 5020) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + :no-draw-seg #x3a2 + ) + (new 'static 'scene-actor + :name "precursor-ship" + :level 'loutro + :art-group "skel-precursor-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 "sidekick-highres" + :level 'loutro + :art-group "skel-sidekick-highres" + :prefix "" + :draw-frames '((0 208) (786 916) (1803 2276) (2385 2722) (2749 2764)) + :scissor-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 'loutro + :art-group "skel-ottsel-leader" + :prefix "" + :draw-frames '((0 327) + (786 1061) + (1168 1300) + (1387 1526) + (1803 1883) + (2276 2557) + (2722 2750) + (2918 2996) + (3292 3380) + (3598 3689) + (4169 4371) + ) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '(2276) + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "ottsel-surfer" + :level 'loutro + :art-group "skel-ottsel-surfer" + :prefix "" + :draw-frames '((208 327) (786 1245) (1387 1526) (2722 2750) (2918 2996) (3292 3380) (3598 3689)) + :scissor-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 'loutro + :art-group "skel-ottsel-veger" + :prefix "" + :draw-frames '((3689 4169)) + :scissor-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-tess" + :level 'loutro2 + :art-group "skel-ottsel-tess" + :prefix "" + :draw-frames '((3010 3380) (3453 3598) (4371 4513) (4683 5300)) + :scissor-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 'loutro2 + :art-group "skel-sig-highres" + :prefix "" + :draw-frames '((0 208) (327 672) (4371 4629)) + :scissor-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-daxpants" + :level 'loutro2 + :art-group "skel-ottsel-daxpants" + :prefix "" + :draw-frames '((2764 2918) (2996 3380) (3453 3598) (4371 4513) (4683 5401)) + :scissor-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-outro" + :level 'loutro2 + :art-group "skel-ottsel-dummy-outro" + :prefix "" + :draw-frames '((0 327) (786 1061) (1168 1245) (1387 1526) (1803 1883) (3292 3380) (3598 3689)) + :scissor-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 'outrocst + :art-group "skel-ashelin-highres" + :prefix "" + :draw-frames '((1300 1387) (1526 1890) (3380 3453) (4371 4513) (4629 4683)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "tess-highres" + :level 'outrocst + :art-group "skel-tess-highres" + :prefix "" + :draw-frames '((0 208) (786 916) (1803 2276) (2385 2722) (2749 2918) (2996 3010)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "samos-highres" + :level 'outrocst + :art-group "skel-samos-highres" + :prefix "" + :draw-frames '((0 208) (327 672) (4371 4513) (4578 4629)) + :scissor-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 'outrocst + :art-group "skel-seem-highres" + :prefix "" + :draw-frames '((1300 1387) (1526 1890) (3380 3453) (4371 4513) (4629 4683)) + :scissor-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 'outrocst + :art-group "skel-kleever-highres" + :prefix "" + :draw-frames '((0 208) (786 916) (3689 4169) (4371 4513) (4513 4578)) + :scissor-frames '((3535 4169)) + :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 'outrocst + :art-group "skel-pecker-highres" + :prefix "" + :draw-frames '((327 786) (4371 4513) (4578 4629) (5020 5300)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "onin-simple" + :level 'loutro3 + :art-group "skel-onin-simple" + :prefix "" + :draw-frames '((327 495) (4371 4629)) + :scissor-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-ship-door" + :level 'loutro3 + :art-group "skel-precursor-ship-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 "torn-simple" + :level 'outcast3 + :art-group "skel-torn-simple" + :prefix "" + :draw-frames '((1300 1387) (1526 1890) (3380 3453) (4371 4513) (4629 4683)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + (new 'static 'scene-actor + :name "keira-simple" + :level 'outcast3 + :art-group "skel-keira-simple" + :prefix "" + :draw-frames '((327 672) (4371 4513) (4578 4629)) + :scissor-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-arena-plat" + :level 'wasstada + :art-group "skel-wstd-arena-plat" + :prefix "" + :draw-frames '((0 208) (786 916) (3689 4169) (4371 4513) (4513 4578)) + :scissor-frames '() + :shadow-frames '((min max)) + :cloth-reset-frames '() + :cloth-commands '() + :flags #x1 + :shadow-flags -1 + :shadow-volume-joint #f + ) + ) + :load-point "wasstada-outro" + :end-point "title-credits" + :borrow '((wasstada 0 loutro special) (outrocst 0 loutro2 special) (wasall 0 loutro3 special)) + :sfx-volume -1.0 + :ambient-volume -1.0 + :music-delay 1500.0 + :scene-task #x10f + :on-running #f + :on-complete #f + ) + ) diff --git a/test/decompiler/reference/jak3/levels/wascity/wasall-part_REF.gc b/test/decompiler/reference/jak3/levels/wascity/wasall-part_REF.gc new file mode 100644 index 0000000000..bc45c467de --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wasall-part_REF.gc @@ -0,0 +1,1875 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defpartgroup group-desert-buggy-dust + :id 383 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1587 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1587 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:num 0.2) + (: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-y (meters 0.06666667)) + (:scalevel-x (meters 0.016666668)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.044444446 -0.044444446) + (:accel-y (meters 0.00016666666) (meters 0.00016666666)) + (:friction 0.9) + (:timer (seconds 3)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-buggy-dust-stop + :id 384 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1588 :flags (sp7)) (sp-item 1589 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1588 + :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.13333334)) + (:scalevel-x (meters 0.016666668)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.016666668 -0.016666668) + (:accel-y (meters 0) (meters 0.0001)) + (:friction 0.95) + (:timer (seconds 10)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z left-multiply-quat)) + (:next-time (seconds 0.335)) + (:next-launcher 1590) + (:conerot-x (degrees 0) (degrees -10)) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1590 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +;; definition for function spt-birth-func-brightness-buggy-dirt-bits +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-buggy-dirt-bits ((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 1589 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-buggy-dirt-bits) + (:num 1.0 2.0) + (:scale-x (meters 0.1) (meters 0.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-z (meters 0.06666667) (meters 0.06666667)) + (: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 -20)) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +;; definition for function spt-birth-func-part-buggy-dirt-bits +(defun spt-birth-func-part-buggy-dirt-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-dirt-bits arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-buggy-dust-skid + :id 385 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 64) + :parts ((sp-item 1591 :flags (sp7)) (sp-item 1592 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1591 + :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 1593) + (:conerot-x (degrees 10) (degrees 30)) + (:conerot-y (degrees -10) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1593 + :init-specs ((:scalevel-x (meters 0.0033333334)) (:scalevel-y :copy scalevel-x)) + ) + +;; failed to figure out what this is: +(defpart 1592 + :init-specs ((:texture (rockbit01 level-default-sprite)) + (:birth-func 'spt-birth-func-part-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-buggy-skid-bits +(defun spt-birth-func-part-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-dirt-bits arg0 arg1 arg2) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-wascity-door-steam + :id 386 + :duration (seconds 1.335) + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1594 :flags (sp7) :period (seconds 30) :length (seconds 1.335))) + ) + +;; failed to figure out what this is: +(defpart 1594 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:scale-x (meters 0.5) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 16.0) + (:vel-z (meters 0.01) (meters 0.013333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13)) + (:userdata :data (new 'static 'boxed-array :type int32 10 1 0 #x405c00)) + (:conerot-x (degrees -10) (degrees 20)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-wascity-door-pre-steam1 + :id 387 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1595 :period (seconds 20) :length (seconds 1) :offset 200)) + ) + +;; failed to figure out what this is: +(defpart 1595 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 1.0) + (:x (meters -3) (meters 8)) + (:y (meters -6)) + (:scale-x (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 120.0 10.0) + (:b 80.0 20.0) + (:a 0.0) + (:vel-z (meters -0.06666667) (meters 0.13333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.10666667) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.96) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:next-time (seconds 0.5)) + (:next-launcher 1596) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1596 + :init-specs ((:fade-a -0.011428571)) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-wascity-door-pre-steam2 + :id 388 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1597 :period (seconds 20) :length (seconds 1) :offset 200)) + ) + +;; failed to figure out what this is: +(defpart 1597 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 1.0) + (:x (meters -3) (meters 8)) + (:y (meters -6)) + (:scale-x (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 120.0 10.0) + (:b 80.0 20.0) + (:a 0.0) + (:vel-z (meters -0.06666667) (meters 0.13333334)) + (:scalevel-x (meters 0.0033333334) (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.10666667) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.96) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:next-time (seconds 0.5)) + (:next-launcher 1596) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-wascity-door-big-steam1 + :id 389 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1598 :period (seconds 30) :length (seconds 2))) + ) + +;; failed to figure out what this is: +(defpart 1598 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 2.0) + (:x (meters -27)) + (:y (meters 8)) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 16.0) + (:vel-x (meters -0.05) (meters -0.033333335)) + (:vel-y (meters -0.05) (meters -0.033333335)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.93 0.03) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-wascity-door-big-steam2 + :id 390 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1599 :period (seconds 30) :length (seconds 2))) + ) + +;; failed to figure out what this is: +(defpart 1599 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 2.0) + (:x (meters 27)) + (:y (meters 8)) + (:scale-x (meters 2) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 16.0 16.0) + (:vel-x (meters 0.05) (meters 0.033333335)) + (:vel-y (meters -0.05) (meters -0.033333335)) + (:scalevel-x (meters 0.01) (meters 0.01)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:friction 0.93 0.03) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-13)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-wascity-door-big-pre-steam1 + :id 391 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1600 :period (seconds 20) :length (seconds 1))) + ) + +;; failed to figure out what this is: +(defpart 1600 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 1.0) + (:x (meters -10) (meters -20)) + (:y (meters 0)) + (:scale-x (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 120.0 10.0) + (:b 80.0 20.0) + (:a 0.0) + (:vel-z (meters -0.13333334) (meters 0.26666668)) + (:scalevel-x (meters 0.01) (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.10666667) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.96) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:next-time (seconds 0.5)) + (:next-launcher 1601) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1601 + :init-specs ((:fade-a -0.011428571)) + ) + +;; failed to figure out what this is: +(defpartgroup group-part-wascity-door-big-pre-steam2 + :id 392 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1602 :period (seconds 20) :length (seconds 1))) + ) + +;; failed to figure out what this is: +(defpart 1602 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 1.0) + (:x (meters 10) (meters 20)) + (:y (meters 0)) + (:scale-x (meters 3)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 150.0) + (:g 120.0 10.0) + (:b 80.0 20.0) + (:a 0.0) + (:vel-z (meters -0.13333334) (meters 0.26666668)) + (:scalevel-x (meters 0.01) (meters 0.006666667)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a 0.10666667) + (:accel-y (meters 0) (meters 0.00033333333)) + (:friction 0.96) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:next-time (seconds 0.5)) + (:next-launcher 1601) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-wasdoors-gaslamp + :id 393 + :flags (sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1603 :fade-after (meters 200) :falloff-to (meters 300) :flags (sp7)) + (sp-item 1604 :fade-after (meters 200) :falloff-to (meters 300) :flags (sp7)) + (sp-item 1605 :fade-after (meters 200) :falloff-to (meters 300) :flags (sp7)) + (sp-item 1606 :fade-after (meters 200) :falloff-to (meters 300) :flags (sp7)) + (sp-item 1607 :fade-after (meters 20) :falloff-to (meters 30) :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 1603 + :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 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-z (meters -0.0016666667) (meters 0.0016666667)) + (:scalevel-x (meters -0.016666668)) + (:accel-x (meters -0.001)) + (:accel-z (meters 0.0013333333) (meters 0.0013333333)) + (:timer (seconds 0.005)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:userdata 0.0) + (:func 'live-func-curve) + (:conerot-x (degrees 0)) + (:conerot-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(if #t + (set! *wasdoors-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! *wasdoors-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! *wasdoors-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! *wasdoors-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-wasdoors-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-wasdoors-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-wasdoors-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! *wasdoors-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! *wasdoors-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! *wasdoors-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-wasdoors-gas-lamp-flame-curve-settings*, type particle-curve-settings +(define *part-wasdoors-gas-lamp-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* 1603 init-specs 17 initial-valuef) + (the-as float *part-wasdoors-gas-lamp-flame-curve-settings*) + ) + +;; failed to figure out what this is: +(set! (-> *part-wasdoors-gas-lamp-flame-curve-settings* color-start) *wasdoors-range-color-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasdoors-gas-lamp-flame-curve-settings* alpha-start) *wasdoors-range-alpha-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasdoors-gas-lamp-flame-curve-settings* scale-x-start) *wasdoors-range-scale-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-wasdoors-gas-lamp-flame-curve-settings* scale-y-start) *wasdoors-range-scale-flame-y*) + +;; failed to figure out what this is: +(set! (-> *part-wasdoors-gas-lamp-flame-curve-settings* r-scalar) *r-wasdoors-curve-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasdoors-gas-lamp-flame-curve-settings* g-scalar) *g-wasdoors-curve-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasdoors-gas-lamp-flame-curve-settings* b-scalar) *b-wasdoors-curve-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasdoors-gas-lamp-flame-curve-settings* a-scalar) *wasdoors-curve-alpha-flame*) + +;; failed to figure out what this is: +(set! (-> *part-wasdoors-gas-lamp-flame-curve-settings* scale-x-scalar) *wasdoors-curve-flame-x*) + +;; failed to figure out what this is: +(set! (-> *part-wasdoors-gas-lamp-flame-curve-settings* scale-y-scalar) *wasdoors-curve-flame-y*) + +;; failed to figure out what this is: +(defpart 1604 + :init-specs ((:texture (explosion-edge level-default-sprite)) + (:num 1.0 1.0) + (:x (meters -0.3) (meters 0.6)) + (:y (meters -0.3) (meters 0.6)) + (:z (meters 0.3)) + (: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) + (:scalevel-x (meters -0.00033333333)) + (:fade-a -0.64) + (:accel-x (meters -0.001)) + (:accel-z (meters 0.0013333333) (meters 0.0013333333)) + (:timer (seconds 0.335)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1605 + :init-specs ((:texture (glow level-default-sprite)) + (:num 0.4) + (:x (meters -1)) + (:z (meters 2.5)) + (: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 1606 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 0.01 0.05) + (:scale-x (meters 0.3) (meters 0.3)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 32.0) + (:b 8.0) + (:a 255.0) + (:vel-z (meters 0.06666667) (meters 0.016666668)) + (:fade-g -0.16666667) + (:fade-b -5.0) + (:fade-a -1.7) + (:accel-x (meters 0.0016666667)) + (:friction 0.95) + (:timer (seconds 2) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:conerot-x (degrees -20) (degrees 40)) + (:conerot-y (degrees -20) (degrees 40)) + (:rotate-y (degrees -40)) + (:rotate-z (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1607 + :init-specs ((:num 0.2) + (:x (meters 0) (meters 2)) + (:y (meters -0.5) (meters 1)) + (:z (meters 6)) + (:rot-x 8) + (:r 8192.0) + (:g 1228.8) + (:b 1024.0) + (:accel-x (meters 0.001)) + (:accel-z (meters 0.0016666667)) + (:timer (seconds 0.335)) + (:flags (distort)) + (:rotate-y (degrees -30)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-wasdoors-red-lights + :id 394 + :bounds (static-bspherem 0 0 0 8) + :parts ((sp-item 1608 :fade-after (meters 120) :flags (sp6))) + ) + +;; failed to figure out what this is: +(defpart 1608 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 0.1)) + (:rot-x (degrees 1.125)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 0.0 32.0) + (:b 0.0) + (:a 16.0) + (:omega (degrees 2715.75)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 1024.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-elevator-palace-door + :id 395 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1609 :flags (sp7) :period (seconds 20) :length (seconds 2))) + ) + +;; failed to figure out what this is: +(defpart 1609 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 1.0 1.0) + (:x (meters -5) (meters 10)) + (:y (meters -7)) + (:z (meters -2) (meters 4)) + (:scale-x (meters 4) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 90.0) + (:g 70.0) + (:b 50.0) + (:a 32.0 32.0) + (:vel-y (meters 0.033333335) (meters 0.033333335)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:accel-y (meters 0.00016666666) (meters 0.00016666666)) + (:friction 0.93) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2)) + (:conerot-x (degrees -60) (degrees 120)) + (:conerot-z (degrees -30) (degrees 60)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-elevator-palace-door-close + :id 396 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1610 :flags (sp7) :period (seconds 20) :length (seconds 0.035))) + ) + +;; failed to figure out what this is: +(defpart 1610 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 30.0 10.0) + (:x (meters -5) (meters 10)) + (:y (meters -20)) + (:z (meters -5) (meters 10)) + (:scale-x (meters 4) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 90.0) + (:g 70.0) + (:b 50.0) + (:a 32.0 32.0) + (:vel-y (meters 0.06666667) (meters 0.033333335)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.053333335 -0.053333335) + (:accel-y (meters 0.00016666666) (meters 0.00016666666)) + (:friction 0.93) + (:timer (seconds 5)) + (:flags (sp-cpuinfo-flag-2)) + (:conerot-x (degrees -60) (degrees 120)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-fireball-shot + :id 397 + :flags (sp0) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 1611 :flags (sp6)) (sp-item 1612)) + ) + +;; failed to figure out what this is: +(defpart 1611 + :init-specs ((:texture (glow level-default-sprite)) + (:num 1.0) + (:scale-x (meters 100) (meters 20)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 180.0) + (:b 0.0) + (:a 20.0 40.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpart 1612 + :init-specs ((:texture (glow-hotdot level-default-sprite)) + (:num 1.0) + (:scale-x (meters 40) (meters 4)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 255.0) + (:scalevel-x (meters -1)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-fireball-shot-trail + :id 398 + :flags (sp0 sp13) + :bounds (static-bspherem 0 0 0 4) + :parts ((sp-item 1613)) + ) + +;; failed to figure out what this is: +(defpart 1613 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 1.0) + (:x (meters 0) (meters 10)) + (:scale-x (meters 30) (meters 10)) + (:scale-y (meters 20) (meters 5)) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:scalevel-x (meters -0.06666667) (meters -0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-g -2.6666667) + (:fade-b -3.4) + (:accel-y (meters -0.0033333334) (meters -0.016666668)) + (:friction 0.99) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 launch-along-z)) + (:next-time (seconds 0.25)) + (:next-launcher 1614) + (:rotate-y (degrees 0) (degrees 3600)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1614 + :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-desert-fireball-explosion + :id 399 + :flags (sp0) + :bounds (static-bspherem 0 0 0 1000) + :parts ((sp-item 1615 :flags (sp3))) + ) + +;; failed to figure out what this is: +(defpart 1615 + :init-specs ((:texture (middot level-default-sprite)) + (:num 2.0) + (:scale-x (meters 2500)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:scalevel-x (meters -6.6666665)) + (:scalevel-y :copy scalevel-x) + (:fade-b -0.10666667) + (:timer (seconds 3.335)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.167)) + (:next-launcher 1616) + ) + ) + +;; failed to figure out what this is: +(defpart 1616 + :init-specs ((:scalevel-x (meters -3.3333333)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.21333334) + (:next-time (seconds 0.335)) + (:next-launcher 1617) + ) + ) + +;; failed to figure out what this is: +(defpart 1617 + :init-specs ((:scalevel-x (meters -2.6666667)) + (:scalevel-y :copy scalevel-x) + (:next-time (seconds 0.5)) + (:next-launcher 1618) + ) + ) + +;; failed to figure out what this is: +(defpart 1618 + :init-specs ((:scalevel-x (meters -2.3333333)) + (:scalevel-y :copy scalevel-x) + (:next-time (seconds 0.667)) + (:next-launcher 1619) + ) + ) + +;; failed to figure out what this is: +(defpart 1619 + :init-specs ((:scalevel-x (meters -2)) (:scalevel-y :copy scalevel-x)) + ) + +;; failed to figure out what this is: +(defpartgroup group-cloud-spread + :id 400 + :duration (seconds 200) + :linger-duration (seconds 20) + :flags (sp0 sp1 sp4) + :bounds (static-bspherem 0 0 0 1000) + :parts ((sp-item 1620 :flags (is-3d sp7) :period (seconds 200) :length (seconds 0.017))) + ) + +;; failed to figure out what this is: +(defpart 1620 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:num 100.0) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 0) (meters 2000)) + (:scale-x (meters 100) (meters 300)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 64.0 64.0) + (:accel-z (meters 0.033333335)) + (:friction 0.3) + (:timer (seconds 20)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:next-time (seconds 6.4)) + (:next-launcher 1621) + (:conerot-y (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1621 + :init-specs ((:fade-a 0.21333334) (:friction 0.0)) + ) + +;; definition for function spt-birth-func-brightness-part-desert-boss-slide-dust +;; WARN: Return type mismatch float vs none. +(defun spt-birth-func-brightness-part-desert-boss-slide-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*)) 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-3))) + ) + (none) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-boss-slide-dust + :id 401 + :flags (sp0) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 1622)) + ) + +;; failed to figure out what this is: +(defpart 1622 + :init-specs ((:texture (dirtpuff01 level-default-sprite)) + (:birth-func 'spt-birth-func-brightness-part-desert-boss-slide-dust) + (:num 0.5) + (: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-z (meters 0) (meters -0.01)) + (:scalevel-x (meters 0.0033333334)) + (:rotvel-z (degrees -0.2) (degrees 0.4)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.10666667 -0.10666667) + (:accel-y (meters 0) (meters 0.000033333334)) + (:friction 0.95) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:conerot-y (degrees -20) (degrees 20)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-desert-final-boss-gate + :id 402 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 10) + :parts ((sp-item 1623 :flags (sp6 sp7)) + (sp-item 1624 :flags (sp6 sp7)) + (sp-item 1625 :flags (sp7)) + (sp-item 1626 :flags (sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 1623 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 4) (meters 3)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 60.0 10.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +;; failed to figure out what this is: +(defpart 1624 + :init-specs ((:texture (glow-soft level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 3)) + (:rot-x (degrees 22.5)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 64.0) + (:g 0.0) + (:b 255.0) + (:a 60.0 10.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + ) + ) + +;; failed to figure out what this is: +(defpart 1625 + :init-specs ((:texture (tinyspeck level-default-sprite)) + (:num 20.0) + (:scale-x (meters 0.5)) + (:scale-y :copy scale-x) + (:r 32.0 64.0) + (:g 32.0) + (:b 255.0) + (:a 128.0) + (:omega (degrees 0.1125)) + (:vel-y (meters 0.06666667) (meters 0.06666667)) + (:friction 0.9) + (:timer (seconds 0.5) (seconds 0.497)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:conerot-x (degrees 0) (degrees 360)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1626 + :init-specs ((:texture (lightning-anim-01 level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0 1.0) + (:scale-x (meters 1) (meters 1)) + (:rot-x 4) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0) + (:g 100.0) + (:b 255.0) + (:a 128.0 128.0) + (:scalevel-x (meters -0.006666667) (meters 0.013333334)) + (:rotvel-z (degrees -0.53333336) (degrees 1.0666667)) + (:scalevel-y :copy scalevel-x) + (:timer (seconds 0.017) (seconds 0.13)) + (:flags (sp-cpuinfo-flag-3 sp-cpuinfo-flag-14)) + (:userdata :data (new 'static 'boxed-array :type int32 5 1 0 #x405700 #x405800 #x405900)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-precursor-staff-shot-glow + :id 403 + :flags (sp0 sp12) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1627)) + ) + +;; failed to figure out what this is: +(defpart 1627 + :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 1628) + ) + ) + +;; failed to figure out what this is: +(defpart 1628 + :init-specs ((:fade-a -0.6)) + ) + +;; failed to figure out what this is: +(defpartgroup group-precursor-staff-shot + :id 404 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1629 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1629 + :init-specs ((:texture (radial-gradient-yellow level-default-sprite)) + (:num 20.0) + (:y (meters 0) (meters 0.03)) + (:scale-x (meters 0.1)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 64.0) + (:b 64.0) + (:a 32.0 32.0) + (:omega (degrees 0.0225)) + (:vel-z (meters 0.03) (meters 0.0033333334)) + (:timer (seconds 0.835) (seconds 0.08)) + (:flags (sp-cpuinfo-flag-3)) + (:func 'sparticle-motion-blur) + (:next-time (seconds 0.635)) + (:next-launcher 1630) + (:rotate-y (degrees 0)) + (:rotate-z (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1630 + :init-specs ((:scalevel-x (meters -0.00066666666) (meters 0.0013333333)) + (:scalevel-y :copy scalevel-x) + (:accel-x (meters -0.013333334) (meters 0.026666667)) + (:accel-y (meters -0.013333334) (meters 0.026666667)) + (:friction 0.5 0.1) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-precursor-staff-hit + :id 405 + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1631 :flags (sp3 sp7))) + ) + +;; failed to figure out what this is: +(defpart 1631 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 128.0) + (:omega (degrees 4511.25)) + (:scalevel-x (meters -0.033333335)) + (:scalevel-y (meters -0.06666667)) + (:fade-a -0.85333335) + (:timer (seconds 0.5)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-ship-door-light + :id 406 + :duration (seconds 1) + :linger-duration (seconds 1) + :flags (sp0) + :bounds (static-bspherem 0 0 0 640) + :parts ((sp-item 1632 :flags (sp6)) + (sp-item 1633 :flags (is-3d)) + (sp-item 1634 :flags (is-3d)) + (sp-item 1635 :flags (is-3d)) + ) + ) + +;; failed to figure out what this is: +(defpart 1632 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 16)) + (:rot-x (degrees 22.5)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 128.0) + (:b 128.0) + (:a 32.0 6.0) + (:omega (degrees 4511.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow)) + (:userdata 16384.0) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1636 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 6) (meters 1)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 0)) + (:scale-y (meters 20)) + (: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 1637) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 20)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 1637 + :init-specs ((:fade-a -2.56)) + ) + +;; failed to figure out what this is: +(defpart 1633 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 6) (meters 1)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 45)) + (:scale-y (meters 20)) + (: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 1637) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 20)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 1634 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 6) (meters 1)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees -45)) + (:scale-y (meters 20)) + (: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 1637) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 20)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 1635 + :init-specs ((:texture (vol-light level-default-sprite)) + (:num 0.1 0.1) + (:x (meters 0)) + (:y (meters 0)) + (:z (meters 6) (meters 1)) + (:scale-x (meters 10)) + (:rot-x (degrees 0)) + (:rot-y (degrees 0)) + (:rot-z (degrees 90)) + (:scale-y (meters 20)) + (: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 1638) + (:rotate-x (degrees 0)) + (:rotate-y (degrees 20)) + (:rotate-z (degrees 90)) + ) + ) + +;; failed to figure out what this is: +(defpart 1638 + :init-specs ((:fade-a -1.28)) + ) + +;; failed to figure out what this is: +(defpartgroup group-mothership-thrusters + :id 407 + :flags (sp0) + :bounds (static-bspherem 0 0 0 100) + :parts ((sp-item 1639 :flags (sp6)) (sp-item 1640 :flags (sp6)) (sp-item 1641 :flags (sp7))) + ) + +;; failed to figure out what this is: +(defpart 1640 + :init-specs ((:texture (colorflash level-default-sprite)) + (:num 1.0) + (:scale-x (meters 10) (meters 1)) + (: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 255.0) + (:omega (degrees 45011.25)) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-3 glow)) + (:userdata 4096.0) + ) + ) + +;; failed to figure out what this is: +(defpart 1639 + :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 0.0) + (:g 100.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: +(defpart 1641 + :init-specs ((:texture (big-cloud level-default-sprite)) + (:birth-func 'birth-func-texture-group) + (:num 1.0) + (:x (meters 0) (meters 4)) + (:scale-x (meters 6) (meters 4)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 100.0 64.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-x (meters -0.0033333334) (meters 0.006666667)) + (:vel-y (meters -0.033333335) (meters -0.016666668)) + (:vel-z (meters -0.0033333334) (meters 0.006666667)) + (:scalevel-x (meters 0.02) (meters 0.04)) + (:rotvel-z (degrees -0.033333335) (degrees 0.06666667)) + (:scalevel-y :copy scalevel-x) + (:fade-a 2.56) + (:friction 0.99) + (:timer (seconds 3)) + (: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.085)) + (:next-launcher 1642) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1642 + :init-specs ((:fade-a -0.07314286 -0.14628571)) + ) + +;; failed to figure out what this is: +(defpartgroup group-tentacle-warn + :id 408 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 40) + :parts ((sp-item 1643 :flags (sp7)) (sp-item 1644 :flags (sp7)) (sp-item 1645 :flags (is-3d sp7))) + ) + +;; failed to figure out what this is: +(defpart 1643 + :init-specs ((:texture (lakedrop level-default-sprite)) + (:num 3.0) + (:x (meters 0) (meters 6)) + (:y (meters -3) (meters -5)) + (:scale-x (meters 0.1) (meters 0.3)) + (:scale-y :copy scale-x) + (:r 130.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 0.0) + (:vel-y (meters 0.013333334) (meters 0.006666667)) + (:fade-a 0.10666667) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:func 'check-bubble-height) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1644 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 3.0) + (:x (meters 0) (meters 3)) + (:y (meters 0)) + (:scale-x (meters 1) (meters 1)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 130.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 32.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.21333334) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 1)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1645 + :init-specs ((:texture (splash-foam level-default-sprite)) + (:num 0.3) + (:x (meters 0)) + (:y (meters 0)) + (:scale-x (meters 3)) + (:rot-y (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 130.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 40.0 40.0) + (:scalevel-x (meters 0.033333335)) + (:scalevel-y :copy scalevel-x) + (:fade-a -0.17777778) + (:timer (seconds 1.5)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-tentacle-attack + :id 409 + :flags (sp0 sp4) + :bounds (static-bspherem 0 0 0 20) + :parts ((sp-item 1646 :flags (sp7) :period (seconds 10) :length (seconds 0.067)) + (sp-item 1647 :flags (sp7) :period (seconds 10) :length (seconds 0.067)) + (sp-item 1648 :flags (sp7) :period (seconds 10) :length (seconds 0.067) :offset 325) + ) + ) + +;; failed to figure out what this is: +(defpart 1646 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:x (meters 0) (meters 1)) + (:y (meters 0)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 130.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:vel-y (meters 0.013333334) (meters 0.026666667)) + (:scalevel-x (meters 0.001) (meters 0.001)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 3)) + (: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 1647 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 100.0) + (:x (meters 0) (meters 1)) + (:y (meters 0)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 130.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:vel-y (meters 0.013333334)) + (: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 -0.21333334) + (:accel-y (meters -0.000033333334)) + (:timer (seconds 2)) + (:flags (sp-cpuinfo-flag-0 sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 78) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpart 1648 + :init-specs ((:texture (water-drops level-default-sprite)) + (:num 10.0) + (:x (meters 0) (meters 2)) + (:y (meters 0)) + (:scale-x (meters 1) (meters 2)) + (:rot-z (degrees 0) (degrees 360)) + (:scale-y :copy scale-x) + (:r 130.0 50.0) + (:g :copy r) + (:b :copy r) + (:a 64.0 64.0) + (:vel-y (meters 0.013333334) (meters 0.026666667)) + (:scalevel-x (meters 0.001) (meters 0.001)) + (:rotvel-z (degrees -0.1) (degrees 0.2)) + (:scalevel-y :copy scalevel-x) + (:accel-y (meters -0.0016666667)) + (:timer (seconds 13.667)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 launch-along-z)) + (:conerot-x (degrees 0) (degrees 10)) + (:rotate-y (degrees 0) (degrees 3600)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-wascity-burning-bush-holo-on + :id 381 + :flags (sp4) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 1649 :flags (is-3d sp6 sp7)) + (sp-item 1650 :flags (is-3d sp6 sp7)) + (sp-item 1651 :flags (is-3d sp6 sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 1652 + :init-specs ((:texture (green-lightning level-default-sprite)) + (:num 2.0 4.0) + (:x (meters -2.25) (meters 4.5)) + (:y (meters 6.1)) + (:scale-x (meters 1)) + (:rot-z (degrees 0) 1 (degrees 180)) + (:scale-y (meters 6)) + (:r 128.0 1 128.0) + (:g 255.0) + (:b 32.0) + (:a 0.0) + (:fade-a 1.6) + (:timer (seconds 0.135)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3)) + (:next-time (seconds 0.067)) + (:next-launcher 1653) + (:rotate-y (degrees 0) 1 (degrees 180)) + ) + ) + +;; failed to figure out what this is: +(defpart 1653 + :init-specs ((:fade-a -1.6)) + ) + +;; failed to figure out what this is: +(defpart 1649 + :init-specs ((:texture (kleever-fist-logo desert-sprite)) + (:num 1.0) + (:y (meters 6)) + (:z (meters -0.02)) + (:scale-x (meters 4.5) (meters 0.1)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 55.0) + (:g 55.0) + (:b 55.0) + (:a 160.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1651 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters 6)) + (:z (meters 0.05)) + (:scale-x (meters 7)) + (:rot-x (degrees 90)) + (:rot-y (degrees 90)) + (:rot-z (degrees 90)) + (:scale-y (meters 8)) + (:r 255.0) + (:g 60.0) + (:b 10.0) + (:a 64.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1650 + :init-specs ((:texture (kleever-fist-logo desert-sprite)) + (:num 1.0) + (:y (meters 6)) + (:z (meters 0.02)) + (:scale-x (meters 4.8) (meters 0.1)) + (:rot-x (degrees 90)) + (:rot-y (degrees 90)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 16.0 16.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-4 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpartgroup group-wascity-burning-bush-holo-off + :id 382 + :flags (sp4) + :bounds (static-bspherem 0 0 0 12) + :parts ((sp-item 1654 :flags (is-3d sp6 sp7)) + (sp-item 1655 :flags (is-3d sp6 sp7)) + (sp-item 1656 :flags (is-3d sp6 sp7)) + ) + ) + +;; failed to figure out what this is: +(defpart 1654 + :init-specs ((:texture (burning-bush-off desert-sprite)) + (:num 1.0) + (:y (meters 6)) + (:z (meters -0.02)) + (:scale-x (meters 4.5) (meters 0.1)) + (:rot-x (degrees 90)) + (:rot-z (degrees 0)) + (:scale-y :copy scale-x) + (:r 128.0) + (:g 255.0) + (:b 255.0) + (:a 64.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1656 + :init-specs ((:texture (middot level-default-sprite)) + (:num 1.0) + (:y (meters 6)) + (:z (meters 0.05)) + (:scale-x (meters 7)) + (:rot-x (degrees 90)) + (:rot-y (degrees 90)) + (:rot-z (degrees 90)) + (:scale-y (meters 8)) + (:r 64.0 64.0) + (:g 128.0 128.0) + (:b 255.0) + (:a 32.0 32.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1657 + :init-specs ((:texture (common-white common)) + (:num 1.0) + (:y (meters 6)) + (:z (meters -0.05)) + (:scale-x (meters 5)) + (:rot-x (degrees -90)) + (:rot-y (degrees 90)) + (:rot-z (degrees 90)) + (:scale-y (meters 6)) + (:r 255.0) + (:g 128.0) + (:b 0.0) + (:a 0.0 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-4 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + +;; failed to figure out what this is: +(defpart 1655 + :init-specs ((:texture (burning-bush-off desert-sprite)) + (:num 1.0) + (:y (meters 6)) + (:z (meters 0.02)) + (:scale-x (meters 5) (meters 0.1)) + (:rot-x (degrees 90)) + (:rot-y (degrees 90)) + (:rot-z (degrees 90)) + (:scale-y :copy scale-x) + (:r 255.0) + (:g 255.0) + (:b 255.0) + (:a 16.0 8.0) + (:timer (seconds 0.017)) + (:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-4 sp-cpuinfo-flag-13 left-multiply-quat)) + (:rotate-y (degrees 0)) + ) + ) + + + + 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 0000000000..1fb33ca566 --- /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 0000000000..3310e98ccb --- /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 0000000000..d3e539c31e --- /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 'bounding-box)) + (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*! (the-as vector s3-0) (-> s5-0 trans) (-> this aim-dir) 2457600.0) + (set! (-> s3-0 min 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 new file mode 100644 index 0000000000..47cde37235 --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/wascitya-obs_REF.gc @@ -0,0 +1,150 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(defskelgroup skel-wascity-stad-door wascity-stad-door wascity-stad-door-lod0-jg wascity-stad-door-idle-ja + ((wascity-stad-door-lod0-mg (meters 999999))) + :bounds (static-spherem 0 8 0 20) + ) + +;; definition of type wascity-stad-door +(deftype wascity-stad-door (com-airlock) + () + ) + +;; definition for method 3 of type wascity-stad-door +(defmethod inspect ((this wascity-stad-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 wascity-stad-door +(defmethod init-from-entity! ((this wascity-stad-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 0.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 0.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-wascity-stad-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) + (set! (-> this allow-pilot?) #t) + (go (method-of-object this close) #t) + ) + +;; definition of type waspala-elevator +(deftype waspala-elevator (elevator) + () + ) + +;; definition for method 3 of type waspala-elevator +(defmethod inspect ((this waspala-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-waspala-elevator waspala-elevator waspala-elevator-lod0-jg waspala-elevator-idle-ja + ((waspala-elevator-lod0-mg (meters 999999))) + :bounds (static-spherem 0 20 0 30) + ) + +;; definition for method 47 of type waspala-elevator +(defmethod elevator-method-47 ((this waspala-elevator)) + (if *target* + (< (vector-vector-xz-distance (target-pos 0) (-> this root trans)) + (* 0.4 (-> this root root-prim prim-core world-sphere w)) + ) + #f + ) + ) + +;; definition for method 31 of type waspala-elevator +(defmethod get-art-group ((this waspala-elevator)) + (art-group-get-by-name *level* "skel-waspala-elevator" (the-as (pointer level) #f)) + ) + +;; definition for method 32 of type waspala-elevator +;; WARN: Return type mismatch collide-shape-moving vs none. +(defmethod init-collision! ((this waspala-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 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 8192.0 0.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 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 8192.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) + ) + (none) + ) + +;; 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 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 0000000000..279e25c3a2 --- /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 0000000000..29dae7b7ca --- /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 0000000000..2c2226cefd --- /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 0000000000..eb48e9cbb9 --- /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 0000000000..c541d3dbff --- /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 0000000000..feed65e53f --- /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 0000000000..15b526462a --- /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 0000000000..7c6087ca33 --- /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 0000000000..0cf4e62f92 --- /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 0000000000..1e5489182b --- /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 0000000000..85bc699abc --- /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 0000000000..b826db394b --- /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 0000000000..07e0671079 --- /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 0000000000..9d4e18d03f --- /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 0000000000..4d80ee3931 --- /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 0000000000..f3fe20db0a --- /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* (the-as bounding-box 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 0000000000..a47c51bf0e --- /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 0000000000..b9688eaa6e --- /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 0000000000..29d1241f18 --- /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 new file mode 100644 index 0000000000..4c9f451c7d --- /dev/null +++ b/test/decompiler/reference/jak3/levels/wascity/waswide-obs_REF.gc @@ -0,0 +1,1155 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition of type wascity-windmill +(deftype wascity-windmill (process-drawable) + ((quat quaternion :inline) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type wascity-windmill +(defmethod inspect ((this wascity-windmill)) + (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)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-wascity-windmill wascity-windmill wascity-windmill-lod0-jg wascity-windmill-idle-ja + ((wascity-windmill-lod0-mg (meters 20)) (wascity-windmill-lod1-mg (meters 999999))) + :bounds (static-spherem 0 5 0 20) + ) + +;; failed to figure out what this is: +(defstate idle (wascity-windmill) + :virtual #t + :trans (behavior () + (quaternion-rotate-local-y! + (-> self root quat) + (-> self quat) + (lerp-scale -16384.0 16384.0 (sin (* 5.0 (the float (current-time)))) -1.0 1.0) + ) + ) + :code (behavior () + (until #f + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + #f + ) + :post ja-post + ) + +;; definition for function wascity-windmill-callback +;; WARN: Return type mismatch int vs none. +(defun wascity-windmill-callback ((arg0 cspace) (arg1 transformq)) + (quaternion-rotate-local-z! (-> arg1 quat) (-> arg1 quat) (* 109.22667 (the float (current-time)))) + (cspace<-parented-transformq-joint! arg0 arg1) + 0 + (none) + ) + +;; definition for method 11 of type wascity-windmill +(defmethod init-from-entity! ((this wascity-windmill) (arg0 entity-actor)) + (ctywide-entity-hack) + (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-wascity-windmill" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (quaternion-copy! (-> this quat) (-> this root quat)) + (let ((a0-7 (-> this node-list data 4))) + (set! (-> a0-7 param0) wascity-windmill-callback) + (set! (-> a0-7 param1) this) + (set! (-> a0-7 param2) (the-as basic 0)) + ) + (go (method-of-object this idle)) + ) + +;; definition of type wascity-flag-base +(deftype wascity-flag-base (process-drawable) + () + (:state-methods + idle + ) + (:methods + (get-skel (_type_) art-group) + (wascity-flag-base-method-22 (_type_) none) + ) + ) + +;; definition for method 3 of type wascity-flag-base +(defmethod inspect ((this wascity-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 (wascity-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) + (wascity-flag-base-method-22 self) + ) + ) + :code sleep-code + :post ja-post + ) + +;; definition for method 22 of type wascity-flag-base +;; WARN: Return type mismatch int vs none. +(defmethod wascity-flag-base-method-22 ((this wascity-flag-base)) + 0 + (none) + ) + +;; definition for method 11 of type wascity-flag-base +(defmethod init-from-entity! ((this wascity-flag-base) (arg0 entity-actor)) + (ctywide-entity-hack) + (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 wascity-flag-a +(deftype wascity-flag-a (wascity-flag-base) + () + ) + +;; definition for method 3 of type wascity-flag-a +(defmethod inspect ((this wascity-flag-a)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type wascity-flag-base inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-wascity-flag-a wascity-flag-a wascity-flag-a-lod0-jg wascity-flag-a-flap-ja + ((wascity-flag-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6 0 12) + ) + +;; definition for method 21 of type 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)) + ) + +;; definition of type wascity-flag-b +(deftype wascity-flag-b (wascity-flag-base) + () + ) + +;; definition for method 3 of type wascity-flag-b +(defmethod inspect ((this wascity-flag-b)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type wascity-flag-base inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-wascity-flag-b wascity-flag-b wascity-flag-b-lod0-jg wascity-flag-b-flap-ja + ((wascity-flag-b-lod0-mg (meters 999999))) + :bounds (static-spherem 0 6 0 12) + ) + +;; definition for method 21 of type 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)) + ) + +;; definition of type wascity-flag-c +(deftype wascity-flag-c (wascity-flag-base) + () + ) + +;; definition for method 3 of type wascity-flag-c +(defmethod inspect ((this wascity-flag-c)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type wascity-flag-base inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-wascity-flag-c wascity-flag-c wascity-flag-c-lod0-jg wascity-flag-c-flap-ja + ((wascity-flag-c-lod0-mg (meters 999999))) + :bounds (static-spherem 0 7 0 10) + ) + +;; definition for method 21 of type 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)) + ) + +;; definition of type wascity-flag-d +(deftype wascity-flag-d (wascity-flag-base) + () + ) + +;; definition for method 3 of type wascity-flag-d +(defmethod inspect ((this wascity-flag-d)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type wascity-flag-base inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-wascity-flag-d wascity-flag-d wascity-flag-d-lod0-jg wascity-flag-d-flap-ja + ((wascity-flag-d-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 25) + ) + +;; definition for method 21 of type 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)) + ) + +;; definition of type wascity-wind-fan +(deftype wascity-wind-fan (process-drawable) + ((quat quaternion :inline) + ) + (:state-methods + idle + ) + ) + +;; definition for method 3 of type wascity-wind-fan +(defmethod inspect ((this wascity-wind-fan)) + (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)) + (label cfg-4) + this + ) + +;; failed to figure out what this is: +(defskelgroup skel-wascity-wind-fan wascity-wind-fan wascity-wind-fan-lod0-jg wascity-wind-fan-idle-ja + ((wascity-wind-fan-lod0-mg (meters 20)) (wascity-wind-fan-lod1-mg (meters 999999))) + :bounds (static-spherem 0 5 0 15) + ) + +;; failed to figure out what this is: +(defstate idle (wascity-wind-fan) + :virtual #t + :trans (behavior () + (quaternion-rotate-local-y! (-> self root quat) (-> self quat) (* 18.204445 (the float (current-time)))) + ) + :code (behavior () + (ja :group! wascity-wind-fan-idle-ja :num! none :frame-num 0.0) + (sleep-code) + ) + :post ja-post + ) + +;; definition for method 11 of type wascity-wind-fan +(defmethod init-from-entity! ((this wascity-wind-fan) (arg0 entity-actor)) + (ctywide-entity-hack) + (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-wascity-wind-fan" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (logclear! (-> this mask) (process-mask actor-pause)) + (quaternion-copy! (-> this quat) (-> this root quat)) + (go (method-of-object this idle)) + ) + +;; definition of type shaker +(deftype shaker (structure) + ((axis vector :inline) + (start-time time-frame) + (decay-time float) + (amplitude float) + (freq float) + (y-decay-time float) + (y-amplitude float) + (y-freq float) + (shake float) + (y-shake float) + ) + (:methods + (shaker-method-9 (_type_) none) + ) + ) + +;; definition for method 3 of type shaker +;; INFO: this function exists in multiple non-identical object files +(defmethod inspect ((this shaker)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" this 'shaker) + (format #t "~1Taxis: #~%" (-> this axis)) + (format #t "~1Tstart-time: ~D~%" (-> this start-time)) + (format #t "~1Tdecay-time: ~f~%" (-> this decay-time)) + (format #t "~1Tamplitude: ~f~%" (-> this amplitude)) + (format #t "~1Tfreq: ~f~%" (-> this freq)) + (format #t "~1Ty-decay-time: ~f~%" (-> this y-decay-time)) + (format #t "~1Ty-amplitude: ~f~%" (-> this y-amplitude)) + (format #t "~1Ty-freq: ~f~%" (-> this y-freq)) + (format #t "~1Tshake: ~f~%" (-> this shake)) + (format #t "~1Ty-shake: ~f~%" (-> this y-shake)) + (label cfg-4) + this + ) + +;; definition for method 9 of type shaker +;; INFO: this function exists in multiple non-identical object files +;; WARN: Return type mismatch float vs none. +(defmethod shaker-method-9 ((this shaker)) + (let ((s5-0 (- (current-time) (-> this start-time)))) + (set! (-> this shake) (* (-> this amplitude) + (lerp-scale 1.0 0.0 (the float s5-0) 0.0 (-> this decay-time)) + (cos (* 65536.0 (/ (the float s5-0) (-> this freq)))) + ) + ) + (set! (-> this y-shake) (* (-> this y-amplitude) + (lerp-scale 1.0 0.0 (the float s5-0) 0.0 (-> this y-decay-time)) + (cos (* 65536.0 (/ (the float s5-0) (-> this y-freq)))) + ) + ) + ) + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-wascity-cactus wascity-cactus wascity-cactus-lod0-jg wascity-cactus-idle-ja + ((wascity-cactus-lod0-mg (meters 999999))) + :bounds (static-spherem 0 4 0 7) + ) + +;; failed to figure out what this is: +(defskelgroup skel-wascity-cactus-explode wascity-cactus wascity-cactus-explode-lod0-jg wascity-cactus-explode-idle-ja + ((wascity-cactus-explode-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0 0 80) + ) + +;; definition for symbol *wascity-cactus-exploder-params*, type joint-exploder-static-params +(define *wascity-cactus-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) + ) + ) + +;; definition of type wascity-cactus +(deftype wascity-cactus (process-focusable) + ((shakers shaker 6 :inline) + (incoming-attack-id uint32) + (incoming-attack-time time-frame) + (hit-points float) + ) + (:state-methods + idle + die + ) + (:methods + (wascity-cactus-method-30 (_type_) none) + (wascity-cactus-method-31 (_type_) none) + ) + ) + +;; definition for method 3 of type wascity-cactus +(defmethod inspect ((this wascity-cactus)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-focusable inspect))) + (t9-0 this) + ) + (format #t "~2Tshakers[6] @ #x~X~%" (-> this shakers)) + (format #t "~2Tincoming-attack-id: ~D~%" (-> this incoming-attack-id)) + (format #t "~2Tincoming-attack-time: ~D~%" (-> this incoming-attack-time)) + (format #t "~2Thit-points: ~f~%" (-> this hit-points)) + (label cfg-4) + this + ) + +;; definition for function wascity-cactus-callback +;; WARN: Return type mismatch int vs none. +(defun wascity-cactus-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 wascity-cactus s4-0) shakers (the-as int s3-0))) + (-> (the-as wascity-cactus s4-0) shakers (the-as int s3-0) shake) + ) + ) + (quaternion-rotate-local-y! + (-> arg1 quat) + (-> arg1 quat) + (-> (the-as wascity-cactus s4-0) shakers (the-as int s3-0) y-shake) + ) + (if (< (the int (-> (the-as wascity-cactus s4-0) shakers (the-as int s3-0) decay-time)) + (- (current-time) (-> (the-as wascity-cactus s4-0) shakers (the-as int s3-0) start-time)) + ) + (set! (-> arg0 param0) #f) + ) + ) + (cspace<-parented-transformq-joint! arg0 arg1) + 0 + (none) + ) + +;; failed to figure out what this is: +(defstate die (wascity-cactus) + :virtual #t + :enter #f + :exit #f + :trans #f + :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)) + (drop-pickup (-> self fact) #t *entity-pool* (the-as fact-info #f) 0 #t) + (while (-> self child) + (suspend) + ) + (cleanup-for-death self) + ) + :post #f + ) + +;; failed to figure out what this is: +(defstate idle (wascity-cactus) + :virtual #t + :event (behavior ((proc process) (argc int) (message symbol) (block event-message-block)) + (case message + (('attack) + (let ((a1-1 (the-as object (-> block param 1))) + (a0-2 proc) + ) + (when (and (!= (-> (the-as attack-info a1-1) id) (-> self incoming-attack-id)) + (!= (-> (the-as attack-info a1-1) mode) 'flut) + ) + (set! (-> self incoming-attack-id) (-> (the-as attack-info a1-1) id)) + (when a0-2 + (let ((s5-0 (find-offending-process-focusable a0-2 (the-as attack-info a1-1)))) + (when s5-0 + (let ((a0-4 (get-penetrate-using-from-attack-event (the-as process-drawable proc) block))) + (cond + ((and (not (logtest? (penetrate dark-skin) a0-4)) + (= (pu->knocked-type a0-4) (knocked-type none)) + (< 0.0 (-> self hit-points)) + ) + (if (not (time-elapsed? (-> self incoming-attack-time) (seconds 0.6))) + (return #f) + ) + (sound-play "cactus-hit") + (seek! (-> self hit-points) 0.0 0.1) + (set-time! (-> self incoming-attack-time)) + (let ((gp-2 (new 'stack-no-clear 'vector))) + (vector-inv-orient-by-quat! + gp-2 + (vector-cross! + (new 'stack-no-clear 'vector) + (vector-normalize! (vector-! (new 'stack-no-clear 'vector) (-> s5-0 root trans) (-> self root trans)) 1.0) + *up-vector* + ) + (-> self root quat) + ) + (let ((v1-20 (-> self shakers))) + (set! (-> v1-20 0 axis quad) (-> gp-2 quad)) + (set-time! (-> v1-20 0 start-time)) + (set! (-> v1-20 0 decay-time) 300.0) + (set! (-> v1-20 0 freq) 150.0) + (set! (-> v1-20 0 amplitude) 1820.4445) + (set! (-> v1-20 0 y-amplitude) 0.0) + ) + (let ((a0-19 (joint-node wascity-cactus-lod0-jg main))) + (set! (-> a0-19 param0) wascity-cactus-callback) + (set! (-> a0-19 param1) self) + (set! (-> a0-19 param2) (the-as basic 0)) + ) + (let ((v1-23 (-> self shakers 1))) + (set! (-> v1-23 axis quad) (-> gp-2 quad)) + (set! (-> v1-23 start-time) (+ (current-time) (seconds -0.06))) + (set! (-> v1-23 decay-time) 600.0) + (set! (-> v1-23 freq) 150.0) + (set! (-> v1-23 amplitude) 364.0889) + (set! (-> v1-23 y-amplitude) 0.0) + (set! (-> v1-23 y-decay-time) 450.0) + (set! (-> v1-23 y-freq) 150.0) + (set! (-> v1-23 y-amplitude) 3640.889) + ) + (let ((v1-25 (joint-node wascity-cactus-lod0-jg a))) + (set! (-> v1-25 param0) wascity-cactus-callback) + (set! (-> v1-25 param1) self) + (set! (-> v1-25 param2) (the-as basic 1)) + ) + (let ((v1-26 (-> self shakers 2))) + (set! (-> v1-26 axis quad) (-> gp-2 quad)) + (set! (-> v1-26 start-time) (+ (current-time) (seconds -0.2))) + (set! (-> v1-26 decay-time) 600.0) + (set! (-> v1-26 freq) 150.0) + (set! (-> v1-26 amplitude) 364.0889) + (set! (-> v1-26 y-decay-time) 450.0) + (set! (-> v1-26 y-freq) 150.0) + (set! (-> v1-26 y-amplitude) 3640.889) + ) + (let ((v1-28 (joint-node wascity-cactus-lod0-jg b))) + (set! (-> v1-28 param0) wascity-cactus-callback) + (set! (-> v1-28 param1) self) + (set! (-> v1-28 param2) (the-as basic 2)) + ) + (let ((v1-29 (-> self shakers 3))) + (set! (-> v1-29 axis quad) (-> gp-2 quad)) + (set! (-> v1-29 start-time) (+ (current-time) (seconds -0.2))) + (set! (-> v1-29 decay-time) 600.0) + (set! (-> v1-29 freq) 150.0) + (set! (-> v1-29 amplitude) 364.0889) + (set! (-> v1-29 y-decay-time) 450.0) + (set! (-> v1-29 y-freq) 150.0) + (set! (-> v1-29 y-amplitude) 3640.889) + ) + (let ((v1-31 (joint-node wascity-cactus-lod0-jg c))) + (set! (-> v1-31 param0) wascity-cactus-callback) + (set! (-> v1-31 param1) self) + (set! (-> v1-31 param2) (the-as basic 2)) + ) + (let ((v1-32 (-> self shakers 4))) + (set! (-> v1-32 axis quad) (-> gp-2 quad)) + (set! (-> v1-32 start-time) (+ (current-time) (seconds -0.2))) + (set! (-> v1-32 decay-time) 600.0) + (set! (-> v1-32 freq) 150.0) + (set! (-> v1-32 amplitude) 364.0889) + (set! (-> v1-32 y-decay-time) 450.0) + (set! (-> v1-32 y-freq) 150.0) + (set! (-> v1-32 y-amplitude) 3640.889) + ) + (let ((v1-34 (joint-node wascity-cactus-lod0-jg d))) + (set! (-> v1-34 param0) wascity-cactus-callback) + (set! (-> v1-34 param1) self) + (set! (-> v1-34 param2) (the-as basic 2)) + ) + (let ((v1-35 (-> self shakers 5))) + (set! (-> v1-35 axis quad) (-> gp-2 quad)) + (set! (-> v1-35 start-time) (+ (current-time) (seconds -0.4))) + (set! (-> v1-35 decay-time) 600.0) + (set! (-> v1-35 freq) 150.0) + (set! (-> v1-35 amplitude) 364.0889) + (set! (-> v1-35 y-decay-time) 450.0) + (set! (-> v1-35 y-freq) 150.0) + (set! (-> v1-35 y-amplitude) 3640.889) + ) + ) + (let ((v0-0 (the-as object (joint-node wascity-cactus-lod0-jg e)))) + (set! (-> (the-as cspace v0-0) param0) wascity-cactus-callback) + (set! (-> (the-as cspace v0-0) param1) self) + (set! (-> (the-as cspace v0-0) param2) (the-as basic 2)) + v0-0 + ) + ) + (else + (sound-play "cactus-burst") + (let ((gp-4 (new 'stack 'joint-exploder-tuning (the-as uint 1)))) + (set! (-> gp-4 fountain-rand-transv-lo quad) (-> s5-0 root trans quad)) + (set! (-> gp-4 fountain-rand-transv-hi x) 4096.0) + (set! (-> gp-4 fountain-rand-transv-hi y) 122880.0) + (process-spawn + joint-exploder + (art-group-get-by-name *level* "skel-wascity-cactus-explode" (the-as (pointer level) #f)) + 7 + gp-4 + *wascity-cactus-exploder-params* + :name "joint-exploder" + :to self + :unk 0 + ) + ) + (go-virtual die) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + :exit #f + :code sleep-code + :post (behavior () + (dotimes (gp-0 6) + (shaker-method-9 (-> self shakers gp-0)) + ) + (transform-post) + ) + ) + +;; definition for method 30 of type wascity-cactus +;; WARN: Return type mismatch int vs none. +(defmethod wascity-cactus-method-30 ((this wascity-cactus)) + (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 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 16384.0 0.0 28672.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 31 of type wascity-cactus +;; WARN: Return type mismatch int vs none. +(defmethod wascity-cactus-method-31 ((this wascity-cactus)) + (logior! (-> this mask) (process-mask crate)) + 0 + (none) + ) + +;; definition for method 11 of type wascity-cactus +(defmethod init-from-entity! ((this wascity-cactus) (arg0 entity-actor)) + (ctywide-entity-hack) + (wascity-cactus-method-30 this) + (process-drawable-from-entity! this arg0) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-wascity-cactus" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (wascity-cactus-method-31 this) + (set! (-> this fact) + (new 'process 'fact-info this (pickup-type none) (-> *FACT-bank* default-eco-pill-green-inc)) + ) + (set! (-> this hit-points) 1.0) + (quaternion-vector-angle! (-> this root quat) *up-vector* (* 182.04445 (rand-vu-float-range 0.0 360.0))) + (let ((f0-4 (rand-vu-float-range 0.9 1.1))) + (set-vector! (-> this root scale) f0-4 f0-4 f0-4 1.0) + ) + (transform-post) + (go (method-of-object this idle)) + ) + +;; definition of type wascity-market-crate +(deftype wascity-market-crate (market-crate) + () + ) + +;; definition for method 3 of type wascity-market-crate +(defmethod inspect ((this wascity-market-crate)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type market-crate inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type wascity-market-basket-a +(deftype wascity-market-basket-a (market-basket-a) + () + ) + +;; definition for method 3 of type wascity-market-basket-a +(defmethod inspect ((this wascity-market-basket-a)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type market-basket-a inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type wascity-market-basket-b +(deftype wascity-market-basket-b (market-basket-b) + () + ) + +;; definition for method 3 of type wascity-market-basket-b +(defmethod inspect ((this wascity-market-basket-b)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type market-basket-b inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type wascity-market-sack-a +(deftype wascity-market-sack-a (market-sack-a) + () + ) + +;; definition for method 3 of type wascity-market-sack-a +(defmethod inspect ((this wascity-market-sack-a)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type market-sack-a inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type wascity-market-sack-b +(deftype wascity-market-sack-b (market-sack-b) + () + ) + +;; definition for method 3 of type wascity-market-sack-b +(defmethod inspect ((this wascity-market-sack-b)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type market-sack-b inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type wascity-fruit-stand +(deftype wascity-fruit-stand (fruit-stand) + () + ) + +;; definition for method 3 of type wascity-fruit-stand +(defmethod inspect ((this wascity-fruit-stand)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type fruit-stand inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition of type wascity-water-pump +(deftype wascity-water-pump (process-drawable) + () + (:state-methods + idle + ) + ) + +;; definition for method 3 of type wascity-water-pump +(defmethod inspect ((this wascity-water-pump)) + (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-wascity-water-pump wascity-water-pump wascity-water-pump-lod0-jg wascity-water-pump-idle-ja + ((wascity-water-pump-lod0-mg (meters 20)) (wascity-water-pump-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 10) + ) + +;; failed to figure out what this is: +(defstate idle (wascity-water-pump) + :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 wascity-water-pump +(defmethod init-from-entity! ((this wascity-water-pump) (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 player-list)) + (set! (-> s3-0 prim-core action) (collide-action solid rideable no-standon)) + (set-vector! (-> s3-0 local-sphere) 0.0 0.0 0.0 49152.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)) + (set! (-> v1-8 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-8 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-8 transform-index) 6) + (set-vector! (-> v1-8 local-sphere) 10240.0 0.0 8192.0 16384.0) + ) + (let ((v1-10 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 1) (the-as uint 1)))) + (set! (-> v1-10 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-10 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-10 prim-core action) (collide-action solid no-standon)) + (set! (-> v1-10 transform-index) 8) + (set-vector! (-> v1-10 local-sphere) -8192.0 0.0 0.0 12288.0) + ) + (let ((v1-12 (new 'process 'collide-shape-prim-mesh s4-0 (the-as uint 2) (the-as uint 1)))) + (set! (-> v1-12 prim-core collide-as) (collide-spec obstacle)) + (set! (-> v1-12 prim-core collide-with) (collide-spec jak player-list)) + (set! (-> v1-12 prim-core action) (collide-action solid rideable)) + (set! (-> v1-12 transform-index) 3) + (set-vector! (-> v1-12 local-sphere) 0.0 0.0 0.0 49152.0) + ) + (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-wascity-water-pump" (the-as (pointer level) #f))) + (the-as pair 0) + ) + (go (method-of-object this idle)) + ) + +;; failed to figure out what this is: +(defskelgroup skel-wascity-awning-a wascity-awning-a wascity-awning-a-lod0-jg wascity-awning-a-idle-ja + ((wascity-awning-a-lod0-mg (meters 999999))) + :bounds (static-spherem 0 -2.5 5 10) + ) + +;; definition of type wascity-awning-a +(deftype wascity-awning-a (bouncer) + () + ) + +;; definition for method 3 of type wascity-awning-a +(defmethod inspect ((this wascity-awning-a)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type bouncer inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 25 of type wascity-awning-a +;; WARN: Return type mismatch int vs none. +(defmethod play-sound ((this wascity-awning-a)) + (sound-play "tarp-bounce") + 0 + (none) + ) + +;; definition for method 26 of type wascity-awning-a +;; WARN: Return type mismatch int vs none. +(defmethod bouncer-method-26 ((this wascity-awning-a)) + (sound-play "bounce-whoosh") + 0 + (none) + ) + +;; definition for method 23 of type wascity-awning-a +;; WARN: Return type mismatch int vs none. +(defmethod bouncer-method-23 ((this wascity-awning-a)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-wascity-awning-a" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (none) + ) + +;; definition for method 24 of type wascity-awning-a +;; WARN: Return type mismatch int vs none. +(defmethod bouncer-method-24 ((this wascity-awning-a)) + (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) 0.0 -16384.0 16384.0 32768.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) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-wascity-awning-b wascity-awning-b wascity-awning-b-lod0-jg wascity-awning-b-idle-ja + ((wascity-awning-b-lod0-mg (meters 20)) (wascity-awning-b-lod1-mg (meters 999999))) + :bounds (static-spherem 0 0 0 5) + ) + +;; definition of type wascity-awning-b +(deftype wascity-awning-b (bouncer) + () + ) + +;; definition for method 3 of type wascity-awning-b +(defmethod inspect ((this wascity-awning-b)) + (when (not this) + (set! this this) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type bouncer inspect))) + (t9-0 this) + ) + (label cfg-4) + this + ) + +;; definition for method 25 of type wascity-awning-b +;; WARN: Return type mismatch int vs none. +(defmethod play-sound ((this wascity-awning-b)) + (sound-play "tarp-bounce") + 0 + (none) + ) + +;; definition for method 26 of type wascity-awning-b +;; WARN: Return type mismatch int vs none. +(defmethod bouncer-method-26 ((this wascity-awning-b)) + (sound-play "bounce-whoosh") + 0 + (none) + ) + +;; definition for method 23 of type wascity-awning-b +;; WARN: Return type mismatch int vs none. +(defmethod bouncer-method-23 ((this wascity-awning-b)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-wascity-awning-b" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (none) + ) + +;; definition for method 24 of type wascity-awning-b +;; WARN: Return type mismatch int vs none. +(defmethod bouncer-method-24 ((this wascity-awning-b)) + (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) 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! (-> this root) s5-0) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(defskelgroup skel-monk-npc monk monk-lod0-jg monk-standing-idle-1-ja + ((monk-lod0-mg (meters 999999))) + :bounds (static-spherem 0 0.2 0 1.6) + :shadow monk-shadow-mg + :origin-joint-index 3 + :shadow-joint-index 3 + ) + +;; definition of type monk-npc +(deftype monk-npc (process-taskable) + () + ) + +;; definition for method 3 of type monk-npc +(defmethod inspect ((this monk-npc)) + (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 35 of type monk-npc +;; WARN: Return type mismatch int vs none. +(defmethod init-skeleton! ((this monk-npc)) + (initialize-skeleton + this + (the-as skeleton-group (art-group-get-by-name *level* "skel-monk-npc" (the-as (pointer level) #f))) + (the-as pair 0) + ) + 0 + (let* ((v1-8 (mod + (+ (the-as int (-> this root trans x)) + (the-as int (-> this root trans y)) + (the-as int (-> this root trans z)) + ) + 6 + ) + ) + (s5-1 (cond + ((zero? v1-8) + 4171 + ) + ((= v1-8 1) + 8357 + ) + ((= v1-8 2) + #x4113 + ) + ((= v1-8 3) + #x8225 + ) + ((= v1-8 4) + #x10407 + ) + ((= v1-8 5) + #x20825 + ) + ) + ) + ) + (setup-masks (-> this draw) 0 -1) + (setup-masks (-> this draw) s5-1 0) + ) + 0 + (none) + ) + +;; definition for method 37 of type monk-npc +(defmethod get-art-element ((this monk-npc)) + (if (not (logtest? (+ (the-as int (-> this root trans x)) + (the-as int (-> this root trans y)) + (the-as int (-> this root trans z)) + ) + 1 + ) + ) + (-> this draw art-group data 9) + (-> this draw art-group data 10) + ) + ) diff --git a/test/offline/config/jak2/config.jsonc b/test/offline/config/jak2/config.jsonc index f31d20b0aa..5ce3dec006 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 71d77e3109..3e6cbe7d15 100644 --- a/test/offline/config/jak3/config.jsonc +++ b/test/offline/config/jak3/config.jsonc @@ -1,7 +1,63 @@ { "dgos": [ "CGO/KERNEL.CGO", - "CGO/GAME.CGO" + "CGO/GAME.CGO", + "DGO/HALFPIPE.DGO", + "DGO/PRECC.DGO", + "DGO/LMECH.DGO", + "DGO/WWD.DGO", + "DGO/MIA.DGO", + "DGO/MIC.DGO", + "DGO/WCA.DGO", + "DGO/FRSTA.DGO", + "DGO/TEMA.DGO", + "DGO/MINED.DGO", + "DGO/SEA.DGO", + "DGO/WASALL.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" ], "skip_compile_files": [ @@ -10,7 +66,9 @@ "joint", "subdivide", "shadow-cpu-h", - "foreground" + "foreground", + "tie-methods", + "scene-actor" // top level lambda that defines a type ], "skip_compile_functions": [ @@ -96,8 +154,138 @@ "v-slrp2!", "slave-set-rotation!", // bones - "bones-mtx-calc-execute" + "bones-mtx-calc-execute", + // generic + "upload-vu0-program", + "generic-upload-vu0", + "generic-warp-source", + // font + "draw-string", + // decomp + "(method 16 level)", + "unpack-comp-lzo", + // shrubbery + "init-dma-test", + "draw-prototype-inline-array-shrub", + "draw-inline-array-instance-shrub", + // tfrag + "tfrag-scissor-end-buffer", + "tfrag-scissor-init-buffer", + "tfrag-scissor-vu1-init-buf", + "(method 9 drawable-tree-instance-tie)", + // hud + "(method 10 hud-sprite)", + // level + "(method 29 level)", + "level-update-after-load", + "(method 9 level)", + "(method 11 level)", + // drawable + "calc-shadow-masks", + "calc-realtime-lights", + "real-main-draw-hook", + "display-sync", + "dma-add-process-drawable", + "vis-cull", + "vis-cull-debug", + "foreground-engine-execute", + // idle-control + "(method 10 idle-control)", // changes pp + // aligner + "(method 9 align-control)", + // gun-red-shot + "gun-fire-red-3", + // collide-mesh + "(method 9 collide-mesh-cache)", + "(method 10 collide-mesh)", + "(method 11 collide-mesh)", + "(method 13 collide-mesh)", + // collide-shape + "(method 18 collide-shape-prim-group)", + "(method 19 collide-shape-prim)", + "(method 36 collide-shape)", + "(method 12 collide-shape-prim-group)", + "(method 13 collide-shape-prim)", + "collide-shape-draw-debug-marks", + // spatial-hash + "(method 11 grid-hash)", + "(method 15 sphere-hash)", + // collide-cache + "test-closest-pt-in-triangle", + // default-menu + "all-texture-tweak-adjust", + "debug-menu-make-shader-menu", + // sparticle-launcher + "sp-relaunch-particle-3d", + "execute-part-engine", + "sparticle-respawn-heights", + "sparticle-respawn-timer", + "sparticle-mode-animate", + "sparticle-mode-animate", + "sparticle-texture-animate", + "sparticle-texture-day-night", + "sparticle-motion-blur", // clipping + "birth-func-texture-group", + // script + "command-get-process", + // mood + "update-mood-direction", + // eyes + "debug-eyes", + // nav-mesh + "(method 36 nav-mesh)", + "(method 45 nav-mesh)", + "(method 46 nav-mesh)", + // minimap + "(method 20 minimap)", + "(method 18 minimap)", + "(method 16 minimap)", + // merc-blend-shape + "setup-blerc-chains", + // prebot + "prebot-spawn-shockwave", + // saberfish + "(method 238 saberfish)", + // sew-laser-turret + "(method 161 sew-laser-turret)", + // path + "(method 28 path-control)", + // squad-control + "(method 17 squad-control)", + // pilot-states + "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" ], - "skip_compile_states": {} + "skip_compile_states": { + "(target-flut-kanga-catch target)": ["post", "code"], // setting pp + "(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 + } } diff --git a/test/offline/framework/orchestration.cpp b/test/offline/framework/orchestration.cpp index ae4ff055e0..c33b9af88c 100644 --- a/test/offline/framework/orchestration.cpp +++ b/test/offline/framework/orchestration.cpp @@ -50,9 +50,10 @@ OfflineTestDecompiler setup_decompiler(const OfflineTestWorkGroup& work, dc.db = std::make_unique( dgo_paths, dc.config->obj_file_name_map_file, std::vector{}, - std::vector{}, std::vector{}, *dc.config); + std::vector{}, std::vector{}, std::vector{}, *dc.config); dc.db->dts.art_group_info = dc.config->art_group_info_dump; dc.db->dts.jg_info = dc.config->jg_info_dump; + dc.db->dts.textures = dc.config->texture_info_dump; std::unordered_set db_files; for (auto& files_by_name : dc.db->obj_files_by_name) { diff --git a/third-party/tree-sitter/tree-sitter-opengoal/grammar.js b/third-party/tree-sitter/tree-sitter-opengoal/grammar.js index d8ab3de5a3..d9c1365432 100644 --- a/third-party/tree-sitter/tree-sitter-opengoal/grammar.js +++ b/third-party/tree-sitter/tree-sitter-opengoal/grammar.js @@ -137,8 +137,7 @@ module.exports = grammar({ [], inline: $ => - [$._kwd_unqualified, - $._sym_unqualified], + [$._sym_unqualified], rules: { // THIS MUST BE FIRST -- even though this doesn't look like it matters @@ -206,7 +205,7 @@ module.exports = grammar({ seq(field('numberOfArgs', $._format_token), '*'), '?', "Newline", - seq(repeat(choice($._format_token, ',')), /[$mrRbBdDgGxXeEoOsStTfF]/), + seq(repeat(choice($._format_token, ',')), /[$mrRbBdDgGxXeEoOsStTfHhJjKkLlNnVwWyYzZ]/), ), format_specifier: $ => prec.left(seq( diff --git a/third-party/tree-sitter/tree-sitter-opengoal/grammar.json b/third-party/tree-sitter/tree-sitter-opengoal/grammar.json index 9c200f71d1..28e204339b 100644 --- a/third-party/tree-sitter/tree-sitter-opengoal/grammar.json +++ b/third-party/tree-sitter/tree-sitter-opengoal/grammar.json @@ -646,7 +646,7 @@ }, { "type": "PATTERN", - "value": "[$mrRbBdDgGxXeEoOsStTfF]" + "value": "[$mrRbBdDgGxXeEoOsStTfHhJjKkLlNnVwWyYzZ]" } ] } @@ -1041,9 +1041,7 @@ "precedences": [], "externals": [], "inline": [ - "ReferenceError", "_sym_unqualified" ], "supertypes": [] } - diff --git a/third-party/tree-sitter/tree-sitter-opengoal/parser.c b/third-party/tree-sitter/tree-sitter-opengoal/parser.c index 7afe53daa2..dd5e2cd7b0 100644 --- a/third-party/tree-sitter/tree-sitter-opengoal/parser.c +++ b/third-party/tree-sitter/tree-sitter-opengoal/parser.c @@ -1,7 +1,6 @@ -#include +#include "tree_sitter/parser.h" #if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmissing-field-initializers" #endif @@ -16,7 +15,7 @@ #define MAX_ALIAS_SEQUENCE_LENGTH 4 #define PRODUCTION_ID_COUNT 12 -enum { +enum ts_symbol_identifiers { sym__ws = 1, sym_comment = 2, sym_block_comment = 3, @@ -531,7 +530,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { }, }; -enum { +enum ts_field_identifiers { field_close = 1, field_marker = 2, field_name = 3, @@ -722,20 +721,50 @@ static inline bool sym_kwd_lit_character_set_2(int32_t c) { : (c <= 8287 || c == 12288)))))); } -static inline bool aux_sym_str_lit_token1_character_set_1(int32_t c) { - return (c < 'b' - ? (c < 'O' +static inline bool aux_sym_format_directive_type_token11_character_set_1(int32_t c) { + return (c < 'R' + ? (c < 'G' ? (c < 'B' ? c == '$' - : c <= 'G') - : (c <= 'O' || (c < 'X' - ? (c >= 'R' && c <= 'T') - : c <= 'X'))) - : (c <= 'g' || (c < 'r' - ? (c < 'o' - ? c == 'm' + : c <= 'E') + : (c <= 'L' || c == 'O')) + : (c <= 'T' || (c < 'r' + ? (c < 'b' + ? (c >= 'X' && c <= 'Z') : c <= 'o') - : (c <= 't' || c == 'x')))); + : (c <= 't' || (c >= 'x' && c <= 'z'))))); +} + +static inline bool aux_sym_format_directive_type_token11_character_set_2(int32_t c) { + return (c < 'R' + ? (c < 'G' + ? (c < 'B' + ? c == '$' + : c <= 'E') + : (c <= 'L' || c == 'O')) + : (c <= 'T' || (c < 'r' + ? (c < 'b' + ? (c >= 'V' && c <= 'Z') + : c <= 'o') + : (c <= 't' || (c >= 'x' && c <= 'z'))))); +} + +static inline bool aux_sym_format_directive_type_token11_character_set_3(int32_t c) { + return (c < 'R' + ? (c < 'G' + ? (c < 'B' + ? c == '$' + : (c <= 'B' || (c >= 'D' && c <= 'E'))) + : (c <= 'H' || (c < 'N' + ? (c >= 'J' && c <= 'L') + : c <= 'O'))) + : (c <= 'T' || (c < 'j' + ? (c < 'b' + ? (c >= 'V' && c <= 'Z') + : (c <= 'b' || (c >= 'd' && c <= 'h'))) + : (c <= 'o' || (c < 'w' + ? (c >= 'r' && c <= 't') + : c <= 'z'))))); } static inline bool aux_sym__sym_unqualified_token1_character_set_1(int32_t c) { @@ -795,184 +824,242 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { eof = lexer->eof(lexer); switch (state) { case 0: - if (eof) ADVANCE(22); - if (lookahead == '\n') ADVANCE(66); - if (lookahead == '\r') ADVANCE(66); - if (lookahead == '"') ADVANCE(65); - if (lookahead == '#') ADVANCE(66); - if (lookahead == '%') ADVANCE(66); - if (lookahead == '&') ADVANCE(66); - if (lookahead == '\'') ADVANCE(66); - if (lookahead == '(') ADVANCE(66); - if (lookahead == ')') ADVANCE(66); - if (lookahead == '*') ADVANCE(66); - if (lookahead == ',') ADVANCE(66); - if (lookahead == '/') ADVANCE(66); - if (lookahead == ':') ADVANCE(66); - if (lookahead == ';') ADVANCE(66); - if (lookahead == '?') ADVANCE(66); - if (lookahead == '@') ADVANCE(66); - if (lookahead == 'V') ADVANCE(66); - if (lookahead == '\\') ADVANCE(32); - if (lookahead == '^') ADVANCE(66); - if (lookahead == '_') ADVANCE(66); - if (lookahead == '`') ADVANCE(66); - if (lookahead == 'v') ADVANCE(66); - if (lookahead == '|') ADVANCE(66); - if (lookahead == '~') ADVANCE(42); + if (eof) ADVANCE(23); + if (lookahead == '\n') ADVANCE(68); + if (lookahead == '\r') ADVANCE(68); + if (lookahead == '"') ADVANCE(67); + if (lookahead == '#') ADVANCE(68); + if (lookahead == '%') ADVANCE(68); + if (lookahead == '&') ADVANCE(68); + if (lookahead == '\'') ADVANCE(68); + if (lookahead == '(') ADVANCE(68); + if (lookahead == ')') ADVANCE(68); + if (lookahead == '*') ADVANCE(68); + if (lookahead == ',') ADVANCE(68); + if (lookahead == '/') ADVANCE(68); + if (lookahead == ':') ADVANCE(68); + if (lookahead == ';') ADVANCE(68); + if (lookahead == '?') ADVANCE(68); + if (lookahead == '@') ADVANCE(68); + if (lookahead == 'V') ADVANCE(68); + if (lookahead == '\\') ADVANCE(33); + if (lookahead == '^') ADVANCE(68); + if (lookahead == '_') ADVANCE(68); + if (lookahead == '`') ADVANCE(68); + if (lookahead == 'v') ADVANCE(68); + if (lookahead == '|') ADVANCE(68); + if (lookahead == '~') ADVANCE(43); if (lookahead == '<' || - lookahead == '>') ADVANCE(66); + lookahead == '>') ADVANCE(68); if (lookahead == 'A' || - lookahead == 'a') ADVANCE(66); + lookahead == 'a') ADVANCE(68); if (lookahead == 'C' || - lookahead == 'c') ADVANCE(66); + lookahead == 'c') ADVANCE(68); if (lookahead == 'I' || - lookahead == 'i') ADVANCE(66); + lookahead == 'i') ADVANCE(68); if (lookahead == 'P' || - lookahead == 'p') ADVANCE(66); + lookahead == 'p') ADVANCE(68); if (lookahead == 'W' || - lookahead == 'w') ADVANCE(66); - if (('[' <= lookahead && lookahead <= ']')) ADVANCE(66); - if (('{' <= lookahead && lookahead <= '}')) ADVANCE(66); - if (aux_sym_str_lit_token1_character_set_1(lookahead)) ADVANCE(66); - if (lookahead != 0) ADVANCE(66); + lookahead == 'w') ADVANCE(68); + if (('[' <= lookahead && lookahead <= ']')) ADVANCE(68); + if (('{' <= lookahead && lookahead <= '}')) ADVANCE(68); + if (lookahead == '$' || + ('B' <= lookahead && lookahead <= 'E') || + ('G' <= lookahead && lookahead <= 'L') || + lookahead == 'N' || + lookahead == 'O' || + ('R' <= lookahead && lookahead <= 'T') || + ('X' <= lookahead && lookahead <= 'o') || + ('r' <= lookahead && lookahead <= 't') || + ('x' <= lookahead && lookahead <= 'z')) ADVANCE(68); + if (lookahead != 0) ADVANCE(68); END_STATE(); case 1: - if (lookahead == '\n') ADVANCE(48); - if (lookahead == '\r') ADVANCE(49); - if (lookahead == '"') ADVANCE(65); - if (lookahead == '#') ADVANCE(35); - if (lookahead == '%') ADVANCE(43); - if (lookahead == '&') ADVANCE(44); - if (lookahead == '\'') ADVANCE(31); - if (lookahead == '*') ADVANCE(61); - if (lookahead == ',') ADVANCE(36); - if (lookahead == ':') ADVANCE(40); - if (lookahead == ';') ADVANCE(59); - if (lookahead == '?') ADVANCE(62); - if (lookahead == '@') ADVANCE(38); - if (lookahead == 'N') ADVANCE(8); - if (lookahead == 'V') ADVANCE(34); - if (lookahead == '^') ADVANCE(47); - if (lookahead == '_') ADVANCE(54); - if (lookahead == '`') ADVANCE(60); - if (lookahead == 'v') ADVANCE(33); - if (lookahead == '|') ADVANCE(45); - if (lookahead == '~') ADVANCE(42); - if (('+' <= lookahead && lookahead <= '-')) ADVANCE(5); + if (lookahead == '\n') ADVANCE(49); + if (lookahead == '\r') ADVANCE(50); + if (lookahead == '"') ADVANCE(67); + if (lookahead == '#') ADVANCE(36); + if (lookahead == '%') ADVANCE(44); + if (lookahead == '&') ADVANCE(45); + if (lookahead == '\'') ADVANCE(32); + if (lookahead == ',') ADVANCE(37); + if (lookahead == ':') ADVANCE(41); + if (lookahead == ';') ADVANCE(60); + if (lookahead == '?') ADVANCE(63); + if (lookahead == '@') ADVANCE(39); + if (lookahead == 'N') ADVANCE(66); + if (lookahead == 'V') ADVANCE(35); + if (lookahead == '^') ADVANCE(48); + if (lookahead == '_') ADVANCE(55); + if (lookahead == '`') ADVANCE(61); + if (lookahead == 'v') ADVANCE(34); + if (lookahead == '|') ADVANCE(46); + if (lookahead == '~') ADVANCE(43); + if (('+' <= lookahead && lookahead <= '-')) ADVANCE(7); if (lookahead == '<' || - lookahead == '>') ADVANCE(58); + lookahead == '>') ADVANCE(59); if (lookahead == 'A' || - lookahead == 'a') ADVANCE(53); + lookahead == 'a') ADVANCE(54); if (lookahead == 'C' || - lookahead == 'c') ADVANCE(46); + lookahead == 'c') ADVANCE(47); if (lookahead == 'I' || - lookahead == 'i') ADVANCE(51); + lookahead == 'i') ADVANCE(52); if (lookahead == 'P' || - lookahead == 'p') ADVANCE(50); + lookahead == 'p') ADVANCE(51); if (lookahead == 'W' || - lookahead == 'w') ADVANCE(52); + lookahead == 'w') ADVANCE(53); if (lookahead == '[' || - lookahead == ']') ADVANCE(57); - if (('{' <= lookahead && lookahead <= '}')) ADVANCE(56); + lookahead == ']') ADVANCE(58); + if (('{' <= lookahead && lookahead <= '}')) ADVANCE(57); if (lookahead == '(' || - lookahead == ')') ADVANCE(55); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(26); - if (aux_sym_str_lit_token1_character_set_1(lookahead)) ADVANCE(64); + lookahead == ')') ADVANCE(56); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(27); + if (aux_sym_format_directive_type_token11_character_set_1(lookahead)) ADVANCE(65); END_STATE(); case 2: - if (lookahead == '"') ADVANCE(65); - if (lookahead == '\\') ADVANCE(18); - if (lookahead == '~') ADVANCE(42); - if (lookahead != 0) ADVANCE(66); + if (lookahead == '\n') ADVANCE(49); + if (lookahead == '\r') ADVANCE(50); + if (lookahead == '#') ADVANCE(9); + if (lookahead == '%') ADVANCE(44); + if (lookahead == '&') ADVANCE(45); + if (lookahead == '\'') ADVANCE(32); + if (lookahead == ',') ADVANCE(37); + if (lookahead == ':') ADVANCE(41); + if (lookahead == ';') ADVANCE(60); + if (lookahead == '?') ADVANCE(63); + if (lookahead == '@') ADVANCE(39); + if (lookahead == 'N') ADVANCE(66); + if (lookahead == '^') ADVANCE(48); + if (lookahead == '_') ADVANCE(55); + if (lookahead == '`') ADVANCE(61); + if (lookahead == '|') ADVANCE(46); + if (lookahead == '~') ADVANCE(43); + if (('+' <= lookahead && lookahead <= '-')) ADVANCE(7); + if (lookahead == '<' || + lookahead == '>') ADVANCE(59); + if (lookahead == 'A' || + lookahead == 'a') ADVANCE(54); + if (lookahead == 'C' || + lookahead == 'c') ADVANCE(47); + if (lookahead == 'I' || + lookahead == 'i') ADVANCE(52); + if (lookahead == 'P' || + lookahead == 'p') ADVANCE(51); + if (lookahead == 'W' || + lookahead == 'w') ADVANCE(53); + if (lookahead == '[' || + lookahead == ']') ADVANCE(58); + if (('{' <= lookahead && lookahead <= '}')) ADVANCE(57); + if (lookahead == '(' || + lookahead == ')') ADVANCE(56); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(27); + if (aux_sym_format_directive_type_token11_character_set_2(lookahead)) ADVANCE(65); END_STATE(); case 3: - if (lookahead == '#') ADVANCE(20); - if (lookahead == '|') ADVANCE(4); - if (lookahead != 0) ADVANCE(3); + if (lookahead == '"') ADVANCE(67); + if (lookahead == '\\') ADVANCE(19); + if (lookahead == '~') ADVANCE(43); + if (lookahead != 0) ADVANCE(68); END_STATE(); case 4: - if (lookahead == '#') ADVANCE(25); - if (lookahead != 0) ADVANCE(3); + if (lookahead == '#') ADVANCE(21); + if (lookahead == '|') ADVANCE(5); + if (lookahead != 0) ADVANCE(4); END_STATE(); case 5: - if (lookahead == '#') ADVANCE(7); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(26); + if (lookahead == '#') ADVANCE(26); + if (lookahead != 0) ADVANCE(4); END_STATE(); case 6: - if (lookahead == '\\') ADVANCE(19); - if (lookahead == 'b') ADVANCE(14); - if (lookahead == 'f' || - lookahead == 't') ADVANCE(71); - if (lookahead == 'x') ADVANCE(15); - if (lookahead == '|') ADVANCE(3); + if (lookahead == '#') ADVANCE(9); + if (lookahead == '%') ADVANCE(44); + if (lookahead == '&') ADVANCE(45); + if (lookahead == '\'') ADVANCE(32); + if (lookahead == '*') ADVANCE(62); + if (lookahead == ',') ADVANCE(37); + if (lookahead == ':') ADVANCE(41); + if (lookahead == '@') ADVANCE(39); + if (lookahead == '|') ADVANCE(46); + if (lookahead == '~') ADVANCE(43); + if (('+' <= lookahead && lookahead <= '-')) ADVANCE(7); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(27); + if (aux_sym_format_directive_type_token11_character_set_3(lookahead)) ADVANCE(65); END_STATE(); case 7: - if (lookahead == 'b') ADVANCE(14); - if (lookahead == 'x') ADVANCE(15); + if (lookahead == '#') ADVANCE(9); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(27); END_STATE(); case 8: - if (lookahead == 'e') ADVANCE(13); + if (lookahead == '\\') ADVANCE(20); + if (lookahead == 'b') ADVANCE(15); + if (lookahead == 'f' || + lookahead == 't') ADVANCE(73); + if (lookahead == 'x') ADVANCE(16); + if (lookahead == '|') ADVANCE(4); END_STATE(); case 9: - if (lookahead == 'e') ADVANCE(63); + if (lookahead == 'b') ADVANCE(15); + if (lookahead == 'x') ADVANCE(16); END_STATE(); case 10: - if (lookahead == 'i') ADVANCE(12); + if (lookahead == 'e') ADVANCE(64); END_STATE(); case 11: - if (lookahead == 'l') ADVANCE(10); + if (lookahead == 'i') ADVANCE(13); END_STATE(); case 12: - if (lookahead == 'n') ADVANCE(9); + if (lookahead == 'l') ADVANCE(11); END_STATE(); case 13: - if (lookahead == 'w') ADVANCE(11); + if (lookahead == 'n') ADVANCE(10); END_STATE(); case 14: - if (lookahead == '0' || - lookahead == '1') ADVANCE(27); + if (lookahead == 'w') ADVANCE(12); END_STATE(); case 15: - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(29); + if (lookahead == '0' || + lookahead == '1') ADVANCE(28); END_STATE(); case 16: - if (!sym_kwd_lit_character_set_1(lookahead)) ADVANCE(30); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(30); END_STATE(); case 17: - if (lookahead != 0 && - lookahead != '\n') ADVANCE(32); + if (!sym_kwd_lit_character_set_1(lookahead)) ADVANCE(31); END_STATE(); case 18: if (lookahead != 0 && - lookahead != '\n') ADVANCE(67); + lookahead != '\n') ADVANCE(33); END_STATE(); case 19: if (lookahead != 0 && - lookahead != '\\') ADVANCE(68); - if (lookahead == '\\') ADVANCE(69); + lookahead != '\n') ADVANCE(69); END_STATE(); case 20: if (lookahead != 0 && - lookahead != '|') ADVANCE(3); + lookahead != '\\') ADVANCE(70); + if (lookahead == '\\') ADVANCE(71); END_STATE(); case 21: - if (eof) ADVANCE(22); - if (lookahead == '"') ADVANCE(65); - if (lookahead == '#') ADVANCE(6); - if (lookahead == '\'') ADVANCE(31); - if (lookahead == '(') ADVANCE(81); - if (lookahead == ')') ADVANCE(82); - if (lookahead == ',') ADVANCE(37); - if (lookahead == '/') ADVANCE(72); - if (lookahead == ':') ADVANCE(16); - if (lookahead == ';') ADVANCE(24); - if (lookahead == '`') ADVANCE(60); - if (lookahead == 'n') ADVANCE(77); - if (('+' <= lookahead && lookahead <= '-')) ADVANCE(73); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(26); + if (lookahead != 0 && + lookahead != '|') ADVANCE(4); + END_STATE(); + case 22: + if (eof) ADVANCE(23); + if (lookahead == '"') ADVANCE(67); + if (lookahead == '#') ADVANCE(8); + if (lookahead == '\'') ADVANCE(32); + if (lookahead == '(') ADVANCE(83); + if (lookahead == ')') ADVANCE(84); + if (lookahead == ',') ADVANCE(38); + if (lookahead == '/') ADVANCE(74); + if (lookahead == ':') ADVANCE(17); + if (lookahead == ';') ADVANCE(25); + if (lookahead == '`') ADVANCE(61); + if (lookahead == 'n') ADVANCE(79); + if (('+' <= lookahead && lookahead <= '-')) ADVANCE(75); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(27); if (('\t' <= lookahead && lookahead <= '\r') || (28 <= lookahead && lookahead <= ' ') || lookahead == 5760 || @@ -981,18 +1068,18 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { lookahead == 8232 || lookahead == 8233 || lookahead == 8287 || - lookahead == 12288) ADVANCE(23); + lookahead == 12288) ADVANCE(24); if (lookahead != 0 && lookahead != '@' && (lookahead < '[' || '^' < lookahead) && lookahead != '{' && lookahead != '}' && - lookahead != '~') ADVANCE(80); + lookahead != '~') ADVANCE(82); END_STATE(); - case 22: + case 23: ACCEPT_TOKEN(ts_builtin_sym_end); END_STATE(); - case 23: + case 24: ACCEPT_TOKEN(sym__ws); if (('\t' <= lookahead && lookahead <= '\r') || (28 <= lookahead && lookahead <= ' ') || @@ -1002,230 +1089,234 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { lookahead == 8232 || lookahead == 8233 || lookahead == 8287 || - lookahead == 12288) ADVANCE(23); + lookahead == 12288) ADVANCE(24); END_STATE(); - case 24: + case 25: ACCEPT_TOKEN(sym_comment); if (lookahead != 0 && - lookahead != '\n') ADVANCE(24); - END_STATE(); - case 25: - ACCEPT_TOKEN(sym_block_comment); + lookahead != '\n') ADVANCE(25); END_STATE(); case 26: - ACCEPT_TOKEN(aux_sym_num_lit_token1); - if (lookahead == '.') ADVANCE(28); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(26); + ACCEPT_TOKEN(sym_block_comment); END_STATE(); case 27: ACCEPT_TOKEN(aux_sym_num_lit_token1); - if (lookahead == '0' || - lookahead == '1') ADVANCE(27); + if (lookahead == '.') ADVANCE(29); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(27); END_STATE(); case 28: ACCEPT_TOKEN(aux_sym_num_lit_token1); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(28); + if (lookahead == '0' || + lookahead == '1') ADVANCE(28); END_STATE(); case 29: ACCEPT_TOKEN(aux_sym_num_lit_token1); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(29); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(29); END_STATE(); case 30: - ACCEPT_TOKEN(sym_kwd_lit); - if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(30); + ACCEPT_TOKEN(aux_sym_num_lit_token1); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(30); END_STATE(); case 31: - ACCEPT_TOKEN(anon_sym_SQUOTE); + ACCEPT_TOKEN(sym_kwd_lit); + if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(31); END_STATE(); case 32: - ACCEPT_TOKEN(aux_sym__format_token_token1); + ACCEPT_TOKEN(anon_sym_SQUOTE); END_STATE(); case 33: - ACCEPT_TOKEN(anon_sym_v); + ACCEPT_TOKEN(aux_sym__format_token_token1); END_STATE(); case 34: - ACCEPT_TOKEN(anon_sym_V); + ACCEPT_TOKEN(anon_sym_v); END_STATE(); case 35: - ACCEPT_TOKEN(anon_sym_POUND); - if (lookahead == 'b') ADVANCE(14); - if (lookahead == 'x') ADVANCE(15); + ACCEPT_TOKEN(anon_sym_V); END_STATE(); case 36: - ACCEPT_TOKEN(anon_sym_COMMA); + ACCEPT_TOKEN(anon_sym_POUND); + if (lookahead == 'b') ADVANCE(15); + if (lookahead == 'x') ADVANCE(16); END_STATE(); case 37: ACCEPT_TOKEN(anon_sym_COMMA); - if (lookahead == '@') ADVANCE(83); END_STATE(); case 38: - ACCEPT_TOKEN(anon_sym_AT); - if (lookahead == ':') ADVANCE(39); + ACCEPT_TOKEN(anon_sym_COMMA); + if (lookahead == '@') ADVANCE(85); END_STATE(); case 39: - ACCEPT_TOKEN(anon_sym_AT_COLON); + ACCEPT_TOKEN(anon_sym_AT); + if (lookahead == ':') ADVANCE(40); END_STATE(); case 40: - ACCEPT_TOKEN(anon_sym_COLON); - if (lookahead == '@') ADVANCE(41); + ACCEPT_TOKEN(anon_sym_AT_COLON); END_STATE(); case 41: - ACCEPT_TOKEN(anon_sym_COLON_AT); + ACCEPT_TOKEN(anon_sym_COLON); + if (lookahead == '@') ADVANCE(42); END_STATE(); case 42: - ACCEPT_TOKEN(anon_sym_TILDE); + ACCEPT_TOKEN(anon_sym_COLON_AT); END_STATE(); case 43: - ACCEPT_TOKEN(anon_sym_PERCENT); + ACCEPT_TOKEN(anon_sym_TILDE); END_STATE(); case 44: - ACCEPT_TOKEN(anon_sym_AMP); + ACCEPT_TOKEN(anon_sym_PERCENT); END_STATE(); case 45: - ACCEPT_TOKEN(anon_sym_PIPE); + ACCEPT_TOKEN(anon_sym_AMP); END_STATE(); case 46: - ACCEPT_TOKEN(aux_sym_format_directive_type_token1); + ACCEPT_TOKEN(anon_sym_PIPE); END_STATE(); case 47: - ACCEPT_TOKEN(aux_sym_format_directive_type_token2); + ACCEPT_TOKEN(aux_sym_format_directive_type_token1); END_STATE(); case 48: - ACCEPT_TOKEN(anon_sym_LF); + ACCEPT_TOKEN(aux_sym_format_directive_type_token2); END_STATE(); case 49: - ACCEPT_TOKEN(anon_sym_CR); + ACCEPT_TOKEN(anon_sym_LF); END_STATE(); case 50: - ACCEPT_TOKEN(aux_sym_format_directive_type_token3); + ACCEPT_TOKEN(anon_sym_CR); END_STATE(); case 51: - ACCEPT_TOKEN(aux_sym_format_directive_type_token4); + ACCEPT_TOKEN(aux_sym_format_directive_type_token3); END_STATE(); case 52: - ACCEPT_TOKEN(aux_sym_format_directive_type_token5); + ACCEPT_TOKEN(aux_sym_format_directive_type_token4); END_STATE(); case 53: - ACCEPT_TOKEN(aux_sym_format_directive_type_token6); + ACCEPT_TOKEN(aux_sym_format_directive_type_token5); END_STATE(); case 54: - ACCEPT_TOKEN(anon_sym__); + ACCEPT_TOKEN(aux_sym_format_directive_type_token6); END_STATE(); case 55: - ACCEPT_TOKEN(aux_sym_format_directive_type_token7); + ACCEPT_TOKEN(anon_sym__); END_STATE(); case 56: - ACCEPT_TOKEN(aux_sym_format_directive_type_token8); + ACCEPT_TOKEN(aux_sym_format_directive_type_token7); END_STATE(); case 57: - ACCEPT_TOKEN(aux_sym_format_directive_type_token9); + ACCEPT_TOKEN(aux_sym_format_directive_type_token8); END_STATE(); case 58: - ACCEPT_TOKEN(aux_sym_format_directive_type_token10); + ACCEPT_TOKEN(aux_sym_format_directive_type_token9); END_STATE(); case 59: - ACCEPT_TOKEN(anon_sym_SEMI); + ACCEPT_TOKEN(aux_sym_format_directive_type_token10); END_STATE(); case 60: - ACCEPT_TOKEN(anon_sym_BQUOTE); + ACCEPT_TOKEN(anon_sym_SEMI); END_STATE(); case 61: - ACCEPT_TOKEN(anon_sym_STAR); + ACCEPT_TOKEN(anon_sym_BQUOTE); END_STATE(); case 62: - ACCEPT_TOKEN(anon_sym_QMARK); + ACCEPT_TOKEN(anon_sym_STAR); END_STATE(); case 63: - ACCEPT_TOKEN(anon_sym_Newline); + ACCEPT_TOKEN(anon_sym_QMARK); END_STATE(); case 64: - ACCEPT_TOKEN(aux_sym_format_directive_type_token11); + ACCEPT_TOKEN(anon_sym_Newline); END_STATE(); case 65: - ACCEPT_TOKEN(anon_sym_DQUOTE); + ACCEPT_TOKEN(aux_sym_format_directive_type_token11); END_STATE(); case 66: + ACCEPT_TOKEN(aux_sym_format_directive_type_token11); + if (lookahead == 'e') ADVANCE(14); + END_STATE(); + case 67: + ACCEPT_TOKEN(anon_sym_DQUOTE); + END_STATE(); + case 68: ACCEPT_TOKEN(aux_sym_str_lit_token1); if (lookahead != 0 && lookahead != '"' && lookahead != '\\' && - lookahead != '~') ADVANCE(66); + lookahead != '~') ADVANCE(68); END_STATE(); - case 67: + case 69: ACCEPT_TOKEN(aux_sym_str_lit_token2); END_STATE(); - case 68: + case 70: ACCEPT_TOKEN(sym_char_lit); END_STATE(); - case 69: + case 71: ACCEPT_TOKEN(sym_char_lit); if (lookahead == 'n' || lookahead == 's' || - lookahead == 't') ADVANCE(68); - END_STATE(); - case 70: - ACCEPT_TOKEN(sym_null_lit); - if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(80); - END_STATE(); - case 71: - ACCEPT_TOKEN(sym_bool_lit); + lookahead == 't') ADVANCE(70); END_STATE(); case 72: - ACCEPT_TOKEN(anon_sym_SLASH); + ACCEPT_TOKEN(sym_null_lit); + if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(82); END_STATE(); case 73: - ACCEPT_TOKEN(aux_sym__sym_unqualified_token1); - if (lookahead == '#') ADVANCE(74); - if (!aux_sym__sym_unqualified_token1_character_set_1(lookahead)) ADVANCE(80); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(26); + ACCEPT_TOKEN(sym_bool_lit); END_STATE(); case 74: - ACCEPT_TOKEN(aux_sym__sym_unqualified_token1); - if (lookahead == 'b') ADVANCE(78); - if (lookahead == 'x') ADVANCE(79); - if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(80); + ACCEPT_TOKEN(anon_sym_SLASH); END_STATE(); case 75: ACCEPT_TOKEN(aux_sym__sym_unqualified_token1); - if (lookahead == 'e') ADVANCE(70); - if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(80); + if (lookahead == '#') ADVANCE(76); + if (!aux_sym__sym_unqualified_token1_character_set_1(lookahead)) ADVANCE(82); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(27); END_STATE(); case 76: ACCEPT_TOKEN(aux_sym__sym_unqualified_token1); - if (lookahead == 'n') ADVANCE(75); - if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(80); + if (lookahead == 'b') ADVANCE(80); + if (lookahead == 'x') ADVANCE(81); + if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(82); END_STATE(); case 77: ACCEPT_TOKEN(aux_sym__sym_unqualified_token1); - if (lookahead == 'o') ADVANCE(76); - if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(80); + if (lookahead == 'e') ADVANCE(72); + if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(82); END_STATE(); case 78: ACCEPT_TOKEN(aux_sym__sym_unqualified_token1); - if (lookahead == '0' || - lookahead == '1') ADVANCE(27); - if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(80); + if (lookahead == 'n') ADVANCE(77); + if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(82); END_STATE(); case 79: ACCEPT_TOKEN(aux_sym__sym_unqualified_token1); - if (!aux_sym__sym_unqualified_token1_character_set_2(lookahead)) ADVANCE(80); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'F') || - ('a' <= lookahead && lookahead <= 'f')) ADVANCE(29); + if (lookahead == 'o') ADVANCE(78); + if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(82); END_STATE(); case 80: ACCEPT_TOKEN(aux_sym__sym_unqualified_token1); - if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(80); + if (lookahead == '0' || + lookahead == '1') ADVANCE(28); + if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(82); END_STATE(); case 81: - ACCEPT_TOKEN(anon_sym_LPAREN); + ACCEPT_TOKEN(aux_sym__sym_unqualified_token1); + if (!aux_sym__sym_unqualified_token1_character_set_2(lookahead)) ADVANCE(82); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(30); END_STATE(); case 82: - ACCEPT_TOKEN(anon_sym_RPAREN); + ACCEPT_TOKEN(aux_sym__sym_unqualified_token1); + if (!sym_kwd_lit_character_set_2(lookahead)) ADVANCE(82); END_STATE(); case 83: + ACCEPT_TOKEN(anon_sym_LPAREN); + END_STATE(); + case 84: + ACCEPT_TOKEN(anon_sym_RPAREN); + END_STATE(); + case 85: ACCEPT_TOKEN(anon_sym_COMMA_AT); END_STATE(); default: @@ -1235,65 +1326,65 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { static const TSLexMode ts_lex_modes[STATE_COUNT] = { [0] = {.lex_state = 0}, - [1] = {.lex_state = 21}, + [1] = {.lex_state = 22}, [2] = {.lex_state = 1}, [3] = {.lex_state = 1}, [4] = {.lex_state = 1}, - [5] = {.lex_state = 1}, - [6] = {.lex_state = 21}, - [7] = {.lex_state = 21}, - [8] = {.lex_state = 1}, - [9] = {.lex_state = 21}, - [10] = {.lex_state = 21}, - [11] = {.lex_state = 21}, - [12] = {.lex_state = 21}, - [13] = {.lex_state = 1}, - [14] = {.lex_state = 21}, - [15] = {.lex_state = 21}, - [16] = {.lex_state = 21}, - [17] = {.lex_state = 21}, - [18] = {.lex_state = 1}, - [19] = {.lex_state = 21}, - [20] = {.lex_state = 21}, - [21] = {.lex_state = 21}, - [22] = {.lex_state = 1}, - [23] = {.lex_state = 1}, - [24] = {.lex_state = 21}, - [25] = {.lex_state = 21}, - [26] = {.lex_state = 21}, - [27] = {.lex_state = 21}, - [28] = {.lex_state = 21}, - [29] = {.lex_state = 21}, - [30] = {.lex_state = 21}, - [31] = {.lex_state = 21}, - [32] = {.lex_state = 21}, - [33] = {.lex_state = 21}, - [34] = {.lex_state = 21}, - [35] = {.lex_state = 21}, - [36] = {.lex_state = 21}, - [37] = {.lex_state = 21}, - [38] = {.lex_state = 21}, - [39] = {.lex_state = 21}, - [40] = {.lex_state = 21}, - [41] = {.lex_state = 21}, - [42] = {.lex_state = 1}, - [43] = {.lex_state = 1}, - [44] = {.lex_state = 1}, - [45] = {.lex_state = 1}, - [46] = {.lex_state = 1}, - [47] = {.lex_state = 2}, - [48] = {.lex_state = 2}, - [49] = {.lex_state = 2}, - [50] = {.lex_state = 1}, - [51] = {.lex_state = 2}, - [52] = {.lex_state = 2}, - [53] = {.lex_state = 2}, - [54] = {.lex_state = 2}, - [55] = {.lex_state = 2}, - [56] = {.lex_state = 2}, - [57] = {.lex_state = 2}, + [5] = {.lex_state = 2}, + [6] = {.lex_state = 22}, + [7] = {.lex_state = 22}, + [8] = {.lex_state = 2}, + [9] = {.lex_state = 22}, + [10] = {.lex_state = 22}, + [11] = {.lex_state = 22}, + [12] = {.lex_state = 22}, + [13] = {.lex_state = 2}, + [14] = {.lex_state = 22}, + [15] = {.lex_state = 22}, + [16] = {.lex_state = 22}, + [17] = {.lex_state = 22}, + [18] = {.lex_state = 2}, + [19] = {.lex_state = 22}, + [20] = {.lex_state = 22}, + [21] = {.lex_state = 22}, + [22] = {.lex_state = 2}, + [23] = {.lex_state = 2}, + [24] = {.lex_state = 22}, + [25] = {.lex_state = 22}, + [26] = {.lex_state = 22}, + [27] = {.lex_state = 22}, + [28] = {.lex_state = 22}, + [29] = {.lex_state = 22}, + [30] = {.lex_state = 22}, + [31] = {.lex_state = 22}, + [32] = {.lex_state = 22}, + [33] = {.lex_state = 22}, + [34] = {.lex_state = 22}, + [35] = {.lex_state = 22}, + [36] = {.lex_state = 22}, + [37] = {.lex_state = 22}, + [38] = {.lex_state = 22}, + [39] = {.lex_state = 22}, + [40] = {.lex_state = 22}, + [41] = {.lex_state = 22}, + [42] = {.lex_state = 6}, + [43] = {.lex_state = 6}, + [44] = {.lex_state = 6}, + [45] = {.lex_state = 6}, + [46] = {.lex_state = 6}, + [47] = {.lex_state = 3}, + [48] = {.lex_state = 3}, + [49] = {.lex_state = 3}, + [50] = {.lex_state = 6}, + [51] = {.lex_state = 3}, + [52] = {.lex_state = 3}, + [53] = {.lex_state = 3}, + [54] = {.lex_state = 3}, + [55] = {.lex_state = 3}, + [56] = {.lex_state = 3}, + [57] = {.lex_state = 3}, [58] = {.lex_state = 0}, - [59] = {.lex_state = 17}, + [59] = {.lex_state = 18}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { @@ -1405,8 +1496,8 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_BQUOTE] = ACTIONS(41), [anon_sym_QMARK] = ACTIONS(41), [anon_sym_Newline] = ACTIONS(41), - [aux_sym_format_directive_type_token11] = ACTIONS(41), - [anon_sym_DQUOTE] = ACTIONS(43), + [aux_sym_format_directive_type_token11] = ACTIONS(43), + [anon_sym_DQUOTE] = ACTIONS(45), }, [3] = { [sym__format_token] = STATE(42), @@ -1445,8 +1536,47 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_BQUOTE] = ACTIONS(41), [anon_sym_QMARK] = ACTIONS(41), [anon_sym_Newline] = ACTIONS(41), - [aux_sym_format_directive_type_token11] = ACTIONS(41), - [anon_sym_DQUOTE] = ACTIONS(45), + [aux_sym_format_directive_type_token11] = ACTIONS(43), + [anon_sym_DQUOTE] = ACTIONS(47), + }, + [4] = { + [sym__format_token] = STATE(42), + [sym_format_prefix_parameters] = STATE(5), + [sym_format_modifiers] = STATE(13), + [sym_format_directive_type] = STATE(55), + [aux_sym_format_modifiers_repeat1] = STATE(46), + [aux_sym_num_lit_token1] = ACTIONS(27), + [anon_sym_SQUOTE] = ACTIONS(29), + [anon_sym_v] = ACTIONS(31), + [anon_sym_V] = ACTIONS(31), + [anon_sym_POUND] = ACTIONS(33), + [anon_sym_COMMA] = ACTIONS(35), + [anon_sym_AT] = ACTIONS(37), + [anon_sym_AT_COLON] = ACTIONS(39), + [anon_sym_COLON] = ACTIONS(37), + [anon_sym_COLON_AT] = ACTIONS(39), + [anon_sym_TILDE] = ACTIONS(41), + [anon_sym_PERCENT] = ACTIONS(41), + [anon_sym_AMP] = ACTIONS(41), + [anon_sym_PIPE] = ACTIONS(41), + [aux_sym_format_directive_type_token1] = ACTIONS(41), + [aux_sym_format_directive_type_token2] = ACTIONS(41), + [anon_sym_LF] = ACTIONS(41), + [anon_sym_CR] = ACTIONS(41), + [aux_sym_format_directive_type_token3] = ACTIONS(41), + [aux_sym_format_directive_type_token4] = ACTIONS(41), + [aux_sym_format_directive_type_token5] = ACTIONS(41), + [aux_sym_format_directive_type_token6] = ACTIONS(41), + [anon_sym__] = ACTIONS(41), + [aux_sym_format_directive_type_token7] = ACTIONS(41), + [aux_sym_format_directive_type_token8] = ACTIONS(41), + [aux_sym_format_directive_type_token9] = ACTIONS(41), + [aux_sym_format_directive_type_token10] = ACTIONS(41), + [anon_sym_SEMI] = ACTIONS(41), + [anon_sym_BQUOTE] = ACTIONS(41), + [anon_sym_QMARK] = ACTIONS(41), + [anon_sym_Newline] = ACTIONS(41), + [aux_sym_format_directive_type_token11] = ACTIONS(43), }, [4] = { [sym__format_token] = STATE(42), @@ -1490,13 +1620,15 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { }; static const uint16_t ts_small_parse_table[] = { - [0] = 10, + [0] = 11, ACTIONS(27), 1, aux_sym_num_lit_token1, ACTIONS(29), 1, anon_sym_SQUOTE, ACTIONS(35), 1, anon_sym_COMMA, + ACTIONS(43), 1, + aux_sym_format_directive_type_token11, STATE(18), 1, sym_format_modifiers, STATE(42), 1, @@ -1511,7 +1643,7 @@ static const uint16_t ts_small_parse_table[] = { ACTIONS(39), 2, anon_sym_AT_COLON, anon_sym_COLON_AT, - ACTIONS(41), 22, + ACTIONS(41), 21, anon_sym_TILDE, anon_sym_PERCENT, anon_sym_AMP, @@ -1533,8 +1665,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_BQUOTE, anon_sym_QMARK, anon_sym_Newline, - aux_sym_format_directive_type_token11, - [54] = 14, + [56] = 14, ACTIONS(7), 1, aux_sym_num_lit_token1, ACTIONS(9), 1, @@ -1553,13 +1684,13 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(25), 1, anon_sym_COMMA_AT, - ACTIONS(47), 1, + ACTIONS(49), 1, ts_builtin_sym_end, - ACTIONS(51), 1, + ACTIONS(53), 1, sym_null_lit, STATE(33), 1, sym__bare_list_lit, - ACTIONS(49), 6, + ACTIONS(51), 6, sym__ws, sym_comment, sym_block_comment, @@ -1578,32 +1709,32 @@ static const uint16_t ts_small_parse_table[] = { sym_unquote_splicing_lit, sym_unquoting_lit, aux_sym_source_repeat1, - [112] = 14, - ACTIONS(53), 1, + [114] = 14, + ACTIONS(55), 1, ts_builtin_sym_end, - ACTIONS(58), 1, + ACTIONS(60), 1, aux_sym_num_lit_token1, - ACTIONS(61), 1, + ACTIONS(63), 1, anon_sym_SQUOTE, - ACTIONS(64), 1, + ACTIONS(66), 1, anon_sym_COMMA, - ACTIONS(67), 1, + ACTIONS(69), 1, anon_sym_BQUOTE, - ACTIONS(70), 1, + ACTIONS(72), 1, anon_sym_DQUOTE, - ACTIONS(73), 1, + ACTIONS(75), 1, sym_null_lit, - ACTIONS(76), 1, + ACTIONS(78), 1, anon_sym_SLASH, - ACTIONS(79), 1, + ACTIONS(81), 1, aux_sym__sym_unqualified_token1, - ACTIONS(82), 1, + ACTIONS(84), 1, anon_sym_LPAREN, - ACTIONS(85), 1, + ACTIONS(87), 1, anon_sym_COMMA_AT, STATE(33), 1, sym__bare_list_lit, - ACTIONS(55), 6, + ACTIONS(57), 6, sym__ws, sym_comment, sym_block_comment, @@ -1622,11 +1753,12 @@ static const uint16_t ts_small_parse_table[] = { sym_unquote_splicing_lit, sym_unquoting_lit, aux_sym_source_repeat1, - [170] = 2, - ACTIONS(90), 2, + [172] = 2, + ACTIONS(92), 3, anon_sym_AT, anon_sym_COLON, - ACTIONS(88), 27, + aux_sym_format_directive_type_token11, + ACTIONS(90), 26, aux_sym_num_lit_token1, anon_sym_SQUOTE, anon_sym_COMMA, @@ -1653,8 +1785,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_BQUOTE, anon_sym_QMARK, anon_sym_Newline, - aux_sym_format_directive_type_token11, - [204] = 16, + [206] = 16, ACTIONS(7), 1, aux_sym_num_lit_token1, ACTIONS(9), 1, @@ -1673,20 +1804,20 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(25), 1, anon_sym_COMMA_AT, - ACTIONS(96), 1, - sym_null_lit, ACTIONS(98), 1, + sym_null_lit, + ACTIONS(100), 1, anon_sym_RPAREN, STATE(33), 1, sym__bare_list_lit, STATE(11), 2, sym__gap, aux_sym__bare_list_lit_repeat1, - ACTIONS(92), 3, + ACTIONS(94), 3, sym__ws, sym_comment, sym_block_comment, - ACTIONS(94), 3, + ACTIONS(96), 3, sym_kwd_lit, sym_char_lit, sym_bool_lit, @@ -1700,7 +1831,7 @@ static const uint16_t ts_small_parse_table[] = { sym_quasi_quoting_lit, sym_unquote_splicing_lit, sym_unquoting_lit, - [266] = 16, + [268] = 16, ACTIONS(7), 1, aux_sym_num_lit_token1, ACTIONS(9), 1, @@ -1719,20 +1850,20 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(25), 1, anon_sym_COMMA_AT, - ACTIONS(96), 1, + ACTIONS(98), 1, sym_null_lit, - ACTIONS(102), 1, + ACTIONS(104), 1, anon_sym_RPAREN, STATE(33), 1, sym__bare_list_lit, STATE(9), 2, sym__gap, aux_sym__bare_list_lit_repeat1, - ACTIONS(94), 3, + ACTIONS(96), 3, sym_kwd_lit, sym_char_lit, sym_bool_lit, - ACTIONS(100), 3, + ACTIONS(102), 3, sym__ws, sym_comment, sym_block_comment, @@ -1746,39 +1877,39 @@ static const uint16_t ts_small_parse_table[] = { sym_quasi_quoting_lit, sym_unquote_splicing_lit, sym_unquoting_lit, - [328] = 16, - ACTIONS(107), 1, + [330] = 16, + ACTIONS(109), 1, aux_sym_num_lit_token1, - ACTIONS(113), 1, + ACTIONS(115), 1, anon_sym_SQUOTE, - ACTIONS(116), 1, + ACTIONS(118), 1, anon_sym_COMMA, - ACTIONS(119), 1, + ACTIONS(121), 1, anon_sym_BQUOTE, - ACTIONS(122), 1, + ACTIONS(124), 1, anon_sym_DQUOTE, - ACTIONS(125), 1, + ACTIONS(127), 1, sym_null_lit, - ACTIONS(128), 1, + ACTIONS(130), 1, anon_sym_SLASH, - ACTIONS(131), 1, + ACTIONS(133), 1, aux_sym__sym_unqualified_token1, - ACTIONS(134), 1, + ACTIONS(136), 1, anon_sym_LPAREN, - ACTIONS(137), 1, - anon_sym_RPAREN, ACTIONS(139), 1, + anon_sym_RPAREN, + ACTIONS(141), 1, anon_sym_COMMA_AT, STATE(33), 1, sym__bare_list_lit, STATE(11), 2, sym__gap, aux_sym__bare_list_lit_repeat1, - ACTIONS(104), 3, + ACTIONS(106), 3, sym__ws, sym_comment, sym_block_comment, - ACTIONS(110), 3, + ACTIONS(112), 3, sym_kwd_lit, sym_char_lit, sym_bool_lit, @@ -1792,12 +1923,12 @@ static const uint16_t ts_small_parse_table[] = { sym_quasi_quoting_lit, sym_unquote_splicing_lit, sym_unquoting_lit, - [390] = 15, + [392] = 15, ACTIONS(7), 1, aux_sym_num_lit_token1, - ACTIONS(9), 1, + ACTIONS(113), 1, anon_sym_SQUOTE, - ACTIONS(11), 1, + ACTIONS(116), 1, anon_sym_COMMA, ACTIONS(13), 1, anon_sym_BQUOTE, @@ -1811,18 +1942,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(25), 1, anon_sym_COMMA_AT, - ACTIONS(146), 1, + ACTIONS(148), 1, sym_null_lit, STATE(33), 1, sym__bare_list_lit, STATE(29), 2, sym__gap, aux_sym_quoting_lit_repeat1, - ACTIONS(142), 3, + ACTIONS(144), 3, sym__ws, sym_comment, sym_block_comment, - ACTIONS(144), 3, + ACTIONS(146), 3, sym_kwd_lit, sym_char_lit, sym_bool_lit, @@ -1836,12 +1967,14 @@ static const uint16_t ts_small_parse_table[] = { sym_quasi_quoting_lit, sym_unquote_splicing_lit, sym_unquoting_lit, - [449] = 7, + [451] = 8, ACTIONS(27), 1, aux_sym_num_lit_token1, ACTIONS(29), 1, anon_sym_SQUOTE, - ACTIONS(148), 1, + ACTIONS(43), 1, + aux_sym_format_directive_type_token11, + ACTIONS(150), 1, anon_sym_COMMA, STATE(42), 1, sym__format_token, @@ -1849,7 +1982,7 @@ static const uint16_t ts_small_parse_table[] = { aux_sym_format_modifiers_repeat1, STATE(52), 1, sym_format_directive_type, - ACTIONS(41), 22, + ACTIONS(41), 21, anon_sym_TILDE, anon_sym_PERCENT, anon_sym_AMP, @@ -1871,8 +2004,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_BQUOTE, anon_sym_QMARK, anon_sym_Newline, - aux_sym_format_directive_type_token11, - [492] = 15, + [496] = 15, ACTIONS(7), 1, aux_sym_num_lit_token1, ACTIONS(9), 1, @@ -1891,18 +2023,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(25), 1, anon_sym_COMMA_AT, - ACTIONS(152), 1, + ACTIONS(154), 1, sym_null_lit, STATE(33), 1, sym__bare_list_lit, STATE(29), 2, sym__gap, aux_sym_quoting_lit_repeat1, - ACTIONS(142), 3, + ACTIONS(144), 3, sym__ws, sym_comment, sym_block_comment, - ACTIONS(150), 3, + ACTIONS(152), 3, sym_kwd_lit, sym_char_lit, sym_bool_lit, @@ -1916,7 +2048,7 @@ static const uint16_t ts_small_parse_table[] = { sym_quasi_quoting_lit, sym_unquote_splicing_lit, sym_unquoting_lit, - [551] = 15, + [555] = 15, ACTIONS(7), 1, aux_sym_num_lit_token1, ACTIONS(9), 1, @@ -1935,22 +2067,22 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(25), 1, anon_sym_COMMA_AT, - ACTIONS(158), 1, + ACTIONS(160), 1, sym_null_lit, STATE(33), 1, sym__bare_list_lit, STATE(14), 2, sym__gap, aux_sym_quoting_lit_repeat1, - ACTIONS(154), 3, + ACTIONS(156), 3, sym__ws, sym_comment, sym_block_comment, - ACTIONS(156), 3, + ACTIONS(158), 3, sym_kwd_lit, sym_char_lit, sym_bool_lit, - STATE(38), 9, + STATE(41), 9, sym__form, sym_num_lit, sym_str_lit, @@ -1960,7 +2092,7 @@ static const uint16_t ts_small_parse_table[] = { sym_quasi_quoting_lit, sym_unquote_splicing_lit, sym_unquoting_lit, - [610] = 15, + [614] = 15, ACTIONS(7), 1, aux_sym_num_lit_token1, ACTIONS(9), 1, @@ -1979,18 +2111,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(25), 1, anon_sym_COMMA_AT, - ACTIONS(162), 1, + ACTIONS(164), 1, sym_null_lit, STATE(33), 1, sym__bare_list_lit, STATE(29), 2, sym__gap, aux_sym_quoting_lit_repeat1, - ACTIONS(142), 3, + ACTIONS(144), 3, sym__ws, sym_comment, sym_block_comment, - ACTIONS(160), 3, + ACTIONS(162), 3, sym_kwd_lit, sym_char_lit, sym_bool_lit, @@ -2004,7 +2136,7 @@ static const uint16_t ts_small_parse_table[] = { sym_quasi_quoting_lit, sym_unquote_splicing_lit, sym_unquoting_lit, - [669] = 15, + [673] = 15, ACTIONS(7), 1, aux_sym_num_lit_token1, ACTIONS(9), 1, @@ -2023,18 +2155,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(25), 1, anon_sym_COMMA_AT, - ACTIONS(168), 1, + ACTIONS(170), 1, sym_null_lit, STATE(33), 1, sym__bare_list_lit, STATE(21), 2, sym__gap, aux_sym_quoting_lit_repeat1, - ACTIONS(164), 3, + ACTIONS(166), 3, sym__ws, sym_comment, sym_block_comment, - ACTIONS(166), 3, + ACTIONS(168), 3, sym_kwd_lit, sym_char_lit, sym_bool_lit, @@ -2048,12 +2180,14 @@ static const uint16_t ts_small_parse_table[] = { sym_quasi_quoting_lit, sym_unquote_splicing_lit, sym_unquoting_lit, - [728] = 7, + [732] = 8, ACTIONS(27), 1, aux_sym_num_lit_token1, ACTIONS(29), 1, anon_sym_SQUOTE, - ACTIONS(148), 1, + ACTIONS(43), 1, + aux_sym_format_directive_type_token11, + ACTIONS(150), 1, anon_sym_COMMA, STATE(42), 1, sym__format_token, @@ -2083,8 +2217,7 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_BQUOTE, anon_sym_QMARK, anon_sym_Newline, - aux_sym_format_directive_type_token11, - [771] = 15, + [777] = 15, ACTIONS(7), 1, aux_sym_num_lit_token1, ACTIONS(9), 1, @@ -2103,18 +2236,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(25), 1, anon_sym_COMMA_AT, - ACTIONS(174), 1, + ACTIONS(176), 1, sym_null_lit, STATE(33), 1, sym__bare_list_lit, STATE(12), 2, sym__gap, aux_sym_quoting_lit_repeat1, - ACTIONS(170), 3, + ACTIONS(172), 3, sym__ws, sym_comment, sym_block_comment, - ACTIONS(172), 3, + ACTIONS(174), 3, sym_kwd_lit, sym_char_lit, sym_bool_lit, @@ -2128,7 +2261,7 @@ static const uint16_t ts_small_parse_table[] = { sym_quasi_quoting_lit, sym_unquote_splicing_lit, sym_unquoting_lit, - [830] = 15, + [836] = 15, ACTIONS(7), 1, aux_sym_num_lit_token1, ACTIONS(9), 1, @@ -2147,18 +2280,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(25), 1, anon_sym_COMMA_AT, - ACTIONS(180), 1, + ACTIONS(182), 1, sym_null_lit, STATE(33), 1, sym__bare_list_lit, STATE(16), 2, sym__gap, aux_sym_quoting_lit_repeat1, - ACTIONS(176), 3, + ACTIONS(178), 3, sym__ws, sym_comment, sym_block_comment, - ACTIONS(178), 3, + ACTIONS(180), 3, sym_kwd_lit, sym_char_lit, sym_bool_lit, @@ -2172,7 +2305,7 @@ static const uint16_t ts_small_parse_table[] = { sym_quasi_quoting_lit, sym_unquote_splicing_lit, sym_unquoting_lit, - [889] = 15, + [895] = 15, ACTIONS(7), 1, aux_sym_num_lit_token1, ACTIONS(9), 1, @@ -2191,18 +2324,18 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, ACTIONS(25), 1, anon_sym_COMMA_AT, - ACTIONS(184), 1, + ACTIONS(186), 1, sym_null_lit, STATE(33), 1, sym__bare_list_lit, STATE(29), 2, sym__gap, aux_sym_quoting_lit_repeat1, - ACTIONS(142), 3, + ACTIONS(144), 3, sym__ws, sym_comment, sym_block_comment, - ACTIONS(182), 3, + ACTIONS(184), 3, sym_kwd_lit, sym_char_lit, sym_bool_lit, @@ -2216,8 +2349,10 @@ static const uint16_t ts_small_parse_table[] = { sym_quasi_quoting_lit, sym_unquote_splicing_lit, sym_unquoting_lit, - [948] = 1, - ACTIONS(186), 25, + [954] = 2, + ACTIONS(190), 1, + aux_sym_format_directive_type_token11, + ACTIONS(188), 24, aux_sym_num_lit_token1, anon_sym_SQUOTE, anon_sym_COMMA, @@ -2242,9 +2377,10 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_BQUOTE, anon_sym_QMARK, anon_sym_Newline, + [984] = 2, + ACTIONS(194), 1, aux_sym_format_directive_type_token11, - [976] = 1, - ACTIONS(188), 25, + ACTIONS(192), 24, aux_sym_num_lit_token1, anon_sym_SQUOTE, anon_sym_COMMA, @@ -2269,13 +2405,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_BQUOTE, anon_sym_QMARK, anon_sym_Newline, - aux_sym_format_directive_type_token11, - [1004] = 2, - ACTIONS(192), 3, + [1014] = 2, + ACTIONS(198), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(190), 15, + ACTIONS(196), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2291,12 +2426,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1027] = 2, - ACTIONS(196), 3, + [1037] = 2, + ACTIONS(202), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(194), 15, + ACTIONS(200), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2312,12 +2447,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1050] = 2, - ACTIONS(200), 3, + [1060] = 2, + ACTIONS(206), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(198), 15, + ACTIONS(204), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2333,12 +2468,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1073] = 2, - ACTIONS(204), 3, + [1083] = 2, + ACTIONS(210), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(202), 15, + ACTIONS(208), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2354,12 +2489,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1096] = 2, - ACTIONS(208), 3, + [1106] = 2, + ACTIONS(214), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(206), 15, + ACTIONS(212), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2375,19 +2510,19 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1119] = 4, + [1129] = 4, STATE(29), 2, sym__gap, aux_sym_quoting_lit_repeat1, - ACTIONS(210), 3, + ACTIONS(216), 3, sym__ws, sym_comment, sym_block_comment, - ACTIONS(215), 3, + ACTIONS(221), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(213), 10, + ACTIONS(219), 10, aux_sym_num_lit_token1, sym_kwd_lit, anon_sym_SQUOTE, @@ -2398,12 +2533,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_SLASH, anon_sym_LPAREN, anon_sym_COMMA_AT, - [1146] = 2, - ACTIONS(219), 3, + [1156] = 2, + ACTIONS(225), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(217), 15, + ACTIONS(223), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2419,12 +2554,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1169] = 2, - ACTIONS(223), 3, + [1179] = 2, + ACTIONS(229), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(221), 15, + ACTIONS(227), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2440,12 +2575,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1192] = 2, - ACTIONS(227), 3, + [1202] = 2, + ACTIONS(233), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(225), 15, + ACTIONS(231), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2461,12 +2596,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1215] = 2, - ACTIONS(231), 3, + [1225] = 2, + ACTIONS(237), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(229), 15, + ACTIONS(235), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2482,12 +2617,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1238] = 2, - ACTIONS(235), 3, + [1248] = 2, + ACTIONS(241), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(233), 15, + ACTIONS(239), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2503,12 +2638,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1261] = 2, - ACTIONS(239), 3, + [1271] = 2, + ACTIONS(245), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(237), 15, + ACTIONS(243), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2524,12 +2659,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1284] = 2, - ACTIONS(243), 3, + [1294] = 2, + ACTIONS(249), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(241), 15, + ACTIONS(247), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2545,12 +2680,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1307] = 2, - ACTIONS(247), 3, + [1317] = 2, + ACTIONS(253), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(245), 15, + ACTIONS(251), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2566,12 +2701,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1330] = 2, - ACTIONS(251), 3, + [1340] = 2, + ACTIONS(257), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(249), 15, + ACTIONS(255), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2587,12 +2722,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1353] = 2, - ACTIONS(255), 3, + [1363] = 2, + ACTIONS(261), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(253), 15, + ACTIONS(259), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2608,12 +2743,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1376] = 2, - ACTIONS(259), 3, + [1386] = 2, + ACTIONS(265), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(257), 15, + ACTIONS(263), 15, ts_builtin_sym_end, sym__ws, sym_comment, @@ -2629,12 +2764,12 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1399] = 2, - ACTIONS(263), 3, + [1409] = 2, + ACTIONS(269), 3, anon_sym_COMMA, sym_null_lit, aux_sym__sym_unqualified_token1, - ACTIONS(261), 14, + ACTIONS(267), 14, sym__ws, sym_comment, sym_block_comment, @@ -2649,45 +2784,40 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_LPAREN, anon_sym_RPAREN, anon_sym_COMMA_AT, - [1421] = 4, - ACTIONS(271), 1, + [1431] = 4, + ACTIONS(277), 1, anon_sym_STAR, - ACTIONS(267), 2, + ACTIONS(273), 2, anon_sym_AT, anon_sym_COLON, - ACTIONS(269), 4, + ACTIONS(275), 4, anon_sym_TILDE, anon_sym_PERCENT, anon_sym_AMP, anon_sym_PIPE, - ACTIONS(265), 6, + ACTIONS(271), 6, aux_sym_num_lit_token1, anon_sym_SQUOTE, anon_sym_COMMA, anon_sym_AT_COLON, anon_sym_COLON_AT, aux_sym_format_directive_type_token11, - [1443] = 2, - ACTIONS(275), 2, + [1453] = 2, + ACTIONS(281), 2, anon_sym_AT, anon_sym_COLON, - ACTIONS(273), 11, + ACTIONS(279), 11, aux_sym_num_lit_token1, anon_sym_SQUOTE, anon_sym_COMMA, anon_sym_AT_COLON, anon_sym_COLON_AT, - anon_sym_TILDE, - anon_sym_PERCENT, - anon_sym_AMP, - anon_sym_PIPE, - anon_sym_STAR, aux_sym_format_directive_type_token11, - [1461] = 2, - ACTIONS(279), 2, + [1471] = 2, + ACTIONS(285), 2, anon_sym_AT, anon_sym_COLON, - ACTIONS(277), 11, + ACTIONS(283), 11, aux_sym_num_lit_token1, anon_sym_SQUOTE, anon_sym_COMMA, @@ -2699,192 +2829,197 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PIPE, anon_sym_STAR, aux_sym_format_directive_type_token11, - [1479] = 6, - ACTIONS(281), 1, + [1489] = 6, + ACTIONS(287), 1, aux_sym_num_lit_token1, - ACTIONS(284), 1, + ACTIONS(290), 1, anon_sym_SQUOTE, - ACTIONS(287), 1, + ACTIONS(293), 1, anon_sym_COMMA, - ACTIONS(290), 2, + ACTIONS(296), 2, anon_sym_AT, anon_sym_COLON, STATE(45), 2, sym__format_token, aux_sym_format_modifiers_repeat1, - ACTIONS(292), 3, + ACTIONS(298), 3, anon_sym_AT_COLON, anon_sym_COLON_AT, + anon_sym_TILDE, + anon_sym_PERCENT, + anon_sym_AMP, + anon_sym_PIPE, + anon_sym_STAR, aux_sym_format_directive_type_token11, - [1502] = 7, + [1512] = 7, ACTIONS(27), 1, aux_sym_num_lit_token1, ACTIONS(29), 1, anon_sym_SQUOTE, - ACTIONS(294), 1, - anon_sym_COMMA, ACTIONS(300), 1, + anon_sym_COMMA, + ACTIONS(306), 1, aux_sym_format_directive_type_token11, - ACTIONS(296), 2, + ACTIONS(302), 2, anon_sym_AT, anon_sym_COLON, - ACTIONS(298), 2, + ACTIONS(304), 2, anon_sym_AT_COLON, anon_sym_COLON_AT, STATE(45), 2, sym__format_token, aux_sym_format_modifiers_repeat1, - [1527] = 4, - ACTIONS(302), 1, + [1537] = 4, + ACTIONS(308), 1, anon_sym_TILDE, - ACTIONS(305), 1, + ACTIONS(311), 1, anon_sym_DQUOTE, - ACTIONS(307), 2, + ACTIONS(313), 2, aux_sym_str_lit_token1, aux_sym_str_lit_token2, STATE(47), 2, sym_format_specifier, aux_sym_str_lit_repeat1, - [1542] = 4, - ACTIONS(43), 1, + [1552] = 4, + ACTIONS(45), 1, anon_sym_DQUOTE, - ACTIONS(310), 1, + ACTIONS(316), 1, anon_sym_TILDE, - ACTIONS(312), 2, + ACTIONS(318), 2, aux_sym_str_lit_token1, aux_sym_str_lit_token2, STATE(47), 2, sym_format_specifier, aux_sym_str_lit_repeat1, - [1557] = 4, - ACTIONS(314), 1, + [1567] = 4, + ACTIONS(320), 1, anon_sym_TILDE, - ACTIONS(316), 1, + ACTIONS(322), 1, anon_sym_DQUOTE, - ACTIONS(318), 2, + ACTIONS(324), 2, aux_sym_str_lit_token1, aux_sym_str_lit_token2, STATE(48), 2, sym_format_specifier, aux_sym_str_lit_repeat1, - [1572] = 5, + [1582] = 5, ACTIONS(27), 1, aux_sym_num_lit_token1, ACTIONS(29), 1, anon_sym_SQUOTE, - ACTIONS(294), 1, - anon_sym_COMMA, ACTIONS(300), 1, + anon_sym_COMMA, + ACTIONS(306), 1, aux_sym_format_directive_type_token11, STATE(45), 2, sym__format_token, aux_sym_format_modifiers_repeat1, - [1589] = 1, - ACTIONS(320), 4, + [1599] = 1, + ACTIONS(326), 4, anon_sym_TILDE, anon_sym_DQUOTE, aux_sym_str_lit_token1, aux_sym_str_lit_token2, - [1596] = 1, - ACTIONS(322), 4, + [1606] = 1, + ACTIONS(328), 4, anon_sym_TILDE, anon_sym_DQUOTE, aux_sym_str_lit_token1, aux_sym_str_lit_token2, - [1603] = 1, - ACTIONS(324), 4, + [1613] = 1, + ACTIONS(330), 4, anon_sym_TILDE, anon_sym_DQUOTE, aux_sym_str_lit_token1, aux_sym_str_lit_token2, - [1610] = 1, - ACTIONS(326), 4, + [1620] = 1, + ACTIONS(332), 4, anon_sym_TILDE, anon_sym_DQUOTE, aux_sym_str_lit_token1, aux_sym_str_lit_token2, - [1617] = 1, - ACTIONS(328), 4, + [1627] = 1, + ACTIONS(334), 4, anon_sym_TILDE, anon_sym_DQUOTE, aux_sym_str_lit_token1, aux_sym_str_lit_token2, - [1624] = 1, - ACTIONS(330), 4, + [1634] = 1, + ACTIONS(336), 4, anon_sym_TILDE, anon_sym_DQUOTE, aux_sym_str_lit_token1, aux_sym_str_lit_token2, - [1631] = 1, - ACTIONS(332), 4, + [1641] = 1, + ACTIONS(338), 4, anon_sym_TILDE, anon_sym_DQUOTE, aux_sym_str_lit_token1, aux_sym_str_lit_token2, - [1638] = 1, - ACTIONS(334), 1, + [1648] = 1, + ACTIONS(340), 1, ts_builtin_sym_end, - [1642] = 1, - ACTIONS(336), 1, + [1652] = 1, + ACTIONS(342), 1, aux_sym__format_token_token1, }; static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(5)] = 0, - [SMALL_STATE(6)] = 54, - [SMALL_STATE(7)] = 112, - [SMALL_STATE(8)] = 170, - [SMALL_STATE(9)] = 204, - [SMALL_STATE(10)] = 266, - [SMALL_STATE(11)] = 328, - [SMALL_STATE(12)] = 390, - [SMALL_STATE(13)] = 449, - [SMALL_STATE(14)] = 492, - [SMALL_STATE(15)] = 551, - [SMALL_STATE(16)] = 610, - [SMALL_STATE(17)] = 669, - [SMALL_STATE(18)] = 728, - [SMALL_STATE(19)] = 771, - [SMALL_STATE(20)] = 830, - [SMALL_STATE(21)] = 889, - [SMALL_STATE(22)] = 948, - [SMALL_STATE(23)] = 976, - [SMALL_STATE(24)] = 1004, - [SMALL_STATE(25)] = 1027, - [SMALL_STATE(26)] = 1050, - [SMALL_STATE(27)] = 1073, - [SMALL_STATE(28)] = 1096, - [SMALL_STATE(29)] = 1119, - [SMALL_STATE(30)] = 1146, - [SMALL_STATE(31)] = 1169, - [SMALL_STATE(32)] = 1192, - [SMALL_STATE(33)] = 1215, - [SMALL_STATE(34)] = 1238, - [SMALL_STATE(35)] = 1261, - [SMALL_STATE(36)] = 1284, - [SMALL_STATE(37)] = 1307, - [SMALL_STATE(38)] = 1330, - [SMALL_STATE(39)] = 1353, - [SMALL_STATE(40)] = 1376, - [SMALL_STATE(41)] = 1399, - [SMALL_STATE(42)] = 1421, - [SMALL_STATE(43)] = 1443, - [SMALL_STATE(44)] = 1461, - [SMALL_STATE(45)] = 1479, - [SMALL_STATE(46)] = 1502, - [SMALL_STATE(47)] = 1527, - [SMALL_STATE(48)] = 1542, - [SMALL_STATE(49)] = 1557, - [SMALL_STATE(50)] = 1572, - [SMALL_STATE(51)] = 1589, - [SMALL_STATE(52)] = 1596, - [SMALL_STATE(53)] = 1603, - [SMALL_STATE(54)] = 1610, - [SMALL_STATE(55)] = 1617, - [SMALL_STATE(56)] = 1624, - [SMALL_STATE(57)] = 1631, - [SMALL_STATE(58)] = 1638, - [SMALL_STATE(59)] = 1642, + [SMALL_STATE(6)] = 56, + [SMALL_STATE(7)] = 114, + [SMALL_STATE(8)] = 172, + [SMALL_STATE(9)] = 206, + [SMALL_STATE(10)] = 268, + [SMALL_STATE(11)] = 330, + [SMALL_STATE(12)] = 392, + [SMALL_STATE(13)] = 451, + [SMALL_STATE(14)] = 496, + [SMALL_STATE(15)] = 555, + [SMALL_STATE(16)] = 614, + [SMALL_STATE(17)] = 673, + [SMALL_STATE(18)] = 732, + [SMALL_STATE(19)] = 777, + [SMALL_STATE(20)] = 836, + [SMALL_STATE(21)] = 895, + [SMALL_STATE(22)] = 954, + [SMALL_STATE(23)] = 984, + [SMALL_STATE(24)] = 1014, + [SMALL_STATE(25)] = 1037, + [SMALL_STATE(26)] = 1060, + [SMALL_STATE(27)] = 1083, + [SMALL_STATE(28)] = 1106, + [SMALL_STATE(29)] = 1129, + [SMALL_STATE(30)] = 1156, + [SMALL_STATE(31)] = 1179, + [SMALL_STATE(32)] = 1202, + [SMALL_STATE(33)] = 1225, + [SMALL_STATE(34)] = 1248, + [SMALL_STATE(35)] = 1271, + [SMALL_STATE(36)] = 1294, + [SMALL_STATE(37)] = 1317, + [SMALL_STATE(38)] = 1340, + [SMALL_STATE(39)] = 1363, + [SMALL_STATE(40)] = 1386, + [SMALL_STATE(41)] = 1409, + [SMALL_STATE(42)] = 1431, + [SMALL_STATE(43)] = 1453, + [SMALL_STATE(44)] = 1471, + [SMALL_STATE(45)] = 1489, + [SMALL_STATE(46)] = 1512, + [SMALL_STATE(47)] = 1537, + [SMALL_STATE(48)] = 1552, + [SMALL_STATE(49)] = 1567, + [SMALL_STATE(50)] = 1582, + [SMALL_STATE(51)] = 1599, + [SMALL_STATE(52)] = 1606, + [SMALL_STATE(53)] = 1613, + [SMALL_STATE(54)] = 1620, + [SMALL_STATE(55)] = 1627, + [SMALL_STATE(56)] = 1634, + [SMALL_STATE(57)] = 1641, + [SMALL_STATE(58)] = 1648, + [SMALL_STATE(59)] = 1652, }; static const TSParseActionEntry ts_parse_actions[] = { @@ -2910,149 +3045,154 @@ static const TSParseActionEntry ts_parse_actions[] = { [37] = {.entry = {.count = 1, .reusable = false}}, SHIFT(22), [39] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), [41] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), - [43] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), - [45] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), - [47] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source, 1), - [49] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), - [51] = {.entry = {.count = 1, .reusable = false}}, SHIFT(7), - [53] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), - [55] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(7), - [58] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(30), - [61] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(15), - [64] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(20), - [67] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(19), - [70] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(49), - [73] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(7), - [76] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(37), - [79] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(37), - [82] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(10), - [85] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(17), - [88] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_prefix_parameters, 1), - [90] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_format_prefix_parameters, 1), - [92] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), - [94] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), - [96] = {.entry = {.count = 1, .reusable = false}}, SHIFT(41), - [98] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), - [100] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), - [102] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), - [104] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(11), - [107] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(30), - [110] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(41), - [113] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(15), - [116] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(20), - [119] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(19), - [122] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(49), - [125] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(41), - [128] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(37), - [131] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(37), - [134] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(10), - [137] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), - [139] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(17), - [142] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), - [144] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), - [146] = {.entry = {.count = 1, .reusable = false}}, SHIFT(31), - [148] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), - [150] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), - [152] = {.entry = {.count = 1, .reusable = false}}, SHIFT(28), - [154] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), - [156] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), - [158] = {.entry = {.count = 1, .reusable = false}}, SHIFT(38), - [160] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), - [162] = {.entry = {.count = 1, .reusable = false}}, SHIFT(24), - [164] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), - [166] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), - [168] = {.entry = {.count = 1, .reusable = false}}, SHIFT(27), - [170] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), - [172] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), - [174] = {.entry = {.count = 1, .reusable = false}}, SHIFT(39), - [176] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), - [178] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), - [180] = {.entry = {.count = 1, .reusable = false}}, SHIFT(40), - [182] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), - [184] = {.entry = {.count = 1, .reusable = false}}, SHIFT(32), - [186] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_modifiers, 1), - [188] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_modifiers, 2), - [190] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unquoting_lit, 3, .production_id = 6), - [192] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unquoting_lit, 3, .production_id = 6), - [194] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_str_lit, 3), - [196] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_str_lit, 3), - [198] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__bare_list_lit, 2, .production_id = 4), - [200] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__bare_list_lit, 2, .production_id = 4), - [202] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unquote_splicing_lit, 2, .production_id = 3), - [204] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unquote_splicing_lit, 2, .production_id = 3), - [206] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoting_lit, 3, .production_id = 6), - [208] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_quoting_lit, 3, .production_id = 6), - [210] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_quoting_lit_repeat1, 2), SHIFT_REPEAT(29), - [213] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_quoting_lit_repeat1, 2), - [215] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_quoting_lit_repeat1, 2), - [217] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_num_lit, 1), - [219] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_num_lit, 1), - [221] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quasi_quoting_lit, 3, .production_id = 6), - [223] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_quasi_quoting_lit, 3, .production_id = 6), - [225] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unquote_splicing_lit, 3, .production_id = 6), - [227] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unquote_splicing_lit, 3, .production_id = 6), - [229] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_lit, 1, .production_id = 2), - [231] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list_lit, 1, .production_id = 2), - [233] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__bare_list_lit, 3, .production_id = 8), - [235] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__bare_list_lit, 3, .production_id = 8), - [237] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_str_lit, 2), - [239] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_str_lit, 2), - [241] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_str_lit, 4), - [243] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_str_lit, 4), - [245] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sym_lit, 1, .production_id = 1), - [247] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sym_lit, 1, .production_id = 1), - [249] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoting_lit, 2, .production_id = 3), - [251] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_quoting_lit, 2, .production_id = 3), - [253] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quasi_quoting_lit, 2, .production_id = 3), - [255] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_quasi_quoting_lit, 2, .production_id = 3), - [257] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unquoting_lit, 2, .production_id = 3), - [259] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unquoting_lit, 2, .production_id = 3), - [261] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 1, .production_id = 5), - [263] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__bare_list_lit_repeat1, 1, .production_id = 5), - [265] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_format_modifiers_repeat1, 1), - [267] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_format_modifiers_repeat1, 1), - [269] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), - [271] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), - [273] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__format_token, 1, .production_id = 7), - [275] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__format_token, 1, .production_id = 7), - [277] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__format_token, 2), - [279] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__format_token, 2), - [281] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_format_modifiers_repeat1, 2), SHIFT_REPEAT(43), - [284] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_format_modifiers_repeat1, 2), SHIFT_REPEAT(59), - [287] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_format_modifiers_repeat1, 2), SHIFT_REPEAT(45), - [290] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_format_modifiers_repeat1, 2), - [292] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_format_modifiers_repeat1, 2), - [294] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), - [296] = {.entry = {.count = 1, .reusable = false}}, SHIFT(23), - [298] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), - [300] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), - [302] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_str_lit_repeat1, 2), SHIFT_REPEAT(4), - [305] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_str_lit_repeat1, 2), - [307] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_str_lit_repeat1, 2), SHIFT_REPEAT(47), - [310] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), - [312] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), - [314] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), - [316] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), - [318] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), - [320] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_directive_type, 2, .production_id = 10), - [322] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_specifier, 3), - [324] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_directive_type, 2, .production_id = 11), - [326] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_directive_type, 2), - [328] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_specifier, 2), - [330] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_directive_type, 1), - [332] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_specifier, 4), - [334] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [336] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), + [43] = {.entry = {.count = 1, .reusable = false}}, SHIFT(56), + [45] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), + [47] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), + [49] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source, 1), + [51] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), + [53] = {.entry = {.count = 1, .reusable = false}}, SHIFT(7), + [55] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), + [57] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(7), + [60] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(30), + [63] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(15), + [66] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(20), + [69] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(19), + [72] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(49), + [75] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(7), + [78] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(37), + [81] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(37), + [84] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(10), + [87] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_repeat1, 2), SHIFT_REPEAT(17), + [90] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_prefix_parameters, 1), + [92] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_format_prefix_parameters, 1), + [94] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), + [96] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), + [98] = {.entry = {.count = 1, .reusable = false}}, SHIFT(41), + [100] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), + [102] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), + [104] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), + [106] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(11), + [109] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(30), + [112] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(41), + [115] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(15), + [118] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(20), + [121] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(19), + [124] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(49), + [127] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(41), + [130] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(37), + [133] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(37), + [136] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(10), + [139] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), + [141] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 2, .production_id = 9), SHIFT_REPEAT(17), + [144] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), + [146] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), + [148] = {.entry = {.count = 1, .reusable = false}}, SHIFT(31), + [150] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), + [152] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), + [154] = {.entry = {.count = 1, .reusable = false}}, SHIFT(28), + [156] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), + [158] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), + [160] = {.entry = {.count = 1, .reusable = false}}, SHIFT(38), + [162] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [164] = {.entry = {.count = 1, .reusable = false}}, SHIFT(24), + [166] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), + [168] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), + [170] = {.entry = {.count = 1, .reusable = false}}, SHIFT(27), + [172] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), + [174] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), + [176] = {.entry = {.count = 1, .reusable = false}}, SHIFT(39), + [178] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), + [180] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), + [182] = {.entry = {.count = 1, .reusable = false}}, SHIFT(40), + [184] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), + [186] = {.entry = {.count = 1, .reusable = false}}, SHIFT(32), + [188] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_modifiers, 1), + [190] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_format_modifiers, 1), + [192] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_modifiers, 2), + [194] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_format_modifiers, 2), + [196] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unquoting_lit, 3, .production_id = 6), + [198] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unquoting_lit, 3, .production_id = 6), + [200] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_str_lit, 3), + [202] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_str_lit, 3), + [204] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__bare_list_lit, 2, .production_id = 4), + [206] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__bare_list_lit, 2, .production_id = 4), + [208] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unquote_splicing_lit, 2, .production_id = 3), + [210] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unquote_splicing_lit, 2, .production_id = 3), + [212] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoting_lit, 3, .production_id = 6), + [214] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_quoting_lit, 3, .production_id = 6), + [216] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_quoting_lit_repeat1, 2), SHIFT_REPEAT(29), + [219] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_quoting_lit_repeat1, 2), + [221] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_quoting_lit_repeat1, 2), + [223] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_num_lit, 1), + [225] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_num_lit, 1), + [227] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quasi_quoting_lit, 3, .production_id = 6), + [229] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_quasi_quoting_lit, 3, .production_id = 6), + [231] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unquote_splicing_lit, 3, .production_id = 6), + [233] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unquote_splicing_lit, 3, .production_id = 6), + [235] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list_lit, 1, .production_id = 2), + [237] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list_lit, 1, .production_id = 2), + [239] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__bare_list_lit, 3, .production_id = 8), + [241] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__bare_list_lit, 3, .production_id = 8), + [243] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_str_lit, 2), + [245] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_str_lit, 2), + [247] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_str_lit, 4), + [249] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_str_lit, 4), + [251] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sym_lit, 1, .production_id = 1), + [253] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sym_lit, 1, .production_id = 1), + [255] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoting_lit, 2, .production_id = 3), + [257] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_quoting_lit, 2, .production_id = 3), + [259] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quasi_quoting_lit, 2, .production_id = 3), + [261] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_quasi_quoting_lit, 2, .production_id = 3), + [263] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unquoting_lit, 2, .production_id = 3), + [265] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unquoting_lit, 2, .production_id = 3), + [267] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__bare_list_lit_repeat1, 1, .production_id = 5), + [269] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__bare_list_lit_repeat1, 1, .production_id = 5), + [271] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_format_modifiers_repeat1, 1), + [273] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_format_modifiers_repeat1, 1), + [275] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), + [277] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), + [279] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__format_token, 1, .production_id = 7), + [281] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__format_token, 1, .production_id = 7), + [283] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__format_token, 2), + [285] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__format_token, 2), + [287] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_format_modifiers_repeat1, 2), SHIFT_REPEAT(43), + [290] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_format_modifiers_repeat1, 2), SHIFT_REPEAT(59), + [293] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_format_modifiers_repeat1, 2), SHIFT_REPEAT(45), + [296] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_format_modifiers_repeat1, 2), + [298] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_format_modifiers_repeat1, 2), + [300] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), + [302] = {.entry = {.count = 1, .reusable = false}}, SHIFT(23), + [304] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), + [306] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), + [308] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_str_lit_repeat1, 2), SHIFT_REPEAT(4), + [311] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_str_lit_repeat1, 2), + [313] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_str_lit_repeat1, 2), SHIFT_REPEAT(47), + [316] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), + [318] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), + [320] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), + [322] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), + [324] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), + [326] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_directive_type, 2, .production_id = 10), + [328] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_specifier, 3), + [330] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_directive_type, 2, .production_id = 11), + [332] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_directive_type, 2), + [334] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_specifier, 2), + [336] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_directive_type, 1), + [338] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_format_specifier, 4), + [340] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [342] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), }; #ifdef __cplusplus extern "C" { #endif #ifdef _WIN32 -#define extern __declspec(dllexport) +#define TS_PUBLIC __declspec(dllexport) +#else +#define TS_PUBLIC __attribute__((visibility("default"))) #endif -extern const TSLanguage *tree_sitter_opengoal(void) { +TS_PUBLIC const TSLanguage *tree_sitter_opengoal() { static const TSLanguage language = { .version = LANGUAGE_VERSION, .symbol_count = SYMBOL_COUNT, diff --git a/third-party/tree-sitter/tree-sitter-opengoal/tree_sitter/alloc.h b/third-party/tree-sitter/tree-sitter-opengoal/tree_sitter/alloc.h new file mode 100644 index 0000000000..1f4466d75c --- /dev/null +++ b/third-party/tree-sitter/tree-sitter-opengoal/tree_sitter/alloc.h @@ -0,0 +1,54 @@ +#ifndef TREE_SITTER_ALLOC_H_ +#define TREE_SITTER_ALLOC_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +// Allow clients to override allocation functions +#ifdef TREE_SITTER_REUSE_ALLOCATOR + +extern void *(*ts_current_malloc)(size_t); +extern void *(*ts_current_calloc)(size_t, size_t); +extern void *(*ts_current_realloc)(void *, size_t); +extern void (*ts_current_free)(void *); + +#ifndef ts_malloc +#define ts_malloc ts_current_malloc +#endif +#ifndef ts_calloc +#define ts_calloc ts_current_calloc +#endif +#ifndef ts_realloc +#define ts_realloc ts_current_realloc +#endif +#ifndef ts_free +#define ts_free ts_current_free +#endif + +#else + +#ifndef ts_malloc +#define ts_malloc malloc +#endif +#ifndef ts_calloc +#define ts_calloc calloc +#endif +#ifndef ts_realloc +#define ts_realloc realloc +#endif +#ifndef ts_free +#define ts_free free +#endif + +#endif + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_ALLOC_H_ diff --git a/third-party/tree-sitter/tree-sitter-opengoal/tree_sitter/array.h b/third-party/tree-sitter/tree-sitter-opengoal/tree_sitter/array.h new file mode 100644 index 0000000000..186ba67399 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter-opengoal/tree_sitter/array.h @@ -0,0 +1,287 @@ +#ifndef TREE_SITTER_ARRAY_H_ +#define TREE_SITTER_ARRAY_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "./alloc.h" + +#include +#include +#include +#include +#include + +#ifdef _MSC_VER +#pragma warning(disable : 4101) +#elif defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif + +#define Array(T) \ + struct { \ + T *contents; \ + uint32_t size; \ + uint32_t capacity; \ + } + +/// Initialize an array. +#define array_init(self) \ + ((self)->size = 0, (self)->capacity = 0, (self)->contents = NULL) + +/// Create an empty array. +#define array_new() \ + { NULL, 0, 0 } + +/// Get a pointer to the element at a given `index` in the array. +#define array_get(self, _index) \ + (assert((uint32_t)(_index) < (self)->size), &(self)->contents[_index]) + +/// Get a pointer to the first element in the array. +#define array_front(self) array_get(self, 0) + +/// Get a pointer to the last element in the array. +#define array_back(self) array_get(self, (self)->size - 1) + +/// Clear the array, setting its size to zero. Note that this does not free any +/// memory allocated for the array's contents. +#define array_clear(self) ((self)->size = 0) + +/// Reserve `new_capacity` elements of space in the array. If `new_capacity` is +/// less than the array's current capacity, this function has no effect. +#define array_reserve(self, new_capacity) \ + _array__reserve((Array *)(self), array_elem_size(self), new_capacity) + +/// Free any memory allocated for this array. Note that this does not free any +/// memory allocated for the array's contents. +#define array_delete(self) _array__delete((Array *)(self)) + +/// Push a new `element` onto the end of the array. +#define array_push(self, element) \ + (_array__grow((Array *)(self), 1, array_elem_size(self)), \ + (self)->contents[(self)->size++] = (element)) + +/// Increase the array's size by `count` elements. +/// New elements are zero-initialized. +#define array_grow_by(self, count) \ + (_array__grow((Array *)(self), count, array_elem_size(self)), \ + memset((self)->contents + (self)->size, 0, (count) * array_elem_size(self)), \ + (self)->size += (count)) + +/// Append all elements from one array to the end of another. +#define array_push_all(self, other) \ + array_extend((self), (other)->size, (other)->contents) + +/// Append `count` elements to the end of the array, reading their values from the +/// `contents` pointer. +#define array_extend(self, count, contents) \ + _array__splice( \ + (Array *)(self), array_elem_size(self), (self)->size, \ + 0, count, contents \ + ) + +/// Remove `old_count` elements from the array starting at the given `index`. At +/// the same index, insert `new_count` new elements, reading their values from the +/// `new_contents` pointer. +#define array_splice(self, _index, old_count, new_count, new_contents) \ + _array__splice( \ + (Array *)(self), array_elem_size(self), _index, \ + old_count, new_count, new_contents \ + ) + +/// Insert one `element` into the array at the given `index`. +#define array_insert(self, _index, element) \ + _array__splice((Array *)(self), array_elem_size(self), _index, 0, 1, &(element)) + +/// Remove one element from the array at the given `index`. +#define array_erase(self, _index) \ + _array__erase((Array *)(self), array_elem_size(self), _index) + +/// Pop the last element off the array, returning the element by value. +#define array_pop(self) ((self)->contents[--(self)->size]) + +/// Assign the contents of one array to another, reallocating if necessary. +#define array_assign(self, other) \ + _array__assign((Array *)(self), (const Array *)(other), array_elem_size(self)) + +/// Swap one array with another +#define array_swap(self, other) \ + _array__swap((Array *)(self), (Array *)(other)) + +/// Get the size of the array contents +#define array_elem_size(self) (sizeof *(self)->contents) + +/// Search a sorted array for a given `needle` value, using the given `compare` +/// callback to determine the order. +/// +/// If an existing element is found to be equal to `needle`, then the `index` +/// out-parameter is set to the existing value's index, and the `exists` +/// out-parameter is set to true. Otherwise, `index` is set to an index where +/// `needle` should be inserted in order to preserve the sorting, and `exists` +/// is set to false. +#define array_search_sorted_with(self, compare, needle, _index, _exists) \ + _array__search_sorted(self, 0, compare, , needle, _index, _exists) + +/// Search a sorted array for a given `needle` value, using integer comparisons +/// of a given struct field (specified with a leading dot) to determine the order. +/// +/// See also `array_search_sorted_with`. +#define array_search_sorted_by(self, field, needle, _index, _exists) \ + _array__search_sorted(self, 0, _compare_int, field, needle, _index, _exists) + +/// Insert a given `value` into a sorted array, using the given `compare` +/// callback to determine the order. +#define array_insert_sorted_with(self, compare, value) \ + do { \ + unsigned _index, _exists; \ + array_search_sorted_with(self, compare, &(value), &_index, &_exists); \ + if (!_exists) array_insert(self, _index, value); \ + } while (0) + +/// Insert a given `value` into a sorted array, using integer comparisons of +/// a given struct field (specified with a leading dot) to determine the order. +/// +/// See also `array_search_sorted_by`. +#define array_insert_sorted_by(self, field, value) \ + do { \ + unsigned _index, _exists; \ + array_search_sorted_by(self, field, (value) field, &_index, &_exists); \ + if (!_exists) array_insert(self, _index, value); \ + } while (0) + +// Private + +typedef Array(void) Array; + +/// This is not what you're looking for, see `array_delete`. +static inline void _array__delete(Array *self) { + if (self->contents) { + ts_free(self->contents); + self->contents = NULL; + self->size = 0; + self->capacity = 0; + } +} + +/// This is not what you're looking for, see `array_erase`. +static inline void _array__erase(Array *self, size_t element_size, + uint32_t index) { + assert(index < self->size); + char *contents = (char *)self->contents; + memmove(contents + index * element_size, contents + (index + 1) * element_size, + (self->size - index - 1) * element_size); + self->size--; +} + +/// This is not what you're looking for, see `array_reserve`. +static inline void _array__reserve(Array *self, size_t element_size, uint32_t new_capacity) { + if (new_capacity > self->capacity) { + if (self->contents) { + self->contents = ts_realloc(self->contents, new_capacity * element_size); + } else { + self->contents = ts_malloc(new_capacity * element_size); + } + self->capacity = new_capacity; + } +} + +/// This is not what you're looking for, see `array_assign`. +static inline void _array__assign(Array *self, const Array *other, size_t element_size) { + _array__reserve(self, element_size, other->size); + self->size = other->size; + memcpy(self->contents, other->contents, self->size * element_size); +} + +/// This is not what you're looking for, see `array_swap`. +static inline void _array__swap(Array *self, Array *other) { + Array swap = *other; + *other = *self; + *self = swap; +} + +/// This is not what you're looking for, see `array_push` or `array_grow_by`. +static inline void _array__grow(Array *self, uint32_t count, size_t element_size) { + uint32_t new_size = self->size + count; + if (new_size > self->capacity) { + uint32_t new_capacity = self->capacity * 2; + if (new_capacity < 8) new_capacity = 8; + if (new_capacity < new_size) new_capacity = new_size; + _array__reserve(self, element_size, new_capacity); + } +} + +/// This is not what you're looking for, see `array_splice`. +static inline void _array__splice(Array *self, size_t element_size, + uint32_t index, uint32_t old_count, + uint32_t new_count, const void *elements) { + uint32_t new_size = self->size + new_count - old_count; + uint32_t old_end = index + old_count; + uint32_t new_end = index + new_count; + assert(old_end <= self->size); + + _array__reserve(self, element_size, new_size); + + char *contents = (char *)self->contents; + if (self->size > old_end) { + memmove( + contents + new_end * element_size, + contents + old_end * element_size, + (self->size - old_end) * element_size + ); + } + if (new_count > 0) { + if (elements) { + memcpy( + (contents + index * element_size), + elements, + new_count * element_size + ); + } else { + memset( + (contents + index * element_size), + 0, + new_count * element_size + ); + } + } + self->size += new_count - old_count; +} + +/// A binary search routine, based on Rust's `std::slice::binary_search_by`. +/// This is not what you're looking for, see `array_search_sorted_with` or `array_search_sorted_by`. +#define _array__search_sorted(self, start, compare, suffix, needle, _index, _exists) \ + do { \ + *(_index) = start; \ + *(_exists) = false; \ + uint32_t size = (self)->size - *(_index); \ + if (size == 0) break; \ + int comparison; \ + while (size > 1) { \ + uint32_t half_size = size / 2; \ + uint32_t mid_index = *(_index) + half_size; \ + comparison = compare(&((self)->contents[mid_index] suffix), (needle)); \ + if (comparison <= 0) *(_index) = mid_index; \ + size -= half_size; \ + } \ + comparison = compare(&((self)->contents[*(_index)] suffix), (needle)); \ + if (comparison == 0) *(_exists) = true; \ + else if (comparison < 0) *(_index) += 1; \ + } while (0) + +/// Helper macro for the `_sorted_by` routines below. This takes the left (existing) +/// parameter by reference in order to work with the generic sorting function above. +#define _compare_int(a, b) ((int)*(a) - (int)(b)) + +#ifdef _MSC_VER +#pragma warning(default : 4101) +#elif defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_ARRAY_H_ diff --git a/third-party/tree-sitter/tree-sitter-opengoal/tree_sitter/parser.h b/third-party/tree-sitter/tree-sitter-opengoal/tree_sitter/parser.h index 2b14ac1046..17b4fde982 100644 --- a/third-party/tree-sitter/tree-sitter-opengoal/tree_sitter/parser.h +++ b/third-party/tree-sitter/tree-sitter-opengoal/tree_sitter/parser.h @@ -13,9 +13,8 @@ extern "C" { #define ts_builtin_sym_end 0 #define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024 -typedef uint16_t TSStateId; - #ifndef TREE_SITTER_API_H_ +typedef uint16_t TSStateId; typedef uint16_t TSSymbol; typedef uint16_t TSFieldId; typedef struct TSLanguage TSLanguage; @@ -130,9 +129,16 @@ struct TSLanguage { * Lexer Macros */ +#ifdef _MSC_VER +#define UNUSED __pragma(warning(suppress : 4101)) +#else +#define UNUSED __attribute__((unused)) +#endif + #define START_LEXER() \ bool result = false; \ bool skip = false; \ + UNUSED \ bool eof = false; \ int32_t lookahead; \ goto start; \ @@ -166,7 +172,7 @@ struct TSLanguage { * Parse Table Macros */ -#define SMALL_STATE(id) id - LARGE_STATE_COUNT +#define SMALL_STATE(id) ((id) - LARGE_STATE_COUNT) #define STATE(id) id @@ -176,7 +182,7 @@ struct TSLanguage { {{ \ .shift = { \ .type = TSParseActionTypeShift, \ - .state = state_value \ + .state = (state_value) \ } \ }} @@ -184,7 +190,7 @@ struct TSLanguage { {{ \ .shift = { \ .type = TSParseActionTypeShift, \ - .state = state_value, \ + .state = (state_value), \ .repetition = true \ } \ }} diff --git a/third-party/tree-sitter/tree-sitter/.cargo/config.toml b/third-party/tree-sitter/tree-sitter/.cargo/config.toml new file mode 100644 index 0000000000..35049cbcb1 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/.cargo/config.toml @@ -0,0 +1,2 @@ +[alias] +xtask = "run --package xtask --" diff --git a/third-party/tree-sitter/tree-sitter/.editorconfig b/third-party/tree-sitter/tree-sitter/.editorconfig new file mode 100644 index 0000000000..53780b3435 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +tab_width = 8 +end_of_line = lf +insert_final_newline = true + +[*.rs] +indent_size = 4 + +[Makefile] +indent_style = tab +indent_size = 8 diff --git a/third-party/tree-sitter/tree-sitter/.gitattributes b/third-party/tree-sitter/tree-sitter/.gitattributes index 44bf45c7b4..1d9b8cb427 100644 --- a/third-party/tree-sitter/tree-sitter/.gitattributes +++ b/third-party/tree-sitter/tree-sitter/.gitattributes @@ -1,3 +1,5 @@ +* text=auto eol=lf + /lib/src/unicode/*.h linguist-vendored /lib/src/unicode/LICENSE linguist-vendored diff --git a/third-party/tree-sitter/tree-sitter/.github/ISSUE_TEMPLATE/bug_report.yml b/third-party/tree-sitter/tree-sitter/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000000..4138c3a9f5 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,41 @@ +name: Bug Report +description: Report a problem +labels: [bug] +body: + - type: textarea + attributes: + label: "Problem" + description: "Describe the current behavior. May include logs, images, or videos." + validations: + required: true + + - type: textarea + attributes: + label: "Steps to reproduce" + placeholder: | + git clone --depth=1 https://github.com/tree-sitter/tree-sitter-ruby + cd tree-sitter-ruby + tree-sitter generate + validations: + required: true + + - type: textarea + attributes: + label: "Expected behavior" + description: "Describe the behavior you expect." + validations: + required: true + + - type: input + attributes: + label: "Tree-sitter version (tree-sitter --version)" + placeholder: "tree-sitter 0.20.9" + validations: + required: true + + - type: input + attributes: + label: "Operating system/version" + placeholder: "macOS 11.5" + validations: + required: true diff --git a/third-party/tree-sitter/tree-sitter/.github/ISSUE_TEMPLATE/config.yml b/third-party/tree-sitter/tree-sitter/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000..3ba13e0cec --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/third-party/tree-sitter/tree-sitter/.github/ISSUE_TEMPLATE/feature_request.yml b/third-party/tree-sitter/tree-sitter/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000000..388f367582 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,23 @@ +name: Feature request +description: Request an enhancement +labels: [enhancement] +body: + - type: markdown + attributes: + value: | + Before requesting: search [existing feature requests](https://github.com/tree-sitter/tree-sitter/labels/enhancement). + + - type: textarea + attributes: + label: "Problem" + description: "Describe the problem to be solved." + placeholder: "No smurf icons available. Smurfs are useful because ..." + validations: + required: false + + - type: textarea + attributes: + label: "Expected behavior" + description: "Describe what the new feature or behavior would look like. How does it solve the problem? Is it worth the cost?" + validations: + required: false diff --git a/third-party/tree-sitter/tree-sitter/.github/actions/cache/action.yml b/third-party/tree-sitter/tree-sitter/.github/actions/cache/action.yml new file mode 100644 index 0000000000..cc81668211 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/.github/actions/cache/action.yml @@ -0,0 +1,24 @@ +name: 'Cache' +description: "This action caches fixtures" +outputs: + cache-hit: + description: 'Cache hit' + value: ${{ steps.cache_output.outputs.cache-hit }} +runs: + using: "composite" + steps: + - uses: actions/cache@v4 + id: cache_fixtures + with: + path: | + test/fixtures/grammars + target/release/tree-sitter-*.wasm + key: fixtures-${{ join(matrix.*, '_') }}-${{ hashFiles( + 'cli/src/generate/**', + 'script/generate-fixtures*', + 'test/fixtures/grammars/*/**/src/*.c', + '.github/actions/cache/action.yml') }} + + - run: echo "cache-hit=${{ steps.cache_fixtures.outputs.cache-hit }}" >> $GITHUB_OUTPUT + shell: bash + id: cache_output diff --git a/third-party/tree-sitter/tree-sitter/.github/dependabot.yml b/third-party/tree-sitter/tree-sitter/.github/dependabot.yml new file mode 100644 index 0000000000..c2faedbee8 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/.github/dependabot.yml @@ -0,0 +1,22 @@ +version: 2 +updates: + - package-ecosystem: "cargo" + directory: "/" + schedule: + interval: "weekly" + commit-message: + prefix: "build(deps)" + groups: + cargo: + patterns: + - "*" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + commit-message: + prefix: "ci" + groups: + actions: + patterns: + - "*" diff --git a/third-party/tree-sitter/tree-sitter/.github/scripts/close_unresponsive.js b/third-party/tree-sitter/tree-sitter/.github/scripts/close_unresponsive.js new file mode 100644 index 0000000000..effa2646d7 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/.github/scripts/close_unresponsive.js @@ -0,0 +1,58 @@ +function labeledEvent(data) { + return ( + data.event === "labeled" && data.label.name === "more-information-needed" + ); +} + +const numberOfDaysLimit = 30; +const close_message = `This has been closed since a request for information has \ +not been answered for ${numberOfDaysLimit} days. It can be reopened when the \ +requested information is provided.`; + +module.exports = async ({ github, context }) => { + const owner = context.repo.owner; + const repo = context.repo.repo; + + const issues = await github.rest.issues.listForRepo({ + owner: owner, + repo: repo, + labels: "more-information-needed", + }); + const numbers = issues.data.map((e) => e.number); + + for (const number of numbers) { + const events = await github.paginate( + github.rest.issues.listEventsForTimeline, + { + owner: owner, + repo: repo, + issue_number: number, + }, + (response) => response.data.filter(labeledEvent), + ); + + const latest_response_label = events[events.length - 1]; + + const created_at = new Date(latest_response_label.created_at); + const now = new Date(); + const diff = now - created_at; + const diffDays = diff / (1000 * 60 * 60 * 24); + + if (diffDays > numberOfDaysLimit) { + github.rest.issues.update({ + owner: owner, + repo: repo, + issue_number: number, + state_reason: "not_planned", + state: "closed", + }); + + github.rest.issues.createComment({ + owner: owner, + repo: repo, + issue_number: number, + body: close_message, + }); + } + } +}; diff --git a/third-party/tree-sitter/tree-sitter/.github/scripts/cross.sh b/third-party/tree-sitter/tree-sitter/.github/scripts/cross.sh index 070171926a..a52f087358 100644 --- a/third-party/tree-sitter/tree-sitter/.github/scripts/cross.sh +++ b/third-party/tree-sitter/tree-sitter/.github/scripts/cross.sh @@ -1,9 +1,16 @@ #!/bin/bash -set -x +# set -x set -e -if [ "$CROSS" != 1 ]; then +if [ "$BUILD_CMD" != "cross" ]; then + echo "cross.sh - is a helper to assist only in cross compiling environments" >&2 + echo "To use this tool set the BUILD_CMD env var to the \"cross\" value" >&2 + exit 111 +fi + +if [ -z "$CROSS_IMAGE" ]; then + echo "The CROSS_IMAGE env var should be provided" >&2 exit 111 fi diff --git a/third-party/tree-sitter/tree-sitter/.github/scripts/make.sh b/third-party/tree-sitter/tree-sitter/.github/scripts/make.sh index 62aa0c06de..791925414e 100644 --- a/third-party/tree-sitter/tree-sitter/.github/scripts/make.sh +++ b/third-party/tree-sitter/tree-sitter/.github/scripts/make.sh @@ -1,9 +1,9 @@ #!/bin/bash -set -x +# set -x set -e -if [ "$CROSS" = 1 ]; then +if [ "$BUILD_CMD" == "cross" ]; then if [ -z "$CC" ]; then echo "make.sh: CC is not set" >&2 exit 111 diff --git a/third-party/tree-sitter/tree-sitter/.github/scripts/remove_response_label.js b/third-party/tree-sitter/tree-sitter/.github/scripts/remove_response_label.js new file mode 100644 index 0000000000..66840324aa --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/.github/scripts/remove_response_label.js @@ -0,0 +1,19 @@ +module.exports = async ({ github, context }) => { + const commenter = context.actor; + const issue = await github.rest.issues.get({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + }); + const author = issue.data.user.login; + const labels = issue.data.labels.map((e) => e.name); + + if (author === commenter && labels.includes("more-information-needed")) { + github.rest.issues.removeLabel({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + name: "more-information-needed", + }); + } +}; diff --git a/third-party/tree-sitter/tree-sitter/.github/scripts/reviewers_remove.js b/third-party/tree-sitter/tree-sitter/.github/scripts/reviewers_remove.js new file mode 100644 index 0000000000..9e44e4ac86 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/.github/scripts/reviewers_remove.js @@ -0,0 +1,16 @@ +module.exports = async ({ github, context }) => { + const requestedReviewers = await github.rest.pulls.listRequestedReviewers({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number, + }); + + const reviewers = requestedReviewers.data.users.map((e) => e.login); + + github.rest.pulls.removeRequestedReviewers({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number, + reviewers: reviewers, + }); +}; diff --git a/third-party/tree-sitter/tree-sitter/.github/scripts/tree-sitter.sh b/third-party/tree-sitter/tree-sitter/.github/scripts/tree-sitter.sh index 2e6e31c290..0cac915308 100644 --- a/third-party/tree-sitter/tree-sitter/.github/scripts/tree-sitter.sh +++ b/third-party/tree-sitter/tree-sitter/.github/scripts/tree-sitter.sh @@ -1,11 +1,27 @@ #!/bin/bash -set -x +# set -x set -e +if [ -z "$ROOT" ]; then + echo "The ROOT env var should be set to absolute path of a repo root folder" >&2 + exit 111 +fi + +if [ -z "$TARGET" ]; then + echo "The TARGET env var should be equal to a \`cargo build --target \` command value" >&2 + exit 111 +fi + tree_sitter="$ROOT"/target/"$TARGET"/release/tree-sitter -if [ "$CROSS" = 1 ]; then +if [ "$BUILD_CMD" == "cross" ]; then + if [ -z "$CROSS_RUNNER" ]; then + echo "The CROSS_RUNNER env var should be set to a CARGO_TARGET_*_RUNNER env var value" >&2 + echo "that is available in a docker image used by the cross tool under the hood" >&2 + exit 111 + fi + cross.sh $CROSS_RUNNER "$tree_sitter" "$@" else "$tree_sitter" "$@" diff --git a/third-party/tree-sitter/tree-sitter/.github/workflows/CICD.yml b/third-party/tree-sitter/tree-sitter/.github/workflows/CICD.yml deleted file mode 100644 index 7c2351a897..0000000000 --- a/third-party/tree-sitter/tree-sitter/.github/workflows/CICD.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: CICD - -on: - workflow_dispatch: - pull_request: - push: - branches: - - master - - check/* - -concurrency: - group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' - cancel-in-progress: true - -jobs: - init: - name: Init - runs-on: ubuntu-latest - steps: - - name: Get PR head ref - if: ${{ github.event_name == 'pull_request' }} - id: ref - run: | - echo "ref=refs/pull/${{ github.event.pull_request.number }}/head" >> $GITHUB_OUTPUT - outputs: - ref: >- - ${{ - (github.event_name == 'pull_request' && startsWith(github.head_ref, 'release/v')) - && steps.ref.outputs.ref - || github.ref - }} - - fast_checks: - name: Fast checks - uses: ./.github/workflows/fast_checks.yml - - full_checks: - name: Full Rust checks - needs: fast_checks - uses: ./.github/workflows/full_rust_checks.yml - - min_version: - name: Minimum supported rust version - needs: fast_checks - uses: ./.github/workflows/msrv.yml - with: - package: tree-sitter-cli - - build: - name: Build & Test - needs: [init, fast_checks] - uses: ./.github/workflows/build.yml - with: - ref: ${{ needs.init.outputs.ref }} - - release: - name: Release - needs: [init, fast_checks, full_checks, min_version, build] - if: > - github.event.pull_request.head.repo.full_name == github.repository && - startsWith(github.head_ref, 'release/v') - uses: ./.github/workflows/release.yml - with: - ref: ${{ needs.init.outputs.ref }} - - publish: - name: Publish - needs: release - uses: ./.github/workflows/publish.yml diff --git a/third-party/tree-sitter/tree-sitter/.github/workflows/build.yml b/third-party/tree-sitter/tree-sitter/.github/workflows/build.yml index 27b310859e..968fcba057 100644 --- a/third-party/tree-sitter/tree-sitter/.github/workflows/build.yml +++ b/third-party/tree-sitter/tree-sitter/.github/workflows/build.yml @@ -8,160 +8,190 @@ env: on: workflow_call: inputs: - ref: - default: ${{ github.ref }} - type: string + run_test: + default: true + type: boolean jobs: build: - name: ${{ matrix.job.name }} (${{ matrix.job.target }}) (${{ matrix.job.os }}) - runs-on: ${{ matrix.job.os }} + name: ${{ matrix.platform }} (${{ matrix.target }}) (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + timeout-minutes: 40 strategy: fail-fast: false matrix: - job: - - { name: linux-aarch64 , target: aarch64-unknown-linux-gnu , os: ubuntu-latest , use-cross: true } - - { name: linux-arm , target: arm-unknown-linux-gnueabihf , os: ubuntu-latest , use-cross: true } - - { name: linux-x64 , target: x86_64-unknown-linux-gnu , os: ubuntu-latest } - - { name: linux-x86 , target: i686-unknown-linux-gnu , os: ubuntu-latest , use-cross: true } - - { name: windows-x64 , target: x86_64-pc-windows-msvc , os: windows-latest } - - { name: windows-x86 , target: i686-pc-windows-msvc , os: windows-latest } - - { name: macos-x64 , target: x86_64-apple-darwin , os: macos-latest } + platform: + - linux-arm64 # + - linux-arm # + - linux-x64 # + - linux-x86 # + - linux-powerpc64 # + - windows-arm64 # + - windows-x64 # <-- No C library build - requires an additional adapted Makefile for `cl.exe` compiler + - windows-x86 # -- // -- + - macos-arm64 # + - macos-x64 # + + include: + # When adding a new `target`: + # 1. Define a new platform alias above + # 2. Add a new record to a matrix map in `cli/npm/install.js` + - { platform: linux-arm64 , target: aarch64-unknown-linux-gnu , os: ubuntu-latest , use-cross: true } + - { platform: linux-arm , target: arm-unknown-linux-gnueabi , os: ubuntu-latest , use-cross: true } + - { platform: linux-x64 , target: x86_64-unknown-linux-gnu , os: ubuntu-20.04 , enable-wasm: true } #2272 + - { platform: linux-x86 , target: i686-unknown-linux-gnu , os: ubuntu-latest , use-cross: true } + - { platform: linux-powerpc64 , target: powerpc64-unknown-linux-gnu , os: ubuntu-latest , use-cross: true } + - { platform: windows-arm64 , target: aarch64-pc-windows-msvc , os: windows-latest } + - { platform: windows-x64 , target: x86_64-pc-windows-msvc , os: windows-latest , enable-wasm: true } + - { platform: windows-x86 , target: i686-pc-windows-msvc , os: windows-latest } + - { platform: macos-arm64 , target: aarch64-apple-darwin , os: macos-14 , enable-wasm: true } + - { platform: macos-x64 , target: x86_64-apple-darwin , os: macos-latest , enable-wasm: true } + + # Cross compilers for C library + - { platform: linux-arm64 , cc: aarch64-linux-gnu-gcc , ar: aarch64-linux-gnu-ar } + - { platform: linux-arm , cc: arm-linux-gnueabi-gcc , ar: arm-linux-gnueabi-ar } + - { platform: linux-x86 , cc: i686-linux-gnu-gcc , ar: i686-linux-gnu-ar } + - { platform: linux-powerpc64 , cc: powerpc64-linux-gnu-gcc , ar: powerpc64-linux-gnu-ar } + + # See #2041 tree-sitter issue + - { platform: windows-x64 , rust-test-threads: 1 } + - { platform: windows-x86 , rust-test-threads: 1 } + + # CLI only build + - { platform: windows-arm64 , cli-only: true } env: BUILD_CMD: cargo + EMSCRIPTEN_VERSION: "" + EXE: ${{ contains(matrix.target, 'windows') && '.exe' || '' }} defaults: run: shell: bash steps: - - name: Checkout source code - uses: actions/checkout@v3 - with: - ref: ${{ inputs.ref }} + - uses: actions/checkout@v4 - name: Read Emscripten version run: | - echo "EMSCRIPTEN_VERSION=$(cat cli/emscripten-version)" >> $GITHUB_ENV + echo "EMSCRIPTEN_VERSION=$(cat cli/loader/emscripten-version)" >> $GITHUB_ENV - name: Install Emscripten - uses: mymindstorm/setup-emsdk@v12 + if: ${{ !matrix.cli-only && !matrix.use-cross }} + uses: mymindstorm/setup-emsdk@v14 with: version: ${{ env.EMSCRIPTEN_VERSION }} - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable - with: - targets: ${{ matrix.job.target }} + - run: rustup toolchain install stable --profile minimal + - run: rustup target add ${{ matrix.target }} + - uses: Swatinem/rust-cache@v2 - name: Install cross - if: matrix.job.use-cross + if: ${{ matrix.use-cross }} uses: taiki-e/install-action@v2 with: tool: cross - name: Build custom cross image - if: ${{ matrix.job.use-cross && matrix.job.os == 'ubuntu-latest' }} + if: ${{ matrix.use-cross && matrix.os == 'ubuntu-latest' }} run: | cd .. - target="${{ matrix.job.target }}" + target="${{ matrix.target }}" image=ghcr.io/cross-rs/$target:custom - echo "CROSS_IMAGE=$image" >> $GITHUB_ENV + echo "CROSS_IMAGE=$image" >> $GITHUB_ENV - echo "[target.$target]" >> Cross.toml - echo "image = \"$image\"" >> Cross.toml - echo "CROSS_CONFIG=$PWD/Cross.toml" >> $GITHUB_ENV + echo "[target.$target]" >> Cross.toml + echo "image = \"$image\"" >> Cross.toml + echo "CROSS_CONFIG=$PWD/Cross.toml" >> $GITHUB_ENV - echo "FROM ghcr.io/cross-rs/$target:edge" >> Dockerfile - echo "ENV DEBIAN_FRONTEND=noninteractive" >> Dockerfile - echo "RUN apt-get update && apt-get install -y nodejs" >> Dockerfile + echo "FROM ghcr.io/cross-rs/$target:edge" >> Dockerfile + echo "ENV DEBIAN_FRONTEND=noninteractive" >> Dockerfile + echo "RUN apt-get update && apt-get install -y nodejs" >> Dockerfile docker build -t $image . - docker images - docker run --rm $image env - - cd - - - name: Setup extra env + - name: Setup env extras + env: + RUST_TEST_THREADS: ${{ matrix.rust-test-threads || '' }} + USE_CROSS: ${{ matrix.use-cross }} + TARGET: ${{ matrix.target }} + CC: ${{ matrix.cc }} + AR: ${{ matrix.ar }} + IS_WINDOWS: ${{ contains(matrix.os, 'windows') }} + ENABLE_WASM: ${{ matrix.enable-wasm }} run: | PATH="$PWD/.github/scripts:$PATH" - echo "PATH=$PATH" >> $GITHUB_ENV - echo "ROOT=$PWD" >> $GITHUB_ENV - echo "TREE_SITTER=tree-sitter.sh" >> $GITHUB_ENV + echo "$PWD/.github/scripts" >> $GITHUB_PATH - export TARGET=${{ matrix.job.target }} + echo "TREE_SITTER=tree-sitter.sh" >> $GITHUB_ENV echo "TARGET=$TARGET" >> $GITHUB_ENV + echo "ROOT=$PWD" >> $GITHUB_ENV - USE_CROSS="${{ matrix.job.use-cross }}" - - if [ "$USE_CROSS" == "true" ]; then - echo "BUILD_CMD=cross" >> $GITHUB_ENV - - export CROSS=1; echo "CROSS=$CROSS" >> $GITHUB_ENV + [ -n "$RUST_TEST_THREADS" ] && \ + echo "RUST_TEST_THREADS=$RUST_TEST_THREADS" >> $GITHUB_ENV - runner=$(cross.sh bash -c "env | sed -nr '/^CARGO_TARGET_.*_RUNNER=/s///p'") - [ -n "$runner" ] && echo "CROSS_RUNNER=$runner" >> $GITHUB_ENV - echo "runner: $runner" + [ -n "$CC" ] && echo "CC=$CC" >> $GITHUB_ENV + [ -n "$AR" ] && echo "AR=$AR" >> $GITHUB_ENV - case "$TARGET" in - i686-unknown-linux-gnu) CC=i686-linux-gnu-gcc AR=i686-linux-gnu-ar ;; - aarch64-unknown-linux-gnu) CC=aarch64-linux-gnu-gcc AR=aarch64-linux-gnu-ar ;; - arm-unknown-linux-gnueabihf) CC=arm-unknown-linux-gnueabihf-gcc AR=arm-unknown-linux-gnueabihf-gcc-ar ;; - esac + [ "$IS_WINDOWS" = "false" ] && echo "CFLAGS=-Werror" >> $GITHUB_ENV - [ -n "$CC" ] && echo "CC=$CC" >> $GITHUB_ENV - [ -n "$AR" ] && echo "AR=$AR" >> $GITHUB_ENV + if [ "$ENABLE_WASM" == "true" ]; then + echo "CLI_FEATURES=wasm" >> $GITHUB_ENV fi - case "$TARGET" in - *-windows-*) - echo "RUST_TEST_THREADS=1" >> $GITHUB_ENV # See #2041 tree-sitter issue - ;; - esac + if [ "$USE_CROSS" == "true" ]; then + echo "BUILD_CMD=cross" >> $GITHUB_ENV + runner=$(BUILD_CMD=cross cross.sh bash -c "env | sed -nr '/^CARGO_TARGET_.*_RUNNER=/s///p'") + [ -n "$runner" ] && echo "CROSS_RUNNER=$runner" >> $GITHUB_ENV + fi - name: Build C library - if: "!contains(matrix.job.os, 'windows')" # Requires an additional adapted Makefile for `cl.exe` compiler - run: make.sh CFLAGS="-Werror" -j + if: ${{ !contains(matrix.os, 'windows') }} # Requires an additional adapted Makefile for `cl.exe` compiler + run: make.sh -j - name: Build wasm library + if: ${{ !matrix.cli-only && !matrix.use-cross }} # No sense to build on the same Github runner hosts many times run: script/build-wasm - name: Build CLI - run: $BUILD_CMD build --release --target=${{ matrix.job.target }} + run: $BUILD_CMD build --release --target=${{ matrix.target }} --features=${CLI_FEATURES} + + - run: script/fetch-fixtures - - name: Fetch fixtures - run: script/fetch-fixtures + - uses: ./.github/actions/cache + id: cache - name: Generate fixtures + if: ${{ !matrix.cli-only && inputs.run_test && steps.cache.outputs.cache-hit != 'true' }} # Can't natively run CLI on Github runner's host run: script/generate-fixtures - name: Generate WASM fixtures - if: "!matrix.job.use-cross" + if: ${{ !matrix.cli-only && !matrix.use-cross && inputs.run_test && steps.cache.outputs.cache-hit != 'true' }} # See comment for the "Build wasm library" step run: script/generate-fixtures-wasm - name: Run main tests - run: $BUILD_CMD test --target=${{ matrix.job.target }} + if: ${{ !matrix.cli-only && inputs.run_test }} # Can't natively run CLI on Github runner's host + run: $BUILD_CMD test --target=${{ matrix.target }} --features=${CLI_FEATURES} - name: Run wasm tests - if: "!matrix.job.use-cross" # TODO: Install Emscripten into custom cross images + if: ${{ !matrix.cli-only && !matrix.use-cross && inputs.run_test }} # See comment for the "Build wasm library" step run: script/test-wasm - name: Run benchmarks - if: "!matrix.job.use-cross" # It doesn't make sense to benchmark something in an emulator - run: $BUILD_CMD bench benchmark -p tree-sitter-cli --target=${{ matrix.job.target }} + if: ${{ !matrix.cli-only && !matrix.use-cross && inputs.run_test }} # Cross-compiled benchmarks make no sense + run: $BUILD_CMD bench benchmark -p tree-sitter-cli --target=${{ matrix.target }} - name: Upload CLI artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: tree-sitter.${{ matrix.job.name }} - path: target/${{ matrix.job.target }}/release/tree-sitter${{ contains(matrix.job.target, 'windows') && '.exe' || '' }} + name: tree-sitter.${{ matrix.platform }} + path: target/${{ matrix.target }}/release/tree-sitter${{ env.EXE }} if-no-files-found: error retention-days: 7 - name: Upload WASM artifacts - if: ${{ matrix.job.name == 'linux-x64' }} - uses: actions/upload-artifact@v3 + if: ${{ matrix.platform == 'linux-x64' }} + uses: actions/upload-artifact@v4 with: name: tree-sitter.wasm path: | diff --git a/third-party/tree-sitter/tree-sitter/.github/workflows/checks.yml b/third-party/tree-sitter/tree-sitter/.github/workflows/checks.yml new file mode 100644 index 0000000000..b9e4d57b30 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/.github/workflows/checks.yml @@ -0,0 +1,24 @@ +name: Full Rust codebase checks + +on: + workflow_call: + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - run: rustup toolchain install stable --profile minimal + - uses: Swatinem/rust-cache@v2 + + - run: make lint + + check_c_warnings: + name: Check C warnings + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Make C library to check that it's able to compile without warnings + run: make -j CFLAGS="-Werror" diff --git a/third-party/tree-sitter/tree-sitter/.github/workflows/ci.yml b/third-party/tree-sitter/tree-sitter/.github/workflows/ci.yml new file mode 100644 index 0000000000..88af711490 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +name: CI + +on: + pull_request: + push: + branches: + - 'master' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name != 'push' }} + +jobs: + checks: + uses: ./.github/workflows/checks.yml + + sanitize: + uses: ./.github/workflows/sanitize.yml + + build: + uses: ./.github/workflows/build.yml diff --git a/third-party/tree-sitter/tree-sitter/.github/workflows/fast_checks.yml b/third-party/tree-sitter/tree-sitter/.github/workflows/fast_checks.yml deleted file mode 100644 index ea474799aa..0000000000 --- a/third-party/tree-sitter/tree-sitter/.github/workflows/fast_checks.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Fast checks to fail fast on any simple code issues - -env: - CARGO_TERM_COLOR: always - RUSTFLAGS: "-D warnings" - -on: - workflow_call: - -jobs: - check_rust_formatting: - name: Check Rust formating - runs-on: ubuntu-latest - steps: - - - name: Checkout source code - uses: actions/checkout@v3 - - - name: Run cargo fmt - run: cargo fmt -- --check - - check_c_warnings: - name: Check C warnings - runs-on: ubuntu-latest - steps: - - - name: Checkout source code - uses: actions/checkout@v3 - - - name: Make C library to check that it's able to compile without warnings - run: make -j CFLAGS="-Werror" diff --git a/third-party/tree-sitter/tree-sitter/.github/workflows/full_rust_checks.yml b/third-party/tree-sitter/tree-sitter/.github/workflows/full_rust_checks.yml deleted file mode 100644 index 2cc5f77dcb..0000000000 --- a/third-party/tree-sitter/tree-sitter/.github/workflows/full_rust_checks.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Full Rust codebase checks - -env: - CARGO_TERM_COLOR: always - RUSTFLAGS: "-D warnings" - -on: - workflow_call: - -jobs: - run: - name: Run checks - runs-on: ubuntu-latest - steps: - - - name: Checkout source code - uses: actions/checkout@v3 - - - name: Install rust toolchain - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - components: clippy, rustfmt - - - name: Run cargo fmt - run: cargo fmt -- --check - - # - name: Run clippy - # run: cargo clippy --all-targets - - - name: Run cargo check - run: cargo check --workspace --examples --tests --benches --bins diff --git a/third-party/tree-sitter/tree-sitter/.github/workflows/msrv.yml b/third-party/tree-sitter/tree-sitter/.github/workflows/msrv.yml deleted file mode 100644 index 3697930e81..0000000000 --- a/third-party/tree-sitter/tree-sitter/.github/workflows/msrv.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Minimum supported rust version - -env: - CARGO_TERM_COLOR: always - RUSTFLAGS: "-D warnings" - -on: - workflow_call: - inputs: - package: - description: Target cargo package name - required: true - type: string - - -jobs: - run: - name: Run checks - runs-on: ubuntu-latest - steps: - - - name: Checkout source code - uses: actions/checkout@v3 - - - name: Get the MSRV from the package metadata - id: msrv - run: cargo metadata --no-deps --format-version 1 | jq -r '"version=" + (.packages[] | select(.name == "${{ inputs.package }}").rust_version)' >> $GITHUB_OUTPUT - - - name: Install rust toolchain (v${{ steps.msrv.outputs.version }}) - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ steps.msrv.outputs.version }} - components: clippy, rustfmt - - - name: Run cargo fmt - run: cargo fmt -- --check - - # - name: Run clippy (on minimum supported rust version to prevent warnings we can't fix) - # run: cargo clippy --all-targets - - # - name: Run main tests - # run: cargo test diff --git a/third-party/tree-sitter/tree-sitter/.github/workflows/publish.yml b/third-party/tree-sitter/tree-sitter/.github/workflows/publish.yml deleted file mode 100644 index e1ad3e053a..0000000000 --- a/third-party/tree-sitter/tree-sitter/.github/workflows/publish.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Publish to registries - -on: - workflow_call: - -jobs: - crates_io: - name: Publish to Crates.io - runs-on: ubuntu-latest - steps: - - name: Publish packages - run: | - echo "::warning::TODO: add a Crates.io publish logic" - - npm: - name: Publish to npmjs.com - runs-on: ubuntu-latest - steps: - - name: Publish packages - run: | - echo "::warning::TODO: add a npmjs.com publish logic" diff --git a/third-party/tree-sitter/tree-sitter/.github/workflows/release.yml b/third-party/tree-sitter/tree-sitter/.github/workflows/release.yml index 87a0676169..23170819aa 100644 --- a/third-party/tree-sitter/tree-sitter/.github/workflows/release.yml +++ b/third-party/tree-sitter/tree-sitter/.github/workflows/release.yml @@ -1,52 +1,27 @@ name: Release - on: - workflow_call: - inputs: - ref: - default: ${{ github.ref }} - type: string + workflow_dispatch: + push: + tags: + - v[0-9]+.[0-9]+.[0-9]+ jobs: - permissions: - name: Check permissions - runs-on: ubuntu-latest - outputs: - release_allowed: ${{ steps.maintainer.outputs.is_maintainer == 'true' }} - steps: - - - name: Is maintainer - id: maintainer - env: - GH_TOKEN: ${{ github.token }} - repo: ${{ github.repository }} - actor: ${{ github.actor }} - run: | - maintainer=$( - gh api "/repos/${repo}/collaborators" | - jq ".[] | {login, maintainer: .permissions | .maintain} | select(.login == \"${actor}\") | .maintainer" - ); - if [ "$maintainer" == "true" ]; then - echo "@${actor} has maintainer level permissions :rocket:" >> $GITHUB_STEP_SUMMARY; - echo "is_maintainer=true" >> $GITHUB_OUTPUT - fi + build: + uses: ./.github/workflows/build.yml + with: + run_test: false release: name: Release - needs: permissions - if: needs.permissions.outputs.release_allowed runs-on: ubuntu-latest + needs: build permissions: contents: write steps: - - - name: Checkout source code - uses: actions/checkout@v3 - with: - ref: ${{ inputs.ref }} + - uses: actions/checkout@v4 - name: Download build artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: path: artifacts @@ -66,36 +41,60 @@ jobs: rm -rf artifacts ls -l target/ - - name: Get tag name from a release/v* branch name - id: tag_name - env: - tag: ${{ github.head_ref }} - run: echo "tag=${tag#release/}" >> $GITHUB_OUTPUT - - - name: Add a release tag - env: - ref: ${{ inputs.ref }} - tag: ${{ steps.tag_name.outputs.tag }} - message: "Release ${{ steps.tag_name.outputs.tag }}" - run: | - git config user.name "${GITHUB_ACTOR}" - git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" - git tag -a "$tag" HEAD -m "$message" - git push origin "$tag" - - name: Create release uses: softprops/action-gh-release@v1 with: - name: ${{ steps.tag_name.outputs.tag }} - tag_name: ${{ steps.tag_name.outputs.tag }} + name: ${{ github.ref_name }} + tag_name: ${{ github.ref_name }} fail_on_unmatched_files: true files: | target/tree-sitter-*.gz target/tree-sitter.wasm target/tree-sitter.js - - name: Merge release PR + crates_io: + name: Publish CLI to Crates.io + runs-on: ubuntu-latest + needs: release + steps: + - uses: actions/checkout@v4 + + - name: Setup Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: Publish crates to Crates.io + uses: katyo/publish-crates@v2 + with: + registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} + + npm: + name: Publish lib to npmjs.com + runs-on: ubuntu-latest + needs: release + strategy: + fail-fast: false + matrix: + directory: ["cli/npm", "lib/binding_web"] + steps: + - uses: actions/checkout@v4 + + - name: Build wasm + if: matrix.directory == 'lib/binding_web' + run: ./script/build-wasm + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 18 + registry-url: "https://registry.npmjs.org" + + - name: Publish lib to npmjs.com env: - GH_TOKEN: ${{ github.token }} + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} run: | - gh pr merge ${{ github.event.pull_request.html_url }} --match-head-commit $(git rev-parse HEAD) --merge --delete-branch + cd ${{ matrix.directory }} + npm publish diff --git a/third-party/tree-sitter/tree-sitter/.github/workflows/response.yml b/third-party/tree-sitter/tree-sitter/.github/workflows/response.yml new file mode 100644 index 0000000000..663ae6ad87 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/.github/workflows/response.yml @@ -0,0 +1,35 @@ +name: no_response +on: + schedule: + - cron: '30 1 * * *' # Run every day at 01:30 + workflow_dispatch: + issue_comment: + +jobs: + close: + if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/checkout@v4 + - uses: actions/github-script@v7 + with: + script: | + const script = require('./.github/scripts/close_unresponsive.js') + await script({github, context}) + + remove_label: + if: github.event_name == 'issue_comment' + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/checkout@v4 + - uses: actions/github-script@v7 + with: + script: | + const script = require('./.github/scripts/remove_response_label.js') + await script({github, context}) diff --git a/third-party/tree-sitter/tree-sitter/.github/workflows/reviewers_remove.yml b/third-party/tree-sitter/tree-sitter/.github/workflows/reviewers_remove.yml new file mode 100644 index 0000000000..b10d8c3d23 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/.github/workflows/reviewers_remove.yml @@ -0,0 +1,17 @@ +name: "reviewers: remove" +on: + pull_request_target: + types: [converted_to_draft, closed] +jobs: + remove-reviewers: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: actions/checkout@v4 + - name: 'Remove reviewers' + uses: actions/github-script@v7 + with: + script: | + const script = require('./.github/scripts/reviewers_remove.js') + await script({github, context}) diff --git a/third-party/tree-sitter/tree-sitter/.github/workflows/sanitize.yml b/third-party/tree-sitter/tree-sitter/.github/workflows/sanitize.yml new file mode 100644 index 0000000000..995218e26e --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/.github/workflows/sanitize.yml @@ -0,0 +1,53 @@ +name: Sanitize + +env: + CARGO_TERM_COLOR: always + RUSTFLAGS: "-D warnings" + +on: + workflow_call: + +jobs: + check_undefined_behaviour: + name: Sanitizer checks + runs-on: ubuntu-latest + timeout-minutes: 20 + env: + TREE_SITTER: ${{ github.workspace }}/target/release/tree-sitter + steps: + - name: Checkout source code + uses: actions/checkout@v4 + + - name: Install UBSAN library + run: sudo apt-get update -y && sudo apt-get install -y libubsan1 + + - run: rustup toolchain install stable --profile minimal + - uses: Swatinem/rust-cache@v2 + + - name: Build CLI + run: cargo build --release + + - run: script/fetch-fixtures + + - uses: ./.github/actions/cache + id: cache + + - if: ${{ steps.cache.outputs.cache-hit != 'true' }} + run: script/generate-fixtures + + - name: Run main tests with undefined behaviour sanitizer (UBSAN) + env: + UBSAN_OPTIONS: halt_on_error=1 + CFLAGS: -fsanitize=undefined + RUSTFLAGS: ${{ env.RUSTFLAGS }} -lubsan + run: cargo test -- --test-threads 1 + + - name: Run main tests with address sanitizer (ASAN) + env: + ASAN_OPTIONS: halt_on_error=1 + CFLAGS: -fsanitize=address + RUSTFLAGS: ${{ env.RUSTFLAGS }} -Zsanitizer=address --cfg=sanitizing + run: | + rustup install nightly + rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu + cargo +nightly test -Z build-std --target x86_64-unknown-linux-gnu -- --test-threads 1 diff --git a/third-party/tree-sitter/tree-sitter/.gitignore b/third-party/tree-sitter/tree-sitter/.gitignore index 834fd20fce..53550dd76f 100644 --- a/third-party/tree-sitter/tree-sitter/.gitignore +++ b/third-party/tree-sitter/tree-sitter/.gitignore @@ -7,6 +7,7 @@ log*.html fuzz-results +/tree-sitter.pc test/fixtures/grammars/* !test/fixtures/grammars/.gitkeep package-lock.json @@ -24,4 +25,6 @@ docs/assets/js/tree-sitter.js *.obj *.exp *.lib -*.wasm \ No newline at end of file +*.wasm +.swiftpm +zig-* diff --git a/third-party/tree-sitter/tree-sitter/CHANGELOG.md b/third-party/tree-sitter/tree-sitter/CHANGELOG.md new file mode 100644 index 0000000000..834c620191 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/CHANGELOG.md @@ -0,0 +1,107 @@ +# Changelog + +## [0.21.0] - 2024-02-21 + +### Breaking +- Remove the apply-all-captures flag, make last-wins precedence the default + + **NOTE**: This change might cause breakage in your grammar's highlight tests. + Just flip the order around of the relevant queries, and keep in mind that the + last query that matches will win. + +### Features +- Use lockfiles to dedup recompilation +- Improve error message for files with an unknown grammar path (https://github.com/tree-sitter/tree-sitter/pull/2475) +- Implement first-line-regex (https://github.com/tree-sitter/tree-sitter/pull/2479) +- Error out if an empty string is in the `extras` array +- Allow specifying an external scanner's files (https://github.com/tree-sitter/tree-sitter/pull/3031) +- Better error info when a scanner is missing required symbols +- **cli**: Add an optional `grammar-path` argument for the playground (https://github.com/tree-sitter/tree-sitter/pull/3014) +- **cli**: Add optional `config-path` argument (https://github.com/tree-sitter/tree-sitter/pull/3050) +- **loader**: Add more commonly used default parser directories + + +### Bug Fixes +- Prettify xml output and add node position info (https://github.com/tree-sitter/tree-sitter/pull/2970) +- Inherited grammar generation +- Properly error out when the word property is an invalid rule +- Update schema for regex flags (https://github.com/tree-sitter/tree-sitter/pull/3006) +- Properly handle Query.matches when filtering out results (https://github.com/tree-sitter/tree-sitter/pull/3013) +- Sexp format edge case with quoted closed parenthesis (https://github.com/tree-sitter/tree-sitter/pull/3016) +- Always push the default files if there's no `externals` +- Don't log NUL characters (https://github.com/tree-sitter/tree-sitter/pull/3037) +- Don't throw an error if the user uses `map` in the grammar (https://github.com/tree-sitter/tree-sitter/pull/3041) +- Remove redundant imports (https://github.com/tree-sitter/tree-sitter/pull/3047) +- **cli**: Installation via a HTTP tunnel proxy (https://github.com/tree-sitter/tree-sitter/pull/2824) +- **cli**: Don't update tests automatically if parse errors are detected (https://github.com/tree-sitter/tree-sitter/pull/3033) +- **cli**: Don't use `long` for `grammar_path` +- **test**: Allow writing updates to tests without erroneous nodes instead of denying all of them if a single error is found +- **test**: Edge case when parsing `UNEXPECTED`/`MISSING` nodes with an indentation level greater than 0 +- **wasm**: Remove C++ mangled symbols (https://github.com/tree-sitter/tree-sitter/pull/2971) + + +### Documentation +- Create issue template (https://github.com/tree-sitter/tree-sitter/pull/2978) +- Document regex limitations +- Mention that `token($.foo)` is illegal +- Explicitly mention behavior of walking outside the given "root" node for a `TSTreeCursor` (https://github.com/tree-sitter/tree-sitter/pull/3021) +- Small fixes (https://github.com/tree-sitter/tree-sitter/pull/2987) +- Add `Tact` language parser (https://github.com/tree-sitter/tree-sitter/pull/3030) +- **web**: Provide deno usage information (https://github.com/tree-sitter/tree-sitter/pull/2498) + + +### Refactor +- Extract regex check into a function and lower its precedence +- `&PathBuf` -> `&Path` (https://github.com/tree-sitter/tree-sitter/pull/3035) +- Name anonymous types in api.h (https://github.com/tree-sitter/tree-sitter/pull/1659) + + +### Testing +- Add quotes around bash variables (https://github.com/tree-sitter/tree-sitter/pull/3023) +- Update html tests + + +### Build System and CI +- Only create release for normal semver tags (https://github.com/tree-sitter/tree-sitter/pull/2973) +- Add useful development targets to makefile (https://github.com/tree-sitter/tree-sitter/pull/2979) +- Remove minimum glibc information in summary page (https://github.com/tree-sitter/tree-sitter/pull/2988) +- Use the native m1 mac runner (https://github.com/tree-sitter/tree-sitter/pull/2995) +- Add editorconfig (https://github.com/tree-sitter/tree-sitter/pull/2998) +- Remove symbolic links from repository (https://github.com/tree-sitter/tree-sitter/pull/2997) +- Move common Cargo.toml keys into the workspace and inherit them (https://github.com/tree-sitter/tree-sitter/pull/3019) +- Remove reviewers when drafting or closing a PR (https://github.com/tree-sitter/tree-sitter/pull/2963) +- Enable creating changelogs with git-cliff (https://github.com/tree-sitter/tree-sitter/pull/3040) +- Cache fixtures (https://github.com/tree-sitter/tree-sitter/pull/3038) +- Don't cancel jobs on master (https://github.com/tree-sitter/tree-sitter/pull/3052) +- Relax caching requirements (https://github.com/tree-sitter/tree-sitter/pull/3051) +- **deps**: Bump clap from 4.4.18 to 4.5.0 (https://github.com/tree-sitter/tree-sitter/pull/3007) +- **deps**: Bump wasmtime from v16.0.0 to v17.0.1 (https://github.com/tree-sitter/tree-sitter/pull/3008) +- **deps**: Bump wasmtime to v18.0.1 (https://github.com/tree-sitter/tree-sitter/pull/3057) +- **sanitize**: Add a timeout of 60 minutes (https://github.com/tree-sitter/tree-sitter/pull/3017) +- **sanitize**: Reduce timeout to 20 minutes (https://github.com/tree-sitter/tree-sitter/pull/3054) + + +### Other +- Document preferred language for scanner (https://github.com/tree-sitter/tree-sitter/pull/2972) +- Add java and tsx to corpus tests (https://github.com/tree-sitter/tree-sitter/pull/2992) +- Provide a CLI flag to open `log.html` (https://github.com/tree-sitter/tree-sitter/pull/2996) +- Some more clippy lints (https://github.com/tree-sitter/tree-sitter/pull/3010) +- Remove deprecated query parsing mechanism (https://github.com/tree-sitter/tree-sitter/pull/3011) +- Print out full compiler arguments ran when it fails (https://github.com/tree-sitter/tree-sitter/pull/3018) +- Deprecate C++ scanners (https://github.com/tree-sitter/tree-sitter/pull/3020) +- Add some documentation to the playground page (https://github.com/tree-sitter/tree-sitter/pull/1495) +- Update relevant rust tests (https://github.com/tree-sitter/tree-sitter/pull/2947) +- Clippy lints (https://github.com/tree-sitter/tree-sitter/pull/3032) +- Error out when multiple arguments are passed to `token`/`token.immediate` (https://github.com/tree-sitter/tree-sitter/pull/3036) +- Tidying +- Prefer turbofish syntax where possible (https://github.com/tree-sitter/tree-sitter/pull/3048) +- Use published wasmtime crates +- Cleaner cast +- Update Cargo.lock +- Get rid of `github_issue_test` file (https://github.com/tree-sitter/tree-sitter/pull/3055) +- **cli**: Use spawn to display `emcc`'s stdout and stderr (https://github.com/tree-sitter/tree-sitter/pull/2494) +- **cli**: Warn users when a query path needed for a subcommand isn't specified in a grammar's package.json +- **generate**: Dedup and warn about duplicate or invalid rules (https://github.com/tree-sitter/tree-sitter/pull/2994) +- **test**: Use different languages for async tests (https://github.com/tree-sitter/tree-sitter/pull/2953) +- **wasm**: Use `SIDE_MODULE=2` to silence warning (https://github.com/tree-sitter/tree-sitter/pull/3003) + diff --git a/third-party/tree-sitter/tree-sitter/CONTRIBUTING.md b/third-party/tree-sitter/tree-sitter/CONTRIBUTING.md index 4f64371073..42bc7b75f0 100644 --- a/third-party/tree-sitter/tree-sitter/CONTRIBUTING.md +++ b/third-party/tree-sitter/tree-sitter/CONTRIBUTING.md @@ -1 +1 @@ -docs/section-6-contributing.md \ No newline at end of file +See [section-6-contributing.md](./docs/section-6-contributing.md) diff --git a/third-party/tree-sitter/tree-sitter/Cargo.lock b/third-party/tree-sitter/tree-sitter/Cargo.lock index 956a3f4107..180ce544f3 100644 --- a/third-party/tree-sitter/tree-sitter/Cargo.lock +++ b/third-party/tree-sitter/tree-sitter/Cargo.lock @@ -2,11 +2,23 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -20,11 +32,65 @@ dependencies = [ "winapi", ] +[[package]] +name = "anstream" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" + +[[package]] +name = "anstyle-parse" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + [[package]] name = "anyhow" -version = "1.0.70" +version = "1.0.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" + +[[package]] +name = "arbitrary" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" [[package]] name = "ascii" @@ -33,21 +99,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" [[package]] -name = "atty" -version = "0.2.14" +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "bincode" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", + "serde", ] [[package]] -name = "autocfg" -version = "1.1.0" +name = "bindgen" +version = "0.69.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +dependencies = [ + "bitflags 2.4.2", + "cexpr", + "clang-sys", + "itertools 0.12.1", + "lazy_static", + "lazycell", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn", + "which 4.4.2", +] [[package]] name = "bitflags" @@ -55,23 +142,33 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" + [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cc" -version = "1.0.79" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" +dependencies = [ + "jobserver", + "libc", +] [[package]] name = "cesu8" @@ -79,33 +176,90 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + [[package]] name = "chunked_transfer" -version = "1.4.1" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e4de3bc4ea267985becf712dc6d9eed8b04c953b3fcfb339ebc87acd9804901" + +[[package]] +name = "clang-sys" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cca491388666e04d7248af3f60f0c40cfb0991c72205595d7c396e3510207d1a" +checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +dependencies = [ + "glob", + "libc", + "libloading", +] [[package]] name = "clap" -version = "2.34.0" +version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +checksum = "b230ab84b0ffdf890d5a10abdbc8b83ae1c4918275daea1ab8801f71536b2651" dependencies = [ - "ansi_term", - "atty", - "bitflags", + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", "strsim", - "textwrap", - "unicode-width", - "vec_map", ] +[[package]] +name = "clap_derive" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" + +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + [[package]] name = "combine" version = "4.6.6" @@ -118,9 +272,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -128,18 +282,146 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cranelift-bforest" +version = "0.105.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9515fcc42b6cb5137f76b84c1a6f819782d0cf12473d145d3bc5cd67eedc8bc2" +dependencies = [ + "cranelift-entity", +] + +[[package]] +name = "cranelift-codegen" +version = "0.105.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad827c6071bfe6d22de1bc331296a29f9ddc506ff926d8415b435ec6a6efce0" +dependencies = [ + "bumpalo", + "cranelift-bforest", + "cranelift-codegen-meta", + "cranelift-codegen-shared", + "cranelift-control", + "cranelift-entity", + "cranelift-isle", + "gimli", + "hashbrown 0.14.3", + "log", + "regalloc2", + "smallvec", + "target-lexicon", +] + +[[package]] +name = "cranelift-codegen-meta" +version = "0.105.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10e6b36237a9ca2ce2fb4cc7741d418a080afa1327402138412ef85d5367bef1" +dependencies = [ + "cranelift-codegen-shared", +] + +[[package]] +name = "cranelift-codegen-shared" +version = "0.105.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c36bf4bfb86898a94ccfa773a1f86e8a5346b1983ff72059bdd2db4600325251" + +[[package]] +name = "cranelift-control" +version = "0.105.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cbf36560e7a6bd1409ca91e7b43b2cc7ed8429f343d7605eadf9046e8fac0d0" +dependencies = [ + "arbitrary", +] + +[[package]] +name = "cranelift-entity" +version = "0.105.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a71e11061a75b1184c09bea97c026a88f08b59ade96a7bb1f259d4ea0df2e942" +dependencies = [ + "serde", + "serde_derive", +] + +[[package]] +name = "cranelift-frontend" +version = "0.105.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af5d4da63143ee3485c7bcedde0a818727d737d1083484a0ceedb8950c89e495" +dependencies = [ + "cranelift-codegen", + "log", + "smallvec", + "target-lexicon", +] + +[[package]] +name = "cranelift-isle" +version = "0.105.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "457a9832b089e26f5eea70dcf49bed8ec6edafed630ce7c83161f24d46ab8085" + +[[package]] +name = "cranelift-native" +version = "0.105.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b490d579df1ce365e1ea359e24ed86d82289fa785153327c2f6a69a59a731e4" +dependencies = [ + "cranelift-codegen", + "libc", + "target-lexicon", +] + +[[package]] +name = "cranelift-wasm" +version = "0.105.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cd747ed7f9a461dda9c388415392f6bb95d1a6ef3b7694d17e0817eb74b7798" +dependencies = [ + "cranelift-codegen", + "cranelift-entity", + "cranelift-frontend", + "itertools 0.10.5", + "log", + "smallvec", + "wasmparser 0.121.2", + "wasmtime-types", +] + +[[package]] +name = "crc32fast" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +dependencies = [ + "cfg-if", +] [[package]] name = "ctor" -version = "0.1.26" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" +checksum = "ad291aa74992b9b7a7e88c38acbbf6ad7e107f1d90ee8775b7bc1fc3394f485c" dependencies = [ "quote", - "syn 1.0.109", + "syn", +] + +[[package]] +name = "ctrlc" +version = "3.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "672465ae37dc1bc6380a6547a8883d5dd397b0f1faaad4f265726cc7042a5345" +dependencies = [ + "nix", + "windows-sys 0.52.0", ] [[package]] @@ -156,89 +438,127 @@ checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" [[package]] name = "dirs" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs" -version = "4.0.0" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ "dirs-sys", ] [[package]] name = "dirs-sys" -version = "0.3.7" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ "libc", + "option-ext", "redox_users", - "winapi", + "windows-sys 0.48.0", ] [[package]] name = "either" -version = "1.8.1" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" + +[[package]] +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.0" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d6a0976c999d473fe89ad888d5a284e55366d9dc9038b1ba2aa15128c4afa0" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "errno-dragonfly", "libc", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] -name = "errno-dragonfly" -version = "0.1.2" +name = "fallible-iterator" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" [[package]] name = "fastrand" -version = "1.9.0" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + +[[package]] +name = "filetime" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ - "instant", + "cfg-if", + "libc", + "redox_syscall", + "windows-sys 0.52.0", ] [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] +[[package]] +name = "fs4" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57b1e34e369d7f0151309821497440bd0266b86c77ccd69717c3b67e5eaeffe4" +dependencies = [ + "rustix", + "windows-sys 0.52.0", +] + [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "libc", "wasi", ] +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +dependencies = [ + "fallible-iterator", + "indexmap", + "stable_deref_trait", +] + +[[package]] +name = "git2" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b3ba52851e73b46a4c3df1d89343741112003f0f6f13beb0dfac9e457c3fdcd" +dependencies = [ + "bitflags 2.4.2", + "libc", + "libgit2-sys", + "log", + "openssl-probe", + "openssl-sys", + "url", +] + [[package]] name = "glob" version = "0.3.1" @@ -247,24 +567,36 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "hashbrown" -version = "0.12.3" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash", +] [[package]] -name = "hermit-abi" -version = "0.1.19" +name = "hashbrown" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "libc", + "ahash", ] [[package]] -name = "hermit-abi" -version = "0.3.1" +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "home" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] [[package]] name = "html-escape" @@ -277,15 +609,15 @@ dependencies = [ [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "idna" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -293,39 +625,44 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.3" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" dependencies = [ - "autocfg", - "hashbrown", + "equivalent", + "hashbrown 0.14.3", + "serde", ] [[package]] -name = "instant" -version = "0.1.12" +name = "indoc" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8" + +[[package]] +name = "itertools" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ - "cfg-if", + "either", ] [[package]] -name = "io-lifetimes" -version = "1.0.9" +name = "itertools" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ - "hermit-abi 0.3.1", - "libc", - "windows-sys", + "either", ] [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "jni" @@ -340,7 +677,7 @@ dependencies = [ "log", "thiserror", "walkdir", - "windows-sys", + "windows-sys 0.45.0", ] [[package]] @@ -349,11 +686,20 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +[[package]] +name = "jobserver" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" -version = "0.3.61" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -365,38 +711,107 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] -name = "libc" -version = "0.2.141" +name = "lazycell" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] -name = "libloading" -version = "0.7.4" +name = "leb128" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if", - "winapi", -] +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] -name = "linux-raw-sys" -version = "0.3.1" +name = "libc" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59d8c75012853d2e872fb56bc8a2e53718e2cafe1a4c823143141c6d90c322f" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] -name = "log" -version = "0.4.17" +name = "libgit2-sys" +version = "0.16.2+1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" dependencies = [ - "cfg-if", + "cc", + "libc", + "libssh2-sys", + "libz-sys", + "openssl-sys", + "pkg-config", ] [[package]] -name = "malloc_buf" +name = "libloading" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" +dependencies = [ + "cfg-if", + "windows-targets 0.52.4", +] + +[[package]] +name = "libredox" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +dependencies = [ + "bitflags 2.4.2", + "libc", + "redox_syscall", +] + +[[package]] +name = "libssh2-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee" +dependencies = [ + "cc", + "libc", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "libz-sys" +version = "1.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037731f5d3aaa87a5675e895b63ddff1a87624bc29f77004ea829809654e48f6" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" + +[[package]] +name = "log" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" + +[[package]] +name = "mach" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +dependencies = [ + "libc", +] + +[[package]] +name = "malloc_buf" version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" @@ -406,9 +821,33 @@ dependencies = [ [[package]] name = "memchr" -version = "2.5.0" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" + +[[package]] +name = "memfd" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" +dependencies = [ + "rustix", +] + +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "ndk-context" @@ -416,6 +855,28 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" +[[package]] +name = "nix" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" +dependencies = [ + "bitflags 2.4.2", + "cfg-if", + "cfg_aliases", + "libc", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + [[package]] name = "objc" version = "0.2.7" @@ -425,26 +886,71 @@ dependencies = [ "malloc_buf", ] +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "crc32fast", + "hashbrown 0.14.3", + "indexmap", + "memchr", +] + [[package]] name = "once_cell" -version = "1.17.1" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] -name = "output_vt100" -version = "0.1.3" +name = "openssl-probe" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" dependencies = [ - "winapi", + "cc", + "libc", + "pkg-config", + "vcpkg", ] +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "ppv-lite86" @@ -454,40 +960,47 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "pretty_assertions" -version = "0.7.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cab0e7c02cf376875e9335e0ba1da535775beb5450d21e1dffca068818ed98b" +checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" dependencies = [ - "ansi_term", - "ctor", "diff", - "output_vt100", + "yansi", +] + +[[package]] +name = "prettyplease" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +dependencies = [ + "proc-macro2", + "syn", ] [[package]] name = "proc-macro2" -version = "1.0.56" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] [[package]] -name = "proc_macro" -version = "0.1.0" +name = "psm" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5787f7cda34e3033a72192c018bc5883100330f362ef279a8cbccfce8bb4e874" dependencies = [ - "proc-macro2", - "quote", - "rand", - "syn 1.0.109", + "cc", ] [[package]] name = "quote" -version = "1.0.26" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -530,38 +1043,54 @@ checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] -name = "redox_syscall" -version = "0.3.5" +name = "redox_users" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" dependencies = [ - "bitflags", + "getrandom", + "libredox", + "thiserror", ] [[package]] -name = "redox_users" -version = "0.4.3" +name = "regalloc2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" +checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" dependencies = [ - "getrandom", - "redox_syscall 0.2.16", - "thiserror", + "hashbrown 0.13.2", + "log", + "rustc-hash", + "slice-group-by", + "smallvec", ] [[package]] name = "regex" -version = "1.7.3" +version = "1.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", @@ -570,9 +1099,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.29" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rustc-hash" @@ -582,23 +1111,22 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.37.7" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aae838e49b3d63e9274e1c01833cc8139d3fec468c3b84688c628f44b1ae11d" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ - "bitflags", + "bitflags 2.4.2", "errno", - "io-lifetimes", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "same-file" @@ -611,35 +1139,35 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" [[package]] name = "serde" -version = "1.0.159" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c04e8343c3daeec41f58990b9d77068df31209f2af111e059e9fe9646693065" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.159" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c614d17805b093df4b147b51339e7e44bf05ef59fba1e45d83500bcfb4d8585" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn", ] [[package]] name = "serde_json" -version = "1.0.95" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d721eca97ac802aa7777b701877c8004d950fc142651367300d21c1cc0194744" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ "indexmap", "itoa", @@ -647,23 +1175,62 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +dependencies = [ + "serde", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "slice-group-by" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" + [[package]] name = "smallbitvec" version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75ce4f9dc4a41b4c3476cc925f1efb11b66df373a8fde5d4b8915fa91b5d995e" +[[package]] +name = "smallvec" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" + +[[package]] +name = "sptr" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a" + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "strsim" -version = "0.8.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" [[package]] name = "syn" -version = "1.0.109" +version = "2.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" dependencies = [ "proc-macro2", "quote", @@ -671,56 +1238,41 @@ dependencies = [ ] [[package]] -name = "syn" -version = "2.0.13" +name = "target-lexicon" +version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c9da457c5285ac1f936ebd076af6dac17a61cfe7826f2076b4d015cf47bc8ec" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] +checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "tempfile" -version = "3.5.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", - "redox_syscall 0.3.5", "rustix", - "windows-sys", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", + "windows-sys 0.52.0", ] [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn", ] [[package]] @@ -752,76 +1304,141 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "toml" -version = "0.5.11" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" dependencies = [ "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", ] [[package]] name = "tree-sitter" -version = "0.20.10" +version = "0.22.1" dependencies = [ + "bindgen", "cc", - "lazy_static", "regex", + "wasmtime", + "wasmtime-c-api-impl", ] [[package]] name = "tree-sitter-cli" -version = "0.20.8" +version = "0.22.1" dependencies = [ "ansi_term", + "anstyle", "anyhow", - "atty", "clap", "ctor", + "ctrlc", "difference", - "dirs 3.0.2", + "dirs", + "filetime", "glob", + "heck", "html-escape", "indexmap", + "indoc", "lazy_static", "log", + "memchr", "pretty_assertions", - "proc_macro", "rand", "regex", "regex-syntax", "rustc-hash", "semver", "serde", + "serde_derive", "serde_json", "smallbitvec", "tempfile", "tiny_http", - "toml", "tree-sitter", "tree-sitter-config", "tree-sitter-highlight", "tree-sitter-loader", "tree-sitter-tags", + "tree-sitter-tests-proc-macro", "unindent", "walkdir", + "wasmparser 0.201.0", "webbrowser", - "which", + "which 6.0.0", ] [[package]] name = "tree-sitter-config" -version = "0.19.0" +version = "0.22.1" dependencies = [ "anyhow", - "dirs 3.0.2", + "dirs", "serde", "serde_json", ] [[package]] name = "tree-sitter-highlight" -version = "0.20.1" +version = "0.22.1" dependencies = [ + "lazy_static", "regex", "thiserror", "tree-sitter", @@ -829,11 +1446,13 @@ dependencies = [ [[package]] name = "tree-sitter-loader" -version = "0.20.0" +version = "0.22.1" dependencies = [ "anyhow", "cc", - "dirs 3.0.2", + "dirs", + "fs4", + "indoc", "libloading", "once_cell", "regex", @@ -842,11 +1461,12 @@ dependencies = [ "tree-sitter", "tree-sitter-highlight", "tree-sitter-tags", + "which 6.0.0", ] [[package]] name = "tree-sitter-tags" -version = "0.20.2" +version = "0.22.1" dependencies = [ "memchr", "regex", @@ -854,44 +1474,48 @@ dependencies = [ "tree-sitter", ] +[[package]] +name = "tree-sitter-tests-proc-macro" +version = "0.0.0" +dependencies = [ + "proc-macro2", + "quote", + "rand", + "syn", +] + [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-width" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" - [[package]] name = "unindent" -version = "0.2.1" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa30f5ea51ff7edfc797c6d3f9ec8cbd8cfedef5371766b7181d33977f4814f" +checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" [[package]] name = "url" -version = "2.3.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", @@ -900,21 +1524,33 @@ dependencies = [ [[package]] name = "utf8-width" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5190c9442dcdaf0ddd50f37420417d219ae5261bbf5db120d0f9bab996c9cba1" +checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" [[package]] -name = "vec_map" -version = "0.8.2" +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.3.3" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -928,9 +1564,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.84" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -938,24 +1574,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.84" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 1.0.109", + "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.84" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -963,28 +1599,252 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.84" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.84" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + +[[package]] +name = "wasm-encoder" +version = "0.41.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "972f97a5d8318f908dded23594188a90bcd09365986b1163e66d70170e5287ae" +dependencies = [ + "leb128", +] + +[[package]] +name = "wasmparser" +version = "0.121.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" +dependencies = [ + "bitflags 2.4.2", + "indexmap", + "semver", +] + +[[package]] +name = "wasmparser" +version = "0.201.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84e5df6dba6c0d7fafc63a450f1738451ed7a0b52295d83e868218fa286bf708" +dependencies = [ + "bitflags 2.4.2", + "indexmap", + "semver", +] + +[[package]] +name = "wasmtime" +version = "18.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c843b8bc4dd4f3a76173ba93405c71111d570af0d90ea5f6299c705d0c2add2" +dependencies = [ + "anyhow", + "bincode", + "bumpalo", + "cfg-if", + "gimli", + "indexmap", + "libc", + "log", + "object", + "once_cell", + "paste", + "rustix", + "serde", + "serde_derive", + "serde_json", + "target-lexicon", + "wasmparser 0.121.2", + "wasmtime-cranelift", + "wasmtime-environ", + "wasmtime-jit-icache-coherence", + "wasmtime-runtime", + "windows-sys 0.52.0", +] + +[[package]] +name = "wasmtime-asm-macros" +version = "18.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b9d329c718b3a18412a6a017c912b539baa8fe1210d21b651f6b4dbafed743" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "wasmtime-c-api-impl" +version = "18.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc93587c24d8e3cb28912eb7abf95f7e350380656faccc46cff04c0821ec58c2" +dependencies = [ + "anyhow", + "log", + "once_cell", + "tracing", + "wasmtime", + "wasmtime-c-api-macros", +] + +[[package]] +name = "wasmtime-c-api-macros" +version = "18.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" +checksum = "2e571a71eba52dfe81ef653a3a336888141f00fc2208a9962722e036fe2a34be" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "wasmtime-cranelift" +version = "18.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31ca62f519225492bd555d0ec85a2dacb0c10315db3418c8b9aeb3824bf54a24" +dependencies = [ + "anyhow", + "cfg-if", + "cranelift-codegen", + "cranelift-control", + "cranelift-entity", + "cranelift-frontend", + "cranelift-native", + "cranelift-wasm", + "gimli", + "log", + "object", + "target-lexicon", + "thiserror", + "wasmparser 0.121.2", + "wasmtime-cranelift-shared", + "wasmtime-environ", + "wasmtime-versioned-export-macros", +] + +[[package]] +name = "wasmtime-cranelift-shared" +version = "18.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd5f2071f42e61490bf7cb95b9acdbe6a29dd577a398019304a960585f28b844" +dependencies = [ + "anyhow", + "cranelift-codegen", + "cranelift-control", + "cranelift-native", + "gimli", + "object", + "target-lexicon", + "wasmtime-environ", +] + +[[package]] +name = "wasmtime-environ" +version = "18.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82bf1a47f384610da19f58b0fd392ca6a3b720974315c08afb0392c0f3951fed" +dependencies = [ + "anyhow", + "bincode", + "cranelift-entity", + "gimli", + "indexmap", + "log", + "object", + "serde", + "serde_derive", + "target-lexicon", + "thiserror", + "wasmparser 0.121.2", + "wasmtime-types", +] + +[[package]] +name = "wasmtime-jit-icache-coherence" +version = "18.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33f4121cb29dda08139b2824a734dd095d83ce843f2d613a84eb580b9cfc17ac" +dependencies = [ + "cfg-if", + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "wasmtime-runtime" +version = "18.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e517f2b996bb3b0e34a82a2bce194f850d9bcfc25c08328ef5fb71b071066b8" +dependencies = [ + "anyhow", + "cc", + "cfg-if", + "indexmap", + "libc", + "log", + "mach", + "memfd", + "memoffset", + "paste", + "psm", + "rustix", + "sptr", + "wasm-encoder", + "wasmtime-asm-macros", + "wasmtime-environ", + "wasmtime-versioned-export-macros", + "wasmtime-wmemcheck", + "windows-sys 0.52.0", +] + +[[package]] +name = "wasmtime-types" +version = "18.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54a327d7a0ef57bd52a507d28b4561a74126c7a8535a2fc6f2025716bc6a52e8" +dependencies = [ + "cranelift-entity", + "serde", + "serde_derive", + "thiserror", + "wasmparser 0.121.2", +] + +[[package]] +name = "wasmtime-versioned-export-macros" +version = "18.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ef32eea9fc7035a55159a679d1e89b43ece5ae45d24eed4808e6a92c99a0da4" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "wasmtime-wmemcheck" +version = "18.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4cbfb052d66f03603a9b77f18171ea245c7805714caad370a549a6344bf86b" [[package]] name = "web-sys" -version = "0.3.61" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -992,12 +1852,12 @@ dependencies = [ [[package]] name = "webbrowser" -version = "0.8.8" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579cc485bd5ce5bfa0d738e4921dd0b956eca9800be1fd2e5257ebe95bc4617e" +checksum = "d1b04c569c83a9bb971dd47ec6fd48753315f4bf989b9b04a2e7ca4d7f0dc950" dependencies = [ "core-foundation", - "dirs 4.0.0", + "home", "jni", "log", "ndk-context", @@ -1009,13 +1869,27 @@ dependencies = [ [[package]] name = "which" -version = "4.4.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ "either", - "libc", + "home", + "once_cell", + "rustix", +] + +[[package]] +name = "which" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fa5e0c10bf77f44aac573e498d1a82d5fbd5e91f6fc0a99e7be4b38e85e101c" +dependencies = [ + "either", + "home", "once_cell", + "rustix", + "windows-sys 0.52.0", ] [[package]] @@ -1036,9 +1910,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -1055,7 +1929,25 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets", + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.4", ] [[package]] @@ -1064,13 +1956,43 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +dependencies = [ + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", ] [[package]] @@ -1079,38 +2001,169 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" + [[package]] name = "windows_i686_gnu" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" + [[package]] name = "windows_i686_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" + +[[package]] +name = "winnow" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" +dependencies = [ + "memchr", +] + +[[package]] +name = "xtask" +version = "0.1.0" +dependencies = [ + "git2", + "indoc", + "semver", + "serde", + "serde_json", + "toml", +] + +[[package]] +name = "yansi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" + +[[package]] +name = "zerocopy" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/third-party/tree-sitter/tree-sitter/Cargo.toml b/third-party/tree-sitter/tree-sitter/Cargo.toml index f69dbc4fec..62715b224b 100644 --- a/third-party/tree-sitter/tree-sitter/Cargo.toml +++ b/third-party/tree-sitter/tree-sitter/Cargo.toml @@ -1,10 +1,93 @@ [workspace] default-members = ["cli"] -members = ["cli", "lib"] +members = [ + "cli", + "cli/config", + "cli/loader", + "lib", + "tags", + "highlight", + "xtask", +] resolver = "2" [workspace.package] -rust-version = "1.65" +version = "0.22.1" +authors = ["Max Brunsfeld "] +edition = "2021" +rust-version = "1.74.1" +homepage = "https://tree-sitter.github.io/tree-sitter" +repository = "https://github.com/tree-sitter/tree-sitter" +license = "MIT" +keywords = ["incremental", "parsing"] +categories = ["command-line-utilities", "parsing"] -[profile.release] -strip = true +[profile.optimize] +inherits = "release" +strip = true # Automatically strip symbols from the binary. +lto = true # Link-time optimization. +opt-level = 3 # Optimization level 3. +codegen-units = 1 # Maximum size reduction optimizations. + +[profile.size] +inherits = "optimize" +opt-level = "s" # Optimize for size. + +[profile.profile] +inherits = "optimize" +strip = false + +[workspace.dependencies] +ansi_term = "0.12.1" +anstyle = "1.0.6" +anyhow = "1.0.80" +cc = "1.0.90" +clap = { version = "4.5.2", features = [ + "cargo", + "derive", + "env", + "help", + "unstable-styles", +] } +ctor = "0.2.7" +ctrlc = { version = "3.4.4", features = ["termination"] } +difference = "2.0.0" +dirs = "5.0.1" +filetime = "0.2.23" +fs4 = "0.8.1" +git2 = "0.18.2" +glob = "0.3.1" +heck = "0.4.1" +html-escape = "0.2.13" +indexmap = "2.2.5" +indoc = "2.0.4" +lazy_static = "1.4.0" +libloading = "0.8.3" +log = { version = "0.4.21", features = ["std"] } +memchr = "2.7.1" +once_cell = "1.19.0" +pretty_assertions = "1.4.0" +rand = "0.8.5" +regex = "1.10.3" +regex-syntax = "0.8.2" +rustc-hash = "1.1.0" +semver = "1.0.22" +serde = { version = "1.0.197", features = ["derive"] } +serde_derive = "1.0.197" +serde_json = { version = "1.0.114", features = ["preserve_order"] } +smallbitvec = "2.5.1" +tempfile = "3.10.1" +thiserror = "1.0.57" +tiny_http = "0.12.0" +toml = "0.8.10" +unindent = "0.2.3" +walkdir = "2.5.0" +wasmparser = "0.201.0" +webbrowser = "0.8.13" +which = "6.0.0" + +tree-sitter = { version = "0.22.0", path = "./lib" } +tree-sitter-loader = { version = "0.22.0", path = "./cli/loader" } +tree-sitter-config = { version = "0.22.0", path = "./cli/config" } +tree-sitter-highlight = { version = "0.22.0", path = "./highlight" } +tree-sitter-tags = { version = "0.22.0", path = "./tags" } diff --git a/third-party/tree-sitter/tree-sitter/FUNDING.json b/third-party/tree-sitter/tree-sitter/FUNDING.json new file mode 100644 index 0000000000..3360693114 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/FUNDING.json @@ -0,0 +1,7 @@ +{ + "drips": { + "ethereum": { + "ownedBy": "0xc01246694085eF6914C527EBdFb4d8C77dfeaf8e" + } + } +} diff --git a/third-party/tree-sitter/tree-sitter/LICENSE b/third-party/tree-sitter/tree-sitter/LICENSE index 4c2200224e..3f674119a0 100644 --- a/third-party/tree-sitter/tree-sitter/LICENSE +++ b/third-party/tree-sitter/tree-sitter/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018-2021 Max Brunsfeld +Copyright (c) 2018-2023 Max Brunsfeld Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/third-party/tree-sitter/tree-sitter/Makefile b/third-party/tree-sitter/tree-sitter/Makefile index 69f6f590e0..e1164428fa 100644 --- a/third-party/tree-sitter/tree-sitter/Makefile +++ b/third-party/tree-sitter/tree-sitter/Makefile @@ -1,4 +1,4 @@ -VERSION := 0.20.9 +VERSION := 0.22.1 # install directory layout PREFIX ?= /usr/local @@ -18,15 +18,19 @@ endif OBJ := $(SRC:.c=.o) # define default flags, and override to append mandatory flags -CFLAGS ?= -O3 -Wall -Wextra -Werror -override CFLAGS += -std=gnu99 -fPIC -Ilib/src -Ilib/include +ARFLAGS := rcs +CFLAGS := -O3 -Wall -Wextra -Wshadow -pedantic +override CFLAGS += -std=c11 -fPIC -fvisibility=hidden +override CFLAGS += -Ilib/src -Ilib/src/wasm -Ilib/include # ABI versioning -SONAME_MAJOR := 0 -SONAME_MINOR := 0 +SONAME_MAJOR := $(word 1,$(subst ., ,$(VERSION))) +SONAME_MINOR := $(word 2,$(subst ., ,$(VERSION))) # OS-specific bits -ifeq ($(shell uname),Darwin) +ifeq ($(OS),Windows_NT) + $(error "Windows is not supported") +else ifeq ($(shell uname),Darwin) SOEXT = dylib SOEXTVER_MAJOR = $(SONAME_MAJOR).dylib SOEXTVER = $(SONAME_MAJOR).$(SONAME_MINOR).dylib @@ -37,35 +41,71 @@ else SOEXTVER = so.$(SONAME_MAJOR).$(SONAME_MINOR) LINKSHARED += -shared -Wl,-soname,libtree-sitter.so.$(SONAME_MAJOR) endif -ifneq (,$(filter $(shell uname),FreeBSD NetBSD DragonFly)) +ifneq ($(filter $(shell uname),FreeBSD NetBSD DragonFly),) PCLIBDIR := $(PREFIX)/libdata/pkgconfig endif -all: libtree-sitter.a libtree-sitter.$(SOEXTVER) +all: libtree-sitter.a libtree-sitter.$(SOEXT) tree-sitter.pc libtree-sitter.a: $(OBJ) - $(AR) rcs $@ $^ + $(AR) $(ARFLAGS) $@ $^ -libtree-sitter.$(SOEXTVER): $(OBJ) +libtree-sitter.$(SOEXT): $(OBJ) $(CC) $(LDFLAGS) $(LINKSHARED) $^ $(LDLIBS) -o $@ - ln -sf $@ libtree-sitter.$(SOEXT) - ln -sf $@ libtree-sitter.$(SOEXTVER_MAJOR) +ifneq ($(STRIP),) + $(STRIP) $@ +endif + +tree-sitter.pc: tree-sitter.pc.in + sed -e 's|@VERSION@|$(VERSION)|' \ + -e 's|@LIBDIR@|$(LIBDIR)|' \ + -e 's|@INCLUDEDIR@|$(INCLUDEDIR)|' \ + -e 's|=$(PREFIX)|=$${prefix}|' \ + -e 's|@PREFIX@|$(PREFIX)|' $< > $@ + +clean: + $(RM) $(OBJ) tree-sitter.pc libtree-sitter.a libtree-sitter.$(SOEXT) install: all - install -d '$(DESTDIR)$(LIBDIR)' - install -m755 libtree-sitter.a '$(DESTDIR)$(LIBDIR)'/libtree-sitter.a - install -m755 libtree-sitter.$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXTVER) + install -Dm644 lib/include/tree_sitter/api.h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/api.h + install -Dm644 tree-sitter.pc '$(DESTDIR)$(PCLIBDIR)'/tree-sitter.pc + install -Dm644 libtree-sitter.a '$(DESTDIR)$(LIBDIR)'/libtree-sitter.a + install -m755 libtree-sitter.$(SOEXT) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXTVER) ln -sf libtree-sitter.$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXTVER_MAJOR) - ln -sf libtree-sitter.$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXT) - install -d '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter - install -m644 lib/include/tree_sitter/*.h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/ - install -d '$(DESTDIR)$(PCLIBDIR)' - sed -e 's|@LIBDIR@|$(LIBDIR)|;s|@INCLUDEDIR@|$(INCLUDEDIR)|;s|@VERSION@|$(VERSION)|' \ - -e 's|=$(PREFIX)|=$${prefix}|' \ - -e 's|@PREFIX@|$(PREFIX)|' \ - tree-sitter.pc.in > '$(DESTDIR)$(PCLIBDIR)'/tree-sitter.pc + ln -sf libtree-sitter.$(SOEXTVER_MAJOR) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXT) -clean: - rm -f lib/src/*.o libtree-sitter.a libtree-sitter.$(SOEXT) libtree-sitter.$(SOEXTVER_MAJOR) libtree-sitter.$(SOEXTVER) +uninstall: + $(RM) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.a \ + '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXTVER) \ + '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXTVER_MAJOR) \ + '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXT) \ + '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/api.h \ + '$(DESTDIR)$(PCLIBDIR)'/tree-sitter.pc + +.PHONY: all install uninstall clean + + +##### Dev targets ##### + +test: + script/fetch-fixtures + script/generate-fixtures + script/test + +test_wasm: + script/generate-fixtures-wasm + script/test-wasm + +lint: + cargo update --workspace --locked --quiet + cargo check --workspace --all-targets + cargo fmt --all --check + cargo clippy --workspace --all-targets -- -D warnings + +format: + cargo fmt --all + +changelog: + @git-cliff --config script/cliff.toml --output CHANGELOG.md --latest --github-token $(shell gh auth token) -.PHONY: all install clean +.PHONY: test test_wasm lint format changelog diff --git a/third-party/tree-sitter/tree-sitter/Package.swift b/third-party/tree-sitter/tree-sitter/Package.swift new file mode 100644 index 0000000000..79084cb9a0 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/Package.swift @@ -0,0 +1,41 @@ +// swift-tools-version: 5.8 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "TreeSitter", + products: [ + // Products define the executables and libraries a package produces, and make them visible to other packages. + .library( + name: "TreeSitter", + targets: ["TreeSitter"]), + ], + targets: [ + .target(name: "TreeSitter", + path: "lib", + exclude: [ + "binding_rust", + "binding_web", + "node_modules", + "Cargo.toml", + "README.md", + "src/unicode/README.md", + "src/unicode/LICENSE", + "src/unicode/ICU_SHA", + "src/get_changed_ranges.c", + "src/tree_cursor.c", + "src/stack.c", + "src/node.c", + "src/lexer.c", + "src/parser.c", + "src/language.c", + "src/alloc.c", + "src/subtree.c", + "src/tree.c", + "src/query.c" + ], + sources: ["src/lib.c"]), + ], + cLanguageStandard: .c11 +) diff --git a/third-party/tree-sitter/tree-sitter/README.md b/third-party/tree-sitter/tree-sitter/README.md index 34390187b1..d378215eb0 100644 --- a/third-party/tree-sitter/tree-sitter/README.md +++ b/third-party/tree-sitter/tree-sitter/README.md @@ -1,7 +1,8 @@ # tree-sitter -[![CICD](https://github.com/tree-sitter/tree-sitter/actions/workflows/CICD.yml/badge.svg)](https://github.com/tree-sitter/tree-sitter/actions/workflows/CICD.yml) [![DOI](https://zenodo.org/badge/14164618.svg)](https://zenodo.org/badge/latestdoi/14164618) +[![discord][discord]](https://discord.gg/w7nTvsVJhm) +[![matrix][matrix]](https://matrix.to/#/#tree-sitter-chat:matrix.org) Tree-sitter is a parser generator tool and an incremental parsing library. It can build a concrete syntax tree for a source file and efficiently update the syntax tree as the source file is edited. Tree-sitter aims to be: @@ -11,8 +12,10 @@ Tree-sitter is a parser generator tool and an incremental parsing library. It ca - **Dependency-free** so that the runtime library (which is written in pure C) can be embedded in any application ## Links - - [Documentation](https://tree-sitter.github.io) - [Rust binding](lib/binding_rust/README.md) - [WASM binding](lib/binding_web/README.md) - [Command-line interface](cli/README.md) + +[discord]: https://img.shields.io/discord/1063097320771698699?logo=discord&label=discord +[matrix]: https://img.shields.io/matrix/tree-sitter-chat%3Amatrix.org?logo=matrix&label=matrix diff --git a/third-party/tree-sitter/tree-sitter/build.zig b/third-party/tree-sitter/tree-sitter/build.zig new file mode 100644 index 0000000000..ed44706a65 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/build.zig @@ -0,0 +1,16 @@ +const std = @import("std"); + +pub fn build(b: *std.Build) void { + var lib = b.addStaticLibrary(.{ + .name = "tree-sitter", + .target = b.standardTargetOptions(.{}), + .optimize = b.standardOptimizeOption(.{}), + }); + + lib.linkLibC(); + lib.addCSourceFile(.{ .file = .{ .path = "lib/src/lib.c" }, .flags = &.{"-std=c11"} }); + lib.addIncludePath(.{ .path = "lib/include" }); + lib.addIncludePath(.{ .path = "lib/src" }); + + b.installArtifact(lib); +} diff --git a/third-party/tree-sitter/tree-sitter/cli/Cargo.toml b/third-party/tree-sitter/tree-sitter/cli/Cargo.toml index f9f8ca4b34..7d11bf4ab1 100644 --- a/third-party/tree-sitter/tree-sitter/cli/Cargo.toml +++ b/third-party/tree-sitter/tree-sitter/cli/Cargo.toml @@ -1,82 +1,71 @@ [package] name = "tree-sitter-cli" +version.workspace = true description = "CLI tool for developing, testing, and using Tree-sitter parsers" -version = "0.20.8" -authors = ["Max Brunsfeld "] -edition = "2021" -license = "MIT" -readme = "README.md" -keywords = ["incremental", "parsing"] -categories = ["command-line-utilities", "parsing"] -repository = "https://github.com/tree-sitter/tree-sitter" +authors.workspace = true +edition.workspace = true rust-version.workspace = true +readme = "README.md" +homepage.workspace = true +repository.workspace = true +license.workspace = true +keywords.workspace = true +categories.workspace = true [[bin]] name = "tree-sitter" path = "src/main.rs" +doc = false [[bench]] name = "benchmark" harness = false -[dependencies] -ansi_term = "0.12" -anyhow = "1.0" -atty = "0.2" -clap = "2.32" -difference = "2.0" -dirs = "3.0" -glob = "0.3.0" -html-escape = "0.2.6" -indexmap = "1" -lazy_static = "1.2.0" -regex = "1" -regex-syntax = "0.6.4" -rustc-hash = "1" -semver = "1.0" -serde = { version = "1.0.130", features = ["derive"] } -smallbitvec = "2.5.1" -tiny_http = "0.12.0" -walkdir = "2.3" -webbrowser = "0.8.3" -which = "4.1.0" - -[dependencies.tree-sitter] -version = "0.20.10" -path = "../lib" - -[dependencies.tree-sitter-config] -version = "0.19.0" -path = "config" +[features] +wasm = ["tree-sitter/wasm", "tree-sitter-loader/wasm"] -[dependencies.tree-sitter-highlight] -version = "0.20" -path = "../highlight" - -[dependencies.tree-sitter-loader] -version = "0.20" -path = "loader" - -[dependencies.tree-sitter-tags] -version = "0.20" -path = "../tags" - -[dependencies.serde_json] -version = "1.0" -features = ["preserve_order"] +[dependencies] +ansi_term.workspace = true +anstyle.workspace = true +anyhow.workspace = true +clap.workspace = true +ctrlc.workspace = true +difference.workspace = true +dirs.workspace = true +filetime.workspace = true +glob.workspace = true +heck.workspace = true +html-escape.workspace = true +indexmap.workspace = true +indoc.workspace = true +lazy_static.workspace = true +log.workspace = true +memchr.workspace = true +regex.workspace = true +regex-syntax.workspace = true +rustc-hash.workspace = true +semver.workspace = true +serde.workspace = true +serde_derive.workspace = true +serde_json.workspace = true +smallbitvec.workspace = true +tiny_http.workspace = true +walkdir.workspace = true +wasmparser.workspace = true +webbrowser.workspace = true +which.workspace = true -[dependencies.log] -version = "0.4.6" -features = ["std"] +tree-sitter.workspace = true +tree-sitter-config.workspace = true +tree-sitter-highlight.workspace = true +tree-sitter-loader.workspace = true +tree-sitter-tags.workspace = true [dev-dependencies] -proc_macro = { path = "src/tests/proc_macro" } - -rand = "0.8" -tempfile = "3" -pretty_assertions = "0.7.2" -ctor = "0.1" -unindent = "0.2" +tree_sitter_proc_macro = { path = "src/tests/proc_macro", package = "tree-sitter-tests-proc-macro" } -[build-dependencies] -toml = "0.5" +rand.workspace = true +tempfile.workspace = true +pretty_assertions.workspace = true +ctor.workspace = true +unindent.workspace = true diff --git a/third-party/tree-sitter/tree-sitter/cli/README.md b/third-party/tree-sitter/tree-sitter/cli/README.md index 8cdda9c00f..eb93bcfa24 100644 --- a/third-party/tree-sitter/tree-sitter/cli/README.md +++ b/third-party/tree-sitter/tree-sitter/cli/README.md @@ -1,7 +1,11 @@ -Tree-sitter CLI -=============== +# Tree-sitter CLI -[![Crates.io](https://img.shields.io/crates/v/tree-sitter-cli.svg)](https://crates.io/crates/tree-sitter-cli) +[![crates.io badge]][crates.io] [![npmjs.com badge]][npmjs.com] + +[crates.io]: https://crates.io/crates/tree-sitter-cli +[crates.io badge]: https://img.shields.io/crates/v/tree-sitter-cli.svg?color=%23B48723 +[npmjs.com]: https://www.npmjs.org/package/tree-sitter-cli +[npmjs.com badge]: https://img.shields.io/npm/v/tree-sitter-cli.svg?color=%23BF4A4A The Tree-sitter CLI allows you to develop, test, and use Tree-sitter grammars from the command line. It works on MacOS, Linux, and Windows. @@ -19,7 +23,7 @@ or with `npm`: npm install tree-sitter-cli ``` -You can also download a pre-built binary for your platform from [the releases page](https://github.com/tree-sitter/tree-sitter/releases/latest). +You can also download a pre-built binary for your platform from [the releases page]. ### Dependencies @@ -30,8 +34,11 @@ The `tree-sitter` binary itself has no dependencies, but specific commands have ### Commands -* `generate` - The `tree-sitter generate` command will generate a Tree-sitter parser based on the grammar in the current working directory. See [the documentation](http://tree-sitter.github.io/tree-sitter/creating-parsers) for more information. +* `generate` - The `tree-sitter generate` command will generate a Tree-sitter parser based on the grammar in the current working directory. See [the documentation] for more information. -* `test` - The `tree-sitter test` command will run the unit tests for the Tree-sitter parser in the current working directory. See [the documentation](http://tree-sitter.github.io/tree-sitter/creating-parsers) for more information. +* `test` - The `tree-sitter test` command will run the unit tests for the Tree-sitter parser in the current working directory. See [the documentation] for more information. * `parse` - The `tree-sitter parse` command will parse a file (or list of files) using Tree-sitter parsers. + +[the documentation]: https://tree-sitter.github.io/tree-sitter/creating-parsers +[the releases page]: https://github.com/tree-sitter/tree-sitter/releases/latest diff --git a/third-party/tree-sitter/tree-sitter/cli/benches/benchmark.rs b/third-party/tree-sitter/tree-sitter/cli/benches/benchmark.rs index efb73f3a5d..f7700dd73c 100644 --- a/third-party/tree-sitter/tree-sitter/cli/benches/benchmark.rs +++ b/third-party/tree-sitter/tree-sitter/cli/benches/benchmark.rs @@ -15,7 +15,7 @@ lazy_static! { static ref EXAMPLE_FILTER: Option = env::var("TREE_SITTER_BENCHMARK_EXAMPLE_FILTER").ok(); static ref REPETITION_COUNT: usize = env::var("TREE_SITTER_BENCHMARK_REPETITION_COUNT") - .map(|s| usize::from_str_radix(&s, 10).unwrap()) + .map(|s| s.parse::().unwrap()) .unwrap_or(5); static ref TEST_LOADER: Loader = Loader::with_parser_lib_path(SCRATCH_DIR.clone()); static ref EXAMPLE_AND_QUERY_PATHS_BY_LANGUAGE_DIR: BTreeMap, Vec)> = { @@ -25,29 +25,29 @@ lazy_static! { let (example_paths, query_paths) = result.entry(relative_path.to_owned()).or_default(); - if let Ok(example_files) = fs::read_dir(&dir.join("examples")) { + if let Ok(example_files) = fs::read_dir(dir.join("examples")) { example_paths.extend(example_files.filter_map(|p| { let p = p.unwrap().path(); if p.is_file() { - Some(p.to_owned()) + Some(p) } else { None } })); } - if let Ok(query_files) = fs::read_dir(&dir.join("queries")) { + if let Ok(query_files) = fs::read_dir(dir.join("queries")) { query_paths.extend(query_files.filter_map(|p| { let p = p.unwrap().path(); if p.is_file() { - Some(p.to_owned()) + Some(p) } else { None } })); } } else { - for entry in fs::read_dir(&dir).unwrap() { + for entry in fs::read_dir(dir).unwrap() { let entry = entry.unwrap().path(); if entry.is_dir() { process_dir(result, &entry); @@ -90,9 +90,9 @@ fn main() { } } - eprintln!("\nLanguage: {}", language_name); + eprintln!("\nLanguage: {language_name}"); let language = get_language(language_path); - parser.set_language(language).unwrap(); + parser.set_language(&language).unwrap(); eprintln!(" Constructing Queries"); for path in query_paths { @@ -102,8 +102,9 @@ fn main() { } } - parse(&path, max_path_length, |source| { - Query::new(language, str::from_utf8(source).unwrap()) + parse(path, max_path_length, |source| { + Query::new(&language, str::from_utf8(source).unwrap()) + .with_context(|| format!("Query file path: {path:?}")) .expect("Failed to parse query"); }); } @@ -143,13 +144,13 @@ fn main() { } if let Some((average_normal, worst_normal)) = aggregate(&normal_speeds) { - eprintln!(" Average Speed (normal): {} bytes/ms", average_normal); - eprintln!(" Worst Speed (normal): {} bytes/ms", worst_normal); + eprintln!(" Average Speed (normal): {average_normal} bytes/ms"); + eprintln!(" Worst Speed (normal): {worst_normal} bytes/ms"); } if let Some((average_error, worst_error)) = aggregate(&error_speeds) { - eprintln!(" Average Speed (errors): {} bytes/ms", average_error); - eprintln!(" Worst Speed (errors): {} bytes/ms", worst_error); + eprintln!(" Average Speed (errors): {average_error} bytes/ms"); + eprintln!(" Worst Speed (errors): {worst_error} bytes/ms"); } all_normal_speeds.extend(normal_speeds); @@ -158,24 +159,24 @@ fn main() { eprintln!("\n Overall"); if let Some((average_normal, worst_normal)) = aggregate(&all_normal_speeds) { - eprintln!(" Average Speed (normal): {} bytes/ms", average_normal); - eprintln!(" Worst Speed (normal): {} bytes/ms", worst_normal); + eprintln!(" Average Speed (normal): {average_normal} bytes/ms"); + eprintln!(" Worst Speed (normal): {worst_normal} bytes/ms"); } if let Some((average_error, worst_error)) = aggregate(&all_error_speeds) { - eprintln!(" Average Speed (errors): {} bytes/ms", average_error); - eprintln!(" Worst Speed (errors): {} bytes/ms", worst_error); + eprintln!(" Average Speed (errors): {average_error} bytes/ms"); + eprintln!(" Worst Speed (errors): {worst_error} bytes/ms"); } - eprintln!(""); + eprintln!(); } -fn aggregate(speeds: &Vec) -> Option<(usize, usize)> { +fn aggregate(speeds: &[usize]) -> Option<(usize, usize)> { if speeds.is_empty() { return None; } let mut total = 0; let mut max = usize::MAX; - for speed in speeds.iter().cloned() { + for speed in speeds.iter().copied() { total += speed; if speed < max { max = speed; @@ -192,23 +193,26 @@ fn parse(path: &Path, max_path_length: usize, mut action: impl FnMut(&[u8])) -> ); let source_code = fs::read(path) - .with_context(|| format!("Failed to read {:?}", path)) + .with_context(|| format!("Failed to read {path:?}")) .unwrap(); let time = Instant::now(); for _ in 0..*REPETITION_COUNT { action(&source_code); } let duration = time.elapsed() / (*REPETITION_COUNT as u32); - let duration_ms = duration.as_millis(); - let speed = source_code.len() as u128 / (duration_ms + 1); - eprintln!("time {} ms\tspeed {} bytes/ms", duration_ms as usize, speed); + let duration_ns = duration.as_nanos(); + let speed = ((source_code.len() as u128) * 1_000_000) / duration_ns; + eprintln!( + "time {:>7.2} ms\t\tspeed {speed:>6} bytes/ms", + (duration_ns as f64) / 1e6, + ); speed as usize } fn get_language(path: &Path) -> Language { let src_dir = GRAMMARS_DIR.join(path).join("src"); TEST_LOADER - .load_language_at_path(&src_dir, &src_dir) - .with_context(|| format!("Failed to load language at path {:?}", src_dir)) + .load_language_at_path(&src_dir, &[&src_dir], None) + .with_context(|| format!("Failed to load language at path {src_dir:?}")) .unwrap() } diff --git a/third-party/tree-sitter/tree-sitter/cli/build.rs b/third-party/tree-sitter/tree-sitter/cli/build.rs index 74c6d833db..a29a940b23 100644 --- a/third-party/tree-sitter/tree-sitter/cli/build.rs +++ b/third-party/tree-sitter/tree-sitter/cli/build.rs @@ -1,27 +1,51 @@ -use std::ffi::OsStr; -use std::path::{Path, PathBuf}; -use std::{env, fs}; +use std::{ + env, + ffi::OsStr, + fs, + path::{Path, PathBuf}, + time::SystemTime, +}; fn main() { if let Some(git_sha) = read_git_sha() { - println!("cargo:rustc-env={}={}", "BUILD_SHA", git_sha); + println!("cargo:rustc-env=BUILD_SHA={git_sha}"); } if web_playground_files_present() { - println!("cargo:rustc-cfg={}", "TREE_SITTER_EMBED_WASM_BINDING"); + println!("cargo:rustc-cfg=TREE_SITTER_EMBED_WASM_BINDING"); } - let rust_binding_version = read_rust_binding_version(); - println!( - "cargo:rustc-env={}={}", - "RUST_BINDING_VERSION", rust_binding_version, - ); + let build_time = SystemTime::now() + .duration_since(SystemTime::UNIX_EPOCH) + .unwrap() + .as_secs_f64(); + println!("cargo:rustc-env=BUILD_TIME={build_time}"); - let emscripten_version = fs::read_to_string("emscripten-version").unwrap(); - println!( - "cargo:rustc-env={}={}", - "EMSCRIPTEN_VERSION", emscripten_version, - ); + #[cfg(any( + target_os = "linux", + target_os = "android", + target_os = "freebsd", + target_os = "openbsd", + target_os = "netbsd", + target_os = "dragonfly", + ))] + { + let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()).join("dynamic-symbols.txt"); + std::fs::write( + &out_dir, + "{ + ts_current_malloc; + ts_current_calloc; + ts_current_realloc; + ts_current_free; + };", + ) + .unwrap(); + println!( + "cargo:rustc-link-arg=-Wl,--dynamic-list={}", + out_dir.display() + ); + } } fn web_playground_files_present() -> bool { @@ -42,7 +66,8 @@ fn read_git_sha() -> Option { git_path = repo_path.join(".git"); if git_path.exists() { break; - } else if !repo_path.pop() { + } + if !repo_path.pop() { return None; } } @@ -57,10 +82,10 @@ fn read_git_sha() -> Option { } let git_head_path = git_dir_path.join("HEAD"); if let Some(path) = git_head_path.to_str() { - println!("cargo:rerun-if-changed={}", path); + println!("cargo:rerun-if-changed={path}"); } if let Ok(mut head_content) = fs::read_to_string(&git_head_path) { - if head_content.ends_with("\n") { + if head_content.ends_with('\n') { head_content.pop(); } @@ -71,13 +96,12 @@ fn read_git_sha() -> Option { // Go to real non-worktree gitdir let git_dir_path = git_dir_path .parent() - .map(|p| { + .and_then(|p| { p.file_name() .map(|n| n == OsStr::new("worktrees")) .and_then(|x| x.then(|| p.parent())) }) .flatten() - .flatten() .unwrap_or(&git_dir_path); let file = git_dir_path.join(&head_content); @@ -90,7 +114,7 @@ fn read_git_sha() -> Option { if let Some((hash, r#ref)) = line.split_once(' ') { if r#ref == head_content { if let Some(path) = packed_refs.to_str() { - println!("cargo:rerun-if-changed={}", path); + println!("cargo:rerun-if-changed={path}"); } return Some(hash.to_string()); } @@ -101,26 +125,15 @@ fn read_git_sha() -> Option { } }; if let Some(path) = ref_filename.to_str() { - println!("cargo:rerun-if-changed={}", path); + println!("cargo:rerun-if-changed={path}"); } return fs::read_to_string(&ref_filename).ok(); } // If we're on a detached commit, then the `HEAD` file itself contains the sha. - else if head_content.len() == 40 { + if head_content.len() == 40 { return Some(head_content); } } None } - -fn read_rust_binding_version() -> String { - let path = "Cargo.toml"; - let text = fs::read_to_string(path).unwrap(); - let cargo_toml = toml::from_str::(text.as_ref()).unwrap(); - cargo_toml["dependencies"]["tree-sitter"]["version"] - .as_str() - .unwrap() - .trim_matches('"') - .to_string() -} diff --git a/third-party/tree-sitter/tree-sitter/cli/config/Cargo.toml b/third-party/tree-sitter/tree-sitter/cli/config/Cargo.toml index 114d6ce891..8379a5468f 100644 --- a/third-party/tree-sitter/tree-sitter/cli/config/Cargo.toml +++ b/third-party/tree-sitter/tree-sitter/cli/config/Cargo.toml @@ -1,21 +1,19 @@ [package] name = "tree-sitter-config" +version.workspace = true description = "User configuration of tree-sitter's command line programs" -version = "0.19.0" -authors = ["Max Brunsfeld "] -edition = "2018" -license = "MIT" -readme = "README.md" -keywords = ["incremental", "parsing"] -categories = ["command-line-utilities", "parsing"] -repository = "https://github.com/tree-sitter/tree-sitter" +authors.workspace = true +edition.workspace = true rust-version.workspace = true +readme = "README.md" +homepage.workspace = true +repository.workspace = true +license.workspace = true +keywords.workspace = true +categories.workspace = true [dependencies] -anyhow = "1.0" -dirs = "3.0" -serde = { version = "1.0.130", features = ["derive"] } - -[dependencies.serde_json] -version = "1.0.45" -features = ["preserve_order"] +anyhow.workspace = true +dirs.workspace = true +serde.workspace = true +serde_json.workspace = true diff --git a/third-party/tree-sitter/tree-sitter/cli/config/README.md b/third-party/tree-sitter/tree-sitter/cli/config/README.md index 8cbfbcf47c..e7d7b39b92 100644 --- a/third-party/tree-sitter/tree-sitter/cli/config/README.md +++ b/third-party/tree-sitter/tree-sitter/cli/config/README.md @@ -1,5 +1,7 @@ -# `tree-sitter-config` +# Tree-sitter Config + +Manages Tree-sitter's configuration file. You can use a configuration file to control the behavior of the `tree-sitter` -command-line program. This crate implements the logic for finding and the +command-line program. This crate implements the logic for finding and the parsing the contents of the configuration file. diff --git a/third-party/tree-sitter/tree-sitter/cli/config/src/lib.rs b/third-party/tree-sitter/tree-sitter/cli/config/src/lib.rs index 3cd09b8dd1..1686b54f75 100644 --- a/third-party/tree-sitter/tree-sitter/cli/config/src/lib.rs +++ b/third-party/tree-sitter/tree-sitter/cli/config/src/lib.rs @@ -1,4 +1,4 @@ -//! Manages tree-sitter's configuration file. +#![doc = include_str!("../README.md")] use anyhow::{anyhow, Context, Result}; use serde::{Deserialize, Serialize}; @@ -39,7 +39,7 @@ impl Config { } let legacy_path = dirs::home_dir() - .ok_or(anyhow!("Cannot determine home directory"))? + .ok_or_else(|| anyhow!("Cannot determine home directory"))? .join(".tree-sitter") .join("config.json"); if legacy_path.is_file() { @@ -51,7 +51,7 @@ impl Config { fn xdg_config_file() -> Result { let xdg_path = dirs::config_dir() - .ok_or(anyhow!("Cannot determine config directory"))? + .ok_or_else(|| anyhow!("Cannot determine config directory"))? .join("tree-sitter") .join("config.json"); Ok(xdg_path) @@ -60,21 +60,26 @@ impl Config { /// Locates and loads in the user's configuration file. We search for the configuration file /// in the following locations, in order: /// + /// - Location specified by the path parameter if provided /// - `$TREE_SITTER_DIR/config.json`, if the `TREE_SITTER_DIR` environment variable is set /// - `tree-sitter/config.json` in your default user configuration directory, as determined /// by [`dirs::config_dir`](https://docs.rs/dirs/*/dirs/fn.config_dir.html) /// - `$HOME/.tree-sitter/config.json` as a fallback from where tree-sitter _used_ to store /// its configuration - pub fn load() -> Result { - let location = match Self::find_config_file()? { - Some(location) => location, - None => return Config::initial(), + pub fn load(path: Option) -> Result { + let location = if let Some(path) = path { + path + } else if let Some(path) = Self::find_config_file()? { + path + } else { + return Self::initial(); }; + let content = fs::read_to_string(&location) .with_context(|| format!("Failed to read {}", &location.to_string_lossy()))?; let config = serde_json::from_str(&content) .with_context(|| format!("Bad JSON config {}", &location.to_string_lossy()))?; - Ok(Config { location, config }) + Ok(Self { location, config }) } /// Creates an empty initial configuration file. You can then use the [`Config::add`][] method @@ -83,7 +88,7 @@ impl Config { /// disk. /// /// (Note that this is typically only done by the `tree-sitter init-config` command.) - pub fn initial() -> Result { + pub fn initial() -> Result { let location = if let Ok(path) = env::var("TREE_SITTER_DIR") { let mut path = PathBuf::from(path); path.push("config.json"); @@ -92,7 +97,7 @@ impl Config { Self::xdg_config_file()? }; let config = serde_json::json!({}); - Ok(Config { location, config }) + Ok(Self { location, config }) } /// Saves this configuration to the file that it was originally loaded from. diff --git a/third-party/tree-sitter/tree-sitter/cli/emscripten-version b/third-party/tree-sitter/tree-sitter/cli/emscripten-version deleted file mode 100644 index 05b41fb67e..0000000000 --- a/third-party/tree-sitter/tree-sitter/cli/emscripten-version +++ /dev/null @@ -1 +0,0 @@ -3.1.29 diff --git a/third-party/tree-sitter/tree-sitter/cli/loader/Cargo.toml b/third-party/tree-sitter/tree-sitter/cli/loader/Cargo.toml index 6af28f3050..c235e4c477 100644 --- a/third-party/tree-sitter/tree-sitter/cli/loader/Cargo.toml +++ b/third-party/tree-sitter/tree-sitter/cli/loader/Cargo.toml @@ -1,37 +1,33 @@ [package] name = "tree-sitter-loader" +version.workspace = true description = "Locates, builds, and loads tree-sitter grammars at runtime" -version = "0.20.0" -authors = ["Max Brunsfeld "] -edition = "2018" -license = "MIT" -readme = "README.md" -keywords = ["incremental", "parsing"] -categories = ["command-line-utilities", "parsing"] -repository = "https://github.com/tree-sitter/tree-sitter" +authors.workspace = true +edition.workspace = true rust-version.workspace = true +readme = "README.md" +homepage.workspace = true +repository.workspace = true +license.workspace = true +keywords.workspace = true +categories.workspace = true -[dependencies] -anyhow = "1.0" -cc = "^1.0.58" -dirs = "3.0" -libloading = "0.7" -once_cell = "1.7" -regex = "1" -serde = { version = "1.0.130", features = ["derive"] } - -[dependencies.serde_json] -version = "1.0" -features = ["preserve_order"] - -[dependencies.tree-sitter] -version = "0.20" -path = "../../lib" +[features] +wasm = ["tree-sitter/wasm"] -[dependencies.tree-sitter-highlight] -version = "0.20" -path = "../../highlight" +[dependencies] +anyhow.workspace = true +cc.workspace = true +dirs.workspace = true +fs4.workspace = true +indoc.workspace = true +libloading.workspace = true +once_cell.workspace = true +regex.workspace = true +serde.workspace = true +serde_json.workspace = true +which.workspace = true -[dependencies.tree-sitter-tags] -version = "0.20" -path = "../../tags" +tree-sitter.workspace = true +tree-sitter-highlight.workspace = true +tree-sitter-tags.workspace = true diff --git a/third-party/tree-sitter/tree-sitter/cli/loader/README.md b/third-party/tree-sitter/tree-sitter/cli/loader/README.md index 9889ec71d7..a3c1867495 100644 --- a/third-party/tree-sitter/tree-sitter/cli/loader/README.md +++ b/third-party/tree-sitter/tree-sitter/cli/loader/README.md @@ -1,6 +1,6 @@ -# `tree-sitter-loader` +# Tree-sitter Loader The `tree-sitter` command-line program will dynamically find and build grammars at runtime, if you have cloned the grammars' repositories to your local -filesystem. This helper crate implements that logic, so that you can use it in +filesystem. This helper crate implements that logic, so that you can use it in your own program analysis tools, as well. diff --git a/third-party/tree-sitter/tree-sitter/cli/loader/build.rs b/third-party/tree-sitter/tree-sitter/cli/loader/build.rs index e0ebd1c48f..714a662bd7 100644 --- a/third-party/tree-sitter/tree-sitter/cli/loader/build.rs +++ b/third-party/tree-sitter/tree-sitter/cli/loader/build.rs @@ -3,4 +3,7 @@ fn main() { "cargo:rustc-env=BUILD_TARGET={}", std::env::var("TARGET").unwrap() ); + + let emscripten_version = std::fs::read_to_string("emscripten-version").unwrap(); + println!("cargo:rustc-env=EMSCRIPTEN_VERSION={emscripten_version}"); } diff --git a/third-party/tree-sitter/tree-sitter/cli/loader/emscripten-version b/third-party/tree-sitter/tree-sitter/cli/loader/emscripten-version new file mode 100644 index 0000000000..1f1a39706a --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/loader/emscripten-version @@ -0,0 +1 @@ +3.1.37 diff --git a/third-party/tree-sitter/tree-sitter/cli/loader/src/lib.rs b/third-party/tree-sitter/tree-sitter/cli/loader/src/lib.rs index 029da4513e..a22ce1cf90 100644 --- a/third-party/tree-sitter/tree-sitter/cli/loader/src/lib.rs +++ b/third-party/tree-sitter/tree-sitter/cli/loader/src/lib.rs @@ -1,19 +1,28 @@ -use anyhow::{anyhow, Context, Error, Result}; -use libloading::{Library, Symbol}; -use once_cell::unsync::OnceCell; -use regex::{Regex, RegexBuilder}; -use serde::{Deserialize, Deserializer, Serialize}; +#![doc = include_str!("../README.md")] + use std::collections::HashMap; -use std::io::BufReader; +use std::ffi::{OsStr, OsString}; +use std::io::{BufRead, BufReader}; use std::ops::Range; use std::path::{Path, PathBuf}; use std::process::Command; use std::sync::Mutex; use std::time::SystemTime; use std::{env, fs, mem}; + +use anyhow::{anyhow, Context, Error, Result}; +use fs4::FileExt; +use indoc::indoc; +use libloading::{Library, Symbol}; +use once_cell::unsync::OnceCell; +use regex::{Regex, RegexBuilder}; +use serde::{Deserialize, Deserializer, Serialize}; use tree_sitter::{Language, QueryError, QueryErrorKind}; use tree_sitter_highlight::HighlightConfiguration; use tree_sitter_tags::{Error as TagsError, TagsConfiguration}; +use which::which; + +pub const EMSCRIPTEN_TAG: &str = concat!("docker.io/emscripten/emsdk:", env!("EMSCRIPTEN_VERSION")); #[derive(Default, Deserialize, Serialize)] pub struct Config { @@ -33,9 +42,8 @@ where D: Deserializer<'de>, { let paths = Vec::::deserialize(deserializer)?; - let home = match dirs::home_dir() { - Some(home) => home, - None => return Ok(paths), + let Some(home) = dirs::home_dir() else { + return Ok(paths); }; let standardized = paths .into_iter() @@ -55,30 +63,34 @@ fn standardize_path(path: PathBuf, home: &Path) -> PathBuf { } impl Config { - pub fn initial() -> Config { + #[must_use] + pub fn initial() -> Self { let home_dir = dirs::home_dir().expect("Cannot determine home directory"); - Config { + Self { parser_directories: vec![ home_dir.join("github"), home_dir.join("src"), home_dir.join("source"), + home_dir.join("projects"), + home_dir.join("dev"), + home_dir.join("git"), ], } } } #[cfg(unix)] -const DYLIB_EXTENSION: &'static str = "so"; +const DYLIB_EXTENSION: &str = "so"; #[cfg(windows)] -const DYLIB_EXTENSION: &'static str = "dll"; +const DYLIB_EXTENSION: &str = "dll"; -const BUILD_TARGET: &'static str = env!("BUILD_TARGET"); +const BUILD_TARGET: &str = env!("BUILD_TARGET"); pub struct LanguageConfiguration<'a> { pub scope: Option, pub content_regex: Option, - pub _first_line_regex: Option, + pub first_line_regex: Option, pub injection_regex: Option, pub file_types: Vec, pub root_path: PathBuf, @@ -86,6 +98,7 @@ pub struct LanguageConfiguration<'a> { pub injections_filenames: Option>, pub locals_filenames: Option>, pub tags_filenames: Option>, + pub language_name: String, language_id: usize, highlight_config: OnceCell>, tags_config: OnceCell>, @@ -95,12 +108,17 @@ pub struct LanguageConfiguration<'a> { pub struct Loader { parser_lib_path: PathBuf, - languages_by_id: Vec<(PathBuf, OnceCell)>, + languages_by_id: Vec<(PathBuf, OnceCell, Option>)>, language_configurations: Vec>, language_configuration_ids_by_file_type: HashMap>, + language_configuration_in_current_path: Option, + language_configuration_ids_by_first_line_regex: HashMap>, highlight_names: Box>>, use_all_highlight_names: bool, debug_build: bool, + + #[cfg(feature = "wasm")] + wasm_store: Mutex>, } unsafe impl Send for Loader {} @@ -111,32 +129,39 @@ impl Loader { let parser_lib_path = match env::var("TREE_SITTER_LIBDIR") { Ok(path) => PathBuf::from(path), _ => dirs::cache_dir() - .ok_or(anyhow!("Cannot determine cache directory"))? + .ok_or_else(|| anyhow!("Cannot determine cache directory"))? .join("tree-sitter") .join("lib"), }; Ok(Self::with_parser_lib_path(parser_lib_path)) } + #[must_use] pub fn with_parser_lib_path(parser_lib_path: PathBuf) -> Self { - Loader { + Self { parser_lib_path, languages_by_id: Vec::new(), language_configurations: Vec::new(), language_configuration_ids_by_file_type: HashMap::new(), + language_configuration_in_current_path: None, + language_configuration_ids_by_first_line_regex: HashMap::new(), highlight_names: Box::new(Mutex::new(Vec::new())), use_all_highlight_names: true, debug_build: false, + + #[cfg(feature = "wasm")] + wasm_store: Mutex::default(), } } - pub fn configure_highlights(&mut self, names: &Vec) { + pub fn configure_highlights(&mut self, names: &[String]) { self.use_all_highlight_names = false; let mut highlights = self.highlight_names.lock().unwrap(); highlights.clear(); highlights.extend(names.iter().cloned()); } + #[must_use] pub fn highlight_names(&self) -> Vec { self.highlight_names.lock().unwrap().clone() } @@ -146,8 +171,7 @@ impl Loader { eprintln!("Warning: You have not configured any parser directories!"); eprintln!("Please run `tree-sitter init-config` and edit the resulting"); eprintln!("configuration file to indicate where we should look for"); - eprintln!("language grammars."); - eprintln!(""); + eprintln!("language grammars.\n"); } for parser_container_dir in &config.parser_directories { if let Ok(entries) = fs::read_dir(parser_container_dir) { @@ -157,6 +181,7 @@ impl Loader { if parser_dir_name.starts_with("tree-sitter-") { self.find_language_configurations_at_path( &parser_container_dir.join(parser_dir_name), + false, ) .ok(); } @@ -167,23 +192,24 @@ impl Loader { Ok(()) } - pub fn languages_at_path(&mut self, path: &Path) -> Result> { - if let Ok(configurations) = self.find_language_configurations_at_path(path) { + pub fn languages_at_path(&mut self, path: &Path) -> Result> { + if let Ok(configurations) = self.find_language_configurations_at_path(path, true) { let mut language_ids = configurations .iter() - .map(|c| c.language_id) + .map(|c| (c.language_id, c.language_name.clone())) .collect::>(); - language_ids.sort(); + language_ids.sort_unstable(); language_ids.dedup(); language_ids .into_iter() - .map(|id| self.language_for_id(id)) + .map(|(id, name)| Ok((self.language_for_id(id)?, name))) .collect::>>() } else { Ok(Vec::new()) } } + #[must_use] pub fn get_all_language_configurations(&self) -> Vec<(&LanguageConfiguration, &Path)> { self.language_configurations .iter() @@ -204,6 +230,30 @@ impl Loader { Ok(None) } + pub fn language_configuration_for_first_line_regex( + &self, + path: &Path, + ) -> Result> { + self.language_configuration_ids_by_first_line_regex + .iter() + .try_fold(None, |_, (regex, ids)| { + if let Some(regex) = Self::regex(Some(regex)) { + let file = fs::File::open(path)?; + let reader = BufReader::new(file); + let first_line = reader.lines().next().transpose()?; + if let Some(first_line) = first_line { + if regex.is_match(&first_line) && !ids.is_empty() { + let configuration = &self.language_configurations[ids[0]]; + let language = self.language_for_id(configuration.language_id)?; + return Ok(Some((language, configuration))); + } + } + } + + Ok(None) + }) + } + pub fn language_configuration_for_file_name( &self, path: &Path, @@ -224,17 +274,14 @@ impl Loader { if let Some(configuration_ids) = configuration_ids { if !configuration_ids.is_empty() { - let configuration; - - // If there is only one language configuration, then use it. - if configuration_ids.len() == 1 { - configuration = &self.language_configurations[configuration_ids[0]]; + let configuration = if configuration_ids.len() == 1 { + &self.language_configurations[configuration_ids[0]] } // If multiple language configurations match, then determine which // one to use by applying the configurations' content regexes. else { - let file_contents = fs::read(path) - .with_context(|| format!("Failed to read path {:?}", path))?; + let file_contents = + fs::read(path).with_context(|| format!("Failed to read path {path:?}"))?; let file_contents = String::from_utf8_lossy(&file_contents); let mut best_score = -2isize; let mut best_configuration_id = None; @@ -264,8 +311,8 @@ impl Loader { } } - configuration = &self.language_configurations[best_configuration_id.unwrap()]; - } + &self.language_configurations[best_configuration_id.unwrap()] + }; let language = self.language_for_id(configuration.language_id)?; return Ok(Some((language, configuration))); @@ -303,19 +350,22 @@ impl Loader { } fn language_for_id(&self, id: usize) -> Result { - let (path, language) = &self.languages_by_id[id]; + let (path, language, externals) = &self.languages_by_id[id]; language .get_or_try_init(|| { let src_path = path.join("src"); - self.load_language_at_path(&src_path, &src_path) + self.load_language_at_path(&src_path, &[&src_path], externals.as_deref()) }) - .map(|l| *l) + .cloned() } - pub fn load_language_at_path(&self, src_path: &Path, header_path: &Path) -> Result { + pub fn load_language_at_path( + &self, + src_path: &Path, + header_paths: &[&Path], + external_files: Option<&[PathBuf]>, + ) -> Result { let grammar_path = src_path.join("grammar.json"); - let parser_path = src_path.join("parser.c"); - let mut scanner_path = src_path.join("scanner.c"); #[derive(Deserialize)] struct GrammarJSON { @@ -326,178 +376,535 @@ impl Loader { let grammar_json: GrammarJSON = serde_json::from_reader(BufReader::new(&mut grammar_file)) .with_context(|| "Failed to parse grammar.json")?; - let scanner_path = if scanner_path.exists() { - Some(scanner_path) - } else { - scanner_path.set_extension("cc"); - if scanner_path.exists() { - Some(scanner_path) - } else { - None - } - }; - - self.load_language_from_sources( + self.load_language_at_path_with_name( + src_path, + header_paths, &grammar_json.name, - &header_path, - &parser_path, - &scanner_path, + external_files, ) } - pub fn load_language_from_sources( + pub fn load_language_at_path_with_name( &self, + src_path: &Path, + header_paths: &[&Path], name: &str, - header_path: &Path, - parser_path: &Path, - scanner_path: &Option, + external_files: Option<&[PathBuf]>, ) -> Result { let mut lib_name = name.to_string(); + let language_fn_name = format!("tree_sitter_{}", replace_dashes_with_underscores(name)); if self.debug_build { lib_name.push_str(".debug._"); } + + fs::create_dir_all(&self.parser_lib_path)?; + let mut library_path = self.parser_lib_path.join(lib_name); library_path.set_extension(DYLIB_EXTENSION); - let recompile = needs_recompile(&library_path, &parser_path, &scanner_path) + let parser_path = src_path.join("parser.c"); + let scanner_path = self.get_scanner_path(src_path); + + let mut paths_to_check = vec![parser_path.clone()]; + + if let Some(scanner_path) = scanner_path.as_ref() { + paths_to_check.push(scanner_path.clone()); + } + + paths_to_check.extend( + external_files + .unwrap_or_default() + .iter() + .map(|p| src_path.join(p)), + ); + + #[cfg(feature = "wasm")] + if self.wasm_store.lock().unwrap().is_some() { + library_path.set_extension("wasm"); + } + + let mut recompile = needs_recompile(&library_path, &paths_to_check) .with_context(|| "Failed to compare source and binary timestamps")?; - if recompile { - fs::create_dir_all(&self.parser_lib_path)?; - let mut config = cc::Build::new(); - config - .cpp(true) - .opt_level(2) - .cargo_metadata(false) - .target(BUILD_TARGET) - .host(BUILD_TARGET); - let compiler = config.get_compiler(); - let mut command = Command::new(compiler.path()); - for (key, value) in compiler.env() { - command.env(key, value); + #[cfg(feature = "wasm")] + if let Some(wasm_store) = self.wasm_store.lock().unwrap().as_mut() { + if recompile { + self.compile_parser_to_wasm( + name, + src_path, + scanner_path + .as_ref() + .and_then(|p| p.strip_prefix(src_path).ok()), + &library_path, + false, + )?; } - if cfg!(windows) { - command.args(&["/nologo", "/LD", "/I"]).arg(header_path); - if self.debug_build { - command.arg("/Od"); - } else { - command.arg("/O2"); + let wasm_bytes = fs::read(&library_path)?; + return Ok(wasm_store.load_language(name, &wasm_bytes)?); + } + + let lock_path = if env::var("CROSS_RUNNER").is_ok() { + PathBuf::from("/tmp") + .join("tree-sitter") + .join("lock") + .join(format!("{name}.lock")) + } else { + dirs::cache_dir() + .ok_or_else(|| anyhow!("Cannot determine cache directory"))? + .join("tree-sitter") + .join("lock") + .join(format!("{name}.lock")) + }; + + if let Ok(lock_file) = fs::OpenOptions::new().write(true).open(&lock_path) { + recompile = false; + if lock_file.try_lock_exclusive().is_err() { + // if we can't acquire the lock, another process is compiling the parser, wait for it and don't recompile + lock_file.lock_exclusive()?; + recompile = false; + } else { + // if we can acquire the lock, check if the lock file is older than 30 seconds, a + // run that was interrupted and left the lock file behind should not block + // subsequent runs + let time = lock_file.metadata()?.modified()?.elapsed()?.as_secs(); + if time > 30 { + fs::remove_file(&lock_path)?; + recompile = true; } - command.arg(parser_path); - if let Some(scanner_path) = scanner_path.as_ref() { - command.arg(scanner_path); + } + } + + if recompile { + fs::create_dir_all(lock_path.parent().unwrap()).with_context(|| { + format!( + "Failed to create directory {:?}", + lock_path.parent().unwrap() + ) + })?; + let lock_file = fs::OpenOptions::new() + .create(true) + .truncate(true) + .write(true) + .open(&lock_path)?; + lock_file.lock_exclusive()?; + + self.compile_parser_to_dylib( + header_paths, + &parser_path, + scanner_path.as_deref(), + &library_path, + &lock_file, + &lock_path, + )?; + + if scanner_path.is_some() { + self.check_external_scanner(name, &library_path)?; + } + } + + let library = unsafe { Library::new(&library_path) } + .with_context(|| format!("Error opening dynamic library {library_path:?}"))?; + let language = unsafe { + let language_fn = library + .get:: Language>>(language_fn_name.as_bytes()) + .with_context(|| format!("Failed to load symbol {language_fn_name}"))?; + language_fn() + }; + mem::forget(library); + Ok(language) + } + + fn compile_parser_to_dylib( + &self, + header_paths: &[&Path], + parser_path: &Path, + scanner_path: Option<&Path>, + library_path: &Path, + lock_file: &fs::File, + lock_path: &Path, + ) -> Result<(), Error> { + let mut config = cc::Build::new(); + config + .cpp(true) + .opt_level(2) + .cargo_metadata(false) + .cargo_warnings(false) + .target(BUILD_TARGET) + .host(BUILD_TARGET) + .flag_if_supported("-Werror=implicit-function-declaration"); + let compiler = config.get_compiler(); + let mut command = Command::new(compiler.path()); + for (key, value) in compiler.env() { + command.env(key, value); + } + + if compiler.is_like_msvc() { + command.args(["/nologo", "/LD"]); + + for path in header_paths { + command.arg(format!("/I{}", path.to_string_lossy())); + } + + if self.debug_build { + command.arg("/Od"); + } else { + command.arg("/O2"); + } + command.arg(parser_path); + + if let Some(scanner_path) = scanner_path.as_ref() { + if scanner_path.extension() != Some("c".as_ref()) { + eprintln!("Warning: Using a C++ scanner is now deprecated. Please migrate your scanner code to C, as C++ support will be removed in the near future."); } - command - .arg("/link") - .arg(format!("/out:{}", library_path.to_str().unwrap())); + + command.arg(scanner_path); + } + command + .arg("/link") + .arg(format!("/out:{}", library_path.to_str().unwrap())); + } else { + command + .arg("-shared") + .arg("-fno-exceptions") + .arg("-g") + .arg("-o") + .arg(library_path); + + for path in header_paths { + command.arg(format!("-I{}", path.to_string_lossy())); + } + + if !cfg!(windows) { + command.arg("-fPIC"); + } + + if self.debug_build { + command.arg("-O0"); } else { - command - .arg("-shared") - .arg("-fPIC") - .arg("-fno-exceptions") - .arg("-g") - .arg("-I") - .arg(header_path) - .arg("-o") - .arg(&library_path); - - if self.debug_build { - command.arg("-O0"); + command.arg("-O2"); + } + + if let Some(scanner_path) = scanner_path.as_ref() { + if scanner_path.extension() == Some("c".as_ref()) { + command.arg("-xc").arg("-std=c11").arg(scanner_path); } else { - command.arg("-O2"); + eprintln!("Warning: Using a C++ scanner is now deprecated. Please migrate your scanner code to C, as C++ support will be removed in the near future."); + command.arg(scanner_path); } + } + command.arg("-xc").arg(parser_path); + } - // For conditional compilation of external scanner code when - // used internally by `tree-siteer parse` and other sub commands. - command.arg("-DTREE_SITTER_INTERNAL_BUILD"); + // For conditional compilation of external scanner code when + // used internally by `tree-sitter parse` and other sub commands. + command.arg("-DTREE_SITTER_INTERNAL_BUILD"); - if let Some(scanner_path) = scanner_path.as_ref() { - if scanner_path.extension() == Some("c".as_ref()) { - command.arg("-xc").arg("-std=c99").arg(scanner_path); - } else { - command.arg(scanner_path); + // Always use the same allocator in the CLI as any scanner, useful for debugging and + // tracking memory leaks in tests. + #[cfg(not(any(target_os = "macos", target_os = "ios")))] + command.arg("-DTREE_SITTER_REUSE_ALLOCATOR"); + + let output = command.output().with_context(|| { + format!("Failed to execute the C compiler with the following command:\n{command:?}") + })?; + + lock_file.unlock()?; + fs::remove_file(lock_path)?; + + if !output.status.success() { + return Err(anyhow!( + "Parser compilation failed.\nStdout: {}\nStderr: {}", + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr) + )); + } + + Ok(()) + } + + #[cfg(unix)] + fn check_external_scanner(&self, name: &str, library_path: &Path) -> Result<()> { + let prefix = if cfg!(target_os = "macos") { "_" } else { "" }; + let mut must_have = vec![ + format!("{prefix}tree_sitter_{name}_external_scanner_create"), + format!("{prefix}tree_sitter_{name}_external_scanner_destroy"), + format!("{prefix}tree_sitter_{name}_external_scanner_serialize"), + format!("{prefix}tree_sitter_{name}_external_scanner_deserialize"), + format!("{prefix}tree_sitter_{name}_external_scanner_scan"), + ]; + + let command = Command::new("nm") + .arg("-W") + .arg("-U") + .arg(library_path) + .output(); + if let Ok(output) = command { + if output.status.success() { + let mut found_non_static = false; + for line in String::from_utf8_lossy(&output.stdout).lines() { + if line.contains(" T ") { + if let Some(function_name) = + line.split_whitespace().collect::>().get(2) + { + if !line.contains("tree_sitter_") { + if !found_non_static { + found_non_static = true; + eprintln!("Warning: Found non-static non-tree-sitter functions in the external scannner"); + } + eprintln!(" `{function_name}`"); + } else { + must_have.retain(|f| f != function_name); + } + } } } - command.arg("-xc").arg(parser_path); + if found_non_static { + eprintln!("Consider making these functions static, they can cause conflicts when another tree-sitter project uses the same function name"); + } + + if !must_have.is_empty() { + let missing = must_have + .iter() + .map(|f| format!(" `{f}`")) + .collect::>() + .join("\n"); + + return Err(anyhow!(format!( + indoc! {" + Missing required functions in the external scanner, parsing won't work without these! + + {} + + You can read more about this at https://tree-sitter.github.io/tree-sitter/creating-parsers#external-scanners + "}, + missing, + ))); + } } + } + + Ok(()) + } + + #[cfg(windows)] + fn check_external_scanner(&self, _name: &str, _library_path: &Path) -> Result<()> { + // TODO: there's no nm command on windows, whoever wants to implement this can and should :) + + // let mut must_have = vec![ + // format!("tree_sitter_{name}_external_scanner_create"), + // format!("tree_sitter_{name}_external_scanner_destroy"), + // format!("tree_sitter_{name}_external_scanner_serialize"), + // format!("tree_sitter_{name}_external_scanner_deserialize"), + // format!("tree_sitter_{name}_external_scanner_scan"), + // ]; + + Ok(()) + } - let output = command - .output() - .with_context(|| "Failed to execute C compiler")?; - if !output.status.success() { - return Err(anyhow!( - "Parser compilation failed.\nStdout: {}\nStderr: {}", - String::from_utf8_lossy(&output.stdout), - String::from_utf8_lossy(&output.stderr) - )); + pub fn compile_parser_to_wasm( + &self, + language_name: &str, + src_path: &Path, + scanner_filename: Option<&Path>, + output_path: &Path, + force_docker: bool, + ) -> Result<(), Error> { + #[derive(PartialEq, Eq)] + enum EmccSource { + Native(PathBuf), + Docker, + Podman, + } + + fn path_of_bin( + name: &str, + test: impl Fn(&Path) -> std::io::Result, + ) -> Option { + let bin_path = which(name).ok()?; + if test(&bin_path).is_ok() { + Some(bin_path) + } else { + None } } - let library = unsafe { Library::new(&library_path) } - .with_context(|| format!("Error opening dynamic library {:?}", &library_path))?; - let language_fn_name = format!("tree_sitter_{}", replace_dashes_with_underscores(name)); - let language = unsafe { - let language_fn: Symbol Language> = library - .get(language_fn_name.as_bytes()) - .with_context(|| format!("Failed to load symbol {}", language_fn_name))?; - language_fn() + // Order of preference: emscripten > docker > podman > error + let source = if force_docker { + None + } else { + path_of_bin(if cfg!(windows) { "emcc.bat" } else { "emcc" }, |p| { + Command::new(p).output() + }) + .map(EmccSource::Native) + } + .or_else(|| { + path_of_bin("docker", |docker| { + // `docker info` should succeed iff the daemon is running + // see https://docs.docker.com/config/daemon/troubleshoot/#check-whether-docker-is-running + Command::new(docker).args(["info"]).output() + }) + .map(|_| EmccSource::Docker) + }) + .or_else(|| { + path_of_bin("podman", |podman| { + Command::new(podman).arg("--version").output() + }) + .map(|_| EmccSource::Podman) + }); + + let Some(cmd) = source else { + return Err(anyhow!( + "You must have either emcc or docker on your PATH to run this command" + )); }; - mem::forget(library); - Ok(language) + + let mut command = match cmd { + EmccSource::Native(emcc_path) => { + let mut command = Command::new(emcc_path); + command.current_dir(src_path); + command + } + + EmccSource::Docker | EmccSource::Podman => { + let mut command = match cmd { + EmccSource::Docker => Command::new("docker"), + EmccSource::Podman => Command::new("podman"), + _ => unreachable!(), + }; + command.args(["run", "--rm"]); + + // Mount the parser directory as a volume + command.args(["--workdir", "/src"]); + + let mut volume_string = OsString::from(&src_path); + volume_string.push(":/src:Z"); + command.args([OsStr::new("--volume"), &volume_string]); + + // In case `docker` is an alias to `podman`, ensure that podman + // mounts the current directory as writable by the container + // user which has the same uid as the host user. Setting the + // podman-specific variable is more reliable than attempting to + // detect whether `docker` is an alias for `podman`. + // see https://docs.podman.io/en/latest/markdown/podman-run.1.html#userns-mode + command.env("PODMAN_USERNS", "keep-id"); + + // Get the current user id so that files created in the docker container will have + // the same owner. + #[cfg(unix)] + { + #[link(name = "c")] + extern "C" { + fn getuid() -> u32; + } + // don't need to set user for podman since PODMAN_USERNS=keep-id is already set + if cmd == EmccSource::Docker { + let user_id = unsafe { getuid() }; + command.args(["--user", &user_id.to_string()]); + } + }; + + // Run `emcc` in a container using the `emscripten-slim` image + command.args([EMSCRIPTEN_TAG, "emcc"]); + command + } + }; + + let output_name = "output.wasm"; + + command.args([ + "-o", + output_name, + "-Os", + "-s", + "WASM=1", + "-s", + "SIDE_MODULE=2", + "-s", + "TOTAL_MEMORY=33554432", + "-s", + "NODEJS_CATCH_EXIT=0", + "-s", + &format!("EXPORTED_FUNCTIONS=[\"_tree_sitter_{language_name}\"]"), + "-fno-exceptions", + "-fvisibility=hidden", + "-I", + ".", + ]); + + if let Some(scanner_filename) = scanner_filename { + if scanner_filename + .extension() + .and_then(|ext| ext.to_str()) + .map_or(false, |ext| ["cc", "cpp"].contains(&ext)) + { + eprintln!("Warning: Using a C++ scanner is now deprecated. Please migrate your scanner code to C, as C++ support will be removed in the near future."); + command.arg("-xc++"); + } + command.arg(scanner_filename); + } + + command.arg("parser.c"); + let status = command + .spawn() + .with_context(|| "Failed to run emcc command")? + .wait()?; + if !status.success() { + return Err(anyhow!("emcc command failed")); + } + + fs::rename(src_path.join(output_name), output_path) + .context("failed to rename wasm output file")?; + + Ok(()) } + #[must_use] pub fn highlight_config_for_injection_string<'a>( &'a self, string: &str, ) -> Option<&'a HighlightConfiguration> { match self.language_configuration_for_injection_string(string) { Err(e) => { - eprintln!( - "Failed to load language for injection string '{}': {}", - string, e - ); + eprintln!("Failed to load language for injection string '{string}': {e}",); None } Ok(None) => None, - Ok(Some((language, configuration))) => match configuration.highlight_config(language) { - Err(e) => { - eprintln!( - "Failed to load property sheet for injection string '{}': {}", - string, e - ); - None + Ok(Some((language, configuration))) => { + match configuration.highlight_config(language, None) { + Err(e) => { + eprintln!( + "Failed to load property sheet for injection string '{string}': {e}", + ); + None + } + Ok(None) => None, + Ok(Some(config)) => Some(config), } - Ok(None) => None, - Ok(Some(config)) => Some(config), - }, + } } } - pub fn find_language_configurations_at_path<'a>( - &'a mut self, + pub fn find_language_configurations_at_path( + &mut self, parser_path: &Path, + set_current_path_config: bool, ) -> Result<&[LanguageConfiguration]> { - #[derive(Deserialize)] + #[derive(Deserialize, Clone, Default)] #[serde(untagged)] enum PathsJSON { + #[default] Empty, Single(String), Multiple(Vec), } - impl Default for PathsJSON { - fn default() -> Self { - PathsJSON::Empty - } - } - impl PathsJSON { fn into_vec(self) -> Option> { match self { - PathsJSON::Empty => None, - PathsJSON::Single(s) => Some(vec![s]), - PathsJSON::Multiple(s) => Some(s), + Self::Empty => None, + Self::Single(s) => Some(vec![s]), + Self::Multiple(s) => Some(s), } } } @@ -523,6 +930,8 @@ impl Loader { locals: PathsJSON, #[serde(default)] tags: PathsJSON, + #[serde(default, rename = "external-files")] + external_files: PathsJSON, } #[derive(Deserialize)] @@ -532,9 +941,14 @@ impl Loader { tree_sitter: Vec, } + #[derive(Deserialize)] + struct GrammarJSON { + name: String, + } + let initial_language_configuration_count = self.language_configurations.len(); - if let Ok(package_json_contents) = fs::read_to_string(&parser_path.join("package.json")) { + if let Ok(package_json_contents) = fs::read_to_string(parser_path.join("package.json")) { let package_json = serde_json::from_str::(&package_json_contents); if let Ok(package_json) = package_json { let language_count = self.languages_by_id.len(); @@ -543,10 +957,17 @@ impl Loader { // the package.json, but defaults to the directory containing the package.json. let language_path = parser_path.join(config_json.path); + let grammar_path = language_path.join("src").join("grammar.json"); + let mut grammar_file = fs::File::open(grammar_path) + .with_context(|| "Failed to read grammar.json")?; + let grammar_json: GrammarJSON = + serde_json::from_reader(BufReader::new(&mut grammar_file)) + .with_context(|| "Failed to parse grammar.json")?; + // Determine if a previous language configuration in this package.json file // already uses the same language. let mut language_id = None; - for (id, (path, _)) in + for (id, (path, _, _)) in self.languages_by_id.iter().enumerate().skip(language_count) { if language_path == *path { @@ -555,38 +976,71 @@ impl Loader { } // If not, add a new language path to the list. - let language_id = language_id.unwrap_or_else(|| { - self.languages_by_id.push((language_path, OnceCell::new())); + let language_id = if let Some(language_id) = language_id { + language_id + } else { + self.languages_by_id.push(( + language_path, + OnceCell::new(), + config_json.external_files.clone().into_vec().map(|files| { + files.into_iter() + .map(|path| { + let path = parser_path.join(path); + // prevent p being above/outside of parser_path + + if path.starts_with(parser_path) { + Ok(path) + } else { + Err(anyhow!("External file path {path:?} is outside of parser directory {parser_path:?}")) + } + }) + .collect::>>() + }).transpose()?, + )); self.languages_by_id.len() - 1 - }); + }; let configuration = LanguageConfiguration { root_path: parser_path.to_path_buf(), + language_name: grammar_json.name.clone(), scope: config_json.scope, language_id, file_types: config_json.file_types.unwrap_or(Vec::new()), - content_regex: Self::regex(config_json.content_regex), - _first_line_regex: Self::regex(config_json.first_line_regex), - injection_regex: Self::regex(config_json.injection_regex), + content_regex: Self::regex(config_json.content_regex.as_deref()), + first_line_regex: Self::regex(config_json.first_line_regex.as_deref()), + injection_regex: Self::regex(config_json.injection_regex.as_deref()), injections_filenames: config_json.injections.into_vec(), locals_filenames: config_json.locals.into_vec(), tags_filenames: config_json.tags.into_vec(), highlights_filenames: config_json.highlights.into_vec(), highlight_config: OnceCell::new(), tags_config: OnceCell::new(), - highlight_names: &*self.highlight_names, + highlight_names: &self.highlight_names, use_all_highlight_names: self.use_all_highlight_names, }; for file_type in &configuration.file_types { self.language_configuration_ids_by_file_type .entry(file_type.to_string()) - .or_insert(Vec::new()) + .or_default() + .push(self.language_configurations.len()); + } + if let Some(first_line_regex) = &configuration.first_line_regex { + self.language_configuration_ids_by_first_line_regex + .entry(first_line_regex.to_string()) + .or_default() .push(self.language_configurations.len()); } self.language_configurations .push(unsafe { mem::transmute(configuration) }); + + if set_current_path_config + && self.language_configuration_in_current_path.is_none() + { + self.language_configuration_in_current_path = + Some(self.language_configurations.len() - 1); + } } } } @@ -594,13 +1048,20 @@ impl Loader { if self.language_configurations.len() == initial_language_configuration_count && parser_path.join("src").join("grammar.json").exists() { + let grammar_path = parser_path.join("src").join("grammar.json"); + let mut grammar_file = + fs::File::open(grammar_path).with_context(|| "Failed to read grammar.json")?; + let grammar_json: GrammarJSON = + serde_json::from_reader(BufReader::new(&mut grammar_file)) + .with_context(|| "Failed to parse grammar.json")?; let configuration = LanguageConfiguration { root_path: parser_path.to_owned(), + language_name: grammar_json.name, language_id: self.languages_by_id.len(), file_types: Vec::new(), scope: None, content_regex: None, - _first_line_regex: None, + first_line_regex: None, injection_regex: None, injections_filenames: None, locals_filenames: None, @@ -608,20 +1069,20 @@ impl Loader { tags_filenames: None, highlight_config: OnceCell::new(), tags_config: OnceCell::new(), - highlight_names: &*self.highlight_names, + highlight_names: &self.highlight_names, use_all_highlight_names: self.use_all_highlight_names, }; self.language_configurations .push(unsafe { mem::transmute(configuration) }); self.languages_by_id - .push((parser_path.to_owned(), OnceCell::new())); + .push((parser_path.to_owned(), OnceCell::new(), None)); } Ok(&self.language_configurations[initial_language_configuration_count..]) } - fn regex(pattern: Option) -> Option { - pattern.and_then(|r| RegexBuilder::new(&r).multi_line(true).build().ok()) + fn regex(pattern: Option<&str>) -> Option { + pattern.and_then(|r| RegexBuilder::new(r).multi_line(true).build().ok()) } pub fn select_language( @@ -633,11 +1094,11 @@ impl Loader { if let Some(scope) = scope { if let Some(config) = self .language_configuration_for_scope(scope) - .with_context(|| format!("Failed to load language for scope '{}'", scope))? + .with_context(|| format!("Failed to load language for scope '{scope}'"))? { Ok(config.0) } else { - return Err(anyhow!("Unknown scope '{}'", scope)); + Err(anyhow!("Unknown scope '{scope}'")) } } else if let Some((lang, _)) = self .language_configuration_for_file_name(path) @@ -649,13 +1110,17 @@ impl Loader { })? { Ok(lang) + } else if let Some(id) = self.language_configuration_in_current_path { + Ok(self.language_for_id(self.language_configurations[id].language_id)?) } else if let Some(lang) = self - .languages_at_path(¤t_dir) + .languages_at_path(current_dir) .with_context(|| "Failed to load language in current directory")? .first() .cloned() { - Ok(lang) + Ok(lang.0) + } else if let Some(lang) = self.language_configuration_for_first_line_regex(path)? { + Ok(lang.0) } else { Err(anyhow!("No language found")) } @@ -664,25 +1129,90 @@ impl Loader { pub fn use_debug_build(&mut self, flag: bool) { self.debug_build = flag; } + + #[cfg(feature = "wasm")] + pub fn use_wasm(&mut self, engine: tree_sitter::wasmtime::Engine) { + *self.wasm_store.lock().unwrap() = Some(tree_sitter::WasmStore::new(engine).unwrap()); + } + + #[must_use] + pub fn get_scanner_path(&self, src_path: &Path) -> Option { + let mut path = src_path.join("scanner.c"); + for extension in ["c", "cc", "cpp"] { + path.set_extension(extension); + if path.exists() { + return Some(path); + } + } + None + } } impl<'a> LanguageConfiguration<'a> { - pub fn highlight_config(&self, language: Language) -> Result> { - return self - .highlight_config + pub fn highlight_config( + &self, + language: Language, + paths: Option<&[String]>, + ) -> Result> { + let (highlights_filenames, injections_filenames, locals_filenames) = match paths { + Some(paths) => ( + Some( + paths + .iter() + .filter(|p| p.ends_with("highlights.scm")) + .cloned() + .collect::>(), + ), + Some( + paths + .iter() + .filter(|p| p.ends_with("tags.scm")) + .cloned() + .collect::>(), + ), + Some( + paths + .iter() + .filter(|p| p.ends_with("locals.scm")) + .cloned() + .collect::>(), + ), + ), + None => (None, None, None), + }; + self.highlight_config .get_or_try_init(|| { - let (highlights_query, highlight_ranges) = - self.read_queries(&self.highlights_filenames, "highlights.scm")?; - let (injections_query, injection_ranges) = - self.read_queries(&self.injections_filenames, "injections.scm")?; - let (locals_query, locals_ranges) = - self.read_queries(&self.locals_filenames, "locals.scm")?; + let (highlights_query, highlight_ranges) = self.read_queries( + if highlights_filenames.is_some() { + highlights_filenames.as_deref() + } else { + self.highlights_filenames.as_deref() + }, + "highlights.scm", + )?; + let (injections_query, injection_ranges) = self.read_queries( + if injections_filenames.is_some() { + injections_filenames.as_deref() + } else { + self.injections_filenames.as_deref() + }, + "injections.scm", + )?; + let (locals_query, locals_ranges) = self.read_queries( + if locals_filenames.is_some() { + locals_filenames.as_deref() + } else { + self.locals_filenames.as_deref() + }, + "locals.scm", + )?; if highlights_query.is_empty() { Ok(None) } else { let mut result = HighlightConfiguration::new( language, + &self.language_name, &highlights_query, &injections_query, &locals_query, @@ -717,25 +1247,26 @@ impl<'a> LanguageConfiguration<'a> { let mut all_highlight_names = self.highlight_names.lock().unwrap(); if self.use_all_highlight_names { for capture_name in result.query.capture_names() { - if !all_highlight_names.contains(capture_name) { - all_highlight_names.push(capture_name.clone()); + if !all_highlight_names.iter().any(|x| x == capture_name) { + all_highlight_names.push((*capture_name).to_string()); } } } - result.configure(&all_highlight_names.as_slice()); + result.configure(all_highlight_names.as_slice()); + drop(all_highlight_names); Ok(Some(result)) } }) - .map(Option::as_ref); + .map(Option::as_ref) } pub fn tags_config(&self, language: Language) -> Result> { self.tags_config .get_or_try_init(|| { let (tags_query, tags_ranges) = - self.read_queries(&self.tags_filenames, "tags.scm")?; + self.read_queries(self.tags_filenames.as_deref(), "tags.scm")?; let (locals_query, locals_ranges) = - self.read_queries(&self.locals_filenames, "locals.scm")?; + self.read_queries(self.locals_filenames.as_deref(), "locals.scm")?; if tags_query.is_empty() { Ok(None) } else { @@ -758,7 +1289,6 @@ impl<'a> LanguageConfiguration<'a> { locals_query.len(), ) } - .into() } else { error.into() } @@ -768,9 +1298,9 @@ impl<'a> LanguageConfiguration<'a> { .map(Option::as_ref) } - fn include_path_in_query_error<'b>( + fn include_path_in_query_error( mut error: QueryError, - ranges: &'b Vec<(String, Range)>, + ranges: &[(String, Range)], source: &str, start_offset: usize, ) -> Error { @@ -778,36 +1308,47 @@ impl<'a> LanguageConfiguration<'a> { let (path, range) = ranges .iter() .find(|(_, range)| range.contains(&offset_within_section)) - .unwrap(); + .unwrap_or_else(|| ranges.last().unwrap()); error.offset = offset_within_section - range.start; error.row = source[range.start..offset_within_section] .chars() .filter(|c| *c == '\n') .count(); - Error::from(error).context(format!("Error in query file {:?}", path)) + Error::from(error).context(format!("Error in query file {path:?}")) } + #[allow(clippy::type_complexity)] fn read_queries( &self, - paths: &Option>, + paths: Option<&[String]>, default_path: &str, ) -> Result<(String, Vec<(String, Range)>)> { let mut query = String::new(); let mut path_ranges = Vec::new(); - if let Some(paths) = paths.as_ref() { + if let Some(paths) = paths { for path in paths { let abs_path = self.root_path.join(path); let prev_query_len = query.len(); query += &fs::read_to_string(&abs_path) - .with_context(|| format!("Failed to read query file {:?}", path))?; + .with_context(|| format!("Failed to read query file {path:?}"))?; path_ranges.push((path.clone(), prev_query_len..query.len())); } } else { + // highlights.scm is needed to test highlights, and tags.scm to test tags + if default_path == "highlights.scm" || default_path == "tags.scm" { + eprintln!( + indoc! {" + Warning: you should add a `{}` entry pointing to the highlights path in `tree-sitter` language list in the grammar's package.json + See more here: https://tree-sitter.github.io/tree-sitter/syntax-highlighting#query-paths + "}, + default_path.replace(".scm", "") + ); + } let queries_path = self.root_path.join("queries"); let path = queries_path.join(default_path); if path.exists() { query = fs::read_to_string(&path) - .with_context(|| format!("Failed to read query file {:?}", path))?; + .with_context(|| format!("Failed to read query file {path:?}"))?; path_ranges.push((default_path.to_string(), 0..query.len())); } } @@ -816,20 +1357,14 @@ impl<'a> LanguageConfiguration<'a> { } } -fn needs_recompile( - lib_path: &Path, - parser_c_path: &Path, - scanner_path: &Option, -) -> Result { +fn needs_recompile(lib_path: &Path, paths_to_check: &[PathBuf]) -> Result { if !lib_path.exists() { return Ok(true); } - let lib_mtime = mtime(lib_path)?; - if mtime(parser_c_path)? > lib_mtime { - return Ok(true); - } - if let Some(scanner_path) = scanner_path { - if mtime(scanner_path)? > lib_mtime { + let lib_mtime = + mtime(lib_path).with_context(|| format!("Failed to read mtime of {lib_path:?}"))?; + for path in paths_to_check { + if mtime(path)? > lib_mtime { return Ok(true); } } diff --git a/third-party/tree-sitter/tree-sitter/cli/npm/.gitignore b/third-party/tree-sitter/tree-sitter/cli/npm/.gitignore index 942b33a180..65e04cffcb 100644 --- a/third-party/tree-sitter/tree-sitter/cli/npm/.gitignore +++ b/third-party/tree-sitter/tree-sitter/cli/npm/.gitignore @@ -3,3 +3,4 @@ tree-sitter.exe *.gz *.tgz LICENSE +README.md diff --git a/third-party/tree-sitter/tree-sitter/cli/npm/dsl.d.ts b/third-party/tree-sitter/tree-sitter/cli/npm/dsl.d.ts index f2ee57f105..63f9ed493d 100644 --- a/third-party/tree-sitter/tree-sitter/cli/npm/dsl.d.ts +++ b/third-party/tree-sitter/tree-sitter/cli/npm/dsl.d.ts @@ -1,19 +1,19 @@ -type AliasRule = {type: 'ALIAS'; named: boolean; content: Rule; value: string}; -type BlankRule = {type: 'BLANK'}; -type ChoiceRule = {type: 'CHOICE'; members: Rule[]}; -type FieldRule = {type: 'FIELD'; name: string; content: Rule}; -type ImmediateTokenRule = {type: 'IMMEDIATE_TOKEN'; content: Rule}; -type PatternRule = {type: 'PATTERN'; value: string}; -type PrecDynamicRule = {type: 'PREC_DYNAMIC'; content: Rule; value: number}; -type PrecLeftRule = {type: 'PREC_LEFT'; content: Rule; value: number}; -type PrecRightRule = {type: 'PREC_RIGHT'; content: Rule; value: number}; -type PrecRule = {type: 'PREC'; content: Rule; value: number}; -type Repeat1Rule = {type: 'REPEAT1'; content: Rule}; -type RepeatRule = {type: 'REPEAT'; content: Rule}; -type SeqRule = {type: 'SEQ'; members: Rule[]}; -type StringRule = {type: 'STRING'; value: string}; -type SymbolRule = {type: 'SYMBOL'; name: Name}; -type TokenRule = {type: 'TOKEN'; content: Rule}; +type AliasRule = { type: 'ALIAS'; named: boolean; content: Rule; value: string }; +type BlankRule = { type: 'BLANK' }; +type ChoiceRule = { type: 'CHOICE'; members: Rule[] }; +type FieldRule = { type: 'FIELD'; name: string; content: Rule }; +type ImmediateTokenRule = { type: 'IMMEDIATE_TOKEN'; content: Rule }; +type PatternRule = { type: 'PATTERN'; value: string }; +type PrecDynamicRule = { type: 'PREC_DYNAMIC'; content: Rule; value: number }; +type PrecLeftRule = { type: 'PREC_LEFT'; content: Rule; value: number }; +type PrecRightRule = { type: 'PREC_RIGHT'; content: Rule; value: number }; +type PrecRule = { type: 'PREC'; content: Rule; value: number }; +type Repeat1Rule = { type: 'REPEAT1'; content: Rule }; +type RepeatRule = { type: 'REPEAT'; content: Rule }; +type SeqRule = { type: 'SEQ'; members: Rule[] }; +type StringRule = { type: 'STRING'; value: string }; +type SymbolRule = { type: 'SYMBOL'; name: Name }; +type TokenRule = { type: 'TOKEN'; content: Rule }; type Rule = | AliasRule @@ -42,14 +42,15 @@ type GrammarSymbols = { type RuleBuilder = ( $: GrammarSymbols, + previous: Rule, ) => RuleOrLiteral; type RuleBuilders< RuleName extends string, BaseGrammarRuleName extends string > = { - [name in RuleName]: RuleBuilder; -}; + [name in RuleName]: RuleBuilder; + }; interface Grammar< RuleName extends string, @@ -68,11 +69,17 @@ interface Grammar< rules: Rules; /** - * An array of arrays of precedence names. Each inner array represents - * a *descending* ordering. Names listed earlier in one of these arrays - * have higher precedence than any names listed later in the same array. + * An array of arrays of precedence names or rules. Each inner array represents + * a *descending* ordering. Names/rules listed earlier in one of these arrays + * have higher precedence than any names/rules listed later in the same array. + * + * Using rules is just a shorthand way for using a name then calling prec() + * with that name. It is just a convenience. */ - precedences?: () => String[][], + precedences?: ( + $: GrammarSymbols, + previous: Rule[][], + ) => RuleOrLiteral[][], /** * An array of arrays of rule names. Each inner array represents a set of @@ -86,6 +93,7 @@ interface Grammar< */ conflicts?: ( $: GrammarSymbols, + previous: Rule[][], ) => RuleOrLiteral[][]; /** @@ -102,7 +110,7 @@ interface Grammar< externals?: ( $: Record>, previous: Rule[], - ) => SymbolRule[]; + ) => RuleOrLiteral[]; /** * An array of tokens that may appear anywhere in the language. This @@ -126,6 +134,7 @@ interface Grammar< */ inline?: ( $: GrammarSymbols, + previous: Rule[], ) => RuleOrLiteral[]; /** @@ -134,10 +143,11 @@ interface Grammar< * * @param $ grammar rules * - * @see http://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types + * @see https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types */ supertypes?: ( $: GrammarSymbols, + previous: Rule[], ) => RuleOrLiteral[]; /** @@ -153,8 +163,8 @@ interface Grammar< type GrammarSchema = { [K in keyof Grammar]: K extends 'rules' - ? Record - : Grammar[K]; + ? Record + : Grammar[K]; }; /** diff --git a/third-party/tree-sitter/tree-sitter/cli/npm/install.js b/third-party/tree-sitter/tree-sitter/cli/npm/install.js index 2790b47d78..b008947cba 100644 --- a/third-party/tree-sitter/tree-sitter/cli/npm/install.js +++ b/third-party/tree-sitter/tree-sitter/cli/npm/install.js @@ -6,25 +6,43 @@ const http = require('http'); const https = require('https'); const packageJSON = require('./package.json'); -// Determine the URL of the file. -const platformName = { - 'darwin': 'macos', - 'linux': 'linux', - 'win32': 'windows' -}[process.platform]; - -let archName = { - 'x64': 'x64', - 'x86': 'x86', - 'ia32': 'x86' -}[process.arch]; - -// ARM macs can run x64 binaries via Rosetta. Rely on that for now. -if (platformName === 'macos' && process.arch === 'arm64') { - archName = 'x64'; +// Look to a results table in https://github.com/tree-sitter/tree-sitter/issues/2196 +const matrix = { + platform: { + 'darwin': { + name: 'macos', + arch: { + 'arm64': { name: 'arm64' }, + 'x64': { name: 'x64' }, + } + }, + 'linux': { + name: 'linux', + arch: { + 'arm64': { name: 'arm64' }, + 'arm': { name: 'arm' }, + 'x64': { name: 'x64' }, + 'x86': { name: 'x86' }, + 'ppc64': { name: 'powerpc64' }, + } + }, + 'win32': { + name: 'windows', + arch: { + 'arm64': { name: 'arm64' }, + 'x64': { name: 'x64' }, + 'x86': { name: 'x86' }, + 'ia32': { name: 'x86' }, + } + }, + }, } -if (!platformName || !archName) { +// Determine the URL of the file. +const platform = matrix.platform[process.platform]; +const arch = platform && platform.arch[process.arch]; + +if (!platform || !platform.name || !arch || !arch.name) { console.error( `Cannot install tree-sitter-cli for platform ${process.platform}, architecture ${process.arch}` ); @@ -32,7 +50,7 @@ if (!platformName || !archName) { } const releaseURL = `https://github.com/tree-sitter/tree-sitter/releases/download/v${packageJSON.version}`; -const assetName = `tree-sitter-${platformName}-${archName}.gz`; +const assetName = `tree-sitter-${platform.name}-${arch.name}.gz`; const assetURL = `${releaseURL}/${assetName}`; // Remove previously-downloaded files. @@ -65,29 +83,42 @@ file.on('finish', () => { // Follow redirects. function get(url, callback) { - const requestUrl = new URL(url) - let request = https - let requestConfig = requestUrl - const proxyEnv = process.env['HTTPS_PROXY'] || process.env['https_proxy'] - - if (proxyEnv) { - const proxyUrl = new URL(proxyEnv) - request = proxyUrl.protocol === 'https:' ? https : http - requestConfig = { - hostname: proxyUrl.hostname, - port: proxyUrl.port, - path: requestUrl.toString(), - headers: { - Host: requestUrl.hostname - } - } - } - - request.get(requestConfig, response => { + const processResponse = (response) => { if (response.statusCode === 301 || response.statusCode === 302) { get(response.headers.location, callback); } else { callback(response); } - }); + }; + + const proxyEnv = process.env['HTTPS_PROXY'] || process.env['https_proxy']; + if (!proxyEnv) { + https.get(url, processResponse); + return; + } + + const requestUrl = new URL(url); + const requestPort = requestUrl.port || (requestUrl.protocol === 'https:' ? 443 : 80); + const proxyUrl = new URL(proxyEnv); + const request = proxyUrl.protocol === 'https:' ? https : http; + request.request({ + host: proxyUrl.hostname, + port: proxyUrl.port || (proxyUrl.protocol === 'https:' ? 443 : 80), + method: 'CONNECT', + path: `${requestUrl.hostname}:${requestPort}`, + }).on('connect', (response, socket, _head) => { + if (response.statusCode !== 200) { + // let caller handle error + callback(response); + return; + } + + const agent = https.Agent({ socket }); + https.get({ + host: requestUrl.host, + port: requestPort, + path: `${requestUrl.pathname}${requestUrl.search}`, + agent, + }, processResponse); + }).end(); } diff --git a/third-party/tree-sitter/tree-sitter/cli/npm/package.json b/third-party/tree-sitter/tree-sitter/cli/npm/package.json index 02309193fb..5868401f8d 100644 --- a/third-party/tree-sitter/tree-sitter/cli/npm/package.json +++ b/third-party/tree-sitter/tree-sitter/cli/npm/package.json @@ -1,11 +1,11 @@ { "name": "tree-sitter-cli", - "version": "0.20.8", + "version": "0.22.1", "author": "Max Brunsfeld", "license": "MIT", "repository": { "type": "git", - "url": "http://github.com/tree-sitter/tree-sitter.git" + "url": "https://github.com/tree-sitter/tree-sitter.git" }, "description": "CLI for generating fast incremental parsers", "keywords": [ @@ -15,7 +15,8 @@ "main": "lib/api/index.js", "scripts": { "install": "node install.js", - "prepack": "cp ../../LICENSE ." + "prepack": "cp ../../LICENSE ../README.md .", + "postpack": "rm LICENSE README.md" }, "bin": { "tree-sitter": "cli.js" diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/binding_files.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/binding_files.rs deleted file mode 100644 index 4241b61660..0000000000 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/binding_files.rs +++ /dev/null @@ -1,154 +0,0 @@ -use super::write_file; -use anyhow::{Context, Result}; -use std::path::{Path, PathBuf}; -use std::{fs, str}; - -const BINDING_CC_TEMPLATE: &'static str = include_str!("./templates/binding.cc"); -const BINDING_GYP_TEMPLATE: &'static str = include_str!("./templates/binding.gyp"); -const INDEX_JS_TEMPLATE: &'static str = include_str!("./templates/index.js"); -const LIB_RS_TEMPLATE: &'static str = include_str!("./templates/lib.rs"); -const BUILD_RS_TEMPLATE: &'static str = include_str!("./templates/build.rs"); -const CARGO_TOML_TEMPLATE: &'static str = include_str!("./templates/cargo.toml"); -const PACKAGE_JSON_TEMPLATE: &'static str = include_str!("./templates/package.json"); -const PARSER_NAME_PLACEHOLDER: &'static str = "PARSER_NAME"; -const CLI_VERSION_PLACEHOLDER: &'static str = "CLI_VERSION"; -const CLI_VERSION: &'static str = env!("CARGO_PKG_VERSION"); -const RUST_BINDING_VERSION: &'static str = env!("RUST_BINDING_VERSION"); -const RUST_BINDING_VERSION_PLACEHOLDER: &'static str = "RUST_BINDING_VERSION"; - -pub fn generate_binding_files(repo_path: &Path, language_name: &str) -> Result<()> { - let bindings_dir = repo_path.join("bindings"); - - let dashed_language_name = language_name.replace("_", "-"); - let dashed_language_name = dashed_language_name.as_str(); - - // Generate rust bindings if needed. - let rust_binding_dir = bindings_dir.join("rust"); - create_path(&rust_binding_dir, |path| create_dir(path))?; - - create_path(&rust_binding_dir.join("lib.rs").to_owned(), |path| { - generate_file(path, LIB_RS_TEMPLATE, language_name) - })?; - - create_path(&rust_binding_dir.join("build.rs").to_owned(), |path| { - generate_file(path, BUILD_RS_TEMPLATE, language_name) - })?; - - create_path(&repo_path.join("Cargo.toml").to_owned(), |path| { - generate_file(path, CARGO_TOML_TEMPLATE, dashed_language_name) - })?; - - // Generate node bindings - let node_binding_dir = bindings_dir.join("node"); - create_path(&node_binding_dir, |path| create_dir(path))?; - - create_path(&node_binding_dir.join("index.js").to_owned(), |path| { - generate_file(path, INDEX_JS_TEMPLATE, language_name) - })?; - - create_path(&node_binding_dir.join("binding.cc").to_owned(), |path| { - generate_file(path, BINDING_CC_TEMPLATE, language_name) - })?; - - // Create binding.gyp, or update it with new binding path. - let binding_gyp_path = repo_path.join("binding.gyp"); - create_path_else( - &binding_gyp_path, - |path| generate_file(path, BINDING_GYP_TEMPLATE, language_name), - |path| { - let binding_gyp = - fs::read_to_string(path).with_context(|| "Failed to read binding.gyp")?; - let old_path = "\"src/binding.cc\""; - if binding_gyp.contains(old_path) { - eprintln!("Updating binding.gyp with new binding path"); - let binding_gyp = binding_gyp.replace(old_path, "\"bindings/node/binding.cc\""); - write_file(path, binding_gyp)?; - } - Ok(()) - }, - )?; - - // Create package.json, or update it with new binding path. - let package_json_path = repo_path.join("package.json"); - create_path_else( - &package_json_path, - |path| generate_file(path, PACKAGE_JSON_TEMPLATE, dashed_language_name), - |path| { - let package_json_str = - fs::read_to_string(path).with_context(|| "Failed to read package.json")?; - let mut package_json = - serde_json::from_str::>( - &package_json_str, - ) - .with_context(|| "Failed to parse package.json")?; - let package_json_main = package_json.get("main"); - let package_json_needs_update = package_json_main.map_or(true, |v| { - let main_string = v.as_str(); - main_string == Some("index.js") || main_string == Some("./index.js") - }); - if package_json_needs_update { - eprintln!("Updating package.json with new binding path"); - package_json.insert( - "main".to_string(), - serde_json::Value::String("bindings/node".to_string()), - ); - let mut package_json_str = serde_json::to_string_pretty(&package_json)?; - package_json_str.push('\n'); - write_file(path, package_json_str)?; - } - Ok(()) - }, - )?; - - // Remove files from old node binding paths. - let old_index_js_path = repo_path.join("index.js"); - let old_binding_cc_path = repo_path.join("src").join("binding.cc"); - if old_index_js_path.exists() { - fs::remove_file(old_index_js_path).ok(); - } - if old_binding_cc_path.exists() { - fs::remove_file(old_binding_cc_path).ok(); - } - - Ok(()) -} - -fn generate_file(path: &Path, template: &str, language_name: &str) -> Result<()> { - write_file( - path, - template - .replace(PARSER_NAME_PLACEHOLDER, language_name) - .replace(CLI_VERSION_PLACEHOLDER, CLI_VERSION) - .replace(RUST_BINDING_VERSION_PLACEHOLDER, RUST_BINDING_VERSION), - ) -} - -fn create_dir(path: &Path) -> Result<()> { - fs::create_dir_all(&path) - .with_context(|| format!("Failed to create {:?}", path.to_string_lossy())) -} - -fn create_path(path: &PathBuf, action: F) -> Result -where - F: Fn(&PathBuf) -> Result<()>, -{ - if !path.exists() { - action(path)?; - return Ok(true); - } - Ok(false) -} - -fn create_path_else(path: &PathBuf, action: T, else_action: F) -> Result -where - T: Fn(&PathBuf) -> Result<()>, - F: Fn(&PathBuf) -> Result<()>, -{ - if !path.exists() { - action(path)?; - return Ok(true); - } else { - else_action(path)?; - } - Ok(false) -} diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/build_lex_table.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/build_lex_table.rs index d3ebb2419a..bc65447c6d 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/build_lex_table.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/build_lex_table.rs @@ -10,7 +10,7 @@ use std::collections::hash_map::Entry; use std::collections::{HashMap, VecDeque}; use std::mem; -pub(crate) fn build_lex_table( +pub fn build_lex_table( parse_table: &mut ParseTable, syntax_grammar: &SyntaxGrammar, lexical_grammar: &LexicalGrammar, @@ -18,23 +18,22 @@ pub(crate) fn build_lex_table( coincident_token_index: &CoincidentTokenIndex, token_conflict_map: &TokenConflictMap, ) -> (LexTable, LexTable) { - let keyword_lex_table; - if syntax_grammar.word_token.is_some() { + let keyword_lex_table = if syntax_grammar.word_token.is_some() { let mut builder = LexTableBuilder::new(lexical_grammar); builder.add_state_for_tokens(keywords); - keyword_lex_table = builder.table; + builder.table } else { - keyword_lex_table = LexTable::default(); - } + LexTable::default() + }; - let mut parse_state_ids_by_token_set: Vec<(TokenSet, Vec)> = Vec::new(); + let mut parse_state_ids_by_token_set = Vec::<(TokenSet, Vec)>::new(); for (i, state) in parse_table.states.iter().enumerate() { let tokens = state .terminal_entries .keys() .filter_map(|token| { if token.is_terminal() { - if keywords.contains(&token) { + if keywords.contains(token) { syntax_grammar.word_token } else { Some(*token) @@ -48,7 +47,7 @@ pub(crate) fn build_lex_table( .collect(); let mut did_merge = false; - for entry in parse_state_ids_by_token_set.iter_mut() { + for entry in &mut parse_state_ids_by_token_set { if merge_token_set( &mut entry.0, &tokens, @@ -198,7 +197,7 @@ impl<'a> LexTableBuilder<'a> { for transition in transitions { if let Some((completed_id, completed_precedence)) = completion { if !TokenConflictMap::prefer_transition( - &self.lexical_grammar, + self.lexical_grammar, &transition, completed_id, completed_precedence, @@ -248,12 +247,11 @@ fn merge_token_set( { return false; } - if !coincident_token_index.contains(symbol, existing_token) { - if token_conflict_map.does_overlap(existing_token.index, i) - || token_conflict_map.does_overlap(i, existing_token.index) - { - return false; - } + if !coincident_token_index.contains(symbol, existing_token) + && (token_conflict_map.does_overlap(existing_token.index, i) + || token_conflict_map.does_overlap(i, existing_token.index)) + { + return false; } } } @@ -315,7 +313,7 @@ fn minimize_lex_table(table: &mut LexTable, parse_table: &mut ParseTable) { let mut new_state = LexState::default(); mem::swap(&mut new_state, &mut table.states[state_ids[0]]); - for (_, advance_action) in new_state.advance_actions.iter_mut() { + for (_, advance_action) in &mut new_state.advance_actions { advance_action.state = group_ids_by_state_id[advance_action.state]; } if let Some(eof_action) = &mut new_state.eof_action { @@ -324,18 +322,14 @@ fn minimize_lex_table(table: &mut LexTable, parse_table: &mut ParseTable) { new_states.push(new_state); } - for state in parse_table.states.iter_mut() { + for state in &mut parse_table.states { state.lex_state_id = group_ids_by_state_id[state.lex_state_id]; } table.states = new_states; } -fn lex_states_differ( - left: &LexState, - right: &LexState, - group_ids_by_state_id: &Vec, -) -> bool { +fn lex_states_differ(left: &LexState, right: &LexState, group_ids_by_state_id: &[usize]) -> bool { left.advance_actions .iter() .zip(right.advance_actions.iter()) @@ -362,7 +356,7 @@ fn sort_states(table: &mut LexTable, parse_table: &mut ParseTable) { .map(|old_id| { let mut state = LexState::default(); mem::swap(&mut state, &mut table.states[*old_id]); - for (_, advance_action) in state.advance_actions.iter_mut() { + for (_, advance_action) in &mut state.advance_actions { advance_action.state = new_ids_by_old_id[advance_action.state]; } if let Some(eof_action) = &mut state.eof_action { @@ -373,7 +367,7 @@ fn sort_states(table: &mut LexTable, parse_table: &mut ParseTable) { .collect(); // Update the parse table's lex state references - for state in parse_table.states.iter_mut() { + for state in &mut parse_table.states { state.lex_state_id = new_ids_by_old_id[state.lex_state_id]; } } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/build_parse_table.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/build_parse_table.rs index 10320263a9..b9b78966d4 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/build_parse_table.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/build_parse_table.rs @@ -25,7 +25,7 @@ use rustc_hash::FxHasher; type SymbolSequence = Vec; type AuxiliarySymbolSequence = Vec; -pub(crate) type ParseStateInfo<'a> = (SymbolSequence, ParseItemSet<'a>); +pub type ParseStateInfo<'a> = (SymbolSequence, ParseItemSet<'a>); #[derive(Clone)] struct AuxiliarySymbolInfo { @@ -51,12 +51,13 @@ struct ParseTableBuilder<'a> { item_set_builder: ParseItemSetBuilder<'a>, syntax_grammar: &'a SyntaxGrammar, lexical_grammar: &'a LexicalGrammar, - variable_info: &'a Vec, + variable_info: &'a [VariableInfo], core_ids_by_core: HashMap, usize>, state_ids_by_item_set: IndexMap, ParseStateId, BuildHasherDefault>, parse_state_info_by_id: Vec>, parse_state_queue: VecDeque, non_terminal_extra_states: Vec<(Symbol, usize)>, + actual_conflicts: HashSet>, parse_table: ParseTable, } @@ -74,14 +75,10 @@ impl<'a> ParseTableBuilder<'a> { self.add_parse_state( &Vec::new(), &Vec::new(), - ParseItemSet::with( - [( - ParseItem::start(), - [Symbol::end()].iter().cloned().collect(), - )] - .iter() - .cloned(), - ), + ParseItemSet::with(std::iter::once(( + ParseItem::start(), + std::iter::once(&Symbol::end()).copied().collect(), + ))), ); // Compute the possible item sets for non-terminal extras. @@ -96,7 +93,7 @@ impl<'a> ParseTableBuilder<'a> { for production in &variable.productions { non_terminal_extra_item_sets_by_first_terminal .entry(production.first_symbol().unwrap()) - .or_insert(ParseItemSet::default()) + .or_insert_with(ParseItemSet::default) .insert( ParseItem { variable_index: extra_non_terminal.index as u32, @@ -104,9 +101,8 @@ impl<'a> ParseTableBuilder<'a> { step_index: 1, has_preceding_inherited_fields: false, }, - &[Symbol::end_of_nonterminal_extra()] - .iter() - .cloned() + &std::iter::once(&Symbol::end_of_nonterminal_extra()) + .copied() .collect(), ); } @@ -128,10 +124,24 @@ impl<'a> ParseTableBuilder<'a> { self.parse_state_info_by_id[entry.state_id].0.clone(), entry.preceding_auxiliary_symbols, entry.state_id, - item_set, + &item_set, )?; } + if !self.actual_conflicts.is_empty() { + println!("Warning: unnecessary conflicts"); + for conflict in &self.actual_conflicts { + println!( + " {}", + conflict + .iter() + .map(|symbol| format!("`{}`", self.symbol_name(symbol))) + .collect::>() + .join(", ") + ); + } + } + Ok((self.parse_table, self.parse_state_info_by_id)) } @@ -180,7 +190,7 @@ impl<'a> ParseTableBuilder<'a> { mut preceding_symbols: SymbolSequence, mut preceding_auxiliary_symbols: Vec, state_id: ParseStateId, - item_set: ParseItemSet<'a>, + item_set: &ParseItemSet<'a>, ) -> Result<()> { let mut terminal_successors = BTreeMap::new(); let mut non_terminal_successors = BTreeMap::new(); @@ -203,7 +213,7 @@ impl<'a> ParseTableBuilder<'a> { // for conflict resolution. if variable.is_auxiliary() { preceding_auxiliary_symbols - .push(self.get_auxiliary_node_info(&item_set, next_symbol)); + .push(self.get_auxiliary_node_info(item_set, next_symbol)); } // For most parse items, the symbols associated with the preceding children @@ -223,12 +233,12 @@ impl<'a> ParseTableBuilder<'a> { non_terminal_successors .entry(next_symbol) - .or_insert_with(|| ParseItemSet::default()) + .or_insert_with(ParseItemSet::default) .insert(successor, lookaheads); } else { terminal_successors .entry(next_symbol) - .or_insert_with(|| ParseItemSet::default()) + .or_insert_with(ParseItemSet::default) .insert(successor, lookaheads); } } @@ -253,7 +263,7 @@ impl<'a> ParseTableBuilder<'a> { let table_entry = self.parse_table.states[state_id] .terminal_entries .entry(lookahead) - .or_insert_with(|| ParseTableEntry::new()); + .or_insert_with(ParseTableEntry::new); let reduction_info = reduction_infos.entry(lookahead).or_default(); // While inserting Reduce actions, eagerly resolve conflicts related @@ -263,7 +273,7 @@ impl<'a> ParseTableBuilder<'a> { table_entry.actions.push(action); } else { match Self::compare_precedence( - &self.syntax_grammar, + self.syntax_grammar, precedence, &[symbol], &reduction_info.precedence, @@ -296,7 +306,7 @@ impl<'a> ParseTableBuilder<'a> { } } - // Having computed the the successor item sets for each symbol, add a new + // Having computed the successor item sets for each symbol, add a new // parse state for each of these item sets, and add a corresponding Shift // action to this state. for (symbol, next_item_set) in terminal_successors { @@ -318,7 +328,7 @@ impl<'a> ParseTableBuilder<'a> { } entry - .or_insert_with(|| ParseTableEntry::new()) + .or_insert_with(ParseTableEntry::new) .actions .push(ParseAction::Shift { state: next_state_id, @@ -346,7 +356,7 @@ impl<'a> ParseTableBuilder<'a> { // * fail, terminating the parser generation process for symbol in lookaheads_with_conflicts.iter() { self.handle_conflict( - &item_set, + item_set, state_id, &preceding_symbols, &preceding_auxiliary_symbols, @@ -429,7 +439,7 @@ impl<'a> ParseTableBuilder<'a> { item_set: &ParseItemSet, state_id: ParseStateId, preceding_symbols: &SymbolSequence, - preceding_auxiliary_symbols: &Vec, + preceding_auxiliary_symbols: &[AuxiliarySymbolInfo], conflicting_lookahead: Symbol, reduction_info: &ReductionInfo, ) -> Result<()> { @@ -445,33 +455,31 @@ impl<'a> ParseTableBuilder<'a> { // REDUCE-REDUCE conflicts where all actions have the *same* // precedence, and there can still be SHIFT/REDUCE conflicts. let mut considered_associativity = false; - let mut shift_precedence: Vec<(&Precedence, Symbol)> = Vec::new(); + let mut shift_precedence = Vec::<(&Precedence, Symbol)>::new(); let mut conflicting_items = HashSet::new(); for (item, lookaheads) in &item_set.entries { if let Some(step) = item.step() { - if item.step_index > 0 { - if self + if item.step_index > 0 + && self .item_set_builder .first_set(&step.symbol) .contains(&conflicting_lookahead) - { - if item.variable_index != u32::MAX { - conflicting_items.insert(item); - } + { + if item.variable_index != u32::MAX { + conflicting_items.insert(item); + } - let p = ( - item.precedence(), - Symbol::non_terminal(item.variable_index as usize), - ); - if let Err(i) = shift_precedence.binary_search(&p) { - shift_precedence.insert(i, p); - } + let p = ( + item.precedence(), + Symbol::non_terminal(item.variable_index as usize), + ); + if let Err(i) = shift_precedence.binary_search(&p) { + shift_precedence.insert(i, p); } } - } else if lookaheads.contains(&conflicting_lookahead) { - if item.variable_index != u32::MAX { - conflicting_items.insert(item); - } + } else if lookaheads.contains(&conflicting_lookahead) && item.variable_index != u32::MAX + { + conflicting_items.insert(item); } } @@ -497,7 +505,7 @@ impl<'a> ParseTableBuilder<'a> { let mut shift_is_more = false; for p in shift_precedence { match Self::compare_precedence( - &self.syntax_grammar, + self.syntax_grammar, p.0, &[p.1], &reduction_info.precedence, @@ -582,6 +590,7 @@ impl<'a> ParseTableBuilder<'a> { .expected_conflicts .contains(&actual_conflict) { + self.actual_conflicts.remove(&actual_conflict); return Ok(()); } @@ -639,11 +648,10 @@ impl<'a> ParseTableBuilder<'a> { let prec_line = if let Some(associativity) = associativity { Some(format!( - "(precedence: {}, associativity: {:?})", - precedence, associativity + "(precedence: {precedence}, associativity: {associativity:?})", )) } else if !precedence.is_none() { - Some(format!("(precedence: {})", precedence)) + Some(format!("(precedence: {precedence})")) } else { None }; @@ -707,24 +715,22 @@ impl<'a> ParseTableBuilder<'a> { }; if actual_conflict.len() > 1 { - if shift_items.len() > 0 { + if !shift_items.is_empty() { resolution_count += 1; write!( &mut msg, - " {}: Specify a higher precedence in", - resolution_count + " {resolution_count}: Specify a higher precedence in", ) .unwrap(); list_rule_names(&mut msg, &shift_items); - write!(&mut msg, " than in the other rules.\n").unwrap(); + writeln!(&mut msg, " than in the other rules.").unwrap(); } for item in &reduce_items { resolution_count += 1; - write!( + writeln!( &mut msg, - " {}: Specify a higher precedence in `{}` than in the other rules.\n", - resolution_count, + " {resolution_count}: Specify a higher precedence in `{}` than in the other rules.", self.symbol_name(&Symbol::non_terminal(item.variable_index as usize)) ) .unwrap(); @@ -735,19 +741,17 @@ impl<'a> ParseTableBuilder<'a> { resolution_count += 1; write!( &mut msg, - " {}: Specify a left or right associativity in", - resolution_count + " {resolution_count}: Specify a left or right associativity in", ) .unwrap(); list_rule_names(&mut msg, &reduce_items); - write!(&mut msg, "\n").unwrap(); + writeln!(&mut msg).unwrap(); } resolution_count += 1; write!( &mut msg, - " {}: Add a conflict for these rules: ", - resolution_count + " {resolution_count}: Add a conflict for these rules: ", ) .unwrap(); for (i, symbol) in actual_conflict.iter().enumerate() { @@ -756,7 +760,7 @@ impl<'a> ParseTableBuilder<'a> { } write!(&mut msg, "`{}`", self.symbol_name(symbol)).unwrap(); } - write!(&mut msg, "\n").unwrap(); + writeln!(&mut msg).unwrap(); Err(anyhow!(msg)) } @@ -789,7 +793,7 @@ impl<'a> ParseTableBuilder<'a> { // and to the default precedence, which is zero. (Precedence::Integer(l), Precedence::Integer(r)) if *l != 0 || *r != 0 => l.cmp(r), (Precedence::Integer(l), Precedence::None) if *l != 0 => l.cmp(&0), - (Precedence::None, Precedence::Integer(r)) if *r != 0 => 0.cmp(&r), + (Precedence::None, Precedence::Integer(r)) if *r != 0 => 0.cmp(r), // Named precedences can be compared to other named precedences. _ => grammar @@ -856,7 +860,7 @@ impl<'a> ParseTableBuilder<'a> { production_info .field_map .entry(field_name.clone()) - .or_insert(Vec::new()) + .or_default() .push(FieldLocation { index: i, inherited: false, @@ -869,11 +873,11 @@ impl<'a> ParseTableBuilder<'a> { .is_visible() { let info = &self.variable_info[step.symbol.index]; - for (field_name, _) in &info.fields { + for field_name in info.fields.keys() { production_info .field_map .entry(field_name.clone()) - .or_insert(Vec::new()) + .or_default() .push(FieldLocation { index: i, inherited: true, @@ -887,7 +891,7 @@ impl<'a> ParseTableBuilder<'a> { } if item.production.steps.len() > self.parse_table.max_aliased_production_length { - self.parse_table.max_aliased_production_length = item.production.steps.len() + self.parse_table.max_aliased_production_length = item.production.steps.len(); } if let Some(index) = self @@ -923,7 +927,7 @@ impl<'a> ParseTableBuilder<'a> { } fn populate_following_tokens( - result: &mut Vec, + result: &mut [TokenSet], grammar: &SyntaxGrammar, inlines: &InlinedProductionMap, builder: &ParseItemSetBuilder, @@ -934,7 +938,6 @@ fn populate_following_tokens( .flat_map(|v| &v.productions) .chain(&inlines.productions); let all_tokens = (0..result.len()) - .into_iter() .map(Symbol::terminal) .collect::(); for production in productions { @@ -958,12 +961,13 @@ fn populate_following_tokens( } } -pub(crate) fn build_parse_table<'a>( +pub fn build_parse_table<'a>( syntax_grammar: &'a SyntaxGrammar, lexical_grammar: &'a LexicalGrammar, inlines: &'a InlinedProductionMap, - variable_info: &'a Vec, + variable_info: &'a [VariableInfo], ) -> Result<(ParseTable, Vec, Vec>)> { + let actual_conflicts = syntax_grammar.expected_conflicts.iter().cloned().collect(); let item_set_builder = ParseItemSetBuilder::new(syntax_grammar, lexical_grammar, inlines); let mut following_tokens = vec![TokenSet::new(); lexical_grammar.variables.len()]; populate_following_tokens( @@ -979,6 +983,7 @@ pub(crate) fn build_parse_table<'a>( item_set_builder, variable_info, non_terminal_extra_states: Vec::new(), + actual_conflicts, state_ids_by_item_set: IndexMap::default(), core_ids_by_core: HashMap::new(), parse_state_info_by_id: Vec::new(), diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/coincident_tokens.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/coincident_tokens.rs index bb234c4ac1..a2181438d3 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/coincident_tokens.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/coincident_tokens.rs @@ -3,7 +3,7 @@ use crate::generate::rules::Symbol; use crate::generate::tables::{ParseStateId, ParseTable}; use std::fmt; -pub(crate) struct CoincidentTokenIndex<'a> { +pub struct CoincidentTokenIndex<'a> { entries: Vec>, grammar: &'a LexicalGrammar, n: usize, @@ -23,7 +23,7 @@ impl<'a> CoincidentTokenIndex<'a> { for other_symbol in state.terminal_entries.keys() { if other_symbol.is_terminal() { let index = result.index(symbol.index, other_symbol.index); - if result.entries[index].last().cloned() != Some(i) { + if result.entries[index].last().copied() != Some(i) { result.entries[index].push(i); } } @@ -34,7 +34,7 @@ impl<'a> CoincidentTokenIndex<'a> { result } - pub fn states_with(&self, a: Symbol, b: Symbol) -> &Vec { + pub fn states_with(&self, a: Symbol, b: Symbol) -> &[ParseStateId] { &self.entries[self.index(a.index, b.index)] } @@ -42,7 +42,8 @@ impl<'a> CoincidentTokenIndex<'a> { !self.entries[self.index(a.index, b.index)].is_empty() } - fn index(&self, a: usize, b: usize) -> usize { + #[must_use] + const fn index(&self, a: usize, b: usize) -> usize { if a < b { a * self.n + b } else { @@ -53,20 +54,20 @@ impl<'a> CoincidentTokenIndex<'a> { impl<'a> fmt::Debug for CoincidentTokenIndex<'a> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "CoincidentTokenIndex {{\n")?; + writeln!(f, "CoincidentTokenIndex {{")?; - write!(f, " entries: {{\n")?; + writeln!(f, " entries: {{")?; for i in 0..self.n { - write!(f, " {}: {{\n", self.grammar.variables[i].name)?; + writeln!(f, " {}: {{", self.grammar.variables[i].name)?; for j in 0..self.n { - write!( + writeln!( f, - " {}: {:?},\n", + " {}: {:?},", self.grammar.variables[j].name, self.entries[self.index(i, j)].len() )?; } - write!(f, " }},\n")?; + writeln!(f, " }},")?; } write!(f, " }},")?; write!(f, "}}")?; diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/item.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/item.rs index 32b1a8d9ab..82c32a8148 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/item.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/item.rs @@ -22,9 +22,9 @@ lazy_static! { }; } -/// A ParseItem represents an in-progress match of a single production in a grammar. +/// A [`ParseItem`] represents an in-progress match of a single production in a grammar. #[derive(Clone, Copy, Debug)] -pub(crate) struct ParseItem<'a> { +pub struct ParseItem<'a> { /// The index of the parent rule within the grammar. pub variable_index: u32, /// The number of symbols that have already been matched. @@ -47,35 +47,35 @@ pub(crate) struct ParseItem<'a> { pub has_preceding_inherited_fields: bool, } -/// A ParseItemSet represents a set of in-progress matches of productions in a +/// A [`ParseItemSet`] represents a set of in-progress matches of productions in a /// grammar, and for each in-progress match, a set of "lookaheads" - tokens that /// are allowed to *follow* the in-progress rule. This object corresponds directly /// to a state in the final parse table. -#[derive(Clone, Debug, PartialEq, Eq)] -pub(crate) struct ParseItemSet<'a> { +#[derive(Clone, Debug, PartialEq, Eq, Default)] +pub struct ParseItemSet<'a> { pub entries: Vec<(ParseItem<'a>, TokenSet)>, } -/// A ParseItemSetCore is like a ParseItemSet, but without the lookahead +/// A [`ParseItemSetCore`] is like a [`ParseItemSet`], but without the lookahead /// information. Parse states with the same core are candidates for merging. #[derive(Clone, Debug, PartialEq, Eq)] -pub(crate) struct ParseItemSetCore<'a> { +pub struct ParseItemSetCore<'a> { pub entries: Vec>, } -pub(crate) struct ParseItemDisplay<'a>( +pub struct ParseItemDisplay<'a>( pub &'a ParseItem<'a>, pub &'a SyntaxGrammar, pub &'a LexicalGrammar, ); -pub(crate) struct TokenSetDisplay<'a>( +pub struct TokenSetDisplay<'a>( pub &'a TokenSet, pub &'a SyntaxGrammar, pub &'a LexicalGrammar, ); -pub(crate) struct ParseItemSetDisplay<'a>( +pub struct ParseItemSetDisplay<'a>( pub &'a ParseItemSet<'a>, pub &'a SyntaxGrammar, pub &'a LexicalGrammar, @@ -116,16 +116,19 @@ impl<'a> ParseItem<'a> { } } + #[must_use] pub fn is_done(&self) -> bool { self.step_index as usize == self.production.steps.len() } - pub fn is_augmented(&self) -> bool { + #[must_use] + pub const fn is_augmented(&self) -> bool { self.variable_index == u32::MAX } /// Create an item like this one, but advanced by one step. - pub fn successor(&self) -> ParseItem<'a> { + #[must_use] + pub const fn successor(&self) -> ParseItem<'a> { ParseItem { variable_index: self.variable_index, production: self.production, @@ -136,8 +139,8 @@ impl<'a> ParseItem<'a> { /// Create an item identical to this one, but with a different production. /// This is used when dynamically "inlining" certain symbols in a production. - pub fn substitute_production(&self, production: &'a Production) -> ParseItem<'a> { - let mut result = self.clone(); + pub const fn substitute_production(&self, production: &'a Production) -> ParseItem<'a> { + let mut result = *self; result.production = production; result } @@ -172,14 +175,6 @@ impl<'a> ParseItemSet<'a> { } } -impl<'a> Default for ParseItemSet<'a> { - fn default() -> Self { - Self { - entries: Vec::new(), - } - } -} - impl<'a> fmt::Display for ParseItemDisplay<'a> { fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { if self.0.is_augmented() { @@ -196,10 +191,10 @@ impl<'a> fmt::Display for ParseItemDisplay<'a> { if i == self.0.step_index as usize { write!(f, " •")?; if let Some(associativity) = step.associativity { - if !step.precedence.is_none() { - write!(f, " ({} {:?})", step.precedence, associativity)?; + if step.precedence.is_none() { + write!(f, " ({associativity:?})")?; } else { - write!(f, " ({:?})", associativity)?; + write!(f, " ({} {associativity:?})", step.precedence)?; } } else if !step.precedence.is_none() { write!(f, " ({})", step.precedence)?; @@ -211,7 +206,7 @@ impl<'a> fmt::Display for ParseItemDisplay<'a> { if let Some(variable) = self.2.variables.get(step.symbol.index) { write!(f, "{}", &variable.name)?; } else { - write!(f, "{}-{}", "terminal", step.symbol.index)?; + write!(f, "terminal-{}", step.symbol.index)?; } } else if step.symbol.is_external() { write!(f, "{}", &self.1.external_tokens[step.symbol.index].name)?; @@ -228,10 +223,10 @@ impl<'a> fmt::Display for ParseItemDisplay<'a> { write!(f, " •")?; if let Some(step) = self.0.production.steps.last() { if let Some(associativity) = step.associativity { - if !step.precedence.is_none() { - write!(f, " ({} {:?})", step.precedence, associativity)?; + if step.precedence.is_none() { + write!(f, " ({associativity:?})")?; } else { - write!(f, " ({:?})", associativity)?; + write!(f, " ({} {associativity:?})", step.precedence)?; } } else if !step.precedence.is_none() { write!(f, " ({})", step.precedence)?; @@ -255,7 +250,7 @@ impl<'a> fmt::Display for TokenSetDisplay<'a> { if let Some(variable) = self.2.variables.get(symbol.index) { write!(f, "{}", &variable.name)?; } else { - write!(f, "{}-{}", "terminal", symbol.index)?; + write!(f, "terminal-{}", symbol.index)?; } } else if symbol.is_external() { write!(f, "{}", &self.1.external_tokens[symbol.index].name)?; @@ -270,7 +265,7 @@ impl<'a> fmt::Display for TokenSetDisplay<'a> { impl<'a> fmt::Display for ParseItemSetDisplay<'a> { fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { - for (item, lookaheads) in self.0.entries.iter() { + for (item, lookaheads) in &self.0.entries { writeln!( f, "{}\t{}", @@ -288,7 +283,7 @@ impl<'a> Hash for ParseItem<'a> { hasher.write_u32(self.step_index); hasher.write_i32(self.production.dynamic_precedence); hasher.write_usize(self.production.steps.len()); - hasher.write_i32(self.has_preceding_inherited_fields as i32); + hasher.write_i32(i32::from(self.has_preceding_inherited_fields)); self.precedence().hash(hasher); self.associativity().hash(hasher); @@ -344,7 +339,7 @@ impl<'a> PartialEq for ParseItem<'a> { } } - return true; + true } } @@ -364,7 +359,7 @@ impl<'a> Ord for ParseItem<'a> { .len() .cmp(&other.production.steps.len()) }) - .then_with(|| self.precedence().cmp(&other.precedence())) + .then_with(|| self.precedence().cmp(other.precedence())) .then_with(|| self.associativity().cmp(&other.associativity())) .then_with(|| { for (i, step) in self.production.steps.iter().enumerate() { @@ -383,7 +378,7 @@ impl<'a> Ord for ParseItem<'a> { return o; } } - return Ordering::Equal; + Ordering::Equal }) } } @@ -399,7 +394,7 @@ impl<'a> Eq for ParseItem<'a> {} impl<'a> Hash for ParseItemSet<'a> { fn hash(&self, hasher: &mut H) { hasher.write_usize(self.entries.len()); - for (item, lookaheads) in self.entries.iter() { + for (item, lookaheads) in &self.entries { item.hash(hasher); lookaheads.hash(hasher); } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/item_set_builder.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/item_set_builder.rs index 18283576dd..8f9644d02e 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/item_set_builder.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/item_set_builder.rs @@ -16,7 +16,7 @@ struct FollowSetInfo { propagates_lookaheads: bool, } -pub(crate) struct ParseItemSetBuilder<'a> { +pub struct ParseItemSetBuilder<'a> { syntax_grammar: &'a SyntaxGrammar, lexical_grammar: &'a LexicalGrammar, first_sets: HashMap, @@ -69,7 +69,7 @@ impl<'a> ParseItemSetBuilder<'a> { } // The FIRST set of a non-terminal `i` is the union of the following sets: - // * the set of all terminals that appear at the beginings of i's productions + // * the set of all terminals that appear at the beginnings of i's productions // * the FIRST sets of all the non-terminals that appear at the beginnings // of i's productions // @@ -80,7 +80,10 @@ impl<'a> ParseItemSetBuilder<'a> { for i in 0..syntax_grammar.variables.len() { let symbol = Symbol::non_terminal(i); - let first_set = &mut result.first_sets.entry(symbol).or_insert(TokenSet::new()); + let first_set = result + .first_sets + .entry(symbol) + .or_insert_with(TokenSet::new); processed_non_terminals.clear(); symbols_to_process.clear(); symbols_to_process.push(symbol); @@ -88,10 +91,7 @@ impl<'a> ParseItemSetBuilder<'a> { if current_symbol.is_terminal() || current_symbol.is_external() { first_set.insert(current_symbol); } else if processed_non_terminals.insert(current_symbol) { - for production in syntax_grammar.variables[current_symbol.index] - .productions - .iter() - { + for production in &syntax_grammar.variables[current_symbol.index].productions { if let Some(step) = production.steps.first() { symbols_to_process.push(step.symbol); } @@ -100,7 +100,7 @@ impl<'a> ParseItemSetBuilder<'a> { } // The LAST set is defined in a similar way to the FIRST set. - let last_set = &mut result.last_sets.entry(symbol).or_insert(TokenSet::new()); + let last_set = result.last_sets.entry(symbol).or_insert_with(TokenSet::new); processed_non_terminals.clear(); symbols_to_process.clear(); symbols_to_process.push(symbol); @@ -108,10 +108,7 @@ impl<'a> ParseItemSetBuilder<'a> { if current_symbol.is_terminal() || current_symbol.is_external() { last_set.insert(current_symbol); } else if processed_non_terminals.insert(current_symbol) { - for production in syntax_grammar.variables[current_symbol.index] - .productions - .iter() - { + for production in &syntax_grammar.variables[current_symbol.index].productions { if let Some(step) = production.steps.last() { symbols_to_process.push(step.symbol); } @@ -235,7 +232,7 @@ impl<'a> ParseItemSetBuilder<'a> { result } - pub(crate) fn transitive_closure(&mut self, item_set: &ParseItemSet<'a>) -> ParseItemSet<'a> { + pub fn transitive_closure(&mut self, item_set: &ParseItemSet<'a>) -> ParseItemSet<'a> { let mut result = ParseItemSet::default(); for (item, lookaheads) in &item_set.entries { if let Some(productions) = self @@ -270,11 +267,9 @@ impl<'a> ParseItemSetBuilder<'a> { let next_step = item.successor().step(); // Determine which tokens can follow this non-terminal. - let following_tokens = if let Some(next_step) = next_step { + let following_tokens = next_step.map_or(lookaheads, |next_step| { self.first_sets.get(&next_step.symbol).unwrap() - } else { - &lookaheads - }; + }); // Use the pre-computed *additions* to expand the non-terminal. for addition in &self.transitive_closure_additions[step.symbol.index] { @@ -291,9 +286,9 @@ impl<'a> ParseItemSetBuilder<'a> { impl<'a> fmt::Debug for ParseItemSetBuilder<'a> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "ParseItemSetBuilder {{\n")?; + writeln!(f, "ParseItemSetBuilder {{")?; - write!(f, " first_sets: {{\n")?; + writeln!(f, " first_sets: {{")?; for (symbol, first_set) in &self.first_sets { let name = match symbol.kind { SymbolType::NonTerminal => &self.syntax_grammar.variables[symbol.index].name, @@ -301,16 +296,15 @@ impl<'a> fmt::Debug for ParseItemSetBuilder<'a> { SymbolType::Terminal => &self.lexical_grammar.variables[symbol.index].name, SymbolType::End | SymbolType::EndOfNonTerminalExtra => "END", }; - write!( + writeln!( f, - " first({:?}): {}\n", - name, - TokenSetDisplay(first_set, &self.syntax_grammar, &self.lexical_grammar) + " first({name:?}): {}", + TokenSetDisplay(first_set, self.syntax_grammar, self.lexical_grammar) )?; } - write!(f, " }}\n")?; + writeln!(f, " }}")?; - write!(f, " last_sets: {{\n")?; + writeln!(f, " last_sets: {{")?; for (symbol, last_set) in &self.last_sets { let name = match symbol.kind { SymbolType::NonTerminal => &self.syntax_grammar.variables[symbol.index].name, @@ -318,26 +312,25 @@ impl<'a> fmt::Debug for ParseItemSetBuilder<'a> { SymbolType::Terminal => &self.lexical_grammar.variables[symbol.index].name, SymbolType::End | SymbolType::EndOfNonTerminalExtra => "END", }; - write!( + writeln!( f, - " last({:?}): {}\n", - name, - TokenSetDisplay(last_set, &self.syntax_grammar, &self.lexical_grammar) + " last({name:?}): {}", + TokenSetDisplay(last_set, self.syntax_grammar, self.lexical_grammar) )?; } - write!(f, " }}\n")?; + writeln!(f, " }}")?; - write!(f, " additions: {{\n")?; + writeln!(f, " additions: {{")?; for (i, variable) in self.syntax_grammar.variables.iter().enumerate() { - write!(f, " {}: {{\n", variable.name)?; + writeln!(f, " {}: {{", variable.name)?; for addition in &self.transitive_closure_additions[i] { - write!( + writeln!( f, - " {}\n", + " {}", ParseItemDisplay(&addition.item, self.syntax_grammar, self.lexical_grammar) )?; } - write!(f, " }},\n")?; + writeln!(f, " }},")?; } write!(f, " }},")?; diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/minimize_parse_table.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/minimize_parse_table.rs index d10bea5613..d9d2b7f56d 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/minimize_parse_table.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/minimize_parse_table.rs @@ -9,7 +9,7 @@ use log::info; use std::collections::{HashMap, HashSet}; use std::mem; -pub(crate) fn minimize_parse_table( +pub fn minimize_parse_table( parse_table: &mut ParseTable, syntax_grammar: &SyntaxGrammar, lexical_grammar: &LexicalGrammar, @@ -67,9 +67,9 @@ impl<'a> Minimizer<'a> { symbol, .. } => { - if !self.simple_aliases.contains_key(&symbol) - && !self.syntax_grammar.supertype_symbols.contains(&symbol) - && !aliased_symbols.contains(&symbol) + if !self.simple_aliases.contains_key(symbol) + && !self.syntax_grammar.supertype_symbols.contains(symbol) + && !aliased_symbols.contains(symbol) && self.syntax_grammar.variables[symbol.index].kind != VariableType::Named && (unit_reduction_symbol.is_none() @@ -97,21 +97,22 @@ impl<'a> Minimizer<'a> { } } - for state in self.parse_table.states.iter_mut() { + for state in &mut self.parse_table.states { let mut done = false; while !done { done = true; state.update_referenced_states(|other_state_id, state| { - if let Some(symbol) = unit_reduction_symbols_by_state.get(&other_state_id) { - done = false; - match state.nonterminal_entries.get(symbol) { - Some(GotoAction::Goto(state_id)) => *state_id, - _ => other_state_id, - } - } else { - other_state_id - } - }) + unit_reduction_symbols_by_state.get(&other_state_id).map_or( + other_state_id, + |symbol| { + done = false; + match state.nonterminal_entries.get(symbol) { + Some(GotoAction::Goto(state_id)) => *state_id, + _ => other_state_id, + } + }, + ) + }); } } } @@ -198,7 +199,7 @@ impl<'a> Minimizer<'a> { &self, left_state: &ParseState, right_state: &ParseState, - group_ids_by_state_id: &Vec, + group_ids_by_state_id: &[ParseStateId], ) -> bool { for (token, left_entry) in &left_state.terminal_entries { if let Some(right_entry) = right_state.terminal_entries.get(token) { @@ -223,15 +224,15 @@ impl<'a> Minimizer<'a> { } for token in right_state.terminal_entries.keys() { - if !left_state.terminal_entries.contains_key(token) { - if self.token_conflicts( + if !left_state.terminal_entries.contains_key(token) + && self.token_conflicts( left_state.id, right_state.id, left_state.terminal_entries.keys(), *token, - ) { - return true; - } + ) + { + return true; } } @@ -242,7 +243,7 @@ impl<'a> Minimizer<'a> { &self, state1: &ParseState, state2: &ParseState, - group_ids_by_state_id: &Vec, + group_ids_by_state_id: &[ParseStateId], ) -> bool { for (token, entry1) in &state1.terminal_entries { if let ParseAction::Shift { state: s1, .. } = entry1.actions.last().unwrap() { @@ -252,12 +253,10 @@ impl<'a> Minimizer<'a> { let group2 = group_ids_by_state_id[*s2]; if group1 != group2 { info!( - "split states {} {} - successors for {} are split: {} {}", + "split states {} {} - successors for {} are split: {s1} {s2}", state1.id, state2.id, self.symbol_name(token), - s1, - s2, ); return true; } @@ -275,12 +274,10 @@ impl<'a> Minimizer<'a> { let group2 = group_ids_by_state_id[*s2]; if group1 != group2 { info!( - "split states {} {} - successors for {} are split: {} {}", + "split states {} {} - successors for {} are split: {s1} {s2}", state1.id, state2.id, self.symbol_name(symbol), - s1, - s2, ); return true; } @@ -300,16 +297,14 @@ impl<'a> Minimizer<'a> { token: &Symbol, entry1: &ParseTableEntry, entry2: &ParseTableEntry, - group_ids_by_state_id: &Vec, + group_ids_by_state_id: &[ParseStateId], ) -> bool { // To be compatible, entries need to have the same actions. let actions1 = &entry1.actions; let actions2 = &entry2.actions; if actions1.len() != actions2.len() { info!( - "split states {} {} - differing action counts for token {}", - state_id1, - state_id2, + "split states {state_id1} {state_id2} - differing action counts for token {}", self.symbol_name(token) ); return true; @@ -334,22 +329,15 @@ impl<'a> Minimizer<'a> { let group2 = group_ids_by_state_id[*s2]; if group1 == group2 && is_repetition1 == is_repetition2 { continue; - } else { - info!( - "split states {} {} - successors for {} are split: {} {}", - state_id1, - state_id2, - self.symbol_name(token), - s1, - s2, - ); - return true; } + info!( + "split states {state_id1} {state_id2} - successors for {} are split: {s1} {s2}", + self.symbol_name(token), + ); + return true; } else if action1 != action2 { info!( - "split states {} {} - unequal actions for {}", - state_id1, - state_id2, + "split states {state_id1} {state_id2} - unequal actions for {}", self.symbol_name(token), ); return true; @@ -367,10 +355,7 @@ impl<'a> Minimizer<'a> { new_token: Symbol, ) -> bool { if new_token == Symbol::end_of_nonterminal_extra() { - info!( - "split states {} {} - end of non-terminal extra", - left_id, right_id, - ); + info!("split states {left_id} {right_id} - end of non-terminal extra",); return true; } @@ -378,9 +363,7 @@ impl<'a> Minimizer<'a> { // existing lookahead tokens. if new_token.is_external() { info!( - "split states {} {} - external token {}", - left_id, - right_id, + "split states {left_id} {right_id} - external token {}", self.symbol_name(&new_token), ); return true; @@ -395,9 +378,7 @@ impl<'a> Minimizer<'a> { .any(|external| external.corresponding_internal_token == Some(new_token)) { info!( - "split states {} {} - internal/external token {}", - left_id, - right_id, + "split states {left_id} {right_id} - internal/external token {}", self.symbol_name(&new_token), ); return true; @@ -405,27 +386,24 @@ impl<'a> Minimizer<'a> { // Do not add a token if it conflicts with an existing token. for token in existing_tokens { - if token.is_terminal() { - if !(self.syntax_grammar.word_token == Some(*token) + if token.is_terminal() + && !(self.syntax_grammar.word_token == Some(*token) && self.keywords.contains(&new_token)) - && !(self.syntax_grammar.word_token == Some(new_token) - && self.keywords.contains(token)) - && (self + && !(self.syntax_grammar.word_token == Some(new_token) + && self.keywords.contains(token)) + && (self + .token_conflict_map + .does_conflict(new_token.index, token.index) + || self .token_conflict_map - .does_conflict(new_token.index, token.index) - || self - .token_conflict_map - .does_match_same_string(new_token.index, token.index)) - { - info!( - "split states {} {} - token {} conflicts with {}", - left_id, - right_id, - self.symbol_name(&new_token), - self.symbol_name(token), - ); - return true; - } + .does_match_same_string(new_token.index, token.index)) + { + info!( + "split states {left_id} {right_id} - token {} conflicts with {}", + self.symbol_name(&new_token), + self.symbol_name(token), + ); + return true; } } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/mod.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/mod.rs index fe996254ec..a87afefd5f 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/mod.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/mod.rs @@ -1,5 +1,5 @@ -pub(crate) mod build_lex_table; -pub(crate) mod build_parse_table; +pub mod build_lex_table; +pub mod build_parse_table; mod coincident_tokens; mod item; mod item_set_builder; @@ -20,11 +20,11 @@ use anyhow::Result; use log::info; use std::collections::{BTreeSet, HashMap}; -pub(crate) fn build_tables( +pub fn build_tables( syntax_grammar: &SyntaxGrammar, lexical_grammar: &LexicalGrammar, simple_aliases: &AliasMap, - variable_info: &Vec, + variable_info: &[VariableInfo], inlines: &InlinedProductionMap, report_symbol_name: Option<&str>, ) -> Result<(ParseTable, LexTable, LexTable, Option)> { @@ -69,8 +69,8 @@ pub(crate) fn build_tables( if let Some(report_symbol_name) = report_symbol_name { report_state_info( - &syntax_grammar, - &lexical_grammar, + syntax_grammar, + lexical_grammar, &parse_table, &parse_state_info, report_symbol_name, @@ -98,9 +98,8 @@ fn populate_error_state( // First identify the *conflict-free tokens*: tokens that do not overlap with // any other token in any way, besides matching exactly the same string. let conflict_free_tokens: TokenSet = (0..n) - .into_iter() .filter_map(|i| { - let conflicts_with_other_tokens = (0..n).into_iter().any(|j| { + let conflicts_with_other_tokens = (0..n).any(|j| { j != i && !coincident_token_index.contains(Symbol::terminal(i), Symbol::terminal(j)) && token_conflict_map.does_match_shorter_or_longer(i, j) @@ -126,18 +125,19 @@ fn populate_error_state( // the *conflict-free tokens* identified above. for i in 0..n { let symbol = Symbol::terminal(i); - if !conflict_free_tokens.contains(&symbol) && !keywords.contains(&symbol) { - if syntax_grammar.word_token != Some(symbol) { - if let Some(t) = conflict_free_tokens.iter().find(|t| { - !coincident_token_index.contains(symbol, *t) - && token_conflict_map.does_conflict(symbol.index, t.index) - }) { - info!( - "error recovery - exclude token {} because of conflict with {}", - lexical_grammar.variables[i].name, lexical_grammar.variables[t.index].name - ); - continue; - } + if !conflict_free_tokens.contains(&symbol) + && !keywords.contains(&symbol) + && syntax_grammar.word_token != Some(symbol) + { + if let Some(t) = conflict_free_tokens.iter().find(|t| { + !coincident_token_index.contains(symbol, *t) + && token_conflict_map.does_conflict(symbol.index, t.index) + }) { + info!( + "error recovery - exclude token {} because of conflict with {}", + lexical_grammar.variables[i].name, lexical_grammar.variables[t.index].name + ); + continue; } } info!( @@ -361,7 +361,7 @@ fn mark_fragile_tokens( ) { let n = lexical_grammar.variables.len(); let mut valid_tokens_mask = Vec::with_capacity(n); - for state in parse_table.states.iter_mut() { + for state in &mut parse_table.states { valid_tokens_mask.clear(); valid_tokens_mask.resize(n, false); for token in state.terminal_entries.keys() { @@ -369,14 +369,12 @@ fn mark_fragile_tokens( valid_tokens_mask[token.index] = true; } } - for (token, entry) in state.terminal_entries.iter_mut() { + for (token, entry) in &mut state.terminal_entries { if token.is_terminal() { for (i, is_valid) in valid_tokens_mask.iter().enumerate() { - if *is_valid { - if token_conflict_map.does_overlap(i, token.index) { - entry.reusable = false; - break; - } + if *is_valid && token_conflict_map.does_overlap(i, token.index) { + entry.reusable = false; + break; } } } @@ -388,7 +386,7 @@ fn report_state_info<'a>( syntax_grammar: &SyntaxGrammar, lexical_grammar: &LexicalGrammar, parse_table: &ParseTable, - parse_state_info: &Vec>, + parse_state_info: &[ParseStateInfo<'a>], report_symbol_name: &'a str, ) { let mut all_state_indices = BTreeSet::new(); @@ -399,7 +397,7 @@ fn report_state_info<'a>( for (i, state) in parse_table.states.iter().enumerate() { all_state_indices.insert(i); let item_set = &parse_state_info[state.id]; - for (item, _) in item_set.1.entries.iter() { + for (item, _) in &item_set.1.entries { if !item.is_augmented() { symbols_with_state_indices[item.variable_index as usize] .1 @@ -424,7 +422,7 @@ fn report_state_info<'a>( width = max_symbol_name_length ); } - eprintln!(""); + eprintln!(); let state_indices = if report_symbol_name == "*" { Some(&all_state_indices) @@ -441,14 +439,14 @@ fn report_state_info<'a>( }; if let Some(state_indices) = state_indices { - let mut state_indices = state_indices.into_iter().cloned().collect::>(); + let mut state_indices = state_indices.iter().copied().collect::>(); state_indices.sort_unstable_by_key(|i| (parse_table.states[*i].core_id, *i)); for state_index in state_indices { let id = parse_table.states[state_index].id; let (preceding_symbols, item_set) = &parse_state_info[id]; - eprintln!("state index: {}", state_index); - eprintln!("state id: {}", id); + eprintln!("state index: {state_index}"); + eprintln!("state id: {id}"); eprint!("symbol sequence:"); for symbol in preceding_symbols { let name = if symbol.is_terminal() { @@ -458,11 +456,11 @@ fn report_state_info<'a>( } else { &syntax_grammar.variables[symbol.index].name }; - eprint!(" {}", name); + eprint!(" {name}"); } eprintln!( "\nitems:\n{}", - self::item::ParseItemSetDisplay(&item_set, syntax_grammar, lexical_grammar,), + self::item::ParseItemSetDisplay(item_set, syntax_grammar, lexical_grammar,), ); } } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/token_conflicts.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/token_conflicts.rs index 223d348183..33a904b02a 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/token_conflicts.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/build_tables/token_conflicts.rs @@ -16,7 +16,7 @@ struct TokenConflictStatus { matches_different_string: bool, } -pub(crate) struct TokenConflictMap<'a> { +pub struct TokenConflictMap<'a> { n: usize, status_matrix: Vec, following_tokens: Vec, @@ -104,19 +104,17 @@ impl<'a> TokenConflictMap<'a> { } pub fn prefer_token(grammar: &LexicalGrammar, left: (i32, usize), right: (i32, usize)) -> bool { - if left.0 > right.0 { - return true; - } else if left.0 < right.0 { - return false; - } - - match grammar.variables[left.1] - .implicit_precedence - .cmp(&grammar.variables[right.1].implicit_precedence) - { + match left.0.cmp(&right.0) { Ordering::Less => false, Ordering::Greater => true, - Ordering::Equal => left.1 < right.1, + Ordering::Equal => match grammar.variables[left.1] + .implicit_precedence + .cmp(&grammar.variables[right.1].implicit_precedence) + { + Ordering::Less => false, + Ordering::Greater => true, + Ordering::Equal => left.1 < right.1, + }, } } @@ -135,10 +133,9 @@ impl<'a> TokenConflictMap<'a> { return false; } if has_separator_transitions - && grammar + && !grammar .variable_indices_for_nfa_states(&t.states) - .position(|i| i == completed_id) - .is_none() + .any(|i| i == completed_id) { return false; } @@ -149,53 +146,53 @@ impl<'a> TokenConflictMap<'a> { impl<'a> fmt::Debug for TokenConflictMap<'a> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "TokenConflictMap {{\n")?; + writeln!(f, "TokenConflictMap {{")?; let syntax_grammar = SyntaxGrammar::default(); - write!(f, " following_tokens: {{\n")?; + writeln!(f, " following_tokens: {{")?; for (i, following_tokens) in self.following_tokens.iter().enumerate() { - write!( + writeln!( f, - " follow({:?}): {},\n", + " follow({:?}): {},", self.grammar.variables[i].name, - TokenSetDisplay(following_tokens, &syntax_grammar, &self.grammar) + TokenSetDisplay(following_tokens, &syntax_grammar, self.grammar) )?; } - write!(f, " }},\n")?; + writeln!(f, " }},")?; - write!(f, " starting_characters: {{\n")?; + writeln!(f, " starting_characters: {{")?; for i in 0..self.n { - write!( + writeln!( f, - " {:?}: {:?},\n", + " {:?}: {:?},", self.grammar.variables[i].name, self.starting_chars_by_index[i] )?; } - write!(f, " }},\n")?; + writeln!(f, " }},")?; - write!(f, " following_characters: {{\n")?; + writeln!(f, " following_characters: {{")?; for i in 0..self.n { - write!( + writeln!( f, - " {:?}: {:?},\n", + " {:?}: {:?},", self.grammar.variables[i].name, self.following_chars_by_index[i] )?; } - write!(f, " }},\n")?; + writeln!(f, " }},")?; - write!(f, " status_matrix: {{\n")?; + writeln!(f, " status_matrix: {{")?; for i in 0..self.n { - write!(f, " {:?}: {{\n", self.grammar.variables[i].name)?; + writeln!(f, " {:?}: {{", self.grammar.variables[i].name)?; for j in 0..self.n { - write!( + writeln!( f, - " {:?}: {:?},\n", + " {:?}: {:?},", self.grammar.variables[j].name, self.status_matrix[matrix_index(self.n, i, j)] )?; } - write!(f, " }},\n")?; + writeln!(f, " }},")?; } write!(f, " }},")?; write!(f, "}}")?; @@ -203,7 +200,7 @@ impl<'a> fmt::Debug for TokenConflictMap<'a> { } } -fn matrix_index(variable_count: usize, i: usize, j: usize) -> usize { +const fn matrix_index(variable_count: usize, i: usize, j: usize) -> usize { variable_count * i + j } @@ -221,8 +218,8 @@ fn get_starting_chars(cursor: &mut NfaCursor, grammar: &LexicalGrammar) -> Vec, - following_tokens: &Vec, + starting_chars: &[CharacterSet], + following_tokens: &[TokenSet], ) -> Vec { following_tokens .iter() @@ -241,7 +238,7 @@ fn get_following_chars( fn compute_conflict_status( cursor: &mut NfaCursor, grammar: &LexicalGrammar, - following_chars: &Vec, + following_chars: &[CharacterSet], i: usize, j: usize, ) -> (TokenConflictStatus, TokenConflictStatus) { @@ -330,9 +327,8 @@ fn compute_conflict_status( if variable_id == completed_id { successor_contains_completed_id = true; break; - } else { - advanced_id = Some(variable_id); } + advanced_id = Some(variable_id); } // Determine which action is preferred: matching the already complete @@ -357,12 +353,10 @@ fn compute_conflict_status( result.1.does_match_valid_continuation = true; } } + } else if completed_id == i { + result.0.matches_prefix = true; } else { - if completed_id == i { - result.0.matches_prefix = true; - } else { - result.1.matches_prefix = true; - } + result.1.matches_prefix = true; } } } @@ -390,12 +384,12 @@ mod tests { Variable { name: "token_0".to_string(), kind: VariableType::Named, - rule: Rule::pattern("[a-f]1|0x\\d"), + rule: Rule::pattern("[a-f]1|0x\\d", ""), }, Variable { name: "token_1".to_string(), kind: VariableType::Named, - rule: Rule::pattern("d*ef"), + rule: Rule::pattern("d*ef", ""), }, ], }) @@ -426,7 +420,7 @@ mod tests { Variable { name: "identifier".to_string(), kind: VariableType::Named, - rule: Rule::pattern("\\w+"), + rule: Rule::pattern("\\w+", ""), }, Variable { name: "instanceof".to_string(), @@ -442,14 +436,14 @@ mod tests { let token_map = TokenConflictMap::new( &grammar, vec![ - [Symbol::terminal(var("identifier"))] - .iter() - .cloned() + std::iter::once(&Symbol::terminal(var("identifier"))) + .copied() + .collect(), + std::iter::once(&Symbol::terminal(var("in"))) + .copied() .collect(), - [Symbol::terminal(var("in"))].iter().cloned().collect(), - [Symbol::terminal(var("identifier"))] - .iter() - .cloned() + std::iter::once(&Symbol::terminal(var("identifier"))) + .copied() .collect(), ], ); @@ -471,7 +465,7 @@ mod tests { #[test] fn test_token_conflicts_with_separators() { let grammar = expand_tokens(ExtractedLexicalGrammar { - separators: vec![Rule::pattern("\\s")], + separators: vec![Rule::pattern("\\s", "")], variables: vec![ Variable { name: "x".to_string(), @@ -498,7 +492,7 @@ mod tests { #[test] fn test_token_conflicts_with_open_ended_tokens() { let grammar = expand_tokens(ExtractedLexicalGrammar { - separators: vec![Rule::pattern("\\s")], + separators: vec![Rule::pattern("\\s", "")], variables: vec![ Variable { name: "x".to_string(), @@ -508,7 +502,7 @@ mod tests { Variable { name: "anything".to_string(), kind: VariableType::Named, - rule: Rule::prec(Precedence::Integer(-1), Rule::pattern(".*")), + rule: Rule::prec(Precedence::Integer(-1), Rule::pattern(".*", "")), }, ], }) diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/char_tree.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/char_tree.rs index 2de5e8320a..2e28d56fe8 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/char_tree.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/char_tree.rs @@ -29,20 +29,20 @@ impl CharacterTree { 1 => { let range = &ranges[0]; if range.start == range.end { - Some(CharacterTree::Compare { + Some(Self::Compare { operator: Comparator::Equal, value: range.start, - consequence: Some(Box::new(CharacterTree::Yes)), + consequence: Some(Box::new(Self::Yes)), alternative: None, }) } else { - Some(CharacterTree::Compare { + Some(Self::Compare { operator: Comparator::GreaterOrEqual, value: range.start, - consequence: Some(Box::new(CharacterTree::Compare { + consequence: Some(Box::new(Self::Compare { operator: Comparator::LessOrEqual, value: range.end, - consequence: Some(Box::new(CharacterTree::Yes)), + consequence: Some(Box::new(Self::Yes)), alternative: None, })), alternative: None, @@ -52,14 +52,14 @@ impl CharacterTree { len => { let mid = len / 2; let mid_range = &ranges[mid]; - Some(CharacterTree::Compare { + Some(Self::Compare { operator: Comparator::Less, value: mid_range.start, consequence: Self::from_ranges(&ranges[0..mid]).map(Box::new), - alternative: Some(Box::new(CharacterTree::Compare { + alternative: Some(Box::new(Self::Compare { operator: Comparator::LessOrEqual, value: mid_range.end, - consequence: Some(Box::new(CharacterTree::Yes)), + consequence: Some(Box::new(Self::Yes)), alternative: Self::from_ranges(&ranges[(mid + 1)..]).map(Box::new), })), }) @@ -70,8 +70,8 @@ impl CharacterTree { #[cfg(test)] fn contains(&self, c: char) -> bool { match self { - CharacterTree::Yes => true, - CharacterTree::Compare { + Self::Yes => true, + Self::Compare { value, operator, alternative, diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/dedup.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/dedup.rs index dcba231838..fffe2675a5 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/dedup.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/dedup.rs @@ -1,9 +1,9 @@ -pub(crate) fn split_state_id_groups( - states: &Vec, +pub fn split_state_id_groups( + states: &[S], state_ids_by_group_id: &mut Vec>, - group_ids_by_state_id: &mut Vec, + group_ids_by_state_id: &mut [usize], start_group_id: usize, - mut f: impl FnMut(&S, &S, &Vec) -> bool, + mut f: impl FnMut(&S, &S, &[usize]) -> bool, ) -> bool { let mut result = false; @@ -33,7 +33,7 @@ pub(crate) fn split_state_id_groups( } let right_state = &states[right_state_id]; - if f(left_state, right_state, &group_ids_by_state_id) { + if f(left_state, right_state, group_ids_by_state_id) { split_state_ids.push(right_state_id); } @@ -44,9 +44,9 @@ pub(crate) fn split_state_id_groups( } // If any states were removed from the group, add them all as a new group. - if split_state_ids.len() > 0 { + if !split_state_ids.is_empty() { result = true; - state_ids_by_group_id[group_id].retain(|i| !split_state_ids.contains(&i)); + state_ids_by_group_id[group_id].retain(|i| !split_state_ids.contains(i)); let new_group_id = state_ids_by_group_id.len(); for id in &split_state_ids { diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/dsl.js b/third-party/tree-sitter/tree-sitter/cli/src/generate/dsl.js index 4281cee12d..581aeddd21 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/dsl.js +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/dsl.js @@ -48,13 +48,14 @@ function choice(...elements) { } function optional(value) { - checkArguments(arguments.length, optional, 'optional'); + checkArguments(arguments, arguments.length, optional, 'optional'); return choice(value, blank()); } function prec(number, rule) { checkPrecedence(number); checkArguments( + arguments, arguments.length - 1, prec, 'prec', @@ -76,6 +77,7 @@ prec.left = function(number, rule) { checkPrecedence(number); checkArguments( + arguments, arguments.length - 1, prec.left, 'prec.left', @@ -97,6 +99,7 @@ prec.right = function(number, rule) { checkPrecedence(number); checkArguments( + arguments, arguments.length - 1, prec.right, 'prec.right', @@ -113,6 +116,7 @@ prec.right = function(number, rule) { prec.dynamic = function(number, rule) { checkPrecedence(number); checkArguments( + arguments, arguments.length - 1, prec.dynamic, 'prec.dynamic', @@ -127,7 +131,7 @@ prec.dynamic = function(number, rule) { } function repeat(rule) { - checkArguments(arguments.length, repeat, 'repeat'); + checkArguments(arguments, arguments.length, repeat, 'repeat'); return { type: "REPEAT", content: normalize(rule) @@ -135,7 +139,7 @@ function repeat(rule) { } function repeat1(rule) { - checkArguments(arguments.length, repeat1, 'repeat1'); + checkArguments(arguments, arguments.length, repeat1, 'repeat1'); return { type: "REPEAT1", content: normalize(rule) @@ -157,6 +161,7 @@ function sym(name) { } function token(value) { + checkArguments(arguments, arguments.length, token, 'token', '', 'literal'); return { type: "TOKEN", content: normalize(value) @@ -164,6 +169,7 @@ function token(value) { } token.immediate = function(value) { + checkArguments(arguments, arguments.length, token.immediate, 'token.immediate', '', 'literal'); return { type: "IMMEDIATE_TOKEN", content: normalize(value) @@ -181,7 +187,11 @@ function normalize(value) { value }; case RegExp: - return { + return value.flags ? { + type: 'PATTERN', + value: value.source, + flags: value.flags + } : { type: 'PATTERN', value: value.source }; @@ -225,6 +235,8 @@ function grammar(baseGrammar, options) { supertypes: [], precedences: [], }; + } else { + baseGrammar = baseGrammar.grammar; } let externals = baseGrammar.externals; @@ -304,6 +316,10 @@ function grammar(baseGrammar, options) { if (typeof word != 'string') { throw new Error("Grammar's 'word' property must be a named rule."); } + + if (word === 'ReferenceError') { + throw new Error("Grammar's 'word' property must be a valid rule name."); + } } let conflicts = baseGrammar.conflicts; @@ -341,7 +357,17 @@ function grammar(baseGrammar, options) { throw new Error("Grammar's inline must be an array of rules."); } - inline = inlineRules.map(symbol => symbol.name); + inline = inlineRules.filter((symbol, index, self) => { + if (self.findIndex(s => s.name === symbol.name) !== index) { + console.log(`Warning: duplicate inline rule '${symbol.name}'`); + return false; + } + if (symbol.name === 'ReferenceError') { + console.log(`Warning: inline rule '${symbol.symbol.name}' is not defined.`); + return false; + } + return true; + }).map(symbol => symbol.name); } let supertypes = baseGrammar.supertypes; @@ -381,14 +407,19 @@ function grammar(baseGrammar, options) { throw new Error("Grammar must have at least one rule."); } - return {name, word, rules, extras, conflicts, precedences, externals, inline, supertypes}; + return { grammar: { name, word, rules, extras, conflicts, precedences, externals, inline, supertypes } }; } -function checkArguments(ruleCount, caller, callerName, suffix = '') { - if (ruleCount > 1) { +function checkArguments(args, ruleCount, caller, callerName, suffix = '', argType = 'rule') { + // Allow for .map() usage where additional arguments are index and the entire array. + const isMapCall = ruleCount === 3 && typeof args[1] === 'number' && Array.isArray(args[2]); + if (isMapCall) { + ruleCount = typeof args[2] === 'number' ? 1 : args[2].length; + } + if (ruleCount > 1 && !isMapCall) { const error = new Error([ - `The \`${callerName}\` function only takes one rule argument${suffix}.`, - 'You passed multiple rules. Did you mean to call `seq`?\n' + `The \`${callerName}\` function only takes one ${argType} argument${suffix}.`, + `You passed in multiple ${argType}s. Did you mean to call \`seq\`?\n` ].join('\n')); Error.captureStackTrace(error, caller); throw error @@ -415,4 +446,4 @@ global.grammar = grammar; global.field = field; const result = require(process.env.TREE_SITTER_GRAMMAR_PATH); -console.log(JSON.stringify(result, null, 2)); +process.stdout.write(JSON.stringify(result.grammar, null, null)); diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/grammar-schema.json b/third-party/tree-sitter/tree-sitter/cli/src/generate/grammar-schema.json index 5ca353703e..59aa209ce5 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/grammar-schema.json +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/grammar-schema.json @@ -31,6 +31,16 @@ } }, + "precedences": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/rule" + } + } + }, + "externals": { "type": "array", "items": { @@ -63,7 +73,7 @@ }, "supertypes": { - "description": "A list of hidden rule names that should be considered supertypes in the generated node types file. See http://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types.", + "description": "A list of hidden rule names that should be considered supertypes in the generated node types file. See https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types.", "type": "array", "items": { "description": "the name of a rule in `rules` or `extras`", @@ -105,7 +115,8 @@ "type": "string", "pattern": "^PATTERN$" }, - "value": { "type": "string" } + "value": { "type": "string" }, + "flags": { "type": "string" } }, "required": ["type", "value"] }, @@ -240,7 +251,10 @@ "pattern": "^(PREC|PREC_LEFT|PREC_RIGHT|PREC_DYNAMIC)$" }, "value": { - "type": "integer" + "oneof": [ + { "type": "integer" }, + { "type": "string" } + ] }, "content": { "$ref": "#/definitions/rule" diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/grammar_files.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/grammar_files.rs new file mode 100644 index 0000000000..549bb2796c --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/grammar_files.rs @@ -0,0 +1,544 @@ +use super::write_file; +use anyhow::{anyhow, Context, Result}; +use heck::{ToKebabCase, ToShoutySnakeCase, ToSnakeCase, ToUpperCamelCase}; +use serde::Deserialize; +use serde_json::{json, Map, Value}; +use std::fs::File; +use std::io::BufReader; +use std::path::{Path, PathBuf}; +use std::{fs, str}; + +const CLI_VERSION: &str = env!("CARGO_PKG_VERSION"); +const CLI_VERSION_PLACEHOLDER: &str = "CLI_VERSION"; + +const PARSER_NAME_PLACEHOLDER: &str = "PARSER_NAME"; +const CAMEL_PARSER_NAME_PLACEHOLDER: &str = "CAMEL_PARSER_NAME"; +const UPPER_PARSER_NAME_PLACEHOLDER: &str = "UPPER_PARSER_NAME"; +const LOWER_PARSER_NAME_PLACEHOLDER: &str = "LOWER_PARSER_NAME"; + +const GRAMMAR_JS_TEMPLATE: &str = include_str!("./templates/grammar.js"); +const PACKAGE_JSON_TEMPLATE: &str = include_str!("./templates/package.json"); +const GITIGNORE_TEMPLATE: &str = include_str!("./templates/gitignore"); +const GITATTRIBUTES_TEMPLATE: &str = include_str!("./templates/gitattributes"); +const EDITORCONFIG_TEMPLATE: &str = include_str!("./templates/.editorconfig"); + +const RUST_BINDING_VERSION: &str = env!("CARGO_PKG_VERSION"); +const RUST_BINDING_VERSION_PLACEHOLDER: &str = "RUST_BINDING_VERSION"; + +const LIB_RS_TEMPLATE: &str = include_str!("./templates/lib.rs"); +const BUILD_RS_TEMPLATE: &str = include_str!("./templates/build.rs"); +const CARGO_TOML_TEMPLATE: &str = include_str!("./templates/cargo.toml"); + +const INDEX_JS_TEMPLATE: &str = include_str!("./templates/index.js"); +const INDEX_D_TS_TEMPLATE: &str = include_str!("./templates/index.d.ts"); +const JS_BINDING_CC_TEMPLATE: &str = include_str!("./templates/js-binding.cc"); +const BINDING_GYP_TEMPLATE: &str = include_str!("./templates/binding.gyp"); + +const MAKEFILE_TEMPLATE: &str = include_str!("./templates/makefile"); +const PARSER_NAME_H_TEMPLATE: &str = include_str!("./templates/PARSER_NAME.h"); +const PARSER_NAME_PC_IN_TEMPLATE: &str = include_str!("./templates/PARSER_NAME.pc.in"); + +const GO_MOD_TEMPLATE: &str = include_str!("./templates/go.mod"); +const BINDING_GO_TEMPLATE: &str = include_str!("./templates/binding.go"); +const BINDING_GO_TEST_TEMPLATE: &str = include_str!("./templates/binding_test.go"); + +const SETUP_PY_TEMPLATE: &str = include_str!("./templates/setup.py"); +const INIT_PY_TEMPLATE: &str = include_str!("./templates/__init__.py"); +const INIT_PYI_TEMPLATE: &str = include_str!("./templates/__init__.pyi"); +const PYPROJECT_TOML_TEMPLATE: &str = include_str!("./templates/pyproject.toml"); +const PY_BINDING_C_TEMPLATE: &str = include_str!("./templates/py-binding.c"); + +const PACKAGE_SWIFT_TEMPLATE: &str = include_str!("./templates/Package.swift"); + +#[derive(Deserialize, Debug)] +struct LanguageConfiguration {} + +#[derive(Deserialize, Debug)] +struct PackageJSON { + #[serde(rename = "tree-sitter")] + tree_sitter: Option>, +} + +pub fn path_in_ignore(repo_path: &Path) -> bool { + [ + "bindings", + "build", + "examples", + "node_modules", + "queries", + "script", + "src", + "target", + "test", + "types", + ] + .iter() + .any(|dir| repo_path.ends_with(dir)) +} + +fn insert_after( + map: Map, + after: &str, + key: &str, + value: Value, +) -> Map { + let mut entries = map.into_iter().collect::>(); + let after_index = entries + .iter() + .position(|(k, _)| k == after) + .unwrap_or(entries.len() - 1) + + 1; + entries.insert(after_index, (key.to_string(), value)); + entries.into_iter().collect() +} + +pub fn generate_grammar_files( + repo_path: &Path, + language_name: &str, + generate_bindings: bool, +) -> Result<()> { + let dashed_language_name = language_name.to_kebab_case(); + + // TODO: remove legacy code updates in v0.24.0 + + // Create or update package.json + let package_json_path_state = missing_path_else( + repo_path.join("package.json"), + |path| generate_file(path, PACKAGE_JSON_TEMPLATE, dashed_language_name.as_str()), + |path| { + let package_json_str = + fs::read_to_string(path).with_context(|| "Failed to read package.json")?; + let mut package_json = serde_json::from_str::>(&package_json_str) + .with_context(|| "Failed to parse package.json")?; + if generate_bindings { + let mut updated = false; + + let dependencies = package_json + .entry("dependencies".to_string()) + .or_insert_with(|| Value::Object(Map::new())) + .as_object_mut() + .unwrap(); + if dependencies.remove("nan").is_some() { + eprintln!("Replacing nan dependency with node-addon-api in package.json"); + dependencies.insert("node-addon-api".to_string(), "^7.1.0".into()); + updated = true; + } + if !dependencies.contains_key("node-gyp-build") { + eprintln!("Adding node-gyp-build dependency to package.json"); + dependencies.insert("node-gyp-build".to_string(), "^4.8.0".into()); + updated = true; + } + + let dev_dependencies = package_json + .entry("devDependencies".to_string()) + .or_insert_with(|| Value::Object(Map::new())) + .as_object_mut() + .unwrap(); + if !dev_dependencies.contains_key("prebuildify") { + eprintln!("Adding prebuildify devDependency to package.json"); + dev_dependencies.insert("prebuildify".to_string(), "^6.0.0".into()); + updated = true; + } + + let scripts = package_json + .entry("scripts".to_string()) + .or_insert_with(|| Value::Object(Map::new())) + .as_object_mut() + .unwrap(); + match scripts.get("install") { + None => { + eprintln!("Adding an install script to package.json"); + scripts.insert("install".to_string(), "node-gyp-build".into()); + updated = true; + } + Some(Value::String(v)) if v != "node-gyp-build" => { + eprintln!("Updating the install script in package.json"); + scripts.insert("install".to_string(), "node-gyp-build".into()); + updated = true; + } + Some(_) => {} + } + if !scripts.contains_key("prebuildify") { + eprintln!("Adding a prebuildify script to package.json"); + scripts.insert( + "prebuildify".to_string(), + "prebuildify --napi --strip".into(), + ); + updated = true; + } + + // insert `peerDependencies` after `dependencies` + if !package_json.contains_key("peerDependencies") { + eprintln!("Adding peerDependencies to package.json"); + package_json = insert_after( + package_json, + "dependencies", + "peerDependencies", + json!({"tree-sitter": "^0.21.0"}), + ); + + package_json = insert_after( + package_json, + "peerDependencies", + "peerDependenciesMeta", + json!({"tree_sitter": {"optional": true}}), + ); + updated = true; + } + + // insert `types` right after `main` + if !package_json.contains_key("types") { + eprintln!("Adding types to package.json"); + package_json = + insert_after(package_json, "main", "types", "bindings/node".into()); + updated = true; + } + + // insert `files` right after `keywords` + if !package_json.contains_key("files") { + eprintln!("Adding files to package.json"); + package_json = insert_after( + package_json, + "keywords", + "files", + json!([ + "grammar.js", + "binding.gyp", + "prebuilds/**", + "bindings/node/*", + "queries/*", + "src/**", + ]), + ); + updated = true; + } + + if updated { + let mut package_json_str = serde_json::to_string_pretty(&package_json)?; + package_json_str.push('\n'); + write_file(path, package_json_str)?; + } + } + + Ok(()) + }, + )?; + + let (_, package_json) = lookup_package_json_for_path(package_json_path_state.as_path())?; + + // Do not create a grammar.js file in a repo with multiple language configs + if !package_json.has_multiple_language_configs() { + missing_path(repo_path.join("grammar.js"), |path| { + generate_file(path, GRAMMAR_JS_TEMPLATE, language_name) + })?; + } + + if !generate_bindings { + // our job is done + return Ok(()); + } + + // Write .gitignore file + missing_path(repo_path.join(".gitignore"), |path| { + generate_file(path, GITIGNORE_TEMPLATE, language_name) + })?; + + // Write .gitattributes file + missing_path(repo_path.join(".gitattributes"), |path| { + generate_file(path, GITATTRIBUTES_TEMPLATE, language_name) + })?; + + // Write .editorconfig file + missing_path(repo_path.join(".editorconfig"), |path| { + generate_file(path, EDITORCONFIG_TEMPLATE, language_name) + })?; + + let bindings_dir = repo_path.join("bindings"); + + // Generate Rust bindings + missing_path(bindings_dir.join("rust"), create_dir)?.apply(|path| { + missing_path(path.join("lib.rs"), |path| { + generate_file(path, LIB_RS_TEMPLATE, language_name) + })?; + + missing_path(path.join("build.rs"), |path| { + generate_file(path, BUILD_RS_TEMPLATE, language_name) + })?; + + missing_path(repo_path.join("Cargo.toml"), |path| { + generate_file(path, CARGO_TOML_TEMPLATE, dashed_language_name.as_str()) + })?; + + Ok(()) + })?; + + // Generate Node bindings + missing_path(bindings_dir.join("node"), create_dir)?.apply(|path| { + missing_path_else( + path.join("index.js"), + |path| generate_file(path, INDEX_JS_TEMPLATE, language_name), + |path| { + let index_js = + fs::read_to_string(path).with_context(|| "Failed to read index.js")?; + if index_js.contains("../../build/Release") { + eprintln!("Replacing index.js with new binding API"); + generate_file(path, INDEX_JS_TEMPLATE, language_name)?; + } + Ok(()) + }, + )?; + + missing_path(path.join("index.d.ts"), |path| { + generate_file(path, INDEX_D_TS_TEMPLATE, language_name) + })?; + + missing_path_else( + path.join("binding.cc"), + |path| generate_file(path, JS_BINDING_CC_TEMPLATE, language_name), + |path| { + let binding_cc = + fs::read_to_string(path).with_context(|| "Failed to read binding.cc")?; + if binding_cc.contains("NAN_METHOD(New) {}") { + eprintln!("Replacing binding.cc with new binding API"); + generate_file(path, JS_BINDING_CC_TEMPLATE, language_name)?; + } + Ok(()) + }, + )?; + + // Create binding.gyp, or update it with new binding API. + missing_path_else( + repo_path.join("binding.gyp"), + |path| generate_file(path, BINDING_GYP_TEMPLATE, language_name), + |path| { + let binding_gyp = + fs::read_to_string(path).with_context(|| "Failed to read binding.gyp")?; + if binding_gyp.contains("require('nan')") { + eprintln!("Replacing binding.gyp with new binding API"); + generate_file(path, BINDING_GYP_TEMPLATE, language_name)?; + } + Ok(()) + }, + )?; + + Ok(()) + })?; + + // Generate C bindings + missing_path(bindings_dir.join("c"), create_dir)?.apply(|path| { + missing_path( + path.join(format!("tree-sitter-{language_name}.h")), + |path| generate_file(path, PARSER_NAME_H_TEMPLATE, language_name), + )?; + + missing_path( + path.join(format!("tree-sitter-{language_name}.pc.in")), + |path| generate_file(path, PARSER_NAME_PC_IN_TEMPLATE, language_name), + )?; + + missing_path(repo_path.join("Makefile"), |path| { + generate_file(path, MAKEFILE_TEMPLATE, language_name) + })?; + + Ok(()) + })?; + + // Generate Go bindings + missing_path(bindings_dir.join("go"), create_dir)?.apply(|path| { + missing_path(path.join("binding.go"), |path| { + generate_file(path, BINDING_GO_TEMPLATE, language_name) + })?; + + missing_path(path.join("binding_test.go"), |path| { + generate_file(path, BINDING_GO_TEST_TEMPLATE, language_name) + })?; + + missing_path(path.join("go.mod"), |path| { + generate_file(path, GO_MOD_TEMPLATE, language_name) + })?; + + Ok(()) + })?; + + // Generate Python bindings + missing_path( + bindings_dir + .join("python") + .join(format!("tree_sitter_{}", language_name.to_snake_case())), + create_dir, + )? + .apply(|path| { + missing_path(path.join("binding.c"), |path| { + generate_file(path, PY_BINDING_C_TEMPLATE, language_name) + })?; + + missing_path(path.join("__init__.py"), |path| { + generate_file(path, INIT_PY_TEMPLATE, language_name) + })?; + + missing_path(path.join("__init__.pyi"), |path| { + generate_file(path, INIT_PYI_TEMPLATE, language_name) + })?; + + missing_path(path.join("py.typed"), |path| { + generate_file(path, "", language_name) // py.typed is empty + })?; + + missing_path(repo_path.join("setup.py"), |path| { + generate_file(path, SETUP_PY_TEMPLATE, language_name) + })?; + + missing_path(repo_path.join("pyproject.toml"), |path| { + generate_file(path, PYPROJECT_TOML_TEMPLATE, dashed_language_name.as_str()) + })?; + + Ok(()) + })?; + + // Generate Swift bindings + missing_path( + bindings_dir + .join("swift") + .join(format!("TreeSitter{}", language_name.to_upper_camel_case())), + create_dir, + )? + .apply(|path| { + missing_path(path.join(format!("{language_name}.h")), |path| { + generate_file(path, PARSER_NAME_H_TEMPLATE, language_name) + })?; + + missing_path(repo_path.join("Package.swift"), |path| { + generate_file(path, PACKAGE_SWIFT_TEMPLATE, language_name) + })?; + + Ok(()) + })?; + + Ok(()) +} + +fn lookup_package_json_for_path(path: &Path) -> Result<(PathBuf, PackageJSON)> { + let mut pathbuf = path.to_owned(); + loop { + let package_json = pathbuf + .exists() + .then(|| -> Result { + let file = + File::open(pathbuf.as_path()).with_context(|| "Failed to open package.json")?; + let package_json: PackageJSON = serde_json::from_reader(BufReader::new(file))?; + Ok(package_json) + }) + .transpose()?; + if let Some(package_json) = package_json { + if package_json.tree_sitter.is_some() { + return Ok((pathbuf, package_json)); + } + } + pathbuf.pop(); // package.json + if !pathbuf.pop() { + return Err(anyhow!(concat!( + "Failed to locate a package.json file that has a \"tree-sitter\" section,", + " please ensure you have one, and if you don't then consult the docs", + ))); + } + pathbuf.push("package.json"); + } +} + +fn generate_file(path: &Path, template: &str, language_name: &str) -> Result<()> { + write_file( + path, + template + .replace( + CAMEL_PARSER_NAME_PLACEHOLDER, + &language_name.to_upper_camel_case(), + ) + .replace( + UPPER_PARSER_NAME_PLACEHOLDER, + &language_name.to_shouty_snake_case(), + ) + .replace( + LOWER_PARSER_NAME_PLACEHOLDER, + &language_name.to_snake_case(), + ) + .replace(PARSER_NAME_PLACEHOLDER, language_name) + .replace(CLI_VERSION_PLACEHOLDER, CLI_VERSION) + .replace(RUST_BINDING_VERSION_PLACEHOLDER, RUST_BINDING_VERSION), + ) +} + +fn create_dir(path: &Path) -> Result<()> { + fs::create_dir_all(path) + .with_context(|| format!("Failed to create {:?}", path.to_string_lossy())) +} + +#[derive(PartialEq, Eq, Debug)] +enum PathState { + Exists(PathBuf), + Missing(PathBuf), +} + +#[allow(dead_code)] +impl PathState { + fn exists(&self, mut action: impl FnMut(&Path) -> Result<()>) -> Result<&Self> { + if let Self::Exists(path) = self { + action(path.as_path())?; + } + Ok(self) + } + + fn missing(&self, mut action: impl FnMut(&Path) -> Result<()>) -> Result<&Self> { + if let Self::Missing(path) = self { + action(path.as_path())?; + } + Ok(self) + } + + fn apply(&self, mut action: impl FnMut(&Path) -> Result<()>) -> Result<&Self> { + action(self.as_path())?; + Ok(self) + } + + fn apply_state(&self, mut action: impl FnMut(&Self) -> Result<()>) -> Result<&Self> { + action(self)?; + Ok(self) + } + + fn as_path(&self) -> &Path { + match self { + Self::Exists(path) | Self::Missing(path) => path.as_path(), + } + } +} + +fn missing_path(path: PathBuf, mut action: F) -> Result +where + F: FnMut(&Path) -> Result<()>, +{ + if !path.exists() { + action(path.as_path())?; + Ok(PathState::Missing(path)) + } else { + Ok(PathState::Exists(path)) + } +} + +fn missing_path_else(path: PathBuf, mut action: T, mut else_action: F) -> Result +where + T: FnMut(&Path) -> Result<()>, + F: FnMut(&Path) -> Result<()>, +{ + if !path.exists() { + action(path.as_path())?; + Ok(PathState::Missing(path)) + } else { + else_action(path.as_path())?; + Ok(PathState::Exists(path)) + } +} + +impl PackageJSON { + fn has_multiple_language_configs(&self) -> bool { + self.tree_sitter.as_ref().is_some_and(|c| c.len() > 1) + } +} diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/grammars.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/grammars.rs index db8d8524c6..5f057a1bcc 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/grammars.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/grammars.rs @@ -4,7 +4,7 @@ use std::collections::HashMap; use std::fmt; #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)] -pub(crate) enum VariableType { +pub enum VariableType { Hidden, Auxiliary, Anonymous, @@ -14,20 +14,20 @@ pub(crate) enum VariableType { // Input grammar #[derive(Clone, Debug, PartialEq, Eq)] -pub(crate) struct Variable { +pub struct Variable { pub name: String, pub kind: VariableType, pub rule: Rule, } #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub(crate) enum PrecedenceEntry { +pub enum PrecedenceEntry { Name(String), Symbol(String), } #[derive(Debug, Default, PartialEq, Eq)] -pub(crate) struct InputGrammar { +pub struct InputGrammar { pub name: String, pub variables: Vec, pub extra_symbols: Vec, @@ -42,7 +42,7 @@ pub(crate) struct InputGrammar { // Extracted lexical grammar #[derive(Debug, PartialEq, Eq)] -pub(crate) struct LexicalVariable { +pub struct LexicalVariable { pub name: String, pub kind: VariableType, pub implicit_precedence: i32, @@ -50,7 +50,7 @@ pub(crate) struct LexicalVariable { } #[derive(Debug, Default, PartialEq, Eq)] -pub(crate) struct LexicalGrammar { +pub struct LexicalGrammar { pub nfa: Nfa, pub variables: Vec, } @@ -58,7 +58,7 @@ pub(crate) struct LexicalGrammar { // Extracted syntax grammar #[derive(Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub(crate) struct ProductionStep { +pub struct ProductionStep { pub symbol: Symbol, pub precedence: Precedence, pub associativity: Option, @@ -67,33 +67,33 @@ pub(crate) struct ProductionStep { } #[derive(Clone, Debug, Default, PartialEq, Eq)] -pub(crate) struct Production { +pub struct Production { pub steps: Vec, pub dynamic_precedence: i32, } #[derive(Default)] -pub(crate) struct InlinedProductionMap { +pub struct InlinedProductionMap { pub productions: Vec, pub production_map: HashMap<(*const Production, u32), Vec>, } #[derive(Clone, Debug, PartialEq, Eq)] -pub(crate) struct SyntaxVariable { +pub struct SyntaxVariable { pub name: String, pub kind: VariableType, pub productions: Vec, } #[derive(Clone, Debug, PartialEq, Eq)] -pub(crate) struct ExternalToken { +pub struct ExternalToken { pub name: String, pub kind: VariableType, pub corresponding_internal_token: Option, } #[derive(Debug, Default)] -pub(crate) struct SyntaxGrammar { +pub struct SyntaxGrammar { pub variables: Vec, pub extra_symbols: Vec, pub expected_conflicts: Vec>, @@ -106,7 +106,7 @@ pub(crate) struct SyntaxGrammar { #[cfg(test)] impl ProductionStep { - pub(crate) fn new(symbol: Symbol) -> Self { + pub const fn new(symbol: Symbol) -> Self { Self { symbol, precedence: Precedence::None, @@ -116,11 +116,7 @@ impl ProductionStep { } } - pub(crate) fn with_prec( - self, - precedence: Precedence, - associativity: Option, - ) -> Self { + pub fn with_prec(self, precedence: Precedence, associativity: Option) -> Self { Self { symbol: self.symbol, precedence, @@ -130,7 +126,7 @@ impl ProductionStep { } } - pub(crate) fn with_alias(self, value: &str, is_named: bool) -> Self { + pub fn with_alias(self, value: &str, is_named: bool) -> Self { Self { symbol: self.symbol, precedence: self.precedence, @@ -142,7 +138,7 @@ impl ProductionStep { field_name: self.field_name, } } - pub(crate) fn with_field_name(self, name: &str) -> Self { + pub fn with_field_name(self, name: &str) -> Self { Self { symbol: self.symbol, precedence: self.precedence, @@ -155,7 +151,7 @@ impl ProductionStep { impl Production { pub fn first_symbol(&self) -> Option { - self.steps.first().map(|s| s.symbol.clone()) + self.steps.first().map(|s| s.symbol) } } @@ -195,24 +191,24 @@ impl Variable { } impl VariableType { - pub fn is_visible(&self) -> bool { - *self == VariableType::Named || *self == VariableType::Anonymous + pub fn is_visible(self) -> bool { + self == Self::Named || self == Self::Anonymous } } impl LexicalGrammar { pub fn variable_indices_for_nfa_states<'a>( &'a self, - state_ids: &'a Vec, + state_ids: &'a [u32], ) -> impl Iterator + 'a { let mut prev = None; state_ids.iter().filter_map(move |state_id| { let variable_id = self.variable_index_for_nfa_state(*state_id); - if prev != Some(variable_id) { + if prev == Some(variable_id) { + None + } else { prev = Some(variable_id); prev - } else { - None } }) } @@ -246,7 +242,7 @@ impl InlinedProductionMap { .map(|production_indices| { production_indices .iter() - .cloned() + .copied() .map(move |index| &self.productions[index]) }) } @@ -255,8 +251,8 @@ impl InlinedProductionMap { impl fmt::Display for PrecedenceEntry { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { - PrecedenceEntry::Name(n) => write!(f, "'{}'", n), - PrecedenceEntry::Symbol(s) => write!(f, "$.{}", s), + Self::Name(n) => write!(f, "'{n}'"), + Self::Symbol(s) => write!(f, "$.{s}"), } } } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/mod.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/mod.rs index 4838828b1c..ea850c8d3c 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/mod.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/mod.rs @@ -1,7 +1,25 @@ -mod binding_files; +use std::io::Write; +use std::path::{Path, PathBuf}; +use std::process::{Command, Stdio}; +use std::{env, fs}; + +use anyhow::{anyhow, Context, Result}; +use lazy_static::lazy_static; +use regex::{Regex, RegexBuilder}; +use semver::Version; + +use build_tables::build_tables; +use grammar_files::path_in_ignore; +use grammars::{InlinedProductionMap, LexicalGrammar, SyntaxGrammar}; +use parse_grammar::parse_grammar; +use prepare_grammar::prepare_grammar; +use render::render_c_code; +use rules::AliasMap; + mod build_tables; mod char_tree; mod dedup; +mod grammar_files; mod grammars; mod nfa; mod node_types; @@ -11,21 +29,6 @@ mod render; mod rules; mod tables; -use self::build_tables::build_tables; -use self::grammars::{InlinedProductionMap, LexicalGrammar, SyntaxGrammar}; -use self::parse_grammar::parse_grammar; -use self::prepare_grammar::prepare_grammar; -use self::render::render_c_code; -use self::rules::AliasMap; -use anyhow::{anyhow, Context, Result}; -use lazy_static::lazy_static; -use regex::{Regex, RegexBuilder}; -use semver::Version; -use std::fs; -use std::io::Write; -use std::path::{Path, PathBuf}; -use std::process::{Command, Stdio}; - lazy_static! { static ref JSON_COMMENT_REGEX: Regex = RegexBuilder::new("^\\s*//.*") .multi_line(true) @@ -38,13 +41,55 @@ struct GeneratedParser { node_types_json: String, } +pub const ALLOC_HEADER: &str = include_str!("./templates/alloc.h"); + pub fn generate_parser_in_directory( - repo_path: &PathBuf, + repo_path: &Path, grammar_path: Option<&str>, abi_version: usize, generate_bindings: bool, report_symbol_name: Option<&str>, + js_runtime: Option<&str>, ) -> Result<()> { + let mut repo_path = repo_path.to_owned(); + let mut grammar_path = grammar_path; + + // Populate a new empty grammar directory. + if let Some(path) = grammar_path { + let path = PathBuf::from(path); + if !path + .try_exists() + .with_context(|| "Some error with specified path")? + { + fs::create_dir_all(&path)?; + grammar_path = None; + repo_path = path; + } + } + + if repo_path.is_dir() && !repo_path.join("grammar.js").exists() && !path_in_ignore(&repo_path) { + if let Some(dir_name) = repo_path + .file_name() + .map(|x| x.to_string_lossy().to_ascii_lowercase()) + { + if let Some(language_name) = dir_name + .strip_prefix("tree-sitter-") + .or_else(|| Some(dir_name.as_ref())) + { + grammar_files::generate_grammar_files(&repo_path, language_name, false)?; + } + } + } + + // Read the grammar.json. + let grammar_json = if let Some(path) = grammar_path { + load_grammar_file(path.as_ref(), js_runtime)? + } else { + let grammar_js_path = + grammar_path.map_or(repo_path.join("grammar.js"), std::convert::Into::into); + load_grammar_file(&grammar_js_path, js_runtime)? + }; + let src_path = repo_path.join("src"); let header_path = src_path.join("tree_sitter"); @@ -52,17 +97,9 @@ pub fn generate_parser_in_directory( fs::create_dir_all(&src_path)?; fs::create_dir_all(&header_path)?; - // Read the grammar.json. - let grammar_json; - match grammar_path { - Some(path) => { - grammar_json = load_grammar_file(path.as_ref())?; - } - None => { - let grammar_js_path = grammar_path.map_or(repo_path.join("grammar.js"), |s| s.into()); - grammar_json = load_grammar_file(&grammar_js_path)?; - fs::write(&src_path.join("grammar.json"), &grammar_json)?; - } + if grammar_path.is_none() { + fs::write(src_path.join("grammar.json"), &grammar_json) + .with_context(|| format!("Failed to write grammar.json to {src_path:?}"))?; } // Parse and preprocess the grammar. @@ -79,7 +116,7 @@ pub fn generate_parser_in_directory( &language_name, syntax_grammar, lexical_grammar, - inlines, + &inlines, simple_aliases, abi_version, report_symbol_name, @@ -87,10 +124,12 @@ pub fn generate_parser_in_directory( write_file(&src_path.join("parser.c"), c_code)?; write_file(&src_path.join("node-types.json"), node_types_json)?; + write_file(&header_path.join("alloc.h"), ALLOC_HEADER)?; + write_file(&header_path.join("array.h"), tree_sitter::ARRAY_HEADER)?; write_file(&header_path.join("parser.h"), tree_sitter::PARSER_HEADER)?; - if generate_bindings { - binding_files::generate_binding_files(&repo_path, &language_name)?; + if !path_in_ignore(&repo_path) { + grammar_files::generate_grammar_files(&repo_path, &language_name, generate_bindings)?; } Ok(()) @@ -105,7 +144,7 @@ pub fn generate_parser_for_grammar(grammar_json: &str) -> Result<(String, String &input_grammar.name, syntax_grammar, lexical_grammar, - inlines, + &inlines, simple_aliases, tree_sitter::LANGUAGE_VERSION, None, @@ -114,10 +153,10 @@ pub fn generate_parser_for_grammar(grammar_json: &str) -> Result<(String, String } fn generate_parser_for_grammar_with_opts( - name: &String, + name: &str, syntax_grammar: SyntaxGrammar, lexical_grammar: LexicalGrammar, - inlines: InlinedProductionMap, + inlines: &InlinedProductionMap, simple_aliases: AliasMap, abi_version: usize, report_symbol_name: Option<&str>, @@ -135,7 +174,7 @@ fn generate_parser_for_grammar_with_opts( &lexical_grammar, &simple_aliases, &variable_info, - &inlines, + inlines, report_symbol_name, )?; let c_code = render_c_code( @@ -155,32 +194,40 @@ fn generate_parser_for_grammar_with_opts( }) } -pub fn load_grammar_file(grammar_path: &Path) -> Result { +pub fn load_grammar_file(grammar_path: &Path, js_runtime: Option<&str>) -> Result { + if grammar_path.is_dir() { + return Err(anyhow!( + "Path to a grammar file with `.js` or `.json` extension is required" + )); + } match grammar_path.extension().and_then(|e| e.to_str()) { - Some("js") => Ok(load_js_grammar_file(grammar_path)?), - Some("json") => Ok(fs::read_to_string(grammar_path)?), - _ => Err(anyhow!( - "Unknown grammar file extension: {:?}", - grammar_path - )), + Some("js") => Ok(load_js_grammar_file(grammar_path, js_runtime) + .with_context(|| "Failed to load grammar.js")?), + Some("json") => { + Ok(fs::read_to_string(grammar_path).with_context(|| "Failed to load grammar.json")?) + } + _ => Err(anyhow!("Unknown grammar file extension: {grammar_path:?}",)), } } -fn load_js_grammar_file(grammar_path: &Path) -> Result { +fn load_js_grammar_file(grammar_path: &Path, js_runtime: Option<&str>) -> Result { let grammar_path = fs::canonicalize(grammar_path)?; - let mut node_process = Command::new("node") + + let js_runtime = js_runtime.unwrap_or("node"); + + let mut node_process = Command::new(js_runtime) .env("TREE_SITTER_GRAMMAR_PATH", grammar_path) .stdin(Stdio::piped()) .stdout(Stdio::piped()) .spawn() - .expect("Failed to run `node`"); + .with_context(|| format!("Failed to run `{js_runtime}`"))?; let mut node_stdin = node_process .stdin .take() - .expect("Failed to open stdin for node"); + .with_context(|| "Failed to open stdin for node")?; let cli_version = Version::parse(env!("CARGO_PKG_VERSION")) - .expect("Could not parse this package's version as semver."); + .with_context(|| "Could not parse this package's version as semver.")?; write!( node_stdin, "global.TREE_SITTER_CLI_VERSION_MAJOR = {}; @@ -188,24 +235,43 @@ fn load_js_grammar_file(grammar_path: &Path) -> Result { global.TREE_SITTER_CLI_VERSION_PATCH = {};", cli_version.major, cli_version.minor, cli_version.patch, ) - .expect("Failed to write tree-sitter version to node's stdin"); + .with_context(|| "Failed to write tree-sitter version to node's stdin")?; let javascript_code = include_bytes!("./dsl.js"); node_stdin .write(javascript_code) - .expect("Failed to write grammar dsl to node's stdin"); + .with_context(|| "Failed to write grammar dsl to node's stdin")?; drop(node_stdin); let output = node_process .wait_with_output() - .expect("Failed to read output from node"); + .with_context(|| "Failed to read output from node")?; match output.status.code() { None => panic!("Node process was killed"), - Some(0) => {} - Some(code) => return Err(anyhow!("Node process exited with status {}", code)), - } + Some(0) => { + let stdout = + String::from_utf8(output.stdout).with_context(|| "Got invalid UTF8 from node")?; - let mut result = String::from_utf8(output.stdout).expect("Got invalid UTF8 from node"); - result.push('\n'); - Ok(result) + let mut grammar_json = &stdout[..]; + + if let Some(pos) = stdout.rfind('\n') { + // If there's a newline, split the last line from the rest of the output + let node_output = &stdout[..pos]; + grammar_json = &stdout[pos + 1..]; + + let mut stdout = std::io::stdout().lock(); + stdout.write_all(node_output.as_bytes())?; + stdout.write_all(b"\n")?; + stdout.flush()?; + } + + Ok(serde_json::to_string_pretty( + &serde_json::from_str::(grammar_json) + .with_context(|| "Failed to parse grammar JSON")?, + ) + .with_context(|| "Failed to serialize grammar JSON")? + + "\n") + } + Some(code) => Err(anyhow!("Node process exited with status {code}")), + } } fn write_file(path: &Path, body: impl AsRef<[u8]>) -> Result<()> { diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/nfa.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/nfa.rs index 6be360826c..66f78074aa 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/nfa.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/nfa.rs @@ -28,7 +28,7 @@ pub enum NfaState { }, } -#[derive(PartialEq, Eq)] +#[derive(PartialEq, Eq, Default)] pub struct Nfa { pub states: Vec, } @@ -47,40 +47,36 @@ pub struct NfaTransition { pub states: Vec, } -impl Default for Nfa { - fn default() -> Self { - Self { states: Vec::new() } - } -} - const END: u32 = char::MAX as u32 + 1; impl CharacterSet { /// Create a character set with a single character. - pub fn empty() -> Self { - CharacterSet { ranges: Vec::new() } + pub const fn empty() -> Self { + Self { ranges: Vec::new() } } /// Create a character set with a given *inclusive* range of characters. + #[allow(clippy::single_range_in_vec_init)] pub fn from_range(mut first: char, mut last: char) -> Self { if first > last { swap(&mut first, &mut last); } - CharacterSet { + Self { ranges: vec![(first as u32)..(last as u32 + 1)], } } /// Create a character set with a single character. + #[allow(clippy::single_range_in_vec_init)] pub fn from_char(c: char) -> Self { - CharacterSet { + Self { ranges: vec![(c as u32)..(c as u32 + 1)], } } /// Create a character set containing all characters *not* present /// in this character set. - pub fn negate(mut self) -> CharacterSet { + pub fn negate(mut self) -> Self { let mut i = 0; let mut previous_end = 0; while i < self.ranges.len() { @@ -110,10 +106,10 @@ impl CharacterSet { self } - pub fn add(mut self, other: &CharacterSet) -> Self { + pub fn add(mut self, other: &Self) -> Self { let mut index = 0; for range in &other.ranges { - index = self.add_int_range(index, range.start as u32, range.end as u32); + index = self.add_int_range(index, range.start, range.end); } self } @@ -143,7 +139,7 @@ impl CharacterSet { i } - pub fn does_intersect(&self, other: &CharacterSet) -> bool { + pub fn does_intersect(&self, other: &Self) -> bool { let mut left_ranges = self.ranges.iter(); let mut right_ranges = other.ranges.iter(); let mut left_range = left_ranges.next(); @@ -163,7 +159,7 @@ impl CharacterSet { /// Get the set of characters that are present in both this set /// and the other set. Remove those common characters from both /// of the operands. - pub fn remove_intersection(&mut self, other: &mut CharacterSet) -> CharacterSet { + pub fn remove_intersection(&mut self, other: &mut Self) -> Self { let mut intersection = Vec::new(); let mut left_i = 0; let mut right_i = 0; @@ -209,29 +205,28 @@ impl CharacterSet { } } } - Ordering::Equal => { - // [ L ] - // [ R ] - if left.end < right.end { - intersection.push(left.start..left.end); - right.start = left.end; - self.ranges.remove(left_i); - } - // [ L ] - // [ R ] - else if left.end == right.end { - intersection.push(left.clone()); - self.ranges.remove(left_i); - other.ranges.remove(right_i); - } - // [ L ] - // [ R ] - else if left.end > right.end { - intersection.push(right.clone()); - left.start = right.end; - other.ranges.remove(right_i); - } + // [ L ] + // [ R ] + Ordering::Equal if left.end < right.end => { + intersection.push(left.start..left.end); + right.start = left.end; + self.ranges.remove(left_i); + } + // [ L ] + // [ R ] + Ordering::Equal if left.end == right.end => { + intersection.push(left.clone()); + self.ranges.remove(left_i); + other.ranges.remove(right_i); } + // [ L ] + // [ R ] + Ordering::Equal if left.end > right.end => { + intersection.push(right.clone()); + left.start = right.end; + other.ranges.remove(right_i); + } + Ordering::Equal => {} Ordering::Greater => { // [ L ] // [ R ] @@ -271,30 +266,30 @@ impl CharacterSet { } } } - CharacterSet { + Self { ranges: intersection, } } /// Produces a `CharacterSet` containing every character in `self` that is not present in /// `other`. - pub fn difference(mut self, mut other: CharacterSet) -> CharacterSet { + pub fn difference(mut self, mut other: Self) -> Self { self.remove_intersection(&mut other); self } /// Produces a `CharacterSet` containing every character that is in _exactly one_ of `self` or /// `other`, but is not present in both sets. - pub fn symmetric_difference(mut self, mut other: CharacterSet) -> CharacterSet { + pub fn symmetric_difference(mut self, mut other: Self) -> Self { self.remove_intersection(&mut other); self.add(&other) } - pub fn iter<'a>(&'a self) -> impl Iterator + 'a { - self.ranges.iter().flat_map(|r| r.clone()) + pub fn iter(&self) -> impl Iterator + '_ { + self.ranges.iter().flat_map(std::clone::Clone::clone) } - pub fn chars<'a>(&'a self) -> impl Iterator + 'a { + pub fn chars(&self) -> impl Iterator + '_ { self.iter().filter_map(char::from_u32) } @@ -329,11 +324,10 @@ impl CharacterSet { prev_range_successor += 1; } prev_range = Some(range.start..c); - None } else { prev_range = Some(c..c); - None } + None }) .collect() } @@ -344,13 +338,19 @@ impl CharacterSet { } impl Ord for CharacterSet { - fn cmp(&self, other: &CharacterSet) -> Ordering { + fn cmp(&self, other: &Self) -> Ordering { let count_cmp = self .ranges .iter() - .map(|r| r.len()) + .map(std::iter::ExactSizeIterator::len) .sum::() - .cmp(&other.ranges.iter().map(|r| r.len()).sum()); + .cmp( + &other + .ranges + .iter() + .map(std::iter::ExactSizeIterator::len) + .sum(), + ); if count_cmp != Ordering::Equal { return count_cmp; } @@ -368,12 +368,12 @@ impl Ord for CharacterSet { } } } - return Ordering::Equal; + Ordering::Equal } } impl PartialOrd for CharacterSet { - fn partial_cmp(&self, other: &CharacterSet) -> Option { + fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) } } @@ -390,7 +390,7 @@ impl fmt::Debug for CharacterSet { if i > 0 { write!(f, ", ")?; } - write!(f, "{:?}", c)?; + write!(f, "{c:?}")?; } write!(f, "]")?; Ok(()) @@ -398,8 +398,8 @@ impl fmt::Debug for CharacterSet { } impl Nfa { - pub fn new() -> Self { - Nfa { states: Vec::new() } + pub const fn new() -> Self { + Self { states: Vec::new() } } pub fn last_state_id(&self) -> u32 { @@ -409,9 +409,9 @@ impl Nfa { impl fmt::Debug for Nfa { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Nfa {{ states: {{\n")?; + writeln!(f, "Nfa {{ states: {{")?; for (i, state) in self.states.iter().enumerate() { - write!(f, " {}: {:?},\n", i, state)?; + writeln!(f, " {i}: {state:?},")?; } write!(f, "}} }}")?; Ok(()) @@ -434,7 +434,7 @@ impl<'a> NfaCursor<'a> { } pub fn force_reset(&mut self, states: Vec) { - self.state_ids = states + self.state_ids = states; } pub fn transition_chars(&self) -> impl Iterator { @@ -464,7 +464,7 @@ impl<'a> NfaCursor<'a> { fn group_transitions<'b>( iter: impl Iterator, ) -> Vec { - let mut result: Vec = Vec::new(); + let mut result = Vec::::new(); for (chars, is_sep, prec, state) in iter { let mut chars = chars.clone(); let mut i = 0; @@ -472,9 +472,8 @@ impl<'a> NfaCursor<'a> { let intersection = result[i].characters.remove_intersection(&mut chars); if !intersection.is_empty() { let mut intersection_states = result[i].states.clone(); - match intersection_states.binary_search(&state) { - Err(j) => intersection_states.insert(j, state), - _ => {} + if let Err(j) = intersection_states.binary_search(&state) { + intersection_states.insert(j, state); } let intersection_transition = NfaTransition { characters: intersection, @@ -824,8 +823,7 @@ mod tests { .map(|(chars, is_sep, prec, state)| (chars, *is_sep, *prec, *state)) ), row.1, - "row {}", - i + "row {i}", ); } } @@ -966,15 +964,14 @@ mod tests { row.right ); - let symm_difference = row.left_only.clone().add(&mut row.right_only.clone()); + let symm_difference = row.left_only.clone().add(&row.right_only); assert_eq!( row.left.clone().symmetric_difference(row.right.clone()), symm_difference, - "row {}b: {:?} ~~ {:?}", - i, + "row {i}b: {:?} ~~ {:?}", row.left, row.right - ) + ); } } @@ -1035,6 +1032,7 @@ mod tests { } #[test] + #[allow(clippy::single_range_in_vec_init)] fn test_character_set_get_ranges() { struct Row { chars: Vec, @@ -1064,12 +1062,9 @@ mod tests { chars, ruled_out_chars, expected_ranges, - } in table.iter() + } in &table { - let ruled_out_chars = ruled_out_chars - .into_iter() - .map(|c: &char| *c as u32) - .collect(); + let ruled_out_chars = ruled_out_chars.iter().map(|c: &char| *c as u32).collect(); let mut set = CharacterSet::empty(); for c in chars { set = set.add_char(*c); diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/node_types.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/node_types.rs index 4391898003..7f5124589c 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/node_types.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/node_types.rs @@ -6,19 +6,19 @@ use std::cmp::Ordering; use std::collections::{BTreeMap, HashMap, HashSet}; #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub(crate) enum ChildType { +pub enum ChildType { Normal(Symbol), Aliased(Alias), } #[derive(Clone, Debug, Default, PartialEq, Eq)] -pub(crate) struct FieldInfo { +pub struct FieldInfo { pub quantity: ChildQuantity, pub types: Vec, } #[derive(Clone, Debug, Default, PartialEq, Eq)] -pub(crate) struct VariableInfo { +pub struct VariableInfo { pub fields: HashMap, pub children: FieldInfo, pub children_without_fields: FieldInfo, @@ -26,7 +26,7 @@ pub(crate) struct VariableInfo { } #[derive(Debug, Serialize, PartialEq, Eq, Default, PartialOrd, Ord)] -pub(crate) struct NodeInfoJSON { +pub struct NodeInfoJSON { #[serde(rename = "type")] kind: String, named: bool, @@ -39,14 +39,14 @@ pub(crate) struct NodeInfoJSON { } #[derive(Clone, Debug, Serialize, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub(crate) struct NodeTypeJSON { +pub struct NodeTypeJSON { #[serde(rename = "type")] kind: String, named: bool, } #[derive(Debug, Serialize, PartialEq, Eq, PartialOrd, Ord)] -pub(crate) struct FieldInfoJSON { +pub struct FieldInfoJSON { multiple: bool, required: bool, types: Vec, @@ -61,7 +61,7 @@ pub struct ChildQuantity { impl Default for FieldInfoJSON { fn default() -> Self { - FieldInfoJSON { + Self { multiple: false, required: true, types: Vec::new(), @@ -76,23 +76,25 @@ impl Default for ChildQuantity { } impl ChildQuantity { - fn zero() -> Self { - ChildQuantity { + #[must_use] + const fn zero() -> Self { + Self { exists: false, required: false, multiple: false, } } - fn one() -> Self { - ChildQuantity { + #[must_use] + const fn one() -> Self { + Self { exists: true, required: true, multiple: false, } } - fn append(&mut self, other: ChildQuantity) { + fn append(&mut self, other: Self) { if other.exists { if self.exists || other.multiple { self.multiple = true; @@ -104,7 +106,7 @@ impl ChildQuantity { } } - fn union(&mut self, other: ChildQuantity) -> bool { + fn union(&mut self, other: Self) -> bool { let mut result = false; if !self.exists && other.exists { result = true; @@ -144,7 +146,7 @@ impl ChildQuantity { /// 2. aliases. If a parent node type `M` is aliased as some other type `N`, /// then nodes which *appear* to have type `N` may have internal structure based /// on `M`. -pub(crate) fn get_variable_info( +pub fn get_variable_info( syntax_grammar: &SyntaxGrammar, lexical_grammar: &LexicalGrammar, default_aliases: &AliasMap, @@ -209,12 +211,12 @@ pub(crate) fn get_variable_info( let field_info = variable_info .fields .entry(field_name.clone()) - .or_insert(FieldInfo::default()); + .or_insert_with(FieldInfo::default); did_change |= extend_sorted(&mut field_info.types, Some(&child_type)); let production_field_quantity = production_field_quantities .entry(field_name) - .or_insert(ChildQuantity::zero()); + .or_insert_with(ChildQuantity::zero); // Inherit the types and quantities of hidden children associated with fields. if child_is_hidden && child_symbol.is_non_terminal() { @@ -252,13 +254,13 @@ pub(crate) fn get_variable_info( for (field_name, child_field_info) in &child_variable_info.fields { production_field_quantities .entry(field_name) - .or_insert(ChildQuantity::zero()) + .or_insert_with(ChildQuantity::zero) .append(child_field_info.quantity); did_change |= extend_sorted( &mut variable_info .fields .entry(field_name.clone()) - .or_insert(FieldInfo::default()) + .or_insert_with(FieldInfo::default) .types, &child_field_info.types, ); @@ -308,12 +310,12 @@ pub(crate) fn get_variable_info( .quantity .union(production_children_without_fields_quantity); - for (field_name, info) in variable_info.fields.iter_mut() { + for (field_name, info) in &mut variable_info.fields { did_change |= info.quantity.union( production_field_quantities .get(field_name) - .cloned() - .unwrap_or(ChildQuantity::zero()), + .copied() + .unwrap_or_else(ChildQuantity::zero), ); } } @@ -345,8 +347,8 @@ pub(crate) fn get_variable_info( .types .retain(child_type_is_visible); } - for variable_info in result.iter_mut() { - for (_, field_info) in variable_info.fields.iter_mut() { + for variable_info in &mut result { + for field_info in variable_info.fields.values_mut() { field_info.types.retain(child_type_is_visible); } variable_info.fields.retain(|_, v| !v.types.is_empty()); @@ -359,11 +361,11 @@ pub(crate) fn get_variable_info( Ok(result) } -pub(crate) fn generate_node_types_json( +pub fn generate_node_types_json( syntax_grammar: &SyntaxGrammar, lexical_grammar: &LexicalGrammar, default_aliases: &AliasMap, - variable_info: &Vec, + variable_info: &[VariableInfo], ) -> Vec { let mut node_types_json = BTreeMap::new(); @@ -373,7 +375,7 @@ pub(crate) fn generate_node_types_json( named: alias.is_named, }, ChildType::Normal(symbol) => { - if let Some(alias) = default_aliases.get(&symbol) { + if let Some(alias) = default_aliases.get(symbol) { NodeTypeJSON { kind: alias.value.clone(), named: alias.is_named, @@ -408,15 +410,15 @@ pub(crate) fn generate_node_types_json( }; let populate_field_info_json = |json: &mut FieldInfoJSON, info: &FieldInfo| { - if info.types.len() > 0 { + if info.types.is_empty() { + json.required = false; + } else { json.multiple |= info.quantity.multiple; json.required &= info.quantity.required; json.types .extend(info.types.iter().map(child_type_to_node_type)); json.types.sort_unstable(); json.types.dedup(); - } else { - json.required = false; } }; @@ -432,7 +434,7 @@ pub(crate) fn generate_node_types_json( if !default_aliases.contains_key(extra_symbol) { aliases_by_symbol .entry(*extra_symbol) - .or_insert(HashSet::new()) + .or_insert_with(HashSet::new) .insert(None); } } @@ -441,7 +443,7 @@ pub(crate) fn generate_node_types_json( for step in &production.steps { aliases_by_symbol .entry(step.symbol) - .or_insert(HashSet::new()) + .or_insert_with(HashSet::new) .insert( step.alias .as_ref() @@ -451,7 +453,10 @@ pub(crate) fn generate_node_types_json( } } } - aliases_by_symbol.insert(Symbol::non_terminal(0), [None].iter().cloned().collect()); + aliases_by_symbol.insert( + Symbol::non_terminal(0), + std::iter::once(&None).cloned().collect(), + ); let mut subtype_map = Vec::new(); for (i, info) in variable_info.iter().enumerate() { @@ -516,7 +521,7 @@ pub(crate) fn generate_node_types_json( }); let fields_json = node_type_json.fields.as_mut().unwrap(); - for (new_field, field_info) in info.fields.iter() { + for (new_field, field_info) in &info.fields { let field_json = fields_json.entry(new_field.clone()).or_insert_with(|| { // If another rule is aliased with the same name, and does *not* have this field, // then this field cannot be required. @@ -558,7 +563,7 @@ pub(crate) fn generate_node_types_json( } }); - for (_, node_type_json) in node_types_json.iter_mut() { + for node_type_json in node_types_json.values_mut() { if node_type_json .children .as_ref() @@ -571,7 +576,7 @@ pub(crate) fn generate_node_types_json( process_supertypes(children, &subtype_map); } if let Some(fields) = &mut node_type_json.fields { - for (_, field_info) in fields.iter_mut() { + for field_info in fields.values_mut() { process_supertypes(field_info, &subtype_map); } } @@ -590,11 +595,11 @@ pub(crate) fn generate_node_types_json( .unwrap_or(&empty) .iter() .map(move |alias| { - if let Some(alias) = alias { - (&alias.value, alias.kind()) - } else { - (&variable.name, variable.kind) - } + alias + .as_ref() + .map_or((&variable.name, variable.kind), |alias| { + (&alias.value, alias.kind()) + }) }) }); let external_tokens = @@ -608,11 +613,9 @@ pub(crate) fn generate_node_types_json( .unwrap_or(&empty) .iter() .map(move |alias| { - if let Some(alias) = alias { + alias.as_ref().map_or((&token.name, token.kind), |alias| { (&alias.value, alias.kind()) - } else { - (&token.name, token.kind) - } + }) }) }); @@ -630,7 +633,7 @@ pub(crate) fn generate_node_types_json( children.required = false; } if let Some(fields) = &mut node_type_json.fields { - for (_, field) in fields.iter_mut() { + for field in fields.values_mut() { field.required = false; } } @@ -647,7 +650,7 @@ pub(crate) fn generate_node_types_json( } let mut result = node_types_json.into_iter().map(|e| e.1).collect::>(); - result.extend(anonymous_node_types.into_iter()); + result.extend(anonymous_node_types); result.sort_unstable_by(|a, b| { b.subtypes .is_some() @@ -663,10 +666,7 @@ pub(crate) fn generate_node_types_json( result } -fn process_supertypes( - info: &mut FieldInfoJSON, - subtype_map: &Vec<(NodeTypeJSON, Vec)>, -) { +fn process_supertypes(info: &mut FieldInfoJSON, subtype_map: &[(NodeTypeJSON, Vec)]) { for (supertype, subtypes) in subtype_map { if info.types.contains(supertype) { info.types.retain(|t| !subtypes.contains(t)); @@ -682,9 +682,9 @@ fn variable_type_for_child_type( match child_type { ChildType::Aliased(alias) => alias.kind(), ChildType::Normal(symbol) => { - if syntax_grammar.supertype_symbols.contains(&symbol) { + if syntax_grammar.supertype_symbols.contains(symbol) { VariableType::Named - } else if syntax_grammar.variables_to_inline.contains(&symbol) { + } else if syntax_grammar.variables_to_inline.contains(symbol) { VariableType::Hidden } else { match symbol.kind { @@ -700,11 +700,10 @@ fn variable_type_for_child_type( fn extend_sorted<'a, T>(vec: &mut Vec, values: impl IntoIterator) -> bool where - T: Clone + Eq + Ord, - T: 'a, + T: 'a + Clone + Eq + Ord, { values.into_iter().any(|value| { - if let Err(i) = vec.binary_search(&value) { + if let Err(i) = vec.binary_search(value) { vec.insert(i, value.clone()); true } else { @@ -724,7 +723,7 @@ mod tests { #[test] fn test_node_types_simple() { - let node_types = get_node_types(InputGrammar { + let node_types = get_node_types(&InputGrammar { variables: vec![ Variable { name: "v1".to_string(), @@ -813,7 +812,7 @@ mod tests { #[test] fn test_node_types_simple_extras() { - let node_types = get_node_types(InputGrammar { + let node_types = get_node_types(&InputGrammar { extra_symbols: vec![Rule::named("v3")], variables: vec![ Variable { @@ -914,7 +913,7 @@ mod tests { #[test] fn test_node_types_with_supertypes() { - let node_types = get_node_types(InputGrammar { + let node_types = get_node_types(&InputGrammar { supertype_symbols: vec!["_v2".to_string()], variables: vec![ Variable { @@ -996,7 +995,7 @@ mod tests { #[test] fn test_node_types_for_children_without_fields() { - let node_types = get_node_types(InputGrammar { + let node_types = get_node_types(&InputGrammar { variables: vec![ Variable { name: "v1".to_string(), @@ -1088,7 +1087,7 @@ mod tests { #[test] fn test_node_types_with_inlined_rules() { - let node_types = get_node_types(InputGrammar { + let node_types = get_node_types(&InputGrammar { variables_to_inline: vec!["v2".to_string()], variables: vec![ Variable { @@ -1138,7 +1137,7 @@ mod tests { #[test] fn test_node_types_for_aliased_nodes() { - let node_types = get_node_types(InputGrammar { + let node_types = get_node_types(&InputGrammar { variables: vec![ Variable { name: "thing".to_string(), @@ -1172,12 +1171,12 @@ mod tests { Variable { name: "identifier".to_string(), kind: VariableType::Named, - rule: Rule::pattern("\\w+"), + rule: Rule::pattern("\\w+", ""), }, Variable { name: "foo_identifier".to_string(), kind: VariableType::Named, - rule: Rule::pattern("[\\w-]+"), + rule: Rule::pattern("[\\w-]+", ""), }, ], ..Default::default() @@ -1208,7 +1207,7 @@ mod tests { #[test] fn test_node_types_with_multiple_valued_fields() { - let node_types = get_node_types(InputGrammar { + let node_types = get_node_types(&InputGrammar { variables: vec![ Variable { name: "a".to_string(), @@ -1270,13 +1269,13 @@ mod tests { #[test] fn test_node_types_with_fields_on_hidden_tokens() { - let node_types = get_node_types(InputGrammar { + let node_types = get_node_types(&InputGrammar { variables: vec![Variable { name: "script".to_string(), kind: VariableType::Named, rule: Rule::seq(vec![ - Rule::field("a".to_string(), Rule::pattern("hi")), - Rule::field("b".to_string(), Rule::pattern("bye")), + Rule::field("a".to_string(), Rule::pattern("hi", "")), + Rule::field("b".to_string(), Rule::pattern("bye", "")), ]), }], ..Default::default() @@ -1296,7 +1295,7 @@ mod tests { #[test] fn test_node_types_with_multiple_rules_same_alias_name() { - let node_types = get_node_types(InputGrammar { + let node_types = get_node_types(&InputGrammar { variables: vec![ Variable { name: "script".to_string(), @@ -1416,7 +1415,7 @@ mod tests { #[test] fn test_node_types_with_tokens_aliased_to_match_rules() { - let node_types = get_node_types(InputGrammar { + let node_types = get_node_types(&InputGrammar { variables: vec![ Variable { name: "a".to_string(), @@ -1766,9 +1765,9 @@ mod tests { ); } - fn get_node_types(grammar: InputGrammar) -> Vec { + fn get_node_types(grammar: &InputGrammar) -> Vec { let (syntax_grammar, lexical_grammar, _, default_aliases) = - prepare_grammar(&grammar).unwrap(); + prepare_grammar(grammar).unwrap(); let variable_info = get_variable_info(&syntax_grammar, &lexical_grammar, &default_aliases).unwrap(); generate_node_types_json( @@ -1783,17 +1782,18 @@ mod tests { variables: Vec, supertype_symbols: Vec, ) -> SyntaxGrammar { - let mut syntax_grammar = SyntaxGrammar::default(); - syntax_grammar.variables = variables; - syntax_grammar.supertype_symbols = supertype_symbols; - syntax_grammar + SyntaxGrammar { + variables, + supertype_symbols, + ..SyntaxGrammar::default() + } } fn build_lexical_grammar() -> LexicalGrammar { let mut lexical_grammar = LexicalGrammar::default(); for i in 0..10 { lexical_grammar.variables.push(LexicalVariable { - name: format!("token_{}", i), + name: format!("token_{i}"), kind: VariableType::Named, implicit_precedence: 0, start_state: 0, diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/parse_grammar.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/parse_grammar.rs index 7fda0b716a..5a52b34636 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/parse_grammar.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/parse_grammar.rs @@ -7,6 +7,7 @@ use serde_json::{Map, Value}; #[derive(Deserialize)] #[serde(tag = "type")] #[allow(non_camel_case_types)] +#[allow(clippy::upper_case_acronyms)] enum RuleJSON { ALIAS { content: Box, @@ -19,6 +20,7 @@ enum RuleJSON { }, PATTERN { value: String, + flags: Option, }, SYMBOL { name: String, @@ -90,15 +92,15 @@ pub(crate) struct GrammarJSON { } pub(crate) fn parse_grammar(input: &str) -> Result { - let grammar_json: GrammarJSON = serde_json::from_str(&input)?; + let grammar_json: GrammarJSON = serde_json::from_str(input)?; let mut variables = Vec::with_capacity(grammar_json.rules.len()); for (name, value) in grammar_json.rules { variables.push(Variable { - name: name.to_owned(), + name: name.clone(), kind: VariableType::Named, rule: parse_rule(serde_json::from_value(value)?), - }) + }); } let mut precedence_orderings = Vec::with_capacity(grammar_json.precedences.len()); @@ -113,12 +115,27 @@ pub(crate) fn parse_grammar(input: &str) -> Result { "Invalid rule in precedences array. Only strings and symbols are allowed" )) } - }) + }); } precedence_orderings.push(ordering); } - let extra_symbols = grammar_json.extras.into_iter().map(parse_rule).collect(); + let extra_symbols = grammar_json + .extras + .into_iter() + .try_fold(Vec::new(), |mut acc, item| { + let rule = parse_rule(item); + if let Rule::String(ref value) = rule { + if value.is_empty() { + return Err(anyhow!( + "Rules in the `extras` array must not contain empty strings" + )); + } + } + acc.push(rule); + Ok(acc) + })?; + let external_tokens = grammar_json.externals.into_iter().map(parse_rule).collect(); Ok(InputGrammar { @@ -143,7 +160,24 @@ fn parse_rule(json: RuleJSON) -> Rule { } => Rule::alias(parse_rule(*content), value, named), RuleJSON::BLANK => Rule::Blank, RuleJSON::STRING { value } => Rule::String(value), - RuleJSON::PATTERN { value } => Rule::Pattern(value), + RuleJSON::PATTERN { value, flags } => Rule::Pattern( + value, + flags.map_or(String::new(), |f| { + f.chars() + .filter(|c| { + if *c == 'i' { + true + } else { + // silently ignore unicode flags + if *c != 'u' && *c != 'v' { + eprintln!("Warning: unsupported flag {c}"); + } + false + } + }) + .collect() + }), + ), RuleJSON::SYMBOL { name } => Rule::NamedSymbol(name), RuleJSON::CHOICE { members } => Rule::choice(members.into_iter().map(parse_rule).collect()), RuleJSON::FIELD { content, name } => Rule::field(name, parse_rule(*content)), @@ -167,11 +201,11 @@ fn parse_rule(json: RuleJSON) -> Rule { } } -impl Into for PrecedenceValueJSON { - fn into(self) -> Precedence { - match self { - PrecedenceValueJSON::Integer(i) => Precedence::Integer(i), - PrecedenceValueJSON::Name(i) => Precedence::Name(i), +impl From for Precedence { + fn from(val: PrecedenceValueJSON) -> Self { + match val { + PrecedenceValueJSON::Integer(i) => Self::Integer(i), + PrecedenceValueJSON::Name(i) => Self::Name(i), } } } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/expand_repeats.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/expand_repeats.rs index 1979691439..e296d42527 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/expand_repeats.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/expand_repeats.rs @@ -24,7 +24,7 @@ impl Expander { // convert that rule itself into a binary tree structure instead of introducing // another auxiliary rule. if let (VariableType::Hidden, Rule::Repeat(repeated_content)) = (variable.kind, &rule) { - let inner_rule = self.expand_rule(&repeated_content); + let inner_rule = self.expand_rule(repeated_content); variable.rule = self.wrap_rule_in_binary_tree(Symbol::non_terminal(index), inner_rule); variable.kind = VariableType::Auxiliary; return true; @@ -57,7 +57,7 @@ impl Expander { params: params.clone(), }, - // For repetitions, introduce an auxiliary rule that contains the the + // For repetitions, introduce an auxiliary rule that contains the // repeated content, but can also contain a recursive binary tree structure. Rule::Repeat(content) => { let inner_rule = self.expand_rule(content); @@ -107,8 +107,8 @@ pub(super) fn expand_repeats(mut grammar: ExtractedSyntaxGrammar) -> ExtractedSy existing_repeats: HashMap::new(), }; - for (i, mut variable) in grammar.variables.iter_mut().enumerate() { - let expanded_top_level_repetition = expander.expand_variable(i, &mut variable); + for (i, variable) in grammar.variables.iter_mut().enumerate() { + let expanded_top_level_repetition = expander.expand_variable(i, variable); // If a hidden variable had a top-level repetition and it was converted to // a recursive rule, then it can't be inlined. @@ -119,9 +119,7 @@ pub(super) fn expand_repeats(mut grammar: ExtractedSyntaxGrammar) -> ExtractedSy } } - grammar - .variables - .extend(expander.auxiliary_variables.into_iter()); + grammar.variables.extend(expander.auxiliary_variables); grammar } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/expand_tokens.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/expand_tokens.rs index d6c73d9ae5..d38719e734 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/expand_tokens.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/expand_tokens.rs @@ -4,17 +4,14 @@ use crate::generate::nfa::{CharacterSet, Nfa, NfaState}; use crate::generate::rules::{Precedence, Rule}; use anyhow::{anyhow, Context, Result}; use lazy_static::lazy_static; -use regex::Regex; use regex_syntax::ast::{ - parse, Ast, Class, ClassPerlKind, ClassSet, ClassSetBinaryOpKind, ClassSetItem, - ClassUnicodeKind, RepetitionKind, RepetitionRange, + parse, Ast, ClassPerlKind, ClassSet, ClassSetBinaryOpKind, ClassSetItem, ClassUnicodeKind, + RepetitionKind, RepetitionRange, }; use std::collections::HashMap; use std::i32; lazy_static! { - static ref CURLY_BRACE_REGEX: Regex = - Regex::new(r#"(^|[^\\pP])\{([^}]*[^0-9A-Fa-f,}][^}]*)\}"#).unwrap(); static ref UNICODE_CATEGORIES: HashMap<&'static str, Vec> = serde_json::from_str(UNICODE_CATEGORIES_JSON).unwrap(); static ref UNICODE_PROPERTIES: HashMap<&'static str, Vec> = @@ -25,11 +22,10 @@ lazy_static! { serde_json::from_str(UNICODE_PROPERTY_ALIASES_JSON).unwrap(); } -const UNICODE_CATEGORIES_JSON: &'static str = include_str!("./unicode-categories.json"); -const UNICODE_PROPERTIES_JSON: &'static str = include_str!("./unicode-properties.json"); -const UNICODE_CATEGORY_ALIASES_JSON: &'static str = include_str!("./unicode-category-aliases.json"); -const UNICODE_PROPERTY_ALIASES_JSON: &'static str = include_str!("./unicode-property-aliases.json"); -const ALLOWED_REDUNDANT_ESCAPED_CHARS: [char; 4] = ['!', '\'', '"', '/']; +const UNICODE_CATEGORIES_JSON: &str = include_str!("./unicode-categories.json"); +const UNICODE_PROPERTIES_JSON: &str = include_str!("./unicode-properties.json"); +const UNICODE_CATEGORY_ALIASES_JSON: &str = include_str!("./unicode-category-aliases.json"); +const UNICODE_PROPERTY_ALIASES_JSON: &str = include_str!("./unicode-property-aliases.json"); struct NfaBuilder { nfa: Nfa, @@ -51,7 +47,7 @@ fn get_implicit_precedence(rule: &Rule) -> i32 { } } -fn get_completion_precedence(rule: &Rule) -> i32 { +const fn get_completion_precedence(rule: &Rule) -> i32 { if let Rule::Metadata { params, .. } = rule { if let Precedence::Integer(p) = params.precedence { return p; @@ -60,43 +56,18 @@ fn get_completion_precedence(rule: &Rule) -> i32 { 0 } -fn preprocess_regex(content: &str) -> String { - let content = CURLY_BRACE_REGEX.replace(content, "$1\\{$2\\}"); - let mut result = String::with_capacity(content.len()); - let mut is_escaped = false; - for c in content.chars() { - if is_escaped { - if ALLOWED_REDUNDANT_ESCAPED_CHARS.contains(&c) { - result.push(c); - } else { - result.push('\\'); - result.push(c); - } - is_escaped = false; - } else if c == '\\' { - is_escaped = true; - } else { - result.push(c); - } - } - if is_escaped { - result.push('\\'); - } - result -} - -pub(crate) fn expand_tokens(mut grammar: ExtractedLexicalGrammar) -> Result { +pub fn expand_tokens(mut grammar: ExtractedLexicalGrammar) -> Result { let mut builder = NfaBuilder { nfa: Nfa::new(), is_sep: true, precedence_stack: vec![0], }; - let separator_rule = if grammar.separators.len() > 0 { + let separator_rule = if grammar.separators.is_empty() { + Rule::Blank + } else { grammar.separators.push(Rule::Blank); Rule::repeat(Rule::choice(grammar.separators)) - } else { - Rule::Blank }; let mut variables = Vec::new(); @@ -139,17 +110,16 @@ pub(crate) fn expand_tokens(mut grammar: ExtractedLexicalGrammar) -> Result Result { match rule { - Rule::Pattern(s) => { - let s = preprocess_regex(s); - let ast = parse::Parser::new().parse(&s)?; - self.expand_regex(&ast, next_state_id) + Rule::Pattern(s, f) => { + let ast = parse::Parser::new().parse(s)?; + self.expand_regex(&ast, next_state_id, f.contains('i')) } Rule::String(s) => { for c in s.chars().rev() { self.push_advance(CharacterSet::empty().add_char(c), next_state_id); next_state_id = self.nfa.last_state_id(); } - Ok(s.len() > 0) + Ok(!s.is_empty()) } Rule::Choice(elements) => { let mut alternative_state_ids = Vec::new(); @@ -170,7 +140,7 @@ impl NfaBuilder { } Rule::Seq(elements) => { let mut result = false; - for element in elements.into_iter().rev() { + for element in elements.iter().rev() { if self.expand_rule(element, next_state_id)? { result = true; } @@ -206,16 +176,46 @@ impl NfaBuilder { result } Rule::Blank => Ok(false), - _ => Err(anyhow!("Grammar error: Unexpected rule {:?}", rule)), + _ => Err(anyhow!("Grammar error: Unexpected rule {rule:?}")), } } - fn expand_regex(&mut self, ast: &Ast, mut next_state_id: u32) -> Result { + fn expand_regex( + &mut self, + ast: &Ast, + mut next_state_id: u32, + case_insensitive: bool, + ) -> Result { + const fn inverse_char(c: char) -> char { + match c { + 'a'..='z' => (c as u8 - b'a' + b'A') as char, + 'A'..='Z' => (c as u8 - b'A' + b'a') as char, + c => c, + } + } + + fn with_inverse_char(mut chars: CharacterSet) -> CharacterSet { + for char in chars.clone().chars() { + let inverted = inverse_char(char); + if char != inverted { + chars = chars.add_char(inverted); + } + } + chars + } + match ast { Ast::Empty(_) => Ok(false), Ast::Flags(_) => Err(anyhow!("Regex error: Flags are not supported")), Ast::Literal(literal) => { - self.push_advance(CharacterSet::from_char(literal.c), next_state_id); + let mut char_set = CharacterSet::from_char(literal.c); + if case_insensitive { + let inverted = inverse_char(literal.c); + if literal.c != inverted { + char_set = char_set.add_char(inverted); + } + } + self.push_advance(char_set, next_state_id); Ok(true) } Ast::Dot(_) => { @@ -223,70 +223,82 @@ impl NfaBuilder { Ok(true) } Ast::Assertion(_) => Err(anyhow!("Regex error: Assertions are not supported")), - Ast::Class(class) => match class { - Class::Unicode(class) => { - let mut chars = self.expand_unicode_character_class(&class.kind)?; - if class.negated { - chars = chars.negate(); - } - self.push_advance(chars, next_state_id); - Ok(true) + Ast::ClassUnicode(class) => { + let mut chars = self.expand_unicode_character_class(&class.kind)?; + if class.negated { + chars = chars.negate(); } - Class::Perl(class) => { - let mut chars = self.expand_perl_character_class(&class.kind); - if class.negated { - chars = chars.negate(); - } - self.push_advance(chars, next_state_id); - Ok(true) + if case_insensitive { + chars = with_inverse_char(chars); } - Class::Bracketed(class) => { - let mut chars = self.translate_class_set(&class.kind)?; - if class.negated { - chars = chars.negate(); - } - self.push_advance(chars, next_state_id); - Ok(true) + self.push_advance(chars, next_state_id); + Ok(true) + } + Ast::ClassPerl(class) => { + let mut chars = self.expand_perl_character_class(&class.kind); + if class.negated { + chars = chars.negate(); } - }, + if case_insensitive { + chars = with_inverse_char(chars); + } + self.push_advance(chars, next_state_id); + Ok(true) + } + Ast::ClassBracketed(class) => { + let mut chars = self.translate_class_set(&class.kind)?; + if class.negated { + chars = chars.negate(); + } + if case_insensitive { + chars = with_inverse_char(chars); + } + self.push_advance(chars, next_state_id); + Ok(true) + } Ast::Repetition(repetition) => match repetition.op.kind { RepetitionKind::ZeroOrOne => { - self.expand_zero_or_one(&repetition.ast, next_state_id) + self.expand_zero_or_one(&repetition.ast, next_state_id, case_insensitive) } RepetitionKind::OneOrMore => { - self.expand_one_or_more(&repetition.ast, next_state_id) + self.expand_one_or_more(&repetition.ast, next_state_id, case_insensitive) } RepetitionKind::ZeroOrMore => { - self.expand_zero_or_more(&repetition.ast, next_state_id) + self.expand_zero_or_more(&repetition.ast, next_state_id, case_insensitive) } RepetitionKind::Range(RepetitionRange::Exactly(count)) => { - self.expand_count(&repetition.ast, count, next_state_id) + self.expand_count(&repetition.ast, count, next_state_id, case_insensitive) } RepetitionKind::Range(RepetitionRange::AtLeast(min)) => { - if self.expand_zero_or_more(&repetition.ast, next_state_id)? { - self.expand_count(&repetition.ast, min, next_state_id) + if self.expand_zero_or_more(&repetition.ast, next_state_id, case_insensitive)? { + self.expand_count(&repetition.ast, min, next_state_id, case_insensitive) } else { Ok(false) } } RepetitionKind::Range(RepetitionRange::Bounded(min, max)) => { - let mut result = self.expand_count(&repetition.ast, min, next_state_id)?; + let mut result = + self.expand_count(&repetition.ast, min, next_state_id, case_insensitive)?; for _ in min..max { if result { next_state_id = self.nfa.last_state_id(); } - if self.expand_zero_or_one(&repetition.ast, next_state_id)? { + if self.expand_zero_or_one( + &repetition.ast, + next_state_id, + case_insensitive, + )? { result = true; } } Ok(result) } }, - Ast::Group(group) => self.expand_regex(&group.ast, next_state_id), + Ast::Group(group) => self.expand_regex(&group.ast, next_state_id, case_insensitive), Ast::Alternation(alternation) => { let mut alternative_state_ids = Vec::new(); - for ast in alternation.asts.iter() { - if self.expand_regex(&ast, next_state_id)? { + for ast in &alternation.asts { + if self.expand_regex(ast, next_state_id, case_insensitive)? { alternative_state_ids.push(self.nfa.last_state_id()); } else { alternative_state_ids.push(next_state_id); @@ -304,7 +316,7 @@ impl NfaBuilder { Ast::Concat(concat) => { let mut result = false; for ast in concat.asts.iter().rev() { - if self.expand_regex(&ast, next_state_id)? { + if self.expand_regex(ast, next_state_id, case_insensitive)? { result = true; next_state_id = self.nfa.last_state_id(); } @@ -316,7 +328,7 @@ impl NfaBuilder { fn translate_class_set(&self, class_set: &ClassSet) -> Result { match &class_set { - ClassSet::Item(item) => self.expand_character_class(&item), + ClassSet::Item(item) => self.expand_character_class(item), ClassSet::BinaryOp(binary_op) => { let mut lhs_char_class = self.translate_class_set(&binary_op.lhs)?; let mut rhs_char_class = self.translate_class_set(&binary_op.rhs)?; @@ -335,13 +347,18 @@ impl NfaBuilder { } } - fn expand_one_or_more(&mut self, ast: &Ast, next_state_id: u32) -> Result { + fn expand_one_or_more( + &mut self, + ast: &Ast, + next_state_id: u32, + case_insensitive: bool, + ) -> Result { self.nfa.states.push(NfaState::Accept { variable_index: 0, precedence: 0, }); // Placeholder for split let split_state_id = self.nfa.last_state_id(); - if self.expand_regex(&ast, split_state_id)? { + if self.expand_regex(ast, split_state_id, case_insensitive)? { self.nfa.states[split_state_id as usize] = NfaState::Split(self.nfa.last_state_id(), next_state_id); Ok(true) @@ -351,8 +368,13 @@ impl NfaBuilder { } } - fn expand_zero_or_one(&mut self, ast: &Ast, next_state_id: u32) -> Result { - if self.expand_regex(ast, next_state_id)? { + fn expand_zero_or_one( + &mut self, + ast: &Ast, + next_state_id: u32, + case_insensitive: bool, + ) -> Result { + if self.expand_regex(ast, next_state_id, case_insensitive)? { self.push_split(next_state_id); Ok(true) } else { @@ -360,8 +382,13 @@ impl NfaBuilder { } } - fn expand_zero_or_more(&mut self, ast: &Ast, next_state_id: u32) -> Result { - if self.expand_one_or_more(&ast, next_state_id)? { + fn expand_zero_or_more( + &mut self, + ast: &Ast, + next_state_id: u32, + case_insensitive: bool, + ) -> Result { + if self.expand_one_or_more(ast, next_state_id, case_insensitive)? { self.push_split(next_state_id); Ok(true) } else { @@ -369,10 +396,16 @@ impl NfaBuilder { } } - fn expand_count(&mut self, ast: &Ast, count: u32, mut next_state_id: u32) -> Result { + fn expand_count( + &mut self, + ast: &Ast, + count: u32, + mut next_state_id: u32, + case_insensitive: bool, + ) -> Result { let mut result = false; for _ in 0..count { - if self.expand_regex(ast, next_state_id)? { + if self.expand_regex(ast, next_state_id, case_insensitive)? { result = true; next_state_id = self.nfa.last_state_id(); } @@ -388,7 +421,7 @@ impl NfaBuilder { ClassSetItem::Union(union) => { let mut result = CharacterSet::empty(); for item in &union.items { - result = result.add(&self.expand_character_class(&item)?); + result = result.add(&self.expand_character_class(item)?); } Ok(result) } @@ -407,9 +440,8 @@ impl NfaBuilder { } Ok(set) } - _ => Err(anyhow!( - "Regex error: Unsupported character class syntax {:?}", - item + ClassSetItem::Ascii(_) => Err(anyhow!( + "Regex error: Unsupported character class syntax {item:?}", )), } } @@ -430,15 +462,15 @@ impl NfaBuilder { if actual_class_name.len() == 1 { category_letter = actual_class_name.clone(); } else { - let code_points = UNICODE_CATEGORIES - .get(actual_class_name.as_str()) - .or_else(|| UNICODE_PROPERTIES.get(actual_class_name.as_str())) - .ok_or_else(|| { - anyhow!( - "Regex error: Unsupported unicode character class {}", - class_name - ) - })?; + let code_points = + UNICODE_CATEGORIES + .get(actual_class_name.as_str()) + .or_else(|| UNICODE_PROPERTIES.get(actual_class_name.as_str())) + .ok_or_else(|| { + anyhow!( + "Regex error: Unsupported unicode character class {class_name}", + ) + })?; for c in code_points { if let Some(c) = std::char::from_u32(*c) { chars = chars.add_char(c); @@ -475,7 +507,9 @@ impl NfaBuilder { .add_char(' ') .add_char('\t') .add_char('\r') - .add_char('\n'), + .add_char('\n') + .add_char('\x0B') + .add_char('\x0C'), ClassPerlKind::Word => CharacterSet::empty() .add_char('_') .add_range('A', 'Z') @@ -563,7 +597,7 @@ mod tests { let table = [ // regex with sequences and alternatives Row { - rules: vec![Rule::pattern("(a|b|c)d(e|f|g)h?")], + rules: vec![Rule::pattern("(a|b|c)d(e|f|g)h?", "")], separators: vec![], examples: vec![ ("ade1", Some((0, "ade"))), @@ -574,13 +608,13 @@ mod tests { }, // regex with repeats Row { - rules: vec![Rule::pattern("a*")], + rules: vec![Rule::pattern("a*", "")], separators: vec![], examples: vec![("aaa1", Some((0, "aaa"))), ("b", Some((0, "")))], }, // regex with repeats in sequences Row { - rules: vec![Rule::pattern("a((bc)+|(de)*)f")], + rules: vec![Rule::pattern("a((bc)+|(de)*)f", "")], separators: vec![], examples: vec![ ("af1", Some((0, "af"))), @@ -591,13 +625,13 @@ mod tests { }, // regex with character ranges Row { - rules: vec![Rule::pattern("[a-fA-F0-9]+")], + rules: vec![Rule::pattern("[a-fA-F0-9]+", "")], separators: vec![], examples: vec![("A1ff0.", Some((0, "A1ff0")))], }, // regex with perl character classes Row { - rules: vec![Rule::pattern("\\w\\d\\s")], + rules: vec![Rule::pattern("\\w\\d\\s", "")], separators: vec![], examples: vec![("_0 ", Some((0, "_0 ")))], }, @@ -611,7 +645,7 @@ mod tests { Row { rules: vec![Rule::repeat(Rule::seq(vec![ Rule::string("{"), - Rule::pattern("[a-f]+"), + Rule::pattern("[a-f]+", ""), Rule::string("}"), ]))], separators: vec![], @@ -624,9 +658,9 @@ mod tests { // longest match rule Row { rules: vec![ - Rule::pattern("a|bc"), - Rule::pattern("aa"), - Rule::pattern("bcd"), + Rule::pattern("a|bc", ""), + Rule::pattern("aa", ""), + Rule::pattern("bcd", ""), ], separators: vec![], examples: vec![ @@ -640,7 +674,7 @@ mod tests { }, // regex with an alternative including the empty string Row { - rules: vec![Rule::pattern("a(b|)+c")], + rules: vec![Rule::pattern("a(b|)+c", "")], separators: vec![], examples: vec![ ("ac.", Some((0, "ac"))), @@ -650,8 +684,8 @@ mod tests { }, // separators Row { - rules: vec![Rule::pattern("[a-f]+")], - separators: vec![Rule::string("\\\n"), Rule::pattern("\\s")], + rules: vec![Rule::pattern("[a-f]+", "")], + separators: vec![Rule::string("\\\n"), Rule::pattern("\\s", "")], examples: vec![ (" a", Some((0, "a"))), (" \nb", Some((0, "b"))), @@ -662,11 +696,11 @@ mod tests { // shorter tokens with higher precedence Row { rules: vec![ - Rule::prec(Precedence::Integer(2), Rule::pattern("abc")), - Rule::prec(Precedence::Integer(1), Rule::pattern("ab[cd]e")), - Rule::pattern("[a-e]+"), + Rule::prec(Precedence::Integer(2), Rule::pattern("abc", "")), + Rule::prec(Precedence::Integer(1), Rule::pattern("ab[cd]e", "")), + Rule::pattern("[a-e]+", ""), ], - separators: vec![Rule::string("\\\n"), Rule::pattern("\\s")], + separators: vec![Rule::string("\\\n"), Rule::pattern("\\s", "")], examples: vec![ ("abceef", Some((0, "abc"))), ("abdeef", Some((1, "abde"))), @@ -676,13 +710,13 @@ mod tests { // immediate tokens with higher precedence Row { rules: vec![ - Rule::prec(Precedence::Integer(1), Rule::pattern("[^a]+")), + Rule::prec(Precedence::Integer(1), Rule::pattern("[^a]+", "")), Rule::immediate_token(Rule::prec( Precedence::Integer(2), - Rule::pattern("[^ab]+"), + Rule::pattern("[^ab]+", ""), )), ], - separators: vec![Rule::pattern("\\s")], + separators: vec![Rule::pattern("\\s", "")], examples: vec![("cccb", Some((1, "ccc")))], }, Row { @@ -704,7 +738,7 @@ mod tests { // nested choices within sequences Row { rules: vec![Rule::seq(vec![ - Rule::pattern("[0-9]+"), + Rule::pattern("[0-9]+", ""), Rule::choice(vec![ Rule::Blank, Rule::choice(vec![Rule::seq(vec![ @@ -713,7 +747,7 @@ mod tests { Rule::Blank, Rule::choice(vec![Rule::string("+"), Rule::string("-")]), ]), - Rule::pattern("[0-9]+"), + Rule::pattern("[0-9]+", ""), ])]), ]), ])], @@ -730,7 +764,7 @@ mod tests { }, // nested groups Row { - rules: vec![Rule::seq(vec![Rule::pattern(r#"([^x\\]|\\(.|\n))+"#)])], + rules: vec![Rule::seq(vec![Rule::pattern(r"([^x\\]|\\(.|\n))+", "")])], separators: vec![], examples: vec![("abcx", Some((0, "abc"))), ("abc\\0x", Some((0, "abc\\0")))], }, @@ -738,24 +772,24 @@ mod tests { Row { rules: vec![ // Escaped forward slash (used in JS because '/' is the regex delimiter) - Rule::pattern(r#"\/"#), + Rule::pattern(r"\/", ""), // Escaped quotes - Rule::pattern(r#"\"\'"#), + Rule::pattern(r#"\"\'"#, ""), // Quote preceded by a literal backslash - Rule::pattern(r#"[\\']+"#), + Rule::pattern(r"[\\']+", ""), ], separators: vec![], examples: vec![ ("/", Some((0, "/"))), ("\"\'", Some((1, "\"\'"))), - (r#"'\'a"#, Some((2, r#"'\'"#))), + (r"'\'a", Some((2, r"'\'"))), ], }, // unicode property escapes Row { rules: vec![ - Rule::pattern(r#"\p{L}+\P{L}+"#), - Rule::pattern(r#"\p{White_Space}+\P{White_Space}+[\p{White_Space}]*"#), + Rule::pattern(r"\p{L}+\P{L}+", ""), + Rule::pattern(r"\p{White_Space}+\P{White_Space}+[\p{White_Space}]*", ""), ], separators: vec![], examples: vec![ @@ -765,17 +799,17 @@ mod tests { }, // unicode property escapes in bracketed sets Row { - rules: vec![Rule::pattern(r#"[\p{L}\p{Nd}]+"#)], + rules: vec![Rule::pattern(r"[\p{L}\p{Nd}]+", "")], separators: vec![], examples: vec![("abΨ12٣٣, ok", Some((0, "abΨ12٣٣")))], }, // unicode character escapes Row { rules: vec![ - Rule::pattern(r#"\u{00dc}"#), - Rule::pattern(r#"\U{000000dd}"#), - Rule::pattern(r#"\u00de"#), - Rule::pattern(r#"\U000000df"#), + Rule::pattern(r"\u{00dc}", ""), + Rule::pattern(r"\U{000000dd}", ""), + Rule::pattern(r"\u00de", ""), + Rule::pattern(r"\U000000df", ""), ], separators: vec![], examples: vec![ @@ -785,17 +819,15 @@ mod tests { ("\u{00df}", Some((3, "\u{00df}"))), ], }, - // allowing un-escaped curly braces Row { rules: vec![ - // Un-escaped curly braces - Rule::pattern(r#"u{[0-9a-fA-F]+}"#), + Rule::pattern(r"u\{[0-9a-fA-F]+\}", ""), // Already-escaped curly braces - Rule::pattern(r#"\{[ab]{3}\}"#), + Rule::pattern(r"\{[ab]{3}\}", ""), // Unicode codepoints - Rule::pattern(r#"\u{1000A}"#), + Rule::pattern(r"\u{1000A}", ""), // Unicode codepoints (lowercase) - Rule::pattern(r#"\u{1000b}"#), + Rule::pattern(r"\u{1000b}", ""), ], separators: vec![], examples: vec![ @@ -807,7 +839,7 @@ mod tests { }, // Emojis Row { - rules: vec![Rule::pattern(r"\p{Emoji}+")], + rules: vec![Rule::pattern(r"\p{Emoji}+", "")], separators: vec![], examples: vec![ ("🐎", Some((0, "🐎"))), @@ -820,7 +852,7 @@ mod tests { }, // Intersection Row { - rules: vec![Rule::pattern(r"[[0-7]&&[4-9]]+")], + rules: vec![Rule::pattern(r"[[0-7]&&[4-9]]+", "")], separators: vec![], examples: vec![ ("456", Some((0, "456"))), @@ -833,7 +865,7 @@ mod tests { }, // Difference Row { - rules: vec![Rule::pattern(r"[[0-9]--[4-7]]+")], + rules: vec![Rule::pattern(r"[[0-9]--[4-7]]+", "")], separators: vec![], examples: vec![ ("123", Some((0, "123"))), @@ -846,7 +878,7 @@ mod tests { }, // Symmetric difference Row { - rules: vec![Rule::pattern(r"[[0-7]~~[4-9]]+")], + rules: vec![Rule::pattern(r"[[0-7]~~[4-9]]+", "")], separators: vec![], examples: vec![ ("123", Some((0, "123"))), @@ -867,7 +899,7 @@ mod tests { // [6-7]: y y // [3-9]--[5-7]: y y y y y // final regex: y y y y y y - rules: vec![Rule::pattern(r"[[[0-5]--[2-4]]~~[[3-9]--[6-7]]]+")], + rules: vec![Rule::pattern(r"[[[0-5]--[2-4]]~~[[3-9]--[6-7]]]+", "")], separators: vec![], examples: vec![ ("01", Some((0, "01"))), @@ -889,13 +921,13 @@ mod tests { let grammar = expand_tokens(ExtractedLexicalGrammar { separators: separators.clone(), variables: rules - .into_iter() + .iter() .map(|rule| Variable::named("", rule.clone())) .collect(), }) .unwrap(); - for (haystack, needle) in examples.iter() { + for (haystack, needle) in examples { assert_eq!(simulate_nfa(&grammar, haystack), *needle); } } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/extract_default_aliases.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/extract_default_aliases.rs index d39bf8dd6f..6ffc7eca3f 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/extract_default_aliases.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/extract_default_aliases.rs @@ -28,10 +28,10 @@ pub(super) fn extract_default_aliases( // For each grammar symbol, find all of the aliases under which the symbol appears, // and determine whether or not the symbol ever appears *unaliased*. - for variable in syntax_grammar.variables.iter() { - for production in variable.productions.iter() { - for step in production.steps.iter() { - let mut status = match step.symbol.kind { + for variable in &syntax_grammar.variables { + for production in &variable.productions { + for step in &production.steps { + let status = match step.symbol.kind { SymbolType::External => &mut external_status_list[step.symbol.index], SymbolType::NonTerminal => &mut non_terminal_status_list[step.symbol.index], SymbolType::Terminal => &mut terminal_status_list[step.symbol.index], @@ -62,8 +62,8 @@ pub(super) fn extract_default_aliases( } } - for symbol in syntax_grammar.extra_symbols.iter() { - let mut status = match symbol.kind { + for symbol in &syntax_grammar.extra_symbols { + let status = match symbol.kind { SymbolType::External => &mut external_status_list[symbol.index], SymbolType::NonTerminal => &mut non_terminal_status_list[symbol.index], SymbolType::Terminal => &mut terminal_status_list[symbol.index], @@ -98,25 +98,23 @@ pub(super) fn extract_default_aliases( for (symbol, status) in symbols_with_statuses { if status.appears_unaliased { status.aliases.clear(); - } else { - if let Some(default_entry) = status - .aliases - .iter() - .enumerate() - .max_by_key(|(i, (_, count))| (count, -(*i as i64))) - .map(|(_, entry)| entry.clone()) - { - status.aliases.clear(); - status.aliases.push(default_entry.clone()); - result.insert(symbol, default_entry.0); - } + } else if let Some(default_entry) = status + .aliases + .iter() + .enumerate() + .max_by_key(|(i, (_, count))| (count, -(*i as i64))) + .map(|(_, entry)| entry.clone()) + { + status.aliases.clear(); + status.aliases.push(default_entry.clone()); + result.insert(symbol, default_entry.0); } } // Wherever a symbol is aliased as its default alias, remove the usage of the alias, // because it will now be redundant. let mut alias_positions_to_clear = Vec::new(); - for variable in syntax_grammar.variables.iter_mut() { + for variable in &mut syntax_grammar.variables { alias_positions_to_clear.clear(); for (i, production) in variable.productions.iter().enumerate() { @@ -132,7 +130,7 @@ pub(super) fn extract_default_aliases( // If this step is aliased as the symbol's default alias, then remove that alias. if step.alias.is_some() - && step.alias.as_ref() == status.aliases.get(0).map(|t| &t.0) + && step.alias.as_ref() == status.aliases.first().map(|t| &t.0) { let mut other_productions_must_use_this_alias_at_this_index = false; for (other_i, other_production) in variable.productions.iter().enumerate() { diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/extract_tokens.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/extract_tokens.rs index 928f914c62..7d87bbd2fc 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/extract_tokens.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/extract_tokens.rs @@ -15,12 +15,12 @@ pub(super) fn extract_tokens( extracted_usage_counts: Vec::new(), }; - for mut variable in grammar.variables.iter_mut() { - extractor.extract_tokens_in_variable(&mut variable); + for variable in &mut grammar.variables { + extractor.extract_tokens_in_variable(variable); } - for mut variable in grammar.external_tokens.iter_mut() { - extractor.extract_tokens_in_variable(&mut variable); + for variable in &mut grammar.external_tokens { + extractor.extract_tokens_in_variable(variable); } let mut lexical_variables = Vec::with_capacity(extractor.extracted_variables.len()); @@ -49,7 +49,7 @@ pub(super) fn extract_tokens( }) = variable.rule { if i > 0 && extractor.extracted_usage_counts[index] == 1 { - let mut lexical_variable = &mut lexical_variables[index]; + let lexical_variable = &mut lexical_variables[index]; lexical_variable.kind = variable.kind; lexical_variable.name = variable.name; symbol_replacer.replacements.insert(i, index); @@ -59,7 +59,7 @@ pub(super) fn extract_tokens( variables.push(variable); } - for variable in variables.iter_mut() { + for variable in &mut variables { variable.rule = symbol_replacer.replace_symbols_in_rule(&variable.rule); } @@ -67,10 +67,10 @@ pub(super) fn extract_tokens( .expected_conflicts .into_iter() .map(|conflict| { - let mut result: Vec<_> = conflict + let mut result = conflict .iter() .map(|symbol| symbol_replacer.replace_symbol(*symbol)) - .collect(); + .collect::>(); result.sort_unstable(); result.dedup(); result @@ -94,12 +94,10 @@ pub(super) fn extract_tokens( for rule in grammar.extra_symbols { if let Rule::Symbol(symbol) = rule { extra_symbols.push(symbol_replacer.replace_symbol(symbol)); + } else if let Some(index) = lexical_variables.iter().position(|v| v.rule == rule) { + extra_symbols.push(Symbol::terminal(index)); } else { - if let Some(index) = lexical_variables.iter().position(|v| v.rule == rule) { - extra_symbols.push(Symbol::terminal(index)); - } else { - separators.push(rule); - } + separators.push(rule); } } @@ -119,13 +117,13 @@ pub(super) fn extract_tokens( name: external_token.name, kind: external_token.kind, corresponding_internal_token: None, - }) + }); } else { external_tokens.push(ExternalToken { name: lexical_variables[symbol.index].name.clone(), kind: external_token.kind, corresponding_internal_token: Some(symbol), - }) + }); } } else { return Err(anyhow!( @@ -209,7 +207,7 @@ impl TokenExtractor { } else { Rule::Metadata { params: params.clone(), - rule: Box::new(self.extract_tokens_in_rule((&rule).clone())), + rule: Box::new(self.extract_tokens_in_rule(rule)), } } } @@ -298,20 +296,19 @@ impl SymbolReplacer { } let mut adjusted_index = symbol.index; - for (replaced_index, _) in self.replacements.iter() { + for replaced_index in self.replacements.keys() { if *replaced_index < symbol.index { adjusted_index -= 1; } } - return Symbol::non_terminal(adjusted_index); + Symbol::non_terminal(adjusted_index) } } #[cfg(test)] mod test { use super::*; - use crate::generate::grammars::VariableType; #[test] fn test_extraction() { @@ -320,7 +317,7 @@ mod test { "rule_0", Rule::repeat(Rule::seq(vec![ Rule::string("a"), - Rule::pattern("b"), + Rule::pattern("b", ""), Rule::choice(vec![ Rule::non_terminal(1), Rule::non_terminal(2), @@ -331,8 +328,8 @@ mod test { ]), ])), ), - Variable::named("rule_1", Rule::pattern("e")), - Variable::named("rule_2", Rule::pattern("b")), + Variable::named("rule_1", Rule::pattern("e", "")), + Variable::named("rule_2", Rule::pattern("b", "")), Variable::named( "rule_3", Rule::seq(vec![Rule::non_terminal(2), Rule::Blank]), @@ -378,12 +375,12 @@ mod test { lexical_grammar.variables, vec![ Variable::anonymous("a", Rule::string("a")), - Variable::auxiliary("rule_0_token1", Rule::pattern("b")), + Variable::auxiliary("rule_0_token1", Rule::pattern("b", "")), Variable::auxiliary( "rule_0_token2", Rule::repeat(Rule::choice(vec![Rule::string("c"), Rule::string("d"),])) ), - Variable::named("rule_1", Rule::pattern("e")), + Variable::named("rule_1", Rule::pattern("e", "")), ] ); } @@ -404,14 +401,14 @@ mod test { assert_eq!( lexical_grammar.variables, vec![Variable::anonymous("hello", Rule::string("hello")),] - ) + ); } #[test] fn test_extracting_extra_symbols() { let mut grammar = build_grammar(vec![ Variable::named("rule_0", Rule::string("x")), - Variable::named("comment", Rule::pattern("//.*")), + Variable::named("comment", Rule::pattern("//.*", "")), ]); grammar.extra_symbols = vec![Rule::string(" "), Rule::non_terminal(1)]; diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/flatten_grammar.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/flatten_grammar.rs index e9950e1bc1..8f56dbf9f2 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/flatten_grammar.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/flatten_grammar.rs @@ -88,7 +88,7 @@ impl RuleFlattener { self.associativity_stack.pop(); if did_push && !at_end { self.production.steps.last_mut().unwrap().associativity = - self.associativity_stack.last().cloned(); + self.associativity_stack.last().copied(); } } @@ -110,7 +110,7 @@ impl RuleFlattener { .last() .cloned() .unwrap_or(Precedence::None), - associativity: self.associativity_stack.last().cloned(), + associativity: self.associativity_stack.last().copied(), alias: self.alias_stack.last().cloned(), field_name: self.field_name_stack.last().cloned(), }); @@ -129,7 +129,7 @@ fn extract_choices(rule: Rule) -> Vec { let extraction = extract_choices(element); let mut next_result = Vec::new(); for entry in result { - for extraction_entry in extraction.iter() { + for extraction_entry in &extraction { next_result.push(Rule::Seq(vec![entry.clone(), extraction_entry.clone()])); } } @@ -157,7 +157,7 @@ fn extract_choices(rule: Rule) -> Vec { } } -fn flatten_variable(variable: Variable) -> Result { +fn flatten_variable(variable: Variable) -> SyntaxVariable { let mut productions = Vec::new(); for rule in extract_choices(variable.rule) { let production = RuleFlattener::new().flatten(rule); @@ -165,14 +165,14 @@ fn flatten_variable(variable: Variable) -> Result { productions.push(production); } } - Ok(SyntaxVariable { + SyntaxVariable { name: variable.name, kind: variable.kind, productions, - }) + } } -fn symbol_is_used(variables: &Vec, symbol: Symbol) -> bool { +fn symbol_is_used(variables: &[SyntaxVariable], symbol: Symbol) -> bool { for variable in variables { for production in &variable.productions { for step in &production.steps { @@ -188,7 +188,7 @@ fn symbol_is_used(variables: &Vec, symbol: Symbol) -> bool { pub(super) fn flatten_grammar(grammar: ExtractedSyntaxGrammar) -> Result { let mut variables = Vec::new(); for variable in grammar.variables { - variables.push(flatten_variable(variable)?); + variables.push(flatten_variable(variable)); } for (i, variable) in variables.iter().enumerate() { for production in &variable.productions { @@ -220,7 +220,6 @@ unless they are used only as the grammar's start rule. mod tests { use super::*; use crate::generate::grammars::VariableType; - use crate::generate::rules::Symbol; #[test] fn test_flatten_grammar() { @@ -245,8 +244,7 @@ mod tests { ), Rule::non_terminal(7), ]), - }) - .unwrap(); + }); assert_eq!( result.productions, @@ -304,8 +302,7 @@ mod tests { ), Rule::non_terminal(7), ]), - }) - .unwrap(); + }); assert_eq!( result.productions, @@ -344,8 +341,7 @@ mod tests { Precedence::Integer(101), Rule::seq(vec![Rule::non_terminal(1), Rule::non_terminal(2)]), ), - }) - .unwrap(); + }); assert_eq!( result.productions, @@ -367,8 +363,7 @@ mod tests { Precedence::Integer(101), Rule::seq(vec![Rule::non_terminal(1)]), ), - }) - .unwrap(); + }); assert_eq!( result.productions, @@ -393,8 +388,7 @@ mod tests { Rule::field("second-thing".to_string(), Rule::terminal(3)), ]), ]), - }) - .unwrap(); + }); assert_eq!( result.productions, diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/intern_symbols.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/intern_symbols.rs index 5cd29cc40e..092126aec0 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/intern_symbols.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/intern_symbols.rs @@ -11,7 +11,7 @@ pub(super) fn intern_symbols(grammar: &InputGrammar) -> Result } let mut variables = Vec::with_capacity(grammar.variables.len()); - for variable in grammar.variables.iter() { + for variable in &grammar.variables { variables.push(Variable { name: variable.name.clone(), kind: variable_type_for_name(&variable.name), @@ -20,10 +20,10 @@ pub(super) fn intern_symbols(grammar: &InputGrammar) -> Result } let mut external_tokens = Vec::with_capacity(grammar.external_tokens.len()); - for external_token in grammar.external_tokens.iter() { - let rule = interner.intern_rule(&external_token)?; + for external_token in &grammar.external_tokens { + let rule = interner.intern_rule(external_token)?; let (name, kind) = if let Rule::NamedSymbol(name) = external_token { - (name.clone(), variable_type_for_name(&name)) + (name.clone(), variable_type_for_name(name)) } else { (String::new(), VariableType::Anonymous) }; @@ -31,35 +31,35 @@ pub(super) fn intern_symbols(grammar: &InputGrammar) -> Result } let mut extra_symbols = Vec::with_capacity(grammar.extra_symbols.len()); - for extra_token in grammar.extra_symbols.iter() { + for extra_token in &grammar.extra_symbols { extra_symbols.push(interner.intern_rule(extra_token)?); } let mut supertype_symbols = Vec::with_capacity(grammar.supertype_symbols.len()); - for supertype_symbol_name in grammar.supertype_symbols.iter() { + for supertype_symbol_name in &grammar.supertype_symbols { supertype_symbols.push( interner .intern_name(supertype_symbol_name) - .ok_or_else(|| anyhow!("Undefined symbol `{}`", supertype_symbol_name))?, + .ok_or_else(|| anyhow!("Undefined symbol `{supertype_symbol_name}`"))?, ); } let mut expected_conflicts = Vec::new(); - for conflict in grammar.expected_conflicts.iter() { + for conflict in &grammar.expected_conflicts { let mut interned_conflict = Vec::with_capacity(conflict.len()); for name in conflict { interned_conflict.push( interner - .intern_name(&name) - .ok_or_else(|| anyhow!("Undefined symbol `{}`", name))?, + .intern_name(name) + .ok_or_else(|| anyhow!("Undefined symbol `{name}`"))?, ); } expected_conflicts.push(interned_conflict); } let mut variables_to_inline = Vec::new(); - for name in grammar.variables_to_inline.iter() { - if let Some(symbol) = interner.intern_name(&name) { + for name in &grammar.variables_to_inline { + if let Some(symbol) = interner.intern_name(name) { variables_to_inline.push(symbol); } } @@ -68,8 +68,8 @@ pub(super) fn intern_symbols(grammar: &InputGrammar) -> Result if let Some(name) = grammar.word_token.as_ref() { word_token = Some( interner - .intern_name(&name) - .ok_or_else(|| anyhow!("Undefined symbol `{}`", &name))?, + .intern_name(name) + .ok_or_else(|| anyhow!("Undefined symbol `{name}`"))?, ); } @@ -118,13 +118,10 @@ impl<'a> Interner<'a> { params: params.clone(), }), - Rule::NamedSymbol(name) => { - if let Some(symbol) = self.intern_name(&name) { - Ok(Rule::Symbol(symbol)) - } else { - Err(anyhow!("Undefined symbol `{}`", name)) - } - } + Rule::NamedSymbol(name) => self.intern_name(name).map_or_else( + || Err(anyhow!("Undefined symbol `{name}`")), + |symbol| Ok(Rule::Symbol(symbol)), + ), _ => Ok(rule.clone()), } @@ -145,12 +142,12 @@ impl<'a> Interner<'a> { } } - return None; + None } } fn variable_type_for_name(name: &str) -> VariableType { - if name.starts_with("_") { + if name.starts_with('_') { VariableType::Hidden } else { VariableType::Named diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/mod.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/mod.rs index 51b32cc8f6..15243c454f 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/mod.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/mod.rs @@ -6,7 +6,7 @@ mod flatten_grammar; mod intern_symbols; mod process_inlines; -pub(crate) use self::expand_tokens::expand_tokens; +pub use self::expand_tokens::expand_tokens; use self::expand_repeats::expand_repeats; use self::extract_default_aliases::extract_default_aliases; @@ -26,7 +26,7 @@ use std::{ mem, }; -pub(crate) struct IntermediateGrammar { +pub struct IntermediateGrammar { variables: Vec, extra_symbols: Vec, expected_conflicts: Vec>, @@ -37,12 +37,12 @@ pub(crate) struct IntermediateGrammar { word_token: Option, } -pub(crate) type InternedGrammar = IntermediateGrammar; +pub type InternedGrammar = IntermediateGrammar; -pub(crate) type ExtractedSyntaxGrammar = IntermediateGrammar; +pub type ExtractedSyntaxGrammar = IntermediateGrammar; #[derive(Debug, PartialEq, Eq)] -pub(crate) struct ExtractedLexicalGrammar { +pub struct ExtractedLexicalGrammar { pub variables: Vec, pub separators: Vec, } @@ -50,21 +50,21 @@ pub(crate) struct ExtractedLexicalGrammar { impl Default for IntermediateGrammar { fn default() -> Self { Self { - variables: Default::default(), - extra_symbols: Default::default(), - expected_conflicts: Default::default(), - precedence_orderings: Default::default(), - external_tokens: Default::default(), - variables_to_inline: Default::default(), - supertype_symbols: Default::default(), - word_token: Default::default(), + variables: Vec::default(), + extra_symbols: Vec::default(), + expected_conflicts: Vec::default(), + precedence_orderings: Vec::default(), + external_tokens: Vec::default(), + variables_to_inline: Vec::default(), + supertype_symbols: Vec::default(), + word_token: Option::default(), } } } /// Transform an input grammar into separate components that are ready /// for parse table construction. -pub(crate) fn prepare_grammar( +pub fn prepare_grammar( input_grammar: &InputGrammar, ) -> Result<( SyntaxGrammar, @@ -109,9 +109,7 @@ fn validate_precedences(grammar: &InputGrammar) -> Result<()> { hash_map::Entry::Occupied(e) => { if e.get() != &ordering { return Err(anyhow!( - "Conflicting orderings for precedences {} and {}", - entry1, - entry2 + "Conflicting orderings for precedences {entry1} and {entry2}", )); } } @@ -127,16 +125,11 @@ fn validate_precedences(grammar: &InputGrammar) -> Result<()> { Rule::Repeat(rule) => validate(rule_name, rule, names), Rule::Seq(elements) | Rule::Choice(elements) => elements .iter() - .map(|e| validate(rule_name, e, names)) - .collect(), + .try_for_each(|e| validate(rule_name, e, names)), Rule::Metadata { rule, params } => { if let Precedence::Name(n) = ¶ms.precedence { if !names.contains(n) { - return Err(anyhow!( - "Undeclared precedence '{}' in rule '{}'", - n, - rule_name - )); + return Err(anyhow!("Undeclared precedence '{n}' in rule '{rule_name}'")); } } validate(rule_name, rule, names)?; @@ -168,7 +161,7 @@ fn validate_precedences(grammar: &InputGrammar) -> Result<()> { #[cfg(test)] mod tests { use super::*; - use crate::generate::grammars::{InputGrammar, Variable, VariableType}; + use crate::generate::grammars::VariableType; #[test] fn test_validate_precedences_with_undeclared_precedence() { diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/process_inlines.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/process_inlines.rs index 206ef8d3e3..659927a176 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/process_inlines.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/prepare_grammar/process_inlines.rs @@ -8,7 +8,7 @@ use std::collections::HashMap; #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] struct ProductionStepId { // A `None` value here means that the production itself was produced via inlining, - // and is stored in the the builder's `productions` vector, as opposed to being + // and is stored in the builder's `productions` vector, as opposed to being // stored in one of the grammar's variables. variable_index: Option, production_index: usize, @@ -21,7 +21,7 @@ struct InlinedProductionMapBuilder { } impl InlinedProductionMapBuilder { - fn build<'a>(mut self, grammar: &'a SyntaxGrammar) -> InlinedProductionMap { + fn build(mut self, grammar: &SyntaxGrammar) -> InlinedProductionMap { let mut step_ids_to_process = Vec::new(); for (variable_index, variable) in grammar.variables.iter().enumerate() { for production_index in 0..variable.productions.len() { @@ -38,14 +38,14 @@ impl InlinedProductionMapBuilder { if grammar.variables_to_inline.contains(&step.symbol) { let inlined_step_ids = self .inline_production_at_step(step_id, grammar) - .into_iter() - .cloned() + .iter() + .copied() .map(|production_index| ProductionStepId { variable_index: None, production_index, step_index: step_id.step_index, }); - step_ids_to_process.splice(i..i + 1, inlined_step_ids); + step_ids_to_process.splice(i..=i, inlined_step_ids); } else { step_ids_to_process[i] = ProductionStepId { variable_index: step_id.variable_index, @@ -67,11 +67,12 @@ impl InlinedProductionMapBuilder { let production_map = production_indices_by_step_id .into_iter() .map(|(step_id, production_indices)| { - let production = if let Some(variable_index) = step_id.variable_index { - &grammar.variables[variable_index].productions[step_id.production_index] - } else { - &productions[step_id.production_index] - } as *const Production; + let production = step_id.variable_index.map_or_else( + || &productions[step_id.production_index], + |variable_index| { + &grammar.variables[variable_index].productions[step_id.production_index] + }, + ) as *const Production; ((production, step_id.step_index as u32), production_indices) }) .collect(); @@ -86,29 +87,29 @@ impl InlinedProductionMapBuilder { &'a mut self, step_id: ProductionStepId, grammar: &'a SyntaxGrammar, - ) -> &'a Vec { + ) -> &'a [usize] { // Build a list of productions produced by inlining rules. let mut i = 0; let step_index = step_id.step_index; let mut productions_to_add = vec![self.production_for_id(step_id, grammar).clone()]; while i < productions_to_add.len() { if let Some(step) = productions_to_add[i].steps.get(step_index) { - let symbol = step.symbol.clone(); + let symbol = step.symbol; if grammar.variables_to_inline.contains(&symbol) { // Remove the production from the vector, replacing it with a placeholder. let production = productions_to_add - .splice(i..i + 1, [Production::default()].iter().cloned()) + .splice(i..=i, std::iter::once(&Production::default()).cloned()) .next() .unwrap(); // Replace the placeholder with the inlined productions. productions_to_add.splice( - i..i + 1, + i..=i, grammar.variables[symbol.index].productions.iter().map(|p| { let mut production = production.clone(); let removed_step = production .steps - .splice(step_index..(step_index + 1), p.steps.iter().cloned()) + .splice(step_index..=step_index, p.steps.iter().cloned()) .next() .unwrap(); let inserted_steps = @@ -127,7 +128,7 @@ impl InlinedProductionMapBuilder { if last_inserted_step.precedence.is_none() { last_inserted_step.precedence = removed_step.precedence; } - if last_inserted_step.associativity == None { + if last_inserted_step.associativity.is_none() { last_inserted_step.associativity = removed_step.associativity; } } @@ -169,11 +170,10 @@ impl InlinedProductionMapBuilder { id: ProductionStepId, grammar: &'a SyntaxGrammar, ) -> &'a Production { - if let Some(variable_index) = id.variable_index { - &grammar.variables[variable_index].productions[id.production_index] - } else { - &self.productions[id.production_index] - } + id.variable_index.map_or_else( + || &self.productions[id.production_index], + |variable_index| &grammar.variables[variable_index].productions[id.production_index], + ) } fn production_step_for_id<'a>( @@ -203,6 +203,12 @@ pub(super) fn process_inlines( lexical_grammar.variables[symbol.index].name, )) } + SymbolType::NonTerminal if symbol.index == 0 => { + return Err(anyhow!( + "Rule `{}` cannot be inlined because it is the first rule", + grammar.variables[symbol.index].name, + )) + } _ => {} } } @@ -217,9 +223,7 @@ pub(super) fn process_inlines( #[cfg(test)] mod tests { use super::*; - use crate::generate::grammars::{ - LexicalVariable, ProductionStep, SyntaxVariable, VariableType, - }; + use crate::generate::grammars::{LexicalVariable, SyntaxVariable, VariableType}; use crate::generate::rules::{Associativity, Precedence, Symbol}; #[test] @@ -260,7 +264,7 @@ mod tests { ..Default::default() }; - let inline_map = process_inlines(&grammar, &Default::default()).unwrap(); + let inline_map = process_inlines(&grammar, &LexicalGrammar::default()).unwrap(); // Nothing to inline at step 0. assert!(inline_map @@ -356,15 +360,15 @@ mod tests { ..Default::default() }; - let inline_map = process_inlines(&grammar, &Default::default()).unwrap(); + let inline_map = process_inlines(&grammar, &LexicalGrammar::default()).unwrap(); - let productions: Vec<&Production> = inline_map + let productions = inline_map .inlined_productions(&grammar.variables[0].productions[0], 1) .unwrap() - .collect(); + .collect::>(); assert_eq!( - productions.iter().cloned().cloned().collect::>(), + productions.iter().copied().cloned().collect::>(), vec![ Production { dynamic_precedence: 0, @@ -455,15 +459,15 @@ mod tests { ..Default::default() }; - let inline_map = process_inlines(&grammar, &Default::default()).unwrap(); + let inline_map = process_inlines(&grammar, &LexicalGrammar::default()).unwrap(); - let productions: Vec<_> = inline_map + let productions = inline_map .inlined_productions(&grammar.variables[0].productions[0], 0) .unwrap() - .collect(); + .collect::>(); assert_eq!( - productions.iter().cloned().cloned().collect::>(), + productions.iter().copied().cloned().collect::>(), vec![Production { dynamic_precedence: 0, steps: vec![ diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/render.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/render.rs index cb9f6c72a7..2c0f73a588 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/render.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/render.rs @@ -129,6 +129,7 @@ impl Generator { } self.add_lex_modes_list(); + self.add_parse_table(); if !self.syntax_grammar.external_tokens.is_empty() { self.add_external_token_enum(); @@ -136,7 +137,6 @@ impl Generator { self.add_external_scanner_states_list(); } - self.add_parse_table(); self.add_parser_export(); self.buffer @@ -152,54 +152,56 @@ impl Generator { self.symbol_ids[&Symbol::end()].clone(), ); - self.symbol_map = self - .parse_table - .symbols - .iter() - .map(|symbol| { - let mut mapping = symbol; - - // There can be multiple symbols in the grammar that have the same name and kind, - // due to simple aliases. When that happens, ensure that they map to the same - // public-facing symbol. If one of the symbols is not aliased, choose that one - // to be the public-facing symbol. Otherwise, pick the symbol with the lowest - // numeric value. - if let Some(alias) = self.default_aliases.get(symbol) { - let kind = alias.kind(); - for other_symbol in &self.parse_table.symbols { - if let Some(other_alias) = self.default_aliases.get(other_symbol) { - if other_symbol < mapping && other_alias == alias { - mapping = other_symbol; - } - } else if self.metadata_for_symbol(*other_symbol) == (&alias.value, kind) { + self.symbol_map = HashMap::new(); + + for symbol in &self.parse_table.symbols { + let mut mapping = symbol; + + // There can be multiple symbols in the grammar that have the same name and kind, + // due to simple aliases. When that happens, ensure that they map to the same + // public-facing symbol. If one of the symbols is not aliased, choose that one + // to be the public-facing symbol. Otherwise, pick the symbol with the lowest + // numeric value. + if let Some(alias) = self.default_aliases.get(symbol) { + let kind = alias.kind(); + for other_symbol in &self.parse_table.symbols { + if let Some(other_alias) = self.default_aliases.get(other_symbol) { + if other_symbol < mapping && other_alias == alias { mapping = other_symbol; - break; } + } else if self.metadata_for_symbol(*other_symbol) == (&alias.value, kind) { + mapping = other_symbol; + break; } } - // Two anonymous tokens with different flags but the same string value - // should be represented with the same symbol in the public API. Examples: - // * "<" and token(prec(1, "<")) - // * "(" and token.immediate("(") - else if symbol.is_terminal() { - let metadata = self.metadata_for_symbol(*symbol); - for other_symbol in &self.parse_table.symbols { - let other_metadata = self.metadata_for_symbol(*other_symbol); - if other_metadata == metadata { - mapping = other_symbol; - break; + } + // Two anonymous tokens with different flags but the same string value + // should be represented with the same symbol in the public API. Examples: + // * "<" and token(prec(1, "<")) + // * "(" and token.immediate("(") + else if symbol.is_terminal() { + let metadata = self.metadata_for_symbol(*symbol); + for other_symbol in &self.parse_table.symbols { + let other_metadata = self.metadata_for_symbol(*other_symbol); + if other_metadata == metadata { + if let Some(mapped) = self.symbol_map.get(other_symbol) { + if mapped == symbol { + break; + } } + mapping = other_symbol; + break; } } + } - (*symbol, *mapping) - }) - .collect(); + self.symbol_map.insert(*symbol, *mapping); + } for production_info in &self.parse_table.production_infos { // Build a list of all field names for field_name in production_info.field_map.keys() { - if let Err(i) = self.field_names.binary_search(&field_name) { + if let Err(i) = self.field_names.binary_search(field_name) { self.field_names.insert(i, field_name.clone()); } } @@ -207,13 +209,14 @@ impl Generator { for alias in &production_info.alias_sequence { // Generate a mapping from aliases to C identifiers. if let Some(alias) = &alias { - let existing_symbol = self.parse_table.symbols.iter().cloned().find(|symbol| { - if let Some(default_alias) = self.default_aliases.get(symbol) { - default_alias == alias - } else { - let (name, kind) = self.metadata_for_symbol(*symbol); - name == alias.value && kind == alias.kind() - } + let existing_symbol = self.parse_table.symbols.iter().copied().find(|symbol| { + self.default_aliases.get(symbol).map_or_else( + || { + let (name, kind) = self.metadata_for_symbol(*symbol); + name == alias.value && kind == alias.kind() + }, + |default_alias| default_alias == alias, + ) }); // Some aliases match an existing symbol in the grammar. @@ -254,13 +257,12 @@ impl Generator { } fn add_includes(&mut self) { - add_line!(self, "#include "); + add_line!(self, "#include \"tree_sitter/parser.h\""); add_line!(self, ""); } fn add_pragmas(&mut self) { add_line!(self, "#if defined(__GNUC__) || defined(__clang__)"); - add_line!(self, "#pragma GCC diagnostic push"); add_line!( self, "#pragma GCC diagnostic ignored \"-Wmissing-field-initializers\"" @@ -314,7 +316,7 @@ impl Generator { "#define SYMBOL_COUNT {}", self.parse_table.symbols.len() ); - add_line!(self, "#define ALIAS_COUNT {}", self.unique_aliases.len(),); + add_line!(self, "#define ALIAS_COUNT {}", self.unique_aliases.len()); add_line!(self, "#define TOKEN_COUNT {}", token_count); add_line!( self, @@ -336,19 +338,19 @@ impl Generator { } fn add_symbol_enum(&mut self) { - add_line!(self, "enum {{"); + add_line!(self, "enum ts_symbol_identifiers {{"); indent!(self); self.symbol_order.insert(Symbol::end(), 0); let mut i = 1; - for symbol in self.parse_table.symbols.iter() { + for symbol in &self.parse_table.symbols { if *symbol != Symbol::end() { self.symbol_order.insert(*symbol, i); - add_line!(self, "{} = {},", self.symbol_ids[&symbol], i); + add_line!(self, "{} = {},", self.symbol_ids[symbol], i); i += 1; } } for alias in &self.unique_aliases { - add_line!(self, "{} = {},", self.alias_ids[&alias], i); + add_line!(self, "{} = {},", self.alias_ids[alias], i); i += 1; } dedent!(self); @@ -359,20 +361,21 @@ impl Generator { fn add_symbol_names_list(&mut self) { add_line!(self, "static const char * const ts_symbol_names[] = {{"); indent!(self); - for symbol in self.parse_table.symbols.iter() { + for symbol in &self.parse_table.symbols { let name = self.sanitize_string( self.default_aliases .get(symbol) - .map(|alias| alias.value.as_str()) - .unwrap_or(self.metadata_for_symbol(*symbol).0), + .map_or(self.metadata_for_symbol(*symbol).0, |alias| { + alias.value.as_str() + }), ); - add_line!(self, "[{}] = \"{}\",", self.symbol_ids[&symbol], name); + add_line!(self, "[{}] = \"{}\",", self.symbol_ids[symbol], name); } for alias in &self.unique_aliases { add_line!( self, "[{}] = \"{}\",", - self.alias_ids[&alias], + self.alias_ids[alias], self.sanitize_string(&alias.value) ); } @@ -397,8 +400,8 @@ impl Generator { add_line!( self, "[{}] = {},", - self.alias_ids[&alias], - self.alias_ids[&alias], + self.alias_ids[alias], + self.alias_ids[alias], ); } @@ -408,7 +411,7 @@ impl Generator { } fn add_field_name_enum(&mut self) { - add_line!(self, "enum {{"); + add_line!(self, "enum ts_field_identifiers {{"); indent!(self); for (i, field_name) in self.field_names.iter().enumerate() { add_line!(self, "{} = {},", self.field_id(field_name), i + 1); @@ -442,7 +445,7 @@ impl Generator { ); indent!(self); for symbol in &self.parse_table.symbols { - add_line!(self, "[{}] = {{", self.symbol_ids[&symbol]); + add_line!(self, "[{}] = {{", self.symbol_ids[symbol]); indent!(self); if let Some(Alias { is_named, .. }) = self.default_aliases.get(symbol) { add_line!(self, ".visible = true,"); @@ -474,7 +477,7 @@ impl Generator { add_line!(self, "}},"); } for alias in &self.unique_aliases { - add_line!(self, "[{}] = {{", self.alias_ids[&alias]); + add_line!(self, "[{}] = {{", self.alias_ids[alias]); indent!(self); add_line!(self, ".visible = true,"); add_line!(self, ".named = {},", alias.is_named); @@ -506,7 +509,7 @@ impl Generator { indent!(self); for (j, alias) in production_info.alias_sequence.iter().enumerate() { if let Some(alias) = alias { - add_line!(self, "[{}] = {},", j, self.alias_ids[&alias]); + add_line!(self, "[{}] = {},", j, self.alias_ids[alias]); } } dedent!(self); @@ -525,15 +528,13 @@ impl Generator { if let Some(alias) = &step.alias { if step.symbol.is_non_terminal() && Some(alias) != self.default_aliases.get(&step.symbol) + && self.symbol_ids.contains_key(&step.symbol) { - if self.symbol_ids.contains_key(&step.symbol) { - if let Some(alias_id) = self.alias_ids.get(&alias) { - let alias_ids = alias_ids_by_symbol - .entry(step.symbol) - .or_insert(Vec::new()); - if let Err(i) = alias_ids.binary_search(&alias_id) { - alias_ids.insert(i, alias_id); - } + if let Some(alias_id) = self.alias_ids.get(alias) { + let alias_ids = + alias_ids_by_symbol.entry(step.symbol).or_insert(Vec::new()); + if let Err(i) = alias_ids.binary_search(&alias_id) { + alias_ids.insert(i, alias_id); } } } @@ -552,12 +553,12 @@ impl Generator { indent!(self); for (symbol, alias_ids) in alias_ids_by_symbol { let symbol_id = &self.symbol_ids[symbol]; - let public_symbol_id = &self.symbol_ids[&self.symbol_map[&symbol]]; - add_line!(self, "{}, {},", symbol_id, 1 + alias_ids.len()); + let public_symbol_id = &self.symbol_ids[&self.symbol_map[symbol]]; + add_line!(self, "{symbol_id}, {},", 1 + alias_ids.len()); indent!(self); - add_line!(self, "{},", public_symbol_id); + add_line!(self, "{public_symbol_id},"); for alias_id in alias_ids { - add_line!(self, "{},", alias_id); + add_line!(self, "{alias_id},"); } dedent!(self); } @@ -583,7 +584,7 @@ impl Generator { let primary_state = first_state_for_each_core_id .entry(state.core_id) .or_insert(idx); - add_line!(self, "[{}] = {},", idx, primary_state); + add_line!(self, "[{idx}] = {primary_state},"); } dedent!(self); add_line!(self, "}};"); @@ -594,14 +595,16 @@ impl Generator { let mut flat_field_maps = vec![]; let mut next_flat_field_map_index = 0; self.get_field_map_id( - &Vec::new(), + Vec::new(), &mut flat_field_maps, &mut next_flat_field_map_index, ); let mut field_map_ids = Vec::new(); for production_info in &self.parse_table.production_infos { - if !production_info.field_map.is_empty() { + if production_info.field_map.is_empty() { + field_map_ids.push((0, 0)); + } else { let mut flat_field_map = Vec::new(); for (field_name, locations) in &production_info.field_map { for location in locations { @@ -610,14 +613,12 @@ impl Generator { } field_map_ids.push(( self.get_field_map_id( - &flat_field_map, + flat_field_map.clone(), &mut flat_field_maps, &mut next_flat_field_map_index, ), flat_field_map.len(), )); - } else { - field_map_ids.push((0, 0)); } } @@ -630,10 +631,7 @@ impl Generator { if length > 0 { add_line!( self, - "[{}] = {{.index = {}, .length = {}}},", - production_id, - row_id, - length + "[{production_id}] = {{.index = {row_id}, .length = {length}}},", ); } } @@ -647,7 +645,7 @@ impl Generator { ); indent!(self); for (row_index, field_pairs) in flat_field_maps.into_iter().skip(1) { - add_line!(self, "[{}] =", row_index); + add_line!(self, "[{row_index}] ="); indent!(self); for (field_name, location) in field_pairs { add_whitespace!(self); @@ -676,7 +674,7 @@ impl Generator { // For each lex state, compute a summary of the code that needs to be // generated. - let state_transition_summaries: Vec> = lex_table + let state_transition_summaries = lex_table .states .iter() .map(|state| { @@ -695,7 +693,7 @@ impl Generator { ruled_out_chars.extend(chars.iter()); } else { ranges = chars.clone().negate().simplify_ignoring(&ruled_out_chars); - ranges.insert(0, '\0'..'\0') + ranges.insert(0, '\0'..'\0'); } // Record any large character sets so that they can be extracted @@ -733,10 +731,10 @@ impl Generator { }) .collect() }) - .collect(); + .collect::>>(); // Generate a helper function for each large character set. - let mut sorted_large_char_sets: Vec<_> = large_character_sets.iter().map(|e| e).collect(); + let mut sorted_large_char_sets = large_character_sets.iter().collect::>(); sorted_large_char_sets.sort_unstable_by_key(|info| (info.symbol, info.index)); for info in sorted_large_char_sets { add_line!( @@ -758,8 +756,7 @@ impl Generator { add_line!( self, - "static bool {}(TSLexer *lexer, TSStateId state) {{", - name + "static bool {name}(TSLexer *lexer, TSStateId state) {{", ); indent!(self); @@ -769,7 +766,7 @@ impl Generator { indent!(self); for (i, state) in lex_table.states.into_iter().enumerate() { - add_line!(self, "case {}:", i); + add_line!(self, "case {i}:"); indent!(self); self.add_lex_state(state, &state_transition_summaries[i], &large_character_sets); dedent!(self); @@ -808,14 +805,14 @@ impl Generator { } i += 1; } - return None; + None } fn add_lex_state( &mut self, state: LexState, - transition_info: &Vec, - large_character_sets: &Vec, + transition_info: &[TransitionSummary], + large_character_sets: &[LargeCharacterSetInfo], ) { if let Some(accept_action) = state.accept_action { add_line!(self, "ACCEPT_TOKEN({});", self.symbol_ids[&accept_action]); @@ -850,7 +847,7 @@ impl Generator { // Otherwise, generate code to compare the lookahead character // with all of the character ranges. - if transition.ranges.len() > 0 { + if !transition.ranges.is_empty() { add!(self, "if ("); self.add_character_range_conditions(&transition.ranges, transition.is_included, 2); add!(self, ") "); @@ -873,18 +870,33 @@ impl Generator { line_break.push_str(" "); } + // parenthesis needed if we add the `!eof` condition to explicitly avoid confusion with + // precedence of `&&` and `||` + let (mut need_open_paren, mut need_close_paren) = (false, false); for (i, range) in ranges.iter().enumerate() { if is_included { if i > 0 { - add!(self, " ||{}", line_break); + add!(self, " ||{line_break}"); + } + if range.start == '\0' { + add!(self, "!eof && "); + (need_open_paren, need_close_paren) = (true, true); } if range.end == range.start { + if need_open_paren { + add!(self, "("); + need_open_paren = false; + } add!(self, "lookahead == "); self.add_character(range.start); + if need_close_paren && i == ranges.len() - 1 { + add!(self, ")"); + need_close_paren = false; + } } else if range.end as u32 == range.start as u32 + 1 { add!(self, "lookahead == "); self.add_character(range.start); - add!(self, " ||{}lookahead == ", line_break); + add!(self, " ||{line_break}lookahead == "); self.add_character(range.end); } else { add!(self, "("); @@ -895,7 +907,7 @@ impl Generator { } } else { if i > 0 { - add!(self, " &&{}", line_break); + add!(self, " &&{line_break}"); } if range.end == range.start { add!(self, "lookahead != "); @@ -903,19 +915,17 @@ impl Generator { } else if range.end as u32 == range.start as u32 + 1 { add!(self, "lookahead != "); self.add_character(range.start); - add!(self, " &&{}lookahead != ", line_break); + add!(self, " &&{line_break}lookahead != "); + self.add_character(range.end); + } else if range.start != '\0' { + add!(self, "(lookahead < "); + self.add_character(range.start); + add!(self, " || "); self.add_character(range.end); + add!(self, " < lookahead)"); } else { - if range.start != '\0' { - add!(self, "(lookahead < "); - self.add_character(range.start); - add!(self, " || "); - self.add_character(range.end); - add!(self, " < lookahead)"); - } else { - add!(self, "lookahead > "); - self.add_character(range.end); - } + add!(self, "lookahead > "); + self.add_character(range.end); } } } @@ -944,7 +954,7 @@ impl Generator { add!(self, "("); } - add!(self, "c {} ", op); + add!(self, "c {op} "); self.add_character(*value); if !simple { @@ -997,17 +1007,16 @@ impl Generator { indent!(self); for (i, state) in self.parse_table.states.iter().enumerate() { if state.is_end_of_non_terminal_extra() { - add_line!(self, "[{}] = {{(TSStateId)(-1)}},", i,); + add_line!(self, "[{i}] = {{(TSStateId)(-1)}},"); } else if state.external_lex_state_id > 0 { add_line!( self, - "[{}] = {{.lex_state = {}, .external_lex_state = {}}},", - i, + "[{i}] = {{.lex_state = {}, .external_lex_state = {}}},", state.lex_state_id, state.external_lex_state_id ); } else { - add_line!(self, "[{}] = {{.lex_state = {}}},", i, state.lex_state_id); + add_line!(self, "[{i}] = {{.lex_state = {}}},", state.lex_state_id); } } dedent!(self); @@ -1016,7 +1025,7 @@ impl Generator { } fn add_external_token_enum(&mut self) { - add_line!(self, "enum {{"); + add_line!(self, "enum ts_external_scanner_symbol_identifiers {{"); indent!(self); for i in 0..self.syntax_grammar.external_tokens.len() { add_line!( @@ -1041,11 +1050,11 @@ impl Generator { let token = &self.syntax_grammar.external_tokens[i]; let id_token = token .corresponding_internal_token - .unwrap_or(Symbol::external(i)); + .unwrap_or_else(|| Symbol::external(i)); add_line!( self, "[{}] = {},", - self.external_token_id(&token), + self.external_token_id(token), self.symbol_ids[&id_token], ); } @@ -1140,12 +1149,7 @@ impl Generator { &mut parse_table_entries, &mut next_parse_action_list_index, ); - add_line!( - self, - "[{}] = ACTIONS({}),", - self.symbol_ids[symbol], - entry_id - ); + add_line!(self, "[{}] = ACTIONS({entry_id}),", self.symbol_ids[symbol]); } dedent!(self); add_line!(self, "}},"); @@ -1160,7 +1164,7 @@ impl Generator { let mut index = 0; let mut small_state_indices = Vec::new(); - let mut symbols_by_value: HashMap<(usize, SymbolType), Vec> = HashMap::new(); + let mut symbols_by_value = HashMap::<(usize, SymbolType), Vec>::new(); for state in self.parse_table.states.iter().skip(self.large_state_count) { small_state_indices.push(index); symbols_by_value.clear(); @@ -1201,14 +1205,14 @@ impl Generator { (symbols.len(), *kind, *value, symbols[0]) }); - add_line!(self, "[{}] = {},", index, values_with_symbols.len()); + add_line!(self, "[{index}] = {},", values_with_symbols.len()); indent!(self); - for ((value, kind), symbols) in values_with_symbols.iter_mut() { + for ((value, kind), symbols) in &mut values_with_symbols { if *kind == SymbolType::NonTerminal { - add_line!(self, "STATE({}), {},", value, symbols.len()); + add_line!(self, "STATE({value}), {},", symbols.len()); } else { - add_line!(self, "ACTIONS({}), {},", value, symbols.len()); + add_line!(self, "ACTIONS({value}), {},", symbols.len()); } symbols.sort_unstable(); @@ -1239,8 +1243,7 @@ impl Generator { for i in self.large_state_count..self.parse_table.states.len() { add_line!( self, - "[SMALL_STATE({})] = {},", - i, + "[SMALL_STATE({i})] = {},", small_state_indices[i - self.large_state_count] ); } @@ -1249,10 +1252,10 @@ impl Generator { add_line!(self, ""); } - let mut parse_table_entries: Vec<_> = parse_table_entries + let mut parse_table_entries = parse_table_entries .into_iter() .map(|(entry, i)| (i, entry)) - .collect(); + .collect::>(); parse_table_entries.sort_by_key(|(index, _)| *index); self.add_parse_action_list(parse_table_entries); } @@ -1266,8 +1269,7 @@ impl Generator { for (i, entry) in parse_table_entries { add!( self, - " [{}] = {{.entry = {{.count = {}, .reusable = {}}}}},", - i, + " [{i}] = {{.entry = {{.count = {}, .reusable = {}}}}},", entry.actions.len(), entry.reusable ); @@ -1282,9 +1284,9 @@ impl Generator { is_repetition, } => { if is_repetition { - add!(self, "SHIFT_REPEAT({})", state); + add!(self, "SHIFT_REPEAT({state})"); } else { - add!(self, "SHIFT({})", state); + add!(self, "SHIFT({state})"); } } ParseAction::Reduce { @@ -1294,17 +1296,17 @@ impl Generator { production_id, .. } => { - add!(self, "REDUCE({}, {}", self.symbol_ids[&symbol], child_count); + add!(self, "REDUCE({}, {child_count}", self.symbol_ids[&symbol]); if dynamic_precedence != 0 { - add!(self, ", .dynamic_precedence = {}", dynamic_precedence); + add!(self, ", .dynamic_precedence = {dynamic_precedence}"); } if production_id != 0 { - add!(self, ", .production_id = {}", production_id); + add!(self, ", .production_id = {production_id}"); } add!(self, ")"); } } - add!(self, ",") + add!(self, ","); } add!(self, "\n"); } @@ -1315,42 +1317,43 @@ impl Generator { fn add_parser_export(&mut self) { let language_function_name = format!("tree_sitter_{}", self.language_name); - let external_scanner_name = format!("{}_external_scanner", language_function_name); + let external_scanner_name = format!("{language_function_name}_external_scanner"); add_line!(self, "#ifdef __cplusplus"); add_line!(self, r#"extern "C" {{"#); add_line!(self, "#endif"); if !self.syntax_grammar.external_tokens.is_empty() { - add_line!(self, "void *{}_create(void);", external_scanner_name); - add_line!(self, "void {}_destroy(void *);", external_scanner_name); + add_line!(self, "void *{external_scanner_name}_create(void);"); + add_line!(self, "void {external_scanner_name}_destroy(void *);"); add_line!( self, - "bool {}_scan(void *, TSLexer *, const bool *);", - external_scanner_name + "bool {external_scanner_name}_scan(void *, TSLexer *, const bool *);", ); add_line!( self, - "unsigned {}_serialize(void *, char *);", - external_scanner_name + "unsigned {external_scanner_name}_serialize(void *, char *);", ); add_line!( self, - "void {}_deserialize(void *, const char *, unsigned);", - external_scanner_name + "void {external_scanner_name}_deserialize(void *, const char *, unsigned);", ); add_line!(self, ""); } add_line!(self, "#ifdef _WIN32"); - add_line!(self, "#define extern __declspec(dllexport)"); + add_line!(self, "#define TS_PUBLIC __declspec(dllexport)"); + add_line!(self, "#else"); + add_line!( + self, + "#define TS_PUBLIC __attribute__((visibility(\"default\")))" + ); add_line!(self, "#endif"); add_line!(self, ""); add_line!( self, - "extern const TSLanguage *{}(void) {{", - language_function_name + "TS_PUBLIC const TSLanguage *{language_function_name}() {{", ); indent!(self); add_line!(self, "static const TSLanguage language = {{"); @@ -1410,11 +1413,11 @@ impl Generator { indent!(self); add_line!(self, "&ts_external_scanner_states[0][0],"); add_line!(self, "ts_external_scanner_symbol_map,"); - add_line!(self, "{}_create,", external_scanner_name); - add_line!(self, "{}_destroy,", external_scanner_name); - add_line!(self, "{}_scan,", external_scanner_name); - add_line!(self, "{}_serialize,", external_scanner_name); - add_line!(self, "{}_deserialize,", external_scanner_name); + add_line!(self, "{external_scanner_name}_create,"); + add_line!(self, "{external_scanner_name}_destroy,"); + add_line!(self, "{external_scanner_name}_scan,"); + add_line!(self, "{external_scanner_name}_serialize,"); + add_line!(self, "{external_scanner_name}_deserialize,"); dedent!(self); add_line!(self, "}},"); } @@ -1451,7 +1454,7 @@ impl Generator { fn get_field_map_id( &self, - flat_field_map: &Vec<(String, FieldLocation)>, + flat_field_map: Vec<(String, FieldLocation)>, flat_field_maps: &mut Vec<(usize, Vec<(String, FieldLocation)>)>, next_flat_field_map_index: &mut usize, ) -> usize { @@ -1460,8 +1463,8 @@ impl Generator { } let result = *next_flat_field_map_index; - flat_field_maps.push((result, flat_field_map.clone())); *next_flat_field_map_index += flat_field_map.len(); + flat_field_maps.push((result, flat_field_map)); result } @@ -1500,8 +1503,8 @@ impl Generator { self.symbol_ids.insert(symbol, id); } - fn field_id(&self, field_name: &String) -> String { - format!("field_{}", field_name) + fn field_id(&self, field_name: &str) -> String { + format!("field_{field_name}") } fn metadata_for_symbol(&self, symbol: Symbol) -> (&str, VariableType) { @@ -1525,54 +1528,93 @@ impl Generator { fn sanitize_identifier(&self, name: &str) -> String { let mut result = String::with_capacity(name.len()); for c in name.chars() { - if ('a' <= c && c <= 'z') - || ('A' <= c && c <= 'Z') - || ('0' <= c && c <= '9') - || c == '_' - { + if c.is_ascii_alphanumeric() || c == '_' { result.push(c); } else { - let replacement = match c { - '~' => "TILDE", - '`' => "BQUOTE", - '!' => "BANG", - '@' => "AT", - '#' => "POUND", - '$' => "DOLLAR", - '%' => "PERCENT", - '^' => "CARET", - '&' => "AMP", - '*' => "STAR", - '(' => "LPAREN", - ')' => "RPAREN", - '-' => "DASH", - '+' => "PLUS", - '=' => "EQ", - '{' => "LBRACE", - '}' => "RBRACE", - '[' => "LBRACK", - ']' => "RBRACK", - '\\' => "BSLASH", - '|' => "PIPE", - ':' => "COLON", - ';' => "SEMI", - '"' => "DQUOTE", - '\'' => "SQUOTE", - '<' => "LT", - '>' => "GT", - ',' => "COMMA", - '.' => "DOT", - '?' => "QMARK", - '/' => "SLASH", - '\n' => "LF", - '\r' => "CR", - '\t' => "TAB", - _ => continue, - }; - if !result.is_empty() && !result.ends_with("_") { - result.push('_'); + 'special_chars: { + let replacement = match c { + ' ' if name.len() == 1 => "SPACE", + '~' => "TILDE", + '`' => "BQUOTE", + '!' => "BANG", + '@' => "AT", + '#' => "POUND", + '$' => "DOLLAR", + '%' => "PERCENT", + '^' => "CARET", + '&' => "AMP", + '*' => "STAR", + '(' => "LPAREN", + ')' => "RPAREN", + '-' => "DASH", + '+' => "PLUS", + '=' => "EQ", + '{' => "LBRACE", + '}' => "RBRACE", + '[' => "LBRACK", + ']' => "RBRACK", + '\\' => "BSLASH", + '|' => "PIPE", + ':' => "COLON", + ';' => "SEMI", + '"' => "DQUOTE", + '\'' => "SQUOTE", + '<' => "LT", + '>' => "GT", + ',' => "COMMA", + '.' => "DOT", + '?' => "QMARK", + '/' => "SLASH", + '\n' => "LF", + '\r' => "CR", + '\t' => "TAB", + '\0' => "NULL", + '\u{0001}' => "SOH", + '\u{0002}' => "STX", + '\u{0003}' => "ETX", + '\u{0004}' => "EOT", + '\u{0005}' => "ENQ", + '\u{0006}' => "ACK", + '\u{0007}' => "BEL", + '\u{0008}' => "BS", + '\u{000b}' => "VTAB", + '\u{000c}' => "FF", + '\u{000e}' => "SO", + '\u{000f}' => "SI", + '\u{0010}' => "DLE", + '\u{0011}' => "DC1", + '\u{0012}' => "DC2", + '\u{0013}' => "DC3", + '\u{0014}' => "DC4", + '\u{0015}' => "NAK", + '\u{0016}' => "SYN", + '\u{0017}' => "ETB", + '\u{0018}' => "CAN", + '\u{0019}' => "EM", + '\u{001a}' => "SUB", + '\u{001b}' => "ESC", + '\u{001c}' => "FS", + '\u{001d}' => "GS", + '\u{001e}' => "RS", + '\u{001f}' => "US", + '\u{007F}' => "DEL", + '\u{FEFF}' => "BOM", + '\u{0080}'..='\u{FFFF}' => { + result.push_str(&format!("u{:04x}", c as u32)); + break 'special_chars; + } + '\u{10000}'..='\u{10FFFF}' => { + result.push_str(&format!("U{:08x}", c as u32)); + break 'special_chars; + } + '0'..='9' | 'a'..='z' | 'A'..='Z' | '_' => unreachable!(), + ' ' => break 'special_chars, + }; + if !result.is_empty() && !result.ends_with('_') { + result.push('_'); + } + result += replacement; } - result += replacement; } } result @@ -1585,10 +1627,19 @@ impl Generator { '\"' => result += "\\\"", '?' => result += "\\?", '\\' => result += "\\\\", + '\u{0007}' => result += "\\a", + '\u{0008}' => result += "\\b", + '\u{000b}' => result += "\\v", '\u{000c}' => result += "\\f", '\n' => result += "\\n", '\r' => result += "\\r", '\t' => result += "\\t", + '\0' => result += "\\0", + '\u{0001}'..='\u{001f}' => result += &format!("\\x{:02x}", c as u32), + '\u{007F}'..='\u{FFFF}' => result += &format!("\\u{:04x}", c as u32), + '\u{10000}'..='\u{10FFFF}' => { + result.push_str(&format!("\\U{:08x}", c as u32)); + } _ => result.push(c), } } @@ -1605,9 +1656,9 @@ impl Generator { '\r' => add!(self, "'\\r'"), _ => { if c == ' ' || c.is_ascii_graphic() { - add!(self, "'{}'", c) + add!(self, "'{c}'"); } else { - add!(self, "{}", c as u32) + add!(self, "{}", c as u32); } } } @@ -1632,7 +1683,8 @@ impl Generator { /// * `abi_version` - The language ABI version that should be generated. Usually /// you want Tree-sitter's current version, but right after making an ABI /// change, it may be useful to generate code with the previous ABI. -pub(crate) fn render_c_code( +#[allow(clippy::too_many_arguments)] +pub fn render_c_code( name: &str, parse_table: ParseTable, main_lex_table: LexTable, @@ -1643,12 +1695,10 @@ pub(crate) fn render_c_code( default_aliases: AliasMap, abi_version: usize, ) -> String { - if !(ABI_VERSION_MIN..=ABI_VERSION_MAX).contains(&abi_version) { - panic!( - "This version of Tree-sitter can only generate parsers with ABI version {} - {}, not {}", - ABI_VERSION_MIN, ABI_VERSION_MAX, abi_version - ); - } + assert!( + (ABI_VERSION_MIN..=ABI_VERSION_MAX).contains(&abi_version), + "This version of Tree-sitter can only generate parsers with ABI version {ABI_VERSION_MIN} - {ABI_VERSION_MAX}, not {abi_version}", + ); Generator { buffer: String::new(), diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/rules.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/rules.rs index 0e3ff89892..af744781f6 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/rules.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/rules.rs @@ -1,10 +1,9 @@ use super::grammars::VariableType; use smallbitvec::SmallBitVec; -use std::iter::FromIterator; use std::{collections::HashMap, fmt}; #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub(crate) enum SymbolType { +pub enum SymbolType { External, End, EndOfNonTerminalExtra, @@ -13,28 +12,29 @@ pub(crate) enum SymbolType { } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub(crate) enum Associativity { +pub enum Associativity { Left, Right, } #[derive(Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub(crate) struct Alias { +pub struct Alias { pub value: String, pub is_named: bool, } -#[derive(Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] +#[derive(Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, Default)] pub enum Precedence { + #[default] None, Integer(i32), Name(String), } -pub(crate) type AliasMap = HashMap; +pub type AliasMap = HashMap; #[derive(Clone, Debug, Default, PartialEq, Eq, Hash)] -pub(crate) struct MetadataParams { +pub struct MetadataParams { pub precedence: Precedence, pub dynamic_precedence: i32, pub associativity: Option, @@ -47,16 +47,16 @@ pub(crate) struct MetadataParams { } #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] -pub(crate) struct Symbol { +pub struct Symbol { pub kind: SymbolType, pub index: usize, } #[derive(Clone, Debug, PartialEq, Eq, Hash)] -pub(crate) enum Rule { +pub enum Rule { Blank, String(String), - Pattern(String), + Pattern(String, String), NamedSymbol(String), Symbol(Symbol), Choice(Vec), @@ -73,7 +73,7 @@ pub(crate) enum Rule { // index corresponding to a token, and each value representing whether or not // the token is present in the set. #[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub(crate) struct TokenSet { +pub struct TokenSet { terminal_bits: SmallBitVec, external_bits: SmallBitVec, eof: bool, @@ -81,76 +81,77 @@ pub(crate) struct TokenSet { } impl Rule { - pub fn field(name: String, content: Rule) -> Self { + pub fn field(name: String, content: Self) -> Self { add_metadata(content, move |params| { params.field_name = Some(name); }) } - pub fn alias(content: Rule, value: String, is_named: bool) -> Self { + pub fn alias(content: Self, value: String, is_named: bool) -> Self { add_metadata(content, move |params| { - params.alias = Some(Alias { is_named, value }); + params.alias = Some(Alias { value, is_named }); }) } - pub fn token(content: Rule) -> Self { + pub fn token(content: Self) -> Self { add_metadata(content, |params| { params.is_token = true; }) } - pub fn immediate_token(content: Rule) -> Self { + pub fn immediate_token(content: Self) -> Self { add_metadata(content, |params| { params.is_token = true; params.is_main_token = true; }) } - pub fn prec(value: Precedence, content: Rule) -> Self { + pub fn prec(value: Precedence, content: Self) -> Self { add_metadata(content, |params| { params.precedence = value; }) } - pub fn prec_left(value: Precedence, content: Rule) -> Self { + pub fn prec_left(value: Precedence, content: Self) -> Self { add_metadata(content, |params| { params.associativity = Some(Associativity::Left); params.precedence = value; }) } - pub fn prec_right(value: Precedence, content: Rule) -> Self { + pub fn prec_right(value: Precedence, content: Self) -> Self { add_metadata(content, |params| { params.associativity = Some(Associativity::Right); params.precedence = value; }) } - pub fn prec_dynamic(value: i32, content: Rule) -> Self { + pub fn prec_dynamic(value: i32, content: Self) -> Self { add_metadata(content, |params| { params.dynamic_precedence = value; }) } - pub fn repeat(rule: Rule) -> Self { - Rule::Repeat(Box::new(rule)) + pub fn repeat(rule: Self) -> Self { + Self::Repeat(Box::new(rule)) } - pub fn choice(rules: Vec) -> Self { + pub fn choice(rules: Vec) -> Self { let mut elements = Vec::with_capacity(rules.len()); for rule in rules { choice_helper(&mut elements, rule); } - Rule::Choice(elements) + Self::Choice(elements) } - pub fn seq(rules: Vec) -> Self { - Rule::Seq(rules) + pub fn seq(rules: Vec) -> Self { + Self::Seq(rules) } } impl Alias { - pub fn kind(&self) -> VariableType { + #[must_use] + pub const fn kind(&self) -> VariableType { if self.is_named { VariableType::Named } else { @@ -160,85 +161,101 @@ impl Alias { } impl Precedence { - pub fn is_none(&self) -> bool { - matches!(self, Precedence::None) + #[must_use] + pub const fn is_none(&self) -> bool { + matches!(self, Self::None) } } #[cfg(test)] impl Rule { - pub fn terminal(index: usize) -> Self { - Rule::Symbol(Symbol::terminal(index)) + #[must_use] + pub const fn terminal(index: usize) -> Self { + Self::Symbol(Symbol::terminal(index)) } - pub fn non_terminal(index: usize) -> Self { - Rule::Symbol(Symbol::non_terminal(index)) + #[must_use] + pub const fn non_terminal(index: usize) -> Self { + Self::Symbol(Symbol::non_terminal(index)) } - pub fn external(index: usize) -> Self { - Rule::Symbol(Symbol::external(index)) + #[must_use] + pub const fn external(index: usize) -> Self { + Self::Symbol(Symbol::external(index)) } + #[must_use] pub fn named(name: &'static str) -> Self { - Rule::NamedSymbol(name.to_string()) + Self::NamedSymbol(name.to_string()) } + #[must_use] pub fn string(value: &'static str) -> Self { - Rule::String(value.to_string()) + Self::String(value.to_string()) } - pub fn pattern(value: &'static str) -> Self { - Rule::Pattern(value.to_string()) + #[must_use] + pub fn pattern(value: &'static str, flags: &'static str) -> Self { + Self::Pattern(value.to_string(), flags.to_string()) } } impl Symbol { + #[must_use] pub fn is_terminal(&self) -> bool { self.kind == SymbolType::Terminal } + #[must_use] pub fn is_non_terminal(&self) -> bool { self.kind == SymbolType::NonTerminal } + #[must_use] pub fn is_external(&self) -> bool { self.kind == SymbolType::External } + #[must_use] pub fn is_eof(&self) -> bool { self.kind == SymbolType::End } - pub fn non_terminal(index: usize) -> Self { - Symbol { + #[must_use] + pub const fn non_terminal(index: usize) -> Self { + Self { kind: SymbolType::NonTerminal, index, } } - pub fn terminal(index: usize) -> Self { - Symbol { + #[must_use] + pub const fn terminal(index: usize) -> Self { + Self { kind: SymbolType::Terminal, index, } } - pub fn external(index: usize) -> Self { - Symbol { + #[must_use] + pub const fn external(index: usize) -> Self { + Self { kind: SymbolType::External, index, } } - pub fn end() -> Self { - Symbol { + #[must_use] + pub const fn end() -> Self { + Self { kind: SymbolType::End, index: 0, } } - pub fn end_of_nonterminal_extra() -> Self { - Symbol { + #[must_use] + pub const fn end_of_nonterminal_extra() -> Self { + Self { kind: SymbolType::EndOfNonTerminalExtra, index: 0, } @@ -246,8 +263,9 @@ impl Symbol { } impl From for Rule { + #[must_use] fn from(symbol: Symbol) -> Self { - Rule::Symbol(symbol) + Self::Symbol(symbol) } } @@ -261,7 +279,7 @@ impl TokenSet { } } - pub fn iter<'a>(&'a self) -> impl Iterator + 'a { + pub fn iter(&self) -> impl Iterator + '_ { self.terminal_bits .iter() .enumerate() @@ -292,7 +310,7 @@ impl TokenSet { }) } - pub fn terminals<'a>(&'a self) -> impl Iterator + 'a { + pub fn terminals(&self) -> impl Iterator + '_ { self.terminal_bits .iter() .enumerate() @@ -361,11 +379,9 @@ impl TokenSet { }; } }; - if other.index < vec.len() { - if vec[other.index] { - vec.set(other.index, false); - return true; - } + if other.index < vec.len() && vec[other.index] { + vec.set(other.index, false); + return true; } false } @@ -377,7 +393,7 @@ impl TokenSet { && !self.external_bits.iter().any(|a| a) } - pub fn insert_all_terminals(&mut self, other: &TokenSet) -> bool { + pub fn insert_all_terminals(&mut self, other: &Self) -> bool { let mut result = false; if other.terminal_bits.len() > self.terminal_bits.len() { self.terminal_bits.resize(other.terminal_bits.len(), false); @@ -391,7 +407,7 @@ impl TokenSet { result } - fn insert_all_externals(&mut self, other: &TokenSet) -> bool { + fn insert_all_externals(&mut self, other: &Self) -> bool { let mut result = false; if other.external_bits.len() > self.external_bits.len() { self.external_bits.resize(other.external_bits.len(), false); @@ -405,7 +421,7 @@ impl TokenSet { result } - pub fn insert_all(&mut self, other: &TokenSet) -> bool { + pub fn insert_all(&mut self, other: &Self) -> bool { let mut result = false; if other.eof { result |= !self.eof; @@ -466,15 +482,9 @@ fn choice_helper(result: &mut Vec, rule: Rule) { impl fmt::Display for Precedence { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { - Precedence::Integer(i) => write!(f, "{}", i), - Precedence::Name(s) => write!(f, "'{}'", s), - Precedence::None => write!(f, "none"), + Self::Integer(i) => write!(f, "{i}"), + Self::Name(s) => write!(f, "'{s}'"), + Self::None => write!(f, "none"), } } } - -impl Default for Precedence { - fn default() -> Self { - Precedence::None - } -} diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/tables.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/tables.rs index 16bf185165..3d84c541a8 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/tables.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/tables.rs @@ -1,9 +1,9 @@ use super::nfa::CharacterSet; use super::rules::{Alias, Symbol, TokenSet}; use std::collections::BTreeMap; -pub(crate) type ProductionInfoId = usize; -pub(crate) type ParseStateId = usize; -pub(crate) type LexStateId = usize; +pub type ProductionInfoId = usize; +pub type ParseStateId = usize; +pub type LexStateId = usize; use std::hash::BuildHasherDefault; @@ -11,7 +11,7 @@ use indexmap::IndexMap; use rustc_hash::FxHasher; #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub(crate) enum ParseAction { +pub enum ParseAction { Accept, Shift { state: ParseStateId, @@ -28,19 +28,19 @@ pub(crate) enum ParseAction { } #[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub(crate) enum GotoAction { +pub enum GotoAction { Goto(ParseStateId), ShiftExtra, } #[derive(Clone, Debug, PartialEq, Eq, Hash)] -pub(crate) struct ParseTableEntry { +pub struct ParseTableEntry { pub actions: Vec, pub reusable: bool, } #[derive(Clone, Debug, Default, PartialEq, Eq)] -pub(crate) struct ParseState { +pub struct ParseState { pub id: ParseStateId, pub terminal_entries: IndexMap>, pub nonterminal_entries: IndexMap>, @@ -50,19 +50,19 @@ pub(crate) struct ParseState { } #[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] -pub(crate) struct FieldLocation { +pub struct FieldLocation { pub index: usize, pub inherited: bool, } #[derive(Debug, Default, PartialEq, Eq)] -pub(crate) struct ProductionInfo { +pub struct ProductionInfo { pub alias_sequence: Vec>, pub field_map: BTreeMap>, } #[derive(Debug, PartialEq, Eq)] -pub(crate) struct ParseTable { +pub struct ParseTable { pub states: Vec, pub symbols: Vec, pub production_infos: Vec, @@ -71,25 +71,25 @@ pub(crate) struct ParseTable { } #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] -pub(crate) struct AdvanceAction { +pub struct AdvanceAction { pub state: LexStateId, pub in_main_token: bool, } #[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord)] -pub(crate) struct LexState { +pub struct LexState { pub accept_action: Option, pub eof_action: Option, pub advance_actions: Vec<(CharacterSet, AdvanceAction)>, } -#[derive(Debug, PartialEq, Eq)] -pub(crate) struct LexTable { +#[derive(Debug, PartialEq, Eq, Default)] +pub struct LexTable { pub states: Vec, } impl ParseTableEntry { - pub fn new() -> Self { + pub const fn new() -> Self { Self { reusable: true, actions: Vec::new(), @@ -97,19 +97,13 @@ impl ParseTableEntry { } } -impl Default for LexTable { - fn default() -> Self { - LexTable { states: Vec::new() } - } -} - impl ParseState { pub fn is_end_of_non_terminal_extra(&self) -> bool { self.terminal_entries .contains_key(&Symbol::end_of_nonterminal_extra()) } - pub fn referenced_states<'a>(&'a self) -> impl Iterator + 'a { + pub fn referenced_states(&self) -> impl Iterator + '_ { self.terminal_entries .iter() .flat_map(|(_, entry)| { @@ -129,7 +123,7 @@ impl ParseState { pub fn update_referenced_states(&mut self, mut f: F) where - F: FnMut(usize, &ParseState) -> usize, + F: FnMut(usize, &Self) -> usize, { let mut updates = Vec::new(); for (symbol, entry) in &self.terminal_entries { diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/.editorconfig b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/.editorconfig new file mode 100644 index 0000000000..d3a8b5b697 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/.editorconfig @@ -0,0 +1,39 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{json,toml,yml,gyp}] +indent_style = space +indent_size = 2 + +[*.js] +indent_style = space +indent_size = 2 + +[*.rs] +indent_style = space +indent_size = 4 + +[*.{c,cc,h}] +indent_style = space +indent_size = 4 + +[*.{py,pyi}] +indent_style = space +indent_size = 4 + +[*.swift] +indent_style = space +indent_size = 4 + +[*.go] +indent_style = tab +indent_size = 8 + +[Makefile] +indent_style = tab +indent_size = 8 diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/PARSER_NAME.h b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/PARSER_NAME.h new file mode 100644 index 0000000000..3dbbfd100d --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/PARSER_NAME.h @@ -0,0 +1,16 @@ +#ifndef TREE_SITTER_UPPER_PARSER_NAME_H_ +#define TREE_SITTER_UPPER_PARSER_NAME_H_ + +typedef struct TSLanguage TSLanguage; + +#ifdef __cplusplus +extern "C" { +#endif + +const TSLanguage *tree_sitter_PARSER_NAME(void); + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_UPPER_PARSER_NAME_H_ diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/PARSER_NAME.pc.in b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/PARSER_NAME.pc.in new file mode 100644 index 0000000000..deed9fa47f --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/PARSER_NAME.pc.in @@ -0,0 +1,11 @@ +prefix=@PREFIX@ +libdir=@LIBDIR@ +includedir=@INCLUDEDIR@ + +Name: tree-sitter-PARSER_NAME +Description: CAMEL_PARSER_NAME grammar for tree-sitter +URL: @URL@ +Version: @VERSION@ +Requires: @REQUIRES@ +Libs: -L${libdir} @ADDITIONAL_LIBS@ -ltree-sitter-PARSER_NAME +Cflags: -I${includedir} diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/Package.swift b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/Package.swift new file mode 100644 index 0000000000..f0cc1cd19d --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/Package.swift @@ -0,0 +1,48 @@ +// swift-tools-version:5.3 +import PackageDescription + +let package = Package( + name: "TreeSitterCAMEL_PARSER_NAME", + platforms: [.macOS(.v10_13), .iOS(.v11)], + products: [ + .library(name: "TreeSitterCAMEL_PARSER_NAME", targets: ["TreeSitterCAMEL_PARSER_NAME"]), + ], + dependencies: [], + targets: [ + .target(name: "TreeSitterCAMEL_PARSER_NAME", + path: ".", + exclude: [ + "Cargo.toml", + "Makefile", + "binding.gyp", + "bindings/c", + "bindings/go", + "bindings/node", + "bindings/python", + "bindings/rust", + "prebuilds", + "grammar.js", + "package.json", + "package-lock.json", + "pyproject.toml", + "setup.py", + "test", + "examples", + ".editorconfig", + ".github", + ".gitignore", + ".gitattributes", + ".gitmodules", + ], + sources: [ + "src/parser.c", + // NOTE: if your language has an external scanner, add it here. + ], + resources: [ + .copy("queries") + ], + publicHeadersPath: "bindings/swift", + cSettings: [.headerSearchPath("src")]) + ], + cLanguageStandard: .c11 +) diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/__init__.py b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/__init__.py new file mode 100644 index 0000000000..d3796ccb05 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/__init__.py @@ -0,0 +1,5 @@ +"CAMEL_PARSER_NAME grammar for tree-sitter" + +from ._binding import language + +__all__ = ["language"] diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/__init__.pyi b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/__init__.pyi new file mode 100644 index 0000000000..5416666fc3 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/__init__.pyi @@ -0,0 +1 @@ +def language() -> int: ... diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/alloc.h b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/alloc.h new file mode 100644 index 0000000000..1f4466d75c --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/alloc.h @@ -0,0 +1,54 @@ +#ifndef TREE_SITTER_ALLOC_H_ +#define TREE_SITTER_ALLOC_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +// Allow clients to override allocation functions +#ifdef TREE_SITTER_REUSE_ALLOCATOR + +extern void *(*ts_current_malloc)(size_t); +extern void *(*ts_current_calloc)(size_t, size_t); +extern void *(*ts_current_realloc)(void *, size_t); +extern void (*ts_current_free)(void *); + +#ifndef ts_malloc +#define ts_malloc ts_current_malloc +#endif +#ifndef ts_calloc +#define ts_calloc ts_current_calloc +#endif +#ifndef ts_realloc +#define ts_realloc ts_current_realloc +#endif +#ifndef ts_free +#define ts_free ts_current_free +#endif + +#else + +#ifndef ts_malloc +#define ts_malloc malloc +#endif +#ifndef ts_calloc +#define ts_calloc calloc +#endif +#ifndef ts_realloc +#define ts_realloc realloc +#endif +#ifndef ts_free +#define ts_free free +#endif + +#endif + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_ALLOC_H_ diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/binding.cc b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/binding.cc deleted file mode 100644 index d68a85abba..0000000000 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/binding.cc +++ /dev/null @@ -1,28 +0,0 @@ -#include "tree_sitter/parser.h" -#include -#include "nan.h" - -using namespace v8; - -extern "C" TSLanguage * tree_sitter_PARSER_NAME(); - -namespace { - -NAN_METHOD(New) {} - -void Init(Local exports, Local module) { - Local tpl = Nan::New(New); - tpl->SetClassName(Nan::New("Language").ToLocalChecked()); - tpl->InstanceTemplate()->SetInternalFieldCount(1); - - Local constructor = Nan::GetFunction(tpl).ToLocalChecked(); - Local instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked(); - Nan::SetInternalFieldPointer(instance, 0, tree_sitter_PARSER_NAME()); - - Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("PARSER_NAME").ToLocalChecked()); - Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance); -} - -NODE_MODULE(tree_sitter_PARSER_NAME_binding, Init) - -} // namespace diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/binding.go b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/binding.go new file mode 100644 index 0000000000..b41863c52c --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/binding.go @@ -0,0 +1,13 @@ +package tree_sitter_PARSER_NAME + +// #cgo CFLAGS: -std=c11 -fPIC +// #include "../../src/parser.c" +// // NOTE: if your language has an external scanner, add it here. +import "C" + +import "unsafe" + +// Get the tree-sitter Language for this grammar. +func Language() unsafe.Pointer { + return unsafe.Pointer(C.tree_sitter_LOWER_PARSER_NAME()) +} diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/binding.gyp b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/binding.gyp index ba86afb0cc..087e65555a 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/binding.gyp +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/binding.gyp @@ -2,18 +2,20 @@ "targets": [ { "target_name": "tree_sitter_PARSER_NAME_binding", + "dependencies": [ + "=RUST_BINDING_VERSION" [build-dependencies] -cc = "1.0" +cc = "1.0.87" diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/gitattributes b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/gitattributes new file mode 100644 index 0000000000..ffb52abecc --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/gitattributes @@ -0,0 +1,11 @@ +* text eol=lf + +src/*.json linguist-generated +src/parser.c linguist-generated +src/tree_sitter/* linguist-generated + +bindings/** linguist-generated +binding.gyp linguist-generated +setup.py linguist-generated +Makefile linguist-generated +Package.swift linguist-generated diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/gitignore b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/gitignore new file mode 100644 index 0000000000..27fc43f720 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/gitignore @@ -0,0 +1,38 @@ +# Rust artifacts +Cargo.lock +target/ + +# Node artifacts +build/ +prebuilds/ +node_modules/ +*.tgz + +# Swift artifacts +.build/ + +# Go artifacts +go.sum +_obj/ + +# Python artifacts +.venv/ +dist/ +*.egg-info +*.whl + +# C artifacts +*.a +*.so +*.so.* +*.dylib +*.dll +*.pc + +# Example dirs +/examples/*/ + +# Grammar volatiles +*.wasm +*.obj +*.o diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/go.mod b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/go.mod new file mode 100644 index 0000000000..00e31a4472 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/go.mod @@ -0,0 +1,5 @@ +module github.com/tree-sitter/tree-sitter-PARSER_NAME + +go 1.22 + +require github.com/smacker/go-tree-sitter v0.0.0-20230720070738-0d0a9f78d8f8 diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/grammar.js b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/grammar.js new file mode 100644 index 0000000000..62b7cf3b9f --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/grammar.js @@ -0,0 +1,11 @@ +/// +// @ts-check + +module.exports = grammar({ + name: "LOWER_PARSER_NAME", + + rules: { + // TODO: add the actual grammar rules + source_file: $ => "hello" + } +}); diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/index.d.ts b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/index.d.ts new file mode 100644 index 0000000000..efe259eed0 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/index.d.ts @@ -0,0 +1,28 @@ +type BaseNode = { + type: string; + named: boolean; +}; + +type ChildNode = { + multiple: boolean; + required: boolean; + types: BaseNode[]; +}; + +type NodeInfo = + | (BaseNode & { + subtypes: BaseNode[]; + }) + | (BaseNode & { + fields: { [name: string]: ChildNode }; + children: ChildNode[]; + }); + +type Language = { + name: string; + language: unknown; + nodeTypeInfo: NodeInfo[]; +}; + +declare const language: Language; +export = language; diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/index.js b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/index.js index bc5daf7cca..6657bcf42d 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/index.js +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/index.js @@ -1,18 +1,6 @@ -try { - module.exports = require("../../build/Release/tree_sitter_PARSER_NAME_binding"); -} catch (error1) { - if (error1.code !== 'MODULE_NOT_FOUND') { - throw error1; - } - try { - module.exports = require("../../build/Debug/tree_sitter_PARSER_NAME_binding"); - } catch (error2) { - if (error2.code !== 'MODULE_NOT_FOUND') { - throw error2; - } - throw error1 - } -} +const root = require("path").join(__dirname, "..", ".."); + +module.exports = require("node-gyp-build")(root); try { module.exports.nodeTypeInfo = require("../../src/node-types.json"); diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/js-binding.cc b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/js-binding.cc new file mode 100644 index 0000000000..5b167cc85e --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/js-binding.cc @@ -0,0 +1,20 @@ +#include + +typedef struct TSLanguage TSLanguage; + +extern "C" TSLanguage *tree_sitter_PARSER_NAME(); + +// "tree-sitter", "language" hashed with BLAKE2 +const napi_type_tag LANGUAGE_TYPE_TAG = { + 0x8AF2E5212AD58ABF, 0xD5006CAD83ABBA16 +}; + +Napi::Object Init(Napi::Env env, Napi::Object exports) { + exports["name"] = Napi::String::New(env, "PARSER_NAME"); + auto language = Napi::External::New(env, tree_sitter_PARSER_NAME()); + language.TypeTag(&LANGUAGE_TYPE_TAG); + exports["language"] = language; + return exports; +} + +NODE_API_MODULE(tree_sitter_PARSER_NAME_binding, Init) diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/lib.rs b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/lib.rs index dab87e4fca..f5ce6a53f2 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/lib.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/lib.rs @@ -1,13 +1,15 @@ -//! This crate provides PARSER_NAME language support for the [tree-sitter][] parsing library. +//! This crate provides CAMEL_PARSER_NAME language support for the [tree-sitter][] parsing library. //! //! Typically, you will use the [language][language func] function to add this language to a //! tree-sitter [Parser][], and then use the parser to parse some code: //! //! ``` -//! let code = ""; +//! let code = r#" +//! "#; //! let mut parser = tree_sitter::Parser::new(); -//! parser.set_language(tree_sitter_PARSER_NAME::language()).expect("Error loading PARSER_NAME grammar"); +//! parser.set_language(&tree_sitter_PARSER_NAME::language()).expect("Error loading CAMEL_PARSER_NAME grammar"); //! let tree = parser.parse(code, None).unwrap(); +//! assert!(!tree.root_node().has_error()); //! ``` //! //! [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html @@ -31,14 +33,14 @@ pub fn language() -> Language { /// The content of the [`node-types.json`][] file for this grammar. /// /// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types -pub const NODE_TYPES: &'static str = include_str!("../../src/node-types.json"); +pub const NODE_TYPES: &str = include_str!("../../src/node-types.json"); // Uncomment these to include any queries that this grammar contains -// pub const HIGHLIGHTS_QUERY: &'static str = include_str!("../../queries/highlights.scm"); -// pub const INJECTIONS_QUERY: &'static str = include_str!("../../queries/injections.scm"); -// pub const LOCALS_QUERY: &'static str = include_str!("../../queries/locals.scm"); -// pub const TAGS_QUERY: &'static str = include_str!("../../queries/tags.scm"); +// pub const HIGHLIGHTS_QUERY: &str = include_str!("../../queries/highlights.scm"); +// pub const INJECTIONS_QUERY: &str = include_str!("../../queries/injections.scm"); +// pub const LOCALS_QUERY: &str = include_str!("../../queries/locals.scm"); +// pub const TAGS_QUERY: &str = include_str!("../../queries/tags.scm"); #[cfg(test)] mod tests { @@ -46,7 +48,7 @@ mod tests { fn test_can_load_grammar() { let mut parser = tree_sitter::Parser::new(); parser - .set_language(super::language()) - .expect("Error loading PARSER_NAME language"); + .set_language(&super::language()) + .expect("Error loading CAMEL_PARSER_NAME grammar"); } } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/makefile b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/makefile new file mode 100644 index 0000000000..522c1fad3d --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/makefile @@ -0,0 +1,109 @@ +VERSION := 0.0.1 + +LANGUAGE_NAME := tree-sitter-PARSER_NAME + +# repository +SRC_DIR := src + +PARSER_REPO_URL := $(shell git -C $(SRC_DIR) remote get-url origin 2>/dev/null) + +ifeq ($(PARSER_URL),) + PARSER_URL := $(subst .git,,$(PARSER_REPO_URL)) +ifeq ($(shell echo $(PARSER_URL) | grep '^[a-z][-+.0-9a-z]*://'),) + PARSER_URL := $(subst :,/,$(PARSER_URL)) + PARSER_URL := $(subst git@,https://,$(PARSER_URL)) +endif +endif + +TS ?= tree-sitter + +# ABI versioning +SONAME_MAJOR := $(word 1,$(subst ., ,$(VERSION))) +SONAME_MINOR := $(word 2,$(subst ., ,$(VERSION))) + +# install directory layout +PREFIX ?= /usr/local +INCLUDEDIR ?= $(PREFIX)/include +LIBDIR ?= $(PREFIX)/lib +PCLIBDIR ?= $(LIBDIR)/pkgconfig + +# object files +OBJS := $(patsubst %.c,%.o,$(wildcard $(SRC_DIR)/*.c)) + +# flags +ARFLAGS := rcs +override CFLAGS += -I$(SRC_DIR) -std=c11 -fPIC + +# OS-specific bits +ifeq ($(OS),Windows_NT) + $(error "Windows is not supported") +else ifeq ($(shell uname),Darwin) + SOEXT = dylib + SOEXTVER_MAJOR = $(SONAME_MAJOR).dylib + SOEXTVER = $(SONAME_MAJOR).$(SONAME_MINOR).dylib + LINKSHARED := $(LINKSHARED)-dynamiclib -Wl, + ifneq ($(ADDITIONAL_LIBS),) + LINKSHARED := $(LINKSHARED)$(ADDITIONAL_LIBS), + endif + LINKSHARED := $(LINKSHARED)-install_name,$(LIBDIR)/lib$(LANGUAGE_NAME).$(SONAME_MAJOR).dylib,-rpath,@executable_path/../Frameworks +else + SOEXT = so + SOEXTVER_MAJOR = so.$(SONAME_MAJOR) + SOEXTVER = so.$(SONAME_MAJOR).$(SONAME_MINOR) + LINKSHARED := $(LINKSHARED)-shared -Wl, + ifneq ($(ADDITIONAL_LIBS),) + LINKSHARED := $(LINKSHARED)$(ADDITIONAL_LIBS) + endif + LINKSHARED := $(LINKSHARED)-soname,lib$(LANGUAGE_NAME).so.$(SONAME_MAJOR) +endif +ifneq ($(filter $(shell uname),FreeBSD NetBSD DragonFly),) + PCLIBDIR := $(PREFIX)/libdata/pkgconfig +endif + +all: lib$(LANGUAGE_NAME).a lib$(LANGUAGE_NAME).$(SOEXT) $(LANGUAGE_NAME).pc + +lib$(LANGUAGE_NAME).a: $(OBJS) + $(AR) $(ARFLAGS) $@ $^ + +lib$(LANGUAGE_NAME).$(SOEXT): $(OBJS) + $(CC) $(LDFLAGS) $(LINKSHARED) $^ $(LDLIBS) -o $@ +ifneq ($(STRIP),) + $(STRIP) $@ +endif + +$(LANGUAGE_NAME).pc: bindings/c/$(LANGUAGE_NAME).pc.in + sed -e 's|@URL@|$(PARSER_URL)|' \ + -e 's|@VERSION@|$(VERSION)|' \ + -e 's|@LIBDIR@|$(LIBDIR)|' \ + -e 's|@INCLUDEDIR@|$(INCLUDEDIR)|' \ + -e 's|@REQUIRES@|$(REQUIRES)|' \ + -e 's|@ADDITIONAL_LIBS@|$(ADDITIONAL_LIBS)|' \ + -e 's|=$(PREFIX)|=$${prefix}|' \ + -e 's|@PREFIX@|$(PREFIX)|' $< > $@ + +$(SRC_DIR)/parser.c: grammar.js + $(TS) generate --no-bindings + +install: all + install -Dm644 bindings/c/$(LANGUAGE_NAME).h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h + install -Dm644 $(LANGUAGE_NAME).pc '$(DESTDIR)$(PCLIBDIR)'/$(LANGUAGE_NAME).pc + install -Dm755 lib$(LANGUAGE_NAME).a '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).a + install -m755 lib$(LANGUAGE_NAME).$(SOEXT) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER) + ln -sf lib$(LANGUAGE_NAME).$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) + ln -sf lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXT) + +uninstall: + $(RM) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).a \ + '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER) \ + '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) \ + '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXT) \ + '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h \ + '$(DESTDIR)$(PCLIBDIR)'/$(LANGUAGE_NAME).pc + +clean: + $(RM) $(OBJS) $(LANGUAGE_NAME).pc lib$(LANGUAGE_NAME).a lib$(LANGUAGE_NAME).$(SOEXT) + +test: + $(TS) test + +.PHONY: all install uninstall clean test diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/package.json b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/package.json index 18598797c8..fe67099b50 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/package.json +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/package.json @@ -1,19 +1,53 @@ { "name": "tree-sitter-PARSER_NAME", "version": "0.0.1", - "description": "PARSER_NAME grammar for tree-sitter", + "description": "CAMEL_PARSER_NAME grammar for tree-sitter", + "repository": "github:tree-sitter/tree-sitter-PARSER_NAME", + "license": "MIT", "main": "bindings/node", + "types": "bindings/node", "keywords": [ + "incremental", "parsing", - "incremental" + "tree-sitter", + "LOWER_PARSER_NAME" + ], + "files": [ + "grammar.js", + "binding.gyp", + "prebuilds/**", + "bindings/node/*", + "queries/*", + "src/**" ], "dependencies": { - "nan": "^2.12.1" + "node-addon-api": "^7.1.0", + "node-gyp-build": "^4.8.0" }, "devDependencies": { + "prebuildify": "^6.0.0", "tree-sitter-cli": "^CLI_VERSION" }, + "peerDependencies": { + "tree-sitter": "^0.21.0" + }, + "peerDependenciesMeta": { + "tree-sitter": { + "optional": true + } + }, "scripts": { - "test": "tree-sitter test" - } + "install": "node-gyp-build", + "prebuildify": "prebuildify --napi --strip", + "build": "tree-sitter generate --no-bindings", + "build-wasm": "tree-sitter build-wasm", + "test": "tree-sitter test", + "parse": "tree-sitter parse" + }, + "tree-sitter": [ + { + "scope": "source.LOWER_PARSER_NAME", + "injection-regex": "^LOWER_PARSER_NAME$" + } + ] } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/py-binding.c b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/py-binding.c new file mode 100644 index 0000000000..e2fed9b301 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/py-binding.c @@ -0,0 +1,27 @@ +#include + +typedef struct TSLanguage TSLanguage; + +TSLanguage *tree_sitter_LOWER_PARSER_NAME(void); + +static PyObject* _binding_language(PyObject *self, PyObject *args) { + return PyLong_FromVoidPtr(tree_sitter_LOWER_PARSER_NAME()); +} + +static PyMethodDef methods[] = { + {"language", _binding_language, METH_NOARGS, + "Get the tree-sitter language for this grammar."}, + {NULL, NULL, 0, NULL} +}; + +static struct PyModuleDef module = { + .m_base = PyModuleDef_HEAD_INIT, + .m_name = "_binding", + .m_doc = NULL, + .m_size = -1, + .m_methods = methods +}; + +PyMODINIT_FUNC PyInit__binding(void) { + return PyModule_Create(&module); +} diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/pyproject.toml b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/pyproject.toml new file mode 100644 index 0000000000..272dbb1b69 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/pyproject.toml @@ -0,0 +1,29 @@ +[build-system] +requires = ["setuptools>=42", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "tree-sitter-PARSER_NAME" +description = "CAMEL_PARSER_NAME grammar for tree-sitter" +version = "0.0.1" +keywords = ["incremental", "parsing", "tree-sitter", "PARSER_NAME"] +classifiers = [ + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Topic :: Software Development :: Compilers", + "Topic :: Text Processing :: Linguistic", + "Typing :: Typed" +] +requires-python = ">=3.8" +license.text = "MIT" +readme = "README.md" + +[project.urls] +Homepage = "https://github.com/tree-sitter/tree-sitter-PARSER_NAME" + +[project.optional-dependencies] +core = ["tree-sitter~=0.21"] + +[tool.cibuildwheel] +build = "cp38-*" +build-frontend = "build" diff --git a/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/setup.py b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/setup.py new file mode 100644 index 0000000000..e06337b63e --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/generate/templates/setup.py @@ -0,0 +1,57 @@ +from os.path import isdir, join +from platform import system + +from setuptools import Extension, find_packages, setup +from setuptools.command.build import build +from wheel.bdist_wheel import bdist_wheel + + +class Build(build): + def run(self): + if isdir("queries"): + dest = join(self.build_lib, "tree_sitter_PARSER_NAME", "queries") + self.copy_tree("queries", dest) + super().run() + + +class BdistWheel(bdist_wheel): + def get_tag(self): + python, abi, platform = super().get_tag() + if python.startswith("cp"): + python, abi = "cp38", "abi3" + return python, abi, platform + + +setup( + packages=find_packages("bindings/python"), + package_dir={"": "bindings/python"}, + package_data={ + "tree_sitter_LOWER_PARSER_NAME": ["*.pyi", "py.typed"], + "tree_sitter_LOWER_PARSER_NAME.queries": ["*.scm"], + }, + ext_package="tree_sitter_LOWER_PARSER_NAME", + ext_modules=[ + Extension( + name="_binding", + sources=[ + "bindings/python/tree_sitter_LOWER_PARSER_NAME/binding.c", + "src/parser.c", + # NOTE: if your language uses an external scanner, add it here. + ], + extra_compile_args=( + ["-std=c11"] if system() != 'Windows' else [] + ), + define_macros=[ + ("Py_LIMITED_API", "0x03080000"), + ("PY_SSIZE_T_CLEAN", None) + ], + include_dirs=["src"], + py_limited_api=True, + ) + ], + cmdclass={ + "build": Build, + "bdist_wheel": BdistWheel + }, + zip_safe=False +) diff --git a/third-party/tree-sitter/tree-sitter/cli/src/highlight.rs b/third-party/tree-sitter/tree-sitter/cli/src/highlight.rs index 6cf1580e9f..e48ca4e8c3 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/highlight.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/highlight.rs @@ -1,4 +1,3 @@ -use super::util; use ansi_term::Color; use anyhow::Result; use lazy_static::lazy_static; @@ -13,7 +12,7 @@ use std::{fs, io, path, str, usize}; use tree_sitter_highlight::{HighlightConfiguration, HighlightEvent, Highlighter, HtmlRenderer}; use tree_sitter_loader::Loader; -pub const HTML_HEADER: &'static str = " +pub const HTML_HEADER: &str = " Tree-sitter Highlighting @@ -35,7 +34,7 @@ pub const HTML_HEADER: &'static str = " "; -pub const HTML_FOOTER: &'static str = " +pub const HTML_FOOTER: &str = " "; @@ -68,13 +67,14 @@ impl Theme { Ok(serde_json::from_str(&json).unwrap_or_default()) } + #[must_use] pub fn default_style(&self) -> Style { Style::default() } } impl<'de> Deserialize<'de> for Theme { - fn deserialize(deserializer: D) -> std::result::Result + fn deserialize(deserializer: D) -> std::result::Result where D: Deserializer<'de>, { @@ -144,9 +144,7 @@ impl Serialize for Theme { impl Default for Theme { fn default() -> Self { - serde_json::from_str( - r#" - { + serde_json::from_value(json!({ "attribute": {"color": 124, "italic": true}, "comment": {"color": 245, "italic": true}, "constant.builtin": {"color": 94, "bold": true}, @@ -169,9 +167,7 @@ impl Default for Theme { "type.builtin": {"color": 23, "bold": true}, "variable.builtin": {"bold": true}, "variable.parameter": {"underline": true} - } - "#, - ) + })) .unwrap() } } @@ -182,17 +178,17 @@ fn parse_style(style: &mut Style, json: Value) { match property_name.as_str() { "bold" => { if value == Value::Bool(true) { - style.ansi = style.ansi.bold() + style.ansi = style.ansi.bold(); } } "italic" => { if value == Value::Bool(true) { - style.ansi = style.ansi.italic() + style.ansi = style.ansi.italic(); } } "underline" => { if value == Value::Bool(true) { - style.ansi = style.ansi.underline() + style.ansi = style.ansi.underline(); } } "color" => { @@ -220,10 +216,7 @@ fn parse_style(style: &mut Style, json: Value) { fn parse_color(json: Value) -> Option { match json { - Value::Number(n) => match n.as_u64() { - Some(n) => Some(Color::Fixed(n as u8)), - _ => None, - }, + Value::Number(n) => n.as_u64().map(|n| Color::Fixed(n as u8)), Value::String(s) => match s.to_lowercase().as_str() { "black" => Some(Color::Black), "blue" => Some(Color::Blue), @@ -234,7 +227,7 @@ fn parse_color(json: Value) -> Option { "white" => Some(Color::White), "yellow" => Some(Color::Yellow), s => { - if let Some((red, green, blue)) = hex_string_to_rgb(&s) { + if let Some((red, green, blue)) = hex_string_to_rgb(s) { Some(Color::RGB(red, green, blue)) } else { None @@ -246,7 +239,7 @@ fn parse_color(json: Value) -> Option { } fn hex_string_to_rgb(s: &str) -> Option<(u8, u8, u8)> { - if s.starts_with("#") && s.len() >= 7 { + if s.starts_with('#') && s.len() >= 7 { if let (Ok(red), Ok(green), Ok(blue)) = ( u8::from_str_radix(&s[1..3], 16), u8::from_str_radix(&s[3..5], 16), @@ -281,7 +274,7 @@ fn style_to_css(style: ansi_term::Style) -> String { fn write_color(buffer: &mut String, color: Color) { if let Color::RGB(r, g, b) = &color { - write!(buffer, "color: #{:x?}{:x?}{:x?}", r, g, b).unwrap() + write!(buffer, "color: #{r:02x}{g:02x}{b:02x}").unwrap(); } else { write!( buffer, @@ -299,18 +292,14 @@ fn write_color(buffer: &mut String, color: Color) { Color::RGB(_, _, _) => unreachable!(), } ) - .unwrap() + .unwrap(); } } fn terminal_supports_truecolor() -> bool { - use std::env; - - if let Ok(truecolor) = env::var("COLORTERM") { + std::env::var("COLORTERM").map_or(false, |truecolor| { truecolor == "truecolor" || truecolor == "24bit" - } else { - false - } + }) } fn closest_xterm_color(red: u8, green: u8, blue: u8) -> Color { @@ -324,9 +313,9 @@ fn closest_xterm_color(red: u8, green: u8, blue: u8) -> Color { // Get the xterm color with the minimum Euclidean distance to the target color // i.e. distance = √ (r2 - r1)² + (g2 - g1)² + (b2 - b1)² let distances = colors.map(|(color_id, (r, g, b))| { - let r_delta: u32 = (max(r, red) - min(r, red)).into(); - let g_delta: u32 = (max(g, green) - min(g, green)).into(); - let b_delta: u32 = (max(b, blue) - min(b, blue)).into(); + let r_delta = (max(r, red) - min(r, red)) as u32; + let g_delta = (max(g, green) - min(g, green)) as u32; + let b_delta = (max(b, blue) - min(b, blue)) as u32; let distance = r_delta.pow(2) + g_delta.pow(2) + b_delta.pow(2); // don't need to actually take the square root for the sake of comparison (color_id, distance) @@ -385,40 +374,38 @@ pub fn html( config: &HighlightConfiguration, quiet: bool, print_time: bool, + cancellation_flag: Option<&AtomicUsize>, ) -> Result<()> { use std::io::Write; let stdout = io::stdout(); let mut stdout = stdout.lock(); let time = Instant::now(); - let cancellation_flag = util::cancel_on_stdin(); let mut highlighter = Highlighter::new(); - let events = highlighter.highlight(config, source, Some(&cancellation_flag), |string| { + let events = highlighter.highlight(config, source, cancellation_flag, |string| { loader.highlight_config_for_injection_string(string) })?; let mut renderer = HtmlRenderer::new(); renderer.render(events, source, &move |highlight| { - if let Some(css_style) = &theme.styles[highlight.0].css { - css_style.as_bytes() - } else { - "".as_bytes() - } + theme.styles[highlight.0] + .css + .as_ref() + .map_or_else(|| "".as_bytes(), |css_style| css_style.as_bytes()) })?; if !quiet { - write!(&mut stdout, "\n")?; + writeln!(&mut stdout, "
")?; for (i, line) in renderer.lines().enumerate() { - write!( + writeln!( &mut stdout, - "\n", + "", i + 1, - line )?; } - write!(&mut stdout, "
{}{}
{}{line}
\n")?; + writeln!(&mut stdout, "")?; } if print_time { @@ -433,8 +420,8 @@ mod tests { use super::*; use std::env; - const JUNGLE_GREEN: &'static str = "#26A69A"; - const DARK_CYAN: &'static str = "#00AF87"; + const JUNGLE_GREEN: &str = "#26A69A"; + const DARK_CYAN: &str = "#00AF87"; #[test] fn test_parse_style() { @@ -448,7 +435,7 @@ mod tests { env::set_var("COLORTERM", ""); parse_style(&mut style, Value::String(DARK_CYAN.to_string())); assert_eq!(style.ansi.foreground, Some(Color::Fixed(36))); - assert_eq!(style.css, Some("style=\'color: #0af87\'".to_string())); + assert_eq!(style.css, Some("style=\'color: #00af87\'".to_string())); // junglegreen is not an ANSI color and is preserved when the terminal supports it env::set_var("COLORTERM", "truecolor"); diff --git a/third-party/tree-sitter/tree-sitter/cli/src/lib.rs b/third-party/tree-sitter/tree-sitter/cli/src/lib.rs index d36417c26c..549db7739d 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/lib.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/lib.rs @@ -1,3 +1,5 @@ +#![doc = include_str!("../README.md")] + pub mod generate; pub mod highlight; pub mod logger; @@ -14,3 +16,7 @@ pub mod wasm; #[cfg(test)] mod tests; + +// To run compile fail tests +#[cfg(doctest)] +mod tests; diff --git a/third-party/tree-sitter/tree-sitter/cli/src/main.rs b/third-party/tree-sitter/tree-sitter/cli/src/main.rs index fb2a63270a..c46d38d7a3 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/main.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/main.rs @@ -1,21 +1,339 @@ +use anstyle::{AnsiColor, Color, Style}; use anyhow::{anyhow, Context, Result}; -use clap::{App, AppSettings, Arg, SubCommand}; +use clap::{crate_authors, Args, Command, FromArgMatches as _, Subcommand}; use glob::glob; +use regex::Regex; +use std::collections::HashSet; use std::path::{Path, PathBuf}; use std::{env, fs, u64}; -use tree_sitter::Point; -use tree_sitter_cli::parse::ParseOutput; +use tree_sitter::{ffi, Parser, Point}; +use tree_sitter_cli::test::TestOptions; use tree_sitter_cli::{ - generate, highlight, logger, parse, playground, query, tags, test, test_highlight, test_tags, - util, wasm, + generate, highlight, logger, + parse::{self, ParseFileOptions, ParseOutput}, + playground, query, tags, test, test_highlight, test_tags, util, wasm, }; use tree_sitter_config::Config; +use tree_sitter_highlight::Highlighter; use tree_sitter_loader as loader; +use tree_sitter_tags::TagsContext; -const BUILD_VERSION: &'static str = env!("CARGO_PKG_VERSION"); +const BUILD_VERSION: &str = env!("CARGO_PKG_VERSION"); const BUILD_SHA: Option<&'static str> = option_env!("BUILD_SHA"); const DEFAULT_GENERATE_ABI_VERSION: usize = 14; +#[derive(Subcommand)] +#[command(about="Generates and tests parsers", author=crate_authors!("\n"), styles=get_styles())] +enum Commands { + InitConfig(InitConfig), + Generate(Generate), + Parse(Parse), + Test(Test), + Query(Query), + Highlight(Highlight), + Tags(Tags), + BuildWasm(BuildWasm), + Playground(Playground), + DumpLanguages(DumpLanguages), +} + +#[derive(Args)] +#[command(about = "Generate a default config file")] +struct InitConfig; + +#[derive(Args)] +#[command(about = "Generate a parser", alias = "gen", alias = "g")] +struct Generate { + #[arg(index = 1, help = "The path to the grammar file")] + pub grammar_path: Option, + #[arg(long, short, help = "Show debug log during generation")] + pub log: bool, + #[arg( + long = "abi", + value_name = "VERSION", + help = format!(concat!( + "Select the language ABI version to generate (default {}).\n", + "Use --abi=latest to generate the newest supported version ({}).", + ), + DEFAULT_GENERATE_ABI_VERSION, + tree_sitter::LANGUAGE_VERSION, + ) + )] + pub abi_version: Option, + #[arg(long, help = "Don't generate language bindings")] + pub no_bindings: bool, + #[arg( + long, + short = 'b', + help = "Compile all defined languages in the current dir" + )] + pub build: bool, + #[arg(long, short = '0', help = "Compile a parser in debug mode")] + pub debug_build: bool, + #[arg( + long, + value_name = "PATH", + help = "The path to the directory containing the parser library" + )] + pub libdir: Option, + #[arg( + long, + help = "Produce a report of the states for the given rule, use `-` to report every rule" + )] + pub report_states_for_rule: Option, + + #[arg( + long, + value_name = "EXECUTABLE", + env = "TREE_SITTER_JS_RUNTIME", + help = "The path to the JavaScript runtime to use for generating parsers" + )] + pub js_runtime: Option, +} + +#[derive(Args)] +#[command(about = "Parse files", alias = "p")] +struct Parse { + #[arg( + long = "paths", + help = "The path to a file with paths to source file(s)" + )] + pub paths_file: Option, + #[arg(num_args=1.., help = "The source file(s) to use")] + pub paths: Option>, + #[arg( + long, + help = "Select a language by the scope instead of a file extension" + )] + pub scope: Option, + #[arg(long, short = 'd', help = "Show parsing debug log")] + pub debug: bool, + #[arg(long, short = '0', help = "Compile a parser in debug mode")] + pub debug_build: bool, + #[arg( + long, + short = 'D', + help = "Produce the log.html file with debug graphs" + )] + pub debug_graph: bool, + #[arg( + long, + help = "Compile parsers to wasm instead of native dynamic libraries" + )] + pub wasm: bool, + #[arg(long = "dot", help = "Output the parse data with graphviz dot")] + pub output_dot: bool, + #[arg( + long = "xml", + short = 'x', + help = "Output the parse data in XML format" + )] + pub output_xml: bool, + #[arg(long, short, help = "Show parsing statistic")] + pub stat: bool, + #[arg(long, help = "Interrupt the parsing process by timeout (µs)")] + pub timeout: Option, + #[arg(long, short, help = "Measure execution time")] + pub time: bool, + #[arg(long, short, help = "Suppress main output")] + pub quiet: bool, + #[arg( + long, + num_args = 1.., + help = "Apply edits in the format: \"row, col delcount insert_text\"" + )] + pub edits: Option>, + #[arg(long, help = "The encoding of the input files")] + pub encoding: Option, + #[arg( + long, + help = "Open `log.html` in the default browser, if `--debug-graph` is supplied" + )] + pub open_log: bool, + #[arg(long, help = "The path to an alternative config.json file")] + pub config_path: Option, +} + +#[derive(Args)] +#[command(about = "Run a parser's tests", alias = "t")] +struct Test { + #[arg( + long, + short, + help = "Only run corpus test cases whose name includes the given string" + )] + pub filter: Option, + #[arg( + long, + short, + help = "Only run corpus test cases whose name matches the given regex" + )] + pub include: Option, + #[arg( + long, + short, + help = "Only run corpus test cases whose name does not match the given regex" + )] + pub exclude: Option, + #[arg( + long, + short, + help = "Update all syntax trees in corpus files with current parser output" + )] + pub update: bool, + #[arg(long, short = 'd', help = "Show parsing debug log")] + pub debug: bool, + #[arg(long, short = '0', help = "Compile a parser in debug mode")] + pub debug_build: bool, + #[arg( + long, + short = 'D', + help = "Produce the log.html file with debug graphs" + )] + pub debug_graph: bool, + #[arg( + long, + help = "Compile parsers to wasm instead of native dynamic libraries" + )] + pub wasm: bool, + #[arg( + long, + help = "Open `log.html` in the default browser, if `--debug-graph` is supplied" + )] + pub open_log: bool, + #[arg(long, help = "The path to an alternative config.json file")] + pub config_path: Option, +} + +#[derive(Args)] +#[command(about = "Search files using a syntax tree query", alias = "q")] +struct Query { + #[arg(help = "Path to a file with queries", index = 1, required = true)] + query_path: String, + #[arg(long, short, help = "Measure execution time")] + pub time: bool, + #[arg(long, short, help = "Suppress main output")] + pub quiet: bool, + #[arg( + long = "paths", + help = "The path to a file with paths to source file(s)" + )] + pub paths_file: Option, + #[arg(index = 2, num_args=1.., help = "The source file(s) to use")] + pub paths: Option>, + #[arg( + long, + help = "The range of byte offsets in which the query will be executed" + )] + pub byte_range: Option, + #[arg(long, help = "The range of rows in which the query will be executed")] + pub row_range: Option, + #[arg( + long, + help = "Select a language by the scope instead of a file extension" + )] + pub scope: Option, + #[arg(long, short, help = "Order by captures instead of matches")] + pub captures: bool, + #[arg(long, help = "Whether to run query tests or not")] + pub test: bool, + #[arg(long, help = "The path to an alternative config.json file")] + pub config_path: Option, +} + +#[derive(Args)] +#[command(about = "Highlight a file", alias = "hi")] +struct Highlight { + #[arg(long, short = 'H', help = "Generate highlighting as an HTML document")] + pub html: bool, + #[arg( + long, + help = "Check that highlighting captures conform strictly to standards" + )] + pub check: bool, + #[arg(long, help = "The path to a file with captures")] + pub captures_path: Option, + #[arg(long, num_args = 1.., help = "The paths to files with queries")] + pub query_paths: Option>, + #[arg( + long, + help = "Select a language by the scope instead of a file extension" + )] + pub scope: Option, + #[arg(long, short, help = "Measure execution time")] + pub time: bool, + #[arg(long, short, help = "Suppress main output")] + pub quiet: bool, + #[arg( + long = "paths", + help = "The path to a file with paths to source file(s)" + )] + pub paths_file: Option, + #[arg(num_args = 1.., help = "The source file(s) to use")] + pub paths: Option>, + #[arg(long, help = "The path to an alternative config.json file")] + pub config_path: Option, +} + +#[derive(Args)] +#[command(about = "Generate a list of tags")] +struct Tags { + #[arg( + long, + help = "Select a language by the scope instead of a file extension" + )] + pub scope: Option, + #[arg(long, short, help = "Measure execution time")] + pub time: bool, + #[arg(long, short, help = "Suppress main output")] + pub quiet: bool, + #[arg( + long = "paths", + help = "The path to a file with paths to source file(s)" + )] + pub paths_file: Option, + #[arg(num_args = 1.., help = "The source file(s) to use")] + pub paths: Option>, + #[arg(long, help = "The path to an alternative config.json file")] + pub config_path: Option, +} + +#[derive(Args)] +#[command(about = "Compile a parser to WASM", alias = "bw")] +struct BuildWasm { + #[arg( + long, + help = "Run emscripten via docker even if it is installed locally" + )] + pub docker: bool, + #[arg(index = 1, num_args = 1.., help = "The path to output the wasm file")] + pub path: Option, +} + +#[derive(Args)] +#[command( + about = "Start local playground for a parser in the browser", + alias = "play", + alias = "pg", + alias = "web-ui" +)] +struct Playground { + #[arg(long, short, help = "Don't open in default browser")] + pub quiet: bool, + #[arg( + long, + help = "Path to the directory containing the grammar and wasm files" + )] + pub grammar_path: Option, +} + +#[derive(Args)] +#[command(about = "Print info about all known language parsers", alias = "langs")] +struct DumpLanguages { + #[arg(long, help = "The path to an alternative config.json file")] + pub config_path: Option, +} + fn main() { let result = run(); if let Err(err) = &result { @@ -26,255 +344,43 @@ fn main() { } } if !err.to_string().is_empty() { - eprintln!("{:?}", err); + eprintln!("{err:?}"); } std::process::exit(1); } } fn run() -> Result<()> { - let version = if let Some(build_sha) = BUILD_SHA { - format!("{} ({})", BUILD_VERSION, build_sha) - } else { - BUILD_VERSION.to_string() - }; - - let debug_arg = Arg::with_name("debug") - .help("Show parsing debug log") - .long("debug") - .short("d"); - - let debug_graph_arg = Arg::with_name("debug-graph") - .help("Produce the log.html file with debug graphs") - .long("debug-graph") - .short("D"); - - let debug_build_arg = Arg::with_name("debug-build") - .help("Compile a parser in debug mode") - .long("debug-build") - .short("0"); - - let paths_file_arg = Arg::with_name("paths-file") - .help("The path to a file with paths to source file(s)") - .long("paths") - .takes_value(true); - - let paths_arg = Arg::with_name("paths") - .help("The source file(s) to use") - .multiple(true); - - let scope_arg = Arg::with_name("scope") - .help("Select a language by the scope instead of a file extension") - .long("scope") - .takes_value(true); - - let time_arg = Arg::with_name("time") - .help("Measure execution time") - .long("time") - .short("t"); - - let quiet_arg = Arg::with_name("quiet") - .help("Suppress main output") - .long("quiet") - .short("q"); - - let matches = App::new("tree-sitter") - .author("Max Brunsfeld ") - .about("Generates and tests parsers") - .version(version.as_str()) - .setting(AppSettings::SubcommandRequiredElseHelp) - .global_setting(AppSettings::ColoredHelp) - .global_setting(AppSettings::DeriveDisplayOrder) - .global_setting(AppSettings::DisableHelpSubcommand) - .subcommand(SubCommand::with_name("init-config").about("Generate a default config file")) - .subcommand( - SubCommand::with_name("generate") - .alias("gen") - .alias("g") - .about("Generate a parser") - .arg(Arg::with_name("grammar-path").index(1)) - .arg(Arg::with_name("log").long("log")) - .arg( - Arg::with_name("abi-version") - .long("abi") - .value_name("version") - .help(&format!( - concat!( - "Select the language ABI version to generate (default {}).\n", - "Use --abi=latest to generate the newest supported version ({}).", - ), - DEFAULT_GENERATE_ABI_VERSION, - tree_sitter::LANGUAGE_VERSION, - )), - ) - .arg(Arg::with_name("no-bindings").long("no-bindings")) - .arg( - Arg::with_name("build") - .long("build") - .short("b") - .help("Compile all defined languages in the current dir"), - ) - .arg(&debug_build_arg) - .arg( - Arg::with_name("libdir") - .long("libdir") - .takes_value(true) - .value_name("path"), - ) - .arg( - Arg::with_name("report-states-for-rule") - .long("report-states-for-rule") - .value_name("rule-name") - .takes_value(true), - ), - ) - .subcommand( - SubCommand::with_name("parse") - .alias("p") - .about("Parse files") - .arg(&paths_file_arg) - .arg(&paths_arg) - .arg(&scope_arg) - .arg(&debug_arg) - .arg(&debug_build_arg) - .arg(&debug_graph_arg) - .arg(Arg::with_name("output-dot").long("dot")) - .arg(Arg::with_name("output-xml").long("xml").short("x")) - .arg( - Arg::with_name("stat") - .help("Show parsing statistic") - .long("stat") - .short("s"), - ) - .arg( - Arg::with_name("timeout") - .help("Interrupt the parsing process by timeout (µs)") - .long("timeout") - .takes_value(true), - ) - .arg(&time_arg) - .arg(&quiet_arg) - .arg( - Arg::with_name("edits") - .help("Apply edits in the format: \"row,col del_count insert_text\"") - .long("edit") - .short("edit") - .takes_value(true) - .multiple(true) - .number_of_values(1), - ), - ) - .subcommand( - SubCommand::with_name("query") - .alias("q") - .about("Search files using a syntax tree query") - .arg( - Arg::with_name("query-path") - .help("Path to a file with queries") - .index(1) - .required(true), - ) - .arg(&time_arg) - .arg(&quiet_arg) - .arg(&paths_file_arg) - .arg(&paths_arg.clone().index(2)) - .arg( - Arg::with_name("byte-range") - .help("The range of byte offsets in which the query will be executed") - .long("byte-range") - .takes_value(true), - ) - .arg( - Arg::with_name("row-range") - .help("The range of rows in which the query will be executed") - .long("row-range") - .takes_value(true), - ) - .arg(&scope_arg) - .arg(Arg::with_name("captures").long("captures").short("c")) - .arg(Arg::with_name("test").long("test")), - ) - .subcommand( - SubCommand::with_name("tags") - .about("Generate a list of tags") - .arg(&scope_arg) - .arg(&time_arg) - .arg(&quiet_arg) - .arg(&paths_file_arg) - .arg(&paths_arg), - ) - .subcommand( - SubCommand::with_name("test") - .alias("t") - .about("Run a parser's tests") - .arg( - Arg::with_name("filter") - .long("filter") - .short("f") - .takes_value(true) - .help("Only run corpus test cases whose name includes the given string"), - ) - .arg( - Arg::with_name("update") - .long("update") - .short("u") - .help("Update all syntax trees in corpus files with current parser output"), - ) - .arg(&debug_arg) - .arg(&debug_build_arg) - .arg(&debug_graph_arg), - ) - .subcommand( - SubCommand::with_name("highlight") - .about("Highlight a file") - .arg( - Arg::with_name("html") - .help("Generate highlighting as an HTML document") - .long("html") - .short("H"), - ) - .arg(&scope_arg) - .arg(&time_arg) - .arg(&quiet_arg) - .arg(&paths_file_arg) - .arg(&paths_arg), - ) - .subcommand( - SubCommand::with_name("build-wasm") - .alias("bw") - .about("Compile a parser to WASM") - .arg( - Arg::with_name("docker") - .long("docker") - .help("Run emscripten via docker even if it is installed locally"), - ) - .arg(Arg::with_name("path").index(1).multiple(true)), - ) - .subcommand( - SubCommand::with_name("playground") - .alias("play") - .alias("pg") - .alias("web-ui") - .about("Start local playground for a parser in the browser") - .arg( - Arg::with_name("quiet") - .long("quiet") - .short("q") - .help("Don't open in default browser"), - ), + let version = BUILD_SHA.map_or_else( + || BUILD_VERSION.to_string(), + |build_sha| format!("{BUILD_VERSION} ({build_sha})"), + ); + let version: &'static str = Box::leak(version.into_boxed_str()); + + let cli = Command::new("tree-sitter") + .help_template( + "\ +{before-help}{name} {version} +{author-with-newline}{about-with-newline} +{usage-heading} {usage} + +{all-args}{after-help} +", ) - .subcommand( - SubCommand::with_name("dump-languages") - .about("Print info about all known language parsers"), - ) - .get_matches(); + .version(version) + .subcommand_required(true) + .arg_required_else_help(true) + .disable_help_subcommand(true) + .disable_colored_help(false); + let cli = Commands::augment_subcommands(cli); + + let command = Commands::from_arg_matches(&cli.get_matches())?; let current_dir = env::current_dir().unwrap(); - let config = Config::load()?; let mut loader = loader::Loader::new()?; - match matches.subcommand() { - ("init-config", Some(_)) => { + match command { + Commands::InitConfig(_) => { if let Ok(Some(config_path)) = Config::find_config_file() { return Err(anyhow!( "Remove your existing config file first: {}", @@ -291,171 +397,137 @@ fn run() -> Result<()> { ); } - ("generate", Some(matches)) => { - let grammar_path = matches.value_of("grammar-path"); - let debug_build = matches.is_present("debug-build"); - let build = matches.is_present("build"); - let libdir = matches.value_of("libdir"); - let report_symbol_name = matches.value_of("report-states-for-rule").or_else(|| { - if matches.is_present("report-states") { - Some("") - } else { - None - } - }); - if matches.is_present("log") { + Commands::Generate(generate_options) => { + if generate_options.log { logger::init(); } - let abi_version = - matches - .value_of("abi-version") - .map_or(DEFAULT_GENERATE_ABI_VERSION, |version| { - if version == "latest" { - tree_sitter::LANGUAGE_VERSION - } else { - version.parse().expect("invalid abi version flag") - } - }); - let generate_bindings = !matches.is_present("no-bindings"); + let abi_version = generate_options.abi_version.as_ref().map_or( + DEFAULT_GENERATE_ABI_VERSION, + |version| { + if version == "latest" { + tree_sitter::LANGUAGE_VERSION + } else { + version.parse().expect("invalid abi version flag") + } + }, + ); generate::generate_parser_in_directory( ¤t_dir, - grammar_path, + generate_options.grammar_path.as_deref(), abi_version, - generate_bindings, - report_symbol_name, + !generate_options.no_bindings, + generate_options.report_states_for_rule.as_deref(), + generate_options.js_runtime.as_deref(), )?; - if build { - if let Some(path) = libdir { + if generate_options.build { + if let Some(path) = generate_options.libdir { loader = loader::Loader::with_parser_lib_path(PathBuf::from(path)); } - loader.use_debug_build(debug_build); + loader.use_debug_build(generate_options.debug_build); loader.languages_at_path(¤t_dir)?; } } - ("test", Some(matches)) => { - let debug = matches.is_present("debug"); - let debug_graph = matches.is_present("debug-graph"); - let debug_build = matches.is_present("debug-build"); - let update = matches.is_present("update"); - let filter = matches.value_of("filter"); - - if debug { - // For augmenting debug logging in external scanners - env::set_var("TREE_SITTER_DEBUG", "1"); - } - - loader.use_debug_build(debug_build); - - let languages = loader.languages_at_path(¤t_dir)?; - let language = languages - .first() - .ok_or_else(|| anyhow!("No language found"))?; - let test_dir = current_dir.join("test"); - - // Run the corpus tests. Look for them at two paths: `test/corpus` and `corpus`. - let mut test_corpus_dir = test_dir.join("corpus"); - if !test_corpus_dir.is_dir() { - test_corpus_dir = current_dir.join("corpus"); - } - if test_corpus_dir.is_dir() { - test::run_tests_at_path( - *language, - &test_corpus_dir, - debug, - debug_graph, - filter, - update, - )?; - } - - // Check that all of the queries are valid. - test::check_queries_at_path(*language, ¤t_dir.join("queries"))?; - - // Run the syntax highlighting tests. - let test_highlight_dir = test_dir.join("highlight"); - if test_highlight_dir.is_dir() { - test_highlight::test_highlights(&loader, &test_highlight_dir)?; - } - - let test_tag_dir = test_dir.join("tags"); - if test_tag_dir.is_dir() { - test_tags::test_tags(&loader, &test_tag_dir)?; - } - } - - ("parse", Some(matches)) => { - let debug = matches.is_present("debug"); - let debug_graph = matches.is_present("debug-graph"); - let debug_build = matches.is_present("debug-build"); - - let output = if matches.is_present("output-dot") { + Commands::Parse(parse_options) => { + let config = Config::load(parse_options.config_path)?; + let output = if parse_options.output_dot { ParseOutput::Dot - } else if matches.is_present("output-xml") { + } else if parse_options.output_xml { ParseOutput::Xml - } else if matches.is_present("quiet") { + } else if parse_options.quiet { ParseOutput::Quiet } else { ParseOutput::Normal }; - let time = matches.is_present("time"); - let edits = matches - .values_of("edits") - .map_or(Vec::new(), |e| e.collect()); - let cancellation_flag = util::cancel_on_stdin(); + let encoding = if let Some(encoding) = parse_options.encoding { + match encoding.as_str() { + "utf16" => Some(ffi::TSInputEncodingUTF16), + "utf8" => Some(ffi::TSInputEncodingUTF8), + _ => return Err(anyhow!("Invalid encoding. Expected one of: utf8, utf16")), + } + } else { + None + }; + + let time = parse_options.time; + let edits = parse_options.edits.unwrap_or_default(); + let cancellation_flag = util::cancel_on_signal(); + let mut parser = Parser::new(); - if debug { + if parse_options.debug { // For augmenting debug logging in external scanners env::set_var("TREE_SITTER_DEBUG", "1"); } - loader.use_debug_build(debug_build); + loader.use_debug_build(parse_options.debug_build); - let timeout = matches - .value_of("timeout") - .map_or(0, |t| u64::from_str_radix(t, 10).unwrap()); + #[cfg(feature = "wasm")] + if parse_options.wasm { + let engine = tree_sitter::wasmtime::Engine::default(); + parser + .set_wasm_store(tree_sitter::WasmStore::new(engine.clone()).unwrap()) + .unwrap(); + loader.use_wasm(engine); + } - let paths = collect_paths(matches.value_of("paths-file"), matches.values_of("paths"))?; + let timeout = parse_options.timeout.unwrap_or_default(); + + let paths = collect_paths(parse_options.paths_file.as_deref(), parse_options.paths)?; let max_path_length = paths.iter().map(|p| p.chars().count()).max().unwrap_or(0); let mut has_error = false; let loader_config = config.get()?; loader.find_all_languages(&loader_config)?; - let should_track_stats = matches.is_present("stat"); + let should_track_stats = parse_options.stat; let mut stats = parse::Stats::default(); for path in paths { let path = Path::new(&path); + let language = - loader.select_language(path, ¤t_dir, matches.value_of("scope"))?; + loader.select_language(path, ¤t_dir, parse_options.scope.as_deref())?; + parser + .set_language(&language) + .context("incompatible language")?; - let this_file_errored = parse::parse_file_at_path( - language, + let opts = ParseFileOptions { + language: language.clone(), path, - &edits, + edits: &edits + .iter() + .map(std::string::String::as_str) + .collect::>(), max_path_length, output, - time, + print_time: time, timeout, - debug, - debug_graph, - Some(&cancellation_flag), - )?; + debug: parse_options.debug, + debug_graph: parse_options.debug_graph, + cancellation_flag: Some(&cancellation_flag), + encoding, + open_log: parse_options.open_log, + }; + + let parse_result = parse::parse_file_at_path(&mut parser, &opts)?; if should_track_stats { stats.total_parses += 1; - if !this_file_errored { + if parse_result.successful { stats.successful_parses += 1; } + if let Some(duration) = parse_result.duration { + stats.total_bytes += parse_result.bytes; + stats.total_duration += duration; + } } - has_error |= this_file_errored; + has_error |= !parse_result.successful; } if should_track_stats { - println!("{}", stats) + println!("\n{stats}"); } if has_error { @@ -463,97 +535,195 @@ fn run() -> Result<()> { } } - ("query", Some(matches)) => { - let ordered_captures = matches.values_of("captures").is_some(); - let quiet = matches.values_of("quiet").is_some(); - let time = matches.values_of("time").is_some(); - let paths = collect_paths(matches.value_of("paths-file"), matches.values_of("paths"))?; + Commands::Test(test_options) => { + let config = Config::load(test_options.config_path)?; + if test_options.debug { + // For augmenting debug logging in external scanners + env::set_var("TREE_SITTER_DEBUG", "1"); + } + + loader.use_debug_build(test_options.debug_build); + + let mut parser = Parser::new(); + + #[cfg(feature = "wasm")] + if test_options.wasm { + let engine = tree_sitter::wasmtime::Engine::default(); + parser + .set_wasm_store(tree_sitter::WasmStore::new(engine.clone()).unwrap()) + .unwrap(); + loader.use_wasm(engine); + } + + let languages = loader.languages_at_path(¤t_dir)?; + let language = &languages + .first() + .ok_or_else(|| anyhow!("No language found"))? + .0; + parser.set_language(language)?; + + let test_dir = current_dir.join("test"); + + // Run the corpus tests. Look for them in `test/corpus`. + let test_corpus_dir = test_dir.join("corpus"); + if test_corpus_dir.is_dir() { + let mut opts = TestOptions { + path: test_corpus_dir, + debug: test_options.debug, + debug_graph: test_options.debug_graph, + filter: test_options.filter.as_deref(), + include: test_options.include, + exclude: test_options.exclude, + update: test_options.update, + open_log: test_options.open_log, + languages: languages.iter().map(|(l, n)| (n.as_str(), l)).collect(), + }; + + test::run_tests_at_path(&mut parser, &mut opts)?; + } + + // Check that all of the queries are valid. + test::check_queries_at_path(language, ¤t_dir.join("queries"))?; + + // Run the syntax highlighting tests. + let test_highlight_dir = test_dir.join("highlight"); + if test_highlight_dir.is_dir() { + let mut highlighter = Highlighter::new(); + highlighter.parser = parser; + test_highlight::test_highlights( + &loader, + &config.get()?, + &mut highlighter, + &test_highlight_dir, + )?; + parser = highlighter.parser; + } + + let test_tag_dir = test_dir.join("tags"); + if test_tag_dir.is_dir() { + let mut tags_context = TagsContext::new(); + tags_context.parser = parser; + test_tags::test_tags(&loader, &config.get()?, &mut tags_context, &test_tag_dir)?; + } + } + + Commands::Query(query_options) => { + let config = Config::load(query_options.config_path)?; + let paths = collect_paths(query_options.paths_file.as_deref(), query_options.paths)?; let loader_config = config.get()?; loader.find_all_languages(&loader_config)?; let language = loader.select_language( Path::new(&paths[0]), ¤t_dir, - matches.value_of("scope"), + query_options.scope.as_deref(), )?; - let query_path = Path::new(matches.value_of("query-path").unwrap()); - let byte_range = matches.value_of("byte-range").and_then(|arg| { - let mut parts = arg.split(":"); + let query_path = Path::new(&query_options.query_path); + + let byte_range = query_options.byte_range.as_ref().and_then(|range| { + let mut parts = range.split(':'); let start = parts.next()?.parse().ok()?; let end = parts.next().unwrap().parse().ok()?; Some(start..end) }); - let point_range = matches.value_of("row-range").and_then(|arg| { - let mut parts = arg.split(":"); + let point_range = query_options.row_range.as_ref().and_then(|range| { + let mut parts = range.split(':'); let start = parts.next()?.parse().ok()?; let end = parts.next().unwrap().parse().ok()?; Some(Point::new(start, 0)..Point::new(end, 0)) }); - let should_test = matches.is_present("test"); + query::query_files_at_paths( - language, + &language, paths, query_path, - ordered_captures, + query_options.captures, byte_range, point_range, - should_test, - quiet, - time, - )?; - } - - ("tags", Some(matches)) => { - let loader_config = config.get()?; - loader.find_all_languages(&loader_config)?; - let paths = collect_paths(matches.value_of("paths-file"), matches.values_of("paths"))?; - tags::generate_tags( - &loader, - matches.value_of("scope"), - &paths, - matches.is_present("quiet"), - matches.is_present("time"), + query_options.test, + query_options.quiet, + query_options.time, )?; } - ("highlight", Some(matches)) => { + Commands::Highlight(highlight_options) => { + let config = Config::load(highlight_options.config_path)?; let theme_config: tree_sitter_cli::highlight::ThemeConfig = config.get()?; loader.configure_highlights(&theme_config.theme.highlight_names); let loader_config = config.get()?; loader.find_all_languages(&loader_config)?; - let time = matches.is_present("time"); - let quiet = matches.is_present("quiet"); - let html_mode = quiet || matches.is_present("html"); - let paths = collect_paths(matches.value_of("paths-file"), matches.values_of("paths"))?; + let quiet = highlight_options.quiet; + let html_mode = quiet || highlight_options.html; + let paths = collect_paths( + highlight_options.paths_file.as_deref(), + highlight_options.paths, + )?; if html_mode && !quiet { println!("{}", highlight::HTML_HEADER); } - let cancellation_flag = util::cancel_on_stdin(); + let cancellation_flag = util::cancel_on_signal(); - let mut lang = None; - if let Some(scope) = matches.value_of("scope") { - lang = loader.language_configuration_for_scope(scope)?; - if lang.is_none() { - return Err(anyhow!("Unknown scope '{}'", scope)); + let mut language = None; + if let Some(scope) = highlight_options.scope.as_deref() { + language = loader.language_configuration_for_scope(scope)?; + if language.is_none() { + return Err(anyhow!("Unknown scope '{scope}'")); } } for path in paths { let path = Path::new(&path); - let (language, language_config) = match lang { + let (language, language_config) = match language.clone() { Some(v) => v, - None => match loader.language_configuration_for_file_name(path)? { - Some(v) => v, - None => { - eprintln!("No language found for path {:?}", path); + None => { + if let Some(v) = loader.language_configuration_for_file_name(path)? { + v + } else { + eprintln!("{}", util::lang_not_found_for_path(path, &loader_config)); continue; } - }, + } }; - if let Some(highlight_config) = language_config.highlight_config(language)? { + if let Some(highlight_config) = language_config + .highlight_config(language, highlight_options.query_paths.as_deref())? + { + if highlight_options.check { + let names = if let Some(path) = highlight_options.captures_path.as_deref() { + let path = Path::new(path); + let file = fs::read_to_string(path)?; + let capture_names = file + .lines() + .filter_map(|line| { + if line.trim().is_empty() || line.trim().starts_with(';') { + return None; + } + line.split(';').next().map(|s| s.trim().trim_matches('"')) + }) + .collect::>(); + highlight_config.nonconformant_capture_names(&capture_names) + } else { + highlight_config.nonconformant_capture_names(&HashSet::new()) + }; + if names.is_empty() { + eprintln!("All highlight captures conform to standards."); + } else { + eprintln!( + "Non-standard highlight {} detected:", + if names.len() > 1 { + "captures" + } else { + "capture" + } + ); + for name in names { + eprintln!("* {name}"); + } + } + } + let source = fs::read(path)?; if html_mode { highlight::html( @@ -562,7 +732,8 @@ fn run() -> Result<()> { &source, highlight_config, quiet, - time, + highlight_options.time, + Some(&cancellation_flag), )?; } else { highlight::ansi( @@ -570,12 +741,12 @@ fn run() -> Result<()> { &theme_config.theme, &source, highlight_config, - time, + highlight_options.time, Some(&cancellation_flag), )?; } } else { - eprintln!("No syntax highlighting config found for path {:?}", path); + eprintln!("No syntax highlighting config found for path {path:?}"); } } @@ -584,17 +755,42 @@ fn run() -> Result<()> { } } - ("build-wasm", Some(matches)) => { - let grammar_path = current_dir.join(matches.value_of("path").unwrap_or("")); - wasm::compile_language_to_wasm(&grammar_path, matches.is_present("docker"))?; + Commands::Tags(tags_options) => { + let config = Config::load(tags_options.config_path)?; + let loader_config = config.get()?; + loader.find_all_languages(&loader_config)?; + let paths = collect_paths(tags_options.paths_file.as_deref(), tags_options.paths)?; + tags::generate_tags( + &loader, + &config.get()?, + tags_options.scope.as_deref(), + &paths, + tags_options.quiet, + tags_options.time, + )?; + } + + Commands::BuildWasm(wasm_options) => { + let grammar_path = current_dir.join(wasm_options.path.unwrap_or_default()); + wasm::compile_language_to_wasm( + &loader, + &grammar_path, + ¤t_dir, + wasm_options.docker, + )?; } - ("playground", Some(matches)) => { - let open_in_browser = !matches.is_present("quiet"); - playground::serve(¤t_dir, open_in_browser); + Commands::Playground(playground_options) => { + let open_in_browser = !playground_options.quiet; + let grammar_path = playground_options + .grammar_path + .map(PathBuf::from) + .unwrap_or(current_dir); + playground::serve(&grammar_path, open_in_browser)?; } - ("dump-languages", Some(_)) => { + Commands::DumpLanguages(dump_options) => { + let config = Config::load(dump_options.config_path)?; let loader_config = config.get()?; loader.find_all_languages(&loader_config)?; for (configuration, language_path) in loader.get_all_language_configurations() { @@ -616,20 +812,47 @@ fn run() -> Result<()> { ); } } - - _ => unreachable!(), } Ok(()) } -fn collect_paths<'a>( - paths_file: Option<&str>, - paths: Option>, -) -> Result> { +#[must_use] +const fn get_styles() -> clap::builder::Styles { + clap::builder::Styles::styled() + .usage( + Style::new() + .bold() + .fg_color(Some(Color::Ansi(AnsiColor::Yellow))), + ) + .header( + Style::new() + .bold() + .fg_color(Some(Color::Ansi(AnsiColor::Yellow))), + ) + .literal(Style::new().fg_color(Some(Color::Ansi(AnsiColor::Green)))) + .invalid( + Style::new() + .bold() + .fg_color(Some(Color::Ansi(AnsiColor::Red))), + ) + .error( + Style::new() + .bold() + .fg_color(Some(Color::Ansi(AnsiColor::Red))), + ) + .valid( + Style::new() + .bold() + .fg_color(Some(Color::Ansi(AnsiColor::Green))), + ) + .placeholder(Style::new().fg_color(Some(Color::Ansi(AnsiColor::White)))) +} + +fn collect_paths(paths_file: Option<&str>, paths: Option>) -> Result> { if let Some(paths_file) = paths_file { return Ok(fs::read_to_string(paths_file) - .with_context(|| format!("Failed to read paths file {}", paths_file))? + .with_context(|| format!("Failed to read paths file {paths_file}"))? .trim() .lines() .map(String::from) @@ -642,25 +865,23 @@ fn collect_paths<'a>( let mut incorporate_path = |path: &str, positive| { if positive { result.push(path.to_string()); - } else { - if let Some(index) = result.iter().position(|p| p == path) { - result.remove(index); - } + } else if let Some(index) = result.iter().position(|p| p == path) { + result.remove(index); } }; for mut path in paths { let mut positive = true; - if path.starts_with("!") { + if path.starts_with('!') { positive = false; - path = path.trim_start_matches("!"); + path = path.trim_start_matches('!').to_string(); } - if Path::new(path).exists() { - incorporate_path(path, positive); + if Path::new(&path).exists() { + incorporate_path(&path, positive); } else { let paths = - glob(path).with_context(|| format!("Invalid glob pattern {:?}", path))?; + glob(&path).with_context(|| format!("Invalid glob pattern {path:?}"))?; for path in paths { if let Some(path) = path?.to_str() { incorporate_path(path, positive); diff --git a/third-party/tree-sitter/tree-sitter/cli/src/parse.rs b/third-party/tree-sitter/tree-sitter/cli/src/parse.rs index 3e28e51a86..4849bda3ce 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/parse.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/parse.rs @@ -3,9 +3,9 @@ use anyhow::{anyhow, Context, Result}; use std::io::{self, Write}; use std::path::Path; use std::sync::atomic::AtomicUsize; -use std::time::Instant; +use std::time::{Duration, Instant}; use std::{fmt, fs, usize}; -use tree_sitter::{InputEdit, Language, LogType, Parser, Point, Tree}; +use tree_sitter::{ffi, InputEdit, Language, LogType, Parser, Point, Tree}; #[derive(Debug)] pub struct Edit { @@ -18,19 +18,30 @@ pub struct Edit { pub struct Stats { pub successful_parses: usize, pub total_parses: usize, + pub total_bytes: usize, + pub total_duration: Duration, } impl fmt::Display for Stats { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - return writeln!(f, "Total parses: {}; successful parses: {}; failed parses: {}; success percentage: {:.2}%", - self.total_parses, - self.successful_parses, - self.total_parses - self.successful_parses, - (self.successful_parses as f64) / (self.total_parses as f64) * 100.0); + let duration_us = self.total_duration.as_micros(); + writeln!( + f, + "Total parses: {}; successful parses: {}; failed parses: {}; success percentage: {:.2}%; average speed: {} bytes/ms", + self.total_parses, + self.successful_parses, + self.total_parses - self.successful_parses, + ((self.successful_parses as f64) / (self.total_parses as f64)) * 100.0, + if duration_us != 0 { + ((self.total_bytes as u128) * 1_000) / duration_us + } else { + 0 + } + ) } } -#[derive(Copy, Clone)] +#[derive(Copy, Clone, PartialEq, Eq)] pub enum ParseOutput { Normal, Quiet, @@ -38,71 +49,105 @@ pub enum ParseOutput { Dot, } -pub fn parse_file_at_path( - language: Language, - path: &Path, - edits: &Vec<&str>, - max_path_length: usize, - output: ParseOutput, - print_time: bool, - timeout: u64, - debug: bool, - debug_graph: bool, - cancellation_flag: Option<&AtomicUsize>, -) -> Result { +pub struct ParseFileOptions<'a> { + pub language: Language, + pub path: &'a Path, + pub edits: &'a [&'a str], + pub max_path_length: usize, + pub output: ParseOutput, + pub print_time: bool, + pub timeout: u64, + pub debug: bool, + pub debug_graph: bool, + pub cancellation_flag: Option<&'a AtomicUsize>, + pub encoding: Option, + pub open_log: bool, +} + +#[derive(Copy, Clone)] +pub struct ParseResult { + pub successful: bool, + pub bytes: usize, + pub duration: Option, +} + +pub fn parse_file_at_path(parser: &mut Parser, opts: &ParseFileOptions) -> Result { let mut _log_session = None; - let mut parser = Parser::new(); - parser.set_language(language)?; - let mut source_code = - fs::read(path).with_context(|| format!("Error reading source file {:?}", path))?; + parser.set_language(&opts.language)?; + let mut source_code = fs::read(opts.path) + .with_context(|| format!("Error reading source file {:?}", opts.path))?; // If the `--cancel` flag was passed, then cancel the parse // when the user types a newline. - unsafe { parser.set_cancellation_flag(cancellation_flag) }; + unsafe { parser.set_cancellation_flag(opts.cancellation_flag) }; // Set a timeout based on the `--time` flag. - parser.set_timeout_micros(timeout); + parser.set_timeout_micros(opts.timeout); // Render an HTML graph if `--debug-graph` was passed - if debug_graph { - _log_session = Some(util::log_graphs(&mut parser, "log.html")?); + if opts.debug_graph { + _log_session = Some(util::log_graphs(parser, "log.html", opts.open_log)?); } // Log to stderr if `--debug` was passed - else if debug { + else if opts.debug { parser.set_logger(Some(Box::new(|log_type, message| { if log_type == LogType::Lex { - io::stderr().write(b" ").unwrap(); + io::stderr().write_all(b" ").unwrap(); } - write!(&mut io::stderr(), "{}\n", message).unwrap(); + writeln!(&mut io::stderr(), "{message}").unwrap(); }))); } let time = Instant::now(); - let tree = parser.parse(&source_code, None); + + #[inline(always)] + fn is_utf16_bom(bom_bytes: &[u8]) -> bool { + bom_bytes == [0xFF, 0xFE] || bom_bytes == [0xFE, 0xFF] + } + + let tree = match opts.encoding { + Some(encoding) if encoding == ffi::TSInputEncodingUTF16 => { + let source_code_utf16 = source_code + .chunks_exact(2) + .map(|chunk| u16::from_le_bytes([chunk[0], chunk[1]])) + .collect::>(); + parser.parse_utf16(&source_code_utf16, None) + } + None if source_code.len() >= 2 && is_utf16_bom(&source_code[0..2]) => { + let source_code_utf16 = source_code + .chunks_exact(2) + .map(|chunk| u16::from_le_bytes([chunk[0], chunk[1]])) + .collect::>(); + parser.parse_utf16(&source_code_utf16, None) + } + _ => parser.parse(&source_code, None), + }; + + parser.stop_printing_dot_graphs(); let stdout = io::stdout(); let mut stdout = stdout.lock(); if let Some(mut tree) = tree { - if debug_graph && !edits.is_empty() { + if opts.debug_graph && !opts.edits.is_empty() { println!("BEFORE:\n{}", String::from_utf8_lossy(&source_code)); } - for (i, edit) in edits.iter().enumerate() { + for (i, edit) in opts.edits.iter().enumerate() { let edit = parse_edit_flag(&source_code, edit)?; - perform_edit(&mut tree, &mut source_code, &edit); + perform_edit(&mut tree, &mut source_code, &edit)?; tree = parser.parse(&source_code, Some(&tree)).unwrap(); - if debug_graph { - println!("AFTER {}:\n{}", i, String::from_utf8_lossy(&source_code)); + if opts.debug_graph { + println!("AFTER {i}:\n{}", String::from_utf8_lossy(&source_code)); } } let duration = time.elapsed(); - let duration_ms = duration.as_secs() * 1000 + duration.subsec_nanos() as u64 / 1000000; + let duration_ms = duration.as_micros() as f64 / 1e3; let mut cursor = tree.walk(); - if matches!(output, ParseOutput::Normal) { + if opts.output == ParseOutput::Normal { let mut needs_newline = false; let mut indent_level = 0; let mut did_visit_children = false; @@ -111,7 +156,7 @@ pub fn parse_file_at_path( let is_named = node.is_named(); if did_visit_children { if is_named { - stdout.write(b")")?; + stdout.write_all(b")")?; needs_newline = true; } if cursor.goto_next_sibling() { @@ -125,15 +170,15 @@ pub fn parse_file_at_path( } else { if is_named { if needs_newline { - stdout.write(b"\n")?; + stdout.write_all(b"\n")?; } for _ in 0..indent_level { - stdout.write(b" ")?; + stdout.write_all(b" ")?; } let start = node.start_position(); let end = node.end_position(); if let Some(field_name) = cursor.field_name() { - write!(&mut stdout, "{}: ", field_name)?; + write!(&mut stdout, "{field_name}: ")?; } write!( &mut stdout, @@ -155,49 +200,77 @@ pub fn parse_file_at_path( } } cursor.reset(tree.root_node()); - println!(""); + println!(); } - if matches!(output, ParseOutput::Xml) { + if opts.output == ParseOutput::Xml { let mut needs_newline = false; let mut indent_level = 0; let mut did_visit_children = false; - let mut tags: Vec<&str> = Vec::new(); + let mut had_named_children = false; + let mut tags = Vec::<&str>::new(); + writeln!(&mut stdout, "")?; loop { let node = cursor.node(); let is_named = node.is_named(); if did_visit_children { if is_named { let tag = tags.pop(); - write!(&mut stdout, "\n", tag.expect("there is a tag"))?; + if had_named_children { + for _ in 0..indent_level { + stdout.write_all(b" ")?; + } + } + write!(&mut stdout, "", tag.expect("there is a tag"))?; + // we only write a line in the case where it's the last sibling + if let Some(parent) = node.parent() { + if parent.child(parent.child_count() - 1).unwrap() == node { + stdout.write_all(b"\n")?; + } + } needs_newline = true; } if cursor.goto_next_sibling() { did_visit_children = false; + had_named_children = false; } else if cursor.goto_parent() { did_visit_children = true; + had_named_children = is_named; indent_level -= 1; + if !is_named && needs_newline { + stdout.write_all(b"\n")?; + for _ in 0..indent_level { + stdout.write_all(b" ")?; + } + } } else { break; } } else { if is_named { if needs_newline { - stdout.write(b"\n")?; + stdout.write_all(b"\n")?; } for _ in 0..indent_level { - stdout.write(b" ")?; + stdout.write_all(b" ")?; } write!(&mut stdout, "<{}", node.kind())?; if let Some(field_name) = cursor.field_name() { - write!(&mut stdout, " type=\"{}\"", field_name)?; + write!(&mut stdout, " field=\"{field_name}\"")?; } + let start = node.start_position(); + let end = node.end_position(); + write!(&mut stdout, " srow=\"{}\"", start.row)?; + write!(&mut stdout, " scol=\"{}\"", start.column)?; + write!(&mut stdout, " erow=\"{}\"", end.row)?; + write!(&mut stdout, " ecol=\"{}\"", end.column)?; write!(&mut stdout, ">")?; tags.push(node.kind()); needs_newline = true; } if cursor.goto_first_child() { did_visit_children = false; + had_named_children = false; indent_level += 1; } else { did_visit_children = true; @@ -205,16 +278,27 @@ pub fn parse_file_at_path( let end = node.end_byte(); let value = std::str::from_utf8(&source_code[start..end]).expect("has a string"); + // if !is_named { + // for _ in 0..indent_level { + // stdout.write_all(b" ")?; + // } + // } + if !is_named && needs_newline { + stdout.write_all(b"\n")?; + for _ in 0..indent_level { + stdout.write_all(b" ")?; + } + } write!(&mut stdout, "{}", html_escape::encode_text(value))?; } } } cursor.reset(tree.root_node()); - println!(""); + println!(); } - if matches!(output, ParseOutput::Dot) { - util::print_tree_graph(&tree, "log.html").unwrap(); + if opts.output == ParseOutput::Dot { + util::print_tree_graph(&tree, "log.html", opts.open_log).unwrap(); } let mut first_error = None; @@ -224,23 +308,22 @@ pub fn parse_file_at_path( if node.is_error() || node.is_missing() { first_error = Some(node); break; - } else { - if !cursor.goto_first_child() { - break; - } + } + if !cursor.goto_first_child() { + break; } } else if !cursor.goto_next_sibling() { break; } } - if first_error.is_some() || print_time { + if first_error.is_some() || opts.print_time { write!( &mut stdout, - "{:width$}\t{} ms", - path.to_str().unwrap(), - duration_ms, - width = max_path_length + "{:width$}\t{duration_ms:>7.2} ms\t{:>6} bytes/ms", + opts.path.to_str().unwrap(), + (source_code.len() as u128 * 1_000_000) / duration.as_nanos(), + width = opts.max_path_length )?; if let Some(node) = first_error { let start = node.start_position(); @@ -253,7 +336,7 @@ pub fn parse_file_at_path( write!( &mut stdout, "MISSING \"{}\"", - node.kind().replace("\n", "\\n") + node.kind().replace('\n', "\\n") )?; } } else { @@ -265,33 +348,42 @@ pub fn parse_file_at_path( start.row, start.column, end.row, end.column )?; } - write!(&mut stdout, "\n")?; + writeln!(&mut stdout)?; } - return Ok(first_error.is_some()); - } else if print_time { + return Ok(ParseResult { + successful: first_error.is_none(), + bytes: source_code.len(), + duration: Some(duration), + }); + } + + if opts.print_time { let duration = time.elapsed(); - let duration_ms = duration.as_secs() * 1000 + duration.subsec_nanos() as u64 / 1000000; + let duration_ms = duration.as_micros() as f64 / 1e3; writeln!( &mut stdout, - "{:width$}\t{} ms (timed out)", - path.to_str().unwrap(), - duration_ms, - width = max_path_length + "{:width$}\t{duration_ms:>7.2} ms\t(timed out)", + opts.path.to_str().unwrap(), + width = opts.max_path_length )?; } - Ok(false) + Ok(ParseResult { + successful: false, + bytes: source_code.len(), + duration: None, + }) } -pub fn perform_edit(tree: &mut Tree, input: &mut Vec, edit: &Edit) -> InputEdit { +pub fn perform_edit(tree: &mut Tree, input: &mut Vec, edit: &Edit) -> Result { let start_byte = edit.position; let old_end_byte = edit.position + edit.deleted_length; let new_end_byte = edit.position + edit.inserted_text.len(); - let start_position = position_for_offset(input, start_byte); - let old_end_position = position_for_offset(input, old_end_byte); - input.splice(start_byte..old_end_byte, edit.inserted_text.iter().cloned()); - let new_end_position = position_for_offset(input, new_end_byte); + let start_position = position_for_offset(input, start_byte)?; + let old_end_position = position_for_offset(input, old_end_byte)?; + input.splice(start_byte..old_end_byte, edit.inserted_text.iter().copied()); + let new_end_position = position_for_offset(input, new_end_byte)?; let edit = InputEdit { start_byte, old_end_byte, @@ -301,10 +393,10 @@ pub fn perform_edit(tree: &mut Tree, input: &mut Vec, edit: &Edit) -> InputE new_end_position, }; tree.edit(&edit); - edit + Ok(edit) } -fn parse_edit_flag(source_code: &Vec, flag: &str) -> Result { +fn parse_edit_flag(source_code: &[u8], flag: &str) -> Result { let error = || { anyhow!(concat!( "Invalid edit string '{}'. ", @@ -316,7 +408,7 @@ fn parse_edit_flag(source_code: &Vec, flag: &str) -> Result { // * edit position // * deleted length // * inserted text - let mut parts = flag.split(" "); + let mut parts = flag.split(' '); let position = parts.next().ok_or_else(error)?; let deleted_length = parts.next().ok_or_else(error)?; let inserted_text = parts.collect::>().join(" ").into_bytes(); @@ -324,19 +416,19 @@ fn parse_edit_flag(source_code: &Vec, flag: &str) -> Result { // Position can either be a byte_offset or row,column pair, separated by a comma let position = if position == "$" { source_code.len() - } else if position.contains(",") { - let mut parts = position.split(","); + } else if position.contains(',') { + let mut parts = position.split(','); let row = parts.next().ok_or_else(error)?; - let row = usize::from_str_radix(row, 10).map_err(|_| error())?; + let row = row.parse::().map_err(|_| error())?; let column = parts.next().ok_or_else(error)?; - let column = usize::from_str_radix(column, 10).map_err(|_| error())?; - offset_for_position(source_code, Point { row, column }) + let column = column.parse::().map_err(|_| error())?; + offset_for_position(source_code, Point { row, column })? } else { - usize::from_str_radix(position, 10).map_err(|_| error())? + position.parse::().map_err(|_| error())? }; // Deleted length must be a byte count. - let deleted_length = usize::from_str_radix(deleted_length, 10).map_err(|_| error())?; + let deleted_length = deleted_length.parse::().map_err(|_| error())?; Ok(Edit { position, @@ -345,31 +437,48 @@ fn parse_edit_flag(source_code: &Vec, flag: &str) -> Result { }) } -fn offset_for_position(input: &Vec, position: Point) -> usize { - let mut current_position = Point { row: 0, column: 0 }; - for (i, c) in input.iter().enumerate() { - if *c as char == '\n' { - current_position.row += 1; - current_position.column = 0; - } else { - current_position.column += 1; - } - if current_position > position { - return i; +pub fn offset_for_position(input: &[u8], position: Point) -> Result { + let mut row = 0; + let mut offset = 0; + let mut iter = memchr::memchr_iter(b'\n', input); + loop { + if let Some(pos) = iter.next() { + if row < position.row { + row += 1; + offset = pos; + continue; + } } + offset += 1; + break; + } + if position.row - row > 0 { + return Err(anyhow!("Failed to address a row: {}", position.row)); + } + if let Some(pos) = iter.next() { + if (pos - offset < position.column) || (input[offset] == b'\n' && position.column > 0) { + return Err(anyhow!("Failed to address a column: {}", position.column)); + }; + } else if input.len() - offset < position.column { + return Err(anyhow!("Failed to address a column over the end")); } - return input.len(); + Ok(offset + position.column) } -fn position_for_offset(input: &Vec, offset: usize) -> Point { +pub fn position_for_offset(input: &[u8], offset: usize) -> Result { + if offset > input.len() { + return Err(anyhow!("Failed to address an offset: {offset}")); + } let mut result = Point { row: 0, column: 0 }; - for c in &input[0..offset] { - if *c as char == '\n' { - result.row += 1; - result.column = 0; - } else { - result.column += 1; - } + let mut last = 0; + for pos in memchr::memchr_iter(b'\n', &input[..offset]) { + result.row += 1; + last = pos; } - result + result.column = if result.row > 0 { + offset - last - 1 + } else { + offset + }; + Ok(result) } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/playground.html b/third-party/tree-sitter/tree-sitter/cli/src/playground.html index 22c874df13..420cd28dce 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/playground.html +++ b/third-party/tree-sitter/tree-sitter/cli/src/playground.html @@ -3,8 +3,8 @@ tree-sitter THE_LANGUAGE_NAME - - + + @@ -29,6 +29,10 @@ +
+ (?) +
+ diff --git a/third-party/tree-sitter/tree-sitter/cli/src/playground.rs b/third-party/tree-sitter/tree-sitter/cli/src/playground.rs index a2dbef9676..34da71ad5a 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/playground.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/playground.rs @@ -1,5 +1,5 @@ use super::wasm; -use anyhow::Context; +use anyhow::{anyhow, Context, Result}; use std::{ borrow::Cow, env, fs, @@ -8,12 +8,11 @@ use std::{ str::{self, FromStr as _}, }; use tiny_http::{Header, Response, Server}; -use webbrowser; macro_rules! optional_resource { ($name: tt, $path: tt) => { #[cfg(TREE_SITTER_EMBED_WASM_BINDING)] - fn $name(tree_sitter_dir: &Option) -> Cow<'static, [u8]> { + fn $name(tree_sitter_dir: Option<&Path>) -> Cow<'static, [u8]> { if let Some(tree_sitter_dir) = tree_sitter_dir { Cow::Owned(fs::read(tree_sitter_dir.join($path)).unwrap()) } else { @@ -22,7 +21,7 @@ macro_rules! optional_resource { } #[cfg(not(TREE_SITTER_EMBED_WASM_BINDING))] - fn $name(tree_sitter_dir: &Option) -> Cow<'static, [u8]> { + fn $name(tree_sitter_dir: Option<&Path>) -> Cow<'static, [u8]> { if let Some(tree_sitter_dir) = tree_sitter_dir { Cow::Owned(fs::read(tree_sitter_dir.join($path)).unwrap()) } else { @@ -36,44 +35,32 @@ optional_resource!(get_playground_js, "docs/assets/js/playground.js"); optional_resource!(get_lib_js, "lib/binding_web/tree-sitter.js"); optional_resource!(get_lib_wasm, "lib/binding_web/tree-sitter.wasm"); -fn get_main_html(tree_sitter_dir: &Option) -> Cow<'static, [u8]> { - if let Some(tree_sitter_dir) = tree_sitter_dir { - Cow::Owned(fs::read(tree_sitter_dir.join("cli/src/playground.html")).unwrap()) - } else { - Cow::Borrowed(include_bytes!("playground.html")) - } +fn get_main_html(tree_sitter_dir: Option<&Path>) -> Cow<'static, [u8]> { + tree_sitter_dir.map_or( + Cow::Borrowed(include_bytes!("playground.html")), + |tree_sitter_dir| { + Cow::Owned(fs::read(tree_sitter_dir.join("cli/src/playground.html")).unwrap()) + }, + ) } -pub fn serve(grammar_path: &Path, open_in_browser: bool) { - let server = get_server(); - let grammar_name = wasm::get_grammar_name(&grammar_path.join("src")) - .with_context(|| "Failed to get wasm filename") - .unwrap(); - let wasm_filename = format!("tree-sitter-{}.wasm", grammar_name); - let language_wasm = fs::read(grammar_path.join(&wasm_filename)) - .with_context(|| { - format!( - "Failed to read {}. Run `tree-sitter build-wasm` first.", - wasm_filename - ) - }) - .unwrap(); +pub fn serve(grammar_path: &Path, open_in_browser: bool) -> Result<()> { + let server = get_server()?; + let (grammar_name, language_wasm) = wasm::load_language_wasm_file(grammar_path)?; let url = format!("http://{}", server.server_addr()); - println!("Started playground on: {}", url); - if open_in_browser { - if let Err(_) = webbrowser::open(&url) { - eprintln!("Failed to open '{}' in a web browser", url); - } + println!("Started playground on: {url}"); + if open_in_browser && webbrowser::open(&url).is_err() { + eprintln!("Failed to open '{url}' in a web browser"); } let tree_sitter_dir = env::var("TREE_SITTER_BASE_DIR").map(PathBuf::from).ok(); - let main_html = str::from_utf8(&get_main_html(&tree_sitter_dir)) + let main_html = str::from_utf8(&get_main_html(tree_sitter_dir.as_deref())) .unwrap() .replace("THE_LANGUAGE_NAME", &grammar_name) .into_bytes(); - let playground_js = get_playground_js(&tree_sitter_dir); - let lib_js = get_lib_js(&tree_sitter_dir); - let lib_wasm = get_lib_wasm(&tree_sitter_dir); + let playground_js = get_playground_js(tree_sitter_dir.as_deref()); + let lib_js = get_lib_js(tree_sitter_dir.as_deref()); + let lib_wasm = get_lib_wasm(tree_sitter_dir.as_deref()); let html_header = Header::from_str("Content-Type: text/html").unwrap(); let js_header = Header::from_str("Content-Type: application/javascript").unwrap(); @@ -106,11 +93,15 @@ pub fn serve(grammar_path: &Path, open_in_browser: bool) { } _ => response(b"Not found", &html_header).with_status_code(404), }; - request.respond(res).expect("Failed to write HTTP response"); + request + .respond(res) + .with_context(|| "Failed to write HTTP response")?; } + + Ok(()) } -fn redirect<'a>(url: &'a str) -> Response<&'a [u8]> { +fn redirect(url: &str) -> Response<&[u8]> { Response::empty(302) .with_data("".as_bytes(), Some(0)) .with_header(Header::from_bytes("Location", url.as_bytes()).unwrap()) @@ -122,18 +113,24 @@ fn response<'a>(data: &'a [u8], header: &Header) -> Response<&'a [u8]> { .with_header(header.clone()) } -fn get_server() -> Server { - let addr = env::var("TREE_SITTER_PLAYGROUND_ADDR").unwrap_or("127.0.0.1".to_owned()); +fn get_server() -> Result { + let addr = env::var("TREE_SITTER_PLAYGROUND_ADDR").unwrap_or_else(|_| "127.0.0.1".to_owned()); let port = env::var("TREE_SITTER_PLAYGROUND_PORT") - .map(|v| v.parse::().expect("Invalid port specification")) + .map(|v| { + v.parse::() + .with_context(|| "Invalid port specification") + }) .ok(); let listener = match port { - Some(port) => bind_to(&*addr, port).expect("Can't bind to the specified port"), - None => { - get_listener_on_available_port(&*addr).expect("Can't find a free port to bind to it") + Some(port) => { + bind_to(&addr, port?).with_context(|| "Failed to bind to the specified port")? } + None => get_listener_on_available_port(&addr) + .with_context(|| "Failed to find a free port to bind to it")?, }; - Server::from_listener(listener, None).expect("Failed to start web server") + let server = + Server::from_listener(listener, None).map_err(|_| anyhow!("Failed to start web server"))?; + Ok(server) } fn get_listener_on_available_port(addr: &str) -> Option { diff --git a/third-party/tree-sitter/tree-sitter/cli/src/query.rs b/third-party/tree-sitter/tree-sitter/cli/src/query.rs index fc24cb0560..e5601a30c5 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/query.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/query.rs @@ -9,8 +9,9 @@ use std::{ }; use tree_sitter::{Language, Parser, Point, Query, QueryCursor}; +#[allow(clippy::too_many_arguments)] pub fn query_files_at_paths( - language: Language, + language: &Language, paths: Vec, query_path: &Path, ordered_captures: bool, @@ -24,7 +25,7 @@ pub fn query_files_at_paths( let mut stdout = stdout.lock(); let query_source = fs::read_to_string(query_path) - .with_context(|| format!("Error reading query file {:?}", query_path))?; + .with_context(|| format!("Error reading query file {query_path:?}"))?; let query = Query::new(language, &query_source).with_context(|| "Query compilation failed")?; let mut query_cursor = QueryCursor::new(); @@ -41,10 +42,10 @@ pub fn query_files_at_paths( for path in paths { let mut results = Vec::new(); - writeln!(&mut stdout, "{}", path)?; + writeln!(&mut stdout, "{path}")?; let source_code = - fs::read(&path).with_context(|| format!("Error reading source file {:?}", path))?; + fs::read(&path).with_context(|| format!("Error reading source file {path:?}"))?; let tree = parser.parse(&source_code, None).unwrap(); let start = Instant::now(); @@ -57,17 +58,16 @@ pub fn query_files_at_paths( if !quiet { writeln!( &mut stdout, - " pattern: {:>2}, capture: {} - {}, start: {}, end: {}, text: `{}`", + " pattern: {:>2}, capture: {} - {capture_name}, start: {}, end: {}, text: `{}`", mat.pattern_index, capture.index, - capture_name, capture.node.start_position(), capture.node.end_position(), capture.node.utf8_text(&source_code).unwrap_or("") )?; } results.push(query_testing::CaptureInfo { - name: capture_name.to_string(), + name: (*capture_name).to_string(), start: capture.node.start_position(), end: capture.node.end_position(), }); @@ -85,23 +85,19 @@ pub fn query_files_at_paths( if end.row == start.row { writeln!( &mut stdout, - " capture: {} - {}, start: {}, end: {}, text: `{}`", + " capture: {} - {capture_name}, start: {start}, end: {end}, text: `{}`", capture.index, - capture_name, - start, - end, capture.node.utf8_text(&source_code).unwrap_or("") )?; } else { writeln!( &mut stdout, - " capture: {}, start: {}, end: {}", - capture_name, start, end, + " capture: {capture_name}, start: {start}, end: {end}", )?; } } results.push(query_testing::CaptureInfo { - name: capture_name.to_string(), + name: (*capture_name).to_string(), start: capture.node.start_position(), end: capture.node.end_position(), }); @@ -115,7 +111,7 @@ pub fn query_files_at_paths( )?; } if should_test { - query_testing::assert_expected_captures(results, path, &mut parser, language)? + query_testing::assert_expected_captures(&results, path, &mut parser, language)?; } if print_time { writeln!(&mut stdout, "{:?}", start.elapsed())?; diff --git a/third-party/tree-sitter/tree-sitter/cli/src/query_testing.rs b/third-party/tree-sitter/tree-sitter/cli/src/query_testing.rs index 9950f12f39..a0ac260d04 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/query_testing.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/query_testing.rs @@ -18,15 +18,27 @@ pub struct CaptureInfo { #[derive(Debug, PartialEq, Eq)] pub struct Assertion { pub position: Point, + pub negative: bool, pub expected_capture_name: String, } +impl Assertion { + #[must_use] + pub fn new(row: usize, col: usize, negative: bool, expected_capture_name: String) -> Self { + Self { + position: Point::new(row, col), + negative, + expected_capture_name, + } + } +} + /// Parse the given source code, finding all of the comments that contain /// highlighting assertions. Return a vector of (position, expected highlight name) /// pairs. pub fn parse_position_comments( parser: &mut Parser, - language: Language, + language: &Language, source: &[u8], ) -> Result> { let mut result = Vec::new(); @@ -45,7 +57,7 @@ pub fn parse_position_comments( let node = cursor.node(); // Find every comment node. - if node.kind().contains("comment") { + if node.kind().to_lowercase().contains("comment") { if let Ok(text) = node.utf8_text(source) { let mut position = node.start_position(); if position.row > 0 { @@ -54,6 +66,7 @@ pub fn parse_position_comments( // to its own column. let mut has_left_caret = false; let mut has_arrow = false; + let mut negative = false; let mut arrow_end = 0; for (i, c) in text.char_indices() { arrow_end = i + 1; @@ -69,6 +82,19 @@ pub fn parse_position_comments( has_left_caret = c == '<'; } + // find any ! after arrows but before capture name + if has_arrow { + for (i, c) in text[arrow_end..].char_indices() { + if c == '!' { + negative = true; + arrow_end += i + 1; + break; + } else if !c.is_whitespace() { + break; + } + } + } + // If the comment node contains an arrow and a highlight name, record the // highlight name and the position. if let (true, Some(mat)) = @@ -76,7 +102,8 @@ pub fn parse_position_comments( { assertion_ranges.push((node.start_position(), node.end_position())); result.push(Assertion { - position: position, + position, + negative, expected_capture_name: mat.as_str().to_string(), }); } @@ -99,7 +126,7 @@ pub fn parse_position_comments( // code *above* the assertion. There can be multiple lines of assertion comments, // so the positions may have to be decremented by more than one row. let mut i = 0; - for assertion in result.iter_mut() { + for assertion in &mut result { loop { let on_assertion_line = assertion_ranges[i..] .iter() @@ -124,14 +151,14 @@ pub fn parse_position_comments( } pub fn assert_expected_captures( - infos: Vec, + infos: &[CaptureInfo], path: String, parser: &mut Parser, - language: Language, + language: &Language, ) -> Result<()> { let contents = fs::read_to_string(path)?; let pairs = parse_position_comments(parser, language, contents.as_bytes())?; - for info in &infos { + for info in infos { if let Some(found) = pairs.iter().find(|p| { p.position.row == info.start.row && p.position >= info.start && p.position < info.end }) { @@ -141,7 +168,7 @@ pub fn assert_expected_captures( info.start, found.expected_capture_name, info.name - ))? + ))?; } } } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tags.rs b/third-party/tree-sitter/tree-sitter/cli/src/tags.rs index 457955ddf6..14ecef0d2a 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/tags.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/tags.rs @@ -4,11 +4,12 @@ use std::io::{self, Write}; use std::path::Path; use std::time::Instant; use std::{fs, str}; -use tree_sitter_loader::Loader; +use tree_sitter_loader::{Config, Loader}; use tree_sitter_tags::TagsContext; pub fn generate_tags( loader: &Loader, + loader_config: &Config, scope: Option<&str>, paths: &[String], quiet: bool, @@ -18,37 +19,37 @@ pub fn generate_tags( if let Some(scope) = scope { lang = loader.language_configuration_for_scope(scope)?; if lang.is_none() { - return Err(anyhow!("Unknown scope '{}'", scope)); + return Err(anyhow!("Unknown scope '{scope}'")); } } let mut context = TagsContext::new(); - let cancellation_flag = util::cancel_on_stdin(); + let cancellation_flag = util::cancel_on_signal(); let stdout = io::stdout(); let mut stdout = stdout.lock(); for path in paths { let path = Path::new(&path); - let (language, language_config) = match lang { + let (language, language_config) = match lang.clone() { Some(v) => v, - None => match loader.language_configuration_for_file_name(path)? { - Some(v) => v, - None => { - eprintln!("No language found for path {:?}", path); + None => { + if let Some(v) = loader.language_configuration_for_file_name(path)? { + v + } else { + eprintln!("{}", util::lang_not_found_for_path(path, loader_config)); continue; } - }, + } }; if let Some(tags_config) = language_config.tags_config(language)? { - let indent; - if paths.len() > 1 { + let indent = if paths.len() > 1 { if !quiet { writeln!(&mut stdout, "{}", path.to_string_lossy())?; } - indent = "\t" + "\t" } else { - indent = ""; + "" }; let source = fs::read(path)?; @@ -61,8 +62,7 @@ pub fn generate_tags( if !quiet { write!( &mut stdout, - "{}{:<10}\t | {:<8}\t{} {} - {} `{}`", - indent, + "{indent}{:<10}\t | {:<8}\t{} {} - {} `{}`", str::from_utf8(&source[tag.name_range]).unwrap_or(""), &tags_config.syntax_type_name(tag.syntax_type_id), if tag.is_definition { "def" } else { "ref" }, @@ -77,20 +77,15 @@ pub fn generate_tags( write!(&mut stdout, "\t{:?}", &docs)?; } } - writeln!(&mut stdout, "")?; + writeln!(&mut stdout)?; } } if time { - writeln!( - &mut stdout, - "{}time: {}ms", - indent, - t0.elapsed().as_millis(), - )?; + writeln!(&mut stdout, "{indent}time: {}ms", t0.elapsed().as_millis(),)?; } } else { - eprintln!("No tags config found for path {:?}", path); + eprintln!("No tags config found for path {path:?}"); } } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/test.rs b/third-party/tree-sitter/tree-sitter/cli/src/test.rs index 69c4a66304..74d8af4813 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/test.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/test.rs @@ -2,9 +2,11 @@ use super::util; use ansi_term::Colour; use anyhow::{anyhow, Context, Result}; use difference::{Changeset, Difference}; +use indoc::indoc; use lazy_static::lazy_static; use regex::bytes::{Regex as ByteRegex, RegexBuilder as ByteRegexBuilder}; use regex::Regex; +use std::collections::BTreeMap; use std::ffi::OsStr; use std::fmt::Write as FmtWrite; use std::fs; @@ -15,18 +17,28 @@ use tree_sitter::{Language, LogType, Parser, Query}; use walkdir::WalkDir; lazy_static! { - static ref HEADER_REGEX: ByteRegex = - ByteRegexBuilder::new(r"^===+(?P[^=\r\n][^\r\n]*)?\r?\n(?P([^=\r\n][^\r\n]*\r?\n)+)===+(?P[^=\r\n][^\r\n]*)?\r?\n") + static ref HEADER_REGEX: ByteRegex = ByteRegexBuilder::new( + r"^(?x) + (?P(?:=+){3,}) + (?P[^=\r\n][^\r\n]*)? + \r?\n + (?P(?:[^=\r\n:][^\r\n]*\r?\n)+(?:(?:[ \t]*\r?\n)+)?) + (?P((?::(?:skip|error|fail-fast|(language|platform)\([^\r\n)]+\))\r?\n)*)) + ===+ + (?P[^=\r\n][^\r\n]*)?\r?\n" + ) + .multi_line(true) + .build() + .unwrap(); + static ref DIVIDER_REGEX: ByteRegex = + ByteRegexBuilder::new(r"^(?P(?:-+){3,})(?P[^-\r\n][^\r\n]*)?\r?\n") .multi_line(true) .build() .unwrap(); - static ref DIVIDER_REGEX: ByteRegex = ByteRegexBuilder::new(r"^---+(?P[^-\r\n][^\r\n]*)?\r?\n") - .multi_line(true) - .build() - .unwrap(); static ref COMMENT_REGEX: Regex = Regex::new(r"(?m)^\s*;.*$").unwrap(); static ref WHITESPACE_REGEX: Regex = Regex::new(r"\s+").unwrap(); static ref SEXP_FIELD_REGEX: Regex = Regex::new(r" \w+: \(").unwrap(); + static ref POINT_REGEX: Regex = Regex::new(r"\s*\[\s*\d+\s*,\s*\d+\s*\]\s*").unwrap(); } #[derive(Debug, PartialEq, Eq)] @@ -40,13 +52,25 @@ pub enum TestEntry { name: String, input: Vec, output: String, + header_delim_len: usize, + divider_delim_len: usize, has_fields: bool, + attributes: TestAttributes, }, } +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct TestAttributes { + pub skip: bool, + pub platform: bool, + pub fail_fast: bool, + pub error: bool, + pub languages: Vec>, +} + impl Default for TestEntry { fn default() -> Self { - TestEntry::Group { + Self::Group { name: String::new(), children: Vec::new(), file_path: None, @@ -54,82 +78,112 @@ impl Default for TestEntry { } } -pub fn run_tests_at_path( - language: Language, - path: &Path, - debug: bool, - debug_graph: bool, - filter: Option<&str>, - update: bool, -) -> Result<()> { - let test_entry = parse_tests(path)?; +impl Default for TestAttributes { + fn default() -> Self { + Self { + skip: false, + platform: true, + fail_fast: false, + error: false, + languages: vec!["".into()], + } + } +} + +pub struct TestOptions<'a> { + pub path: PathBuf, + pub debug: bool, + pub debug_graph: bool, + pub filter: Option<&'a str>, + pub include: Option, + pub exclude: Option, + pub update: bool, + pub open_log: bool, + pub languages: BTreeMap<&'a str, &'a Language>, +} + +pub fn run_tests_at_path(parser: &mut Parser, opts: &mut TestOptions) -> Result<()> { + let test_entry = parse_tests(&opts.path)?; let mut _log_session = None; - let mut parser = Parser::new(); - parser.set_language(language)?; - if debug_graph { - _log_session = Some(util::log_graphs(&mut parser, "log.html")?); - } else if debug { + if opts.debug_graph { + _log_session = Some(util::log_graphs(parser, "log.html", opts.open_log)?); + } else if opts.debug { parser.set_logger(Some(Box::new(|log_type, message| { if log_type == LogType::Lex { - io::stderr().write(b" ").unwrap(); + io::stderr().write_all(b" ").unwrap(); } - write!(&mut io::stderr(), "{}\n", message).unwrap(); + writeln!(&mut io::stderr(), "{message}").unwrap(); }))); } let mut failures = Vec::new(); let mut corrected_entries = Vec::new(); + let mut has_parse_errors = false; run_tests( - &mut parser, + parser, test_entry, - filter, + opts, 0, &mut failures, - update, &mut corrected_entries, + &mut has_parse_errors, )?; - if failures.len() > 0 { - println!(""); + parser.stop_printing_dot_graphs(); - if update { + if failures.is_empty() { + Ok(()) + } else { + println!(); + + if opts.update && !has_parse_errors { if failures.len() == 1 { - println!("1 update:\n") + println!("1 update:\n"); } else { - println!("{} updates:\n", failures.len()) + println!("{} updates:\n", failures.len()); } for (i, (name, ..)) in failures.iter().enumerate() { - println!(" {}. {}", i + 1, name); + println!(" {}. {name}", i + 1); } + Ok(()) } else { - if failures.len() == 1 { - println!("1 failure:") - } else { - println!("{} failures:", failures.len()) + has_parse_errors = opts.update && has_parse_errors; + + if !has_parse_errors { + if failures.len() == 1 { + println!("1 failure:"); + } else { + println!("{} failures:", failures.len()); + } } print_diff_key(); for (i, (name, actual, expected)) in failures.iter().enumerate() { - println!("\n {}. {}:", i + 1, name); - let actual = format_sexp_indented(&actual, 2); - let expected = format_sexp_indented(&expected, 2); + println!("\n {}. {name}:", i + 1); + let actual = format_sexp_indented(actual, 2); + let expected = format_sexp_indented(expected, 2); print_diff(&actual, &expected); } - Err(anyhow!("")) + + if has_parse_errors { + Err(anyhow!(indoc! {" + Some tests failed to parse with unexpected `ERROR` or `MISSING` nodes, as shown above, and cannot be updated automatically. + Either fix the grammar or manually update the tests if this is expected."})) + } else { + Err(anyhow!("")) + } } - } else { - Ok(()) } } -pub fn check_queries_at_path(language: Language, path: &Path) -> Result<()> { +pub fn check_queries_at_path(language: &Language, path: &Path) -> Result<()> { if path.exists() { for entry in WalkDir::new(path) .into_iter() - .filter_map(|e| e.ok()) + .filter_map(std::result::Result::ok) .filter(|e| { e.file_type().is_file() && e.path().extension().and_then(OsStr::to_str) == Some("scm") @@ -138,9 +192,9 @@ pub fn check_queries_at_path(language: Language, path: &Path) -> Result<()> { { let filepath = entry.file_name().to_str().unwrap_or(""); let content = fs::read_to_string(entry.path()) - .with_context(|| format!("Error reading query file {:?}", filepath))?; + .with_context(|| format!("Error reading query file {filepath:?}"))?; Query::new(language, &content) - .with_context(|| format!("Error in query file {:?}", filepath))?; + .with_context(|| format!("Error in query file {filepath:?}"))?; } } Ok(()) @@ -148,18 +202,18 @@ pub fn check_queries_at_path(language: Language, path: &Path) -> Result<()> { pub fn print_diff_key() { println!( - "\n{} / {}", + "\ncorrect / {} / {}", Colour::Green.paint("expected"), - Colour::Red.paint("actual") + Colour::Red.paint("unexpected") ); } -pub fn print_diff(actual: &String, expected: &String) { +pub fn print_diff(actual: &str, expected: &str) { let changeset = Changeset::new(actual, expected, "\n"); for diff in &changeset.diffs { match diff { Difference::Same(part) => { - print!("{}{}", part, changeset.split); + print!("{part}{}", changeset.split); } Difference::Add(part) => { print!("{}{}", Colour::Green.paint(part), changeset.split); @@ -169,112 +223,254 @@ pub fn print_diff(actual: &String, expected: &String) { } } } - println!(""); + println!(); } fn run_tests( parser: &mut Parser, test_entry: TestEntry, - filter: Option<&str>, + opts: &mut TestOptions, mut indent_level: i32, failures: &mut Vec<(String, String, String)>, - update: bool, - corrected_entries: &mut Vec<(String, String, String)>, -) -> Result<()> { + corrected_entries: &mut Vec<(String, String, String, usize, usize)>, + has_parse_errors: &mut bool, +) -> Result { match test_entry { TestEntry::Example { name, input, output, + header_delim_len, + divider_delim_len, has_fields, + attributes, } => { - if let Some(filter) = filter { - if !name.contains(filter) { - if update { - let input = String::from_utf8(input).unwrap(); - let output = format_sexp(&output); - corrected_entries.push((name, input, output)); - } - return Ok(()); - } + print!("{}", " ".repeat(indent_level as usize)); + + if attributes.skip { + println!(" {}", Colour::Yellow.paint(&name)); + return Ok(true); } - let tree = parser.parse(&input, None).unwrap(); - let mut actual = tree.root_node().to_sexp(); - if !has_fields { - actual = strip_sexp_fields(actual); + + if !attributes.platform { + println!(" {}", Colour::Purple.paint(&name)); + return Ok(true); } - for _ in 0..indent_level { - print!(" "); - } - if actual == output { - println!("✓ {}", Colour::Green.paint(&name)); - if update { - let input = String::from_utf8(input).unwrap(); - let output = format_sexp(&output); - corrected_entries.push((name, input, output)); + + for (i, language_name) in attributes.languages.iter().enumerate() { + if !language_name.is_empty() { + let language = opts + .languages + .get(language_name.as_ref()) + .ok_or_else(|| anyhow!("Language not found: {language_name}"))?; + parser.set_language(language)?; } - } else { - if update { - let input = String::from_utf8(input).unwrap(); - let output = format_sexp(&actual); - corrected_entries.push((name.clone(), input, output)); - println!("✓ {}", Colour::Blue.paint(&name)); + let tree = parser.parse(&input, None).unwrap(); + + if attributes.error { + if tree.root_node().has_error() { + println!(" {}", Colour::Green.paint(&name)); + } else { + println!(" {}", Colour::Red.paint(&name)); + } + + if attributes.fail_fast { + return Ok(false); + } } else { - println!("✗ {}", Colour::Red.paint(&name)); + let mut actual = tree.root_node().to_sexp(); + if !has_fields { + actual = strip_sexp_fields(&actual); + } + + if actual == output { + println!("✓ {}", Colour::Green.paint(&name)); + if opts.update { + let input = String::from_utf8(input.clone()).unwrap(); + let output = format_sexp(&output); + corrected_entries.push(( + name.clone(), + input, + output, + header_delim_len, + divider_delim_len, + )); + } + } else { + if opts.update { + let input = String::from_utf8(input.clone()).unwrap(); + let expected_output = format_sexp(&output); + let actual_output = format_sexp(&actual); + + // Only bail early before updating if the actual is not the output, sometimes + // users want to test cases that are intended to have errors, hence why this + // check isn't shown above + if actual.contains("ERROR") || actual.contains("MISSING") { + *has_parse_errors = true; + + // keep the original `expected` output if the actual output has an error + corrected_entries.push(( + name.clone(), + input, + expected_output, + header_delim_len, + divider_delim_len, + )); + } else { + corrected_entries.push(( + name.clone(), + input, + actual_output, + header_delim_len, + divider_delim_len, + )); + println!("✓ {}", Colour::Blue.paint(&name)); + } + } else { + println!("✗ {}", Colour::Red.paint(&name)); + } + failures.push((name.clone(), actual, output.clone())); + + if attributes.fail_fast { + // return value of false means to fail fast + return Ok(false); + } + + if i == attributes.languages.len() - 1 { + // reset back to first language + parser.set_language(opts.languages.values().next().unwrap())?; + } + } } - failures.push((name, actual, output)); } } TestEntry::Group { name, - children, + mut children, file_path, } => { - if indent_level > 0 { - for _ in 0..indent_level { - print!(" "); + children.retain(|child| { + if let TestEntry::Example { name, .. } = child { + if let Some(filter) = opts.filter { + if !name.contains(filter) { + return false; + } + } + if let Some(include) = &opts.include { + if !include.is_match(name) { + return false; + } + } + if let Some(exclude) = &opts.exclude { + if exclude.is_match(name) { + return false; + } + } } - println!("{}:", name); + true + }); + + if children.is_empty() { + return Ok(true); + } + + if indent_level > 0 { + print!("{}", " ".repeat(indent_level as usize)); + println!("{name}:"); } let failure_count = failures.len(); indent_level += 1; for child in children { - run_tests( + if !run_tests( parser, child, - filter, + opts, indent_level, failures, - update, corrected_entries, - )?; + has_parse_errors, + )? { + // fail fast + return Ok(false); + } } if let Some(file_path) = file_path { - if update && failures.len() - failure_count > 0 { + if opts.update && failures.len() - failure_count > 0 { write_tests(&file_path, corrected_entries)?; } corrected_entries.clear(); } } } - Ok(()) + Ok(true) } -fn format_sexp(sexp: &String) -> String { +fn format_sexp(sexp: &str) -> String { format_sexp_indented(sexp, 0) } -fn format_sexp_indented(sexp: &String, initial_indent_level: u32) -> String { +fn format_sexp_indented(sexp: &str, initial_indent_level: u32) -> String { let mut formatted = String::new(); + if sexp.is_empty() { + return formatted; + } + let mut indent_level = initial_indent_level; let mut has_field = false; - let mut s_iter = sexp.split(|c| c == ' ' || c == ')'); - while let Some(s) = s_iter.next() { - if s.is_empty() { + + let mut c_iter = sexp.chars().peekable(); + let mut s = String::with_capacity(sexp.len()); + let mut quote = '\0'; + let mut saw_paren = false; + let mut did_last = false; + + let mut fetch_next_str = |next: &mut String| { + next.clear(); + while let Some(c) = c_iter.next() { + if c == '\'' || c == '"' { + quote = c; + } else if c == ' ' || (c == ')' && quote != '\0') { + if let Some(next_c) = c_iter.peek() { + if *next_c == quote { + next.push(c); + next.push(*next_c); + c_iter.next(); + quote = '\0'; + continue; + } + } + break; + } + if c == ')' { + saw_paren = true; + break; + } + next.push(c); + } + + // at the end + if c_iter.peek().is_none() && next.is_empty() { + if saw_paren { + // but did we see a ) before ending? + saw_paren = false; + return Some(()); + } + if !did_last { + // but did we account for the end empty string as if we're splitting? + did_last = true; + return Some(()); + } + return None; + } + Some(()) + }; + + while fetch_next_str(&mut s).is_some() { + if s.is_empty() && indent_level > 0 { // ")" indent_level -= 1; write!(formatted, ")").unwrap(); @@ -283,7 +479,7 @@ fn format_sexp_indented(sexp: &String, initial_indent_level: u32) -> String { has_field = false; } else { if indent_level > 0 { - writeln!(formatted, "").unwrap(); + writeln!(formatted).unwrap(); for _ in 0..indent_level { write!(formatted, " ").unwrap(); } @@ -292,20 +488,27 @@ fn format_sexp_indented(sexp: &String, initial_indent_level: u32) -> String { } // "(node_name" - write!(formatted, "{}", s).unwrap(); + write!(formatted, "{s}").unwrap(); // "(MISSING node_name" or "(UNEXPECTED 'x'" if s.starts_with("(MISSING") || s.starts_with("(UNEXPECTED") { - let s = s_iter.next().unwrap(); - write!(formatted, " {}", s).unwrap(); + fetch_next_str(&mut s).unwrap(); + if s.is_empty() { + while indent_level > 0 { + indent_level -= 1; + write!(formatted, ")").unwrap(); + } + } else { + write!(formatted, " {s}").unwrap(); + } } } else if s.ends_with(':') { // "field:" - writeln!(formatted, "").unwrap(); + writeln!(formatted).unwrap(); for _ in 0..indent_level { write!(formatted, " ").unwrap(); } - write!(formatted, "{} ", s).unwrap(); + write!(formatted, "{s} ").unwrap(); has_field = true; indent_level += 1; } @@ -314,27 +517,30 @@ fn format_sexp_indented(sexp: &String, initial_indent_level: u32) -> String { formatted } -fn write_tests(file_path: &Path, corrected_entries: &Vec<(String, String, String)>) -> Result<()> { +fn write_tests( + file_path: &Path, + corrected_entries: &[(String, String, String, usize, usize)], +) -> Result<()> { let mut buffer = fs::File::create(file_path)?; write_tests_to_buffer(&mut buffer, corrected_entries) } fn write_tests_to_buffer( buffer: &mut impl Write, - corrected_entries: &Vec<(String, String, String)>, + corrected_entries: &[(String, String, String, usize, usize)], ) -> Result<()> { - for (i, (name, input, output)) in corrected_entries.iter().enumerate() { + for (i, (name, input, output, header_delim_len, divider_delim_len)) in + corrected_entries.iter().enumerate() + { if i > 0 { - write!(buffer, "\n")?; + writeln!(buffer)?; } write!( buffer, - "{}\n{}\n{}\n{}\n{}\n\n{}\n", - "=".repeat(80), - name, - "=".repeat(80), - input, - "-".repeat(80), + "{}\n{name}\n{}\n{input}\n{}\n\n{}\n", + "=".repeat(*header_delim_len), + "=".repeat(*header_delim_len), + "-".repeat(*divider_delim_len), output.trim() )?; } @@ -351,11 +557,20 @@ pub fn parse_tests(path: &Path) -> io::Result { let mut children = Vec::new(); for entry in fs::read_dir(path)? { let entry = entry?; - let hidden = entry.file_name().to_str().unwrap_or("").starts_with("."); + let hidden = entry.file_name().to_str().unwrap_or("").starts_with('.'); if !hidden { - children.push(parse_tests(&entry.path())?); + children.push(entry.path()); } } + children.sort_by(|a, b| { + a.file_name() + .unwrap_or_default() + .cmp(b.file_name().unwrap_or_default()) + }); + let children = children + .iter() + .map(|path| parse_tests(path)) + .collect::>>()?; Ok(TestEntry::Group { name, children, @@ -363,15 +578,21 @@ pub fn parse_tests(path: &Path) -> io::Result { }) } else { let content = fs::read_to_string(path)?; - Ok(parse_test_content(name, content, Some(path.to_path_buf()))) + Ok(parse_test_content(name, &content, Some(path.to_path_buf()))) } } -pub fn strip_sexp_fields(sexp: String) -> String { - SEXP_FIELD_REGEX.replace_all(&sexp, " (").to_string() +#[must_use] +pub fn strip_sexp_fields(sexp: &str) -> String { + SEXP_FIELD_REGEX.replace_all(sexp, " (").to_string() +} + +#[must_use] +pub fn strip_points(sexp: &str) -> String { + POINT_REGEX.replace_all(sexp, "").to_string() } -fn parse_test_content(name: String, content: String, file_path: Option) -> TestEntry { +fn parse_test_content(name: String, content: &str, file_path: Option) -> TestEntry { let mut children = Vec::new(); let bytes = content.as_bytes(); let mut prev_name = String::new(); @@ -388,25 +609,84 @@ fn parse_test_content(name: String, content: String, file_path: Option) // Find all of the `===` test headers, which contain the test names. // Ignore any matches whose suffix does not match the first header // suffix in the file. - let header_matches = HEADER_REGEX.captures_iter(&bytes).filter_map(|c| { + let header_matches = HEADER_REGEX.captures_iter(bytes).filter_map(|c| { + let header_delim_len = c.name("equals").map_or(80, |m| m.as_bytes().len()); let suffix1 = c .name("suffix1") .map(|m| String::from_utf8_lossy(m.as_bytes())); let suffix2 = c .name("suffix2") .map(|m| String::from_utf8_lossy(m.as_bytes())); + + let (mut skip, mut platform, mut fail_fast, mut error, mut languages) = + (false, None, false, false, vec![]); + + let markers = c.name("markers").map_or("".as_bytes(), |m| m.as_bytes()); + + for marker in markers.split(|&c| c == b'\n').filter(|s| !s.is_empty()) { + let marker = str::from_utf8(marker).unwrap(); + let (marker, right) = marker.split_at(marker.find('(').unwrap_or(marker.len())); + match marker { + ":skip" => skip = true, + ":platform" => { + if let Some(platforms) = + right.strip_prefix('(').and_then(|s| s.strip_suffix(')')) + { + platform = Some( + platform.unwrap_or(false) || platforms.trim() == std::env::consts::OS, + ); + } + } + ":fail-fast" => fail_fast = true, + ":error" => error = true, + ":language" => { + if let Some(lang) = right.strip_prefix('(').and_then(|s| s.strip_suffix(')')) { + languages.push(lang.into()); + } + } + _ => {} + } + } + + // prefer skip over error, both shouldn't be set + if skip { + error = false; + } + + // add a default language if none are specified, will defer to the first language + if languages.is_empty() { + languages.push("".into()); + } + if suffix1 == first_suffix && suffix2 == first_suffix { let header_range = c.get(0).unwrap().range(); let test_name = c .name("test_name") .map(|c| String::from_utf8_lossy(c.as_bytes()).trim_end().to_string()); - Some((header_range, test_name)) + Some(( + header_delim_len, + header_range, + test_name, + TestAttributes { + skip, + platform: platform.unwrap_or(true), + fail_fast, + error, + languages, + }, + )) } else { None } }); - for (header_range, test_name) in header_matches.chain(Some((bytes.len()..bytes.len(), None))) { + let (mut prev_header_len, mut prev_attributes) = (80, TestAttributes::default()); + for (header_delim_len, header_range, test_name, attributes) in header_matches.chain(Some(( + 80, + bytes.len()..bytes.len(), + None, + TestAttributes::default(), + ))) { // Find the longest line of dashes following each test description. That line // separates the input from the expected output. Ignore any matches whose suffix // does not match the first suffix in the file. @@ -414,19 +694,23 @@ fn parse_test_content(name: String, content: String, file_path: Option) let divider_range = DIVIDER_REGEX .captures_iter(&bytes[prev_header_end..header_range.start]) .filter_map(|m| { + let divider_delim_len = m.name("hyphens").map_or(80, |m| m.as_bytes().len()); let suffix = m .name("suffix") .map(|m| String::from_utf8_lossy(m.as_bytes())); if suffix == first_suffix { let range = m.get(0).unwrap().range(); - Some((prev_header_end + range.start)..(prev_header_end + range.end)) + Some(( + divider_delim_len, + (prev_header_end + range.start)..(prev_header_end + range.end), + )) } else { None } }) - .max_by_key(|range| range.len()); + .max_by_key(|(_, range)| range.len()); - if let Some(divider_range) = divider_range { + if let Some((divider_delim_len, divider_range)) = divider_range { if let Ok(output) = str::from_utf8(&bytes[divider_range.end..header_range.start]) { let mut input = bytes[prev_header_end..divider_range.start].to_vec(); @@ -447,16 +731,23 @@ fn parse_test_content(name: String, content: String, file_path: Option) // fields will not be checked. let has_fields = SEXP_FIELD_REGEX.is_match(&output); - children.push(TestEntry::Example { + let t = TestEntry::Example { name: prev_name, input, output, + header_delim_len: prev_header_len, + divider_delim_len, has_fields, - }); + attributes: prev_attributes, + }; + + children.push(t); } } } + prev_attributes = attributes; prev_name = test_name.unwrap_or(String::new()); + prev_header_len = header_delim_len; prev_header_end = header_range.end; } TestEntry::Group { @@ -474,7 +765,7 @@ mod tests { fn test_parse_test_content_simple() { let entry = parse_test_content( "the-filename".to_string(), - r#" + r" =============== The first test =============== @@ -492,9 +783,8 @@ The second test d --- (d) - "# - .trim() - .to_string(), + " + .trim(), None, ); @@ -505,15 +795,21 @@ d children: vec![ TestEntry::Example { name: "The first test".to_string(), - input: "\na b c\n".as_bytes().to_vec(), + input: b"\na b c\n".to_vec(), output: "(a (b c))".to_string(), + header_delim_len: 15, + divider_delim_len: 3, has_fields: false, + attributes: TestAttributes::default(), }, TestEntry::Example { name: "The second test".to_string(), - input: "d".as_bytes().to_vec(), + input: b"d".to_vec(), output: "(d)".to_string(), + header_delim_len: 16, + divider_delim_len: 3, has_fields: false, + attributes: TestAttributes::default(), }, ], file_path: None, @@ -525,7 +821,7 @@ d fn test_parse_test_content_with_dashes_in_source_code() { let entry = parse_test_content( "the-filename".to_string(), - r#" + r" ================== Code with dashes ================== @@ -546,9 +842,8 @@ abc ------------------- (c (d)) - "# - .trim() - .to_string(), + " + .trim(), None, ); @@ -559,15 +854,21 @@ abc children: vec![ TestEntry::Example { name: "Code with dashes".to_string(), - input: "abc\n---\ndefg\n----\nhijkl".as_bytes().to_vec(), + input: b"abc\n---\ndefg\n----\nhijkl".to_vec(), output: "(a (b))".to_string(), + header_delim_len: 18, + divider_delim_len: 7, has_fields: false, + attributes: TestAttributes::default(), }, TestEntry::Example { name: "Code ending with dashes".to_string(), - input: "abc\n-----------".as_bytes().to_vec(), + input: b"abc\n-----------".to_vec(), output: "(c (d))".to_string(), + header_delim_len: 25, + divider_delim_len: 19, has_fields: false, + attributes: TestAttributes::default(), }, ], file_path: None, @@ -577,9 +878,10 @@ abc #[test] fn test_format_sexp() { + assert_eq!(format_sexp(""), ""); assert_eq!( - format_sexp(&"(a b: (c) (d) e: (f (g (h (MISSING i)))))".to_string()), - r#" + format_sexp("(a b: (c) (d) e: (f (g (h (MISSING i)))))"), + r" (a b: (c) (d) @@ -587,18 +889,39 @@ abc (g (h (MISSING i))))) -"# +" + .trim() + ); + assert_eq!(format_sexp("()"), "()"); + assert_eq!(format_sexp("(A (M (B)))"), "(A\n (M\n (B)))"); + assert_eq!(format_sexp("(A (U (B)))"), "(A\n (U\n (B)))"); + assert_eq!( + format_sexp("(program (ERROR (UNEXPECTED ' ')) (identifier))"), + r" +(program + (ERROR + (UNEXPECTED ' ')) + (identifier)) +" .trim() - .to_string() ); - assert_eq!(format_sexp(&"()".to_string()), "()".to_string()); assert_eq!( - format_sexp(&"(A (M (B)))".to_string()), - "(A\n (M\n (B)))" + format_sexp(r#"(source_file (MISSING ")"))"#), + r#" +(source_file + (MISSING ")")) + "# + .trim() ); assert_eq!( - format_sexp(&"(A (U (B)))".to_string()), - "(A\n (U\n (B)))" + format_sexp(r"(source_file (ERROR (UNEXPECTED 'f') (UNEXPECTED '+')))"), + r#" +(source_file + (ERROR + (UNEXPECTED 'f') + (UNEXPECTED '+'))) +"# + .trim() ); } @@ -610,17 +933,21 @@ abc "title 1".to_string(), "input 1".to_string(), "output 1".to_string(), + 80, + 80, ), ( "title 2".to_string(), "input 2".to_string(), "output 2".to_string(), + 80, + 80, ), ]; write_tests_to_buffer(&mut buffer, &corrected_entries).unwrap(); assert_eq!( String::from_utf8(buffer).unwrap(), - r#" + r" ================================================================================ title 1 ================================================================================ @@ -636,7 +963,7 @@ input 2 -------------------------------------------------------------------------------- output 2 -"# +" .trim_start() .to_string() ); @@ -663,7 +990,7 @@ code --- ; Line start comment -(a +(a ; ignore this (b) ; also ignore this @@ -677,8 +1004,7 @@ code (MISSING ";") "# - .trim() - .to_string(), + .trim(), None, ); @@ -689,21 +1015,30 @@ code children: vec![ TestEntry::Example { name: "sexp with comment".to_string(), - input: "code".as_bytes().to_vec(), + input: b"code".to_vec(), output: "(a (b))".to_string(), + header_delim_len: 18, + divider_delim_len: 3, has_fields: false, + attributes: TestAttributes::default(), }, TestEntry::Example { name: "sexp with comment between".to_string(), - input: "code".as_bytes().to_vec(), + input: b"code".to_vec(), output: "(a (b))".to_string(), + header_delim_len: 18, + divider_delim_len: 3, has_fields: false, + attributes: TestAttributes::default(), }, TestEntry::Example { name: "sexp with ';'".to_string(), - input: "code".as_bytes().to_vec(), + input: b"code".to_vec(), output: "(MISSING \";\")".to_string(), + header_delim_len: 25, + divider_delim_len: 3, has_fields: false, + attributes: TestAttributes::default(), } ], file_path: None, @@ -715,7 +1050,7 @@ code fn test_parse_test_content_with_suffixes() { let entry = parse_test_content( "the-filename".to_string(), - r#" + r" ==================asdf\()[]|{}*+?^$.- First test ==================asdf\()[]|{}*+?^$.- @@ -754,17 +1089,15 @@ NOT A TEST HEADER ---asdf\()[]|{}*+?^$.- (a) - "# - .trim() - .to_string(), + " + .trim(), None, ); - let expected_input = "\n=========================\n\ + let expected_input = b"\n=========================\n\ NOT A TEST HEADER\n\ =========================\n\ -------------------------\n" - .as_bytes() .to_vec(); assert_eq!( entry, @@ -775,19 +1108,28 @@ NOT A TEST HEADER name: "First test".to_string(), input: expected_input.clone(), output: "(a)".to_string(), + header_delim_len: 18, + divider_delim_len: 3, has_fields: false, + attributes: TestAttributes::default(), }, TestEntry::Example { name: "Second test".to_string(), input: expected_input.clone(), output: "(a)".to_string(), + header_delim_len: 18, + divider_delim_len: 3, has_fields: false, + attributes: TestAttributes::default(), }, TestEntry::Example { name: "Test name with = symbol".to_string(), - input: expected_input.clone(), + input: expected_input, output: "(a)".to_string(), + header_delim_len: 25, + divider_delim_len: 3, has_fields: false, + attributes: TestAttributes::default(), } ], file_path: None, @@ -799,7 +1141,7 @@ NOT A TEST HEADER fn test_parse_test_content_with_newlines_in_test_names() { let entry = parse_test_content( "the-filename".to_string(), - r#" + r" =============== name with @@ -815,8 +1157,7 @@ name with === signs code with ---- --- (d) -"# - .to_string(), +", None, ); @@ -830,13 +1171,133 @@ code with ---- name: "name\nwith\nnewlines".to_string(), input: b"a".to_vec(), output: "(b)".to_string(), + header_delim_len: 15, + divider_delim_len: 3, has_fields: false, + attributes: TestAttributes::default(), }, TestEntry::Example { name: "name with === signs".to_string(), input: b"code with ----".to_vec(), output: "(d)".to_string(), + header_delim_len: 20, + divider_delim_len: 3, + has_fields: false, + attributes: TestAttributes::default(), + } + ] + } + ); + } + + #[test] + fn test_parse_test_with_markers() { + // do one with :skip, we should not see it in the entry output + + let entry = parse_test_content( + "the-filename".to_string(), + r" +===================== +Test with skip marker +:skip +===================== +a +--- +(b) +", + None, + ); + + assert_eq!( + entry, + TestEntry::Group { + name: "the-filename".to_string(), + file_path: None, + children: vec![TestEntry::Example { + name: "Test with skip marker".to_string(), + input: b"a".to_vec(), + output: "(b)".to_string(), + header_delim_len: 21, + divider_delim_len: 3, + has_fields: false, + attributes: TestAttributes { + skip: true, + platform: true, + fail_fast: false, + error: false, + languages: vec!["".into()] + }, + }] + } + ); + + let entry = parse_test_content( + "the-filename".to_string(), + &format!( + r" +========================= +Test with platform marker +:platform({}) +:fail-fast +========================= +a +--- +(b) + +============================= +Test with bad platform marker +:platform({}) +:language(foo) +============================= +a +--- +(b) +", + std::env::consts::OS, + if std::env::consts::OS == "linux" { + "macos" + } else { + "linux" + } + ), + None, + ); + + assert_eq!( + entry, + TestEntry::Group { + name: "the-filename".to_string(), + file_path: None, + children: vec![ + TestEntry::Example { + name: "Test with platform marker".to_string(), + input: b"a".to_vec(), + output: "(b)".to_string(), + header_delim_len: 25, + divider_delim_len: 3, + has_fields: false, + attributes: TestAttributes { + skip: false, + platform: true, + fail_fast: true, + error: false, + languages: vec!["".into()] + }, + }, + TestEntry::Example { + name: "Test with bad platform marker".to_string(), + input: b"a".to_vec(), + output: "(b)".to_string(), + header_delim_len: 29, + divider_delim_len: 3, has_fields: false, + attributes: TestAttributes { + skip: false, + platform: false, + fail_fast: false, + error: false, + languages: vec!["foo".into()] + }, } ] } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/test_highlight.rs b/third-party/tree-sitter/tree-sitter/cli/src/test_highlight.rs index 2d9d536a94..919d78643a 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/test_highlight.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/test_highlight.rs @@ -1,11 +1,16 @@ -use crate::query_testing::{parse_position_comments, Assertion}; -use ansi_term::Colour; -use anyhow::{anyhow, Result}; use std::fs; use std::path::Path; + +use ansi_term::Colour; +use anyhow::{anyhow, Result}; use tree_sitter::Point; use tree_sitter_highlight::{Highlight, HighlightConfiguration, HighlightEvent, Highlighter}; -use tree_sitter_loader::Loader; +use tree_sitter_loader::{Config, Loader}; + +use super::{ + query_testing::{parse_position_comments, Assertion}, + util, +}; #[derive(Debug)] pub struct Failure { @@ -31,49 +36,91 @@ impl std::fmt::Display for Failure { if i > 0 { write!(f, ", ")?; } - write!(f, "'{}'", actual_highlight)?; + write!(f, "'{actual_highlight}'")?; } } Ok(()) } } -pub fn test_highlights(loader: &Loader, directory: &Path) -> Result<()> { +pub fn test_highlights( + loader: &Loader, + loader_config: &Config, + highlighter: &mut Highlighter, + directory: &Path, +) -> Result<()> { + println!("syntax highlighting:"); + test_highlights_indented(loader, loader_config, highlighter, directory, 2) +} + +fn test_highlights_indented( + loader: &Loader, + loader_config: &Config, + highlighter: &mut Highlighter, + directory: &Path, + indent_level: usize, +) -> Result<()> { let mut failed = false; - let mut highlighter = Highlighter::new(); - println!("syntax highlighting:"); for highlight_test_file in fs::read_dir(directory)? { let highlight_test_file = highlight_test_file?; let test_file_path = highlight_test_file.path(); let test_file_name = highlight_test_file.file_name(); - let (language, language_config) = loader - .language_configuration_for_file_name(&test_file_path)? - .ok_or_else(|| anyhow!("No language found for path {:?}", test_file_path))?; - let highlight_config = language_config - .highlight_config(language)? - .ok_or_else(|| anyhow!("No highlighting config found for {:?}", test_file_path))?; - match test_highlight( - &loader, - &mut highlighter, - highlight_config, - fs::read(&test_file_path)?.as_slice(), - ) { - Ok(assertion_count) => { - println!( - " ✓ {} ({} assertions)", - Colour::Green.paint(test_file_name.to_string_lossy().as_ref()), - assertion_count - ); - } - Err(e) => { - println!( - " ✗ {}", - Colour::Red.paint(test_file_name.to_string_lossy().as_ref()) - ); - println!(" {}", e); + print!( + "{indent:indent_level$}", + indent = "", + indent_level = indent_level * 2 + ); + if test_file_path.is_dir() && test_file_path.read_dir()?.next().is_some() { + println!("{}:", test_file_name.into_string().unwrap()); + if test_highlights_indented( + loader, + loader_config, + highlighter, + &test_file_path, + indent_level + 1, + ) + .is_err() + { failed = true; } + } else { + let (language, language_config) = loader + .language_configuration_for_file_name(&test_file_path)? + .ok_or_else(|| { + anyhow!( + "{}", + util::lang_not_found_for_path(test_file_path.as_path(), loader_config) + ) + })?; + let highlight_config = language_config + .highlight_config(language, None)? + .ok_or_else(|| anyhow!("No highlighting config found for {test_file_path:?}"))?; + match test_highlight( + loader, + highlighter, + highlight_config, + fs::read(&test_file_path)?.as_slice(), + ) { + Ok(assertion_count) => { + println!( + "✓ {} ({assertion_count} assertions)", + Colour::Green.paint(test_file_name.to_string_lossy().as_ref()), + ); + } + Err(e) => { + println!( + "✗ {}", + Colour::Red.paint(test_file_name.to_string_lossy().as_ref()) + ); + println!( + "{indent:indent_level$} {e}", + indent = "", + indent_level = indent_level * 2 + ); + failed = true; + } + } } } @@ -84,55 +131,53 @@ pub fn test_highlights(loader: &Loader, directory: &Path) -> Result<()> { } } pub fn iterate_assertions( - assertions: &Vec, - highlights: &Vec<(Point, Point, Highlight)>, - highlight_names: &Vec, + assertions: &[Assertion], + highlights: &[(Point, Point, Highlight)], + highlight_names: &[String], ) -> Result { // Iterate through all of the highlighting assertions, checking each one against the // actual highlights. let mut i = 0; - let mut actual_highlights = Vec::<&String>::new(); + let mut actual_highlights = Vec::new(); for Assertion { position, + negative, expected_capture_name: expected_highlight, } in assertions { let mut passed = false; actual_highlights.clear(); - 'highlight_loop: loop { - // The assertions are ordered by position, so skip past all of the highlights that - // end at or before this assertion's position. - if let Some(highlight) = highlights.get(i) { - if highlight.1 <= *position { - i += 1; - continue; - } - - // Iterate through all of the highlights that start at or before this assertion's, - // position, looking for one that matches the assertion. - let mut j = i; - while let (false, Some(highlight)) = (passed, highlights.get(j)) { - if highlight.0 > *position { - break 'highlight_loop; - } + // The assertions are ordered by position, so skip past all of the highlights that + // end at or before this assertion's position. + 'highlight_loop: while let Some(highlight) = highlights.get(i) { + if highlight.1 <= *position { + i += 1; + continue; + } - // If the highlight matches the assertion, this test passes. Otherwise, - // add this highlight to the list of actual highlights that span the - // assertion's position, in order to generate an error message in the event - // of a failure. - let highlight_name = &highlight_names[(highlight.2).0]; - if *highlight_name == *expected_highlight { - passed = true; - break 'highlight_loop; - } else { - actual_highlights.push(highlight_name); - } + // Iterate through all of the highlights that start at or before this assertion's, + // position, looking for one that matches the assertion. + let mut j = i; + while let (false, Some(highlight)) = (passed, highlights.get(j)) { + if highlight.0 > *position { + break 'highlight_loop; + } - j += 1; + // If the highlight matches the assertion, or if the highlight doesn't + // match the assertion but it's negative, this test passes. Otherwise, + // add this highlight to the list of actual highlights that span the + // assertion's position, in order to generate an error message in the event + // of a failure. + let highlight_name = &highlight_names[(highlight.2).0]; + if (*highlight_name == *expected_highlight) == *negative { + actual_highlights.push(highlight_name); + } else { + passed = true; + break 'highlight_loop; } - } else { - break; + + j += 1; } } @@ -160,70 +205,9 @@ pub fn test_highlight( let highlight_names = loader.highlight_names(); let highlights = get_highlight_positions(loader, highlighter, highlight_config, source)?; let assertions = - parse_position_comments(highlighter.parser(), highlight_config.language, source)?; - - iterate_assertions(&assertions, &highlights, &highlight_names)?; + parse_position_comments(highlighter.parser(), &highlight_config.language, source)?; - // Iterate through all of the highlighting assertions, checking each one against the - // actual highlights. - let mut i = 0; - let mut actual_highlights = Vec::<&String>::new(); - for Assertion { - position, - expected_capture_name: expected_highlight, - } in &assertions - { - let mut passed = false; - actual_highlights.clear(); - - 'highlight_loop: loop { - // The assertions are ordered by position, so skip past all of the highlights that - // end at or before this assertion's position. - if let Some(highlight) = highlights.get(i) { - if highlight.1 <= *position { - i += 1; - continue; - } - - // Iterate through all of the highlights that start at or before this assertion's, - // position, looking for one that matches the assertion. - let mut j = i; - while let (false, Some(highlight)) = (passed, highlights.get(j)) { - if highlight.0 > *position { - break 'highlight_loop; - } - - // If the highlight matches the assertion, this test passes. Otherwise, - // add this highlight to the list of actual highlights that span the - // assertion's position, in order to generate an error message in the event - // of a failure. - let highlight_name = &highlight_names[(highlight.2).0]; - if *highlight_name == *expected_highlight { - passed = true; - break 'highlight_loop; - } else { - actual_highlights.push(highlight_name); - } - - j += 1; - } - } else { - break; - } - } - - if !passed { - return Err(Failure { - row: position.row, - column: position.column, - expected_highlight: expected_highlight.clone(), - actual_highlights: actual_highlights.into_iter().cloned().collect(), - } - .into()); - } - } - - Ok(assertions.len()) + iterate_assertions(&assertions, &highlights, &highlight_names) } pub fn get_highlight_positions( @@ -268,7 +252,7 @@ pub fn get_highlight_positions( } } if let Some(highlight) = highlight_stack.last() { - result.push((start_position, Point::new(row, column), *highlight)) + result.push((start_position, Point::new(row, column), *highlight)); } } } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/test_tags.rs b/third-party/tree-sitter/tree-sitter/cli/src/test_tags.rs index 024d094c9d..11395e1019 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/test_tags.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/test_tags.rs @@ -1,12 +1,17 @@ -use crate::query_testing::{parse_position_comments, Assertion}; -use ansi_term::Colour; -use anyhow::{anyhow, Result}; use std::fs; use std::path::Path; + +use ansi_term::Colour; +use anyhow::{anyhow, Result}; use tree_sitter::Point; -use tree_sitter_loader::Loader; +use tree_sitter_loader::{Config, Loader}; use tree_sitter_tags::{TagsConfiguration, TagsContext}; +use super::{ + query_testing::{parse_position_comments, Assertion}, + util, +}; + #[derive(Debug)] pub struct Failure { row: usize, @@ -31,16 +36,20 @@ impl std::fmt::Display for Failure { if i > 0 { write!(f, ", ")?; } - write!(f, "'{}'", actual_tag)?; + write!(f, "'{actual_tag}'")?; } } Ok(()) } } -pub fn test_tags(loader: &Loader, directory: &Path) -> Result<()> { +pub fn test_tags( + loader: &Loader, + loader_config: &Config, + tags_context: &mut TagsContext, + directory: &Path, +) -> Result<()> { let mut failed = false; - let mut tags_context = TagsContext::new(); println!("tags:"); for tag_test_file in fs::read_dir(directory)? { @@ -49,20 +58,24 @@ pub fn test_tags(loader: &Loader, directory: &Path) -> Result<()> { let test_file_name = tag_test_file.file_name(); let (language, language_config) = loader .language_configuration_for_file_name(&test_file_path)? - .ok_or_else(|| anyhow!("No language found for path {:?}", test_file_path))?; + .ok_or_else(|| { + anyhow!( + "{}", + util::lang_not_found_for_path(test_file_path.as_path(), loader_config) + ) + })?; let tags_config = language_config .tags_config(language)? .ok_or_else(|| anyhow!("No tags config found for {:?}", test_file_path))?; match test_tag( - &mut tags_context, + tags_context, tags_config, fs::read(&test_file_path)?.as_slice(), ) { Ok(assertion_count) => { println!( - " ✓ {} ({} assertions)", + " ✓ {} ({assertion_count} assertions)", Colour::Green.paint(test_file_name.to_string_lossy().as_ref()), - assertion_count ); } Err(e) => { @@ -70,7 +83,7 @@ pub fn test_tags(loader: &Loader, directory: &Path) -> Result<()> { " ✗ {}", Colour::Red.paint(test_file_name.to_string_lossy().as_ref()) ); - println!(" {}", e); + println!(" {e}"); failed = true; } } @@ -89,45 +102,45 @@ pub fn test_tag( source: &[u8], ) -> Result { let tags = get_tag_positions(tags_context, tags_config, source)?; - let assertions = parse_position_comments(tags_context.parser(), tags_config.language, source)?; + let assertions = parse_position_comments(tags_context.parser(), &tags_config.language, source)?; // Iterate through all of the assertions, checking against the actual tags. let mut i = 0; let mut actual_tags = Vec::<&String>::new(); for Assertion { position, + negative, expected_capture_name: expected_tag, } in &assertions { let mut passed = false; - 'tag_loop: loop { - if let Some(tag) = tags.get(i) { - if tag.1 <= *position { - i += 1; - continue; + 'tag_loop: while let Some(tag) = tags.get(i) { + if tag.1 <= *position { + i += 1; + continue; + } + + // Iterate through all of the tags that start at or before this assertion's + // position, looking for one that matches the assertion + let mut j = i; + while let (false, Some(tag)) = (passed, tags.get(j)) { + if tag.0 > *position { + break 'tag_loop; } - // Iterate through all of the tags that start at or before this assertion's - // position, looking for one that matches the assertion - let mut j = i; - while let (false, Some(tag)) = (passed, tags.get(j)) { - if tag.0 > *position { - break 'tag_loop; - } - - let tag_name = &tag.2; - if *tag_name == *expected_tag { - passed = true; - break 'tag_loop; - } else { - actual_tags.push(tag_name); - } - - j += 1; + let tag_name = &tag.2; + if (*tag_name == *expected_tag) == *negative { + actual_tags.push(tag_name); + } else { + passed = true; + break 'tag_loop; + } + + j += 1; + if tag == tags.last().unwrap() { + break 'tag_loop; } - } else { - break; } } @@ -150,15 +163,15 @@ pub fn get_tag_positions( tags_config: &TagsConfiguration, source: &[u8], ) -> Result> { - let (tags_iter, _has_error) = tags_context.generate_tags(&tags_config, &source, None)?; + let (tags_iter, _has_error) = tags_context.generate_tags(tags_config, source, None)?; let tag_positions = tags_iter - .filter_map(|t| t.ok()) + .filter_map(std::result::Result::ok) .map(|tag| { let tag_postfix = tags_config.syntax_type_name(tag.syntax_type_id).to_string(); let tag_name = if tag.is_definition { - format!("definition.{}", tag_postfix) + format!("definition.{tag_postfix}") } else { - format!("reference.{}", tag_postfix) + format!("reference.{tag_postfix}") }; (tag.span.start, tag.span.end, tag_name) }) diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/async_context_test.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/async_context_test.rs new file mode 100644 index 0000000000..db9bedd411 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/async_context_test.rs @@ -0,0 +1,280 @@ +use super::helpers::fixtures::get_language; +use std::future::Future; +use std::pin::{pin, Pin}; +use std::ptr; +use std::task::{self, Context, Poll, RawWaker, RawWakerVTable, Waker}; +use tree_sitter::Parser; + +#[test] +fn test_node_in_fut() { + let (ret, pended) = tokio_like_spawn(async { + let mut parser = Parser::new(); + let language = get_language("bash"); + parser.set_language(&language).unwrap(); + + let tree = parser.parse("#", None).unwrap(); + + let root = tree.root_node(); + let root_ref = &root; + + let fut_val_fn = || async { + // eprintln!("fut_val_fn: {}", root.child(0).unwrap().kind()); + yield_now().await; + root.child(0).unwrap().kind() + }; + + yield_now().await; + + let fut_ref_fn = || async { + // eprintln!("fut_ref_fn: {}", root_ref.child(0).unwrap().kind()); + yield_now().await; + root_ref.child(0).unwrap().kind() + }; + + let f1 = fut_val_fn().await; + let f2 = fut_ref_fn().await; + assert_eq!(f1, f2); + + let fut_val = async { + // eprintln!("fut_val: {}", root.child(0).unwrap().kind()); + yield_now().await; + root.child(0).unwrap().kind() + }; + + let fut_ref = async { + // eprintln!("fut_ref: {}", root_ref.child(0).unwrap().kind()); + yield_now().await; + root_ref.child(0).unwrap().kind() + }; + + let f1 = fut_val.await; + let f2 = fut_ref.await; + assert_eq!(f1, f2); + + f1 + }) + .join(); + // eprintln!("pended: {pended:?}"); + assert_eq!(ret, "comment"); + assert_eq!(pended, 5); +} + +#[test] +fn test_node_and_cursor_ref_in_fut() { + let ((), pended) = tokio_like_spawn(async { + let mut parser = Parser::new(); + let language = get_language("c"); + parser.set_language(&language).unwrap(); + + let tree = parser.parse("#", None).unwrap(); + + let root = tree.root_node(); + let root_ref = &root; + + let mut cursor = tree.walk(); + let cursor_ref = &mut cursor; + + cursor_ref.goto_first_child(); + + let fut_val = async { + yield_now().await; + let _ = root.to_sexp(); + }; + + yield_now().await; + + let fut_ref = async { + yield_now().await; + let _ = root_ref.to_sexp(); + cursor_ref.goto_first_child(); + }; + + fut_val.await; + fut_ref.await; + + cursor_ref.goto_first_child(); + }) + .join(); + assert_eq!(pended, 3); +} + +#[test] +fn test_node_and_cursor_ref_in_fut_with_fut_fabrics() { + let ((), pended) = tokio_like_spawn(async { + let mut parser = Parser::new(); + let language = get_language("javascript"); + parser.set_language(&language).unwrap(); + + let tree = parser.parse("#", None).unwrap(); + + let root = tree.root_node(); + let root_ref = &root; + + let mut cursor = tree.walk(); + let cursor_ref = &mut cursor; + + cursor_ref.goto_first_child(); + + let fut_val = || async { + yield_now().await; + let _ = root.to_sexp(); + }; + + yield_now().await; + + let fut_ref = || async move { + yield_now().await; + let _ = root_ref.to_sexp(); + cursor_ref.goto_first_child(); + }; + + fut_val().await; + fut_val().await; + fut_ref().await; + }) + .join(); + assert_eq!(pended, 4); +} + +#[test] +fn test_node_and_cursor_ref_in_fut_with_inner_spawns() { + let (ret, pended) = tokio_like_spawn(async { + let mut parser = Parser::new(); + let language = get_language("rust"); + parser.set_language(&language).unwrap(); + + let tree = parser.parse("#", None).unwrap(); + + let mut cursor = tree.walk(); + let cursor_ref = &mut cursor; + + cursor_ref.goto_first_child(); + + let fut_val = || { + let tree = tree.clone(); + async move { + let root = tree.root_node(); + let mut cursor = tree.walk(); + let cursor_ref = &mut cursor; + yield_now().await; + let _ = root.to_sexp(); + cursor_ref.goto_first_child(); + } + }; + + yield_now().await; + + let fut_ref = || { + let tree = tree.clone(); + async move { + let root = tree.root_node(); + let root_ref = &root; + let mut cursor = tree.walk(); + let cursor_ref = &mut cursor; + yield_now().await; + let _ = root_ref.to_sexp(); + cursor_ref.goto_first_child(); + } + }; + + let ((), p1) = tokio_like_spawn(fut_val()).await.unwrap(); + let ((), p2) = tokio_like_spawn(fut_ref()).await.unwrap(); + + cursor_ref.goto_first_child(); + + fut_val().await; + fut_val().await; + fut_ref().await; + + cursor_ref.goto_first_child(); + + p1 + p2 + }) + .join(); + assert_eq!(pended, 4); + assert_eq!(ret, 2); +} + +fn tokio_like_spawn(future: T) -> JoinHandle<(T::Output, usize)> +where + T: Future + Send + 'static, + T::Output: Send + 'static, +{ + // No runtime, just noop waker + + let waker = noop_waker(); + let mut cx = task::Context::from_waker(&waker); + + let mut pending = 0; + let mut future = pin!(future); + let ret = loop { + match future.as_mut().poll(&mut cx) { + Poll::Pending => pending += 1, + Poll::Ready(r) => { + // eprintln!("ready, pended: {pending}"); + break r; + } + } + }; + JoinHandle::new((ret, pending)) +} + +async fn yield_now() { + struct SimpleYieldNow { + yielded: bool, + } + + impl Future for SimpleYieldNow { + type Output = (); + + fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<()> { + cx.waker().wake_by_ref(); + if self.yielded { + return Poll::Ready(()); + } + self.yielded = true; + Poll::Pending + } + } + + SimpleYieldNow { yielded: false }.await; +} + +pub fn noop_waker() -> Waker { + const VTABLE: RawWakerVTable = RawWakerVTable::new( + // Cloning just returns a new no-op raw waker + |_| RAW, + // `wake` does nothing + |_| {}, + // `wake_by_ref` does nothing + |_| {}, + // Dropping does nothing as we don't allocate anything + |_| {}, + ); + const RAW: RawWaker = RawWaker::new(ptr::null(), &VTABLE); + unsafe { Waker::from_raw(RAW) } +} + +struct JoinHandle { + data: Option, +} + +impl JoinHandle { + #[must_use] + const fn new(data: T) -> Self { + Self { data: Some(data) } + } + + fn join(&mut self) -> T { + self.data.take().unwrap() + } +} + +impl Future for JoinHandle { + type Output = std::result::Result; + + fn poll(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll { + let data = self.get_mut().data.take().unwrap(); + Poll::Ready(Ok(data)) + } +} diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/corpus_test.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/corpus_test.rs index b818b2c155..057a672f94 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/tests/corpus_test.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/corpus_test.rs @@ -1,7 +1,7 @@ use super::helpers::{ allocations, edits::{get_random_edit, invert_edit}, - fixtures::{fixtures_dir, get_language, get_test_language}, + fixtures::{fixtures_dir, get_language, get_test_language, SCRATCH_BASE_DIR}, new_seed, random::Rand, scope_sequence::ScopeSequence, @@ -14,85 +14,121 @@ use crate::{ test::{parse_tests, print_diff, print_diff_key, strip_sexp_fields, TestEntry}, util, }; -use proc_macro::test_with_seed; -use std::{env, fs}; +use std::{collections::HashMap, env, fs}; use tree_sitter::{LogType, Node, Parser, Point, Range, Tree}; +use tree_sitter_proc_macro::test_with_seed; #[test_with_seed(retry=10, seed=*START_SEED, seed_fn=new_seed)] fn test_corpus_for_bash(seed: usize) { - test_language_corpus(seed, "bash"); + test_language_corpus( + "bash", + seed, + Some(&[ + // Fragile tests where edit customization changes + // lead to significant parse tree structure changes. + "bash - corpus - commands - Nested Heredocs", + "bash - corpus - commands - Quoted Heredocs", + "bash - corpus - commands - Heredocs with weird characters", + ]), + None, + ); } #[test_with_seed(retry=10, seed=*START_SEED, seed_fn=new_seed)] fn test_corpus_for_c(seed: usize) { - test_language_corpus(seed, "c"); + test_language_corpus("c", seed, None, None); } #[test_with_seed(retry=10, seed=*START_SEED, seed_fn=new_seed)] fn test_corpus_for_cpp(seed: usize) { - test_language_corpus(seed, "cpp"); + test_language_corpus("cpp", seed, None, None); } #[test_with_seed(retry=10, seed=*START_SEED, seed_fn=new_seed)] fn test_corpus_for_embedded_template(seed: usize) { - test_language_corpus(seed, "embedded-template"); + test_language_corpus("embedded-template", seed, None, None); } #[test_with_seed(retry=10, seed=*START_SEED, seed_fn=new_seed)] fn test_corpus_for_go(seed: usize) { - test_language_corpus(seed, "go"); + test_language_corpus("go", seed, None, None); } #[test_with_seed(retry=10, seed=*START_SEED, seed_fn=new_seed)] fn test_corpus_for_html(seed: usize) { - test_language_corpus(seed, "html"); + test_language_corpus("html", seed, None, None); +} + +#[test_with_seed(retry=10, seed=*START_SEED, seed_fn=new_seed)] +fn test_corpus_for_java(seed: usize) { + test_language_corpus("java", seed, None, None); } #[test_with_seed(retry=10, seed=*START_SEED, seed_fn=new_seed)] fn test_corpus_for_javascript(seed: usize) { - test_language_corpus(seed, "javascript"); + test_language_corpus("javascript", seed, None, None); } #[test_with_seed(retry=10, seed=*START_SEED, seed_fn=new_seed)] fn test_corpus_for_json(seed: usize) { - test_language_corpus(seed, "json"); + test_language_corpus("json", seed, None, None); } #[test_with_seed(retry=10, seed=*START_SEED, seed_fn=new_seed)] fn test_corpus_for_php(seed: usize) { - test_language_corpus(seed, "php"); + test_language_corpus("php", seed, None, Some("php")); } #[test_with_seed(retry=10, seed=*START_SEED, seed_fn=new_seed)] fn test_corpus_for_python(seed: usize) { - test_language_corpus(seed, "python"); + test_language_corpus("python", seed, None, None); } #[test_with_seed(retry=10, seed=*START_SEED, seed_fn=new_seed)] fn test_corpus_for_ruby(seed: usize) { - test_language_corpus(seed, "ruby"); + test_language_corpus("ruby", seed, None, None); } #[test_with_seed(retry=10, seed=*START_SEED, seed_fn=new_seed)] fn test_corpus_for_rust(seed: usize) { - test_language_corpus(seed, "rust"); + test_language_corpus("rust", seed, None, None); +} + +#[test_with_seed(retry=10, seed=*START_SEED, seed_fn=new_seed)] +fn test_corpus_for_typescript(seed: usize) { + test_language_corpus("typescript", seed, None, Some("typescript")); } -fn test_language_corpus(start_seed: usize, language_name: &str) { +#[test_with_seed(retry=10, seed=*START_SEED, seed_fn=new_seed)] +fn test_corpus_for_tsx(seed: usize) { + test_language_corpus("typescript", seed, None, Some("tsx")); +} + +fn test_language_corpus( + language_name: &str, + start_seed: usize, + skipped: Option<&[&str]>, + subdir: Option<&str>, +) { + let subdir = subdir.unwrap_or_default(); + let grammars_dir = fixtures_dir().join("grammars"); let error_corpus_dir = fixtures_dir().join("error_corpus"); let template_corpus_dir = fixtures_dir().join("template_corpus"); - let mut corpus_dir = grammars_dir.join(language_name).join("corpus"); + let mut corpus_dir = grammars_dir.join(language_name).join(subdir).join("corpus"); if !corpus_dir.is_dir() { - corpus_dir = grammars_dir.join(language_name).join("test").join("corpus"); + corpus_dir = grammars_dir + .join(language_name) + .join(subdir) + .join("test") + .join("corpus"); } - let error_corpus_file = error_corpus_dir.join(&format!("{}_errors.txt", language_name)); - let template_corpus_file = - template_corpus_dir.join(&format!("{}_templates.txt", language_name)); + let error_corpus_file = error_corpus_dir.join(format!("{language_name}_errors.txt")); + let template_corpus_file = template_corpus_dir.join(format!("{language_name}_templates.txt")); let main_tests = parse_tests(&corpus_dir).unwrap(); - let error_tests = parse_tests(&error_corpus_file).unwrap_or(TestEntry::default()); - let template_tests = parse_tests(&template_corpus_file).unwrap_or(TestEntry::default()); + let error_tests = parse_tests(&error_corpus_file).unwrap_or_default(); + let template_tests = parse_tests(&template_corpus_file).unwrap_or_default(); let mut tests = flatten_tests(main_tests); tests.extend(flatten_tests(error_tests)); tests.extend(flatten_tests(template_tests).into_iter().map(|mut t| { @@ -100,35 +136,53 @@ fn test_language_corpus(start_seed: usize, language_name: &str) { t })); - let language = get_language(language_name); + let mut skipped = skipped.map(|x| x.iter().map(|x| (*x, 0)).collect::>()); + + let language_path = if subdir.is_empty() { + language_name.to_string() + } else { + format!("{language_name}/{subdir}") + }; + let language = get_language(&language_path); let mut failure_count = 0; let log_seed = env::var("TREE_SITTER_LOG_SEED").is_ok(); + let dump_edits = env::var("TREE_SITTER_DUMP_EDITS").is_ok(); + + if log_seed { + println!(" start seed: {start_seed}"); + } println!(); - for test in tests { - println!(" {} example - {}", language_name, test.name); + for (test_index, test) in tests.iter().enumerate() { + let test_name = format!("{language_name} - {}", test.name); + if let Some(skipped) = skipped.as_mut() { + if let Some(counter) = skipped.get_mut(test_name.as_str()) { + println!(" {test_index}. {test_name} - SKIPPED"); + *counter += 1; + continue; + } + } + + println!(" {test_index}. {test_name}"); let passed = allocations::record(|| { let mut log_session = None; let mut parser = get_parser(&mut log_session, "log.html"); - parser.set_language(language).unwrap(); + parser.set_language(&language).unwrap(); set_included_ranges(&mut parser, &test.input, test.template_delimiters); let tree = parser.parse(&test.input, None).unwrap(); let mut actual_output = tree.root_node().to_sexp(); if !test.has_fields { - actual_output = strip_sexp_fields(actual_output); + actual_output = strip_sexp_fields(&actual_output); } if actual_output != test.output { - println!( - "Incorrect initial parse for {} - {}", - language_name, test.name, - ); + println!("Incorrect initial parse for {test_name}"); print_diff_key(); print_diff(&actual_output, &test.output); - println!(""); + println!(); return false; } @@ -141,7 +195,7 @@ fn test_language_corpus(start_seed: usize, language_name: &str) { } let mut parser = Parser::new(); - parser.set_language(language).unwrap(); + parser.set_language(&language).unwrap(); let tree = parser.parse(&test.input, None).unwrap(); drop(parser); @@ -151,7 +205,7 @@ fn test_language_corpus(start_seed: usize, language_name: &str) { let mut rand = Rand::new(seed); let mut log_session = None; let mut parser = get_parser(&mut log_session, "log.html"); - parser.set_language(language).unwrap(); + parser.set_language(&language).unwrap(); let mut tree = tree.clone(); let mut input = test.input.clone(); @@ -164,11 +218,20 @@ fn test_language_corpus(start_seed: usize, language_name: &str) { for _ in 0..1 + rand.unsigned(*EDIT_COUNT) { let edit = get_random_edit(&mut rand, &input); undo_stack.push(invert_edit(&input, &edit)); - perform_edit(&mut tree, &mut input, &edit); + perform_edit(&mut tree, &mut input, &edit).unwrap(); } if log_seed { - println!(" seed: {}", seed); + println!(" {test_index}.{trial:<2} seed: {seed}"); + } + + if dump_edits { + fs::write( + SCRATCH_BASE_DIR + .join(format!("edit.{seed}.{test_index}.{trial} {test_name}")), + &input, + ) + .unwrap(); } if *LOG_GRAPH_ENABLED { @@ -187,7 +250,7 @@ fn test_language_corpus(start_seed: usize, language_name: &str) { // Undo all of the edits and re-parse again. while let Some(edit) = undo_stack.pop() { - perform_edit(&mut tree2, &mut input, &edit); + perform_edit(&mut tree2, &mut input, &edit).unwrap(); } if *LOG_GRAPH_ENABLED { eprintln!("{}\n", String::from_utf8_lossy(&input)); @@ -199,17 +262,14 @@ fn test_language_corpus(start_seed: usize, language_name: &str) { // Verify that the final tree matches the expectation from the corpus. let mut actual_output = tree3.root_node().to_sexp(); if !test.has_fields { - actual_output = strip_sexp_fields(actual_output); + actual_output = strip_sexp_fields(&actual_output); } if actual_output != test.output { - println!( - "Incorrect parse for {} - {} - seed {}", - language_name, test.name, seed - ); + println!("Incorrect parse for {test_name} - seed {seed}"); print_diff_key(); print_diff(&actual_output, &test.output); - println!(""); + println!(); return false; } @@ -230,8 +290,21 @@ fn test_language_corpus(start_seed: usize, language_name: &str) { } } - if failure_count > 0 { - panic!("{} {} corpus tests failed", failure_count, language_name); + assert!( + failure_count == 0, + "{failure_count} {language_name} corpus tests failed" + ); + + if let Some(skipped) = skipped.as_mut() { + skipped.retain(|_, v| *v == 0); + + if !skipped.is_empty() { + println!("Non matchable skip definitions:"); + for k in skipped.keys() { + println!(" {k}"); + } + panic!("Non matchable skip definitions needs to be removed"); + } } } @@ -240,7 +313,7 @@ fn test_feature_corpus_files() { let test_grammars_dir = fixtures_dir().join("test_grammars"); let mut failure_count = 0; - for entry in fs::read_dir(&test_grammars_dir).unwrap() { + for entry in fs::read_dir(test_grammars_dir).unwrap() { let entry = entry.unwrap(); if !entry.metadata().unwrap().is_dir() { continue; @@ -260,7 +333,7 @@ fn test_feature_corpus_files() { grammar_path = test_path.join("grammar.json"); } let error_message_path = test_path.join("expected_error.txt"); - let grammar_json = generate::load_grammar_file(&grammar_path).unwrap(); + let grammar_json = generate::load_grammar_file(&grammar_path, None).unwrap(); let generate_result = generate::generate_parser_for_grammar(&grammar_json); if error_message_path.exists() { @@ -268,7 +341,7 @@ fn test_feature_corpus_files() { continue; } - eprintln!("test language: {:?}", language_name); + eprintln!("test language: {language_name:?}"); let expected_message = fs::read_to_string(&error_message_path) .unwrap() @@ -277,24 +350,17 @@ fn test_feature_corpus_files() { let actual_message = e.to_string().replace("\r\n", "\n"); if expected_message != actual_message { eprintln!( - "Unexpected error message.\n\nExpected:\n\n{}\nActual:\n\n{}\n", - expected_message, actual_message + "Unexpected error message.\n\nExpected:\n\n{expected_message}\nActual:\n\n{actual_message}\n", ); failure_count += 1; } } else { - eprintln!( - "Expected error message but got none for test grammar '{}'", - language_name - ); + eprintln!("Expected error message but got none for test grammar '{language_name}'",); failure_count += 1; } } else { if let Err(e) = &generate_result { - eprintln!( - "Unexpected error for test grammar '{}':\n{}", - language_name, e - ); + eprintln!("Unexpected error for test grammar '{language_name}':\n{e}",); failure_count += 1; continue; } @@ -306,7 +372,7 @@ fn test_feature_corpus_files() { let tests = flatten_tests(test); if !tests.is_empty() { - eprintln!("test language: {:?}", language_name); + eprintln!("test language: {language_name:?}"); } for test in tests { @@ -315,18 +381,18 @@ fn test_feature_corpus_files() { let passed = allocations::record(|| { let mut log_session = None; let mut parser = get_parser(&mut log_session, "log.html"); - parser.set_language(language).unwrap(); + parser.set_language(&language).unwrap(); let tree = parser.parse(&test.input, None).unwrap(); let mut actual_output = tree.root_node().to_sexp(); if !test.has_fields { - actual_output = strip_sexp_fields(actual_output); + actual_output = strip_sexp_fields(&actual_output); } if actual_output == test.output { true } else { print_diff_key(); print_diff(&actual_output, &test.output); - println!(""); + println!(); false } }); @@ -338,13 +404,12 @@ fn test_feature_corpus_files() { } } } - if failure_count > 0 { - panic!("{} corpus tests failed", failure_count); - } + + assert!(failure_count == 0, "{failure_count} corpus tests failed"); } -fn check_consistent_sizes(tree: &Tree, input: &Vec) { - fn check(node: Node, line_offsets: &Vec) { +fn check_consistent_sizes(tree: &Tree, input: &[u8]) { + fn check(node: Node, line_offsets: &[usize]) { let start_byte = node.start_byte(); let end_byte = node.end_byte(); let start_point = node.start_position(); @@ -391,7 +456,7 @@ fn check_consistent_sizes(tree: &Tree, input: &Vec) { let mut line_offsets = vec![0]; for (i, c) in input.iter().enumerate() { - if *c == '\n' as u8 { + if *c == b'\n' { line_offsets.push(i + 1); } } @@ -399,7 +464,7 @@ fn check_consistent_sizes(tree: &Tree, input: &Vec) { check(tree.root_node(), &line_offsets); } -fn check_changed_ranges(old_tree: &Tree, new_tree: &Tree, input: &Vec) -> Result<(), String> { +fn check_changed_ranges(old_tree: &Tree, new_tree: &Tree, input: &[u8]) -> Result<(), String> { let changed_ranges = old_tree.changed_ranges(new_tree).collect::>(); let old_scope_sequence = ScopeSequence::new(old_tree); let new_scope_sequence = ScopeSequence::new(new_tree); @@ -415,13 +480,12 @@ fn check_changed_ranges(old_tree: &Tree, new_tree: &Tree, input: &Vec) -> Re for range in &changed_ranges { if range.end_byte > byte_range.end || range.end_point > point_range.end { return Err(format!( - "changed range extends outside of the old and new trees {:?}", - range + "changed range extends outside of the old and new trees {range:?}", )); } } - old_scope_sequence.check_changes(&new_scope_sequence, &input, &changed_ranges) + old_scope_sequence.check_changes(&new_scope_sequence, input, &changed_ranges) } fn set_included_ranges(parser: &mut Parser, input: &[u8], delimiters: Option<(&str, &str)>) { @@ -429,7 +493,12 @@ fn set_included_ranges(parser: &mut Parser, input: &[u8], delimiters: Option<(&s let mut ranges = Vec::new(); let mut ix = 0; while ix < input.len() { - let Some(mut start_ix) = input[ix..].windows(2).position(|win| win == start.as_bytes()) else { break }; + let Some(mut start_ix) = input[ix..] + .windows(2) + .position(|win| win == start.as_bytes()) + else { + break; + }; start_ix += ix + start.len(); let end_ix = input[start_ix..] .windows(2) @@ -469,13 +538,13 @@ fn get_parser(session: &mut Option, log_filename: &str) -> Par if *LOG_ENABLED { parser.set_logger(Some(Box::new(|log_type, msg| { if log_type == LogType::Lex { - eprintln!(" {}", msg); + eprintln!(" {msg}"); } else { - eprintln!("{}", msg); + eprintln!("{msg}"); } }))); } else if *LOG_GRAPH_ENABLED { - *session = Some(util::log_graphs(&mut parser, log_filename).unwrap()); + *session = Some(util::log_graphs(&mut parser, log_filename, false).unwrap()); } parser @@ -497,6 +566,7 @@ fn flatten_tests(test: TestEntry) -> Vec { input, output, has_fields, + .. } => { if !prefix.is_empty() { name.insert_str(0, " - "); diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/detect_language.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/detect_language.rs new file mode 100644 index 0000000000..c4f41185f0 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/detect_language.rs @@ -0,0 +1,134 @@ +use crate::tests::helpers::fixtures::scratch_dir; + +use std::path::Path; +use tree_sitter_loader::Loader; + +#[test] +fn detect_language_by_first_line_regex() { + let strace_dir = tree_sitter_dir( + r#"{ + "name": "tree-sitter-strace", + "version": "0.0.1", + "tree-sitter": [ + { + "scope": "source.strace", + "file-types": [ + "strace" + ], + "first-line-regex": "[0-9:.]* *execve" + } + ] +} +"#, + "strace", + ); + + let mut loader = Loader::with_parser_lib_path(scratch_dir().to_path_buf()); + let config = loader + .find_language_configurations_at_path(strace_dir.path(), false) + .unwrap(); + + // this is just to validate that we can read the package.json correctly + assert_eq!(config[0].scope.as_ref().unwrap(), "source.strace"); + + let file_name = strace_dir.path().join("strace.log"); + std::fs::write(&file_name, "execve\nworld").unwrap(); + assert_eq!( + get_lang_scope(&loader, &file_name), + Some("source.strace".into()) + ); + + let file_name = strace_dir.path().join("strace.log"); + std::fs::write(&file_name, "447845 execve\nworld").unwrap(); + assert_eq!( + get_lang_scope(&loader, &file_name), + Some("source.strace".into()) + ); + + let file_name = strace_dir.path().join("strace.log"); + std::fs::write(&file_name, "hello\nexecve").unwrap(); + assert!(get_lang_scope(&loader, &file_name).is_none()); + + let file_name = strace_dir.path().join("strace.log"); + std::fs::write(&file_name, "").unwrap(); + assert!(get_lang_scope(&loader, &file_name).is_none()); + + let dummy_dir = tree_sitter_dir( + r#"{ + "name": "tree-sitter-dummy", + "version": "0.0.1", + "tree-sitter": [ + { + "scope": "source.dummy", + "file-types": [ + "dummy" + ] + } + ] +} +"#, + "dummy", + ); + + // file-type takes precedence over first-line-regex + loader + .find_language_configurations_at_path(dummy_dir.path(), false) + .unwrap(); + let file_name = dummy_dir.path().join("strace.dummy"); + std::fs::write(&file_name, "execve").unwrap(); + assert_eq!( + get_lang_scope(&loader, &file_name), + Some("source.dummy".into()) + ); +} + +fn tree_sitter_dir(package_json: &str, name: &str) -> tempfile::TempDir { + let temp_dir = tempfile::tempdir().unwrap(); + std::fs::write(temp_dir.path().join("package.json"), package_json).unwrap(); + std::fs::create_dir(temp_dir.path().join("src")).unwrap(); + std::fs::create_dir(temp_dir.path().join("src/tree_sitter")).unwrap(); + std::fs::write( + temp_dir.path().join("src/grammar.json"), + format!(r#"{{"name":"{name}"}}"#), + ) + .unwrap(); + std::fs::write( + temp_dir.path().join("src/parser.c"), + format!( + r##" + #include "tree_sitter/parser.h" + #ifdef _WIN32 + #define TS_PUBLIC __declspec(dllexport) + #else + #define TS_PUBLIC __attribute__((visibility("default"))) + #endif + TS_PUBLIC const TSLanguage *tree_sitter_{name}() {{}} + "## + ), + ) + .unwrap(); + std::fs::write( + temp_dir.path().join("src/tree_sitter/parser.h"), + include_str!("../../../lib/src/parser.h"), + ) + .unwrap(); + temp_dir +} + +// if we manage to get the language scope, it means we correctly detected the file-type +fn get_lang_scope(loader: &Loader, file_name: &Path) -> Option { + loader + .language_configuration_for_file_name(file_name) + .ok() + .and_then(|config| { + if let Some((_, config)) = config { + config.scope.clone() + } else if let Ok(Some((_, config))) = + loader.language_configuration_for_first_line_regex(file_name) + { + config.scope.clone() + } else { + None + } + }) +} diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/allocations.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/allocations.rs index 9a51401453..7e640741dd 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/allocations.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/allocations.rs @@ -2,7 +2,7 @@ use std::{ collections::HashMap, os::raw::c_void, sync::{ - atomic::{AtomicBool, AtomicU64, Ordering::SeqCst}, + atomic::{AtomicBool, AtomicUsize, Ordering::SeqCst}, Mutex, }, }; @@ -25,12 +25,12 @@ unsafe impl Sync for Allocation {} #[derive(Default)] struct AllocationRecorder { enabled: AtomicBool, - allocation_count: AtomicU64, - outstanding_allocations: Mutex>, + allocation_count: AtomicUsize, + outstanding_allocations: Mutex>, } thread_local! { - static RECORDER: AllocationRecorder = Default::default(); + static RECORDER: AllocationRecorder = AllocationRecorder::default(); } extern "C" { @@ -60,12 +60,10 @@ pub fn record(f: impl FnOnce() -> T) -> T { .map(|e| e.1) .collect::>() }); - if !outstanding_allocation_indices.is_empty() { - panic!( - "Leaked allocation indices: {:?}", - outstanding_allocation_indices - ); - } + assert!( + outstanding_allocation_indices.is_empty(), + "Leaked allocation indices: {outstanding_allocation_indices:?}" + ); value } @@ -83,6 +81,7 @@ fn record_alloc(ptr: *mut c_void) { } fn record_dealloc(ptr: *mut c_void) { + assert!(!ptr.is_null(), "Zero pointer deallocation!"); RECORDER.with(|recorder| { if recorder.enabled.load(SeqCst) { recorder @@ -107,9 +106,13 @@ unsafe extern "C" fn ts_record_calloc(count: usize, size: usize) -> *mut c_void } unsafe extern "C" fn ts_record_realloc(ptr: *mut c_void, size: usize) -> *mut c_void { - record_dealloc(ptr); let result = realloc(ptr, size); - record_alloc(result); + if ptr.is_null() { + record_alloc(result); + } else if ptr != result { + record_dealloc(ptr); + record_alloc(result); + } result } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/dirs.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/dirs.rs index 4bf345d803..4d1c49820d 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/dirs.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/dirs.rs @@ -1,11 +1,47 @@ lazy_static! { - static ref ROOT_DIR: PathBuf = PathBuf::from(env!("CARGO_MANIFEST_DIR")).parent().unwrap().to_owned(); - static ref FIXTURES_DIR: PathBuf = ROOT_DIR.join("test").join("fixtures"); - static ref HEADER_DIR: PathBuf = ROOT_DIR.join("lib").join("include"); - static ref GRAMMARS_DIR: PathBuf = ROOT_DIR.join("test").join("fixtures").join("grammars"); - static ref SCRATCH_DIR: PathBuf = { + pub static ref ROOT_DIR: PathBuf = PathBuf::from(env!("CARGO_MANIFEST_DIR")).parent().unwrap().to_owned(); + pub static ref FIXTURES_DIR: PathBuf = ROOT_DIR.join("test").join("fixtures"); + pub static ref HEADER_DIR: PathBuf = ROOT_DIR.join("lib").join("include"); + pub static ref GRAMMARS_DIR: PathBuf = ROOT_DIR.join("test").join("fixtures").join("grammars"); + pub static ref SCRATCH_BASE_DIR: PathBuf = { let result = ROOT_DIR.join("target").join("scratch"); fs::create_dir_all(&result).unwrap(); result }; + pub static ref WASM_DIR: PathBuf = ROOT_DIR.join("target").join("release"); + pub static ref SCRATCH_DIR: PathBuf = { + // https://doc.rust-lang.org/reference/conditional-compilation.html + let vendor = if cfg!(target_vendor = "apple") { + "apple" + } else if cfg!(target_vendor = "fortanix") { + "fortanix" + } else if cfg!(target_vendor = "pc") { + "pc" + } else { + "unknown" + }; + let env = if cfg!(target_env = "gnu") { + "gnu" + } else if cfg!(target_env = "msvc") { + "msvc" + } else if cfg!(target_env = "musl") { + "musl" + } else if cfg!(target_env = "sgx") { + "sgx" + } else { + "unknown" + }; + let endian = if cfg!(target_endian = "little") { + "little" + } else if cfg!(target_endian = "big") { + "big" + } else { + "unknown" + }; + + let machine = format!("{}-{}-{vendor}-{env}-{endian}", std::env::consts::ARCH, std::env::consts::OS); + let result = SCRATCH_BASE_DIR.join(machine); + fs::create_dir_all(&result).unwrap(); + result + }; } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/edits.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/edits.rs index 4b07485c3f..11fd659c37 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/edits.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/edits.rs @@ -5,12 +5,13 @@ use std::str; #[derive(Debug)] pub struct ReadRecorder<'a> { - content: &'a Vec, + content: &'a [u8], indices_read: Vec, } impl<'a> ReadRecorder<'a> { - pub fn new(content: &'a Vec) -> Self { + #[must_use] + pub const fn new(content: &'a [u8]) -> Self { Self { content, indices_read: Vec::new(), @@ -31,7 +32,7 @@ impl<'a> ReadRecorder<'a> { pub fn strings_read(&self) -> Vec<&'a str> { let mut result = Vec::new(); let mut last_range: Option> = None; - for index in self.indices_read.iter() { + for index in &self.indices_read { if let Some(ref mut range) = &mut last_range { if range.end == *index { range.end += 1; @@ -44,13 +45,13 @@ impl<'a> ReadRecorder<'a> { } } if let Some(range) = last_range { - result.push(str::from_utf8(&self.content[range.clone()]).unwrap()); + result.push(str::from_utf8(&self.content[range]).unwrap()); } result } } -pub fn invert_edit(input: &Vec, edit: &Edit) -> Edit { +pub fn invert_edit(input: &[u8], edit: &Edit) -> Edit { let position = edit.position; let removed_content = &input[position..(position + edit.deleted_length)]; Edit { @@ -60,7 +61,7 @@ pub fn invert_edit(input: &Vec, edit: &Edit) -> Edit { } } -pub fn get_random_edit(rand: &mut Rand, input: &Vec) -> Edit { +pub fn get_random_edit(rand: &mut Rand, input: &[u8]) -> Edit { let choice = rand.unsigned(10); if choice < 2 { // Insert text at end diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/fixtures.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/fixtures.rs index 7d04b24a1c..bad016c483 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/fixtures.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/fixtures.rs @@ -1,6 +1,7 @@ +use anyhow::Context; use lazy_static::lazy_static; -use std::fs; use std::path::{Path, PathBuf}; +use std::{env, fs}; use tree_sitter::Language; use tree_sitter_highlight::HighlightConfiguration; use tree_sitter_loader::Loader; @@ -9,20 +10,34 @@ use tree_sitter_tags::TagsConfiguration; include!("./dirs.rs"); lazy_static! { - static ref TEST_LOADER: Loader = Loader::with_parser_lib_path(SCRATCH_DIR.clone()); + static ref TEST_LOADER: Loader = { + let mut loader = Loader::with_parser_lib_path(SCRATCH_DIR.clone()); + if env::var("TREE_SITTER_GRAMMAR_DEBUG").is_ok() { + loader.use_debug_build(true); + } + loader + }; } -pub fn test_loader<'a>() -> &'a Loader { - &*TEST_LOADER +pub fn test_loader() -> &'static Loader { + &TEST_LOADER } -pub fn fixtures_dir<'a>() -> &'static Path { +pub fn fixtures_dir() -> &'static Path { &FIXTURES_DIR } +pub fn scratch_dir() -> &'static Path { + &SCRATCH_DIR +} + pub fn get_language(name: &str) -> Language { TEST_LOADER - .load_language_at_path(&GRAMMARS_DIR.join(name).join("src"), &HEADER_DIR) + .load_language_at_path( + &GRAMMARS_DIR.join(name).join("src"), + &[&HEADER_DIR, &GRAMMARS_DIR.join(name).join("src")], + None, + ) .unwrap() } @@ -38,20 +53,20 @@ pub fn get_highlight_config( let language = get_language(language_name); let queries_path = get_language_queries_path(language_name); let highlights_query = fs::read_to_string(queries_path.join("highlights.scm")).unwrap(); - let injections_query = if let Some(injection_query_filename) = injection_query_filename { - fs::read_to_string(queries_path.join(injection_query_filename)).unwrap() - } else { - String::new() - }; - let locals_query = fs::read_to_string(queries_path.join("locals.scm")).unwrap_or(String::new()); + let injections_query = + injection_query_filename.map_or_else(String::new, |injection_query_filename| { + fs::read_to_string(queries_path.join(injection_query_filename)).unwrap() + }); + let locals_query = fs::read_to_string(queries_path.join("locals.scm")).unwrap_or_default(); let mut result = HighlightConfiguration::new( language, + language_name, &highlights_query, &injections_query, &locals_query, ) .unwrap(); - result.configure(&highlight_names); + result.configure(highlight_names); result } @@ -59,33 +74,74 @@ pub fn get_tags_config(language_name: &str) -> TagsConfiguration { let language = get_language(language_name); let queries_path = get_language_queries_path(language_name); let tags_query = fs::read_to_string(queries_path.join("tags.scm")).unwrap(); - let locals_query = fs::read_to_string(queries_path.join("locals.scm")).unwrap_or(String::new()); + let locals_query = fs::read_to_string(queries_path.join("locals.scm")).unwrap_or_default(); TagsConfiguration::new(language, &tags_query, &locals_query).unwrap() } pub fn get_test_language(name: &str, parser_code: &str, path: Option<&Path>) -> Language { - let parser_c_path = SCRATCH_DIR.join(&format!("{}-parser.c", name)); - if !fs::read_to_string(&parser_c_path) - .map(|content| content == parser_code) - .unwrap_or(false) - { - fs::write(&parser_c_path, parser_code).unwrap(); + let src_dir = scratch_dir().join("src").join(name); + fs::create_dir_all(&src_dir).unwrap(); + + let parser_path = src_dir.join("parser.c"); + if !fs::read_to_string(&parser_path).map_or(false, |content| content == parser_code) { + fs::write(&parser_path, parser_code).unwrap(); } - let scanner_path = path.and_then(|p| { - let result = p.join("scanner.c"); - if result.exists() { - Some(result) + + let scanner_path = if let Some(path) = path { + let scanner_path = path.join("scanner.c"); + if scanner_path.exists() { + let scanner_code = fs::read_to_string(&scanner_path).unwrap(); + let scanner_copy_path = src_dir.join("scanner.c"); + if !fs::read_to_string(&scanner_copy_path) + .map_or(false, |content| content == scanner_code) + { + fs::write(&scanner_copy_path, scanner_code).unwrap(); + } + Some(scanner_copy_path) } else { None } - }); + } else { + None + }; + + let header_path = src_dir.join("tree_sitter"); + fs::create_dir_all(&header_path).unwrap(); + + fs::write(header_path.join("alloc.h"), tree_sitter::PARSER_HEADER) + .with_context(|| { + format!( + "Failed to write {:?}", + header_path.join("alloc.h").file_name().unwrap() + ) + }) + .unwrap(); + + fs::write(header_path.join("array.h"), tree_sitter::PARSER_HEADER) + .with_context(|| { + format!( + "Failed to write {:?}", + header_path.join("array.h").file_name().unwrap() + ) + }) + .unwrap(); + + fs::write(header_path.join("parser.h"), tree_sitter::PARSER_HEADER) + .with_context(|| { + format!( + "Failed to write {:?}", + header_path.join("parser.h").file_name().unwrap() + ) + }) + .unwrap(); + + let paths_to_check = if let Some(scanner_path) = &scanner_path { + vec![parser_path, scanner_path.clone()] + } else { + vec![parser_path] + }; + TEST_LOADER - .load_language_from_sources(name, &HEADER_DIR, &parser_c_path, &scanner_path) + .load_language_at_path_with_name(&src_dir, &[&HEADER_DIR], name, Some(&paths_to_check)) .unwrap() } - -pub fn get_test_grammar(name: &str) -> (String, Option) { - let dir = fixtures_dir().join("test_grammars").join(name); - let grammar = fs::read_to_string(&dir.join("grammar.json")).unwrap(); - (grammar, Some(dir)) -} diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/mod.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/mod.rs index 54df880928..35e4dc8686 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/mod.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/mod.rs @@ -26,7 +26,7 @@ fn int_env_var(name: &'static str) -> Option { env::var(name).ok().and_then(|e| e.parse().ok()) } -pub(crate) fn new_seed() -> usize { +pub fn new_seed() -> usize { int_env_var("TREE_SITTER_SEED").unwrap_or_else(|| { let mut rng = rand::thread_rng(); rng.gen::() diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/query_helpers.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/query_helpers.rs index 78ae559ccb..608d491465 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/query_helpers.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/query_helpers.rs @@ -1,6 +1,8 @@ use rand::prelude::Rng; use std::{cmp::Ordering, fmt::Write, ops::Range}; -use tree_sitter::{Node, Point, Tree, TreeCursor}; +use tree_sitter::{ + Language, Node, Parser, Point, Query, QueryCapture, QueryCursor, QueryMatch, Tree, TreeCursor, +}; #[derive(Debug)] pub struct Pattern { @@ -17,7 +19,7 @@ pub struct Match<'a, 'tree> { pub last_node: Option>, } -const CAPTURE_NAMES: &'static [&'static str] = &[ +const CAPTURE_NAMES: &[&str] = &[ "one", "two", "three", "four", "five", "six", "seven", "eight", ]; @@ -55,12 +57,11 @@ impl Pattern { children: roots, }; - if pattern.children.len() == 1 { - pattern = pattern.children.pop().unwrap(); - } + if pattern.children.len() == 1 || // In a parenthesized list of sibling patterns, the first // sibling can't be an anonymous `_` wildcard. - else if pattern.children[0].kind == Some("_") && !pattern.children[0].named { + (pattern.children[0].kind == Some("_") && !pattern.children[0].named) + { pattern = pattern.children.pop().unwrap(); } // In a parenthesized list of sibling patterns, the first @@ -121,22 +122,16 @@ impl Pattern { } } - pub fn to_string(&self) -> String { - let mut result = String::new(); - self.write_to_string(&mut result, 0); - result - } - fn write_to_string(&self, string: &mut String, indent: usize) { if let Some(field) = self.field { - write!(string, "{}: ", field).unwrap(); + write!(string, "{field}: ").unwrap(); } if self.named { string.push('('); let mut has_contents = false; if let Some(kind) = &self.kind { - write!(string, "{}", kind).unwrap(); + write!(string, "{kind}").unwrap(); has_contents = true; } for child in &self.children { @@ -152,11 +147,11 @@ impl Pattern { } else if self.kind == Some("_") { string.push('_'); } else { - write!(string, "\"{}\"", self.kind.unwrap().replace("\"", "\\\"")).unwrap(); + write!(string, "\"{}\"", self.kind.unwrap().replace('\"', "\\\"")).unwrap(); } if let Some(capture) = &self.capture { - write!(string, " @{}", capture).unwrap(); + write!(string, " @{capture}").unwrap(); } } @@ -212,11 +207,10 @@ impl Pattern { // Create a match for the current node. let mat = Match { - captures: if let Some(name) = &self.capture { - vec![(name.as_str(), node)] - } else { - Vec::new() - }, + captures: self + .capture + .as_ref() + .map_or_else(Vec::new, |name| vec![(name.as_str(), node)]), last_node: Some(node), }; @@ -244,7 +238,7 @@ impl Pattern { new_match_states.push((*pattern_index + 1, combined_match)); } else { let mut existing = false; - for existing_match in finished_matches.iter_mut() { + for existing_match in &mut finished_matches { if existing_match.captures == combined_match.captures { if child_pattern.capture.is_some() { existing_match.last_node = combined_match.last_node; @@ -269,6 +263,14 @@ impl Pattern { } } +impl std::fmt::Display for Pattern { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut result = String::new(); + self.write_to_string(&mut result, 0); + write!(f, "{result}") + } +} + impl<'a, 'tree> PartialOrd for Match<'a, 'tree> { fn partial_cmp(&self, other: &Self) -> Option { Some(self.cmp(other)) @@ -304,3 +306,56 @@ fn compare_depth_first(a: Node, b: Node) -> Ordering { let b = b.byte_range(); a.start.cmp(&b.start).then_with(|| b.end.cmp(&a.end)) } + +pub fn assert_query_matches( + language: &Language, + query: &Query, + source: &str, + expected: &[(usize, Vec<(&str, &str)>)], +) { + let mut parser = Parser::new(); + parser.set_language(language).unwrap(); + let tree = parser.parse(source, None).unwrap(); + let mut cursor = QueryCursor::new(); + let matches = cursor.matches(query, tree.root_node(), source.as_bytes()); + pretty_assertions::assert_eq!(collect_matches(matches, query, source), expected); + pretty_assertions::assert_eq!(cursor.did_exceed_match_limit(), false); +} + +pub fn collect_matches<'a>( + matches: impl Iterator>, + query: &'a Query, + source: &'a str, +) -> Vec<(usize, Vec<(&'a str, &'a str)>)> { + matches + .map(|m| { + ( + m.pattern_index, + format_captures(m.captures.iter().copied(), query, source), + ) + }) + .collect() +} + +pub fn collect_captures<'a>( + captures: impl Iterator, usize)>, + query: &'a Query, + source: &'a str, +) -> Vec<(&'a str, &'a str)> { + format_captures(captures.map(|(m, i)| m.captures[i]), query, source) +} + +fn format_captures<'a>( + captures: impl Iterator>, + query: &'a Query, + source: &'a str, +) -> Vec<(&'a str, &'a str)> { + captures + .map(|capture| { + ( + query.capture_names()[capture.index as usize], + capture.node.utf8_text(source.as_bytes()).unwrap(), + ) + }) + .collect() +} diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/random.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/random.rs index 77c347d6bd..bac088905f 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/random.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/random.rs @@ -11,7 +11,7 @@ pub struct Rand(StdRng); impl Rand { pub fn new(seed: usize) -> Self { - Rand(StdRng::seed_from_u64(seed as u64)) + Self(StdRng::seed_from_u64(seed as u64)) } pub fn unsigned(&mut self, max: usize) -> usize { @@ -24,9 +24,9 @@ impl Rand { for i in 0..word_count { if i > 0 { if self.unsigned(5) == 0 { - result.push('\n' as u8); + result.push(b'\n'); } else { - result.push(' ' as u8); + result.push(b' '); } } if self.unsigned(3) == 0 { @@ -34,7 +34,7 @@ impl Rand { result.push(OPERATORS[index] as u8); } else { for _ in 0..self.unsigned(8) { - result.push(self.0.sample(Alphanumeric) as u8); + result.push(self.0.sample(Alphanumeric)); } } } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/scope_sequence.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/scope_sequence.rs index 4521833cde..436455d4a1 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/scope_sequence.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/helpers/scope_sequence.rs @@ -7,7 +7,7 @@ type ScopeStack = Vec<&'static str>; impl ScopeSequence { pub fn new(tree: &Tree) -> Self { - let mut result = ScopeSequence(Vec::new()); + let mut result = Self(Vec::new()); let mut scope_stack = Vec::new(); let mut cursor = tree.walk(); @@ -40,9 +40,9 @@ impl ScopeSequence { pub fn check_changes( &self, - other: &ScopeSequence, - text: &Vec, - known_changed_ranges: &Vec, + other: &Self, + text: &[u8], + known_changed_ranges: &[Range], ) -> Result<(), String> { let mut position = Point { row: 0, column: 0 }; for i in 0..(self.0.len().max(other.0.len())) { @@ -54,7 +54,7 @@ impl ScopeSequence { .find(|range| range.start_point <= position && position < range.end_point); if containing_range.is_none() { let line = &text[(i - position.column)..] - .split(|c| *c == '\n' as u8) + .split(|c| *c == b'\n') .next() .unwrap(); return Err(format!( @@ -78,7 +78,7 @@ impl ScopeSequence { } } - if text[i] == '\n' as u8 { + if text[i] == b'\n' { position.row += 1; position.column = 0; } else { diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/highlight_test.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/highlight_test.rs index e0b356d284..77a95d7dbc 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/tests/highlight_test.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/highlight_test.rs @@ -24,6 +24,7 @@ lazy_static! { get_highlight_config("rust", Some("injections.scm"), &HIGHLIGHT_NAMES); static ref HIGHLIGHT_NAMES: Vec = [ "attribute", + "boolean", "carriage-return", "comment", "constant", @@ -48,12 +49,12 @@ lazy_static! { "variable", ] .iter() - .cloned() + .copied() .map(String::from) .collect(); static ref HTML_ATTRS: Vec = HIGHLIGHT_NAMES .iter() - .map(|s| format!("class={}", s)) + .map(|s| format!("class={s}")) .collect(); } @@ -61,7 +62,7 @@ lazy_static! { fn test_highlighting_javascript() { let source = "const a = function(b) { return b + c; }"; assert_eq!( - &to_token_vector(&source, &JS_HIGHLIGHT).unwrap(), + &to_token_vector(source, &JS_HIGHLIGHT).unwrap(), &[vec![ ("const", vec!["keyword"]), (" ", vec![]), @@ -71,14 +72,14 @@ fn test_highlighting_javascript() { (" ", vec![]), ("function", vec!["keyword"]), ("(", vec!["punctuation.bracket"]), - ("b", vec!["variable.parameter"]), + ("b", vec!["variable"]), (")", vec!["punctuation.bracket"]), (" ", vec![]), ("{", vec!["punctuation.bracket"]), (" ", vec![]), ("return", vec!["keyword"]), (" ", vec![]), - ("b", vec!["variable.parameter"]), + ("b", vec!["variable"]), (" ", vec![]), ("+", vec!["operator"]), (" ", vec![]), @@ -92,7 +93,7 @@ fn test_highlighting_javascript() { #[test] fn test_highlighting_injected_html_in_javascript() { - let source = vec!["const s = html `
${a < b}
`;"].join("\n"); + let source = ["const s = html `
${a < b}
`;"].join("\n"); assert_eq!( &to_token_vector(&source, &JS_HIGHLIGHT).unwrap(), @@ -156,7 +157,7 @@ fn test_highlighting_injected_javascript_in_html_mini() { #[test] fn test_highlighting_injected_javascript_in_html() { - let source = vec![ + let source = [ "", " "].join("\n"); + let source = ["
<% foo() %>
"].join("\n"); assert_eq!( &to_token_vector(&source, &EJS_HIGHLIGHT).unwrap(), @@ -376,7 +378,7 @@ fn test_highlighting_ejs_with_html_and_javascript() { fn test_highlighting_javascript_with_jsdoc() { // Regression test: the middle comment has no highlights. This should not prevent // later injections from highlighting properly. - let source = vec!["a /* @see a */ b; /* nothing */ c; /* @see b */"].join("\n"); + let source = ["a /* @see a */ b; /* nothing */ c; /* @see b */"].join("\n"); assert_eq!( &to_token_vector(&source, &JS_HIGHLIGHT).unwrap(), @@ -404,7 +406,7 @@ fn test_highlighting_javascript_with_jsdoc() { #[test] fn test_highlighting_with_content_children_included() { - let source = vec!["assert!(", " a.b.c() < D::e::()", ");"].join("\n"); + let source = ["assert!(", " a.b.c() < D::e::()", ");"].join("\n"); assert_eq!( &to_token_vector(&source, &RUST_HIGHLIGHT).unwrap(), @@ -482,7 +484,7 @@ fn test_highlighting_cancellation() { #[test] fn test_highlighting_via_c_api() { - let highlights = vec![ + let highlights = [ "class=tag\0", "class=function\0", "class=string\0", @@ -490,74 +492,86 @@ fn test_highlighting_via_c_api() { ]; let highlight_names = highlights .iter() - .map(|h| h["class=".len()..].as_ptr() as *const c_char) + .map(|h| h["class=".len()..].as_ptr().cast::()) .collect::>(); let highlight_attrs = highlights .iter() - .map(|h| h.as_bytes().as_ptr() as *const c_char) + .map(|h| h.as_bytes().as_ptr().cast::()) .collect::>(); - let highlighter = c::ts_highlighter_new( - &highlight_names[0] as *const *const c_char, - &highlight_attrs[0] as *const *const c_char, - highlights.len() as u32, - ); + let highlighter = unsafe { + c::ts_highlighter_new( + std::ptr::addr_of!(highlight_names[0]), + std::ptr::addr_of!(highlight_attrs[0]), + highlights.len() as u32, + ) + }; let source_code = c_string(""); let js_scope = c_string("source.js"); let js_injection_regex = c_string("^javascript"); let language = get_language("javascript"); + let lang_name = c_string("javascript"); let queries = get_language_queries_path("javascript"); let highlights_query = fs::read_to_string(queries.join("highlights.scm")).unwrap(); let injections_query = fs::read_to_string(queries.join("injections.scm")).unwrap(); let locals_query = fs::read_to_string(queries.join("locals.scm")).unwrap(); - c::ts_highlighter_add_language( - highlighter, - js_scope.as_ptr(), - js_injection_regex.as_ptr(), - language, - highlights_query.as_ptr() as *const c_char, - injections_query.as_ptr() as *const c_char, - locals_query.as_ptr() as *const c_char, - highlights_query.len() as u32, - injections_query.len() as u32, - locals_query.len() as u32, - ); + unsafe { + c::ts_highlighter_add_language( + highlighter, + lang_name.as_ptr(), + js_scope.as_ptr(), + js_injection_regex.as_ptr(), + language, + highlights_query.as_ptr().cast::(), + injections_query.as_ptr().cast::(), + locals_query.as_ptr().cast::(), + highlights_query.len() as u32, + injections_query.len() as u32, + locals_query.len() as u32, + ); + } let html_scope = c_string("text.html.basic"); let html_injection_regex = c_string("^html"); let language = get_language("html"); + let lang_name = c_string("html"); let queries = get_language_queries_path("html"); let highlights_query = fs::read_to_string(queries.join("highlights.scm")).unwrap(); let injections_query = fs::read_to_string(queries.join("injections.scm")).unwrap(); - c::ts_highlighter_add_language( - highlighter, - html_scope.as_ptr(), - html_injection_regex.as_ptr(), - language, - highlights_query.as_ptr() as *const c_char, - injections_query.as_ptr() as *const c_char, - ptr::null(), - highlights_query.len() as u32, - injections_query.len() as u32, - 0, - ); + unsafe { + c::ts_highlighter_add_language( + highlighter, + lang_name.as_ptr(), + html_scope.as_ptr(), + html_injection_regex.as_ptr(), + language, + highlights_query.as_ptr().cast::(), + injections_query.as_ptr().cast::(), + ptr::null(), + highlights_query.len() as u32, + injections_query.len() as u32, + 0, + ); + } let buffer = c::ts_highlight_buffer_new(); - c::ts_highlighter_highlight( - highlighter, - html_scope.as_ptr(), - source_code.as_ptr(), - source_code.as_bytes().len() as u32, - buffer, - ptr::null_mut(), - ); + unsafe { + c::ts_highlighter_highlight( + highlighter, + html_scope.as_ptr(), + source_code.as_ptr(), + source_code.as_bytes().len() as u32, + buffer, + ptr::null_mut(), + ); + } - let output_bytes = c::ts_highlight_buffer_content(buffer); - let output_line_offsets = c::ts_highlight_buffer_line_offsets(buffer); - let output_len = c::ts_highlight_buffer_len(buffer); - let output_line_count = c::ts_highlight_buffer_line_count(buffer); + let output_bytes = unsafe { c::ts_highlight_buffer_content(buffer) }; + let output_line_offsets = unsafe { c::ts_highlight_buffer_line_offsets(buffer) }; + let output_len = unsafe { c::ts_highlight_buffer_len(buffer) }; + let output_line_count = unsafe { c::ts_highlight_buffer_line_count(buffer) }; let output_bytes = unsafe { slice::from_raw_parts(output_bytes, output_len as usize) }; let output_line_offsets = @@ -568,8 +582,7 @@ fn test_highlighting_via_c_api() { let line_start = output_line_offsets[i] as usize; let line_end = output_line_offsets .get(i + 1) - .map(|x| *x as usize) - .unwrap_or(output_bytes.len()); + .map_or(output_bytes.len(), |x| *x as usize); lines.push(str::from_utf8(&output_bytes[line_start..line_end]).unwrap()); } @@ -583,8 +596,69 @@ fn test_highlighting_via_c_api() { ] ); - c::ts_highlighter_delete(highlighter); - c::ts_highlight_buffer_delete(buffer); + unsafe { + c::ts_highlighter_delete(highlighter); + c::ts_highlight_buffer_delete(buffer); + } +} + +#[test] +fn test_highlighting_with_all_captures_applied() { + let source = "fn main(a: u32, b: u32) -> { let c = a + b; }"; + let language = get_language("rust"); + let highlights_query = indoc::indoc! {" + [ + \"fn\" + \"let\" + ] @keyword + (identifier) @variable + (function_item name: (identifier) @function) + (parameter pattern: (identifier) @variable.parameter) + (primitive_type) @type.builtin + \"=\" @operator + [ \"->\" \":\" \";\" ] @punctuation.delimiter + [ \"{\" \"}\" \"(\" \")\" ] @punctuation.bracket + "}; + let mut rust_highlight_reverse = + HighlightConfiguration::new(language, "rust", highlights_query, "", "").unwrap(); + rust_highlight_reverse.configure(&HIGHLIGHT_NAMES); + + assert_eq!( + &to_token_vector(source, &rust_highlight_reverse).unwrap(), + &[[ + ("fn", vec!["keyword"]), + (" ", vec![]), + ("main", vec!["function"]), + ("(", vec!["punctuation.bracket"]), + ("a", vec!["variable.parameter"]), + (":", vec!["punctuation.delimiter"]), + (" ", vec![]), + ("u32", vec!["type.builtin"]), + (", ", vec![]), + ("b", vec!["variable.parameter"]), + (":", vec!["punctuation.delimiter"]), + (" ", vec![]), + ("u32", vec!["type.builtin"]), + (")", vec!["punctuation.bracket"]), + (" ", vec![]), + ("->", vec!["punctuation.delimiter"]), + (" ", vec![]), + ("{", vec!["punctuation.bracket"]), + (" ", vec![]), + ("let", vec!["keyword"]), + (" ", vec![]), + ("c", vec!["variable"]), + (" ", vec![]), + ("=", vec!["operator"]), + (" ", vec![]), + ("a", vec!["variable"]), + (" + ", vec![]), + ("b", vec!["variable"]), + (";", vec!["punctuation.delimiter"]), + (" ", vec![]), + ("}", vec!["punctuation.bracket"]) + ]], + ); } #[test] @@ -641,9 +715,13 @@ fn to_html<'a>( renderer .render(events, src, &|highlight| HTML_ATTRS[highlight.0].as_bytes()) .unwrap(); - Ok(renderer.lines().map(|s| s.to_string()).collect()) + Ok(renderer + .lines() + .map(std::string::ToString::to_string) + .collect()) } +#[allow(clippy::type_complexity)] fn to_token_vector<'a>( src: &'a str, language_config: &'a HighlightConfiguration, @@ -667,20 +745,20 @@ fn to_token_vector<'a>( } HighlightEvent::Source { start, end } => { let s = str::from_utf8(&src[start..end]).unwrap(); - for (i, l) in s.split("\n").enumerate() { + for (i, l) in s.split('\n').enumerate() { let l = l.trim_end_matches('\r'); if i > 0 { lines.push(line); line = Vec::new(); } - if l.len() > 0 { + if !l.is_empty() { line.push((l, highlights.clone())); } } } } } - if line.len() > 0 { + if !line.is_empty() { lines.push(line); } Ok(lines) diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/language_test.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/language_test.rs new file mode 100644 index 0000000000..5528c77c7c --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/language_test.rs @@ -0,0 +1,64 @@ +use super::helpers::fixtures::get_language; +use tree_sitter::Parser; + +#[test] +fn test_lookahead_iterator() { + let mut parser = Parser::new(); + let language = get_language("rust"); + parser.set_language(&language).unwrap(); + + let tree = parser.parse("struct Stuff {}", None).unwrap(); + + let mut cursor = tree.walk(); + + assert!(cursor.goto_first_child()); // struct + assert!(cursor.goto_first_child()); // struct keyword + + let next_state = cursor.node().next_parse_state(); + assert_ne!(next_state, 0); + assert_eq!( + next_state, + language.next_state(cursor.node().parse_state(), cursor.node().grammar_id()) + ); + assert!((next_state as usize) < language.parse_state_count()); + assert!(cursor.goto_next_sibling()); // type_identifier + assert_eq!(next_state, cursor.node().parse_state()); + assert_eq!(cursor.node().grammar_name(), "identifier"); + assert_ne!(cursor.node().grammar_id(), cursor.node().kind_id()); + + let expected_symbols = ["//", "/*", "identifier", "line_comment", "block_comment"]; + let mut lookahead = language.lookahead_iterator(next_state).unwrap(); + assert_eq!(*lookahead.language(), language); + assert!(lookahead.iter_names().eq(expected_symbols)); + + lookahead.reset_state(next_state); + assert!(lookahead.iter_names().eq(expected_symbols)); + + lookahead.reset(&language, next_state); + assert!(lookahead + .map(|s| language.node_kind_for_id(s).unwrap()) + .eq(expected_symbols)); +} + +#[test] +fn test_lookahead_iterator_modifiable_only_by_mut() { + let mut parser = Parser::new(); + let language = get_language("rust"); + parser.set_language(&language).unwrap(); + + let tree = parser.parse("struct Stuff {}", None).unwrap(); + + let mut cursor = tree.walk(); + + assert!(cursor.goto_first_child()); // struct + assert!(cursor.goto_first_child()); // struct keyword + + let next_state = cursor.node().next_parse_state(); + assert_ne!(next_state, 0); + + let mut lookahead = language.lookahead_iterator(next_state).unwrap(); + let _ = lookahead.next(); + + let mut names = lookahead.iter_names(); + let _ = names.next(); +} diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/mod.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/mod.rs index 1b804450b2..596bc8d179 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/tests/mod.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/mod.rs @@ -1,11 +1,19 @@ +mod async_context_test; mod corpus_test; +mod detect_language; mod helpers; mod highlight_test; +mod language_test; mod node_test; +mod parser_hang_test; mod parser_test; mod pathological_test; mod query_test; mod tags_test; mod test_highlight_test; mod test_tags_test; +mod text_provider_test; mod tree_test; + +#[cfg(feature = "wasm")] +mod wasm_language_test; diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/node_test.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/node_test.rs index 6d5ed61d2a..7fdb0069f2 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/tests/node_test.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/node_test.rs @@ -6,7 +6,7 @@ use crate::parse::perform_edit; use std::fs; use tree_sitter::{Node, Parser, Point, Tree}; -const JSON_EXAMPLE: &'static str = r#" +const JSON_EXAMPLE: &str = r#" [ 123, @@ -17,7 +17,7 @@ const JSON_EXAMPLE: &'static str = r#" ] "#; -const GRAMMAR_WITH_ALIASES_AND_EXTRAS: &'static str = r#"{ +const GRAMMAR_WITH_ALIASES_AND_EXTRAS: &str = r#"{ "name": "aliases_and_extras", "extras": [ @@ -60,8 +60,8 @@ fn test_node_child() { assert_eq!(array_node.kind(), "array"); assert_eq!(array_node.named_child_count(), 3); - assert_eq!(array_node.start_byte(), JSON_EXAMPLE.find("[").unwrap()); - assert_eq!(array_node.end_byte(), JSON_EXAMPLE.find("]").unwrap() + 1); + assert_eq!(array_node.start_byte(), JSON_EXAMPLE.find('[').unwrap()); + assert_eq!(array_node.end_byte(), JSON_EXAMPLE.find(']').unwrap() + 1); assert_eq!(array_node.start_position(), Point::new(2, 0)); assert_eq!(array_node.end_position(), Point::new(8, 1)); assert_eq!(array_node.child_count(), 7); @@ -82,13 +82,13 @@ fn test_node_child() { assert_eq!(object_node.kind(), "object"); assert_eq!(right_bracket_node.kind(), "]"); - assert_eq!(left_bracket_node.is_named(), false); - assert_eq!(number_node.is_named(), true); - assert_eq!(comma_node1.is_named(), false); - assert_eq!(false_node.is_named(), true); - assert_eq!(comma_node2.is_named(), false); - assert_eq!(object_node.is_named(), true); - assert_eq!(right_bracket_node.is_named(), false); + assert!(!left_bracket_node.is_named()); + assert!(number_node.is_named()); + assert!(!comma_node1.is_named()); + assert!(false_node.is_named()); + assert!(!comma_node2.is_named()); + assert!(object_node.is_named()); + assert!(!right_bracket_node.is_named()); assert_eq!(number_node.start_byte(), JSON_EXAMPLE.find("123").unwrap()); assert_eq!( @@ -106,7 +106,7 @@ fn test_node_child() { assert_eq!(false_node.start_position(), Point::new(4, 2)); assert_eq!(false_node.end_position(), Point::new(4, 7)); - assert_eq!(object_node.start_byte(), JSON_EXAMPLE.find("{").unwrap()); + assert_eq!(object_node.start_byte(), JSON_EXAMPLE.find('{').unwrap()); assert_eq!(object_node.start_position(), Point::new(5, 2)); assert_eq!(object_node.end_position(), Point::new(7, 3)); @@ -119,9 +119,9 @@ fn test_node_child() { assert_eq!(pair_node.kind(), "pair"); assert_eq!(right_brace_node.kind(), "}"); - assert_eq!(left_brace_node.is_named(), false); - assert_eq!(pair_node.is_named(), true); - assert_eq!(right_brace_node.is_named(), false); + assert!(!left_brace_node.is_named()); + assert!(pair_node.is_named()); + assert!(!right_brace_node.is_named()); assert_eq!(pair_node.start_byte(), JSON_EXAMPLE.find("\"x\"").unwrap()); assert_eq!(pair_node.end_byte(), JSON_EXAMPLE.find("null").unwrap() + 4); @@ -137,9 +137,9 @@ fn test_node_child() { assert_eq!(colon_node.kind(), ":"); assert_eq!(null_node.kind(), "null"); - assert_eq!(string_node.is_named(), true); - assert_eq!(colon_node.is_named(), false); - assert_eq!(null_node.is_named(), true); + assert!(string_node.is_named()); + assert!(!colon_node.is_named()); + assert!(null_node.is_named()); assert_eq!( string_node.start_byte(), @@ -202,7 +202,7 @@ fn test_node_children() { #[test] fn test_node_children_by_field_name() { let mut parser = Parser::new(); - parser.set_language(get_language("python")).unwrap(); + parser.set_language(&get_language("python")).unwrap(); let source = " if one: a() @@ -230,7 +230,7 @@ fn test_node_children_by_field_name() { #[test] fn test_node_parent_of_child_by_field_name() { let mut parser = Parser::new(); - parser.set_language(get_language("javascript")).unwrap(); + parser.set_language(&get_language("javascript")).unwrap(); let tree = parser.parse("foo(a().b[0].c.d.e())", None).unwrap(); let call_node = tree .root_node() @@ -251,13 +251,15 @@ fn test_node_parent_of_child_by_field_name() { #[test] fn test_node_field_name_for_child() { let mut parser = Parser::new(); - parser.set_language(get_language("c")).unwrap(); - let tree = parser.parse("x + y;", None).unwrap(); + parser.set_language(&get_language("c")).unwrap(); + let tree = parser.parse("int w = x + y;", None).unwrap(); let translation_unit_node = tree.root_node(); - let binary_expression_node = translation_unit_node - .named_child(0) + let declaration_node = translation_unit_node.named_child(0).unwrap(); + + let binary_expression_node = declaration_node + .child_by_field_name("declarator") .unwrap() - .named_child(0) + .child_by_field_name("value") .unwrap(); assert_eq!(binary_expression_node.field_name_for_child(0), Some("left")); @@ -276,7 +278,7 @@ fn test_node_field_name_for_child() { #[test] fn test_node_child_by_field_name_with_extra_hidden_children() { let mut parser = Parser::new(); - parser.set_language(get_language("python")).unwrap(); + parser.set_language(&get_language("python")).unwrap(); // In the Python grammar, some fields are applied to `suite` nodes, // which consist of an invisible `indent` token followed by a block. @@ -319,7 +321,7 @@ fn test_node_named_child() { assert_eq!(false_node.end_position(), Point::new(4, 7)); assert_eq!(object_node.kind(), "object"); - assert_eq!(object_node.start_byte(), JSON_EXAMPLE.find("{").unwrap()); + assert_eq!(object_node.start_byte(), JSON_EXAMPLE.find('{').unwrap()); assert_eq!(object_node.start_position(), Point::new(5, 2)); assert_eq!(object_node.end_position(), Point::new(7, 3)); @@ -371,7 +373,7 @@ fn test_node_named_child_with_aliases_and_extras() { let mut parser = Parser::new(); parser - .set_language(get_test_language(&parser_name, &parser_code, None)) + .set_language(&get_test_language(&parser_name, &parser_code, None)) .unwrap(); let tree = parser.parse("b ... b ... c", None).unwrap(); @@ -385,13 +387,55 @@ fn test_node_named_child_with_aliases_and_extras() { assert_eq!(root.named_child(4).unwrap().kind(), "C"); } +#[test] +fn test_node_descendant_count() { + let tree = parse_json_example(); + let value_node = tree.root_node(); + let all_nodes = get_all_nodes(&tree); + + assert_eq!(value_node.descendant_count(), all_nodes.len()); + + let mut cursor = value_node.walk(); + for (i, node) in all_nodes.iter().enumerate() { + cursor.goto_descendant(i); + assert_eq!(cursor.node(), *node, "index {i}"); + } + + for (i, node) in all_nodes.iter().enumerate().rev() { + cursor.goto_descendant(i); + assert_eq!(cursor.node(), *node, "rev index {i}"); + } +} + +#[test] +fn test_descendant_count_single_node_tree() { + let mut parser = Parser::new(); + parser + .set_language(&get_language("embedded-template")) + .unwrap(); + let tree = parser.parse("hello", None).unwrap(); + + let nodes = get_all_nodes(&tree); + assert_eq!(nodes.len(), 2); + assert_eq!(tree.root_node().descendant_count(), 2); + + let mut cursor = tree.root_node().walk(); + + cursor.goto_descendant(0); + assert_eq!(cursor.depth(), 0); + assert_eq!(cursor.node(), nodes[0]); + cursor.goto_descendant(1); + assert_eq!(cursor.depth(), 1); + assert_eq!(cursor.node(), nodes[1]); +} + #[test] fn test_node_descendant_for_range() { let tree = parse_json_example(); - let array_node = tree.root_node().child(0).unwrap(); + let array_node = tree.root_node(); // Leaf node exactly matches the given bounds - byte query - let colon_index = JSON_EXAMPLE.find(":").unwrap(); + let colon_index = JSON_EXAMPLE.find(':').unwrap(); let colon_node = array_node .descendant_for_byte_range(colon_index, colon_index + 1) .unwrap(); @@ -412,7 +456,7 @@ fn test_node_descendant_for_range() { assert_eq!(colon_node.end_position(), Point::new(6, 8)); // The given point is between two adjacent leaf nodes - byte query - let colon_index = JSON_EXAMPLE.find(":").unwrap(); + let colon_index = JSON_EXAMPLE.find(':').unwrap(); let colon_node = array_node .descendant_for_byte_range(colon_index, colon_index) .unwrap(); @@ -506,10 +550,10 @@ fn test_node_edit() { for _ in 0..10 { let mut nodes_before = get_all_nodes(&tree); - let edit = get_random_edit(&mut rand, &mut code); + let edit = get_random_edit(&mut rand, &code); let mut tree2 = tree.clone(); - let edit = perform_edit(&mut tree2, &mut code, &edit); - for node in nodes_before.iter_mut() { + let edit = perform_edit(&mut tree2, &mut code, &edit).unwrap(); + for node in &mut nodes_before { node.edit(&edit); } @@ -532,7 +576,7 @@ fn test_node_edit() { #[test] fn test_root_node_with_offset() { let mut parser = Parser::new(); - parser.set_language(get_language("javascript")).unwrap(); + parser.set_language(&get_language("javascript")).unwrap(); let tree = parser.parse(" if (a) b", None).unwrap(); let node = tree.root_node_with_offset(6, Point::new(2, 2)); @@ -560,7 +604,7 @@ fn test_root_node_with_offset() { #[test] fn test_node_is_extra() { let mut parser = Parser::new(); - parser.set_language(get_language("javascript")).unwrap(); + parser.set_language(&get_language("javascript")).unwrap(); let tree = parser.parse("foo(/* hi */);", None).unwrap(); let root_node = tree.root_node(); @@ -575,7 +619,7 @@ fn test_node_is_extra() { #[test] fn test_node_sexp() { let mut parser = Parser::new(); - parser.set_language(get_language("javascript")).unwrap(); + parser.set_language(&get_language("javascript")).unwrap(); let tree = parser.parse("if (a) b", None).unwrap(); let root_node = tree.root_node(); let if_node = root_node.descendant_for_byte_range(0, 0).unwrap(); @@ -664,7 +708,7 @@ fn test_node_field_names() { let mut parser = Parser::new(); let language = get_test_language(&parser_name, &parser_code, None); - parser.set_language(language).unwrap(); + parser.set_language(&language).unwrap(); let tree = parser .parse("child-0 child-1 child-2 child-3 child-4", None) @@ -734,7 +778,7 @@ fn test_node_field_calls_in_language_without_fields() { let mut parser = Parser::new(); let language = get_test_language(&parser_name, &parser_code, None); - parser.set_language(language).unwrap(); + parser.set_language(&language).unwrap(); let tree = parser.parse("b c d", None).unwrap(); @@ -744,7 +788,7 @@ fn test_node_field_calls_in_language_without_fields() { let mut cursor = root_node.walk(); assert_eq!(cursor.field_name(), None); - assert_eq!(cursor.goto_first_child(), true); + assert!(cursor.goto_first_child()); assert_eq!(cursor.field_name(), None); } @@ -752,7 +796,7 @@ fn test_node_field_calls_in_language_without_fields() { fn test_node_is_named_but_aliased_as_anonymous() { let (parser_name, parser_code) = generate_parser_for_grammar( &fs::read_to_string( - &fixtures_dir() + fixtures_dir() .join("test_grammars") .join("named_rule_aliased_as_anonymous") .join("grammar.json"), @@ -763,7 +807,7 @@ fn test_node_is_named_but_aliased_as_anonymous() { let mut parser = Parser::new(); let language = get_test_language(&parser_name, &parser_code, None); - parser.set_language(language).unwrap(); + parser.set_language(&language).unwrap(); let tree = parser.parse("B C B", None).unwrap(); @@ -782,7 +826,7 @@ fn test_node_is_named_but_aliased_as_anonymous() { #[test] fn test_node_numeric_symbols_respect_simple_aliases() { let mut parser = Parser::new(); - parser.set_language(get_language("python")).unwrap(); + parser.set_language(&get_language("python")).unwrap(); // Example 1: // Python argument lists can contain "splat" arguments, which are not allowed within @@ -813,7 +857,7 @@ fn test_node_numeric_symbols_respect_simple_aliases() { // Ruby handles the unary (negative) and binary (minus) `-` operators using two different // tokens. One or more of these is an external token that's aliased as `-`. Their numeric // kind ids should match. - parser.set_language(get_language("ruby")).unwrap(); + parser.set_language(&get_language("ruby")).unwrap(); let tree = parser.parse("-a - b", None).unwrap(); let root = tree.root_node(); assert_eq!( @@ -841,22 +885,22 @@ fn get_all_nodes(tree: &Tree) -> Vec { let mut visited_children = false; let mut cursor = tree.walk(); loop { - result.push(cursor.node()); - if !visited_children && cursor.goto_first_child() { - continue; + if !visited_children { + result.push(cursor.node()); + if !cursor.goto_first_child() { + visited_children = true; + } } else if cursor.goto_next_sibling() { visited_children = false; - } else if cursor.goto_parent() { - visited_children = true; - } else { + } else if !cursor.goto_parent() { break; } } - return result; + result } fn parse_json_example() -> Tree { let mut parser = Parser::new(); - parser.set_language(get_language("json")).unwrap(); + parser.set_language(&get_language("json")).unwrap(); parser.parse(JSON_EXAMPLE, None).unwrap() } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/parser_hang_test.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/parser_hang_test.rs new file mode 100644 index 0000000000..0c742d805b --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/parser_hang_test.rs @@ -0,0 +1,104 @@ +// For some reasons `Command::spawn` doesn't work in CI env for many exotic arches. +#![cfg(all(any(target_arch = "x86_64", target_arch = "x86"), not(sanitizing)))] + +use crate::{ + generate::{generate_parser_for_grammar, load_grammar_file}, + tests::helpers::fixtures::{fixtures_dir, get_test_language}, +}; +use std::{ + env::VarError, + process::{Command, Stdio}, +}; +use tree_sitter::Parser; + +// The `sanitizing` cfg is required to don't run tests under specific sunitizer +// because they don't work well with subprocesses _(it's an assumption)_. +// +// Below are two alternative examples of how to disable tests for some arches +// if a way with excluding the whole mod from compilation wouldn't work well. +// +// XXX: Also may be it makes sense to keep such tests as ignored by default +// to omit surprises and enable them on CI by passing an extra option explicitly: +// +// > cargo test -- --include-ignored +// +// #[cfg(all(any(target_arch = "x86_64", target_arch = "x86"), not(sanitizing)))] +// #[cfg_attr(not(all(any(target_arch = "x86_64", target_arch = "x86"), not(sanitizing))), ignore)] +// +#[test] +fn test_grammar_that_should_hang_and_not_segfault() { + let parent_sleep_millis = 1000; + let test_name = "test_grammar_that_should_hang_and_not_segfault"; + let test_var = "CARGO_HANG_TEST"; + + eprintln!(" {test_name}"); + + let tests_exec_path = std::env::args() + .next() + .expect("Failed get get tests executable path"); + + match std::env::var(test_var) { + Ok(v) if v == test_name => { + eprintln!(" child process id {}", std::process::id()); + hang_test(); + } + + Err(VarError::NotPresent) => { + eprintln!(" parent process id {}", std::process::id()); + if true { + let mut command = Command::new(tests_exec_path); + command.arg(test_name).env(test_var, test_name); + if std::env::args().any(|x| x == "--nocapture") { + command.arg("--nocapture"); + } else { + command.stdout(Stdio::null()).stderr(Stdio::null()); + } + match command.spawn() { + Ok(mut child) => { + std::thread::sleep(std::time::Duration::from_millis(parent_sleep_millis)); + match child.try_wait() { + Ok(Some(status)) if status.success() => { + panic!("Child wasn't hang and exited successfully") + } + Ok(Some(status)) => panic!( + "Child wasn't hang and exited with status code: {:?}", + status.code() + ), + _ => (), + } + if let Err(e) = child.kill() { + eprintln!( + "Failed to kill hang test sub process id: {}, error: {e}", + child.id() + ); + } + } + Err(e) => panic!("{e}"), + } + } + } + + Err(e) => panic!("Env var error: {e}"), + _ => unreachable!(), + } + + fn hang_test() { + let test_grammar_dir = fixtures_dir() + .join("test_grammars") + .join("get_col_should_hang_not_crash"); + + let grammar_json = load_grammar_file(&test_grammar_dir.join("grammar.js"), None).unwrap(); + let (parser_name, parser_code) = + generate_parser_for_grammar(grammar_json.as_str()).unwrap(); + + let language = + get_test_language(&parser_name, &parser_code, Some(test_grammar_dir.as_path())); + + let mut parser = Parser::new(); + parser.set_language(&language).unwrap(); + + let code_that_should_hang = "\nHello"; + + parser.parse(code_that_should_hang, None).unwrap(); + } +} diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/parser_test.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/parser_test.rs index 78c6cda4c3..b57981b6a5 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/tests/parser_test.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/parser_test.rs @@ -1,24 +1,25 @@ use super::helpers::{ allocations, - edits::invert_edit, - edits::ReadRecorder, - fixtures::{get_language, get_test_grammar, get_test_language}, + edits::{invert_edit, ReadRecorder}, + fixtures::{get_language, get_test_language}, }; use crate::{ generate::generate_parser_for_grammar, parse::{perform_edit, Edit}, + tests::helpers::fixtures::fixtures_dir, }; -use proc_macro::retry; use std::{ + fs, sync::atomic::{AtomicUsize, Ordering}, thread, time, }; use tree_sitter::{IncludedRangesError, InputEdit, LogType, Parser, Point, Range}; +use tree_sitter_proc_macro::retry; #[test] fn test_parsing_simple_string() { let mut parser = Parser::new(); - parser.set_language(get_language("rust")).unwrap(); + parser.set_language(&get_language("rust")).unwrap(); let tree = parser .parse( @@ -49,7 +50,7 @@ fn test_parsing_simple_string() { #[test] fn test_parsing_with_logging() { let mut parser = Parser::new(); - parser.set_language(get_language("rust")).unwrap(); + parser.set_language(&get_language("rust")).unwrap(); let mut messages = Vec::new(); parser.set_logger(Some(Box::new(|log_type, message| { @@ -90,7 +91,7 @@ fn test_parsing_with_debug_graph_enabled() { let has_zero_indexed_row = |s: &str| s.contains("position: 0,"); let mut parser = Parser::new(); - parser.set_language(get_language("javascript")).unwrap(); + parser.set_language(&get_language("javascript")).unwrap(); let mut debug_graph_file = tempfile::tempfile().unwrap(); parser.print_dot_graphs(&debug_graph_file); @@ -103,8 +104,7 @@ fn test_parsing_with_debug_graph_enabled() { for line in log_reader { assert!( !has_zero_indexed_row(&line), - "Graph log output includes zero-indexed row: {}", - line + "Graph log output includes zero-indexed row: {line}", ); } } @@ -112,7 +112,7 @@ fn test_parsing_with_debug_graph_enabled() { #[test] fn test_parsing_with_custom_utf8_input() { let mut parser = Parser::new(); - parser.set_language(get_language("rust")).unwrap(); + parser.set_language(&get_language("rust")).unwrap(); let lines = &["pub fn foo() {", " 1", "}"]; @@ -125,7 +125,7 @@ fn test_parsing_with_custom_utf8_input() { if column < lines[row].as_bytes().len() { &lines[row].as_bytes()[column..] } else { - "\n".as_bytes() + b"\n" } } else { &[] @@ -148,19 +148,19 @@ fn test_parsing_with_custom_utf8_input() { ) ); assert_eq!(root.kind(), "source_file"); - assert_eq!(root.has_error(), false); + assert!(!root.has_error()); assert_eq!(root.child(0).unwrap().kind(), "function_item"); } #[test] fn test_parsing_with_custom_utf16_input() { let mut parser = Parser::new(); - parser.set_language(get_language("rust")).unwrap(); + parser.set_language(&get_language("rust")).unwrap(); - let lines: Vec> = ["pub fn foo() {", " 1", "}"] + let lines = ["pub fn foo() {", " 1", "}"] .iter() - .map(|s| s.encode_utf16().collect()) - .collect(); + .map(|s| s.encode_utf16().collect::>()) + .collect::>(); let tree = parser .parse_utf16_with( @@ -187,14 +187,14 @@ fn test_parsing_with_custom_utf16_input() { "(source_file (function_item (visibility_modifier) name: (identifier) parameters: (parameters) body: (block (integer_literal))))" ); assert_eq!(root.kind(), "source_file"); - assert_eq!(root.has_error(), false); + assert!(!root.has_error()); assert_eq!(root.child(0).unwrap().kind(), "function_item"); } #[test] fn test_parsing_with_callback_returning_owned_strings() { let mut parser = Parser::new(); - parser.set_language(get_language("rust")).unwrap(); + parser.set_language(&get_language("rust")).unwrap(); let text = b"pub fn foo() { 1 }"; @@ -215,7 +215,7 @@ fn test_parsing_with_callback_returning_owned_strings() { #[test] fn test_parsing_text_with_byte_order_mark() { let mut parser = Parser::new(); - parser.set_language(get_language("rust")).unwrap(); + parser.set_language(&get_language("rust")).unwrap(); // Parse UTF16 text with a BOM let tree = parser @@ -274,15 +274,18 @@ fn test_parsing_text_with_byte_order_mark() { #[test] fn test_parsing_invalid_chars_at_eof() { let mut parser = Parser::new(); - parser.set_language(get_language("json")).unwrap(); + parser.set_language(&get_language("json")).unwrap(); let tree = parser.parse(b"\xdf", None).unwrap(); - assert_eq!(tree.root_node().to_sexp(), "(ERROR (UNEXPECTED INVALID))"); + assert_eq!( + tree.root_node().to_sexp(), + "(document (ERROR (UNEXPECTED INVALID)))" + ); } #[test] fn test_parsing_unexpected_null_characters_within_source() { let mut parser = Parser::new(); - parser.set_language(get_language("javascript")).unwrap(); + parser.set_language(&get_language("javascript")).unwrap(); let tree = parser.parse(b"var \0 something;", None).unwrap(); assert_eq!( tree.root_node().to_sexp(), @@ -293,7 +296,7 @@ fn test_parsing_unexpected_null_characters_within_source() { #[test] fn test_parsing_ends_when_input_callback_returns_empty() { let mut parser = Parser::new(); - parser.set_language(get_language("javascript")).unwrap(); + parser.set_language(&get_language("javascript")).unwrap(); let mut i = 0; let source = b"abcdefghijklmnoqrs"; let tree = parser @@ -317,7 +320,7 @@ fn test_parsing_ends_when_input_callback_returns_empty() { #[test] fn test_parsing_after_editing_beginning_of_code() { let mut parser = Parser::new(); - parser.set_language(get_language("javascript")).unwrap(); + parser.set_language(&get_language("javascript")).unwrap(); let mut code = b"123 + 456 * (10 + x);".to_vec(); let mut tree = parser.parse(&code, None).unwrap(); @@ -339,7 +342,8 @@ fn test_parsing_after_editing_beginning_of_code() { deleted_length: 0, inserted_text: b" || 5".to_vec(), }, - ); + ) + .unwrap(); let mut recorder = ReadRecorder::new(&code); let tree = parser @@ -364,7 +368,7 @@ fn test_parsing_after_editing_beginning_of_code() { #[test] fn test_parsing_after_editing_end_of_code() { let mut parser = Parser::new(); - parser.set_language(get_language("javascript")).unwrap(); + parser.set_language(&get_language("javascript")).unwrap(); let mut code = b"x * (100 + abc);".to_vec(); let mut tree = parser.parse(&code, None).unwrap(); @@ -386,7 +390,8 @@ fn test_parsing_after_editing_end_of_code() { deleted_length: 0, inserted_text: b".d".to_vec(), }, - ); + ) + .unwrap(); let mut recorder = ReadRecorder::new(&code); let tree = parser @@ -411,7 +416,7 @@ fn test_parsing_after_editing_end_of_code() { #[test] fn test_parsing_empty_file_with_reused_tree() { let mut parser = Parser::new(); - parser.set_language(get_language("rust")).unwrap(); + parser.set_language(&get_language("rust")).unwrap(); let tree = parser.parse("", None); parser.parse("", tree.as_ref()); @@ -422,16 +427,15 @@ fn test_parsing_empty_file_with_reused_tree() { #[test] fn test_parsing_after_editing_tree_that_depends_on_column_values() { - let (grammar, path) = get_test_grammar("uses_current_column"); + let dir = fixtures_dir() + .join("test_grammars") + .join("uses_current_column"); + let grammar = fs::read_to_string(dir.join("grammar.json")).unwrap(); let (grammar_name, parser_code) = generate_parser_for_grammar(&grammar).unwrap(); let mut parser = Parser::new(); parser - .set_language(get_test_language( - &grammar_name, - &parser_code, - path.as_ref().map(AsRef::as_ref), - )) + .set_language(&get_test_language(&grammar_name, &parser_code, Some(&dir))) .unwrap(); let mut code = b" @@ -461,7 +465,8 @@ h + i deleted_length: 0, inserted_text: b"1234".to_vec(), }, - ); + ) + .unwrap(); assert_eq!( code, @@ -500,13 +505,13 @@ h + i #[test] fn test_parsing_after_detecting_error_in_the_middle_of_a_string_token() { let mut parser = Parser::new(); - parser.set_language(get_language("python")).unwrap(); + parser.set_language(&get_language("python")).unwrap(); let mut source = b"a = b, 'c, d'".to_vec(); let tree = parser.parse(&source, None).unwrap(); assert_eq!( tree.root_node().to_sexp(), - "(module (expression_statement (assignment left: (identifier) right: (expression_list (identifier) (string string_content: (string_content))))))" + "(module (expression_statement (assignment left: (identifier) right: (expression_list (identifier) (string (string_start) (string_content) (string_end))))))" ); // Delete a suffix of the source code, starting in the middle of the string @@ -525,12 +530,12 @@ fn test_parsing_after_detecting_error_in_the_middle_of_a_string_token() { let undo = invert_edit(&source, &edit); let mut tree2 = tree.clone(); - perform_edit(&mut tree2, &mut source, &edit); + perform_edit(&mut tree2, &mut source, &edit).unwrap(); tree2 = parser.parse(&source, Some(&tree2)).unwrap(); assert!(tree2.root_node().has_error()); let mut tree3 = tree2.clone(); - perform_edit(&mut tree3, &mut source, &undo); + perform_edit(&mut tree3, &mut source, &undo).unwrap(); tree3 = parser.parse(&source, Some(&tree3)).unwrap(); assert_eq!(tree3.root_node().to_sexp(), tree.root_node().to_sexp(),); } @@ -544,7 +549,7 @@ fn test_parsing_on_multiple_threads() { let this_file_source = include_str!("parser_test.rs"); let mut parser = Parser::new(); - parser.set_language(get_language("rust")).unwrap(); + parser.set_language(&get_language("rust")).unwrap(); let tree = parser.parse(this_file_source, None).unwrap(); let mut parse_threads = Vec::new(); @@ -572,7 +577,7 @@ fn test_parsing_on_multiple_threads() { // Reparse using the old tree as a starting point. let mut parser = Parser::new(); - parser.set_language(get_language("rust")).unwrap(); + parser.set_language(&get_language("rust")).unwrap(); parser.parse(&prepended_source, Some(&tree_clone)).unwrap() })); } @@ -593,7 +598,7 @@ fn test_parsing_cancelled_by_another_thread() { let cancellation_flag = std::sync::Arc::new(AtomicUsize::new(0)); let mut parser = Parser::new(); - parser.set_language(get_language("javascript")).unwrap(); + parser.set_language(&get_language("javascript")).unwrap(); unsafe { parser.set_cancellation_flag(Some(&cancellation_flag)) }; // Long input - parsing succeeds @@ -642,7 +647,7 @@ fn test_parsing_cancelled_by_another_thread() { #[retry(10)] fn test_parsing_with_a_timeout() { let mut parser = Parser::new(); - parser.set_language(get_language("json")).unwrap(); + parser.set_language(&get_language("json")).unwrap(); // Parse an infinitely-long array, but pause after 1ms of processing. parser.set_timeout_micros(1000); @@ -681,14 +686,10 @@ fn test_parsing_with_a_timeout() { parser.set_timeout_micros(0); let tree = parser .parse_with( - &mut |offset, _| { - if offset > 5000 { - "".as_bytes() - } else if offset == 5000 { - "]".as_bytes() - } else { - ",0".as_bytes() - } + &mut |offset, _| match offset { + 5001.. => "".as_bytes(), + 5000 => "]".as_bytes(), + _ => ",0".as_bytes(), }, None, ) @@ -697,9 +698,10 @@ fn test_parsing_with_a_timeout() { } #[test] +#[retry(10)] fn test_parsing_with_a_timeout_and_a_reset() { let mut parser = Parser::new(); - parser.set_language(get_language("json")).unwrap(); + parser.set_language(&get_language("json")).unwrap(); parser.set_timeout_micros(5); let tree = parser.parse( @@ -752,10 +754,11 @@ fn test_parsing_with_a_timeout_and_a_reset() { } #[test] +#[retry(10)] fn test_parsing_with_a_timeout_and_implicit_reset() { allocations::record(|| { let mut parser = Parser::new(); - parser.set_language(get_language("javascript")).unwrap(); + parser.set_language(&get_language("javascript")).unwrap(); parser.set_timeout_micros(5); let tree = parser.parse( @@ -766,7 +769,7 @@ fn test_parsing_with_a_timeout_and_implicit_reset() { // Changing the parser's language implicitly resets, discarding // the previous partial parse. - parser.set_language(get_language("json")).unwrap(); + parser.set_language(&get_language("json")).unwrap(); parser.set_timeout_micros(0); let tree = parser.parse( "[null, 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]", @@ -785,10 +788,11 @@ fn test_parsing_with_a_timeout_and_implicit_reset() { } #[test] +#[retry(10)] fn test_parsing_with_timeout_and_no_completion() { allocations::record(|| { let mut parser = Parser::new(); - parser.set_language(get_language("javascript")).unwrap(); + parser.set_language(&get_language("javascript")).unwrap(); parser.set_timeout_micros(5); let tree = parser.parse( @@ -808,7 +812,7 @@ fn test_parsing_with_one_included_range() { let source_code = "hi"; let mut parser = Parser::new(); - parser.set_language(get_language("html")).unwrap(); + parser.set_language(&get_language("html")).unwrap(); let html_tree = parser.parse(source_code, None).unwrap(); let script_content_node = html_tree.root_node().child(1).unwrap().child(1).unwrap(); assert_eq!(script_content_node.kind(), "raw_text"); @@ -816,7 +820,7 @@ fn test_parsing_with_one_included_range() { parser .set_included_ranges(&[script_content_node.range()]) .unwrap(); - parser.set_language(get_language("javascript")).unwrap(); + parser.set_language(&get_language("javascript")).unwrap(); let js_tree = parser.parse(source_code, None).unwrap(); assert_eq!( @@ -824,7 +828,7 @@ fn test_parsing_with_one_included_range() { concat!( "(program (expression_statement (call_expression ", "function: (member_expression object: (identifier) property: (property_identifier)) ", - "arguments: (arguments (string)))))", + "arguments: (arguments (string (string_fragment))))))", ) ); assert_eq!( @@ -839,23 +843,23 @@ fn test_parsing_with_multiple_included_ranges() { let source_code = "html `
Hello, ${name.toUpperCase()}, it's ${now()}.
`"; let mut parser = Parser::new(); - parser.set_language(get_language("javascript")).unwrap(); + parser.set_language(&get_language("javascript")).unwrap(); let js_tree = parser.parse(source_code, None).unwrap(); let template_string_node = js_tree .root_node() .descendant_for_byte_range( - source_code.find("
").unwrap(), - source_code.find("Hello").unwrap(), + source_code.find("`<").unwrap(), + source_code.find(">`").unwrap(), ) .unwrap(); assert_eq!(template_string_node.kind(), "template_string"); let open_quote_node = template_string_node.child(0).unwrap(); - let interpolation_node1 = template_string_node.child(1).unwrap(); - let interpolation_node2 = template_string_node.child(2).unwrap(); - let close_quote_node = template_string_node.child(3).unwrap(); + let interpolation_node1 = template_string_node.child(2).unwrap(); + let interpolation_node2 = template_string_node.child(4).unwrap(); + let close_quote_node = template_string_node.child(6).unwrap(); - parser.set_language(get_language("html")).unwrap(); + parser.set_language(&get_language("html")).unwrap(); let html_ranges = &[ Range { start_byte: open_quote_node.end_byte(), @@ -882,7 +886,7 @@ fn test_parsing_with_multiple_included_ranges() { assert_eq!( html_tree.root_node().to_sexp(), concat!( - "(fragment (element", + "(document (element", " (start_tag (tag_name))", " (text)", " (element (start_tag (tag_name)) (end_tag (tag_name)))", @@ -934,7 +938,7 @@ fn test_parsing_with_included_range_containing_mismatched_positions() { let source_code = "
test
{_ignore_this_part_}"; let mut parser = Parser::new(); - parser.set_language(get_language("html")).unwrap(); + parser.set_language(&get_language("html")).unwrap(); let end_byte = source_code.find("{_ignore_this_part_").unwrap(); @@ -961,7 +965,7 @@ fn test_parsing_with_included_range_containing_mismatched_positions() { assert_eq!( html_tree.root_node().to_sexp(), - "(fragment (element (start_tag (tag_name)) (text) (end_tag (tag_name))))" + "(document (element (start_tag (tag_name)) (text) (end_tag (tag_name))))" ); } @@ -1009,13 +1013,17 @@ fn test_parsing_error_in_invalid_included_ranges() { #[test] fn test_parsing_utf16_code_with_errors_at_the_end_of_an_included_range() { let source_code = ""; - let utf16_source_code: Vec = source_code.as_bytes().iter().map(|c| *c as u16).collect(); + let utf16_source_code = source_code + .as_bytes() + .iter() + .map(|c| u16::from(*c)) + .collect::>(); let start_byte = 2 * source_code.find("a.").unwrap(); let end_byte = 2 * source_code.find("").unwrap(); let mut parser = Parser::new(); - parser.set_language(get_language("javascript")).unwrap(); + parser.set_language(&get_language("javascript")).unwrap(); parser .set_included_ranges(&[Range { start_byte, @@ -1037,7 +1045,7 @@ fn test_parsing_with_external_scanner_that_uses_included_range_boundaries() { let range2_end_byte = range2_start_byte + " d() ".len(); let mut parser = Parser::new(); - parser.set_language(get_language("javascript")).unwrap(); + parser.set_language(&get_language("javascript")).unwrap(); parser .set_included_ranges(&[ Range { @@ -1081,7 +1089,7 @@ fn test_parsing_with_a_newly_excluded_range() { // Parse HTML including the template directive, which will cause an error let mut parser = Parser::new(); - parser.set_language(get_language("html")).unwrap(); + parser.set_language(&get_language("html")).unwrap(); let mut first_tree = parser .parse_with(&mut chunked_input(&source_code, 3), None) .unwrap(); @@ -1126,7 +1134,7 @@ fn test_parsing_with_a_newly_excluded_range() { assert_eq!( tree.root_node().to_sexp(), concat!( - "(fragment (text) (element", + "(document (text) (element", " (start_tag (tag_name))", " (element (start_tag (tag_name)) (end_tag (tag_name)))", " (end_tag (tag_name))))" @@ -1168,12 +1176,12 @@ fn test_parsing_with_a_newly_included_range() { // Parse only the first code directive as JavaScript let mut parser = Parser::new(); - parser.set_language(get_language("javascript")).unwrap(); + parser.set_language(&get_language("javascript")).unwrap(); parser .set_included_ranges(&[simple_range(range1_start, range1_end)]) .unwrap(); let tree = parser - .parse_with(&mut chunked_input(&source_code, 3), None) + .parse_with(&mut chunked_input(source_code, 3), None) .unwrap(); assert_eq!( tree.root_node().to_sexp(), @@ -1192,7 +1200,7 @@ fn test_parsing_with_a_newly_included_range() { ]) .unwrap(); let tree2 = parser - .parse_with(&mut chunked_input(&source_code, 3), Some(&tree)) + .parse_with(&mut chunked_input(source_code, 3), Some(&tree)) .unwrap(); assert_eq!( tree2.root_node().to_sexp(), @@ -1216,7 +1224,7 @@ fn test_parsing_with_a_newly_included_range() { simple_range(range3_start, range3_end), ]) .unwrap(); - let tree3 = parser.parse(&source_code, Some(&tree)).unwrap(); + let tree3 = parser.parse(source_code, Some(&tree)).unwrap(); assert_eq!( tree3.root_node().to_sexp(), concat!( @@ -1260,7 +1268,7 @@ fn test_parsing_with_included_ranges_and_missing_tokens() { let mut parser = Parser::new(); parser - .set_language(get_test_language(&parser_name, &parser_code, None)) + .set_language(&get_test_language(&parser_name, &parser_code, None)) .unwrap(); // There's a missing `a` token at the beginning of the code. It must be inserted @@ -1293,7 +1301,119 @@ fn test_parsing_with_included_ranges_and_missing_tokens() { assert_eq!(root.child(3).unwrap().start_byte(), 4); } -fn simple_range(start: usize, end: usize) -> Range { +#[test] +fn test_grammars_that_can_hang_on_eof() { + let (parser_name, parser_code) = generate_parser_for_grammar( + r#" + { + "name": "test_single_null_char_regex", + "rules": { + "source_file": { + "type": "SEQ", + "members": [ + { "type": "STRING", "value": "\"" }, + { "type": "PATTERN", "value": "[\\x00]*" }, + { "type": "STRING", "value": "\"" } + ] + } + }, + "extras": [ { "type": "PATTERN", "value": "\\s" } ] + } + "#, + ) + .unwrap(); + + let mut parser = Parser::new(); + parser + .set_language(&get_test_language(&parser_name, &parser_code, None)) + .unwrap(); + parser.parse("\"", None).unwrap(); + + let (parser_name, parser_code) = generate_parser_for_grammar( + r#" + { + "name": "test_null_char_with_next_char_regex", + "rules": { + "source_file": { + "type": "SEQ", + "members": [ + { "type": "STRING", "value": "\"" }, + { "type": "PATTERN", "value": "[\\x00-\\x01]*" }, + { "type": "STRING", "value": "\"" } + ] + } + }, + "extras": [ { "type": "PATTERN", "value": "\\s" } ] + } + "#, + ) + .unwrap(); + + parser + .set_language(&get_test_language(&parser_name, &parser_code, None)) + .unwrap(); + parser.parse("\"", None).unwrap(); + + let (parser_name, parser_code) = generate_parser_for_grammar( + r#" + { + "name": "test_null_char_with_range_regex", + "rules": { + "source_file": { + "type": "SEQ", + "members": [ + { "type": "STRING", "value": "\"" }, + { "type": "PATTERN", "value": "[\\x00-\\x7F]*" }, + { "type": "STRING", "value": "\"" } + ] + } + }, + "extras": [ { "type": "PATTERN", "value": "\\s" } ] + } + "#, + ) + .unwrap(); + + parser + .set_language(&get_test_language(&parser_name, &parser_code, None)) + .unwrap(); + parser.parse("\"", None).unwrap(); +} + +#[test] +fn test_parse_stack_recursive_merge_error_cost_calculation_bug() { + let source_code = r#" +fn main() { + if n == 1 { + } else if n == 2 { + } else { + } +} + +let y = if x == 5 { 10 } else { 15 }; + +if foo && bar {} + +if foo && bar || baz {} +"#; + + let mut parser = Parser::new(); + parser.set_language(&get_language("rust")).unwrap(); + + let mut tree = parser.parse(source_code, None).unwrap(); + + let edit = Edit { + position: 60, + deleted_length: 63, + inserted_text: Vec::new(), + }; + let mut input = source_code.as_bytes().to_vec(); + perform_edit(&mut tree, &mut input, &edit).unwrap(); + + parser.parse(&input, Some(&tree)).unwrap(); +} + +const fn simple_range(start: usize, end: usize) -> Range { Range { start_byte: start, end_byte: end, diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/pathological_test.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/pathological_test.rs index ec10884c31..7e6dad16fe 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/tests/pathological_test.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/pathological_test.rs @@ -8,7 +8,7 @@ fn test_pathological_example_1() { allocations::record(|| { let mut parser = Parser::new(); - parser.set_language(get_language(language)).unwrap(); + parser.set_language(&get_language(language)).unwrap(); parser.parse(source, None).unwrap(); }); } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/proc_macro/Cargo.toml b/third-party/tree-sitter/tree-sitter/cli/src/tests/proc_macro/Cargo.toml index e6900d10e7..ade4d61682 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/tests/proc_macro/Cargo.toml +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/proc_macro/Cargo.toml @@ -1,15 +1,15 @@ [package] -name = "proc_macro" -version = "0.1.0" -edition = "2021" -publish = false +name = "tree-sitter-tests-proc-macro" +version = "0.0.0" +edition.workspace = true rust-version.workspace = true +publish = false [lib] proc-macro = true [dependencies] -proc-macro2 = "1" -quote = "1" +proc-macro2 = "1.0.78" +quote = "1.0.35" rand = "0.8.5" -syn = { version = "1", features = ["full"] } +syn = { version = "2.0.52", features = ["full"] } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/proc_macro/src/lib.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/proc_macro/src/lib.rs index d831a75ba7..3079047eb4 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/tests/proc_macro/src/lib.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/proc_macro/src/lib.rs @@ -81,9 +81,9 @@ pub fn test_with_seed(args: TokenStream, input: TokenStream) -> TokenStream { retry.replace(LitInt::new("0", Span::mixed_site())); } - Ok(Args { - retry: retry.expect("`retry` parameter is requred"), - seed: seed.expect("`initial_seed` parameter is required"), + Ok(Self { + retry: retry.expect("`retry` parameter is required"), + seed: seed.expect("`seed` parameter is required"), seed_fn, }) } @@ -101,8 +101,6 @@ pub fn test_with_seed(args: TokenStream, input: TokenStream) -> TokenStream { let attrs = func.attrs.clone(); let name = func.sig.ident.clone(); - // dbg!(quote::ToTokens::into_token_stream(&func)); - TokenStream::from(quote! { #[test] #(#attrs),* diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/query_test.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/query_test.rs index 7d01c26e65..e2c3fd8211 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/tests/query_test.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/query_test.rs @@ -1,15 +1,20 @@ use super::helpers::{ allocations, - fixtures::get_language, - query_helpers::{Match, Pattern}, + fixtures::{get_language, get_test_language}, + query_helpers::{assert_query_matches, Match, Pattern}, ITERATION_COUNT, }; +use crate::{ + generate::generate_parser_for_grammar, + tests::helpers::query_helpers::{collect_captures, collect_matches}, +}; +use indoc::indoc; use lazy_static::lazy_static; use rand::{prelude::StdRng, SeedableRng}; use std::{env, fmt::Write}; use tree_sitter::{ - CaptureQuantifier, Language, Node, Parser, Point, Query, QueryCapture, QueryCursor, QueryError, - QueryErrorKind, QueryMatch, QueryPredicate, QueryPredicateArg, QueryProperty, + CaptureQuantifier, Language, Node, Parser, Point, Query, QueryCursor, QueryError, + QueryErrorKind, QueryPredicate, QueryPredicateArg, QueryProperty, }; use unindent::Unindent; @@ -22,16 +27,16 @@ fn test_query_errors_on_invalid_syntax() { allocations::record(|| { let language = get_language("javascript"); - assert!(Query::new(language, "(if_statement)").is_ok()); + assert!(Query::new(&language, "(if_statement)").is_ok()); assert!(Query::new( - language, + &language, "(if_statement condition:(parenthesized_expression (identifier)))" ) .is_ok()); // Mismatched parens assert_eq!( - Query::new(language, "(if_statement").unwrap_err().message, + Query::new(&language, "(if_statement").unwrap_err().message, [ "(if_statement", // " ^", @@ -39,7 +44,7 @@ fn test_query_errors_on_invalid_syntax() { .join("\n") ); assert_eq!( - Query::new(language, "; comment 1\n; comment 2\n (if_statement))") + Query::new(&language, "; comment 1\n; comment 2\n (if_statement))") .unwrap_err() .message, [ @@ -52,7 +57,7 @@ fn test_query_errors_on_invalid_syntax() { // Return an error at the *beginning* of a bare identifier not followed a colon. // If there's a colon but no pattern, return an error at the end of the colon. assert_eq!( - Query::new(language, "(if_statement identifier)") + Query::new(&language, "(if_statement identifier)") .unwrap_err() .message, [ @@ -62,7 +67,7 @@ fn test_query_errors_on_invalid_syntax() { .join("\n") ); assert_eq!( - Query::new(language, "(if_statement condition:)") + Query::new(&language, "(if_statement condition:)") .unwrap_err() .message, [ @@ -74,19 +79,19 @@ fn test_query_errors_on_invalid_syntax() { // Return an error at the beginning of an unterminated string. assert_eq!( - Query::new(language, r#"(identifier) "h "#) + Query::new(&language, r#"(identifier) "h "#) .unwrap_err() .message, [ r#"(identifier) "h "#, // - r#" ^"#, + r" ^", ] .join("\n") ); // Empty tree pattern assert_eq!( - Query::new(language, r#"((identifier) ()"#) + Query::new(&language, r"((identifier) ()") .unwrap_err() .message, [ @@ -98,7 +103,7 @@ fn test_query_errors_on_invalid_syntax() { // Empty alternation assert_eq!( - Query::new(language, r#"((identifier) [])"#) + Query::new(&language, r"((identifier) [])") .unwrap_err() .message, [ @@ -110,7 +115,7 @@ fn test_query_errors_on_invalid_syntax() { // Unclosed sibling expression with predicate assert_eq!( - Query::new(language, r#"((identifier) (#a)"#) + Query::new(&language, r"((identifier) (#a)") .unwrap_err() .message, [ @@ -122,37 +127,37 @@ fn test_query_errors_on_invalid_syntax() { // Unclosed predicate assert_eq!( - Query::new(language, r#"((identifier) @x (#eq? @x a"#) + Query::new(&language, r"((identifier) @x (#eq? @x a") .unwrap_err() .message, [ - r#"((identifier) @x (#eq? @x a"#, - r#" ^"#, + r"((identifier) @x (#eq? @x a", + r" ^", ] .join("\n") ); // Need at least one child node for a child anchor assert_eq!( - Query::new(language, r#"(statement_block .)"#) + Query::new(&language, r"(statement_block .)") .unwrap_err() .message, [ // - r#"(statement_block .)"#, - r#" ^"# + r"(statement_block .)", + r" ^" ] .join("\n") ); // Need a field name after a negated field operator assert_eq!( - Query::new(language, r#"(statement_block ! (if_statement))"#) + Query::new(&language, r"(statement_block ! (if_statement))") .unwrap_err() .message, [ - r#"(statement_block ! (if_statement))"#, - r#" ^"# + r"(statement_block ! (if_statement))", + r" ^" ] .join("\n") ); @@ -160,12 +165,12 @@ fn test_query_errors_on_invalid_syntax() { // Unclosed alternation within a tree // tree-sitter/tree-sitter/issues/968 assert_eq!( - Query::new(get_language("c"), r#"(parameter_list [ ")" @foo)"#) + Query::new(&get_language("c"), r#"(parameter_list [ ")" @foo)"#) .unwrap_err() .message, [ r#"(parameter_list [ ")" @foo)"#, - r#" ^"# + r" ^" ] .join("\n") ); @@ -174,14 +179,14 @@ fn test_query_errors_on_invalid_syntax() { // tree-sitter/tree-sitter/issues/1436 assert_eq!( Query::new( - get_language("python"), - r#"[(unary_operator (_) @operand) (not_operator (_) @operand]"# + &get_language("python"), + r"[(unary_operator (_) @operand) (not_operator (_) @operand]" ) .unwrap_err() .message, [ - r#"[(unary_operator (_) @operand) (not_operator (_) @operand]"#, - r#" ^"# + r"[(unary_operator (_) @operand) (not_operator (_) @operand]", + r" ^" ] .join("\n") ); @@ -194,7 +199,7 @@ fn test_query_errors_on_invalid_symbols() { let language = get_language("javascript"); assert_eq!( - Query::new(language, "(clas)").unwrap_err(), + Query::new(&language, "(clas)").unwrap_err(), QueryError { row: 0, offset: 1, @@ -204,7 +209,7 @@ fn test_query_errors_on_invalid_symbols() { } ); assert_eq!( - Query::new(language, "(if_statement (arrayyyyy))").unwrap_err(), + Query::new(&language, "(if_statement (arrayyyyy))").unwrap_err(), QueryError { row: 0, offset: 15, @@ -214,7 +219,7 @@ fn test_query_errors_on_invalid_symbols() { }, ); assert_eq!( - Query::new(language, "(if_statement condition: (non_existent3))").unwrap_err(), + Query::new(&language, "(if_statement condition: (non_existent3))").unwrap_err(), QueryError { row: 0, offset: 26, @@ -224,7 +229,7 @@ fn test_query_errors_on_invalid_symbols() { }, ); assert_eq!( - Query::new(language, "(if_statement condit: (identifier))").unwrap_err(), + Query::new(&language, "(if_statement condit: (identifier))").unwrap_err(), QueryError { row: 0, offset: 14, @@ -234,7 +239,7 @@ fn test_query_errors_on_invalid_symbols() { }, ); assert_eq!( - Query::new(language, "(if_statement conditioning: (identifier))").unwrap_err(), + Query::new(&language, "(if_statement conditioning: (identifier))").unwrap_err(), QueryError { row: 0, offset: 14, @@ -244,7 +249,7 @@ fn test_query_errors_on_invalid_symbols() { } ); assert_eq!( - Query::new(language, "(if_statement !alternativ)").unwrap_err(), + Query::new(&language, "(if_statement !alternativ)").unwrap_err(), QueryError { row: 0, offset: 15, @@ -254,7 +259,7 @@ fn test_query_errors_on_invalid_symbols() { } ); assert_eq!( - Query::new(language, "(if_statement !alternatives)").unwrap_err(), + Query::new(&language, "(if_statement !alternatives)").unwrap_err(), QueryError { row: 0, offset: 15, @@ -272,7 +277,7 @@ fn test_query_errors_on_invalid_predicates() { let language = get_language("javascript"); assert_eq!( - Query::new(language, "((identifier) @id (@id))").unwrap_err(), + Query::new(&language, "((identifier) @id (@id))").unwrap_err(), QueryError { kind: QueryErrorKind::Syntax, row: 0, @@ -286,7 +291,7 @@ fn test_query_errors_on_invalid_predicates() { } ); assert_eq!( - Query::new(language, "((identifier) @id (#eq? @id))").unwrap_err(), + Query::new(&language, "((identifier) @id (#eq? @id))").unwrap_err(), QueryError { kind: QueryErrorKind::Predicate, row: 0, @@ -297,7 +302,7 @@ fn test_query_errors_on_invalid_predicates() { } ); assert_eq!( - Query::new(language, "((identifier) @id (#eq? @id @ok))").unwrap_err(), + Query::new(&language, "((identifier) @id (#eq? @id @ok))").unwrap_err(), QueryError { kind: QueryErrorKind::Capture, row: 0, @@ -317,29 +322,29 @@ fn test_query_errors_on_impossible_patterns() { allocations::record(|| { assert_eq!( Query::new( - js_lang, - "(binary_expression left: (identifier) left: (identifier))" + &js_lang, + "(binary_expression left: (expression (identifier)) left: (expression (identifier)))" ), Err(QueryError { kind: QueryErrorKind::Structure, row: 0, - offset: 38, - column: 38, + offset: 51, + column: 51, message: [ - "(binary_expression left: (identifier) left: (identifier))", - " ^" + "(binary_expression left: (expression (identifier)) left: (expression (identifier)))", + " ^", ] .join("\n"), }) ); Query::new( - js_lang, + &js_lang, "(function_declaration name: (identifier) (statement_block))", ) .unwrap(); assert_eq!( - Query::new(js_lang, "(function_declaration name: (statement_block))"), + Query::new(&js_lang, "(function_declaration name: (statement_block))"), Err(QueryError { kind: QueryErrorKind::Structure, row: 0, @@ -353,9 +358,9 @@ fn test_query_errors_on_impossible_patterns() { }) ); - Query::new(rb_lang, "(call receiver:(call))").unwrap(); + Query::new(&rb_lang, "(call receiver:(call))").unwrap(); assert_eq!( - Query::new(rb_lang, "(call receiver:(binary))"), + Query::new(&rb_lang, "(call receiver:(binary))"), Err(QueryError { kind: QueryErrorKind::Structure, row: 0, @@ -370,9 +375,9 @@ fn test_query_errors_on_impossible_patterns() { ); Query::new( - js_lang, + &js_lang, "[ - (function (identifier)) + (function_expression (identifier)) (function_declaration (identifier)) (generator_function_declaration (identifier)) ]", @@ -380,9 +385,9 @@ fn test_query_errors_on_impossible_patterns() { .unwrap(); assert_eq!( Query::new( - js_lang, + &js_lang, "[ - (function (identifier)) + (function_expression (identifier)) (function_declaration (object)) (generator_function_declaration (identifier)) ]", @@ -390,7 +395,7 @@ fn test_query_errors_on_impossible_patterns() { Err(QueryError { kind: QueryErrorKind::Structure, row: 2, - offset: 88, + offset: 99, column: 42, message: [ " (function_declaration (object))", // @@ -401,7 +406,7 @@ fn test_query_errors_on_impossible_patterns() { ); assert_eq!( - Query::new(js_lang, "(identifier (identifier))",), + Query::new(&js_lang, "(identifier (identifier))",), Err(QueryError { kind: QueryErrorKind::Structure, row: 0, @@ -415,7 +420,7 @@ fn test_query_errors_on_impossible_patterns() { }) ); assert_eq!( - Query::new(js_lang, "(true (true))",), + Query::new(&js_lang, "(true (true))",), Err(QueryError { kind: QueryErrorKind::Structure, row: 0, @@ -430,21 +435,21 @@ fn test_query_errors_on_impossible_patterns() { ); Query::new( - js_lang, + &js_lang, "(if_statement - condition: (parenthesized_expression (_expression) @cond))", + condition: (parenthesized_expression (expression) @cond))", ) .unwrap(); assert_eq!( - Query::new(js_lang, "(if_statement condition: (_expression))",), + Query::new(&js_lang, "(if_statement condition: (expression))"), Err(QueryError { kind: QueryErrorKind::Structure, row: 0, offset: 14, column: 14, message: [ - "(if_statement condition: (_expression))", // + "(if_statement condition: (expression))", // " ^", ] .join("\n") @@ -456,12 +461,12 @@ fn test_query_errors_on_impossible_patterns() { #[test] fn test_query_verifies_possible_patterns_with_aliased_parent_nodes() { allocations::record(|| { - let ruby = get_language("ruby"); + let language = get_language("ruby"); - Query::new(ruby, "(destructured_parameter (identifier))").unwrap(); + Query::new(&language, "(destructured_parameter (identifier))").unwrap(); assert_eq!( - Query::new(ruby, "(destructured_parameter (string))",), + Query::new(&language, "(destructured_parameter (string))",), Err(QueryError { kind: QueryErrorKind::Structure, row: 0, @@ -482,13 +487,13 @@ fn test_query_matches_with_simple_pattern() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, "(function_declaration name: (identifier) @fn-name)", ) .unwrap(); assert_query_matches( - language, + &language, &query, "function one() { two(); function three() {} }", &[ @@ -504,7 +509,7 @@ fn test_query_matches_with_multiple_on_same_root() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, "(class_declaration name: (identifier) @the-class-name (class_body @@ -514,7 +519,7 @@ fn test_query_matches_with_multiple_on_same_root() { .unwrap(); assert_query_matches( - language, + &language, &query, " class Person { @@ -550,7 +555,7 @@ fn test_query_matches_with_multiple_patterns_different_roots() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, " (function_declaration name:(identifier) @fn-def) (call_expression function:(identifier) @fn-ref) @@ -559,7 +564,7 @@ fn test_query_matches_with_multiple_patterns_different_roots() { .unwrap(); assert_query_matches( - language, + &language, &query, " function f1() { @@ -580,11 +585,11 @@ fn test_query_matches_with_multiple_patterns_same_root() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, " (pair key: (property_identifier) @method-def - value: (function)) + value: (function_expression)) (pair key: (property_identifier) @method-def @@ -594,7 +599,7 @@ fn test_query_matches_with_multiple_patterns_same_root() { .unwrap(); assert_query_matches( - language, + &language, &query, " a = { @@ -615,7 +620,7 @@ fn test_query_matches_with_nesting_and_no_fields() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, " (array (array @@ -626,7 +631,7 @@ fn test_query_matches_with_nesting_and_no_fields() { .unwrap(); assert_query_matches( - language, + &language, &query, " [[a]]; @@ -650,10 +655,10 @@ fn test_query_matches_with_nesting_and_no_fields() { fn test_query_matches_with_many_results() { allocations::record(|| { let language = get_language("javascript"); - let query = Query::new(language, "(array (identifier) @element)").unwrap(); + let query = Query::new(&language, "(array (identifier) @element)").unwrap(); assert_query_matches( - language, + &language, &query, &"[hello];\n".repeat(50), &vec![(0, vec![("element", "hello")]); 50], @@ -666,7 +671,7 @@ fn test_query_matches_with_many_overlapping_results() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, r#" (call_expression function: (member_expression @@ -691,7 +696,7 @@ fn test_query_matches_with_many_overlapping_results() { source += &"\n .foo(bar(BAZ))".repeat(count); assert_query_matches( - language, + &language, &query, &source, &[ @@ -713,7 +718,7 @@ fn test_query_matches_capturing_error_nodes() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, " (ERROR (identifier) @the-error-identifier) @the-error ", @@ -721,7 +726,7 @@ fn test_query_matches_capturing_error_nodes() { .unwrap(); assert_query_matches( - language, + &language, &query, "function a(b,, c, d :e:) {}", &[(0, vec![("the-error", ":e:"), ("the-error-identifier", "e")])], @@ -734,7 +739,7 @@ fn test_query_matches_with_extra_children() { allocations::record(|| { let language = get_language("ruby"); let query = Query::new( - language, + &language, " (program(comment) @top_level_comment) (argument_list (heredoc_body) @heredoc_in_args) @@ -743,7 +748,7 @@ fn test_query_matches_with_extra_children() { .unwrap(); assert_query_matches( - language, + &language, &query, " # top-level @@ -777,7 +782,7 @@ fn test_query_matches_with_named_wildcard() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, " (return_statement (_) @the-return-value) (binary_expression operator: _ @the-operator) @@ -788,7 +793,7 @@ fn test_query_matches_with_named_wildcard() { let source = "return a + b - c;"; let mut parser = Parser::new(); - parser.set_language(language).unwrap(); + parser.set_language(&language).unwrap(); let tree = parser.parse(source, None).unwrap(); let mut cursor = QueryCursor::new(); let matches = cursor.matches(&query, tree.root_node(), source.as_bytes()); @@ -809,7 +814,7 @@ fn test_query_matches_with_wildcard_at_the_root() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, " (_ (comment) @doc @@ -821,14 +826,14 @@ fn test_query_matches_with_wildcard_at_the_root() { .unwrap(); assert_query_matches( - language, + &language, &query, "/* one */ var x; /* two */ function y() {} /* three */ class Z {}", &[(0, vec![("doc", "/* two */"), ("name", "y")])], ); let query = Query::new( - language, + &language, " (_ (string) @a) (_ (number) @b) @@ -839,7 +844,7 @@ fn test_query_matches_with_wildcard_at_the_root() { .unwrap(); assert_query_matches( - language, + &language, &query, "['hi', x(true), {y: false}]", &[ @@ -851,6 +856,33 @@ fn test_query_matches_with_wildcard_at_the_root() { }); } +#[test] +fn test_query_matches_with_wildcard_within_wildcard() { + allocations::record(|| { + let language = get_language("javascript"); + let query = Query::new( + &language, + " + (_ (_) @child) @parent + ", + ) + .unwrap(); + + assert_query_matches( + &language, + &query, + "/* a */ b; c;", + &[ + (0, vec![("parent", "/* a */ b; c;"), ("child", "/* a */")]), + (0, vec![("parent", "/* a */ b; c;"), ("child", "b;")]), + (0, vec![("parent", "b;"), ("child", "b")]), + (0, vec![("parent", "/* a */ b; c;"), ("child", "c;")]), + (0, vec![("parent", "c;"), ("child", "c")]), + ], + ); + }); +} + #[test] fn test_query_matches_with_immediate_siblings() { allocations::record(|| { @@ -864,7 +896,7 @@ fn test_query_matches_with_immediate_siblings() { // 2. Between two child nodes in a pattern, it specifies that there cannot be any // named siblings between those two child snodes. let query = Query::new( - language, + &language, " (dotted_name (identifier) @parent @@ -881,7 +913,7 @@ fn test_query_matches_with_immediate_siblings() { .unwrap(); assert_query_matches( - language, + &language, &query, "import a.b.c.d; return [w, [1, y], z]", &[ @@ -895,7 +927,7 @@ fn test_query_matches_with_immediate_siblings() { ); let query = Query::new( - language, + &language, " (block . (_) @first-stmt) (block (_) @stmt) @@ -905,7 +937,7 @@ fn test_query_matches_with_immediate_siblings() { .unwrap(); assert_query_matches( - language, + &language, &query, " if a: @@ -935,7 +967,7 @@ fn test_query_matches_with_last_named_child() { allocations::record(|| { let language = get_language("c"); let query = Query::new( - language, + &language, "(compound_statement (_) (_) @@ -944,7 +976,7 @@ fn test_query_matches_with_last_named_child() { ) .unwrap(); assert_query_matches( - language, + &language, &query, " void one() { a; b; c; } @@ -961,7 +993,7 @@ fn test_query_matches_with_negated_fields() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, " (import_specifier !alias @@ -994,7 +1026,7 @@ fn test_query_matches_with_negated_fields() { ) .unwrap(); assert_query_matches( - language, + &language, &query, " import {a as b, c} from 'p1'; @@ -1025,9 +1057,9 @@ fn test_query_matches_with_negated_fields() { fn test_query_matches_with_field_at_root() { allocations::record(|| { let language = get_language("javascript"); - let query = Query::new(language, "name: (identifier) @name").unwrap(); + let query = Query::new(&language, "name: (identifier) @name").unwrap(); assert_query_matches( - language, + &language, &query, " a(); @@ -1045,7 +1077,7 @@ fn test_query_matches_with_repeated_leaf_nodes() { let language = get_language("javascript"); let query = Query::new( - language, + &language, " ( (comment)+ @doc @@ -1065,7 +1097,7 @@ fn test_query_matches_with_repeated_leaf_nodes() { .unwrap(); assert_query_matches( - language, + &language, &query, " // one @@ -1106,14 +1138,14 @@ fn test_query_matches_with_repeated_leaf_nodes() { fn test_query_matches_with_optional_nodes_inside_of_repetitions() { allocations::record(|| { let language = get_language("javascript"); - let query = Query::new(language, r#"(array (","? (number) @num)+)"#).unwrap(); + let query = Query::new(&language, r#"(array (","? (number) @num)+)"#).unwrap(); assert_query_matches( - language, + &language, &query, - r#" + r" var a = [1, 2, 3, 4] - "#, + ", &[( 0, vec![("num", "1"), ("num", "2"), ("num", "3"), ("num", "4")], @@ -1127,17 +1159,17 @@ fn test_query_matches_with_top_level_repetitions() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, - r#" + &language, + r" (comment)+ @doc - "#, + ", ) .unwrap(); assert_query_matches( - language, + &language, &query, - r#" + r" // a // b // c @@ -1145,7 +1177,7 @@ fn test_query_matches_with_top_level_repetitions() { d() // e - "#, + ", &[ (0, vec![("doc", "// a"), ("doc", "// b"), ("doc", "// c")]), (0, vec![("doc", "// e")]), @@ -1158,17 +1190,26 @@ fn test_query_matches_with_top_level_repetitions() { fn test_query_matches_with_non_terminal_repetitions_within_root() { allocations::record(|| { let language = get_language("javascript"); - let query = Query::new(language, "(_ (expression_statement (identifier) @id)+)").unwrap(); + let query = Query::new(&language, "(_ (expression_statement (identifier) @id)+)").unwrap(); assert_query_matches( - language, + &language, &query, - r#" + r" + function f() { + d; + e; + f; + g; + } a; b; c; - "#, - &[(0, vec![("id", "a"), ("id", "b"), ("id", "c")])], + ", + &[ + (0, vec![("id", "d"), ("id", "e"), ("id", "f"), ("id", "g")]), + (0, vec![("id", "a"), ("id", "b"), ("id", "c")]), + ], ); }); } @@ -1178,7 +1219,7 @@ fn test_query_matches_with_nested_repetitions() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, r#" (variable_declaration (","? (variable_declarator name: (identifier) @x))+)+ @@ -1187,15 +1228,15 @@ fn test_query_matches_with_nested_repetitions() { .unwrap(); assert_query_matches( - language, + &language, &query, - r#" + r" var a = b, c, d var e, f // more var g - "#, + ", &[ ( 0, @@ -1215,8 +1256,8 @@ fn test_query_matches_with_multiple_repetition_patterns_that_intersect_other_pat // When this query sees a comment, it must keep track of several potential // matches: up to two for each pattern that begins with a comment. let query = Query::new( - language, - r#" + &language, + r" (call_expression function: (member_expression property: (property_identifier) @name)) @ref.method @@ -1229,7 +1270,7 @@ fn test_query_matches_with_multiple_repetition_patterns_that_intersect_other_pat ((comment)* @doc (method_definition)) (comment) @comment - "#, + ", ) .unwrap(); @@ -1242,7 +1283,7 @@ fn test_query_matches_with_multiple_repetition_patterns_that_intersect_other_pat ); assert_query_matches( - language, + &language, &query, &source, &vec![(7, vec![("comment", "// the comment")]); 64] @@ -1262,7 +1303,7 @@ fn test_query_matches_with_trailing_repetitions_of_last_child() { let language = get_language("javascript"); let query = Query::new( - language, + &language, " (unary_expression (primary_expression)+ @operand) ", @@ -1270,7 +1311,7 @@ fn test_query_matches_with_trailing_repetitions_of_last_child() { .unwrap(); assert_query_matches( - language, + &language, &query, " a = typeof (!b && ~c); @@ -1290,7 +1331,7 @@ fn test_query_matches_with_leading_zero_or_more_repeated_leaf_nodes() { let language = get_language("javascript"); let query = Query::new( - language, + &language, " ( (comment)* @doc @@ -1303,7 +1344,7 @@ fn test_query_matches_with_leading_zero_or_more_repeated_leaf_nodes() { .unwrap(); assert_query_matches( - language, + &language, &query, " function a() { @@ -1343,7 +1384,7 @@ fn test_query_matches_with_trailing_optional_nodes() { let language = get_language("javascript"); let query = Query::new( - language, + &language, " (class_declaration name: (identifier) @class @@ -1353,10 +1394,15 @@ fn test_query_matches_with_trailing_optional_nodes() { ) .unwrap(); - assert_query_matches(language, &query, "class A {}", &[(0, vec![("class", "A")])]); + assert_query_matches( + &language, + &query, + "class A {}", + &[(0, vec![("class", "A")])], + ); assert_query_matches( - language, + &language, &query, " class A {} @@ -1379,7 +1425,7 @@ fn test_query_matches_with_nested_optional_nodes() { // A function call, optionally containing a function call, which optionally contains a number let query = Query::new( - language, + &language, " (call_expression function: (identifier) @outer-fn @@ -1393,13 +1439,13 @@ fn test_query_matches_with_nested_optional_nodes() { .unwrap(); assert_query_matches( - language, + &language, &query, - r#" + r" a(b, c(), d(null, 1, 2)) e() f(g()) - "#, + ", &[ (0, vec![("outer-fn", "a"), ("inner-fn", "c")]), (0, vec![("outer-fn", "c")]), @@ -1419,7 +1465,7 @@ fn test_query_matches_with_repeated_internal_nodes() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, " (_ (method_definition @@ -1430,7 +1476,7 @@ fn test_query_matches_with_repeated_internal_nodes() { .unwrap(); assert_query_matches( - language, + &language, &query, " class A { @@ -1441,7 +1487,7 @@ fn test_query_matches_with_repeated_internal_nodes() { ", &[(0, vec![("deco", "c"), ("deco", "d"), ("name", "e")])], ); - }) + }); } #[test] @@ -1449,17 +1495,17 @@ fn test_query_matches_with_simple_alternatives() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, " (pair key: [(property_identifier) (string)] @key - value: [(function) @val1 (arrow_function) @val2]) + value: [(function_expression) @val1 (arrow_function) @val2]) ", ) .unwrap(); assert_query_matches( - language, + &language, &query, " a = { @@ -1480,7 +1526,7 @@ fn test_query_matches_with_simple_alternatives() { (0, vec![("key", "'l'"), ("val1", "function m() {}")]), ], ); - }) + }); } #[test] @@ -1488,7 +1534,7 @@ fn test_query_matches_with_alternatives_in_repetitions() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, r#" (array [(identifier) (string)] @el @@ -1503,7 +1549,7 @@ fn test_query_matches_with_alternatives_in_repetitions() { .unwrap(); assert_query_matches( - language, + &language, &query, " a = [b, 'c', d, 1, e, 'f', 'g', h]; @@ -1516,7 +1562,7 @@ fn test_query_matches_with_alternatives_in_repetitions() { ), ], ); - }) + }); } #[test] @@ -1524,7 +1570,7 @@ fn test_query_matches_with_alternatives_at_root() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, r#" [ "if" @@ -1538,7 +1584,7 @@ fn test_query_matches_with_alternatives_at_root() { .unwrap(); assert_query_matches( - language, + &language, &query, " function a(b, c, d) { @@ -1557,7 +1603,7 @@ fn test_query_matches_with_alternatives_at_root() { (0, vec![("keyword", "throw")]), ], ); - }) + }); } #[test] @@ -1565,19 +1611,19 @@ fn test_query_matches_with_alternatives_under_fields() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, - r#" + &language, + r" (assignment_expression left: [ (identifier) @variable (member_expression property: (property_identifier) @variable) ]) - "#, + ", ) .unwrap(); assert_query_matches( - language, + &language, &query, " a = b; @@ -1603,10 +1649,10 @@ fn test_query_matches_in_language_with_simple_aliases() { // HTML uses different tokens to track start tags names, end // tag names, script tag names, and style tag names. All of // these tokens are aliased to `tag_name`. - let query = Query::new(language, "(tag_name) @tag").unwrap(); + let query = Query::new(&language, "(tag_name) @tag").unwrap(); assert_query_matches( - language, + &language, &query, "
@@ -1633,7 +1679,7 @@ fn test_query_matches_with_different_tokens_with_the_same_string_value() { // and one with higher precedence for generics. let language = get_language("rust"); let query = Query::new( - language, + &language, r#" "<" @less ">" @greater @@ -1642,7 +1688,7 @@ fn test_query_matches_with_different_tokens_with_the_same_string_value() { .unwrap(); assert_query_matches( - language, + &language, &query, "const A: B = d < e || f > g;", &[ @@ -1660,7 +1706,7 @@ fn test_query_matches_with_too_many_permutations_to_track() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, " (array (identifier) @pre (identifier) @post) ", @@ -1672,7 +1718,7 @@ fn test_query_matches_with_too_many_permutations_to_track() { source.push_str("];"); let mut parser = Parser::new(); - parser.set_language(language).unwrap(); + parser.set_language(&language).unwrap(); let tree = parser.parse(&source, None).unwrap(); let mut cursor = QueryCursor::new(); cursor.set_match_limit(32); @@ -1685,7 +1731,7 @@ fn test_query_matches_with_too_many_permutations_to_track() { collect_matches(matches, &query, source.as_str())[0], (0, vec![("pre", "hello"), ("post", "hello")]), ); - assert_eq!(cursor.did_exceed_match_limit(), true); + assert!(cursor.did_exceed_match_limit()); }); } @@ -1694,7 +1740,7 @@ fn test_query_sibling_patterns_dont_match_children_of_an_error() { allocations::record(|| { let language = get_language("rust"); let query = Query::new( - language, + &language, r#" ("{" @open "}" @close) @@ -1733,8 +1779,8 @@ fn test_query_sibling_patterns_dont_match_children_of_an_error() { "; let mut parser = Parser::new(); - parser.set_language(language).unwrap(); - let tree = parser.parse(&source, None).unwrap(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); let mut cursor = QueryCursor::new(); let matches = cursor.matches(&query, tree.root_node(), source.as_bytes()); assert_eq!( @@ -1754,7 +1800,7 @@ fn test_query_matches_with_alternatives_and_too_many_permutations_to_track() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, " ( (comment) @doc @@ -1774,7 +1820,7 @@ fn test_query_matches_with_alternatives_and_too_many_permutations_to_track() { let source = "/* hi */ a.b(); ".repeat(50); let mut parser = Parser::new(); - parser.set_language(language).unwrap(); + parser.set_language(&language).unwrap(); let tree = parser.parse(&source, None).unwrap(); let mut cursor = QueryCursor::new(); cursor.set_match_limit(32); @@ -1784,7 +1830,54 @@ fn test_query_matches_with_alternatives_and_too_many_permutations_to_track() { collect_matches(matches, &query, source.as_str()), vec![(1, vec![("method", "b")]); 50], ); - assert_eq!(cursor.did_exceed_match_limit(), true); + assert!(cursor.did_exceed_match_limit()); + }); +} + +#[test] +fn test_repetitions_before_with_alternatives() { + allocations::record(|| { + let language = get_language("rust"); + let query = Query::new( + &language, + r" + ( + (line_comment)* @comment + . + [ + (struct_item name: (_) @name) + (function_item name: (_) @name) + (enum_item name: (_) @name) + (impl_item type: (_) @name) + ] + ) + ", + ) + .unwrap(); + + assert_query_matches( + &language, + &query, + r" + // a + // b + fn c() {} + + // d + // e + impl F {} + ", + &[ + ( + 0, + vec![("comment", "// a"), ("comment", "// b"), ("name", "c")], + ), + ( + 0, + vec![("comment", "// d"), ("comment", "// e"), ("name", "F")], + ), + ], + ); }); } @@ -1793,7 +1886,7 @@ fn test_query_matches_with_anonymous_tokens() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, r#" ";" @punctuation "&&" @operator @@ -1803,7 +1896,7 @@ fn test_query_matches_with_anonymous_tokens() { .unwrap(); assert_query_matches( - language, + &language, &query, r#"foo(a && "b");"#, &[ @@ -1821,8 +1914,8 @@ fn test_query_matches_with_supertypes() { allocations::record(|| { let language = get_language("python"); let query = Query::new( - language, - r#" + &language, + r" (argument_list (expression) @arg) (keyword_argument @@ -1832,12 +1925,12 @@ fn test_query_matches_with_supertypes() { left: (identifier) @var_def) (primary_expression/identifier) @var_ref - "#, + ", ) .unwrap(); assert_query_matches( - language, + &language, &query, " a = b.c( @@ -1859,16 +1952,17 @@ fn test_query_matches_with_supertypes() { } #[test] +#[allow(clippy::reversed_empty_ranges)] fn test_query_matches_within_byte_range() { allocations::record(|| { let language = get_language("javascript"); - let query = Query::new(language, "(identifier) @element").unwrap(); + let query = Query::new(&language, "(identifier) @element").unwrap(); let source = "[a, b, c, d, e, f, g]"; let mut parser = Parser::new(); - parser.set_language(language).unwrap(); - let tree = parser.parse(&source, None).unwrap(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); let mut cursor = QueryCursor::new(); @@ -1917,7 +2011,7 @@ fn test_query_matches_within_byte_range() { fn test_query_matches_within_point_range() { allocations::record(|| { let language = get_language("javascript"); - let query = Query::new(language, "(identifier) @element").unwrap(); + let query = Query::new(&language, "(identifier) @element").unwrap(); let source = " [ @@ -1932,7 +2026,7 @@ fn test_query_matches_within_point_range() { .unindent(); let mut parser = Parser::new(); - parser.set_language(language).unwrap(); + parser.set_language(&language).unwrap(); let tree = parser.parse(&source, None).unwrap(); let mut cursor = QueryCursor::new(); @@ -1983,7 +2077,7 @@ fn test_query_captures_within_byte_range() { allocations::record(|| { let language = get_language("c"); let query = Query::new( - language, + &language, " (call_expression function: (identifier) @function @@ -1997,8 +2091,8 @@ fn test_query_captures_within_byte_range() { let source = r#"DEFUN ("safe-length", Fsafe_length, Ssafe_length, 1, 1, 0)"#; let mut parser = Parser::new(); - parser.set_language(language).unwrap(); - let tree = parser.parse(&source, None).unwrap(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); let mut cursor = QueryCursor::new(); let captures = @@ -2017,12 +2111,79 @@ fn test_query_captures_within_byte_range() { }); } +#[test] +fn test_query_cursor_next_capture_with_byte_range() { + allocations::record(|| { + let language = get_language("python"); + let query = Query::new( + &language, + "(function_definition name: (identifier) @function) + (attribute attribute: (identifier) @property) + ((identifier) @variable)", + ) + .unwrap(); + + let source = "def func():\n foo.bar.baz()\n"; + // ^ ^ ^ ^ + // byte_pos 0 12 17 27 + // point_pos (0,0) (1,0) (1,5) (1,15) + + let mut parser = Parser::new(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); + + let mut cursor = QueryCursor::new(); + let captures = + cursor + .set_byte_range(12..17) + .captures(&query, tree.root_node(), source.as_bytes()); + + assert_eq!( + collect_captures(captures, &query, source), + &[("variable", "foo"),] + ); + }); +} + +#[test] +fn test_query_cursor_next_capture_with_point_range() { + allocations::record(|| { + let language = get_language("python"); + let query = Query::new( + &language, + "(function_definition name: (identifier) @function) + (attribute attribute: (identifier) @property) + ((identifier) @variable)", + ) + .unwrap(); + + let source = "def func():\n foo.bar.baz()\n"; + // ^ ^ ^ ^ + // byte_pos 0 12 17 27 + // point_pos (0,0) (1,0) (1,5) (1,15) + + let mut parser = Parser::new(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); + + let mut cursor = QueryCursor::new(); + let captures = cursor + .set_point_range(Point::new(1, 0)..Point::new(1, 5)) + .captures(&query, tree.root_node(), source.as_bytes()); + + assert_eq!( + collect_captures(captures, &query, source), + &[("variable", "foo"),] + ); + }); +} + #[test] fn test_query_matches_with_unrooted_patterns_intersecting_byte_range() { allocations::record(|| { let language = get_language("rust"); let query = Query::new( - language, + &language, r#" ("{" @left "}" @right) ("<" @left ">" @right) @@ -2033,8 +2194,8 @@ fn test_query_matches_with_unrooted_patterns_intersecting_byte_range() { let source = "mod a { fn a(f: B) { g(f) } }"; let mut parser = Parser::new(); - parser.set_language(language).unwrap(); - let tree = parser.parse(&source, None).unwrap(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); let mut cursor = QueryCursor::new(); // within the type parameter list @@ -2076,7 +2237,7 @@ fn test_query_matches_with_wildcard_at_root_intersecting_byte_range() { allocations::record(|| { let language = get_language("python"); let query = Query::new( - language, + &language, " [ (_ body: (block)) @@ -2097,7 +2258,7 @@ fn test_query_matches_with_wildcard_at_root_intersecting_byte_range() { .trim(); let mut parser = Parser::new(); - parser.set_language(language).unwrap(); + parser.set_language(&language).unwrap(); let tree = parser.parse(source, None).unwrap(); let mut cursor = QueryCursor::new(); @@ -2138,7 +2299,7 @@ fn test_query_captures_within_byte_range_assigned_after_iterating() { allocations::record(|| { let language = get_language("rust"); let query = Query::new( - language, + &language, r#" (function_item name: (identifier) @fn_name) @@ -2171,17 +2332,17 @@ fn test_query_captures_within_byte_range_assigned_after_iterating() { "; let mut parser = Parser::new(); - parser.set_language(language).unwrap(); - let tree = parser.parse(&source, None).unwrap(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); let mut cursor = QueryCursor::new(); let mut captures = cursor.captures(&query, tree.root_node(), source.as_bytes()); // Retrieve some captures let mut results = Vec::new(); for (mat, capture_ix) in captures.by_ref().take(5) { - let capture = mat.captures[capture_ix as usize]; + let capture = mat.captures[capture_ix]; results.push(( - query.capture_names()[capture.index as usize].as_str(), + query.capture_names()[capture.index as usize], &source[capture.node.byte_range()], )); } @@ -2202,9 +2363,9 @@ fn test_query_captures_within_byte_range_assigned_after_iterating() { results.clear(); captures.set_byte_range(source.find("Ok").unwrap()..source.len()); for (mat, capture_ix) in captures { - let capture = mat.captures[capture_ix as usize]; + let capture = mat.captures[capture_ix]; results.push(( - query.capture_names()[capture.index as usize].as_str(), + query.capture_names()[capture.index as usize], &source[capture.node.byte_range()], )); } @@ -2224,7 +2385,7 @@ fn test_query_matches_within_range_of_long_repetition() { allocations::record(|| { let language = get_language("rust"); let query = Query::new( - language, + &language, " (function_item name: (identifier) @fn-name) ", @@ -2251,7 +2412,7 @@ fn test_query_matches_within_range_of_long_repetition() { let mut parser = Parser::new(); let mut cursor = QueryCursor::new(); - parser.set_language(language).unwrap(); + parser.set_language(&language).unwrap(); let tree = parser.parse(&source, None).unwrap(); let matches = cursor @@ -2275,14 +2436,14 @@ fn test_query_matches_different_queries_same_cursor() { allocations::record(|| { let language = get_language("javascript"); let query1 = Query::new( - language, + &language, " (array (identifier) @id1) ", ) .unwrap(); let query2 = Query::new( - language, + &language, " (array (identifier) @id1) (pair (identifier) @id2) @@ -2290,7 +2451,7 @@ fn test_query_matches_different_queries_same_cursor() { ) .unwrap(); let query3 = Query::new( - language, + &language, " (array (identifier) @id1) (pair (identifier) @id2) @@ -2304,8 +2465,8 @@ fn test_query_matches_different_queries_same_cursor() { let mut parser = Parser::new(); let mut cursor = QueryCursor::new(); - parser.set_language(language).unwrap(); - let tree = parser.parse(&source, None).unwrap(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); let matches = cursor.matches(&query1, tree.root_node(), source.as_bytes()); assert_eq!( @@ -2336,7 +2497,7 @@ fn test_query_matches_with_multiple_captures_on_a_node() { allocations::record(|| { let language = get_language("javascript"); let mut query = Query::new( - language, + &language, "(function_declaration (identifier) @name1 @name2 @name3 (statement_block) @body1 @body2)", @@ -2347,8 +2508,8 @@ fn test_query_matches_with_multiple_captures_on_a_node() { let mut parser = Parser::new(); let mut cursor = QueryCursor::new(); - parser.set_language(language).unwrap(); - let tree = parser.parse(&source, None).unwrap(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); let matches = cursor.matches(&query, tree.root_node(), source.as_bytes()); assert_eq!( @@ -2389,7 +2550,7 @@ fn test_query_matches_with_captured_wildcard_at_root() { allocations::record(|| { let language = get_language("python"); let query = Query::new( - language, + &language, " ; captured wildcard at the root (_ [ @@ -2435,8 +2596,8 @@ fn test_query_matches_with_captured_wildcard_at_root() { let mut parser = Parser::new(); let mut cursor = QueryCursor::new(); - parser.set_language(language).unwrap(); - let tree = parser.parse(&source, None).unwrap(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); let match_capture_names_and_rows = cursor .matches(&query, tree.root_node(), source.as_bytes()) @@ -2445,7 +2606,7 @@ fn test_query_matches_with_captured_wildcard_at_root() { .iter() .map(|c| { ( - query.capture_names()[c.index as usize].as_str(), + query.capture_names()[c.index as usize], c.node.kind(), c.node.start_position().row, ) @@ -2467,7 +2628,7 @@ fn test_query_matches_with_captured_wildcard_at_root() { vec![("stmt", "try_statement", 7), ("block", "block", 12)], vec![("stmt", "while_statement", 1), ("block", "block", 14)], ] - ) + ); }); } @@ -2476,16 +2637,16 @@ fn test_query_matches_with_no_captures() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, - r#" + &language, + r" (identifier) (string) @s - "#, + ", ) .unwrap(); assert_query_matches( - language, + &language, &query, " a = 'hi'; @@ -2506,13 +2667,13 @@ fn test_query_matches_with_repeated_fields() { allocations::record(|| { let language = get_language("c"); let query = Query::new( - language, + &language, "(field_declaration declarator: (field_identifier) @field)", ) .unwrap(); assert_query_matches( - language, + &language, &query, " struct S { @@ -2533,7 +2694,7 @@ fn test_query_matches_with_deeply_nested_patterns_with_fields() { allocations::record(|| { let language = get_language("python"); let query = Query::new( - language, + &language, " (call function: (_) @func @@ -2560,7 +2721,7 @@ fn test_query_matches_with_deeply_nested_patterns_with_fields() { .unwrap(); assert_query_matches( - language, + &language, &query, " a(1).b(2).c(3).d(4).e(5).f(6).g(7).h(8) @@ -2628,7 +2789,7 @@ fn test_query_matches_with_indefinite_step_containing_no_captures() { // https://github.com/tree-sitter/tree-sitter/issues/937 let language = get_language("c"); let query = Query::new( - language, + &language, "(struct_specifier name: (type_identifier) @name body: (field_declaration_list @@ -2638,7 +2799,7 @@ fn test_query_matches_with_indefinite_step_containing_no_captures() { .unwrap(); assert_query_matches( - language, + &language, &query, " struct LacksUnionField { @@ -2671,16 +2832,16 @@ fn test_query_captures_basic() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, r#" (pair key: _ @method.def - (function + (function_expression name: (identifier) @method.alias)) (variable_declarator name: _ @function.def - value: (function + value: (function_expression name: (identifier) @function.alias)) ":" @delimiter @@ -2701,8 +2862,8 @@ fn test_query_captures_basic() { "; let mut parser = Parser::new(); - parser.set_language(language).unwrap(); - let tree = parser.parse(&source, None).unwrap(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); let mut cursor = QueryCursor::new(); let matches = cursor.matches(&query, tree.root_node(), source.as_bytes()); @@ -2746,7 +2907,7 @@ fn test_query_captures_with_text_conditions() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, r#" ((identifier) @constant (#match? @constant "^[A-Z]{2,}$")) @@ -2757,6 +2918,14 @@ fn test_query_captures_with_text_conditions() { ((identifier) @function.builtin (#eq? @function.builtin "require")) + ((identifier) @variable.builtin + (#any-of? @variable.builtin + "arguments" + "module" + "console" + "window" + "document")) + ((identifier) @variable (#not-match? @variable "^(lambda|load)$")) "#, @@ -2770,11 +2939,14 @@ fn test_query_captures_with_text_conditions() { lambda const ab = require('./ab'); new Cd(EF); + document; + module; + console; "; let mut parser = Parser::new(); - parser.set_language(language).unwrap(); - let tree = parser.parse(&source, None).unwrap(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); let mut cursor = QueryCursor::new(); let captures = cursor.captures(&query, tree.root_node(), source.as_bytes()); @@ -2791,6 +2963,12 @@ fn test_query_captures_with_text_conditions() { ("constant", "EF"), ("constructor", "EF"), ("variable", "EF"), + ("variable.builtin", "document"), + ("variable", "document"), + ("variable.builtin", "module"), + ("variable", "module"), + ("variable.builtin", "console"), + ("variable", "console"), ], ); }); @@ -2802,8 +2980,8 @@ fn test_query_captures_with_predicates() { let language = get_language("javascript"); let query = Query::new( - language, - r#" + &language, + r" ((call_expression (identifier) @foo) (#set! name something) (#set! cool) @@ -2811,7 +2989,7 @@ fn test_query_captures_with_predicates() { ((property_identifier) @bar (#is? cool) - (#is-not? name something))"#, + (#is-not? name something))", ) .unwrap(); @@ -2829,7 +3007,8 @@ fn test_query_captures_with_predicates() { args: vec![ QueryPredicateArg::Capture(0), QueryPredicateArg::String("omg".to_string().into_boxed_str()), - ], + ] + .into_boxed_slice(), },] ); assert_eq!(query.property_settings(1), &[]); @@ -2841,6 +3020,26 @@ fn test_query_captures_with_predicates() { (QueryProperty::new("name", Some("something"), None), false), ] ); + + let source = "const a = window.b"; + let mut parser = Parser::new(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); + + let query = Query::new( + &language, + r#"((identifier) @variable.builtin + (#match? @variable.builtin "^(arguments|module|console|window|document)$") + (#is-not? local)) + "#, + ) + .unwrap(); + + let mut cursor = QueryCursor::new(); + let matches = cursor.matches(&query, tree.root_node(), source.as_bytes()); + let matches = collect_matches(matches, &query, source); + + assert_eq!(matches, &[(0, vec![("variable.builtin", "window")])]); }); } @@ -2854,7 +3053,7 @@ fn test_query_captures_with_quoted_predicate_args() { // * escaped double quotes with \* // * literal backslashes with \\ let query = Query::new( - language, + &language, r#" ((call_expression (identifier) @foo) (#set! one "\"something\ngreat\"")) @@ -2896,14 +3095,14 @@ fn test_query_captures_with_duplicates() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, - r#" + &language, + r" (variable_declarator name: (identifier) @function - value: (function)) + value: (function_expression)) (identifier) @variable - "#, + ", ) .unwrap(); @@ -2912,8 +3111,8 @@ fn test_query_captures_with_duplicates() { "; let mut parser = Parser::new(); - parser.set_language(language).unwrap(); - let tree = parser.parse(&source, None).unwrap(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); let mut cursor = QueryCursor::new(); let captures = cursor.captures(&query, tree.root_node(), source.as_bytes()); @@ -2931,7 +3130,7 @@ fn test_query_captures_with_many_nested_results_without_fields() { // Search for key-value pairs whose values are anonymous functions. let query = Query::new( - language, + &language, r#" (pair key: _ @method-def @@ -2951,12 +3150,12 @@ fn test_query_captures_with_many_nested_results_without_fields() { let method_count = 50; let mut source = "x = { y: {\n".to_owned(); for i in 0..method_count { - writeln!(&mut source, " method{}: $ => null,", i).unwrap(); + writeln!(&mut source, " method{i}: $ => null,").unwrap(); } source.push_str("}};\n"); let mut parser = Parser::new(); - parser.set_language(language).unwrap(); + parser.set_language(&language).unwrap(); let tree = parser.parse(&source, None).unwrap(); let mut cursor = QueryCursor::new(); @@ -2994,15 +3193,15 @@ fn test_query_captures_with_many_nested_results_with_fields() { // Search expressions like `a ? a.b : null` let query = Query::new( - language, - r#" + &language, + r" ((ternary_expression condition: (identifier) @left consequence: (member_expression object: (identifier) @right) alternative: (null)) (#eq? @left @right)) - "#, + ", ) .unwrap(); @@ -3011,12 +3210,12 @@ fn test_query_captures_with_many_nested_results_with_fields() { let count = 50; let mut source = "a ? {".to_owned(); for i in 0..count { - writeln!(&mut source, " x: y{} ? y{}.z : null,", i, i).unwrap(); + writeln!(&mut source, " x: y{i} ? y{i}.z : null,").unwrap(); } source.push_str("} : null;\n"); let mut parser = Parser::new(); - parser.set_language(language).unwrap(); + parser.set_language(&language).unwrap(); let tree = parser.parse(&source, None).unwrap(); let mut cursor = QueryCursor::new(); @@ -3075,8 +3274,8 @@ fn test_query_captures_with_too_many_nested_results() { // captured, but before the final `template_string` is found, those matches must // be buffered, in order to prevent captures from being returned out-of-order. let query = Query::new( - language, - r#" + &language, + r" ;; easy 👇 (call_expression function: (member_expression @@ -3087,7 +3286,7 @@ fn test_query_captures_with_too_many_nested_results() { function: (member_expression property: (property_identifier) @template-tag) arguments: (template_string)) @template-call - "#, + ", ) .unwrap(); @@ -3114,12 +3313,12 @@ fn test_query_captures_with_too_many_nested_results() { .trim(); let mut parser = Parser::new(); - parser.set_language(language).unwrap(); - let tree = parser.parse(&source, None).unwrap(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); let mut cursor = QueryCursor::new(); cursor.set_match_limit(32); let captures = cursor.captures(&query, tree.root_node(), source.as_bytes()); - let captures = collect_captures(captures, &query, &source); + let captures = collect_captures(captures, &query, source); assert_eq!( &captures[0..4], @@ -3151,7 +3350,7 @@ fn test_query_captures_with_definite_pattern_containing_many_nested_matches() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, r#" (array "[" @l-bracket @@ -3177,18 +3376,17 @@ fn test_query_captures_with_definite_pattern_containing_many_nested_matches() { "; let mut parser = Parser::new(); - parser.set_language(language).unwrap(); - let tree = parser.parse(&source, None).unwrap(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); let mut cursor = QueryCursor::new(); let captures = cursor.captures(&query, tree.root_node(), source.as_bytes()); assert_eq!( collect_captures(captures, &query, source), - [("l-bracket", "[")] - .iter() + std::iter::once(&("l-bracket", "[")) .chain([("dot", "."); 40].iter()) - .chain([("r-bracket", "]")].iter()) - .cloned() + .chain(std::iter::once(&("r-bracket", "]"))) + .copied() .collect::>(), ); }); @@ -3199,12 +3397,12 @@ fn test_query_captures_ordered_by_both_start_and_end_positions() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, - r#" + &language, + r" (call_expression) @call (member_expression) @member (identifier) @variable - "#, + ", ) .unwrap(); @@ -3213,8 +3411,8 @@ fn test_query_captures_ordered_by_both_start_and_end_positions() { "; let mut parser = Parser::new(); - parser.set_language(language).unwrap(); - let tree = parser.parse(&source, None).unwrap(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); let mut cursor = QueryCursor::new(); let captures = cursor.captures(&query, tree.root_node(), source.as_bytes()); @@ -3239,13 +3437,13 @@ fn test_query_captures_with_matches_removed() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, - r#" + &language, + r" (binary_expression left: (identifier) @left operator: _ @op right: (identifier) @right) - "#, + ", ) .unwrap(); @@ -3254,8 +3452,8 @@ fn test_query_captures_with_matches_removed() { "; let mut parser = Parser::new(); - parser.set_language(language).unwrap(); - let tree = parser.parse(&source, None).unwrap(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); let mut cursor = QueryCursor::new(); let mut captured_strings = Vec::new(); @@ -3283,7 +3481,7 @@ fn test_query_captures_with_matches_removed_before_they_finish() { // namespace_import node always has "*", "as" and then an identifier // for children, so captures will be emitted eagerly for this pattern. let query = Query::new( - language, + &language, r#" (namespace_import "*" @star @@ -3298,8 +3496,8 @@ fn test_query_captures_with_matches_removed_before_they_finish() { "; let mut parser = Parser::new(); - parser.set_language(language).unwrap(); - let tree = parser.parse(&source, None).unwrap(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); let mut cursor = QueryCursor::new(); let mut captured_strings = Vec::new(); @@ -3325,10 +3523,10 @@ fn test_query_captures_and_matches_iterators_are_fused() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, - r#" + &language, + r" (comment) @comment - "#, + ", ) .unwrap(); @@ -3340,8 +3538,8 @@ fn test_query_captures_and_matches_iterators_are_fused() { "; let mut parser = Parser::new(); - parser.set_language(language).unwrap(); - let tree = parser.parse(&source, None).unwrap(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); let mut cursor = QueryCursor::new(); let mut captures = cursor.captures(&query, tree.root_node(), source.as_bytes()); @@ -3368,7 +3566,7 @@ fn test_query_text_callback_returns_chunks() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, r#" ((identifier) @leading_upper (#match? @leading_upper "^[A-Z][A-Z_]*[a-z]")) @@ -3414,8 +3612,8 @@ fn test_query_text_callback_returns_chunks() { ); let mut parser = Parser::new(); - parser.set_language(language).unwrap(); - let tree = parser.parse(&source, None).unwrap(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); let mut cursor = QueryCursor::new(); let captures = cursor.captures(&query, tree.root_node(), |node: Node| { chunks_in_range(node.byte_range()) @@ -3467,7 +3665,7 @@ fn test_query_start_byte_for_pattern() { source += patterns_2; source += patterns_3; - let query = Query::new(language, &source).unwrap(); + let query = Query::new(&language, &source).unwrap(); assert_eq!(query.start_byte_for_pattern(0), 0); assert_eq!(query.start_byte_for_pattern(5), patterns_1.len()); @@ -3482,7 +3680,7 @@ fn test_query_capture_names() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, r#" (if_statement condition: (parenthesized_expression (binary_expression @@ -3499,12 +3697,7 @@ fn test_query_capture_names() { assert_eq!( query.capture_names(), - &[ - "left-operand".to_string(), - "right-operand".to_string(), - "body".to_string(), - "loop-condition".to_string(), - ] + ["left-operand", "right-operand", "body", "loop-condition"] ); }); } @@ -3512,13 +3705,13 @@ fn test_query_capture_names() { #[test] fn test_query_lifetime_is_separate_from_nodes_lifetime() { allocations::record(|| { - let query = r#"(call_expression) @call"#; + let query = r"(call_expression) @call"; let source = "a(1); b(2);"; let language = get_language("javascript"); let mut parser = Parser::new(); - parser.set_language(language).unwrap(); - let tree = parser.parse(&source, None).unwrap(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); fn take_first_node_from_captures<'tree>( source: &str, @@ -3528,7 +3721,7 @@ fn test_query_lifetime_is_separate_from_nodes_lifetime() { // Following 2 lines are redundant but needed to demonstrate // more understandable compiler error message let language = get_language("javascript"); - let query = Query::new(language, query).unwrap(); + let query = Query::new(&language, query).unwrap(); let mut cursor = QueryCursor::new(); let node = cursor .matches(&query, node, source.as_bytes()) @@ -3548,7 +3741,7 @@ fn test_query_lifetime_is_separate_from_nodes_lifetime() { node: Node<'tree>, ) -> Node<'tree> { let language = get_language("javascript"); - let query = Query::new(language, query).unwrap(); + let query = Query::new(&language, query).unwrap(); let mut cursor = QueryCursor::new(); let node = cursor .captures(&query, node, source.as_bytes()) @@ -3569,7 +3762,7 @@ fn test_query_lifetime_is_separate_from_nodes_lifetime() { fn test_query_with_no_patterns() { allocations::record(|| { let language = get_language("javascript"); - let query = Query::new(language, "").unwrap(); + let query = Query::new(&language, "").unwrap(); assert!(query.capture_names().is_empty()); assert_eq!(query.pattern_count(), 0); }); @@ -3580,7 +3773,7 @@ fn test_query_comments() { allocations::record(|| { let language = get_language("javascript"); let query = Query::new( - language, + &language, " ; this is my first comment ; i have two comments here @@ -3593,7 +3786,7 @@ fn test_query_comments() { let source = "function one() { }"; let mut parser = Parser::new(); - parser.set_language(language).unwrap(); + parser.set_language(&language).unwrap(); let tree = parser.parse(source, None).unwrap(); let mut cursor = QueryCursor::new(); let matches = cursor.matches(&query, tree.root_node(), source.as_bytes()); @@ -3609,7 +3802,7 @@ fn test_query_disable_pattern() { allocations::record(|| { let language = get_language("javascript"); let mut query = Query::new( - language, + &language, " (function_declaration name: (identifier) @name) @@ -3629,7 +3822,7 @@ fn test_query_disable_pattern() { let source = "class A { constructor() {} } function b() { return 1; }"; let mut parser = Parser::new(); - parser.set_language(language).unwrap(); + parser.set_language(&language).unwrap(); let tree = parser.parse(source, None).unwrap(); let mut cursor = QueryCursor::new(); let matches = cursor.matches(&query, tree.root_node(), source.as_bytes()); @@ -3648,7 +3841,7 @@ fn test_query_alternative_predicate_prefix() { allocations::record(|| { let language = get_language("c"); let query = Query::new( - language, + &language, r#" ((call_expression function: (identifier) @keyword @@ -3668,7 +3861,7 @@ fn test_query_alternative_predicate_prefix() { } "#; assert_query_matches( - language, + &language, &query, source, &[(0, vec![("keyword", "DEFUN"), ("function", "\"identity\"")])], @@ -3683,7 +3876,7 @@ fn test_query_random() { allocations::record(|| { let language = get_language("rust"); let mut parser = Parser::new(); - parser.set_language(language).unwrap(); + parser.set_language(&language).unwrap(); let mut cursor = QueryCursor::new(); cursor.set_match_limit(64); @@ -3704,7 +3897,7 @@ fn test_query_random() { let pattern = pattern_ast.to_string(); let expected_matches = pattern_ast.matches_in_tree(&test_tree); - let query = match Query::new(language, &pattern) { + let query = match Query::new(&language, &pattern) { Ok(query) => query, Err(e) => { panic!("failed to build query for pattern {pattern} - {e}. seed: {seed}"); @@ -3721,7 +3914,7 @@ fn test_query_random() { captures: mat .captures .iter() - .map(|c| (query.capture_names()[c.index as usize].as_str(), c.node)) + .map(|c| (query.capture_names()[c.index as usize], c.node)) .collect::>(), }) .collect::>(); @@ -3753,7 +3946,7 @@ fn test_query_is_pattern_guaranteed_at_step() { Row { description: "no guaranteed steps", language: get_language("python"), - pattern: r#"(expression_statement (string))"#, + pattern: r"(expression_statement (string))", results_by_substring: &[("expression_statement", false), ("string", false)], }, Row { @@ -3831,17 +4024,17 @@ fn test_query_is_pattern_guaranteed_at_step() { Row { description: "a guaranteed step with a field", language: get_language("javascript"), - pattern: r#"(binary_expression left: (identifier) right: (_))"#, + pattern: r"(binary_expression left: (expression) right: (_))", results_by_substring: &[ ("binary_expression", false), - ("(identifier)", false), + ("(expression)", false), ("(_)", true), ], }, Row { description: "multiple guaranteed steps with fields", language: get_language("javascript"), - pattern: r#"(function_declaration name: (identifier) body: (statement_block))"#, + pattern: r"(function_declaration name: (identifier) body: (statement_block))", results_by_substring: &[ ("function_declaration", false), ("identifier", true), @@ -3881,12 +4074,12 @@ fn test_query_is_pattern_guaranteed_at_step() { Row { description: "nesting, no guaranteed steps", language: get_language("javascript"), - pattern: r#" + pattern: r" (call_expression function: (member_expression property: (property_identifier) @template-tag) arguments: (template_string)) @template-call - "#, + ", results_by_substring: &[("property_identifier", false), ("template_string", false)], }, Row { @@ -3901,7 +4094,7 @@ fn test_query_is_pattern_guaranteed_at_step() { "#, results_by_substring: &[ ("identifier", false), - ("property_identifier", true), + ("property_identifier", false), ("[", true), ], }, @@ -3925,15 +4118,15 @@ fn test_query_is_pattern_guaranteed_at_step() { Row { description: "alternation where one branch has guaranteed steps", language: get_language("javascript"), - pattern: r#" + pattern: r" [ (unary_expression (identifier)) (call_expression function: (_) arguments: (_)) - (binary_expression right:(call_expression)) + (binary_expression right: (call_expression)) ] - "#, + ", results_by_substring: &[ ("identifier", false), ("right:", false), @@ -3978,53 +4171,56 @@ fn test_query_is_pattern_guaranteed_at_step() { Row { description: "hidden nodes that have several fields", language: get_language("java"), - pattern: r#" + pattern: r" (method_declaration name: (identifier)) - "#, + ", results_by_substring: &[("name:", true)], }, Row { description: "top-level non-terminal extra nodes", language: get_language("ruby"), - pattern: r#" + pattern: r" (heredoc_body (interpolation) (heredoc_end) @end) - "#, + ", results_by_substring: &[ ("(heredoc_body", false), ("(interpolation)", false), ("(heredoc_end)", true), ], }, - Row { - description: "multiple extra nodes", - language: get_language("rust"), - pattern: r#" - (call_expression - (line_comment) @a - (line_comment) @b - (arguments)) - "#, - results_by_substring: &[ - ("(line_comment) @a", false), - ("(line_comment) @b", false), - ("(arguments)", true), - ], - }, + // TODO: figure out why line comments, an extra, are no longer allowed *anywhere* + // likely culprits are the fact that it's no longer a token itself or that it uses an + // external token + // Row { + // description: "multiple extra nodes", + // language: get_language("rust"), + // pattern: r" + // (call_expression + // (line_comment) @a + // (line_comment) @b + // (arguments)) + // ", + // results_by_substring: &[ + // ("(line_comment) @a", false), + // ("(line_comment) @b", false), + // ("(arguments)", true), + // ], + // }, ]; allocations::record(|| { - eprintln!(""); + eprintln!(); - for row in rows.iter() { + for row in rows { if let Some(filter) = EXAMPLE_FILTER.as_ref() { if !row.description.contains(filter.as_str()) { continue; } } eprintln!(" query example: {:?}", row.description); - let query = Query::new(row.language, row.pattern).unwrap(); + let query = Query::new(&row.language, row.pattern).unwrap(); for (substring, is_definite) in row.results_by_substring { let offset = row.pattern.find(substring).unwrap(); assert_eq!( @@ -4038,7 +4234,7 @@ fn test_query_is_pattern_guaranteed_at_step() { .join(" "), substring, is_definite, - ) + ); } } }); @@ -4055,12 +4251,12 @@ fn test_query_is_pattern_rooted() { let rows = [ Row { description: "simple token", - pattern: r#"(identifier)"#, + pattern: r"(identifier)", is_rooted: true, }, Row { description: "simple non-terminal", - pattern: r#"(function_definition name: (identifier))"#, + pattern: r"(function_definition name: (identifier))", is_rooted: true, }, Row { @@ -4070,11 +4266,11 @@ fn test_query_is_pattern_rooted() { }, Row { description: "alternative of many non-terminals", - pattern: r#"[ + pattern: r"[ (function_definition name: (identifier)) (class_definition name: (identifier)) (block) - ]"#, + ]", is_rooted: true, }, Row { @@ -4084,7 +4280,7 @@ fn test_query_is_pattern_rooted() { }, Row { description: "top-level repetition", - pattern: r#"(comment)*"#, + pattern: r"(comment)*", is_rooted: false, }, Row { @@ -4099,18 +4295,18 @@ fn test_query_is_pattern_rooted() { }, Row { description: "alternative where one option has a top-level repetition", - pattern: r#"[ + pattern: r"[ (block) (class_definition) (comment)* (function_definition) - ]"#, + ]", is_rooted: false, }, ]; allocations::record(|| { - eprintln!(""); + eprintln!(); let language = get_language("python"); for row in &rows { @@ -4120,7 +4316,7 @@ fn test_query_is_pattern_rooted() { } } eprintln!(" query example: {:?}", row.description); - let query = Query::new(language, row.pattern).unwrap(); + let query = Query::new(&language, row.pattern).unwrap(); assert_eq!( query.is_pattern_rooted(0), row.is_rooted, @@ -4130,7 +4326,7 @@ fn test_query_is_pattern_rooted() { .split_ascii_whitespace() .collect::>() .join(" "), - ) + ); } }); } @@ -4147,25 +4343,25 @@ fn test_query_is_pattern_non_local() { let rows = [ Row { description: "simple token", - pattern: r#"(identifier)"#, + pattern: r"(identifier)", language: get_language("python"), is_non_local: false, }, Row { description: "siblings that can occur in an argument list", - pattern: r#"((identifier) (identifier))"#, + pattern: r"((identifier) (identifier))", language: get_language("python"), is_non_local: true, }, Row { description: "siblings that can occur in a statement block", - pattern: r#"((return_statement) (return_statement))"#, + pattern: r"((return_statement) (return_statement))", language: get_language("python"), is_non_local: true, }, Row { description: "siblings that can occur in a source file", - pattern: r#"((function_definition) (class_definition))"#, + pattern: r"((function_definition) (class_definition))", language: get_language("python"), is_non_local: true, }, @@ -4183,32 +4379,32 @@ fn test_query_is_pattern_non_local() { }, Row { description: "siblings that can occur in a class body, wildcard root", - pattern: r#"(_ (method_definition) (method_definition)) @foo"#, + pattern: r"(_ (method_definition) (method_definition)) @foo", language: get_language("javascript"), is_non_local: true, }, Row { description: "top-level repetitions that can occur in a class body", - pattern: r#"(method_definition)+ @foo"#, + pattern: r"(method_definition)+ @foo", language: get_language("javascript"), is_non_local: true, }, Row { description: "top-level repetitions that can occur in a statement block", - pattern: r#"(return_statement)+ @foo"#, + pattern: r"(return_statement)+ @foo", language: get_language("javascript"), is_non_local: true, }, Row { description: "rooted pattern that can occur in a statement block", - pattern: r#"(return_statement) @foo"#, + pattern: r"(return_statement) @foo", language: get_language("javascript"), is_non_local: false, }, ]; allocations::record(|| { - eprintln!(""); + eprintln!(); for row in &rows { if let Some(filter) = EXAMPLE_FILTER.as_ref() { @@ -4217,7 +4413,7 @@ fn test_query_is_pattern_non_local() { } } eprintln!(" query example: {:?}", row.description); - let query = Query::new(row.language, row.pattern).unwrap(); + let query = Query::new(&row.language, row.pattern).unwrap(); assert_eq!( query.is_pattern_non_local(0), row.is_non_local, @@ -4227,7 +4423,7 @@ fn test_query_is_pattern_non_local() { .split_ascii_whitespace() .collect::>() .join(" "), - ) + ); } }); } @@ -4246,17 +4442,17 @@ fn test_capture_quantifiers() { Row { description: "Top level capture", language: get_language("python"), - pattern: r#" + pattern: r" (module) @mod - "#, + ", capture_quantifiers: &[(0, "mod", CaptureQuantifier::One)], }, Row { description: "Nested list capture capture", language: get_language("javascript"), - pattern: r#" + pattern: r" (array (_)* @elems) @array - "#, + ", capture_quantifiers: &[ (0, "array", CaptureQuantifier::One), (0, "elems", CaptureQuantifier::ZeroOrMore), @@ -4265,9 +4461,9 @@ fn test_capture_quantifiers() { Row { description: "Nested non-empty list capture capture", language: get_language("javascript"), - pattern: r#" + pattern: r" (array (_)+ @elems) @array - "#, + ", capture_quantifiers: &[ (0, "array", CaptureQuantifier::One), (0, "elems", CaptureQuantifier::OneOrMore), @@ -4277,9 +4473,9 @@ fn test_capture_quantifiers() { Row { description: "capture nested in optional pattern", language: get_language("javascript"), - pattern: r#" + pattern: r" (array (call_expression (arguments (_) @arg))? @call) @array - "#, + ", capture_quantifiers: &[ (0, "array", CaptureQuantifier::One), (0, "call", CaptureQuantifier::ZeroOrOne), @@ -4289,9 +4485,9 @@ fn test_capture_quantifiers() { Row { description: "optional capture nested in non-empty list pattern", language: get_language("javascript"), - pattern: r#" + pattern: r" (array (call_expression (arguments (_)? @arg))+ @call) @array - "#, + ", capture_quantifiers: &[ (0, "array", CaptureQuantifier::One), (0, "call", CaptureQuantifier::OneOrMore), @@ -4301,9 +4497,9 @@ fn test_capture_quantifiers() { Row { description: "non-empty list capture nested in optional pattern", language: get_language("javascript"), - pattern: r#" + pattern: r" (array (call_expression (arguments (_)+ @args))? @call) @array - "#, + ", capture_quantifiers: &[ (0, "array", CaptureQuantifier::One), (0, "call", CaptureQuantifier::ZeroOrOne), @@ -4314,19 +4510,19 @@ fn test_capture_quantifiers() { Row { description: "capture is the same in all alternatives", language: get_language("javascript"), - pattern: r#"[ + pattern: r"[ (function_declaration name:(identifier) @name) (call_expression function:(identifier) @name) - ]"#, + ]", capture_quantifiers: &[(0, "name", CaptureQuantifier::One)], }, Row { description: "capture appears in some alternatives", language: get_language("javascript"), - pattern: r#"[ + pattern: r"[ (function_declaration name:(identifier) @name) - (function) - ] @fun"#, + (function_expression) + ] @fun", capture_quantifiers: &[ (0, "fun", CaptureQuantifier::One), (0, "name", CaptureQuantifier::ZeroOrOne), @@ -4335,10 +4531,10 @@ fn test_capture_quantifiers() { Row { description: "capture has different quantifiers in alternatives", language: get_language("javascript"), - pattern: r#"[ - (call_expression arguments:(arguments (_)+ @args)) - (new_expression arguments:(arguments (_)? @args)) - ] @call"#, + pattern: r"[ + (call_expression arguments: (arguments (_)+ @args)) + (new_expression arguments: (arguments (_)? @args)) + ] @call", capture_quantifiers: &[ (0, "call", CaptureQuantifier::One), (0, "args", CaptureQuantifier::ZeroOrMore), @@ -4348,9 +4544,9 @@ fn test_capture_quantifiers() { Row { description: "siblings have different captures with different quantifiers", language: get_language("javascript"), - pattern: r#" + pattern: r" (call_expression (arguments (identifier)? @self (_)* @args)) @call - "#, + ", capture_quantifiers: &[ (0, "call", CaptureQuantifier::One), (0, "self", CaptureQuantifier::ZeroOrOne), @@ -4360,9 +4556,9 @@ fn test_capture_quantifiers() { Row { description: "siblings have same capture with different quantifiers", language: get_language("javascript"), - pattern: r#" + pattern: r" (call_expression (arguments (identifier) @args (_)* @args)) @call - "#, + ", capture_quantifiers: &[ (0, "call", CaptureQuantifier::One), (0, "args", CaptureQuantifier::OneOrMore), @@ -4372,7 +4568,7 @@ fn test_capture_quantifiers() { Row { description: "combined nesting, alternatives, and siblings", language: get_language("javascript"), - pattern: r#" + pattern: r" (array (call_expression (arguments [ @@ -4381,7 +4577,7 @@ fn test_capture_quantifiers() { ]) )+ @call ) @array - "#, + ", capture_quantifiers: &[ (0, "array", CaptureQuantifier::One), (0, "call", CaptureQuantifier::OneOrMore), @@ -4393,12 +4589,12 @@ fn test_capture_quantifiers() { Row { description: "multiple patterns", language: get_language("javascript"), - pattern: r#" + pattern: r" (function_declaration name: (identifier) @x) (statement_identifier) @y (property_identifier)+ @z (array (identifier)* @x) - "#, + ", capture_quantifiers: &[ // x (0, "x", CaptureQuantifier::One), @@ -4420,7 +4616,7 @@ fn test_capture_quantifiers() { Row { description: "multiple alternatives", language: get_language("javascript"), - pattern: r#" + pattern: r" [ (array (identifier) @x) (function_declaration name: (identifier)+ @x) @@ -4429,7 +4625,7 @@ fn test_capture_quantifiers() { (array (identifier) @x) (function_declaration name: (identifier)+ @x) ] - "#, + ", capture_quantifiers: &[ (0, "x", CaptureQuantifier::OneOrMore), (1, "x", CaptureQuantifier::OneOrMore), @@ -4438,16 +4634,16 @@ fn test_capture_quantifiers() { ]; allocations::record(|| { - eprintln!(""); + eprintln!(); - for row in rows.iter() { + for row in rows { if let Some(filter) = EXAMPLE_FILTER.as_ref() { if !row.description.contains(filter.as_str()) { continue; } } eprintln!(" query example: {:?}", row.description); - let query = Query::new(row.language, row.pattern).unwrap(); + let query = Query::new(&row.language, row.pattern).unwrap(); for (pattern, capture, expected_quantifier) in row.capture_quantifiers { let index = query.capture_index_for_name(capture).unwrap(); let actual_quantifier = query.capture_quantifiers(*pattern)[index as usize]; @@ -4463,61 +4659,448 @@ fn test_capture_quantifiers() { capture, *expected_quantifier, actual_quantifier, - ) + ); } } }); } -fn assert_query_matches( - language: Language, - query: &Query, - source: &str, - expected: &[(usize, Vec<(&str, &str)>)], -) { +#[test] +fn test_query_quantified_captures() { + struct Row { + description: &'static str, + language: Language, + code: &'static str, + pattern: &'static str, + captures: &'static [(&'static str, &'static str)], + } + + // #[rustfmt::skip] + let rows = &[ + Row { + description: "doc comments where all must match the prefix", + language: get_language("c"), + code: indoc! {" + /// foo + /// bar + /// baz + + void main() {} + + /// qux + /// quux + // quuz + "}, + pattern: r#" + ((comment)+ @comment.documentation + (#match? @comment.documentation "^///")) + "#, + captures: &[ + ("comment.documentation", "/// foo"), + ("comment.documentation", "/// bar"), + ("comment.documentation", "/// baz"), + ], + }, + Row { + description: "doc comments where one must match the prefix", + language: get_language("c"), + code: indoc! {" + /// foo + /// bar + /// baz + + void main() {} + + /// qux + /// quux + // quuz + "}, + pattern: r#" + ((comment)+ @comment.documentation + (#any-match? @comment.documentation "^///")) + "#, + captures: &[ + ("comment.documentation", "/// foo"), + ("comment.documentation", "/// bar"), + ("comment.documentation", "/// baz"), + ("comment.documentation", "/// qux"), + ("comment.documentation", "/// quux"), + ("comment.documentation", "// quuz"), + ], + }, + ]; + + allocations::record(|| { + for row in rows { + eprintln!(" quantified query example: {:?}", row.description); + + let mut parser = Parser::new(); + parser.set_language(&row.language).unwrap(); + let tree = parser.parse(row.code, None).unwrap(); + + let query = Query::new(&row.language, row.pattern).unwrap(); + + let mut cursor = QueryCursor::new(); + let matches = cursor.captures(&query, tree.root_node(), row.code.as_bytes()); + + assert_eq!(collect_captures(matches, &query, row.code), row.captures); + } + }); +} + +#[test] +fn test_query_max_start_depth() { + struct Row { + description: &'static str, + pattern: &'static str, + depth: u32, + matches: &'static [(usize, &'static [(&'static str, &'static str)])], + } + + let source = indoc! {" + if (a1 && a2) { + if (b1 && b2) { } + if (c) { } + } + if (d) { + if (e1 && e2) { } + if (f) { } + } + "}; + + #[rustfmt::skip] + let rows = &[ + Row { + description: "depth 0: match translation unit", + depth: 0, + pattern: r" + (translation_unit) @capture + ", + matches: &[ + (0, &[("capture", "if (a1 && a2) {\n if (b1 && b2) { }\n if (c) { }\n}\nif (d) {\n if (e1 && e2) { }\n if (f) { }\n}\n")]), + ] + }, + Row { + description: "depth 0: match none", + depth: 0, + pattern: r" + (if_statement) @capture + ", + matches: &[] + }, + Row { + description: "depth 1: match 2 if statements at the top level", + depth: 1, + pattern: r" + (if_statement) @capture + ", + matches : &[ + (0, &[("capture", "if (a1 && a2) {\n if (b1 && b2) { }\n if (c) { }\n}")]), + (0, &[("capture", "if (d) {\n if (e1 && e2) { }\n if (f) { }\n}")]), + ] + }, + Row { + description: "depth 1 with deep pattern: match the only the first if statement", + depth: 1, + pattern: r" + (if_statement + condition: (parenthesized_expression + (binary_expression) + ) + ) @capture + ", + matches: &[ + (0, &[("capture", "if (a1 && a2) {\n if (b1 && b2) { }\n if (c) { }\n}")]), + ] + }, + Row { + description: "depth 3 with deep pattern: match all if statements with a binexpr condition", + depth: 3, + pattern: r" + (if_statement + condition: (parenthesized_expression + (binary_expression) + ) + ) @capture + ", + matches: &[ + (0, &[("capture", "if (a1 && a2) {\n if (b1 && b2) { }\n if (c) { }\n}")]), + (0, &[("capture", "if (b1 && b2) { }")]), + (0, &[("capture", "if (e1 && e2) { }")]), + ] + }, + ]; + + allocations::record(|| { + let language = get_language("c"); + let mut parser = Parser::new(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); + let mut cursor = QueryCursor::new(); + + for row in rows { + eprintln!(" query example: {:?}", row.description); + + let query = Query::new(&language, row.pattern).unwrap(); + cursor.set_max_start_depth(Some(row.depth)); + + let matches = cursor.matches(&query, tree.root_node(), source.as_bytes()); + let expected = row + .matches + .iter() + .map(|x| (x.0, x.1.to_vec())) + .collect::>(); + + assert_eq!(collect_matches(matches, &query, source), expected); + } + }); +} + +#[test] +fn test_query_error_does_not_oob() { + let language = get_language("javascript"); + + assert_eq!( + Query::new(&language, "(clas").unwrap_err(), + QueryError { + row: 0, + offset: 1, + column: 1, + kind: QueryErrorKind::NodeType, + message: "clas".to_string() + } + ); +} + +#[test] +fn test_consecutive_zero_or_modifiers() { + let language = get_language("javascript"); let mut parser = Parser::new(); - parser.set_language(language).unwrap(); - let tree = parser.parse(source, None).unwrap(); - let mut cursor = QueryCursor::new(); - let matches = cursor.matches(&query, tree.root_node(), source.as_bytes()); - assert_eq!(collect_matches(matches, &query, source), expected); - assert_eq!(cursor.did_exceed_match_limit(), false); + parser.set_language(&language).unwrap(); + + let zero_source = ""; + let three_source = "/**/ /**/ /**/"; + + let zero_tree = parser.parse(zero_source, None).unwrap(); + let three_tree = parser.parse(three_source, None).unwrap(); + + let tests = [ + "(comment)*** @capture", + "(comment)??? @capture", + "(comment)*?* @capture", + "(comment)?*? @capture", + ]; + + for test in tests { + let query = Query::new(&language, test).unwrap(); + + let mut cursor = QueryCursor::new(); + let mut matches = cursor.matches(&query, zero_tree.root_node(), zero_source.as_bytes()); + assert!(matches.next().is_some()); + + let mut cursor = QueryCursor::new(); + let matches = cursor.matches(&query, three_tree.root_node(), three_source.as_bytes()); + + let mut len_3 = false; + let mut len_1 = false; + + for m in matches { + if m.captures.len() == 3 { + len_3 = true; + } + if m.captures.len() == 1 { + len_1 = true; + } + } + + assert_eq!(len_3, test.contains('*')); + assert_eq!(len_1, test.contains("???")); + } } -fn collect_matches<'a>( - matches: impl Iterator>, - query: &'a Query, - source: &'a str, -) -> Vec<(usize, Vec<(&'a str, &'a str)>)> { - matches - .map(|m| { - ( - m.pattern_index, - format_captures(m.captures.iter().cloned(), query, source), - ) - }) - .collect() +#[test] +fn test_query_max_start_depth_more() { + struct Row { + depth: u32, + matches: &'static [(usize, &'static [(&'static str, &'static str)])], + } + + let source = indoc! {" + { + { } + { + { } + } + } + "}; + + #[rustfmt::skip] + let rows = &[ + Row { + depth: 0, + matches: &[ + (0, &[("capture", "{\n { }\n {\n { }\n }\n}")]) + ] + }, + Row { + depth: 1, + matches: &[ + (0, &[("capture", "{\n { }\n {\n { }\n }\n}")]), + (0, &[("capture", "{ }")]), + (0, &[("capture", "{\n { }\n }")]) + ] + }, + Row { + depth: 2, + matches: &[ + (0, &[("capture", "{\n { }\n {\n { }\n }\n}")]), + (0, &[("capture", "{ }")]), + (0, &[("capture", "{\n { }\n }")]), + (0, &[("capture", "{ }")]), + ] + }, + ]; + + allocations::record(|| { + let language = get_language("c"); + let mut parser = Parser::new(); + parser.set_language(&language).unwrap(); + let tree = parser.parse(source, None).unwrap(); + let mut cursor = QueryCursor::new(); + let query = Query::new(&language, "(compound_statement) @capture").unwrap(); + + let mut matches = cursor.matches(&query, tree.root_node(), source.as_bytes()); + let node = matches.next().unwrap().captures[0].node; + assert_eq!(node.kind(), "compound_statement"); + + for row in rows { + eprintln!(" depth: {}", row.depth); + + cursor.set_max_start_depth(Some(row.depth)); + + let matches = cursor.matches(&query, node, source.as_bytes()); + let expected = row + .matches + .iter() + .map(|x| (x.0, x.1.to_vec())) + .collect::>(); + + assert_eq!(collect_matches(matches, &query, source), expected); + } + }); } -fn collect_captures<'a>( - captures: impl Iterator, usize)>, - query: &'a Query, - source: &'a str, -) -> Vec<(&'a str, &'a str)> { - format_captures(captures.map(|(m, i)| m.captures[i]), query, source) +#[test] +fn test_grammar_with_aliased_literal_query() { + // module.exports = grammar({ + // name: 'test', + // + // rules: { + // source: $ => repeat(choice($.compound_statement, $.expansion)), + // + // compound_statement: $ => seq(alias(token(prec(-1, '}')), '}')), + // + // expansion: $ => seq('}'), + // }, + // }); + let (parser_name, parser_code) = generate_parser_for_grammar( + r#" + { + "name": "test", + "rules": { + "source": { + "type": "REPEAT", + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "compound_statement" + }, + { + "type": "SYMBOL", + "name": "expansion" + } + ] + } + }, + "compound_statement": { + "type": "SEQ", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "TOKEN", + "content": { + "type": "PREC", + "value": -1, + "content": { + "type": "STRING", + "value": "}" + } + } + }, + "named": false, + "value": "}" + } + ] + }, + "expansion": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "}" + } + ] + } + } + } + "#, + ) + .unwrap(); + + let language = get_test_language(&parser_name, &parser_code, None); + + let query = Query::new( + &language, + r#" + (compound_statement "}" @bracket1) + (expansion "}" @bracket2) + "#, + ); + + assert!(query.is_ok()); } -fn format_captures<'a>( - captures: impl Iterator>, - query: &'a Query, - source: &'a str, -) -> Vec<(&'a str, &'a str)> { - captures - .map(|capture| { - ( - query.capture_names()[capture.index as usize].as_str(), - capture.node.utf8_text(source.as_bytes()).unwrap(), - ) - }) - .collect() +#[test] +fn test_query_with_first_child_in_group_is_anchor() { + let language = get_language("c"); + let source_code = r"void fun(int a, char b, int c) { };"; + let query = r#" + (parameter_list + . + ((parameter_declaration) @constant + (#match? @constant "^int")))"#; + let query = Query::new(&language, query).unwrap(); + assert_query_matches( + &language, + &query, + source_code, + &[(0, vec![("constant", "int a")])], + ); +} + +// This test needs be executed with UBSAN enabled to check for regressions: +// ``` +// UBSAN_OPTIONS="halt_on_error=1" \ +// CFLAGS="-fsanitize=undefined" \ +// RUSTFLAGS="-lubsan" \ +// cargo test --target $(rustc -vV | sed -nr 's/^host: //p') -- --test-threads 1 +// ``` +#[test] +fn test_query_compiler_oob_access() { + let language = get_language("java"); + // UBSAN should not report any OOB access + assert!(Query::new(&language, "(package_declaration _ (_) @name _)").is_ok()); } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/tags_test.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/tags_test.rs index 07e5d1de88..6139f73283 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/tests/tags_test.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/tags_test.rs @@ -9,7 +9,7 @@ use std::{ use tree_sitter::Point; use tree_sitter_tags::{c_lib as c, Error, TagsConfiguration, TagsContext}; -const PYTHON_TAG_QUERY: &'static str = r#" +const PYTHON_TAG_QUERY: &str = r#" ( (function_definition name: (identifier) @name @@ -39,7 +39,7 @@ const PYTHON_TAG_QUERY: &'static str = r#" attribute: (identifier) @name)) @reference.call "#; -const JS_TAG_QUERY: &'static str = r#" +const JS_TAG_QUERY: &str = r#" ( (comment)* @doc . (class_declaration @@ -68,7 +68,7 @@ const JS_TAG_QUERY: &'static str = r#" function: (identifier) @name) @reference.call "#; -const RUBY_TAG_QUERY: &'static str = r#" +const RUBY_TAG_QUERY: &str = r" (method name: (_) @name) @definition.method @@ -79,7 +79,7 @@ const RUBY_TAG_QUERY: &'static str = r#" ((identifier) @name @reference.call (#is-not? local)) -"#; +"; #[test] fn test_tags_python() { @@ -132,7 +132,7 @@ fn test_tags_python() { fn test_tags_javascript() { let language = get_language("javascript"); let tags_config = TagsConfiguration::new(language, JS_TAG_QUERY, "").unwrap(); - let source = br#" + let source = br" // hi // Data about a customer. @@ -150,7 +150,7 @@ fn test_tags_javascript() { class Agent { } - "#; + "; let mut tag_context = TagsContext::new(); let tags = tag_context @@ -305,10 +305,10 @@ fn test_tags_with_parse_error() { let tags_config = TagsConfiguration::new(language, PYTHON_TAG_QUERY, "").unwrap(); let mut tag_context = TagsContext::new(); - let source = br#" + let source = br" class Fine: pass class Bad - "#; + "; let (tags, failed) = tag_context .generate_tags(&tags_config, source, None) @@ -359,25 +359,29 @@ fn test_tags_via_c_api() { ); let c_scope_name = CString::new(scope_name).unwrap(); - let result = c::ts_tagger_add_language( - tagger, - c_scope_name.as_ptr(), - language, - JS_TAG_QUERY.as_ptr(), - ptr::null(), - JS_TAG_QUERY.len() as u32, - 0, - ); + let result = unsafe { + c::ts_tagger_add_language( + tagger, + c_scope_name.as_ptr(), + language, + JS_TAG_QUERY.as_ptr(), + ptr::null(), + JS_TAG_QUERY.len() as u32, + 0, + ) + }; assert_eq!(result, c::TSTagsError::Ok); - let result = c::ts_tagger_tag( - tagger, - c_scope_name.as_ptr(), - source_code.as_ptr(), - source_code.len() as u32, - buffer, - ptr::null(), - ); + let result = unsafe { + c::ts_tagger_tag( + tagger, + c_scope_name.as_ptr(), + source_code.as_ptr(), + source_code.len() as u32, + buffer, + ptr::null(), + ) + }; assert_eq!(result, c::TSTagsError::Ok); let tags = unsafe { slice::from_raw_parts( @@ -387,20 +391,20 @@ fn test_tags_via_c_api() { }; let docs = str::from_utf8(unsafe { slice::from_raw_parts( - c::ts_tags_buffer_docs(buffer) as *const u8, + c::ts_tags_buffer_docs(buffer).cast::(), c::ts_tags_buffer_docs_len(buffer) as usize, ) }) .unwrap(); - let syntax_types: Vec<&str> = unsafe { + let syntax_types = unsafe { let mut len: u32 = 0; let ptr = c::ts_tagger_syntax_kinds_for_scope_name(tagger, c_scope_name.as_ptr(), &mut len); slice::from_raw_parts(ptr, len as usize) .iter() .map(|i| CStr::from_ptr(*i).to_str().unwrap()) - .collect() + .collect::>() }; assert_eq!( @@ -419,8 +423,10 @@ fn test_tags_via_c_api() { ] ); - c::ts_tags_buffer_delete(buffer); - c::ts_tagger_delete(tagger); + unsafe { + c::ts_tags_buffer_delete(buffer); + c::ts_tagger_delete(tagger); + } }); } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/test_highlight_test.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/test_highlight_test.rs index af2c15c553..92ac76d7ef 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/tests/test_highlight_test.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/test_highlight_test.rs @@ -12,7 +12,7 @@ fn test_highlight_test_with_basic_test() { Some("injections.scm"), &[ "function".to_string(), - "variable.parameter".to_string(), + "variable".to_string(), "keyword".to_string(), ], ); @@ -22,28 +22,21 @@ fn test_highlight_test_with_basic_test() { " // ^ function", " // ^ keyword", " return d + e;", - " // ^ variable.parameter", + " // ^ variable", + " // ^ !variable", "};", ] .join("\n"); let assertions = - parse_position_comments(&mut Parser::new(), language, source.as_bytes()).unwrap(); + parse_position_comments(&mut Parser::new(), &language, source.as_bytes()).unwrap(); assert_eq!( assertions, &[ - Assertion { - position: Point::new(1, 5), - expected_capture_name: "function".to_string() - }, - Assertion { - position: Point::new(1, 11), - expected_capture_name: "keyword".to_string() - }, - Assertion { - position: Point::new(4, 9), - expected_capture_name: "variable.parameter".to_string() - }, + Assertion::new(1, 5, false, String::from("function")), + Assertion::new(1, 11, false, String::from("keyword")), + Assertion::new(4, 9, false, String::from("variable")), + Assertion::new(4, 11, true, String::from("variable")), ] ); @@ -60,6 +53,7 @@ fn test_highlight_test_with_basic_test() { (Point::new(1, 19), Point::new(1, 20), Highlight(1)), // "d" (Point::new(4, 2), Point::new(4, 8), Highlight(2)), // "return" (Point::new(4, 9), Point::new(4, 10), Highlight(1)), // "d" + (Point::new(4, 13), Point::new(4, 14), Highlight(1)), // "e" ] ); } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/test_tags_test.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/test_tags_test.rs index 61f98abd29..3efba9edfa 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/tests/test_tags_test.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/test_tags_test.rs @@ -16,28 +16,21 @@ fn test_tags_test_with_basic_test() { " # ^ reference.call", " return d(e)", " # ^ reference.call", + " # ^ !variable.parameter", "", ] .join("\n"); let assertions = - parse_position_comments(&mut Parser::new(), language, source.as_bytes()).unwrap(); + parse_position_comments(&mut Parser::new(), &language, source.as_bytes()).unwrap(); assert_eq!( assertions, &[ - Assertion { - position: Point::new(1, 4), - expected_capture_name: "definition.function".to_string(), - }, - Assertion { - position: Point::new(3, 9), - expected_capture_name: "reference.call".to_string(), - }, - Assertion { - position: Point::new(5, 11), - expected_capture_name: "reference.call".to_string(), - }, + Assertion::new(1, 4, false, String::from("definition.function")), + Assertion::new(3, 9, false, String::from("reference.call")), + Assertion::new(5, 11, false, String::from("reference.call")), + Assertion::new(5, 13, true, String::from("variable.parameter")), ] ); @@ -62,5 +55,5 @@ fn test_tags_test_with_basic_test() { "reference.call".to_string() ), ] - ) + ); } diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/text_provider_test.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/text_provider_test.rs new file mode 100644 index 0000000000..b0b702431d --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/text_provider_test.rs @@ -0,0 +1,172 @@ +use std::{iter, sync::Arc}; + +use crate::tests::helpers::fixtures::get_language; +use tree_sitter::{Language, Node, Parser, Point, Query, QueryCursor, TextProvider, Tree}; + +fn parse_text(text: impl AsRef<[u8]>) -> (Tree, Language) { + let language = get_language("c"); + let mut parser = Parser::new(); + parser.set_language(&language).unwrap(); + (parser.parse(text, None).unwrap(), language) +} + +fn parse_text_with(callback: &mut F) -> (Tree, Language) +where + T: AsRef<[u8]>, + F: FnMut(usize, Point) -> T, +{ + let language = get_language("c"); + let mut parser = Parser::new(); + parser.set_language(&language).unwrap(); + let tree = parser.parse_with(callback, None).unwrap(); + // eprintln!("{}", tree.clone().root_node().to_sexp()); + assert_eq!("comment", tree.root_node().child(0).unwrap().kind()); + (tree, language) +} + +fn tree_query>(tree: &Tree, text: impl TextProvider, language: &Language) { + let query = Query::new(language, "((comment) @c (#eq? @c \"// comment\"))").unwrap(); + let mut cursor = QueryCursor::new(); + let mut captures = cursor.captures(&query, tree.root_node(), text); + let (match_, idx) = captures.next().unwrap(); + let capture = match_.captures[idx]; + assert_eq!(capture.index as usize, idx); + assert_eq!("comment", capture.node.kind()); +} + +fn check_parsing>( + parser_text: impl AsRef<[u8]>, + text_provider: impl TextProvider, +) { + let (tree, language) = parse_text(parser_text); + tree_query(&tree, text_provider, &language); +} + +fn check_parsing_callback>( + parser_callback: &mut F, + text_provider: impl TextProvider, +) where + T: AsRef<[u8]>, + F: FnMut(usize, Point) -> T, +{ + let (tree, language) = parse_text_with(parser_callback); + tree_query(&tree, text_provider, &language); +} + +#[test] +fn test_text_provider_for_str_slice() { + let text: &str = "// comment"; + + check_parsing(text, text.as_bytes()); + check_parsing(text.as_bytes(), text.as_bytes()); +} + +#[test] +fn test_text_provider_for_string() { + let text: String = "// comment".to_owned(); + + check_parsing(text.clone(), text.as_bytes()); + check_parsing(text.as_bytes(), text.as_bytes()); + check_parsing(<_ as AsRef<[u8]>>::as_ref(&text), text.as_bytes()); +} + +#[test] +fn test_text_provider_for_box_of_str_slice() { + let text = "// comment".to_owned().into_boxed_str(); + + check_parsing(text.as_bytes(), text.as_bytes()); + check_parsing(<_ as AsRef>::as_ref(&text), text.as_bytes()); + check_parsing(text.as_ref(), text.as_ref().as_bytes()); + check_parsing(text.as_ref(), text.as_bytes()); +} + +#[test] +fn test_text_provider_for_box_of_bytes_slice() { + let text = "// comment".to_owned().into_boxed_str().into_boxed_bytes(); + + check_parsing(text.as_ref(), text.as_ref()); + check_parsing(text.as_ref(), &*text); + check_parsing(&*text, &*text); +} + +#[test] +fn test_text_provider_for_vec_of_bytes() { + let text = "// comment".to_owned().into_bytes(); + + check_parsing(&*text, &*text); +} + +#[test] +fn test_text_provider_for_arc_of_bytes_slice() { + let text: Arc<[u8]> = Arc::from("// comment".to_owned().into_bytes()); + + check_parsing(&*text, &*text); + check_parsing(text.as_ref(), text.as_ref()); + check_parsing(text.clone(), text.as_ref()); +} + +#[test] +fn test_text_provider_callback_with_str_slice() { + let text: &str = "// comment"; + + check_parsing(text, |_node: Node<'_>| iter::once(text)); + check_parsing_callback( + &mut |offset, _point| { + (offset < text.len()) + .then_some(text.as_bytes()) + .unwrap_or_default() + }, + |_node: Node<'_>| iter::once(text), + ); +} + +#[test] +fn test_text_provider_callback_with_owned_string_slice() { + let text: &str = "// comment"; + + check_parsing_callback( + &mut |offset, _point| { + (offset < text.len()) + .then_some(text.as_bytes()) + .unwrap_or_default() + }, + |_node: Node<'_>| { + let slice: String = text.to_owned(); + iter::once(slice) + }, + ); +} + +#[test] +fn test_text_provider_callback_with_owned_bytes_vec_slice() { + let text: &str = "// comment"; + + check_parsing_callback( + &mut |offset, _point| { + (offset < text.len()) + .then_some(text.as_bytes()) + .unwrap_or_default() + }, + |_node: Node<'_>| { + let slice = text.to_owned().into_bytes(); + iter::once(slice) + }, + ); +} + +#[test] +fn test_text_provider_callback_with_owned_arc_of_bytes_slice() { + let text: &str = "// comment"; + + check_parsing_callback( + &mut |offset, _point| { + (offset < text.len()) + .then_some(text.as_bytes()) + .unwrap_or_default() + }, + |_node: Node<'_>| { + let slice: Arc<[u8]> = text.to_owned().into_bytes().into(); + iter::once(slice) + }, + ); +} diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/tree_test.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/tree_test.rs index be0c4ff1dc..f498c5fcfb 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/tests/tree_test.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/tree_test.rs @@ -7,7 +7,7 @@ use tree_sitter::{InputEdit, Parser, Point, Range, Tree}; #[test] fn test_tree_edit() { let mut parser = Parser::new(); - parser.set_language(get_language("javascript")).unwrap(); + parser.set_language(&get_language("javascript")).unwrap(); let tree = parser.parse(" abc !== def", None).unwrap(); assert_eq!( @@ -44,7 +44,7 @@ fn test_tree_edit() { } // edit starting in the tree's padding but extending into its content: - // shrink the content to compenstate for the expanded padding. + // shrink the content to compensate for the expanded padding. { let mut tree = tree.clone(); tree.edit(&InputEdit { @@ -207,7 +207,7 @@ fn test_tree_edit() { // replacement that starts in whitespace and extends beyond the end of the tree: // shift the token's start position and empty out its content. { - let mut tree = tree.clone(); + let mut tree = tree; tree.edit(&InputEdit { start_byte: 6, old_end_byte: 90, @@ -235,7 +235,7 @@ fn test_tree_edit() { #[test] fn test_tree_edit_with_included_ranges() { let mut parser = Parser::new(); - parser.set_language(get_language("html")).unwrap(); + parser.set_language(&get_language("html")).unwrap(); let source = "
<% if a %>a<% else %>b<% end %>
"; @@ -300,13 +300,13 @@ fn test_tree_edit_with_included_ranges() { #[test] fn test_tree_cursor() { let mut parser = Parser::new(); - parser.set_language(get_language("rust")).unwrap(); + parser.set_language(&get_language("rust")).unwrap(); let tree = parser .parse( " struct Stuff { - a: A; + a: A, b: Option, } ", @@ -322,21 +322,103 @@ fn test_tree_cursor() { assert!(cursor.goto_first_child()); assert_eq!(cursor.node().kind(), "struct"); - assert_eq!(cursor.node().is_named(), false); + assert!(!cursor.node().is_named()); assert!(cursor.goto_next_sibling()); assert_eq!(cursor.node().kind(), "type_identifier"); - assert_eq!(cursor.node().is_named(), true); + assert!(cursor.node().is_named()); assert!(cursor.goto_next_sibling()); assert_eq!(cursor.node().kind(), "field_declaration_list"); - assert_eq!(cursor.node().is_named(), true); + assert!(cursor.node().is_named()); + + assert!(cursor.goto_last_child()); + assert_eq!(cursor.node().kind(), "}"); + assert!(!cursor.node().is_named()); + assert_eq!(cursor.node().start_position(), Point { row: 4, column: 16 }); + + assert!(cursor.goto_previous_sibling()); + assert_eq!(cursor.node().kind(), ","); + assert!(!cursor.node().is_named()); + assert_eq!(cursor.node().start_position(), Point { row: 3, column: 32 }); + + assert!(cursor.goto_previous_sibling()); + assert_eq!(cursor.node().kind(), "field_declaration"); + assert!(cursor.node().is_named()); + assert_eq!(cursor.node().start_position(), Point { row: 3, column: 20 }); + + assert!(cursor.goto_previous_sibling()); + assert_eq!(cursor.node().kind(), ","); + assert!(!cursor.node().is_named()); + assert_eq!(cursor.node().start_position(), Point { row: 2, column: 24 }); + + assert!(cursor.goto_previous_sibling()); + assert_eq!(cursor.node().kind(), "field_declaration"); + assert!(cursor.node().is_named()); + assert_eq!(cursor.node().start_position(), Point { row: 2, column: 20 }); + + assert!(cursor.goto_previous_sibling()); + assert_eq!(cursor.node().kind(), "{"); + assert!(!cursor.node().is_named()); + assert_eq!(cursor.node().start_position(), Point { row: 1, column: 29 }); + + let mut copy = tree.walk(); + copy.reset_to(&cursor); + + assert_eq!(copy.node().kind(), "{"); + assert!(!copy.node().is_named()); + + assert!(copy.goto_parent()); + assert_eq!(copy.node().kind(), "field_declaration_list"); + assert!(copy.node().is_named()); + + assert!(copy.goto_parent()); + assert_eq!(copy.node().kind(), "struct_item"); +} + +#[test] +fn test_tree_cursor_previous_sibling() { + let mut parser = Parser::new(); + parser.set_language(&get_language("rust")).unwrap(); + + let text = " + // Hi there + // This is fun! + // Another one! +"; + let tree = parser.parse(text, None).unwrap(); + + let mut cursor = tree.walk(); + assert_eq!(cursor.node().kind(), "source_file"); + + assert!(cursor.goto_last_child()); + assert_eq!(cursor.node().kind(), "line_comment"); + assert_eq!( + cursor.node().utf8_text(text.as_bytes()).unwrap(), + "// Another one!" + ); + + assert!(cursor.goto_previous_sibling()); + assert_eq!(cursor.node().kind(), "line_comment"); + assert_eq!( + cursor.node().utf8_text(text.as_bytes()).unwrap(), + "// This is fun!" + ); + + assert!(cursor.goto_previous_sibling()); + assert_eq!(cursor.node().kind(), "line_comment"); + assert_eq!( + cursor.node().utf8_text(text.as_bytes()).unwrap(), + "// Hi there" + ); + + assert!(!cursor.goto_previous_sibling()); } #[test] fn test_tree_cursor_fields() { let mut parser = Parser::new(); - parser.set_language(get_language("javascript")).unwrap(); + parser.set_language(&get_language("javascript")).unwrap(); let tree = parser .parse("function /*1*/ bar /*2*/ () {}", None) @@ -373,7 +455,7 @@ fn test_tree_cursor_fields() { #[test] fn test_tree_cursor_child_for_point() { let mut parser = Parser::new(); - parser.set_language(get_language("javascript")).unwrap(); + parser.set_language(&get_language("javascript")).unwrap(); let source = &" [ one, @@ -480,7 +562,7 @@ fn test_tree_cursor_child_for_point() { #[test] fn test_tree_node_equality() { let mut parser = Parser::new(); - parser.set_language(get_language("rust")).unwrap(); + parser.set_language(&get_language("rust")).unwrap(); let tree = parser.parse("struct A {}", None).unwrap(); let node1 = tree.root_node(); let node2 = tree.root_node(); @@ -494,7 +576,7 @@ fn test_get_changed_ranges() { let source_code = b"{a: null};\n".to_vec(); let mut parser = Parser::new(); - parser.set_language(get_language("javascript")).unwrap(); + parser.set_language(&get_language("javascript")).unwrap(); let tree = parser.parse(&source_code, None).unwrap(); assert_eq!( @@ -514,11 +596,11 @@ fn test_get_changed_ranges() { inserted_text: b"othing".to_vec(), }; let inverse_edit = invert_edit(&source_code, &edit); - let ranges = get_changed_ranges(&mut parser, &mut tree, &mut source_code, edit); + let ranges = get_changed_ranges(&mut parser, &mut tree, &mut source_code, &edit); assert_eq!(ranges, vec![range_of(&source_code, "nothing")]); // Replace `nothing` with `null` - that token has changed syntax - let ranges = get_changed_ranges(&mut parser, &mut tree, &mut source_code, inverse_edit); + let ranges = get_changed_ranges(&mut parser, &mut tree, &mut source_code, &inverse_edit); assert_eq!(ranges, vec![range_of(&source_code, "null")]); } @@ -534,11 +616,11 @@ fn test_get_changed_ranges() { inserted_text: b"\n".to_vec(), }; let inverse_edit = invert_edit(&source_code, &edit); - let ranges = get_changed_ranges(&mut parser, &mut tree, &mut source_code, edit); + let ranges = get_changed_ranges(&mut parser, &mut tree, &mut source_code, &edit); assert_eq!(ranges, vec![]); // Remove leading newline - no changed ranges - let ranges = get_changed_ranges(&mut parser, &mut tree, &mut source_code, inverse_edit); + let ranges = get_changed_ranges(&mut parser, &mut tree, &mut source_code, &inverse_edit); assert_eq!(ranges, vec![]); } @@ -554,7 +636,7 @@ fn test_get_changed_ranges() { inserted_text: b", b: false".to_vec(), }; let inverse_edit1 = invert_edit(&source_code, &edit1); - let ranges = get_changed_ranges(&mut parser, &mut tree, &mut source_code, edit1); + let ranges = get_changed_ranges(&mut parser, &mut tree, &mut source_code, &edit1); assert_eq!(ranges, vec![range_of(&source_code, ", b: false")]); let edit2 = Edit { @@ -563,21 +645,21 @@ fn test_get_changed_ranges() { inserted_text: b", c: 1".to_vec(), }; let inverse_edit2 = invert_edit(&source_code, &edit2); - let ranges = get_changed_ranges(&mut parser, &mut tree, &mut source_code, edit2); + let ranges = get_changed_ranges(&mut parser, &mut tree, &mut source_code, &edit2); assert_eq!(ranges, vec![range_of(&source_code, ", c: 1")]); // Remove the middle pair - let ranges = get_changed_ranges(&mut parser, &mut tree, &mut source_code, inverse_edit2); + let ranges = get_changed_ranges(&mut parser, &mut tree, &mut source_code, &inverse_edit2); assert_eq!(ranges, vec![]); // Remove the second pair - let ranges = get_changed_ranges(&mut parser, &mut tree, &mut source_code, inverse_edit1); + let ranges = get_changed_ranges(&mut parser, &mut tree, &mut source_code, &inverse_edit1); assert_eq!(ranges, vec![]); } // Wrapping elements in larger expressions { - let mut tree = tree.clone(); + let mut tree = tree; let mut source_code = source_code.clone(); // Replace `null` with the binary expression `b === null` @@ -587,23 +669,20 @@ fn test_get_changed_ranges() { inserted_text: b"b === ".to_vec(), }; let inverse_edit1 = invert_edit(&source_code, &edit1); - let ranges = get_changed_ranges(&mut parser, &mut tree, &mut source_code, edit1); + let ranges = get_changed_ranges(&mut parser, &mut tree, &mut source_code, &edit1); assert_eq!(ranges, vec![range_of(&source_code, "b === null")]); // Undo - let ranges = get_changed_ranges(&mut parser, &mut tree, &mut source_code, inverse_edit1); + let ranges = get_changed_ranges(&mut parser, &mut tree, &mut source_code, &inverse_edit1); assert_eq!(ranges, vec![range_of(&source_code, "null")]); } } -fn index_of(text: &Vec, substring: &str) -> usize { - str::from_utf8(text.as_slice()) - .unwrap() - .find(substring) - .unwrap() +fn index_of(text: &[u8], substring: &str) -> usize { + str::from_utf8(text).unwrap().find(substring).unwrap() } -fn range_of(text: &Vec, substring: &str) -> Range { +fn range_of(text: &[u8], substring: &str) -> Range { let start_byte = index_of(text, substring); let end_byte = start_byte + substring.as_bytes().len(); Range { @@ -618,9 +697,9 @@ fn get_changed_ranges( parser: &mut Parser, tree: &mut Tree, source_code: &mut Vec, - edit: Edit, + edit: &Edit, ) -> Vec { - perform_edit(tree, source_code, &edit); + perform_edit(tree, source_code, edit).unwrap(); let new_tree = parser.parse(&source_code, Some(tree)).unwrap(); let result = tree.changed_ranges(&new_tree).collect(); *tree = new_tree; diff --git a/third-party/tree-sitter/tree-sitter/cli/src/tests/wasm_language_test.rs b/third-party/tree-sitter/tree-sitter/cli/src/tests/wasm_language_test.rs new file mode 100644 index 0000000000..52a170ce46 --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/cli/src/tests/wasm_language_test.rs @@ -0,0 +1,160 @@ +use crate::tests::helpers::{allocations, fixtures::WASM_DIR}; +use lazy_static::lazy_static; +use std::fs; +use tree_sitter::{ + wasmtime::Engine, Parser, Query, QueryCursor, WasmError, WasmErrorKind, WasmStore, +}; + +lazy_static! { + static ref ENGINE: Engine = Engine::default(); +} + +#[test] +fn test_wasm_stdlib_symbols() { + let symbols = tree_sitter::wasm_stdlib_symbols().collect::>(); + assert_eq!( + symbols, + { + let mut symbols = symbols.clone(); + symbols.sort_unstable(); + symbols + }, + "symbols aren't sorted" + ); + + assert!(symbols.contains(&"malloc")); + assert!(symbols.contains(&"free")); + assert!(symbols.contains(&"memset")); + assert!(symbols.contains(&"memcpy")); +} + +#[test] +fn test_load_wasm_language() { + allocations::record(|| { + let mut store = WasmStore::new(ENGINE.clone()).unwrap(); + let mut parser = Parser::new(); + + let wasm_cpp = fs::read(WASM_DIR.join("tree-sitter-cpp.wasm")).unwrap(); + let wasm_rs = fs::read(WASM_DIR.join("tree-sitter-rust.wasm")).unwrap(); + let wasm_rb = fs::read(WASM_DIR.join("tree-sitter-ruby.wasm")).unwrap(); + let wasm_typescript = fs::read(WASM_DIR.join("tree-sitter-typescript.wasm")).unwrap(); + + let language_rust = store.load_language("rust", &wasm_rs).unwrap(); + let language_cpp = store.load_language("cpp", &wasm_cpp).unwrap(); + let language_ruby = store.load_language("ruby", &wasm_rb).unwrap(); + let language_typescript = store.load_language("typescript", &wasm_typescript).unwrap(); + parser.set_wasm_store(store).unwrap(); + + let mut parser2 = Parser::new(); + parser2 + .set_wasm_store(WasmStore::new(ENGINE.clone()).unwrap()) + .unwrap(); + let mut query_cursor = QueryCursor::new(); + + for mut parser in [parser, parser2] { + for _ in 0..2 { + let query_rust = Query::new(&language_rust, "(const_item) @foo").unwrap(); + let query_typescript = + Query::new(&language_typescript, "(class_declaration) @foo").unwrap(); + + parser.set_language(&language_cpp).unwrap(); + let tree = parser.parse("A c = d();", None).unwrap(); + assert_eq!( + tree.root_node().to_sexp(), + "(translation_unit (declaration type: (template_type name: (type_identifier) arguments: (template_argument_list (type_descriptor type: (type_identifier)))) declarator: (init_declarator declarator: (identifier) value: (call_expression function: (identifier) arguments: (argument_list)))))" + ); + + parser.set_language(&language_rust).unwrap(); + let source = "const A: B = c();"; + let tree = parser.parse(source, None).unwrap(); + assert_eq!( + tree.root_node().to_sexp(), + "(source_file (const_item name: (identifier) type: (type_identifier) value: (call_expression function: (identifier) arguments: (arguments))))" + ); + assert_eq!( + query_cursor + .matches(&query_rust, tree.root_node(), source.as_bytes()) + .count(), + 1 + ); + + parser.set_language(&language_ruby).unwrap(); + let tree = parser.parse("class A; end", None).unwrap(); + assert_eq!( + tree.root_node().to_sexp(), + "(program (class name: (constant)))" + ); + + parser.set_language(&language_typescript).unwrap(); + let tree = parser.parse("class A {}", None).unwrap(); + assert_eq!( + tree.root_node().to_sexp(), + "(program (class_declaration name: (type_identifier) body: (class_body)))" + ); + assert_eq!( + query_cursor + .matches(&query_typescript, tree.root_node(), source.as_bytes()) + .count(), + 1 + ); + } + } + }); +} + +#[test] +fn test_load_and_reload_wasm_language() { + allocations::record(|| { + let mut store = WasmStore::new(ENGINE.clone()).unwrap(); + + let wasm_rust = fs::read(WASM_DIR.join("tree-sitter-rust.wasm")).unwrap(); + let wasm_typescript = fs::read(WASM_DIR.join("tree-sitter-typescript.wasm")).unwrap(); + + let language_rust = store.load_language("rust", &wasm_rust).unwrap(); + let language_typescript = store.load_language("typescript", &wasm_typescript).unwrap(); + assert_eq!(store.language_count(), 2); + + // When a language is dropped, stores can release their instances of that language. + drop(language_rust); + assert_eq!(store.language_count(), 1); + + let language_rust = store.load_language("rust", &wasm_rust).unwrap(); + assert_eq!(store.language_count(), 2); + + drop(language_rust); + drop(language_typescript); + assert_eq!(store.language_count(), 0); + }); +} + +#[test] +fn test_load_wasm_errors() { + allocations::record(|| { + let mut store = WasmStore::new(ENGINE.clone()).unwrap(); + let wasm = fs::read(WASM_DIR.join("tree-sitter-rust.wasm")).unwrap(); + + let bad_wasm = &wasm[1..]; + assert_eq!( + store.load_language("rust", bad_wasm).unwrap_err(), + WasmError { + kind: WasmErrorKind::Parse, + message: "failed to parse dylink section of wasm module".into(), + } + ); + + assert_eq!( + store.load_language("not_rust", &wasm).unwrap_err(), + WasmError { + kind: WasmErrorKind::Instantiate, + message: "module did not contain language function: tree_sitter_not_rust".into(), + } + ); + + let mut bad_wasm = wasm.clone(); + bad_wasm[300..500].iter_mut().for_each(|b| *b = 0); + assert_eq!( + store.load_language("rust", &bad_wasm).unwrap_err().kind, + WasmErrorKind::Compile, + ); + }); +} diff --git a/third-party/tree-sitter/tree-sitter/cli/src/util.rs b/third-party/tree-sitter/tree-sitter/cli/src/util.rs index d180cd5430..fd4f4699dd 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/util.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/util.rs @@ -1,18 +1,18 @@ -use anyhow::Result; -use std::io; -use std::sync::atomic::{AtomicUsize, Ordering}; -use std::sync::Arc; -use std::thread; -use tree_sitter::{Parser, Tree}; +use std::{ + path::{Path, PathBuf}, + process::{Child, ChildStdin, Command, Stdio}, + sync::{ + atomic::{AtomicUsize, Ordering}, + Arc, + }, +}; -#[cfg(unix)] -use anyhow::{anyhow, Context}; -#[cfg(unix)] -use std::path::PathBuf; -#[cfg(unix)] -use std::process::{Child, ChildStdin, Command, Stdio}; +use anyhow::{anyhow, Context, Result}; +use indoc::indoc; +use tree_sitter::{Parser, Tree}; +use tree_sitter_config::Config; +use tree_sitter_loader::Config as LoaderConfig; -#[cfg(unix)] const HTML_HEADER: &[u8] = b" @@ -22,62 +22,72 @@ svg { width: 100%; } "; -pub fn cancel_on_stdin() -> Arc { +#[must_use] +pub fn lang_not_found_for_path(path: &Path, loader_config: &LoaderConfig) -> String { + let path = path.display(); + format!( + indoc! {" + No language found for path `{}` + + If a language should be associated with this file extension, please ensure the path to `{}` is inside one of the following directories as specified by your 'config.json':\n\n{}\n + If the directory that contains the relevant grammar for `{}` is not listed above, please add the directory to the list of directories in your config file, {} + "}, + path, + path, + loader_config + .parser_directories + .iter() + .enumerate() + .map(|(i, d)| format!(" {}. {}", i + 1, d.display())) + .collect::>() + .join(" \n"), + path, + if let Ok(Some(config_path)) = Config::find_config_file() { + format!("located at {}", config_path.display()) + } else { + String::from("which you need to create by running `tree-sitter init-config`") + } + ) +} + +#[must_use] +pub fn cancel_on_signal() -> Arc { let result = Arc::new(AtomicUsize::new(0)); - if atty::is(atty::Stream::Stdin) { - thread::spawn({ - let flag = result.clone(); - move || { - let mut line = String::new(); - io::stdin().read_line(&mut line).unwrap(); - flag.store(1, Ordering::Relaxed); - } - }); - } + ctrlc::set_handler({ + let flag = result.clone(); + move || { + flag.store(1, Ordering::Relaxed); + } + }) + .expect("Error setting Ctrl-C handler"); result } -#[cfg(windows)] -pub struct LogSession; - -#[cfg(unix)] pub struct LogSession { path: PathBuf, dot_process: Option, dot_process_stdin: Option, + open_log: bool, } -#[cfg(windows)] -pub fn print_tree_graph(_tree: &Tree, _path: &str) -> Result<()> { - Ok(()) -} - -#[cfg(windows)] -pub fn log_graphs(_parser: &mut Parser, _path: &str) -> Result { - Ok(LogSession) -} - -#[cfg(unix)] -pub fn print_tree_graph(tree: &Tree, path: &str) -> Result<()> { - let session = LogSession::new(path)?; +pub fn print_tree_graph(tree: &Tree, path: &str, quiet: bool) -> Result<()> { + let session = LogSession::new(path, quiet)?; tree.print_dot_graph(session.dot_process_stdin.as_ref().unwrap()); Ok(()) } -#[cfg(unix)] -pub fn log_graphs(parser: &mut Parser, path: &str) -> Result { - let session = LogSession::new(path)?; +pub fn log_graphs(parser: &mut Parser, path: &str, open_log: bool) -> Result { + let session = LogSession::new(path, open_log)?; parser.print_dot_graphs(session.dot_process_stdin.as_ref().unwrap()); Ok(session) } -#[cfg(unix)] impl LogSession { - fn new(path: &str) -> Result { + fn new(path: &str, open_log: bool) -> Result { use std::io::Write; let mut dot_file = std::fs::File::create(path)?; - dot_file.write(HTML_HEADER)?; + dot_file.write_all(HTML_HEADER)?; let mut dot_process = Command::new("dot") .arg("-Tsvg") .stdin(Stdio::piped()) @@ -94,11 +104,11 @@ impl LogSession { path: PathBuf::from(path), dot_process: Some(dot_process), dot_process_stdin: Some(dot_stdin), + open_log, }) } } -#[cfg(unix)] impl Drop for LogSession { fn drop(&mut self) { use std::fs; @@ -106,10 +116,8 @@ impl Drop for LogSession { drop(self.dot_process_stdin.take().unwrap()); let output = self.dot_process.take().unwrap().wait_with_output().unwrap(); if output.status.success() { - if cfg!(target_os = "macos") - && fs::metadata(&self.path).unwrap().len() > HTML_HEADER.len() as u64 - { - Command::new("open").arg(&self.path).output().unwrap(); + if self.open_log && fs::metadata(&self.path).unwrap().len() > HTML_HEADER.len() as u64 { + webbrowser::open(&self.path.to_string_lossy()).unwrap(); } } else { eprintln!( diff --git a/third-party/tree-sitter/tree-sitter/cli/src/wasm.rs b/third-party/tree-sitter/tree-sitter/cli/src/wasm.rs index 467fef7139..11dbb5c574 100644 --- a/third-party/tree-sitter/tree-sitter/cli/src/wasm.rs +++ b/third-party/tree-sitter/tree-sitter/cli/src/wasm.rs @@ -1,130 +1,102 @@ use super::generate::parse_grammar::GrammarJSON; use anyhow::{anyhow, Context, Result}; -use std::ffi::{OsStr, OsString}; -use std::fs; -use std::path::Path; -use std::process::Command; -use which::which; - -const EMSCRIPTEN_TAG: &'static str = concat!("emscripten/emsdk:", env!("EMSCRIPTEN_VERSION")); +use std::{fs, path::Path}; +use tree_sitter::wasm_stdlib_symbols; +use tree_sitter_loader::Loader; +use wasmparser::Parser; + +pub fn load_language_wasm_file(language_dir: &Path) -> Result<(String, Vec)> { + let grammar_name = get_grammar_name(language_dir) + .with_context(|| "Failed to get wasm filename") + .unwrap(); + let wasm_filename = format!("tree-sitter-{grammar_name}.wasm"); + let contents = fs::read(language_dir.join(&wasm_filename)).with_context(|| { + format!("Failed to read {wasm_filename}. Run `tree-sitter build-wasm` first.",) + })?; + Ok((grammar_name, contents)) +} -pub fn get_grammar_name(src_dir: &Path) -> Result { +pub fn get_grammar_name(language_dir: &Path) -> Result { + let src_dir = language_dir.join("src"); let grammar_json_path = src_dir.join("grammar.json"); let grammar_json = fs::read_to_string(&grammar_json_path) - .with_context(|| format!("Failed to read grammar file {:?}", grammar_json_path))?; + .with_context(|| format!("Failed to read grammar file {grammar_json_path:?}"))?; let grammar: GrammarJSON = serde_json::from_str(&grammar_json) - .with_context(|| format!("Failed to parse grammar file {:?}", grammar_json_path))?; + .with_context(|| format!("Failed to parse grammar file {grammar_json_path:?}"))?; Ok(grammar.name) } -pub fn compile_language_to_wasm(language_dir: &Path, force_docker: bool) -> Result<()> { - let src_dir = language_dir.join("src"); - let grammar_name = get_grammar_name(&src_dir)?; - let output_filename = format!("tree-sitter-{}.wasm", grammar_name); - - let emcc_bin = if cfg!(windows) { "emcc.bat" } else { "emcc" }; - let emcc_path = which(emcc_bin) - .ok() - .and_then(|p| Command::new(&p).output().and(Ok(p)).ok()); - - let mut command; - if !force_docker && emcc_path.is_some() { - command = Command::new(emcc_path.unwrap()); - command.current_dir(&language_dir); - } else if Command::new("docker").output().is_ok() { - command = Command::new("docker"); - command.args(&["run", "--rm"]); - - // Mount the parser directory as a volume - let mut volume_string; - if let (Some(parent), Some(filename)) = (language_dir.parent(), language_dir.file_name()) { - volume_string = OsString::from(parent); - volume_string.push(":/src:Z"); - command.arg("--workdir"); - command.arg(&Path::new("/src").join(filename)); - } else { - volume_string = OsString::from(language_dir); - volume_string.push(":/src:Z"); - command.args(&["--workdir", "/src"]); - } - - command.args(&[OsStr::new("--volume"), &volume_string]); - - // Get the current user id so that files created in the docker container will have - // the same owner. - if cfg!(unix) { - let user_id_output = Command::new("id") - .arg("-u") - .output() - .with_context(|| "Failed to get get current user id")?; - let user_id = String::from_utf8_lossy(&user_id_output.stdout); - let user_id = user_id.trim(); - command.args(&["--user", user_id]); - } - - // Run `emcc` in a container using the `emscripten-slim` image - command.args(&[EMSCRIPTEN_TAG, "emcc"]); - } else { - if force_docker { - return Err(anyhow!( - "You must have docker on your PATH to run this command with --docker" - )); - } - return Err(anyhow!( - "You must have either emcc or docker on your PATH to run this command" - )); - } - - command.args(&[ - "-o", +pub fn compile_language_to_wasm( + loader: &Loader, + language_dir: &Path, + output_dir: &Path, + force_docker: bool, +) -> Result<()> { + let grammar_name = get_grammar_name(language_dir)?; + let output_filename = output_dir.join(format!("tree-sitter-{grammar_name}.wasm")); + let src_path = language_dir.join("src"); + let scanner_path = loader.get_scanner_path(&src_path); + loader.compile_parser_to_wasm( + &grammar_name, + &src_path, + scanner_path + .as_ref() + .and_then(|p| Some(Path::new(p.file_name()?))), &output_filename, - "-Os", - "-s", - "WASM=1", - "-s", - "SIDE_MODULE=1", - "-s", - "TOTAL_MEMORY=33554432", - "-s", - "NODEJS_CATCH_EXIT=0", - "-s", - "NODEJS_CATCH_REJECTION=0", - "-s", - &format!("EXPORTED_FUNCTIONS=[\"_tree_sitter_{}\"]", grammar_name), - "-fno-exceptions", - "-I", - "src", - ]); - - let src = Path::new("src"); - let parser_c_path = src.join("parser.c"); - let scanner_c_path = src.join("scanner.c"); - let scanner_cc_path = src.join("scanner.cc"); - let scanner_cpp_path = src.join("scanner.cpp"); - - if language_dir.join(&scanner_cc_path).exists() { - command.arg("-xc++").arg(&scanner_cc_path); - } else if language_dir.join(&scanner_cpp_path).exists() { - command.arg("-xc++").arg(&scanner_cpp_path); - } else if language_dir.join(&scanner_c_path).exists() { - command.arg(&scanner_c_path); + force_docker, + )?; + + // Exit with an error if the external scanner uses symbols from the + // C or C++ standard libraries that aren't available to wasm parsers. + let stdlib_symbols = wasm_stdlib_symbols().collect::>(); + let dylink_symbols = [ + "__indirect_function_table", + "__memory_base", + "__stack_pointer", + "__table_base", + "__table_base", + "memory", + ]; + let builtin_symbols = [ + "__assert_fail", + "__cxa_atexit", + "abort", + "emscripten_notify_memory_growth", + "proc_exit", + ]; + + let mut missing_symbols = Vec::new(); + let wasm_bytes = fs::read(&output_filename)?; + let parser = Parser::new(0); + for payload in parser.parse_all(&wasm_bytes) { + if let wasmparser::Payload::ImportSection(imports) = payload? { + for import in imports { + let import = import?.name; + if !builtin_symbols.contains(&import) + && !stdlib_symbols.contains(&import) + && !dylink_symbols.contains(&import) + { + missing_symbols.push(import); + } + } + } } - command.arg(&parser_c_path); - - let output = command - .output() - .with_context(|| "Failed to run emcc command")?; - if !output.status.success() { - return Err(anyhow!( - "emcc command failed - {}", - String::from_utf8_lossy(&output.stderr) - )); + if !missing_symbols.is_empty() { + Err(anyhow!( + concat!( + "This external scanner uses a symbol that isn't available to wasm parsers.\n", + "\n", + "Missing symbols:\n", + " {}\n", + "\n", + "Available symbols:\n", + " {}", + ), + missing_symbols.join("\n "), + stdlib_symbols.join("\n ") + ))?; } - // Move the created `.wasm` file into the current working directory. - fs::rename(&language_dir.join(&output_filename), &output_filename) - .with_context(|| format!("Couldn't find output file {:?}", output_filename))?; - Ok(()) } diff --git a/third-party/tree-sitter/tree-sitter/docs/Gemfile.lock b/third-party/tree-sitter/tree-sitter/docs/Gemfile.lock index 3b2801bef5..47aca534d8 100644 --- a/third-party/tree-sitter/tree-sitter/docs/Gemfile.lock +++ b/third-party/tree-sitter/tree-sitter/docs/Gemfile.lock @@ -1,22 +1,32 @@ GEM remote: https://rubygems.org/ specs: - activesupport (7.0.4.3) + activesupport (7.1.3) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) minitest (>= 5.1) + mutex_m tzinfo (~> 2.0) addressable (2.8.1) public_suffix (>= 2.0.2, < 6.0) + base64 (0.2.0) + bigdecimal (3.1.6) coffee-script (2.4.1) coffee-script-source execjs coffee-script-source (1.11.1) colorator (1.1.0) - commonmarker (0.23.8) - concurrent-ruby (1.2.2) + commonmarker (0.23.10) + concurrent-ruby (1.2.3) + connection_pool (2.4.1) dnsruby (1.61.9) simpleidn (~> 0.1) + drb (2.2.0) + ruby2_keywords em-websocket (0.5.3) eventmachine (>= 0.12.9) http_parser.rb (~> 0) @@ -86,7 +96,7 @@ GEM activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.8.0) - i18n (1.12.0) + i18n (1.14.1) concurrent-ruby (~> 1.0) jekyll (3.9.3) addressable (~> 2.4) @@ -209,8 +219,9 @@ GEM jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) - minitest (5.18.0) - nokogiri (1.14.2-x86_64-linux) + minitest (5.21.2) + mutex_m (0.2.0) + nokogiri (1.16.2-x86_64-linux) racc (~> 1.4) octokit (4.25.1) faraday (>= 1, < 3) @@ -218,7 +229,7 @@ GEM pathutil (0.16.2) forwardable-extended (~> 2.6) public_suffix (4.0.7) - racc (1.6.2) + racc (1.7.3) rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) @@ -250,7 +261,7 @@ GEM webrick (1.8.1) PLATFORMS - ruby + x86_64-linux DEPENDENCIES github-pages diff --git a/third-party/tree-sitter/tree-sitter/docs/assets/css/style.scss b/third-party/tree-sitter/tree-sitter/docs/assets/css/style.scss index 2b7a018b7a..b838211fbc 100644 --- a/third-party/tree-sitter/tree-sitter/docs/assets/css/style.scss +++ b/third-party/tree-sitter/tree-sitter/docs/assets/css/style.scss @@ -33,6 +33,16 @@ a[href^="http"]:after { padding: $padding 0; } +#main-content code:not(pre code, a code) { + color: #c7254e; + font-size: 0.9em; + background-color: #f8f8f8; + border: 1px solid #eaeaea; + border-radius: 3px; + margin: 0 2px; + padding: 0 5px; +} + #sidebar { position: fixed; background: white; @@ -162,6 +172,10 @@ a > span { .CodeMirror div.CodeMirror-cursor { border-left: 3px solid red; } + + h4#about { + margin: 10ex 0 0 0; + } } #output-container { diff --git a/third-party/tree-sitter/tree-sitter/docs/assets/js/playground.js b/third-party/tree-sitter/tree-sitter/docs/assets/js/playground.js index c14bf0f513..62bff3620c 100644 --- a/third-party/tree-sitter/tree-sitter/docs/assets/js/playground.js +++ b/third-party/tree-sitter/tree-sitter/docs/assets/js/playground.js @@ -175,7 +175,7 @@ let tree; const start = cursor.startPosition; const end = cursor.endPosition; const id = cursor.nodeId; - let fieldName = cursor.currentFieldName(); + let fieldName = cursor.currentFieldName; if (fieldName) { fieldName += ': '; } else { diff --git a/third-party/tree-sitter/tree-sitter/docs/index.md b/third-party/tree-sitter/tree-sitter/docs/index.md index 2e3b59ed62..5ea312a407 100644 --- a/third-party/tree-sitter/tree-sitter/docs/index.md +++ b/third-party/tree-sitter/tree-sitter/docs/index.md @@ -15,35 +15,43 @@ Tree-sitter is a parser generator tool and an incremental parsing library. It ca There are currently bindings that allow Tree-sitter to be used from the following languages: +* [C#](https://github.com/tree-sitter/csharp-tree-sitter) * [Go](https://github.com/smacker/go-tree-sitter) +* [Guile](https://github.com/Z572/guile-ts) * [Haskell](https://github.com/tree-sitter/haskell-tree-sitter) +* [Java](https://github.com/serenadeai/java-tree-sitter) +* [Java](https://github.com/bonede/tree-sitter-ng) +* [Java (Android)](https://github.com/AndroidIDEOfficial/android-tree-sitter) * [JavaScript (Node.js)](https://github.com/tree-sitter/node-tree-sitter) * [JavaScript (Wasm)](https://github.com/tree-sitter/tree-sitter/tree/master/lib/binding_web) +* [Kotlin](https://github.com/oxisto/kotlintree) * [Lua](https://github.com/euclidianAce/ltreesitter) * [OCaml](https://github.com/returntocorp/ocaml-tree-sitter-core) +* [Odin](https://github.com/laytan/odin-tree-sitter) * [Perl](https://metacpan.org/pod/Text::Treesitter) * [Python](https://github.com/tree-sitter/py-tree-sitter) -* [Ruby](https://github.com/tree-sitter/ruby-tree-sitter) +* [Ruby](https://github.com/Faveod/ruby-tree-sitter) * [Ruby](https://github.com/calicoday/ruby-tree-sitter-ffi) * [Rust](https://github.com/tree-sitter/tree-sitter/tree/master/lib/binding_rust) * [Swift](https://github.com/ChimeHQ/SwiftTreeSitter) -* [Kotlin](https://github.com/oxisto/kotlintree) -* [Java](https://github.com/serenadeai/java-tree-sitter) ### Parsers * [Ada](https://github.com/briot/tree-sitter-ada) * [Agda](https://github.com/tree-sitter/tree-sitter-agda) * [Apex](https://github.com/aheber/tree-sitter-sfapex) +* [ApexCode](https://github.com/jsuarez-chipiron/tree-sitter-apex) +* [AWS Event Rule](https://github.com/3p3r/tree-sitter-eventrule) * [Bash](https://github.com/tree-sitter/tree-sitter-bash) * [Beancount](https://github.com/zwpaper/tree-sitter-beancount) * [Cap'n Proto](https://github.com/amaanq/tree-sitter-capnp) * [C](https://github.com/tree-sitter/tree-sitter-c) * [C++](https://github.com/tree-sitter/tree-sitter-cpp) * [C#](https://github.com/tree-sitter/tree-sitter-c-sharp) +* [CEL](https://github.com/bufbuild/tree-sitter-cel) * [Clojure](https://github.com/sogaiu/tree-sitter-clojure) * [CMake](https://github.com/uyha/tree-sitter-cmake) -* [Comment](https://github.com/stsewd/tree-sitter-comment) +* [COBOL](https://github.com/yutaro-sakamoto/tree-sitter-cobol) * [Common Lisp](https://github.com/theHamsta/tree-sitter-commonlisp) * [CSS](https://github.com/tree-sitter/tree-sitter-css) * [CUDA](https://github.com/theHamsta/tree-sitter-cuda) @@ -68,45 +76,55 @@ There are currently bindings that allow Tree-sitter to be used from the followin * [Go](https://github.com/tree-sitter/tree-sitter-go) * [Go mod](https://github.com/camdencheek/tree-sitter-go-mod) * [Go work](https://github.com/omertuc/tree-sitter-go-work) -* [Graphql](https://github.com/bkegley/tree-sitter-graphql) +* [GraphQL](https://github.com/bkegley/tree-sitter-graphql) * [Hack](https://github.com/slackhq/tree-sitter-hack) * [Haskell](https://github.com/tree-sitter/tree-sitter-haskell) * [HCL](https://github.com/MichaHoffmann/tree-sitter-hcl) * [HTML](https://github.com/tree-sitter/tree-sitter-html) +* [ISPC](https://github.com/fab4100/tree-sitter-ispc) * [Java](https://github.com/tree-sitter/tree-sitter-java) * [JavaScript](https://github.com/tree-sitter/tree-sitter-javascript) * [jq](https://github.com/flurie/tree-sitter-jq) -* [JSON5](https://github.com/Joakker/tree-sitter-json5) * [JSON](https://github.com/tree-sitter/tree-sitter-json) +* [JSON5](https://github.com/Joakker/tree-sitter-json5) * [Julia](https://github.com/tree-sitter/tree-sitter-julia) +* [Just](https://github.com/IndianBoy42/tree-sitter-just) * [Kotlin](https://github.com/fwcd/tree-sitter-kotlin) * [LALRPOP](https://github.com/traxys/tree-sitter-lalrpop) -* [Latex](https://github.com/latex-lsp/tree-sitter-latex) +* [LaTeX](https://github.com/latex-lsp/tree-sitter-latex) * [Lean](https://github.com/Julian/tree-sitter-lean) * [LLVM](https://github.com/benwilliamgraham/tree-sitter-llvm) * [LLVM MachineIR](https://github.com/Flakebi/tree-sitter-llvm-mir) +* [LLVM MLIR](https://github.com/artagnon/tree-sitter-mlir) * [LLVM TableGen](https://github.com/Flakebi/tree-sitter-tablegen) -* [Lua](https://github.com/Azganoth/tree-sitter-lua) +* [Lua](https://github.com/MunifTanjim/tree-sitter-lua) +* [Magik](https://github.com/krn-robin/tree-sitter-magik) * [Make](https://github.com/alemuller/tree-sitter-make) * [Markdown](https://github.com/ikatyang/tree-sitter-markdown) * [Markdown](https://github.com/MDeiml/tree-sitter-markdown) * [Meson](https://github.com/Decodetalkers/tree-sitter-meson) * [Meson](https://github.com/staysail/tree-sitter-meson) -* [Motorola 68000 Assembly](https://github.com/grahambates/tree-sitter-m68k) +* [Motorola 68000 assembly](https://github.com/grahambates/tree-sitter-m68k) +* [Nim](https://github.com/alaviss/tree-sitter-nim) * [Nix](https://github.com/cstrahan/tree-sitter-nix) +* [Noir](https://github.com/hhamud/tree-sitter-noir) * [Objective-C](https://github.com/jiyee/tree-sitter-objc) * [OCaml](https://github.com/tree-sitter/tree-sitter-ocaml) +* [Odin](https://github.com/amaanq/tree-sitter-odin) +* [Ohm](https://github.com/novusnota/tree-sitter-ohm) * [Org](https://github.com/milisims/tree-sitter-org) +* [P4](https://github.com/ace-design/tree-sitter-p4) * [Pascal](https://github.com/Isopod/tree-sitter-pascal) * [Perl](https://github.com/ganezdragon/tree-sitter-perl) * [Perl](https://github.com/tree-sitter-perl/tree-sitter-perl) * [Perl POD](https://github.com/tree-sitter-perl/tree-sitter-pod) * [PHP](https://github.com/tree-sitter/tree-sitter-php) * [Portable Game Notation](https://github.com/rolandwalker/tree-sitter-pgn) -* [PowerShell](https://github.com/PowerShell/tree-sitter-PowerShell) +* [PowerShell](https://github.com/airbus-cert/tree-sitter-powershell) * [Protocol Buffers](https://github.com/mitchellh/tree-sitter-proto) * [Python](https://github.com/tree-sitter/tree-sitter-python) * [QML](https://github.com/yuja/tree-sitter-qmljs) +* [QuakeC](https://github.com/vkazanov/tree-sitter-quakec) * [Racket](https://github.com/6cdh/tree-sitter-racket) * [Rasi](https://github.com/Fymyte/tree-sitter-rasi) * [re2c](https://github.com/alemuller/tree-sitter-re2c) @@ -114,36 +132,46 @@ There are currently bindings that allow Tree-sitter to be used from the followin * [Rego](https://github.com/FallenAngel97/tree-sitter-rego) * [reStructuredText](https://github.com/stsewd/tree-sitter-rst) * [R](https://github.com/r-lib/tree-sitter-r) +* [Robot](https://github.com/Hubro/tree-sitter-robot) * [Ruby](https://github.com/tree-sitter/tree-sitter-ruby) * [Rust](https://github.com/tree-sitter/tree-sitter-rust) * [Scala](https://github.com/tree-sitter/tree-sitter-scala) * [Scheme](https://github.com/6cdh/tree-sitter-scheme) -* [Scss](https://github.com/serenadeai/tree-sitter-scss) +* [SCSS](https://github.com/serenadeai/tree-sitter-scss) * [S-expressions](https://github.com/AbstractMachinesLab/tree-sitter-sexp) * [Smali](https://github.com/amaanq/tree-sitter-smali) * [Smali](https://git.sr.ht/~yotam/tree-sitter-smali) -* [Sourcepawn](https://github.com/nilshelmig/tree-sitter-sourcepawn) +* [SourcePawn](https://github.com/nilshelmig/tree-sitter-sourcepawn) * [SPARQL](https://github.com/BonaBeavis/tree-sitter-sparql) * [SQL - BigQuery](https://github.com/takegue/tree-sitter-sql-bigquery) +* [SQL - General](https://github.com/DerekStride/tree-sitter-sql) * [SQL - PostgreSQL](https://github.com/m-novikov/tree-sitter-sql) * [SQL - SQLite](https://github.com/dhcmrlchtdj/tree-sitter-sqlite) * [SSH](https://github.com/metio/tree-sitter-ssh-client-config) +* [Supercollider](https://github.com/madskjeldgaard/tree-sitter-supercollider) * [Svelte](https://github.com/Himujjal/tree-sitter-svelte) * [Swift](https://github.com/alex-pinkus/tree-sitter-swift) * [SystemRDL](https://github.com/SystemRDL/tree-sitter-systemrdl) +* [Tact](https://github.com/tact-lang/tree-sitter-tact) * [Thrift](https://github.com/duskmoon314/tree-sitter-thrift) +* ["TODO:" comments](https://github.com/stsewd/tree-sitter-comment) * [TOML](https://github.com/ikatyang/tree-sitter-toml) * [Tree-sitter Query](https://github.com/nvim-treesitter/tree-sitter-query) * [Turtle](https://github.com/BonaBeavis/tree-sitter-turtle) +* [Twig](https://github.com/kaermorchen/tree-sitter-twig) * [Twig](https://github.com/gbprod/tree-sitter-twig) * [TypeScript](https://github.com/tree-sitter/tree-sitter-typescript) +* [Ungrammar](https://github.com/Philipp-M/tree-sitter-ungrammar) +* [USD](https://github.com/ColinKennedy/tree-sitter-usd) * [Verilog](https://github.com/tree-sitter/tree-sitter-verilog) * [VHDL](https://github.com/alemuller/tree-sitter-vhdl) * [Vue](https://github.com/ikatyang/tree-sitter-vue) -* [WASM](https://github.com/wasm-lsp/tree-sitter-wasm) -* [WGSL WebGPU Shading Language](https://github.com/mehmetoguzderin/tree-sitter-wgsl) +* [Wasm](https://github.com/wasm-lsp/tree-sitter-wasm) +* [WDL](https://github.com/jdidion/tree-sitter-wdl) +* [WGSL (WebGPU Shading Language)](https://github.com/mehmetoguzderin/tree-sitter-wgsl) * [YAML](https://github.com/ikatyang/tree-sitter-yaml) * [YANG](https://github.com/Hubro/tree-sitter-yang) +* [Yuck](https://github.com/Philipp-M/tree-sitter-yuck) * [Zig](https://github.com/maxxnino/tree-sitter-zig) ### Talks on Tree-sitter @@ -156,9 +184,9 @@ There are currently bindings that allow Tree-sitter to be used from the followin The design of Tree-sitter was greatly influenced by the following research papers: -- [Practical Algorithms for Incremental Software Development Environments](https://www2.eecs.berkeley.edu/Pubs/TechRpts/1997/CSD-97-946.pdf) -- [Context Aware Scanning for Parsing Extensible Languages](https://www-users.cse.umn.edu/~evw/pubs/vanwyk07gpce/vanwyk07gpce.pdf) -- [Efficient and Flexible Incremental Parsing](http://harmonia.cs.berkeley.edu/papers/twagner-parsing.pdf) -- [Incremental Analysis of Real Programming Languages](http://harmonia.cs.berkeley.edu/papers/twagner-glr.pdf) -- [Error Detection and Recovery in LR Parsers](http://what-when-how.com/compiler-writing/bottom-up-parsing-compiler-writing-part-13) -- [Error Recovery for LR Parsers](https://apps.dtic.mil/sti/pdfs/ADA043470.pdf) +* [Practical Algorithms for Incremental Software Development Environments](https://www2.eecs.berkeley.edu/Pubs/TechRpts/1997/CSD-97-946.pdf) +* [Context Aware Scanning for Parsing Extensible Languages](https://www-users.cse.umn.edu/~evw/pubs/vanwyk07gpce/vanwyk07gpce.pdf) +* [Efficient and Flexible Incremental Parsing](https://harmonia.cs.berkeley.edu/papers/twagner-parsing.pdf) +* [Incremental Analysis of Real Programming Languages](https://harmonia.cs.berkeley.edu/papers/twagner-glr.pdf) +* [Error Detection and Recovery in LR Parsers](https://what-when-how.com/compiler-writing/bottom-up-parsing-compiler-writing-part-13) +* [Error Recovery for LR Parsers](https://apps.dtic.mil/sti/pdfs/ADA043470.pdf) diff --git a/third-party/tree-sitter/tree-sitter/docs/section-2-using-parsers.md b/third-party/tree-sitter/tree-sitter/docs/section-2-using-parsers.md index ea32f4f57b..2b5e04b885 100644 --- a/third-party/tree-sitter/tree-sitter/docs/section-2-using-parsers.md +++ b/third-party/tree-sitter/tree-sitter/docs/section-2-using-parsers.md @@ -51,7 +51,7 @@ Here's an example of a simple C program that uses the Tree-sitter [JSON parser]( // Declare the `tree_sitter_json` function, which is // implemented by the `tree-sitter-json` library. -TSLanguage *tree_sitter_json(); +const TSLanguage *tree_sitter_json(void); int main() { // Create a parser. @@ -137,7 +137,7 @@ TSTree *ts_parser_parse( ); ``` -The `TSInput` structure lets you to provide your own function for reading a chunk of text at a given byte offset and row/column position. The function can return text encoded in either UTF8 or UTF16. This interface allows you to efficiently parse text that is stored in your own data structure. +The `TSInput` structure lets you provide your own function for reading a chunk of text at a given byte offset and row/column position. The function can return text encoded in either UTF8 or UTF16. This interface allows you to efficiently parse text that is stored in your own data structure. ```c typedef struct { @@ -290,7 +290,7 @@ This `ts_node_edit` function is _only_ needed in the case where you have retriev ### Multi-language Documents -Sometimes, different parts of a file may be written in different languages. For example, templating languages like [EJS](http://ejs.co) and [ERB](https://ruby-doc.org/stdlib-2.5.1/libdoc/erb/rdoc/ERB.html) allow you to generate HTML by writing a mixture of HTML and another language like JavaScript or Ruby. +Sometimes, different parts of a file may be written in different languages. For example, templating languages like [EJS](https://ejs.co) and [ERB](https://ruby-doc.org/stdlib-2.5.1/libdoc/erb/rdoc/ERB.html) allow you to generate HTML by writing a mixture of HTML and another language like JavaScript or Ruby. Tree-sitter handles these types of documents by allowing you to create a syntax tree based on the text in certain _ranges_ of a file. @@ -326,13 +326,13 @@ Conceptually, it can be represented by three syntax trees with overlapping range #include // These functions are each implemented in their own repo. -const TSLanguage *tree_sitter_embedded_template(); -const TSLanguage *tree_sitter_html(); -const TSLanguage *tree_sitter_ruby(); +const TSLanguage *tree_sitter_embedded_template(void); +const TSLanguage *tree_sitter_html(void); +const TSLanguage *tree_sitter_ruby(void); int main(int argc, const char **argv) { const char *text = argv[1]; - unsigned len = strlen(src); + unsigned len = strlen(text); // Parse the entire text as ERB. TSParser *parser = ts_parser_new(); @@ -410,6 +410,12 @@ Internally, copying a syntax tree just entails incrementing an atomic reference You can access every node in a syntax tree using the `TSNode` APIs [described above](#retrieving-nodes), but if you need to access a large number of nodes, the fastest way to do so is with a _tree cursor_. A cursor is a stateful object that allows you to walk a syntax tree with maximum efficiency. +Note that the given input node is considered the root of the cursor, and the +cursor cannot walk outside this node, so going to the parent or any sibling +of the root node will return `false`. This has no unexpected effects if the given +input node is the actual `root` node of the tree, but is something to keep in mind +when using nodes that are not the `root` node. + You can initialize a cursor from any node: ```c @@ -442,13 +448,13 @@ Many code analysis tasks involve searching for patterns in syntax trees. Tree-si A _query_ consists of one or more _patterns_, where each pattern is an [S-expression](https://en.wikipedia.org/wiki/S-expression) that matches a certain set of nodes in a syntax tree. The expression to match a given node consists of a pair of parentheses containing two things: the node's type, and optionally, a series of other S-expressions that match the node's children. For example, this pattern would match any `binary_expression` node whose children are both `number_literal` nodes: -``` scheme +```scheme (binary_expression (number_literal) (number_literal)) ``` Children can also be omitted. For example, this would match any `binary_expression` where at least _one_ of child is a `string_literal` node: -``` scheme +```scheme (binary_expression (string_literal)) ``` @@ -456,7 +462,7 @@ Children can also be omitted. For example, this would match any `binary_expressi In general, it's a good idea to make patterns more specific by specifying [field names](#node-field-names) associated with child nodes. You do this by prefixing a child pattern with a field name followed by a colon. For example, this pattern would match an `assignment_expression` node where the `left` child is a `member_expression` whose `object` is a `call_expression`. -``` scheme +```scheme (assignment_expression left: (member_expression object: (call_expression))) @@ -464,9 +470,9 @@ In general, it's a good idea to make patterns more specific by specifying [field #### Negated Fields -You can also constrain a pattern so that it only matches nodes that *lack* a certain field. To do this, add a field name prefixed by a `!` within the parent pattern. For example, this pattern would match a class declaration with no type parameters: +You can also constrain a pattern so that it only matches nodes that _lack_ a certain field. To do this, add a field name prefixed by a `!` within the parent pattern. For example, this pattern would match a class declaration with no type parameters: -``` scheme +```scheme (class_declaration name: (identifier) @class_name !type_parameters) @@ -476,7 +482,7 @@ You can also constrain a pattern so that it only matches nodes that *lack* a cer The parenthesized syntax for writing nodes only applies to [named nodes](#named-vs-anonymous-nodes). To match specific anonymous nodes, you write their name between double quotes. For example, this pattern would match any `binary_expression` where the operator is `!=` and the right side is `null`: -``` scheme +```scheme (binary_expression operator: "!=" right: (null)) @@ -488,7 +494,7 @@ When matching patterns, you may want to process specific nodes within the patter For example, this pattern would match any assignment of a `function` to an `identifier`, and it would associate the name `the-function-name` with the identifier: -``` scheme +```scheme (assignment_expression left: (identifier) @the-function-name right: (function)) @@ -496,7 +502,7 @@ For example, this pattern would match any assignment of a `function` to an `iden And this pattern would match all method definitions, associating the name `the-method-name` with the method name, `the-class-name` with the containing class name: -``` scheme +```scheme (class_declaration name: (identifier) @the-class-name body: (class_body @@ -510,13 +516,13 @@ You can match a repeating sequence of sibling nodes using the postfix `+` and `* For example, this pattern would match a sequence of one or more comments: -``` scheme +```scheme (comment)+ ``` This pattern would match a class declaration, capturing all of the decorators if any were present: -``` scheme +```scheme (class_declaration (decorator)* @the-decorator name: (identifier) @the-name) @@ -524,7 +530,7 @@ This pattern would match a class declaration, capturing all of the decorators if You can also mark a node as optional using the `?` operator. For example, this pattern would match all function calls, capturing a string argument if one was present: -``` scheme +```scheme (call_expression function: (identifier) @the-function arguments: (arguments (string)? @the-string-arg)) @@ -534,7 +540,7 @@ You can also mark a node as optional using the `?` operator. For example, this p You can also use parentheses for grouping a sequence of _sibling_ nodes. For example, this pattern would match a comment followed by a function declaration: -``` scheme +```scheme ( (comment) (function_declaration) @@ -543,7 +549,7 @@ You can also use parentheses for grouping a sequence of _sibling_ nodes. For exa Any of the quantification operators mentioned above (`+`, `*`, and `?`) can also be applied to groups. For example, this pattern would match a comma-separated series of numbers: -``` scheme +```scheme ( (number) ("," (number))* @@ -558,7 +564,7 @@ This is similar to _character classes_ from regular expressions (`[abc]` matches For example, this pattern would match a call to either a variable or an object property. In the case of a variable, capture it as `@function`, and in the case of a property, capture it as `@method`: -``` scheme +```scheme (call_expression function: [ (identifier) @function @@ -569,7 +575,7 @@ In the case of a variable, capture it as `@function`, and in the case of a prope This pattern would match a set of possible keyword tokens, capturing them as `@keyword`: -``` scheme +```scheme [ "break" "delete" @@ -592,7 +598,7 @@ and `_` will match any named or anonymous node. For example, this pattern would match any node inside a call: -``` scheme +```scheme (call (_) @call.inner) ``` @@ -602,7 +608,7 @@ The anchor operator, `.`, is used to constrain the ways in which child patterns When `.` is placed before the _first_ child within a parent pattern, the child will only match when it is the first named node in the parent. For example, the below pattern matches a given `array` node at most once, assigning the `@the-element` capture to the first `identifier` node in the parent `array`: -``` scheme +```scheme (array . (identifier) @the-element) ``` @@ -610,13 +616,13 @@ Without this anchor, the pattern would match once for every identifier in the ar Similarly, an anchor placed after a pattern's _last_ child will cause that child pattern to only match nodes that are the last named child of their parent. The below pattern matches only nodes that are the last named child within a `block`. -``` scheme +```scheme (block (_) @last-expression .) ``` Finally, an anchor _between_ two child patterns will cause the patterns to only match nodes that are immediate siblings. The pattern below, given a long dotted name like `a.b.c.d`, will only match pairs of consecutive identifiers: `a, b`, `b, c`, and `c, d`. -``` scheme +```scheme (dotted_name (identifier) @prev-id . @@ -629,20 +635,38 @@ The restrictions placed on a pattern by an anchor operator ignore anonymous node #### Predicates -You can also specify arbitrary metadata and conditions associated with a pattern by adding _predicate_ S-expressions anywhere within your pattern. Predicate S-expressions start with a _predicate name_ beginning with a `#` character. After that, they can contain an arbitrary number of `@`-prefixed capture names or strings. +You can also specify arbitrary metadata and conditions associated with a pattern +by adding _predicate_ S-expressions anywhere within your pattern. Predicate S-expressions +start with a _predicate name_ beginning with a `#` character. After that, they can +contain an arbitrary number of `@`-prefixed capture names or strings. -For example, this pattern would match identifier whose names is written in `SCREAMING_SNAKE_CASE`: +Tree-Sitter's CLI supports the following predicates by default: -``` scheme -( - (identifier) @constant - (#match? @constant "^[A-Z][A-Z_]+") -) +##### eq?, not-eq?, any-eq?, any-not-eq? + +This family of predicates allows you to match against a single capture or string +value. + +The first argument must be a capture, but the second can be either a capture to +compare the two captures' text, or a string to compare first capture's text +against. + +The base predicate is "#eq?", but its complement "#not-eq?" can be used to _not_ +match a value. + +Consider the following example targeting C: + +```scheme +((identifier) @variable.builtin + (#eq? @variable.builtin "self")) ``` -And this pattern would match key-value pairs where the `value` is an identifier with the same name as the key: +This pattern would match any identifier that is `self`. + +And this pattern would match key-value pairs where the `value` is an identifier +with the same name as the key: -``` scheme +```scheme ( (pair key: (property_identifier) @key-name @@ -651,7 +675,87 @@ And this pattern would match key-value pairs where the `value` is an identifier ) ``` -_Note_ - Predicates are not handled directly by the Tree-sitter C library. They are just exposed in a structured form so that higher-level code can perform the filtering. However, higher-level bindings to Tree-sitter like [the Rust crate](https://github.com/tree-sitter/tree-sitter/tree/master/lib/binding_rust) or the [WebAssembly binding](https://github.com/tree-sitter/tree-sitter/tree/master/lib/binding_web) implement a few common predicates like `#eq?` and `#match?`. +The prefix "any-" is meant for use with quantified captures. Here's +an example finding a segment of empty comments + +```scheme +((comment)+ @comment.empty + (#any-eq? @comment.empty "//")) +``` + +Note that "#any-eq?" will match a quantified capture if +_any_ of the nodes match the predicate, while by default a quantified capture +will only match if _all_ the nodes match the predicate. + +##### match?, not-match?, any-match?, any-not-match? + +These predicates are similar to the eq? predicates, but they use regular expressions +to match against the capture's text. + +The first argument must be a capture, and the second must be a string containing +a regular expression. + +For example, this pattern would match identifier whose name is written in `SCREAMING_SNAKE_CASE`: + +```scheme +((identifier) @constant + (#match? @constant "^[A-Z][A-Z_]+")) +``` + +Here's an example finding potential documentation comments in C + +```scheme +((comment)+ @comment.documentation + (#match? @comment.documentation "^///\s+.*")) +``` + +Here's another example finding Cgo comments to potentially inject with C + +```scheme +((comment)+ @injection.content + . + (import_declaration + (import_spec path: (interpreted_string_literal) @_import_c)) + (#eq? @_import_c "\"C\"") + (#match? @injection.content "^//")) +``` + +##### any-of?, not-any-of? + +The "any-of?" predicate allows you to match a capture against multiple strings, +and will match if the capture's text is equal to any of the strings. + +Consider this example that targets JavaScript: + +```scheme +((identifier) @variable.builtin + (#any-of? @variable.builtin + "arguments" + "module" + "console" + "window" + "document")) +``` + +This will match any of the builtin variables in JavaScript. + +_Note_ — Predicates are not handled directly by the Tree-sitter C library. +They are just exposed in a structured form so that higher-level code can perform +the filtering. However, higher-level bindings to Tree-sitter like +[the Rust Crate](https://github.com/tree-sitter/tree-sitter/tree/master/lib/binding_rust) +or the [WebAssembly binding](https://github.com/tree-sitter/tree-sitter/tree/master/lib/binding_web) +do implement a few common predicates like the `#eq?`, `#match?`, and `#any-of?` +predicates explained above. + +To recap about the predicates Tree-Sitter's bindings support: + +- `#eq?` checks for a direct match against a capture or string +- `#match?` checks for a match against a regular expression +- `#any-of?` checks for a match against a list of strings +- Adding `not-` to the beginning of any of these predicates will negate the match +- By default, a quantified capture will only match if _all_ of the nodes match the predicate +- Adding `any-` before the `eq` or `match` predicates will instead match if any of the nodes match the predicate + ### The Query API diff --git a/third-party/tree-sitter/tree-sitter/docs/section-3-creating-parsers.md b/third-party/tree-sitter/tree-sitter/docs/section-3-creating-parsers.md index 5677292f0c..33976442b9 100644 --- a/third-party/tree-sitter/tree-sitter/docs/section-3-creating-parsers.md +++ b/third-party/tree-sitter/tree-sitter/docs/section-3-creating-parsers.md @@ -5,7 +5,7 @@ permalink: creating-parsers # Creating parsers -Developing Tree-sitter grammars can have a difficult learning curve, but once you get the hang of it, it can be fun and even zen-like. This document will help get you to get started and to develop a useful mental model. +Developing Tree-sitter grammars can have a difficult learning curve, but once you get the hang of it, it can be fun and even zen-like. This document will help you to get started and to develop a useful mental model. ## Getting Started @@ -20,7 +20,7 @@ In order to develop a Tree-sitter parser, there are two dependencies that you ne To create a Tree-sitter parser, you need to use [the `tree-sitter` CLI][tree-sitter-cli]. You can install the CLI in a few different ways: -* Build the `tree-sitter-cli` [Rust crate][crate] from source using [`cargo`][cargo], the Rust package manager. This works on any platform. See [the contributing docs](/docs/section-5-contributing.md#developing-tree-sitter) for more information. +* Build the `tree-sitter-cli` [Rust crate][crate] from source using [`cargo`][cargo], the Rust package manager. This works on any platform. See [the contributing docs](./contributing#developing-tree-sitter) for more information. * Install the `tree-sitter-cli` [Node.js module][node-module] using [`npm`][npm], the Node package manager. This approach is fast, but is only works on certain platforms, because it relies on pre-built binaries. * Download a binary for your platform from [the latest GitHub release][releases], and put it into a directory on your `PATH`. @@ -46,7 +46,7 @@ npm install --save nan npm install --save-dev tree-sitter-cli ``` -The last command will install the CLI into the `node_modules` folder in your working directory. An executable program called `tree-sitter` will be created inside of `node_modules/.bin/`. You may want to follow the Node.js convention of adding that folder to your your `PATH` so that you can easily run this program when working in this directory. +The last command will install the CLI into the `node_modules` folder in your working directory. An executable program called `tree-sitter` will be created inside of `node_modules/.bin/`. You may want to follow the Node.js convention of adding that folder to your `PATH` so that you can easily run this program when working in this directory. ```sh # In your shell profile script @@ -80,7 +80,9 @@ You can test this parser by creating a source file with the contents "hello" and echo 'hello' > example-file tree-sitter parse example-file ``` + Alternatively, in Windows PowerShell: + ```pwsh "hello" | Out-File example-file -Encoding utf8 tree-sitter parse example-file @@ -88,7 +90,7 @@ tree-sitter parse example-file This should print the following: -``` +```text (source_file [0, 0] - [1, 0]) ``` @@ -102,14 +104,47 @@ Let's go over all of the functionality of the `tree-sitter` command line tool. The most important command you'll use is `tree-sitter generate`. This command reads the `grammar.js` file in your current working directory and creates a file called `src/parser.c`, which implements the parser. After making changes to your grammar, just run `tree-sitter generate` again. -The first time you run `tree-sitter generate`, it will also generate a few other files: +The first time you run `tree-sitter generate`, it will also generate a few other files for bindings for the following languages: + +#### C/C++ + +* `Makefile` - This file tells `make` how to compile your language. +* `bindings/c/tree-sitter-language.h` - This file provides the C interface of your language. +* `bindings/c/tree-sitter-language.pc` - This file provides pkg-config metadata about your language's C library. +* `src/tree_sitter/parser.h` - This file provides some basic C definitions that are used in your generated `parser.c` file. +* `src/tree_sitter/alloc.h` - This file provides some memory allocation macros that are to be used in your external scanner, if you have one. +* `src/tree_sitter/array.h` - This file provides some array macros that are to be used in your external scanner, if you have one. + +#### Go + +* `bindings/go/binding.go` - This file wraps your language in a Go module. +* `bindings/go/binding_test.go` - This file contains a test for the Go package. + +#### Node * `binding.gyp` - This file tells Node.js how to compile your language. * `bindings/node/index.js` - This is the file that Node.js initially loads when using your language. -* `bindings/node/binding.cc` - This file wraps your language in a JavaScript object when used in Node.js. +* `bindings/node/binding.cc` - This file wraps your language in a JavaScript module for Node.js. + +#### Python + +* `pyproject.toml` - This file is the manifest of the Python package. +* `setup.py` - This file tells Python how to compile your language. +* `bindings/python/binding.c` - This file wraps your language in a Python module. +* `bindings/python/tree_sitter_language/__init__.py` - This file tells Python how to load your language. +* `bindings/python/tree_sitter_language/__init__.pyi` - This file provides type hints for your parser when used in Python. +* `bindings/python/tree_sitter_language/py.typed` - This file provides type hints for your parser when used in Python. + +#### Rust + +* `Cargo.toml` - This file is the manifest of the Rust package. * `bindings/rust/lib.rs` - This file wraps your language in a Rust crate when used in Rust. * `bindings/rust/build.rs` - This file wraps the building process for the Rust crate. -* `src/tree_sitter/parser.h` - This file provides some basic C definitions that are used in your generated `parser.c` file. + +#### Swift + +* `Package.swift` - This file tells Swift how to compile your language. +* `bindings/swift/TreeSitterLanguage/language.h` - This file wraps your language in a Swift module when used in Swift. If there is an ambiguity or *local ambiguity* in your grammar, Tree-sitter will detect it during parser generation, and it will exit with a `Unresolved conflict` error message. See below for more information on these errors. @@ -117,11 +152,11 @@ If there is an ambiguity or *local ambiguity* in your grammar, Tree-sitter will The `tree-sitter test` command allows you to easily test that your parser is working correctly. -For each rule that you add to the grammar, you should first create a *test* that describes how the syntax trees should look when parsing that rule. These tests are written using specially-formatted text files in the `corpus/` or `test/corpus/` directories within your parser's root folder. +For each rule that you add to the grammar, you should first create a *test* that describes how the syntax trees should look when parsing that rule. These tests are written using specially-formatted text files in the `test/corpus/` directory within your parser's root folder. For example, you might have a file called `test/corpus/statements.txt` that contains a series of entries like this: -``` +```text ================== Return statements ================== @@ -147,7 +182,7 @@ func x() int { The expected output section can also *optionally* show the [*field names*][field-names-section] associated with each child node. To include field names in your tests, you write a node's field name followed by a colon, before the node itself in the S-expression: -``` +```text (source_file (function_definition name: (identifier) @@ -159,7 +194,7 @@ func x() int { * If your language's syntax conflicts with the `===` and `---` test separators, you can optionally add an arbitrary identical suffix (in the below example, `|||`) to disambiguate them: -``` +```text ==================||| Basic module ==================||| @@ -179,13 +214,73 @@ increment(n) == n + 1 These tests are important. They serve as the parser's API documentation, and they can be run every time you change the grammar to verify that everything still parses correctly. -By default, the `tree-sitter test` command runs all of the tests in your `corpus` or `test/corpus/` folder. To run a particular test, you can use the `-f` flag: +By default, the `tree-sitter test` command runs all of the tests in your `test/corpus/` folder. To run a particular test, you can use the `-f` flag: ```sh tree-sitter test -f 'Return statements' ``` -The recommendation is to be comprehensive in adding tests. If it's a visible node, add it to a test file in your `corpus` directory. It's typically a good idea to test all of the permutations of each language construct. This increases test coverage, but doubly acquaints readers with a way to examine expected outputs and understand the "edges" of a language. +The recommendation is to be comprehensive in adding tests. If it's a visible node, add it to a test file in your `test/corpus` directory. It's typically a good idea to test all of the permutations of each language construct. This increases test coverage, but doubly acquaints readers with a way to examine expected outputs and understand the "edges" of a language. + +#### Attributes + +Tests can be annotated with a few `attributes`. Attributes must be put in the header, below the test name, and start with a `:`. +A couple of attributes also take in a parameter, which require the use of parenthesis. + +**Note**: If you'd like to supply in multiple parameters, e.g. to run tests on multiple platforms or to test multiple languages, you can repeat the attribute on a new line. + +The following attributes are available: + +- `:skip` — This attribute will skip the test when running `tree-sitter test`. + This is useful when you want to temporarily disable running a test without deleting it. +- `:error` — This attribute will assert that the parse tree contains an error. It's useful to just validate that a certain input is invalid without displaying the whole parse tree, as such you should omit the parse tree below the `---` line. +- `:fail-fast` — This attribute will stop the testing additional tests if the test marked with this attribute fails. +- `:language(LANG)` — This attribute will run the tests using the parser for the specified language. This is useful for multi-parser repos, such as XML and DTD, or Typescript and TSX. The default parser will be the first entry in the `tree-sitter` field in the root `package.json`, so having a way to pick a second or even third parser is useful. +- `:platform(PLATFORM)` — This attribute specifies the platform on which the test should run. It is useful to test platform-specific behavior (e.g. Windows newlines are different from Unix). This attribute must match up with Rust's [`std::env::consts::OS`](https://doc.rust-lang.org/std/env/consts/constant.OS.html). + +Examples using attributes: + +```text +========================= +Test that will be skipped +:skip +========================= + +int main() {} + +------------------------- + +==================================== +Test that will run on Linux or macOS + +:platform(linux) +:platform(macos) +==================================== + +int main() {} + +------------------------------------ + +======================================================================== +Test that expects an error, and will fail fast if there's no parse error +:fail-fast +:error +======================================================================== + +int main ( {} + +------------------------------------------------------------------------ + +================================================= +Test that will parse with both Typescript and TSX +:language(typescript) +:language(tsx) +================================================= + +console.log('Hello, world!'); + +------------------------------------------------- +``` #### Automatic Compilation @@ -199,7 +294,7 @@ The `tree-sitter test` command will *also* run any syntax highlighting tests in You can run your parser on an arbitrary file using `tree-sitter parse`. This will print the resulting the syntax tree, including nodes' ranges and field names, like this: -``` +```text (source_file [0, 0] - [3, 0] (function_declaration [0, 0] - [2, 1] name: (identifier [0, 5] - [0, 9]) @@ -227,6 +322,20 @@ The following is a complete list of built-in functions you can use in your `gram * **Symbols (the `$` object)** - Every grammar rule is written as a JavaScript function that takes a parameter conventionally called `$`. The syntax `$.identifier` is how you refer to another grammar symbol within a rule. Names starting with `$.MISSING` or `$.UNEXPECTED` should be avoided as they have special meaning for the `tree-sitter test` command. * **String and Regex literals** - The terminal symbols in a grammar are described using JavaScript strings and regular expressions. Of course during parsing, Tree-sitter does not actually use JavaScript's regex engine to evaluate these regexes; it generates its own regex-matching logic as part of each parser. Regex literals are just used as a convenient way of writing regular expressions in your grammar. +* **Regex Limitations** - Currently, only a subset of the Regex engine is actually +supported. This is due to certain features like lookahead and lookaround assertions +not feasible to use in an LR(1) grammar, as well as certain flags being unnecessary +for tree-sitter. However, plenty of features are supported by default: + + * Character classes + * Character ranges + * Character sets + * Quantifiers + * Alternation + * Grouping + * Unicode character escapes + * Unicode property escapes + * **Sequences : `seq(rule1, rule2, ...)`** - This function creates a rule that matches any number of other rules, one after another. It is analogous to simply writing multiple symbols next to each other in [EBNF notation][ebnf]. * **Alternatives : `choice(rule1, rule2, ...)`** - This function creates a rule that matches *one* of a set of possible rules. The order of the arguments does not matter. This is analogous to the `|` (pipe) operator in EBNF notation. * **Repetitions : `repeat(rule)`** - This function creates a rule that matches *zero-or-more* occurrences of a given rule. It is analogous to the `{x}` (curly brace) syntax in EBNF notation. @@ -236,7 +345,15 @@ The following is a complete list of built-in functions you can use in your `gram * **Left Associativity : `prec.left([number], rule)`** - This function marks the given rule as left-associative (and optionally applies a numerical precedence). When an LR(1) conflict arises in which all of the rules have the same numerical precedence, Tree-sitter will consult the rules' associativity. If there is a left-associative rule, Tree-sitter will prefer matching a rule that ends *earlier*. This works similarly to [associativity directives][yacc-prec] in Yacc grammars. * **Right Associativity : `prec.right([number], rule)`** - This function is like `prec.left`, but it instructs Tree-sitter to prefer matching a rule that ends *later*. * **Dynamic Precedence : `prec.dynamic(number, rule)`** - This function is similar to `prec`, but the given numerical precedence is applied at *runtime* instead of at parser generation time. This is only necessary when handling a conflict dynamically using the `conflicts` field in the grammar, and when there is a genuine *ambiguity*: multiple rules correctly match a given piece of code. In that event, Tree-sitter compares the total dynamic precedence associated with each rule, and selects the one with the highest total. This is similar to [dynamic precedence directives][bison-dprec] in Bison grammars. -* **Tokens : `token(rule)`** - This function marks the given rule as producing only a single token. Tree-sitter's default is to treat each String or RegExp literal in the grammar as a separate token. Each token is matched separately by the lexer and returned as its own leaf node in the tree. The `token` function allows you to express a complex rule using the functions described above (rather than as a single regular expression) but still have Tree-sitter treat it as a single token. +* **Tokens : `token(rule)`** - This function marks the given rule as producing only +a single token. Tree-sitter's default is to treat each String or RegExp literal +in the grammar as a separate token. Each token is matched separately by the lexer +and returned as its own leaf node in the tree. The `token` function allows you to +express a complex rule using the functions described above (rather than as a single +regular expression) but still have Tree-sitter treat it as a single token. +The token function will only accept terminal rules, so `token($.foo)` will not work. +You can think of it as a shortcut for squashing complex rules of strings or regexes +down to a single token. * **Immediate Tokens : `token.immediate(rule)`** - Usually, whitespace (and any other extras, such as comments) is optional before each token. This function means that the token will only match if there is no whitespace. * **Aliases : `alias(rule, name)`** - This function causes the given rule to *appear* with an alternative name in the syntax tree. If `name` is a *symbol*, as in `alias($.foo, $.bar)`, then the aliased rule will *appear* as a [named node][named-vs-anonymous-nodes-section] called `bar`. And if `name` is a *string literal*, as in `alias($.foo, 'bar')`, then the aliased rule will appear as an [anonymous node][named-vs-anonymous-nodes-section], as if the rule had been written as the simple string. * **Field Names : `field(name, rule)`** - This function assigns a *field name* to the child node(s) matched by the given rule. In the resulting syntax tree, you can then use that field name to access specific children. @@ -251,7 +368,6 @@ In addition to the `name` and `rules` fields, grammars have a few other optional * **`word`** - the name of a token that will match keywords for the purpose of the [keyword extraction](#keyword-extraction) optimization. * **`supertypes`** an array of hidden rule names which should be considered to be 'supertypes' in the generated [*node types* file][static-node-types]. - ## Writing the Grammar Writing a grammar requires creativity. There are an infinite number of CFGs (context-free grammars) that can be used to describe any given language. In order to produce a good Tree-sitter parser, you need to create a grammar with two important properties: @@ -363,7 +479,7 @@ With this structure in place, you can now freely decide what part of the grammar After developing the *type* sublanguage a bit further, you might decide to switch to working on *statements* or *expressions* instead. It's often useful to check your progress by trying to parse some real code using `tree-sitter parse`. -**And remember to add tests for each rule in your `corpus` folder!** +**And remember to add tests for each rule in your `test/corpus` folder!** ### Structuring Rules Well @@ -375,7 +491,7 @@ return x + y; According to the specification, this line is a `ReturnStatement`, the fragment `x + y` is an `AdditiveExpression`, and `x` and `y` are both `IdentifierReferences`. The relationship between these constructs is captured by a complex series of production rules: -``` +```text ReturnStatement -> 'return' Expression Expression -> AssignmentExpression AssignmentExpression -> ConditionalExpression @@ -432,7 +548,7 @@ To produce a readable syntax tree, we'd like to model JavaScript expressions usi Of course, this flat structure is highly ambiguous. If we try to generate a parser, Tree-sitter gives us an error message: -``` +```text Error: Unresolved conflict for symbol sequence: '-' _expression • '*' … @@ -468,7 +584,7 @@ For an expression like `-a * b`, it's not clear whether the `-` operator applies Applying a higher precedence in `unary_expression` fixes that conflict, but there is still another conflict: -``` +```text Error: Unresolved conflict for symbol sequence: _expression '*' _expression • '*' … @@ -526,29 +642,21 @@ Tree-sitter's parsing process is divided into two phases: parsing (which is desc Grammars often contain multiple tokens that can match the same characters. For example, a grammar might contain the tokens (`"if"` and `/[a-z]+/`). Tree-sitter differentiates between these conflicting tokens in a few ways. -1. **External Scanning** - If your grammar has an external scanner and one or more tokens in your `externals` array are valid at the current location, your external scanner will always be called first to determine whether those tokens are present. +1. **Context-aware Lexing** - Tree-sitter performs lexing on-demand, during the parsing process. At any given position in a source document, the lexer only tries to recognize tokens that are *valid* at that position in the document. -1. **Context-Aware Lexing** - Tree-sitter performs lexing on-demand, during the parsing process. At any given position in a source document, the lexer only tries to recognize tokens that are *valid* at that position in the document. +2. **Lexical Precedence** - When the precedence functions described [above](#the-grammar-dsl) are used *within* the `token` function, the given explicit precedence values serve as instructions to the lexer. If there are two valid tokens that match the characters at a given position in the document, Tree-sitter will select the one with the higher precedence. -1. **Earliest Starting Position** - Tree-sitter will prefer tokens with an earlier starting position. This is most often seen with very permissive regular expressions similar to `/.*/`, which are greedy and will consume as much text as possible. In this example the regex would consume all text until hitting a newline - even if text on that line could be interpreted as a different token. +3. **Match Length** - If multiple valid tokens with the same precedence match the characters at a given position in a document, Tree-sitter will select the token that matches the [longest sequence of characters][longest-match]. -1. **Explicit Lexical Precedence** - When the precedence functions described [above](#the-grammar-dsl) are used within the `token` function, the given precedence values serve as instructions to the lexer. If there are two valid tokens that match the characters at a given position in the document, Tree-sitter will select the one with the higher precedence. +4. **Match Specificity** - If there are two valid tokens with the same precedence and which both match the same number of characters, Tree-sitter will prefer a token that is specified in the grammar as a `String` over a token specified as a `RegExp`. -1. **Match Length** - If multiple valid tokens with the same precedence match the characters at a given position in a document, Tree-sitter will select the token that matches the [longest sequence of characters][longest-match]. +5. **Rule Order** - If none of the above criteria can be used to select one token over another, Tree-sitter will prefer the token that appears earlier in the grammar. -1. **Match Specificity** - If there are two valid tokens with the same precedence and which both match the same number of characters, Tree-sitter will prefer a token that is specified in the grammar as a `String` over a token specified as a `RegExp`. - -1. **Rule Order** - If none of the above criteria can be used to select one token over another, Tree-sitter will prefer the token that appears earlier in the grammar. +If there is an external scanner it may have [an additional impact](#other-external-scanner-details) over regular tokens defined in the grammar. ### Lexical Precedence vs. Parse Precedence -One common mistake involves not distinguishing lexical precedence from parse precedence. -Parse precedence determines which rule is chosen to interpret a given sequence of tokens. -Lexical precedence determines which token is chosen to interpret a given section of text. -It is a lower-level operation that is done first. -The above list fully capture tree-sitter's lexical precedence rules, and you will probably refer back to this section of the documentation more often than any other. -Most of the time when you really get stuck, you're dealing with a lexical precedence problem. -Pay particular attention to the difference in meaning between using `prec` inside the `token` function versus outside of it. +One common mistake involves not distinguishing *lexical precedence* from *parse precedence*. Parse precedence determines which rule is chosen to interpret a given sequence of tokens. *Lexical precedence* determines which token is chosen to interpret at a given position of text and it is a lower-level operation that is done first. The above list fully captures Tree-sitter's lexical precedence rules, and you will probably refer back to this section of the documentation more often than any other. Most of the time when you really get stuck, you're dealing with a lexical precedence problem. Pay particular attention to the difference in meaning between using `prec` inside of the `token` function versus outside of it. The *lexical precedence* syntax is `token(prec(N, ...))`. ### Keywords @@ -587,7 +695,7 @@ grammar({ ), binary_expression: $ => choice( - prec.left(1, seq($._expression, 'instanceof', $._expression) + prec.left(1, seq($._expression, 'instanceof', $._expression)) // ... ), @@ -608,6 +716,7 @@ Aside from improving error detection, keyword extraction also has performance be ### External Scanners Many languages have some tokens whose structure is impossible or inconvenient to describe with a regular expression. Some examples: + * [Indent and dedent][indent-tokens] tokens in Python * [Heredocs][heredoc] in Bash and Ruby * [Percent strings][percent-string] in Ruby @@ -632,10 +741,19 @@ grammar({ Then, add another C or C++ source file to your project. Currently, its path must be `src/scanner.c` or `src/scanner.cc` for the CLI to recognize it. Be sure to add this file to the `sources` section of your `binding.gyp` file so that it will be included when your project is compiled by Node.js and uncomment the appropriate block in your `bindings/rust/build.rs` file so that it will be included in your Rust crate. +> **Note** +> +> C++ scanners are now deprecated and will be removed in the near future. +> While it is currently possible to write an external scanner in C++, it can be difficult +> to get working cross-platform and introduces extra requirements; therefore it +> is *greatly* preferred to use C. + In this new source file, define an [`enum`][enum] type containing the names of all of your external tokens. The ordering of this enum must match the order in your grammar's `externals` array; the actual names do not matter. ```c -#include +#include "tree_sitter/parser.h" +#include "tree_sitter/alloc.h" +#include "tree_sitter/array.h" enum TokenType { INDENT, @@ -656,7 +774,6 @@ void * tree_sitter_my_language_external_scanner_create() { This function should create your scanner object. It will only be called once anytime your language is set on a parser. Often, you will want to allocate memory on the heap and return a pointer to it. If your external scanner doesn't need to maintain any state, it's ok to return `NULL`. - #### Destroy ```c @@ -716,13 +833,13 @@ This function is responsible for recognizing external tokens. It should return ` * **`void (*advance)(TSLexer *, bool skip)`** - A function for advancing to the next character. If you pass `true` for the second argument, the current character will be treated as whitespace; whitespace won't be included in the text range associated with tokens emitted by the external scanner. * **`void (*mark_end)(TSLexer *)`** - A function for marking the end of the recognized token. This allows matching tokens that require multiple characters of lookahead. By default (if you don't call `mark_end`), any character that you moved past using the `advance` function will be included in the size of the token. But once you call `mark_end`, then any later calls to `advance` will *not* increase the size of the returned token. You can call `mark_end` multiple times to increase the size of the token. * **`uint32_t (*get_column)(TSLexer *)`** - A function for querying the current column position of the lexer. It returns the number of codepoints since the start of the current line. The codepoint position is recalculated on every call to this function by reading from the start of the line. -* **`bool (*is_at_included_range_start)(const TSLexer *)`** - A function for checking whether the parser has just skipped some characters in the document. When parsing an embedded document using the `ts_parser_set_included_ranges` function (described in the [multi-language document section][multi-language-section]), your scanner may want to apply some special behavior when moving to a disjoint part of the document. For example, in [EJS documents][ejs], the JavaScript parser uses this function to enable inserting automatic semicolon tokens in between the code directives, delimited by `<%` and `%>`. +* **`bool (*is_at_included_range_start)(const TSLexer *)`** - A function for checking whether the parser has just skipped some characters in the document. When parsing an embedded document using the `ts_parser_set_included_ranges` function (described in the [multi-language document section][multi-language-section]), the scanner may want to apply some special behavior when moving to a disjoint part of the document. For example, in [EJS documents][ejs], the JavaScript parser uses this function to enable inserting automatic semicolon tokens in between the code directives, delimited by `<%` and `%>`. * **`bool (*eof)(const TSLexer *)`** - A function for determining whether the lexer is at the end of the file. The value of `lookahead` will be `0` at the end of a file, but this function should be used instead of checking for that value because the `0` or "NUL" value is also a valid character that could be present in the file being parsed. -The third argument to the `scan` function is an array of booleans that indicates which of your external tokens are currently expected by the parser. You should only look for a given token if it is valid according to this array. At the same time, you cannot backtrack, so you may need to combine certain pieces of logic. +The third argument to the `scan` function is an array of booleans that indicates which of external tokens are currently expected by the parser. You should only look for a given token if it is valid according to this array. At the same time, you cannot backtrack, so you may need to combine certain pieces of logic. ```c -if (valid_symbols[INDENT] || valid_symbol[DEDENT]) { +if (valid_symbols[INDENT] || valid_symbols[DEDENT]) { // ... logic that is common to both `INDENT` and `DEDENT` @@ -736,23 +853,124 @@ if (valid_symbols[INDENT] || valid_symbol[DEDENT]) { } ``` +#### External Scanner Helpers + +##### Allocator + +Instead of using libc's `malloc`, `calloc`, `realloc`, and `free`, you should use the versions prefixed with `ts_` from `tree_sitter/alloc.h`. +These macros can allow a potential consumer to override the default allocator with their own implementation, but by default will use the libc functions. + +As a consumer of the tree-sitter core library as well as any parser libraries that might use allocations, you can enable overriding the default allocator and have it use the same one as the library allocator, of which you can set with `ts_set_allocator`. +To enable this overriding in scanners, you must compile them with the `TREE_SITTER_REUSE_ALLOCATOR` macro defined, and tree-sitter the library must be linked into your final app dynamically, since it needs to resolve the internal functions at runtime. If you are compiling +an executable binary that uses the core library, but want to load parsers dynamically at runtime, then you will have to use a special linker flag on Unix. For non-Darwin systems, that would be `--dynamic-list` and for Darwin systems, that would be `-exported_symbols_list`. +The CLI does exactly this, so you can use it as a reference (check out `cli/build.rs`). + +For example, assuming you wanted to allocate 100 bytes for your scanner, you'd do so like the following example: + +```c +#include "tree_sitter/parser.h" +#include "tree_sitter/alloc.h" + +// ... + +void* tree_sitter_my_language_external_scanner_create() { + return ts_calloc(100, 1); // or ts_malloc(100) +} + +// ... + +``` + +##### Arrays + +If you need to use array-like types in your scanner, such as tracking a stack of indentations or tags, you should use the array macros from `tree_sitter/array.h`. + +There are quite a few of them provided for you, but here's how you could get started tracking some . Check out the header itself for more detailed documentation. + +**NOTE**: Do not use any of the array functions or macros that are prefixed with an underscore and have comments saying that it is not what you are looking for. +These are internal functions used as helpers by other macros that are public. They are not meant to be used directly, nor are they what you want. + +```c +#include "tree_sitter/parser.h" +#include "tree_sitter/array.h" + +enum TokenType { + INDENT, + DEDENT, + NEWLINE, + STRING, +} + +// Create the array in your create function + +void* tree_sitter_my_language_external_scanner_create() { + return ts_calloc(1, sizeof(Array(int))); + + // or if you want to zero out the memory yourself + + Array(int) *stack = ts_malloc(sizeof(Array(int))); + array_init(&stack); + return stack; +} + +bool tree_sitter_my_language_external_scanner_scan( + void *payload, + TSLexer *lexer, + const bool *valid_symbols +) { + Array(int) *stack = payload; + if (valid_symbols[INDENT]) { + array_push(stack, lexer->get_column(lexer)); + lexer->result_symbol = INDENT; + return true; + } + if (valid_symbols[DEDENT]) { + array_pop(stack); // this returns the popped element by value, but we don't need it + lexer->result_symbol = DEDENT; + return true; + } + + // we can also use an array on the stack to keep track of a string + + Array(char) next_string = array_new(); + + if (valid_symbols[STRING] && lexer->lookahead == '"') { + lexer->advance(lexer, false); + while (lexer->lookahead != '"' && lexer->lookahead != '\n' && !lexer->eof(lexer)) { + array_push(&next_string, lexer->lookahead); + lexer->advance(lexer, false); + } + + // assume we have some arbitrary constraint of not having more than 100 characters in a string + if (lexer->lookahead == '"' && next_string.size <= 100) { + lexer->advance(lexer, false); + lexer->result_symbol = STRING; + return true; + } + } + + return false; +} + +``` + #### Other External Scanner Details -If a token in your `externals` array is valid at the current position in the parse, your external scanner will be called first before anything else is done. -This means your external scanner functions as a powerful override of tree-sitter's lexing behavior, and can be used to solve problems that can't be cracked with ordinary lexical, parse, or dynamic precedence. +If a token in the `externals` array is valid at a given position in the parse, the external scanner will be called first before anything else is done. This means the external scanner functions as a powerful override of Tree-sitter's lexing behavior, and can be used to solve problems that can't be cracked with ordinary lexical, parse, or dynamic precedence. + +If a syntax error is encountered during regular parsing, Tree-sitter's first action during error recovery will be to call the external scanner's `scan` function with all tokens marked valid. The scanner should detect this case and handle it appropriately. One simple method of detection is to add an unused token to the end of the `externals` array, for example `externals: $ => [$.token1, $.token2, $.error_sentinel]`, then check whether that token is marked valid to determine whether Tree-sitter is in error correction mode. + +If you put terminal keywords in the `externals` array, for example `externals: $ => ['if', 'then', 'else']`, then any time those terminals are present in the grammar they will be tokenized by the external scanner. It is similar to writing `externals: [$.if_keyword, $.then_keyword, $.else_keyword]` then using `alias($.if_keyword, 'if')` in the grammar. -If a syntax error is encountered during regular parsing, tree-sitter's first action during error recovery will be to call your external scanner's `scan` function with all tokens marked valid. -Your scanner should detect this case and handle it appropriately. -One simple method of detection is to add an unused token to the end of your `externals` array, for example `externals: $ => [$.token1, $.token2, $.error_sentinel]`, then check whether that token is marked valid to determine whether tree-sitter is in error correction mode. +If in the `externals` array use literal keywords then lexing works in two steps, the external scanner will be called first and if it sets a resulting token and returns `true` then the token considered as recognized and Tree-sitter moves to a next token. But the external scanner may return `false` and in this case Tree-sitter fallbacks to the internal lexing mechanism. -If you put terminal keywords in your `externals` array, for example `externals: $ => ['if', 'then', 'else']`, then any time those terminals are present in your grammar they will be tokenized by your external scanner. -It is equivalent to writing `externals: [$.if_keyword, $.then_keyword, $.else_keyword]` then using `alias($.if_keyword, 'if')` in your grammar. +In case of some keywords defined in the `externals` array in a rule referencing form like `$.if_keyword` and there is no additional definition of that rule in the grammar rules, e.g., `if_keyword: $ => 'if'` then fallback to the internal lexer isn't possible because Tree-sitter doesn't know the actual keyword and it's fully the external scanner resposibilty to recognize such tokens. External scanners are a common cause of infinite loops. Be very careful when emitting zero-width tokens from your external scanner, and if you consume characters in a loop be sure use the `eof` function to check whether you are at the end of the file. [ambiguous-grammar]: https://en.wikipedia.org/wiki/Ambiguous_grammar -[antlr]: http://www.antlr.org/ +[antlr]: https://www.antlr.org [bison-dprec]: https://www.gnu.org/software/bison/manual/html_node/Generalized-LR-Parsing.html [bison]: https://en.wikipedia.org/wiki/GNU_bison [c-linkage]: https://en.cppreference.com/w/cpp/language/language_linkage diff --git a/third-party/tree-sitter/tree-sitter/docs/section-4-syntax-highlighting.md b/third-party/tree-sitter/tree-sitter/docs/section-4-syntax-highlighting.md index a6e5d74c8f..818172fd2e 100644 --- a/third-party/tree-sitter/tree-sitter/docs/section-4-syntax-highlighting.md +++ b/third-party/tree-sitter/tree-sitter/docs/section-4-syntax-highlighting.md @@ -9,8 +9,6 @@ Syntax highlighting is a very common feature in applications that deal with code This document explains how the Tree-sitter syntax highlighting system works, using the command line interface. If you are using `tree-sitter-highlight` library (either from C or from Rust), all of these concepts are still applicable, but the configuration data is provided using in-memory objects, rather than files. -**Note - If you are working on syntax highlighting in the [Atom](https://atom.io/) text editor, you should consult [the grammar-creation page](https://flight-manual.atom.io/hacking-atom/sections/creating-a-grammar/) of the Atom Flight Manual, *not* this document. Atom currently uses a different syntax highlighting system that is also based on Tree-sitter, but is older than the one described here.** - ## Overview All of the files needed to highlight a given language are normally included in the same git repository as the Tree-sitter grammar for that language (for example, [`tree-sitter-javascript`](https://github.com/tree-sitter/tree-sitter-javascript), [`tree-sitter-ruby`](https://github.com/tree-sitter/tree-sitter-ruby)). In order to run syntax highlighting from the command-line, three types of files are needed: @@ -27,9 +25,9 @@ The Tree-sitter CLI automatically creates two directories in your home folder. These directories are created in the "normal" place for your platform: -- On Linux, `~/.config/tree-sitter` and `~/.cache/tree-sitter` -- On Mac, `~/Library/Application Support/tree-sitter` and `~/Library/Caches/tree-sitter` -- On Windows, `C:\Users\[username]\AppData\Roaming\tree-sitter` and `C:\Users\[username]\AppData\Local\tree-sitter` +* On Linux, `~/.config/tree-sitter` and `~/.cache/tree-sitter` +* On Mac, `~/Library/Application Support/tree-sitter` and `~/Library/Caches/tree-sitter` +* On Windows, `C:\Users\[username]\AppData\Roaming\tree-sitter` and `C:\Users\[username]\AppData\Local\tree-sitter` The CLI will work if there's no config file present, falling back on default values for each configuration option. To create a config file that you can edit, run this command: @@ -63,6 +61,7 @@ In your config file, the `"theme"` value is an object whose keys are dot-separat #### Highlight Names A theme can contain multiple keys that share a common subsequence. Examples: + * `variable` and `variable.parameter` * `function`, `function.builtin`, and `function.method` @@ -93,6 +92,11 @@ These keys specify basic information about the parser: * `path` (optional) - A relative path from the directory containing `package.json` to another directory containing the `src/` folder, which contains the actual generated parser. The default value is `"."` (so that `src/` is in the same folder as `package.json`), and this very rarely needs to be overridden. +* `external-files` (optional) - A list of relative paths from the root dir of a +parser to files that should be checked for modifications during recompilation. +This is useful during development to have changes to other files besides scanner.c +be picked up by the cli. + ### Language Detection These keys help to decide whether the language applies to a given file: @@ -160,7 +164,7 @@ func increment(a int) int { With this syntax tree: -``` +```scheme (source_file (function_declaration name: (identifier) @@ -180,6 +184,7 @@ With this syntax tree: #### Example Query Suppose we wanted to render this code with the following colors: + * keywords `func` and `return` in purple * function `increment` in blue * type `int` in green @@ -187,7 +192,7 @@ Suppose we wanted to render this code with the following colors: We can assign each of these categories a *highlight name* using a query like this: -``` +```scheme ; highlights.scm "func" @keyword @@ -254,7 +259,7 @@ list = [item] With this syntax tree: -``` +```scheme (program (method name: (identifier) @@ -297,7 +302,7 @@ There are several different types of names within this method: Let's write some queries that let us clearly distinguish between these types of names. First, set up the highlighting query, as described in the previous section. We'll assign distinct colors to method calls, method definitions, and formal parameters: -``` +```scheme ; highlights.scm (call method: (identifier) @function.method) @@ -314,7 +319,7 @@ Let's write some queries that let us clearly distinguish between these types of Then, we'll set up a local variable query to keep track of the variables and scopes. Here, we're indicating that methods and blocks create local *scopes*, parameters and assignments create *definitions*, and other identifiers should be considered *references*: -``` +```scheme ; locals.scm (method) @local.scope @@ -347,6 +352,7 @@ Running `tree-sitter highlight` on this ruby file would produce output like this ### Language Injection Some source files contain code written in multiple different languages. Examples include: + * HTML files, which can contain JavaScript inside of ` diff --git a/third-party/tree-sitter/tree-sitter/docs/section-8-code-navigation-systems.md b/third-party/tree-sitter/tree-sitter/docs/section-8-code-navigation-systems.md index a1b6a280b3..04346e465d 100644 --- a/third-party/tree-sitter/tree-sitter/docs/section-8-code-navigation-systems.md +++ b/third-party/tree-sitter/tree-sitter/docs/section-8-code-navigation-systems.md @@ -9,7 +9,7 @@ Tree-sitter can be used in conjunction with its [tree query language](https://tr ## Tagging and captures -*Tagging* is the act of identifying the entities that can be named in a program. We use Tree-sitter queries to find those entities. Having found them, you use a syntax capture to label the entity and its name. +_Tagging_ is the act of identifying the entities that can be named in a program. We use Tree-sitter queries to find those entities. Having found them, you use a syntax capture to label the entity and its name. The essence of a given tag lies in two pieces of data: the _role_ of the entity that is matched (i.e. whether it is a definition or a reference) and the _kind_ of that entity, which describes how the entity is used (i.e. whether it's a class definition, function call, variable reference, and so on). Our convention is to use a syntax capture following the `@role.kind` capture name format, and another inner capture, always called `@name`, that pulls out the name of a given identifier. @@ -19,14 +19,14 @@ You may optionally include a capture named `@doc` to bind a docstring. For conve This [query](https://github.com/tree-sitter/tree-sitter-python/blob/78c4e9b6b2f08e1be23b541ffced47b15e2972ad/queries/tags.scm#L4-L5) recognizes Python function definitions and captures their declared name. The `function_definition` syntax node is defined in the [Python Tree-sitter grammar](https://github.com/tree-sitter/tree-sitter-python/blob/78c4e9b6b2f08e1be23b541ffced47b15e2972ad/grammar.js#L354). -``` scheme +```scheme (function_definition name: (identifier) @name) @definition.function ``` A more sophisticated query can be found in the [JavaScript Tree-sitter repository](https://github.com/tree-sitter/tree-sitter-javascript/blob/fdeb68ac8d2bd5a78b943528bb68ceda3aade2eb/queries/tags.scm#L63-L70): -``` scheme +```scheme (assignment_expression left: [ (identifier) @name @@ -39,7 +39,7 @@ A more sophisticated query can be found in the [JavaScript Tree-sitter repositor An even more sophisticated query is in the [Ruby Tree-sitter repository](https://github.com/tree-sitter/tree-sitter-ruby/blob/1ebfdb288842dae5a9233e2509a135949023dd82/queries/tags.scm#L24-L43), which uses built-in functions to strip the Ruby comment character (`#`) from the docstrings associated with a class or singleton-class declaration, then selects only the docstrings adjacent to the node matched as `@definition.class`. -``` scheme +```scheme ( (comment)* @doc . @@ -79,7 +79,7 @@ The below table describes a standard vocabulary for kinds and roles during the t You can use the `tree-sitter tags` command to test out a tags query file, passing as arguments one or more files to tag. We can run this tool from within the Tree-sitter Ruby repository, over code in a file called `test.rb`: -``` ruby +```ruby module Foo class Bar # won't be included @@ -93,7 +93,7 @@ end Invoking `tree-sitter tags test.rb` produces the following console output, representing matched entities' name, role, location, first line, and docstring: -``` +```text test.rb Foo | module def (0, 7) - (0, 10) `module Foo` Bar | class def (1, 8) - (1, 11) `class Bar` diff --git a/third-party/tree-sitter/tree-sitter/highlight/Cargo.toml b/third-party/tree-sitter/tree-sitter/highlight/Cargo.toml index e85ced8e7c..694f5064e1 100644 --- a/third-party/tree-sitter/tree-sitter/highlight/Cargo.toml +++ b/third-party/tree-sitter/tree-sitter/highlight/Cargo.toml @@ -1,26 +1,26 @@ [package] name = "tree-sitter-highlight" +version.workspace = true description = "Library for performing syntax highlighting with Tree-sitter" -version = "0.20.1" authors = [ "Max Brunsfeld ", "Tim Clem ", ] -license = "MIT" +edition.workspace = true +rust-version.workspace = true readme = "README.md" -edition = "2018" +homepage.workspace = true +repository.workspace = true +license.workspace = true keywords = ["incremental", "parsing", "syntax", "highlighting"] categories = ["parsing", "text-editors"] -repository = "https://github.com/tree-sitter/tree-sitter" -rust-version.workspace = true [lib] crate-type = ["lib", "staticlib"] [dependencies] -regex = "1" -thiserror = "1.0" +lazy_static.workspace = true +regex.workspace = true +thiserror.workspace = true -[dependencies.tree-sitter] -version = "0.20" -path = "../lib" +tree-sitter.workspace = true diff --git a/third-party/tree-sitter/tree-sitter/highlight/README.md b/third-party/tree-sitter/tree-sitter/highlight/README.md index e8a5d063a1..982e510a60 100644 --- a/third-party/tree-sitter/tree-sitter/highlight/README.md +++ b/third-party/tree-sitter/tree-sitter/highlight/README.md @@ -1,22 +1,25 @@ -# `tree-sitter-highlight` +# Tree-sitter Highlight -[![Crates.io](https://img.shields.io/crates/v/tree-sitter-highlight.svg)](https://crates.io/crates/tree-sitter-highlight) +[![crates.io badge]][crates.io] -### Usage +[crates.io]: https://crates.io/crates/tree-sitter-highlight +[crates.io badge]: https://img.shields.io/crates/v/tree-sitter-highlight.svg?color=%23B48723 -Add this crate, and the language-specific crates for whichever languages you want to parse, to your `Cargo.toml`: +## Usage + +Add this crate, and the language-specific crates for whichever languages you want +to parse, to your `Cargo.toml`: ```toml [dependencies] -tree-sitter-highlight = "0.19" -tree-sitter-html = "0.19" -tree-sitter-javascript = "0.19" +tree-sitter-highlight = "^0.21.0" +tree-sitter-javascript = "0.20.3" ``` Define the list of highlight names that you will recognize: ```rust -let highlight_names = &[ +let highlight_names = [ "attribute", "constant", "function.builtin", @@ -38,34 +41,29 @@ let highlight_names = &[ ]; ``` -Create a highlighter. You need one of these for each thread that you're using for syntax highlighting: +Create a highlighter. You need one of these for each thread that you're using for +syntax highlighting: ```rust use tree_sitter_highlight::Highlighter; -let highlighter = Highlighter::new(); +let mut highlighter = Highlighter::new(); ``` -Load some highlighting queries from the `queries` directory of some language repositories: +Load some highlighting queries from the `queries` directory of the language repository: ```rust use tree_sitter_highlight::HighlightConfiguration; -let html_language = unsafe { tree_sitter_html() }; -let javascript_language = unsafe { tree_sitter_javascript() }; - -let html_config = HighlightConfiguration::new( - tree_sitter_html::language(), - tree_sitter_html::HIGHLIGHTS_QUERY, - tree_sitter_html::INJECTIONS_QUERY, - "", -).unwrap(); +let javascript_language = tree_sitter_javascript::language(); -let javascript_config = HighlightConfiguration::new( - tree_sitter_javascript::language(), - tree_sitter_javascript::HIGHLIGHTS_QUERY, - tree_sitter_javascript::INJECTIONS_QUERY, - tree_sitter_javascript::LCOALS_QUERY, +let mut javascript_config = HighlightConfiguration::new( + javascript_language, + "javascript", + tree_sitter_javascript::HIGHLIGHT_QUERY, + tree_sitter_javascript::INJECTION_QUERY, + tree_sitter_javascript::LOCALS_QUERY, + false, ).unwrap(); ``` @@ -102,4 +100,6 @@ for event in highlights { } ``` -The last parameter to `highlight` is a *language injection* callback. This allows other languages to be retrieved when Tree-sitter detects an embedded document (for example, a piece of JavaScript code inside of a `script` tag within HTML). +The last parameter to `highlight` is a _language injection_ callback. This allows +other languages to be retrieved when Tree-sitter detects an embedded document +(for example, a piece of JavaScript code inside a `script` tag within HTML). diff --git a/third-party/tree-sitter/tree-sitter/highlight/include/tree_sitter/highlight.h b/third-party/tree-sitter/tree-sitter/highlight/include/tree_sitter/highlight.h index 496faea4f8..5db458c14e 100644 --- a/third-party/tree-sitter/tree-sitter/highlight/include/tree_sitter/highlight.h +++ b/third-party/tree-sitter/tree-sitter/highlight/include/tree_sitter/highlight.h @@ -48,7 +48,7 @@ TSHighlightError ts_highlighter_add_language( const char *locals_query, uint32_t highlight_query_len, uint32_t injection_query_len, - uint32_t locals_query_len + uint32_t locals_query_len, ); // Compute syntax highlighting for a given document. You must first diff --git a/third-party/tree-sitter/tree-sitter/highlight/src/c_lib.rs b/third-party/tree-sitter/tree-sitter/highlight/src/c_lib.rs index d48a180c11..6b4d1cf8cb 100644 --- a/third-party/tree-sitter/tree-sitter/highlight/src/c_lib.rs +++ b/third-party/tree-sitter/tree-sitter/highlight/src/c_lib.rs @@ -29,25 +29,30 @@ pub enum ErrorCode { InvalidUtf8, InvalidRegex, InvalidQuery, + InvalidLanguageName, } +/// Create a new [`TSHighlighter`] instance. +/// +/// # Safety +/// +/// The caller must ensure that the `highlight_names` and `attribute_strings` arrays are valid for +/// the lifetime of the returned [`TSHighlighter`] instance, and are non-null. #[no_mangle] -pub extern "C" fn ts_highlighter_new( +pub unsafe extern "C" fn ts_highlighter_new( highlight_names: *const *const c_char, attribute_strings: *const *const c_char, highlight_count: u32, ) -> *mut TSHighlighter { - let highlight_names = - unsafe { slice::from_raw_parts(highlight_names, highlight_count as usize) }; - let attribute_strings = - unsafe { slice::from_raw_parts(attribute_strings, highlight_count as usize) }; + let highlight_names = slice::from_raw_parts(highlight_names, highlight_count as usize); + let attribute_strings = slice::from_raw_parts(attribute_strings, highlight_count as usize); let highlight_names = highlight_names - .into_iter() - .map(|s| unsafe { CStr::from_ptr(*s).to_string_lossy().to_string() }) + .iter() + .map(|s| CStr::from_ptr(*s).to_string_lossy().to_string()) .collect::>(); let attribute_strings = attribute_strings - .into_iter() - .map(|s| unsafe { CStr::from_ptr(*s).to_bytes() }) + .iter() + .map(|s| CStr::from_ptr(*s).to_bytes()) .collect(); let carriage_return_index = highlight_names.iter().position(|s| s == "carriage-return"); Box::into_raw(Box::new(TSHighlighter { @@ -58,9 +63,21 @@ pub extern "C" fn ts_highlighter_new( })) } +/// Add a language to a [`TSHighlighter`] instance. +/// +/// Returns an [`ErrorCode`] indicating whether the language was added successfully or not. +/// +/// # Safety +/// +/// `this` must be non-null and must be a valid pointer to a [`TSHighlighter`] instance +/// created by [`ts_highlighter_new`]. +/// +/// The caller must ensure that any `*const c_char` (C-style string) parameters are valid for the lifetime of +/// the [`TSHighlighter`] instance, and are non-null. #[no_mangle] -pub extern "C" fn ts_highlighter_add_language( +pub unsafe extern "C" fn ts_highlighter_add_language( this: *mut TSHighlighter, + language_name: *const c_char, scope_name: *const c_char, injection_regex: *const c_char, language: Language, @@ -73,7 +90,7 @@ pub extern "C" fn ts_highlighter_add_language( ) -> ErrorCode { let f = move || { let this = unwrap_mut_ptr(this); - let scope_name = unsafe { CStr::from_ptr(scope_name) }; + let scope_name = CStr::from_ptr(scope_name); let scope_name = scope_name .to_str() .or(Err(ErrorCode::InvalidUtf8))? @@ -81,38 +98,44 @@ pub extern "C" fn ts_highlighter_add_language( let injection_regex = if injection_regex.is_null() { None } else { - let pattern = unsafe { CStr::from_ptr(injection_regex) }; + let pattern = CStr::from_ptr(injection_regex); let pattern = pattern.to_str().or(Err(ErrorCode::InvalidUtf8))?; Some(Regex::new(pattern).or(Err(ErrorCode::InvalidRegex))?) }; - let highlight_query = unsafe { - slice::from_raw_parts(highlight_query as *const u8, highlight_query_len as usize) - }; + let highlight_query = + slice::from_raw_parts(highlight_query.cast::(), highlight_query_len as usize); + let highlight_query = str::from_utf8(highlight_query).or(Err(ErrorCode::InvalidUtf8))?; let injection_query = if injection_query_len > 0 { - let query = unsafe { - slice::from_raw_parts(injection_query as *const u8, injection_query_len as usize) - }; + let query = + slice::from_raw_parts(injection_query.cast::(), injection_query_len as usize); str::from_utf8(query).or(Err(ErrorCode::InvalidUtf8))? } else { "" }; let locals_query = if locals_query_len > 0 { - let query = unsafe { - slice::from_raw_parts(locals_query as *const u8, locals_query_len as usize) - }; + let query = slice::from_raw_parts(locals_query.cast::(), locals_query_len as usize); str::from_utf8(query).or(Err(ErrorCode::InvalidUtf8))? } else { "" }; - let mut config = - HighlightConfiguration::new(language, highlight_query, injection_query, locals_query) - .or(Err(ErrorCode::InvalidQuery))?; - config.configure(&this.highlight_names.as_slice()); + let lang = CStr::from_ptr(language_name) + .to_str() + .or(Err(ErrorCode::InvalidLanguageName))?; + + let mut config = HighlightConfiguration::new( + language, + lang, + highlight_query, + injection_query, + locals_query, + ) + .or(Err(ErrorCode::InvalidQuery))?; + config.configure(this.highlight_names.as_slice()); this.languages.insert(scope_name, (injection_regex, config)); Ok(()) @@ -132,42 +155,102 @@ pub extern "C" fn ts_highlight_buffer_new() -> *mut TSHighlightBuffer { })) } +/// Deletes a [`TSHighlighter`] instance. +/// +/// # Safety +/// +/// `this` must be non-null and must be a valid pointer to a [`TSHighlighter`] instance +/// created by [`ts_highlighter_new`]. +/// +/// It cannot be used after this function is called. #[no_mangle] -pub extern "C" fn ts_highlighter_delete(this: *mut TSHighlighter) { - drop(unsafe { Box::from_raw(this) }) +pub unsafe extern "C" fn ts_highlighter_delete(this: *mut TSHighlighter) { + drop(Box::from_raw(this)); } +/// Deletes a [`TSHighlightBuffer`] instance. +/// +/// # Safety +/// +/// `this` must be non-null and must be a valid pointer to a [`TSHighlightBuffer`] instance +/// created by [`ts_highlight_buffer_new`] +/// +/// It cannot be used after this function is called. #[no_mangle] -pub extern "C" fn ts_highlight_buffer_delete(this: *mut TSHighlightBuffer) { - drop(unsafe { Box::from_raw(this) }) +pub unsafe extern "C" fn ts_highlight_buffer_delete(this: *mut TSHighlightBuffer) { + drop(Box::from_raw(this)); } +/// Get the HTML content of a [`TSHighlightBuffer`] instance as a raw pointer. +/// +/// # Safety +/// +/// `this` must be non-null and must be a valid pointer to a [`TSHighlightBuffer`] instance +/// created by [`ts_highlight_buffer_new`]. +/// +/// The returned pointer, a C-style string, must not outlive the [`TSHighlightBuffer`] instance, else the +/// data will point to garbage. +/// +/// To get the length of the HTML content, use [`ts_highlight_buffer_len`]. #[no_mangle] -pub extern "C" fn ts_highlight_buffer_content(this: *const TSHighlightBuffer) -> *const u8 { +pub unsafe extern "C" fn ts_highlight_buffer_content(this: *const TSHighlightBuffer) -> *const u8 { let this = unwrap_ptr(this); this.renderer.html.as_slice().as_ptr() } +/// Get the line offsets of a [`TSHighlightBuffer`] instance as a C-style array. +/// +/// # Safety +/// +/// `this` must be non-null and must be a valid pointer to a [`TSHighlightBuffer`] instance +/// created by [`ts_highlight_buffer_new`]. +/// +/// The returned pointer, a C-style array of [`u32`]s, must not outlive the [`TSHighlightBuffer`] instance, else the +/// data will point to garbage. +/// +/// To get the length of the array, use [`ts_highlight_buffer_line_count`]. #[no_mangle] -pub extern "C" fn ts_highlight_buffer_line_offsets(this: *const TSHighlightBuffer) -> *const u32 { +pub unsafe extern "C" fn ts_highlight_buffer_line_offsets( + this: *const TSHighlightBuffer, +) -> *const u32 { let this = unwrap_ptr(this); this.renderer.line_offsets.as_slice().as_ptr() } +/// Get the length of the HTML content of a [`TSHighlightBuffer`] instance. +/// +/// # Safety +/// +/// `this` must be non-null and must be a valid pointer to a [`TSHighlightBuffer`] instance +/// created by [`ts_highlight_buffer_new`]. #[no_mangle] -pub extern "C" fn ts_highlight_buffer_len(this: *const TSHighlightBuffer) -> u32 { +pub unsafe extern "C" fn ts_highlight_buffer_len(this: *const TSHighlightBuffer) -> u32 { let this = unwrap_ptr(this); this.renderer.html.len() as u32 } +/// Get the number of lines in a [`TSHighlightBuffer`] instance. +/// +/// # Safety +/// +/// `this` must be non-null and must be a valid pointer to a [`TSHighlightBuffer`] instance +/// created by [`ts_highlight_buffer_new`]. #[no_mangle] -pub extern "C" fn ts_highlight_buffer_line_count(this: *const TSHighlightBuffer) -> u32 { +pub unsafe extern "C" fn ts_highlight_buffer_line_count(this: *const TSHighlightBuffer) -> u32 { let this = unwrap_ptr(this); this.renderer.line_offsets.len() as u32 } +/// Highlight a string of source code. +/// +/// # Safety +/// +/// The caller must ensure that `scope_name`, `source_code`, `output`, and `cancellation_flag` are valid for +/// the lifetime of the [`TSHighlighter`] instance, and are non-null. +/// +/// `this` must be a non-null pointer to a [`TSHighlighter`] instance created by [`ts_highlighter_new`] #[no_mangle] -pub extern "C" fn ts_highlighter_highlight( +pub unsafe extern "C" fn ts_highlighter_highlight( this: *const TSHighlighter, scope_name: *const c_char, source_code: *const c_char, @@ -177,10 +260,9 @@ pub extern "C" fn ts_highlighter_highlight( ) -> ErrorCode { let this = unwrap_ptr(this); let output = unwrap_mut_ptr(output); - let scope_name = unwrap(unsafe { CStr::from_ptr(scope_name).to_str() }); - let source_code = - unsafe { slice::from_raw_parts(source_code as *const u8, source_code_len as usize) }; - let cancellation_flag = unsafe { cancellation_flag.as_ref() }; + let scope_name = unwrap(CStr::from_ptr(scope_name).to_str()); + let source_code = slice::from_raw_parts(source_code.cast::(), source_code_len as usize); + let cancellation_flag = cancellation_flag.as_ref(); this.highlight(source_code, scope_name, output, cancellation_flag) } @@ -225,15 +307,8 @@ impl TSHighlighter { .renderer .render(highlights, source_code, &|s| self.attribute_strings[s.0]); match result { - Err(Error::Cancelled) => { - return ErrorCode::Timeout; - } - Err(Error::InvalidLanguage) => { - return ErrorCode::InvalidLanguage; - } - Err(Error::Unknown) => { - return ErrorCode::Timeout; - } + Err(Error::Cancelled | Error::Unknown) => ErrorCode::Timeout, + Err(Error::InvalidLanguage) => ErrorCode::InvalidLanguage, Ok(()) => ErrorCode::Ok, } } else { @@ -242,15 +317,15 @@ impl TSHighlighter { } } -fn unwrap_ptr<'a, T>(result: *const T) -> &'a T { - unsafe { result.as_ref() }.unwrap_or_else(|| { +unsafe fn unwrap_ptr<'a, T>(result: *const T) -> &'a T { + result.as_ref().unwrap_or_else(|| { eprintln!("{}:{} - pointer must not be null", file!(), line!()); abort(); }) } -fn unwrap_mut_ptr<'a, T>(result: *mut T) -> &'a mut T { - unsafe { result.as_mut() }.unwrap_or_else(|| { +unsafe fn unwrap_mut_ptr<'a, T>(result: *mut T) -> &'a mut T { + result.as_mut().unwrap_or_else(|| { eprintln!("{}:{} - pointer must not be null", file!(), line!()); abort(); }) @@ -258,7 +333,7 @@ fn unwrap_mut_ptr<'a, T>(result: *mut T) -> &'a mut T { fn unwrap(result: Result) -> T { result.unwrap_or_else(|error| { - eprintln!("tree-sitter highlight error: {}", error); + eprintln!("tree-sitter highlight error: {error}"); abort(); }) } diff --git a/third-party/tree-sitter/tree-sitter/highlight/src/lib.rs b/third-party/tree-sitter/tree-sitter/highlight/src/lib.rs index 8a79c624f2..22c0bc8603 100644 --- a/third-party/tree-sitter/tree-sitter/highlight/src/lib.rs +++ b/third-party/tree-sitter/tree-sitter/highlight/src/lib.rs @@ -1,7 +1,10 @@ +#![doc = include_str!("../README.md")] + pub mod c_lib; -pub mod util; pub use c_lib as c; +use lazy_static::lazy_static; +use std::collections::HashSet; use std::sync::atomic::{AtomicUsize, Ordering}; use std::{iter, mem, ops, str, usize}; use thiserror::Error; @@ -14,6 +17,65 @@ const CANCELLATION_CHECK_INTERVAL: usize = 100; const BUFFER_HTML_RESERVE_CAPACITY: usize = 10 * 1024; const BUFFER_LINES_RESERVE_CAPACITY: usize = 1000; +lazy_static! { + static ref STANDARD_CAPTURE_NAMES: HashSet<&'static str> = vec![ + "attribute", + "boolean", + "carriage-return", + "comment", + "comment.documentation", + "constant", + "constant.builtin", + "constructor", + "constructor.builtin", + "embedded", + "error", + "escape", + "function", + "function.builtin", + "keyword", + "markup", + "markup.bold", + "markup.heading", + "markup.italic", + "markup.link", + "markup.link.url", + "markup.list", + "markup.list.checked", + "markup.list.numbered", + "markup.list.unchecked", + "markup.list.unnumbered", + "markup.quote", + "markup.raw", + "markup.raw.block", + "markup.raw.inline", + "markup.strikethrough", + "module", + "number", + "operator", + "property", + "property.builtin", + "punctuation", + "punctuation.bracket", + "punctuation.delimiter", + "punctuation.special", + "string", + "string.escape", + "string.regexp", + "string.special", + "string.special.symbol", + "tag", + "type", + "type.builtin", + "variable", + "variable.builtin", + "variable.member", + "variable.parameter", + ] + .into_iter() + .collect(); +} + /// Indicates which highlight should be applied to a region of source code. #[derive(Copy, Clone, Debug, PartialEq, Eq)] pub struct Highlight(pub usize); @@ -42,6 +104,7 @@ pub enum HighlightEvent { /// This struct is immutable and can be shared between threads. pub struct HighlightConfiguration { pub language: Language, + pub language_name: String, pub query: Query, combined_injections_query: Option, locals_pattern_index: usize, @@ -62,7 +125,7 @@ pub struct HighlightConfiguration { /// syntax highlighting calls. A separate highlighter is needed for each thread that /// is performing highlighting. pub struct Highlighter { - parser: Parser, + pub parser: Parser, cursors: Vec, } @@ -92,6 +155,7 @@ where F: FnMut(&str) -> Option<&'a HighlightConfiguration> + 'a, { source: &'a [u8], + language_name: &'a str, byte_offset: usize, highlighter: &'a mut Highlighter, injection_callback: F, @@ -105,7 +169,7 @@ where struct HighlightIterLayer<'a> { _tree: Tree, cursor: QueryCursor, - captures: iter::Peekable>, + captures: iter::Peekable>, config: &'a HighlightConfiguration, highlight_end_stack: Vec, scope_stack: Vec>, @@ -113,9 +177,16 @@ struct HighlightIterLayer<'a> { depth: usize, } +impl Default for Highlighter { + fn default() -> Self { + Self::new() + } +} + impl Highlighter { + #[must_use] pub fn new() -> Self { - Highlighter { + Self { parser: Parser::new(), cursors: Vec::new(), } @@ -135,6 +206,7 @@ impl Highlighter { ) -> Result> + 'a, Error> { let layers = HighlightIterLayer::new( source, + None, self, cancellation_flag, &mut injection_callback, @@ -150,12 +222,13 @@ impl Highlighter { assert_ne!(layers.len(), 0); let mut result = HighlightIter { source, + language_name: &config.language_name, byte_offset: 0, injection_callback, cancellation_flag, highlighter: self, iter_count: 0, - layers: layers, + layers, next_event: None, last_highlight_range: None, }; @@ -181,6 +254,7 @@ impl HighlightConfiguration { /// Returns a `HighlightConfiguration` that can then be used with the `highlight` method. pub fn new( language: Language, + name: impl Into, highlights_query: &str, injection_query: &str, locals_query: &str, @@ -195,7 +269,7 @@ impl HighlightConfiguration { // Construct a single query by concatenating the three query strings, but record the // range of pattern indices that belong to each individual string. - let mut query = Query::new(language, &query_source)?; + let mut query = Query::new(&language, &query_source)?; let mut locals_pattern_index = 0; let mut highlights_pattern_index = 0; for i in 0..(query.pattern_count()) { @@ -212,7 +286,7 @@ impl HighlightConfiguration { // Construct a separate query just for dealing with the 'combined injections'. // Disable the combined injection patterns in the main query. - let mut combined_injections_query = Query::new(language, injection_query)?; + let mut combined_injections_query = Query::new(&language, injection_query)?; let mut has_combined_queries = false; for pattern_index in 0..locals_pattern_index { let settings = query.property_settings(pattern_index); @@ -249,7 +323,7 @@ impl HighlightConfiguration { let mut local_scope_capture_index = None; for (i, name) in query.capture_names().iter().enumerate() { let i = Some(i as u32); - match name.as_str() { + match *name { "injection.content" => injection_content_capture_index = i, "injection.language" => injection_language_capture_index = i, "local.definition" => local_def_capture_index = i, @@ -261,8 +335,9 @@ impl HighlightConfiguration { } let highlight_indices = vec![None; query.capture_names().len()]; - Ok(HighlightConfiguration { + Ok(Self { language, + language_name: name.into(), query, combined_injections_query, locals_pattern_index, @@ -279,7 +354,8 @@ impl HighlightConfiguration { } /// Get a slice containing all of the highlight names used in the configuration. - pub fn names(&self) -> &[String] { + #[must_use] + pub const fn names(&self) -> &[&str] { self.query.capture_names() } @@ -303,7 +379,7 @@ impl HighlightConfiguration { let mut best_index = None; let mut best_match_len = 0; - for (i, recognized_name) in recognized_names.into_iter().enumerate() { + for (i, recognized_name) in recognized_names.iter().enumerate() { let mut len = 0; let mut matches = true; for part in recognized_name.as_ref().split('.') { @@ -321,6 +397,23 @@ impl HighlightConfiguration { best_index.map(Highlight) })); } + + // Return the list of this configuration's capture names that are neither present in the + // list of predefined 'canonical' names nor start with an underscore (denoting 'private' captures + // used as part of capture internals). + #[must_use] + pub fn nonconformant_capture_names(&self, capture_names: &HashSet<&str>) -> Vec<&str> { + let capture_names = if capture_names.is_empty() { + &*STANDARD_CAPTURE_NAMES + } else { + capture_names + }; + self.names() + .iter() + .filter(|&n| !(n.starts_with('_') || capture_names.contains(n))) + .copied() + .collect() + } } impl<'a> HighlightIterLayer<'a> { @@ -329,8 +422,10 @@ impl<'a> HighlightIterLayer<'a> { /// In the even that the new layer contains "combined injections" (injections where multiple /// disjoint ranges are parsed as one syntax tree), these will be eagerly processed and /// added to the returned vector. + #[allow(clippy::too_many_arguments)] fn new Option<&'a HighlightConfiguration> + 'a>( source: &'a [u8], + parent_name: Option<&str>, highlighter: &mut Highlighter, cancellation_flag: Option<&'a AtomicUsize>, injection_callback: &mut F, @@ -344,7 +439,7 @@ impl<'a> HighlightIterLayer<'a> { if highlighter.parser.set_included_ranges(&ranges).is_ok() { highlighter .parser - .set_language(config.language) + .set_language(&config.language) .map_err(|_| Error::InvalidLanguage)?; unsafe { highlighter.parser.set_cancellation_flag(cancellation_flag) }; @@ -353,7 +448,7 @@ impl<'a> HighlightIterLayer<'a> { .parse(source, None) .ok_or(Error::Cancelled)?; unsafe { highlighter.parser.set_cancellation_flag(None) }; - let mut cursor = highlighter.cursors.pop().unwrap_or(QueryCursor::new()); + let mut cursor = highlighter.cursors.pop().unwrap_or_default(); // Process combined injections. if let Some(combined_injections_query) = &config.combined_injections_query { @@ -363,8 +458,13 @@ impl<'a> HighlightIterLayer<'a> { cursor.matches(combined_injections_query, tree.root_node(), source); for mat in matches { let entry = &mut injections_by_pattern_index[mat.pattern_index]; - let (language_name, content_node, include_children) = - injection_for_match(config, combined_injections_query, &mat, source); + let (language_name, content_node, include_children) = injection_for_match( + config, + parent_name, + combined_injections_query, + &mat, + source, + ); if language_name.is_some() { entry.0 = language_name; } @@ -418,12 +518,12 @@ impl<'a> HighlightIterLayer<'a> { if queue.is_empty() { break; - } else { - let (next_config, next_depth, next_ranges) = queue.remove(0); - config = next_config; - depth = next_depth; - ranges = next_ranges; } + + let (next_config, next_depth, next_ranges) = queue.remove(0); + config = next_config; + depth = next_depth; + ranges = next_ranges; } Ok(result) @@ -449,7 +549,7 @@ impl<'a> HighlightIterLayer<'a> { let mut parent_range = parent_range_iter .next() .expect("Layers should only be constructed with non-empty ranges vectors"); - for node in nodes.iter() { + for node in nodes { let mut preceding_range = Range { start_byte: 0, start_point: Point::new(0, 0), @@ -472,7 +572,7 @@ impl<'a> HighlightIterLayer<'a> { Some(child.range()) } }) - .chain([following_range].iter().cloned()) + .chain(std::iter::once(following_range)) { let mut range = Range { start_byte: preceding_range.end_byte, @@ -532,7 +632,7 @@ impl<'a> HighlightIterLayer<'a> { .captures .peek() .map(|(m, i)| m.captures[*i].node.start_byte()); - let next_end = self.highlight_end_stack.last().cloned(); + let next_end = self.highlight_end_stack.last().copied(); match (next_start, next_end) { (Some(start), Some(end)) => { if start < end { @@ -589,10 +689,9 @@ where self.layers[0..(i + 1)].rotate_left(1); } break; - } else { - let layer = self.layers.remove(0); - self.highlighter.cursors.push(layer.cursor); } + let layer = self.layers.remove(0); + self.highlighter.cursors.push(layer.cursor); } } @@ -664,7 +763,7 @@ where // If any previous highlight ends before this node starts, then before // processing this capture, emit the source code up until the end of the // previous highlight, and an end event for that highlight. - if let Some(end_byte) = layer.highlight_end_stack.last().cloned() { + if let Some(end_byte) = layer.highlight_end_stack.last().copied() { if end_byte <= range.start { layer.highlight_end_stack.pop(); return self.emit_event(end_byte, Some(HighlightEvent::HighlightEnd)); @@ -673,20 +772,26 @@ where } // If there are no more captures, then emit any remaining highlight end events. // And if there are none of those, then just advance to the end of the document. - else if let Some(end_byte) = layer.highlight_end_stack.last().cloned() { - layer.highlight_end_stack.pop(); - return self.emit_event(end_byte, Some(HighlightEvent::HighlightEnd)); - } else { + else { + if let Some(end_byte) = layer.highlight_end_stack.last().copied() { + layer.highlight_end_stack.pop(); + return self.emit_event(end_byte, Some(HighlightEvent::HighlightEnd)); + } return self.emit_event(self.source.len(), None); - }; + } let (mut match_, capture_index) = layer.captures.next().unwrap(); let mut capture = match_.captures[capture_index]; // If this capture represents an injection, then process the injection. if match_.pattern_index < layer.config.locals_pattern_index { - let (language_name, content_node, include_children) = - injection_for_match(&layer.config, &layer.config.query, &match_, &self.source); + let (language_name, content_node, include_children) = injection_for_match( + layer.config, + Some(self.language_name), + &layer.config.query, + &match_, + self.source, + ); // Explicitly remove this match so that none of its other captures will remain // in the stream of captures. @@ -704,6 +809,7 @@ where if !ranges.is_empty() { match HighlightIterLayer::new( self.source, + Some(self.language_name), self.highlighter, self.cancellation_flag, &mut self.injection_callback, @@ -746,12 +852,9 @@ where local_defs: Vec::new(), }; for prop in layer.config.query.property_settings(match_.pattern_index) { - match prop.key.as_ref() { - "local.scope-inherits" => { - scope.inherits = - prop.value.as_ref().map_or(true, |r| r.as_ref() == "true"); - } - _ => {} + if prop.key.as_ref() == "local.scope-inherits" { + scope.inherits = + prop.value.as_ref().map_or(true, |r| r.as_ref() == "true"); } } layer.scope_stack.push(scope); @@ -782,26 +885,24 @@ where } // If the node represents a reference, then try to find the corresponding // definition in the scope stack. - else if Some(capture.index) == layer.config.local_ref_capture_index { - if definition_highlight.is_none() { - definition_highlight = None; - if let Ok(name) = str::from_utf8(&self.source[range.clone()]) { - for scope in layer.scope_stack.iter().rev() { - if let Some(highlight) = - scope.local_defs.iter().rev().find_map(|def| { - if def.name == name && range.start >= def.value_range.end { - Some(def.highlight) - } else { - None - } - }) - { - reference_highlight = highlight; - break; - } - if !scope.inherits { - break; + else if Some(capture.index) == layer.config.local_ref_capture_index + && definition_highlight.is_none() + { + definition_highlight = None; + if let Ok(name) = str::from_utf8(&self.source[range.clone()]) { + for scope in layer.scope_stack.iter().rev() { + if let Some(highlight) = scope.local_defs.iter().rev().find_map(|def| { + if def.name == name && range.start >= def.value_range.end { + Some(def.highlight) + } else { + None } + }) { + reference_highlight = highlight; + break; + } + if !scope.inherits { + break; } } } @@ -831,34 +932,26 @@ where } } - // If the current node was found to be a local variable, then skip over any - // highlighting patterns that are disabled for local variables. - if definition_highlight.is_some() || reference_highlight.is_some() { - while layer.config.non_local_variable_patterns[match_.pattern_index] { - match_.remove(); - if let Some((next_match, next_capture_index)) = layer.captures.peek() { - let next_capture = next_match.captures[*next_capture_index]; - if next_capture.node == capture.node { - capture = next_capture; - match_ = layer.captures.next().unwrap().0; - continue; - } - } - - self.sort_layers(); - continue 'main; - } - } - - // Once a highlighting pattern is found for the current node, skip over - // any later highlighting patterns that also match this node. Captures - // for a given node are ordered by pattern index, so these subsequent + // Once a highlighting pattern is found for the current node, keep iterating over + // any later highlighting patterns that also match this node and set the match to it. + // Captures for a given node are ordered by pattern index, so these subsequent // captures are guaranteed to be for highlighting, not injections or // local variables. while let Some((next_match, next_capture_index)) = layer.captures.peek() { let next_capture = next_match.captures[*next_capture_index]; if next_capture.node == capture.node { - layer.captures.next(); + let following_match = layer.captures.next().unwrap().0; + // If the current node was found to be a local variable, then ignore + // the following match if it's a highlighting pattern that is disabled + // for local variables. + if (definition_highlight.is_some() || reference_highlight.is_some()) + && layer.config.non_local_variable_patterns[following_match.pattern_index] + { + continue; + } + match_.remove(); + capture = next_capture; + match_ = following_match; } else { break; } @@ -885,9 +978,16 @@ where } } +impl Default for HtmlRenderer { + fn default() -> Self { + Self::new() + } +} + impl HtmlRenderer { + #[must_use] pub fn new() -> Self { - let mut result = HtmlRenderer { + let mut result = Self { html: Vec::with_capacity(BUFFER_HTML_RESERVE_CAPACITY), line_offsets: Vec::with_capacity(BUFFER_LINES_RESERVE_CAPACITY), carriage_return_highlight: None, @@ -987,10 +1087,21 @@ impl HtmlRenderer { self.html.extend(b""); } - fn add_text<'a, F>(&mut self, src: &[u8], highlights: &Vec, attribute_callback: &F) + fn add_text<'a, F>(&mut self, src: &[u8], highlights: &[Highlight], attribute_callback: &F) where F: Fn(Highlight) -> &'a [u8], { + pub const fn html_escape(c: u8) -> Option<&'static [u8]> { + match c as char { + '>' => Some(b">"), + '<' => Some(b"<"), + '&' => Some(b"&"), + '\'' => Some(b"'"), + '"' => Some(b"""), + _ => None, + } + } + let mut last_char_was_cr = false; for c in LossyUtf8::new(src).flat_map(|p| p.bytes()) { // Don't render carriage return characters, but allow lone carriage returns (not @@ -1014,7 +1125,7 @@ impl HtmlRenderer { highlights .iter() .for_each(|scope| self.start_highlight(*scope, attribute_callback)); - } else if let Some(escape) = util::html_escape(c) { + } else if let Some(escape) = html_escape(c) { self.html.extend_from_slice(escape); } else { self.html.push(c); @@ -1024,7 +1135,8 @@ impl HtmlRenderer { } fn injection_for_match<'a>( - config: &HighlightConfiguration, + config: &'a HighlightConfiguration, + parent_name: Option<&'a str>, query: &'a Query, query_match: &QueryMatch<'a, 'a>, source: &'a [u8], @@ -1034,6 +1146,7 @@ fn injection_for_match<'a>( let mut language_name = None; let mut content_node = None; + for capture in query_match.captures { let index = Some(capture.index); if index == language_capture_index { @@ -1051,7 +1164,25 @@ fn injection_for_match<'a>( // that sets the injection.language key. "injection.language" => { if language_name.is_none() { - language_name = prop.value.as_ref().map(|s| s.as_ref()) + language_name = prop.value.as_ref().map(std::convert::AsRef::as_ref); + } + } + + // Setting the `injection.self` key can be used to specify that the + // language name should be the same as the language of the current + // layer. + "injection.self" => { + if language_name.is_none() { + language_name = Some(config.language_name.as_str()); + } + } + + // Setting the `injection.parent` key can be used to specify that + // the language name should be the same as the language of the + // parent layer + "injection.parent" => { + if language_name.is_none() { + language_name = parent_name; } } diff --git a/third-party/tree-sitter/tree-sitter/highlight/src/util.rs b/third-party/tree-sitter/tree-sitter/highlight/src/util.rs deleted file mode 100644 index 29adb13b11..0000000000 --- a/third-party/tree-sitter/tree-sitter/highlight/src/util.rs +++ /dev/null @@ -1,10 +0,0 @@ -pub fn html_escape(c: u8) -> Option<&'static [u8]> { - match c as char { - '>' => Some(b">"), - '<' => Some(b"<"), - '&' => Some(b"&"), - '\'' => Some(b"'"), - '"' => Some(b"""), - _ => None, - } -} diff --git a/third-party/tree-sitter/tree-sitter/lib/Cargo.toml b/third-party/tree-sitter/tree-sitter/lib/Cargo.toml index 39e0791615..b40939f7ab 100644 --- a/third-party/tree-sitter/tree-sitter/lib/Cargo.toml +++ b/third-party/tree-sitter/tree-sitter/lib/Cargo.toml @@ -1,33 +1,51 @@ [package] name = "tree-sitter" +version.workspace = true description = "Rust bindings to the Tree-sitter parsing library" -version = "0.20.10" -authors = ["Max Brunsfeld "] -edition = "2021" -license = "MIT" +authors.workspace = true +edition.workspace = true +rust-version.workspace = true readme = "binding_rust/README.md" -keywords = ["incremental", "parsing"] +homepage.workspace = true +repository.workspace = true +license.workspace = true +keywords.workspace = true categories = ["api-bindings", "parsing", "text-editors"] -repository = "https://github.com/tree-sitter/tree-sitter" -rust-version.workspace = true build = "binding_rust/build.rs" +links = "tree-sitter" include = [ "/binding_rust/*", "/Cargo.toml", - "/include/*", "/src/*.h", "/src/*.c", "/src/unicode/*", + "/src/wasm/*", + "/include/tree_sitter/api.h", ] +[features] +wasm = ["wasmtime", "wasmtime-c-api"] + [dependencies] -lazy_static = { version = "1.2.0", optional = true } -regex = "1" +regex.workspace = true + +[dependencies.wasmtime] +version = "18.0.1" +optional = true +default-features = false +features = ["cranelift"] + +[dependencies.wasmtime-c-api] +version = "18.0.1" +optional = true +package = "wasmtime-c-api-impl" +default-features = false [build-dependencies] -cc = "^1.0.58" +bindgen = { version = "0.69.4", optional = true } +cc.workspace = true [lib] path = "binding_rust/lib.rs" diff --git a/third-party/tree-sitter/tree-sitter/lib/README.md b/third-party/tree-sitter/tree-sitter/lib/README.md index 82ebc5a54f..231fe2abbb 100644 --- a/third-party/tree-sitter/tree-sitter/lib/README.md +++ b/third-party/tree-sitter/tree-sitter/lib/README.md @@ -1,5 +1,4 @@ -Subdirectories --------------- +## Subdirectories * [`src`](./src) - C source code for the Tree-sitter library * [`include`](./include) - C headers for the Tree-sitter library diff --git a/third-party/tree-sitter/tree-sitter/lib/binding_rust/README.md b/third-party/tree-sitter/tree-sitter/lib/binding_rust/README.md index dffe76619c..b75e012202 100644 --- a/third-party/tree-sitter/tree-sitter/lib/binding_rust/README.md +++ b/third-party/tree-sitter/tree-sitter/lib/binding_rust/README.md @@ -1,10 +1,13 @@ # Rust Tree-sitter -[![Crates.io](https://img.shields.io/crates/v/tree-sitter.svg)](https://crates.io/crates/tree-sitter) +[![crates.io badge]][crates.io] + +[crates.io]: https://crates.io/crates/tree-sitter +[crates.io badge]: https://img.shields.io/crates/v/tree-sitter.svg?color=%23B48723 Rust bindings to the [Tree-sitter][] parsing library. -### Basic Usage +## Basic Usage First, create a parser: @@ -14,22 +17,6 @@ use tree_sitter::{Parser, Language}; let mut parser = Parser::new(); ``` -Tree-sitter languages consist of generated C code. To make sure they're properly compiled and linked, you can create a [build script](https://doc.rust-lang.org/cargo/reference/build-scripts.html) like the following (assuming `tree-sitter-javascript` is in your root directory): - -```rust -use std::path::PathBuf; - -fn main() { - let dir: PathBuf = ["tree-sitter-javascript", "src"].iter().collect(); - - cc::Build::new() - .include(&dir) - .file(dir.join("parser.c")) - .file(dir.join("scanner.c")) - .compile("tree-sitter-javascript"); -} -``` - Add the `cc` crate to your `Cargo.toml` under `[build-dependencies]`: ```toml @@ -37,15 +24,18 @@ Add the `cc` crate to your `Cargo.toml` under `[build-dependencies]`: cc="*" ``` -To then use languages from rust, you must declare them as `extern "C"` functions and invoke them with `unsafe`. Then you can assign them to the parser. +Then, add a language as a dependency: -```rust -extern "C" { fn tree_sitter_c() -> Language; } -extern "C" { fn tree_sitter_rust() -> Language; } -extern "C" { fn tree_sitter_javascript() -> Language; } +```toml +[dependencies] +tree-sitter = "0.21.0" +tree-sitter-rust = "0.20.4" +``` + +To then use a language, you assign them to the parser. -let language = unsafe { tree_sitter_rust() }; -parser.set_language(language).unwrap(); +```rust +parser.set_language(tree_sitter_rust::language()).expect("Error loading Rust grammar"); ``` Now you can parse source code: @@ -62,12 +52,13 @@ assert_eq!(root_node.end_position().column, 12); ### Editing -Once you have a syntax tree, you can update it when your source code changes. Passing in the previous edited tree makes `parse` run much more quickly: +Once you have a syntax tree, you can update it when your source code changes. +Passing in the previous edited tree makes `parse` run much more quickly: ```rust let new_source_code = "fn test(a: u32) {}" -tree.edit(InputEdit { +tree.edit(&InputEdit { start_byte: 8, old_end_byte: 8, new_end_byte: 14, @@ -81,7 +72,8 @@ let new_tree = parser.parse(new_source_code, Some(&tree)); ### Text Input -The source code to parse can be provided either as a string, a slice, a vector, or as a function that returns a slice. The text can be encoded as either UTF8 or UTF16: +The source code to parse can be provided either as a string, a slice, a vector, +or as a function that returns a slice. The text can be encoded as either UTF8 or UTF16: ```rust // Store some source code in an array of lines. @@ -100,7 +92,7 @@ let tree = parser.parse_with(&mut |_byte: u32, position: Point| -> &[u8] { if column < lines[row].as_bytes().len() { &lines[row].as_bytes()[column..] } else { - "\n".as_bytes() + b"\n" } } else { &[] diff --git a/third-party/tree-sitter/tree-sitter/lib/binding_rust/bindings.rs b/third-party/tree-sitter/tree-sitter/lib/binding_rust/bindings.rs index be117f8389..227d142d09 100644 --- a/third-party/tree-sitter/tree-sitter/lib/binding_rust/bindings.rs +++ b/third-party/tree-sitter/tree-sitter/lib/binding_rust/bindings.rs @@ -1,38 +1,46 @@ -/* automatically generated by rust-bindgen 0.59.2 */ +/* automatically generated by rust-bindgen 0.69.4 */ +pub const TREE_SITTER_LANGUAGE_VERSION: u32 = 14; +pub const TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION: u32 = 13; +pub type TSStateId = u16; pub type TSSymbol = u16; pub type TSFieldId = u16; #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct TSLanguage { _unused: [u8; 0], } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct TSParser { _unused: [u8; 0], } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct TSTree { _unused: [u8; 0], } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct TSQuery { _unused: [u8; 0], } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct TSQueryCursor { _unused: [u8; 0], } -pub const TSInputEncoding_TSInputEncodingUTF8: TSInputEncoding = 0; -pub const TSInputEncoding_TSInputEncodingUTF16: TSInputEncoding = 1; +#[repr(C)] +#[derive(Debug)] +pub struct TSLookaheadIterator { + _unused: [u8; 0], +} +pub const TSInputEncodingUTF8: TSInputEncoding = 0; +pub const TSInputEncodingUTF16: TSInputEncoding = 1; pub type TSInputEncoding = ::std::os::raw::c_uint; -pub const TSSymbolType_TSSymbolTypeRegular: TSSymbolType = 0; -pub const TSSymbolType_TSSymbolTypeAnonymous: TSSymbolType = 1; -pub const TSSymbolType_TSSymbolTypeAuxiliary: TSSymbolType = 2; +pub const TSSymbolTypeRegular: TSSymbolType = 0; +pub const TSSymbolTypeAnonymous: TSSymbolType = 1; +pub const TSSymbolTypeAuxiliary: TSSymbolType = 2; pub type TSSymbolType = ::std::os::raw::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -49,7 +57,7 @@ pub struct TSRange { pub end_byte: u32, } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct TSInput { pub payload: *mut ::std::os::raw::c_void, pub read: ::std::option::Option< @@ -62,18 +70,18 @@ pub struct TSInput { >, pub encoding: TSInputEncoding, } -pub const TSLogType_TSLogTypeParse: TSLogType = 0; -pub const TSLogType_TSLogTypeLex: TSLogType = 1; +pub const TSLogTypeParse: TSLogType = 0; +pub const TSLogTypeLex: TSLogType = 1; pub type TSLogType = ::std::os::raw::c_uint; #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct TSLogger { pub payload: *mut ::std::os::raw::c_void, pub log: ::std::option::Option< unsafe extern "C" fn( payload: *mut ::std::os::raw::c_void, - arg1: TSLogType, - arg2: *const ::std::os::raw::c_char, + log_type: TSLogType, + buffer: *const ::std::os::raw::c_char, ), >, } @@ -102,42 +110,42 @@ pub struct TSTreeCursor { pub context: [u32; 2usize], } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct TSQueryCapture { pub node: TSNode, pub index: u32, } -pub const TSQuantifier_TSQuantifierZero: TSQuantifier = 0; -pub const TSQuantifier_TSQuantifierZeroOrOne: TSQuantifier = 1; -pub const TSQuantifier_TSQuantifierZeroOrMore: TSQuantifier = 2; -pub const TSQuantifier_TSQuantifierOne: TSQuantifier = 3; -pub const TSQuantifier_TSQuantifierOneOrMore: TSQuantifier = 4; +pub const TSQuantifierZero: TSQuantifier = 0; +pub const TSQuantifierZeroOrOne: TSQuantifier = 1; +pub const TSQuantifierZeroOrMore: TSQuantifier = 2; +pub const TSQuantifierOne: TSQuantifier = 3; +pub const TSQuantifierOneOrMore: TSQuantifier = 4; pub type TSQuantifier = ::std::os::raw::c_uint; #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct TSQueryMatch { pub id: u32, pub pattern_index: u16, pub capture_count: u16, pub captures: *const TSQueryCapture, } -pub const TSQueryPredicateStepType_TSQueryPredicateStepTypeDone: TSQueryPredicateStepType = 0; -pub const TSQueryPredicateStepType_TSQueryPredicateStepTypeCapture: TSQueryPredicateStepType = 1; -pub const TSQueryPredicateStepType_TSQueryPredicateStepTypeString: TSQueryPredicateStepType = 2; +pub const TSQueryPredicateStepTypeDone: TSQueryPredicateStepType = 0; +pub const TSQueryPredicateStepTypeCapture: TSQueryPredicateStepType = 1; +pub const TSQueryPredicateStepTypeString: TSQueryPredicateStepType = 2; pub type TSQueryPredicateStepType = ::std::os::raw::c_uint; #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct TSQueryPredicateStep { pub type_: TSQueryPredicateStepType, pub value_id: u32, } -pub const TSQueryError_TSQueryErrorNone: TSQueryError = 0; -pub const TSQueryError_TSQueryErrorSyntax: TSQueryError = 1; -pub const TSQueryError_TSQueryErrorNodeType: TSQueryError = 2; -pub const TSQueryError_TSQueryErrorField: TSQueryError = 3; -pub const TSQueryError_TSQueryErrorCapture: TSQueryError = 4; -pub const TSQueryError_TSQueryErrorStructure: TSQueryError = 5; -pub const TSQueryError_TSQueryErrorLanguage: TSQueryError = 6; +pub const TSQueryErrorNone: TSQueryError = 0; +pub const TSQueryErrorSyntax: TSQueryError = 1; +pub const TSQueryErrorNodeType: TSQueryError = 2; +pub const TSQueryErrorField: TSQueryError = 3; +pub const TSQueryErrorCapture: TSQueryError = 4; +pub const TSQueryErrorStructure: TSQueryError = 5; +pub const TSQueryErrorLanguage: TSQueryError = 6; pub type TSQueryError = ::std::os::raw::c_uint; extern "C" { #[doc = " Create a new parser."] @@ -145,94 +153,30 @@ extern "C" { } extern "C" { #[doc = " Delete the parser, freeing all of the memory that it used."] - pub fn ts_parser_delete(parser: *mut TSParser); -} -extern "C" { - #[doc = " Set the language that the parser should use for parsing."] - #[doc = ""] - #[doc = " Returns a boolean indicating whether or not the language was successfully"] - #[doc = " assigned. True means assignment succeeded. False means there was a version"] - #[doc = " mismatch: the language was generated with an incompatible version of the"] - #[doc = " Tree-sitter CLI. Check the language's version using `ts_language_version`"] - #[doc = " and compare it to this library's `TREE_SITTER_LANGUAGE_VERSION` and"] - #[doc = " `TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION` constants."] - pub fn ts_parser_set_language(self_: *mut TSParser, language: *const TSLanguage) -> bool; + pub fn ts_parser_delete(self_: *mut TSParser); } extern "C" { #[doc = " Get the parser's current language."] pub fn ts_parser_language(self_: *const TSParser) -> *const TSLanguage; } extern "C" { - #[doc = " Set the ranges of text that the parser should include when parsing."] - #[doc = ""] - #[doc = " By default, the parser will always include entire documents. This function"] - #[doc = " allows you to parse only a *portion* of a document but still return a syntax"] - #[doc = " tree whose ranges match up with the document as a whole. You can also pass"] - #[doc = " multiple disjoint ranges."] - #[doc = ""] - #[doc = " The second and third parameters specify the location and length of an array"] - #[doc = " of ranges. The parser does *not* take ownership of these ranges; it copies"] - #[doc = " the data, so it doesn't matter how these ranges are allocated."] - #[doc = ""] - #[doc = " If `length` is zero, then the entire document will be parsed. Otherwise,"] - #[doc = " the given ranges must be ordered from earliest to latest in the document,"] - #[doc = " and they must not overlap. That is, the following must hold for all"] - #[doc = " `i` < `length - 1`: ranges[i].end_byte <= ranges[i + 1].start_byte"] - #[doc = ""] - #[doc = " If this requirement is not satisfied, the operation will fail, the ranges"] - #[doc = " will not be assigned, and this function will return `false`. On success,"] - #[doc = " this function returns `true`"] + #[doc = " Set the language that the parser should use for parsing.\n\n Returns a boolean indicating whether or not the language was successfully\n assigned. True means assignment succeeded. False means there was a version\n mismatch: the language was generated with an incompatible version of the\n Tree-sitter CLI. Check the language's version using [`ts_language_version`]\n and compare it to this library's [`TREE_SITTER_LANGUAGE_VERSION`] and\n [`TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION`] constants."] + pub fn ts_parser_set_language(self_: *mut TSParser, language: *const TSLanguage) -> bool; +} +extern "C" { + #[doc = " Set the ranges of text that the parser should include when parsing.\n\n By default, the parser will always include entire documents. This function\n allows you to parse only a *portion* of a document but still return a syntax\n tree whose ranges match up with the document as a whole. You can also pass\n multiple disjoint ranges.\n\n The second and third parameters specify the location and length of an array\n of ranges. The parser does *not* take ownership of these ranges; it copies\n the data, so it doesn't matter how these ranges are allocated.\n\n If `count` is zero, then the entire document will be parsed. Otherwise,\n the given ranges must be ordered from earliest to latest in the document,\n and they must not overlap. That is, the following must hold for all:\n\n `i < count - 1`: `ranges[i].end_byte <= ranges[i + 1].start_byte`\n\n If this requirement is not satisfied, the operation will fail, the ranges\n will not be assigned, and this function will return `false`. On success,\n this function returns `true`"] pub fn ts_parser_set_included_ranges( self_: *mut TSParser, ranges: *const TSRange, - length: u32, + count: u32, ) -> bool; } extern "C" { - #[doc = " Get the ranges of text that the parser will include when parsing."] - #[doc = ""] - #[doc = " The returned pointer is owned by the parser. The caller should not free it"] - #[doc = " or write to it. The length of the array will be written to the given"] - #[doc = " `length` pointer."] - pub fn ts_parser_included_ranges(self_: *const TSParser, length: *mut u32) -> *const TSRange; -} -extern "C" { - #[doc = " Use the parser to parse some source code and create a syntax tree."] - #[doc = ""] - #[doc = " If you are parsing this document for the first time, pass `NULL` for the"] - #[doc = " `old_tree` parameter. Otherwise, if you have already parsed an earlier"] - #[doc = " version of this document and the document has since been edited, pass the"] - #[doc = " previous syntax tree so that the unchanged parts of it can be reused."] - #[doc = " This will save time and memory. For this to work correctly, you must have"] - #[doc = " already edited the old syntax tree using the `ts_tree_edit` function in a"] - #[doc = " way that exactly matches the source code changes."] - #[doc = ""] - #[doc = " The `TSInput` parameter lets you specify how to read the text. It has the"] - #[doc = " following three fields:"] - #[doc = " 1. `read`: A function to retrieve a chunk of text at a given byte offset"] - #[doc = " and (row, column) position. The function should return a pointer to the"] - #[doc = " text and write its length to the `bytes_read` pointer. The parser does"] - #[doc = " not take ownership of this buffer; it just borrows it until it has"] - #[doc = " finished reading it. The function should write a zero value to the"] - #[doc = " `bytes_read` pointer to indicate the end of the document."] - #[doc = " 2. `payload`: An arbitrary pointer that will be passed to each invocation"] - #[doc = " of the `read` function."] - #[doc = " 3. `encoding`: An indication of how the text is encoded. Either"] - #[doc = " `TSInputEncodingUTF8` or `TSInputEncodingUTF16`."] - #[doc = ""] - #[doc = " This function returns a syntax tree on success, and `NULL` on failure. There"] - #[doc = " are three possible reasons for failure:"] - #[doc = " 1. The parser does not have a language assigned. Check for this using the"] - #[doc = "`ts_parser_language` function."] - #[doc = " 2. Parsing was cancelled due to a timeout that was set by an earlier call to"] - #[doc = " the `ts_parser_set_timeout_micros` function. You can resume parsing from"] - #[doc = " where the parser left out by calling `ts_parser_parse` again with the"] - #[doc = " same arguments. Or you can start parsing from scratch by first calling"] - #[doc = " `ts_parser_reset`."] - #[doc = " 3. Parsing was cancelled using a cancellation flag that was set by an"] - #[doc = " earlier call to `ts_parser_set_cancellation_flag`. You can resume parsing"] - #[doc = " from where the parser left out by calling `ts_parser_parse` again with"] - #[doc = " the same arguments."] + #[doc = " Get the ranges of text that the parser will include when parsing.\n\n The returned pointer is owned by the parser. The caller should not free it\n or write to it. The length of the array will be written to the given\n `count` pointer."] + pub fn ts_parser_included_ranges(self_: *const TSParser, count: *mut u32) -> *const TSRange; +} +extern "C" { + #[doc = " Use the parser to parse some source code and create a syntax tree.\n\n If you are parsing this document for the first time, pass `NULL` for the\n `old_tree` parameter. Otherwise, if you have already parsed an earlier\n version of this document and the document has since been edited, pass the\n previous syntax tree so that the unchanged parts of it can be reused.\n This will save time and memory. For this to work correctly, you must have\n already edited the old syntax tree using the [`ts_tree_edit`] function in a\n way that exactly matches the source code changes.\n\n The [`TSInput`] parameter lets you specify how to read the text. It has the\n following three fields:\n 1. [`read`]: A function to retrieve a chunk of text at a given byte offset\n and (row, column) position. The function should return a pointer to the\n text and write its length to the [`bytes_read`] pointer. The parser does\n not take ownership of this buffer; it just borrows it until it has\n finished reading it. The function should write a zero value to the\n [`bytes_read`] pointer to indicate the end of the document.\n 2. [`payload`]: An arbitrary pointer that will be passed to each invocation\n of the [`read`] function.\n 3. [`encoding`]: An indication of how the text is encoded. Either\n `TSInputEncodingUTF8` or `TSInputEncodingUTF16`.\n\n This function returns a syntax tree on success, and `NULL` on failure. There\n are three possible reasons for failure:\n 1. The parser does not have a language assigned. Check for this using the\n[`ts_parser_language`] function.\n 2. Parsing was cancelled due to a timeout that was set by an earlier call to\n the [`ts_parser_set_timeout_micros`] function. You can resume parsing from\n where the parser left out by calling [`ts_parser_parse`] again with the\n same arguments. Or you can start parsing from scratch by first calling\n [`ts_parser_reset`].\n 3. Parsing was cancelled using a cancellation flag that was set by an\n earlier call to [`ts_parser_set_cancellation_flag`]. You can resume parsing\n from where the parser left out by calling [`ts_parser_parse`] again with\n the same arguments.\n\n [`read`]: TSInput::read\n [`payload`]: TSInput::payload\n [`encoding`]: TSInput::encoding\n [`bytes_read`]: TSInput::read"] pub fn ts_parser_parse( self_: *mut TSParser, old_tree: *const TSTree, @@ -240,10 +184,7 @@ extern "C" { ) -> *mut TSTree; } extern "C" { - #[doc = " Use the parser to parse some source code stored in one contiguous buffer."] - #[doc = " The first two parameters are the same as in the `ts_parser_parse` function"] - #[doc = " above. The second two parameters indicate the location of the buffer and its"] - #[doc = " length in bytes."] + #[doc = " Use the parser to parse some source code stored in one contiguous buffer.\n The first two parameters are the same as in the [`ts_parser_parse`] function\n above. The second two parameters indicate the location of the buffer and its\n length in bytes."] pub fn ts_parser_parse_string( self_: *mut TSParser, old_tree: *const TSTree, @@ -252,10 +193,7 @@ extern "C" { ) -> *mut TSTree; } extern "C" { - #[doc = " Use the parser to parse some source code stored in one contiguous buffer with"] - #[doc = " a given encoding. The first four parameters work the same as in the"] - #[doc = " `ts_parser_parse_string` method above. The final parameter indicates whether"] - #[doc = " the text is encoded as UTF8 or UTF16."] + #[doc = " Use the parser to parse some source code stored in one contiguous buffer with\n a given encoding. The first four parameters work the same as in the\n [`ts_parser_parse_string`] method above. The final parameter indicates whether\n the text is encoded as UTF8 or UTF16."] pub fn ts_parser_parse_string_encoding( self_: *mut TSParser, old_tree: *const TSTree, @@ -265,33 +203,19 @@ extern "C" { ) -> *mut TSTree; } extern "C" { - #[doc = " Instruct the parser to start the next parse from the beginning."] - #[doc = ""] - #[doc = " If the parser previously failed because of a timeout or a cancellation, then"] - #[doc = " by default, it will resume where it left off on the next call to"] - #[doc = " `ts_parser_parse` or other parsing functions. If you don't want to resume,"] - #[doc = " and instead intend to use this parser to parse some other document, you must"] - #[doc = " call `ts_parser_reset` first."] + #[doc = " Instruct the parser to start the next parse from the beginning.\n\n If the parser previously failed because of a timeout or a cancellation, then\n by default, it will resume where it left off on the next call to\n [`ts_parser_parse`] or other parsing functions. If you don't want to resume,\n and instead intend to use this parser to parse some other document, you must\n call [`ts_parser_reset`] first."] pub fn ts_parser_reset(self_: *mut TSParser); } extern "C" { - #[doc = " Set the maximum duration in microseconds that parsing should be allowed to"] - #[doc = " take before halting."] - #[doc = ""] - #[doc = " If parsing takes longer than this, it will halt early, returning NULL."] - #[doc = " See `ts_parser_parse` for more information."] - pub fn ts_parser_set_timeout_micros(self_: *mut TSParser, timeout: u64); + #[doc = " Set the maximum duration in microseconds that parsing should be allowed to\n take before halting.\n\n If parsing takes longer than this, it will halt early, returning NULL.\n See [`ts_parser_parse`] for more information."] + pub fn ts_parser_set_timeout_micros(self_: *mut TSParser, timeout_micros: u64); } extern "C" { #[doc = " Get the duration in microseconds that parsing is allowed to take."] pub fn ts_parser_timeout_micros(self_: *const TSParser) -> u64; } extern "C" { - #[doc = " Set the parser's current cancellation flag pointer."] - #[doc = ""] - #[doc = " If a non-null pointer is assigned, then the parser will periodically read"] - #[doc = " from this pointer during parsing. If it reads a non-zero value, it will"] - #[doc = " halt early, returning NULL. See `ts_parser_parse` for more information."] + #[doc = " Set the parser's current cancellation flag pointer.\n\n If a non-null pointer is assigned, then the parser will periodically read\n from this pointer during parsing. If it reads a non-zero value, it will\n halt early, returning NULL. See [`ts_parser_parse`] for more information."] pub fn ts_parser_set_cancellation_flag(self_: *mut TSParser, flag: *const usize); } extern "C" { @@ -299,11 +223,7 @@ extern "C" { pub fn ts_parser_cancellation_flag(self_: *const TSParser) -> *const usize; } extern "C" { - #[doc = " Set the logger that a parser should use during parsing."] - #[doc = ""] - #[doc = " The parser does not take ownership over the logger payload. If a logger was"] - #[doc = " previously assigned, the caller is responsible for releasing any memory"] - #[doc = " owned by the previous logger."] + #[doc = " Set the logger that a parser should use during parsing.\n\n The parser does not take ownership over the logger payload. If a logger was\n previously assigned, the caller is responsible for releasing any memory\n owned by the previous logger."] pub fn ts_parser_set_logger(self_: *mut TSParser, logger: TSLogger); } extern "C" { @@ -311,17 +231,11 @@ extern "C" { pub fn ts_parser_logger(self_: *const TSParser) -> TSLogger; } extern "C" { - #[doc = " Set the file descriptor to which the parser should write debugging graphs"] - #[doc = " during parsing. The graphs are formatted in the DOT language. You may want"] - #[doc = " to pipe these graphs directly to a `dot(1)` process in order to generate"] - #[doc = " SVG output. You can turn off this logging by passing a negative number."] - pub fn ts_parser_print_dot_graphs(self_: *mut TSParser, file: ::std::os::raw::c_int); + #[doc = " Set the file descriptor to which the parser should write debugging graphs\n during parsing. The graphs are formatted in the DOT language. You may want\n to pipe these graphs directly to a `dot(1)` process in order to generate\n SVG output. You can turn off this logging by passing a negative number."] + pub fn ts_parser_print_dot_graphs(self_: *mut TSParser, fd: ::std::os::raw::c_int); } extern "C" { - #[doc = " Create a shallow copy of the syntax tree. This is very fast."] - #[doc = ""] - #[doc = " You need to copy a syntax tree in order to use it on more than one thread at"] - #[doc = " a time, as syntax trees are not thread safe."] + #[doc = " Create a shallow copy of the syntax tree. This is very fast.\n\n You need to copy a syntax tree in order to use it on more than one thread at\n a time, as syntax trees are not thread safe."] pub fn ts_tree_copy(self_: *const TSTree) -> *mut TSTree; } extern "C" { @@ -333,45 +247,27 @@ extern "C" { pub fn ts_tree_root_node(self_: *const TSTree) -> TSNode; } extern "C" { - #[doc = " Get the root node of the syntax tree, but with its position"] - #[doc = " shifted forward by the given offset."] + #[doc = " Get the root node of the syntax tree, but with its position\n shifted forward by the given offset."] pub fn ts_tree_root_node_with_offset( self_: *const TSTree, offset_bytes: u32, - offset_point: TSPoint, + offset_extent: TSPoint, ) -> TSNode; } extern "C" { #[doc = " Get the language that was used to parse the syntax tree."] - pub fn ts_tree_language(arg1: *const TSTree) -> *const TSLanguage; + pub fn ts_tree_language(self_: *const TSTree) -> *const TSLanguage; } extern "C" { - #[doc = " Get the array of included ranges that was used to parse the syntax tree."] - #[doc = ""] - #[doc = " The returned pointer must be freed by the caller."] - pub fn ts_tree_included_ranges(arg1: *const TSTree, length: *mut u32) -> *mut TSRange; + #[doc = " Get the array of included ranges that was used to parse the syntax tree.\n\n The returned pointer must be freed by the caller."] + pub fn ts_tree_included_ranges(self_: *const TSTree, length: *mut u32) -> *mut TSRange; } extern "C" { - #[doc = " Edit the syntax tree to keep it in sync with source code that has been"] - #[doc = " edited."] - #[doc = ""] - #[doc = " You must describe the edit both in terms of byte offsets and in terms of"] - #[doc = " (row, column) coordinates."] + #[doc = " Edit the syntax tree to keep it in sync with source code that has been\n edited.\n\n You must describe the edit both in terms of byte offsets and in terms of\n (row, column) coordinates."] pub fn ts_tree_edit(self_: *mut TSTree, edit: *const TSInputEdit); } extern "C" { - #[doc = " Compare an old edited syntax tree to a new syntax tree representing the same"] - #[doc = " document, returning an array of ranges whose syntactic structure has changed."] - #[doc = ""] - #[doc = " For this to work correctly, the old syntax tree must have been edited such"] - #[doc = " that its ranges match up to the new tree. Generally, you'll want to call"] - #[doc = " this function right after calling one of the `ts_parser_parse` functions."] - #[doc = " You need to pass the old tree that was passed to parse, as well as the new"] - #[doc = " tree that was returned from that function."] - #[doc = ""] - #[doc = " The returned array is allocated using `malloc` and the caller is responsible"] - #[doc = " for freeing it using `free`. The length of the array will be written to the"] - #[doc = " given `length` pointer."] + #[doc = " Compare an old edited syntax tree to a new syntax tree representing the same\n document, returning an array of ranges whose syntactic structure has changed.\n\n For this to work correctly, the old syntax tree must have been edited such\n that its ranges match up to the new tree. Generally, you'll want to call\n this function right after calling one of the [`ts_parser_parse`] functions.\n You need to pass the old tree that was passed to parse, as well as the new\n tree that was returned from that function.\n\n The returned array is allocated using `malloc` and the caller is responsible\n for freeing it using `free`. The length of the array will be written to the\n given `length` pointer."] pub fn ts_tree_get_changed_ranges( old_tree: *const TSTree, new_tree: *const TSTree, @@ -380,253 +276,259 @@ extern "C" { } extern "C" { #[doc = " Write a DOT graph describing the syntax tree to the given file."] - pub fn ts_tree_print_dot_graph(arg1: *const TSTree, file_descriptor: ::std::os::raw::c_int); + pub fn ts_tree_print_dot_graph(self_: *const TSTree, file_descriptor: ::std::os::raw::c_int); } extern "C" { #[doc = " Get the node's type as a null-terminated string."] - pub fn ts_node_type(arg1: TSNode) -> *const ::std::os::raw::c_char; + pub fn ts_node_type(self_: TSNode) -> *const ::std::os::raw::c_char; } extern "C" { #[doc = " Get the node's type as a numerical id."] - pub fn ts_node_symbol(arg1: TSNode) -> TSSymbol; + pub fn ts_node_symbol(self_: TSNode) -> TSSymbol; +} +extern "C" { + #[doc = " Get the node's language."] + pub fn ts_node_language(self_: TSNode) -> *const TSLanguage; +} +extern "C" { + #[doc = " Get the node's type as it appears in the grammar ignoring aliases as a\n null-terminated string."] + pub fn ts_node_grammar_type(self_: TSNode) -> *const ::std::os::raw::c_char; +} +extern "C" { + #[doc = " Get the node's type as a numerical id as it appears in the grammar ignoring\n aliases. This should be used in [`ts_language_next_state`] instead of\n [`ts_node_symbol`]."] + pub fn ts_node_grammar_symbol(self_: TSNode) -> TSSymbol; } extern "C" { #[doc = " Get the node's start byte."] - pub fn ts_node_start_byte(arg1: TSNode) -> u32; + pub fn ts_node_start_byte(self_: TSNode) -> u32; } extern "C" { #[doc = " Get the node's start position in terms of rows and columns."] - pub fn ts_node_start_point(arg1: TSNode) -> TSPoint; + pub fn ts_node_start_point(self_: TSNode) -> TSPoint; } extern "C" { #[doc = " Get the node's end byte."] - pub fn ts_node_end_byte(arg1: TSNode) -> u32; + pub fn ts_node_end_byte(self_: TSNode) -> u32; } extern "C" { #[doc = " Get the node's end position in terms of rows and columns."] - pub fn ts_node_end_point(arg1: TSNode) -> TSPoint; + pub fn ts_node_end_point(self_: TSNode) -> TSPoint; } extern "C" { - #[doc = " Get an S-expression representing the node as a string."] - #[doc = ""] - #[doc = " This string is allocated with `malloc` and the caller is responsible for"] - #[doc = " freeing it using `free`."] - pub fn ts_node_string(arg1: TSNode) -> *mut ::std::os::raw::c_char; + #[doc = " Get an S-expression representing the node as a string.\n\n This string is allocated with `malloc` and the caller is responsible for\n freeing it using `free`."] + pub fn ts_node_string(self_: TSNode) -> *mut ::std::os::raw::c_char; } extern "C" { - #[doc = " Check if the node is null. Functions like `ts_node_child` and"] - #[doc = " `ts_node_next_sibling` will return a null node to indicate that no such node"] - #[doc = " was found."] - pub fn ts_node_is_null(arg1: TSNode) -> bool; + #[doc = " Check if the node is null. Functions like [`ts_node_child`] and\n [`ts_node_next_sibling`] will return a null node to indicate that no such node\n was found."] + pub fn ts_node_is_null(self_: TSNode) -> bool; } extern "C" { - #[doc = " Check if the node is *named*. Named nodes correspond to named rules in the"] - #[doc = " grammar, whereas *anonymous* nodes correspond to string literals in the"] - #[doc = " grammar."] - pub fn ts_node_is_named(arg1: TSNode) -> bool; + #[doc = " Check if the node is *named*. Named nodes correspond to named rules in the\n grammar, whereas *anonymous* nodes correspond to string literals in the\n grammar."] + pub fn ts_node_is_named(self_: TSNode) -> bool; } extern "C" { - #[doc = " Check if the node is *missing*. Missing nodes are inserted by the parser in"] - #[doc = " order to recover from certain kinds of syntax errors."] - pub fn ts_node_is_missing(arg1: TSNode) -> bool; + #[doc = " Check if the node is *missing*. Missing nodes are inserted by the parser in\n order to recover from certain kinds of syntax errors."] + pub fn ts_node_is_missing(self_: TSNode) -> bool; } extern "C" { - #[doc = " Check if the node is *extra*. Extra nodes represent things like comments,"] - #[doc = " which are not required the grammar, but can appear anywhere."] - pub fn ts_node_is_extra(arg1: TSNode) -> bool; + #[doc = " Check if the node is *extra*. Extra nodes represent things like comments,\n which are not required the grammar, but can appear anywhere."] + pub fn ts_node_is_extra(self_: TSNode) -> bool; } extern "C" { #[doc = " Check if a syntax node has been edited."] - pub fn ts_node_has_changes(arg1: TSNode) -> bool; + pub fn ts_node_has_changes(self_: TSNode) -> bool; } extern "C" { #[doc = " Check if the node is a syntax error or contains any syntax errors."] - pub fn ts_node_has_error(arg1: TSNode) -> bool; + pub fn ts_node_has_error(self_: TSNode) -> bool; +} +extern "C" { + #[doc = " Check if the node is a syntax error."] + pub fn ts_node_is_error(self_: TSNode) -> bool; +} +extern "C" { + #[doc = " Get this node's parse state."] + pub fn ts_node_parse_state(self_: TSNode) -> TSStateId; +} +extern "C" { + #[doc = " Get the parse state after this node."] + pub fn ts_node_next_parse_state(self_: TSNode) -> TSStateId; } extern "C" { #[doc = " Get the node's immediate parent."] - pub fn ts_node_parent(arg1: TSNode) -> TSNode; + pub fn ts_node_parent(self_: TSNode) -> TSNode; } extern "C" { - #[doc = " Get the node's child at the given index, where zero represents the first"] - #[doc = " child."] - pub fn ts_node_child(arg1: TSNode, arg2: u32) -> TSNode; + #[doc = " Get the node's child at the given index, where zero represents the first\n child."] + pub fn ts_node_child(self_: TSNode, child_index: u32) -> TSNode; } extern "C" { - #[doc = " Get the field name for node's child at the given index, where zero represents"] - #[doc = " the first child. Returns NULL, if no field is found."] - pub fn ts_node_field_name_for_child(arg1: TSNode, arg2: u32) -> *const ::std::os::raw::c_char; + #[doc = " Get the field name for node's child at the given index, where zero represents\n the first child. Returns NULL, if no field is found."] + pub fn ts_node_field_name_for_child( + self_: TSNode, + child_index: u32, + ) -> *const ::std::os::raw::c_char; } extern "C" { #[doc = " Get the node's number of children."] - pub fn ts_node_child_count(arg1: TSNode) -> u32; + pub fn ts_node_child_count(self_: TSNode) -> u32; } extern "C" { - #[doc = " Get the node's *named* child at the given index."] - #[doc = ""] - #[doc = " See also `ts_node_is_named`."] - pub fn ts_node_named_child(arg1: TSNode, arg2: u32) -> TSNode; + #[doc = " Get the node's *named* child at the given index.\n\n See also [`ts_node_is_named`]."] + pub fn ts_node_named_child(self_: TSNode, child_index: u32) -> TSNode; } extern "C" { - #[doc = " Get the node's number of *named* children."] - #[doc = ""] - #[doc = " See also `ts_node_is_named`."] - pub fn ts_node_named_child_count(arg1: TSNode) -> u32; + #[doc = " Get the node's number of *named* children.\n\n See also [`ts_node_is_named`]."] + pub fn ts_node_named_child_count(self_: TSNode) -> u32; } extern "C" { #[doc = " Get the node's child with the given field name."] pub fn ts_node_child_by_field_name( self_: TSNode, - field_name: *const ::std::os::raw::c_char, - field_name_length: u32, + name: *const ::std::os::raw::c_char, + name_length: u32, ) -> TSNode; } extern "C" { - #[doc = " Get the node's child with the given numerical field id."] - #[doc = ""] - #[doc = " You can convert a field name to an id using the"] - #[doc = " `ts_language_field_id_for_name` function."] - pub fn ts_node_child_by_field_id(arg1: TSNode, arg2: TSFieldId) -> TSNode; + #[doc = " Get the node's child with the given numerical field id.\n\n You can convert a field name to an id using the\n [`ts_language_field_id_for_name`] function."] + pub fn ts_node_child_by_field_id(self_: TSNode, field_id: TSFieldId) -> TSNode; } extern "C" { #[doc = " Get the node's next / previous sibling."] - pub fn ts_node_next_sibling(arg1: TSNode) -> TSNode; + pub fn ts_node_next_sibling(self_: TSNode) -> TSNode; } extern "C" { - pub fn ts_node_prev_sibling(arg1: TSNode) -> TSNode; + pub fn ts_node_prev_sibling(self_: TSNode) -> TSNode; } extern "C" { #[doc = " Get the node's next / previous *named* sibling."] - pub fn ts_node_next_named_sibling(arg1: TSNode) -> TSNode; + pub fn ts_node_next_named_sibling(self_: TSNode) -> TSNode; } extern "C" { - pub fn ts_node_prev_named_sibling(arg1: TSNode) -> TSNode; + pub fn ts_node_prev_named_sibling(self_: TSNode) -> TSNode; } extern "C" { #[doc = " Get the node's first child that extends beyond the given byte offset."] - pub fn ts_node_first_child_for_byte(arg1: TSNode, arg2: u32) -> TSNode; + pub fn ts_node_first_child_for_byte(self_: TSNode, byte: u32) -> TSNode; } extern "C" { #[doc = " Get the node's first named child that extends beyond the given byte offset."] - pub fn ts_node_first_named_child_for_byte(arg1: TSNode, arg2: u32) -> TSNode; + pub fn ts_node_first_named_child_for_byte(self_: TSNode, byte: u32) -> TSNode; } extern "C" { - #[doc = " Get the smallest node within this node that spans the given range of bytes"] - #[doc = " or (row, column) positions."] - pub fn ts_node_descendant_for_byte_range(arg1: TSNode, arg2: u32, arg3: u32) -> TSNode; + #[doc = " Get the node's number of descendants, including one for the node itself."] + pub fn ts_node_descendant_count(self_: TSNode) -> u32; } extern "C" { - pub fn ts_node_descendant_for_point_range(arg1: TSNode, arg2: TSPoint, arg3: TSPoint) - -> TSNode; + #[doc = " Get the smallest node within this node that spans the given range of bytes\n or (row, column) positions."] + pub fn ts_node_descendant_for_byte_range(self_: TSNode, start: u32, end: u32) -> TSNode; } extern "C" { - #[doc = " Get the smallest named node within this node that spans the given range of"] - #[doc = " bytes or (row, column) positions."] - pub fn ts_node_named_descendant_for_byte_range(arg1: TSNode, arg2: u32, arg3: u32) -> TSNode; + pub fn ts_node_descendant_for_point_range( + self_: TSNode, + start: TSPoint, + end: TSPoint, + ) -> TSNode; +} +extern "C" { + #[doc = " Get the smallest named node within this node that spans the given range of\n bytes or (row, column) positions."] + pub fn ts_node_named_descendant_for_byte_range(self_: TSNode, start: u32, end: u32) -> TSNode; } extern "C" { pub fn ts_node_named_descendant_for_point_range( - arg1: TSNode, - arg2: TSPoint, - arg3: TSPoint, + self_: TSNode, + start: TSPoint, + end: TSPoint, ) -> TSNode; } extern "C" { - #[doc = " Edit the node to keep it in-sync with source code that has been edited."] - #[doc = ""] - #[doc = " This function is only rarely needed. When you edit a syntax tree with the"] - #[doc = " `ts_tree_edit` function, all of the nodes that you retrieve from the tree"] - #[doc = " afterward will already reflect the edit. You only need to use `ts_node_edit`"] - #[doc = " when you have a `TSNode` instance that you want to keep and continue to use"] - #[doc = " after an edit."] - pub fn ts_node_edit(arg1: *mut TSNode, arg2: *const TSInputEdit); + #[doc = " Edit the node to keep it in-sync with source code that has been edited.\n\n This function is only rarely needed. When you edit a syntax tree with the\n [`ts_tree_edit`] function, all of the nodes that you retrieve from the tree\n afterward will already reflect the edit. You only need to use [`ts_node_edit`]\n when you have a [`TSNode`] instance that you want to keep and continue to use\n after an edit."] + pub fn ts_node_edit(self_: *mut TSNode, edit: *const TSInputEdit); } extern "C" { #[doc = " Check if two nodes are identical."] - pub fn ts_node_eq(arg1: TSNode, arg2: TSNode) -> bool; + pub fn ts_node_eq(self_: TSNode, other: TSNode) -> bool; } extern "C" { - #[doc = " Create a new tree cursor starting from the given node."] - #[doc = ""] - #[doc = " A tree cursor allows you to walk a syntax tree more efficiently than is"] - #[doc = " possible using the `TSNode` functions. It is a mutable object that is always"] - #[doc = " on a certain syntax node, and can be moved imperatively to different nodes."] - pub fn ts_tree_cursor_new(arg1: TSNode) -> TSTreeCursor; + #[doc = " Create a new tree cursor starting from the given node.\n\n A tree cursor allows you to walk a syntax tree more efficiently than is\n possible using the [`TSNode`] functions. It is a mutable object that is always\n on a certain syntax node, and can be moved imperatively to different nodes."] + pub fn ts_tree_cursor_new(node: TSNode) -> TSTreeCursor; } extern "C" { #[doc = " Delete a tree cursor, freeing all of the memory that it used."] - pub fn ts_tree_cursor_delete(arg1: *mut TSTreeCursor); + pub fn ts_tree_cursor_delete(self_: *mut TSTreeCursor); } extern "C" { #[doc = " Re-initialize a tree cursor to start at a different node."] - pub fn ts_tree_cursor_reset(arg1: *mut TSTreeCursor, arg2: TSNode); + pub fn ts_tree_cursor_reset(self_: *mut TSTreeCursor, node: TSNode); +} +extern "C" { + #[doc = " Re-initialize a tree cursor to the same position as another cursor.\n\n Unlike [`ts_tree_cursor_reset`], this will not lose parent information and\n allows reusing already created cursors."] + pub fn ts_tree_cursor_reset_to(dst: *mut TSTreeCursor, src: *const TSTreeCursor); } extern "C" { #[doc = " Get the tree cursor's current node."] - pub fn ts_tree_cursor_current_node(arg1: *const TSTreeCursor) -> TSNode; + pub fn ts_tree_cursor_current_node(self_: *const TSTreeCursor) -> TSNode; } extern "C" { - #[doc = " Get the field name of the tree cursor's current node."] - #[doc = ""] - #[doc = " This returns `NULL` if the current node doesn't have a field."] - #[doc = " See also `ts_node_child_by_field_name`."] + #[doc = " Get the field name of the tree cursor's current node.\n\n This returns `NULL` if the current node doesn't have a field.\n See also [`ts_node_child_by_field_name`]."] pub fn ts_tree_cursor_current_field_name( - arg1: *const TSTreeCursor, + self_: *const TSTreeCursor, ) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Get the field id of the tree cursor's current node."] - #[doc = ""] - #[doc = " This returns zero if the current node doesn't have a field."] - #[doc = " See also `ts_node_child_by_field_id`, `ts_language_field_id_for_name`."] - pub fn ts_tree_cursor_current_field_id(arg1: *const TSTreeCursor) -> TSFieldId; + #[doc = " Get the field id of the tree cursor's current node.\n\n This returns zero if the current node doesn't have a field.\n See also [`ts_node_child_by_field_id`], [`ts_language_field_id_for_name`]."] + pub fn ts_tree_cursor_current_field_id(self_: *const TSTreeCursor) -> TSFieldId; +} +extern "C" { + #[doc = " Move the cursor to the parent of its current node.\n\n This returns `true` if the cursor successfully moved, and returns `false`\n if there was no parent node (the cursor was already on the root node)."] + pub fn ts_tree_cursor_goto_parent(self_: *mut TSTreeCursor) -> bool; +} +extern "C" { + #[doc = " Move the cursor to the next sibling of its current node.\n\n This returns `true` if the cursor successfully moved, and returns `false`\n if there was no next sibling node."] + pub fn ts_tree_cursor_goto_next_sibling(self_: *mut TSTreeCursor) -> bool; +} +extern "C" { + #[doc = " Move the cursor to the previous sibling of its current node.\n\n This returns `true` if the cursor successfully moved, and returns `false` if\n there was no previous sibling node.\n\n Note, that this function may be slower than\n [`ts_tree_cursor_goto_next_sibling`] due to how node positions are stored. In\n the worst case, this will need to iterate through all the children upto the\n previous sibling node to recalculate its position."] + pub fn ts_tree_cursor_goto_previous_sibling(self_: *mut TSTreeCursor) -> bool; } extern "C" { - #[doc = " Move the cursor to the parent of its current node."] - #[doc = ""] - #[doc = " This returns `true` if the cursor successfully moved, and returns `false`"] - #[doc = " if there was no parent node (the cursor was already on the root node)."] - pub fn ts_tree_cursor_goto_parent(arg1: *mut TSTreeCursor) -> bool; + #[doc = " Move the cursor to the first child of its current node.\n\n This returns `true` if the cursor successfully moved, and returns `false`\n if there were no children."] + pub fn ts_tree_cursor_goto_first_child(self_: *mut TSTreeCursor) -> bool; } extern "C" { - #[doc = " Move the cursor to the next sibling of its current node."] - #[doc = ""] - #[doc = " This returns `true` if the cursor successfully moved, and returns `false`"] - #[doc = " if there was no next sibling node."] - pub fn ts_tree_cursor_goto_next_sibling(arg1: *mut TSTreeCursor) -> bool; + #[doc = " Move the cursor to the last child of its current node.\n\n This returns `true` if the cursor successfully moved, and returns `false` if\n there were no children.\n\n Note that this function may be slower than [`ts_tree_cursor_goto_first_child`]\n because it needs to iterate through all the children to compute the child's\n position."] + pub fn ts_tree_cursor_goto_last_child(self_: *mut TSTreeCursor) -> bool; } extern "C" { - #[doc = " Move the cursor to the first child of its current node."] - #[doc = ""] - #[doc = " This returns `true` if the cursor successfully moved, and returns `false`"] - #[doc = " if there were no children."] - pub fn ts_tree_cursor_goto_first_child(arg1: *mut TSTreeCursor) -> bool; + #[doc = " Move the cursor to the node that is the nth descendant of\n the original node that the cursor was constructed with, where\n zero represents the original node itself."] + pub fn ts_tree_cursor_goto_descendant(self_: *mut TSTreeCursor, goal_descendant_index: u32); } extern "C" { - #[doc = " Move the cursor to the first child of its current node that extends beyond"] - #[doc = " the given byte offset or point."] - #[doc = ""] - #[doc = " This returns the index of the child node if one was found, and returns -1"] - #[doc = " if no such child was found."] - pub fn ts_tree_cursor_goto_first_child_for_byte(arg1: *mut TSTreeCursor, arg2: u32) -> i64; + #[doc = " Get the index of the cursor's current node out of all of the\n descendants of the original node that the cursor was constructed with."] + pub fn ts_tree_cursor_current_descendant_index(self_: *const TSTreeCursor) -> u32; } extern "C" { - pub fn ts_tree_cursor_goto_first_child_for_point(arg1: *mut TSTreeCursor, arg2: TSPoint) - -> i64; + #[doc = " Get the depth of the cursor's current node relative to the original\n node that the cursor was constructed with."] + pub fn ts_tree_cursor_current_depth(self_: *const TSTreeCursor) -> u32; } extern "C" { - pub fn ts_tree_cursor_copy(arg1: *const TSTreeCursor) -> TSTreeCursor; + #[doc = " Move the cursor to the first child of its current node that extends beyond\n the given byte offset or point.\n\n This returns the index of the child node if one was found, and returns -1\n if no such child was found."] + pub fn ts_tree_cursor_goto_first_child_for_byte( + self_: *mut TSTreeCursor, + goal_byte: u32, + ) -> i64; } extern "C" { - #[doc = " Create a new query from a string containing one or more S-expression"] - #[doc = " patterns. The query is associated with a particular language, and can"] - #[doc = " only be run on syntax nodes parsed with that language."] - #[doc = ""] - #[doc = " If all of the given patterns are valid, this returns a `TSQuery`."] - #[doc = " If a pattern is invalid, this returns `NULL`, and provides two pieces"] - #[doc = " of information about the problem:"] - #[doc = " 1. The byte offset of the error is written to the `error_offset` parameter."] - #[doc = " 2. The type of error is written to the `error_type` parameter."] + pub fn ts_tree_cursor_goto_first_child_for_point( + self_: *mut TSTreeCursor, + goal_point: TSPoint, + ) -> i64; +} +extern "C" { + pub fn ts_tree_cursor_copy(cursor: *const TSTreeCursor) -> TSTreeCursor; +} +extern "C" { + #[doc = " Create a new query from a string containing one or more S-expression\n patterns. The query is associated with a particular language, and can\n only be run on syntax nodes parsed with that language.\n\n If all of the given patterns are valid, this returns a [`TSQuery`].\n If a pattern is invalid, this returns `NULL`, and provides two pieces\n of information about the problem:\n 1. The byte offset of the error is written to the `error_offset` parameter.\n 2. The type of error is written to the `error_type` parameter."] pub fn ts_query_new( language: *const TSLanguage, source: *const ::std::os::raw::c_char, @@ -637,187 +539,152 @@ extern "C" { } extern "C" { #[doc = " Delete a query, freeing all of the memory that it used."] - pub fn ts_query_delete(arg1: *mut TSQuery); + pub fn ts_query_delete(self_: *mut TSQuery); } extern "C" { #[doc = " Get the number of patterns, captures, or string literals in the query."] - pub fn ts_query_pattern_count(arg1: *const TSQuery) -> u32; + pub fn ts_query_pattern_count(self_: *const TSQuery) -> u32; } extern "C" { - pub fn ts_query_capture_count(arg1: *const TSQuery) -> u32; + pub fn ts_query_capture_count(self_: *const TSQuery) -> u32; } extern "C" { - pub fn ts_query_string_count(arg1: *const TSQuery) -> u32; + pub fn ts_query_string_count(self_: *const TSQuery) -> u32; } extern "C" { - #[doc = " Get the byte offset where the given pattern starts in the query's source."] - #[doc = ""] - #[doc = " This can be useful when combining queries by concatenating their source"] - #[doc = " code strings."] - pub fn ts_query_start_byte_for_pattern(arg1: *const TSQuery, arg2: u32) -> u32; + #[doc = " Get the byte offset where the given pattern starts in the query's source.\n\n This can be useful when combining queries by concatenating their source\n code strings."] + pub fn ts_query_start_byte_for_pattern(self_: *const TSQuery, pattern_index: u32) -> u32; } extern "C" { - #[doc = " Get all of the predicates for the given pattern in the query."] - #[doc = ""] - #[doc = " The predicates are represented as a single array of steps. There are three"] - #[doc = " types of steps in this array, which correspond to the three legal values for"] - #[doc = " the `type` field:"] - #[doc = " - `TSQueryPredicateStepTypeCapture` - Steps with this type represent names"] - #[doc = " of captures. Their `value_id` can be used with the"] - #[doc = " `ts_query_capture_name_for_id` function to obtain the name of the capture."] - #[doc = " - `TSQueryPredicateStepTypeString` - Steps with this type represent literal"] - #[doc = " strings. Their `value_id` can be used with the"] - #[doc = " `ts_query_string_value_for_id` function to obtain their string value."] - #[doc = " - `TSQueryPredicateStepTypeDone` - Steps with this type are *sentinels*"] - #[doc = " that represent the end of an individual predicate. If a pattern has two"] - #[doc = " predicates, then there will be two steps with this `type` in the array."] + #[doc = " Get all of the predicates for the given pattern in the query.\n\n The predicates are represented as a single array of steps. There are three\n types of steps in this array, which correspond to the three legal values for\n the `type` field:\n - `TSQueryPredicateStepTypeCapture` - Steps with this type represent names\n of captures. Their `value_id` can be used with the\n [`ts_query_capture_name_for_id`] function to obtain the name of the capture.\n - `TSQueryPredicateStepTypeString` - Steps with this type represent literal\n strings. Their `value_id` can be used with the\n [`ts_query_string_value_for_id`] function to obtain their string value.\n - `TSQueryPredicateStepTypeDone` - Steps with this type are *sentinels*\n that represent the end of an individual predicate. If a pattern has two\n predicates, then there will be two steps with this `type` in the array."] pub fn ts_query_predicates_for_pattern( self_: *const TSQuery, pattern_index: u32, - length: *mut u32, + step_count: *mut u32, ) -> *const TSQueryPredicateStep; } extern "C" { - pub fn ts_query_is_pattern_non_local(self_: *const TSQuery, pattern_index: u32) -> bool; + pub fn ts_query_is_pattern_rooted(self_: *const TSQuery, pattern_index: u32) -> bool; } extern "C" { - pub fn ts_query_is_pattern_rooted(self_: *const TSQuery, pattern_index: u32) -> bool; + pub fn ts_query_is_pattern_non_local(self_: *const TSQuery, pattern_index: u32) -> bool; } extern "C" { pub fn ts_query_is_pattern_guaranteed_at_step(self_: *const TSQuery, byte_offset: u32) -> bool; } extern "C" { - #[doc = " Get the name and length of one of the query's captures, or one of the"] - #[doc = " query's string literals. Each capture and string is associated with a"] - #[doc = " numeric id based on the order that it appeared in the query's source."] + #[doc = " Get the name and length of one of the query's captures, or one of the\n query's string literals. Each capture and string is associated with a\n numeric id based on the order that it appeared in the query's source."] pub fn ts_query_capture_name_for_id( - arg1: *const TSQuery, - id: u32, + self_: *const TSQuery, + index: u32, length: *mut u32, ) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Get the quantifier of the query's captures. Each capture is * associated"] - #[doc = " with a numeric id based on the order that it appeared in the query's source."] + #[doc = " Get the quantifier of the query's captures. Each capture is * associated\n with a numeric id based on the order that it appeared in the query's source."] pub fn ts_query_capture_quantifier_for_id( - arg1: *const TSQuery, - pattern_id: u32, - capture_id: u32, + self_: *const TSQuery, + pattern_index: u32, + capture_index: u32, ) -> TSQuantifier; } extern "C" { pub fn ts_query_string_value_for_id( - arg1: *const TSQuery, - id: u32, + self_: *const TSQuery, + index: u32, length: *mut u32, ) -> *const ::std::os::raw::c_char; } extern "C" { - #[doc = " Disable a certain capture within a query."] - #[doc = ""] - #[doc = " This prevents the capture from being returned in matches, and also avoids"] - #[doc = " any resource usage associated with recording the capture. Currently, there"] - #[doc = " is no way to undo this."] + #[doc = " Disable a certain capture within a query.\n\n This prevents the capture from being returned in matches, and also avoids\n any resource usage associated with recording the capture. Currently, there\n is no way to undo this."] pub fn ts_query_disable_capture( - arg1: *mut TSQuery, - arg2: *const ::std::os::raw::c_char, - arg3: u32, + self_: *mut TSQuery, + name: *const ::std::os::raw::c_char, + length: u32, ); } extern "C" { - #[doc = " Disable a certain pattern within a query."] - #[doc = ""] - #[doc = " This prevents the pattern from matching and removes most of the overhead"] - #[doc = " associated with the pattern. Currently, there is no way to undo this."] - pub fn ts_query_disable_pattern(arg1: *mut TSQuery, arg2: u32); -} -extern "C" { - #[doc = " Create a new cursor for executing a given query."] - #[doc = ""] - #[doc = " The cursor stores the state that is needed to iteratively search"] - #[doc = " for matches. To use the query cursor, first call `ts_query_cursor_exec`"] - #[doc = " to start running a given query on a given syntax node. Then, there are"] - #[doc = " two options for consuming the results of the query:"] - #[doc = " 1. Repeatedly call `ts_query_cursor_next_match` to iterate over all of the"] - #[doc = " *matches* in the order that they were found. Each match contains the"] - #[doc = " index of the pattern that matched, and an array of captures. Because"] - #[doc = " multiple patterns can match the same set of nodes, one match may contain"] - #[doc = " captures that appear *before* some of the captures from a previous match."] - #[doc = " 2. Repeatedly call `ts_query_cursor_next_capture` to iterate over all of the"] - #[doc = " individual *captures* in the order that they appear. This is useful if"] - #[doc = " don't care about which pattern matched, and just want a single ordered"] - #[doc = " sequence of captures."] - #[doc = ""] - #[doc = " If you don't care about consuming all of the results, you can stop calling"] - #[doc = " `ts_query_cursor_next_match` or `ts_query_cursor_next_capture` at any point."] - #[doc = " You can then start executing another query on another node by calling"] - #[doc = " `ts_query_cursor_exec` again."] + #[doc = " Disable a certain pattern within a query.\n\n This prevents the pattern from matching and removes most of the overhead\n associated with the pattern. Currently, there is no way to undo this."] + pub fn ts_query_disable_pattern(self_: *mut TSQuery, pattern_index: u32); +} +extern "C" { + #[doc = " Create a new cursor for executing a given query.\n\n The cursor stores the state that is needed to iteratively search\n for matches. To use the query cursor, first call [`ts_query_cursor_exec`]\n to start running a given query on a given syntax node. Then, there are\n two options for consuming the results of the query:\n 1. Repeatedly call [`ts_query_cursor_next_match`] to iterate over all of the\n *matches* in the order that they were found. Each match contains the\n index of the pattern that matched, and an array of captures. Because\n multiple patterns can match the same set of nodes, one match may contain\n captures that appear *before* some of the captures from a previous match.\n 2. Repeatedly call [`ts_query_cursor_next_capture`] to iterate over all of the\n individual *captures* in the order that they appear. This is useful if\n don't care about which pattern matched, and just want a single ordered\n sequence of captures.\n\n If you don't care about consuming all of the results, you can stop calling\n [`ts_query_cursor_next_match`] or [`ts_query_cursor_next_capture`] at any point.\n You can then start executing another query on another node by calling\n [`ts_query_cursor_exec`] again."] pub fn ts_query_cursor_new() -> *mut TSQueryCursor; } extern "C" { #[doc = " Delete a query cursor, freeing all of the memory that it used."] - pub fn ts_query_cursor_delete(arg1: *mut TSQueryCursor); + pub fn ts_query_cursor_delete(self_: *mut TSQueryCursor); } extern "C" { #[doc = " Start running a given query on a given node."] - pub fn ts_query_cursor_exec(arg1: *mut TSQueryCursor, arg2: *const TSQuery, arg3: TSNode); + pub fn ts_query_cursor_exec(self_: *mut TSQueryCursor, query: *const TSQuery, node: TSNode); } extern "C" { - #[doc = " Manage the maximum number of in-progress matches allowed by this query"] - #[doc = " cursor."] - #[doc = ""] - #[doc = " Query cursors have an optional maximum capacity for storing lists of"] - #[doc = " in-progress captures. If this capacity is exceeded, then the"] - #[doc = " earliest-starting match will silently be dropped to make room for further"] - #[doc = " matches. This maximum capacity is optional — by default, query cursors allow"] - #[doc = " any number of pending matches, dynamically allocating new space for them as"] - #[doc = " needed as the query is executed."] - pub fn ts_query_cursor_did_exceed_match_limit(arg1: *const TSQueryCursor) -> bool; + #[doc = " Manage the maximum number of in-progress matches allowed by this query\n cursor.\n\n Query cursors have an optional maximum capacity for storing lists of\n in-progress captures. If this capacity is exceeded, then the\n earliest-starting match will silently be dropped to make room for further\n matches. This maximum capacity is optional — by default, query cursors allow\n any number of pending matches, dynamically allocating new space for them as\n needed as the query is executed."] + pub fn ts_query_cursor_did_exceed_match_limit(self_: *const TSQueryCursor) -> bool; } extern "C" { - pub fn ts_query_cursor_match_limit(arg1: *const TSQueryCursor) -> u32; + pub fn ts_query_cursor_match_limit(self_: *const TSQueryCursor) -> u32; } extern "C" { - pub fn ts_query_cursor_set_match_limit(arg1: *mut TSQueryCursor, arg2: u32); + pub fn ts_query_cursor_set_match_limit(self_: *mut TSQueryCursor, limit: u32); } extern "C" { - #[doc = " Set the range of bytes or (row, column) positions in which the query"] - #[doc = " will be executed."] - pub fn ts_query_cursor_set_byte_range(arg1: *mut TSQueryCursor, arg2: u32, arg3: u32); + #[doc = " Set the range of bytes or (row, column) positions in which the query\n will be executed."] + pub fn ts_query_cursor_set_byte_range( + self_: *mut TSQueryCursor, + start_byte: u32, + end_byte: u32, + ); } extern "C" { - pub fn ts_query_cursor_set_point_range(arg1: *mut TSQueryCursor, arg2: TSPoint, arg3: TSPoint); + pub fn ts_query_cursor_set_point_range( + self_: *mut TSQueryCursor, + start_point: TSPoint, + end_point: TSPoint, + ); } extern "C" { - #[doc = " Advance to the next match of the currently running query."] - #[doc = ""] - #[doc = " If there is a match, write it to `*match` and return `true`."] - #[doc = " Otherwise, return `false`."] - pub fn ts_query_cursor_next_match(arg1: *mut TSQueryCursor, match_: *mut TSQueryMatch) -> bool; + #[doc = " Advance to the next match of the currently running query.\n\n If there is a match, write it to `*match` and return `true`.\n Otherwise, return `false`."] + pub fn ts_query_cursor_next_match(self_: *mut TSQueryCursor, match_: *mut TSQueryMatch) + -> bool; } extern "C" { - pub fn ts_query_cursor_remove_match(arg1: *mut TSQueryCursor, id: u32); + pub fn ts_query_cursor_remove_match(self_: *mut TSQueryCursor, match_id: u32); } extern "C" { - #[doc = " Advance to the next capture of the currently running query."] - #[doc = ""] - #[doc = " If there is a capture, write its match to `*match` and its index within"] - #[doc = " the matche's capture list to `*capture_index`. Otherwise, return `false`."] + #[doc = " Advance to the next capture of the currently running query.\n\n If there is a capture, write its match to `*match` and its index within\n the matche's capture list to `*capture_index`. Otherwise, return `false`."] pub fn ts_query_cursor_next_capture( - arg1: *mut TSQueryCursor, + self_: *mut TSQueryCursor, match_: *mut TSQueryMatch, capture_index: *mut u32, ) -> bool; } +extern "C" { + #[doc = " Set the maximum start depth for a query cursor.\n\n This prevents cursors from exploring children nodes at a certain depth.\n Note if a pattern includes many children, then they will still be checked.\n\n The zero max start depth value can be used as a special behavior and\n it helps to destructure a subtree by staying on a node and using captures\n for interested parts. Note that the zero max start depth only limit a search\n depth for a pattern's root node but other nodes that are parts of the pattern\n may be searched at any depth what defined by the pattern structure.\n\n Set to `UINT32_MAX` to remove the maximum start depth."] + pub fn ts_query_cursor_set_max_start_depth(self_: *mut TSQueryCursor, max_start_depth: u32); +} +extern "C" { + #[doc = " Get another reference to the given language."] + pub fn ts_language_copy(self_: *const TSLanguage) -> *const TSLanguage; +} +extern "C" { + #[doc = " Free any dynamically-allocated resources for this language, if\n this is the last reference."] + pub fn ts_language_delete(self_: *const TSLanguage); +} extern "C" { #[doc = " Get the number of distinct node types in the language."] - pub fn ts_language_symbol_count(arg1: *const TSLanguage) -> u32; + pub fn ts_language_symbol_count(self_: *const TSLanguage) -> u32; +} +extern "C" { + #[doc = " Get the number of valid states in this language."] + pub fn ts_language_state_count(self_: *const TSLanguage) -> u32; } extern "C" { #[doc = " Get a node type string for the given numerical id."] pub fn ts_language_symbol_name( - arg1: *const TSLanguage, - arg2: TSSymbol, + self_: *const TSLanguage, + symbol: TSSymbol, ) -> *const ::std::os::raw::c_char; } extern "C" { @@ -831,53 +698,145 @@ extern "C" { } extern "C" { #[doc = " Get the number of distinct field names in the language."] - pub fn ts_language_field_count(arg1: *const TSLanguage) -> u32; + pub fn ts_language_field_count(self_: *const TSLanguage) -> u32; } extern "C" { #[doc = " Get the field name string for the given numerical id."] pub fn ts_language_field_name_for_id( - arg1: *const TSLanguage, - arg2: TSFieldId, + self_: *const TSLanguage, + id: TSFieldId, ) -> *const ::std::os::raw::c_char; } extern "C" { #[doc = " Get the numerical id for the given field name string."] pub fn ts_language_field_id_for_name( - arg1: *const TSLanguage, - arg2: *const ::std::os::raw::c_char, - arg3: u32, + self_: *const TSLanguage, + name: *const ::std::os::raw::c_char, + name_length: u32, ) -> TSFieldId; } extern "C" { - #[doc = " Check whether the given node type id belongs to named nodes, anonymous nodes,"] - #[doc = " or a hidden nodes."] - #[doc = ""] - #[doc = " See also `ts_node_is_named`. Hidden nodes are never returned from the API."] - pub fn ts_language_symbol_type(arg1: *const TSLanguage, arg2: TSSymbol) -> TSSymbolType; -} -extern "C" { - #[doc = " Get the ABI version number for this language. This version number is used"] - #[doc = " to ensure that languages were generated by a compatible version of"] - #[doc = " Tree-sitter."] - #[doc = ""] - #[doc = " See also `ts_parser_set_language`."] - pub fn ts_language_version(arg1: *const TSLanguage) -> u32; -} -extern "C" { - #[doc = " Set the allocation functions used by the library."] - #[doc = ""] - #[doc = " By default, Tree-sitter uses the standard libc allocation functions,"] - #[doc = " but aborts the process when an allocation fails. This function lets"] - #[doc = " you supply alternative allocation functions at runtime."] - #[doc = ""] - #[doc = " If you pass `NULL` for any parameter, Tree-sitter will switch back to"] - #[doc = " its default implementation of that function."] - #[doc = ""] - #[doc = " If you call this function after the library has already been used, then"] - #[doc = " you must ensure that either:"] - #[doc = " 1. All the existing objects have been freed."] - #[doc = " 2. The new allocator shares its state with the old one, so it is capable"] - #[doc = " of freeing memory that was allocated by the old allocator."] + #[doc = " Check whether the given node type id belongs to named nodes, anonymous nodes,\n or a hidden nodes.\n\n See also [`ts_node_is_named`]. Hidden nodes are never returned from the API."] + pub fn ts_language_symbol_type(self_: *const TSLanguage, symbol: TSSymbol) -> TSSymbolType; +} +extern "C" { + #[doc = " Get the ABI version number for this language. This version number is used\n to ensure that languages were generated by a compatible version of\n Tree-sitter.\n\n See also [`ts_parser_set_language`]."] + pub fn ts_language_version(self_: *const TSLanguage) -> u32; +} +extern "C" { + #[doc = " Get the next parse state. Combine this with lookahead iterators to generate\n completion suggestions or valid symbols in error nodes. Use\n [`ts_node_grammar_symbol`] for valid symbols."] + pub fn ts_language_next_state( + self_: *const TSLanguage, + state: TSStateId, + symbol: TSSymbol, + ) -> TSStateId; +} +extern "C" { + #[doc = " Create a new lookahead iterator for the given language and parse state.\n\n This returns `NULL` if state is invalid for the language.\n\n Repeatedly using [`ts_lookahead_iterator_next`] and\n [`ts_lookahead_iterator_current_symbol`] will generate valid symbols in the\n given parse state. Newly created lookahead iterators will contain the `ERROR`\n symbol.\n\n Lookahead iterators can be useful to generate suggestions and improve syntax\n error diagnostics. To get symbols valid in an ERROR node, use the lookahead\n iterator on its first leaf node state. For `MISSING` nodes, a lookahead\n iterator created on the previous non-extra leaf node may be appropriate."] + pub fn ts_lookahead_iterator_new( + self_: *const TSLanguage, + state: TSStateId, + ) -> *mut TSLookaheadIterator; +} +extern "C" { + #[doc = " Delete a lookahead iterator freeing all the memory used."] + pub fn ts_lookahead_iterator_delete(self_: *mut TSLookaheadIterator); +} +extern "C" { + #[doc = " Reset the lookahead iterator to another state.\n\n This returns `true` if the iterator was reset to the given state and `false`\n otherwise."] + pub fn ts_lookahead_iterator_reset_state( + self_: *mut TSLookaheadIterator, + state: TSStateId, + ) -> bool; +} +extern "C" { + #[doc = " Reset the lookahead iterator.\n\n This returns `true` if the language was set successfully and `false`\n otherwise."] + pub fn ts_lookahead_iterator_reset( + self_: *mut TSLookaheadIterator, + language: *const TSLanguage, + state: TSStateId, + ) -> bool; +} +extern "C" { + #[doc = " Get the current language of the lookahead iterator."] + pub fn ts_lookahead_iterator_language(self_: *const TSLookaheadIterator) -> *const TSLanguage; +} +extern "C" { + #[doc = " Advance the lookahead iterator to the next symbol.\n\n This returns `true` if there is a new symbol and `false` otherwise."] + pub fn ts_lookahead_iterator_next(self_: *mut TSLookaheadIterator) -> bool; +} +extern "C" { + #[doc = " Get the current symbol of the lookahead iterator;"] + pub fn ts_lookahead_iterator_current_symbol(self_: *const TSLookaheadIterator) -> TSSymbol; +} +extern "C" { + #[doc = " Get the current symbol type of the lookahead iterator as a null terminated\n string."] + pub fn ts_lookahead_iterator_current_symbol_name( + self_: *const TSLookaheadIterator, + ) -> *const ::std::os::raw::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct wasm_engine_t { + _unused: [u8; 0], +} +pub type TSWasmEngine = wasm_engine_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct TSWasmStore { + _unused: [u8; 0], +} +pub const TSWasmErrorKindNone: TSWasmErrorKind = 0; +pub const TSWasmErrorKindParse: TSWasmErrorKind = 1; +pub const TSWasmErrorKindCompile: TSWasmErrorKind = 2; +pub const TSWasmErrorKindInstantiate: TSWasmErrorKind = 3; +pub const TSWasmErrorKindAllocate: TSWasmErrorKind = 4; +pub type TSWasmErrorKind = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct TSWasmError { + pub kind: TSWasmErrorKind, + pub message: *mut ::std::os::raw::c_char, +} +extern "C" { + #[doc = " Create a Wasm store."] + pub fn ts_wasm_store_new( + engine: *mut TSWasmEngine, + error: *mut TSWasmError, + ) -> *mut TSWasmStore; +} +extern "C" { + #[doc = " Free the memory associated with the given Wasm store."] + pub fn ts_wasm_store_delete(arg1: *mut TSWasmStore); +} +extern "C" { + #[doc = " Create a language from a buffer of Wasm. The resulting language behaves\n like any other Tree-sitter language, except that in order to use it with\n a parser, that parser must have a Wasm store. Note that the language\n can be used with any Wasm store, it doesn't need to be the same store that\n was used to originally load it."] + pub fn ts_wasm_store_load_language( + arg1: *mut TSWasmStore, + name: *const ::std::os::raw::c_char, + wasm: *const ::std::os::raw::c_char, + wasm_len: u32, + error: *mut TSWasmError, + ) -> *const TSLanguage; +} +extern "C" { + #[doc = " Get the number of languages instantiated in the given wasm store."] + pub fn ts_wasm_store_language_count(arg1: *const TSWasmStore) -> usize; +} +extern "C" { + #[doc = " Check if the language came from a Wasm module. If so, then in order to use\n this language with a Parser, that parser must have a Wasm store assigned."] + pub fn ts_language_is_wasm(arg1: *const TSLanguage) -> bool; +} +extern "C" { + #[doc = " Assign the given Wasm store to the parser. A parser must have a Wasm store\n in order to use Wasm languages."] + pub fn ts_parser_set_wasm_store(arg1: *mut TSParser, arg2: *mut TSWasmStore); +} +extern "C" { + #[doc = " Remove the parser's current Wasm store and return it. This returns NULL if\n the parser doesn't have a Wasm store."] + pub fn ts_parser_take_wasm_store(arg1: *mut TSParser) -> *mut TSWasmStore; +} +extern "C" { + #[doc = " Set the allocation functions used by the library.\n\n By default, Tree-sitter uses the standard libc allocation functions,\n but aborts the process when an allocation fails. This function lets\n you supply alternative allocation functions at runtime.\n\n If you pass `NULL` for any parameter, Tree-sitter will switch back to\n its default implementation of that function.\n\n If you call this function after the library has already been used, then\n you must ensure that either:\n 1. All the existing objects have been freed.\n 2. The new allocator shares its state with the old one, so it is capable\n of freeing memory that was allocated by the old allocator."] pub fn ts_set_allocator( new_malloc: ::std::option::Option< unsafe extern "C" fn(arg1: usize) -> *mut ::std::os::raw::c_void, @@ -894,6 +853,3 @@ extern "C" { new_free: ::std::option::Option, ); } - -pub const TREE_SITTER_LANGUAGE_VERSION: usize = 14; -pub const TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION: usize = 13; diff --git a/third-party/tree-sitter/tree-sitter/lib/binding_rust/build.rs b/third-party/tree-sitter/tree-sitter/lib/binding_rust/build.rs index 5798cde3fa..285448974f 100644 --- a/third-party/tree-sitter/tree-sitter/lib/binding_rust/build.rs +++ b/third-party/tree-sitter/tree-sitter/lib/binding_rust/build.rs @@ -2,6 +2,8 @@ use std::path::{Path, PathBuf}; use std::{env, fs}; fn main() { + let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()); + println!("cargo:rerun-if-env-changed=TREE_SITTER_STATIC_ANALYSIS"); if env::var("TREE_SITTER_STATIC_ANALYSIS").is_ok() { if let (Some(clang_path), Some(scan_build_path)) = (which("clang"), which("scan-build")) { @@ -9,28 +11,90 @@ fn main() { let scan_build_path = scan_build_path.to_str().unwrap(); env::set_var( "CC", - &format!( - "{} -analyze-headers --use-analyzer={} cc", - scan_build_path, clang_path - ), + format!("{scan_build_path} -analyze-headers --use-analyzer={clang_path} cc",), ); } } - let src_path = Path::new("src"); + #[cfg(feature = "bindgen")] + generate_bindings(&out_dir); + + fs::copy( + "src/wasm/stdlib-symbols.txt", + out_dir.join("stdlib-symbols.txt"), + ) + .unwrap(); + + let mut config = cc::Build::new(); + + println!("cargo:rerun-if-env-changed=CARGO_FEATURE_WASM"); + if env::var("CARGO_FEATURE_WASM").is_ok() { + config + .define("TREE_SITTER_FEATURE_WASM", "") + .define("static_assert(...)", "") + .include(env::var("DEP_WASMTIME_C_API_INCLUDE").unwrap()) + .include(env::var("DEP_WASMTIME_C_API_WASM_INCLUDE").unwrap()); + } + + let manifest_path = Path::new(env!("CARGO_MANIFEST_DIR")); + let include_path = manifest_path.join("include"); + let src_path = manifest_path.join("src"); + let wasm_path = src_path.join("wasm"); for entry in fs::read_dir(&src_path).unwrap() { let entry = entry.unwrap(); let path = src_path.join(entry.file_name()); println!("cargo:rerun-if-changed={}", path.to_str().unwrap()); } - cc::Build::new() - .flag_if_supported("-std=c99") + config + .flag_if_supported("-std=c11") + .flag_if_supported("-fvisibility=hidden") + .flag_if_supported("-Wshadow") .flag_if_supported("-Wno-unused-parameter") - .include(src_path) - .include("include") + .include(&src_path) + .include(&wasm_path) + .include(&include_path) .file(src_path.join("lib.c")) .compile("tree-sitter"); + + println!("cargo:include={}", include_path.display()); +} + +#[cfg(feature = "bindgen")] +fn generate_bindings(out_dir: &Path) { + const HEADER_PATH: &str = "include/tree_sitter/api.h"; + + println!("cargo:rerun-if-changed={HEADER_PATH}"); + + let no_copy = [ + "TSInput", + "TSLanguage", + "TSLogger", + "TSLookaheadIterator", + "TSParser", + "TSTree", + "TSQuery", + "TSQueryCursor", + "TSQueryCapture", + "TSQueryMatch", + "TSQueryPredicateStep", + ]; + + let bindings = bindgen::Builder::default() + .header(HEADER_PATH) + .layout_tests(false) + .allowlist_type("^TS.*") + .allowlist_function("^ts_.*") + .allowlist_var("^TREE_SITTER.*") + .no_copy(no_copy.join("|")) + .prepend_enum_name(false) + .generate() + .expect("Failed to generate bindings"); + + let bindings_rs = out_dir.join("bindings.rs"); + bindings + .write_to_file(&bindings_rs) + .unwrap_or_else(|_| panic!("Failed to write bindings into path: {bindings_rs:?}")); } fn which(exe_name: impl AsRef) -> Option { diff --git a/third-party/tree-sitter/tree-sitter/lib/binding_rust/ffi.rs b/third-party/tree-sitter/tree-sitter/lib/binding_rust/ffi.rs index 685ed76558..23b9e33fe8 100644 --- a/third-party/tree-sitter/tree-sitter/lib/binding_rust/ffi.rs +++ b/third-party/tree-sitter/tree-sitter/lib/binding_rust/ffi.rs @@ -2,8 +2,174 @@ #![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] +#[cfg(feature = "bindgen")] +include!(concat!(env!("OUT_DIR"), "/bindings.rs")); + +#[cfg(not(feature = "bindgen"))] include!("./bindings.rs"); +#[cfg(unix)] +extern "C" { + pub(crate) fn _ts_dup(fd: std::os::raw::c_int) -> std::os::raw::c_int; +} + +#[cfg(windows)] extern "C" { - pub(crate) fn dup(fd: std::os::raw::c_int) -> std::os::raw::c_int; + pub(crate) fn _ts_dup(handle: *mut std::os::raw::c_void) -> std::os::raw::c_int; +} + +use crate::{ + Language, LookaheadIterator, Node, Parser, Query, QueryCursor, QueryError, Tree, TreeCursor, +}; +use std::{marker::PhantomData, mem::ManuallyDrop, ptr::NonNull, str}; + +impl Language { + /// Reconstructs a [`Language`] from a raw pointer. + /// + /// # Safety + /// + /// `ptr` must be non-null. + #[must_use] + pub const unsafe fn from_raw(ptr: *const TSLanguage) -> Self { + Self(ptr) + } + + /// Consumes the [`Language`], returning a raw pointer to the underlying C structure. + #[must_use] + pub fn into_raw(self) -> *const TSLanguage { + ManuallyDrop::new(self).0 + } +} + +impl Parser { + /// Reconstructs a [`Parser`] from a raw pointer. + /// + /// # Safety + /// + /// `ptr` must be non-null. + #[must_use] + pub const unsafe fn from_raw(ptr: *mut TSParser) -> Self { + Self(NonNull::new_unchecked(ptr)) + } + + /// Consumes the [`Parser`], returning a raw pointer to the underlying C structure. + /// + /// # Safety + /// + /// It's a caller responsibility to adjust parser's state + /// like disable logging or dot graphs printing if this + /// may cause issues like use after free. + #[must_use] + pub fn into_raw(self) -> *mut TSParser { + ManuallyDrop::new(self).0.as_ptr() + } +} + +impl Tree { + /// Reconstructs a [`Tree`] from a raw pointer. + /// + /// # Safety + /// + /// `ptr` must be non-null. + #[must_use] + pub const unsafe fn from_raw(ptr: *mut TSTree) -> Self { + Self(NonNull::new_unchecked(ptr)) + } + + /// Consumes the [`Tree`], returning a raw pointer to the underlying C structure. + #[must_use] + pub fn into_raw(self) -> *mut TSTree { + ManuallyDrop::new(self).0.as_ptr() + } +} + +impl<'tree> Node<'tree> { + /// Reconstructs a [`Node`] from a raw pointer. + /// + /// # Safety + /// + /// `ptr` must be non-null. + #[must_use] + pub const unsafe fn from_raw(raw: TSNode) -> Node<'tree> { + Self(raw, PhantomData) + } + + /// Consumes the [`Node`], returning a raw pointer to the underlying C structure. + #[must_use] + pub fn into_raw(self) -> TSNode { + ManuallyDrop::new(self).0 + } +} + +impl<'a> TreeCursor<'a> { + /// Reconstructs a [`TreeCursor`] from a raw pointer. + /// + /// # Safety + /// + /// `ptr` must be non-null. + #[must_use] + pub const unsafe fn from_raw(raw: TSTreeCursor) -> TreeCursor<'a> { + Self(raw, PhantomData) + } + + /// Consumes the [`TreeCursor`], returning a raw pointer to the underlying C structure. + #[must_use] + pub fn into_raw(self) -> TSTreeCursor { + ManuallyDrop::new(self).0 + } +} + +impl Query { + /// Reconstructs a [`Query`] from a raw pointer. + /// + /// # Safety + /// + /// `ptr` must be non-null. + pub unsafe fn from_raw(ptr: *mut TSQuery, source: &str) -> Result { + Self::from_raw_parts(ptr, source) + } + + /// Consumes the [`Query`], returning a raw pointer to the underlying C structure. + #[must_use] + pub fn into_raw(self) -> *mut TSQuery { + ManuallyDrop::new(self).ptr.as_ptr() + } +} + +impl QueryCursor { + /// Reconstructs a [`QueryCursor`] from a raw pointer. + /// + /// # Safety + /// + /// `ptr` must be non-null. + #[must_use] + pub const unsafe fn from_raw(ptr: *mut TSQueryCursor) -> Self { + Self { + ptr: NonNull::new_unchecked(ptr), + } + } + + /// Consumes the [`QueryCursor`], returning a raw pointer to the underlying C structure. + #[must_use] + pub fn into_raw(self) -> *mut TSQueryCursor { + ManuallyDrop::new(self).ptr.as_ptr() + } +} + +impl LookaheadIterator { + /// Reconstructs a [`LookaheadIterator`] from a raw pointer. + /// + /// # Safety + /// + /// `ptr` must be non-null. + #[must_use] + pub const unsafe fn from_raw(ptr: *mut TSLookaheadIterator) -> Self { + Self(NonNull::new_unchecked(ptr)) + } + + /// Consumes the [`LookaheadIterator`], returning a raw pointer to the underlying C structure. + #[must_use] + pub fn into_raw(self) -> *mut TSLookaheadIterator { + ManuallyDrop::new(self).0.as_ptr() + } } diff --git a/third-party/tree-sitter/tree-sitter/lib/binding_rust/lib.rs b/third-party/tree-sitter/tree-sitter/lib/binding_rust/lib.rs index 579bf8e2ed..0ec9a8a013 100644 --- a/third-party/tree-sitter/tree-sitter/lib/binding_rust/lib.rs +++ b/third-party/tree-sitter/tree-sitter/lib/binding_rust/lib.rs @@ -1,8 +1,12 @@ -mod ffi; +#![doc = include_str!("./README.md")] + +pub mod ffi; mod util; #[cfg(unix)] use std::os::unix::io::AsRawFd; +#[cfg(windows)] +use std::os::windows::io::AsRawHandle; use std::{ char, error, @@ -10,7 +14,8 @@ use std::{ fmt, hash, iter, marker::PhantomData, mem::MaybeUninit, - ops, + num::NonZeroU16, + ops::{self, Deref}, os::raw::{c_char, c_void}, ptr::{self, NonNull}, slice, str, @@ -18,6 +23,11 @@ use std::{ u16, }; +#[cfg(feature = "wasm")] +mod wasm_language; +#[cfg(feature = "wasm")] +pub use wasm_language::*; + /// The latest ABI version that is supported by the current version of the /// library. /// @@ -26,22 +36,26 @@ use std::{ /// The Tree-sitter library is generally backwards-compatible with languages /// generated using older CLI versions, but is not forwards-compatible. #[doc(alias = "TREE_SITTER_LANGUAGE_VERSION")] -pub const LANGUAGE_VERSION: usize = ffi::TREE_SITTER_LANGUAGE_VERSION; +pub const LANGUAGE_VERSION: usize = ffi::TREE_SITTER_LANGUAGE_VERSION as usize; /// The earliest ABI version that is supported by the current version of the /// library. #[doc(alias = "TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION")] -pub const MIN_COMPATIBLE_LANGUAGE_VERSION: usize = ffi::TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION; +pub const MIN_COMPATIBLE_LANGUAGE_VERSION: usize = + ffi::TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION as usize; -pub const PARSER_HEADER: &'static str = include_str!("../include/tree_sitter/parser.h"); +pub const ARRAY_HEADER: &str = include_str!("../src/array.h"); +pub const PARSER_HEADER: &str = include_str!("../src/parser.h"); /// An opaque object that defines how to parse a particular language. The code for each /// `Language` is generated by the Tree-sitter CLI. #[doc(alias = "TSLanguage")] -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +#[derive(Debug, PartialEq, Eq, Hash)] #[repr(transparent)] pub struct Language(*const ffi::TSLanguage); +pub struct LanguageRef<'a>(*const ffi::TSLanguage, PhantomData<&'a ()>); + /// A tree that represents the syntactic structure of a source code file. #[doc(alias = "TSTree")] pub struct Tree(NonNull); @@ -57,7 +71,7 @@ pub struct Point { /// A range of positions in a multi-line text document, both in terms of bytes and of /// rows and columns. -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] pub struct Range { pub start_byte: usize, pub end_byte: usize, @@ -76,16 +90,21 @@ pub struct InputEdit { pub new_end_position: Point, } -/// A single node within a syntax `Tree`. +/// A single node within a syntax [`Tree`]. #[doc(alias = "TSNode")] #[derive(Clone, Copy)] #[repr(transparent)] -pub struct Node<'a>(ffi::TSNode, PhantomData<&'a ()>); +pub struct Node<'tree>(ffi::TSNode, PhantomData<&'tree ()>); -/// A stateful object that this is used to produce a `Tree` based on some source code. +/// A stateful object that this is used to produce a [`Tree`] based on some source code. #[doc(alias = "TSParser")] pub struct Parser(NonNull); +/// A stateful object that is used to look up symbols valid in a specific parse state +#[doc(alias = "TSLookaheadIterator")] +pub struct LookaheadIterator(NonNull); +struct LookaheadNamesIterator<'a>(&'a mut LookaheadIterator); + /// A type of log message. #[derive(Debug, PartialEq, Eq)] pub enum LogType { @@ -93,24 +112,27 @@ pub enum LogType { Lex, } +type FieldId = NonZeroU16; + /// A callback that receives log messages during parser. type Logger<'a> = Box; -/// A stateful object for walking a syntax `Tree` efficiently. +/// A stateful object for walking a syntax [`Tree`] efficiently. #[doc(alias = "TSTreeCursor")] -pub struct TreeCursor<'a>(ffi::TSTreeCursor, PhantomData<&'a ()>); +pub struct TreeCursor<'cursor>(ffi::TSTreeCursor, PhantomData<&'cursor ()>); /// A set of patterns that match nodes in a syntax tree. #[doc(alias = "TSQuery")] #[derive(Debug)] +#[allow(clippy::type_complexity)] pub struct Query { ptr: NonNull, - capture_names: Vec, - capture_quantifiers: Vec>, - text_predicates: Vec>, - property_settings: Vec>, - property_predicates: Vec>, - general_predicates: Vec>, + capture_names: Box<[&'static str]>, + capture_quantifiers: Box<[Box<[CaptureQuantifier]>]>, + text_predicates: Box<[Box<[TextPredicateCapture]>]>, + property_settings: Box<[Box<[QueryProperty]>]>, + property_predicates: Box<[Box<[(QueryProperty, bool)]>]>, + general_predicates: Box<[Box<[QueryPredicate]>]>, } /// A quantifier for captures @@ -126,23 +148,23 @@ pub enum CaptureQuantifier { impl From for CaptureQuantifier { fn from(value: ffi::TSQuantifier) -> Self { match value { - ffi::TSQuantifier_TSQuantifierZero => CaptureQuantifier::Zero, - ffi::TSQuantifier_TSQuantifierZeroOrOne => CaptureQuantifier::ZeroOrOne, - ffi::TSQuantifier_TSQuantifierZeroOrMore => CaptureQuantifier::ZeroOrMore, - ffi::TSQuantifier_TSQuantifierOne => CaptureQuantifier::One, - ffi::TSQuantifier_TSQuantifierOneOrMore => CaptureQuantifier::OneOrMore, - _ => panic!("Unrecognized quantifier: {}", value), + ffi::TSQuantifierZero => Self::Zero, + ffi::TSQuantifierZeroOrOne => Self::ZeroOrOne, + ffi::TSQuantifierZeroOrMore => Self::ZeroOrMore, + ffi::TSQuantifierOne => Self::One, + ffi::TSQuantifierOneOrMore => Self::OneOrMore, + _ => panic!("Unrecognized quantifier: {value}"), } } } -/// A stateful object for executing a `Query` on a syntax `Tree`. +/// A stateful object for executing a [`Query`] on a syntax [`Tree`]. #[doc(alias = "TSQueryCursor")] pub struct QueryCursor { ptr: NonNull, } -/// A key-value pair associated with a particular pattern in a `Query`. +/// A key-value pair associated with a particular pattern in a [`Query`]. #[derive(Debug, PartialEq, Eq)] pub struct QueryProperty { pub key: Box, @@ -156,14 +178,14 @@ pub enum QueryPredicateArg { String(Box), } -/// A key-value pair associated with a particular pattern in a `Query`. +/// A key-value pair associated with a particular pattern in a [`Query`]. #[derive(Debug, PartialEq, Eq)] pub struct QueryPredicate { pub operator: Box, - pub args: Vec, + pub args: Box<[QueryPredicateArg]>, } -/// A match of a `Query` to a particular set of `Node`s. +/// A match of a [`Query`] to a particular set of [`Node`]s. pub struct QueryMatch<'cursor, 'tree> { pub pattern_index: usize, pub captures: &'cursor [QueryCapture<'tree>], @@ -171,50 +193,53 @@ pub struct QueryMatch<'cursor, 'tree> { cursor: *mut ffi::TSQueryCursor, } -/// A sequence of `QueryMatch`es associated with a given `QueryCursor`. -pub struct QueryMatches<'a, 'tree: 'a, T: TextProvider<'a>> { +/// A sequence of [`QueryMatch`]es associated with a given [`QueryCursor`]. +pub struct QueryMatches<'query, 'cursor, T: TextProvider, I: AsRef<[u8]>> { ptr: *mut ffi::TSQueryCursor, - query: &'a Query, + query: &'query Query, text_provider: T, buffer1: Vec, buffer2: Vec, - _tree: PhantomData<&'tree ()>, + _phantom: PhantomData<(&'cursor (), I)>, } -/// A sequence of `QueryCapture`s associated with a given `QueryCursor`. -pub struct QueryCaptures<'a, 'tree: 'a, T: TextProvider<'a>> { +/// A sequence of [`QueryCapture`]s associated with a given [`QueryCursor`]. +pub struct QueryCaptures<'query, 'cursor, T: TextProvider, I: AsRef<[u8]>> { ptr: *mut ffi::TSQueryCursor, - query: &'a Query, + query: &'query Query, text_provider: T, buffer1: Vec, buffer2: Vec, - _tree: PhantomData<&'tree ()>, + _phantom: PhantomData<(&'cursor (), I)>, } -pub trait TextProvider<'a> { - type I: Iterator + 'a; +pub trait TextProvider +where + I: AsRef<[u8]>, +{ + type I: Iterator; fn text(&mut self, node: Node) -> Self::I; } -/// A particular `Node` that has been captured with a particular name within a `Query`. +/// A particular [`Node`] that has been captured with a particular name within a [`Query`]. #[derive(Clone, Copy, Debug)] #[repr(C)] -pub struct QueryCapture<'a> { - pub node: Node<'a>, +pub struct QueryCapture<'tree> { + pub node: Node<'tree>, pub index: u32, } -/// An error that occurred when trying to assign an incompatible `Language` to a `Parser`. +/// An error that occurred when trying to assign an incompatible [`Language`] to a [`Parser`]. #[derive(Debug, PartialEq, Eq)] pub struct LanguageError { version: usize, } -/// An error that occurred in `Parser::set_included_ranges`. +/// An error that occurred in [`Parser::set_included_ranges`]. #[derive(Debug, PartialEq, Eq)] pub struct IncludedRangesError(pub usize); -/// An error that occurred when trying to create a `Query`. +/// An error that occurred when trying to create a [`Query`]. #[derive(Debug, PartialEq, Eq)] pub struct QueryError { pub row: usize, @@ -236,10 +261,16 @@ pub enum QueryErrorKind { } #[derive(Debug)] -enum TextPredicate { - CaptureEqString(u32, String, bool), - CaptureEqCapture(u32, u32, bool), - CaptureMatchString(u32, regex::bytes::Regex, bool), +/// The first item is the capture index +/// The next is capture specific, depending on what item is expected +/// The first bool is if the capture is positive +/// The last item is a bool signifying whether or not it's meant to match +/// any or all captures +enum TextPredicateCapture { + EqString(u32, Box, bool, bool), + EqCapture(u32, u32, bool, bool), + MatchString(u32, regex::bytes::Regex, bool, bool), + AnyString(u32, Box<[Box]>, bool), } // TODO: Remove this struct at at some point. If `core::str::lossy::Utf8Lossy` @@ -251,36 +282,43 @@ pub struct LossyUtf8<'a> { impl Language { /// Get the ABI version number that indicates which version of the Tree-sitter CLI - /// that was used to generate this `Language`. + /// that was used to generate this [`Language`]. #[doc(alias = "ts_language_version")] + #[must_use] pub fn version(&self) -> usize { unsafe { ffi::ts_language_version(self.0) as usize } } /// Get the number of distinct node types in this language. #[doc(alias = "ts_language_symbol_count")] + #[must_use] pub fn node_kind_count(&self) -> usize { unsafe { ffi::ts_language_symbol_count(self.0) as usize } } + /// Get the number of valid states in this language. + #[doc(alias = "ts_language_state_count")] + #[must_use] + pub fn parse_state_count(&self) -> usize { + unsafe { ffi::ts_language_state_count(self.0) as usize } + } + /// Get the name of the node kind for the given numerical id. #[doc(alias = "ts_language_symbol_name")] + #[must_use] pub fn node_kind_for_id(&self, id: u16) -> Option<&'static str> { let ptr = unsafe { ffi::ts_language_symbol_name(self.0, id) }; - if ptr.is_null() { - None - } else { - Some(unsafe { CStr::from_ptr(ptr) }.to_str().unwrap()) - } + (!ptr.is_null()).then(|| unsafe { CStr::from_ptr(ptr) }.to_str().unwrap()) } /// Get the numeric id for the given node kind. #[doc(alias = "ts_language_symbol_for_name")] + #[must_use] pub fn id_for_node_kind(&self, kind: &str, named: bool) -> u16 { unsafe { ffi::ts_language_symbol_for_name( self.0, - kind.as_bytes().as_ptr() as *const c_char, + kind.as_bytes().as_ptr().cast::(), kind.len() as u32, named, ) @@ -289,59 +327,115 @@ impl Language { /// Check if the node type for the given numerical id is named (as opposed /// to an anonymous node type). + #[must_use] pub fn node_kind_is_named(&self, id: u16) -> bool { - unsafe { ffi::ts_language_symbol_type(self.0, id) == ffi::TSSymbolType_TSSymbolTypeRegular } + unsafe { ffi::ts_language_symbol_type(self.0, id) == ffi::TSSymbolTypeRegular } } #[doc(alias = "ts_language_symbol_type")] + #[must_use] pub fn node_kind_is_visible(&self, id: u16) -> bool { - unsafe { - ffi::ts_language_symbol_type(self.0, id) <= ffi::TSSymbolType_TSSymbolTypeAnonymous - } + unsafe { ffi::ts_language_symbol_type(self.0, id) <= ffi::TSSymbolTypeAnonymous } } /// Get the number of distinct field names in this language. #[doc(alias = "ts_language_field_count")] + #[must_use] pub fn field_count(&self) -> usize { unsafe { ffi::ts_language_field_count(self.0) as usize } } /// Get the field names for the given numerical id. #[doc(alias = "ts_language_field_name_for_id")] + #[must_use] pub fn field_name_for_id(&self, field_id: u16) -> Option<&'static str> { let ptr = unsafe { ffi::ts_language_field_name_for_id(self.0, field_id) }; - if ptr.is_null() { - None - } else { - Some(unsafe { CStr::from_ptr(ptr) }.to_str().unwrap()) - } + (!ptr.is_null()).then(|| unsafe { CStr::from_ptr(ptr) }.to_str().unwrap()) } /// Get the numerical id for the given field name. #[doc(alias = "ts_language_field_id_for_name")] - pub fn field_id_for_name(&self, field_name: impl AsRef<[u8]>) -> Option { + #[must_use] + pub fn field_id_for_name(&self, field_name: impl AsRef<[u8]>) -> Option { let field_name = field_name.as_ref(); let id = unsafe { ffi::ts_language_field_id_for_name( self.0, - field_name.as_ptr() as *const c_char, + field_name.as_ptr().cast::(), field_name.len() as u32, ) }; - if id == 0 { - None - } else { - Some(id) - } + FieldId::new(id) + } + + /// Get the next parse state. Combine this with + /// [`lookahead_iterator`](Language::lookahead_iterator) to + /// generate completion suggestions or valid symbols in error nodes. + /// + /// Example: + /// ``` + /// let state = language.next_state(node.parse_state(), node.grammar_id()); + /// ``` + #[doc(alias = "ts_language_next_state")] + #[must_use] + pub fn next_state(&self, state: u16, id: u16) -> u16 { + unsafe { ffi::ts_language_next_state(self.0, state, id) } + } + + /// Create a new lookahead iterator for this language and parse state. + /// + /// This returns `None` if state is invalid for this language. + /// + /// Iterating [`LookaheadIterator`] will yield valid symbols in the given + /// parse state. Newly created lookahead iterators will return the `ERROR` + /// symbol from [`LookaheadIterator::current_symbol`]. + /// + /// Lookahead iterators can be useful to generate suggestions and improve + /// syntax error diagnostics. To get symbols valid in an ERROR node, use the + /// lookahead iterator on its first leaf node state. For `MISSING` nodes, a + /// lookahead iterator created on the previous non-extra leaf node may be + /// appropriate. + #[doc(alias = "ts_lookahead_iterator_new")] + #[must_use] + pub fn lookahead_iterator(&self, state: u16) -> Option { + let ptr = unsafe { ffi::ts_lookahead_iterator_new(self.0, state) }; + (!ptr.is_null()).then(|| unsafe { LookaheadIterator::from_raw(ptr) }) + } +} + +impl Clone for Language { + fn clone(&self) -> Self { + unsafe { Self(ffi::ts_language_copy(self.0)) } + } +} + +impl Drop for Language { + fn drop(&mut self) { + unsafe { ffi::ts_language_delete(self.0) } + } +} + +impl<'a> Deref for LanguageRef<'a> { + type Target = Language; + + fn deref(&self) -> &Self::Target { + unsafe { &*(std::ptr::addr_of!(self.0).cast::()) } + } +} + +impl Default for Parser { + fn default() -> Self { + Self::new() } } impl Parser { /// Create a new parser. - pub fn new() -> Parser { + #[must_use] + pub fn new() -> Self { unsafe { let parser = ffi::ts_parser_new(); - Parser(NonNull::new_unchecked(parser)) + Self(NonNull::new_unchecked(parser)) } } @@ -350,38 +444,36 @@ impl Parser { /// Returns a Result indicating whether or not the language was successfully /// assigned. True means assignment succeeded. False means there was a version /// mismatch: the language was generated with an incompatible version of the - /// Tree-sitter CLI. Check the language's version using [Language::version] - /// and compare it to this library's [LANGUAGE_VERSION](LANGUAGE_VERSION) and - /// [MIN_COMPATIBLE_LANGUAGE_VERSION](MIN_COMPATIBLE_LANGUAGE_VERSION) constants. + /// Tree-sitter CLI. Check the language's version using [`Language::version`] + /// and compare it to this library's [`LANGUAGE_VERSION`](LANGUAGE_VERSION) and + /// [`MIN_COMPATIBLE_LANGUAGE_VERSION`](MIN_COMPATIBLE_LANGUAGE_VERSION) constants. #[doc(alias = "ts_parser_set_language")] - pub fn set_language(&mut self, language: Language) -> Result<(), LanguageError> { + pub fn set_language(&mut self, language: &Language) -> Result<(), LanguageError> { let version = language.version(); - if version < MIN_COMPATIBLE_LANGUAGE_VERSION || version > LANGUAGE_VERSION { - Err(LanguageError { version }) - } else { + if (MIN_COMPATIBLE_LANGUAGE_VERSION..=LANGUAGE_VERSION).contains(&version) { unsafe { ffi::ts_parser_set_language(self.0.as_ptr(), language.0); } Ok(()) + } else { + Err(LanguageError { version }) } } /// Get the parser's current language. #[doc(alias = "ts_parser_language")] + #[must_use] pub fn language(&self) -> Option { let ptr = unsafe { ffi::ts_parser_language(self.0.as_ptr()) }; - if ptr.is_null() { - None - } else { - Some(Language(ptr)) - } + (!ptr.is_null()).then(|| Language(ptr)) } /// Get the parser's current logger. #[doc(alias = "ts_parser_logger")] + #[must_use] pub fn logger(&self) -> Option<&Logger> { let logger = unsafe { ffi::ts_parser_logger(self.0.as_ptr()) }; - unsafe { (logger.payload as *mut Logger).as_ref() } + unsafe { logger.payload.cast::().as_ref() } } /// Set the logging callback that a parser should use during parsing. @@ -389,7 +481,7 @@ impl Parser { pub fn set_logger(&mut self, logger: Option) { let prev_logger = unsafe { ffi::ts_parser_logger(self.0.as_ptr()) }; if !prev_logger.payload.is_null() { - drop(unsafe { Box::from_raw(prev_logger.payload as *mut Logger) }); + drop(unsafe { Box::from_raw(prev_logger.payload.cast::()) }); } let c_logger; @@ -401,9 +493,9 @@ impl Parser { c_log_type: ffi::TSLogType, c_message: *const c_char, ) { - let callback = (payload as *mut Logger).as_mut().unwrap(); + let callback = payload.cast::().as_mut().unwrap(); if let Ok(message) = CStr::from_ptr(c_message).to_str() { - let log_type = if c_log_type == ffi::TSLogType_TSLogTypeParse { + let log_type = if c_log_type == ffi::TSLogTypeParse { LogType::Parse } else { LogType::Lex @@ -415,7 +507,7 @@ impl Parser { let raw_container = Box::into_raw(container); c_logger = ffi::TSLogger { - payload: raw_container as *mut c_void, + payload: raw_container.cast::(), log: Some(log), }; } else { @@ -432,11 +524,27 @@ impl Parser { /// during parsing. The graphs are formatted in the DOT language. You may want /// to pipe these graphs directly to a `dot(1)` process in order to generate /// SVG output. - #[cfg(unix)] #[doc(alias = "ts_parser_print_dot_graphs")] - pub fn print_dot_graphs(&mut self, file: &impl AsRawFd) { - let fd = file.as_raw_fd(); - unsafe { ffi::ts_parser_print_dot_graphs(self.0.as_ptr(), ffi::dup(fd)) } + pub fn print_dot_graphs( + &mut self, + #[cfg(not(windows))] file: &impl AsRawFd, + #[cfg(windows)] file: &impl AsRawHandle, + ) { + #[cfg(not(windows))] + { + let fd = file.as_raw_fd(); + unsafe { + ffi::ts_parser_print_dot_graphs(self.0.as_ptr(), ffi::_ts_dup(fd)); + } + } + + #[cfg(windows)] + { + let handle = file.as_raw_handle(); + unsafe { + ffi::ts_parser_print_dot_graphs(self.0.as_ptr(), ffi::_ts_dup(handle)); + } + } } /// Stop the parser from printing debugging graphs while parsing. @@ -452,18 +560,18 @@ impl Parser { /// * `old_tree` A previous syntax tree parsed from the same document. /// If the text of the document has changed since `old_tree` was /// created, then you must edit `old_tree` to match the new text using - /// [Tree::edit]. + /// [`Tree::edit`]. /// - /// Returns a [Tree] if parsing succeeded, or `None` if: - /// * The parser has not yet had a language assigned with [Parser::set_language] - /// * The timeout set with [Parser::set_timeout_micros] expired - /// * The cancellation flag set with [Parser::set_cancellation_flag] was flipped + /// Returns a [`Tree`] if parsing succeeded, or `None` if: + /// * The parser has not yet had a language assigned with [`Parser::set_language`] + /// * The timeout set with [`Parser::set_timeout_micros`] expired + /// * The cancellation flag set with [`Parser::set_cancellation_flag`] was flipped #[doc(alias = "ts_parser_parse")] pub fn parse(&mut self, text: impl AsRef<[u8]>, old_tree: Option<&Tree>) -> Option { let bytes = text.as_ref(); let len = bytes.len(); self.parse_with( - &mut |i, _| if i < len { &bytes[i..] } else { &[] }, + &mut |i, _| (i < len).then(|| &bytes[i..]).unwrap_or_default(), old_tree, ) } @@ -475,7 +583,7 @@ impl Parser { /// * `old_tree` A previous syntax tree parsed from the same document. /// If the text of the document has changed since `old_tree` was /// created, then you must edit `old_tree` to match the new text using - /// [Tree::edit]. + /// [`Tree::edit`]. pub fn parse_utf16( &mut self, input: impl AsRef<[u16]>, @@ -484,7 +592,7 @@ impl Parser { let code_points = input.as_ref(); let len = code_points.len(); self.parse_utf16_with( - &mut |i, _| if i < len { &code_points[i..] } else { &[] }, + &mut |i, _| (i < len).then(|| &code_points[i..]).unwrap_or_default(), old_tree, ) } @@ -499,8 +607,8 @@ impl Parser { /// * `old_tree` A previous syntax tree parsed from the same document. /// If the text of the document has changed since `old_tree` was /// created, then you must edit `old_tree` to match the new text using - /// [Tree::edit]. - pub fn parse_with<'a, T: AsRef<[u8]>, F: FnMut(usize, Point) -> T>( + /// [`Tree::edit`]. + pub fn parse_with, F: FnMut(usize, Point) -> T>( &mut self, callback: &mut F, old_tree: Option<&Tree>, @@ -513,23 +621,23 @@ impl Parser { let mut payload: (&mut F, Option) = (callback, None); // This C function is passed to Tree-sitter as the input callback. - unsafe extern "C" fn read<'a, T: AsRef<[u8]>, F: FnMut(usize, Point) -> T>( + unsafe extern "C" fn read, F: FnMut(usize, Point) -> T>( payload: *mut c_void, byte_offset: u32, position: ffi::TSPoint, bytes_read: *mut u32, ) -> *const c_char { - let (callback, text) = (payload as *mut (&mut F, Option)).as_mut().unwrap(); + let (callback, text) = payload.cast::<(&mut F, Option)>().as_mut().unwrap(); *text = Some(callback(byte_offset as usize, position.into())); let slice = text.as_ref().unwrap().as_ref(); *bytes_read = slice.len() as u32; - return slice.as_ptr() as *const c_char; + slice.as_ptr().cast::() } let c_input = ffi::TSInput { - payload: &mut payload as *mut (&mut F, Option) as *mut c_void, + payload: std::ptr::addr_of_mut!(payload).cast::(), read: Some(read::), - encoding: ffi::TSInputEncoding_TSInputEncodingUTF8, + encoding: ffi::TSInputEncodingUTF8, }; let c_old_tree = old_tree.map_or(ptr::null_mut(), |t| t.0.as_ptr()); @@ -549,8 +657,8 @@ impl Parser { /// * `old_tree` A previous syntax tree parsed from the same document. /// If the text of the document has changed since `old_tree` was /// created, then you must edit `old_tree` to match the new text using - /// [Tree::edit]. - pub fn parse_utf16_with<'a, T: AsRef<[u16]>, F: FnMut(usize, Point) -> T>( + /// [`Tree::edit`]. + pub fn parse_utf16_with, F: FnMut(usize, Point) -> T>( &mut self, callback: &mut F, old_tree: Option<&Tree>, @@ -563,13 +671,13 @@ impl Parser { let mut payload: (&mut F, Option) = (callback, None); // This C function is passed to Tree-sitter as the input callback. - unsafe extern "C" fn read<'a, T: AsRef<[u16]>, F: FnMut(usize, Point) -> T>( + unsafe extern "C" fn read, F: FnMut(usize, Point) -> T>( payload: *mut c_void, byte_offset: u32, position: ffi::TSPoint, bytes_read: *mut u32, ) -> *const c_char { - let (callback, text) = (payload as *mut (&mut F, Option)).as_mut().unwrap(); + let (callback, text) = payload.cast::<(&mut F, Option)>().as_mut().unwrap(); *text = Some(callback( (byte_offset / 2) as usize, Point { @@ -579,13 +687,13 @@ impl Parser { )); let slice = text.as_ref().unwrap().as_ref(); *bytes_read = slice.len() as u32 * 2; - slice.as_ptr() as *const c_char + slice.as_ptr().cast::() } let c_input = ffi::TSInput { - payload: &mut payload as *mut (&mut F, Option) as *mut c_void, + payload: std::ptr::addr_of_mut!(payload).cast::(), read: Some(read::), - encoding: ffi::TSInputEncoding_TSInputEncodingUTF16, + encoding: ffi::TSInputEncodingUTF16, }; let c_old_tree = old_tree.map_or(ptr::null_mut(), |t| t.0.as_ptr()); @@ -597,10 +705,10 @@ impl Parser { /// Instruct the parser to start the next parse from the beginning. /// - /// If the parser previously failed because of a timeout or a cancellation, then - /// by default, it will resume where it left off on the next call to `parse` or - /// other parsing functions. If you don't want to resume, and instead intend to - /// use this parser to parse some other document, you must call `reset` first. + /// If the parser previously failed because of a timeout or a cancellation, then by default, it + /// will resume where it left off on the next call to [`parse`](Parser::parse) or other parsing + /// functions. If you don't want to resume, and instead intend to use this parser to parse some + /// other document, you must call `reset` first. #[doc(alias = "ts_parser_reset")] pub fn reset(&mut self) { unsafe { ffi::ts_parser_reset(self.0.as_ptr()) } @@ -608,8 +716,9 @@ impl Parser { /// Get the duration in microseconds that parsing is allowed to take. /// - /// This is set via [set_timeout_micros](Parser::set_timeout_micros). + /// This is set via [`set_timeout_micros`](Parser::set_timeout_micros). #[doc(alias = "ts_parser_timeout_micros")] + #[must_use] pub fn timeout_micros(&self) -> u64 { unsafe { ffi::ts_parser_timeout_micros(self.0.as_ptr()) } } @@ -618,7 +727,7 @@ impl Parser { /// take before halting. /// /// If parsing takes longer than this, it will halt early, returning `None`. - /// See `parse` for more information. + /// See [`parse`](Parser::parse) for more information. #[doc(alias = "ts_parser_set_timeout_micros")] pub fn set_timeout_micros(&mut self, timeout_micros: u64) { unsafe { ffi::ts_parser_set_timeout_micros(self.0.as_ptr(), timeout_micros) } @@ -638,15 +747,15 @@ impl Parser { /// ```text /// ranges[i].end_byte <= ranges[i + 1].start_byte /// ``` - /// If this requirement is not satisfied, method will return IncludedRangesError + /// If this requirement is not satisfied, method will return [`IncludedRangesError`] /// error with an offset in the passed ranges slice pointing to a first incorrect range. #[doc(alias = "ts_parser_set_included_ranges")] - pub fn set_included_ranges<'a>( - &mut self, - ranges: &'a [Range], - ) -> Result<(), IncludedRangesError> { - let ts_ranges: Vec = - ranges.iter().cloned().map(|range| range.into()).collect(); + pub fn set_included_ranges(&mut self, ranges: &[Range]) -> Result<(), IncludedRangesError> { + let ts_ranges = ranges + .iter() + .copied() + .map(std::convert::Into::into) + .collect::>(); let result = unsafe { ffi::ts_parser_set_included_ranges( self.0.as_ptr(), @@ -670,22 +779,33 @@ impl Parser { } /// Get the parser's current cancellation flag pointer. + /// + /// # Safety + /// + /// It uses FFI #[doc(alias = "ts_parser_cancellation_flag")] + #[must_use] pub unsafe fn cancellation_flag(&self) -> Option<&AtomicUsize> { - (ffi::ts_parser_cancellation_flag(self.0.as_ptr()) as *const AtomicUsize).as_ref() + ffi::ts_parser_cancellation_flag(self.0.as_ptr()) + .cast::() + .as_ref() } /// Set the parser's current cancellation flag pointer. /// /// If a pointer is assigned, then the parser will periodically read from /// this pointer during parsing. If it reads a non-zero value, it will halt early, - /// returning `None`. See [parse](Parser::parse) for more information. + /// returning `None`. See [`parse`](Parser::parse) for more information. + /// + /// # Safety + /// + /// It uses FFI #[doc(alias = "ts_parser_set_cancellation_flag")] pub unsafe fn set_cancellation_flag(&mut self, flag: Option<&AtomicUsize>) { if let Some(flag) = flag { ffi::ts_parser_set_cancellation_flag( self.0.as_ptr(), - flag as *const AtomicUsize as *const usize, + (flag as *const AtomicUsize).cast::(), ); } else { ffi::ts_parser_set_cancellation_flag(self.0.as_ptr(), ptr::null()); @@ -704,6 +824,7 @@ impl Drop for Parser { impl Tree { /// Get the root node of the syntax tree. #[doc(alias = "ts_tree_root_node")] + #[must_use] pub fn root_node(&self) -> Node { Node::new(unsafe { ffi::ts_tree_root_node(self.0.as_ptr()) }).unwrap() } @@ -711,6 +832,7 @@ impl Tree { /// Get the root node of the syntax tree, but with its position shifted /// forward by the given offset. #[doc(alias = "ts_tree_root_node_with_offset")] + #[must_use] pub fn root_node_with_offset(&self, offset_bytes: usize, offset_extent: Point) -> Node { Node::new(unsafe { ffi::ts_tree_root_node_with_offset( @@ -724,8 +846,12 @@ impl Tree { /// Get the language that was used to parse the syntax tree. #[doc(alias = "ts_tree_language")] - pub fn language(&self) -> Language { - Language(unsafe { ffi::ts_tree_language(self.0.as_ptr()) }) + #[must_use] + pub fn language(&self) -> LanguageRef { + LanguageRef( + unsafe { ffi::ts_tree_language(self.0.as_ptr()) }, + PhantomData, + ) } /// Edit the syntax tree to keep it in sync with source code that has been @@ -739,7 +865,8 @@ impl Tree { unsafe { ffi::ts_tree_edit(self.0.as_ptr(), &edit) }; } - /// Create a new [TreeCursor] starting from the root of the tree. + /// Create a new [`TreeCursor`] starting from the root of the tree. + #[must_use] pub fn walk(&self) -> TreeCursor { self.root_node().walk() } @@ -749,29 +876,35 @@ impl Tree { /// /// For this to work correctly, this syntax tree must have been edited such that its /// ranges match up to the new tree. Generally, you'll want to call this method right - /// after calling one of the [Parser::parse] functions. Call it on the old tree that + /// after calling one of the [`Parser::parse`] functions. Call it on the old tree that /// was passed to parse, and pass the new tree that was returned from `parse`. #[doc(alias = "ts_tree_get_changed_ranges")] - pub fn changed_ranges(&self, other: &Tree) -> impl ExactSizeIterator { + #[must_use] + pub fn changed_ranges(&self, other: &Self) -> impl ExactSizeIterator { let mut count = 0u32; unsafe { let ptr = ffi::ts_tree_get_changed_ranges( self.0.as_ptr(), other.0.as_ptr(), - &mut count as *mut u32, + std::ptr::addr_of_mut!(count), ); - util::CBufferIter::new(ptr, count as usize).map(|r| r.into()) + util::CBufferIter::new(ptr, count as usize).map(std::convert::Into::into) } } /// Get the included ranges that were used to parse the syntax tree. + #[must_use] pub fn included_ranges(&self) -> Vec { let mut count = 0u32; unsafe { - let ptr = ffi::ts_tree_included_ranges(self.0.as_ptr(), &mut count as *mut u32); + let ptr = ffi::ts_tree_included_ranges(self.0.as_ptr(), std::ptr::addr_of_mut!(count)); let ranges = slice::from_raw_parts(ptr, count as usize); - let result = ranges.iter().copied().map(|range| range.into()).collect(); - (FREE_FN)(ptr as *mut c_void); + let result = ranges + .iter() + .copied() + .map(std::convert::Into::into) + .collect(); + (FREE_FN)(ptr.cast::()); result } } @@ -779,11 +912,23 @@ impl Tree { /// Print a graph of the tree to the given file descriptor. /// The graph is formatted in the DOT language. You may want to pipe this graph /// directly to a `dot(1)` process in order to generate SVG output. - #[cfg(unix)] #[doc(alias = "ts_tree_print_dot_graph")] - pub fn print_dot_graph(&self, file: &impl AsRawFd) { - let fd = file.as_raw_fd(); - unsafe { ffi::ts_tree_print_dot_graph(self.0.as_ptr(), fd) } + pub fn print_dot_graph( + &self, + #[cfg(unix)] file: &impl AsRawFd, + #[cfg(windows)] file: &impl AsRawHandle, + ) { + #[cfg(unix)] + { + let fd = file.as_raw_fd(); + unsafe { ffi::ts_tree_print_dot_graph(self.0.as_ptr(), fd) } + } + + #[cfg(windows)] + { + let handle = file.as_raw_handle(); + unsafe { ffi::ts_tree_print_dot_graph(self.0.as_ptr(), handle as i32) } + } } } @@ -800,18 +945,14 @@ impl Drop for Tree { } impl Clone for Tree { - fn clone(&self) -> Tree { - unsafe { Tree(NonNull::new_unchecked(ffi::ts_tree_copy(self.0.as_ptr()))) } + fn clone(&self) -> Self { + unsafe { Self(NonNull::new_unchecked(ffi::ts_tree_copy(self.0.as_ptr()))) } } } impl<'tree> Node<'tree> { fn new(node: ffi::TSNode) -> Option { - if node.id.is_null() { - None - } else { - Some(Node(node, PhantomData)) - } + (!node.id.is_null()).then_some(Node(node, PhantomData)) } /// Get a numeric id for this node that is unique. @@ -820,28 +961,50 @@ impl<'tree> Node<'tree> { /// a new tree is created based on an older tree, and a node from the old /// tree is reused in the process, then that node will have the same id in /// both trees. + #[must_use] pub fn id(&self) -> usize { self.0.id as usize } /// Get this node's type as a numerical id. #[doc(alias = "ts_node_symbol")] + #[must_use] pub fn kind_id(&self) -> u16 { unsafe { ffi::ts_node_symbol(self.0) } } + /// Get the node's type as a numerical id as it appears in the grammar + /// ignoring aliases. + #[doc(alias = "ts_node_grammar_symbol")] + #[must_use] + pub fn grammar_id(&self) -> u16 { + unsafe { ffi::ts_node_grammar_symbol(self.0) } + } + /// Get this node's type as a string. #[doc(alias = "ts_node_type")] + #[must_use] pub fn kind(&self) -> &'static str { unsafe { CStr::from_ptr(ffi::ts_node_type(self.0)) } .to_str() .unwrap() } - /// Get the [Language] that was used to parse this node's syntax tree. - #[doc(alias = "ts_tree_language")] - pub fn language(&self) -> Language { - Language(unsafe { ffi::ts_tree_language(self.0.tree) }) + /// Get this node's symbol name as it appears in the grammar ignoring + /// aliases as a string. + #[doc(alias = "ts_node_grammar_type")] + #[must_use] + pub fn grammar_name(&self) -> &'static str { + unsafe { CStr::from_ptr(ffi::ts_node_grammar_type(self.0)) } + .to_str() + .unwrap() + } + + /// Get the [`Language`] that was used to parse this node's syntax tree. + #[doc(alias = "ts_node_language")] + #[must_use] + pub fn language(&self) -> LanguageRef { + LanguageRef(unsafe { ffi::ts_node_language(self.0) }, PhantomData) } /// Check if this node is *named*. @@ -849,6 +1012,7 @@ impl<'tree> Node<'tree> { /// Named nodes correspond to named rules in the grammar, whereas *anonymous* nodes /// correspond to string literals in the grammar. #[doc(alias = "ts_node_is_named")] + #[must_use] pub fn is_named(&self) -> bool { unsafe { ffi::ts_node_is_named(self.0) } } @@ -858,12 +1022,14 @@ impl<'tree> Node<'tree> { /// Extra nodes represent things like comments, which are not required the grammar, /// but can appear anywhere. #[doc(alias = "ts_node_is_extra")] + #[must_use] pub fn is_extra(&self) -> bool { unsafe { ffi::ts_node_is_extra(self.0) } } /// Check if this node has been edited. #[doc(alias = "ts_node_has_changes")] + #[must_use] pub fn has_changes(&self) -> bool { unsafe { ffi::ts_node_has_changes(self.0) } } @@ -871,6 +1037,7 @@ impl<'tree> Node<'tree> { /// Check if this node represents a syntax error or contains any syntax errors anywhere /// within it. #[doc(alias = "ts_node_has_error")] + #[must_use] pub fn has_error(&self) -> bool { unsafe { ffi::ts_node_has_error(self.0) } } @@ -879,8 +1046,24 @@ impl<'tree> Node<'tree> { /// /// Syntax errors represent parts of the code that could not be incorporated into a /// valid syntax tree. + #[doc(alias = "ts_node_is_error")] + #[must_use] pub fn is_error(&self) -> bool { - self.kind_id() == u16::MAX + unsafe { ffi::ts_node_is_error(self.0) } + } + + /// Get this node's parse state. + #[doc(alias = "ts_node_parse_state")] + #[must_use] + pub fn parse_state(&self) -> u16 { + unsafe { ffi::ts_node_parse_state(self.0) } + } + + /// Get the parse state after this node. + #[doc(alias = "ts_node_next_parse_state")] + #[must_use] + pub fn next_parse_state(&self) -> u16 { + unsafe { ffi::ts_node_next_parse_state(self.0) } } /// Check if this node is *missing*. @@ -888,29 +1071,34 @@ impl<'tree> Node<'tree> { /// Missing nodes are inserted by the parser in order to recover from certain kinds of /// syntax errors. #[doc(alias = "ts_node_is_missing")] + #[must_use] pub fn is_missing(&self) -> bool { unsafe { ffi::ts_node_is_missing(self.0) } } /// Get the byte offsets where this node starts. #[doc(alias = "ts_node_start_byte")] + #[must_use] pub fn start_byte(&self) -> usize { unsafe { ffi::ts_node_start_byte(self.0) as usize } } /// Get the byte offsets where this node end. #[doc(alias = "ts_node_end_byte")] + #[must_use] pub fn end_byte(&self) -> usize { unsafe { ffi::ts_node_end_byte(self.0) as usize } } /// Get the byte range of source code that this node represents. + #[must_use] pub fn byte_range(&self) -> std::ops::Range { self.start_byte()..self.end_byte() } /// Get the range of source code that this node represents, both in terms of raw bytes /// and of row/column coordinates. + #[must_use] pub fn range(&self) -> Range { Range { start_byte: self.start_byte(), @@ -922,6 +1110,7 @@ impl<'tree> Node<'tree> { /// Get this node's start position in terms of rows and columns. #[doc(alias = "ts_node_start_point")] + #[must_use] pub fn start_position(&self) -> Point { let result = unsafe { ffi::ts_node_start_point(self.0) }; result.into() @@ -929,6 +1118,7 @@ impl<'tree> Node<'tree> { /// Get this node's end position in terms of rows and columns. #[doc(alias = "ts_node_end_point")] + #[must_use] pub fn end_position(&self) -> Point { let result = unsafe { ffi::ts_node_end_point(self.0) }; result.into() @@ -937,35 +1127,39 @@ impl<'tree> Node<'tree> { /// Get the node's child at the given index, where zero represents the first /// child. /// - /// This method is fairly fast, but its cost is technically log(i), so you - /// if you might be iterating over a long list of children, you should use - /// [Node::children] instead. + /// This method is fairly fast, but its cost is technically log(i), so if + /// you might be iterating over a long list of children, you should use + /// [`Node::children`] instead. #[doc(alias = "ts_node_child")] + #[must_use] pub fn child(&self, i: usize) -> Option { Self::new(unsafe { ffi::ts_node_child(self.0, i as u32) }) } /// Get this node's number of children. #[doc(alias = "ts_node_child_count")] + #[must_use] pub fn child_count(&self) -> usize { unsafe { ffi::ts_node_child_count(self.0) as usize } } /// Get this node's *named* child at the given index. /// - /// See also [Node::is_named]. - /// This method is fairly fast, but its cost is technically log(i), so you - /// if you might be iterating over a long list of children, you should use - /// [Node::named_children] instead. + /// See also [`Node::is_named`]. + /// This method is fairly fast, but its cost is technically log(i), so if + /// you might be iterating over a long list of children, you should use + /// [`Node::named_children`] instead. #[doc(alias = "ts_node_named_child")] - pub fn named_child<'a>(&'a self, i: usize) -> Option { + #[must_use] + pub fn named_child(&self, i: usize) -> Option { Self::new(unsafe { ffi::ts_node_named_child(self.0, i as u32) }) } /// Get this node's number of *named* children. /// - /// See also [Node::is_named]. + /// See also [`Node::is_named`]. #[doc(alias = "ts_node_named_child_count")] + #[must_use] pub fn named_child_count(&self) -> usize { unsafe { ffi::ts_node_named_child_count(self.0) as usize } } @@ -973,14 +1167,15 @@ impl<'tree> Node<'tree> { /// Get the first child with the given field name. /// /// If multiple children may have the same field name, access them using - /// [children_by_field_name](Node::children_by_field_name) + /// [`children_by_field_name`](Node::children_by_field_name) #[doc(alias = "ts_node_child_by_field_name")] + #[must_use] pub fn child_by_field_name(&self, field_name: impl AsRef<[u8]>) -> Option { let field_name = field_name.as_ref(); Self::new(unsafe { ffi::ts_node_child_by_field_name( self.0, - field_name.as_ptr() as *const c_char, + field_name.as_ptr().cast::(), field_name.len() as u32, ) }) @@ -988,42 +1183,40 @@ impl<'tree> Node<'tree> { /// Get this node's child with the given numerical field id. /// - /// See also [child_by_field_name](Node::child_by_field_name). You can convert a field name to - /// an id using [Language::field_id_for_name]. + /// See also [`child_by_field_name`](Node::child_by_field_name). You can convert a field name to + /// an id using [`Language::field_id_for_name`]. #[doc(alias = "ts_node_child_by_field_id")] + #[must_use] pub fn child_by_field_id(&self, field_id: u16) -> Option { Self::new(unsafe { ffi::ts_node_child_by_field_id(self.0, field_id) }) } /// Get the field name of this node's child at the given index. #[doc(alias = "ts_node_field_name_for_child")] + #[must_use] pub fn field_name_for_child(&self, child_index: u32) -> Option<&'static str> { unsafe { let ptr = ffi::ts_node_field_name_for_child(self.0, child_index); - if ptr.is_null() { - None - } else { - Some(CStr::from_ptr(ptr).to_str().unwrap()) - } + (!ptr.is_null()).then(|| CStr::from_ptr(ptr).to_str().unwrap()) } } /// Iterate over this node's children. /// - /// A [TreeCursor] is used to retrieve the children efficiently. Obtain - /// a [TreeCursor] by calling [Tree::walk] or [Node::walk]. To avoid unnecessary + /// A [`TreeCursor`] is used to retrieve the children efficiently. Obtain + /// a [`TreeCursor`] by calling [`Tree::walk`] or [`Node::walk`]. To avoid unnecessary /// allocations, you should reuse the same cursor for subsequent calls to /// this method. /// - /// If you're walking the tree recursively, you may want to use the `TreeCursor` + /// If you're walking the tree recursively, you may want to use the [`TreeCursor`] /// APIs directly instead. - pub fn children<'a>( + pub fn children<'cursor>( &self, - cursor: &'a mut TreeCursor<'tree>, - ) -> impl ExactSizeIterator> + 'a { + cursor: &'cursor mut TreeCursor<'tree>, + ) -> impl ExactSizeIterator> + 'cursor { cursor.reset(*self); cursor.goto_first_child(); - (0..self.child_count()).into_iter().map(move |_| { + (0..self.child_count()).map(move |_| { let result = cursor.node(); cursor.goto_next_sibling(); result @@ -1032,14 +1225,14 @@ impl<'tree> Node<'tree> { /// Iterate over this node's named children. /// - /// See also [Node::children]. - pub fn named_children<'a>( + /// See also [`Node::children`]. + pub fn named_children<'cursor>( &self, - cursor: &'a mut TreeCursor<'tree>, - ) -> impl ExactSizeIterator> + 'a { + cursor: &'cursor mut TreeCursor<'tree>, + ) -> impl ExactSizeIterator> + 'cursor { cursor.reset(*self); cursor.goto_first_child(); - (0..self.named_child_count()).into_iter().map(move |_| { + (0..self.named_child_count()).map(move |_| { while !cursor.node().is_named() { if !cursor.goto_next_sibling() { break; @@ -1053,29 +1246,48 @@ impl<'tree> Node<'tree> { /// Iterate over this node's children with a given field name. /// - /// See also [Node::children]. - pub fn children_by_field_name<'a>( + /// See also [`Node::children`]. + pub fn children_by_field_name<'cursor>( &self, field_name: &str, - cursor: &'a mut TreeCursor<'tree>, - ) -> impl Iterator> + 'a { + cursor: &'cursor mut TreeCursor<'tree>, + ) -> impl Iterator> + 'cursor { let field_id = self.language().field_id_for_name(field_name); - self.children_by_field_id(field_id.unwrap_or(0), cursor) + let mut done = field_id.is_none(); + if !done { + cursor.reset(*self); + cursor.goto_first_child(); + } + iter::from_fn(move || { + if !done { + while cursor.field_id() != field_id { + if !cursor.goto_next_sibling() { + return None; + } + } + let result = cursor.node(); + if !cursor.goto_next_sibling() { + done = true; + } + return Some(result); + } + None + }) } /// Iterate over this node's children with a given field id. /// - /// See also [Node::children_by_field_name]. - pub fn children_by_field_id<'a>( + /// See also [`Node::children_by_field_name`]. + pub fn children_by_field_id<'cursor>( &self, - field_id: u16, - cursor: &'a mut TreeCursor<'tree>, - ) -> impl Iterator> + 'a { + field_id: FieldId, + cursor: &'cursor mut TreeCursor<'tree>, + ) -> impl Iterator> + 'cursor { cursor.reset(*self); cursor.goto_first_child(); let mut done = false; iter::from_fn(move || { - while !done { + if !done { while cursor.field_id() != Some(field_id) { if !cursor.goto_next_sibling() { return None; @@ -1093,36 +1305,49 @@ impl<'tree> Node<'tree> { /// Get this node's immediate parent. #[doc(alias = "ts_node_parent")] + #[must_use] pub fn parent(&self) -> Option { Self::new(unsafe { ffi::ts_node_parent(self.0) }) } /// Get this node's next sibling. #[doc(alias = "ts_node_next_sibling")] + #[must_use] pub fn next_sibling(&self) -> Option { Self::new(unsafe { ffi::ts_node_next_sibling(self.0) }) } /// Get this node's previous sibling. #[doc(alias = "ts_node_prev_sibling")] + #[must_use] pub fn prev_sibling(&self) -> Option { Self::new(unsafe { ffi::ts_node_prev_sibling(self.0) }) } /// Get this node's next named sibling. #[doc(alias = "ts_node_next_named_sibling")] + #[must_use] pub fn next_named_sibling(&self) -> Option { Self::new(unsafe { ffi::ts_node_next_named_sibling(self.0) }) } /// Get this node's previous named sibling. #[doc(alias = "ts_node_prev_named_sibling")] + #[must_use] pub fn prev_named_sibling(&self) -> Option { Self::new(unsafe { ffi::ts_node_prev_named_sibling(self.0) }) } + /// Get the node's number of descendants, including one for the node itself. + #[doc(alias = "ts_node_descendant_count")] + #[must_use] + pub fn descendant_count(&self) -> usize { + unsafe { ffi::ts_node_descendant_count(self.0) as usize } + } + /// Get the smallest node within this node that spans the given range. #[doc(alias = "ts_node_descendant_for_byte_range")] + #[must_use] pub fn descendant_for_byte_range(&self, start: usize, end: usize) -> Option { Self::new(unsafe { ffi::ts_node_descendant_for_byte_range(self.0, start as u32, end as u32) @@ -1131,6 +1356,7 @@ impl<'tree> Node<'tree> { /// Get the smallest named node within this node that spans the given range. #[doc(alias = "ts_node_named_descendant_for_byte_range")] + #[must_use] pub fn named_descendant_for_byte_range(&self, start: usize, end: usize) -> Option { Self::new(unsafe { ffi::ts_node_named_descendant_for_byte_range(self.0, start as u32, end as u32) @@ -1139,6 +1365,7 @@ impl<'tree> Node<'tree> { /// Get the smallest node within this node that spans the given range. #[doc(alias = "ts_node_descendant_for_point_range")] + #[must_use] pub fn descendant_for_point_range(&self, start: Point, end: Point) -> Option { Self::new(unsafe { ffi::ts_node_descendant_for_point_range(self.0, start.into(), end.into()) @@ -1147,6 +1374,7 @@ impl<'tree> Node<'tree> { /// Get the smallest named node within this node that spans the given range. #[doc(alias = "ts_node_named_descendant_for_point_range")] + #[must_use] pub fn named_descendant_for_point_range(&self, start: Point, end: Point) -> Option { Self::new(unsafe { ffi::ts_node_named_descendant_for_point_range(self.0, start.into(), end.into()) @@ -1154,13 +1382,14 @@ impl<'tree> Node<'tree> { } #[doc(alias = "ts_node_string")] + #[must_use] pub fn to_sexp(&self) -> String { let c_string = unsafe { ffi::ts_node_string(self.0) }; let result = unsafe { CStr::from_ptr(c_string) } .to_str() .unwrap() .to_string(); - unsafe { (FREE_FN)(c_string as *mut c_void) }; + unsafe { (FREE_FN)(c_string.cast::()) }; result } @@ -1168,12 +1397,14 @@ impl<'tree> Node<'tree> { str::from_utf8(&source[self.start_byte()..self.end_byte()]) } + #[must_use] pub fn utf16_text<'a>(&self, source: &'a [u16]) -> &'a [u16] { - &source.as_ref()[self.start_byte()..self.end_byte()] + &source[self.start_byte()..self.end_byte()] } - /// Create a new [TreeCursor] starting from this node. + /// Create a new [`TreeCursor`] starting from this node. #[doc(alias = "ts_tree_cursor_new")] + #[must_use] pub fn walk(&self) -> TreeCursor<'tree> { TreeCursor(unsafe { ffi::ts_tree_cursor_new(self.0) }, PhantomData) } @@ -1181,26 +1412,26 @@ impl<'tree> Node<'tree> { /// Edit this node to keep it in-sync with source code that has been edited. /// /// This function is only rarely needed. When you edit a syntax tree with the - /// [Tree::edit] method, all of the nodes that you retrieve from the tree - /// afterward will already reflect the edit. You only need to use [Node::edit] - /// when you have a specific [Node] instance that you want to keep and continue + /// [`Tree::edit`] method, all of the nodes that you retrieve from the tree + /// afterward will already reflect the edit. You only need to use [`Node::edit`] + /// when you have a specific [`Node`] instance that you want to keep and continue /// to use after an edit. #[doc(alias = "ts_node_edit")] pub fn edit(&mut self, edit: &InputEdit) { let edit = edit.into(); - unsafe { ffi::ts_node_edit(&mut self.0 as *mut ffi::TSNode, &edit) } + unsafe { ffi::ts_node_edit(std::ptr::addr_of_mut!(self.0), &edit) } } } -impl<'a> PartialEq for Node<'a> { +impl PartialEq for Node<'_> { fn eq(&self, other: &Self) -> bool { self.0.id == other.0.id } } -impl<'a> Eq for Node<'a> {} +impl Eq for Node<'_> {} -impl<'a> hash::Hash for Node<'a> { +impl hash::Hash for Node<'_> { fn hash(&self, state: &mut H) { self.0.id.hash(state); self.0.context[0].hash(state); @@ -1210,7 +1441,7 @@ impl<'a> hash::Hash for Node<'a> { } } -impl<'a> fmt::Debug for Node<'a> { +impl fmt::Debug for Node<'_> { fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { write!( f, @@ -1222,10 +1453,11 @@ impl<'a> fmt::Debug for Node<'a> { } } -impl<'a> TreeCursor<'a> { - /// Get the tree cursor's current [Node]. +impl<'cursor> TreeCursor<'cursor> { + /// Get the tree cursor's current [`Node`]. #[doc(alias = "ts_tree_cursor_current_node")] - pub fn node(&self) -> Node<'a> { + #[must_use] + pub fn node(&self) -> Node<'cursor> { Node( unsafe { ffi::ts_tree_cursor_current_node(&self.0) }, PhantomData, @@ -1234,39 +1466,61 @@ impl<'a> TreeCursor<'a> { /// Get the numerical field id of this tree cursor's current node. /// - /// See also [field_name](TreeCursor::field_name). + /// See also [`field_name`](TreeCursor::field_name). #[doc(alias = "ts_tree_cursor_current_field_id")] - pub fn field_id(&self) -> Option { - unsafe { - let id = ffi::ts_tree_cursor_current_field_id(&self.0); - if id == 0 { - None - } else { - Some(id) - } - } + #[must_use] + pub fn field_id(&self) -> Option { + let id = unsafe { ffi::ts_tree_cursor_current_field_id(&self.0) }; + FieldId::new(id) } /// Get the field name of this tree cursor's current node. #[doc(alias = "ts_tree_cursor_current_field_name")] + #[must_use] pub fn field_name(&self) -> Option<&'static str> { unsafe { let ptr = ffi::ts_tree_cursor_current_field_name(&self.0); - if ptr.is_null() { - None - } else { - Some(CStr::from_ptr(ptr).to_str().unwrap()) - } + (!ptr.is_null()).then(|| CStr::from_ptr(ptr).to_str().unwrap()) } } + /// Get the numerical field id of this tree cursor's current node. + /// + /// See also [`field_name`](TreeCursor::field_name). + #[doc(alias = "ts_tree_cursor_current_depth")] + #[must_use] + pub fn depth(&self) -> u32 { + unsafe { ffi::ts_tree_cursor_current_depth(&self.0) } + } + + /// Get the index of the cursor's current node out of all of the + /// descendants of the original node that the cursor was constructed with + #[doc(alias = "ts_tree_cursor_current_descendant_index")] + #[must_use] + pub fn descendant_index(&self) -> usize { + unsafe { ffi::ts_tree_cursor_current_descendant_index(&self.0) as usize } + } + /// Move this cursor to the first child of its current node. /// /// This returns `true` if the cursor successfully moved, and returns `false` /// if there were no children. #[doc(alias = "ts_tree_cursor_goto_first_child")] pub fn goto_first_child(&mut self) -> bool { - return unsafe { ffi::ts_tree_cursor_goto_first_child(&mut self.0) }; + unsafe { ffi::ts_tree_cursor_goto_first_child(&mut self.0) } + } + + /// Move this cursor to the last child of its current node. + /// + /// This returns `true` if the cursor successfully moved, and returns + /// `false` if there were no children. + /// + /// Note that this function may be slower than + /// [`goto_first_child`](TreeCursor::goto_first_child) because it needs to + /// iterate through all the children to compute the child's position. + #[doc(alias = "ts_tree_cursor_goto_last_child")] + pub fn goto_last_child(&mut self) -> bool { + unsafe { ffi::ts_tree_cursor_goto_last_child(&mut self.0) } } /// Move this cursor to the parent of its current node. @@ -1275,7 +1529,7 @@ impl<'a> TreeCursor<'a> { /// if there was no parent node (the cursor was already on the root node). #[doc(alias = "ts_tree_cursor_goto_parent")] pub fn goto_parent(&mut self) -> bool { - return unsafe { ffi::ts_tree_cursor_goto_parent(&mut self.0) }; + unsafe { ffi::ts_tree_cursor_goto_parent(&mut self.0) } } /// Move this cursor to the next sibling of its current node. @@ -1284,7 +1538,30 @@ impl<'a> TreeCursor<'a> { /// if there was no next sibling node. #[doc(alias = "ts_tree_cursor_goto_next_sibling")] pub fn goto_next_sibling(&mut self) -> bool { - return unsafe { ffi::ts_tree_cursor_goto_next_sibling(&mut self.0) }; + unsafe { ffi::ts_tree_cursor_goto_next_sibling(&mut self.0) } + } + + /// Move the cursor to the node that is the nth descendant of + /// the original node that the cursor was constructed with, where + /// zero represents the original node itself. + #[doc(alias = "ts_tree_cursor_goto_descendant")] + pub fn goto_descendant(&mut self, descendant_index: usize) { + unsafe { ffi::ts_tree_cursor_goto_descendant(&mut self.0, descendant_index as u32) } + } + + /// Move this cursor to the previous sibling of its current node. + /// + /// This returns `true` if the cursor successfully moved, and returns + /// `false` if there was no previous sibling node. + /// + /// Note, that this function may be slower than + /// [`goto_next_sibling`](TreeCursor::goto_next_sibling) due to how node + /// positions are stored. In the worst case, this will need to iterate + /// through all the children upto the previous sibling node to recalculate + /// its position. + #[doc(alias = "ts_tree_cursor_goto_previous_sibling")] + pub fn goto_previous_sibling(&mut self) -> bool { + unsafe { ffi::ts_tree_cursor_goto_previous_sibling(&mut self.0) } } /// Move this cursor to the first child of its current node that extends beyond @@ -1296,11 +1573,7 @@ impl<'a> TreeCursor<'a> { pub fn goto_first_child_for_byte(&mut self, index: usize) -> Option { let result = unsafe { ffi::ts_tree_cursor_goto_first_child_for_byte(&mut self.0, index as u32) }; - if result < 0 { - None - } else { - Some(result as usize) - } + (result >= 0).then_some(result as usize) } /// Move this cursor to the first child of its current node that extends beyond @@ -1312,32 +1585,119 @@ impl<'a> TreeCursor<'a> { pub fn goto_first_child_for_point(&mut self, point: Point) -> Option { let result = unsafe { ffi::ts_tree_cursor_goto_first_child_for_point(&mut self.0, point.into()) }; - if result < 0 { - None - } else { - Some(result as usize) - } + (result >= 0).then_some(result as usize) } /// Re-initialize this tree cursor to start at a different node. #[doc(alias = "ts_tree_cursor_reset")] - pub fn reset(&mut self, node: Node<'a>) { + pub fn reset(&mut self, node: Node<'cursor>) { unsafe { ffi::ts_tree_cursor_reset(&mut self.0, node.0) }; } + + /// Re-initialize a tree cursor to the same position as another cursor. + /// + /// Unlike [`reset`](TreeCursor::reset), this will not lose parent information and + /// allows reusing already created cursors. + #[doc(alias = "ts_tree_cursor_reset_to")] + pub fn reset_to(&mut self, cursor: &TreeCursor<'cursor>) { + unsafe { ffi::ts_tree_cursor_reset_to(&mut self.0, &cursor.0) }; + } } -impl<'a> Clone for TreeCursor<'a> { +impl Clone for TreeCursor<'_> { fn clone(&self) -> Self { TreeCursor(unsafe { ffi::ts_tree_cursor_copy(&self.0) }, PhantomData) } } -impl<'a> Drop for TreeCursor<'a> { +impl Drop for TreeCursor<'_> { fn drop(&mut self) { unsafe { ffi::ts_tree_cursor_delete(&mut self.0) } } } +impl LookaheadIterator { + /// Get the current language of the lookahead iterator. + #[doc(alias = "ts_lookahead_iterator_language")] + #[must_use] + pub fn language(&self) -> LanguageRef<'_> { + LanguageRef( + unsafe { ffi::ts_lookahead_iterator_language(self.0.as_ptr()) }, + PhantomData, + ) + } + + /// Get the current symbol of the lookahead iterator. + #[doc(alias = "ts_lookahead_iterator_current_symbol")] + #[must_use] + pub fn current_symbol(&self) -> u16 { + unsafe { ffi::ts_lookahead_iterator_current_symbol(self.0.as_ptr()) } + } + + /// Get the current symbol name of the lookahead iterator. + #[doc(alias = "ts_lookahead_iterator_current_symbol_name")] + #[must_use] + pub fn current_symbol_name(&self) -> &'static str { + unsafe { + CStr::from_ptr(ffi::ts_lookahead_iterator_current_symbol_name( + self.0.as_ptr(), + )) + .to_str() + .unwrap() + } + } + + /// Reset the lookahead iterator. + /// + /// This returns `true` if the language was set successfully and `false` + /// otherwise. + #[doc(alias = "ts_lookahead_iterator_reset")] + pub fn reset(&mut self, language: &Language, state: u16) -> bool { + unsafe { ffi::ts_lookahead_iterator_reset(self.0.as_ptr(), language.0, state) } + } + + /// Reset the lookahead iterator to another state. + /// + /// This returns `true` if the iterator was reset to the given state and `false` + /// otherwise. + #[doc(alias = "ts_lookahead_iterator_reset_state")] + pub fn reset_state(&mut self, state: u16) -> bool { + unsafe { ffi::ts_lookahead_iterator_reset_state(self.0.as_ptr(), state) } + } + + /// Iterate symbol names. + pub fn iter_names(&mut self) -> impl Iterator + '_ { + LookaheadNamesIterator(self) + } +} + +impl Iterator for LookaheadNamesIterator<'_> { + type Item = &'static str; + + #[doc(alias = "ts_lookahead_iterator_next")] + fn next(&mut self) -> Option { + unsafe { ffi::ts_lookahead_iterator_next(self.0 .0.as_ptr()) } + .then(|| self.0.current_symbol_name()) + } +} + +impl Iterator for LookaheadIterator { + type Item = u16; + + #[doc(alias = "ts_lookahead_iterator_next")] + fn next(&mut self) -> Option { + // the first symbol is always `0` so we can safely skip it + unsafe { ffi::ts_lookahead_iterator_next(self.0.as_ptr()) }.then(|| self.current_symbol()) + } +} + +impl Drop for LookaheadIterator { + #[doc(alias = "ts_lookahead_iterator_delete")] + fn drop(&mut self) { + unsafe { ffi::ts_lookahead_iterator_delete(self.0.as_ptr()) } + } +} + impl Query { /// Create a new query from a string containing one or more S-expression /// patterns. @@ -1345,7 +1705,7 @@ impl Query { /// The query is associated with a particular language, and can only be run /// on syntax nodes parsed with that language. References to Queries can be /// shared between multiple threads. - pub fn new(language: Language, source: &str) -> Result { + pub fn new(language: &Language, source: &str) -> Result { let mut error_offset = 0u32; let mut error_type: ffi::TSQueryError = 0; let bytes = source.as_bytes(); @@ -1354,16 +1714,16 @@ impl Query { let ptr = unsafe { ffi::ts_query_new( language.0, - bytes.as_ptr() as *const c_char, + bytes.as_ptr().cast::(), bytes.len() as u32, - &mut error_offset as *mut u32, - &mut error_type as *mut ffi::TSQueryError, + std::ptr::addr_of_mut!(error_offset), + std::ptr::addr_of_mut!(error_type), ) }; // On failure, build an error based on the error code and offset. if ptr.is_null() { - if error_type == ffi::TSQueryError_TSQueryErrorLanguage { + if error_type == ffi::TSQueryErrorLanguage { return Err(QueryError { row: 0, column: 0, @@ -1380,7 +1740,7 @@ impl Query { let mut line_start = 0; let mut row = 0; let mut line_containing_error = None; - for line in source.split("\n") { + for line in source.split('\n') { let line_end = line_start + line.len() + 1; if line_end > offset { line_containing_error = Some(line); @@ -1395,31 +1755,28 @@ impl Query { let message; match error_type { // Error types that report names - ffi::TSQueryError_TSQueryErrorNodeType - | ffi::TSQueryError_TSQueryErrorField - | ffi::TSQueryError_TSQueryErrorCapture => { + ffi::TSQueryErrorNodeType | ffi::TSQueryErrorField | ffi::TSQueryErrorCapture => { let suffix = source.split_at(offset).1; let end_offset = suffix .find(|c| !char::is_alphanumeric(c) && c != '_' && c != '-') - .unwrap_or(source.len()); + .unwrap_or(suffix.len()); message = suffix.split_at(end_offset).0.to_string(); kind = match error_type { - ffi::TSQueryError_TSQueryErrorNodeType => QueryErrorKind::NodeType, - ffi::TSQueryError_TSQueryErrorField => QueryErrorKind::Field, - ffi::TSQueryError_TSQueryErrorCapture => QueryErrorKind::Capture, + ffi::TSQueryErrorNodeType => QueryErrorKind::NodeType, + ffi::TSQueryErrorField => QueryErrorKind::Field, + ffi::TSQueryErrorCapture => QueryErrorKind::Capture, _ => unreachable!(), }; } // Error types that report positions _ => { - message = if let Some(line) = line_containing_error { - line.to_string() + "\n" + &" ".repeat(offset - line_start) + "^" - } else { - "Unexpected EOF".to_string() - }; + message = line_containing_error.map_or_else( + || "Unexpected EOF".to_string(), + |line| line.to_string() + "\n" + &" ".repeat(offset - line_start) + "^", + ); kind = match error_type { - ffi::TSQueryError_TSQueryErrorStructure => QueryErrorKind::Structure, + ffi::TSQueryErrorStructure => QueryErrorKind::Structure, _ => QueryErrorKind::Syntax, }; } @@ -1429,33 +1786,47 @@ impl Query { row, column, offset, - kind, message, + kind, }); } - let string_count = unsafe { ffi::ts_query_string_count(ptr) }; - let capture_count = unsafe { ffi::ts_query_capture_count(ptr) }; - let pattern_count = unsafe { ffi::ts_query_pattern_count(ptr) as usize }; - let mut result = Query { - ptr: unsafe { NonNull::new_unchecked(ptr) }, - capture_names: Vec::with_capacity(capture_count as usize), - capture_quantifiers: Vec::with_capacity(pattern_count as usize), - text_predicates: Vec::with_capacity(pattern_count), - property_predicates: Vec::with_capacity(pattern_count), - property_settings: Vec::with_capacity(pattern_count), - general_predicates: Vec::with_capacity(pattern_count), + unsafe { Self::from_raw_parts(ptr, source) } + } + + #[doc(hidden)] + unsafe fn from_raw_parts(ptr: *mut ffi::TSQuery, source: &str) -> Result { + let ptr = { + struct TSQueryDrop(*mut ffi::TSQuery); + impl Drop for TSQueryDrop { + fn drop(&mut self) { + unsafe { ffi::ts_query_delete(self.0) } + } + } + TSQueryDrop(ptr) }; + let string_count = unsafe { ffi::ts_query_string_count(ptr.0) }; + let capture_count = unsafe { ffi::ts_query_capture_count(ptr.0) }; + let pattern_count = unsafe { ffi::ts_query_pattern_count(ptr.0) as usize }; + + let mut capture_names = Vec::with_capacity(capture_count as usize); + let mut capture_quantifiers_vec = Vec::with_capacity(pattern_count as usize); + let mut text_predicates_vec = Vec::with_capacity(pattern_count); + let mut property_predicates_vec = Vec::with_capacity(pattern_count); + let mut property_settings_vec = Vec::with_capacity(pattern_count); + let mut general_predicates_vec = Vec::with_capacity(pattern_count); + // Build a vector of strings to store the capture names. for i in 0..capture_count { unsafe { let mut length = 0u32; let name = - ffi::ts_query_capture_name_for_id(ptr, i, &mut length as *mut u32) as *const u8; + ffi::ts_query_capture_name_for_id(ptr.0, i, std::ptr::addr_of_mut!(length)) + .cast::(); let name = slice::from_raw_parts(name, length as usize); let name = str::from_utf8_unchecked(name); - result.capture_names.push(name.to_string()); + capture_names.push(name); } } @@ -1464,11 +1835,11 @@ impl Query { let mut capture_quantifiers = Vec::with_capacity(capture_count as usize); for j in 0..capture_count { unsafe { - let quantifier = ffi::ts_query_capture_quantifier_for_id(ptr, i as u32, j); + let quantifier = ffi::ts_query_capture_quantifier_for_id(ptr.0, i as u32, j); capture_quantifiers.push(quantifier.into()); } } - result.capture_quantifiers.push(capture_quantifiers); + capture_quantifiers_vec.push(capture_quantifiers.into()); } // Build a vector of strings to represent literal values used in predicates. @@ -1476,11 +1847,11 @@ impl Query { .map(|i| unsafe { let mut length = 0u32; let value = - ffi::ts_query_string_value_for_id(ptr, i as u32, &mut length as *mut u32) - as *const u8; + ffi::ts_query_string_value_for_id(ptr.0, i, std::ptr::addr_of_mut!(length)) + .cast::(); let value = slice::from_raw_parts(value, length as usize); let value = str::from_utf8_unchecked(value); - value.to_string() + value }) .collect::>(); @@ -1488,49 +1859,51 @@ impl Query { for i in 0..pattern_count { let predicate_steps = unsafe { let mut length = 0u32; - let raw_predicates = - ffi::ts_query_predicates_for_pattern(ptr, i as u32, &mut length as *mut u32); - if length > 0 { - slice::from_raw_parts(raw_predicates, length as usize) - } else { - &[] - } + let raw_predicates = ffi::ts_query_predicates_for_pattern( + ptr.0, + i as u32, + std::ptr::addr_of_mut!(length), + ); + (length > 0) + .then(|| slice::from_raw_parts(raw_predicates, length as usize)) + .unwrap_or_default() }; - let byte_offset = unsafe { ffi::ts_query_start_byte_for_pattern(ptr, i as u32) }; + let byte_offset = unsafe { ffi::ts_query_start_byte_for_pattern(ptr.0, i as u32) }; let row = source .char_indices() .take_while(|(i, _)| *i < byte_offset as usize) .filter(|(_, c)| *c == '\n') .count(); - let type_done = ffi::TSQueryPredicateStepType_TSQueryPredicateStepTypeDone; - let type_capture = ffi::TSQueryPredicateStepType_TSQueryPredicateStepTypeCapture; - let type_string = ffi::TSQueryPredicateStepType_TSQueryPredicateStepTypeString; + use ffi::TSQueryPredicateStepType as T; + const TYPE_DONE: T = ffi::TSQueryPredicateStepTypeDone; + const TYPE_CAPTURE: T = ffi::TSQueryPredicateStepTypeCapture; + const TYPE_STRING: T = ffi::TSQueryPredicateStepTypeString; let mut text_predicates = Vec::new(); let mut property_predicates = Vec::new(); let mut property_settings = Vec::new(); let mut general_predicates = Vec::new(); - for p in predicate_steps.split(|s| s.type_ == type_done) { + for p in predicate_steps.split(|s| s.type_ == TYPE_DONE) { if p.is_empty() { continue; } - if p[0].type_ != type_string { + if p[0].type_ != TYPE_STRING { return Err(predicate_error( row, format!( "Expected predicate to start with a function name. Got @{}.", - result.capture_names[p[0].value_id as usize], + capture_names[p[0].value_id as usize], ), )); } // Build a predicate for each of the known predicate function names. - let operator_name = &string_values[p[0].value_id as usize]; - match operator_name.as_str() { - "eq?" | "not-eq?" => { + let operator_name = string_values[p[0].value_id as usize]; + match operator_name { + "eq?" | "not-eq?" | "any-eq?" | "any-not-eq?" => { if p.len() != 3 { return Err(predicate_error( row, @@ -1540,64 +1913,78 @@ impl Query { ), )); } - if p[1].type_ != type_capture { + if p[1].type_ != TYPE_CAPTURE { return Err(predicate_error(row, format!( "First argument to #eq? predicate must be a capture name. Got literal \"{}\".", string_values[p[1].value_id as usize], ))); } - let is_positive = operator_name == "eq?"; - text_predicates.push(if p[2].type_ == type_capture { - TextPredicate::CaptureEqCapture( + let is_positive = operator_name == "eq?" || operator_name == "any-eq?"; + let match_all = match operator_name { + "eq?" | "not-eq?" => true, + "any-eq?" | "any-not-eq?" => false, + _ => unreachable!(), + }; + text_predicates.push(if p[2].type_ == TYPE_CAPTURE { + TextPredicateCapture::EqCapture( p[1].value_id, p[2].value_id, is_positive, + match_all, ) } else { - TextPredicate::CaptureEqString( + TextPredicateCapture::EqString( p[1].value_id, - string_values[p[2].value_id as usize].clone(), + string_values[p[2].value_id as usize].to_string().into(), is_positive, + match_all, ) }); } - "match?" | "not-match?" => { + "match?" | "not-match?" | "any-match?" | "any-not-match?" => { if p.len() != 3 { return Err(predicate_error(row, format!( "Wrong number of arguments to #match? predicate. Expected 2, got {}.", p.len() - 1 ))); } - if p[1].type_ != type_capture { + if p[1].type_ != TYPE_CAPTURE { return Err(predicate_error(row, format!( "First argument to #match? predicate must be a capture name. Got literal \"{}\".", string_values[p[1].value_id as usize], ))); } - if p[2].type_ == type_capture { + if p[2].type_ == TYPE_CAPTURE { return Err(predicate_error(row, format!( "Second argument to #match? predicate must be a literal. Got capture @{}.", - result.capture_names[p[2].value_id as usize], + capture_names[p[2].value_id as usize], ))); } - let is_positive = operator_name == "match?"; + let is_positive = + operator_name == "match?" || operator_name == "any-match?"; + let match_all = match operator_name { + "match?" | "not-match?" => true, + "any-match?" | "any-not-match?" => false, + _ => unreachable!(), + }; let regex = &string_values[p[2].value_id as usize]; - text_predicates.push(TextPredicate::CaptureMatchString( + text_predicates.push(TextPredicateCapture::MatchString( p[1].value_id, regex::bytes::Regex::new(regex).map_err(|_| { - predicate_error(row, format!("Invalid regex '{}'", regex)) + predicate_error(row, format!("Invalid regex '{regex}'")) })?, is_positive, + match_all, )); } "set!" => property_settings.push(Self::parse_property( row, - &operator_name, - &result.capture_names, + operator_name, + &capture_names, &string_values, &p[1..], )?), @@ -1605,24 +1992,60 @@ impl Query { "is?" | "is-not?" => property_predicates.push(( Self::parse_property( row, - &operator_name, - &result.capture_names, + operator_name, + &capture_names, &string_values, &p[1..], )?, operator_name == "is?", )), + "any-of?" | "not-any-of?" => { + if p.len() < 2 { + return Err(predicate_error(row, format!( + "Wrong number of arguments to #any-of? predicate. Expected at least 1, got {}.", + p.len() - 1 + ))); + } + if p[1].type_ != TYPE_CAPTURE { + return Err(predicate_error(row, format!( + "First argument to #any-of? predicate must be a capture name. Got literal \"{}\".", + string_values[p[1].value_id as usize], + ))); + } + + let is_positive = operator_name == "any-of?"; + let mut values = Vec::new(); + for arg in &p[2..] { + if arg.type_ == TYPE_CAPTURE { + return Err(predicate_error(row, format!( + "Arguments to #any-of? predicate must be literals. Got capture @{}.", + capture_names[arg.value_id as usize], + ))); + } + values.push(string_values[arg.value_id as usize]); + } + text_predicates.push(TextPredicateCapture::AnyString( + p[1].value_id, + values + .iter() + .map(|x| (*x).to_string().into()) + .collect::>() + .into(), + is_positive, + )); + } + _ => general_predicates.push(QueryPredicate { - operator: operator_name.clone().into_boxed_str(), + operator: operator_name.to_string().into(), args: p[1..] .iter() .map(|a| { - if a.type_ == type_capture { + if a.type_ == TYPE_CAPTURE { QueryPredicateArg::Capture(a.value_id) } else { QueryPredicateArg::String( - string_values[a.value_id as usize].clone().into_boxed_str(), + string_values[a.value_id as usize].to_string().into(), ) } }) @@ -1631,32 +2054,36 @@ impl Query { } } - result - .text_predicates - .push(text_predicates.into_boxed_slice()); - result - .property_predicates - .push(property_predicates.into_boxed_slice()); - result - .property_settings - .push(property_settings.into_boxed_slice()); - result - .general_predicates - .push(general_predicates.into_boxed_slice()); + text_predicates_vec.push(text_predicates.into()); + property_predicates_vec.push(property_predicates.into()); + property_settings_vec.push(property_settings.into()); + general_predicates_vec.push(general_predicates.into()); } + + let result = Self { + ptr: unsafe { NonNull::new_unchecked(ptr.0) }, + capture_names: capture_names.into(), + capture_quantifiers: capture_quantifiers_vec.into(), + text_predicates: text_predicates_vec.into(), + property_predicates: property_predicates_vec.into(), + property_settings: property_settings_vec.into(), + general_predicates: general_predicates_vec.into(), + }; + + std::mem::forget(ptr); + Ok(result) } /// Get the byte offset where the given pattern starts in the query's source. #[doc(alias = "ts_query_start_byte_for_pattern")] + #[must_use] pub fn start_byte_for_pattern(&self, pattern_index: usize) -> usize { - if pattern_index >= self.text_predicates.len() { - panic!( - "Pattern index is {} but the pattern count is {}", - pattern_index, - self.text_predicates.len(), - ); - } + assert!( + pattern_index < self.text_predicates.len(), + "Pattern index is {pattern_index} but the pattern count is {}", + self.text_predicates.len(), + ); unsafe { ffi::ts_query_start_byte_for_pattern(self.ptr.as_ptr(), pattern_index as u32) as usize } @@ -1664,39 +2091,45 @@ impl Query { /// Get the number of patterns in the query. #[doc(alias = "ts_query_pattern_count")] + #[must_use] pub fn pattern_count(&self) -> usize { unsafe { ffi::ts_query_pattern_count(self.ptr.as_ptr()) as usize } } /// Get the names of the captures used in the query. - pub fn capture_names(&self) -> &[String] { + #[must_use] + pub const fn capture_names(&self) -> &[&str] { &self.capture_names } /// Get the quantifiers of the captures used in the query. - pub fn capture_quantifiers(&self, index: usize) -> &[CaptureQuantifier] { + #[must_use] + pub const fn capture_quantifiers(&self, index: usize) -> &[CaptureQuantifier] { &self.capture_quantifiers[index] } /// Get the index for a given capture name. + #[must_use] pub fn capture_index_for_name(&self, name: &str) -> Option { self.capture_names .iter() - .position(|n| n == name) + .position(|n| *n == name) .map(|ix| ix as u32) } /// Get the properties that are checked for the given pattern index. /// /// This includes predicates with the operators `is?` and `is-not?`. - pub fn property_predicates(&self, index: usize) -> &[(QueryProperty, bool)] { + #[must_use] + pub const fn property_predicates(&self, index: usize) -> &[(QueryProperty, bool)] { &self.property_predicates[index] } /// Get the properties that are set for the given pattern index. /// /// This includes predicates with the operator `set!`. - pub fn property_settings(&self, index: usize) -> &[QueryProperty] { + #[must_use] + pub const fn property_settings(&self, index: usize) -> &[QueryProperty] { &self.property_settings[index] } @@ -1707,7 +2140,8 @@ impl Query { /// * `eq?` and `not-eq?` /// * `is?` and `is-not?` /// * `set!` - pub fn general_predicates(&self, index: usize) -> &[QueryPredicate] { + #[must_use] + pub const fn general_predicates(&self, index: usize) -> &[QueryPredicate] { &self.general_predicates[index] } @@ -1720,7 +2154,7 @@ impl Query { unsafe { ffi::ts_query_disable_capture( self.ptr.as_ptr(), - name.as_bytes().as_ptr() as *const c_char, + name.as_bytes().as_ptr().cast::(), name.len() as u32, ); } @@ -1737,12 +2171,14 @@ impl Query { /// Check if a given pattern within a query has a single root node. #[doc(alias = "ts_query_is_pattern_rooted")] + #[must_use] pub fn is_pattern_rooted(&self, index: usize) -> bool { unsafe { ffi::ts_query_is_pattern_rooted(self.ptr.as_ptr(), index as u32) } } /// Check if a given pattern within a query has a single root node. #[doc(alias = "ts_query_is_pattern_non_local")] + #[must_use] pub fn is_pattern_non_local(&self, index: usize) -> bool { unsafe { ffi::ts_query_is_pattern_non_local(self.ptr.as_ptr(), index as u32) } } @@ -1752,6 +2188,7 @@ impl Query { /// A query step is 'definite' if its parent pattern will be guaranteed to match /// successfully once it reaches the step. #[doc(alias = "ts_query_is_pattern_guaranteed_at_step")] + #[must_use] pub fn is_pattern_guaranteed_at_step(&self, byte_offset: usize) -> bool { unsafe { ffi::ts_query_is_pattern_guaranteed_at_step(self.ptr.as_ptr(), byte_offset as u32) @@ -1761,16 +2198,15 @@ impl Query { fn parse_property( row: usize, function_name: &str, - capture_names: &[String], - string_values: &[String], + capture_names: &[&str], + string_values: &[&str], args: &[ffi::TSQueryPredicateStep], ) -> Result { - if args.len() == 0 || args.len() > 3 { + if args.is_empty() || args.len() > 3 { return Err(predicate_error( row, format!( - "Wrong number of arguments to {} predicate. Expected 1 to 3, got {}.", - function_name, + "Wrong number of arguments to {function_name} predicate. Expected 1 to 3, got {}.", args.len(), ), )); @@ -1781,13 +2217,13 @@ impl Query { let mut value = None; for arg in args { - if arg.type_ == ffi::TSQueryPredicateStepType_TSQueryPredicateStepTypeCapture { + if arg.type_ == ffi::TSQueryPredicateStepTypeCapture { if capture_id.is_some() { return Err(predicate_error( row, format!( - "Invalid arguments to {} predicate. Unexpected second capture name @{}", - function_name, capture_names[arg.value_id as usize] + "Invalid arguments to {function_name} predicate. Unexpected second capture name @{}", + capture_names[arg.value_id as usize] ), )); } @@ -1795,13 +2231,13 @@ impl Query { } else if key.is_none() { key = Some(&string_values[arg.value_id as usize]); } else if value.is_none() { - value = Some(string_values[arg.value_id as usize].as_str()); + value = Some(string_values[arg.value_id as usize]); } else { return Err(predicate_error( row, format!( - "Invalid arguments to {} predicate. Unexpected third argument @{}", - function_name, string_values[arg.value_id as usize] + "Invalid arguments to {function_name} predicate. Unexpected third argument @{}", + string_values[arg.value_id as usize] ), )); } @@ -1810,30 +2246,35 @@ impl Query { if let Some(key) = key { Ok(QueryProperty::new(key, value, capture_id)) } else { - return Err(predicate_error( + Err(predicate_error( row, - format!( - "Invalid arguments to {} predicate. Missing key argument", - function_name, - ), - )); + format!("Invalid arguments to {function_name} predicate. Missing key argument",), + )) } } } +impl Default for QueryCursor { + fn default() -> Self { + Self::new() + } +} + impl QueryCursor { /// Create a new cursor for executing a given query. /// /// The cursor stores the state that is needed to iteratively search for matches. #[doc(alias = "ts_query_cursor_new")] + #[must_use] pub fn new() -> Self { - QueryCursor { + Self { ptr: unsafe { NonNull::new_unchecked(ffi::ts_query_cursor_new()) }, } } /// Return the maximum number of in-progress matches for this cursor. #[doc(alias = "ts_query_cursor_match_limit")] + #[must_use] pub fn match_limit(&self) -> u32 { unsafe { ffi::ts_query_cursor_match_limit(self.ptr.as_ptr()) } } @@ -1850,6 +2291,7 @@ impl QueryCursor { /// Check if, on its last execution, this cursor exceeded its maximum number of /// in-progress matches. #[doc(alias = "ts_query_cursor_did_exceed_match_limit")] + #[must_use] pub fn did_exceed_match_limit(&self) -> bool { unsafe { ffi::ts_query_cursor_did_exceed_match_limit(self.ptr.as_ptr()) } } @@ -1860,21 +2302,21 @@ impl QueryCursor { /// Because multiple patterns can match the same set of nodes, one match may contain /// captures that appear *before* some of the captures from a previous match. #[doc(alias = "ts_query_cursor_exec")] - pub fn matches<'a, 'tree: 'a, T: TextProvider<'a> + 'a>( - &'a mut self, - query: &'a Query, + pub fn matches<'query, 'tree, T: TextProvider, I: AsRef<[u8]>>( + &mut self, + query: &'query Query, node: Node<'tree>, text_provider: T, - ) -> QueryMatches<'a, 'tree, T> { + ) -> QueryMatches<'query, 'tree, T, I> { let ptr = self.ptr.as_ptr(); unsafe { ffi::ts_query_cursor_exec(ptr, query.ptr.as_ptr(), node.0) }; QueryMatches { ptr, query, text_provider, - buffer1: Default::default(), - buffer2: Default::default(), - _tree: PhantomData, + buffer1: Vec::default(), + buffer2: Vec::default(), + _phantom: PhantomData, } } @@ -1883,21 +2325,21 @@ impl QueryCursor { /// This is useful if you don't care about which pattern matched, and just want a single, /// ordered sequence of captures. #[doc(alias = "ts_query_cursor_exec")] - pub fn captures<'a, 'tree: 'a, T: TextProvider<'a> + 'a>( - &'a mut self, - query: &'a Query, + pub fn captures<'query, 'tree, T: TextProvider, I: AsRef<[u8]>>( + &mut self, + query: &'query Query, node: Node<'tree>, text_provider: T, - ) -> QueryCaptures<'a, 'tree, T> { + ) -> QueryCaptures<'query, 'tree, T, I> { let ptr = self.ptr.as_ptr(); - unsafe { ffi::ts_query_cursor_exec(self.ptr.as_ptr(), query.ptr.as_ptr(), node.0) }; + unsafe { ffi::ts_query_cursor_exec(ptr, query.ptr.as_ptr(), node.0) }; QueryCaptures { ptr, query, text_provider, - buffer1: Default::default(), - buffer2: Default::default(), - _tree: PhantomData, + buffer1: Vec::default(), + buffer2: Vec::default(), + _phantom: PhantomData, } } @@ -1926,10 +2368,34 @@ impl QueryCursor { } self } + + /// Set the maximum start depth for a query cursor. + /// + /// This prevents cursors from exploring children nodes at a certain depth. + /// Note if a pattern includes many children, then they will still be checked. + /// + /// The zero max start depth value can be used as a special behavior and + /// it helps to destructure a subtree by staying on a node and using captures + /// for interested parts. Note that the zero max start depth only limit a search + /// depth for a pattern's root node but other nodes that are parts of the pattern + /// may be searched at any depth what defined by the pattern structure. + /// + /// Set to `None` to remove the maximum start depth. + #[doc(alias = "ts_query_cursor_set_max_start_depth")] + pub fn set_max_start_depth(&mut self, max_start_depth: Option) -> &mut Self { + unsafe { + ffi::ts_query_cursor_set_max_start_depth( + self.ptr.as_ptr(), + max_start_depth.unwrap_or(u32::MAX), + ); + } + self + } } -impl<'a, 'tree> QueryMatch<'a, 'tree> { - pub fn id(&self) -> u32 { +impl<'tree> QueryMatch<'_, 'tree> { + #[must_use] + pub const fn id(&self) -> u32 { self.id } @@ -1942,116 +2408,153 @@ impl<'a, 'tree> QueryMatch<'a, 'tree> { &self, capture_ix: u32, ) -> impl Iterator> + '_ { - self.captures.iter().filter_map(move |capture| { - if capture.index == capture_ix { - Some(capture.node) - } else { - None - } - }) + self.captures + .iter() + .filter_map(move |capture| (capture.index == capture_ix).then_some(capture.node)) } - fn new(m: ffi::TSQueryMatch, cursor: *mut ffi::TSQueryCursor) -> Self { + fn new(m: &ffi::TSQueryMatch, cursor: *mut ffi::TSQueryCursor) -> Self { QueryMatch { cursor, id: m.id, pattern_index: m.pattern_index as usize, - captures: if m.capture_count > 0 { - unsafe { + captures: (m.capture_count > 0) + .then(|| unsafe { slice::from_raw_parts( - m.captures as *const QueryCapture<'tree>, + m.captures.cast::>(), m.capture_count as usize, ) - } - } else { - &[] - }, + }) + .unwrap_or_default(), } } - fn satisfies_text_predicates( + fn satisfies_text_predicates>( &self, query: &Query, buffer1: &mut Vec, buffer2: &mut Vec, - text_provider: &mut impl TextProvider<'a>, + text_provider: &mut impl TextProvider, ) -> bool { - fn get_text<'a, 'b: 'a, I: Iterator>( + struct NodeText<'a, T> { buffer: &'a mut Vec, - mut chunks: I, - ) -> &'a [u8] { - let first_chunk = chunks.next().unwrap_or(&[]); - if let Some(next_chunk) = chunks.next() { - buffer.clear(); - buffer.extend_from_slice(first_chunk); - buffer.extend_from_slice(next_chunk); - for chunk in chunks { - buffer.extend_from_slice(chunk); + first_chunk: Option, + } + impl<'a, T: AsRef<[u8]>> NodeText<'a, T> { + fn new(buffer: &'a mut Vec) -> Self { + Self { + buffer, + first_chunk: None, + } + } + + fn get_text(&mut self, chunks: &mut impl Iterator) -> &[u8] { + self.first_chunk = chunks.next(); + if let Some(next_chunk) = chunks.next() { + self.buffer.clear(); + self.buffer + .extend_from_slice(self.first_chunk.as_ref().unwrap().as_ref()); + self.buffer.extend_from_slice(next_chunk.as_ref()); + for chunk in chunks { + self.buffer.extend_from_slice(chunk.as_ref()); + } + self.buffer.as_slice() + } else if let Some(ref first_chunk) = self.first_chunk { + first_chunk.as_ref() + } else { + Default::default() } - buffer.as_slice() - } else { - first_chunk } } + let mut node_text1 = NodeText::new(buffer1); + let mut node_text2 = NodeText::new(buffer2); + query.text_predicates[self.pattern_index] .iter() .all(|predicate| match predicate { - TextPredicate::CaptureEqCapture(i, j, is_positive) => { - let node1 = self.nodes_for_capture_index(*i).next(); - let node2 = self.nodes_for_capture_index(*j).next(); - match (node1, node2) { - (Some(node1), Some(node2)) => { - let text1 = get_text(buffer1, text_provider.text(node1)); - let text2 = get_text(buffer2, text_provider.text(node2)); - (text1 == text2) == *is_positive + TextPredicateCapture::EqCapture(i, j, is_positive, match_all_nodes) => { + let mut nodes_1 = self.nodes_for_capture_index(*i); + let mut nodes_2 = self.nodes_for_capture_index(*j); + while let (Some(node1), Some(node2)) = (nodes_1.next(), nodes_2.next()) { + let mut text1 = text_provider.text(node1); + let mut text2 = text_provider.text(node2); + let text1 = node_text1.get_text(&mut text1); + let text2 = node_text2.get_text(&mut text2); + if (text1 == text2) != *is_positive && *match_all_nodes { + return false; + } + if (text1 == text2) == *is_positive && !*match_all_nodes { + return true; + } + } + nodes_1.next().is_none() && nodes_2.next().is_none() + } + TextPredicateCapture::EqString(i, s, is_positive, match_all_nodes) => { + let nodes = self.nodes_for_capture_index(*i); + for node in nodes { + let mut text = text_provider.text(node); + let text = node_text1.get_text(&mut text); + if (text == s.as_bytes()) != *is_positive && *match_all_nodes { + return false; + } + if (text == s.as_bytes()) == *is_positive && !*match_all_nodes { + return true; } - _ => true, } + true } - TextPredicate::CaptureEqString(i, s, is_positive) => { - let node = self.nodes_for_capture_index(*i).next(); - match node { - Some(node) => { - let text = get_text(buffer1, text_provider.text(node)); - (text == s.as_bytes()) == *is_positive + TextPredicateCapture::MatchString(i, r, is_positive, match_all_nodes) => { + let nodes = self.nodes_for_capture_index(*i); + for node in nodes { + let mut text = text_provider.text(node); + let text = node_text1.get_text(&mut text); + if (r.is_match(text)) != *is_positive && *match_all_nodes { + return false; + } + if (r.is_match(text)) == *is_positive && !*match_all_nodes { + return true; } - None => true, } + true } - TextPredicate::CaptureMatchString(i, r, is_positive) => { - let node = self.nodes_for_capture_index(*i).next(); - match node { - Some(node) => { - let text = get_text(buffer1, text_provider.text(node)); - r.is_match(text) == *is_positive + TextPredicateCapture::AnyString(i, v, is_positive) => { + let nodes = self.nodes_for_capture_index(*i); + for node in nodes { + let mut text = text_provider.text(node); + let text = node_text1.get_text(&mut text); + if (v.iter().any(|s| text == s.as_bytes())) != *is_positive { + return false; } - None => true, } + true } }) } } impl QueryProperty { + #[must_use] pub fn new(key: &str, value: Option<&str>, capture_id: Option) -> Self { - QueryProperty { + Self { capture_id, - key: key.to_string().into_boxed_str(), - value: value.map(|s| s.to_string().into_boxed_str()), + key: key.to_string().into(), + value: value.map(|s| s.to_string().into()), } } } -impl<'a, 'tree, T: TextProvider<'a>> Iterator for QueryMatches<'a, 'tree, T> { - type Item = QueryMatch<'a, 'tree>; +impl<'query, 'tree: 'query, T: TextProvider, I: AsRef<[u8]>> Iterator + for QueryMatches<'query, 'tree, T, I> +{ + type Item = QueryMatch<'query, 'tree>; fn next(&mut self) -> Option { unsafe { loop { let mut m = MaybeUninit::::uninit(); if ffi::ts_query_cursor_next_match(self.ptr, m.as_mut_ptr()) { - let result = QueryMatch::new(m.assume_init(), self.ptr); + let result = QueryMatch::new(&m.assume_init(), self.ptr); if result.satisfies_text_predicates( self.query, &mut self.buffer1, @@ -2068,8 +2571,10 @@ impl<'a, 'tree, T: TextProvider<'a>> Iterator for QueryMatches<'a, 'tree, T> { } } -impl<'a, 'tree, T: TextProvider<'a>> Iterator for QueryCaptures<'a, 'tree, T> { - type Item = (QueryMatch<'a, 'tree>, usize); +impl<'query, 'tree: 'query, T: TextProvider, I: AsRef<[u8]>> Iterator + for QueryCaptures<'query, 'tree, T, I> +{ + type Item = (QueryMatch<'query, 'tree>, usize); fn next(&mut self) -> Option { unsafe { @@ -2079,9 +2584,9 @@ impl<'a, 'tree, T: TextProvider<'a>> Iterator for QueryCaptures<'a, 'tree, T> { if ffi::ts_query_cursor_next_capture( self.ptr, m.as_mut_ptr(), - &mut capture_index as *mut u32, + std::ptr::addr_of_mut!(capture_index), ) { - let result = QueryMatch::new(m.assume_init(), self.ptr); + let result = QueryMatch::new(&m.assume_init(), self.ptr); if result.satisfies_text_predicates( self.query, &mut self.buffer1, @@ -2089,9 +2594,8 @@ impl<'a, 'tree, T: TextProvider<'a>> Iterator for QueryCaptures<'a, 'tree, T> { &mut self.text_provider, ) { return Some((result, capture_index as usize)); - } else { - result.remove(); } + result.remove(); } else { return None; } @@ -2100,7 +2604,7 @@ impl<'a, 'tree, T: TextProvider<'a>> Iterator for QueryCaptures<'a, 'tree, T> { } } -impl<'a, 'tree, T: TextProvider<'a>> QueryMatches<'a, 'tree, T> { +impl, I: AsRef<[u8]>> QueryMatches<'_, '_, T, I> { #[doc(alias = "ts_query_cursor_set_byte_range")] pub fn set_byte_range(&mut self, range: ops::Range) { unsafe { @@ -2116,7 +2620,7 @@ impl<'a, 'tree, T: TextProvider<'a>> QueryMatches<'a, 'tree, T> { } } -impl<'a, 'tree, T: TextProvider<'a>> QueryCaptures<'a, 'tree, T> { +impl, I: AsRef<[u8]>> QueryCaptures<'_, '_, T, I> { #[doc(alias = "ts_query_cursor_set_byte_range")] pub fn set_byte_range(&mut self, range: ops::Range) { unsafe { @@ -2132,7 +2636,7 @@ impl<'a, 'tree, T: TextProvider<'a>> QueryCaptures<'a, 'tree, T> { } } -impl<'cursor, 'tree> fmt::Debug for QueryMatch<'cursor, 'tree> { +impl fmt::Debug for QueryMatch<'_, '_> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, @@ -2142,19 +2646,20 @@ impl<'cursor, 'tree> fmt::Debug for QueryMatch<'cursor, 'tree> { } } -impl<'a, F, I> TextProvider<'a> for F +impl TextProvider for F where - F: FnMut(Node) -> I, - I: Iterator + 'a, + F: FnMut(Node) -> R, + R: Iterator, + I: AsRef<[u8]>, { - type I = I; + type I = R; fn text(&mut self, node: Node) -> Self::I { (self)(node) } } -impl<'a> TextProvider<'a> for &'a [u8] { +impl<'a> TextProvider<&'a [u8]> for &'a [u8] { type I = iter::Once<&'a [u8]>; fn text(&mut self, node: Node) -> Self::I { @@ -2181,8 +2686,9 @@ impl Drop for QueryCursor { } impl Point { - pub fn new(row: usize, column: usize) -> Self { - Point { row, column } + #[must_use] + pub const fn new(row: usize, column: usize) -> Self { + Self { row, column } } } @@ -2192,11 +2698,11 @@ impl fmt::Display for Point { } } -impl Into for Point { - fn into(self) -> ffi::TSPoint { - ffi::TSPoint { - row: self.row as u32, - column: self.column as u32, +impl From for ffi::TSPoint { + fn from(val: Point) -> Self { + Self { + row: val.row as u32, + column: val.column as u32, } } } @@ -2210,13 +2716,13 @@ impl From for Point { } } -impl Into for Range { - fn into(self) -> ffi::TSRange { - ffi::TSRange { - start_byte: self.start_byte as u32, - end_byte: self.end_byte as u32, - start_point: self.start_point.into(), - end_point: self.end_point.into(), +impl From for ffi::TSRange { + fn from(val: Range) -> Self { + Self { + start_byte: val.start_byte as u32, + end_byte: val.end_byte as u32, + start_point: val.start_point.into(), + end_point: val.end_point.into(), } } } @@ -2232,21 +2738,22 @@ impl From for Range { } } -impl<'a> Into for &'a InputEdit { - fn into(self) -> ffi::TSInputEdit { - ffi::TSInputEdit { - start_byte: self.start_byte as u32, - old_end_byte: self.old_end_byte as u32, - new_end_byte: self.new_end_byte as u32, - start_point: self.start_position.into(), - old_end_point: self.old_end_position.into(), - new_end_point: self.new_end_position.into(), +impl From<&'_ InputEdit> for ffi::TSInputEdit { + fn from(val: &'_ InputEdit) -> Self { + Self { + start_byte: val.start_byte as u32, + old_end_byte: val.old_end_byte as u32, + new_end_byte: val.new_end_byte as u32, + start_point: val.start_position.into(), + old_end_point: val.old_end_position.into(), + new_end_point: val.new_end_position.into(), } } } impl<'a> LossyUtf8<'a> { - pub fn new(bytes: &'a [u8]) -> Self { + #[must_use] + pub const fn new(bytes: &'a [u8]) -> Self { LossyUtf8 { bytes, in_replacement: false, @@ -2267,7 +2774,7 @@ impl<'a> Iterator for LossyUtf8<'a> { } match std::str::from_utf8(self.bytes) { Ok(valid) => { - self.bytes = &[]; + self.bytes = Default::default(); Some(valid) } Err(error) => { @@ -2291,7 +2798,8 @@ impl<'a> Iterator for LossyUtf8<'a> { } } -fn predicate_error(row: usize, message: String) -> QueryError { +#[must_use] +const fn predicate_error(row: usize, message: String) -> QueryError { QueryError { kind: QueryErrorKind::Predicate, row, @@ -2328,7 +2836,9 @@ impl fmt::Display for QueryError { QueryErrorKind::Syntax => "Invalid syntax:\n", QueryErrorKind::Language => "", }; - if msg.len() > 0 { + if msg.is_empty() { + write!(f, "{}", self.message) + } else { write!( f, "Query error at {}:{}. {}{}", @@ -2337,18 +2847,29 @@ impl fmt::Display for QueryError { msg, self.message ) - } else { - write!(f, "{}", self.message) } } } +pub fn wasm_stdlib_symbols() -> impl Iterator { + const WASM_STDLIB_SYMBOLS: &str = include_str!(concat!(env!("OUT_DIR"), "/stdlib-symbols.txt")); + + WASM_STDLIB_SYMBOLS + .lines() + .map(|s| s.trim_matches(|c| c == '"' || c == ',')) +} + extern "C" { fn free(ptr: *mut c_void); } static mut FREE_FN: unsafe extern "C" fn(ptr: *mut c_void) = free; +/// Sets the memory allocation functions that the core library should use. +/// +/// # Safety +/// +/// This function uses FFI and mutates a static global. #[doc(alias = "ts_set_allocator")] pub unsafe fn set_allocator( new_malloc: Option *mut c_void>, @@ -2365,12 +2886,28 @@ impl error::Error for LanguageError {} impl error::Error for QueryError {} unsafe impl Send for Language {} -unsafe impl Send for Parser {} -unsafe impl Send for Query {} -unsafe impl Send for QueryCursor {} -unsafe impl Send for Tree {} unsafe impl Sync for Language {} + +unsafe impl Send for Node<'_> {} +unsafe impl Sync for Node<'_> {} + +unsafe impl Send for LookaheadIterator {} +unsafe impl Sync for LookaheadIterator {} + +unsafe impl Send for LookaheadNamesIterator<'_> {} +unsafe impl Sync for LookaheadNamesIterator<'_> {} + +unsafe impl Send for Parser {} unsafe impl Sync for Parser {} + +unsafe impl Send for Query {} unsafe impl Sync for Query {} + +unsafe impl Send for QueryCursor {} unsafe impl Sync for QueryCursor {} + +unsafe impl Send for Tree {} unsafe impl Sync for Tree {} + +unsafe impl Send for TreeCursor<'_> {} +unsafe impl Sync for TreeCursor<'_> {} diff --git a/third-party/tree-sitter/tree-sitter/lib/binding_rust/util.rs b/third-party/tree-sitter/tree-sitter/lib/binding_rust/util.rs index 5eda71f422..69e5ec7c81 100644 --- a/third-party/tree-sitter/tree-sitter/lib/binding_rust/util.rs +++ b/third-party/tree-sitter/tree-sitter/lib/binding_rust/util.rs @@ -9,7 +9,7 @@ pub struct CBufferIter { } impl CBufferIter { - pub unsafe fn new(ptr: *mut T, count: usize) -> Self { + pub const unsafe fn new(ptr: *mut T, count: usize) -> Self { Self { ptr, count, i: 0 } } } @@ -23,7 +23,7 @@ impl Iterator for CBufferIter { None } else { self.i += 1; - Some(unsafe { *self.ptr.offset(i as isize) }) + Some(unsafe { *self.ptr.add(i) }) } } @@ -37,6 +37,8 @@ impl ExactSizeIterator for CBufferIter {} impl Drop for CBufferIter { fn drop(&mut self) { - unsafe { (FREE_FN)(self.ptr as *mut c_void) }; + if !self.ptr.is_null() { + unsafe { (FREE_FN)(self.ptr.cast::()) }; + } } } diff --git a/third-party/tree-sitter/tree-sitter/lib/binding_rust/wasm_language.rs b/third-party/tree-sitter/tree-sitter/lib/binding_rust/wasm_language.rs new file mode 100644 index 0000000000..2d8a32d26d --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/lib/binding_rust/wasm_language.rs @@ -0,0 +1,141 @@ +use crate::{ffi, Language, LanguageError, Parser, FREE_FN}; +use std::{ + error, + ffi::{CStr, CString}, + fmt, + mem::{self, MaybeUninit}, + os::raw::c_char, +}; +pub use wasmtime; + +// Force Cargo to include wasmtime-c-api as a dependency of this crate, +// even though it is only used by the C code. +#[allow(unused)] +fn _use_wasmtime() { + wasmtime_c_api::wasm_engine_new(); +} + +#[repr(C)] +#[derive(Clone)] +#[allow(non_camel_case_types)] +pub struct wasm_engine_t { + pub(crate) engine: wasmtime::Engine, +} + +pub struct WasmStore(*mut ffi::TSWasmStore); + +#[derive(Debug, PartialEq, Eq)] +pub struct WasmError { + pub kind: WasmErrorKind, + pub message: String, +} + +#[derive(Debug, PartialEq, Eq)] +pub enum WasmErrorKind { + Parse, + Compile, + Instantiate, + Other, +} + +impl WasmStore { + pub fn new(engine: wasmtime::Engine) -> Result { + unsafe { + let mut error = MaybeUninit::::uninit(); + let engine = Box::new(wasm_engine_t { engine }); + let store = ffi::ts_wasm_store_new( + (Box::leak(engine) as *mut wasm_engine_t).cast(), + error.as_mut_ptr(), + ); + if store.is_null() { + Err(WasmError::new(error.assume_init())) + } else { + Ok(Self(store)) + } + } + } + + pub fn load_language(&mut self, name: &str, bytes: &[u8]) -> Result { + let name = CString::new(name).unwrap(); + unsafe { + let mut error = MaybeUninit::::uninit(); + let language = ffi::ts_wasm_store_load_language( + self.0, + name.as_ptr(), + bytes.as_ptr().cast::(), + bytes.len() as u32, + error.as_mut_ptr(), + ); + if language.is_null() { + Err(WasmError::new(error.assume_init())) + } else { + Ok(Language(language)) + } + } + } + + #[must_use] + pub fn language_count(&self) -> usize { + unsafe { ffi::ts_wasm_store_language_count(self.0) } + } +} + +impl WasmError { + unsafe fn new(error: ffi::TSWasmError) -> Self { + let message = CStr::from_ptr(error.message).to_str().unwrap().to_string(); + (FREE_FN)(error.message.cast()); + Self { + kind: match error.kind { + ffi::TSWasmErrorKindParse => WasmErrorKind::Parse, + ffi::TSWasmErrorKindCompile => WasmErrorKind::Compile, + ffi::TSWasmErrorKindInstantiate => WasmErrorKind::Instantiate, + _ => WasmErrorKind::Other, + }, + message, + } + } +} + +impl Language { + #[must_use] + pub fn is_wasm(&self) -> bool { + unsafe { ffi::ts_language_is_wasm(self.0) } + } +} + +impl Parser { + pub fn set_wasm_store(&mut self, store: WasmStore) -> Result<(), LanguageError> { + unsafe { ffi::ts_parser_set_wasm_store(self.0.as_ptr(), store.0) }; + mem::forget(store); + Ok(()) + } + + pub fn take_wasm_store(&mut self) -> Option { + let ptr = unsafe { ffi::ts_parser_take_wasm_store(self.0.as_ptr()) }; + if ptr.is_null() { + None + } else { + Some(WasmStore(ptr)) + } + } +} + +impl Drop for WasmStore { + fn drop(&mut self) { + unsafe { ffi::ts_wasm_store_delete(self.0) }; + } +} + +impl fmt::Display for WasmError { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let kind = match self.kind { + WasmErrorKind::Parse => "Failed to parse wasm", + WasmErrorKind::Compile => "Failed to compile wasm", + WasmErrorKind::Instantiate => "Failed to instantiate wasm module", + WasmErrorKind::Other => "Unknown error", + }; + write!(f, "{kind}: {}", self.message) + } +} + +impl error::Error for WasmError {} diff --git a/third-party/tree-sitter/tree-sitter/lib/binding_web/.eslintrc.js b/third-party/tree-sitter/tree-sitter/lib/binding_web/.eslintrc.js new file mode 100644 index 0000000000..38709eb8ec --- /dev/null +++ b/third-party/tree-sitter/tree-sitter/lib/binding_web/.eslintrc.js @@ -0,0 +1,22 @@ +module.exports = { + 'env': { + 'commonjs': true, + 'es2021': true, + }, + 'extends': 'google', + 'overrides': [ + ], + 'parserOptions': { + 'ecmaVersion': 'latest', + 'sourceType': 'module', + }, + 'rules': { + 'indent': ['error', 2, {'SwitchCase': 1}], + 'max-len': [ + 'error', + {'code': 120, 'ignoreComments': true, 'ignoreUrls': true, 'ignoreStrings': true, 'ignoreTemplateLiterals': true}, + ], + 'require-jsdoc': 0, + 'new-cap': 0, + }, +}; diff --git a/third-party/tree-sitter/tree-sitter/lib/binding_web/README.md b/third-party/tree-sitter/tree-sitter/lib/binding_web/README.md index a75cd9f01f..f9f621a6ba 100644 --- a/third-party/tree-sitter/tree-sitter/lib/binding_web/README.md +++ b/third-party/tree-sitter/tree-sitter/lib/binding_web/README.md @@ -1,14 +1,18 @@ -Web Tree-sitter -=============== +# Web Tree-sitter + +[![npmjs.com badge]][npmjs.com] + +[npmjs.com]: https://www.npmjs.org/package/web-tree-sitter +[npmjs.com badge]: https://img.shields.io/npm/v/web-tree-sitter.svg?color=%23BF4A4A WebAssembly bindings to the [Tree-sitter](https://github.com/tree-sitter/tree-sitter) parsing library. ### Setup -You can download the the `tree-sitter.js` and `tree-sitter.wasm` files from [the latest GitHub release](https://github.com/tree-sitter/tree-sitter/releases/latest) and load them using a standalone script: +You can download the `tree-sitter.js` and `tree-sitter.wasm` files from [the latest GitHub release](https://github.com/tree-sitter/tree-sitter/releases/latest) and load them using a standalone script: ```html -